diff --git a/.vscode/settings.json b/.vscode/settings.json index 3e320c8..de6120a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -30,5 +30,6 @@ "**/.git": true, "**/node_modules": true }, - "commentTranslate.source": "Bing" + "commentTranslate.source": "Bing", + "commentTranslate.hover.enabled": true } diff --git a/CHANGELOG.md b/CHANGELOG.md index 985759e..882043f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ -# Changelog +# + +## 2024/2/10 日本語版更新中です + +## [v3.4.5](https://github.com/Pete9xi/Paradox_AntiCheat/tree/v3.4.6) (2023-12-10) + +[Full Changelog](https://github.com/Pete9xi/Paradox_AntiCheat/compare/v3.4.5...v3.4.6) ## [v3.4.5](https://github.com/Pete9xi/Paradox_AntiCheat/tree/v3.4.5) (2023-12-05) diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/docs/Commands_Features/chatcommands.md b/docs/Commands_Features/chatcommands.md new file mode 100644 index 0000000..fa2ae2d --- /dev/null +++ b/docs/Commands_Features/chatcommands.md @@ -0,0 +1,827 @@ +![Paradox](../Media/Paradox_Title.png) + +## !afk + +The AFK command kicks people from the world after the specified time in config.js if they are not paradox opped. The command acts as a toggle to enable and disable the module. + +> ```Toggle +> !afk +> ``` + + +## !allowgma + +!> Note one mode has to stay enabled by default if all modes are not allowed, and this is Adventure. + +This modules allows players to be in game mode adventure. All paradox Opped players are excluded from checks. To enabled it use the command below. + +> ```Toggle +> !allowgma +> ``` + + +## !allowgmc + +!> Note one mode has to stay enabled by default if all modes are not allowed, and this is Adventure. + +This modules allows players to be in game mode creative. All paradox Opped players are excluded from checks. + +> ```Toggle +> !allowgmc +> ``` + + + +## !allowgms + +!> Note one mode has to stay enabled by default if all modes are not allowed, and this is Adventure. + +This modules allows players to be in game mode survival. All paradox Opped players are excluded from checks. + +> ```Toggle +> !allowgms +> ``` + + +## !antikb + +This module monitors players for using possible hacks to prevent taking knockback it can be enabled and disabled via the command in chat. + +> ```Toggle +> !antikb +> ``` + +## !antifalla + +This module detects players using NoFall damage hacks if a player is detected they are flagged, this can be enabled or disabled by using the following command. + +> ```Toggle +> !antifalla +> ``` + +## !antikillaura + +This module monitors players and checks for attacks outside a 90 degree angle. This module can be enabled or disabled via the command below. + +> ```Toggle +> !antikb +> ``` + +## !antinukera + +This module prevents players from nuking the world, when detecting that a vast amount of blocks are being removed at an extreme rate it will flag the offending player and ban them. + +> ```Toggle +> !antinukera +> ``` + +## !antiphasea + +This modules checks for players using phase hacks, players who phasing through blocks, will be teleported back to the last valid location this acts as a deterrent to using the hack, players who are paradox opped will be alerted providing they have cheat notifications on. + +> ```Toggle +> !antiphasea +> ``` + +## !antispam + +This module checks players for spamming in chat, there is a 2 second cool down. If they are flagged more than five times they will be banned. + +> ```Toggle +> !antispam +> ``` + +## !autoban + +This module monitors all players current violations across every module in paradox if they have a violation count above 50, they will be banned, this runs every 5 minutes. + +> ```Toggle +> !autoban +> ``` + +## !badpackets1 + +This module checks for message lengths with each broadcast. If a message is detected they are banned. + +> ```Toggle +> !badpackets1 +> ``` + +## !badpackets2 + +This module checks for invalid selected slots by player. If flagged the player is banned. + +> ```Toggle +> !badpackets2 +> ``` + +## !ban + +This command allows you to ban a player, below is an example. + +> ```Command +> !ban Pete9xi Was using hacks. +> ``` + +If a player has a space in their name you can wrap this in quotation marks + +> ```Command +> !ban "Tin Man22" using fly hacks. +> ``` + +## !bedrockvalidate + +This module checks for bedrock being removed at the bottom of the world, if missing it replaces the bedrock layer this module can be toggled via the command. + +> ```Toggle +> !bedrockvalidate +> ``` + +## !biome + +This command is usable by all players, when ran in chat it will print the current biome and the direction they are facing in chat, only the player that ran the command can see this. + +> ```Command +> !biome +> ``` + +## !chatranks + +Chat ranks are fully customizable and can be enabled or disabled using the command. When disabled chat will go back to the vanilla style. + +> ```Command +> !chatranks +> ``` + +## !channel + +?> The channel command can be used by all players. + +The channel command has a few parameters that you can use, channels are private chat groups these can be protected by a password or left open so others can join, Players can also be invited to a chat channel when all members leave the chat channel or the server gets restarted the channels are deleted. + +Example of creating a channel without a password. + +> ```Command +> !channel create Test +> ``` + +Example of creating a chat channel with a password. + +> ```Command +> !channel create Test Password123 +> ``` + +Example of deleting an existing channel without a password. + +> ```Command +> !channel delete Test +> ``` + +Example of deleting an existing channel with a password. + +> ```Command +> !channel delete Test Password123 +> ``` + +Example of inviting a player to the channel + +> ```Command +> !channel invite Visual1mpact +> ``` + +Example of joining a channel without a password + +> ```Command +> !channel join Test +> ``` + +Example of joining a password protected channel. + +> ```Command +> !channel join Test Password123 +> ``` + +You can also transfer ownership of a channel providing you are the one who created it, an example below. + +> ```Command +> !channel handover Test Visual1mpact +> ``` + +## !clearchat + +This command clears the chat window for all players, this can only be ran by paradox opped players + +> ```Command +> !clearchat +> ``` + +## !clearlag + +This module removes lag from the server, this can be configured in config.js as to the time intervals that it checks by default this is set to every 10 minutes. The module removes all entity that are considered lag ie dropped items etc. + +> ```Toggle +> !clearlag +> ``` + +File: `scripts/data/config.js` + +> ```js +> clearLag: { +> ``` + + enabled: false, + seconds: 0, + minutes: 10, + hours: 0, + days: 0, + }, + +> ``` +> +> ``` + +File: `scripts/data/clearlag.js` + +This contains all items/entitys that are cleared from the world when the module is active. + +## !credits + +This command shows the credits which contains all members who have worked on paradox in the past as well as the current devlopers. + +> ```Command +> !credits +> ``` + +## !deop + +The deop command is used to Revokes Op from a player in Paradox AntiCheat features. + +> ```Example +> !deop Pete9xi +> ``` + +## !delhome + +?> The delhome command can be used by all players. + +This command allows a player to delete one of their saved locations. + +> ```Command +> !delhome MineTown +> ``` + +## !despawn + +This command allows you to despawn multiple entitys in the loaded chuncks around you, below is an example of removing all zombies from around the player. + +> ```Command +> !despawn zombie +> ``` + +If you want to remove all entites around you in the current loaded chunks you can run the following command. + +> ```Command +> !despawn all +> ``` + +## !ecwipe + +This command allows you to wipe a players enderchest inventory, you can run the following command. + +> ```Command +> !ecwipe Pete9xi +> ``` + +## !enchantedarmor + +This module when enabled prevents players from wearing enchanted armor. + +> ```Toggle +> !enchantedarmor +> ``` + +## !fly + +!> The EDU flag must be enabled on the world for this command to be used. + +This command grants a player fly abilities. + +> ```Command +> !fly Pete9xi +> ``` + +## !flya + +This module checks for players using Fly hacks, when a player is detected using fly hacks it flaggs them and telports them back to the last known location when they were on the ground. + +> ```Toggle +> !flya +> ``` + +## !freeze + +The freeze command allows you to freeze a player, they wont be able to see but will see an image saying they are frozen. The same command acts as a toggle to freeze and unfreeze a player. + +> ```Toggle +> !freeze Pete9xi +> ``` + +## !fullreport + +This command prints in chat to the paradox opped player that ran the command a full list of every player with thier current gamemode coordinates as well as any violations they may have. + +> ```Command +> !fullreport +> ``` + +## !gohome + +?> The gohome command can be used by all players + +This command allows a player to teleport to a saved location. There is a cool down timer that can be configured in config.js + +> ```Command +> !gohome Base +> ``` + +File: `scripts/data/config.js` + +> ```js +> goHome: { +> ``` + + seconds: 0, + minutes: 5, + hours: 0, + days: 0, + }, + +> ``` +> +> ``` + +## !help + +The help command is self explanitory however both paradox oppped and no paradox opped players can use this command, for paradox oppped players you will see a list of all commands, non paradox oppped players will see a list of commands that the player can use. + +> ```Command +> !help +> ``` + +## !hotbar + +The hotbar command can be used to set a message above every players hotbar. running the command below will enable the hotbar message that is currently set in config.js + +> ```Command +> !hotbar +> ``` + +Running the command below will enable the hotbar and set a new message. + +> ```Command +> !hotbar Anarchy Server | Realm Code: 34fhf843 +> ``` + +To disable the hotbar if enable you can run the following command. + +> ```Command +> !hotbar disable +> ``` + +## !illegalenchant + +This module when enabled will check all players who are not paradox opped for illegal enchantments on items that cannot be enchanted as well as items that can be, if an enchatment is detected above the vanllia values the player is banned and their inventory will be wiped clean. + +> ```Toggle +> !illegalenchant +> ``` + +## !illegalitemsa + +This module checks for items within the players inventory that are classed as illegal, there is a list by deafult that can be edited. If a player has an illegal item in their inventory they will be banned and their inventory will be wiped. + +File: `scripts/data/itemban.js` + +> ```Toggle +> !illegalitemsa +> ``` + +## !illegalitemsb + +This module checks for players placing illegal items within the world, if detected they are also banned. for example if a player placed an end portal frame. + +> ```Toggle +> !illegalitemsb +> ``` + +## !illegalitemsc + +This module checks for players dropping illegal items within the world, if detected they are also banned. for example if a player dropped an end portal frame. + +> ```Toggle +> !illegalitemsc +> ``` + +## !illegallores + +This module checks for illegal lores on items. + +> ```Toggle +> !illegallores +> ``` + +## !invsee + +This command allows you to view the invetory of another player it will print all items to chat as well as there enchantment status, this is only shown to the paradox opped player who ran the command + +> ```Command +> !invsee Pete9xi +> ``` + +## !invalidsprinta + +This module checks for illegal sprinting with blindness effect applied. + +> ```Toggle +> !invalidsprinta +> ``` + +## !jesusa + +This module checks for players who are using movement hacks that allow them to run on water and lava. + +> ```Toggle +> !jesusa +> ``` + +## !listhome + +?> This command can be used by all players. + +This command allows a player to list thier saved locations. + +> ```Command +> !listhome +> ``` + +## !listitems + +!> This is a debug command used by the developers. + +## !lockdown + +This command locks down the server preventing any player who is not paradox oppped from joing when enabled if there are players who are not paradox opped but are connected will be kicked from the server. + +> ```Toggle +> !lockdown +> ``` + +## !mute + +This command allows you to mute the specified user and optionally gives reason as to why they were muted, this will prevent that player talking in chat. + +> ```Command +> !mute Pete9xi Spamming offensive words in chat. +> ``` + +## !namespoofa + +This module checks for player's name exceeding character limitations. + +> ```Toggle +> !namespoofa +> ``` + +## !namespoofb + +This module checks for player's name that has Non ASCII characters + +> ```Toggle +> !namespoofb +> ``` + +## !notify + +This module enables notifcations, when paradox flags a player for example if a paradox opped member of staff has notifctions enabled they will be sent an alert. + +Enable notifcations for yourself. + +> ```Toggle +> !notify +> ``` + +Enable notifications for another paradox opped player. + +> ```Toggle +> !notify Pete9xi +> ``` + +To disable notifcations re run the command. + +## !op + +The op command is used to add Op to a player for Paradox AntiCheat features. + +> ```Example without a password +> !op Pete9xi +> ``` + +> ```Example with a password +> !op MyPassword123$ +> ``` + +> ```Example Opping another player. +> !op MyPassword123$ Visual1mpact +> ``` + +## !ops + +!> This module is subjected to change due to new devlopments in the scripting API. + +This module when enabled only requires one player to sleep in order for the night to be skipped. + +> ```Toggle +> !ops +> ``` + +## !overridecbe + +This command forces the commandblocksenabled gamerule to be enabled or disabled at all times. + +> ```Toggle +> !overridecbe +> ``` + +## !paradoxui + +?> This command can be used by all players. + +This command triggers the UI version of paradox to open. You must close chat afterwards as only one UI element can be open at any one time. + +> ```Command +> !paradoxui +> ``` + +## !prefix + +This command allows you to change the default prefix which is `!` You can use up to two characters. + +> ```Command +> !prefix $ +> ``` + +## !pvp + +?> This command can be used by all players. + +This command allows all players to enable or disable PVP this is per player based so for example if player a has pvp enabled but player b has pvp disable, when player a attacks player b, no damage will be delt and player a will be warned that player b has PVP disabled. + +> ```Command +> !pvp enable +> ``` + +> ```Command +> !pvp disable +> ``` + +## !rank + +This command allows you to add edit or remove a rank from a player this is full customizable you are able to use colour codes. + +This example uses the classic paradox member chat rank. + +> ```Command +> !rank Pete9xi §4[§6Member§4] +> ``` + +## !reacha + +This module checks for player's placing blocks beyond reach if detected its possible that they are using a reach hack, we only flag people for reach. As further investigation is need by staff to confirm if they player is indeed using reach hacks. + +> ```Toggle +> !reacha +> ``` + +## !reachb + +This module checks for player's attacking beyond reach, again a player will be flagged if they are attacking beyond the normal reach values if you get notified of this its up to staff to investigate what is happening and complete the appropriate action + +> ```Toggle +> !reachb +> ``` + +## !removecb + +When this module is enabled all command blocks will be cleared from the world this includes placed ones if you use command blocks in your world as part of shops or spawn protection you may want to keep this disabled. + +> ```Toggle +> !removecb +> ``` + +## !report + +This is a command to be used by normal players it allows them to report people who maybe using hacks. + +> ```Command +> !report Pete9xi possible reach hacks. +> ``` + +## !salvage + +This allows you to enable or disable the salvage system, what this does is when an block is placed paradox removes the placed block encase it contains NBT data that could be used as an exploit, what it will do is replace a vanilla copy of this block in the same place the previous one was placed. + +> ```Toggle +> !salvage +> ``` + +## !sethome + +?> This command can be used by all players. + +This command allows a player to set the current location as a new saved location. Providing they have not set more than 5 homes which is the default limit this can be changed in config.js. + +> ```Command +> !sethome TheBarn +> ``` + +File: `scripts/data/config.js` + +> ```js +> setHome: { +> ``` + + enabled: true, + max: 5, + }, + +> ``` +> +> ``` + +## !showrules + +This allows you to enable or disable the module to display server rules when a player joins the server. the rules can be edited in config.js + +> ```Toggle +> !showrules +> ``` + +File: `scripts/data/config.js` + +> ```js +> showrules: { +> ``` + + enabled: true, + rule1: "Rule1: No hacking allowed.", + rule2: "Rule2: Don't grief other players' builds.", + rule3: "Rule3: Be kind to everyone on the server.", + rule4: "Rule4: Follow the staff's instructions.", + rule5: "Rule5: No spamming or advertising.", + }, + +> ``` +> +> ``` + +## !spammera + +This module when enabled checks for messages sent while moving. + +> ```Toggle +> !spammera +> ``` + +## !spammerb + +This module when enabled checks for messages sent while swinging. + +> ```Toggle +> !spammerb +> ``` + +## !spammerc + +This module when enabled checks for messages sent while using items. + +> ```Toggle +> !spammerc +> ``` + +## !spawnprotection + +This module allows you to set a center coordinate, once set you can then specify the radius to check within, once enabled any player who is not paradox opped will be placed into adventure mode preventing them from mining and building within the spawn area. When they are out side of the radius they will be put into survival mode allowing them to mine and build. + +In this example configuration i have set a radius of 90 this means within 90 blocks around the center coordinate. + +> ```Command +> !spawnprotection 54 69 -16 90 +> ``` + +To disable it you would run the following command + +> ```Command +> !spawnprotection +> ``` + +## !stackban + +This module checks for items in the players inventory that have a stack value above the vanilla value if so they are then flagged. + +> ```Toggle +> !stackban +> ``` + +## !stats + +This command allows you to pull the stats for a player. + +> ```Command +> !stats Pete9xi +> ``` + +## !tpr + +?> This command can be used by all players. + +Paradox has a teleport request system. you can make a request but only one request to a player can be made at any one time. Request expire after 2 minutes. When sent a request the player can type approve or denie. + +> ```Command +> !tpr Pete9xi +> ``` + +## !tpa + +This command allows paradox op staff to telport to players its the same as /tp but they dont need server operator status. + +> ```Command +> !tpa Pete9xi Visual1mpact +> ``` + +## !unban + +This command allows you to unban a player when the command is executed the player is then added to a queue which means when they next go to logon to the server they will be unbanned. + +> ```Command +> !unban Pete9xi +> ``` + +## !unmute + +This command allows you to unmute a player who has been muted. + +> ```Command +> !unmute Pete9xi +> ``` + +## !vanish + +This command when ran makes you invisable to the world you are able to move around freely and spectate players, this is useful to see if a player is using hacks or could be cheating. The command is a toggle meaning that you use the same command to enable and disable. + +> ```Toggle +> !vanish +> ``` + +## !version + +This command will print the current version of paradox that is installed and running. + +> ```Command +> !version +> ``` + +## !worldborder + +This module when enable prevents player going past a set of coordinate if they attempt to they are then telported back inside the wall. + +When enabling you can set a worldborder for each dimension the the command below sets a boarder of 10k in the overworld. + +> ```Command +> !worldborder -o 10000 +> ``` + +This example enables a border of 5k in the nether. + +> ```Command +> !worldborder -n 5000 +> ``` + +This example enables a border of 100k in the end. + +> ```Command +> !worldborder -e 100000 +> ``` + +To disable the worldborder run the following command. + +> ```Command +> !worldborder disable +> ``` + +## !xraya + +This module monitors for players mining ore, it flags the player and the coordinates as to where they are mining this allows you to determine if they are using xray hacks + +> ```Toggle +> !xraya +> ``` diff --git a/docs/Commands_Features/overview.md b/docs/Commands_Features/overview.md new file mode 100644 index 0000000..a0e7dff --- /dev/null +++ b/docs/Commands_Features/overview.md @@ -0,0 +1,11 @@ +![Paradox](../Media/Paradox_Title.png) + +## Command System Via Chat + +Paradox utilizes chat commands; all commands are executed in chat. If you are unsure what a command does, you can run the command with the help parameter. For example: `!spawnprotection help`. + +## Paradox UI + +Paradox also has a GUI. This can be accessed by running `!paradoxui` and then closing chat, allowing the menu to load. You will be prompted by a response in the chat UI to close it. Once loaded, you can then browse all the modules, features, and other options available in Paradox. Some features are exclusive to the GUI, such as InventoryUI and Item Editor. + +![Paradox](../Media/gui.png) diff --git a/docs/Commands_Features/paradoxui.md b/docs/Commands_Features/paradoxui.md new file mode 100644 index 0000000..b5869a7 --- /dev/null +++ b/docs/Commands_Features/paradoxui.md @@ -0,0 +1,27 @@ +![ParadoxUI](../Media/Paradox_Title.png) + +## Overview + +ParadoxUI allows you to manage Paradox through a menu system, with some features exclusively available via the UI. All features are accessible using the GUI system. We are actively working on the GUI, so it may change in future updates. + +To get started, simply type `!paradoxui` in chat and then close the window. You will be presented with the main menu, where all options are explained. + +![ParadoxUI](../Media/gui.png) + +## InventoryUI + +Paradox offers an inventory system where you can manage and edit a player's inventory. + +?> Note: We don't use a chest GUI due to performance reasons. + +Once you've selected a player, you'll see their inventory. If the selected slot contains an item, you have the option to edit it using the Item Editor. + +## Item Editor + +Paradox provides an item editor that allows you to edit various aspects of an item, such as enchantments, lores, name, item replacement, and duplicating the item. + +You can also view the stats for an item, which includes enchantments, lores, name, and current durability. + +> In this video, we will cover applying enchantments to an item, replacing the item, and removing the item from the player's inventory. When renaming and editing lores, you can use color modifiers. + +[Watch Video](../Media/ItemEditor.mp4 ":include :type=video controls width=100%") diff --git a/docs/Configuration/why.md b/docs/Configuration/why.md new file mode 100644 index 0000000..4d632cd --- /dev/null +++ b/docs/Configuration/why.md @@ -0,0 +1,9 @@ +## Introduction + +Paradox boasts a plethora of advanced features. However, due to the limitations imposed by Mojang, we are unable to write to the servers'/realms' storage. Consequently, certain settings within Paradox must be configured by editing a configuration file known as `config.js`. + +To mitigate this issue, the Scripting API introduced a feature called dynamic properties. Paradox extensively employs this feature throughout its codebase. However, until the last release, the size of dynamic properties was highly restricted, rendering it insufficient for migrating advanced settings. + +?> What does this mean? + +Presently, Paradox still relies on `config.js`. However, we are actively working towards moving away from this dependency. We acknowledge that this can pose challenges for some of our user base. We are continuously exploring ways to enhance this experience and encourage you to reach out to us for assistance when needed. \ No newline at end of file diff --git a/docs/Contributing/gettinginvolved.md b/docs/Contributing/gettinginvolved.md new file mode 100644 index 0000000..437a431 --- /dev/null +++ b/docs/Contributing/gettinginvolved.md @@ -0,0 +1,129 @@ +![Paradox](../Media/Paradox_Title.png) + +## How + +Paradox is an open-source project maintained and developed by multiple members over the years. We welcome anyone wishing to be part of the project. Once you've set up your development environment, feel free to send a PR request or have a chat with either Pete9xi or Visual1mpact via the Discord support server. + +## TypeScript + +Paradox is written in TypeScript, which is an extension of JavaScript that allows for stricter and more structured coding. JavaScript, on the other hand, is more flexible and forgiving. TypeScript is designed to help developers write more reliable and maintainable code, but it requires stricter adherence to coding standards. JavaScript is often used for rapid prototyping and quick development, while TypeScript is better suited for larger, more complex projects where the benefits of type checking and strict coding outweigh the added complexity. + +JavaScript is a dynamic, interpreted language used to create interactive elements. TypeScript, a superset of JavaScript, adds features like static typing, which can help catch errors before the code is run. This is extremely useful in a Minecraft environment, as it saves a developer a lot of time having to load a world to debug blocks of code that TypeScript can catch right away before even getting that far. + +## Development Environment Setup + +The following guide will help you set up a local development environment. Once completed, you will be able to edit Paradox, make changes, and submit pull requests. + +## Installing Visual Studio Code (VSC) + +
    +
  1. Install Visual Studio Code (VSC) from the official website: https://code.visualstudio.com/
  2. +
  3. Install the latest Node.js version from the official website: https://nodejs.org/
  4. +
+ +## Forking the Repository + +
    +
  1. Fork the project repository by clicking on the "Fork" button in the top-right corner of the repository page: https://github.com/Pete9xi/Paradox_AntiCheat
  2. +
  3. Clone the forked repository to your local machine using the built-in terminal of Visual Studio Code:
  4. +
+ +```bash +git clone https://github.com//Paradox_AntiCheat.git +``` + +
    +
  1. Navigate to the cloned project directory using the built-in terminal of Visual Studio Code:
  2. +
+ +```bash +cd Paradox_AntiCheat +``` + +
    +
  1. Install project dependencies using the built-in terminal of Visual Studio Code:
  2. +
+ +```bash +npm i +``` + +## Building for Development + + + +```bash +npm run build +``` + + + +```bash +npm run build_win +``` + +## Making and Committing Changes + +
    +
  1. Make changes to the project files using Visual Studio Code.
  2. +
  3. Save the files.
  4. +
+ +## Committing Changes to Git + +
    +
  1. Stage the changes to include all modifications in the built-in terminal of Visual Studio Code:
  2. +
+ +```bash +git add . +``` + +

(Alternatively, use git add to stage specific files.)

+ +
    +
  1. Commit the changes with a meaningful commit message in the built-in terminal of Visual Studio Code:
  2. +
+ +```bash +git commit -m "Your commit message here" +``` + +## Pushing Commits Upstream + +
    +
  1. Before pushing, pull any changes from the original repository to avoid conflicts in the built-in terminal of Visual Studio Code:
  2. +
+ +```bash +git pull origin main +``` + +

(This ensures your fork is up to date with the original repository.)

+ +
    +
  1. Push the committed changes to your forked repository on GitHub in the built-in terminal of Visual Studio Code:
  2. +
+ +```bash +git push origin main +``` + +## Creating a Pull Request + +
    +
  1. Go to your forked repository on GitHub: https://github.com//Paradox_AntiCheat
  2. +
  3. Click on the "Compare & pull request" button.
  4. +
  5. Review the changes in the pull request and provide a meaningful description of your changes.
  6. +
  7. Click on the "Create pull request" button to submit the pull request to the original repository.
  8. +
+ +

Congratulations! You have successfully set up the development environment, cloned the project, built it for development, made changes, committed those changes, pushed them upstream, and created a pull request to contribute your changes back to the original repository.

+ +?> Please note that the project maintainers will review your pull request, and if they find it suitable, they will merge it into the main project. Keep an eye on your pull request for any feedback or updates from the maintainers. + +

Happy contributing to the Paradox AntiCheat project! If you have any further questions or need additional assistance, feel free to ask.

\ No newline at end of file diff --git a/docs/Media/BetaAPI_Setting.png b/docs/Media/BetaAPI_Setting.png new file mode 100644 index 0000000..961dc32 Binary files /dev/null and b/docs/Media/BetaAPI_Setting.png differ diff --git a/docs/Media/Discord-logo.png b/docs/Media/Discord-logo.png new file mode 100644 index 0000000..3f302aa Binary files /dev/null and b/docs/Media/Discord-logo.png differ diff --git a/docs/Media/EDU_Setting.png b/docs/Media/EDU_Setting.png new file mode 100644 index 0000000..97e0ee3 Binary files /dev/null and b/docs/Media/EDU_Setting.png differ diff --git a/docs/Media/ItemEditor.mp4 b/docs/Media/ItemEditor.mp4 new file mode 100644 index 0000000..79d62cf Binary files /dev/null and b/docs/Media/ItemEditor.mp4 differ diff --git a/docs/Media/OPpassword.mp4 b/docs/Media/OPpassword.mp4 new file mode 100644 index 0000000..92bd745 Binary files /dev/null and b/docs/Media/OPpassword.mp4 differ diff --git a/docs/Media/Paradox.gif b/docs/Media/Paradox.gif new file mode 100644 index 0000000..a4f613f Binary files /dev/null and b/docs/Media/Paradox.gif differ diff --git a/docs/Media/ParadoxConfig.mp4 b/docs/Media/ParadoxConfig.mp4 new file mode 100644 index 0000000..944ab5c Binary files /dev/null and b/docs/Media/ParadoxConfig.mp4 differ diff --git a/docs/Media/Paradox_Title.png b/docs/Media/Paradox_Title.png new file mode 100644 index 0000000..0724d7f Binary files /dev/null and b/docs/Media/Paradox_Title.png differ diff --git a/docs/Media/gui.png b/docs/Media/gui.png new file mode 100644 index 0000000..9cfd452 Binary files /dev/null and b/docs/Media/gui.png differ diff --git a/docs/Media/pack_icon.png b/docs/Media/pack_icon.png new file mode 100644 index 0000000..def3a5a Binary files /dev/null and b/docs/Media/pack_icon.png differ diff --git a/docs/Media/paradox_wiki.png b/docs/Media/paradox_wiki.png new file mode 100644 index 0000000..7a08595 Binary files /dev/null and b/docs/Media/paradox_wiki.png differ diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..cb08062 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,208 @@ +
+ Paradox AntiCheat Logo +

+
+ Updated for 1.20.40 +
+ Paradox AntiCheat is a fork of Scythe AntiCheat, which was released under the GPLv3 License. Paradox was created to fix some differences within Scythe and to provide a more reliable and effective anti-cheat solution for Minecraft Bedrock. All original commit history pertaining to Scythe still exists within this project and is free to review. +
+
+
+
+

About Paradox AntiCheat

+

Paradox AntiCheat is a powerful tool designed to combat cheating in Minecraft Bedrock worlds. The name "Paradox" was chosen because the concept of paradox perfectly represents the essence of what we do.

+

Paradox AntiCheat is a statement that contradicts itself. It is a tool that fights cheating by using advanced algorithms and techniques that are themselves paradoxical in nature.

+
+

Paradox: A statement or situation that contradicts itself, opposed to common sense and yet perhaps true.

+
+

Paradox AntiCheat offers a comprehensive solution for detecting and preventing cheating in Minecraft Bedrock. It uses detection methods to ensure that cheaters are caught and punished. In addition, Paradox AntiCheat is highly customizable, allowing game developers to tailor the tool to their specific needs and requirements.

+

If you're looking for a reliable and effective anti-cheat solution for your Minecraft Bedrock experience, look no further than Paradox AntiCheat. For more information, check out the wiki.

+
+
+
+

Get Support

+

Join the Paradox AntiCheat community on Discord for support. Our community is active and dedicated to providing help and assistance to game developers who use Paradox AntiCheat in their projects. We also welcome feedback and suggestions on how we can improve the tool.

+
+ +
+

Project Status

+ Grade + Downloads + Latest Downloads + Commits Per Month + Last Commit + License +
+ +

+

Applying the Paradox AntiCheat Pack

+

When applying the pack to your world make sure the addon is at the top of the behavior pack list and Beta APIs is enabled. This is to ensure all checks and systems work properly. The versioning system for Paradox goes as follows:

+ + +

+

Installing the Paradox AntiCheat Pack

+

To install this anticheat to your realm/world you need to:

+
    +
  1. Install the .mcpack
  2. +
  3. Apply it to your world
  4. +
  5. Enable Beta APIs
  6. +
+

Once you have done this the anticheat should be fully up and running. Education Edition is required for the command !fly <username> to work.

+ +

Gaining Permission to Use Paradox

+

Follow these steps to grant yourself permission to use Paradox in your world:

+
    +
  1. If you're a Realm owner or prefer using a password: +
      +
    1. Edit the config.js file located at /scripts/data/config.js.
    2. +
    3. Scroll down to the encryption section.
    4. +
    5. Inside encryption, find password.
    6. +
    7. Enter your chosen password: +
      encryption: {
      +    password: "mypassword",
      +}
      +
    8. +
    +
      +
    1. Keep your password safe and confidential.
    2. +
    +
  2. +
  3. For all users not using a password: +
      +
    1. Install the Anti Cheat and load your Minecraft world.
    2. +
    3. In the game's chat, enter <prefix>op. Replace <prefix> with your server's command prefix, e.g., !.
    4. +
    5. If you have necessary permissions, this grants you Paradox AntiCheat access.
    6. +
    7. Once granted, you'll have Paradox AntiCheat features.
    8. +
    9. To give Paradox-Op permissions to others, use <prefix>op <player>.
    10. +
    11. Learn more by entering <prefix>op help.
    12. +
    13. For Bedrock Dedicated Server (BDS), add the following to the server.properties file: +
      op-permission-level=2
      +#min=2
      +#max=4
      +
    14. + +
    +

    Note: If you're using a password (Realm owners), use <prefix>op <password> for permission.

    +

    Remember, keep your password secure and share it cautiously.

    + +

    Important Notes

    +
      +
    • Paradox will kick you out if you have any illegal items in your inventory so if you think Paradox may flag you after installing then it is highly suggested to drop your entire inventory prior to activating this Anti Cheat!!!
    • +
    + + +

    Paradox Contributing Logo

    +

    Development Environment Setup:

    + +
      +
    1. Install Visual Studio Code (VSC) from the official website: https://code.visualstudio.com/
    2. +
    3. Install the latest Node.js version from the official website: https://nodejs.org/
    4. +
    + + +

    Contributing to the Project:

    + +
      +
    1. Fork the project repository by clicking on the "Fork" button in the top-right corner of the repository page: https://github.com/Pete9xi/Paradox_AntiCheat
    2. +
    3. Clone the forked repository to your local machine using the built-in terminal of Visual Studio Code:
    4. +
    + +
    git clone https://github.com/<your-github-username>/Paradox_AntiCheat.git
    +
    + +
      +
    1. Navigate to the cloned project directory using the built-in terminal of Visual Studio Code:
    2. +
    + +
    cd Paradox_AntiCheat
    +
    + +
      +
    1. Install project dependencies using the built-in terminal of Visual Studio Code:
    2. +
    + +
    npm i
    +
    + + +

    Building for Development:

    + +
      +
    • To build the project for development on Linux, run the following command in the built-in terminal of Visual Studio Code:
    • +
    + +
    npm run build
    +
    + +
      +
    • To build the project for development on Windows, use the following command in the built-in terminal of Visual Studio Code:
    • +
    + +
    npm run build_win
    +
    + + +

    Making and Committing Changes:

    + +
      +
    1. Make changes to the project files using Visual Studio Code.
    2. +
    3. Save the files.
    4. +
    + + +

    Committing Changes to Git:

    + +
      +
    1. Stage the changes to include all modifications in the built-in terminal of Visual Studio Code:
    2. +
    + +
    git add .
    +
    + +

    (Alternatively, use git add <filename> to stage specific files.)

    + +
      +
    1. Commit the changes with a meaningful commit message in the built-in terminal of Visual Studio Code:
    2. +
    + +
    git commit -m "Your commit message here"
    +
    + + +

    Pushing Commits Upstream:

    + +
      +
    1. Before pushing, pull any changes from the original repository to avoid conflicts in the built-in terminal of Visual Studio Code:
    2. +
    + +
    git pull origin main
    +
    + +

    (This ensures your fork is up to date with the original repository.)

    + +
      +
    1. Push the committed changes to your forked repository on GitHub in the built-in terminal of Visual Studio Code:
    2. +
    + +
    git push origin main
    +
    + + +

    Creating a Pull Request:

    + +
      +
    1. Go to your forked repository on GitHub: https://github.com/<your-github-username>/Paradox_AntiCheat
    2. +
    3. Click on the "Compare & pull request" button.
    4. +
    5. Review the changes in the pull request and provide a meaningful description of your changes.
    6. +
    7. Click on the "Create pull request" button to submit the pull request to the original repository.
    8. +
    + +

    Congratulations! You have successfully set up the development environment, cloned the project, built it for development, made changes, committed those changes, pushed them upstream, and created a pull request to contribute your changes back to the original repository.

    + +

    Please note that the project maintainers will review your pull request, and if they find it suitable, they will merge it into the main project. Keep an eye on your pull request for any feedback or updates from the maintainers.

    + +

    Happy contributing to the Paradox AntiCheat project! If you have any further questions or need additional assistance, feel free to ask.

    diff --git a/docs/Support/support.md b/docs/Support/support.md new file mode 100644 index 0000000..db783f0 --- /dev/null +++ b/docs/Support/support.md @@ -0,0 +1,41 @@ +![Paradox](../Media/Paradox_Title.png) + +
    +
    +

    Get Support

    +

    Join the Paradox AntiCheat community on Discord for support. Our community is active and dedicated to providing help and assistance to game developers who use Paradox AntiCheat in their projects. We also welcome feedback and suggestions on how we can improve the tool.

    +
    +
    + + +
    +
    + + diff --git a/docs/VideoGuides/tutorials.md b/docs/VideoGuides/tutorials.md new file mode 100644 index 0000000..fa803ba --- /dev/null +++ b/docs/VideoGuides/tutorials.md @@ -0,0 +1,14 @@ +![Paradox](../Media/Paradox_Title.png) + +## Configuring Paradox OP Password + +> In this video, we will download the latest release from GitHub, extract the files, set a password in `config.js`, and then re-zip them. Once zipped, we will convert it to an mcpack ready to be imported. This will also demonstrate setting up a new world and applying the pack. + +[Watch the video on configuring the OP password](../Media/OPpassword.mp4 ":include :type=video controls width=100%") + +## Automating OP Password Configuration + +> If you are using a PC, Pete9xi has written an application that will do all this for you with a single click of a button. Once the pack has been created, you can double click it, and it will import. +> Download ParadoxConfig + +[Watch the video on automating OP password configuration](../Media/ParadoxConfig.mp4 ":include :type=video controls width=100%") diff --git a/docs/_sidebar.md b/docs/_sidebar.md new file mode 100644 index 0000000..f5e0a5f --- /dev/null +++ b/docs/_sidebar.md @@ -0,0 +1,25 @@ +- Introduction + +- Getting Started + + - [Overview](gettingstarted.md "Overview") + +- Commands & Features + + - [Overview](Commands_Features/overview.md "Overview") + - [Chat Commands](Commands_Features/chatcommands.md "Chat Commands") + - [ParadoxUI Features](Commands_Features/paradoxui.md "ParadoxUI") + +- Config.js + + - [Why](Configuration/why.md "Why") + +- Guides + + - [Video Guides](VideoGuides/tutorials.md "Video Tutorials") + +- Contributing + + - [Getting involved](Contributing/gettinginvolved.md "Getting involved") + +[Join our Discord server](Support/support.md "Support") diff --git a/docs/cover.md b/docs/cover.md new file mode 100644 index 0000000..0f93aac --- /dev/null +++ b/docs/cover.md @@ -0,0 +1,5 @@ +Lets Go +Lets Go + +[GitHub](https://github.com/Pete9xi/Paradox_AntiCheat/) +[Documentation](documentation.md) diff --git a/docs/documentation.md b/docs/documentation.md new file mode 100644 index 0000000..f374d41 --- /dev/null +++ b/docs/documentation.md @@ -0,0 +1,35 @@ +
    + Paradox AntiCheat Logo +

    + Updated for 1.20.30 +

    + Paradox AntiCheat is a fork of Scythe AntiCheat, released under the GPLv3 License. Paradox was created to address differences within Scythe and provide a more reliable and effective anti-cheat solution for Minecraft Bedrock. The original commit history related to Scythe is retained and free to review. +
    +
    +
    +

    About Paradox AntiCheat

    +

    Paradox AntiCheat is a robust tool designed to combat cheating in Minecraft Bedrock worlds. The name "Paradox" was chosen because it perfectly represents the essence of what we do.

    +

    Paradox AntiCheat is a statement that contradicts itself. It is a tool that fights cheating using advanced algorithms and techniques that are paradoxical in nature.

    +
    +

    Paradox: A statement or situation that contradicts itself, opposed to common sense and yet perhaps true.

    +
    +

    Paradox AntiCheat offers a comprehensive solution for detecting and preventing cheating in Minecraft Bedrock. It utilizes various detection methods to ensure that cheaters are caught and appropriately dealt with. Additionally, Paradox AntiCheat is highly customizable, allowing game developers to tailor the tool to their specific needs and requirements.

    +

    If you're seeking a reliable and effective anti-cheat solution for your Minecraft Bedrock experience, look no further than Paradox AntiCheat. For more information, please refer to Getting Started.

    +
    + +?> On the **left** side, you have a **sidebar** with every currently available item in the documentation.
    <=========================== + +!> This documentation could change with any version. So be sure to check it once in a while. + +--- + +

    If you think a page is missing

    + +> Create an issue and request its addition +> [GitHub/ParadoxAntiCheat - Issues](https://github.com/Pete9xi/Paradox_AntiCheat/) + +OR + +> If you've already created it yourself, +> Submit it as a pull request, so your work can be added to this documentation. +> [GitHub/ParadoxAntiCheat - Pull Request](https://github.com/Pete9xi/Paradox_AntiCheat/) diff --git a/docs/gettingstarted.md b/docs/gettingstarted.md new file mode 100644 index 0000000..4c21dce --- /dev/null +++ b/docs/gettingstarted.md @@ -0,0 +1,82 @@ +![Lets Go](Media/Paradox_Title.png) + +!> Before you import the pack, please read below regarding realms. Failing to do so will lead to issues. + +## Realms + +> - Realms have an issue with the new authentication system which Paradox uses to grant you Paradox-opped access. In this instance, we recommend you use a password, which can be set in config.js. You can then use the following command: `!op mypassword` to grant yourself Paradox-opped rights. + +## Required Experimental Flags + +Paradox uses the following experimental flags. You need to make sure these are enabled in your world. + +- Scripting API +- Molang +- EDU + +![ScriptingAPI](Media/BetaAPI_Setting.png) +![EDU](Media/EDU_Setting.png) + +!> The EDU flag is needed for the `!fly` command to work. + +## Op Password Configuration + +!> It's highly recommended that Realms users make use of the password for granting Paradox op due to bugs within the `isOP()`. + +File: `scripts/data/config.js` + +Before you import Paradox, you can set a password as seen below. This is recommended for Realm users. If you forget to do this before importing the pack, you will have issues with the realm detecting a change. The steps to get around this are documented elsewhere. + +To configure the password, open up config.js and you will see the following code block. + +> ```js +> /** +> * Set your password here. +> * +> * This is required for Realm users to gain Paradox-Op. +> * +> * Anyone else is welcome to use this if they like but +> * is not obligated. +> */ +> encryption: { +> password: "", +> }, +> ``` + +In this example, I am going to set a password of MyPassword123$. + +> ```js +> /** +> * Set your password here. +> * +> * This is required for Realm users to gain Paradox-Op. +> * +> * Anyone else is welcome to use this if they like but +> * is not obligated. +> */ +> encryption: { +> password: "MyPassword123$", +> }, +> ``` + +The next step is to save the file, then re-zip the archive, and rename it with the file extension .mcpack. This can then be imported into Minecraft and applied to the realm. + +> Now when I come to running the command on my realm, I will need to execute this command in chat: `!op MyPassword123$`. + +## Op Bedrock Dedicated Servers + +?> BDS refers to Bedrock Dedicated Servers + +BDS users can take full advantage of simply executing `!op` in chat, but the following settings need to be added to the `server.properties` file. + +File: `server.properties` + +> ```server.properties +> op-permission-level=2 +> ``` + +You should now be able to execute the command and grant yourself Paradox Op. To grant permissions to another player, simply run `!op PlayerName`. + +## Ending Notes + +You should now have Paradox up and running. The next steps would be to check out all the commands as well as look over the Graphical User Interface for Paradox. To see all commands in chat, run the `!help` command. To access the GUI, run `!paradoxui` and close chat. diff --git a/docs/index.html b/docs/index.html index 963cfee..15c877d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,15 +1,97 @@ - - - - テスト用web - - - -

    このくそサイトへようこそ!!

    -

    ばいばい!

    - - + + + + + Paradox AntiCheat - Minecraft Bedrock + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + diff --git a/manifest.json b/manifest.json index 4037c6c..8098b5c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,23 +1,23 @@ { "format_version": 2, "header": { - "name": "Paradox AntiCheat3.4.6日本語!!", - "description": "Bedrock Edition で悪意のあるハッカーと戦うためのアンチチート日本語版 ~ v3.4.6", - "uuid": "46bbb93f-f68e-4c4c-823b-526a768f95bf", + "name": "Paradox AntiCheat", + "description": "A utility to fight against malicious hackers on Bedrock Edition ~ v3.4.6", + "uuid": "54edfea5-ab51-47ca-b992-724e255b5560", "version": [ 3, 4, - 5 + 6 ], "min_engine_version": [ 1, 20, - 50 + 60 ] }, "metadata": { "authors": [ - "Visual1mpact, Pete9xi, koukun_" + "Visual1mpact, Pete9xi" ], "license": "GPLv3", "url": "https://github.com/Pete9xi/Paradox_AntiCheat" @@ -25,7 +25,7 @@ "modules": [ { "type": "data", - "uuid": "de17215f-5a9a-4c18-bfb3-5f594a851f9f", + "uuid": "d8395127-6923-4fb7-93d2-977cecd463e0", "version": [ 1, 0, @@ -36,7 +36,7 @@ "description": "Paradox AntiCheat Gametest Features", "language": "javascript", "type": "script", - "uuid": "ff22c5e4-908c-48e5-bf88-5ab73c86fbab", + "uuid": "1326c87b-37f3-4543-9f0f-0d03893134e1", "version": [ 0, 0, @@ -48,7 +48,7 @@ "dependencies": [ { "module_name": "@minecraft/server", - "version": "1.8.0-beta" + "version": "1.9.0-beta" }, { "module_name": "@minecraft/server-ui", diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 4218a50..05a199e 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { "name": "paradox-anticheat", - "version": "3.4.5", + "version": "3.4.6", "lockfileVersion": 3, "requires": true, "packages": { @@ -38,9 +38,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -118,9 +118,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", - "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -227,20 +227,28 @@ "integrity": "sha512-stbUtINCXbcLNRlGNVX68xRC6ZYq3k3CYmfptwrCcPBEUjVOpVkSj3H4Y0qiSYB+1rVWv7DgiP7Uf9++50Ne5g==" }, "node_modules/@minecraft/server": { - "version": "1.8.0-beta.1.20.50-stable", - "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.8.0-beta.1.20.50-stable.tgz", - "integrity": "sha512-2QT+JWbwHWepaX2Md8g7s9HsNXqoSS2ztdTpI6ICNl1Uyodeg4P1D3oZnNVy7sVS5FTnh86P8YVTsL2oYla/SA==", + "version": "1.9.0-beta.1.20.60-stable", + "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.9.0-beta.1.20.60-stable.tgz", + "integrity": "sha512-HmqmaQzX/SE2Q4yVezlLn/wc/cthts+4CEenFq5+YUFpXJ0fYV+LJ3GBvskWcRymNimoroP9D3R8WQXdpTnaKw==", "dependencies": { "@minecraft/common": "^1.1.0" } }, "node_modules/@minecraft/server-ui": { - "version": "1.2.0-beta.1.20.50-stable", - "resolved": "https://registry.npmjs.org/@minecraft/server-ui/-/server-ui-1.2.0-beta.1.20.50-stable.tgz", - "integrity": "sha512-NAE2h2nD6ZUN0CI0Qqe66qpFrQzHOrDUIoWLMWOzxknjbz61TFRyhY82ih4Yo2kTgYjdLFlTMkfKwCYtTAtUkQ==", + "version": "1.2.0-beta.1.20.60-stable", + "resolved": "https://registry.npmjs.org/@minecraft/server-ui/-/server-ui-1.2.0-beta.1.20.60-stable.tgz", + "integrity": "sha512-gSn4ZtyY/DsZ2LBXMX/nRQAFcj38Pb+lEUwqWKt+YCuD6SnmUT9VnZoJmaeHZD0SlvroICXi5HFfgDd7LaH6eQ==", "dependencies": { "@minecraft/common": "^1.0.0", - "@minecraft/server": "^1.8.0-beta.1.20.50-stable" + "@minecraft/server": "^1.8.0" + } + }, + "node_modules/@minecraft/server-ui/node_modules/@minecraft/server": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.8.0.tgz", + "integrity": "sha512-YqH8eowsC2eAaJ/EXgUC+zfyo+iWa0jTCuLC/2zEpObg6nCJRjy0NIhIZqzxspbUOgf+qakNjNZIhLMwL+a6Fg==", + "dependencies": { + "@minecraft/common": "^1.1.0" } }, "node_modules/@nodelib/fs.scandir": { @@ -288,19 +296,11 @@ "node": ">=14" } }, - "node_modules/@pkgr/utils": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", - "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "fast-glob": "^3.3.0", - "is-glob": "^4.0.3", - "open": "^9.1.0", - "picocolors": "^1.0.0", - "tslib": "^2.6.0" - }, "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, @@ -308,51 +308,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@pkgr/utils/node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@pkgr/utils/node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@pkgr/utils/node_modules/open": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", - "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", - "dev": true, - "dependencies": { - "default-browser": "^4.0.0", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -375,9 +330,9 @@ } }, "node_modules/@types/fs-extra": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.3.tgz", - "integrity": "sha512-sF59BlXtUdzEAL1u0MSvuzWd7PdZvZEtnaVkzX5mjpdWTJ8brG0jUqve3jPCzSzvAKKMHTG8F8o/WMQLtleZdQ==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "dev": true, "dependencies": { "@types/jsonfile": "*", @@ -416,31 +371,31 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.8.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.8.tgz", - "integrity": "sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ==", + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", "dev": true, "dependencies": { - "undici-types": "~5.25.1" + "undici-types": "~5.26.4" } }, "node_modules/@types/semver": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", - "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz", - "integrity": "sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/type-utils": "6.11.0", - "@typescript-eslint/utils": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -522,15 +477,15 @@ "dev": true }, "node_modules/@typescript-eslint/parser": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.11.0.tgz", - "integrity": "sha512-+whEdjk+d5do5nxfxx73oanLL9ghKO3EwM9kBCkUtWMRwWuPaFv9ScuqlYfQ6pAD6ZiJhky7TZ2ZYhrMsfMxVQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/typescript-estree": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4" }, "engines": { @@ -573,13 +528,13 @@ "dev": true }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", - "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -590,13 +545,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.11.0.tgz", - "integrity": "sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.11.0", - "@typescript-eslint/utils": "6.11.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -640,9 +595,9 @@ "dev": true }, "node_modules/@typescript-eslint/types": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", - "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -653,16 +608,17 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", - "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -715,9 +671,9 @@ "dev": true }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -736,17 +692,17 @@ "dev": true }, "node_modules/@typescript-eslint/utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", - "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/typescript-estree": "6.11.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", "semver": "^7.5.4" }, "engines": { @@ -773,9 +729,9 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -794,12 +750,12 @@ "dev": true }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", - "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/types": "6.21.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -823,9 +779,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -985,15 +941,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/big-integer": { - "version": "1.6.51", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", - "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1115,18 +1062,6 @@ "node": ">=8" } }, - "node_modules/bplist-parser": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", - "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", - "dev": true, - "dependencies": { - "big-integer": "^1.6.44" - }, - "engines": { - "node": ">= 5.10.0" - } - }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -1148,21 +1083,6 @@ "node": ">=8" } }, - "node_modules/bundle-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", - "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", - "dev": true, - "dependencies": { - "run-applescript": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -1604,58 +1524,12 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/default-browser": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", - "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", - "dev": true, - "dependencies": { - "bundle-name": "^3.0.0", - "default-browser-id": "^3.0.0", - "execa": "^7.1.1", - "titleize": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser-id": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", - "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", - "dev": true, - "dependencies": { - "bplist-parser": "^0.2.0", - "untildify": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", "dev": true }, - "node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -1936,15 +1810,15 @@ } }, "node_modules/eslint": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", - "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.54.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1991,9 +1865,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -2003,23 +1877,24 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", - "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", + "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.5" + "synckit": "^0.8.6" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/prettier" + "url": "https://opencollective.com/eslint-plugin-prettier" }, "peerDependencies": { "@types/eslint": ">=8.0.0", "eslint": ">=8.0.0", + "eslint-config-prettier": "*", "prettier": ">=3.0.0" }, "peerDependenciesMeta": { @@ -2330,47 +2205,6 @@ "node": ">= 0.6" } }, - "node_modules/execa": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", - "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^3.0.7", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2548,9 +2382,9 @@ } }, "node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -2650,9 +2484,9 @@ } }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2791,20 +2625,6 @@ "node": ">= 0.8" } }, - "node_modules/https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz", - "integrity": "sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==" - }, - "node_modules/human-signals": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", - "dev": true, - "engines": { - "node": ">=14.18.0" - } - }, "node_modules/ignore": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", @@ -2894,21 +2714,6 @@ "is-ci": "bin.js" } }, - "node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2939,24 +2744,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dev": true, - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-installed-globally": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", @@ -3009,18 +2796,6 @@ "node": ">=8" } }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -3235,12 +3010,6 @@ "integrity": "sha512-CjFVuFq/IfrdqesAXfg+hzlDKu6A2n80ZIq0Kl9kWjoHh9j1N9Uvk5X0/MmN0hOfm5F9YBswlClhcwnmtwz7gA==", "dev": true }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3275,18 +3044,6 @@ "node": ">=4" } }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", @@ -3394,33 +3151,6 @@ "node": ">=8" } }, - "node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -3442,21 +3172,6 @@ "wrappy": "1" } }, - "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/open": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", @@ -3501,11 +3216,6 @@ "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", "dev": true }, - "node_modules/os": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz", - "integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ==" - }, "node_modules/p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", @@ -3632,15 +3342,6 @@ "node": ">= 0.8" } }, - "node_modules/path": { - "version": "0.12.7", - "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", - "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", - "dependencies": { - "process": "^0.11.1", - "util": "^0.10.3" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3693,12 +3394,6 @@ "node": ">=8" } }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -3730,9 +3425,9 @@ } }, "node_modules/prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", - "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -3765,14 +3460,6 @@ "node": ">=6" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3860,11 +3547,6 @@ "node": ">=8.10.0" } }, - "node_modules/readline": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", - "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==" - }, "node_modules/registry-auth-token": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz", @@ -3995,128 +3677,6 @@ "node": "*" } }, - "node_modules/run-applescript": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", - "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", - "dev": true, - "dependencies": { - "execa": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "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" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/run-applescript/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/run-applescript/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/run-applescript/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/run-applescript/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/run-applescript/node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4365,18 +3925,6 @@ "node": ">=8" } }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -4411,13 +3959,13 @@ } }, "node_modules/synckit": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", - "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", + "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", "dev": true, "dependencies": { - "@pkgr/utils": "^2.3.1", - "tslib": "^2.5.0" + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -4453,18 +4001,6 @@ "node": ">=4" } }, - "node_modules/titleize": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", - "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -4556,9 +4092,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -4569,9 +4105,9 @@ } }, "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, "node_modules/unique-string": { @@ -4604,15 +4140,6 @@ "node": ">= 0.8" } }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/update-notifier": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", @@ -4710,19 +4237,6 @@ "node": ">=4" } }, - "node_modules/util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dependencies": { - "inherits": "2.0.3" - } - }, - "node_modules/util/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" - }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", diff --git a/node_modules/@minecraft/server-ui/package.json b/node_modules/@minecraft/server-ui/package.json index cd9a7de..5ec3a2a 100644 --- a/node_modules/@minecraft/server-ui/package.json +++ b/node_modules/@minecraft/server-ui/package.json @@ -1,6 +1,6 @@ { "name": "@minecraft/server-ui", - "version": "1.2.0-beta.1.20.50-stable", + "version": "1.2.0-beta.1.20.60-stable", "description": "", "contributors": [ { @@ -14,7 +14,7 @@ ], "dependencies": { "@minecraft/common": "^1.0.0", - "@minecraft/server": "^1.8.0-beta.1.20.50-stable" + "@minecraft/server": "^1.8.0" }, "license": "MIT" } \ No newline at end of file diff --git a/node_modules/@minecraft/server/index.d.ts b/node_modules/@minecraft/server/index.d.ts index 82758de..d5f7cfb 100644 --- a/node_modules/@minecraft/server/index.d.ts +++ b/node_modules/@minecraft/server/index.d.ts @@ -15,7 +15,7 @@ * ```json * { * "module_name": "@minecraft/server", - * "version": "1.7.0" + * "version": "1.8.0" * } * ``` * @@ -35,6 +35,41 @@ export enum BlockComponentTypes { WaterContainer = 'minecraft:waterContainer', } +/** + * @beta + * An enumeration describing the state of a block piston. + */ +export enum BlockPistonState { + /** + * @beta + * @remarks + * Whether the piston is fully expanded. + * + */ + Expanded = 'Expanded', + /** + * @beta + * @remarks + * Whether the piston is in the process of expanding. + * + */ + Expanding = 'Expanding', + /** + * @beta + * @remarks + * Whether the piston is fully retracted. + * + */ + Retracted = 'Retracted', + /** + * @beta + * @remarks + * Whether the piston is in the process of retracting. + * + */ + Retracting = 'Retracting', +} + /** * @beta * Description of the resulting intersection test on two @@ -429,6 +464,7 @@ export enum EntityComponentTypes { NavigationWalk = 'minecraft:navigation.walk', Npc = 'minecraft:npc', OnFire = 'minecraft:onfire', + Projectile = 'minecraft:projectile', PushThrough = 'minecraft:push_through', Rideable = 'minecraft:rideable', Riding = 'minecraft:riding', @@ -766,34 +802,29 @@ export enum EquipmentSlot { } /** - * @beta * Represents the type of fluid for use within a fluid * containing block, like a cauldron. */ export enum FluidType { /** - * @beta * @remarks * Represents lava as a type of fluid. * */ Lava = 'Lava', /** - * @beta * @remarks * Represents a potion as a type of fluid. * */ Potion = 'Potion', /** - * @beta * @remarks * Represents powder snow as a type of fluid. * */ PowderSnow = 'PowderSnow', /** - * @beta * @remarks * Represents water as a type of fluida. * @@ -850,11 +881,37 @@ export enum GameMode { /** * @beta + * The types of item components that are accessible via + * function ItemStack.getComponent. */ export enum ItemComponentTypes { + /** + * @beta + * @remarks + * The minecraft:cooldown component. + * + */ Cooldown = 'minecraft:cooldown', + /** + * @beta + * @remarks + * The minecraft:durability component. + * + */ Durability = 'minecraft:durability', - Enchants = 'minecraft:enchantments', + /** + * @beta + * @remarks + * The minecraft:enchantable component. + * + */ + Enchantable = 'minecraft:enchantable', + /** + * @beta + * @remarks + * The minecraft:food component. + * + */ Food = 'minecraft:food', } @@ -1256,6 +1313,7 @@ export type EntityComponentTypeMap = { 'minecraft:navigation.walk': EntityNavigationWalkComponent; 'minecraft:npc': EntityNpcComponent; 'minecraft:onfire': EntityOnFireComponent; + 'minecraft:projectile': EntityProjectileComponent; 'minecraft:push_through': EntityPushThroughComponent; 'minecraft:rideable': EntityRideableComponent; 'minecraft:riding': EntityRidingComponent; @@ -1285,6 +1343,7 @@ export type EntityComponentTypeMap = { 'navigation.walk': EntityNavigationWalkComponent; npc: EntityNpcComponent; onfire: EntityOnFireComponent; + projectile: EntityProjectileComponent; push_through: EntityPushThroughComponent; rideable: EntityRideableComponent; riding: EntityRidingComponent; @@ -1304,14 +1363,31 @@ export type EntityComponentTypeMap = { export type ItemComponentTypeMap = { cooldown: ItemCooldownComponent; durability: ItemDurabilityComponent; - enchantments: ItemEnchantsComponent; + enchantable: ItemEnchantableComponent; food: ItemFoodComponent; 'minecraft:cooldown': ItemCooldownComponent; 'minecraft:durability': ItemDurabilityComponent; - 'minecraft:enchantments': ItemEnchantsComponent; + 'minecraft:enchantable': ItemEnchantableComponent; 'minecraft:food': ItemFoodComponent; }; +/** + * @beta + */ +export class BiomeType { + private constructor(); + readonly id: string; +} + +/** + * @beta + */ +export class BiomeTypes { + private constructor(); + static get(typeName: string): BiomeType | undefined; + static getAll(): BiomeType[]; +} + /** * Represents a block in a dimension. A block represents a * unique X, Y, and Z within a dimension and get/sets the state @@ -1371,10 +1447,13 @@ export class Block { * @remarks * Returns or sets whether this block has a liquid on it. * - * This property can't be edited in read-only mode. + * @throws This property can throw when used. + * + * {@link LocationInUnloadedChunkError} * + * {@link LocationOutOfWorldBoundariesError} */ - isWaterlogged: boolean; + readonly isWaterlogged: boolean; /** * @remarks * Coordinates of the specified block. @@ -1575,7 +1654,6 @@ export class Block { */ getRedstonePower(): number | undefined; /** - * @beta * @remarks * Returns a set of tags for a block. * @@ -1589,7 +1667,6 @@ export class Block { */ getTags(): string[]; /** - * @beta * @remarks * Checks to see if the permutation of this block has a * specific tag. @@ -1627,6 +1704,17 @@ export class Block { * True if this block object is still working and valid. */ isValid(): boolean; + /** + * @beta + * @throws This function can throw errors. + * + * {@link Error} + * + * {@link LocationInUnloadedChunkError} + * + * {@link LocationOutOfWorldBoundariesError} + */ + matches(blockName: string, states?: Record): boolean; /** * @remarks * Returns the {@link Block} to the north of this block @@ -1695,6 +1783,20 @@ export class Block { * {@link LocationOutOfWorldBoundariesError} */ setType(blockType: BlockType | string): void; + /** + * @beta + * @remarks + * This function can't be called in read-only mode. + * + * @throws This function can throw errors. + * + * {@link Error} + * + * {@link LocationInUnloadedChunkError} + * + * {@link LocationOutOfWorldBoundariesError} + */ + setWaterlogged(isWaterlogged: boolean): void; /** * @remarks * Returns the {@link Block} to the south of this block @@ -2011,7 +2113,6 @@ export class BlockPermutation { */ getItemStack(amount?: number): ItemStack | undefined; /** - * @beta * @remarks * Gets a state for the permutation. * @@ -2061,7 +2162,6 @@ export class BlockPermutation { */ matches(blockName: string, states?: Record): boolean; /** - * @beta * @remarks * Returns a derived BlockPermutation with a specific property * set. @@ -2134,20 +2234,6 @@ export class BlockPermutation { // @ts-ignore Class inheritance allowed for native defined classes export class BlockPistonComponent extends BlockComponent { private constructor(); - /** - * @remarks - * Whether the piston is fully expanded. - * - * @throws This property can throw when used. - */ - readonly isExpanded: boolean; - /** - * @remarks - * Whether the piston is in the process of expanding. - * - * @throws This property can throw when used. - */ - readonly isExpanding: boolean; /** * @remarks * Whether the piston is in the process of expanding or @@ -2158,27 +2244,28 @@ export class BlockPistonComponent extends BlockComponent { readonly isMoving: boolean; /** * @remarks - * Whether the piston is fully retracted. + * The current state of the piston. * * @throws This property can throw when used. */ - readonly isRetracted: boolean; + readonly state: BlockPistonState; + static readonly componentId = 'minecraft:piston'; /** * @remarks - * Whether the piston is in the process of retracting. + * Retrieves a set of blocks that this piston is connected + * with. * - * @throws This property can throw when used. + * @throws This function can throw errors. */ - readonly isRetracting: boolean; - static readonly componentId = 'minecraft:piston'; + getAttachedBlocks(): Block[]; /** * @remarks - * Retrieves a set of blocks that this piston is connected - * with. + * Retrieves a set of block locations that this piston is + * connected with. * * @throws This function can throw errors. */ - getAttachedBlocks(): Vector3[]; + getAttachedBlocksLocations(): Vector3[]; } /** @@ -2307,30 +2394,53 @@ export class BlockSignComponent extends BlockComponent { * The side of the sign the message will be set on. If not * provided, the message will be set on the front side of the * sign. - * @throws This function can throw errors. + * @throws + * Throws if the provided message is greater than 512 + * characters in length. * @example SetRawMessage.ts * ```typescript - * const helloWorldMessage: RawMessage = { text: 'Hello World' }; + * const signLocation: Vector3 = { x: 0, y: -60, z: 0 }; // Replace with your sign's coordinates + * const block = world.getDimension("overworld").getBlock(signLocation); + * if (!block) { + * world.sendMessage("Could not find a block at specified location."); + * return; + * } + * const sign = block.getComponent("minecraft:sign") as BlockSignComponent; + * const helloWorldMessage: RawMessage = { text: "Hello World" }; * sign.setText(helloWorldMessage); * * // Sign text will be saved as a RawText - * const result: RawText = sign.getRawText(); - * JSON.stringify(result); // { rawtext: [{ text: 'Hello World' }] }; + * const result = sign.getRawText(); + * world.sendMessage(JSON.stringify(result)); // { rawtext: [{ text: 'Hello World' }] }; * ``` * @example SetRawText.ts * ```typescript - * const helloWorldText: RawText = { rawtext: [{ text: 'Hello World' }] }; + * const signLocation: Vector3 = { x: 0, y: -60, z: 0 }; // Replace with your sign's coordinates + * const block = world.getDimension("overworld").getBlock(signLocation); + * if (!block) { + * world.sendMessage("Could not find a block at specified location."); + * return; + * } + * const sign = block.getComponent("minecraft:sign") as BlockSignComponent; + * const helloWorldText: RawText = { rawtext: [{ text: "Hello World" }] }; * sign.setText(helloWorldText); * * // There will be no data transformation unlike calling setText with a RawMessage - * const result: RawText = sign.getRawText(); - * JSON.stringify(result); // { rawtext: [{ text: 'Hello World' }] }; + * const result = sign.getRawText(); + * world.sendMessage(JSON.stringify(result)); // { rawtext: [{ text: 'Hello World' }] }; * ``` * @example SetString.ts * ```typescript + * const signLocation: Vector3 = { x: 0, y: -60, z: 0 }; // Replace with your sign's coordinates + * const block = world.getDimension("overworld").getBlock(signLocation); + * if (!block) { + * world.sendMessage("Could not find a block at specified location."); + * return; + * } + * const sign = block.getComponent("minecraft:sign") as BlockSignComponent; * // Set sign to say 'Hello' - * sign.setText('Hello'); - * sign.getText(); // 'Hello' + * sign.setText("Hello World"); + * world.sendMessage(sign.getText() ?? "undefined"); // 'Hello World' * ``` */ setText(message: RawMessage | RawText | string, side?: SignSide): void; @@ -2358,7 +2468,7 @@ export class BlockSignComponent extends BlockComponent { * * @throws This function can throw errors. */ - setWaxed(): void; + setWaxed(waxed: boolean): void; } /** @@ -2418,7 +2528,6 @@ export class BlockStateType { } /** - * @beta * The type (or template) of a block. Does not contain * permutation data (state) other than the type of block it * represents. This type was introduced as of version @@ -2427,12 +2536,14 @@ export class BlockStateType { export class BlockType { private constructor(); /** + * @beta * @remarks * Represents whether this type of block can be waterlogged. * */ readonly canBeWaterlogged: boolean; /** + * @beta * @remarks * Block type name - for example, `minecraft:acacia_stairs`. * @@ -2861,15 +2972,21 @@ export class ChatSendAfterEvent { * Message that is being broadcast. * */ - message: string; + readonly message: string; /** * @remarks * Player that sent the chat message. * */ - sender: Player; - sendToTargets: boolean; - getTargets(): Player[]; + readonly sender: Player; + /** + * @remarks + * Optional list of players that will receive this message. If + * defined, this message is directly targeted to one or more + * players (i.e., is not broadcast.) + * + */ + readonly targets?: Player[]; } /** @@ -2916,8 +3033,7 @@ export class ChatSendAfterEventSignal { * @beta * An event that fires as players enter chat messages. */ -// @ts-ignore Class inheritance allowed for native defined classes -export class ChatSendBeforeEvent extends ChatSendAfterEvent { +export class ChatSendBeforeEvent { private constructor(); /** * @remarks @@ -2926,7 +3042,26 @@ export class ChatSendBeforeEvent extends ChatSendAfterEvent { * */ cancel: boolean; - setTargets(players: Player[]): void; + /** + * @remarks + * Message that is being broadcast. + * + */ + readonly message: string; + /** + * @remarks + * Player that sent the chat message. + * + */ + readonly sender: Player; + /** + * @remarks + * Optional list of players that will receive this message. If + * defined, this message is directly targeted to one or more + * players (i.e., is not broadcast.) + * + */ + readonly targets?: Player[]; } /** @@ -3465,6 +3600,8 @@ export class ContainerSlot { * * @throws * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} */ readonly isStackable: boolean; /** @@ -3496,6 +3633,8 @@ export class ContainerSlot { * * @throws * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} */ readonly maxAmount: number; /** @@ -3517,6 +3656,10 @@ export class ContainerSlot { * * @throws * Throws if the slot's container is invalid. + * + * {@link minecraftcommon.EngineError} + * + * {@link InvalidContainerSlotError} */ readonly 'type': ItemType; /** @@ -3527,8 +3670,76 @@ export class ContainerSlot { * * @throws * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} + */ + readonly typeId: string; + /** + * @remarks + * Clears all dynamic properties that have been set on this + * item stack. + * + * @throws + * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} + */ + clearDynamicProperties(): void; + /** + * @throws This function can throw errors. + * + * {@link InvalidContainerSlotError} + */ + getCanDestroy(): string[]; + /** + * @throws This function can throw errors. + * + * {@link InvalidContainerSlotError} + */ + getCanPlaceOn(): string[]; + /** + * @remarks + * Returns a property value. + * + * @param identifier + * The property identifier. + * @returns + * Returns the value for the property, or undefined if the + * property has not been set. + * @throws + * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} + */ + getDynamicProperty(identifier: string): boolean | number | string | Vector3 | undefined; + /** + * @remarks + * Returns the available set of dynamic property identifiers + * that have been used on this item stack. + * + * @returns + * A string array of the dynamic properties set on this entity. + * @throws + * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} + */ + getDynamicPropertyIds(): string[]; + /** + * @remarks + * Returns the total size, in bytes, of all the dynamic + * properties that are currently stored for this entity. This + * includes the size of both the key and the value. This can + * be useful for diagnosing performance warning signs - if, for + * example, an entity has many megabytes of associated dynamic + * properties, it may be slow to load on various devices. + * + * @throws + * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} */ - readonly typeId?: string; + getDynamicPropertyTotalByteCount(): number; /** * @remarks * Creates an exact copy of the item stack, including any @@ -3537,7 +3748,10 @@ export class ContainerSlot { * @returns * Returns a copy of the item in the slot. Returns undefined if * the slot is empty. - * @throws This function can throw errors. + * @throws + * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} */ getItem(): ItemStack | undefined; /** @@ -3550,6 +3764,8 @@ export class ContainerSlot { * returns an empty array. * @throws * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} */ getLore(): string[]; /** @@ -3559,9 +3775,18 @@ export class ContainerSlot { * @returns * Returns all tags for the item in the slot. Return an empty * array if the the slot is empty. - * @throws This function can throw errors. + * @throws + * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} */ getTags(): string[]; + /** + * @throws This function can throw errors. + * + * {@link InvalidContainerSlotError} + */ + hasItem(): boolean; /** * @remarks * Returns whether the item in the slot slot has the given tag. @@ -3571,7 +3796,10 @@ export class ContainerSlot { * @returns * Returns false when the slot is empty or the item in the slot * does not have the given tag. - * @throws This function can throw errors. + * @throws + * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} */ hasTag(tag: string): boolean; /** @@ -3589,6 +3817,8 @@ export class ContainerSlot { * given `itemStack`. * @throws * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} */ isStackableWith(itemStack: ItemStack): boolean; /** @@ -3612,6 +3842,10 @@ export class ContainerSlot { * @throws * Throws if the slot's container is invalid. Also throws if * any of the provided block identifiers are invalid. + * + * {@link Error} + * + * {@link InvalidContainerSlotError} */ setCanDestroy(blockIdentifiers?: string[]): void; /** @@ -3628,8 +3862,28 @@ export class ContainerSlot { * @throws * Throws if the slot's container is invalid. Also throws if * any of the provided block identifiers are invalid. + * + * {@link Error} + * + * {@link InvalidContainerSlotError} */ setCanPlaceOn(blockIdentifiers?: string[]): void; + /** + * @remarks + * Sets a specified property to a value. + * + * @param identifier + * The property identifier. + * @param value + * Data value of the property to set. + * @throws + * Throws if the slot's container is invalid. + * + * {@link Error} + * + * {@link InvalidContainerSlotError} + */ + setDynamicProperty(identifier: string, value?: boolean | number | string | Vector3): void; /** * @remarks * Sets the given ItemStack in the slot, replacing any existing @@ -3639,7 +3893,10 @@ export class ContainerSlot { * * @param itemStack * The ItemStack to be placed in the slot. - * @throws This function can throw errors. + * @throws + * Throws if the slot's container is invalid. + * + * {@link InvalidContainerSlotError} */ setItem(itemStack?: ItemStack): void; /** @@ -3654,12 +3911,15 @@ export class ContainerSlot { * will clear the lore. * @throws * Throws if the slot's container is invalid. + * + * {@link Error} + * + * {@link InvalidContainerSlotError} */ setLore(loreList?: string[]): void; } /** - * @beta * Contains information related to firing of a data driven * entity event - for example, the minecraft:ageable_grow_up * event on a chicken. @@ -3688,7 +3948,6 @@ export class DataDrivenEntityTriggerAfterEvent { } /** - * @beta * Contains event registration related to firing of a data * driven entity event - for example, the * minecraft:ageable_grow_up event on a chicken. @@ -3867,7 +4126,7 @@ export class Dimension { * overworld.createExplosion(explodeNoBlocksLoc, 15, { breaksBlocks: false }); * ``` */ - createExplosion(location: Vector3, radius: number, explosionOptions?: ExplosionOptions): void; + createExplosion(location: Vector3, radius: number, explosionOptions?: ExplosionOptions): boolean; /** * @beta * @remarks @@ -3895,6 +4154,18 @@ export class Dimension { block: BlockPermutation | BlockType | string, options?: BlockFillOptions, ): number; + /** + * @beta + * @remarks + * This function can't be called in read-only mode. + * + * @throws This function can throw errors. + * + * {@link minecraftcommon.EngineError} + * + * {@link Error} + */ + findClosestBiome(pos: Vector3, biomeToFind: BiomeType | string, options?: BiomeSearchOptions): Vector3 | undefined; /** * @remarks * Returns a block instance at the given location. @@ -4330,7 +4601,6 @@ export class Effect { } /** - * @beta * Contains information related to changes to an effect - like * poison - being added to an entity. */ @@ -4340,22 +4610,17 @@ export class EffectAddAfterEvent { * @remarks * Additional properties and details of the effect. * - * This property can't be edited in read-only mode. - * */ - effect: Effect; + readonly effect: Effect; /** * @remarks * Entity that the effect is being added to. * - * This property can't be edited in read-only mode. - * */ - entity: Entity; + readonly entity: Entity; } /** - * @beta * Manages callbacks that are connected to when an effect is * added to an entity. */ @@ -4386,7 +4651,6 @@ export class EffectAddAfterEventSignal { } /** - * @beta * Contains information related to changes to an effect - like * poison - being added to an entity. */ @@ -4419,7 +4683,6 @@ export class EffectAddBeforeEvent { } /** - * @beta * Manages callbacks that are connected to when an effect is * added to an entity. */ @@ -4492,150 +4755,6 @@ export class EffectTypes { static getAll(): EffectType[]; } -/** - * @beta - * This class represents a specific leveled enchantment that is - * applied to an item. - */ -export class Enchantment { - /** - * @remarks - * The level of this enchantment instance. - * - * This property can't be edited in read-only mode. - * - */ - level: number; - /** - * @remarks - * The enchantment type of this instance. - * - */ - readonly 'type': EnchantmentType; - /** - * @remarks - * Creates a new particular type of enchantment configuration. - * - * @param enchantmentType - * Type of the enchantment. - * @param level - * Level of the enchantment. - * @throws This function can throw errors. - */ - constructor(enchantmentType: EnchantmentType | string, level?: number); -} - -/** - * @beta - * This class represents a collection of enchantments that can - * be applied to an item. - */ -export class EnchantmentList implements Iterable { - /** - * @remarks - * The item slot/type that this collection is applied to. - * - */ - readonly slot: number; - /** - * @remarks - * Creates a new EnchantmentList. - * - */ - constructor(enchantmentSlot: number); - /** - * @remarks - * This function can't be called in read-only mode. - * - */ - [Symbol.iterator](): Iterator; - /** - * @remarks - * Attempts to add the enchantment to this collection. Returns - * true if successful. - * - * This function can't be called in read-only mode. - * - */ - addEnchantment(enchantment: Enchantment): boolean; - /** - * @remarks - * Returns whether or not the provided EnchantmentInstance can - * be added to this collection. - * - * This function can't be called in read-only mode. - * - */ - canAddEnchantment(enchantment: Enchantment): boolean; - /** - * @remarks - * Returns an enchantment associated with a type. - * - * This function can't be called in read-only mode. - * - * @throws This function can throw errors. - */ - getEnchantment(enchantmentType: EnchantmentType | string): Enchantment | undefined; - /** - * @remarks - * If this collection has an EnchantmentInstance with type, - * returns the level of the enchantment. Returns 0 if not - * present. - * - * @throws This function can throw errors. - */ - hasEnchantment(enchantmentType: EnchantmentType | string): number; - /** - * @remarks - * This function can't be called in read-only mode. - * - */ - next(): IteratorResult; - /** - * @remarks - * Removes an EnchantmentInstance with type from this - * collection if present. - * - * This function can't be called in read-only mode. - * - * @throws This function can throw errors. - */ - removeEnchantment(enchantmentType: EnchantmentType | string): void; -} - -/** - * @beta - * This enum represents the item slot or type that an - * enchantment can be applied to. - */ -export class EnchantmentSlot { - private constructor(); - static readonly all = -1; - static readonly armorFeet = 4; - static readonly armorHead = 1; - static readonly armorLegs = 8; - static readonly armorTorso = 2; - static readonly axe = 512; - static readonly bow = 32; - static readonly carrotStick = 8192; - static readonly cosmeticHead = 262144; - static readonly crossbow = 65536; - static readonly elytra = 16384; - static readonly fishingRod = 4096; - static readonly flintsteel = 256; - static readonly gArmor = 15; - static readonly gDigging = 3648; - static readonly gTool = 131520; - static readonly hoe = 64; - static readonly none = 0; - static readonly pickaxe = 1024; - static readonly shears = 128; - static readonly shield = 131072; - static readonly shovel = 2048; - static readonly spear = 32768; - static readonly sword = 16; -} - /** * @beta * Contains information on a type of enchantment. @@ -4658,7 +4777,8 @@ export class EnchantmentType { /** * @beta - * Provides a list of enchantment types. + * Contains a catalog of Minecraft Enchantment Types that are + * available in this world. */ export class EnchantmentTypes { private constructor(); @@ -4881,7 +5001,7 @@ export class Entity { * log("Created a sneaking wolf.", 1); * ``` */ - addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): void; + addEffect(effectType: EffectType | string, duration: number, options?: EntityEffectOptions): Effect | undefined; /** * @remarks * Adds a specified tag to an entity. @@ -5138,11 +5258,11 @@ export class Entity { /** * @remarks * Returns the total size, in bytes, of all the dynamic - * properties that are currently stored for this entity. This - * can be useful for diagnosing performance warning signs - if, - * for example, an entity has many megabytes of associated - * dynamic properties, it may be slow to load on various - * devices. + * properties that are currently stored for this entity. This + * includes the size of both the key and the value. This can + * be useful for diagnosing performance warning signs - if, for + * example, an entity has many megabytes of associated dynamic + * properties, it may be slow to load on various devices. * * @throws This function can throw errors. */ @@ -5224,8 +5344,10 @@ export class Entity { getRotation(): Vector2; /** * @remarks + * Returns all tags associated with the entity. + * * @returns - * Returns all tags associated with an entity. + * An array containing all tags as strings. * @throws This function can throw errors. */ getTags(): string[]; @@ -5329,10 +5451,13 @@ export class Entity { * location of the entity for matching if the location is not * specified in the passed in EntityQueryOptions. * + * @param options + * The query to perform the match against. * @returns * Returns true if the entity matches the criteria in the * passed in EntityQueryOptions, otherwise it returns false. - * @throws This function can throw errors. + * @throws + * Throws if the query options are misconfigured. */ matches(options: EntityQueryOptions): boolean; /** @@ -6034,8 +6159,6 @@ export class EntityEquippableComponent extends EntityComponent { * @remarks * Gets the equipped item for the given EquipmentSlot. * - * This function can't be called in read-only mode. - * * @param equipmentSlot * The equipment slot. e.g. "head", "chest", "offhand" * @returns @@ -6050,8 +6173,6 @@ export class EntityEquippableComponent extends EntityComponent { * Gets the ContainerSlot corresponding to the given * EquipmentSlot. * - * This function can't be called in read-only mode. - * * @param equipmentSlot * The equipment slot. e.g. "head", "chest", "offhand". * @returns @@ -7190,6 +7311,168 @@ export class EntityOnFireComponent extends EntityComponent { static readonly componentId = 'minecraft:onfire'; } +/** + * @beta + * The projectile component controls the properties of a + * projectile entity and allows it to be shot in a given + * direction. + * This component is present when the entity has the + * minecraft:projectile component. + */ +// @ts-ignore Class inheritance allowed for native defined classes +export class EntityProjectileComponent extends EntityComponent { + private constructor(); + /** + * @remarks + * The fraction of the projectile's speed maintained every tick + * while traveling through air. + * + * This property can't be edited in read-only mode. + * + */ + airInertia: number; + /** + * @remarks + * If true, the entity will be set on fire when hurt. The + * default burn duration is 5 seconds. This duration can be + * modified via the onFireTime property. The entity will not + * catch fire if immune or if the entity is wet. + * + * This property can't be edited in read-only mode. + * + */ + catchFireOnHurt: boolean; + /** + * @remarks + * If true, the projectile will spawn crit particles when hit + * by a player. E.g. Player attacking a Shulker bullet. + * + * This property can't be edited in read-only mode. + * + */ + critParticlesOnProjectileHurt: boolean; + /** + * @remarks + * If true, the projectile will be destroyed when it takes + * damage. E.g. Player attacking a Shulker bullet. + * + * This property can't be edited in read-only mode. + * + */ + destroyOnProjectileHurt: boolean; + /** + * @remarks + * The gravity applied to the projectile. When the entity is + * not on the ground, subtracts this amount from the + * projectile’s change in vertical position every tick. The + * higher the value, the faster the projectile falls. If + * negative, the entity will rise instead of fall. + * + * This property can't be edited in read-only mode. + * + */ + gravity: number; + /** + * @remarks + * The sound that plays when the projectile hits an entity. + * + * This property can't be edited in read-only mode. + * + */ + hitEntitySound?: string; + /** + * @remarks + * The sound that plays when the projectile hits a block. + * + * This property can't be edited in read-only mode. + * + */ + hitGroundSound?: string; + /** + * @remarks + * The particle that spawns when the projectile hits something. + * + * This property can't be edited in read-only mode. + * + */ + hitParticle?: string; + /** + * @remarks + * If true and the weather is thunder and the entity has line + * of sight to the sky, the entity will be struck by lightning + * when hit. E.g. A thrown Trident with the Channeling + * enchantment. + * + * This property can't be edited in read-only mode. + * + */ + lightningStrikeOnHit: boolean; + /** + * @remarks + * The fraction of the projectile's speed maintained every tick + * while traveling through a liquid. + * + * This property can't be edited in read-only mode. + * + */ + liquidInertia: number; + /** + * @remarks + * Duration in seconds that the entity hit will be on fire for + * when catchFireOnHurt is set to true. + * + * This property can't be edited in read-only mode. + * + */ + onFireTime: number; + /** + * @remarks + * The owner of the projectile. This is used to determine what + * the projectile can collide with and damage. It also + * determines which entity is assigned as the attacker. + * + * This property can't be edited in read-only mode. + * + */ + owner?: Entity; + /** + * @remarks + * If true, the projectile will bounce off mobs when no damage + * is taken. E.g. A spawning wither. + * + * This property can't be edited in read-only mode. + * + */ + shouldBounceOnHit: boolean; + /** + * @remarks + * If true, the projectile will stop moving when an entity is + * hit as thought it had been blocked. E.g. Thrown trident on + * hit behavior. + * + * This property can't be edited in read-only mode. + * + */ + stopOnHit: boolean; + static readonly componentId = 'minecraft:projectile'; + /** + * @remarks + * Shoots the projectile with a given velocity. The projectile + * will be shot from its current location. + * + * This function can't be called in read-only mode. + * + * @param velocity + * The velocity to fire the projectile. This controls both the + * speed and direction which which the projectile will be shot. + * @param options + * Optional configuration for the shoot. + * @throws + * Throws if the component or entity no longer exist. + */ + shoot(velocity: Vector3, options?: ProjectileShootOptions): void; +} + /** * Sets the distance through which the entity can push through. */ @@ -7668,7 +7951,7 @@ export class EntityTypes { * Retrieves an iterator of all entity types within this world. * */ - static getAll(): EntityTypeIterator; + static getAll(): EntityType[]; } /** @@ -7711,7 +7994,6 @@ export class EntityWantsJockeyComponent extends EntityComponent { } /** - * @beta * Contains information regarding an explosion that has * happened. */ @@ -7738,7 +8020,6 @@ export class ExplosionAfterEvent { } /** - * @beta * Manages callbacks that are connected to when an explosion * occurs. */ @@ -7766,7 +8047,6 @@ export class ExplosionAfterEventSignal { } /** - * @beta * Contains information regarding an explosion that has * happened. */ @@ -7791,7 +8071,6 @@ export class ExplosionBeforeEvent extends ExplosionAfterEvent { } /** - * @beta * Manages callbacks that are connected to before an explosion * occurs. */ @@ -8121,7 +8400,7 @@ export class ItemCooldownComponent extends ItemComponent { readonly cooldownCategory: string; /** * @remarks - * Amount of time, in ticks, that remain for this item + * Amount of time, in ticks, it will take this item to * cooldown. * * @throws This property can throw when used. @@ -8278,44 +8557,157 @@ export class ItemDurabilityComponent extends ItemComponent { * * This function can't be called in read-only mode. * - * @param unbreaking - * Unbreaking factor to consider in factoring the damage - * chance. Incoming unbreaking parameter must be greater than - * 0. * @throws This function can throw errors. */ - getDamageChance(unbreaking?: number): number; + getDamageChance(unbreakingEnchantmentLevel?: number): number; /** * @remarks - * A range of numbers that describes the chance of the item - * losing durability. + * Returns the min and max variables used by the damage chance + * formula: + * chance = (min + ((max - min) / (unbreaking + 1))) + * * * This function can't be called in read-only mode. * * @throws This function can throw errors. */ - getDamageRange(): minecraftcommon.NumberRange; + getDamageChanceRange(): minecraftcommon.NumberRange; } /** * @beta - * When present on an item, this item has applied enchantment - * effects. Note that this component only applies to - * data-driven items. + * When present on an item, this item can have enchantments + * applied to it. */ // @ts-ignore Class inheritance allowed for native defined classes -export class ItemEnchantsComponent extends ItemComponent { +export class ItemEnchantableComponent extends ItemComponent { private constructor(); + static readonly componentId = 'minecraft:enchantable'; /** * @remarks - * Returns a collection of the enchantments applied to this - * item stack. + * Adds an enchantment to the item stack. * - * This property can't be edited in read-only mode. + * This function can't be called in read-only mode. + * + * @param enchantment + * The enchantment interface to be added. + * @throws + * ScriptItemEnchantmentUnknownIdError: Exception thrown if the + * enchantment type does not exist. + * + * ScriptItemEnchantmentLevelOutOfBoundsError: Exception thrown + * if the enchantment level is outside the allowable range for + * the given enchantment type. + * + * ScriptItemEnchantmentTypeNotCompatibleError: Exception + * thrown if the enchantment is not compatible with the item + * stack. + * + * + * {@link EnchantmentLevelOutOfBoundsError} * + * {@link EnchantmentTypeNotCompatibleError} + * + * {@link EnchantmentTypeUnknownIdError} + * + * {@link Error} + */ + addEnchantment(enchantment: Enchantment): void; + /** + * @remarks + * Adds a list of enchantments to the item stack. + * + * This function can't be called in read-only mode. + * + * @param enchantments + * The list of enchantments to be added. + * @throws + * ScriptItemEnchantmentUnknownIdError: Exception thrown if any + * enchantment type does not exist. + * + * ScriptItemEnchantmentLevelOutOfBoundsError: Exception thrown + * if any enchantment level is outside the allowable range for + * the given enchantment type. + * + * ScriptItemEnchantmentTypeNotCompatibleError: Exception + * thrown if any enchantment is not compatible with the item + * stack. + * + * + * {@link EnchantmentLevelOutOfBoundsError} + * + * {@link EnchantmentTypeNotCompatibleError} + * + * {@link EnchantmentTypeUnknownIdError} + * + * {@link Error} + */ + addEnchantments(enchantments: Enchantment[]): void; + /** + * @remarks + * Checks whether an enchantment can be added to the item + * stack. + * + * @param enchantment + * The enchantment interface to be added. + * @returns + * Returns true if the enchantment can be added to the item + * stack. + * @throws + * ScriptItemEnchantmentUnknownIdError: Exception thrown if the + * enchantment type does not exist. + * + * ScriptItemEnchantmentLevelOutOfBoundsError: Exception thrown + * if the enchantment level is outside the allowable range for + * the given enchantment type. + * + * + * {@link EnchantmentLevelOutOfBoundsError} + * + * {@link EnchantmentTypeUnknownIdError} */ - enchantments: EnchantmentList; - static readonly componentId = 'minecraft:enchantments'; + canAddEnchantment(enchantment: Enchantment): boolean; + /** + * @remarks + * Gets the enchantment of a given type from the item stack. + * + * @param enchantmentType + * The enchantment type to get. + * @returns + * Returns the enchantment if it exists on the item stack. + * @throws + * ScriptItemEnchantmentUnknownIdError: Exception thrown if the + * enchantment type does not exist. + * + * + * {@link EnchantmentTypeUnknownIdError} + */ + getEnchantment(enchantmentType: EnchantmentType | string): Enchantment | undefined; + /** + * @remarks + * Gets all enchantments on the item stack. + * + * @returns + * Returns a list of enchantments on the item stack. + * @throws This function can throw errors. + */ + getEnchantments(): Enchantment[]; + /** + * @remarks + * Checks whether an item stack has a given enchantment type. + * + * @param enchantmentType + * The enchantment type to check for. + * @returns + * Returns true if the item stack has the enchantment type. + * @throws + * ScriptItemEnchantmentUnknownIdError: Exception thrown if the + * enchantment type does not exist. + * + * + * {@link EnchantmentTypeUnknownIdError} + */ + hasEnchantment(enchantmentType: EnchantmentType | string): boolean; /** * @remarks * Removes all enchantments applied to this item stack. @@ -8325,6 +8717,24 @@ export class ItemEnchantsComponent extends ItemComponent { * @throws This function can throw errors. */ removeAllEnchantments(): void; + /** + * @remarks + * Removes an enchantment of the given type. + * + * This function can't be called in read-only mode. + * + * @param enchantmentType + * The enchantment type to remove. + * @throws + * ScriptItemEnchantmentUnknownIdError: Exception thrown if the + * enchantment type does not exist. + * + * + * {@link EnchantmentTypeUnknownIdError} + * + * {@link Error} + */ + removeEnchantment(enchantmentType: EnchantmentType | string): void; } /** @@ -8384,7 +8794,7 @@ export class ItemReleaseUseAfterEvent { * Returns the item stack that triggered this item event. * */ - readonly itemStack: ItemStack; + readonly itemStack?: ItemStack; /** * @remarks * Returns the source entity that triggered this item event. @@ -8521,6 +8931,14 @@ export class ItemStack { * the range of 1-255. */ constructor(itemType: ItemType | string, amount?: number); + /** + * @beta + * @remarks + * Clears all dynamic properties that have been set on this + * item stack. + * + */ + clearDynamicProperties(): void; /** * @remarks * Creates an exact copy of the item stack, including any @@ -8577,6 +8995,40 @@ export class ItemStack { * */ getComponents(): ItemComponent[]; + /** + * @beta + * @remarks + * Returns a property value. + * + * @param identifier + * The property identifier. + * @returns + * Returns the value for the property, or undefined if the + * property has not been set. + */ + getDynamicProperty(identifier: string): boolean | number | string | Vector3 | undefined; + /** + * @beta + * @remarks + * Returns the available set of dynamic property identifiers + * that have been used on this entity. + * + * @returns + * A string array of the dynamic properties set on this entity. + */ + getDynamicPropertyIds(): string[]; + /** + * @beta + * @remarks + * Returns the total size, in bytes, of all the dynamic + * properties that are currently stored for this entity. This + * includes the size of both the key and the value. This can + * be useful for diagnosing performance warning signs - if, for + * example, an entity has many megabytes of associated dynamic + * properties, it may be slow to load on various devices. + * + */ + getDynamicPropertyTotalByteCount(): number; /** * @remarks * Returns the lore value - a secondary display string - for an @@ -8672,6 +9124,20 @@ export class ItemStack { * ``` */ setCanPlaceOn(blockIdentifiers?: string[]): void; + /** + * @beta + * @remarks + * Sets a specified property to a value. Note: This function + * only works with non-stackable items. + * + * @param identifier + * The property identifier. + * @param value + * Data value of the property to set. + * @throws + * Throws if the item stack is stackable. + */ + setDynamicProperty(identifier: string, value?: boolean | number | string | Vector3): void; /** * @remarks * Sets the lore value - a secondary display string - for an @@ -9318,182 +9784,54 @@ export class MolangVariableMap { */ setColorRGBA(variableName: string, color: RGBA): void; /** - * @remarks - * Sets a numeric (decimal) value within the Molang variable - * map. - * - * @param variableName - * Name of the float-based number to set. - * @param number - * Value for the Molang-based variable to set. - * @throws This function can throw errors. - */ - setFloat(variableName: string, number: number): void; - /** - * @remarks - * Adds the following variables to Molang: - * - `.speed` - Speed number provided - * - `.direction_x` - X value from the {@link - * Vector3} provided - * - `.direction_y` - Y value from the {@link - * Vector3} provided - * - `.direction_z` - Z value from the {@link - * Vector3} provided - * - * @throws This function can throw errors. - */ - setSpeedAndDirection(variableName: string, speed: number, direction: Vector3): void; - /** - * @remarks - * Adds the following variables to Molang: - * - `.x` - X value from the {@link Vector3} - * provided - * - `.y` - Y value from the {@link Vector3} - * provided - * - `.z` - Z value from the {@link Vector3} - * provided - * - * @throws This function can throw errors. - */ - setVector3(variableName: string, vector: Vector3): void; -} - -/** - * @beta - * Contains data resulting from a navigation operation, - * including whether the navigation is possible and the path of - * navigation. - */ -export class NavigationResult { - private constructor(); - /** - * @remarks - * Whether the navigation result contains a full path, - * including to the requested destination. - * - */ - readonly isFullPath: boolean; - /** - * @remarks - * A set of block locations that comprise the navigation route. - * - */ - getPath(): Vector3[]; -} - -/** - * @beta - * Contains information related to changes to a piston - * expanding or retracting. - */ -// @ts-ignore Class inheritance allowed for native defined classes -export class PistonActivateAfterEvent extends BlockEvent { - private constructor(); - /** - * @remarks - * True if the piston is the process of expanding. - * - */ - readonly isExpanding: boolean; - /** - * @remarks - * Contains additional properties and details of the piston. - * - */ - readonly piston: BlockPistonComponent; -} - -/** - * @beta - * Manages callbacks that are connected to piston activations. - */ -export class PistonActivateAfterEventSignal { - private constructor(); - /** - * @remarks - * Adds a callback that will be called when a piston expands or - * retracts. - * - * This function can't be called in read-only mode. - * - * @example pistonAfterEvent.ts - * ```typescript - * // set up a couple of piston blocks - * let piston = overworld.getBlock(targetLocation); - * let button = overworld.getBlock({ x: targetLocation.x, y: targetLocation.y + 1, z: targetLocation.z }); - * - * if (piston === undefined || button === undefined) { - * log("Could not find block at location."); - * return -1; - * } - * - * piston.setPermutation(mc.BlockPermutation.resolve('piston').withState('facing_direction', 3)); - * button.setPermutation(mc.BlockPermutation.resolve('acacia_button').withState('facing_direction', 1)); - * - * mc.world.afterEvents.pistonActivate.subscribe((pistonEvent: mc.PistonActivateAfterEvent) => { - * let eventLoc = pistonEvent.piston.block.location; - * - * if (eventLoc.x === targetLocation.x && eventLoc.y === targetLocation.y && eventLoc.z === targetLocation.z) { - * log( - * "Piston event at " + - * mc.system.currentTick + - * (pistonEvent.piston.isMoving ? " Moving" : "") + - * (pistonEvent.piston.isExpanding ? " Expanding" : "") + - * (pistonEvent.piston.isExpanded ? " Expanded" : "") + - * (pistonEvent.piston.isRetracting ? " Retracting" : "") + - * (pistonEvent.piston.isRetracted ? " Retracted" : "") - * ); - * } - * }); - * ``` - * @example pistonEvent.ts - * ```typescript - * let canceled = false; - * - * const pistonLoc: mc.Vector3 = { - * x: Math.floor(targetLocation.x) + 1, - * y: Math.floor(targetLocation.y) + 2, - * z: Math.floor(targetLocation.z) + 1, - * }; - * - * const pistonCallback = mc.world.beforeEvents.pistonActivate.subscribe((pistonEvent: mc.PistonActivateBeforeEvent) => { - * if (pistonEvent.piston.location.equals(pistonLoc)) { - * log("Cancelling piston event"); - * pistonEvent.cancel = true; - * canceled = true; - * } - * }); + * @remarks + * Sets a numeric (decimal) value within the Molang variable + * map. * - * ``` + * @param variableName + * Name of the float-based number to set. + * @param number + * Value for the Molang-based variable to set. + * @throws This function can throw errors. */ - subscribe(callback: (arg: PistonActivateAfterEvent) => void): (arg: PistonActivateAfterEvent) => void; + setFloat(variableName: string, number: number): void; /** * @remarks - * Removes a callback from being called when a piston expands - * or retracts. + * Adds the following variables to Molang: + * - `.speed` - Speed number provided + * - `.direction_x` - X value from the {@link + * Vector3} provided + * - `.direction_y` - Y value from the {@link + * Vector3} provided + * - `.direction_z` - Z value from the {@link + * Vector3} provided * - * This function can't be called in read-only mode. + * @throws This function can throw errors. + */ + setSpeedAndDirection(variableName: string, speed: number, direction: Vector3): void; + /** + * @remarks + * Adds the following variables to Molang: + * - `.x` - X value from the {@link Vector3} + * provided + * - `.y` - Y value from the {@link Vector3} + * provided + * - `.z` - Z value from the {@link Vector3} + * provided * * @throws This function can throw errors. */ - unsubscribe(callback: (arg: PistonActivateAfterEvent) => void): void; + setVector3(variableName: string, vector: Vector3): void; } /** * @beta - * Contains information related to changes before a piston - * expands or retracts. + * Contains information related to changes to a piston + * expanding or retracting. */ // @ts-ignore Class inheritance allowed for native defined classes -export class PistonActivateBeforeEvent extends BlockEvent { +export class PistonActivateAfterEvent extends BlockEvent { private constructor(); - /** - * @remarks - * If this is set to true within an event handler, the piston - * activation is canceled. - * - */ - cancel: boolean; /** * @remarks * True if the piston is the process of expanding. @@ -9510,74 +9848,71 @@ export class PistonActivateBeforeEvent extends BlockEvent { /** * @beta - * Manages callbacks that are connected to an event that fires - * before a piston is activated. + * Manages callbacks that are connected to piston activations. */ -export class PistonActivateBeforeEventSignal { +export class PistonActivateAfterEventSignal { private constructor(); /** * @remarks - * Adds a callback that will be called before a piston expands - * or retracts. + * Adds a callback that will be called when a piston expands or + * retracts. * * This function can't be called in read-only mode. * - * @example pistonBeforeEvent.ts + * @example pistonAfterEvent.ts * ```typescript - * // set up a couple of piston blocks - * let piston = overworld.getBlock(targetLocation); - * let button = overworld.getBlock({ x: targetLocation.x, y: targetLocation.y + 1, z: targetLocation.z }); - * - * if (piston === undefined || button === undefined) { - * log("Could not find block at location."); - * return -1; - * } - * - * piston.setPermutation(mc.BlockPermutation.resolve('piston').withState('facing_direction', 3)); - * button.setPermutation(mc.BlockPermutation.resolve('acacia_button').withState('facing_direction', 1)); - * - * const uncanceledPistonLoc = { - * x: Math.floor(targetLocation.x) + 2, - * y: Math.floor(targetLocation.y), - * z: Math.floor(targetLocation.z) + 2, - * }; - * - * // this is our control. - * let uncanceledPiston = overworld.getBlock(uncanceledPistonLoc); - * let uncanceledButton = overworld.getBlock({ - * x: uncanceledPistonLoc.x, - * y: uncanceledPistonLoc.y + 1, - * z: uncanceledPistonLoc.z, - * }); + * // set up a couple of piston blocks + * let piston = overworld.getBlock(targetLocation); + * let button = overworld.getBlock({ + * x: targetLocation.x, + * y: targetLocation.y + 1, + * z: targetLocation.z, + * }); * - * if (uncanceledPiston === undefined || uncanceledButton === undefined) { - * log("Could not find block at location."); - * return -1; - * } + * if (piston === undefined || button === undefined) { + * log("Could not find block at location."); + * return -1; + * } * - * uncanceledPiston.setPermutation(mc.BlockPermutation.resolve('piston').withState('facing_direction', 3)); - * uncanceledButton.setPermutation(mc.BlockPermutation.resolve('acacia_button').withState('facing_direction', 1)); + * piston.setPermutation( + * mc.BlockPermutation.resolve("piston").withState("facing_direction", 3) + * ); + * button.setPermutation( + * mc.BlockPermutation.resolve("acacia_button").withState("facing_direction", 1) + * ); * - * mc.world.beforeEvents.pistonActivate.subscribe((pistonEvent: mc.PistonActivateBeforeEvent) => { + * mc.world.afterEvents.pistonActivate.subscribe( + * (pistonEvent: mc.PistonActivateAfterEvent) => { * let eventLoc = pistonEvent.piston.block.location; - * if (eventLoc.x === targetLocation.x && eventLoc.y === targetLocation.y && eventLoc.z === targetLocation.z) { - * log("Cancelling piston event"); - * pistonEvent.cancel = true; + * + * if ( + * eventLoc.x === targetLocation.x && + * eventLoc.y === targetLocation.y && + * eventLoc.z === targetLocation.z + * ) { + * log( + * "Piston event at " + + * mc.system.currentTick + + * (pistonEvent.piston.isMoving ? " Moving" : "") + + * " State: " + + * pistonEvent.piston.state + * ); * } - * }); + * } + * ); * ``` */ - subscribe(callback: (arg: PistonActivateBeforeEvent) => void): (arg: PistonActivateBeforeEvent) => void; + subscribe(callback: (arg: PistonActivateAfterEvent) => void): (arg: PistonActivateAfterEvent) => void; /** * @remarks - * Removes a callback from being called before a piston expands + * Removes a callback from being called when a piston expands * or retracts. * * This function can't be called in read-only mode. * * @throws This function can throw errors. */ - unsubscribe(callback: (arg: PistonActivateBeforeEvent) => void): void; + unsubscribe(callback: (arg: PistonActivateAfterEvent) => void): void; } /** @@ -9699,6 +10034,20 @@ export class Player extends Entity { * @throws This function can throw errors. */ addLevels(amount: number): number; + /** + * @beta + * @remarks + * Eats an item, providing the item's hunger and saturation + * effects to the player. Can only be used on food items. + * + * This function can't be called in read-only mode. + * + * @param itemStack + * The item to eat. + * @throws + * Throws if the item is not a food item. + */ + eatItem(itemStack: ItemStack): void; /** * @beta * @remarks @@ -9897,6 +10246,50 @@ export class Player extends Entity { * {@link LocationOutOfWorldBoundariesError} */ setSpawnPoint(spawnPoint?: DimensionLocation): void; + /** + * @beta + * @remarks + * Creates a new particle emitter at a specified location in + * the world. Only visible to the target player. + * + * This function can't be called in read-only mode. + * + * @param effectName + * Identifier of the particle to create. + * @param location + * The location at which to create the particle emitter. + * @param molangVariables + * A set of optional, customizable variables that can be + * adjusted for this particle. + * @throws This function can throw errors. + * + * {@link Error} + * + * {@link LocationInUnloadedChunkError} + * + * {@link LocationOutOfWorldBoundariesError} + * @example spawnParticle.ts + * ```typescript + * for (let i = 0; i < 100; i++) { + * const molang = new mc.MolangVariableMap(); + * + * molang.setColorRGB("variable.color", { + * red: Math.random(), + * green: Math.random(), + * blue: Math.random(), + * alpha: 1, + * }); + * + * let newLocation = { + * x: targetLocation.x + Math.floor(Math.random() * 8) - 4, + * y: targetLocation.y + Math.floor(Math.random() * 8) - 4, + * z: targetLocation.z + Math.floor(Math.random() * 8) - 4, + * }; + * player.spawnParticle("minecraft:colored_flame_particle", newLocation, molang); + * } + * ``` + */ + spawnParticle(effectName: string, location: Vector3, molangVariables?: MolangVariableMap): void; /** * @beta * @remarks @@ -10465,21 +10858,40 @@ export class PlayerLeaveAfterEventSignal extends IPlayerLeaveAfterEventSignal { private constructor(); } +/** + * Contains information regarding a player that is leaving the + * world. + */ export class PlayerLeaveBeforeEvent { private constructor(); + /** + * @remarks + * The leaving player. + * + */ readonly player: Player; } +/** + * Manages callbacks that are connected to a player leaving the + * world. + */ export class PlayerLeaveBeforeEventSignal { private constructor(); /** * @remarks + * Adds a callback that will be called when a player leaves the + * world. + * * This function can't be called in read-only mode. * */ subscribe(callback: (arg: PlayerLeaveBeforeEvent) => void): (arg: PlayerLeaveBeforeEvent) => void; /** * @remarks + * Removes a callback that will be called when a player leaves + * the world. + * * This function can't be called in read-only mode. * * @throws This function can throw errors. @@ -10561,10 +10973,10 @@ export class PlayerPlaceBlockBeforeEvent extends BlockEvent { readonly faceLocation: Vector3; /** * @remarks - * The item being used to place the block. + * The block permutation that is being placed. * */ - itemStack: ItemStack; + readonly permutationBeingPlaced: BlockPermutation; /** * @remarks * Player that is placing the block for this event. @@ -10905,7 +11317,7 @@ export class Scoreboard { * * @throws This function can throw errors. */ - addObjective(objectiveId: string, displayName: string): ScoreboardObjective; + addObjective(objectiveId: string, displayName?: string): ScoreboardObjective; /** * @remarks * Clears the objective that occupies a display slot. @@ -11381,6 +11793,10 @@ export class System { * */ readonly currentTick: number; + /** + * @beta + */ + clearJob(jobId: number): void; /** * @remarks * Cancels the execution of a function run that was previously @@ -11439,6 +11855,10 @@ export class System { * ``` */ runInterval(callback: () => void, tickInterval?: number): number; + /** + * @beta + */ + runJob(generator: generator): number; /** * @remarks * Runs a set of code at a future time specified by tickDelay. @@ -11905,6 +12325,37 @@ export class WeatherChangeAfterEventSignal { unsubscribe(callback: (arg: WeatherChangeAfterEvent) => void): void; } +/** + * @beta + */ +export class WeatherChangeBeforeEvent { + private constructor(); + cancel: boolean; + duration: number; + newWeather: WeatherType; + readonly previousWeather: WeatherType; +} + +/** + * @beta + */ +export class WeatherChangeBeforeEventSignal { + private constructor(); + /** + * @remarks + * This function can't be called in read-only mode. + * + */ + subscribe(callback: (arg: WeatherChangeBeforeEvent) => void): (arg: WeatherChangeBeforeEvent) => void; + /** + * @remarks + * This function can't be called in read-only mode. + * + * @throws This function can throw errors. + */ + unsubscribe(callback: (arg: WeatherChangeBeforeEvent) => void): void; +} + /** * A class that wraps the state of a world - a set of * dimensions and the environment of Minecraft. @@ -12393,9 +12844,13 @@ export class WorldAfterEvents { */ readonly chatSend: ChatSendAfterEventSignal; /** - * @beta + * @remarks + * This event is fired when an entity event has been triggered + * that will update the component definition state of an + * entity. + * */ - readonly dataDrivenEntityTriggerEvent: DataDrivenEntityTriggerAfterEventSignal; + readonly dataDrivenEntityTrigger: DataDrivenEntityTriggerAfterEventSignal; /** * @beta * @remarks @@ -12733,13 +13188,6 @@ export class WorldBeforeEvents { * */ readonly itemUseOn: ItemUseOnBeforeEventSignal; - /** - * @beta - * @remarks - * This event fires when a piston expands or retracts. - * - */ - readonly pistonActivate: PistonActivateBeforeEventSignal; /** * @remarks * This event fires before a block is broken by a player. @@ -12773,6 +13221,10 @@ export class WorldBeforeEvents { * */ readonly playerPlaceBlock: PlayerPlaceBlockBeforeEventSignal; + /** + * @beta + */ + readonly weatherChange: WeatherChangeBeforeEventSignal; } /** @@ -12817,6 +13269,13 @@ export class WorldInitializeAfterEventSignal { unsubscribe(callback: (arg: WorldInitializeAfterEvent) => void): void; } +/** + * @beta + */ +export interface BiomeSearchOptions { + boundingSize?: Vector3; +} + /** * Contains optional parameters for registering a block event. */ @@ -13137,7 +13596,6 @@ export interface CompoundBlockVolumeItem { } /** - * @beta * Contains a set of updates to the component definition state * of an entity. */ @@ -13157,6 +13615,7 @@ export interface DefinitionModifier { */ removedComponentGroups: string[]; /** + * @beta * @remarks * The list of entity definition events that will be fired via * this update. @@ -13196,6 +13655,26 @@ export interface DimensionLocation { z: number; } +/** + * @beta + * This interface represents a specific leveled enchantment + * that is applied to an item. + */ +export interface Enchantment { + /** + * @remarks + * The level of this enchantment instance. + * + */ + level: number; + /** + * @remarks + * The enchantment type of this instance. + * + */ + type: EnchantmentType | string; +} + /** * Additional options for when damage has been applied via a * projectile. @@ -13259,7 +13738,6 @@ export interface EntityDamageSource { } /** - * @beta * Specifies additional filters that are used in registering a * data driven trigger event for entities. */ @@ -13657,6 +14135,12 @@ export interface PlayAnimationOptions { * */ nextState?: string; + /** + * @remarks + * A list of players the animation will be visible to. + * + */ + players?: string[]; /** * @remarks * Specifies a Molang expression for when this animation should @@ -13691,6 +14175,13 @@ export interface PlayerSoundOptions { volume?: number; } +/** + * @beta + */ +export interface ProjectileShootOptions { + uncertainty?: number; +} + /** * Defines a JSON structure that is used for more flexible. */ @@ -13798,7 +14289,8 @@ export interface RGB { /** * Represents a fully customizable color within Minecraft. */ -export interface RGBA { +// @ts-ignore Class inheritance allowed for native defined classes +export interface RGBA extends RGB { /** * @remarks * Determines a color's alpha (opacity) component. Valid values @@ -13806,27 +14298,6 @@ export interface RGBA { * */ alpha: number; - /** - * @remarks - * Determines a color's blue component. Valid values are - * between 0 and 1.0. - * - */ - blue: number; - /** - * @remarks - * Determines a color's green component. Valid values are - * between 0 and 1.0. - * - */ - green: number; - /** - * @remarks - * Determines a color's red component. Valid values are between - * 0 and 1.0. - * - */ - red: number; } /** @@ -14005,6 +14476,38 @@ export class CommandError extends Error { private constructor(); } +/** + * @beta + */ +// @ts-ignore Class inheritance allowed for native defined classes +export class EnchantmentLevelOutOfBoundsError extends Error { + private constructor(); +} + +/** + * @beta + */ +// @ts-ignore Class inheritance allowed for native defined classes +export class EnchantmentTypeNotCompatibleError extends Error { + private constructor(); +} + +/** + * @beta + */ +// @ts-ignore Class inheritance allowed for native defined classes +export class EnchantmentTypeUnknownIdError extends Error { + private constructor(); +} + +/** + * @beta + */ +// @ts-ignore Class inheritance allowed for native defined classes +export class InvalidContainerSlotError extends Error { + private constructor(); +} + // @ts-ignore Class inheritance allowed for native defined classes export class LocationInUnloadedChunkError extends Error { private constructor(); diff --git a/node_modules/@minecraft/server/package.json b/node_modules/@minecraft/server/package.json index 667835c..2f0c1b0 100644 --- a/node_modules/@minecraft/server/package.json +++ b/node_modules/@minecraft/server/package.json @@ -1,6 +1,6 @@ { "name": "@minecraft/server", - "version": "1.8.0-beta.1.20.50-stable", + "version": "1.9.0-beta.1.20.60-stable", "description": "", "contributors": [ { diff --git a/node_modules/prettier/LICENSE b/node_modules/prettier/LICENSE index 1c20849..68a3dbe 100644 --- a/node_modules/prettier/LICENSE +++ b/node_modules/prettier/LICENSE @@ -17,7 +17,7 @@ MIT, ISC, BSD-2-Clause, BSD-3-Clause, Apache-2.0 ## Bundled dependencies -### @angular/compiler@v17.0.2 +### @angular/compiler@v17.1.2 > Angular - the compiler library @@ -27,7 +27,7 @@ Author: angular ---------------------------------------- -### @babel/code-frame@v7.22.13 +### @babel/code-frame@v7.23.5 > Generate errors that contain a code frame that point to source locations. @@ -94,7 +94,7 @@ Author: The Babel Team (https://babel.dev/team) ---------------------------------------- -### @babel/highlight@v7.22.13 +### @babel/highlight@v7.23.4 > Syntax highlight JavaScript strings for output in terminals. @@ -128,7 +128,7 @@ Author: The Babel Team (https://babel.dev/team) ---------------------------------------- -### @babel/parser@v7.23.3 +### @babel/parser@v7.23.9 > A JavaScript parser @@ -187,7 +187,7 @@ License: MIT ---------------------------------------- -### @glimmer/syntax@v0.85.12 +### @glimmer/syntax@v0.88.1 > Copyright (c) 2015 Tilde, Inc. > @@ -211,7 +211,7 @@ License: MIT ---------------------------------------- -### @glimmer/util@v0.85.12 +### @glimmer/util@v0.88.1 > Common utilities used in Glimmer @@ -239,7 +239,7 @@ License: MIT ---------------------------------------- -### @glimmer/wire-format@v0.85.12 +### @glimmer/wire-format@v0.88.1 License: MIT @@ -454,7 +454,7 @@ Author: Alex Bell ---------------------------------------- -### @typescript-eslint/types@v6.10.0 +### @typescript-eslint/types@v6.20.0 > Types for the TypeScript-ESTree AST spec @@ -485,7 +485,7 @@ Repository: ---------------------------------------- -### @typescript-eslint/typescript-estree@v6.10.0 +### @typescript-eslint/typescript-estree@v6.20.0 > A parser that converts TypeScript source code into an ESTree compatible form @@ -521,7 +521,7 @@ Repository: ---------------------------------------- -### acorn@v8.11.2 +### acorn@v8.11.3 > ECMAScript parser @@ -583,7 +583,7 @@ Repository: ---------------------------------------- -### angular-estree-parser@v8.0.3 +### angular-estree-parser@v9.0.0 > A parser that converts Angular source code into an ESTree-compatible form @@ -615,7 +615,7 @@ Author: Ika (https://github.com/ikatyang) ---------------------------------------- -### angular-html-parser@v5.0.2 +### angular-html-parser@v5.2.0 > A HTML parser extracted from Angular with some modifications @@ -623,26 +623,26 @@ License: MIT Homepage: Author: Ika (https://github.com/ikatyang) -> MIT License -> -> Copyright (c) Ika (https://github.com/ikatyang) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> MIT License +> +> Copyright (c) Ika (https://github.com/ikatyang) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE > SOFTWARE. ---------------------------------------- @@ -1028,52 +1028,6 @@ Author: Thomas Watson Steen (https://twitter.com/wa7son) ---------------------------------------- -### clone@v1.0.4 - -> deep cloning of objects and arrays - -License: MIT -Repository: -Author: Paul Vorbach (http://paul.vorba.ch/) -Contributors: - - Blake Miner (http://www.blakeminer.com/) - - Tian You (http://blog.axqd.net/) - - George Stagas (http://stagas.com/) - - Tobiasz Cudnik (https://github.com/TobiaszCudnik) - - Pavel Lang (https://github.com/langpavel) - - Dan MacTough (http://yabfog.com/) - - w1nk (https://github.com/w1nk) - - Hugh Kennedy (http://twitter.com/hughskennedy) - - Dustin Diaz (http://dustindiaz.com) - - Ilya Shaisultanov (https://github.com/diversario) - - Nathan MacInnes (http://macinn.es/) - - Benjamin E. Coe (https://twitter.com/benjamincoe) - - Nathan Zadoks (https://github.com/nathan7) - - Róbert Oroszi (https://github.com/oroce) - - Aurélio A. Heckert (http://softwarelivre.org/aurium) - - Guy Ellis (http://www.guyellisrocks.com/) - -> Copyright © 2011-2015 Paul Vorbach -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of -> this software and associated documentation files (the “Software”), to deal in -> the Software without restriction, including without limitation the rights to -> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -> the Software, and to permit persons to whom the Software is furnished to do so, -> subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE -> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----------------------------------------- - ### collapse-white-space@v1.0.6 > Replace multiple white-space characters with a single space @@ -1249,39 +1203,6 @@ Contributors: ---------------------------------------- -### defaults@v1.0.4 - -> merge single level defaults over a config object - -License: MIT -Repository: -Author: Elijah Insua - -> The MIT License (MIT) -> -> Copyright (c) 2022 Sindre Sorhus -> Copyright (c) 2015 Elijah Insua -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ----------------------------------------- - ### diff@v5.1.0 > A javascript text diff implementation. @@ -1439,7 +1360,7 @@ Author: Sindre Sorhus (https://sindresorhus.com) ---------------------------------------- -### espree@v9.6.1 +### espree@v10.0.0 > An Esprima-compatible JavaScript parser built on Acorn @@ -1599,7 +1520,7 @@ Author: Matteo Collina ---------------------------------------- -### file-entry-cache@v7.0.1 +### file-entry-cache@v7.0.2 > Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process @@ -1688,41 +1609,6 @@ Author: Sindre Sorhus (https://sindresorhus.com) ---------------------------------------- -### find-parent-dir@v0.3.1 - -> Finds the first parent directory that contains a given file or directory. - -License: MIT -Homepage: -Repository: -Author: Thorsten Lorenz (http://thlorenz.com) - -> Copyright 2013 Thorsten Lorenz. -> All rights reserved. -> -> Permission is hereby granted, free of charge, to any person -> obtaining a copy of this software and associated documentation -> files (the "Software"), to deal in the Software without -> restriction, including without limitation the rights to use, -> copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the -> Software is furnished to do so, subject to the following -> conditions: -> -> The above copyright notice and this permission notice shall be -> included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -> OTHER DEALINGS IN THE SOFTWARE. - ----------------------------------------- - ### find-up@v6.3.0 > Find a file or directory by walking up parent directories @@ -1742,7 +1628,7 @@ Author: Sindre Sorhus (https://sindresorhus.com) ---------------------------------------- -### flat-cache@v3.1.1 +### flat-cache@v3.2.0 > A stupidly simple key/value storage using files to persist some data @@ -1835,7 +1721,7 @@ Contributors: ---------------------------------------- -### flow-parser@v0.221.0 +### flow-parser@v0.226.0 > JavaScript parser written in OCaml. Produces ESTree AST @@ -2049,7 +1935,7 @@ Author: Sindre Sorhus (sindresorhus.com) ---------------------------------------- -### ignore@v5.2.4 +### ignore@v5.3.1 > Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others. @@ -2630,6 +2516,38 @@ Contributors: ---------------------------------------- +### iterate-directory-up@v1.1.1 + +> Iterate directory up. + +License: MIT +Homepage: +Author: fisker Cheung (https://www.fiskercheung.com/) + +> MIT License +> +> Copyright (c) fisker Cheung (https://www.fiskercheung.com/) +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +---------------------------------------- + ### jest-docblock@v29.7.0 License: MIT @@ -2759,42 +2677,6 @@ Author: Dominic Tarr (http://dominictarr.com) ---------------------------------------- -### json-parse-even-better-errors@v3.0.0 - -> JSON.parse with context information on error - -License: MIT -Repository: -Author: GitHub Inc. - -> Copyright 2017 Kat Marchán -> Copyright npm, Inc. -> -> Permission is hereby granted, free of charge, to any person obtaining a -> copy of this software and associated documentation files (the "Software"), -> to deal in the Software without restriction, including without limitation -> the rights to use, copy, modify, merge, publish, distribute, sublicense, -> and/or sell copies of the Software, and to permit persons to whom the -> Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -> DEALINGS IN THE SOFTWARE. -> -> --- -> -> This library is a fork of 'better-json-errors' by Kat Marchán, extended and -> distributed under the terms of the MIT license above. - ----------------------------------------- - ### json5@v2.2.3 > JSON for Humans @@ -2834,7 +2716,7 @@ Contributors: ---------------------------------------- -### keyv@v4.5.3 +### keyv@v4.5.4 > Simple key-value storage with support for multiple backends @@ -2864,38 +2746,6 @@ Author: Sindre Sorhus (https://sindresorhus.com) ---------------------------------------- -### lilconfig@v2.1.0 - -> A zero-dependency alternative to cosmiconfig - -License: MIT -Repository: -Author: antonk52 - -> MIT License -> -> Copyright (c) 2022 Anton Kastritskiy -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all -> copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - ----------------------------------------- - ### lines-and-columns@v2.0.4 > Maps lines and columns to character offsets and back. @@ -2973,25 +2823,6 @@ Author: Isaac Z. Schlueter ---------------------------------------- -### map-age-cleaner@v0.1.3 - -> Automatically cleanup expired items in a Map - -License: MIT -Author: Sam Verschueren (github.com/SamVerschueren) - -> MIT License -> -> Copyright (c) Sam Verschueren (github.com/SamVerschueren) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----------------------------------------- - ### markdown-escapes@v1.0.4 > List of escapable characters in markdown @@ -3026,25 +2857,6 @@ Contributors: ---------------------------------------- -### mem@v9.0.2 - -> Memoize functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input - -License: MIT -Author: Sindre Sorhus (https://sindresorhus.com) - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----------------------------------------- - ### merge2@v1.4.1 > Merge multiple streams into one stream in sequence or parallel. @@ -3077,7 +2889,7 @@ Repository: ---------------------------------------- -### meriyah@v4.3.8 +### meriyah@v4.3.9 > A 100% compliant, self-hosted javascript parser with high focus on both performance and stability @@ -3146,25 +2958,6 @@ Contributors: ---------------------------------------- -### mimic-fn@v4.0.0 - -> Make a function mimic another one - -License: MIT -Author: Sindre Sorhus (https://sindresorhus.com) - -> MIT License -> -> Copyright (c) Sindre Sorhus (https://sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ----------------------------------------- - ### minimatch@v3.1.2 > a glob matcher in javascript @@ -3252,7 +3045,7 @@ Author: Yoan Arnaudov ---------------------------------------- -### nanoid@v3.3.6 +### nanoid@v3.3.7 > A tiny (116 bytes), secure URL-friendly unique string ID generator @@ -3308,37 +3101,6 @@ Author: Isaac Z. Schlueter (http://blog.izs.me/) ---------------------------------------- -### p-defer@v1.0.0 - -> Create a deferred promise - -License: MIT -Author: Sindre Sorhus (sindresorhus.com) - -> The MIT License (MIT) -> -> Copyright (c) Sindre Sorhus (sindresorhus.com) -> -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. - ----------------------------------------- - ### p-limit@v4.0.0 > Run multiple promise-returning & async functions with limited concurrency @@ -3411,7 +3173,7 @@ Contributors: ---------------------------------------- -### parse-json@v8.0.1 +### parse-json@v8.1.0 > Parse JSON with more helpful errors @@ -3589,7 +3351,7 @@ Author: typicode ---------------------------------------- -### postcss@v8.4.31 +### postcss@v8.4.33 > Tool for transforming styles with JS plugins @@ -4344,7 +4106,7 @@ Contributors: ---------------------------------------- -### ts-api-utils@v1.0.1 +### ts-api-utils@v1.0.3 > Utility functions for working with TypeScript's API. Successor to the wonderful tsutils. @@ -4375,7 +4137,7 @@ Author: Josh Goldberg ---------------------------------------- -### typescript@v5.2.2 +### typescript@v5.3.3 > TypeScript is a language for application scale JavaScript development @@ -4720,7 +4482,7 @@ Contributors: ---------------------------------------- -### url-or-path@v2.1.0 +### url-or-path@v2.3.0 > Convert between file URL and path. @@ -4891,23 +4653,23 @@ Author: Ika (https://github.com/ikatyang) ---------------------------------------- -### wcwidth@v1.0.1 +### wcwidth.js@v1.1.2 -> Port of C's wcwidth() and wcswidth() +> a javascript porting of C's wcwidth() License: MIT -Homepage: -Repository: -Author: Tim Oxley +Homepage: +Repository: +Author: Woong Jun (http://code.woong.org/) Contributors: - - Woong Jun (http://code.woong.org/) + - Tim Oxley (http://campjs.com/) -> wcwidth.js: JavaScript Portng of Markus Kuhn's wcwidth() Implementation -> ======================================================================= +> wcwidth.js: a javascript portng of C's wcwidth() +> ================================================ > -> Copyright (C) 2012 by Jun Woong. +> Copyright (C) 2012-2014 by Woong Jun and Tim Oxley. > -> This package is a JavaScript porting of `wcwidth()` implementation +> This package is a javascript porting of `wcwidth()` implementation > [by Markus Kuhn](http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c). > > Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -4925,12 +4687,12 @@ Contributors: > INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR > OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -> EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -> PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -> BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -> IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -> ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -> POSSIBILITY OF SUCH DAMAGE. +> EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +> OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +> INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +> CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +> IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +> OF SUCH DAMAGE. ---------------------------------------- diff --git a/node_modules/prettier/index.cjs b/node_modules/prettier/index.cjs index dc7abcb..13cbf20 100644 --- a/node_modules/prettier/index.cjs +++ b/node_modules/prettier/index.cjs @@ -33,6 +33,42 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +// src/utils/skip.js +function skip(characters) { + return (text, startIndex, options) => { + const backwards = Boolean(options == null ? void 0 : options.backwards); + if (startIndex === false) { + return false; + } + const { length } = text; + let cursor = startIndex; + while (cursor >= 0 && cursor < length) { + const character = text.charAt(cursor); + if (characters instanceof RegExp) { + if (!characters.test(character)) { + return cursor; + } + } else if (!characters.includes(character)) { + return cursor; + } + backwards ? cursor-- : cursor++; + } + if (cursor === -1 || cursor === length) { + return cursor; + } + return false; + }; +} +var skipWhitespace, skipSpaces, skipToLineEnd, skipEverythingButNewLine; +var init_skip = __esm({ + "src/utils/skip.js"() { + skipWhitespace = skip(/\s/); + skipSpaces = skip(" "); + skipToLineEnd = skip(",; "); + skipEverythingButNewLine = skip(/[^\n\r]/); + } +}); + // src/utils/skip-inline-comment.js function skipInlineComment(text, startIndex) { if (startIndex === false) { @@ -85,42 +121,6 @@ var init_skip_newline = __esm({ } }); -// src/utils/skip.js -function skip(characters) { - return (text, startIndex, options) => { - const backwards = Boolean(options == null ? void 0 : options.backwards); - if (startIndex === false) { - return false; - } - const { length } = text; - let cursor = startIndex; - while (cursor >= 0 && cursor < length) { - const character = text.charAt(cursor); - if (characters instanceof RegExp) { - if (!characters.test(character)) { - return cursor; - } - } else if (!characters.includes(character)) { - return cursor; - } - backwards ? cursor-- : cursor++; - } - if (cursor === -1 || cursor === length) { - return cursor; - } - return false; - }; -} -var skipWhitespace, skipSpaces, skipToLineEnd, skipEverythingButNewLine; -var init_skip = __esm({ - "src/utils/skip.js"() { - skipWhitespace = skip(/\s/); - skipSpaces = skip(" "); - skipToLineEnd = skip(",; "); - skipEverythingButNewLine = skip(/[^\n\r]/); - } -}); - // src/utils/skip-trailing-comment.js function skipTrailingComment(text, startIndex) { if (startIndex === false) { @@ -155,32 +155,14 @@ function getNextNonSpaceNonCommentCharacterIndex(text, startIndex) { var get_next_non_space_non_comment_character_index_default; var init_get_next_non_space_non_comment_character_index = __esm({ "src/utils/get-next-non-space-non-comment-character-index.js"() { + init_skip(); init_skip_inline_comment(); init_skip_newline(); init_skip_trailing_comment(); - init_skip(); get_next_non_space_non_comment_character_index_default = getNextNonSpaceNonCommentCharacterIndex; } }); -// src/utils/is-previous-line-empty.js -function isPreviousLineEmpty(text, startIndex) { - let idx = startIndex - 1; - idx = skipSpaces(text, idx, { backwards: true }); - idx = skip_newline_default(text, idx, { backwards: true }); - idx = skipSpaces(text, idx, { backwards: true }); - const idx2 = skip_newline_default(text, idx, { backwards: true }); - return idx !== idx2; -} -var is_previous_line_empty_default; -var init_is_previous_line_empty = __esm({ - "src/utils/is-previous-line-empty.js"() { - init_skip_newline(); - init_skip(); - is_previous_line_empty_default = isPreviousLineEmpty; - } -}); - // src/utils/has-newline.js function hasNewline(text, startIndex, options = {}) { const idx = skipSpaces( @@ -217,15 +199,112 @@ function isNextLineEmpty(text, startIndex) { var is_next_line_empty_default; var init_is_next_line_empty = __esm({ "src/utils/is-next-line-empty.js"() { - init_skip_newline(); + init_has_newline(); init_skip(); init_skip_inline_comment(); + init_skip_newline(); init_skip_trailing_comment(); - init_has_newline(); is_next_line_empty_default = isNextLineEmpty; } }); +// src/utils/is-previous-line-empty.js +function isPreviousLineEmpty(text, startIndex) { + let idx = startIndex - 1; + idx = skipSpaces(text, idx, { backwards: true }); + idx = skip_newline_default(text, idx, { backwards: true }); + idx = skipSpaces(text, idx, { backwards: true }); + const idx2 = skip_newline_default(text, idx, { backwards: true }); + return idx !== idx2; +} +var is_previous_line_empty_default; +var init_is_previous_line_empty = __esm({ + "src/utils/is-previous-line-empty.js"() { + init_skip(); + init_skip_newline(); + is_previous_line_empty_default = isPreviousLineEmpty; + } +}); + +// src/main/comments/utils.js +function describeNodeForDebugging(node) { + const nodeType = node.type || node.kind || "(unknown type)"; + let nodeName = String( + node.name || node.id && (typeof node.id === "object" ? node.id.name : node.id) || node.key && (typeof node.key === "object" ? node.key.name : node.key) || node.value && (typeof node.value === "object" ? "" : String(node.value)) || node.operator || "" + ); + if (nodeName.length > 20) { + nodeName = nodeName.slice(0, 19) + "\u2026"; + } + return nodeType + (nodeName ? " " + nodeName : ""); +} +function addCommentHelper(node, comment) { + const comments = node.comments ?? (node.comments = []); + comments.push(comment); + comment.printed = false; + comment.nodeDescription = describeNodeForDebugging(node); +} +function addLeadingComment(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); +} +function addDanglingComment(node, comment, marker) { + comment.leading = false; + comment.trailing = false; + if (marker) { + comment.marker = marker; + } + addCommentHelper(node, comment); +} +function addTrailingComment(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); +} +var init_utils = __esm({ + "src/main/comments/utils.js"() { + } +}); + +// src/utils/get-alignment-size.js +function getAlignmentSize(text, tabWidth, startIndex = 0) { + let size = 0; + for (let i = startIndex; i < text.length; ++i) { + if (text[i] === " ") { + size = size + tabWidth - size % tabWidth; + } else { + size++; + } + } + return size; +} +var get_alignment_size_default; +var init_get_alignment_size = __esm({ + "src/utils/get-alignment-size.js"() { + get_alignment_size_default = getAlignmentSize; + } +}); + +// src/utils/get-indent-size.js +function getIndentSize(value, tabWidth) { + const lastNewlineIndex = value.lastIndexOf("\n"); + if (lastNewlineIndex === -1) { + return 0; + } + return get_alignment_size_default( + // All the leading whitespaces + value.slice(lastNewlineIndex + 1).match(/^[\t ]*/)[0], + tabWidth + ); +} +var get_indent_size_default; +var init_get_indent_size = __esm({ + "src/utils/get-indent-size.js"() { + init_get_alignment_size(); + get_indent_size_default = getIndentSize; + } +}); + // node_modules/escape-string-regexp/index.js function escapeStringRegexp(string) { if (typeof string !== "string") { @@ -259,6 +338,19 @@ var init_get_max_continuous_count = __esm({ } }); +// src/utils/get-next-non-space-non-comment-character.js +function getNextNonSpaceNonCommentCharacter(text, startIndex) { + const index = get_next_non_space_non_comment_character_index_default(text, startIndex); + return index === false ? "" : text.charAt(index); +} +var get_next_non_space_non_comment_character_default; +var init_get_next_non_space_non_comment_character = __esm({ + "src/utils/get-next-non-space-non-comment-character.js"() { + init_get_next_non_space_non_comment_character_index(); + get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter; + } +}); + // node_modules/emoji-regex/index.mjs var emoji_regex_default; var init_emoji_regex = __esm({ @@ -322,45 +414,6 @@ var init_get_string_width = __esm({ } }); -// src/utils/get-alignment-size.js -function getAlignmentSize(text, tabWidth, startIndex = 0) { - let size = 0; - for (let i = startIndex; i < text.length; ++i) { - if (text[i] === " ") { - size = size + tabWidth - size % tabWidth; - } else { - size++; - } - } - return size; -} -var get_alignment_size_default; -var init_get_alignment_size = __esm({ - "src/utils/get-alignment-size.js"() { - get_alignment_size_default = getAlignmentSize; - } -}); - -// src/utils/get-indent-size.js -function getIndentSize(value, tabWidth) { - const lastNewlineIndex = value.lastIndexOf("\n"); - if (lastNewlineIndex === -1) { - return 0; - } - return get_alignment_size_default( - // All the leading whitespaces - value.slice(lastNewlineIndex + 1).match(/^[\t ]*/)[0], - tabWidth - ); -} -var get_indent_size_default; -var init_get_indent_size = __esm({ - "src/utils/get-indent-size.js"() { - init_get_alignment_size(); - get_indent_size_default = getIndentSize; - } -}); - // src/utils/has-newline-in-range.js function hasNewlineInRange(text, startIndex, endIndex) { for (let i = startIndex; i < endIndex; ++i) { @@ -394,19 +447,6 @@ var init_has_spaces = __esm({ } }); -// src/utils/get-next-non-space-non-comment-character.js -function getNextNonSpaceNonCommentCharacter(text, startIndex) { - const index = get_next_non_space_non_comment_character_index_default(text, startIndex); - return index === false ? "" : text.charAt(index); -} -var get_next_non_space_non_comment_character_default; -var init_get_next_non_space_non_comment_character = __esm({ - "src/utils/get-next-non-space-non-comment-character.js"() { - init_get_next_non_space_non_comment_character_index(); - get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter; - } -}); - // scripts/build/shims/string-replace-all.js var stringReplaceAll, string_replace_all_default; var init_string_replace_all = __esm({ @@ -459,46 +499,6 @@ var init_make_string = __esm({ } }); -// src/main/comments/utils.js -function describeNodeForDebugging(node) { - const nodeType = node.type || node.kind || "(unknown type)"; - let nodeName = String( - node.name || node.id && (typeof node.id === "object" ? node.id.name : node.id) || node.key && (typeof node.key === "object" ? node.key.name : node.key) || node.value && (typeof node.value === "object" ? "" : String(node.value)) || node.operator || "" - ); - if (nodeName.length > 20) { - nodeName = nodeName.slice(0, 19) + "\u2026"; - } - return nodeType + (nodeName ? " " + nodeName : ""); -} -function addCommentHelper(node, comment) { - const comments = node.comments ?? (node.comments = []); - comments.push(comment); - comment.printed = false; - comment.nodeDescription = describeNodeForDebugging(node); -} -function addLeadingComment(node, comment) { - comment.leading = true; - comment.trailing = false; - addCommentHelper(node, comment); -} -function addDanglingComment(node, comment, marker) { - comment.leading = false; - comment.trailing = false; - if (marker) { - comment.marker = marker; - } - addCommentHelper(node, comment); -} -function addTrailingComment(node, comment) { - comment.leading = false; - comment.trailing = true; - addCommentHelper(node, comment); -} -var init_utils = __esm({ - "src/main/comments/utils.js"() { - } -}); - // src/utils/public.js var public_exports = {}; __export(public_exports, { @@ -563,29 +563,29 @@ function isNextLineEmpty2(text, startIndex) { var init_public = __esm({ "src/utils/public.js"() { init_get_next_non_space_non_comment_character_index(); - init_is_previous_line_empty(); init_is_next_line_empty(); - init_get_max_continuous_count(); - init_get_string_width(); + init_is_previous_line_empty(); + init_utils(); init_get_alignment_size(); init_get_indent_size(); - init_skip_newline(); - init_skip_inline_comment(); - init_skip_trailing_comment(); + init_get_max_continuous_count(); + init_get_next_non_space_non_comment_character(); + init_get_string_width(); init_has_newline(); init_has_newline_in_range(); init_has_spaces(); - init_get_next_non_space_non_comment_character(); init_make_string(); init_skip(); - init_utils(); + init_skip_inline_comment(); + init_skip_newline(); + init_skip_trailing_comment(); } }); // src/main/version.evaluate.cjs var require_version_evaluate = __commonJS({ "src/main/version.evaluate.cjs"(exports2, module2) { - module2.exports = "3.1.0"; + module2.exports = "3.2.5"; } }); diff --git a/node_modules/prettier/index.d.ts b/node_modules/prettier/index.d.ts index 00bc96a..1966d71 100644 --- a/node_modules/prettier/index.d.ts +++ b/node_modules/prettier/index.d.ts @@ -39,9 +39,8 @@ type ArrayProperties = { // A union of the properties of the given array T that can be used to index it. // If the array is a tuple, then that's going to be the explicit indices of the // array, otherwise it's going to just be number. -type IndexProperties = IsTuple extends true - ? Exclude["length"], T["length"]> - : number; +type IndexProperties = + IsTuple extends true ? Exclude["length"], T["length"]> : number; // Effectively performing T[P], except that it's telling TypeScript that it's // safe to do this for tuples, arrays, or objects. @@ -50,8 +49,8 @@ type IndexValue = T extends any[] ? T[P] : never : P extends keyof T - ? T[P] - : never; + ? T[P] + : never; // Determines if an object T is an array like string[] (in which case this // evaluates to false) or a tuple like [string] (in which case this evaluates to @@ -60,8 +59,8 @@ type IndexValue = T extends any[] type IsTuple = T extends [] ? true : T extends [infer First, ...infer Remain] - ? IsTuple - : false; + ? IsTuple + : false; type CallProperties = T extends any[] ? IndexProperties : keyof T; type IterProperties = T extends any[] @@ -291,6 +290,7 @@ export type BuiltInParserName = | "json-stringify" | "json" | "json5" + | "jsonc" | "less" | "lwc" | "markdown" @@ -347,12 +347,6 @@ export interface RequiredOptions extends doc.printer.Options { * @default false */ bracketSameLine: boolean; - /** - * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line. - * @default false - * @deprecated use bracketSameLine instead - */ - jsxBracketSameLine: boolean; /** * Format only a segment of a file. * @default 0 @@ -430,6 +424,22 @@ export interface RequiredOptions extends doc.printer.Options { * @default false */ singleAttributePerLine: boolean; + /** + * Use curious ternaries, with the question mark after the condition, instead + * of on the same line as the consequent. + * @default false + */ + experimentalTernaries: boolean; + /** + * Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line. + * @default false + * @deprecated use bracketSameLine instead + */ + jsxBracketSameLine?: boolean; + /** + * Arbitrary additional values on an options object are always allowed. + */ + [_: string]: unknown; } export interface ParserOptions extends RequiredOptions { @@ -548,8 +558,6 @@ export interface CursorOptions extends Options { * Specify where the cursor is. */ cursorOffset: number; - rangeStart?: never; - rangeEnd?: never; } export interface CursorResult { @@ -572,7 +580,7 @@ export function check(source: string, options?: Options): Promise; * `formatWithCursor` both formats the code, and translates a cursor position from unformatted code to formatted code. * This is useful for editor integrations, to prevent the cursor from moving when code is formatted. * - * The `cursorOffset` option should be provided, to specify where the cursor is. This option cannot be used with `rangeStart` and `rangeEnd`. + * The `cursorOffset` option should be provided, to specify where the cursor is. */ export function formatWithCursor( source: string, @@ -782,7 +790,7 @@ export interface SupportInfo { export interface FileInfoOptions { ignorePath?: string | URL | (string | URL)[] | undefined; withNodeModules?: boolean | undefined; - plugins?: string[] | undefined; + plugins?: Array | undefined; resolveConfig?: boolean | undefined; } @@ -796,10 +804,17 @@ export function getFileInfo( options?: FileInfoOptions, ): Promise; +export interface SupportInfoOptions { + plugins?: Array | undefined; + showDeprecated?: boolean | undefined; +} + /** * Returns an object representing the parsers, languages and file types Prettier supports for the current version. */ -export function getSupportInfo(): Promise; +export function getSupportInfo( + options?: SupportInfoOptions, +): Promise; /** * `version` field in `package.json` diff --git a/node_modules/prettier/index.mjs b/node_modules/prettier/index.mjs index b555b90..38036fa 100644 --- a/node_modules/prettier/index.mjs +++ b/node_modules/prettier/index.mjs @@ -11,7 +11,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; +var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) { @@ -28,9 +28,9 @@ var __export = (target, all) => { }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + for (let key2 of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key2) && key2 !== except) + __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable }); } return to; }; @@ -42,8 +42,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); +var __publicField = (obj, key2, value) => { + __defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value); return value; }; var __accessCheck = (obj, member, msg) => { @@ -141,7 +141,7 @@ var require_path = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0; var os2 = __require("os"); - var path9 = __require("path"); + var path13 = __require("path"); var IS_WINDOWS_PLATFORM = os2.platform() === "win32"; var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; @@ -153,7 +153,7 @@ var require_path = __commonJS({ } exports.unixify = unixify; function makeAbsolute(cwd, filepath) { - return path9.resolve(cwd, filepath); + return path13.resolve(cwd, filepath); } exports.makeAbsolute = makeAbsolute; function removeLeadingDotSegment(entry) { @@ -190,15 +190,15 @@ var require_path = __commonJS({ // node_modules/is-extglob/index.js var require_is_extglob = __commonJS({ "node_modules/is-extglob/index.js"(exports, module) { - module.exports = function isExtglob(str) { - if (typeof str !== "string" || str === "") { + module.exports = function isExtglob(str2) { + if (typeof str2 !== "string" || str2 === "") { return false; } var match; - while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str)) { + while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { if (match[2]) return true; - str = str.slice(match.index + match[0].length); + str2 = str2.slice(match.index + match[0].length); } return false; }; @@ -210,8 +210,8 @@ var require_is_glob = __commonJS({ "node_modules/is-glob/index.js"(exports, module) { var isExtglob = require_is_extglob(); var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = function(str) { - if (str[0] === "!") { + var strictCheck = function(str2) { + if (str2[0] === "!") { return true; } var index = 0; @@ -220,70 +220,70 @@ var require_is_glob = __commonJS({ var closeCurlyIndex = -2; var closeParenIndex = -2; var backSlashIndex = -2; - while (index < str.length) { - if (str[index] === "*") { + while (index < str2.length) { + if (str2[index] === "*") { return true; } - if (str[index + 1] === "?" && /[\].+)]/.test(str[index])) { + if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { return true; } - if (closeSquareIndex !== -1 && str[index] === "[" && str[index + 1] !== "]") { + if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { if (closeSquareIndex < index) { - closeSquareIndex = str.indexOf("]", index); + closeSquareIndex = str2.indexOf("]", index); } if (closeSquareIndex > index) { if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { return true; } - backSlashIndex = str.indexOf("\\", index); + backSlashIndex = str2.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { return true; } } } - if (closeCurlyIndex !== -1 && str[index] === "{" && str[index + 1] !== "}") { - closeCurlyIndex = str.indexOf("}", index); + if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { + closeCurlyIndex = str2.indexOf("}", index); if (closeCurlyIndex > index) { - backSlashIndex = str.indexOf("\\", index); + backSlashIndex = str2.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { return true; } } } - if (closeParenIndex !== -1 && str[index] === "(" && str[index + 1] === "?" && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ")") { - closeParenIndex = str.indexOf(")", index); + if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && str2[index + 3] !== ")") { + closeParenIndex = str2.indexOf(")", index); if (closeParenIndex > index) { - backSlashIndex = str.indexOf("\\", index); + backSlashIndex = str2.indexOf("\\", index); if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { return true; } } } - if (pipeIndex !== -1 && str[index] === "(" && str[index + 1] !== "|") { + if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { if (pipeIndex < index) { - pipeIndex = str.indexOf("|", index); + pipeIndex = str2.indexOf("|", index); } - if (pipeIndex !== -1 && str[pipeIndex + 1] !== ")") { - closeParenIndex = str.indexOf(")", pipeIndex); + if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { + closeParenIndex = str2.indexOf(")", pipeIndex); if (closeParenIndex > pipeIndex) { - backSlashIndex = str.indexOf("\\", pipeIndex); + backSlashIndex = str2.indexOf("\\", pipeIndex); if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { return true; } } } } - if (str[index] === "\\") { - var open = str[index + 1]; + if (str2[index] === "\\") { + var open = str2[index + 1]; index += 2; var close = chars[open]; if (close) { - var n = str.indexOf(close, index); + var n = str2.indexOf(close, index); if (n !== -1) { index = n + 1; } } - if (str[index] === "!") { + if (str2[index] === "!") { return true; } } else { @@ -292,26 +292,26 @@ var require_is_glob = __commonJS({ } return false; }; - var relaxedCheck = function(str) { - if (str[0] === "!") { + var relaxedCheck = function(str2) { + if (str2[0] === "!") { return true; } var index = 0; - while (index < str.length) { - if (/[*?{}()[\]]/.test(str[index])) { + while (index < str2.length) { + if (/[*?{}()[\]]/.test(str2[index])) { return true; } - if (str[index] === "\\") { - var open = str[index + 1]; + if (str2[index] === "\\") { + var open = str2[index + 1]; index += 2; var close = chars[open]; if (close) { - var n = str.indexOf(close, index); + var n = str2.indexOf(close, index); if (n !== -1) { index = n + 1; } } - if (str[index] === "!") { + if (str2[index] === "!") { return true; } } else { @@ -320,18 +320,18 @@ var require_is_glob = __commonJS({ } return false; }; - module.exports = function isGlob(str, options8) { - if (typeof str !== "string" || str === "") { + module.exports = function isGlob(str2, options8) { + if (typeof str2 !== "string" || str2 === "") { return false; } - if (isExtglob(str)) { + if (isExtglob(str2)) { return true; } var check2 = strictCheck; if (options8 && options8.strict === false) { check2 = relaxedCheck; } - return check2(str); + return check2(str2); }; } }); @@ -348,19 +348,19 @@ var require_glob_parent = __commonJS({ var enclosure = /[\{\[].*[\}\]]$/; var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module.exports = function globParent(str, opts) { + module.exports = function globParent(str2, opts) { var options8 = Object.assign({ flipBackslashes: true }, opts); - if (options8.flipBackslashes && isWin32 && str.indexOf(slash2) < 0) { - str = str.replace(backslash, slash2); + if (options8.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { + str2 = str2.replace(backslash, slash2); } - if (enclosure.test(str)) { - str += slash2; + if (enclosure.test(str2)) { + str2 += slash2; } - str += "a"; + str2 += "a"; do { - str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); - return str.replace(escaped, "$1"); + str2 = pathPosixDirname(str2); + } while (isGlob(str2) || globby.test(str2)); + return str2.replace(escaped, "$1"); }; } }); @@ -378,7 +378,7 @@ var require_utils = __commonJS({ } return false; }; - exports.find = (node, type) => node.nodes.find((node2) => node2.type === type); + exports.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); exports.exceedsLimit = (min, max, step = 1, limit) => { if (limit === false) return false; @@ -386,11 +386,11 @@ var require_utils = __commonJS({ return false; return (Number(max) - Number(min)) / Number(step) >= limit; }; - exports.escapeNode = (block, n = 0, type) => { + exports.escapeNode = (block, n = 0, type2) => { let node = block.nodes[n]; if (!node) return; - if (type && node.type === type || node.type === "open" || node.type === "close") { + if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { if (node.escaped !== true) { node.value = "\\" + node.value; node.escaped = true; @@ -562,10 +562,10 @@ var require_to_regex_range = __commonJS({ toRegexRange.cache[cacheKey] = state; return state.result; }; - function collatePatterns(neg, pos, options8) { - let onlyNegative = filterPatterns(neg, pos, "-", false, options8) || []; - let onlyPositive = filterPatterns(pos, neg, "", false, options8) || []; - let intersected = filterPatterns(neg, pos, "-?", true, options8) || []; + function collatePatterns(neg, pos2, options8) { + let onlyNegative = filterPatterns(neg, pos2, "-", false, options8) || []; + let onlyPositive = filterPatterns(pos2, neg, "", false, options8) || []; + let intersected = filterPatterns(neg, pos2, "-?", true, options8) || []; let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); return subpatterns.join("|"); } @@ -662,8 +662,8 @@ var require_to_regex_range = __commonJS({ function compare(a, b) { return a > b ? 1 : b > a ? -1 : 0; } - function contains(arr, key, val) { - return arr.some((ele) => ele[key] === val); + function contains(arr, key2, val) { + return arr.some((ele) => ele[key2] === val); } function countNines(min, len) { return Number(String(min).slice(0, -len) + "9".repeat(len)); @@ -681,8 +681,8 @@ var require_to_regex_range = __commonJS({ function toCharacterClass(a, b, options8) { return `[${a}${b - a === 1 ? "" : "-"}${b}]`; } - function hasPadding(str) { - return /^-?(0+)\d/.test(str); + function hasPadding(str2) { + return /^-?(0+)\d/.test(str2); } function padZeros(value, tok, options8) { if (!tok.isPadded) { @@ -712,10 +712,10 @@ var require_to_regex_range = __commonJS({ var require_fill_range = __commonJS({ "node_modules/fill-range/index.js"(exports, module) { "use strict"; - var util = __require("util"); + var util2 = __require("util"); var toRegexRange = require_to_regex_range(); - var isObject2 = (val) => val !== null && typeof val === "object" && !Array.isArray(val); - var transform2 = (toNumber) => { + var isObject3 = (val) => val !== null && typeof val === "object" && !Array.isArray(val); + var transform = (toNumber) => { return (value) => toNumber === true ? Number(value) : String(value); }; var isValidValue = (value) => { @@ -803,7 +803,7 @@ var require_fill_range = __commonJS({ return toRegexRange(start, end, options8); }; var rangeError = (...args) => { - return new RangeError("Invalid range arguments: " + util.inspect(...args)); + return new RangeError("Invalid range arguments: " + util2.inspect(...args)); }; var invalidRange = (start, end, options8) => { if (options8.strictRanges === true) @@ -836,17 +836,17 @@ var require_fill_range = __commonJS({ let padded = zeros(startString) || zeros(endString) || zeros(stepString); let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; let toNumber = padded === false && stringify(start, end, options8) === false; - let format3 = options8.transform || transform2(toNumber); + let format3 = options8.transform || transform(toNumber); if (options8.toRegex && step === 1) { return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options8); } let parts = { negatives: [], positives: [] }; - let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); + let push2 = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); let range = []; let index = 0; while (descending ? a >= b : a <= b) { if (options8.toRegex === true && step > 1) { - push(a); + push2(a); } else { range.push(pad(format3(a, index), maxLen, toNumber)); } @@ -893,7 +893,7 @@ var require_fill_range = __commonJS({ if (typeof step === "function") { return fill2(start, end, 1, { transform: step }); } - if (isObject2(step)) { + if (isObject3(step)) { return fill2(start, end, 0, step); } let opts = { ...options8 }; @@ -901,7 +901,7 @@ var require_fill_range = __commonJS({ opts.wrap = true; step = step || opts.step || 1; if (!isNumber(step)) { - if (step != null && !isObject2(step)) + if (step != null && !isObject3(step)) return invalidStep(step, opts); return fill2(start, end, 1, step); } @@ -1197,7 +1197,7 @@ var require_parse = __commonJS({ CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = require_constants(); - var parse3 = (input, options8 = {}) => { + var parse6 = (input, options8 = {}) => { if (typeof input !== "string") { throw new TypeError("Expected a string"); } @@ -1207,7 +1207,7 @@ var require_parse = __commonJS({ throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); } let ast = { type: "root", input, nodes: [] }; - let stack = [ast]; + let stack2 = [ast]; let block = ast; let prev = ast; let brackets = 0; @@ -1217,7 +1217,7 @@ var require_parse = __commonJS({ let value; let memo = {}; const advance = () => input[index++]; - const push = (node) => { + const push2 = (node) => { if (node.type === "text" && prev.type === "dot") { prev.type = "text"; } @@ -1231,19 +1231,19 @@ var require_parse = __commonJS({ prev = node; return node; }; - push({ type: "bos" }); + push2({ type: "bos" }); while (index < length) { - block = stack[stack.length - 1]; + block = stack2[stack2.length - 1]; value = advance(); if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { continue; } if (value === CHAR_BACKSLASH) { - push({ type: "text", value: (options8.keepEscaping ? value : "") + advance() }); + push2({ type: "text", value: (options8.keepEscaping ? value : "") + advance() }); continue; } if (value === CHAR_RIGHT_SQUARE_BRACKET) { - push({ type: "text", value: "\\" + value }); + push2({ type: "text", value: "\\" + value }); continue; } if (value === CHAR_LEFT_SQUARE_BRACKET) { @@ -1267,23 +1267,23 @@ var require_parse = __commonJS({ } } } - push({ type: "text", value }); + push2({ type: "text", value }); continue; } if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: "paren", nodes: [] }); - stack.push(block); - push({ type: "text", value }); + block = push2({ type: "paren", nodes: [] }); + stack2.push(block); + push2({ type: "text", value }); continue; } if (value === CHAR_RIGHT_PARENTHESES) { if (block.type !== "paren") { - push({ type: "text", value }); + push2({ type: "text", value }); continue; } - block = stack.pop(); - push({ type: "text", value }); - block = stack[stack.length - 1]; + block = stack2.pop(); + push2({ type: "text", value }); + block = stack2[stack2.length - 1]; continue; } if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) { @@ -1304,7 +1304,7 @@ var require_parse = __commonJS({ } value += next; } - push({ type: "text", value }); + push2({ type: "text", value }); continue; } if (value === CHAR_LEFT_CURLY_BRACE) { @@ -1320,22 +1320,22 @@ var require_parse = __commonJS({ ranges: 0, nodes: [] }; - block = push(brace); - stack.push(block); - push({ type: "open", value }); + block = push2(brace); + stack2.push(block); + push2({ type: "open", value }); continue; } if (value === CHAR_RIGHT_CURLY_BRACE) { if (block.type !== "brace") { - push({ type: "text", value }); + push2({ type: "text", value }); continue; } - let type = "close"; - block = stack.pop(); + let type2 = "close"; + block = stack2.pop(); block.close = true; - push({ type, value }); + push2({ type: type2, value }); depth--; - block = stack[stack.length - 1]; + block = stack2[stack2.length - 1]; continue; } if (value === CHAR_COMMA && depth > 0) { @@ -1344,14 +1344,14 @@ var require_parse = __commonJS({ let open = block.nodes.shift(); block.nodes = [open, { type: "text", value: stringify(block) }]; } - push({ type: "comma", value }); + push2({ type: "comma", value }); block.commas++; continue; } if (value === CHAR_DOT && depth > 0 && block.commas === 0) { let siblings = block.nodes; if (depth === 0 || siblings.length === 0) { - push({ type: "text", value }); + push2({ type: "text", value }); continue; } if (prev.type === "dot") { @@ -1376,13 +1376,13 @@ var require_parse = __commonJS({ block.ranges--; continue; } - push({ type: "dot", value }); + push2({ type: "dot", value }); continue; } - push({ type: "text", value }); + push2({ type: "text", value }); } do { - block = stack.pop(); + block = stack2.pop(); if (block.type !== "root") { block.nodes.forEach((node) => { if (!node.nodes) { @@ -1395,15 +1395,15 @@ var require_parse = __commonJS({ node.invalid = true; } }); - let parent = stack[stack.length - 1]; + let parent = stack2[stack2.length - 1]; let index2 = parent.nodes.indexOf(block); parent.nodes.splice(index2, 1, ...block.nodes); } - } while (stack.length > 0); - push({ type: "eos" }); + } while (stack2.length > 0); + push2({ type: "eos" }); return ast; }; - module.exports = parse3; + module.exports = parse6; } }); @@ -1414,7 +1414,7 @@ var require_braces = __commonJS({ var stringify = require_stringify(); var compile = require_compile(); var expand = require_expand(); - var parse3 = require_parse(); + var parse6 = require_parse(); var braces = (input, options8 = {}) => { let output = []; if (Array.isArray(input)) { @@ -1434,7 +1434,7 @@ var require_braces = __commonJS({ } return output; }; - braces.parse = (input, options8 = {}) => parse3(input, options8); + braces.parse = (input, options8 = {}) => parse6(input, options8); braces.stringify = (input, options8 = {}) => { if (typeof input === "string") { return stringify(braces.parse(input, options8), options8); @@ -1474,7 +1474,7 @@ var require_braces = __commonJS({ var require_constants2 = __commonJS({ "node_modules/picomatch/lib/constants.js"(exports, module) { "use strict"; - var path9 = __require("path"); + var path13 = __require("path"); var WIN_SLASH = "\\\\/"; var WIN_NO_SLASH = `[^${WIN_SLASH}]`; var DOT_LITERAL = "\\."; @@ -1644,7 +1644,7 @@ var require_constants2 = __commonJS({ /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - SEP: path9.sep, + SEP: path13.sep, /** * Create EXTGLOB_CHARS */ @@ -1671,7 +1671,7 @@ var require_constants2 = __commonJS({ var require_utils2 = __commonJS({ "node_modules/picomatch/lib/utils.js"(exports) { "use strict"; - var path9 = __require("path"); + var path13 = __require("path"); var win32 = process.platform === "win32"; var { REGEX_BACKSLASH, @@ -1680,12 +1680,12 @@ var require_utils2 = __commonJS({ REGEX_SPECIAL_CHARS_GLOBAL } = require_constants2(); exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); - exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str); - exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str); - exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/"); - exports.removeBackslashes = (str) => { - return str.replace(REGEX_REMOVE_BACKSLASH, (match) => { + exports.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); + exports.isRegexChar = (str2) => str2.length === 1 && exports.hasRegexChars(str2); + exports.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); + exports.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); + exports.removeBackslashes = (str2) => { + return str2.replace(REGEX_REMOVE_BACKSLASH, (match) => { return match === "\\" ? "" : match; }); }; @@ -1700,7 +1700,7 @@ var require_utils2 = __commonJS({ if (options8 && typeof options8.windows === "boolean") { return options8.windows; } - return win32 === true || path9.sep === "\\"; + return win32 === true || path13.sep === "\\"; }; exports.escapeLast = (input, char, lastIdx) => { const idx = input.lastIndexOf(char, lastIdx); @@ -1770,9 +1770,9 @@ var require_scan = __commonJS({ var isPathSeparator = (code) => { return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; }; - var depth = (token) => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; + var depth = (token2) => { + if (token2.isPrefix !== true) { + token2.depth = token2.isGlobstar ? Infinity : 1; } }; var scan = (input, options8) => { @@ -1782,7 +1782,7 @@ var require_scan = __commonJS({ const slashes = []; const tokens = []; const parts = []; - let str = input; + let str2 = input; let index = -1; let start = 0; let lastIndex = 0; @@ -1799,18 +1799,18 @@ var require_scan = __commonJS({ let braces = 0; let prev; let code; - let token = { value: "", depth: 0, isGlob: false }; + let token2 = { value: "", depth: 0, isGlob: false }; const eos = () => index >= length; - const peek = () => str.charCodeAt(index + 1); + const peek2 = () => str2.charCodeAt(index + 1); const advance = () => { prev = code; - return str.charCodeAt(++index); + return str2.charCodeAt(++index); }; while (index < length) { code = advance(); let next; if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; + backslashes = token2.backslashes = true; code = advance(); if (code === CHAR_LEFT_CURLY_BRACE) { braceEscaped = true; @@ -1821,7 +1821,7 @@ var require_scan = __commonJS({ braces++; while (eos() !== true && (code = advance())) { if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; + backslashes = token2.backslashes = true; advance(); continue; } @@ -1830,8 +1830,8 @@ var require_scan = __commonJS({ continue; } if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; + isBrace = token2.isBrace = true; + isGlob = token2.isGlob = true; finished = true; if (scanToEnd === true) { continue; @@ -1839,8 +1839,8 @@ var require_scan = __commonJS({ break; } if (braceEscaped !== true && code === CHAR_COMMA) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; + isBrace = token2.isBrace = true; + isGlob = token2.isGlob = true; finished = true; if (scanToEnd === true) { continue; @@ -1851,7 +1851,7 @@ var require_scan = __commonJS({ braces--; if (braces === 0) { braceEscaped = false; - isBrace = token.isBrace = true; + isBrace = token2.isBrace = true; finished = true; break; } @@ -1864,8 +1864,8 @@ var require_scan = __commonJS({ } if (code === CHAR_FORWARD_SLASH) { slashes.push(index); - tokens.push(token); - token = { value: "", depth: 0, isGlob: false }; + tokens.push(token2); + token2 = { value: "", depth: 0, isGlob: false }; if (finished === true) continue; if (prev === CHAR_DOT && index === start + 1) { @@ -1877,9 +1877,9 @@ var require_scan = __commonJS({ } if (opts.noext !== true) { const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; + if (isExtglobChar === true && peek2() === CHAR_LEFT_PARENTHESES) { + isGlob = token2.isGlob = true; + isExtglob = token2.isExtglob = true; finished = true; if (code === CHAR_EXCLAMATION_MARK && index === start) { negatedExtglob = true; @@ -1887,12 +1887,12 @@ var require_scan = __commonJS({ if (scanToEnd === true) { while (eos() !== true && (code = advance())) { if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; + backslashes = token2.backslashes = true; code = advance(); continue; } if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob = token2.isGlob = true; finished = true; break; } @@ -1904,8 +1904,8 @@ var require_scan = __commonJS({ } if (code === CHAR_ASTERISK) { if (prev === CHAR_ASTERISK) - isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; + isGlobstar = token2.isGlobstar = true; + isGlob = token2.isGlob = true; finished = true; if (scanToEnd === true) { continue; @@ -1913,7 +1913,7 @@ var require_scan = __commonJS({ break; } if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; + isGlob = token2.isGlob = true; finished = true; if (scanToEnd === true) { continue; @@ -1923,13 +1923,13 @@ var require_scan = __commonJS({ if (code === CHAR_LEFT_SQUARE_BRACKET) { while (eos() !== true && (next = advance())) { if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; + backslashes = token2.backslashes = true; advance(); continue; } if (next === CHAR_RIGHT_SQUARE_BRACKET) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; + isBracket = token2.isBracket = true; + isGlob = token2.isGlob = true; finished = true; break; } @@ -1940,16 +1940,16 @@ var require_scan = __commonJS({ break; } if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; + negated = token2.negated = true; start++; continue; } if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob = token2.isGlob = true; if (scanToEnd === true) { while (eos() !== true && (code = advance())) { if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; + backslashes = token2.backslashes = true; code = advance(); continue; } @@ -1974,24 +1974,24 @@ var require_scan = __commonJS({ isExtglob = false; isGlob = false; } - let base = str; + let base = str2; let prefix = ""; let glob = ""; if (start > 0) { - prefix = str.slice(0, start); - str = str.slice(start); + prefix = str2.slice(0, start); + str2 = str2.slice(start); lastIndex -= start; } if (base && isGlob === true && lastIndex > 0) { - base = str.slice(0, lastIndex); - glob = str.slice(lastIndex); + base = str2.slice(0, lastIndex); + glob = str2.slice(lastIndex); } else if (isGlob === true) { base = ""; - glob = str; + glob = str2; } else { - base = str; + base = str2; } - if (base && base !== "" && base !== "/" && base !== str) { + if (base && base !== "" && base !== "/" && base !== str2) { if (isPathSeparator(base.charCodeAt(base.length - 1))) { base = base.slice(0, -1); } @@ -2020,7 +2020,7 @@ var require_scan = __commonJS({ if (opts.tokens === true) { state.maxDepth = 0; if (!isPathSeparator(code)) { - tokens.push(token); + tokens.push(token2); } state.tokens = tokens; } @@ -2089,10 +2089,10 @@ var require_parse2 = __commonJS({ } return value; }; - var syntaxError = (type, char) => { - return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`; + var syntaxError2 = (type2, char) => { + return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; }; - var parse3 = (input, options8) => { + var parse6 = (input, options8) => { if (typeof input !== "string") { throw new TypeError("Expected a string"); } @@ -2156,24 +2156,24 @@ var require_parse2 = __commonJS({ len = input.length; const extglobs = []; const braces = []; - const stack = []; + const stack2 = []; let prev = bos; let value; const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; + const peek2 = state.peek = (n = 1) => input[state.index + n]; const advance = state.advance = () => input[++state.index] || ""; const remaining = () => input.slice(state.index + 1); const consume = (value2 = "", num = 0) => { state.consumed += value2; state.index += num; }; - const append = (token) => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); + const append = (token2) => { + state.output += token2.output != null ? token2.output : token2.value; + consume(token2.value); }; const negate = () => { let count = 1; - while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { + while (peek2() === "!" && (peek2(2) !== "(" || peek2(3) === "?")) { advance(); state.start++; count++; @@ -2185,15 +2185,15 @@ var require_parse2 = __commonJS({ state.start++; return true; }; - const increment = (type) => { - state[type]++; - stack.push(type); + const increment = (type2) => { + state[type2]++; + stack2.push(type2); }; - const decrement = (type) => { - state[type]--; - stack.pop(); + const decrement = (type2) => { + state[type2]--; + stack2.pop(); }; - const push = (tok) => { + const push2 = (tok) => { if (prev.type === "globstar") { const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); @@ -2219,37 +2219,37 @@ var require_parse2 = __commonJS({ tokens.push(tok); prev = tok; }; - const extglobOpen = (type, value2) => { - const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? "(" : "") + token.open; + const extglobOpen = (type2, value2) => { + const token2 = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; + token2.prev = prev; + token2.parens = state.parens; + token2.output = state.output; + const output = (opts.capture ? "(" : "") + token2.open; increment("parens"); - push({ type, value: value2, output: state.output ? "" : ONE_CHAR }); - push({ type: "paren", extglob: true, value: advance(), output }); - extglobs.push(token); + push2({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR }); + push2({ type: "paren", extglob: true, value: advance(), output }); + extglobs.push(token2); }; - const extglobClose = (token) => { - let output = token.close + (opts.capture ? ")" : ""); + const extglobClose = (token2) => { + let output = token2.close + (opts.capture ? ")" : ""); let rest; - if (token.type === "negate") { + if (token2.type === "negate") { let extglobStar = star; - if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { + if (token2.inner && token2.inner.length > 1 && token2.inner.includes("/")) { extglobStar = globstar(opts); } if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; + output = token2.close = `)$))${extglobStar}`; } - if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - const expression = parse3(rest, { ...options8, fastpaths: false }).output; - output = token.close = `)${expression})${extglobStar})`; + if (token2.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { + const expression = parse6(rest, { ...options8, fastpaths: false }).output; + output = token2.close = `)${expression})${extglobStar})`; } - if (token.prev.type === "bos") { + if (token2.prev.type === "bos") { state.negatedExtglob = true; } } - push({ type: "paren", extglob: true, value, output }); + push2({ type: "paren", extglob: true, value, output }); decrement("parens"); }; if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { @@ -2301,7 +2301,7 @@ var require_parse2 = __commonJS({ continue; } if (value === "\\") { - const next = peek(); + const next = peek2(); if (next === "/" && opts.bash !== true) { continue; } @@ -2310,7 +2310,7 @@ var require_parse2 = __commonJS({ } if (!next) { value += "\\"; - push({ type: "text", value }); + push2({ type: "text", value }); continue; } const match = /^\\+/.exec(remaining()); @@ -2328,7 +2328,7 @@ var require_parse2 = __commonJS({ value += advance(); } if (state.brackets === 0) { - push({ type: "text", value }); + push2({ type: "text", value }); continue; } } @@ -2354,7 +2354,7 @@ var require_parse2 = __commonJS({ } } } - if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { + if (value === "[" && peek2() !== ":" || value === "-" && peek2() === "]") { value = `\\${value}`; } if (value === "]" && (prev.value === "[" || prev.value === "[^")) { @@ -2376,50 +2376,50 @@ var require_parse2 = __commonJS({ if (value === '"') { state.quotes = state.quotes === 1 ? 0 : 1; if (opts.keepQuotes === true) { - push({ type: "text", value }); + push2({ type: "text", value }); } continue; } if (value === "(") { increment("parens"); - push({ type: "paren", value }); + push2({ type: "paren", value }); continue; } if (value === ")") { if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "(")); + throw new SyntaxError(syntaxError2("opening", "(")); } const extglob = extglobs[extglobs.length - 1]; if (extglob && state.parens === extglob.parens + 1) { extglobClose(extglobs.pop()); continue; } - push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); + push2({ type: "paren", value, output: state.parens ? ")" : "\\)" }); decrement("parens"); continue; } if (value === "[") { if (opts.nobracket === true || !remaining().includes("]")) { if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("closing", "]")); + throw new SyntaxError(syntaxError2("closing", "]")); } value = `\\${value}`; } else { increment("brackets"); } - push({ type: "bracket", value }); + push2({ type: "bracket", value }); continue; } if (value === "]") { if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { - push({ type: "text", value, output: `\\${value}` }); + push2({ type: "text", value, output: `\\${value}` }); continue; } if (state.brackets === 0) { if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "[")); + throw new SyntaxError(syntaxError2("opening", "[")); } - push({ type: "text", value, output: `\\${value}` }); + push2({ type: "text", value, output: `\\${value}` }); continue; } decrement("brackets"); @@ -2453,13 +2453,13 @@ var require_parse2 = __commonJS({ tokensIndex: state.tokens.length }; braces.push(open); - push(open); + push2(open); continue; } if (value === "}") { const brace = braces[braces.length - 1]; if (opts.nobrace === true || !brace) { - push({ type: "text", value, output: value }); + push2({ type: "text", value, output: value }); continue; } let output = ")"; @@ -2488,7 +2488,7 @@ var require_parse2 = __commonJS({ state.output += t.output || t.value; } } - push({ type: "brace", value, output }); + push2({ type: "brace", value, output }); decrement("braces"); braces.pop(); continue; @@ -2497,17 +2497,17 @@ var require_parse2 = __commonJS({ if (extglobs.length > 0) { extglobs[extglobs.length - 1].conditions++; } - push({ type: "text", value }); + push2({ type: "text", value }); continue; } if (value === ",") { let output = value; const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === "braces") { + if (brace && stack2[stack2.length - 1] === "braces") { brace.comma = true; output = "|"; } - push({ type: "comma", value, output }); + push2({ type: "comma", value, output }); continue; } if (value === "/") { @@ -2519,7 +2519,7 @@ var require_parse2 = __commonJS({ prev = bos; continue; } - push({ type: "slash", value, output: SLASH_LITERAL }); + push2({ type: "slash", value, output: SLASH_LITERAL }); continue; } if (value === ".") { @@ -2534,20 +2534,20 @@ var require_parse2 = __commonJS({ continue; } if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { - push({ type: "text", value, output: DOT_LITERAL }); + push2({ type: "text", value, output: DOT_LITERAL }); continue; } - push({ type: "dot", value, output: DOT_LITERAL }); + push2({ type: "dot", value, output: DOT_LITERAL }); continue; } if (value === "?") { const isGroup = prev && prev.value === "("; - if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + if (!isGroup && opts.noextglob !== true && peek2() === "(" && peek2(2) !== "?") { extglobOpen("qmark", value); continue; } if (prev && prev.type === "paren") { - const next = peek(); + const next = peek2(); let output = value; if (next === "<" && !utils.supportsLookbehinds()) { throw new Error("Node.js v10 or higher is required for regex lookbehinds"); @@ -2555,19 +2555,19 @@ var require_parse2 = __commonJS({ if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { output = `\\${value}`; } - push({ type: "text", value, output }); + push2({ type: "text", value, output }); continue; } if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { - push({ type: "qmark", value, output: QMARK_NO_DOT }); + push2({ type: "qmark", value, output: QMARK_NO_DOT }); continue; } - push({ type: "qmark", value, output: QMARK }); + push2({ type: "qmark", value, output: QMARK }); continue; } if (value === "!") { - if (opts.noextglob !== true && peek() === "(") { - if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { + if (opts.noextglob !== true && peek2() === "(") { + if (peek2(2) !== "?" || !/[!=<:]/.test(peek2(3))) { extglobOpen("negate", value); continue; } @@ -2578,27 +2578,27 @@ var require_parse2 = __commonJS({ } } if (value === "+") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { + if (opts.noextglob !== true && peek2() === "(" && peek2(2) !== "?") { extglobOpen("plus", value); continue; } if (prev && prev.value === "(" || opts.regex === false) { - push({ type: "plus", value, output: PLUS_LITERAL }); + push2({ type: "plus", value, output: PLUS_LITERAL }); continue; } if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { - push({ type: "plus", value }); + push2({ type: "plus", value }); continue; } - push({ type: "plus", value: PLUS_LITERAL }); + push2({ type: "plus", value: PLUS_LITERAL }); continue; } if (value === "@") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - push({ type: "at", extglob: true, value, output: "" }); + if (opts.noextglob !== true && peek2() === "(" && peek2(2) !== "?") { + push2({ type: "at", extglob: true, value, output: "" }); continue; } - push({ type: "text", value }); + push2({ type: "text", value }); continue; } if (value !== "*") { @@ -2610,7 +2610,7 @@ var require_parse2 = __commonJS({ value += match[0]; state.index += match[0].length; } - push({ type: "text", value }); + push2({ type: "text", value }); continue; } if (prev && (prev.type === "globstar" || prev.star === true)) { @@ -2638,13 +2638,13 @@ var require_parse2 = __commonJS({ const isStart = prior.type === "slash" || prior.type === "bos"; const afterStar = before && (before.type === "star" || before.type === "globstar"); if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { - push({ type: "star", value, output: "" }); + push2({ type: "star", value, output: "" }); continue; } const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { - push({ type: "star", value, output: "" }); + push2({ type: "star", value, output: "" }); continue; } while (rest.slice(0, 3) === "/**") { @@ -2685,7 +2685,7 @@ var require_parse2 = __commonJS({ state.output += prior.output + prev.output; state.globstar = true; consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); + push2({ type: "slash", value: "/", output: "" }); continue; } if (prior.type === "bos" && rest[0] === "/") { @@ -2695,7 +2695,7 @@ var require_parse2 = __commonJS({ state.output = prev.output; state.globstar = true; consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); + push2({ type: "slash", value: "/", output: "" }); continue; } state.output = state.output.slice(0, -prev.output.length); @@ -2707,18 +2707,18 @@ var require_parse2 = __commonJS({ consume(value); continue; } - const token = { type: "star", value, output: star }; + const token2 = { type: "star", value, output: star }; if (opts.bash === true) { - token.output = ".*?"; + token2.output = ".*?"; if (prev.type === "bos" || prev.type === "slash") { - token.output = nodot + token.output; + token2.output = nodot + token2.output; } - push(token); + push2(token2); continue; } if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { - token.output = value; - push(token); + token2.output = value; + push2(token2); continue; } if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { @@ -2732,46 +2732,46 @@ var require_parse2 = __commonJS({ state.output += nodot; prev.output += nodot; } - if (peek() !== "*") { + if (peek2() !== "*") { state.output += ONE_CHAR; prev.output += ONE_CHAR; } } - push(token); + push2(token2); } while (state.brackets > 0) { if (opts.strictBrackets === true) - throw new SyntaxError(syntaxError("closing", "]")); + throw new SyntaxError(syntaxError2("closing", "]")); state.output = utils.escapeLast(state.output, "["); decrement("brackets"); } while (state.parens > 0) { if (opts.strictBrackets === true) - throw new SyntaxError(syntaxError("closing", ")")); + throw new SyntaxError(syntaxError2("closing", ")")); state.output = utils.escapeLast(state.output, "("); decrement("parens"); } while (state.braces > 0) { if (opts.strictBrackets === true) - throw new SyntaxError(syntaxError("closing", "}")); + throw new SyntaxError(syntaxError2("closing", "}")); state.output = utils.escapeLast(state.output, "{"); decrement("braces"); } if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { - push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); + push2({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); } if (state.backtrack === true) { state.output = ""; - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - if (token.suffix) { - state.output += token.suffix; + for (const token2 of state.tokens) { + state.output += token2.output != null ? token2.output : token2.value; + if (token2.suffix) { + state.output += token2.suffix; } } } return state; }; - parse3.fastpaths = (input, options8) => { + parse6.fastpaths = (input, options8) => { const opts = { ...options8 }; const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; const len = input.length; @@ -2804,8 +2804,8 @@ var require_parse2 = __commonJS({ return star; return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; }; - const create = (str) => { - switch (str) { + const create = (str2) => { + switch (str2) { case "*": return `${nodot}${ONE_CHAR}${star}`; case ".*": @@ -2823,24 +2823,24 @@ var require_parse2 = __commonJS({ case "**/.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; default: { - const match = /^(.*?)\.(\w+)$/.exec(str); + const match = /^(.*?)\.(\w+)$/.exec(str2); if (!match) return; - const source2 = create(match[1]); - if (!source2) + const source3 = create(match[1]); + if (!source3) return; - return source2 + DOT_LITERAL + match[2]; + return source3 + DOT_LITERAL + match[2]; } } }; const output = utils.removePrefix(input, state); - let source = create(output); - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; + let source2 = create(output); + if (source2 && opts.strictSlashes !== true) { + source2 += `${SLASH_LITERAL}?`; } - return source; + return source2; }; - module.exports = parse3; + module.exports = parse6; } }); @@ -2848,18 +2848,18 @@ var require_parse2 = __commonJS({ var require_picomatch = __commonJS({ "node_modules/picomatch/lib/picomatch.js"(exports, module) { "use strict"; - var path9 = __require("path"); + var path13 = __require("path"); var scan = require_scan(); - var parse3 = require_parse2(); + var parse6 = require_parse2(); var utils = require_utils2(); var constants = require_constants2(); - var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val); + var isObject3 = (val) => val && typeof val === "object" && !Array.isArray(val); var picomatch = (glob, options8, returnState = false) => { if (Array.isArray(glob)) { const fns = glob.map((input) => picomatch(input, options8, returnState)); - const arrayMatcher = (str) => { + const arrayMatcher = (str2) => { for (const isMatch of fns) { - const state2 = isMatch(str); + const state2 = isMatch(str2); if (state2) return state2; } @@ -2867,7 +2867,7 @@ var require_picomatch = __commonJS({ }; return arrayMatcher; } - const isState = isObject2(glob) && glob.tokens && glob.input; + const isState = isObject3(glob) && glob.tokens && glob.input; if (glob === "" || typeof glob !== "string" && !isState) { throw new TypeError("Expected pattern to be a non-empty string"); } @@ -2934,13 +2934,13 @@ var require_picomatch = __commonJS({ }; picomatch.matchBase = (input, glob, options8, posix = utils.isWindows(options8)) => { const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options8); - return regex.test(path9.basename(input)); + return regex.test(path13.basename(input)); }; - picomatch.isMatch = (str, patterns, options8) => picomatch(patterns, options8)(str); + picomatch.isMatch = (str2, patterns, options8) => picomatch(patterns, options8)(str2); picomatch.parse = (pattern, options8) => { if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options8)); - return parse3(pattern, { ...options8, fastpaths: false }); + return parse6(pattern, { ...options8, fastpaths: false }); }; picomatch.scan = (input, options8) => scan(input, options8); picomatch.compileRe = (state, options8, returnOutput = false, returnState = false) => { @@ -2950,11 +2950,11 @@ var require_picomatch = __commonJS({ const opts = options8 || {}; const prepend = opts.contains ? "" : "^"; const append = opts.contains ? "" : "$"; - let source = `${prepend}(?:${state.output})${append}`; + let source2 = `${prepend}(?:${state.output})${append}`; if (state && state.negated === true) { - source = `^(?!${source}).*$`; + source2 = `^(?!${source2}).*$`; } - const regex = picomatch.toRegex(source, options8); + const regex = picomatch.toRegex(source2, options8); if (returnState === true) { regex.state = state; } @@ -2966,17 +2966,17 @@ var require_picomatch = __commonJS({ } let parsed = { negated: false, fastpaths: true }; if (options8.fastpaths !== false && (input[0] === "." || input[0] === "*")) { - parsed.output = parse3.fastpaths(input, options8); + parsed.output = parse6.fastpaths(input, options8); } if (!parsed.output) { - parsed = parse3(input, options8); + parsed = parse6(input, options8); } return picomatch.compileRe(parsed, options8, returnOutput, returnState); }; - picomatch.toRegex = (source, options8) => { + picomatch.toRegex = (source2, options8) => { try { const opts = options8 || {}; - return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); + return new RegExp(source2, opts.flags || (opts.nocase ? "i" : "")); } catch (err) { if (options8 && options8.debug === true) throw err; @@ -3000,7 +3000,7 @@ var require_picomatch2 = __commonJS({ var require_micromatch = __commonJS({ "node_modules/micromatch/index.js"(exports, module) { "use strict"; - var util = __require("util"); + var util2 = __require("util"); var braces = require_braces(); var picomatch = require_picomatch2(); var utils = require_utils2(); @@ -3050,7 +3050,7 @@ var require_micromatch = __commonJS({ }; micromatch2.match = micromatch2; micromatch2.matcher = (pattern, options8) => picomatch(pattern, options8); - micromatch2.isMatch = (str, patterns, options8) => picomatch(patterns, options8)(str); + micromatch2.isMatch = (str2, patterns, options8) => picomatch(patterns, options8)(str2); micromatch2.any = micromatch2.isMatch; micromatch2.not = (list, patterns, options8 = {}) => { patterns = [].concat(patterns).map(String); @@ -3069,22 +3069,22 @@ var require_micromatch = __commonJS({ } return [...result]; }; - micromatch2.contains = (str, pattern, options8) => { - if (typeof str !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + micromatch2.contains = (str2, pattern, options8) => { + if (typeof str2 !== "string") { + throw new TypeError(`Expected a string: "${util2.inspect(str2)}"`); } if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch2.contains(str, p, options8)); + return pattern.some((p) => micromatch2.contains(str2, p, options8)); } if (typeof pattern === "string") { - if (isEmptyString(str) || isEmptyString(pattern)) { + if (isEmptyString(str2) || isEmptyString(pattern)) { return false; } - if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) { + if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { return true; } } - return micromatch2.isMatch(str, pattern, { ...options8, contains: true }); + return micromatch2.isMatch(str2, pattern, { ...options8, contains: true }); }; micromatch2.matchKeys = (obj, patterns, options8) => { if (!utils.isObject(obj)) { @@ -3092,8 +3092,8 @@ var require_micromatch = __commonJS({ } let keys = micromatch2(Object.keys(obj), patterns, options8); let res = {}; - for (let key of keys) - res[key] = obj[key]; + for (let key2 of keys) + res[key2] = obj[key2]; return res; }; micromatch2.some = (list, patterns, options8) => { @@ -3116,11 +3116,11 @@ var require_micromatch = __commonJS({ } return true; }; - micromatch2.all = (str, patterns, options8) => { - if (typeof str !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str)}"`); + micromatch2.all = (str2, patterns, options8) => { + if (typeof str2 !== "string") { + throw new TypeError(`Expected a string: "${util2.inspect(str2)}"`); } - return [].concat(patterns).every((p) => picomatch(p, options8)(str)); + return [].concat(patterns).every((p) => picomatch(p, options8)(str2)); }; micromatch2.capture = (glob, input, options8) => { let posix = utils.isWindows(options8); @@ -3135,8 +3135,8 @@ var require_micromatch = __commonJS({ micromatch2.parse = (patterns, options8) => { let res = []; for (let pattern of [].concat(patterns || [])) { - for (let str of braces(String(pattern), options8)) { - res.push(picomatch.parse(str, options8)); + for (let str2 of braces(String(pattern), options8)) { + res.push(picomatch.parse(str2, options8)); } } return res; @@ -3164,7 +3164,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0; - var path9 = __require("path"); + var path13 = __require("path"); var globParent = require_glob_parent(); var micromatch2 = require_micromatch(); var GLOBSTAR = "**"; @@ -3259,7 +3259,7 @@ var require_pattern = __commonJS({ } exports.endsWithSlashGlobStar = endsWithSlashGlobStar; function isAffectDepthOfReadingPattern(pattern) { - const basename = path9.basename(pattern); + const basename = path13.basename(pattern); return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); } exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; @@ -3432,7 +3432,7 @@ var require_stream = __commonJS({ Object.defineProperty(exports, "__esModule", { value: true }); exports.merge = void 0; var merge2 = require_merge2(); - function merge(streams) { + function merge3(streams) { const mergedStream = merge2(streams); streams.forEach((stream) => { stream.once("error", (error) => mergedStream.emit("error", error)); @@ -3441,7 +3441,7 @@ var require_stream = __commonJS({ mergedStream.once("end", () => propagateCloseEventToSources(streams)); return mergedStream; } - exports.merge = merge; + exports.merge = merge3; function propagateCloseEventToSources(streams) { streams.forEach((stream) => stream.emit("close")); } @@ -3475,10 +3475,10 @@ var require_utils3 = __commonJS({ exports.array = array2; var errno = require_errno(); exports.errno = errno; - var fs5 = require_fs(); - exports.fs = fs5; - var path9 = require_path(); - exports.path = path9; + var fs7 = require_fs(); + exports.fs = fs7; + var path13 = require_path(); + exports.path = path13; var pattern = require_pattern(); exports.pattern = pattern; var stream = require_stream(); @@ -3590,8 +3590,8 @@ var require_async = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.read = void 0; - function read2(path9, settings, callback) { - settings.fs.lstat(path9, (lstatError, lstat) => { + function read3(path13, settings, callback) { + settings.fs.lstat(path13, (lstatError, lstat) => { if (lstatError !== null) { callFailureCallback(callback, lstatError); return; @@ -3600,7 +3600,7 @@ var require_async = __commonJS({ callSuccessCallback(callback, lstat); return; } - settings.fs.stat(path9, (statError, stat) => { + settings.fs.stat(path13, (statError, stat) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { callFailureCallback(callback, statError); @@ -3616,7 +3616,7 @@ var require_async = __commonJS({ }); }); } - exports.read = read2; + exports.read = read3; function callFailureCallback(callback, error) { callback(error); } @@ -3632,13 +3632,13 @@ var require_sync = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.read = void 0; - function read2(path9, settings) { - const lstat = settings.fs.lstatSync(path9); + function read3(path13, settings) { + const lstat = settings.fs.lstatSync(path13); if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { return lstat; } try { - const stat = settings.fs.statSync(path9); + const stat = settings.fs.statSync(path13); if (settings.markSymbolicLink) { stat.isSymbolicLink = () => true; } @@ -3650,7 +3650,7 @@ var require_sync = __commonJS({ throw error; } } - exports.read = read2; + exports.read = read3; } }); @@ -3660,12 +3660,12 @@ var require_fs2 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; - var fs5 = __require("fs"); + var fs7 = __require("fs"); exports.FILE_SYSTEM_ADAPTER = { - lstat: fs5.lstat, - stat: fs5.stat, - lstatSync: fs5.lstatSync, - statSync: fs5.statSync + lstat: fs7.lstat, + stat: fs7.stat, + lstatSync: fs7.lstatSync, + statSync: fs7.statSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -3682,12 +3682,12 @@ var require_settings = __commonJS({ "node_modules/@nodelib/fs.stat/out/settings.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var fs5 = require_fs2(); + var fs7 = require_fs2(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs5.createFileSystemAdapter(this._options.fs); + this.fs = fs7.createFileSystemAdapter(this._options.fs); this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); } @@ -3709,17 +3709,17 @@ var require_out = __commonJS({ var sync = require_sync(); var settings_1 = require_settings(); exports.Settings = settings_1.default; - function stat(path9, optionsOrSettingsOrCallback, callback) { + function stat(path13, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path9, getSettings(), optionsOrSettingsOrCallback); + async.read(path13, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path9, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path13, getSettings(optionsOrSettingsOrCallback), callback); } exports.stat = stat; - function statSync2(path9, optionsOrSettings) { + function statSync2(path13, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path9, settings); + return sync.read(path13, settings); } exports.statSync = statSync2; function getSettings(settingsOrOptions = {}) { @@ -3777,9 +3777,9 @@ var require_run_parallel = __commonJS({ if (!pending) { done(null); } else if (keys) { - keys.forEach(function(key) { - tasks[key](function(err, result) { - each(key, err, result); + keys.forEach(function(key2) { + tasks[key2](function(err, result) { + each(key2, err, result); }); }); } else { @@ -3845,8 +3845,8 @@ var require_utils4 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fs = void 0; - var fs5 = require_fs3(); - exports.fs = fs5; + var fs7 = require_fs3(); + exports.fs = fs7; } }); @@ -3876,15 +3876,15 @@ var require_async2 = __commonJS({ var rpl = require_run_parallel(); var constants_1 = require_constants3(); var utils = require_utils4(); - var common = require_common(); - function read2(directory, settings, callback) { + var common2 = require_common(); + function read3(directory, settings, callback) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { readdirWithFileTypes(directory, settings, callback); return; } readdir(directory, settings, callback); } - exports.read = read2; + exports.read = read3; function readdirWithFileTypes(directory, settings, callback) { settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { if (readdirError !== null) { @@ -3894,7 +3894,7 @@ var require_async2 = __commonJS({ const entries = dirents.map((dirent) => ({ dirent, name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) })); if (!settings.followSymbolicLinks) { callSuccessCallback(callback, entries); @@ -3938,16 +3938,16 @@ var require_async2 = __commonJS({ return; } const tasks = names.map((name) => { - const path9 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path13 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { - fsStat.stat(path9, settings.fsStatSettings, (error, stats) => { + fsStat.stat(path13, settings.fsStatSettings, (error, stats) => { if (error !== null) { done(error); return; } const entry = { name, - path: path9, + path: path13, dirent: utils.fs.createDirentFromStats(name, stats) }; if (settings.stats) { @@ -3985,21 +3985,21 @@ var require_sync2 = __commonJS({ var fsStat = require_out(); var constants_1 = require_constants3(); var utils = require_utils4(); - var common = require_common(); - function read2(directory, settings) { + var common2 = require_common(); + function read3(directory, settings) { if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { return readdirWithFileTypes(directory, settings); } return readdir(directory, settings); } - exports.read = read2; + exports.read = read3; function readdirWithFileTypes(directory, settings) { const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); return dirents.map((dirent) => { const entry = { dirent, name: dirent.name, - path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) }; if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { try { @@ -4018,7 +4018,7 @@ var require_sync2 = __commonJS({ function readdir(directory, settings) { const names = settings.fs.readdirSync(directory); return names.map((name) => { - const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); const stats = fsStat.statSync(entryPath, settings.fsStatSettings); const entry = { name, @@ -4041,14 +4041,14 @@ var require_fs4 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; - var fs5 = __require("fs"); + var fs7 = __require("fs"); exports.FILE_SYSTEM_ADAPTER = { - lstat: fs5.lstat, - stat: fs5.stat, - lstatSync: fs5.lstatSync, - statSync: fs5.statSync, - readdir: fs5.readdir, - readdirSync: fs5.readdirSync + lstat: fs7.lstat, + stat: fs7.stat, + lstatSync: fs7.lstatSync, + statSync: fs7.statSync, + readdir: fs7.readdir, + readdirSync: fs7.readdirSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -4065,15 +4065,15 @@ var require_settings2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/settings.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var path9 = __require("path"); + var path13 = __require("path"); var fsStat = require_out(); - var fs5 = require_fs4(); + var fs7 = require_fs4(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs5.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path9.sep); + this.fs = fs7.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path13.sep); this.stats = this._getValue(this._options.stats, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); this.fsStatSettings = new fsStat.Settings({ @@ -4100,17 +4100,17 @@ var require_out2 = __commonJS({ var sync = require_sync2(); var settings_1 = require_settings2(); exports.Settings = settings_1.default; - function scandir(path9, optionsOrSettingsOrCallback, callback) { + function scandir(path13, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path9, getSettings(), optionsOrSettingsOrCallback); + async.read(path13, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path9, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path13, getSettings(optionsOrSettingsOrCallback), callback); } exports.scandir = scandir; - function scandirSync(path9, optionsOrSettings) { + function scandirSync(path13, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path9, settings); + return sync.read(path13, settings); } exports.scandirSync = scandirSync; function getSettings(settingsOrOptions = {}) { @@ -4167,13 +4167,13 @@ var require_queue = __commonJS({ if (concurrency < 1) { throw new Error("fastqueue concurrency must be greater than 1"); } - var cache2 = reusify(Task); + var cache3 = reusify(Task); var queueHead = null; var queueTail = null; var _running = 0; var errorHandler = null; var self = { - push, + push: push2, drain: noop2, saturated: noop2, pause, @@ -4227,8 +4227,8 @@ var require_queue = __commonJS({ function idle() { return _running === 0 && self.length() === 0; } - function push(value, done) { - var current = cache2.get(); + function push2(value, done) { + var current = cache3.get(); current.context = context; current.release = release; current.value = value; @@ -4249,7 +4249,7 @@ var require_queue = __commonJS({ } } function unshift(value, done) { - var current = cache2.get(); + var current = cache3.get(); current.context = context; current.release = release; current.value = value; @@ -4270,7 +4270,7 @@ var require_queue = __commonJS({ } function release(holder) { if (holder) { - cache2.release(holder); + cache3.release(holder); } var next = queueHead; if (next) { @@ -4343,31 +4343,31 @@ var require_queue = __commonJS({ var queue = fastqueue(context, asyncWrapper, concurrency); var pushCb = queue.push; var unshiftCb = queue.unshift; - queue.push = push; + queue.push = push2; queue.unshift = unshift; queue.drained = drained; return queue; - function push(value) { - var p = new Promise(function(resolve2, reject) { + function push2(value) { + var p = new Promise(function(resolve3, reject) { pushCb(value, function(err, result) { if (err) { reject(err); return; } - resolve2(result); + resolve3(result); }); }); p.catch(noop2); return p; } function unshift(value) { - var p = new Promise(function(resolve2, reject) { + var p = new Promise(function(resolve3, reject) { unshiftCb(value, function(err, result) { if (err) { reject(err); return; } - resolve2(result); + resolve3(result); }); }); p.catch(noop2); @@ -4375,15 +4375,15 @@ var require_queue = __commonJS({ } function drained() { if (queue.idle()) { - return new Promise(function(resolve2) { - resolve2(); + return new Promise(function(resolve3) { + resolve3(); }); } var previousDrain = queue.drain; - var p = new Promise(function(resolve2) { + var p = new Promise(function(resolve3) { queue.drain = function() { previousDrain(); - resolve2(); + resolve3(); }; }); return p; @@ -4407,8 +4407,8 @@ var require_common2 = __commonJS({ return !settings.errorFilter(error); } exports.isFatalError = isFatalError; - function isAppliedFilter(filter, value) { - return filter === null || filter(value); + function isAppliedFilter(filter2, value) { + return filter2 === null || filter2(value); } exports.isAppliedFilter = isAppliedFilter; function replacePathSegmentSeparator(filepath, separator) { @@ -4433,12 +4433,12 @@ var require_reader = __commonJS({ "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var common = require_common2(); + var common2 = require_common2(); var Reader = class { constructor(_root, _settings) { this._root = _root; this._settings = _settings; - this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); } }; exports.default = Reader; @@ -4453,7 +4453,7 @@ var require_async3 = __commonJS({ var events_1 = __require("events"); var fsScandir = require_out2(); var fastq = require_queue(); - var common = require_common2(); + var common2 = require_common2(); var reader_1 = require_reader(); var AsyncReader = class extends reader_1.default { constructor(_root, _settings) { @@ -4518,7 +4518,7 @@ var require_async3 = __commonJS({ }); } _handleError(error) { - if (this._isDestroyed || !common.isFatalError(this._settings, error)) { + if (this._isDestroyed || !common2.isFatalError(this._settings, error)) { return; } this._isFatalError = true; @@ -4531,12 +4531,12 @@ var require_async3 = __commonJS({ } const fullpath = entry.path; if (base !== void 0) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { this._emitEntry(entry); } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } } @@ -4631,7 +4631,7 @@ var require_sync3 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var fsScandir = require_out2(); - var common = require_common2(); + var common2 = require_common2(); var reader_1 = require_reader(); var SyncReader = class extends reader_1.default { constructor() { @@ -4664,7 +4664,7 @@ var require_sync3 = __commonJS({ } } _handleError(error) { - if (!common.isFatalError(this._settings, error)) { + if (!common2.isFatalError(this._settings, error)) { return; } throw error; @@ -4672,12 +4672,12 @@ var require_sync3 = __commonJS({ _handleEntry(entry, base) { const fullpath = entry.path; if (base !== void 0) { - entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); } - if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { this._pushToStorage(entry); } - if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } } @@ -4714,7 +4714,7 @@ var require_settings3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/settings.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var path9 = __require("path"); + var path13 = __require("path"); var fsScandir = require_out2(); var Settings = class { constructor(_options = {}) { @@ -4724,7 +4724,7 @@ var require_settings3 = __commonJS({ this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path9.sep); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path13.sep); this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, @@ -4786,7 +4786,7 @@ var require_reader2 = __commonJS({ "node_modules/fast-glob/out/readers/reader.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var path9 = __require("path"); + var path13 = __require("path"); var fsStat = require_out(); var utils = require_utils3(); var Reader = class { @@ -4799,7 +4799,7 @@ var require_reader2 = __commonJS({ }); } _getFullEntryPath(filepath) { - return path9.resolve(this._settings.cwd, filepath); + return path13.resolve(this._settings.cwd, filepath); } _makeEntry(stats, pattern) { const entry = { @@ -4835,8 +4835,8 @@ var require_stream3 = __commonJS({ this._walkStream = fsWalk.walkStream; this._stat = fsStat.stat; } - dynamic(root, options8) { - return this._walkStream(root, options8); + dynamic(root2, options8) { + return this._walkStream(root2, options8); } static(patterns, options8) { const filepaths = patterns.map(this._getFullEntryPath, this); @@ -4866,9 +4866,9 @@ var require_stream3 = __commonJS({ }); } _getStat(filepath) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { this._stat(filepath, this._fsStatSettings, (error, stats) => { - return error === null ? resolve2(stats) : reject(error); + return error === null ? resolve3(stats) : reject(error); }); }); } @@ -4891,11 +4891,11 @@ var require_async5 = __commonJS({ this._walkAsync = fsWalk.walk; this._readerStream = new stream_1.default(this._settings); } - dynamic(root, options8) { - return new Promise((resolve2, reject) => { - this._walkAsync(root, options8, (error, entries) => { + dynamic(root2, options8) { + return new Promise((resolve3, reject) => { + this._walkAsync(root2, options8, (error, entries) => { if (error === null) { - resolve2(entries); + resolve3(entries); } else { reject(error); } @@ -4905,10 +4905,10 @@ var require_async5 = __commonJS({ async static(patterns, options8) { const entries = []; const stream = this._readerStream.static(patterns, options8); - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { stream.once("error", reject); stream.on("data", (entry) => entries.push(entry)); - stream.once("end", () => resolve2(entries)); + stream.once("end", () => resolve3(entries)); }); } }; @@ -5097,8 +5097,8 @@ var require_entry = __commonJS({ if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) { return false; } - const isDirectory = entry.dirent.isDirectory(); - const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory); + const isDirectory2 = entry.dirent.isDirectory(); + const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory2) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory2); if (this._settings.unique && isMatched) { this._createIndexRecord(filepath); } @@ -5123,9 +5123,9 @@ var require_entry = __commonJS({ const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath); return utils.pattern.matchAny(fullpath, patternsRe); } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { + _isMatchToPatterns(filepath, patternsRe, isDirectory2) { const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { + if (!isMatched && isDirectory2) { return utils.pattern.matchAny(filepath + "/", patternsRe); } return isMatched; @@ -5193,7 +5193,7 @@ var require_provider = __commonJS({ "node_modules/fast-glob/out/providers/provider.js"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - var path9 = __require("path"); + var path13 = __require("path"); var deep_1 = require_deep(); var entry_1 = require_entry(); var error_1 = require_error(); @@ -5207,7 +5207,7 @@ var require_provider = __commonJS({ this.entryTransformer = new entry_2.default(this._settings); } _getRootDirectory(task) { - return path9.resolve(this._settings.cwd, task.base); + return path13.resolve(this._settings.cwd, task.base); } _getReaderOptions(task) { const basePath = task.base === "." ? "" : task.base; @@ -5255,14 +5255,14 @@ var require_async6 = __commonJS({ this._reader = new async_1.default(this._settings); } async read(task) { - const root = this._getRootDirectory(task); + const root2 = this._getRootDirectory(task); const options8 = this._getReaderOptions(task); - const entries = await this.api(root, task, options8); + const entries = await this.api(root2, task, options8); return entries.map((entry) => options8.transform(entry)); } - api(root, task, options8) { + api(root2, task, options8) { if (task.dynamic) { - return this._reader.dynamic(root, options8); + return this._reader.dynamic(root2, options8); } return this._reader.static(task.patterns, options8); } @@ -5285,18 +5285,18 @@ var require_stream4 = __commonJS({ this._reader = new stream_2.default(this._settings); } read(task) { - const root = this._getRootDirectory(task); + const root2 = this._getRootDirectory(task); const options8 = this._getReaderOptions(task); - const source = this.api(root, task, options8); + const source2 = this.api(root2, task, options8); const destination = new stream_1.Readable({ objectMode: true, read: () => { } }); - source.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options8.transform(entry))).once("end", () => destination.emit("end")); - destination.once("close", () => source.destroy()); + source2.once("error", (error) => destination.emit("error", error)).on("data", (entry) => destination.emit("data", options8.transform(entry))).once("end", () => destination.emit("end")); + destination.once("close", () => source2.destroy()); return destination; } - api(root, task, options8) { + api(root2, task, options8) { if (task.dynamic) { - return this._reader.dynamic(root, options8); + return this._reader.dynamic(root2, options8); } return this._reader.static(task.patterns, options8); } @@ -5319,8 +5319,8 @@ var require_sync5 = __commonJS({ this._walkSync = fsWalk.walkSync; this._statSync = fsStat.statSync; } - dynamic(root, options8) { - return this._walkSync(root, options8); + dynamic(root2, options8) { + return this._walkSync(root2, options8); } static(patterns, options8) { const entries = []; @@ -5366,14 +5366,14 @@ var require_sync6 = __commonJS({ this._reader = new sync_1.default(this._settings); } read(task) { - const root = this._getRootDirectory(task); + const root2 = this._getRootDirectory(task); const options8 = this._getReaderOptions(task); - const entries = this.api(root, task, options8); + const entries = this.api(root2, task, options8); return entries.map(options8.transform); } - api(root, task, options8) { + api(root2, task, options8) { if (task.dynamic) { - return this._reader.dynamic(root, options8); + return this._reader.dynamic(root2, options8); } return this._reader.static(task.patterns, options8); } @@ -5388,16 +5388,16 @@ var require_settings4 = __commonJS({ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs5 = __require("fs"); + var fs7 = __require("fs"); var os2 = __require("os"); var CPU_COUNT = Math.max(os2.cpus().length, 1); exports.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs5.lstat, - lstatSync: fs5.lstatSync, - stat: fs5.stat, - statSync: fs5.statSync, - readdir: fs5.readdir, - readdirSync: fs5.readdirSync + lstat: fs7.lstat, + lstatSync: fs7.lstatSync, + stat: fs7.stat, + statSync: fs7.statSync, + readdir: fs7.readdir, + readdirSync: fs7.readdirSync }; var Settings = class { constructor(_options = {}) { @@ -5452,9 +5452,9 @@ var require_out4 = __commonJS({ var sync_1 = require_sync6(); var settings_1 = require_settings4(); var utils = require_utils3(); - async function FastGlob(source, options8) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options8); + async function FastGlob(source2, options8) { + assertPatternsInput(source2); + const works = getWorks(source2, async_1.default, options8); const result = await Promise.all(works); return utils.array.flatten(result); } @@ -5463,78 +5463,78 @@ var require_out4 = __commonJS({ FastGlob2.globSync = sync; FastGlob2.globStream = stream; FastGlob2.async = FastGlob2; - function sync(source, options8) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options8); + function sync(source2, options8) { + assertPatternsInput(source2); + const works = getWorks(source2, sync_1.default, options8); return utils.array.flatten(works); } FastGlob2.sync = sync; - function stream(source, options8) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options8); + function stream(source2, options8) { + assertPatternsInput(source2); + const works = getWorks(source2, stream_1.default, options8); return utils.stream.merge(works); } FastGlob2.stream = stream; - function generateTasks(source, options8) { - assertPatternsInput(source); - const patterns = [].concat(source); + function generateTasks(source2, options8) { + assertPatternsInput(source2); + const patterns = [].concat(source2); const settings = new settings_1.default(options8); return taskManager.generate(patterns, settings); } FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options8) { - assertPatternsInput(source); + function isDynamicPattern(source2, options8) { + assertPatternsInput(source2); const settings = new settings_1.default(options8); - return utils.pattern.isDynamicPattern(source, settings); + return utils.pattern.isDynamicPattern(source2, settings); } FastGlob2.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); + function escapePath(source2) { + assertPatternsInput(source2); + return utils.path.escape(source2); } FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); + function convertPathToPattern(source2) { + assertPatternsInput(source2); + return utils.path.convertPathToPattern(source2); } FastGlob2.convertPathToPattern = convertPathToPattern; let posix; (function(posix2) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); + function escapePath2(source2) { + assertPatternsInput(source2); + return utils.path.escapePosixPath(source2); } posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); + function convertPathToPattern2(source2) { + assertPatternsInput(source2); + return utils.path.convertPosixPathToPattern(source2); } posix2.convertPathToPattern = convertPathToPattern2; })(posix = FastGlob2.posix || (FastGlob2.posix = {})); let win32; (function(win322) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); + function escapePath2(source2) { + assertPatternsInput(source2); + return utils.path.escapeWindowsPath(source2); } win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); + function convertPathToPattern2(source2) { + assertPatternsInput(source2); + return utils.path.convertWindowsPathToPattern(source2); } win322.convertPathToPattern = convertPathToPattern2; })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); })(FastGlob || (FastGlob = {})); - function getWorks(source, _Provider, options8) { - const patterns = [].concat(source); + function getWorks(source2, _Provider, options8) { + const patterns = [].concat(source2); const settings = new settings_1.default(options8); const tasks = taskManager.generate(patterns, settings); const provider = new _Provider(settings); return tasks.map(provider.read, provider); } function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); + const source2 = [].concat(input); + const isValidSource = source2.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); if (!isValidSource) { throw new TypeError("Patterns must be a string (non empty) or an array of strings"); } @@ -5543,17158 +5543,17339 @@ var require_out4 = __commonJS({ } }); -// node_modules/diff/lib/diff/base.js -var require_base = __commonJS({ - "node_modules/diff/lib/diff/base.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports["default"] = Diff; - function Diff() { - } - Diff.prototype = { - /*istanbul ignore start*/ - /*istanbul ignore end*/ - diff: function diff(oldString, newString) { - var options8 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var callback = options8.callback; - if (typeof options8 === "function") { - callback = options8; - options8 = {}; - } - this.options = options8; - var self = this; - function done(value) { - if (callback) { - setTimeout(function() { - callback(void 0, value); - }, 0); - return true; +// node_modules/semver/internal/debug.js +var require_debug = __commonJS({ + "node_modules/semver/internal/debug.js"(exports, module) { + var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { + }; + module.exports = debug; + } +}); + +// node_modules/semver/internal/constants.js +var require_constants4 = __commonJS({ + "node_modules/semver/internal/constants.js"(exports, module) { + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var RELEASE_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ]; + module.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; + } +}); + +// node_modules/semver/internal/re.js +var require_re = __commonJS({ + "node_modules/semver/internal/re.js"(exports, module) { + var { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH + } = require_constants4(); + var debug = require_debug(); + exports = module.exports = {}; + var re = exports.re = []; + var safeRe = exports.safeRe = []; + var src = exports.src = []; + var t = exports.t = {}; + var R = 0; + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + var makeSafeRegex = (value) => { + for (const [token2, max] of safeRegexReplacements) { + value = value.split(`${token2}*`).join(`${token2}{0,${max}}`).split(`${token2}+`).join(`${token2}{1,${max}}`); + } + return value; + }; + var createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value); + const index = R++; + debug(name, index, value); + t[name] = index; + src[index] = value; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } +}); + +// node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "node_modules/semver/internal/parse-options.js"(exports, module) { + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = (options8) => { + if (!options8) { + return emptyOpts; + } + if (typeof options8 !== "object") { + return looseOption; + } + return options8; + }; + module.exports = parseOptions; + } +}); + +// node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "node_modules/semver/internal/identifiers.js"(exports, module) { + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "node_modules/semver/classes/semver.js"(exports, module) { + var debug = require_debug(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4(); + var { safeRe: re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var SemVer = class _SemVer { + constructor(version, options8) { + options8 = parseOptions(options8); + if (version instanceof _SemVer) { + if (version.loose === !!options8.loose && version.includePrerelease === !!options8.includePrerelease) { + return version; } else { - return value; + version = version.version; } + } else if (typeof version !== "string") { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); } - oldString = this.castInput(oldString); - newString = this.castInput(newString); - oldString = this.removeEmpty(this.tokenize(oldString)); - newString = this.removeEmpty(this.tokenize(newString)); - var newLen = newString.length, oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - if (options8.maxEditLength) { - maxEditLength = Math.min(maxEditLength, options8.maxEditLength); + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ); } - var bestPath = [{ - newPos: -1, - components: [] - }]; - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - return done([{ - value: this.join(newString), - count: newString.length - }]); + debug("SemVer", version, options8); + this.options = options8; + this.loose = !!options8.loose; + this.includePrerelease = !!options8.includePrerelease; + const m = version.trim().match(options8.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version}`); } - function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { - var basePath = ( - /*istanbul ignore start*/ - void 0 - ); - var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - bestPath[diagonalPath - 1] = void 0; - } - var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = void 0; - continue; - } - if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { - basePath = clonePath(removePath); - self.pushComponent(basePath.components, void 0, true); - } else { - basePath = addPath; - basePath.newPos++; - self.pushComponent(basePath.components, true, void 0); - } - _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); - if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { - return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); - } else { - bestPath[diagonalPath] = basePath; - } - } - editLength++; - } - if (callback) { - (function exec() { - setTimeout(function() { - if (editLength > maxEditLength) { - return callback(); - } - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - if (ret) { - return ret; - } - } - } - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - pushComponent: function pushComponent(components, added, removed) { - var last = components[components.length - 1]; - if (last && last.added === added && last.removed === removed) { - components[components.length - 1] = { - count: last.count + 1, - added, - removed - }; - } else { - components.push({ - count: 1, - added, - removed - }); + this.raw = version; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); } - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { - newPos++; - oldPos++; - commonCount++; + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); } - if (commonCount) { - basePath.components.push({ - count: commonCount - }); + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); } - basePath.newPos = newPos; - return oldPos; - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - equals: function equals(left, right) { - if (this.options.comparator) { - return this.options.comparator(left, right); + if (!m[4]) { + this.prerelease = []; } else { - return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - removeEmpty: function removeEmpty(array2) { - var ret = []; - for (var i = 0; i < array2.length; i++) { - if (array2[i]) { - ret.push(array2[i]); - } + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); } - return ret; - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - castInput: function castInput(value) { - return value; - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - tokenize: function tokenize(value) { - return value.split(""); - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - join: function join2(chars) { - return chars.join(""); + this.build = m[5] ? m[5].split(".") : []; + this.format(); } - }; - function buildValues(diff, components, newString, oldString, useLongestToken) { - var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0; - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function(value2, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value2.length ? oldValue : value2; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - newPos += component.count; - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; - if (componentPos && components[componentPos - 1].added) { - var tmp = components[componentPos - 1]; - components[componentPos - 1] = components[componentPos]; - components[componentPos] = tmp; - } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; } + return this.version; } - var lastComponent = components[componentLen - 1]; - if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff.equals("", lastComponent.value)) { - components[componentLen - 2].value += lastComponent.value; - components.pop(); + toString() { + return this.version; } - return components; - } - function clonePath(path9) { - return { - newPos: path9.newPos, - components: path9.components.slice(0) - }; - } - } -}); - -// node_modules/diff/lib/diff/array.js -var require_array2 = __commonJS({ - "node_modules/diff/lib/diff/array.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.diffArrays = diffArrays2; - exports.arrayDiff = void 0; - var _base = _interopRequireDefault(require_base()); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - var arrayDiff = new /*istanbul ignore start*/ - _base[ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ](); - exports.arrayDiff = arrayDiff; - arrayDiff.tokenize = function(value) { - return value.slice(); - }; - arrayDiff.join = arrayDiff.removeEmpty = function(value) { - return value; - }; - function diffArrays2(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); - } - } -}); - -// node_modules/n-readlines/readlines.js -var require_readlines = __commonJS({ - "node_modules/n-readlines/readlines.js"(exports, module) { - "use strict"; - var fs5 = __require("fs"); - var LineByLine = class { - constructor(file, options8) { - options8 = options8 || {}; - if (!options8.readChunk) - options8.readChunk = 1024; - if (!options8.newLineCharacter) { - options8.newLineCharacter = 10; - } else { - options8.newLineCharacter = options8.newLineCharacter.charCodeAt(0); + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof _SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new _SemVer(other, this.options); } - if (typeof file === "number") { - this.fd = file; - } else { - this.fd = fs5.openSync(file, "r"); + if (other.version === this.version) { + return 0; } - this.options = options8; - this.newLineCharacter = options8.newLineCharacter; - this.reset(); + return this.compareMain(other) || this.comparePre(other); } - _searchInBuffer(buffer, hexNeedle) { - let found = -1; - for (let i = 0; i <= buffer.length; i++) { - let b_byte = buffer[i]; - if (b_byte === hexNeedle) { - found = i; - break; - } + compareMain(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); } - return found; - } - reset() { - this.eofReached = false; - this.linesCache = []; - this.fdPosition = 0; - } - close() { - fs5.closeSync(this.fd); - this.fd = null; + return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); } - _extractLines(buffer) { - let line2; - const lines = []; - let bufferPosition = 0; - let lastNewLineBufferPosition = 0; - while (true) { - let bufferPositionValue = buffer[bufferPosition++]; - if (bufferPositionValue === this.newLineCharacter) { - line2 = buffer.slice(lastNewLineBufferPosition, bufferPosition); - lines.push(line2); - lastNewLineBufferPosition = bufferPosition; - } else if (bufferPositionValue === void 0) { - break; - } + comparePre(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); } - let leftovers = buffer.slice(lastNewLineBufferPosition, bufferPosition); - if (leftovers.length) { - lines.push(leftovers); + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; } - return lines; - } - _readChunk(lineLeftovers) { - let totalBytesRead = 0; - let bytesRead; - const buffers = []; + let i = 0; do { - const readBuffer = Buffer.alloc(this.options.readChunk); - bytesRead = fs5.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition); - totalBytesRead = totalBytesRead + bytesRead; - this.fdPosition = this.fdPosition + bytesRead; - buffers.push(readBuffer); - } while (bytesRead && this._searchInBuffer(buffers[buffers.length - 1], this.options.newLineCharacter) === -1); - let bufferData = Buffer.concat(buffers); - if (bytesRead < this.options.readChunk) { - this.eofReached = true; - bufferData = bufferData.slice(0, totalBytesRead); - } - if (totalBytesRead) { - this.linesCache = this._extractLines(bufferData); - if (lineLeftovers) { - this.linesCache[0] = Buffer.concat([lineLeftovers, this.linesCache[0]]); + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); } - } - return totalBytesRead; + } while (++i); } - next() { - if (!this.fd) - return false; - let line2 = false; - if (this.eofReached && this.linesCache.length === 0) { - return line2; - } - let bytesRead; - if (!this.linesCache.length) { - bytesRead = this._readChunk(); + compareBuild(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); } - if (this.linesCache.length) { - line2 = this.linesCache.shift(); - const lastLineCharacter = line2[line2.length - 1]; - if (lastLineCharacter !== this.newLineCharacter) { - bytesRead = this._readChunk(line2); - if (bytesRead) { - line2 = this.linesCache.shift(); + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc(release, identifier, identifierBase) { + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier, identifierBase); + } + this.inc("pre", identifier, identifierBase); + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (!identifier && identifierBase === false) { + throw new Error("invalid increment argument: identifier is empty"); + } + if (this.prerelease.length === 0) { + this.prerelease = [base]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + if (identifier === this.prerelease.join(".") && identifierBase === false) { + throw new Error("invalid increment argument: identifier already exists"); + } + this.prerelease.push(base); + } + } + if (identifier) { + let prerelease = [identifier, base]; + if (identifierBase === false) { + prerelease = [identifier]; + } + if (compareIdentifiers(this.prerelease[0], identifier) === 0) { + if (isNaN(this.prerelease[1])) { + this.prerelease = prerelease; + } + } else { + this.prerelease = prerelease; + } } + break; } + default: + throw new Error(`invalid increment argument: ${release}`); } - if (this.eofReached && this.linesCache.length === 0) { - this.close(); - } - if (line2 && line2[line2.length - 1] === this.newLineCharacter) { - line2 = line2.slice(0, line2.length - 1); + this.raw = this.format(); + if (this.build.length) { + this.raw += `+${this.build.join(".")}`; } - return line2; + return this; } }; - module.exports = LineByLine; + module.exports = SemVer; } }); -// node_modules/js-tokens/index.js -var require_js_tokens = __commonJS({ - "node_modules/js-tokens/index.js"(exports) { - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; - exports.matchToToken = function(match) { - var token = { type: "invalid", value: match[0], closed: void 0 }; - if (match[1]) - token.type = "string", token.closed = !!(match[3] || match[4]); - else if (match[5]) - token.type = "comment"; - else if (match[6]) - token.type = "comment", token.closed = !!match[7]; - else if (match[8]) - token.type = "regex"; - else if (match[9]) - token.type = "number"; - else if (match[10]) - token.type = "name"; - else if (match[11]) - token.type = "punctuator"; - else if (match[12]) - token.type = "whitespace"; - return token; - }; +// node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "node_modules/semver/functions/compare.js"(exports, module) { + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module.exports = compare; } }); -// node_modules/@babel/helper-validator-identifier/lib/identifier.js -var require_identifier = __commonJS({ - "node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.isIdentifierChar = isIdentifierChar; - exports.isIdentifierName = isIdentifierName; - exports.isIdentifierStart = isIdentifierStart; - var nonASCIIidentifierStartChars = "\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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"; - var nonASCIIidentifierChars = "\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65"; - var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); - var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); - nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; - var astralIdentifierStartCodes = [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, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 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, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 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, 20, 1, 64, 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, 38, 6, 186, 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, 19, 72, 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, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 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, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 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, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 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, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; - var astralIdentifierCodes = [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, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 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, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 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, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; - function isInAstralSet(code, set) { - let pos = 65536; - for (let i = 0, length = set.length; i < length; i += 2) { - pos += set[i]; - if (pos > code) - return false; - pos += set[i + 1]; - if (pos >= code) - return true; - } - return false; - } - function isIdentifierStart(code) { - if (code < 65) - return code === 36; - if (code <= 90) - return true; - if (code < 97) - return code === 95; - if (code <= 122) - return true; - if (code <= 65535) { - return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); +// node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "node_modules/semver/functions/gte.js"(exports, module) { + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module.exports = gte; + } +}); + +// node_modules/pseudomap/pseudomap.js +var require_pseudomap = __commonJS({ + "node_modules/pseudomap/pseudomap.js"(exports, module) { + var hasOwnProperty3 = Object.prototype.hasOwnProperty; + module.exports = PseudoMap; + function PseudoMap(set3) { + if (!(this instanceof PseudoMap)) + throw new TypeError("Constructor PseudoMap requires 'new'"); + this.clear(); + if (set3) { + if (set3 instanceof PseudoMap || typeof Map === "function" && set3 instanceof Map) + set3.forEach(function(value, key2) { + this.set(key2, value); + }, this); + else if (Array.isArray(set3)) + set3.forEach(function(kv) { + this.set(kv[0], kv[1]); + }, this); + else + throw new TypeError("invalid argument"); } - return isInAstralSet(code, astralIdentifierStartCodes); } - function isIdentifierChar(code) { - if (code < 48) - return code === 36; - if (code < 58) - return true; - if (code < 65) - return false; - if (code <= 90) - return true; - if (code < 97) - return code === 95; - if (code <= 122) - return true; - if (code <= 65535) { - return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + PseudoMap.prototype.forEach = function(fn, thisp) { + thisp = thisp || this; + Object.keys(this._data).forEach(function(k) { + if (k !== "size") + fn.call(thisp, this._data[k].value, this._data[k].key); + }, this); + }; + PseudoMap.prototype.has = function(k) { + return !!find(this._data, k); + }; + PseudoMap.prototype.get = function(k) { + var res = find(this._data, k); + return res && res.value; + }; + PseudoMap.prototype.set = function(k, v) { + set2(this._data, k, v); + }; + PseudoMap.prototype.delete = function(k) { + var res = find(this._data, k); + if (res) { + delete this._data[res._index]; + this._data.size--; } - return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + }; + PseudoMap.prototype.clear = function() { + var data = /* @__PURE__ */ Object.create(null); + data.size = 0; + Object.defineProperty(this, "_data", { + value: data, + enumerable: false, + configurable: true, + writable: false + }); + }; + Object.defineProperty(PseudoMap.prototype, "size", { + get: function() { + return this._data.size; + }, + set: function(n) { + }, + enumerable: true, + configurable: true + }); + PseudoMap.prototype.values = PseudoMap.prototype.keys = PseudoMap.prototype.entries = function() { + throw new Error("iterators are not implemented in this version"); + }; + function same(a, b) { + return a === b || a !== a && b !== b; } - function isIdentifierName(name) { - let isFirst = true; - for (let i = 0; i < name.length; i++) { - let cp = name.charCodeAt(i); - if ((cp & 64512) === 55296 && i + 1 < name.length) { - const trail = name.charCodeAt(++i); - if ((trail & 64512) === 56320) { - cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); - } - } - if (isFirst) { - isFirst = false; - if (!isIdentifierStart(cp)) { - return false; - } - } else if (!isIdentifierChar(cp)) { - return false; + function Entry(k, v, i) { + this.key = k; + this.value = v; + this._index = i; + } + function find(data, k) { + for (var i = 0, s = "_" + k, key2 = s; hasOwnProperty3.call(data, key2); key2 = s + i++) { + if (same(data[key2].key, k)) + return data[key2]; + } + } + function set2(data, k, v) { + for (var i = 0, s = "_" + k, key2 = s; hasOwnProperty3.call(data, key2); key2 = s + i++) { + if (same(data[key2].key, k)) { + data[key2].value = v; + return; } } - return !isFirst; + data.size++; + data[key2] = new Entry(k, v, key2); } } }); -// node_modules/@babel/helper-validator-identifier/lib/keyword.js -var require_keyword = __commonJS({ - "node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.isKeyword = isKeyword; - exports.isReservedWord = isReservedWord; - exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; - exports.isStrictBindReservedWord = isStrictBindReservedWord; - exports.isStrictReservedWord = isStrictReservedWord; - var reservedWords = { - keyword: ["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"], - strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], - strictBind: ["eval", "arguments"] - }; - var keywords = new Set(reservedWords.keyword); - var reservedWordsStrictSet = new Set(reservedWords.strict); - var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); - function isReservedWord(word, inModule) { - return inModule && word === "await" || word === "enum"; - } - function isStrictReservedWord(word, inModule) { - return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); - } - function isStrictBindOnlyReservedWord(word) { - return reservedWordsStrictBindSet.has(word); - } - function isStrictBindReservedWord(word, inModule) { - return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); - } - function isKeyword(word) { - return keywords.has(word); +// node_modules/pseudomap/map.js +var require_map = __commonJS({ + "node_modules/pseudomap/map.js"(exports, module) { + if (process.env.npm_package_name === "pseudomap" && process.env.npm_lifecycle_script === "test") + process.env.TEST_PSEUDOMAP = "true"; + if (typeof Map === "function" && !process.env.TEST_PSEUDOMAP) { + module.exports = Map; + } else { + module.exports = require_pseudomap(); } } }); -// node_modules/@babel/helper-validator-identifier/lib/index.js -var require_lib = __commonJS({ - "node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - Object.defineProperty(exports, "isIdentifierChar", { - enumerable: true, - get: function() { - return _identifier.isIdentifierChar; +// node_modules/editorconfig/node_modules/yallist/yallist.js +var require_yallist = __commonJS({ + "node_modules/editorconfig/node_modules/yallist/yallist.js"(exports, module) { + module.exports = Yallist; + Yallist.Node = Node; + Yallist.create = Yallist; + function Yallist(list) { + var self = this; + if (!(self instanceof Yallist)) { + self = new Yallist(); } - }); - Object.defineProperty(exports, "isIdentifierName", { - enumerable: true, - get: function() { - return _identifier.isIdentifierName; + self.tail = null; + self.head = null; + self.length = 0; + if (list && typeof list.forEach === "function") { + list.forEach(function(item) { + self.push(item); + }); + } else if (arguments.length > 0) { + for (var i = 0, l = arguments.length; i < l; i++) { + self.push(arguments[i]); + } } - }); - Object.defineProperty(exports, "isIdentifierStart", { - enumerable: true, - get: function() { - return _identifier.isIdentifierStart; + return self; + } + Yallist.prototype.removeNode = function(node) { + if (node.list !== this) { + throw new Error("removing node which does not belong to this list"); } - }); - Object.defineProperty(exports, "isKeyword", { - enumerable: true, - get: function() { - return _keyword.isKeyword; + var next = node.next; + var prev = node.prev; + if (next) { + next.prev = prev; } - }); - Object.defineProperty(exports, "isReservedWord", { - enumerable: true, - get: function() { - return _keyword.isReservedWord; + if (prev) { + prev.next = next; } - }); - Object.defineProperty(exports, "isStrictBindOnlyReservedWord", { - enumerable: true, - get: function() { - return _keyword.isStrictBindOnlyReservedWord; + if (node === this.head) { + this.head = next; } - }); - Object.defineProperty(exports, "isStrictBindReservedWord", { - enumerable: true, - get: function() { - return _keyword.isStrictBindReservedWord; + if (node === this.tail) { + this.tail = prev; } - }); - Object.defineProperty(exports, "isStrictReservedWord", { - enumerable: true, - get: function() { - return _keyword.isStrictReservedWord; + node.list.length--; + node.next = null; + node.prev = null; + node.list = null; + }; + Yallist.prototype.unshiftNode = function(node) { + if (node === this.head) { + return; } - }); - var _identifier = require_identifier(); - var _keyword = require_keyword(); - } -}); - -// node_modules/@babel/code-frame/node_modules/escape-string-regexp/index.js -var require_escape_string_regexp = __commonJS({ - "node_modules/@babel/code-frame/node_modules/escape-string-regexp/index.js"(exports, module) { - "use strict"; - var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - module.exports = function(str) { - if (typeof str !== "string") { - throw new TypeError("Expected a string"); + if (node.list) { + node.list.removeNode(node); + } + var head = this.head; + node.list = this; + node.next = head; + if (head) { + head.prev = node; + } + this.head = node; + if (!this.tail) { + this.tail = node; } - return str.replace(matchOperatorsRe, "\\$&"); + this.length++; }; - } -}); - -// node_modules/color-name/index.js -var require_color_name = __commonJS({ - "node_modules/color-name/index.js"(exports, module) { - "use strict"; - module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] - }; - } -}); - -// node_modules/color-convert/conversions.js -var require_conversions = __commonJS({ - "node_modules/color-convert/conversions.js"(exports, module) { - var cssKeywords = require_color_name(); - var reverseKeywords = {}; - for (key in cssKeywords) { - if (cssKeywords.hasOwnProperty(key)) { - reverseKeywords[cssKeywords[key]] = key; + Yallist.prototype.pushNode = function(node) { + if (node === this.tail) { + return; } - } - var key; - var convert = module.exports = { - rgb: { channels: 3, labels: "rgb" }, - hsl: { channels: 3, labels: "hsl" }, - hsv: { channels: 3, labels: "hsv" }, - hwb: { channels: 3, labels: "hwb" }, - cmyk: { channels: 4, labels: "cmyk" }, - xyz: { channels: 3, labels: "xyz" }, - lab: { channels: 3, labels: "lab" }, - lch: { channels: 3, labels: "lch" }, - hex: { channels: 1, labels: ["hex"] }, - keyword: { channels: 1, labels: ["keyword"] }, - ansi16: { channels: 1, labels: ["ansi16"] }, - ansi256: { channels: 1, labels: ["ansi256"] }, - hcg: { channels: 3, labels: ["h", "c", "g"] }, - apple: { channels: 3, labels: ["r16", "g16", "b16"] }, - gray: { channels: 1, labels: ["gray"] } + if (node.list) { + node.list.removeNode(node); + } + var tail = this.tail; + node.list = this; + node.prev = tail; + if (tail) { + tail.next = node; + } + this.tail = node; + if (!this.head) { + this.head = node; + } + this.length++; }; - for (model in convert) { - if (convert.hasOwnProperty(model)) { - if (!("channels" in convert[model])) { - throw new Error("missing channels property: " + model); - } - if (!("labels" in convert[model])) { - throw new Error("missing channel labels property: " + model); - } - if (convert[model].labels.length !== convert[model].channels) { - throw new Error("channel and label counts mismatch: " + model); - } - channels = convert[model].channels; - labels = convert[model].labels; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], "channels", { value: channels }); - Object.defineProperty(convert[model], "labels", { value: labels }); + Yallist.prototype.push = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + push2(this, arguments[i]); } - } - var channels; - var labels; - var model; - convert.rgb.hsl = function(rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var min = Math.min(r, g, b); - var max = Math.max(r, g, b); - var delta = max - min; - var h; - var s; - var l; - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; + return this.length; + }; + Yallist.prototype.unshift = function() { + for (var i = 0, l = arguments.length; i < l; i++) { + unshift(this, arguments[i]); } - h = Math.min(h * 60, 360); - if (h < 0) { - h += 360; + return this.length; + }; + Yallist.prototype.pop = function() { + if (!this.tail) { + return void 0; } - l = (min + max) / 2; - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); + var res = this.tail.value; + this.tail = this.tail.prev; + if (this.tail) { + this.tail.next = null; } else { - s = delta / (2 - max - min); + this.head = null; } - return [h, s * 100, l * 100]; + this.length--; + return res; }; - convert.rgb.hsv = function(rgb) { - var rdif; - var gdif; - var bdif; - var h; - var s; - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var v = Math.max(r, g, b); - var diff = v - Math.min(r, g, b); - var diffc = function(c) { - return (v - c) / 6 / diff + 1 / 2; - }; - if (diff === 0) { - h = s = 0; + Yallist.prototype.shift = function() { + if (!this.head) { + return void 0; + } + var res = this.head.value; + this.head = this.head.next; + if (this.head) { + this.head.prev = null; } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = 1 / 3 + rdif - bdif; - } else if (b === v) { - h = 2 / 3 + gdif - rdif; - } - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } + this.tail = null; } - return [ - h * 360, - s * 100, - v * 100 - ]; + this.length--; + return res; }; - convert.rgb.hwb = function(rgb) { - var r = rgb[0]; - var g = rgb[1]; - var b = rgb[2]; - var h = convert.rgb.hsl(rgb)[0]; - var w = 1 / 255 * Math.min(r, Math.min(g, b)); - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - return [h, w * 100, b * 100]; + Yallist.prototype.forEach = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this.head, i = 0; walker !== null; i++) { + fn.call(thisp, walker.value, i, this); + walker = walker.next; + } }; - convert.rgb.cmyk = function(rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var c; - var m; - var y; - var k; - k = Math.min(1 - r, 1 - g, 1 - b); - c = (1 - r - k) / (1 - k) || 0; - m = (1 - g - k) / (1 - k) || 0; - y = (1 - b - k) / (1 - k) || 0; - return [c * 100, m * 100, y * 100, k * 100]; + Yallist.prototype.forEachReverse = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { + fn.call(thisp, walker.value, i, this); + walker = walker.prev; + } }; - function comparativeDistance(x, y) { - return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); - } - convert.rgb.keyword = function(rgb) { - var reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; + Yallist.prototype.get = function(n) { + for (var i = 0, walker = this.head; walker !== null && i < n; i++) { + walker = walker.next; } - var currentClosestDistance = Infinity; - var currentClosestKeyword; - for (var keyword in cssKeywords) { - if (cssKeywords.hasOwnProperty(keyword)) { - var value = cssKeywords[keyword]; - var distance = comparativeDistance(rgb, value); - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } + if (i === n && walker !== null) { + return walker.value; } - return currentClosestKeyword; - }; - convert.keyword.rgb = function(keyword) { - return cssKeywords[keyword]; }; - convert.rgb.xyz = function(rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; - g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; - b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; - var x = r * 0.4124 + g * 0.3576 + b * 0.1805; - var y = r * 0.2126 + g * 0.7152 + b * 0.0722; - var z = r * 0.0193 + g * 0.1192 + b * 0.9505; - return [x * 100, y * 100, z * 100]; + Yallist.prototype.getReverse = function(n) { + for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { + walker = walker.prev; + } + if (i === n && walker !== null) { + return walker.value; + } }; - convert.rgb.lab = function(rgb) { - var xyz = convert.rgb.xyz(rgb); - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - x /= 95.047; - y /= 100; - z /= 108.883; - x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; - y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; - z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; - l = 116 * y - 16; - a = 500 * (x - y); - b = 200 * (y - z); - return [l, a, b]; + Yallist.prototype.map = function(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.head; walker !== null; ) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.next; + } + return res; }; - convert.hsl.rgb = function(hsl) { - var h = hsl[0] / 360; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var t1; - var t2; - var t3; - var rgb; - var val; - if (s === 0) { - val = l * 255; - return [val, val, val]; + Yallist.prototype.mapReverse = function(fn, thisp) { + thisp = thisp || this; + var res = new Yallist(); + for (var walker = this.tail; walker !== null; ) { + res.push(fn.call(thisp, walker.value, this)); + walker = walker.prev; } - if (l < 0.5) { - t2 = l * (1 + s); + return res; + }; + Yallist.prototype.reduce = function(fn, initial) { + var acc; + var walker = this.head; + if (arguments.length > 1) { + acc = initial; + } else if (this.head) { + walker = this.head.next; + acc = this.head.value; } else { - t2 = l + s - l * s; + throw new TypeError("Reduce of empty list with no initial value"); } - t1 = 2 * l - t2; - rgb = [0, 0, 0]; - for (var i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - if (t3 > 1) { - t3--; - } - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - rgb[i] = val * 255; + for (var i = 0; walker !== null; i++) { + acc = fn(acc, walker.value, i); + walker = walker.next; } - return rgb; - }; - convert.hsl.hsv = function(hsl) { - var h = hsl[0]; - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var smin = s; - var lmin = Math.max(l, 0.01); - var sv; - var v; - l *= 2; - s *= l <= 1 ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - v = (l + s) / 2; - sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); - return [h, sv * 100, v * 100]; + return acc; }; - convert.hsv.rgb = function(hsv) { - var h = hsv[0] / 60; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var hi = Math.floor(h) % 6; - var f = h - Math.floor(h); - var p = 255 * v * (1 - s); - var q = 255 * v * (1 - s * f); - var t = 255 * v * (1 - s * (1 - f)); - v *= 255; - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; + Yallist.prototype.reduceReverse = function(fn, initial) { + var acc; + var walker = this.tail; + if (arguments.length > 1) { + acc = initial; + } else if (this.tail) { + walker = this.tail.prev; + acc = this.tail.value; + } else { + throw new TypeError("Reduce of empty list with no initial value"); + } + for (var i = this.length - 1; walker !== null; i--) { + acc = fn(acc, walker.value, i); + walker = walker.prev; } + return acc; }; - convert.hsv.hsl = function(hsv) { - var h = hsv[0]; - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var vmin = Math.max(v, 0.01); - var lmin; - var sl; - var l; - l = (2 - s) * v; - lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= lmin <= 1 ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - return [h, sl * 100, l * 100]; + Yallist.prototype.toArray = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.head; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.next; + } + return arr; }; - convert.hwb.rgb = function(hwb) { - var h = hwb[0] / 360; - var wh = hwb[1] / 100; - var bl = hwb[2] / 100; - var ratio = wh + bl; - var i; - var v; - var f; - var n; - if (ratio > 1) { - wh /= ratio; - bl /= ratio; + Yallist.prototype.toArrayReverse = function() { + var arr = new Array(this.length); + for (var i = 0, walker = this.tail; walker !== null; i++) { + arr[i] = walker.value; + walker = walker.prev; } - i = Math.floor(6 * h); - v = 1 - bl; - f = 6 * h - i; - if ((i & 1) !== 0) { - f = 1 - f; + return arr; + }; + Yallist.prototype.slice = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; } - n = wh + f * (v - wh); - var r; - var g; - var b; - switch (i) { - default: - case 6: - case 0: - r = v; - g = n; - b = wh; - break; - case 1: - r = n; - g = v; - b = wh; - break; - case 2: - r = wh; - g = v; - b = n; - break; - case 3: - r = wh; - g = n; - b = v; - break; - case 4: - r = n; - g = wh; - b = v; - break; - case 5: - r = v; - g = wh; - b = n; - break; + from = from || 0; + if (from < 0) { + from += this.length; } - return [r * 255, g * 255, b * 255]; - }; - convert.cmyk.rgb = function(cmyk) { - var c = cmyk[0] / 100; - var m = cmyk[1] / 100; - var y = cmyk[2] / 100; - var k = cmyk[3] / 100; - var r; - var g; - var b; - r = 1 - Math.min(1, c * (1 - k) + k); - g = 1 - Math.min(1, m * (1 - k) + k); - b = 1 - Math.min(1, y * (1 - k) + k); - return [r * 255, g * 255, b * 255]; - }; - convert.xyz.rgb = function(xyz) { - var x = xyz[0] / 100; - var y = xyz[1] / 100; - var z = xyz[2] / 100; - var r; - var g; - var b; - r = x * 3.2406 + y * -1.5372 + z * -0.4986; - g = x * -0.9689 + y * 1.8758 + z * 0.0415; - b = x * 0.0557 + y * -0.204 + z * 1.057; - r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92; - g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92; - b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92; - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - return [r * 255, g * 255, b * 255]; - }; - convert.xyz.lab = function(xyz) { - var x = xyz[0]; - var y = xyz[1]; - var z = xyz[2]; - var l; - var a; - var b; - x /= 95.047; - y /= 100; - z /= 108.883; - x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; - y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; - z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; - l = 116 * y - 16; - a = 500 * (x - y); - b = 200 * (y - z); - return [l, a, b]; - }; - convert.lab.xyz = function(lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var x; - var y; - var z; - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - var y2 = Math.pow(y, 3); - var x2 = Math.pow(x, 3); - var z2 = Math.pow(z, 3); - y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; - x *= 95.047; - y *= 100; - z *= 108.883; - return [x, y, z]; - }; - convert.lab.lch = function(lab) { - var l = lab[0]; - var a = lab[1]; - var b = lab[2]; - var hr; - var h; - var c; - hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - if (h < 0) { - h += 360; + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; } - c = Math.sqrt(a * a + b * b); - return [l, c, h]; - }; - convert.lch.lab = function(lch) { - var l = lch[0]; - var c = lch[1]; - var h = lch[2]; - var a; - var b; - var hr; - hr = h / 360 * 2 * Math.PI; - a = c * Math.cos(hr); - b = c * Math.sin(hr); - return [l, a, b]; - }; - convert.rgb.ansi16 = function(args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; - value = Math.round(value / 50); - if (value === 0) { - return 30; + if (from < 0) { + from = 0; } - var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); - if (value === 2) { - ansi += 60; + if (to > this.length) { + to = this.length; } - return ansi; - }; - convert.hsv.ansi16 = function(args) { - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); - }; - convert.rgb.ansi256 = function(args) { - var r = args[0]; - var g = args[1]; - var b = args[2]; - if (r === g && g === b) { - if (r < 8) { - return 16; - } - if (r > 248) { - return 231; - } - return Math.round((r - 8) / 247 * 24) + 232; + for (var i = 0, walker = this.head; walker !== null && i < from; i++) { + walker = walker.next; } - var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); - return ansi; - }; - convert.ansi16.rgb = function(args) { - var color = args % 10; - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - color = color / 10.5 * 255; - return [color, color, color]; + for (; walker !== null && i < to; i++, walker = walker.next) { + ret.push(walker.value); } - var mult = (~~(args > 50) + 1) * 0.5; - var r = (color & 1) * mult * 255; - var g = (color >> 1 & 1) * mult * 255; - var b = (color >> 2 & 1) * mult * 255; - return [r, g, b]; + return ret; }; - convert.ansi256.rgb = function(args) { - if (args >= 232) { - var c = (args - 232) * 10 + 8; - return [c, c, c]; + Yallist.prototype.sliceReverse = function(from, to) { + to = to || this.length; + if (to < 0) { + to += this.length; } - args -= 16; - var rem; - var r = Math.floor(args / 36) / 5 * 255; - var g = Math.floor((rem = args % 36) / 6) / 5 * 255; - var b = rem % 6 / 5 * 255; - return [r, g, b]; - }; - convert.rgb.hex = function(args) { - var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); - var string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert.hex.rgb = function(args) { - var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; + from = from || 0; + if (from < 0) { + from += this.length; } - var colorString = match[0]; - if (match[0].length === 3) { - colorString = colorString.split("").map(function(char) { - return char + char; - }).join(""); + var ret = new Yallist(); + if (to < from || to < 0) { + return ret; } - var integer = parseInt(colorString, 16); - var r = integer >> 16 & 255; - var g = integer >> 8 & 255; - var b = integer & 255; - return [r, g, b]; - }; - convert.rgb.hcg = function(rgb) { - var r = rgb[0] / 255; - var g = rgb[1] / 255; - var b = rgb[2] / 255; - var max = Math.max(Math.max(r, g), b); - var min = Math.min(Math.min(r, g), b); - var chroma = max - min; - var grayscale; - var hue; - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; + if (from < 0) { + from = 0; } - if (chroma <= 0) { - hue = 0; - } else if (max === r) { - hue = (g - b) / chroma % 6; - } else if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma + 4; + if (to > this.length) { + to = this.length; } - hue /= 6; - hue %= 1; - return [hue * 360, chroma * 100, grayscale * 100]; - }; - convert.hsl.hcg = function(hsl) { - var s = hsl[1] / 100; - var l = hsl[2] / 100; - var c = 1; - var f = 0; - if (l < 0.5) { - c = 2 * s * l; - } else { - c = 2 * s * (1 - l); + for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { + walker = walker.prev; } - if (c < 1) { - f = (l - 0.5 * c) / (1 - c); + for (; walker !== null && i > from; i--, walker = walker.prev) { + ret.push(walker.value); } - return [hsl[0], c * 100, f * 100]; + return ret; }; - convert.hsv.hcg = function(hsv) { - var s = hsv[1] / 100; - var v = hsv[2] / 100; - var c = s * v; - var f = 0; - if (c < 1) { - f = (v - c) / (1 - c); + Yallist.prototype.reverse = function() { + var head = this.head; + var tail = this.tail; + for (var walker = head; walker !== null; walker = walker.prev) { + var p = walker.prev; + walker.prev = walker.next; + walker.next = p; } - return [hsv[0], c * 100, f * 100]; + this.head = tail; + this.tail = head; + return this; }; - convert.hcg.rgb = function(hcg) { - var h = hcg[0] / 360; - var c = hcg[1] / 100; - var g = hcg[2] / 100; - if (c === 0) { - return [g * 255, g * 255, g * 255]; + function push2(self, item) { + self.tail = new Node(item, self.tail, null, self); + if (!self.head) { + self.head = self.tail; } - var pure = [0, 0, 0]; - var hi = h % 1 * 6; - var v = hi % 1; - var w = 1 - v; - var mg = 0; - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; - pure[1] = v; - pure[2] = 0; - break; - case 1: - pure[0] = w; - pure[1] = 1; - pure[2] = 0; - break; - case 2: - pure[0] = 0; - pure[1] = 1; - pure[2] = v; - break; - case 3: - pure[0] = 0; - pure[1] = w; - pure[2] = 1; - break; - case 4: - pure[0] = v; - pure[1] = 0; - pure[2] = 1; - break; - default: - pure[0] = 1; - pure[1] = 0; - pure[2] = w; + self.length++; + } + function unshift(self, item) { + self.head = new Node(item, null, self.head, self); + if (!self.tail) { + self.tail = self.head; } - mg = (1 - c) * g; - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; - }; - convert.hcg.hsv = function(hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1 - c); - var f = 0; - if (v > 0) { - f = c / v; + self.length++; + } + function Node(value, prev, next, list) { + if (!(this instanceof Node)) { + return new Node(value, prev, next, list); } - return [hcg[0], f * 100, v * 100]; - }; - convert.hcg.hsl = function(hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var l = g * (1 - c) + 0.5 * c; - var s = 0; - if (l > 0 && l < 0.5) { - s = c / (2 * l); - } else if (l >= 0.5 && l < 1) { - s = c / (2 * (1 - l)); + this.list = list; + this.value = value; + if (prev) { + prev.next = this; + this.prev = prev; + } else { + this.prev = null; } - return [hcg[0], s * 100, l * 100]; - }; - convert.hcg.hwb = function(hcg) { - var c = hcg[1] / 100; - var g = hcg[2] / 100; - var v = c + g * (1 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; - }; - convert.hwb.hcg = function(hwb) { - var w = hwb[1] / 100; - var b = hwb[2] / 100; - var v = 1 - b; - var c = v - w; - var g = 0; - if (c < 1) { - g = (v - c) / (1 - c); + if (next) { + next.prev = this; + this.next = next; + } else { + this.next = null; } - return [hwb[0], c * 100, g * 100]; - }; - convert.apple.rgb = function(apple) { - return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; - }; - convert.rgb.apple = function(rgb) { - return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; - }; - convert.gray.rgb = function(args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; - }; - convert.gray.hsl = convert.gray.hsv = function(args) { - return [0, 0, args[0]]; - }; - convert.gray.hwb = function(gray) { - return [0, 100, gray[0]]; - }; - convert.gray.cmyk = function(gray) { - return [0, 0, 0, gray[0]]; - }; - convert.gray.lab = function(gray) { - return [gray[0], 0, 0]; - }; - convert.gray.hex = function(gray) { - var val = Math.round(gray[0] / 100 * 255) & 255; - var integer = (val << 16) + (val << 8) + val; - var string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert.rgb.gray = function(rgb) { - var val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; - }; + } } }); -// node_modules/color-convert/route.js -var require_route = __commonJS({ - "node_modules/color-convert/route.js"(exports, module) { - var conversions = require_conversions(); - function buildGraph() { - var graph = {}; - var models = Object.keys(conversions); - for (var len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - return graph; - } - function deriveBFS(fromModel) { - var graph = buildGraph(); - var queue = [fromModel]; - graph[fromModel].distance = 0; - while (queue.length) { - var current = queue.pop(); - var adjacents = Object.keys(conversions[current]); - for (var len = adjacents.length, i = 0; i < len; i++) { - var adjacent = adjacents[i]; - var node = graph[adjacent]; - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - return graph; - } - function link(from, to) { - return function(args) { - return to(from(args)); +// node_modules/editorconfig/node_modules/lru-cache/index.js +var require_lru_cache = __commonJS({ + "node_modules/editorconfig/node_modules/lru-cache/index.js"(exports, module) { + "use strict"; + module.exports = LRUCache; + var Map2 = require_map(); + var util2 = __require("util"); + var Yallist = require_yallist(); + var hasSymbol = typeof Symbol === "function" && process.env._nodeLRUCacheForceNoSymbol !== "1"; + var makeSymbol; + if (hasSymbol) { + makeSymbol = function(key2) { + return Symbol(key2); + }; + } else { + makeSymbol = function(key2) { + return "_" + key2; }; } - function wrapConversion(toModel, graph) { - var path9 = [graph[toModel].parent, toModel]; - var fn = conversions[graph[toModel].parent][toModel]; - var cur = graph[toModel].parent; - while (graph[cur].parent) { - path9.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - fn.conversion = path9; - return fn; - } - module.exports = function(fromModel) { - var graph = deriveBFS(fromModel); - var conversion = {}; - var models = Object.keys(graph); - for (var len = models.length, i = 0; i < len; i++) { - var toModel = models[i]; - var node = graph[toModel]; - if (node.parent === null) { - continue; - } - conversion[toModel] = wrapConversion(toModel, graph); + var MAX = makeSymbol("max"); + var LENGTH = makeSymbol("length"); + var LENGTH_CALCULATOR = makeSymbol("lengthCalculator"); + var ALLOW_STALE = makeSymbol("allowStale"); + var MAX_AGE = makeSymbol("maxAge"); + var DISPOSE = makeSymbol("dispose"); + var NO_DISPOSE_ON_SET = makeSymbol("noDisposeOnSet"); + var LRU_LIST = makeSymbol("lruList"); + var CACHE = makeSymbol("cache"); + function naiveLength() { + return 1; + } + function LRUCache(options8) { + if (!(this instanceof LRUCache)) { + return new LRUCache(options8); } - return conversion; - }; - } -}); - -// node_modules/color-convert/index.js -var require_color_convert = __commonJS({ - "node_modules/color-convert/index.js"(exports, module) { - var conversions = require_conversions(); - var route = require_route(); - var convert = {}; - var models = Object.keys(conversions); - function wrapRaw(fn) { - var wrappedFn = function(args) { - if (args === void 0 || args === null) { - return args; - } - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); - } - return fn(args); - }; - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; + if (typeof options8 === "number") { + options8 = { max: options8 }; } - return wrappedFn; + if (!options8) { + options8 = {}; + } + var max = this[MAX] = options8.max; + if (!max || !(typeof max === "number") || max <= 0) { + this[MAX] = Infinity; + } + var lc = options8.length || naiveLength; + if (typeof lc !== "function") { + lc = naiveLength; + } + this[LENGTH_CALCULATOR] = lc; + this[ALLOW_STALE] = options8.stale || false; + this[MAX_AGE] = options8.maxAge || 0; + this[DISPOSE] = options8.dispose; + this[NO_DISPOSE_ON_SET] = options8.noDisposeOnSet || false; + this.reset(); } - function wrapRounded(fn) { - var wrappedFn = function(args) { - if (args === void 0 || args === null) { - return args; + Object.defineProperty(LRUCache.prototype, "max", { + set: function(mL) { + if (!mL || !(typeof mL === "number") || mL <= 0) { + mL = Infinity; } - if (arguments.length > 1) { - args = Array.prototype.slice.call(arguments); + this[MAX] = mL; + trim2(this); + }, + get: function() { + return this[MAX]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "allowStale", { + set: function(allowStale) { + this[ALLOW_STALE] = !!allowStale; + }, + get: function() { + return this[ALLOW_STALE]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "maxAge", { + set: function(mA) { + if (!mA || !(typeof mA === "number") || mA < 0) { + mA = 0; } - var result = fn(args); - if (typeof result === "object") { - for (var len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } + this[MAX_AGE] = mA; + trim2(this); + }, + get: function() { + return this[MAX_AGE]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "lengthCalculator", { + set: function(lC) { + if (typeof lC !== "function") { + lC = naiveLength; } - return result; - }; - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; + if (lC !== this[LENGTH_CALCULATOR]) { + this[LENGTH_CALCULATOR] = lC; + this[LENGTH] = 0; + this[LRU_LIST].forEach(function(hit) { + hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); + this[LENGTH] += hit.length; + }, this); + } + trim2(this); + }, + get: function() { + return this[LENGTH_CALCULATOR]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "length", { + get: function() { + return this[LENGTH]; + }, + enumerable: true + }); + Object.defineProperty(LRUCache.prototype, "itemCount", { + get: function() { + return this[LRU_LIST].length; + }, + enumerable: true + }); + LRUCache.prototype.rforEach = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this[LRU_LIST].tail; walker !== null; ) { + var prev = walker.prev; + forEachStep(this, fn, walker, thisp); + walker = prev; + } + }; + function forEachStep(self, fn, node, thisp) { + var hit = node.value; + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) { + hit = void 0; + } + } + if (hit) { + fn.call(thisp, hit.value, hit.key, self); } - return wrappedFn; } - models.forEach(function(fromModel) { - convert[fromModel] = {}; - Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); - Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); - var routes = route(fromModel); - var routeModels = Object.keys(routes); - routeModels.forEach(function(toModel) { - var fn = routes[toModel]; - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); - }); - module.exports = convert; - } -}); - -// node_modules/@babel/code-frame/node_modules/ansi-styles/index.js -var require_ansi_styles = __commonJS({ - "node_modules/@babel/code-frame/node_modules/ansi-styles/index.js"(exports, module) { - "use strict"; - var colorConvert = require_color_convert(); - var wrapAnsi162 = (fn, offset) => function() { - const code = fn.apply(colorConvert, arguments); - return `\x1B[${code + offset}m`; + LRUCache.prototype.forEach = function(fn, thisp) { + thisp = thisp || this; + for (var walker = this[LRU_LIST].head; walker !== null; ) { + var next = walker.next; + forEachStep(this, fn, walker, thisp); + walker = next; + } }; - var wrapAnsi2562 = (fn, offset) => function() { - const code = fn.apply(colorConvert, arguments); - return `\x1B[${38 + offset};5;${code}m`; + LRUCache.prototype.keys = function() { + return this[LRU_LIST].toArray().map(function(k) { + return k.key; + }, this); }; - var wrapAnsi16m2 = (fn, offset) => function() { - const rgb = fn.apply(colorConvert, arguments); - return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; + LRUCache.prototype.values = function() { + return this[LRU_LIST].toArray().map(function(k) { + return k.value; + }, this); }; - function assembleStyles2() { - const codes2 = /* @__PURE__ */ new Map(); - const styles3 = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - styles3.color.grey = styles3.color.gray; - for (const groupName of Object.keys(styles3)) { - const group = styles3[groupName]; - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - styles3[styleName] = { - open: `\x1B[${style[0]}m`, - close: `\x1B[${style[1]}m` + LRUCache.prototype.reset = function() { + if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { + this[LRU_LIST].forEach(function(hit) { + this[DISPOSE](hit.key, hit.value); + }, this); + } + this[CACHE] = new Map2(); + this[LRU_LIST] = new Yallist(); + this[LENGTH] = 0; + }; + LRUCache.prototype.dump = function() { + return this[LRU_LIST].map(function(hit) { + if (!isStale(this, hit)) { + return { + k: hit.key, + v: hit.value, + e: hit.now + (hit.maxAge || 0) }; - group[styleName] = styles3[styleName]; - codes2.set(style[0], style[1]); } - Object.defineProperty(styles3, groupName, { - value: group, - enumerable: false - }); - Object.defineProperty(styles3, "codes", { - value: codes2, - enumerable: false - }); + }, this).toArray().filter(function(h) { + return h; + }); + }; + LRUCache.prototype.dumpLru = function() { + return this[LRU_LIST]; + }; + LRUCache.prototype.inspect = function(n, opts) { + var str2 = "LRUCache {"; + var extras = false; + var as = this[ALLOW_STALE]; + if (as) { + str2 += "\n allowStale: true"; + extras = true; } - const ansi2ansi = (n) => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - styles3.color.close = "\x1B[39m"; - styles3.bgColor.close = "\x1B[49m"; - styles3.color.ansi = { - ansi: wrapAnsi162(ansi2ansi, 0) - }; - styles3.color.ansi256 = { - ansi256: wrapAnsi2562(ansi2ansi, 0) - }; - styles3.color.ansi16m = { - rgb: wrapAnsi16m2(rgb2rgb, 0) - }; - styles3.bgColor.ansi = { - ansi: wrapAnsi162(ansi2ansi, 10) - }; - styles3.bgColor.ansi256 = { - ansi256: wrapAnsi2562(ansi2ansi, 10) - }; - styles3.bgColor.ansi16m = { - rgb: wrapAnsi16m2(rgb2rgb, 10) - }; - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== "object") { - continue; + var max = this[MAX]; + if (max && max !== Infinity) { + if (extras) { + str2 += ","; } - const suite = colorConvert[key]; - if (key === "ansi16") { - key = "ansi"; + str2 += "\n max: " + util2.inspect(max, opts); + extras = true; + } + var maxAge = this[MAX_AGE]; + if (maxAge) { + if (extras) { + str2 += ","; } - if ("ansi16" in suite) { - styles3.color.ansi[key] = wrapAnsi162(suite.ansi16, 0); - styles3.bgColor.ansi[key] = wrapAnsi162(suite.ansi16, 10); + str2 += "\n maxAge: " + util2.inspect(maxAge, opts); + extras = true; + } + var lc = this[LENGTH_CALCULATOR]; + if (lc && lc !== naiveLength) { + if (extras) { + str2 += ","; } - if ("ansi256" in suite) { - styles3.color.ansi256[key] = wrapAnsi2562(suite.ansi256, 0); - styles3.bgColor.ansi256[key] = wrapAnsi2562(suite.ansi256, 10); + str2 += "\n length: " + util2.inspect(this[LENGTH], opts); + extras = true; + } + var didFirst = false; + this[LRU_LIST].forEach(function(item) { + if (didFirst) { + str2 += ",\n "; + } else { + if (extras) { + str2 += ",\n"; + } + didFirst = true; + str2 += "\n "; } - if ("rgb" in suite) { - styles3.color.ansi16m[key] = wrapAnsi16m2(suite.rgb, 0); - styles3.bgColor.ansi16m[key] = wrapAnsi16m2(suite.rgb, 10); + var key2 = util2.inspect(item.key).split("\n").join("\n "); + var val = { value: item.value }; + if (item.maxAge !== maxAge) { + val.maxAge = item.maxAge; + } + if (lc !== naiveLength) { + val.length = item.length; + } + if (isStale(this, item)) { + val.stale = true; } + val = util2.inspect(val, opts).split("\n").join("\n "); + str2 += key2 + " => " + val; + }); + if (didFirst || extras) { + str2 += "\n"; } - return styles3; - } - Object.defineProperty(module, "exports", { - enumerable: true, - get: assembleStyles2 - }); - } -}); - -// node_modules/@babel/code-frame/node_modules/has-flag/index.js -var require_has_flag = __commonJS({ - "node_modules/@babel/code-frame/node_modules/has-flag/index.js"(exports, module) { - "use strict"; - module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf("--"); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + str2 += "}"; + return str2; }; - } -}); - -// node_modules/@babel/code-frame/node_modules/supports-color/index.js -var require_supports_color = __commonJS({ - "node_modules/@babel/code-frame/node_modules/supports-color/index.js"(exports, module) { - "use strict"; - var os2 = __require("os"); - var hasFlag2 = require_has_flag(); - var env2 = process.env; - var forceColor; - if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false")) { - forceColor = false; - } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) { - forceColor = true; - } - if ("FORCE_COLOR" in env2) { - forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0; - } - function translateLevel2(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; - } - function supportsColor2(stream) { - if (forceColor === false) { - return 0; - } - if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) { - return 3; - } - if (hasFlag2("color=256")) { - return 2; - } - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - const min = forceColor ? 1 : 0; - if (process.platform === "win32") { - const osRelease = os2.release().split("."); - if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; + LRUCache.prototype.set = function(key2, value, maxAge) { + maxAge = maxAge || this[MAX_AGE]; + var now = maxAge ? Date.now() : 0; + var len = this[LENGTH_CALCULATOR](value, key2); + if (this[CACHE].has(key2)) { + if (len > this[MAX]) { + del(this, this[CACHE].get(key2)); + return false; } - return 1; - } - if ("CI" in env2) { - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") { - return 1; + var node = this[CACHE].get(key2); + var item = node.value; + if (this[DISPOSE]) { + if (!this[NO_DISPOSE_ON_SET]) { + this[DISPOSE](key2, item.value); + } } - return min; - } - if ("TEAMCITY_VERSION" in env2) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0; - } - if (env2.COLORTERM === "truecolor") { - return 3; + item.now = now; + item.maxAge = maxAge; + item.value = value; + this[LENGTH] += len - item.length; + item.length = len; + this.get(key2); + trim2(this); + return true; } - if ("TERM_PROGRAM" in env2) { - const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env2.TERM_PROGRAM) { - case "iTerm.app": - return version >= 3 ? 3 : 2; - case "Apple_Terminal": - return 2; + var hit = new Entry(key2, value, len, now, maxAge); + if (hit.length > this[MAX]) { + if (this[DISPOSE]) { + this[DISPOSE](key2, value); } + return false; } - if (/-256(color)?$/i.test(env2.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) { - return 1; - } - if ("COLORTERM" in env2) { - return 1; - } - if (env2.TERM === "dumb") { - return min; + this[LENGTH] += hit.length; + this[LRU_LIST].unshift(hit); + this[CACHE].set(key2, this[LRU_LIST].head); + trim2(this); + return true; + }; + LRUCache.prototype.has = function(key2) { + if (!this[CACHE].has(key2)) + return false; + var hit = this[CACHE].get(key2).value; + if (isStale(this, hit)) { + return false; } - return min; - } - function getSupportLevel(stream) { - const level = supportsColor2(stream); - return translateLevel2(level); - } - module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) + return true; }; - } -}); - -// node_modules/@babel/code-frame/node_modules/chalk/templates.js -var require_templates = __commonJS({ - "node_modules/@babel/code-frame/node_modules/chalk/templates.js"(exports, module) { - "use strict"; - var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; - var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; - var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; - var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; - var ESCAPES = /* @__PURE__ */ new Map([ - ["n", "\n"], - ["r", "\r"], - ["t", " "], - ["b", "\b"], - ["f", "\f"], - ["v", "\v"], - ["0", "\0"], - ["\\", "\\"], - ["e", "\x1B"], - ["a", "\x07"] - ]); - function unescape(c) { - if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) { - return String.fromCharCode(parseInt(c.slice(1), 16)); - } - return ESCAPES.get(c) || c; - } - function parseArguments(name, args) { - const results = []; - const chunks = args.trim().split(/\s*,\s*/g); - let matches; - for (const chunk of chunks) { - if (!isNaN(chunk)) { - results.push(Number(chunk)); - } else if (matches = chunk.match(STRING_REGEX)) { - results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr)); + LRUCache.prototype.get = function(key2) { + return get(this, key2, true); + }; + LRUCache.prototype.peek = function(key2) { + return get(this, key2, false); + }; + LRUCache.prototype.pop = function() { + var node = this[LRU_LIST].tail; + if (!node) + return null; + del(this, node); + return node.value; + }; + LRUCache.prototype.del = function(key2) { + del(this, this[CACHE].get(key2)); + }; + LRUCache.prototype.load = function(arr) { + this.reset(); + var now = Date.now(); + for (var l = arr.length - 1; l >= 0; l--) { + var hit = arr[l]; + var expiresAt = hit.e || 0; + if (expiresAt === 0) { + this.set(hit.k, hit.v); } else { - throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + var maxAge = expiresAt - now; + if (maxAge > 0) { + this.set(hit.k, hit.v, maxAge); + } } } - return results; - } - function parseStyle(style) { - STYLE_REGEX.lastIndex = 0; - const results = []; - let matches; - while ((matches = STYLE_REGEX.exec(style)) !== null) { - const name = matches[1]; - if (matches[2]) { - const args = parseArguments(name, matches[2]); - results.push([name].concat(args)); + }; + LRUCache.prototype.prune = function() { + var self = this; + this[CACHE].forEach(function(value, key2) { + get(self, key2, false); + }); + }; + function get(self, key2, doUse) { + var node = self[CACHE].get(key2); + if (node) { + var hit = node.value; + if (isStale(self, hit)) { + del(self, node); + if (!self[ALLOW_STALE]) + hit = void 0; } else { - results.push([name]); + if (doUse) { + self[LRU_LIST].unshiftNode(node); + } } + if (hit) + hit = hit.value; } - return results; + return hit; } - function buildStyle(chalk2, styles3) { - const enabled = {}; - for (const layer of styles3) { - for (const style of layer.styles) { - enabled[style[0]] = layer.inverse ? null : style.slice(1); - } + function isStale(self, hit) { + if (!hit || !hit.maxAge && !self[MAX_AGE]) { + return false; } - let current = chalk2; - for (const styleName of Object.keys(enabled)) { - if (Array.isArray(enabled[styleName])) { - if (!(styleName in current)) { - throw new Error(`Unknown Chalk style: ${styleName}`); - } - if (enabled[styleName].length > 0) { - current = current[styleName].apply(current, enabled[styleName]); - } else { - current = current[styleName]; - } + var stale = false; + var diff = Date.now() - hit.now; + if (hit.maxAge) { + stale = diff > hit.maxAge; + } else { + stale = self[MAX_AGE] && diff > self[MAX_AGE]; + } + return stale; + } + function trim2(self) { + if (self[LENGTH] > self[MAX]) { + for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) { + var prev = walker.prev; + del(self, walker); + walker = prev; } } - return current; } - module.exports = (chalk2, tmp) => { - const styles3 = []; - const chunks = []; - let chunk = []; - tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { - if (escapeChar) { - chunk.push(unescape(escapeChar)); - } else if (style) { - const str = chunk.join(""); - chunk = []; - chunks.push(styles3.length === 0 ? str : buildStyle(chalk2, styles3)(str)); - styles3.push({ inverse, styles: parseStyle(style) }); - } else if (close) { - if (styles3.length === 0) { - throw new Error("Found extraneous } in Chalk template literal"); - } - chunks.push(buildStyle(chalk2, styles3)(chunk.join(""))); - chunk = []; - styles3.pop(); - } else { - chunk.push(chr); + function del(self, node) { + if (node) { + var hit = node.value; + if (self[DISPOSE]) { + self[DISPOSE](hit.key, hit.value); } - }); - chunks.push(chunk.join("")); - if (styles3.length > 0) { - const errMsg = `Chalk template literal is missing ${styles3.length} closing bracket${styles3.length === 1 ? "" : "s"} (\`}\`)`; - throw new Error(errMsg); + self[LENGTH] -= hit.length; + self[CACHE].delete(hit.key); + self[LRU_LIST].removeNode(node); } - return chunks.join(""); - }; + } + function Entry(key2, value, length, now, maxAge) { + this.key = key2; + this.value = value; + this.length = length; + this.now = now; + this.maxAge = maxAge || 0; + } } }); -// node_modules/@babel/code-frame/node_modules/chalk/index.js -var require_chalk = __commonJS({ - "node_modules/@babel/code-frame/node_modules/chalk/index.js"(exports, module) { - "use strict"; - var escapeStringRegexp2 = require_escape_string_regexp(); - var ansiStyles2 = require_ansi_styles(); - var stdoutColor2 = require_supports_color().stdout; - var template = require_templates(); - var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm"); - var levelMapping2 = ["ansi", "ansi", "ansi256", "ansi16m"]; - var skipModels = /* @__PURE__ */ new Set(["gray"]); - var styles3 = /* @__PURE__ */ Object.create(null); - function applyOptions2(obj, options8) { - options8 = options8 || {}; - const scLevel = stdoutColor2 ? stdoutColor2.level : 0; - obj.level = options8.level === void 0 ? scLevel : options8.level; - obj.enabled = "enabled" in options8 ? options8.enabled : obj.level > 0; - } - function Chalk(options8) { - if (!this || !(this instanceof Chalk) || this.template) { - const chalk2 = {}; - applyOptions2(chalk2, options8); - chalk2.template = function() { - const args = [].slice.call(arguments); - return chalkTag.apply(null, [chalk2.template].concat(args)); - }; - Object.setPrototypeOf(chalk2, Chalk.prototype); - Object.setPrototypeOf(chalk2.template, chalk2); - chalk2.template.constructor = Chalk; - return chalk2.template; +// node_modules/sigmund/sigmund.js +var require_sigmund = __commonJS({ + "node_modules/sigmund/sigmund.js"(exports, module) { + module.exports = sigmund; + function sigmund(subject, maxSessions) { + maxSessions = maxSessions || 10; + var notes = []; + var analysis = ""; + var RE = RegExp; + function psychoAnalyze(subject2, session) { + if (session > maxSessions) + return; + if (typeof subject2 === "function" || typeof subject2 === "undefined") { + return; + } + if (typeof subject2 !== "object" || !subject2 || subject2 instanceof RE) { + analysis += subject2; + return; + } + if (notes.indexOf(subject2) !== -1 || session === maxSessions) + return; + notes.push(subject2); + analysis += "{"; + Object.keys(subject2).forEach(function(issue, _, __) { + if (issue.charAt(0) === "_") + return; + var to = typeof subject2[issue]; + if (to === "function" || to === "undefined") + return; + analysis += issue; + psychoAnalyze(subject2[issue], session + 1); + }); } - applyOptions2(this, options8); + psychoAnalyze(subject, 0); + return analysis; } - if (isSimpleWindowsTerm) { - ansiStyles2.blue.open = "\x1B[94m"; + } +}); + +// node_modules/editorconfig/src/lib/fnmatch.js +var require_fnmatch = __commonJS({ + "node_modules/editorconfig/src/lib/fnmatch.js"(exports, module) { + var platform = typeof process === "object" ? process.platform : "win32"; + if (module) + module.exports = minimatch; + else + exports.minimatch = minimatch; + minimatch.Minimatch = Minimatch; + var LRU = require_lru_cache(); + var cache3 = minimatch.cache = new LRU({ max: 100 }); + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var sigmund = require_sigmund(); + var path13 = __require("path"); + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c2) { + set2[c2] = true; + return set2; + }, {}); } - for (const key of Object.keys(ansiStyles2)) { - ansiStyles2[key].closeRe = new RegExp(escapeStringRegexp2(ansiStyles2[key].close), "g"); - styles3[key] = { - get() { - const codes2 = ansiStyles2[key]; - return build.call(this, this._styles ? this._styles.concat(codes2) : [codes2], this._empty, key); - } + var slashSplit = /\/+/; + minimatch.monkeyPatch = monkeyPatch; + function monkeyPatch() { + var desc = Object.getOwnPropertyDescriptor(String.prototype, "match"); + var orig = desc.value; + desc.value = function(p) { + if (p instanceof Minimatch) + return p.match(this); + return orig.call(this, p); }; + Object.defineProperty(String.prototype, desc); } - styles3.visible = { - get() { - return build.call(this, this._styles || [], true, "visible"); - } - }; - ansiStyles2.color.closeRe = new RegExp(escapeStringRegexp2(ansiStyles2.color.close), "g"); - for (const model of Object.keys(ansiStyles2.color.ansi)) { - if (skipModels.has(model)) { - continue; - } - styles3[model] = { - get() { - const level = this.level; - return function() { - const open = ansiStyles2.color[levelMapping2[level]][model].apply(null, arguments); - const codes2 = { - open, - close: ansiStyles2.color.close, - closeRe: ansiStyles2.color.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes2) : [codes2], this._empty, model); - }; - } - }; - } - ansiStyles2.bgColor.closeRe = new RegExp(escapeStringRegexp2(ansiStyles2.bgColor.close), "g"); - for (const model of Object.keys(ansiStyles2.bgColor.ansi)) { - if (skipModels.has(model)) { - continue; - } - const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); - styles3[bgModel] = { - get() { - const level = this.level; - return function() { - const open = ansiStyles2.bgColor[levelMapping2[level]][model].apply(null, arguments); - const codes2 = { - open, - close: ansiStyles2.bgColor.close, - closeRe: ansiStyles2.bgColor.closeRe - }; - return build.call(this, this._styles ? this._styles.concat(codes2) : [codes2], this._empty, model); - }; - } + minimatch.filter = filter2; + function filter2(pattern, options8) { + options8 = options8 || {}; + return function(p, i, list) { + return minimatch(p, pattern, options8); }; } - var proto2 = Object.defineProperties(() => { - }, styles3); - function build(_styles, _empty, key) { - const builder = function() { - return applyStyle2.apply(builder, arguments); - }; - builder._styles = _styles; - builder._empty = _empty; - const self = this; - Object.defineProperty(builder, "level", { - enumerable: true, - get() { - return self.level; - }, - set(level) { - self.level = level; - } + function ext(a, b) { + a = a || {}; + b = b || {}; + var t = {}; + Object.keys(b).forEach(function(k) { + t[k] = b[k]; }); - Object.defineProperty(builder, "enabled", { - enumerable: true, - get() { - return self.enabled; - }, - set(enabled) { - self.enabled = enabled; - } + Object.keys(a).forEach(function(k) { + t[k] = a[k]; }); - builder.hasGrey = this.hasGrey || key === "gray" || key === "grey"; - builder.__proto__ = proto2; - return builder; + return t; } - function applyStyle2() { - const args = arguments; - const argsLen = args.length; - let str = String(arguments[0]); - if (argsLen === 0) { - return ""; + minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return minimatch; + var orig = minimatch; + var m = function minimatch2(p, pattern, options8) { + return orig.minimatch(p, pattern, ext(def, options8)); + }; + m.Minimatch = function Minimatch2(pattern, options8) { + return new orig.Minimatch(pattern, ext(def, options8)); + }; + return m; + }; + Minimatch.defaults = function(def) { + if (!def || !Object.keys(def).length) + return Minimatch; + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options8) { + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); } - if (argsLen > 1) { - for (let a = 1; a < argsLen; a++) { - str += " " + args[a]; - } + if (!options8) + options8 = {}; + if (!options8.nocomment && pattern.charAt(0) === "#") { + return false; } - if (!this.enabled || this.level <= 0 || !str) { - return this._empty ? "" : str; + if (pattern.trim() === "") + return p === ""; + return new Minimatch(pattern, options8).match(p); + } + function Minimatch(pattern, options8) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options8, cache3); } - const originalDim = ansiStyles2.dim.open; - if (isSimpleWindowsTerm && this.hasGrey) { - ansiStyles2.dim.open = ""; + if (typeof pattern !== "string") { + throw new TypeError("glob pattern string required"); } - for (const code of this._styles.slice().reverse()) { - str = code.open + str.replace(code.closeRe, code.open) + code.close; - str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`); + if (!options8) + options8 = {}; + if (platform === "win32") { + pattern = pattern.split("\\").join("/"); } - ansiStyles2.dim.open = originalDim; - return str; + var cacheKey = pattern + "\n" + sigmund(options8); + var cached = minimatch.cache.get(cacheKey); + if (cached) + return cached; + minimatch.cache.set(cacheKey, this); + this.options = options8; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.make(); } - function chalkTag(chalk2, strings) { - if (!Array.isArray(strings)) { - return [].slice.call(arguments, 1).join(" "); + Minimatch.prototype.make = make; + function make() { + if (this._made) + return; + var pattern = this.pattern; + var options8 = this.options; + if (!options8.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; } - const args = [].slice.call(arguments, 2); - const parts = [strings.raw[0]]; - for (let i = 1; i < strings.length; i++) { - parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&")); - parts.push(String(strings.raw[i])); + if (!pattern) { + this.empty = true; + return; } - return template(chalk2, parts.join("")); + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options8.debug) + console.error(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + if (options8.debug) + console.error(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + if (options8.debug) + console.error(this.pattern, set2); + set2 = set2.filter(function(s) { + return -1 === s.indexOf(false); + }); + if (options8.debug) + console.error(this.pattern, set2); + this.set = set2; } - Object.defineProperties(Chalk.prototype, styles3); - module.exports = Chalk(); - module.exports.supportsColor = stdoutColor2; - module.exports.default = module.exports; - } -}); - -// node_modules/@babel/highlight/lib/index.js -var require_lib2 = __commonJS({ - "node_modules/@babel/highlight/lib/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = highlight; - exports.shouldHighlight = shouldHighlight; - var _jsTokens = require_js_tokens(); - var _helperValidatorIdentifier = require_lib(); - var _chalk = _interopRequireWildcard(require_chalk(), true); - function _getRequireWildcardCache(nodeInterop) { - if (typeof WeakMap !== "function") - return null; - var cacheBabelInterop = /* @__PURE__ */ new WeakMap(); - var cacheNodeInterop = /* @__PURE__ */ new WeakMap(); - return (_getRequireWildcardCache = function(nodeInterop2) { - return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); - } - function _interopRequireWildcard(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) { - return obj; - } - if (obj === null || typeof obj !== "object" && typeof obj !== "function") { - return { default: obj }; - } - var cache2 = _getRequireWildcardCache(nodeInterop); - if (cache2 && cache2.has(obj)) { - return cache2.get(obj); - } - var newObj = {}; - var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var key in obj) { - if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - if (desc && (desc.get || desc.set)) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - newObj.default = obj; - if (cache2) { - cache2.set(obj, newObj); + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern, negate = false, options8 = this.options, negateOffset = 0; + if (options8.nonegate) + return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; } - return newObj; - } - var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]); - function getDefs(chalk2) { - return { - keyword: chalk2.cyan, - capitalized: chalk2.yellow, - jsxIdentifier: chalk2.yellow, - punctuator: chalk2.yellow, - number: chalk2.magenta, - string: chalk2.green, - regex: chalk2.magenta, - comment: chalk2.grey, - invalid: chalk2.white.bgRed.bold - }; + if (negateOffset) + this.pattern = pattern.substr(negateOffset); + this.negate = negate; } - var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - var BRACKET = /^[()[\]{}]$/; - var tokenize; - { - const JSX_TAG = /^[a-z][\w-]*$/i; - const getTokenType = function(token, offset, text) { - if (token.type === "name") { - if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) { - return "keyword"; - } - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) == " colorize(str)).join("\n"); - } else { - highlighted += value; - } - } - return highlighted; - } - function shouldHighlight(options8) { - return _chalk.default.level > 0 || options8.forceColor; - } - var chalkWithForcedColor = void 0; - function getChalk(forceColor) { - if (forceColor) { - var _chalkWithForcedColor; - (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({ - enabled: true, - level: 1 + var tail = braceExpand(pattern.substr(i), options8); + return tail.map(function(t) { + return prefix + t; }); - return chalkWithForcedColor; } - return _chalk.default; - } - { - { - exports.getChalk = (options8) => getChalk(options8.forceColor); + var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/); + if (numset) { + var suf = braceExpand(pattern.substr(numset[0].length), options8), start = +numset[1], end = +numset[2], inc = start > end ? -1 : 1, set2 = []; + for (var i = start; i != end + inc; i += inc) { + for (var ii = 0, ll = suf.length; ii < ll; ii++) { + set2.push(i + suf[ii]); + } + } + return set2; } - } - function highlight(code, options8 = {}) { - if (code !== "" && shouldHighlight(options8)) { - const defs = getDefs(getChalk(options8.forceColor)); - return highlightTokens(defs, code); - } else { - return code; + var i = 1, depth = 1, set2 = [], member = "", sawEnd = false, escaping = false; + function addMember() { + set2.push(member); + member = ""; } - } - } -}); - -// node_modules/@babel/code-frame/lib/index.js -var require_lib3 = __commonJS({ - "node_modules/@babel/code-frame/lib/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.codeFrameColumns = codeFrameColumns3; - exports.default = _default; - var _highlight = require_lib2(); - var _chalk = _interopRequireWildcard(require_chalk(), true); - function _getRequireWildcardCache(nodeInterop) { - if (typeof WeakMap !== "function") - return null; - var cacheBabelInterop = /* @__PURE__ */ new WeakMap(); - var cacheNodeInterop = /* @__PURE__ */ new WeakMap(); - return (_getRequireWildcardCache = function(nodeInterop2) { - return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop; - })(nodeInterop); - } - function _interopRequireWildcard(obj, nodeInterop) { - if (!nodeInterop && obj && obj.__esModule) { - return obj; - } - if (obj === null || typeof obj !== "object" && typeof obj !== "function") { - return { default: obj }; - } - var cache2 = _getRequireWildcardCache(nodeInterop); - if (cache2 && cache2.has(obj)) { - return cache2.get(obj); - } - var newObj = {}; - var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var key in obj) { - if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - if (desc && (desc.get || desc.set)) { - Object.defineProperty(newObj, key, desc); + FOR: + for (i = 1, l = pattern.length; i < l; i++) { + var c2 = pattern.charAt(i); + if (escaping) { + escaping = false; + member += "\\" + c2; } else { - newObj[key] = obj[key]; + switch (c2) { + case "\\": + escaping = true; + continue; + case "{": + depth++; + member += "{"; + continue; + case "}": + depth--; + if (depth === 0) { + addMember(); + i++; + break FOR; + } else { + member += c2; + continue; + } + case ",": + if (depth === 1) { + addMember(); + } else { + member += c2; + } + continue; + default: + member += c2; + continue; + } } } + if (depth !== 0) { + return braceExpand("\\" + pattern, options8); } - newObj.default = obj; - if (cache2) { - cache2.set(obj, newObj); - } - return newObj; - } - var chalkWithForcedColor = void 0; - function getChalk(forceColor) { - if (forceColor) { - var _chalkWithForcedColor; - (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({ - enabled: true, - level: 1 + var suf = braceExpand(pattern.substr(i), options8); + var addBraces = set2.length === 1; + set2 = set2.map(function(p) { + return braceExpand(p, options8); + }); + set2 = set2.reduce(function(l2, r) { + return l2.concat(r); + }); + if (addBraces) { + set2 = set2.map(function(s) { + return "{" + s + "}"; }); - return chalkWithForcedColor; - } - return _chalk.default; - } - var deprecationWarningShown = false; - function getDefs(chalk2) { - return { - gutter: chalk2.grey, - marker: chalk2.red.bold, - message: chalk2.red.bold - }; - } - var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - function getMarkerLines(loc, source, opts) { - const startLoc = Object.assign({ - column: 0, - line: -1 - }, loc.start); - const endLoc = Object.assign({}, startLoc, loc.end); - const { - linesAbove = 2, - linesBelow = 3 - } = opts || {}; - const startLine = startLoc.line; - const startColumn = startLoc.column; - const endLine = endLoc.line; - const endColumn = endLoc.column; - let start = Math.max(startLine - (linesAbove + 1), 0); - let end = Math.min(source.length, endLine + linesBelow); - if (startLine === -1) { - start = 0; - } - if (endLine === -1) { - end = source.length; } - const lineDiff = endLine - startLine; - const markerLines = {}; - if (lineDiff) { - for (let i = 0; i <= lineDiff; i++) { - const lineNumber = i + startLine; - if (!startColumn) { - markerLines[lineNumber] = true; - } else if (i === 0) { - const sourceLength = source[lineNumber - 1].length; - markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; - } else if (i === lineDiff) { - markerLines[lineNumber] = [0, endColumn]; - } else { - const sourceLength = source[lineNumber - i].length; - markerLines[lineNumber] = [0, sourceLength]; - } - } - } else { - if (startColumn === endColumn) { - if (startColumn) { - markerLines[startLine] = [startColumn, 0]; - } else { - markerLines[startLine] = true; - } - } else { - markerLines[startLine] = [startColumn, endColumn - startColumn]; + var ret = []; + for (var i = 0, l = set2.length; i < l; i++) { + for (var ii = 0, ll = suf.length; ii < ll; ii++) { + ret.push(set2[i] + suf[ii]); } } - return { - start, - end, - markerLines - }; + return ret; } - function codeFrameColumns3(rawLines, loc, opts = {}) { - const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts); - const chalk2 = getChalk(opts.forceColor); - const defs = getDefs(chalk2); - const maybeHighlight = (chalkFn, string) => { - return highlighted ? chalkFn(string) : string; - }; - const lines = rawLines.split(NEWLINE); - const { - start, - end, - markerLines - } = getMarkerLines(loc, lines, opts); - const hasColumns = loc.start && typeof loc.start.column === "number"; - const numberMaxWidth = String(end).length; - const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines; - let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line2, index) => { - const number = start + 1 + index; - const paddedNumber = ` ${number}`.slice(-numberMaxWidth); - const gutter = ` ${paddedNumber} |`; - const hasMarker = markerLines[number]; - const lastMarkerLine = !markerLines[number + 1]; - if (hasMarker) { - let markerLine = ""; - if (Array.isArray(hasMarker)) { - const markerSpacing = line2.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); - const numberOfMarkers = hasMarker[1] || 1; - markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); - if (lastMarkerLine && opts.message) { - markerLine += " " + maybeHighlight(defs.message, opts.message); - } + Minimatch.prototype.parse = parse6; + var SUBPARSE = {}; + function parse6(pattern, isSub) { + var options8 = this.options; + if (!options8.noglobstar && pattern === "**") + return GLOBSTAR; + if (pattern === "") + return ""; + var re = "", hasMagic = !!options8.nocase, escaping = false, patternListStack = [], plType, stateChar, inClass = false, reClassStart = -1, classStart = -1, patternStart = pattern.charAt(0) === "." ? "" : options8.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; } - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line2.length > 0 ? ` ${line2}` : "", markerLine].join(""); - } else { - return ` ${maybeHighlight(defs.gutter, gutter)}${line2.length > 0 ? ` ${line2}` : ""}`; + stateChar = false; } - }).join("\n"); - if (opts.message && !hasColumns) { - frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} -${frame}`; - } - if (highlighted) { - return chalk2.reset(frame); - } else { - return frame; } - } - function _default(rawLines, lineNumber, colNumber, opts = {}) { - if (!deprecationWarningShown) { - deprecationWarningShown = true; - const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; - if (process.emitWarning) { - process.emitWarning(message, "DeprecationWarning"); - } else { - const deprecationError = new Error(message); - deprecationError.name = "DeprecationWarning"; - console.warn(new Error(message)); + for (var i = 0, len = pattern.length, c2; i < len && (c2 = pattern.charAt(i)); i++) { + if (options8.debug) { + console.error("%s %s %s %j", pattern, i, re, c2); } - } - colNumber = Math.max(colNumber, 0); - const location = { - start: { - column: colNumber, - line: lineNumber + if (escaping && reSpecials[c2]) { + re += "\\" + c2; + escaping = false; + continue; } - }; - return codeFrameColumns3(rawLines, location, opts); - } - } -}); - -// node_modules/p-defer/index.js -var require_p_defer = __commonJS({ - "node_modules/p-defer/index.js"(exports, module) { - "use strict"; - module.exports = () => { - const ret = {}; - ret.promise = new Promise((resolve2, reject) => { - ret.resolve = resolve2; - ret.reject = reject; - }); - return ret; - }; - } -}); - -// node_modules/map-age-cleaner/dist/index.js -var require_dist = __commonJS({ - "node_modules/map-age-cleaner/dist/index.js"(exports, module) { - "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + SWITCH: + switch (c2) { + case "/": + return false; + case "\\": + clearStateChar(); + escaping = true; + continue; + case "?": + case "*": + case "+": + case "@": + case "!": + if (options8.debug) { + console.error("%s %s %s %j <-- stateChar", pattern, i, re, c2); + } + if (inClass) { + if (c2 === "!" && i === classStart + 1) + c2 = "^"; + re += c2; + continue; + } + clearStateChar(); + stateChar = c2; + if (options8.noext) + clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + plType = stateChar; + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }); + re += stateChar === "!" ? "(?:(?!" : "(?:"; + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + hasMagic = true; + re += ")"; + plType = patternListStack.pop().type; + switch (plType) { + case "!": + re += "[^/]*?)"; + break; + case "?": + case "+": + case "*": + re += plType; + case "@": + break; + } + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + re += "|"; + continue; + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c2; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c2; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c2; + escaping = false; + continue; + } + hasMagic = true; + inClass = false; + re += c2; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c2] && !(c2 === "^" && inClass)) { + re += "\\"; + } + re += c2; } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + } + if (inClass) { + var cs = pattern.substr(classStart + 1), sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + var pl; + while (pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3); + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; } - } - function step(result) { - result.done ? resolve2(result.value) : new P(function(resolve3) { - resolve3(result.value); - }).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); + return $1 + $1 + $2 + "|"; + }); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case ".": + case "[": + case "(": + addPatternStart = true; + } + if (re !== "" && hasMagic) + re = "(?=.)" + re; + if (addPatternStart) + re = patternStart + re; + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options8.nocase ? "i" : "", regExp = new RegExp("^" + re + "$", flags); + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options8) { + return new Minimatch(pattern, options8 || {}).makeRe(); }; - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) + return this.regexp; + var set2 = this.set; + if (!set2.length) + return this.regexp = false; + var options8 = this.options; + var twoStar = options8.noglobstar ? star : options8.dot ? twoStarDot : twoStarNoDot, flags = options8.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) + re = "^(?!" + re + ").*$"; + try { + return this.regexp = new RegExp(re, flags); + } catch (ex) { + return this.regexp = false; + } + } + minimatch.match = function(list, pattern, options8) { + var mm = new Minimatch(pattern, options8); + list = list.filter(function(f) { + return mm.match(f); + }); + if (options8.nonull && !list.length) { + list.push(pattern); + } + return list; }; - Object.defineProperty(exports, "__esModule", { value: true }); - var p_defer_1 = __importDefault(require_p_defer()); - function mapAgeCleaner2(map, property = "maxAge") { - let processingKey; - let processingTimer; - let processingDeferred; - const cleanup = () => __awaiter(this, void 0, void 0, function* () { - if (processingKey !== void 0) { - return; + Minimatch.prototype.match = match; + function match(f, partial) { + if (this.comment) + return false; + if (this.empty) + return f === ""; + if (f === "/" && partial) + return true; + var options8 = this.options; + if (platform === "win32") { + f = f.split("\\").join("/"); + } + f = f.split(slashSplit); + if (options8.debug) { + console.error(this.pattern, "split", f); + } + var set2 = this.set; + for (var i = 0, l = set2.length; i < l; i++) { + var pattern = set2[i]; + var hit = this.matchOne(f, pattern, partial); + if (hit) { + if (options8.flipNegate) + return true; + return !this.negate; } - const setupTimer = (item) => __awaiter(this, void 0, void 0, function* () { - processingDeferred = p_defer_1.default(); - const delay = item[1][property] - Date.now(); - if (delay <= 0) { - map.delete(item[0]); - processingDeferred.resolve(); - return; - } - processingKey = item[0]; - processingTimer = setTimeout(() => { - map.delete(item[0]); - if (processingDeferred) { - processingDeferred.resolve(); - } - }, delay); - if (typeof processingTimer.unref === "function") { - processingTimer.unref(); - } - return processingDeferred.promise; - }); - try { - for (const entry of map) { - yield setupTimer(entry); + } + if (options8.flipNegate) + return false; + return this.negate; + } + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options8 = this.options; + if (options8.debug) { + console.error( + "matchOne", + { + "this": this, + file, + pattern } - } catch (_a) { + ); + } + if (options8.matchBase && pattern.length === 1) { + file = path13.basename(file.join("/")).split("/"); + } + if (options8.debug) { + console.error("matchOne", file.length, pattern.length); + } + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + if (options8.debug) { + console.error("matchOne loop"); } - processingKey = void 0; - }); - const reset = () => { - processingKey = void 0; - if (processingTimer !== void 0) { - clearTimeout(processingTimer); - processingTimer = void 0; - } - if (processingDeferred !== void 0) { - processingDeferred.reject(void 0); - processingDeferred = void 0; + var p = pattern[pi], f = file[fi]; + if (options8.debug) { + console.error(pattern, p, f); } - }; - const originalSet = map.set.bind(map); - map.set = (key, value) => { - if (map.has(key)) { - map.delete(key); + if (p === false) + return false; + if (p === GLOBSTAR) { + if (options8.debug) + console.error("GLOBSTAR", [pattern, p, f]); + var fr = fi, pr = pi + 1; + if (pr === pl) { + if (options8.debug) + console.error("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options8.dot && file[fi].charAt(0) === ".") + return false; + } + return true; + } + WHILE: + while (fr < fl) { + var swallowee = file[fr]; + if (options8.debug) { + console.error( + "\nglobstar while", + file, + fr, + pattern, + pr, + swallowee + ); + } + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + if (options8.debug) + console.error("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options8.dot && swallowee.charAt(0) === ".") { + if (options8.debug) + console.error("dot detected!", file, fr, pattern, pr); + break WHILE; + } + if (options8.debug) + console.error("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + if (fr === fl) + return true; + } + return false; } - const result = originalSet(key, value); - if (processingKey && processingKey === key) { - reset(); + var hit; + if (typeof p === "string") { + if (options8.nocase) { + hit = f.toLowerCase() === p.toLowerCase(); + } else { + hit = f === p; + } + if (options8.debug) { + console.error("string match", p, f, hit); + } + } else { + hit = f.match(p); + if (options8.debug) { + console.error("pattern match", p, f, hit); + } } - cleanup(); - return result; - }; - cleanup(); - return map; + if (!hit) + return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + var emptyFileEnd = fi === fl - 1 && file[fi] === ""; + return emptyFileEnd; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } - exports.default = mapAgeCleaner2; - module.exports = mapAgeCleaner2; - module.exports.default = mapAgeCleaner2; } }); -// node_modules/semver/internal/debug.js -var require_debug = __commonJS({ - "node_modules/semver/internal/debug.js"(exports, module) { - var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { +// node_modules/editorconfig/src/lib/ini.js +var require_ini = __commonJS({ + "node_modules/editorconfig/src/lib/ini.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function(resolve3, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve3(result.value) : new P(function(resolve4) { + resolve4(result.value); + }).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); }; - module.exports = debug; + var __generator = exports && exports.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + 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; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) + result[k] = mod[k]; + } + result["default"] = mod; + return result; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + var fs7 = __importStar(__require("fs")); + var regex = { + section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/, + param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/, + comment: /^\s*[#;].*$/ + }; + function parse6(file) { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a) { + return [2, new Promise(function(resolve3, reject) { + fs7.readFile(file, "utf8", function(err, data) { + if (err) { + reject(err); + return; + } + resolve3(parseString(data)); + }); + })]; + }); + }); + } + exports.parse = parse6; + function parseSync(file) { + return parseString(fs7.readFileSync(file, "utf8")); + } + exports.parseSync = parseSync; + function parseString(data) { + var sectionBody = {}; + var sectionName = null; + var value = [[sectionName, sectionBody]]; + var lines = data.split(/\r\n|\r|\n/); + lines.forEach(function(line3) { + var match; + if (regex.comment.test(line3)) { + return; + } + if (regex.param.test(line3)) { + match = line3.match(regex.param); + sectionBody[match[1]] = match[2]; + } else if (regex.section.test(line3)) { + match = line3.match(regex.section); + sectionName = match[1]; + sectionBody = {}; + value.push([sectionName, sectionBody]); + } + }); + return value; + } + exports.parseString = parseString; } }); -// node_modules/semver/internal/constants.js -var require_constants4 = __commonJS({ - "node_modules/semver/internal/constants.js"(exports, module) { - var SEMVER_SPEC_VERSION = "2.0.0"; - var MAX_LENGTH = 256; - var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ - 9007199254740991; - var MAX_SAFE_COMPONENT_LENGTH = 16; - var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; - var RELEASE_TYPES = [ - "major", - "premajor", - "minor", - "preminor", - "patch", - "prepatch", - "prerelease" - ]; +// node_modules/editorconfig/package.json +var require_package = __commonJS({ + "node_modules/editorconfig/package.json"(exports, module) { module.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 1, - FLAG_LOOSE: 2 - }; - } -}); - -// node_modules/semver/internal/re.js -var require_re = __commonJS({ - "node_modules/semver/internal/re.js"(exports, module) { - var { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH - } = require_constants4(); - var debug = require_debug(); - exports = module.exports = {}; - var re = exports.re = []; - var safeRe = exports.safeRe = []; - var src = exports.src = []; - var t = exports.t = {}; - var R = 0; - var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; - var safeRegexReplacements = [ - ["\\s", 1], - ["\\d", MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] - ]; - var makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); - } - return value; - }; - var createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value); - const index = R++; - debug(name, index, value); - t[name] = index; - src[index] = value; - re[index] = new RegExp(value, isGlobal ? "g" : void 0); - safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); - }; - createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); - createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); - createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); - createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); - createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); - createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); - createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); - createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); - createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); - createToken("FULL", `^${src[t.FULLPLAIN]}$`); - createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); - createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); - createToken("GTLT", "((?:<|>)?=?)"); - createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); - createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); - createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); - createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`); - createToken("COERCERTL", src[t.COERCE], true); - createToken("LONETILDE", "(?:~>?)"); - createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); - exports.tildeTrimReplace = "$1~"; - createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); - createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("LONECARET", "(?:\\^)"); - createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); - exports.caretTrimReplace = "$1^"; - createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); - createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); - createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); - createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); - exports.comparatorTrimReplace = "$1$2$3"; - createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); - createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); - createToken("STAR", "(<|>)?=?\\s*\\*"); - createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); - createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); - } -}); - -// node_modules/semver/internal/parse-options.js -var require_parse_options = __commonJS({ - "node_modules/semver/internal/parse-options.js"(exports, module) { - var looseOption = Object.freeze({ loose: true }); - var emptyOpts = Object.freeze({}); - var parseOptions = (options8) => { - if (!options8) { - return emptyOpts; - } - if (typeof options8 !== "object") { - return looseOption; - } - return options8; - }; - module.exports = parseOptions; - } -}); - -// node_modules/semver/internal/identifiers.js -var require_identifiers = __commonJS({ - "node_modules/semver/internal/identifiers.js"(exports, module) { - var numeric = /^[0-9]+$/; - var compareIdentifiers = (a, b) => { - const anum = numeric.test(a); - const bnum = numeric.test(b); - if (anum && bnum) { - a = +a; - b = +b; + name: "editorconfig", + version: "0.15.3", + description: "EditorConfig File Locator and Interpreter for Node.js", + keywords: [ + "editorconfig", + "core" + ], + main: "src/index.js", + contributors: [ + "Hong Xu (topbug.net)", + "Jed Mao (https://github.com/jedmao/)", + "Trey Hunner (http://treyhunner.com)" + ], + directories: { + bin: "./bin", + lib: "./lib" + }, + scripts: { + clean: "rimraf dist", + prebuild: "npm run clean", + build: "tsc", + pretest: "npm run lint && npm run build && npm run copy && cmake .", + test: "ctest .", + "pretest:ci": "npm run pretest", + "test:ci": "ctest -VV --output-on-failure .", + lint: "npm run eclint && npm run tslint", + eclint: 'eclint check --indent_size ignore "src/**"', + tslint: "tslint --project tsconfig.json --exclude package.json", + copy: "cpy .npmignore LICENSE README.md CHANGELOG.md dist && cpy bin/* dist/bin && cpy src/lib/fnmatch*.* dist/src/lib", + prepub: "npm run lint && npm run build && npm run copy", + pub: "npm publish ./dist" + }, + repository: { + type: "git", + url: "git://github.com/editorconfig/editorconfig-core-js.git" + }, + bugs: "https://github.com/editorconfig/editorconfig-core-js/issues", + author: "EditorConfig Team", + license: "MIT", + dependencies: { + commander: "^2.19.0", + "lru-cache": "^4.1.5", + semver: "^5.6.0", + sigmund: "^1.0.1" + }, + devDependencies: { + "@types/mocha": "^5.2.6", + "@types/node": "^10.12.29", + "@types/semver": "^5.5.0", + "cpy-cli": "^2.0.0", + eclint: "^2.8.1", + mocha: "^5.2.0", + rimraf: "^2.6.3", + should: "^13.2.3", + tslint: "^5.13.1", + typescript: "^3.3.3333" } - return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; - }; - var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); - module.exports = { - compareIdentifiers, - rcompareIdentifiers }; } }); -// node_modules/semver/classes/semver.js -var require_semver = __commonJS({ - "node_modules/semver/classes/semver.js"(exports, module) { - var debug = require_debug(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4(); - var { safeRe: re, t } = require_re(); - var parseOptions = require_parse_options(); - var { compareIdentifiers } = require_identifiers(); - var SemVer = class _SemVer { - constructor(version, options8) { - options8 = parseOptions(options8); - if (version instanceof _SemVer) { - if (version.loose === !!options8.loose && version.includePrerelease === !!options8.includePrerelease) { - return version; - } else { - version = version.version; +// node_modules/editorconfig/src/index.js +var require_src = __commonJS({ + "node_modules/editorconfig/src/index.js"(exports) { + "use strict"; + var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function(resolve3, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } - } else if (typeof version !== "string") { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); - } - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ); - } - debug("SemVer", version, options8); - this.options = options8; - this.loose = !!options8.loose; - this.includePrerelease = !!options8.includePrerelease; - const m = version.trim().match(options8.loose ? re[t.LOOSE] : re[t.FULL]); - if (!m) { - throw new TypeError(`Invalid Version: ${version}`); - } - this.raw = version; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError("Invalid major version"); } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError("Invalid minor version"); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError("Invalid patch version"); + function step(result) { + result.done ? resolve3(result.value) : new P(function(resolve4) { + resolve4(result.value); + }).then(fulfilled, rejected); } - if (!m[4]) { - this.prerelease = []; - } else { - this.prerelease = m[4].split(".").map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num; - } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __generator = exports && exports.__generator || function(thisArg, body) { + var _ = { label: 0, sent: function() { + if (t[0] & 1) + throw t[1]; + return t[1]; + }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { + return this; + }), g; + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) + throw new TypeError("Generator is already executing."); + while (_) + try { + 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; + if (y = 0, t) + op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) + _.ops.pop(); + _.trys.pop(); + continue; } - return id; - }); - } - this.build = m[5] ? m[5].split(".") : []; - this.format(); + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; } - format() { - this.version = `${this.major}.${this.minor}.${this.patch}`; - if (this.prerelease.length) { - this.version += `-${this.prerelease.join(".")}`; - } - return this.version; + }; + var __importStar = exports && exports.__importStar || function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k in mod) + if (Object.hasOwnProperty.call(mod, k)) + result[k] = mod[k]; } - toString() { - return this.version; + result["default"] = mod; + return result; + }; + var __importDefault = exports && exports.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports, "__esModule", { value: true }); + var fs7 = __importStar(__require("fs")); + var path13 = __importStar(__require("path")); + var semver = { + gte: require_gte() + }; + var fnmatch_1 = __importDefault(require_fnmatch()); + var ini_1 = require_ini(); + exports.parseString = ini_1.parseString; + var package_json_1 = __importDefault(require_package()); + var knownProps = { + end_of_line: true, + indent_style: true, + indent_size: true, + insert_final_newline: true, + trim_trailing_whitespace: true, + charset: true + }; + function fnmatch(filepath, glob) { + var matchOptions = { matchBase: true, dot: true, noext: true }; + glob = glob.replace(/\*\*/g, "{*,**/**/**}"); + return fnmatch_1.default(filepath, glob, matchOptions); + } + function getConfigFileNames(filepath, options8) { + var paths = []; + do { + filepath = path13.dirname(filepath); + paths.push(path13.join(filepath, options8.config)); + } while (filepath !== options8.root); + return paths; + } + function processMatches(matches, version) { + if ("indent_style" in matches && matches.indent_style === "tab" && !("indent_size" in matches) && semver.gte(version, "0.10.0")) { + matches.indent_size = "tab"; } - compare(other) { - debug("SemVer.compare", this.version, this.options, other); - if (!(other instanceof _SemVer)) { - if (typeof other === "string" && other === this.version) { - return 0; + if ("indent_size" in matches && !("tab_width" in matches) && matches.indent_size !== "tab") { + matches.tab_width = matches.indent_size; + } + if ("indent_size" in matches && "tab_width" in matches && matches.indent_size === "tab") { + matches.indent_size = matches.tab_width; + } + return matches; + } + function processOptions(options8, filepath) { + if (options8 === void 0) { + options8 = {}; + } + return { + config: options8.config || ".editorconfig", + version: options8.version || package_json_1.default.version, + root: path13.resolve(options8.root || path13.parse(filepath).root) + }; + } + function buildFullGlob(pathPrefix, glob) { + switch (glob.indexOf("/")) { + case -1: + glob = "**/" + glob; + break; + case 0: + glob = glob.substring(1); + break; + default: + break; + } + return path13.join(pathPrefix, glob); + } + function extendProps(props, options8) { + if (props === void 0) { + props = {}; + } + if (options8 === void 0) { + options8 = {}; + } + for (var key2 in options8) { + if (options8.hasOwnProperty(key2)) { + var value = options8[key2]; + var key22 = key2.toLowerCase(); + var value2 = value; + if (knownProps[key22]) { + value2 = value.toLowerCase(); } - other = new _SemVer(other, this.options); - } - if (other.version === this.version) { - return 0; + try { + value2 = JSON.parse(value); + } catch (e) { + } + if (typeof value === "undefined" || value === null) { + value2 = String(value); + } + props[key22] = value2; } - return this.compareMain(other) || this.comparePre(other); } - compareMain(other) { - if (!(other instanceof _SemVer)) { - other = new _SemVer(other, this.options); + return props; + } + function parseFromConfigs(configs, filepath, options8) { + return processMatches(configs.reverse().reduce(function(matches, file) { + var pathPrefix = path13.dirname(file.name); + file.contents.forEach(function(section) { + var glob = section[0]; + var options22 = section[1]; + if (!glob) { + return; + } + var fullGlob = buildFullGlob(pathPrefix, glob); + if (!fnmatch(filepath, fullGlob)) { + return; + } + matches = extendProps(matches, options22); + }); + return matches; + }, {}), options8.version); + } + function getConfigsForFiles(files) { + var configs = []; + for (var i in files) { + if (files.hasOwnProperty(i)) { + var file = files[i]; + var contents = ini_1.parseString(file.contents); + configs.push({ + name: file.name, + contents + }); + if ((contents[0][1].root || "").toLowerCase() === "true") { + break; + } } - return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); } - comparePre(other) { - if (!(other instanceof _SemVer)) { - other = new _SemVer(other, this.options); + return configs; + } + function readConfigFiles(filepaths) { + return __awaiter(this, void 0, void 0, function() { + return __generator(this, function(_a) { + return [2, Promise.all(filepaths.map(function(name) { + return new Promise(function(resolve3) { + fs7.readFile(name, "utf8", function(err, data) { + resolve3({ + name, + contents: err ? "" : data + }); + }); + }); + }))]; + }); + }); + } + function readConfigFilesSync(filepaths) { + var files = []; + var file; + filepaths.forEach(function(filepath) { + try { + file = fs7.readFileSync(filepath, "utf8"); + } catch (e) { + file = ""; } - if (this.prerelease.length && !other.prerelease.length) { - return -1; - } else if (!this.prerelease.length && other.prerelease.length) { - return 1; - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0; - } - let i = 0; - do { - const a = this.prerelease[i]; - const b = other.prerelease[i]; - debug("prerelease compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i); - } - compareBuild(other) { - if (!(other instanceof _SemVer)) { - other = new _SemVer(other, this.options); - } - let i = 0; - do { - const a = this.build[i]; - const b = other.build[i]; - debug("prerelease compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i); - } - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc(release, identifier, identifierBase) { - switch (release) { - case "premajor": - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc("pre", identifier, identifierBase); - break; - case "preminor": - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc("pre", identifier, identifierBase); - break; - case "prepatch": - this.prerelease.length = 0; - this.inc("patch", identifier, identifierBase); - this.inc("pre", identifier, identifierBase); - break; - case "prerelease": - if (this.prerelease.length === 0) { - this.inc("patch", identifier, identifierBase); - } - this.inc("pre", identifier, identifierBase); - break; - case "major": - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { - this.major++; - } - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case "minor": - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++; - } - this.patch = 0; - this.prerelease = []; - break; - case "patch": - if (this.prerelease.length === 0) { - this.patch++; - } - this.prerelease = []; - break; - case "pre": { - const base = Number(identifierBase) ? 1 : 0; - if (!identifier && identifierBase === false) { - throw new Error("invalid increment argument: identifier is empty"); - } - if (this.prerelease.length === 0) { - this.prerelease = [base]; - } else { - let i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === "number") { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) { - if (identifier === this.prerelease.join(".") && identifierBase === false) { - throw new Error("invalid increment argument: identifier already exists"); - } - this.prerelease.push(base); - } - } - if (identifier) { - let prerelease = [identifier, base]; - if (identifierBase === false) { - prerelease = [identifier]; - } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease; - } - } else { - this.prerelease = prerelease; - } - } - break; - } - default: - throw new Error(`invalid increment argument: ${release}`); - } - this.raw = this.format(); - if (this.build.length) { - this.raw += `+${this.build.join(".")}`; - } - return this; - } - }; - module.exports = SemVer; - } -}); - -// node_modules/semver/functions/compare.js -var require_compare = __commonJS({ - "node_modules/semver/functions/compare.js"(exports, module) { - var SemVer = require_semver(); - var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); - module.exports = compare; - } -}); - -// node_modules/semver/functions/gte.js -var require_gte = __commonJS({ - "node_modules/semver/functions/gte.js"(exports, module) { - var compare = require_compare(); - var gte = (a, b, loose) => compare(a, b, loose) >= 0; - module.exports = gte; - } -}); - -// node_modules/pseudomap/pseudomap.js -var require_pseudomap = __commonJS({ - "node_modules/pseudomap/pseudomap.js"(exports, module) { - var hasOwnProperty3 = Object.prototype.hasOwnProperty; - module.exports = PseudoMap; - function PseudoMap(set2) { - if (!(this instanceof PseudoMap)) - throw new TypeError("Constructor PseudoMap requires 'new'"); - this.clear(); - if (set2) { - if (set2 instanceof PseudoMap || typeof Map === "function" && set2 instanceof Map) - set2.forEach(function(value, key) { - this.set(key, value); - }, this); - else if (Array.isArray(set2)) - set2.forEach(function(kv) { - this.set(kv[0], kv[1]); - }, this); - else - throw new TypeError("invalid argument"); + files.push({ + name: filepath, + contents: file + }); + }); + return files; + } + function opts(filepath, options8) { + if (options8 === void 0) { + options8 = {}; } + var resolvedFilePath = path13.resolve(filepath); + return [ + resolvedFilePath, + processOptions(options8, resolvedFilePath) + ]; } - PseudoMap.prototype.forEach = function(fn, thisp) { - thisp = thisp || this; - Object.keys(this._data).forEach(function(k) { - if (k !== "size") - fn.call(thisp, this._data[k].value, this._data[k].key); - }, this); - }; - PseudoMap.prototype.has = function(k) { - return !!find(this._data, k); - }; - PseudoMap.prototype.get = function(k) { - var res = find(this._data, k); - return res && res.value; - }; - PseudoMap.prototype.set = function(k, v) { - set(this._data, k, v); - }; - PseudoMap.prototype.delete = function(k) { - var res = find(this._data, k); - if (res) { - delete this._data[res._index]; - this._data.size--; + function parseFromFiles(filepath, files, options8) { + if (options8 === void 0) { + options8 = {}; } - }; - PseudoMap.prototype.clear = function() { - var data = /* @__PURE__ */ Object.create(null); - data.size = 0; - Object.defineProperty(this, "_data", { - value: data, - enumerable: false, - configurable: true, - writable: false + return __awaiter(this, void 0, void 0, function() { + var _a, resolvedFilePath, processedOptions; + return __generator(this, function(_b) { + _a = opts(filepath, options8), resolvedFilePath = _a[0], processedOptions = _a[1]; + return [2, files.then(getConfigsForFiles).then(function(configs) { + return parseFromConfigs(configs, resolvedFilePath, processedOptions); + })]; + }); }); - }; - Object.defineProperty(PseudoMap.prototype, "size", { - get: function() { - return this._data.size; - }, - set: function(n) { - }, - enumerable: true, - configurable: true - }); - PseudoMap.prototype.values = PseudoMap.prototype.keys = PseudoMap.prototype.entries = function() { - throw new Error("iterators are not implemented in this version"); - }; - function same(a, b) { - return a === b || a !== a && b !== b; - } - function Entry(k, v, i) { - this.key = k; - this.value = v; - this._index = i; } - function find(data, k) { - for (var i = 0, s = "_" + k, key = s; hasOwnProperty3.call(data, key); key = s + i++) { - if (same(data[key].key, k)) - return data[key]; + exports.parseFromFiles = parseFromFiles; + function parseFromFilesSync(filepath, files, options8) { + if (options8 === void 0) { + options8 = {}; } + var _a = opts(filepath, options8), resolvedFilePath = _a[0], processedOptions = _a[1]; + return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); } - function set(data, k, v) { - for (var i = 0, s = "_" + k, key = s; hasOwnProperty3.call(data, key); key = s + i++) { - if (same(data[key].key, k)) { - data[key].value = v; - return; - } + exports.parseFromFilesSync = parseFromFilesSync; + function parse6(_filepath, _options) { + if (_options === void 0) { + _options = {}; } - data.size++; - data[key] = new Entry(k, v, key); + return __awaiter(this, void 0, void 0, function() { + var _a, resolvedFilePath, processedOptions, filepaths; + return __generator(this, function(_b) { + _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; + filepaths = getConfigFileNames(resolvedFilePath, processedOptions); + return [2, readConfigFiles(filepaths).then(getConfigsForFiles).then(function(configs) { + return parseFromConfigs(configs, resolvedFilePath, processedOptions); + })]; + }); + }); } + exports.parse = parse6; + function parseSync(_filepath, _options) { + if (_options === void 0) { + _options = {}; + } + var _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; + var filepaths = getConfigFileNames(resolvedFilePath, processedOptions); + var files = readConfigFilesSync(filepaths); + return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); + } + exports.parseSync = parseSync; } }); -// node_modules/pseudomap/map.js -var require_map = __commonJS({ - "node_modules/pseudomap/map.js"(exports, module) { - if (process.env.npm_package_name === "pseudomap" && process.env.npm_lifecycle_script === "test") - process.env.TEST_PSEUDOMAP = "true"; - if (typeof Map === "function" && !process.env.TEST_PSEUDOMAP) { - module.exports = Map; - } else { - module.exports = require_pseudomap(); - } +// node_modules/ci-info/vendors.json +var require_vendors = __commonJS({ + "node_modules/ci-info/vendors.json"(exports, module) { + module.exports = [ + { + name: "Agola CI", + constant: "AGOLA", + env: "AGOLA_GIT_REF", + pr: "AGOLA_PULL_REQUEST_ID" + }, + { + name: "Appcircle", + constant: "APPCIRCLE", + env: "AC_APPCIRCLE" + }, + { + name: "AppVeyor", + constant: "APPVEYOR", + env: "APPVEYOR", + pr: "APPVEYOR_PULL_REQUEST_NUMBER" + }, + { + name: "AWS CodeBuild", + constant: "CODEBUILD", + env: "CODEBUILD_BUILD_ARN" + }, + { + name: "Azure Pipelines", + constant: "AZURE_PIPELINES", + env: "TF_BUILD", + pr: { + BUILD_REASON: "PullRequest" + } + }, + { + name: "Bamboo", + constant: "BAMBOO", + env: "bamboo_planKey" + }, + { + name: "Bitbucket Pipelines", + constant: "BITBUCKET", + env: "BITBUCKET_COMMIT", + pr: "BITBUCKET_PR_ID" + }, + { + name: "Bitrise", + constant: "BITRISE", + env: "BITRISE_IO", + pr: "BITRISE_PULL_REQUEST" + }, + { + name: "Buddy", + constant: "BUDDY", + env: "BUDDY_WORKSPACE_ID", + pr: "BUDDY_EXECUTION_PULL_REQUEST_ID" + }, + { + name: "Buildkite", + constant: "BUILDKITE", + env: "BUILDKITE", + pr: { + env: "BUILDKITE_PULL_REQUEST", + ne: "false" + } + }, + { + name: "CircleCI", + constant: "CIRCLE", + env: "CIRCLECI", + pr: "CIRCLE_PULL_REQUEST" + }, + { + name: "Cirrus CI", + constant: "CIRRUS", + env: "CIRRUS_CI", + pr: "CIRRUS_PR" + }, + { + name: "Codefresh", + constant: "CODEFRESH", + env: "CF_BUILD_ID", + pr: { + any: [ + "CF_PULL_REQUEST_NUMBER", + "CF_PULL_REQUEST_ID" + ] + } + }, + { + name: "Codemagic", + constant: "CODEMAGIC", + env: "CM_BUILD_ID", + pr: "CM_PULL_REQUEST" + }, + { + name: "Codeship", + constant: "CODESHIP", + env: { + CI_NAME: "codeship" + } + }, + { + name: "Drone", + constant: "DRONE", + env: "DRONE", + pr: { + DRONE_BUILD_EVENT: "pull_request" + } + }, + { + name: "dsari", + constant: "DSARI", + env: "DSARI" + }, + { + name: "Earthly", + constant: "EARTHLY", + env: "EARTHLY_CI" + }, + { + name: "Expo Application Services", + constant: "EAS", + env: "EAS_BUILD" + }, + { + name: "Gerrit", + constant: "GERRIT", + env: "GERRIT_PROJECT" + }, + { + name: "Gitea Actions", + constant: "GITEA_ACTIONS", + env: "GITEA_ACTIONS" + }, + { + name: "GitHub Actions", + constant: "GITHUB_ACTIONS", + env: "GITHUB_ACTIONS", + pr: { + GITHUB_EVENT_NAME: "pull_request" + } + }, + { + name: "GitLab CI", + constant: "GITLAB", + env: "GITLAB_CI", + pr: "CI_MERGE_REQUEST_ID" + }, + { + name: "GoCD", + constant: "GOCD", + env: "GO_PIPELINE_LABEL" + }, + { + name: "Google Cloud Build", + constant: "GOOGLE_CLOUD_BUILD", + env: "BUILDER_OUTPUT" + }, + { + name: "Harness CI", + constant: "HARNESS", + env: "HARNESS_BUILD_ID" + }, + { + name: "Heroku", + constant: "HEROKU", + env: { + env: "NODE", + includes: "/app/.heroku/node/bin/node" + } + }, + { + name: "Hudson", + constant: "HUDSON", + env: "HUDSON_URL" + }, + { + name: "Jenkins", + constant: "JENKINS", + env: [ + "JENKINS_URL", + "BUILD_ID" + ], + pr: { + any: [ + "ghprbPullId", + "CHANGE_ID" + ] + } + }, + { + name: "LayerCI", + constant: "LAYERCI", + env: "LAYERCI", + pr: "LAYERCI_PULL_REQUEST" + }, + { + name: "Magnum CI", + constant: "MAGNUM", + env: "MAGNUM" + }, + { + name: "Netlify CI", + constant: "NETLIFY", + env: "NETLIFY", + pr: { + env: "PULL_REQUEST", + ne: "false" + } + }, + { + name: "Nevercode", + constant: "NEVERCODE", + env: "NEVERCODE", + pr: { + env: "NEVERCODE_PULL_REQUEST", + ne: "false" + } + }, + { + name: "Prow", + constant: "PROW", + env: "PROW_JOB_ID" + }, + { + name: "ReleaseHub", + constant: "RELEASEHUB", + env: "RELEASE_BUILD_ID" + }, + { + name: "Render", + constant: "RENDER", + env: "RENDER", + pr: { + IS_PULL_REQUEST: "true" + } + }, + { + name: "Sail CI", + constant: "SAIL", + env: "SAILCI", + pr: "SAIL_PULL_REQUEST_NUMBER" + }, + { + name: "Screwdriver", + constant: "SCREWDRIVER", + env: "SCREWDRIVER", + pr: { + env: "SD_PULL_REQUEST", + ne: "false" + } + }, + { + name: "Semaphore", + constant: "SEMAPHORE", + env: "SEMAPHORE", + pr: "PULL_REQUEST_NUMBER" + }, + { + name: "Sourcehut", + constant: "SOURCEHUT", + env: { + CI_NAME: "sourcehut" + } + }, + { + name: "Strider CD", + constant: "STRIDER", + env: "STRIDER" + }, + { + name: "TaskCluster", + constant: "TASKCLUSTER", + env: [ + "TASK_ID", + "RUN_ID" + ] + }, + { + name: "TeamCity", + constant: "TEAMCITY", + env: "TEAMCITY_VERSION" + }, + { + name: "Travis CI", + constant: "TRAVIS", + env: "TRAVIS", + pr: { + env: "TRAVIS_PULL_REQUEST", + ne: "false" + } + }, + { + name: "Vela", + constant: "VELA", + env: "VELA", + pr: { + VELA_PULL_REQUEST: "1" + } + }, + { + name: "Vercel", + constant: "VERCEL", + env: { + any: [ + "NOW_BUILDER", + "VERCEL" + ] + }, + pr: "VERCEL_GIT_PULL_REQUEST_ID" + }, + { + name: "Visual Studio App Center", + constant: "APPCENTER", + env: "APPCENTER_BUILD_ID" + }, + { + name: "Woodpecker", + constant: "WOODPECKER", + env: { + CI: "woodpecker" + }, + pr: { + CI_BUILD_EVENT: "pull_request" + } + }, + { + name: "Xcode Cloud", + constant: "XCODE_CLOUD", + env: "CI_XCODE_PROJECT", + pr: "CI_PULL_REQUEST_NUMBER" + }, + { + name: "Xcode Server", + constant: "XCODE_SERVER", + env: "XCS" + } + ]; } }); -// node_modules/editorconfig/node_modules/yallist/yallist.js -var require_yallist = __commonJS({ - "node_modules/editorconfig/node_modules/yallist/yallist.js"(exports, module) { - module.exports = Yallist; - Yallist.Node = Node; - Yallist.create = Yallist; - function Yallist(list) { - var self = this; - if (!(self instanceof Yallist)) { - self = new Yallist(); +// node_modules/ci-info/index.js +var require_ci_info = __commonJS({ + "node_modules/ci-info/index.js"(exports) { + "use strict"; + var vendors = require_vendors(); + var env2 = process.env; + Object.defineProperty(exports, "_vendors", { + value: vendors.map(function(v) { + return v.constant; + }) + }); + exports.name = null; + exports.isPR = null; + vendors.forEach(function(vendor) { + const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]; + const isCI2 = envs.every(function(obj) { + return checkEnv(obj); + }); + exports[vendor.constant] = isCI2; + if (!isCI2) { + return; } - self.tail = null; - self.head = null; - self.length = 0; - if (list && typeof list.forEach === "function") { - list.forEach(function(item) { - self.push(item); + exports.name = vendor.name; + switch (typeof vendor.pr) { + case "string": + exports.isPR = !!env2[vendor.pr]; + break; + case "object": + if ("env" in vendor.pr) { + exports.isPR = vendor.pr.env in env2 && env2[vendor.pr.env] !== vendor.pr.ne; + } else if ("any" in vendor.pr) { + exports.isPR = vendor.pr.any.some(function(key2) { + return !!env2[key2]; + }); + } else { + exports.isPR = checkEnv(vendor.pr); + } + break; + default: + exports.isPR = null; + } + }); + exports.isCI = !!(env2.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false' + (env2.BUILD_ID || // Jenkins, Cloudbees + env2.BUILD_NUMBER || // Jenkins, TeamCity + env2.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari + env2.CI_APP_ID || // Appflow + env2.CI_BUILD_ID || // Appflow + env2.CI_BUILD_NUMBER || // Appflow + env2.CI_NAME || // Codeship and others + env2.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI + env2.RUN_ID || // TaskCluster, dsari + exports.name || false)); + function checkEnv(obj) { + if (typeof obj === "string") + return !!env2[obj]; + if ("env" in obj) { + return env2[obj.env] && env2[obj.env].includes(obj.includes); + } + if ("any" in obj) { + return obj.any.some(function(k) { + return !!env2[k]; }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self.push(arguments[i]); - } } - return self; + return Object.keys(obj).every(function(k) { + return env2[k] === obj[k]; + }); } - Yallist.prototype.removeNode = function(node) { - if (node.list !== this) { - throw new Error("removing node which does not belong to this list"); - } - var next = node.next; - var prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; + } +}); + +// node_modules/@iarna/toml/lib/parser.js +var require_parser = __commonJS({ + "node_modules/@iarna/toml/lib/parser.js"(exports, module) { + "use strict"; + var ParserEND = 1114112; + var ParserError = class _ParserError extends Error { + /* istanbul ignore next */ + constructor(msg, filename, linenumber) { + super("[ParserError] " + msg, filename, linenumber); + this.name = "ParserError"; + this.code = "ParserError"; + if (Error.captureStackTrace) + Error.captureStackTrace(this, _ParserError); } - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; }; - Yallist.prototype.unshiftNode = function(node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; + var State = class { + constructor(parser) { + this.parser = parser; + this.buf = ""; + this.returned = null; + this.result = null; + this.resultTable = null; + this.resultArr = null; } - this.length++; }; - Yallist.prototype.pushNode = function(node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); + var Parser = class { + constructor() { + this.pos = 0; + this.col = 0; + this.line = 0; + this.obj = {}; + this.ctx = this.obj; + this.stack = []; + this._buf = ""; + this.char = null; + this.ii = 0; + this.state = new State(this.parseStart); } - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; + parse(str2) { + if (str2.length === 0 || str2.length == null) + return; + this._buf = String(str2); + this.ii = -1; + this.char = -1; + let getNext; + while (getNext === false || this.nextChar()) { + getNext = this.runOne(); + } + this._buf = null; } - this.tail = node; - if (!this.head) { - this.head = node; + nextChar() { + if (this.char === 10) { + ++this.line; + this.col = -1; + } + ++this.ii; + this.char = this._buf.codePointAt(this.ii); + ++this.pos; + ++this.col; + return this.haveBuffer(); } - this.length++; - }; - Yallist.prototype.push = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); + haveBuffer() { + return this.ii < this._buf.length; } - return this.length; - }; - Yallist.prototype.unshift = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); + runOne() { + return this.state.parser.call(this, this.state.returned); } - return this.length; - }; - Yallist.prototype.pop = function() { - if (!this.tail) { - return void 0; + finish() { + this.char = ParserEND; + let last; + do { + last = this.state.parser; + this.runOne(); + } while (this.state.parser !== last); + this.ctx = null; + this.state = null; + this._buf = null; + return this.obj; } - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; + next(fn) { + if (typeof fn !== "function") + throw new ParserError("Tried to set state to non-existent state: " + JSON.stringify(fn)); + this.state.parser = fn; } - this.length--; - return res; - }; - Yallist.prototype.shift = function() { - if (!this.head) { - return void 0; + goto(fn) { + this.next(fn); + return this.runOne(); } - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; + call(fn, returnWith) { + if (returnWith) + this.next(returnWith); + this.stack.push(this.state); + this.state = new State(fn); } - this.length--; - return res; - }; - Yallist.prototype.forEach = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; + callNow(fn, returnWith) { + this.call(fn, returnWith); + return this.runOne(); } - }; - Yallist.prototype.forEachReverse = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; + return(value) { + if (this.stack.length === 0) + throw this.error(new ParserError("Stack underflow")); + if (value === void 0) + value = this.state.buf; + this.state = this.stack.pop(); + this.state.returned = value; } - }; - Yallist.prototype.get = function(n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - walker = walker.next; + returnNow(value) { + this.return(value); + return this.runOne(); } - if (i === n && walker !== null) { - return walker.value; + consume() { + if (this.char === ParserEND) + throw this.error(new ParserError("Unexpected end-of-buffer")); + this.state.buf += this._buf[this.ii]; } - }; - Yallist.prototype.getReverse = function(n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - walker = walker.prev; + error(err) { + err.line = this.line; + err.col = this.col; + err.pos = this.pos; + return err; } - if (i === n && walker !== null) { - return walker.value; + /* istanbul ignore next */ + parseStart() { + throw new ParserError("Must declare a parseStart method"); } }; - Yallist.prototype.map = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.head; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; + Parser.END = ParserEND; + Parser.Error = ParserError; + module.exports = Parser; + } +}); + +// node_modules/@iarna/toml/lib/create-datetime.js +var require_create_datetime = __commonJS({ + "node_modules/@iarna/toml/lib/create-datetime.js"(exports, module) { + "use strict"; + module.exports = (value) => { + const date = new Date(value); + if (isNaN(date)) { + throw new TypeError("Invalid Datetime"); + } else { + return date; } - return res; }; - Yallist.prototype.mapReverse = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.tail; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; + } +}); + +// node_modules/@iarna/toml/lib/format-num.js +var require_format_num = __commonJS({ + "node_modules/@iarna/toml/lib/format-num.js"(exports, module) { + "use strict"; + module.exports = (d, num) => { + num = String(num); + while (num.length < d) + num = "0" + num; + return num; }; - Yallist.prototype.reduce = function(fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); + } +}); + +// node_modules/@iarna/toml/lib/create-datetime-float.js +var require_create_datetime_float = __commonJS({ + "node_modules/@iarna/toml/lib/create-datetime-float.js"(exports, module) { + "use strict"; + var f = require_format_num(); + var FloatingDateTime = class extends Date { + constructor(value) { + super(value + "Z"); + this.isFloating = true; } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; + toISOString() { + const date = `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}`; + const time = `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}`; + return `${date}T${time}`; } - return acc; }; - Yallist.prototype.reduceReverse = function(fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; + module.exports = (value) => { + const date = new FloatingDateTime(value); + if (isNaN(date)) { + throw new TypeError("Invalid Datetime"); } else { - throw new TypeError("Reduce of empty list with no initial value"); - } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - return acc; - }; - Yallist.prototype.toArray = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; + return date; } - return arr; }; - Yallist.prototype.toArrayReverse = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - }; - Yallist.prototype.slice = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - }; - Yallist.prototype.sliceReverse = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; + } +}); + +// node_modules/@iarna/toml/lib/create-date.js +var require_create_date = __commonJS({ + "node_modules/@iarna/toml/lib/create-date.js"(exports, module) { + "use strict"; + var f = require_format_num(); + var DateTime = global.Date; + var Date2 = class extends DateTime { + constructor(value) { + super(value); + this.isDate = true; } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); + toISOString() { + return `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}`; } - return ret; }; - Yallist.prototype.reverse = function() { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; + module.exports = (value) => { + const date = new Date2(value); + if (isNaN(date)) { + throw new TypeError("Invalid Datetime"); + } else { + return date; } - this.head = tail; - this.tail = head; - return this; }; - function push(self, item) { - self.tail = new Node(item, self.tail, null, self); - if (!self.head) { - self.head = self.tail; - } - self.length++; - } - function unshift(self, item) { - self.head = new Node(item, null, self.head, self); - if (!self.tail) { - self.tail = self.head; - } - self.length++; - } - function Node(value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list); + } +}); + +// node_modules/@iarna/toml/lib/create-time.js +var require_create_time = __commonJS({ + "node_modules/@iarna/toml/lib/create-time.js"(exports, module) { + "use strict"; + var f = require_format_num(); + var Time = class extends Date { + constructor(value) { + super(`0000-01-01T${value}Z`); + this.isTime = true; } - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; + toISOString() { + return `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}`; } - if (next) { - next.prev = this; - this.next = next; + }; + module.exports = (value) => { + const date = new Time(value); + if (isNaN(date)) { + throw new TypeError("Invalid Datetime"); } else { - this.next = null; + return date; } - } + }; } }); -// node_modules/editorconfig/node_modules/lru-cache/index.js -var require_lru_cache = __commonJS({ - "node_modules/editorconfig/node_modules/lru-cache/index.js"(exports, module) { +// node_modules/@iarna/toml/lib/toml-parser.js +var require_toml_parser = __commonJS({ + "node_modules/@iarna/toml/lib/toml-parser.js"(exports, module) { "use strict"; - module.exports = LRUCache; - var Map2 = require_map(); - var util = __require("util"); - var Yallist = require_yallist(); - var hasSymbol = typeof Symbol === "function" && process.env._nodeLRUCacheForceNoSymbol !== "1"; - var makeSymbol; - if (hasSymbol) { - makeSymbol = function(key) { - return Symbol(key); - }; - } else { - makeSymbol = function(key) { - return "_" + key; - }; + module.exports = makeParserClass(require_parser()); + module.exports.makeParserClass = makeParserClass; + var TomlError = class _TomlError extends Error { + constructor(msg) { + super(msg); + this.name = "TomlError"; + if (Error.captureStackTrace) + Error.captureStackTrace(this, _TomlError); + this.fromTOML = true; + this.wrapped = null; + } + }; + TomlError.wrap = (err) => { + const terr = new TomlError(err.message); + terr.code = err.code; + terr.wrapped = err; + return terr; + }; + module.exports.TomlError = TomlError; + var createDateTime = require_create_datetime(); + var createDateTimeFloat = require_create_datetime_float(); + var createDate = require_create_date(); + var createTime = require_create_time(); + var CTRL_I = 9; + var CTRL_J = 10; + var CTRL_M = 13; + var CTRL_CHAR_BOUNDARY = 31; + var CHAR_SP = 32; + var CHAR_QUOT = 34; + var CHAR_NUM = 35; + var CHAR_APOS = 39; + var CHAR_PLUS = 43; + var CHAR_COMMA = 44; + var CHAR_HYPHEN = 45; + var CHAR_PERIOD = 46; + var CHAR_0 = 48; + var CHAR_1 = 49; + var CHAR_7 = 55; + var CHAR_9 = 57; + var CHAR_COLON = 58; + var CHAR_EQUALS = 61; + var CHAR_A = 65; + var CHAR_E = 69; + var CHAR_F = 70; + var CHAR_T = 84; + var CHAR_U = 85; + var CHAR_Z = 90; + var CHAR_LOWBAR = 95; + var CHAR_a = 97; + var CHAR_b = 98; + var CHAR_e = 101; + var CHAR_f = 102; + var CHAR_i = 105; + var CHAR_l = 108; + var CHAR_n = 110; + var CHAR_o = 111; + var CHAR_r = 114; + var CHAR_s = 115; + var CHAR_t = 116; + var CHAR_u = 117; + var CHAR_x = 120; + var CHAR_z = 122; + var CHAR_LCUB = 123; + var CHAR_RCUB = 125; + var CHAR_LSQB = 91; + var CHAR_BSOL = 92; + var CHAR_RSQB = 93; + var CHAR_DEL = 127; + var SURROGATE_FIRST = 55296; + var SURROGATE_LAST = 57343; + var escapes = { + [CHAR_b]: "\b", + [CHAR_t]: " ", + [CHAR_n]: "\n", + [CHAR_f]: "\f", + [CHAR_r]: "\r", + [CHAR_QUOT]: '"', + [CHAR_BSOL]: "\\" + }; + function isDigit(cp) { + return cp >= CHAR_0 && cp <= CHAR_9; } - var MAX = makeSymbol("max"); - var LENGTH = makeSymbol("length"); - var LENGTH_CALCULATOR = makeSymbol("lengthCalculator"); - var ALLOW_STALE = makeSymbol("allowStale"); - var MAX_AGE = makeSymbol("maxAge"); - var DISPOSE = makeSymbol("dispose"); - var NO_DISPOSE_ON_SET = makeSymbol("noDisposeOnSet"); - var LRU_LIST = makeSymbol("lruList"); - var CACHE = makeSymbol("cache"); - function naiveLength() { - return 1; + function isHexit(cp) { + return cp >= CHAR_A && cp <= CHAR_F || cp >= CHAR_a && cp <= CHAR_f || cp >= CHAR_0 && cp <= CHAR_9; } - function LRUCache(options8) { - if (!(this instanceof LRUCache)) { - return new LRUCache(options8); - } - if (typeof options8 === "number") { - options8 = { max: options8 }; - } - if (!options8) { - options8 = {}; - } - var max = this[MAX] = options8.max; - if (!max || !(typeof max === "number") || max <= 0) { - this[MAX] = Infinity; - } - var lc = options8.length || naiveLength; - if (typeof lc !== "function") { - lc = naiveLength; - } - this[LENGTH_CALCULATOR] = lc; - this[ALLOW_STALE] = options8.stale || false; - this[MAX_AGE] = options8.maxAge || 0; - this[DISPOSE] = options8.dispose; - this[NO_DISPOSE_ON_SET] = options8.noDisposeOnSet || false; - this.reset(); + function isBit(cp) { + return cp === CHAR_1 || cp === CHAR_0; } - Object.defineProperty(LRUCache.prototype, "max", { - set: function(mL) { - if (!mL || !(typeof mL === "number") || mL <= 0) { - mL = Infinity; - } - this[MAX] = mL; - trim2(this); - }, - get: function() { - return this[MAX]; - }, - enumerable: true - }); - Object.defineProperty(LRUCache.prototype, "allowStale", { - set: function(allowStale) { - this[ALLOW_STALE] = !!allowStale; - }, - get: function() { - return this[ALLOW_STALE]; - }, - enumerable: true - }); - Object.defineProperty(LRUCache.prototype, "maxAge", { - set: function(mA) { - if (!mA || !(typeof mA === "number") || mA < 0) { - mA = 0; - } - this[MAX_AGE] = mA; - trim2(this); - }, - get: function() { - return this[MAX_AGE]; - }, - enumerable: true - }); - Object.defineProperty(LRUCache.prototype, "lengthCalculator", { - set: function(lC) { - if (typeof lC !== "function") { - lC = naiveLength; - } - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach(function(hit) { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); - this[LENGTH] += hit.length; - }, this); + function isOctit(cp) { + return cp >= CHAR_0 && cp <= CHAR_7; + } + function isAlphaNumQuoteHyphen(cp) { + return cp >= CHAR_A && cp <= CHAR_Z || cp >= CHAR_a && cp <= CHAR_z || cp >= CHAR_0 && cp <= CHAR_9 || cp === CHAR_APOS || cp === CHAR_QUOT || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN; + } + function isAlphaNumHyphen(cp) { + return cp >= CHAR_A && cp <= CHAR_Z || cp >= CHAR_a && cp <= CHAR_z || cp >= CHAR_0 && cp <= CHAR_9 || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN; + } + var _type = Symbol("type"); + var _declared = Symbol("declared"); + var hasOwnProperty3 = Object.prototype.hasOwnProperty; + var defineProperty = Object.defineProperty; + var descriptor = { configurable: true, enumerable: true, writable: true, value: void 0 }; + function hasKey(obj, key2) { + if (hasOwnProperty3.call(obj, key2)) + return true; + if (key2 === "__proto__") + defineProperty(obj, "__proto__", descriptor); + return false; + } + var INLINE_TABLE = Symbol("inline-table"); + function InlineTable() { + return Object.defineProperties({}, { + [_type]: { value: INLINE_TABLE } + }); + } + function isInlineTable(obj) { + if (obj === null || typeof obj !== "object") + return false; + return obj[_type] === INLINE_TABLE; + } + var TABLE = Symbol("table"); + function Table() { + return Object.defineProperties({}, { + [_type]: { value: TABLE }, + [_declared]: { value: false, writable: true } + }); + } + function isTable(obj) { + if (obj === null || typeof obj !== "object") + return false; + return obj[_type] === TABLE; + } + var _contentType = Symbol("content-type"); + var INLINE_LIST = Symbol("inline-list"); + function InlineList(type2) { + return Object.defineProperties([], { + [_type]: { value: INLINE_LIST }, + [_contentType]: { value: type2 } + }); + } + function isInlineList(obj) { + if (obj === null || typeof obj !== "object") + return false; + return obj[_type] === INLINE_LIST; + } + var LIST = Symbol("list"); + function List() { + return Object.defineProperties([], { + [_type]: { value: LIST } + }); + } + function isList(obj) { + if (obj === null || typeof obj !== "object") + return false; + return obj[_type] === LIST; + } + var _custom; + try { + const utilInspect = __require("util").inspect; + _custom = utilInspect.custom; + } catch (_) { + } + var _inspect = _custom || "inspect"; + var BoxedBigInt = class { + constructor(value) { + try { + this.value = global.BigInt.asIntN(64, value); + } catch (_) { + this.value = null; } - trim2(this); - }, - get: function() { - return this[LENGTH_CALCULATOR]; - }, - enumerable: true - }); - Object.defineProperty(LRUCache.prototype, "length", { - get: function() { - return this[LENGTH]; - }, - enumerable: true - }); - Object.defineProperty(LRUCache.prototype, "itemCount", { - get: function() { - return this[LRU_LIST].length; - }, - enumerable: true - }); - LRUCache.prototype.rforEach = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].tail; walker !== null; ) { - var prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; + Object.defineProperty(this, _type, { value: INTEGER }); } - }; - function forEachStep(self, fn, node, thisp) { - var hit = node.value; - if (isStale(self, hit)) { - del(self, node); - if (!self[ALLOW_STALE]) { - hit = void 0; - } + isNaN() { + return this.value === null; } - if (hit) { - fn.call(thisp, hit.value, hit.key, self); + /* istanbul ignore next */ + toString() { + return String(this.value); } - } - LRUCache.prototype.forEach = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this[LRU_LIST].head; walker !== null; ) { - var next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; + /* istanbul ignore next */ + [_inspect]() { + return `[BigInt: ${this.toString()}]}`; } - }; - LRUCache.prototype.keys = function() { - return this[LRU_LIST].toArray().map(function(k) { - return k.key; - }, this); - }; - LRUCache.prototype.values = function() { - return this[LRU_LIST].toArray().map(function(k) { - return k.value; - }, this); - }; - LRUCache.prototype.reset = function() { - if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { - this[LRU_LIST].forEach(function(hit) { - this[DISPOSE](hit.key, hit.value); - }, this); + valueOf() { + return this.value; } - this[CACHE] = new Map2(); - this[LRU_LIST] = new Yallist(); - this[LENGTH] = 0; - }; - LRUCache.prototype.dump = function() { - return this[LRU_LIST].map(function(hit) { - if (!isStale(this, hit)) { - return { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }; - } - }, this).toArray().filter(function(h) { - return h; - }); - }; - LRUCache.prototype.dumpLru = function() { - return this[LRU_LIST]; }; - LRUCache.prototype.inspect = function(n, opts) { - var str = "LRUCache {"; - var extras = false; - var as = this[ALLOW_STALE]; - if (as) { - str += "\n allowStale: true"; - extras = true; - } - var max = this[MAX]; - if (max && max !== Infinity) { - if (extras) { - str += ","; - } - str += "\n max: " + util.inspect(max, opts); - extras = true; - } - var maxAge = this[MAX_AGE]; - if (maxAge) { - if (extras) { - str += ","; - } - str += "\n maxAge: " + util.inspect(maxAge, opts); - extras = true; + var INTEGER = Symbol("integer"); + function Integer(value) { + let num = Number(value); + if (Object.is(num, -0)) + num = 0; + if (global.BigInt && !Number.isSafeInteger(num)) { + return new BoxedBigInt(value); + } else { + return Object.defineProperties(new Number(num), { + isNaN: { value: function() { + return isNaN(this); + } }, + [_type]: { value: INTEGER }, + [_inspect]: { value: () => `[Integer: ${value}]` } + }); } - var lc = this[LENGTH_CALCULATOR]; - if (lc && lc !== naiveLength) { - if (extras) { - str += ","; + } + function isInteger2(obj) { + if (obj === null || typeof obj !== "object") + return false; + return obj[_type] === INTEGER; + } + var FLOAT = Symbol("float"); + function Float(value) { + return Object.defineProperties(new Number(value), { + [_type]: { value: FLOAT }, + [_inspect]: { value: () => `[Float: ${value}]` } + }); + } + function isFloat2(obj) { + if (obj === null || typeof obj !== "object") + return false; + return obj[_type] === FLOAT; + } + function tomlType(value) { + const type2 = typeof value; + if (type2 === "object") { + if (value === null) + return "null"; + if (value instanceof Date) + return "datetime"; + if (_type in value) { + switch (value[_type]) { + case INLINE_TABLE: + return "inline-table"; + case INLINE_LIST: + return "inline-list"; + case TABLE: + return "table"; + case LIST: + return "list"; + case FLOAT: + return "float"; + case INTEGER: + return "integer"; + } } - str += "\n length: " + util.inspect(this[LENGTH], opts); - extras = true; } - var didFirst = false; - this[LRU_LIST].forEach(function(item) { - if (didFirst) { - str += ",\n "; - } else { - if (extras) { - str += ",\n"; + return type2; + } + function makeParserClass(Parser) { + class TOMLParser extends Parser { + constructor() { + super(); + this.ctx = this.obj = Table(); + } + /* MATCH HELPER */ + atEndOfWord() { + return this.char === CHAR_NUM || this.char === CTRL_I || this.char === CHAR_SP || this.atEndOfLine(); + } + atEndOfLine() { + return this.char === Parser.END || this.char === CTRL_J || this.char === CTRL_M; + } + parseStart() { + if (this.char === Parser.END) { + return null; + } else if (this.char === CHAR_LSQB) { + return this.call(this.parseTableOrList); + } else if (this.char === CHAR_NUM) { + return this.call(this.parseComment); + } else if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + return null; + } else if (isAlphaNumQuoteHyphen(this.char)) { + return this.callNow(this.parseAssignStatement); + } else { + throw this.error(new TomlError(`Unknown character "${this.char}"`)); } - didFirst = true; - str += "\n "; } - var key = util.inspect(item.key).split("\n").join("\n "); - var val = { value: item.value }; - if (item.maxAge !== maxAge) { - val.maxAge = item.maxAge; + // HELPER, this strips any whitespace and comments to the end of the line + // then RETURNS. Last state in a production. + parseWhitespaceToEOL() { + if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + return null; + } else if (this.char === CHAR_NUM) { + return this.goto(this.parseComment); + } else if (this.char === Parser.END || this.char === CTRL_J) { + return this.return(); + } else { + throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line")); + } } - if (lc !== naiveLength) { - val.length = item.length; + /* ASSIGNMENT: key = value */ + parseAssignStatement() { + return this.callNow(this.parseAssign, this.recordAssignStatement); } - if (isStale(this, item)) { - val.stale = true; + recordAssignStatement(kv) { + let target = this.ctx; + let finalKey = kv.key.pop(); + for (let kw of kv.key) { + if (hasKey(target, kw) && (!isTable(target[kw]) || target[kw][_declared])) { + throw this.error(new TomlError("Can't redefine existing key")); + } + target = target[kw] = target[kw] || Table(); + } + if (hasKey(target, finalKey)) { + throw this.error(new TomlError("Can't redefine existing key")); + } + if (isInteger2(kv.value) || isFloat2(kv.value)) { + target[finalKey] = kv.value.valueOf(); + } else { + target[finalKey] = kv.value; + } + return this.goto(this.parseWhitespaceToEOL); } - val = util.inspect(val, opts).split("\n").join("\n "); - str += key + " => " + val; - }); - if (didFirst || extras) { - str += "\n"; - } - str += "}"; - return str; - }; - LRUCache.prototype.set = function(key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - var now = maxAge ? Date.now() : 0; - var len = this[LENGTH_CALCULATOR](value, key); - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)); - return false; + /* ASSSIGNMENT expression, key = value possibly inside an inline table */ + parseAssign() { + return this.callNow(this.parseKeyword, this.recordAssignKeyword); } - var node = this[CACHE].get(key); - var item = node.value; - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) { - this[DISPOSE](key, item.value); + recordAssignKeyword(key2) { + if (this.state.resultTable) { + this.state.resultTable.push(key2); + } else { + this.state.resultTable = [key2]; } + return this.goto(this.parseAssignKeywordPreDot); } - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim2(this); - return true; - } - var hit = new Entry(key, value, len, now, maxAge); - if (hit.length > this[MAX]) { - if (this[DISPOSE]) { - this[DISPOSE](key, value); + parseAssignKeywordPreDot() { + if (this.char === CHAR_PERIOD) { + return this.next(this.parseAssignKeywordPostDot); + } else if (this.char !== CHAR_SP && this.char !== CTRL_I) { + return this.goto(this.parseAssignEqual); + } } - return false; - } - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim2(this); - return true; - }; - LRUCache.prototype.has = function(key) { - if (!this[CACHE].has(key)) - return false; - var hit = this[CACHE].get(key).value; - if (isStale(this, hit)) { - return false; - } - return true; - }; - LRUCache.prototype.get = function(key) { - return get(this, key, true); - }; - LRUCache.prototype.peek = function(key) { - return get(this, key, false); - }; - LRUCache.prototype.pop = function() { - var node = this[LRU_LIST].tail; - if (!node) - return null; - del(this, node); - return node.value; - }; - LRUCache.prototype.del = function(key) { - del(this, this[CACHE].get(key)); - }; - LRUCache.prototype.load = function(arr) { - this.reset(); - var now = Date.now(); - for (var l = arr.length - 1; l >= 0; l--) { - var hit = arr[l]; - var expiresAt = hit.e || 0; - if (expiresAt === 0) { - this.set(hit.k, hit.v); - } else { - var maxAge = expiresAt - now; - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); + parseAssignKeywordPostDot() { + if (this.char !== CHAR_SP && this.char !== CTRL_I) { + return this.callNow(this.parseKeyword, this.recordAssignKeyword); } } - } - }; - LRUCache.prototype.prune = function() { - var self = this; - this[CACHE].forEach(function(value, key) { - get(self, key, false); - }); - }; - function get(self, key, doUse) { - var node = self[CACHE].get(key); - if (node) { - var hit = node.value; - if (isStale(self, hit)) { - del(self, node); - if (!self[ALLOW_STALE]) - hit = void 0; - } else { - if (doUse) { - self[LRU_LIST].unshiftNode(node); + parseAssignEqual() { + if (this.char === CHAR_EQUALS) { + return this.next(this.parseAssignPreValue); + } else { + throw this.error(new TomlError('Invalid character, expected "="')); } } - if (hit) - hit = hit.value; - } - return hit; - } - function isStale(self, hit) { - if (!hit || !hit.maxAge && !self[MAX_AGE]) { - return false; - } - var stale = false; - var diff = Date.now() - hit.now; - if (hit.maxAge) { - stale = diff > hit.maxAge; - } else { - stale = self[MAX_AGE] && diff > self[MAX_AGE]; - } - return stale; - } - function trim2(self) { - if (self[LENGTH] > self[MAX]) { - for (var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null; ) { - var prev = walker.prev; - del(self, walker); - walker = prev; + parseAssignPreValue() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else { + return this.callNow(this.parseValue, this.recordAssignValue); + } } - } - } - function del(self, node) { - if (node) { - var hit = node.value; - if (self[DISPOSE]) { - self[DISPOSE](hit.key, hit.value); + recordAssignValue(value) { + return this.returnNow({ key: this.state.resultTable, value }); } - self[LENGTH] -= hit.length; - self[CACHE].delete(hit.key); - self[LRU_LIST].removeNode(node); - } - } - function Entry(key, value, length, now, maxAge) { - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; - } - } -}); - -// node_modules/sigmund/sigmund.js -var require_sigmund = __commonJS({ - "node_modules/sigmund/sigmund.js"(exports, module) { - module.exports = sigmund; - function sigmund(subject, maxSessions) { - maxSessions = maxSessions || 10; - var notes = []; - var analysis = ""; - var RE = RegExp; - function psychoAnalyze(subject2, session) { - if (session > maxSessions) - return; - if (typeof subject2 === "function" || typeof subject2 === "undefined") { - return; - } - if (typeof subject2 !== "object" || !subject2 || subject2 instanceof RE) { - analysis += subject2; - return; + /* COMMENTS: #...eol */ + parseComment() { + do { + if (this.char === Parser.END || this.char === CTRL_J) { + return this.return(); + } + } while (this.nextChar()); } - if (notes.indexOf(subject2) !== -1 || session === maxSessions) - return; - notes.push(subject2); - analysis += "{"; - Object.keys(subject2).forEach(function(issue, _, __) { - if (issue.charAt(0) === "_") - return; - var to = typeof subject2[issue]; - if (to === "function" || to === "undefined") - return; - analysis += issue; - psychoAnalyze(subject2[issue], session + 1); - }); - } - psychoAnalyze(subject, 0); - return analysis; - } - } -}); - -// node_modules/editorconfig/src/lib/fnmatch.js -var require_fnmatch = __commonJS({ - "node_modules/editorconfig/src/lib/fnmatch.js"(exports, module) { - var platform = typeof process === "object" ? process.platform : "win32"; - if (module) - module.exports = minimatch; - else - exports.minimatch = minimatch; - minimatch.Minimatch = Minimatch; - var LRU = require_lru_cache(); - var cache2 = minimatch.cache = new LRU({ max: 100 }); - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var sigmund = require_sigmund(); - var path9 = __require("path"); - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set, c) { - set[c] = true; - return set; - }, {}); - } - var slashSplit = /\/+/; - minimatch.monkeyPatch = monkeyPatch; - function monkeyPatch() { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "match"); - var orig = desc.value; - desc.value = function(p) { - if (p instanceof Minimatch) - return p.match(this); - return orig.call(this, p); - }; - Object.defineProperty(String.prototype, desc); - } - minimatch.filter = filter; - function filter(pattern, options8) { - options8 = options8 || {}; - return function(p, i, list) { - return minimatch(p, pattern, options8); - }; - } - function ext(a, b) { - a = a || {}; - b = b || {}; - var t = {}; - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || !Object.keys(def).length) - return minimatch; - var orig = minimatch; - var m = function minimatch2(p, pattern, options8) { - return orig.minimatch(p, pattern, ext(def, options8)); - }; - m.Minimatch = function Minimatch2(pattern, options8) { - return new orig.Minimatch(pattern, ext(def, options8)); - }; - return m; - }; - Minimatch.defaults = function(def) { - if (!def || !Object.keys(def).length) - return Minimatch; - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options8) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required"); - } - if (!options8) - options8 = {}; - if (!options8.nocomment && pattern.charAt(0) === "#") { - return false; - } - if (pattern.trim() === "") - return p === ""; - return new Minimatch(pattern, options8).match(p); - } - function Minimatch(pattern, options8) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options8, cache2); - } - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required"); - } - if (!options8) - options8 = {}; - if (platform === "win32") { - pattern = pattern.split("\\").join("/"); - } - var cacheKey = pattern + "\n" + sigmund(options8); - var cached = minimatch.cache.get(cacheKey); - if (cached) - return cached; - minimatch.cache.set(cacheKey, this); - this.options = options8; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.make(); - } - Minimatch.prototype.make = make; - function make() { - if (this._made) - return; - var pattern = this.pattern; - var options8 = this.options; - if (!options8.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set = this.globSet = this.braceExpand(); - if (options8.debug) - console.error(this.pattern, set); - set = this.globParts = set.map(function(s) { - return s.split(slashSplit); - }); - if (options8.debug) - console.error(this.pattern, set); - set = set.map(function(s, si, set2) { - return s.map(this.parse, this); - }, this); - if (options8.debug) - console.error(this.pattern, set); - set = set.filter(function(s) { - return -1 === s.indexOf(false); - }); - if (options8.debug) - console.error(this.pattern, set); - this.set = set; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern, negate = false, options8 = this.options, negateOffset = 0; - if (options8.nonegate) - return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) - this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - minimatch.braceExpand = function(pattern, options8) { - return new Minimatch(pattern, options8).braceExpand(); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options8) { - options8 = options8 || this.options; - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - if (typeof pattern === "undefined") { - throw new Error("undefined pattern"); - } - if (options8.nobrace || !pattern.match(/\{.*\}/)) { - return [pattern]; - } - var escaping = false; - if (pattern.charAt(0) !== "{") { - var prefix = null; - for (var i = 0, l = pattern.length; i < l; i++) { - var c = pattern.charAt(i); - if (c === "\\") { - escaping = !escaping; - } else if (c === "{" && !escaping) { - prefix = pattern.substr(0, i); - break; + /* TABLES AND LISTS, [foo] and [[foo]] */ + parseTableOrList() { + if (this.char === CHAR_LSQB) { + this.next(this.parseList); + } else { + return this.goto(this.parseTable); } } - if (prefix === null) { - return [pattern]; + /* TABLE [foo.bar.baz] */ + parseTable() { + this.ctx = this.obj; + return this.goto(this.parseTableNext); } - var tail = braceExpand(pattern.substr(i), options8); - return tail.map(function(t) { - return prefix + t; - }); - } - var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/); - if (numset) { - var suf = braceExpand(pattern.substr(numset[0].length), options8), start = +numset[1], end = +numset[2], inc = start > end ? -1 : 1, set = []; - for (var i = start; i != end + inc; i += inc) { - for (var ii = 0, ll = suf.length; ii < ll; ii++) { - set.push(i + suf[ii]); + parseTableNext() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else { + return this.callNow(this.parseKeyword, this.parseTableMore); } } - return set; - } - var i = 1, depth = 1, set = [], member = "", sawEnd = false, escaping = false; - function addMember() { - set.push(member); - member = ""; - } - FOR: - for (i = 1, l = pattern.length; i < l; i++) { - var c = pattern.charAt(i); - if (escaping) { - escaping = false; - member += "\\" + c; - } else { - switch (c) { - case "\\": - escaping = true; - continue; - case "{": - depth++; - member += "{"; - continue; - case "}": - depth--; - if (depth === 0) { - addMember(); - i++; - break FOR; - } else { - member += c; - continue; - } - case ",": - if (depth === 1) { - addMember(); - } else { - member += c; - } - continue; - default: - member += c; - continue; + parseTableMore(keyword) { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === CHAR_RSQB) { + if (hasKey(this.ctx, keyword) && (!isTable(this.ctx[keyword]) || this.ctx[keyword][_declared])) { + throw this.error(new TomlError("Can't redefine existing key")); + } else { + this.ctx = this.ctx[keyword] = this.ctx[keyword] || Table(); + this.ctx[_declared] = true; + } + return this.next(this.parseWhitespaceToEOL); + } else if (this.char === CHAR_PERIOD) { + if (!hasKey(this.ctx, keyword)) { + this.ctx = this.ctx[keyword] = Table(); + } else if (isTable(this.ctx[keyword])) { + this.ctx = this.ctx[keyword]; + } else if (isList(this.ctx[keyword])) { + this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1]; + } else { + throw this.error(new TomlError("Can't redefine existing key")); } + return this.next(this.parseTableNext); + } else { + throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]")); } } - if (depth !== 0) { - return braceExpand("\\" + pattern, options8); - } - var suf = braceExpand(pattern.substr(i), options8); - var addBraces = set.length === 1; - set = set.map(function(p) { - return braceExpand(p, options8); - }); - set = set.reduce(function(l2, r) { - return l2.concat(r); - }); - if (addBraces) { - set = set.map(function(s) { - return "{" + s + "}"; - }); - } - var ret = []; - for (var i = 0, l = set.length; i < l; i++) { - for (var ii = 0, ll = suf.length; ii < ll; ii++) { - ret.push(set[i] + suf[ii]); + /* LIST [[a.b.c]] */ + parseList() { + this.ctx = this.obj; + return this.goto(this.parseListNext); } - } - return ret; - } - Minimatch.prototype.parse = parse3; - var SUBPARSE = {}; - function parse3(pattern, isSub) { - var options8 = this.options; - if (!options8.noglobstar && pattern === "**") - return GLOBSTAR; - if (pattern === "") - return ""; - var re = "", hasMagic = !!options8.nocase, escaping = false, patternListStack = [], plType, stateChar, inClass = false, reClassStart = -1, classStart = -1, patternStart = pattern.charAt(0) === "." ? "" : options8.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; + parseListNext() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else { + return this.callNow(this.parseKeyword, this.parseListMore); } - stateChar = false; } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - if (options8.debug) { - console.error("%s %s %s %j", pattern, i, re, c); + parseListMore(keyword) { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === CHAR_RSQB) { + if (!hasKey(this.ctx, keyword)) { + this.ctx[keyword] = List(); + } + if (isInlineList(this.ctx[keyword])) { + throw this.error(new TomlError("Can't extend an inline array")); + } else if (isList(this.ctx[keyword])) { + const next = Table(); + this.ctx[keyword].push(next); + this.ctx = next; + } else { + throw this.error(new TomlError("Can't redefine an existing key")); + } + return this.next(this.parseListEnd); + } else if (this.char === CHAR_PERIOD) { + if (!hasKey(this.ctx, keyword)) { + this.ctx = this.ctx[keyword] = Table(); + } else if (isInlineList(this.ctx[keyword])) { + throw this.error(new TomlError("Can't extend an inline array")); + } else if (isInlineTable(this.ctx[keyword])) { + throw this.error(new TomlError("Can't extend an inline table")); + } else if (isList(this.ctx[keyword])) { + this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1]; + } else if (isTable(this.ctx[keyword])) { + this.ctx = this.ctx[keyword]; + } else { + throw this.error(new TomlError("Can't redefine an existing key")); + } + return this.next(this.parseListNext); + } else { + throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]")); + } } - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; + parseListEnd(keyword) { + if (this.char === CHAR_RSQB) { + return this.next(this.parseWhitespaceToEOL); + } else { + throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]")); + } } - SWITCH: - switch (c) { - case "/": - return false; - case "\\": - clearStateChar(); - escaping = true; - continue; - case "?": - case "*": - case "+": - case "@": - case "!": - if (options8.debug) { - console.error("%s %s %s %j <-- stateChar", pattern, i, re, c); - } - if (inClass) { - if (c === "!" && i === classStart + 1) - c = "^"; - re += c; - continue; - } - clearStateChar(); - stateChar = c; - if (options8.noext) - clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - plType = stateChar; - patternListStack.push({ - type: plType, - start: i - 1, - reStart: re.length - }); - re += stateChar === "!" ? "(?:(?!" : "(?:"; - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - hasMagic = true; - re += ")"; - plType = patternListStack.pop().type; - switch (plType) { - case "!": - re += "[^/]*?)"; - break; - case "?": - case "+": - case "*": - re += plType; - case "@": - break; - } - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - re += "|"; - continue; - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; + /* VALUE string, number, boolean, inline list, inline object */ + parseValue() { + if (this.char === Parser.END) { + throw this.error(new TomlError("Key without value")); + } else if (this.char === CHAR_QUOT) { + return this.next(this.parseDoubleString); } - } - if (inClass) { - var cs = pattern.substr(classStart + 1), sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - var pl; - while (pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3); - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function(_, $1, $2) { - if (!$2) { - $2 = "\\"; + if (this.char === CHAR_APOS) { + return this.next(this.parseSingleString); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + return this.goto(this.parseNumberSign); + } else if (this.char === CHAR_i) { + return this.next(this.parseInf); + } else if (this.char === CHAR_n) { + return this.next(this.parseNan); + } else if (isDigit(this.char)) { + return this.goto(this.parseNumberOrDateTime); + } else if (this.char === CHAR_t || this.char === CHAR_f) { + return this.goto(this.parseBoolean); + } else if (this.char === CHAR_LSQB) { + return this.call(this.parseInlineList, this.recordValue); + } else if (this.char === CHAR_LCUB) { + return this.call(this.parseInlineTable, this.recordValue); + } else { + throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table")); } - return $1 + $1 + $2 + "|"; - }); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case ".": - case "[": - case "(": - addPatternStart = true; - } - if (re !== "" && hasMagic) - re = "(?=.)" + re; - if (addPatternStart) - re = patternStart + re; - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options8.nocase ? "i" : "", regExp = new RegExp("^" + re + "$", flags); - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options8) { - return new Minimatch(pattern, options8 || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) - return this.regexp; - var set = this.set; - if (!set.length) - return this.regexp = false; - var options8 = this.options; - var twoStar = options8.noglobstar ? star : options8.dot ? twoStarDot : twoStarNoDot, flags = options8.nocase ? "i" : ""; - var re = set.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) - re = "^(?!" + re + ").*$"; - try { - return this.regexp = new RegExp(re, flags); - } catch (ex) { - return this.regexp = false; - } - } - minimatch.match = function(list, pattern, options8) { - var mm = new Minimatch(pattern, options8); - list = list.filter(function(f) { - return mm.match(f); - }); - if (options8.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = match; - function match(f, partial) { - if (this.comment) - return false; - if (this.empty) - return f === ""; - if (f === "/" && partial) - return true; - var options8 = this.options; - if (platform === "win32") { - f = f.split("\\").join("/"); - } - f = f.split(slashSplit); - if (options8.debug) { - console.error(this.pattern, "split", f); - } - var set = this.set; - for (var i = 0, l = set.length; i < l; i++) { - var pattern = set[i]; - var hit = this.matchOne(f, pattern, partial); - if (hit) { - if (options8.flipNegate) - return true; - return !this.negate; - } - } - if (options8.flipNegate) - return false; - return this.negate; - } - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options8 = this.options; - if (options8.debug) { - console.error( - "matchOne", - { - "this": this, - file, - pattern - } - ); - } - if (options8.matchBase && pattern.length === 1) { - file = path9.basename(file.join("/")).split("/"); - } - if (options8.debug) { - console.error("matchOne", file.length, pattern.length); - } - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - if (options8.debug) { - console.error("matchOne loop"); } - var p = pattern[pi], f = file[fi]; - if (options8.debug) { - console.error(pattern, p, f); + recordValue(value) { + return this.returnNow(value); } - if (p === false) - return false; - if (p === GLOBSTAR) { - if (options8.debug) - console.error("GLOBSTAR", [pattern, p, f]); - var fr = fi, pr = pi + 1; - if (pr === pl) { - if (options8.debug) - console.error("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options8.dot && file[fi].charAt(0) === ".") - return false; - } - return true; + parseInf() { + if (this.char === CHAR_n) { + return this.next(this.parseInf2); + } else { + throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')); } - WHILE: - while (fr < fl) { - var swallowee = file[fr]; - if (options8.debug) { - console.error( - "\nglobstar while", - file, - fr, - pattern, - pr, - swallowee - ); - } - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - if (options8.debug) - console.error("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options8.dot && swallowee.charAt(0) === ".") { - if (options8.debug) - console.error("dot detected!", file, fr, pattern, pr); - break WHILE; - } - if (options8.debug) - console.error("globstar swallow a segment, and continue"); - fr++; - } + } + parseInf2() { + if (this.char === CHAR_f) { + if (this.state.buf === "-") { + return this.return(-Infinity); + } else { + return this.return(Infinity); } - if (partial) { - if (fr === fl) - return true; + } else { + throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')); } - return false; } - var hit; - if (typeof p === "string") { - if (options8.nocase) { - hit = f.toLowerCase() === p.toLowerCase(); + parseNan() { + if (this.char === CHAR_a) { + return this.next(this.parseNan2); } else { - hit = f === p; - } - if (options8.debug) { - console.error("string match", p, f, hit); - } - } else { - hit = f.match(p); - if (options8.debug) { - console.error("pattern match", p, f, hit); + throw this.error(new TomlError('Unexpected character, expected "nan"')); } } - if (!hit) - return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - var emptyFileEnd = fi === fl - 1 && file[fi] === ""; - return emptyFileEnd; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/editorconfig/src/lib/ini.js -var require_ini = __commonJS({ - "node_modules/editorconfig/src/lib/ini.js"(exports) { - "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + parseNan2() { + if (this.char === CHAR_n) { + return this.return(NaN); + } else { + throw this.error(new TomlError('Unexpected character, expected "nan"')); } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + /* KEYS, barewords or basic, literal, or dotted */ + parseKeyword() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseBasicString); + } else if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralString); + } else { + return this.goto(this.parseBareKey); } } - function step(result) { - result.done ? resolve2(result.value) : new P(function(resolve3) { - resolve3(result.value); - }).then(fulfilled, rejected); + /* KEYS: barewords */ + parseBareKey() { + do { + if (this.char === Parser.END) { + throw this.error(new TomlError("Key ended without value")); + } else if (isAlphaNumHyphen(this.char)) { + this.consume(); + } else if (this.state.buf.length === 0) { + throw this.error(new TomlError("Empty bare keys are not allowed")); + } else { + return this.returnNow(); + } + } while (this.nextChar()); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __generator = exports && exports.__generator || function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) - throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (_) - try { - 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; - if (y = 0, t) - op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; + /* STRINGS, single quoted (literal) */ + parseSingleString() { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiStringMaybe); + } else { + return this.goto(this.parseLiteralString); } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - var __importStar = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (Object.hasOwnProperty.call(mod, k)) - result[k] = mod[k]; - } - result["default"] = mod; - return result; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - var fs5 = __importStar(__require("fs")); - var regex = { - section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/, - param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/, - comment: /^\s*[#;].*$/ - }; - function parse3(file) { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a) { - return [2, new Promise(function(resolve2, reject) { - fs5.readFile(file, "utf8", function(err, data) { - if (err) { - reject(err); - return; - } - resolve2(parseString(data)); - }); - })]; - }); - }); - } - exports.parse = parse3; - function parseSync(file) { - return parseString(fs5.readFileSync(file, "utf8")); - } - exports.parseSync = parseSync; - function parseString(data) { - var sectionBody = {}; - var sectionName = null; - var value = [[sectionName, sectionBody]]; - var lines = data.split(/\r\n|\r|\n/); - lines.forEach(function(line2) { - var match; - if (regex.comment.test(line2)) { - return; } - if (regex.param.test(line2)) { - match = line2.match(regex.param); - sectionBody[match[1]] = match[2]; - } else if (regex.section.test(line2)) { - match = line2.match(regex.section); - sectionName = match[1]; - sectionBody = {}; - value.push([sectionName, sectionBody]); + parseLiteralString() { + do { + if (this.char === CHAR_APOS) { + return this.return(); + } else if (this.atEndOfLine()) { + throw this.error(new TomlError("Unterminated string")); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); } - }); - return value; - } - exports.parseString = parseString; - } -}); - -// node_modules/editorconfig/package.json -var require_package = __commonJS({ - "node_modules/editorconfig/package.json"(exports, module) { - module.exports = { - name: "editorconfig", - version: "0.15.3", - description: "EditorConfig File Locator and Interpreter for Node.js", - keywords: [ - "editorconfig", - "core" - ], - main: "src/index.js", - contributors: [ - "Hong Xu (topbug.net)", - "Jed Mao (https://github.com/jedmao/)", - "Trey Hunner (http://treyhunner.com)" - ], - directories: { - bin: "./bin", - lib: "./lib" - }, - scripts: { - clean: "rimraf dist", - prebuild: "npm run clean", - build: "tsc", - pretest: "npm run lint && npm run build && npm run copy && cmake .", - test: "ctest .", - "pretest:ci": "npm run pretest", - "test:ci": "ctest -VV --output-on-failure .", - lint: "npm run eclint && npm run tslint", - eclint: 'eclint check --indent_size ignore "src/**"', - tslint: "tslint --project tsconfig.json --exclude package.json", - copy: "cpy .npmignore LICENSE README.md CHANGELOG.md dist && cpy bin/* dist/bin && cpy src/lib/fnmatch*.* dist/src/lib", - prepub: "npm run lint && npm run build && npm run copy", - pub: "npm publish ./dist" - }, - repository: { - type: "git", - url: "git://github.com/editorconfig/editorconfig-core-js.git" - }, - bugs: "https://github.com/editorconfig/editorconfig-core-js/issues", - author: "EditorConfig Team", - license: "MIT", - dependencies: { - commander: "^2.19.0", - "lru-cache": "^4.1.5", - semver: "^5.6.0", - sigmund: "^1.0.1" - }, - devDependencies: { - "@types/mocha": "^5.2.6", - "@types/node": "^10.12.29", - "@types/semver": "^5.5.0", - "cpy-cli": "^2.0.0", - eclint: "^2.8.1", - mocha: "^5.2.0", - rimraf: "^2.6.3", - should: "^13.2.3", - tslint: "^5.13.1", - typescript: "^3.3.3333" - } - }; - } -}); - -// node_modules/editorconfig/src/index.js -var require_src = __commonJS({ - "node_modules/editorconfig/src/index.js"(exports) { - "use strict"; - var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + parseLiteralMultiStringMaybe() { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiString); + } else { + return this.returnNow(); } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + parseLiteralMultiString() { + if (this.char === CTRL_M) { + return null; + } else if (this.char === CTRL_J) { + return this.next(this.parseLiteralMultiStringContent); + } else { + return this.goto(this.parseLiteralMultiStringContent); } } - function step(result) { - result.done ? resolve2(result.value) : new P(function(resolve3) { - resolve3(result.value); - }).then(fulfilled, rejected); + parseLiteralMultiStringContent() { + do { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiEnd); + } else if (this.char === Parser.END) { + throw this.error(new TomlError("Unterminated multi-line string")); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __generator = exports && exports.__generator || function(thisArg, body) { - var _ = { label: 0, sent: function() { - if (t[0] & 1) - throw t[1]; - return t[1]; - }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (_) - try { - 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; - if (y = 0, t) - op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { value: op[1], done: false }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) - _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } - }; - var __importStar = exports && exports.__importStar || function(mod) { - if (mod && mod.__esModule) - return mod; - var result = {}; - if (mod != null) { - for (var k in mod) - if (Object.hasOwnProperty.call(mod, k)) - result[k] = mod[k]; - } - result["default"] = mod; - return result; - }; - var __importDefault = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - var fs5 = __importStar(__require("fs")); - var path9 = __importStar(__require("path")); - var semver = { - gte: require_gte() - }; - var fnmatch_1 = __importDefault(require_fnmatch()); - var ini_1 = require_ini(); - exports.parseString = ini_1.parseString; - var package_json_1 = __importDefault(require_package()); - var knownProps = { - end_of_line: true, - indent_style: true, - indent_size: true, - insert_final_newline: true, - trim_trailing_whitespace: true, - charset: true - }; - function fnmatch(filepath, glob) { - var matchOptions = { matchBase: true, dot: true, noext: true }; - glob = glob.replace(/\*\*/g, "{*,**/**/**}"); - return fnmatch_1.default(filepath, glob, matchOptions); - } - function getConfigFileNames(filepath, options8) { - var paths = []; - do { - filepath = path9.dirname(filepath); - paths.push(path9.join(filepath, options8.config)); - } while (filepath !== options8.root); - return paths; - } - function processMatches(matches, version) { - if ("indent_style" in matches && matches.indent_style === "tab" && !("indent_size" in matches) && semver.gte(version, "0.10.0")) { - matches.indent_size = "tab"; - } - if ("indent_size" in matches && !("tab_width" in matches) && matches.indent_size !== "tab") { - matches.tab_width = matches.indent_size; - } - if ("indent_size" in matches && "tab_width" in matches && matches.indent_size === "tab") { - matches.indent_size = matches.tab_width; - } - return matches; - } - function processOptions(options8, filepath) { - if (options8 === void 0) { - options8 = {}; - } - return { - config: options8.config || ".editorconfig", - version: options8.version || package_json_1.default.version, - root: path9.resolve(options8.root || path9.parse(filepath).root) - }; - } - function buildFullGlob(pathPrefix, glob) { - switch (glob.indexOf("/")) { - case -1: - glob = "**/" + glob; - break; - case 0: - glob = glob.substring(1); - break; - default: - break; - } - return path9.join(pathPrefix, glob); - } - function extendProps(props, options8) { - if (props === void 0) { - props = {}; - } - if (options8 === void 0) { - options8 = {}; - } - for (var key in options8) { - if (options8.hasOwnProperty(key)) { - var value = options8[key]; - var key2 = key.toLowerCase(); - var value2 = value; - if (knownProps[key2]) { - value2 = value.toLowerCase(); - } - try { - value2 = JSON.parse(value); - } catch (e) { + parseLiteralMultiEnd() { + if (this.char === CHAR_APOS) { + return this.next(this.parseLiteralMultiEnd2); + } else { + this.state.buf += "'"; + return this.goto(this.parseLiteralMultiStringContent); } - if (typeof value === "undefined" || value === null) { - value2 = String(value); + } + parseLiteralMultiEnd2() { + if (this.char === CHAR_APOS) { + return this.return(); + } else { + this.state.buf += "''"; + return this.goto(this.parseLiteralMultiStringContent); } - props[key2] = value2; } - } - return props; - } - function parseFromConfigs(configs, filepath, options8) { - return processMatches(configs.reverse().reduce(function(matches, file) { - var pathPrefix = path9.dirname(file.name); - file.contents.forEach(function(section) { - var glob = section[0]; - var options22 = section[1]; - if (!glob) { - return; + /* STRINGS double quoted */ + parseDoubleString() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiStringMaybe); + } else { + return this.goto(this.parseBasicString); } - var fullGlob = buildFullGlob(pathPrefix, glob); - if (!fnmatch(filepath, fullGlob)) { - return; + } + parseBasicString() { + do { + if (this.char === CHAR_BSOL) { + return this.call(this.parseEscape, this.recordEscapeReplacement); + } else if (this.char === CHAR_QUOT) { + return this.return(); + } else if (this.atEndOfLine()) { + throw this.error(new TomlError("Unterminated string")); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); + } + recordEscapeReplacement(replacement) { + this.state.buf += replacement; + return this.goto(this.parseBasicString); + } + parseMultiStringMaybe() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiString); + } else { + return this.returnNow(); } - matches = extendProps(matches, options22); - }); - return matches; - }, {}), options8.version); - } - function getConfigsForFiles(files) { - var configs = []; - for (var i in files) { - if (files.hasOwnProperty(i)) { - var file = files[i]; - var contents = ini_1.parseString(file.contents); - configs.push({ - name: file.name, - contents - }); - if ((contents[0][1].root || "").toLowerCase() === "true") { - break; + } + parseMultiString() { + if (this.char === CTRL_M) { + return null; + } else if (this.char === CTRL_J) { + return this.next(this.parseMultiStringContent); + } else { + return this.goto(this.parseMultiStringContent); } } - } - return configs; - } - function readConfigFiles(filepaths) { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a) { - return [2, Promise.all(filepaths.map(function(name) { - return new Promise(function(resolve2) { - fs5.readFile(name, "utf8", function(err, data) { - resolve2({ - name, - contents: err ? "" : data - }); - }); - }); - }))]; - }); - }); - } - function readConfigFilesSync(filepaths) { - var files = []; - var file; - filepaths.forEach(function(filepath) { - try { - file = fs5.readFileSync(filepath, "utf8"); - } catch (e) { - file = ""; + parseMultiStringContent() { + do { + if (this.char === CHAR_BSOL) { + return this.call(this.parseMultiEscape, this.recordMultiEscapeReplacement); + } else if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiEnd); + } else if (this.char === Parser.END) { + throw this.error(new TomlError("Unterminated multi-line string")); + } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M) { + throw this.errorControlCharInString(); + } else { + this.consume(); + } + } while (this.nextChar()); } - files.push({ - name: filepath, - contents: file - }); - }); - return files; - } - function opts(filepath, options8) { - if (options8 === void 0) { - options8 = {}; - } - var resolvedFilePath = path9.resolve(filepath); - return [ - resolvedFilePath, - processOptions(options8, resolvedFilePath) - ]; - } - function parseFromFiles(filepath, files, options8) { - if (options8 === void 0) { - options8 = {}; - } - return __awaiter(this, void 0, void 0, function() { - var _a, resolvedFilePath, processedOptions; - return __generator(this, function(_b) { - _a = opts(filepath, options8), resolvedFilePath = _a[0], processedOptions = _a[1]; - return [2, files.then(getConfigsForFiles).then(function(configs) { - return parseFromConfigs(configs, resolvedFilePath, processedOptions); - })]; - }); - }); - } - exports.parseFromFiles = parseFromFiles; - function parseFromFilesSync(filepath, files, options8) { - if (options8 === void 0) { - options8 = {}; - } - var _a = opts(filepath, options8), resolvedFilePath = _a[0], processedOptions = _a[1]; - return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); - } - exports.parseFromFilesSync = parseFromFilesSync; - function parse3(_filepath, _options) { - if (_options === void 0) { - _options = {}; - } - return __awaiter(this, void 0, void 0, function() { - var _a, resolvedFilePath, processedOptions, filepaths; - return __generator(this, function(_b) { - _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; - filepaths = getConfigFileNames(resolvedFilePath, processedOptions); - return [2, readConfigFiles(filepaths).then(getConfigsForFiles).then(function(configs) { - return parseFromConfigs(configs, resolvedFilePath, processedOptions); - })]; - }); - }); - } - exports.parse = parse3; - function parseSync(_filepath, _options) { - if (_options === void 0) { - _options = {}; - } - var _a = opts(_filepath, _options), resolvedFilePath = _a[0], processedOptions = _a[1]; - var filepaths = getConfigFileNames(resolvedFilePath, processedOptions); - var files = readConfigFilesSync(filepaths); - return parseFromConfigs(getConfigsForFiles(files), resolvedFilePath, processedOptions); - } - exports.parseSync = parseSync; - } -}); - -// node_modules/@iarna/toml/lib/parser.js -var require_parser = __commonJS({ - "node_modules/@iarna/toml/lib/parser.js"(exports, module) { - "use strict"; - var ParserEND = 1114112; - var ParserError = class _ParserError extends Error { - /* istanbul ignore next */ - constructor(msg, filename, linenumber) { - super("[ParserError] " + msg, filename, linenumber); - this.name = "ParserError"; - this.code = "ParserError"; - if (Error.captureStackTrace) - Error.captureStackTrace(this, _ParserError); - } - }; - var State = class { - constructor(parser) { - this.parser = parser; - this.buf = ""; - this.returned = null; - this.result = null; - this.resultTable = null; - this.resultArr = null; - } - }; - var Parser = class { - constructor() { - this.pos = 0; - this.col = 0; - this.line = 0; - this.obj = {}; - this.ctx = this.obj; - this.stack = []; - this._buf = ""; - this.char = null; - this.ii = 0; - this.state = new State(this.parseStart); - } - parse(str) { - if (str.length === 0 || str.length == null) - return; - this._buf = String(str); - this.ii = -1; - this.char = -1; - let getNext; - while (getNext === false || this.nextChar()) { - getNext = this.runOne(); + errorControlCharInString() { + let displayCode = "\\u00"; + if (this.char < 16) { + displayCode += "0"; + } + displayCode += this.char.toString(16); + return this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${displayCode} instead`)); } - this._buf = null; - } - nextChar() { - if (this.char === 10) { - ++this.line; - this.col = -1; + recordMultiEscapeReplacement(replacement) { + this.state.buf += replacement; + return this.goto(this.parseMultiStringContent); } - ++this.ii; - this.char = this._buf.codePointAt(this.ii); - ++this.pos; - ++this.col; - return this.haveBuffer(); - } - haveBuffer() { - return this.ii < this._buf.length; - } - runOne() { - return this.state.parser.call(this, this.state.returned); - } - finish() { - this.char = ParserEND; - let last; - do { - last = this.state.parser; - this.runOne(); - } while (this.state.parser !== last); - this.ctx = null; - this.state = null; - this._buf = null; - return this.obj; - } - next(fn) { - if (typeof fn !== "function") - throw new ParserError("Tried to set state to non-existent state: " + JSON.stringify(fn)); - this.state.parser = fn; - } - goto(fn) { - this.next(fn); - return this.runOne(); - } - call(fn, returnWith) { - if (returnWith) - this.next(returnWith); - this.stack.push(this.state); - this.state = new State(fn); - } - callNow(fn, returnWith) { - this.call(fn, returnWith); - return this.runOne(); - } - return(value) { - if (this.stack.length === 0) - throw this.error(new ParserError("Stack underflow")); - if (value === void 0) - value = this.state.buf; - this.state = this.stack.pop(); - this.state.returned = value; - } - returnNow(value) { - this.return(value); - return this.runOne(); - } - consume() { - if (this.char === ParserEND) - throw this.error(new ParserError("Unexpected end-of-buffer")); - this.state.buf += this._buf[this.ii]; - } - error(err) { - err.line = this.line; - err.col = this.col; - err.pos = this.pos; - return err; - } - /* istanbul ignore next */ - parseStart() { - throw new ParserError("Must declare a parseStart method"); - } - }; - Parser.END = ParserEND; - Parser.Error = ParserError; - module.exports = Parser; - } -}); - -// node_modules/@iarna/toml/lib/create-datetime.js -var require_create_datetime = __commonJS({ - "node_modules/@iarna/toml/lib/create-datetime.js"(exports, module) { - "use strict"; - module.exports = (value) => { - const date = new Date(value); - if (isNaN(date)) { - throw new TypeError("Invalid Datetime"); - } else { - return date; - } - }; - } -}); - -// node_modules/@iarna/toml/lib/format-num.js -var require_format_num = __commonJS({ - "node_modules/@iarna/toml/lib/format-num.js"(exports, module) { - "use strict"; - module.exports = (d, num) => { - num = String(num); - while (num.length < d) - num = "0" + num; - return num; - }; - } -}); - -// node_modules/@iarna/toml/lib/create-datetime-float.js -var require_create_datetime_float = __commonJS({ - "node_modules/@iarna/toml/lib/create-datetime-float.js"(exports, module) { - "use strict"; - var f = require_format_num(); - var FloatingDateTime = class extends Date { - constructor(value) { - super(value + "Z"); - this.isFloating = true; - } - toISOString() { - const date = `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}`; - const time = `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}`; - return `${date}T${time}`; - } - }; - module.exports = (value) => { - const date = new FloatingDateTime(value); - if (isNaN(date)) { - throw new TypeError("Invalid Datetime"); - } else { - return date; - } - }; - } -}); - -// node_modules/@iarna/toml/lib/create-date.js -var require_create_date = __commonJS({ - "node_modules/@iarna/toml/lib/create-date.js"(exports, module) { - "use strict"; - var f = require_format_num(); - var DateTime = global.Date; - var Date2 = class extends DateTime { - constructor(value) { - super(value); - this.isDate = true; - } - toISOString() { - return `${this.getUTCFullYear()}-${f(2, this.getUTCMonth() + 1)}-${f(2, this.getUTCDate())}`; - } - }; - module.exports = (value) => { - const date = new Date2(value); - if (isNaN(date)) { - throw new TypeError("Invalid Datetime"); - } else { - return date; - } - }; - } -}); - -// node_modules/@iarna/toml/lib/create-time.js -var require_create_time = __commonJS({ - "node_modules/@iarna/toml/lib/create-time.js"(exports, module) { - "use strict"; - var f = require_format_num(); - var Time = class extends Date { - constructor(value) { - super(`0000-01-01T${value}Z`); - this.isTime = true; - } - toISOString() { - return `${f(2, this.getUTCHours())}:${f(2, this.getUTCMinutes())}:${f(2, this.getUTCSeconds())}.${f(3, this.getUTCMilliseconds())}`; - } - }; - module.exports = (value) => { - const date = new Time(value); - if (isNaN(date)) { - throw new TypeError("Invalid Datetime"); - } else { - return date; - } - }; - } -}); - -// node_modules/@iarna/toml/lib/toml-parser.js -var require_toml_parser = __commonJS({ - "node_modules/@iarna/toml/lib/toml-parser.js"(exports, module) { - "use strict"; - module.exports = makeParserClass(require_parser()); - module.exports.makeParserClass = makeParserClass; - var TomlError = class _TomlError extends Error { - constructor(msg) { - super(msg); - this.name = "TomlError"; - if (Error.captureStackTrace) - Error.captureStackTrace(this, _TomlError); - this.fromTOML = true; - this.wrapped = null; - } - }; - TomlError.wrap = (err) => { - const terr = new TomlError(err.message); - terr.code = err.code; - terr.wrapped = err; - return terr; - }; - module.exports.TomlError = TomlError; - var createDateTime = require_create_datetime(); - var createDateTimeFloat = require_create_datetime_float(); - var createDate = require_create_date(); - var createTime = require_create_time(); - var CTRL_I = 9; - var CTRL_J = 10; - var CTRL_M = 13; - var CTRL_CHAR_BOUNDARY = 31; - var CHAR_SP = 32; - var CHAR_QUOT = 34; - var CHAR_NUM = 35; - var CHAR_APOS = 39; - var CHAR_PLUS = 43; - var CHAR_COMMA = 44; - var CHAR_HYPHEN = 45; - var CHAR_PERIOD = 46; - var CHAR_0 = 48; - var CHAR_1 = 49; - var CHAR_7 = 55; - var CHAR_9 = 57; - var CHAR_COLON = 58; - var CHAR_EQUALS = 61; - var CHAR_A = 65; - var CHAR_E = 69; - var CHAR_F = 70; - var CHAR_T = 84; - var CHAR_U = 85; - var CHAR_Z = 90; - var CHAR_LOWBAR = 95; - var CHAR_a = 97; - var CHAR_b = 98; - var CHAR_e = 101; - var CHAR_f = 102; - var CHAR_i = 105; - var CHAR_l = 108; - var CHAR_n = 110; - var CHAR_o = 111; - var CHAR_r = 114; - var CHAR_s = 115; - var CHAR_t = 116; - var CHAR_u = 117; - var CHAR_x = 120; - var CHAR_z = 122; - var CHAR_LCUB = 123; - var CHAR_RCUB = 125; - var CHAR_LSQB = 91; - var CHAR_BSOL = 92; - var CHAR_RSQB = 93; - var CHAR_DEL = 127; - var SURROGATE_FIRST = 55296; - var SURROGATE_LAST = 57343; - var escapes = { - [CHAR_b]: "\b", - [CHAR_t]: " ", - [CHAR_n]: "\n", - [CHAR_f]: "\f", - [CHAR_r]: "\r", - [CHAR_QUOT]: '"', - [CHAR_BSOL]: "\\" - }; - function isDigit(cp) { - return cp >= CHAR_0 && cp <= CHAR_9; - } - function isHexit(cp) { - return cp >= CHAR_A && cp <= CHAR_F || cp >= CHAR_a && cp <= CHAR_f || cp >= CHAR_0 && cp <= CHAR_9; - } - function isBit(cp) { - return cp === CHAR_1 || cp === CHAR_0; - } - function isOctit(cp) { - return cp >= CHAR_0 && cp <= CHAR_7; - } - function isAlphaNumQuoteHyphen(cp) { - return cp >= CHAR_A && cp <= CHAR_Z || cp >= CHAR_a && cp <= CHAR_z || cp >= CHAR_0 && cp <= CHAR_9 || cp === CHAR_APOS || cp === CHAR_QUOT || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN; - } - function isAlphaNumHyphen(cp) { - return cp >= CHAR_A && cp <= CHAR_Z || cp >= CHAR_a && cp <= CHAR_z || cp >= CHAR_0 && cp <= CHAR_9 || cp === CHAR_LOWBAR || cp === CHAR_HYPHEN; - } - var _type = Symbol("type"); - var _declared = Symbol("declared"); - var hasOwnProperty3 = Object.prototype.hasOwnProperty; - var defineProperty = Object.defineProperty; - var descriptor = { configurable: true, enumerable: true, writable: true, value: void 0 }; - function hasKey(obj, key) { - if (hasOwnProperty3.call(obj, key)) - return true; - if (key === "__proto__") - defineProperty(obj, "__proto__", descriptor); - return false; - } - var INLINE_TABLE = Symbol("inline-table"); - function InlineTable() { - return Object.defineProperties({}, { - [_type]: { value: INLINE_TABLE } - }); - } - function isInlineTable(obj) { - if (obj === null || typeof obj !== "object") - return false; - return obj[_type] === INLINE_TABLE; - } - var TABLE = Symbol("table"); - function Table() { - return Object.defineProperties({}, { - [_type]: { value: TABLE }, - [_declared]: { value: false, writable: true } - }); - } - function isTable(obj) { - if (obj === null || typeof obj !== "object") - return false; - return obj[_type] === TABLE; - } - var _contentType = Symbol("content-type"); - var INLINE_LIST = Symbol("inline-list"); - function InlineList(type) { - return Object.defineProperties([], { - [_type]: { value: INLINE_LIST }, - [_contentType]: { value: type } - }); - } - function isInlineList(obj) { - if (obj === null || typeof obj !== "object") - return false; - return obj[_type] === INLINE_LIST; - } - var LIST = Symbol("list"); - function List() { - return Object.defineProperties([], { - [_type]: { value: LIST } - }); - } - function isList(obj) { - if (obj === null || typeof obj !== "object") - return false; - return obj[_type] === LIST; - } - var _custom; - try { - const utilInspect = __require("util").inspect; - _custom = utilInspect.custom; - } catch (_) { - } - var _inspect = _custom || "inspect"; - var BoxedBigInt = class { - constructor(value) { - try { - this.value = global.BigInt.asIntN(64, value); - } catch (_) { - this.value = null; + parseMultiEnd() { + if (this.char === CHAR_QUOT) { + return this.next(this.parseMultiEnd2); + } else { + this.state.buf += '"'; + return this.goto(this.parseMultiStringContent); + } } - Object.defineProperty(this, _type, { value: INTEGER }); - } - isNaN() { - return this.value === null; - } - /* istanbul ignore next */ - toString() { - return String(this.value); - } - /* istanbul ignore next */ - [_inspect]() { - return `[BigInt: ${this.toString()}]}`; - } - valueOf() { - return this.value; - } - }; - var INTEGER = Symbol("integer"); - function Integer(value) { - let num = Number(value); - if (Object.is(num, -0)) - num = 0; - if (global.BigInt && !Number.isSafeInteger(num)) { - return new BoxedBigInt(value); - } else { - return Object.defineProperties(new Number(num), { - isNaN: { value: function() { - return isNaN(this); - } }, - [_type]: { value: INTEGER }, - [_inspect]: { value: () => `[Integer: ${value}]` } - }); - } - } - function isInteger(obj) { - if (obj === null || typeof obj !== "object") - return false; - return obj[_type] === INTEGER; - } - var FLOAT = Symbol("float"); - function Float(value) { - return Object.defineProperties(new Number(value), { - [_type]: { value: FLOAT }, - [_inspect]: { value: () => `[Float: ${value}]` } - }); - } - function isFloat(obj) { - if (obj === null || typeof obj !== "object") - return false; - return obj[_type] === FLOAT; - } - function tomlType(value) { - const type = typeof value; - if (type === "object") { - if (value === null) - return "null"; - if (value instanceof Date) - return "datetime"; - if (_type in value) { - switch (value[_type]) { - case INLINE_TABLE: - return "inline-table"; - case INLINE_LIST: - return "inline-list"; - case TABLE: - return "table"; - case LIST: - return "list"; - case FLOAT: - return "float"; - case INTEGER: - return "integer"; + parseMultiEnd2() { + if (this.char === CHAR_QUOT) { + return this.return(); + } else { + this.state.buf += '""'; + return this.goto(this.parseMultiStringContent); } } - } - return type; - } - function makeParserClass(Parser) { - class TOMLParser extends Parser { - constructor() { - super(); - this.ctx = this.obj = Table(); - } - /* MATCH HELPER */ - atEndOfWord() { - return this.char === CHAR_NUM || this.char === CTRL_I || this.char === CHAR_SP || this.atEndOfLine(); - } - atEndOfLine() { - return this.char === Parser.END || this.char === CTRL_J || this.char === CTRL_M; + parseMultiEscape() { + if (this.char === CTRL_M || this.char === CTRL_J) { + return this.next(this.parseMultiTrim); + } else if (this.char === CHAR_SP || this.char === CTRL_I) { + return this.next(this.parsePreMultiTrim); + } else { + return this.goto(this.parseEscape); + } } - parseStart() { - if (this.char === Parser.END) { - return null; - } else if (this.char === CHAR_LSQB) { - return this.call(this.parseTableOrList); - } else if (this.char === CHAR_NUM) { - return this.call(this.parseComment); - } else if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + parsePreMultiTrim() { + if (this.char === CHAR_SP || this.char === CTRL_I) { return null; - } else if (isAlphaNumQuoteHyphen(this.char)) { - return this.callNow(this.parseAssignStatement); + } else if (this.char === CTRL_M || this.char === CTRL_J) { + return this.next(this.parseMultiTrim); } else { - throw this.error(new TomlError(`Unknown character "${this.char}"`)); + throw this.error(new TomlError("Can't escape whitespace")); } } - // HELPER, this strips any whitespace and comments to the end of the line - // then RETURNS. Last state in a production. - parseWhitespaceToEOL() { - if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { + parseMultiTrim() { + if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { return null; - } else if (this.char === CHAR_NUM) { - return this.goto(this.parseComment); - } else if (this.char === Parser.END || this.char === CTRL_J) { - return this.return(); } else { - throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line")); + return this.returnNow(); } } - /* ASSIGNMENT: key = value */ - parseAssignStatement() { - return this.callNow(this.parseAssign, this.recordAssignStatement); + parseEscape() { + if (this.char in escapes) { + return this.return(escapes[this.char]); + } else if (this.char === CHAR_u) { + return this.call(this.parseSmallUnicode, this.parseUnicodeReturn); + } else if (this.char === CHAR_U) { + return this.call(this.parseLargeUnicode, this.parseUnicodeReturn); + } else { + throw this.error(new TomlError("Unknown escape character: " + this.char)); + } } - recordAssignStatement(kv) { - let target = this.ctx; - let finalKey = kv.key.pop(); - for (let kw of kv.key) { - if (hasKey(target, kw) && (!isTable(target[kw]) || target[kw][_declared])) { - throw this.error(new TomlError("Can't redefine existing key")); + parseUnicodeReturn(char) { + try { + const codePoint = parseInt(char, 16); + if (codePoint >= SURROGATE_FIRST && codePoint <= SURROGATE_LAST) { + throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved")); } - target = target[kw] = target[kw] || Table(); - } - if (hasKey(target, finalKey)) { - throw this.error(new TomlError("Can't redefine existing key")); + return this.returnNow(String.fromCodePoint(codePoint)); + } catch (err) { + throw this.error(TomlError.wrap(err)); } - if (isInteger(kv.value) || isFloat(kv.value)) { - target[finalKey] = kv.value.valueOf(); + } + parseSmallUnicode() { + if (!isHexit(this.char)) { + throw this.error(new TomlError("Invalid character in unicode sequence, expected hex")); } else { - target[finalKey] = kv.value; + this.consume(); + if (this.state.buf.length >= 4) + return this.return(); } - return this.goto(this.parseWhitespaceToEOL); - } - /* ASSSIGNMENT expression, key = value possibly inside an inline table */ - parseAssign() { - return this.callNow(this.parseKeyword, this.recordAssignKeyword); } - recordAssignKeyword(key) { - if (this.state.resultTable) { - this.state.resultTable.push(key); + parseLargeUnicode() { + if (!isHexit(this.char)) { + throw this.error(new TomlError("Invalid character in unicode sequence, expected hex")); } else { - this.state.resultTable = [key]; + this.consume(); + if (this.state.buf.length >= 8) + return this.return(); } - return this.goto(this.parseAssignKeywordPreDot); } - parseAssignKeywordPreDot() { - if (this.char === CHAR_PERIOD) { - return this.next(this.parseAssignKeywordPostDot); - } else if (this.char !== CHAR_SP && this.char !== CTRL_I) { - return this.goto(this.parseAssignEqual); - } + /* NUMBERS */ + parseNumberSign() { + this.consume(); + return this.next(this.parseMaybeSignedInfOrNan); } - parseAssignKeywordPostDot() { - if (this.char !== CHAR_SP && this.char !== CTRL_I) { - return this.callNow(this.parseKeyword, this.recordAssignKeyword); + parseMaybeSignedInfOrNan() { + if (this.char === CHAR_i) { + return this.next(this.parseInf); + } else if (this.char === CHAR_n) { + return this.next(this.parseNan); + } else { + return this.callNow(this.parseNoUnder, this.parseNumberIntegerStart); } } - parseAssignEqual() { - if (this.char === CHAR_EQUALS) { - return this.next(this.parseAssignPreValue); + parseNumberIntegerStart() { + if (this.char === CHAR_0) { + this.consume(); + return this.next(this.parseNumberIntegerExponentOrDecimal); } else { - throw this.error(new TomlError('Invalid character, expected "="')); + return this.goto(this.parseNumberInteger); } } - parseAssignPreValue() { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null; + parseNumberIntegerExponentOrDecimal() { + if (this.char === CHAR_PERIOD) { + this.consume(); + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); } else { - return this.callNow(this.parseValue, this.recordAssignValue); + return this.returnNow(Integer(this.state.buf)); } } - recordAssignValue(value) { - return this.returnNow({ key: this.state.resultTable, value }); - } - /* COMMENTS: #...eol */ - parseComment() { - do { - if (this.char === Parser.END || this.char === CTRL_J) { - return this.return(); + parseNumberInteger() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); + } else if (this.char === CHAR_PERIOD) { + this.consume(); + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else { + const result = Integer(this.state.buf); + if (result.isNaN()) { + throw this.error(new TomlError("Invalid number")); + } else { + return this.returnNow(result); } - } while (this.nextChar()); + } } - /* TABLES AND LISTS, [foo] and [[foo]] */ - parseTableOrList() { - if (this.char === CHAR_LSQB) { - this.next(this.parseList); - } else { - return this.goto(this.parseTable); + parseNoUnder() { + if (this.char === CHAR_LOWBAR || this.char === CHAR_PERIOD || this.char === CHAR_E || this.char === CHAR_e) { + throw this.error(new TomlError("Unexpected character, expected digit")); + } else if (this.atEndOfWord()) { + throw this.error(new TomlError("Incomplete number")); } + return this.returnNow(); } - /* TABLE [foo.bar.baz] */ - parseTable() { - this.ctx = this.obj; - return this.goto(this.parseTableNext); - } - parseTableNext() { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null; - } else { - return this.callNow(this.parseKeyword, this.parseTableMore); + parseNoUnderHexOctBinLiteral() { + if (this.char === CHAR_LOWBAR || this.char === CHAR_PERIOD) { + throw this.error(new TomlError("Unexpected character, expected digit")); + } else if (this.atEndOfWord()) { + throw this.error(new TomlError("Incomplete number")); } + return this.returnNow(); } - parseTableMore(keyword) { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null; - } else if (this.char === CHAR_RSQB) { - if (hasKey(this.ctx, keyword) && (!isTable(this.ctx[keyword]) || this.ctx[keyword][_declared])) { - throw this.error(new TomlError("Can't redefine existing key")); - } else { - this.ctx = this.ctx[keyword] = this.ctx[keyword] || Table(); - this.ctx[_declared] = true; - } - return this.next(this.parseWhitespaceToEOL); - } else if (this.char === CHAR_PERIOD) { - if (!hasKey(this.ctx, keyword)) { - this.ctx = this.ctx[keyword] = Table(); - } else if (isTable(this.ctx[keyword])) { - this.ctx = this.ctx[keyword]; - } else if (isList(this.ctx[keyword])) { - this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1]; - } else { - throw this.error(new TomlError("Can't redefine existing key")); - } - return this.next(this.parseTableNext); + parseNumberFloat() { + if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else if (isDigit(this.char)) { + this.consume(); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); } else { - throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]")); + return this.returnNow(Float(this.state.buf)); } } - /* LIST [[a.b.c]] */ - parseList() { - this.ctx = this.obj; - return this.goto(this.parseListNext); - } - parseListNext() { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null; + parseNumberExponentSign() { + if (isDigit(this.char)) { + return this.goto(this.parseNumberExponent); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + this.consume(); + this.call(this.parseNoUnder, this.parseNumberExponent); } else { - return this.callNow(this.parseKeyword, this.parseListMore); + throw this.error(new TomlError("Unexpected character, expected -, + or digit")); } } - parseListMore(keyword) { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null; - } else if (this.char === CHAR_RSQB) { - if (!hasKey(this.ctx, keyword)) { - this.ctx[keyword] = List(); - } - if (isInlineList(this.ctx[keyword])) { - throw this.error(new TomlError("Can't extend an inline array")); - } else if (isList(this.ctx[keyword])) { - const next = Table(); - this.ctx[keyword].push(next); - this.ctx = next; - } else { - throw this.error(new TomlError("Can't redefine an existing key")); - } - return this.next(this.parseListEnd); - } else if (this.char === CHAR_PERIOD) { - if (!hasKey(this.ctx, keyword)) { - this.ctx = this.ctx[keyword] = Table(); - } else if (isInlineList(this.ctx[keyword])) { - throw this.error(new TomlError("Can't extend an inline array")); - } else if (isInlineTable(this.ctx[keyword])) { - throw this.error(new TomlError("Can't extend an inline table")); - } else if (isList(this.ctx[keyword])) { - this.ctx = this.ctx[keyword][this.ctx[keyword].length - 1]; - } else if (isTable(this.ctx[keyword])) { - this.ctx = this.ctx[keyword]; - } else { - throw this.error(new TomlError("Can't redefine an existing key")); - } - return this.next(this.parseListNext); + parseNumberExponent() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder); } else { - throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]")); + return this.returnNow(Float(this.state.buf)); } } - parseListEnd(keyword) { - if (this.char === CHAR_RSQB) { - return this.next(this.parseWhitespaceToEOL); + /* NUMBERS or DATETIMES */ + parseNumberOrDateTime() { + if (this.char === CHAR_0) { + this.consume(); + return this.next(this.parseNumberBaseOrDateTime); } else { - throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]")); + return this.goto(this.parseNumberOrDateTimeOnly); } } - /* VALUE string, number, boolean, inline list, inline object */ - parseValue() { - if (this.char === Parser.END) { - throw this.error(new TomlError("Key without value")); - } else if (this.char === CHAR_QUOT) { - return this.next(this.parseDoubleString); - } - if (this.char === CHAR_APOS) { - return this.next(this.parseSingleString); - } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { - return this.goto(this.parseNumberSign); - } else if (this.char === CHAR_i) { - return this.next(this.parseInf); - } else if (this.char === CHAR_n) { - return this.next(this.parseNan); + parseNumberOrDateTimeOnly() { + if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnder, this.parseNumberInteger); } else if (isDigit(this.char)) { - return this.goto(this.parseNumberOrDateTime); - } else if (this.char === CHAR_t || this.char === CHAR_f) { - return this.goto(this.parseBoolean); - } else if (this.char === CHAR_LSQB) { - return this.call(this.parseInlineList, this.recordValue); - } else if (this.char === CHAR_LCUB) { - return this.call(this.parseInlineTable, this.recordValue); - } else { - throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table")); - } - } - recordValue(value) { - return this.returnNow(value); - } - parseInf() { - if (this.char === CHAR_n) { - return this.next(this.parseInf2); + this.consume(); + if (this.state.buf.length > 4) + this.next(this.parseNumberInteger); + } else if (this.char === CHAR_E || this.char === CHAR_e) { + this.consume(); + return this.next(this.parseNumberExponentSign); + } else if (this.char === CHAR_PERIOD) { + this.consume(); + return this.call(this.parseNoUnder, this.parseNumberFloat); + } else if (this.char === CHAR_HYPHEN) { + return this.goto(this.parseDateTime); + } else if (this.char === CHAR_COLON) { + return this.goto(this.parseOnlyTimeHour); } else { - throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')); + return this.returnNow(Integer(this.state.buf)); } } - parseInf2() { - if (this.char === CHAR_f) { - if (this.state.buf === "-") { - return this.return(-Infinity); + parseDateTimeOnly() { + if (this.state.buf.length < 4) { + if (isDigit(this.char)) { + return this.consume(); + } else if (this.char === CHAR_COLON) { + return this.goto(this.parseOnlyTimeHour); } else { - return this.return(Infinity); + throw this.error(new TomlError("Expected digit while parsing year part of a date")); } } else { - throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"')); + if (this.char === CHAR_HYPHEN) { + return this.goto(this.parseDateTime); + } else { + throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date")); + } } } - parseNan() { - if (this.char === CHAR_a) { - return this.next(this.parseNan2); + parseNumberBaseOrDateTime() { + if (this.char === CHAR_b) { + this.consume(); + return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerBin); + } else if (this.char === CHAR_o) { + this.consume(); + return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerOct); + } else if (this.char === CHAR_x) { + this.consume(); + return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerHex); + } else if (this.char === CHAR_PERIOD) { + return this.goto(this.parseNumberInteger); + } else if (isDigit(this.char)) { + return this.goto(this.parseDateTimeOnly); } else { - throw this.error(new TomlError('Unexpected character, expected "nan"')); + return this.returnNow(Integer(this.state.buf)); } } - parseNan2() { - if (this.char === CHAR_n) { - return this.return(NaN); + parseIntegerHex() { + if (isHexit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnderHexOctBinLiteral); } else { - throw this.error(new TomlError('Unexpected character, expected "nan"')); + const result = Integer(this.state.buf); + if (result.isNaN()) { + throw this.error(new TomlError("Invalid number")); + } else { + return this.returnNow(result); + } } } - /* KEYS, barewords or basic, literal, or dotted */ - parseKeyword() { - if (this.char === CHAR_QUOT) { - return this.next(this.parseBasicString); - } else if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralString); + parseIntegerOct() { + if (isOctit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnderHexOctBinLiteral); } else { - return this.goto(this.parseBareKey); + const result = Integer(this.state.buf); + if (result.isNaN()) { + throw this.error(new TomlError("Invalid number")); + } else { + return this.returnNow(result); + } } } - /* KEYS: barewords */ - parseBareKey() { - do { - if (this.char === Parser.END) { - throw this.error(new TomlError("Key ended without value")); - } else if (isAlphaNumHyphen(this.char)) { - this.consume(); - } else if (this.state.buf.length === 0) { - throw this.error(new TomlError("Empty bare keys are not allowed")); + parseIntegerBin() { + if (isBit(this.char)) { + this.consume(); + } else if (this.char === CHAR_LOWBAR) { + return this.call(this.parseNoUnderHexOctBinLiteral); + } else { + const result = Integer(this.state.buf); + if (result.isNaN()) { + throw this.error(new TomlError("Invalid number")); } else { - return this.returnNow(); + return this.returnNow(result); } - } while (this.nextChar()); + } } - /* STRINGS, single quoted (literal) */ - parseSingleString() { - if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralMultiStringMaybe); - } else { - return this.goto(this.parseLiteralString); + /* DATETIME */ + parseDateTime() { + if (this.state.buf.length < 4) { + throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters")); } + this.state.result = this.state.buf; + this.state.buf = ""; + return this.next(this.parseDateMonth); } - parseLiteralString() { - do { - if (this.char === CHAR_APOS) { - return this.return(); - } else if (this.atEndOfLine()) { - throw this.error(new TomlError("Unterminated string")); - } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I) { - throw this.errorControlCharInString(); - } else { - this.consume(); + parseDateMonth() { + if (this.char === CHAR_HYPHEN) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError("Months less than 10 must be zero padded to two characters")); } - } while (this.nextChar()); + this.state.result += "-" + this.state.buf; + this.state.buf = ""; + return this.next(this.parseDateDay); + } else if (isDigit(this.char)) { + this.consume(); + } else { + throw this.error(new TomlError("Incomplete datetime")); + } } - parseLiteralMultiStringMaybe() { - if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralMultiString); + parseDateDay() { + if (this.char === CHAR_T || this.char === CHAR_SP) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError("Days less than 10 must be zero padded to two characters")); + } + this.state.result += "-" + this.state.buf; + this.state.buf = ""; + return this.next(this.parseStartTimeHour); + } else if (this.atEndOfWord()) { + return this.returnNow(createDate(this.state.result + "-" + this.state.buf)); + } else if (isDigit(this.char)) { + this.consume(); } else { - return this.returnNow(); + throw this.error(new TomlError("Incomplete datetime")); } } - parseLiteralMultiString() { - if (this.char === CTRL_M) { - return null; - } else if (this.char === CTRL_J) { - return this.next(this.parseLiteralMultiStringContent); + parseStartTimeHour() { + if (this.atEndOfWord()) { + return this.returnNow(createDate(this.state.result)); } else { - return this.goto(this.parseLiteralMultiStringContent); + return this.goto(this.parseTimeHour); } } - parseLiteralMultiStringContent() { - do { - if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralMultiEnd); - } else if (this.char === Parser.END) { - throw this.error(new TomlError("Unterminated multi-line string")); - } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M) { - throw this.errorControlCharInString(); - } else { - this.consume(); + parseTimeHour() { + if (this.char === CHAR_COLON) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters")); } - } while (this.nextChar()); - } - parseLiteralMultiEnd() { - if (this.char === CHAR_APOS) { - return this.next(this.parseLiteralMultiEnd2); + this.state.result += "T" + this.state.buf; + this.state.buf = ""; + return this.next(this.parseTimeMin); + } else if (isDigit(this.char)) { + this.consume(); } else { - this.state.buf += "'"; - return this.goto(this.parseLiteralMultiStringContent); + throw this.error(new TomlError("Incomplete datetime")); } } - parseLiteralMultiEnd2() { - if (this.char === CHAR_APOS) { - return this.return(); + parseTimeMin() { + if (this.state.buf.length < 2 && isDigit(this.char)) { + this.consume(); + } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { + this.state.result += ":" + this.state.buf; + this.state.buf = ""; + return this.next(this.parseTimeSec); } else { - this.state.buf += "''"; - return this.goto(this.parseLiteralMultiStringContent); + throw this.error(new TomlError("Incomplete datetime")); } } - /* STRINGS double quoted */ - parseDoubleString() { - if (this.char === CHAR_QUOT) { - return this.next(this.parseMultiStringMaybe); + parseTimeSec() { + if (isDigit(this.char)) { + this.consume(); + if (this.state.buf.length === 2) { + this.state.result += ":" + this.state.buf; + this.state.buf = ""; + return this.next(this.parseTimeZoneOrFraction); + } } else { - return this.goto(this.parseBasicString); + throw this.error(new TomlError("Incomplete datetime")); } } - parseBasicString() { - do { - if (this.char === CHAR_BSOL) { - return this.call(this.parseEscape, this.recordEscapeReplacement); - } else if (this.char === CHAR_QUOT) { - return this.return(); - } else if (this.atEndOfLine()) { - throw this.error(new TomlError("Unterminated string")); - } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I) { - throw this.errorControlCharInString(); - } else { - this.consume(); + parseOnlyTimeHour() { + if (this.char === CHAR_COLON) { + if (this.state.buf.length < 2) { + throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters")); } - } while (this.nextChar()); - } - recordEscapeReplacement(replacement) { - this.state.buf += replacement; - return this.goto(this.parseBasicString); - } - parseMultiStringMaybe() { - if (this.char === CHAR_QUOT) { - return this.next(this.parseMultiString); + this.state.result = this.state.buf; + this.state.buf = ""; + return this.next(this.parseOnlyTimeMin); } else { - return this.returnNow(); + throw this.error(new TomlError("Incomplete time")); } } - parseMultiString() { - if (this.char === CTRL_M) { - return null; - } else if (this.char === CTRL_J) { - return this.next(this.parseMultiStringContent); + parseOnlyTimeMin() { + if (this.state.buf.length < 2 && isDigit(this.char)) { + this.consume(); + } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { + this.state.result += ":" + this.state.buf; + this.state.buf = ""; + return this.next(this.parseOnlyTimeSec); } else { - return this.goto(this.parseMultiStringContent); + throw this.error(new TomlError("Incomplete time")); } } - parseMultiStringContent() { - do { - if (this.char === CHAR_BSOL) { - return this.call(this.parseMultiEscape, this.recordMultiEscapeReplacement); - } else if (this.char === CHAR_QUOT) { - return this.next(this.parseMultiEnd); - } else if (this.char === Parser.END) { - throw this.error(new TomlError("Unterminated multi-line string")); - } else if (this.char === CHAR_DEL || this.char <= CTRL_CHAR_BOUNDARY && this.char !== CTRL_I && this.char !== CTRL_J && this.char !== CTRL_M) { - throw this.errorControlCharInString(); - } else { - this.consume(); + parseOnlyTimeSec() { + if (isDigit(this.char)) { + this.consume(); + if (this.state.buf.length === 2) { + return this.next(this.parseOnlyTimeFractionMaybe); } - } while (this.nextChar()); - } - errorControlCharInString() { - let displayCode = "\\u00"; - if (this.char < 16) { - displayCode += "0"; + } else { + throw this.error(new TomlError("Incomplete time")); } - displayCode += this.char.toString(16); - return this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${displayCode} instead`)); - } - recordMultiEscapeReplacement(replacement) { - this.state.buf += replacement; - return this.goto(this.parseMultiStringContent); } - parseMultiEnd() { - if (this.char === CHAR_QUOT) { - return this.next(this.parseMultiEnd2); + parseOnlyTimeFractionMaybe() { + this.state.result += ":" + this.state.buf; + if (this.char === CHAR_PERIOD) { + this.state.buf = ""; + this.next(this.parseOnlyTimeFraction); } else { - this.state.buf += '"'; - return this.goto(this.parseMultiStringContent); + return this.return(createTime(this.state.result)); } } - parseMultiEnd2() { - if (this.char === CHAR_QUOT) { - return this.return(); + parseOnlyTimeFraction() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.atEndOfWord()) { + if (this.state.buf.length === 0) + throw this.error(new TomlError("Expected digit in milliseconds")); + return this.returnNow(createTime(this.state.result + "." + this.state.buf)); } else { - this.state.buf += '""'; - return this.goto(this.parseMultiStringContent); + throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z")); } } - parseMultiEscape() { - if (this.char === CTRL_M || this.char === CTRL_J) { - return this.next(this.parseMultiTrim); - } else if (this.char === CHAR_SP || this.char === CTRL_I) { - return this.next(this.parsePreMultiTrim); + parseTimeZoneOrFraction() { + if (this.char === CHAR_PERIOD) { + this.consume(); + this.next(this.parseDateTimeFraction); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + this.consume(); + this.next(this.parseTimeZoneHour); + } else if (this.char === CHAR_Z) { + this.consume(); + return this.return(createDateTime(this.state.result + this.state.buf)); + } else if (this.atEndOfWord()) { + return this.returnNow(createDateTimeFloat(this.state.result + this.state.buf)); } else { - return this.goto(this.parseEscape); + throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z")); } } - parsePreMultiTrim() { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null; - } else if (this.char === CTRL_M || this.char === CTRL_J) { - return this.next(this.parseMultiTrim); + parseDateTimeFraction() { + if (isDigit(this.char)) { + this.consume(); + } else if (this.state.buf.length === 1) { + throw this.error(new TomlError("Expected digit in milliseconds")); + } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + this.consume(); + this.next(this.parseTimeZoneHour); + } else if (this.char === CHAR_Z) { + this.consume(); + return this.return(createDateTime(this.state.result + this.state.buf)); + } else if (this.atEndOfWord()) { + return this.returnNow(createDateTimeFloat(this.state.result + this.state.buf)); } else { - throw this.error(new TomlError("Can't escape whitespace")); + throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z")); } } - parseMultiTrim() { - if (this.char === CTRL_J || this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M) { - return null; - } else { - return this.returnNow(); - } - } - parseEscape() { - if (this.char in escapes) { - return this.return(escapes[this.char]); - } else if (this.char === CHAR_u) { - return this.call(this.parseSmallUnicode, this.parseUnicodeReturn); - } else if (this.char === CHAR_U) { - return this.call(this.parseLargeUnicode, this.parseUnicodeReturn); - } else { - throw this.error(new TomlError("Unknown escape character: " + this.char)); - } - } - parseUnicodeReturn(char) { - try { - const codePoint = parseInt(char, 16); - if (codePoint >= SURROGATE_FIRST && codePoint <= SURROGATE_LAST) { - throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved")); - } - return this.returnNow(String.fromCodePoint(codePoint)); - } catch (err) { - throw this.error(TomlError.wrap(err)); - } - } - parseSmallUnicode() { - if (!isHexit(this.char)) { - throw this.error(new TomlError("Invalid character in unicode sequence, expected hex")); - } else { + parseTimeZoneHour() { + if (isDigit(this.char)) { this.consume(); - if (this.state.buf.length >= 4) - return this.return(); - } - } - parseLargeUnicode() { - if (!isHexit(this.char)) { - throw this.error(new TomlError("Invalid character in unicode sequence, expected hex")); + if (/\d\d$/.test(this.state.buf)) + return this.next(this.parseTimeZoneSep); } else { - this.consume(); - if (this.state.buf.length >= 8) - return this.return(); + throw this.error(new TomlError("Unexpected character in datetime, expected digit")); } } - /* NUMBERS */ - parseNumberSign() { - this.consume(); - return this.next(this.parseMaybeSignedInfOrNan); - } - parseMaybeSignedInfOrNan() { - if (this.char === CHAR_i) { - return this.next(this.parseInf); - } else if (this.char === CHAR_n) { - return this.next(this.parseNan); + parseTimeZoneSep() { + if (this.char === CHAR_COLON) { + this.consume(); + this.next(this.parseTimeZoneMin); } else { - return this.callNow(this.parseNoUnder, this.parseNumberIntegerStart); + throw this.error(new TomlError("Unexpected character in datetime, expected colon")); } } - parseNumberIntegerStart() { - if (this.char === CHAR_0) { + parseTimeZoneMin() { + if (isDigit(this.char)) { this.consume(); - return this.next(this.parseNumberIntegerExponentOrDecimal); + if (/\d\d$/.test(this.state.buf)) + return this.return(createDateTime(this.state.result + this.state.buf)); } else { - return this.goto(this.parseNumberInteger); + throw this.error(new TomlError("Unexpected character in datetime, expected digit")); } } - parseNumberIntegerExponentOrDecimal() { - if (this.char === CHAR_PERIOD) { + /* BOOLEAN */ + parseBoolean() { + if (this.char === CHAR_t) { this.consume(); - return this.call(this.parseNoUnder, this.parseNumberFloat); - } else if (this.char === CHAR_E || this.char === CHAR_e) { + return this.next(this.parseTrue_r); + } else if (this.char === CHAR_f) { this.consume(); - return this.next(this.parseNumberExponentSign); - } else { - return this.returnNow(Integer(this.state.buf)); + return this.next(this.parseFalse_a); } } - parseNumberInteger() { - if (isDigit(this.char)) { - this.consume(); - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnder); - } else if (this.char === CHAR_E || this.char === CHAR_e) { - this.consume(); - return this.next(this.parseNumberExponentSign); - } else if (this.char === CHAR_PERIOD) { + parseTrue_r() { + if (this.char === CHAR_r) { this.consume(); - return this.call(this.parseNoUnder, this.parseNumberFloat); + return this.next(this.parseTrue_u); } else { - const result = Integer(this.state.buf); - if (result.isNaN()) { - throw this.error(new TomlError("Invalid number")); - } else { - return this.returnNow(result); - } + throw this.error(new TomlError("Invalid boolean, expected true or false")); } } - parseNoUnder() { - if (this.char === CHAR_LOWBAR || this.char === CHAR_PERIOD || this.char === CHAR_E || this.char === CHAR_e) { - throw this.error(new TomlError("Unexpected character, expected digit")); - } else if (this.atEndOfWord()) { - throw this.error(new TomlError("Incomplete number")); + parseTrue_u() { + if (this.char === CHAR_u) { + this.consume(); + return this.next(this.parseTrue_e); + } else { + throw this.error(new TomlError("Invalid boolean, expected true or false")); } - return this.returnNow(); } - parseNoUnderHexOctBinLiteral() { - if (this.char === CHAR_LOWBAR || this.char === CHAR_PERIOD) { - throw this.error(new TomlError("Unexpected character, expected digit")); - } else if (this.atEndOfWord()) { - throw this.error(new TomlError("Incomplete number")); + parseTrue_e() { + if (this.char === CHAR_e) { + return this.return(true); + } else { + throw this.error(new TomlError("Invalid boolean, expected true or false")); } - return this.returnNow(); } - parseNumberFloat() { - if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnder, this.parseNumberFloat); - } else if (isDigit(this.char)) { - this.consume(); - } else if (this.char === CHAR_E || this.char === CHAR_e) { + parseFalse_a() { + if (this.char === CHAR_a) { this.consume(); - return this.next(this.parseNumberExponentSign); + return this.next(this.parseFalse_l); } else { - return this.returnNow(Float(this.state.buf)); + throw this.error(new TomlError("Invalid boolean, expected true or false")); } } - parseNumberExponentSign() { - if (isDigit(this.char)) { - return this.goto(this.parseNumberExponent); - } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { + parseFalse_l() { + if (this.char === CHAR_l) { this.consume(); - this.call(this.parseNoUnder, this.parseNumberExponent); + return this.next(this.parseFalse_s); } else { - throw this.error(new TomlError("Unexpected character, expected -, + or digit")); + throw this.error(new TomlError("Invalid boolean, expected true or false")); } } - parseNumberExponent() { - if (isDigit(this.char)) { + parseFalse_s() { + if (this.char === CHAR_s) { this.consume(); - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnder); + return this.next(this.parseFalse_e); } else { - return this.returnNow(Float(this.state.buf)); + throw this.error(new TomlError("Invalid boolean, expected true or false")); } } - /* NUMBERS or DATETIMES */ - parseNumberOrDateTime() { - if (this.char === CHAR_0) { - this.consume(); - return this.next(this.parseNumberBaseOrDateTime); + parseFalse_e() { + if (this.char === CHAR_e) { + return this.return(false); } else { - return this.goto(this.parseNumberOrDateTimeOnly); + throw this.error(new TomlError("Invalid boolean, expected true or false")); } } - parseNumberOrDateTimeOnly() { - if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnder, this.parseNumberInteger); - } else if (isDigit(this.char)) { - this.consume(); - if (this.state.buf.length > 4) - this.next(this.parseNumberInteger); - } else if (this.char === CHAR_E || this.char === CHAR_e) { - this.consume(); - return this.next(this.parseNumberExponentSign); - } else if (this.char === CHAR_PERIOD) { - this.consume(); - return this.call(this.parseNoUnder, this.parseNumberFloat); - } else if (this.char === CHAR_HYPHEN) { - return this.goto(this.parseDateTime); - } else if (this.char === CHAR_COLON) { - return this.goto(this.parseOnlyTimeHour); + /* INLINE LISTS */ + parseInlineList() { + if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { + return null; + } else if (this.char === Parser.END) { + throw this.error(new TomlError("Unterminated inline array")); + } else if (this.char === CHAR_NUM) { + return this.call(this.parseComment); + } else if (this.char === CHAR_RSQB) { + return this.return(this.state.resultArr || InlineList()); } else { - return this.returnNow(Integer(this.state.buf)); + return this.callNow(this.parseValue, this.recordInlineListValue); } } - parseDateTimeOnly() { - if (this.state.buf.length < 4) { - if (isDigit(this.char)) { - return this.consume(); - } else if (this.char === CHAR_COLON) { - return this.goto(this.parseOnlyTimeHour); - } else { - throw this.error(new TomlError("Expected digit while parsing year part of a date")); + recordInlineListValue(value) { + if (this.state.resultArr) { + const listType = this.state.resultArr[_contentType]; + const valueType = tomlType(value); + if (listType !== valueType) { + throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${listType} and ${valueType}`)); } } else { - if (this.char === CHAR_HYPHEN) { - return this.goto(this.parseDateTime); - } else { - throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date")); - } + this.state.resultArr = InlineList(tomlType(value)); } - } - parseNumberBaseOrDateTime() { - if (this.char === CHAR_b) { - this.consume(); - return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerBin); - } else if (this.char === CHAR_o) { - this.consume(); - return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerOct); - } else if (this.char === CHAR_x) { - this.consume(); - return this.call(this.parseNoUnderHexOctBinLiteral, this.parseIntegerHex); - } else if (this.char === CHAR_PERIOD) { - return this.goto(this.parseNumberInteger); - } else if (isDigit(this.char)) { - return this.goto(this.parseDateTimeOnly); + if (isFloat2(value) || isInteger2(value)) { + this.state.resultArr.push(value.valueOf()); } else { - return this.returnNow(Integer(this.state.buf)); + this.state.resultArr.push(value); } + return this.goto(this.parseInlineListNext); } - parseIntegerHex() { - if (isHexit(this.char)) { - this.consume(); - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnderHexOctBinLiteral); + parseInlineListNext() { + if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { + return null; + } else if (this.char === CHAR_NUM) { + return this.call(this.parseComment); + } else if (this.char === CHAR_COMMA) { + return this.next(this.parseInlineList); + } else if (this.char === CHAR_RSQB) { + return this.goto(this.parseInlineList); } else { - const result = Integer(this.state.buf); - if (result.isNaN()) { - throw this.error(new TomlError("Invalid number")); - } else { - return this.returnNow(result); - } + throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])")); } } - parseIntegerOct() { - if (isOctit(this.char)) { - this.consume(); - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnderHexOctBinLiteral); - } else { - const result = Integer(this.state.buf); - if (result.isNaN()) { - throw this.error(new TomlError("Invalid number")); - } else { - return this.returnNow(result); - } - } - } - parseIntegerBin() { - if (isBit(this.char)) { - this.consume(); - } else if (this.char === CHAR_LOWBAR) { - return this.call(this.parseNoUnderHexOctBinLiteral); - } else { - const result = Integer(this.state.buf); - if (result.isNaN()) { - throw this.error(new TomlError("Invalid number")); - } else { - return this.returnNow(result); - } - } - } - /* DATETIME */ - parseDateTime() { - if (this.state.buf.length < 4) { - throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters")); - } - this.state.result = this.state.buf; - this.state.buf = ""; - return this.next(this.parseDateMonth); - } - parseDateMonth() { - if (this.char === CHAR_HYPHEN) { - if (this.state.buf.length < 2) { - throw this.error(new TomlError("Months less than 10 must be zero padded to two characters")); - } - this.state.result += "-" + this.state.buf; - this.state.buf = ""; - return this.next(this.parseDateDay); - } else if (isDigit(this.char)) { - this.consume(); - } else { - throw this.error(new TomlError("Incomplete datetime")); - } - } - parseDateDay() { - if (this.char === CHAR_T || this.char === CHAR_SP) { - if (this.state.buf.length < 2) { - throw this.error(new TomlError("Days less than 10 must be zero padded to two characters")); - } - this.state.result += "-" + this.state.buf; - this.state.buf = ""; - return this.next(this.parseStartTimeHour); - } else if (this.atEndOfWord()) { - return this.returnNow(createDate(this.state.result + "-" + this.state.buf)); - } else if (isDigit(this.char)) { - this.consume(); - } else { - throw this.error(new TomlError("Incomplete datetime")); - } - } - parseStartTimeHour() { - if (this.atEndOfWord()) { - return this.returnNow(createDate(this.state.result)); + /* INLINE TABLE */ + parseInlineTable() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { + throw this.error(new TomlError("Unterminated inline array")); + } else if (this.char === CHAR_RCUB) { + return this.return(this.state.resultTable || InlineTable()); } else { - return this.goto(this.parseTimeHour); + if (!this.state.resultTable) + this.state.resultTable = InlineTable(); + return this.callNow(this.parseAssign, this.recordInlineTableValue); } } - parseTimeHour() { - if (this.char === CHAR_COLON) { - if (this.state.buf.length < 2) { - throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters")); + recordInlineTableValue(kv) { + let target = this.state.resultTable; + let finalKey = kv.key.pop(); + for (let kw of kv.key) { + if (hasKey(target, kw) && (!isTable(target[kw]) || target[kw][_declared])) { + throw this.error(new TomlError("Can't redefine existing key")); } - this.state.result += "T" + this.state.buf; - this.state.buf = ""; - return this.next(this.parseTimeMin); - } else if (isDigit(this.char)) { - this.consume(); - } else { - throw this.error(new TomlError("Incomplete datetime")); - } - } - parseTimeMin() { - if (this.state.buf.length < 2 && isDigit(this.char)) { - this.consume(); - } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { - this.state.result += ":" + this.state.buf; - this.state.buf = ""; - return this.next(this.parseTimeSec); - } else { - throw this.error(new TomlError("Incomplete datetime")); + target = target[kw] = target[kw] || Table(); } - } - parseTimeSec() { - if (isDigit(this.char)) { - this.consume(); - if (this.state.buf.length === 2) { - this.state.result += ":" + this.state.buf; - this.state.buf = ""; - return this.next(this.parseTimeZoneOrFraction); - } - } else { - throw this.error(new TomlError("Incomplete datetime")); + if (hasKey(target, finalKey)) { + throw this.error(new TomlError("Can't redefine existing key")); } - } - parseOnlyTimeHour() { - if (this.char === CHAR_COLON) { - if (this.state.buf.length < 2) { - throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters")); - } - this.state.result = this.state.buf; - this.state.buf = ""; - return this.next(this.parseOnlyTimeMin); + if (isInteger2(kv.value) || isFloat2(kv.value)) { + target[finalKey] = kv.value.valueOf(); } else { - throw this.error(new TomlError("Incomplete time")); + target[finalKey] = kv.value; } + return this.goto(this.parseInlineTableNext); } - parseOnlyTimeMin() { - if (this.state.buf.length < 2 && isDigit(this.char)) { - this.consume(); - } else if (this.state.buf.length === 2 && this.char === CHAR_COLON) { - this.state.result += ":" + this.state.buf; - this.state.buf = ""; - return this.next(this.parseOnlyTimeSec); + parseInlineTableNext() { + if (this.char === CHAR_SP || this.char === CTRL_I) { + return null; + } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { + throw this.error(new TomlError("Unterminated inline array")); + } else if (this.char === CHAR_COMMA) { + return this.next(this.parseInlineTable); + } else if (this.char === CHAR_RCUB) { + return this.goto(this.parseInlineTable); } else { - throw this.error(new TomlError("Incomplete time")); + throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])")); } } - parseOnlyTimeSec() { - if (isDigit(this.char)) { - this.consume(); - if (this.state.buf.length === 2) { - return this.next(this.parseOnlyTimeFractionMaybe); + } + return TOMLParser; + } + } +}); + +// node_modules/@iarna/toml/parse-pretty-error.js +var require_parse_pretty_error = __commonJS({ + "node_modules/@iarna/toml/parse-pretty-error.js"(exports, module) { + "use strict"; + module.exports = prettyError; + function prettyError(err, buf) { + if (err.pos == null || err.line == null) + return err; + let msg = err.message; + msg += ` at row ${err.line + 1}, col ${err.col + 1}, pos ${err.pos}: +`; + if (buf && buf.split) { + const lines = buf.split(/\n/); + const lineNumWidth = String(Math.min(lines.length, err.line + 3)).length; + let linePadding = " "; + while (linePadding.length < lineNumWidth) + linePadding += " "; + for (let ii = Math.max(0, err.line - 1); ii < Math.min(lines.length, err.line + 2); ++ii) { + let lineNum = String(ii + 1); + if (lineNum.length < lineNumWidth) + lineNum = " " + lineNum; + if (err.line === ii) { + msg += lineNum + "> " + lines[ii] + "\n"; + msg += linePadding + " "; + for (let hh = 0; hh < err.col; ++hh) { + msg += " "; } + msg += "^\n"; } else { - throw this.error(new TomlError("Incomplete time")); - } - } - parseOnlyTimeFractionMaybe() { - this.state.result += ":" + this.state.buf; - if (this.char === CHAR_PERIOD) { - this.state.buf = ""; - this.next(this.parseOnlyTimeFraction); - } else { - return this.return(createTime(this.state.result)); + msg += lineNum + ": " + lines[ii] + "\n"; } } - parseOnlyTimeFraction() { - if (isDigit(this.char)) { - this.consume(); - } else if (this.atEndOfWord()) { - if (this.state.buf.length === 0) - throw this.error(new TomlError("Expected digit in milliseconds")); - return this.returnNow(createTime(this.state.result + "." + this.state.buf)); - } else { - throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z")); + } + err.message = msg + "\n"; + return err; + } + } +}); + +// node_modules/@iarna/toml/parse-async.js +var require_parse_async = __commonJS({ + "node_modules/@iarna/toml/parse-async.js"(exports, module) { + "use strict"; + module.exports = parseAsync; + var TOMLParser = require_toml_parser(); + var prettyError = require_parse_pretty_error(); + function parseAsync(str2, opts) { + if (!opts) + opts = {}; + const index = 0; + const blocksize = opts.blocksize || 40960; + const parser = new TOMLParser(); + return new Promise((resolve3, reject) => { + setImmediate(parseAsyncNext, index, blocksize, resolve3, reject); + }); + function parseAsyncNext(index2, blocksize2, resolve3, reject) { + if (index2 >= str2.length) { + try { + return resolve3(parser.finish()); + } catch (err) { + return reject(prettyError(err, str2)); } } - parseTimeZoneOrFraction() { - if (this.char === CHAR_PERIOD) { - this.consume(); - this.next(this.parseDateTimeFraction); - } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { - this.consume(); - this.next(this.parseTimeZoneHour); - } else if (this.char === CHAR_Z) { - this.consume(); - return this.return(createDateTime(this.state.result + this.state.buf)); - } else if (this.atEndOfWord()) { - return this.returnNow(createDateTimeFloat(this.state.result + this.state.buf)); - } else { - throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z")); - } - } - parseDateTimeFraction() { - if (isDigit(this.char)) { - this.consume(); - } else if (this.state.buf.length === 1) { - throw this.error(new TomlError("Expected digit in milliseconds")); - } else if (this.char === CHAR_HYPHEN || this.char === CHAR_PLUS) { - this.consume(); - this.next(this.parseTimeZoneHour); - } else if (this.char === CHAR_Z) { - this.consume(); - return this.return(createDateTime(this.state.result + this.state.buf)); - } else if (this.atEndOfWord()) { - return this.returnNow(createDateTimeFloat(this.state.result + this.state.buf)); - } else { - throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z")); - } - } - parseTimeZoneHour() { - if (isDigit(this.char)) { - this.consume(); - if (/\d\d$/.test(this.state.buf)) - return this.next(this.parseTimeZoneSep); - } else { - throw this.error(new TomlError("Unexpected character in datetime, expected digit")); - } - } - parseTimeZoneSep() { - if (this.char === CHAR_COLON) { - this.consume(); - this.next(this.parseTimeZoneMin); - } else { - throw this.error(new TomlError("Unexpected character in datetime, expected colon")); - } - } - parseTimeZoneMin() { - if (isDigit(this.char)) { - this.consume(); - if (/\d\d$/.test(this.state.buf)) - return this.return(createDateTime(this.state.result + this.state.buf)); - } else { - throw this.error(new TomlError("Unexpected character in datetime, expected digit")); - } - } - /* BOOLEAN */ - parseBoolean() { - if (this.char === CHAR_t) { - this.consume(); - return this.next(this.parseTrue_r); - } else if (this.char === CHAR_f) { - this.consume(); - return this.next(this.parseFalse_a); - } - } - parseTrue_r() { - if (this.char === CHAR_r) { - this.consume(); - return this.next(this.parseTrue_u); - } else { - throw this.error(new TomlError("Invalid boolean, expected true or false")); - } - } - parseTrue_u() { - if (this.char === CHAR_u) { - this.consume(); - return this.next(this.parseTrue_e); - } else { - throw this.error(new TomlError("Invalid boolean, expected true or false")); - } - } - parseTrue_e() { - if (this.char === CHAR_e) { - return this.return(true); - } else { - throw this.error(new TomlError("Invalid boolean, expected true or false")); - } - } - parseFalse_a() { - if (this.char === CHAR_a) { - this.consume(); - return this.next(this.parseFalse_l); - } else { - throw this.error(new TomlError("Invalid boolean, expected true or false")); - } - } - parseFalse_l() { - if (this.char === CHAR_l) { - this.consume(); - return this.next(this.parseFalse_s); - } else { - throw this.error(new TomlError("Invalid boolean, expected true or false")); - } - } - parseFalse_s() { - if (this.char === CHAR_s) { - this.consume(); - return this.next(this.parseFalse_e); - } else { - throw this.error(new TomlError("Invalid boolean, expected true or false")); - } - } - parseFalse_e() { - if (this.char === CHAR_e) { - return this.return(false); - } else { - throw this.error(new TomlError("Invalid boolean, expected true or false")); - } - } - /* INLINE LISTS */ - parseInlineList() { - if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { - return null; - } else if (this.char === Parser.END) { - throw this.error(new TomlError("Unterminated inline array")); - } else if (this.char === CHAR_NUM) { - return this.call(this.parseComment); - } else if (this.char === CHAR_RSQB) { - return this.return(this.state.resultArr || InlineList()); - } else { - return this.callNow(this.parseValue, this.recordInlineListValue); - } - } - recordInlineListValue(value) { - if (this.state.resultArr) { - const listType = this.state.resultArr[_contentType]; - const valueType = tomlType(value); - if (listType !== valueType) { - throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${listType} and ${valueType}`)); - } - } else { - this.state.resultArr = InlineList(tomlType(value)); - } - if (isFloat(value) || isInteger(value)) { - this.state.resultArr.push(value.valueOf()); - } else { - this.state.resultArr.push(value); - } - return this.goto(this.parseInlineListNext); - } - parseInlineListNext() { - if (this.char === CHAR_SP || this.char === CTRL_I || this.char === CTRL_M || this.char === CTRL_J) { - return null; - } else if (this.char === CHAR_NUM) { - return this.call(this.parseComment); - } else if (this.char === CHAR_COMMA) { - return this.next(this.parseInlineList); - } else if (this.char === CHAR_RSQB) { - return this.goto(this.parseInlineList); - } else { - throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])")); - } - } - /* INLINE TABLE */ - parseInlineTable() { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null; - } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { - throw this.error(new TomlError("Unterminated inline array")); - } else if (this.char === CHAR_RCUB) { - return this.return(this.state.resultTable || InlineTable()); - } else { - if (!this.state.resultTable) - this.state.resultTable = InlineTable(); - return this.callNow(this.parseAssign, this.recordInlineTableValue); - } - } - recordInlineTableValue(kv) { - let target = this.state.resultTable; - let finalKey = kv.key.pop(); - for (let kw of kv.key) { - if (hasKey(target, kw) && (!isTable(target[kw]) || target[kw][_declared])) { - throw this.error(new TomlError("Can't redefine existing key")); - } - target = target[kw] = target[kw] || Table(); - } - if (hasKey(target, finalKey)) { - throw this.error(new TomlError("Can't redefine existing key")); - } - if (isInteger(kv.value) || isFloat(kv.value)) { - target[finalKey] = kv.value.valueOf(); - } else { - target[finalKey] = kv.value; - } - return this.goto(this.parseInlineTableNext); - } - parseInlineTableNext() { - if (this.char === CHAR_SP || this.char === CTRL_I) { - return null; - } else if (this.char === Parser.END || this.char === CHAR_NUM || this.char === CTRL_J || this.char === CTRL_M) { - throw this.error(new TomlError("Unterminated inline array")); - } else if (this.char === CHAR_COMMA) { - return this.next(this.parseInlineTable); - } else if (this.char === CHAR_RCUB) { - return this.goto(this.parseInlineTable); - } else { - throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])")); - } + try { + parser.parse(str2.slice(index2, index2 + blocksize2)); + setImmediate(parseAsyncNext, index2 + blocksize2, blocksize2, resolve3, reject); + } catch (err) { + reject(prettyError(err, str2)); } } - return TOMLParser; } } }); -// node_modules/@iarna/toml/parse-pretty-error.js -var require_parse_pretty_error = __commonJS({ - "node_modules/@iarna/toml/parse-pretty-error.js"(exports, module) { - "use strict"; - module.exports = prettyError; - function prettyError(err, buf) { - if (err.pos == null || err.line == null) - return err; - let msg = err.message; - msg += ` at row ${err.line + 1}, col ${err.col + 1}, pos ${err.pos}: -`; - if (buf && buf.split) { - const lines = buf.split(/\n/); - const lineNumWidth = String(Math.min(lines.length, err.line + 3)).length; - let linePadding = " "; - while (linePadding.length < lineNumWidth) - linePadding += " "; - for (let ii = Math.max(0, err.line - 1); ii < Math.min(lines.length, err.line + 2); ++ii) { - let lineNum = String(ii + 1); - if (lineNum.length < lineNumWidth) - lineNum = " " + lineNum; - if (err.line === ii) { - msg += lineNum + "> " + lines[ii] + "\n"; - msg += linePadding + " "; - for (let hh = 0; hh < err.col; ++hh) { - msg += " "; - } - msg += "^\n"; - } else { - msg += lineNum + ": " + lines[ii] + "\n"; - } - } - } - err.message = msg + "\n"; - return err; - } +// node_modules/js-tokens/index.js +var require_js_tokens = __commonJS({ + "node_modules/js-tokens/index.js"(exports) { + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + exports.matchToToken = function(match) { + var token2 = { type: "invalid", value: match[0], closed: void 0 }; + if (match[1]) + token2.type = "string", token2.closed = !!(match[3] || match[4]); + else if (match[5]) + token2.type = "comment"; + else if (match[6]) + token2.type = "comment", token2.closed = !!match[7]; + else if (match[8]) + token2.type = "regex"; + else if (match[9]) + token2.type = "number"; + else if (match[10]) + token2.type = "name"; + else if (match[11]) + token2.type = "punctuator"; + else if (match[12]) + token2.type = "whitespace"; + return token2; + }; } }); -// node_modules/@iarna/toml/parse-async.js -var require_parse_async = __commonJS({ - "node_modules/@iarna/toml/parse-async.js"(exports, module) { +// node_modules/@babel/helper-validator-identifier/lib/identifier.js +var require_identifier = __commonJS({ + "node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) { "use strict"; - module.exports = parseAsync; - var TOMLParser = require_toml_parser(); - var prettyError = require_parse_pretty_error(); - function parseAsync(str, opts) { - if (!opts) - opts = {}; - const index = 0; - const blocksize = opts.blocksize || 40960; - const parser = new TOMLParser(); - return new Promise((resolve2, reject) => { - setImmediate(parseAsyncNext, index, blocksize, resolve2, reject); - }); - function parseAsyncNext(index2, blocksize2, resolve2, reject) { - if (index2 >= str.length) { - try { - return resolve2(parser.finish()); - } catch (err) { - return reject(prettyError(err, str)); + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.isIdentifierChar = isIdentifierChar; + exports.isIdentifierName = isIdentifierName; + exports.isIdentifierStart = isIdentifierStart; + var nonASCIIidentifierStartChars = "\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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"; + var nonASCIIidentifierChars = "\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65"; + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; + var astralIdentifierStartCodes = [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, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 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, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 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, 20, 1, 64, 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, 38, 6, 186, 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, 19, 72, 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, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 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, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 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, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 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, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; + var astralIdentifierCodes = [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, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 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, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 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, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + function isInAstralSet(code, set2) { + let pos2 = 65536; + for (let i = 0, length = set2.length; i < length; i += 2) { + pos2 += set2[i]; + if (pos2 > code) + return false; + pos2 += set2[i + 1]; + if (pos2 >= code) + return true; + } + return false; + } + function isIdentifierStart(code) { + if (code < 65) + return code === 36; + if (code <= 90) + return true; + if (code < 97) + return code === 95; + if (code <= 122) + return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes); + } + function isIdentifierChar(code) { + if (code < 48) + return code === 36; + if (code < 58) + return true; + if (code < 65) + return false; + if (code <= 90) + return true; + if (code < 97) + return code === 95; + if (code <= 122) + return true; + if (code <= 65535) { + return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); + } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); + } + function isIdentifierName(name) { + let isFirst = true; + for (let i = 0; i < name.length; i++) { + let cp = name.charCodeAt(i); + if ((cp & 64512) === 55296 && i + 1 < name.length) { + const trail = name.charCodeAt(++i); + if ((trail & 64512) === 56320) { + cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); } } - try { - parser.parse(str.slice(index2, index2 + blocksize2)); - setImmediate(parseAsyncNext, index2 + blocksize2, blocksize2, resolve2, reject); - } catch (err) { - reject(prettyError(err, str)); + if (isFirst) { + isFirst = false; + if (!isIdentifierStart(cp)) { + return false; + } + } else if (!isIdentifierChar(cp)) { + return false; } } + return !isFirst; } } }); -// node_modules/json5/lib/unicode.js -var require_unicode = __commonJS({ - "node_modules/json5/lib/unicode.js"(exports, module) { - module.exports.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; - module.exports.ID_Start = /[\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\u0860-\u086A\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\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\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-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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\uDF2D-\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\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\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\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\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\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; - module.exports.ID_Continue = /[\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\u0860-\u086A\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\u09FC\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-\u0AFF\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\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\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-\u1CF9\u1D00-\u1DF9\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\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-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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\uDF2D-\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\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\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\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\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\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; +// node_modules/@babel/helper-validator-identifier/lib/keyword.js +var require_keyword = __commonJS({ + "node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.isKeyword = isKeyword; + exports.isReservedWord = isReservedWord; + exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; + exports.isStrictBindReservedWord = isStrictBindReservedWord; + exports.isStrictReservedWord = isStrictReservedWord; + var reservedWords = { + keyword: ["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"], + strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], + strictBind: ["eval", "arguments"] + }; + var keywords = new Set(reservedWords.keyword); + var reservedWordsStrictSet = new Set(reservedWords.strict); + var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); + function isReservedWord(word, inModule) { + return inModule && word === "await" || word === "enum"; + } + function isStrictReservedWord(word, inModule) { + return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); + } + function isStrictBindOnlyReservedWord(word) { + return reservedWordsStrictBindSet.has(word); + } + function isStrictBindReservedWord(word, inModule) { + return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); + } + function isKeyword(word) { + return keywords.has(word); + } } }); -// node_modules/json5/lib/util.js -var require_util = __commonJS({ - "node_modules/json5/lib/util.js"(exports, module) { - var unicode = require_unicode(); - module.exports = { - isSpaceSeparator(c) { - return typeof c === "string" && unicode.Space_Separator.test(c); - }, - isIdStartChar(c) { - return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c === "$" || c === "_" || unicode.ID_Start.test(c)); - }, - isIdContinueChar(c) { - return typeof c === "string" && (c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c >= "0" && c <= "9" || c === "$" || c === "_" || c === "\u200C" || c === "\u200D" || unicode.ID_Continue.test(c)); - }, - isDigit(c) { - return typeof c === "string" && /[0-9]/.test(c); - }, - isHexDigit(c) { - return typeof c === "string" && /[0-9A-Fa-f]/.test(c); +// node_modules/@babel/helper-validator-identifier/lib/index.js +var require_lib = __commonJS({ + "node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + Object.defineProperty(exports, "isIdentifierChar", { + enumerable: true, + get: function() { + return _identifier.isIdentifierChar; } - }; + }); + Object.defineProperty(exports, "isIdentifierName", { + enumerable: true, + get: function() { + return _identifier.isIdentifierName; + } + }); + Object.defineProperty(exports, "isIdentifierStart", { + enumerable: true, + get: function() { + return _identifier.isIdentifierStart; + } + }); + Object.defineProperty(exports, "isKeyword", { + enumerable: true, + get: function() { + return _keyword.isKeyword; + } + }); + Object.defineProperty(exports, "isReservedWord", { + enumerable: true, + get: function() { + return _keyword.isReservedWord; + } + }); + Object.defineProperty(exports, "isStrictBindOnlyReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindOnlyReservedWord; + } + }); + Object.defineProperty(exports, "isStrictBindReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictBindReservedWord; + } + }); + Object.defineProperty(exports, "isStrictReservedWord", { + enumerable: true, + get: function() { + return _keyword.isStrictReservedWord; + } + }); + var _identifier = require_identifier(); + var _keyword = require_keyword(); } }); -// node_modules/json5/lib/parse.js -var require_parse3 = __commonJS({ - "node_modules/json5/lib/parse.js"(exports, module) { - var util = require_util(); - var source; - var parseState; - var stack; - var pos; - var line2; - var column; - var token; - var key; - var root; - module.exports = function parse3(text, reviver) { - source = String(text); - parseState = "start"; - stack = []; - pos = 0; - line2 = 1; - column = 0; - token = void 0; - key = void 0; - root = void 0; - do { - token = lex(); - parseStates[parseState](); - } while (token.type !== "eof"); - if (typeof reviver === "function") { - return internalize({ "": root }, "", reviver); - } - return root; - }; - function internalize(holder, name, reviver) { - const value = holder[name]; - if (value != null && typeof value === "object") { - if (Array.isArray(value)) { - for (let i = 0; i < value.length; i++) { - const key2 = String(i); - const replacement = internalize(value, key2, reviver); - if (replacement === void 0) { - delete value[key2]; - } else { - Object.defineProperty(value, key2, { - value: replacement, - writable: true, - enumerable: true, - configurable: true - }); - } - } - } else { - for (const key2 in value) { - const replacement = internalize(value, key2, reviver); - if (replacement === void 0) { - delete value[key2]; - } else { - Object.defineProperty(value, key2, { - value: replacement, - writable: true, - enumerable: true, - configurable: true - }); - } - } - } - } - return reviver.call(holder, name, value); - } - var lexState; - var buffer; - var doubleQuote; - var sign; - var c; - function lex() { - lexState = "default"; - buffer = ""; - doubleQuote = false; - sign = 1; - for (; ; ) { - c = peek(); - const token2 = lexStates[lexState](); - if (token2) { - return token2; - } - } - } - function peek() { - if (source[pos]) { - return String.fromCodePoint(source.codePointAt(pos)); +// node_modules/@babel/code-frame/node_modules/escape-string-regexp/index.js +var require_escape_string_regexp = __commonJS({ + "node_modules/@babel/code-frame/node_modules/escape-string-regexp/index.js"(exports, module) { + "use strict"; + var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + module.exports = function(str2) { + if (typeof str2 !== "string") { + throw new TypeError("Expected a string"); } - } - function read2() { - const c2 = peek(); - if (c2 === "\n") { - line2++; - column = 0; - } else if (c2) { - column += c2.length; - } else { - column++; - } - if (c2) { - pos += c2.length; - } - return c2; - } - var lexStates = { - default() { - switch (c) { - case " ": - case "\v": - case "\f": - case " ": - case "\xA0": - case "\uFEFF": - case "\n": - case "\r": - case "\u2028": - case "\u2029": - read2(); - return; - case "/": - read2(); - lexState = "comment"; - return; - case void 0: - read2(); - return newToken("eof"); - } - if (util.isSpaceSeparator(c)) { - read2(); - return; - } - return lexStates[parseState](); - }, - comment() { - switch (c) { - case "*": - read2(); - lexState = "multiLineComment"; - return; - case "/": - read2(); - lexState = "singleLineComment"; - return; - } - throw invalidChar(read2()); - }, - multiLineComment() { - switch (c) { - case "*": - read2(); - lexState = "multiLineCommentAsterisk"; - return; - case void 0: - throw invalidChar(read2()); - } - read2(); - }, - multiLineCommentAsterisk() { - switch (c) { - case "*": - read2(); - return; - case "/": - read2(); - lexState = "default"; - return; - case void 0: - throw invalidChar(read2()); - } - read2(); - lexState = "multiLineComment"; - }, - singleLineComment() { - switch (c) { - case "\n": - case "\r": - case "\u2028": - case "\u2029": - read2(); - lexState = "default"; - return; - case void 0: - read2(); - return newToken("eof"); - } - read2(); - }, - value() { - switch (c) { - case "{": - case "[": - return newToken("punctuator", read2()); - case "n": - read2(); - literal("ull"); - return newToken("null", null); - case "t": - read2(); - literal("rue"); - return newToken("boolean", true); - case "f": - read2(); - literal("alse"); - return newToken("boolean", false); - case "-": - case "+": - if (read2() === "-") { - sign = -1; - } - lexState = "sign"; - return; - case ".": - buffer = read2(); - lexState = "decimalPointLeading"; - return; - case "0": - buffer = read2(); - lexState = "zero"; - return; - case "1": - case "2": - case "3": - case "4": - case "5": - case "6": - case "7": - case "8": - case "9": - buffer = read2(); - lexState = "decimalInteger"; - return; - case "I": - read2(); - literal("nfinity"); - return newToken("numeric", Infinity); - case "N": - read2(); - literal("aN"); - return newToken("numeric", NaN); - case '"': - case "'": - doubleQuote = read2() === '"'; - buffer = ""; - lexState = "string"; - return; - } - throw invalidChar(read2()); - }, - identifierNameStartEscape() { - if (c !== "u") { - throw invalidChar(read2()); - } - read2(); - const u = unicodeEscape(); - switch (u) { - case "$": - case "_": - break; - default: - if (!util.isIdStartChar(u)) { - throw invalidIdentifier(); - } - break; - } - buffer += u; - lexState = "identifierName"; - }, - identifierName() { - switch (c) { - case "$": - case "_": - case "\u200C": - case "\u200D": - buffer += read2(); - return; - case "\\": - read2(); - lexState = "identifierNameEscape"; - return; - } - if (util.isIdContinueChar(c)) { - buffer += read2(); - return; - } - return newToken("identifier", buffer); - }, - identifierNameEscape() { - if (c !== "u") { - throw invalidChar(read2()); - } - read2(); - const u = unicodeEscape(); - switch (u) { - case "$": - case "_": - case "\u200C": - case "\u200D": - break; - default: - if (!util.isIdContinueChar(u)) { - throw invalidIdentifier(); - } - break; - } - buffer += u; - lexState = "identifierName"; - }, - sign() { - switch (c) { - case ".": - buffer = read2(); - lexState = "decimalPointLeading"; - return; - case "0": - buffer = read2(); - lexState = "zero"; - return; - case "1": - case "2": - case "3": - case "4": - case "5": - case "6": - case "7": - case "8": - case "9": - buffer = read2(); - lexState = "decimalInteger"; - return; - case "I": - read2(); - literal("nfinity"); - return newToken("numeric", sign * Infinity); - case "N": - read2(); - literal("aN"); - return newToken("numeric", NaN); - } - throw invalidChar(read2()); - }, - zero() { - switch (c) { - case ".": - buffer += read2(); - lexState = "decimalPoint"; - return; - case "e": - case "E": - buffer += read2(); - lexState = "decimalExponent"; - return; - case "x": - case "X": - buffer += read2(); - lexState = "hexadecimal"; - return; - } - return newToken("numeric", sign * 0); - }, - decimalInteger() { - switch (c) { - case ".": - buffer += read2(); - lexState = "decimalPoint"; - return; - case "e": - case "E": - buffer += read2(); - lexState = "decimalExponent"; - return; - } - if (util.isDigit(c)) { - buffer += read2(); - return; - } - return newToken("numeric", sign * Number(buffer)); - }, - decimalPointLeading() { - if (util.isDigit(c)) { - buffer += read2(); - lexState = "decimalFraction"; - return; - } - throw invalidChar(read2()); - }, - decimalPoint() { - switch (c) { - case "e": - case "E": - buffer += read2(); - lexState = "decimalExponent"; - return; - } - if (util.isDigit(c)) { - buffer += read2(); - lexState = "decimalFraction"; - return; - } - return newToken("numeric", sign * Number(buffer)); - }, - decimalFraction() { - switch (c) { - case "e": - case "E": - buffer += read2(); - lexState = "decimalExponent"; - return; - } - if (util.isDigit(c)) { - buffer += read2(); - return; - } - return newToken("numeric", sign * Number(buffer)); - }, - decimalExponent() { - switch (c) { - case "+": - case "-": - buffer += read2(); - lexState = "decimalExponentSign"; - return; - } - if (util.isDigit(c)) { - buffer += read2(); - lexState = "decimalExponentInteger"; - return; - } - throw invalidChar(read2()); - }, - decimalExponentSign() { - if (util.isDigit(c)) { - buffer += read2(); - lexState = "decimalExponentInteger"; - return; - } - throw invalidChar(read2()); - }, - decimalExponentInteger() { - if (util.isDigit(c)) { - buffer += read2(); - return; - } - return newToken("numeric", sign * Number(buffer)); - }, - hexadecimal() { - if (util.isHexDigit(c)) { - buffer += read2(); - lexState = "hexadecimalInteger"; - return; - } - throw invalidChar(read2()); - }, - hexadecimalInteger() { - if (util.isHexDigit(c)) { - buffer += read2(); - return; - } - return newToken("numeric", sign * Number(buffer)); - }, - string() { - switch (c) { - case "\\": - read2(); - buffer += escape(); - return; - case '"': - if (doubleQuote) { - read2(); - return newToken("string", buffer); - } - buffer += read2(); - return; - case "'": - if (!doubleQuote) { - read2(); - return newToken("string", buffer); - } - buffer += read2(); - return; - case "\n": - case "\r": - throw invalidChar(read2()); - case "\u2028": - case "\u2029": - separatorChar(c); - break; - case void 0: - throw invalidChar(read2()); - } - buffer += read2(); - }, - start() { - switch (c) { - case "{": - case "[": - return newToken("punctuator", read2()); - } - lexState = "value"; - }, - beforePropertyName() { - switch (c) { - case "$": - case "_": - buffer = read2(); - lexState = "identifierName"; - return; - case "\\": - read2(); - lexState = "identifierNameStartEscape"; - return; - case "}": - return newToken("punctuator", read2()); - case '"': - case "'": - doubleQuote = read2() === '"'; - lexState = "string"; - return; - } - if (util.isIdStartChar(c)) { - buffer += read2(); - lexState = "identifierName"; - return; - } - throw invalidChar(read2()); - }, - afterPropertyName() { - if (c === ":") { - return newToken("punctuator", read2()); - } - throw invalidChar(read2()); - }, - beforePropertyValue() { - lexState = "value"; - }, - afterPropertyValue() { - switch (c) { - case ",": - case "}": - return newToken("punctuator", read2()); - } - throw invalidChar(read2()); - }, - beforeArrayValue() { - if (c === "]") { - return newToken("punctuator", read2()); - } - lexState = "value"; - }, - afterArrayValue() { - switch (c) { - case ",": - case "]": - return newToken("punctuator", read2()); - } - throw invalidChar(read2()); - }, - end() { - throw invalidChar(read2()); - } - }; - function newToken(type, value) { - return { - type, - value, - line: line2, - column - }; - } - function literal(s) { - for (const c2 of s) { - const p = peek(); - if (p !== c2) { - throw invalidChar(read2()); - } - read2(); - } - } - function escape() { - const c2 = peek(); - switch (c2) { - case "b": - read2(); - return "\b"; - case "f": - read2(); - return "\f"; - case "n": - read2(); - return "\n"; - case "r": - read2(); - return "\r"; - case "t": - read2(); - return " "; - case "v": - read2(); - return "\v"; - case "0": - read2(); - if (util.isDigit(peek())) { - throw invalidChar(read2()); - } - return "\0"; - case "x": - read2(); - return hexEscape(); - case "u": - read2(); - return unicodeEscape(); - case "\n": - case "\u2028": - case "\u2029": - read2(); - return ""; - case "\r": - read2(); - if (peek() === "\n") { - read2(); - } - return ""; - case "1": - case "2": - case "3": - case "4": - case "5": - case "6": - case "7": - case "8": - case "9": - throw invalidChar(read2()); - case void 0: - throw invalidChar(read2()); - } - return read2(); - } - function hexEscape() { - let buffer2 = ""; - let c2 = peek(); - if (!util.isHexDigit(c2)) { - throw invalidChar(read2()); - } - buffer2 += read2(); - c2 = peek(); - if (!util.isHexDigit(c2)) { - throw invalidChar(read2()); - } - buffer2 += read2(); - return String.fromCodePoint(parseInt(buffer2, 16)); - } - function unicodeEscape() { - let buffer2 = ""; - let count = 4; - while (count-- > 0) { - const c2 = peek(); - if (!util.isHexDigit(c2)) { - throw invalidChar(read2()); - } - buffer2 += read2(); - } - return String.fromCodePoint(parseInt(buffer2, 16)); - } - var parseStates = { - start() { - if (token.type === "eof") { - throw invalidEOF(); - } - push(); - }, - beforePropertyName() { - switch (token.type) { - case "identifier": - case "string": - key = token.value; - parseState = "afterPropertyName"; - return; - case "punctuator": - pop(); - return; - case "eof": - throw invalidEOF(); - } - }, - afterPropertyName() { - if (token.type === "eof") { - throw invalidEOF(); - } - parseState = "beforePropertyValue"; - }, - beforePropertyValue() { - if (token.type === "eof") { - throw invalidEOF(); - } - push(); - }, - beforeArrayValue() { - if (token.type === "eof") { - throw invalidEOF(); - } - if (token.type === "punctuator" && token.value === "]") { - pop(); - return; - } - push(); - }, - afterPropertyValue() { - if (token.type === "eof") { - throw invalidEOF(); - } - switch (token.value) { - case ",": - parseState = "beforePropertyName"; - return; - case "}": - pop(); - } - }, - afterArrayValue() { - if (token.type === "eof") { - throw invalidEOF(); - } - switch (token.value) { - case ",": - parseState = "beforeArrayValue"; - return; - case "]": - pop(); - } - }, - end() { - } - }; - function push() { - let value; - switch (token.type) { - case "punctuator": - switch (token.value) { - case "{": - value = {}; - break; - case "[": - value = []; - break; - } - break; - case "null": - case "boolean": - case "numeric": - case "string": - value = token.value; - break; - } - if (root === void 0) { - root = value; - } else { - const parent = stack[stack.length - 1]; - if (Array.isArray(parent)) { - parent.push(value); - } else { - Object.defineProperty(parent, key, { - value, - writable: true, - enumerable: true, - configurable: true - }); - } - } - if (value !== null && typeof value === "object") { - stack.push(value); - if (Array.isArray(value)) { - parseState = "beforeArrayValue"; - } else { - parseState = "beforePropertyName"; - } - } else { - const current = stack[stack.length - 1]; - if (current == null) { - parseState = "end"; - } else if (Array.isArray(current)) { - parseState = "afterArrayValue"; - } else { - parseState = "afterPropertyValue"; - } - } - } - function pop() { - stack.pop(); - const current = stack[stack.length - 1]; - if (current == null) { - parseState = "end"; - } else if (Array.isArray(current)) { - parseState = "afterArrayValue"; - } else { - parseState = "afterPropertyValue"; - } - } - function invalidChar(c2) { - if (c2 === void 0) { - return syntaxError(`JSON5: invalid end of input at ${line2}:${column}`); - } - return syntaxError(`JSON5: invalid character '${formatChar(c2)}' at ${line2}:${column}`); - } - function invalidEOF() { - return syntaxError(`JSON5: invalid end of input at ${line2}:${column}`); - } - function invalidIdentifier() { - column -= 5; - return syntaxError(`JSON5: invalid identifier character at ${line2}:${column}`); - } - function separatorChar(c2) { - console.warn(`JSON5: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`); - } - function formatChar(c2) { - const replacements = { - "'": "\\'", - '"': '\\"', - "\\": "\\\\", - "\b": "\\b", - "\f": "\\f", - "\n": "\\n", - "\r": "\\r", - " ": "\\t", - "\v": "\\v", - "\0": "\\0", - "\u2028": "\\u2028", - "\u2029": "\\u2029" - }; - if (replacements[c2]) { - return replacements[c2]; - } - if (c2 < " ") { - const hexString = c2.charCodeAt(0).toString(16); - return "\\x" + ("00" + hexString).substring(hexString.length); - } - return c2; - } - function syntaxError(message) { - const err = new SyntaxError(message); - err.lineNumber = line2; - err.columnNumber = column; - return err; - } - } -}); - -// node_modules/js-yaml/lib/common.js -var require_common3 = __commonJS({ - "node_modules/js-yaml/lib/common.js"(exports, module) { - "use strict"; - function isNothing(subject) { - return typeof subject === "undefined" || subject === null; - } - function isObject2(subject) { - return typeof subject === "object" && subject !== null; - } - function toArray(sequence) { - if (Array.isArray(sequence)) - return sequence; - else if (isNothing(sequence)) - return []; - return [sequence]; - } - function extend(target, source) { - var index, length, key, sourceKeys; - if (source) { - sourceKeys = Object.keys(source); - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; - } - } - return target; - } - function repeat(string, count) { - var result = "", cycle; - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - return result; - } - function isNegativeZero(number) { - return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; - } - module.exports.isNothing = isNothing; - module.exports.isObject = isObject2; - module.exports.toArray = toArray; - module.exports.repeat = repeat; - module.exports.isNegativeZero = isNegativeZero; - module.exports.extend = extend; - } -}); - -// node_modules/js-yaml/lib/exception.js -var require_exception = __commonJS({ - "node_modules/js-yaml/lib/exception.js"(exports, module) { - "use strict"; - function formatError(exception, compact) { - var where = "", message = exception.reason || "(unknown reason)"; - if (!exception.mark) - return message; - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" '; - } - where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; - if (!compact && exception.mark.snippet) { - where += "\n\n" + exception.mark.snippet; - } - return message + " " + where; - } - function YAMLException(reason, mark) { - Error.call(this); - this.name = "YAMLException"; - this.reason = reason; - this.mark = mark; - this.message = formatError(this, false); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = new Error().stack || ""; - } - } - YAMLException.prototype = Object.create(Error.prototype); - YAMLException.prototype.constructor = YAMLException; - YAMLException.prototype.toString = function toString(compact) { - return this.name + ": " + formatError(this, compact); - }; - module.exports = YAMLException; - } -}); - -// node_modules/js-yaml/lib/snippet.js -var require_snippet = __commonJS({ - "node_modules/js-yaml/lib/snippet.js"(exports, module) { - "use strict"; - var common = require_common3(); - function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { - var head = ""; - var tail = ""; - var maxHalfLength = Math.floor(maxLineLength / 2) - 1; - if (position - lineStart > maxHalfLength) { - head = " ... "; - lineStart = position - maxHalfLength + head.length; - } - if (lineEnd - position > maxHalfLength) { - tail = " ..."; - lineEnd = position + maxHalfLength - tail.length; - } - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, - pos: position - lineStart + head.length - // relative position - }; - } - function padStart(string, max) { - return common.repeat(" ", max - string.length) + string; - } - function makeSnippet(mark, options8) { - options8 = Object.create(options8 || null); - if (!mark.buffer) - return null; - if (!options8.maxLength) - options8.maxLength = 79; - if (typeof options8.indent !== "number") - options8.indent = 1; - if (typeof options8.linesBefore !== "number") - options8.linesBefore = 3; - if (typeof options8.linesAfter !== "number") - options8.linesAfter = 2; - var re = /\r?\n|\r|\0/g; - var lineStarts = [0]; - var lineEnds = []; - var match; - var foundLineNo = -1; - while (match = re.exec(mark.buffer)) { - lineEnds.push(match.index); - lineStarts.push(match.index + match[0].length); - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - if (foundLineNo < 0) - foundLineNo = lineStarts.length - 1; - var result = "", i, line2; - var lineNoLength = Math.min(mark.line + options8.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options8.maxLength - (options8.indent + lineNoLength + 3); - for (i = 1; i <= options8.linesBefore; i++) { - if (foundLineNo - i < 0) - break; - line2 = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ); - result = common.repeat(" ", options8.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result; - } - line2 = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(" ", options8.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line2.str + "\n"; - result += common.repeat("-", options8.indent + lineNoLength + 3 + line2.pos) + "^\n"; - for (i = 1; i <= options8.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) - break; - line2 = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ); - result += common.repeat(" ", options8.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + "\n"; - } - return result.replace(/\n$/, ""); - } - module.exports = makeSnippet; - } -}); - -// node_modules/js-yaml/lib/type.js -var require_type = __commonJS({ - "node_modules/js-yaml/lib/type.js"(exports, module) { - "use strict"; - var YAMLException = require_exception(); - var TYPE_CONSTRUCTOR_OPTIONS = [ - "kind", - "multi", - "resolve", - "construct", - "instanceOf", - "predicate", - "represent", - "representName", - "defaultStyle", - "styleAliases" - ]; - var YAML_NODE_KINDS = [ - "scalar", - "sequence", - "mapping" - ]; - function compileStyleAliases(map) { - var result = {}; - if (map !== null) { - Object.keys(map).forEach(function(style) { - map[style].forEach(function(alias) { - result[String(alias)] = style; - }); - }); - } - return result; - } - function Type(tag, options8) { - options8 = options8 || {}; - Object.keys(options8).forEach(function(name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - this.options = options8; - this.tag = tag; - this.kind = options8["kind"] || null; - this.resolve = options8["resolve"] || function() { - return true; - }; - this.construct = options8["construct"] || function(data) { - return data; - }; - this.instanceOf = options8["instanceOf"] || null; - this.predicate = options8["predicate"] || null; - this.represent = options8["represent"] || null; - this.representName = options8["representName"] || null; - this.defaultStyle = options8["defaultStyle"] || null; - this.multi = options8["multi"] || false; - this.styleAliases = compileStyleAliases(options8["styleAliases"] || null); - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } - } - module.exports = Type; - } -}); - -// node_modules/js-yaml/lib/schema.js -var require_schema = __commonJS({ - "node_modules/js-yaml/lib/schema.js"(exports, module) { - "use strict"; - var YAMLException = require_exception(); - var Type = require_type(); - function compileList(schema, name) { - var result = []; - schema[name].forEach(function(currentType) { - var newIndex = result.length; - result.forEach(function(previousType, previousIndex) { - if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { - newIndex = previousIndex; - } - }); - result[newIndex] = currentType; - }); - return result; - } - function compileMap() { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - function collectType(type) { - if (type.multi) { - result.multi[type.kind].push(type); - result.multi["fallback"].push(type); - } else { - result[type.kind][type.tag] = result["fallback"][type.tag] = type; - } - } - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; - } - function Schema2(definition) { - return this.extend(definition); - } - Schema2.prototype.extend = function extend(definition) { - var implicit = []; - var explicit = []; - if (definition instanceof Type) { - explicit.push(definition); - } else if (Array.isArray(definition)) { - explicit = explicit.concat(definition); - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - if (definition.implicit) - implicit = implicit.concat(definition.implicit); - if (definition.explicit) - explicit = explicit.concat(definition.explicit); - } else { - throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); - } - implicit.forEach(function(type) { - if (!(type instanceof Type)) { - throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } - if (type.loadKind && type.loadKind !== "scalar") { - throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); - } - if (type.multi) { - throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); - } - }); - explicit.forEach(function(type) { - if (!(type instanceof Type)) { - throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); - } - }); - var result = Object.create(Schema2.prototype); - result.implicit = (this.implicit || []).concat(implicit); - result.explicit = (this.explicit || []).concat(explicit); - result.compiledImplicit = compileList(result, "implicit"); - result.compiledExplicit = compileList(result, "explicit"); - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); - return result; + return str2.replace(matchOperatorsRe, "\\$&"); }; - module.exports = Schema2; - } -}); - -// node_modules/js-yaml/lib/type/str.js -var require_str = __commonJS({ - "node_modules/js-yaml/lib/type/str.js"(exports, module) { - "use strict"; - var Type = require_type(); - module.exports = new Type("tag:yaml.org,2002:str", { - kind: "scalar", - construct: function(data) { - return data !== null ? data : ""; - } - }); - } -}); - -// node_modules/js-yaml/lib/type/seq.js -var require_seq = __commonJS({ - "node_modules/js-yaml/lib/type/seq.js"(exports, module) { - "use strict"; - var Type = require_type(); - module.exports = new Type("tag:yaml.org,2002:seq", { - kind: "sequence", - construct: function(data) { - return data !== null ? data : []; - } - }); } }); -// node_modules/js-yaml/lib/type/map.js -var require_map2 = __commonJS({ - "node_modules/js-yaml/lib/type/map.js"(exports, module) { - "use strict"; - var Type = require_type(); - module.exports = new Type("tag:yaml.org,2002:map", { - kind: "mapping", - construct: function(data) { - return data !== null ? data : {}; - } - }); - } -}); - -// node_modules/js-yaml/lib/schema/failsafe.js -var require_failsafe = __commonJS({ - "node_modules/js-yaml/lib/schema/failsafe.js"(exports, module) { - "use strict"; - var Schema2 = require_schema(); - module.exports = new Schema2({ - explicit: [ - require_str(), - require_seq(), - require_map2() - ] - }); - } -}); - -// node_modules/js-yaml/lib/type/null.js -var require_null = __commonJS({ - "node_modules/js-yaml/lib/type/null.js"(exports, module) { - "use strict"; - var Type = require_type(); - function resolveYamlNull(data) { - if (data === null) - return true; - var max = data.length; - return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); - } - function constructYamlNull() { - return null; - } - function isNull(object) { - return object === null; - } - module.exports = new Type("tag:yaml.org,2002:null", { - kind: "scalar", - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function() { - return "~"; - }, - lowercase: function() { - return "null"; - }, - uppercase: function() { - return "NULL"; - }, - camelcase: function() { - return "Null"; - }, - empty: function() { - return ""; - } - }, - defaultStyle: "lowercase" - }); - } -}); - -// node_modules/js-yaml/lib/type/bool.js -var require_bool = __commonJS({ - "node_modules/js-yaml/lib/type/bool.js"(exports, module) { +// node_modules/color-name/index.js +var require_color_name = __commonJS({ + "node_modules/color-name/index.js"(exports, module) { "use strict"; - var Type = require_type(); - function resolveYamlBoolean(data) { - if (data === null) - return false; - var max = data.length; - return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); - } - function constructYamlBoolean(data) { - return data === "true" || data === "True" || data === "TRUE"; - } - function isBoolean(object) { - return Object.prototype.toString.call(object) === "[object Boolean]"; - } - module.exports = new Type("tag:yaml.org,2002:bool", { - kind: "scalar", - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function(object) { - return object ? "true" : "false"; - }, - uppercase: function(object) { - return object ? "TRUE" : "FALSE"; - }, - camelcase: function(object) { - return object ? "True" : "False"; - } - }, - defaultStyle: "lowercase" - }); + module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] + }; } }); -// node_modules/js-yaml/lib/type/int.js -var require_int = __commonJS({ - "node_modules/js-yaml/lib/type/int.js"(exports, module) { - "use strict"; - var common = require_common3(); - var Type = require_type(); - function isHexCode(c) { - return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; - } - function isOctCode(c) { - return 48 <= c && c <= 55; - } - function isDecCode(c) { - return 48 <= c && c <= 57; - } - function resolveYamlInteger(data) { - if (data === null) - return false; - var max = data.length, index = 0, hasDigits = false, ch; - if (!max) - return false; - ch = data[index]; - if (ch === "-" || ch === "+") { - ch = data[++index]; +// node_modules/color-convert/conversions.js +var require_conversions = __commonJS({ + "node_modules/color-convert/conversions.js"(exports, module) { + var cssKeywords = require_color_name(); + var reverseKeywords = {}; + for (key2 in cssKeywords) { + if (cssKeywords.hasOwnProperty(key2)) { + reverseKeywords[cssKeywords[key2]] = key2; } - if (ch === "0") { - if (index + 1 === max) - return true; - ch = data[++index]; - if (ch === "b") { - index++; - for (; index < max; index++) { - ch = data[index]; - if (ch === "_") - continue; - if (ch !== "0" && ch !== "1") - return false; - hasDigits = true; - } - return hasDigits && ch !== "_"; - } - if (ch === "x") { - index++; - for (; index < max; index++) { - ch = data[index]; - if (ch === "_") - continue; - if (!isHexCode(data.charCodeAt(index))) - return false; - hasDigits = true; - } - return hasDigits && ch !== "_"; + } + var key2; + var convert = module.exports = { + rgb: { channels: 3, labels: "rgb" }, + hsl: { channels: 3, labels: "hsl" }, + hsv: { channels: 3, labels: "hsv" }, + hwb: { channels: 3, labels: "hwb" }, + cmyk: { channels: 4, labels: "cmyk" }, + xyz: { channels: 3, labels: "xyz" }, + lab: { channels: 3, labels: "lab" }, + lch: { channels: 3, labels: "lch" }, + hex: { channels: 1, labels: ["hex"] }, + keyword: { channels: 1, labels: ["keyword"] }, + ansi16: { channels: 1, labels: ["ansi16"] }, + ansi256: { channels: 1, labels: ["ansi256"] }, + hcg: { channels: 3, labels: ["h", "c", "g"] }, + apple: { channels: 3, labels: ["r16", "g16", "b16"] }, + gray: { channels: 1, labels: ["gray"] } + }; + for (model in convert) { + if (convert.hasOwnProperty(model)) { + if (!("channels" in convert[model])) { + throw new Error("missing channels property: " + model); } - if (ch === "o") { - index++; - for (; index < max; index++) { - ch = data[index]; - if (ch === "_") - continue; - if (!isOctCode(data.charCodeAt(index))) - return false; - hasDigits = true; - } - return hasDigits && ch !== "_"; + if (!("labels" in convert[model])) { + throw new Error("missing channel labels property: " + model); } - } - if (ch === "_") - return false; - for (; index < max; index++) { - ch = data[index]; - if (ch === "_") - continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; + if (convert[model].labels.length !== convert[model].channels) { + throw new Error("channel and label counts mismatch: " + model); } - hasDigits = true; + channels = convert[model].channels; + labels = convert[model].labels; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], "channels", { value: channels }); + Object.defineProperty(convert[model], "labels", { value: labels }); } - if (!hasDigits || ch === "_") - return false; - return true; } - function constructYamlInteger(data) { - var value = data, sign = 1, ch; - if (value.indexOf("_") !== -1) { - value = value.replace(/_/g, ""); + var channels; + var labels; + var model; + convert.rgb.hsl = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var min = Math.min(r, g, b); + var max = Math.max(r, g, b); + var delta = max - min; + var h; + var s; + var l; + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; } - ch = value[0]; - if (ch === "-" || ch === "+") { - if (ch === "-") - sign = -1; - value = value.slice(1); - ch = value[0]; + h = Math.min(h * 60, 360); + if (h < 0) { + h += 360; } - if (value === "0") - return 0; - if (ch === "0") { - if (value[1] === "b") - return sign * parseInt(value.slice(2), 2); - if (value[1] === "x") - return sign * parseInt(value.slice(2), 16); - if (value[1] === "o") - return sign * parseInt(value.slice(2), 8); - } - return sign * parseInt(value, 10); - } - function isInteger(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); - } - module.exports = new Type("tag:yaml.org,2002:int", { - kind: "scalar", - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function(obj) { - return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); - }, - octal: function(obj) { - return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); - }, - decimal: function(obj) { - return obj.toString(10); - }, - /* eslint-disable max-len */ - hexadecimal: function(obj) { - return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); - } - }, - defaultStyle: "decimal", - styleAliases: { - binary: [2, "bin"], - octal: [8, "oct"], - decimal: [10, "dec"], - hexadecimal: [16, "hex"] - } - }); - } -}); - -// node_modules/js-yaml/lib/type/float.js -var require_float = __commonJS({ - "node_modules/js-yaml/lib/type/float.js"(exports, module) { - "use strict"; - var common = require_common3(); - var Type = require_type(); - var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" - ); - function resolveYamlFloat(data) { - if (data === null) - return false; - if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === "_") { - return false; - } - return true; - } - function constructYamlFloat(data) { - var value, sign; - value = data.replace(/_/g, "").toLowerCase(); - sign = value[0] === "-" ? -1 : 1; - if ("+-".indexOf(value[0]) >= 0) { - value = value.slice(1); - } - if (value === ".inf") { - return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - } else if (value === ".nan") { - return NaN; - } - return sign * parseFloat(value, 10); - } - var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - function representYamlFloat(object, style) { - var res; - if (isNaN(object)) { - switch (style) { - case "lowercase": - return ".nan"; - case "uppercase": - return ".NAN"; - case "camelcase": - return ".NaN"; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case "lowercase": - return ".inf"; - case "uppercase": - return ".INF"; - case "camelcase": - return ".Inf"; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case "lowercase": - return "-.inf"; - case "uppercase": - return "-.INF"; - case "camelcase": - return "-.Inf"; - } - } else if (common.isNegativeZero(object)) { - return "-0.0"; - } - res = object.toString(10); - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; - } - function isFloat(object) { - return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); - } - module.exports = new Type("tag:yaml.org,2002:float", { - kind: "scalar", - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: "lowercase" - }); - } -}); - -// node_modules/js-yaml/lib/schema/json.js -var require_json = __commonJS({ - "node_modules/js-yaml/lib/schema/json.js"(exports, module) { - "use strict"; - module.exports = require_failsafe().extend({ - implicit: [ - require_null(), - require_bool(), - require_int(), - require_float() - ] - }); - } -}); - -// node_modules/js-yaml/lib/schema/core.js -var require_core = __commonJS({ - "node_modules/js-yaml/lib/schema/core.js"(exports, module) { - "use strict"; - module.exports = require_json(); - } -}); - -// node_modules/js-yaml/lib/type/timestamp.js -var require_timestamp = __commonJS({ - "node_modules/js-yaml/lib/type/timestamp.js"(exports, module) { - "use strict"; - var Type = require_type(); - var YAML_DATE_REGEXP = new RegExp( - "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" - ); - var YAML_TIMESTAMP_REGEXP = new RegExp( - "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" - ); - function resolveYamlTimestamp(data) { - if (data === null) - return false; - if (YAML_DATE_REGEXP.exec(data) !== null) - return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) - return true; - return false; - } - function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; - match = YAML_DATE_REGEXP.exec(data); - if (match === null) - match = YAML_TIMESTAMP_REGEXP.exec(data); - if (match === null) - throw new Error("Date resolve error"); - year = +match[1]; - month = +match[2] - 1; - day = +match[3]; - if (!match[4]) { - return new Date(Date.UTC(year, month, day)); - } - hour = +match[4]; - minute = +match[5]; - second = +match[6]; - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { - fraction += "0"; - } - fraction = +fraction; - } - if (match[9]) { - tz_hour = +match[10]; - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 6e4; - if (match[9] === "-") - delta = -delta; - } - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - if (delta) - date.setTime(date.getTime() - delta); - return date; - } - function representYamlTimestamp(object) { - return object.toISOString(); - } - module.exports = new Type("tag:yaml.org,2002:timestamp", { - kind: "scalar", - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp - }); - } -}); - -// node_modules/js-yaml/lib/type/merge.js -var require_merge = __commonJS({ - "node_modules/js-yaml/lib/type/merge.js"(exports, module) { - "use strict"; - var Type = require_type(); - function resolveYamlMerge(data) { - return data === "<<" || data === null; - } - module.exports = new Type("tag:yaml.org,2002:merge", { - kind: "scalar", - resolve: resolveYamlMerge - }); - } -}); - -// node_modules/js-yaml/lib/type/binary.js -var require_binary = __commonJS({ - "node_modules/js-yaml/lib/type/binary.js"(exports, module) { - "use strict"; - var Type = require_type(); - var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; - function resolveYamlBinary(data) { - if (data === null) - return false; - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - if (code > 64) - continue; - if (code < 0) - return false; - bitlen += 6; - } - return bitlen % 8 === 0; - } - function constructYamlBinary(data) { - var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; - for (idx = 0; idx < max; idx++) { - if (idx % 4 === 0 && idx) { - result.push(bits >> 16 & 255); - result.push(bits >> 8 & 255); - result.push(bits & 255); - } - bits = bits << 6 | map.indexOf(input.charAt(idx)); - } - tailbits = max % 4 * 6; - if (tailbits === 0) { - result.push(bits >> 16 & 255); - result.push(bits >> 8 & 255); - result.push(bits & 255); - } else if (tailbits === 18) { - result.push(bits >> 10 & 255); - result.push(bits >> 2 & 255); - } else if (tailbits === 12) { - result.push(bits >> 4 & 255); - } - return new Uint8Array(result); - } - function representYamlBinary(object) { - var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; - for (idx = 0; idx < max; idx++) { - if (idx % 3 === 0 && idx) { - result += map[bits >> 18 & 63]; - result += map[bits >> 12 & 63]; - result += map[bits >> 6 & 63]; - result += map[bits & 63]; - } - bits = (bits << 8) + object[idx]; - } - tail = max % 3; - if (tail === 0) { - result += map[bits >> 18 & 63]; - result += map[bits >> 12 & 63]; - result += map[bits >> 6 & 63]; - result += map[bits & 63]; - } else if (tail === 2) { - result += map[bits >> 10 & 63]; - result += map[bits >> 4 & 63]; - result += map[bits << 2 & 63]; - result += map[64]; - } else if (tail === 1) { - result += map[bits >> 2 & 63]; - result += map[bits << 4 & 63]; - result += map[64]; - result += map[64]; - } - return result; - } - function isBinary(obj) { - return Object.prototype.toString.call(obj) === "[object Uint8Array]"; - } - module.exports = new Type("tag:yaml.org,2002:binary", { - kind: "scalar", - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary - }); - } -}); - -// node_modules/js-yaml/lib/type/omap.js -var require_omap = __commonJS({ - "node_modules/js-yaml/lib/type/omap.js"(exports, module) { - "use strict"; - var Type = require_type(); - var _hasOwnProperty = Object.prototype.hasOwnProperty; - var _toString = Object.prototype.toString; - function resolveYamlOmap(data) { - if (data === null) - return true; - var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - if (_toString.call(pair) !== "[object Object]") - return false; - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) - pairHasKey = true; - else - return false; - } - } - if (!pairHasKey) - return false; - if (objectKeys.indexOf(pairKey) === -1) - objectKeys.push(pairKey); - else - return false; - } - return true; - } - function constructYamlOmap(data) { - return data !== null ? data : []; - } - module.exports = new Type("tag:yaml.org,2002:omap", { - kind: "sequence", - resolve: resolveYamlOmap, - construct: constructYamlOmap - }); - } -}); - -// node_modules/js-yaml/lib/type/pairs.js -var require_pairs = __commonJS({ - "node_modules/js-yaml/lib/type/pairs.js"(exports, module) { - "use strict"; - var Type = require_type(); - var _toString = Object.prototype.toString; - function resolveYamlPairs(data) { - if (data === null) - return true; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - if (_toString.call(pair) !== "[object Object]") - return false; - keys = Object.keys(pair); - if (keys.length !== 1) - return false; - result[index] = [keys[0], pair[keys[0]]]; - } - return true; - } - function constructYamlPairs(data) { - if (data === null) - return []; - var index, length, pair, keys, result, object = data; - result = new Array(object.length); - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - keys = Object.keys(pair); - result[index] = [keys[0], pair[keys[0]]]; - } - return result; - } - module.exports = new Type("tag:yaml.org,2002:pairs", { - kind: "sequence", - resolve: resolveYamlPairs, - construct: constructYamlPairs - }); - } -}); - -// node_modules/js-yaml/lib/type/set.js -var require_set = __commonJS({ - "node_modules/js-yaml/lib/type/set.js"(exports, module) { - "use strict"; - var Type = require_type(); - var _hasOwnProperty = Object.prototype.hasOwnProperty; - function resolveYamlSet(data) { - if (data === null) - return true; - var key, object = data; - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) - return false; - } - } - return true; - } - function constructYamlSet(data) { - return data !== null ? data : {}; - } - module.exports = new Type("tag:yaml.org,2002:set", { - kind: "mapping", - resolve: resolveYamlSet, - construct: constructYamlSet - }); - } -}); - -// node_modules/js-yaml/lib/schema/default.js -var require_default = __commonJS({ - "node_modules/js-yaml/lib/schema/default.js"(exports, module) { - "use strict"; - module.exports = require_core().extend({ - implicit: [ - require_timestamp(), - require_merge() - ], - explicit: [ - require_binary(), - require_omap(), - require_pairs(), - require_set() - ] - }); - } -}); - -// node_modules/js-yaml/lib/loader.js -var require_loader = __commonJS({ - "node_modules/js-yaml/lib/loader.js"(exports, module) { - "use strict"; - var common = require_common3(); - var YAMLException = require_exception(); - var makeSnippet = require_snippet(); - var DEFAULT_SCHEMA = require_default(); - var _hasOwnProperty = Object.prototype.hasOwnProperty; - var CONTEXT_FLOW_IN = 1; - var CONTEXT_FLOW_OUT = 2; - var CONTEXT_BLOCK_IN = 3; - var CONTEXT_BLOCK_OUT = 4; - var CHOMPING_CLIP = 1; - var CHOMPING_STRIP = 2; - var CHOMPING_KEEP = 3; - var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; - var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; - var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; - var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - function _class(obj) { - return Object.prototype.toString.call(obj); - } - function is_EOL(c) { - return c === 10 || c === 13; - } - function is_WHITE_SPACE(c) { - return c === 9 || c === 32; - } - function is_WS_OR_EOL(c) { - return c === 9 || c === 32 || c === 10 || c === 13; - } - function is_FLOW_INDICATOR(c) { - return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; - } - function fromHexCode(c) { - var lc; - if (48 <= c && c <= 57) { - return c - 48; - } - lc = c | 32; - if (97 <= lc && lc <= 102) { - return lc - 97 + 10; - } - return -1; - } - function escapedHexLen(c) { - if (c === 120) { - return 2; - } - if (c === 117) { - return 4; - } - if (c === 85) { - return 8; - } - return 0; - } - function fromDecimalCode(c) { - if (48 <= c && c <= 57) { - return c - 48; - } - return -1; - } - function simpleEscapeSequence(c) { - return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; - } - function charFromCodepoint(c) { - if (c <= 65535) { - return String.fromCharCode(c); + l = (min + max) / 2; + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); } - return String.fromCharCode( - (c - 65536 >> 10) + 55296, - (c - 65536 & 1023) + 56320 - ); - } - var simpleEscapeCheck = new Array(256); - var simpleEscapeMap = new Array(256); - for (i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); - } - var i; - function State(input, options8) { - this.input = input; - this.filename = options8["filename"] || null; - this.schema = options8["schema"] || DEFAULT_SCHEMA; - this.onWarning = options8["onWarning"] || null; - this.legacy = options8["legacy"] || false; - this.json = options8["json"] || false; - this.listener = options8["listener"] || null; - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - this.firstTabInLine = -1; - this.documents = []; - } - function generateError(state, message) { - var mark = { - name: state.filename, - buffer: state.input.slice(0, -1), - // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart + return [h, s * 100, l * 100]; + }; + convert.rgb.hsv = function(rgb) { + var rdif; + var gdif; + var bdif; + var h; + var s; + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var v = Math.max(r, g, b); + var diff = v - Math.min(r, g, b); + var diffc = function(c2) { + return (v - c2) / 6 / diff + 1 / 2; }; - mark.snippet = makeSnippet(mark); - return new YAMLException(message, mark); - } - function throwError(state, message) { - throw generateError(state, message); - } - function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } - } - var directiveHandlers = { - YAML: function handleYamlDirective(state, name, args) { - var match, major, minor; - if (state.version !== null) { - throwError(state, "duplication of %YAML directive"); - } - if (args.length !== 1) { - throwError(state, "YAML directive accepts exactly one argument"); - } - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - if (match === null) { - throwError(state, "ill-formed argument of the YAML directive"); - } - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - if (major !== 1) { - throwError(state, "unacceptable YAML version of the document"); - } - state.version = args[0]; - state.checkLineBreaks = minor < 2; - if (minor !== 1 && minor !== 2) { - throwWarning(state, "unsupported YAML version of the document"); - } - }, - TAG: function handleTagDirective(state, name, args) { - var handle, prefix; - if (args.length !== 2) { - throwError(state, "TAG directive accepts exactly two arguments"); - } - handle = args[0]; - prefix = args[1]; - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); - } - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + if (diff === 0) { + h = s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = 1 / 3 + rdif - bdif; + } else if (b === v) { + h = 2 / 3 + gdif - rdif; } - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, "tag prefix is malformed: " + prefix); + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; } - state.tagMap[handle] = prefix; } + return [ + h * 360, + s * 100, + v * 100 + ]; }; - function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - if (start < end) { - _result = state.input.slice(start, end); - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { - throwError(state, "expected valid JSON character"); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, "the stream contains non-printable characters"); - } - state.result += _result; - } - } - function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - if (!common.isObject(source)) { - throwError(state, "cannot merge mappings; the provided source object is unacceptable"); - } - sourceKeys = Object.keys(source); - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } - } - function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { - var index, quantity; - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, "nested arrays are not supported inside keys"); - } - if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { - keyNode[index] = "[object Object]"; - } - } - } - if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { - keyNode = "[object Object]"; - } - keyNode = String(keyNode); - if (_result === null) { - _result = {}; - } - if (keyTag === "tag:yaml.org,2002:merge") { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, "duplicated mapping key"); - } - if (keyNode === "__proto__") { - Object.defineProperty(_result, keyNode, { - configurable: true, - enumerable: true, - writable: true, - value: valueNode - }); - } else { - _result[keyNode] = valueNode; - } - delete overridableKeys[keyNode]; - } - return _result; + convert.rgb.hwb = function(rgb) { + var r = rgb[0]; + var g = rgb[1]; + var b = rgb[2]; + var h = convert.rgb.hsl(rgb)[0]; + var w = 1 / 255 * Math.min(r, Math.min(g, b)); + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + return [h, w * 100, b * 100]; + }; + convert.rgb.cmyk = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var c2; + var m; + var y; + var k; + k = Math.min(1 - r, 1 - g, 1 - b); + c2 = (1 - r - k) / (1 - k) || 0; + m = (1 - g - k) / (1 - k) || 0; + y = (1 - b - k) / (1 - k) || 0; + return [c2 * 100, m * 100, y * 100, k * 100]; + }; + function comparativeDistance(x, y) { + return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); } - function readLineBreak(state) { - var ch; - ch = state.input.charCodeAt(state.position); - if (ch === 10) { - state.position++; - } else if (ch === 13) { - state.position++; - if (state.input.charCodeAt(state.position) === 10) { - state.position++; - } - } else { - throwError(state, "a line break is expected"); + convert.rgb.keyword = function(rgb) { + var reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; } - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; - } - function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, ch = state.input.charCodeAt(state.position); - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 9 && state.firstTabInLine === -1) { - state.firstTabInLine = state.position; - } - ch = state.input.charCodeAt(++state.position); - } - if (allowComments && ch === 35) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 10 && ch !== 13 && ch !== 0); - } - if (is_EOL(ch)) { - readLineBreak(state); - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - while (ch === 32) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); + var currentClosestDistance = Infinity; + var currentClosestKeyword; + for (var keyword in cssKeywords) { + if (cssKeywords.hasOwnProperty(keyword)) { + var value = cssKeywords[keyword]; + var distance = comparativeDistance(rgb, value); + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; } - } else { - break; } } - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, "deficient indentation"); - } - return lineBreaks; - } - function testDocumentSeparator(state) { - var _position = state.position, ch; - ch = state.input.charCodeAt(_position); - if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { - _position += 3; - ch = state.input.charCodeAt(_position); - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - return false; - } - function writeFoldedLines(state, count) { - if (count === 1) { - state.result += " "; - } else if (count > 1) { - state.result += common.repeat("\n", count - 1); - } - } - function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; - ch = state.input.charCodeAt(state.position); - if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { - return false; - } - if (ch === 63 || ch === 45) { - following = state.input.charCodeAt(state.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - state.kind = "scalar"; - state.result = ""; - captureStart = captureEnd = state.position; - hasPendingContent = false; - while (ch !== 0) { - if (ch === 58) { - following = state.input.charCodeAt(state.position + 1); - if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - } else if (ch === 35) { - preceding = state.input.charCodeAt(state.position - 1); - if (is_WS_OR_EOL(preceding)) { - break; - } - } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - ch = state.input.charCodeAt(++state.position); - } - captureSegment(state, captureStart, captureEnd, false); - if (state.result) { - return true; - } - state.kind = _kind; - state.result = _result; - return false; - } - function readSingleQuotedScalar(state, nodeIndent) { - var ch, captureStart, captureEnd; - ch = state.input.charCodeAt(state.position); - if (ch !== 39) { - return false; - } - state.kind = "scalar"; - state.result = ""; - state.position++; - captureStart = captureEnd = state.position; - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 39) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - if (ch === 39) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, "unexpected end of the document within a single quoted scalar"); - } else { - state.position++; - captureEnd = state.position; - } - } - throwError(state, "unexpected end of the stream within a single quoted scalar"); - } - function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, captureEnd, hexLength, hexResult, tmp, ch; - ch = state.input.charCodeAt(state.position); - if (ch !== 34) { - return false; - } - state.kind = "scalar"; - state.result = ""; - state.position++; - captureStart = captureEnd = state.position; - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 34) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - } else if (ch === 92) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - } else { - throwError(state, "expected hexadecimal character"); - } - } - state.result += charFromCodepoint(hexResult); - state.position++; - } else { - throwError(state, "unknown escape sequence"); - } - captureStart = captureEnd = state.position; - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, "unexpected end of the document within a double quoted scalar"); - } else { - state.position++; - captureEnd = state.position; - } + return currentClosestKeyword; + }; + convert.keyword.rgb = function(keyword) { + return cssKeywords[keyword]; + }; + convert.rgb.xyz = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; + g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; + b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; + var x = r * 0.4124 + g * 0.3576 + b * 0.1805; + var y = r * 0.2126 + g * 0.7152 + b * 0.0722; + var z = r * 0.0193 + g * 0.1192 + b * 0.9505; + return [x * 100, y * 100, z * 100]; + }; + convert.rgb.lab = function(rgb) { + var xyz = convert.rgb.xyz(rgb); + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + convert.hsl.rgb = function(hsl) { + var h = hsl[0] / 360; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var t1; + var t2; + var t3; + var rgb; + var val; + if (s === 0) { + val = l * 255; + return [val, val, val]; } - throwError(state, "unexpected end of the stream within a double quoted scalar"); - } - function readFlowCollection(state, nodeIndent) { - var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; - ch = state.input.charCodeAt(state.position); - if (ch === 91) { - terminator = 93; - isMapping = false; - _result = []; - } else if (ch === 123) { - terminator = 125; - isMapping = true; - _result = {}; + if (l < 0.5) { + t2 = l * (1 + s); } else { - return false; - } - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; + t2 = l + s - l * s; } - ch = state.input.charCodeAt(++state.position); - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - ch = state.input.charCodeAt(state.position); - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? "mapping" : "sequence"; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, "missed comma between flow collection entries"); - } else if (ch === 44) { - throwError(state, "expected the node content, but found ','"); - } - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - if (ch === 63) { - following = state.input.charCodeAt(state.position + 1); - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - _line = state.line; - _lineStart = state.lineStart; - _pos = state.position; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - ch = state.input.charCodeAt(state.position); - if ((isExplicitPair || state.line === _line) && ch === 58) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; + t1 = 2 * l - t2; + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; } - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); + if (t3 > 1) { + t3--; } - skipSeparationSpace(state, true, nodeIndent); - ch = state.input.charCodeAt(state.position); - if (ch === 44) { - readNext = true; - ch = state.input.charCodeAt(++state.position); + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { - readNext = false; + val = t1; } + rgb[i] = val * 255; } - throwError(state, "unexpected end of the stream within a flow collection"); - } - function readBlockScalar(state, nodeIndent) { - var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; - ch = state.input.charCodeAt(state.position); - if (ch === 124) { - folding = false; - } else if (ch === 62) { - folding = true; - } else { - return false; + return rgb; + }; + convert.hsl.hsv = function(hsl) { + var h = hsl[0]; + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var smin = s; + var lmin = Math.max(l, 0.01); + var sv; + var v; + l *= 2; + s *= l <= 1 ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + v = (l + s) / 2; + sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); + return [h, sv * 100, v * 100]; + }; + convert.hsv.rgb = function(hsv) { + var h = hsv[0] / 60; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var hi = Math.floor(h) % 6; + var f = h - Math.floor(h); + var p = 255 * v * (1 - s); + var q = 255 * v * (1 - s * f); + var t = 255 * v * (1 - s * (1 - f)); + v *= 255; + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; } - state.kind = "scalar"; - state.result = ""; - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - if (ch === 43 || ch === 45) { - if (CHOMPING_CLIP === chomping) { - chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, "repeat of a chomping mode identifier"); - } - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, "repeat of an indentation width identifier"); - } - } else { - break; - } + }; + convert.hsv.hsl = function(hsv) { + var h = hsv[0]; + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var vmin = Math.max(v, 0.01); + var lmin; + var sl; + var l; + l = (2 - s) * v; + lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + return [h, sl * 100, l * 100]; + }; + convert.hwb.rgb = function(hwb) { + var h = hwb[0] / 360; + var wh = hwb[1] / 100; + var bl = hwb[2] / 100; + var ratio = wh + bl; + var i; + var v; + var f; + var n; + if (ratio > 1) { + wh /= ratio; + bl /= ratio; } - if (is_WHITE_SPACE(ch)) { - do { - ch = state.input.charCodeAt(++state.position); - } while (is_WHITE_SPACE(ch)); - if (ch === 35) { - do { - ch = state.input.charCodeAt(++state.position); - } while (!is_EOL(ch) && ch !== 0); - } + i = Math.floor(6 * h); + v = 1 - bl; + f = 6 * h - i; + if ((i & 1) !== 0) { + f = 1 - f; } - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - ch = state.input.charCodeAt(state.position); - while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - if (is_EOL(ch)) { - emptyLines++; - continue; - } - if (state.lineIndent < textIndent) { - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { - state.result += "\n"; - } - } - break; - } - if (folding) { - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat("\n", emptyLines + 1); - } else if (emptyLines === 0) { - if (didReadContent) { - state.result += " "; - } - } else { - state.result += common.repeat("\n", emptyLines); - } - } else { - state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); - } - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - while (!is_EOL(ch) && ch !== 0) { - ch = state.input.charCodeAt(++state.position); - } - captureSegment(state, captureStart, state.position, false); - } - return true; - } - function readBlockSequence(state, nodeIndent) { - var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; - if (state.firstTabInLine !== -1) - return false; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - ch = state.input.charCodeAt(state.position); - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, "tab characters must not be used in indentation"); - } - if (ch !== 45) { + n = wh + f * (v - wh); + var r; + var g; + var b; + switch (i) { + default: + case 6: + case 0: + r = v; + g = n; + b = wh; break; - } - following = state.input.charCodeAt(state.position + 1); - if (!is_WS_OR_EOL(following)) { + case 1: + r = n; + g = v; + b = wh; break; - } - detected = true; - state.position++; - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { - throwError(state, "bad indentation of a sequence entry"); - } else if (state.lineIndent < nodeIndent) { + case 2: + r = wh; + g = v; + b = n; break; - } - } - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = "sequence"; - state.result = _result; - return true; - } - return false; - } - function readBlockMapping(state, nodeIndent, flowIndent) { - var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; - if (state.firstTabInLine !== -1) - return false; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - ch = state.input.charCodeAt(state.position); - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, "tab characters must not be used in indentation"); - } - following = state.input.charCodeAt(state.position + 1); - _line = state.line; - if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { - if (ch === 63) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - detected = true; - atExplicitKey = true; - allowCompact = true; - } else if (atExplicitKey) { - atExplicitKey = false; - allowCompact = true; - } else { - throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); - } - state.position += 1; - ch = following; - } else { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - break; - } - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - if (ch === 58) { - ch = state.input.charCodeAt(++state.position); - if (!is_WS_OR_EOL(ch)) { - throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); - } - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - } else if (detected) { - throwError(state, "can not read an implicit mapping pair; a colon is missed"); - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; - } - } else if (detected) { - throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; - } - } - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - } - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { - throwError(state, "bad indentation of a mapping entry"); - } else if (state.lineIndent < nodeIndent) { + case 3: + r = wh; + g = n; + b = v; + break; + case 4: + r = n; + g = wh; + b = v; + break; + case 5: + r = v; + g = wh; + b = n; break; - } - } - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); } - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = "mapping"; - state.result = _result; + return [r * 255, g * 255, b * 255]; + }; + convert.cmyk.rgb = function(cmyk) { + var c2 = cmyk[0] / 100; + var m = cmyk[1] / 100; + var y = cmyk[2] / 100; + var k = cmyk[3] / 100; + var r; + var g; + var b; + r = 1 - Math.min(1, c2 * (1 - k) + k); + g = 1 - Math.min(1, m * (1 - k) + k); + b = 1 - Math.min(1, y * (1 - k) + k); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.rgb = function(xyz) { + var x = xyz[0] / 100; + var y = xyz[1] / 100; + var z = xyz[2] / 100; + var r; + var g; + var b; + r = x * 3.2406 + y * -1.5372 + z * -0.4986; + g = x * -0.9689 + y * 1.8758 + z * 0.0415; + b = x * 0.0557 + y * -0.204 + z * 1.057; + r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92; + g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92; + b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92; + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + return [r * 255, g * 255, b * 255]; + }; + convert.xyz.lab = function(xyz) { + var x = xyz[0]; + var y = xyz[1]; + var z = xyz[2]; + var l; + var a; + var b; + x /= 95.047; + y /= 100; + z /= 108.883; + x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; + y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; + z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; + l = 116 * y - 16; + a = 500 * (x - y); + b = 200 * (y - z); + return [l, a, b]; + }; + convert.lab.xyz = function(lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var x; + var y; + var z; + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + var y2 = Math.pow(y, 3); + var x2 = Math.pow(x, 3); + var z2 = Math.pow(z, 3); + y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; + x *= 95.047; + y *= 100; + z *= 108.883; + return [x, y, z]; + }; + convert.lab.lch = function(lab) { + var l = lab[0]; + var a = lab[1]; + var b = lab[2]; + var hr; + var h; + var c2; + hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + if (h < 0) { + h += 360; } - return detected; - } - function readTagProperty(state) { - var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; - ch = state.input.charCodeAt(state.position); - if (ch !== 33) - return false; - if (state.tag !== null) { - throwError(state, "duplication of a tag property"); + c2 = Math.sqrt(a * a + b * b); + return [l, c2, h]; + }; + convert.lch.lab = function(lch) { + var l = lch[0]; + var c2 = lch[1]; + var h = lch[2]; + var a; + var b; + var hr; + hr = h / 360 * 2 * Math.PI; + a = c2 * Math.cos(hr); + b = c2 * Math.sin(hr); + return [l, a, b]; + }; + convert.rgb.ansi16 = function(args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; + value = Math.round(value / 50); + if (value === 0) { + return 30; } - ch = state.input.charCodeAt(++state.position); - if (ch === 60) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - } else if (ch === 33) { - isNamed = true; - tagHandle = "!!"; - ch = state.input.charCodeAt(++state.position); - } else { - tagHandle = "!"; + var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); + if (value === 2) { + ansi += 60; } - _position = state.position; - if (isVerbatim) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0 && ch !== 62); - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, "unexpected end of the stream within a verbatim tag"); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - if (ch === 33) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, "named tag handle cannot contain such characters"); - } - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, "tag suffix cannot contain exclamation marks"); - } - } - ch = state.input.charCodeAt(++state.position); + return ansi; + }; + convert.hsv.ansi16 = function(args) { + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); + }; + convert.rgb.ansi256 = function(args) { + var r = args[0]; + var g = args[1]; + var b = args[2]; + if (r === g && g === b) { + if (r < 8) { + return 16; } - tagName = state.input.slice(_position, state.position); - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, "tag suffix cannot contain flow indicator characters"); + if (r > 248) { + return 231; } + return Math.round((r - 8) / 247 * 24) + 232; } - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, "tag name cannot contain such characters: " + tagName); - } - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state, "tag name is malformed: " + tagName); - } - if (isVerbatim) { - state.tag = tagName; - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - } else if (tagHandle === "!") { - state.tag = "!" + tagName; - } else if (tagHandle === "!!") { - state.tag = "tag:yaml.org,2002:" + tagName; - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); + return ansi; + }; + convert.ansi16.rgb = function(args) { + var color = args % 10; + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + color = color / 10.5 * 255; + return [color, color, color]; } - return true; - } - function readAnchorProperty(state) { - var _position, ch; - ch = state.input.charCodeAt(state.position); - if (ch !== 38) - return false; - if (state.anchor !== null) { - throwError(state, "duplication of an anchor property"); + var mult = (~~(args > 50) + 1) * 0.5; + var r = (color & 1) * mult * 255; + var g = (color >> 1 & 1) * mult * 255; + var b = (color >> 2 & 1) * mult * 255; + return [r, g, b]; + }; + convert.ansi256.rgb = function(args) { + if (args >= 232) { + var c2 = (args - 232) * 10 + 8; + return [c2, c2, c2]; } - ch = state.input.charCodeAt(++state.position); - _position = state.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - if (state.position === _position) { - throwError(state, "name of an anchor node must contain at least one character"); - } - state.anchor = state.input.slice(_position, state.position); - return true; - } - function readAlias(state) { - var _position, alias, ch; - ch = state.input.charCodeAt(state.position); - if (ch !== 42) - return false; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - if (state.position === _position) { - throwError(state, "name of an alias node must contain at least one character"); - } - alias = state.input.slice(_position, state.position); - if (!_hasOwnProperty.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; - } - function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent; - if (state.listener !== null) { - state.listener("open", state); - } - state.tag = null; - state.anchor = null; - state.kind = null; - state.result = null; - allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; - if (allowToSeek) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - blockIndent = state.position - state.lineStart; - if (indentStatus === 1) { - if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - } else if (readAlias(state)) { - hasContent = true; - if (state.tag !== null || state.anchor !== null) { - throwError(state, "alias node should not have any properties"); - } - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - if (state.tag === null) { - state.tag = "?"; - } - } - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - if (state.tag === null) { - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } else if (state.tag === "?") { - if (state.result !== null && state.kind !== "scalar") { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - if (type.resolve(state.result)) { - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (state.tag !== "!") { - if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { - type = state.typeMap[state.kind || "fallback"][state.tag]; - } else { - type = null; - typeList = state.typeMap.multi[state.kind || "fallback"]; - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex]; - break; - } - } - } - if (!type) { - throwError(state, "unknown tag !<" + state.tag + ">"); - } - if (state.result !== null && type.kind !== state.kind) { - throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - if (!type.resolve(state.result, state.tag)) { - throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); - } else { - state.result = type.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } - if (state.listener !== null) { - state.listener("close", state); - } - return state.tag !== null || state.anchor !== null || hasContent; - } - function readDocument(state) { - var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = /* @__PURE__ */ Object.create(null); - state.anchorMap = /* @__PURE__ */ Object.create(null); - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - if (state.lineIndent > 0 || ch !== 37) { - break; - } - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - if (directiveName.length < 1) { - throwError(state, "directive name must not be less than one character in length"); - } - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - if (ch === 35) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0 && !is_EOL(ch)); - break; - } - if (is_EOL(ch)) - break; - _position = state.position; - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - directiveArgs.push(state.input.slice(_position, state.position)); - } - if (ch !== 0) - readLineBreak(state); - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - skipSeparationSpace(state, true, -1); - if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } else if (hasDirectives) { - throwError(state, "directives end mark is expected"); - } - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, "non-ASCII line breaks are interpreted as content"); + args -= 16; + var rem; + var r = Math.floor(args / 36) / 5 * 255; + var g = Math.floor((rem = args % 36) / 6) / 5 * 255; + var b = rem % 6 / 5 * 255; + return [r, g, b]; + }; + convert.rgb.hex = function(args) { + var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); + var string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.hex.rgb = function(args) { + var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; } - state.documents.push(state.result); - if (state.position === state.lineStart && testDocumentSeparator(state)) { - if (state.input.charCodeAt(state.position) === 46) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; + var colorString = match[0]; + if (match[0].length === 3) { + colorString = colorString.split("").map(function(char) { + return char + char; + }).join(""); } - if (state.position < state.length - 1) { - throwError(state, "end of the stream or a document separator is expected"); + var integer = parseInt(colorString, 16); + var r = integer >> 16 & 255; + var g = integer >> 8 & 255; + var b = integer & 255; + return [r, g, b]; + }; + convert.rgb.hcg = function(rgb) { + var r = rgb[0] / 255; + var g = rgb[1] / 255; + var b = rgb[2] / 255; + var max = Math.max(Math.max(r, g), b); + var min = Math.min(Math.min(r, g), b); + var chroma = max - min; + var grayscale; + var hue; + if (chroma < 1) { + grayscale = min / (1 - chroma); } else { - return; - } - } - function loadDocuments(input, options8) { - input = String(input); - options8 = options8 || {}; - if (input.length !== 0) { - if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { - input += "\n"; - } - if (input.charCodeAt(0) === 65279) { - input = input.slice(1); - } - } - var state = new State(input, options8); - var nullpos = input.indexOf("\0"); - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, "null byte is not allowed in input"); - } - state.input += "\0"; - while (state.input.charCodeAt(state.position) === 32) { - state.lineIndent += 1; - state.position += 1; - } - while (state.position < state.length - 1) { - readDocument(state); - } - return state.documents; - } - function loadAll(input, iterator, options8) { - if (iterator !== null && typeof iterator === "object" && typeof options8 === "undefined") { - options8 = iterator; - iterator = null; - } - var documents = loadDocuments(input, options8); - if (typeof iterator !== "function") { - return documents; - } - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); + grayscale = 0; } - } - function load(input, options8) { - var documents = loadDocuments(input, options8); - if (documents.length === 0) { - return void 0; - } else if (documents.length === 1) { - return documents[0]; + if (chroma <= 0) { + hue = 0; + } else if (max === r) { + hue = (g - b) / chroma % 6; + } else if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma + 4; } - throw new YAMLException("expected a single document in the stream, but found more"); - } - module.exports.loadAll = loadAll; - module.exports.load = load; - } -}); - -// node_modules/json-parse-even-better-errors/lib/index.js -var require_lib4 = __commonJS({ - "node_modules/json-parse-even-better-errors/lib/index.js"(exports, module) { - "use strict"; - var hexify = (char) => { - const h = char.charCodeAt(0).toString(16).toUpperCase(); - return "0x" + (h.length % 2 ? "0" : "") + h; + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; }; - var parseError = (e, txt, context) => { - if (!txt) { - return { - message: e.message + " while parsing empty string", - position: 0 - }; - } - const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i); - const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null; - const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message; - if (errIdx !== null && errIdx !== void 0) { - const start = errIdx <= context ? 0 : errIdx - context; - const end = errIdx + context >= txt.length ? txt.length : errIdx + context; - const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "..."); - const near = txt === slice ? "" : "near "; - return { - message: msg + ` while parsing ${near}${JSON.stringify(slice)}`, - position: errIdx - }; + convert.hsl.hcg = function(hsl) { + var s = hsl[1] / 100; + var l = hsl[2] / 100; + var c2 = 1; + var f = 0; + if (l < 0.5) { + c2 = 2 * s * l; } else { - return { - message: msg + ` while parsing '${txt.slice(0, context * 2)}'`, - position: 0 - }; + c2 = 2 * s * (1 - l); } - }; - var JSONParseError = class extends SyntaxError { - constructor(er, txt, context, caller) { - context = context || 20; - const metadata = parseError(er, txt, context); - super(metadata.message); - Object.assign(this, metadata); - this.code = "EJSONPARSE"; - this.systemError = er; - Error.captureStackTrace(this, caller || this.constructor); + if (c2 < 1) { + f = (l - 0.5 * c2) / (1 - c2); } - get name() { - return this.constructor.name; + return [hsl[0], c2 * 100, f * 100]; + }; + convert.hsv.hcg = function(hsv) { + var s = hsv[1] / 100; + var v = hsv[2] / 100; + var c2 = s * v; + var f = 0; + if (c2 < 1) { + f = (v - c2) / (1 - c2); } - set name(n) { + return [hsv[0], c2 * 100, f * 100]; + }; + convert.hcg.rgb = function(hcg) { + var h = hcg[0] / 360; + var c2 = hcg[1] / 100; + var g = hcg[2] / 100; + if (c2 === 0) { + return [g * 255, g * 255, g * 255]; } - get [Symbol.toStringTag]() { - return this.constructor.name; + var pure = [0, 0, 0]; + var hi = h % 1 * 6; + var v = hi % 1; + var w = 1 - v; + var mg = 0; + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v; + pure[2] = 0; + break; + case 1: + pure[0] = w; + pure[1] = 1; + pure[2] = 0; + break; + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v; + break; + case 3: + pure[0] = 0; + pure[1] = w; + pure[2] = 1; + break; + case 4: + pure[0] = v; + pure[1] = 0; + pure[2] = 1; + break; + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w; } + mg = (1 - c2) * g; + return [ + (c2 * pure[0] + mg) * 255, + (c2 * pure[1] + mg) * 255, + (c2 * pure[2] + mg) * 255 + ]; }; - var kIndent = Symbol.for("indent"); - var kNewline = Symbol.for("newline"); - var formatRE = /^\s*[{[]((?:\r?\n)+)([\s\t]*)/; - var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/; - var parseJson2 = (txt, reviver, context) => { - const parseText = stripBOM(txt); - context = context || 20; - try { - const [, newline = "\n", indent2 = " "] = parseText.match(emptyRE) || parseText.match(formatRE) || [null, "", ""]; - const result = JSON.parse(parseText, reviver); - if (result && typeof result === "object") { - result[kNewline] = newline; - result[kIndent] = indent2; - } - return result; - } catch (e) { - if (typeof txt !== "string" && !Buffer.isBuffer(txt)) { - const isEmptyArray = Array.isArray(txt) && txt.length === 0; - throw Object.assign(new TypeError( - `Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}` - ), { - code: "EJSONPARSE", - systemError: e - }); - } - throw new JSONParseError(e, parseText, context, parseJson2); + convert.hcg.hsv = function(hcg) { + var c2 = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c2 + g * (1 - c2); + var f = 0; + if (v > 0) { + f = c2 / v; } + return [hcg[0], f * 100, v * 100]; }; - var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, ""); - module.exports = parseJson2; - parseJson2.JSONParseError = JSONParseError; - parseJson2.noExceptions = (txt, reviver) => { - try { - return JSON.parse(stripBOM(txt), reviver); - } catch (e) { + convert.hcg.hsl = function(hcg) { + var c2 = hcg[1] / 100; + var g = hcg[2] / 100; + var l = g * (1 - c2) + 0.5 * c2; + var s = 0; + if (l > 0 && l < 0.5) { + s = c2 / (2 * l); + } else if (l >= 0.5 && l < 1) { + s = c2 / (2 * (1 - l)); } + return [hcg[0], s * 100, l * 100]; }; - } -}); - -// node_modules/ignore/index.js -var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports, module) { - function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; - } - var EMPTY = ""; - var SPACE = " "; - var ESCAPE = "\\"; - var REGEX_TEST_BLANK_LINE = /^\s+$/; - var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; - var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; - var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; - var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; - var SLASH = "/"; - var TMP_KEY_IGNORE = "node-ignore"; - if (typeof Symbol !== "undefined") { - TMP_KEY_IGNORE = Symbol.for("node-ignore"); - } - var KEY_IGNORE = TMP_KEY_IGNORE; - var define = (object, key, value) => Object.defineProperty(object, key, { value }); - var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; - var RETURN_FALSE = () => false; - var sanitizeRange = (range) => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY - ); - var cleanRangeBackSlash = (slashes) => { - const { length } = slashes; - return slashes.slice(0, length - length % 2); + convert.hcg.hwb = function(hcg) { + var c2 = hcg[1] / 100; + var g = hcg[2] / 100; + var v = c2 + g * (1 - c2); + return [hcg[0], (v - c2) * 100, (1 - v) * 100]; }; - var REPLACERS = [ - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY - ], - // replace (\ ) with ' ' - [ - /\\\s/g, - () => SPACE - ], - // Escape metacharacters - // which is written down by users but means special for regular expressions. - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - (match) => `\\${match}` - ], - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => "[^/]" - ], - // leading slash - [ - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => "^" - ], - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => "\\/" - ], - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - // '**/foo' <-> 'foo' - () => "^(?:.*\\/)?" - ], - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer() { - return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; - } - ], - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - // Check if it is not the last `'/**'` - (_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+" - ], - // normal intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - // 'abc.*/' -> go - // 'abc.*' -> skip this rule, - // coz trailing single wildcard will be handed by [trailing wildcard] - /(^|[^\\]+)(\\\*)+(?=.+)/g, - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_, p1, p2) => { - const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); - return p1 + unescaped; - } - ], - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" - ], - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } - ] - ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; + convert.hwb.hcg = function(hwb) { + var w = hwb[1] / 100; + var b = hwb[2] / 100; + var v = 1 - b; + var c2 = v - w; + var g = 0; + if (c2 < 1) { + g = (v - c2) / (1 - c2); } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); + return [hwb[0], c2 * 100, g * 100]; }; - var isString = (subject) => typeof subject === "string"; - var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); - var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; - this.pattern = pattern; - this.negative = negative; - this.regex = regex; - } + convert.apple.rgb = function(apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; - let negative = false; - if (pattern.indexOf("!") === 0) { - negative = true; - pattern = pattern.substr(1); - } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); - return new IgnoreRule( - origin, - pattern, - negative, - regex - ); + convert.rgb.apple = function(rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; }; - var throwError = (message, Ctor) => { - throw new Ctor(message); + convert.gray.rgb = function(args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; - var checkPath = (path9, originalPath, doThrow) => { - if (!isString(path9)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path9) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path9)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; + convert.gray.hsl = convert.gray.hsv = function(args) { + return [0, 0, args[0]]; }; - var isNotRelative = (path9) => REGEX_TEST_INVALID_PATH.test(path9); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define(this, KEY_IGNORE, true); - this._rules = []; - this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); - } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); + convert.gray.hwb = function(gray) { + return [0, 100, gray[0]]; + }; + convert.gray.cmyk = function(gray) { + return [0, 0, 0, gray[0]]; + }; + convert.gray.lab = function(gray) { + return [gray[0], 0, 0]; + }; + convert.gray.hex = function(gray) { + var val = Math.round(gray[0] / 100 * 255) & 255; + var integer = (val << 16) + (val << 8) + val; + var string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert.rgb.gray = function(rgb) { + var val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; + }; + } +}); + +// node_modules/color-convert/route.js +var require_route = __commonJS({ + "node_modules/color-convert/route.js"(exports, module) { + var conversions = require_conversions(); + function buildGraph() { + var graph = {}; + var models = Object.keys(conversions); + for (var len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; } - _addPattern(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignoreCase); - this._added = true; - this._rules.push(rule); - } - } - // @param {Array | string | Ignore} pattern - add(pattern) { - this._added = false; - makeArray( - isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { - this._initCache(); + return graph; + } + function deriveBFS(fromModel) { + var graph = buildGraph(); + var queue = [fromModel]; + graph[fromModel].distance = 0; + while (queue.length) { + var current = queue.pop(); + var adjacents = Object.keys(conversions[current]); + for (var len = adjacents.length, i = 0; i < len; i++) { + var adjacent = adjacents[i]; + var node = graph[adjacent]; + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } } - return this; } - // legacy - addPattern(pattern) { - return this.add(pattern); + return graph; + } + function link(from, to) { + return function(args) { + return to(from(args)); + }; + } + function wrapConversion(toModel, graph) { + var path13 = [graph[toModel].parent, toModel]; + var fn = conversions[graph[toModel].parent][toModel]; + var cur = graph[toModel].parent; + while (graph[cur].parent) { + path13.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path9, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path9); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; + fn.conversion = path13; + return fn; + } + module.exports = function(fromModel) { + var graph = deriveBFS(fromModel); + var conversion = {}; + var models = Object.keys(graph); + for (var len = models.length, i = 0; i < len; i++) { + var toModel = models[i]; + var node = graph[toModel]; + if (node.parent === null) { + continue; + } + conversion[toModel] = wrapConversion(toModel, graph); } - // @returns {TestResult} - _test(originalPath, cache2, checkUnignored, slices) { - const path9 = originalPath && checkPath.convert(originalPath); - checkPath( - path9, - originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError - ); - return this._t(path9, cache2, checkUnignored, slices); + return conversion; + }; + } +}); + +// node_modules/color-convert/index.js +var require_color_convert = __commonJS({ + "node_modules/color-convert/index.js"(exports, module) { + var conversions = require_conversions(); + var route = require_route(); + var convert = {}; + var models = Object.keys(conversions); + function wrapRaw(fn) { + var wrappedFn = function(args) { + if (args === void 0 || args === null) { + return args; + } + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); + } + return fn(args); + }; + if ("conversion" in fn) { + wrappedFn.conversion = fn.conversion; } - _t(path9, cache2, checkUnignored, slices) { - if (path9 in cache2) { - return cache2[path9]; + return wrappedFn; + } + function wrapRounded(fn) { + var wrappedFn = function(args) { + if (args === void 0 || args === null) { + return args; } - if (!slices) { - slices = path9.split(SLASH); + if (arguments.length > 1) { + args = Array.prototype.slice.call(arguments); } - slices.pop(); - if (!slices.length) { - return cache2[path9] = this._testOne(path9, checkUnignored); + var result = fn(args); + if (typeof result === "object") { + for (var len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache2, - checkUnignored, - slices - ); - return cache2[path9] = parent.ignored ? parent : this._testOne(path9, checkUnignored); - } - ignores(path9) { - return this._test(path9, this._ignoreCache, false).ignored; - } - createFilter() { - return (path9) => !this.ignores(path9); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path9) { - return this._test(path9, this._testCache, true); + return result; + }; + if ("conversion" in fn) { + wrappedFn.conversion = fn.conversion; } - }; - var factory = (options8) => new Ignore(options8); - var isPathValid = (path9) => checkPath(path9 && checkPath.convert(path9), path9, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { - const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"); - checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path9) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path9) || isNotRelative(path9); + return wrappedFn; } + models.forEach(function(fromModel) { + convert[fromModel] = {}; + Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); + Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); + var routes = route(fromModel); + var routeModels = Object.keys(routes); + routeModels.forEach(function(toModel) { + var fn = routes[toModel]; + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); + }); + module.exports = convert; } }); -// src/index.js -var src_exports = {}; -__export(src_exports, { - __debug: () => debugApis, - __internal: () => sharedWithCli, - check: () => check, - clearConfigCache: () => clearCache3, - doc: () => doc, - format: () => format2, - formatWithCursor: () => formatWithCursor2, - getFileInfo: () => getFileInfo2, - getSupportInfo: () => getSupportInfo2, - resolveConfig: () => resolveConfig, - resolveConfigFile: () => resolveConfigFile, - util: () => public_exports, - version: () => version_evaluate_default -}); - -// node_modules/vnopts/lib/descriptors/api.js -var apiDescriptor = { - key: (key) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(key) ? key : JSON.stringify(key), - value(value) { - if (value === null || typeof value !== "object") { - return JSON.stringify(value); - } - if (Array.isArray(value)) { - return `[${value.map((subValue) => apiDescriptor.value(subValue)).join(", ")}]`; - } - const keys = Object.keys(value); - return keys.length === 0 ? "{}" : `{ ${keys.map((key) => `${apiDescriptor.key(key)}: ${apiDescriptor.value(value[key])}`).join(", ")} }`; - }, - pair: ({ key, value }) => apiDescriptor.value({ [key]: value }) -}; - -// node_modules/chalk/source/vendor/ansi-styles/index.js -var ANSI_BACKGROUND_OFFSET = 10; -var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`; -var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`; -var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`; -var styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - overline: [53, 55], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - // Bright color - blackBright: [90, 39], - gray: [90, 39], - // Alias of `blackBright` - grey: [90, 39], - // Alias of `blackBright` - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - // Bright color - bgBlackBright: [100, 49], - bgGray: [100, 49], - // Alias of `bgBlackBright` - bgGrey: [100, 49], - // Alias of `bgBlackBright` - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } -}; -var modifierNames = Object.keys(styles.modifier); -var foregroundColorNames = Object.keys(styles.color); -var backgroundColorNames = Object.keys(styles.bgColor); -var colorNames = [...foregroundColorNames, ...backgroundColorNames]; -function assembleStyles() { - const codes2 = /* @__PURE__ */ new Map(); - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\x1B[${style[0]}m`, - close: `\x1B[${style[1]}m` - }; - group[styleName] = styles[styleName]; - codes2.set(style[0], style[1]); - } - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - Object.defineProperty(styles, "codes", { - value: codes2, - enumerable: false - }); - styles.color.close = "\x1B[39m"; - styles.bgColor.close = "\x1B[49m"; - styles.color.ansi = wrapAnsi16(); - styles.color.ansi256 = wrapAnsi256(); - styles.color.ansi16m = wrapAnsi16m(); - styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); - Object.defineProperties(styles, { - rgbToAnsi256: { - value(red, green, blue) { - if (red === green && green === blue) { - if (red < 8) { - return 16; - } - if (red > 248) { - return 231; - } - return Math.round((red - 8) / 247 * 24) + 232; - } - return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5); - }, - enumerable: false - }, - hexToRgb: { - value(hex) { - const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); - if (!matches) { - return [0, 0, 0]; +// node_modules/@babel/code-frame/node_modules/ansi-styles/index.js +var require_ansi_styles = __commonJS({ + "node_modules/@babel/code-frame/node_modules/ansi-styles/index.js"(exports, module) { + "use strict"; + var colorConvert = require_color_convert(); + var wrapAnsi162 = (fn, offset) => function() { + const code = fn.apply(colorConvert, arguments); + return `\x1B[${code + offset}m`; + }; + var wrapAnsi2562 = (fn, offset) => function() { + const code = fn.apply(colorConvert, arguments); + return `\x1B[${38 + offset};5;${code}m`; + }; + var wrapAnsi16m2 = (fn, offset) => function() { + const rgb = fn.apply(colorConvert, arguments); + return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; + }; + function assembleStyles2() { + const codes2 = /* @__PURE__ */ new Map(); + const styles3 = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + // Bright color + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] } - let [colorString] = matches; - if (colorString.length === 3) { - colorString = [...colorString].map((character) => character + character).join(""); + }; + styles3.color.grey = styles3.color.gray; + for (const groupName of Object.keys(styles3)) { + const group = styles3[groupName]; + for (const styleName of Object.keys(group)) { + const style = group[styleName]; + styles3[styleName] = { + open: `\x1B[${style[0]}m`, + close: `\x1B[${style[1]}m` + }; + group[styleName] = styles3[styleName]; + codes2.set(style[0], style[1]); } - const integer = Number.parseInt(colorString, 16); - return [ - /* eslint-disable no-bitwise */ - integer >> 16 & 255, - integer >> 8 & 255, - integer & 255 - /* eslint-enable no-bitwise */ - ]; - }, - enumerable: false - }, - hexToAnsi256: { - value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), - enumerable: false - }, - ansi256ToAnsi: { - value(code) { - if (code < 8) { - return 30 + code; + Object.defineProperty(styles3, groupName, { + value: group, + enumerable: false + }); + Object.defineProperty(styles3, "codes", { + value: codes2, + enumerable: false + }); + } + const ansi2ansi = (n) => n; + const rgb2rgb = (r, g, b) => [r, g, b]; + styles3.color.close = "\x1B[39m"; + styles3.bgColor.close = "\x1B[49m"; + styles3.color.ansi = { + ansi: wrapAnsi162(ansi2ansi, 0) + }; + styles3.color.ansi256 = { + ansi256: wrapAnsi2562(ansi2ansi, 0) + }; + styles3.color.ansi16m = { + rgb: wrapAnsi16m2(rgb2rgb, 0) + }; + styles3.bgColor.ansi = { + ansi: wrapAnsi162(ansi2ansi, 10) + }; + styles3.bgColor.ansi256 = { + ansi256: wrapAnsi2562(ansi2ansi, 10) + }; + styles3.bgColor.ansi16m = { + rgb: wrapAnsi16m2(rgb2rgb, 10) + }; + for (let key2 of Object.keys(colorConvert)) { + if (typeof colorConvert[key2] !== "object") { + continue; } - if (code < 16) { - return 90 + (code - 8); + const suite = colorConvert[key2]; + if (key2 === "ansi16") { + key2 = "ansi"; } - let red; - let green; - let blue; - if (code >= 232) { - red = ((code - 232) * 10 + 8) / 255; - green = red; - blue = red; - } else { - code -= 16; - const remainder = code % 36; - red = Math.floor(code / 36) / 5; - green = Math.floor(remainder / 6) / 5; - blue = remainder % 6 / 5; + if ("ansi16" in suite) { + styles3.color.ansi[key2] = wrapAnsi162(suite.ansi16, 0); + styles3.bgColor.ansi[key2] = wrapAnsi162(suite.ansi16, 10); } - const value = Math.max(red, green, blue) * 2; - if (value === 0) { - return 30; + if ("ansi256" in suite) { + styles3.color.ansi256[key2] = wrapAnsi2562(suite.ansi256, 0); + styles3.bgColor.ansi256[key2] = wrapAnsi2562(suite.ansi256, 10); } - let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red)); - if (value === 2) { - result += 60; + if ("rgb" in suite) { + styles3.color.ansi16m[key2] = wrapAnsi16m2(suite.rgb, 0); + styles3.bgColor.ansi16m[key2] = wrapAnsi16m2(suite.rgb, 10); } - return result; - }, - enumerable: false - }, - rgbToAnsi: { - value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), - enumerable: false - }, - hexToAnsi: { - value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), - enumerable: false + } + return styles3; } - }); - return styles; -} -var ansiStyles = assembleStyles(); -var ansi_styles_default = ansiStyles; + Object.defineProperty(module, "exports", { + enumerable: true, + get: assembleStyles2 + }); + } +}); -// node_modules/chalk/source/vendor/supports-color/index.js -import process2 from "process"; -import os from "os"; -import tty from "tty"; -function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) { - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf("--"); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -} -var { env } = process2; -var flagForceColor; -if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { - flagForceColor = 0; -} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { - flagForceColor = 1; -} -function envForceColor() { - if ("FORCE_COLOR" in env) { - if (env.FORCE_COLOR === "true") { - return 1; +// node_modules/@babel/code-frame/node_modules/has-flag/index.js +var require_has_flag = __commonJS({ + "node_modules/@babel/code-frame/node_modules/has-flag/index.js"(exports, module) { + "use strict"; + module.exports = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const pos2 = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf("--"); + return pos2 !== -1 && (terminatorPos === -1 ? true : pos2 < terminatorPos); + }; + } +}); + +// node_modules/@babel/code-frame/node_modules/supports-color/index.js +var require_supports_color = __commonJS({ + "node_modules/@babel/code-frame/node_modules/supports-color/index.js"(exports, module) { + "use strict"; + var os2 = __require("os"); + var hasFlag2 = require_has_flag(); + var env2 = process.env; + var forceColor; + if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false")) { + forceColor = false; + } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) { + forceColor = true; } - if (env.FORCE_COLOR === "false") { - return 0; + if ("FORCE_COLOR" in env2) { + forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0; } - return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); - } -} -function translateLevel(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} -function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { - const noFlagForceColor = envForceColor(); - if (noFlagForceColor !== void 0) { - flagForceColor = noFlagForceColor; - } - const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; - if (forceColor === 0) { - return 0; - } - if (sniffFlags) { - if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { - return 3; + function translateLevel2(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; } - if (hasFlag("color=256")) { - return 2; + function supportsColor2(stream) { + if (forceColor === false) { + return 0; + } + if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) { + return 3; + } + if (hasFlag2("color=256")) { + return 2; + } + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + const min = forceColor ? 1 : 0; + if (process.platform === "win32") { + const osRelease = os2.release().split("."); + if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env2) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign2) => sign2 in env2) || env2.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env2) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0; + } + if (env2.COLORTERM === "truecolor") { + return 3; + } + if ("TERM_PROGRAM" in env2) { + const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env2.TERM_PROGRAM) { + case "iTerm.app": + return version >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; + } + } + if (/-256(color)?$/i.test(env2.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) { + return 1; + } + if ("COLORTERM" in env2) { + return 1; + } + if (env2.TERM === "dumb") { + return min; + } + return min; } - } - if ("TF_BUILD" in env && "AGENT_NAME" in env) { - return 1; - } - if (haveStream && !streamIsTTY && forceColor === void 0) { - return 0; - } - const min = forceColor || 0; - if (env.TERM === "dumb") { - return min; - } - if (process2.platform === "win32") { - const osRelease = os.release().split("."); - if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; + function getSupportLevel(stream) { + const level = supportsColor2(stream); + return translateLevel2(level); } - return 1; + module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) + }; } - if ("CI" in env) { - if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) { - return 3; +}); + +// node_modules/@babel/code-frame/node_modules/chalk/templates.js +var require_templates = __commonJS({ + "node_modules/@babel/code-frame/node_modules/chalk/templates.js"(exports, module) { + "use strict"; + var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; + var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; + var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; + var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; + var ESCAPES = /* @__PURE__ */ new Map([ + ["n", "\n"], + ["r", "\r"], + ["t", " "], + ["b", "\b"], + ["f", "\f"], + ["v", "\v"], + ["0", "\0"], + ["\\", "\\"], + ["e", "\x1B"], + ["a", "\x07"] + ]); + function unescape(c2) { + if (c2[0] === "u" && c2.length === 5 || c2[0] === "x" && c2.length === 3) { + return String.fromCharCode(parseInt(c2.slice(1), 16)); + } + return ESCAPES.get(c2) || c2; } - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { - return 1; + function parseArguments(name, args) { + const results = []; + const chunks = args.trim().split(/\s*,\s*/g); + let matches; + for (const chunk of chunks) { + if (!isNaN(chunk)) { + results.push(Number(chunk)); + } else if (matches = chunk.match(STRING_REGEX)) { + results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, chr) => escape2 ? unescape(escape2) : chr)); + } else { + throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); + } + } + return results; } - return min; - } - if ("TEAMCITY_VERSION" in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - if (env.COLORTERM === "truecolor") { - return 3; - } - if (env.TERM === "xterm-kitty") { - return 3; - } - if ("TERM_PROGRAM" in env) { - const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env.TERM_PROGRAM) { - case "iTerm.app": { - return version >= 3 ? 3 : 2; + function parseStyle(style) { + STYLE_REGEX.lastIndex = 0; + const results = []; + let matches; + while ((matches = STYLE_REGEX.exec(style)) !== null) { + const name = matches[1]; + if (matches[2]) { + const args = parseArguments(name, matches[2]); + results.push([name].concat(args)); + } else { + results.push([name]); + } } - case "Apple_Terminal": { - return 2; + return results; + } + function buildStyle(chalk2, styles3) { + const enabled = {}; + for (const layer of styles3) { + for (const style of layer.styles) { + enabled[style[0]] = layer.inverse ? null : style.slice(1); + } } + let current = chalk2; + for (const styleName of Object.keys(enabled)) { + if (Array.isArray(enabled[styleName])) { + if (!(styleName in current)) { + throw new Error(`Unknown Chalk style: ${styleName}`); + } + if (enabled[styleName].length > 0) { + current = current[styleName].apply(current, enabled[styleName]); + } else { + current = current[styleName]; + } + } + } + return current; } + module.exports = (chalk2, tmp) => { + const styles3 = []; + const chunks = []; + let chunk = []; + tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => { + if (escapeChar) { + chunk.push(unescape(escapeChar)); + } else if (style) { + const str2 = chunk.join(""); + chunk = []; + chunks.push(styles3.length === 0 ? str2 : buildStyle(chalk2, styles3)(str2)); + styles3.push({ inverse, styles: parseStyle(style) }); + } else if (close) { + if (styles3.length === 0) { + throw new Error("Found extraneous } in Chalk template literal"); + } + chunks.push(buildStyle(chalk2, styles3)(chunk.join(""))); + chunk = []; + styles3.pop(); + } else { + chunk.push(chr); + } + }); + chunks.push(chunk.join("")); + if (styles3.length > 0) { + const errMsg = `Chalk template literal is missing ${styles3.length} closing bracket${styles3.length === 1 ? "" : "s"} (\`}\`)`; + throw new Error(errMsg); + } + return chunks.join(""); + }; } - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - if ("COLORTERM" in env) { - return 1; - } - return min; -} -function createSupportsColor(stream, options8 = {}) { - const level = _supportsColor(stream, { - streamIsTTY: stream && stream.isTTY, - ...options8 - }); - return translateLevel(level); -} -var supportsColor = { - stdout: createSupportsColor({ isTTY: tty.isatty(1) }), - stderr: createSupportsColor({ isTTY: tty.isatty(2) }) -}; -var supports_color_default = supportsColor; - -// node_modules/chalk/source/utilities.js -function stringReplaceAll(string, substring, replacer) { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ""; - do { - returnValue += string.slice(endIndex, index) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - returnValue += string.slice(endIndex); - return returnValue; -} -function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) { - let endIndex = 0; - let returnValue = ""; - do { - const gotCR = string[index - 1] === "\r"; - returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix; - endIndex = index + 1; - index = string.indexOf("\n", endIndex); - } while (index !== -1); - returnValue += string.slice(endIndex); - return returnValue; -} +}); -// node_modules/chalk/source/index.js -var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default; -var GENERATOR = Symbol("GENERATOR"); -var STYLER = Symbol("STYLER"); -var IS_EMPTY = Symbol("IS_EMPTY"); -var levelMapping = [ - "ansi", - "ansi", - "ansi256", - "ansi16m" -]; -var styles2 = /* @__PURE__ */ Object.create(null); -var applyOptions = (object, options8 = {}) => { - if (options8.level && !(Number.isInteger(options8.level) && options8.level >= 0 && options8.level <= 3)) { - throw new Error("The `level` option should be an integer from 0 to 3"); - } - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options8.level === void 0 ? colorLevel : options8.level; -}; -var chalkFactory = (options8) => { - const chalk2 = (...strings) => strings.join(" "); - applyOptions(chalk2, options8); - Object.setPrototypeOf(chalk2, createChalk.prototype); - return chalk2; -}; -function createChalk(options8) { - return chalkFactory(options8); -} -Object.setPrototypeOf(createChalk.prototype, Function.prototype); -for (const [styleName, style] of Object.entries(ansi_styles_default)) { - styles2[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]); - Object.defineProperty(this, styleName, { value: builder }); - return builder; +// node_modules/@babel/code-frame/node_modules/chalk/index.js +var require_chalk = __commonJS({ + "node_modules/@babel/code-frame/node_modules/chalk/index.js"(exports, module) { + "use strict"; + var escapeStringRegexp2 = require_escape_string_regexp(); + var ansiStyles2 = require_ansi_styles(); + var stdoutColor2 = require_supports_color().stdout; + var template = require_templates(); + var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm"); + var levelMapping2 = ["ansi", "ansi", "ansi256", "ansi16m"]; + var skipModels = /* @__PURE__ */ new Set(["gray"]); + var styles3 = /* @__PURE__ */ Object.create(null); + function applyOptions2(obj, options8) { + options8 = options8 || {}; + const scLevel = stdoutColor2 ? stdoutColor2.level : 0; + obj.level = options8.level === void 0 ? scLevel : options8.level; + obj.enabled = "enabled" in options8 ? options8.enabled : obj.level > 0; } - }; -} -styles2.visible = { - get() { - const builder = createBuilder(this, this[STYLER], true); - Object.defineProperty(this, "visible", { value: builder }); - return builder; - } -}; -var getModelAnsi = (model, level, type, ...arguments_) => { - if (model === "rgb") { - if (level === "ansi16m") { - return ansi_styles_default[type].ansi16m(...arguments_); + function Chalk(options8) { + if (!this || !(this instanceof Chalk) || this.template) { + const chalk2 = {}; + applyOptions2(chalk2, options8); + chalk2.template = function() { + const args = [].slice.call(arguments); + return chalkTag.apply(null, [chalk2.template].concat(args)); + }; + Object.setPrototypeOf(chalk2, Chalk.prototype); + Object.setPrototypeOf(chalk2.template, chalk2); + chalk2.template.constructor = Chalk; + return chalk2.template; + } + applyOptions2(this, options8); } - if (level === "ansi256") { - return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_)); + if (isSimpleWindowsTerm) { + ansiStyles2.blue.open = "\x1B[94m"; } - return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_)); - } - if (model === "hex") { - return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_)); - } - return ansi_styles_default[type][model](...arguments_); -}; -var usedModels = ["rgb", "hex", "ansi256"]; -for (const model of usedModels) { - styles2[model] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]); - return createBuilder(this, styler, this[IS_EMPTY]); + for (const key2 of Object.keys(ansiStyles2)) { + ansiStyles2[key2].closeRe = new RegExp(escapeStringRegexp2(ansiStyles2[key2].close), "g"); + styles3[key2] = { + get() { + const codes2 = ansiStyles2[key2]; + return build.call(this, this._styles ? this._styles.concat(codes2) : [codes2], this._empty, key2); + } }; } - }; - const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); - styles2[bgModel] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]); - return createBuilder(this, styler, this[IS_EMPTY]); + styles3.visible = { + get() { + return build.call(this, this._styles || [], true, "visible"); + } + }; + ansiStyles2.color.closeRe = new RegExp(escapeStringRegexp2(ansiStyles2.color.close), "g"); + for (const model of Object.keys(ansiStyles2.color.ansi)) { + if (skipModels.has(model)) { + continue; + } + styles3[model] = { + get() { + const level = this.level; + return function() { + const open = ansiStyles2.color[levelMapping2[level]][model].apply(null, arguments); + const codes2 = { + open, + close: ansiStyles2.color.close, + closeRe: ansiStyles2.color.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes2) : [codes2], this._empty, model); + }; + } }; } - }; -} -var proto = Object.defineProperties(() => { -}, { - ...styles2, - level: { - enumerable: true, - get() { - return this[GENERATOR].level; - }, - set(level) { - this[GENERATOR].level = level; + ansiStyles2.bgColor.closeRe = new RegExp(escapeStringRegexp2(ansiStyles2.bgColor.close), "g"); + for (const model of Object.keys(ansiStyles2.bgColor.ansi)) { + if (skipModels.has(model)) { + continue; + } + const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); + styles3[bgModel] = { + get() { + const level = this.level; + return function() { + const open = ansiStyles2.bgColor[levelMapping2[level]][model].apply(null, arguments); + const codes2 = { + open, + close: ansiStyles2.bgColor.close, + closeRe: ansiStyles2.bgColor.closeRe + }; + return build.call(this, this._styles ? this._styles.concat(codes2) : [codes2], this._empty, model); + }; + } + }; } - } -}); -var createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === void 0) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - return { - open, - close, - openAll, - closeAll, - parent - }; -}; -var createBuilder = (self, _styler, _isEmpty) => { - const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); - Object.setPrototypeOf(builder, proto); - builder[GENERATOR] = self; - builder[STYLER] = _styler; - builder[IS_EMPTY] = _isEmpty; - return builder; -}; -var applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self[IS_EMPTY] ? "" : string; - } - let styler = self[STYLER]; - if (styler === void 0) { - return string; - } - const { openAll, closeAll } = styler; - if (string.includes("\x1B")) { - while (styler !== void 0) { - string = stringReplaceAll(string, styler.close, styler.open); - styler = styler.parent; + var proto2 = Object.defineProperties(() => { + }, styles3); + function build(_styles, _empty, key2) { + const builder = function() { + return applyStyle2.apply(builder, arguments); + }; + builder._styles = _styles; + builder._empty = _empty; + const self = this; + Object.defineProperty(builder, "level", { + enumerable: true, + get() { + return self.level; + }, + set(level) { + self.level = level; + } + }); + Object.defineProperty(builder, "enabled", { + enumerable: true, + get() { + return self.enabled; + }, + set(enabled) { + self.enabled = enabled; + } + }); + builder.hasGrey = this.hasGrey || key2 === "gray" || key2 === "grey"; + builder.__proto__ = proto2; + return builder; } - } - const lfIndex = string.indexOf("\n"); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - return openAll + string + closeAll; -}; -Object.defineProperties(createChalk.prototype, styles2); -var chalk = createChalk(); -var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 }); -var source_default = chalk; - -// node_modules/vnopts/lib/handlers/deprecated/common.js -var commonDeprecatedHandler = (keyOrPair, redirectTo, { descriptor }) => { - const messages2 = [ - `${source_default.yellow(typeof keyOrPair === "string" ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair))} is deprecated` - ]; - if (redirectTo) { - messages2.push(`we now treat it as ${source_default.blue(typeof redirectTo === "string" ? descriptor.key(redirectTo) : descriptor.pair(redirectTo))}`); - } - return messages2.join("; ") + "."; -}; - -// node_modules/vnopts/lib/constants.js -var VALUE_NOT_EXIST = Symbol.for("vnopts.VALUE_NOT_EXIST"); -var VALUE_UNCHANGED = Symbol.for("vnopts.VALUE_UNCHANGED"); - -// node_modules/vnopts/lib/handlers/invalid/common.js -var INDENTATION = " ".repeat(2); -var commonInvalidHandler = (key, value, utils) => { - const { text, list } = utils.normalizeExpectedResult(utils.schemas[key].expected(utils)); - const descriptions = []; - if (text) { - descriptions.push(getDescription(key, value, text, utils.descriptor)); - } - if (list) { - descriptions.push([getDescription(key, value, list.title, utils.descriptor)].concat(list.values.map((valueDescription) => getListDescription(valueDescription, utils.loggerPrintWidth))).join("\n")); - } - return chooseDescription(descriptions, utils.loggerPrintWidth); -}; -function getDescription(key, value, expected, descriptor) { - return [ - `Invalid ${source_default.red(descriptor.key(key))} value.`, - `Expected ${source_default.blue(expected)},`, - `but received ${value === VALUE_NOT_EXIST ? source_default.gray("nothing") : source_default.red(descriptor.value(value))}.` - ].join(" "); -} -function getListDescription({ text, list }, printWidth) { - const descriptions = []; - if (text) { - descriptions.push(`- ${source_default.blue(text)}`); - } - if (list) { - descriptions.push([`- ${source_default.blue(list.title)}:`].concat(list.values.map((valueDescription) => getListDescription(valueDescription, printWidth - INDENTATION.length).replace(/^|\n/g, `$&${INDENTATION}`))).join("\n")); - } - return chooseDescription(descriptions, printWidth); -} -function chooseDescription(descriptions, printWidth) { - if (descriptions.length === 1) { - return descriptions[0]; - } - const [firstDescription, secondDescription] = descriptions; - const [firstWidth, secondWidth] = descriptions.map((description) => description.split("\n", 1)[0].length); - return firstWidth > printWidth && firstWidth > secondWidth ? secondDescription : firstDescription; -} - -// node_modules/leven/index.js -var array = []; -var characterCodeCache = []; -function leven(first, second) { - if (first === second) { - return 0; - } - const swap = first; - if (first.length > second.length) { - first = second; - second = swap; - } - let firstLength = first.length; - let secondLength = second.length; - while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) { - firstLength--; - secondLength--; - } - let start = 0; - while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) { - start++; - } - firstLength -= start; - secondLength -= start; - if (firstLength === 0) { - return secondLength; - } - let bCharacterCode; - let result; - let temporary; - let temporary2; - let index = 0; - let index2 = 0; - while (index < firstLength) { - characterCodeCache[index] = first.charCodeAt(start + index); - array[index] = ++index; - } - while (index2 < secondLength) { - bCharacterCode = second.charCodeAt(start + index2); - temporary = index2++; - result = index2; - for (index = 0; index < firstLength; index++) { - temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1; - temporary = array[index]; - result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2; + function applyStyle2() { + const args = arguments; + const argsLen = args.length; + let str2 = String(arguments[0]); + if (argsLen === 0) { + return ""; + } + if (argsLen > 1) { + for (let a = 1; a < argsLen; a++) { + str2 += " " + args[a]; + } + } + if (!this.enabled || this.level <= 0 || !str2) { + return this._empty ? "" : str2; + } + const originalDim = ansiStyles2.dim.open; + if (isSimpleWindowsTerm && this.hasGrey) { + ansiStyles2.dim.open = ""; + } + for (const code of this._styles.slice().reverse()) { + str2 = code.open + str2.replace(code.closeRe, code.open) + code.close; + str2 = str2.replace(/\r?\n/g, `${code.close}$&${code.open}`); + } + ansiStyles2.dim.open = originalDim; + return str2; } + function chalkTag(chalk2, strings) { + if (!Array.isArray(strings)) { + return [].slice.call(arguments, 1).join(" "); + } + const args = [].slice.call(arguments, 2); + const parts = [strings.raw[0]]; + for (let i = 1; i < strings.length; i++) { + parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&")); + parts.push(String(strings.raw[i])); + } + return template(chalk2, parts.join("")); + } + Object.defineProperties(Chalk.prototype, styles3); + module.exports = Chalk(); + module.exports.supportsColor = stdoutColor2; + module.exports.default = module.exports; } - return result; -} - -// node_modules/vnopts/lib/handlers/unknown/leven.js -var levenUnknownHandler = (key, value, { descriptor, logger, schemas }) => { - const messages2 = [ - `Ignored unknown option ${source_default.yellow(descriptor.pair({ key, value }))}.` - ]; - const suggestion = Object.keys(schemas).sort().find((knownKey) => leven(key, knownKey) < 3); - if (suggestion) { - messages2.push(`Did you mean ${source_default.blue(descriptor.key(suggestion))}?`); - } - logger.warn(messages2.join(" ")); -}; +}); -// node_modules/vnopts/lib/schema.js -var HANDLER_KEYS = [ - "default", - "expected", - "validate", - "deprecated", - "forward", - "redirect", - "overlap", - "preprocess", - "postprocess" -]; -function createSchema(SchemaConstructor, parameters) { - const schema = new SchemaConstructor(parameters); - const subSchema = Object.create(schema); - for (const handlerKey of HANDLER_KEYS) { - if (handlerKey in parameters) { - subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema, Schema.prototype[handlerKey].length); +// node_modules/@babel/highlight/lib/index.js +var require_lib2 = __commonJS({ + "node_modules/@babel/highlight/lib/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = highlight; + exports.shouldHighlight = shouldHighlight; + var _jsTokens = require_js_tokens(); + var _helperValidatorIdentifier = require_lib(); + var _chalk = _interopRequireWildcard(require_chalk(), true); + function _getRequireWildcardCache(e) { + if ("function" != typeof WeakMap) + return null; + var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(); + return (_getRequireWildcardCache = function(e2) { + return e2 ? t : r; + })(e); + } + function _interopRequireWildcard(e, r) { + if (!r && e && e.__esModule) + return e; + if (null === e || "object" != typeof e && "function" != typeof e) + return { default: e }; + var t = _getRequireWildcardCache(r); + if (t && t.has(e)) + return t.get(e); + var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var u in e) + if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { + var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; + i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; + } + return n.default = e, t && t.set(e, n), n; } - } - return subSchema; -} -var Schema = class { - static create(parameters) { - return createSchema(this, parameters); - } - constructor(parameters) { - this.name = parameters.name; - } - default(_utils) { - return void 0; - } - // this is actually an abstract method but we need a placeholder to get `function.length` - /* c8 ignore start */ - expected(_utils) { - return "nothing"; - } - /* c8 ignore stop */ - // this is actually an abstract method but we need a placeholder to get `function.length` - /* c8 ignore start */ - validate(_value, _utils) { - return false; - } - /* c8 ignore stop */ - deprecated(_value, _utils) { - return false; - } - forward(_value, _utils) { - return void 0; - } - redirect(_value, _utils) { - return void 0; - } - overlap(currentValue, _newValue, _utils) { - return currentValue; - } - preprocess(value, _utils) { - return value; - } - postprocess(_value, _utils) { - return VALUE_UNCHANGED; - } -}; -function normalizeHandler(handler, superSchema, handlerArgumentsLength) { - return typeof handler === "function" ? (...args) => handler(...args.slice(0, handlerArgumentsLength - 1), superSchema, ...args.slice(handlerArgumentsLength - 1)) : () => handler; -} - -// node_modules/vnopts/lib/schemas/alias.js -var AliasSchema = class extends Schema { - constructor(parameters) { - super(parameters); - this._sourceName = parameters.sourceName; - } - expected(utils) { - return utils.schemas[this._sourceName].expected(utils); - } - validate(value, utils) { - return utils.schemas[this._sourceName].validate(value, utils); - } - redirect(_value, _utils) { - return this._sourceName; - } -}; - -// node_modules/vnopts/lib/schemas/any.js -var AnySchema = class extends Schema { - expected() { - return "anything"; - } - validate() { - return true; - } -}; - -// node_modules/vnopts/lib/schemas/array.js -var ArraySchema = class extends Schema { - constructor({ valueSchema, name = valueSchema.name, ...handlers }) { - super({ ...handlers, name }); - this._valueSchema = valueSchema; - } - expected(utils) { - const { text, list } = utils.normalizeExpectedResult(this._valueSchema.expected(utils)); - return { - text: text && `an array of ${text}`, - list: list && { - title: `an array of the following values`, - values: [{ list }] - } - }; - } - validate(value, utils) { - if (!Array.isArray(value)) { - return false; + var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]); + function getDefs(chalk2) { + return { + keyword: chalk2.cyan, + capitalized: chalk2.yellow, + jsxIdentifier: chalk2.yellow, + punctuator: chalk2.yellow, + number: chalk2.magenta, + string: chalk2.green, + regex: chalk2.magenta, + comment: chalk2.grey, + invalid: chalk2.white.bgRed.bold + }; } - const invalidValues = []; - for (const subValue of value) { - const subValidateResult = utils.normalizeValidateResult(this._valueSchema.validate(subValue, utils), subValue); - if (subValidateResult !== true) { - invalidValues.push(subValidateResult.value); + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + var BRACKET = /^[()[\]{}]$/; + var tokenize; + { + const JSX_TAG = /^[a-z][\w-]*$/i; + const getTokenType = function(token2, offset, text) { + if (token2.type === "name") { + if ((0, _helperValidatorIdentifier.isKeyword)(token2.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token2.value, true) || sometimesKeywords.has(token2.value)) { + return "keyword"; + } + if (JSX_TAG.test(token2.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) == " colorize(str2)).join("\n"); + } else { + highlighted += value; + } } + return highlighted; } - return invalidValues.length === 0 ? true : { value: invalidValues }; - } - deprecated(value, utils) { - const deprecatedResult = []; - for (const subValue of value) { - const subDeprecatedResult = utils.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils), subValue); - if (subDeprecatedResult !== false) { - deprecatedResult.push(...subDeprecatedResult.map(({ value: deprecatedValue }) => ({ - value: [deprecatedValue] - }))); + function shouldHighlight(options8) { + return _chalk.default.level > 0 || options8.forceColor; + } + var chalkWithForcedColor = void 0; + function getChalk(forceColor) { + if (forceColor) { + var _chalkWithForcedColor; + (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({ + enabled: true, + level: 1 + }); + return chalkWithForcedColor; } + return _chalk.default; } - return deprecatedResult; - } - forward(value, utils) { - const forwardResult = []; - for (const subValue of value) { - const subForwardResult = utils.normalizeForwardResult(this._valueSchema.forward(subValue, utils), subValue); - forwardResult.push(...subForwardResult.map(wrapTransferResult)); + { + exports.getChalk = (options8) => getChalk(options8.forceColor); } - return forwardResult; - } - redirect(value, utils) { - const remain = []; - const redirect = []; - for (const subValue of value) { - const subRedirectResult = utils.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils), subValue); - if ("remain" in subRedirectResult) { - remain.push(subRedirectResult.remain); + function highlight(code, options8 = {}) { + if (code !== "" && shouldHighlight(options8)) { + const defs = getDefs(getChalk(options8.forceColor)); + return highlightTokens(defs, code); + } else { + return code; } - redirect.push(...subRedirectResult.redirect.map(wrapTransferResult)); } - return remain.length === 0 ? { redirect } : { redirect, remain }; - } - overlap(currentValue, newValue) { - return currentValue.concat(newValue); - } -}; -function wrapTransferResult({ from, to }) { - return { from: [from], to }; -} - -// node_modules/vnopts/lib/schemas/boolean.js -var BooleanSchema = class extends Schema { - expected() { - return "true or false"; - } - validate(value) { - return typeof value === "boolean"; } -}; +}); -// node_modules/vnopts/lib/utils.js -function recordFromArray(array2, mainKey) { - const record = /* @__PURE__ */ Object.create(null); - for (const value of array2) { - const key = value[mainKey]; - if (record[key]) { - throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key)}`); - } - record[key] = value; - } - return record; -} -function mapFromArray(array2, mainKey) { - const map = /* @__PURE__ */ new Map(); - for (const value of array2) { - const key = value[mainKey]; - if (map.has(key)) { - throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key)}`); +// node_modules/@babel/code-frame/lib/index.js +var require_lib3 = __commonJS({ + "node_modules/@babel/code-frame/lib/index.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.codeFrameColumns = codeFrameColumns3; + exports.default = _default2; + var _highlight = require_lib2(); + var _chalk = _interopRequireWildcard(require_chalk(), true); + function _getRequireWildcardCache(e) { + if ("function" != typeof WeakMap) + return null; + var r = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(); + return (_getRequireWildcardCache = function(e2) { + return e2 ? t : r; + })(e); + } + function _interopRequireWildcard(e, r) { + if (!r && e && e.__esModule) + return e; + if (null === e || "object" != typeof e && "function" != typeof e) + return { default: e }; + var t = _getRequireWildcardCache(r); + if (t && t.has(e)) + return t.get(e); + var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var u in e) + if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { + var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; + i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; + } + return n.default = e, t && t.set(e, n), n; } - map.set(key, value); - } - return map; -} -function createAutoChecklist() { - const map = /* @__PURE__ */ Object.create(null); - return (id) => { - const idString = JSON.stringify(id); - if (map[idString]) { - return true; + var chalkWithForcedColor = void 0; + function getChalk(forceColor) { + if (forceColor) { + var _chalkWithForcedColor; + (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({ + enabled: true, + level: 1 + }); + return chalkWithForcedColor; + } + return _chalk.default; } - map[idString] = true; - return false; - }; -} -function partition(array2, predicate) { - const trueArray = []; - const falseArray = []; - for (const value of array2) { - if (predicate(value)) { - trueArray.push(value); - } else { - falseArray.push(value); + var deprecationWarningShown = false; + function getDefs(chalk2) { + return { + gutter: chalk2.grey, + marker: chalk2.red.bold, + message: chalk2.red.bold + }; } - } - return [trueArray, falseArray]; -} -function isInt(value) { - return value === Math.floor(value); -} -function comparePrimitive(a, b) { - if (a === b) { - return 0; - } - const typeofA = typeof a; - const typeofB = typeof b; - const orders = [ - "undefined", - "object", - "boolean", - "number", - "string" - ]; - if (typeofA !== typeofB) { - return orders.indexOf(typeofA) - orders.indexOf(typeofB); - } - if (typeofA !== "string") { - return Number(a) - Number(b); - } - return a.localeCompare(b); -} -function normalizeInvalidHandler(invalidHandler) { - return (...args) => { - const errorMessageOrError = invalidHandler(...args); - return typeof errorMessageOrError === "string" ? new Error(errorMessageOrError) : errorMessageOrError; - }; -} -function normalizeDefaultResult(result) { - return result === void 0 ? {} : result; -} -function normalizeExpectedResult(result) { - if (typeof result === "string") { - return { text: result }; - } - const { text, list } = result; - assert((text || list) !== void 0, "Unexpected `expected` result, there should be at least one field."); - if (!list) { - return { text }; - } - return { - text, - list: { - title: list.title, - values: list.values.map(normalizeExpectedResult) - } - }; -} -function normalizeValidateResult(result, value) { - return result === true ? true : result === false ? { value } : result; -} -function normalizeDeprecatedResult(result, value, doNotNormalizeTrue = false) { - return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{ value }] : "value" in result ? [result] : result.length === 0 ? false : result; -} -function normalizeTransferResult(result, value) { - return typeof result === "string" || "key" in result ? { from: value, to: result } : "from" in result ? { from: result.from, to: result.to } : { from: value, to: result.to }; -} -function normalizeForwardResult(result, value) { - return result === void 0 ? [] : Array.isArray(result) ? result.map((transferResult) => normalizeTransferResult(transferResult, value)) : [normalizeTransferResult(result, value)]; -} -function normalizeRedirectResult(result, value) { - const redirect = normalizeForwardResult(typeof result === "object" && "redirect" in result ? result.redirect : result, value); - return redirect.length === 0 ? { remain: value, redirect } : typeof result === "object" && "remain" in result ? { remain: result.remain, redirect } : { redirect }; -} -function assert(isValid, message) { - if (!isValid) { - throw new Error(message); - } -} - -// node_modules/vnopts/lib/schemas/choice.js -var ChoiceSchema = class extends Schema { - constructor(parameters) { - super(parameters); - this._choices = mapFromArray(parameters.choices.map((choice) => choice && typeof choice === "object" ? choice : { value: choice }), "value"); - } - expected({ descriptor }) { - const choiceDescriptions = Array.from(this._choices.keys()).map((value) => this._choices.get(value)).filter(({ hidden }) => !hidden).map((choiceInfo) => choiceInfo.value).sort(comparePrimitive).map(descriptor.value); - const head = choiceDescriptions.slice(0, -2); - const tail = choiceDescriptions.slice(-2); - const message = head.concat(tail.join(" or ")).join(", "); - return { - text: message, - list: { - title: "one of the following values", - values: choiceDescriptions - } - }; - } - validate(value) { - return this._choices.has(value); - } - deprecated(value) { - const choiceInfo = this._choices.get(value); - return choiceInfo && choiceInfo.deprecated ? { value } : false; - } - forward(value) { - const choiceInfo = this._choices.get(value); - return choiceInfo ? choiceInfo.forward : void 0; - } - redirect(value) { - const choiceInfo = this._choices.get(value); - return choiceInfo ? choiceInfo.redirect : void 0; - } -}; - -// node_modules/vnopts/lib/schemas/number.js -var NumberSchema = class extends Schema { - expected() { - return "a number"; - } - validate(value, _utils) { - return typeof value === "number"; - } -}; - -// node_modules/vnopts/lib/schemas/integer.js -var IntegerSchema = class extends NumberSchema { - expected() { - return "an integer"; - } - validate(value, utils) { - return utils.normalizeValidateResult(super.validate(value, utils), value) === true && isInt(value); - } -}; - -// node_modules/vnopts/lib/schemas/string.js -var StringSchema = class extends Schema { - expected() { - return "a string"; - } - validate(value) { - return typeof value === "string"; - } -}; - -// node_modules/vnopts/lib/defaults.js -var defaultDescriptor = apiDescriptor; -var defaultUnknownHandler = levenUnknownHandler; -var defaultInvalidHandler = commonInvalidHandler; -var defaultDeprecatedHandler = commonDeprecatedHandler; - -// node_modules/vnopts/lib/normalize.js -var Normalizer = class { - constructor(schemas, opts) { - const { logger = console, loggerPrintWidth = 80, descriptor = defaultDescriptor, unknown = defaultUnknownHandler, invalid = defaultInvalidHandler, deprecated = defaultDeprecatedHandler, missing = () => false, required = () => false, preprocess = (x) => x, postprocess = () => VALUE_UNCHANGED } = opts || {}; - this._utils = { - descriptor, - logger: ( - /* c8 ignore next */ - logger || { warn: () => { - } } - ), - loggerPrintWidth, - schemas: recordFromArray(schemas, "name"), - normalizeDefaultResult, - normalizeExpectedResult, - normalizeDeprecatedResult, - normalizeForwardResult, - normalizeRedirectResult, - normalizeValidateResult - }; - this._unknownHandler = unknown; - this._invalidHandler = normalizeInvalidHandler(invalid); - this._deprecatedHandler = deprecated; - this._identifyMissing = (k, o) => !(k in o) || missing(k, o); - this._identifyRequired = required; - this._preprocess = preprocess; - this._postprocess = postprocess; - this.cleanHistory(); - } - cleanHistory() { - this._hasDeprecationWarned = createAutoChecklist(); - } - normalize(options8) { - const newOptions = {}; - const preprocessed = this._preprocess(options8, this._utils); - const restOptionsArray = [preprocessed]; - const applyNormalization = () => { - while (restOptionsArray.length !== 0) { - const currentOptions = restOptionsArray.shift(); - const transferredOptionsArray = this._applyNormalization(currentOptions, newOptions); - restOptionsArray.push(...transferredOptionsArray); - } - }; - applyNormalization(); - for (const key of Object.keys(this._utils.schemas)) { - const schema = this._utils.schemas[key]; - if (!(key in newOptions)) { - const defaultResult = normalizeDefaultResult(schema.default(this._utils)); - if ("value" in defaultResult) { - restOptionsArray.push({ [key]: defaultResult.value }); - } - } - } - applyNormalization(); - for (const key of Object.keys(this._utils.schemas)) { - if (!(key in newOptions)) { - continue; + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + function getMarkerLines(loc, source2, opts) { + const startLoc = Object.assign({ + column: 0, + line: -1 + }, loc.start); + const endLoc = Object.assign({}, startLoc, loc.end); + const { + linesAbove = 2, + linesBelow = 3 + } = opts || {}; + const startLine = startLoc.line; + const startColumn = startLoc.column; + const endLine = endLoc.line; + const endColumn = endLoc.column; + let start = Math.max(startLine - (linesAbove + 1), 0); + let end = Math.min(source2.length, endLine + linesBelow); + if (startLine === -1) { + start = 0; } - const schema = this._utils.schemas[key]; - const value = newOptions[key]; - const newValue = schema.postprocess(value, this._utils); - if (newValue === VALUE_UNCHANGED) { - continue; + if (endLine === -1) { + end = source2.length; } - this._applyValidation(newValue, key, schema); - newOptions[key] = newValue; - } - this._applyPostprocess(newOptions); - this._applyRequiredCheck(newOptions); - return newOptions; - } - _applyNormalization(options8, newOptions) { - const transferredOptionsArray = []; - const { knownKeys, unknownKeys } = this._partitionOptionKeys(options8); - for (const key of knownKeys) { - const schema = this._utils.schemas[key]; - const value = schema.preprocess(options8[key], this._utils); - this._applyValidation(value, key, schema); - const appendTransferredOptions = ({ from, to }) => { - transferredOptionsArray.push(typeof to === "string" ? { [to]: from } : { [to.key]: to.value }); - }; - const warnDeprecated = ({ value: currentValue, redirectTo }) => { - const deprecatedResult = normalizeDeprecatedResult( - schema.deprecated(currentValue, this._utils), - value, - /* doNotNormalizeTrue */ - true - ); - if (deprecatedResult === false) { - return; + const lineDiff = endLine - startLine; + const markerLines = {}; + if (lineDiff) { + for (let i = 0; i <= lineDiff; i++) { + const lineNumber = i + startLine; + if (!startColumn) { + markerLines[lineNumber] = true; + } else if (i === 0) { + const sourceLength = source2[lineNumber - 1].length; + markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; + } else if (i === lineDiff) { + markerLines[lineNumber] = [0, endColumn]; + } else { + const sourceLength = source2[lineNumber - i].length; + markerLines[lineNumber] = [0, sourceLength]; + } } - if (deprecatedResult === true) { - if (!this._hasDeprecationWarned(key)) { - this._utils.logger.warn(this._deprecatedHandler(key, redirectTo, this._utils)); + } else { + if (startColumn === endColumn) { + if (startColumn) { + markerLines[startLine] = [startColumn, 0]; + } else { + markerLines[startLine] = true; } } else { - for (const { value: deprecatedValue } of deprecatedResult) { - const pair = { key, value: deprecatedValue }; - if (!this._hasDeprecationWarned(pair)) { - const redirectToPair = typeof redirectTo === "string" ? { key: redirectTo, value: deprecatedValue } : redirectTo; - this._utils.logger.warn(this._deprecatedHandler(pair, redirectToPair, this._utils)); - } - } + markerLines[startLine] = [startColumn, endColumn - startColumn]; } - }; - const forwardResult = normalizeForwardResult(schema.forward(value, this._utils), value); - forwardResult.forEach(appendTransferredOptions); - const redirectResult = normalizeRedirectResult(schema.redirect(value, this._utils), value); - redirectResult.redirect.forEach(appendTransferredOptions); - if ("remain" in redirectResult) { - const remainingValue = redirectResult.remain; - newOptions[key] = key in newOptions ? schema.overlap(newOptions[key], remainingValue, this._utils) : remainingValue; - warnDeprecated({ value: remainingValue }); } - for (const { from, to } of redirectResult.redirect) { - warnDeprecated({ value: from, redirectTo: to }); - } - } - for (const key of unknownKeys) { - const value = options8[key]; - this._applyUnknownHandler(key, value, newOptions, (knownResultKey, knownResultValue) => { - transferredOptionsArray.push({ [knownResultKey]: knownResultValue }); - }); + return { + start, + end, + markerLines + }; } - return transferredOptionsArray; - } - _applyRequiredCheck(options8) { - for (const key of Object.keys(this._utils.schemas)) { - if (this._identifyMissing(key, options8)) { - if (this._identifyRequired(key)) { - throw this._invalidHandler(key, VALUE_NOT_EXIST, this._utils); + function codeFrameColumns3(rawLines, loc, opts = {}) { + const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts); + const chalk2 = getChalk(opts.forceColor); + const defs = getDefs(chalk2); + const maybeHighlight = (chalkFn, string) => { + return highlighted ? chalkFn(string) : string; + }; + const lines = rawLines.split(NEWLINE); + const { + start, + end, + markerLines + } = getMarkerLines(loc, lines, opts); + const hasColumns = loc.start && typeof loc.start.column === "number"; + const numberMaxWidth = String(end).length; + const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines; + let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line3, index) => { + const number = start + 1 + index; + const paddedNumber = ` ${number}`.slice(-numberMaxWidth); + const gutter = ` ${paddedNumber} |`; + const hasMarker = markerLines[number]; + const lastMarkerLine = !markerLines[number + 1]; + if (hasMarker) { + let markerLine = ""; + if (Array.isArray(hasMarker)) { + const markerSpacing = line3.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + const numberOfMarkers = hasMarker[1] || 1; + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); + if (lastMarkerLine && opts.message) { + markerLine += " " + maybeHighlight(defs.message, opts.message); + } + } + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line3.length > 0 ? ` ${line3}` : "", markerLine].join(""); + } else { + return ` ${maybeHighlight(defs.gutter, gutter)}${line3.length > 0 ? ` ${line3}` : ""}`; } + }).join("\n"); + if (opts.message && !hasColumns) { + frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} +${frame}`; } - } - } - _partitionOptionKeys(options8) { - const [knownKeys, unknownKeys] = partition(Object.keys(options8).filter((key) => !this._identifyMissing(key, options8)), (key) => key in this._utils.schemas); - return { knownKeys, unknownKeys }; - } - _applyValidation(value, key, schema) { - const validateResult = normalizeValidateResult(schema.validate(value, this._utils), value); - if (validateResult !== true) { - throw this._invalidHandler(key, validateResult.value, this._utils); - } - } - _applyUnknownHandler(key, value, newOptions, knownResultHandler) { - const unknownResult = this._unknownHandler(key, value, this._utils); - if (!unknownResult) { - return; - } - for (const resultKey of Object.keys(unknownResult)) { - if (this._identifyMissing(resultKey, unknownResult)) { - continue; - } - const resultValue = unknownResult[resultKey]; - if (resultKey in this._utils.schemas) { - knownResultHandler(resultKey, resultValue); + if (highlighted) { + return chalk2.reset(frame); } else { - newOptions[resultKey] = resultValue; - } - } - } - _applyPostprocess(options8) { - const postprocessed = this._postprocess(options8, this._utils); - if (postprocessed === VALUE_UNCHANGED) { - return; - } - if (postprocessed.delete) { - for (const deleteKey of postprocessed.delete) { - delete options8[deleteKey]; + return frame; } } - if (postprocessed.override) { - const { knownKeys, unknownKeys } = this._partitionOptionKeys(postprocessed.override); - for (const key of knownKeys) { - const value = postprocessed.override[key]; - this._applyValidation(value, key, this._utils.schemas[key]); - options8[key] = value; - } - for (const key of unknownKeys) { - const value = postprocessed.override[key]; - this._applyUnknownHandler(key, value, options8, (knownResultKey, knownResultValue) => { - const schema = this._utils.schemas[knownResultKey]; - this._applyValidation(knownResultValue, knownResultKey, schema); - options8[knownResultKey] = knownResultValue; - }); + function _default2(rawLines, lineNumber, colNumber, opts = {}) { + if (!deprecationWarningShown) { + deprecationWarningShown = true; + const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; + if (process.emitWarning) { + process.emitWarning(message, "DeprecationWarning"); + } else { + const deprecationError = new Error(message); + deprecationError.name = "DeprecationWarning"; + console.warn(new Error(message)); + } } + colNumber = Math.max(colNumber, 0); + const location = { + start: { + column: colNumber, + line: lineNumber + } + }; + return codeFrameColumns3(rawLines, location, opts); } } -}; - -// src/index.js -var import_fast_glob = __toESM(require_out4(), 1); - -// scripts/build/shims/string-replace-all.js -var stringReplaceAll2 = (isOptionalObject, original, pattern, replacement) => { - if (isOptionalObject && (original === void 0 || original === null)) { - return; - } - if (original.replaceAll) { - return original.replaceAll(pattern, replacement); - } - if (pattern.global) { - return original.replace(pattern, replacement); - } - return original.split(pattern).join(replacement); -}; -var string_replace_all_default = stringReplaceAll2; - -// src/main/core.js -var import_diff = __toESM(require_array2(), 1); - -// src/document/constants.js -var DOC_TYPE_STRING = "string"; -var DOC_TYPE_ARRAY = "array"; -var DOC_TYPE_CURSOR = "cursor"; -var DOC_TYPE_INDENT = "indent"; -var DOC_TYPE_ALIGN = "align"; -var DOC_TYPE_TRIM = "trim"; -var DOC_TYPE_GROUP = "group"; -var DOC_TYPE_FILL = "fill"; -var DOC_TYPE_IF_BREAK = "if-break"; -var DOC_TYPE_INDENT_IF_BREAK = "indent-if-break"; -var DOC_TYPE_LINE_SUFFIX = "line-suffix"; -var DOC_TYPE_LINE_SUFFIX_BOUNDARY = "line-suffix-boundary"; -var DOC_TYPE_LINE = "line"; -var DOC_TYPE_LABEL = "label"; -var DOC_TYPE_BREAK_PARENT = "break-parent"; -var VALID_OBJECT_DOC_TYPES = /* @__PURE__ */ new Set([ - DOC_TYPE_CURSOR, - DOC_TYPE_INDENT, - DOC_TYPE_ALIGN, - DOC_TYPE_TRIM, - DOC_TYPE_GROUP, - DOC_TYPE_FILL, - DOC_TYPE_IF_BREAK, - DOC_TYPE_INDENT_IF_BREAK, - DOC_TYPE_LINE_SUFFIX, - DOC_TYPE_LINE_SUFFIX_BOUNDARY, - DOC_TYPE_LINE, - DOC_TYPE_LABEL, - DOC_TYPE_BREAK_PARENT -]); - -// src/document/utils/get-doc-type.js -function getDocType(doc2) { - if (typeof doc2 === "string") { - return DOC_TYPE_STRING; - } - if (Array.isArray(doc2)) { - return DOC_TYPE_ARRAY; - } - if (!doc2) { - return; - } - const { type } = doc2; - if (VALID_OBJECT_DOC_TYPES.has(type)) { - return type; - } -} -var get_doc_type_default = getDocType; - -// src/document/invalid-doc-error.js -var disjunctionListFormat = (list) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(list); -function getDocErrorMessage(doc2) { - const type = doc2 === null ? "null" : typeof doc2; - if (type !== "string" && type !== "object") { - return `Unexpected doc '${type}', -Expected it to be 'string' or 'object'.`; - } - if (get_doc_type_default(doc2)) { - throw new Error("doc is valid."); - } - const objectType = Object.prototype.toString.call(doc2); - if (objectType !== "[object Object]") { - return `Unexpected doc '${objectType}'.`; - } - const EXPECTED_TYPE_VALUES = disjunctionListFormat( - [...VALID_OBJECT_DOC_TYPES].map((type2) => `'${type2}'`) - ); - return `Unexpected doc.type '${doc2.type}'. -Expected it to be ${EXPECTED_TYPE_VALUES}.`; -} -var InvalidDocError = class extends Error { - name = "InvalidDocError"; - constructor(doc2) { - super(getDocErrorMessage(doc2)); - this.doc = doc2; - } -}; -var invalid_doc_error_default = InvalidDocError; +}); -// src/document/utils/traverse-doc.js -var traverseDocOnExitStackMarker = {}; -function traverseDoc(doc2, onEnter, onExit, shouldTraverseConditionalGroups) { - const docsStack = [doc2]; - while (docsStack.length > 0) { - const doc3 = docsStack.pop(); - if (doc3 === traverseDocOnExitStackMarker) { - onExit(docsStack.pop()); - continue; - } - if (onExit) { - docsStack.push(doc3, traverseDocOnExitStackMarker); - } - const docType = get_doc_type_default(doc3); - if (!docType) { - throw new invalid_doc_error_default(doc3); +// node_modules/ignore/index.js +var require_ignore = __commonJS({ + "node_modules/ignore/index.js"(exports, module) { + function makeArray(subject) { + return Array.isArray(subject) ? subject : [subject]; } - if ((onEnter == null ? void 0 : onEnter(doc3)) === false) { - continue; + var EMPTY = ""; + var SPACE = " "; + var ESCAPE = "\\"; + var REGEX_TEST_BLANK_LINE = /^\s+$/; + var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; + var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; + var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; + var REGEX_SPLITALL_CRLF = /\r?\n/g; + var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var SLASH = "/"; + var TMP_KEY_IGNORE = "node-ignore"; + if (typeof Symbol !== "undefined") { + TMP_KEY_IGNORE = Symbol.for("node-ignore"); } - switch (docType) { - case DOC_TYPE_ARRAY: - case DOC_TYPE_FILL: { - const parts = docType === DOC_TYPE_ARRAY ? doc3 : doc3.parts; - for (let ic = parts.length, i = ic - 1; i >= 0; --i) { - docsStack.push(parts[i]); - } - break; - } - case DOC_TYPE_IF_BREAK: - docsStack.push(doc3.flatContents, doc3.breakContents); - break; - case DOC_TYPE_GROUP: - if (shouldTraverseConditionalGroups && doc3.expandedStates) { - for (let ic = doc3.expandedStates.length, i = ic - 1; i >= 0; --i) { - docsStack.push(doc3.expandedStates[i]); - } - } else { - docsStack.push(doc3.contents); - } + var KEY_IGNORE = TMP_KEY_IGNORE; + var define = (object, key2, value) => Object.defineProperty(object, key2, { value }); + var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; + var RETURN_FALSE = () => false; + var sanitizeRange = (range) => range.replace( + REGEX_REGEXP_RANGE, + (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY + ); + var cleanRangeBackSlash = (slashes) => { + const { length } = slashes; + return slashes.slice(0, length - length % 2); + }; + var REPLACERS = [ + [ + // remove BOM + // TODO: + // Other similar zero-width characters? + /^\uFEFF/, + () => EMPTY + ], + // > Trailing spaces are ignored unless they are quoted with backslash ("\") + [ + // (a\ ) -> (a ) + // (a ) -> (a) + // (a \ ) -> (a ) + /\\?\s+$/, + (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + ], + // replace (\ ) with ' ' + [ + /\\\s/g, + () => SPACE + ], + // Escape metacharacters + // which is written down by users but means special for regular expressions. + // > There are 12 characters with special meanings: + // > - the backslash \, + // > - the caret ^, + // > - the dollar sign $, + // > - the period or dot ., + // > - the vertical bar or pipe symbol |, + // > - the question mark ?, + // > - the asterisk or star *, + // > - the plus sign +, + // > - the opening parenthesis (, + // > - the closing parenthesis ), + // > - and the opening square bracket [, + // > - the opening curly brace {, + // > These special characters are often called "metacharacters". + [ + /[\\$.|*+(){^]/g, + (match) => `\\${match}` + ], + [ + // > a question mark (?) matches a single character + /(?!\\)\?/g, + () => "[^/]" + ], + // leading slash + [ + // > A leading slash matches the beginning of the pathname. + // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". + // A leading slash matches the beginning of the pathname + /^\//, + () => "^" + ], + // replace special metacharacter slash after the leading slash + [ + /\//g, + () => "\\/" + ], + [ + // > A leading "**" followed by a slash means match in all directories. + // > For example, "**/foo" matches file or directory "foo" anywhere, + // > the same as pattern "foo". + // > "**/foo/bar" matches file or directory "bar" anywhere that is directly + // > under directory "foo". + // Notice that the '*'s have been replaced as '\\*' + /^\^*\\\*\\\*\\\//, + // '**/foo' <-> 'foo' + () => "^(?:.*\\/)?" + ], + // starting + [ + // there will be no leading '/' + // (which has been replaced by section "leading slash") + // If starts with '**', adding a '^' to the regular expression also works + /^(?=[^^])/, + function startingReplacer() { + return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; + } + ], + // two globstars + [ + // Use lookahead assertions so that we could match more than one `'/**'` + /\\\/\\\*\\\*(?=\\\/|$)/g, + // Zero, one or several directories + // should not use '*', or it will be replaced by the next replacer + // Check if it is not the last `'/**'` + (_, index, str2) => index + 6 < str2.length ? "(?:\\/[^\\/]+)*" : "\\/.+" + ], + // normal intermediate wildcards + [ + // Never replace escaped '*' + // ignore rule '\*' will match the path '*' + // 'abc.*/' -> go + // 'abc.*' -> skip this rule, + // coz trailing single wildcard will be handed by [trailing wildcard] + /(^|[^\\]+)(\\\*)+(?=.+)/g, + // '*.js' matches '.js' + // '*.js' doesn't match 'abc' + (_, p1, p2) => { + const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); + return p1 + unescaped; + } + ], + [ + // unescape, revert step 3 except for back slash + // For example, if a user escape a '\\*', + // after step 3, the result will be '\\\\\\*' + /\\\\\\(?=[$.|*+(){^])/g, + () => ESCAPE + ], + [ + // '\\\\' -> '\\' + /\\\\/g, + () => ESCAPE + ], + [ + // > The range notation, e.g. [a-zA-Z], + // > can be used to match one of the characters in a range. + // `\` is escaped by step 3 + /(\\)?\[([^\]/]*?)(\\*)($|\])/g, + (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" + ], + // ending + [ + // 'js' will not match 'js.' + // 'ab' will not match 'abc' + /(?:[^*])$/, + // WTF! + // https://git-scm.com/docs/gitignore + // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) + // which re-fixes #24, #38 + // > If there is a separator at the end of the pattern then the pattern + // > will only match directories, otherwise the pattern can match both + // > files and directories. + // 'js*' will not match 'a.js' + // 'js/' will not match 'a.js' + // 'js' will match 'a.js' and 'a.js/' + (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` + ], + // trailing wildcard + [ + /(\^|\\\/)?\\\*$/, + (_, p1) => { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + } + ] + ]; + var regexCache = /* @__PURE__ */ Object.create(null); + var makeRegex = (pattern, ignoreCase) => { + let source2 = regexCache[pattern]; + if (!source2) { + source2 = REPLACERS.reduce( + (prev, current) => prev.replace(current[0], current[1].bind(pattern)), + pattern + ); + regexCache[pattern] = source2; + } + return ignoreCase ? new RegExp(source2, "i") : new RegExp(source2); + }; + var isString = (subject) => typeof subject === "string"; + var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var IgnoreRule = class { + constructor(origin, pattern, negative, regex) { + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex; + } + }; + var createRule = (pattern, ignoreCase) => { + const origin = pattern; + let negative = false; + if (pattern.indexOf("!") === 0) { + negative = true; + pattern = pattern.substr(1); + } + pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regex = makeRegex(pattern, ignoreCase); + return new IgnoreRule( + origin, + pattern, + negative, + regex + ); + }; + var throwError2 = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path13, originalPath, doThrow) => { + if (!isString(path13)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ); + } + if (!path13) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path13)) { + const r = "`path.relative()`d"; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ); + } + return true; + }; + var isNotRelative = (path13) => REGEX_TEST_INVALID_PATH.test(path13); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define(this, KEY_IGNORE, true); + this._rules = []; + this._ignoreCase = ignoreCase; + this._allowRelativePaths = allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + _addPattern(pattern) { + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignoreCase); + this._added = true; + this._rules.push(rule); + } + } + // @param {Array | string | Ignore} pattern + add(pattern) { + this._added = false; + makeArray( + isString(pattern) ? splitPattern(pattern) : pattern + ).forEach(this._addPattern, this); + if (this._added) { + this._initCache(); + } + return this; + } + // legacy + addPattern(pattern) { + return this.add(pattern); + } + // | ignored : unignored + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen + // @param {boolean} whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // @returns {TestResult} true if a file is ignored + _testOne(path13, checkUnignored) { + let ignored = false; + let unignored = false; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + const matched = rule.regex.test(path13); + if (matched) { + ignored = !negative; + unignored = negative; + } + }); + return { + ignored, + unignored + }; + } + // @returns {TestResult} + _test(originalPath, cache3, checkUnignored, slices) { + const path13 = originalPath && checkPath.convert(originalPath); + checkPath( + path13, + originalPath, + this._allowRelativePaths ? RETURN_FALSE : throwError2 + ); + return this._t(path13, cache3, checkUnignored, slices); + } + _t(path13, cache3, checkUnignored, slices) { + if (path13 in cache3) { + return cache3[path13]; + } + if (!slices) { + slices = path13.split(SLASH); + } + slices.pop(); + if (!slices.length) { + return cache3[path13] = this._testOne(path13, checkUnignored); + } + const parent = this._t( + slices.join(SLASH) + SLASH, + cache3, + checkUnignored, + slices + ); + return cache3[path13] = parent.ignored ? parent : this._testOne(path13, checkUnignored); + } + ignores(path13) { + return this._test(path13, this._ignoreCache, false).ignored; + } + createFilter() { + return (path13) => !this.ignores(path13); + } + filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } + // @returns {TestResult} + test(path13) { + return this._test(path13, this._testCache, true); + } + }; + var factory = (options8) => new Ignore(options8); + var isPathValid = (path13) => checkPath(path13 && checkPath.convert(path13), path13, RETURN_FALSE); + factory.isPathValid = isPathValid; + factory.default = factory; + module.exports = factory; + if ( + // Detect `process` so that it can run in browsers. + typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") + ) { + const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); + checkPath.convert = makePosix; + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path13) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path13) || isNotRelative(path13); + } + } +}); + +// node_modules/n-readlines/readlines.js +var require_readlines = __commonJS({ + "node_modules/n-readlines/readlines.js"(exports, module) { + "use strict"; + var fs7 = __require("fs"); + var LineByLine = class { + constructor(file, options8) { + options8 = options8 || {}; + if (!options8.readChunk) + options8.readChunk = 1024; + if (!options8.newLineCharacter) { + options8.newLineCharacter = 10; + } else { + options8.newLineCharacter = options8.newLineCharacter.charCodeAt(0); + } + if (typeof file === "number") { + this.fd = file; + } else { + this.fd = fs7.openSync(file, "r"); + } + this.options = options8; + this.newLineCharacter = options8.newLineCharacter; + this.reset(); + } + _searchInBuffer(buffer2, hexNeedle) { + let found = -1; + for (let i = 0; i <= buffer2.length; i++) { + let b_byte = buffer2[i]; + if (b_byte === hexNeedle) { + found = i; + break; + } + } + return found; + } + reset() { + this.eofReached = false; + this.linesCache = []; + this.fdPosition = 0; + } + close() { + fs7.closeSync(this.fd); + this.fd = null; + } + _extractLines(buffer2) { + let line3; + const lines = []; + let bufferPosition = 0; + let lastNewLineBufferPosition = 0; + while (true) { + let bufferPositionValue = buffer2[bufferPosition++]; + if (bufferPositionValue === this.newLineCharacter) { + line3 = buffer2.slice(lastNewLineBufferPosition, bufferPosition); + lines.push(line3); + lastNewLineBufferPosition = bufferPosition; + } else if (bufferPositionValue === void 0) { + break; + } + } + let leftovers = buffer2.slice(lastNewLineBufferPosition, bufferPosition); + if (leftovers.length) { + lines.push(leftovers); + } + return lines; + } + _readChunk(lineLeftovers) { + let totalBytesRead = 0; + let bytesRead; + const buffers = []; + do { + const readBuffer = Buffer.alloc(this.options.readChunk); + bytesRead = fs7.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition); + totalBytesRead = totalBytesRead + bytesRead; + this.fdPosition = this.fdPosition + bytesRead; + buffers.push(readBuffer); + } while (bytesRead && this._searchInBuffer(buffers[buffers.length - 1], this.options.newLineCharacter) === -1); + let bufferData = Buffer.concat(buffers); + if (bytesRead < this.options.readChunk) { + this.eofReached = true; + bufferData = bufferData.slice(0, totalBytesRead); + } + if (totalBytesRead) { + this.linesCache = this._extractLines(bufferData); + if (lineLeftovers) { + this.linesCache[0] = Buffer.concat([lineLeftovers, this.linesCache[0]]); + } + } + return totalBytesRead; + } + next() { + if (!this.fd) + return false; + let line3 = false; + if (this.eofReached && this.linesCache.length === 0) { + return line3; + } + let bytesRead; + if (!this.linesCache.length) { + bytesRead = this._readChunk(); + } + if (this.linesCache.length) { + line3 = this.linesCache.shift(); + const lastLineCharacter = line3[line3.length - 1]; + if (lastLineCharacter !== this.newLineCharacter) { + bytesRead = this._readChunk(line3); + if (bytesRead) { + line3 = this.linesCache.shift(); + } + } + } + if (this.eofReached && this.linesCache.length === 0) { + this.close(); + } + if (line3 && line3[line3.length - 1] === this.newLineCharacter) { + line3 = line3.slice(0, line3.length - 1); + } + return line3; + } + }; + module.exports = LineByLine; + } +}); + +// node_modules/diff/lib/diff/base.js +var require_base = __commonJS({ + "node_modules/diff/lib/diff/base.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports["default"] = Diff; + function Diff() { + } + Diff.prototype = { + /*istanbul ignore start*/ + /*istanbul ignore end*/ + diff: function diff(oldString, newString) { + var options8 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var callback = options8.callback; + if (typeof options8 === "function") { + callback = options8; + options8 = {}; + } + this.options = options8; + var self = this; + function done(value) { + if (callback) { + setTimeout(function() { + callback(void 0, value); + }, 0); + return true; + } else { + return value; + } + } + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + if (options8.maxEditLength) { + maxEditLength = Math.min(maxEditLength, options8.maxEditLength); + } + var bestPath = [{ + newPos: -1, + components: [] + }]; + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + return done([{ + value: this.join(newString), + count: newString.length + }]); + } + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = ( + /*istanbul ignore start*/ + void 0 + ); + var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + if (addPath) { + bestPath[diagonalPath - 1] = void 0; + } + var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + if (!canAdd && !canRemove) { + bestPath[diagonalPath] = void 0; + continue; + } + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self.pushComponent(basePath.components, void 0, true); + } else { + basePath = addPath; + basePath.newPos++; + self.pushComponent(basePath.components, true, void 0); + } + _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken)); + } else { + bestPath[diagonalPath] = basePath; + } + } + editLength++; + } + if (callback) { + (function exec() { + setTimeout(function() { + if (editLength > maxEditLength) { + return callback(); + } + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength) { + var ret = execEditLength(); + if (ret) { + return ret; + } + } + } + }, + /*istanbul ignore start*/ + /*istanbul ignore end*/ + pushComponent: function pushComponent(components, added, removed) { + var last = components[components.length - 1]; + if (last && last.added === added && last.removed === removed) { + components[components.length - 1] = { + count: last.count + 1, + added, + removed + }; + } else { + components.push({ + count: 1, + added, + removed + }); + } + }, + /*istanbul ignore start*/ + /*istanbul ignore end*/ + extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + basePath.newPos = newPos; + return oldPos; + }, + /*istanbul ignore start*/ + /*istanbul ignore end*/ + equals: function equals(left, right) { + if (this.options.comparator) { + return this.options.comparator(left, right); + } else { + return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } + }, + /*istanbul ignore start*/ + /*istanbul ignore end*/ + removeEmpty: function removeEmpty(array2) { + var ret = []; + for (var i = 0; i < array2.length; i++) { + if (array2[i]) { + ret.push(array2[i]); + } + } + return ret; + }, + /*istanbul ignore start*/ + /*istanbul ignore end*/ + castInput: function castInput(value) { + return value; + }, + /*istanbul ignore start*/ + /*istanbul ignore end*/ + tokenize: function tokenize(value) { + return value.split(""); + }, + /*istanbul ignore start*/ + /*istanbul ignore end*/ + join: function join2(chars) { + return chars.join(""); + } + }; + function buildValues(diff, components, newString, oldString, useLongestToken) { + var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0; + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function(value2, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value2.length ? oldValue : value2; + }); + component.value = diff.join(value); + } else { + component.value = diff.join(newString.slice(newPos, newPos + component.count)); + } + newPos += component.count; + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } + var lastComponent = components[componentLen - 1]; + if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff.equals("", lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } + return components; + } + function clonePath(path13) { + return { + newPos: path13.newPos, + components: path13.components.slice(0) + }; + } + } +}); + +// node_modules/diff/lib/diff/array.js +var require_array2 = __commonJS({ + "node_modules/diff/lib/diff/array.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.diffArrays = diffArrays2; + exports.arrayDiff = void 0; + var _base = _interopRequireDefault(require_base()); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var arrayDiff = new /*istanbul ignore start*/ + _base[ + /*istanbul ignore start*/ + "default" + /*istanbul ignore end*/ + ](); + exports.arrayDiff = arrayDiff; + arrayDiff.tokenize = function(value) { + return value.slice(); + }; + arrayDiff.join = arrayDiff.removeEmpty = function(value) { + return value; + }; + function diffArrays2(oldArr, newArr, callback) { + return arrayDiff.diff(oldArr, newArr, callback); + } + } +}); + +// src/index.js +var src_exports = {}; +__export(src_exports, { + __debug: () => debugApis, + __internal: () => sharedWithCli, + check: () => check, + clearConfigCache: () => clearCache3, + doc: () => doc, + format: () => format2, + formatWithCursor: () => formatWithCursor2, + getFileInfo: () => getFileInfo2, + getSupportInfo: () => getSupportInfo2, + resolveConfig: () => resolveConfig, + resolveConfigFile: () => resolveConfigFile, + util: () => public_exports, + version: () => version_evaluate_default +}); +var import_fast_glob = __toESM(require_out4(), 1); + +// node_modules/vnopts/lib/descriptors/api.js +var apiDescriptor = { + key: (key2) => /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(key2) ? key2 : JSON.stringify(key2), + value(value) { + if (value === null || typeof value !== "object") { + return JSON.stringify(value); + } + if (Array.isArray(value)) { + return `[${value.map((subValue) => apiDescriptor.value(subValue)).join(", ")}]`; + } + const keys = Object.keys(value); + return keys.length === 0 ? "{}" : `{ ${keys.map((key2) => `${apiDescriptor.key(key2)}: ${apiDescriptor.value(value[key2])}`).join(", ")} }`; + }, + pair: ({ key: key2, value }) => apiDescriptor.value({ [key2]: value }) +}; + +// node_modules/chalk/source/vendor/ansi-styles/index.js +var ANSI_BACKGROUND_OFFSET = 10; +var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`; +var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`; +var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`; +var styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + overline: [53, 55], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + // Bright color + blackBright: [90, 39], + gray: [90, 39], + // Alias of `blackBright` + grey: [90, 39], + // Alias of `blackBright` + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + // Bright color + bgBlackBright: [100, 49], + bgGray: [100, 49], + // Alias of `bgBlackBright` + bgGrey: [100, 49], + // Alias of `bgBlackBright` + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } +}; +var modifierNames = Object.keys(styles.modifier); +var foregroundColorNames = Object.keys(styles.color); +var backgroundColorNames = Object.keys(styles.bgColor); +var colorNames = [...foregroundColorNames, ...backgroundColorNames]; +function assembleStyles() { + const codes2 = /* @__PURE__ */ new Map(); + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\x1B[${style[0]}m`, + close: `\x1B[${style[1]}m` + }; + group[styleName] = styles[styleName]; + codes2.set(style[0], style[1]); + } + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + Object.defineProperty(styles, "codes", { + value: codes2, + enumerable: false + }); + styles.color.close = "\x1B[39m"; + styles.bgColor.close = "\x1B[49m"; + styles.color.ansi = wrapAnsi16(); + styles.color.ansi256 = wrapAnsi256(); + styles.color.ansi16m = wrapAnsi16m(); + styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); + Object.defineProperties(styles, { + rgbToAnsi256: { + value(red, green, blue) { + if (red === green && green === blue) { + if (red < 8) { + return 16; + } + if (red > 248) { + return 231; + } + return Math.round((red - 8) / 247 * 24) + 232; + } + return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5); + }, + enumerable: false + }, + hexToRgb: { + value(hex) { + const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); + if (!matches) { + return [0, 0, 0]; + } + let [colorString] = matches; + if (colorString.length === 3) { + colorString = [...colorString].map((character) => character + character).join(""); + } + const integer = Number.parseInt(colorString, 16); + return [ + /* eslint-disable no-bitwise */ + integer >> 16 & 255, + integer >> 8 & 255, + integer & 255 + /* eslint-enable no-bitwise */ + ]; + }, + enumerable: false + }, + hexToAnsi256: { + value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), + enumerable: false + }, + ansi256ToAnsi: { + value(code) { + if (code < 8) { + return 30 + code; + } + if (code < 16) { + return 90 + (code - 8); + } + let red; + let green; + let blue; + if (code >= 232) { + red = ((code - 232) * 10 + 8) / 255; + green = red; + blue = red; + } else { + code -= 16; + const remainder = code % 36; + red = Math.floor(code / 36) / 5; + green = Math.floor(remainder / 6) / 5; + blue = remainder % 6 / 5; + } + const value = Math.max(red, green, blue) * 2; + if (value === 0) { + return 30; + } + let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red)); + if (value === 2) { + result += 60; + } + return result; + }, + enumerable: false + }, + rgbToAnsi: { + value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), + enumerable: false + }, + hexToAnsi: { + value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), + enumerable: false + } + }); + return styles; +} +var ansiStyles = assembleStyles(); +var ansi_styles_default = ansiStyles; + +// node_modules/chalk/source/vendor/supports-color/index.js +import process2 from "process"; +import os from "os"; +import tty from "tty"; +function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) { + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf("--"); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); +} +var { env } = process2; +var flagForceColor; +if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { + flagForceColor = 0; +} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + flagForceColor = 1; +} +function envForceColor() { + if ("FORCE_COLOR" in env) { + if (env.FORCE_COLOR === "true") { + return 1; + } + if (env.FORCE_COLOR === "false") { + return 0; + } + return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); + } +} +function translateLevel(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} +function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { + const noFlagForceColor = envForceColor(); + if (noFlagForceColor !== void 0) { + flagForceColor = noFlagForceColor; + } + const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; + if (forceColor === 0) { + return 0; + } + if (sniffFlags) { + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; + } + } + if ("TF_BUILD" in env && "AGENT_NAME" in env) { + return 1; + } + if (haveStream && !streamIsTTY && forceColor === void 0) { + return 0; + } + const min = forceColor || 0; + if (env.TERM === "dumb") { + return min; + } + if (process2.platform === "win32") { + const osRelease = os.release().split("."); + if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env) { + if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) { + return 3; + } + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign2) => sign2 in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; + } + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + if (env.COLORTERM === "truecolor") { + return 3; + } + if (env.TERM === "xterm-kitty") { + return 3; + } + if ("TERM_PROGRAM" in env) { + const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": { + return version >= 3 ? 3 : 2; + } + case "Apple_Terminal": { + return 2; + } + } + } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + if ("COLORTERM" in env) { + return 1; + } + return min; +} +function createSupportsColor(stream, options8 = {}) { + const level = _supportsColor(stream, { + streamIsTTY: stream && stream.isTTY, + ...options8 + }); + return translateLevel(level); +} +var supportsColor = { + stdout: createSupportsColor({ isTTY: tty.isatty(1) }), + stderr: createSupportsColor({ isTTY: tty.isatty(2) }) +}; +var supports_color_default = supportsColor; + +// node_modules/chalk/source/utilities.js +function stringReplaceAll(string, substring, replacer) { + let index = string.indexOf(substring); + if (index === -1) { + return string; + } + const substringLength = substring.length; + let endIndex = 0; + let returnValue = ""; + do { + returnValue += string.slice(endIndex, index) + substring + replacer; + endIndex = index + substringLength; + index = string.indexOf(substring, endIndex); + } while (index !== -1); + returnValue += string.slice(endIndex); + return returnValue; +} +function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) { + let endIndex = 0; + let returnValue = ""; + do { + const gotCR = string[index - 1] === "\r"; + returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix; + endIndex = index + 1; + index = string.indexOf("\n", endIndex); + } while (index !== -1); + returnValue += string.slice(endIndex); + return returnValue; +} + +// node_modules/chalk/source/index.js +var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default; +var GENERATOR = Symbol("GENERATOR"); +var STYLER = Symbol("STYLER"); +var IS_EMPTY = Symbol("IS_EMPTY"); +var levelMapping = [ + "ansi", + "ansi", + "ansi256", + "ansi16m" +]; +var styles2 = /* @__PURE__ */ Object.create(null); +var applyOptions = (object, options8 = {}) => { + if (options8.level && !(Number.isInteger(options8.level) && options8.level >= 0 && options8.level <= 3)) { + throw new Error("The `level` option should be an integer from 0 to 3"); + } + const colorLevel = stdoutColor ? stdoutColor.level : 0; + object.level = options8.level === void 0 ? colorLevel : options8.level; +}; +var chalkFactory = (options8) => { + const chalk2 = (...strings) => strings.join(" "); + applyOptions(chalk2, options8); + Object.setPrototypeOf(chalk2, createChalk.prototype); + return chalk2; +}; +function createChalk(options8) { + return chalkFactory(options8); +} +Object.setPrototypeOf(createChalk.prototype, Function.prototype); +for (const [styleName, style] of Object.entries(ansi_styles_default)) { + styles2[styleName] = { + get() { + const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]); + Object.defineProperty(this, styleName, { value: builder }); + return builder; + } + }; +} +styles2.visible = { + get() { + const builder = createBuilder(this, this[STYLER], true); + Object.defineProperty(this, "visible", { value: builder }); + return builder; + } +}; +var getModelAnsi = (model, level, type2, ...arguments_) => { + if (model === "rgb") { + if (level === "ansi16m") { + return ansi_styles_default[type2].ansi16m(...arguments_); + } + if (level === "ansi256") { + return ansi_styles_default[type2].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_)); + } + return ansi_styles_default[type2].ansi(ansi_styles_default.rgbToAnsi(...arguments_)); + } + if (model === "hex") { + return getModelAnsi("rgb", level, type2, ...ansi_styles_default.hexToRgb(...arguments_)); + } + return ansi_styles_default[type2][model](...arguments_); +}; +var usedModels = ["rgb", "hex", "ansi256"]; +for (const model of usedModels) { + styles2[model] = { + get() { + const { level } = this; + return function(...arguments_) { + const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]); + return createBuilder(this, styler, this[IS_EMPTY]); + }; + } + }; + const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); + styles2[bgModel] = { + get() { + const { level } = this; + return function(...arguments_) { + const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]); + return createBuilder(this, styler, this[IS_EMPTY]); + }; + } + }; +} +var proto = Object.defineProperties(() => { +}, { + ...styles2, + level: { + enumerable: true, + get() { + return this[GENERATOR].level; + }, + set(level) { + this[GENERATOR].level = level; + } + } +}); +var createStyler = (open, close, parent) => { + let openAll; + let closeAll; + if (parent === void 0) { + openAll = open; + closeAll = close; + } else { + openAll = parent.openAll + open; + closeAll = close + parent.closeAll; + } + return { + open, + close, + openAll, + closeAll, + parent + }; +}; +var createBuilder = (self, _styler, _isEmpty) => { + const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); + Object.setPrototypeOf(builder, proto); + builder[GENERATOR] = self; + builder[STYLER] = _styler; + builder[IS_EMPTY] = _isEmpty; + return builder; +}; +var applyStyle = (self, string) => { + if (self.level <= 0 || !string) { + return self[IS_EMPTY] ? "" : string; + } + let styler = self[STYLER]; + if (styler === void 0) { + return string; + } + const { openAll, closeAll } = styler; + if (string.includes("\x1B")) { + while (styler !== void 0) { + string = stringReplaceAll(string, styler.close, styler.open); + styler = styler.parent; + } + } + const lfIndex = string.indexOf("\n"); + if (lfIndex !== -1) { + string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); + } + return openAll + string + closeAll; +}; +Object.defineProperties(createChalk.prototype, styles2); +var chalk = createChalk(); +var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 }); +var source_default = chalk; + +// node_modules/vnopts/lib/handlers/deprecated/common.js +var commonDeprecatedHandler = (keyOrPair, redirectTo, { descriptor }) => { + const messages2 = [ + `${source_default.yellow(typeof keyOrPair === "string" ? descriptor.key(keyOrPair) : descriptor.pair(keyOrPair))} is deprecated` + ]; + if (redirectTo) { + messages2.push(`we now treat it as ${source_default.blue(typeof redirectTo === "string" ? descriptor.key(redirectTo) : descriptor.pair(redirectTo))}`); + } + return messages2.join("; ") + "."; +}; + +// node_modules/vnopts/lib/constants.js +var VALUE_NOT_EXIST = Symbol.for("vnopts.VALUE_NOT_EXIST"); +var VALUE_UNCHANGED = Symbol.for("vnopts.VALUE_UNCHANGED"); + +// node_modules/vnopts/lib/handlers/invalid/common.js +var INDENTATION = " ".repeat(2); +var commonInvalidHandler = (key2, value, utils) => { + const { text, list } = utils.normalizeExpectedResult(utils.schemas[key2].expected(utils)); + const descriptions = []; + if (text) { + descriptions.push(getDescription(key2, value, text, utils.descriptor)); + } + if (list) { + descriptions.push([getDescription(key2, value, list.title, utils.descriptor)].concat(list.values.map((valueDescription) => getListDescription(valueDescription, utils.loggerPrintWidth))).join("\n")); + } + return chooseDescription(descriptions, utils.loggerPrintWidth); +}; +function getDescription(key2, value, expected, descriptor) { + return [ + `Invalid ${source_default.red(descriptor.key(key2))} value.`, + `Expected ${source_default.blue(expected)},`, + `but received ${value === VALUE_NOT_EXIST ? source_default.gray("nothing") : source_default.red(descriptor.value(value))}.` + ].join(" "); +} +function getListDescription({ text, list }, printWidth) { + const descriptions = []; + if (text) { + descriptions.push(`- ${source_default.blue(text)}`); + } + if (list) { + descriptions.push([`- ${source_default.blue(list.title)}:`].concat(list.values.map((valueDescription) => getListDescription(valueDescription, printWidth - INDENTATION.length).replace(/^|\n/g, `$&${INDENTATION}`))).join("\n")); + } + return chooseDescription(descriptions, printWidth); +} +function chooseDescription(descriptions, printWidth) { + if (descriptions.length === 1) { + return descriptions[0]; + } + const [firstDescription, secondDescription] = descriptions; + const [firstWidth, secondWidth] = descriptions.map((description) => description.split("\n", 1)[0].length); + return firstWidth > printWidth && firstWidth > secondWidth ? secondDescription : firstDescription; +} + +// node_modules/leven/index.js +var array = []; +var characterCodeCache = []; +function leven(first, second) { + if (first === second) { + return 0; + } + const swap = first; + if (first.length > second.length) { + first = second; + second = swap; + } + let firstLength = first.length; + let secondLength = second.length; + while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) { + firstLength--; + secondLength--; + } + let start = 0; + while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) { + start++; + } + firstLength -= start; + secondLength -= start; + if (firstLength === 0) { + return secondLength; + } + let bCharacterCode; + let result; + let temporary; + let temporary2; + let index = 0; + let index2 = 0; + while (index < firstLength) { + characterCodeCache[index] = first.charCodeAt(start + index); + array[index] = ++index; + } + while (index2 < secondLength) { + bCharacterCode = second.charCodeAt(start + index2); + temporary = index2++; + result = index2; + for (index = 0; index < firstLength; index++) { + temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1; + temporary = array[index]; + result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2; + } + } + return result; +} + +// node_modules/vnopts/lib/handlers/unknown/leven.js +var levenUnknownHandler = (key2, value, { descriptor, logger, schemas }) => { + const messages2 = [ + `Ignored unknown option ${source_default.yellow(descriptor.pair({ key: key2, value }))}.` + ]; + const suggestion = Object.keys(schemas).sort().find((knownKey) => leven(key2, knownKey) < 3); + if (suggestion) { + messages2.push(`Did you mean ${source_default.blue(descriptor.key(suggestion))}?`); + } + logger.warn(messages2.join(" ")); +}; + +// node_modules/vnopts/lib/schema.js +var HANDLER_KEYS = [ + "default", + "expected", + "validate", + "deprecated", + "forward", + "redirect", + "overlap", + "preprocess", + "postprocess" +]; +function createSchema(SchemaConstructor, parameters) { + const schema2 = new SchemaConstructor(parameters); + const subSchema = Object.create(schema2); + for (const handlerKey of HANDLER_KEYS) { + if (handlerKey in parameters) { + subSchema[handlerKey] = normalizeHandler(parameters[handlerKey], schema2, Schema.prototype[handlerKey].length); + } + } + return subSchema; +} +var Schema = class { + static create(parameters) { + return createSchema(this, parameters); + } + constructor(parameters) { + this.name = parameters.name; + } + default(_utils) { + return void 0; + } + // this is actually an abstract method but we need a placeholder to get `function.length` + /* c8 ignore start */ + expected(_utils) { + return "nothing"; + } + /* c8 ignore stop */ + // this is actually an abstract method but we need a placeholder to get `function.length` + /* c8 ignore start */ + validate(_value, _utils) { + return false; + } + /* c8 ignore stop */ + deprecated(_value, _utils) { + return false; + } + forward(_value, _utils) { + return void 0; + } + redirect(_value, _utils) { + return void 0; + } + overlap(currentValue, _newValue, _utils) { + return currentValue; + } + preprocess(value, _utils) { + return value; + } + postprocess(_value, _utils) { + return VALUE_UNCHANGED; + } +}; +function normalizeHandler(handler, superSchema, handlerArgumentsLength) { + return typeof handler === "function" ? (...args) => handler(...args.slice(0, handlerArgumentsLength - 1), superSchema, ...args.slice(handlerArgumentsLength - 1)) : () => handler; +} + +// node_modules/vnopts/lib/schemas/alias.js +var AliasSchema = class extends Schema { + constructor(parameters) { + super(parameters); + this._sourceName = parameters.sourceName; + } + expected(utils) { + return utils.schemas[this._sourceName].expected(utils); + } + validate(value, utils) { + return utils.schemas[this._sourceName].validate(value, utils); + } + redirect(_value, _utils) { + return this._sourceName; + } +}; + +// node_modules/vnopts/lib/schemas/any.js +var AnySchema = class extends Schema { + expected() { + return "anything"; + } + validate() { + return true; + } +}; + +// node_modules/vnopts/lib/schemas/array.js +var ArraySchema = class extends Schema { + constructor({ valueSchema, name = valueSchema.name, ...handlers }) { + super({ ...handlers, name }); + this._valueSchema = valueSchema; + } + expected(utils) { + const { text, list } = utils.normalizeExpectedResult(this._valueSchema.expected(utils)); + return { + text: text && `an array of ${text}`, + list: list && { + title: `an array of the following values`, + values: [{ list }] + } + }; + } + validate(value, utils) { + if (!Array.isArray(value)) { + return false; + } + const invalidValues = []; + for (const subValue of value) { + const subValidateResult = utils.normalizeValidateResult(this._valueSchema.validate(subValue, utils), subValue); + if (subValidateResult !== true) { + invalidValues.push(subValidateResult.value); + } + } + return invalidValues.length === 0 ? true : { value: invalidValues }; + } + deprecated(value, utils) { + const deprecatedResult = []; + for (const subValue of value) { + const subDeprecatedResult = utils.normalizeDeprecatedResult(this._valueSchema.deprecated(subValue, utils), subValue); + if (subDeprecatedResult !== false) { + deprecatedResult.push(...subDeprecatedResult.map(({ value: deprecatedValue }) => ({ + value: [deprecatedValue] + }))); + } + } + return deprecatedResult; + } + forward(value, utils) { + const forwardResult = []; + for (const subValue of value) { + const subForwardResult = utils.normalizeForwardResult(this._valueSchema.forward(subValue, utils), subValue); + forwardResult.push(...subForwardResult.map(wrapTransferResult)); + } + return forwardResult; + } + redirect(value, utils) { + const remain = []; + const redirect = []; + for (const subValue of value) { + const subRedirectResult = utils.normalizeRedirectResult(this._valueSchema.redirect(subValue, utils), subValue); + if ("remain" in subRedirectResult) { + remain.push(subRedirectResult.remain); + } + redirect.push(...subRedirectResult.redirect.map(wrapTransferResult)); + } + return remain.length === 0 ? { redirect } : { redirect, remain }; + } + overlap(currentValue, newValue) { + return currentValue.concat(newValue); + } +}; +function wrapTransferResult({ from, to }) { + return { from: [from], to }; +} + +// node_modules/vnopts/lib/schemas/boolean.js +var BooleanSchema = class extends Schema { + expected() { + return "true or false"; + } + validate(value) { + return typeof value === "boolean"; + } +}; + +// node_modules/vnopts/lib/utils.js +function recordFromArray(array2, mainKey) { + const record = /* @__PURE__ */ Object.create(null); + for (const value of array2) { + const key2 = value[mainKey]; + if (record[key2]) { + throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key2)}`); + } + record[key2] = value; + } + return record; +} +function mapFromArray(array2, mainKey) { + const map2 = /* @__PURE__ */ new Map(); + for (const value of array2) { + const key2 = value[mainKey]; + if (map2.has(key2)) { + throw new Error(`Duplicate ${mainKey} ${JSON.stringify(key2)}`); + } + map2.set(key2, value); + } + return map2; +} +function createAutoChecklist() { + const map2 = /* @__PURE__ */ Object.create(null); + return (id) => { + const idString = JSON.stringify(id); + if (map2[idString]) { + return true; + } + map2[idString] = true; + return false; + }; +} +function partition(array2, predicate) { + const trueArray = []; + const falseArray = []; + for (const value of array2) { + if (predicate(value)) { + trueArray.push(value); + } else { + falseArray.push(value); + } + } + return [trueArray, falseArray]; +} +function isInt(value) { + return value === Math.floor(value); +} +function comparePrimitive(a, b) { + if (a === b) { + return 0; + } + const typeofA = typeof a; + const typeofB = typeof b; + const orders = [ + "undefined", + "object", + "boolean", + "number", + "string" + ]; + if (typeofA !== typeofB) { + return orders.indexOf(typeofA) - orders.indexOf(typeofB); + } + if (typeofA !== "string") { + return Number(a) - Number(b); + } + return a.localeCompare(b); +} +function normalizeInvalidHandler(invalidHandler) { + return (...args) => { + const errorMessageOrError = invalidHandler(...args); + return typeof errorMessageOrError === "string" ? new Error(errorMessageOrError) : errorMessageOrError; + }; +} +function normalizeDefaultResult(result) { + return result === void 0 ? {} : result; +} +function normalizeExpectedResult(result) { + if (typeof result === "string") { + return { text: result }; + } + const { text, list } = result; + assert((text || list) !== void 0, "Unexpected `expected` result, there should be at least one field."); + if (!list) { + return { text }; + } + return { + text, + list: { + title: list.title, + values: list.values.map(normalizeExpectedResult) + } + }; +} +function normalizeValidateResult(result, value) { + return result === true ? true : result === false ? { value } : result; +} +function normalizeDeprecatedResult(result, value, doNotNormalizeTrue = false) { + return result === false ? false : result === true ? doNotNormalizeTrue ? true : [{ value }] : "value" in result ? [result] : result.length === 0 ? false : result; +} +function normalizeTransferResult(result, value) { + return typeof result === "string" || "key" in result ? { from: value, to: result } : "from" in result ? { from: result.from, to: result.to } : { from: value, to: result.to }; +} +function normalizeForwardResult(result, value) { + return result === void 0 ? [] : Array.isArray(result) ? result.map((transferResult) => normalizeTransferResult(transferResult, value)) : [normalizeTransferResult(result, value)]; +} +function normalizeRedirectResult(result, value) { + const redirect = normalizeForwardResult(typeof result === "object" && "redirect" in result ? result.redirect : result, value); + return redirect.length === 0 ? { remain: value, redirect } : typeof result === "object" && "remain" in result ? { remain: result.remain, redirect } : { redirect }; +} +function assert(isValid, message) { + if (!isValid) { + throw new Error(message); + } +} + +// node_modules/vnopts/lib/schemas/choice.js +var ChoiceSchema = class extends Schema { + constructor(parameters) { + super(parameters); + this._choices = mapFromArray(parameters.choices.map((choice) => choice && typeof choice === "object" ? choice : { value: choice }), "value"); + } + expected({ descriptor }) { + const choiceDescriptions = Array.from(this._choices.keys()).map((value) => this._choices.get(value)).filter(({ hidden }) => !hidden).map((choiceInfo) => choiceInfo.value).sort(comparePrimitive).map(descriptor.value); + const head = choiceDescriptions.slice(0, -2); + const tail = choiceDescriptions.slice(-2); + const message = head.concat(tail.join(" or ")).join(", "); + return { + text: message, + list: { + title: "one of the following values", + values: choiceDescriptions + } + }; + } + validate(value) { + return this._choices.has(value); + } + deprecated(value) { + const choiceInfo = this._choices.get(value); + return choiceInfo && choiceInfo.deprecated ? { value } : false; + } + forward(value) { + const choiceInfo = this._choices.get(value); + return choiceInfo ? choiceInfo.forward : void 0; + } + redirect(value) { + const choiceInfo = this._choices.get(value); + return choiceInfo ? choiceInfo.redirect : void 0; + } +}; + +// node_modules/vnopts/lib/schemas/number.js +var NumberSchema = class extends Schema { + expected() { + return "a number"; + } + validate(value, _utils) { + return typeof value === "number"; + } +}; + +// node_modules/vnopts/lib/schemas/integer.js +var IntegerSchema = class extends NumberSchema { + expected() { + return "an integer"; + } + validate(value, utils) { + return utils.normalizeValidateResult(super.validate(value, utils), value) === true && isInt(value); + } +}; + +// node_modules/vnopts/lib/schemas/string.js +var StringSchema = class extends Schema { + expected() { + return "a string"; + } + validate(value) { + return typeof value === "string"; + } +}; + +// node_modules/vnopts/lib/defaults.js +var defaultDescriptor = apiDescriptor; +var defaultUnknownHandler = levenUnknownHandler; +var defaultInvalidHandler = commonInvalidHandler; +var defaultDeprecatedHandler = commonDeprecatedHandler; + +// node_modules/vnopts/lib/normalize.js +var Normalizer = class { + constructor(schemas, opts) { + const { logger = console, loggerPrintWidth = 80, descriptor = defaultDescriptor, unknown = defaultUnknownHandler, invalid = defaultInvalidHandler, deprecated = defaultDeprecatedHandler, missing = () => false, required = () => false, preprocess = (x) => x, postprocess = () => VALUE_UNCHANGED } = opts || {}; + this._utils = { + descriptor, + logger: ( + /* c8 ignore next */ + logger || { warn: () => { + } } + ), + loggerPrintWidth, + schemas: recordFromArray(schemas, "name"), + normalizeDefaultResult, + normalizeExpectedResult, + normalizeDeprecatedResult, + normalizeForwardResult, + normalizeRedirectResult, + normalizeValidateResult + }; + this._unknownHandler = unknown; + this._invalidHandler = normalizeInvalidHandler(invalid); + this._deprecatedHandler = deprecated; + this._identifyMissing = (k, o) => !(k in o) || missing(k, o); + this._identifyRequired = required; + this._preprocess = preprocess; + this._postprocess = postprocess; + this.cleanHistory(); + } + cleanHistory() { + this._hasDeprecationWarned = createAutoChecklist(); + } + normalize(options8) { + const newOptions = {}; + const preprocessed = this._preprocess(options8, this._utils); + const restOptionsArray = [preprocessed]; + const applyNormalization = () => { + while (restOptionsArray.length !== 0) { + const currentOptions = restOptionsArray.shift(); + const transferredOptionsArray = this._applyNormalization(currentOptions, newOptions); + restOptionsArray.push(...transferredOptionsArray); + } + }; + applyNormalization(); + for (const key2 of Object.keys(this._utils.schemas)) { + const schema2 = this._utils.schemas[key2]; + if (!(key2 in newOptions)) { + const defaultResult = normalizeDefaultResult(schema2.default(this._utils)); + if ("value" in defaultResult) { + restOptionsArray.push({ [key2]: defaultResult.value }); + } + } + } + applyNormalization(); + for (const key2 of Object.keys(this._utils.schemas)) { + if (!(key2 in newOptions)) { + continue; + } + const schema2 = this._utils.schemas[key2]; + const value = newOptions[key2]; + const newValue = schema2.postprocess(value, this._utils); + if (newValue === VALUE_UNCHANGED) { + continue; + } + this._applyValidation(newValue, key2, schema2); + newOptions[key2] = newValue; + } + this._applyPostprocess(newOptions); + this._applyRequiredCheck(newOptions); + return newOptions; + } + _applyNormalization(options8, newOptions) { + const transferredOptionsArray = []; + const { knownKeys, unknownKeys } = this._partitionOptionKeys(options8); + for (const key2 of knownKeys) { + const schema2 = this._utils.schemas[key2]; + const value = schema2.preprocess(options8[key2], this._utils); + this._applyValidation(value, key2, schema2); + const appendTransferredOptions = ({ from, to }) => { + transferredOptionsArray.push(typeof to === "string" ? { [to]: from } : { [to.key]: to.value }); + }; + const warnDeprecated = ({ value: currentValue, redirectTo }) => { + const deprecatedResult = normalizeDeprecatedResult( + schema2.deprecated(currentValue, this._utils), + value, + /* doNotNormalizeTrue */ + true + ); + if (deprecatedResult === false) { + return; + } + if (deprecatedResult === true) { + if (!this._hasDeprecationWarned(key2)) { + this._utils.logger.warn(this._deprecatedHandler(key2, redirectTo, this._utils)); + } + } else { + for (const { value: deprecatedValue } of deprecatedResult) { + const pair = { key: key2, value: deprecatedValue }; + if (!this._hasDeprecationWarned(pair)) { + const redirectToPair = typeof redirectTo === "string" ? { key: redirectTo, value: deprecatedValue } : redirectTo; + this._utils.logger.warn(this._deprecatedHandler(pair, redirectToPair, this._utils)); + } + } + } + }; + const forwardResult = normalizeForwardResult(schema2.forward(value, this._utils), value); + forwardResult.forEach(appendTransferredOptions); + const redirectResult = normalizeRedirectResult(schema2.redirect(value, this._utils), value); + redirectResult.redirect.forEach(appendTransferredOptions); + if ("remain" in redirectResult) { + const remainingValue = redirectResult.remain; + newOptions[key2] = key2 in newOptions ? schema2.overlap(newOptions[key2], remainingValue, this._utils) : remainingValue; + warnDeprecated({ value: remainingValue }); + } + for (const { from, to } of redirectResult.redirect) { + warnDeprecated({ value: from, redirectTo: to }); + } + } + for (const key2 of unknownKeys) { + const value = options8[key2]; + this._applyUnknownHandler(key2, value, newOptions, (knownResultKey, knownResultValue) => { + transferredOptionsArray.push({ [knownResultKey]: knownResultValue }); + }); + } + return transferredOptionsArray; + } + _applyRequiredCheck(options8) { + for (const key2 of Object.keys(this._utils.schemas)) { + if (this._identifyMissing(key2, options8)) { + if (this._identifyRequired(key2)) { + throw this._invalidHandler(key2, VALUE_NOT_EXIST, this._utils); + } + } + } + } + _partitionOptionKeys(options8) { + const [knownKeys, unknownKeys] = partition(Object.keys(options8).filter((key2) => !this._identifyMissing(key2, options8)), (key2) => key2 in this._utils.schemas); + return { knownKeys, unknownKeys }; + } + _applyValidation(value, key2, schema2) { + const validateResult = normalizeValidateResult(schema2.validate(value, this._utils), value); + if (validateResult !== true) { + throw this._invalidHandler(key2, validateResult.value, this._utils); + } + } + _applyUnknownHandler(key2, value, newOptions, knownResultHandler) { + const unknownResult = this._unknownHandler(key2, value, this._utils); + if (!unknownResult) { + return; + } + for (const resultKey of Object.keys(unknownResult)) { + if (this._identifyMissing(resultKey, unknownResult)) { + continue; + } + const resultValue = unknownResult[resultKey]; + if (resultKey in this._utils.schemas) { + knownResultHandler(resultKey, resultValue); + } else { + newOptions[resultKey] = resultValue; + } + } + } + _applyPostprocess(options8) { + const postprocessed = this._postprocess(options8, this._utils); + if (postprocessed === VALUE_UNCHANGED) { + return; + } + if (postprocessed.delete) { + for (const deleteKey of postprocessed.delete) { + delete options8[deleteKey]; + } + } + if (postprocessed.override) { + const { knownKeys, unknownKeys } = this._partitionOptionKeys(postprocessed.override); + for (const key2 of knownKeys) { + const value = postprocessed.override[key2]; + this._applyValidation(value, key2, this._utils.schemas[key2]); + options8[key2] = value; + } + for (const key2 of unknownKeys) { + const value = postprocessed.override[key2]; + this._applyUnknownHandler(key2, value, options8, (knownResultKey, knownResultValue) => { + const schema2 = this._utils.schemas[knownResultKey]; + this._applyValidation(knownResultValue, knownResultKey, schema2); + options8[knownResultKey] = knownResultValue; + }); + } + } + } +}; + +// src/common/errors.js +var errors_exports = {}; +__export(errors_exports, { + ArgExpansionBailout: () => ArgExpansionBailout, + ConfigError: () => ConfigError, + UndefinedParserError: () => UndefinedParserError +}); +var ConfigError = class extends Error { + name = "ConfigError"; +}; +var UndefinedParserError = class extends Error { + name = "UndefinedParserError"; +}; +var ArgExpansionBailout = class extends Error { + name = "ArgExpansionBailout"; +}; + +// src/config/resolve-config.js +var import_micromatch = __toESM(require_micromatch(), 1); +import path9 from "path"; + +// node_modules/url-or-path/index.js +import { fileURLToPath, pathToFileURL } from "url"; +var isUrlInstance = (value) => value instanceof URL; +var isUrlString = (value) => typeof value === "string" && value.startsWith("file://"); +var isUrl = (urlOrPath) => isUrlInstance(urlOrPath) || isUrlString(urlOrPath); +var toPath = (urlOrPath) => isUrl(urlOrPath) ? fileURLToPath(urlOrPath) : urlOrPath; + +// src/utils/partition.js +function partition2(array2, predicate) { + const result = [[], []]; + for (const value of array2) { + result[predicate(value) ? 0 : 1].push(value); + } + return result; +} +var partition_default = partition2; + +// src/config/editorconfig/index.js +var import_editorconfig = __toESM(require_src(), 1); +import path4 from "path"; + +// src/config/find-project-root.js +import * as path3 from "path"; + +// src/utils/is-directory.js +import fs from "fs/promises"; +async function isDirectory(directory, options8) { + const allowSymlinks = (options8 == null ? void 0 : options8.allowSymlinks) ?? true; + let stats; + try { + stats = await (allowSymlinks ? fs.stat : fs.lstat)(toPath(directory)); + } catch { + return false; + } + return stats.isDirectory(); +} +var is_directory_default = isDirectory; + +// src/config/searcher.js +import path2 from "path"; + +// node_modules/iterate-directory-up/index.js +import * as path from "path"; +var toAbsolutePath = (value) => path.resolve(toPath(value)); +function* iterateDirectoryUp(from, to) { + from = toAbsolutePath(from); + const { root: root2 } = path.parse(from); + to = to ? toAbsolutePath(to) : root2; + if (from !== to && !from.startsWith(to)) { + return; + } + for (let directory = from; directory !== to; directory = path.dirname(directory)) { + yield directory; + } + yield to; +} +var iterate_directory_up_default = iterateDirectoryUp; + +// src/config/searcher.js +var _names, _filter, _stopDirectory, _cache, _searchInDirectory, searchInDirectory_fn; +var Searcher = class { + /** + * @param {{ + * names: string[], + * filter: (fileOrDirectory: {name: string, path: string}) => Promise, + * stopDirectory?: string, + * }} param0 + */ + constructor({ names, filter: filter2, stopDirectory }) { + __privateAdd(this, _searchInDirectory); + __privateAdd(this, _names, void 0); + __privateAdd(this, _filter, void 0); + __privateAdd(this, _stopDirectory, void 0); + __privateAdd(this, _cache, /* @__PURE__ */ new Map()); + __privateSet(this, _names, names); + __privateSet(this, _filter, filter2); + __privateSet(this, _stopDirectory, stopDirectory); + } + async search(startDirectory, { shouldCache }) { + const cache3 = __privateGet(this, _cache); + if (shouldCache && cache3.has(startDirectory)) { + return cache3.get(startDirectory); + } + const searchedDirectories = []; + let result; + for (const directory of iterate_directory_up_default( + startDirectory, + __privateGet(this, _stopDirectory) + )) { + searchedDirectories.push(directory); + result = await __privateMethod(this, _searchInDirectory, searchInDirectory_fn).call(this, directory, shouldCache); + if (result) { + break; + } + } + for (const directory of searchedDirectories) { + cache3.set(directory, result); + } + return result; + } + clearCache() { + __privateGet(this, _cache).clear(); + } +}; +_names = new WeakMap(); +_filter = new WeakMap(); +_stopDirectory = new WeakMap(); +_cache = new WeakMap(); +_searchInDirectory = new WeakSet(); +searchInDirectory_fn = async function(directory, shouldCache) { + const cache3 = __privateGet(this, _cache); + if (shouldCache && cache3.has(directory)) { + return cache3.get(directory); + } + for (const name of __privateGet(this, _names)) { + const fileOrDirectory = path2.join(directory, name); + if (await __privateGet(this, _filter).call(this, { name, path: fileOrDirectory })) { + return fileOrDirectory; + } + } +}; +var searcher_default = Searcher; + +// src/config/find-project-root.js +var MARKERS = [".git", ".hg"]; +var searcher; +var searchOptions = { + names: MARKERS, + filter: ({ path: directory }) => is_directory_default(directory, { allowSymlinks: false }) +}; +async function findProjectRoot(startDirectory, options8) { + searcher ?? (searcher = new searcher_default(searchOptions)); + const mark = await searcher.search(startDirectory, options8); + return mark ? path3.dirname(mark) : void 0; +} +function clearFindProjectRootCache() { + searcher == null ? void 0 : searcher.clearCache(); +} + +// src/config/editorconfig/editorconfig-to-prettier.js +function removeUnset(editorConfig) { + const result = {}; + const keys = Object.keys(editorConfig); + for (let i = 0; i < keys.length; i++) { + const key2 = keys[i]; + if (editorConfig[key2] === "unset") { + continue; + } + result[key2] = editorConfig[key2]; + } + return result; +} +function editorConfigToPrettier(editorConfig) { + if (!editorConfig) { + return null; + } + editorConfig = removeUnset(editorConfig); + if (Object.keys(editorConfig).length === 0) { + return null; + } + const result = {}; + if (editorConfig.indent_style) { + result.useTabs = editorConfig.indent_style === "tab"; + } + if (editorConfig.indent_size === "tab") { + result.useTabs = true; + } + if (result.useTabs && editorConfig.tab_width) { + result.tabWidth = editorConfig.tab_width; + } else if (editorConfig.indent_style === "space" && editorConfig.indent_size && editorConfig.indent_size !== "tab") { + result.tabWidth = editorConfig.indent_size; + } else if (editorConfig.tab_width !== void 0) { + result.tabWidth = editorConfig.tab_width; + } + if (editorConfig.max_line_length) { + if (editorConfig.max_line_length === "off") { + result.printWidth = Number.POSITIVE_INFINITY; + } else { + result.printWidth = editorConfig.max_line_length; + } + } + if (editorConfig.quote_type === "single") { + result.singleQuote = true; + } else if (editorConfig.quote_type === "double") { + result.singleQuote = false; + } + if (["cr", "crlf", "lf"].includes(editorConfig.end_of_line)) { + result.endOfLine = editorConfig.end_of_line; + } + return result; +} +var editorconfig_to_prettier_default = editorConfigToPrettier; + +// src/config/editorconfig/index.js +var editorconfigCache = /* @__PURE__ */ new Map(); +function clearEditorconfigCache() { + clearFindProjectRootCache(); + editorconfigCache.clear(); +} +async function loadEditorconfigInternal(file, { shouldCache }) { + const directory = path4.dirname(file); + const root2 = await findProjectRoot(directory, { shouldCache }); + const editorConfig = await import_editorconfig.default.parse(file, { root: root2 }); + const config = editorconfig_to_prettier_default(editorConfig); + return config; +} +function loadEditorconfig(file, { shouldCache }) { + file = path4.resolve(file); + if (!shouldCache || !editorconfigCache.has(file)) { + editorconfigCache.set( + file, + loadEditorconfigInternal(file, { shouldCache }) + ); + } + return editorconfigCache.get(file); +} + +// src/config/prettier-config/index.js +import path8 from "path"; + +// src/common/mockable.js +var import_ci_info = __toESM(require_ci_info(), 1); +import fs2 from "fs/promises"; + +// node_modules/get-stdin/index.js +var { stdin } = process; +async function getStdin() { + let result = ""; + if (stdin.isTTY) { + return result; + } + stdin.setEncoding("utf8"); + for await (const chunk of stdin) { + result += chunk; + } + return result; +} +getStdin.buffer = async () => { + const result = []; + let length = 0; + if (stdin.isTTY) { + return Buffer.concat([]); + } + for await (const chunk of stdin) { + result.push(chunk); + length += chunk.length; + } + return Buffer.concat(result, length); +}; + +// src/common/mockable.js +function writeFormattedFile(file, data) { + return fs2.writeFile(file, data); +} +var mockable = { + getPrettierConfigSearchStopDirectory: () => void 0, + getStdin, + isCI: () => import_ci_info.isCI, + writeFormattedFile +}; +var mockable_default = mockable; + +// src/utils/is-file.js +import fs3 from "fs/promises"; +async function isFile(file, options8) { + const allowSymlinks = (options8 == null ? void 0 : options8.allowSymlinks) ?? true; + let stats; + try { + stats = await (allowSymlinks ? fs3.stat : fs3.lstat)(toPath(file)); + } catch { + return false; + } + return stats.isFile(); +} +var is_file_default = isFile; + +// src/config/prettier-config/loaders.js +var import_parse_async = __toESM(require_parse_async(), 1); +import { pathToFileURL as pathToFileURL2 } from "url"; + +// node_modules/js-yaml/dist/js-yaml.mjs +function isNothing(subject) { + return typeof subject === "undefined" || subject === null; +} +function isObject(subject) { + return typeof subject === "object" && subject !== null; +} +function toArray(sequence) { + if (Array.isArray(sequence)) + return sequence; + else if (isNothing(sequence)) + return []; + return [sequence]; +} +function extend(target, source2) { + var index, length, key2, sourceKeys; + if (source2) { + sourceKeys = Object.keys(source2); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key2 = sourceKeys[index]; + target[key2] = source2[key2]; + } + } + return target; +} +function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; +} +function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; +} +var isNothing_1 = isNothing; +var isObject_1 = isObject; +var toArray_1 = toArray; +var repeat_1 = repeat; +var isNegativeZero_1 = isNegativeZero; +var extend_1 = extend; +var common = { + isNothing: isNothing_1, + isObject: isObject_1, + toArray: toArray_1, + repeat: repeat_1, + isNegativeZero: isNegativeZero_1, + extend: extend_1 +}; +function formatError(exception2, compact) { + var where = "", message = exception2.reason || "(unknown reason)"; + if (!exception2.mark) + return message; + if (exception2.mark.name) { + where += 'in "' + exception2.mark.name + '" '; + } + where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; + if (!compact && exception2.mark.snippet) { + where += "\n\n" + exception2.mark.snippet; + } + return message + " " + where; +} +function YAMLException$1(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } +} +YAMLException$1.prototype = Object.create(Error.prototype); +YAMLException$1.prototype.constructor = YAMLException$1; +YAMLException$1.prototype.toString = function toString(compact) { + return this.name + ": " + formatError(this, compact); +}; +var exception = YAMLException$1; +function getLine(buffer2, lineStart, lineEnd, position, maxLineLength) { + var head = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer2.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + // relative position + }; +} +function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; +} +function makeSnippet(mark, options8) { + options8 = Object.create(options8 || null); + if (!mark.buffer) + return null; + if (!options8.maxLength) + options8.maxLength = 79; + if (typeof options8.indent !== "number") + options8.indent = 1; + if (typeof options8.linesBefore !== "number") + options8.linesBefore = 3; + if (typeof options8.linesAfter !== "number") + options8.linesAfter = 2; + var re = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match; + var foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + if (foundLineNo < 0) + foundLineNo = lineStarts.length - 1; + var result = "", i, line3; + var lineNoLength = Math.min(mark.line + options8.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options8.maxLength - (options8.indent + lineNoLength + 3); + for (i = 1; i <= options8.linesBefore; i++) { + if (foundLineNo - i < 0) + break; + line3 = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(" ", options8.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line3.str + "\n" + result; + } + line3 = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options8.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line3.str + "\n"; + result += common.repeat("-", options8.indent + lineNoLength + 3 + line3.pos) + "^\n"; + for (i = 1; i <= options8.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) + break; + line3 = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(" ", options8.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line3.str + "\n"; + } + return result.replace(/\n$/, ""); +} +var snippet = makeSnippet; +var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" +]; +var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" +]; +function compileStyleAliases(map2) { + var result = {}; + if (map2 !== null) { + Object.keys(map2).forEach(function(style) { + map2[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; +} +function Type$1(tag, options8) { + options8 = options8 || {}; + Object.keys(options8).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.options = options8; + this.tag = tag; + this.kind = options8["kind"] || null; + this.resolve = options8["resolve"] || function() { + return true; + }; + this.construct = options8["construct"] || function(data) { + return data; + }; + this.instanceOf = options8["instanceOf"] || null; + this.predicate = options8["predicate"] || null; + this.represent = options8["represent"] || null; + this.representName = options8["representName"] || null; + this.defaultStyle = options8["defaultStyle"] || null; + this.multi = options8["multi"] || false; + this.styleAliases = compileStyleAliases(options8["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} +var type = Type$1; +function compileList(schema2, name) { + var result = []; + schema2[name].forEach(function(currentType) { + var newIndex = result.length; + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { + newIndex = previousIndex; + } + }); + result[newIndex] = currentType; + }); + return result; +} +function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + function collectType(type2) { + if (type2.multi) { + result.multi[type2.kind].push(type2); + result.multi["fallback"].push(type2); + } else { + result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; + } + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} +function Schema$1(definition) { + return this.extend(definition); +} +Schema$1.prototype.extend = function extend2(definition) { + var implicit = []; + var explicit = []; + if (definition instanceof type) { + explicit.push(definition); + } else if (Array.isArray(definition)) { + explicit = explicit.concat(definition); + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) + implicit = implicit.concat(definition.implicit); + if (definition.explicit) + explicit = explicit.concat(definition.explicit); + } else { + throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type$1.loadKind && type$1.loadKind !== "scalar") { + throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type$1.multi) { + throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type$1) { + if (!(type$1 instanceof type)) { + throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + var result = Object.create(Schema$1.prototype); + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList(result, "implicit"); + result.compiledExplicit = compileList(result, "explicit"); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + return result; +}; +var schema = Schema$1; +var str = new type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; + } +}); +var seq = new type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } +}); +var map = new type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } +}); +var failsafe = new schema({ + explicit: [ + str, + seq, + map + ] +}); +function resolveYamlNull(data) { + if (data === null) + return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); +} +function constructYamlNull() { + return null; +} +function isNull(object) { + return object === null; +} +var _null = new type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" +}); +function resolveYamlBoolean(data) { + if (data === null) + return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); +} +function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; +} +function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; +} +var bool = new type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" +}); +function isHexCode(c2) { + return 48 <= c2 && c2 <= 57 || 65 <= c2 && c2 <= 70 || 97 <= c2 && c2 <= 102; +} +function isOctCode(c2) { + return 48 <= c2 && c2 <= 55; +} +function isDecCode(c2) { + return 48 <= c2 && c2 <= 57; +} +function resolveYamlInteger(data) { + if (data === null) + return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) + return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) + return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (ch !== "0" && ch !== "1") + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isHexCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "o") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isOctCode(data.charCodeAt(index))) + return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + } + if (ch === "_") + return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") + continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") + return false; + return true; +} +function constructYamlInteger(data) { + var value = data, sign2 = 1, ch; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") + sign2 = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") + return 0; + if (ch === "0") { + if (value[1] === "b") + return sign2 * parseInt(value.slice(2), 2); + if (value[1] === "x") + return sign2 * parseInt(value.slice(2), 16); + if (value[1] === "o") + return sign2 * parseInt(value.slice(2), 8); + } + return sign2 * parseInt(value, 10); +} +function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); +} +var int = new type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + /* eslint-disable max-len */ + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } +}); +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" +); +function resolveYamlFloat(data) { + if (data === null) + return false; + if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === "_") { + return false; + } + return true; +} +function constructYamlFloat(data) { + var value, sign2; + value = data.replace(/_/g, "").toLowerCase(); + sign2 = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign2 === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } + return sign2 * parseFloat(value, 10); +} +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; +function representYamlFloat(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; +} +function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); +} +var float = new type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: "lowercase" +}); +var json = failsafe.extend({ + implicit: [ + _null, + bool, + int, + float + ] +}); +var core = json; +var YAML_DATE_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" +); +var YAML_TIMESTAMP_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" +); +function resolveYamlTimestamp(data) { + if (data === null) + return false; + if (YAML_DATE_REGEXP.exec(data) !== null) + return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) + return true; + return false; +} +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP.exec(data); + if (match === null) + match = YAML_TIMESTAMP_REGEXP.exec(data); + if (match === null) + throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") + delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) + date.setTime(date.getTime() - delta); + return date; +} +function representYamlTimestamp(object) { + return object.toISOString(); +} +var timestamp = new type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); +function resolveYamlMerge(data) { + return data === "<<" || data === null; +} +var merge = new type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge +}); +var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; +function resolveYamlBinary(data) { + if (data === null) + return false; + var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + code = map2.indexOf(data.charAt(idx)); + if (code > 64) + continue; + if (code < 0) + return false; + bitlen += 6; + } + return bitlen % 8 === 0; +} +function constructYamlBinary(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map2.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); +} +function representYamlBinary(object) { + var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } else if (tail === 2) { + result += map2[bits >> 10 & 63]; + result += map2[bits >> 4 & 63]; + result += map2[bits << 2 & 63]; + result += map2[64]; + } else if (tail === 1) { + result += map2[bits >> 2 & 63]; + result += map2[bits << 4 & 63]; + result += map2[64]; + result += map2[64]; + } + return result; +} +function isBinary(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; +} +var binary = new type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); +var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; +var _toString$2 = Object.prototype.toString; +function resolveYamlOmap(data) { + if (data === null) + return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString$2.call(pair) !== "[object Object]") + return false; + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) + pairHasKey = true; + else + return false; + } + } + if (!pairHasKey) + return false; + if (objectKeys.indexOf(pairKey) === -1) + objectKeys.push(pairKey); + else + return false; + } + return true; +} +function constructYamlOmap(data) { + return data !== null ? data : []; +} +var omap = new type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); +var _toString$1 = Object.prototype.toString; +function resolveYamlPairs(data) { + if (data === null) + return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString$1.call(pair) !== "[object Object]") + return false; + keys = Object.keys(pair); + if (keys.length !== 1) + return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; +} +function constructYamlPairs(data) { + if (data === null) + return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; +} +var pairs = new type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); +var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; +function resolveYamlSet(data) { + if (data === null) + return true; + var key2, object = data; + for (key2 in object) { + if (_hasOwnProperty$2.call(object, key2)) { + if (object[key2] !== null) + return false; + } + } + return true; +} +function constructYamlSet(data) { + return data !== null ? data : {}; +} +var set = new type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet, + construct: constructYamlSet +}); +var _default = core.extend({ + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] +}); +var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; +function _class(obj) { + return Object.prototype.toString.call(obj); +} +function is_EOL(c2) { + return c2 === 10 || c2 === 13; +} +function is_WHITE_SPACE(c2) { + return c2 === 9 || c2 === 32; +} +function is_WS_OR_EOL(c2) { + return c2 === 9 || c2 === 32 || c2 === 10 || c2 === 13; +} +function is_FLOW_INDICATOR(c2) { + return c2 === 44 || c2 === 91 || c2 === 93 || c2 === 123 || c2 === 125; +} +function fromHexCode(c2) { + var lc; + if (48 <= c2 && c2 <= 57) { + return c2 - 48; + } + lc = c2 | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; +} +function escapedHexLen(c2) { + if (c2 === 120) { + return 2; + } + if (c2 === 117) { + return 4; + } + if (c2 === 85) { + return 8; + } + return 0; +} +function fromDecimalCode(c2) { + if (48 <= c2 && c2 <= 57) { + return c2 - 48; + } + return -1; +} +function simpleEscapeSequence(c2) { + return c2 === 48 ? "\0" : c2 === 97 ? "\x07" : c2 === 98 ? "\b" : c2 === 116 ? " " : c2 === 9 ? " " : c2 === 110 ? "\n" : c2 === 118 ? "\v" : c2 === 102 ? "\f" : c2 === 114 ? "\r" : c2 === 101 ? "\x1B" : c2 === 32 ? " " : c2 === 34 ? '"' : c2 === 47 ? "/" : c2 === 92 ? "\\" : c2 === 78 ? "\x85" : c2 === 95 ? "\xA0" : c2 === 76 ? "\u2028" : c2 === 80 ? "\u2029" : ""; +} +function charFromCodepoint(c2) { + if (c2 <= 65535) { + return String.fromCharCode(c2); + } + return String.fromCharCode( + (c2 - 65536 >> 10) + 55296, + (c2 - 65536 & 1023) + 56320 + ); +} +var simpleEscapeCheck = new Array(256); +var simpleEscapeMap = new Array(256); +for (i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} +var i; +function State$1(input, options8) { + this.input = input; + this.filename = options8["filename"] || null; + this.schema = options8["schema"] || _default; + this.onWarning = options8["onWarning"] || null; + this.legacy = options8["legacy"] || false; + this.json = options8["json"] || false; + this.listener = options8["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.firstTabInLine = -1; + this.documents = []; +} +function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), + // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + mark.snippet = snippet(mark); + return new exception(message, mark); +} +function throwError(state, message) { + throw generateError(state, message); +} +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} +var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args) { + var match, major, minor; + if (state.version !== null) { + throwError(state, "duplication of %YAML directive"); + } + if (args.length !== 1) { + throwError(state, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) { + throwError(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError(state, "unacceptable YAML version of the document"); + } + state.version = args[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning(state, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective(state, name, args) { + var handle, prefix; + if (args.length !== 2) { + throwError(state, "TAG directive accepts exactly two arguments"); + } + handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty$1.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, "tag prefix is malformed: " + prefix); + } + state.tagMap[handle] = prefix; + } +}; +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + if (start < end) { + _result = state.input.slice(start, end); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, "the stream contains non-printable characters"); + } + state.result += _result; + } +} +function mergeMappings(state, destination, source2, overridableKeys) { + var sourceKeys, key2, index, quantity; + if (!common.isObject(source2)) { + throwError(state, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source2); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key2 = sourceKeys[index]; + if (!_hasOwnProperty$1.call(destination, key2)) { + destination[key2] = source2[key2]; + overridableKeys[key2] = true; + } + } +} +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { + keyNode[index] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty$1.call(overridableKeys, keyNode) && _hasOwnProperty$1.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, "duplicated mapping key"); + } + if (keyNode === "__proto__") { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + return _result; +} +function readLineBreak(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (ch === 10) { + state.position++; + } else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) { + state.position++; + } + } else { + throwError(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; +} +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 9 && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); + } + return lineBreaks; +} +function testDocumentSeparator(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; +} +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common.repeat("\n", count - 1); + } +} +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { break; - case DOC_TYPE_ALIGN: - case DOC_TYPE_INDENT: - case DOC_TYPE_INDENT_IF_BREAK: - case DOC_TYPE_LABEL: - case DOC_TYPE_LINE_SUFFIX: - docsStack.push(doc3.contents); + } + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result) { + return true; + } + state.kind = _kind; + state.result = _result; + return false; +} +function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 39) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a single quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); +} +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 34) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 34) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, "expected hexadecimal character"); + } + } + state.result += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); +} +function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, "missed comma between flow collection entries"); + } else if (ch === 44) { + throwError(state, "expected the node content, but found ','"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError(state, "unexpected end of the stream within a flow collection"); +} +function readBlockScalar(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { + state.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state.result += " "; + } + } else { + state.result += common.repeat("\n", emptyLines); + } + } else { + state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, state.position, false); + } + return true; +} +function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.firstTabInLine !== -1) + return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + if (ch !== 45) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; +} +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.firstTabInLine !== -1) + return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state.position += 1; + ch = following; + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { break; - case DOC_TYPE_STRING: - case DOC_TYPE_CURSOR: - case DOC_TYPE_TRIM: - case DOC_TYPE_LINE_SUFFIX_BOUNDARY: - case DOC_TYPE_LINE: - case DOC_TYPE_BREAK_PARENT: + } + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) { + throwError(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; +} +function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 33) + return false; + if (state.tag !== null) { + throwError(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, "tag name cannot contain such characters: " + tagName); + } + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, "tag name is malformed: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; +} +function readAnchorProperty(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 38) + return false; + if (state.anchor !== null) { + throwError(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; +} +function readAlias(state) { + var _position, alias, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 42) + return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an alias node must contain at least one character"); + } + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } else if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type2 = state.implicitTypes[typeIndex]; + if (type2.resolve(state.result)) { + state.result = type2.construct(state.result); + state.tag = type2.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } break; - default: - throw new invalid_doc_error_default(doc3); + } + } + } else if (state.tag !== "!") { + if (_hasOwnProperty$1.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type2 = state.typeMap[state.kind || "fallback"][state.tag]; + } else { + type2 = null; + typeList = state.typeMap.multi[state.kind || "fallback"]; + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type2 = typeList[typeIndex]; + break; + } + } + } + if (!type2) { + throwError(state, "unknown tag !<" + state.tag + ">"); + } + if (state.result !== null && type2.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + state.kind + '"'); + } + if (!type2.resolve(state.result, state.tag)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type2.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } } } + if (state.listener !== null) { + state.listener("close", state); + } + return state.tag !== null || state.anchor !== null || hasContent; } -var traverse_doc_default = traverseDoc; - -// src/document/utils/assert-doc.js -var noop = () => { -}; -var assertDoc = true ? noop : function(doc2) { - traverse_doc_default(doc2, (doc3) => { - if (checked.has(doc3)) { - return false; +function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = /* @__PURE__ */ Object.create(null); + state.anchorMap = /* @__PURE__ */ Object.create(null); + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) { + break; } - if (typeof doc3 !== "string") { - checked.add(doc3); + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) + break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) + readLineBreak(state); + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); } - }); -}; -var assertDocArray = true ? noop : function(docs, optional = false) { - if (optional && !docs) { - return; } - if (!Array.isArray(docs)) { - throw new TypeError("Unexpected doc array."); + skipSeparationSpace(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); } - for (const doc2 of docs) { - assertDoc(doc2); + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); } -}; - -// src/document/builders.js -function indent(contents) { - assertDoc(contents); - return { type: DOC_TYPE_INDENT, contents }; -} -function align(widthOrString, contents) { - assertDoc(contents); - return { type: DOC_TYPE_ALIGN, contents, n: widthOrString }; -} -function fill(parts) { - assertDocArray(parts); - return { type: DOC_TYPE_FILL, parts }; -} -function lineSuffix(contents) { - assertDoc(contents); - return { type: DOC_TYPE_LINE_SUFFIX, contents }; -} -var breakParent = { type: DOC_TYPE_BREAK_PARENT }; -var hardlineWithoutBreakParent = { type: DOC_TYPE_LINE, hard: true }; -var line = { type: DOC_TYPE_LINE }; -var hardline = [hardlineWithoutBreakParent, breakParent]; -var cursor = { type: DOC_TYPE_CURSOR }; -function addAlignmentToDoc(doc2, size, tabWidth) { - assertDoc(doc2); - let aligned = doc2; - if (size > 0) { - for (let i = 0; i < Math.floor(size / tabWidth); ++i) { - aligned = indent(aligned); + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace(state, true, -1); } - aligned = align(size % tabWidth, aligned); - aligned = align(Number.NEGATIVE_INFINITY, aligned); + return; } - return aligned; -} - -// scripts/build/shims/at.js -var at = (isOptionalObject, object, index) => { - if (isOptionalObject && (object === void 0 || object === null)) { + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { return; } - if (Array.isArray(object) || typeof object === "string") { - return object[index < 0 ? object.length + index : index]; +} +function loadDocuments(input, options8) { + input = String(input); + options8 = options8 || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } } - return object.at(index); -}; -var at_default = at; - -// src/common/end-of-line.js -function guessEndOfLine(text) { - const index = text.indexOf("\r"); - if (index >= 0) { - return text.charAt(index + 1) === "\n" ? "crlf" : "cr"; + var state = new State$1(input, options8); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, "null byte is not allowed in input"); } - return "lf"; + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + readDocument(state); + } + return state.documents; } -function convertEndOfLineToChars(value) { - switch (value) { - case "cr": - return "\r"; - case "crlf": - return "\r\n"; - default: - return "\n"; +function loadAll$1(input, iterator, options8) { + if (iterator !== null && typeof iterator === "object" && typeof options8 === "undefined") { + options8 = iterator; + iterator = null; + } + var documents = loadDocuments(input, options8); + if (typeof iterator !== "function") { + return documents; + } + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); } } -function countEndOfLineChars(text, eol) { - let regex; - switch (eol) { - case "\n": - regex = /\n/g; - break; - case "\r": - regex = /\r/g; - break; - case "\r\n": - regex = /\r\n/g; - break; - default: - throw new Error(`Unexpected "eol" ${JSON.stringify(eol)}.`); +function load$1(input, options8) { + var documents = loadDocuments(input, options8); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; } - const endOfLines = text.match(regex); - return endOfLines ? endOfLines.length : 0; + throw new exception("expected a single document in the stream, but found more"); } -function normalizeEndOfLine(text) { - return string_replace_all_default( - /* isOptionalObject*/ - false, - text, - /\r\n?/g, - "\n" - ); +var loadAll_1 = loadAll$1; +var load_1 = load$1; +var loader = { + loadAll: loadAll_1, + load: load_1 +}; +var ESCAPE_SEQUENCES = {}; +ESCAPE_SEQUENCES[0] = "\\0"; +ESCAPE_SEQUENCES[7] = "\\a"; +ESCAPE_SEQUENCES[8] = "\\b"; +ESCAPE_SEQUENCES[9] = "\\t"; +ESCAPE_SEQUENCES[10] = "\\n"; +ESCAPE_SEQUENCES[11] = "\\v"; +ESCAPE_SEQUENCES[12] = "\\f"; +ESCAPE_SEQUENCES[13] = "\\r"; +ESCAPE_SEQUENCES[27] = "\\e"; +ESCAPE_SEQUENCES[34] = '\\"'; +ESCAPE_SEQUENCES[92] = "\\\\"; +ESCAPE_SEQUENCES[133] = "\\N"; +ESCAPE_SEQUENCES[160] = "\\_"; +ESCAPE_SEQUENCES[8232] = "\\L"; +ESCAPE_SEQUENCES[8233] = "\\P"; +function renamed(from, to) { + return function() { + throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); + }; } - -// node_modules/emoji-regex/index.mjs -var emoji_regex_default = () => { - return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; +var load = loader.load; +var loadAll = loader.loadAll; +var safeLoad = renamed("safeLoad", "load"); +var safeLoadAll = renamed("safeLoadAll", "loadAll"); +var safeDump = renamed("safeDump", "dump"); + +// node_modules/json5/dist/index.mjs +var Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/; +var ID_Start = /[\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\u0860-\u086A\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\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\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-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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\uDF2D-\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\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\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\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\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\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/; +var ID_Continue = /[\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\u0860-\u086A\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\u09FC\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-\u0AFF\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\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\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-\u1CF9\u1D00-\u1DF9\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\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-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\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\uDF2D-\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\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\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\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\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\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; +var unicode = { + Space_Separator, + ID_Start, + ID_Continue }; - -// node_modules/get-east-asian-width/lookup.js -function isFullWidth(x) { - return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510; +var util = { + isSpaceSeparator(c2) { + return typeof c2 === "string" && unicode.Space_Separator.test(c2); + }, + isIdStartChar(c2) { + return typeof c2 === "string" && (c2 >= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z" || c2 === "$" || c2 === "_" || unicode.ID_Start.test(c2)); + }, + isIdContinueChar(c2) { + return typeof c2 === "string" && (c2 >= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z" || c2 >= "0" && c2 <= "9" || c2 === "$" || c2 === "_" || c2 === "\u200C" || c2 === "\u200D" || unicode.ID_Continue.test(c2)); + }, + isDigit(c2) { + return typeof c2 === "string" && /[0-9]/.test(c2); + }, + isHexDigit(c2) { + return typeof c2 === "string" && /[0-9A-Fa-f]/.test(c2); + } +}; +var source; +var parseState; +var stack; +var pos; +var line; +var column; +var token; +var key; +var root; +var parse2 = function parse3(text, reviver) { + source = String(text); + parseState = "start"; + stack = []; + pos = 0; + line = 1; + column = 0; + token = void 0; + key = void 0; + root = void 0; + do { + token = lex(); + parseStates[parseState](); + } while (token.type !== "eof"); + if (typeof reviver === "function") { + return internalize({ "": root }, "", reviver); + } + return root; +}; +function internalize(holder, name, reviver) { + const value = holder[name]; + if (value != null && typeof value === "object") { + if (Array.isArray(value)) { + for (let i = 0; i < value.length; i++) { + const key2 = String(i); + const replacement = internalize(value, key2, reviver); + if (replacement === void 0) { + delete value[key2]; + } else { + Object.defineProperty(value, key2, { + value: replacement, + writable: true, + enumerable: true, + configurable: true + }); + } + } + } else { + for (const key2 in value) { + const replacement = internalize(value, key2, reviver); + if (replacement === void 0) { + delete value[key2]; + } else { + Object.defineProperty(value, key2, { + value: replacement, + writable: true, + enumerable: true, + configurable: true + }); + } + } + } + } + return reviver.call(holder, name, value); } -function isWide(x) { - return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141; +var lexState; +var buffer; +var doubleQuote; +var sign; +var c; +function lex() { + lexState = "default"; + buffer = ""; + doubleQuote = false; + sign = 1; + for (; ; ) { + c = peek(); + const token2 = lexStates[lexState](); + if (token2) { + return token2; + } + } } - -// node_modules/get-east-asian-width/index.js -var _isNarrowWidth = (codePoint) => !(isFullWidth(codePoint) || isWide(codePoint)); - -// src/utils/get-string-width.js -var notAsciiRegex = /[^\x20-\x7F]/; -function getStringWidth(text) { - if (!text) { - return 0; +function peek() { + if (source[pos]) { + return String.fromCodePoint(source.codePointAt(pos)); } - if (!notAsciiRegex.test(text)) { - return text.length; +} +function read() { + const c2 = peek(); + if (c2 === "\n") { + line++; + column = 0; + } else if (c2) { + column += c2.length; + } else { + column++; } - text = text.replace(emoji_regex_default(), " "); - let width = 0; - for (const character of text) { - const codePoint = character.codePointAt(0); - if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) { - continue; + if (c2) { + pos += c2.length; + } + return c2; +} +var lexStates = { + default() { + switch (c) { + case " ": + case "\v": + case "\f": + case " ": + case "\xA0": + case "\uFEFF": + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + return; + case "/": + read(); + lexState = "comment"; + return; + case void 0: + read(); + return newToken("eof"); + } + if (util.isSpaceSeparator(c)) { + read(); + return; + } + return lexStates[parseState](); + }, + comment() { + switch (c) { + case "*": + read(); + lexState = "multiLineComment"; + return; + case "/": + read(); + lexState = "singleLineComment"; + return; + } + throw invalidChar(read()); + }, + multiLineComment() { + switch (c) { + case "*": + read(); + lexState = "multiLineCommentAsterisk"; + return; + case void 0: + throw invalidChar(read()); + } + read(); + }, + multiLineCommentAsterisk() { + switch (c) { + case "*": + read(); + return; + case "/": + read(); + lexState = "default"; + return; + case void 0: + throw invalidChar(read()); + } + read(); + lexState = "multiLineComment"; + }, + singleLineComment() { + switch (c) { + case "\n": + case "\r": + case "\u2028": + case "\u2029": + read(); + lexState = "default"; + return; + case void 0: + read(); + return newToken("eof"); + } + read(); + }, + value() { + switch (c) { + case "{": + case "[": + return newToken("punctuator", read()); + case "n": + read(); + literal("ull"); + return newToken("null", null); + case "t": + read(); + literal("rue"); + return newToken("boolean", true); + case "f": + read(); + literal("alse"); + return newToken("boolean", false); + case "-": + case "+": + if (read() === "-") { + sign = -1; + } + lexState = "sign"; + return; + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + case '"': + case "'": + doubleQuote = read() === '"'; + buffer = ""; + lexState = "string"; + return; + } + throw invalidChar(read()); + }, + identifierNameStartEscape() { + if (c !== "u") { + throw invalidChar(read()); + } + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": + break; + default: + if (!util.isIdStartChar(u)) { + throw invalidIdentifier(); + } + break; + } + buffer += u; + lexState = "identifierName"; + }, + identifierName() { + switch (c) { + case "$": + case "_": + case "\u200C": + case "\u200D": + buffer += read(); + return; + case "\\": + read(); + lexState = "identifierNameEscape"; + return; + } + if (util.isIdContinueChar(c)) { + buffer += read(); + return; + } + return newToken("identifier", buffer); + }, + identifierNameEscape() { + if (c !== "u") { + throw invalidChar(read()); + } + read(); + const u = unicodeEscape(); + switch (u) { + case "$": + case "_": + case "\u200C": + case "\u200D": + break; + default: + if (!util.isIdContinueChar(u)) { + throw invalidIdentifier(); + } + break; + } + buffer += u; + lexState = "identifierName"; + }, + sign() { + switch (c) { + case ".": + buffer = read(); + lexState = "decimalPointLeading"; + return; + case "0": + buffer = read(); + lexState = "zero"; + return; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + buffer = read(); + lexState = "decimalInteger"; + return; + case "I": + read(); + literal("nfinity"); + return newToken("numeric", sign * Infinity); + case "N": + read(); + literal("aN"); + return newToken("numeric", NaN); + } + throw invalidChar(read()); + }, + zero() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + case "x": + case "X": + buffer += read(); + lexState = "hexadecimal"; + return; + } + return newToken("numeric", sign * 0); + }, + decimalInteger() { + switch (c) { + case ".": + buffer += read(); + lexState = "decimalPoint"; + return; + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalPointLeading() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + throw invalidChar(read()); + }, + decimalPoint() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalFraction"; + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalFraction() { + switch (c) { + case "e": + case "E": + buffer += read(); + lexState = "decimalExponent"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + decimalExponent() { + switch (c) { + case "+": + case "-": + buffer += read(); + lexState = "decimalExponentSign"; + return; + } + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentSign() { + if (util.isDigit(c)) { + buffer += read(); + lexState = "decimalExponentInteger"; + return; + } + throw invalidChar(read()); + }, + decimalExponentInteger() { + if (util.isDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + hexadecimal() { + if (util.isHexDigit(c)) { + buffer += read(); + lexState = "hexadecimalInteger"; + return; + } + throw invalidChar(read()); + }, + hexadecimalInteger() { + if (util.isHexDigit(c)) { + buffer += read(); + return; + } + return newToken("numeric", sign * Number(buffer)); + }, + string() { + switch (c) { + case "\\": + read(); + buffer += escape(); + return; + case '"': + if (doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "'": + if (!doubleQuote) { + read(); + return newToken("string", buffer); + } + buffer += read(); + return; + case "\n": + case "\r": + throw invalidChar(read()); + case "\u2028": + case "\u2029": + separatorChar(c); + break; + case void 0: + throw invalidChar(read()); } - if (codePoint >= 768 && codePoint <= 879) { - continue; + buffer += read(); + }, + start() { + switch (c) { + case "{": + case "[": + return newToken("punctuator", read()); } - width += _isNarrowWidth(codePoint) ? 1 : 2; - } - return width; -} -var get_string_width_default = getStringWidth; - -// src/document/utils.js -var getDocParts = (doc2) => { - if (Array.isArray(doc2)) { - return doc2; - } - if (doc2.type !== DOC_TYPE_FILL) { - throw new Error(`Expect doc to be 'array' or '${DOC_TYPE_FILL}'.`); - } - return doc2.parts; -}; -function mapDoc(doc2, cb) { - if (typeof doc2 === "string") { - return cb(doc2); - } - const mapped = /* @__PURE__ */ new Map(); - return rec(doc2); - function rec(doc3) { - if (mapped.has(doc3)) { - return mapped.get(doc3); + lexState = "value"; + }, + beforePropertyName() { + switch (c) { + case "$": + case "_": + buffer = read(); + lexState = "identifierName"; + return; + case "\\": + read(); + lexState = "identifierNameStartEscape"; + return; + case "}": + return newToken("punctuator", read()); + case '"': + case "'": + doubleQuote = read() === '"'; + lexState = "string"; + return; } - const result = process4(doc3); - mapped.set(doc3, result); - return result; - } - function process4(doc3) { - switch (get_doc_type_default(doc3)) { - case DOC_TYPE_ARRAY: - return cb(doc3.map(rec)); - case DOC_TYPE_FILL: - return cb({ - ...doc3, - parts: doc3.parts.map(rec) - }); - case DOC_TYPE_IF_BREAK: - return cb({ - ...doc3, - breakContents: rec(doc3.breakContents), - flatContents: rec(doc3.flatContents) - }); - case DOC_TYPE_GROUP: { - let { - expandedStates, - contents - } = doc3; - if (expandedStates) { - expandedStates = expandedStates.map(rec); - contents = expandedStates[0]; - } else { - contents = rec(contents); - } - return cb({ - ...doc3, - contents, - expandedStates - }); - } - case DOC_TYPE_ALIGN: - case DOC_TYPE_INDENT: - case DOC_TYPE_INDENT_IF_BREAK: - case DOC_TYPE_LABEL: - case DOC_TYPE_LINE_SUFFIX: - return cb({ - ...doc3, - contents: rec(doc3.contents) - }); - case DOC_TYPE_STRING: - case DOC_TYPE_CURSOR: - case DOC_TYPE_TRIM: - case DOC_TYPE_LINE_SUFFIX_BOUNDARY: - case DOC_TYPE_LINE: - case DOC_TYPE_BREAK_PARENT: - return cb(doc3); - default: - throw new invalid_doc_error_default(doc3); + if (util.isIdStartChar(c)) { + buffer += read(); + lexState = "identifierName"; + return; } - } -} -function breakParentGroup(groupStack) { - if (groupStack.length > 0) { - const parentGroup = at_default( - /* isOptionalObject*/ - false, - groupStack, - -1 - ); - if (!parentGroup.expandedStates && !parentGroup.break) { - parentGroup.break = "propagated"; + throw invalidChar(read()); + }, + afterPropertyName() { + if (c === ":") { + return newToken("punctuator", read()); } - } - return null; -} -function propagateBreaks(doc2) { - const alreadyVisitedSet = /* @__PURE__ */ new Set(); - const groupStack = []; - function propagateBreaksOnEnterFn(doc3) { - if (doc3.type === DOC_TYPE_BREAK_PARENT) { - breakParentGroup(groupStack); + throw invalidChar(read()); + }, + beforePropertyValue() { + lexState = "value"; + }, + afterPropertyValue() { + switch (c) { + case ",": + case "}": + return newToken("punctuator", read()); } - if (doc3.type === DOC_TYPE_GROUP) { - groupStack.push(doc3); - if (alreadyVisitedSet.has(doc3)) { - return false; - } - alreadyVisitedSet.add(doc3); + throw invalidChar(read()); + }, + beforeArrayValue() { + if (c === "]") { + return newToken("punctuator", read()); } - } - function propagateBreaksOnExitFn(doc3) { - if (doc3.type === DOC_TYPE_GROUP) { - const group = groupStack.pop(); - if (group.break) { - breakParentGroup(groupStack); - } + lexState = "value"; + }, + afterArrayValue() { + switch (c) { + case ",": + case "]": + return newToken("punctuator", read()); } + throw invalidChar(read()); + }, + end() { + throw invalidChar(read()); } - traverse_doc_default( - doc2, - propagateBreaksOnEnterFn, - propagateBreaksOnExitFn, - /* shouldTraverseConditionalGroups */ - true - ); +}; +function newToken(type2, value) { + return { + type: type2, + value, + line, + column + }; } -function stripTrailingHardlineFromParts(parts) { - parts = [...parts]; - while (parts.length >= 2 && at_default( - /* isOptionalObject*/ - false, - parts, - -2 - ).type === DOC_TYPE_LINE && at_default( - /* isOptionalObject*/ - false, - parts, - -1 - ).type === DOC_TYPE_BREAK_PARENT) { - parts.length -= 2; - } - if (parts.length > 0) { - const lastPart = stripTrailingHardlineFromDoc(at_default( - /* isOptionalObject*/ - false, - parts, - -1 - )); - parts[parts.length - 1] = lastPart; +function literal(s) { + for (const c2 of s) { + const p = peek(); + if (p !== c2) { + throw invalidChar(read()); + } + read(); } - return parts; } -function stripTrailingHardlineFromDoc(doc2) { - switch (get_doc_type_default(doc2)) { - case DOC_TYPE_ALIGN: - case DOC_TYPE_INDENT: - case DOC_TYPE_INDENT_IF_BREAK: - case DOC_TYPE_GROUP: - case DOC_TYPE_LINE_SUFFIX: - case DOC_TYPE_LABEL: { - const contents = stripTrailingHardlineFromDoc(doc2.contents); - return { - ...doc2, - contents - }; +function escape() { + const c2 = peek(); + switch (c2) { + case "b": + read(); + return "\b"; + case "f": + read(); + return "\f"; + case "n": + read(); + return "\n"; + case "r": + read(); + return "\r"; + case "t": + read(); + return " "; + case "v": + read(); + return "\v"; + case "0": + read(); + if (util.isDigit(peek())) { + throw invalidChar(read()); + } + return "\0"; + case "x": + read(); + return hexEscape(); + case "u": + read(); + return unicodeEscape(); + case "\n": + case "\u2028": + case "\u2029": + read(); + return ""; + case "\r": + read(); + if (peek() === "\n") { + read(); + } + return ""; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + throw invalidChar(read()); + case void 0: + throw invalidChar(read()); + } + return read(); +} +function hexEscape() { + let buffer2 = ""; + let c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); + } + buffer2 += read(); + return String.fromCodePoint(parseInt(buffer2, 16)); +} +function unicodeEscape() { + let buffer2 = ""; + let count = 4; + while (count-- > 0) { + const c2 = peek(); + if (!util.isHexDigit(c2)) { + throw invalidChar(read()); } - case DOC_TYPE_IF_BREAK: - return { - ...doc2, - breakContents: stripTrailingHardlineFromDoc(doc2.breakContents), - flatContents: stripTrailingHardlineFromDoc(doc2.flatContents) - }; - case DOC_TYPE_FILL: - return { - ...doc2, - parts: stripTrailingHardlineFromParts(doc2.parts) - }; - case DOC_TYPE_ARRAY: - return stripTrailingHardlineFromParts(doc2); - case DOC_TYPE_STRING: - return doc2.replace(/[\n\r]*$/, ""); - case DOC_TYPE_CURSOR: - case DOC_TYPE_TRIM: - case DOC_TYPE_LINE_SUFFIX_BOUNDARY: - case DOC_TYPE_LINE: - case DOC_TYPE_BREAK_PARENT: - break; - default: - throw new invalid_doc_error_default(doc2); + buffer2 += read(); } - return doc2; -} -function stripTrailingHardline(doc2) { - return stripTrailingHardlineFromDoc(cleanDoc(doc2)); + return String.fromCodePoint(parseInt(buffer2, 16)); } -function cleanDocFn(doc2) { - switch (get_doc_type_default(doc2)) { - case DOC_TYPE_FILL: - if (doc2.parts.every((part) => part === "")) { - return ""; - } - break; - case DOC_TYPE_GROUP: - if (!doc2.contents && !doc2.id && !doc2.break && !doc2.expandedStates) { - return ""; - } - if (doc2.contents.type === DOC_TYPE_GROUP && doc2.contents.id === doc2.id && doc2.contents.break === doc2.break && doc2.contents.expandedStates === doc2.expandedStates) { - return doc2.contents; - } - break; - case DOC_TYPE_ALIGN: - case DOC_TYPE_INDENT: - case DOC_TYPE_INDENT_IF_BREAK: - case DOC_TYPE_LINE_SUFFIX: - if (!doc2.contents) { - return ""; +var parseStates = { + start() { + if (token.type === "eof") { + throw invalidEOF(); + } + push(); + }, + beforePropertyName() { + switch (token.type) { + case "identifier": + case "string": + key = token.value; + parseState = "afterPropertyName"; + return; + case "punctuator": + pop(); + return; + case "eof": + throw invalidEOF(); + } + }, + afterPropertyName() { + if (token.type === "eof") { + throw invalidEOF(); + } + parseState = "beforePropertyValue"; + }, + beforePropertyValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + push(); + }, + beforeArrayValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + if (token.type === "punctuator" && token.value === "]") { + pop(); + return; + } + push(); + }, + afterPropertyValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + switch (token.value) { + case ",": + parseState = "beforePropertyName"; + return; + case "}": + pop(); + } + }, + afterArrayValue() { + if (token.type === "eof") { + throw invalidEOF(); + } + switch (token.value) { + case ",": + parseState = "beforeArrayValue"; + return; + case "]": + pop(); + } + }, + end() { + } +}; +function push() { + let value; + switch (token.type) { + case "punctuator": + switch (token.value) { + case "{": + value = {}; + break; + case "[": + value = []; + break; } break; - case DOC_TYPE_IF_BREAK: - if (!doc2.flatContents && !doc2.breakContents) { - return ""; - } + case "null": + case "boolean": + case "numeric": + case "string": + value = token.value; break; - case DOC_TYPE_ARRAY: { - const parts = []; - for (const part of doc2) { - if (!part) { - continue; - } - const [currentPart, ...restParts] = Array.isArray(part) ? part : [part]; - if (typeof currentPart === "string" && typeof at_default( - /* isOptionalObject*/ - false, - parts, - -1 - ) === "string") { - parts[parts.length - 1] += currentPart; - } else { - parts.push(currentPart); - } - parts.push(...restParts); - } - if (parts.length === 0) { - return ""; - } - if (parts.length === 1) { - return parts[0]; - } - return parts; + } + if (root === void 0) { + root = value; + } else { + const parent = stack[stack.length - 1]; + if (Array.isArray(parent)) { + parent.push(value); + } else { + Object.defineProperty(parent, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + if (value !== null && typeof value === "object") { + stack.push(value); + if (Array.isArray(value)) { + parseState = "beforeArrayValue"; + } else { + parseState = "beforePropertyName"; + } + } else { + const current = stack[stack.length - 1]; + if (current == null) { + parseState = "end"; + } else if (Array.isArray(current)) { + parseState = "afterArrayValue"; + } else { + parseState = "afterPropertyValue"; } - case DOC_TYPE_STRING: - case DOC_TYPE_CURSOR: - case DOC_TYPE_TRIM: - case DOC_TYPE_LINE_SUFFIX_BOUNDARY: - case DOC_TYPE_LINE: - case DOC_TYPE_LABEL: - case DOC_TYPE_BREAK_PARENT: - break; - default: - throw new invalid_doc_error_default(doc2); } - return doc2; } -function cleanDoc(doc2) { - return mapDoc(doc2, (currentDoc) => cleanDocFn(currentDoc)); +function pop() { + stack.pop(); + const current = stack[stack.length - 1]; + if (current == null) { + parseState = "end"; + } else if (Array.isArray(current)) { + parseState = "afterArrayValue"; + } else { + parseState = "afterPropertyValue"; + } } -function inheritLabel(doc2, fn) { - return doc2.type === DOC_TYPE_LABEL ? { - ...doc2, - contents: fn(doc2.contents) - } : fn(doc2); +function invalidChar(c2) { + if (c2 === void 0) { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); + } + return syntaxError(`JSON5: invalid character '${formatChar(c2)}' at ${line}:${column}`); } - -// src/document/printer.js -var MODE_BREAK = Symbol("MODE_BREAK"); -var MODE_FLAT = Symbol("MODE_FLAT"); -var CURSOR_PLACEHOLDER = Symbol("cursor"); -function rootIndent() { - return { - value: "", - length: 0, - queue: [] - }; +function invalidEOF() { + return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); } -function makeIndent(ind, options8) { - return generateInd(ind, { - type: "indent" - }, options8); +function invalidIdentifier() { + column -= 5; + return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`); } -function makeAlign(indent2, widthOrDoc, options8) { - if (widthOrDoc === Number.NEGATIVE_INFINITY) { - return indent2.root || rootIndent(); +function separatorChar(c2) { + console.warn(`JSON5: '${formatChar(c2)}' in strings is not valid ECMAScript; consider escaping`); +} +function formatChar(c2) { + const replacements = { + "'": "\\'", + '"': '\\"', + "\\": "\\\\", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + " ": "\\t", + "\v": "\\v", + "\0": "\\0", + "\u2028": "\\u2028", + "\u2029": "\\u2029" + }; + if (replacements[c2]) { + return replacements[c2]; } - if (widthOrDoc < 0) { - return generateInd(indent2, { - type: "dedent" - }, options8); + if (c2 < " ") { + const hexString = c2.charCodeAt(0).toString(16); + return "\\x" + ("00" + hexString).substring(hexString.length); } - if (!widthOrDoc) { - return indent2; + return c2; +} +function syntaxError(message) { + const err = new SyntaxError(message); + err.lineNumber = line; + err.columnNumber = column; + return err; +} +var dist_default = { parse: parse2 }; + +// node_modules/parse-json/index.js +var import_code_frame = __toESM(require_lib3(), 1); + +// node_modules/index-to-position/index.js +var safeLastIndexOf = (string, searchString, index) => index < 0 ? -1 : string.lastIndexOf(searchString, index); +function getPosition(text, textIndex) { + const lineBreakBefore = safeLastIndexOf(text, "\n", textIndex - 1); + const column2 = textIndex - lineBreakBefore - 1; + let line3 = 0; + for (let index = lineBreakBefore; index >= 0; index = safeLastIndexOf(text, "\n", index - 1)) { + line3++; } - if (widthOrDoc.type === "root") { - return { - ...indent2, - root: indent2 - }; + return { line: line3, column: column2 }; +} +function indexToLineColumn(text, textIndex, { oneBased = false } = {}) { + if (textIndex < 0 || textIndex >= text.length && text.length > 0) { + throw new RangeError("Index out of bounds"); } - const alignType = typeof widthOrDoc === "string" ? "stringAlign" : "numberAlign"; - return generateInd(indent2, { - type: alignType, - n: widthOrDoc - }, options8); + const position = getPosition(text, textIndex); + return oneBased ? { line: position.line + 1, column: position.column + 1 } : position; } -function generateInd(ind, newPart, options8) { - const queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : [...ind.queue, newPart]; - let value = ""; - let length = 0; - let lastTabs = 0; - let lastSpaces = 0; - for (const part of queue) { - switch (part.type) { - case "indent": - flush(); - if (options8.useTabs) { - addTabs(1); - } else { - addSpaces(options8.tabWidth); - } - break; - case "stringAlign": - flush(); - value += part.n; - length += part.n.length; - break; - case "numberAlign": - lastTabs += 1; - lastSpaces += part.n; - break; - default: - throw new Error(`Unexpected type '${part.type}'`); - } + +// node_modules/parse-json/index.js +var getCodePoint = (character) => `\\u{${character.codePointAt(0).toString(16)}}`; +var _message; +var _JSONError = class _JSONError extends Error { + constructor(message) { + var _a; + super(); + __publicField(this, "name", "JSONError"); + __publicField(this, "fileName"); + __publicField(this, "codeFrame"); + __publicField(this, "rawCodeFrame"); + __privateAdd(this, _message, void 0); + __privateSet(this, _message, message); + (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, this, _JSONError); } - flushSpaces(); - return { - ...ind, - value, - length, - queue - }; - function addTabs(count) { - value += " ".repeat(count); - length += options8.tabWidth * count; + get message() { + const { fileName, codeFrame } = this; + return `${__privateGet(this, _message)}${fileName ? ` in ${fileName}` : ""}${codeFrame ? ` + +${codeFrame} +` : ""}`; } - function addSpaces(count) { - value += " ".repeat(count); - length += count; + set message(message) { + __privateSet(this, _message, message); } - function flush() { - if (options8.useTabs) { - flushTabs(); - } else { - flushSpaces(); - } +}; +_message = new WeakMap(); +var JSONError = _JSONError; +var generateCodeFrame = (string, location, highlightCode = true) => (0, import_code_frame.codeFrameColumns)(string, { start: location }, { highlightCode }); +var getErrorLocation = (string, message) => { + const match = message.match(/in JSON at position (?\d+)(?: \(line (?\d+) column (?\d+)\))?$/); + if (!match) { + return; } - function flushTabs() { - if (lastTabs > 0) { - addTabs(lastTabs); - } - resetLast(); + let { index, line: line3, column: column2 } = match.groups; + if (line3 && column2) { + return { line: Number(line3), column: Number(column2) }; } - function flushSpaces() { - if (lastSpaces > 0) { - addSpaces(lastSpaces); + index = Number(index); + if (index === string.length) { + const { line: line4, column: column3 } = indexToLineColumn(string, string.length - 1, { oneBased: true }); + return { line: line4, column: column3 + 1 }; + } + return indexToLineColumn(string, index, { oneBased: true }); +}; +var addCodePointToUnexpectedToken = (message) => message.replace( + // TODO[engine:node@>=20]: The token always quoted after Node.js 20 + /(?<=^Unexpected token )(?')?(.)\k/, + (_, _quote, token2) => `"${token2}"(${getCodePoint(token2)})` +); +function parseJson(string, reviver, fileName) { + if (typeof reviver === "string") { + fileName = reviver; + reviver = void 0; + } + let message; + try { + return JSON.parse(string, reviver); + } catch (error) { + message = error.message; + } + let location; + if (string) { + location = getErrorLocation(string, message); + message = addCodePointToUnexpectedToken(message); + } else { + message += " while parsing empty string"; + } + const jsonError = new JSONError(message); + jsonError.fileName = fileName; + if (location) { + jsonError.codeFrame = generateCodeFrame(string, location); + jsonError.rawCodeFrame = generateCodeFrame( + string, + location, + /* highlightCode */ + false + ); + } + throw jsonError; +} + +// src/utils/read-file.js +import fs4 from "fs/promises"; +async function readFile(file) { + if (isUrlString(file)) { + file = new URL(file); + } + try { + return await fs4.readFile(file, "utf8"); + } catch (error) { + if (error.code === "ENOENT") { + return; } - resetLast(); - } - function resetLast() { - lastTabs = 0; - lastSpaces = 0; + throw new Error(`Unable to read '${file}': ${error.message}`); } } -function trim(out) { - let trimCount = 0; - let cursorCount = 0; - let outIndex = out.length; - outer: - while (outIndex--) { - const last = out[outIndex]; - if (last === CURSOR_PLACEHOLDER) { - cursorCount++; - continue; - } - if (false) { - throw new Error(`Unexpected value in trim: '${typeof last}'`); - } - for (let charIndex = last.length - 1; charIndex >= 0; charIndex--) { - const char = last[charIndex]; - if (char === " " || char === " ") { - trimCount++; - } else { - out[outIndex] = last.slice(0, charIndex + 1); - break outer; - } - } - } - if (trimCount > 0 || cursorCount > 0) { - out.length = outIndex + 1; - while (cursorCount-- > 0) { - out.push(CURSOR_PLACEHOLDER); - } +var read_file_default = readFile; + +// src/config/prettier-config/loaders.js +async function readJson(file) { + const content = await read_file_default(file); + try { + return parseJson(content); + } catch (error) { + error.message = `JSON Error in ${file}: +${error.message}`; + throw error; } - return trimCount; } -function fits(next, restCommands, width, hasLineSuffix, groupModeMap, mustBeFlat) { - if (width === Number.POSITIVE_INFINITY) { - return true; +async function loadJs(file) { + const module = await import(pathToFileURL2(file).href); + return module.default; +} +async function loadConfigFromPackageJson(file) { + const { prettier } = await readJson(file); + return prettier; +} +async function loadYaml(file) { + const content = await read_file_default(file); + try { + return load(content); + } catch (error) { + error.message = `YAML Error in ${file}: +${error.message}`; + throw error; } - let restIdx = restCommands.length; - const cmds = [next]; - const out = []; - while (width >= 0) { - if (cmds.length === 0) { - if (restIdx === 0) { - return true; - } - cmds.push(restCommands[--restIdx]); - continue; +} +var loaders = { + async ".toml"(file) { + const content = await read_file_default(file); + try { + return await (0, import_parse_async.default)(content); + } catch (error) { + error.message = `TOML Error in ${file}: +${error.message}`; + throw error; } - const { - mode, - doc: doc2 - } = cmds.pop(); - switch (get_doc_type_default(doc2)) { - case DOC_TYPE_STRING: - out.push(doc2); - width -= get_string_width_default(doc2); - break; - case DOC_TYPE_ARRAY: - case DOC_TYPE_FILL: { - const parts = getDocParts(doc2); - for (let i = parts.length - 1; i >= 0; i--) { - cmds.push({ - mode, - doc: parts[i] - }); - } - break; - } - case DOC_TYPE_INDENT: - case DOC_TYPE_ALIGN: - case DOC_TYPE_INDENT_IF_BREAK: - case DOC_TYPE_LABEL: - cmds.push({ - mode, - doc: doc2.contents - }); - break; - case DOC_TYPE_TRIM: - width += trim(out); - break; - case DOC_TYPE_GROUP: { - if (mustBeFlat && doc2.break) { - return false; - } - const groupMode = doc2.break ? MODE_BREAK : mode; - const contents = doc2.expandedStates && groupMode === MODE_BREAK ? at_default( - /* isOptionalObject*/ - false, - doc2.expandedStates, - -1 - ) : doc2.contents; - cmds.push({ - mode: groupMode, - doc: contents - }); - break; - } - case DOC_TYPE_IF_BREAK: { - const groupMode = doc2.groupId ? groupModeMap[doc2.groupId] || MODE_FLAT : mode; - const contents = groupMode === MODE_BREAK ? doc2.breakContents : doc2.flatContents; - if (contents) { - cmds.push({ - mode, - doc: contents - }); - } - break; - } - case DOC_TYPE_LINE: - if (mode === MODE_BREAK || doc2.hard) { - return true; - } - if (!doc2.soft) { - out.push(" "); - width--; - } - break; - case DOC_TYPE_LINE_SUFFIX: - hasLineSuffix = true; - break; - case DOC_TYPE_LINE_SUFFIX_BOUNDARY: - if (hasLineSuffix) { - return false; - } - break; + }, + async ".json5"(file) { + const content = await read_file_default(file); + try { + return dist_default.parse(content); + } catch (error) { + error.message = `JSON5 Error in ${file}: +${error.message}`; + throw error; + } + }, + ".json": readJson, + ".js": loadJs, + ".mjs": loadJs, + ".cjs": loadJs, + ".yaml": loadYaml, + ".yml": loadYaml, + // No extension + "": loadYaml +}; +var loaders_default = loaders; + +// src/config/prettier-config/config-searcher.js +var CONFIG_FILE_NAMES = [ + "package.json", + ".prettierrc", + ".prettierrc.json", + ".prettierrc.yaml", + ".prettierrc.yml", + ".prettierrc.json5", + ".prettierrc.js", + ".prettierrc.mjs", + ".prettierrc.cjs", + "prettier.config.js", + "prettier.config.mjs", + "prettier.config.cjs", + ".prettierrc.toml" +]; +async function filter({ name, path: file }) { + if (!await is_file_default(file)) { + return false; + } + if (name === "package.json") { + try { + return Boolean(await loadConfigFromPackageJson(file)); + } catch { + return false; } } - return false; + return true; } -function printDocToString(doc2, options8) { - const groupModeMap = {}; - const width = options8.printWidth; - const newLine = convertEndOfLineToChars(options8.endOfLine); - let pos = 0; - const cmds = [{ - ind: rootIndent(), - mode: MODE_BREAK, - doc: doc2 - }]; - const out = []; - let shouldRemeasure = false; - const lineSuffix2 = []; - let printedCursorCount = 0; - propagateBreaks(doc2); - while (cmds.length > 0) { - const { - ind, - mode, - doc: doc3 - } = cmds.pop(); - switch (get_doc_type_default(doc3)) { - case DOC_TYPE_STRING: { - const formatted = newLine !== "\n" ? string_replace_all_default( - /* isOptionalObject*/ - false, - doc3, - "\n", - newLine - ) : doc3; - out.push(formatted); - if (cmds.length > 0) { - pos += get_string_width_default(formatted); - } - break; +function getSearcher(stopDirectory) { + return new searcher_default({ names: CONFIG_FILE_NAMES, filter, stopDirectory }); +} +var config_searcher_default = getSearcher; + +// src/config/prettier-config/load-config.js +import path7 from "path"; + +// src/utils/import-from-file.js +import { pathToFileURL as pathToFileURL4 } from "url"; + +// node_modules/import-meta-resolve/lib/resolve.js +import assert3 from "assert"; +import { Stats, statSync, realpathSync } from "fs"; +import process3 from "process"; +import { URL as URL3, fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL3 } from "url"; +import path6 from "path"; +import { builtinModules } from "module"; + +// node_modules/import-meta-resolve/lib/get-format.js +import { fileURLToPath as fileURLToPath4 } from "url"; + +// node_modules/import-meta-resolve/lib/package-config.js +import { URL as URL2, fileURLToPath as fileURLToPath3 } from "url"; + +// node_modules/import-meta-resolve/lib/package-json-reader.js +import fs5 from "fs"; +import path5 from "path"; +import { fileURLToPath as fileURLToPath2 } from "url"; + +// node_modules/import-meta-resolve/lib/errors.js +import v8 from "v8"; +import assert2 from "assert"; +import { format, inspect } from "util"; +var own = {}.hasOwnProperty; +var classRegExp = /^([A-Z][a-z\d]*)+$/; +var kTypes = /* @__PURE__ */ new Set([ + "string", + "function", + "number", + "object", + // Accept 'Function' and 'Object' as alternative to the lower cased version. + "Function", + "Object", + "boolean", + "bigint", + "symbol" +]); +var codes = {}; +function formatList(array2, type2 = "and") { + return array2.length < 3 ? array2.join(` ${type2} `) : `${array2.slice(0, -1).join(", ")}, ${type2} ${array2[array2.length - 1]}`; +} +var messages = /* @__PURE__ */ new Map(); +var nodeInternalPrefix = "__node_internal_"; +var userStackTraceLimit; +codes.ERR_INVALID_ARG_TYPE = createError( + "ERR_INVALID_ARG_TYPE", + /** + * @param {string} name + * @param {Array | string} expected + * @param {unknown} actual + */ + (name, expected, actual) => { + assert2(typeof name === "string", "'name' must be a string"); + if (!Array.isArray(expected)) { + expected = [expected]; + } + let message = "The "; + if (name.endsWith(" argument")) { + message += `${name} `; + } else { + const type2 = name.includes(".") ? "property" : "argument"; + message += `"${name}" ${type2} `; + } + message += "must be "; + const types = []; + const instances = []; + const other = []; + for (const value of expected) { + assert2( + typeof value === "string", + "All expected entries have to be of type string" + ); + if (kTypes.has(value)) { + types.push(value.toLowerCase()); + } else if (classRegExp.exec(value) === null) { + assert2( + value !== "object", + 'The value "object" should be written as "Object"' + ); + other.push(value); + } else { + instances.push(value); } - case DOC_TYPE_ARRAY: - for (let i = doc3.length - 1; i >= 0; i--) { - cmds.push({ - ind, - mode, - doc: doc3[i] - }); - } - break; - case DOC_TYPE_CURSOR: - if (printedCursorCount >= 2) { - throw new Error("There are too many 'cursor' in doc."); - } - out.push(CURSOR_PLACEHOLDER); - printedCursorCount++; - break; - case DOC_TYPE_INDENT: - cmds.push({ - ind: makeIndent(ind, options8), - mode, - doc: doc3.contents - }); - break; - case DOC_TYPE_ALIGN: - cmds.push({ - ind: makeAlign(ind, doc3.n, options8), - mode, - doc: doc3.contents - }); - break; - case DOC_TYPE_TRIM: - pos -= trim(out); - break; - case DOC_TYPE_GROUP: - switch (mode) { - case MODE_FLAT: - if (!shouldRemeasure) { - cmds.push({ - ind, - mode: doc3.break ? MODE_BREAK : MODE_FLAT, - doc: doc3.contents - }); - break; - } - case MODE_BREAK: { - shouldRemeasure = false; - const next = { - ind, - mode: MODE_FLAT, - doc: doc3.contents - }; - const rem = width - pos; - const hasLineSuffix = lineSuffix2.length > 0; - if (!doc3.break && fits(next, cmds, rem, hasLineSuffix, groupModeMap)) { - cmds.push(next); - } else { - if (doc3.expandedStates) { - const mostExpanded = at_default( - /* isOptionalObject*/ - false, - doc3.expandedStates, - -1 - ); - if (doc3.break) { - cmds.push({ - ind, - mode: MODE_BREAK, - doc: mostExpanded - }); - break; - } else { - for (let i = 1; i < doc3.expandedStates.length + 1; i++) { - if (i >= doc3.expandedStates.length) { - cmds.push({ - ind, - mode: MODE_BREAK, - doc: mostExpanded - }); - break; - } else { - const state = doc3.expandedStates[i]; - const cmd = { - ind, - mode: MODE_FLAT, - doc: state - }; - if (fits(cmd, cmds, rem, hasLineSuffix, groupModeMap)) { - cmds.push(cmd); - break; - } - } - } - } - } else { - cmds.push({ - ind, - mode: MODE_BREAK, - doc: doc3.contents - }); - } - } - break; - } - } - if (doc3.id) { - groupModeMap[doc3.id] = at_default( - /* isOptionalObject*/ - false, - cmds, - -1 - ).mode; - } - break; - case DOC_TYPE_FILL: { - const rem = width - pos; - const { - parts - } = doc3; - if (parts.length === 0) { - break; - } - const [content, whitespace] = parts; - const contentFlatCmd = { - ind, - mode: MODE_FLAT, - doc: content - }; - const contentBreakCmd = { - ind, - mode: MODE_BREAK, - doc: content - }; - const contentFits = fits(contentFlatCmd, [], rem, lineSuffix2.length > 0, groupModeMap, true); - if (parts.length === 1) { - if (contentFits) { - cmds.push(contentFlatCmd); - } else { - cmds.push(contentBreakCmd); - } - break; - } - const whitespaceFlatCmd = { - ind, - mode: MODE_FLAT, - doc: whitespace - }; - const whitespaceBreakCmd = { - ind, - mode: MODE_BREAK, - doc: whitespace - }; - if (parts.length === 2) { - if (contentFits) { - cmds.push(whitespaceFlatCmd, contentFlatCmd); - } else { - cmds.push(whitespaceBreakCmd, contentBreakCmd); - } - break; - } - parts.splice(0, 2); - const remainingCmd = { - ind, - mode, - doc: fill(parts) - }; - const secondContent = parts[0]; - const firstAndSecondContentFlatCmd = { - ind, - mode: MODE_FLAT, - doc: [content, whitespace, secondContent] - }; - const firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], rem, lineSuffix2.length > 0, groupModeMap, true); - if (firstAndSecondContentFits) { - cmds.push(remainingCmd, whitespaceFlatCmd, contentFlatCmd); - } else if (contentFits) { - cmds.push(remainingCmd, whitespaceBreakCmd, contentFlatCmd); - } else { - cmds.push(remainingCmd, whitespaceBreakCmd, contentBreakCmd); - } - break; + } + if (instances.length > 0) { + const pos2 = types.indexOf("object"); + if (pos2 !== -1) { + types.slice(pos2, 1); + instances.push("Object"); } - case DOC_TYPE_IF_BREAK: - case DOC_TYPE_INDENT_IF_BREAK: { - const groupMode = doc3.groupId ? groupModeMap[doc3.groupId] : mode; - if (groupMode === MODE_BREAK) { - const breakContents = doc3.type === DOC_TYPE_IF_BREAK ? doc3.breakContents : doc3.negate ? doc3.contents : indent(doc3.contents); - if (breakContents) { - cmds.push({ - ind, - mode, - doc: breakContents - }); - } - } - if (groupMode === MODE_FLAT) { - const flatContents = doc3.type === DOC_TYPE_IF_BREAK ? doc3.flatContents : doc3.negate ? indent(doc3.contents) : doc3.contents; - if (flatContents) { - cmds.push({ - ind, - mode, - doc: flatContents - }); - } - } - break; + } + if (types.length > 0) { + message += `${types.length > 1 ? "one of type" : "of type"} ${formatList( + types, + "or" + )}`; + if (instances.length > 0 || other.length > 0) + message += " or "; + } + if (instances.length > 0) { + message += `an instance of ${formatList(instances, "or")}`; + if (other.length > 0) + message += " or "; + } + if (other.length > 0) { + if (other.length > 1) { + message += `one of ${formatList(other, "or")}`; + } else { + if (other[0].toLowerCase() !== other[0]) + message += "an "; + message += `${other[0]}`; } - case DOC_TYPE_LINE_SUFFIX: - lineSuffix2.push({ - ind, - mode, - doc: doc3.contents - }); - break; - case DOC_TYPE_LINE_SUFFIX_BOUNDARY: - if (lineSuffix2.length > 0) { - cmds.push({ - ind, - mode, - doc: hardlineWithoutBreakParent - }); - } - break; - case DOC_TYPE_LINE: - switch (mode) { - case MODE_FLAT: - if (!doc3.hard) { - if (!doc3.soft) { - out.push(" "); - pos += 1; - } - break; - } else { - shouldRemeasure = true; - } - case MODE_BREAK: - if (lineSuffix2.length > 0) { - cmds.push({ - ind, - mode, - doc: doc3 - }, ...lineSuffix2.reverse()); - lineSuffix2.length = 0; - break; - } - if (doc3.literal) { - if (ind.root) { - out.push(newLine, ind.root.value); - pos = ind.root.length; - } else { - out.push(newLine); - pos = 0; - } - } else { - pos -= trim(out); - out.push(newLine + ind.value); - pos = ind.length; - } - break; - } - break; - case DOC_TYPE_LABEL: - cmds.push({ - ind, - mode, - doc: doc3.contents - }); - break; - case DOC_TYPE_BREAK_PARENT: - break; - default: - throw new invalid_doc_error_default(doc3); } - if (cmds.length === 0 && lineSuffix2.length > 0) { - cmds.push(...lineSuffix2.reverse()); - lineSuffix2.length = 0; + message += `. Received ${determineSpecificType(actual)}`; + return message; + }, + TypeError +); +codes.ERR_INVALID_MODULE_SPECIFIER = createError( + "ERR_INVALID_MODULE_SPECIFIER", + /** + * @param {string} request + * @param {string} reason + * @param {string} [base] + */ + (request, reason, base = void 0) => { + return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`; + }, + TypeError +); +codes.ERR_INVALID_PACKAGE_CONFIG = createError( + "ERR_INVALID_PACKAGE_CONFIG", + /** + * @param {string} path + * @param {string} [base] + * @param {string} [message] + */ + (path13, base, message) => { + return `Invalid package config ${path13}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; + }, + Error +); +codes.ERR_INVALID_PACKAGE_TARGET = createError( + "ERR_INVALID_PACKAGE_TARGET", + /** + * @param {string} pkgPath + * @param {string} key + * @param {unknown} target + * @param {boolean} [isImport=false] + * @param {string} [base] + */ + (pkgPath, key2, target, isImport = false, base = void 0) => { + const relError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./"); + if (key2 === ".") { + assert2(isImport === false); + return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ""}${relError ? '; targets must start with "./"' : ""}`; } + return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify( + target + )} defined for '${key2}' in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ""}${relError ? '; targets must start with "./"' : ""}`; + }, + Error +); +codes.ERR_MODULE_NOT_FOUND = createError( + "ERR_MODULE_NOT_FOUND", + /** + * @param {string} path + * @param {string} base + * @param {boolean} [exactUrl] + */ + (path13, base, exactUrl = false) => { + return `Cannot find ${exactUrl ? "module" : "package"} '${path13}' imported from ${base}`; + }, + Error +); +codes.ERR_NETWORK_IMPORT_DISALLOWED = createError( + "ERR_NETWORK_IMPORT_DISALLOWED", + "import of '%s' by %s is not supported: %s", + Error +); +codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError( + "ERR_PACKAGE_IMPORT_NOT_DEFINED", + /** + * @param {string} specifier + * @param {string} packagePath + * @param {string} base + */ + (specifier, packagePath, base) => { + return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`; + }, + TypeError +); +codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError( + "ERR_PACKAGE_PATH_NOT_EXPORTED", + /** + * @param {string} pkgPath + * @param {string} subpath + * @param {string} [base] + */ + (pkgPath, subpath, base = void 0) => { + if (subpath === ".") + return `No "exports" main defined in ${pkgPath}package.json${base ? ` imported from ${base}` : ""}`; + return `Package subpath '${subpath}' is not defined by "exports" in ${pkgPath}package.json${base ? ` imported from ${base}` : ""}`; + }, + Error +); +codes.ERR_UNSUPPORTED_DIR_IMPORT = createError( + "ERR_UNSUPPORTED_DIR_IMPORT", + "Directory import '%s' is not supported resolving ES modules imported from %s", + Error +); +codes.ERR_UNKNOWN_FILE_EXTENSION = createError( + "ERR_UNKNOWN_FILE_EXTENSION", + /** + * @param {string} ext + * @param {string} path + */ + (ext, path13) => { + return `Unknown file extension "${ext}" for ${path13}`; + }, + TypeError +); +codes.ERR_INVALID_ARG_VALUE = createError( + "ERR_INVALID_ARG_VALUE", + /** + * @param {string} name + * @param {unknown} value + * @param {string} [reason='is invalid'] + */ + (name, value, reason = "is invalid") => { + let inspected = inspect(value); + if (inspected.length > 128) { + inspected = `${inspected.slice(0, 128)}...`; + } + const type2 = name.includes(".") ? "property" : "argument"; + return `The ${type2} '${name}' ${reason}. Received ${inspected}`; + }, + TypeError + // Note: extra classes have been shaken out. + // , RangeError +); +function createError(sym, value, def) { + messages.set(sym, value); + return makeNodeErrorWithCode(def, sym); +} +function makeNodeErrorWithCode(Base, key2) { + return NodeError; + function NodeError(...args) { + const limit = Error.stackTraceLimit; + if (isErrorStackTraceLimitWritable()) + Error.stackTraceLimit = 0; + const error = new Base(); + if (isErrorStackTraceLimitWritable()) + Error.stackTraceLimit = limit; + const message = getMessage(key2, args, error); + Object.defineProperties(error, { + // Note: no need to implement `kIsNodeError` symbol, would be hard, + // probably. + message: { + value: message, + enumerable: false, + writable: true, + configurable: true + }, + toString: { + /** @this {Error} */ + value() { + return `${this.name} [${key2}]: ${this.message}`; + }, + enumerable: false, + writable: true, + configurable: true + } + }); + captureLargerStackTrace(error); + error.code = key2; + return error; } - const cursorPlaceholderIndex = out.indexOf(CURSOR_PLACEHOLDER); - if (cursorPlaceholderIndex !== -1) { - const otherCursorPlaceholderIndex = out.indexOf(CURSOR_PLACEHOLDER, cursorPlaceholderIndex + 1); - const beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); - const aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join(""); - const afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join(""); - return { - formatted: beforeCursor + aroundCursor + afterCursor, - cursorNodeStart: beforeCursor.length, - cursorNodeText: aroundCursor - }; - } - return { - formatted: out.join("") - }; } - -// src/document/debug.js -function flattenDoc(doc2) { - var _a; - if (!doc2) { - return ""; +function isErrorStackTraceLimitWritable() { + try { + if (v8.startupSnapshot.isBuildingSnapshot()) { + return false; + } + } catch { } - if (Array.isArray(doc2)) { - const res = []; - for (const part of doc2) { - if (Array.isArray(part)) { - res.push(...flattenDoc(part)); - } else { - const flattened = flattenDoc(part); - if (flattened !== "") { - res.push(flattened); - } - } + const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit"); + if (desc === void 0) { + return Object.isExtensible(Error); + } + return own.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0; +} +function hideStackFrames(fn) { + const hidden = nodeInternalPrefix + fn.name; + Object.defineProperty(fn, "name", { value: hidden }); + return fn; +} +var captureLargerStackTrace = hideStackFrames( + /** + * @param {Error} error + * @returns {Error} + */ + // @ts-expect-error: fine + function(error) { + const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); + if (stackTraceLimitIsWritable) { + userStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Number.POSITIVE_INFINITY; } - return res; + Error.captureStackTrace(error); + if (stackTraceLimitIsWritable) + Error.stackTraceLimit = userStackTraceLimit; + return error; } - if (doc2.type === DOC_TYPE_IF_BREAK) { - return { - ...doc2, - breakContents: flattenDoc(doc2.breakContents), - flatContents: flattenDoc(doc2.flatContents) - }; +); +function getMessage(key2, args, self) { + const message = messages.get(key2); + assert2(message !== void 0, "expected `message` to be found"); + if (typeof message === "function") { + assert2( + message.length <= args.length, + // Default options do not count. + `Code: ${key2}; The provided arguments length (${args.length}) does not match the required ones (${message.length}).` + ); + return Reflect.apply(message, self, args); } - if (doc2.type === DOC_TYPE_GROUP) { - return { - ...doc2, - contents: flattenDoc(doc2.contents), - expandedStates: (_a = doc2.expandedStates) == null ? void 0 : _a.map(flattenDoc) - }; + const regex = /%[dfijoOs]/g; + let expectedLength = 0; + while (regex.exec(message) !== null) + expectedLength++; + assert2( + expectedLength === args.length, + `Code: ${key2}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).` + ); + if (args.length === 0) + return message; + args.unshift(message); + return Reflect.apply(format, null, args); +} +function determineSpecificType(value) { + if (value === null || value === void 0) { + return String(value); } - if (doc2.type === DOC_TYPE_FILL) { - return { type: "fill", parts: doc2.parts.map(flattenDoc) }; + if (typeof value === "function" && value.name) { + return `function ${value.name}`; } - if (doc2.contents) { - return { ...doc2, contents: flattenDoc(doc2.contents) }; + if (typeof value === "object") { + if (value.constructor && value.constructor.name) { + return `an instance of ${value.constructor.name}`; + } + return `${inspect(value, { depth: -1 })}`; } - return doc2; + let inspected = inspect(value, { colors: false }); + if (inspected.length > 28) { + inspected = `${inspected.slice(0, 25)}...`; + } + return `type ${typeof value} (${inspected})`; } -function printDocToDebug(doc2) { - const printedSymbols = /* @__PURE__ */ Object.create(null); - const usedKeysForSymbols = /* @__PURE__ */ new Set(); - return printDoc(flattenDoc(doc2)); - function printDoc(doc3, index, parentParts) { - var _a, _b; - if (typeof doc3 === "string") { - return JSON.stringify(doc3); - } - if (Array.isArray(doc3)) { - const printed = doc3.map(printDoc).filter(Boolean); - return printed.length === 1 ? printed[0] : `[${printed.join(", ")}]`; - } - if (doc3.type === DOC_TYPE_LINE) { - const withBreakParent = ((_a = parentParts == null ? void 0 : parentParts[index + 1]) == null ? void 0 : _a.type) === DOC_TYPE_BREAK_PARENT; - if (doc3.literal) { - return withBreakParent ? "literalline" : "literallineWithoutBreakParent"; - } - if (doc3.hard) { - return withBreakParent ? "hardline" : "hardlineWithoutBreakParent"; - } - if (doc3.soft) { - return "softline"; - } - return "line"; - } - if (doc3.type === DOC_TYPE_BREAK_PARENT) { - const afterHardline = ((_b = parentParts == null ? void 0 : parentParts[index - 1]) == null ? void 0 : _b.type) === DOC_TYPE_LINE && parentParts[index - 1].hard; - return afterHardline ? void 0 : "breakParent"; - } - if (doc3.type === DOC_TYPE_TRIM) { - return "trim"; + +// node_modules/import-meta-resolve/lib/package-json-reader.js +var hasOwnProperty = {}.hasOwnProperty; +var { ERR_INVALID_PACKAGE_CONFIG } = codes; +var cache = /* @__PURE__ */ new Map(); +var reader = { read: read2 }; +var package_json_reader_default = reader; +function read2(jsonPath, { base, specifier }) { + const existing = cache.get(jsonPath); + if (existing) { + return existing; + } + let string; + try { + string = fs5.readFileSync(path5.toNamespacedPath(jsonPath), "utf8"); + } catch (error) { + const exception2 = ( + /** @type {ErrnoException} */ + error + ); + if (exception2.code !== "ENOENT") { + throw exception2; } - if (doc3.type === DOC_TYPE_INDENT) { - return "indent(" + printDoc(doc3.contents) + ")"; + } + const result = { + exists: false, + pjsonPath: jsonPath, + main: void 0, + name: void 0, + type: "none", + // Ignore unknown types for forwards compatibility + exports: void 0, + imports: void 0 + }; + if (string !== void 0) { + let parsed; + try { + parsed = JSON.parse(string); + } catch (error_) { + const cause = ( + /** @type {ErrnoException} */ + error_ + ); + const error = new ERR_INVALID_PACKAGE_CONFIG( + jsonPath, + (base ? `"${specifier}" from ` : "") + fileURLToPath2(base || specifier), + cause.message + ); + error.cause = cause; + throw error; } - if (doc3.type === DOC_TYPE_ALIGN) { - return doc3.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + printDoc(doc3.contents) + ")" : doc3.n < 0 ? "dedent(" + printDoc(doc3.contents) + ")" : doc3.n.type === "root" ? "markAsRoot(" + printDoc(doc3.contents) + ")" : "align(" + JSON.stringify(doc3.n) + ", " + printDoc(doc3.contents) + ")"; + result.exists = true; + if (hasOwnProperty.call(parsed, "name") && typeof parsed.name === "string") { + result.name = parsed.name; } - if (doc3.type === DOC_TYPE_IF_BREAK) { - return "ifBreak(" + printDoc(doc3.breakContents) + (doc3.flatContents ? ", " + printDoc(doc3.flatContents) : "") + (doc3.groupId ? (!doc3.flatContents ? ', ""' : "") + `, { groupId: ${printGroupId(doc3.groupId)} }` : "") + ")"; + if (hasOwnProperty.call(parsed, "main") && typeof parsed.main === "string") { + result.main = parsed.main; } - if (doc3.type === DOC_TYPE_INDENT_IF_BREAK) { - const optionsParts = []; - if (doc3.negate) { - optionsParts.push("negate: true"); - } - if (doc3.groupId) { - optionsParts.push(`groupId: ${printGroupId(doc3.groupId)}`); - } - const options8 = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; - return `indentIfBreak(${printDoc(doc3.contents)}${options8})`; + if (hasOwnProperty.call(parsed, "exports")) { + result.exports = parsed.exports; } - if (doc3.type === DOC_TYPE_GROUP) { - const optionsParts = []; - if (doc3.break && doc3.break !== "propagated") { - optionsParts.push("shouldBreak: true"); - } - if (doc3.id) { - optionsParts.push(`id: ${printGroupId(doc3.id)}`); - } - const options8 = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; - if (doc3.expandedStates) { - return `conditionalGroup([${doc3.expandedStates.map((part) => printDoc(part)).join(",")}]${options8})`; - } - return `group(${printDoc(doc3.contents)}${options8})`; + if (hasOwnProperty.call(parsed, "imports")) { + result.imports = parsed.imports; } - if (doc3.type === DOC_TYPE_FILL) { - return `fill([${doc3.parts.map((part) => printDoc(part)).join(", ")}])`; + if (hasOwnProperty.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) { + result.type = parsed.type; } - if (doc3.type === DOC_TYPE_LINE_SUFFIX) { - return "lineSuffix(" + printDoc(doc3.contents) + ")"; + } + cache.set(jsonPath, result); + return result; +} + +// node_modules/import-meta-resolve/lib/package-config.js +function getPackageScopeConfig(resolved) { + let packageJSONUrl = new URL2("package.json", resolved); + while (true) { + const packageJSONPath2 = packageJSONUrl.pathname; + if (packageJSONPath2.endsWith("node_modules/package.json")) { + break; } - if (doc3.type === DOC_TYPE_LINE_SUFFIX_BOUNDARY) { - return "lineSuffixBoundary"; + const packageConfig = package_json_reader_default.read( + fileURLToPath3(packageJSONUrl), + { specifier: resolved } + ); + if (packageConfig.exists) { + return packageConfig; } - if (doc3.type === DOC_TYPE_LABEL) { - return `label(${JSON.stringify(doc3.label)}, ${printDoc(doc3.contents)})`; + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new URL2("../package.json", packageJSONUrl); + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { + break; } - throw new Error("Unknown doc type " + doc3.type); } - function printGroupId(id) { - if (typeof id !== "symbol") { - return JSON.stringify(String(id)); - } - if (id in printedSymbols) { - return printedSymbols[id]; + const packageJSONPath = fileURLToPath3(packageJSONUrl); + return { + pjsonPath: packageJSONPath, + exists: false, + main: void 0, + name: void 0, + type: "none", + exports: void 0, + imports: void 0 + }; +} + +// node_modules/import-meta-resolve/lib/resolve-get-package-type.js +function getPackageType(url2) { + const packageConfig = getPackageScopeConfig(url2); + return packageConfig.type; +} + +// node_modules/import-meta-resolve/lib/get-format.js +var { ERR_UNKNOWN_FILE_EXTENSION } = codes; +var hasOwnProperty2 = {}.hasOwnProperty; +var extensionFormatMap = { + // @ts-expect-error: hush. + __proto__: null, + ".cjs": "commonjs", + ".js": "module", + ".json": "json", + ".mjs": "module" +}; +function mimeToFormat(mime) { + if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) + return "module"; + if (mime === "application/json") + return "json"; + return null; +} +var protocolHandlers = { + // @ts-expect-error: hush. + __proto__: null, + "data:": getDataProtocolModuleFormat, + "file:": getFileProtocolModuleFormat, + "http:": getHttpProtocolModuleFormat, + "https:": getHttpProtocolModuleFormat, + "node:"() { + return "builtin"; + } +}; +function getDataProtocolModuleFormat(parsed) { + const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec( + parsed.pathname + ) || [null, null, null]; + return mimeToFormat(mime); +} +function extname(url2) { + const pathname = url2.pathname; + let index = pathname.length; + while (index--) { + const code = pathname.codePointAt(index); + if (code === 47) { + return ""; } - const prefix = id.description || "symbol"; - for (let counter = 0; ; counter++) { - const key = prefix + (counter > 0 ? ` #${counter}` : ""); - if (!usedKeysForSymbols.has(key)) { - usedKeysForSymbols.add(key); - return printedSymbols[id] = `Symbol.for(${JSON.stringify(key)})`; - } + if (code === 46) { + return pathname.codePointAt(index - 1) === 47 ? "" : pathname.slice(index); } } + return ""; } - -// src/utils/get-alignment-size.js -function getAlignmentSize(text, tabWidth, startIndex = 0) { - let size = 0; - for (let i = startIndex; i < text.length; ++i) { - if (text[i] === " ") { - size = size + tabWidth - size % tabWidth; - } else { - size++; +function getFileProtocolModuleFormat(url2, _context, ignoreErrors) { + const ext = extname(url2); + if (ext === ".js") { + const packageType = getPackageType(url2); + if (packageType !== "none") { + return packageType; } + return "commonjs"; } - return size; -} -var get_alignment_size_default = getAlignmentSize; - -// src/common/errors.js -var errors_exports = {}; -__export(errors_exports, { - ArgExpansionBailout: () => ArgExpansionBailout, - ConfigError: () => ConfigError, - UndefinedParserError: () => UndefinedParserError -}); -var ConfigError = class extends Error { - name = "ConfigError"; -}; -var UndefinedParserError = class extends Error { - name = "UndefinedParserError"; -}; -var ArgExpansionBailout = class extends Error { - name = "ArgExpansionBailout"; -}; - -// src/main/core-options.evaluate.js -var core_options_evaluate_default = { - "cursorOffset": { - "category": "Special", - "type": "int", - "default": -1, - "range": { - "start": -1, - "end": Infinity, - "step": 1 - }, - "description": "Print (to stderr) where a cursor at the given position would move to after formatting.\nThis option cannot be used with --range-start and --range-end.", - "cliCategory": "Editor" - }, - "endOfLine": { - "category": "Global", - "type": "choice", - "default": "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": "Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)" - } - ] - }, - "filepath": { - "category": "Special", - "type": "path", - "description": "Specify the input filepath. This will be used to do parser inference.", - "cliName": "stdin-filepath", - "cliCategory": "Other", - "cliDescription": "Path to the file to pretend that stdin comes from." - }, - "insertPragma": { - "category": "Special", - "type": "boolean", - "default": false, - "description": "Insert @format pragma into file's first docblock comment.", - "cliCategory": "Other" - }, - "parser": { - "category": "Global", - "type": "choice", - "default": void 0, - "description": "Which parser to use.", - "exception": (value) => typeof value === "string" || typeof value === "function", - "choices": [ - { - "value": "flow", - "description": "Flow" - }, - { - "value": "babel", - "description": "JavaScript" - }, - { - "value": "babel-flow", - "description": "Flow" - }, - { - "value": "babel-ts", - "description": "TypeScript" - }, - { - "value": "typescript", - "description": "TypeScript" - }, - { - "value": "acorn", - "description": "JavaScript" - }, - { - "value": "espree", - "description": "JavaScript" - }, - { - "value": "meriyah", - "description": "JavaScript" - }, - { - "value": "css", - "description": "CSS" - }, - { - "value": "less", - "description": "Less" - }, - { - "value": "scss", - "description": "SCSS" - }, - { - "value": "json", - "description": "JSON" - }, - { - "value": "json5", - "description": "JSON5" - }, - { - "value": "json-stringify", - "description": "JSON.stringify" - }, - { - "value": "graphql", - "description": "GraphQL" - }, - { - "value": "markdown", - "description": "Markdown" - }, - { - "value": "mdx", - "description": "MDX" - }, - { - "value": "vue", - "description": "Vue" - }, - { - "value": "yaml", - "description": "YAML" - }, - { - "value": "glimmer", - "description": "Ember / Handlebars" - }, - { - "value": "html", - "description": "HTML" - }, - { - "value": "angular", - "description": "Angular" - }, - { - "value": "lwc", - "description": "Lightning Web Components" - } - ] - }, - "plugins": { - "type": "path", - "array": true, - "default": [ - { - "value": [] - } - ], - "category": "Global", - "description": "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", - "exception": (value) => typeof value === "string" || typeof value === "object", - "cliName": "plugin", - "cliCategory": "Config" - }, - "printWidth": { - "category": "Global", - "type": "int", - "default": 80, - "description": "The line length where Prettier will try wrap.", - "range": { - "start": 0, - "end": Infinity, - "step": 1 + if (ext === "") { + const packageType = getPackageType(url2); + if (packageType === "none" || packageType === "commonjs") { + return "commonjs"; + } + return "module"; + } + const format3 = extensionFormatMap[ext]; + if (format3) + return format3; + if (ignoreErrors) { + return void 0; + } + const filepath = fileURLToPath4(url2); + throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath); +} +function getHttpProtocolModuleFormat() { +} +function defaultGetFormatWithoutErrors(url2, context) { + const protocol = url2.protocol; + if (!hasOwnProperty2.call(protocolHandlers, protocol)) { + return null; + } + return protocolHandlers[protocol](url2, context, true) || null; +} + +// node_modules/import-meta-resolve/lib/utils.js +var { ERR_INVALID_ARG_VALUE } = codes; +var DEFAULT_CONDITIONS = Object.freeze(["node", "import"]); +var DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS); +function getDefaultConditions() { + return DEFAULT_CONDITIONS; +} +function getDefaultConditionsSet() { + return DEFAULT_CONDITIONS_SET; +} +function getConditionsSet(conditions) { + if (conditions !== void 0 && conditions !== getDefaultConditions()) { + if (!Array.isArray(conditions)) { + throw new ERR_INVALID_ARG_VALUE( + "conditions", + conditions, + "expected an array" + ); } - }, - "rangeEnd": { - "category": "Special", - "type": "int", - "default": Infinity, - "range": { - "start": 0, - "end": Infinity, - "step": 1 - }, - "description": "Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.\nThis option cannot be used with --cursor-offset.", - "cliCategory": "Editor" - }, - "rangeStart": { - "category": "Special", - "type": "int", - "default": 0, - "range": { - "start": 0, - "end": Infinity, - "step": 1 - }, - "description": "Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.\nThis option cannot be used with --cursor-offset.", - "cliCategory": "Editor" - }, - "requirePragma": { - "category": "Special", - "type": "boolean", - "default": false, - "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment\nin order for it to be formatted.", - "cliCategory": "Other" - }, - "tabWidth": { - "type": "int", - "category": "Global", - "default": 2, - "description": "Number of spaces per indentation level.", - "range": { - "start": 0, - "end": Infinity, - "step": 1 + return new Set(conditions); + } + return getDefaultConditionsSet(); +} + +// node_modules/import-meta-resolve/lib/resolve.js +var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; +var { + ERR_NETWORK_IMPORT_DISALLOWED, + ERR_INVALID_MODULE_SPECIFIER, + ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG2, + ERR_INVALID_PACKAGE_TARGET, + ERR_MODULE_NOT_FOUND, + ERR_PACKAGE_IMPORT_NOT_DEFINED, + ERR_PACKAGE_PATH_NOT_EXPORTED, + ERR_UNSUPPORTED_DIR_IMPORT +} = codes; +var own2 = {}.hasOwnProperty; +var invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; +var deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; +var invalidPackageNameRegEx = /^\.|%|\\/; +var patternRegEx = /\*/g; +var encodedSepRegEx = /%2f|%5c/i; +var emittedPackageWarnings = /* @__PURE__ */ new Set(); +var doubleSlashRegEx = /[/\\]{2}/; +function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) { + if (process3.noDeprecation) { + return; + } + const pjsonPath = fileURLToPath5(packageJsonUrl); + const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; + process3.emitWarning( + `Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath5(base)}` : ""}.`, + "DeprecationWarning", + "DEP0166" + ); +} +function emitLegacyIndexDeprecation(url2, packageJsonUrl, base, main) { + if (process3.noDeprecation) { + return; + } + const format3 = defaultGetFormatWithoutErrors(url2, { parentURL: base.href }); + if (format3 !== "module") + return; + const urlPath = fileURLToPath5(url2.href); + const pkgPath = fileURLToPath5(new URL3(".", packageJsonUrl)); + const basePath = fileURLToPath5(base); + if (!main) { + process3.emitWarning( + `No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${urlPath.slice( + pkgPath.length + )}", imported from ${basePath}. +Default "index" lookups for the main are deprecated for ES modules.`, + "DeprecationWarning", + "DEP0151" + ); + } else if (path6.resolve(pkgPath, main) !== urlPath) { + process3.emitWarning( + `Package ${pkgPath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice( + pkgPath.length + )}", imported from ${basePath}. + Automatic extension resolution of the "main" field is deprecated for ES modules.`, + "DeprecationWarning", + "DEP0151" + ); + } +} +function tryStatSync(path13) { + try { + return statSync(path13); + } catch { + return new Stats(); + } +} +function fileExists(url2) { + const stats = statSync(url2, { throwIfNoEntry: false }); + const isFile2 = stats ? stats.isFile() : void 0; + return isFile2 === null || isFile2 === void 0 ? false : isFile2; +} +function legacyMainResolve(packageJsonUrl, packageConfig, base) { + let guess; + if (packageConfig.main !== void 0) { + guess = new URL3(packageConfig.main, packageJsonUrl); + if (fileExists(guess)) + return guess; + const tries2 = [ + `./${packageConfig.main}.js`, + `./${packageConfig.main}.json`, + `./${packageConfig.main}.node`, + `./${packageConfig.main}/index.js`, + `./${packageConfig.main}/index.json`, + `./${packageConfig.main}/index.node` + ]; + let i2 = -1; + while (++i2 < tries2.length) { + guess = new URL3(tries2[i2], packageJsonUrl); + if (fileExists(guess)) + break; + guess = void 0; } - }, - "useTabs": { - "category": "Global", - "type": "boolean", - "default": false, - "description": "Indent with tabs instead of spaces." - }, - "embeddedLanguageFormatting": { - "category": "Global", - "type": "choice", - "default": "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." - } - ] + if (guess) { + emitLegacyIndexDeprecation( + guess, + packageJsonUrl, + base, + packageConfig.main + ); + return guess; + } + } + const tries = ["./index.js", "./index.json", "./index.node"]; + let i = -1; + while (++i < tries.length) { + guess = new URL3(tries[i], packageJsonUrl); + if (fileExists(guess)) + break; + guess = void 0; + } + if (guess) { + emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); + return guess; + } + throw new ERR_MODULE_NOT_FOUND( + fileURLToPath5(new URL3(".", packageJsonUrl)), + fileURLToPath5(base) + ); +} +function finalizeResolution(resolved, base, preserveSymlinks) { + if (encodedSepRegEx.exec(resolved.pathname) !== null) { + throw new ERR_INVALID_MODULE_SPECIFIER( + resolved.pathname, + 'must not include encoded "/" or "\\" characters', + fileURLToPath5(base) + ); + } + let filePath; + try { + filePath = fileURLToPath5(resolved); + } catch (error) { + const cause = ( + /** @type {ErrnoException} */ + error + ); + Object.defineProperty(cause, "input", { value: String(resolved) }); + Object.defineProperty(cause, "module", { value: String(base) }); + throw cause; + } + const stats = tryStatSync( + filePath.endsWith("/") ? filePath.slice(-1) : filePath + ); + if (stats.isDirectory()) { + const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath5(base)); + error.url = String(resolved); + throw error; + } + if (!stats.isFile()) { + const error = new ERR_MODULE_NOT_FOUND( + filePath || resolved.pathname, + base && fileURLToPath5(base), + true + ); + error.url = String(resolved); + throw error; + } + if (!preserveSymlinks) { + const real = realpathSync(filePath); + const { search, hash } = resolved; + resolved = pathToFileURL3(real + (filePath.endsWith(path6.sep) ? "/" : "")); + resolved.search = search; + resolved.hash = hash; } -}; - -// src/main/support.js -function getSupportInfo({ - plugins = [], - showDeprecated = false -} = {}) { - const languages2 = plugins.flatMap((plugin) => plugin.languages ?? []); - const options8 = []; - for (const option of normalizeOptionSettings(Object.assign({}, ...plugins.map(({ - options: options9 - }) => options9), core_options_evaluate_default))) { - if (!showDeprecated && option.deprecated) { - continue; - } - if (Array.isArray(option.choices)) { - if (!showDeprecated) { - option.choices = option.choices.filter((choice) => !choice.deprecated); + return resolved; +} +function importNotDefined(specifier, packageJsonUrl, base) { + return new ERR_PACKAGE_IMPORT_NOT_DEFINED( + specifier, + packageJsonUrl && fileURLToPath5(new URL3(".", packageJsonUrl)), + fileURLToPath5(base) + ); +} +function exportsNotFound(subpath, packageJsonUrl, base) { + return new ERR_PACKAGE_PATH_NOT_EXPORTED( + fileURLToPath5(new URL3(".", packageJsonUrl)), + subpath, + base && fileURLToPath5(base) + ); +} +function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) { + const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath5(packageJsonUrl)}`; + throw new ERR_INVALID_MODULE_SPECIFIER( + request, + reason, + base && fileURLToPath5(base) + ); +} +function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) { + target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`; + return new ERR_INVALID_PACKAGE_TARGET( + fileURLToPath5(new URL3(".", packageJsonUrl)), + subpath, + target, + internal, + base && fileURLToPath5(base) + ); +} +function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) { + if (subpath !== "" && !pattern && target[target.length - 1] !== "/") + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (!target.startsWith("./")) { + if (internal && !target.startsWith("../") && !target.startsWith("/")) { + let isURL2 = false; + try { + new URL3(target); + isURL2 = true; + } catch { } - if (option.name === "parser") { - option.choices = [...option.choices, ...collectParsersFromLanguages(option.choices, languages2, plugins)]; + if (!isURL2) { + const exportTarget = pattern ? RegExpPrototypeSymbolReplace.call( + patternRegEx, + target, + () => subpath + ) : target + subpath; + return packageResolve(exportTarget, packageJsonUrl, conditions); } } - option.pluginDefaults = Object.fromEntries(plugins.filter((plugin) => { - var _a; - return ((_a = plugin.defaultOptions) == null ? void 0 : _a[option.name]) !== void 0; - }).map((plugin) => [plugin.name, plugin.defaultOptions[option.name]])); - options8.push(option); + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); } - return { - languages: languages2, - options: options8 - }; -} -function* collectParsersFromLanguages(parserChoices, languages2, plugins) { - const existingParsers = new Set(parserChoices.map((choice) => choice.value)); - for (const language of languages2) { - if (language.parsers) { - for (const parserName of language.parsers) { - if (!existingParsers.has(parserName)) { - existingParsers.add(parserName); - const plugin = plugins.find((plugin2) => plugin2.parsers && Object.prototype.hasOwnProperty.call(plugin2.parsers, parserName)); - let description = language.name; - if (plugin == null ? void 0 : plugin.name) { - description += ` (plugin: ${plugin.name})`; - } - yield { - value: parserName, - description - }; - } + if (invalidSegmentRegEx.exec(target.slice(2)) !== null) { + if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) { + if (!isPathMap) { + const request = pattern ? match.replace("*", () => subpath) : match + subpath; + const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( + patternRegEx, + target, + () => subpath + ) : target; + emitInvalidSegmentDeprecation( + resolvedTarget, + request, + match, + packageJsonUrl, + internal, + base, + true + ); } + } else { + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); } } -} -function normalizeOptionSettings(settings) { - const options8 = []; - for (const [name, originalOption] of Object.entries(settings)) { - const option = { - name, - ...originalOption - }; - if (Array.isArray(option.default)) { - option.default = at_default( - /* isOptionalObject*/ - false, - option.default, - -1 - ).value; + const resolved = new URL3(target, packageJsonUrl); + const resolvedPath = resolved.pathname; + const packagePath = new URL3(".", packageJsonUrl).pathname; + if (!resolvedPath.startsWith(packagePath)) + throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); + if (subpath === "") + return resolved; + if (invalidSegmentRegEx.exec(subpath) !== null) { + const request = pattern ? match.replace("*", () => subpath) : match + subpath; + if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) { + if (!isPathMap) { + const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( + patternRegEx, + target, + () => subpath + ) : target; + emitInvalidSegmentDeprecation( + resolvedTarget, + request, + match, + packageJsonUrl, + internal, + base, + false + ); + } + } else { + throwInvalidSubpath(request, match, packageJsonUrl, internal, base); } - options8.push(option); } - return options8; + if (pattern) { + return new URL3( + RegExpPrototypeSymbolReplace.call( + patternRegEx, + resolved.href, + () => subpath + ) + ); + } + return new URL3(subpath, resolved); } - -// src/utils/get-interpreter.js -var import_n_readlines = __toESM(require_readlines(), 1); -import fs from "fs"; -function getInterpreter(file) { - let fd; - try { - fd = fs.openSync(file, "r"); - } catch { - return; +function isArrayIndex(key2) { + const keyNumber = Number(key2); + if (`${keyNumber}` !== key2) + return false; + return keyNumber >= 0 && keyNumber < 4294967295; +} +function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) { + if (typeof target === "string") { + return resolvePackageTargetString( + target, + subpath, + packageSubpath, + packageJsonUrl, + base, + pattern, + internal, + isPathMap, + conditions + ); } - try { - const liner = new import_n_readlines.default(fd); - const firstLine = liner.next().toString("utf8"); - const m1 = firstLine.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/); - if (m1) { - return m1[1]; + if (Array.isArray(target)) { + const targetList = target; + if (targetList.length === 0) + return null; + let lastException; + let i = -1; + while (++i < targetList.length) { + const targetItem = targetList[i]; + let resolveResult; + try { + resolveResult = resolvePackageTarget( + packageJsonUrl, + targetItem, + subpath, + packageSubpath, + base, + pattern, + internal, + isPathMap, + conditions + ); + } catch (error) { + const exception2 = ( + /** @type {ErrnoException} */ + error + ); + lastException = exception2; + if (exception2.code === "ERR_INVALID_PACKAGE_TARGET") + continue; + throw error; + } + if (resolveResult === void 0) + continue; + if (resolveResult === null) { + lastException = null; + continue; + } + return resolveResult; } - const m2 = firstLine.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/); - if (m2) { - return m2[1]; + if (lastException === void 0 || lastException === null) { + return null; + } + throw lastException; + } + if (typeof target === "object" && target !== null) { + const keys = Object.getOwnPropertyNames(target); + let i = -1; + while (++i < keys.length) { + const key2 = keys[i]; + if (isArrayIndex(key2)) { + throw new ERR_INVALID_PACKAGE_CONFIG2( + fileURLToPath5(packageJsonUrl), + base, + '"exports" cannot contain numeric property keys.' + ); + } } - } finally { - try { - fs.closeSync(fd); - } catch { + i = -1; + while (++i < keys.length) { + const key2 = keys[i]; + if (key2 === "default" || conditions && conditions.has(key2)) { + const conditionalTarget = ( + /** @type {unknown} */ + target[key2] + ); + const resolveResult = resolvePackageTarget( + packageJsonUrl, + conditionalTarget, + subpath, + packageSubpath, + base, + pattern, + internal, + isPathMap, + conditions + ); + if (resolveResult === void 0) + continue; + return resolveResult; + } } + return null; } -} -var get_interpreter_default = getInterpreter; - -// src/utils/infer-parser.js -var getFileBasename = (file) => String(file).split(/[/\\]/).pop(); -function getLanguageByFileName(languages2, file) { - if (!file) { - return; + if (target === null) { + return null; } - const basename = getFileBasename(file).toLowerCase(); - return languages2.find( - (language) => { - var _a, _b; - return ((_a = language.extensions) == null ? void 0 : _a.some((extension) => basename.endsWith(extension))) || ((_b = language.filenames) == null ? void 0 : _b.some((name) => name.toLowerCase() === basename)); - } + throw invalidPackageTarget( + packageSubpath, + target, + packageJsonUrl, + internal, + base ); } -function getLanguageByName(languages2, languageName) { - if (!languageName) { - return; +function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { + if (typeof exports === "string" || Array.isArray(exports)) + return true; + if (typeof exports !== "object" || exports === null) + return false; + const keys = Object.getOwnPropertyNames(exports); + let isConditionalSugar = false; + let i = 0; + let j = -1; + while (++j < keys.length) { + const key2 = keys[j]; + const curIsConditionalSugar = key2 === "" || key2[0] !== "."; + if (i++ === 0) { + isConditionalSugar = curIsConditionalSugar; + } else if (isConditionalSugar !== curIsConditionalSugar) { + throw new ERR_INVALID_PACKAGE_CONFIG2( + fileURLToPath5(packageJsonUrl), + base, + `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.` + ); + } } - return languages2.find(({ name }) => name.toLowerCase() === languageName) ?? languages2.find(({ aliases }) => aliases == null ? void 0 : aliases.includes(languageName)) ?? languages2.find(({ extensions }) => extensions == null ? void 0 : extensions.includes(`.${languageName}`)); + return isConditionalSugar; } -function getLanguageByInterpreter(languages2, file) { - if (!file || getFileBasename(file).includes(".")) { +function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { + if (process3.noDeprecation) { return; } - const interpreter = get_interpreter_default(file); - if (!interpreter) { + const pjsonPath = fileURLToPath5(pjsonUrl); + if (emittedPackageWarnings.has(pjsonPath + "|" + match)) return; - } - return languages2.find( - (language) => { - var _a; - return (_a = language.interpreters) == null ? void 0 : _a.includes(interpreter); - } - ); -} -function inferParser(options8, fileInfo) { - const languages2 = options8.plugins.flatMap( - (plugin) => ( - // @ts-expect-error -- Safe - plugin.languages ?? [] - ) + emittedPackageWarnings.add(pjsonPath + "|" + match); + process3.emitWarning( + `Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath5(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, + "DeprecationWarning", + "DEP0155" ); - const language = getLanguageByName(languages2, fileInfo.language) ?? getLanguageByFileName(languages2, fileInfo.physicalFile) ?? getLanguageByFileName(languages2, fileInfo.file) ?? getLanguageByInterpreter(languages2, fileInfo.physicalFile); - return language == null ? void 0 : language.parsers[0]; -} -var infer_parser_default = inferParser; - -// src/main/normalize-options.js -var hasDeprecationWarned; -function normalizeOptions(options8, optionInfos, { - logger = false, - isCLI = false, - passThrough = false, - FlagSchema, - descriptor -} = {}) { - if (isCLI) { - if (!FlagSchema) { - throw new Error("'FlagSchema' option is required."); - } - if (!descriptor) { - throw new Error("'descriptor' option is required."); - } - } else { - descriptor = apiDescriptor; - } - const unknown = !passThrough ? (key, value, options9) => { - const { - _, - ...schemas2 - } = options9.schemas; - return levenUnknownHandler(key, value, { - ...options9, - schemas: schemas2 - }); - } : Array.isArray(passThrough) ? (key, value) => !passThrough.includes(key) ? void 0 : { - [key]: value - } : (key, value) => ({ - [key]: value - }); - const schemas = optionInfosToSchemas(optionInfos, { - isCLI, - FlagSchema - }); - const normalizer = new Normalizer(schemas, { - logger, - unknown, - descriptor - }); - const shouldSuppressDuplicateDeprecationWarnings = logger !== false; - if (shouldSuppressDuplicateDeprecationWarnings && hasDeprecationWarned) { - normalizer._hasDeprecationWarned = hasDeprecationWarned; - } - const normalized = normalizer.normalize(options8); - if (shouldSuppressDuplicateDeprecationWarnings) { - hasDeprecationWarned = normalizer._hasDeprecationWarned; - } - return normalized; } -function optionInfosToSchemas(optionInfos, { - isCLI, - FlagSchema -}) { - const schemas = []; - if (isCLI) { - schemas.push(AnySchema.create({ - name: "_" - })); +function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) { + let exports = packageConfig.exports; + if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) { + exports = { ".": exports }; } - for (const optionInfo of optionInfos) { - schemas.push(optionInfoToSchema(optionInfo, { - isCLI, - optionInfos, - FlagSchema - })); - if (optionInfo.alias && isCLI) { - schemas.push(AliasSchema.create({ - // @ts-expect-error - name: optionInfo.alias, - sourceName: optionInfo.name - })); + if (own2.call(exports, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) { + const target = exports[packageSubpath]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + target, + "", + packageSubpath, + base, + false, + false, + false, + conditions + ); + if (resolveResult === null || resolveResult === void 0) { + throw exportsNotFound(packageSubpath, packageJsonUrl, base); } + return resolveResult; } - return schemas; -} -function optionInfoToSchema(optionInfo, { - isCLI, - optionInfos, - FlagSchema -}) { - const { - name - } = optionInfo; - const parameters = { - name - }; - let SchemaConstructor; - const handlers = {}; - switch (optionInfo.type) { - case "int": - SchemaConstructor = IntegerSchema; - if (isCLI) { - parameters.preprocess = Number; + let bestMatch = ""; + let bestMatchSubpath = ""; + const keys = Object.getOwnPropertyNames(exports); + let i = -1; + while (++i < keys.length) { + const key2 = keys[i]; + const patternIndex = key2.indexOf("*"); + if (patternIndex !== -1 && packageSubpath.startsWith(key2.slice(0, patternIndex))) { + if (packageSubpath.endsWith("/")) { + emitTrailingSlashPatternDeprecation( + packageSubpath, + packageJsonUrl, + base + ); } - break; - case "string": - SchemaConstructor = StringSchema; - break; - case "choice": - SchemaConstructor = ChoiceSchema; - parameters.choices = optionInfo.choices.map((choiceInfo) => (choiceInfo == null ? void 0 : choiceInfo.redirect) ? { - ...choiceInfo, - redirect: { - to: { - key: optionInfo.name, - value: choiceInfo.redirect - } - } - } : choiceInfo); - break; - case "boolean": - SchemaConstructor = BooleanSchema; - break; - case "flag": - SchemaConstructor = FlagSchema; - parameters.flags = optionInfos.flatMap((optionInfo2) => [optionInfo2.alias, optionInfo2.description && optionInfo2.name, optionInfo2.oppositeDescription && `no-${optionInfo2.name}`].filter(Boolean)); - break; - case "path": - SchemaConstructor = StringSchema; - break; - default: - throw new Error(`Unexpected type ${optionInfo.type}`); - } - if (optionInfo.exception) { - parameters.validate = (value, schema, utils) => optionInfo.exception(value) || schema.validate(value, utils); - } else { - parameters.validate = (value, schema, utils) => value === void 0 || schema.validate(value, utils); - } - if (optionInfo.redirect) { - handlers.redirect = (value) => !value ? void 0 : { - to: { - key: optionInfo.redirect.option, - value: optionInfo.redirect.value + const patternTrailer = key2.slice(patternIndex + 1); + if (packageSubpath.length >= key2.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key2) === 1 && key2.lastIndexOf("*") === patternIndex) { + bestMatch = key2; + bestMatchSubpath = packageSubpath.slice( + patternIndex, + packageSubpath.length - patternTrailer.length + ); } - }; - } - if (optionInfo.deprecated) { - handlers.deprecated = true; + } } - if (isCLI && !optionInfo.array) { - const originalPreprocess = parameters.preprocess || ((x) => x); - parameters.preprocess = (value, schema, utils) => schema.preprocess(originalPreprocess(Array.isArray(value) ? at_default( - /* isOptionalObject*/ + if (bestMatch) { + const target = ( + /** @type {unknown} */ + exports[bestMatch] + ); + const resolveResult = resolvePackageTarget( + packageJsonUrl, + target, + bestMatchSubpath, + bestMatch, + base, + true, false, - value, - -1 - ) : value), utils); + packageSubpath.endsWith("/"), + conditions + ); + if (resolveResult === null || resolveResult === void 0) { + throw exportsNotFound(packageSubpath, packageJsonUrl, base); + } + return resolveResult; } - return optionInfo.array ? ArraySchema.create({ - ...isCLI ? { - preprocess: (v) => Array.isArray(v) ? v : [v] - } : {}, - ...handlers, - // @ts-expect-error - valueSchema: SchemaConstructor.create(parameters) - }) : SchemaConstructor.create({ - ...parameters, - ...handlers - }); + throw exportsNotFound(packageSubpath, packageJsonUrl, base); } -var normalize_options_default = normalizeOptions; - -// src/main/parser-and-printer.js -function getParserPluginByParserName(plugins, parserName) { - if (!parserName) { - throw new Error("parserName is required."); +function patternKeyCompare(a, b) { + const aPatternIndex = a.indexOf("*"); + const bPatternIndex = b.indexOf("*"); + const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; + const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; + if (baseLengthA > baseLengthB) + return -1; + if (baseLengthB > baseLengthA) + return 1; + if (aPatternIndex === -1) + return 1; + if (bPatternIndex === -1) + return -1; + if (a.length > b.length) + return -1; + if (b.length > a.length) + return 1; + return 0; +} +function packageImportsResolve(name, base, conditions) { + if (name === "#" || name.startsWith("#/") || name.endsWith("/")) { + const reason = "is not a valid internal imports specifier name"; + throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath5(base)); } - for (let index = plugins.length - 1; index >= 0; index--) { - const plugin = plugins[index]; - if (plugin.parsers && Object.prototype.hasOwnProperty.call(plugin.parsers, parserName)) { - return plugin; + let packageJsonUrl; + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + packageJsonUrl = pathToFileURL3(packageConfig.pjsonPath); + const imports = packageConfig.imports; + if (imports) { + if (own2.call(imports, name) && !name.includes("*")) { + const resolveResult = resolvePackageTarget( + packageJsonUrl, + imports[name], + "", + name, + base, + false, + true, + false, + conditions + ); + if (resolveResult !== null && resolveResult !== void 0) { + return resolveResult; + } + } else { + let bestMatch = ""; + let bestMatchSubpath = ""; + const keys = Object.getOwnPropertyNames(imports); + let i = -1; + while (++i < keys.length) { + const key2 = keys[i]; + const patternIndex = key2.indexOf("*"); + if (patternIndex !== -1 && name.startsWith(key2.slice(0, -1))) { + const patternTrailer = key2.slice(patternIndex + 1); + if (name.length >= key2.length && name.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key2) === 1 && key2.lastIndexOf("*") === patternIndex) { + bestMatch = key2; + bestMatchSubpath = name.slice( + patternIndex, + name.length - patternTrailer.length + ); + } + } + } + if (bestMatch) { + const target = imports[bestMatch]; + const resolveResult = resolvePackageTarget( + packageJsonUrl, + target, + bestMatchSubpath, + bestMatch, + base, + true, + true, + false, + conditions + ); + if (resolveResult !== null && resolveResult !== void 0) { + return resolveResult; + } + } + } } } - let message = `Couldn't resolve parser "${parserName}".`; - if (false) { - message += " Plugins must be explicitly added to the standalone bundle."; + throw importNotDefined(name, packageJsonUrl, base); +} +function parsePackageName(specifier, base) { + let separatorIndex = specifier.indexOf("/"); + let validPackageName = true; + let isScoped = false; + if (specifier[0] === "@") { + isScoped = true; + if (separatorIndex === -1 || specifier.length === 0) { + validPackageName = false; + } else { + separatorIndex = specifier.indexOf("/", separatorIndex + 1); + } } - throw new ConfigError(message); + const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex); + if (invalidPackageNameRegEx.exec(packageName) !== null) { + validPackageName = false; + } + if (!validPackageName) { + throw new ERR_INVALID_MODULE_SPECIFIER( + specifier, + "is not a valid package name", + fileURLToPath5(base) + ); + } + const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)); + return { packageName, packageSubpath, isScoped }; } -function getPrinterPluginByAstFormat(plugins, astFormat) { - if (!astFormat) { - throw new Error("astFormat is required."); +function packageResolve(specifier, base, conditions) { + if (builtinModules.includes(specifier)) { + return new URL3("node:" + specifier); } - for (let index = plugins.length - 1; index >= 0; index--) { - const plugin = plugins[index]; - if (plugin.printers && Object.prototype.hasOwnProperty.call(plugin.printers, astFormat)) { - return plugin; + const { packageName, packageSubpath, isScoped } = parsePackageName( + specifier, + base + ); + const packageConfig = getPackageScopeConfig(base); + if (packageConfig.exists) { + const packageJsonUrl2 = pathToFileURL3(packageConfig.pjsonPath); + if (packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) { + return packageExportsResolve( + packageJsonUrl2, + packageSubpath, + packageConfig, + base, + conditions + ); } } - let message = `Couldn't find plugin for AST format "${astFormat}".`; - if (false) { - message += " Plugins must be explicitly added to the standalone bundle."; - } - throw new ConfigError(message); + let packageJsonUrl = new URL3( + "./node_modules/" + packageName + "/package.json", + base + ); + let packageJsonPath = fileURLToPath5(packageJsonUrl); + let lastPath; + do { + const stat = tryStatSync(packageJsonPath.slice(0, -13)); + if (!stat.isDirectory()) { + lastPath = packageJsonPath; + packageJsonUrl = new URL3( + (isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", + packageJsonUrl + ); + packageJsonPath = fileURLToPath5(packageJsonUrl); + continue; + } + const packageConfig2 = package_json_reader_default.read(packageJsonPath, { + base, + specifier + }); + if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) { + return packageExportsResolve( + packageJsonUrl, + packageSubpath, + packageConfig2, + base, + conditions + ); + } + if (packageSubpath === ".") { + return legacyMainResolve(packageJsonUrl, packageConfig2, base); + } + return new URL3(packageSubpath, packageJsonUrl); + } while (packageJsonPath.length !== lastPath.length); + throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath5(base), false); } -function resolveParser({ - plugins, - parser -}) { - const plugin = getParserPluginByParserName(plugins, parser); - return initParser(plugin, parser); +function isRelativeSpecifier(specifier) { + if (specifier[0] === ".") { + if (specifier.length === 1 || specifier[1] === "/") + return true; + if (specifier[1] === "." && (specifier.length === 2 || specifier[2] === "/")) { + return true; + } + } + return false; } -function initParser(plugin, parserName) { - const parserOrParserInitFunction = plugin.parsers[parserName]; - return typeof parserOrParserInitFunction === "function" ? parserOrParserInitFunction() : parserOrParserInitFunction; +function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { + if (specifier === "") + return false; + if (specifier[0] === "/") + return true; + return isRelativeSpecifier(specifier); } -function initPrinter(plugin, astFormat) { - const printerOrPrinterInitFunction = plugin.printers[astFormat]; - return typeof printerOrPrinterInitFunction === "function" ? printerOrPrinterInitFunction() : printerOrPrinterInitFunction; +function moduleResolve(specifier, base, conditions, preserveSymlinks) { + const protocol = base.protocol; + const isRemote = protocol === "http:" || protocol === "https:"; + let resolved; + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { + resolved = new URL3(specifier, base); + } else if (!isRemote && specifier[0] === "#") { + resolved = packageImportsResolve(specifier, base, conditions); + } else { + try { + resolved = new URL3(specifier); + } catch { + if (!isRemote) { + resolved = packageResolve(specifier, base, conditions); + } + } + } + assert3(resolved !== void 0, "expected to be defined"); + if (resolved.protocol !== "file:") { + return resolved; + } + return finalizeResolution(resolved, base, preserveSymlinks); } - -// src/main/normalize-format-options.js -var formatOptionsHiddenDefaults = { - astFormat: "estree", - printer: {}, - originalText: void 0, - locStart: null, - locEnd: null -}; -async function normalizeFormatOptions(options8, opts = {}) { - var _a; - const rawOptions = { ...options8 }; - if (!rawOptions.parser) { - if (!rawOptions.filepath) { - throw new UndefinedParserError( - "No parser and no file path given, couldn't infer a parser." - ); - } else { - rawOptions.parser = infer_parser_default(rawOptions, { - physicalFile: rawOptions.filepath - }); - if (!rawOptions.parser) { - throw new UndefinedParserError( - `No parser could be inferred for file "${rawOptions.filepath}".` +function checkIfDisallowedImport(specifier, parsed, parsedParentURL) { + if (parsedParentURL) { + const parentProtocol = parsedParentURL.protocol; + if (parentProtocol === "http:" || parentProtocol === "https:") { + if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { + const parsedProtocol = parsed == null ? void 0 : parsed.protocol; + if (parsedProtocol && parsedProtocol !== "https:" && parsedProtocol !== "http:") { + throw new ERR_NETWORK_IMPORT_DISALLOWED( + specifier, + parsedParentURL, + "remote imports cannot import from a local location." + ); + } + return { url: (parsed == null ? void 0 : parsed.href) || "" }; + } + if (builtinModules.includes(specifier)) { + throw new ERR_NETWORK_IMPORT_DISALLOWED( + specifier, + parsedParentURL, + "remote imports cannot import from a local location." ); } + throw new ERR_NETWORK_IMPORT_DISALLOWED( + specifier, + parsedParentURL, + "only relative and absolute specifiers are supported." + ); } } - const supportOptions = getSupportInfo({ - plugins: options8.plugins, - showDeprecated: true - }).options; - const defaults = { - ...formatOptionsHiddenDefaults, - ...Object.fromEntries( - supportOptions.filter((optionInfo) => optionInfo.default !== void 0).map((option) => [option.name, option.default]) - ) - }; - const parserPlugin = getParserPluginByParserName( - rawOptions.plugins, - rawOptions.parser +} +function isURL(self) { + return Boolean( + self && typeof self === "object" && "href" in self && typeof self.href === "string" && "protocol" in self && typeof self.protocol === "string" && self.href && self.protocol ); - const parser = await initParser(parserPlugin, rawOptions.parser); - rawOptions.astFormat = parser.astFormat; - rawOptions.locEnd = parser.locEnd; - rawOptions.locStart = parser.locStart; - const printerPlugin = ((_a = parserPlugin.printers) == null ? void 0 : _a[parser.astFormat]) ? parserPlugin : getPrinterPluginByAstFormat(rawOptions.plugins, parser.astFormat); - const printer = await initPrinter(printerPlugin, parser.astFormat); - rawOptions.printer = printer; - const pluginDefaults = printerPlugin.defaultOptions ? Object.fromEntries( - Object.entries(printerPlugin.defaultOptions).filter( - ([, value]) => value !== void 0 - ) - ) : {}; - const mixedDefaults = { ...defaults, ...pluginDefaults }; - for (const [k, value] of Object.entries(mixedDefaults)) { - if (rawOptions[k] === null || rawOptions[k] === void 0) { - rawOptions[k] = value; - } +} +function throwIfInvalidParentURL(parentURL) { + if (parentURL === void 0) { + return; } - if (rawOptions.parser === "json") { - rawOptions.trailingComma = "none"; + if (typeof parentURL !== "string" && !isURL(parentURL)) { + throw new codes.ERR_INVALID_ARG_TYPE( + "parentURL", + ["string", "URL"], + parentURL + ); } - return normalize_options_default(rawOptions, supportOptions, { - passThrough: Object.keys(formatOptionsHiddenDefaults), - ...opts - }); -} -var normalize_format_options_default = normalizeFormatOptions; - -// src/main/create-get-visitor-keys-function.js -var nonTraversableKeys = /* @__PURE__ */ new Set([ - "tokens", - "comments", - "parent", - "enclosingNode", - "precedingNode", - "followingNode" -]); -var defaultGetVisitorKeys = (node) => Object.keys(node).filter((key) => !nonTraversableKeys.has(key)); -function createGetVisitorKeysFunction(printerGetVisitorKeys) { - return printerGetVisitorKeys ? (node) => printerGetVisitorKeys(node, nonTraversableKeys) : defaultGetVisitorKeys; } -var create_get_visitor_keys_function_default = createGetVisitorKeysFunction; - -// src/main/massage-ast.js -function massageAst(ast, options8) { - const { - printer: { - massageAstNode: cleanFunction, - getVisitorKeys: printerGetVisitorKeys +function defaultResolve(specifier, context = {}) { + const { parentURL } = context; + assert3(parentURL !== void 0, "expected `parentURL` to be defined"); + throwIfInvalidParentURL(parentURL); + let parsedParentURL; + if (parentURL) { + try { + parsedParentURL = new URL3(parentURL); + } catch { } - } = options8; - if (!cleanFunction) { - return ast; } - const getVisitorKeys = create_get_visitor_keys_function_default(printerGetVisitorKeys); - const ignoredProperties = cleanFunction.ignoredProperties ?? /* @__PURE__ */ new Set(); - return recurse(ast); - function recurse(node, parent) { - if (!(node !== null && typeof node === "object")) { - return node; - } - if (Array.isArray(node)) { - return node.map((child) => recurse(child, parent)).filter(Boolean); - } - const newObj = {}; - const childrenKeys = new Set(getVisitorKeys(node)); - for (const key in node) { - if (!Object.prototype.hasOwnProperty.call(node, key) || ignoredProperties.has(key)) { - continue; - } - if (childrenKeys.has(key)) { - newObj[key] = recurse(node[key], node); - } else { - newObj[key] = node[key]; - } - } - const result = cleanFunction(node, newObj, parent); - if (result === null) { - return; + let parsed; + try { + parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier) ? new URL3(specifier, parsedParentURL) : new URL3(specifier); + const protocol = parsed.protocol; + if (protocol === "data:") { + return { url: parsed.href, format: null }; } - return result ?? newObj; + } catch { } + const maybeReturn = checkIfDisallowedImport( + specifier, + parsed, + parsedParentURL + ); + if (maybeReturn) + return maybeReturn; + if (parsed && parsed.protocol === "node:") + return { url: specifier }; + const conditions = getConditionsSet(context.conditions); + const url2 = moduleResolve(specifier, new URL3(parentURL), conditions, false); + return { + // Do NOT cast `url` to a string: that will work even when there are real + // problems, silencing them + url: url2.href, + format: defaultGetFormatWithoutErrors(url2, { parentURL }) + }; } -var massage_ast_default = massageAst; -// src/main/parse.js -var import_code_frame = __toESM(require_lib3(), 1); -async function parse(originalText, options8) { - const parser = await resolveParser(options8); - const text = parser.preprocess ? parser.preprocess(originalText, options8) : originalText; - options8.originalText = text; - let ast; - try { - ast = await parser.parse( - text, - options8, - // TODO: remove the third argument in v4 - // The duplicated argument is passed as intended, see #10156 - options8 +// node_modules/import-meta-resolve/index.js +function resolve2(specifier, parent) { + if (!parent) { + throw new Error( + "Please pass `parent`: `import-meta-resolve` cannot ponyfill that" ); - } catch (error) { - handleParseError(error, originalText); } - return { text, ast }; -} -function handleParseError(error, text) { - const { loc } = error; - if (loc) { - const codeFrame = (0, import_code_frame.codeFrameColumns)(text, loc, { highlightCode: true }); - error.message += "\n" + codeFrame; - error.codeFrame = codeFrame; + try { + return defaultResolve(specifier, { parentURL: parent }).url; + } catch (error) { + const exception2 = ( + /** @type {ErrnoException} */ + error + ); + if ((exception2.code === "ERR_UNSUPPORTED_DIR_IMPORT" || exception2.code === "ERR_MODULE_NOT_FOUND") && typeof exception2.url === "string") { + return exception2.url; + } throw error; } - throw error; } -var parse_default = parse; -// src/common/ast-path.js -var _getNodeStackIndex, getNodeStackIndex_fn, _getAncestors, getAncestors_fn; -var AstPath = class { - constructor(value) { - __privateAdd(this, _getNodeStackIndex); - __privateAdd(this, _getAncestors); - this.stack = [value]; - } - /** @type {string | null} */ - get key() { - const { - stack, - siblings - } = this; - return at_default( - /* isOptionalObject*/ - false, - stack, - siblings === null ? -2 : -4 - ) ?? null; +// src/utils/import-from-file.js +function importFromFile(specifier, parent) { + const url2 = resolve2(specifier, pathToFileURL4(parent).href); + return import(url2); +} +var import_from_file_default = importFromFile; + +// src/utils/require-from-file.js +import { createRequire } from "module"; +function requireFromFile(id, parent) { + const require2 = createRequire(parent); + return require2(id); +} +var require_from_file_default = requireFromFile; + +// src/config/prettier-config/load-external-config.js +var requireErrorCodesShouldBeIgnored = /* @__PURE__ */ new Set([ + "MODULE_NOT_FOUND", + "ERR_REQUIRE_ESM", + "ERR_PACKAGE_PATH_NOT_EXPORTED" +]); +async function loadExternalConfig(externalConfig, configFile) { + try { + return require_from_file_default(externalConfig, configFile); + } catch (error) { + if (!requireErrorCodesShouldBeIgnored.has(error == null ? void 0 : error.code)) { + throw error; + } } - /** @type {number | null} */ - get index() { - return this.siblings === null ? null : at_default( - /* isOptionalObject*/ - false, - this.stack, - -2 + const module = await import_from_file_default(externalConfig, configFile); + return module.default; +} +var load_external_config_default = loadExternalConfig; + +// src/config/prettier-config/load-config.js +async function loadConfig(configFile) { + const { base: fileName, ext: extension } = path7.parse(configFile); + const load2 = fileName === "package.json" ? loadConfigFromPackageJson : loaders_default[extension]; + if (!load2) { + throw new Error( + `No loader specified for extension "${extension || "noExt"}"` ); } - /** @type {object} */ - get node() { - return at_default( - /* isOptionalObject*/ - false, - this.stack, - -1 - ); + let config = await load2(configFile); + if (!config) { + return; } - /** @type {object | null} */ - get parent() { - return this.getNode(1); + if (typeof config === "string") { + config = await load_external_config_default(config, configFile); } - /** @type {object | null} */ - get grandparent() { - return this.getNode(2); + if (typeof config !== "object") { + throw new TypeError( + `Config is only allowed to be an object, but received ${typeof config} in "${configFile}"` + ); } - /** @type {boolean} */ - get isInArray() { - return this.siblings !== null; + delete config.$schema; + return config; +} +var load_config_default = loadConfig; + +// src/config/prettier-config/index.js +var loadCache = /* @__PURE__ */ new Map(); +var searchCache = /* @__PURE__ */ new Map(); +function clearPrettierConfigCache() { + loadCache.clear(); + searchCache.clear(); +} +function loadPrettierConfig(configFile, { shouldCache }) { + configFile = path8.resolve(configFile); + if (!shouldCache || !loadCache.has(configFile)) { + loadCache.set(configFile, load_config_default(configFile)); } - /** @type {object[] | null} */ - get siblings() { - const { - stack - } = this; - const maybeArray = at_default( - /* isOptionalObject*/ - false, - stack, - -3 - ); - return Array.isArray(maybeArray) ? maybeArray : null; + return loadCache.get(configFile); +} +function getSearchFunction(stopDirectory) { + stopDirectory = stopDirectory ? path8.resolve(stopDirectory) : void 0; + if (!searchCache.has(stopDirectory)) { + const searcher2 = config_searcher_default(stopDirectory); + const searchFunction = searcher2.search.bind(searcher2); + searchCache.set(stopDirectory, searchFunction); + } + return searchCache.get(stopDirectory); +} +function searchPrettierConfig(startDirectory, options8 = {}) { + startDirectory = startDirectory ? path8.resolve(startDirectory) : process.cwd(); + const stopDirectory = mockable_default.getPrettierConfigSearchStopDirectory(); + const search = getSearchFunction(stopDirectory); + return search(startDirectory, { shouldCache: options8.shouldCache }); +} + +// src/config/resolve-config.js +function clearCache() { + clearPrettierConfigCache(); + clearEditorconfigCache(); +} +function loadEditorconfig2(file, options8) { + if (!file || !options8.editorconfig) { + return; } - /** @type {object | null} */ - get next() { - const { - siblings - } = this; - return siblings === null ? null : siblings[this.index + 1]; + const shouldCache = options8.useCache; + return loadEditorconfig(file, { shouldCache }); +} +async function loadPrettierConfig2(file, options8) { + const shouldCache = options8.useCache; + let configFile = options8.config; + if (!configFile) { + const directory = file ? path9.dirname(path9.resolve(file)) : void 0; + configFile = await searchPrettierConfig(directory, { shouldCache }); + } + if (!configFile) { + return; } - /** @type {object | null} */ - get previous() { - const { - siblings - } = this; - return siblings === null ? null : siblings[this.index - 1]; + const config = await loadPrettierConfig(configFile, { shouldCache }); + return { config, configFile }; +} +async function resolveConfig(fileUrlOrPath, options8) { + options8 = { useCache: true, ...options8 }; + const filePath = toPath(fileUrlOrPath); + const [result, editorConfigured] = await Promise.all([ + loadPrettierConfig2(filePath, options8), + loadEditorconfig2(filePath, options8) + ]); + if (!result && !editorConfigured) { + return null; } - /** @type {boolean} */ - get isFirst() { - return this.index === 0; + const merged = { + ...editorConfigured, + ...mergeOverrides(result, filePath) + }; + if (Array.isArray(merged.plugins)) { + merged.plugins = merged.plugins.map( + (value) => typeof value === "string" && value.startsWith(".") ? path9.resolve(path9.dirname(result.configFile), value) : value + ); } - /** @type {boolean} */ - get isLast() { - const { - siblings, - index - } = this; - return siblings !== null && index === siblings.length - 1; + return merged; +} +async function resolveConfigFile(fileUrlOrPath) { + const directory = fileUrlOrPath ? path9.dirname(path9.resolve(toPath(fileUrlOrPath))) : void 0; + const result = await searchPrettierConfig(directory, { shouldCache: false }); + return result ?? null; +} +function mergeOverrides(configResult, filePath) { + const { config, configFile } = configResult || {}; + const { overrides, ...options8 } = config || {}; + if (filePath && overrides) { + const relativeFilePath = path9.relative(path9.dirname(configFile), filePath); + for (const override of overrides) { + if (pathMatchesGlobs( + relativeFilePath, + override.files, + override.excludeFiles + )) { + Object.assign(options8, override.options); + } + } } - /** @type {boolean} */ - get isRoot() { - return this.stack.length === 1; + return options8; +} +function pathMatchesGlobs(filePath, patterns, excludedPatterns) { + const patternList = Array.isArray(patterns) ? patterns : [patterns]; + const [withSlashes, withoutSlashes] = partition_default( + patternList, + (pattern) => pattern.includes("/") + ); + return import_micromatch.default.isMatch(filePath, withoutSlashes, { + ignore: excludedPatterns, + basename: true, + dot: true + }) || import_micromatch.default.isMatch(filePath, withSlashes, { + ignore: excludedPatterns, + basename: false, + dot: true + }); +} + +// scripts/build/shims/string-replace-all.js +var stringReplaceAll2 = (isOptionalObject, original, pattern, replacement) => { + if (isOptionalObject && (original === void 0 || original === null)) { + return; } - /** @type {object} */ - get root() { - return this.stack[0]; + if (original.replaceAll) { + return original.replaceAll(pattern, replacement); } - /** @type {object[]} */ - get ancestors() { - return [...__privateMethod(this, _getAncestors, getAncestors_fn).call(this)]; + if (pattern.global) { + return original.replace(pattern, replacement); } - // The name of the current property is always the penultimate element of - // this.stack, and always a string/number/symbol. - getName() { - const { - stack - } = this; - const { - length - } = stack; - if (length > 1) { - return at_default( - /* isOptionalObject*/ - false, - stack, - -2 - ); - } - return null; + return original.split(pattern).join(replacement); +}; +var string_replace_all_default = stringReplaceAll2; + +// src/utils/ignore.js +var import_ignore = __toESM(require_ignore(), 1); +import path10 from "path"; +import url from "url"; +var createIgnore = import_ignore.default.default; +var slash = path10.sep === "\\" ? (filePath) => string_replace_all_default( + /* isOptionalObject*/ + false, + filePath, + "\\", + "/" +) : (filePath) => filePath; +function getRelativePath(file, ignoreFile) { + const ignoreFilePath = toPath(ignoreFile); + const filePath = isUrl(file) ? url.fileURLToPath(file) : path10.resolve(file); + return path10.relative( + // If there's an ignore-path set, the filename must be relative to the + // ignore path, not the current working directory. + ignoreFilePath ? path10.dirname(ignoreFilePath) : process.cwd(), + filePath + ); +} +async function createSingleIsIgnoredFunction(ignoreFile, withNodeModules) { + let content = ""; + if (ignoreFile) { + content += await read_file_default(ignoreFile) ?? ""; } - // The value of the current property is always the final element of - // this.stack. - getValue() { - return at_default( - /* isOptionalObject*/ - false, - this.stack, - -1 - ); + if (!withNodeModules) { + content += "\nnode_modules"; } - getNode(count = 0) { - const stackIndex = __privateMethod(this, _getNodeStackIndex, getNodeStackIndex_fn).call(this, count); - return stackIndex === -1 ? null : this.stack[stackIndex]; + if (!content) { + return; } - getParentNode(count = 0) { - return this.getNode(count + 1); + const ignore = createIgnore({ + allowRelativePaths: true + }).add(content); + return (file) => ignore.ignores(slash(getRelativePath(file, ignoreFile))); +} +async function createIsIgnoredFunction(ignoreFiles, withNodeModules) { + if (ignoreFiles.length === 0 && !withNodeModules) { + ignoreFiles = [void 0]; } - // Temporarily push properties named by string arguments given after the - // callback function onto this.stack, then call the callback with a - // reference to this (modified) AstPath object. Note that the stack will - // be restored to its original state after the callback is finished, so it - // is probably a mistake to retain a reference to the path. - call(callback, ...names) { - const { - stack - } = this; - const { - length - } = stack; - let value = at_default( - /* isOptionalObject*/ - false, - stack, - -1 - ); - for (const name of names) { - value = value[name]; - stack.push(name, value); - } - try { - return callback(this); - } finally { - stack.length = length; - } + const isIgnoredFunctions = (await Promise.all(ignoreFiles.map((ignoreFile) => createSingleIsIgnoredFunction(ignoreFile, withNodeModules)))).filter(Boolean); + return (file) => isIgnoredFunctions.some((isIgnored2) => isIgnored2(file)); +} +async function isIgnored(file, options8) { + const { + ignorePath: ignoreFiles, + withNodeModules + } = options8; + const isIgnored2 = await createIsIgnoredFunction(ignoreFiles, withNodeModules); + return isIgnored2(file); +} + +// src/utils/get-interpreter.js +var import_n_readlines = __toESM(require_readlines(), 1); +import fs6 from "fs"; +function getInterpreter(file) { + let fd; + try { + fd = fs6.openSync(file, "r"); + } catch { + return; } - callParent(callback, count = 0) { - const stackIndex = __privateMethod(this, _getNodeStackIndex, getNodeStackIndex_fn).call(this, count + 1); - const parentValues = this.stack.splice(stackIndex + 1); - try { - return callback(this); - } finally { - this.stack.push(...parentValues); + try { + const liner = new import_n_readlines.default(fd); + const firstLine = liner.next().toString("utf8"); + const m1 = firstLine.match(/^#!\/(?:usr\/)?bin\/env\s+(\S+)/); + if (m1) { + return m1[1]; } - } - // Similar to AstPath.prototype.call, except that the value obtained by - // accessing this.getValue()[name1][name2]... should be array. The - // callback will be called with a reference to this path object for each - // element of the array. - each(callback, ...names) { - const { - stack - } = this; - const { - length - } = stack; - let value = at_default( - /* isOptionalObject*/ - false, - stack, - -1 - ); - for (const name of names) { - value = value[name]; - stack.push(name, value); + const m2 = firstLine.match(/^#!\/(?:usr\/(?:local\/)?)?bin\/(\S+)/); + if (m2) { + return m2[1]; } + } finally { try { - for (let i = 0; i < value.length; ++i) { - stack.push(i, value[i]); - callback(this, i, value); - stack.length -= 2; - } - } finally { - stack.length = length; + fs6.closeSync(fd); + } catch { } } - // Similar to AstPath.prototype.each, except that the results of the - // callback function invocations are stored in an array and returned at - // the end of the iteration. - map(callback, ...names) { - const result = []; - this.each((path9, index, value) => { - result[index] = callback(path9, index, value); - }, ...names); - return result; +} +var get_interpreter_default = getInterpreter; + +// src/utils/infer-parser.js +var getFileBasename = (file) => String(file).split(/[/\\]/).pop(); +function getLanguageByFileName(languages2, file) { + if (!file) { + return; } - /** - * @param {...( - * | ((node: any, name: string | null, number: number | null) => boolean) - * | undefined - * )} predicates - */ - match(...predicates) { - let stackPointer = this.stack.length - 1; - let name = null; - let node = this.stack[stackPointer--]; - for (const predicate of predicates) { - if (node === void 0) { - return false; - } - let number = null; - if (typeof name === "number") { - number = name; - name = this.stack[stackPointer--]; - node = this.stack[stackPointer--]; - } - if (predicate && !predicate(node, name, number)) { - return false; - } - name = this.stack[stackPointer--]; - node = this.stack[stackPointer--]; - } - return true; + const basename = getFileBasename(file).toLowerCase(); + return languages2.find( + ({ filenames }) => filenames == null ? void 0 : filenames.some((name) => name.toLowerCase() === basename) + ) ?? languages2.find( + ({ extensions }) => extensions == null ? void 0 : extensions.some((extension) => basename.endsWith(extension)) + ); +} +function getLanguageByLanguageName(languages2, languageName) { + if (!languageName) { + return; } - /** - * Traverses the ancestors of the current node heading toward the tree root - * until it finds a node that matches the provided predicate function. Will - * return the first matching ancestor. If no such node exists, returns undefined. - * @param {(node: any) => boolean} predicate - * @internal Unstable API. Don't use in plugins for now. - */ - findAncestor(predicate) { - for (const node of __privateMethod(this, _getAncestors, getAncestors_fn).call(this)) { - if (predicate(node)) { - return node; - } - } + return languages2.find(({ name }) => name.toLowerCase() === languageName) ?? languages2.find(({ aliases }) => aliases == null ? void 0 : aliases.includes(languageName)) ?? languages2.find(({ extensions }) => extensions == null ? void 0 : extensions.includes(`.${languageName}`)); +} +function getLanguageByInterpreter(languages2, file) { + if (!file || getFileBasename(file).includes(".")) { + return; } - /** - * Traverses the ancestors of the current node heading toward the tree root - * until it finds a node that matches the provided predicate function. - * returns true if matched node found. - * @param {(node: any) => boolean} predicate - * @returns {boolean} - * @internal Unstable API. Don't use in plugins for now. - */ - hasAncestor(predicate) { - for (const node of __privateMethod(this, _getAncestors, getAncestors_fn).call(this)) { - if (predicate(node)) { - return true; - } - } - return false; + const interpreter = get_interpreter_default(file); + if (!interpreter) { + return; } -}; -_getNodeStackIndex = new WeakSet(); -getNodeStackIndex_fn = function(count) { - const { - stack - } = this; - for (let i = stack.length - 1; i >= 0; i -= 2) { - if (!Array.isArray(stack[i]) && --count < 0) { - return i; - } + return languages2.find( + ({ interpreters }) => interpreters == null ? void 0 : interpreters.includes(interpreter) + ); +} +function inferParser(options8, fileInfo) { + const languages2 = options8.plugins.flatMap( + (plugin) => ( + // @ts-expect-error -- Safe + plugin.languages ?? [] + ) + ); + const language = getLanguageByLanguageName(languages2, fileInfo.language) ?? getLanguageByFileName(languages2, fileInfo.physicalFile) ?? getLanguageByFileName(languages2, fileInfo.file) ?? getLanguageByInterpreter(languages2, fileInfo.physicalFile); + return language == null ? void 0 : language.parsers[0]; +} +var infer_parser_default = inferParser; + +// src/common/get-file-info.js +async function getFileInfo(file, options8) { + if (typeof file !== "string" && !(file instanceof URL)) { + throw new TypeError( + `expect \`file\` to be a string or URL, got \`${typeof file}\`` + ); } - return -1; -}; -_getAncestors = new WeakSet(); -getAncestors_fn = function* () { - const { - stack - } = this; - for (let index = stack.length - 3; index >= 0; index -= 2) { - const value = stack[index]; - if (!Array.isArray(value)) { - yield value; - } + let { ignorePath, withNodeModules } = options8; + if (!Array.isArray(ignorePath)) { + ignorePath = [ignorePath]; } -}; -var ast_path_default = AstPath; - -// src/main/comments/attach.js -import assert2 from "assert"; - -// src/utils/skip.js -function skip(characters) { - return (text, startIndex, options8) => { - const backwards = Boolean(options8 == null ? void 0 : options8.backwards); - if (startIndex === false) { - return false; - } - const { length } = text; - let cursor2 = startIndex; - while (cursor2 >= 0 && cursor2 < length) { - const character = text.charAt(cursor2); - if (characters instanceof RegExp) { - if (!characters.test(character)) { - return cursor2; - } - } else if (!characters.includes(character)) { - return cursor2; - } - backwards ? cursor2-- : cursor2++; - } - if (cursor2 === -1 || cursor2 === length) { - return cursor2; - } - return false; + const ignored = await isIgnored(file, { ignorePath, withNodeModules }); + let inferredParser; + if (!ignored) { + inferredParser = await getParser(file, options8); + } + return { + ignored, + inferredParser: inferredParser ?? null }; } -var skipWhitespace = skip(/\s/); -var skipSpaces = skip(" "); -var skipToLineEnd = skip(",; "); -var skipEverythingButNewLine = skip(/[^\n\r]/); +async function getParser(file, options8) { + let config; + if (options8.resolveConfig !== false) { + config = await resolveConfig(file); + } + return (config == null ? void 0 : config.parser) ?? infer_parser_default(options8, { physicalFile: file }); +} +var get_file_info_default = getFileInfo; -// src/utils/skip-newline.js -function skipNewline(text, startIndex, options8) { - const backwards = Boolean(options8 == null ? void 0 : options8.backwards); - if (startIndex === false) { - return false; +// src/main/core.js +var import_diff = __toESM(require_array2(), 1); + +// src/common/end-of-line.js +function guessEndOfLine(text) { + const index = text.indexOf("\r"); + if (index >= 0) { + return text.charAt(index + 1) === "\n" ? "crlf" : "cr"; } - const character = text.charAt(startIndex); - if (backwards) { - if (text.charAt(startIndex - 1) === "\r" && character === "\n") { - return startIndex - 2; - } - if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") { - return startIndex - 1; - } - } else { - if (character === "\r" && text.charAt(startIndex + 1) === "\n") { - return startIndex + 2; - } - if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") { - return startIndex + 1; - } + return "lf"; +} +function convertEndOfLineToChars(value) { + switch (value) { + case "cr": + return "\r"; + case "crlf": + return "\r\n"; + default: + return "\n"; } - return startIndex; } -var skip_newline_default = skipNewline; - -// src/utils/has-newline.js -function hasNewline(text, startIndex, options8 = {}) { - const idx = skipSpaces( +function countEndOfLineChars(text, eol) { + let regex; + switch (eol) { + case "\n": + regex = /\n/g; + break; + case "\r": + regex = /\r/g; + break; + case "\r\n": + regex = /\r\n/g; + break; + default: + throw new Error(`Unexpected "eol" ${JSON.stringify(eol)}.`); + } + const endOfLines = text.match(regex); + return endOfLines ? endOfLines.length : 0; +} +function normalizeEndOfLine(text) { + return string_replace_all_default( + /* isOptionalObject*/ + false, text, - options8.backwards ? startIndex - 1 : startIndex, - options8 + /\r\n?/g, + "\n" ); - const idx2 = skip_newline_default(text, idx, options8); - return idx !== idx2; } -var has_newline_default = hasNewline; -// src/utils/is-non-empty-array.js -function isNonEmptyArray(object) { - return Array.isArray(object) && object.length > 0; +// src/document/constants.js +var DOC_TYPE_STRING = "string"; +var DOC_TYPE_ARRAY = "array"; +var DOC_TYPE_CURSOR = "cursor"; +var DOC_TYPE_INDENT = "indent"; +var DOC_TYPE_ALIGN = "align"; +var DOC_TYPE_TRIM = "trim"; +var DOC_TYPE_GROUP = "group"; +var DOC_TYPE_FILL = "fill"; +var DOC_TYPE_IF_BREAK = "if-break"; +var DOC_TYPE_INDENT_IF_BREAK = "indent-if-break"; +var DOC_TYPE_LINE_SUFFIX = "line-suffix"; +var DOC_TYPE_LINE_SUFFIX_BOUNDARY = "line-suffix-boundary"; +var DOC_TYPE_LINE = "line"; +var DOC_TYPE_LABEL = "label"; +var DOC_TYPE_BREAK_PARENT = "break-parent"; +var VALID_OBJECT_DOC_TYPES = /* @__PURE__ */ new Set([ + DOC_TYPE_CURSOR, + DOC_TYPE_INDENT, + DOC_TYPE_ALIGN, + DOC_TYPE_TRIM, + DOC_TYPE_GROUP, + DOC_TYPE_FILL, + DOC_TYPE_IF_BREAK, + DOC_TYPE_INDENT_IF_BREAK, + DOC_TYPE_LINE_SUFFIX, + DOC_TYPE_LINE_SUFFIX_BOUNDARY, + DOC_TYPE_LINE, + DOC_TYPE_LABEL, + DOC_TYPE_BREAK_PARENT +]); + +// src/document/utils/get-doc-type.js +function getDocType(doc2) { + if (typeof doc2 === "string") { + return DOC_TYPE_STRING; + } + if (Array.isArray(doc2)) { + return DOC_TYPE_ARRAY; + } + if (!doc2) { + return; + } + const { type: type2 } = doc2; + if (VALID_OBJECT_DOC_TYPES.has(type2)) { + return type2; + } } -var is_non_empty_array_default = isNonEmptyArray; +var get_doc_type_default = getDocType; -// src/utils/is-object.js -function isObject(object) { - return object !== null && typeof object === "object"; +// src/document/invalid-doc-error.js +var disjunctionListFormat = (list) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(list); +function getDocErrorMessage(doc2) { + const type2 = doc2 === null ? "null" : typeof doc2; + if (type2 !== "string" && type2 !== "object") { + return `Unexpected doc '${type2}', +Expected it to be 'string' or 'object'.`; + } + if (get_doc_type_default(doc2)) { + throw new Error("doc is valid."); + } + const objectType = Object.prototype.toString.call(doc2); + if (objectType !== "[object Object]") { + return `Unexpected doc '${objectType}'.`; + } + const EXPECTED_TYPE_VALUES = disjunctionListFormat( + [...VALID_OBJECT_DOC_TYPES].map((type3) => `'${type3}'`) + ); + return `Unexpected doc.type '${doc2.type}'. +Expected it to be ${EXPECTED_TYPE_VALUES}.`; } -var is_object_default = isObject; +var InvalidDocError = class extends Error { + name = "InvalidDocError"; + constructor(doc2) { + super(getDocErrorMessage(doc2)); + this.doc = doc2; + } +}; +var invalid_doc_error_default = InvalidDocError; -// src/utils/ast-utils.js -function* getChildren(node, options8) { - const { getVisitorKeys, filter = () => true } = options8; - const isMatchedNode = (node2) => is_object_default(node2) && filter(node2); - for (const key of getVisitorKeys(node)) { - const value = node[key]; - if (Array.isArray(value)) { - for (const child of value) { - if (isMatchedNode(child)) { - yield child; +// src/document/utils/traverse-doc.js +var traverseDocOnExitStackMarker = {}; +function traverseDoc(doc2, onEnter, onExit, shouldTraverseConditionalGroups) { + const docsStack = [doc2]; + while (docsStack.length > 0) { + const doc3 = docsStack.pop(); + if (doc3 === traverseDocOnExitStackMarker) { + onExit(docsStack.pop()); + continue; + } + if (onExit) { + docsStack.push(doc3, traverseDocOnExitStackMarker); + } + const docType = get_doc_type_default(doc3); + if (!docType) { + throw new invalid_doc_error_default(doc3); + } + if ((onEnter == null ? void 0 : onEnter(doc3)) === false) { + continue; + } + switch (docType) { + case DOC_TYPE_ARRAY: + case DOC_TYPE_FILL: { + const parts = docType === DOC_TYPE_ARRAY ? doc3 : doc3.parts; + for (let ic = parts.length, i = ic - 1; i >= 0; --i) { + docsStack.push(parts[i]); } + break; } - } else if (isMatchedNode(value)) { - yield value; + case DOC_TYPE_IF_BREAK: + docsStack.push(doc3.flatContents, doc3.breakContents); + break; + case DOC_TYPE_GROUP: + if (shouldTraverseConditionalGroups && doc3.expandedStates) { + for (let ic = doc3.expandedStates.length, i = ic - 1; i >= 0; --i) { + docsStack.push(doc3.expandedStates[i]); + } + } else { + docsStack.push(doc3.contents); + } + break; + case DOC_TYPE_ALIGN: + case DOC_TYPE_INDENT: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_LABEL: + case DOC_TYPE_LINE_SUFFIX: + docsStack.push(doc3.contents); + break; + case DOC_TYPE_STRING: + case DOC_TYPE_CURSOR: + case DOC_TYPE_TRIM: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + case DOC_TYPE_LINE: + case DOC_TYPE_BREAK_PARENT: + break; + default: + throw new invalid_doc_error_default(doc3); } } } -function* getDescendants(node, options8) { - const queue = [node]; - for (let index = 0; index < queue.length; index++) { - const node2 = queue[index]; - for (const child of getChildren(node2, options8)) { - yield child; - queue.push(child); +var traverse_doc_default = traverseDoc; + +// src/document/utils/assert-doc.js +var noop = () => { +}; +var assertDoc = true ? noop : function(doc2) { + traverse_doc_default(doc2, (doc3) => { + if (checked.has(doc3)) { + return false; + } + if (typeof doc3 !== "string") { + checked.add(doc3); } + }); +}; +var assertDocArray = true ? noop : function(docs, optional = false) { + if (optional && !docs) { + return; } -} - -// src/main/comments/utils.js -function describeNodeForDebugging(node) { - const nodeType = node.type || node.kind || "(unknown type)"; - let nodeName = String( - node.name || node.id && (typeof node.id === "object" ? node.id.name : node.id) || node.key && (typeof node.key === "object" ? node.key.name : node.key) || node.value && (typeof node.value === "object" ? "" : String(node.value)) || node.operator || "" - ); - if (nodeName.length > 20) { - nodeName = nodeName.slice(0, 19) + "\u2026"; + if (!Array.isArray(docs)) { + throw new TypeError("Unexpected doc array."); } - return nodeType + (nodeName ? " " + nodeName : ""); + for (const doc2 of docs) { + assertDoc(doc2); + } +}; + +// src/document/builders.js +function indent(contents) { + assertDoc(contents); + return { type: DOC_TYPE_INDENT, contents }; } -function addCommentHelper(node, comment) { - const comments = node.comments ?? (node.comments = []); - comments.push(comment); - comment.printed = false; - comment.nodeDescription = describeNodeForDebugging(node); +function align(widthOrString, contents) { + assertDoc(contents); + return { type: DOC_TYPE_ALIGN, contents, n: widthOrString }; } -function addLeadingComment(node, comment) { - comment.leading = true; - comment.trailing = false; - addCommentHelper(node, comment); +function fill(parts) { + assertDocArray(parts); + return { type: DOC_TYPE_FILL, parts }; } -function addDanglingComment(node, comment, marker) { - comment.leading = false; - comment.trailing = false; - if (marker) { - comment.marker = marker; +function lineSuffix(contents) { + assertDoc(contents); + return { type: DOC_TYPE_LINE_SUFFIX, contents }; +} +var breakParent = { type: DOC_TYPE_BREAK_PARENT }; +var hardlineWithoutBreakParent = { type: DOC_TYPE_LINE, hard: true }; +var line2 = { type: DOC_TYPE_LINE }; +var hardline = [hardlineWithoutBreakParent, breakParent]; +var cursor = { type: DOC_TYPE_CURSOR }; +function addAlignmentToDoc(doc2, size, tabWidth) { + assertDoc(doc2); + let aligned = doc2; + if (size > 0) { + for (let i = 0; i < Math.floor(size / tabWidth); ++i) { + aligned = indent(aligned); + } + aligned = align(size % tabWidth, aligned); + aligned = align(Number.NEGATIVE_INFINITY, aligned); } - addCommentHelper(node, comment); -} -function addTrailingComment(node, comment) { - comment.leading = false; - comment.trailing = true; - addCommentHelper(node, comment); + return aligned; } -// src/main/comments/attach.js -var childNodesCache = /* @__PURE__ */ new WeakMap(); -function getSortedChildNodes(node, options8) { - if (childNodesCache.has(node)) { - return childNodesCache.get(node); +// src/document/debug.js +function flattenDoc(doc2) { + var _a; + if (!doc2) { + return ""; } - const { - printer: { - getCommentChildNodes, - canAttachComment, - getVisitorKeys: printerGetVisitorKeys - }, - locStart, - locEnd - } = options8; - if (!canAttachComment) { - return []; + if (Array.isArray(doc2)) { + const res = []; + for (const part of doc2) { + if (Array.isArray(part)) { + res.push(...flattenDoc(part)); + } else { + const flattened = flattenDoc(part); + if (flattened !== "") { + res.push(flattened); + } + } + } + return res; } - const childNodes = ((getCommentChildNodes == null ? void 0 : getCommentChildNodes(node, options8)) ?? [ - ...getChildren(node, { - getVisitorKeys: create_get_visitor_keys_function_default(printerGetVisitorKeys) - }) - ]).flatMap( - (node2) => canAttachComment(node2) ? [node2] : getSortedChildNodes(node2, options8) - ); - childNodes.sort( - (nodeA, nodeB) => locStart(nodeA) - locStart(nodeB) || locEnd(nodeA) - locEnd(nodeB) - ); - childNodesCache.set(node, childNodes); - return childNodes; + if (doc2.type === DOC_TYPE_IF_BREAK) { + return { + ...doc2, + breakContents: flattenDoc(doc2.breakContents), + flatContents: flattenDoc(doc2.flatContents) + }; + } + if (doc2.type === DOC_TYPE_GROUP) { + return { + ...doc2, + contents: flattenDoc(doc2.contents), + expandedStates: (_a = doc2.expandedStates) == null ? void 0 : _a.map(flattenDoc) + }; + } + if (doc2.type === DOC_TYPE_FILL) { + return { type: "fill", parts: doc2.parts.map(flattenDoc) }; + } + if (doc2.contents) { + return { ...doc2, contents: flattenDoc(doc2.contents) }; + } + return doc2; } -function decorateComment(node, comment, options8, enclosingNode) { - const { locStart, locEnd } = options8; - const commentStart = locStart(comment); - const commentEnd = locEnd(comment); - const childNodes = getSortedChildNodes(node, options8); - let precedingNode; - let followingNode; - let left = 0; - let right = childNodes.length; - while (left < right) { - const middle = left + right >> 1; - const child = childNodes[middle]; - const start = locStart(child); - const end = locEnd(child); - if (start <= commentStart && commentEnd <= end) { - return decorateComment(child, comment, options8, child); +function printDocToDebug(doc2) { + const printedSymbols = /* @__PURE__ */ Object.create(null); + const usedKeysForSymbols = /* @__PURE__ */ new Set(); + return printDoc(flattenDoc(doc2)); + function printDoc(doc3, index, parentParts) { + var _a, _b; + if (typeof doc3 === "string") { + return JSON.stringify(doc3); } - if (end <= commentStart) { - precedingNode = child; - left = middle + 1; - continue; + if (Array.isArray(doc3)) { + const printed = doc3.map(printDoc).filter(Boolean); + return printed.length === 1 ? printed[0] : `[${printed.join(", ")}]`; } - if (commentEnd <= start) { - followingNode = child; - right = middle; - continue; + if (doc3.type === DOC_TYPE_LINE) { + const withBreakParent = ((_a = parentParts == null ? void 0 : parentParts[index + 1]) == null ? void 0 : _a.type) === DOC_TYPE_BREAK_PARENT; + if (doc3.literal) { + return withBreakParent ? "literalline" : "literallineWithoutBreakParent"; + } + if (doc3.hard) { + return withBreakParent ? "hardline" : "hardlineWithoutBreakParent"; + } + if (doc3.soft) { + return "softline"; + } + return "line"; } - throw new Error("Comment location overlaps with node location"); - } - if ((enclosingNode == null ? void 0 : enclosingNode.type) === "TemplateLiteral") { - const { quasis } = enclosingNode; - const commentIndex = findExpressionIndexForComment( - quasis, - comment, - options8 - ); - if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options8) !== commentIndex) { - precedingNode = null; + if (doc3.type === DOC_TYPE_BREAK_PARENT) { + const afterHardline = ((_b = parentParts == null ? void 0 : parentParts[index - 1]) == null ? void 0 : _b.type) === DOC_TYPE_LINE && parentParts[index - 1].hard; + return afterHardline ? void 0 : "breakParent"; } - if (followingNode && findExpressionIndexForComment(quasis, followingNode, options8) !== commentIndex) { - followingNode = null; + if (doc3.type === DOC_TYPE_TRIM) { + return "trim"; } - } - return { enclosingNode, precedingNode, followingNode }; -} -var returnFalse = () => false; -function attachComments(ast, options8) { - const { comments } = ast; - delete ast.comments; - if (!is_non_empty_array_default(comments) || !options8.printer.canAttachComment) { - return; - } - const tiesToBreak = []; - const { - locStart, - locEnd, - printer: { - experimentalFeatures: { - // TODO: Make this as default behavior - avoidAstMutation = false - } = {}, - handleComments = {} - }, - originalText: text - } = options8; - const { - ownLine: handleOwnLineComment = returnFalse, - endOfLine: handleEndOfLineComment = returnFalse, - remaining: handleRemainingComment = returnFalse - } = handleComments; - const decoratedComments = comments.map((comment, index) => ({ - ...decorateComment(ast, comment, options8), - comment, - text, - options: options8, - ast, - isLastComment: comments.length - 1 === index - })); - for (const [index, context] of decoratedComments.entries()) { - const { - comment, - precedingNode, - enclosingNode, - followingNode, - text: text2, - options: options9, - ast: ast2, - isLastComment - } = context; - if (options9.parser === "json" || options9.parser === "json5" || options9.parser === "__js_expression" || options9.parser === "__ts_expression" || options9.parser === "__vue_expression" || options9.parser === "__vue_ts_expression") { - if (locStart(comment) - locStart(ast2) <= 0) { - addLeadingComment(ast2, comment); - continue; - } - if (locEnd(comment) - locEnd(ast2) >= 0) { - addTrailingComment(ast2, comment); - continue; - } + if (doc3.type === DOC_TYPE_INDENT) { + return "indent(" + printDoc(doc3.contents) + ")"; } - let args; - if (avoidAstMutation) { - args = [context]; - } else { - comment.enclosingNode = enclosingNode; - comment.precedingNode = precedingNode; - comment.followingNode = followingNode; - args = [comment, text2, options9, ast2, isLastComment]; + if (doc3.type === DOC_TYPE_ALIGN) { + return doc3.n === Number.NEGATIVE_INFINITY ? "dedentToRoot(" + printDoc(doc3.contents) + ")" : doc3.n < 0 ? "dedent(" + printDoc(doc3.contents) + ")" : doc3.n.type === "root" ? "markAsRoot(" + printDoc(doc3.contents) + ")" : "align(" + JSON.stringify(doc3.n) + ", " + printDoc(doc3.contents) + ")"; } - if (isOwnLineComment(text2, options9, decoratedComments, index)) { - comment.placement = "ownLine"; - if (handleOwnLineComment(...args)) { - } else if (followingNode) { - addLeadingComment(followingNode, comment); - } else if (precedingNode) { - addTrailingComment(precedingNode, comment); - } else if (enclosingNode) { - addDanglingComment(enclosingNode, comment); - } else { - addDanglingComment(ast2, comment); - } - } else if (isEndOfLineComment(text2, options9, decoratedComments, index)) { - comment.placement = "endOfLine"; - if (handleEndOfLineComment(...args)) { - } else if (precedingNode) { - addTrailingComment(precedingNode, comment); - } else if (followingNode) { - addLeadingComment(followingNode, comment); - } else if (enclosingNode) { - addDanglingComment(enclosingNode, comment); - } else { - addDanglingComment(ast2, comment); - } - } else { - comment.placement = "remaining"; - if (handleRemainingComment(...args)) { - } else if (precedingNode && followingNode) { - const tieCount = tiesToBreak.length; - if (tieCount > 0) { - const lastTie = tiesToBreak[tieCount - 1]; - if (lastTie.followingNode !== followingNode) { - breakTies(tiesToBreak, options9); - } - } - tiesToBreak.push(context); - } else if (precedingNode) { - addTrailingComment(precedingNode, comment); - } else if (followingNode) { - addLeadingComment(followingNode, comment); - } else if (enclosingNode) { - addDanglingComment(enclosingNode, comment); - } else { - addDanglingComment(ast2, comment); + if (doc3.type === DOC_TYPE_IF_BREAK) { + return "ifBreak(" + printDoc(doc3.breakContents) + (doc3.flatContents ? ", " + printDoc(doc3.flatContents) : "") + (doc3.groupId ? (!doc3.flatContents ? ', ""' : "") + `, { groupId: ${printGroupId(doc3.groupId)} }` : "") + ")"; + } + if (doc3.type === DOC_TYPE_INDENT_IF_BREAK) { + const optionsParts = []; + if (doc3.negate) { + optionsParts.push("negate: true"); } + if (doc3.groupId) { + optionsParts.push(`groupId: ${printGroupId(doc3.groupId)}`); + } + const options8 = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; + return `indentIfBreak(${printDoc(doc3.contents)}${options8})`; } - } - breakTies(tiesToBreak, options8); - if (!avoidAstMutation) { - for (const comment of comments) { - delete comment.precedingNode; - delete comment.enclosingNode; - delete comment.followingNode; - } - } -} -var isAllEmptyAndNoLineBreak = (text) => !/[\S\n\u2028\u2029]/.test(text); -function isOwnLineComment(text, options8, decoratedComments, commentIndex) { - const { comment, precedingNode } = decoratedComments[commentIndex]; - const { locStart, locEnd } = options8; - let start = locStart(comment); - if (precedingNode) { - for (let index = commentIndex - 1; index >= 0; index--) { - const { comment: comment2, precedingNode: currentCommentPrecedingNode } = decoratedComments[index]; - if (currentCommentPrecedingNode !== precedingNode || !isAllEmptyAndNoLineBreak(text.slice(locEnd(comment2), start))) { - break; + if (doc3.type === DOC_TYPE_GROUP) { + const optionsParts = []; + if (doc3.break && doc3.break !== "propagated") { + optionsParts.push("shouldBreak: true"); } - start = locStart(comment2); + if (doc3.id) { + optionsParts.push(`id: ${printGroupId(doc3.id)}`); + } + const options8 = optionsParts.length > 0 ? `, { ${optionsParts.join(", ")} }` : ""; + if (doc3.expandedStates) { + return `conditionalGroup([${doc3.expandedStates.map((part) => printDoc(part)).join(",")}]${options8})`; + } + return `group(${printDoc(doc3.contents)}${options8})`; + } + if (doc3.type === DOC_TYPE_FILL) { + return `fill([${doc3.parts.map((part) => printDoc(part)).join(", ")}])`; + } + if (doc3.type === DOC_TYPE_LINE_SUFFIX) { + return "lineSuffix(" + printDoc(doc3.contents) + ")"; + } + if (doc3.type === DOC_TYPE_LINE_SUFFIX_BOUNDARY) { + return "lineSuffixBoundary"; } + if (doc3.type === DOC_TYPE_LABEL) { + return `label(${JSON.stringify(doc3.label)}, ${printDoc(doc3.contents)})`; + } + throw new Error("Unknown doc type " + doc3.type); } - return has_newline_default(text, start, { backwards: true }); -} -function isEndOfLineComment(text, options8, decoratedComments, commentIndex) { - const { comment, followingNode } = decoratedComments[commentIndex]; - const { locStart, locEnd } = options8; - let end = locEnd(comment); - if (followingNode) { - for (let index = commentIndex + 1; index < decoratedComments.length; index++) { - const { comment: comment2, followingNode: currentCommentFollowingNode } = decoratedComments[index]; - if (currentCommentFollowingNode !== followingNode || !isAllEmptyAndNoLineBreak(text.slice(end, locStart(comment2)))) { - break; + function printGroupId(id) { + if (typeof id !== "symbol") { + return JSON.stringify(String(id)); + } + if (id in printedSymbols) { + return printedSymbols[id]; + } + const prefix = id.description || "symbol"; + for (let counter = 0; ; counter++) { + const key2 = prefix + (counter > 0 ? ` #${counter}` : ""); + if (!usedKeysForSymbols.has(key2)) { + usedKeysForSymbols.add(key2); + return printedSymbols[id] = `Symbol.for(${JSON.stringify(key2)})`; } - end = locEnd(comment2); } } - return has_newline_default(text, end); } -function breakTies(tiesToBreak, options8) { - var _a, _b; - const tieCount = tiesToBreak.length; - if (tieCount === 0) { + +// scripts/build/shims/at.js +var at = (isOptionalObject, object, index) => { + if (isOptionalObject && (object === void 0 || object === null)) { return; } - const { precedingNode, followingNode } = tiesToBreak[0]; - let gapEndPos = options8.locStart(followingNode); - let indexOfFirstLeadingComment; - for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) { - const { - comment, - precedingNode: currentCommentPrecedingNode, - followingNode: currentCommentFollowingNode - } = tiesToBreak[indexOfFirstLeadingComment - 1]; - assert2.strictEqual(currentCommentPrecedingNode, precedingNode); - assert2.strictEqual(currentCommentFollowingNode, followingNode); - const gap = options8.originalText.slice(options8.locEnd(comment), gapEndPos); - if (((_b = (_a = options8.printer).isGap) == null ? void 0 : _b.call(_a, gap, options8)) ?? /^[\s(]*$/.test(gap)) { - gapEndPos = options8.locStart(comment); - } else { - break; - } + if (Array.isArray(object) || typeof object === "string") { + return object[index < 0 ? object.length + index : index]; } - for (const [i, { comment }] of tiesToBreak.entries()) { - if (i < indexOfFirstLeadingComment) { - addTrailingComment(precedingNode, comment); - } else { - addLeadingComment(followingNode, comment); - } + return object.at(index); +}; +var at_default = at; + +// node_modules/emoji-regex/index.mjs +var emoji_regex_default = () => { + return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g; +}; + +// node_modules/get-east-asian-width/lookup.js +function isFullWidth(x) { + return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510; +} +function isWide(x) { + return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141; +} + +// node_modules/get-east-asian-width/index.js +var _isNarrowWidth = (codePoint) => !(isFullWidth(codePoint) || isWide(codePoint)); + +// src/utils/get-string-width.js +var notAsciiRegex = /[^\x20-\x7F]/; +function getStringWidth(text) { + if (!text) { + return 0; } - for (const node of [precedingNode, followingNode]) { - if (node.comments && node.comments.length > 1) { - node.comments.sort((a, b) => options8.locStart(a) - options8.locStart(b)); - } + if (!notAsciiRegex.test(text)) { + return text.length; } - tiesToBreak.length = 0; -} -function findExpressionIndexForComment(quasis, comment, options8) { - const startPos = options8.locStart(comment) - 1; - for (let i = 1; i < quasis.length; ++i) { - if (startPos < options8.locStart(quasis[i])) { - return i - 1; + text = text.replace(emoji_regex_default(), " "); + let width = 0; + for (const character of text) { + const codePoint = character.codePointAt(0); + if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) { + continue; + } + if (codePoint >= 768 && codePoint <= 879) { + continue; } + width += _isNarrowWidth(codePoint) ? 1 : 2; } - return 0; -} - -// src/utils/is-previous-line-empty.js -function isPreviousLineEmpty(text, startIndex) { - let idx = startIndex - 1; - idx = skipSpaces(text, idx, { backwards: true }); - idx = skip_newline_default(text, idx, { backwards: true }); - idx = skipSpaces(text, idx, { backwards: true }); - const idx2 = skip_newline_default(text, idx, { backwards: true }); - return idx !== idx2; + return width; } -var is_previous_line_empty_default = isPreviousLineEmpty; +var get_string_width_default = getStringWidth; -// src/main/comments/print.js -function printComment(path9, options8) { - const comment = path9.node; - comment.printed = true; - return options8.printer.printComment(path9, options8); -} -function printLeadingComment(path9, options8) { - var _a; - const comment = path9.node; - const parts = [printComment(path9, options8)]; - const { printer, originalText, locStart, locEnd } = options8; - const isBlock = (_a = printer.isBlockComment) == null ? void 0 : _a.call(printer, comment); - if (isBlock) { - const lineBreak = has_newline_default(originalText, locEnd(comment)) ? has_newline_default(originalText, locStart(comment), { - backwards: true - }) ? hardline : line : " "; - parts.push(lineBreak); - } else { - parts.push(hardline); +// src/document/utils.js +var getDocParts = (doc2) => { + if (Array.isArray(doc2)) { + return doc2; } - const index = skip_newline_default( - originalText, - skipSpaces(originalText, locEnd(comment)) - ); - if (index !== false && has_newline_default(originalText, index)) { - parts.push(hardline); + if (doc2.type !== DOC_TYPE_FILL) { + throw new Error(`Expect doc to be 'array' or '${DOC_TYPE_FILL}'.`); + } + return doc2.parts; +}; +function mapDoc(doc2, cb) { + if (typeof doc2 === "string") { + return cb(doc2); + } + const mapped = /* @__PURE__ */ new Map(); + return rec(doc2); + function rec(doc3) { + if (mapped.has(doc3)) { + return mapped.get(doc3); + } + const result = process4(doc3); + mapped.set(doc3, result); + return result; + } + function process4(doc3) { + switch (get_doc_type_default(doc3)) { + case DOC_TYPE_ARRAY: + return cb(doc3.map(rec)); + case DOC_TYPE_FILL: + return cb({ + ...doc3, + parts: doc3.parts.map(rec) + }); + case DOC_TYPE_IF_BREAK: + return cb({ + ...doc3, + breakContents: rec(doc3.breakContents), + flatContents: rec(doc3.flatContents) + }); + case DOC_TYPE_GROUP: { + let { + expandedStates, + contents + } = doc3; + if (expandedStates) { + expandedStates = expandedStates.map(rec); + contents = expandedStates[0]; + } else { + contents = rec(contents); + } + return cb({ + ...doc3, + contents, + expandedStates + }); + } + case DOC_TYPE_ALIGN: + case DOC_TYPE_INDENT: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_LABEL: + case DOC_TYPE_LINE_SUFFIX: + return cb({ + ...doc3, + contents: rec(doc3.contents) + }); + case DOC_TYPE_STRING: + case DOC_TYPE_CURSOR: + case DOC_TYPE_TRIM: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + case DOC_TYPE_LINE: + case DOC_TYPE_BREAK_PARENT: + return cb(doc3); + default: + throw new invalid_doc_error_default(doc3); + } } - return parts; } -function printTrailingComment(path9, options8, previousComment) { - var _a; - const comment = path9.node; - const printed = printComment(path9, options8); - const { printer, originalText, locStart } = options8; - const isBlock = (_a = printer.isBlockComment) == null ? void 0 : _a.call(printer, comment); - if ((previousComment == null ? void 0 : previousComment.hasLineSuffix) && !(previousComment == null ? void 0 : previousComment.isBlock) || has_newline_default(originalText, locStart(comment), { backwards: true })) { - const isLineBeforeEmpty = is_previous_line_empty_default( - originalText, - locStart(comment) +function breakParentGroup(groupStack) { + if (groupStack.length > 0) { + const parentGroup = at_default( + /* isOptionalObject*/ + false, + groupStack, + -1 ); - return { - doc: lineSuffix([hardline, isLineBeforeEmpty ? hardline : "", printed]), - isBlock, - hasLineSuffix: true - }; - } - if (!isBlock || (previousComment == null ? void 0 : previousComment.hasLineSuffix)) { - return { - doc: [lineSuffix([" ", printed]), breakParent], - isBlock, - hasLineSuffix: true - }; + if (!parentGroup.expandedStates && !parentGroup.break) { + parentGroup.break = "propagated"; + } } - return { doc: [" ", printed], isBlock, hasLineSuffix: false }; + return null; } -function printCommentsSeparately(path9, options8) { - const value = path9.node; - if (!value) { - return {}; - } - const ignored = options8[Symbol.for("printedComments")]; - const comments = (value.comments || []).filter( - (comment) => !ignored.has(comment) - ); - if (comments.length === 0) { - return { leading: "", trailing: "" }; - } - const leadingParts = []; - const trailingParts = []; - let printedTrailingComment; - path9.each(() => { - const comment = path9.node; - if (ignored == null ? void 0 : ignored.has(comment)) { - return; +function propagateBreaks(doc2) { + const alreadyVisitedSet = /* @__PURE__ */ new Set(); + const groupStack = []; + function propagateBreaksOnEnterFn(doc3) { + if (doc3.type === DOC_TYPE_BREAK_PARENT) { + breakParentGroup(groupStack); } - const { leading, trailing } = comment; - if (leading) { - leadingParts.push(printLeadingComment(path9, options8)); - } else if (trailing) { - printedTrailingComment = printTrailingComment( - path9, - options8, - printedTrailingComment - ); - trailingParts.push(printedTrailingComment.doc); + if (doc3.type === DOC_TYPE_GROUP) { + groupStack.push(doc3); + if (alreadyVisitedSet.has(doc3)) { + return false; + } + alreadyVisitedSet.add(doc3); } - }, "comments"); - return { leading: leadingParts, trailing: trailingParts }; -} -function printComments(path9, doc2, options8) { - const { leading, trailing } = printCommentsSeparately(path9, options8); - if (!leading && !trailing) { - return doc2; } - return inheritLabel(doc2, (doc3) => [leading, doc3, trailing]); -} -function ensureAllCommentsPrinted(options8) { - const { - [Symbol.for("comments")]: comments, - [Symbol.for("printedComments")]: printedComments - } = options8; - for (const comment of comments) { - if (!comment.printed && !printedComments.has(comment)) { - throw new Error( - 'Comment "' + comment.value.trim() + '" was not printed. Please report this error!' - ); + function propagateBreaksOnExitFn(doc3) { + if (doc3.type === DOC_TYPE_GROUP) { + const group = groupStack.pop(); + if (group.break) { + breakParentGroup(groupStack); + } } - delete comment.printed; } + traverse_doc_default( + doc2, + propagateBreaksOnEnterFn, + propagateBreaksOnExitFn, + /* shouldTraverseConditionalGroups */ + true + ); } - -// src/main/multiparser.js -async function printEmbeddedLanguages(path9, genericPrint, options8, printAstToDoc2, embeds) { - const { - embeddedLanguageFormatting, - printer: { - embed, - hasPrettierIgnore = () => false, - getVisitorKeys: printerGetVisitorKeys - } - } = options8; - if (!embed || embeddedLanguageFormatting !== "auto") { - return; +function stripTrailingHardlineFromParts(parts) { + parts = [...parts]; + while (parts.length >= 2 && at_default( + /* isOptionalObject*/ + false, + parts, + -2 + ).type === DOC_TYPE_LINE && at_default( + /* isOptionalObject*/ + false, + parts, + -1 + ).type === DOC_TYPE_BREAK_PARENT) { + parts.length -= 2; } - if (embed.length > 2) { - throw new Error( - "printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed" - ); + if (parts.length > 0) { + const lastPart = stripTrailingHardlineFromDoc(at_default( + /* isOptionalObject*/ + false, + parts, + -1 + )); + parts[parts.length - 1] = lastPart; } - const getVisitorKeys = create_get_visitor_keys_function_default( - embed.getVisitorKeys ?? printerGetVisitorKeys - ); - const embedCallResults = []; - recurse(); - const originalPathStack = path9.stack; - for (const { print, node, pathStack } of embedCallResults) { - try { - path9.stack = pathStack; - const doc2 = await print(textToDocForEmbed, genericPrint, path9, options8); - if (doc2) { - embeds.set(node, doc2); - } - } catch (error) { - if (process.env.PRETTIER_DEBUG) { - throw error; - } + return parts; +} +function stripTrailingHardlineFromDoc(doc2) { + switch (get_doc_type_default(doc2)) { + case DOC_TYPE_ALIGN: + case DOC_TYPE_INDENT: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_GROUP: + case DOC_TYPE_LINE_SUFFIX: + case DOC_TYPE_LABEL: { + const contents = stripTrailingHardlineFromDoc(doc2.contents); + return { + ...doc2, + contents + }; } + case DOC_TYPE_IF_BREAK: + return { + ...doc2, + breakContents: stripTrailingHardlineFromDoc(doc2.breakContents), + flatContents: stripTrailingHardlineFromDoc(doc2.flatContents) + }; + case DOC_TYPE_FILL: + return { + ...doc2, + parts: stripTrailingHardlineFromParts(doc2.parts) + }; + case DOC_TYPE_ARRAY: + return stripTrailingHardlineFromParts(doc2); + case DOC_TYPE_STRING: + return doc2.replace(/[\n\r]*$/, ""); + case DOC_TYPE_CURSOR: + case DOC_TYPE_TRIM: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + case DOC_TYPE_LINE: + case DOC_TYPE_BREAK_PARENT: + break; + default: + throw new invalid_doc_error_default(doc2); } - path9.stack = originalPathStack; - function textToDocForEmbed(text, partialNextOptions) { - return textToDoc(text, partialNextOptions, options8, printAstToDoc2); - } - function recurse() { - const { node } = path9; - if (node === null || typeof node !== "object" || hasPrettierIgnore(path9)) { - return; - } - for (const key of getVisitorKeys(node)) { - if (Array.isArray(node[key])) { - path9.each(recurse, key); - } else { - path9.call(recurse, key); + return doc2; +} +function stripTrailingHardline(doc2) { + return stripTrailingHardlineFromDoc(cleanDoc(doc2)); +} +function cleanDocFn(doc2) { + switch (get_doc_type_default(doc2)) { + case DOC_TYPE_FILL: + if (doc2.parts.every((part) => part === "")) { + return ""; } + break; + case DOC_TYPE_GROUP: + if (!doc2.contents && !doc2.id && !doc2.break && !doc2.expandedStates) { + return ""; + } + if (doc2.contents.type === DOC_TYPE_GROUP && doc2.contents.id === doc2.id && doc2.contents.break === doc2.break && doc2.contents.expandedStates === doc2.expandedStates) { + return doc2.contents; + } + break; + case DOC_TYPE_ALIGN: + case DOC_TYPE_INDENT: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_LINE_SUFFIX: + if (!doc2.contents) { + return ""; + } + break; + case DOC_TYPE_IF_BREAK: + if (!doc2.flatContents && !doc2.breakContents) { + return ""; + } + break; + case DOC_TYPE_ARRAY: { + const parts = []; + for (const part of doc2) { + if (!part) { + continue; + } + const [currentPart, ...restParts] = Array.isArray(part) ? part : [part]; + if (typeof currentPart === "string" && typeof at_default( + /* isOptionalObject*/ + false, + parts, + -1 + ) === "string") { + parts[parts.length - 1] += currentPart; + } else { + parts.push(currentPart); + } + parts.push(...restParts); + } + if (parts.length === 0) { + return ""; + } + if (parts.length === 1) { + return parts[0]; + } + return parts; } - const result = embed(path9, options8); - if (!result) { - return; - } - if (typeof result === "function") { - embedCallResults.push({ - print: result, - node, - pathStack: [...path9.stack] - }); - return; - } - if (false) { - throw new Error( - "`embed` should return an async function instead of Promise." - ); - } - embeds.set(node, result); + case DOC_TYPE_STRING: + case DOC_TYPE_CURSOR: + case DOC_TYPE_TRIM: + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + case DOC_TYPE_LINE: + case DOC_TYPE_LABEL: + case DOC_TYPE_BREAK_PARENT: + break; + default: + throw new invalid_doc_error_default(doc2); } + return doc2; } -async function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc2) { - const options8 = await normalize_format_options_default( - { - ...parentOptions, - ...partialNextOptions, - parentParser: parentOptions.parser, - originalText: text - }, - { passThrough: true } - ); - const { ast } = await parse_default(text, options8); - const doc2 = await printAstToDoc2(ast, options8); - return stripTrailingHardline(doc2); +function cleanDoc(doc2) { + return mapDoc(doc2, (currentDoc) => cleanDocFn(currentDoc)); +} +function inheritLabel(doc2, fn) { + return doc2.type === DOC_TYPE_LABEL ? { + ...doc2, + contents: fn(doc2.contents) + } : fn(doc2); } -// src/main/create-print-pre-check-function.js -function createPrintPreCheckFunction(options8) { - if (true) { - return () => { - }; - } - const getVisitorKeys = create_get_visitor_keys_function_default( - options8.printer.getVisitorKeys - ); - return function(path9) { - if (path9.isRoot) { - return; - } - const { key, parent } = path9; - const visitorKeys = getVisitorKeys(parent); - if (visitorKeys.includes(key)) { - return; - } - throw Object.assign(new Error("Calling `print()` on non-node object."), { - parentNode: parent, - allowedProperties: visitorKeys, - printingProperty: key, - printingValue: path9.node, - pathStack: path9.stack.length > 5 ? ["...", ...path9.stack.slice(-5)] : [...path9.stack] - }); +// src/document/printer.js +var MODE_BREAK = Symbol("MODE_BREAK"); +var MODE_FLAT = Symbol("MODE_FLAT"); +var CURSOR_PLACEHOLDER = Symbol("cursor"); +function rootIndent() { + return { + value: "", + length: 0, + queue: [] }; } -var create_print_pre_check_function_default = createPrintPreCheckFunction; - -// src/main/print-ignored.js -function printIgnored(path9, options8) { - const { - originalText, - [Symbol.for("comments")]: comments, - locStart, - locEnd, - [Symbol.for("printedComments")]: printedComments - } = options8; - const { node } = path9; - const start = locStart(node); - const end = locEnd(node); - for (const comment of comments) { - if (locStart(comment) >= start && locEnd(comment) <= end) { - printedComments.add(comment); - } - } - return originalText.slice(start, end); +function makeIndent(ind, options8) { + return generateInd(ind, { + type: "indent" + }, options8); } -var print_ignored_default = printIgnored; - -// src/main/ast-to-doc.js -async function printAstToDoc(ast, options8) { - ({ ast } = await prepareToPrint(ast, options8)); - const cache2 = /* @__PURE__ */ new Map(); - const path9 = new ast_path_default(ast); - const ensurePrintingNode = create_print_pre_check_function_default(options8); - const embeds = /* @__PURE__ */ new Map(); - await printEmbeddedLanguages(path9, mainPrint, options8, printAstToDoc, embeds); - const doc2 = await callPluginPrintFunction( - path9, - options8, - mainPrint, - void 0, - embeds - ); - ensureAllCommentsPrinted(options8); - return doc2; - function mainPrint(selector, args) { - if (selector === void 0 || selector === path9) { - return mainPrintInternal(args); - } - if (Array.isArray(selector)) { - return path9.call(() => mainPrintInternal(args), ...selector); - } - return path9.call(() => mainPrintInternal(args), selector); - } - function mainPrintInternal(args) { - ensurePrintingNode(path9); - const value = path9.node; - if (value === void 0 || value === null) { - return ""; - } - const shouldCache = value && typeof value === "object" && args === void 0; - if (shouldCache && cache2.has(value)) { - return cache2.get(value); - } - const doc3 = callPluginPrintFunction(path9, options8, mainPrint, args, embeds); - if (shouldCache) { - cache2.set(value, doc3); - } - return doc3; +function makeAlign(indent2, widthOrDoc, options8) { + if (widthOrDoc === Number.NEGATIVE_INFINITY) { + return indent2.root || rootIndent(); } -} -function callPluginPrintFunction(path9, options8, printPath, args, embeds) { - var _a; - const { node } = path9; - const { printer } = options8; - let doc2; - if ((_a = printer.hasPrettierIgnore) == null ? void 0 : _a.call(printer, path9)) { - doc2 = print_ignored_default(path9, options8); - } else if (embeds.has(node)) { - doc2 = embeds.get(node); - } else { - doc2 = printer.print(path9, options8, printPath, args); + if (widthOrDoc < 0) { + return generateInd(indent2, { + type: "dedent" + }, options8); } - if (node === options8.cursorNode) { - doc2 = inheritLabel(doc2, (doc3) => [cursor, doc3, cursor]); + if (!widthOrDoc) { + return indent2; } - if (printer.printComment && (!printer.willPrintOwnComments || !printer.willPrintOwnComments(path9, options8))) { - doc2 = printComments(path9, doc2, options8); + if (widthOrDoc.type === "root") { + return { + ...indent2, + root: indent2 + }; } - return doc2; -} -async function prepareToPrint(ast, options8) { - const comments = ast.comments ?? []; - options8[Symbol.for("comments")] = comments; - options8[Symbol.for("tokens")] = ast.tokens ?? []; - options8[Symbol.for("printedComments")] = /* @__PURE__ */ new Set(); - attachComments(ast, options8); - const { - printer: { preprocess } - } = options8; - ast = preprocess ? await preprocess(ast, options8) : ast; - return { ast, comments }; -} - -// src/main/range-util.js -import assert3 from "assert"; -var isJsonParser = ({ parser }) => parser === "json" || parser === "json5" || parser === "json-stringify"; -function findCommonAncestor(startNodeAndParents, endNodeAndParents) { - const startNodeAndAncestors = [ - startNodeAndParents.node, - ...startNodeAndParents.parentNodes - ]; - const endNodeAndAncestors = /* @__PURE__ */ new Set([ - endNodeAndParents.node, - ...endNodeAndParents.parentNodes - ]); - return startNodeAndAncestors.find( - (node) => jsonSourceElements.has(node.type) && endNodeAndAncestors.has(node) - ); + const alignType = typeof widthOrDoc === "string" ? "stringAlign" : "numberAlign"; + return generateInd(indent2, { + type: alignType, + n: widthOrDoc + }, options8); } -function dropRootParents(parents) { - let lastParentIndex = parents.length - 1; - for (; ; ) { - const parent = parents[lastParentIndex]; - if ((parent == null ? void 0 : parent.type) === "Program" || (parent == null ? void 0 : parent.type) === "File") { - lastParentIndex--; - } else { - break; +function generateInd(ind, newPart, options8) { + const queue = newPart.type === "dedent" ? ind.queue.slice(0, -1) : [...ind.queue, newPart]; + let value = ""; + let length = 0; + let lastTabs = 0; + let lastSpaces = 0; + for (const part of queue) { + switch (part.type) { + case "indent": + flush(); + if (options8.useTabs) { + addTabs(1); + } else { + addSpaces(options8.tabWidth); + } + break; + case "stringAlign": + flush(); + value += part.n; + length += part.n.length; + break; + case "numberAlign": + lastTabs += 1; + lastSpaces += part.n; + break; + default: + throw new Error(`Unexpected type '${part.type}'`); } } - return parents.slice(0, lastParentIndex + 1); -} -function findSiblingAncestors(startNodeAndParents, endNodeAndParents, { locStart, locEnd }) { - let resultStartNode = startNodeAndParents.node; - let resultEndNode = endNodeAndParents.node; - if (resultStartNode === resultEndNode) { - return { - startNode: resultStartNode, - endNode: resultEndNode - }; + flushSpaces(); + return { + ...ind, + value, + length, + queue + }; + function addTabs(count) { + value += " ".repeat(count); + length += options8.tabWidth * count; } - const startNodeStart = locStart(startNodeAndParents.node); - for (const endParent of dropRootParents(endNodeAndParents.parentNodes)) { - if (locStart(endParent) >= startNodeStart) { - resultEndNode = endParent; - } else { - break; - } + function addSpaces(count) { + value += " ".repeat(count); + length += count; } - const endNodeEnd = locEnd(endNodeAndParents.node); - for (const startParent of dropRootParents(startNodeAndParents.parentNodes)) { - if (locEnd(startParent) <= endNodeEnd) { - resultStartNode = startParent; + function flush() { + if (options8.useTabs) { + flushTabs(); } else { - break; - } - if (resultStartNode === resultEndNode) { - break; + flushSpaces(); } } - return { - startNode: resultStartNode, - endNode: resultEndNode - }; -} -function findNodeAtOffset(node, offset, options8, predicate, parentNodes = [], type) { - const { locStart, locEnd } = options8; - const start = locStart(node); - const end = locEnd(node); - if (offset > end || offset < start || type === "rangeEnd" && offset === start || type === "rangeStart" && offset === end) { - return; + function flushTabs() { + if (lastTabs > 0) { + addTabs(lastTabs); + } + resetLast(); } - for (const childNode of getSortedChildNodes(node, options8)) { - const childResult = findNodeAtOffset( - childNode, - offset, - options8, - predicate, - [node, ...parentNodes], - type - ); - if (childResult) { - return childResult; + function flushSpaces() { + if (lastSpaces > 0) { + addSpaces(lastSpaces); } + resetLast(); } - if (!predicate || predicate(node, parentNodes[0])) { - return { - node, - parentNodes - }; + function resetLast() { + lastTabs = 0; + lastSpaces = 0; } } -function isJsSourceElement(type, parentType) { - return parentType !== "DeclareExportDeclaration" && type !== "TypeParameterDeclaration" && (type === "Directive" || type === "TypeAlias" || type === "TSExportAssignment" || type.startsWith("Declare") || type.startsWith("TSDeclare") || type.endsWith("Statement") || type.endsWith("Declaration")); +function trim(out) { + let trimCount = 0; + let cursorCount = 0; + let outIndex = out.length; + outer: + while (outIndex--) { + const last = out[outIndex]; + if (last === CURSOR_PLACEHOLDER) { + cursorCount++; + continue; + } + if (false) { + throw new Error(`Unexpected value in trim: '${typeof last}'`); + } + for (let charIndex = last.length - 1; charIndex >= 0; charIndex--) { + const char = last[charIndex]; + if (char === " " || char === " ") { + trimCount++; + } else { + out[outIndex] = last.slice(0, charIndex + 1); + break outer; + } + } + } + if (trimCount > 0 || cursorCount > 0) { + out.length = outIndex + 1; + while (cursorCount-- > 0) { + out.push(CURSOR_PLACEHOLDER); + } + } + return trimCount; } -var jsonSourceElements = /* @__PURE__ */ new Set([ - "JsonRoot", - "ObjectExpression", - "ArrayExpression", - "StringLiteral", - "NumericLiteral", - "BooleanLiteral", - "NullLiteral", - "UnaryExpression", - "TemplateLiteral" -]); -var graphqlSourceElements = /* @__PURE__ */ new Set([ - "OperationDefinition", - "FragmentDefinition", - "VariableDefinition", - "TypeExtensionDefinition", - "ObjectTypeDefinition", - "FieldDefinition", - "DirectiveDefinition", - "EnumTypeDefinition", - "EnumValueDefinition", - "InputValueDefinition", - "InputObjectTypeDefinition", - "SchemaDefinition", - "OperationTypeDefinition", - "InterfaceTypeDefinition", - "UnionTypeDefinition", - "ScalarTypeDefinition" -]); -function isSourceElement(opts, node, parentNode) { - if (!node) { - return false; +function fits(next, restCommands, width, hasLineSuffix, groupModeMap, mustBeFlat) { + if (width === Number.POSITIVE_INFINITY) { + return true; } - switch (opts.parser) { - case "flow": - case "babel": - case "babel-flow": - case "babel-ts": - case "typescript": - case "acorn": - case "espree": - case "meriyah": - case "__babel_estree": - return isJsSourceElement(node.type, parentNode == null ? void 0 : parentNode.type); - case "json": - case "json5": - case "json-stringify": - return jsonSourceElements.has(node.type); - case "graphql": - return graphqlSourceElements.has(node.kind); - case "vue": - return node.tag !== "root"; + let restIdx = restCommands.length; + const cmds = [next]; + const out = []; + while (width >= 0) { + if (cmds.length === 0) { + if (restIdx === 0) { + return true; + } + cmds.push(restCommands[--restIdx]); + continue; + } + const { + mode, + doc: doc2 + } = cmds.pop(); + switch (get_doc_type_default(doc2)) { + case DOC_TYPE_STRING: + out.push(doc2); + width -= get_string_width_default(doc2); + break; + case DOC_TYPE_ARRAY: + case DOC_TYPE_FILL: { + const parts = getDocParts(doc2); + for (let i = parts.length - 1; i >= 0; i--) { + cmds.push({ + mode, + doc: parts[i] + }); + } + break; + } + case DOC_TYPE_INDENT: + case DOC_TYPE_ALIGN: + case DOC_TYPE_INDENT_IF_BREAK: + case DOC_TYPE_LABEL: + cmds.push({ + mode, + doc: doc2.contents + }); + break; + case DOC_TYPE_TRIM: + width += trim(out); + break; + case DOC_TYPE_GROUP: { + if (mustBeFlat && doc2.break) { + return false; + } + const groupMode = doc2.break ? MODE_BREAK : mode; + const contents = doc2.expandedStates && groupMode === MODE_BREAK ? at_default( + /* isOptionalObject*/ + false, + doc2.expandedStates, + -1 + ) : doc2.contents; + cmds.push({ + mode: groupMode, + doc: contents + }); + break; + } + case DOC_TYPE_IF_BREAK: { + const groupMode = doc2.groupId ? groupModeMap[doc2.groupId] || MODE_FLAT : mode; + const contents = groupMode === MODE_BREAK ? doc2.breakContents : doc2.flatContents; + if (contents) { + cmds.push({ + mode, + doc: contents + }); + } + break; + } + case DOC_TYPE_LINE: + if (mode === MODE_BREAK || doc2.hard) { + return true; + } + if (!doc2.soft) { + out.push(" "); + width--; + } + break; + case DOC_TYPE_LINE_SUFFIX: + hasLineSuffix = true; + break; + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + if (hasLineSuffix) { + return false; + } + break; + } } return false; } -function calculateRange(text, opts, ast) { - let { rangeStart: start, rangeEnd: end, locStart, locEnd } = opts; - assert3.ok(end > start); - const firstNonWhitespaceCharacterIndex = text.slice(start, end).search(/\S/); - const isAllWhitespace = firstNonWhitespaceCharacterIndex === -1; - if (!isAllWhitespace) { - start += firstNonWhitespaceCharacterIndex; - for (; end > start; --end) { - if (/\S/.test(text[end - 1])) { +function printDocToString(doc2, options8) { + const groupModeMap = {}; + const width = options8.printWidth; + const newLine = convertEndOfLineToChars(options8.endOfLine); + let pos2 = 0; + const cmds = [{ + ind: rootIndent(), + mode: MODE_BREAK, + doc: doc2 + }]; + const out = []; + let shouldRemeasure = false; + const lineSuffix2 = []; + let printedCursorCount = 0; + propagateBreaks(doc2); + while (cmds.length > 0) { + const { + ind, + mode, + doc: doc3 + } = cmds.pop(); + switch (get_doc_type_default(doc3)) { + case DOC_TYPE_STRING: { + const formatted = newLine !== "\n" ? string_replace_all_default( + /* isOptionalObject*/ + false, + doc3, + "\n", + newLine + ) : doc3; + out.push(formatted); + if (cmds.length > 0) { + pos2 += get_string_width_default(formatted); + } + break; + } + case DOC_TYPE_ARRAY: + for (let i = doc3.length - 1; i >= 0; i--) { + cmds.push({ + ind, + mode, + doc: doc3[i] + }); + } + break; + case DOC_TYPE_CURSOR: + if (printedCursorCount >= 2) { + throw new Error("There are too many 'cursor' in doc."); + } + out.push(CURSOR_PLACEHOLDER); + printedCursorCount++; + break; + case DOC_TYPE_INDENT: + cmds.push({ + ind: makeIndent(ind, options8), + mode, + doc: doc3.contents + }); + break; + case DOC_TYPE_ALIGN: + cmds.push({ + ind: makeAlign(ind, doc3.n, options8), + mode, + doc: doc3.contents + }); + break; + case DOC_TYPE_TRIM: + pos2 -= trim(out); + break; + case DOC_TYPE_GROUP: + switch (mode) { + case MODE_FLAT: + if (!shouldRemeasure) { + cmds.push({ + ind, + mode: doc3.break ? MODE_BREAK : MODE_FLAT, + doc: doc3.contents + }); + break; + } + case MODE_BREAK: { + shouldRemeasure = false; + const next = { + ind, + mode: MODE_FLAT, + doc: doc3.contents + }; + const rem = width - pos2; + const hasLineSuffix = lineSuffix2.length > 0; + if (!doc3.break && fits(next, cmds, rem, hasLineSuffix, groupModeMap)) { + cmds.push(next); + } else { + if (doc3.expandedStates) { + const mostExpanded = at_default( + /* isOptionalObject*/ + false, + doc3.expandedStates, + -1 + ); + if (doc3.break) { + cmds.push({ + ind, + mode: MODE_BREAK, + doc: mostExpanded + }); + break; + } else { + for (let i = 1; i < doc3.expandedStates.length + 1; i++) { + if (i >= doc3.expandedStates.length) { + cmds.push({ + ind, + mode: MODE_BREAK, + doc: mostExpanded + }); + break; + } else { + const state = doc3.expandedStates[i]; + const cmd = { + ind, + mode: MODE_FLAT, + doc: state + }; + if (fits(cmd, cmds, rem, hasLineSuffix, groupModeMap)) { + cmds.push(cmd); + break; + } + } + } + } + } else { + cmds.push({ + ind, + mode: MODE_BREAK, + doc: doc3.contents + }); + } + } + break; + } + } + if (doc3.id) { + groupModeMap[doc3.id] = at_default( + /* isOptionalObject*/ + false, + cmds, + -1 + ).mode; + } + break; + case DOC_TYPE_FILL: { + const rem = width - pos2; + const { + parts + } = doc3; + if (parts.length === 0) { + break; + } + const [content, whitespace] = parts; + const contentFlatCmd = { + ind, + mode: MODE_FLAT, + doc: content + }; + const contentBreakCmd = { + ind, + mode: MODE_BREAK, + doc: content + }; + const contentFits = fits(contentFlatCmd, [], rem, lineSuffix2.length > 0, groupModeMap, true); + if (parts.length === 1) { + if (contentFits) { + cmds.push(contentFlatCmd); + } else { + cmds.push(contentBreakCmd); + } + break; + } + const whitespaceFlatCmd = { + ind, + mode: MODE_FLAT, + doc: whitespace + }; + const whitespaceBreakCmd = { + ind, + mode: MODE_BREAK, + doc: whitespace + }; + if (parts.length === 2) { + if (contentFits) { + cmds.push(whitespaceFlatCmd, contentFlatCmd); + } else { + cmds.push(whitespaceBreakCmd, contentBreakCmd); + } + break; + } + parts.splice(0, 2); + const remainingCmd = { + ind, + mode, + doc: fill(parts) + }; + const secondContent = parts[0]; + const firstAndSecondContentFlatCmd = { + ind, + mode: MODE_FLAT, + doc: [content, whitespace, secondContent] + }; + const firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], rem, lineSuffix2.length > 0, groupModeMap, true); + if (firstAndSecondContentFits) { + cmds.push(remainingCmd, whitespaceFlatCmd, contentFlatCmd); + } else if (contentFits) { + cmds.push(remainingCmd, whitespaceBreakCmd, contentFlatCmd); + } else { + cmds.push(remainingCmd, whitespaceBreakCmd, contentBreakCmd); + } + break; + } + case DOC_TYPE_IF_BREAK: + case DOC_TYPE_INDENT_IF_BREAK: { + const groupMode = doc3.groupId ? groupModeMap[doc3.groupId] : mode; + if (groupMode === MODE_BREAK) { + const breakContents = doc3.type === DOC_TYPE_IF_BREAK ? doc3.breakContents : doc3.negate ? doc3.contents : indent(doc3.contents); + if (breakContents) { + cmds.push({ + ind, + mode, + doc: breakContents + }); + } + } + if (groupMode === MODE_FLAT) { + const flatContents = doc3.type === DOC_TYPE_IF_BREAK ? doc3.flatContents : doc3.negate ? indent(doc3.contents) : doc3.contents; + if (flatContents) { + cmds.push({ + ind, + mode, + doc: flatContents + }); + } + } + break; + } + case DOC_TYPE_LINE_SUFFIX: + lineSuffix2.push({ + ind, + mode, + doc: doc3.contents + }); + break; + case DOC_TYPE_LINE_SUFFIX_BOUNDARY: + if (lineSuffix2.length > 0) { + cmds.push({ + ind, + mode, + doc: hardlineWithoutBreakParent + }); + } + break; + case DOC_TYPE_LINE: + switch (mode) { + case MODE_FLAT: + if (!doc3.hard) { + if (!doc3.soft) { + out.push(" "); + pos2 += 1; + } + break; + } else { + shouldRemeasure = true; + } + case MODE_BREAK: + if (lineSuffix2.length > 0) { + cmds.push({ + ind, + mode, + doc: doc3 + }, ...lineSuffix2.reverse()); + lineSuffix2.length = 0; + break; + } + if (doc3.literal) { + if (ind.root) { + out.push(newLine, ind.root.value); + pos2 = ind.root.length; + } else { + out.push(newLine); + pos2 = 0; + } + } else { + pos2 -= trim(out); + out.push(newLine + ind.value); + pos2 = ind.length; + } + break; + } + break; + case DOC_TYPE_LABEL: + cmds.push({ + ind, + mode, + doc: doc3.contents + }); break; - } + case DOC_TYPE_BREAK_PARENT: + break; + default: + throw new invalid_doc_error_default(doc3); + } + if (cmds.length === 0 && lineSuffix2.length > 0) { + cmds.push(...lineSuffix2.reverse()); + lineSuffix2.length = 0; } } - const startNodeAndParents = findNodeAtOffset( - ast, - start, - opts, - (node, parentNode) => isSourceElement(opts, node, parentNode), - [], - "rangeStart" - ); - const endNodeAndParents = ( - // No need find Node at `end`, it will be the same as `startNodeAndParents` - isAllWhitespace ? startNodeAndParents : findNodeAtOffset( - ast, - end, - opts, - (node) => isSourceElement(opts, node), - [], - "rangeEnd" - ) - ); - if (!startNodeAndParents || !endNodeAndParents) { + const cursorPlaceholderIndex = out.indexOf(CURSOR_PLACEHOLDER); + if (cursorPlaceholderIndex !== -1) { + const otherCursorPlaceholderIndex = out.indexOf(CURSOR_PLACEHOLDER, cursorPlaceholderIndex + 1); + const beforeCursor = out.slice(0, cursorPlaceholderIndex).join(""); + const aroundCursor = out.slice(cursorPlaceholderIndex + 1, otherCursorPlaceholderIndex).join(""); + const afterCursor = out.slice(otherCursorPlaceholderIndex + 1).join(""); return { - rangeStart: 0, - rangeEnd: 0 + formatted: beforeCursor + aroundCursor + afterCursor, + cursorNodeStart: beforeCursor.length, + cursorNodeText: aroundCursor }; } - let startNode; - let endNode; - if (isJsonParser(opts)) { - const commonAncestor = findCommonAncestor( - startNodeAndParents, - endNodeAndParents - ); - startNode = commonAncestor; - endNode = commonAncestor; - } else { - ({ startNode, endNode } = findSiblingAncestors( - startNodeAndParents, - endNodeAndParents, - opts - )); - } return { - rangeStart: Math.min(locStart(startNode), locStart(endNode)), - rangeEnd: Math.max(locEnd(startNode), locEnd(endNode)) + formatted: out.join("") }; } -// src/main/get-cursor-node.js -function getCursorNode(ast, options8) { - const { cursorOffset, locStart, locEnd } = options8; - const getVisitorKeys = create_get_visitor_keys_function_default( - options8.printer.getVisitorKeys - ); - const nodeContainsCursor = (node) => locStart(node) <= cursorOffset && locEnd(node) >= cursorOffset; - let cursorNode = ast; - for (const node of getDescendants(ast, { - getVisitorKeys, - filter: nodeContainsCursor - })) { - cursorNode = node; +// src/utils/get-alignment-size.js +function getAlignmentSize(text, tabWidth, startIndex = 0) { + let size = 0; + for (let i = startIndex; i < text.length; ++i) { + if (text[i] === " ") { + size = size + tabWidth - size % tabWidth; + } else { + size++; + } } - return cursorNode; + return size; } -var get_cursor_node_default = getCursorNode; +var get_alignment_size_default = getAlignmentSize; -// src/main/core.js -var BOM = "\uFEFF"; -var CURSOR = Symbol("cursor"); -async function coreFormat(originalText, opts, addAlignmentSize = 0) { - if (!originalText || originalText.trim().length === 0) { - return { - formatted: "", - cursorOffset: -1, - comments: [] - }; +// src/common/ast-path.js +var _getNodeStackIndex, getNodeStackIndex_fn, _getAncestors, getAncestors_fn; +var AstPath = class { + constructor(value) { + __privateAdd(this, _getNodeStackIndex); + __privateAdd(this, _getAncestors); + this.stack = [value]; } - const { - ast, - text - } = await parse_default(originalText, opts); - if (opts.cursorOffset >= 0) { - opts.cursorNode = get_cursor_node_default(ast, opts); + /** @type {string | null} */ + get key() { + const { + stack: stack2, + siblings + } = this; + return at_default( + /* isOptionalObject*/ + false, + stack2, + siblings === null ? -2 : -4 + ) ?? null; } - let doc2 = await printAstToDoc(ast, opts, addAlignmentSize); - if (addAlignmentSize > 0) { - doc2 = addAlignmentToDoc([hardline, doc2], addAlignmentSize, opts.tabWidth); + /** @type {number | null} */ + get index() { + return this.siblings === null ? null : at_default( + /* isOptionalObject*/ + false, + this.stack, + -2 + ); } - const result = printDocToString(doc2, opts); - if (addAlignmentSize > 0) { - const trimmed = result.formatted.trim(); - if (result.cursorNodeStart !== void 0) { - result.cursorNodeStart -= result.formatted.indexOf(trimmed); - } - result.formatted = trimmed + convertEndOfLineToChars(opts.endOfLine); + /** @type {object} */ + get node() { + return at_default( + /* isOptionalObject*/ + false, + this.stack, + -1 + ); } - const comments = opts[Symbol.for("comments")]; - if (opts.cursorOffset >= 0) { - let oldCursorNodeStart; - let oldCursorNodeText; - let cursorOffsetRelativeToOldCursorNode; - let newCursorNodeStart; - let newCursorNodeText; - if (opts.cursorNode && result.cursorNodeText) { - oldCursorNodeStart = opts.locStart(opts.cursorNode); - oldCursorNodeText = text.slice(oldCursorNodeStart, opts.locEnd(opts.cursorNode)); - cursorOffsetRelativeToOldCursorNode = opts.cursorOffset - oldCursorNodeStart; - newCursorNodeStart = result.cursorNodeStart; - newCursorNodeText = result.cursorNodeText; - } else { - oldCursorNodeStart = 0; - oldCursorNodeText = text; - cursorOffsetRelativeToOldCursorNode = opts.cursorOffset; - newCursorNodeStart = 0; - newCursorNodeText = result.formatted; - } - if (oldCursorNodeText === newCursorNodeText) { - return { - formatted: result.formatted, - cursorOffset: newCursorNodeStart + cursorOffsetRelativeToOldCursorNode, - comments - }; - } - const oldCursorNodeCharArray = oldCursorNodeText.split(""); - oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorNode, 0, CURSOR); - const newCursorNodeCharArray = newCursorNodeText.split(""); - const cursorNodeDiff = (0, import_diff.diffArrays)(oldCursorNodeCharArray, newCursorNodeCharArray); - let cursorOffset = newCursorNodeStart; - for (const entry of cursorNodeDiff) { - if (entry.removed) { - if (entry.value.includes(CURSOR)) { - break; - } - } else { - cursorOffset += entry.count; - } + /** @type {object | null} */ + get parent() { + return this.getNode(1); + } + /** @type {object | null} */ + get grandparent() { + return this.getNode(2); + } + /** @type {boolean} */ + get isInArray() { + return this.siblings !== null; + } + /** @type {object[] | null} */ + get siblings() { + const { + stack: stack2 + } = this; + const maybeArray = at_default( + /* isOptionalObject*/ + false, + stack2, + -3 + ); + return Array.isArray(maybeArray) ? maybeArray : null; + } + /** @type {object | null} */ + get next() { + const { + siblings + } = this; + return siblings === null ? null : siblings[this.index + 1]; + } + /** @type {object | null} */ + get previous() { + const { + siblings + } = this; + return siblings === null ? null : siblings[this.index - 1]; + } + /** @type {boolean} */ + get isFirst() { + return this.index === 0; + } + /** @type {boolean} */ + get isLast() { + const { + siblings, + index + } = this; + return siblings !== null && index === siblings.length - 1; + } + /** @type {boolean} */ + get isRoot() { + return this.stack.length === 1; + } + /** @type {object} */ + get root() { + return this.stack[0]; + } + /** @type {object[]} */ + get ancestors() { + return [...__privateMethod(this, _getAncestors, getAncestors_fn).call(this)]; + } + // The name of the current property is always the penultimate element of + // this.stack, and always a string/number/symbol. + getName() { + const { + stack: stack2 + } = this; + const { + length + } = stack2; + if (length > 1) { + return at_default( + /* isOptionalObject*/ + false, + stack2, + -2 + ); } - return { - formatted: result.formatted, - cursorOffset, - comments - }; + return null; } - return { - formatted: result.formatted, - cursorOffset: -1, - comments - }; -} -async function formatRange(originalText, opts) { - const { - ast, - text - } = await parse_default(originalText, opts); - const { - rangeStart, - rangeEnd - } = calculateRange(text, opts, ast); - const rangeString = text.slice(rangeStart, rangeEnd); - const rangeStart2 = Math.min(rangeStart, text.lastIndexOf("\n", rangeStart) + 1); - const indentString = text.slice(rangeStart2, rangeStart).match(/^\s*/)[0]; - const alignmentSize = get_alignment_size_default(indentString, opts.tabWidth); - const rangeResult = await coreFormat(rangeString, { - ...opts, - rangeStart: 0, - rangeEnd: Number.POSITIVE_INFINITY, - // Track the cursor offset only if it's within our range - cursorOffset: opts.cursorOffset > rangeStart && opts.cursorOffset <= rangeEnd ? opts.cursorOffset - rangeStart : -1, - // Always use `lf` to format, we'll replace it later - endOfLine: "lf" - }, alignmentSize); - const rangeTrimmed = rangeResult.formatted.trimEnd(); - let { - cursorOffset - } = opts; - if (cursorOffset > rangeEnd) { - cursorOffset += rangeTrimmed.length - rangeString.length; - } else if (rangeResult.cursorOffset >= 0) { - cursorOffset = rangeResult.cursorOffset + rangeStart; + // The value of the current property is always the final element of + // this.stack. + getValue() { + return at_default( + /* isOptionalObject*/ + false, + this.stack, + -1 + ); } - let formatted = text.slice(0, rangeStart) + rangeTrimmed + text.slice(rangeEnd); - if (opts.endOfLine !== "lf") { - const eol = convertEndOfLineToChars(opts.endOfLine); - if (cursorOffset >= 0 && eol === "\r\n") { - cursorOffset += countEndOfLineChars(formatted.slice(0, cursorOffset), "\n"); - } - formatted = string_replace_all_default( + getNode(count = 0) { + const stackIndex = __privateMethod(this, _getNodeStackIndex, getNodeStackIndex_fn).call(this, count); + return stackIndex === -1 ? null : this.stack[stackIndex]; + } + getParentNode(count = 0) { + return this.getNode(count + 1); + } + // Temporarily push properties named by string arguments given after the + // callback function onto this.stack, then call the callback with a + // reference to this (modified) AstPath object. Note that the stack will + // be restored to its original state after the callback is finished, so it + // is probably a mistake to retain a reference to the path. + call(callback, ...names) { + const { + stack: stack2 + } = this; + const { + length + } = stack2; + let value = at_default( /* isOptionalObject*/ false, - formatted, - "\n", - eol + stack2, + -1 ); + for (const name of names) { + value = value[name]; + stack2.push(name, value); + } + try { + return callback(this); + } finally { + stack2.length = length; + } } - return { - formatted, - cursorOffset, - comments: rangeResult.comments - }; -} -function ensureIndexInText(text, index, defaultValue) { - if (typeof index !== "number" || Number.isNaN(index) || index < 0 || index > text.length) { - return defaultValue; + callParent(callback, count = 0) { + const stackIndex = __privateMethod(this, _getNodeStackIndex, getNodeStackIndex_fn).call(this, count + 1); + const parentValues = this.stack.splice(stackIndex + 1); + try { + return callback(this); + } finally { + this.stack.push(...parentValues); + } } - return index; -} -function normalizeIndexes(text, options8) { - let { - cursorOffset, - rangeStart, - rangeEnd - } = options8; - cursorOffset = ensureIndexInText(text, cursorOffset, -1); - rangeStart = ensureIndexInText(text, rangeStart, 0); - rangeEnd = ensureIndexInText(text, rangeEnd, text.length); - return { - ...options8, - cursorOffset, - rangeStart, - rangeEnd - }; -} -function normalizeInputAndOptions(text, options8) { - let { - cursorOffset, - rangeStart, - rangeEnd, - endOfLine - } = normalizeIndexes(text, options8); - const hasBOM = text.charAt(0) === BOM; - if (hasBOM) { - text = text.slice(1); - cursorOffset--; - rangeStart--; - rangeEnd--; + // Similar to AstPath.prototype.call, except that the value obtained by + // accessing this.getValue()[name1][name2]... should be array. The + // callback will be called with a reference to this path object for each + // element of the array. + each(callback, ...names) { + const { + stack: stack2 + } = this; + const { + length + } = stack2; + let value = at_default( + /* isOptionalObject*/ + false, + stack2, + -1 + ); + for (const name of names) { + value = value[name]; + stack2.push(name, value); + } + try { + for (let i = 0; i < value.length; ++i) { + stack2.push(i, value[i]); + callback(this, i, value); + stack2.length -= 2; + } + } finally { + stack2.length = length; + } } - if (endOfLine === "auto") { - endOfLine = guessEndOfLine(text); + // Similar to AstPath.prototype.each, except that the results of the + // callback function invocations are stored in an array and returned at + // the end of the iteration. + map(callback, ...names) { + const result = []; + this.each((path13, index, value) => { + result[index] = callback(path13, index, value); + }, ...names); + return result; } - if (text.includes("\r")) { - const countCrlfBefore = (index) => countEndOfLineChars(text.slice(0, Math.max(index, 0)), "\r\n"); - cursorOffset -= countCrlfBefore(cursorOffset); - rangeStart -= countCrlfBefore(rangeStart); - rangeEnd -= countCrlfBefore(rangeEnd); - text = normalizeEndOfLine(text); + /** + * @param {...( + * | ((node: any, name: string | null, number: number | null) => boolean) + * | undefined + * )} predicates + */ + match(...predicates) { + let stackPointer = this.stack.length - 1; + let name = null; + let node = this.stack[stackPointer--]; + for (const predicate of predicates) { + if (node === void 0) { + return false; + } + let number = null; + if (typeof name === "number") { + number = name; + name = this.stack[stackPointer--]; + node = this.stack[stackPointer--]; + } + if (predicate && !predicate(node, name, number)) { + return false; + } + name = this.stack[stackPointer--]; + node = this.stack[stackPointer--]; + } + return true; } - return { - hasBOM, - text, - options: normalizeIndexes(text, { - ...options8, - cursorOffset, - rangeStart, - rangeEnd, - endOfLine - }) - }; -} -async function hasPragma(text, options8) { - const selectedParser = await resolveParser(options8); - return !selectedParser.hasPragma || selectedParser.hasPragma(text); -} -async function formatWithCursor(originalText, originalOptions) { - let { - hasBOM, - text, - options: options8 - } = normalizeInputAndOptions(originalText, await normalize_format_options_default(originalOptions)); - if (options8.rangeStart >= options8.rangeEnd && text !== "" || options8.requirePragma && !await hasPragma(text, options8)) { - return { - formatted: originalText, - cursorOffset: originalOptions.cursorOffset, - comments: [] - }; + /** + * Traverses the ancestors of the current node heading toward the tree root + * until it finds a node that matches the provided predicate function. Will + * return the first matching ancestor. If no such node exists, returns undefined. + * @param {(node: any) => boolean} predicate + * @internal Unstable API. Don't use in plugins for now. + */ + findAncestor(predicate) { + for (const node of __privateMethod(this, _getAncestors, getAncestors_fn).call(this)) { + if (predicate(node)) { + return node; + } + } } - let result; - if (options8.rangeStart > 0 || options8.rangeEnd < text.length) { - result = await formatRange(text, options8); - } else { - if (!options8.requirePragma && options8.insertPragma && options8.printer.insertPragma && !await hasPragma(text, options8)) { - text = options8.printer.insertPragma(text); + /** + * Traverses the ancestors of the current node heading toward the tree root + * until it finds a node that matches the provided predicate function. + * returns true if matched node found. + * @param {(node: any) => boolean} predicate + * @returns {boolean} + * @internal Unstable API. Don't use in plugins for now. + */ + hasAncestor(predicate) { + for (const node of __privateMethod(this, _getAncestors, getAncestors_fn).call(this)) { + if (predicate(node)) { + return true; + } } - result = await coreFormat(text, options8); + return false; } - if (hasBOM) { - result.formatted = BOM + result.formatted; - if (result.cursorOffset >= 0) { - result.cursorOffset++; +}; +_getNodeStackIndex = new WeakSet(); +getNodeStackIndex_fn = function(count) { + const { + stack: stack2 + } = this; + for (let i = stack2.length - 1; i >= 0; i -= 2) { + if (!Array.isArray(stack2[i]) && --count < 0) { + return i; } } - return result; -} -async function parse2(originalText, originalOptions, devOptions) { + return -1; +}; +_getAncestors = new WeakSet(); +getAncestors_fn = function* () { const { - text, - options: options8 - } = normalizeInputAndOptions(originalText, await normalize_format_options_default(originalOptions)); - const parsed = await parse_default(text, options8); - if (devOptions) { - if (devOptions.preprocessForPrint) { - parsed.ast = await prepareToPrint(parsed.ast, options8); - } - if (devOptions.massage) { - parsed.ast = massage_ast_default(parsed.ast, options8); + stack: stack2 + } = this; + for (let index = stack2.length - 3; index >= 0; index -= 2) { + const value = stack2[index]; + if (!Array.isArray(value)) { + yield value; } } - return parsed; -} -async function formatAst(ast, options8) { - options8 = await normalize_format_options_default(options8); - const doc2 = await printAstToDoc(ast, options8); - return printDocToString(doc2, options8); -} -async function formatDoc(doc2, options8) { - const text = printDocToDebug(doc2); - const { - formatted - } = await formatWithCursor(text, { - ...options8, - parser: "__js_expression" - }); - return formatted; -} -async function printToDoc(originalText, options8) { - options8 = await normalize_format_options_default(options8); - const { - ast - } = await parse_default(originalText, options8); - return printAstToDoc(ast, options8); -} -async function printDocToString2(doc2, options8) { - return printDocToString(doc2, await normalize_format_options_default(options8)); -} +}; +var ast_path_default = AstPath; -// src/config/resolve-config.js -var import_micromatch = __toESM(require_micromatch(), 1); -import path5 from "path"; +// src/main/comments/attach.js +import assert4 from "assert"; -// node_modules/mimic-fn/index.js -var copyProperty = (to, from, property, ignoreNonConfigurable) => { - if (property === "length" || property === "prototype") { - return; - } - if (property === "arguments" || property === "caller") { - return; - } - const toDescriptor = Object.getOwnPropertyDescriptor(to, property); - const fromDescriptor = Object.getOwnPropertyDescriptor(from, property); - if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) { - return; - } - Object.defineProperty(to, property, fromDescriptor); -}; -var canCopyProperty = function(toDescriptor, fromDescriptor) { - return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value); -}; -var changePrototype = (to, from) => { - const fromPrototype = Object.getPrototypeOf(from); - if (fromPrototype === Object.getPrototypeOf(to)) { - return; +// src/utils/is-object.js +function isObject2(object) { + return object !== null && typeof object === "object"; +} +var is_object_default = isObject2; + +// src/utils/ast-utils.js +function* getChildren(node, options8) { + const { getVisitorKeys, filter: filter2 = () => true } = options8; + const isMatchedNode = (node2) => is_object_default(node2) && filter2(node2); + for (const key2 of getVisitorKeys(node)) { + const value = node[key2]; + if (Array.isArray(value)) { + for (const child of value) { + if (isMatchedNode(child)) { + yield child; + } + } + } else if (isMatchedNode(value)) { + yield value; + } } - Object.setPrototypeOf(to, fromPrototype); -}; -var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/ -${fromBody}`; -var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString"); -var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name"); -var changeToString = (to, from, name) => { - const withName = name === "" ? "" : `with ${name.trim()}() `; - const newToString = wrappedToString.bind(null, withName, from.toString()); - Object.defineProperty(newToString, "name", toStringName); - Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString }); -}; -function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) { - const { name } = to; - for (const property of Reflect.ownKeys(from)) { - copyProperty(to, from, property, ignoreNonConfigurable); +} +function* getDescendants(node, options8) { + const queue = [node]; + for (let index = 0; index < queue.length; index++) { + const node2 = queue[index]; + for (const child of getChildren(node2, options8)) { + yield child; + queue.push(child); + } } - changePrototype(to, from); - changeToString(to, from, name); - return to; } -// node_modules/mem/dist/index.js -var import_map_age_cleaner = __toESM(require_dist(), 1); -var cacheStore = /* @__PURE__ */ new WeakMap(); -function mem(fn, { cacheKey, cache: cache2 = /* @__PURE__ */ new Map(), maxAge } = {}) { - if (typeof maxAge === "number") { - (0, import_map_age_cleaner.default)(cache2); - } - const memoized = function(...arguments_) { - const key = cacheKey ? cacheKey(arguments_) : arguments_[0]; - const cacheItem = cache2.get(key); - if (cacheItem) { - return cacheItem.data; +// src/utils/skip.js +function skip(characters) { + return (text, startIndex, options8) => { + const backwards = Boolean(options8 == null ? void 0 : options8.backwards); + if (startIndex === false) { + return false; } - const result = fn.apply(this, arguments_); - cache2.set(key, { - data: result, - maxAge: maxAge ? Date.now() + maxAge : Number.POSITIVE_INFINITY - }); - return result; + const { length } = text; + let cursor2 = startIndex; + while (cursor2 >= 0 && cursor2 < length) { + const character = text.charAt(cursor2); + if (characters instanceof RegExp) { + if (!characters.test(character)) { + return cursor2; + } + } else if (!characters.includes(character)) { + return cursor2; + } + backwards ? cursor2-- : cursor2++; + } + if (cursor2 === -1 || cursor2 === length) { + return cursor2; + } + return false; }; - mimicFunction(memoized, fn, { - ignoreNonConfigurable: true - }); - cacheStore.set(memoized, cache2); - return memoized; } -function memClear(fn) { - const cache2 = cacheStore.get(fn); - if (!cache2) { - throw new TypeError("Can't clear a function that was not memoized!"); +var skipWhitespace = skip(/\s/); +var skipSpaces = skip(" "); +var skipToLineEnd = skip(",; "); +var skipEverythingButNewLine = skip(/[^\n\r]/); + +// src/utils/skip-newline.js +function skipNewline(text, startIndex, options8) { + const backwards = Boolean(options8 == null ? void 0 : options8.backwards); + if (startIndex === false) { + return false; } - if (typeof cache2.clear !== "function") { - throw new TypeError("The cache Map can't be cleared!"); + const character = text.charAt(startIndex); + if (backwards) { + if (text.charAt(startIndex - 1) === "\r" && character === "\n") { + return startIndex - 2; + } + if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") { + return startIndex - 1; + } + } else { + if (character === "\r" && text.charAt(startIndex + 1) === "\n") { + return startIndex + 2; + } + if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") { + return startIndex + 1; + } } - cache2.clear(); + return startIndex; } +var skip_newline_default = skipNewline; -// node_modules/url-or-path/index.js -import { fileURLToPath, pathToFileURL } from "url"; -var isUrlInstance = (urlOrPath) => urlOrPath instanceof URL; -var isUrlString = (urlOrPath) => typeof urlOrPath === "string" && urlOrPath.startsWith("file://"); -var isUrl = (urlOrPath) => isUrlInstance(urlOrPath) || isUrlString(urlOrPath); -var toPath = (urlOrPath) => isUrl(urlOrPath) ? fileURLToPath(urlOrPath) : urlOrPath; - -// src/utils/partition.js -function partition2(array2, predicate) { - const result = [[], []]; - for (const value of array2) { - result[predicate(value) ? 0 : 1].push(value); - } - return result; +// src/utils/has-newline.js +function hasNewline(text, startIndex, options8 = {}) { + const idx = skipSpaces( + text, + options8.backwards ? startIndex - 1 : startIndex, + options8 + ); + const idx2 = skip_newline_default(text, idx, options8); + return idx !== idx2; } -var partition_default = partition2; +var has_newline_default = hasNewline; -// src/config/resolve-editorconfig.js -var import_editorconfig = __toESM(require_src(), 1); -import path2 from "path"; +// src/utils/is-non-empty-array.js +function isNonEmptyArray(object) { + return Array.isArray(object) && object.length > 0; +} +var is_non_empty_array_default = isNonEmptyArray; -// src/config/editorconfig-to-prettier.js -function removeUnset(editorConfig) { - const result = {}; - const keys = Object.keys(editorConfig); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - if (editorConfig[key] === "unset") { - continue; - } - result[key] = editorConfig[key]; - } - return result; +// src/main/create-get-visitor-keys-function.js +var nonTraversableKeys = /* @__PURE__ */ new Set([ + "tokens", + "comments", + "parent", + "enclosingNode", + "precedingNode", + "followingNode" +]); +var defaultGetVisitorKeys = (node) => Object.keys(node).filter((key2) => !nonTraversableKeys.has(key2)); +function createGetVisitorKeysFunction(printerGetVisitorKeys) { + return printerGetVisitorKeys ? (node) => printerGetVisitorKeys(node, nonTraversableKeys) : defaultGetVisitorKeys; } -function editorConfigToPrettier(editorConfig) { - if (!editorConfig) { - return null; - } - editorConfig = removeUnset(editorConfig); - if (Object.keys(editorConfig).length === 0) { - return null; - } - const result = {}; - if (editorConfig.indent_style) { - result.useTabs = editorConfig.indent_style === "tab"; - } - if (editorConfig.indent_size === "tab") { - result.useTabs = true; - } - if (result.useTabs && editorConfig.tab_width) { - result.tabWidth = editorConfig.tab_width; - } else if (editorConfig.indent_style === "space" && editorConfig.indent_size && editorConfig.indent_size !== "tab") { - result.tabWidth = editorConfig.indent_size; - } else if (editorConfig.tab_width !== void 0) { - result.tabWidth = editorConfig.tab_width; - } - if (editorConfig.max_line_length) { - if (editorConfig.max_line_length === "off") { - result.printWidth = Number.POSITIVE_INFINITY; - } else { - result.printWidth = editorConfig.max_line_length; - } - } - if (editorConfig.quote_type === "single") { - result.singleQuote = true; - } else if (editorConfig.quote_type === "double") { - result.singleQuote = false; - } - if (["cr", "crlf", "lf"].includes(editorConfig.end_of_line)) { - result.endOfLine = editorConfig.end_of_line; +var create_get_visitor_keys_function_default = createGetVisitorKeysFunction; + +// src/main/comments/utils.js +function describeNodeForDebugging(node) { + const nodeType = node.type || node.kind || "(unknown type)"; + let nodeName = String( + node.name || node.id && (typeof node.id === "object" ? node.id.name : node.id) || node.key && (typeof node.key === "object" ? node.key.name : node.key) || node.value && (typeof node.value === "object" ? "" : String(node.value)) || node.operator || "" + ); + if (nodeName.length > 20) { + nodeName = nodeName.slice(0, 19) + "\u2026"; } - return result; + return nodeType + (nodeName ? " " + nodeName : ""); } -var editorconfig_to_prettier_default = editorConfigToPrettier; - -// src/config/find-project-root.js -import fs2 from "fs"; -import path from "path"; -var MARKERS = [".git", ".hg"]; -var markerExists = (directory) => MARKERS.some((mark) => fs2.existsSync(path.join(directory, mark))); -function findProjectRoot(directory) { - while (!markerExists(directory)) { - const parentDirectory = path.resolve(directory, ".."); - if (parentDirectory === directory) { - break; - } - directory = parentDirectory; - } - return directory; +function addCommentHelper(node, comment) { + const comments = node.comments ?? (node.comments = []); + comments.push(comment); + comment.printed = false; + comment.nodeDescription = describeNodeForDebugging(node); } -var find_project_root_default = findProjectRoot; - -// src/config/resolve-editorconfig.js -async function loadEditorConfig(filePath) { - const editorConfig = await import_editorconfig.default.parse(filePath, { - root: find_project_root_default(path2.dirname(path2.resolve(filePath))) - }); - const config = editorconfig_to_prettier_default(editorConfig); - return config; +function addLeadingComment(node, comment) { + comment.leading = true; + comment.trailing = false; + addCommentHelper(node, comment); } -var resolve_editorconfig_default = loadEditorConfig; - -// src/config/get-prettier-config-explorer.js -var import_parse_async = __toESM(require_parse_async(), 1); -var import_parse3 = __toESM(require_parse3(), 1); -var import_js_yaml = __toESM(require_loader(), 1); -import { pathToFileURL as pathToFileURL4 } from "url"; - -// node_modules/parse-json/index.js -var import_json_parse_even_better_errors = __toESM(require_lib4(), 1); -var import_code_frame2 = __toESM(require_lib3(), 1); - -// node_modules/index-to-position/index.js -var safeLastIndexOf = (string, searchString, index) => index < 0 ? -1 : string.lastIndexOf(searchString, index); -function getPosition(text, textIndex) { - const lineBreakBefore = safeLastIndexOf(text, "\n", textIndex - 1); - const column = textIndex - lineBreakBefore - 1; - let line2 = 0; - for (let index = lineBreakBefore; index >= 0; index = safeLastIndexOf(text, "\n", index - 1)) { - line2++; +function addDanglingComment(node, comment, marker) { + comment.leading = false; + comment.trailing = false; + if (marker) { + comment.marker = marker; } - return { line: line2, column }; + addCommentHelper(node, comment); } -function indexToLineColumn(text, textIndex, { oneBased = false } = {}) { - if (textIndex < 0 || textIndex >= text.length && text.length > 0) { - throw new RangeError("Index out of bounds"); - } - const position = getPosition(text, textIndex); - return oneBased ? { line: position.line + 1, column: position.column + 1 } : position; +function addTrailingComment(node, comment) { + comment.leading = false; + comment.trailing = true; + addCommentHelper(node, comment); } -// node_modules/parse-json/index.js -var _message; -var _JSONError = class _JSONError extends Error { - constructor(message) { - var _a; - super(); - __publicField(this, "name", "JSONError"); - __publicField(this, "fileName"); - __publicField(this, "codeFrame"); - __publicField(this, "rawCodeFrame"); - __privateAdd(this, _message, void 0); - __privateSet(this, _message, message); - (_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, this, _JSONError); - } - get message() { - const { fileName, codeFrame } = this; - return `${__privateGet(this, _message)}${fileName ? ` in ${fileName}` : ""}${codeFrame ? ` - -${codeFrame} -` : ""}`; - } - set message(message) { - __privateSet(this, _message, message); - } -}; -_message = new WeakMap(); -var JSONError = _JSONError; -var generateCodeFrame = (string, location, highlightCode = true) => (0, import_code_frame2.codeFrameColumns)(string, { start: location }, { highlightCode }); -var getErrorLocation = (string, message) => { - const match = message.match(/in JSON at position (?\d+)(?: \(line (?\d+) column (?\d+)\))? while parsing/); - if (!match) { - return; - } - let { index, line: line2, column } = match.groups; - if (line2 && column) { - return { line: Number(line2), column: Number(column) }; - } - index = Number(index); - if (index === string.length) { - const { line: line3, column: column2 } = indexToLineColumn(string, string.length - 1, { oneBased: true }); - return { line: line3, column: column2 + 1 }; - } - return indexToLineColumn(string, index, { oneBased: true }); -}; -function parseJson(string, reviver, filename) { - if (typeof reviver === "string") { - filename = reviver; - reviver = void 0; - } - let message; - try { - return JSON.parse(string, reviver); - } catch (error) { - message = error.message; +// src/main/comments/attach.js +var childNodesCache = /* @__PURE__ */ new WeakMap(); +function getSortedChildNodes(node, options8) { + if (childNodesCache.has(node)) { + return childNodesCache.get(node); } - try { - (0, import_json_parse_even_better_errors.default)(string, reviver); - } catch (error) { - message = error.message; + const { + printer: { + getCommentChildNodes, + canAttachComment, + getVisitorKeys: printerGetVisitorKeys + }, + locStart, + locEnd + } = options8; + if (!canAttachComment) { + return []; } - message = message.replaceAll("\n", ""); - const jsonError = new JSONError(message); - if (filename) { - jsonError.fileName = filename; + const childNodes = ((getCommentChildNodes == null ? void 0 : getCommentChildNodes(node, options8)) ?? [ + ...getChildren(node, { + getVisitorKeys: create_get_visitor_keys_function_default(printerGetVisitorKeys) + }) + ]).flatMap( + (node2) => canAttachComment(node2) ? [node2] : getSortedChildNodes(node2, options8) + ); + childNodes.sort( + (nodeA, nodeB) => locStart(nodeA) - locStart(nodeB) || locEnd(nodeA) - locEnd(nodeB) + ); + childNodesCache.set(node, childNodes); + return childNodes; +} +function decorateComment(node, comment, options8, enclosingNode) { + const { locStart, locEnd } = options8; + const commentStart = locStart(comment); + const commentEnd = locEnd(comment); + const childNodes = getSortedChildNodes(node, options8); + let precedingNode; + let followingNode; + let left = 0; + let right = childNodes.length; + while (left < right) { + const middle = left + right >> 1; + const child = childNodes[middle]; + const start = locStart(child); + const end = locEnd(child); + if (start <= commentStart && commentEnd <= end) { + return decorateComment(child, comment, options8, child); + } + if (end <= commentStart) { + precedingNode = child; + left = middle + 1; + continue; + } + if (commentEnd <= start) { + followingNode = child; + right = middle; + continue; + } + throw new Error("Comment location overlaps with node location"); } - const location = getErrorLocation(string, message); - if (location) { - jsonError.codeFrame = generateCodeFrame(string, location); - jsonError.rawCodeFrame = generateCodeFrame( - string, - location, - /* highlightCode */ - false + if ((enclosingNode == null ? void 0 : enclosingNode.type) === "TemplateLiteral") { + const { quasis } = enclosingNode; + const commentIndex = findExpressionIndexForComment( + quasis, + comment, + options8 ); + if (precedingNode && findExpressionIndexForComment(quasis, precedingNode, options8) !== commentIndex) { + precedingNode = null; + } + if (followingNode && findExpressionIndexForComment(quasis, followingNode, options8) !== commentIndex) { + followingNode = null; + } } - throw jsonError; -} - -// src/config/get-prettier-config-explorer.js -import mockable from "./internal/internal.mjs"; - -// src/utils/require-from-file.js -import { createRequire } from "module"; -function requireFromFile(id, parent) { - const require2 = createRequire(parent); - return require2(id); -} -var require_from_file_default = requireFromFile; - -// src/utils/import-from-file.js -import { pathToFileURL as pathToFileURL3 } from "url"; - -// node_modules/import-meta-resolve/lib/resolve.js -import assert5 from "assert"; -import { Stats, statSync, realpathSync } from "fs"; -import process3 from "process"; -import { URL as URL3, fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL2 } from "url"; -import path4 from "path"; -import { builtinModules } from "module"; - -// node_modules/import-meta-resolve/lib/get-format.js -import { fileURLToPath as fileURLToPath4 } from "url"; - -// node_modules/import-meta-resolve/lib/package-config.js -import { URL as URL2, fileURLToPath as fileURLToPath3 } from "url"; - -// node_modules/import-meta-resolve/lib/package-json-reader.js -import fs3 from "fs"; -import path3 from "path"; -import { fileURLToPath as fileURLToPath2 } from "url"; - -// node_modules/import-meta-resolve/lib/errors.js -import v8 from "v8"; -import assert4 from "assert"; -import { format, inspect } from "util"; -var own = {}.hasOwnProperty; -var classRegExp = /^([A-Z][a-z\d]*)+$/; -var kTypes = /* @__PURE__ */ new Set([ - "string", - "function", - "number", - "object", - // Accept 'Function' and 'Object' as alternative to the lower cased version. - "Function", - "Object", - "boolean", - "bigint", - "symbol" -]); -var codes = {}; -function formatList(array2, type = "and") { - return array2.length < 3 ? array2.join(` ${type} `) : `${array2.slice(0, -1).join(", ")}, ${type} ${array2[array2.length - 1]}`; + return { enclosingNode, precedingNode, followingNode }; } -var messages = /* @__PURE__ */ new Map(); -var nodeInternalPrefix = "__node_internal_"; -var userStackTraceLimit; -codes.ERR_INVALID_ARG_TYPE = createError( - "ERR_INVALID_ARG_TYPE", - /** - * @param {string} name - * @param {Array | string} expected - * @param {unknown} actual - */ - (name, expected, actual) => { - assert4(typeof name === "string", "'name' must be a string"); - if (!Array.isArray(expected)) { - expected = [expected]; +var returnFalse = () => false; +function attachComments(ast, options8) { + const { comments } = ast; + delete ast.comments; + if (!is_non_empty_array_default(comments) || !options8.printer.canAttachComment) { + return; + } + const tiesToBreak = []; + const { + locStart, + locEnd, + printer: { + experimentalFeatures: { + // TODO: Make this as default behavior + avoidAstMutation = false + } = {}, + handleComments = {} + }, + originalText: text + } = options8; + const { + ownLine: handleOwnLineComment = returnFalse, + endOfLine: handleEndOfLineComment = returnFalse, + remaining: handleRemainingComment = returnFalse + } = handleComments; + const decoratedComments = comments.map((comment, index) => ({ + ...decorateComment(ast, comment, options8), + comment, + text, + options: options8, + ast, + isLastComment: comments.length - 1 === index + })); + for (const [index, context] of decoratedComments.entries()) { + const { + comment, + precedingNode, + enclosingNode, + followingNode, + text: text2, + options: options9, + ast: ast2, + isLastComment + } = context; + if (options9.parser === "json" || options9.parser === "json5" || options9.parser === "jsonc" || options9.parser === "__js_expression" || options9.parser === "__ts_expression" || options9.parser === "__vue_expression" || options9.parser === "__vue_ts_expression") { + if (locStart(comment) - locStart(ast2) <= 0) { + addLeadingComment(ast2, comment); + continue; + } + if (locEnd(comment) - locEnd(ast2) >= 0) { + addTrailingComment(ast2, comment); + continue; + } } - let message = "The "; - if (name.endsWith(" argument")) { - message += `${name} `; + let args; + if (avoidAstMutation) { + args = [context]; } else { - const type = name.includes(".") ? "property" : "argument"; - message += `"${name}" ${type} `; + comment.enclosingNode = enclosingNode; + comment.precedingNode = precedingNode; + comment.followingNode = followingNode; + args = [comment, text2, options9, ast2, isLastComment]; } - message += "must be "; - const types = []; - const instances = []; - const other = []; - for (const value of expected) { - assert4( - typeof value === "string", - "All expected entries have to be of type string" - ); - if (kTypes.has(value)) { - types.push(value.toLowerCase()); - } else if (classRegExp.exec(value) === null) { - assert4( - value !== "object", - 'The value "object" should be written as "Object"' - ); - other.push(value); + if (isOwnLineComment(text2, options9, decoratedComments, index)) { + comment.placement = "ownLine"; + if (handleOwnLineComment(...args)) { + } else if (followingNode) { + addLeadingComment(followingNode, comment); + } else if (precedingNode) { + addTrailingComment(precedingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); } else { - instances.push(value); - } - } - if (instances.length > 0) { - const pos = types.indexOf("object"); - if (pos !== -1) { - types.slice(pos, 1); - instances.push("Object"); + addDanglingComment(ast2, comment); } - } - if (types.length > 0) { - message += `${types.length > 1 ? "one of type" : "of type"} ${formatList( - types, - "or" - )}`; - if (instances.length > 0 || other.length > 0) - message += " or "; - } - if (instances.length > 0) { - message += `an instance of ${formatList(instances, "or")}`; - if (other.length > 0) - message += " or "; - } - if (other.length > 0) { - if (other.length > 1) { - message += `one of ${formatList(other, "or")}`; + } else if (isEndOfLineComment(text2, options9, decoratedComments, index)) { + comment.placement = "endOfLine"; + if (handleEndOfLineComment(...args)) { + } else if (precedingNode) { + addTrailingComment(precedingNode, comment); + } else if (followingNode) { + addLeadingComment(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); } else { - if (other[0].toLowerCase() !== other[0]) - message += "an "; - message += `${other[0]}`; + addDanglingComment(ast2, comment); } - } - message += `. Received ${determineSpecificType(actual)}`; - return message; - }, - TypeError -); -codes.ERR_INVALID_MODULE_SPECIFIER = createError( - "ERR_INVALID_MODULE_SPECIFIER", - /** - * @param {string} request - * @param {string} reason - * @param {string} [base] - */ - (request, reason, base = void 0) => { - return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`; - }, - TypeError -); -codes.ERR_INVALID_PACKAGE_CONFIG = createError( - "ERR_INVALID_PACKAGE_CONFIG", - /** - * @param {string} path - * @param {string} [base] - * @param {string} [message] - */ - (path9, base, message) => { - return `Invalid package config ${path9}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; - }, - Error -); -codes.ERR_INVALID_PACKAGE_TARGET = createError( - "ERR_INVALID_PACKAGE_TARGET", - /** - * @param {string} pkgPath - * @param {string} key - * @param {unknown} target - * @param {boolean} [isImport=false] - * @param {string} [base] - */ - (pkgPath, key, target, isImport = false, base = void 0) => { - const relError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./"); - if (key === ".") { - assert4(isImport === false); - return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ""}${relError ? '; targets must start with "./"' : ""}`; - } - return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify( - target - )} defined for '${key}' in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ""}${relError ? '; targets must start with "./"' : ""}`; - }, - Error -); -codes.ERR_MODULE_NOT_FOUND = createError( - "ERR_MODULE_NOT_FOUND", - /** - * @param {string} path - * @param {string} base - * @param {boolean} [exactUrl] - */ - (path9, base, exactUrl = false) => { - return `Cannot find ${exactUrl ? "module" : "package"} '${path9}' imported from ${base}`; - }, - Error -); -codes.ERR_NETWORK_IMPORT_DISALLOWED = createError( - "ERR_NETWORK_IMPORT_DISALLOWED", - "import of '%s' by %s is not supported: %s", - Error -); -codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError( - "ERR_PACKAGE_IMPORT_NOT_DEFINED", - /** - * @param {string} specifier - * @param {string} packagePath - * @param {string} base - */ - (specifier, packagePath, base) => { - return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`; - }, - TypeError -); -codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError( - "ERR_PACKAGE_PATH_NOT_EXPORTED", - /** - * @param {string} pkgPath - * @param {string} subpath - * @param {string} [base] - */ - (pkgPath, subpath, base = void 0) => { - if (subpath === ".") - return `No "exports" main defined in ${pkgPath}package.json${base ? ` imported from ${base}` : ""}`; - return `Package subpath '${subpath}' is not defined by "exports" in ${pkgPath}package.json${base ? ` imported from ${base}` : ""}`; - }, - Error -); -codes.ERR_UNSUPPORTED_DIR_IMPORT = createError( - "ERR_UNSUPPORTED_DIR_IMPORT", - "Directory import '%s' is not supported resolving ES modules imported from %s", - Error -); -codes.ERR_UNKNOWN_FILE_EXTENSION = createError( - "ERR_UNKNOWN_FILE_EXTENSION", - /** - * @param {string} ext - * @param {string} path - */ - (ext, path9) => { - return `Unknown file extension "${ext}" for ${path9}`; - }, - TypeError -); -codes.ERR_INVALID_ARG_VALUE = createError( - "ERR_INVALID_ARG_VALUE", - /** - * @param {string} name - * @param {unknown} value - * @param {string} [reason='is invalid'] - */ - (name, value, reason = "is invalid") => { - let inspected = inspect(value); - if (inspected.length > 128) { - inspected = `${inspected.slice(0, 128)}...`; - } - const type = name.includes(".") ? "property" : "argument"; - return `The ${type} '${name}' ${reason}. Received ${inspected}`; - }, - TypeError - // Note: extra classes have been shaken out. - // , RangeError -); -function createError(sym, value, def) { - messages.set(sym, value); - return makeNodeErrorWithCode(def, sym); -} -function makeNodeErrorWithCode(Base, key) { - return NodeError; - function NodeError(...args) { - const limit = Error.stackTraceLimit; - if (isErrorStackTraceLimitWritable()) - Error.stackTraceLimit = 0; - const error = new Base(); - if (isErrorStackTraceLimitWritable()) - Error.stackTraceLimit = limit; - const message = getMessage(key, args, error); - Object.defineProperties(error, { - // Note: no need to implement `kIsNodeError` symbol, would be hard, - // probably. - message: { - value: message, - enumerable: false, - writable: true, - configurable: true - }, - toString: { - /** @this {Error} */ - value() { - return `${this.name} [${key}]: ${this.message}`; - }, - enumerable: false, - writable: true, - configurable: true + } else { + comment.placement = "remaining"; + if (handleRemainingComment(...args)) { + } else if (precedingNode && followingNode) { + const tieCount = tiesToBreak.length; + if (tieCount > 0) { + const lastTie = tiesToBreak[tieCount - 1]; + if (lastTie.followingNode !== followingNode) { + breakTies(tiesToBreak, options9); + } + } + tiesToBreak.push(context); + } else if (precedingNode) { + addTrailingComment(precedingNode, comment); + } else if (followingNode) { + addLeadingComment(followingNode, comment); + } else if (enclosingNode) { + addDanglingComment(enclosingNode, comment); + } else { + addDanglingComment(ast2, comment); } - }); - captureLargerStackTrace(error); - error.code = key; - return error; - } -} -function isErrorStackTraceLimitWritable() { - try { - if (v8.startupSnapshot.isBuildingSnapshot()) { - return false; } - } catch { } - const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit"); - if (desc === void 0) { - return Object.isExtensible(Error); + breakTies(tiesToBreak, options8); + if (!avoidAstMutation) { + for (const comment of comments) { + delete comment.precedingNode; + delete comment.enclosingNode; + delete comment.followingNode; + } } - return own.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0; -} -function hideStackFrames(fn) { - const hidden = nodeInternalPrefix + fn.name; - Object.defineProperty(fn, "name", { value: hidden }); - return fn; } -var captureLargerStackTrace = hideStackFrames( - /** - * @param {Error} error - * @returns {Error} - */ - // @ts-expect-error: fine - function(error) { - const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); - if (stackTraceLimitIsWritable) { - userStackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = Number.POSITIVE_INFINITY; +var isAllEmptyAndNoLineBreak = (text) => !/[\S\n\u2028\u2029]/.test(text); +function isOwnLineComment(text, options8, decoratedComments, commentIndex) { + const { comment, precedingNode } = decoratedComments[commentIndex]; + const { locStart, locEnd } = options8; + let start = locStart(comment); + if (precedingNode) { + for (let index = commentIndex - 1; index >= 0; index--) { + const { comment: comment2, precedingNode: currentCommentPrecedingNode } = decoratedComments[index]; + if (currentCommentPrecedingNode !== precedingNode || !isAllEmptyAndNoLineBreak(text.slice(locEnd(comment2), start))) { + break; + } + start = locStart(comment2); } - Error.captureStackTrace(error); - if (stackTraceLimitIsWritable) - Error.stackTraceLimit = userStackTraceLimit; - return error; } -); -function getMessage(key, args, self) { - const message = messages.get(key); - assert4(message !== void 0, "expected `message` to be found"); - if (typeof message === "function") { - assert4( - message.length <= args.length, - // Default options do not count. - `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${message.length}).` - ); - return Reflect.apply(message, self, args); + return has_newline_default(text, start, { backwards: true }); +} +function isEndOfLineComment(text, options8, decoratedComments, commentIndex) { + const { comment, followingNode } = decoratedComments[commentIndex]; + const { locStart, locEnd } = options8; + let end = locEnd(comment); + if (followingNode) { + for (let index = commentIndex + 1; index < decoratedComments.length; index++) { + const { comment: comment2, followingNode: currentCommentFollowingNode } = decoratedComments[index]; + if (currentCommentFollowingNode !== followingNode || !isAllEmptyAndNoLineBreak(text.slice(end, locStart(comment2)))) { + break; + } + end = locEnd(comment2); + } } - const regex = /%[dfijoOs]/g; - let expectedLength = 0; - while (regex.exec(message) !== null) - expectedLength++; - assert4( - expectedLength === args.length, - `Code: ${key}; The provided arguments length (${args.length}) does not match the required ones (${expectedLength}).` - ); - if (args.length === 0) - return message; - args.unshift(message); - return Reflect.apply(format, null, args); + return has_newline_default(text, end); } -function determineSpecificType(value) { - if (value === null || value === void 0) { - return String(value); +function breakTies(tiesToBreak, options8) { + var _a, _b; + const tieCount = tiesToBreak.length; + if (tieCount === 0) { + return; } - if (typeof value === "function" && value.name) { - return `function ${value.name}`; + const { precedingNode, followingNode } = tiesToBreak[0]; + let gapEndPos = options8.locStart(followingNode); + let indexOfFirstLeadingComment; + for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) { + const { + comment, + precedingNode: currentCommentPrecedingNode, + followingNode: currentCommentFollowingNode + } = tiesToBreak[indexOfFirstLeadingComment - 1]; + assert4.strictEqual(currentCommentPrecedingNode, precedingNode); + assert4.strictEqual(currentCommentFollowingNode, followingNode); + const gap = options8.originalText.slice(options8.locEnd(comment), gapEndPos); + if (((_b = (_a = options8.printer).isGap) == null ? void 0 : _b.call(_a, gap, options8)) ?? /^[\s(]*$/.test(gap)) { + gapEndPos = options8.locStart(comment); + } else { + break; + } } - if (typeof value === "object") { - if (value.constructor && value.constructor.name) { - return `an instance of ${value.constructor.name}`; + for (const [i, { comment }] of tiesToBreak.entries()) { + if (i < indexOfFirstLeadingComment) { + addTrailingComment(precedingNode, comment); + } else { + addLeadingComment(followingNode, comment); } - return `${inspect(value, { depth: -1 })}`; } - let inspected = inspect(value, { colors: false }); - if (inspected.length > 28) { - inspected = `${inspected.slice(0, 25)}...`; + for (const node of [precedingNode, followingNode]) { + if (node.comments && node.comments.length > 1) { + node.comments.sort((a, b) => options8.locStart(a) - options8.locStart(b)); + } } - return `type ${typeof value} (${inspected})`; + tiesToBreak.length = 0; +} +function findExpressionIndexForComment(quasis, comment, options8) { + const startPos = options8.locStart(comment) - 1; + for (let i = 1; i < quasis.length; ++i) { + if (startPos < options8.locStart(quasis[i])) { + return i - 1; + } + } + return 0; } -// node_modules/import-meta-resolve/lib/package-json-reader.js -var hasOwnProperty = {}.hasOwnProperty; -var { ERR_INVALID_PACKAGE_CONFIG } = codes; -var cache = /* @__PURE__ */ new Map(); -var reader = { read }; -var package_json_reader_default = reader; -function read(jsonPath, { base, specifier }) { - const existing = cache.get(jsonPath); - if (existing) { - return existing; +// src/utils/is-previous-line-empty.js +function isPreviousLineEmpty(text, startIndex) { + let idx = startIndex - 1; + idx = skipSpaces(text, idx, { backwards: true }); + idx = skip_newline_default(text, idx, { backwards: true }); + idx = skipSpaces(text, idx, { backwards: true }); + const idx2 = skip_newline_default(text, idx, { backwards: true }); + return idx !== idx2; +} +var is_previous_line_empty_default = isPreviousLineEmpty; + +// src/main/comments/print.js +function printComment(path13, options8) { + const comment = path13.node; + comment.printed = true; + return options8.printer.printComment(path13, options8); +} +function printLeadingComment(path13, options8) { + var _a; + const comment = path13.node; + const parts = [printComment(path13, options8)]; + const { printer, originalText, locStart, locEnd } = options8; + const isBlock = (_a = printer.isBlockComment) == null ? void 0 : _a.call(printer, comment); + if (isBlock) { + const lineBreak = has_newline_default(originalText, locEnd(comment)) ? has_newline_default(originalText, locStart(comment), { + backwards: true + }) ? hardline : line2 : " "; + parts.push(lineBreak); + } else { + parts.push(hardline); } - let string; - try { - string = fs3.readFileSync(path3.toNamespacedPath(jsonPath), "utf8"); - } catch (error) { - const exception = ( - /** @type {ErrnoException} */ - error + const index = skip_newline_default( + originalText, + skipSpaces(originalText, locEnd(comment)) + ); + if (index !== false && has_newline_default(originalText, index)) { + parts.push(hardline); + } + return parts; +} +function printTrailingComment(path13, options8, previousComment) { + var _a; + const comment = path13.node; + const printed = printComment(path13, options8); + const { printer, originalText, locStart } = options8; + const isBlock = (_a = printer.isBlockComment) == null ? void 0 : _a.call(printer, comment); + if ((previousComment == null ? void 0 : previousComment.hasLineSuffix) && !(previousComment == null ? void 0 : previousComment.isBlock) || has_newline_default(originalText, locStart(comment), { backwards: true })) { + const isLineBeforeEmpty = is_previous_line_empty_default( + originalText, + locStart(comment) ); - if (exception.code !== "ENOENT") { - throw exception; - } + return { + doc: lineSuffix([hardline, isLineBeforeEmpty ? hardline : "", printed]), + isBlock, + hasLineSuffix: true + }; } - const result = { - exists: false, - pjsonPath: jsonPath, - main: void 0, - name: void 0, - type: "none", - // Ignore unknown types for forwards compatibility - exports: void 0, - imports: void 0 - }; - if (string !== void 0) { - let parsed; - try { - parsed = JSON.parse(string); - } catch (error_) { - const cause = ( - /** @type {ErrnoException} */ - error_ - ); - const error = new ERR_INVALID_PACKAGE_CONFIG( - jsonPath, - (base ? `"${specifier}" from ` : "") + fileURLToPath2(base || specifier), - cause.message - ); - error.cause = cause; - throw error; - } - result.exists = true; - if (hasOwnProperty.call(parsed, "name") && typeof parsed.name === "string") { - result.name = parsed.name; - } - if (hasOwnProperty.call(parsed, "main") && typeof parsed.main === "string") { - result.main = parsed.main; - } - if (hasOwnProperty.call(parsed, "exports")) { - result.exports = parsed.exports; - } - if (hasOwnProperty.call(parsed, "imports")) { - result.imports = parsed.imports; - } - if (hasOwnProperty.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) { - result.type = parsed.type; - } + if (!isBlock || (previousComment == null ? void 0 : previousComment.hasLineSuffix)) { + return { + doc: [lineSuffix([" ", printed]), breakParent], + isBlock, + hasLineSuffix: true + }; } - cache.set(jsonPath, result); - return result; + return { doc: [" ", printed], isBlock, hasLineSuffix: false }; } - -// node_modules/import-meta-resolve/lib/package-config.js -function getPackageScopeConfig(resolved) { - let packageJSONUrl = new URL2("package.json", resolved); - while (true) { - const packageJSONPath2 = packageJSONUrl.pathname; - if (packageJSONPath2.endsWith("node_modules/package.json")) { - break; - } - const packageConfig = package_json_reader_default.read( - fileURLToPath3(packageJSONUrl), - { specifier: resolved } - ); - if (packageConfig.exists) { - return packageConfig; +function printCommentsSeparately(path13, options8) { + const value = path13.node; + if (!value) { + return {}; + } + const ignored = options8[Symbol.for("printedComments")]; + const comments = (value.comments || []).filter( + (comment) => !ignored.has(comment) + ); + if (comments.length === 0) { + return { leading: "", trailing: "" }; + } + const leadingParts = []; + const trailingParts = []; + let printedTrailingComment; + path13.each(() => { + const comment = path13.node; + if (ignored == null ? void 0 : ignored.has(comment)) { + return; } - const lastPackageJSONUrl = packageJSONUrl; - packageJSONUrl = new URL2("../package.json", packageJSONUrl); - if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { - break; + const { leading, trailing } = comment; + if (leading) { + leadingParts.push(printLeadingComment(path13, options8)); + } else if (trailing) { + printedTrailingComment = printTrailingComment( + path13, + options8, + printedTrailingComment + ); + trailingParts.push(printedTrailingComment.doc); } + }, "comments"); + return { leading: leadingParts, trailing: trailingParts }; +} +function printComments(path13, doc2, options8) { + const { leading, trailing } = printCommentsSeparately(path13, options8); + if (!leading && !trailing) { + return doc2; } - const packageJSONPath = fileURLToPath3(packageJSONUrl); - return { - pjsonPath: packageJSONPath, - exists: false, - main: void 0, - name: void 0, - type: "none", - exports: void 0, - imports: void 0 - }; + return inheritLabel(doc2, (doc3) => [leading, doc3, trailing]); } - -// node_modules/import-meta-resolve/lib/resolve-get-package-type.js -function getPackageType(url2) { - const packageConfig = getPackageScopeConfig(url2); - return packageConfig.type; +function ensureAllCommentsPrinted(options8) { + const { + [Symbol.for("comments")]: comments, + [Symbol.for("printedComments")]: printedComments + } = options8; + for (const comment of comments) { + if (!comment.printed && !printedComments.has(comment)) { + throw new Error( + 'Comment "' + comment.value.trim() + '" was not printed. Please report this error!' + ); + } + delete comment.printed; + } } -// node_modules/import-meta-resolve/lib/get-format.js -var { ERR_UNKNOWN_FILE_EXTENSION } = codes; -var hasOwnProperty2 = {}.hasOwnProperty; -var extensionFormatMap = { - // @ts-expect-error: hush. - __proto__: null, - ".cjs": "commonjs", - ".js": "module", - ".json": "json", - ".mjs": "module" -}; -function mimeToFormat(mime) { - if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) - return "module"; - if (mime === "application/json") - return "json"; - return null; -} -var protocolHandlers = { - // @ts-expect-error: hush. - __proto__: null, - "data:": getDataProtocolModuleFormat, - "file:": getFileProtocolModuleFormat, - "http:": getHttpProtocolModuleFormat, - "https:": getHttpProtocolModuleFormat, - "node:"() { - return "builtin"; +// src/main/create-print-pre-check-function.js +function createPrintPreCheckFunction(options8) { + if (true) { + return () => { + }; } -}; -function getDataProtocolModuleFormat(parsed) { - const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec( - parsed.pathname - ) || [null, null, null]; - return mimeToFormat(mime); -} -function extname(url2) { - const pathname = url2.pathname; - let index = pathname.length; - while (index--) { - const code = pathname.codePointAt(index); - if (code === 47) { - return ""; + const getVisitorKeys = create_get_visitor_keys_function_default( + options8.printer.getVisitorKeys + ); + return function(path13) { + if (path13.isRoot) { + return; } - if (code === 46) { - return pathname.codePointAt(index - 1) === 47 ? "" : pathname.slice(index); + const { key: key2, parent } = path13; + const visitorKeys = getVisitorKeys(parent); + if (visitorKeys.includes(key2)) { + return; } - } - return ""; + throw Object.assign(new Error("Calling `print()` on non-node object."), { + parentNode: parent, + allowedProperties: visitorKeys, + printingProperty: key2, + printingValue: path13.node, + pathStack: path13.stack.length > 5 ? ["...", ...path13.stack.slice(-5)] : [...path13.stack] + }); + }; } -function getFileProtocolModuleFormat(url2, _context, ignoreErrors) { - const ext = extname(url2); - if (ext === ".js") { - const packageType = getPackageType(url2); - if (packageType !== "none") { - return packageType; - } - return "commonjs"; - } - if (ext === "") { - const packageType = getPackageType(url2); - if (packageType === "none" || packageType === "commonjs") { - return "commonjs"; +var create_print_pre_check_function_default = createPrintPreCheckFunction; + +// src/main/core-options.evaluate.js +var core_options_evaluate_default = { + "cursorOffset": { + "category": "Special", + "type": "int", + "default": -1, + "range": { + "start": -1, + "end": Infinity, + "step": 1 + }, + "description": "Print (to stderr) where a cursor at the given position would move to after formatting.", + "cliCategory": "Editor" + }, + "endOfLine": { + "category": "Global", + "type": "choice", + "default": "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": "Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)" + } + ] + }, + "filepath": { + "category": "Special", + "type": "path", + "description": "Specify the input filepath. This will be used to do parser inference.", + "cliName": "stdin-filepath", + "cliCategory": "Other", + "cliDescription": "Path to the file to pretend that stdin comes from." + }, + "insertPragma": { + "category": "Special", + "type": "boolean", + "default": false, + "description": "Insert @format pragma into file's first docblock comment.", + "cliCategory": "Other" + }, + "parser": { + "category": "Global", + "type": "choice", + "default": void 0, + "description": "Which parser to use.", + "exception": (value) => typeof value === "string" || typeof value === "function", + "choices": [ + { + "value": "flow", + "description": "Flow" + }, + { + "value": "babel", + "description": "JavaScript" + }, + { + "value": "babel-flow", + "description": "Flow" + }, + { + "value": "babel-ts", + "description": "TypeScript" + }, + { + "value": "typescript", + "description": "TypeScript" + }, + { + "value": "acorn", + "description": "JavaScript" + }, + { + "value": "espree", + "description": "JavaScript" + }, + { + "value": "meriyah", + "description": "JavaScript" + }, + { + "value": "css", + "description": "CSS" + }, + { + "value": "less", + "description": "Less" + }, + { + "value": "scss", + "description": "SCSS" + }, + { + "value": "json", + "description": "JSON" + }, + { + "value": "json5", + "description": "JSON5" + }, + { + "value": "jsonc", + "description": "JSON with Comments" + }, + { + "value": "json-stringify", + "description": "JSON.stringify" + }, + { + "value": "graphql", + "description": "GraphQL" + }, + { + "value": "markdown", + "description": "Markdown" + }, + { + "value": "mdx", + "description": "MDX" + }, + { + "value": "vue", + "description": "Vue" + }, + { + "value": "yaml", + "description": "YAML" + }, + { + "value": "glimmer", + "description": "Ember / Handlebars" + }, + { + "value": "html", + "description": "HTML" + }, + { + "value": "angular", + "description": "Angular" + }, + { + "value": "lwc", + "description": "Lightning Web Components" + } + ] + }, + "plugins": { + "type": "path", + "array": true, + "default": [ + { + "value": [] + } + ], + "category": "Global", + "description": "Add a plugin. Multiple plugins can be passed as separate `--plugin`s.", + "exception": (value) => typeof value === "string" || typeof value === "object", + "cliName": "plugin", + "cliCategory": "Config" + }, + "printWidth": { + "category": "Global", + "type": "int", + "default": 80, + "description": "The line length where Prettier will try wrap.", + "range": { + "start": 0, + "end": Infinity, + "step": 1 } - return "module"; - } - const format3 = extensionFormatMap[ext]; - if (format3) - return format3; - if (ignoreErrors) { - return void 0; - } - const filepath = fileURLToPath4(url2); - throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath); -} -function getHttpProtocolModuleFormat() { -} -function defaultGetFormatWithoutErrors(url2, context) { - const protocol = url2.protocol; - if (!hasOwnProperty2.call(protocolHandlers, protocol)) { - return null; - } - return protocolHandlers[protocol](url2, context, true) || null; -} - -// node_modules/import-meta-resolve/lib/utils.js -var { ERR_INVALID_ARG_VALUE } = codes; -var DEFAULT_CONDITIONS = Object.freeze(["node", "import"]); -var DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS); -function getDefaultConditions() { - return DEFAULT_CONDITIONS; -} -function getDefaultConditionsSet() { - return DEFAULT_CONDITIONS_SET; -} -function getConditionsSet(conditions) { - if (conditions !== void 0 && conditions !== getDefaultConditions()) { - if (!Array.isArray(conditions)) { - throw new ERR_INVALID_ARG_VALUE( - "conditions", - conditions, - "expected an array" - ); + }, + "rangeEnd": { + "category": "Special", + "type": "int", + "default": Infinity, + "range": { + "start": 0, + "end": Infinity, + "step": 1 + }, + "description": "Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.", + "cliCategory": "Editor" + }, + "rangeStart": { + "category": "Special", + "type": "int", + "default": 0, + "range": { + "start": 0, + "end": Infinity, + "step": 1 + }, + "description": "Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.", + "cliCategory": "Editor" + }, + "requirePragma": { + "category": "Special", + "type": "boolean", + "default": false, + "description": "Require either '@prettier' or '@format' to be present in the file's first docblock comment\nin order for it to be formatted.", + "cliCategory": "Other" + }, + "tabWidth": { + "type": "int", + "category": "Global", + "default": 2, + "description": "Number of spaces per indentation level.", + "range": { + "start": 0, + "end": Infinity, + "step": 1 } - return new Set(conditions); + }, + "useTabs": { + "category": "Global", + "type": "boolean", + "default": false, + "description": "Indent with tabs instead of spaces." + }, + "embeddedLanguageFormatting": { + "category": "Global", + "type": "choice", + "default": "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." + } + ] } - return getDefaultConditionsSet(); -} +}; -// node_modules/import-meta-resolve/lib/resolve.js -var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; -var { - ERR_NETWORK_IMPORT_DISALLOWED, - ERR_INVALID_MODULE_SPECIFIER, - ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG2, - ERR_INVALID_PACKAGE_TARGET, - ERR_MODULE_NOT_FOUND, - ERR_PACKAGE_IMPORT_NOT_DEFINED, - ERR_PACKAGE_PATH_NOT_EXPORTED, - ERR_UNSUPPORTED_DIR_IMPORT -} = codes; -var own2 = {}.hasOwnProperty; -var invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; -var deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; -var invalidPackageNameRegEx = /^\.|%|\\/; -var patternRegEx = /\*/g; -var encodedSepRegEx = /%2f|%5c/i; -var emittedPackageWarnings = /* @__PURE__ */ new Set(); -var doubleSlashRegEx = /[/\\]{2}/; -function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) { - if (process3.noDeprecation) { - return; - } - const pjsonPath = fileURLToPath5(packageJsonUrl); - const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; - process3.emitWarning( - `Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath5(base)}` : ""}.`, - "DeprecationWarning", - "DEP0166" - ); -} -function emitLegacyIndexDeprecation(url2, packageJsonUrl, base, main) { - if (process3.noDeprecation) { - return; - } - const format3 = defaultGetFormatWithoutErrors(url2, { parentURL: base.href }); - if (format3 !== "module") - return; - const urlPath = fileURLToPath5(url2.href); - const pkgPath = fileURLToPath5(new URL3(".", packageJsonUrl)); - const basePath = fileURLToPath5(base); - if (!main) { - process3.emitWarning( - `No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${urlPath.slice( - pkgPath.length - )}", imported from ${basePath}. -Default "index" lookups for the main are deprecated for ES modules.`, - "DeprecationWarning", - "DEP0151" - ); - } else if (path4.resolve(pkgPath, main) !== urlPath) { - process3.emitWarning( - `Package ${pkgPath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice( - pkgPath.length - )}", imported from ${basePath}. - Automatic extension resolution of the "main" field is deprecated for ES modules.`, - "DeprecationWarning", - "DEP0151" - ); +// src/main/support.js +function getSupportInfo({ + plugins = [], + showDeprecated = false +} = {}) { + const languages2 = plugins.flatMap((plugin) => plugin.languages ?? []); + const options8 = []; + for (const option of normalizeOptionSettings(Object.assign({}, ...plugins.map(({ + options: options9 + }) => options9), core_options_evaluate_default))) { + if (!showDeprecated && option.deprecated) { + continue; + } + if (Array.isArray(option.choices)) { + if (!showDeprecated) { + option.choices = option.choices.filter((choice) => !choice.deprecated); + } + if (option.name === "parser") { + option.choices = [...option.choices, ...collectParsersFromLanguages(option.choices, languages2, plugins)]; + } + } + option.pluginDefaults = Object.fromEntries(plugins.filter((plugin) => { + var _a; + return ((_a = plugin.defaultOptions) == null ? void 0 : _a[option.name]) !== void 0; + }).map((plugin) => [plugin.name, plugin.defaultOptions[option.name]])); + options8.push(option); } + return { + languages: languages2, + options: options8 + }; } -function tryStatSync(path9) { - try { - return statSync(path9); - } catch { - return new Stats(); +function* collectParsersFromLanguages(parserChoices, languages2, plugins) { + const existingParsers = new Set(parserChoices.map((choice) => choice.value)); + for (const language of languages2) { + if (language.parsers) { + for (const parserName of language.parsers) { + if (!existingParsers.has(parserName)) { + existingParsers.add(parserName); + const plugin = plugins.find((plugin2) => plugin2.parsers && Object.prototype.hasOwnProperty.call(plugin2.parsers, parserName)); + let description = language.name; + if (plugin == null ? void 0 : plugin.name) { + description += ` (plugin: ${plugin.name})`; + } + yield { + value: parserName, + description + }; + } + } + } } } -function fileExists(url2) { - const stats = statSync(url2, { throwIfNoEntry: false }); - const isFile = stats ? stats.isFile() : void 0; - return isFile === null || isFile === void 0 ? false : isFile; +function normalizeOptionSettings(settings) { + const options8 = []; + for (const [name, originalOption] of Object.entries(settings)) { + const option = { + name, + ...originalOption + }; + if (Array.isArray(option.default)) { + option.default = at_default( + /* isOptionalObject*/ + false, + option.default, + -1 + ).value; + } + options8.push(option); + } + return options8; } -function legacyMainResolve(packageJsonUrl, packageConfig, base) { - let guess; - if (packageConfig.main !== void 0) { - guess = new URL3(packageConfig.main, packageJsonUrl); - if (fileExists(guess)) - return guess; - const tries2 = [ - `./${packageConfig.main}.js`, - `./${packageConfig.main}.json`, - `./${packageConfig.main}.node`, - `./${packageConfig.main}/index.js`, - `./${packageConfig.main}/index.json`, - `./${packageConfig.main}/index.node` - ]; - let i2 = -1; - while (++i2 < tries2.length) { - guess = new URL3(tries2[i2], packageJsonUrl); - if (fileExists(guess)) - break; - guess = void 0; + +// src/main/normalize-options.js +var hasDeprecationWarned; +function normalizeOptions(options8, optionInfos, { + logger = false, + isCLI = false, + passThrough = false, + FlagSchema, + descriptor +} = {}) { + if (isCLI) { + if (!FlagSchema) { + throw new Error("'FlagSchema' option is required."); } - if (guess) { - emitLegacyIndexDeprecation( - guess, - packageJsonUrl, - base, - packageConfig.main - ); - return guess; + if (!descriptor) { + throw new Error("'descriptor' option is required."); } + } else { + descriptor = apiDescriptor; } - const tries = ["./index.js", "./index.json", "./index.node"]; - let i = -1; - while (++i < tries.length) { - guess = new URL3(tries[i], packageJsonUrl); - if (fileExists(guess)) - break; - guess = void 0; + const unknown = !passThrough ? (key2, value, options9) => { + const { + _, + ...schemas2 + } = options9.schemas; + return levenUnknownHandler(key2, value, { + ...options9, + schemas: schemas2 + }); + } : Array.isArray(passThrough) ? (key2, value) => !passThrough.includes(key2) ? void 0 : { + [key2]: value + } : (key2, value) => ({ + [key2]: value + }); + const schemas = optionInfosToSchemas(optionInfos, { + isCLI, + FlagSchema + }); + const normalizer = new Normalizer(schemas, { + logger, + unknown, + descriptor + }); + const shouldSuppressDuplicateDeprecationWarnings = logger !== false; + if (shouldSuppressDuplicateDeprecationWarnings && hasDeprecationWarned) { + normalizer._hasDeprecationWarned = hasDeprecationWarned; } - if (guess) { - emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); - return guess; + const normalized = normalizer.normalize(options8); + if (shouldSuppressDuplicateDeprecationWarnings) { + hasDeprecationWarned = normalizer._hasDeprecationWarned; } - throw new ERR_MODULE_NOT_FOUND( - fileURLToPath5(new URL3(".", packageJsonUrl)), - fileURLToPath5(base) - ); + return normalized; } -function finalizeResolution(resolved, base, preserveSymlinks) { - if (encodedSepRegEx.exec(resolved.pathname) !== null) { - throw new ERR_INVALID_MODULE_SPECIFIER( - resolved.pathname, - 'must not include encoded "/" or "\\" characters', - fileURLToPath5(base) - ); - } - let filePath; - try { - filePath = fileURLToPath5(resolved); - } catch (error) { - const cause = ( - /** @type {ErrnoException} */ - error - ); - Object.defineProperty(cause, "input", { value: String(resolved) }); - Object.defineProperty(cause, "module", { value: String(base) }); - throw cause; - } - const stats = tryStatSync( - filePath.endsWith("/") ? filePath.slice(-1) : filePath - ); - if (stats.isDirectory()) { - const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath5(base)); - error.url = String(resolved); - throw error; - } - if (!stats.isFile()) { - const error = new ERR_MODULE_NOT_FOUND( - filePath || resolved.pathname, - base && fileURLToPath5(base), - true - ); - error.url = String(resolved); - throw error; - } - if (!preserveSymlinks) { - const real = realpathSync(filePath); - const { search, hash } = resolved; - resolved = pathToFileURL2(real + (filePath.endsWith(path4.sep) ? "/" : "")); - resolved.search = search; - resolved.hash = hash; +function optionInfosToSchemas(optionInfos, { + isCLI, + FlagSchema +}) { + const schemas = []; + if (isCLI) { + schemas.push(AnySchema.create({ + name: "_" + })); } - return resolved; -} -function importNotDefined(specifier, packageJsonUrl, base) { - return new ERR_PACKAGE_IMPORT_NOT_DEFINED( - specifier, - packageJsonUrl && fileURLToPath5(new URL3(".", packageJsonUrl)), - fileURLToPath5(base) - ); -} -function exportsNotFound(subpath, packageJsonUrl, base) { - return new ERR_PACKAGE_PATH_NOT_EXPORTED( - fileURLToPath5(new URL3(".", packageJsonUrl)), - subpath, - base && fileURLToPath5(base) - ); -} -function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) { - const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath5(packageJsonUrl)}`; - throw new ERR_INVALID_MODULE_SPECIFIER( - request, - reason, - base && fileURLToPath5(base) - ); -} -function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) { - target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`; - return new ERR_INVALID_PACKAGE_TARGET( - fileURLToPath5(new URL3(".", packageJsonUrl)), - subpath, - target, - internal, - base && fileURLToPath5(base) - ); -} -function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) { - if (subpath !== "" && !pattern && target[target.length - 1] !== "/") - throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); - if (!target.startsWith("./")) { - if (internal && !target.startsWith("../") && !target.startsWith("/")) { - let isURL2 = false; - try { - new URL3(target); - isURL2 = true; - } catch { - } - if (!isURL2) { - const exportTarget = pattern ? RegExpPrototypeSymbolReplace.call( - patternRegEx, - target, - () => subpath - ) : target + subpath; - return packageResolve(exportTarget, packageJsonUrl, conditions); - } + for (const optionInfo of optionInfos) { + schemas.push(optionInfoToSchema(optionInfo, { + isCLI, + optionInfos, + FlagSchema + })); + if (optionInfo.alias && isCLI) { + schemas.push(AliasSchema.create({ + // @ts-expect-error + name: optionInfo.alias, + sourceName: optionInfo.name + })); } - throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); } - if (invalidSegmentRegEx.exec(target.slice(2)) !== null) { - if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) { - if (!isPathMap) { - const request = pattern ? match.replace("*", () => subpath) : match + subpath; - const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( - patternRegEx, - target, - () => subpath - ) : target; - emitInvalidSegmentDeprecation( - resolvedTarget, - request, - match, - packageJsonUrl, - internal, - base, - true - ); + return schemas; +} +function optionInfoToSchema(optionInfo, { + isCLI, + optionInfos, + FlagSchema +}) { + const { + name + } = optionInfo; + const parameters = { + name + }; + let SchemaConstructor; + const handlers = {}; + switch (optionInfo.type) { + case "int": + SchemaConstructor = IntegerSchema; + if (isCLI) { + parameters.preprocess = Number; } - } else { - throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); - } + break; + case "string": + SchemaConstructor = StringSchema; + break; + case "choice": + SchemaConstructor = ChoiceSchema; + parameters.choices = optionInfo.choices.map((choiceInfo) => (choiceInfo == null ? void 0 : choiceInfo.redirect) ? { + ...choiceInfo, + redirect: { + to: { + key: optionInfo.name, + value: choiceInfo.redirect + } + } + } : choiceInfo); + break; + case "boolean": + SchemaConstructor = BooleanSchema; + break; + case "flag": + SchemaConstructor = FlagSchema; + parameters.flags = optionInfos.flatMap((optionInfo2) => [optionInfo2.alias, optionInfo2.description && optionInfo2.name, optionInfo2.oppositeDescription && `no-${optionInfo2.name}`].filter(Boolean)); + break; + case "path": + SchemaConstructor = StringSchema; + break; + default: + throw new Error(`Unexpected type ${optionInfo.type}`); } - const resolved = new URL3(target, packageJsonUrl); - const resolvedPath = resolved.pathname; - const packagePath = new URL3(".", packageJsonUrl).pathname; - if (!resolvedPath.startsWith(packagePath)) - throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); - if (subpath === "") - return resolved; - if (invalidSegmentRegEx.exec(subpath) !== null) { - const request = pattern ? match.replace("*", () => subpath) : match + subpath; - if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) { - if (!isPathMap) { - const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( - patternRegEx, - target, - () => subpath - ) : target; - emitInvalidSegmentDeprecation( - resolvedTarget, - request, - match, - packageJsonUrl, - internal, - base, - false - ); + if (optionInfo.exception) { + parameters.validate = (value, schema2, utils) => optionInfo.exception(value) || schema2.validate(value, utils); + } else { + parameters.validate = (value, schema2, utils) => value === void 0 || schema2.validate(value, utils); + } + if (optionInfo.redirect) { + handlers.redirect = (value) => !value ? void 0 : { + to: { + key: optionInfo.redirect.option, + value: optionInfo.redirect.value } - } else { - throwInvalidSubpath(request, match, packageJsonUrl, internal, base); - } + }; } - if (pattern) { - return new URL3( - RegExpPrototypeSymbolReplace.call( - patternRegEx, - resolved.href, - () => subpath - ) - ); + if (optionInfo.deprecated) { + handlers.deprecated = true; } - return new URL3(subpath, resolved); -} -function isArrayIndex(key) { - const keyNumber = Number(key); - if (`${keyNumber}` !== key) - return false; - return keyNumber >= 0 && keyNumber < 4294967295; + if (isCLI && !optionInfo.array) { + const originalPreprocess = parameters.preprocess || ((x) => x); + parameters.preprocess = (value, schema2, utils) => schema2.preprocess(originalPreprocess(Array.isArray(value) ? at_default( + /* isOptionalObject*/ + false, + value, + -1 + ) : value), utils); + } + return optionInfo.array ? ArraySchema.create({ + ...isCLI ? { + preprocess: (v) => Array.isArray(v) ? v : [v] + } : {}, + ...handlers, + // @ts-expect-error + valueSchema: SchemaConstructor.create(parameters) + }) : SchemaConstructor.create({ + ...parameters, + ...handlers + }); } -function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) { - if (typeof target === "string") { - return resolvePackageTargetString( - target, - subpath, - packageSubpath, - packageJsonUrl, - base, - pattern, - internal, - isPathMap, - conditions - ); +var normalize_options_default = normalizeOptions; + +// scripts/build/shims/array-find-last.js +var arrayFindLast = (isOptionalObject, array2, callback) => { + if (isOptionalObject && (array2 === void 0 || array2 === null)) { + return; } - if (Array.isArray(target)) { - const targetList = target; - if (targetList.length === 0) - return null; - let lastException; - let i = -1; - while (++i < targetList.length) { - const targetItem = targetList[i]; - let resolveResult; - try { - resolveResult = resolvePackageTarget( - packageJsonUrl, - targetItem, - subpath, - packageSubpath, - base, - pattern, - internal, - isPathMap, - conditions - ); - } catch (error) { - const exception = ( - /** @type {ErrnoException} */ - error - ); - lastException = exception; - if (exception.code === "ERR_INVALID_PACKAGE_TARGET") - continue; - throw error; - } - if (resolveResult === void 0) - continue; - if (resolveResult === null) { - lastException = null; - continue; - } - return resolveResult; - } - if (lastException === void 0 || lastException === null) { - return null; + if (array2.findLast) { + return array2.findLast(callback); + } + for (let index = array2.length - 1; index >= 0; index--) { + const element = array2[index]; + if (callback(element, index, array2)) { + return element; } - throw lastException; } - if (typeof target === "object" && target !== null) { - const keys = Object.getOwnPropertyNames(target); - let i = -1; - while (++i < keys.length) { - const key = keys[i]; - if (isArrayIndex(key)) { - throw new ERR_INVALID_PACKAGE_CONFIG2( - fileURLToPath5(packageJsonUrl), - base, - '"exports" cannot contain numeric property keys.' +}; +var array_find_last_default = arrayFindLast; + +// src/main/parser-and-printer.js +function getParserPluginByParserName(plugins, parserName) { + if (!parserName) { + throw new Error("parserName is required."); + } + const plugin = array_find_last_default( + /* isOptionalObject*/ + false, + plugins, + (plugin2) => plugin2.parsers && Object.prototype.hasOwnProperty.call(plugin2.parsers, parserName) + ); + if (plugin) { + return plugin; + } + let message = `Couldn't resolve parser "${parserName}".`; + if (false) { + message += " Plugins must be explicitly added to the standalone bundle."; + } + throw new ConfigError(message); +} +function getPrinterPluginByAstFormat(plugins, astFormat) { + if (!astFormat) { + throw new Error("astFormat is required."); + } + const plugin = array_find_last_default( + /* isOptionalObject*/ + false, + plugins, + (plugin2) => plugin2.printers && Object.prototype.hasOwnProperty.call(plugin2.printers, astFormat) + ); + if (plugin) { + return plugin; + } + let message = `Couldn't find plugin for AST format "${astFormat}".`; + if (false) { + message += " Plugins must be explicitly added to the standalone bundle."; + } + throw new ConfigError(message); +} +function resolveParser({ + plugins, + parser +}) { + const plugin = getParserPluginByParserName(plugins, parser); + return initParser(plugin, parser); +} +function initParser(plugin, parserName) { + const parserOrParserInitFunction = plugin.parsers[parserName]; + return typeof parserOrParserInitFunction === "function" ? parserOrParserInitFunction() : parserOrParserInitFunction; +} +function initPrinter(plugin, astFormat) { + const printerOrPrinterInitFunction = plugin.printers[astFormat]; + return typeof printerOrPrinterInitFunction === "function" ? printerOrPrinterInitFunction() : printerOrPrinterInitFunction; +} + +// src/main/normalize-format-options.js +var formatOptionsHiddenDefaults = { + astFormat: "estree", + printer: {}, + originalText: void 0, + locStart: null, + locEnd: null +}; +async function normalizeFormatOptions(options8, opts = {}) { + var _a; + const rawOptions = { ...options8 }; + if (!rawOptions.parser) { + if (!rawOptions.filepath) { + throw new UndefinedParserError( + "No parser and no file path given, couldn't infer a parser." + ); + } else { + rawOptions.parser = infer_parser_default(rawOptions, { + physicalFile: rawOptions.filepath + }); + if (!rawOptions.parser) { + throw new UndefinedParserError( + `No parser could be inferred for file "${rawOptions.filepath}".` ); } } - i = -1; - while (++i < keys.length) { - const key = keys[i]; - if (key === "default" || conditions && conditions.has(key)) { - const conditionalTarget = ( - /** @type {unknown} */ - target[key] - ); - const resolveResult = resolvePackageTarget( - packageJsonUrl, - conditionalTarget, - subpath, - packageSubpath, - base, - pattern, - internal, - isPathMap, - conditions - ); - if (resolveResult === void 0) - continue; - return resolveResult; - } + } + const supportOptions = getSupportInfo({ + plugins: options8.plugins, + showDeprecated: true + }).options; + const defaults = { + ...formatOptionsHiddenDefaults, + ...Object.fromEntries( + supportOptions.filter((optionInfo) => optionInfo.default !== void 0).map((option) => [option.name, option.default]) + ) + }; + const parserPlugin = getParserPluginByParserName( + rawOptions.plugins, + rawOptions.parser + ); + const parser = await initParser(parserPlugin, rawOptions.parser); + rawOptions.astFormat = parser.astFormat; + rawOptions.locEnd = parser.locEnd; + rawOptions.locStart = parser.locStart; + const printerPlugin = ((_a = parserPlugin.printers) == null ? void 0 : _a[parser.astFormat]) ? parserPlugin : getPrinterPluginByAstFormat(rawOptions.plugins, parser.astFormat); + const printer = await initPrinter(printerPlugin, parser.astFormat); + rawOptions.printer = printer; + const pluginDefaults = printerPlugin.defaultOptions ? Object.fromEntries( + Object.entries(printerPlugin.defaultOptions).filter( + ([, value]) => value !== void 0 + ) + ) : {}; + const mixedDefaults = { ...defaults, ...pluginDefaults }; + for (const [k, value] of Object.entries(mixedDefaults)) { + if (rawOptions[k] === null || rawOptions[k] === void 0) { + rawOptions[k] = value; } - return null; } - if (target === null) { - return null; + if (rawOptions.parser === "json") { + rawOptions.trailingComma = "none"; } - throw invalidPackageTarget( - packageSubpath, - target, - packageJsonUrl, - internal, - base - ); + return normalize_options_default(rawOptions, supportOptions, { + passThrough: Object.keys(formatOptionsHiddenDefaults), + ...opts + }); } -function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { - if (typeof exports === "string" || Array.isArray(exports)) - return true; - if (typeof exports !== "object" || exports === null) - return false; - const keys = Object.getOwnPropertyNames(exports); - let isConditionalSugar = false; - let i = 0; - let j = -1; - while (++j < keys.length) { - const key = keys[j]; - const curIsConditionalSugar = key === "" || key[0] !== "."; - if (i++ === 0) { - isConditionalSugar = curIsConditionalSugar; - } else if (isConditionalSugar !== curIsConditionalSugar) { - throw new ERR_INVALID_PACKAGE_CONFIG2( - fileURLToPath5(packageJsonUrl), - base, - `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.` - ); - } +var normalize_format_options_default = normalizeFormatOptions; + +// src/main/parse.js +var import_code_frame2 = __toESM(require_lib3(), 1); +async function parse4(originalText, options8) { + const parser = await resolveParser(options8); + const text = parser.preprocess ? parser.preprocess(originalText, options8) : originalText; + options8.originalText = text; + let ast; + try { + ast = await parser.parse( + text, + options8, + // TODO: remove the third argument in v4 + // The duplicated argument is passed as intended, see #10156 + options8 + ); + } catch (error) { + handleParseError(error, originalText); } - return isConditionalSugar; + return { text, ast }; } -function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { - if (process3.noDeprecation) { - return; +function handleParseError(error, text) { + const { loc } = error; + if (loc) { + const codeFrame = (0, import_code_frame2.codeFrameColumns)(text, loc, { highlightCode: true }); + error.message += "\n" + codeFrame; + error.codeFrame = codeFrame; + throw error; } - const pjsonPath = fileURLToPath5(pjsonUrl); - if (emittedPackageWarnings.has(pjsonPath + "|" + match)) - return; - emittedPackageWarnings.add(pjsonPath + "|" + match); - process3.emitWarning( - `Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath5(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, - "DeprecationWarning", - "DEP0155" - ); + throw error; } -function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) { - let exports = packageConfig.exports; - if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) { - exports = { ".": exports }; +var parse_default = parse4; + +// src/main/multiparser.js +async function printEmbeddedLanguages(path13, genericPrint, options8, printAstToDoc2, embeds) { + const { + embeddedLanguageFormatting, + printer: { + embed, + hasPrettierIgnore = () => false, + getVisitorKeys: printerGetVisitorKeys + } + } = options8; + if (!embed || embeddedLanguageFormatting !== "auto") { + return; } - if (own2.call(exports, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) { - const target = exports[packageSubpath]; - const resolveResult = resolvePackageTarget( - packageJsonUrl, - target, - "", - packageSubpath, - base, - false, - false, - false, - conditions + if (embed.length > 2) { + throw new Error( + "printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed" ); - if (resolveResult === null || resolveResult === void 0) { - throw exportsNotFound(packageSubpath, packageJsonUrl, base); - } - return resolveResult; } - let bestMatch = ""; - let bestMatchSubpath = ""; - const keys = Object.getOwnPropertyNames(exports); - let i = -1; - while (++i < keys.length) { - const key = keys[i]; - const patternIndex = key.indexOf("*"); - if (patternIndex !== -1 && packageSubpath.startsWith(key.slice(0, patternIndex))) { - if (packageSubpath.endsWith("/")) { - emitTrailingSlashPatternDeprecation( - packageSubpath, - packageJsonUrl, - base - ); + const getVisitorKeys = create_get_visitor_keys_function_default( + embed.getVisitorKeys ?? printerGetVisitorKeys + ); + const embedCallResults = []; + recurse(); + const originalPathStack = path13.stack; + for (const { print, node, pathStack } of embedCallResults) { + try { + path13.stack = pathStack; + const doc2 = await print(textToDocForEmbed, genericPrint, path13, options8); + if (doc2) { + embeds.set(node, doc2); } - const patternTrailer = key.slice(patternIndex + 1); - if (packageSubpath.length >= key.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf("*") === patternIndex) { - bestMatch = key; - bestMatchSubpath = packageSubpath.slice( - patternIndex, - packageSubpath.length - patternTrailer.length - ); + } catch (error) { + if (process.env.PRETTIER_DEBUG) { + throw error; } } } - if (bestMatch) { - const target = ( - /** @type {unknown} */ - exports[bestMatch] - ); - const resolveResult = resolvePackageTarget( - packageJsonUrl, - target, - bestMatchSubpath, - bestMatch, - base, - true, - false, - packageSubpath.endsWith("/"), - conditions - ); - if (resolveResult === null || resolveResult === void 0) { - throw exportsNotFound(packageSubpath, packageJsonUrl, base); - } - return resolveResult; - } - throw exportsNotFound(packageSubpath, packageJsonUrl, base); -} -function patternKeyCompare(a, b) { - const aPatternIndex = a.indexOf("*"); - const bPatternIndex = b.indexOf("*"); - const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; - const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; - if (baseLengthA > baseLengthB) - return -1; - if (baseLengthB > baseLengthA) - return 1; - if (aPatternIndex === -1) - return 1; - if (bPatternIndex === -1) - return -1; - if (a.length > b.length) - return -1; - if (b.length > a.length) - return 1; - return 0; -} -function packageImportsResolve(name, base, conditions) { - if (name === "#" || name.startsWith("#/") || name.endsWith("/")) { - const reason = "is not a valid internal imports specifier name"; - throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath5(base)); + path13.stack = originalPathStack; + function textToDocForEmbed(text, partialNextOptions) { + return textToDoc(text, partialNextOptions, options8, printAstToDoc2); } - let packageJsonUrl; - const packageConfig = getPackageScopeConfig(base); - if (packageConfig.exists) { - packageJsonUrl = pathToFileURL2(packageConfig.pjsonPath); - const imports = packageConfig.imports; - if (imports) { - if (own2.call(imports, name) && !name.includes("*")) { - const resolveResult = resolvePackageTarget( - packageJsonUrl, - imports[name], - "", - name, - base, - false, - true, - false, - conditions - ); - if (resolveResult !== null && resolveResult !== void 0) { - return resolveResult; - } + function recurse() { + const { node } = path13; + if (node === null || typeof node !== "object" || hasPrettierIgnore(path13)) { + return; + } + for (const key2 of getVisitorKeys(node)) { + if (Array.isArray(node[key2])) { + path13.each(recurse, key2); } else { - let bestMatch = ""; - let bestMatchSubpath = ""; - const keys = Object.getOwnPropertyNames(imports); - let i = -1; - while (++i < keys.length) { - const key = keys[i]; - const patternIndex = key.indexOf("*"); - if (patternIndex !== -1 && name.startsWith(key.slice(0, -1))) { - const patternTrailer = key.slice(patternIndex + 1); - if (name.length >= key.length && name.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf("*") === patternIndex) { - bestMatch = key; - bestMatchSubpath = name.slice( - patternIndex, - name.length - patternTrailer.length - ); - } - } - } - if (bestMatch) { - const target = imports[bestMatch]; - const resolveResult = resolvePackageTarget( - packageJsonUrl, - target, - bestMatchSubpath, - bestMatch, - base, - true, - true, - false, - conditions - ); - if (resolveResult !== null && resolveResult !== void 0) { - return resolveResult; - } - } + path13.call(recurse, key2); } } + const result = embed(path13, options8); + if (!result) { + return; + } + if (typeof result === "function") { + embedCallResults.push({ + print: result, + node, + pathStack: [...path13.stack] + }); + return; + } + if (false) { + throw new Error( + "`embed` should return an async function instead of Promise." + ); + } + embeds.set(node, result); } - throw importNotDefined(name, packageJsonUrl, base); } -function parsePackageName(specifier, base) { - let separatorIndex = specifier.indexOf("/"); - let validPackageName = true; - let isScoped = false; - if (specifier[0] === "@") { - isScoped = true; - if (separatorIndex === -1 || specifier.length === 0) { - validPackageName = false; - } else { - separatorIndex = specifier.indexOf("/", separatorIndex + 1); +async function textToDoc(text, partialNextOptions, parentOptions, printAstToDoc2) { + const options8 = await normalize_format_options_default( + { + ...parentOptions, + ...partialNextOptions, + parentParser: parentOptions.parser, + originalText: text + }, + { passThrough: true } + ); + const { ast } = await parse_default(text, options8); + const doc2 = await printAstToDoc2(ast, options8); + return stripTrailingHardline(doc2); +} + +// src/main/print-ignored.js +function printIgnored(path13, options8) { + const { + originalText, + [Symbol.for("comments")]: comments, + locStart, + locEnd, + [Symbol.for("printedComments")]: printedComments + } = options8; + const { node } = path13; + const start = locStart(node); + const end = locEnd(node); + for (const comment of comments) { + if (locStart(comment) >= start && locEnd(comment) <= end) { + printedComments.add(comment); } } - const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex); - if (invalidPackageNameRegEx.exec(packageName) !== null) { - validPackageName = false; + return originalText.slice(start, end); +} +var print_ignored_default = printIgnored; + +// src/main/ast-to-doc.js +async function printAstToDoc(ast, options8) { + ({ ast } = await prepareToPrint(ast, options8)); + const cache3 = /* @__PURE__ */ new Map(); + const path13 = new ast_path_default(ast); + const ensurePrintingNode = create_print_pre_check_function_default(options8); + const embeds = /* @__PURE__ */ new Map(); + await printEmbeddedLanguages(path13, mainPrint, options8, printAstToDoc, embeds); + const doc2 = await callPluginPrintFunction( + path13, + options8, + mainPrint, + void 0, + embeds + ); + ensureAllCommentsPrinted(options8); + return doc2; + function mainPrint(selector, args) { + if (selector === void 0 || selector === path13) { + return mainPrintInternal(args); + } + if (Array.isArray(selector)) { + return path13.call(() => mainPrintInternal(args), ...selector); + } + return path13.call(() => mainPrintInternal(args), selector); } - if (!validPackageName) { - throw new ERR_INVALID_MODULE_SPECIFIER( - specifier, - "is not a valid package name", - fileURLToPath5(base) - ); + function mainPrintInternal(args) { + ensurePrintingNode(path13); + const value = path13.node; + if (value === void 0 || value === null) { + return ""; + } + const shouldCache = value && typeof value === "object" && args === void 0; + if (shouldCache && cache3.has(value)) { + return cache3.get(value); + } + const doc3 = callPluginPrintFunction(path13, options8, mainPrint, args, embeds); + if (shouldCache) { + cache3.set(value, doc3); + } + return doc3; } - const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)); - return { packageName, packageSubpath, isScoped }; } -function packageResolve(specifier, base, conditions) { - if (builtinModules.includes(specifier)) { - return new URL3("node:" + specifier); +function callPluginPrintFunction(path13, options8, printPath, args, embeds) { + var _a; + const { node } = path13; + const { printer } = options8; + let doc2; + if ((_a = printer.hasPrettierIgnore) == null ? void 0 : _a.call(printer, path13)) { + doc2 = print_ignored_default(path13, options8); + } else if (embeds.has(node)) { + doc2 = embeds.get(node); + } else { + doc2 = printer.print(path13, options8, printPath, args); } - const { packageName, packageSubpath, isScoped } = parsePackageName( - specifier, - base + if (node === options8.cursorNode) { + doc2 = inheritLabel(doc2, (doc3) => [cursor, doc3, cursor]); + } + if (printer.printComment && (!printer.willPrintOwnComments || !printer.willPrintOwnComments(path13, options8))) { + doc2 = printComments(path13, doc2, options8); + } + return doc2; +} +async function prepareToPrint(ast, options8) { + const comments = ast.comments ?? []; + options8[Symbol.for("comments")] = comments; + options8[Symbol.for("tokens")] = ast.tokens ?? []; + options8[Symbol.for("printedComments")] = /* @__PURE__ */ new Set(); + attachComments(ast, options8); + const { + printer: { preprocess } + } = options8; + ast = preprocess ? await preprocess(ast, options8) : ast; + return { ast, comments }; +} + +// src/main/get-cursor-node.js +function getCursorNode(ast, options8) { + const { cursorOffset, locStart, locEnd } = options8; + const getVisitorKeys = create_get_visitor_keys_function_default( + options8.printer.getVisitorKeys ); - const packageConfig = getPackageScopeConfig(base); - if (packageConfig.exists) { - const packageJsonUrl2 = pathToFileURL2(packageConfig.pjsonPath); - if (packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) { - return packageExportsResolve( - packageJsonUrl2, - packageSubpath, - packageConfig, - base, - conditions - ); + const nodeContainsCursor = (node) => locStart(node) <= cursorOffset && locEnd(node) >= cursorOffset; + let cursorNode = ast; + for (const node of getDescendants(ast, { + getVisitorKeys, + filter: nodeContainsCursor + })) { + cursorNode = node; + } + return cursorNode; +} +var get_cursor_node_default = getCursorNode; + +// src/main/massage-ast.js +function massageAst(ast, options8) { + const { + printer: { + massageAstNode: cleanFunction, + getVisitorKeys: printerGetVisitorKeys } + } = options8; + if (!cleanFunction) { + return ast; } - let packageJsonUrl = new URL3( - "./node_modules/" + packageName + "/package.json", - base - ); - let packageJsonPath = fileURLToPath5(packageJsonUrl); - let lastPath; - do { - const stat = tryStatSync(packageJsonPath.slice(0, -13)); - if (!stat.isDirectory()) { - lastPath = packageJsonPath; - packageJsonUrl = new URL3( - (isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", - packageJsonUrl - ); - packageJsonPath = fileURLToPath5(packageJsonUrl); - continue; + const getVisitorKeys = create_get_visitor_keys_function_default(printerGetVisitorKeys); + const ignoredProperties = cleanFunction.ignoredProperties ?? /* @__PURE__ */ new Set(); + return recurse(ast); + function recurse(node, parent) { + if (!(node !== null && typeof node === "object")) { + return node; } - const packageConfig2 = package_json_reader_default.read(packageJsonPath, { - base, - specifier - }); - if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) { - return packageExportsResolve( - packageJsonUrl, - packageSubpath, - packageConfig2, - base, - conditions - ); + if (Array.isArray(node)) { + return node.map((child) => recurse(child, parent)).filter(Boolean); + } + const newObj = {}; + const childrenKeys = new Set(getVisitorKeys(node)); + for (const key2 in node) { + if (!Object.prototype.hasOwnProperty.call(node, key2) || ignoredProperties.has(key2)) { + continue; + } + if (childrenKeys.has(key2)) { + newObj[key2] = recurse(node[key2], node); + } else { + newObj[key2] = node[key2]; + } } - if (packageSubpath === ".") { - return legacyMainResolve(packageJsonUrl, packageConfig2, base); + const result = cleanFunction(node, newObj, parent); + if (result === null) { + return; } - return new URL3(packageSubpath, packageJsonUrl); - } while (packageJsonPath.length !== lastPath.length); - throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath5(base), false); + return result ?? newObj; + } } -function isRelativeSpecifier(specifier) { - if (specifier[0] === ".") { - if (specifier.length === 1 || specifier[1] === "/") - return true; - if (specifier[1] === "." && (specifier.length === 2 || specifier[2] === "/")) { - return true; +var massage_ast_default = massageAst; + +// src/main/range-util.js +import assert5 from "assert"; +var isJsonParser = ({ parser }) => parser === "json" || parser === "json5" || parser === "jsonc" || parser === "json-stringify"; +function findCommonAncestor(startNodeAndParents, endNodeAndParents) { + const startNodeAndAncestors = [ + startNodeAndParents.node, + ...startNodeAndParents.parentNodes + ]; + const endNodeAndAncestors = /* @__PURE__ */ new Set([ + endNodeAndParents.node, + ...endNodeAndParents.parentNodes + ]); + return startNodeAndAncestors.find( + (node) => jsonSourceElements.has(node.type) && endNodeAndAncestors.has(node) + ); +} +function dropRootParents(parents) { + let lastParentIndex = parents.length - 1; + for (; ; ) { + const parent = parents[lastParentIndex]; + if ((parent == null ? void 0 : parent.type) === "Program" || (parent == null ? void 0 : parent.type) === "File") { + lastParentIndex--; + } else { + break; } } - return false; -} -function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { - if (specifier === "") - return false; - if (specifier[0] === "/") - return true; - return isRelativeSpecifier(specifier); + return parents.slice(0, lastParentIndex + 1); } -function moduleResolve(specifier, base, conditions, preserveSymlinks) { - const protocol = base.protocol; - const isRemote = protocol === "http:" || protocol === "https:"; - let resolved; - if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { - resolved = new URL3(specifier, base); - } else if (!isRemote && specifier[0] === "#") { - resolved = packageImportsResolve(specifier, base, conditions); - } else { - try { - resolved = new URL3(specifier); - } catch { - if (!isRemote) { - resolved = packageResolve(specifier, base, conditions); - } +function findSiblingAncestors(startNodeAndParents, endNodeAndParents, { locStart, locEnd }) { + let resultStartNode = startNodeAndParents.node; + let resultEndNode = endNodeAndParents.node; + if (resultStartNode === resultEndNode) { + return { + startNode: resultStartNode, + endNode: resultEndNode + }; + } + const startNodeStart = locStart(startNodeAndParents.node); + for (const endParent of dropRootParents(endNodeAndParents.parentNodes)) { + if (locStart(endParent) >= startNodeStart) { + resultEndNode = endParent; + } else { + break; } } - assert5(resolved !== void 0, "expected to be defined"); - if (resolved.protocol !== "file:") { - return resolved; + const endNodeEnd = locEnd(endNodeAndParents.node); + for (const startParent of dropRootParents(startNodeAndParents.parentNodes)) { + if (locEnd(startParent) <= endNodeEnd) { + resultStartNode = startParent; + } else { + break; + } + if (resultStartNode === resultEndNode) { + break; + } } - return finalizeResolution(resolved, base, preserveSymlinks); + return { + startNode: resultStartNode, + endNode: resultEndNode + }; } -function checkIfDisallowedImport(specifier, parsed, parsedParentURL) { - if (parsedParentURL) { - const parentProtocol = parsedParentURL.protocol; - if (parentProtocol === "http:" || parentProtocol === "https:") { - if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { - const parsedProtocol = parsed == null ? void 0 : parsed.protocol; - if (parsedProtocol && parsedProtocol !== "https:" && parsedProtocol !== "http:") { - throw new ERR_NETWORK_IMPORT_DISALLOWED( - specifier, - parsedParentURL, - "remote imports cannot import from a local location." - ); - } - return { url: (parsed == null ? void 0 : parsed.href) || "" }; - } - if (builtinModules.includes(specifier)) { - throw new ERR_NETWORK_IMPORT_DISALLOWED( - specifier, - parsedParentURL, - "remote imports cannot import from a local location." - ); - } - throw new ERR_NETWORK_IMPORT_DISALLOWED( - specifier, - parsedParentURL, - "only relative and absolute specifiers are supported." - ); +function findNodeAtOffset(node, offset, options8, predicate, parentNodes = [], type2) { + const { locStart, locEnd } = options8; + const start = locStart(node); + const end = locEnd(node); + if (offset > end || offset < start || type2 === "rangeEnd" && offset === start || type2 === "rangeStart" && offset === end) { + return; + } + for (const childNode of getSortedChildNodes(node, options8)) { + const childResult = findNodeAtOffset( + childNode, + offset, + options8, + predicate, + [node, ...parentNodes], + type2 + ); + if (childResult) { + return childResult; } } + if (!predicate || predicate(node, parentNodes[0])) { + return { + node, + parentNodes + }; + } } -function isURL(self) { - return Boolean( - self && typeof self === "object" && "href" in self && typeof self.href === "string" && "protocol" in self && typeof self.protocol === "string" && self.href && self.protocol - ); +function isJsSourceElement(type2, parentType) { + return parentType !== "DeclareExportDeclaration" && type2 !== "TypeParameterDeclaration" && (type2 === "Directive" || type2 === "TypeAlias" || type2 === "TSExportAssignment" || type2.startsWith("Declare") || type2.startsWith("TSDeclare") || type2.endsWith("Statement") || type2.endsWith("Declaration")); } -function throwIfInvalidParentURL(parentURL) { - if (parentURL === void 0) { - return; +var jsonSourceElements = /* @__PURE__ */ new Set([ + "JsonRoot", + "ObjectExpression", + "ArrayExpression", + "StringLiteral", + "NumericLiteral", + "BooleanLiteral", + "NullLiteral", + "UnaryExpression", + "TemplateLiteral" +]); +var graphqlSourceElements = /* @__PURE__ */ new Set([ + "OperationDefinition", + "FragmentDefinition", + "VariableDefinition", + "TypeExtensionDefinition", + "ObjectTypeDefinition", + "FieldDefinition", + "DirectiveDefinition", + "EnumTypeDefinition", + "EnumValueDefinition", + "InputValueDefinition", + "InputObjectTypeDefinition", + "SchemaDefinition", + "OperationTypeDefinition", + "InterfaceTypeDefinition", + "UnionTypeDefinition", + "ScalarTypeDefinition" +]); +function isSourceElement(opts, node, parentNode) { + if (!node) { + return false; } - if (typeof parentURL !== "string" && !isURL(parentURL)) { - throw new codes.ERR_INVALID_ARG_TYPE( - "parentURL", - ["string", "URL"], - parentURL - ); + switch (opts.parser) { + case "flow": + case "babel": + case "babel-flow": + case "babel-ts": + case "typescript": + case "acorn": + case "espree": + case "meriyah": + case "__babel_estree": + return isJsSourceElement(node.type, parentNode == null ? void 0 : parentNode.type); + case "json": + case "json5": + case "jsonc": + case "json-stringify": + return jsonSourceElements.has(node.type); + case "graphql": + return graphqlSourceElements.has(node.kind); + case "vue": + return node.tag !== "root"; } + return false; } -function defaultResolve(specifier, context = {}) { - const { parentURL } = context; - assert5(parentURL !== void 0, "expected `parentURL` to be defined"); - throwIfInvalidParentURL(parentURL); - let parsedParentURL; - if (parentURL) { - try { - parsedParentURL = new URL3(parentURL); - } catch { +function calculateRange(text, opts, ast) { + let { rangeStart: start, rangeEnd: end, locStart, locEnd } = opts; + assert5.ok(end > start); + const firstNonWhitespaceCharacterIndex = text.slice(start, end).search(/\S/); + const isAllWhitespace = firstNonWhitespaceCharacterIndex === -1; + if (!isAllWhitespace) { + start += firstNonWhitespaceCharacterIndex; + for (; end > start; --end) { + if (/\S/.test(text[end - 1])) { + break; + } } } - let parsed; - try { - parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier) ? new URL3(specifier, parsedParentURL) : new URL3(specifier); - const protocol = parsed.protocol; - if (protocol === "data:") { - return { url: parsed.href, format: null }; - } - } catch { + const startNodeAndParents = findNodeAtOffset( + ast, + start, + opts, + (node, parentNode) => isSourceElement(opts, node, parentNode), + [], + "rangeStart" + ); + const endNodeAndParents = ( + // No need find Node at `end`, it will be the same as `startNodeAndParents` + isAllWhitespace ? startNodeAndParents : findNodeAtOffset( + ast, + end, + opts, + (node) => isSourceElement(opts, node), + [], + "rangeEnd" + ) + ); + if (!startNodeAndParents || !endNodeAndParents) { + return { + rangeStart: 0, + rangeEnd: 0 + }; + } + let startNode; + let endNode; + if (isJsonParser(opts)) { + const commonAncestor = findCommonAncestor( + startNodeAndParents, + endNodeAndParents + ); + startNode = commonAncestor; + endNode = commonAncestor; + } else { + ({ startNode, endNode } = findSiblingAncestors( + startNodeAndParents, + endNodeAndParents, + opts + )); } - const maybeReturn = checkIfDisallowedImport( - specifier, - parsed, - parsedParentURL - ); - if (maybeReturn) - return maybeReturn; - if (parsed && parsed.protocol === "node:") - return { url: specifier }; - const conditions = getConditionsSet(context.conditions); - const url2 = moduleResolve(specifier, new URL3(parentURL), conditions, false); return { - // Do NOT cast `url` to a string: that will work even when there are real - // problems, silencing them - url: url2.href, - format: defaultGetFormatWithoutErrors(url2, { parentURL }) + rangeStart: Math.min(locStart(startNode), locStart(endNode)), + rangeEnd: Math.max(locEnd(startNode), locEnd(endNode)) }; } -// node_modules/import-meta-resolve/index.js -function resolve(specifier, parent) { - if (!parent) { - throw new Error( - "Please pass `parent`: `import-meta-resolve` cannot ponyfill that" - ); +// src/main/core.js +var BOM = "\uFEFF"; +var CURSOR = Symbol("cursor"); +async function coreFormat(originalText, opts, addAlignmentSize = 0) { + if (!originalText || originalText.trim().length === 0) { + return { + formatted: "", + cursorOffset: -1, + comments: [] + }; } - try { - return defaultResolve(specifier, { parentURL: parent }).url; - } catch (error) { - const exception = ( - /** @type {ErrnoException} */ - error - ); - if ((exception.code === "ERR_UNSUPPORTED_DIR_IMPORT" || exception.code === "ERR_MODULE_NOT_FOUND") && typeof exception.url === "string") { - return exception.url; - } - throw error; + const { + ast, + text + } = await parse_default(originalText, opts); + if (opts.cursorOffset >= 0) { + opts.cursorNode = get_cursor_node_default(ast, opts); } -} - -// src/utils/import-from-file.js -function importFromFile(specifier, parent) { - const url2 = resolve(specifier, pathToFileURL3(parent).href); - return import(url2); -} -var import_from_file_default = importFromFile; - -// src/config/load-external-config.js -var requireErrorCodesShouldBeIgnored = /* @__PURE__ */ new Set([ - "MODULE_NOT_FOUND", - "ERR_REQUIRE_ESM", - "ERR_PACKAGE_PATH_NOT_EXPORTED" -]); -async function loadExternalConfig(config, filepath) { - try { - return require_from_file_default(config, filepath); - } catch (error) { - if (!requireErrorCodesShouldBeIgnored.has(error == null ? void 0 : error.code)) { - throw error; - } + let doc2 = await printAstToDoc(ast, opts, addAlignmentSize); + if (addAlignmentSize > 0) { + doc2 = addAlignmentToDoc([hardline, doc2], addAlignmentSize, opts.tabWidth); } - const module = await import_from_file_default(config, filepath); - return module.default; -} -var load_external_config_default = loadExternalConfig; - -// src/config/get-prettier-config-explorer.js -var { lilconfig } = mockable; -var searchPlaces = [ - "package.json", - ".prettierrc", - ".prettierrc.json", - ".prettierrc.yaml", - ".prettierrc.yml", - ".prettierrc.json5", - ".prettierrc.js", - ".prettierrc.mjs", - ".prettierrc.cjs", - "prettier.config.js", - "prettier.config.mjs", - "prettier.config.cjs", - ".prettierrc.toml" -]; -async function loadJs(filepath) { - const module = await import(pathToFileURL4(filepath).href); - return module.default; -} -function loadYaml(filepath, content) { - try { - return import_js_yaml.default.load(content); - } catch (error) { - error.message = `YAML Error in ${filepath}: -${error.message}`; - throw error; + const result = printDocToString(doc2, opts); + if (addAlignmentSize > 0) { + const trimmed = result.formatted.trim(); + if (result.cursorNodeStart !== void 0) { + result.cursorNodeStart -= result.formatted.indexOf(trimmed); + } + result.formatted = trimmed + convertEndOfLineToChars(opts.endOfLine); } -} -var loaders = { - async ".toml"(filePath, content) { - try { - return await (0, import_parse_async.default)(content); - } catch (error) { - error.message = `TOML Error in ${filePath}: -${error.message}`; - throw error; + const comments = opts[Symbol.for("comments")]; + if (opts.cursorOffset >= 0) { + let oldCursorNodeStart; + let oldCursorNodeText; + let cursorOffsetRelativeToOldCursorNode; + let newCursorNodeStart; + let newCursorNodeText; + if (opts.cursorNode && result.cursorNodeText) { + oldCursorNodeStart = opts.locStart(opts.cursorNode); + oldCursorNodeText = text.slice(oldCursorNodeStart, opts.locEnd(opts.cursorNode)); + cursorOffsetRelativeToOldCursorNode = opts.cursorOffset - oldCursorNodeStart; + newCursorNodeStart = result.cursorNodeStart; + newCursorNodeText = result.cursorNodeText; + } else { + oldCursorNodeStart = 0; + oldCursorNodeText = text; + cursorOffsetRelativeToOldCursorNode = opts.cursorOffset; + newCursorNodeStart = 0; + newCursorNodeText = result.formatted; } - }, - ".json5"(filePath, content) { - try { - return (0, import_parse3.default)(content); - } catch (error) { - error.message = `JSON5 Error in ${filePath}: -${error.message}`; - throw error; + if (oldCursorNodeText === newCursorNodeText) { + return { + formatted: result.formatted, + cursorOffset: newCursorNodeStart + cursorOffsetRelativeToOldCursorNode, + comments + }; } - }, - ".json"(filePath, content) { - try { - return parseJson(content); - } catch (error) { - error.message = `JSON Error in ${filePath}: -${error.message}`; - throw error; + const oldCursorNodeCharArray = oldCursorNodeText.split(""); + oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorNode, 0, CURSOR); + const newCursorNodeCharArray = newCursorNodeText.split(""); + const cursorNodeDiff = (0, import_diff.diffArrays)(oldCursorNodeCharArray, newCursorNodeCharArray); + let cursorOffset = newCursorNodeStart; + for (const entry of cursorNodeDiff) { + if (entry.removed) { + if (entry.value.includes(CURSOR)) { + break; + } + } else { + cursorOffset += entry.count; + } } - }, - ".js": loadJs, - ".mjs": loadJs, - ".yaml": loadYaml, - ".yml": loadYaml, - noExt: loadYaml -}; -async function transform(result) { - if (!(result == null ? void 0 : result.config)) { - return result; - } - let { config, filepath } = result; - if (typeof config === "string") { - config = await load_external_config_default(config, filepath); - result.config = config; - } - if (typeof config !== "object") { - throw new TypeError( - `Config is only allowed to be an object, but received ${typeof config} in "${filepath}"` - ); - } - delete config.$schema; - return result; -} -function getExplorer() { - return lilconfig("prettier", { searchPlaces, loaders, transform }); -} -var get_prettier_config_explorer_default = getExplorer; - -// src/config/resolve-config.js -var getPrettierConfigExplorer = mem(get_prettier_config_explorer_default, { - cacheKey: ([options8]) => options8.cache -}); -var memoizedLoadEditorConfig = mem(resolve_editorconfig_default); -function clearCache() { - memClear(getPrettierConfigExplorer); - memClear(memoizedLoadEditorConfig); -} -function loadEditorConfig2(filePath, options8) { - if (!filePath || !options8.editorconfig) { - return; + return { + formatted: result.formatted, + cursorOffset, + comments + }; } - return (options8.useCache ? memoizedLoadEditorConfig : resolve_editorconfig_default)(filePath); -} -function loadPrettierConfig(filePath, options8) { - const { useCache, config: configPath } = options8; - const { load, search } = getPrettierConfigExplorer({ - cache: Boolean(useCache) - }); - return configPath ? load(configPath) : search(filePath ? path5.resolve(filePath) : void 0); + return { + formatted: result.formatted, + cursorOffset: -1, + comments + }; } -async function resolveConfig(fileUrlOrPath, options8) { - options8 = { useCache: true, ...options8 }; - const filePath = toPath(fileUrlOrPath); - const [result, editorConfigured] = await Promise.all([ - loadPrettierConfig(filePath, options8), - loadEditorConfig2(filePath, options8) - ]); - if (!result && !editorConfigured) { - return null; +async function formatRange(originalText, opts) { + const { + ast, + text + } = await parse_default(originalText, opts); + const { + rangeStart, + rangeEnd + } = calculateRange(text, opts, ast); + const rangeString = text.slice(rangeStart, rangeEnd); + const rangeStart2 = Math.min(rangeStart, text.lastIndexOf("\n", rangeStart) + 1); + const indentString = text.slice(rangeStart2, rangeStart).match(/^\s*/)[0]; + const alignmentSize = get_alignment_size_default(indentString, opts.tabWidth); + const rangeResult = await coreFormat(rangeString, { + ...opts, + rangeStart: 0, + rangeEnd: Number.POSITIVE_INFINITY, + // Track the cursor offset only if it's within our range + cursorOffset: opts.cursorOffset > rangeStart && opts.cursorOffset <= rangeEnd ? opts.cursorOffset - rangeStart : -1, + // Always use `lf` to format, we'll replace it later + endOfLine: "lf" + }, alignmentSize); + const rangeTrimmed = rangeResult.formatted.trimEnd(); + let { + cursorOffset + } = opts; + if (cursorOffset > rangeEnd) { + cursorOffset += rangeTrimmed.length - rangeString.length; + } else if (rangeResult.cursorOffset >= 0) { + cursorOffset = rangeResult.cursorOffset + rangeStart; } - const merged = { - ...editorConfigured, - ...mergeOverrides(result, filePath) - }; - if (Array.isArray(merged.plugins)) { - merged.plugins = merged.plugins.map( - (value) => typeof value === "string" && value.startsWith(".") ? path5.resolve(path5.dirname(result.filepath), value) : value + let formatted = text.slice(0, rangeStart) + rangeTrimmed + text.slice(rangeEnd); + if (opts.endOfLine !== "lf") { + const eol = convertEndOfLineToChars(opts.endOfLine); + if (cursorOffset >= 0 && eol === "\r\n") { + cursorOffset += countEndOfLineChars(formatted.slice(0, cursorOffset), "\n"); + } + formatted = string_replace_all_default( + /* isOptionalObject*/ + false, + formatted, + "\n", + eol ); } - return merged; -} -async function resolveConfigFile(fileUrlOrPath) { - const { search } = getPrettierConfigExplorer({ cache: false }); - const result = await search( - fileUrlOrPath ? path5.resolve(toPath(fileUrlOrPath)) : void 0 - ); - return (result == null ? void 0 : result.filepath) ?? null; + return { + formatted, + cursorOffset, + comments: rangeResult.comments + }; } -function mergeOverrides(configResult, filePath) { - const { config, filepath: configPath } = configResult || {}; - const { overrides, ...options8 } = config || {}; - if (filePath && overrides) { - const relativeFilePath = path5.relative(path5.dirname(configPath), filePath); - for (const override of overrides) { - if (pathMatchesGlobs( - relativeFilePath, - override.files, - override.excludeFiles - )) { - Object.assign(options8, override.options); - } - } +function ensureIndexInText(text, index, defaultValue) { + if (typeof index !== "number" || Number.isNaN(index) || index < 0 || index > text.length) { + return defaultValue; } - return options8; + return index; } -function pathMatchesGlobs(filePath, patterns, excludedPatterns) { - const patternList = Array.isArray(patterns) ? patterns : [patterns]; - const [withSlashes, withoutSlashes] = partition_default( - patternList, - (pattern) => pattern.includes("/") - ); - return import_micromatch.default.isMatch(filePath, withoutSlashes, { - ignore: excludedPatterns, - basename: true, - dot: true - }) || import_micromatch.default.isMatch(filePath, withSlashes, { - ignore: excludedPatterns, - basename: false, - dot: true - }); +function normalizeIndexes(text, options8) { + let { + cursorOffset, + rangeStart, + rangeEnd + } = options8; + cursorOffset = ensureIndexInText(text, cursorOffset, -1); + rangeStart = ensureIndexInText(text, rangeStart, 0); + rangeEnd = ensureIndexInText(text, rangeEnd, text.length); + return { + ...options8, + cursorOffset, + rangeStart, + rangeEnd + }; } - -// src/utils/ignore.js -import path6 from "path"; -import url from "url"; -var import_ignore = __toESM(require_ignore(), 1); - -// src/utils/read-file.js -import fs4 from "fs/promises"; -async function readFile(file) { - if (isUrlString(file)) { - file = new URL(file); +function normalizeInputAndOptions(text, options8) { + let { + cursorOffset, + rangeStart, + rangeEnd, + endOfLine + } = normalizeIndexes(text, options8); + const hasBOM = text.charAt(0) === BOM; + if (hasBOM) { + text = text.slice(1); + cursorOffset--; + rangeStart--; + rangeEnd--; } - try { - return await fs4.readFile(file, "utf8"); - } catch (error) { - if (error.code === "ENOENT") { - return; - } - throw new Error(`Unable to read '${file}': ${error.message}`); + if (endOfLine === "auto") { + endOfLine = guessEndOfLine(text); + } + if (text.includes("\r")) { + const countCrlfBefore = (index) => countEndOfLineChars(text.slice(0, Math.max(index, 0)), "\r\n"); + cursorOffset -= countCrlfBefore(cursorOffset); + rangeStart -= countCrlfBefore(rangeStart); + rangeEnd -= countCrlfBefore(rangeEnd); + text = normalizeEndOfLine(text); } + return { + hasBOM, + text, + options: normalizeIndexes(text, { + ...options8, + cursorOffset, + rangeStart, + rangeEnd, + endOfLine + }) + }; } -var read_file_default = readFile; - -// src/utils/ignore.js -var createIgnore = import_ignore.default.default; -var slash = path6.sep === "\\" ? (filePath) => string_replace_all_default( - /* isOptionalObject*/ - false, - filePath, - "\\", - "/" -) : (filePath) => filePath; -function getRelativePath(file, ignoreFile) { - const ignoreFilePath = toPath(ignoreFile); - const filePath = isUrl(file) ? url.fileURLToPath(file) : ( - // @ts-expect-error -- URLs handled by `isUrl` - path6.resolve(file) - ); - return path6.relative( - // If there's an ignore-path set, the filename must be relative to the - // ignore path, not the current working directory. - ignoreFilePath ? path6.dirname(ignoreFilePath) : process.cwd(), - filePath - ); +async function hasPragma(text, options8) { + const selectedParser = await resolveParser(options8); + return !selectedParser.hasPragma || selectedParser.hasPragma(text); } -async function createSingleIsIgnoredFunction(ignoreFile, withNodeModules) { - let content = ""; - if (ignoreFile) { - content += await read_file_default(ignoreFile) ?? ""; +async function formatWithCursor(originalText, originalOptions) { + let { + hasBOM, + text, + options: options8 + } = normalizeInputAndOptions(originalText, await normalize_format_options_default(originalOptions)); + if (options8.rangeStart >= options8.rangeEnd && text !== "" || options8.requirePragma && !await hasPragma(text, options8)) { + return { + formatted: originalText, + cursorOffset: originalOptions.cursorOffset, + comments: [] + }; } - if (!withNodeModules) { - content += "\nnode_modules"; + let result; + if (options8.rangeStart > 0 || options8.rangeEnd < text.length) { + result = await formatRange(text, options8); + } else { + if (!options8.requirePragma && options8.insertPragma && options8.printer.insertPragma && !await hasPragma(text, options8)) { + text = options8.printer.insertPragma(text); + } + result = await coreFormat(text, options8); } - if (!content) { - return; + if (hasBOM) { + result.formatted = BOM + result.formatted; + if (result.cursorOffset >= 0) { + result.cursorOffset++; + } } - const ignore = createIgnore({ - allowRelativePaths: true - }).add(content); - return (file) => ignore.ignores(slash(getRelativePath(file, ignoreFile))); + return result; } -async function createIsIgnoredFunction(ignoreFiles, withNodeModules) { - if (ignoreFiles.length === 0 && !withNodeModules) { - ignoreFiles = [void 0]; +async function parse5(originalText, originalOptions, devOptions) { + const { + text, + options: options8 + } = normalizeInputAndOptions(originalText, await normalize_format_options_default(originalOptions)); + const parsed = await parse_default(text, options8); + if (devOptions) { + if (devOptions.preprocessForPrint) { + parsed.ast = await prepareToPrint(parsed.ast, options8); + } + if (devOptions.massage) { + parsed.ast = massage_ast_default(parsed.ast, options8); + } } - const isIgnoredFunctions = (await Promise.all(ignoreFiles.map((ignoreFile) => createSingleIsIgnoredFunction(ignoreFile, withNodeModules)))).filter(Boolean); - return (file) => isIgnoredFunctions.some((isIgnored2) => isIgnored2(file)); + return parsed; } -async function isIgnored(file, options8) { - const { - ignorePath: ignoreFiles, - withNodeModules - } = options8; - const isIgnored2 = await createIsIgnoredFunction(ignoreFiles, withNodeModules); - return isIgnored2(file); +async function formatAst(ast, options8) { + options8 = await normalize_format_options_default(options8); + const doc2 = await printAstToDoc(ast, options8); + return printDocToString(doc2, options8); } - -// src/common/get-file-info.js -async function getFileInfo(file, options8) { - if (typeof file !== "string" && !(file instanceof URL)) { - throw new TypeError( - `expect \`file\` to be a string or URL, got \`${typeof file}\`` - ); - } - let { ignorePath, withNodeModules } = options8; - if (!Array.isArray(ignorePath)) { - ignorePath = [ignorePath]; - } - const ignored = await isIgnored(file, { ignorePath, withNodeModules }); - let inferredParser; - if (!ignored) { - inferredParser = await getParser(file, options8); - } - return { - ignored, - inferredParser: inferredParser ?? null - }; +async function formatDoc(doc2, options8) { + const text = printDocToDebug(doc2); + const { + formatted + } = await formatWithCursor(text, { + ...options8, + parser: "__js_expression" + }); + return formatted; } -async function getParser(file, options8) { - let config; - if (options8.resolveConfig !== false) { - config = await resolveConfig(file); - } - return (config == null ? void 0 : config.parser) ?? infer_parser_default(options8, { physicalFile: file }); +async function printToDoc(originalText, options8) { + options8 = await normalize_format_options_default(options8); + const { + ast + } = await parse_default(originalText, options8); + return printAstToDoc(ast, options8); } -var get_file_info_default = getFileInfo; - -// src/main/plugins/load-plugin.js -import { pathToFileURL as pathToFileURL5 } from "url"; -import path8 from "path"; - -// src/utils/import-from-directory.js -import path7 from "path"; -function importFromDirectory(specifier, directory) { - return import_from_file_default(specifier, path7.join(directory, "noop.js")); +async function printDocToString2(doc2, options8) { + return printDocToString(doc2, await normalize_format_options_default(options8)); } -var import_from_directory_default = importFromDirectory; -// src/main/plugins/load-plugin.js -function normalizePlugin(pluginInstanceOfPluginModule, name) { - const plugin = pluginInstanceOfPluginModule.default ?? pluginInstanceOfPluginModule; - return { name, ...plugin }; -} -var loadPluginFromDirectory = mem( - async (name, directory) => normalizePlugin(await import_from_directory_default(name, directory), name), - { cacheKey: JSON.stringify } -); -var importPlugin = mem(async (name) => { - try { - return await import(pathToFileURL5(path8.resolve(name)).href); - } catch { - return import_from_directory_default(name, process.cwd()); - } +// src/main/option-categories.js +var option_categories_exports = {}; +__export(option_categories_exports, { + CATEGORY_CONFIG: () => CATEGORY_CONFIG, + CATEGORY_EDITOR: () => CATEGORY_EDITOR, + CATEGORY_FORMAT: () => CATEGORY_FORMAT, + CATEGORY_GLOBAL: () => CATEGORY_GLOBAL, + CATEGORY_OTHER: () => CATEGORY_OTHER, + CATEGORY_OUTPUT: () => CATEGORY_OUTPUT, + CATEGORY_SPECIAL: () => CATEGORY_SPECIAL }); -async function loadPlugin(plugin) { - if (typeof plugin === "string") { - return normalizePlugin(await importPlugin(plugin), plugin); - } - return plugin; -} -function clearCache2() { - memClear(loadPluginFromDirectory); - memClear(importPlugin); -} +var CATEGORY_CONFIG = "Config"; +var CATEGORY_EDITOR = "Editor"; +var CATEGORY_FORMAT = "Format"; +var CATEGORY_OTHER = "Other"; +var CATEGORY_OUTPUT = "Output"; +var CATEGORY_GLOBAL = "Global"; +var CATEGORY_SPECIAL = "Special"; // src/plugins/builtin-plugins-proxy.js var builtin_plugins_proxy_exports = {}; @@ -22705,61 +22886,6 @@ __export(builtin_plugins_proxy_exports, { printers: () => printers }); -// src/common/common-options.evaluate.js -var common_options_evaluate_default = { - "bracketSpacing": { - "category": "Common", - "type": "boolean", - "default": true, - "description": "Print spaces between brackets.", - "oppositeDescription": "Do not print spaces between brackets." - }, - "singleQuote": { - "category": "Common", - "type": "boolean", - "default": false, - "description": "Use single quotes instead of double quotes." - }, - "proseWrap": { - "category": "Common", - "type": "choice", - "default": "preserve", - "description": "How to wrap prose.", - "choices": [ - { - "value": "always", - "description": "Wrap prose if it exceeds the print width." - }, - { - "value": "never", - "description": "Do not wrap prose." - }, - { - "value": "preserve", - "description": "Wrap prose as-is." - } - ] - }, - "bracketSameLine": { - "category": "Common", - "type": "boolean", - "default": false, - "description": "Put > of opening tags on the last line instead of on a new line." - }, - "singleAttributePerLine": { - "category": "Common", - "type": "boolean", - "default": false, - "description": "Enforce single attribute per line in HTML, Vue and JSX." - } -}; - -// src/language-css/options.js -var options = { - singleQuote: common_options_evaluate_default.singleQuote -}; -var options_default = options; - // src/language-css/languages.evaluate.js var languages_evaluate_default = [ { @@ -22844,11 +22970,60 @@ var languages_evaluate_default = [ } ]; -// src/language-graphql/options.js -var options2 = { - bracketSpacing: common_options_evaluate_default.bracketSpacing +// src/common/common-options.evaluate.js +var common_options_evaluate_default = { + "bracketSpacing": { + "category": "Common", + "type": "boolean", + "default": true, + "description": "Print spaces between brackets.", + "oppositeDescription": "Do not print spaces between brackets." + }, + "singleQuote": { + "category": "Common", + "type": "boolean", + "default": false, + "description": "Use single quotes instead of double quotes." + }, + "proseWrap": { + "category": "Common", + "type": "choice", + "default": "preserve", + "description": "How to wrap prose.", + "choices": [ + { + "value": "always", + "description": "Wrap prose if it exceeds the print width." + }, + { + "value": "never", + "description": "Do not wrap prose." + }, + { + "value": "preserve", + "description": "Wrap prose as-is." + } + ] + }, + "bracketSameLine": { + "category": "Common", + "type": "boolean", + "default": false, + "description": "Put > of opening tags on the last line instead of on a new line." + }, + "singleAttributePerLine": { + "category": "Common", + "type": "boolean", + "default": false, + "description": "Enforce single attribute per line in HTML, Vue and JSX." + } }; -var options_default2 = options2; + +// src/language-css/options.js +var options = { + singleQuote: common_options_evaluate_default.singleQuote +}; +var options_default = options; // src/language-graphql/languages.evaluate.js var languages_evaluate_default2 = [ @@ -22873,6 +23048,12 @@ var languages_evaluate_default2 = [ } ]; +// src/language-graphql/options.js +var options2 = { + bracketSpacing: common_options_evaluate_default.bracketSpacing +}; +var options_default2 = options2; + // src/language-handlebars/languages.evaluate.js var languages_evaluate_default3 = [ { @@ -22899,40 +23080,6 @@ var languages_evaluate_default3 = [ } ]; -// src/language-html/options.js -var CATEGORY_HTML = "HTML"; -var options3 = { - bracketSameLine: common_options_evaluate_default.bracketSameLine, - htmlWhitespaceSensitivity: { - category: CATEGORY_HTML, - 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." - } - ] - }, - singleAttributePerLine: common_options_evaluate_default.singleAttributePerLine, - vueIndentScriptAndStyle: { - category: CATEGORY_HTML, - type: "boolean", - default: false, - description: "Indent script and style tags in Vue files." - } -}; -var options_default3 = options3; - // src/language-html/languages.evaluate.js var languages_evaluate_default4 = [ { @@ -23023,98 +23170,43 @@ var languages_evaluate_default4 = [ ], "vscodeLanguageIds": [ "vue" - ] - } -]; - -// src/language-js/options.js -var CATEGORY_JAVASCRIPT = "JavaScript"; -var options4 = { - arrowParens: { - category: CATEGORY_JAVASCRIPT, - type: "choice", - default: "always", - description: "Include parentheses around a sole arrow function parameter.", - choices: [ - { - value: "always", - description: "Always include parens. Example: `(x) => x`" - }, - { - value: "avoid", - description: "Omit parens when possible. Example: `x => x`" - } - ] - }, - bracketSameLine: common_options_evaluate_default.bracketSameLine, - bracketSpacing: common_options_evaluate_default.bracketSpacing, - jsxBracketSameLine: { - category: CATEGORY_JAVASCRIPT, - type: "boolean", - description: "Put > on the last line instead of at a new line.", - deprecated: "2.4.0" - }, - semi: { - category: CATEGORY_JAVASCRIPT, - type: "boolean", - default: true, - description: "Print semicolons.", - oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." - }, - experimentalTernaries: { - category: CATEGORY_JAVASCRIPT, - type: "boolean", - default: false, - description: "Use curious ternaries, with the question mark after the condition.", - oppositeDescription: "Default behavior of ternaries; keep question marks on the same line as the consequent." - }, - singleQuote: common_options_evaluate_default.singleQuote, - jsxSingleQuote: { - category: CATEGORY_JAVASCRIPT, - type: "boolean", - default: false, - description: "Use single quotes in JSX." - }, - quoteProps: { - category: CATEGORY_JAVASCRIPT, - type: "choice", - default: "as-needed", - description: "Change when properties in objects are quoted.", - choices: [ - { - value: "as-needed", - description: "Only add quotes around object properties where required." - }, - { - value: "consistent", - description: "If at least one property in an object requires quotes, quote all properties." - }, - { - value: "preserve", - description: "Respect the input use of quotes in object properties." - } - ] - }, - trailingComma: { - category: CATEGORY_JAVASCRIPT, + ] + } +]; + +// src/language-html/options.js +var CATEGORY_HTML = "HTML"; +var options3 = { + bracketSameLine: common_options_evaluate_default.bracketSameLine, + htmlWhitespaceSensitivity: { + category: CATEGORY_HTML, type: "choice", - default: "all", - description: "Print trailing commas wherever possible when multi-line.", + default: "css", + description: "How to handle whitespaces in HTML.", choices: [ { - value: "all", - description: "Trailing commas wherever possible (including function arguments)." + value: "css", + description: "Respect the default value of CSS display property." }, { - value: "es5", - description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" + value: "strict", + description: "Whitespaces are considered sensitive." }, - { value: "none", description: "No trailing commas." } + { + value: "ignore", + description: "Whitespaces are considered insensitive." + } ] }, - singleAttributePerLine: common_options_evaluate_default.singleAttributePerLine + singleAttributePerLine: common_options_evaluate_default.singleAttributePerLine, + vueIndentScriptAndStyle: { + category: CATEGORY_HTML, + type: "boolean", + default: false, + description: "Indent script and style tags in Vue files." + } }; -var options_default4 = options4; +var options_default3 = options3; // src/language-js/languages.evaluate.js var languages_evaluate_default5 = [ @@ -23304,6 +23396,95 @@ var languages_evaluate_default5 = [ } ]; +// src/language-js/options.js +var CATEGORY_JAVASCRIPT = "JavaScript"; +var options4 = { + arrowParens: { + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "always", + description: "Include parentheses around a sole arrow function parameter.", + choices: [ + { + value: "always", + description: "Always include parens. Example: `(x) => x`" + }, + { + value: "avoid", + description: "Omit parens when possible. Example: `x => x`" + } + ] + }, + bracketSameLine: common_options_evaluate_default.bracketSameLine, + bracketSpacing: common_options_evaluate_default.bracketSpacing, + jsxBracketSameLine: { + category: CATEGORY_JAVASCRIPT, + type: "boolean", + description: "Put > on the last line instead of at a new line.", + deprecated: "2.4.0" + }, + semi: { + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: true, + description: "Print semicolons.", + oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them." + }, + experimentalTernaries: { + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Use curious ternaries, with the question mark after the condition.", + oppositeDescription: "Default behavior of ternaries; keep question marks on the same line as the consequent." + }, + singleQuote: common_options_evaluate_default.singleQuote, + jsxSingleQuote: { + category: CATEGORY_JAVASCRIPT, + type: "boolean", + default: false, + description: "Use single quotes in JSX." + }, + quoteProps: { + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "as-needed", + description: "Change when properties in objects are quoted.", + choices: [ + { + value: "as-needed", + description: "Only add quotes around object properties where required." + }, + { + value: "consistent", + description: "If at least one property in an object requires quotes, quote all properties." + }, + { + value: "preserve", + description: "Respect the input use of quotes in object properties." + } + ] + }, + trailingComma: { + category: CATEGORY_JAVASCRIPT, + type: "choice", + default: "all", + description: "Print trailing commas wherever possible when multi-line.", + choices: [ + { + value: "all", + description: "Trailing commas wherever possible (including function arguments)." + }, + { + value: "es5", + description: "Trailing commas where valid in ES5 (objects, arrays, etc.)" + }, + { value: "none", description: "No trailing commas." } + ] + }, + singleAttributePerLine: common_options_evaluate_default.singleAttributePerLine +}; +var options_default4 = options4; + // src/language-json/languages.evaluate.js var languages_evaluate_default6 = [ { @@ -23382,7 +23563,12 @@ var languages_evaluate_default6 = [ "Pipfile.lock", "composer.lock", "flake.lock", - "mcmod.info" + "mcmod.info", + ".babelrc", + ".jscsrc", + ".jshintrc", + ".jslintrc", + ".swcrc" ], "parsers": [ "json" @@ -23422,24 +23608,9 @@ var languages_evaluate_default6 = [ ".sublime_metrics", ".sublime_session" ], - "filenames": [ - ".babelrc", - ".devcontainer.json", - ".eslintrc.json", - ".jscsrc", - ".jshintrc", - ".jslintrc", - ".swcrc", - "api-extractor.json", - "devcontainer.json", - "jsconfig.json", - "language-configuration.json", - "tsconfig.json", - "tslint.json", - ".eslintrc" - ], + "filenames": [], "parsers": [ - "json" + "jsonc" ], "vscodeLanguageIds": [ "jsonc" @@ -23466,13 +23637,6 @@ var languages_evaluate_default6 = [ } ]; -// src/language-markdown/options.js -var options5 = { - proseWrap: common_options_evaluate_default.proseWrap, - singleQuote: common_options_evaluate_default.singleQuote -}; -var options_default5 = options5; - // src/language-markdown/languages.evaluate.js var languages_evaluate_default7 = [ { @@ -23540,13 +23704,12 @@ var languages_evaluate_default7 = [ } ]; -// src/language-yaml/options.js -var options6 = { - bracketSpacing: common_options_evaluate_default.bracketSpacing, - singleQuote: common_options_evaluate_default.singleQuote, - proseWrap: common_options_evaluate_default.proseWrap +// src/language-markdown/options.js +var options5 = { + proseWrap: common_options_evaluate_default.proseWrap, + singleQuote: common_options_evaluate_default.singleQuote }; -var options_default6 = options6; +var options_default5 = options5; // src/language-yaml/languages.evaluate.js var languages_evaluate_default8 = [ @@ -23595,6 +23758,14 @@ var languages_evaluate_default8 = [ } ]; +// src/language-yaml/options.js +var options6 = { + bracketSpacing: common_options_evaluate_default.bracketSpacing, + singleQuote: common_options_evaluate_default.singleQuote, + proseWrap: common_options_evaluate_default.proseWrap +}; +var options_default6 = options6; + // src/plugins/builtin-plugins-proxy.js function createParsersAndPrinters(modules) { const parsers2 = /* @__PURE__ */ Object.create(null); @@ -23666,6 +23837,7 @@ var { parsers, printers } = createParsersAndPrinters([ "__babel_estree", "json", "json5", + "jsonc", "json-stringify" ] }, @@ -23723,40 +23895,69 @@ function loadBuiltinPlugins() { } var load_builtin_plugins_default = loadBuiltinPlugins; +// src/main/plugins/load-plugin.js +import path12 from "path"; +import { pathToFileURL as pathToFileURL5 } from "url"; + +// src/utils/import-from-directory.js +import path11 from "path"; +function importFromDirectory(specifier, directory) { + return import_from_file_default(specifier, path11.join(directory, "noop.js")); +} +var import_from_directory_default = importFromDirectory; + +// src/main/plugins/load-plugin.js +async function importPlugin(name, cwd) { + if (path12.isAbsolute(name)) { + return import(pathToFileURL5(name).href); + } + try { + return await import(pathToFileURL5(path12.resolve(name)).href); + } catch { + return import_from_directory_default(name, cwd); + } +} +async function loadPluginWithoutCache(plugin, cwd) { + const module = await importPlugin(plugin, cwd); + return { name: plugin, ...module.default ?? module }; +} +var cache2 = /* @__PURE__ */ new Map(); +function loadPlugin(plugin) { + if (typeof plugin !== "string") { + return plugin; + } + const cwd = process.cwd(); + const cacheKey = JSON.stringify({ name: plugin, cwd }); + if (!cache2.has(cacheKey)) { + cache2.set(cacheKey, loadPluginWithoutCache(plugin, cwd)); + } + return cache2.get(cacheKey); +} +function clearCache2() { + cache2.clear(); +} + // src/main/plugins/load-plugins.js function loadPlugins(plugins = []) { return Promise.all(plugins.map((plugin) => loadPlugin(plugin))); } var load_plugins_default = loadPlugins; -// src/main/option-categories.js -var option_categories_exports = {}; -__export(option_categories_exports, { - CATEGORY_CONFIG: () => CATEGORY_CONFIG, - CATEGORY_EDITOR: () => CATEGORY_EDITOR, - CATEGORY_FORMAT: () => CATEGORY_FORMAT, - CATEGORY_GLOBAL: () => CATEGORY_GLOBAL, - CATEGORY_OTHER: () => CATEGORY_OTHER, - CATEGORY_OUTPUT: () => CATEGORY_OUTPUT, - CATEGORY_SPECIAL: () => CATEGORY_SPECIAL -}); -var CATEGORY_CONFIG = "Config"; -var CATEGORY_EDITOR = "Editor"; -var CATEGORY_FORMAT = "Format"; -var CATEGORY_OTHER = "Other"; -var CATEGORY_OUTPUT = "Output"; -var CATEGORY_GLOBAL = "Global"; -var CATEGORY_SPECIAL = "Special"; - // src/utils/object-omit.js function omit(object, keys) { keys = new Set(keys); return Object.fromEntries( - Object.entries(object).filter(([key]) => !keys.has(key)) + Object.entries(object).filter(([key2]) => !keys.has(key2)) ); } var object_omit_default = omit; +// src/index.js +import * as doc from "./doc.mjs"; + +// src/main/version.evaluate.cjs +var version_evaluate_default = "3.2.5"; + // src/utils/public.js var public_exports = {}; __export(public_exports, { @@ -23845,6 +24046,20 @@ function isNextLineEmpty(text, startIndex) { } var is_next_line_empty_default = isNextLineEmpty; +// src/utils/get-indent-size.js +function getIndentSize(value, tabWidth) { + const lastNewlineIndex = value.lastIndexOf("\n"); + if (lastNewlineIndex === -1) { + return 0; + } + return get_alignment_size_default( + // All the leading whitespaces + value.slice(lastNewlineIndex + 1).match(/^[\t ]*/)[0], + tabWidth + ); +} +var get_indent_size_default = getIndentSize; + // node_modules/escape-string-regexp/index.js function escapeStringRegexp(string) { if (typeof string !== "string") { @@ -23868,19 +24083,12 @@ function getMaxContinuousCount(text, searchString) { } var get_max_continuous_count_default = getMaxContinuousCount; -// src/utils/get-indent-size.js -function getIndentSize(value, tabWidth) { - const lastNewlineIndex = value.lastIndexOf("\n"); - if (lastNewlineIndex === -1) { - return 0; - } - return get_alignment_size_default( - // All the leading whitespaces - value.slice(lastNewlineIndex + 1).match(/^[\t ]*/)[0], - tabWidth - ); +// src/utils/get-next-non-space-non-comment-character.js +function getNextNonSpaceNonCommentCharacter(text, startIndex) { + const index = get_next_non_space_non_comment_character_index_default(text, startIndex); + return index === false ? "" : text.charAt(index); } -var get_indent_size_default = getIndentSize; +var get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter; // src/utils/has-newline-in-range.js function hasNewlineInRange(text, startIndex, endIndex) { @@ -23904,13 +24112,6 @@ function hasSpaces(text, startIndex, options8 = {}) { } var has_spaces_default = hasSpaces; -// src/utils/get-next-non-space-non-comment-character.js -function getNextNonSpaceNonCommentCharacter(text, startIndex) { - const index = get_next_non_space_non_comment_character_index_default(text, startIndex); - return index === false ? "" : text.charAt(index); -} -var get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter; - // src/utils/make-string.js function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) { const otherQuote = enclosingQuote === '"' ? "'" : '"'; @@ -23972,12 +24173,6 @@ function isNextLineEmpty2(text, startIndex) { ); } -// src/index.js -import * as doc from "./doc.mjs"; - -// src/main/version.evaluate.cjs -var version_evaluate_default = "3.1.0"; - // src/index.js function withPlugins(fn, optionsArgumentIndex = 1) { return async (...args) => { @@ -24028,14 +24223,16 @@ var sharedWithCli = { isNonEmptyArray: is_non_empty_array_default, partition: partition_default, omit: object_omit_default - } + }, + mockable: mockable_default }; var debugApis = { - parse: withPlugins(parse2), + parse: withPlugins(parse5), formatAST: withPlugins(formatAst), formatDoc: withPlugins(formatDoc), printToDoc: withPlugins(printToDoc), - printDocToString: withPlugins(printDocToString2) + printDocToString: withPlugins(printDocToString2), + mockable: mockable_default }; // with-default-export:src/index.js diff --git a/node_modules/prettier/internal/cli.mjs b/node_modules/prettier/internal/cli.mjs index 1722e94..4f031e2 100644 --- a/node_modules/prettier/internal/cli.mjs +++ b/node_modules/prettier/internal/cli.mjs @@ -55,372 +55,6 @@ var __privateSet = (obj, member, value, setter) => { setter ? setter.call(obj, value) : member.set(obj, value); return value; }; -var __privateWrapper = (obj, member, setter, getter) => ({ - set _(value) { - __privateSet(obj, member, value, setter); - }, - get _() { - return __privateGet(obj, member, getter); - } -}); - -// node_modules/clone/clone.js -var require_clone = __commonJS({ - "node_modules/clone/clone.js"(exports, module) { - var clone = function() { - "use strict"; - function clone2(parent, circular, depth, prototype) { - var filter; - if (typeof circular === "object") { - depth = circular.depth; - prototype = circular.prototype; - filter = circular.filter; - circular = circular.circular; - } - var allParents = []; - var allChildren = []; - var useBuffer = typeof Buffer != "undefined"; - if (typeof circular == "undefined") - circular = true; - if (typeof depth == "undefined") - depth = Infinity; - function _clone(parent2, depth2) { - if (parent2 === null) - return null; - if (depth2 == 0) - return parent2; - var child; - var proto2; - if (typeof parent2 != "object") { - return parent2; - } - if (clone2.__isArray(parent2)) { - child = []; - } else if (clone2.__isRegExp(parent2)) { - child = new RegExp(parent2.source, __getRegExpFlags(parent2)); - if (parent2.lastIndex) - child.lastIndex = parent2.lastIndex; - } else if (clone2.__isDate(parent2)) { - child = new Date(parent2.getTime()); - } else if (useBuffer && Buffer.isBuffer(parent2)) { - if (Buffer.allocUnsafe) { - child = Buffer.allocUnsafe(parent2.length); - } else { - child = new Buffer(parent2.length); - } - parent2.copy(child); - return child; - } else { - if (typeof prototype == "undefined") { - proto2 = Object.getPrototypeOf(parent2); - child = Object.create(proto2); - } else { - child = Object.create(prototype); - proto2 = prototype; - } - } - if (circular) { - var index = allParents.indexOf(parent2); - if (index != -1) { - return allChildren[index]; - } - allParents.push(parent2); - allChildren.push(child); - } - for (var i in parent2) { - var attrs; - if (proto2) { - attrs = Object.getOwnPropertyDescriptor(proto2, i); - } - if (attrs && attrs.set == null) { - continue; - } - child[i] = _clone(parent2[i], depth2 - 1); - } - return child; - } - return _clone(parent, depth); - } - clone2.clonePrototype = function clonePrototype(parent) { - if (parent === null) - return null; - var c = function() { - }; - c.prototype = parent; - return new c(); - }; - function __objToStr(o) { - return Object.prototype.toString.call(o); - } - ; - clone2.__objToStr = __objToStr; - function __isDate(o) { - return typeof o === "object" && __objToStr(o) === "[object Date]"; - } - ; - clone2.__isDate = __isDate; - function __isArray(o) { - return typeof o === "object" && __objToStr(o) === "[object Array]"; - } - ; - clone2.__isArray = __isArray; - function __isRegExp(o) { - return typeof o === "object" && __objToStr(o) === "[object RegExp]"; - } - ; - clone2.__isRegExp = __isRegExp; - function __getRegExpFlags(re) { - var flags = ""; - if (re.global) - flags += "g"; - if (re.ignoreCase) - flags += "i"; - if (re.multiline) - flags += "m"; - return flags; - } - ; - clone2.__getRegExpFlags = __getRegExpFlags; - return clone2; - }(); - if (typeof module === "object" && module.exports) { - module.exports = clone; - } - } -}); - -// node_modules/defaults/index.js -var require_defaults = __commonJS({ - "node_modules/defaults/index.js"(exports, module) { - var clone = require_clone(); - module.exports = function(options, defaults) { - options = options || {}; - Object.keys(defaults).forEach(function(key) { - if (typeof options[key] === "undefined") { - options[key] = clone(defaults[key]); - } - }); - return options; - }; - } -}); - -// node_modules/wcwidth/combining.js -var require_combining = __commonJS({ - "node_modules/wcwidth/combining.js"(exports, module) { - module.exports = [ - [768, 879], - [1155, 1158], - [1160, 1161], - [1425, 1469], - [1471, 1471], - [1473, 1474], - [1476, 1477], - [1479, 1479], - [1536, 1539], - [1552, 1557], - [1611, 1630], - [1648, 1648], - [1750, 1764], - [1767, 1768], - [1770, 1773], - [1807, 1807], - [1809, 1809], - [1840, 1866], - [1958, 1968], - [2027, 2035], - [2305, 2306], - [2364, 2364], - [2369, 2376], - [2381, 2381], - [2385, 2388], - [2402, 2403], - [2433, 2433], - [2492, 2492], - [2497, 2500], - [2509, 2509], - [2530, 2531], - [2561, 2562], - [2620, 2620], - [2625, 2626], - [2631, 2632], - [2635, 2637], - [2672, 2673], - [2689, 2690], - [2748, 2748], - [2753, 2757], - [2759, 2760], - [2765, 2765], - [2786, 2787], - [2817, 2817], - [2876, 2876], - [2879, 2879], - [2881, 2883], - [2893, 2893], - [2902, 2902], - [2946, 2946], - [3008, 3008], - [3021, 3021], - [3134, 3136], - [3142, 3144], - [3146, 3149], - [3157, 3158], - [3260, 3260], - [3263, 3263], - [3270, 3270], - [3276, 3277], - [3298, 3299], - [3393, 3395], - [3405, 3405], - [3530, 3530], - [3538, 3540], - [3542, 3542], - [3633, 3633], - [3636, 3642], - [3655, 3662], - [3761, 3761], - [3764, 3769], - [3771, 3772], - [3784, 3789], - [3864, 3865], - [3893, 3893], - [3895, 3895], - [3897, 3897], - [3953, 3966], - [3968, 3972], - [3974, 3975], - [3984, 3991], - [3993, 4028], - [4038, 4038], - [4141, 4144], - [4146, 4146], - [4150, 4151], - [4153, 4153], - [4184, 4185], - [4448, 4607], - [4959, 4959], - [5906, 5908], - [5938, 5940], - [5970, 5971], - [6002, 6003], - [6068, 6069], - [6071, 6077], - [6086, 6086], - [6089, 6099], - [6109, 6109], - [6155, 6157], - [6313, 6313], - [6432, 6434], - [6439, 6440], - [6450, 6450], - [6457, 6459], - [6679, 6680], - [6912, 6915], - [6964, 6964], - [6966, 6970], - [6972, 6972], - [6978, 6978], - [7019, 7027], - [7616, 7626], - [7678, 7679], - [8203, 8207], - [8234, 8238], - [8288, 8291], - [8298, 8303], - [8400, 8431], - [12330, 12335], - [12441, 12442], - [43014, 43014], - [43019, 43019], - [43045, 43046], - [64286, 64286], - [65024, 65039], - [65056, 65059], - [65279, 65279], - [65529, 65531], - [68097, 68099], - [68101, 68102], - [68108, 68111], - [68152, 68154], - [68159, 68159], - [119143, 119145], - [119155, 119170], - [119173, 119179], - [119210, 119213], - [119362, 119364], - [917505, 917505], - [917536, 917631], - [917760, 917999] - ]; - } -}); - -// node_modules/wcwidth/index.js -var require_wcwidth = __commonJS({ - "node_modules/wcwidth/index.js"(exports, module) { - "use strict"; - var defaults = require_defaults(); - var combining = require_combining(); - var DEFAULTS = { - nul: 0, - control: 0 - }; - module.exports = function wcwidth3(str) { - return wcswidth(str, DEFAULTS); - }; - module.exports.config = function(opts) { - opts = defaults(opts || {}, DEFAULTS); - return function wcwidth3(str) { - return wcswidth(str, opts); - }; - }; - function wcswidth(str, opts) { - if (typeof str !== "string") - return wcwidth2(str, opts); - var s = 0; - for (var i = 0; i < str.length; i++) { - var n = wcwidth2(str.charCodeAt(i), opts); - if (n < 0) - return -1; - s += n; - } - return s; - } - function wcwidth2(ucs, opts) { - if (ucs === 0) - return opts.nul; - if (ucs < 32 || ucs >= 127 && ucs < 160) - return opts.control; - if (bisearch(ucs)) - return 0; - return 1 + (ucs >= 4352 && (ucs <= 4447 || // Hangul Jamo init. consonants - ucs == 9001 || ucs == 9002 || ucs >= 11904 && ucs <= 42191 && ucs != 12351 || // CJK ... Yi - ucs >= 44032 && ucs <= 55203 || // Hangul Syllables - ucs >= 63744 && ucs <= 64255 || // CJK Compatibility Ideographs - ucs >= 65040 && ucs <= 65049 || // Vertical forms - ucs >= 65072 && ucs <= 65135 || // CJK Compatibility Forms - ucs >= 65280 && ucs <= 65376 || // Fullwidth Forms - ucs >= 65504 && ucs <= 65510 || ucs >= 131072 && ucs <= 196605 || ucs >= 196608 && ucs <= 262141)); - } - function bisearch(ucs) { - var min = 0; - var max = combining.length - 1; - var mid; - if (ucs < combining[0][0] || ucs > combining[max][1]) - return false; - while (max >= min) { - mid = Math.floor((min + max) / 2); - if (ucs > combining[mid][1]) - min = mid + 1; - else if (ucs < combining[mid][0]) - max = mid - 1; - else - return true; - } - return false; - } - } -}); // node_modules/dashify/index.js var require_dashify = __commonJS({ @@ -656,27 +290,93 @@ var require_minimist = __commonJS({ } }); -// node_modules/diff/lib/diff/base.js -var require_base = __commonJS({ - "node_modules/diff/lib/diff/base.js"(exports) { +// node_modules/fast-json-stable-stringify/index.js +var require_fast_json_stable_stringify = __commonJS({ + "node_modules/fast-json-stable-stringify/index.js"(exports, module) { "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports["default"] = Diff; - function Diff() { - } - Diff.prototype = { - /*istanbul ignore start*/ - /*istanbul ignore end*/ - diff: function diff2(oldString, newString) { - var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var callback = options.callback; - if (typeof options === "function") { - callback = options; - options = {}; - } - this.options = options; + module.exports = function(data, opts) { + if (!opts) + opts = {}; + if (typeof opts === "function") + opts = { cmp: opts }; + var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false; + var cmp = opts.cmp && /* @__PURE__ */ function(f) { + return function(node) { + return function(a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + }(opts.cmp); + var seen = []; + return function stringify4(node) { + if (node && node.toJSON && typeof node.toJSON === "function") { + node = node.toJSON(); + } + if (node === void 0) + return; + if (typeof node == "number") + return isFinite(node) ? "" + node : "null"; + if (typeof node !== "object") + return JSON.stringify(node); + var i, out; + if (Array.isArray(node)) { + out = "["; + for (i = 0; i < node.length; i++) { + if (i) + out += ","; + out += stringify4(node[i]) || "null"; + } + return out + "]"; + } + if (node === null) + return "null"; + if (seen.indexOf(node) !== -1) { + if (cycles) + return JSON.stringify("__cycle__"); + throw new TypeError("Converting circular structure to JSON"); + } + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ""; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify4(node[key]); + if (!value) + continue; + if (out) + out += ","; + out += JSON.stringify(key) + ":" + value; + } + seen.splice(seenIndex, 1); + return "{" + out + "}"; + }(data); + }; + } +}); + +// node_modules/diff/lib/diff/base.js +var require_base = __commonJS({ + "node_modules/diff/lib/diff/base.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports["default"] = Diff; + function Diff() { + } + Diff.prototype = { + /*istanbul ignore start*/ + /*istanbul ignore end*/ + diff: function diff2(oldString, newString) { + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var callback = options.callback; + if (typeof options === "function") { + callback = options; + options = {}; + } + this.options = options; var self = this; function done(value) { if (callback) { @@ -1371,23 +1071,19 @@ var require_src = __commonJS({ return void 0; } if (isArray) { - const result = []; - for (let row of data) { + return data.map((row, index) => { if (typeof row === "string") { row = this.opts.deserialize(row); } if (row === void 0 || row === null) { - result.push(void 0); - continue; + return void 0; } if (typeof row.expires === "number" && Date.now() > row.expires) { - this.delete(key).then(() => void 0); - result.push(void 0); - } else { - result.push(options && options.raw ? row : row.value); + this.delete(key[index]).then(() => void 0); + return void 0; } - } - return result; + return options && options.raw ? row : row.value; + }); } if (typeof data.expires === "number" && Date.now() > data.expires) { return this.delete(key).then(() => void 0); @@ -3963,9 +3659,9 @@ var require_glob = __commonJS({ } }); -// node_modules/rimraf/rimraf.js +// node_modules/flat-cache/node_modules/rimraf/rimraf.js var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports, module) { + "node_modules/flat-cache/node_modules/rimraf/rimraf.js"(exports, module) { var assert = __require("assert"); var path10 = __require("path"); var fs6 = __require("fs"); @@ -4704,682 +4400,234 @@ var require_cache2 = __commonJS({ } }); -// node_modules/fast-json-stable-stringify/index.js -var require_fast_json_stable_stringify = __commonJS({ - "node_modules/fast-json-stable-stringify/index.js"(exports, module) { - "use strict"; - module.exports = function(data, opts) { - if (!opts) - opts = {}; - if (typeof opts === "function") - opts = { cmp: opts }; - var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false; - var cmp = opts.cmp && function(f) { - return function(node) { - return function(a, b) { - var aobj = { key: a, value: node[a] }; - var bobj = { key: b, value: node[b] }; - return f(aobj, bobj); - }; - }; - }(opts.cmp); - var seen = []; - return function stringify4(node) { - if (node && node.toJSON && typeof node.toJSON === "function") { - node = node.toJSON(); - } - if (node === void 0) - return; - if (typeof node == "number") - return isFinite(node) ? "" + node : "null"; - if (typeof node !== "object") - return JSON.stringify(node); - var i, out; - if (Array.isArray(node)) { - out = "["; - for (i = 0; i < node.length; i++) { - if (i) - out += ","; - out += stringify4(node[i]) || "null"; - } - return out + "]"; - } - if (node === null) - return "null"; - if (seen.indexOf(node) !== -1) { - if (cycles) - return JSON.stringify("__cycle__"); - throw new TypeError("Converting circular structure to JSON"); - } - var seenIndex = seen.push(node) - 1; - var keys = Object.keys(node).sort(cmp && cmp(node)); - out = ""; - for (i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = stringify4(node[key]); - if (!value) - continue; - if (out) - out += ","; - out += JSON.stringify(key) + ":" + value; - } - seen.splice(seenIndex, 1); - return "{" + out + "}"; - }(data); - }; - } -}); - -// src/cli/index.js -import * as prettier2 from "../index.mjs"; - -// scripts/build/shims/string-replace-all.js -var stringReplaceAll = (isOptionalObject, original, pattern, replacement) => { - if (isOptionalObject && (original === void 0 || original === null)) { - return; - } - if (original.replaceAll) { - return original.replaceAll(pattern, replacement); - } - if (pattern.global) { - return original.replace(pattern, replacement); - } - return original.split(pattern).join(replacement); -}; -var string_replace_all_default = stringReplaceAll; - -// src/cli/logger.js -import readline from "readline"; - -// node_modules/chalk/source/vendor/ansi-styles/index.js -var ANSI_BACKGROUND_OFFSET = 10; -var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`; -var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`; -var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`; -var styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - overline: [53, 55], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - // Bright color - blackBright: [90, 39], - gray: [90, 39], - // Alias of `blackBright` - grey: [90, 39], - // Alias of `blackBright` - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - // Bright color - bgBlackBright: [100, 49], - bgGray: [100, 49], - // Alias of `bgBlackBright` - bgGrey: [100, 49], - // Alias of `bgBlackBright` - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } -}; -var modifierNames = Object.keys(styles.modifier); -var foregroundColorNames = Object.keys(styles.color); -var backgroundColorNames = Object.keys(styles.bgColor); -var colorNames = [...foregroundColorNames, ...backgroundColorNames]; -function assembleStyles() { - const codes = /* @__PURE__ */ new Map(); - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\x1B[${style[0]}m`, - close: `\x1B[${style[1]}m` - }; - group[styleName] = styles[styleName]; - codes.set(style[0], style[1]); - } - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - Object.defineProperty(styles, "codes", { - value: codes, - enumerable: false - }); - styles.color.close = "\x1B[39m"; - styles.bgColor.close = "\x1B[49m"; - styles.color.ansi = wrapAnsi16(); - styles.color.ansi256 = wrapAnsi256(); - styles.color.ansi16m = wrapAnsi16m(); - styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); - Object.defineProperties(styles, { - rgbToAnsi256: { - value(red, green, blue) { - if (red === green && green === blue) { - if (red < 8) { - return 16; - } - if (red > 248) { - return 231; - } - return Math.round((red - 8) / 247 * 24) + 232; - } - return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5); - }, - enumerable: false - }, - hexToRgb: { - value(hex) { - const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); - if (!matches) { - return [0, 0, 0]; - } - let [colorString] = matches; - if (colorString.length === 3) { - colorString = [...colorString].map((character) => character + character).join(""); - } - const integer = Number.parseInt(colorString, 16); - return [ - /* eslint-disable no-bitwise */ - integer >> 16 & 255, - integer >> 8 & 255, - integer & 255 - /* eslint-enable no-bitwise */ - ]; - }, - enumerable: false - }, - hexToAnsi256: { - value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), - enumerable: false - }, - ansi256ToAnsi: { - value(code) { - if (code < 8) { - return 30 + code; - } - if (code < 16) { - return 90 + (code - 8); - } - let red; - let green; - let blue; - if (code >= 232) { - red = ((code - 232) * 10 + 8) / 255; - green = red; - blue = red; - } else { - code -= 16; - const remainder = code % 36; - red = Math.floor(code / 36) / 5; - green = Math.floor(remainder / 6) / 5; - blue = remainder % 6 / 5; - } - const value = Math.max(red, green, blue) * 2; - if (value === 0) { - return 30; - } - let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red)); - if (value === 2) { - result += 60; - } - return result; - }, - enumerable: false - }, - rgbToAnsi: { - value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), - enumerable: false - }, - hexToAnsi: { - value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), - enumerable: false - } - }); - return styles; -} -var ansiStyles = assembleStyles(); -var ansi_styles_default = ansiStyles; - -// node_modules/chalk/source/vendor/supports-color/index.js -import process2 from "process"; -import os from "os"; -import tty from "tty"; -function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) { - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf("--"); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); -} -var { env } = process2; -var flagForceColor; -if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { - flagForceColor = 0; -} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { - flagForceColor = 1; -} -function envForceColor() { - if ("FORCE_COLOR" in env) { - if (env.FORCE_COLOR === "true") { - return 1; - } - if (env.FORCE_COLOR === "false") { - return 0; - } - return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); - } -} -function translateLevel(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} -function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { - const noFlagForceColor = envForceColor(); - if (noFlagForceColor !== void 0) { - flagForceColor = noFlagForceColor; - } - const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; - if (forceColor === 0) { - return 0; - } - if (sniffFlags) { - if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { - return 3; - } - if (hasFlag("color=256")) { - return 2; - } - } - if ("TF_BUILD" in env && "AGENT_NAME" in env) { - return 1; - } - if (haveStream && !streamIsTTY && forceColor === void 0) { - return 0; - } - const min = forceColor || 0; - if (env.TERM === "dumb") { - return min; - } - if (process2.platform === "win32") { - const osRelease = os.release().split("."); - if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - return 1; - } - if ("CI" in env) { - if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) { - return 3; - } - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { - return 1; - } - return min; - } - if ("TEAMCITY_VERSION" in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - if (env.COLORTERM === "truecolor") { - return 3; - } - if (env.TERM === "xterm-kitty") { - return 3; - } - if ("TERM_PROGRAM" in env) { - const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env.TERM_PROGRAM) { - case "iTerm.app": { - return version2 >= 3 ? 3 : 2; - } - case "Apple_Terminal": { - return 2; - } - } - } - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - if ("COLORTERM" in env) { - return 1; - } - return min; -} -function createSupportsColor(stream, options = {}) { - const level = _supportsColor(stream, { - streamIsTTY: stream && stream.isTTY, - ...options - }); - return translateLevel(level); -} -var supportsColor = { - stdout: createSupportsColor({ isTTY: tty.isatty(1) }), - stderr: createSupportsColor({ isTTY: tty.isatty(2) }) -}; -var supports_color_default = supportsColor; - -// node_modules/chalk/source/utilities.js -function stringReplaceAll2(string, substring, replacer) { - let index = string.indexOf(substring); - if (index === -1) { - return string; - } - const substringLength = substring.length; - let endIndex = 0; - let returnValue = ""; - do { - returnValue += string.slice(endIndex, index) + substring + replacer; - endIndex = index + substringLength; - index = string.indexOf(substring, endIndex); - } while (index !== -1); - returnValue += string.slice(endIndex); - return returnValue; -} -function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) { - let endIndex = 0; - let returnValue = ""; - do { - const gotCR = string[index - 1] === "\r"; - returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix; - endIndex = index + 1; - index = string.indexOf("\n", endIndex); - } while (index !== -1); - returnValue += string.slice(endIndex); - return returnValue; -} - -// node_modules/chalk/source/index.js -var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default; -var GENERATOR = Symbol("GENERATOR"); -var STYLER = Symbol("STYLER"); -var IS_EMPTY = Symbol("IS_EMPTY"); -var levelMapping = [ - "ansi", - "ansi", - "ansi256", - "ansi16m" -]; -var styles2 = /* @__PURE__ */ Object.create(null); -var applyOptions = (object, options = {}) => { - if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { - throw new Error("The `level` option should be an integer from 0 to 3"); - } - const colorLevel = stdoutColor ? stdoutColor.level : 0; - object.level = options.level === void 0 ? colorLevel : options.level; -}; -var chalkFactory = (options) => { - const chalk2 = (...strings) => strings.join(" "); - applyOptions(chalk2, options); - Object.setPrototypeOf(chalk2, createChalk.prototype); - return chalk2; -}; -function createChalk(options) { - return chalkFactory(options); -} -Object.setPrototypeOf(createChalk.prototype, Function.prototype); -for (const [styleName, style] of Object.entries(ansi_styles_default)) { - styles2[styleName] = { - get() { - const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]); - Object.defineProperty(this, styleName, { value: builder }); - return builder; - } - }; -} -styles2.visible = { - get() { - const builder = createBuilder(this, this[STYLER], true); - Object.defineProperty(this, "visible", { value: builder }); - return builder; - } -}; -var getModelAnsi = (model, level, type, ...arguments_) => { - if (model === "rgb") { - if (level === "ansi16m") { - return ansi_styles_default[type].ansi16m(...arguments_); - } - if (level === "ansi256") { - return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_)); - } - return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_)); - } - if (model === "hex") { - return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_)); - } - return ansi_styles_default[type][model](...arguments_); -}; -var usedModels = ["rgb", "hex", "ansi256"]; -for (const model of usedModels) { - styles2[model] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]); - return createBuilder(this, styler, this[IS_EMPTY]); - }; - } - }; - const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); - styles2[bgModel] = { - get() { - const { level } = this; - return function(...arguments_) { - const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]); - return createBuilder(this, styler, this[IS_EMPTY]); - }; - } - }; -} -var proto = Object.defineProperties(() => { -}, { - ...styles2, - level: { - enumerable: true, - get() { - return this[GENERATOR].level; - }, - set(level) { - this[GENERATOR].level = level; - } +// node_modules/wcwidth.js/combining.js +var require_combining = __commonJS({ + "node_modules/wcwidth.js/combining.js"(exports, module) { + module.exports = [ + [768, 879], + [1155, 1158], + [1160, 1161], + [1425, 1469], + [1471, 1471], + [1473, 1474], + [1476, 1477], + [1479, 1479], + [1536, 1539], + [1552, 1557], + [1611, 1630], + [1648, 1648], + [1750, 1764], + [1767, 1768], + [1770, 1773], + [1807, 1807], + [1809, 1809], + [1840, 1866], + [1958, 1968], + [2027, 2035], + [2305, 2306], + [2364, 2364], + [2369, 2376], + [2381, 2381], + [2385, 2388], + [2402, 2403], + [2433, 2433], + [2492, 2492], + [2497, 2500], + [2509, 2509], + [2530, 2531], + [2561, 2562], + [2620, 2620], + [2625, 2626], + [2631, 2632], + [2635, 2637], + [2672, 2673], + [2689, 2690], + [2748, 2748], + [2753, 2757], + [2759, 2760], + [2765, 2765], + [2786, 2787], + [2817, 2817], + [2876, 2876], + [2879, 2879], + [2881, 2883], + [2893, 2893], + [2902, 2902], + [2946, 2946], + [3008, 3008], + [3021, 3021], + [3134, 3136], + [3142, 3144], + [3146, 3149], + [3157, 3158], + [3260, 3260], + [3263, 3263], + [3270, 3270], + [3276, 3277], + [3298, 3299], + [3393, 3395], + [3405, 3405], + [3530, 3530], + [3538, 3540], + [3542, 3542], + [3633, 3633], + [3636, 3642], + [3655, 3662], + [3761, 3761], + [3764, 3769], + [3771, 3772], + [3784, 3789], + [3864, 3865], + [3893, 3893], + [3895, 3895], + [3897, 3897], + [3953, 3966], + [3968, 3972], + [3974, 3975], + [3984, 3991], + [3993, 4028], + [4038, 4038], + [4141, 4144], + [4146, 4146], + [4150, 4151], + [4153, 4153], + [4184, 4185], + [4448, 4607], + [4959, 4959], + [5906, 5908], + [5938, 5940], + [5970, 5971], + [6002, 6003], + [6068, 6069], + [6071, 6077], + [6086, 6086], + [6089, 6099], + [6109, 6109], + [6155, 6157], + [6313, 6313], + [6432, 6434], + [6439, 6440], + [6450, 6450], + [6457, 6459], + [6679, 6680], + [6912, 6915], + [6964, 6964], + [6966, 6970], + [6972, 6972], + [6978, 6978], + [7019, 7027], + [7616, 7626], + [7678, 7679], + [8203, 8207], + [8234, 8238], + [8288, 8291], + [8298, 8303], + [8400, 8431], + [12330, 12335], + [12441, 12442], + [43014, 43014], + [43019, 43019], + [43045, 43046], + [64286, 64286], + [65024, 65039], + [65056, 65059], + [65279, 65279], + [65529, 65531], + [68097, 68099], + [68101, 68102], + [68108, 68111], + [68152, 68154], + [68159, 68159], + [119143, 119145], + [119155, 119170], + [119173, 119179], + [119210, 119213], + [119362, 119364], + [917505, 917505], + [917536, 917631], + [917760, 917999] + ]; } }); -var createStyler = (open, close, parent) => { - let openAll; - let closeAll; - if (parent === void 0) { - openAll = open; - closeAll = close; - } else { - openAll = parent.openAll + open; - closeAll = close + parent.closeAll; - } - return { - open, - close, - openAll, - closeAll, - parent - }; -}; -var createBuilder = (self, _styler, _isEmpty) => { - const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); - Object.setPrototypeOf(builder, proto); - builder[GENERATOR] = self; - builder[STYLER] = _styler; - builder[IS_EMPTY] = _isEmpty; - return builder; -}; -var applyStyle = (self, string) => { - if (self.level <= 0 || !string) { - return self[IS_EMPTY] ? "" : string; - } - let styler = self[STYLER]; - if (styler === void 0) { - return string; - } - const { openAll, closeAll } = styler; - if (string.includes("\x1B")) { - while (styler !== void 0) { - string = stringReplaceAll2(string, styler.close, styler.open); - styler = styler.parent; - } - } - const lfIndex = string.indexOf("\n"); - if (lfIndex !== -1) { - string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); - } - return openAll + string + closeAll; -}; -Object.defineProperties(createChalk.prototype, styles2); -var chalk = createChalk(); -var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 }); -var source_default = chalk; - -// node_modules/ansi-regex/index.js -function ansiRegex({ onlyFirst = false } = {}) { - const pattern = [ - "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", - "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" - ].join("|"); - return new RegExp(pattern, onlyFirst ? void 0 : "g"); -} - -// node_modules/strip-ansi/index.js -var regex = ansiRegex(); -function stripAnsi(string) { - if (typeof string !== "string") { - throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); - } - return string.replace(regex, ""); -} -// src/cli/logger.js -var import_wcwidth = __toESM(require_wcwidth(), 1); -var countLines = (stream, text) => { - const columns = stream.columns || 80; - let lineCount = 0; - for (const line of stripAnsi(text).split("\n")) { - lineCount += Math.max(1, Math.ceil((0, import_wcwidth.default)(line) / columns)); - } - return lineCount; -}; -var clear = (stream, text) => () => { - const lineCount = countLines(stream, text); - for (let line = 0; line < lineCount; line++) { - if (line > 0) { - readline.moveCursor(stream, 0, -1); - } - readline.clearLine(stream, 0); - readline.cursorTo(stream, 0); - } -}; -var emptyLogResult = { - clear() { - } -}; -function createLogger(logLevel = "log") { - return { - logLevel, - warn: createLogFunc("warn", "yellow"), - error: createLogFunc("error", "red"), - debug: createLogFunc("debug", "blue"), - log: createLogFunc("log") - }; - function createLogFunc(loggerName, color) { - if (!shouldLog(loggerName)) { - return () => emptyLogResult; - } - const stream = process[loggerName === "log" ? "stdout" : "stderr"]; - const chalkInstance = loggerName === "log" ? source_default : chalkStderr; - const prefix = color ? `[${chalkInstance[color](loggerName)}] ` : ""; - return (message, options) => { - options = { - newline: true, - clearable: false, - ...options - }; - message = string_replace_all_default( - /* isOptionalObject*/ - false, - message, - /^/gm, - prefix - ) + (options.newline ? "\n" : ""); - stream.write(message); - if (options.clearable) { - return { - clear: clear(stream, message) - }; - } - }; - } - function shouldLog(loggerName) { - switch (logLevel) { - case "silent": - return false; - case "debug": - if (loggerName === "debug") { - return true; - } - case "log": - if (loggerName === "log") { - return true; - } - case "warn": - if (loggerName === "warn") { +// node_modules/wcwidth.js/index.js +var require_wcwidth = __commonJS({ + "node_modules/wcwidth.js/index.js"(exports, module) { + var combining = require_combining(); + var DEFAULTS = { + nul: 0, + control: 0 + }; + function bisearch(ucs) { + let min = 0; + let max = combining.length - 1; + let mid; + if (ucs < combining[0][0] || ucs > combining[max][1]) + return false; + while (max >= min) { + mid = Math.floor((min + max) / 2); + if (ucs > combining[mid][1]) + min = mid + 1; + else if (ucs < combining[mid][0]) + max = mid - 1; + else return true; + } + return false; + } + function wcwidth2(ucs, opts) { + if (ucs === 0) + return opts.nul; + if (ucs < 32 || ucs >= 127 && ucs < 160) + return opts.control; + if (bisearch(ucs)) + return 0; + return 1 + (ucs >= 4352 && (ucs <= 4447 || // Hangul Jamo init. consonants + ucs == 9001 || ucs == 9002 || ucs >= 11904 && ucs <= 42191 && ucs != 12351 || // CJK ... Yi + ucs >= 44032 && ucs <= 55203 || // Hangul Syllables + ucs >= 63744 && ucs <= 64255 || // CJK Compatibility Ideographs + ucs >= 65040 && ucs <= 65049 || // Vertical forms + ucs >= 65072 && ucs <= 65135 || // CJK Compatibility Forms + ucs >= 65280 && ucs <= 65376 || // Fullwidth Forms + ucs >= 65504 && ucs <= 65510 || ucs >= 131072 && ucs <= 196605 || ucs >= 196608 && ucs <= 262141)); + } + function wcswidth(str, opts) { + let h; + let l; + let s = 0; + let n; + if (typeof str !== "string") + return wcwidth2(str, opts); + for (let i = 0; i < str.length; i++) { + h = str.charCodeAt(i); + if (h >= 55296 && h <= 56319) { + l = str.charCodeAt(++i); + if (l >= 56320 && l <= 57343) { + h = (h - 55296) * 1024 + (l - 56320) + 65536; + } else { + i--; + } } - case "error": - return loggerName === "error"; + n = wcwidth2(h, opts); + if (n < 0) + return -1; + s += n; + } + return s; } + module.exports = (str) => wcswidth(str, DEFAULTS); + module.exports.config = (opts = {}) => { + opts = { + ...DEFAULTS, + ...opts + }; + return (str) => wcswidth(str, opts); + }; } -} -var logger_default = createLogger; +}); + +// src/cli/index.js +import * as prettier2 from "../index.mjs"; // scripts/build/shims/at.js var at = (isOptionalObject, object, index) => { @@ -5397,20 +4645,6 @@ var at_default = at; var import_dashify = __toESM(require_dashify(), 1); import { getSupportInfo } from "../index.mjs"; -// src/cli/prettier-internal.js -import { __internal as sharedWithCli } from "../index.mjs"; -var { - errors, - optionCategories, - createIsIgnoredFunction, - formatOptionsHiddenDefaults, - normalizeOptions, - getSupportInfoWithoutPlugins, - normalizeOptionSettings, - vnopts, - fastGlob -} = sharedWithCli; - // src/cli/cli-options.evaluate.js var cli_options_evaluate_default = { "cache": { @@ -5566,297 +4800,816 @@ var cli_options_evaluate_default = { "description": "Print Prettier version.", "type": "boolean" }, - "withNodeModules": { - "category": "Config", - "description": "Process files inside 'node_modules' directory.", - "type": "boolean" + "withNodeModules": { + "category": "Config", + "description": "Process files inside 'node_modules' directory.", + "type": "boolean" + }, + "write": { + "alias": "w", + "category": "Output", + "description": "Edit files in-place. (Beware!)", + "type": "boolean" + } +}; + +// src/cli/prettier-internal.js +import { __internal as sharedWithCli } from "../index.mjs"; +var { + errors, + optionCategories, + createIsIgnoredFunction, + formatOptionsHiddenDefaults, + normalizeOptions, + getSupportInfoWithoutPlugins, + normalizeOptionSettings, + vnopts, + fastGlob, + mockable +} = sharedWithCli; + +// src/cli/options/get-context-options.js +var detailedCliOptions = normalizeOptionSettings(cli_options_evaluate_default).map( + (option) => normalizeDetailedOption(option) +); +function apiOptionToCliOption(apiOption) { + const cliOption = { + ...apiOption, + description: apiOption.cliDescription ?? apiOption.description, + category: apiOption.cliCategory ?? optionCategories.CATEGORY_FORMAT, + forwardToApi: apiOption.name + }; + if (apiOption.deprecated) { + delete cliOption.forwardToApi; + delete cliOption.description; + delete cliOption.oppositeDescription; + cliOption.deprecated = true; + } + return normalizeDetailedOption(cliOption); +} +function normalizeDetailedOption(option) { + var _a; + return { + category: optionCategories.CATEGORY_OTHER, + ...option, + name: option.cliName ?? (0, import_dashify.default)(option.name), + choices: (_a = option.choices) == null ? void 0 : _a.map((choice) => { + const newChoice = { + description: "", + deprecated: false, + ...typeof choice === "object" ? choice : { value: choice } + }; + if (newChoice.value === true) { + newChoice.value = ""; + } + return newChoice; + }) + }; +} +function supportInfoToContextOptions({ options: supportOptions, languages }) { + const detailedOptions = [ + ...detailedCliOptions, + ...supportOptions.map((apiOption) => apiOptionToCliOption(apiOption)) + ]; + return { + supportOptions, + languages, + detailedOptions + }; +} +async function getContextOptions(plugins) { + const supportInfo = await getSupportInfo({ + showDeprecated: true, + plugins + }); + return supportInfoToContextOptions(supportInfo); +} +function getContextOptionsWithoutPlugins() { + const supportInfo = getSupportInfoWithoutPlugins(); + return supportInfoToContextOptions(supportInfo); +} + +// scripts/build/shims/string-replace-all.js +var stringReplaceAll = (isOptionalObject, original, pattern, replacement) => { + if (isOptionalObject && (original === void 0 || original === null)) { + return; + } + if (original.replaceAll) { + return original.replaceAll(pattern, replacement); + } + if (pattern.global) { + return original.replace(pattern, replacement); + } + return original.split(pattern).join(replacement); +}; +var string_replace_all_default = stringReplaceAll; + +// node_modules/camelcase/index.js +var UPPERCASE = /[\p{Lu}]/u; +var LOWERCASE = /[\p{Ll}]/u; +var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu; +var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u; +var SEPARATORS = /[_.\- ]+/; +var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source); +var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu"); +var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu"); +var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => { + let isLastCharLower = false; + let isLastCharUpper = false; + let isLastLastCharUpper = false; + let isLastLastCharPreserved = false; + for (let index = 0; index < string.length; index++) { + const character = string[index]; + isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true; + if (isLastCharLower && UPPERCASE.test(character)) { + string = string.slice(0, index) + "-" + string.slice(index); + isLastCharLower = false; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = true; + index++; + } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) { + string = string.slice(0, index - 1) + "-" + string.slice(index - 1); + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = false; + isLastCharLower = true; + } else { + isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character; + isLastLastCharUpper = isLastCharUpper; + isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character; + } + } + return string; +}; +var preserveConsecutiveUppercase = (input, toLowerCase) => { + LEADING_CAPITAL.lastIndex = 0; + return string_replace_all_default( + /* isOptionalObject*/ + false, + input, + LEADING_CAPITAL, + (match) => toLowerCase(match) + ); +}; +var postProcess = (input, toUpperCase) => { + SEPARATORS_AND_IDENTIFIER.lastIndex = 0; + NUMBERS_AND_IDENTIFIER.lastIndex = 0; + return string_replace_all_default( + /* isOptionalObject*/ + false, + string_replace_all_default( + /* isOptionalObject*/ + false, + input, + NUMBERS_AND_IDENTIFIER, + (match, pattern, offset) => ["_", "-"].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match) + ), + SEPARATORS_AND_IDENTIFIER, + (_, identifier) => toUpperCase(identifier) + ); +}; +function camelCase(input, options) { + if (!(typeof input === "string" || Array.isArray(input))) { + throw new TypeError("Expected the input to be `string | string[]`"); + } + options = { + pascalCase: false, + preserveConsecutiveUppercase: false, + ...options + }; + if (Array.isArray(input)) { + input = input.map((x) => x.trim()).filter((x) => x.length).join("-"); + } else { + input = input.trim(); + } + if (input.length === 0) { + return ""; + } + const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale); + const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale); + if (input.length === 1) { + if (SEPARATORS.test(input)) { + return ""; + } + return options.pascalCase ? toUpperCase(input) : toLowerCase(input); + } + const hasUpperCase = input !== toLowerCase(input); + if (hasUpperCase) { + input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase); + } + input = input.replace(LEADING_SEPARATORS, ""); + input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input); + if (options.pascalCase) { + input = toUpperCase(input.charAt(0)) + input.slice(1); + } + return postProcess(input, toUpperCase); +} + +// src/cli/utils.js +import fs from "fs/promises"; +import path from "path"; + +// node_modules/sdbm/index.js +function sdbm(string) { + let hash = 0; + for (let i = 0; i < string.length; i++) { + hash = string.charCodeAt(i) + (hash << 6) + (hash << 16) - hash; + } + return hash >>> 0; +} + +// src/cli/utils.js +import { __internal as sharedWithCli2 } from "../index.mjs"; +var printToScreen = console.log.bind(console); +function groupBy(array2, iteratee) { + const result = /* @__PURE__ */ Object.create(null); + for (const value of array2) { + const key = iteratee(value); + if (Array.isArray(result[key])) { + result[key].push(value); + } else { + result[key] = [value]; + } + } + return result; +} +function pick(object, keys) { + const entries = keys.map((key) => [key, object[key]]); + return Object.fromEntries(entries); +} +function createHash(source) { + return String(sdbm(source)); +} +async function statSafe(filePath) { + try { + return await fs.stat(filePath); + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + } +} +async function lstatSafe(filePath) { + try { + return await fs.lstat(filePath); + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + } +} +function isJson(value) { + try { + JSON.parse(value); + return true; + } catch { + return false; + } +} +var normalizeToPosix = path.sep === "\\" ? (filepath) => string_replace_all_default( + /* isOptionalObject*/ + false, + filepath, + "\\", + "/" +) : (filepath) => filepath; +var { + isNonEmptyArray, + partition, + omit +} = sharedWithCli2.utils; + +// src/cli/options/create-minimist-options.js +function createMinimistOptions(detailedOptions) { + const booleanNames = []; + const stringNames = []; + const defaultValues = {}; + for (const option of detailedOptions) { + const { name, alias, type } = option; + const names = type === "boolean" ? booleanNames : stringNames; + names.push(name); + if (alias) { + names.push(alias); + } + if (!option.deprecated && (!option.forwardToApi || name === "plugin") && option.default !== void 0) { + defaultValues[option.name] = option.default; + } + } + return { + // we use vnopts' AliasSchema to handle aliases for better error messages + alias: {}, + boolean: booleanNames, + string: stringNames, + default: defaultValues + }; +} + +// src/cli/options/minimist.js +var import_minimist = __toESM(require_minimist(), 1); +var PLACEHOLDER = null; +function minimistParse(args, options) { + const boolean = options.boolean ?? []; + const defaults = options.default ?? {}; + const booleanWithoutDefault = boolean.filter((key) => !(key in defaults)); + const newDefaults = { + ...defaults, + ...Object.fromEntries( + booleanWithoutDefault.map((key) => [key, PLACEHOLDER]) + ) + }; + const parsed = (0, import_minimist.default)(args, { ...options, default: newDefaults }); + return Object.fromEntries( + Object.entries(parsed).filter(([, value]) => value !== PLACEHOLDER) + ); +} + +// node_modules/chalk/source/vendor/ansi-styles/index.js +var ANSI_BACKGROUND_OFFSET = 10; +var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`; +var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`; +var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`; +var styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + overline: [53, 55], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + // Bright color + blackBright: [90, 39], + gray: [90, 39], + // Alias of `blackBright` + grey: [90, 39], + // Alias of `blackBright` + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] }, - "write": { - "alias": "w", - "category": "Output", - "description": "Edit files in-place. (Beware!)", - "type": "boolean" + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + // Bright color + bgBlackBright: [100, 49], + bgGray: [100, 49], + // Alias of `bgBlackBright` + bgGrey: [100, 49], + // Alias of `bgBlackBright` + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] } }; +var modifierNames = Object.keys(styles.modifier); +var foregroundColorNames = Object.keys(styles.color); +var backgroundColorNames = Object.keys(styles.bgColor); +var colorNames = [...foregroundColorNames, ...backgroundColorNames]; +function assembleStyles() { + const codes = /* @__PURE__ */ new Map(); + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\x1B[${style[0]}m`, + close: `\x1B[${style[1]}m` + }; + group[styleName] = styles[styleName]; + codes.set(style[0], style[1]); + } + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + Object.defineProperty(styles, "codes", { + value: codes, + enumerable: false + }); + styles.color.close = "\x1B[39m"; + styles.bgColor.close = "\x1B[49m"; + styles.color.ansi = wrapAnsi16(); + styles.color.ansi256 = wrapAnsi256(); + styles.color.ansi16m = wrapAnsi16m(); + styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); + Object.defineProperties(styles, { + rgbToAnsi256: { + value(red, green, blue) { + if (red === green && green === blue) { + if (red < 8) { + return 16; + } + if (red > 248) { + return 231; + } + return Math.round((red - 8) / 247 * 24) + 232; + } + return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5); + }, + enumerable: false + }, + hexToRgb: { + value(hex) { + const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); + if (!matches) { + return [0, 0, 0]; + } + let [colorString] = matches; + if (colorString.length === 3) { + colorString = [...colorString].map((character) => character + character).join(""); + } + const integer = Number.parseInt(colorString, 16); + return [ + /* eslint-disable no-bitwise */ + integer >> 16 & 255, + integer >> 8 & 255, + integer & 255 + /* eslint-enable no-bitwise */ + ]; + }, + enumerable: false + }, + hexToAnsi256: { + value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), + enumerable: false + }, + ansi256ToAnsi: { + value(code) { + if (code < 8) { + return 30 + code; + } + if (code < 16) { + return 90 + (code - 8); + } + let red; + let green; + let blue; + if (code >= 232) { + red = ((code - 232) * 10 + 8) / 255; + green = red; + blue = red; + } else { + code -= 16; + const remainder = code % 36; + red = Math.floor(code / 36) / 5; + green = Math.floor(remainder / 6) / 5; + blue = remainder % 6 / 5; + } + const value = Math.max(red, green, blue) * 2; + if (value === 0) { + return 30; + } + let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red)); + if (value === 2) { + result += 60; + } + return result; + }, + enumerable: false + }, + rgbToAnsi: { + value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), + enumerable: false + }, + hexToAnsi: { + value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), + enumerable: false + } + }); + return styles; +} +var ansiStyles = assembleStyles(); +var ansi_styles_default = ansiStyles; -// src/cli/options/get-context-options.js -var detailedCliOptions = normalizeOptionSettings(cli_options_evaluate_default).map( - (option) => normalizeDetailedOption(option) -); -function apiOptionToCliOption(apiOption) { - const cliOption = { - ...apiOption, - description: apiOption.cliDescription ?? apiOption.description, - category: apiOption.cliCategory ?? optionCategories.CATEGORY_FORMAT, - forwardToApi: apiOption.name - }; - if (apiOption.deprecated) { - delete cliOption.forwardToApi; - delete cliOption.description; - delete cliOption.oppositeDescription; - cliOption.deprecated = true; - } - return normalizeDetailedOption(cliOption); +// node_modules/chalk/source/vendor/supports-color/index.js +import process2 from "process"; +import os from "os"; +import tty from "tty"; +function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) { + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const position = argv.indexOf(prefix + flag); + const terminatorPosition = argv.indexOf("--"); + return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); } -function normalizeDetailedOption(option) { - var _a; - return { - category: optionCategories.CATEGORY_OTHER, - ...option, - name: option.cliName ?? (0, import_dashify.default)(option.name), - choices: (_a = option.choices) == null ? void 0 : _a.map((choice) => { - const newChoice = { - description: "", - deprecated: false, - ...typeof choice === "object" ? choice : { value: choice } - }; - if (newChoice.value === true) { - newChoice.value = ""; - } - return newChoice; - }) - }; +var { env } = process2; +var flagForceColor; +if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { + flagForceColor = 0; +} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + flagForceColor = 1; } -function supportInfoToContextOptions({ options: supportOptions, languages }) { - const detailedOptions = [ - ...detailedCliOptions, - ...supportOptions.map((apiOption) => apiOptionToCliOption(apiOption)) - ]; +function envForceColor() { + if ("FORCE_COLOR" in env) { + if (env.FORCE_COLOR === "true") { + return 1; + } + if (env.FORCE_COLOR === "false") { + return 0; + } + return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); + } +} +function translateLevel(level) { + if (level === 0) { + return false; + } return { - supportOptions, - languages, - detailedOptions + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 }; } -async function getContextOptions(plugins) { - const supportInfo = await getSupportInfo({ - showDeprecated: true, - plugins - }); - return supportInfoToContextOptions(supportInfo); -} -function getContextOptionsWithoutPlugins() { - const supportInfo = getSupportInfoWithoutPlugins(); - return supportInfoToContextOptions(supportInfo); -} - -// node_modules/camelcase/index.js -var UPPERCASE = /[\p{Lu}]/u; -var LOWERCASE = /[\p{Ll}]/u; -var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu; -var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u; -var SEPARATORS = /[_.\- ]+/; -var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source); -var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu"); -var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu"); -var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - let isLastLastCharPreserved = false; - for (let index = 0; index < string.length; index++) { - const character = string[index]; - isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true; - if (isLastCharLower && UPPERCASE.test(character)) { - string = string.slice(0, index) + "-" + string.slice(index); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - index++; - } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) { - string = string.slice(0, index - 1) + "-" + string.slice(index - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character; +function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { + const noFlagForceColor = envForceColor(); + if (noFlagForceColor !== void 0) { + flagForceColor = noFlagForceColor; + } + const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; + if (forceColor === 0) { + return 0; + } + if (sniffFlags) { + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; + } + if (hasFlag("color=256")) { + return 2; } } - return string; -}; -var preserveConsecutiveUppercase = (input, toLowerCase) => { - LEADING_CAPITAL.lastIndex = 0; - return string_replace_all_default( - /* isOptionalObject*/ - false, - input, - LEADING_CAPITAL, - (match) => toLowerCase(match) - ); -}; -var postProcess = (input, toUpperCase) => { - SEPARATORS_AND_IDENTIFIER.lastIndex = 0; - NUMBERS_AND_IDENTIFIER.lastIndex = 0; - return string_replace_all_default( - /* isOptionalObject*/ - false, - string_replace_all_default( - /* isOptionalObject*/ - false, - input, - NUMBERS_AND_IDENTIFIER, - (match, pattern, offset) => ["_", "-"].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match) - ), - SEPARATORS_AND_IDENTIFIER, - (_, identifier) => toUpperCase(identifier) - ); -}; -function camelCase(input, options) { - if (!(typeof input === "string" || Array.isArray(input))) { - throw new TypeError("Expected the input to be `string | string[]`"); + if ("TF_BUILD" in env && "AGENT_NAME" in env) { + return 1; + } + if (haveStream && !streamIsTTY && forceColor === void 0) { + return 0; + } + const min = forceColor || 0; + if (env.TERM === "dumb") { + return min; + } + if (process2.platform === "win32") { + const osRelease = os.release().split("."); + if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + return 1; + } + if ("CI" in env) { + if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) { + return 3; + } + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; } - options = { - pascalCase: false, - preserveConsecutiveUppercase: false, - ...options - }; - if (Array.isArray(input)) { - input = input.map((x) => x.trim()).filter((x) => x.length).join("-"); - } else { - input = input.trim(); + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; } - if (input.length === 0) { - return ""; + if (env.COLORTERM === "truecolor") { + return 3; } - const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale); - const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale); - if (input.length === 1) { - if (SEPARATORS.test(input)) { - return ""; + if (env.TERM === "xterm-kitty") { + return 3; + } + if ("TERM_PROGRAM" in env) { + const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": { + return version2 >= 3 ? 3 : 2; + } + case "Apple_Terminal": { + return 2; + } } - return options.pascalCase ? toUpperCase(input) : toLowerCase(input); } - const hasUpperCase = input !== toLowerCase(input); - if (hasUpperCase) { - input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase); + if (/-256(color)?$/i.test(env.TERM)) { + return 2; } - input = input.replace(LEADING_SEPARATORS, ""); - input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input); - if (options.pascalCase) { - input = toUpperCase(input.charAt(0)) + input.slice(1); + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; } - return postProcess(input, toUpperCase); -} - -// src/cli/utils.js -import fs from "fs/promises"; -import path from "path"; - -// node_modules/sdbm/index.js -function sdbm(string) { - let hash = 0; - for (let i = 0; i < string.length; i++) { - hash = string.charCodeAt(i) + (hash << 6) + (hash << 16) - hash; + if ("COLORTERM" in env) { + return 1; } - return hash >>> 0; + return min; +} +function createSupportsColor(stream, options = {}) { + const level = _supportsColor(stream, { + streamIsTTY: stream && stream.isTTY, + ...options + }); + return translateLevel(level); } +var supportsColor = { + stdout: createSupportsColor({ isTTY: tty.isatty(1) }), + stderr: createSupportsColor({ isTTY: tty.isatty(2) }) +}; +var supports_color_default = supportsColor; -// src/cli/utils.js -import { __internal as sharedWithCli2 } from "../index.mjs"; -var printToScreen = console.log.bind(console); -function groupBy(array2, iteratee) { - const result = /* @__PURE__ */ Object.create(null); - for (const value of array2) { - const key = iteratee(value); - if (Array.isArray(result[key])) { - result[key].push(value); - } else { - result[key] = [value]; - } +// node_modules/chalk/source/utilities.js +function stringReplaceAll2(string, substring, replacer) { + let index = string.indexOf(substring); + if (index === -1) { + return string; } - return result; + const substringLength = substring.length; + let endIndex = 0; + let returnValue = ""; + do { + returnValue += string.slice(endIndex, index) + substring + replacer; + endIndex = index + substringLength; + index = string.indexOf(substring, endIndex); + } while (index !== -1); + returnValue += string.slice(endIndex); + return returnValue; } -function pick(object, keys) { - const entries = keys.map((key) => [key, object[key]]); - return Object.fromEntries(entries); +function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) { + let endIndex = 0; + let returnValue = ""; + do { + const gotCR = string[index - 1] === "\r"; + returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix; + endIndex = index + 1; + index = string.indexOf("\n", endIndex); + } while (index !== -1); + returnValue += string.slice(endIndex); + return returnValue; } -function createHash(source) { - return String(sdbm(source)); + +// node_modules/chalk/source/index.js +var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default; +var GENERATOR = Symbol("GENERATOR"); +var STYLER = Symbol("STYLER"); +var IS_EMPTY = Symbol("IS_EMPTY"); +var levelMapping = [ + "ansi", + "ansi", + "ansi256", + "ansi16m" +]; +var styles2 = /* @__PURE__ */ Object.create(null); +var applyOptions = (object, options = {}) => { + if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { + throw new Error("The `level` option should be an integer from 0 to 3"); + } + const colorLevel = stdoutColor ? stdoutColor.level : 0; + object.level = options.level === void 0 ? colorLevel : options.level; +}; +var chalkFactory = (options) => { + const chalk2 = (...strings) => strings.join(" "); + applyOptions(chalk2, options); + Object.setPrototypeOf(chalk2, createChalk.prototype); + return chalk2; +}; +function createChalk(options) { + return chalkFactory(options); } -async function statSafe(filePath) { - try { - return await fs.stat(filePath); - } catch (error) { - if (error.code !== "ENOENT") { - throw error; +Object.setPrototypeOf(createChalk.prototype, Function.prototype); +for (const [styleName, style] of Object.entries(ansi_styles_default)) { + styles2[styleName] = { + get() { + const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]); + Object.defineProperty(this, styleName, { value: builder }); + return builder; } - } + }; } -async function lstatSafe(filePath) { - try { - return await fs.lstat(filePath); - } catch (error) { - if (error.code !== "ENOENT") { - throw error; +styles2.visible = { + get() { + const builder = createBuilder(this, this[STYLER], true); + Object.defineProperty(this, "visible", { value: builder }); + return builder; + } +}; +var getModelAnsi = (model, level, type, ...arguments_) => { + if (model === "rgb") { + if (level === "ansi16m") { + return ansi_styles_default[type].ansi16m(...arguments_); } + if (level === "ansi256") { + return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_)); + } + return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_)); } -} -function isJson(value) { - try { - JSON.parse(value); - return true; - } catch { - return false; + if (model === "hex") { + return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_)); } -} -var normalizeToPosix = path.sep === "\\" ? (filepath) => string_replace_all_default( - /* isOptionalObject*/ - false, - filepath, - "\\", - "/" -) : (filepath) => filepath; -var { - isNonEmptyArray, - partition, - omit -} = sharedWithCli2.utils; - -// src/cli/options/minimist.js -var import_minimist = __toESM(require_minimist(), 1); -var PLACEHOLDER = null; -function minimistParse(args, options) { - const boolean = options.boolean ?? []; - const defaults = options.default ?? {}; - const booleanWithoutDefault = boolean.filter((key) => !(key in defaults)); - const newDefaults = { - ...defaults, - ...Object.fromEntries( - booleanWithoutDefault.map((key) => [key, PLACEHOLDER]) - ) + return ansi_styles_default[type][model](...arguments_); +}; +var usedModels = ["rgb", "hex", "ansi256"]; +for (const model of usedModels) { + styles2[model] = { + get() { + const { level } = this; + return function(...arguments_) { + const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]); + return createBuilder(this, styler, this[IS_EMPTY]); + }; + } }; - const parsed = (0, import_minimist.default)(args, { ...options, default: newDefaults }); - return Object.fromEntries( - Object.entries(parsed).filter(([, value]) => value !== PLACEHOLDER) - ); -} - -// src/cli/options/create-minimist-options.js -function createMinimistOptions(detailedOptions) { - const booleanNames = []; - const stringNames = []; - const defaultValues = {}; - for (const option of detailedOptions) { - const { name, alias, type } = option; - const names = type === "boolean" ? booleanNames : stringNames; - names.push(name); - if (alias) { - names.push(alias); + const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); + styles2[bgModel] = { + get() { + const { level } = this; + return function(...arguments_) { + const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]); + return createBuilder(this, styler, this[IS_EMPTY]); + }; } - if (!option.deprecated && (!option.forwardToApi || name === "plugin") && option.default !== void 0) { - defaultValues[option.name] = option.default; + }; +} +var proto = Object.defineProperties(() => { +}, { + ...styles2, + level: { + enumerable: true, + get() { + return this[GENERATOR].level; + }, + set(level) { + this[GENERATOR].level = level; } } +}); +var createStyler = (open, close, parent) => { + let openAll; + let closeAll; + if (parent === void 0) { + openAll = open; + closeAll = close; + } else { + openAll = parent.openAll + open; + closeAll = close + parent.closeAll; + } return { - // we use vnopts' AliasSchema to handle aliases for better error messages - alias: {}, - boolean: booleanNames, - string: stringNames, - default: defaultValues + open, + close, + openAll, + closeAll, + parent }; -} +}; +var createBuilder = (self, _styler, _isEmpty) => { + const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); + Object.setPrototypeOf(builder, proto); + builder[GENERATOR] = self; + builder[STYLER] = _styler; + builder[IS_EMPTY] = _isEmpty; + return builder; +}; +var applyStyle = (self, string) => { + if (self.level <= 0 || !string) { + return self[IS_EMPTY] ? "" : string; + } + let styler = self[STYLER]; + if (styler === void 0) { + return string; + } + const { openAll, closeAll } = styler; + if (string.includes("\x1B")) { + while (styler !== void 0) { + string = stringReplaceAll2(string, styler.close, styler.open); + styler = styler.parent; + } + } + const lfIndex = string.indexOf("\n"); + if (lfIndex !== -1) { + string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); + } + return openAll + string + closeAll; +}; +Object.defineProperties(createChalk.prototype, styles2); +var chalk = createChalk(); +var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 }); +var source_default = chalk; // node_modules/leven/index.js var array = []; @@ -5973,234 +5726,135 @@ function parseArgv(rawArguments, detailedOptions, logger, keys) { _: (_a = normalized._) == null ? void 0 : _a.map(String), get __raw() { return argv; - } - }; -} -var { detailedOptions: detailedOptionsWithoutPlugins } = getContextOptionsWithoutPlugins(); -function parseArgvWithoutPlugins(rawArguments, logger, keys) { - return parseArgv( - rawArguments, - detailedOptionsWithoutPlugins, - logger, - typeof keys === "string" ? [keys] : keys - ); -} - -// src/cli/context.js -var _stack; -var Context = class { - constructor({ - rawArguments, - logger - }) { - __privateAdd(this, _stack, []); - this.rawArguments = rawArguments; - this.logger = logger; - } - async init() { - const { - rawArguments, - logger - } = this; - const { - plugins - } = parseArgvWithoutPlugins(rawArguments, logger, ["plugin"]); - await this.pushContextPlugins(plugins); - const argv = parseArgv(rawArguments, this.detailedOptions, logger); - this.argv = argv; - this.filePatterns = argv._; - } - /** - * @param {string[]} plugins - */ - async pushContextPlugins(plugins) { - const options = await getContextOptions(plugins); - __privateGet(this, _stack).push(options); - Object.assign(this, options); - } - popContextPlugins() { - __privateGet(this, _stack).pop(); - Object.assign(this, at_default( - /* isOptionalObject*/ - false, - __privateGet(this, _stack), - -1 - )); - } - // eslint-disable-next-line getter-return - get performanceTestFlag() { - const { - debugBenchmark, - debugRepeat - } = this.argv; - if (debugBenchmark) { - return { - name: "--debug-benchmark", - debugBenchmark: true - }; - } - if (debugRepeat > 0) { - return { - name: "--debug-repeat", - debugRepeat - }; - } - const { - PRETTIER_PERF_REPEAT - } = process.env; - if (PRETTIER_PERF_REPEAT && /^\d+$/.test(PRETTIER_PERF_REPEAT)) { - return { - name: "PRETTIER_PERF_REPEAT (environment variable)", - debugRepeat: Number(PRETTIER_PERF_REPEAT) - }; - } - } -}; -_stack = new WeakMap(); -var context_default = Context; - -// src/cli/constants.evaluate.js -var categoryOrder = [ - "Output", - "Format", - "Config", - "Editor", - "Other" -]; -var usageSummary = "Usage: prettier [options] [file/dir/glob ...]\n\nBy default, output is written to stdout.\nStdin is read if it is piped to Prettier and no files are given."; - -// src/cli/usage.js -var OPTION_USAGE_THRESHOLD = 25; -var CHOICE_USAGE_MARGIN = 3; -var CHOICE_USAGE_INDENTATION = 2; -function indent(str, spaces) { - return string_replace_all_default( - /* isOptionalObject*/ - false, - str, - /^/gm, - " ".repeat(spaces) - ); -} -function createDefaultValueDisplay(value) { - return Array.isArray(value) ? `[${value.map(createDefaultValueDisplay).join(", ")}]` : value; -} -function getOptionDefaultValue(context, optionName) { - var _a; - const option = context.detailedOptions.find(({ - name - }) => name === optionName); - if ((option == null ? void 0 : option.default) !== void 0) { - return option.default; - } - const optionCamelName = camelCase(optionName); - return formatOptionsHiddenDefaults[optionCamelName] ?? ((_a = context.supportOptions.find((option2) => !option2.deprecated && option2.name === optionCamelName)) == null ? void 0 : _a.default); -} -function createOptionUsageHeader(option) { - const name = `--${option.name}`; - const alias = option.alias ? `-${option.alias},` : null; - const type = createOptionUsageType(option); - return [alias, name, type].filter(Boolean).join(" "); -} -function createOptionUsageRow(header, content, threshold) { - const separator = header.length >= threshold ? ` -${" ".repeat(threshold)}` : " ".repeat(threshold - header.length); - const description = string_replace_all_default( - /* isOptionalObject*/ - false, - content, - "\n", - ` -${" ".repeat(threshold)}` - ); - return `${header}${separator}${description}`; -} -function createOptionUsageType(option) { - switch (option.type) { - case "boolean": - return null; - case "choice": - return `<${option.choices.filter((choice) => !choice.deprecated).map((choice) => choice.value).join("|")}>`; - default: - return `<${option.type}>`; - } -} -function createChoiceUsages(choices, margin, indentation) { - const activeChoices = choices.filter((choice) => !choice.deprecated); - const threshold = Math.max(0, ...activeChoices.map((choice) => choice.value.length)) + margin; - return activeChoices.map((choice) => indent(createOptionUsageRow(choice.value, choice.description, threshold), indentation)); -} -function createOptionUsage(context, option, threshold) { - const header = createOptionUsageHeader(option); - const optionDefaultValue = getOptionDefaultValue(context, option.name); - return createOptionUsageRow(header, `${option.description}${optionDefaultValue === void 0 ? "" : ` -Defaults to ${createDefaultValueDisplay(optionDefaultValue)}.`}`, threshold); -} -function getOptionsWithOpposites(options) { - const optionsWithOpposites = options.map((option) => [option.description ? option : null, option.oppositeDescription ? { - ...option, - name: `no-${option.name}`, - type: "boolean", - description: option.oppositeDescription - } : null]); - return optionsWithOpposites.flat().filter(Boolean); -} -function createUsage(context) { - const sortedOptions = context.detailedOptions.sort((optionA, optionB) => optionA.name.localeCompare(optionB.name)); - const options = getOptionsWithOpposites(sortedOptions).filter( - // remove unnecessary option (e.g. `semi`, `color`, etc.), which is only used for --help - (option) => !(option.type === "boolean" && option.oppositeDescription && !option.name.startsWith("no-")) - ); - const groupedOptions = groupBy(options, (option) => option.category); - const firstCategories = categoryOrder.slice(0, -1); - const lastCategories = categoryOrder.slice(-1); - const restCategories = Object.keys(groupedOptions).filter((category) => !categoryOrder.includes(category)); - const allCategories = [...firstCategories, ...restCategories, ...lastCategories]; - const optionsUsage = allCategories.map((category) => { - const categoryOptions = groupedOptions[category].map((option) => createOptionUsage(context, option, OPTION_USAGE_THRESHOLD)).join("\n"); - return `${category} options: - -${indent(categoryOptions, 2)}`; - }); - return [usageSummary, ...optionsUsage, ""].join("\n\n"); + } + }; } -function createPluginDefaults(pluginDefaults) { - if (!pluginDefaults || Object.keys(pluginDefaults).length === 0) { - return ""; - } - const defaults = Object.entries(pluginDefaults).sort(([pluginNameA], [pluginNameB]) => pluginNameA.localeCompare(pluginNameB)).map(([plugin, value]) => `* ${plugin}: ${createDefaultValueDisplay(value)}`).join("\n"); - return ` -Plugin defaults: -${defaults}`; +var { detailedOptions: detailedOptionsWithoutPlugins } = getContextOptionsWithoutPlugins(); +function parseArgvWithoutPlugins(rawArguments, logger, keys) { + return parseArgv( + rawArguments, + detailedOptionsWithoutPlugins, + logger, + typeof keys === "string" ? [keys] : keys + ); } -function createDetailedUsage(context, flag) { - const option = getOptionsWithOpposites(context.detailedOptions).find((option2) => option2.name === flag || option2.alias === flag); - const header = createOptionUsageHeader(option); - const description = ` - -${indent(option.description, 2)}`; - const choices = option.type !== "choice" ? "" : ` -Valid options: +// src/cli/context.js +var _stack; +var Context = class { + constructor({ + rawArguments, + logger + }) { + __privateAdd(this, _stack, []); + this.rawArguments = rawArguments; + this.logger = logger; + } + async init() { + const { + rawArguments, + logger + } = this; + const { + plugins + } = parseArgvWithoutPlugins(rawArguments, logger, ["plugin"]); + await this.pushContextPlugins(plugins); + const argv = parseArgv(rawArguments, this.detailedOptions, logger); + this.argv = argv; + this.filePatterns = argv._; + } + /** + * @param {string[]} plugins + */ + async pushContextPlugins(plugins) { + const options = await getContextOptions(plugins); + __privateGet(this, _stack).push(options); + Object.assign(this, options); + } + popContextPlugins() { + __privateGet(this, _stack).pop(); + Object.assign(this, at_default( + /* isOptionalObject*/ + false, + __privateGet(this, _stack), + -1 + )); + } + // eslint-disable-next-line getter-return + get performanceTestFlag() { + const { + debugBenchmark, + debugRepeat + } = this.argv; + if (debugBenchmark) { + return { + name: "--debug-benchmark", + debugBenchmark: true + }; + } + if (debugRepeat > 0) { + return { + name: "--debug-repeat", + debugRepeat + }; + } + const { + PRETTIER_PERF_REPEAT + } = process.env; + if (PRETTIER_PERF_REPEAT && /^\d+$/.test(PRETTIER_PERF_REPEAT)) { + return { + name: "PRETTIER_PERF_REPEAT (environment variable)", + debugRepeat: Number(PRETTIER_PERF_REPEAT) + }; + } + } +}; +_stack = new WeakMap(); +var context_default = Context; -${createChoiceUsages(option.choices, CHOICE_USAGE_MARGIN, CHOICE_USAGE_INDENTATION).join("\n")}`; - const optionDefaultValue = getOptionDefaultValue(context, option.name); - const defaults = optionDefaultValue !== void 0 ? ` +// src/cli/file-info.js +var import_fast_json_stable_stringify = __toESM(require_fast_json_stable_stringify(), 1); +import { format, getFileInfo } from "../index.mjs"; +async function logFileInfoOrDie(context) { + const { + fileInfo: file, + ignorePath, + withNodeModules, + plugins, + config + } = context.argv; + const fileInfo = await getFileInfo(file, { + ignorePath, + withNodeModules, + plugins, + resolveConfig: config !== false + }); + printToScreen(await format((0, import_fast_json_stable_stringify.default)(fileInfo), { parser: "json" })); +} +var file_info_default = logFileInfoOrDie; -Default: ${createDefaultValueDisplay(optionDefaultValue)}` : ""; - const pluginDefaults = createPluginDefaults(option.pluginDefaults); - return `${header}${description}${choices}${defaults}${pluginDefaults}`; +// src/cli/find-config-path.js +import path2 from "path"; +import { resolveConfigFile } from "../index.mjs"; +async function logResolvedConfigPathOrDie(context) { + const file = context.argv.findConfigPath; + const configFile = await resolveConfigFile(file); + if (configFile) { + printToScreen(normalizeToPosix(path2.relative(process.cwd(), configFile))); + } else { + throw new Error(`Can not find configure file for "${file}".`); + } } +var find_config_path_default = logResolvedConfigPathOrDie; // src/cli/format.js import fs5 from "fs/promises"; -import path8 from "path"; +import path9 from "path"; var import_diff = __toESM(require_create(), 1); import * as prettier from "../index.mjs"; -import mockable2 from "./internal.mjs"; // src/cli/expand-patterns.js -import path2 from "path"; +import path3 from "path"; async function* expandPatterns(context) { const seen = /* @__PURE__ */ new Set(); let noResults = true; @@ -6216,7 +5870,7 @@ async function* expandPatterns(context) { }; continue; } - const filename = path2.resolve(filePath); + const filename = path3.resolve(filePath); if (seen.has(filename)) { continue; } @@ -6245,16 +5899,20 @@ async function* expandPatternsInternal(context) { const cwd2 = process.cwd(); const entries = []; for (const pattern of context.filePatterns) { - const absolutePath = path2.resolve(cwd2, pattern); + const absolutePath = path3.resolve(cwd2, pattern); if (containsIgnoredPathSegment(absolutePath, cwd2, silentlyIgnoredDirs)) { continue; } const stat = await lstatSafe(absolutePath); if (stat) { if (stat.isSymbolicLink()) { - yield { - error: `Explicitly specified pattern "${pattern}" is a symbolic link.` - }; + if (context.argv.errorOnUnmatchedPattern !== false) { + yield { + error: `Explicitly specified pattern "${pattern}" is a symbolic link.` + }; + } else { + context.logger.debug(`Skipping pattern "${pattern}", as it is a symbolic link.`); + } } else if (stat.isFile()) { entries.push({ type: "file", @@ -6262,7 +5920,7 @@ async function* expandPatternsInternal(context) { input: pattern }); } else if (stat.isDirectory()) { - const relativePath = path2.relative(cwd2, absolutePath) || "."; + const relativePath = path3.relative(cwd2, absolutePath) || "."; const prefix = escapePathForGlob(fixWindowsSlashes(relativePath)); entries.push({ type: "dir", @@ -6321,236 +5979,65 @@ var errorMessages = { }, emptyResults: { file: "Explicitly specified file was ignored due to negative glob patterns", - dir: "No supported files were found in the directory", - glob: "No files matching the pattern were found" - } -}; -function containsIgnoredPathSegment(absolutePath, cwd2, ignoredDirectories) { - return path2.relative(cwd2, absolutePath).split(path2.sep).some((dir) => ignoredDirectories.includes(dir)); -} -function sortPaths(paths) { - return paths.sort((a, b) => a.localeCompare(b)); -} -function escapePathForGlob(path10) { - return string_replace_all_default( - /* isOptionalObject*/ - false, - string_replace_all_default( - /* isOptionalObject*/ - false, - fastGlob.escapePath( - string_replace_all_default( - /* isOptionalObject*/ - false, - path10, - "\\", - "\0" - ) - // Workaround for fast-glob#262 (part 1) - ), - "\\!", - "@(!)" - ), - "\0", - "@(\\\\)" - ); -} -var fixWindowsSlashes = normalizeToPosix; - -// src/cli/options/get-options-for-file.js -var import_dashify2 = __toESM(require_dashify(), 1); -import { resolveConfig } from "../index.mjs"; -function getOptions(argv, detailedOptions) { - return Object.fromEntries( - detailedOptions.filter(({ forwardToApi }) => forwardToApi).map(({ forwardToApi, name }) => [forwardToApi, argv[name]]) - ); -} -function cliifyOptions(object, apiDetailedOptionMap) { - return Object.fromEntries( - Object.entries(object || {}).map(([key, value]) => { - const apiOption = apiDetailedOptionMap[key]; - const cliKey = apiOption ? apiOption.name : key; - return [(0, import_dashify2.default)(cliKey), value]; - }) - ); -} -function createApiDetailedOptionMap(detailedOptions) { - return Object.fromEntries( - detailedOptions.filter( - (option) => option.forwardToApi && option.forwardToApi !== option.name - ).map((option) => [option.forwardToApi, option]) - ); -} -function parseArgsToOptions(context, overrideDefaults) { - const minimistOptions = createMinimistOptions(context.detailedOptions); - const apiDetailedOptionMap = createApiDetailedOptionMap( - context.detailedOptions - ); - return getOptions( - normalize_cli_options_default( - minimistParse(context.rawArguments, { - string: minimistOptions.string, - boolean: minimistOptions.boolean, - default: cliifyOptions(overrideDefaults, apiDetailedOptionMap) - }), - context.detailedOptions, - { logger: false } - ), - context.detailedOptions - ); -} -async function getOptionsOrDie(context, filePath) { - try { - if (context.argv.config === false) { - context.logger.debug( - "'--no-config' option found, skip loading config file." - ); - return null; - } - context.logger.debug( - context.argv.config ? `load config file from '${context.argv.config}'` : `resolve config from '${filePath}'` - ); - const options = await resolveConfig(filePath, { - editorconfig: context.argv.editorconfig, - config: context.argv.config - }); - context.logger.debug("loaded options `" + JSON.stringify(options) + "`"); - return options; - } catch (error) { - context.logger.error( - `Invalid configuration for file "${filePath}": -` + error.message - ); - process.exit(2); - } -} -function applyConfigPrecedence(context, options) { - try { - switch (context.argv.configPrecedence) { - case "cli-override": - return parseArgsToOptions(context, options); - case "file-override": - return { ...parseArgsToOptions(context), ...options }; - case "prefer-file": - return options || parseArgsToOptions(context); - } - } catch (error) { - context.logger.error(error.toString()); - process.exit(2); + dir: "No supported files were found in the directory", + glob: "No files matching the pattern were found" } +}; +function containsIgnoredPathSegment(absolutePath, cwd2, ignoredDirectories) { + return path3.relative(cwd2, absolutePath).split(path3.sep).some((dir) => ignoredDirectories.includes(dir)); } -async function getOptionsForFile(context, filepath) { - const options = await getOptionsOrDie(context, filepath); - const hasPlugins = options == null ? void 0 : options.plugins; - if (hasPlugins) { - await context.pushContextPlugins(options.plugins); - } - const appliedOptions = { - filepath, - ...applyConfigPrecedence( - context, - options && normalizeOptions(options, context.supportOptions, { - logger: context.logger - }) - ) - }; - context.logger.debug( - `applied config-precedence (${context.argv.configPrecedence}): ${JSON.stringify(appliedOptions)}` - ); - if (hasPlugins) { - context.popContextPlugins(); - } - return appliedOptions; +function sortPaths(paths) { + return paths.sort((a, b) => a.localeCompare(b)); } -var get_options_for_file_default = getOptionsForFile; - -// src/cli/is-tty.js -import mockable from "./internal.mjs"; -function isTTY() { - return process.stdout.isTTY && !mockable.isCI(); +function escapePathForGlob(path10) { + return string_replace_all_default( + /* isOptionalObject*/ + false, + string_replace_all_default( + /* isOptionalObject*/ + false, + fastGlob.escapePath( + string_replace_all_default( + /* isOptionalObject*/ + false, + path10, + "\\", + "\0" + ) + // Workaround for fast-glob#262 (part 1) + ), + "\\!", + "@(!)" + ), + "\0", + "@(\\\\)" + ); } +var fixWindowsSlashes = normalizeToPosix; // src/cli/find-cache-file.js import fs4 from "fs/promises"; import os2 from "os"; -import path7 from "path"; +import path8 from "path"; // node_modules/find-cache-dir/index.js var import_common_path_prefix = __toESM(require_common_path_prefix(), 1); import process4 from "process"; -import path6 from "path"; +import path7 from "path"; import fs3 from "fs"; // node_modules/pkg-dir/index.js -import path5 from "path"; +import path6 from "path"; // node_modules/pkg-dir/node_modules/find-up/index.js -import path4 from "path"; +import path5 from "path"; import { fileURLToPath as fileURLToPath2 } from "url"; // node_modules/pkg-dir/node_modules/locate-path/index.js import process3 from "process"; -import path3 from "path"; +import path4 from "path"; import fs2, { promises as fsPromises } from "fs"; import { fileURLToPath } from "url"; - -// node_modules/pkg-dir/node_modules/yocto-queue/index.js -var Node = class { - value; - next; - constructor(value) { - this.value = value; - } -}; -var _head, _tail, _size; -var Queue = class { - constructor() { - __privateAdd(this, _head, void 0); - __privateAdd(this, _tail, void 0); - __privateAdd(this, _size, void 0); - this.clear(); - } - enqueue(value) { - const node = new Node(value); - if (__privateGet(this, _head)) { - __privateGet(this, _tail).next = node; - __privateSet(this, _tail, node); - } else { - __privateSet(this, _head, node); - __privateSet(this, _tail, node); - } - __privateWrapper(this, _size)._++; - } - dequeue() { - const current = __privateGet(this, _head); - if (!current) { - return; - } - __privateSet(this, _head, __privateGet(this, _head).next); - __privateWrapper(this, _size)._--; - return current.value; - } - clear() { - __privateSet(this, _head, void 0); - __privateSet(this, _tail, void 0); - __privateSet(this, _size, 0); - } - get size() { - return __privateGet(this, _size); - } - *[Symbol.iterator]() { - let current = __privateGet(this, _head); - while (current) { - yield current.value; - current = current.next; - } - } -}; -_head = new WeakMap(); -_tail = new WeakMap(); -_size = new WeakMap(); - -// node_modules/pkg-dir/node_modules/locate-path/index.js var typeMappings = { directory: "isDirectory", file: "isFile" @@ -6573,7 +6060,7 @@ function locatePathSync(paths, { const statFunction = allowSymlinks ? fs2.statSync : fs2.lstatSync; for (const path_ of paths) { try { - const stat = statFunction(path3.resolve(cwd2, path_), { + const stat = statFunction(path4.resolve(cwd2, path_), { throwIfNoEntry: false }); if (!stat) { @@ -6591,8 +6078,8 @@ function locatePathSync(paths, { var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath2(urlOrPath) : urlOrPath; var findUpStop = Symbol("findUpStop"); function findUpMultipleSync(name, options = {}) { - let directory = path4.resolve(toPath2(options.cwd) || ""); - const { root } = path4.parse(directory); + let directory = path5.resolve(toPath2(options.cwd) || ""); + const { root } = path5.parse(directory); const stopAt = options.stopAt || root; const limit = options.limit || Number.POSITIVE_INFINITY; const paths = [name].flat(); @@ -6613,12 +6100,12 @@ function findUpMultipleSync(name, options = {}) { break; } if (foundPath) { - matches.push(path4.resolve(directory, foundPath)); + matches.push(path5.resolve(directory, foundPath)); } if (directory === stopAt || matches.length >= limit) { break; } - directory = path4.dirname(directory); + directory = path5.dirname(directory); } return matches; } @@ -6630,7 +6117,7 @@ function findUpSync(name, options = {}) { // node_modules/pkg-dir/index.js function packageDirectorySync({ cwd: cwd2 } = {}) { const filePath = findUpSync("package.json", { cwd: cwd2 }); - return filePath && path5.dirname(filePath); + return filePath && path6.dirname(filePath); } // node_modules/find-cache-dir/index.js @@ -6650,22 +6137,22 @@ function useDirectory(directory, options) { return directory; } function getNodeModuleDirectory(directory) { - const nodeModules = path6.join(directory, "node_modules"); - if (!isWritable(nodeModules) && (fs3.existsSync(nodeModules) || !isWritable(path6.join(directory)))) { + const nodeModules = path7.join(directory, "node_modules"); + if (!isWritable(nodeModules) && (fs3.existsSync(nodeModules) || !isWritable(path7.join(directory)))) { return; } return nodeModules; } function findCacheDirectory(options = {}) { if (env2.CACHE_DIR && !["true", "false", "1", "0"].includes(env2.CACHE_DIR)) { - return useDirectory(path6.join(env2.CACHE_DIR, options.name), options); + return useDirectory(path7.join(env2.CACHE_DIR, options.name), options); } let { cwd: directory = cwd(), files } = options; if (files) { if (!Array.isArray(files)) { throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof files}\`.`); } - directory = (0, import_common_path_prefix.default)(files.map((file) => path6.resolve(directory, file))); + directory = (0, import_common_path_prefix.default)(files.map((file) => path7.resolve(directory, file))); } directory = packageDirectorySync({ cwd: directory }); if (!directory) { @@ -6675,17 +6162,17 @@ function findCacheDirectory(options = {}) { if (!nodeModules) { return; } - return useDirectory(path6.join(directory, "node_modules", ".cache", options.name), options); + return useDirectory(path7.join(directory, "node_modules", ".cache", options.name), options); } // src/cli/find-cache-file.js function findDefaultCacheFile() { const cacheDir = findCacheDirectory({ name: "prettier", create: true }) || os2.tmpdir(); - const cacheFilePath = path7.join(cacheDir, ".prettier-cache"); + const cacheFilePath = path8.join(cacheDir, ".prettier-cache"); return cacheFilePath; } async function findCacheFileFromOption(cacheLocation) { - const cacheFile = path7.resolve(cacheLocation); + const cacheFile = path8.resolve(cacheLocation); const stat = await statSafe(cacheFile); if (stat) { if (stat.isDirectory()) { @@ -6710,8 +6197,8 @@ async function findCacheFile(cacheLocation) { var find_cache_file_default = findCacheFile; // src/cli/format-results-cache.js +var import_fast_json_stable_stringify2 = __toESM(require_fast_json_stable_stringify(), 1); var import_file_entry_cache = __toESM(require_cache2(), 1); -var import_fast_json_stable_stringify = __toESM(require_fast_json_stable_stringify(), 1); import { version as prettierVersion } from "../index.mjs"; var optionsHashCache = /* @__PURE__ */ new WeakMap(); var nodeVersion = process.version; @@ -6720,7 +6207,7 @@ function getHashOfOptions(options) { return optionsHashCache.get(options); } const hash = createHash( - `${prettierVersion}_${nodeVersion}_${(0, import_fast_json_stable_stringify.default)(options)}` + `${prettierVersion}_${nodeVersion}_${(0, import_fast_json_stable_stringify2.default)(options)}` ); optionsHashCache.set(options, hash); return hash; @@ -6783,8 +6270,120 @@ var FormatResultsCache = class { _fileEntryCache = new WeakMap(); var format_results_cache_default = FormatResultsCache; +// src/cli/is-tty.js +function isTTY() { + return process.stdout.isTTY && !mockable.isCI(); +} + +// src/cli/options/get-options-for-file.js +var import_dashify2 = __toESM(require_dashify(), 1); +import { resolveConfig } from "../index.mjs"; +function getOptions(argv, detailedOptions) { + return Object.fromEntries( + detailedOptions.filter(({ forwardToApi }) => forwardToApi).map(({ forwardToApi, name }) => [forwardToApi, argv[name]]) + ); +} +function cliifyOptions(object, apiDetailedOptionMap) { + return Object.fromEntries( + Object.entries(object || {}).map(([key, value]) => { + const apiOption = apiDetailedOptionMap[key]; + const cliKey = apiOption ? apiOption.name : key; + return [(0, import_dashify2.default)(cliKey), value]; + }) + ); +} +function createApiDetailedOptionMap(detailedOptions) { + return Object.fromEntries( + detailedOptions.filter( + (option) => option.forwardToApi && option.forwardToApi !== option.name + ).map((option) => [option.forwardToApi, option]) + ); +} +function parseArgsToOptions(context, overrideDefaults) { + const minimistOptions = createMinimistOptions(context.detailedOptions); + const apiDetailedOptionMap = createApiDetailedOptionMap( + context.detailedOptions + ); + return getOptions( + normalize_cli_options_default( + minimistParse(context.rawArguments, { + string: minimistOptions.string, + boolean: minimistOptions.boolean, + default: cliifyOptions(overrideDefaults, apiDetailedOptionMap) + }), + context.detailedOptions, + { logger: false } + ), + context.detailedOptions + ); +} +async function getOptionsOrDie(context, filePath) { + try { + if (context.argv.config === false) { + context.logger.debug( + "'--no-config' option found, skip loading config file." + ); + return null; + } + context.logger.debug( + context.argv.config ? `load config file from '${context.argv.config}'` : `resolve config from '${filePath}'` + ); + const options = await resolveConfig(filePath, { + editorconfig: context.argv.editorconfig, + config: context.argv.config + }); + context.logger.debug("loaded options `" + JSON.stringify(options) + "`"); + return options; + } catch (error) { + context.logger.error( + `Invalid configuration${filePath ? ` for file "${filePath}"` : ""}: +` + error.message + ); + process.exit(2); + } +} +function applyConfigPrecedence(context, options) { + try { + switch (context.argv.configPrecedence) { + case "cli-override": + return parseArgsToOptions(context, options); + case "file-override": + return { ...parseArgsToOptions(context), ...options }; + case "prefer-file": + return options || parseArgsToOptions(context); + } + } catch (error) { + context.logger.error(error.toString()); + process.exit(2); + } +} +async function getOptionsForFile(context, filepath) { + const options = await getOptionsOrDie(context, filepath); + const hasPlugins = options == null ? void 0 : options.plugins; + if (hasPlugins) { + await context.pushContextPlugins(options.plugins); + } + const appliedOptions = { + filepath, + ...applyConfigPrecedence( + context, + options && normalizeOptions(options, context.supportOptions, { + logger: context.logger + }) + ) + }; + context.logger.debug( + `applied config-precedence (${context.argv.configPrecedence}): ${JSON.stringify(appliedOptions)}` + ); + if (hasPlugins) { + context.popContextPlugins(); + } + return appliedOptions; +} +var get_options_for_file_default = getOptionsForFile; + // src/cli/format.js -var { getStdin, writeFormattedFile } = mockable2; +var { getStdin, writeFormattedFile } = mockable; function diff(a, b) { return (0, import_diff.createTwoFilesPatch)("", "", a, b, "", "", { context: 2 }); } @@ -6847,7 +6446,7 @@ async function listDifferent(context, input, options, filename) { } return true; } -async function format2(context, input, opt) { +async function format3(context, input, opt) { if (context.argv.debugPrintDoc) { const doc = await prettier.__debug.printToDoc(input, opt); return { formatted: await prettier.__debug.formatDoc(doc) + "\n" }; @@ -6980,12 +6579,12 @@ async function formatStdin(context) { } const options = await get_options_for_file_default( context, - filepath ? path8.resolve(process.cwd(), filepath) : process.cwd() + filepath ? path9.resolve(filepath) : void 0 ); if (await listDifferent(context, input, options, "(stdin)")) { return; } - const formatted = await format2(context, input, options); + const formatted = await format3(context, input, options); const { performanceTestFlag } = context; if (performanceTestFlag) { context.logger.log( @@ -7035,7 +6634,7 @@ async function formatFiles(context) { ...await get_options_for_file_default(context, filename), filepath: filename }; - const fileNameToDisplay = normalizeToPosix(path8.relative(cwd2, filename)); + const fileNameToDisplay = normalizeToPosix(path9.relative(cwd2, filename)); let printedFilename; if (isTTY()) { printedFilename = context.logger.log(fileNameToDisplay, { @@ -7071,7 +6670,7 @@ ${error2.message}` if (isCacheExists) { result = { formatted: input }; } else { - result = await format2(context, input, options); + result = await format3(context, input, options); } output = result.formatted; } catch (error2) { @@ -7125,74 +6724,143 @@ ${error2.message}` } else if (!context.argv.check && !context.argv.listDifferent) { writeOutput(context, result, options); } - if (shouldSetCache) { - formatResultsCache == null ? void 0 : formatResultsCache.setFormatResultsCache(filename, options); - } else { - formatResultsCache == null ? void 0 : formatResultsCache.removeFormatResultsCache(filename); + if (shouldSetCache) { + formatResultsCache == null ? void 0 : formatResultsCache.setFormatResultsCache(filename, options); + } else { + formatResultsCache == null ? void 0 : formatResultsCache.removeFormatResultsCache(filename); + } + if (isDifferent) { + if (context.argv.check) { + context.logger.warn(fileNameToDisplay); + } else if (context.argv.listDifferent) { + context.logger.log(fileNameToDisplay); + } + numberOfUnformattedFilesFound += 1; + } + } + formatResultsCache == null ? void 0 : formatResultsCache.reconcile(); + if (context.argv.check) { + if (numberOfUnformattedFilesFound === 0) { + context.logger.log("All matched files use Prettier code style!"); + } else { + const files = numberOfUnformattedFilesFound === 1 ? "the above file" : `${numberOfUnformattedFilesFound} files`; + context.logger.warn( + context.argv.write ? `Code style issues fixed in ${files}.` : `Code style issues found in ${files}. Run Prettier to fix.` + ); + } + } + if ((context.argv.check || context.argv.listDifferent) && numberOfUnformattedFilesFound > 0 && !process.exitCode && !context.argv.write) { + process.exitCode = 1; + } +} + +// src/cli/logger.js +import readline from "readline"; + +// node_modules/ansi-regex/index.js +function ansiRegex({ onlyFirst = false } = {}) { + const pattern = [ + "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", + "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" + ].join("|"); + return new RegExp(pattern, onlyFirst ? void 0 : "g"); +} + +// node_modules/strip-ansi/index.js +var regex = ansiRegex(); +function stripAnsi(string) { + if (typeof string !== "string") { + throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); + } + return string.replace(regex, ""); +} + +// src/cli/logger.js +var import_wcwidth = __toESM(require_wcwidth(), 1); +var countLines = (stream, text) => { + const columns = stream.columns || 80; + let lineCount = 0; + for (const line of stripAnsi(text).split("\n")) { + lineCount += Math.max(1, Math.ceil((0, import_wcwidth.default)(line) / columns)); + } + return lineCount; +}; +var clear = (stream, text) => () => { + const lineCount = countLines(stream, text); + for (let line = 0; line < lineCount; line++) { + if (line > 0) { + readline.moveCursor(stream, 0, -1); + } + readline.clearLine(stream, 0); + readline.cursorTo(stream, 0); + } +}; +var emptyLogResult = { + clear() { + } +}; +function createLogger(logLevel = "log") { + return { + logLevel, + warn: createLogFunc("warn", "yellow"), + error: createLogFunc("error", "red"), + debug: createLogFunc("debug", "blue"), + log: createLogFunc("log") + }; + function createLogFunc(loggerName, color) { + if (!shouldLog(loggerName)) { + return () => emptyLogResult; } - if (isDifferent) { - if (context.argv.check) { - context.logger.warn(fileNameToDisplay); - } else if (context.argv.listDifferent) { - context.logger.log(fileNameToDisplay); + const stream = process[loggerName === "log" ? "stdout" : "stderr"]; + const chalkInstance = loggerName === "log" ? source_default : chalkStderr; + const prefix = color ? `[${chalkInstance[color](loggerName)}] ` : ""; + return (message, options) => { + options = { + newline: true, + clearable: false, + ...options + }; + message = string_replace_all_default( + /* isOptionalObject*/ + false, + message, + /^/gm, + prefix + ) + (options.newline ? "\n" : ""); + stream.write(message); + if (options.clearable) { + return { + clear: clear(stream, message) + }; } - numberOfUnformattedFilesFound += 1; - } + }; } - formatResultsCache == null ? void 0 : formatResultsCache.reconcile(); - if (context.argv.check) { - if (numberOfUnformattedFilesFound === 0) { - context.logger.log("All matched files use Prettier code style!"); - } else { - const files = numberOfUnformattedFilesFound === 1 ? "the above file" : `${numberOfUnformattedFilesFound} files`; - context.logger.warn( - context.argv.write ? `Code style issues fixed in ${files}.` : `Code style issues found in ${files}. Run Prettier to fix.` - ); + function shouldLog(loggerName) { + switch (logLevel) { + case "silent": + return false; + case "debug": + if (loggerName === "debug") { + return true; + } + case "log": + if (loggerName === "log") { + return true; + } + case "warn": + if (loggerName === "warn") { + return true; + } + case "error": + return loggerName === "error"; } } - if ((context.argv.check || context.argv.listDifferent) && numberOfUnformattedFilesFound > 0 && !process.exitCode && !context.argv.write) { - process.exitCode = 1; - } -} - -// src/cli/file-info.js -var import_fast_json_stable_stringify2 = __toESM(require_fast_json_stable_stringify(), 1); -import { format as format3, getFileInfo } from "../index.mjs"; -async function logFileInfoOrDie(context) { - const { - fileInfo: file, - ignorePath, - withNodeModules, - plugins, - config - } = context.argv; - const fileInfo = await getFileInfo(file, { - ignorePath, - withNodeModules, - plugins, - resolveConfig: config !== false - }); - printToScreen(await format3((0, import_fast_json_stable_stringify2.default)(fileInfo), { parser: "json" })); -} -var file_info_default = logFileInfoOrDie; - -// src/cli/find-config-path.js -import path9 from "path"; -import { resolveConfigFile } from "../index.mjs"; -async function logResolvedConfigPathOrDie(context) { - const file = context.argv.findConfigPath; - const configFile = await resolveConfigFile(file); - if (configFile) { - printToScreen(normalizeToPosix(path9.relative(process.cwd(), configFile))); - } else { - throw new Error(`Can not find configure file for "${file}".`); - } } -var find_config_path_default = logResolvedConfigPathOrDie; +var logger_default = createLogger; // src/cli/print-support-info.js var import_fast_json_stable_stringify3 = __toESM(require_fast_json_stable_stringify(), 1); -import { getSupportInfo as getSupportInfo2, format as format4 } from "../index.mjs"; +import { format as format4, getSupportInfo as getSupportInfo2 } from "../index.mjs"; var sortByName = (array2) => array2.sort((a, b) => a.name.localeCompare(b.name)); async function printSupportInfo() { const { languages, options } = await getSupportInfo2(); @@ -7206,6 +6874,139 @@ async function printSupportInfo() { } var print_support_info_default = printSupportInfo; +// src/cli/constants.evaluate.js +var categoryOrder = [ + "Output", + "Format", + "Config", + "Editor", + "Other" +]; +var usageSummary = "Usage: prettier [options] [file/dir/glob ...]\n\nBy default, output is written to stdout.\nStdin is read if it is piped to Prettier and no files are given."; + +// src/cli/usage.js +var OPTION_USAGE_THRESHOLD = 25; +var CHOICE_USAGE_MARGIN = 3; +var CHOICE_USAGE_INDENTATION = 2; +function indent(str, spaces) { + return string_replace_all_default( + /* isOptionalObject*/ + false, + str, + /^/gm, + " ".repeat(spaces) + ); +} +function createDefaultValueDisplay(value) { + return Array.isArray(value) ? `[${value.map(createDefaultValueDisplay).join(", ")}]` : value; +} +function getOptionDefaultValue(context, optionName) { + var _a; + const option = context.detailedOptions.find(({ + name + }) => name === optionName); + if ((option == null ? void 0 : option.default) !== void 0) { + return option.default; + } + const optionCamelName = camelCase(optionName); + return formatOptionsHiddenDefaults[optionCamelName] ?? ((_a = context.supportOptions.find((option2) => !option2.deprecated && option2.name === optionCamelName)) == null ? void 0 : _a.default); +} +function createOptionUsageHeader(option) { + const name = `--${option.name}`; + const alias = option.alias ? `-${option.alias},` : null; + const type = createOptionUsageType(option); + return [alias, name, type].filter(Boolean).join(" "); +} +function createOptionUsageRow(header, content, threshold) { + const separator = header.length >= threshold ? ` +${" ".repeat(threshold)}` : " ".repeat(threshold - header.length); + const description = string_replace_all_default( + /* isOptionalObject*/ + false, + content, + "\n", + ` +${" ".repeat(threshold)}` + ); + return `${header}${separator}${description}`; +} +function createOptionUsageType(option) { + switch (option.type) { + case "boolean": + return null; + case "choice": + return `<${option.choices.filter((choice) => !choice.deprecated).map((choice) => choice.value).join("|")}>`; + default: + return `<${option.type}>`; + } +} +function createChoiceUsages(choices, margin, indentation) { + const activeChoices = choices.filter((choice) => !choice.deprecated); + const threshold = Math.max(0, ...activeChoices.map((choice) => choice.value.length)) + margin; + return activeChoices.map((choice) => indent(createOptionUsageRow(choice.value, choice.description, threshold), indentation)); +} +function createOptionUsage(context, option, threshold) { + const header = createOptionUsageHeader(option); + const optionDefaultValue = getOptionDefaultValue(context, option.name); + return createOptionUsageRow(header, `${option.description}${optionDefaultValue === void 0 ? "" : ` +Defaults to ${createDefaultValueDisplay(optionDefaultValue)}.`}`, threshold); +} +function getOptionsWithOpposites(options) { + const optionsWithOpposites = options.map((option) => [option.description ? option : null, option.oppositeDescription ? { + ...option, + name: `no-${option.name}`, + type: "boolean", + description: option.oppositeDescription + } : null]); + return optionsWithOpposites.flat().filter(Boolean); +} +function createUsage(context) { + const sortedOptions = context.detailedOptions.sort((optionA, optionB) => optionA.name.localeCompare(optionB.name)); + const options = getOptionsWithOpposites(sortedOptions).filter( + // remove unnecessary option (e.g. `semi`, `color`, etc.), which is only used for --help + (option) => !(option.type === "boolean" && option.oppositeDescription && !option.name.startsWith("no-")) + ); + const groupedOptions = groupBy(options, (option) => option.category); + const firstCategories = categoryOrder.slice(0, -1); + const lastCategories = categoryOrder.slice(-1); + const restCategories = Object.keys(groupedOptions).filter((category) => !categoryOrder.includes(category)); + const allCategories = [...firstCategories, ...restCategories, ...lastCategories]; + const optionsUsage = allCategories.map((category) => { + const categoryOptions = groupedOptions[category].map((option) => createOptionUsage(context, option, OPTION_USAGE_THRESHOLD)).join("\n"); + return `${category} options: + +${indent(categoryOptions, 2)}`; + }); + return [usageSummary, ...optionsUsage, ""].join("\n\n"); +} +function createPluginDefaults(pluginDefaults) { + if (!pluginDefaults || Object.keys(pluginDefaults).length === 0) { + return ""; + } + const defaults = Object.entries(pluginDefaults).sort(([pluginNameA], [pluginNameB]) => pluginNameA.localeCompare(pluginNameB)).map(([plugin, value]) => `* ${plugin}: ${createDefaultValueDisplay(value)}`).join("\n"); + return ` +Plugin defaults: +${defaults}`; +} +function createDetailedUsage(context, flag) { + const option = getOptionsWithOpposites(context.detailedOptions).find((option2) => option2.name === flag || option2.alias === flag); + const header = createOptionUsageHeader(option); + const description = ` + +${indent(option.description, 2)}`; + const choices = option.type !== "choice" ? "" : ` + +Valid options: + +${createChoiceUsages(option.choices, CHOICE_USAGE_MARGIN, CHOICE_USAGE_INDENTATION).join("\n")}`; + const optionDefaultValue = getOptionDefaultValue(context, option.name); + const defaults = optionDefaultValue !== void 0 ? ` + +Default: ${createDefaultValueDisplay(optionDefaultValue)}` : ""; + const pluginDefaults = createPluginDefaults(option.pluginDefaults); + return `${header}${description}${choices}${defaults}${pluginDefaults}`; +} + // src/cli/index.js async function run(rawArguments = process.argv.slice(2)) { let logger = logger_default(); diff --git a/node_modules/prettier/internal/internal.mjs b/node_modules/prettier/internal/internal.mjs deleted file mode 100644 index d3f8c1e..0000000 --- a/node_modules/prettier/internal/internal.mjs +++ /dev/null @@ -1,712 +0,0 @@ -import { createRequire as __prettierCreateRequire } from "module"; -import { fileURLToPath as __prettierFileUrlToPath } from "url"; -import { dirname as __prettierDirname } from "path"; -const require = __prettierCreateRequire(import.meta.url); -const __filename = __prettierFileUrlToPath(import.meta.url); -const __dirname = __prettierDirname(__filename); - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { - get: (a, b) => (typeof require !== "undefined" ? require : a)[b] -}) : x)(function(x) { - if (typeof require !== "undefined") - return require.apply(this, arguments); - throw Error('Dynamic require of "' + x + '" is not supported'); -}); -var __commonJS = (cb, mod) => function __require2() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); - -// node_modules/lilconfig/dist/index.js -var require_dist = __commonJS({ - "node_modules/lilconfig/dist/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.lilconfigSync = exports.lilconfig = exports.defaultLoaders = void 0; - var path = __require("path"); - var fs2 = __require("fs"); - var os = __require("os"); - var fsReadFileAsync = fs2.promises.readFile; - function getDefaultSearchPlaces(name) { - return [ - "package.json", - `.${name}rc.json`, - `.${name}rc.js`, - `.${name}rc.cjs`, - `.config/${name}rc`, - `.config/${name}rc.json`, - `.config/${name}rc.js`, - `.config/${name}rc.cjs`, - `${name}.config.js`, - `${name}.config.cjs` - ]; - } - function getSearchPaths(startDir, stopDir) { - return startDir.split(path.sep).reduceRight((acc, _, ind, arr) => { - const currentPath = arr.slice(0, ind + 1).join(path.sep); - if (!acc.passedStopDir) - acc.searchPlaces.push(currentPath || path.sep); - if (currentPath === stopDir) - acc.passedStopDir = true; - return acc; - }, { searchPlaces: [], passedStopDir: false }).searchPlaces; - } - exports.defaultLoaders = Object.freeze({ - ".js": __require, - ".json": __require, - ".cjs": __require, - noExt(_, content) { - return JSON.parse(content); - } - }); - function getExtDesc(ext) { - return ext === "noExt" ? "files without extensions" : `extension "${ext}"`; - } - function getOptions(name, options = {}) { - const conf = { - stopDir: os.homedir(), - searchPlaces: getDefaultSearchPlaces(name), - ignoreEmptySearchPlaces: true, - transform: (x) => x, - packageProp: [name], - ...options, - loaders: { ...exports.defaultLoaders, ...options.loaders } - }; - conf.searchPlaces.forEach((place) => { - const key = path.extname(place) || "noExt"; - const loader = conf.loaders[key]; - if (!loader) { - throw new Error(`No loader specified for ${getExtDesc(key)}, so searchPlaces item "${place}" is invalid`); - } - if (typeof loader !== "function") { - throw new Error(`loader for ${getExtDesc(key)} is not a function (type provided: "${typeof loader}"), so searchPlaces item "${place}" is invalid`); - } - }); - return conf; - } - function getPackageProp(props, obj) { - if (typeof props === "string" && props in obj) - return obj[props]; - return (Array.isArray(props) ? props : props.split(".")).reduce((acc, prop) => acc === void 0 ? acc : acc[prop], obj) || null; - } - function getSearchItems(searchPlaces, searchPaths) { - return searchPaths.reduce((acc, searchPath) => { - searchPlaces.forEach((sp) => acc.push({ - searchPlace: sp, - filepath: path.join(searchPath, sp), - loaderKey: path.extname(sp) || "noExt" - })); - return acc; - }, []); - } - function validateFilePath(filepath) { - if (!filepath) - throw new Error("load must pass a non-empty string"); - } - function validateLoader(loader, ext) { - if (!loader) - throw new Error(`No loader specified for extension "${ext}"`); - if (typeof loader !== "function") - throw new Error("loader is not a function"); - } - function lilconfig2(name, options) { - const { ignoreEmptySearchPlaces, loaders, packageProp, searchPlaces, stopDir, transform } = getOptions(name, options); - return { - async search(searchFrom = process.cwd()) { - const searchPaths = getSearchPaths(searchFrom, stopDir); - const result = { - config: null, - filepath: "" - }; - const searchItems = getSearchItems(searchPlaces, searchPaths); - for (const { searchPlace, filepath, loaderKey } of searchItems) { - try { - await fs2.promises.access(filepath); - } catch (_a) { - continue; - } - const content = String(await fsReadFileAsync(filepath)); - const loader = loaders[loaderKey]; - if (searchPlace === "package.json") { - const pkg = await loader(filepath, content); - const maybeConfig = getPackageProp(packageProp, pkg); - if (maybeConfig != null) { - result.config = maybeConfig; - result.filepath = filepath; - break; - } - continue; - } - const isEmpty = content.trim() === ""; - if (isEmpty && ignoreEmptySearchPlaces) - continue; - if (isEmpty) { - result.isEmpty = true; - result.config = void 0; - } else { - validateLoader(loader, loaderKey); - result.config = await loader(filepath, content); - } - result.filepath = filepath; - break; - } - if (result.filepath === "" && result.config === null) - return transform(null); - return transform(result); - }, - async load(filepath) { - validateFilePath(filepath); - const absPath = path.resolve(process.cwd(), filepath); - const { base, ext } = path.parse(absPath); - const loaderKey = ext || "noExt"; - const loader = loaders[loaderKey]; - validateLoader(loader, loaderKey); - const content = String(await fsReadFileAsync(absPath)); - if (base === "package.json") { - const pkg = await loader(absPath, content); - return transform({ - config: getPackageProp(packageProp, pkg), - filepath: absPath - }); - } - const result = { - config: null, - filepath: absPath - }; - const isEmpty = content.trim() === ""; - if (isEmpty && ignoreEmptySearchPlaces) - return transform({ - config: void 0, - filepath: absPath, - isEmpty: true - }); - result.config = isEmpty ? void 0 : await loader(absPath, content); - return transform(isEmpty ? { ...result, isEmpty, config: void 0 } : result); - } - }; - } - exports.lilconfig = lilconfig2; - } -}); - -// node_modules/find-parent-dir/index.js -var require_find_parent_dir = __commonJS({ - "node_modules/find-parent-dir/index.js"(exports, module) { - "use strict"; - var path = __require("path"); - var fs2 = __require("fs"); - var exists = fs2.exists || path.exists; - var existsSync = fs2.existsSync || path.existsSync; - function splitPath(path2) { - var parts = path2.split(/(\/|\\)/); - if (!parts.length) - return parts; - return !parts[0].length ? parts.slice(1) : parts; - } - exports = module.exports = function(currentFullPath, clue, cb) { - function testDir(parts) { - if (parts.length === 0) - return cb(null, null); - var p = parts.join(""); - exists(path.join(p, clue), function(itdoes) { - if (itdoes) - return cb(null, p); - testDir(parts.slice(0, -1)); - }); - } - testDir(splitPath(currentFullPath)); - }; - exports.sync = function(currentFullPath, clue) { - function testDir(parts) { - if (parts.length === 0) - return null; - var p = parts.join(""); - var itdoes = existsSync(path.join(p, clue)); - return itdoes ? p : testDir(parts.slice(0, -1)); - } - return testDir(splitPath(currentFullPath)); - }; - } -}); - -// node_modules/ci-info/vendors.json -var require_vendors = __commonJS({ - "node_modules/ci-info/vendors.json"(exports, module) { - module.exports = [ - { - name: "Agola CI", - constant: "AGOLA", - env: "AGOLA_GIT_REF", - pr: "AGOLA_PULL_REQUEST_ID" - }, - { - name: "Appcircle", - constant: "APPCIRCLE", - env: "AC_APPCIRCLE" - }, - { - name: "AppVeyor", - constant: "APPVEYOR", - env: "APPVEYOR", - pr: "APPVEYOR_PULL_REQUEST_NUMBER" - }, - { - name: "AWS CodeBuild", - constant: "CODEBUILD", - env: "CODEBUILD_BUILD_ARN" - }, - { - name: "Azure Pipelines", - constant: "AZURE_PIPELINES", - env: "TF_BUILD", - pr: { - BUILD_REASON: "PullRequest" - } - }, - { - name: "Bamboo", - constant: "BAMBOO", - env: "bamboo_planKey" - }, - { - name: "Bitbucket Pipelines", - constant: "BITBUCKET", - env: "BITBUCKET_COMMIT", - pr: "BITBUCKET_PR_ID" - }, - { - name: "Bitrise", - constant: "BITRISE", - env: "BITRISE_IO", - pr: "BITRISE_PULL_REQUEST" - }, - { - name: "Buddy", - constant: "BUDDY", - env: "BUDDY_WORKSPACE_ID", - pr: "BUDDY_EXECUTION_PULL_REQUEST_ID" - }, - { - name: "Buildkite", - constant: "BUILDKITE", - env: "BUILDKITE", - pr: { - env: "BUILDKITE_PULL_REQUEST", - ne: "false" - } - }, - { - name: "CircleCI", - constant: "CIRCLE", - env: "CIRCLECI", - pr: "CIRCLE_PULL_REQUEST" - }, - { - name: "Cirrus CI", - constant: "CIRRUS", - env: "CIRRUS_CI", - pr: "CIRRUS_PR" - }, - { - name: "Codefresh", - constant: "CODEFRESH", - env: "CF_BUILD_ID", - pr: { - any: [ - "CF_PULL_REQUEST_NUMBER", - "CF_PULL_REQUEST_ID" - ] - } - }, - { - name: "Codemagic", - constant: "CODEMAGIC", - env: "CM_BUILD_ID", - pr: "CM_PULL_REQUEST" - }, - { - name: "Codeship", - constant: "CODESHIP", - env: { - CI_NAME: "codeship" - } - }, - { - name: "Drone", - constant: "DRONE", - env: "DRONE", - pr: { - DRONE_BUILD_EVENT: "pull_request" - } - }, - { - name: "dsari", - constant: "DSARI", - env: "DSARI" - }, - { - name: "Earthly", - constant: "EARTHLY", - env: "EARTHLY_CI" - }, - { - name: "Expo Application Services", - constant: "EAS", - env: "EAS_BUILD" - }, - { - name: "Gerrit", - constant: "GERRIT", - env: "GERRIT_PROJECT" - }, - { - name: "Gitea Actions", - constant: "GITEA_ACTIONS", - env: "GITEA_ACTIONS" - }, - { - name: "GitHub Actions", - constant: "GITHUB_ACTIONS", - env: "GITHUB_ACTIONS", - pr: { - GITHUB_EVENT_NAME: "pull_request" - } - }, - { - name: "GitLab CI", - constant: "GITLAB", - env: "GITLAB_CI", - pr: "CI_MERGE_REQUEST_ID" - }, - { - name: "GoCD", - constant: "GOCD", - env: "GO_PIPELINE_LABEL" - }, - { - name: "Google Cloud Build", - constant: "GOOGLE_CLOUD_BUILD", - env: "BUILDER_OUTPUT" - }, - { - name: "Harness CI", - constant: "HARNESS", - env: "HARNESS_BUILD_ID" - }, - { - name: "Heroku", - constant: "HEROKU", - env: { - env: "NODE", - includes: "/app/.heroku/node/bin/node" - } - }, - { - name: "Hudson", - constant: "HUDSON", - env: "HUDSON_URL" - }, - { - name: "Jenkins", - constant: "JENKINS", - env: [ - "JENKINS_URL", - "BUILD_ID" - ], - pr: { - any: [ - "ghprbPullId", - "CHANGE_ID" - ] - } - }, - { - name: "LayerCI", - constant: "LAYERCI", - env: "LAYERCI", - pr: "LAYERCI_PULL_REQUEST" - }, - { - name: "Magnum CI", - constant: "MAGNUM", - env: "MAGNUM" - }, - { - name: "Netlify CI", - constant: "NETLIFY", - env: "NETLIFY", - pr: { - env: "PULL_REQUEST", - ne: "false" - } - }, - { - name: "Nevercode", - constant: "NEVERCODE", - env: "NEVERCODE", - pr: { - env: "NEVERCODE_PULL_REQUEST", - ne: "false" - } - }, - { - name: "Prow", - constant: "PROW", - env: "PROW_JOB_ID" - }, - { - name: "ReleaseHub", - constant: "RELEASEHUB", - env: "RELEASE_BUILD_ID" - }, - { - name: "Render", - constant: "RENDER", - env: "RENDER", - pr: { - IS_PULL_REQUEST: "true" - } - }, - { - name: "Sail CI", - constant: "SAIL", - env: "SAILCI", - pr: "SAIL_PULL_REQUEST_NUMBER" - }, - { - name: "Screwdriver", - constant: "SCREWDRIVER", - env: "SCREWDRIVER", - pr: { - env: "SD_PULL_REQUEST", - ne: "false" - } - }, - { - name: "Semaphore", - constant: "SEMAPHORE", - env: "SEMAPHORE", - pr: "PULL_REQUEST_NUMBER" - }, - { - name: "Sourcehut", - constant: "SOURCEHUT", - env: { - CI_NAME: "sourcehut" - } - }, - { - name: "Strider CD", - constant: "STRIDER", - env: "STRIDER" - }, - { - name: "TaskCluster", - constant: "TASKCLUSTER", - env: [ - "TASK_ID", - "RUN_ID" - ] - }, - { - name: "TeamCity", - constant: "TEAMCITY", - env: "TEAMCITY_VERSION" - }, - { - name: "Travis CI", - constant: "TRAVIS", - env: "TRAVIS", - pr: { - env: "TRAVIS_PULL_REQUEST", - ne: "false" - } - }, - { - name: "Vela", - constant: "VELA", - env: "VELA", - pr: { - VELA_PULL_REQUEST: "1" - } - }, - { - name: "Vercel", - constant: "VERCEL", - env: { - any: [ - "NOW_BUILDER", - "VERCEL" - ] - }, - pr: "VERCEL_GIT_PULL_REQUEST_ID" - }, - { - name: "Visual Studio App Center", - constant: "APPCENTER", - env: "APPCENTER_BUILD_ID" - }, - { - name: "Woodpecker", - constant: "WOODPECKER", - env: { - CI: "woodpecker" - }, - pr: { - CI_BUILD_EVENT: "pull_request" - } - }, - { - name: "Xcode Cloud", - constant: "XCODE_CLOUD", - env: "CI_XCODE_PROJECT", - pr: "CI_PULL_REQUEST_NUMBER" - }, - { - name: "Xcode Server", - constant: "XCODE_SERVER", - env: "XCS" - } - ]; - } -}); - -// node_modules/ci-info/index.js -var require_ci_info = __commonJS({ - "node_modules/ci-info/index.js"(exports) { - "use strict"; - var vendors = require_vendors(); - var env = process.env; - Object.defineProperty(exports, "_vendors", { - value: vendors.map(function(v) { - return v.constant; - }) - }); - exports.name = null; - exports.isPR = null; - vendors.forEach(function(vendor) { - const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]; - const isCI2 = envs.every(function(obj) { - return checkEnv(obj); - }); - exports[vendor.constant] = isCI2; - if (!isCI2) { - return; - } - exports.name = vendor.name; - switch (typeof vendor.pr) { - case "string": - exports.isPR = !!env[vendor.pr]; - break; - case "object": - if ("env" in vendor.pr) { - exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne; - } else if ("any" in vendor.pr) { - exports.isPR = vendor.pr.any.some(function(key) { - return !!env[key]; - }); - } else { - exports.isPR = checkEnv(vendor.pr); - } - break; - default: - exports.isPR = null; - } - }); - exports.isCI = !!(env.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false' - (env.BUILD_ID || // Jenkins, Cloudbees - env.BUILD_NUMBER || // Jenkins, TeamCity - env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari - env.CI_APP_ID || // Appflow - env.CI_BUILD_ID || // Appflow - env.CI_BUILD_NUMBER || // Appflow - env.CI_NAME || // Codeship and others - env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI - env.RUN_ID || // TaskCluster, dsari - exports.name || false)); - function checkEnv(obj) { - if (typeof obj === "string") - return !!env[obj]; - if ("env" in obj) { - return env[obj.env] && env[obj.env].includes(obj.includes); - } - if ("any" in obj) { - return obj.any.some(function(k) { - return !!env[k]; - }); - } - return Object.keys(obj).every(function(k) { - return env[k] === obj[k]; - }); - } - } -}); - -// src/common/mockable.js -var import_lilconfig = __toESM(require_dist(), 1); -var import_find_parent_dir = __toESM(require_find_parent_dir(), 1); -import fs from "fs/promises"; - -// node_modules/get-stdin/index.js -var { stdin } = process; -async function getStdin() { - let result = ""; - if (stdin.isTTY) { - return result; - } - stdin.setEncoding("utf8"); - for await (const chunk of stdin) { - result += chunk; - } - return result; -} -getStdin.buffer = async () => { - const result = []; - let length = 0; - if (stdin.isTTY) { - return Buffer.concat([]); - } - for await (const chunk of stdin) { - result.push(chunk); - length += chunk.length; - } - return Buffer.concat(result, length); -}; - -// src/common/mockable.js -var import_ci_info = __toESM(require_ci_info(), 1); -function writeFormattedFile(file, data) { - return fs.writeFile(file, data); -} -var mockable = { - lilconfig: import_lilconfig.lilconfig, - findParentDir: import_find_parent_dir.sync, - getStdin, - isCI: () => import_ci_info.isCI, - writeFormattedFile -}; -var mockable_default = mockable; -export { - mockable_default as default -}; diff --git a/node_modules/prettier/package.json b/node_modules/prettier/package.json index 897fae4..1b27ec7 100644 --- a/node_modules/prettier/package.json +++ b/node_modules/prettier/package.json @@ -1,6 +1,6 @@ { "name": "prettier", - "version": "3.1.0", + "version": "3.2.5", "description": "Prettier is an opinionated code formatter", "bin": "./bin/prettier.cjs", "repository": "prettier/prettier", @@ -150,7 +150,6 @@ "index.d.ts", "index.mjs", "internal/cli.mjs", - "internal/internal.mjs", "package.json", "plugins/acorn.d.ts", "plugins/acorn.js", diff --git a/node_modules/prettier/plugins/acorn.js b/node_modules/prettier/plugins/acorn.js index 81a163e..a7c5ab8 100644 --- a/node_modules/prettier/plugins/acorn.js +++ b/node_modules/prettier/plugins/acorn.js @@ -1,13 +1,13 @@ -(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.acorn=e()}})(function(){"use strict";var xi=Object.create;var ce=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var gi=Object.getOwnPropertyNames;var vi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty;var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Si=(e,t)=>{for(var i in t)ce(e,i,{get:t[i],enumerable:!0})},tt=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of gi(t))!bi.call(e,r)&&r!==i&&ce(e,r,{get:()=>t[r],enumerable:!(s=yi(t,r))||s.enumerable});return e};var Pe=(e,t,i)=>(i=e!=null?xi(vi(e)):{},tt(t||!e||!e.__esModule?ce(i,"default",{value:e,enumerable:!0}):i,e)),_i=e=>tt(ce({},"__esModule",{value:!0}),e);var Gt=Ae((Ys,Jt)=>{Jt.exports={}});var Ke=Ae(($s,Ge)=>{"use strict";var as=Gt(),ns=/^[\da-fA-F]+$/,os=/^\d+$/,Kt=new WeakMap;function Wt(e){e=e.Parser.acorn||e;let t=Kt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,n=new s("...",!0,!0),h={tc_oTag:n,tc_cTag:o,tc_expr:u},l={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(u),this.context.push(n),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(x){let _=this.context.pop();_===n&&x===i.slash||_===o?(this.context.pop(),this.exprAllowed=this.curContext()===u):this.exprAllowed=!0},t={tokContexts:h,tokTypes:l},Kt.set(e,t)}return t}function ne(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return ne(e.object)+"."+ne(e.property)}Ge.exports=function(e){return e=e||{},function(t){return us({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(Ge.exports,"tokTypes",{get:function(){return Wt(void 0).tokTypes},configurable:!0,enumerable:!0});function us(e,t){let i=t.acorn||void 0,s=Wt(i),r=i.tokTypes,n=s.tokTypes,o=i.tokContexts,u=s.tokContexts.tc_oTag,h=s.tokContexts.tc_cTag,l=s.tokContexts.tc_expr,x=i.isNewLine,_=i.isIdentifierStart,B=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let p="",d=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let m=this.input.charCodeAt(this.pos);switch(m){case 60:case 123:return this.pos===this.start?m===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(m):(p+=this.input.slice(d,this.pos),this.finishToken(n.jsxText,p));case 38:p+=this.input.slice(d,this.pos),p+=this.jsx_readEntity(),d=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(m===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:x(m)?(p+=this.input.slice(d,this.pos),p+=this.jsx_readNewLine(!0),d=this.pos):++this.pos}}}jsx_readNewLine(p){let d=this.input.charCodeAt(this.pos),m;return++this.pos,d===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,m=p?` +(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.acorn=e()}})(function(){"use strict";var xi=Object.create;var ce=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var gi=Object.getOwnPropertyNames;var vi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty;var Ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Si=(e,t)=>{for(var i in t)ce(e,i,{get:t[i],enumerable:!0})},et=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of gi(t))!bi.call(e,r)&&r!==i&&ce(e,r,{get:()=>t[r],enumerable:!(s=yi(t,r))||s.enumerable});return e};var Ae=(e,t,i)=>(i=e!=null?xi(vi(e)):{},et(t||!e||!e.__esModule?ce(i,"default",{value:e,enumerable:!0}):i,e)),_i=e=>et(ce({},"__esModule",{value:!0}),e);var Jt=Ee((Ys,qt)=>{qt.exports={}});var Ge=Ee(($s,Je)=>{"use strict";var as=Jt(),ns=/^[\da-fA-F]+$/,os=/^\d+$/,Gt=new WeakMap;function Kt(e){e=e.Parser.acorn||e;let t=Gt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,n=new s("...",!0,!0),h={tc_oTag:n,tc_cTag:o,tc_expr:u},l={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(u),this.context.push(n),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(x){let _=this.context.pop();_===n&&x===i.slash||_===o?(this.context.pop(),this.exprAllowed=this.curContext()===u):this.exprAllowed=!0},t={tokContexts:h,tokTypes:l},Gt.set(e,t)}return t}function ne(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return ne(e.object)+"."+ne(e.property)}Je.exports=function(e){return e=e||{},function(t){return us({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(Je.exports,"tokTypes",{get:function(){return Kt(void 0).tokTypes},configurable:!0,enumerable:!0});function us(e,t){let i=t.acorn||void 0,s=Kt(i),r=i.tokTypes,n=s.tokTypes,o=i.tokContexts,u=s.tokContexts.tc_oTag,h=s.tokContexts.tc_cTag,l=s.tokContexts.tc_expr,x=i.isNewLine,_=i.isIdentifierStart,B=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let p="",d=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let m=this.input.charCodeAt(this.pos);switch(m){case 60:case 123:return this.pos===this.start?m===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(m):(p+=this.input.slice(d,this.pos),this.finishToken(n.jsxText,p));case 38:p+=this.input.slice(d,this.pos),p+=this.jsx_readEntity(),d=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(m===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:x(m)?(p+=this.input.slice(d,this.pos),p+=this.jsx_readNewLine(!0),d=this.pos):++this.pos}}}jsx_readNewLine(p){let d=this.input.charCodeAt(this.pos),m;return++this.pos,d===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,m=p?` `:`\r -`):m=String.fromCharCode(d),this.options.locations&&(++this.curLine,this.lineStart=this.pos),m}jsx_readString(p){let d="",m=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let g=this.input.charCodeAt(this.pos);if(g===p)break;g===38?(d+=this.input.slice(m,this.pos),d+=this.jsx_readEntity(),m=this.pos):x(g)?(d+=this.input.slice(m,this.pos),d+=this.jsx_readNewLine(!1),m=this.pos):++this.pos}return d+=this.input.slice(m,this.pos++),this.finishToken(r.string,d)}jsx_readEntity(){let p="",d=0,m,g=this.input[this.pos];g!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let E=++this.pos;for(;this.pos")}let Ee=E.name?"Element":"Fragment";return m["opening"+Ee]=E,m["closing"+Ee]=pe,m.children=g,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(m,"JSX"+Ee)}jsx_parseText(){let p=this.parseLiteral(this.value);return p.type="JSXText",p}jsx_parseElement(){let p=this.start,d=this.startLoc;return this.next(),this.jsx_parseElementAt(p,d)}parseExprAtom(p){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(p)}readToken(p){let d=this.curContext();if(d===l)return this.jsx_readToken();if(d===u||d===h){if(_(p))return this.jsx_readWord();if(p==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((p===34||p===39)&&d==u)return this.jsx_readString(p)}return p===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(n.jsxTagStart)):super.readToken(p)}updateContext(p){if(this.type==r.braceL){var d=this.curContext();d==u?this.context.push(o.b_expr):d==l?this.context.push(o.b_tmpl):super.updateContext(p),this.exprAllowed=!0}else if(this.type===r.slash&&p===n.jsxTagStart)this.context.length-=2,this.context.push(h),this.exprAllowed=!1;else return super.updateContext(p)}}}});var Zt=Ae(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.extract=xs;X.parse=gs;X.parseWithComments=$t;X.print=vs;X.strip=ys;var cs=/\*\/$/,ls=/^\/\*\*?/,Qt=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,fs=/(^|\s+)\/\/([^\r\n]*)/g,Xt=/^(\r?\n)+/,ds=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,zt=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,ms=/(\r?\n|^) *\* ?/g,Yt=[];function xs(e){let t=e.match(Qt);return t?t[0].trimLeft():""}function ys(e){let t=e.match(Qt);return t&&t[0]?e.substring(t[0].length):e}function gs(e){return $t(e).pragmas}function $t(e){let t=` -`;e=e.replace(ls,"").replace(cs,"").replace(ms,"$1");let i="";for(;i!==e;)i=e,e=e.replace(ds,`${t}$1 $2${t}`);e=e.replace(Xt,"").trimRight();let s=Object.create(null),r=e.replace(zt,"").replace(Xt,"").trimRight(),n;for(;n=zt.exec(e);){let o=n[2].replace(fs,"");typeof s[n[1]]=="string"||Array.isArray(s[n[1]])?s[n[1]]=Yt.concat(s[n[1]],o):s[n[1]]=o}return{comments:r,pragmas:s}}function vs({comments:e="",pragmas:t={}}){let i=` -`,s="/**",r=" *",n=" */",o=Object.keys(t),u=o.flatMap(l=>Ht(l,t[l])).map(l=>`${r} ${l}${i}`).join("");if(!e){if(o.length===0)return"";if(o.length===1&&!Array.isArray(t[o[0]])){let l=t[o[0]];return`${s} ${Ht(o[0],l)[0]}${n}`}}let h=e.split(i).map(l=>`${r} ${l}`).join(i)+i;return s+i+(e?h:"")+(e&&o.length?r+i:"")+u+n}function Ht(e,t){return Yt.concat(t).map(i=>`@${e} ${i}`.trim())}});var Hs={};Si(Hs,{parsers:()=>zs});var Ci=[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,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],ot=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,38,6,186,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,19,72,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,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,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,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,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ti="\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",ut="\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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",Ie={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ne="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",ki={5:Ne,"5module":Ne+" export import",6:Ne+" const class extends export import super"},wi=/^in(stanceof)?$/,Ei=new RegExp("["+ut+"]"),Ai=new RegExp("["+ut+Ti+"]");function Le(e,t){for(var i=65536,s=0;se)return!1;if(i+=t[s+1],i>=e)return!0}return!1}function U(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ei.test(String.fromCharCode(e)):t===!1?!1:Le(e,ot)}function H(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ai.test(String.fromCharCode(e)):t===!1?!1:Le(e,ot)||Le(e,Ci)}var S=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function I(e,t){return new S(e,{beforeExpr:!0,binop:t})}var N={beforeExpr:!0},A={startsExpr:!0},Be={};function b(e,t){return t===void 0&&(t={}),t.keyword=e,Be[e]=new S(e,t)}var a={num:new S("num",A),regexp:new S("regexp",A),string:new S("string",A),name:new S("name",A),privateId:new S("privateId",A),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",N),semi:new S(";",N),colon:new S(":",N),dot:new S("."),question:new S("?",N),questionDot:new S("?."),arrow:new S("=>",N),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",N),backQuote:new S("`",A),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:I("||",1),logicalAND:I("&&",2),bitwiseOR:I("|",3),bitwiseXOR:I("^",4),bitwiseAND:I("&",5),equality:I("==/!=/===/!==",6),relational:I("/<=/>=",7),bitShift:I("<>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:I("%",10),star:I("*",10),slash:I("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:I("??",1),_break:b("break"),_case:b("case",N),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",N),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",N),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",A),_if:b("if"),_return:b("return",N),_switch:b("switch"),_throw:b("throw",N),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",A),_super:b("super",A),_class:b("class",A),_extends:b("extends",N),_export:b("export"),_import:b("import",A),_null:b("null",A),_true:b("true",A),_false:b("false",A),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},R=/\r\n?|\n|\u2028|\u2029/,Pi=new RegExp(R.source,"g");function Q(e){return e===10||e===13||e===8232||e===8233}function ht(e,t,i){i===void 0&&(i=e.length);for(var s=t;s>10)+55296,(e&1023)+56320))}var Vi=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,te=function(t,i){this.line=t,this.column=i};te.prototype.offset=function(t){return new te(this.line,this.column+t)};var xe=function(t,i,s){this.start=i,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function lt(e,t){for(var i=1,s=0;;){var r=ht(e,s,t);if(r<0)return new te(i,t-s);++i,s=r}}var Re={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},rt=!1;function Li(e){var t={};for(var i in Re)t[i]=e&&se(e,i)?e[i]:Re[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!rt&&typeof console=="object"&&console.warn&&(rt=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. -Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),it(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return it(t.onComment)&&(t.onComment=Ri(t,t.onComment)),t}function Ri(e,t){return function(i,s,r,n,o,u){var h={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(h.loc=new xe(this,o,u)),e.ranges&&(h.range=[r,n]),t.push(h)}}var ie=1,Y=2,De=4,ft=8,dt=16,mt=32,Fe=64,xt=128,re=256,Me=ie|Y|re;function je(e,t){return Y|(e?De:0)|(t?ft:0)}var fe=0,Ue=1,J=2,yt=3,gt=4,vt=5,T=function(t,i,s){this.options=t=Li(t),this.sourceFile=t.sourceFile,this.keywords=G(ki[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Ie[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=G(r);var n=(r?r+" ":"")+Ie.strict;this.reservedWordsStrict=G(n),this.reservedWordsStrictBind=G(n+" "+Ie.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(` -`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(R).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(ie),this.regexpState=null,this.privateNameStack=[]},F={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};T.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};F.inFunction.get=function(){return(this.currentVarScope().flags&Y)>0};F.inGenerator.get=function(){return(this.currentVarScope().flags&ft)>0&&!this.currentVarScope().inClassFieldInit};F.inAsync.get=function(){return(this.currentVarScope().flags&De)>0&&!this.currentVarScope().inClassFieldInit};F.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&re)return!1;if(t.flags&Y)return(t.flags&De)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};F.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&Fe)>0||i||this.options.allowSuperOutsideMethod};F.allowDirectSuper.get=function(){return(this.currentThisScope().flags&xt)>0};F.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};F.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(Y|re))>0||i};F.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&re)>0};T.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,V.lastIndex=e,e+=V.exec(this.input)[0].length,this.input[e]===";"&&e++}};k.eat=function(e){return this.type===e?(this.next(),!0):!1};k.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};k.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};k.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};k.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||R.test(this.input.slice(this.lastTokEnd,this.start))};k.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};k.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};k.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};k.expect=function(e){this.eat(e)||this.unexpected()};k.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var ye=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};k.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};k.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};k.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&s<56320)return!0;if(U(s,!0)){for(var r=i+1;H(s=this.input.charCodeAt(r),!0);)++r;if(s===92||s>55295&&s<56320)return!0;var n=this.input.slice(i,r);if(!wi.test(n))return!0}return!1};f.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var e=V.exec(this.input),t=this.pos+e[0].length,i;return!R.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(H(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};f.parseStatement=function(e,t,i){var s=this.type,r=this.startNode(),n;switch(this.isLet(e)&&(s=a._var,n="let"),s){case a._break:case a._continue:return this.parseBreakContinueStatement(r,s.keyword);case a._debugger:return this.parseDebuggerStatement(r);case a._do:return this.parseDoStatement(r);case a._for:return this.parseForStatement(r);case a._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case a._class:return e&&this.unexpected(),this.parseClass(r,!0);case a._if:return this.parseIfStatement(r);case a._return:return this.parseReturnStatement(r);case a._switch:return this.parseSwitchStatement(r);case a._throw:return this.parseThrowStatement(r);case a._try:return this.parseTryStatement(r);case a._const:case a._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(r,n);case a._while:return this.parseWhileStatement(r);case a._with:return this.parseWithStatement(r);case a.braceL:return this.parseBlock(!0,r);case a.semi:return this.parseEmptyStatement(r);case a._export:case a._import:if(this.options.ecmaVersion>10&&s===a._import){V.lastIndex=this.pos;var o=V.exec(this.input),u=this.pos+o[0].length,h=this.input.charCodeAt(u);if(h===40||h===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===a._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var l=this.value,x=this.parseExpression();return s===a.name&&x.type==="Identifier"&&this.eat(a.colon)?this.parseLabeledStatement(r,l,x,e):this.parseExpressionStatement(r,x)}};f.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(a.semi)||this.insertSemicolon()?e.label=null:this.type!==a.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s=6?this.eat(a.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};f.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(qe),this.enterScope(0),this.expect(a.parenL),this.type===a.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===a._var||this.type===a._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&s.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===a._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,s)):(t>-1&&this.unexpected(t),this.parseFor(e,s))}var n=this.isContextual("let"),o=!1,u=new ye,h=this.parseExpression(t>-1?"await":!0,u);return this.type===a._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===a._in?t>-1&&this.unexpected(t):e.await=t>-1),n&&o&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,u),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))};f.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,ee|(i?0:Oe),!1,t)};f.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(a._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};f.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(a.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};f.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(a.braceL),this.labels.push(Bi),this.enterScope(0);for(var t,i=!1;this.type!==a.braceR;)if(this.type===a._case||this.type===a._default){var s=this.type===a._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(a.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};f.parseThrowStatement=function(e){return this.next(),R.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Di=[];f.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?mt:0),this.checkLValPattern(e,t?gt:J),this.expect(a.parenR),e};f.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===a._catch){var t=this.startNode();this.next(),this.eat(a.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(a._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};f.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};f.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(qe),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};f.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};f.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};f.parseLabeledStatement=function(e,t,i,s){for(var r=0,n=this.labels;r=0;h--){var l=this.labels[h];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};f.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};f.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(a.braceL),e&&this.enterScope(0);this.type!==a.braceR;){var s=this.parseStatement(null);t.body.push(s)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};f.parseFor=function(e,t){return e.init=t,this.expect(a.semi),e.test=this.type===a.semi?null:this.parseExpression(),this.expect(a.semi),e.update=this.type===a.parenR?null:this.parseExpression(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};f.parseForIn=function(e,t){var i=this.type===a._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};f.parseVar=function(e,t,i,s){for(e.declarations=[],e.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(a.eq)?r.init=this.parseMaybeAssign(t):!s&&i==="const"&&!(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&r.id.type!=="Identifier"&&!(t&&(this.type===a._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):r.init=null,e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(a.comma))break}return e};f.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ue:J,!1)};var ee=1,Oe=2,bt=4;f.parseFunction=function(e,t,i,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===a.star&&t&Oe&&this.unexpected(),e.generator=this.eat(a.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&ee&&(e.id=t&bt&&this.type!==a.name?null:this.parseIdent(),e.id&&!(t&Oe)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ue:J:yt));var n=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(je(e.async,e.generator)),t&ee||(e.id=this.type===a.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,r),this.yieldPos=n,this.awaitPos=o,this.awaitIdentPos=u,this.finishNode(e,t&ee?"FunctionDeclaration":"FunctionExpression")};f.parseFunctionParams=function(e){this.expect(a.parenL),e.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};f.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),r=this.startNode(),n=!1;for(r.body=[],this.expect(a.braceL);this.type!==a.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(n&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),n=!0):o.key&&o.key.type==="PrivateIdentifier"&&Fi(s,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};f.parseClassElement=function(e){if(this.eat(a.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,n=!1,o="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(a.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===a.star?u=!0:s="static"}if(i.static=u,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon()?n=!0:s="async"),!s&&(t>=9||!n)&&this.eat(a.star)&&(r=!0),!s&&!n&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===a.parenL||o!=="method"||r||n){var l=!i.static&&de(i,"constructor"),x=l&&e;l&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=l?"constructor":o,this.parseClassMethod(i,r,n,x)}else this.parseClassField(i);return i};f.isClassElementNameStart=function(){return this.type===a.name||this.type===a.privateId||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword};f.parseClassElementName=function(e){this.type===a.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};f.parseClassMethod=function(e,t,i,s){var r=e.key;e.kind==="constructor"?(t&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):e.static&&de(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,s);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};f.parseClassField=function(e){if(de(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&de(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(a.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};f.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(re|Fe);this.type!==a.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};f.parseClassId=function(e,t){this.type===a.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,J,!1)):(t===!0&&this.unexpected(),e.id=null)};f.parseClassSuper=function(e){e.superClass=this.eat(a._extends)?this.parseExprSubscripts(null,!1):null};f.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};f.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=s===0?null:this.privateNameStack[s-1],n=0;n=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};f.parseExport=function(e,t){if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(e,t);if(this.eat(a._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,s=e.specifiers;i=13&&this.type===a.string){var e=this.parseLiteral(this.value);return Vi.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};f.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var O=T.prototype;O.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=e.properties;s=8&&!u&&h.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(C.f_expr),this.parseFunction(this.startNodeAt(n,o),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(n,o),[h],!1,t);if(this.options.ecmaVersion>=8&&h.name==="async"&&this.type===a.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return h=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(a.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,o),[h],!0,t)}return h;case a.regexp:var l=this.value;return s=this.parseLiteral(l.value),s.regex={pattern:l.pattern,flags:l.flags},s;case a.num:case a.string:return this.parseLiteral(this.value);case a._null:case a._true:case a._false:return s=this.startNode(),s.value=this.type===a._null?null:this.type===a._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case a.parenL:var x=this.start,_=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(_)&&(e.parenthesizedAssign=x),e.parenthesizedBind<0&&(e.parenthesizedBind=x)),_;case a.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(a.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case a.braceL:return this.overrideContext(C.b_expr),this.parseObj(!1,e);case a._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case a._class:return this.parseClass(this.startNode(),!1);case a._new:return this.parseNew();case a.backQuote:return this.parseTemplate();case a._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};y.parseExprAtomDefault=function(){this.unexpected()};y.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var i=this.parseIdent(!0);if(this.type===a.parenL&&!e)return this.parseDynamicImport(t);if(this.type===a.dot)return t.meta=i,this.parseImportMeta(t);this.unexpected()};y.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(a.parenR)){var t=this.start;this.eat(a.comma)&&this.eat(a.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};y.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};y.parseParenExpression=function(){this.expect(a.parenL);var e=this.parseExpression();return this.expect(a.parenR),e};y.shouldParseArrow=function(e){return!this.canInsertSemicolon()};y.parseParenAndDistinguishExpression=function(e,t){var i=this.start,s=this.startLoc,r,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,u=this.startLoc,h=[],l=!0,x=!1,_=new ye,B=this.yieldPos,p=this.awaitPos,d;for(this.yieldPos=0,this.awaitPos=0;this.type!==a.parenR;)if(l?l=!1:this.expect(a.comma),n&&this.afterTrailingComma(a.parenR,!0)){x=!0;break}else if(this.type===a.ellipsis){d=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else h.push(this.parseMaybeAssign(!1,_,this.parseParenItem));var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(a.parenR),e&&this.shouldParseArrow(h)&&this.eat(a.arrow))return this.checkPatternErrors(_,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=B,this.awaitPos=p,this.parseParenArrowList(i,s,h,t);(!h.length||x)&&this.unexpected(this.lastTokStart),d&&this.unexpected(d),this.checkExpressionErrors(_,!0),this.yieldPos=B||this.yieldPos,this.awaitPos=p||this.awaitPos,h.length>1?(r=this.startNodeAt(o,u),r.expressions=h,this.finishNodeAt(r,"SequenceExpression",m,g)):r=h[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var E=this.startNodeAt(i,s);return E.expression=r,this.finishNode(E,"ParenthesizedExpression")}else return r};y.parseParenItem=function(e){return e};y.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,s)};var Mi=[];y.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===a.dot){var t=this.startNodeAt(e.start,e.startLoc);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(a.parenL)?e.arguments=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Mi,this.finishNode(e,"NewExpression")};y.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===a.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` -`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};y.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};y.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!R.test(this.input.slice(this.lastTokEnd,this.start))};y.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};y.parseProperty=function(e,t){var i=this.startNode(),s,r,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(s=this.eat(a.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,n,o,t,u),this.finishNode(i,"Property")};y.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};y.parsePropertyValue=function(e,t,i,s,r,n,o,u){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,s)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};y.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(je(t,s.generator)|Fe|(i?xt:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};y.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(je(i,!1)|dt),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};y.parseFunctionBody=function(e,t,i,s){var r=t&&this.type!==a.braceL,n=this.strict,o=!1;if(r)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||u)&&(o=this.strictDirective(this.end),o&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var h=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!n&&!o&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,vt),e.body=this.parseBlock(!1,void 0,o&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=h}this.exitScope()};y.isSimpleParamList=function(e){for(var t=0,i=e;t-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&r.flags&ie&&delete this.undefinedExports[e]}else if(t===gt){var n=this.currentScope();n.lexical.push(e)}else if(t===yt){var o=this.currentScope();this.treatFunctionsAsVar?s=o.lexical.indexOf(e)>-1:s=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var h=this.scopeStack[u];if(h.lexical.indexOf(e)>-1&&!(h.flags&mt&&h.lexical[0]===e)||!this.treatFunctionsAsVarInScope(h)&&h.functions.indexOf(e)>-1){s=!0;break}if(h.var.push(e),this.inModule&&h.flags&ie&&delete this.undefinedExports[e],h.flags&Me)break}s&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};W.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};W.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};W.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Me)return t}};W.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Me&&!(t.flags&dt))return t}};var ge=function(t,i,s){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new xe(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},ae=T.prototype;ae.startNode=function(){return new ge(this,this.start,this.startLoc)};ae.startNodeAt=function(e,t){return new ge(this,e,t)};function _t(e,t,i,s){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=i),e}ae.finishNode=function(e,t){return _t.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};ae.finishNodeAt=function(e,t,i,s){return _t.call(this,e,t,i,s)};ae.copyNode=function(e){var t=new ge(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var Ct="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Tt=Ct+" Extended_Pictographic",kt=Tt,wt=kt+" EBase EComp EMod EPres ExtPict",Et=wt,Ui=Et,qi={9:Ct,10:Tt,11:kt,12:wt,13:Et,14:Ui},Ji="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Gi={9:"",10:"",11:"",12:"",13:"",14:Ji},at="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",At="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Pt=At+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",It=Pt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Nt=It+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Vt=Nt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ki=Vt+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Wi={9:At,10:Pt,11:It,12:Nt,13:Vt,14:Ki},Lt={};function Xi(e){var t=Lt[e]={binary:G(qi[e]+" "+at),binaryOfStrings:G(Gi[e]),nonBinary:{General_Category:G(at),Script:G(Wi[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(le=0,Ve=[9,10,11,12,13,14];le=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lt[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};M.prototype.reset=function(t,i,s){var r=s.indexOf("v")!==-1,n=s.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=s,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};M.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};M.prototype.at=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return-1;var n=s.charCodeAt(t);if(!(i||this.switchU)||n<=55295||n>=57344||t+1>=r)return n;var o=s.charCodeAt(t+1);return o>=56320&&o<=57343?(n<<10)+o-56613888:n};M.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return r;var n=s.charCodeAt(t),o;return!(i||this.switchU)||n<=55295||n>=57344||t+1>=r||(o=s.charCodeAt(t+1))<56320||o>57343?t+1:t+2};M.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};M.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};M.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};M.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};M.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var s=this.pos,r=0,n=t;r-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(s=!0),o==="v"&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(e.start,"Invalid regular expression flag")};c.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};c.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};c.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};c.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};c.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return r!==-1&&r=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};c.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};c.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};c.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Rt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Rt(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}c.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!Rt(i);)e.advance();return e.pos!==t};c.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};c.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};c.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};c.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=K(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=K(e.lastIntValue);return!0}return!1};c.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),zi(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function zi(e){return U(e,!0)||e===36||e===95}c.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),Hi(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function Hi(e){return H(e,!0)||e===36||e===95||e===8204||e===8205}c.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};c.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};c.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};c.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};c.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};c.regexp_eatZero=function(e){return e.current()===48&&!ve(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};c.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};c.regexp_eatControlLetter=function(e){var t=e.current();return Ot(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Ot(e){return e>=65&&e<=90||e>=97&&e<=122}c.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(s&&r>=55296&&r<=56319){var n=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(r-55296)*1024+(o-56320)+65536,!0}e.pos=n,e.lastIntValue=r}return!0}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Qi(e.lastIntValue))return!0;s&&e.raise("Invalid unicode escape"),e.pos=i}return!1};function Qi(e){return e>=0&&e<=1114111}c.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};c.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var Bt=0,q=1,L=2;c.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Yi(t))return e.lastIntValue=-1,e.advance(),q;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var s;if(e.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&s===L&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return Bt};function Yi(e){return e===100||e===68||e===115||e===83||e===119||e===87}c.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,s),q}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r)}return Bt};c.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){se(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};c.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return q;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return L;e.raise("Invalid property name")};c.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Dt(t=e.current());)e.lastStringValue+=K(t),e.advance();return e.lastStringValue!==""};function Dt(e){return Ot(e)||e===95}c.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";$i(t=e.current());)e.lastStringValue+=K(t),e.advance();return e.lastStringValue!==""};function $i(e){return Dt(e)||ve(e)}c.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};c.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===L&&e.raise("Negated character class may contain strings"),!0}return!1};c.regexp_classContents=function(e){return e.current()===93?q:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),q)};c.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};c.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||jt(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return s!==93?(e.lastIntValue=s,e.advance(),!0):!1};c.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};c.regexp_classSetExpression=function(e){var t=q,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===L&&(t=L);for(var s=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==L&&(t=q);continue}e.raise("Invalid character in character class")}if(s!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(s!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===L&&(t=L)}};c.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;return i!==-1&&s!==-1&&i>s&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};c.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?q:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};c.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),s=this.regexp_classContents(e);if(e.eat(93))return i&&s===L&&e.raise("Negated character class may contain strings"),s;e.pos=t}if(e.eat(92)){var r=this.regexp_eatCharacterClassEscape(e);if(r)return r;e.pos=t}return null};c.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};c.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===L&&(t=L);return t};c.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?q:L};c.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&Zi(i)||es(i)?!1:(e.advance(),e.lastIntValue=i,!0)};function Zi(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function es(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}c.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return ts(t)?(e.lastIntValue=t,e.advance(),!0):!1};function ts(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}c.regexp_eatClassControlLetter=function(e){var t=e.current();return ve(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};c.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};c.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;ve(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function ve(e){return e>=48&&e<=57}c.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Ft(i=e.current());)e.lastIntValue=16*e.lastIntValue+Mt(i),e.advance();return e.pos!==t};function Ft(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Mt(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}c.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};c.regexp_eatOctalDigit=function(e){var t=e.current();return jt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function jt(e){return e>=48&&e<=55}c.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var s=0;s=this.input.length)return this.finishToken(a.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};v.readToken=function(e){return U(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};v.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};v.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=t;(s=ht(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};v.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&pt.test(String.fromCharCode(e)))++this.pos;else break e}}};v.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};v.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(a.ellipsis)):(++this.pos,this.finishToken(a.dot))};v.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(a.assign,2):this.finishOp(a.slash,1)};v.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,s=e===42?a.star:a.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,s=a.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(a.assign,i+1):this.finishOp(s,i)};v.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(a.assign,3)}return this.finishOp(e===124?a.logicalOR:a.logicalAND,2)}return t===61?this.finishOp(a.assign,2):this.finishOp(e===124?a.bitwiseOR:a.bitwiseAND,1)};v.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(a.assign,2):this.finishOp(a.bitwiseXOR,1)};v.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||R.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(a.incDec,2):t===61?this.finishOp(a.assign,2):this.finishOp(a.plusMin,1)};v.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(a.assign,i+1):this.finishOp(a.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(a.relational,i))};v.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(a.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(a.arrow)):this.finishOp(e===61?a.eq:a.prefix,1)};v.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(a.questionDot,2)}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(a.assign,3)}return this.finishOp(a.coalesce,2)}}return this.finishOp(a.question,1)};v.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),U(t,!0)||t===92))return this.finishToken(a.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+K(t)+"'")};v.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(a.parenL);case 41:return++this.pos,this.finishToken(a.parenR);case 59:return++this.pos,this.finishToken(a.semi);case 44:return++this.pos,this.finishToken(a.comma);case 91:return++this.pos,this.finishToken(a.bracketL);case 93:return++this.pos,this.finishToken(a.bracketR);case 123:return++this.pos,this.finishToken(a.braceL);case 125:return++this.pos,this.finishToken(a.braceR);case 58:return++this.pos,this.finishToken(a.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(a.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(a.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+K(e)+"'")};v.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};v.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(R.test(s)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(s==="[")t=!0;else if(s==="]"&&t)t=!1;else if(s==="/"&&!t)break;e=s==="\\"}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var n=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(n);var u=this.regexpState||(this.regexpState=new M(this));u.reset(i,r,o),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var h=null;try{h=new RegExp(r,o)}catch{}return this.finishToken(a.regexp,{pattern:r,flags:o,value:h})};v.readInt=function(e,t,i){for(var s=this.options.ecmaVersion>=12&&t===void 0,r=i&&this.input.charCodeAt(this.pos)===48,n=this.pos,o=0,u=0,h=0,l=t??1/0;h=97?_=x-97+10:x>=65?_=x-65+10:x>=48&&x<=57?_=x-48:_=1/0,_>=e)break;u=x,o=o*e+_}return s&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||t!=null&&this.pos-n!==t?null:o};function is(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function Ut(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}v.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=Ut(this.input.slice(t,this.pos)),++this.pos):U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,i)};v.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&s===110){var r=Ut(this.input.slice(t,this.pos));return++this.pos,U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,r)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),s===46&&!i&&(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),(s===69||s===101)&&!i&&(s=this.input.charCodeAt(++this.pos),(s===43||s===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=is(this.input.slice(t,this.pos),i);return this.finishToken(a.num,n)};v.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};v.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;s===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):s===8232||s===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Q(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(a.string,t)};var qt={};v.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===qt)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};v.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw qt;this.raise(e,t)};v.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===a.template||this.type===a.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(a.dollarBraceL)):(++this.pos,this.finishToken(a.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(a.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Q(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` +`):m=String.fromCharCode(d),this.options.locations&&(++this.curLine,this.lineStart=this.pos),m}jsx_readString(p){let d="",m=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let g=this.input.charCodeAt(this.pos);if(g===p)break;g===38?(d+=this.input.slice(m,this.pos),d+=this.jsx_readEntity(),m=this.pos):x(g)?(d+=this.input.slice(m,this.pos),d+=this.jsx_readNewLine(!1),m=this.pos):++this.pos}return d+=this.input.slice(m,this.pos++),this.finishToken(r.string,d)}jsx_readEntity(){let p="",d=0,m,g=this.input[this.pos];g!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let E=++this.pos;for(;this.pos")}let we=E.name?"Element":"Fragment";return m["opening"+we]=E,m["closing"+we]=pe,m.children=g,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(m,"JSX"+we)}jsx_parseText(){let p=this.parseLiteral(this.value);return p.type="JSXText",p}jsx_parseElement(){let p=this.start,d=this.startLoc;return this.next(),this.jsx_parseElementAt(p,d)}parseExprAtom(p){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(p)}readToken(p){let d=this.curContext();if(d===l)return this.jsx_readToken();if(d===u||d===h){if(_(p))return this.jsx_readWord();if(p==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((p===34||p===39)&&d==u)return this.jsx_readString(p)}return p===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(n.jsxTagStart)):super.readToken(p)}updateContext(p){if(this.type==r.braceL){var d=this.curContext();d==u?this.context.push(o.b_expr):d==l?this.context.push(o.b_tmpl):super.updateContext(p),this.exprAllowed=!0}else if(this.type===r.slash&&p===n.jsxTagStart)this.context.length-=2,this.context.push(h),this.exprAllowed=!1;else return super.updateContext(p)}}}});var ai=Ee(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.extract=ws;X.parse=As;X.parseWithComments=ri;X.print=Ps;X.strip=Es;var Ss=/\*\/$/,_s=/^\/\*\*?/,ii=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Cs=/(^|\s+)\/\/([^\r\n]*)/g,Zt=/^(\r?\n)+/,Ts=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,ei=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,ks=/(\r?\n|^) *\* ?/g,si=[];function ws(e){let t=e.match(ii);return t?t[0].trimLeft():""}function Es(e){let t=e.match(ii);return t&&t[0]?e.substring(t[0].length):e}function As(e){return ri(e).pragmas}function ri(e){let t=` +`;e=e.replace(_s,"").replace(Ss,"").replace(ks,"$1");let i="";for(;i!==e;)i=e,e=e.replace(Ts,`${t}$1 $2${t}`);e=e.replace(Zt,"").trimRight();let s=Object.create(null),r=e.replace(ei,"").replace(Zt,"").trimRight(),n;for(;n=ei.exec(e);){let o=n[2].replace(Cs,"");typeof s[n[1]]=="string"||Array.isArray(s[n[1]])?s[n[1]]=si.concat(s[n[1]],o):s[n[1]]=o}return{comments:r,pragmas:s}}function Ps({comments:e="",pragmas:t={}}){let i=` +`,s="/**",r=" *",n=" */",o=Object.keys(t),u=o.flatMap(l=>ti(l,t[l])).map(l=>`${r} ${l}${i}`).join("");if(!e){if(o.length===0)return"";if(o.length===1&&!Array.isArray(t[o[0]])){let l=t[o[0]];return`${s} ${ti(o[0],l)[0]}${n}`}}let h=e.split(i).map(l=>`${r} ${l}`).join(i)+i;return s+i+(e?h:"")+(e&&o.length?r+i:"")+u+n}function ti(e,t){return si.concat(t).map(i=>`@${e} ${i}`.trim())}});var Hs={};Si(Hs,{parsers:()=>zs});var Ci=[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,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],nt=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,38,6,186,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,19,72,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,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,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,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,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ti="\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",ot="\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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",Pe={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ie="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",ki={5:Ie,"5module":Ie+" export import",6:Ie+" const class extends export import super"},wi=/^in(stanceof)?$/,Ei=new RegExp("["+ot+"]"),Ai=new RegExp("["+ot+Ti+"]");function Ve(e,t){for(var i=65536,s=0;se)return!1;if(i+=t[s+1],i>=e)return!0}return!1}function U(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ei.test(String.fromCharCode(e)):t===!1?!1:Ve(e,nt)}function H(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ai.test(String.fromCharCode(e)):t===!1?!1:Ve(e,nt)||Ve(e,Ci)}var S=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function I(e,t){return new S(e,{beforeExpr:!0,binop:t})}var N={beforeExpr:!0},A={startsExpr:!0},Oe={};function b(e,t){return t===void 0&&(t={}),t.keyword=e,Oe[e]=new S(e,t)}var a={num:new S("num",A),regexp:new S("regexp",A),string:new S("string",A),name:new S("name",A),privateId:new S("privateId",A),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",N),semi:new S(";",N),colon:new S(":",N),dot:new S("."),question:new S("?",N),questionDot:new S("?."),arrow:new S("=>",N),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",N),backQuote:new S("`",A),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:I("||",1),logicalAND:I("&&",2),bitwiseOR:I("|",3),bitwiseXOR:I("^",4),bitwiseAND:I("&",5),equality:I("==/!=/===/!==",6),relational:I("/<=/>=",7),bitShift:I("<>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:I("%",10),star:I("*",10),slash:I("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:I("??",1),_break:b("break"),_case:b("case",N),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",N),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",N),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",A),_if:b("if"),_return:b("return",N),_switch:b("switch"),_throw:b("throw",N),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",A),_super:b("super",A),_class:b("class",A),_extends:b("extends",N),_export:b("export"),_import:b("import",A),_null:b("null",A),_true:b("true",A),_false:b("false",A),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},R=/\r\n?|\n|\u2028|\u2029/,Pi=new RegExp(R.source,"g");function Q(e){return e===10||e===13||e===8232||e===8233}function ut(e,t,i){i===void 0&&(i=e.length);for(var s=t;s>10)+55296,(e&1023)+56320))}var Vi=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,te=function(t,i){this.line=t,this.column=i};te.prototype.offset=function(t){return new te(this.line,this.column+t)};var xe=function(t,i,s){this.start=i,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function ct(e,t){for(var i=1,s=0;;){var r=ut(e,s,t);if(r<0)return new te(i,t-s);++i,s=r}}var Le={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},st=!1;function Li(e){var t={};for(var i in Le)t[i]=e&&se(e,i)?e[i]:Le[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!st&&typeof console=="object"&&console.warn&&(st=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),tt(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return tt(t.onComment)&&(t.onComment=Ri(t,t.onComment)),t}function Ri(e,t){return function(i,s,r,n,o,u){var h={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(h.loc=new xe(this,o,u)),e.ranges&&(h.range=[r,n]),t.push(h)}}var ie=1,Y=2,Be=4,lt=8,ft=16,dt=32,De=64,mt=128,re=256,Fe=ie|Y|re;function Me(e,t){return Y|(e?Be:0)|(t?lt:0)}var fe=0,je=1,J=2,xt=3,yt=4,gt=5,T=function(t,i,s){this.options=t=Li(t),this.sourceFile=t.sourceFile,this.keywords=G(ki[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Pe[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=G(r);var n=(r?r+" ":"")+Pe.strict;this.reservedWordsStrict=G(n),this.reservedWordsStrictBind=G(n+" "+Pe.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(` +`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(R).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(ie),this.regexpState=null,this.privateNameStack=[]},F={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};T.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};F.inFunction.get=function(){return(this.currentVarScope().flags&Y)>0};F.inGenerator.get=function(){return(this.currentVarScope().flags<)>0&&!this.currentVarScope().inClassFieldInit};F.inAsync.get=function(){return(this.currentVarScope().flags&Be)>0&&!this.currentVarScope().inClassFieldInit};F.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&re)return!1;if(t.flags&Y)return(t.flags&Be)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};F.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&De)>0||i||this.options.allowSuperOutsideMethod};F.allowDirectSuper.get=function(){return(this.currentThisScope().flags&mt)>0};F.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};F.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(Y|re))>0||i};F.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&re)>0};T.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,V.lastIndex=e,e+=V.exec(this.input)[0].length,this.input[e]===";"&&e++}};k.eat=function(e){return this.type===e?(this.next(),!0):!1};k.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};k.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};k.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};k.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||R.test(this.input.slice(this.lastTokEnd,this.start))};k.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};k.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};k.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};k.expect=function(e){this.eat(e)||this.unexpected()};k.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var ye=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};k.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};k.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};k.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&s<56320)return!0;if(U(s,!0)){for(var r=i+1;H(s=this.input.charCodeAt(r),!0);)++r;if(s===92||s>55295&&s<56320)return!0;var n=this.input.slice(i,r);if(!wi.test(n))return!0}return!1};f.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var e=V.exec(this.input),t=this.pos+e[0].length,i;return!R.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(H(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};f.parseStatement=function(e,t,i){var s=this.type,r=this.startNode(),n;switch(this.isLet(e)&&(s=a._var,n="let"),s){case a._break:case a._continue:return this.parseBreakContinueStatement(r,s.keyword);case a._debugger:return this.parseDebuggerStatement(r);case a._do:return this.parseDoStatement(r);case a._for:return this.parseForStatement(r);case a._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case a._class:return e&&this.unexpected(),this.parseClass(r,!0);case a._if:return this.parseIfStatement(r);case a._return:return this.parseReturnStatement(r);case a._switch:return this.parseSwitchStatement(r);case a._throw:return this.parseThrowStatement(r);case a._try:return this.parseTryStatement(r);case a._const:case a._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(r,n);case a._while:return this.parseWhileStatement(r);case a._with:return this.parseWithStatement(r);case a.braceL:return this.parseBlock(!0,r);case a.semi:return this.parseEmptyStatement(r);case a._export:case a._import:if(this.options.ecmaVersion>10&&s===a._import){V.lastIndex=this.pos;var o=V.exec(this.input),u=this.pos+o[0].length,h=this.input.charCodeAt(u);if(h===40||h===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===a._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var l=this.value,x=this.parseExpression();return s===a.name&&x.type==="Identifier"&&this.eat(a.colon)?this.parseLabeledStatement(r,l,x,e):this.parseExpressionStatement(r,x)}};f.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(a.semi)||this.insertSemicolon()?e.label=null:this.type!==a.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s=6?this.eat(a.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};f.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ue),this.enterScope(0),this.expect(a.parenL),this.type===a.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===a._var||this.type===a._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&s.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===a._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,s)):(t>-1&&this.unexpected(t),this.parseFor(e,s))}var n=this.isContextual("let"),o=!1,u=new ye,h=this.parseExpression(t>-1?"await":!0,u);return this.type===a._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===a._in?t>-1&&this.unexpected(t):e.await=t>-1),n&&o&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,u),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))};f.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,ee|(i?0:Re),!1,t)};f.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(a._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};f.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(a.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};f.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(a.braceL),this.labels.push(Bi),this.enterScope(0);for(var t,i=!1;this.type!==a.braceR;)if(this.type===a._case||this.type===a._default){var s=this.type===a._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(a.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};f.parseThrowStatement=function(e){return this.next(),R.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Di=[];f.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?dt:0),this.checkLValPattern(e,t?yt:J),this.expect(a.parenR),e};f.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===a._catch){var t=this.startNode();this.next(),this.eat(a.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(a._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};f.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};f.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ue),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};f.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};f.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};f.parseLabeledStatement=function(e,t,i,s){for(var r=0,n=this.labels;r=0;h--){var l=this.labels[h];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};f.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};f.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(a.braceL),e&&this.enterScope(0);this.type!==a.braceR;){var s=this.parseStatement(null);t.body.push(s)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};f.parseFor=function(e,t){return e.init=t,this.expect(a.semi),e.test=this.type===a.semi?null:this.parseExpression(),this.expect(a.semi),e.update=this.type===a.parenR?null:this.parseExpression(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};f.parseForIn=function(e,t){var i=this.type===a._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};f.parseVar=function(e,t,i,s){for(e.declarations=[],e.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(a.eq)?r.init=this.parseMaybeAssign(t):!s&&i==="const"&&!(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&r.id.type!=="Identifier"&&!(t&&(this.type===a._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):r.init=null,e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(a.comma))break}return e};f.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?je:J,!1)};var ee=1,Re=2,vt=4;f.parseFunction=function(e,t,i,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===a.star&&t&Re&&this.unexpected(),e.generator=this.eat(a.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&ee&&(e.id=t&vt&&this.type!==a.name?null:this.parseIdent(),e.id&&!(t&Re)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?je:J:xt));var n=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Me(e.async,e.generator)),t&ee||(e.id=this.type===a.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,r),this.yieldPos=n,this.awaitPos=o,this.awaitIdentPos=u,this.finishNode(e,t&ee?"FunctionDeclaration":"FunctionExpression")};f.parseFunctionParams=function(e){this.expect(a.parenL),e.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};f.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),r=this.startNode(),n=!1;for(r.body=[],this.expect(a.braceL);this.type!==a.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(n&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),n=!0):o.key&&o.key.type==="PrivateIdentifier"&&Fi(s,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};f.parseClassElement=function(e){if(this.eat(a.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,n=!1,o="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(a.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===a.star?u=!0:s="static"}if(i.static=u,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon()?n=!0:s="async"),!s&&(t>=9||!n)&&this.eat(a.star)&&(r=!0),!s&&!n&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===a.parenL||o!=="method"||r||n){var l=!i.static&&de(i,"constructor"),x=l&&e;l&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=l?"constructor":o,this.parseClassMethod(i,r,n,x)}else this.parseClassField(i);return i};f.isClassElementNameStart=function(){return this.type===a.name||this.type===a.privateId||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword};f.parseClassElementName=function(e){this.type===a.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};f.parseClassMethod=function(e,t,i,s){var r=e.key;e.kind==="constructor"?(t&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):e.static&&de(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,s);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};f.parseClassField=function(e){if(de(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&de(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(a.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};f.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(re|De);this.type!==a.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};f.parseClassId=function(e,t){this.type===a.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,J,!1)):(t===!0&&this.unexpected(),e.id=null)};f.parseClassSuper=function(e){e.superClass=this.eat(a._extends)?this.parseExprSubscripts(null,!1):null};f.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};f.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=s===0?null:this.privateNameStack[s-1],n=0;n=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};f.parseExport=function(e,t){if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(e,t);if(this.eat(a._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,s=e.specifiers;i=13&&this.type===a.string){var e=this.parseLiteral(this.value);return Vi.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};f.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var O=T.prototype;O.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=e.properties;s=8&&!u&&h.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(C.f_expr),this.parseFunction(this.startNodeAt(n,o),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(n,o),[h],!1,t);if(this.options.ecmaVersion>=8&&h.name==="async"&&this.type===a.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return h=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(a.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,o),[h],!0,t)}return h;case a.regexp:var l=this.value;return s=this.parseLiteral(l.value),s.regex={pattern:l.pattern,flags:l.flags},s;case a.num:case a.string:return this.parseLiteral(this.value);case a._null:case a._true:case a._false:return s=this.startNode(),s.value=this.type===a._null?null:this.type===a._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case a.parenL:var x=this.start,_=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(_)&&(e.parenthesizedAssign=x),e.parenthesizedBind<0&&(e.parenthesizedBind=x)),_;case a.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(a.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case a.braceL:return this.overrideContext(C.b_expr),this.parseObj(!1,e);case a._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case a._class:return this.parseClass(this.startNode(),!1);case a._new:return this.parseNew();case a.backQuote:return this.parseTemplate();case a._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};y.parseExprAtomDefault=function(){this.unexpected()};y.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===a.parenL&&!e)return this.parseDynamicImport(t);if(this.type===a.dot){var i=this.startNodeAt(t.start,t.loc&&t.loc.start);return i.name="import",t.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};y.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(a.parenR)){var t=this.start;this.eat(a.comma)&&this.eat(a.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};y.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};y.parseParenExpression=function(){this.expect(a.parenL);var e=this.parseExpression();return this.expect(a.parenR),e};y.shouldParseArrow=function(e){return!this.canInsertSemicolon()};y.parseParenAndDistinguishExpression=function(e,t){var i=this.start,s=this.startLoc,r,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,u=this.startLoc,h=[],l=!0,x=!1,_=new ye,B=this.yieldPos,p=this.awaitPos,d;for(this.yieldPos=0,this.awaitPos=0;this.type!==a.parenR;)if(l?l=!1:this.expect(a.comma),n&&this.afterTrailingComma(a.parenR,!0)){x=!0;break}else if(this.type===a.ellipsis){d=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else h.push(this.parseMaybeAssign(!1,_,this.parseParenItem));var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(a.parenR),e&&this.shouldParseArrow(h)&&this.eat(a.arrow))return this.checkPatternErrors(_,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=B,this.awaitPos=p,this.parseParenArrowList(i,s,h,t);(!h.length||x)&&this.unexpected(this.lastTokStart),d&&this.unexpected(d),this.checkExpressionErrors(_,!0),this.yieldPos=B||this.yieldPos,this.awaitPos=p||this.awaitPos,h.length>1?(r=this.startNodeAt(o,u),r.expressions=h,this.finishNodeAt(r,"SequenceExpression",m,g)):r=h[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var E=this.startNodeAt(i,s);return E.expression=r,this.finishNode(E,"ParenthesizedExpression")}else return r};y.parseParenItem=function(e){return e};y.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,s)};var Mi=[];y.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===a.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(a.parenL)?e.arguments=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Mi,this.finishNode(e,"NewExpression")};y.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===a.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};y.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};y.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!R.test(this.input.slice(this.lastTokEnd,this.start))};y.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};y.parseProperty=function(e,t){var i=this.startNode(),s,r,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(s=this.eat(a.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,n,o,t,u),this.finishNode(i,"Property")};y.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};y.parsePropertyValue=function(e,t,i,s,r,n,o,u){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,s)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};y.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Me(t,s.generator)|De|(i?mt:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};y.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(Me(i,!1)|ft),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};y.parseFunctionBody=function(e,t,i,s){var r=t&&this.type!==a.braceL,n=this.strict,o=!1;if(r)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||u)&&(o=this.strictDirective(this.end),o&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var h=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!n&&!o&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,gt),e.body=this.parseBlock(!1,void 0,o&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=h}this.exitScope()};y.isSimpleParamList=function(e){for(var t=0,i=e;t-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&r.flags&ie&&delete this.undefinedExports[e]}else if(t===yt){var n=this.currentScope();n.lexical.push(e)}else if(t===xt){var o=this.currentScope();this.treatFunctionsAsVar?s=o.lexical.indexOf(e)>-1:s=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var h=this.scopeStack[u];if(h.lexical.indexOf(e)>-1&&!(h.flags&dt&&h.lexical[0]===e)||!this.treatFunctionsAsVarInScope(h)&&h.functions.indexOf(e)>-1){s=!0;break}if(h.var.push(e),this.inModule&&h.flags&ie&&delete this.undefinedExports[e],h.flags&Fe)break}s&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};W.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};W.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};W.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Fe)return t}};W.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Fe&&!(t.flags&ft))return t}};var ge=function(t,i,s){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new xe(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},ae=T.prototype;ae.startNode=function(){return new ge(this,this.start,this.startLoc)};ae.startNodeAt=function(e,t){return new ge(this,e,t)};function St(e,t,i,s){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=i),e}ae.finishNode=function(e,t){return St.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};ae.finishNodeAt=function(e,t,i,s){return St.call(this,e,t,i,s)};ae.copyNode=function(e){var t=new ge(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var _t="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Ct=_t+" Extended_Pictographic",Tt=Ct,kt=Tt+" EBase EComp EMod EPres ExtPict",wt=kt,Ui=wt,qi={9:_t,10:Ct,11:Tt,12:kt,13:wt,14:Ui},Ji="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Gi={9:"",10:"",11:"",12:"",13:"",14:Ji},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Et="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",At=Et+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Pt=At+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",It=Pt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Nt=It+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ki=Nt+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Wi={9:Et,10:At,11:Pt,12:It,13:Nt,14:Ki},Vt={};function Xi(e){var t=Vt[e]={binary:G(qi[e]+" "+rt),binaryOfStrings:G(Gi[e]),nonBinary:{General_Category:G(rt),Script:G(Wi[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(le=0,Ne=[9,10,11,12,13,14];le=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Vt[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};M.prototype.reset=function(t,i,s){var r=s.indexOf("v")!==-1,n=s.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=s,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};M.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};M.prototype.at=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return-1;var n=s.charCodeAt(t);if(!(i||this.switchU)||n<=55295||n>=57344||t+1>=r)return n;var o=s.charCodeAt(t+1);return o>=56320&&o<=57343?(n<<10)+o-56613888:n};M.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return r;var n=s.charCodeAt(t),o;return!(i||this.switchU)||n<=55295||n>=57344||t+1>=r||(o=s.charCodeAt(t+1))<56320||o>57343?t+1:t+2};M.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};M.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};M.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};M.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};M.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var s=this.pos,r=0,n=t;r-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(s=!0),o==="v"&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(e.start,"Invalid regular expression flag")};c.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};c.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};c.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};c.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};c.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return r!==-1&&r=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};c.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};c.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};c.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Lt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Lt(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}c.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!Lt(i);)e.advance();return e.pos!==t};c.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};c.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};c.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};c.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=K(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=K(e.lastIntValue);return!0}return!1};c.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),zi(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function zi(e){return U(e,!0)||e===36||e===95}c.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),Hi(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function Hi(e){return H(e,!0)||e===36||e===95||e===8204||e===8205}c.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};c.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};c.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};c.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};c.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};c.regexp_eatZero=function(e){return e.current()===48&&!ve(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};c.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};c.regexp_eatControlLetter=function(e){var t=e.current();return Rt(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Rt(e){return e>=65&&e<=90||e>=97&&e<=122}c.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(s&&r>=55296&&r<=56319){var n=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(r-55296)*1024+(o-56320)+65536,!0}e.pos=n,e.lastIntValue=r}return!0}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Qi(e.lastIntValue))return!0;s&&e.raise("Invalid unicode escape"),e.pos=i}return!1};function Qi(e){return e>=0&&e<=1114111}c.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};c.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var Ot=0,q=1,L=2;c.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Yi(t))return e.lastIntValue=-1,e.advance(),q;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var s;if(e.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&s===L&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return Ot};function Yi(e){return e===100||e===68||e===115||e===83||e===119||e===87}c.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,s),q}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r)}return Ot};c.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){se(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};c.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return q;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return L;e.raise("Invalid property name")};c.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Bt(t=e.current());)e.lastStringValue+=K(t),e.advance();return e.lastStringValue!==""};function Bt(e){return Rt(e)||e===95}c.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";$i(t=e.current());)e.lastStringValue+=K(t),e.advance();return e.lastStringValue!==""};function $i(e){return Bt(e)||ve(e)}c.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};c.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===L&&e.raise("Negated character class may contain strings"),!0}return!1};c.regexp_classContents=function(e){return e.current()===93?q:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),q)};c.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};c.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||Mt(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return s!==93?(e.lastIntValue=s,e.advance(),!0):!1};c.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};c.regexp_classSetExpression=function(e){var t=q,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===L&&(t=L);for(var s=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==L&&(t=q);continue}e.raise("Invalid character in character class")}if(s!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(s!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===L&&(t=L)}};c.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;return i!==-1&&s!==-1&&i>s&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};c.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?q:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};c.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),s=this.regexp_classContents(e);if(e.eat(93))return i&&s===L&&e.raise("Negated character class may contain strings"),s;e.pos=t}if(e.eat(92)){var r=this.regexp_eatCharacterClassEscape(e);if(r)return r;e.pos=t}return null};c.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};c.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===L&&(t=L);return t};c.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?q:L};c.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&Zi(i)||es(i)?!1:(e.advance(),e.lastIntValue=i,!0)};function Zi(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function es(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}c.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return ts(t)?(e.lastIntValue=t,e.advance(),!0):!1};function ts(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}c.regexp_eatClassControlLetter=function(e){var t=e.current();return ve(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};c.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};c.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;ve(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function ve(e){return e>=48&&e<=57}c.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Dt(i=e.current());)e.lastIntValue=16*e.lastIntValue+Ft(i),e.advance();return e.pos!==t};function Dt(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ft(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}c.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};c.regexp_eatOctalDigit=function(e){var t=e.current();return Mt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Mt(e){return e>=48&&e<=55}c.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var s=0;s=this.input.length)return this.finishToken(a.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};v.readToken=function(e){return U(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};v.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};v.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=t;(s=ut(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};v.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&ht.test(String.fromCharCode(e)))++this.pos;else break e}}};v.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};v.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(a.ellipsis)):(++this.pos,this.finishToken(a.dot))};v.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(a.assign,2):this.finishOp(a.slash,1)};v.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,s=e===42?a.star:a.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,s=a.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(a.assign,i+1):this.finishOp(s,i)};v.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(a.assign,3)}return this.finishOp(e===124?a.logicalOR:a.logicalAND,2)}return t===61?this.finishOp(a.assign,2):this.finishOp(e===124?a.bitwiseOR:a.bitwiseAND,1)};v.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(a.assign,2):this.finishOp(a.bitwiseXOR,1)};v.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||R.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(a.incDec,2):t===61?this.finishOp(a.assign,2):this.finishOp(a.plusMin,1)};v.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(a.assign,i+1):this.finishOp(a.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(a.relational,i))};v.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(a.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(a.arrow)):this.finishOp(e===61?a.eq:a.prefix,1)};v.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(a.questionDot,2)}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(a.assign,3)}return this.finishOp(a.coalesce,2)}}return this.finishOp(a.question,1)};v.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),U(t,!0)||t===92))return this.finishToken(a.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+K(t)+"'")};v.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(a.parenL);case 41:return++this.pos,this.finishToken(a.parenR);case 59:return++this.pos,this.finishToken(a.semi);case 44:return++this.pos,this.finishToken(a.comma);case 91:return++this.pos,this.finishToken(a.bracketL);case 93:return++this.pos,this.finishToken(a.bracketR);case 123:return++this.pos,this.finishToken(a.braceL);case 125:return++this.pos,this.finishToken(a.braceR);case 58:return++this.pos,this.finishToken(a.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(a.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(a.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+K(e)+"'")};v.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};v.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(R.test(s)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(s==="[")t=!0;else if(s==="]"&&t)t=!1;else if(s==="/"&&!t)break;e=s==="\\"}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var n=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(n);var u=this.regexpState||(this.regexpState=new M(this));u.reset(i,r,o),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var h=null;try{h=new RegExp(r,o)}catch{}return this.finishToken(a.regexp,{pattern:r,flags:o,value:h})};v.readInt=function(e,t,i){for(var s=this.options.ecmaVersion>=12&&t===void 0,r=i&&this.input.charCodeAt(this.pos)===48,n=this.pos,o=0,u=0,h=0,l=t??1/0;h=97?_=x-97+10:x>=65?_=x-65+10:x>=48&&x<=57?_=x-48:_=1/0,_>=e)break;u=x,o=o*e+_}return s&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||t!=null&&this.pos-n!==t?null:o};function is(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function jt(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}v.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=jt(this.input.slice(t,this.pos)),++this.pos):U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,i)};v.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&s===110){var r=jt(this.input.slice(t,this.pos));return++this.pos,U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,r)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),s===46&&!i&&(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),(s===69||s===101)&&!i&&(s=this.input.charCodeAt(++this.pos),(s===43||s===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=is(this.input.slice(t,this.pos),i);return this.finishToken(a.num,n)};v.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};v.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;s===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):s===8232||s===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Q(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(a.string,t)};var Ut={};v.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ut)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};v.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ut;this.raise(e,t)};v.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===a.template||this.type===a.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(a.dollarBraceL)):(++this.pos,this.finishToken(a.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(a.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Q(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` `;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};v.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Q(t)?"":String.fromCharCode(t)}};v.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos0}var _e=_s;function P(e){var s;let t=e.range?e.range[0]:e.start,i=((s=e.declaration)==null?void 0:s.decorators)??e.decorators;return _e(i)?Math.min(P(i[0]),t):t}function j(e){return e.range?e.range[1]:e.end}function Cs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:ti,locStart:P,locEnd:j,...e}}var Ce=Cs;var Ts=(e,t,i)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},We=Ts;function ks(e){return e=new Set(e),t=>e.has(t==null?void 0:t.type)}var ii=ks;var ws=ii(["Block","CommentBlock","MultiLine"]),oe=ws;function Es(e){return oe(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var si=Es;function As(e){let t=`*${e.value}*`.split(` -`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Xe=As;var ue=null;function he(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=he.prototype=null,t}return ue=he.prototype=e??Object.create(null),new he}var Ps=10;for(let e=0;e<=Ps;e++)he();function ze(e){return he(e)}function Is(e,t="type"){ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ri=Is;var ai={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Ns=ri(ai),ni=Ns;function He(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let s=0;s{var u;(u=o.leadingComments)!=null&&u.some(si)&&n.add(P(o))}),e=Te(e,o=>{if(o.type==="ParenthesizedExpression"){let{expression:u}=o;if(u.type==="TypeCastExpression")return u.range=o.range,u;let h=P(o);if(!n.has(h))return u.extra={...u.extra,parenthesized:!0},u}})}if(e=Te(e,n=>{switch(n.type){case"LogicalExpression":if(oi(n))return Qe(n);break;case"VariableDeclaration":{let o=We(!1,n.declarations,-1);o!=null&&o.init&&r(n,o);break}case"TSParenthesizedType":return n.typeAnnotation;case"TSTypeParameter":if(typeof n.name=="string"){let o=P(n);n.name={type:"Identifier",name:n.name,range:[o,o+n.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:o}=n;if(i==="meriyah"&&(o==null?void 0:o.type)==="Identifier"){let u=s.slice(P(o),j(o));(u.startsWith('"')||u.startsWith("'"))&&(n.exported={...n.exported,type:"Literal",value:n.exported.name,raw:u})}break}case"TSUnionType":case"TSIntersectionType":if(n.types.length===1)return n.types[0];break}}),_e(e.comments)){let n=We(!1,e.comments,-1);for(let o=e.comments.length-2;o>=0;o--){let u=e.comments[o];j(u)===P(n)&&oe(u)&&oe(n)&&Xe(u)&&Xe(n)&&(e.comments.splice(o+1,1),u.value+="*//*"+n.value,u.range=[P(u),j(n)]),n=u}}return e.type==="Program"&&(e.range=[0,s.length]),e;function r(n,o){s[j(o)]!==";"&&(n.range=[P(n),j(o)])}}function oi(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function Qe(e){return oi(e)?Qe({type:"LogicalExpression",operator:e.operator,left:Qe({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[P(e.left),j(e.right.left)]}),right:e.right.right,range:[P(e),j(e)]}):e}var ke=Vs;function Ls(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var we=Ls;var Rs={ecmaVersion:"latest",allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Os(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return be(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:s,column:r+1}},cause:e})}var ui,Bs=()=>(ui??(ui=T.extend((0,hi.default)())),ui);function Ds(e,t){let i=Bs(),s=[],r=[],n=i.parse(e,{...Rs,sourceType:t,allowImportExportEverywhere:t==="module",onComment:s,onToken:r});return n.comments=s,n.tokens=r,n}function Fs(e,t={}){let i=we(t),s=(i?[i]:["module","script"]).map(n=>()=>Ds(e,n)),r;try{r=Se(s)}catch({errors:[n]}){throw Os(n)}return ke(r,{text:e})}var pi=Ce(Fs);var fi=Pe(Ke(),1);var w={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function Ms(e,t){let i=e[0],s=e[e.length-1],r={type:w.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function Ye(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}Ye.prototype={constructor:Ye,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=w.Identifier,e.value==="static"&&(e.type=w.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=w.Keyword);else if(i===s.privateId)e.type=w.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=w.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=w.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=w.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=w.Boolean:i.keyword==="null"?e.type=w.Null:e.type=w.Keyword;else if(i===s.num)e.type=w.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=w.JSXText):e.type=w.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=w.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(Ms(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var ci=Ye;var $e=[3,5,6,7,8,9,10,11,12,13,14,15];function js(){return $e[$e.length-1]}function Us(e=5){let t=e==="latest"?js():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!$e.includes(t))throw new Error("Invalid ecmaVersion.");return t}function qs(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function li(e){let t=Us(e.ecmaVersion),i=qs(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},u=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:s,locations:r,allowReserved:n,allowReturnOutsideFunction:u})}var z=Symbol("espree's internal state"),Ze=Symbol("espree's esprimaFinishNode");function Js(e,t,i,s,r,n,o){let u;e?u="Block":o.slice(i,i+2)==="#!"?u="Hashbang":u="Line";let h={type:u,value:t};return typeof i=="number"&&(h.start=i,h.end=s,h.range=[i,s]),typeof r=="object"&&(h.loc={start:r,end:n}),h}var et=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(s,r){(typeof s!="object"||s===null)&&(s={}),typeof r!="string"&&!(r instanceof String)&&(r=String(r));let n=s.sourceType,o=li(s),u=o.ecmaFeatures||{},h=o.tokens===!0?new ci(t,r):null,l={originalSourceType:n||o.sourceType,tokens:h?[]:null,comments:o.comment===!0?[]:null,impliedStrict:u.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(x){h&&h.onToken(x,l),x.type!==t.eof&&(l.lastToken=x)},onComment(x,_,B,p,d,m){if(l.comments){let g=Js(x,_,B,p,d,m,r);l.comments.push(g)}}},r),this[z]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let s=this[z],r=s.tokens;return s.comments&&(r.comments=s.comments),r}finishNode(...s){let r=super.finishNode(...s);return this[Ze](r)}finishNodeAt(...s){let r=super.finishNodeAt(...s);return this[Ze](r)}parse(){let s=this[z],r=super.parse();if(r.sourceType=s.originalSourceType,s.comments&&(r.comments=s.comments),s.tokens&&(r.tokens=s.tokens),r.body.length){let[n]=r.body;r.range&&(r.range[0]=n.range[0]),r.loc&&(r.loc.start=n.loc.start),r.start=n.start}return s.lastToken&&(r.range&&(r.range[1]=s.lastToken.range[1]),r.loc&&(r.loc.end=s.lastToken.loc.end),r.end=s.lastToken.end),this[z].templateElements.forEach(n=>{let u=n.tail?1:2;n.start+=-1,n.end+=u,n.range&&(n.range[0]+=-1,n.range[1]+=u),n.loc&&(n.loc.start.column+=-1,n.loc.end.column+=u)}),r}parseTopLevel(s){return this[z].impliedStrict&&(this.strict=!0),super.parseTopLevel(s)}raise(s,r){let n=e.acorn.getLineInfo(this.input,s),o=new SyntaxError(r);throw o.index=s,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(s,r){this.raise(s,r)}unexpected(s){let r="Unexpected token";if(s!=null){if(this.pos=s,this.options.locations)for(;this.posthis.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[z].jsxAttrValueToken=!0),r}[Ze](s){return s.type==="TemplateElement"&&this[z].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var Gs={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=T.extend(et())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=T.extend((0,fi.default)(),et())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function di(e,t){let i=Gs.get(t);return new i(t,e).parse()}var Ks={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function Ws(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:be(t,{loc:{start:{line:i,column:s}},cause:e})}function Xs(e,t={}){let i=we(t),s=(i?[i]:["module","script"]).map(n=>()=>di(e,{...Ks,sourceType:n})),r;try{r=Se(s)}catch({errors:[n]}){throw Ws(n)}return ke(r,{text:e})}var mi=Ce(Xs);var zs={acorn:pi,espree:mi};return _i(Hs);}); \ No newline at end of file +`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return K(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Q(t)?"":String.fromCharCode(t)}};v.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},Ke=cs;function ls(e){return Array.isArray(e)&&e.length>0}var Wt=ls;function P(e){var s,r,n;let t=((s=e.range)==null?void 0:s[0])??e.start,i=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return i?Math.min(P(i),t):t}function j(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function fs(e){let t=new Set(e);return i=>t.has(i==null?void 0:i.type)}var Xt=fs;var ds=Xt(["Block","CommentBlock","MultiLine"]),oe=ds;function ms(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var We=ms;function xs(e){return oe(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var zt=xs;var ue=null;function he(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=he.prototype=null,t}return ue=he.prototype=e??Object.create(null),new he}var ys=10;for(let e=0;e<=ys;e++)he();function Xe(e){return he(e)}function gs(e,t="type"){Xe(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var Ht=gs;var Qt={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var vs=Ht(Qt),Yt=vs;function ze(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let s=0;s{var o;(o=n.leadingComments)!=null&&o.some(zt)&&r.add(P(n))}),e=_e(e,n=>{if(n.type==="ParenthesizedExpression"){let{expression:o}=n;if(o.type==="TypeCastExpression")return o.range=[...n.range],o;let u=P(n);if(!r.has(u))return o.extra={...o.extra,parenthesized:!0},o}})}if(e=_e(e,r=>{var n;switch(r.type){case"LogicalExpression":if($t(r))return He(r);break;case"VariableDeclaration":{let o=Ke(!1,r.declarations,-1);o!=null&&o.init&&s[j(o)]!==";"&&(r.range=[P(r),j(o)]);break}case"TSParenthesizedType":return r.typeAnnotation;case"TSTypeParameter":if(typeof r.name=="string"){let o=P(r);r.name={type:"Identifier",name:r.name,range:[o,o+r.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(i==="meriyah"&&((n=r.exported)==null?void 0:n.type)==="Identifier"){let{exported:o}=r,u=s.slice(P(o),j(o));(u.startsWith('"')||u.startsWith("'"))&&(r.exported={...r.exported,type:"Literal",value:r.exported.name,raw:u})}break;case"TSUnionType":case"TSIntersectionType":if(r.types.length===1)return r.types[0];break}}),Wt(e.comments)){let r=Ke(!1,e.comments,-1);for(let n=e.comments.length-2;n>=0;n--){let o=e.comments[n];j(o)===P(r)&&oe(o)&&oe(r)&&We(o)&&We(r)&&(e.comments.splice(n+1,1),o.value+="*//*"+r.value,o.range=[P(o),j(r)]),r=o}}return e.type==="Program"&&(e.range=[0,s.length]),e}function $t(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function He(e){return $t(e)?He({type:"LogicalExpression",operator:e.operator,left:He({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[P(e.left),j(e.right.left)]}),right:e.right.right,range:[P(e),j(e)]}):e}var Ce=bs;var Z=Ae(ai(),1);function Is(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var ni=Is;function Ns(e){let t=ni(e);t&&(e=e.slice(t.length+1));let i=(0,Z.extract)(e),{pragmas:s,comments:r}=(0,Z.parseWithComments)(i);return{shebang:t,text:e,pragmas:s,comments:r}}function oi(e){let{pragmas:t}=Ns(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function Vs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:oi,locStart:P,locEnd:j,...e}}var Te=Vs;function Ls(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var ke=Ls;var Rs={ecmaVersion:"latest",allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Os(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return be(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:s,column:r+1}},cause:e})}var ui,Bs=()=>(ui??(ui=T.extend((0,hi.default)())),ui);function Ds(e,t){let i=Bs(),s=[],r=[],n=i.parse(e,{...Rs,sourceType:t,allowImportExportEverywhere:t==="module",onComment:s,onToken:r});return n.comments=s,n.tokens=r,n}function Fs(e,t={}){let i=ke(t),s=(i?[i]:["module","script"]).map(n=>()=>Ds(e,n)),r;try{r=Se(s)}catch({errors:[n]}){throw Os(n)}return Ce(r,{text:e})}var pi=Te(Fs);var fi=Ae(Ge(),1);var w={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function Ms(e,t){let i=e[0],s=e[e.length-1],r={type:w.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function Qe(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}Qe.prototype={constructor:Qe,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=w.Identifier,e.value==="static"&&(e.type=w.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=w.Keyword);else if(i===s.privateId)e.type=w.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=w.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=w.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=w.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=w.Boolean:i.keyword==="null"?e.type=w.Null:e.type=w.Keyword;else if(i===s.num)e.type=w.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=w.JSXText):e.type=w.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=w.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(Ms(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var ci=Qe;var Ye=[3,5,6,7,8,9,10,11,12,13,14,15];function js(){return Ye[Ye.length-1]}function Us(e=5){let t=e==="latest"?js():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Ye.includes(t))throw new Error("Invalid ecmaVersion.");return t}function qs(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function li(e){let t=Us(e.ecmaVersion),i=qs(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},u=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:s,locations:r,allowReserved:n,allowReturnOutsideFunction:u})}var z=Symbol("espree's internal state"),$e=Symbol("espree's esprimaFinishNode");function Js(e,t,i,s,r,n,o){let u;e?u="Block":o.slice(i,i+2)==="#!"?u="Hashbang":u="Line";let h={type:u,value:t};return typeof i=="number"&&(h.start=i,h.end=s,h.range=[i,s]),typeof r=="object"&&(h.loc={start:r,end:n}),h}var Ze=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(s,r){(typeof s!="object"||s===null)&&(s={}),typeof r!="string"&&!(r instanceof String)&&(r=String(r));let n=s.sourceType,o=li(s),u=o.ecmaFeatures||{},h=o.tokens===!0?new ci(t,r):null,l={originalSourceType:n||o.sourceType,tokens:h?[]:null,comments:o.comment===!0?[]:null,impliedStrict:u.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(x){h&&h.onToken(x,l),x.type!==t.eof&&(l.lastToken=x)},onComment(x,_,B,p,d,m){if(l.comments){let g=Js(x,_,B,p,d,m,r);l.comments.push(g)}}},r),this[z]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let s=this[z],r=s.tokens;return s.comments&&(r.comments=s.comments),r}finishNode(...s){let r=super.finishNode(...s);return this[$e](r)}finishNodeAt(...s){let r=super.finishNodeAt(...s);return this[$e](r)}parse(){let s=this[z],r=super.parse();if(r.sourceType=s.originalSourceType,s.comments&&(r.comments=s.comments),s.tokens&&(r.tokens=s.tokens),r.body.length){let[n]=r.body;r.range&&(r.range[0]=n.range[0]),r.loc&&(r.loc.start=n.loc.start),r.start=n.start}return s.lastToken&&(r.range&&(r.range[1]=s.lastToken.range[1]),r.loc&&(r.loc.end=s.lastToken.loc.end),r.end=s.lastToken.end),this[z].templateElements.forEach(n=>{let u=n.tail?1:2;n.start+=-1,n.end+=u,n.range&&(n.range[0]+=-1,n.range[1]+=u),n.loc&&(n.loc.start.column+=-1,n.loc.end.column+=u)}),r}parseTopLevel(s){return this[z].impliedStrict&&(this.strict=!0),super.parseTopLevel(s)}raise(s,r){let n=e.acorn.getLineInfo(this.input,s),o=new SyntaxError(r);throw o.index=s,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(s,r){this.raise(s,r)}unexpected(s){let r="Unexpected token";if(s!=null){if(this.pos=s,this.options.locations)for(;this.posthis.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[z].jsxAttrValueToken=!0),r}[$e](s){return s.type==="TemplateElement"&&this[z].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var Gs={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=T.extend(Ze())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=T.extend((0,fi.default)(),Ze())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function di(e,t){let i=Gs.get(t);return new i(t,e).parse()}var Ks={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function Ws(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:be(t,{loc:{start:{line:i,column:s}},cause:e})}function Xs(e,t={}){let i=ke(t),s=(i?[i]:["module","script"]).map(n=>()=>di(e,{...Ks,sourceType:n})),r;try{r=Se(s)}catch({errors:[n]}){throw Ws(n)}return Ce(r,{text:e})}var mi=Te(Xs);var zs={acorn:pi,espree:mi};return _i(Hs);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/acorn.mjs b/node_modules/prettier/plugins/acorn.mjs index 296c74d..2fec4d1 100644 --- a/node_modules/prettier/plugins/acorn.mjs +++ b/node_modules/prettier/plugins/acorn.mjs @@ -1,13 +1,13 @@ -var xi=Object.create;var Ee=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var gi=Object.getOwnPropertyNames;var vi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty;var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Si=(e,t)=>{for(var i in t)Ee(e,i,{get:t[i],enumerable:!0})},_i=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of gi(t))!bi.call(e,r)&&r!==i&&Ee(e,r,{get:()=>t[r],enumerable:!(s=yi(t,r))||s.enumerable});return e};var Pe=(e,t,i)=>(i=e!=null?xi(vi(e)):{},_i(t||!e||!e.__esModule?Ee(i,"default",{value:e,enumerable:!0}):i,e));var Gt=Ae((Qs,Jt)=>{Jt.exports={}});var Ke=Ae((Ys,Ge)=>{"use strict";var as=Gt(),ns=/^[\da-fA-F]+$/,os=/^\d+$/,Kt=new WeakMap;function Wt(e){e=e.Parser.acorn||e;let t=Kt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,n=new s("...",!0,!0),h={tc_oTag:n,tc_cTag:o,tc_expr:u},l={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(u),this.context.push(n),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(x){let _=this.context.pop();_===n&&x===i.slash||_===o?(this.context.pop(),this.exprAllowed=this.curContext()===u):this.exprAllowed=!0},t={tokContexts:h,tokTypes:l},Kt.set(e,t)}return t}function ne(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return ne(e.object)+"."+ne(e.property)}Ge.exports=function(e){return e=e||{},function(t){return us({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(Ge.exports,"tokTypes",{get:function(){return Wt(void 0).tokTypes},configurable:!0,enumerable:!0});function us(e,t){let i=t.acorn||void 0,s=Wt(i),r=i.tokTypes,n=s.tokTypes,o=i.tokContexts,u=s.tokContexts.tc_oTag,h=s.tokContexts.tc_cTag,l=s.tokContexts.tc_expr,x=i.isNewLine,_=i.isIdentifierStart,B=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let p="",d=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let m=this.input.charCodeAt(this.pos);switch(m){case 60:case 123:return this.pos===this.start?m===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(m):(p+=this.input.slice(d,this.pos),this.finishToken(n.jsxText,p));case 38:p+=this.input.slice(d,this.pos),p+=this.jsx_readEntity(),d=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(m===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:x(m)?(p+=this.input.slice(d,this.pos),p+=this.jsx_readNewLine(!0),d=this.pos):++this.pos}}}jsx_readNewLine(p){let d=this.input.charCodeAt(this.pos),m;return++this.pos,d===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,m=p?` +var xi=Object.create;var we=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var gi=Object.getOwnPropertyNames;var vi=Object.getPrototypeOf,bi=Object.prototype.hasOwnProperty;var Ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Si=(e,t)=>{for(var i in t)we(e,i,{get:t[i],enumerable:!0})},_i=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of gi(t))!bi.call(e,r)&&r!==i&&we(e,r,{get:()=>t[r],enumerable:!(s=yi(t,r))||s.enumerable});return e};var Ae=(e,t,i)=>(i=e!=null?xi(vi(e)):{},_i(t||!e||!e.__esModule?we(i,"default",{value:e,enumerable:!0}):i,e));var Jt=Ee((Qs,qt)=>{qt.exports={}});var Ge=Ee((Ys,Je)=>{"use strict";var as=Jt(),ns=/^[\da-fA-F]+$/,os=/^\d+$/,Gt=new WeakMap;function Kt(e){e=e.Parser.acorn||e;let t=Gt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,n=new s("...",!0,!0),h={tc_oTag:n,tc_cTag:o,tc_expr:u},l={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(u),this.context.push(n),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(x){let _=this.context.pop();_===n&&x===i.slash||_===o?(this.context.pop(),this.exprAllowed=this.curContext()===u):this.exprAllowed=!0},t={tokContexts:h,tokTypes:l},Gt.set(e,t)}return t}function ne(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return ne(e.object)+"."+ne(e.property)}Je.exports=function(e){return e=e||{},function(t){return us({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(Je.exports,"tokTypes",{get:function(){return Kt(void 0).tokTypes},configurable:!0,enumerable:!0});function us(e,t){let i=t.acorn||void 0,s=Kt(i),r=i.tokTypes,n=s.tokTypes,o=i.tokContexts,u=s.tokContexts.tc_oTag,h=s.tokContexts.tc_cTag,l=s.tokContexts.tc_expr,x=i.isNewLine,_=i.isIdentifierStart,B=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let p="",d=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let m=this.input.charCodeAt(this.pos);switch(m){case 60:case 123:return this.pos===this.start?m===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(m):(p+=this.input.slice(d,this.pos),this.finishToken(n.jsxText,p));case 38:p+=this.input.slice(d,this.pos),p+=this.jsx_readEntity(),d=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(m===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:x(m)?(p+=this.input.slice(d,this.pos),p+=this.jsx_readNewLine(!0),d=this.pos):++this.pos}}}jsx_readNewLine(p){let d=this.input.charCodeAt(this.pos),m;return++this.pos,d===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,m=p?` `:`\r -`):m=String.fromCharCode(d),this.options.locations&&(++this.curLine,this.lineStart=this.pos),m}jsx_readString(p){let d="",m=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let g=this.input.charCodeAt(this.pos);if(g===p)break;g===38?(d+=this.input.slice(m,this.pos),d+=this.jsx_readEntity(),m=this.pos):x(g)?(d+=this.input.slice(m,this.pos),d+=this.jsx_readNewLine(!1),m=this.pos):++this.pos}return d+=this.input.slice(m,this.pos++),this.finishToken(r.string,d)}jsx_readEntity(){let p="",d=0,m,g=this.input[this.pos];g!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let E=++this.pos;for(;this.pos")}let we=E.name?"Element":"Fragment";return m["opening"+we]=E,m["closing"+we]=pe,m.children=g,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(m,"JSX"+we)}jsx_parseText(){let p=this.parseLiteral(this.value);return p.type="JSXText",p}jsx_parseElement(){let p=this.start,d=this.startLoc;return this.next(),this.jsx_parseElementAt(p,d)}parseExprAtom(p){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(p)}readToken(p){let d=this.curContext();if(d===l)return this.jsx_readToken();if(d===u||d===h){if(_(p))return this.jsx_readWord();if(p==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((p===34||p===39)&&d==u)return this.jsx_readString(p)}return p===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(n.jsxTagStart)):super.readToken(p)}updateContext(p){if(this.type==r.braceL){var d=this.curContext();d==u?this.context.push(o.b_expr):d==l?this.context.push(o.b_tmpl):super.updateContext(p),this.exprAllowed=!0}else if(this.type===r.slash&&p===n.jsxTagStart)this.context.length-=2,this.context.push(h),this.exprAllowed=!1;else return super.updateContext(p)}}}});var Zt=Ae(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.extract=xs;X.parse=gs;X.parseWithComments=$t;X.print=vs;X.strip=ys;var cs=/\*\/$/,ls=/^\/\*\*?/,Qt=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,fs=/(^|\s+)\/\/([^\r\n]*)/g,Xt=/^(\r?\n)+/,ds=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,zt=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,ms=/(\r?\n|^) *\* ?/g,Yt=[];function xs(e){let t=e.match(Qt);return t?t[0].trimLeft():""}function ys(e){let t=e.match(Qt);return t&&t[0]?e.substring(t[0].length):e}function gs(e){return $t(e).pragmas}function $t(e){let t=` -`;e=e.replace(ls,"").replace(cs,"").replace(ms,"$1");let i="";for(;i!==e;)i=e,e=e.replace(ds,`${t}$1 $2${t}`);e=e.replace(Xt,"").trimRight();let s=Object.create(null),r=e.replace(zt,"").replace(Xt,"").trimRight(),n;for(;n=zt.exec(e);){let o=n[2].replace(fs,"");typeof s[n[1]]=="string"||Array.isArray(s[n[1]])?s[n[1]]=Yt.concat(s[n[1]],o):s[n[1]]=o}return{comments:r,pragmas:s}}function vs({comments:e="",pragmas:t={}}){let i=` -`,s="/**",r=" *",n=" */",o=Object.keys(t),u=o.flatMap(l=>Ht(l,t[l])).map(l=>`${r} ${l}${i}`).join("");if(!e){if(o.length===0)return"";if(o.length===1&&!Array.isArray(t[o[0]])){let l=t[o[0]];return`${s} ${Ht(o[0],l)[0]}${n}`}}let h=e.split(i).map(l=>`${r} ${l}`).join(i)+i;return s+i+(e?h:"")+(e&&o.length?r+i:"")+u+n}function Ht(e,t){return Yt.concat(t).map(i=>`@${e} ${i}`.trim())}});var tt={};Si(tt,{parsers:()=>zs});var Ci=[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,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],ot=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,38,6,186,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,19,72,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,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,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,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,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ti="\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",ut="\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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",Ie={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ne="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",ki={5:Ne,"5module":Ne+" export import",6:Ne+" const class extends export import super"},wi=/^in(stanceof)?$/,Ei=new RegExp("["+ut+"]"),Ai=new RegExp("["+ut+Ti+"]");function Le(e,t){for(var i=65536,s=0;se)return!1;if(i+=t[s+1],i>=e)return!0}return!1}function U(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ei.test(String.fromCharCode(e)):t===!1?!1:Le(e,ot)}function H(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ai.test(String.fromCharCode(e)):t===!1?!1:Le(e,ot)||Le(e,Ci)}var S=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function I(e,t){return new S(e,{beforeExpr:!0,binop:t})}var N={beforeExpr:!0},A={startsExpr:!0},Be={};function b(e,t){return t===void 0&&(t={}),t.keyword=e,Be[e]=new S(e,t)}var a={num:new S("num",A),regexp:new S("regexp",A),string:new S("string",A),name:new S("name",A),privateId:new S("privateId",A),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",N),semi:new S(";",N),colon:new S(":",N),dot:new S("."),question:new S("?",N),questionDot:new S("?."),arrow:new S("=>",N),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",N),backQuote:new S("`",A),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:I("||",1),logicalAND:I("&&",2),bitwiseOR:I("|",3),bitwiseXOR:I("^",4),bitwiseAND:I("&",5),equality:I("==/!=/===/!==",6),relational:I("/<=/>=",7),bitShift:I("<>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:I("%",10),star:I("*",10),slash:I("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:I("??",1),_break:b("break"),_case:b("case",N),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",N),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",N),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",A),_if:b("if"),_return:b("return",N),_switch:b("switch"),_throw:b("throw",N),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",A),_super:b("super",A),_class:b("class",A),_extends:b("extends",N),_export:b("export"),_import:b("import",A),_null:b("null",A),_true:b("true",A),_false:b("false",A),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},R=/\r\n?|\n|\u2028|\u2029/,Pi=new RegExp(R.source,"g");function Q(e){return e===10||e===13||e===8232||e===8233}function ht(e,t,i){i===void 0&&(i=e.length);for(var s=t;s>10)+55296,(e&1023)+56320))}var Vi=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,te=function(t,i){this.line=t,this.column=i};te.prototype.offset=function(t){return new te(this.line,this.column+t)};var me=function(t,i,s){this.start=i,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function lt(e,t){for(var i=1,s=0;;){var r=ht(e,s,t);if(r<0)return new te(i,t-s);++i,s=r}}var Re={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},rt=!1;function Li(e){var t={};for(var i in Re)t[i]=e&&se(e,i)?e[i]:Re[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!rt&&typeof console=="object"&&console.warn&&(rt=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. -Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),it(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return it(t.onComment)&&(t.onComment=Ri(t,t.onComment)),t}function Ri(e,t){return function(i,s,r,n,o,u){var h={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(h.loc=new me(this,o,u)),e.ranges&&(h.range=[r,n]),t.push(h)}}var ie=1,Y=2,De=4,ft=8,dt=16,mt=32,Fe=64,xt=128,re=256,Me=ie|Y|re;function je(e,t){return Y|(e?De:0)|(t?ft:0)}var le=0,Ue=1,J=2,yt=3,gt=4,vt=5,T=function(t,i,s){this.options=t=Li(t),this.sourceFile=t.sourceFile,this.keywords=G(ki[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Ie[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=G(r);var n=(r?r+" ":"")+Ie.strict;this.reservedWordsStrict=G(n),this.reservedWordsStrictBind=G(n+" "+Ie.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(` -`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(R).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(ie),this.regexpState=null,this.privateNameStack=[]},F={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};T.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};F.inFunction.get=function(){return(this.currentVarScope().flags&Y)>0};F.inGenerator.get=function(){return(this.currentVarScope().flags&ft)>0&&!this.currentVarScope().inClassFieldInit};F.inAsync.get=function(){return(this.currentVarScope().flags&De)>0&&!this.currentVarScope().inClassFieldInit};F.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&re)return!1;if(t.flags&Y)return(t.flags&De)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};F.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&Fe)>0||i||this.options.allowSuperOutsideMethod};F.allowDirectSuper.get=function(){return(this.currentThisScope().flags&xt)>0};F.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};F.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(Y|re))>0||i};F.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&re)>0};T.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,V.lastIndex=e,e+=V.exec(this.input)[0].length,this.input[e]===";"&&e++}};k.eat=function(e){return this.type===e?(this.next(),!0):!1};k.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};k.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};k.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};k.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||R.test(this.input.slice(this.lastTokEnd,this.start))};k.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};k.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};k.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};k.expect=function(e){this.eat(e)||this.unexpected()};k.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var xe=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};k.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};k.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};k.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&s<56320)return!0;if(U(s,!0)){for(var r=i+1;H(s=this.input.charCodeAt(r),!0);)++r;if(s===92||s>55295&&s<56320)return!0;var n=this.input.slice(i,r);if(!wi.test(n))return!0}return!1};f.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var e=V.exec(this.input),t=this.pos+e[0].length,i;return!R.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(H(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};f.parseStatement=function(e,t,i){var s=this.type,r=this.startNode(),n;switch(this.isLet(e)&&(s=a._var,n="let"),s){case a._break:case a._continue:return this.parseBreakContinueStatement(r,s.keyword);case a._debugger:return this.parseDebuggerStatement(r);case a._do:return this.parseDoStatement(r);case a._for:return this.parseForStatement(r);case a._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case a._class:return e&&this.unexpected(),this.parseClass(r,!0);case a._if:return this.parseIfStatement(r);case a._return:return this.parseReturnStatement(r);case a._switch:return this.parseSwitchStatement(r);case a._throw:return this.parseThrowStatement(r);case a._try:return this.parseTryStatement(r);case a._const:case a._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(r,n);case a._while:return this.parseWhileStatement(r);case a._with:return this.parseWithStatement(r);case a.braceL:return this.parseBlock(!0,r);case a.semi:return this.parseEmptyStatement(r);case a._export:case a._import:if(this.options.ecmaVersion>10&&s===a._import){V.lastIndex=this.pos;var o=V.exec(this.input),u=this.pos+o[0].length,h=this.input.charCodeAt(u);if(h===40||h===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===a._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var l=this.value,x=this.parseExpression();return s===a.name&&x.type==="Identifier"&&this.eat(a.colon)?this.parseLabeledStatement(r,l,x,e):this.parseExpressionStatement(r,x)}};f.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(a.semi)||this.insertSemicolon()?e.label=null:this.type!==a.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s=6?this.eat(a.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};f.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(qe),this.enterScope(0),this.expect(a.parenL),this.type===a.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===a._var||this.type===a._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&s.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===a._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,s)):(t>-1&&this.unexpected(t),this.parseFor(e,s))}var n=this.isContextual("let"),o=!1,u=new xe,h=this.parseExpression(t>-1?"await":!0,u);return this.type===a._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===a._in?t>-1&&this.unexpected(t):e.await=t>-1),n&&o&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,u),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))};f.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,ee|(i?0:Oe),!1,t)};f.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(a._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};f.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(a.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};f.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(a.braceL),this.labels.push(Bi),this.enterScope(0);for(var t,i=!1;this.type!==a.braceR;)if(this.type===a._case||this.type===a._default){var s=this.type===a._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(a.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};f.parseThrowStatement=function(e){return this.next(),R.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Di=[];f.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?mt:0),this.checkLValPattern(e,t?gt:J),this.expect(a.parenR),e};f.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===a._catch){var t=this.startNode();this.next(),this.eat(a.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(a._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};f.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};f.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(qe),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};f.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};f.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};f.parseLabeledStatement=function(e,t,i,s){for(var r=0,n=this.labels;r=0;h--){var l=this.labels[h];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};f.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};f.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(a.braceL),e&&this.enterScope(0);this.type!==a.braceR;){var s=this.parseStatement(null);t.body.push(s)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};f.parseFor=function(e,t){return e.init=t,this.expect(a.semi),e.test=this.type===a.semi?null:this.parseExpression(),this.expect(a.semi),e.update=this.type===a.parenR?null:this.parseExpression(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};f.parseForIn=function(e,t){var i=this.type===a._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};f.parseVar=function(e,t,i,s){for(e.declarations=[],e.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(a.eq)?r.init=this.parseMaybeAssign(t):!s&&i==="const"&&!(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&r.id.type!=="Identifier"&&!(t&&(this.type===a._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):r.init=null,e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(a.comma))break}return e};f.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ue:J,!1)};var ee=1,Oe=2,bt=4;f.parseFunction=function(e,t,i,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===a.star&&t&Oe&&this.unexpected(),e.generator=this.eat(a.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&ee&&(e.id=t&bt&&this.type!==a.name?null:this.parseIdent(),e.id&&!(t&Oe)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ue:J:yt));var n=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(je(e.async,e.generator)),t&ee||(e.id=this.type===a.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,r),this.yieldPos=n,this.awaitPos=o,this.awaitIdentPos=u,this.finishNode(e,t&ee?"FunctionDeclaration":"FunctionExpression")};f.parseFunctionParams=function(e){this.expect(a.parenL),e.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};f.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),r=this.startNode(),n=!1;for(r.body=[],this.expect(a.braceL);this.type!==a.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(n&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),n=!0):o.key&&o.key.type==="PrivateIdentifier"&&Fi(s,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};f.parseClassElement=function(e){if(this.eat(a.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,n=!1,o="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(a.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===a.star?u=!0:s="static"}if(i.static=u,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon()?n=!0:s="async"),!s&&(t>=9||!n)&&this.eat(a.star)&&(r=!0),!s&&!n&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===a.parenL||o!=="method"||r||n){var l=!i.static&&fe(i,"constructor"),x=l&&e;l&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=l?"constructor":o,this.parseClassMethod(i,r,n,x)}else this.parseClassField(i);return i};f.isClassElementNameStart=function(){return this.type===a.name||this.type===a.privateId||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword};f.parseClassElementName=function(e){this.type===a.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};f.parseClassMethod=function(e,t,i,s){var r=e.key;e.kind==="constructor"?(t&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):e.static&&fe(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,s);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};f.parseClassField=function(e){if(fe(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&fe(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(a.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};f.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(re|Fe);this.type!==a.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};f.parseClassId=function(e,t){this.type===a.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,J,!1)):(t===!0&&this.unexpected(),e.id=null)};f.parseClassSuper=function(e){e.superClass=this.eat(a._extends)?this.parseExprSubscripts(null,!1):null};f.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};f.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=s===0?null:this.privateNameStack[s-1],n=0;n=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};f.parseExport=function(e,t){if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(e,t);if(this.eat(a._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,s=e.specifiers;i=13&&this.type===a.string){var e=this.parseLiteral(this.value);return Vi.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};f.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var O=T.prototype;O.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=e.properties;s=8&&!u&&h.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(C.f_expr),this.parseFunction(this.startNodeAt(n,o),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(n,o),[h],!1,t);if(this.options.ecmaVersion>=8&&h.name==="async"&&this.type===a.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return h=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(a.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,o),[h],!0,t)}return h;case a.regexp:var l=this.value;return s=this.parseLiteral(l.value),s.regex={pattern:l.pattern,flags:l.flags},s;case a.num:case a.string:return this.parseLiteral(this.value);case a._null:case a._true:case a._false:return s=this.startNode(),s.value=this.type===a._null?null:this.type===a._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case a.parenL:var x=this.start,_=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(_)&&(e.parenthesizedAssign=x),e.parenthesizedBind<0&&(e.parenthesizedBind=x)),_;case a.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(a.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case a.braceL:return this.overrideContext(C.b_expr),this.parseObj(!1,e);case a._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case a._class:return this.parseClass(this.startNode(),!1);case a._new:return this.parseNew();case a.backQuote:return this.parseTemplate();case a._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};y.parseExprAtomDefault=function(){this.unexpected()};y.parseExprImport=function(e){var t=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var i=this.parseIdent(!0);if(this.type===a.parenL&&!e)return this.parseDynamicImport(t);if(this.type===a.dot)return t.meta=i,this.parseImportMeta(t);this.unexpected()};y.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(a.parenR)){var t=this.start;this.eat(a.comma)&&this.eat(a.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};y.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};y.parseParenExpression=function(){this.expect(a.parenL);var e=this.parseExpression();return this.expect(a.parenR),e};y.shouldParseArrow=function(e){return!this.canInsertSemicolon()};y.parseParenAndDistinguishExpression=function(e,t){var i=this.start,s=this.startLoc,r,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,u=this.startLoc,h=[],l=!0,x=!1,_=new xe,B=this.yieldPos,p=this.awaitPos,d;for(this.yieldPos=0,this.awaitPos=0;this.type!==a.parenR;)if(l?l=!1:this.expect(a.comma),n&&this.afterTrailingComma(a.parenR,!0)){x=!0;break}else if(this.type===a.ellipsis){d=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else h.push(this.parseMaybeAssign(!1,_,this.parseParenItem));var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(a.parenR),e&&this.shouldParseArrow(h)&&this.eat(a.arrow))return this.checkPatternErrors(_,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=B,this.awaitPos=p,this.parseParenArrowList(i,s,h,t);(!h.length||x)&&this.unexpected(this.lastTokStart),d&&this.unexpected(d),this.checkExpressionErrors(_,!0),this.yieldPos=B||this.yieldPos,this.awaitPos=p||this.awaitPos,h.length>1?(r=this.startNodeAt(o,u),r.expressions=h,this.finishNodeAt(r,"SequenceExpression",m,g)):r=h[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var E=this.startNodeAt(i,s);return E.expression=r,this.finishNode(E,"ParenthesizedExpression")}else return r};y.parseParenItem=function(e){return e};y.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,s)};var Mi=[];y.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===a.dot){var t=this.startNodeAt(e.start,e.startLoc);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(a.parenL)?e.arguments=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Mi,this.finishNode(e,"NewExpression")};y.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===a.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` -`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};y.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};y.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!R.test(this.input.slice(this.lastTokEnd,this.start))};y.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};y.parseProperty=function(e,t){var i=this.startNode(),s,r,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(s=this.eat(a.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,n,o,t,u),this.finishNode(i,"Property")};y.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};y.parsePropertyValue=function(e,t,i,s,r,n,o,u){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,s)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};y.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(je(t,s.generator)|Fe|(i?xt:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};y.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(je(i,!1)|dt),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};y.parseFunctionBody=function(e,t,i,s){var r=t&&this.type!==a.braceL,n=this.strict,o=!1;if(r)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||u)&&(o=this.strictDirective(this.end),o&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var h=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!n&&!o&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,vt),e.body=this.parseBlock(!1,void 0,o&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=h}this.exitScope()};y.isSimpleParamList=function(e){for(var t=0,i=e;t-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&r.flags&ie&&delete this.undefinedExports[e]}else if(t===gt){var n=this.currentScope();n.lexical.push(e)}else if(t===yt){var o=this.currentScope();this.treatFunctionsAsVar?s=o.lexical.indexOf(e)>-1:s=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var h=this.scopeStack[u];if(h.lexical.indexOf(e)>-1&&!(h.flags&mt&&h.lexical[0]===e)||!this.treatFunctionsAsVarInScope(h)&&h.functions.indexOf(e)>-1){s=!0;break}if(h.var.push(e),this.inModule&&h.flags&ie&&delete this.undefinedExports[e],h.flags&Me)break}s&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};W.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};W.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};W.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Me)return t}};W.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Me&&!(t.flags&dt))return t}};var ye=function(t,i,s){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new me(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},ae=T.prototype;ae.startNode=function(){return new ye(this,this.start,this.startLoc)};ae.startNodeAt=function(e,t){return new ye(this,e,t)};function _t(e,t,i,s){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=i),e}ae.finishNode=function(e,t){return _t.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};ae.finishNodeAt=function(e,t,i,s){return _t.call(this,e,t,i,s)};ae.copyNode=function(e){var t=new ye(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var Ct="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Tt=Ct+" Extended_Pictographic",kt=Tt,wt=kt+" EBase EComp EMod EPres ExtPict",Et=wt,Ui=Et,qi={9:Ct,10:Tt,11:kt,12:wt,13:Et,14:Ui},Ji="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Gi={9:"",10:"",11:"",12:"",13:"",14:Ji},at="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",At="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Pt=At+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",It=Pt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Nt=It+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Vt=Nt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ki=Vt+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Wi={9:At,10:Pt,11:It,12:Nt,13:Vt,14:Ki},Lt={};function Xi(e){var t=Lt[e]={binary:G(qi[e]+" "+at),binaryOfStrings:G(Gi[e]),nonBinary:{General_Category:G(at),Script:G(Wi[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(ce=0,Ve=[9,10,11,12,13,14];ce=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Lt[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};M.prototype.reset=function(t,i,s){var r=s.indexOf("v")!==-1,n=s.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=s,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};M.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};M.prototype.at=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return-1;var n=s.charCodeAt(t);if(!(i||this.switchU)||n<=55295||n>=57344||t+1>=r)return n;var o=s.charCodeAt(t+1);return o>=56320&&o<=57343?(n<<10)+o-56613888:n};M.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return r;var n=s.charCodeAt(t),o;return!(i||this.switchU)||n<=55295||n>=57344||t+1>=r||(o=s.charCodeAt(t+1))<56320||o>57343?t+1:t+2};M.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};M.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};M.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};M.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};M.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var s=this.pos,r=0,n=t;r-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(s=!0),o==="v"&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(e.start,"Invalid regular expression flag")};c.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};c.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};c.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};c.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};c.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return r!==-1&&r=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};c.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};c.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};c.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Rt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Rt(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}c.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!Rt(i);)e.advance();return e.pos!==t};c.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};c.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};c.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};c.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=K(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=K(e.lastIntValue);return!0}return!1};c.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),zi(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function zi(e){return U(e,!0)||e===36||e===95}c.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),Hi(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function Hi(e){return H(e,!0)||e===36||e===95||e===8204||e===8205}c.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};c.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};c.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};c.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};c.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};c.regexp_eatZero=function(e){return e.current()===48&&!ge(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};c.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};c.regexp_eatControlLetter=function(e){var t=e.current();return Ot(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Ot(e){return e>=65&&e<=90||e>=97&&e<=122}c.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(s&&r>=55296&&r<=56319){var n=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(r-55296)*1024+(o-56320)+65536,!0}e.pos=n,e.lastIntValue=r}return!0}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Qi(e.lastIntValue))return!0;s&&e.raise("Invalid unicode escape"),e.pos=i}return!1};function Qi(e){return e>=0&&e<=1114111}c.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};c.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var Bt=0,q=1,L=2;c.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Yi(t))return e.lastIntValue=-1,e.advance(),q;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var s;if(e.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&s===L&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return Bt};function Yi(e){return e===100||e===68||e===115||e===83||e===119||e===87}c.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,s),q}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r)}return Bt};c.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){se(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};c.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return q;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return L;e.raise("Invalid property name")};c.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Dt(t=e.current());)e.lastStringValue+=K(t),e.advance();return e.lastStringValue!==""};function Dt(e){return Ot(e)||e===95}c.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";$i(t=e.current());)e.lastStringValue+=K(t),e.advance();return e.lastStringValue!==""};function $i(e){return Dt(e)||ge(e)}c.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};c.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===L&&e.raise("Negated character class may contain strings"),!0}return!1};c.regexp_classContents=function(e){return e.current()===93?q:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),q)};c.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};c.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||jt(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return s!==93?(e.lastIntValue=s,e.advance(),!0):!1};c.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};c.regexp_classSetExpression=function(e){var t=q,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===L&&(t=L);for(var s=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==L&&(t=q);continue}e.raise("Invalid character in character class")}if(s!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(s!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===L&&(t=L)}};c.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;return i!==-1&&s!==-1&&i>s&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};c.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?q:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};c.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),s=this.regexp_classContents(e);if(e.eat(93))return i&&s===L&&e.raise("Negated character class may contain strings"),s;e.pos=t}if(e.eat(92)){var r=this.regexp_eatCharacterClassEscape(e);if(r)return r;e.pos=t}return null};c.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};c.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===L&&(t=L);return t};c.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?q:L};c.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&Zi(i)||es(i)?!1:(e.advance(),e.lastIntValue=i,!0)};function Zi(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function es(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}c.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return ts(t)?(e.lastIntValue=t,e.advance(),!0):!1};function ts(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}c.regexp_eatClassControlLetter=function(e){var t=e.current();return ge(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};c.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};c.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;ge(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function ge(e){return e>=48&&e<=57}c.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Ft(i=e.current());)e.lastIntValue=16*e.lastIntValue+Mt(i),e.advance();return e.pos!==t};function Ft(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Mt(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}c.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};c.regexp_eatOctalDigit=function(e){var t=e.current();return jt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function jt(e){return e>=48&&e<=55}c.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var s=0;s=this.input.length)return this.finishToken(a.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};v.readToken=function(e){return U(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};v.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};v.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=t;(s=ht(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};v.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&pt.test(String.fromCharCode(e)))++this.pos;else break e}}};v.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};v.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(a.ellipsis)):(++this.pos,this.finishToken(a.dot))};v.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(a.assign,2):this.finishOp(a.slash,1)};v.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,s=e===42?a.star:a.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,s=a.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(a.assign,i+1):this.finishOp(s,i)};v.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(a.assign,3)}return this.finishOp(e===124?a.logicalOR:a.logicalAND,2)}return t===61?this.finishOp(a.assign,2):this.finishOp(e===124?a.bitwiseOR:a.bitwiseAND,1)};v.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(a.assign,2):this.finishOp(a.bitwiseXOR,1)};v.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||R.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(a.incDec,2):t===61?this.finishOp(a.assign,2):this.finishOp(a.plusMin,1)};v.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(a.assign,i+1):this.finishOp(a.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(a.relational,i))};v.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(a.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(a.arrow)):this.finishOp(e===61?a.eq:a.prefix,1)};v.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(a.questionDot,2)}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(a.assign,3)}return this.finishOp(a.coalesce,2)}}return this.finishOp(a.question,1)};v.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),U(t,!0)||t===92))return this.finishToken(a.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+K(t)+"'")};v.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(a.parenL);case 41:return++this.pos,this.finishToken(a.parenR);case 59:return++this.pos,this.finishToken(a.semi);case 44:return++this.pos,this.finishToken(a.comma);case 91:return++this.pos,this.finishToken(a.bracketL);case 93:return++this.pos,this.finishToken(a.bracketR);case 123:return++this.pos,this.finishToken(a.braceL);case 125:return++this.pos,this.finishToken(a.braceR);case 58:return++this.pos,this.finishToken(a.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(a.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(a.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+K(e)+"'")};v.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};v.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(R.test(s)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(s==="[")t=!0;else if(s==="]"&&t)t=!1;else if(s==="/"&&!t)break;e=s==="\\"}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var n=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(n);var u=this.regexpState||(this.regexpState=new M(this));u.reset(i,r,o),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var h=null;try{h=new RegExp(r,o)}catch{}return this.finishToken(a.regexp,{pattern:r,flags:o,value:h})};v.readInt=function(e,t,i){for(var s=this.options.ecmaVersion>=12&&t===void 0,r=i&&this.input.charCodeAt(this.pos)===48,n=this.pos,o=0,u=0,h=0,l=t??1/0;h=97?_=x-97+10:x>=65?_=x-65+10:x>=48&&x<=57?_=x-48:_=1/0,_>=e)break;u=x,o=o*e+_}return s&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||t!=null&&this.pos-n!==t?null:o};function is(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function Ut(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}v.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=Ut(this.input.slice(t,this.pos)),++this.pos):U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,i)};v.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&s===110){var r=Ut(this.input.slice(t,this.pos));return++this.pos,U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,r)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),s===46&&!i&&(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),(s===69||s===101)&&!i&&(s=this.input.charCodeAt(++this.pos),(s===43||s===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=is(this.input.slice(t,this.pos),i);return this.finishToken(a.num,n)};v.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};v.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;s===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):s===8232||s===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Q(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(a.string,t)};var qt={};v.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===qt)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};v.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw qt;this.raise(e,t)};v.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===a.template||this.type===a.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(a.dollarBraceL)):(++this.pos,this.finishToken(a.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(a.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Q(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` +`):m=String.fromCharCode(d),this.options.locations&&(++this.curLine,this.lineStart=this.pos),m}jsx_readString(p){let d="",m=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let g=this.input.charCodeAt(this.pos);if(g===p)break;g===38?(d+=this.input.slice(m,this.pos),d+=this.jsx_readEntity(),m=this.pos):x(g)?(d+=this.input.slice(m,this.pos),d+=this.jsx_readNewLine(!1),m=this.pos):++this.pos}return d+=this.input.slice(m,this.pos++),this.finishToken(r.string,d)}jsx_readEntity(){let p="",d=0,m,g=this.input[this.pos];g!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let E=++this.pos;for(;this.pos")}let ke=E.name?"Element":"Fragment";return m["opening"+ke]=E,m["closing"+ke]=pe,m.children=g,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(m,"JSX"+ke)}jsx_parseText(){let p=this.parseLiteral(this.value);return p.type="JSXText",p}jsx_parseElement(){let p=this.start,d=this.startLoc;return this.next(),this.jsx_parseElementAt(p,d)}parseExprAtom(p){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(p)}readToken(p){let d=this.curContext();if(d===l)return this.jsx_readToken();if(d===u||d===h){if(_(p))return this.jsx_readWord();if(p==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((p===34||p===39)&&d==u)return this.jsx_readString(p)}return p===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33?(++this.pos,this.finishToken(n.jsxTagStart)):super.readToken(p)}updateContext(p){if(this.type==r.braceL){var d=this.curContext();d==u?this.context.push(o.b_expr):d==l?this.context.push(o.b_tmpl):super.updateContext(p),this.exprAllowed=!0}else if(this.type===r.slash&&p===n.jsxTagStart)this.context.length-=2,this.context.push(h),this.exprAllowed=!1;else return super.updateContext(p)}}}});var ai=Ee(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.extract=ws;X.parse=As;X.parseWithComments=ri;X.print=Ps;X.strip=Es;var Ss=/\*\/$/,_s=/^\/\*\*?/,ii=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Cs=/(^|\s+)\/\/([^\r\n]*)/g,Zt=/^(\r?\n)+/,Ts=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,ei=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,ks=/(\r?\n|^) *\* ?/g,si=[];function ws(e){let t=e.match(ii);return t?t[0].trimLeft():""}function Es(e){let t=e.match(ii);return t&&t[0]?e.substring(t[0].length):e}function As(e){return ri(e).pragmas}function ri(e){let t=` +`;e=e.replace(_s,"").replace(Ss,"").replace(ks,"$1");let i="";for(;i!==e;)i=e,e=e.replace(Ts,`${t}$1 $2${t}`);e=e.replace(Zt,"").trimRight();let s=Object.create(null),r=e.replace(ei,"").replace(Zt,"").trimRight(),n;for(;n=ei.exec(e);){let o=n[2].replace(Cs,"");typeof s[n[1]]=="string"||Array.isArray(s[n[1]])?s[n[1]]=si.concat(s[n[1]],o):s[n[1]]=o}return{comments:r,pragmas:s}}function Ps({comments:e="",pragmas:t={}}){let i=` +`,s="/**",r=" *",n=" */",o=Object.keys(t),u=o.flatMap(l=>ti(l,t[l])).map(l=>`${r} ${l}${i}`).join("");if(!e){if(o.length===0)return"";if(o.length===1&&!Array.isArray(t[o[0]])){let l=t[o[0]];return`${s} ${ti(o[0],l)[0]}${n}`}}let h=e.split(i).map(l=>`${r} ${l}`).join(i)+i;return s+i+(e?h:"")+(e&&o.length?r+i:"")+u+n}function ti(e,t){return si.concat(t).map(i=>`@${e} ${i}`.trim())}});var et={};Si(et,{parsers:()=>zs});var Ci=[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,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],nt=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,38,6,186,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,19,72,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,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,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,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,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ti="\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",ot="\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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",Pe={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},Ie="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",ki={5:Ie,"5module":Ie+" export import",6:Ie+" const class extends export import super"},wi=/^in(stanceof)?$/,Ei=new RegExp("["+ot+"]"),Ai=new RegExp("["+ot+Ti+"]");function Ve(e,t){for(var i=65536,s=0;se)return!1;if(i+=t[s+1],i>=e)return!0}return!1}function U(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ei.test(String.fromCharCode(e)):t===!1?!1:Ve(e,nt)}function H(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ai.test(String.fromCharCode(e)):t===!1?!1:Ve(e,nt)||Ve(e,Ci)}var S=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function I(e,t){return new S(e,{beforeExpr:!0,binop:t})}var N={beforeExpr:!0},A={startsExpr:!0},Oe={};function b(e,t){return t===void 0&&(t={}),t.keyword=e,Oe[e]=new S(e,t)}var a={num:new S("num",A),regexp:new S("regexp",A),string:new S("string",A),name:new S("name",A),privateId:new S("privateId",A),eof:new S("eof"),bracketL:new S("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new S("]"),braceL:new S("{",{beforeExpr:!0,startsExpr:!0}),braceR:new S("}"),parenL:new S("(",{beforeExpr:!0,startsExpr:!0}),parenR:new S(")"),comma:new S(",",N),semi:new S(";",N),colon:new S(":",N),dot:new S("."),question:new S("?",N),questionDot:new S("?."),arrow:new S("=>",N),template:new S("template"),invalidTemplate:new S("invalidTemplate"),ellipsis:new S("...",N),backQuote:new S("`",A),dollarBraceL:new S("${",{beforeExpr:!0,startsExpr:!0}),eq:new S("=",{beforeExpr:!0,isAssign:!0}),assign:new S("_=",{beforeExpr:!0,isAssign:!0}),incDec:new S("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new S("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:I("||",1),logicalAND:I("&&",2),bitwiseOR:I("|",3),bitwiseXOR:I("^",4),bitwiseAND:I("&",5),equality:I("==/!=/===/!==",6),relational:I("/<=/>=",7),bitShift:I("<>/>>>",8),plusMin:new S("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:I("%",10),star:I("*",10),slash:I("/",10),starstar:new S("**",{beforeExpr:!0}),coalesce:I("??",1),_break:b("break"),_case:b("case",N),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",N),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",N),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",A),_if:b("if"),_return:b("return",N),_switch:b("switch"),_throw:b("throw",N),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",A),_super:b("super",A),_class:b("class",A),_extends:b("extends",N),_export:b("export"),_import:b("import",A),_null:b("null",A),_true:b("true",A),_false:b("false",A),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},R=/\r\n?|\n|\u2028|\u2029/,Pi=new RegExp(R.source,"g");function Q(e){return e===10||e===13||e===8232||e===8233}function ut(e,t,i){i===void 0&&(i=e.length);for(var s=t;s>10)+55296,(e&1023)+56320))}var Vi=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,te=function(t,i){this.line=t,this.column=i};te.prototype.offset=function(t){return new te(this.line,this.column+t)};var me=function(t,i,s){this.start=i,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function ct(e,t){for(var i=1,s=0;;){var r=ut(e,s,t);if(r<0)return new te(i,t-s);++i,s=r}}var Le={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},st=!1;function Li(e){var t={};for(var i in Le)t[i]=e&&se(e,i)?e[i]:Le[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!st&&typeof console=="object"&&console.warn&&(st=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required. +Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),tt(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return tt(t.onComment)&&(t.onComment=Ri(t,t.onComment)),t}function Ri(e,t){return function(i,s,r,n,o,u){var h={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(h.loc=new me(this,o,u)),e.ranges&&(h.range=[r,n]),t.push(h)}}var ie=1,Y=2,Be=4,lt=8,ft=16,dt=32,De=64,mt=128,re=256,Fe=ie|Y|re;function Me(e,t){return Y|(e?Be:0)|(t?lt:0)}var le=0,je=1,J=2,xt=3,yt=4,gt=5,T=function(t,i,s){this.options=t=Li(t),this.sourceFile=t.sourceFile,this.keywords=G(ki[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Pe[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=G(r);var n=(r?r+" ":"")+Pe.strict;this.reservedWordsStrict=G(n),this.reservedWordsStrictBind=G(n+" "+Pe.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(` +`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(R).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(ie),this.regexpState=null,this.privateNameStack=[]},F={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};T.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};F.inFunction.get=function(){return(this.currentVarScope().flags&Y)>0};F.inGenerator.get=function(){return(this.currentVarScope().flags<)>0&&!this.currentVarScope().inClassFieldInit};F.inAsync.get=function(){return(this.currentVarScope().flags&Be)>0&&!this.currentVarScope().inClassFieldInit};F.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&re)return!1;if(t.flags&Y)return(t.flags&Be)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};F.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&De)>0||i||this.options.allowSuperOutsideMethod};F.allowDirectSuper.get=function(){return(this.currentThisScope().flags&mt)>0};F.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};F.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,i=e.inClassFieldInit;return(t&(Y|re))>0||i};F.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&re)>0};T.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,V.lastIndex=e,e+=V.exec(this.input)[0].length,this.input[e]===";"&&e++}};k.eat=function(e){return this.type===e?(this.next(),!0):!1};k.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};k.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};k.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};k.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||R.test(this.input.slice(this.lastTokEnd,this.start))};k.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};k.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};k.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};k.expect=function(e){this.eat(e)||this.unexpected()};k.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var xe=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};k.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};k.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};k.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&s<56320)return!0;if(U(s,!0)){for(var r=i+1;H(s=this.input.charCodeAt(r),!0);)++r;if(s===92||s>55295&&s<56320)return!0;var n=this.input.slice(i,r);if(!wi.test(n))return!0}return!1};f.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;V.lastIndex=this.pos;var e=V.exec(this.input),t=this.pos+e[0].length,i;return!R.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(H(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};f.parseStatement=function(e,t,i){var s=this.type,r=this.startNode(),n;switch(this.isLet(e)&&(s=a._var,n="let"),s){case a._break:case a._continue:return this.parseBreakContinueStatement(r,s.keyword);case a._debugger:return this.parseDebuggerStatement(r);case a._do:return this.parseDoStatement(r);case a._for:return this.parseForStatement(r);case a._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case a._class:return e&&this.unexpected(),this.parseClass(r,!0);case a._if:return this.parseIfStatement(r);case a._return:return this.parseReturnStatement(r);case a._switch:return this.parseSwitchStatement(r);case a._throw:return this.parseThrowStatement(r);case a._try:return this.parseTryStatement(r);case a._const:case a._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(r,n);case a._while:return this.parseWhileStatement(r);case a._with:return this.parseWithStatement(r);case a.braceL:return this.parseBlock(!0,r);case a.semi:return this.parseEmptyStatement(r);case a._export:case a._import:if(this.options.ecmaVersion>10&&s===a._import){V.lastIndex=this.pos;var o=V.exec(this.input),u=this.pos+o[0].length,h=this.input.charCodeAt(u);if(h===40||h===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===a._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var l=this.value,x=this.parseExpression();return s===a.name&&x.type==="Identifier"&&this.eat(a.colon)?this.parseLabeledStatement(r,l,x,e):this.parseExpressionStatement(r,x)}};f.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(a.semi)||this.insertSemicolon()?e.label=null:this.type!==a.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s=6?this.eat(a.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};f.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ue),this.enterScope(0),this.expect(a.parenL),this.type===a.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===a._var||this.type===a._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&s.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===a._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,s)):(t>-1&&this.unexpected(t),this.parseFor(e,s))}var n=this.isContextual("let"),o=!1,u=new xe,h=this.parseExpression(t>-1?"await":!0,u);return this.type===a._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===a._in?t>-1&&this.unexpected(t):e.await=t>-1),n&&o&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,u),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))};f.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,ee|(i?0:Re),!1,t)};f.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(a._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};f.parseReturnStatement=function(e){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(a.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};f.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(a.braceL),this.labels.push(Bi),this.enterScope(0);for(var t,i=!1;this.type!==a.braceR;)if(this.type===a._case||this.type===a._default){var s=this.type===a._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(a.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};f.parseThrowStatement=function(e){return this.next(),R.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Di=[];f.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?dt:0),this.checkLValPattern(e,t?yt:J),this.expect(a.parenR),e};f.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===a._catch){var t=this.startNode();this.next(),this.eat(a.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(a._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};f.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};f.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ue),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};f.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};f.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};f.parseLabeledStatement=function(e,t,i,s){for(var r=0,n=this.labels;r=0;h--){var l=this.labels[h];if(l.statementStart===e.start)l.statementStart=this.start,l.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};f.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};f.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(a.braceL),e&&this.enterScope(0);this.type!==a.braceR;){var s=this.parseStatement(null);t.body.push(s)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};f.parseFor=function(e,t){return e.init=t,this.expect(a.semi),e.test=this.type===a.semi?null:this.parseExpression(),this.expect(a.semi),e.update=this.type===a.parenR?null:this.parseExpression(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};f.parseForIn=function(e,t){var i=this.type===a._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};f.parseVar=function(e,t,i,s){for(e.declarations=[],e.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(a.eq)?r.init=this.parseMaybeAssign(t):!s&&i==="const"&&!(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&r.id.type!=="Identifier"&&!(t&&(this.type===a._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):r.init=null,e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(a.comma))break}return e};f.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?je:J,!1)};var ee=1,Re=2,vt=4;f.parseFunction=function(e,t,i,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===a.star&&t&Re&&this.unexpected(),e.generator=this.eat(a.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&ee&&(e.id=t&vt&&this.type!==a.name?null:this.parseIdent(),e.id&&!(t&Re)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?je:J:xt));var n=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Me(e.async,e.generator)),t&ee||(e.id=this.type===a.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,r),this.yieldPos=n,this.awaitPos=o,this.awaitIdentPos=u,this.finishNode(e,t&ee?"FunctionDeclaration":"FunctionExpression")};f.parseFunctionParams=function(e){this.expect(a.parenL),e.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};f.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),r=this.startNode(),n=!1;for(r.body=[],this.expect(a.braceL);this.type!==a.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(n&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),n=!0):o.key&&o.key.type==="PrivateIdentifier"&&Fi(s,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};f.parseClassElement=function(e){if(this.eat(a.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,n=!1,o="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(a.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===a.star?u=!0:s="static"}if(i.static=u,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon()?n=!0:s="async"),!s&&(t>=9||!n)&&this.eat(a.star)&&(r=!0),!s&&!n&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===a.parenL||o!=="method"||r||n){var l=!i.static&&fe(i,"constructor"),x=l&&e;l&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=l?"constructor":o,this.parseClassMethod(i,r,n,x)}else this.parseClassField(i);return i};f.isClassElementNameStart=function(){return this.type===a.name||this.type===a.privateId||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword};f.parseClassElementName=function(e){this.type===a.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};f.parseClassMethod=function(e,t,i,s){var r=e.key;e.kind==="constructor"?(t&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):e.static&&fe(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,s);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};f.parseClassField=function(e){if(fe(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&fe(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(a.eq)){var t=this.currentThisScope(),i=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=i}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};f.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(re|De);this.type!==a.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};f.parseClassId=function(e,t){this.type===a.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,J,!1)):(t===!0&&this.unexpected(),e.id=null)};f.parseClassSuper=function(e){e.superClass=this.eat(a._extends)?this.parseExprSubscripts(null,!1):null};f.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};f.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=s===0?null:this.privateNameStack[s-1],n=0;n=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};f.parseExport=function(e,t){if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(e,t);if(this.eat(a._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var i=0,s=e.specifiers;i=13&&this.type===a.string){var e=this.parseLiteral(this.value);return Vi.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};f.adaptDirectivePrologue=function(e){for(var t=0;t=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var O=T.prototype;O.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=e.properties;s=8&&!u&&h.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(C.f_expr),this.parseFunction(this.startNodeAt(n,o),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(n,o),[h],!1,t);if(this.options.ecmaVersion>=8&&h.name==="async"&&this.type===a.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return h=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(a.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,o),[h],!0,t)}return h;case a.regexp:var l=this.value;return s=this.parseLiteral(l.value),s.regex={pattern:l.pattern,flags:l.flags},s;case a.num:case a.string:return this.parseLiteral(this.value);case a._null:case a._true:case a._false:return s=this.startNode(),s.value=this.type===a._null?null:this.type===a._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case a.parenL:var x=this.start,_=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(_)&&(e.parenthesizedAssign=x),e.parenthesizedBind<0&&(e.parenthesizedBind=x)),_;case a.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(a.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case a.braceL:return this.overrideContext(C.b_expr),this.parseObj(!1,e);case a._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case a._class:return this.parseClass(this.startNode(),!1);case a._new:return this.parseNew();case a.backQuote:return this.parseTemplate();case a._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};y.parseExprAtomDefault=function(){this.unexpected()};y.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===a.parenL&&!e)return this.parseDynamicImport(t);if(this.type===a.dot){var i=this.startNodeAt(t.start,t.loc&&t.loc.start);return i.name="import",t.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};y.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(a.parenR)){var t=this.start;this.eat(a.comma)&&this.eat(a.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};y.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};y.parseParenExpression=function(){this.expect(a.parenL);var e=this.parseExpression();return this.expect(a.parenR),e};y.shouldParseArrow=function(e){return!this.canInsertSemicolon()};y.parseParenAndDistinguishExpression=function(e,t){var i=this.start,s=this.startLoc,r,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,u=this.startLoc,h=[],l=!0,x=!1,_=new xe,B=this.yieldPos,p=this.awaitPos,d;for(this.yieldPos=0,this.awaitPos=0;this.type!==a.parenR;)if(l?l=!1:this.expect(a.comma),n&&this.afterTrailingComma(a.parenR,!0)){x=!0;break}else if(this.type===a.ellipsis){d=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else h.push(this.parseMaybeAssign(!1,_,this.parseParenItem));var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(a.parenR),e&&this.shouldParseArrow(h)&&this.eat(a.arrow))return this.checkPatternErrors(_,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=B,this.awaitPos=p,this.parseParenArrowList(i,s,h,t);(!h.length||x)&&this.unexpected(this.lastTokStart),d&&this.unexpected(d),this.checkExpressionErrors(_,!0),this.yieldPos=B||this.yieldPos,this.awaitPos=p||this.awaitPos,h.length>1?(r=this.startNodeAt(o,u),r.expressions=h,this.finishNodeAt(r,"SequenceExpression",m,g)):r=h[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var E=this.startNodeAt(i,s);return E.expression=r,this.finishNode(E,"ParenthesizedExpression")}else return r};y.parseParenItem=function(e){return e};y.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,s)};var Mi=[];y.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===a.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),this.eat(a.parenL)?e.arguments=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Mi,this.finishNode(e,"NewExpression")};y.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===a.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,` +`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};y.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};y.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!R.test(this.input.slice(this.lastTokEnd,this.start))};y.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};y.parseProperty=function(e,t){var i=this.startNode(),s,r,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(s=this.eat(a.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,n,o,t,u),this.finishNode(i,"Property")};y.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t=e.kind==="get"?0:1;if(e.value.params.length!==t){var i=e.value.start;e.kind==="get"?this.raiseRecoverable(i,"getter should have no params"):this.raiseRecoverable(i,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};y.parsePropertyValue=function(e,t,i,s,r,n,o,u){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(i,s)):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),e.kind="init",t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected()};y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};y.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Me(t,s.generator)|De|(i?mt:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};y.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(Me(i,!1)|ft),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};y.parseFunctionBody=function(e,t,i,s){var r=t&&this.type!==a.braceL,n=this.strict,o=!1;if(r)e.body=this.parseMaybeAssign(s),e.expression=!0,this.checkParams(e,!1);else{var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||u)&&(o=this.strictDirective(this.end),o&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var h=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!n&&!o&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,gt),e.body=this.parseBlock(!1,void 0,o&&!n),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=h}this.exitScope()};y.isSimpleParamList=function(e){for(var t=0,i=e;t-1||r.functions.indexOf(e)>-1||r.var.indexOf(e)>-1,r.lexical.push(e),this.inModule&&r.flags&ie&&delete this.undefinedExports[e]}else if(t===yt){var n=this.currentScope();n.lexical.push(e)}else if(t===xt){var o=this.currentScope();this.treatFunctionsAsVar?s=o.lexical.indexOf(e)>-1:s=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var u=this.scopeStack.length-1;u>=0;--u){var h=this.scopeStack[u];if(h.lexical.indexOf(e)>-1&&!(h.flags&dt&&h.lexical[0]===e)||!this.treatFunctionsAsVarInScope(h)&&h.functions.indexOf(e)>-1){s=!0;break}if(h.var.push(e),this.inModule&&h.flags&ie&&delete this.undefinedExports[e],h.flags&Fe)break}s&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")};W.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)};W.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};W.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Fe)return t}};W.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Fe&&!(t.flags&ft))return t}};var ye=function(t,i,s){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new me(t,s)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0])},ae=T.prototype;ae.startNode=function(){return new ye(this,this.start,this.startLoc)};ae.startNodeAt=function(e,t){return new ye(this,e,t)};function St(e,t,i,s){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=s),this.options.ranges&&(e.range[1]=i),e}ae.finishNode=function(e,t){return St.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};ae.finishNodeAt=function(e,t,i,s){return St.call(this,e,t,i,s)};ae.copyNode=function(e){var t=new ye(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var _t="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Ct=_t+" Extended_Pictographic",Tt=Ct,kt=Tt+" EBase EComp EMod EPres ExtPict",wt=kt,Ui=wt,qi={9:_t,10:Ct,11:Tt,12:kt,13:wt,14:Ui},Ji="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Gi={9:"",10:"",11:"",12:"",13:"",14:Ji},rt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Et="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",At=Et+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Pt=At+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",It=Pt+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Nt=It+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Ki=Nt+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz",Wi={9:Et,10:At,11:Pt,12:It,13:Nt,14:Ki},Vt={};function Xi(e){var t=Vt[e]={binary:G(qi[e]+" "+rt),binaryOfStrings:G(Gi[e]),nonBinary:{General_Category:G(rt),Script:G(Wi[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(ce=0,Ne=[9,10,11,12,13,14];ce=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Vt[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};M.prototype.reset=function(t,i,s){var r=s.indexOf("v")!==-1,n=s.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=s,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=n&&this.parser.options.ecmaVersion>=9)};M.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};M.prototype.at=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return-1;var n=s.charCodeAt(t);if(!(i||this.switchU)||n<=55295||n>=57344||t+1>=r)return n;var o=s.charCodeAt(t+1);return o>=56320&&o<=57343?(n<<10)+o-56613888:n};M.prototype.nextIndex=function(t,i){i===void 0&&(i=!1);var s=this.source,r=s.length;if(t>=r)return r;var n=s.charCodeAt(t),o;return!(i||this.switchU)||n<=55295||n>=57344||t+1>=r||(o=s.charCodeAt(t+1))<56320||o>57343?t+1:t+2};M.prototype.current=function(t){return t===void 0&&(t=!1),this.at(this.pos,t)};M.prototype.lookahead=function(t){return t===void 0&&(t=!1),this.at(this.nextIndex(this.pos,t),t)};M.prototype.advance=function(t){t===void 0&&(t=!1),this.pos=this.nextIndex(this.pos,t)};M.prototype.eat=function(t,i){return i===void 0&&(i=!1),this.current(i)===t?(this.advance(i),!0):!1};M.prototype.eatChars=function(t,i){i===void 0&&(i=!1);for(var s=this.pos,r=0,n=t;r-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(s=!0),o==="v"&&(r=!0)}this.options.ecmaVersion>=15&&s&&r&&this.raise(e.start,"Invalid regular expression flag")};c.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))};c.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,!0}return e.pos=t,!1};c.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1};c.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};c.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var s=0,r=-1;if(this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue),e.eat(125)))return r!==-1&&r=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};c.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};c.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1};c.regexp_eatSyntaxCharacter=function(e){var t=e.current();return Lt(t)?(e.lastIntValue=t,e.advance(),!0):!1};function Lt(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}c.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!Lt(i);)e.advance();return e.pos!==t};c.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),!0):!1};c.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){e.groupNames.indexOf(e.lastStringValue)!==-1&&e.raise("Duplicate capture group name"),e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};c.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};c.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=K(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=K(e.lastIntValue);return!0}return!1};c.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),zi(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function zi(e){return U(e,!0)||e===36||e===95}c.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,s=e.current(i);return e.advance(i),s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(s=e.lastIntValue),Hi(s)?(e.lastIntValue=s,!0):(e.pos=t,!1)};function Hi(e){return H(e,!0)||e===36||e===95||e===8204||e===8205}c.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)};c.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),!0;if(i<=e.numCapturingParens)return!0;e.pos=t}return!1};c.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};c.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};c.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};c.regexp_eatZero=function(e){return e.current()===48&&!ge(e.lookahead())?(e.lastIntValue=0,e.advance(),!0):!1};c.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114?(e.lastIntValue=13,e.advance(),!0):!1};c.regexp_eatControlLetter=function(e){var t=e.current();return Rt(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function Rt(e){return e>=65&&e<=90||e>=97&&e<=122}c.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var i=e.pos,s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var r=e.lastIntValue;if(s&&r>=55296&&r<=56319){var n=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(r-55296)*1024+(o-56320)+65536,!0}e.pos=n,e.lastIntValue=r}return!0}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Qi(e.lastIntValue))return!0;s&&e.raise("Invalid unicode escape"),e.pos=i}return!1};function Qi(e){return e>=0&&e<=1114111}c.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),!0):!1};c.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var Ot=0,q=1,L=2;c.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Yi(t))return e.lastIntValue=-1,e.advance(),q;var i=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var s;if(e.eat(123)&&(s=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&s===L&&e.raise("Invalid property name"),s;e.raise("Invalid property name")}return Ot};function Yi(e){return e===100||e===68||e===115||e===83||e===119||e===87}c.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,s),q}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,r)}return Ot};c.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){se(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value")};c.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return q;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return L;e.raise("Invalid property name")};c.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Bt(t=e.current());)e.lastStringValue+=K(t),e.advance();return e.lastStringValue!==""};function Bt(e){return Rt(e)||e===95}c.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";$i(t=e.current());)e.lastStringValue+=K(t),e.advance();return e.lastStringValue!==""};function $i(e){return Bt(e)||ge(e)}c.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};c.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===L&&e.raise("Negated character class may contain strings"),!0}return!1};c.regexp_classContents=function(e){return e.current()===93?q:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),q)};c.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class")}}};c.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var i=e.current();(i===99||Mt(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var s=e.current();return s!==93?(e.lastIntValue=s,e.advance(),!0):!1};c.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};c.regexp_classSetExpression=function(e){var t=q,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===L&&(t=L);for(var s=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==L&&(t=q);continue}e.raise("Invalid character in character class")}if(s!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(s!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===L&&(t=L)}};c.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var s=e.lastIntValue;return i!==-1&&s!==-1&&i>s&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1};c.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?q:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};c.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),s=this.regexp_classContents(e);if(e.eat(93))return i&&s===L&&e.raise("Negated character class may contain strings"),s;e.pos=t}if(e.eat(92)){var r=this.regexp_eatCharacterClassEscape(e);if(r)return r;e.pos=t}return null};c.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t}return null};c.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===L&&(t=L);return t};c.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?q:L};c.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var i=e.current();return i<0||i===e.lookahead()&&Zi(i)||es(i)?!1:(e.advance(),e.lastIntValue=i,!0)};function Zi(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function es(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}c.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return ts(t)?(e.lastIntValue=t,e.advance(),!0):!1};function ts(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}c.regexp_eatClassControlLetter=function(e){var t=e.current();return ge(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1};c.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1};c.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;ge(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function ge(e){return e>=48&&e<=57}c.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Dt(i=e.current());)e.lastIntValue=16*e.lastIntValue+Ft(i),e.advance();return e.pos!==t};function Dt(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Ft(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}c.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i}else e.lastIntValue=t;return!0}return!1};c.regexp_eatOctalDigit=function(e){var t=e.current();return Mt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function Mt(e){return e>=48&&e<=55}c.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var s=0;s=this.input.length)return this.finishToken(a.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())};v.readToken=function(e){return U(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};v.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};v.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var s=void 0,r=t;(s=ut(this.input,r,this.pos))>-1;)++this.curLine,r=this.lineStart=s;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())};v.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),s=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&ht.test(String.fromCharCode(e)))++this.pos;else break e}}};v.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i)};v.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(a.ellipsis)):(++this.pos,this.finishToken(a.dot))};v.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(a.assign,2):this.finishOp(a.slash,1)};v.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,s=e===42?a.star:a.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,s=a.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(a.assign,i+1):this.finishOp(s,i)};v.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(a.assign,3)}return this.finishOp(e===124?a.logicalOR:a.logicalAND,2)}return t===61?this.finishOp(a.assign,2):this.finishOp(e===124?a.bitwiseOR:a.bitwiseAND,1)};v.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(a.assign,2):this.finishOp(a.bitwiseXOR,1)};v.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||R.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(a.incDec,2):t===61?this.finishOp(a.assign,2):this.finishOp(a.plusMin,1)};v.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(a.assign,i+1):this.finishOp(a.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(a.relational,i))};v.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(a.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(a.arrow)):this.finishOp(e===61?a.eq:a.prefix,1)};v.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(a.questionDot,2)}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61)return this.finishOp(a.assign,3)}return this.finishOp(a.coalesce,2)}}return this.finishOp(a.question,1)};v.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),U(t,!0)||t===92))return this.finishToken(a.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+K(t)+"'")};v.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(a.parenL);case 41:return++this.pos,this.finishToken(a.parenR);case 59:return++this.pos,this.finishToken(a.semi);case 44:return++this.pos,this.finishToken(a.comma);case 91:return++this.pos,this.finishToken(a.bracketL);case 93:return++this.pos,this.finishToken(a.bracketR);case 123:return++this.pos,this.finishToken(a.braceL);case 125:return++this.pos,this.finishToken(a.braceR);case 58:return++this.pos,this.finishToken(a.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(a.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(a.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+K(e)+"'")};v.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};v.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var s=this.input.charAt(this.pos);if(R.test(s)&&this.raise(i,"Unterminated regular expression"),e)e=!1;else{if(s==="[")t=!0;else if(s==="]"&&t)t=!1;else if(s==="/"&&!t)break;e=s==="\\"}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var n=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(n);var u=this.regexpState||(this.regexpState=new M(this));u.reset(i,r,o),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var h=null;try{h=new RegExp(r,o)}catch{}return this.finishToken(a.regexp,{pattern:r,flags:o,value:h})};v.readInt=function(e,t,i){for(var s=this.options.ecmaVersion>=12&&t===void 0,r=i&&this.input.charCodeAt(this.pos)===48,n=this.pos,o=0,u=0,h=0,l=t??1/0;h=97?_=x-97+10:x>=65?_=x-65+10:x>=48&&x<=57?_=x-48:_=1/0,_>=e)break;u=x,o=o*e+_}return s&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||t!=null&&this.pos-n!==t?null:o};function is(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function jt(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}v.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=jt(this.input.slice(t,this.pos)),++this.pos):U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,i)};v.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var s=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&s===110){var r=jt(this.input.slice(t,this.pos));return++this.pos,U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,r)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=!1),s===46&&!i&&(++this.pos,this.readInt(10),s=this.input.charCodeAt(this.pos)),(s===69||s===101)&&!i&&(s=this.input.charCodeAt(++this.pos),(s===43||s===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),U(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=is(this.input.slice(t,this.pos),i);return this.finishToken(a.num,n)};v.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds")}else t=this.readHexChar(4);return t};v.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var s=this.input.charCodeAt(this.pos);if(s===e)break;s===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(!1),i=this.pos):s===8232||s===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(Q(s)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(i,this.pos++),this.finishToken(a.string,t)};var Ut={};v.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Ut)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};v.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Ut;this.raise(e,t)};v.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===a.template||this.type===a.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(a.dollarBraceL)):(++this.pos,this.finishToken(a.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(a.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Q(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=` `;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};v.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Q(t)?"":String.fromCharCode(t)}};v.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos0}var Se=_s;function P(e){var s;let t=e.range?e.range[0]:e.start,i=((s=e.declaration)==null?void 0:s.decorators)??e.decorators;return Se(i)?Math.min(P(i[0]),t):t}function j(e){return e.range?e.range[1]:e.end}function Cs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:ti,locStart:P,locEnd:j,...e}}var _e=Cs;var Ts=(e,t,i)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},We=Ts;function ks(e){return e=new Set(e),t=>e.has(t==null?void 0:t.type)}var ii=ks;var ws=ii(["Block","CommentBlock","MultiLine"]),oe=ws;function Es(e){return oe(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var si=Es;function As(e){let t=`*${e.value}*`.split(` -`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Xe=As;var ue=null;function he(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=he.prototype=null,t}return ue=he.prototype=e??Object.create(null),new he}var Ps=10;for(let e=0;e<=Ps;e++)he();function ze(e){return he(e)}function Is(e,t="type"){ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ri=Is;var ai={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Ns=ri(ai),ni=Ns;function He(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let s=0;s{var u;(u=o.leadingComments)!=null&&u.some(si)&&n.add(P(o))}),e=Ce(e,o=>{if(o.type==="ParenthesizedExpression"){let{expression:u}=o;if(u.type==="TypeCastExpression")return u.range=o.range,u;let h=P(o);if(!n.has(h))return u.extra={...u.extra,parenthesized:!0},u}})}if(e=Ce(e,n=>{switch(n.type){case"LogicalExpression":if(oi(n))return Qe(n);break;case"VariableDeclaration":{let o=We(!1,n.declarations,-1);o!=null&&o.init&&r(n,o);break}case"TSParenthesizedType":return n.typeAnnotation;case"TSTypeParameter":if(typeof n.name=="string"){let o=P(n);n.name={type:"Identifier",name:n.name,range:[o,o+n.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:o}=n;if(i==="meriyah"&&(o==null?void 0:o.type)==="Identifier"){let u=s.slice(P(o),j(o));(u.startsWith('"')||u.startsWith("'"))&&(n.exported={...n.exported,type:"Literal",value:n.exported.name,raw:u})}break}case"TSUnionType":case"TSIntersectionType":if(n.types.length===1)return n.types[0];break}}),Se(e.comments)){let n=We(!1,e.comments,-1);for(let o=e.comments.length-2;o>=0;o--){let u=e.comments[o];j(u)===P(n)&&oe(u)&&oe(n)&&Xe(u)&&Xe(n)&&(e.comments.splice(o+1,1),u.value+="*//*"+n.value,u.range=[P(u),j(n)]),n=u}}return e.type==="Program"&&(e.range=[0,s.length]),e;function r(n,o){s[j(o)]!==";"&&(n.range=[P(n),j(o)])}}function oi(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function Qe(e){return oi(e)?Qe({type:"LogicalExpression",operator:e.operator,left:Qe({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[P(e.left),j(e.right.left)]}),right:e.right.right,range:[P(e),j(e)]}):e}var Te=Vs;function Ls(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var ke=Ls;var Rs={ecmaVersion:"latest",allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Os(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return ve(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:s,column:r+1}},cause:e})}var ui,Bs=()=>(ui??(ui=T.extend((0,hi.default)())),ui);function Ds(e,t){let i=Bs(),s=[],r=[],n=i.parse(e,{...Rs,sourceType:t,allowImportExportEverywhere:t==="module",onComment:s,onToken:r});return n.comments=s,n.tokens=r,n}function Fs(e,t={}){let i=ke(t),s=(i?[i]:["module","script"]).map(n=>()=>Ds(e,n)),r;try{r=be(s)}catch({errors:[n]}){throw Os(n)}return Te(r,{text:e})}var pi=_e(Fs);var fi=Pe(Ke(),1);var w={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function Ms(e,t){let i=e[0],s=e[e.length-1],r={type:w.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function Ye(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}Ye.prototype={constructor:Ye,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=w.Identifier,e.value==="static"&&(e.type=w.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=w.Keyword);else if(i===s.privateId)e.type=w.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=w.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=w.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=w.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=w.Boolean:i.keyword==="null"?e.type=w.Null:e.type=w.Keyword;else if(i===s.num)e.type=w.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=w.JSXText):e.type=w.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=w.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(Ms(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var ci=Ye;var $e=[3,5,6,7,8,9,10,11,12,13,14,15];function js(){return $e[$e.length-1]}function Us(e=5){let t=e==="latest"?js():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!$e.includes(t))throw new Error("Invalid ecmaVersion.");return t}function qs(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function li(e){let t=Us(e.ecmaVersion),i=qs(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},u=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:s,locations:r,allowReserved:n,allowReturnOutsideFunction:u})}var z=Symbol("espree's internal state"),Ze=Symbol("espree's esprimaFinishNode");function Js(e,t,i,s,r,n,o){let u;e?u="Block":o.slice(i,i+2)==="#!"?u="Hashbang":u="Line";let h={type:u,value:t};return typeof i=="number"&&(h.start=i,h.end=s,h.range=[i,s]),typeof r=="object"&&(h.loc={start:r,end:n}),h}var et=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(s,r){(typeof s!="object"||s===null)&&(s={}),typeof r!="string"&&!(r instanceof String)&&(r=String(r));let n=s.sourceType,o=li(s),u=o.ecmaFeatures||{},h=o.tokens===!0?new ci(t,r):null,l={originalSourceType:n||o.sourceType,tokens:h?[]:null,comments:o.comment===!0?[]:null,impliedStrict:u.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(x){h&&h.onToken(x,l),x.type!==t.eof&&(l.lastToken=x)},onComment(x,_,B,p,d,m){if(l.comments){let g=Js(x,_,B,p,d,m,r);l.comments.push(g)}}},r),this[z]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let s=this[z],r=s.tokens;return s.comments&&(r.comments=s.comments),r}finishNode(...s){let r=super.finishNode(...s);return this[Ze](r)}finishNodeAt(...s){let r=super.finishNodeAt(...s);return this[Ze](r)}parse(){let s=this[z],r=super.parse();if(r.sourceType=s.originalSourceType,s.comments&&(r.comments=s.comments),s.tokens&&(r.tokens=s.tokens),r.body.length){let[n]=r.body;r.range&&(r.range[0]=n.range[0]),r.loc&&(r.loc.start=n.loc.start),r.start=n.start}return s.lastToken&&(r.range&&(r.range[1]=s.lastToken.range[1]),r.loc&&(r.loc.end=s.lastToken.loc.end),r.end=s.lastToken.end),this[z].templateElements.forEach(n=>{let u=n.tail?1:2;n.start+=-1,n.end+=u,n.range&&(n.range[0]+=-1,n.range[1]+=u),n.loc&&(n.loc.start.column+=-1,n.loc.end.column+=u)}),r}parseTopLevel(s){return this[z].impliedStrict&&(this.strict=!0),super.parseTopLevel(s)}raise(s,r){let n=e.acorn.getLineInfo(this.input,s),o=new SyntaxError(r);throw o.index=s,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(s,r){this.raise(s,r)}unexpected(s){let r="Unexpected token";if(s!=null){if(this.pos=s,this.options.locations)for(;this.posthis.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[z].jsxAttrValueToken=!0),r}[Ze](s){return s.type==="TemplateElement"&&this[z].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var Gs={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=T.extend(et())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=T.extend((0,fi.default)(),et())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function di(e,t){let i=Gs.get(t);return new i(t,e).parse()}var Ks={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function Ws(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:ve(t,{loc:{start:{line:i,column:s}},cause:e})}function Xs(e,t={}){let i=ke(t),s=(i?[i]:["module","script"]).map(n=>()=>di(e,{...Ks,sourceType:n})),r;try{r=be(s)}catch({errors:[n]}){throw Ws(n)}return Te(r,{text:e})}var mi=_e(Xs);var zs={acorn:pi,espree:mi};var ga=tt;export{ga as default,zs as parsers}; +`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return K(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Q(t)?"":String.fromCharCode(t)}};v.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},Ke=cs;function ls(e){return Array.isArray(e)&&e.length>0}var Wt=ls;function P(e){var s,r,n;let t=((s=e.range)==null?void 0:s[0])??e.start,i=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return i?Math.min(P(i),t):t}function j(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function fs(e){let t=new Set(e);return i=>t.has(i==null?void 0:i.type)}var Xt=fs;var ds=Xt(["Block","CommentBlock","MultiLine"]),oe=ds;function ms(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var We=ms;function xs(e){return oe(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var zt=xs;var ue=null;function he(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=he.prototype=null,t}return ue=he.prototype=e??Object.create(null),new he}var ys=10;for(let e=0;e<=ys;e++)he();function Xe(e){return he(e)}function gs(e,t="type"){Xe(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var Ht=gs;var Qt={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var vs=Ht(Qt),Yt=vs;function ze(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let s=0;s{var o;(o=n.leadingComments)!=null&&o.some(zt)&&r.add(P(n))}),e=Se(e,n=>{if(n.type==="ParenthesizedExpression"){let{expression:o}=n;if(o.type==="TypeCastExpression")return o.range=[...n.range],o;let u=P(n);if(!r.has(u))return o.extra={...o.extra,parenthesized:!0},o}})}if(e=Se(e,r=>{var n;switch(r.type){case"LogicalExpression":if($t(r))return He(r);break;case"VariableDeclaration":{let o=Ke(!1,r.declarations,-1);o!=null&&o.init&&s[j(o)]!==";"&&(r.range=[P(r),j(o)]);break}case"TSParenthesizedType":return r.typeAnnotation;case"TSTypeParameter":if(typeof r.name=="string"){let o=P(r);r.name={type:"Identifier",name:r.name,range:[o,o+r.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(i==="meriyah"&&((n=r.exported)==null?void 0:n.type)==="Identifier"){let{exported:o}=r,u=s.slice(P(o),j(o));(u.startsWith('"')||u.startsWith("'"))&&(r.exported={...r.exported,type:"Literal",value:r.exported.name,raw:u})}break;case"TSUnionType":case"TSIntersectionType":if(r.types.length===1)return r.types[0];break}}),Wt(e.comments)){let r=Ke(!1,e.comments,-1);for(let n=e.comments.length-2;n>=0;n--){let o=e.comments[n];j(o)===P(r)&&oe(o)&&oe(r)&&We(o)&&We(r)&&(e.comments.splice(n+1,1),o.value+="*//*"+r.value,o.range=[P(o),j(r)]),r=o}}return e.type==="Program"&&(e.range=[0,s.length]),e}function $t(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function He(e){return $t(e)?He({type:"LogicalExpression",operator:e.operator,left:He({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[P(e.left),j(e.right.left)]}),right:e.right.right,range:[P(e),j(e)]}):e}var _e=bs;var Z=Ae(ai(),1);function Is(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var ni=Is;function Ns(e){let t=ni(e);t&&(e=e.slice(t.length+1));let i=(0,Z.extract)(e),{pragmas:s,comments:r}=(0,Z.parseWithComments)(i);return{shebang:t,text:e,pragmas:s,comments:r}}function oi(e){let{pragmas:t}=Ns(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function Vs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:oi,locStart:P,locEnd:j,...e}}var Ce=Vs;function Ls(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var Te=Ls;var Rs={ecmaVersion:"latest",allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,locations:!0,ranges:!0};function Os(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return ve(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:s,column:r+1}},cause:e})}var ui,Bs=()=>(ui??(ui=T.extend((0,hi.default)())),ui);function Ds(e,t){let i=Bs(),s=[],r=[],n=i.parse(e,{...Rs,sourceType:t,allowImportExportEverywhere:t==="module",onComment:s,onToken:r});return n.comments=s,n.tokens=r,n}function Fs(e,t={}){let i=Te(t),s=(i?[i]:["module","script"]).map(n=>()=>Ds(e,n)),r;try{r=be(s)}catch({errors:[n]}){throw Os(n)}return _e(r,{text:e})}var pi=Ce(Fs);var fi=Ae(Ge(),1);var w={Boolean:"Boolean",EOF:"",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function Ms(e,t){let i=e[0],s=e[e.length-1],r={type:w.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function Qe(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}Qe.prototype={constructor:Qe,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=w.Identifier,e.value==="static"&&(e.type=w.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=w.Keyword);else if(i===s.privateId)e.type=w.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=w.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=w.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=w.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=w.Boolean:i.keyword==="null"?e.type=w.Null:e.type=w.Keyword;else if(i===s.num)e.type=w.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=w.JSXText):e.type=w.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=w.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(Ms(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var ci=Qe;var Ye=[3,5,6,7,8,9,10,11,12,13,14,15];function js(){return Ye[Ye.length-1]}function Us(e=5){let t=e==="latest"?js():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Ye.includes(t))throw new Error("Invalid ecmaVersion.");return t}function qs(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function li(e){let t=Us(e.ecmaVersion),i=qs(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},u=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:s,locations:r,allowReserved:n,allowReturnOutsideFunction:u})}var z=Symbol("espree's internal state"),$e=Symbol("espree's esprimaFinishNode");function Js(e,t,i,s,r,n,o){let u;e?u="Block":o.slice(i,i+2)==="#!"?u="Hashbang":u="Line";let h={type:u,value:t};return typeof i=="number"&&(h.start=i,h.end=s,h.range=[i,s]),typeof r=="object"&&(h.loc={start:r,end:n}),h}var Ze=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(s,r){(typeof s!="object"||s===null)&&(s={}),typeof r!="string"&&!(r instanceof String)&&(r=String(r));let n=s.sourceType,o=li(s),u=o.ecmaFeatures||{},h=o.tokens===!0?new ci(t,r):null,l={originalSourceType:n||o.sourceType,tokens:h?[]:null,comments:o.comment===!0?[]:null,impliedStrict:u.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(x){h&&h.onToken(x,l),x.type!==t.eof&&(l.lastToken=x)},onComment(x,_,B,p,d,m){if(l.comments){let g=Js(x,_,B,p,d,m,r);l.comments.push(g)}}},r),this[z]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let s=this[z],r=s.tokens;return s.comments&&(r.comments=s.comments),r}finishNode(...s){let r=super.finishNode(...s);return this[$e](r)}finishNodeAt(...s){let r=super.finishNodeAt(...s);return this[$e](r)}parse(){let s=this[z],r=super.parse();if(r.sourceType=s.originalSourceType,s.comments&&(r.comments=s.comments),s.tokens&&(r.tokens=s.tokens),r.body.length){let[n]=r.body;r.range&&(r.range[0]=n.range[0]),r.loc&&(r.loc.start=n.loc.start),r.start=n.start}return s.lastToken&&(r.range&&(r.range[1]=s.lastToken.range[1]),r.loc&&(r.loc.end=s.lastToken.loc.end),r.end=s.lastToken.end),this[z].templateElements.forEach(n=>{let u=n.tail?1:2;n.start+=-1,n.end+=u,n.range&&(n.range[0]+=-1,n.range[1]+=u),n.loc&&(n.loc.start.column+=-1,n.loc.end.column+=u)}),r}parseTopLevel(s){return this[z].impliedStrict&&(this.strict=!0),super.parseTopLevel(s)}raise(s,r){let n=e.acorn.getLineInfo(this.input,s),o=new SyntaxError(r);throw o.index=s,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(s,r){this.raise(s,r)}unexpected(s){let r="Unexpected token";if(s!=null){if(this.pos=s,this.options.locations)for(;this.posthis.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[z].jsxAttrValueToken=!0),r}[$e](s){return s.type==="TemplateElement"&&this[z].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var Gs={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=T.extend(Ze())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=T.extend((0,fi.default)(),Ze())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function di(e,t){let i=Gs.get(t);return new i(t,e).parse()}var Ks={ecmaVersion:"latest",range:!0,loc:!0,comment:!0,tokens:!0,sourceType:"module",ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function Ws(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:ve(t,{loc:{start:{line:i,column:s}},cause:e})}function Xs(e,t={}){let i=Te(t),s=(i?[i]:["module","script"]).map(n=>()=>di(e,{...Ks,sourceType:n})),r;try{r=be(s)}catch({errors:[n]}){throw Ws(n)}return _e(r,{text:e})}var mi=Ce(Xs);var zs={acorn:pi,espree:mi};var ya=et;export{ya as default,zs as parsers}; diff --git a/node_modules/prettier/plugins/angular.js b/node_modules/prettier/plugins/angular.js index c9a63fe..228d294 100644 --- a/node_modules/prettier/plugins/angular.js +++ b/node_modules/prettier/plugins/angular.js @@ -1,2 +1 @@ -(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var Se=Object.defineProperty;var Ut=Object.getOwnPropertyDescriptor;var Gt=Object.getOwnPropertyNames;var Dt=Object.prototype.hasOwnProperty;var Vt=(r,e,t)=>e in r?Se(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Xe=(r,e)=>{for(var t in e)Se(r,t,{get:e[t],enumerable:!0})},Wt=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Gt(e))!Dt.call(r,n)&&n!==t&&Se(r,n,{get:()=>e[n],enumerable:!(s=Ut(e,n))||s.enumerable});return r};var Qt=r=>Wt(Se({},"__esModule",{value:!0}),r);var Ze=(r,e,t)=>(Vt(r,typeof e!="symbol"?e+"":e,t),t),Je=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var Ke=(r,e,t)=>(Je(r,e,"read from private field"),t?t.call(r):e.get(r)),Ye=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},et=(r,e,t,s)=>(Je(r,e,"write to private field"),s?s.call(r,t):e.set(r,t),t);var Wr={};Xe(Wr,{parsers:()=>qe});var qe={};Xe(qe,{__ng_action:()=>Ur,__ng_binding:()=>Gr,__ng_directive:()=>Vr,__ng_interpolation:()=>Dr});var we=` -`,tt="\r",rt=function(){function r(e){this.length=e.length;for(var t=[0],s=0;sthis.length)return null;for(var t=0,s=this.offsets;s[t+1]<=e;)t++;var n=e-s[t];return{line:t,column:n}},r.prototype.indexForLocation=function(e){var t=e.line,s=e.column;return t<0||t>=this.offsets.length||s<0||s>this.lengthOfLine(t)?null:this.offsets[t]+s},r.prototype.lengthOfLine=function(e){var t=this.offsets[e],s=e===this.offsets.length-1?this.length:this.offsets[e+1];return s-t},r}();var D=class{constructor(e,t,s,n){this.input=t,this.errLocation=s,this.ctxLocation=n,this.message=`Parser Error: ${e} ${s} [${t}] in ${n}`}},R=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new N(e+this.start,e+this.end)}},w=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},V=class extends w{constructor(e,t,s){super(e,t),this.nameSpan=s}},C=class extends w{visit(e,t=null){}},L=class extends w{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},ye=class extends L{visit(e,t=null){var s;return(s=e.visitThisReceiver)==null?void 0:s.call(e,this,t)}},W=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},Q=class extends w{constructor(e,t,s,n,i){super(e,t),this.condition=s,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},K=class extends V{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},H=class extends V{constructor(e,t,s,n,i,a){super(e,t,s),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},z=class extends V{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},q=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},j=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},X=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Z=class extends V{constructor(e,t,s,n,i,a){super(e,t,a),this.exp=s,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},A=class extends w{constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},J=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},Y=class extends w{constructor(e,t,s,n){super(e,t),this.keys=s,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},Ee=class extends w{constructor(e,t,s,n){super(e,t),this.strings=s,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},$=class extends w{constructor(e,t,s,n,i){super(e,t),this.operation=s,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},B=class r extends ${static createMinus(e,t,s){return new r(e,t,"-",s,"-",new A(e,t,0),s)}static createPlus(e,t,s){return new r(e,t,"+",s,"-",s,new A(e,t,0))}constructor(e,t,s,n,i,a,h){super(e,t,i,a,h),this.operator=s,this.expr=n,this.left=null,this.right=null,this.operation=null}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},ee=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},te=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},re=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},se=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},N=class{constructor(e,t){this.start=e,this.end=t}},P=class extends w{constructor(e,t,s,n,i){super(new R(0,t===null?0:t.length),new N(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=s,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},T=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},ne=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},Ce=class{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitAll(e,t){for(let s of e)this.visit(s,t)}};var st;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION"})(st||(st={}));function nt(r){return r>=9&&r<=32||r==160}function b(r){return 48<=r&&r<=57}function it(r){return r>=97&&r<=122||r>=65&&r<=90}function Be(r){return r===39||r===34||r===96}var d;(function(r){r[r.Character=0]="Character",r[r.Identifier=1]="Identifier",r[r.PrivateIdentifier=2]="PrivateIdentifier",r[r.Keyword=3]="Keyword",r[r.String=4]="String",r[r.Operator=5]="Operator",r[r.Number=6]="Number",r[r.Error=7]="Error"})(d||(d={}));var yr=["var","let","as","null","undefined","true","false","if","else","this"],le=class{tokenize(e){let t=new Me(e),s=[],n=t.scanToken();for(;n!=null;)s.push(n),n=t.scanToken();return s}},O=class{constructor(e,t,s,n,i){this.index=e,this.end=t,this.type=s,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==d.Character&&this.numValue==e}isNumber(){return this.type==d.Number}isString(){return this.type==d.String}isOperator(e){return this.type==d.Operator&&this.strValue==e}isIdentifier(){return this.type==d.Identifier}isPrivateIdentifier(){return this.type==d.PrivateIdentifier}isKeyword(){return this.type==d.Keyword}isKeywordLet(){return this.type==d.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==d.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==d.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==d.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==d.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==d.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==d.Keyword&&this.strValue=="this"}isError(){return this.type==d.Error}toNumber(){return this.type==d.Number?this.numValue:-1}toString(){switch(this.type){case d.Character:case d.Identifier:case d.Keyword:case d.Operator:case d.PrivateIdentifier:case d.String:case d.Error:return this.strValue;case d.Number:return this.numValue.toString();default:return null}}};function pt(r,e,t){return new O(r,e,d.Character,t,String.fromCharCode(t))}function Er(r,e,t){return new O(r,e,d.Identifier,0,t)}function Cr(r,e,t){return new O(r,e,d.PrivateIdentifier,0,t)}function Ar(r,e,t){return new O(r,e,d.Keyword,0,t)}function _e(r,e,t){return new O(r,e,d.Operator,0,t)}function $r(r,e,t){return new O(r,e,d.String,0,t)}function Or(r,e,t){return new O(r,e,d.Number,t,"")}function Ir(r,e,t){return new O(r,e,d.Error,0,t)}var Ie=new O(-1,-1,d.Character,0,""),Me=class{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,s=this.peek,n=this.index;for(;s<=32;)if(++n>=t){s=0;break}else s=e.charCodeAt(n);if(this.peek=s,this.index=n,n>=t)return null;if(ut(s))return this.scanIdentifier();if(b(s))return this.scanNumber(n);let i=n;switch(s){case 46:return this.advance(),b(this.peek)?this.scanNumber(i):pt(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,s);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(s));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;nt(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),pt(e,this.index,t)}scanOperator(e,t){return this.advance(),_e(e,this.index,t)}scanComplexOperator(e,t,s,n,i,a){this.advance();let h=t;return this.peek==s&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),_e(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();lt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return yr.indexOf(t)>-1?Ar(e,this.index,t):Er(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!ut(this.peek))return this.error("Invalid character [#]",-1);for(;lt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Cr(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!b(this.peek))if(this.peek===95){if(!b(this.input.charCodeAt(this.index-1))||!b(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)t=!1;else if(Nr(this.peek)){if(this.advance(),kr(this.peek)&&this.advance(),!b(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);s&&(n=n.replace(/_/g,""));let i=t?Rr(n):parseFloat(n);return Or(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let s="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){s+=i.substring(n,this.index);let h;if(this.advance(),this.peek==117){let g=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(g))h=parseInt(g,16);else return this.error(`Invalid unicode escape [\\u${g}]`,0);for(let f=0;f<5;f++)this.advance()}else h=Pr(this.peek),this.advance();s+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),$r(e,this.index,s+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),_e(e,this.index,t)}error(e,t){let s=this.index+t;return Ir(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}};function ut(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function lt(r){return it(r)||b(r)||r==95||r==36}function Nr(r){return r==101||r==69}function kr(r){return r==45||r==43}function Pr(r){switch(r){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return r}}function Rr(r){let e=parseInt(r);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+r);return e}var Lr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function vt(r,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${r}' to be an array, [start, end].`);if(e!=null){let t=e[0],s=e[1];Lr.forEach(n=>{if(n.test(t)||n.test(s))throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`)})}}var Ue=class r{static fromArray(e){return e?(vt("interpolation",e),new r(e[0],e[1])):F}constructor(e,t){this.start=e,this.end=t}},F=new Ue("{{","}}");var Ge=class{constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},De=class{constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},fe=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,s,n,i=F){this._checkNoInterpolation(e,s,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),g=1;t&&(g|=2);let f=new U(e,s,n,h,g,this.errors,0).parseChain();return new P(f,e,s,n,this.errors)}parseBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n);return new P(i,e,t,s,this.errors)}checkSimpleExpression(e){let t=new Ve;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new P(i,e,t,s,this.errors)}_reportError(e,t,s,n){this.errors.push(new D(e,t,s,n))}_parseBindingAst(e,t,s,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new U(e,t,s,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,s,n,i){let a=this._lexer.tokenize(t);return new U(t,s,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new N(n,n+e.length)})}parseInterpolation(e,t,s,n,i=F){let{strings:a,expressions:h,offsets:g}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let f=[];for(let y=0;yy.text),f,e,t,s)}parseInterpolationExpression(e,t,s){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new U(e,t,s,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,s)}createInterpolationAst(e,t,s,n,i){let a=new R(0,s.length),h=new Ee(a,a.toAbsolute(i),e,t);return new P(h,s,n,i,this.errors)}splitInterpolation(e,t,s,n=F){let i=[],a=[],h=[],g=s?br(s):null,f=0,y=!1,E=!1,{start:m,end:o}=n;for(;f-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${s}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,s){for(let n of this._forEachUnquotedChar(e,s)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let s=null,n=0;for(let i=t;i=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let n=s;s=e,e=n}return new R(e,s)}sourceSpan(e,t){let s=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(e,t){this.context|=e;let s=t();return this.context^=e,s}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error(`Missing expected ${String.fromCharCode(e)}`)}consumeOptionalOperator(e){return this.next.isOperator(e)?(this.advance(),!0):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Ie?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new $(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==d.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new $(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==d.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new $(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parsePrefix(){if(this.next.type==d.Operator){let e=this.inputIndex,t=this.next.strValue,s;switch(t){case"+":return this.advance(),s=this.parsePrefix(),B.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),B.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new ee(this.span(e),this.sourceSpan(e),s)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMember(t,e,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?t=this.parseCall(t,e,!0):t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMember(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40))t=this.parseCall(t,e,!1);else if(this.consumeOptionalOperator("!"))t=new te(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new A(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new A(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new A(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new A(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new ye(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new J(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new L(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new A(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new A(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new C(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new C(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new C(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),g=this.sourceSpan(n);t.push(new K(h,g,g,new L(h,g),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new Y(this.span(s),this.sourceSpan(s),e,t)}parseAccessMember(e,t,s){let n=this.inputIndex,i=this.withContext(pe.Writable,()=>{let g=this.expectIdentifierOrKeyword()??"";return g.length===0&&this.error("Expected identifier for property access",e.span.end),g}),a=this.sourceSpan(n),h;if(s)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new C(this.span(t),this.sourceSpan(t))):h=new z(this.span(t),this.sourceSpan(t),a,e,i);else if(this.consumeOptionalAssignment()){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new C(this.span(t),this.sourceSpan(t));let g=this.parseConditional();h=new H(this.span(t),this.sourceSpan(t),a,e,i,g)}else h=new K(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,s){let n=this.inputIndex;this.rparensExpected++;let i=this.parseCallArguments(),a=this.span(n,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let h=this.span(t),g=this.sourceSpan(t);return s?new se(h,g,e,i,a):new re(h,g,e,i,a)}consumeOptionalAssignment(){return this.parseFlags&2&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new N(s,s+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof C&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(s)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new X(this.span(t),this.sourceSpan(t),e,n,i)}else return s?new j(this.span(t),this.sourceSpan(t),e,n):new q(this.span(t),this.sourceSpan(t),e,n);return new C(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let s=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new N(e.span.start,n);return t.push(new ne(a,e,s)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Ie||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,n=this.input.substring(t,s);return new P(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new N(e.span.start,this.currentAbsoluteOffset);return new T(s,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new N(e,this.currentAbsoluteOffset);return new T(n,t,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new D(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),eh+g.length,0);s+=a,t+=a}e.set(s,t),n++}return e}var mt="angular-estree-parser",Qe="NgEstreeParser",We=0,Ne=[mt,We];function St(){return new fe(new le)}function ke(r,e){let t=St(),{astInput:s,comments:n}=Br(r,t),{ast:i,errors:a}=e(s,t);return $t(a),{ast:i,comments:n}}function wt(r){return ke(r,(e,t)=>t.parseBinding(e,...Ne))}function yt(r){return ke(r,(e,t)=>t.parseSimpleBinding(e,...Ne))}function Et(r){return ke(r,(e,t)=>t.parseAction(e,!1,...Ne))}function Ct(r){return ke(r,(e,t)=>{let s=t.parseInterpolationExpression(e,...Ne);return s.ast=s.ast.expressions[0],s})}function At(r){let e=St(),{templateBindings:t,errors:s}=e.parseTemplateBindings(Qe,r,mt,We,We);return $t(s),t}function $t(r){if(r.length!==0){let[{message:e}]=r;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function Br(r,e){let t=e._commentStart(r);return t===null?{astInput:r,comments:[]}:{astInput:r.slice(0,t),comments:[{type:"Comment",value:r.slice(t+2),sourceSpan:{start:t,end:r.length}}]}}function Ot(r){return r instanceof B?"Unary":r instanceof $?"Binary":r instanceof Z?"BindingPipe":r instanceof re?"Call":r instanceof W?"Chain":r instanceof Q?"Conditional":r instanceof C?"EmptyExpr":r instanceof L?"ImplicitReceiver":r instanceof q?"KeyedRead":r instanceof j?"SafeKeyedRead":r instanceof X?"KeyedWrite":r instanceof J?"LiteralArray":r instanceof Y?"LiteralMap":r instanceof A?"LiteralPrimitive":r instanceof te?"NonNullAssert":r instanceof ee?"PrefixNot":r instanceof K?"PropertyRead":r instanceof H?"PropertyWrite":r instanceof se?"SafeCall":r instanceof z?"SafePropertyRead":r.type}function gt({start:r,end:e},t){let s=r,n=e;for(;n!==s&&/\s/.test(t[n-1]);)n--;for(;s!==n&&/\s/.test(t[s]);)s++;return{start:s,end:n}}function Tr({start:r,end:e},t){let s=r,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;s!==0&&/\s/.test(t[s-1]);)s--;return{start:s,end:n}}function _r(r,e){return e[r.start-1]==="("&&e[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function It(r,e,t){let s=0,n={start:r.start,end:r.end};for(;;){let i=Tr(n,e),a=_r(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,s++}return{hasParens:(t?s-1:s)!==0,outerSpan:gt(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:gt(r,e)}}function Nt(r){return typeof r=="string"?e=>e===r:e=>r.test(e)}function kt(r,e,t){let s=Nt(e);for(let n=t;n>=0;n--){let i=r[n];if(s(i))return n}throw new Error(`Cannot find front char ${e} from index ${t} in ${JSON.stringify(r)}`)}function Pt(r,e,t){let s=Nt(e);for(let n=t;n{if(!(r&&e==null))return Array.isArray(e)||typeof e=="string"?e[t<0?e.length+t:t]:e.at(t)},Pe=Mr;var G=(r,e,t=!1)=>{let s=Ot(r);switch(s){case"Unary":{let{operator:o,expr:u}=r,v=n(u);return a("UnaryExpression",{prefix:!0,argument:v,operator:o},r.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:o,operation:u,right:v}=r,c=n(o),x=n(v);return a(u==="&&"||u==="||"||u==="??"?"LogicalExpression":"BinaryExpression",{left:c,right:x,operator:u},{start:E(c),end:m(x)},{hasParentParens:t})}case"BindingPipe":{let{exp:o,name:u,args:v}=r,c=n(o),x=e.getCharacterIndex(/\S/,e.getCharacterIndex("|",m(c))+1),l=a("Identifier",{name:u},{start:x,end:x+u.length}),p=v.map(n);return a("NGPipeExpression",{left:c,right:l,arguments:p},{start:E(c),end:m(p.length===0?l:Pe(!1,p,-1))},{hasParentParens:t})}case"Chain":{let{expressions:o}=r;return a("NGChainedExpression",{expressions:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:o}=r;return a("CommentLine",{value:o},r.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:o,trueExp:u,falseExp:v}=r,c=n(o),x=n(u),l=n(v);return a("ConditionalExpression",{test:c,consequent:x,alternate:l},{start:E(c),end:m(l)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},r.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},r.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let o=s==="SafeKeyedRead",{key:u}=r,v=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,c=n(u);return h(v,c,{computed:!0,optional:o},{end:r.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:o}=r;return a("ArrayExpression",{elements:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:o,values:u}=r,v=u.map(x=>n(x)),c=o.map(({key:x,quoted:l},p)=>{let k=v[p],S=E(k),I=m(k),ue=e.getCharacterIndex(/\S/,p===0?r.sourceSpan.start+1:e.getCharacterIndex(",",m(v[p-1]))+1),Mt=S===ue?I:e.getCharacterLastIndex(/\S/,e.getCharacterLastIndex(":",S-1)-1)+1,je={start:ue,end:Mt},me=l?a("StringLiteral",{value:x},je):a("Identifier",{name:x},je),Ft=me.end=o.sourceSpan.end||/^\s+$/.test(e.text.slice(o.sourceSpan.start,o.sourceSpan.end))}function f(o){return(o.type==="OptionalCallExpression"||o.type==="OptionalMemberExpression")&&!y(o)}function y(o){return o.extra&&o.extra.parenthesized}function E(o){return y(o)?o.extra.parenStart:o.start}function m(o){return y(o)?o.extra.parenEnd:o.end}};function Re(r,e,t=!1,s=!1){if(!t){let{start:h,end:g}=r;return{start:h,end:g,loc:{filename:"",identifierName:"",start:e.locationForIndex(h),end:e.locationForIndex(g)}}}let{outerSpan:n,innerSpan:i,hasParens:a}=It(r,e.text,s);return{start:i.start,end:i.end,loc:{filename:"",identifierName:"",start:e.locationForIndex(i.start),end:e.locationForIndex(i.end)},...a&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}function Lt(r,e){r.forEach(o);let[t]=r,{key:s}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?r.slice(1):r,i=[],a=null;for(let c=0;c({...I,...Re({start:I.start,end:ue},e)}),k=I=>({...p(I,l.end),alias:l}),S=i.pop();if(S.type==="NGMicrosyntaxExpression")i.push(k(S));else if(S.type==="NGMicrosyntaxKeyedExpression"){let I=k(S.expression);i.push(p({...S,expression:I},I.end))}else throw new Error(`Unexpected type ${S.type}`)}else i.push(h(x,c));a=x}return f("NGMicrosyntax",{body:i},i.length===0?r[0].sourceSpan:{start:i[0].start,end:Pe(!1,i,-1).end});function h(c,x){if(E(c)){let{key:l,value:p}=c;return p?x===0?f("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan):f("NGMicrosyntaxKeyedExpression",{key:f("NGMicrosyntaxKey",{name:y(l.source)},l.span),expression:f("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan)},{start:l.span.start,end:p.sourceSpan.end}):f("NGMicrosyntaxKey",{name:y(l.source)},l.span)}else{let{key:l,sourceSpan:p}=c;if(/^let\s$/.test(e.text.slice(p.start,p.start+4))){let{value:S}=c;return f("NGMicrosyntaxLet",{key:f("NGMicrosyntaxKey",{name:l.source},l.span),value:S?f("NGMicrosyntaxKey",{name:S.source},S.span):null},{start:p.start,end:S?S.span.end:l.span.end})}else{let S=v(c);return f("NGMicrosyntaxAs",{key:f("NGMicrosyntaxKey",{name:S.source},S.span),alias:f("NGMicrosyntaxKey",{name:l.source},l.span)},{start:S.span.start,end:l.span.end})}}}function g(c){return G(c,e)}function f(c,x,l,p=!0){return{type:c,...Re(l,e,p),...x}}function y(c){return Rt(c.slice(s.source.length))}function E(c){return c instanceof ne}function m(c){return c instanceof T}function o(c){u(c.key.span),m(c)&&c.value&&u(c.value.span)}function u(c){if(e.text[c.start]!=='"'&&e.text[c.start]!=="'")return;let x=e.text[c.start],l=!1;for(let p=c.start+1;p{let{ast:t,comments:s}=r(e),n=new ve(e),i=G(t,n);return i.comments=s.map(a=>G(a,n)),i}}var bt=Le(wt),As=Le(yt),Kt=Le(Ct),He=Le(Et),Bt=r=>Lt(At(r),new ve(r));function Fr(r){return Array.isArray(r)&&r.length>0}var Tt=Fr;function ze(r){var s;let e=r.range?r.range[0]:r.start,t=((s=r.declaration)==null?void 0:s.decorators)??r.decorators;return Tt(t)?Math.min(ze(t[0]),e):e}function _t(r){return r.range?r.range[1]:r.end}function be(r){return{astFormat:"estree",parse(e){let t=r(e);return{type:"NGRoot",node:r===He&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:ze,locEnd:_t}}var Ur=be(He),Gr=be(bt),Dr=be(Kt),Vr=be(Bt);return Qt(Wr);}); \ No newline at end of file +(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var Pe=Object.defineProperty;var Rt=Object.getOwnPropertyDescriptor;var Pt=Object.getOwnPropertyNames;var Lt=Object.prototype.hasOwnProperty;var ze=(r,e)=>{for(var t in e)Pe(r,t,{get:e[t],enumerable:!0})},Kt=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Pt(e))!Lt.call(r,n)&&n!==t&&Pe(r,n,{get:()=>e[n],enumerable:!(s=Rt(e,n))||s.enumerable});return r};var bt=r=>Kt(Pe({},"__esModule",{value:!0}),r);var Lr={};ze(Lr,{parsers:()=>Qe});var Qe={};ze(Qe,{__ng_action:()=>Ir,__ng_binding:()=>kr,__ng_directive:()=>Pr,__ng_interpolation:()=>Rr});var G=class{constructor(e,t,s,n){this.input=t,this.errLocation=s,this.ctxLocation=n,this.message=`Parser Error: ${e} ${s} [${t}] in ${n}`}},P=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new I(e+this.start,e+this.end)}},w=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},W=class extends w{constructor(e,t,s){super(e,t),this.nameSpan=s}},$=class extends w{visit(e,t=null){}},L=class extends w{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},Se=class extends L{visit(e,t=null){var s;return(s=e.visitThisReceiver)==null?void 0:s.call(e,this,t)}},V=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},Q=class extends w{constructor(e,t,s,n,i){super(e,t),this.condition=s,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},b=class extends W{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},H=class extends W{constructor(e,t,s,n,i,a){super(e,t,s),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},z=class extends W{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},q=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},j=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},X=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Y=class extends W{constructor(e,t,s,n,i,a){super(e,t,a),this.exp=s,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},C=class extends w{constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},Z=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},J=class extends w{constructor(e,t,s,n){super(e,t),this.keys=s,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},me=class extends w{constructor(e,t,s,n){super(e,t),this.strings=s,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},A=class extends w{constructor(e,t,s,n,i){super(e,t),this.operation=s,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},B=class r extends A{static createMinus(e,t,s){return new r(e,t,"-",s,"-",new C(e,t,0),s)}static createPlus(e,t,s){return new r(e,t,"+",s,"-",s,new C(e,t,0))}constructor(e,t,s,n,i,a,h){super(e,t,i,a,h),this.operator=s,this.expr=n,this.left=null,this.right=null,this.operation=null}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},ee=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},te=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},re=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},se=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},I=class{constructor(e,t){this.start=e,this.end=t}},R=class extends w{constructor(e,t,s,n,i){super(new P(0,t===null?0:t.length),new I(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=s,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},T=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},ne=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},we=class{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitAll(e,t){for(let s of e)this.visit(s,t)}};var qe;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION",r[r.TWO_WAY=3]="TWO_WAY"})(qe||(qe={}));function je(r){return r>=9&&r<=32||r==160}function K(r){return 48<=r&&r<=57}function Xe(r){return r>=97&&r<=122||r>=65&&r<=90}function Le(r){return r===39||r===34||r===96}var f;(function(r){r[r.Character=0]="Character",r[r.Identifier=1]="Identifier",r[r.PrivateIdentifier=2]="PrivateIdentifier",r[r.Keyword=3]="Keyword",r[r.String=4]="String",r[r.Operator=5]="Operator",r[r.Number=6]="Number",r[r.Error=7]="Error"})(f||(f={}));var pr=["var","let","as","null","undefined","true","false","if","else","this"],le=class{tokenize(e){let t=new Be(e),s=[],n=t.scanToken();for(;n!=null;)s.push(n),n=t.scanToken();return s}},O=class{constructor(e,t,s,n,i){this.index=e,this.end=t,this.type=s,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==f.Character&&this.numValue==e}isNumber(){return this.type==f.Number}isString(){return this.type==f.String}isOperator(e){return this.type==f.Operator&&this.strValue==e}isIdentifier(){return this.type==f.Identifier}isPrivateIdentifier(){return this.type==f.PrivateIdentifier}isKeyword(){return this.type==f.Keyword}isKeywordLet(){return this.type==f.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==f.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==f.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==f.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==f.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==f.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==f.Keyword&&this.strValue=="this"}isError(){return this.type==f.Error}toNumber(){return this.type==f.Number?this.numValue:-1}toString(){switch(this.type){case f.Character:case f.Identifier:case f.Keyword:case f.Operator:case f.PrivateIdentifier:case f.String:case f.Error:return this.strValue;case f.Number:return this.numValue.toString();default:return null}}};function tt(r,e,t){return new O(r,e,f.Character,t,String.fromCharCode(t))}function ur(r,e,t){return new O(r,e,f.Identifier,0,t)}function lr(r,e,t){return new O(r,e,f.PrivateIdentifier,0,t)}function xr(r,e,t){return new O(r,e,f.Keyword,0,t)}function be(r,e,t){return new O(r,e,f.Operator,0,t)}function dr(r,e,t){return new O(r,e,f.String,0,t)}function fr(r,e,t){return new O(r,e,f.Number,t,"")}function vr(r,e,t){return new O(r,e,f.Error,0,t)}var Ce=new O(-1,-1,f.Character,0,""),Be=class{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,s=this.peek,n=this.index;for(;s<=32;)if(++n>=t){s=0;break}else s=e.charCodeAt(n);if(this.peek=s,this.index=n,n>=t)return null;if(rt(s))return this.scanIdentifier();if(K(s))return this.scanNumber(n);let i=n;switch(s){case 46:return this.advance(),K(this.peek)?this.scanNumber(i):tt(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,s);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(s));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;je(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),tt(e,this.index,t)}scanOperator(e,t){return this.advance(),be(e,this.index,t)}scanComplexOperator(e,t,s,n,i,a){this.advance();let h=t;return this.peek==s&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),be(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();st(this.peek);)this.advance();let t=this.input.substring(e,this.index);return pr.indexOf(t)>-1?xr(e,this.index,t):ur(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!rt(this.peek))return this.error("Invalid character [#]",-1);for(;st(this.peek);)this.advance();let t=this.input.substring(e,this.index);return lr(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!K(this.peek))if(this.peek===95){if(!K(this.input.charCodeAt(this.index-1))||!K(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)t=!1;else if(gr(this.peek)){if(this.advance(),Sr(this.peek)&&this.advance(),!K(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);s&&(n=n.replace(/_/g,""));let i=t?wr(n):parseFloat(n);return fr(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let s="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){s+=i.substring(n,this.index);let h;if(this.advance(),this.peek==117){let g=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(g))h=parseInt(g,16);else return this.error(`Invalid unicode escape [\\u${g}]`,0);for(let d=0;d<5;d++)this.advance()}else h=mr(this.peek),this.advance();s+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),dr(e,this.index,s+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),be(e,this.index,t)}error(e,t){let s=this.index+t;return vr(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}};function rt(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function st(r){return Xe(r)||K(r)||r==95||r==36}function gr(r){return r==101||r==69}function Sr(r){return r==45||r==43}function mr(r){switch(r){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return r}}function wr(r){let e=parseInt(r);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+r);return e}var yr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function ot(r,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${r}' to be an array, [start, end].`);if(e!=null){let t=e[0],s=e[1];yr.forEach(n=>{if(n.test(t)||n.test(s))throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`)})}}var _e=class r{static fromArray(e){return e?(ot("interpolation",e),new r(e[0],e[1])):F}constructor(e,t){this.start=e,this.end=t}},F=new _e("{{","}}");var Me=class{constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},Fe=class{constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},fe=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,s,n,i=F){this._checkNoInterpolation(e,s,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),g=1;t&&(g|=2);let d=new U(e,s,n,h,g,this.errors,0).parseChain();return new R(d,e,s,n,this.errors)}parseBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n);return new R(i,e,t,s,this.errors)}checkSimpleExpression(e){let t=new Ue;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new R(i,e,t,s,this.errors)}_reportError(e,t,s,n){this.errors.push(new G(e,t,s,n))}_parseBindingAst(e,t,s,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new U(e,t,s,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,s,n,i){let a=this._lexer.tokenize(t);return new U(t,s,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new I(n,n+e.length)})}parseInterpolation(e,t,s,n,i=F){let{strings:a,expressions:h,offsets:g}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let d=[];for(let y=0;yy.text),d,e,t,s)}parseInterpolationExpression(e,t,s){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new U(e,t,s,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,s)}createInterpolationAst(e,t,s,n,i){let a=new P(0,s.length),h=new me(a,a.toAbsolute(i),e,t);return new R(h,s,n,i,this.errors)}splitInterpolation(e,t,s,n=F){let i=[],a=[],h=[],g=s?Er(s):null,d=0,y=!1,E=!1,{start:S,end:o}=n;for(;d-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${s}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,s){for(let n of this._forEachUnquotedChar(e,s)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let s=null,n=0;for(let i=t;i=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let n=s;s=e,e=n}return new P(e,s)}sourceSpan(e,t){let s=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(e,t){this.context|=e;let s=t();return this.context^=e,s}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error(`Missing expected ${String.fromCharCode(e)}`)}consumeOptionalOperator(e){return this.next.isOperator(e)?(this.advance(),!0):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Ce?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new A(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new A(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new A(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parsePrefix(){if(this.next.type==f.Operator){let e=this.inputIndex,t=this.next.strValue,s;switch(t){case"+":return this.advance(),s=this.parsePrefix(),B.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),B.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new ee(this.span(e),this.sourceSpan(e),s)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMember(t,e,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?t=this.parseCall(t,e,!0):t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMember(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40))t=this.parseCall(t,e,!1);else if(this.consumeOptionalOperator("!"))t=new te(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new C(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new C(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new C(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new C(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Se(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Z(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new L(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new C(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new C(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new $(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new $(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new $(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),g=this.sourceSpan(n);t.push(new b(h,g,g,new L(h,g),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new J(this.span(s),this.sourceSpan(s),e,t)}parseAccessMember(e,t,s){let n=this.inputIndex,i=this.withContext(pe.Writable,()=>{let g=this.expectIdentifierOrKeyword()??"";return g.length===0&&this.error("Expected identifier for property access",e.span.end),g}),a=this.sourceSpan(n),h;if(s)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new $(this.span(t),this.sourceSpan(t))):h=new z(this.span(t),this.sourceSpan(t),a,e,i);else if(this.consumeOptionalAssignment()){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new $(this.span(t),this.sourceSpan(t));let g=this.parseConditional();h=new H(this.span(t),this.sourceSpan(t),a,e,i,g)}else h=new b(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,s){let n=this.inputIndex;this.rparensExpected++;let i=this.parseCallArguments(),a=this.span(n,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let h=this.span(t),g=this.sourceSpan(t);return s?new se(h,g,e,i,a):new re(h,g,e,i,a)}consumeOptionalAssignment(){return this.parseFlags&2&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new I(s,s+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof $&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(s)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new X(this.span(t),this.sourceSpan(t),e,n,i)}else return s?new j(this.span(t),this.sourceSpan(t),e,n):new q(this.span(t),this.sourceSpan(t),e,n);return new $(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let s=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new I(e.span.start,n);return t.push(new ne(a,e,s)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Ce||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,n=this.input.substring(t,s);return new R(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new I(e.span.start,this.currentAbsoluteOffset);return new T(s,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new I(e,this.currentAbsoluteOffset);return new T(n,t,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new G(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),eh+g.length,0);s+=a,t+=a}e.set(s,t),n++}return e}var ht="angular-estree-parser",Ge="NgEstreeParser",De=0,Ae=[ht,De];function pt(){return new fe(new le)}function Oe(r,e){let t=pt(),{astInput:s,comments:n}=Cr(r,t),{ast:i,errors:a}=e(s,t);return vt(a),{ast:i,comments:n}}function ut(r){return Oe(r,(e,t)=>t.parseBinding(e,...Ae))}function lt(r){return Oe(r,(e,t)=>t.parseSimpleBinding(e,...Ae))}function xt(r){return Oe(r,(e,t)=>t.parseAction(e,!1,...Ae))}function dt(r){return Oe(r,(e,t)=>{let s=t.parseInterpolationExpression(e,...Ae);return s.ast=s.ast.expressions[0],s})}function ft(r){let e=pt(),{templateBindings:t,errors:s}=e.parseTemplateBindings(Ge,r,ht,De,De);return vt(s),t}function vt(r){if(r.length!==0){let[{message:e}]=r;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function Cr(r,e){let t=e._commentStart(r);return t===null?{astInput:r,comments:[]}:{astInput:r.slice(0,t),comments:[{type:"Comment",value:r.slice(t+2),sourceSpan:{start:t,end:r.length}}]}}function gt(r){return r instanceof B?"Unary":r instanceof A?"Binary":r instanceof Y?"BindingPipe":r instanceof re?"Call":r instanceof V?"Chain":r instanceof Q?"Conditional":r instanceof $?"EmptyExpr":r instanceof L?"ImplicitReceiver":r instanceof q?"KeyedRead":r instanceof j?"SafeKeyedRead":r instanceof X?"KeyedWrite":r instanceof Z?"LiteralArray":r instanceof J?"LiteralMap":r instanceof C?"LiteralPrimitive":r instanceof te?"NonNullAssert":r instanceof ee?"PrefixNot":r instanceof b?"PropertyRead":r instanceof H?"PropertyWrite":r instanceof se?"SafeCall":r instanceof z?"SafePropertyRead":r.type}function ct({start:r,end:e},t){let s=r,n=e;for(;n!==s&&/\s/.test(t[n-1]);)n--;for(;s!==n&&/\s/.test(t[s]);)s++;return{start:s,end:n}}function Ar({start:r,end:e},t){let s=r,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;s!==0&&/\s/.test(t[s-1]);)s--;return{start:s,end:n}}function Or(r,e){return e[r.start-1]==="("&&e[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function St(r,e,t){let s=0,n={start:r.start,end:r.end};for(;;){let i=Ar(n,e),a=Or(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,s++}return{hasParens:(t?s-1:s)!==0,outerSpan:ct(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:ct(r,e)}}function mt(r){return typeof r=="string"?e=>e===r:e=>r.test(e)}function wt(r,e,t){let s=mt(e);for(let n=t;n>=0;n--){let i=r[n];if(s(i))return n}throw new Error(`Cannot find front char ${e} from index ${t} in ${JSON.stringify(r)}`)}function yt(r,e,t){let s=mt(e);for(let n=t;n{if(!(r&&e==null))return Array.isArray(e)||typeof e=="string"?e[t<0?e.length+t:t]:e.at(t)},Ne=Nr;var D=(r,e,t=!1)=>{let s=gt(r);switch(s){case"Unary":{let{operator:o,expr:u}=r,v=n(u);return a("UnaryExpression",{prefix:!0,argument:v,operator:o},r.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:o,operation:u,right:v}=r,c=n(o),x=n(v);return a(u==="&&"||u==="||"||u==="??"?"LogicalExpression":"BinaryExpression",{left:c,right:x,operator:u},{start:E(c),end:S(x)},{hasParentParens:t})}case"BindingPipe":{let{exp:o,name:u,args:v}=r,c=n(o),x=e.getCharacterIndex(/\S/,e.getCharacterIndex("|",S(c))+1),l=a("Identifier",{name:u},{start:x,end:x+u.length}),p=v.map(n);return a("NGPipeExpression",{left:c,right:l,arguments:p},{start:E(c),end:S(p.length===0?l:Ne(!1,p,-1))},{hasParentParens:t})}case"Chain":{let{expressions:o}=r;return a("NGChainedExpression",{expressions:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:o}=r;return a("CommentLine",{value:o},r.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:o,trueExp:u,falseExp:v}=r,c=n(o),x=n(u),l=n(v);return a("ConditionalExpression",{test:c,consequent:x,alternate:l},{start:E(c),end:S(l)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},r.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},r.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let o=s==="SafeKeyedRead",{key:u}=r,v=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,c=n(u);return h(v,c,{computed:!0,optional:o},{end:r.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:o}=r;return a("ArrayExpression",{elements:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:o,values:u}=r,v=u.map(x=>n(x)),c=o.map(({key:x,quoted:l},p)=>{let k=v[p],m=E(k),N=S(k),ue=e.getCharacterIndex(/\S/,p===0?r.sourceSpan.start+1:e.getCharacterIndex(",",S(v[p-1]))+1),It=m===ue?N:e.getCharacterLastIndex(/\S/,e.getCharacterLastIndex(":",m-1)-1)+1,He={start:ue,end:It},ge=l?a("StringLiteral",{value:x},He):a("Identifier",{name:x},He),kt=ge.end=o.sourceSpan.end||/^\s+$/.test(e.text.slice(o.sourceSpan.start,o.sourceSpan.end))}function d(o){return(o.type==="OptionalCallExpression"||o.type==="OptionalMemberExpression")&&!y(o)}function y(o){return o.extra&&o.extra.parenthesized}function E(o){return y(o)?o.extra.parenStart:o.start}function S(o){return y(o)?o.extra.parenEnd:o.end}};function Ie(r,e,t=!1,s=!1){if(!t){let{start:g,end:d}=r;return{start:g,end:d,range:[g,d]}}let{outerSpan:n,innerSpan:{start:i,end:a},hasParens:h}=St(r,e.text,s);return{start:i,end:a,range:[i,a],...h&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}function $t(r,e){r.forEach(o);let[t]=r,{key:s}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?r.slice(1):r,i=[],a=null;for(let c=0;c({...N,...Ie({start:N.start,end:ue},e)}),k=N=>({...p(N,l.end),alias:l}),m=i.pop();if(m.type==="NGMicrosyntaxExpression")i.push(k(m));else if(m.type==="NGMicrosyntaxKeyedExpression"){let N=k(m.expression);i.push(p({...m,expression:N},N.end))}else throw new Error(`Unexpected type ${m.type}`)}else i.push(h(x,c));a=x}return d("NGMicrosyntax",{body:i},i.length===0?r[0].sourceSpan:{start:i[0].start,end:Ne(!1,i,-1).end});function h(c,x){if(E(c)){let{key:l,value:p}=c;return p?x===0?d("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan):d("NGMicrosyntaxKeyedExpression",{key:d("NGMicrosyntaxKey",{name:y(l.source)},l.span),expression:d("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan)},{start:l.span.start,end:p.sourceSpan.end}):d("NGMicrosyntaxKey",{name:y(l.source)},l.span)}else{let{key:l,sourceSpan:p}=c;if(/^let\s$/.test(e.text.slice(p.start,p.start+4))){let{value:m}=c;return d("NGMicrosyntaxLet",{key:d("NGMicrosyntaxKey",{name:l.source},l.span),value:m?d("NGMicrosyntaxKey",{name:m.source},m.span):null},{start:p.start,end:m?m.span.end:l.span.end})}else{let m=v(c);return d("NGMicrosyntaxAs",{key:d("NGMicrosyntaxKey",{name:m.source},m.span),alias:d("NGMicrosyntaxKey",{name:l.source},l.span)},{start:m.span.start,end:l.span.end})}}}function g(c){return D(c,e)}function d(c,x,l,p=!0){return{type:c,...Ie(l,e,p),...x}}function y(c){return Et(c.slice(s.source.length))}function E(c){return c instanceof ne}function S(c){return c instanceof T}function o(c){u(c.key.span),S(c)&&c.value&&u(c.value.span)}function u(c){if(e.text[c.start]!=='"'&&e.text[c.start]!=="'")return;let x=e.text[c.start],l=!1;for(let p=c.start+1;p{let{ast:t,comments:s}=r(e),n=new ve(e),i=D(t,n);return i.comments=s.map(a=>D(a,n)),i}}var Ct=ke(ut),hs=ke(lt),At=ke(dt),We=ke(xt),Ot=r=>$t(ft(r),new ve(r));function Ve(r){var s,n,i;let e=((s=r.range)==null?void 0:s[0])??r.start,t=(i=((n=r.declaration)==null?void 0:n.decorators)??r.decorators)==null?void 0:i[0];return t?Math.min(Ve(t),e):e}function Nt(r){var e;return((e=r.range)==null?void 0:e[1])??r.end}function Re(r){return{astFormat:"estree",parse(e){let t=r(e);return{type:"NGRoot",node:r===We&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:Ve,locEnd:Nt}}var Ir=Re(We),kr=Re(Ct),Rr=Re(At),Pr=Re(Ot);return bt(Lr);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/angular.mjs b/node_modules/prettier/plugins/angular.mjs index 80e1481..b143c2f 100644 --- a/node_modules/prettier/plugins/angular.mjs +++ b/node_modules/prettier/plugins/angular.mjs @@ -1,2 +1 @@ -var Xe=Object.defineProperty;var Gt=(r,e,t)=>e in r?Xe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Ze=(r,e)=>{for(var t in e)Xe(r,t,{get:e[t],enumerable:!0})};var Je=(r,e,t)=>(Gt(r,typeof e!="symbol"?e+"":e,t),t),Ye=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var be=(r,e,t)=>(Ye(r,e,"read from private field"),t?t.call(r):e.get(r)),et=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},tt=(r,e,t,s)=>(Ye(r,e,"write to private field"),s?s.call(r,t):e.set(r,t),t);var qe={};Ze(qe,{parsers:()=>ze});var ze={};Ze(ze,{__ng_action:()=>Tr,__ng_binding:()=>_r,__ng_directive:()=>Fr,__ng_interpolation:()=>Mr});var Se=` -`,rt="\r",st=function(){function r(e){this.length=e.length;for(var t=[0],s=0;sthis.length)return null;for(var t=0,s=this.offsets;s[t+1]<=e;)t++;var n=e-s[t];return{line:t,column:n}},r.prototype.indexForLocation=function(e){var t=e.line,s=e.column;return t<0||t>=this.offsets.length||s<0||s>this.lengthOfLine(t)?null:this.offsets[t]+s},r.prototype.lengthOfLine=function(e){var t=this.offsets[e],s=e===this.offsets.length-1?this.length:this.offsets[e+1];return s-t},r}();var D=class{constructor(e,t,s,n){this.input=t,this.errLocation=s,this.ctxLocation=n,this.message=`Parser Error: ${e} ${s} [${t}] in ${n}`}},R=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new N(e+this.start,e+this.end)}},w=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},V=class extends w{constructor(e,t,s){super(e,t),this.nameSpan=s}},C=class extends w{visit(e,t=null){}},L=class extends w{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},we=class extends L{visit(e,t=null){var s;return(s=e.visitThisReceiver)==null?void 0:s.call(e,this,t)}},W=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},Q=class extends w{constructor(e,t,s,n,i){super(e,t),this.condition=s,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},K=class extends V{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},H=class extends V{constructor(e,t,s,n,i,a){super(e,t,s),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},z=class extends V{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},q=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},j=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},X=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Z=class extends V{constructor(e,t,s,n,i,a){super(e,t,a),this.exp=s,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},A=class extends w{constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},J=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},Y=class extends w{constructor(e,t,s,n){super(e,t),this.keys=s,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},ye=class extends w{constructor(e,t,s,n){super(e,t),this.strings=s,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},$=class extends w{constructor(e,t,s,n,i){super(e,t),this.operation=s,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},B=class r extends ${static createMinus(e,t,s){return new r(e,t,"-",s,"-",new A(e,t,0),s)}static createPlus(e,t,s){return new r(e,t,"+",s,"-",s,new A(e,t,0))}constructor(e,t,s,n,i,a,h){super(e,t,i,a,h),this.operator=s,this.expr=n,this.left=null,this.right=null,this.operation=null}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},ee=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},te=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},re=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},se=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},N=class{constructor(e,t){this.start=e,this.end=t}},P=class extends w{constructor(e,t,s,n,i){super(new R(0,t===null?0:t.length),new N(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=s,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},T=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},ne=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},Ee=class{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitAll(e,t){for(let s of e)this.visit(s,t)}};var nt;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION"})(nt||(nt={}));function it(r){return r>=9&&r<=32||r==160}function b(r){return 48<=r&&r<=57}function at(r){return r>=97&&r<=122||r>=65&&r<=90}function Ke(r){return r===39||r===34||r===96}var d;(function(r){r[r.Character=0]="Character",r[r.Identifier=1]="Identifier",r[r.PrivateIdentifier=2]="PrivateIdentifier",r[r.Keyword=3]="Keyword",r[r.String=4]="String",r[r.Operator=5]="Operator",r[r.Number=6]="Number",r[r.Error=7]="Error"})(d||(d={}));var gr=["var","let","as","null","undefined","true","false","if","else","this"],le=class{tokenize(e){let t=new _e(e),s=[],n=t.scanToken();for(;n!=null;)s.push(n),n=t.scanToken();return s}},O=class{constructor(e,t,s,n,i){this.index=e,this.end=t,this.type=s,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==d.Character&&this.numValue==e}isNumber(){return this.type==d.Number}isString(){return this.type==d.String}isOperator(e){return this.type==d.Operator&&this.strValue==e}isIdentifier(){return this.type==d.Identifier}isPrivateIdentifier(){return this.type==d.PrivateIdentifier}isKeyword(){return this.type==d.Keyword}isKeywordLet(){return this.type==d.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==d.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==d.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==d.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==d.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==d.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==d.Keyword&&this.strValue=="this"}isError(){return this.type==d.Error}toNumber(){return this.type==d.Number?this.numValue:-1}toString(){switch(this.type){case d.Character:case d.Identifier:case d.Keyword:case d.Operator:case d.PrivateIdentifier:case d.String:case d.Error:return this.strValue;case d.Number:return this.numValue.toString();default:return null}}};function ut(r,e,t){return new O(r,e,d.Character,t,String.fromCharCode(t))}function mr(r,e,t){return new O(r,e,d.Identifier,0,t)}function Sr(r,e,t){return new O(r,e,d.PrivateIdentifier,0,t)}function wr(r,e,t){return new O(r,e,d.Keyword,0,t)}function Te(r,e,t){return new O(r,e,d.Operator,0,t)}function yr(r,e,t){return new O(r,e,d.String,0,t)}function Er(r,e,t){return new O(r,e,d.Number,t,"")}function Cr(r,e,t){return new O(r,e,d.Error,0,t)}var Oe=new O(-1,-1,d.Character,0,""),_e=class{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,s=this.peek,n=this.index;for(;s<=32;)if(++n>=t){s=0;break}else s=e.charCodeAt(n);if(this.peek=s,this.index=n,n>=t)return null;if(lt(s))return this.scanIdentifier();if(b(s))return this.scanNumber(n);let i=n;switch(s){case 46:return this.advance(),b(this.peek)?this.scanNumber(i):ut(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,s);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(s));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;it(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),ut(e,this.index,t)}scanOperator(e,t){return this.advance(),Te(e,this.index,t)}scanComplexOperator(e,t,s,n,i,a){this.advance();let h=t;return this.peek==s&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),Te(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();xt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return gr.indexOf(t)>-1?wr(e,this.index,t):mr(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!lt(this.peek))return this.error("Invalid character [#]",-1);for(;xt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Sr(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!b(this.peek))if(this.peek===95){if(!b(this.input.charCodeAt(this.index-1))||!b(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)t=!1;else if(Ar(this.peek)){if(this.advance(),$r(this.peek)&&this.advance(),!b(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);s&&(n=n.replace(/_/g,""));let i=t?Ir(n):parseFloat(n);return Er(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let s="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){s+=i.substring(n,this.index);let h;if(this.advance(),this.peek==117){let g=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(g))h=parseInt(g,16);else return this.error(`Invalid unicode escape [\\u${g}]`,0);for(let f=0;f<5;f++)this.advance()}else h=Or(this.peek),this.advance();s+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),yr(e,this.index,s+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),Te(e,this.index,t)}error(e,t){let s=this.index+t;return Cr(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}};function lt(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function xt(r){return at(r)||b(r)||r==95||r==36}function Ar(r){return r==101||r==69}function $r(r){return r==45||r==43}function Or(r){switch(r){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return r}}function Ir(r){let e=parseInt(r);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+r);return e}var Nr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function gt(r,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${r}' to be an array, [start, end].`);if(e!=null){let t=e[0],s=e[1];Nr.forEach(n=>{if(n.test(t)||n.test(s))throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`)})}}var Fe=class r{static fromArray(e){return e?(gt("interpolation",e),new r(e[0],e[1])):F}constructor(e,t){this.start=e,this.end=t}},F=new Fe("{{","}}");var Ue=class{constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},Ge=class{constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},fe=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,s,n,i=F){this._checkNoInterpolation(e,s,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),g=1;t&&(g|=2);let f=new U(e,s,n,h,g,this.errors,0).parseChain();return new P(f,e,s,n,this.errors)}parseBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n);return new P(i,e,t,s,this.errors)}checkSimpleExpression(e){let t=new De;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new P(i,e,t,s,this.errors)}_reportError(e,t,s,n){this.errors.push(new D(e,t,s,n))}_parseBindingAst(e,t,s,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new U(e,t,s,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,s,n,i){let a=this._lexer.tokenize(t);return new U(t,s,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new N(n,n+e.length)})}parseInterpolation(e,t,s,n,i=F){let{strings:a,expressions:h,offsets:g}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let f=[];for(let y=0;yy.text),f,e,t,s)}parseInterpolationExpression(e,t,s){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new U(e,t,s,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,s)}createInterpolationAst(e,t,s,n,i){let a=new R(0,s.length),h=new ye(a,a.toAbsolute(i),e,t);return new P(h,s,n,i,this.errors)}splitInterpolation(e,t,s,n=F){let i=[],a=[],h=[],g=s?kr(s):null,f=0,y=!1,E=!1,{start:m,end:o}=n;for(;f-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${s}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,s){for(let n of this._forEachUnquotedChar(e,s)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let s=null,n=0;for(let i=t;i=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let n=s;s=e,e=n}return new R(e,s)}sourceSpan(e,t){let s=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(e,t){this.context|=e;let s=t();return this.context^=e,s}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error(`Missing expected ${String.fromCharCode(e)}`)}consumeOptionalOperator(e){return this.next.isOperator(e)?(this.advance(),!0):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Oe?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new $(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==d.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new $(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==d.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new $(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parsePrefix(){if(this.next.type==d.Operator){let e=this.inputIndex,t=this.next.strValue,s;switch(t){case"+":return this.advance(),s=this.parsePrefix(),B.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),B.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new ee(this.span(e),this.sourceSpan(e),s)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMember(t,e,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?t=this.parseCall(t,e,!0):t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMember(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40))t=this.parseCall(t,e,!1);else if(this.consumeOptionalOperator("!"))t=new te(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new A(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new A(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new A(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new A(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new we(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new J(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new L(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new A(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new A(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new C(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new C(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new C(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),g=this.sourceSpan(n);t.push(new K(h,g,g,new L(h,g),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new Y(this.span(s),this.sourceSpan(s),e,t)}parseAccessMember(e,t,s){let n=this.inputIndex,i=this.withContext(pe.Writable,()=>{let g=this.expectIdentifierOrKeyword()??"";return g.length===0&&this.error("Expected identifier for property access",e.span.end),g}),a=this.sourceSpan(n),h;if(s)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new C(this.span(t),this.sourceSpan(t))):h=new z(this.span(t),this.sourceSpan(t),a,e,i);else if(this.consumeOptionalAssignment()){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new C(this.span(t),this.sourceSpan(t));let g=this.parseConditional();h=new H(this.span(t),this.sourceSpan(t),a,e,i,g)}else h=new K(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,s){let n=this.inputIndex;this.rparensExpected++;let i=this.parseCallArguments(),a=this.span(n,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let h=this.span(t),g=this.sourceSpan(t);return s?new se(h,g,e,i,a):new re(h,g,e,i,a)}consumeOptionalAssignment(){return this.parseFlags&2&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new N(s,s+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof C&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(s)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new X(this.span(t),this.sourceSpan(t),e,n,i)}else return s?new j(this.span(t),this.sourceSpan(t),e,n):new q(this.span(t),this.sourceSpan(t),e,n);return new C(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let s=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new N(e.span.start,n);return t.push(new ne(a,e,s)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Oe||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,n=this.input.substring(t,s);return new P(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new N(e.span.start,this.currentAbsoluteOffset);return new T(s,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new N(e,this.currentAbsoluteOffset);return new T(n,t,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new D(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),eh+g.length,0);s+=a,t+=a}e.set(s,t),n++}return e}var St="angular-estree-parser",We="NgEstreeParser",Ve=0,Ie=[St,Ve];function wt(){return new fe(new le)}function Ne(r,e){let t=wt(),{astInput:s,comments:n}=Rr(r,t),{ast:i,errors:a}=e(s,t);return Ot(a),{ast:i,comments:n}}function yt(r){return Ne(r,(e,t)=>t.parseBinding(e,...Ie))}function Et(r){return Ne(r,(e,t)=>t.parseSimpleBinding(e,...Ie))}function Ct(r){return Ne(r,(e,t)=>t.parseAction(e,!1,...Ie))}function At(r){return Ne(r,(e,t)=>{let s=t.parseInterpolationExpression(e,...Ie);return s.ast=s.ast.expressions[0],s})}function $t(r){let e=wt(),{templateBindings:t,errors:s}=e.parseTemplateBindings(We,r,St,Ve,Ve);return Ot(s),t}function Ot(r){if(r.length!==0){let[{message:e}]=r;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function Rr(r,e){let t=e._commentStart(r);return t===null?{astInput:r,comments:[]}:{astInput:r.slice(0,t),comments:[{type:"Comment",value:r.slice(t+2),sourceSpan:{start:t,end:r.length}}]}}function It(r){return r instanceof B?"Unary":r instanceof $?"Binary":r instanceof Z?"BindingPipe":r instanceof re?"Call":r instanceof W?"Chain":r instanceof Q?"Conditional":r instanceof C?"EmptyExpr":r instanceof L?"ImplicitReceiver":r instanceof q?"KeyedRead":r instanceof j?"SafeKeyedRead":r instanceof X?"KeyedWrite":r instanceof J?"LiteralArray":r instanceof Y?"LiteralMap":r instanceof A?"LiteralPrimitive":r instanceof te?"NonNullAssert":r instanceof ee?"PrefixNot":r instanceof K?"PropertyRead":r instanceof H?"PropertyWrite":r instanceof se?"SafeCall":r instanceof z?"SafePropertyRead":r.type}function mt({start:r,end:e},t){let s=r,n=e;for(;n!==s&&/\s/.test(t[n-1]);)n--;for(;s!==n&&/\s/.test(t[s]);)s++;return{start:s,end:n}}function Lr({start:r,end:e},t){let s=r,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;s!==0&&/\s/.test(t[s-1]);)s--;return{start:s,end:n}}function br(r,e){return e[r.start-1]==="("&&e[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function Nt(r,e,t){let s=0,n={start:r.start,end:r.end};for(;;){let i=Lr(n,e),a=br(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,s++}return{hasParens:(t?s-1:s)!==0,outerSpan:mt(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:mt(r,e)}}function kt(r){return typeof r=="string"?e=>e===r:e=>r.test(e)}function Pt(r,e,t){let s=kt(e);for(let n=t;n>=0;n--){let i=r[n];if(s(i))return n}throw new Error(`Cannot find front char ${e} from index ${t} in ${JSON.stringify(r)}`)}function Rt(r,e,t){let s=kt(e);for(let n=t;n{if(!(r&&e==null))return Array.isArray(e)||typeof e=="string"?e[t<0?e.length+t:t]:e.at(t)},ke=Kr;var G=(r,e,t=!1)=>{let s=It(r);switch(s){case"Unary":{let{operator:o,expr:u}=r,v=n(u);return a("UnaryExpression",{prefix:!0,argument:v,operator:o},r.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:o,operation:u,right:v}=r,c=n(o),x=n(v);return a(u==="&&"||u==="||"||u==="??"?"LogicalExpression":"BinaryExpression",{left:c,right:x,operator:u},{start:E(c),end:m(x)},{hasParentParens:t})}case"BindingPipe":{let{exp:o,name:u,args:v}=r,c=n(o),x=e.getCharacterIndex(/\S/,e.getCharacterIndex("|",m(c))+1),l=a("Identifier",{name:u},{start:x,end:x+u.length}),p=v.map(n);return a("NGPipeExpression",{left:c,right:l,arguments:p},{start:E(c),end:m(p.length===0?l:ke(!1,p,-1))},{hasParentParens:t})}case"Chain":{let{expressions:o}=r;return a("NGChainedExpression",{expressions:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:o}=r;return a("CommentLine",{value:o},r.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:o,trueExp:u,falseExp:v}=r,c=n(o),x=n(u),l=n(v);return a("ConditionalExpression",{test:c,consequent:x,alternate:l},{start:E(c),end:m(l)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},r.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},r.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let o=s==="SafeKeyedRead",{key:u}=r,v=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,c=n(u);return h(v,c,{computed:!0,optional:o},{end:r.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:o}=r;return a("ArrayExpression",{elements:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:o,values:u}=r,v=u.map(x=>n(x)),c=o.map(({key:x,quoted:l},p)=>{let k=v[p],S=E(k),I=m(k),ue=e.getCharacterIndex(/\S/,p===0?r.sourceSpan.start+1:e.getCharacterIndex(",",m(v[p-1]))+1),Ft=S===ue?I:e.getCharacterLastIndex(/\S/,e.getCharacterLastIndex(":",S-1)-1)+1,je={start:ue,end:Ft},me=l?a("StringLiteral",{value:x},je):a("Identifier",{name:x},je),Ut=me.end=o.sourceSpan.end||/^\s+$/.test(e.text.slice(o.sourceSpan.start,o.sourceSpan.end))}function f(o){return(o.type==="OptionalCallExpression"||o.type==="OptionalMemberExpression")&&!y(o)}function y(o){return o.extra&&o.extra.parenthesized}function E(o){return y(o)?o.extra.parenStart:o.start}function m(o){return y(o)?o.extra.parenEnd:o.end}};function Pe(r,e,t=!1,s=!1){if(!t){let{start:h,end:g}=r;return{start:h,end:g,loc:{filename:"",identifierName:"",start:e.locationForIndex(h),end:e.locationForIndex(g)}}}let{outerSpan:n,innerSpan:i,hasParens:a}=Nt(r,e.text,s);return{start:i.start,end:i.end,loc:{filename:"",identifierName:"",start:e.locationForIndex(i.start),end:e.locationForIndex(i.end)},...a&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}function bt(r,e){r.forEach(o);let[t]=r,{key:s}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?r.slice(1):r,i=[],a=null;for(let c=0;c({...I,...Pe({start:I.start,end:ue},e)}),k=I=>({...p(I,l.end),alias:l}),S=i.pop();if(S.type==="NGMicrosyntaxExpression")i.push(k(S));else if(S.type==="NGMicrosyntaxKeyedExpression"){let I=k(S.expression);i.push(p({...S,expression:I},I.end))}else throw new Error(`Unexpected type ${S.type}`)}else i.push(h(x,c));a=x}return f("NGMicrosyntax",{body:i},i.length===0?r[0].sourceSpan:{start:i[0].start,end:ke(!1,i,-1).end});function h(c,x){if(E(c)){let{key:l,value:p}=c;return p?x===0?f("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan):f("NGMicrosyntaxKeyedExpression",{key:f("NGMicrosyntaxKey",{name:y(l.source)},l.span),expression:f("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan)},{start:l.span.start,end:p.sourceSpan.end}):f("NGMicrosyntaxKey",{name:y(l.source)},l.span)}else{let{key:l,sourceSpan:p}=c;if(/^let\s$/.test(e.text.slice(p.start,p.start+4))){let{value:S}=c;return f("NGMicrosyntaxLet",{key:f("NGMicrosyntaxKey",{name:l.source},l.span),value:S?f("NGMicrosyntaxKey",{name:S.source},S.span):null},{start:p.start,end:S?S.span.end:l.span.end})}else{let S=v(c);return f("NGMicrosyntaxAs",{key:f("NGMicrosyntaxKey",{name:S.source},S.span),alias:f("NGMicrosyntaxKey",{name:l.source},l.span)},{start:S.span.start,end:l.span.end})}}}function g(c){return G(c,e)}function f(c,x,l,p=!0){return{type:c,...Pe(l,e,p),...x}}function y(c){return Lt(c.slice(s.source.length))}function E(c){return c instanceof ne}function m(c){return c instanceof T}function o(c){u(c.key.span),m(c)&&c.value&&u(c.value.span)}function u(c){if(e.text[c.start]!=='"'&&e.text[c.start]!=="'")return;let x=e.text[c.start],l=!1;for(let p=c.start+1;p{let{ast:t,comments:s}=r(e),n=new ve(e),i=G(t,n);return i.comments=s.map(a=>G(a,n)),i}}var Kt=Re(yt),Ss=Re(Et),Bt=Re(At),Qe=Re(Ct),Tt=r=>bt($t(r),new ve(r));function Br(r){return Array.isArray(r)&&r.length>0}var _t=Br;function He(r){var s;let e=r.range?r.range[0]:r.start,t=((s=r.declaration)==null?void 0:s.decorators)??r.decorators;return _t(t)?Math.min(He(t[0]),e):e}function Mt(r){return r.range?r.range[1]:r.end}function Le(r){return{astFormat:"estree",parse(e){let t=r(e);return{type:"NGRoot",node:r===Qe&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:He,locEnd:Mt}}var Tr=Le(Qe),_r=Le(Kt),Mr=Le(Bt),Fr=Le(Tt);var Os=qe;export{Os as default,ze as parsers}; +var Rt=Object.defineProperty;var ze=(r,e)=>{for(var t in e)Rt(r,t,{get:e[t],enumerable:!0})};var Qe={};ze(Qe,{parsers:()=>Ve});var Ve={};ze(Ve,{__ng_action:()=>Cr,__ng_binding:()=>Ar,__ng_directive:()=>Nr,__ng_interpolation:()=>Or});var G=class{constructor(e,t,s,n){this.input=t,this.errLocation=s,this.ctxLocation=n,this.message=`Parser Error: ${e} ${s} [${t}] in ${n}`}},P=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new I(e+this.start,e+this.end)}},w=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},W=class extends w{constructor(e,t,s){super(e,t),this.nameSpan=s}},$=class extends w{visit(e,t=null){}},L=class extends w{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},Se=class extends L{visit(e,t=null){var s;return(s=e.visitThisReceiver)==null?void 0:s.call(e,this,t)}},V=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitChain(this,t)}},Q=class extends w{constructor(e,t,s,n,i){super(e,t),this.condition=s,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},b=class extends W{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},H=class extends W{constructor(e,t,s,n,i,a){super(e,t,s),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},z=class extends W{constructor(e,t,s,n,i){super(e,t,s),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},q=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},j=class extends w{constructor(e,t,s,n){super(e,t),this.receiver=s,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},X=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Y=class extends W{constructor(e,t,s,n,i,a){super(e,t,a),this.exp=s,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},C=class extends w{constructor(e,t,s){super(e,t),this.value=s}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},Z=class extends w{constructor(e,t,s){super(e,t),this.expressions=s}visit(e,t=null){return e.visitLiteralArray(this,t)}},J=class extends w{constructor(e,t,s,n){super(e,t),this.keys=s,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},me=class extends w{constructor(e,t,s,n){super(e,t),this.strings=s,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},A=class extends w{constructor(e,t,s,n,i){super(e,t),this.operation=s,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},B=class r extends A{static createMinus(e,t,s){return new r(e,t,"-",s,"-",new C(e,t,0),s)}static createPlus(e,t,s){return new r(e,t,"+",s,"-",s,new C(e,t,0))}constructor(e,t,s,n,i,a,h){super(e,t,i,a,h),this.operator=s,this.expr=n,this.left=null,this.right=null,this.operation=null}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},ee=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitPrefixNot(this,t)}},te=class extends w{constructor(e,t,s){super(e,t),this.expression=s}visit(e,t=null){return e.visitNonNullAssert(this,t)}},re=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},se=class extends w{constructor(e,t,s,n,i){super(e,t),this.receiver=s,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},I=class{constructor(e,t){this.start=e,this.end=t}},R=class extends w{constructor(e,t,s,n,i){super(new P(0,t===null?0:t.length),new I(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=s,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},T=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},ne=class{constructor(e,t,s){this.sourceSpan=e,this.key=t,this.value=s}},we=class{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitAll(e,t){for(let s of e)this.visit(s,t)}};var qe;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.LITERAL_ATTR=1]="LITERAL_ATTR",r[r.ANIMATION=2]="ANIMATION",r[r.TWO_WAY=3]="TWO_WAY"})(qe||(qe={}));function je(r){return r>=9&&r<=32||r==160}function K(r){return 48<=r&&r<=57}function Xe(r){return r>=97&&r<=122||r>=65&&r<=90}function Pe(r){return r===39||r===34||r===96}var f;(function(r){r[r.Character=0]="Character",r[r.Identifier=1]="Identifier",r[r.PrivateIdentifier=2]="PrivateIdentifier",r[r.Keyword=3]="Keyword",r[r.String=4]="String",r[r.Operator=5]="Operator",r[r.Number=6]="Number",r[r.Error=7]="Error"})(f||(f={}));var ar=["var","let","as","null","undefined","true","false","if","else","this"],le=class{tokenize(e){let t=new be(e),s=[],n=t.scanToken();for(;n!=null;)s.push(n),n=t.scanToken();return s}},O=class{constructor(e,t,s,n,i){this.index=e,this.end=t,this.type=s,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==f.Character&&this.numValue==e}isNumber(){return this.type==f.Number}isString(){return this.type==f.String}isOperator(e){return this.type==f.Operator&&this.strValue==e}isIdentifier(){return this.type==f.Identifier}isPrivateIdentifier(){return this.type==f.PrivateIdentifier}isKeyword(){return this.type==f.Keyword}isKeywordLet(){return this.type==f.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==f.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==f.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==f.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==f.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==f.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==f.Keyword&&this.strValue=="this"}isError(){return this.type==f.Error}toNumber(){return this.type==f.Number?this.numValue:-1}toString(){switch(this.type){case f.Character:case f.Identifier:case f.Keyword:case f.Operator:case f.PrivateIdentifier:case f.String:case f.Error:return this.strValue;case f.Number:return this.numValue.toString();default:return null}}};function tt(r,e,t){return new O(r,e,f.Character,t,String.fromCharCode(t))}function or(r,e,t){return new O(r,e,f.Identifier,0,t)}function cr(r,e,t){return new O(r,e,f.PrivateIdentifier,0,t)}function hr(r,e,t){return new O(r,e,f.Keyword,0,t)}function Ke(r,e,t){return new O(r,e,f.Operator,0,t)}function pr(r,e,t){return new O(r,e,f.String,0,t)}function ur(r,e,t){return new O(r,e,f.Number,t,"")}function lr(r,e,t){return new O(r,e,f.Error,0,t)}var Ce=new O(-1,-1,f.Character,0,""),be=class{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,s=this.peek,n=this.index;for(;s<=32;)if(++n>=t){s=0;break}else s=e.charCodeAt(n);if(this.peek=s,this.index=n,n>=t)return null;if(rt(s))return this.scanIdentifier();if(K(s))return this.scanNumber(n);let i=n;switch(s){case 46:return this.advance(),K(this.peek)?this.scanNumber(i):tt(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,s);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(s));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;je(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(s)}]`,0)}scanCharacter(e,t){return this.advance(),tt(e,this.index,t)}scanOperator(e,t){return this.advance(),Ke(e,this.index,t)}scanComplexOperator(e,t,s,n,i,a){this.advance();let h=t;return this.peek==s&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),Ke(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();st(this.peek);)this.advance();let t=this.input.substring(e,this.index);return ar.indexOf(t)>-1?hr(e,this.index,t):or(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!rt(this.peek))return this.error("Invalid character [#]",-1);for(;st(this.peek);)this.advance();let t=this.input.substring(e,this.index);return cr(e,this.index,t)}scanNumber(e){let t=this.index===e,s=!1;for(this.advance();;){if(!K(this.peek))if(this.peek===95){if(!K(this.input.charCodeAt(this.index-1))||!K(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);s=!0}else if(this.peek===46)t=!1;else if(xr(this.peek)){if(this.advance(),dr(this.peek)&&this.advance(),!K(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);s&&(n=n.replace(/_/g,""));let i=t?vr(n):parseFloat(n);return ur(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let s="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){s+=i.substring(n,this.index);let h;if(this.advance(),this.peek==117){let g=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(g))h=parseInt(g,16);else return this.error(`Invalid unicode escape [\\u${g}]`,0);for(let d=0;d<5;d++)this.advance()}else h=fr(this.peek),this.advance();s+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),pr(e,this.index,s+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),Ke(e,this.index,t)}error(e,t){let s=this.index+t;return lr(s,this.index,`Lexer Error: ${e} at column ${s} in expression [${this.input}]`)}};function rt(r){return 97<=r&&r<=122||65<=r&&r<=90||r==95||r==36}function st(r){return Xe(r)||K(r)||r==95||r==36}function xr(r){return r==101||r==69}function dr(r){return r==45||r==43}function fr(r){switch(r){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return r}}function vr(r){let e=parseInt(r);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+r);return e}var gr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function ot(r,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${r}' to be an array, [start, end].`);if(e!=null){let t=e[0],s=e[1];gr.forEach(n=>{if(n.test(t)||n.test(s))throw new Error(`['${t}', '${s}'] contains unusable interpolation symbol.`)})}}var Te=class r{static fromArray(e){return e?(ot("interpolation",e),new r(e[0],e[1])):F}constructor(e,t){this.start=e,this.end=t}},F=new Te("{{","}}");var _e=class{constructor(e,t,s){this.strings=e,this.expressions=t,this.offsets=s}},Me=class{constructor(e,t,s){this.templateBindings=e,this.warnings=t,this.errors=s}},fe=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,s,n,i=F){this._checkNoInterpolation(e,s,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),g=1;t&&(g|=2);let d=new U(e,s,n,h,g,this.errors,0).parseChain();return new R(d,e,s,n,this.errors)}parseBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n);return new R(i,e,t,s,this.errors)}checkSimpleExpression(e){let t=new Fe;return e.visit(t),t.errors}parseSimpleBinding(e,t,s,n=F){let i=this._parseBindingAst(e,t,s,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new R(i,e,t,s,this.errors)}_reportError(e,t,s,n){this.errors.push(new G(e,t,s,n))}_parseBindingAst(e,t,s,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new U(e,t,s,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,s,n,i){let a=this._lexer.tokenize(t);return new U(t,s,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new I(n,n+e.length)})}parseInterpolation(e,t,s,n,i=F){let{strings:a,expressions:h,offsets:g}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let d=[];for(let y=0;yy.text),d,e,t,s)}parseInterpolationExpression(e,t,s){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new U(e,t,s,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,s)}createInterpolationAst(e,t,s,n,i){let a=new P(0,s.length),h=new me(a,a.toAbsolute(i),e,t);return new R(h,s,n,i,this.errors)}splitInterpolation(e,t,s,n=F){let i=[],a=[],h=[],g=s?Sr(s):null,d=0,y=!1,E=!1,{start:S,end:o}=n;for(;d-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${s}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,s){for(let n of this._forEachUnquotedChar(e,s)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let s=null,n=0;for(let i=t;i=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let s=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(s=t),e>s){let n=s;s=e,e=n}return new P(e,s)}sourceSpan(e,t){let s=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(s)||this.sourceSpanCache.set(s,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(s)}advance(){this.index++}withContext(e,t){this.context|=e;let s=t();return this.context^=e,s}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error(`Missing expected ${String.fromCharCode(e)}`)}consumeOptionalOperator(e){return this.next.isOperator(e)?(this.advance(),!0):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Ce?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new A(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new A(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==f.Operator;){let s=this.next.strValue;switch(s){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new A(this.span(e),this.sourceSpan(e),s,t,n);continue}break}return t}parsePrefix(){if(this.next.type==f.Operator){let e=this.inputIndex,t=this.next.strValue,s;switch(t){case"+":return this.advance(),s=this.parsePrefix(),B.createPlus(this.span(e),this.sourceSpan(e),s);case"-":return this.advance(),s=this.parsePrefix(),B.createMinus(this.span(e),this.sourceSpan(e),s);case"!":return this.advance(),s=this.parsePrefix(),new ee(this.span(e),this.sourceSpan(e),s)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMember(t,e,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?t=this.parseCall(t,e,!0):t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMember(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40))t=this.parseCall(t,e,!1);else if(this.consumeOptionalOperator("!"))t=new te(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new C(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new C(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new C(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new C(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new Se(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Z(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new L(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new C(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new C(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new $(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new $(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new $(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),g=this.sourceSpan(n);t.push(new b(h,g,g,new L(h,g),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new J(this.span(s),this.sourceSpan(s),e,t)}parseAccessMember(e,t,s){let n=this.inputIndex,i=this.withContext(pe.Writable,()=>{let g=this.expectIdentifierOrKeyword()??"";return g.length===0&&this.error("Expected identifier for property access",e.span.end),g}),a=this.sourceSpan(n),h;if(s)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new $(this.span(t),this.sourceSpan(t))):h=new z(this.span(t),this.sourceSpan(t),a,e,i);else if(this.consumeOptionalAssignment()){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new $(this.span(t),this.sourceSpan(t));let g=this.parseConditional();h=new H(this.span(t),this.sourceSpan(t),a,e,i,g)}else h=new b(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,s){let n=this.inputIndex;this.rparensExpected++;let i=this.parseCallArguments(),a=this.span(n,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let h=this.span(t),g=this.sourceSpan(t);return s?new se(h,g,e,i,a):new re(h,g,e,i,a)}consumeOptionalAssignment(){return this.parseFlags&2&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,s=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new I(s,s+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof $&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(s)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new X(this.span(t),this.sourceSpan(t),e,n,i)}else return s?new j(this.span(t),this.sourceSpan(t),e,n):new q(this.span(t),this.sourceSpan(t),e,n);return new $(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let s=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new I(e.span.start,n);return t.push(new ne(a,e,s)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Ce||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:s}=e.span,n=this.input.substring(t,s);return new R(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let s=new I(e.span.start,this.currentAbsoluteOffset);return new T(s,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new I(e,this.currentAbsoluteOffset);return new T(n,t,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new G(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),eh+g.length,0);s+=a,t+=a}e.set(s,t),n++}return e}var ht="angular-estree-parser",De="NgEstreeParser",Ue=0,Ae=[ht,Ue];function pt(){return new fe(new le)}function Oe(r,e){let t=pt(),{astInput:s,comments:n}=wr(r,t),{ast:i,errors:a}=e(s,t);return vt(a),{ast:i,comments:n}}function ut(r){return Oe(r,(e,t)=>t.parseBinding(e,...Ae))}function lt(r){return Oe(r,(e,t)=>t.parseSimpleBinding(e,...Ae))}function xt(r){return Oe(r,(e,t)=>t.parseAction(e,!1,...Ae))}function dt(r){return Oe(r,(e,t)=>{let s=t.parseInterpolationExpression(e,...Ae);return s.ast=s.ast.expressions[0],s})}function ft(r){let e=pt(),{templateBindings:t,errors:s}=e.parseTemplateBindings(De,r,ht,Ue,Ue);return vt(s),t}function vt(r){if(r.length!==0){let[{message:e}]=r;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function wr(r,e){let t=e._commentStart(r);return t===null?{astInput:r,comments:[]}:{astInput:r.slice(0,t),comments:[{type:"Comment",value:r.slice(t+2),sourceSpan:{start:t,end:r.length}}]}}function gt(r){return r instanceof B?"Unary":r instanceof A?"Binary":r instanceof Y?"BindingPipe":r instanceof re?"Call":r instanceof V?"Chain":r instanceof Q?"Conditional":r instanceof $?"EmptyExpr":r instanceof L?"ImplicitReceiver":r instanceof q?"KeyedRead":r instanceof j?"SafeKeyedRead":r instanceof X?"KeyedWrite":r instanceof Z?"LiteralArray":r instanceof J?"LiteralMap":r instanceof C?"LiteralPrimitive":r instanceof te?"NonNullAssert":r instanceof ee?"PrefixNot":r instanceof b?"PropertyRead":r instanceof H?"PropertyWrite":r instanceof se?"SafeCall":r instanceof z?"SafePropertyRead":r.type}function ct({start:r,end:e},t){let s=r,n=e;for(;n!==s&&/\s/.test(t[n-1]);)n--;for(;s!==n&&/\s/.test(t[s]);)s++;return{start:s,end:n}}function yr({start:r,end:e},t){let s=r,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;s!==0&&/\s/.test(t[s-1]);)s--;return{start:s,end:n}}function Er(r,e){return e[r.start-1]==="("&&e[r.end]===")"?{start:r.start-1,end:r.end+1}:r}function St(r,e,t){let s=0,n={start:r.start,end:r.end};for(;;){let i=yr(n,e),a=Er(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,s++}return{hasParens:(t?s-1:s)!==0,outerSpan:ct(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:ct(r,e)}}function mt(r){return typeof r=="string"?e=>e===r:e=>r.test(e)}function wt(r,e,t){let s=mt(e);for(let n=t;n>=0;n--){let i=r[n];if(s(i))return n}throw new Error(`Cannot find front char ${e} from index ${t} in ${JSON.stringify(r)}`)}function yt(r,e,t){let s=mt(e);for(let n=t;n{if(!(r&&e==null))return Array.isArray(e)||typeof e=="string"?e[t<0?e.length+t:t]:e.at(t)},Ne=$r;var D=(r,e,t=!1)=>{let s=gt(r);switch(s){case"Unary":{let{operator:o,expr:u}=r,v=n(u);return a("UnaryExpression",{prefix:!0,argument:v,operator:o},r.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:o,operation:u,right:v}=r,c=n(o),x=n(v);return a(u==="&&"||u==="||"||u==="??"?"LogicalExpression":"BinaryExpression",{left:c,right:x,operator:u},{start:E(c),end:S(x)},{hasParentParens:t})}case"BindingPipe":{let{exp:o,name:u,args:v}=r,c=n(o),x=e.getCharacterIndex(/\S/,e.getCharacterIndex("|",S(c))+1),l=a("Identifier",{name:u},{start:x,end:x+u.length}),p=v.map(n);return a("NGPipeExpression",{left:c,right:l,arguments:p},{start:E(c),end:S(p.length===0?l:Ne(!1,p,-1))},{hasParentParens:t})}case"Chain":{let{expressions:o}=r;return a("NGChainedExpression",{expressions:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:o}=r;return a("CommentLine",{value:o},r.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:o,trueExp:u,falseExp:v}=r,c=n(o),x=n(u),l=n(v);return a("ConditionalExpression",{test:c,consequent:x,alternate:l},{start:E(c),end:S(l)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},r.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},r.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let o=s==="SafeKeyedRead",{key:u}=r,v=Object.prototype.hasOwnProperty.call(r,"receiver")?r.receiver:r.obj,c=n(u);return h(v,c,{computed:!0,optional:o},{end:r.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:o}=r;return a("ArrayExpression",{elements:o.map(n)},r.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:o,values:u}=r,v=u.map(x=>n(x)),c=o.map(({key:x,quoted:l},p)=>{let k=v[p],m=E(k),N=S(k),ue=e.getCharacterIndex(/\S/,p===0?r.sourceSpan.start+1:e.getCharacterIndex(",",S(v[p-1]))+1),It=m===ue?N:e.getCharacterLastIndex(/\S/,e.getCharacterLastIndex(":",m-1)-1)+1,He={start:ue,end:It},ge=l?a("StringLiteral",{value:x},He):a("Identifier",{name:x},He),kt=ge.end=o.sourceSpan.end||/^\s+$/.test(e.text.slice(o.sourceSpan.start,o.sourceSpan.end))}function d(o){return(o.type==="OptionalCallExpression"||o.type==="OptionalMemberExpression")&&!y(o)}function y(o){return o.extra&&o.extra.parenthesized}function E(o){return y(o)?o.extra.parenStart:o.start}function S(o){return y(o)?o.extra.parenEnd:o.end}};function Ie(r,e,t=!1,s=!1){if(!t){let{start:g,end:d}=r;return{start:g,end:d,range:[g,d]}}let{outerSpan:n,innerSpan:{start:i,end:a},hasParens:h}=St(r,e.text,s);return{start:i,end:a,range:[i,a],...h&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}function $t(r,e){r.forEach(o);let[t]=r,{key:s}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?r.slice(1):r,i=[],a=null;for(let c=0;c({...N,...Ie({start:N.start,end:ue},e)}),k=N=>({...p(N,l.end),alias:l}),m=i.pop();if(m.type==="NGMicrosyntaxExpression")i.push(k(m));else if(m.type==="NGMicrosyntaxKeyedExpression"){let N=k(m.expression);i.push(p({...m,expression:N},N.end))}else throw new Error(`Unexpected type ${m.type}`)}else i.push(h(x,c));a=x}return d("NGMicrosyntax",{body:i},i.length===0?r[0].sourceSpan:{start:i[0].start,end:Ne(!1,i,-1).end});function h(c,x){if(E(c)){let{key:l,value:p}=c;return p?x===0?d("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan):d("NGMicrosyntaxKeyedExpression",{key:d("NGMicrosyntaxKey",{name:y(l.source)},l.span),expression:d("NGMicrosyntaxExpression",{expression:g(p.ast),alias:null},p.sourceSpan)},{start:l.span.start,end:p.sourceSpan.end}):d("NGMicrosyntaxKey",{name:y(l.source)},l.span)}else{let{key:l,sourceSpan:p}=c;if(/^let\s$/.test(e.text.slice(p.start,p.start+4))){let{value:m}=c;return d("NGMicrosyntaxLet",{key:d("NGMicrosyntaxKey",{name:l.source},l.span),value:m?d("NGMicrosyntaxKey",{name:m.source},m.span):null},{start:p.start,end:m?m.span.end:l.span.end})}else{let m=v(c);return d("NGMicrosyntaxAs",{key:d("NGMicrosyntaxKey",{name:m.source},m.span),alias:d("NGMicrosyntaxKey",{name:l.source},l.span)},{start:m.span.start,end:l.span.end})}}}function g(c){return D(c,e)}function d(c,x,l,p=!0){return{type:c,...Ie(l,e,p),...x}}function y(c){return Et(c.slice(s.source.length))}function E(c){return c instanceof ne}function S(c){return c instanceof T}function o(c){u(c.key.span),S(c)&&c.value&&u(c.value.span)}function u(c){if(e.text[c.start]!=='"'&&e.text[c.start]!=="'")return;let x=e.text[c.start],l=!1;for(let p=c.start+1;p{let{ast:t,comments:s}=r(e),n=new ve(e),i=D(t,n);return i.comments=s.map(a=>D(a,n)),i}}var Ct=ke(ut),ns=ke(lt),At=ke(dt),Ge=ke(xt),Ot=r=>$t(ft(r),new ve(r));function We(r){var s,n,i;let e=((s=r.range)==null?void 0:s[0])??r.start,t=(i=((n=r.declaration)==null?void 0:n.decorators)??r.decorators)==null?void 0:i[0];return t?Math.min(We(t),e):e}function Nt(r){var e;return((e=r.range)==null?void 0:e[1])??r.end}function Re(r){return{astFormat:"estree",parse(e){let t=r(e);return{type:"NGRoot",node:r===Ge&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:We,locEnd:Nt}}var Cr=Re(Ge),Ar=Re(Ct),Or=Re(At),Nr=Re(Ot);var hs=Qe;export{hs as default,Ve as parsers}; diff --git a/node_modules/prettier/plugins/babel.js b/node_modules/prettier/plugins/babel.js index 6ceaf14..ef9ae57 100644 --- a/node_modules/prettier/plugins/babel.js +++ b/node_modules/prettier/plugins/babel.js @@ -1,16 +1,16 @@ -(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e()}})(function(){"use strict";var Ws=Object.create;var Ce=Object.defineProperty;var Js=Object.getOwnPropertyDescriptor;var Xs=Object.getOwnPropertyNames;var Gs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var Lt=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),Qs=(a,t)=>{for(var e in t)Ce(a,e,{get:t[e],enumerable:!0})},Dt=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xs(t))!Ys.call(a,i)&&i!==e&&Ce(a,i,{get:()=>t[i],enumerable:!(s=Js(t,i))||s.enumerable});return a};var qe=(a,t,e)=>(e=a!=null?Ws(Gs(a)):{},Dt(t||!a||!a.__esModule?Ce(e,"default",{value:a,enumerable:!0}):e,a)),Zs=a=>Dt(Ce({},"__esModule",{value:!0}),a);var Ct=Lt(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});function De(a,t){if(a==null)return{};var e={},s=Object.keys(a),i,r;for(r=0;r=0)&&(e[i]=a[i]);return e}var F=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},te=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function L(a,t){let{line:e,column:s,index:i}=a;return new F(e,s+t,i+t)}var Mt="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",ei={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Mt},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Mt}},Ot={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Ne=({type:a,prefix:t})=>a==="UpdateExpression"?Ot.UpdateExpression[String(t)]:Ot[a],ti={AccessorIsGenerator:({kind:a})=>`A ${a}ter 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.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor 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:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',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:({exportName:a})=>`\`${a}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:a})=>`'import.${a}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:a,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`. +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e()}})(function(){"use strict";var Ws=Object.create;var we=Object.defineProperty;var Js=Object.getOwnPropertyDescriptor;var Xs=Object.getOwnPropertyNames;var Gs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var Lt=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),Qs=(a,t)=>{for(var e in t)we(a,e,{get:t[e],enumerable:!0})},Dt=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xs(t))!Ys.call(a,i)&&i!==e&&we(a,i,{get:()=>t[i],enumerable:!(s=Js(t,i))||s.enumerable});return a};var Ve=(a,t,e)=>(e=a!=null?Ws(Gs(a)):{},Dt(t||!a||!a.__esModule?we(e,"default",{value:a,enumerable:!0}):e,a)),Zs=a=>Dt(we({},"__esModule",{value:!0}),a);var wt=Lt(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});function Xt(a,t){if(a==null)return{};var e={},s=Object.keys(a),i,r;for(r=0;r=0)&&(e[i]=a[i]);return e}var F=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},te=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function L(a,t){let{line:e,column:s,index:i}=a;return new F(e,s+t,i+t)}var Mt="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",ei={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Mt},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Mt}},Ot={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Ie=({type:a,prefix:t})=>a==="UpdateExpression"?Ot.UpdateExpression[String(t)]:Ot[a],ti={AccessorIsGenerator:({kind:a})=>`A ${a}ter 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.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor 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:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',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:({exportName:a})=>`\`${a}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:a})=>`'import.${a}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:a,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`. - Did you mean \`export { '${a}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding. -- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:a})=>`\`import()\` requires exactly ${a===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${Ne(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${Ne(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${Ne(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} 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:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",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.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(t=>JSON.stringify(t)).join(", ")}.`,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:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' 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.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,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 or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",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:({keyword:a})=>`Unexpected keyword '${a}'.`,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 or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:a})=>`Unexpected reserved word '${a}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:a,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${a?`, expected "${a}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",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:({target:a,onlyValidPropertyName:t})=>`The only valid meta property for ${a} is ${a}.${t}.`,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.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:a})=>`Identifier '${a}' 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."},si={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:a})=>`Assigning to '${a}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:a})=>`Binding '${a}' 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."},ii=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),ri={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:a})=>`Invalid topic token ${a}. In order to use ${a} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${a}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:a})=>`Hack-style pipe body cannot be an unparenthesized ${Ne({type:a})}; please wrap it in parentheses.`,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:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},ai=["toMessage"],ni=["message"];function Ft(a,t,e){Object.defineProperty(a,t,{enumerable:!1,configurable:!0,value:e})}function oi(a){let{toMessage:t}=a,e=De(a,ai);return function s({loc:i,details:r}){let n=new SyntaxError;return Object.assign(n,e,{loc:i,pos:i.index}),"missingPlugin"in r&&Object.assign(n,{missingPlugin:r.missingPlugin}),Ft(n,"clone",function(h={}){var l;let{line:c,column:u,index:f}=(l=h.loc)!=null?l:i;return s({loc:new F(c,u,f),details:Object.assign({},r,h.details)})}),Ft(n,"details",r),Object.defineProperty(n,"message",{configurable:!0,get(){let o=`${t(r)} (${i.line}:${i.column})`;return this.message=o,o},set(o){Object.defineProperty(this,"message",{value:o,writable:!0})}}),n}}function $(a,t){if(Array.isArray(a))return s=>$(s,a[0]);let e={};for(let s of Object.keys(a)){let i=a[s],r=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:n}=r,o=De(r,ni),h=typeof n=="string"?()=>n:n;e[s]=oi(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:h},t?{syntaxPlugin:t}:{},o))}return e}var p=Object.assign({},$(ei),$(ti),$(si),$`pipelineOperator`(ri)),{defineProperty:hi}=Object,Bt=(a,t)=>hi(a,t,{enumerable:!1,value:a[t]});function le(a){return a.loc.start&&Bt(a.loc.start,"index"),a.loc.end&&Bt(a.loc.end,"index"),a}var li=a=>class extends a{parse(){let e=le(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(le)),e}parseRegExpLiteral({pattern:e,flags:s}){let i=null;try{i=new RegExp(e,s)}catch{}let r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let i=this.estreeParseLiteral(s);return i.bigint=String(i.value||e),i}parseDecimalLiteral(e){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||e),i}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;let i=e;return i.type="ExpressionStatement",i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,i,r,n){super.parseBlockBody(e,s,i,r,n);let o=e.directives.map(h=>this.directiveToStmt(h));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,i,r,n,o){this.parseMethod(s,i,r,n,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){let i=super.parseLiteral(e,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,s,i=!1){super.parseFunctionBody(e,s,i),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,i,r,n,o,h=!1){let l=this.startNode();return l.kind=e.kind,l=super.parseMethod(l,s,i,r,n,o,h),l.type="FunctionExpression",delete l.kind,e.value=l,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){let s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,i,r,n){let o=super.parseObjectMethod(e,s,i,r,n);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,i,r){let n=super.parseObjectProperty(e,s,i,r);return n&&(n.kind="init",n.type="Property"),n}isValidLVal(e,s,i){return e==="Property"?"value":super.isValidLVal(e,s,i)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){let{key:i,value:r}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(r,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,i){e.kind==="get"||e.kind==="set"?this.raise(p.PatternHasAccessor,{at:e.key}):e.method?this.raise(p.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,s,i)}finishCallExpression(e,s){let i=super.finishCallExpression(e,s);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var r,n;i.options=(r=i.arguments[1])!=null?r:null,i.attributes=(n=i.arguments[1])!=null?n:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let i=this.state.lastTokStartLoc,r=super.parseExport(e,s);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":r.specifiers.length===1&&r.specifiers[0].type==="ExportNamespaceSpecifier"&&(r.type="ExportAllDeclaration",r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":{var n;let{declaration:o}=r;(o==null?void 0:o.type)==="ClassDeclaration"&&((n=o.decorators)==null?void 0:n.length)>0&&o.start===r.start&&this.resetStartLocation(r,i)}break}return r}parseSubscript(e,s,i,r){let n=super.parseSubscript(e,s,i,r);if(r.optionalChainMember){if((n.type==="OptionalMemberExpression"||n.type==="OptionalCallExpression")&&(n.type=n.type.substring(8)),r.stop){let o=this.startNodeAtNode(n);return o.expression=n,this.finishNode(o,"ChainExpression")}}else(n.type==="MemberExpression"||n.type==="CallExpression")&&(n.optional=!1);return n}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.method||e.kind==="get"||e.kind==="set"}finishNodeAt(e,s,i){return le(super.finishNodeAt(e,s,i))}resetStartLocation(e,s){super.resetStartLocation(e,s),le(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),le(e)}},X=class{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}},w={brace:new X("{"),j_oTag:new X("...",!0)};w.template=new X("`",!0);var b=!0,m=!0,ze=!0,ce=!0,q=!0,ci=!0,Me=class{constructor(t,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.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},mt=new Map;function A(a,t={}){t.keyword=a;let e=P(a,t);return mt.set(a,e),e}function v(a,t){return P(a,{beforeExpr:b,binop:t})}var de=-1,U=[],yt=[],xt=[],Pt=[],gt=[],Tt=[];function P(a,t={}){var e,s,i,r;return++de,yt.push(a),xt.push((e=t.binop)!=null?e:-1),Pt.push((s=t.beforeExpr)!=null?s:!1),gt.push((i=t.startsExpr)!=null?i:!1),Tt.push((r=t.prefix)!=null?r:!1),U.push(new Me(a,t)),de}function T(a,t={}){var e,s,i,r;return++de,mt.set(a,de),yt.push(a),xt.push((e=t.binop)!=null?e:-1),Pt.push((s=t.beforeExpr)!=null?s:!1),gt.push((i=t.startsExpr)!=null?i:!1),Tt.push((r=t.prefix)!=null?r:!1),U.push(new Me("name",t)),de}var pi={bracketL:P("[",{beforeExpr:b,startsExpr:m}),bracketHashL:P("#[",{beforeExpr:b,startsExpr:m}),bracketBarL:P("[|",{beforeExpr:b,startsExpr:m}),bracketR:P("]"),bracketBarR:P("|]"),braceL:P("{",{beforeExpr:b,startsExpr:m}),braceBarL:P("{|",{beforeExpr:b,startsExpr:m}),braceHashL:P("#{",{beforeExpr:b,startsExpr:m}),braceR:P("}"),braceBarR:P("|}"),parenL:P("(",{beforeExpr:b,startsExpr:m}),parenR:P(")"),comma:P(",",{beforeExpr:b}),semi:P(";",{beforeExpr:b}),colon:P(":",{beforeExpr:b}),doubleColon:P("::",{beforeExpr:b}),dot:P("."),question:P("?",{beforeExpr:b}),questionDot:P("?."),arrow:P("=>",{beforeExpr:b}),template:P("template"),ellipsis:P("...",{beforeExpr:b}),backQuote:P("`",{startsExpr:m}),dollarBraceL:P("${",{beforeExpr:b,startsExpr:m}),templateTail:P("...`",{startsExpr:m}),templateNonTail:P("...${",{beforeExpr:b,startsExpr:m}),at:P("@"),hash:P("#",{startsExpr:m}),interpreterDirective:P("#!..."),eq:P("=",{beforeExpr:b,isAssign:ce}),assign:P("_=",{beforeExpr:b,isAssign:ce}),slashAssign:P("_=",{beforeExpr:b,isAssign:ce}),xorAssign:P("_=",{beforeExpr:b,isAssign:ce}),moduloAssign:P("_=",{beforeExpr:b,isAssign:ce}),incDec:P("++/--",{prefix:q,postfix:ci,startsExpr:m}),bang:P("!",{beforeExpr:b,prefix:q,startsExpr:m}),tilde:P("~",{beforeExpr:b,prefix:q,startsExpr:m}),doubleCaret:P("^^",{startsExpr:m}),doubleAt:P("@@",{startsExpr:m}),pipeline:v("|>",0),nullishCoalescing:v("??",1),logicalOR:v("||",1),logicalAND:v("&&",2),bitwiseOR:v("|",3),bitwiseXOR:v("^",4),bitwiseAND:v("&",5),equality:v("==/!=/===/!==",6),lt:v("/<=/>=",7),gt:v("/<=/>=",7),relational:v("/<=/>=",7),bitShift:v("<>/>>>",8),bitShiftL:v("<>/>>>",8),bitShiftR:v("<>/>>>",8),plusMin:P("+/-",{beforeExpr:b,binop:9,prefix:q,startsExpr:m}),modulo:P("%",{binop:10,startsExpr:m}),star:P("*",{binop:10}),slash:v("/",10),exponent:P("**",{beforeExpr:b,binop:11,rightAssociative:!0}),_in:A("in",{beforeExpr:b,binop:7}),_instanceof:A("instanceof",{beforeExpr:b,binop:7}),_break:A("break"),_case:A("case",{beforeExpr:b}),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",{beforeExpr:b}),_else:A("else",{beforeExpr:b}),_finally:A("finally"),_function:A("function",{startsExpr:m}),_if:A("if"),_return:A("return",{beforeExpr:b}),_switch:A("switch"),_throw:A("throw",{beforeExpr:b,prefix:q,startsExpr:m}),_try:A("try"),_var:A("var"),_const:A("const"),_with:A("with"),_new:A("new",{beforeExpr:b,startsExpr:m}),_this:A("this",{startsExpr:m}),_super:A("super",{startsExpr:m}),_class:A("class",{startsExpr:m}),_extends:A("extends",{beforeExpr:b}),_export:A("export"),_import:A("import",{startsExpr:m}),_null:A("null",{startsExpr:m}),_true:A("true",{startsExpr:m}),_false:A("false",{startsExpr:m}),_typeof:A("typeof",{beforeExpr:b,prefix:q,startsExpr:m}),_void:A("void",{beforeExpr:b,prefix:q,startsExpr:m}),_delete:A("delete",{beforeExpr:b,prefix:q,startsExpr:m}),_do:A("do",{isLoop:ze,beforeExpr:b}),_for:A("for",{isLoop:ze}),_while:A("while",{isLoop:ze}),_as:T("as",{startsExpr:m}),_assert:T("assert",{startsExpr:m}),_async:T("async",{startsExpr:m}),_await:T("await",{startsExpr:m}),_defer:T("defer",{startsExpr:m}),_from:T("from",{startsExpr:m}),_get:T("get",{startsExpr:m}),_let:T("let",{startsExpr:m}),_meta:T("meta",{startsExpr:m}),_of:T("of",{startsExpr:m}),_sent:T("sent",{startsExpr:m}),_set:T("set",{startsExpr:m}),_source:T("source",{startsExpr:m}),_static:T("static",{startsExpr:m}),_using:T("using",{startsExpr:m}),_yield:T("yield",{startsExpr:m}),_asserts:T("asserts",{startsExpr:m}),_checks:T("checks",{startsExpr:m}),_exports:T("exports",{startsExpr:m}),_global:T("global",{startsExpr:m}),_implements:T("implements",{startsExpr:m}),_intrinsic:T("intrinsic",{startsExpr:m}),_infer:T("infer",{startsExpr:m}),_is:T("is",{startsExpr:m}),_mixins:T("mixins",{startsExpr:m}),_proto:T("proto",{startsExpr:m}),_require:T("require",{startsExpr:m}),_satisfies:T("satisfies",{startsExpr:m}),_keyof:T("keyof",{startsExpr:m}),_readonly:T("readonly",{startsExpr:m}),_unique:T("unique",{startsExpr:m}),_abstract:T("abstract",{startsExpr:m}),_declare:T("declare",{startsExpr:m}),_enum:T("enum",{startsExpr:m}),_module:T("module",{startsExpr:m}),_namespace:T("namespace",{startsExpr:m}),_interface:T("interface",{startsExpr:m}),_type:T("type",{startsExpr:m}),_opaque:T("opaque",{startsExpr:m}),name:P("name",{startsExpr:m}),string:P("string",{startsExpr:m}),num:P("num",{startsExpr:m}),bigint:P("bigint",{startsExpr:m}),decimal:P("decimal",{startsExpr:m}),regexp:P("regexp",{startsExpr:m}),privateName:P("#name",{startsExpr:m}),eof:P("eof"),jsxName:P("jsxName"),jsxText:P("jsxText",{beforeExpr:!0}),jsxTagStart:P("jsxTagStart",{startsExpr:!0}),jsxTagEnd:P("jsxTagEnd"),placeholder:P("%%",{startsExpr:!0})};function S(a){return a>=93&&a<=132}function ui(a){return a<=92}function M(a){return a>=58&&a<=132}function Xt(a){return a>=58&&a<=136}function fi(a){return Pt[a]}function Xe(a){return gt[a]}function di(a){return a>=29&&a<=33}function Rt(a){return a>=129&&a<=131}function mi(a){return a>=90&&a<=92}function bt(a){return a>=58&&a<=92}function yi(a){return a>=39&&a<=59}function xi(a){return a===34}function Pi(a){return Tt[a]}function gi(a){return a>=121&&a<=123}function Ti(a){return a>=124&&a<=130}function H(a){return yt[a]}function ke(a){return xt[a]}function bi(a){return a===57}function Oe(a){return a>=24&&a<=25}function _(a){return U[a]}U[8].updateContext=a=>{a.pop()},U[5].updateContext=U[7].updateContext=U[23].updateContext=a=>{a.push(w.brace)},U[22].updateContext=a=>{a[a.length-1]===w.template?a.pop():a.push(w.template)},U[142].updateContext=a=>{a.push(w.j_expr,w.j_oTag)};var At="\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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",Gt="\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",Ai=new RegExp("["+At+"]"),Si=new RegExp("["+At+Gt+"]");At=Gt=null;var Yt=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,38,6,186,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,19,72,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,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,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,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,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],wi=[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,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Ge(a,t){let e=65536;for(let s=0,i=t.length;sa)return!1;if(e+=t[s+1],e>=a)return!0}return!1}function j(a){return a<65?a===36:a<=90?!0:a<97?a===95:a<=122?!0:a<=65535?a>=170&&Ai.test(String.fromCharCode(a)):Ge(a,Yt)}function Z(a){return a<48?a===36:a<58?!0:a<65?!1:a<=90?!0:a<97?a===95:a<=122?!0:a<=65535?a>=170&&Si.test(String.fromCharCode(a)):Ge(a,Yt)||Ge(a,wi)}var St={keyword:["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"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Ci=new Set(St.keyword),Ei=new Set(St.strict),Ii=new Set(St.strictBind);function Qt(a,t){return t&&a==="await"||a==="enum"}function Zt(a,t){return Qt(a,t)||Ei.has(a)}function es(a){return Ii.has(a)}function ts(a,t){return Zt(a,t)||es(a)}function Ni(a){return Ci.has(a)}function ki(a,t,e){return a===64&&t===64&&j(e)}var vi=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","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Li(a){return vi.has(a)}var ye=class{constructor(t){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=t}},xe=class{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new ye(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let i=this.currentScope();if(e&8||e&16)this.checkRedeclarationInScope(i,t,e,s),e&16?i.functions.add(t):i.lexical.add(t),e&8&&this.maybeExportDefined(i,t);else if(e&4)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,t,e,s),i.var.add(t),this.maybeExportDefined(i,t),!(i.flags&387));--r);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(p.VarRedeclaration,{at:i,identifierName:e})}isRedeclaredInScope(t,e,s){return s&1?s&8?t.lexical.has(e)||t.functions.has(e)||t.var.has(e):s&16?t.lexical.has(e)||!this.treatFunctionsAsVarInScope(t)&&t.var.has(e):t.lexical.has(e)&&!(t.flags&8&&t.lexical.values().next().value===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.has(e):!1}checkLocalExport(t){let{name:e}=t,s=this.scopeStack[0];!s.lexical.has(e)&&!s.var.has(e)&&!s.functions.has(e)&&this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}},Ye=class extends ye{constructor(...t){super(...t),this.declareFunctions=new Set}},Qe=class extends xe{createScope(t){return new Ye(t)}declareName(t,e,s){let i=this.currentScope();if(e&2048){this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t),i.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){return super.isRedeclaredInScope(t,e,s)?!0:s&2048?!t.declareFunctions.has(e)&&(t.lexical.has(e)||t.functions.has(e)):!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},Ze=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[e,s]=t;if(!this.hasPlugin(e))return!1;let i=this.plugins.get(e);for(let r of Object.keys(s))if((i==null?void 0:i[r])!==s[r])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}};function ss(a,t){a.trailingComments===void 0?a.trailingComments=t:a.trailingComments.unshift(...t)}function Di(a,t){a.leadingComments===void 0?a.leadingComments=t:a.leadingComments.unshift(...t)}function Pe(a,t){a.innerComments===void 0?a.innerComments=t:a.innerComments.unshift(...t)}function pe(a,t,e){let s=null,i=t.length;for(;s===null&&i>0;)s=t[--i];s===null||s.start>e.start?Pe(a,e.comments):ss(s,e.comments)}var et=class extends Ze{addComment(t){this.filename&&(t.loc.filename=this.filename),this.state.comments.push(t)}processComment(t){let{commentStack:e}=this.state,s=e.length;if(s===0)return;let i=s-1,r=e[i];r.start===t.end&&(r.leadingNode=t,i--);let{start:n}=t;for(;i>=0;i--){let o=e[i],h=o.end;if(h>n)o.containingNode=t,this.finalizeComment(o),e.splice(i,1);else{h===n&&(o.trailingNode=t);break}}}finalizeComment(t){let{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&ss(t.leadingNode,e),t.trailingNode!==null&&Di(t.trailingNode,e);else{let{containingNode:s,start:i}=t;if(this.input.charCodeAt(i-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":pe(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":pe(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":pe(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":pe(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":pe(s,s.specifiers,t);break;default:Pe(s,e)}else Pe(s,e)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:e}=this.state,{length:s}=e;if(s===0)return;let i=e[s-1];i.leadingNode===t&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){let{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){let{commentStack:i}=this.state,r=i.length;if(r===0)return;let n=r-1;for(;n>=0;n--){let o=i[n],h=o.end;if(o.start===s)o.leadingNode=t;else if(h===e)o.trailingNode=t;else if(h=48&&t<=57},Ut={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Ie={bin:a=>a===48||a===49,oct:a=>a>=48&&a<=55,dec:a=>a>=48&&a<=57,hex:a=>a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102};function jt(a,t,e,s,i,r){let n=e,o=s,h=i,l="",c=null,u=e,{length:f}=t;for(;;){if(e>=f){r.unterminated(n,o,h),l+=t.slice(u,e);break}let d=t.charCodeAt(e);if(Fi(a,d,t,e)){l+=t.slice(u,e);break}if(d===92){l+=t.slice(u,e);let y=Bi(t,e,s,i,a==="template",r);y.ch===null&&!c?c={pos:e,lineStart:s,curLine:i}:l+=y.ch,{pos:e,lineStart:s,curLine:i}=y,u=e}else d===8232||d===8233?(++e,++i,s=e):d===10||d===13?a==="template"?(l+=t.slice(u,e)+` +- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:a})=>`\`import()\` requires exactly ${a===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${Ie(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${Ie(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${Ie(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} 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:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",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.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(t=>JSON.stringify(t)).join(", ")}.`,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:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' 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.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,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 or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",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:({keyword:a})=>`Unexpected keyword '${a}'.`,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 or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:a})=>`Unexpected reserved word '${a}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:a,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${a?`, expected "${a}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",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:({target:a,onlyValidPropertyName:t})=>`The only valid meta property for ${a} is ${a}.${t}.`,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.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:a})=>`Identifier '${a}' 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."},si={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:a})=>`Assigning to '${a}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:a})=>`Binding '${a}' 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."},ii=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),ri={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:a})=>`Invalid topic token ${a}. In order to use ${a} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${a}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:a})=>`Hack-style pipe body cannot be an unparenthesized ${Ie({type:a})}; please wrap it in parentheses.`,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:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},ai=["toMessage"],ni=["message"];function Ft(a,t,e){Object.defineProperty(a,t,{enumerable:!1,configurable:!0,value:e})}function oi(a){let{toMessage:t}=a,e=Xt(a,ai);return function s(i,r){let n=new SyntaxError;return Object.assign(n,e,{loc:i,pos:i.index}),"missingPlugin"in r&&Object.assign(n,{missingPlugin:r.missingPlugin}),Ft(n,"clone",function(h={}){var l;let{line:c,column:u,index:f}=(l=h.loc)!=null?l:i;return s(new F(c,u,f),Object.assign({},r,h.details))}),Ft(n,"details",r),Object.defineProperty(n,"message",{configurable:!0,get(){let o=`${t(r)} (${i.line}:${i.column})`;return this.message=o,o},set(o){Object.defineProperty(this,"message",{value:o,writable:!0})}}),n}}function $(a,t){if(Array.isArray(a))return s=>$(s,a[0]);let e={};for(let s of Object.keys(a)){let i=a[s],r=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:n}=r,o=Xt(r,ni),h=typeof n=="string"?()=>n:n;e[s]=oi(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:h},t?{syntaxPlugin:t}:{},o))}return e}var p=Object.assign({},$(ei),$(ti),$(si),$`pipelineOperator`(ri)),{defineProperty:hi}=Object,Bt=(a,t)=>hi(a,t,{enumerable:!1,value:a[t]});function he(a){return a.loc.start&&Bt(a.loc.start,"index"),a.loc.end&&Bt(a.loc.end,"index"),a}var li=a=>class extends a{parse(){let e=he(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(he)),e}parseRegExpLiteral({pattern:e,flags:s}){let i=null;try{i=new RegExp(e,s)}catch{}let r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let i=this.estreeParseLiteral(s);return i.bigint=String(i.value||e),i}parseDecimalLiteral(e){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||e),i}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;let i=e;return i.type="ExpressionStatement",i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,i,r,n){super.parseBlockBody(e,s,i,r,n);let o=e.directives.map(h=>this.directiveToStmt(h));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,i,r,n,o){this.parseMethod(s,i,r,n,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){let i=super.parseLiteral(e,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,s,i=!1){super.parseFunctionBody(e,s,i),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,i,r,n,o,h=!1){let l=this.startNode();return l.kind=e.kind,l=super.parseMethod(l,s,i,r,n,o,h),l.type="FunctionExpression",delete l.kind,e.value=l,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){let s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,i,r,n){let o=super.parseObjectMethod(e,s,i,r,n);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,i,r){let n=super.parseObjectProperty(e,s,i,r);return n&&(n.kind="init",n.type="Property"),n}isValidLVal(e,s,i){return e==="Property"?"value":super.isValidLVal(e,s,i)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){let{key:i,value:r}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(r,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,i){e.kind==="get"||e.kind==="set"?this.raise(p.PatternHasAccessor,e.key):e.method?this.raise(p.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,i)}finishCallExpression(e,s){let i=super.finishCallExpression(e,s);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var r,n;i.options=(r=i.arguments[1])!=null?r:null,i.attributes=(n=i.arguments[1])!=null?n:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let i=this.state.lastTokStartLoc,r=super.parseExport(e,s);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":r.specifiers.length===1&&r.specifiers[0].type==="ExportNamespaceSpecifier"&&(r.type="ExportAllDeclaration",r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":{var n;let{declaration:o}=r;(o==null?void 0:o.type)==="ClassDeclaration"&&((n=o.decorators)==null?void 0:n.length)>0&&o.start===r.start&&this.resetStartLocation(r,i)}break}return r}parseSubscript(e,s,i,r){let n=super.parseSubscript(e,s,i,r);if(r.optionalChainMember){if((n.type==="OptionalMemberExpression"||n.type==="OptionalCallExpression")&&(n.type=n.type.substring(8)),r.stop){let o=this.startNodeAtNode(n);return o.expression=n,this.finishNode(o,"ChainExpression")}}else(n.type==="MemberExpression"||n.type==="CallExpression")&&(n.optional=!1);return n}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.method||e.kind==="get"||e.kind==="set"}finishNodeAt(e,s,i){return he(super.finishNodeAt(e,s,i))}resetStartLocation(e,s){super.resetStartLocation(e,s),he(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),he(e)}},X=class{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}},w={brace:new X("{"),j_oTag:new X("...",!0)};w.template=new X("`",!0);var b=!0,m=!0,qe=!0,le=!0,q=!0,ci=!0,Le=class{constructor(t,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.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},dt=new Map;function A(a,t={}){t.keyword=a;let e=P(a,t);return dt.set(a,e),e}function v(a,t){return P(a,{beforeExpr:b,binop:t})}var fe=-1,U=[],mt=[],yt=[],xt=[],Pt=[],gt=[];function P(a,t={}){var e,s,i,r;return++fe,mt.push(a),yt.push((e=t.binop)!=null?e:-1),xt.push((s=t.beforeExpr)!=null?s:!1),Pt.push((i=t.startsExpr)!=null?i:!1),gt.push((r=t.prefix)!=null?r:!1),U.push(new Le(a,t)),fe}function T(a,t={}){var e,s,i,r;return++fe,dt.set(a,fe),mt.push(a),yt.push((e=t.binop)!=null?e:-1),xt.push((s=t.beforeExpr)!=null?s:!1),Pt.push((i=t.startsExpr)!=null?i:!1),gt.push((r=t.prefix)!=null?r:!1),U.push(new Le("name",t)),fe}var pi={bracketL:P("[",{beforeExpr:b,startsExpr:m}),bracketHashL:P("#[",{beforeExpr:b,startsExpr:m}),bracketBarL:P("[|",{beforeExpr:b,startsExpr:m}),bracketR:P("]"),bracketBarR:P("|]"),braceL:P("{",{beforeExpr:b,startsExpr:m}),braceBarL:P("{|",{beforeExpr:b,startsExpr:m}),braceHashL:P("#{",{beforeExpr:b,startsExpr:m}),braceR:P("}"),braceBarR:P("|}"),parenL:P("(",{beforeExpr:b,startsExpr:m}),parenR:P(")"),comma:P(",",{beforeExpr:b}),semi:P(";",{beforeExpr:b}),colon:P(":",{beforeExpr:b}),doubleColon:P("::",{beforeExpr:b}),dot:P("."),question:P("?",{beforeExpr:b}),questionDot:P("?."),arrow:P("=>",{beforeExpr:b}),template:P("template"),ellipsis:P("...",{beforeExpr:b}),backQuote:P("`",{startsExpr:m}),dollarBraceL:P("${",{beforeExpr:b,startsExpr:m}),templateTail:P("...`",{startsExpr:m}),templateNonTail:P("...${",{beforeExpr:b,startsExpr:m}),at:P("@"),hash:P("#",{startsExpr:m}),interpreterDirective:P("#!..."),eq:P("=",{beforeExpr:b,isAssign:le}),assign:P("_=",{beforeExpr:b,isAssign:le}),slashAssign:P("_=",{beforeExpr:b,isAssign:le}),xorAssign:P("_=",{beforeExpr:b,isAssign:le}),moduloAssign:P("_=",{beforeExpr:b,isAssign:le}),incDec:P("++/--",{prefix:q,postfix:ci,startsExpr:m}),bang:P("!",{beforeExpr:b,prefix:q,startsExpr:m}),tilde:P("~",{beforeExpr:b,prefix:q,startsExpr:m}),doubleCaret:P("^^",{startsExpr:m}),doubleAt:P("@@",{startsExpr:m}),pipeline:v("|>",0),nullishCoalescing:v("??",1),logicalOR:v("||",1),logicalAND:v("&&",2),bitwiseOR:v("|",3),bitwiseXOR:v("^",4),bitwiseAND:v("&",5),equality:v("==/!=/===/!==",6),lt:v("/<=/>=",7),gt:v("/<=/>=",7),relational:v("/<=/>=",7),bitShift:v("<>/>>>",8),bitShiftL:v("<>/>>>",8),bitShiftR:v("<>/>>>",8),plusMin:P("+/-",{beforeExpr:b,binop:9,prefix:q,startsExpr:m}),modulo:P("%",{binop:10,startsExpr:m}),star:P("*",{binop:10}),slash:v("/",10),exponent:P("**",{beforeExpr:b,binop:11,rightAssociative:!0}),_in:A("in",{beforeExpr:b,binop:7}),_instanceof:A("instanceof",{beforeExpr:b,binop:7}),_break:A("break"),_case:A("case",{beforeExpr:b}),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",{beforeExpr:b}),_else:A("else",{beforeExpr:b}),_finally:A("finally"),_function:A("function",{startsExpr:m}),_if:A("if"),_return:A("return",{beforeExpr:b}),_switch:A("switch"),_throw:A("throw",{beforeExpr:b,prefix:q,startsExpr:m}),_try:A("try"),_var:A("var"),_const:A("const"),_with:A("with"),_new:A("new",{beforeExpr:b,startsExpr:m}),_this:A("this",{startsExpr:m}),_super:A("super",{startsExpr:m}),_class:A("class",{startsExpr:m}),_extends:A("extends",{beforeExpr:b}),_export:A("export"),_import:A("import",{startsExpr:m}),_null:A("null",{startsExpr:m}),_true:A("true",{startsExpr:m}),_false:A("false",{startsExpr:m}),_typeof:A("typeof",{beforeExpr:b,prefix:q,startsExpr:m}),_void:A("void",{beforeExpr:b,prefix:q,startsExpr:m}),_delete:A("delete",{beforeExpr:b,prefix:q,startsExpr:m}),_do:A("do",{isLoop:qe,beforeExpr:b}),_for:A("for",{isLoop:qe}),_while:A("while",{isLoop:qe}),_as:T("as",{startsExpr:m}),_assert:T("assert",{startsExpr:m}),_async:T("async",{startsExpr:m}),_await:T("await",{startsExpr:m}),_defer:T("defer",{startsExpr:m}),_from:T("from",{startsExpr:m}),_get:T("get",{startsExpr:m}),_let:T("let",{startsExpr:m}),_meta:T("meta",{startsExpr:m}),_of:T("of",{startsExpr:m}),_sent:T("sent",{startsExpr:m}),_set:T("set",{startsExpr:m}),_source:T("source",{startsExpr:m}),_static:T("static",{startsExpr:m}),_using:T("using",{startsExpr:m}),_yield:T("yield",{startsExpr:m}),_asserts:T("asserts",{startsExpr:m}),_checks:T("checks",{startsExpr:m}),_exports:T("exports",{startsExpr:m}),_global:T("global",{startsExpr:m}),_implements:T("implements",{startsExpr:m}),_intrinsic:T("intrinsic",{startsExpr:m}),_infer:T("infer",{startsExpr:m}),_is:T("is",{startsExpr:m}),_mixins:T("mixins",{startsExpr:m}),_proto:T("proto",{startsExpr:m}),_require:T("require",{startsExpr:m}),_satisfies:T("satisfies",{startsExpr:m}),_keyof:T("keyof",{startsExpr:m}),_readonly:T("readonly",{startsExpr:m}),_unique:T("unique",{startsExpr:m}),_abstract:T("abstract",{startsExpr:m}),_declare:T("declare",{startsExpr:m}),_enum:T("enum",{startsExpr:m}),_module:T("module",{startsExpr:m}),_namespace:T("namespace",{startsExpr:m}),_interface:T("interface",{startsExpr:m}),_type:T("type",{startsExpr:m}),_opaque:T("opaque",{startsExpr:m}),name:P("name",{startsExpr:m}),string:P("string",{startsExpr:m}),num:P("num",{startsExpr:m}),bigint:P("bigint",{startsExpr:m}),decimal:P("decimal",{startsExpr:m}),regexp:P("regexp",{startsExpr:m}),privateName:P("#name",{startsExpr:m}),eof:P("eof"),jsxName:P("jsxName"),jsxText:P("jsxText",{beforeExpr:!0}),jsxTagStart:P("jsxTagStart",{startsExpr:!0}),jsxTagEnd:P("jsxTagEnd"),placeholder:P("%%",{startsExpr:!0})};function S(a){return a>=93&&a<=132}function ui(a){return a<=92}function M(a){return a>=58&&a<=132}function Gt(a){return a>=58&&a<=136}function fi(a){return xt[a]}function Je(a){return Pt[a]}function di(a){return a>=29&&a<=33}function Rt(a){return a>=129&&a<=131}function mi(a){return a>=90&&a<=92}function Tt(a){return a>=58&&a<=92}function yi(a){return a>=39&&a<=59}function xi(a){return a===34}function Pi(a){return gt[a]}function gi(a){return a>=121&&a<=123}function Ti(a){return a>=124&&a<=130}function H(a){return mt[a]}function Ne(a){return yt[a]}function bi(a){return a===57}function De(a){return a>=24&&a<=25}function _(a){return U[a]}U[8].updateContext=a=>{a.pop()},U[5].updateContext=U[7].updateContext=U[23].updateContext=a=>{a.push(w.brace)},U[22].updateContext=a=>{a[a.length-1]===w.template?a.pop():a.push(w.template)},U[142].updateContext=a=>{a.push(w.j_expr,w.j_oTag)};var bt="\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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",Yt="\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",Ai=new RegExp("["+bt+"]"),Si=new RegExp("["+bt+Yt+"]");bt=Yt=null;var Qt=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,38,6,186,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,19,72,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,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,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,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,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],wi=[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,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Xe(a,t){let e=65536;for(let s=0,i=t.length;sa)return!1;if(e+=t[s+1],e>=a)return!0}return!1}function j(a){return a<65?a===36:a<=90?!0:a<97?a===95:a<=122?!0:a<=65535?a>=170&&Ai.test(String.fromCharCode(a)):Xe(a,Qt)}function Z(a){return a<48?a===36:a<58?!0:a<65?!1:a<=90?!0:a<97?a===95:a<=122?!0:a<=65535?a>=170&&Si.test(String.fromCharCode(a)):Xe(a,Qt)||Xe(a,wi)}var At={keyword:["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"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Ci=new Set(At.keyword),Ei=new Set(At.strict),Ii=new Set(At.strictBind);function Zt(a,t){return t&&a==="await"||a==="enum"}function es(a,t){return Zt(a,t)||Ei.has(a)}function ts(a){return Ii.has(a)}function ss(a,t){return es(a,t)||ts(a)}function Ni(a){return Ci.has(a)}function ki(a,t,e){return a===64&&t===64&&j(e)}var vi=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","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Li(a){return vi.has(a)}var me=class{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},ye=class{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new me(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let i=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(i,t,e,s);let r=i.names.get(t)||0;e&16?r=r|4:(i.firstLexicalName||(i.firstLexicalName=t),r=r|2),i.names.set(t,r),e&8&&this.maybeExportDefined(i,t)}else if(e&4)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,t,e,s),i.names.set(t,(i.names.get(t)||0)|1),this.maybeExportDefined(i,t),!(i.flags&387));--r);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(p.VarRedeclaration,i,{identifierName:e})}isRedeclaredInScope(t,e,s){if(!(s&1))return!1;if(s&8)return t.names.has(e);let i=t.names.get(e);return s&16?(i&2)>0||!this.treatFunctionsAsVarInScope(t)&&(i&1)>0:(i&2)>0&&!(t.flags&8&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(i&4)>0}checkLocalExport(t){let{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}},Ge=class extends me{constructor(...t){super(...t),this.declareFunctions=new Set}},Ye=class extends ye{createScope(t){return new Ge(t)}declareName(t,e,s){let i=this.currentScope();if(e&2048){this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t),i.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){if(super.isRedeclaredInScope(t,e,s))return!0;if(s&2048&&!t.declareFunctions.has(e)){let i=t.names.get(e);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},Qe=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[e,s]=t;if(!this.hasPlugin(e))return!1;let i=this.plugins.get(e);for(let r of Object.keys(s))if((i==null?void 0:i[r])!==s[r])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}};function is(a,t){a.trailingComments===void 0?a.trailingComments=t:a.trailingComments.unshift(...t)}function Di(a,t){a.leadingComments===void 0?a.leadingComments=t:a.leadingComments.unshift(...t)}function xe(a,t){a.innerComments===void 0?a.innerComments=t:a.innerComments.unshift(...t)}function ce(a,t,e){let s=null,i=t.length;for(;s===null&&i>0;)s=t[--i];s===null||s.start>e.start?xe(a,e.comments):is(s,e.comments)}var Ze=class extends Qe{addComment(t){this.filename&&(t.loc.filename=this.filename);let{commentsLen:e}=this.state;this.comments.length!=e&&(this.comments.length=e),this.comments.push(t),this.state.commentsLen++}processComment(t){let{commentStack:e}=this.state,s=e.length;if(s===0)return;let i=s-1,r=e[i];r.start===t.end&&(r.leadingNode=t,i--);let{start:n}=t;for(;i>=0;i--){let o=e[i],h=o.end;if(h>n)o.containingNode=t,this.finalizeComment(o),e.splice(i,1);else{h===n&&(o.trailingNode=t);break}}}finalizeComment(t){let{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&is(t.leadingNode,e),t.trailingNode!==null&&Di(t.trailingNode,e);else{let{containingNode:s,start:i}=t;if(this.input.charCodeAt(i-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":ce(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":ce(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":ce(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":ce(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":ce(s,s.specifiers,t);break;default:xe(s,e)}else xe(s,e)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:e}=this.state,{length:s}=e;if(s===0)return;let i=e[s-1];i.leadingNode===t&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){let{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){let{commentStack:i}=this.state,r=i.length;if(r===0)return;let n=r-1;for(;n>=0;n--){let o=i[n],h=o.end;if(o.start===s)o.leadingNode=t;else if(h===e)o.trailingNode=t;else if(h0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:e,startLine:s,startColumn:i}){this.strict=t===!1?!1:t===!0?!0:e==="module",this.curLine=s,this.lineStart=-i,this.startLoc=this.endLoc=new F(s,i,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}curPosition(){return new F(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let t=new a;return t.flags=this.flags,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},Oi=function(t){return t>=48&&t<=57},Ut={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Ee={bin:a=>a===48||a===49,oct:a=>a>=48&&a<=55,dec:a=>a>=48&&a<=57,hex:a=>a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102};function jt(a,t,e,s,i,r){let n=e,o=s,h=i,l="",c=null,u=e,{length:f}=t;for(;;){if(e>=f){r.unterminated(n,o,h),l+=t.slice(u,e);break}let d=t.charCodeAt(e);if(Fi(a,d,t,e)){l+=t.slice(u,e);break}if(d===92){l+=t.slice(u,e);let y=Bi(t,e,s,i,a==="template",r);y.ch===null&&!c?c={pos:e,lineStart:s,curLine:i}:l+=y.ch,{pos:e,lineStart:s,curLine:i}=y,u=e}else d===8232||d===8233?(++e,++i,s=e):d===10||d===13?a==="template"?(l+=t.slice(u,e)+` `,++e,d===13&&t.charCodeAt(e)===10&&++e,++i,u=s=e):r.unterminated(n,o,h):++e}return{pos:e,str:l,firstInvalidLoc:c,lineStart:s,curLine:i,containsInvalid:!!c}}function Fi(a,t,e,s){return a==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(a==="double"?34:39)}function Bi(a,t,e,s,i,r){let n=!i;t++;let o=l=>({pos:t,ch:l,lineStart:e,curLine:s}),h=a.charCodeAt(t++);switch(h){case 110:return o(` -`);case 114:return o("\r");case 120:{let l;return{code:l,pos:t}=st(a,t,e,s,2,!1,n,r),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:t}=as(a,t,e,s,n,r),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(t-1,e,s);default:if(h>=48&&h<=55){let l=t-1,u=a.slice(l,t+2).match(/^[0-7]+/)[0],f=parseInt(u,8);f>255&&(u=u.slice(0,-1),f=parseInt(u,8)),t+=u.length-1;let d=a.charCodeAt(t);if(u!=="0"||d===56||d===57){if(i)return o(null);r.strictNumericEscape(l,e,s)}return o(String.fromCharCode(f))}return o(String.fromCharCode(h))}}function st(a,t,e,s,i,r,n,o){let h=t,l;return{n:l,pos:t}=rs(a,t,e,s,16,i,r,!1,o,!n),l===null&&(n?o.invalidEscapeSequence(h,e,s):t=h-1),{code:l,pos:t}}function rs(a,t,e,s,i,r,n,o,h,l){let c=t,u=i===16?Ut.hex:Ut.decBinOct,f=i===16?Ie.hex:i===10?Ie.dec:i===8?Ie.oct:Ie.bin,d=!1,y=0;for(let I=0,C=r??1/0;I=97?k=E-97+10:E>=65?k=E-65+10:Oi(E)?k=E-48:k=1/0,k>=i){if(k<=9&&l)return{n:null,pos:t};if(k<=9&&h.invalidDigit(t,e,s,i))k=0;else if(n)k=0,d=!0;else break}++t,y=y*i+k}return t===c||r!=null&&t-c!==r||d?{n:null,pos:t}:{n:y,pos:t}}function as(a,t,e,s,i,r){let n=a.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=st(a,t,e,s,a.indexOf("}",t)-t,!0,i,r),++t,o!==null&&o>1114111)if(i)r.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=st(a,t,e,s,4,!1,i,r));return{code:o,pos:t}}var Ri=["at"],_i=["at"];function ue(a,t,e){return new F(e,a-t,a)}var Ui=new Set([103,109,115,105,121,117,100,118]),O=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new te(t.startLoc,t.endLoc)}},it=class extends et{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,i,r,n)=>this.options.errorRecovery?(this.raise(p.InvalidDigit,{at:ue(s,i,r),radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(p.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(p.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(p.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(p.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,i,r)=>{this.recordStrictModeErrors(p.StrictNumericEscape,{at:ue(s,i,r)})},unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedString,{at:ue(s-1,i,r)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(p.StrictNumericEscape),unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedTemplate,{at:ue(s,i,r)})}}),this.state=new tt,this.state.init(t),this.input=e,this.length=e.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new O(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return Ke.lastIndex=t,Ke.test(this.input)?Ke.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return ve.lastIndex=t,ve.test(this.input)?ve.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++tthis.raise(e,{at:s})),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(t,s+2);if(i===-1)throw this.raise(p.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=i+t.length,Ee.lastIndex=s+2;Ee.test(this.input)&&Ee.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Ee.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:s,end:i+t.length,loc:new te(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(r),r}skipLineComment(t){let e=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.post)){let r=this.skipLineComment(3);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let r=this.skipLineComment(4);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r))}else break e}else break e}}if(e.length>0){let s=this.state.pos,i={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(p.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?p.RecordExpressionHashIncorrectStartSyntaxType:p.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else j(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!me(t)&&++this.state.pos=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(j(t)){this.readWord(t);return}}throw this.raise(p.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(t)})}finishOp(t,e){let s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){let t=this.state.startLoc,e=this.state.start+1,s,i,{pos:r}=this.state;for(;;++r){if(r>=this.length)throw this.raise(p.UnterminatedRegExp,{at:L(t,1)});let l=this.input.charCodeAt(r);if(me(l))throw this.raise(p.UnterminatedRegExp,{at:L(t,1)});if(s)s=!1;else{if(l===91)i=!0;else if(l===93&&i)i=!1;else if(l===47&&!i)break;s=l===92}}let n=this.input.slice(e,r);++r;let o="",h=()=>L(t,r+2-e);for(;r=2&&this.input.charCodeAt(e)===48;if(l){let d=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(p.StrictOctalLiteral,{at:s}),!this.state.strict){let y=d.indexOf("_");y>0&&this.raise(p.ZeroDigitNumericSeparator,{at:L(s,y)})}h=l&&!/[89]/.test(d)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!h&&(++this.state.pos,this.readInt(10),i=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!h&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(p.InvalidOrMissingExponent,{at:s}),i=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((i||l)&&this.raise(p.InvalidBigIntLiteral,{at:s}),++this.state.pos,r=!0),c===109&&(this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(p.InvalidDecimal,{at:s}),++this.state.pos,n=!0),j(this.codePointAtPos(this.state.pos)))throw this.raise(p.NumberIdentifier,{at:this.state.curPosition()});let u=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(r){this.finishToken(135,u);return}if(n){this.finishToken(136,u);return}let f=h?parseInt(u,8):parseFloat(u);this.finishToken(134,f)}readCodePoint(t){let{code:e,pos:s}=as(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){let{str:e,pos:s,curLine:i,lineStart:r}=jt(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=r,this.state.curLine=i,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:i,curLine:r,lineStart:n}=jt("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=n,this.state.curLine=r,s&&(this.state.firstInvalidTemplateEscapePos=new F(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(i)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,{at:e}){let s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,{at:e}):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="",s=this.state.pos,i=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos=0;h--){let l=o[h];if(l.loc.index===n)return o[h]=t({loc:r,details:i});if(l.loc.indexthis.hasPlugin(e)))throw this.raise(p.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:t})}errorBuilder(t){return(e,s,i)=>{this.raise(t,{at:ue(e,s,i)})}}},rt=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},at=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new rt)}exit(){let t=this.stack.pop(),e=this.current();for(let[s,i]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,i):this.parser.raise(p.InvalidPrivateFieldResolution,{at:i,identifierName:s})}declarePrivateName(t,e,s){let{privateNames:i,loneAccessors:r,undefinedPrivateNames:n}=this.current(),o=i.has(t);if(e&3){let h=o&&r.get(t);if(h){let l=h&4,c=e&4,u=h&3,f=e&3;o=u===f||l!==c,o||r.delete(t)}else o||r.set(t,e)}o&&this.parser.raise(p.PrivateNameRedeclaration,{at:s,identifierName:t}),i.add(t),n.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(p.InvalidPrivateFieldResolution,{at:e,identifierName:t})}},se=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Fe=class extends se{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,{at:e}){let s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},nt=class{constructor(t){this.parser=void 0,this.stack=[new se],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,{at:e}){let s={at:e.loc.start},{stack:i}=this,r=i.length-1,n=i[r];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(t,s);else return;n=i[--r]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,{at:e}){let{stack:s}=this,i=s[s.length-1],r={at:e.loc.start};if(i.isCertainlyParameterDeclaration())this.parser.raise(t,r);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,r);else return}recordAsyncArrowParametersError({at:t}){let{stack:e}=this,s=e.length-1,i=e[s];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(p.AwaitBindingIdentifier,{at:t}),i=e[--s]}validateAsPattern(){let{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([s,i])=>{this.parser.raise(s,{at:i});let r=t.length-2,n=t[r];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(i.index),n=t[--r]})}};function ji(){return new se(3)}function $i(){return new Fe(1)}function Vi(){return new Fe(2)}function ns(){return new se}var ot=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function Le(a,t){return(a?2:0)|(t?1:0)}var ht=class extends it{addExtra(t,e,s,i=!0){if(!t)return;let r=t.extra=t.extra||{};i?r[e]=s:Object.defineProperty(r,e,{enumerable:i,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){let s=t+e.length;if(this.input.slice(t,s)===e){let i=this.input.charCodeAt(s);return!(Z(i)||(i&64512)===55296)}return!1}isLookaheadContextual(t){let e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,{at:this.state.startLoc});this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return is.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return _t.lastIndex=this.state.end,_t.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(p.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){let s={node:null};try{let i=t((r=null)=>{throw s.node=r,s});if(this.state.errors.length>e.errors.length){let r=this.state;return this.state=e,this.state.tokensLength=r.tokensLength,{node:i,error:r.errors[e.errors.length],thrown:!1,aborted:!1,failState:r}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let r=this.state;if(this.state=e,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:r};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:r};throw i}}checkExpressionErrors(t,e){if(!t)return!1;let{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:r,optionalParametersLoc:n}=t,o=!!s||!!i||!!n||!!r;if(!e)return o;s!=null&&this.raise(p.InvalidCoverInitializedName,{at:s}),i!=null&&this.raise(p.DuplicateProto,{at:i}),r!=null&&this.raise(p.UnexpectedPrivateField,{at:r}),n!=null&&this.unexpected(n)}isLiteralPropertyName(){return Xt(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=t;let r=this.scope,n=this.getScopeHandler();this.scope=new n(this,t);let o=this.prodParam;this.prodParam=new ot;let h=this.classScope;this.classScope=new at(this);let l=this.expressionScope;return this.expressionScope=new nt(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=i,this.scope=r,this.prodParam=o,this.classScope=h,this.expressionScope=l}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}},ee=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ie=class{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new te(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},wt=ie.prototype;wt.__clone=function(){let a=new ie(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e`Cannot overwrite reserved type ${a}.`,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:({memberName:a,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${a} = true,\` or \`${a} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:a,enumName:t})=>`Enum member names need to be unique, but the name \`${a}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:a})=>`Enum \`${a}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:a,enumName:t})=>`Enum type \`${a}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:a})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${a}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:a,memberName:t,explicitType:e})=>`Enum \`${a}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:a,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${a}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:a,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${a}\`.`,EnumInvalidMemberName:({enumName:a,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${a}\`.`,EnumNumberMemberNotInitialized:({enumName:a,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${a}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:a})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${a}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",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.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",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:({reservedType:a})=>`Unexpected reserved type ${a}.`,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:({unsupportedExportKind:a,suggestion:t})=>`\`declare export ${a}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Hi(a){return a.type==="DeclareExportAllDeclaration"||a.type==="DeclareExportDeclaration"&&(!a.declaration||a.declaration.type!=="TypeAlias"&&a.declaration.type!=="InterfaceDeclaration")}function $t(a){return a.importKind==="type"||a.importKind==="typeof"}var Wi={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Ji(a,t){let e=[],s=[];for(let i=0;iclass extends a{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Qe}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){let s=Xi.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let s=this.state.inType;this.state.inType=!0,this.expect(e||14);let i=this.flowParseType();return this.state.inType=s,i}flowParsePredicate(){let e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStart>s.index+1&&this.raise(g.UnexpectedSpaceBetweenModuloChecks,{at:s}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,i=null;return this.match(54)?(this.state.inType=e,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let s=e.id=this.parseIdentifier(),i=this.startNode(),r=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let n=this.flowParseFunctionTypeParams();return i.params=n.params,i.rest=n.rest,i.this=n._this,this.expect(11),[i.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(g.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let s=e.body=this.startNode(),i=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(g.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(o)):(this.expectContextual(125,g.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),i.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let r=null,n=!1;return i.forEach(o=>{Hi(o)?(r==="CommonJS"&&this.raise(g.AmbiguousDeclareModuleKind,{at:o}),r="ES"):o.type==="DeclareModuleExports"&&(n&&this.raise(g.DuplicateDeclareModuleExports,{at:o}),r==="ES"&&this.raise(g.AmbiguousDeclareModuleKind,{at:o}),r="CommonJS",n=!0)}),e.kind=r||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){let i=this.state.value;throw this.raise(g.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:i,suggestion:Wi[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(g.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,s,i){Ki.has(e)&&this.raise(i?g.AssignReservedType:g.UnexpectedReservedType,{at:s,reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let s=this.state.startLoc,i=this.startNode(),r=this.flowParseVariance(),n=this.flowParseTypeAnnotatableIdentifier();return i.name=n.name,i.variance=r,i.bound=n.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):e&&this.raise(g.MissingTypeParamDefault,{at:s}),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let i=!1;do{let r=this.flowParseTypeParameter(i);s.params.push(r),r.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=i,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,i){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=i,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){let i=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(i),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:i,allowProto:r,allowInexact:n}){let o=this.state.inType;this.state.inType=!0;let h=this.startNode();h.callProperties=[],h.properties=[],h.indexers=[],h.internalSlots=[];let l,c,u=!1;for(s&&this.match(6)?(this.expect(6),l=9,c=!0):(this.expect(5),l=8,c=!1),h.exact=c;!this.match(l);){let d=!1,y=null,I=null,C=this.startNode();if(r&&this.isContextual(118)){let k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),y=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),d=!0)}let E=this.flowParseVariance();if(this.eat(0))y!=null&&this.unexpected(y),this.eat(0)?(E&&this.unexpected(E.loc.start),h.internalSlots.push(this.flowParseObjectTypeInternalSlot(C,d))):h.indexers.push(this.flowParseObjectTypeIndexer(C,d,E));else if(this.match(10)||this.match(47))y!=null&&this.unexpected(y),E&&this.unexpected(E.loc.start),h.callProperties.push(this.flowParseObjectTypeCallProperty(C,d));else{let k="init";if(this.isContextual(99)||this.isContextual(104)){let he=this.lookahead();Xt(he.type)&&(k=this.state.value,this.next())}let we=this.flowParseObjectTypeProperty(C,d,y,E,k,i,n??!c);we===null?(u=!0,I=this.state.lastTokStartLoc):h.properties.push(we)}this.flowObjectTypeSemicolon(),I&&!this.match(8)&&!this.match(9)&&this.raise(g.UnexpectedExplicitInexactInObject,{at:I})}this.expect(l),i&&(h.inexact=u);let f=this.finishNode(h,"ObjectTypeAnnotation");return this.state.inType=o,f}flowParseObjectTypeProperty(e,s,i,r,n,o,h){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?h||this.raise(g.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(g.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),r&&this.raise(g.InexactVariance,{at:r}),null):(o||this.raise(g.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),i!=null&&this.unexpected(i),r&&this.raise(g.SpreadVariance,{at:r}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=i!=null,e.kind=n;let l=!1;return this.match(47)||this.match(10)?(e.method=!0,i!=null&&this.unexpected(i),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(n==="get"||n==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(g.ThisParamBannedInConstructor,{at:e.value.this})):(n!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(l=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=l,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let s=e.kind==="get"?0:1,i=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?g.GetterMayNotHaveThisParam:g.SetterMayNotHaveThisParam,{at:e.value.this}),i!==s&&this.raise(e.kind==="get"?p.BadGetterArity:p.BadSetterArity,{at:e}),e.kind==="set"&&e.value.rest&&this.raise(p.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var i;(i=e)!=null||(e=this.state.startLoc);let r=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let n=this.startNodeAt(e);n.qualification=r,n.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(n,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,s){let i=this.startNodeAt(e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.possuper.parseFunctionBody(e,!0,i));return}super.parseFunctionBody(e,!1,i)}parseFunctionBodyAndFinish(e,s,i=!1){if(this.match(14)){let r=this.startNode();[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,i)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(M(i.type)){let r=this.startNode();return this.next(),this.flowParseInterface(r)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,i){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||S(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(S(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){let{type:e}=this.state;return Rt(e)||this.shouldParseEnums()&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return Rt(e)||this.shouldParseEnums()&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,i){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(i),e}this.expect(17);let r=this.state.clone(),n=this.state.noArrowAt,o=this.startNodeAt(s),{consequent:h,failed:l}=this.tryParseConditionalConsequent(),[c,u]=this.getArrowLikeExpressions(h);if(l||u.length>0){let f=[...n];if(u.length>0){this.state=r,this.state.noArrowAt=f;for(let d=0;d1&&this.raise(g.AmbiguousConditionalArrow,{at:r.startLoc}),l&&c.length===1&&(this.state=r,f.push(c[0].start),this.state.noArrowAt=f,{consequent:h,failed:l}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(h,!0),this.state.noArrowAt=n,this.expect(14),o.test=e,o.consequent=h,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){let i=[e],r=[];for(;i.length!==0;){let n=i.pop();n.type==="ArrowFunctionExpression"?(n.typeParameters||!n.returnType?this.finishArrowValidation(n):r.push(n),i.push(n.body)):n.type==="ConditionalExpression"&&(i.push(n.consequent),i.push(n.alternate))}return s?(r.forEach(n=>this.finishArrowValidation(n)),[r,[]]):Ji(r,n=>n.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let i;return this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),i=s(),this.state.noArrowParamsConversionAt.pop()):i=s(),i}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.shouldParseEnums()&&this.isContextual(126)){e.exportKind="value";let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:s}=this.state,i=super.maybeParseExportNamespaceSpecifier(e);return i&&e.exportKind==="type"&&this.unexpected(s),i}parseClassId(e,s,i){super.parseClassId(e,s,i),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,i){let{startLoc:r}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,i),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(g.DeclareClassElement,{at:r}):s.value&&this.raise(g.DeclareClassFieldInitializer,{at:s.value}))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(p.InvalidIdentifier,{at:this.state.curPosition(),identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){let s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):ki(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,i){for(let r=0;r1||!s)&&this.raise(g.TypeCastInPattern,{at:n.typeAnnotation})}return e}parseArrayLike(e,s,i,r){let n=super.parseArrayLike(e,s,i,r);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(n.elements),n}isValidLVal(e,s,i){return e==="TypeCastExpression"||super.isValidLVal(e,s,i)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,i,r,n,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,i,r,n,o),s.params&&n){let h=s.params;h.length>0&&this.isThisParam(h[0])&&this.raise(g.ThisParamBannedInConstructor,{at:s})}else if(s.type==="MethodDefinition"&&n&&s.value.params){let h=s.value.params;h.length>0&&this.isThisParam(h[0])&&this.raise(g.ThisParamBannedInConstructor,{at:s})}}pushClassPrivateMethod(e,s,i,r){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,i,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let s=e.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let s=this.getObjectOrClassMethodParams(e);if(s.length>0){let i=s[0];this.isThisParam(i)&&e.kind==="get"?this.raise(g.GetterMayNotHaveThisParam,{at:i}):this.isThisParam(i)&&this.raise(g.SetterMayNotHaveThisParam,{at:i})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,i,r,n,o,h){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let l;this.match(47)&&!o&&(l=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let c=super.parseObjPropValue(e,s,i,r,n,o,h);return l&&((c.value||c).typeParameters=l),c}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(g.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(g.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(g.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(g.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startsuper.parseMaybeAssign(e,s),r),!n.error)return n.node;let{context:l}=this.state,c=l[l.length-1];(c===w.j_oTag||c===w.j_expr)&&l.pop()}if((i=n)!=null&&i.error||this.match(47)){var o,h;r=r||this.state.clone();let l,c=this.tryParse(f=>{var d;l=this.flowParseTypeParameterDeclaration();let y=this.forwardNoArrowParamsConversionAt(l,()=>{let C=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(C,l),C});(d=y.extra)!=null&&d.parenthesized&&f();let I=this.maybeUnwrapTypeCastExpression(y);return I.type!=="ArrowFunctionExpression"&&f(),I.typeParameters=l,this.resetStartLocationFromNode(I,l),y},r),u=null;if(c.node&&this.maybeUnwrapTypeCastExpression(c.node).type==="ArrowFunctionExpression"){if(!c.error&&!c.aborted)return c.node.async&&this.raise(g.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:l}),c.node;u=c.node}if((o=n)!=null&&o.node)return this.state=n.failState,n.node;if(u)return this.state=c.failState,u;throw(h=n)!=null&&h.thrown?n.error:c.thrown?c.error:this.raise(g.UnexpectedTokenAfterTypeParameter,{at:l})}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,i,r=!0){if(!(i&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let n=0;n0&&this.raise(g.ThisParamMustBeFirst,{at:e.params[n]});super.checkParams(e,s,i,r)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,s,i){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(s.index)!==-1){this.next();let r=this.startNodeAt(s);r.callee=e,r.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(r,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let r=this.state.clone(),n=this.tryParse(h=>this.parseAsyncArrowWithTypeParameters(s)||h(),r);if(!n.error&&!n.aborted)return n.node;let o=this.tryParse(()=>super.parseSubscripts(e,s,i),r);if(o.node&&!o.error)return o.node;if(n.node)return this.state=n.failState,n.node;if(o.node)return this.state=o.failState,o.node;throw n.error||o.error}return super.parseSubscripts(e,s,i)}parseSubscript(e,s,i,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,i)return r.stop=!0,e;this.next();let n=this.startNodeAt(s);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),n.arguments=this.parseCallExpressionArguments(11,!1),n.optional=!0,this.finishCallExpression(n,!0)}else if(!i&&this.shouldParseTypes()&&this.match(47)){let n=this.startNodeAt(s);n.callee=e;let o=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11,!1),r.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,r.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,i,r)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){let s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){let i=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(g.UnterminatedFlowComment,{at:this.state.curPosition()}),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(g.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;let i=this.input.charCodeAt(s+e),r=this.input.charCodeAt(s+e+1);return i===58&&r===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:i===58&&r!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(p.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:i}){this.raise(g.EnumBooleanMemberNotInitialized,{at:e,memberName:i,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?g.EnumInvalidMemberInitializerSymbolType:g.EnumInvalidMemberInitializerPrimaryType:g.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},s))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:s,memberName:i}){this.raise(g.EnumNumberMemberNotInitialized,{at:e,enumName:s,memberName:i})}flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:s}){this.raise(g.EnumStringMemberInconsistentlyInitialized,{at:e,enumName:s})}flowEnumMemberInit(){let e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let i=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 133:{let i=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,s=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:i}}flowEnumCheckExplicitTypeMismatch(e,s,i){let{explicitType:r}=s;r!==null&&r!==i&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){let i=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},n=!1;for(;!this.match(8);){if(this.eat(21)){n=!0;break}let o=this.startNode(),{id:h,init:l}=this.flowEnumMemberRaw(),c=h.name;if(c==="")continue;/^[a-z]/.test(c)&&this.raise(g.EnumInvalidMemberName,{at:h,memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),i.has(c)&&this.raise(g.EnumDuplicateMemberName,{at:h,memberName:c,enumName:e}),i.add(c);let u={enumName:e,explicitType:s,memberName:c};switch(o.id=h,l.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"boolean"),o.init=l.value,r.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"number"),o.init=l.value,r.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"string"),o.init=l.value,r.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(l.loc,u);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(l.loc,u);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(l.loc,u);break;default:r.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:n}}flowEnumStringMembers(e,s,{enumName:i}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(let r of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return s}else{for(let r of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!S(this.state.type))throw this.raise(g.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e});let{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(g.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){let i=s.name,r=s.loc.start,n=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:o,hasUnknownMembers:h}=this.flowEnumMembers({enumName:i,explicitType:n});switch(e.hasUnknownMembers=h,n){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let l=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let c=o.booleanMembers.length,u=o.numberMembers.length,f=o.stringMembers.length,d=o.defaultedMembers.length;if(!c&&!u&&!f&&!d)return l();if(!c&&!u)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!u&&!f&&c>=d){for(let y of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!c&&!f&&u>=d){for(let y of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(g.EnumInconsistentMemberValues,{at:r,enumName:i}),l()}}}flowParseEnumDeclaration(e){let s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},J=$`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:a})=>`Expected corresponding JSX closing tag for <${a}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:a,HTMLEntity:t})=>`Unexpected token \`${a}\`. Did you mean \`${t}\` or \`{'${a}'}\`?`,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 z(a){return a?a.type==="JSXOpeningFragment"||a.type==="JSXClosingFragment":!1}function Q(a){if(a.type==="JSXIdentifier")return a.name;if(a.type==="JSXNamespacedName")return a.namespace.name+":"+a.name.name;if(a.type==="JSXMemberExpression")return Q(a.object)+"."+Q(a.property);throw new Error("Node had unexpected type: "+a.type)}var Yi=a=>class extends a{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(J.UnterminatedJsxContent,{at:this.state.startLoc});let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(i);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:me(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let s=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=e?` +`);case 114:return o("\r");case 120:{let l;return{code:l,pos:t}=tt(a,t,e,s,2,!1,n,r),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:t}=ns(a,t,e,s,n,r),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(t-1,e,s);default:if(h>=48&&h<=55){let l=t-1,u=a.slice(l,t+2).match(/^[0-7]+/)[0],f=parseInt(u,8);f>255&&(u=u.slice(0,-1),f=parseInt(u,8)),t+=u.length-1;let d=a.charCodeAt(t);if(u!=="0"||d===56||d===57){if(i)return o(null);r.strictNumericEscape(l,e,s)}return o(String.fromCharCode(f))}return o(String.fromCharCode(h))}}function tt(a,t,e,s,i,r,n,o){let h=t,l;return{n:l,pos:t}=as(a,t,e,s,16,i,r,!1,o,!n),l===null&&(n?o.invalidEscapeSequence(h,e,s):t=h-1),{code:l,pos:t}}function as(a,t,e,s,i,r,n,o,h,l){let c=t,u=i===16?Ut.hex:Ut.decBinOct,f=i===16?Ee.hex:i===10?Ee.dec:i===8?Ee.oct:Ee.bin,d=!1,y=0;for(let I=0,C=r??1/0;I=97?k=E-97+10:E>=65?k=E-65+10:Oi(E)?k=E-48:k=1/0,k>=i){if(k<=9&&l)return{n:null,pos:t};if(k<=9&&h.invalidDigit(t,e,s,i))k=0;else if(n)k=0,d=!0;else break}++t,y=y*i+k}return t===c||r!=null&&t-c!==r||d?{n:null,pos:t}:{n:y,pos:t}}function ns(a,t,e,s,i,r){let n=a.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=tt(a,t,e,s,a.indexOf("}",t)-t,!0,i,r),++t,o!==null&&o>1114111)if(i)r.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=tt(a,t,e,s,4,!1,i,r));return{code:o,pos:t}}function pe(a,t,e){return new F(e,a-t,a)}var Ri=new Set([103,109,115,105,121,117,100,118]),O=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new te(t.startLoc,t.endLoc)}},st=class extends Ze{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,i,r,n)=>this.options.errorRecovery?(this.raise(p.InvalidDigit,pe(s,i,r),{radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(p.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(p.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(p.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(p.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,i,r)=>{this.recordStrictModeErrors(p.StrictNumericEscape,pe(s,i,r))},unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedString,pe(s-1,i,r))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(p.StrictNumericEscape),unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedTemplate,pe(s,i,r))}}),this.state=new et,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new O(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return ze.lastIndex=t,ze.test(this.input)?ze.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return ke.lastIndex=t,ke.test(this.input)?ke.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++tthis.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(t,s+2);if(i===-1)throw this.raise(p.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+t.length,Ce.lastIndex=s+2;Ce.test(this.input)&&Ce.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Ce.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:s,end:i+t.length,loc:new te(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(r),r}skipLineComment(t){let e=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.post)){let r=this.skipLineComment(3);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let r=this.skipLineComment(4);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r))}else break e}else break e}}if(e.length>0){let s=this.state.pos,i={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(p.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?p.RecordExpressionHashIncorrectStartSyntaxType:p.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else j(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!de(t)&&++this.state.pos=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(j(t)){this.readWord(t);return}}throw this.raise(p.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,e){let s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){let t=this.state.startLoc,e=this.state.start+1,s,i,{pos:r}=this.state;for(;;++r){if(r>=this.length)throw this.raise(p.UnterminatedRegExp,L(t,1));let l=this.input.charCodeAt(r);if(de(l))throw this.raise(p.UnterminatedRegExp,L(t,1));if(s)s=!1;else{if(l===91)i=!0;else if(l===93&&i)i=!1;else if(l===47&&!i)break;s=l===92}}let n=this.input.slice(e,r);++r;let o="",h=()=>L(t,r+2-e);for(;r=2&&this.input.charCodeAt(e)===48;if(l){let d=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(p.StrictOctalLiteral,s),!this.state.strict){let y=d.indexOf("_");y>0&&this.raise(p.ZeroDigitNumericSeparator,L(s,y))}h=l&&!/[89]/.test(d)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!h&&(++this.state.pos,this.readInt(10),i=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!h&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(p.InvalidOrMissingExponent,s),i=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((i||l)&&this.raise(p.InvalidBigIntLiteral,s),++this.state.pos,r=!0),c===109&&(this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(p.InvalidDecimal,s),++this.state.pos,n=!0),j(this.codePointAtPos(this.state.pos)))throw this.raise(p.NumberIdentifier,this.state.curPosition());let u=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(r){this.finishToken(135,u);return}if(n){this.finishToken(136,u);return}let f=h?parseInt(u,8):parseFloat(u);this.finishToken(134,f)}readCodePoint(t){let{code:e,pos:s}=ns(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){let{str:e,pos:s,curLine:i,lineStart:r}=jt(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=r,this.state.curLine=i,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:i,curLine:r,lineStart:n}=jt("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=n,this.state.curLine=r,s&&(this.state.firstInvalidTemplateEscapePos=new F(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(i)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,e){let s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,e):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="",s=this.state.pos,i=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos=0;o--){let h=n[o];if(h.loc.index===r)return n[o]=t(i,s);if(h.loc.indexthis.hasPlugin(e)))throw this.raise(p.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,s,i)=>{this.raise(t,pe(e,s,i))}}},it=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},rt=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new it)}exit(){let t=this.stack.pop(),e=this.current();for(let[s,i]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,i):this.parser.raise(p.InvalidPrivateFieldResolution,i,{identifierName:s})}declarePrivateName(t,e,s){let{privateNames:i,loneAccessors:r,undefinedPrivateNames:n}=this.current(),o=i.has(t);if(e&3){let h=o&&r.get(t);if(h){let l=h&4,c=e&4,u=h&3,f=e&3;o=u===f||l!==c,o||r.delete(t)}else o||r.set(t,e)}o&&this.parser.raise(p.PrivateNameRedeclaration,s,{identifierName:t}),i.add(t),n.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(p.InvalidPrivateFieldResolution,e,{identifierName:t})}},se=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Me=class extends se{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,e){let s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},at=class{constructor(t){this.parser=void 0,this.stack=[new se],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){let s=e.loc.start,{stack:i}=this,r=i.length-1,n=i[r];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(t,s);else return;n=i[--r]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,e){let{stack:s}=this,i=s[s.length-1],r=e.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(t,r);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,r);else return}recordAsyncArrowParametersError(t){let{stack:e}=this,s=e.length-1,i=e[s];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(p.AwaitBindingIdentifier,t),i=e[--s]}validateAsPattern(){let{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([s,i])=>{this.parser.raise(s,i);let r=t.length-2,n=t[r];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(i.index),n=t[--r]})}};function _i(){return new se(3)}function Ui(){return new Me(1)}function ji(){return new Me(2)}function os(){return new se}var nt=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function ve(a,t){return(a?2:0)|(t?1:0)}var ot=class extends st{addExtra(t,e,s,i=!0){if(!t)return;let r=t.extra=t.extra||{};i?r[e]=s:Object.defineProperty(r,e,{enumerable:i,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){let s=t+e.length;if(this.input.slice(t,s)===e){let i=this.input.charCodeAt(s);return!(Z(i)||(i&64512)===55296)}return!1}isLookaheadContextual(t){let e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return rs.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return _t.lastIndex=this.state.end,_t.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(p.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){let s={node:null};try{let i=t((r=null)=>{throw s.node=r,s});if(this.state.errors.length>e.errors.length){let r=this.state;return this.state=e,this.state.tokensLength=r.tokensLength,{node:i,error:r.errors[e.errors.length],thrown:!1,aborted:!1,failState:r}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let r=this.state;if(this.state=e,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:r};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:r};throw i}}checkExpressionErrors(t,e){if(!t)return!1;let{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:r,optionalParametersLoc:n}=t,o=!!s||!!i||!!n||!!r;if(!e)return o;s!=null&&this.raise(p.InvalidCoverInitializedName,s),i!=null&&this.raise(p.DuplicateProto,i),r!=null&&this.raise(p.UnexpectedPrivateField,r),n!=null&&this.unexpected(n)}isLiteralPropertyName(){return Gt(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=t;let r=this.scope,n=this.getScopeHandler();this.scope=new n(this,t);let o=this.prodParam;this.prodParam=new nt;let h=this.classScope;this.classScope=new rt(this);let l=this.expressionScope;return this.expressionScope=new at(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=i,this.scope=r,this.prodParam=o,this.classScope=h,this.expressionScope=l}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}},ee=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ie=class{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new te(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},St=ie.prototype;St.__clone=function(){let a=new ie(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e`Cannot overwrite reserved type ${a}.`,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:({memberName:a,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${a} = true,\` or \`${a} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:a,enumName:t})=>`Enum member names need to be unique, but the name \`${a}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:a})=>`Enum \`${a}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:a,enumName:t})=>`Enum type \`${a}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:a})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${a}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:a,memberName:t,explicitType:e})=>`Enum \`${a}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:a,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${a}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:a,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${a}\`.`,EnumInvalidMemberName:({enumName:a,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${a}\`.`,EnumNumberMemberNotInitialized:({enumName:a,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${a}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:a})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${a}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",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.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",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:({reservedType:a})=>`Unexpected reserved type ${a}.`,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:({unsupportedExportKind:a,suggestion:t})=>`\`declare export ${a}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function zi(a){return a.type==="DeclareExportAllDeclaration"||a.type==="DeclareExportDeclaration"&&(!a.declaration||a.declaration.type!=="TypeAlias"&&a.declaration.type!=="InterfaceDeclaration")}function $t(a){return a.importKind==="type"||a.importKind==="typeof"}var Ki={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Hi(a,t){let e=[],s=[];for(let i=0;iclass extends a{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Ye}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){let s=Wi.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let s=this.state.inType;this.state.inType=!0,this.expect(e||14);let i=this.flowParseType();return this.state.inType=s,i}flowParsePredicate(){let e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(g.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,i=null;return this.match(54)?(this.state.inType=e,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let s=e.id=this.parseIdentifier(),i=this.startNode(),r=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let n=this.flowParseFunctionTypeParams();return i.params=n.params,i.rest=n.rest,i.this=n._this,this.expect(11),[i.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(g.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let s=e.body=this.startNode(),i=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(g.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,g.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),i.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let r=null,n=!1;return i.forEach(o=>{zi(o)?(r==="CommonJS"&&this.raise(g.AmbiguousDeclareModuleKind,o),r="ES"):o.type==="DeclareModuleExports"&&(n&&this.raise(g.DuplicateDeclareModuleExports,o),r==="ES"&&this.raise(g.AmbiguousDeclareModuleKind,o),r="CommonJS",n=!0)}),e.kind=r||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){let i=this.state.value;throw this.raise(g.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:Ki[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(g.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,s,i){qi.has(e)&&this.raise(i?g.AssignReservedType:g.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let s=this.state.startLoc,i=this.startNode(),r=this.flowParseVariance(),n=this.flowParseTypeAnnotatableIdentifier();return i.name=n.name,i.variance=r,i.bound=n.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):e&&this.raise(g.MissingTypeParamDefault,s),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let i=!1;do{let r=this.flowParseTypeParameter(i);s.params.push(r),r.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=i,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,i){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=i,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){let i=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(i),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:i,allowProto:r,allowInexact:n}){let o=this.state.inType;this.state.inType=!0;let h=this.startNode();h.callProperties=[],h.properties=[],h.indexers=[],h.internalSlots=[];let l,c,u=!1;for(s&&this.match(6)?(this.expect(6),l=9,c=!0):(this.expect(5),l=8,c=!1),h.exact=c;!this.match(l);){let d=!1,y=null,I=null,C=this.startNode();if(r&&this.isContextual(118)){let k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),y=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),d=!0)}let E=this.flowParseVariance();if(this.eat(0))y!=null&&this.unexpected(y),this.eat(0)?(E&&this.unexpected(E.loc.start),h.internalSlots.push(this.flowParseObjectTypeInternalSlot(C,d))):h.indexers.push(this.flowParseObjectTypeIndexer(C,d,E));else if(this.match(10)||this.match(47))y!=null&&this.unexpected(y),E&&this.unexpected(E.loc.start),h.callProperties.push(this.flowParseObjectTypeCallProperty(C,d));else{let k="init";if(this.isContextual(99)||this.isContextual(104)){let oe=this.lookahead();Gt(oe.type)&&(k=this.state.value,this.next())}let Se=this.flowParseObjectTypeProperty(C,d,y,E,k,i,n??!c);Se===null?(u=!0,I=this.state.lastTokStartLoc):h.properties.push(Se)}this.flowObjectTypeSemicolon(),I&&!this.match(8)&&!this.match(9)&&this.raise(g.UnexpectedExplicitInexactInObject,I)}this.expect(l),i&&(h.inexact=u);let f=this.finishNode(h,"ObjectTypeAnnotation");return this.state.inType=o,f}flowParseObjectTypeProperty(e,s,i,r,n,o,h){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?h||this.raise(g.InexactInsideExact,this.state.lastTokStartLoc):this.raise(g.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(g.InexactVariance,r),null):(o||this.raise(g.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),r&&this.raise(g.SpreadVariance,r),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=i!=null,e.kind=n;let l=!1;return this.match(47)||this.match(10)?(e.method=!0,i!=null&&this.unexpected(i),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(n==="get"||n==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(g.ThisParamBannedInConstructor,e.value.this)):(n!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(l=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=l,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let s=e.kind==="get"?0:1,i=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?g.GetterMayNotHaveThisParam:g.SetterMayNotHaveThisParam,e.value.this),i!==s&&this.raise(e.kind==="get"?p.BadGetterArity:p.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(p.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var i;(i=e)!=null||(e=this.state.startLoc);let r=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let n=this.startNodeAt(e);n.qualification=r,n.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(n,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,s){let i=this.startNodeAt(e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.possuper.parseFunctionBody(e,!0,i));return}super.parseFunctionBody(e,!1,i)}parseFunctionBodyAndFinish(e,s,i=!1){if(this.match(14)){let r=this.startNode();[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,i)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(M(i.type)){let r=this.startNode();return this.next(),this.flowParseInterface(r)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,i){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||S(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(S(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){let{type:e}=this.state;return Rt(e)||this.shouldParseEnums()&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return Rt(e)||this.shouldParseEnums()&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,i){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(i),e}this.expect(17);let r=this.state.clone(),n=this.state.noArrowAt,o=this.startNodeAt(s),{consequent:h,failed:l}=this.tryParseConditionalConsequent(),[c,u]=this.getArrowLikeExpressions(h);if(l||u.length>0){let f=[...n];if(u.length>0){this.state=r,this.state.noArrowAt=f;for(let d=0;d1&&this.raise(g.AmbiguousConditionalArrow,r.startLoc),l&&c.length===1&&(this.state=r,f.push(c[0].start),this.state.noArrowAt=f,{consequent:h,failed:l}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(h,!0),this.state.noArrowAt=n,this.expect(14),o.test=e,o.consequent=h,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){let i=[e],r=[];for(;i.length!==0;){let n=i.pop();n.type==="ArrowFunctionExpression"?(n.typeParameters||!n.returnType?this.finishArrowValidation(n):r.push(n),i.push(n.body)):n.type==="ConditionalExpression"&&(i.push(n.consequent),i.push(n.alternate))}return s?(r.forEach(n=>this.finishArrowValidation(n)),[r,[]]):Hi(r,n=>n.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let i;return this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),i=s(),this.state.noArrowParamsConversionAt.pop()):i=s(),i}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.shouldParseEnums()&&this.isContextual(126)){e.exportKind="value";let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:s}=this.state,i=super.maybeParseExportNamespaceSpecifier(e);return i&&e.exportKind==="type"&&this.unexpected(s),i}parseClassId(e,s,i){super.parseClassId(e,s,i),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,i){let{startLoc:r}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,i),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(g.DeclareClassElement,r):s.value&&this.raise(g.DeclareClassFieldInitializer,s.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(p.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){let s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):ki(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,i){for(let r=0;r1||!s)&&this.raise(g.TypeCastInPattern,n.typeAnnotation)}return e}parseArrayLike(e,s,i,r){let n=super.parseArrayLike(e,s,i,r);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(n.elements),n}isValidLVal(e,s,i){return e==="TypeCastExpression"||super.isValidLVal(e,s,i)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,i,r,n,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,i,r,n,o),s.params&&n){let h=s.params;h.length>0&&this.isThisParam(h[0])&&this.raise(g.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&n&&s.value.params){let h=s.value.params;h.length>0&&this.isThisParam(h[0])&&this.raise(g.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,i,r){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,i,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let s=e.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let s=this.getObjectOrClassMethodParams(e);if(s.length>0){let i=s[0];this.isThisParam(i)&&e.kind==="get"?this.raise(g.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(g.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,i,r,n,o,h){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let l;this.match(47)&&!o&&(l=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let c=super.parseObjPropValue(e,s,i,r,n,o,h);return l&&((c.value||c).typeParameters=l),c}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(g.PatternIsOptional,e),this.isThisParam(e)&&this.raise(g.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(g.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(g.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startsuper.parseMaybeAssign(e,s),r),!n.error)return n.node;let{context:l}=this.state,c=l[l.length-1];(c===w.j_oTag||c===w.j_expr)&&l.pop()}if((i=n)!=null&&i.error||this.match(47)){var o,h;r=r||this.state.clone();let l,c=this.tryParse(f=>{var d;l=this.flowParseTypeParameterDeclaration();let y=this.forwardNoArrowParamsConversionAt(l,()=>{let C=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(C,l),C});(d=y.extra)!=null&&d.parenthesized&&f();let I=this.maybeUnwrapTypeCastExpression(y);return I.type!=="ArrowFunctionExpression"&&f(),I.typeParameters=l,this.resetStartLocationFromNode(I,l),y},r),u=null;if(c.node&&this.maybeUnwrapTypeCastExpression(c.node).type==="ArrowFunctionExpression"){if(!c.error&&!c.aborted)return c.node.async&&this.raise(g.UnexpectedTypeParameterBeforeAsyncArrowFunction,l),c.node;u=c.node}if((o=n)!=null&&o.node)return this.state=n.failState,n.node;if(u)return this.state=c.failState,u;throw(h=n)!=null&&h.thrown?n.error:c.thrown?c.error:this.raise(g.UnexpectedTokenAfterTypeParameter,l)}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,i,r=!0){if(!(i&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let n=0;n0&&this.raise(g.ThisParamMustBeFirst,e.params[n]);super.checkParams(e,s,i,r)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,s,i){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(s.index)!==-1){this.next();let r=this.startNodeAt(s);r.callee=e,r.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(r,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let r=this.state.clone(),n=this.tryParse(h=>this.parseAsyncArrowWithTypeParameters(s)||h(),r);if(!n.error&&!n.aborted)return n.node;let o=this.tryParse(()=>super.parseSubscripts(e,s,i),r);if(o.node&&!o.error)return o.node;if(n.node)return this.state=n.failState,n.node;if(o.node)return this.state=o.failState,o.node;throw n.error||o.error}return super.parseSubscripts(e,s,i)}parseSubscript(e,s,i,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,i)return r.stop=!0,e;this.next();let n=this.startNodeAt(s);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),n.arguments=this.parseCallExpressionArguments(11,!1),n.optional=!0,this.finishCallExpression(n,!0)}else if(!i&&this.shouldParseTypes()&&this.match(47)){let n=this.startNodeAt(s);n.callee=e;let o=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11,!1),r.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,r.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,i,r)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){let s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){let i=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(g.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(g.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;let i=this.input.charCodeAt(s+e),r=this.input.charCodeAt(s+e+1);return i===58&&r===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:i===58&&r!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(p.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:i}){this.raise(g.EnumBooleanMemberNotInitialized,e,{memberName:i,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?g.EnumInvalidMemberInitializerSymbolType:g.EnumInvalidMemberInitializerPrimaryType:g.EnumInvalidMemberInitializerUnknownType,e,s)}flowEnumErrorNumberMemberNotInitialized(e,s){this.raise(g.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitialized(e,s){this.raise(g.EnumStringMemberInconsistentlyInitialized,e,s)}flowEnumMemberInit(){let e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let i=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 133:{let i=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,s=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:i}}flowEnumCheckExplicitTypeMismatch(e,s,i){let{explicitType:r}=s;r!==null&&r!==i&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){let i=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},n=!1;for(;!this.match(8);){if(this.eat(21)){n=!0;break}let o=this.startNode(),{id:h,init:l}=this.flowEnumMemberRaw(),c=h.name;if(c==="")continue;/^[a-z]/.test(c)&&this.raise(g.EnumInvalidMemberName,h,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),i.has(c)&&this.raise(g.EnumDuplicateMemberName,h,{memberName:c,enumName:e}),i.add(c);let u={enumName:e,explicitType:s,memberName:c};switch(o.id=h,l.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"boolean"),o.init=l.value,r.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"number"),o.init=l.value,r.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"string"),o.init=l.value,r.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(l.loc,u);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(l.loc,u);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(l.loc,u);break;default:r.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:n}}flowEnumStringMembers(e,s,{enumName:i}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(let r of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return s}else{for(let r of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!S(this.state.type))throw this.raise(g.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(g.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){let i=s.name,r=s.loc.start,n=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:o,hasUnknownMembers:h}=this.flowEnumMembers({enumName:i,explicitType:n});switch(e.hasUnknownMembers=h,n){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let l=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let c=o.booleanMembers.length,u=o.numberMembers.length,f=o.stringMembers.length,d=o.defaultedMembers.length;if(!c&&!u&&!f&&!d)return l();if(!c&&!u)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!u&&!f&&c>=d){for(let y of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!c&&!f&&u>=d){for(let y of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(g.EnumInconsistentMemberValues,r,{enumName:i}),l()}}}flowParseEnumDeclaration(e){let s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},J=$`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:a})=>`Expected corresponding JSX closing tag for <${a}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:a,HTMLEntity:t})=>`Unexpected token \`${a}\`. Did you mean \`${t}\` or \`{'${a}'}\`?`,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 z(a){return a?a.type==="JSXOpeningFragment"||a.type==="JSXClosingFragment":!1}function Q(a){if(a.type==="JSXIdentifier")return a.name;if(a.type==="JSXNamespacedName")return a.namespace.name+":"+a.name.name;if(a.type==="JSXMemberExpression")return Q(a.object)+"."+Q(a.property);throw new Error("Node had unexpected type: "+a.type)}var Xi=a=>class extends a{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(J.UnterminatedJsxContent,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(i);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:de(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let s=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=e?` `:`\r -`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedString,{at:this.state.startLoc});let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):me(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos1){for(let i=0;i=0;i--){let r=this.scopeStack[i];if(r.types.has(e)||r.exportOnlyBindings.has(e))return}super.checkLocalExport(t)}},Qi=(a,t)=>Object.hasOwnProperty.call(a,t)&&a[t],os=a=>a.type==="ParenthesizedExpression"?os(a.expression):a,ut=class extends lt{toAssignable(t,e=!1){var s,i;let r;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(r=os(t),e?r.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(p.InvalidParenthesizedAssignment,{at:t}):r.type!=="MemberExpression"&&!this.isOptionalMemberExpression(r)&&this.raise(p.InvalidParenthesizedAssignment,{at:t}):this.raise(p.InvalidParenthesizedAssignment,{at:t})),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,h=t.properties.length,l=h-1;oi.type!=="ObjectMethod"&&(r===s||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(let s of t)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){let i=s&1,r=[],n=!0;for(;!this.eat(t);)if(n?n=!1:this.expect(12),i&&this.match(12))r.push(null);else{if(this.eat(t))break;if(this.match(21)){if(r.push(this.parseAssignableListItemTypes(this.parseRestBinding(),s)),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(p.UnsupportedParameterDecorator,{at:this.state.startLoc});this.match(26);)o.push(this.parseDecorator());r.push(this.parseAssignableListItem(s,o))}}return r}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let t=this.startNode(),{type:e,startLoc:s}=this.state;return e===21?this.parseBindingRestProperty(t):(e===138?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,s,!1,!1,!0,!1))}parseAssignableListItem(t,e){let s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s,t);let i=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),i}parseAssignableListItemTypes(t,e){return t}parseMaybeDefault(t,e){var s,i;if((s=t)!=null||(t=this.state.startLoc),e=(i=e)!=null?i:this.parseBindingAtom(),!this.eat(29))return e;let r=this.startNodeAt(t);return r.left=e,r.right=this.parseMaybeAssignAllowIn(),this.finishNode(r,"AssignmentPattern")}isValidLVal(t,e,s){return Qi({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},t)}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,{in:e,binding:s=64,checkClashes:i=!1,strictModeChanged:r=!1,hasParenthesizedAncestor:n=!1}){var o;let h=t.type;if(this.isObjectMethod(t))return;let l=this.isOptionalMemberExpression(t);if(l||h==="MemberExpression"){l&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(p.InvalidLhsOptionalChaining,{at:t,ancestor:e})),s!==64&&this.raise(p.InvalidPropertyBindingPattern,{at:t});return}if(h==="Identifier"){this.checkIdentifier(t,s,r);let{name:y}=t;i&&(i.has(y)?this.raise(p.ParamDupe,{at:t}):i.add(y));return}let c=this.isValidLVal(h,!(n||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(c===!0)return;if(c===!1){let y=s===64?p.InvalidLhs:p.InvalidLhsBinding;this.raise(y,{at:t,ancestor:e});return}let[u,f]=Array.isArray(c)?c:[c,h==="ParenthesizedExpression"],d=h==="ArrayPattern"||h==="ObjectPattern"?{type:h}:e;for(let y of[].concat(t[u]))y&&this.checkLVal(y,{in:d,binding:s,checkClashes:i,strictModeChanged:r,hasParenthesizedAncestor:f})}checkIdentifier(t,e,s=!1){this.state.strict&&(s?ts(t.name,this.inModule):es(t.name))&&(e===64?this.raise(p.StrictEvalArguments,{at:t,referenceName:t.name}):this.raise(p.StrictEvalArgumentsBinding,{at:t,bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(p.LetInLexicalBinding,{at:t}),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(p.InvalidRestAssignmentPattern,{at:t})}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?p.RestTrailingComma:p.ElementAfterRest,{at:this.state.startLoc}),!0):!1}},Zi=(a,t)=>Object.hasOwnProperty.call(a,t)&&a[t];function er(a){if(a==null)throw new Error(`Unexpected ${a} value.`);return a}function Vt(a){if(!a)throw new Error("Assert fail")}var x=$`typescript`({AbstractMethodHasImplementation:({methodName:a})=>`Method '${a}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:a})=>`Property '${a}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:a})=>`'declare' is not allowed in ${a}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:a})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:a})=>`Duplicate modifier: '${a}'.`,EmptyHeritageClauseType:({token:a})=>`'${a}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:a})=>`'${a[0]}' modifier cannot be used with '${a[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:a})=>`Index signatures cannot have an accessibility modifier ('${a}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:a})=>`'${a}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:a})=>`'${a}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:a})=>`'${a}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:a})=>`'${a[0]}' modifier must precede '${a[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:a})=>`Private elements cannot have an accessibility modifier ('${a}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:a})=>`Single type parameter ${a} should have a trailing comma. Example usage: <${a},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",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:({type:a})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${a}.`});function tr(a){switch(a){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}}function qt(a){return a==="private"||a==="public"||a==="protected"}function sr(a){return a==="in"||a==="out"}var ir=a=>class extends a{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:x.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter})}getScopeHandler(){return pt}tsIsIdentifier(){return S(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,s){if(!S(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(e.indexOf(i)!==-1){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:i,errorTemplate:r=x.InvalidModifierOnTypeMember},n){let o=(l,c,u,f)=>{c===u&&n[f]&&this.raise(x.InvalidModifiersOrder,{at:l,orderedModifiers:[u,f]})},h=(l,c,u,f)=>{(n[u]&&c===f||n[f]&&c===u)&&this.raise(x.IncompatibleModifiers,{at:l,modifiers:[u,f]})};for(;;){let{startLoc:l}=this.state,c=this.tsParseModifier(e.concat(s??[]),i);if(!c)break;qt(c)?n.accessibility?this.raise(x.DuplicateAccessibilityModifier,{at:l,modifier:c}):(o(l,c,c,"override"),o(l,c,c,"static"),o(l,c,c,"readonly"),n.accessibility=c):sr(c)?(n[c]&&this.raise(x.DuplicateModifier,{at:l,modifier:c}),n[c]=!0,o(l,c,"in","out")):(Object.hasOwnProperty.call(n,c)?this.raise(x.DuplicateModifier,{at:l,modifier:c}):(o(l,c,"static","readonly"),o(l,c,"static","override"),o(l,c,"override","readonly"),o(l,c,"abstract","override"),h(l,c,"declare","override"),h(l,c,"static","abstract")),n[c]=!0),s!=null&&s.includes(c)&&this.raise(r,{at:l,modifier:c})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){let i=[];for(;!this.tsIsListTerminator(e);)i.push(s());return i}tsParseDelimitedList(e,s,i){return er(this.tsParseDelimitedListWorker(e,s,!0,i))}tsParseDelimitedListWorker(e,s,i,r){let n=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let h=s();if(h==null)return;if(n.push(h),this.eat(12)){o=this.state.lastTokStart;continue}if(this.tsIsListTerminator(e))break;i&&this.expect(12);return}return r&&(r.value=o),n}tsParseBracketedList(e,s,i,r,n){r||(i?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,s,n);return i?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(x.UnsupportedImportTypeArgument,{at:this.state.startLoc}),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let s=this.parseIdentifier(e);for(;this.eat(16);){let i=this.startNodeAtNode(s);i.left=s,i.right=this.parseIdentifier(e),s=this.finishNode(i,"TSQualifiedName")}return s}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let i={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,i),s.params.length===0&&this.raise(x.EmptyTypeParameters,{at:s}),i.value!==-1&&this.addExtra(s,"trailingComma",i.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){let i=e===19,r="parameters",n="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[r]=this.tsParseBindingListForSignature(),i?s[n]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let s of e){let{type:i}=s;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(x.UnsupportedSignatureParameterKind,{at:s,type:i})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),S(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);let i=e;if(this.match(10)||this.match(47)){s&&this.raise(x.ReadonlyForMethodSignature,{at:e});let r=i;r.kind&&this.match(47)&&this.raise(x.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon();let n="parameters",o="typeAnnotation";if(r.kind==="get")r[n].length>0&&(this.raise(p.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(r[n][0])&&this.raise(x.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if(r.kind==="set"){if(r[n].length!==1)this.raise(p.BadSetterArity,{at:this.state.curPosition()});else{let h=r[n][0];this.isThisParam(h)&&this.raise(x.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),h.type==="Identifier"&&h.optional&&this.raise(x.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),h.type==="RestElement"&&this.raise(x.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}r[o]&&this.raise(x.SetAccesorCannotHaveReturnType,{at:r[o]})}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}else{let r=i;s&&(r.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(i=>{let{type:r}=i;s&&r!=="TSRestType"&&r!=="TSOptionalType"&&!(r==="TSNamedTupleMember"&&i.optional)&&this.raise(x.OptionalTypeBeforeRequired,{at:i}),s||(s=r==="TSNamedTupleMember"&&i.optional||r==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,s=this.eat(21),i,r,n,o,l=M(this.state.type)?this.lookaheadCharCode():null;if(l===58)i=!0,n=!1,r=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(l===63){n=!0;let c=this.state.startLoc,u=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,r=this.createIdentifier(this.startNodeAt(c),u),this.expect(17),this.expect(14),o=this.tsParseType()):(i=!1,o=f,this.expect(17))}else o=this.tsParseType(),n=this.eat(17),i=this.eat(14);if(i){let c;r?(c=this.startNodeAtNode(r),c.optional=n,c.label=r,c.elementType=o,this.eat(17)&&(c.optional=!0,this.raise(x.TupleOptionalAfterType,{at:this.state.lastTokStartLoc}))):(c=this.startNodeAtNode(o),c.optional=n,this.raise(x.InvalidTupleMemberLabel,{at:o}),c.label=o,c.elementType=this.tsParseType()),o=this.finishNode(c,"TSNamedTupleMember")}else if(n){let c=this.startNodeAtNode(o);c.typeAnnotation=o,o=this.finishNode(c,"TSOptionalType")}if(s){let c=this.startNodeAt(e);c.typeAnnotation=o,o=this.finishNode(c,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){let i=this.startNode();return e==="TSConstructorType"&&(i.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),s=this.lookahead();return s.type!==134&&s.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(S(e)||e===88||e===84){let s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":tr(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(x.UnexpectedReadonly,{at:e})}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return gi(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,i){let r=this.startNode(),n=this.eat(i),o=[];do o.push(s());while(this.eat(i));return o.length===1&&!n?o[0]:(r.types=o,this.finishNode(r,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(S(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let s=this.startNode();this.expect(e);let i=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(78)){let h=this.tsParseThisTypeOrThisTypePredicate();return h.type==="TSThisType"?(i.parameterName=h,i.asserts=!0,i.typeAnnotation=null,h=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(h,i),h.asserts=!0),s.typeAnnotation=h,this.finishNode(s,"TSTypeAnnotation")}let n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return r?(i.parameterName=this.parseIdentifier(),i.asserts=r,i.typeAnnotation=null,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);let o=this.tsParseTypeAnnotation(!1);return i.parameterName=n,i.typeAnnotation=o,i.asserts=r,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!S(this.state.type)&&!this.match(78)?!1:(e&&this.raise(p.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){Vt(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedTypeAssertion,{at:this.state.startLoc});let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let s=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let r=this.startNode();return r.expression=this.tsParseEntityName(),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSExpressionWithTypeArguments")});return i.length||this.raise(x.EmptyHeritageClauseType,{at:s,token:e}),i}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),S(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(x.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){let s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),e.body=i}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,i){e.isExport=i||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let r=this.tsParseModuleReference();return e.importKind==="type"&&r.type!=="TSExternalModuleReference"&&this.raise(x.ImportAliasHasImportType,{at:r}),e.moduleReference=r,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let s=this.state.clone(),i=e();return this.state=s,i}tsTryParseAndCatch(e){let s=this.tryParse(i=>e()||i());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){let s=this.state.clone(),i=e();if(i!==void 0&&i!==!1)return i;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,i;return this.isContextual(100)&&(s=74,i="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let r=this.tsParseInterfaceDeclaration(e,{declare:!0});if(r)return r}default:if(S(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,i){switch(s.name){case"declare":{let r=this.tsTryParseDeclare(e);return r&&(r.declare=!0),r}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let r=e;return r.global=!0,r.id=s,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,i)}}tsParseDeclaration(e,s,i,r){switch(s){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||S(this.state.type)))return this.tsParseAbstractDeclaration(e,r);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(S(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&S(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(i)&&S(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let r=this.startNodeAt(e);return r.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(r),r.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),r});if(this.state.maybeInArrowParameters=s,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(x.EmptyTypeArguments,{at:e}):!this.state.inType&&this.curContext()===w.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Ti(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){let i=this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},r);let n=r.accessibility,o=r.override,h=r.readonly;!(e&4)&&(n||h||o)&&this.raise(x.UnexpectedParameterModifier,{at:i});let l=this.parseMaybeDefault();this.parseAssignableListItemTypes(l,e);let c=this.parseMaybeDefault(l.loc.start,l);if(n||h||o){let u=this.startNodeAt(i);return s.length&&(u.decorators=s),n&&(u.accessibility=n),h&&(u.readonly=h),o&&(u.override=o),c.type!=="Identifier"&&c.type!=="AssignmentPattern"&&this.raise(x.UnsupportedParameterPropertyKind,{at:u}),u.parameter=c,this.finishNode(u,"TSParameterProperty")}return s.length&&(l.decorators=s),c}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(x.PatternIsOptional,{at:s})}setArrowFunctionParameters(e,s,i){super.setArrowFunctionParameters(e,s,i),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,i=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let r=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,r):r==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(x.DeclareFunctionHasImplementation,{at:e}),e.declare)?super.parseFunctionBodyAndFinish(e,r,i):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,i))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(x.UnexpectedTypeAnnotation,{at:s.typeAnnotation})})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,i,r){let n=super.parseArrayLike(e,s,i,r);return n.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(e,s,i,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let n=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return r.stop=!0,e;r.optionalChainMember=n=!0,this.next()}if(this.match(47)||this.match(51)){let o,h=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(s);if(f)return f}let l=this.tsParseTypeArgumentsInExpression();if(!l)return;if(n&&!this.match(10)){o=this.state.curPosition();return}if(Oe(this.state.type)){let f=super.parseTaggedTemplateExpression(e,s,r);return f.typeParameters=l,f}if(!i&&this.eat(10)){let f=this.startNodeAt(s);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=l,r.optionalChainMember&&(f.optional=n),this.finishCallExpression(f,r.optionalChainMember)}let c=this.state.type;if(c===48||c===52||c!==10&&Xe(c)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(s);return u.expression=e,u.typeParameters=l,this.finishNode(u,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),h)return h.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(x.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),h}return super.parseSubscript(e,s,i,r)}parseNewCallee(e){var s;super.parseNewCallee(e);let{callee:i}=e;i.type==="TSInstantiationExpression"&&!((s=i.extra)!=null&&s.parenthesized)&&(e.typeParameters=i.typeParameters,e.callee=i.expression)}parseExprOp(e,s,i){let r;if(ke(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){let n=this.startNodeAt(s);return n.expression=e,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(r&&this.raise(p.UnexpectedKeyword,{at:this.state.startLoc,keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(n,r?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(n,s,i)}return super.parseExprOp(e,s,i)}checkReservedWord(e,s,i,r){this.state.isAmbientContext||super.checkReservedWord(e,s,i,r)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(x.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,i,r){super.applyImportPhase(e,s,i,r),s?e.exportKind=i==="type"?"type":"value":e.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(S(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let i=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,i);s=super.parseImportSpecifiersAndAfter(e,i)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(x.TypeImportCannotSpecifyDefaultAndNamed,{at:s}),s}parseExport(e,s){if(this.match(83)){this.next();let i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,i,!0)}else if(this.eat(29)){let i=e;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=e;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,i=!1){let{isAmbientContext:r}=this.state,n=super.parseVarStatement(e,s,i||r);if(!r)return n;for(let{id:o,init:h}of n.declarations)h&&(s!=="const"||o.typeAnnotation?this.raise(x.InitializerNotAllowedInAmbientContext,{at:h}):ar(h,this.hasPlugin("estree"))||this.raise(x.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:h}));return n}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(i=>qt(i)?e.accessibility===i:!!e[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,i){let r=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:r,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:x.InvalidModifierOnTypeParameterPositions},s);let n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,r)&&this.raise(x.StaticBlockCannotHaveModifier,{at:this.state.curPosition()}),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,i,!!s.static)};s.declare?this.tsInAmbientContext(n):n()}parseClassMemberWithIsStatic(e,s,i,r){let n=this.tsTryParseIndexSignature(s);if(n){e.body.push(n),s.abstract&&this.raise(x.IndexSignatureHasAbstract,{at:s}),s.accessibility&&this.raise(x.IndexSignatureHasAccessibility,{at:s,modifier:s.accessibility}),s.declare&&this.raise(x.IndexSignatureHasDeclare,{at:s}),s.override&&this.raise(x.IndexSignatureHasOverride,{at:s});return}!this.state.inAbstractClass&&s.abstract&&this.raise(x.NonAbstractClassHasAbstractMethod,{at:s}),s.override&&(i.hadSuperClass||this.raise(x.OverrideNotInSubClass,{at:s})),super.parseClassMemberWithIsStatic(e,s,i,r)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(x.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(x.ClassMethodHasDeclare,{at:e})}parseExpressionStatement(e,s,i){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,i):void 0)||super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,i);let r=this.tryParse(()=>super.parseConditional(e,s));return r.node?(r.error&&(this.state=r.failState),r.node):(r.error&&super.setOptionalParametersError(i,r.error),e)}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let s=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(x.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});let n=S(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?((n.type==="TSInterfaceDeclaration"||n.type==="TSTypeAliasDeclaration"||i)&&(e.exportKind="type"),i&&(this.resetStartLocation(n,s),n.declare=!0),n):null}parseClassId(e,s,i,r){if((!s||i)&&this.isContextual(113))return;super.parseClassId(e,s,i,e.declare?1024:8331);let n=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(x.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){let{key:s}=e;this.raise(x.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(x.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(x.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(x.AccessorCannotBeOptional,{at:e}),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,i,r,n,o){let h=this.tsTryParseTypeParameters(this.tsParseConstModifier);h&&n&&this.raise(x.ConstructorHasTypeParameters,{at:h});let{declare:l=!1,kind:c}=s;l&&(c==="get"||c==="set")&&this.raise(x.DeclareAccessor,{at:s,kind:c}),h&&(s.typeParameters=h),super.pushClassMethod(e,s,i,r,n,o)}pushClassPrivateMethod(e,s,i,r){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(s.typeParameters=n),super.pushClassPrivateMethod(e,s,i,r)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,i,r,n,o,h){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);return l&&(e.typeParameters=l),super.parseObjPropValue(e,s,i,r,n,o,h)}parseFunctionParams(e,s){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(e.typeParameters=i),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(e.id.typeAnnotation=i,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var i,r,n,o,h;let l,c,u;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(l=this.state.clone(),c=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!c.error)return c.node;let{context:y}=this.state,I=y[y.length-1];(I===w.j_oTag||I===w.j_expr)&&y.pop()}if(!((i=c)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!l||l===this.state)&&(l=this.state.clone());let f,d=this.tryParse(y=>{var I,C;f=this.tsParseTypeParameters(this.tsParseConstModifier);let E=super.parseMaybeAssign(e,s);return(E.type!=="ArrowFunctionExpression"||(I=E.extra)!=null&&I.parenthesized)&&y(),((C=f)==null?void 0:C.params.length)!==0&&this.resetStartLocationFromNode(E,f),E.typeParameters=f,E},l);if(!d.error&&!d.aborted)return f&&this.reportReservedArrowTypeParam(f),d.node;if(!c&&(Vt(!this.hasPlugin("jsx")),u=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!u.error))return u.node;if((r=c)!=null&&r.node)return this.state=c.failState,c.node;if(d.node)return this.state=d.failState,f&&this.reportReservedArrowTypeParam(f),d.node;if((n=u)!=null&&n.node)return this.state=u.failState,u.node;throw((o=c)==null?void 0:o.error)||d.error||((h=u)==null?void 0:h.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedArrowTypeParam,{at:e})}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(i=>{let r=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),r});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,s){if(!(s&2))return e;this.eat(17)&&(e.optional=!0);let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(x.UnexpectedTypeCastInParameter,{at:e}):this.raise(x.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,i){return Zi({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(i!==64||!s)&&["expression",!0],TSSatisfiesExpression:(i!==64||!s)&&["expression",!0],TSTypeAssertion:(i!==64||!s)&&["expression",!0]},e)||super.isValidLVal(e,s,i)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(e);return i.typeParameters=s,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startthis.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let s=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?s+1:s}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){let s=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=s}}parseClass(e,s,i){let r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,i)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(x.NonClassMethodPropertyHasAbstractModifer,{at:e}),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,i,r,n,o,h){let l=super.parseMethod(e,s,i,r,n,o,h);if(l.abstract&&(this.hasPlugin("estree")?!!l.value.body:!!l.body)){let{key:u}=l;this.raise(x.AbstractMethodHasImplementation,{at:l,methodName:u.type==="Identifier"&&!l.computed?u.name:`[${this.input.slice(u.start,u.end)}]`})}return l}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,i,r){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!1,i),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,i,r))}parseImportSpecifier(e,s,i,r,n){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!0,i),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,i,r,i?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,i){let r=s?"imported":"local",n=s?"local":"exported",o=e[r],h,l=!1,c=!0,u=o.loc.start;if(this.isContextual(93)){let d=this.parseIdentifier();if(this.isContextual(93)){let y=this.parseIdentifier();M(this.state.type)?(l=!0,o=d,h=s?this.parseIdentifier():this.parseModuleExportName(),c=!1):(h=y,c=!1)}else M(this.state.type)?(c=!1,h=s?this.parseIdentifier():this.parseModuleExportName()):(l=!0,o=d)}else M(this.state.type)&&(l=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());l&&i&&this.raise(s?x.TypeModifierIsUsedInTypeImports:x.TypeModifierIsUsedInTypeExports,{at:u}),e[r]=o,e[n]=h;let f=s?"importKind":"exportKind";e[f]=l?"type":"value",c&&this.eatContextual(93)&&(e[n]=s?this.parseIdentifier():this.parseModuleExportName()),e[n]||(e[n]=V(e[r])),s&&this.checkIdentifier(e[n],l?4098:4096)}};function rr(a){if(a.type!=="MemberExpression")return!1;let{computed:t,property:e}=a;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:ls(a.object)}function ar(a,t){var e;let{type:s}=a;if((e=a.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){let{value:i}=a;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(hs(a,t)||nr(a,t)||s==="TemplateLiteral"&&a.expressions.length===0||rr(a))}function hs(a,t){return t?a.type==="Literal"&&(typeof a.value=="number"||"bigint"in a):a.type==="NumericLiteral"||a.type==="BigIntLiteral"}function nr(a,t){if(a.type==="UnaryExpression"){let{operator:e,argument:s}=a;if(e==="-"&&hs(s,t))return!0}return!1}function ls(a){return a.type==="Identifier"?!0:a.type!=="MemberExpression"||a.computed?!1:ls(a.object)}var zt=$`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),or=a=>class extends a{parsePlaceholder(e){if(this.match(144)){let s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let i=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=s,i?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,i,r){e!==void 0&&super.checkReservedWord(e,s,i,r)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,i){return e==="Placeholder"||super.isValidLVal(e,s,i)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var i;if(s.type!=="Placeholder"||(i=s.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){let r=e;return r.label=this.finishPlaceholder(s,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}return this.semicolon(),e.name=s.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,s,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,i)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,i){let r=s?"ClassDeclaration":"ClassExpression";this.next();let n=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(i||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,r);throw this.raise(zt.ClassNameIsRequired,{at:this.state.startLoc})}else this.parseClassId(e,s,i);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,n),this.finishNode(e,r)}parseExport(e,s){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(e,s);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let r=this.startNode();return r.exported=i,e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],super.parseExport(e,s)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(H(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var i;return(i=e.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){let{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(i=>i.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let i=this.startNodeAtNode(s);return i.local=s,e.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(zt.UnexpectedSpace,{at:this.state.lastTokEndLoc})}},hr=a=>class extends a{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,s=this.startNode();if(this.next(),S(this.state.type)){let i=this.parseIdentifierName(),r=this.createIdentifier(s,i);if(r.type="V8IntrinsicIdentifier",this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function N(a,t){let[e,s]=typeof t=="string"?[t,{}]:t,i=Object.keys(s),r=i.length===0;return a.some(n=>{if(typeof n=="string")return r&&n===e;{let[o,h]=n;if(o!==e)return!1;for(let l of i)if(h[l]!==s[l])return!1;return!0}})}function K(a,t,e){let s=a.find(i=>Array.isArray(i)?i[0]===t:i===t);return s&&Array.isArray(s)&&s.length>1?s[1][e]:null}var Kt=["minimal","fsharp","hack","smart"],Ht=["^^","@@","^","%","#"],Wt=["hash","bar"];function lr(a){if(N(a,"decorators")){if(N(a,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=K(a,"decorators","decoratorsBeforeExport");if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let e=K(a,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(N(a,"flow")&&N(a,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(N(a,"placeholders")&&N(a,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(N(a,"pipelineOperator")){let t=K(a,"pipelineOperator","proposal");if(!Kt.includes(t)){let s=Kt.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}let e=N(a,["recordAndTuple",{syntaxType:"hash"}]);if(t==="hack"){if(N(a,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(N(a,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=K(a,"pipelineOperator","topicToken");if(!Ht.includes(s)){let i=Ht.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(s==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(t==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(N(a,"moduleAttributes")){if(N(a,"importAssertions")||N(a,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(K(a,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(N(a,"importAssertions")&&N(a,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(N(a,"recordAndTuple")&&K(a,"recordAndTuple","syntaxType")!=null&&!Wt.includes(K(a,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Wt.map(t=>`'${t}'`).join(", "));if(N(a,"asyncDoExpressions")&&!N(a,"doExpressions")){let t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(N(a,"optionalChainingAssign")&&K(a,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var cs={estree:li,jsx:Yi,flow:Gi,typescript:ir,v8intrinsic:hr,placeholders:or},cr=Object.keys(cs),He={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function pr(a){if(a==null)return Object.assign({},He);if(a.annexB!=null&&a.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let s of Object.keys(He)){var e;t[s]=(e=a[s])!=null?e:He[s]}return t}var ft=class extends ut{checkProto(t,e,s,i){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let r=t.key;if((r.type==="Identifier"?r.name:r.value)==="__proto__"){if(e){this.raise(p.RecordNoProto,{at:r});return}s.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=r.loc.start):this.raise(p.DuplicateProto,{at:r})),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.state.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){let e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){let i=this.startNodeAt(e);for(i.expressions=[s];this.eat(12);)i.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){let s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let i;t?i=!1:(t=new ee,i=!0);let{type:r}=this.state;(r===10||S(r))&&(this.state.potentialArrowAt=this.state.start);let n=this.parseMaybeConditional(t);if(e&&(n=e.call(this,n,s)),di(this.state.type)){let o=this.startNodeAt(s),h=this.state.value;if(o.operator=h,this.match(29)){this.toAssignable(n,!0),o.left=n;let l=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=l&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=l&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=l&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=n;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(n,{in:this.finishNode(o,"AssignmentExpression")}),o}else i&&this.checkExpressionErrors(t,!0);return n}parseMaybeConditional(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprOps(t);return this.shouldExitDescending(i,s)?i:this.parseConditional(i,e,t)}parseConditional(t,e,s){if(this.eat(17)){let i=this.startNodeAt(e);return i.test=t,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){let r=this.getPrivateNameSV(t);(s>=ke(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(p.PrivateInExpectedIn,{at:t,identifierName:r}),this.classScope.usePrivateName(r,t.loc.start)}let i=this.state.type;if(yi(i)&&(this.prodParam.hasIn||!this.match(58))){let r=ke(i);if(r>s){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}let n=this.startNodeAt(e);n.left=t,n.operator=this.state.value;let o=i===41||i===42,h=i===40;if(h&&(r=ke(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(p.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});n.right=this.parseExprOpRightExpr(i,r);let l=this.finishNode(n,o||h?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(h&&(c===41||c===42)||o&&c===40)throw this.raise(p.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(l,e,s)}}return t}parseExprOpRightExpr(t,e){let s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(p.PipeBodyIsTighter,{at:this.state.startLoc});return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){let s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,bi(t)?e-1:e)}parseHackPipeBody(){var t;let{startLoc:e}=this.state,s=this.parseMaybeAssign();return ii.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(p.PipeUnparenthesizedBody,{at:e,type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipeTopicUnused,{at:e}),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(p.UnexpectedTokenUnaryExponentiation,{at:t.argument})}parseMaybeUnary(t,e){let s=this.state.startLoc,i=this.isContextual(96);if(i&&this.isAwaitAllowed()){this.next();let h=this.parseAwait(s);return e||this.checkExponentialAfterUnary(h),h}let r=this.match(34),n=this.startNode();if(Pi(this.state.type)){n.operator=this.state.value,n.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let h=this.match(89);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&h){let l=n.argument;l.type==="Identifier"?this.raise(p.StrictDelete,{at:n}):this.hasPropertyAsPrivateName(l)&&this.raise(p.DeletePrivateField,{at:n})}if(!r)return e||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}let o=this.parseUpdate(n,r,t);if(i){let{type:h}=this.state;if((this.hasPlugin("v8intrinsic")?Xe(h):Xe(h)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(p.AwaitNotInAsyncContext,{at:s}),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){let n=t;return this.checkLVal(n.argument,{in:this.finishNode(n,"UpdateExpression")}),t}let i=this.state.startLoc,r=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return r;for(;xi(this.state.type)&&!this.canInsertSemicolon();){let n=this.startNodeAt(i);n.operator=this.state.value,n.prefix=!1,n.argument=r,this.next(),this.checkLVal(r,{in:r=this.finishNode(n,"UpdateExpression")})}return r}parseExprSubscripts(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(t);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,e)}parseSubscripts(t,e,s){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,i),i.maybeAsyncArrow=!1;while(!i.stop);return t}parseSubscript(t,e,s,i){let{type:r}=this.state;if(!s&&r===15)return this.parseBind(t,e,s,i);if(Oe(r))return this.parseTaggedTemplateExpression(t,e,i);let n=!1;if(r===18){if(s&&(this.raise(p.OptionalChainingNoNew,{at:this.state.startLoc}),this.lookaheadCharCode()===40))return i.stop=!0,t;i.optionalChainMember=n=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,i,n);{let o=this.eat(0);return o||n||this.eat(16)?this.parseMember(t,e,i,o,n):(i.stop=!0,t)}}parseMember(t,e,s,i,r){let n=this.startNodeAt(e);return n.object=t,n.computed=i,i?(n.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(p.SuperPrivateField,{at:e}),this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),s.optionalChainMember?(n.optional=r,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(t,e,s,i){let r=this.startNodeAt(e);return r.object=t,this.next(),r.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,i){let r=this.state.maybeInArrowParameters,n=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=t;let{maybeAsyncArrow:h,optionalChainMember:l}=s;h&&(this.expressionScope.enter(Vi()),n=new ee),l&&(o.optional=i),i?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,n);let c=this.finishCallExpression(o,l);return h&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),c)):(h&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(c)),this.state.maybeInArrowParameters=r,c}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){let i=this.startNodeAt(e);return i.tag=t,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(p.OptionalChainingNoTemplate,{at:e}),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),t.arguments.length===0||t.arguments.length>2)this.raise(p.ImportCallArity,{at:t,maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let s of t.arguments)s.type==="SpreadElement"&&this.raise(p.ImportCallSpreadArgument,{at:s});return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,i,r){let n=[],o=!0,h=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(p.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),i&&this.addTrailingCommaExtraToNode(i),this.next();break}n.push(this.parseExprListItem(!1,r,s))}return this.state.inFSharpPipelineDirectBody=h,n}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&Pe(t,e.innerComments),e.callee.trailingComments&&Pe(t,e.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(p.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let r=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(r)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let r=e.callee=this.parseNoCallExpr();if(r.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(p.UnsupportedBind,{at:r})}case 138:return this.raise(p.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.parseTopicReference(r);this.unexpected();break}case 47:{let r=this.input.codePointAt(this.nextTokenStart());j(r)||r===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(S(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let r=this.state.potentialArrowAt===this.state.start,n=this.state.containsEsc,o=this.parseIdentifier();if(!n&&o.name==="async"&&!this.canInsertSemicolon()){let{type:h}=this.state;if(h===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(S(h))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(h===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return r&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=L(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){let e=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(e,s,t,i)}finishTopicReference(t,e,s,i){if(this.testTopicReferenceConfiguration(s,e,i)){let r=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?p.PrimaryTopicNotAllowed:p.PipeTopicUnbound,{at:e}),this.registerTopicReference(),this.finishNode(t,r)}else throw this.raise(p.PipeTopicUnconfiguredToken,{at:e,token:H(i)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:H(s)}]);case"smart":return s===27;default:throw this.raise(p.PipeTopicRequiresHackPipes,{at:e})}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Le(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(p.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();let s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(p.SuperNotAllowed,{at:t}):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(p.UnexpectedSuper,{at:t}),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(p.UnsupportedSuper,{at:t}),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),e=this.startNodeAt(L(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;let i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(p.UnsupportedMetaProperty,{at:t.property,target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(p.ImportMetaOutsideModule,{at:e}),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(p.DynamicImportPhaseRequiresImportExpressions,{at:this.state.startLoc,phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){let s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let e=this.parseLiteral(t.value,"RegExpLiteral");return e.pattern=t.pattern,e.flags=t.flags,e}parseBooleanLiteral(t){let e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let e=this.state.startLoc,s;this.next(),this.expressionScope.enter($i());let i=this.state.maybeInArrowParameters,r=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let n=this.state.startLoc,o=[],h=new ee,l=!0,c,u;for(;!this.match(11);){if(l)l=!1;else if(this.expect(12,h.optionalParametersLoc===null?null:h.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let y=this.state.startLoc;if(c=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),y)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(h,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=r;let d=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(h),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,o,!1),d):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),c&&this.unexpected(c),this.checkExpressionErrors(h,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(n),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,f)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;let s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(p.UnexpectedNewTarget,{at:s}),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(p.ImportCallNotNewExpression,{at:s})}parseTemplateElement(t){let{start:e,startLoc:s,end:i,value:r}=this.state,n=e+1,o=this.startNodeAt(L(s,1));r===null&&(t||this.raise(p.InvalidEscapeSequenceTemplate,{at:L(this.state.firstInvalidTemplateEscapePos,1)}));let h=this.match(24),l=h?-1:-2,c=i+l;o.value={raw:this.input.slice(n,c).replace(/\r\n?/g,` -`),cooked:r===null?null:r.slice(1,l)},o.tail=h,this.next();let u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,L(this.state.lastTokEndLoc,l)),u}parseTemplate(t){let e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=Object.create(null),o=!0,h=this.startNode();for(h.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(h);break}let c;e?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),this.checkProto(c,s,n,i)),s&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,{at:c}),c.shorthand&&this.addExtra(c,"shorthand",!0),h.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=r;let l="ObjectExpression";return e?l="ObjectPattern":s&&(l="RecordExpression"),this.finishNode(h,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStart),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(p.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc,l=this.parsePropertyName(s,t);if(!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let c=l.name;c==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(55),this.parsePropertyName(s)),(c==="get"||c==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(l),s.kind=c,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,{at:this.state.curPosition(),kind:c}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t);i.length!==s&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,{at:t}),t.kind==="set"&&((e=i[i.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(p.BadSetterRestParameter,{at:t})}parseObjectMethod(t,e,s,i,r){if(r){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,V(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(p.InvalidCoverInitializedName,{at:r}),t.value=this.parseMaybeDefault(e,V(t.key))}else t.value=V(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,i,r,n,o){let h=this.parseObjectMethod(t,s,i,r,n)||this.parseObjectProperty(t,e,r,o);return h||this.unexpected(),h}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,r;if(M(s))r=this.parseIdentifier(!0);else switch(s){case 134:r=this.parseNumericLiteral(i);break;case 133:r=this.parseStringLiteral(i);break;case 135:r=this.parseBigIntLiteral(i);break;case 136:r=this.parseDecimalLiteral(i);break;case 138:{let n=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=n):this.raise(p.UnexpectedPrivateField,{at:n}),r=this.parsePrivateName();break}default:this.unexpected()}t.key=r,s!==138&&(t.computed=!1)}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,r,n,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(r?32:0)),this.prodParam.enter(Le(s,t.generator)),this.parseFunctionParams(t,i);let h=this.parseFunctionBodyAndFinish(t,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=this.startNode();return this.next(),n.elements=this.parseExprList(t,!s,i,n),this.state.inFSharpPipelineDirectBody=r,this.finishNode(n,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,i){this.scope.enter(6);let r=Le(s,!1);!this.match(5)&&this.prodParam.hasIn&&(r|=8),this.prodParam.enter(r),this.initFunction(t,s);let n=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=n,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){let i=e&&!this.match(5);if(this.expressionScope.enter(ns()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{let r=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{let h=!this.isSimpleParamList(t.params);o&&h&&this.raise(p.IllegalLanguageModeDirective,{at:(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t});let l=!r&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!h,e,l),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,l)}),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e10||!Li(t))return;if(s&&Ni(t)){this.raise(p.UnexpectedKeyword,{at:e,keyword:t});return}if((this.state.strict?i?ts:Zt:Qt)(t,this.inModule)){this.raise(p.UnexpectedReservedWord,{at:e,reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(p.YieldBindingIdentifier,{at:e});return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(p.AwaitBindingIdentifier,{at:e});return}if(this.scope.inStaticBlock){this.raise(p.AwaitBindingIdentifierInStaticBlock,{at:e});return}this.expressionScope.recordAsyncArrowParametersError({at:e})}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(p.ArgumentsInClass,{at:e});return}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(t){let e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(p.AwaitExpressionFormalParameter,{at:e}),this.eat(55)&&this.raise(p.ObsoleteAwaitStar,{at:e}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||Oe(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(p.YieldInParameter,{at:t}),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(p.PipelineHeadSequenceExpression,{at:e})}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){let s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{let s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(p.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipelineTopicUnused,{at:t})}withTopicBindingContext(t){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}},We={kind:"loop"},ur={kind:"switch"},fr=/[\uD800-\uDFFF]/u,Je=/in(?:stanceof)?/y;function dr(a,t){for(let e=0;e0)for(let[r,n]of Array.from(this.scope.undefinedExports))this.raise(p.ModuleExportUndefined,{at:n,localName:r});let i;return e===139?i=this.finishNode(t,"Program"):i=this.finishNodeAt(t,"Program",L(this.state.startLoc,-1)),i}stmtToDirective(t){let e=t;e.type="Directive",e.value=e.expression,delete e.expression;let s=e.value,i=s.value,r=this.input.slice(s.start,s.end),n=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",n),this.addExtra(s,"expressionValue",i),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(j(t)){if(Je.lastIndex=e,Je.test(this.input)){let s=this.codePointAtPos(Je.lastIndex);if(!Z(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifier(){let t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){let{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(S(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type,i=this.startNode(),r=!!(t&2),n=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return n||this.raise(this.state.strict?p.StrictFunction:this.options.annexB?p.SloppyFunctionAnnexB:p.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(i,!1,!r&&n);case 80:return r||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?r||this.raise(p.UnexpectedLexicalDeclaration,{at:i}):this.raise(p.AwaitUsingNotInAsyncContext,{at:i}),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(p.UnexpectedUsingDeclaration,{at:this.state.startLoc}):r||this.raise(p.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let c=this.nextTokenStart(),u=this.codePointAtPos(c);if(u!==91&&(!r&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(u,c)&&u!==123))break}case 75:r||this.raise(p.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let c=this.state.value;return this.parseVarStatement(i,c)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let c=this.lookaheadCharCode();if(c===40||c===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(p.UnexpectedImportExport,{at:this.state.startLoc}),this.next();let c;return s===83?(c=this.parseImport(i),c.type==="ImportDeclaration"&&(!c.importKind||c.importKind==="value")&&(this.sawUnambiguousESM=!0)):(c=this.parseExport(i,e),(c.type==="ExportNamedDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportAllDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(c),c}default:if(this.isAsyncFunction())return r||this.raise(p.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(i,!0,!r&&n)}let h=this.state.value,l=this.parseExpression();return S(s)&&l.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,h,l,t):this.parseExpressionStatement(i,l,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(p.ImportOutsideModule,{at:t})}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(p.DecoratorsBeforeAfterExport,{at:e.decorators[0]}),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(p.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(p.UnexpectedLeadingDecorator,{at:this.state.startLoc});return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,s;if(this.match(10)){let i=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(i,s);let r=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(p.DecoratorArgumentsOutsideParentheses,{at:r})}else{for(s=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(e);i.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,s=this.finishNode(i,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){let e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;sthis.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(We);let e=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(e=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);let s=this.isContextual(100);{let h=this.isContextual(96)&&this.startsAwaitUsing(),l=h||this.isContextual(107)&&this.startsUsingForOf(),c=s&&this.hasFollowingBindingAtom()||l;if(this.match(74)||this.match(75)||c){let u=this.startNode(),f;h?(f="await using",this.isAwaitAllowed()||this.raise(p.AwaitUsingNotInAsyncContext,{at:this.state.startLoc}),this.next()):f=this.state.value,this.next(),this.parseVar(u,!0,f);let d=this.finishNode(u,"VariableDeclaration"),y=this.match(58);return y&&l&&this.raise(p.ForInUsing,{at:d}),(y||this.isContextual(102))&&d.declarations.length===1?this.parseForIn(t,d,e):(e!==null&&this.unexpected(e),this.parseFor(t,d))}}let i=this.isContextual(95),r=new ee,n=this.parseExpression(!0,r),o=this.isContextual(102);if(o&&(s&&this.raise(p.ForOfLet,{at:n}),e===null&&i&&n.type==="Identifier"&&this.raise(p.ForOfAsync,{at:n})),o||this.match(58)){this.checkDestructuringPrivate(r),this.toAssignable(n,!0);let h=o?"ForOfStatement":"ForInStatement";return this.checkLVal(n,{in:{type:h}}),this.parseForIn(t,n,e)}else this.checkExpressionErrors(r,!0);return e!==null&&this.unexpected(e),this.parseFor(t,n)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(p.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let e=t.cases=[];this.expect(5),this.state.labels.push(ur),this.scope.enter(0);let s;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let r=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),r?s.test=this.parseExpression():(i&&this.raise(p.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),i=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(p.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{in:{type:"CatchClause"},binding:9}),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(p.NoCatchOrFinally,{at:t}),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(We),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(p.StrictWith,{at:this.state.startLoc}),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,i){for(let n of this.state.labels)n.name===e&&this.raise(p.LabelRedeclaration,{at:s,labelName:e});let r=mi(this.state.type)?"loop":this.match(71)?"switch":null;for(let n=this.state.labels.length-1;n>=0;n--){let o=this.state.labels[n];if(o.statementStart===t.start)o.statementStart=this.state.start,o.kind=r;else break}return this.state.labels.push({name:e,kind:r,statementStart:this.state.start}),t.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){let i=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(i,t,!1,8,s),e&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,i,r){let n=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(n,e?o:void 0,s,i,r)}parseBlockOrModuleBlockBody(t,e,s,i,r){let n=this.state.strict,o=!1,h=!1;for(;!this.match(i);){let l=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!h){if(this.isValidDirective(l)){let c=this.stmtToDirective(l);e.push(c),!o&&c.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}h=!0,this.state.strictErrors.clear()}t.push(l)}r==null||r.call(this,o),n||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){let i=this.match(58);return this.next(),i?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(p.ForInOfLoopInitializer,{at:e,type:i?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(p.InvalidLhs,{at:e,ancestor:{type:"ForStatement"}}),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,i=!1){let r=t.declarations=[];for(t.kind=s;;){let n=this.startNode();if(this.parseVarId(n,s),n.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,n.init===null&&!i&&(n.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(p.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"}):s==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(p.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"})),r.push(this.finishNode(n,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){let s=this.parseBindingAtom();this.checkLVal(s,{in:{type:"VariableDeclarator"},binding:e==="var"?5:8201}),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){let s=e&2,i=!!(e&1),r=i&&!(e&4),n=!!(e&8);this.initFunction(t,n),this.match(55)&&(s&&this.raise(p.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),t.generator=!0),i&&(t.id=this.parseFunctionId(r));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Le(n,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||S(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(ji()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(t){return!t.computed&&!t.static&&(t.key.name==="constructor"||t.key.value==="constructor")}parseClassBody(t,e){this.classScope.enter();let s={hadConstructor:!1,hadSuperClass:t},i=[],r=this.startNode();if(r.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(p.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){i.push(this.parseDecorator());continue}let n=this.startNode();i.length&&(n.decorators=i,this.resetStartLocationFromNode(n,i[0]),i=[]),this.parseClassMember(r,n,s),n.kind==="constructor"&&n.decorators&&n.decorators.length>0&&this.raise(p.DecoratorConstructor,{at:n})}}),this.state.strict=e,this.next(),i.length)throw this.raise(p.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(r,"ClassBody")}parseClassMemberFromModifier(t,e){let s=this.parseIdentifier(!0);if(this.isClassMethod()){let i=e;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=e;return i.computed=!1,i.key=s,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,i)}parseClassMemberWithIsStatic(t,e,s,i){let r=e,n=e,o=e,h=e,l=e,c=r,u=r;if(e.static=i,this.parsePropertyNamePrefixOperator(e),this.eat(55)){c.kind="method";let C=this.match(138);if(this.parseClassElementName(c),C){this.pushClassPrivateMethod(t,n,!0,!1);return}this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsGenerator,{at:r.key}),this.pushClassMethod(t,r,!0,!1,!1,!1);return}let f=S(this.state.type)&&!this.state.containsEsc,d=this.match(138),y=this.parseClassElementName(e),I=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(c.kind="method",d){this.pushClassPrivateMethod(t,n,!1,!1);return}let C=this.isNonstaticConstructor(r),E=!1;C&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(p.DuplicateConstructor,{at:y}),C&&this.hasPlugin("typescript")&&e.override&&this.raise(p.OverrideOnConstructor,{at:y}),s.hadConstructor=!0,E=s.hadSuperClass),this.pushClassMethod(t,r,!1,!1,C,E)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(t,h):this.pushClassProperty(t,o);else if(f&&y.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(y);let C=this.eat(55);u.optional&&this.unexpected(I),c.kind="method";let E=this.match(138);this.parseClassElementName(c),this.parsePostMemberNameModifiers(u),E?this.pushClassPrivateMethod(t,n,C,!0):(this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsAsync,{at:r.key}),this.pushClassMethod(t,r,C,!0,!1,!1))}else if(f&&(y.name==="get"||y.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(y),c.kind=y.name;let C=this.match(138);this.parseClassElementName(r),C?this.pushClassPrivateMethod(t,n,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsAccessor,{at:r.key}),this.pushClassMethod(t,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r)}else if(f&&y.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(y);let C=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,l,C)}else this.isLineTerminator()?d?this.pushClassPrivateProperty(t,h):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){let{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(p.StaticPrototype,{at:this.state.startLoc}),e===138){s==="constructor"&&this.raise(p.ConstructorClassPrivateField,{at:this.state.startLoc});let i=this.parsePrivateName();return t.key=i,i}return this.parsePropertyName(t)}parseClassStaticBlock(t,e){var s;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let r=e.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(p.DecoratorStaticBlock,{at:e})}pushClassProperty(t,e){!e.computed&&(e.key.name==="constructor"||e.key.value==="constructor")&&this.raise(p.ConstructorClassField,{at:e.key}),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){let s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){if(!s&&!e.computed){let r=e.key;(r.name==="constructor"||r.value==="constructor")&&this.raise(p.ConstructorClassField,{at:r})}let i=this.parseClassAccessorProperty(e);t.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(t,e,s,i,r,n){t.body.push(this.parseMethod(e,s,i,r,n,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,i){let r=this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(r);let n=r.kind==="get"?r.static?6:2:r.kind==="set"?r.static?5:1:0;this.declareClassPrivateMethodInScope(r,n)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(ns()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,i=8331){if(S(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,i);else if(s||!e)t.id=null;else throw this.raise(p.MissingClassName,{at:this.state.startLoc})}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){let s=this.parseMaybeImportPhase(t,!0),i=this.maybeParseExportDefaultSpecifier(t,s),r=!i||this.eat(12),n=r&&this.eatExportStar(t),o=n&&this.maybeParseExportNamespaceSpecifier(t),h=r&&(!o||this.eat(12)),l=i||n;if(n&&!o){if(i&&this.unexpected(),e)throw this.raise(p.UnsupportedDecoratorExport,{at:t});return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let c=this.maybeParseExportNamedSpecifiers(t);i&&r&&!n&&!c&&this.unexpected(null,5),o&&h&&this.unexpected(null,98);let u;if(l||c){if(u=!1,e)throw this.raise(p.UnsupportedDecoratorExport,{at:t});this.parseExportFrom(t,l)}else u=this.maybeParseExportDeclaration(t);if(l||c||u){var f;let d=t;if(this.checkExport(d,!0,!1,!!d.source),((f=d.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(e,d.declaration,d);else if(e)throw this.raise(p.UnsupportedDecoratorExport,{at:t});return this.finishNode(d,"ExportNamedDeclaration")}if(this.eat(65)){let d=t,y=this.parseExportDefaultExpression();if(d.declaration=y,y.type==="ClassDeclaration")this.maybeTakeDecorators(e,y,d);else if(e)throw this.raise(p.UnsupportedDecoratorExport,{at:t});return this.checkExport(d,!0,!0),this.finishNode(d,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0:e.loc.start);let s=e||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,t.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){t.specifiers||(t.specifiers=[]);let e=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){t.specifiers||(t.specifiers=[]);let e=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(e)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(p.UnsupportedDefaultExport,{at:this.state.startLoc});let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(S(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(S(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||S(this.state.type)&&s)return!0;if(this.match(65)&&s){let i=this.input.charCodeAt(this.nextTokenStartSince(e+4));return i===34||i===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,{at:this.state.startLoc}),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,i){if(e){var r;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var n;let o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((n=o.extra)!=null&&n.parenthesized)&&this.raise(p.ExportDefaultFromAsIdentifier,{at:o})}}else if((r=t.specifiers)!=null&&r.length)for(let o of t.specifiers){let{exported:h}=o,l=h.type==="Identifier"?h.name:h.value;if(this.checkDuplicateExports(o,l),!i&&o.local){let{local:c}=o;c.type!=="Identifier"?this.raise(p.ExportBindingIsString,{at:o,localName:c.value,exportName:l}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(t.declaration){if(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"){let o=t.declaration.id;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(t,o.name)}else if(t.declaration.type==="VariableDeclaration")for(let o of t.declaration.declarations)this.checkDeclaration(o.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(let e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(p.DuplicateDefaultExport,{at:t}):this.raise(p.DuplicateExport,{at:t,exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){let e=[],s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),r=this.match(133),n=this.startNode();n.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(n,r,t,i))}return e}parseExportSpecifier(t,e,s,i){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=zi(t.local):t.exported||(t.exported=V(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let t=this.parseStringLiteral(this.state.value),e=t.value.match(fr);return e&&this.raise(p.ModuleExportNameHasLoneSurrogate,{at:t,surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){let{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(p.SourcePhaseImportRequiresDefault,{at:e[0].loc.start});else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(p.DeferImportRequiresNamespace,{at:e[0].loc.start});else if(t.module){var i;s!=="ImportDefaultSpecifier"&&this.raise(p.ImportReflectionNotBinding,{at:e[0].loc.start}),((i=t.assertions)==null?void 0:i.length)>0&&this.raise(p.ImportReflectionHasAssertion,{at:t.specifiers[0].loc.start})}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:e}=t;if(e!=null){let s=e.find(i=>{let r;if(i.type==="ExportSpecifier"?r=i.local:i.type==="ImportSpecifier"&&(r=i.imported),r!==void 0)return r.type==="Identifier"?r.name!=="default":r.value!=="default"});s!==void 0&&this.raise(p.ImportJSONBindingNotDefault,{at:s.loc.start})}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,i){e||(s==="module"?(this.expectPlugin("importReflection",i),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",i),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",i),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;let s=this.parseIdentifier(!0),{type:i}=this.state;return(M(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){let{type:e}=this.state;return S(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),r=i&&this.maybeParseStarImportSpecifier(t);return i&&!r&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{in:{type:e},binding:s}),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);let t=[],e=new Set;do{if(this.match(8))break;let s=this.startNode(),i=this.state.value;if(e.has(i)&&this.raise(p.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:i}),e.add(i),this.match(133)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(p.ModuleAttributeInvalidValue,{at:this.state.startLoc});s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],e=new Set;do{let s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(p.ModuleAttributeDifferentFromType,{at:s.key}),e.has(s.key.name)&&this.raise(p.ModuleAttributesWithDuplicateKeys,{at:s.key,key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(p.ModuleAttributeInvalidValue,{at:this.state.startLoc});s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e,s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(p.ImportAttributesUseAssert,{at:this.state.startLoc}),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){let s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(M(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(p.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let s=this.startNode(),i=this.match(133),r=this.isContextual(130);s.imported=this.parseModuleExportName();let n=this.parseImportSpecifier(s,i,t.importKind==="type"||t.importKind==="typeof",r,void 0);t.specifiers.push(n)}}parseImportSpecifier(t,e,s,i,r){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:n}=t;if(e)throw this.raise(p.ImportBindingIsString,{at:t,importName:n.value});this.checkReservedWord(n.name,t.loc.start,!0,!0),t.local||(t.local=V(n))}return this.finishImportSpecifier(t,"ImportSpecifier",r)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},Be=class extends dt{constructor(t,e){t=pr(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=mr(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return xe}parse(){this.enterInitialScopes();let t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t}};function mr(a){let t=new Map;for(let e of a){let[s,i]=Array.isArray(e)?e:[e,{}];t.has(s)||t.set(s,i||{})}return t}function yr(a,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let s=fe(t,a),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",fe(t,a).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return t.sourceType="script",fe(t,a).parse()}catch{}throw s}}else return fe(t,a).parse()}function xr(a,t){let e=fe(t,a);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Pr(a){let t={};for(let e of Object.keys(a))t[e]=_(a[e]);return t}var gr=Pr(pi);function fe(a,t){let e=Be;return a!=null&&a.plugins&&(lr(a.plugins),e=Tr(a.plugins)),new e(a,t)}var Jt={};function Tr(a){let t=cr.filter(i=>N(a,i)),e=t.join("/"),s=Jt[e];if(!s){s=Be;for(let i of t)s=cs[i](s);Jt[e]=s}return s}ge.parse=yr;ge.parseExpression=xr;ge.tokTypes=gr});var ws=Lt(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.extract=Dr;G.parse=Or;G.parseWithComments=Ss;G.print=Fr;G.strip=Mr;var Ir=/\*\/$/,Nr=/^\/\*\*?/,bs=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,kr=/(^|\s+)\/\/([^\r\n]*)/g,Ps=/^(\r?\n)+/,vr=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,gs=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,Lr=/(\r?\n|^) *\* ?/g,As=[];function Dr(a){let t=a.match(bs);return t?t[0].trimLeft():""}function Mr(a){let t=a.match(bs);return t&&t[0]?a.substring(t[0].length):a}function Or(a){return Ss(a).pragmas}function Ss(a){let t=` -`;a=a.replace(Nr,"").replace(Ir,"").replace(Lr,"$1");let e="";for(;e!==a;)e=a,a=a.replace(vr,`${t}$1 $2${t}`);a=a.replace(Ps,"").trimRight();let s=Object.create(null),i=a.replace(gs,"").replace(Ps,"").trimRight(),r;for(;r=gs.exec(a);){let n=r[2].replace(kr,"");typeof s[r[1]]=="string"||Array.isArray(s[r[1]])?s[r[1]]=As.concat(s[r[1]],n):s[r[1]]=n}return{comments:i,pragmas:s}}function Fr({comments:a="",pragmas:t={}}){let e=` -`,s="/**",i=" *",r=" */",n=Object.keys(t),o=n.flatMap(l=>Ts(l,t[l])).map(l=>`${i} ${l}${e}`).join("");if(!a){if(n.length===0)return"";if(n.length===1&&!Array.isArray(t[n[0]])){let l=t[n[0]];return`${s} ${Ts(n[0],l)[0]}${r}`}}let h=a.split(e).map(l=>`${i} ${l}`).join(e)+e;return s+e+(a?h:"")+(a&&n.length?i+e:"")+o+r}function Ts(a,t){return As.concat(t).map(e=>`@${a} ${e}`.trim())}});var ha={};Qs(ha,{parsers:()=>oa});var Ve=qe(Ct(),1);function br(a){let t=[];for(let e of a)try{return e()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var ps=br;function Ar(a){if(!a.startsWith("#!"))return"";let t=a.indexOf(` -`);return t===-1?a:a.slice(0,t)}var Re=Ar;function Sr(a,t){if(t===!1)return!1;if(a.charAt(t)==="/"&&a.charAt(t+1)==="*"){for(let e=t+2;e=this.length)throw this.raise(p.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):de(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos1){for(let i=0;i0){if(s&256){let r=!!(s&512),n=(i&4)>0;return r!==n}return!0}return s&128&&(i&8)>0?t.names.get(e)&2?!!(s&1):!1:s&2&&(i&1)>0?!0:super.isRedeclaredInScope(t,e,s)}checkLocalExport(t){let{name:e}=t;if(this.hasImport(e))return;let s=this.scopeStack.length;for(let i=s-1;i>=0;i--){let n=this.scopeStack[i].tsNames.get(e);if((n&1)>0||(n&16)>0)return}super.checkLocalExport(t)}},Gi=(a,t)=>Object.hasOwnProperty.call(a,t)&&a[t],hs=a=>a.type==="ParenthesizedExpression"?hs(a.expression):a,pt=class extends ht{toAssignable(t,e=!1){var s,i;let r;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(r=hs(t),e?r.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(p.InvalidParenthesizedAssignment,t):r.type!=="MemberExpression"&&!this.isOptionalMemberExpression(r)&&this.raise(p.InvalidParenthesizedAssignment,t):this.raise(p.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,h=t.properties.length,l=h-1;oi.type!=="ObjectMethod"&&(r===s||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(let s of t)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){let i=s&1,r=[],n=!0;for(;!this.eat(t);)if(n?n=!1:this.expect(12),i&&this.match(12))r.push(null);else{if(this.eat(t))break;if(this.match(21)){if(r.push(this.parseAssignableListItemTypes(this.parseRestBinding(),s)),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(p.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());r.push(this.parseAssignableListItem(s,o))}}return r}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let t=this.startNode(),{type:e,startLoc:s}=this.state;return e===21?this.parseBindingRestProperty(t):(e===138?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,s,!1,!1,!0,!1))}parseAssignableListItem(t,e){let s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s,t);let i=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),i}parseAssignableListItemTypes(t,e){return t}parseMaybeDefault(t,e){var s,i;if((s=t)!=null||(t=this.state.startLoc),e=(i=e)!=null?i:this.parseBindingAtom(),!this.eat(29))return e;let r=this.startNodeAt(t);return r.left=e,r.right=this.parseMaybeAssignAllowIn(),this.finishNode(r,"AssignmentPattern")}isValidLVal(t,e,s){return Gi({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},t)}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,{in:e,binding:s=64,checkClashes:i=!1,strictModeChanged:r=!1,hasParenthesizedAncestor:n=!1}){var o;let h=t.type;if(this.isObjectMethod(t))return;let l=this.isOptionalMemberExpression(t);if(l||h==="MemberExpression"){l&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(p.InvalidLhsOptionalChaining,t,{ancestor:e})),s!==64&&this.raise(p.InvalidPropertyBindingPattern,t);return}if(h==="Identifier"){this.checkIdentifier(t,s,r);let{name:y}=t;i&&(i.has(y)?this.raise(p.ParamDupe,t):i.add(y));return}let c=this.isValidLVal(h,!(n||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(c===!0)return;if(c===!1){let y=s===64?p.InvalidLhs:p.InvalidLhsBinding;this.raise(y,t,{ancestor:e});return}let[u,f]=Array.isArray(c)?c:[c,h==="ParenthesizedExpression"],d=h==="ArrayPattern"||h==="ObjectPattern"?{type:h}:e;for(let y of[].concat(t[u]))y&&this.checkLVal(y,{in:d,binding:s,checkClashes:i,strictModeChanged:r,hasParenthesizedAncestor:f})}checkIdentifier(t,e,s=!1){this.state.strict&&(s?ss(t.name,this.inModule):ts(t.name))&&(e===64?this.raise(p.StrictEvalArguments,t,{referenceName:t.name}):this.raise(p.StrictEvalArgumentsBinding,t,{bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(p.LetInLexicalBinding,t),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(p.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?p.RestTrailingComma:p.ElementAfterRest,this.state.startLoc),!0):!1}},Yi=(a,t)=>Object.hasOwnProperty.call(a,t)&&a[t];function Qi(a){if(a==null)throw new Error(`Unexpected ${a} value.`);return a}function Vt(a){if(!a)throw new Error("Assert fail")}var x=$`typescript`({AbstractMethodHasImplementation:({methodName:a})=>`Method '${a}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:a})=>`Property '${a}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:a})=>`'declare' is not allowed in ${a}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:a})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:a})=>`Duplicate modifier: '${a}'.`,EmptyHeritageClauseType:({token:a})=>`'${a}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:a})=>`'${a[0]}' modifier cannot be used with '${a[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:a})=>`Index signatures cannot have an accessibility modifier ('${a}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:a})=>`'${a}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:a})=>`'${a}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:a})=>`'${a}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:a})=>`'${a[0]}' modifier must precede '${a[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:a})=>`Private elements cannot have an accessibility modifier ('${a}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:a})=>`Single type parameter ${a} should have a trailing comma. Example usage: <${a},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",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:({type:a})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${a}.`});function Zi(a){switch(a){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}}function qt(a){return a==="private"||a==="public"||a==="protected"}function er(a){return a==="in"||a==="out"}var tr=a=>class extends a{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:x.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter})}getScopeHandler(){return ct}tsIsIdentifier(){return S(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,s){if(!S(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(e.indexOf(i)!==-1){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:i,errorTemplate:r=x.InvalidModifierOnTypeMember},n){let o=(l,c,u,f)=>{c===u&&n[f]&&this.raise(x.InvalidModifiersOrder,l,{orderedModifiers:[u,f]})},h=(l,c,u,f)=>{(n[u]&&c===f||n[f]&&c===u)&&this.raise(x.IncompatibleModifiers,l,{modifiers:[u,f]})};for(;;){let{startLoc:l}=this.state,c=this.tsParseModifier(e.concat(s??[]),i);if(!c)break;qt(c)?n.accessibility?this.raise(x.DuplicateAccessibilityModifier,l,{modifier:c}):(o(l,c,c,"override"),o(l,c,c,"static"),o(l,c,c,"readonly"),n.accessibility=c):er(c)?(n[c]&&this.raise(x.DuplicateModifier,l,{modifier:c}),n[c]=!0,o(l,c,"in","out")):(Object.hasOwnProperty.call(n,c)?this.raise(x.DuplicateModifier,l,{modifier:c}):(o(l,c,"static","readonly"),o(l,c,"static","override"),o(l,c,"override","readonly"),o(l,c,"abstract","override"),h(l,c,"declare","override"),h(l,c,"static","abstract")),n[c]=!0),s!=null&&s.includes(c)&&this.raise(r,l,{modifier:c})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){let i=[];for(;!this.tsIsListTerminator(e);)i.push(s());return i}tsParseDelimitedList(e,s,i){return Qi(this.tsParseDelimitedListWorker(e,s,!0,i))}tsParseDelimitedListWorker(e,s,i,r){let n=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let h=s();if(h==null)return;if(n.push(h),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;i&&this.expect(12);return}return r&&(r.value=o),n}tsParseBracketedList(e,s,i,r,n){r||(i?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,s,n);return i?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(x.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let s=this.parseIdentifier(e);for(;this.eat(16);){let i=this.startNodeAtNode(s);i.left=s,i.right=this.parseIdentifier(e),s=this.finishNode(i,"TSQualifiedName")}return s}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let i={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,i),s.params.length===0&&this.raise(x.EmptyTypeParameters,s),i.value!==-1&&this.addExtra(s,"trailingComma",i.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){let i=e===19,r="parameters",n="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[r]=this.tsParseBindingListForSignature(),i?s[n]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let s of e){let{type:i}=s;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(x.UnsupportedSignatureParameterKind,s,{type:i})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),S(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);let i=e;if(this.match(10)||this.match(47)){s&&this.raise(x.ReadonlyForMethodSignature,e);let r=i;r.kind&&this.match(47)&&this.raise(x.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon();let n="parameters",o="typeAnnotation";if(r.kind==="get")r[n].length>0&&(this.raise(p.BadGetterArity,this.state.curPosition()),this.isThisParam(r[n][0])&&this.raise(x.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(r.kind==="set"){if(r[n].length!==1)this.raise(p.BadSetterArity,this.state.curPosition());else{let h=r[n][0];this.isThisParam(h)&&this.raise(x.AccesorCannotDeclareThisParameter,this.state.curPosition()),h.type==="Identifier"&&h.optional&&this.raise(x.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),h.type==="RestElement"&&this.raise(x.SetAccesorCannotHaveRestParameter,this.state.curPosition())}r[o]&&this.raise(x.SetAccesorCannotHaveReturnType,r[o])}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}else{let r=i;s&&(r.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(i=>{let{type:r}=i;s&&r!=="TSRestType"&&r!=="TSOptionalType"&&!(r==="TSNamedTupleMember"&&i.optional)&&this.raise(x.OptionalTypeBeforeRequired,i),s||(s=r==="TSNamedTupleMember"&&i.optional||r==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,s=this.eat(21),i,r,n,o,l=M(this.state.type)?this.lookaheadCharCode():null;if(l===58)i=!0,n=!1,r=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(l===63){n=!0;let c=this.state.startLoc,u=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,r=this.createIdentifier(this.startNodeAt(c),u),this.expect(17),this.expect(14),o=this.tsParseType()):(i=!1,o=f,this.expect(17))}else o=this.tsParseType(),n=this.eat(17),i=this.eat(14);if(i){let c;r?(c=this.startNodeAtNode(r),c.optional=n,c.label=r,c.elementType=o,this.eat(17)&&(c.optional=!0,this.raise(x.TupleOptionalAfterType,this.state.lastTokStartLoc))):(c=this.startNodeAtNode(o),c.optional=n,this.raise(x.InvalidTupleMemberLabel,o),c.label=o,c.elementType=this.tsParseType()),o=this.finishNode(c,"TSNamedTupleMember")}else if(n){let c=this.startNodeAtNode(o);c.typeAnnotation=o,o=this.finishNode(c,"TSOptionalType")}if(s){let c=this.startNodeAt(e);c.typeAnnotation=o,o=this.finishNode(c,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){let i=this.startNode();return e==="TSConstructorType"&&(i.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),s=this.lookahead();return s.type!==134&&s.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(S(e)||e===88||e===84){let s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":Zi(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(x.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return gi(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,i){let r=this.startNode(),n=this.eat(i),o=[];do o.push(s());while(this.eat(i));return o.length===1&&!n?o[0]:(r.types=o,this.finishNode(r,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(S(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let s=this.startNode();this.expect(e);let i=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(78)){let h=this.tsParseThisTypeOrThisTypePredicate();return h.type==="TSThisType"?(i.parameterName=h,i.asserts=!0,i.typeAnnotation=null,h=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(h,i),h.asserts=!0),s.typeAnnotation=h,this.finishNode(s,"TSTypeAnnotation")}let n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return r?(i.parameterName=this.parseIdentifier(),i.asserts=r,i.typeAnnotation=null,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);let o=this.tsParseTypeAnnotation(!1);return i.parameterName=n,i.typeAnnotation=o,i.asserts=r,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!S(this.state.type)&&!this.match(78)?!1:(e&&this.raise(p.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){Vt(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let s=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let r=this.startNode();return r.expression=this.tsParseEntityName(),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSExpressionWithTypeArguments")});return i.length||this.raise(x.EmptyHeritageClauseType,s,{token:e}),i}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),S(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(x.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){let s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),e.body=i}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,i){e.isExport=i||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let r=this.tsParseModuleReference();return e.importKind==="type"&&r.type!=="TSExternalModuleReference"&&this.raise(x.ImportAliasHasImportType,r),e.moduleReference=r,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let s=this.state.clone(),i=e();return this.state=s,i}tsTryParseAndCatch(e){let s=this.tryParse(i=>e()||i());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){let s=this.state.clone(),i=e();if(i!==void 0&&i!==!1)return i;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,i;return this.isContextual(100)&&(s=74,i="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let r=this.tsParseInterfaceDeclaration(e,{declare:!0});if(r)return r}default:if(S(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,i){switch(s.name){case"declare":{let r=this.tsTryParseDeclare(e);return r&&(r.declare=!0),r}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let r=e;return r.global=!0,r.id=s,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,i)}}tsParseDeclaration(e,s,i,r){switch(s){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||S(this.state.type)))return this.tsParseAbstractDeclaration(e,r);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(S(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&S(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(i)&&S(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let r=this.startNodeAt(e);return r.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(r),r.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),r});if(this.state.maybeInArrowParameters=s,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(x.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===w.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Ti(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){let i=this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},r);let n=r.accessibility,o=r.override,h=r.readonly;!(e&4)&&(n||h||o)&&this.raise(x.UnexpectedParameterModifier,i);let l=this.parseMaybeDefault();this.parseAssignableListItemTypes(l,e);let c=this.parseMaybeDefault(l.loc.start,l);if(n||h||o){let u=this.startNodeAt(i);return s.length&&(u.decorators=s),n&&(u.accessibility=n),h&&(u.readonly=h),o&&(u.override=o),c.type!=="Identifier"&&c.type!=="AssignmentPattern"&&this.raise(x.UnsupportedParameterPropertyKind,u),u.parameter=c,this.finishNode(u,"TSParameterProperty")}return s.length&&(l.decorators=s),c}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(x.PatternIsOptional,s)}setArrowFunctionParameters(e,s,i){super.setArrowFunctionParameters(e,s,i),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,i=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let r=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,r):r==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(x.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,r,i):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,i))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(x.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,i,r){let n=super.parseArrayLike(e,s,i,r);return n.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(e,s,i,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let n=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return r.stop=!0,e;r.optionalChainMember=n=!0,this.next()}if(this.match(47)||this.match(51)){let o,h=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(s);if(f)return f}let l=this.tsParseTypeArgumentsInExpression();if(!l)return;if(n&&!this.match(10)){o=this.state.curPosition();return}if(De(this.state.type)){let f=super.parseTaggedTemplateExpression(e,s,r);return f.typeParameters=l,f}if(!i&&this.eat(10)){let f=this.startNodeAt(s);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=l,r.optionalChainMember&&(f.optional=n),this.finishCallExpression(f,r.optionalChainMember)}let c=this.state.type;if(c===48||c===52||c!==10&&Je(c)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(s);return u.expression=e,u.typeParameters=l,this.finishNode(u,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),h)return h.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(x.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),h}return super.parseSubscript(e,s,i,r)}parseNewCallee(e){var s;super.parseNewCallee(e);let{callee:i}=e;i.type==="TSInstantiationExpression"&&!((s=i.extra)!=null&&s.parenthesized)&&(e.typeParameters=i.typeParameters,e.callee=i.expression)}parseExprOp(e,s,i){let r;if(Ne(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){let n=this.startNodeAt(s);return n.expression=e,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(r&&this.raise(p.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(n,r?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(n,s,i)}return super.parseExprOp(e,s,i)}checkReservedWord(e,s,i,r){this.state.isAmbientContext||super.checkReservedWord(e,s,i,r)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(x.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,i,r){super.applyImportPhase(e,s,i,r),s?e.exportKind=i==="type"?"type":"value":e.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(S(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let i=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,i);s=super.parseImportSpecifiersAndAfter(e,i)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(x.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(e,s){if(this.match(83)){this.next();let i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,i,!0)}else if(this.eat(29)){let i=e;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=e;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,i=!1){let{isAmbientContext:r}=this.state,n=super.parseVarStatement(e,s,i||r);if(!r)return n;for(let{id:o,init:h}of n.declarations)h&&(s!=="const"||o.typeAnnotation?this.raise(x.InitializerNotAllowedInAmbientContext,h):ir(h,this.hasPlugin("estree"))||this.raise(x.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,h));return n}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(i=>qt(i)?e.accessibility===i:!!e[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,i){let r=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:r,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:x.InvalidModifierOnTypeParameterPositions},s);let n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,r)&&this.raise(x.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,i,!!s.static)};s.declare?this.tsInAmbientContext(n):n()}parseClassMemberWithIsStatic(e,s,i,r){let n=this.tsTryParseIndexSignature(s);if(n){e.body.push(n),s.abstract&&this.raise(x.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(x.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(x.IndexSignatureHasDeclare,s),s.override&&this.raise(x.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(x.NonAbstractClassHasAbstractMethod,s),s.override&&(i.hadSuperClass||this.raise(x.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(e,s,i,r)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(x.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(x.ClassMethodHasDeclare,e)}parseExpressionStatement(e,s,i){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,i):void 0)||super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,i);let r=this.tryParse(()=>super.parseConditional(e,s));return r.node?(r.error&&(this.state=r.failState),r.node):(r.error&&super.setOptionalParametersError(i,r.error),e)}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let s=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(x.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let n=S(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?((n.type==="TSInterfaceDeclaration"||n.type==="TSTypeAliasDeclaration"||i)&&(e.exportKind="type"),i&&(this.resetStartLocation(n,s),n.declare=!0),n):null}parseClassId(e,s,i,r){if((!s||i)&&this.isContextual(113))return;super.parseClassId(e,s,i,e.declare?1024:8331);let n=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(x.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:s}=e;this.raise(x.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(x.PrivateElementHasAbstract,e),e.accessibility&&this.raise(x.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(x.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,i,r,n,o){let h=this.tsTryParseTypeParameters(this.tsParseConstModifier);h&&n&&this.raise(x.ConstructorHasTypeParameters,h);let{declare:l=!1,kind:c}=s;l&&(c==="get"||c==="set")&&this.raise(x.DeclareAccessor,s,{kind:c}),h&&(s.typeParameters=h),super.pushClassMethod(e,s,i,r,n,o)}pushClassPrivateMethod(e,s,i,r){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(s.typeParameters=n),super.pushClassPrivateMethod(e,s,i,r)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,i,r,n,o,h){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);return l&&(e.typeParameters=l),super.parseObjPropValue(e,s,i,r,n,o,h)}parseFunctionParams(e,s){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(e.typeParameters=i),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(e.id.typeAnnotation=i,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var i,r,n,o,h;let l,c,u;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(l=this.state.clone(),c=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!c.error)return c.node;let{context:y}=this.state,I=y[y.length-1];(I===w.j_oTag||I===w.j_expr)&&y.pop()}if(!((i=c)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!l||l===this.state)&&(l=this.state.clone());let f,d=this.tryParse(y=>{var I,C;f=this.tsParseTypeParameters(this.tsParseConstModifier);let E=super.parseMaybeAssign(e,s);return(E.type!=="ArrowFunctionExpression"||(I=E.extra)!=null&&I.parenthesized)&&y(),((C=f)==null?void 0:C.params.length)!==0&&this.resetStartLocationFromNode(E,f),E.typeParameters=f,E},l);if(!d.error&&!d.aborted)return f&&this.reportReservedArrowTypeParam(f),d.node;if(!c&&(Vt(!this.hasPlugin("jsx")),u=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!u.error))return u.node;if((r=c)!=null&&r.node)return this.state=c.failState,c.node;if(d.node)return this.state=d.failState,f&&this.reportReservedArrowTypeParam(f),d.node;if((n=u)!=null&&n.node)return this.state=u.failState,u.node;throw((o=c)==null?void 0:o.error)||d.error||((h=u)==null?void 0:h.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedArrowTypeParam,e)}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(i=>{let r=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),r});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,s){if(!(s&2))return e;this.eat(17)&&(e.optional=!0);let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(x.UnexpectedTypeCastInParameter,e):this.raise(x.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,i){return Yi({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(i!==64||!s)&&["expression",!0],TSSatisfiesExpression:(i!==64||!s)&&["expression",!0],TSTypeAssertion:(i!==64||!s)&&["expression",!0]},e)||super.isValidLVal(e,s,i)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(e);return i.typeParameters=s,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startthis.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let s=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?s+1:s}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){let s=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=s}}parseClass(e,s,i){let r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,i)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(x.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,i,r,n,o,h){let l=super.parseMethod(e,s,i,r,n,o,h);if(l.abstract&&(this.hasPlugin("estree")?!!l.value.body:!!l.body)){let{key:u}=l;this.raise(x.AbstractMethodHasImplementation,l,{methodName:u.type==="Identifier"&&!l.computed?u.name:`[${this.input.slice(u.start,u.end)}]`})}return l}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,i,r){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!1,i),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,i,r))}parseImportSpecifier(e,s,i,r,n){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!0,i),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,i,r,i?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,i){let r=s?"imported":"local",n=s?"local":"exported",o=e[r],h,l=!1,c=!0,u=o.loc.start;if(this.isContextual(93)){let d=this.parseIdentifier();if(this.isContextual(93)){let y=this.parseIdentifier();M(this.state.type)?(l=!0,o=d,h=s?this.parseIdentifier():this.parseModuleExportName(),c=!1):(h=y,c=!1)}else M(this.state.type)?(c=!1,h=s?this.parseIdentifier():this.parseModuleExportName()):(l=!0,o=d)}else M(this.state.type)&&(l=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());l&&i&&this.raise(s?x.TypeModifierIsUsedInTypeImports:x.TypeModifierIsUsedInTypeExports,u),e[r]=o,e[n]=h;let f=s?"importKind":"exportKind";e[f]=l?"type":"value",c&&this.eatContextual(93)&&(e[n]=s?this.parseIdentifier():this.parseModuleExportName()),e[n]||(e[n]=V(e[r])),s&&this.checkIdentifier(e[n],l?4098:4096)}};function sr(a){if(a.type!=="MemberExpression")return!1;let{computed:t,property:e}=a;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:cs(a.object)}function ir(a,t){var e;let{type:s}=a;if((e=a.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){let{value:i}=a;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(ls(a,t)||rr(a,t)||s==="TemplateLiteral"&&a.expressions.length===0||sr(a))}function ls(a,t){return t?a.type==="Literal"&&(typeof a.value=="number"||"bigint"in a):a.type==="NumericLiteral"||a.type==="BigIntLiteral"}function rr(a,t){if(a.type==="UnaryExpression"){let{operator:e,argument:s}=a;if(e==="-"&&ls(s,t))return!0}return!1}function cs(a){return a.type==="Identifier"?!0:a.type!=="MemberExpression"||a.computed?!1:cs(a.object)}var zt=$`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),ar=a=>class extends a{parsePlaceholder(e){if(this.match(144)){let s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let i=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=s,i?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,i,r){e!==void 0&&super.checkReservedWord(e,s,i,r)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,i){return e==="Placeholder"||super.isValidLVal(e,s,i)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var i;if(s.type!=="Placeholder"||(i=s.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){let r=e;return r.label=this.finishPlaceholder(s,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}return this.semicolon(),e.name=s.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,s,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,i)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,i){let r=s?"ClassDeclaration":"ClassExpression";this.next();let n=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(i||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,r);throw this.raise(zt.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,s,i);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,n),this.finishNode(e,r)}parseExport(e,s){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(e,s);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let r=this.startNode();return r.exported=i,e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],super.parseExport(e,s)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(H(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var i;return(i=e.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){let{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(i=>i.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let i=this.startNodeAtNode(s);return i.local=s,e.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(zt.UnexpectedSpace,this.state.lastTokEndLoc)}},nr=a=>class extends a{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,s=this.startNode();if(this.next(),S(this.state.type)){let i=this.parseIdentifierName(),r=this.createIdentifier(s,i);if(r.type="V8IntrinsicIdentifier",this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function N(a,t){let[e,s]=typeof t=="string"?[t,{}]:t,i=Object.keys(s),r=i.length===0;return a.some(n=>{if(typeof n=="string")return r&&n===e;{let[o,h]=n;if(o!==e)return!1;for(let l of i)if(h[l]!==s[l])return!1;return!0}})}function K(a,t,e){let s=a.find(i=>Array.isArray(i)?i[0]===t:i===t);return s&&Array.isArray(s)&&s.length>1?s[1][e]:null}var Kt=["minimal","fsharp","hack","smart"],Ht=["^^","@@","^","%","#"],Wt=["hash","bar"];function or(a){if(N(a,"decorators")){if(N(a,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=K(a,"decorators","decoratorsBeforeExport");if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let e=K(a,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(N(a,"flow")&&N(a,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(N(a,"placeholders")&&N(a,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(N(a,"pipelineOperator")){let t=K(a,"pipelineOperator","proposal");if(!Kt.includes(t)){let s=Kt.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}let e=N(a,["recordAndTuple",{syntaxType:"hash"}]);if(t==="hack"){if(N(a,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(N(a,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=K(a,"pipelineOperator","topicToken");if(!Ht.includes(s)){let i=Ht.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(s==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(t==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(N(a,"moduleAttributes")){if(N(a,"importAssertions")||N(a,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(K(a,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(N(a,"importAssertions")&&N(a,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(N(a,"recordAndTuple")&&K(a,"recordAndTuple","syntaxType")!=null&&!Wt.includes(K(a,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Wt.map(t=>`'${t}'`).join(", "));if(N(a,"asyncDoExpressions")&&!N(a,"doExpressions")){let t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(N(a,"optionalChainingAssign")&&K(a,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var ps={estree:li,jsx:Xi,flow:Ji,typescript:tr,v8intrinsic:nr,placeholders:ar},hr=Object.keys(ps),Ke={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function lr(a){if(a==null)return Object.assign({},Ke);if(a.annexB!=null&&a.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let s of Object.keys(Ke)){var e;t[s]=(e=a[s])!=null?e:Ke[s]}return t}var ut=class extends pt{checkProto(t,e,s,i){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let r=t.key;if((r.type==="Identifier"?r.name:r.value)==="__proto__"){if(e){this.raise(p.RecordNoProto,r);return}s.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=r.loc.start):this.raise(p.DuplicateProto,r)),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){let e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){let i=this.startNodeAt(e);for(i.expressions=[s];this.eat(12);)i.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){let s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let i;t?i=!1:(t=new ee,i=!0);let{type:r}=this.state;(r===10||S(r))&&(this.state.potentialArrowAt=this.state.start);let n=this.parseMaybeConditional(t);if(e&&(n=e.call(this,n,s)),di(this.state.type)){let o=this.startNodeAt(s),h=this.state.value;if(o.operator=h,this.match(29)){this.toAssignable(n,!0),o.left=n;let l=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=l&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=l&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=l&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=n;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(n,{in:this.finishNode(o,"AssignmentExpression")}),o}else i&&this.checkExpressionErrors(t,!0);return n}parseMaybeConditional(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprOps(t);return this.shouldExitDescending(i,s)?i:this.parseConditional(i,e,t)}parseConditional(t,e,s){if(this.eat(17)){let i=this.startNodeAt(e);return i.test=t,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){let r=this.getPrivateNameSV(t);(s>=Ne(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(p.PrivateInExpectedIn,t,{identifierName:r}),this.classScope.usePrivateName(r,t.loc.start)}let i=this.state.type;if(yi(i)&&(this.prodParam.hasIn||!this.match(58))){let r=Ne(i);if(r>s){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}let n=this.startNodeAt(e);n.left=t,n.operator=this.state.value;let o=i===41||i===42,h=i===40;if(h&&(r=Ne(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(p.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);n.right=this.parseExprOpRightExpr(i,r);let l=this.finishNode(n,o||h?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(h&&(c===41||c===42)||o&&c===40)throw this.raise(p.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(l,e,s)}}return t}parseExprOpRightExpr(t,e){let s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(p.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){let s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,bi(t)?e-1:e)}parseHackPipeBody(){var t;let{startLoc:e}=this.state,s=this.parseMaybeAssign();return ii.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(p.PipeUnparenthesizedBody,e,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipeTopicUnused,e),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(p.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){let s=this.state.startLoc,i=this.isContextual(96);if(i&&this.isAwaitAllowed()){this.next();let h=this.parseAwait(s);return e||this.checkExponentialAfterUnary(h),h}let r=this.match(34),n=this.startNode();if(Pi(this.state.type)){n.operator=this.state.value,n.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let h=this.match(89);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&h){let l=n.argument;l.type==="Identifier"?this.raise(p.StrictDelete,n):this.hasPropertyAsPrivateName(l)&&this.raise(p.DeletePrivateField,n)}if(!r)return e||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}let o=this.parseUpdate(n,r,t);if(i){let{type:h}=this.state;if((this.hasPlugin("v8intrinsic")?Je(h):Je(h)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(p.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){let n=t;return this.checkLVal(n.argument,{in:this.finishNode(n,"UpdateExpression")}),t}let i=this.state.startLoc,r=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return r;for(;xi(this.state.type)&&!this.canInsertSemicolon();){let n=this.startNodeAt(i);n.operator=this.state.value,n.prefix=!1,n.argument=r,this.next(),this.checkLVal(r,{in:r=this.finishNode(n,"UpdateExpression")})}return r}parseExprSubscripts(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(t);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,e)}parseSubscripts(t,e,s){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,i),i.maybeAsyncArrow=!1;while(!i.stop);return t}parseSubscript(t,e,s,i){let{type:r}=this.state;if(!s&&r===15)return this.parseBind(t,e,s,i);if(De(r))return this.parseTaggedTemplateExpression(t,e,i);let n=!1;if(r===18){if(s&&(this.raise(p.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return i.stop=!0,t;i.optionalChainMember=n=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,i,n);{let o=this.eat(0);return o||n||this.eat(16)?this.parseMember(t,e,i,o,n):(i.stop=!0,t)}}parseMember(t,e,s,i,r){let n=this.startNodeAt(e);return n.object=t,n.computed=i,i?(n.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(p.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),s.optionalChainMember?(n.optional=r,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(t,e,s,i){let r=this.startNodeAt(e);return r.object=t,this.next(),r.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,i){let r=this.state.maybeInArrowParameters,n=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=t;let{maybeAsyncArrow:h,optionalChainMember:l}=s;h&&(this.expressionScope.enter(ji()),n=new ee),l&&(o.optional=i),i?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,n);let c=this.finishCallExpression(o,l);return h&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),c)):(h&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(c)),this.state.maybeInArrowParameters=r,c}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){let i=this.startNodeAt(e);return i.tag=t,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(p.OptionalChainingNoTemplate,e),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),t.arguments.length===0||t.arguments.length>2)this.raise(p.ImportCallArity,t,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let s of t.arguments)s.type==="SpreadElement"&&this.raise(p.ImportCallSpreadArgument,s);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,i,r){let n=[],o=!0,h=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(p.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),i&&this.addTrailingCommaExtraToNode(i),this.next();break}n.push(this.parseExprListItem(!1,r,s))}return this.state.inFSharpPipelineDirectBody=h,n}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&xe(t,e.innerComments),e.callee.trailingComments&&xe(t,e.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(p.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let r=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(r)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let r=e.callee=this.parseNoCallExpr();if(r.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(p.UnsupportedBind,r)}case 138:return this.raise(p.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.parseTopicReference(r);this.unexpected();break}case 47:{let r=this.input.codePointAt(this.nextTokenStart());j(r)||r===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(S(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let r=this.state.potentialArrowAt===this.state.start,n=this.state.containsEsc,o=this.parseIdentifier();if(!n&&o.name==="async"&&!this.canInsertSemicolon()){let{type:h}=this.state;if(h===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(S(h))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(h===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return r&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=L(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){let e=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(e,s,t,i)}finishTopicReference(t,e,s,i){if(this.testTopicReferenceConfiguration(s,e,i)){let r=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?p.PrimaryTopicNotAllowed:p.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,r)}else throw this.raise(p.PipeTopicUnconfiguredToken,e,{token:H(i)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:H(s)}]);case"smart":return s===27;default:throw this.raise(p.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(ve(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(p.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();let s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(p.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(p.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(p.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),e=this.startNodeAt(L(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;let i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(p.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(p.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(p.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){let s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let e=this.parseLiteral(t.value,"RegExpLiteral");return e.pattern=t.pattern,e.flags=t.flags,e}parseBooleanLiteral(t){let e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let e=this.state.startLoc,s;this.next(),this.expressionScope.enter(Ui());let i=this.state.maybeInArrowParameters,r=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let n=this.state.startLoc,o=[],h=new ee,l=!0,c,u;for(;!this.match(11);){if(l)l=!1;else if(this.expect(12,h.optionalParametersLoc===null?null:h.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let y=this.state.startLoc;if(c=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),y)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(h,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=r;let d=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(h),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,o,!1),d):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),c&&this.unexpected(c),this.checkExpressionErrors(h,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(n),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,f)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;let s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(p.UnexpectedNewTarget,s),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(p.ImportCallNotNewExpression,s)}parseTemplateElement(t){let{start:e,startLoc:s,end:i,value:r}=this.state,n=e+1,o=this.startNodeAt(L(s,1));r===null&&(t||this.raise(p.InvalidEscapeSequenceTemplate,L(this.state.firstInvalidTemplateEscapePos,1)));let h=this.match(24),l=h?-1:-2,c=i+l;o.value={raw:this.input.slice(n,c).replace(/\r\n?/g,` +`),cooked:r===null?null:r.slice(1,l)},o.tail=h,this.next();let u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,L(this.state.lastTokEndLoc,l)),u}parseTemplate(t){let e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=Object.create(null),o=!0,h=this.startNode();for(h.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(h);break}let c;e?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),this.checkProto(c,s,n,i)),s&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,c),c.shorthand&&this.addExtra(c,"shorthand",!0),h.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=r;let l="ObjectExpression";return e?l="ObjectPattern":s&&(l="RecordExpression"),this.finishNode(h,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(p.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc,l=this.parsePropertyName(s,t);if(!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let c=l.name;c==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(55),this.parsePropertyName(s)),(c==="get"||c==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(l),s.kind=c,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,this.state.curPosition(),{kind:c}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t);i.length!==s&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,t),t.kind==="set"&&((e=i[i.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(p.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,i,r){if(r){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,V(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(p.InvalidCoverInitializedName,r),t.value=this.parseMaybeDefault(e,V(t.key))}else t.value=V(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,i,r,n,o){let h=this.parseObjectMethod(t,s,i,r,n)||this.parseObjectProperty(t,e,r,o);return h||this.unexpected(),h}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,r;if(M(s))r=this.parseIdentifier(!0);else switch(s){case 134:r=this.parseNumericLiteral(i);break;case 133:r=this.parseStringLiteral(i);break;case 135:r=this.parseBigIntLiteral(i);break;case 136:r=this.parseDecimalLiteral(i);break;case 138:{let n=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=n):this.raise(p.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:this.unexpected()}t.key=r,s!==138&&(t.computed=!1)}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,r,n,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(r?32:0)),this.prodParam.enter(ve(s,t.generator)),this.parseFunctionParams(t,i);let h=this.parseFunctionBodyAndFinish(t,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=this.startNode();return this.next(),n.elements=this.parseExprList(t,!s,i,n),this.state.inFSharpPipelineDirectBody=r,this.finishNode(n,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,i){this.scope.enter(6);let r=ve(s,!1);!this.match(5)&&this.prodParam.hasIn&&(r|=8),this.prodParam.enter(r),this.initFunction(t,s);let n=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=n,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){let i=e&&!this.match(5);if(this.expressionScope.enter(os()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{let r=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{let h=!this.isSimpleParamList(t.params);o&&h&&this.raise(p.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let l=!r&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!h,e,l),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,l)}),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e10||!Li(t))return;if(s&&Ni(t)){this.raise(p.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?i?ss:es:Zt)(t,this.inModule)){this.raise(p.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(p.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(p.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(p.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(p.ArgumentsInClass,e);return}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(t){let e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(p.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(p.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||De(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(p.YieldInParameter,t),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(p.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){let s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{let s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(p.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipelineTopicUnused,t)}withTopicBindingContext(t){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}},He={kind:1},cr={kind:2},pr=/[\uD800-\uDFFF]/u,We=/in(?:stanceof)?/y;function ur(a,t){for(let e=0;e0)for(let[r,n]of Array.from(this.scope.undefinedExports))this.raise(p.ModuleExportUndefined,n,{localName:r});let i;return e===139?i=this.finishNode(t,"Program"):i=this.finishNodeAt(t,"Program",L(this.state.startLoc,-1)),i}stmtToDirective(t){let e=t;e.type="Directive",e.value=e.expression,delete e.expression;let s=e.value,i=s.value,r=this.input.slice(s.start,s.end),n=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",n),this.addExtra(s,"expressionValue",i),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(j(t)){if(We.lastIndex=e,We.test(this.input)){let s=this.codePointAtPos(We.lastIndex);if(!Z(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifier(){let t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){let{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(S(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type,i=this.startNode(),r=!!(t&2),n=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return n||this.raise(this.state.strict?p.StrictFunction:this.options.annexB?p.SloppyFunctionAnnexB:p.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!r&&n);case 80:return r||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?r||this.raise(p.UnexpectedLexicalDeclaration,i):this.raise(p.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(p.UnexpectedUsingDeclaration,this.state.startLoc):r||this.raise(p.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let c=this.nextTokenStart(),u=this.codePointAtPos(c);if(u!==91&&(!r&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(u,c)&&u!==123))break}case 75:r||this.raise(p.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let c=this.state.value;return this.parseVarStatement(i,c)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let c=this.lookaheadCharCode();if(c===40||c===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(p.UnexpectedImportExport,this.state.startLoc),this.next();let c;return s===83?(c=this.parseImport(i),c.type==="ImportDeclaration"&&(!c.importKind||c.importKind==="value")&&(this.sawUnambiguousESM=!0)):(c=this.parseExport(i,e),(c.type==="ExportNamedDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportAllDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(c),c}default:if(this.isAsyncFunction())return r||this.raise(p.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!r&&n)}let h=this.state.value,l=this.parseExpression();return S(s)&&l.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,h,l,t):this.parseExpressionStatement(i,l,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(p.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(p.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(p.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(p.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,s;if(this.match(10)){let i=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(i,s);let r=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(p.DecoratorArgumentsOutsideParentheses,r)}else{for(s=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(e);i.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,s=this.finishNode(i,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){let e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;sthis.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(He);let e=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(e=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);let s=this.isContextual(100);{let h=this.isContextual(96)&&this.startsAwaitUsing(),l=h||this.isContextual(107)&&this.startsUsingForOf(),c=s&&this.hasFollowingBindingAtom()||l;if(this.match(74)||this.match(75)||c){let u=this.startNode(),f;h?(f="await using",this.isAwaitAllowed()||this.raise(p.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):f=this.state.value,this.next(),this.parseVar(u,!0,f);let d=this.finishNode(u,"VariableDeclaration"),y=this.match(58);return y&&l&&this.raise(p.ForInUsing,d),(y||this.isContextual(102))&&d.declarations.length===1?this.parseForIn(t,d,e):(e!==null&&this.unexpected(e),this.parseFor(t,d))}}let i=this.isContextual(95),r=new ee,n=this.parseExpression(!0,r),o=this.isContextual(102);if(o&&(s&&this.raise(p.ForOfLet,n),e===null&&i&&n.type==="Identifier"&&this.raise(p.ForOfAsync,n)),o||this.match(58)){this.checkDestructuringPrivate(r),this.toAssignable(n,!0);let h=o?"ForOfStatement":"ForInStatement";return this.checkLVal(n,{in:{type:h}}),this.parseForIn(t,n,e)}else this.checkExpressionErrors(r,!0);return e!==null&&this.unexpected(e),this.parseFor(t,n)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(p.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let e=t.cases=[];this.expect(5),this.state.labels.push(cr),this.scope.enter(0);let s;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let r=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),r?s.test=this.parseExpression():(i&&this.raise(p.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(p.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{in:{type:"CatchClause"},binding:9}),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(p.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(He),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(p.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,i){for(let n of this.state.labels)n.name===e&&this.raise(p.LabelRedeclaration,s,{labelName:e});let r=mi(this.state.type)?1:this.match(71)?2:null;for(let n=this.state.labels.length-1;n>=0;n--){let o=this.state.labels[n];if(o.statementStart===t.start)o.statementStart=this.state.start,o.kind=r;else break}return this.state.labels.push({name:e,kind:r,statementStart:this.state.start}),t.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){let i=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(i,t,!1,8,s),e&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,i,r){let n=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(n,e?o:void 0,s,i,r)}parseBlockOrModuleBlockBody(t,e,s,i,r){let n=this.state.strict,o=!1,h=!1;for(;!this.match(i);){let l=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!h){if(this.isValidDirective(l)){let c=this.stmtToDirective(l);e.push(c),!o&&c.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}h=!0,this.state.strictErrors.clear()}t.push(l)}r==null||r.call(this,o),n||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){let i=this.match(58);return this.next(),i?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(p.ForInOfLoopInitializer,e,{type:i?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(p.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,i=!1){let r=t.declarations=[];for(t.kind=s;;){let n=this.startNode();if(this.parseVarId(n,s),n.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,n.init===null&&!i&&(n.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(p.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):s==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(p.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"const"})),r.push(this.finishNode(n,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){let s=this.parseBindingAtom();this.checkLVal(s,{in:{type:"VariableDeclarator"},binding:e==="var"?5:8201}),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){let s=e&2,i=!!(e&1),r=i&&!(e&4),n=!!(e&8);this.initFunction(t,n),this.match(55)&&(s&&this.raise(p.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),i&&(t.id=this.parseFunctionId(r));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ve(n,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||S(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(_i()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(t){return!t.computed&&!t.static&&(t.key.name==="constructor"||t.key.value==="constructor")}parseClassBody(t,e){this.classScope.enter();let s={hadConstructor:!1,hadSuperClass:t},i=[],r=this.startNode();if(r.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(p.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let n=this.startNode();i.length&&(n.decorators=i,this.resetStartLocationFromNode(n,i[0]),i=[]),this.parseClassMember(r,n,s),n.kind==="constructor"&&n.decorators&&n.decorators.length>0&&this.raise(p.DecoratorConstructor,n)}}),this.state.strict=e,this.next(),i.length)throw this.raise(p.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(r,"ClassBody")}parseClassMemberFromModifier(t,e){let s=this.parseIdentifier(!0);if(this.isClassMethod()){let i=e;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=e;return i.computed=!1,i.key=s,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,i)}parseClassMemberWithIsStatic(t,e,s,i){let r=e,n=e,o=e,h=e,l=e,c=r,u=r;if(e.static=i,this.parsePropertyNamePrefixOperator(e),this.eat(55)){c.kind="method";let C=this.match(138);if(this.parseClassElementName(c),C){this.pushClassPrivateMethod(t,n,!0,!1);return}this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsGenerator,r.key),this.pushClassMethod(t,r,!0,!1,!1,!1);return}let f=S(this.state.type)&&!this.state.containsEsc,d=this.match(138),y=this.parseClassElementName(e),I=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(c.kind="method",d){this.pushClassPrivateMethod(t,n,!1,!1);return}let C=this.isNonstaticConstructor(r),E=!1;C&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(p.DuplicateConstructor,y),C&&this.hasPlugin("typescript")&&e.override&&this.raise(p.OverrideOnConstructor,y),s.hadConstructor=!0,E=s.hadSuperClass),this.pushClassMethod(t,r,!1,!1,C,E)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(t,h):this.pushClassProperty(t,o);else if(f&&y.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(y);let C=this.eat(55);u.optional&&this.unexpected(I),c.kind="method";let E=this.match(138);this.parseClassElementName(c),this.parsePostMemberNameModifiers(u),E?this.pushClassPrivateMethod(t,n,C,!0):(this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsAsync,r.key),this.pushClassMethod(t,r,C,!0,!1,!1))}else if(f&&(y.name==="get"||y.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(y),c.kind=y.name;let C=this.match(138);this.parseClassElementName(r),C?this.pushClassPrivateMethod(t,n,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsAccessor,r.key),this.pushClassMethod(t,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r)}else if(f&&y.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(y);let C=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,l,C)}else this.isLineTerminator()?d?this.pushClassPrivateProperty(t,h):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){let{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(p.StaticPrototype,this.state.startLoc),e===138){s==="constructor"&&this.raise(p.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return t.key=i,i}return this.parsePropertyName(t)}parseClassStaticBlock(t,e){var s;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let r=e.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(p.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&(e.key.name==="constructor"||e.key.value==="constructor")&&this.raise(p.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){let s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){if(!s&&!e.computed){let r=e.key;(r.name==="constructor"||r.value==="constructor")&&this.raise(p.ConstructorClassField,r)}let i=this.parseClassAccessorProperty(e);t.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(t,e,s,i,r,n){t.body.push(this.parseMethod(e,s,i,r,n,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,i){let r=this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(r);let n=r.kind==="get"?r.static?6:2:r.kind==="set"?r.static?5:1:0;this.declareClassPrivateMethodInScope(r,n)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(os()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,i=8331){if(S(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,i);else if(s||!e)t.id=null;else throw this.raise(p.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){let s=this.parseMaybeImportPhase(t,!0),i=this.maybeParseExportDefaultSpecifier(t,s),r=!i||this.eat(12),n=r&&this.eatExportStar(t),o=n&&this.maybeParseExportNamespaceSpecifier(t),h=r&&(!o||this.eat(12)),l=i||n;if(n&&!o){if(i&&this.unexpected(),e)throw this.raise(p.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let c=this.maybeParseExportNamedSpecifiers(t);i&&r&&!n&&!c&&this.unexpected(null,5),o&&h&&this.unexpected(null,98);let u;if(l||c){if(u=!1,e)throw this.raise(p.UnsupportedDecoratorExport,t);this.parseExportFrom(t,l)}else u=this.maybeParseExportDeclaration(t);if(l||c||u){var f;let d=t;if(this.checkExport(d,!0,!1,!!d.source),((f=d.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(e,d.declaration,d);else if(e)throw this.raise(p.UnsupportedDecoratorExport,t);return this.finishNode(d,"ExportNamedDeclaration")}if(this.eat(65)){let d=t,y=this.parseExportDefaultExpression();if(d.declaration=y,y.type==="ClassDeclaration")this.maybeTakeDecorators(e,y,d);else if(e)throw this.raise(p.UnsupportedDecoratorExport,t);return this.checkExport(d,!0,!0),this.finishNode(d,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0:e.loc.start);let s=e||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,t.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){t.specifiers||(t.specifiers=[]);let e=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){t.specifiers||(t.specifiers=[]);let e=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(e)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(p.UnsupportedDefaultExport,this.state.startLoc);let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(S(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(S(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||S(this.state.type)&&s)return!0;if(this.match(65)&&s){let i=this.input.charCodeAt(this.nextTokenStartSince(e+4));return i===34||i===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,i){if(e){var r;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var n;let o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((n=o.extra)!=null&&n.parenthesized)&&this.raise(p.ExportDefaultFromAsIdentifier,o)}}else if((r=t.specifiers)!=null&&r.length)for(let o of t.specifiers){let{exported:h}=o,l=h.type==="Identifier"?h.name:h.value;if(this.checkDuplicateExports(o,l),!i&&o.local){let{local:c}=o;c.type!=="Identifier"?this.raise(p.ExportBindingIsString,o,{localName:c.value,exportName:l}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(t.declaration){if(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"){let o=t.declaration.id;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(t,o.name)}else if(t.declaration.type==="VariableDeclaration")for(let o of t.declaration.declarations)this.checkDeclaration(o.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(let e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(p.DuplicateDefaultExport,t):this.raise(p.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){let e=[],s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),r=this.match(133),n=this.startNode();n.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(n,r,t,i))}return e}parseExportSpecifier(t,e,s,i){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=Vi(t.local):t.exported||(t.exported=V(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let t=this.parseStringLiteral(this.state.value),e=t.value.match(pr);return e&&this.raise(p.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){let{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(p.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(p.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var i;s!=="ImportDefaultSpecifier"&&this.raise(p.ImportReflectionNotBinding,e[0].loc.start),((i=t.assertions)==null?void 0:i.length)>0&&this.raise(p.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:e}=t;if(e!=null){let s=e.find(i=>{let r;if(i.type==="ExportSpecifier"?r=i.local:i.type==="ImportSpecifier"&&(r=i.imported),r!==void 0)return r.type==="Identifier"?r.name!=="default":r.value!=="default"});s!==void 0&&this.raise(p.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,i){e||(s==="module"?(this.expectPlugin("importReflection",i),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",i),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",i),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;let s=this.parseIdentifier(!0),{type:i}=this.state;return(M(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){let{type:e}=this.state;return S(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),r=i&&this.maybeParseStarImportSpecifier(t);return i&&!r&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{in:{type:e},binding:s}),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);let t=[],e=new Set;do{if(this.match(8))break;let s=this.startNode(),i=this.state.value;if(e.has(i)&&this.raise(p.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),e.add(i),this.match(133)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(p.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],e=new Set;do{let s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(p.ModuleAttributeDifferentFromType,s.key),e.has(s.key.name)&&this.raise(p.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(p.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e,s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(p.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){let s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(M(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(p.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let s=this.startNode(),i=this.match(133),r=this.isContextual(130);s.imported=this.parseModuleExportName();let n=this.parseImportSpecifier(s,i,t.importKind==="type"||t.importKind==="typeof",r,void 0);t.specifiers.push(n)}}parseImportSpecifier(t,e,s,i,r){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:n}=t;if(e)throw this.raise(p.ImportBindingIsString,t,{importName:n.value});this.checkReservedWord(n.name,t.loc.start,!0,!0),t.local||(t.local=V(n))}return this.finishImportSpecifier(t,"ImportSpecifier",r)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},Oe=class extends ft{constructor(t,e){t=lr(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=fr(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return ye}parse(){this.enterInitialScopes();let t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}};function fr(a){let t=new Map;for(let e of a){let[s,i]=Array.isArray(e)?e:[e,{}];t.has(s)||t.set(s,i||{})}return t}function dr(a,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let s=ue(t,a),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",ue(t,a).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return t.sourceType="script",ue(t,a).parse()}catch{}throw s}}else return ue(t,a).parse()}function mr(a,t){let e=ue(t,a);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function yr(a){let t={};for(let e of Object.keys(a))t[e]=_(a[e]);return t}var xr=yr(pi);function ue(a,t){let e=Oe;return a!=null&&a.plugins&&(or(a.plugins),e=Pr(a.plugins)),new e(a,t)}var Jt={};function Pr(a){let t=hr.filter(i=>N(a,i)),e=t.join("/"),s=Jt[e];if(!s){s=Oe;for(let i of t)s=ps[i](s);Jt[e]=s}return s}Pe.parse=dr;Pe.parseExpression=mr;Pe.tokTypes=xr});var Ds=Lt(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.extract=Vr;G.parse=zr;G.parseWithComments=Ls;G.print=Kr;G.strip=qr;var Rr=/\*\/$/,_r=/^\/\*\*?/,ks=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Ur=/(^|\s+)\/\/([^\r\n]*)/g,Es=/^(\r?\n)+/,jr=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Is=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,$r=/(\r?\n|^) *\* ?/g,vs=[];function Vr(a){let t=a.match(ks);return t?t[0].trimLeft():""}function qr(a){let t=a.match(ks);return t&&t[0]?a.substring(t[0].length):a}function zr(a){return Ls(a).pragmas}function Ls(a){let t=` +`;a=a.replace(_r,"").replace(Rr,"").replace($r,"$1");let e="";for(;e!==a;)e=a,a=a.replace(jr,`${t}$1 $2${t}`);a=a.replace(Es,"").trimRight();let s=Object.create(null),i=a.replace(Is,"").replace(Es,"").trimRight(),r;for(;r=Is.exec(a);){let n=r[2].replace(Ur,"");typeof s[r[1]]=="string"||Array.isArray(s[r[1]])?s[r[1]]=vs.concat(s[r[1]],n):s[r[1]]=n}return{comments:i,pragmas:s}}function Kr({comments:a="",pragmas:t={}}){let e=` +`,s="/**",i=" *",r=" */",n=Object.keys(t),o=n.flatMap(l=>Ns(l,t[l])).map(l=>`${i} ${l}${e}`).join("");if(!a){if(n.length===0)return"";if(n.length===1&&!Array.isArray(t[n[0]])){let l=t[n[0]];return`${s} ${Ns(n[0],l)[0]}${r}`}}let h=a.split(e).map(l=>`${i} ${l}`).join(e)+e;return s+e+(a?h:"")+(a&&n.length?i+e:"")+o+r}function Ns(a,t){return vs.concat(t).map(e=>`@${a} ${e}`.trim())}});var na={};Qs(na,{parsers:()=>aa});var $e=Ve(wt(),1);function Fe(a){return(t,e,s)=>{let i=!!(s!=null&&s.backwards);if(e===!1)return!1;let{length:r}=t,n=e;for(;n>=0&&n{let i=!!(s!=null&&s.backwards);if(e===!1)return!1;let{length:r}=t,n=e;for(;n>=0&&n0}var Y=Rr;function D(a){var s;let t=a.range?a.range[0]:a.start,e=((s=a.declaration)==null?void 0:s.decorators)??a.decorators;return Y(e)?Math.min(D(e[0]),t):t}function B(a){return a.range?a.range[1]:a.end}function _r(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Cs,locStart:D,locEnd:B,...a}}var ae=_r;function Ur(a,t){let e=new SyntaxError(a+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(e,t)}var Ue=Ur;function jr(a){let{message:t,loc:{line:e,column:s}}=a,i=` (${e}:${s})`;return t.endsWith(i)&&(t=t.slice(0,-i.length)),Ue(t,{loc:{start:{line:e,column:s+1}},cause:a})}var Te=jr;var $r=(a,t,e)=>{if(!(a&&t==null))return Array.isArray(t)||typeof t=="string"?t[e<0?t.length+e:e]:t.at(e)},Et=$r;function Vr(a){return a=new Set(a),t=>a.has(t==null?void 0:t.type)}var Es=Vr;var qr=Es(["Block","CommentBlock","MultiLine"]),be=qr;function zr(a){return be(a)&&a.value[0]==="*"&&/@(?:type|satisfies)\b/.test(a.value)}var Is=zr;function Kr(a){let t=`*${a.value}*`.split(` -`);return t.length>1&&t.every(e=>e.trimStart()[0]==="*")}var It=Kr;var Ae=null;function Se(a){if(Ae!==null&&typeof Ae.property){let t=Ae;return Ae=Se.prototype=null,t}return Ae=Se.prototype=a??Object.create(null),new Se}var Hr=10;for(let a=0;a<=Hr;a++)Se();function Nt(a){return Se(a)}function Wr(a,t="type"){Nt(a);function e(s){let i=s[t],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return e}var Ns=Wr;var ks={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Jr=Ns(ks),vs=Jr;function kt(a,t){if(!(a!==null&&typeof a=="object"))return a;if(Array.isArray(a)){for(let s=0;s{var o;(o=n.leadingComments)!=null&&o.some(Is)&&r.add(D(n))}),a=je(a,n=>{if(n.type==="ParenthesizedExpression"){let{expression:o}=n;if(o.type==="TypeCastExpression")return o.range=n.range,o;let h=D(n);if(!r.has(h))return o.extra={...o.extra,parenthesized:!0},o}})}if(a=je(a,r=>{switch(r.type){case"LogicalExpression":if(Ls(r))return vt(r);break;case"VariableDeclaration":{let n=Et(!1,r.declarations,-1);n!=null&&n.init&&i(r,n);break}case"TSParenthesizedType":return r.typeAnnotation;case"TSTypeParameter":if(typeof r.name=="string"){let n=D(r);r.name={type:"Identifier",name:r.name,range:[n,n+r.name.length]}}break;case"TopicReference":a.extra={...a.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:n}=r;if(e==="meriyah"&&(n==null?void 0:n.type)==="Identifier"){let o=s.slice(D(n),B(n));(o.startsWith('"')||o.startsWith("'"))&&(r.exported={...r.exported,type:"Literal",value:r.exported.name,raw:o})}break}case"TSUnionType":case"TSIntersectionType":if(r.types.length===1)return r.types[0];break}}),Y(a.comments)){let r=Et(!1,a.comments,-1);for(let n=a.comments.length-2;n>=0;n--){let o=a.comments[n];B(o)===D(r)&&be(o)&&be(r)&&It(o)&&It(r)&&(a.comments.splice(n+1,1),o.value+="*//*"+r.value,o.range=[D(o),B(r)]),r=o}}return a.type==="Program"&&(a.range=[0,s.length]),a;function i(r,n){s[B(n)]!==";"&&(r.range=[D(r),B(n)])}}function Ls(a){return a.type==="LogicalExpression"&&a.right.type==="LogicalExpression"&&a.operator===a.right.operator}function vt(a){return Ls(a)?vt({type:"LogicalExpression",operator:a.operator,left:vt({type:"LogicalExpression",operator:a.operator,left:a.left,right:a.right.left,range:[D(a.left),B(a.right.left)]}),right:a.right.right,range:[D(a),B(a)]}):a}var Ds=Xr;function Gr(a){let{filepath:t}=a;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var Ms=Gr;function Yr(a,t){let{type:e="JsExpressionRoot",rootMarker:s,text:i}=t,{tokens:r,comments:n}=a;return delete a.tokens,delete a.comments,{tokens:r,comments:n,type:e,node:a,range:[0,i.length],rootMarker:s}}var $e=Yr;var ne=a=>ae(ia(a)),Qr={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}]],tokens:!0,ranges:!0},Zr=["recordAndTuple",{syntaxType:"hash"}],Os="v8intrinsic",Fs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],R=(a,t=Qr)=>({...t,plugins:[...t.plugins,...a]}),ea=/@(?:no)?flow\b/;function ta(a,t){var i;if((i=t.filepath)!=null&&i.endsWith(".js.flow"))return!0;let e=Re(a);e&&(a=a.slice(e.length));let s=xs(a,0);return s!==!1&&(a=a.slice(0,s)),ea.test(a)}function sa(a,t,e){let s=a(t,e),i=s.errors.find(r=>!ra.has(r.reasonCode));if(i)throw i;return s}function ia({isExpression:a=!1,optionsCombinations:t}){return(e,s={})=>{if((s.parser==="babel"||s.parser==="__babel_estree")&&ta(e,s))return s.parser="babel-flow",$s.parse(e,s);let i=t;(s.__babelSourceType??Ms(s))==="script"&&(i=i.map(l=>({...l,sourceType:"script"}))),/#[[{]/.test(e)&&(i=i.map(l=>R([Zr],l)));let n=/%[A-Z]/.test(e);e.includes("|>")?i=(n?[...Fs,Os]:Fs).flatMap(c=>i.map(u=>R([c],u))):n&&(i=i.map(l=>R([Os],l)));let o=a?Ve.parseExpression:Ve.parse,h;try{h=ps(i.map(l=>()=>sa(o,e,l)))}catch({errors:[l]}){throw Te(l)}return a&&(h=$e(h,{text:e,rootMarker:s.rootMarker})),Ds(h,{parser:"babel",text:e})}}var ra=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","MixedLabeledAndUnlabeledElements","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),js=[R(["jsx"])],Bs=ne({optionsCombinations:js}),Rs=ne({optionsCombinations:[R(["jsx","typescript"]),R(["typescript"])]}),_s=ne({isExpression:!0,optionsCombinations:[R(["jsx"])]}),Us=ne({isExpression:!0,optionsCombinations:[R(["typescript"])]}),$s=ne({optionsCombinations:[R(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),aa=ne({optionsCombinations:js.map(a=>R(["estree"],a))}),Vs={babel:Bs,"babel-flow":$s,"babel-ts":Rs,__js_expression:_s,__ts_expression:Us,__vue_expression:_s,__vue_ts_expression:Us,__vue_event_binding:Bs,__vue_ts_event_binding:Rs,__babel_estree:aa};var zs=qe(Ct(),1);function Ks(a={}){let{allowComments:t=!0}=a;return function(s){let i;try{i=(0,zs.parseExpression)(s,{tokens:!0,ranges:!0,attachComment:!1})}catch(r){throw(r==null?void 0:r.reasonCode)==="MissingPlugin"||(r==null?void 0:r.reasonCode)==="MissingOneOfPlugins"?Te({message:"Unexpected token",loc:r.loc}):Te(r)}if(!t&&Y(i.comments))throw W(i.comments[0],"Comment");return oe(i),$e(i,{type:"JsonRoot",text:s})}}function W(a,t){let[e,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return Ue(`${t} is not allowed in JSON.`,{loc:{start:e,end:s}})}function oe(a){switch(a.type){case"ArrayExpression":for(let t of a.elements)t!==null&&oe(t);return;case"ObjectExpression":for(let t of a.properties)oe(t);return;case"ObjectProperty":if(a.computed)throw W(a.key,"Computed key");if(a.shorthand)throw W(a.key,"Shorthand property");a.key.type!=="Identifier"&&oe(a.key),oe(a.value);return;case"UnaryExpression":{let{operator:t,argument:e}=a;if(t!=="+"&&t!=="-")throw W(a,`Operator '${a.operator}'`);if(e.type==="NumericLiteral"||e.type==="Identifier"&&(e.name==="Infinity"||e.name==="NaN"))return;throw W(e,`Operator '${t}' before '${e.type}'`)}case"Identifier":if(a.name!=="Infinity"&&a.name!=="NaN"&&a.name!=="undefined")throw W(a,`Identifier '${a.name}'`);return;case"TemplateLiteral":if(Y(a.expressions))throw W(a.expressions[0],"'TemplateLiteral' with expression");for(let t of a.quasis)oe(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw W(a,`'${a.type}'`)}}var qs=Ks(),na={json:ae({parse:qs,hasPragma(){return!0}}),json5:ae(qs),"json-stringify":ae({parse:Ks({allowComments:!1}),astFormat:"estree-json"})},Hs=na;var oa={...Vs,...Hs};return Zs(ha);}); \ No newline at end of file +`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var ms=Tr;function br(a,t){return t===!1?!1:a.charAt(t)==="/"&&a.charAt(t+1)==="/"?fs(a,t):t}var ys=br;function Ar(a,t){let e=null,s=t;for(;s!==e;)e=s,s=us(a,s),s=ds(a,s),s=ys(a,s),s=ms(a,s);return s}var xs=Ar;function Sr(a){let t=[];for(let e of a)try{return e()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var Ps=Sr;function wr(a){if(!a.startsWith("#!"))return"";let t=a.indexOf(` +`);return t===-1?a:a.slice(0,t)}var Be=wr;var Cr=(a,t,e)=>{if(!(a&&t==null))return Array.isArray(t)||typeof t=="string"?t[e<0?t.length+e:e]:t.at(e)},Ct=Cr;function Er(a){return Array.isArray(a)&&a.length>0}var ge=Er;function D(a){var s,i,r;let t=((s=a.range)==null?void 0:s[0])??a.start,e=(r=((i=a.declaration)==null?void 0:i.decorators)??a.decorators)==null?void 0:r[0];return e?Math.min(D(e),t):t}function B(a){var t;return((t=a.range)==null?void 0:t[1])??a.end}function Ir(a){let t=new Set(a);return e=>t.has(e==null?void 0:e.type)}var gs=Ir;var Nr=gs(["Block","CommentBlock","MultiLine"]),Te=Nr;function kr(a){let t=`*${a.value}*`.split(` +`);return t.length>1&&t.every(e=>e.trimStart()[0]==="*")}var Et=kr;function vr(a){return Te(a)&&a.value[0]==="*"&&/@(?:type|satisfies)\b/.test(a.value)}var Ts=vr;var be=null;function Ae(a){if(be!==null&&typeof be.property){let t=be;return be=Ae.prototype=null,t}return be=Ae.prototype=a??Object.create(null),new Ae}var Lr=10;for(let a=0;a<=Lr;a++)Ae();function It(a){return Ae(a)}function Dr(a,t="type"){It(a);function e(s){let i=s[t],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return e}var bs=Dr;var As={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Mr=bs(As),Ss=Mr;function Nt(a,t){if(!(a!==null&&typeof a=="object"))return a;if(Array.isArray(a)){for(let s=0;s{var n;(n=r.leadingComments)!=null&&n.some(Ts)&&i.add(D(r))}),a=Re(a,r=>{if(r.type==="ParenthesizedExpression"){let{expression:n}=r;if(n.type==="TypeCastExpression")return n.range=[...r.range],n;let o=D(r);if(!i.has(o))return n.extra={...n.extra,parenthesized:!0},n}})}if(a=Re(a,i=>{var r;switch(i.type){case"LogicalExpression":if(ws(i))return kt(i);break;case"VariableDeclaration":{let n=Ct(!1,i.declarations,-1);n!=null&&n.init&&s[B(n)]!==";"&&(i.range=[D(i),B(n)]);break}case"TSParenthesizedType":return i.typeAnnotation;case"TSTypeParameter":if(typeof i.name=="string"){let n=D(i);i.name={type:"Identifier",name:i.name,range:[n,n+i.name.length]}}break;case"TopicReference":a.extra={...a.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(e==="meriyah"&&((r=i.exported)==null?void 0:r.type)==="Identifier"){let{exported:n}=i,o=s.slice(D(n),B(n));(o.startsWith('"')||o.startsWith("'"))&&(i.exported={...i.exported,type:"Literal",value:i.exported.name,raw:o})}break;case"TSUnionType":case"TSIntersectionType":if(i.types.length===1)return i.types[0];break}}),ge(a.comments)){let i=Ct(!1,a.comments,-1);for(let r=a.comments.length-2;r>=0;r--){let n=a.comments[r];B(n)===D(i)&&Te(n)&&Te(i)&&Et(n)&&Et(i)&&(a.comments.splice(r+1,1),n.value+="*//*"+i.value,n.range=[D(n),B(i)]),i=n}}return a.type==="Program"&&(a.range=[0,s.length]),a}function ws(a){return a.type==="LogicalExpression"&&a.right.type==="LogicalExpression"&&a.operator===a.right.operator}function kt(a){return ws(a)?kt({type:"LogicalExpression",operator:a.operator,left:kt({type:"LogicalExpression",operator:a.operator,left:a.left,right:a.right.left,range:[D(a.left),B(a.right.left)]}),right:a.right.right,range:[D(a),B(a)]}):a}var Cs=Or;function Fr(a,t){let e=new SyntaxError(a+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(e,t)}var _e=Fr;function Br(a){let{message:t,loc:{line:e,column:s},reasonCode:i}=a,r=a;(i==="MissingPlugin"||i==="MissingOneOfPlugins")&&(t="Unexpected token.",r=void 0);let n=` (${e}:${s})`;return t.endsWith(n)&&(t=t.slice(0,-n.length)),_e(t,{loc:{start:{line:e,column:s+1}},cause:r})}var Ue=Br;var re=Ve(Ds(),1);function Hr(a){let t=Be(a);t&&(a=a.slice(t.length+1));let e=(0,re.extract)(a),{pragmas:s,comments:i}=(0,re.parseWithComments)(e);return{shebang:t,text:a,pragmas:s,comments:i}}function Ms(a){let{pragmas:t}=Hr(a);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function Wr(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Ms,locStart:D,locEnd:B,...a}}var Y=Wr;function Jr(a){let{filepath:t}=a;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var Os=Jr;function Xr(a,t){let{type:e="JsExpressionRoot",rootMarker:s,text:i}=t,{tokens:r,comments:n}=a;return delete a.tokens,delete a.comments,{tokens:r,comments:n,type:e,node:a,range:[0,i.length],rootMarker:s}}var je=Xr;var ae=a=>Y(ta(a)),Gr={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}]],tokens:!0,ranges:!0},Yr=["recordAndTuple",{syntaxType:"hash"}],Fs="v8intrinsic",Bs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],R=(a,t=Gr)=>({...t,plugins:[...t.plugins,...a]}),Qr=/@(?:no)?flow\b/;function Zr(a,t){var i;if((i=t.filepath)!=null&&i.endsWith(".js.flow"))return!0;let e=Be(a);e&&(a=a.slice(e.length));let s=xs(a,0);return s!==!1&&(a=a.slice(0,s)),Qr.test(a)}function ea(a,t,e){let s=a(t,e),i=s.errors.find(r=>!sa.has(r.reasonCode));if(i)throw i;return s}function ta({isExpression:a=!1,optionsCombinations:t}){return(e,s={})=>{if((s.parser==="babel"||s.parser==="__babel_estree")&&Zr(e,s))return s.parser="babel-flow",Vs.parse(e,s);let i=t;(s.__babelSourceType??Os(s))==="script"&&(i=i.map(l=>({...l,sourceType:"script"}))),/#[[{]/.test(e)&&(i=i.map(l=>R([Yr],l)));let n=/%[A-Z]/.test(e);e.includes("|>")?i=(n?[...Bs,Fs]:Bs).flatMap(c=>i.map(u=>R([c],u))):n&&(i=i.map(l=>R([Fs],l)));let o=a?$e.parseExpression:$e.parse,h;try{h=Ps(i.map(l=>()=>ea(o,e,l)))}catch({errors:[l]}){throw Ue(l)}return a&&(h=je(h,{text:e,rootMarker:s.rootMarker})),Cs(h,{parser:"babel",text:e})}}var sa=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),$s=[R(["jsx"])],Rs=ae({optionsCombinations:$s}),_s=ae({optionsCombinations:[R(["jsx","typescript"]),R(["typescript"])]}),Us=ae({isExpression:!0,optionsCombinations:[R(["jsx"])]}),js=ae({isExpression:!0,optionsCombinations:[R(["typescript"])]}),Vs=ae({optionsCombinations:[R(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),ia=ae({optionsCombinations:$s.map(a=>R(["estree"],a))}),qs={babel:Rs,"babel-flow":Vs,"babel-ts":_s,__js_expression:Us,__ts_expression:js,__vue_expression:Us,__vue_ts_expression:js,__vue_event_binding:Rs,__vue_ts_event_binding:_s,__babel_estree:ia};var zs=Ve(wt(),1);function Ks(a={}){let{allowComments:t=!0}=a;return function(s){let i;try{i=(0,zs.parseExpression)(s,{tokens:!0,ranges:!0,attachComment:!1})}catch(r){throw Ue(r)}if(!t&&ge(i.comments))throw W(i.comments[0],"Comment");return ne(i),je(i,{type:"JsonRoot",text:s})}}function W(a,t){let[e,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return _e(`${t} is not allowed in JSON.`,{loc:{start:e,end:s}})}function ne(a){switch(a.type){case"ArrayExpression":for(let t of a.elements)t!==null&&ne(t);return;case"ObjectExpression":for(let t of a.properties)ne(t);return;case"ObjectProperty":if(a.computed)throw W(a.key,"Computed key");if(a.shorthand)throw W(a.key,"Shorthand property");a.key.type!=="Identifier"&&ne(a.key),ne(a.value);return;case"UnaryExpression":{let{operator:t,argument:e}=a;if(t!=="+"&&t!=="-")throw W(a,`Operator '${a.operator}'`);if(e.type==="NumericLiteral"||e.type==="Identifier"&&(e.name==="Infinity"||e.name==="NaN"))return;throw W(e,`Operator '${t}' before '${e.type}'`)}case"Identifier":if(a.name!=="Infinity"&&a.name!=="NaN"&&a.name!=="undefined")throw W(a,`Identifier '${a.name}'`);return;case"TemplateLiteral":if(ge(a.expressions))throw W(a.expressions[0],"'TemplateLiteral' with expression");for(let t of a.quasis)ne(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw W(a,`'${a.type}'`)}}var vt=Ks(),ra={json:Y({parse:vt,hasPragma(){return!0}}),json5:Y(vt),jsonc:Y(vt),"json-stringify":Y({parse:Ks({allowComments:!1}),astFormat:"estree-json"})},Hs=ra;var aa={...qs,...Hs};return Zs(na);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/babel.mjs b/node_modules/prettier/plugins/babel.mjs index 3c236f6..112469e 100644 --- a/node_modules/prettier/plugins/babel.mjs +++ b/node_modules/prettier/plugins/babel.mjs @@ -1,16 +1,16 @@ -var Ws=Object.create;var Ve=Object.defineProperty;var Js=Object.getOwnPropertyDescriptor;var Xs=Object.getOwnPropertyNames;var Gs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var Dt=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),Qs=(a,t)=>{for(var e in t)Ve(a,e,{get:t[e],enumerable:!0})},Zs=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xs(t))!Ys.call(a,i)&&i!==e&&Ve(a,i,{get:()=>t[i],enumerable:!(s=Js(t,i))||s.enumerable});return a};var qe=(a,t,e)=>(e=a!=null?Ws(Gs(a)):{},Zs(t||!a||!a.__esModule?Ve(e,"default",{value:a,enumerable:!0}):e,a));var Ct=Dt(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});function Le(a,t){if(a==null)return{};var e={},s=Object.keys(a),i,r;for(r=0;r=0)&&(e[i]=a[i]);return e}var F=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},te=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function L(a,t){let{line:e,column:s,index:i}=a;return new F(e,s+t,i+t)}var Mt="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",ei={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Mt},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Mt}},Ot={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Ie=({type:a,prefix:t})=>a==="UpdateExpression"?Ot.UpdateExpression[String(t)]:Ot[a],ti={AccessorIsGenerator:({kind:a})=>`A ${a}ter 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.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor 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:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',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:({exportName:a})=>`\`${a}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:a})=>`'import.${a}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:a,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`. +var Ws=Object.create;var $e=Object.defineProperty;var Js=Object.getOwnPropertyDescriptor;var Xs=Object.getOwnPropertyNames;var Gs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var Dt=(a,t)=>()=>(t||a((t={exports:{}}).exports,t),t.exports),Qs=(a,t)=>{for(var e in t)$e(a,e,{get:t[e],enumerable:!0})},Zs=(a,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xs(t))!Ys.call(a,i)&&i!==e&&$e(a,i,{get:()=>t[i],enumerable:!(s=Js(t,i))||s.enumerable});return a};var Ve=(a,t,e)=>(e=a!=null?Ws(Gs(a)):{},Zs(t||!a||!a.__esModule?$e(e,"default",{value:a,enumerable:!0}):e,a));var wt=Dt(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});function Xt(a,t){if(a==null)return{};var e={},s=Object.keys(a),i,r;for(r=0;r=0)&&(e[i]=a[i]);return e}var F=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},te=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function L(a,t){let{line:e,column:s,index:i}=a;return new F(e,s+t,i+t)}var Mt="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",ei={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Mt},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Mt}},Ot={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Ee=({type:a,prefix:t})=>a==="UpdateExpression"?Ot.UpdateExpression[String(t)]:Ot[a],ti={AccessorIsGenerator:({kind:a})=>`A ${a}ter 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.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor 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:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',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:({exportName:a})=>`\`${a}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:a})=>`'import.${a}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:a,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`. - Did you mean \`export { '${a}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding. -- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:a})=>`\`import()\` requires exactly ${a===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${Ie(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${Ie(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${Ie(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} 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:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",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.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(t=>JSON.stringify(t)).join(", ")}.`,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:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' 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.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,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 or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",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:({keyword:a})=>`Unexpected keyword '${a}'.`,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 or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:a})=>`Unexpected reserved word '${a}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:a,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${a?`, expected "${a}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",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:({target:a,onlyValidPropertyName:t})=>`The only valid meta property for ${a} is ${a}.${t}.`,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.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:a})=>`Identifier '${a}' 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."},si={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:a})=>`Assigning to '${a}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:a})=>`Binding '${a}' 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."},ii=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),ri={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:a})=>`Invalid topic token ${a}. In order to use ${a} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${a}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:a})=>`Hack-style pipe body cannot be an unparenthesized ${Ie({type:a})}; please wrap it in parentheses.`,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:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},ai=["toMessage"],ni=["message"];function Ft(a,t,e){Object.defineProperty(a,t,{enumerable:!1,configurable:!0,value:e})}function oi(a){let{toMessage:t}=a,e=Le(a,ai);return function s({loc:i,details:r}){let n=new SyntaxError;return Object.assign(n,e,{loc:i,pos:i.index}),"missingPlugin"in r&&Object.assign(n,{missingPlugin:r.missingPlugin}),Ft(n,"clone",function(h={}){var l;let{line:c,column:u,index:f}=(l=h.loc)!=null?l:i;return s({loc:new F(c,u,f),details:Object.assign({},r,h.details)})}),Ft(n,"details",r),Object.defineProperty(n,"message",{configurable:!0,get(){let o=`${t(r)} (${i.line}:${i.column})`;return this.message=o,o},set(o){Object.defineProperty(this,"message",{value:o,writable:!0})}}),n}}function $(a,t){if(Array.isArray(a))return s=>$(s,a[0]);let e={};for(let s of Object.keys(a)){let i=a[s],r=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:n}=r,o=Le(r,ni),h=typeof n=="string"?()=>n:n;e[s]=oi(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:h},t?{syntaxPlugin:t}:{},o))}return e}var p=Object.assign({},$(ei),$(ti),$(si),$`pipelineOperator`(ri)),{defineProperty:hi}=Object,Bt=(a,t)=>hi(a,t,{enumerable:!1,value:a[t]});function le(a){return a.loc.start&&Bt(a.loc.start,"index"),a.loc.end&&Bt(a.loc.end,"index"),a}var li=a=>class extends a{parse(){let e=le(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(le)),e}parseRegExpLiteral({pattern:e,flags:s}){let i=null;try{i=new RegExp(e,s)}catch{}let r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let i=this.estreeParseLiteral(s);return i.bigint=String(i.value||e),i}parseDecimalLiteral(e){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||e),i}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;let i=e;return i.type="ExpressionStatement",i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,i,r,n){super.parseBlockBody(e,s,i,r,n);let o=e.directives.map(h=>this.directiveToStmt(h));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,i,r,n,o){this.parseMethod(s,i,r,n,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){let i=super.parseLiteral(e,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,s,i=!1){super.parseFunctionBody(e,s,i),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,i,r,n,o,h=!1){let l=this.startNode();return l.kind=e.kind,l=super.parseMethod(l,s,i,r,n,o,h),l.type="FunctionExpression",delete l.kind,e.value=l,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){let s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,i,r,n){let o=super.parseObjectMethod(e,s,i,r,n);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,i,r){let n=super.parseObjectProperty(e,s,i,r);return n&&(n.kind="init",n.type="Property"),n}isValidLVal(e,s,i){return e==="Property"?"value":super.isValidLVal(e,s,i)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){let{key:i,value:r}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(r,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,i){e.kind==="get"||e.kind==="set"?this.raise(p.PatternHasAccessor,{at:e.key}):e.method?this.raise(p.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,s,i)}finishCallExpression(e,s){let i=super.finishCallExpression(e,s);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var r,n;i.options=(r=i.arguments[1])!=null?r:null,i.attributes=(n=i.arguments[1])!=null?n:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let i=this.state.lastTokStartLoc,r=super.parseExport(e,s);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":r.specifiers.length===1&&r.specifiers[0].type==="ExportNamespaceSpecifier"&&(r.type="ExportAllDeclaration",r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":{var n;let{declaration:o}=r;(o==null?void 0:o.type)==="ClassDeclaration"&&((n=o.decorators)==null?void 0:n.length)>0&&o.start===r.start&&this.resetStartLocation(r,i)}break}return r}parseSubscript(e,s,i,r){let n=super.parseSubscript(e,s,i,r);if(r.optionalChainMember){if((n.type==="OptionalMemberExpression"||n.type==="OptionalCallExpression")&&(n.type=n.type.substring(8)),r.stop){let o=this.startNodeAtNode(n);return o.expression=n,this.finishNode(o,"ChainExpression")}}else(n.type==="MemberExpression"||n.type==="CallExpression")&&(n.optional=!1);return n}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.method||e.kind==="get"||e.kind==="set"}finishNodeAt(e,s,i){return le(super.finishNodeAt(e,s,i))}resetStartLocation(e,s){super.resetStartLocation(e,s),le(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),le(e)}},X=class{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}},w={brace:new X("{"),j_oTag:new X("...",!0)};w.template=new X("`",!0);var b=!0,m=!0,ze=!0,ce=!0,q=!0,ci=!0,De=class{constructor(t,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.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},mt=new Map;function A(a,t={}){t.keyword=a;let e=P(a,t);return mt.set(a,e),e}function v(a,t){return P(a,{beforeExpr:b,binop:t})}var de=-1,U=[],yt=[],xt=[],Pt=[],gt=[],Tt=[];function P(a,t={}){var e,s,i,r;return++de,yt.push(a),xt.push((e=t.binop)!=null?e:-1),Pt.push((s=t.beforeExpr)!=null?s:!1),gt.push((i=t.startsExpr)!=null?i:!1),Tt.push((r=t.prefix)!=null?r:!1),U.push(new De(a,t)),de}function T(a,t={}){var e,s,i,r;return++de,mt.set(a,de),yt.push(a),xt.push((e=t.binop)!=null?e:-1),Pt.push((s=t.beforeExpr)!=null?s:!1),gt.push((i=t.startsExpr)!=null?i:!1),Tt.push((r=t.prefix)!=null?r:!1),U.push(new De("name",t)),de}var pi={bracketL:P("[",{beforeExpr:b,startsExpr:m}),bracketHashL:P("#[",{beforeExpr:b,startsExpr:m}),bracketBarL:P("[|",{beforeExpr:b,startsExpr:m}),bracketR:P("]"),bracketBarR:P("|]"),braceL:P("{",{beforeExpr:b,startsExpr:m}),braceBarL:P("{|",{beforeExpr:b,startsExpr:m}),braceHashL:P("#{",{beforeExpr:b,startsExpr:m}),braceR:P("}"),braceBarR:P("|}"),parenL:P("(",{beforeExpr:b,startsExpr:m}),parenR:P(")"),comma:P(",",{beforeExpr:b}),semi:P(";",{beforeExpr:b}),colon:P(":",{beforeExpr:b}),doubleColon:P("::",{beforeExpr:b}),dot:P("."),question:P("?",{beforeExpr:b}),questionDot:P("?."),arrow:P("=>",{beforeExpr:b}),template:P("template"),ellipsis:P("...",{beforeExpr:b}),backQuote:P("`",{startsExpr:m}),dollarBraceL:P("${",{beforeExpr:b,startsExpr:m}),templateTail:P("...`",{startsExpr:m}),templateNonTail:P("...${",{beforeExpr:b,startsExpr:m}),at:P("@"),hash:P("#",{startsExpr:m}),interpreterDirective:P("#!..."),eq:P("=",{beforeExpr:b,isAssign:ce}),assign:P("_=",{beforeExpr:b,isAssign:ce}),slashAssign:P("_=",{beforeExpr:b,isAssign:ce}),xorAssign:P("_=",{beforeExpr:b,isAssign:ce}),moduloAssign:P("_=",{beforeExpr:b,isAssign:ce}),incDec:P("++/--",{prefix:q,postfix:ci,startsExpr:m}),bang:P("!",{beforeExpr:b,prefix:q,startsExpr:m}),tilde:P("~",{beforeExpr:b,prefix:q,startsExpr:m}),doubleCaret:P("^^",{startsExpr:m}),doubleAt:P("@@",{startsExpr:m}),pipeline:v("|>",0),nullishCoalescing:v("??",1),logicalOR:v("||",1),logicalAND:v("&&",2),bitwiseOR:v("|",3),bitwiseXOR:v("^",4),bitwiseAND:v("&",5),equality:v("==/!=/===/!==",6),lt:v("/<=/>=",7),gt:v("/<=/>=",7),relational:v("/<=/>=",7),bitShift:v("<>/>>>",8),bitShiftL:v("<>/>>>",8),bitShiftR:v("<>/>>>",8),plusMin:P("+/-",{beforeExpr:b,binop:9,prefix:q,startsExpr:m}),modulo:P("%",{binop:10,startsExpr:m}),star:P("*",{binop:10}),slash:v("/",10),exponent:P("**",{beforeExpr:b,binop:11,rightAssociative:!0}),_in:A("in",{beforeExpr:b,binop:7}),_instanceof:A("instanceof",{beforeExpr:b,binop:7}),_break:A("break"),_case:A("case",{beforeExpr:b}),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",{beforeExpr:b}),_else:A("else",{beforeExpr:b}),_finally:A("finally"),_function:A("function",{startsExpr:m}),_if:A("if"),_return:A("return",{beforeExpr:b}),_switch:A("switch"),_throw:A("throw",{beforeExpr:b,prefix:q,startsExpr:m}),_try:A("try"),_var:A("var"),_const:A("const"),_with:A("with"),_new:A("new",{beforeExpr:b,startsExpr:m}),_this:A("this",{startsExpr:m}),_super:A("super",{startsExpr:m}),_class:A("class",{startsExpr:m}),_extends:A("extends",{beforeExpr:b}),_export:A("export"),_import:A("import",{startsExpr:m}),_null:A("null",{startsExpr:m}),_true:A("true",{startsExpr:m}),_false:A("false",{startsExpr:m}),_typeof:A("typeof",{beforeExpr:b,prefix:q,startsExpr:m}),_void:A("void",{beforeExpr:b,prefix:q,startsExpr:m}),_delete:A("delete",{beforeExpr:b,prefix:q,startsExpr:m}),_do:A("do",{isLoop:ze,beforeExpr:b}),_for:A("for",{isLoop:ze}),_while:A("while",{isLoop:ze}),_as:T("as",{startsExpr:m}),_assert:T("assert",{startsExpr:m}),_async:T("async",{startsExpr:m}),_await:T("await",{startsExpr:m}),_defer:T("defer",{startsExpr:m}),_from:T("from",{startsExpr:m}),_get:T("get",{startsExpr:m}),_let:T("let",{startsExpr:m}),_meta:T("meta",{startsExpr:m}),_of:T("of",{startsExpr:m}),_sent:T("sent",{startsExpr:m}),_set:T("set",{startsExpr:m}),_source:T("source",{startsExpr:m}),_static:T("static",{startsExpr:m}),_using:T("using",{startsExpr:m}),_yield:T("yield",{startsExpr:m}),_asserts:T("asserts",{startsExpr:m}),_checks:T("checks",{startsExpr:m}),_exports:T("exports",{startsExpr:m}),_global:T("global",{startsExpr:m}),_implements:T("implements",{startsExpr:m}),_intrinsic:T("intrinsic",{startsExpr:m}),_infer:T("infer",{startsExpr:m}),_is:T("is",{startsExpr:m}),_mixins:T("mixins",{startsExpr:m}),_proto:T("proto",{startsExpr:m}),_require:T("require",{startsExpr:m}),_satisfies:T("satisfies",{startsExpr:m}),_keyof:T("keyof",{startsExpr:m}),_readonly:T("readonly",{startsExpr:m}),_unique:T("unique",{startsExpr:m}),_abstract:T("abstract",{startsExpr:m}),_declare:T("declare",{startsExpr:m}),_enum:T("enum",{startsExpr:m}),_module:T("module",{startsExpr:m}),_namespace:T("namespace",{startsExpr:m}),_interface:T("interface",{startsExpr:m}),_type:T("type",{startsExpr:m}),_opaque:T("opaque",{startsExpr:m}),name:P("name",{startsExpr:m}),string:P("string",{startsExpr:m}),num:P("num",{startsExpr:m}),bigint:P("bigint",{startsExpr:m}),decimal:P("decimal",{startsExpr:m}),regexp:P("regexp",{startsExpr:m}),privateName:P("#name",{startsExpr:m}),eof:P("eof"),jsxName:P("jsxName"),jsxText:P("jsxText",{beforeExpr:!0}),jsxTagStart:P("jsxTagStart",{startsExpr:!0}),jsxTagEnd:P("jsxTagEnd"),placeholder:P("%%",{startsExpr:!0})};function S(a){return a>=93&&a<=132}function ui(a){return a<=92}function M(a){return a>=58&&a<=132}function Xt(a){return a>=58&&a<=136}function fi(a){return Pt[a]}function Xe(a){return gt[a]}function di(a){return a>=29&&a<=33}function Rt(a){return a>=129&&a<=131}function mi(a){return a>=90&&a<=92}function bt(a){return a>=58&&a<=92}function yi(a){return a>=39&&a<=59}function xi(a){return a===34}function Pi(a){return Tt[a]}function gi(a){return a>=121&&a<=123}function Ti(a){return a>=124&&a<=130}function H(a){return yt[a]}function Ne(a){return xt[a]}function bi(a){return a===57}function Me(a){return a>=24&&a<=25}function _(a){return U[a]}U[8].updateContext=a=>{a.pop()},U[5].updateContext=U[7].updateContext=U[23].updateContext=a=>{a.push(w.brace)},U[22].updateContext=a=>{a[a.length-1]===w.template?a.pop():a.push(w.template)},U[142].updateContext=a=>{a.push(w.j_expr,w.j_oTag)};var At="\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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",Gt="\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",Ai=new RegExp("["+At+"]"),Si=new RegExp("["+At+Gt+"]");At=Gt=null;var Yt=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,38,6,186,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,19,72,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,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,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,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,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],wi=[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,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Ge(a,t){let e=65536;for(let s=0,i=t.length;sa)return!1;if(e+=t[s+1],e>=a)return!0}return!1}function j(a){return a<65?a===36:a<=90?!0:a<97?a===95:a<=122?!0:a<=65535?a>=170&&Ai.test(String.fromCharCode(a)):Ge(a,Yt)}function Z(a){return a<48?a===36:a<58?!0:a<65?!1:a<=90?!0:a<97?a===95:a<=122?!0:a<=65535?a>=170&&Si.test(String.fromCharCode(a)):Ge(a,Yt)||Ge(a,wi)}var St={keyword:["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"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Ci=new Set(St.keyword),Ei=new Set(St.strict),Ii=new Set(St.strictBind);function Qt(a,t){return t&&a==="await"||a==="enum"}function Zt(a,t){return Qt(a,t)||Ei.has(a)}function es(a){return Ii.has(a)}function ts(a,t){return Zt(a,t)||es(a)}function Ni(a){return Ci.has(a)}function ki(a,t,e){return a===64&&t===64&&j(e)}var vi=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","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Li(a){return vi.has(a)}var ye=class{constructor(t){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=t}},xe=class{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new ye(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let i=this.currentScope();if(e&8||e&16)this.checkRedeclarationInScope(i,t,e,s),e&16?i.functions.add(t):i.lexical.add(t),e&8&&this.maybeExportDefined(i,t);else if(e&4)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,t,e,s),i.var.add(t),this.maybeExportDefined(i,t),!(i.flags&387));--r);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(p.VarRedeclaration,{at:i,identifierName:e})}isRedeclaredInScope(t,e,s){return s&1?s&8?t.lexical.has(e)||t.functions.has(e)||t.var.has(e):s&16?t.lexical.has(e)||!this.treatFunctionsAsVarInScope(t)&&t.var.has(e):t.lexical.has(e)&&!(t.flags&8&&t.lexical.values().next().value===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.has(e):!1}checkLocalExport(t){let{name:e}=t,s=this.scopeStack[0];!s.lexical.has(e)&&!s.var.has(e)&&!s.functions.has(e)&&this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}},Ye=class extends ye{constructor(...t){super(...t),this.declareFunctions=new Set}},Qe=class extends xe{createScope(t){return new Ye(t)}declareName(t,e,s){let i=this.currentScope();if(e&2048){this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t),i.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){return super.isRedeclaredInScope(t,e,s)?!0:s&2048?!t.declareFunctions.has(e)&&(t.lexical.has(e)||t.functions.has(e)):!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},Ze=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[e,s]=t;if(!this.hasPlugin(e))return!1;let i=this.plugins.get(e);for(let r of Object.keys(s))if((i==null?void 0:i[r])!==s[r])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}};function ss(a,t){a.trailingComments===void 0?a.trailingComments=t:a.trailingComments.unshift(...t)}function Di(a,t){a.leadingComments===void 0?a.leadingComments=t:a.leadingComments.unshift(...t)}function Pe(a,t){a.innerComments===void 0?a.innerComments=t:a.innerComments.unshift(...t)}function pe(a,t,e){let s=null,i=t.length;for(;s===null&&i>0;)s=t[--i];s===null||s.start>e.start?Pe(a,e.comments):ss(s,e.comments)}var et=class extends Ze{addComment(t){this.filename&&(t.loc.filename=this.filename),this.state.comments.push(t)}processComment(t){let{commentStack:e}=this.state,s=e.length;if(s===0)return;let i=s-1,r=e[i];r.start===t.end&&(r.leadingNode=t,i--);let{start:n}=t;for(;i>=0;i--){let o=e[i],h=o.end;if(h>n)o.containingNode=t,this.finalizeComment(o),e.splice(i,1);else{h===n&&(o.trailingNode=t);break}}}finalizeComment(t){let{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&ss(t.leadingNode,e),t.trailingNode!==null&&Di(t.trailingNode,e);else{let{containingNode:s,start:i}=t;if(this.input.charCodeAt(i-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":pe(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":pe(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":pe(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":pe(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":pe(s,s.specifiers,t);break;default:Pe(s,e)}else Pe(s,e)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:e}=this.state,{length:s}=e;if(s===0)return;let i=e[s-1];i.leadingNode===t&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){let{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){let{commentStack:i}=this.state,r=i.length;if(r===0)return;let n=r-1;for(;n>=0;n--){let o=i[n],h=o.end;if(o.start===s)o.leadingNode=t;else if(h===e)o.trailingNode=t;else if(h=48&&t<=57},Ut={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Ee={bin:a=>a===48||a===49,oct:a=>a>=48&&a<=55,dec:a=>a>=48&&a<=57,hex:a=>a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102};function jt(a,t,e,s,i,r){let n=e,o=s,h=i,l="",c=null,u=e,{length:f}=t;for(;;){if(e>=f){r.unterminated(n,o,h),l+=t.slice(u,e);break}let d=t.charCodeAt(e);if(Fi(a,d,t,e)){l+=t.slice(u,e);break}if(d===92){l+=t.slice(u,e);let y=Bi(t,e,s,i,a==="template",r);y.ch===null&&!c?c={pos:e,lineStart:s,curLine:i}:l+=y.ch,{pos:e,lineStart:s,curLine:i}=y,u=e}else d===8232||d===8233?(++e,++i,s=e):d===10||d===13?a==="template"?(l+=t.slice(u,e)+` +- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:a})=>`\`import()\` requires exactly ${a===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${Ee(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${Ee(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${Ee(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} 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:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",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.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(t=>JSON.stringify(t)).join(", ")}.`,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:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' 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.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,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 or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",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:({keyword:a})=>`Unexpected keyword '${a}'.`,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 or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:a})=>`Unexpected reserved word '${a}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:a,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${a?`, expected "${a}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",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:({target:a,onlyValidPropertyName:t})=>`The only valid meta property for ${a} is ${a}.${t}.`,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.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:a})=>`Identifier '${a}' 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."},si={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:a})=>`Assigning to '${a}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:a})=>`Binding '${a}' 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."},ii=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),ri={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:a})=>`Invalid topic token ${a}. In order to use ${a} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${a}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:a})=>`Hack-style pipe body cannot be an unparenthesized ${Ee({type:a})}; please wrap it in parentheses.`,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:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},ai=["toMessage"],ni=["message"];function Ft(a,t,e){Object.defineProperty(a,t,{enumerable:!1,configurable:!0,value:e})}function oi(a){let{toMessage:t}=a,e=Xt(a,ai);return function s(i,r){let n=new SyntaxError;return Object.assign(n,e,{loc:i,pos:i.index}),"missingPlugin"in r&&Object.assign(n,{missingPlugin:r.missingPlugin}),Ft(n,"clone",function(h={}){var l;let{line:c,column:u,index:f}=(l=h.loc)!=null?l:i;return s(new F(c,u,f),Object.assign({},r,h.details))}),Ft(n,"details",r),Object.defineProperty(n,"message",{configurable:!0,get(){let o=`${t(r)} (${i.line}:${i.column})`;return this.message=o,o},set(o){Object.defineProperty(this,"message",{value:o,writable:!0})}}),n}}function $(a,t){if(Array.isArray(a))return s=>$(s,a[0]);let e={};for(let s of Object.keys(a)){let i=a[s],r=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:n}=r,o=Xt(r,ni),h=typeof n=="string"?()=>n:n;e[s]=oi(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:h},t?{syntaxPlugin:t}:{},o))}return e}var p=Object.assign({},$(ei),$(ti),$(si),$`pipelineOperator`(ri)),{defineProperty:hi}=Object,Bt=(a,t)=>hi(a,t,{enumerable:!1,value:a[t]});function he(a){return a.loc.start&&Bt(a.loc.start,"index"),a.loc.end&&Bt(a.loc.end,"index"),a}var li=a=>class extends a{parse(){let e=he(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(he)),e}parseRegExpLiteral({pattern:e,flags:s}){let i=null;try{i=new RegExp(e,s)}catch{}let r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let i=this.estreeParseLiteral(s);return i.bigint=String(i.value||e),i}parseDecimalLiteral(e){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||e),i}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;let i=e;return i.type="ExpressionStatement",i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,i,r,n){super.parseBlockBody(e,s,i,r,n);let o=e.directives.map(h=>this.directiveToStmt(h));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,i,r,n,o){this.parseMethod(s,i,r,n,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){let i=super.parseLiteral(e,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,s,i=!1){super.parseFunctionBody(e,s,i),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,i,r,n,o,h=!1){let l=this.startNode();return l.kind=e.kind,l=super.parseMethod(l,s,i,r,n,o,h),l.type="FunctionExpression",delete l.kind,e.value=l,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){let s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,i,r,n){let o=super.parseObjectMethod(e,s,i,r,n);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,i,r){let n=super.parseObjectProperty(e,s,i,r);return n&&(n.kind="init",n.type="Property"),n}isValidLVal(e,s,i){return e==="Property"?"value":super.isValidLVal(e,s,i)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){let{key:i,value:r}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(r,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,i){e.kind==="get"||e.kind==="set"?this.raise(p.PatternHasAccessor,e.key):e.method?this.raise(p.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,i)}finishCallExpression(e,s){let i=super.finishCallExpression(e,s);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var r,n;i.options=(r=i.arguments[1])!=null?r:null,i.attributes=(n=i.arguments[1])!=null?n:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let i=this.state.lastTokStartLoc,r=super.parseExport(e,s);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":r.specifiers.length===1&&r.specifiers[0].type==="ExportNamespaceSpecifier"&&(r.type="ExportAllDeclaration",r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":{var n;let{declaration:o}=r;(o==null?void 0:o.type)==="ClassDeclaration"&&((n=o.decorators)==null?void 0:n.length)>0&&o.start===r.start&&this.resetStartLocation(r,i)}break}return r}parseSubscript(e,s,i,r){let n=super.parseSubscript(e,s,i,r);if(r.optionalChainMember){if((n.type==="OptionalMemberExpression"||n.type==="OptionalCallExpression")&&(n.type=n.type.substring(8)),r.stop){let o=this.startNodeAtNode(n);return o.expression=n,this.finishNode(o,"ChainExpression")}}else(n.type==="MemberExpression"||n.type==="CallExpression")&&(n.optional=!1);return n}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.method||e.kind==="get"||e.kind==="set"}finishNodeAt(e,s,i){return he(super.finishNodeAt(e,s,i))}resetStartLocation(e,s){super.resetStartLocation(e,s),he(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),he(e)}},X=class{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}},w={brace:new X("{"),j_oTag:new X("...",!0)};w.template=new X("`",!0);var b=!0,m=!0,qe=!0,le=!0,q=!0,ci=!0,ve=class{constructor(t,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.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},dt=new Map;function A(a,t={}){t.keyword=a;let e=P(a,t);return dt.set(a,e),e}function v(a,t){return P(a,{beforeExpr:b,binop:t})}var fe=-1,U=[],mt=[],yt=[],xt=[],Pt=[],gt=[];function P(a,t={}){var e,s,i,r;return++fe,mt.push(a),yt.push((e=t.binop)!=null?e:-1),xt.push((s=t.beforeExpr)!=null?s:!1),Pt.push((i=t.startsExpr)!=null?i:!1),gt.push((r=t.prefix)!=null?r:!1),U.push(new ve(a,t)),fe}function T(a,t={}){var e,s,i,r;return++fe,dt.set(a,fe),mt.push(a),yt.push((e=t.binop)!=null?e:-1),xt.push((s=t.beforeExpr)!=null?s:!1),Pt.push((i=t.startsExpr)!=null?i:!1),gt.push((r=t.prefix)!=null?r:!1),U.push(new ve("name",t)),fe}var pi={bracketL:P("[",{beforeExpr:b,startsExpr:m}),bracketHashL:P("#[",{beforeExpr:b,startsExpr:m}),bracketBarL:P("[|",{beforeExpr:b,startsExpr:m}),bracketR:P("]"),bracketBarR:P("|]"),braceL:P("{",{beforeExpr:b,startsExpr:m}),braceBarL:P("{|",{beforeExpr:b,startsExpr:m}),braceHashL:P("#{",{beforeExpr:b,startsExpr:m}),braceR:P("}"),braceBarR:P("|}"),parenL:P("(",{beforeExpr:b,startsExpr:m}),parenR:P(")"),comma:P(",",{beforeExpr:b}),semi:P(";",{beforeExpr:b}),colon:P(":",{beforeExpr:b}),doubleColon:P("::",{beforeExpr:b}),dot:P("."),question:P("?",{beforeExpr:b}),questionDot:P("?."),arrow:P("=>",{beforeExpr:b}),template:P("template"),ellipsis:P("...",{beforeExpr:b}),backQuote:P("`",{startsExpr:m}),dollarBraceL:P("${",{beforeExpr:b,startsExpr:m}),templateTail:P("...`",{startsExpr:m}),templateNonTail:P("...${",{beforeExpr:b,startsExpr:m}),at:P("@"),hash:P("#",{startsExpr:m}),interpreterDirective:P("#!..."),eq:P("=",{beforeExpr:b,isAssign:le}),assign:P("_=",{beforeExpr:b,isAssign:le}),slashAssign:P("_=",{beforeExpr:b,isAssign:le}),xorAssign:P("_=",{beforeExpr:b,isAssign:le}),moduloAssign:P("_=",{beforeExpr:b,isAssign:le}),incDec:P("++/--",{prefix:q,postfix:ci,startsExpr:m}),bang:P("!",{beforeExpr:b,prefix:q,startsExpr:m}),tilde:P("~",{beforeExpr:b,prefix:q,startsExpr:m}),doubleCaret:P("^^",{startsExpr:m}),doubleAt:P("@@",{startsExpr:m}),pipeline:v("|>",0),nullishCoalescing:v("??",1),logicalOR:v("||",1),logicalAND:v("&&",2),bitwiseOR:v("|",3),bitwiseXOR:v("^",4),bitwiseAND:v("&",5),equality:v("==/!=/===/!==",6),lt:v("/<=/>=",7),gt:v("/<=/>=",7),relational:v("/<=/>=",7),bitShift:v("<>/>>>",8),bitShiftL:v("<>/>>>",8),bitShiftR:v("<>/>>>",8),plusMin:P("+/-",{beforeExpr:b,binop:9,prefix:q,startsExpr:m}),modulo:P("%",{binop:10,startsExpr:m}),star:P("*",{binop:10}),slash:v("/",10),exponent:P("**",{beforeExpr:b,binop:11,rightAssociative:!0}),_in:A("in",{beforeExpr:b,binop:7}),_instanceof:A("instanceof",{beforeExpr:b,binop:7}),_break:A("break"),_case:A("case",{beforeExpr:b}),_catch:A("catch"),_continue:A("continue"),_debugger:A("debugger"),_default:A("default",{beforeExpr:b}),_else:A("else",{beforeExpr:b}),_finally:A("finally"),_function:A("function",{startsExpr:m}),_if:A("if"),_return:A("return",{beforeExpr:b}),_switch:A("switch"),_throw:A("throw",{beforeExpr:b,prefix:q,startsExpr:m}),_try:A("try"),_var:A("var"),_const:A("const"),_with:A("with"),_new:A("new",{beforeExpr:b,startsExpr:m}),_this:A("this",{startsExpr:m}),_super:A("super",{startsExpr:m}),_class:A("class",{startsExpr:m}),_extends:A("extends",{beforeExpr:b}),_export:A("export"),_import:A("import",{startsExpr:m}),_null:A("null",{startsExpr:m}),_true:A("true",{startsExpr:m}),_false:A("false",{startsExpr:m}),_typeof:A("typeof",{beforeExpr:b,prefix:q,startsExpr:m}),_void:A("void",{beforeExpr:b,prefix:q,startsExpr:m}),_delete:A("delete",{beforeExpr:b,prefix:q,startsExpr:m}),_do:A("do",{isLoop:qe,beforeExpr:b}),_for:A("for",{isLoop:qe}),_while:A("while",{isLoop:qe}),_as:T("as",{startsExpr:m}),_assert:T("assert",{startsExpr:m}),_async:T("async",{startsExpr:m}),_await:T("await",{startsExpr:m}),_defer:T("defer",{startsExpr:m}),_from:T("from",{startsExpr:m}),_get:T("get",{startsExpr:m}),_let:T("let",{startsExpr:m}),_meta:T("meta",{startsExpr:m}),_of:T("of",{startsExpr:m}),_sent:T("sent",{startsExpr:m}),_set:T("set",{startsExpr:m}),_source:T("source",{startsExpr:m}),_static:T("static",{startsExpr:m}),_using:T("using",{startsExpr:m}),_yield:T("yield",{startsExpr:m}),_asserts:T("asserts",{startsExpr:m}),_checks:T("checks",{startsExpr:m}),_exports:T("exports",{startsExpr:m}),_global:T("global",{startsExpr:m}),_implements:T("implements",{startsExpr:m}),_intrinsic:T("intrinsic",{startsExpr:m}),_infer:T("infer",{startsExpr:m}),_is:T("is",{startsExpr:m}),_mixins:T("mixins",{startsExpr:m}),_proto:T("proto",{startsExpr:m}),_require:T("require",{startsExpr:m}),_satisfies:T("satisfies",{startsExpr:m}),_keyof:T("keyof",{startsExpr:m}),_readonly:T("readonly",{startsExpr:m}),_unique:T("unique",{startsExpr:m}),_abstract:T("abstract",{startsExpr:m}),_declare:T("declare",{startsExpr:m}),_enum:T("enum",{startsExpr:m}),_module:T("module",{startsExpr:m}),_namespace:T("namespace",{startsExpr:m}),_interface:T("interface",{startsExpr:m}),_type:T("type",{startsExpr:m}),_opaque:T("opaque",{startsExpr:m}),name:P("name",{startsExpr:m}),string:P("string",{startsExpr:m}),num:P("num",{startsExpr:m}),bigint:P("bigint",{startsExpr:m}),decimal:P("decimal",{startsExpr:m}),regexp:P("regexp",{startsExpr:m}),privateName:P("#name",{startsExpr:m}),eof:P("eof"),jsxName:P("jsxName"),jsxText:P("jsxText",{beforeExpr:!0}),jsxTagStart:P("jsxTagStart",{startsExpr:!0}),jsxTagEnd:P("jsxTagEnd"),placeholder:P("%%",{startsExpr:!0})};function S(a){return a>=93&&a<=132}function ui(a){return a<=92}function M(a){return a>=58&&a<=132}function Gt(a){return a>=58&&a<=136}function fi(a){return xt[a]}function Je(a){return Pt[a]}function di(a){return a>=29&&a<=33}function Rt(a){return a>=129&&a<=131}function mi(a){return a>=90&&a<=92}function Tt(a){return a>=58&&a<=92}function yi(a){return a>=39&&a<=59}function xi(a){return a===34}function Pi(a){return gt[a]}function gi(a){return a>=121&&a<=123}function Ti(a){return a>=124&&a<=130}function H(a){return mt[a]}function Ie(a){return yt[a]}function bi(a){return a===57}function Le(a){return a>=24&&a<=25}function _(a){return U[a]}U[8].updateContext=a=>{a.pop()},U[5].updateContext=U[7].updateContext=U[23].updateContext=a=>{a.push(w.brace)},U[22].updateContext=a=>{a[a.length-1]===w.template?a.pop():a.push(w.template)},U[142].updateContext=a=>{a.push(w.j_expr,w.j_oTag)};var bt="\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\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-\u1711\u171F-\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-\u1B4C\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-\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-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\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",Yt="\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\u0898-\u089F\u08CA-\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\u0C3C\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\u0CF3\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-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\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-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\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\uFF65",Ai=new RegExp("["+bt+"]"),Si=new RegExp("["+bt+Yt+"]");bt=Yt=null;var Qt=[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,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,43,17,47,20,28,22,13,52,58,1,3,0,14,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,20,1,64,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,38,6,186,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,19,72,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,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,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,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,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,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,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,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],wi=[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,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,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,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function Xe(a,t){let e=65536;for(let s=0,i=t.length;sa)return!1;if(e+=t[s+1],e>=a)return!0}return!1}function j(a){return a<65?a===36:a<=90?!0:a<97?a===95:a<=122?!0:a<=65535?a>=170&&Ai.test(String.fromCharCode(a)):Xe(a,Qt)}function Z(a){return a<48?a===36:a<58?!0:a<65?!1:a<=90?!0:a<97?a===95:a<=122?!0:a<=65535?a>=170&&Si.test(String.fromCharCode(a)):Xe(a,Qt)||Xe(a,wi)}var At={keyword:["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"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Ci=new Set(At.keyword),Ei=new Set(At.strict),Ii=new Set(At.strictBind);function Zt(a,t){return t&&a==="await"||a==="enum"}function es(a,t){return Zt(a,t)||Ei.has(a)}function ts(a){return Ii.has(a)}function ss(a,t){return es(a,t)||ts(a)}function Ni(a){return Ci.has(a)}function ki(a,t,e){return a===64&&t===64&&j(e)}var vi=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","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Li(a){return vi.has(a)}var me=class{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},ye=class{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new me(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let i=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(i,t,e,s);let r=i.names.get(t)||0;e&16?r=r|4:(i.firstLexicalName||(i.firstLexicalName=t),r=r|2),i.names.set(t,r),e&8&&this.maybeExportDefined(i,t)}else if(e&4)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,t,e,s),i.names.set(t,(i.names.get(t)||0)|1),this.maybeExportDefined(i,t),!(i.flags&387));--r);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(p.VarRedeclaration,i,{identifierName:e})}isRedeclaredInScope(t,e,s){if(!(s&1))return!1;if(s&8)return t.names.has(e);let i=t.names.get(e);return s&16?(i&2)>0||!this.treatFunctionsAsVarInScope(t)&&(i&1)>0:(i&2)>0&&!(t.flags&8&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(i&4)>0}checkLocalExport(t){let{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}},Ge=class extends me{constructor(...t){super(...t),this.declareFunctions=new Set}},Ye=class extends ye{createScope(t){return new Ge(t)}declareName(t,e,s){let i=this.currentScope();if(e&2048){this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t),i.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){if(super.isRedeclaredInScope(t,e,s))return!0;if(s&2048&&!t.declareFunctions.has(e)){let i=t.names.get(e);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},Qe=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[e,s]=t;if(!this.hasPlugin(e))return!1;let i=this.plugins.get(e);for(let r of Object.keys(s))if((i==null?void 0:i[r])!==s[r])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}};function is(a,t){a.trailingComments===void 0?a.trailingComments=t:a.trailingComments.unshift(...t)}function Di(a,t){a.leadingComments===void 0?a.leadingComments=t:a.leadingComments.unshift(...t)}function xe(a,t){a.innerComments===void 0?a.innerComments=t:a.innerComments.unshift(...t)}function ce(a,t,e){let s=null,i=t.length;for(;s===null&&i>0;)s=t[--i];s===null||s.start>e.start?xe(a,e.comments):is(s,e.comments)}var Ze=class extends Qe{addComment(t){this.filename&&(t.loc.filename=this.filename);let{commentsLen:e}=this.state;this.comments.length!=e&&(this.comments.length=e),this.comments.push(t),this.state.commentsLen++}processComment(t){let{commentStack:e}=this.state,s=e.length;if(s===0)return;let i=s-1,r=e[i];r.start===t.end&&(r.leadingNode=t,i--);let{start:n}=t;for(;i>=0;i--){let o=e[i],h=o.end;if(h>n)o.containingNode=t,this.finalizeComment(o),e.splice(i,1);else{h===n&&(o.trailingNode=t);break}}}finalizeComment(t){let{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&is(t.leadingNode,e),t.trailingNode!==null&&Di(t.trailingNode,e);else{let{containingNode:s,start:i}=t;if(this.input.charCodeAt(i-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":ce(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":ce(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":ce(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":ce(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":ce(s,s.specifiers,t);break;default:xe(s,e)}else xe(s,e)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:e}=this.state,{length:s}=e;if(s===0)return;let i=e[s-1];i.leadingNode===t&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){let{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){let{commentStack:i}=this.state,r=i.length;if(r===0)return;let n=r-1;for(;n>=0;n--){let o=i[n],h=o.end;if(o.start===s)o.leadingNode=t;else if(h===e)o.trailingNode=t;else if(h0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:e,startLine:s,startColumn:i}){this.strict=t===!1?!1:t===!0?!0:e==="module",this.curLine=s,this.lineStart=-i,this.startLoc=this.endLoc=new F(s,i,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}curPosition(){return new F(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let t=new a;return t.flags=this.flags,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},Oi=function(t){return t>=48&&t<=57},Ut={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Ce={bin:a=>a===48||a===49,oct:a=>a>=48&&a<=55,dec:a=>a>=48&&a<=57,hex:a=>a>=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102};function jt(a,t,e,s,i,r){let n=e,o=s,h=i,l="",c=null,u=e,{length:f}=t;for(;;){if(e>=f){r.unterminated(n,o,h),l+=t.slice(u,e);break}let d=t.charCodeAt(e);if(Fi(a,d,t,e)){l+=t.slice(u,e);break}if(d===92){l+=t.slice(u,e);let y=Bi(t,e,s,i,a==="template",r);y.ch===null&&!c?c={pos:e,lineStart:s,curLine:i}:l+=y.ch,{pos:e,lineStart:s,curLine:i}=y,u=e}else d===8232||d===8233?(++e,++i,s=e):d===10||d===13?a==="template"?(l+=t.slice(u,e)+` `,++e,d===13&&t.charCodeAt(e)===10&&++e,++i,u=s=e):r.unterminated(n,o,h):++e}return{pos:e,str:l,firstInvalidLoc:c,lineStart:s,curLine:i,containsInvalid:!!c}}function Fi(a,t,e,s){return a==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(a==="double"?34:39)}function Bi(a,t,e,s,i,r){let n=!i;t++;let o=l=>({pos:t,ch:l,lineStart:e,curLine:s}),h=a.charCodeAt(t++);switch(h){case 110:return o(` -`);case 114:return o("\r");case 120:{let l;return{code:l,pos:t}=st(a,t,e,s,2,!1,n,r),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:t}=as(a,t,e,s,n,r),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(t-1,e,s);default:if(h>=48&&h<=55){let l=t-1,u=a.slice(l,t+2).match(/^[0-7]+/)[0],f=parseInt(u,8);f>255&&(u=u.slice(0,-1),f=parseInt(u,8)),t+=u.length-1;let d=a.charCodeAt(t);if(u!=="0"||d===56||d===57){if(i)return o(null);r.strictNumericEscape(l,e,s)}return o(String.fromCharCode(f))}return o(String.fromCharCode(h))}}function st(a,t,e,s,i,r,n,o){let h=t,l;return{n:l,pos:t}=rs(a,t,e,s,16,i,r,!1,o,!n),l===null&&(n?o.invalidEscapeSequence(h,e,s):t=h-1),{code:l,pos:t}}function rs(a,t,e,s,i,r,n,o,h,l){let c=t,u=i===16?Ut.hex:Ut.decBinOct,f=i===16?Ee.hex:i===10?Ee.dec:i===8?Ee.oct:Ee.bin,d=!1,y=0;for(let I=0,C=r??1/0;I=97?k=E-97+10:E>=65?k=E-65+10:Oi(E)?k=E-48:k=1/0,k>=i){if(k<=9&&l)return{n:null,pos:t};if(k<=9&&h.invalidDigit(t,e,s,i))k=0;else if(n)k=0,d=!0;else break}++t,y=y*i+k}return t===c||r!=null&&t-c!==r||d?{n:null,pos:t}:{n:y,pos:t}}function as(a,t,e,s,i,r){let n=a.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=st(a,t,e,s,a.indexOf("}",t)-t,!0,i,r),++t,o!==null&&o>1114111)if(i)r.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=st(a,t,e,s,4,!1,i,r));return{code:o,pos:t}}var Ri=["at"],_i=["at"];function ue(a,t,e){return new F(e,a-t,a)}var Ui=new Set([103,109,115,105,121,117,100,118]),O=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new te(t.startLoc,t.endLoc)}},it=class extends et{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,i,r,n)=>this.options.errorRecovery?(this.raise(p.InvalidDigit,{at:ue(s,i,r),radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(p.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(p.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(p.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(p.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,i,r)=>{this.recordStrictModeErrors(p.StrictNumericEscape,{at:ue(s,i,r)})},unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedString,{at:ue(s-1,i,r)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(p.StrictNumericEscape),unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedTemplate,{at:ue(s,i,r)})}}),this.state=new tt,this.state.init(t),this.input=e,this.length=e.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new O(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return Ke.lastIndex=t,Ke.test(this.input)?Ke.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return ke.lastIndex=t,ke.test(this.input)?ke.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++tthis.raise(e,{at:s})),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(t,s+2);if(i===-1)throw this.raise(p.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=i+t.length,Ce.lastIndex=s+2;Ce.test(this.input)&&Ce.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Ce.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:s,end:i+t.length,loc:new te(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(r),r}skipLineComment(t){let e=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.post)){let r=this.skipLineComment(3);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let r=this.skipLineComment(4);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r))}else break e}else break e}}if(e.length>0){let s=this.state.pos,i={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(p.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?p.RecordExpressionHashIncorrectStartSyntaxType:p.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else j(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!me(t)&&++this.state.pos=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(j(t)){this.readWord(t);return}}throw this.raise(p.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(t)})}finishOp(t,e){let s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){let t=this.state.startLoc,e=this.state.start+1,s,i,{pos:r}=this.state;for(;;++r){if(r>=this.length)throw this.raise(p.UnterminatedRegExp,{at:L(t,1)});let l=this.input.charCodeAt(r);if(me(l))throw this.raise(p.UnterminatedRegExp,{at:L(t,1)});if(s)s=!1;else{if(l===91)i=!0;else if(l===93&&i)i=!1;else if(l===47&&!i)break;s=l===92}}let n=this.input.slice(e,r);++r;let o="",h=()=>L(t,r+2-e);for(;r=2&&this.input.charCodeAt(e)===48;if(l){let d=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(p.StrictOctalLiteral,{at:s}),!this.state.strict){let y=d.indexOf("_");y>0&&this.raise(p.ZeroDigitNumericSeparator,{at:L(s,y)})}h=l&&!/[89]/.test(d)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!h&&(++this.state.pos,this.readInt(10),i=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!h&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(p.InvalidOrMissingExponent,{at:s}),i=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((i||l)&&this.raise(p.InvalidBigIntLiteral,{at:s}),++this.state.pos,r=!0),c===109&&(this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(p.InvalidDecimal,{at:s}),++this.state.pos,n=!0),j(this.codePointAtPos(this.state.pos)))throw this.raise(p.NumberIdentifier,{at:this.state.curPosition()});let u=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(r){this.finishToken(135,u);return}if(n){this.finishToken(136,u);return}let f=h?parseInt(u,8):parseFloat(u);this.finishToken(134,f)}readCodePoint(t){let{code:e,pos:s}=as(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){let{str:e,pos:s,curLine:i,lineStart:r}=jt(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=r,this.state.curLine=i,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:i,curLine:r,lineStart:n}=jt("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=n,this.state.curLine=r,s&&(this.state.firstInvalidTemplateEscapePos=new F(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(i)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,{at:e}){let s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,{at:e}):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="",s=this.state.pos,i=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos=0;h--){let l=o[h];if(l.loc.index===n)return o[h]=t({loc:r,details:i});if(l.loc.indexthis.hasPlugin(e)))throw this.raise(p.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:t})}errorBuilder(t){return(e,s,i)=>{this.raise(t,{at:ue(e,s,i)})}}},rt=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},at=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new rt)}exit(){let t=this.stack.pop(),e=this.current();for(let[s,i]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,i):this.parser.raise(p.InvalidPrivateFieldResolution,{at:i,identifierName:s})}declarePrivateName(t,e,s){let{privateNames:i,loneAccessors:r,undefinedPrivateNames:n}=this.current(),o=i.has(t);if(e&3){let h=o&&r.get(t);if(h){let l=h&4,c=e&4,u=h&3,f=e&3;o=u===f||l!==c,o||r.delete(t)}else o||r.set(t,e)}o&&this.parser.raise(p.PrivateNameRedeclaration,{at:s,identifierName:t}),i.add(t),n.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(p.InvalidPrivateFieldResolution,{at:e,identifierName:t})}},se=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Oe=class extends se{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,{at:e}){let s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},nt=class{constructor(t){this.parser=void 0,this.stack=[new se],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,{at:e}){let s={at:e.loc.start},{stack:i}=this,r=i.length-1,n=i[r];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(t,s);else return;n=i[--r]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,{at:e}){let{stack:s}=this,i=s[s.length-1],r={at:e.loc.start};if(i.isCertainlyParameterDeclaration())this.parser.raise(t,r);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,r);else return}recordAsyncArrowParametersError({at:t}){let{stack:e}=this,s=e.length-1,i=e[s];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(p.AwaitBindingIdentifier,{at:t}),i=e[--s]}validateAsPattern(){let{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([s,i])=>{this.parser.raise(s,{at:i});let r=t.length-2,n=t[r];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(i.index),n=t[--r]})}};function ji(){return new se(3)}function $i(){return new Oe(1)}function Vi(){return new Oe(2)}function ns(){return new se}var ot=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function ve(a,t){return(a?2:0)|(t?1:0)}var ht=class extends it{addExtra(t,e,s,i=!0){if(!t)return;let r=t.extra=t.extra||{};i?r[e]=s:Object.defineProperty(r,e,{enumerable:i,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){let s=t+e.length;if(this.input.slice(t,s)===e){let i=this.input.charCodeAt(s);return!(Z(i)||(i&64512)===55296)}return!1}isLookaheadContextual(t){let e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,{at:this.state.startLoc});this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return is.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return _t.lastIndex=this.state.end,_t.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(p.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){let s={node:null};try{let i=t((r=null)=>{throw s.node=r,s});if(this.state.errors.length>e.errors.length){let r=this.state;return this.state=e,this.state.tokensLength=r.tokensLength,{node:i,error:r.errors[e.errors.length],thrown:!1,aborted:!1,failState:r}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let r=this.state;if(this.state=e,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:r};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:r};throw i}}checkExpressionErrors(t,e){if(!t)return!1;let{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:r,optionalParametersLoc:n}=t,o=!!s||!!i||!!n||!!r;if(!e)return o;s!=null&&this.raise(p.InvalidCoverInitializedName,{at:s}),i!=null&&this.raise(p.DuplicateProto,{at:i}),r!=null&&this.raise(p.UnexpectedPrivateField,{at:r}),n!=null&&this.unexpected(n)}isLiteralPropertyName(){return Xt(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=t;let r=this.scope,n=this.getScopeHandler();this.scope=new n(this,t);let o=this.prodParam;this.prodParam=new ot;let h=this.classScope;this.classScope=new at(this);let l=this.expressionScope;return this.expressionScope=new nt(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=i,this.scope=r,this.prodParam=o,this.classScope=h,this.expressionScope=l}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}},ee=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ie=class{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new te(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},wt=ie.prototype;wt.__clone=function(){let a=new ie(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e`Cannot overwrite reserved type ${a}.`,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:({memberName:a,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${a} = true,\` or \`${a} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:a,enumName:t})=>`Enum member names need to be unique, but the name \`${a}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:a})=>`Enum \`${a}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:a,enumName:t})=>`Enum type \`${a}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:a})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${a}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:a,memberName:t,explicitType:e})=>`Enum \`${a}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:a,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${a}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:a,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${a}\`.`,EnumInvalidMemberName:({enumName:a,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${a}\`.`,EnumNumberMemberNotInitialized:({enumName:a,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${a}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:a})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${a}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",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.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",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:({reservedType:a})=>`Unexpected reserved type ${a}.`,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:({unsupportedExportKind:a,suggestion:t})=>`\`declare export ${a}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Hi(a){return a.type==="DeclareExportAllDeclaration"||a.type==="DeclareExportDeclaration"&&(!a.declaration||a.declaration.type!=="TypeAlias"&&a.declaration.type!=="InterfaceDeclaration")}function $t(a){return a.importKind==="type"||a.importKind==="typeof"}var Wi={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Ji(a,t){let e=[],s=[];for(let i=0;iclass extends a{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Qe}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){let s=Xi.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let s=this.state.inType;this.state.inType=!0,this.expect(e||14);let i=this.flowParseType();return this.state.inType=s,i}flowParsePredicate(){let e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStart>s.index+1&&this.raise(g.UnexpectedSpaceBetweenModuloChecks,{at:s}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,i=null;return this.match(54)?(this.state.inType=e,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let s=e.id=this.parseIdentifier(),i=this.startNode(),r=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let n=this.flowParseFunctionTypeParams();return i.params=n.params,i.rest=n.rest,i.this=n._this,this.expect(11),[i.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(g.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let s=e.body=this.startNode(),i=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(g.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(o)):(this.expectContextual(125,g.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),i.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let r=null,n=!1;return i.forEach(o=>{Hi(o)?(r==="CommonJS"&&this.raise(g.AmbiguousDeclareModuleKind,{at:o}),r="ES"):o.type==="DeclareModuleExports"&&(n&&this.raise(g.DuplicateDeclareModuleExports,{at:o}),r==="ES"&&this.raise(g.AmbiguousDeclareModuleKind,{at:o}),r="CommonJS",n=!0)}),e.kind=r||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){let i=this.state.value;throw this.raise(g.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:i,suggestion:Wi[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(g.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,s,i){Ki.has(e)&&this.raise(i?g.AssignReservedType:g.UnexpectedReservedType,{at:s,reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let s=this.state.startLoc,i=this.startNode(),r=this.flowParseVariance(),n=this.flowParseTypeAnnotatableIdentifier();return i.name=n.name,i.variance=r,i.bound=n.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):e&&this.raise(g.MissingTypeParamDefault,{at:s}),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let i=!1;do{let r=this.flowParseTypeParameter(i);s.params.push(r),r.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=i,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,i){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=i,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){let i=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(i),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:i,allowProto:r,allowInexact:n}){let o=this.state.inType;this.state.inType=!0;let h=this.startNode();h.callProperties=[],h.properties=[],h.indexers=[],h.internalSlots=[];let l,c,u=!1;for(s&&this.match(6)?(this.expect(6),l=9,c=!0):(this.expect(5),l=8,c=!1),h.exact=c;!this.match(l);){let d=!1,y=null,I=null,C=this.startNode();if(r&&this.isContextual(118)){let k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),y=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),d=!0)}let E=this.flowParseVariance();if(this.eat(0))y!=null&&this.unexpected(y),this.eat(0)?(E&&this.unexpected(E.loc.start),h.internalSlots.push(this.flowParseObjectTypeInternalSlot(C,d))):h.indexers.push(this.flowParseObjectTypeIndexer(C,d,E));else if(this.match(10)||this.match(47))y!=null&&this.unexpected(y),E&&this.unexpected(E.loc.start),h.callProperties.push(this.flowParseObjectTypeCallProperty(C,d));else{let k="init";if(this.isContextual(99)||this.isContextual(104)){let he=this.lookahead();Xt(he.type)&&(k=this.state.value,this.next())}let we=this.flowParseObjectTypeProperty(C,d,y,E,k,i,n??!c);we===null?(u=!0,I=this.state.lastTokStartLoc):h.properties.push(we)}this.flowObjectTypeSemicolon(),I&&!this.match(8)&&!this.match(9)&&this.raise(g.UnexpectedExplicitInexactInObject,{at:I})}this.expect(l),i&&(h.inexact=u);let f=this.finishNode(h,"ObjectTypeAnnotation");return this.state.inType=o,f}flowParseObjectTypeProperty(e,s,i,r,n,o,h){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?h||this.raise(g.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(g.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),r&&this.raise(g.InexactVariance,{at:r}),null):(o||this.raise(g.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),i!=null&&this.unexpected(i),r&&this.raise(g.SpreadVariance,{at:r}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=i!=null,e.kind=n;let l=!1;return this.match(47)||this.match(10)?(e.method=!0,i!=null&&this.unexpected(i),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(n==="get"||n==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(g.ThisParamBannedInConstructor,{at:e.value.this})):(n!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(l=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=l,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let s=e.kind==="get"?0:1,i=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?g.GetterMayNotHaveThisParam:g.SetterMayNotHaveThisParam,{at:e.value.this}),i!==s&&this.raise(e.kind==="get"?p.BadGetterArity:p.BadSetterArity,{at:e}),e.kind==="set"&&e.value.rest&&this.raise(p.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var i;(i=e)!=null||(e=this.state.startLoc);let r=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let n=this.startNodeAt(e);n.qualification=r,n.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(n,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,s){let i=this.startNodeAt(e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.possuper.parseFunctionBody(e,!0,i));return}super.parseFunctionBody(e,!1,i)}parseFunctionBodyAndFinish(e,s,i=!1){if(this.match(14)){let r=this.startNode();[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,i)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(M(i.type)){let r=this.startNode();return this.next(),this.flowParseInterface(r)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,i){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||S(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(S(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){let{type:e}=this.state;return Rt(e)||this.shouldParseEnums()&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return Rt(e)||this.shouldParseEnums()&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,i){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(i),e}this.expect(17);let r=this.state.clone(),n=this.state.noArrowAt,o=this.startNodeAt(s),{consequent:h,failed:l}=this.tryParseConditionalConsequent(),[c,u]=this.getArrowLikeExpressions(h);if(l||u.length>0){let f=[...n];if(u.length>0){this.state=r,this.state.noArrowAt=f;for(let d=0;d1&&this.raise(g.AmbiguousConditionalArrow,{at:r.startLoc}),l&&c.length===1&&(this.state=r,f.push(c[0].start),this.state.noArrowAt=f,{consequent:h,failed:l}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(h,!0),this.state.noArrowAt=n,this.expect(14),o.test=e,o.consequent=h,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){let i=[e],r=[];for(;i.length!==0;){let n=i.pop();n.type==="ArrowFunctionExpression"?(n.typeParameters||!n.returnType?this.finishArrowValidation(n):r.push(n),i.push(n.body)):n.type==="ConditionalExpression"&&(i.push(n.consequent),i.push(n.alternate))}return s?(r.forEach(n=>this.finishArrowValidation(n)),[r,[]]):Ji(r,n=>n.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let i;return this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),i=s(),this.state.noArrowParamsConversionAt.pop()):i=s(),i}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.shouldParseEnums()&&this.isContextual(126)){e.exportKind="value";let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:s}=this.state,i=super.maybeParseExportNamespaceSpecifier(e);return i&&e.exportKind==="type"&&this.unexpected(s),i}parseClassId(e,s,i){super.parseClassId(e,s,i),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,i){let{startLoc:r}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,i),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(g.DeclareClassElement,{at:r}):s.value&&this.raise(g.DeclareClassFieldInitializer,{at:s.value}))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(p.InvalidIdentifier,{at:this.state.curPosition(),identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){let s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):ki(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,i){for(let r=0;r1||!s)&&this.raise(g.TypeCastInPattern,{at:n.typeAnnotation})}return e}parseArrayLike(e,s,i,r){let n=super.parseArrayLike(e,s,i,r);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(n.elements),n}isValidLVal(e,s,i){return e==="TypeCastExpression"||super.isValidLVal(e,s,i)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,i,r,n,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,i,r,n,o),s.params&&n){let h=s.params;h.length>0&&this.isThisParam(h[0])&&this.raise(g.ThisParamBannedInConstructor,{at:s})}else if(s.type==="MethodDefinition"&&n&&s.value.params){let h=s.value.params;h.length>0&&this.isThisParam(h[0])&&this.raise(g.ThisParamBannedInConstructor,{at:s})}}pushClassPrivateMethod(e,s,i,r){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,i,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let s=e.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let s=this.getObjectOrClassMethodParams(e);if(s.length>0){let i=s[0];this.isThisParam(i)&&e.kind==="get"?this.raise(g.GetterMayNotHaveThisParam,{at:i}):this.isThisParam(i)&&this.raise(g.SetterMayNotHaveThisParam,{at:i})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,i,r,n,o,h){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let l;this.match(47)&&!o&&(l=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let c=super.parseObjPropValue(e,s,i,r,n,o,h);return l&&((c.value||c).typeParameters=l),c}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(g.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(g.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(g.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(g.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startsuper.parseMaybeAssign(e,s),r),!n.error)return n.node;let{context:l}=this.state,c=l[l.length-1];(c===w.j_oTag||c===w.j_expr)&&l.pop()}if((i=n)!=null&&i.error||this.match(47)){var o,h;r=r||this.state.clone();let l,c=this.tryParse(f=>{var d;l=this.flowParseTypeParameterDeclaration();let y=this.forwardNoArrowParamsConversionAt(l,()=>{let C=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(C,l),C});(d=y.extra)!=null&&d.parenthesized&&f();let I=this.maybeUnwrapTypeCastExpression(y);return I.type!=="ArrowFunctionExpression"&&f(),I.typeParameters=l,this.resetStartLocationFromNode(I,l),y},r),u=null;if(c.node&&this.maybeUnwrapTypeCastExpression(c.node).type==="ArrowFunctionExpression"){if(!c.error&&!c.aborted)return c.node.async&&this.raise(g.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:l}),c.node;u=c.node}if((o=n)!=null&&o.node)return this.state=n.failState,n.node;if(u)return this.state=c.failState,u;throw(h=n)!=null&&h.thrown?n.error:c.thrown?c.error:this.raise(g.UnexpectedTokenAfterTypeParameter,{at:l})}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,i,r=!0){if(!(i&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let n=0;n0&&this.raise(g.ThisParamMustBeFirst,{at:e.params[n]});super.checkParams(e,s,i,r)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,s,i){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(s.index)!==-1){this.next();let r=this.startNodeAt(s);r.callee=e,r.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(r,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let r=this.state.clone(),n=this.tryParse(h=>this.parseAsyncArrowWithTypeParameters(s)||h(),r);if(!n.error&&!n.aborted)return n.node;let o=this.tryParse(()=>super.parseSubscripts(e,s,i),r);if(o.node&&!o.error)return o.node;if(n.node)return this.state=n.failState,n.node;if(o.node)return this.state=o.failState,o.node;throw n.error||o.error}return super.parseSubscripts(e,s,i)}parseSubscript(e,s,i,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,i)return r.stop=!0,e;this.next();let n=this.startNodeAt(s);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),n.arguments=this.parseCallExpressionArguments(11,!1),n.optional=!0,this.finishCallExpression(n,!0)}else if(!i&&this.shouldParseTypes()&&this.match(47)){let n=this.startNodeAt(s);n.callee=e;let o=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11,!1),r.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,r.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,i,r)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){let s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){let i=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(g.UnterminatedFlowComment,{at:this.state.curPosition()}),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(g.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;let i=this.input.charCodeAt(s+e),r=this.input.charCodeAt(s+e+1);return i===58&&r===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:i===58&&r!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(p.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:i}){this.raise(g.EnumBooleanMemberNotInitialized,{at:e,memberName:i,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?g.EnumInvalidMemberInitializerSymbolType:g.EnumInvalidMemberInitializerPrimaryType:g.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},s))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:s,memberName:i}){this.raise(g.EnumNumberMemberNotInitialized,{at:e,enumName:s,memberName:i})}flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:s}){this.raise(g.EnumStringMemberInconsistentlyInitialized,{at:e,enumName:s})}flowEnumMemberInit(){let e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let i=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 133:{let i=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,s=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:i}}flowEnumCheckExplicitTypeMismatch(e,s,i){let{explicitType:r}=s;r!==null&&r!==i&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){let i=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},n=!1;for(;!this.match(8);){if(this.eat(21)){n=!0;break}let o=this.startNode(),{id:h,init:l}=this.flowEnumMemberRaw(),c=h.name;if(c==="")continue;/^[a-z]/.test(c)&&this.raise(g.EnumInvalidMemberName,{at:h,memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),i.has(c)&&this.raise(g.EnumDuplicateMemberName,{at:h,memberName:c,enumName:e}),i.add(c);let u={enumName:e,explicitType:s,memberName:c};switch(o.id=h,l.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"boolean"),o.init=l.value,r.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"number"),o.init=l.value,r.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"string"),o.init=l.value,r.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(l.loc,u);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(l.loc,u);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(l.loc,u);break;default:r.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:n}}flowEnumStringMembers(e,s,{enumName:i}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(let r of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return s}else{for(let r of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!S(this.state.type))throw this.raise(g.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e});let{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(g.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){let i=s.name,r=s.loc.start,n=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:o,hasUnknownMembers:h}=this.flowEnumMembers({enumName:i,explicitType:n});switch(e.hasUnknownMembers=h,n){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let l=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let c=o.booleanMembers.length,u=o.numberMembers.length,f=o.stringMembers.length,d=o.defaultedMembers.length;if(!c&&!u&&!f&&!d)return l();if(!c&&!u)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!u&&!f&&c>=d){for(let y of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!c&&!f&&u>=d){for(let y of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(g.EnumInconsistentMemberValues,{at:r,enumName:i}),l()}}}flowParseEnumDeclaration(e){let s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},J=$`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:a})=>`Expected corresponding JSX closing tag for <${a}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:a,HTMLEntity:t})=>`Unexpected token \`${a}\`. Did you mean \`${t}\` or \`{'${a}'}\`?`,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 z(a){return a?a.type==="JSXOpeningFragment"||a.type==="JSXClosingFragment":!1}function Q(a){if(a.type==="JSXIdentifier")return a.name;if(a.type==="JSXNamespacedName")return a.namespace.name+":"+a.name.name;if(a.type==="JSXMemberExpression")return Q(a.object)+"."+Q(a.property);throw new Error("Node had unexpected type: "+a.type)}var Yi=a=>class extends a{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(J.UnterminatedJsxContent,{at:this.state.startLoc});let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(i);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:me(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let s=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=e?` +`);case 114:return o("\r");case 120:{let l;return{code:l,pos:t}=tt(a,t,e,s,2,!1,n,r),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:t}=ns(a,t,e,s,n,r),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(t-1,e,s);default:if(h>=48&&h<=55){let l=t-1,u=a.slice(l,t+2).match(/^[0-7]+/)[0],f=parseInt(u,8);f>255&&(u=u.slice(0,-1),f=parseInt(u,8)),t+=u.length-1;let d=a.charCodeAt(t);if(u!=="0"||d===56||d===57){if(i)return o(null);r.strictNumericEscape(l,e,s)}return o(String.fromCharCode(f))}return o(String.fromCharCode(h))}}function tt(a,t,e,s,i,r,n,o){let h=t,l;return{n:l,pos:t}=as(a,t,e,s,16,i,r,!1,o,!n),l===null&&(n?o.invalidEscapeSequence(h,e,s):t=h-1),{code:l,pos:t}}function as(a,t,e,s,i,r,n,o,h,l){let c=t,u=i===16?Ut.hex:Ut.decBinOct,f=i===16?Ce.hex:i===10?Ce.dec:i===8?Ce.oct:Ce.bin,d=!1,y=0;for(let I=0,C=r??1/0;I=97?k=E-97+10:E>=65?k=E-65+10:Oi(E)?k=E-48:k=1/0,k>=i){if(k<=9&&l)return{n:null,pos:t};if(k<=9&&h.invalidDigit(t,e,s,i))k=0;else if(n)k=0,d=!0;else break}++t,y=y*i+k}return t===c||r!=null&&t-c!==r||d?{n:null,pos:t}:{n:y,pos:t}}function ns(a,t,e,s,i,r){let n=a.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=tt(a,t,e,s,a.indexOf("}",t)-t,!0,i,r),++t,o!==null&&o>1114111)if(i)r.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=tt(a,t,e,s,4,!1,i,r));return{code:o,pos:t}}function pe(a,t,e){return new F(e,a-t,a)}var Ri=new Set([103,109,115,105,121,117,100,118]),O=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new te(t.startLoc,t.endLoc)}},st=class extends Ze{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,i,r,n)=>this.options.errorRecovery?(this.raise(p.InvalidDigit,pe(s,i,r),{radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(p.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(p.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(p.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(p.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,i,r)=>{this.recordStrictModeErrors(p.StrictNumericEscape,pe(s,i,r))},unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedString,pe(s-1,i,r))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(p.StrictNumericEscape),unterminated:(s,i,r)=>{throw this.raise(p.UnterminatedTemplate,pe(s,i,r))}}),this.state=new et,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new O(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return ze.lastIndex=t,ze.test(this.input)?ze.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Ne.lastIndex=t,Ne.test(this.input)?Ne.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++tthis.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(t,s+2);if(i===-1)throw this.raise(p.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+t.length,we.lastIndex=s+2;we.test(this.input)&&we.lastIndex<=i;)++this.state.curLine,this.state.lineStart=we.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:s,end:i+t.length,loc:new te(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(r),r}skipLineComment(t){let e=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.post)){let r=this.skipLineComment(3);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let r=this.skipLineComment(4);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r))}else break e}else break e}}if(e.length>0){let s=this.state.pos,i={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(p.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?p.RecordExpressionHashIncorrectStartSyntaxType:p.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else j(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!de(t)&&++this.state.pos=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(j(t)){this.readWord(t);return}}throw this.raise(p.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,e){let s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){let t=this.state.startLoc,e=this.state.start+1,s,i,{pos:r}=this.state;for(;;++r){if(r>=this.length)throw this.raise(p.UnterminatedRegExp,L(t,1));let l=this.input.charCodeAt(r);if(de(l))throw this.raise(p.UnterminatedRegExp,L(t,1));if(s)s=!1;else{if(l===91)i=!0;else if(l===93&&i)i=!1;else if(l===47&&!i)break;s=l===92}}let n=this.input.slice(e,r);++r;let o="",h=()=>L(t,r+2-e);for(;r=2&&this.input.charCodeAt(e)===48;if(l){let d=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(p.StrictOctalLiteral,s),!this.state.strict){let y=d.indexOf("_");y>0&&this.raise(p.ZeroDigitNumericSeparator,L(s,y))}h=l&&!/[89]/.test(d)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!h&&(++this.state.pos,this.readInt(10),i=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!h&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(p.InvalidOrMissingExponent,s),i=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((i||l)&&this.raise(p.InvalidBigIntLiteral,s),++this.state.pos,r=!0),c===109&&(this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(p.InvalidDecimal,s),++this.state.pos,n=!0),j(this.codePointAtPos(this.state.pos)))throw this.raise(p.NumberIdentifier,this.state.curPosition());let u=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(r){this.finishToken(135,u);return}if(n){this.finishToken(136,u);return}let f=h?parseInt(u,8):parseFloat(u);this.finishToken(134,f)}readCodePoint(t){let{code:e,pos:s}=ns(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){let{str:e,pos:s,curLine:i,lineStart:r}=jt(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=r,this.state.curLine=i,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:i,curLine:r,lineStart:n}=jt("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=n,this.state.curLine=r,s&&(this.state.firstInvalidTemplateEscapePos=new F(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(i)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,e){let s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,e):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="",s=this.state.pos,i=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos=0;o--){let h=n[o];if(h.loc.index===r)return n[o]=t(i,s);if(h.loc.indexthis.hasPlugin(e)))throw this.raise(p.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,s,i)=>{this.raise(t,pe(e,s,i))}}},it=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},rt=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new it)}exit(){let t=this.stack.pop(),e=this.current();for(let[s,i]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,i):this.parser.raise(p.InvalidPrivateFieldResolution,i,{identifierName:s})}declarePrivateName(t,e,s){let{privateNames:i,loneAccessors:r,undefinedPrivateNames:n}=this.current(),o=i.has(t);if(e&3){let h=o&&r.get(t);if(h){let l=h&4,c=e&4,u=h&3,f=e&3;o=u===f||l!==c,o||r.delete(t)}else o||r.set(t,e)}o&&this.parser.raise(p.PrivateNameRedeclaration,s,{identifierName:t}),i.add(t),n.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(p.InvalidPrivateFieldResolution,e,{identifierName:t})}},se=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},De=class extends se{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,e){let s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},at=class{constructor(t){this.parser=void 0,this.stack=[new se],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){let s=e.loc.start,{stack:i}=this,r=i.length-1,n=i[r];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(t,s);else return;n=i[--r]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,e){let{stack:s}=this,i=s[s.length-1],r=e.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(t,r);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,r);else return}recordAsyncArrowParametersError(t){let{stack:e}=this,s=e.length-1,i=e[s];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(p.AwaitBindingIdentifier,t),i=e[--s]}validateAsPattern(){let{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([s,i])=>{this.parser.raise(s,i);let r=t.length-2,n=t[r];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(i.index),n=t[--r]})}};function _i(){return new se(3)}function Ui(){return new De(1)}function ji(){return new De(2)}function os(){return new se}var nt=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function ke(a,t){return(a?2:0)|(t?1:0)}var ot=class extends st{addExtra(t,e,s,i=!0){if(!t)return;let r=t.extra=t.extra||{};i?r[e]=s:Object.defineProperty(r,e,{enumerable:i,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){let s=t+e.length;if(this.input.slice(t,s)===e){let i=this.input.charCodeAt(s);return!(Z(i)||(i&64512)===55296)}return!1}isLookaheadContextual(t){let e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return rs.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return _t.lastIndex=this.state.end,_t.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(p.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){let s={node:null};try{let i=t((r=null)=>{throw s.node=r,s});if(this.state.errors.length>e.errors.length){let r=this.state;return this.state=e,this.state.tokensLength=r.tokensLength,{node:i,error:r.errors[e.errors.length],thrown:!1,aborted:!1,failState:r}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let r=this.state;if(this.state=e,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:r};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:r};throw i}}checkExpressionErrors(t,e){if(!t)return!1;let{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:r,optionalParametersLoc:n}=t,o=!!s||!!i||!!n||!!r;if(!e)return o;s!=null&&this.raise(p.InvalidCoverInitializedName,s),i!=null&&this.raise(p.DuplicateProto,i),r!=null&&this.raise(p.UnexpectedPrivateField,r),n!=null&&this.unexpected(n)}isLiteralPropertyName(){return Gt(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=t;let r=this.scope,n=this.getScopeHandler();this.scope=new n(this,t);let o=this.prodParam;this.prodParam=new nt;let h=this.classScope;this.classScope=new rt(this);let l=this.expressionScope;return this.expressionScope=new at(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=i,this.scope=r,this.prodParam=o,this.classScope=h,this.expressionScope=l}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}},ee=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ie=class{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new te(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},St=ie.prototype;St.__clone=function(){let a=new ie(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e`Cannot overwrite reserved type ${a}.`,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:({memberName:a,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${a} = true,\` or \`${a} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:a,enumName:t})=>`Enum member names need to be unique, but the name \`${a}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:a})=>`Enum \`${a}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:a,enumName:t})=>`Enum type \`${a}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:a})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${a}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:a,memberName:t,explicitType:e})=>`Enum \`${a}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:a,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${a}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:a,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${a}\`.`,EnumInvalidMemberName:({enumName:a,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${a}\`.`,EnumNumberMemberNotInitialized:({enumName:a,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${a}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:a})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${a}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",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.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",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:({reservedType:a})=>`Unexpected reserved type ${a}.`,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:({unsupportedExportKind:a,suggestion:t})=>`\`declare export ${a}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function zi(a){return a.type==="DeclareExportAllDeclaration"||a.type==="DeclareExportDeclaration"&&(!a.declaration||a.declaration.type!=="TypeAlias"&&a.declaration.type!=="InterfaceDeclaration")}function $t(a){return a.importKind==="type"||a.importKind==="typeof"}var Ki={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Hi(a,t){let e=[],s=[];for(let i=0;iclass extends a{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Ye}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){let s=Wi.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let s=this.state.inType;this.state.inType=!0,this.expect(e||14);let i=this.flowParseType();return this.state.inType=s,i}flowParsePredicate(){let e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(g.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,i=null;return this.match(54)?(this.state.inType=e,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let s=e.id=this.parseIdentifier(),i=this.startNode(),r=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let n=this.flowParseFunctionTypeParams();return i.params=n.params,i.rest=n.rest,i.this=n._this,this.expect(11),[i.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(g.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let s=e.body=this.startNode(),i=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(g.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,g.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),i.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let r=null,n=!1;return i.forEach(o=>{zi(o)?(r==="CommonJS"&&this.raise(g.AmbiguousDeclareModuleKind,o),r="ES"):o.type==="DeclareModuleExports"&&(n&&this.raise(g.DuplicateDeclareModuleExports,o),r==="ES"&&this.raise(g.AmbiguousDeclareModuleKind,o),r="CommonJS",n=!0)}),e.kind=r||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){let i=this.state.value;throw this.raise(g.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:Ki[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(g.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,s,i){qi.has(e)&&this.raise(i?g.AssignReservedType:g.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let s=this.state.startLoc,i=this.startNode(),r=this.flowParseVariance(),n=this.flowParseTypeAnnotatableIdentifier();return i.name=n.name,i.variance=r,i.bound=n.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):e&&this.raise(g.MissingTypeParamDefault,s),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let i=!1;do{let r=this.flowParseTypeParameter(i);s.params.push(r),r.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=i,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,i){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=i,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){let i=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(i),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:i,allowProto:r,allowInexact:n}){let o=this.state.inType;this.state.inType=!0;let h=this.startNode();h.callProperties=[],h.properties=[],h.indexers=[],h.internalSlots=[];let l,c,u=!1;for(s&&this.match(6)?(this.expect(6),l=9,c=!0):(this.expect(5),l=8,c=!1),h.exact=c;!this.match(l);){let d=!1,y=null,I=null,C=this.startNode();if(r&&this.isContextual(118)){let k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),y=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let k=this.lookahead();k.type!==14&&k.type!==17&&(this.next(),d=!0)}let E=this.flowParseVariance();if(this.eat(0))y!=null&&this.unexpected(y),this.eat(0)?(E&&this.unexpected(E.loc.start),h.internalSlots.push(this.flowParseObjectTypeInternalSlot(C,d))):h.indexers.push(this.flowParseObjectTypeIndexer(C,d,E));else if(this.match(10)||this.match(47))y!=null&&this.unexpected(y),E&&this.unexpected(E.loc.start),h.callProperties.push(this.flowParseObjectTypeCallProperty(C,d));else{let k="init";if(this.isContextual(99)||this.isContextual(104)){let oe=this.lookahead();Gt(oe.type)&&(k=this.state.value,this.next())}let Se=this.flowParseObjectTypeProperty(C,d,y,E,k,i,n??!c);Se===null?(u=!0,I=this.state.lastTokStartLoc):h.properties.push(Se)}this.flowObjectTypeSemicolon(),I&&!this.match(8)&&!this.match(9)&&this.raise(g.UnexpectedExplicitInexactInObject,I)}this.expect(l),i&&(h.inexact=u);let f=this.finishNode(h,"ObjectTypeAnnotation");return this.state.inType=o,f}flowParseObjectTypeProperty(e,s,i,r,n,o,h){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?h||this.raise(g.InexactInsideExact,this.state.lastTokStartLoc):this.raise(g.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(g.InexactVariance,r),null):(o||this.raise(g.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),r&&this.raise(g.SpreadVariance,r),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=i!=null,e.kind=n;let l=!1;return this.match(47)||this.match(10)?(e.method=!0,i!=null&&this.unexpected(i),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(n==="get"||n==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(g.ThisParamBannedInConstructor,e.value.this)):(n!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(l=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=l,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let s=e.kind==="get"?0:1,i=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?g.GetterMayNotHaveThisParam:g.SetterMayNotHaveThisParam,e.value.this),i!==s&&this.raise(e.kind==="get"?p.BadGetterArity:p.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(p.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var i;(i=e)!=null||(e=this.state.startLoc);let r=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let n=this.startNodeAt(e);n.qualification=r,n.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(n,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,s){let i=this.startNodeAt(e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.possuper.parseFunctionBody(e,!0,i));return}super.parseFunctionBody(e,!1,i)}parseFunctionBodyAndFinish(e,s,i=!1){if(this.match(14)){let r=this.startNode();[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,i)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(M(i.type)){let r=this.startNode();return this.next(),this.flowParseInterface(r)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,i){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||S(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(S(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){let{type:e}=this.state;return Rt(e)||this.shouldParseEnums()&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return Rt(e)||this.shouldParseEnums()&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,i){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(i),e}this.expect(17);let r=this.state.clone(),n=this.state.noArrowAt,o=this.startNodeAt(s),{consequent:h,failed:l}=this.tryParseConditionalConsequent(),[c,u]=this.getArrowLikeExpressions(h);if(l||u.length>0){let f=[...n];if(u.length>0){this.state=r,this.state.noArrowAt=f;for(let d=0;d1&&this.raise(g.AmbiguousConditionalArrow,r.startLoc),l&&c.length===1&&(this.state=r,f.push(c[0].start),this.state.noArrowAt=f,{consequent:h,failed:l}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(h,!0),this.state.noArrowAt=n,this.expect(14),o.test=e,o.consequent=h,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){let i=[e],r=[];for(;i.length!==0;){let n=i.pop();n.type==="ArrowFunctionExpression"?(n.typeParameters||!n.returnType?this.finishArrowValidation(n):r.push(n),i.push(n.body)):n.type==="ConditionalExpression"&&(i.push(n.consequent),i.push(n.alternate))}return s?(r.forEach(n=>this.finishArrowValidation(n)),[r,[]]):Hi(r,n=>n.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let i;return this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),i=s(),this.state.noArrowParamsConversionAt.pop()):i=s(),i}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.shouldParseEnums()&&this.isContextual(126)){e.exportKind="value";let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:s}=this.state,i=super.maybeParseExportNamespaceSpecifier(e);return i&&e.exportKind==="type"&&this.unexpected(s),i}parseClassId(e,s,i){super.parseClassId(e,s,i),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,i){let{startLoc:r}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,i),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(g.DeclareClassElement,r):s.value&&this.raise(g.DeclareClassFieldInitializer,s.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(p.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){let s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):ki(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,i){for(let r=0;r1||!s)&&this.raise(g.TypeCastInPattern,n.typeAnnotation)}return e}parseArrayLike(e,s,i,r){let n=super.parseArrayLike(e,s,i,r);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(n.elements),n}isValidLVal(e,s,i){return e==="TypeCastExpression"||super.isValidLVal(e,s,i)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,i,r,n,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,i,r,n,o),s.params&&n){let h=s.params;h.length>0&&this.isThisParam(h[0])&&this.raise(g.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&n&&s.value.params){let h=s.value.params;h.length>0&&this.isThisParam(h[0])&&this.raise(g.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,i,r){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,i,r)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let s=e.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let s=this.getObjectOrClassMethodParams(e);if(s.length>0){let i=s[0];this.isThisParam(i)&&e.kind==="get"?this.raise(g.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(g.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,i,r,n,o,h){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let l;this.match(47)&&!o&&(l=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let c=super.parseObjPropValue(e,s,i,r,n,o,h);return l&&((c.value||c).typeParameters=l),c}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(g.PatternIsOptional,e),this.isThisParam(e)&&this.raise(g.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(g.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(g.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startsuper.parseMaybeAssign(e,s),r),!n.error)return n.node;let{context:l}=this.state,c=l[l.length-1];(c===w.j_oTag||c===w.j_expr)&&l.pop()}if((i=n)!=null&&i.error||this.match(47)){var o,h;r=r||this.state.clone();let l,c=this.tryParse(f=>{var d;l=this.flowParseTypeParameterDeclaration();let y=this.forwardNoArrowParamsConversionAt(l,()=>{let C=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(C,l),C});(d=y.extra)!=null&&d.parenthesized&&f();let I=this.maybeUnwrapTypeCastExpression(y);return I.type!=="ArrowFunctionExpression"&&f(),I.typeParameters=l,this.resetStartLocationFromNode(I,l),y},r),u=null;if(c.node&&this.maybeUnwrapTypeCastExpression(c.node).type==="ArrowFunctionExpression"){if(!c.error&&!c.aborted)return c.node.async&&this.raise(g.UnexpectedTypeParameterBeforeAsyncArrowFunction,l),c.node;u=c.node}if((o=n)!=null&&o.node)return this.state=n.failState,n.node;if(u)return this.state=c.failState,u;throw(h=n)!=null&&h.thrown?n.error:c.thrown?c.error:this.raise(g.UnexpectedTokenAfterTypeParameter,l)}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,i,r=!0){if(!(i&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let n=0;n0&&this.raise(g.ThisParamMustBeFirst,e.params[n]);super.checkParams(e,s,i,r)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,s,i){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(s.index)!==-1){this.next();let r=this.startNodeAt(s);r.callee=e,r.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(r,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let r=this.state.clone(),n=this.tryParse(h=>this.parseAsyncArrowWithTypeParameters(s)||h(),r);if(!n.error&&!n.aborted)return n.node;let o=this.tryParse(()=>super.parseSubscripts(e,s,i),r);if(o.node&&!o.error)return o.node;if(n.node)return this.state=n.failState,n.node;if(o.node)return this.state=o.failState,o.node;throw n.error||o.error}return super.parseSubscripts(e,s,i)}parseSubscript(e,s,i,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,i)return r.stop=!0,e;this.next();let n=this.startNodeAt(s);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),n.arguments=this.parseCallExpressionArguments(11,!1),n.optional=!0,this.finishCallExpression(n,!0)}else if(!i&&this.shouldParseTypes()&&this.match(47)){let n=this.startNodeAt(s);n.callee=e;let o=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11,!1),r.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,r.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,i,r)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){let s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){let i=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(g.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(g.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;let i=this.input.charCodeAt(s+e),r=this.input.charCodeAt(s+e+1);return i===58&&r===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:i===58&&r!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(p.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:i}){this.raise(g.EnumBooleanMemberNotInitialized,e,{memberName:i,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?g.EnumInvalidMemberInitializerSymbolType:g.EnumInvalidMemberInitializerPrimaryType:g.EnumInvalidMemberInitializerUnknownType,e,s)}flowEnumErrorNumberMemberNotInitialized(e,s){this.raise(g.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitialized(e,s){this.raise(g.EnumStringMemberInconsistentlyInitialized,e,s)}flowEnumMemberInit(){let e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let i=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 133:{let i=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,s=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:i}}flowEnumCheckExplicitTypeMismatch(e,s,i){let{explicitType:r}=s;r!==null&&r!==i&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){let i=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},n=!1;for(;!this.match(8);){if(this.eat(21)){n=!0;break}let o=this.startNode(),{id:h,init:l}=this.flowEnumMemberRaw(),c=h.name;if(c==="")continue;/^[a-z]/.test(c)&&this.raise(g.EnumInvalidMemberName,h,{memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),i.has(c)&&this.raise(g.EnumDuplicateMemberName,h,{memberName:c,enumName:e}),i.add(c);let u={enumName:e,explicitType:s,memberName:c};switch(o.id=h,l.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"boolean"),o.init=l.value,r.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"number"),o.init=l.value,r.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(l.loc,u,"string"),o.init=l.value,r.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(l.loc,u);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(l.loc,u);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(l.loc,u);break;default:r.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:n}}flowEnumStringMembers(e,s,{enumName:i}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(let r of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return s}else{for(let r of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!S(this.state.type))throw this.raise(g.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(g.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){let i=s.name,r=s.loc.start,n=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:o,hasUnknownMembers:h}=this.flowEnumMembers({enumName:i,explicitType:n});switch(e.hasUnknownMembers=h,n){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let l=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let c=o.booleanMembers.length,u=o.numberMembers.length,f=o.stringMembers.length,d=o.defaultedMembers.length;if(!c&&!u&&!f&&!d)return l();if(!c&&!u)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!u&&!f&&c>=d){for(let y of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!c&&!f&&u>=d){for(let y of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(g.EnumInconsistentMemberValues,r,{enumName:i}),l()}}}flowParseEnumDeclaration(e){let s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},J=$`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:a})=>`Expected corresponding JSX closing tag for <${a}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:a,HTMLEntity:t})=>`Unexpected token \`${a}\`. Did you mean \`${t}\` or \`{'${a}'}\`?`,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 z(a){return a?a.type==="JSXOpeningFragment"||a.type==="JSXClosingFragment":!1}function Q(a){if(a.type==="JSXIdentifier")return a.name;if(a.type==="JSXNamespacedName")return a.namespace.name+":"+a.name.name;if(a.type==="JSXMemberExpression")return Q(a.object)+"."+Q(a.property);throw new Error("Node had unexpected type: "+a.type)}var Xi=a=>class extends a{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(J.UnterminatedJsxContent,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(i);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:de(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let s=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=e?` `:`\r -`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedString,{at:this.state.startLoc});let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):me(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos1){for(let i=0;i=0;i--){let r=this.scopeStack[i];if(r.types.has(e)||r.exportOnlyBindings.has(e))return}super.checkLocalExport(t)}},Qi=(a,t)=>Object.hasOwnProperty.call(a,t)&&a[t],os=a=>a.type==="ParenthesizedExpression"?os(a.expression):a,ut=class extends lt{toAssignable(t,e=!1){var s,i;let r;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(r=os(t),e?r.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(p.InvalidParenthesizedAssignment,{at:t}):r.type!=="MemberExpression"&&!this.isOptionalMemberExpression(r)&&this.raise(p.InvalidParenthesizedAssignment,{at:t}):this.raise(p.InvalidParenthesizedAssignment,{at:t})),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,h=t.properties.length,l=h-1;oi.type!=="ObjectMethod"&&(r===s||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(let s of t)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){let i=s&1,r=[],n=!0;for(;!this.eat(t);)if(n?n=!1:this.expect(12),i&&this.match(12))r.push(null);else{if(this.eat(t))break;if(this.match(21)){if(r.push(this.parseAssignableListItemTypes(this.parseRestBinding(),s)),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(p.UnsupportedParameterDecorator,{at:this.state.startLoc});this.match(26);)o.push(this.parseDecorator());r.push(this.parseAssignableListItem(s,o))}}return r}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let t=this.startNode(),{type:e,startLoc:s}=this.state;return e===21?this.parseBindingRestProperty(t):(e===138?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,s,!1,!1,!0,!1))}parseAssignableListItem(t,e){let s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s,t);let i=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),i}parseAssignableListItemTypes(t,e){return t}parseMaybeDefault(t,e){var s,i;if((s=t)!=null||(t=this.state.startLoc),e=(i=e)!=null?i:this.parseBindingAtom(),!this.eat(29))return e;let r=this.startNodeAt(t);return r.left=e,r.right=this.parseMaybeAssignAllowIn(),this.finishNode(r,"AssignmentPattern")}isValidLVal(t,e,s){return Qi({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},t)}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,{in:e,binding:s=64,checkClashes:i=!1,strictModeChanged:r=!1,hasParenthesizedAncestor:n=!1}){var o;let h=t.type;if(this.isObjectMethod(t))return;let l=this.isOptionalMemberExpression(t);if(l||h==="MemberExpression"){l&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(p.InvalidLhsOptionalChaining,{at:t,ancestor:e})),s!==64&&this.raise(p.InvalidPropertyBindingPattern,{at:t});return}if(h==="Identifier"){this.checkIdentifier(t,s,r);let{name:y}=t;i&&(i.has(y)?this.raise(p.ParamDupe,{at:t}):i.add(y));return}let c=this.isValidLVal(h,!(n||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(c===!0)return;if(c===!1){let y=s===64?p.InvalidLhs:p.InvalidLhsBinding;this.raise(y,{at:t,ancestor:e});return}let[u,f]=Array.isArray(c)?c:[c,h==="ParenthesizedExpression"],d=h==="ArrayPattern"||h==="ObjectPattern"?{type:h}:e;for(let y of[].concat(t[u]))y&&this.checkLVal(y,{in:d,binding:s,checkClashes:i,strictModeChanged:r,hasParenthesizedAncestor:f})}checkIdentifier(t,e,s=!1){this.state.strict&&(s?ts(t.name,this.inModule):es(t.name))&&(e===64?this.raise(p.StrictEvalArguments,{at:t,referenceName:t.name}):this.raise(p.StrictEvalArgumentsBinding,{at:t,bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(p.LetInLexicalBinding,{at:t}),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(p.InvalidRestAssignmentPattern,{at:t})}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?p.RestTrailingComma:p.ElementAfterRest,{at:this.state.startLoc}),!0):!1}},Zi=(a,t)=>Object.hasOwnProperty.call(a,t)&&a[t];function er(a){if(a==null)throw new Error(`Unexpected ${a} value.`);return a}function Vt(a){if(!a)throw new Error("Assert fail")}var x=$`typescript`({AbstractMethodHasImplementation:({methodName:a})=>`Method '${a}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:a})=>`Property '${a}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:a})=>`'declare' is not allowed in ${a}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:a})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:a})=>`Duplicate modifier: '${a}'.`,EmptyHeritageClauseType:({token:a})=>`'${a}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:a})=>`'${a[0]}' modifier cannot be used with '${a[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:a})=>`Index signatures cannot have an accessibility modifier ('${a}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:a})=>`'${a}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:a})=>`'${a}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:a})=>`'${a}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:a})=>`'${a[0]}' modifier must precede '${a[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:a})=>`Private elements cannot have an accessibility modifier ('${a}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:a})=>`Single type parameter ${a} should have a trailing comma. Example usage: <${a},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",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:({type:a})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${a}.`});function tr(a){switch(a){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}}function qt(a){return a==="private"||a==="public"||a==="protected"}function sr(a){return a==="in"||a==="out"}var ir=a=>class extends a{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:x.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter})}getScopeHandler(){return pt}tsIsIdentifier(){return S(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,s){if(!S(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(e.indexOf(i)!==-1){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:i,errorTemplate:r=x.InvalidModifierOnTypeMember},n){let o=(l,c,u,f)=>{c===u&&n[f]&&this.raise(x.InvalidModifiersOrder,{at:l,orderedModifiers:[u,f]})},h=(l,c,u,f)=>{(n[u]&&c===f||n[f]&&c===u)&&this.raise(x.IncompatibleModifiers,{at:l,modifiers:[u,f]})};for(;;){let{startLoc:l}=this.state,c=this.tsParseModifier(e.concat(s??[]),i);if(!c)break;qt(c)?n.accessibility?this.raise(x.DuplicateAccessibilityModifier,{at:l,modifier:c}):(o(l,c,c,"override"),o(l,c,c,"static"),o(l,c,c,"readonly"),n.accessibility=c):sr(c)?(n[c]&&this.raise(x.DuplicateModifier,{at:l,modifier:c}),n[c]=!0,o(l,c,"in","out")):(Object.hasOwnProperty.call(n,c)?this.raise(x.DuplicateModifier,{at:l,modifier:c}):(o(l,c,"static","readonly"),o(l,c,"static","override"),o(l,c,"override","readonly"),o(l,c,"abstract","override"),h(l,c,"declare","override"),h(l,c,"static","abstract")),n[c]=!0),s!=null&&s.includes(c)&&this.raise(r,{at:l,modifier:c})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){let i=[];for(;!this.tsIsListTerminator(e);)i.push(s());return i}tsParseDelimitedList(e,s,i){return er(this.tsParseDelimitedListWorker(e,s,!0,i))}tsParseDelimitedListWorker(e,s,i,r){let n=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let h=s();if(h==null)return;if(n.push(h),this.eat(12)){o=this.state.lastTokStart;continue}if(this.tsIsListTerminator(e))break;i&&this.expect(12);return}return r&&(r.value=o),n}tsParseBracketedList(e,s,i,r,n){r||(i?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,s,n);return i?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(x.UnsupportedImportTypeArgument,{at:this.state.startLoc}),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let s=this.parseIdentifier(e);for(;this.eat(16);){let i=this.startNodeAtNode(s);i.left=s,i.right=this.parseIdentifier(e),s=this.finishNode(i,"TSQualifiedName")}return s}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let i={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,i),s.params.length===0&&this.raise(x.EmptyTypeParameters,{at:s}),i.value!==-1&&this.addExtra(s,"trailingComma",i.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){let i=e===19,r="parameters",n="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[r]=this.tsParseBindingListForSignature(),i?s[n]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let s of e){let{type:i}=s;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(x.UnsupportedSignatureParameterKind,{at:s,type:i})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),S(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);let i=e;if(this.match(10)||this.match(47)){s&&this.raise(x.ReadonlyForMethodSignature,{at:e});let r=i;r.kind&&this.match(47)&&this.raise(x.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon();let n="parameters",o="typeAnnotation";if(r.kind==="get")r[n].length>0&&(this.raise(p.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(r[n][0])&&this.raise(x.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if(r.kind==="set"){if(r[n].length!==1)this.raise(p.BadSetterArity,{at:this.state.curPosition()});else{let h=r[n][0];this.isThisParam(h)&&this.raise(x.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),h.type==="Identifier"&&h.optional&&this.raise(x.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),h.type==="RestElement"&&this.raise(x.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}r[o]&&this.raise(x.SetAccesorCannotHaveReturnType,{at:r[o]})}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}else{let r=i;s&&(r.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(i=>{let{type:r}=i;s&&r!=="TSRestType"&&r!=="TSOptionalType"&&!(r==="TSNamedTupleMember"&&i.optional)&&this.raise(x.OptionalTypeBeforeRequired,{at:i}),s||(s=r==="TSNamedTupleMember"&&i.optional||r==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,s=this.eat(21),i,r,n,o,l=M(this.state.type)?this.lookaheadCharCode():null;if(l===58)i=!0,n=!1,r=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(l===63){n=!0;let c=this.state.startLoc,u=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,r=this.createIdentifier(this.startNodeAt(c),u),this.expect(17),this.expect(14),o=this.tsParseType()):(i=!1,o=f,this.expect(17))}else o=this.tsParseType(),n=this.eat(17),i=this.eat(14);if(i){let c;r?(c=this.startNodeAtNode(r),c.optional=n,c.label=r,c.elementType=o,this.eat(17)&&(c.optional=!0,this.raise(x.TupleOptionalAfterType,{at:this.state.lastTokStartLoc}))):(c=this.startNodeAtNode(o),c.optional=n,this.raise(x.InvalidTupleMemberLabel,{at:o}),c.label=o,c.elementType=this.tsParseType()),o=this.finishNode(c,"TSNamedTupleMember")}else if(n){let c=this.startNodeAtNode(o);c.typeAnnotation=o,o=this.finishNode(c,"TSOptionalType")}if(s){let c=this.startNodeAt(e);c.typeAnnotation=o,o=this.finishNode(c,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){let i=this.startNode();return e==="TSConstructorType"&&(i.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),s=this.lookahead();return s.type!==134&&s.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(S(e)||e===88||e===84){let s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":tr(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(x.UnexpectedReadonly,{at:e})}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return gi(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,i){let r=this.startNode(),n=this.eat(i),o=[];do o.push(s());while(this.eat(i));return o.length===1&&!n?o[0]:(r.types=o,this.finishNode(r,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(S(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let s=this.startNode();this.expect(e);let i=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(78)){let h=this.tsParseThisTypeOrThisTypePredicate();return h.type==="TSThisType"?(i.parameterName=h,i.asserts=!0,i.typeAnnotation=null,h=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(h,i),h.asserts=!0),s.typeAnnotation=h,this.finishNode(s,"TSTypeAnnotation")}let n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return r?(i.parameterName=this.parseIdentifier(),i.asserts=r,i.typeAnnotation=null,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);let o=this.tsParseTypeAnnotation(!1);return i.parameterName=n,i.typeAnnotation=o,i.asserts=r,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!S(this.state.type)&&!this.match(78)?!1:(e&&this.raise(p.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){Vt(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedTypeAssertion,{at:this.state.startLoc});let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let s=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let r=this.startNode();return r.expression=this.tsParseEntityName(),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSExpressionWithTypeArguments")});return i.length||this.raise(x.EmptyHeritageClauseType,{at:s,token:e}),i}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),S(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(x.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){let s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),e.body=i}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,i){e.isExport=i||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let r=this.tsParseModuleReference();return e.importKind==="type"&&r.type!=="TSExternalModuleReference"&&this.raise(x.ImportAliasHasImportType,{at:r}),e.moduleReference=r,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let s=this.state.clone(),i=e();return this.state=s,i}tsTryParseAndCatch(e){let s=this.tryParse(i=>e()||i());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){let s=this.state.clone(),i=e();if(i!==void 0&&i!==!1)return i;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,i;return this.isContextual(100)&&(s=74,i="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let r=this.tsParseInterfaceDeclaration(e,{declare:!0});if(r)return r}default:if(S(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,i){switch(s.name){case"declare":{let r=this.tsTryParseDeclare(e);return r&&(r.declare=!0),r}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let r=e;return r.global=!0,r.id=s,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,i)}}tsParseDeclaration(e,s,i,r){switch(s){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||S(this.state.type)))return this.tsParseAbstractDeclaration(e,r);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(S(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&S(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(i)&&S(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let r=this.startNodeAt(e);return r.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(r),r.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),r});if(this.state.maybeInArrowParameters=s,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(x.EmptyTypeArguments,{at:e}):!this.state.inType&&this.curContext()===w.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Ti(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){let i=this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},r);let n=r.accessibility,o=r.override,h=r.readonly;!(e&4)&&(n||h||o)&&this.raise(x.UnexpectedParameterModifier,{at:i});let l=this.parseMaybeDefault();this.parseAssignableListItemTypes(l,e);let c=this.parseMaybeDefault(l.loc.start,l);if(n||h||o){let u=this.startNodeAt(i);return s.length&&(u.decorators=s),n&&(u.accessibility=n),h&&(u.readonly=h),o&&(u.override=o),c.type!=="Identifier"&&c.type!=="AssignmentPattern"&&this.raise(x.UnsupportedParameterPropertyKind,{at:u}),u.parameter=c,this.finishNode(u,"TSParameterProperty")}return s.length&&(l.decorators=s),c}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(x.PatternIsOptional,{at:s})}setArrowFunctionParameters(e,s,i){super.setArrowFunctionParameters(e,s,i),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,i=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let r=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,r):r==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(x.DeclareFunctionHasImplementation,{at:e}),e.declare)?super.parseFunctionBodyAndFinish(e,r,i):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,i))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(x.UnexpectedTypeAnnotation,{at:s.typeAnnotation})})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,i,r){let n=super.parseArrayLike(e,s,i,r);return n.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(e,s,i,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let n=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return r.stop=!0,e;r.optionalChainMember=n=!0,this.next()}if(this.match(47)||this.match(51)){let o,h=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(s);if(f)return f}let l=this.tsParseTypeArgumentsInExpression();if(!l)return;if(n&&!this.match(10)){o=this.state.curPosition();return}if(Me(this.state.type)){let f=super.parseTaggedTemplateExpression(e,s,r);return f.typeParameters=l,f}if(!i&&this.eat(10)){let f=this.startNodeAt(s);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=l,r.optionalChainMember&&(f.optional=n),this.finishCallExpression(f,r.optionalChainMember)}let c=this.state.type;if(c===48||c===52||c!==10&&Xe(c)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(s);return u.expression=e,u.typeParameters=l,this.finishNode(u,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),h)return h.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(x.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),h}return super.parseSubscript(e,s,i,r)}parseNewCallee(e){var s;super.parseNewCallee(e);let{callee:i}=e;i.type==="TSInstantiationExpression"&&!((s=i.extra)!=null&&s.parenthesized)&&(e.typeParameters=i.typeParameters,e.callee=i.expression)}parseExprOp(e,s,i){let r;if(Ne(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){let n=this.startNodeAt(s);return n.expression=e,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(r&&this.raise(p.UnexpectedKeyword,{at:this.state.startLoc,keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(n,r?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(n,s,i)}return super.parseExprOp(e,s,i)}checkReservedWord(e,s,i,r){this.state.isAmbientContext||super.checkReservedWord(e,s,i,r)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(x.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,i,r){super.applyImportPhase(e,s,i,r),s?e.exportKind=i==="type"?"type":"value":e.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(S(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let i=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,i);s=super.parseImportSpecifiersAndAfter(e,i)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(x.TypeImportCannotSpecifyDefaultAndNamed,{at:s}),s}parseExport(e,s){if(this.match(83)){this.next();let i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,i,!0)}else if(this.eat(29)){let i=e;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=e;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,i=!1){let{isAmbientContext:r}=this.state,n=super.parseVarStatement(e,s,i||r);if(!r)return n;for(let{id:o,init:h}of n.declarations)h&&(s!=="const"||o.typeAnnotation?this.raise(x.InitializerNotAllowedInAmbientContext,{at:h}):ar(h,this.hasPlugin("estree"))||this.raise(x.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:h}));return n}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(i=>qt(i)?e.accessibility===i:!!e[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,i){let r=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:r,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:x.InvalidModifierOnTypeParameterPositions},s);let n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,r)&&this.raise(x.StaticBlockCannotHaveModifier,{at:this.state.curPosition()}),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,i,!!s.static)};s.declare?this.tsInAmbientContext(n):n()}parseClassMemberWithIsStatic(e,s,i,r){let n=this.tsTryParseIndexSignature(s);if(n){e.body.push(n),s.abstract&&this.raise(x.IndexSignatureHasAbstract,{at:s}),s.accessibility&&this.raise(x.IndexSignatureHasAccessibility,{at:s,modifier:s.accessibility}),s.declare&&this.raise(x.IndexSignatureHasDeclare,{at:s}),s.override&&this.raise(x.IndexSignatureHasOverride,{at:s});return}!this.state.inAbstractClass&&s.abstract&&this.raise(x.NonAbstractClassHasAbstractMethod,{at:s}),s.override&&(i.hadSuperClass||this.raise(x.OverrideNotInSubClass,{at:s})),super.parseClassMemberWithIsStatic(e,s,i,r)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(x.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(x.ClassMethodHasDeclare,{at:e})}parseExpressionStatement(e,s,i){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,i):void 0)||super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,i);let r=this.tryParse(()=>super.parseConditional(e,s));return r.node?(r.error&&(this.state=r.failState),r.node):(r.error&&super.setOptionalParametersError(i,r.error),e)}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let s=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(x.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});let n=S(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?((n.type==="TSInterfaceDeclaration"||n.type==="TSTypeAliasDeclaration"||i)&&(e.exportKind="type"),i&&(this.resetStartLocation(n,s),n.declare=!0),n):null}parseClassId(e,s,i,r){if((!s||i)&&this.isContextual(113))return;super.parseClassId(e,s,i,e.declare?1024:8331);let n=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(x.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){let{key:s}=e;this.raise(x.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(x.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(x.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(x.AccessorCannotBeOptional,{at:e}),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,i,r,n,o){let h=this.tsTryParseTypeParameters(this.tsParseConstModifier);h&&n&&this.raise(x.ConstructorHasTypeParameters,{at:h});let{declare:l=!1,kind:c}=s;l&&(c==="get"||c==="set")&&this.raise(x.DeclareAccessor,{at:s,kind:c}),h&&(s.typeParameters=h),super.pushClassMethod(e,s,i,r,n,o)}pushClassPrivateMethod(e,s,i,r){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(s.typeParameters=n),super.pushClassPrivateMethod(e,s,i,r)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,i,r,n,o,h){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);return l&&(e.typeParameters=l),super.parseObjPropValue(e,s,i,r,n,o,h)}parseFunctionParams(e,s){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(e.typeParameters=i),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(e.id.typeAnnotation=i,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var i,r,n,o,h;let l,c,u;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(l=this.state.clone(),c=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!c.error)return c.node;let{context:y}=this.state,I=y[y.length-1];(I===w.j_oTag||I===w.j_expr)&&y.pop()}if(!((i=c)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!l||l===this.state)&&(l=this.state.clone());let f,d=this.tryParse(y=>{var I,C;f=this.tsParseTypeParameters(this.tsParseConstModifier);let E=super.parseMaybeAssign(e,s);return(E.type!=="ArrowFunctionExpression"||(I=E.extra)!=null&&I.parenthesized)&&y(),((C=f)==null?void 0:C.params.length)!==0&&this.resetStartLocationFromNode(E,f),E.typeParameters=f,E},l);if(!d.error&&!d.aborted)return f&&this.reportReservedArrowTypeParam(f),d.node;if(!c&&(Vt(!this.hasPlugin("jsx")),u=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!u.error))return u.node;if((r=c)!=null&&r.node)return this.state=c.failState,c.node;if(d.node)return this.state=d.failState,f&&this.reportReservedArrowTypeParam(f),d.node;if((n=u)!=null&&n.node)return this.state=u.failState,u.node;throw((o=c)==null?void 0:o.error)||d.error||((h=u)==null?void 0:h.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedArrowTypeParam,{at:e})}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(i=>{let r=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),r});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,s){if(!(s&2))return e;this.eat(17)&&(e.optional=!0);let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(x.UnexpectedTypeCastInParameter,{at:e}):this.raise(x.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,i){return Zi({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(i!==64||!s)&&["expression",!0],TSSatisfiesExpression:(i!==64||!s)&&["expression",!0],TSTypeAssertion:(i!==64||!s)&&["expression",!0]},e)||super.isValidLVal(e,s,i)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(e);return i.typeParameters=s,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startthis.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let s=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?s+1:s}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){let s=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=s}}parseClass(e,s,i){let r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,i)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(x.NonClassMethodPropertyHasAbstractModifer,{at:e}),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,i,r,n,o,h){let l=super.parseMethod(e,s,i,r,n,o,h);if(l.abstract&&(this.hasPlugin("estree")?!!l.value.body:!!l.body)){let{key:u}=l;this.raise(x.AbstractMethodHasImplementation,{at:l,methodName:u.type==="Identifier"&&!l.computed?u.name:`[${this.input.slice(u.start,u.end)}]`})}return l}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,i,r){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!1,i),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,i,r))}parseImportSpecifier(e,s,i,r,n){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!0,i),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,i,r,i?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,i){let r=s?"imported":"local",n=s?"local":"exported",o=e[r],h,l=!1,c=!0,u=o.loc.start;if(this.isContextual(93)){let d=this.parseIdentifier();if(this.isContextual(93)){let y=this.parseIdentifier();M(this.state.type)?(l=!0,o=d,h=s?this.parseIdentifier():this.parseModuleExportName(),c=!1):(h=y,c=!1)}else M(this.state.type)?(c=!1,h=s?this.parseIdentifier():this.parseModuleExportName()):(l=!0,o=d)}else M(this.state.type)&&(l=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());l&&i&&this.raise(s?x.TypeModifierIsUsedInTypeImports:x.TypeModifierIsUsedInTypeExports,{at:u}),e[r]=o,e[n]=h;let f=s?"importKind":"exportKind";e[f]=l?"type":"value",c&&this.eatContextual(93)&&(e[n]=s?this.parseIdentifier():this.parseModuleExportName()),e[n]||(e[n]=V(e[r])),s&&this.checkIdentifier(e[n],l?4098:4096)}};function rr(a){if(a.type!=="MemberExpression")return!1;let{computed:t,property:e}=a;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:ls(a.object)}function ar(a,t){var e;let{type:s}=a;if((e=a.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){let{value:i}=a;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(hs(a,t)||nr(a,t)||s==="TemplateLiteral"&&a.expressions.length===0||rr(a))}function hs(a,t){return t?a.type==="Literal"&&(typeof a.value=="number"||"bigint"in a):a.type==="NumericLiteral"||a.type==="BigIntLiteral"}function nr(a,t){if(a.type==="UnaryExpression"){let{operator:e,argument:s}=a;if(e==="-"&&hs(s,t))return!0}return!1}function ls(a){return a.type==="Identifier"?!0:a.type!=="MemberExpression"||a.computed?!1:ls(a.object)}var zt=$`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),or=a=>class extends a{parsePlaceholder(e){if(this.match(144)){let s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let i=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=s,i?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,i,r){e!==void 0&&super.checkReservedWord(e,s,i,r)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,i){return e==="Placeholder"||super.isValidLVal(e,s,i)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var i;if(s.type!=="Placeholder"||(i=s.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){let r=e;return r.label=this.finishPlaceholder(s,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}return this.semicolon(),e.name=s.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,s,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,i)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,i){let r=s?"ClassDeclaration":"ClassExpression";this.next();let n=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(i||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,r);throw this.raise(zt.ClassNameIsRequired,{at:this.state.startLoc})}else this.parseClassId(e,s,i);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,n),this.finishNode(e,r)}parseExport(e,s){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(e,s);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let r=this.startNode();return r.exported=i,e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],super.parseExport(e,s)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(H(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var i;return(i=e.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){let{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(i=>i.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let i=this.startNodeAtNode(s);return i.local=s,e.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(zt.UnexpectedSpace,{at:this.state.lastTokEndLoc})}},hr=a=>class extends a{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,s=this.startNode();if(this.next(),S(this.state.type)){let i=this.parseIdentifierName(),r=this.createIdentifier(s,i);if(r.type="V8IntrinsicIdentifier",this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function N(a,t){let[e,s]=typeof t=="string"?[t,{}]:t,i=Object.keys(s),r=i.length===0;return a.some(n=>{if(typeof n=="string")return r&&n===e;{let[o,h]=n;if(o!==e)return!1;for(let l of i)if(h[l]!==s[l])return!1;return!0}})}function K(a,t,e){let s=a.find(i=>Array.isArray(i)?i[0]===t:i===t);return s&&Array.isArray(s)&&s.length>1?s[1][e]:null}var Kt=["minimal","fsharp","hack","smart"],Ht=["^^","@@","^","%","#"],Wt=["hash","bar"];function lr(a){if(N(a,"decorators")){if(N(a,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=K(a,"decorators","decoratorsBeforeExport");if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let e=K(a,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(N(a,"flow")&&N(a,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(N(a,"placeholders")&&N(a,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(N(a,"pipelineOperator")){let t=K(a,"pipelineOperator","proposal");if(!Kt.includes(t)){let s=Kt.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}let e=N(a,["recordAndTuple",{syntaxType:"hash"}]);if(t==="hack"){if(N(a,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(N(a,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=K(a,"pipelineOperator","topicToken");if(!Ht.includes(s)){let i=Ht.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(s==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(t==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(N(a,"moduleAttributes")){if(N(a,"importAssertions")||N(a,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(K(a,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(N(a,"importAssertions")&&N(a,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(N(a,"recordAndTuple")&&K(a,"recordAndTuple","syntaxType")!=null&&!Wt.includes(K(a,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Wt.map(t=>`'${t}'`).join(", "));if(N(a,"asyncDoExpressions")&&!N(a,"doExpressions")){let t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(N(a,"optionalChainingAssign")&&K(a,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var cs={estree:li,jsx:Yi,flow:Gi,typescript:ir,v8intrinsic:hr,placeholders:or},cr=Object.keys(cs),He={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function pr(a){if(a==null)return Object.assign({},He);if(a.annexB!=null&&a.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let s of Object.keys(He)){var e;t[s]=(e=a[s])!=null?e:He[s]}return t}var ft=class extends ut{checkProto(t,e,s,i){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let r=t.key;if((r.type==="Identifier"?r.name:r.value)==="__proto__"){if(e){this.raise(p.RecordNoProto,{at:r});return}s.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=r.loc.start):this.raise(p.DuplicateProto,{at:r})),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.state.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){let e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){let i=this.startNodeAt(e);for(i.expressions=[s];this.eat(12);)i.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){let s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let i;t?i=!1:(t=new ee,i=!0);let{type:r}=this.state;(r===10||S(r))&&(this.state.potentialArrowAt=this.state.start);let n=this.parseMaybeConditional(t);if(e&&(n=e.call(this,n,s)),di(this.state.type)){let o=this.startNodeAt(s),h=this.state.value;if(o.operator=h,this.match(29)){this.toAssignable(n,!0),o.left=n;let l=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=l&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=l&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=l&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=n;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(n,{in:this.finishNode(o,"AssignmentExpression")}),o}else i&&this.checkExpressionErrors(t,!0);return n}parseMaybeConditional(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprOps(t);return this.shouldExitDescending(i,s)?i:this.parseConditional(i,e,t)}parseConditional(t,e,s){if(this.eat(17)){let i=this.startNodeAt(e);return i.test=t,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){let r=this.getPrivateNameSV(t);(s>=Ne(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(p.PrivateInExpectedIn,{at:t,identifierName:r}),this.classScope.usePrivateName(r,t.loc.start)}let i=this.state.type;if(yi(i)&&(this.prodParam.hasIn||!this.match(58))){let r=Ne(i);if(r>s){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}let n=this.startNodeAt(e);n.left=t,n.operator=this.state.value;let o=i===41||i===42,h=i===40;if(h&&(r=Ne(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(p.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});n.right=this.parseExprOpRightExpr(i,r);let l=this.finishNode(n,o||h?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(h&&(c===41||c===42)||o&&c===40)throw this.raise(p.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(l,e,s)}}return t}parseExprOpRightExpr(t,e){let s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(p.PipeBodyIsTighter,{at:this.state.startLoc});return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){let s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,bi(t)?e-1:e)}parseHackPipeBody(){var t;let{startLoc:e}=this.state,s=this.parseMaybeAssign();return ii.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(p.PipeUnparenthesizedBody,{at:e,type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipeTopicUnused,{at:e}),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(p.UnexpectedTokenUnaryExponentiation,{at:t.argument})}parseMaybeUnary(t,e){let s=this.state.startLoc,i=this.isContextual(96);if(i&&this.isAwaitAllowed()){this.next();let h=this.parseAwait(s);return e||this.checkExponentialAfterUnary(h),h}let r=this.match(34),n=this.startNode();if(Pi(this.state.type)){n.operator=this.state.value,n.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let h=this.match(89);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&h){let l=n.argument;l.type==="Identifier"?this.raise(p.StrictDelete,{at:n}):this.hasPropertyAsPrivateName(l)&&this.raise(p.DeletePrivateField,{at:n})}if(!r)return e||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}let o=this.parseUpdate(n,r,t);if(i){let{type:h}=this.state;if((this.hasPlugin("v8intrinsic")?Xe(h):Xe(h)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(p.AwaitNotInAsyncContext,{at:s}),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){let n=t;return this.checkLVal(n.argument,{in:this.finishNode(n,"UpdateExpression")}),t}let i=this.state.startLoc,r=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return r;for(;xi(this.state.type)&&!this.canInsertSemicolon();){let n=this.startNodeAt(i);n.operator=this.state.value,n.prefix=!1,n.argument=r,this.next(),this.checkLVal(r,{in:r=this.finishNode(n,"UpdateExpression")})}return r}parseExprSubscripts(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(t);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,e)}parseSubscripts(t,e,s){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,i),i.maybeAsyncArrow=!1;while(!i.stop);return t}parseSubscript(t,e,s,i){let{type:r}=this.state;if(!s&&r===15)return this.parseBind(t,e,s,i);if(Me(r))return this.parseTaggedTemplateExpression(t,e,i);let n=!1;if(r===18){if(s&&(this.raise(p.OptionalChainingNoNew,{at:this.state.startLoc}),this.lookaheadCharCode()===40))return i.stop=!0,t;i.optionalChainMember=n=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,i,n);{let o=this.eat(0);return o||n||this.eat(16)?this.parseMember(t,e,i,o,n):(i.stop=!0,t)}}parseMember(t,e,s,i,r){let n=this.startNodeAt(e);return n.object=t,n.computed=i,i?(n.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(p.SuperPrivateField,{at:e}),this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),s.optionalChainMember?(n.optional=r,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(t,e,s,i){let r=this.startNodeAt(e);return r.object=t,this.next(),r.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,i){let r=this.state.maybeInArrowParameters,n=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=t;let{maybeAsyncArrow:h,optionalChainMember:l}=s;h&&(this.expressionScope.enter(Vi()),n=new ee),l&&(o.optional=i),i?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,n);let c=this.finishCallExpression(o,l);return h&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),c)):(h&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(c)),this.state.maybeInArrowParameters=r,c}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){let i=this.startNodeAt(e);return i.tag=t,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(p.OptionalChainingNoTemplate,{at:e}),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),t.arguments.length===0||t.arguments.length>2)this.raise(p.ImportCallArity,{at:t,maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let s of t.arguments)s.type==="SpreadElement"&&this.raise(p.ImportCallSpreadArgument,{at:s});return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,i,r){let n=[],o=!0,h=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(p.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),i&&this.addTrailingCommaExtraToNode(i),this.next();break}n.push(this.parseExprListItem(!1,r,s))}return this.state.inFSharpPipelineDirectBody=h,n}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&Pe(t,e.innerComments),e.callee.trailingComments&&Pe(t,e.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(p.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let r=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(r)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let r=e.callee=this.parseNoCallExpr();if(r.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(p.UnsupportedBind,{at:r})}case 138:return this.raise(p.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.parseTopicReference(r);this.unexpected();break}case 47:{let r=this.input.codePointAt(this.nextTokenStart());j(r)||r===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(S(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let r=this.state.potentialArrowAt===this.state.start,n=this.state.containsEsc,o=this.parseIdentifier();if(!n&&o.name==="async"&&!this.canInsertSemicolon()){let{type:h}=this.state;if(h===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(S(h))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(h===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return r&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=L(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){let e=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(e,s,t,i)}finishTopicReference(t,e,s,i){if(this.testTopicReferenceConfiguration(s,e,i)){let r=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?p.PrimaryTopicNotAllowed:p.PipeTopicUnbound,{at:e}),this.registerTopicReference(),this.finishNode(t,r)}else throw this.raise(p.PipeTopicUnconfiguredToken,{at:e,token:H(i)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:H(s)}]);case"smart":return s===27;default:throw this.raise(p.PipeTopicRequiresHackPipes,{at:e})}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(ve(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(p.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();let s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(p.SuperNotAllowed,{at:t}):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(p.UnexpectedSuper,{at:t}),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(p.UnsupportedSuper,{at:t}),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),e=this.startNodeAt(L(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;let i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(p.UnsupportedMetaProperty,{at:t.property,target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(p.ImportMetaOutsideModule,{at:e}),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(p.DynamicImportPhaseRequiresImportExpressions,{at:this.state.startLoc,phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){let s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let e=this.parseLiteral(t.value,"RegExpLiteral");return e.pattern=t.pattern,e.flags=t.flags,e}parseBooleanLiteral(t){let e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let e=this.state.startLoc,s;this.next(),this.expressionScope.enter($i());let i=this.state.maybeInArrowParameters,r=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let n=this.state.startLoc,o=[],h=new ee,l=!0,c,u;for(;!this.match(11);){if(l)l=!1;else if(this.expect(12,h.optionalParametersLoc===null?null:h.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let y=this.state.startLoc;if(c=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),y)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(h,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=r;let d=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(h),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,o,!1),d):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),c&&this.unexpected(c),this.checkExpressionErrors(h,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(n),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,f)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;let s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(p.UnexpectedNewTarget,{at:s}),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(p.ImportCallNotNewExpression,{at:s})}parseTemplateElement(t){let{start:e,startLoc:s,end:i,value:r}=this.state,n=e+1,o=this.startNodeAt(L(s,1));r===null&&(t||this.raise(p.InvalidEscapeSequenceTemplate,{at:L(this.state.firstInvalidTemplateEscapePos,1)}));let h=this.match(24),l=h?-1:-2,c=i+l;o.value={raw:this.input.slice(n,c).replace(/\r\n?/g,` -`),cooked:r===null?null:r.slice(1,l)},o.tail=h,this.next();let u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,L(this.state.lastTokEndLoc,l)),u}parseTemplate(t){let e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=Object.create(null),o=!0,h=this.startNode();for(h.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(h);break}let c;e?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),this.checkProto(c,s,n,i)),s&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,{at:c}),c.shorthand&&this.addExtra(c,"shorthand",!0),h.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=r;let l="ObjectExpression";return e?l="ObjectPattern":s&&(l="RecordExpression"),this.finishNode(h,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStart),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(p.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc,l=this.parsePropertyName(s,t);if(!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let c=l.name;c==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(55),this.parsePropertyName(s)),(c==="get"||c==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(l),s.kind=c,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,{at:this.state.curPosition(),kind:c}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t);i.length!==s&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,{at:t}),t.kind==="set"&&((e=i[i.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(p.BadSetterRestParameter,{at:t})}parseObjectMethod(t,e,s,i,r){if(r){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,V(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(p.InvalidCoverInitializedName,{at:r}),t.value=this.parseMaybeDefault(e,V(t.key))}else t.value=V(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,i,r,n,o){let h=this.parseObjectMethod(t,s,i,r,n)||this.parseObjectProperty(t,e,r,o);return h||this.unexpected(),h}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,r;if(M(s))r=this.parseIdentifier(!0);else switch(s){case 134:r=this.parseNumericLiteral(i);break;case 133:r=this.parseStringLiteral(i);break;case 135:r=this.parseBigIntLiteral(i);break;case 136:r=this.parseDecimalLiteral(i);break;case 138:{let n=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=n):this.raise(p.UnexpectedPrivateField,{at:n}),r=this.parsePrivateName();break}default:this.unexpected()}t.key=r,s!==138&&(t.computed=!1)}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,r,n,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(r?32:0)),this.prodParam.enter(ve(s,t.generator)),this.parseFunctionParams(t,i);let h=this.parseFunctionBodyAndFinish(t,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=this.startNode();return this.next(),n.elements=this.parseExprList(t,!s,i,n),this.state.inFSharpPipelineDirectBody=r,this.finishNode(n,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,i){this.scope.enter(6);let r=ve(s,!1);!this.match(5)&&this.prodParam.hasIn&&(r|=8),this.prodParam.enter(r),this.initFunction(t,s);let n=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=n,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){let i=e&&!this.match(5);if(this.expressionScope.enter(ns()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{let r=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{let h=!this.isSimpleParamList(t.params);o&&h&&this.raise(p.IllegalLanguageModeDirective,{at:(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t});let l=!r&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!h,e,l),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,l)}),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e10||!Li(t))return;if(s&&Ni(t)){this.raise(p.UnexpectedKeyword,{at:e,keyword:t});return}if((this.state.strict?i?ts:Zt:Qt)(t,this.inModule)){this.raise(p.UnexpectedReservedWord,{at:e,reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(p.YieldBindingIdentifier,{at:e});return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(p.AwaitBindingIdentifier,{at:e});return}if(this.scope.inStaticBlock){this.raise(p.AwaitBindingIdentifierInStaticBlock,{at:e});return}this.expressionScope.recordAsyncArrowParametersError({at:e})}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(p.ArgumentsInClass,{at:e});return}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(t){let e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(p.AwaitExpressionFormalParameter,{at:e}),this.eat(55)&&this.raise(p.ObsoleteAwaitStar,{at:e}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||Me(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(p.YieldInParameter,{at:t}),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(p.PipelineHeadSequenceExpression,{at:e})}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){let s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{let s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(p.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipelineTopicUnused,{at:t})}withTopicBindingContext(t){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}},We={kind:"loop"},ur={kind:"switch"},fr=/[\uD800-\uDFFF]/u,Je=/in(?:stanceof)?/y;function dr(a,t){for(let e=0;e0)for(let[r,n]of Array.from(this.scope.undefinedExports))this.raise(p.ModuleExportUndefined,{at:n,localName:r});let i;return e===139?i=this.finishNode(t,"Program"):i=this.finishNodeAt(t,"Program",L(this.state.startLoc,-1)),i}stmtToDirective(t){let e=t;e.type="Directive",e.value=e.expression,delete e.expression;let s=e.value,i=s.value,r=this.input.slice(s.start,s.end),n=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",n),this.addExtra(s,"expressionValue",i),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(j(t)){if(Je.lastIndex=e,Je.test(this.input)){let s=this.codePointAtPos(Je.lastIndex);if(!Z(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifier(){let t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){let{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(S(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type,i=this.startNode(),r=!!(t&2),n=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return n||this.raise(this.state.strict?p.StrictFunction:this.options.annexB?p.SloppyFunctionAnnexB:p.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(i,!1,!r&&n);case 80:return r||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?r||this.raise(p.UnexpectedLexicalDeclaration,{at:i}):this.raise(p.AwaitUsingNotInAsyncContext,{at:i}),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(p.UnexpectedUsingDeclaration,{at:this.state.startLoc}):r||this.raise(p.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let c=this.nextTokenStart(),u=this.codePointAtPos(c);if(u!==91&&(!r&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(u,c)&&u!==123))break}case 75:r||this.raise(p.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let c=this.state.value;return this.parseVarStatement(i,c)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let c=this.lookaheadCharCode();if(c===40||c===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(p.UnexpectedImportExport,{at:this.state.startLoc}),this.next();let c;return s===83?(c=this.parseImport(i),c.type==="ImportDeclaration"&&(!c.importKind||c.importKind==="value")&&(this.sawUnambiguousESM=!0)):(c=this.parseExport(i,e),(c.type==="ExportNamedDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportAllDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(c),c}default:if(this.isAsyncFunction())return r||this.raise(p.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(i,!0,!r&&n)}let h=this.state.value,l=this.parseExpression();return S(s)&&l.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,h,l,t):this.parseExpressionStatement(i,l,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(p.ImportOutsideModule,{at:t})}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(p.DecoratorsBeforeAfterExport,{at:e.decorators[0]}),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(p.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(p.UnexpectedLeadingDecorator,{at:this.state.startLoc});return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,s;if(this.match(10)){let i=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(i,s);let r=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(p.DecoratorArgumentsOutsideParentheses,{at:r})}else{for(s=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(e);i.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,s=this.finishNode(i,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){let e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;sthis.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(We);let e=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(e=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);let s=this.isContextual(100);{let h=this.isContextual(96)&&this.startsAwaitUsing(),l=h||this.isContextual(107)&&this.startsUsingForOf(),c=s&&this.hasFollowingBindingAtom()||l;if(this.match(74)||this.match(75)||c){let u=this.startNode(),f;h?(f="await using",this.isAwaitAllowed()||this.raise(p.AwaitUsingNotInAsyncContext,{at:this.state.startLoc}),this.next()):f=this.state.value,this.next(),this.parseVar(u,!0,f);let d=this.finishNode(u,"VariableDeclaration"),y=this.match(58);return y&&l&&this.raise(p.ForInUsing,{at:d}),(y||this.isContextual(102))&&d.declarations.length===1?this.parseForIn(t,d,e):(e!==null&&this.unexpected(e),this.parseFor(t,d))}}let i=this.isContextual(95),r=new ee,n=this.parseExpression(!0,r),o=this.isContextual(102);if(o&&(s&&this.raise(p.ForOfLet,{at:n}),e===null&&i&&n.type==="Identifier"&&this.raise(p.ForOfAsync,{at:n})),o||this.match(58)){this.checkDestructuringPrivate(r),this.toAssignable(n,!0);let h=o?"ForOfStatement":"ForInStatement";return this.checkLVal(n,{in:{type:h}}),this.parseForIn(t,n,e)}else this.checkExpressionErrors(r,!0);return e!==null&&this.unexpected(e),this.parseFor(t,n)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(p.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let e=t.cases=[];this.expect(5),this.state.labels.push(ur),this.scope.enter(0);let s;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let r=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),r?s.test=this.parseExpression():(i&&this.raise(p.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),i=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(p.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{in:{type:"CatchClause"},binding:9}),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(p.NoCatchOrFinally,{at:t}),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(We),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(p.StrictWith,{at:this.state.startLoc}),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,i){for(let n of this.state.labels)n.name===e&&this.raise(p.LabelRedeclaration,{at:s,labelName:e});let r=mi(this.state.type)?"loop":this.match(71)?"switch":null;for(let n=this.state.labels.length-1;n>=0;n--){let o=this.state.labels[n];if(o.statementStart===t.start)o.statementStart=this.state.start,o.kind=r;else break}return this.state.labels.push({name:e,kind:r,statementStart:this.state.start}),t.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){let i=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(i,t,!1,8,s),e&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,i,r){let n=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(n,e?o:void 0,s,i,r)}parseBlockOrModuleBlockBody(t,e,s,i,r){let n=this.state.strict,o=!1,h=!1;for(;!this.match(i);){let l=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!h){if(this.isValidDirective(l)){let c=this.stmtToDirective(l);e.push(c),!o&&c.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}h=!0,this.state.strictErrors.clear()}t.push(l)}r==null||r.call(this,o),n||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){let i=this.match(58);return this.next(),i?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(p.ForInOfLoopInitializer,{at:e,type:i?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(p.InvalidLhs,{at:e,ancestor:{type:"ForStatement"}}),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,i=!1){let r=t.declarations=[];for(t.kind=s;;){let n=this.startNode();if(this.parseVarId(n,s),n.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,n.init===null&&!i&&(n.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(p.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"}):s==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(p.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"})),r.push(this.finishNode(n,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){let s=this.parseBindingAtom();this.checkLVal(s,{in:{type:"VariableDeclarator"},binding:e==="var"?5:8201}),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){let s=e&2,i=!!(e&1),r=i&&!(e&4),n=!!(e&8);this.initFunction(t,n),this.match(55)&&(s&&this.raise(p.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),t.generator=!0),i&&(t.id=this.parseFunctionId(r));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ve(n,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||S(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(ji()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(t){return!t.computed&&!t.static&&(t.key.name==="constructor"||t.key.value==="constructor")}parseClassBody(t,e){this.classScope.enter();let s={hadConstructor:!1,hadSuperClass:t},i=[],r=this.startNode();if(r.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(p.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){i.push(this.parseDecorator());continue}let n=this.startNode();i.length&&(n.decorators=i,this.resetStartLocationFromNode(n,i[0]),i=[]),this.parseClassMember(r,n,s),n.kind==="constructor"&&n.decorators&&n.decorators.length>0&&this.raise(p.DecoratorConstructor,{at:n})}}),this.state.strict=e,this.next(),i.length)throw this.raise(p.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(r,"ClassBody")}parseClassMemberFromModifier(t,e){let s=this.parseIdentifier(!0);if(this.isClassMethod()){let i=e;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=e;return i.computed=!1,i.key=s,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,i)}parseClassMemberWithIsStatic(t,e,s,i){let r=e,n=e,o=e,h=e,l=e,c=r,u=r;if(e.static=i,this.parsePropertyNamePrefixOperator(e),this.eat(55)){c.kind="method";let C=this.match(138);if(this.parseClassElementName(c),C){this.pushClassPrivateMethod(t,n,!0,!1);return}this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsGenerator,{at:r.key}),this.pushClassMethod(t,r,!0,!1,!1,!1);return}let f=S(this.state.type)&&!this.state.containsEsc,d=this.match(138),y=this.parseClassElementName(e),I=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(c.kind="method",d){this.pushClassPrivateMethod(t,n,!1,!1);return}let C=this.isNonstaticConstructor(r),E=!1;C&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(p.DuplicateConstructor,{at:y}),C&&this.hasPlugin("typescript")&&e.override&&this.raise(p.OverrideOnConstructor,{at:y}),s.hadConstructor=!0,E=s.hadSuperClass),this.pushClassMethod(t,r,!1,!1,C,E)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(t,h):this.pushClassProperty(t,o);else if(f&&y.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(y);let C=this.eat(55);u.optional&&this.unexpected(I),c.kind="method";let E=this.match(138);this.parseClassElementName(c),this.parsePostMemberNameModifiers(u),E?this.pushClassPrivateMethod(t,n,C,!0):(this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsAsync,{at:r.key}),this.pushClassMethod(t,r,C,!0,!1,!1))}else if(f&&(y.name==="get"||y.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(y),c.kind=y.name;let C=this.match(138);this.parseClassElementName(r),C?this.pushClassPrivateMethod(t,n,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsAccessor,{at:r.key}),this.pushClassMethod(t,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r)}else if(f&&y.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(y);let C=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,l,C)}else this.isLineTerminator()?d?this.pushClassPrivateProperty(t,h):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){let{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(p.StaticPrototype,{at:this.state.startLoc}),e===138){s==="constructor"&&this.raise(p.ConstructorClassPrivateField,{at:this.state.startLoc});let i=this.parsePrivateName();return t.key=i,i}return this.parsePropertyName(t)}parseClassStaticBlock(t,e){var s;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let r=e.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(p.DecoratorStaticBlock,{at:e})}pushClassProperty(t,e){!e.computed&&(e.key.name==="constructor"||e.key.value==="constructor")&&this.raise(p.ConstructorClassField,{at:e.key}),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){let s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){if(!s&&!e.computed){let r=e.key;(r.name==="constructor"||r.value==="constructor")&&this.raise(p.ConstructorClassField,{at:r})}let i=this.parseClassAccessorProperty(e);t.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(t,e,s,i,r,n){t.body.push(this.parseMethod(e,s,i,r,n,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,i){let r=this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(r);let n=r.kind==="get"?r.static?6:2:r.kind==="set"?r.static?5:1:0;this.declareClassPrivateMethodInScope(r,n)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(ns()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,i=8331){if(S(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,i);else if(s||!e)t.id=null;else throw this.raise(p.MissingClassName,{at:this.state.startLoc})}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){let s=this.parseMaybeImportPhase(t,!0),i=this.maybeParseExportDefaultSpecifier(t,s),r=!i||this.eat(12),n=r&&this.eatExportStar(t),o=n&&this.maybeParseExportNamespaceSpecifier(t),h=r&&(!o||this.eat(12)),l=i||n;if(n&&!o){if(i&&this.unexpected(),e)throw this.raise(p.UnsupportedDecoratorExport,{at:t});return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let c=this.maybeParseExportNamedSpecifiers(t);i&&r&&!n&&!c&&this.unexpected(null,5),o&&h&&this.unexpected(null,98);let u;if(l||c){if(u=!1,e)throw this.raise(p.UnsupportedDecoratorExport,{at:t});this.parseExportFrom(t,l)}else u=this.maybeParseExportDeclaration(t);if(l||c||u){var f;let d=t;if(this.checkExport(d,!0,!1,!!d.source),((f=d.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(e,d.declaration,d);else if(e)throw this.raise(p.UnsupportedDecoratorExport,{at:t});return this.finishNode(d,"ExportNamedDeclaration")}if(this.eat(65)){let d=t,y=this.parseExportDefaultExpression();if(d.declaration=y,y.type==="ClassDeclaration")this.maybeTakeDecorators(e,y,d);else if(e)throw this.raise(p.UnsupportedDecoratorExport,{at:t});return this.checkExport(d,!0,!0),this.finishNode(d,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0:e.loc.start);let s=e||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,t.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){t.specifiers||(t.specifiers=[]);let e=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){t.specifiers||(t.specifiers=[]);let e=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(e)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(p.UnsupportedDefaultExport,{at:this.state.startLoc});let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(S(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(S(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||S(this.state.type)&&s)return!0;if(this.match(65)&&s){let i=this.input.charCodeAt(this.nextTokenStartSince(e+4));return i===34||i===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,{at:this.state.startLoc}),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,i){if(e){var r;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var n;let o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((n=o.extra)!=null&&n.parenthesized)&&this.raise(p.ExportDefaultFromAsIdentifier,{at:o})}}else if((r=t.specifiers)!=null&&r.length)for(let o of t.specifiers){let{exported:h}=o,l=h.type==="Identifier"?h.name:h.value;if(this.checkDuplicateExports(o,l),!i&&o.local){let{local:c}=o;c.type!=="Identifier"?this.raise(p.ExportBindingIsString,{at:o,localName:c.value,exportName:l}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(t.declaration){if(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"){let o=t.declaration.id;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(t,o.name)}else if(t.declaration.type==="VariableDeclaration")for(let o of t.declaration.declarations)this.checkDeclaration(o.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(let e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(p.DuplicateDefaultExport,{at:t}):this.raise(p.DuplicateExport,{at:t,exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){let e=[],s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),r=this.match(133),n=this.startNode();n.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(n,r,t,i))}return e}parseExportSpecifier(t,e,s,i){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=zi(t.local):t.exported||(t.exported=V(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let t=this.parseStringLiteral(this.state.value),e=t.value.match(fr);return e&&this.raise(p.ModuleExportNameHasLoneSurrogate,{at:t,surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){let{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(p.SourcePhaseImportRequiresDefault,{at:e[0].loc.start});else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(p.DeferImportRequiresNamespace,{at:e[0].loc.start});else if(t.module){var i;s!=="ImportDefaultSpecifier"&&this.raise(p.ImportReflectionNotBinding,{at:e[0].loc.start}),((i=t.assertions)==null?void 0:i.length)>0&&this.raise(p.ImportReflectionHasAssertion,{at:t.specifiers[0].loc.start})}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:e}=t;if(e!=null){let s=e.find(i=>{let r;if(i.type==="ExportSpecifier"?r=i.local:i.type==="ImportSpecifier"&&(r=i.imported),r!==void 0)return r.type==="Identifier"?r.name!=="default":r.value!=="default"});s!==void 0&&this.raise(p.ImportJSONBindingNotDefault,{at:s.loc.start})}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,i){e||(s==="module"?(this.expectPlugin("importReflection",i),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",i),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",i),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;let s=this.parseIdentifier(!0),{type:i}=this.state;return(M(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){let{type:e}=this.state;return S(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),r=i&&this.maybeParseStarImportSpecifier(t);return i&&!r&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{in:{type:e},binding:s}),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);let t=[],e=new Set;do{if(this.match(8))break;let s=this.startNode(),i=this.state.value;if(e.has(i)&&this.raise(p.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:i}),e.add(i),this.match(133)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(p.ModuleAttributeInvalidValue,{at:this.state.startLoc});s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],e=new Set;do{let s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(p.ModuleAttributeDifferentFromType,{at:s.key}),e.has(s.key.name)&&this.raise(p.ModuleAttributesWithDuplicateKeys,{at:s.key,key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(p.ModuleAttributeInvalidValue,{at:this.state.startLoc});s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e,s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(p.ImportAttributesUseAssert,{at:this.state.startLoc}),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){let s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(M(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(p.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let s=this.startNode(),i=this.match(133),r=this.isContextual(130);s.imported=this.parseModuleExportName();let n=this.parseImportSpecifier(s,i,t.importKind==="type"||t.importKind==="typeof",r,void 0);t.specifiers.push(n)}}parseImportSpecifier(t,e,s,i,r){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:n}=t;if(e)throw this.raise(p.ImportBindingIsString,{at:t,importName:n.value});this.checkReservedWord(n.name,t.loc.start,!0,!0),t.local||(t.local=V(n))}return this.finishImportSpecifier(t,"ImportSpecifier",r)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},Fe=class extends dt{constructor(t,e){t=pr(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=mr(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return xe}parse(){this.enterInitialScopes();let t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t}};function mr(a){let t=new Map;for(let e of a){let[s,i]=Array.isArray(e)?e:[e,{}];t.has(s)||t.set(s,i||{})}return t}function yr(a,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let s=fe(t,a),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",fe(t,a).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return t.sourceType="script",fe(t,a).parse()}catch{}throw s}}else return fe(t,a).parse()}function xr(a,t){let e=fe(t,a);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Pr(a){let t={};for(let e of Object.keys(a))t[e]=_(a[e]);return t}var gr=Pr(pi);function fe(a,t){let e=Fe;return a!=null&&a.plugins&&(lr(a.plugins),e=Tr(a.plugins)),new e(a,t)}var Jt={};function Tr(a){let t=cr.filter(i=>N(a,i)),e=t.join("/"),s=Jt[e];if(!s){s=Fe;for(let i of t)s=cs[i](s);Jt[e]=s}return s}ge.parse=yr;ge.parseExpression=xr;ge.tokTypes=gr});var ws=Dt(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.extract=Dr;G.parse=Or;G.parseWithComments=Ss;G.print=Fr;G.strip=Mr;var Ir=/\*\/$/,Nr=/^\/\*\*?/,bs=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,kr=/(^|\s+)\/\/([^\r\n]*)/g,Ps=/^(\r?\n)+/,vr=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,gs=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,Lr=/(\r?\n|^) *\* ?/g,As=[];function Dr(a){let t=a.match(bs);return t?t[0].trimLeft():""}function Mr(a){let t=a.match(bs);return t&&t[0]?a.substring(t[0].length):a}function Or(a){return Ss(a).pragmas}function Ss(a){let t=` -`;a=a.replace(Nr,"").replace(Ir,"").replace(Lr,"$1");let e="";for(;e!==a;)e=a,a=a.replace(vr,`${t}$1 $2${t}`);a=a.replace(Ps,"").trimRight();let s=Object.create(null),i=a.replace(gs,"").replace(Ps,"").trimRight(),r;for(;r=gs.exec(a);){let n=r[2].replace(kr,"");typeof s[r[1]]=="string"||Array.isArray(s[r[1]])?s[r[1]]=As.concat(s[r[1]],n):s[r[1]]=n}return{comments:i,pragmas:s}}function Fr({comments:a="",pragmas:t={}}){let e=` -`,s="/**",i=" *",r=" */",n=Object.keys(t),o=n.flatMap(l=>Ts(l,t[l])).map(l=>`${i} ${l}${e}`).join("");if(!a){if(n.length===0)return"";if(n.length===1&&!Array.isArray(t[n[0]])){let l=t[n[0]];return`${s} ${Ts(n[0],l)[0]}${r}`}}let h=a.split(e).map(l=>`${i} ${l}`).join(e)+e;return s+e+(a?h:"")+(a&&n.length?i+e:"")+o+r}function Ts(a,t){return As.concat(t).map(e=>`@${a} ${e}`.trim())}});var Lt={};Qs(Lt,{parsers:()=>oa});var $e=qe(Ct(),1);function br(a){let t=[];for(let e of a)try{return e()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var ps=br;function Ar(a){if(!a.startsWith("#!"))return"";let t=a.indexOf(` -`);return t===-1?a:a.slice(0,t)}var Be=Ar;function Sr(a,t){if(t===!1)return!1;if(a.charAt(t)==="/"&&a.charAt(t+1)==="*"){for(let e=t+2;e=this.length)throw this.raise(p.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):de(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos1){for(let i=0;i0){if(s&256){let r=!!(s&512),n=(i&4)>0;return r!==n}return!0}return s&128&&(i&8)>0?t.names.get(e)&2?!!(s&1):!1:s&2&&(i&1)>0?!0:super.isRedeclaredInScope(t,e,s)}checkLocalExport(t){let{name:e}=t;if(this.hasImport(e))return;let s=this.scopeStack.length;for(let i=s-1;i>=0;i--){let n=this.scopeStack[i].tsNames.get(e);if((n&1)>0||(n&16)>0)return}super.checkLocalExport(t)}},Gi=(a,t)=>Object.hasOwnProperty.call(a,t)&&a[t],hs=a=>a.type==="ParenthesizedExpression"?hs(a.expression):a,pt=class extends ht{toAssignable(t,e=!1){var s,i;let r;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(r=hs(t),e?r.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(p.InvalidParenthesizedAssignment,t):r.type!=="MemberExpression"&&!this.isOptionalMemberExpression(r)&&this.raise(p.InvalidParenthesizedAssignment,t):this.raise(p.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,h=t.properties.length,l=h-1;oi.type!=="ObjectMethod"&&(r===s||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(let s of t)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){let i=s&1,r=[],n=!0;for(;!this.eat(t);)if(n?n=!1:this.expect(12),i&&this.match(12))r.push(null);else{if(this.eat(t))break;if(this.match(21)){if(r.push(this.parseAssignableListItemTypes(this.parseRestBinding(),s)),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(p.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());r.push(this.parseAssignableListItem(s,o))}}return r}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let t=this.startNode(),{type:e,startLoc:s}=this.state;return e===21?this.parseBindingRestProperty(t):(e===138?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,s,!1,!1,!0,!1))}parseAssignableListItem(t,e){let s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s,t);let i=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),i}parseAssignableListItemTypes(t,e){return t}parseMaybeDefault(t,e){var s,i;if((s=t)!=null||(t=this.state.startLoc),e=(i=e)!=null?i:this.parseBindingAtom(),!this.eat(29))return e;let r=this.startNodeAt(t);return r.left=e,r.right=this.parseMaybeAssignAllowIn(),this.finishNode(r,"AssignmentPattern")}isValidLVal(t,e,s){return Gi({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},t)}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,{in:e,binding:s=64,checkClashes:i=!1,strictModeChanged:r=!1,hasParenthesizedAncestor:n=!1}){var o;let h=t.type;if(this.isObjectMethod(t))return;let l=this.isOptionalMemberExpression(t);if(l||h==="MemberExpression"){l&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(p.InvalidLhsOptionalChaining,t,{ancestor:e})),s!==64&&this.raise(p.InvalidPropertyBindingPattern,t);return}if(h==="Identifier"){this.checkIdentifier(t,s,r);let{name:y}=t;i&&(i.has(y)?this.raise(p.ParamDupe,t):i.add(y));return}let c=this.isValidLVal(h,!(n||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(c===!0)return;if(c===!1){let y=s===64?p.InvalidLhs:p.InvalidLhsBinding;this.raise(y,t,{ancestor:e});return}let[u,f]=Array.isArray(c)?c:[c,h==="ParenthesizedExpression"],d=h==="ArrayPattern"||h==="ObjectPattern"?{type:h}:e;for(let y of[].concat(t[u]))y&&this.checkLVal(y,{in:d,binding:s,checkClashes:i,strictModeChanged:r,hasParenthesizedAncestor:f})}checkIdentifier(t,e,s=!1){this.state.strict&&(s?ss(t.name,this.inModule):ts(t.name))&&(e===64?this.raise(p.StrictEvalArguments,t,{referenceName:t.name}):this.raise(p.StrictEvalArgumentsBinding,t,{bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(p.LetInLexicalBinding,t),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(p.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?p.RestTrailingComma:p.ElementAfterRest,this.state.startLoc),!0):!1}},Yi=(a,t)=>Object.hasOwnProperty.call(a,t)&&a[t];function Qi(a){if(a==null)throw new Error(`Unexpected ${a} value.`);return a}function Vt(a){if(!a)throw new Error("Assert fail")}var x=$`typescript`({AbstractMethodHasImplementation:({methodName:a})=>`Method '${a}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:a})=>`Property '${a}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:a})=>`'declare' is not allowed in ${a}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:a})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:a})=>`Duplicate modifier: '${a}'.`,EmptyHeritageClauseType:({token:a})=>`'${a}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:a})=>`'${a[0]}' modifier cannot be used with '${a[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:a})=>`Index signatures cannot have an accessibility modifier ('${a}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:a})=>`'${a}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:a})=>`'${a}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:a})=>`'${a}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:a})=>`'${a[0]}' modifier must precede '${a[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:a})=>`Private elements cannot have an accessibility modifier ('${a}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:a})=>`Single type parameter ${a} should have a trailing comma. Example usage: <${a},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",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:({type:a})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${a}.`});function Zi(a){switch(a){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}}function qt(a){return a==="private"||a==="public"||a==="protected"}function er(a){return a==="in"||a==="out"}var tr=a=>class extends a{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:x.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter})}getScopeHandler(){return ct}tsIsIdentifier(){return S(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,s){if(!S(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(e.indexOf(i)!==-1){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:i,errorTemplate:r=x.InvalidModifierOnTypeMember},n){let o=(l,c,u,f)=>{c===u&&n[f]&&this.raise(x.InvalidModifiersOrder,l,{orderedModifiers:[u,f]})},h=(l,c,u,f)=>{(n[u]&&c===f||n[f]&&c===u)&&this.raise(x.IncompatibleModifiers,l,{modifiers:[u,f]})};for(;;){let{startLoc:l}=this.state,c=this.tsParseModifier(e.concat(s??[]),i);if(!c)break;qt(c)?n.accessibility?this.raise(x.DuplicateAccessibilityModifier,l,{modifier:c}):(o(l,c,c,"override"),o(l,c,c,"static"),o(l,c,c,"readonly"),n.accessibility=c):er(c)?(n[c]&&this.raise(x.DuplicateModifier,l,{modifier:c}),n[c]=!0,o(l,c,"in","out")):(Object.hasOwnProperty.call(n,c)?this.raise(x.DuplicateModifier,l,{modifier:c}):(o(l,c,"static","readonly"),o(l,c,"static","override"),o(l,c,"override","readonly"),o(l,c,"abstract","override"),h(l,c,"declare","override"),h(l,c,"static","abstract")),n[c]=!0),s!=null&&s.includes(c)&&this.raise(r,l,{modifier:c})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){let i=[];for(;!this.tsIsListTerminator(e);)i.push(s());return i}tsParseDelimitedList(e,s,i){return Qi(this.tsParseDelimitedListWorker(e,s,!0,i))}tsParseDelimitedListWorker(e,s,i,r){let n=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let h=s();if(h==null)return;if(n.push(h),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;i&&this.expect(12);return}return r&&(r.value=o),n}tsParseBracketedList(e,s,i,r,n){r||(i?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,s,n);return i?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(x.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let s=this.parseIdentifier(e);for(;this.eat(16);){let i=this.startNodeAtNode(s);i.left=s,i.right=this.parseIdentifier(e),s=this.finishNode(i,"TSQualifiedName")}return s}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let i={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,i),s.params.length===0&&this.raise(x.EmptyTypeParameters,s),i.value!==-1&&this.addExtra(s,"trailingComma",i.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){let i=e===19,r="parameters",n="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[r]=this.tsParseBindingListForSignature(),i?s[n]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let s of e){let{type:i}=s;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(x.UnsupportedSignatureParameterKind,s,{type:i})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),S(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);let i=e;if(this.match(10)||this.match(47)){s&&this.raise(x.ReadonlyForMethodSignature,e);let r=i;r.kind&&this.match(47)&&this.raise(x.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon();let n="parameters",o="typeAnnotation";if(r.kind==="get")r[n].length>0&&(this.raise(p.BadGetterArity,this.state.curPosition()),this.isThisParam(r[n][0])&&this.raise(x.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(r.kind==="set"){if(r[n].length!==1)this.raise(p.BadSetterArity,this.state.curPosition());else{let h=r[n][0];this.isThisParam(h)&&this.raise(x.AccesorCannotDeclareThisParameter,this.state.curPosition()),h.type==="Identifier"&&h.optional&&this.raise(x.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),h.type==="RestElement"&&this.raise(x.SetAccesorCannotHaveRestParameter,this.state.curPosition())}r[o]&&this.raise(x.SetAccesorCannotHaveReturnType,r[o])}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}else{let r=i;s&&(r.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(i=>{let{type:r}=i;s&&r!=="TSRestType"&&r!=="TSOptionalType"&&!(r==="TSNamedTupleMember"&&i.optional)&&this.raise(x.OptionalTypeBeforeRequired,i),s||(s=r==="TSNamedTupleMember"&&i.optional||r==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,s=this.eat(21),i,r,n,o,l=M(this.state.type)?this.lookaheadCharCode():null;if(l===58)i=!0,n=!1,r=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(l===63){n=!0;let c=this.state.startLoc,u=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,r=this.createIdentifier(this.startNodeAt(c),u),this.expect(17),this.expect(14),o=this.tsParseType()):(i=!1,o=f,this.expect(17))}else o=this.tsParseType(),n=this.eat(17),i=this.eat(14);if(i){let c;r?(c=this.startNodeAtNode(r),c.optional=n,c.label=r,c.elementType=o,this.eat(17)&&(c.optional=!0,this.raise(x.TupleOptionalAfterType,this.state.lastTokStartLoc))):(c=this.startNodeAtNode(o),c.optional=n,this.raise(x.InvalidTupleMemberLabel,o),c.label=o,c.elementType=this.tsParseType()),o=this.finishNode(c,"TSNamedTupleMember")}else if(n){let c=this.startNodeAtNode(o);c.typeAnnotation=o,o=this.finishNode(c,"TSOptionalType")}if(s){let c=this.startNodeAt(e);c.typeAnnotation=o,o=this.finishNode(c,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){let i=this.startNode();return e==="TSConstructorType"&&(i.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),s=this.lookahead();return s.type!==134&&s.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(S(e)||e===88||e===84){let s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":Zi(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(x.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return gi(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,i){let r=this.startNode(),n=this.eat(i),o=[];do o.push(s());while(this.eat(i));return o.length===1&&!n?o[0]:(r.types=o,this.finishNode(r,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(S(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let s=this.startNode();this.expect(e);let i=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(78)){let h=this.tsParseThisTypeOrThisTypePredicate();return h.type==="TSThisType"?(i.parameterName=h,i.asserts=!0,i.typeAnnotation=null,h=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(h,i),h.asserts=!0),s.typeAnnotation=h,this.finishNode(s,"TSTypeAnnotation")}let n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return r?(i.parameterName=this.parseIdentifier(),i.asserts=r,i.typeAnnotation=null,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);let o=this.tsParseTypeAnnotation(!1);return i.parameterName=n,i.typeAnnotation=o,i.asserts=r,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!S(this.state.type)&&!this.match(78)?!1:(e&&this.raise(p.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){Vt(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let s=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let r=this.startNode();return r.expression=this.tsParseEntityName(),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSExpressionWithTypeArguments")});return i.length||this.raise(x.EmptyHeritageClauseType,s,{token:e}),i}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),S(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(x.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){let s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),e.body=i}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,i){e.isExport=i||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let r=this.tsParseModuleReference();return e.importKind==="type"&&r.type!=="TSExternalModuleReference"&&this.raise(x.ImportAliasHasImportType,r),e.moduleReference=r,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let s=this.state.clone(),i=e();return this.state=s,i}tsTryParseAndCatch(e){let s=this.tryParse(i=>e()||i());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){let s=this.state.clone(),i=e();if(i!==void 0&&i!==!1)return i;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,i;return this.isContextual(100)&&(s=74,i="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let r=this.tsParseInterfaceDeclaration(e,{declare:!0});if(r)return r}default:if(S(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,i){switch(s.name){case"declare":{let r=this.tsTryParseDeclare(e);return r&&(r.declare=!0),r}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let r=e;return r.global=!0,r.id=s,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,i)}}tsParseDeclaration(e,s,i,r){switch(s){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||S(this.state.type)))return this.tsParseAbstractDeclaration(e,r);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(S(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&S(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(i)&&S(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let r=this.startNodeAt(e);return r.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(r),r.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),r});if(this.state.maybeInArrowParameters=s,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(x.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===w.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Ti(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){let i=this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},r);let n=r.accessibility,o=r.override,h=r.readonly;!(e&4)&&(n||h||o)&&this.raise(x.UnexpectedParameterModifier,i);let l=this.parseMaybeDefault();this.parseAssignableListItemTypes(l,e);let c=this.parseMaybeDefault(l.loc.start,l);if(n||h||o){let u=this.startNodeAt(i);return s.length&&(u.decorators=s),n&&(u.accessibility=n),h&&(u.readonly=h),o&&(u.override=o),c.type!=="Identifier"&&c.type!=="AssignmentPattern"&&this.raise(x.UnsupportedParameterPropertyKind,u),u.parameter=c,this.finishNode(u,"TSParameterProperty")}return s.length&&(l.decorators=s),c}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(x.PatternIsOptional,s)}setArrowFunctionParameters(e,s,i){super.setArrowFunctionParameters(e,s,i),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,i=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let r=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,r):r==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(x.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,r,i):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,i))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(x.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,i,r){let n=super.parseArrayLike(e,s,i,r);return n.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(e,s,i,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let n=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return r.stop=!0,e;r.optionalChainMember=n=!0,this.next()}if(this.match(47)||this.match(51)){let o,h=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(s);if(f)return f}let l=this.tsParseTypeArgumentsInExpression();if(!l)return;if(n&&!this.match(10)){o=this.state.curPosition();return}if(Le(this.state.type)){let f=super.parseTaggedTemplateExpression(e,s,r);return f.typeParameters=l,f}if(!i&&this.eat(10)){let f=this.startNodeAt(s);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=l,r.optionalChainMember&&(f.optional=n),this.finishCallExpression(f,r.optionalChainMember)}let c=this.state.type;if(c===48||c===52||c!==10&&Je(c)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(s);return u.expression=e,u.typeParameters=l,this.finishNode(u,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),h)return h.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(x.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),h}return super.parseSubscript(e,s,i,r)}parseNewCallee(e){var s;super.parseNewCallee(e);let{callee:i}=e;i.type==="TSInstantiationExpression"&&!((s=i.extra)!=null&&s.parenthesized)&&(e.typeParameters=i.typeParameters,e.callee=i.expression)}parseExprOp(e,s,i){let r;if(Ie(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){let n=this.startNodeAt(s);return n.expression=e,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(r&&this.raise(p.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(n,r?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(n,s,i)}return super.parseExprOp(e,s,i)}checkReservedWord(e,s,i,r){this.state.isAmbientContext||super.checkReservedWord(e,s,i,r)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(x.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,i,r){super.applyImportPhase(e,s,i,r),s?e.exportKind=i==="type"?"type":"value":e.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(S(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let i=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,i);s=super.parseImportSpecifiersAndAfter(e,i)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(x.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(e,s){if(this.match(83)){this.next();let i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,i,!0)}else if(this.eat(29)){let i=e;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=e;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,i=!1){let{isAmbientContext:r}=this.state,n=super.parseVarStatement(e,s,i||r);if(!r)return n;for(let{id:o,init:h}of n.declarations)h&&(s!=="const"||o.typeAnnotation?this.raise(x.InitializerNotAllowedInAmbientContext,h):ir(h,this.hasPlugin("estree"))||this.raise(x.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,h));return n}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(i=>qt(i)?e.accessibility===i:!!e[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,i){let r=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:r,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:x.InvalidModifierOnTypeParameterPositions},s);let n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,r)&&this.raise(x.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,i,!!s.static)};s.declare?this.tsInAmbientContext(n):n()}parseClassMemberWithIsStatic(e,s,i,r){let n=this.tsTryParseIndexSignature(s);if(n){e.body.push(n),s.abstract&&this.raise(x.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(x.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(x.IndexSignatureHasDeclare,s),s.override&&this.raise(x.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(x.NonAbstractClassHasAbstractMethod,s),s.override&&(i.hadSuperClass||this.raise(x.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(e,s,i,r)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(x.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(x.ClassMethodHasDeclare,e)}parseExpressionStatement(e,s,i){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,i):void 0)||super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,i);let r=this.tryParse(()=>super.parseConditional(e,s));return r.node?(r.error&&(this.state=r.failState),r.node):(r.error&&super.setOptionalParametersError(i,r.error),e)}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(s);return i.expression=e,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let s=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(x.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let n=S(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?((n.type==="TSInterfaceDeclaration"||n.type==="TSTypeAliasDeclaration"||i)&&(e.exportKind="type"),i&&(this.resetStartLocation(n,s),n.declare=!0),n):null}parseClassId(e,s,i,r){if((!s||i)&&this.isContextual(113))return;super.parseClassId(e,s,i,e.declare?1024:8331);let n=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(x.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:s}=e;this.raise(x.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(x.PrivateElementHasAbstract,e),e.accessibility&&this.raise(x.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(x.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,i,r,n,o){let h=this.tsTryParseTypeParameters(this.tsParseConstModifier);h&&n&&this.raise(x.ConstructorHasTypeParameters,h);let{declare:l=!1,kind:c}=s;l&&(c==="get"||c==="set")&&this.raise(x.DeclareAccessor,s,{kind:c}),h&&(s.typeParameters=h),super.pushClassMethod(e,s,i,r,n,o)}pushClassPrivateMethod(e,s,i,r){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(s.typeParameters=n),super.pushClassPrivateMethod(e,s,i,r)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,i,r,n,o,h){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);return l&&(e.typeParameters=l),super.parseObjPropValue(e,s,i,r,n,o,h)}parseFunctionParams(e,s){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(e.typeParameters=i),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(e.id.typeAnnotation=i,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var i,r,n,o,h;let l,c,u;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(l=this.state.clone(),c=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!c.error)return c.node;let{context:y}=this.state,I=y[y.length-1];(I===w.j_oTag||I===w.j_expr)&&y.pop()}if(!((i=c)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!l||l===this.state)&&(l=this.state.clone());let f,d=this.tryParse(y=>{var I,C;f=this.tsParseTypeParameters(this.tsParseConstModifier);let E=super.parseMaybeAssign(e,s);return(E.type!=="ArrowFunctionExpression"||(I=E.extra)!=null&&I.parenthesized)&&y(),((C=f)==null?void 0:C.params.length)!==0&&this.resetStartLocationFromNode(E,f),E.typeParameters=f,E},l);if(!d.error&&!d.aborted)return f&&this.reportReservedArrowTypeParam(f),d.node;if(!c&&(Vt(!this.hasPlugin("jsx")),u=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!u.error))return u.node;if((r=c)!=null&&r.node)return this.state=c.failState,c.node;if(d.node)return this.state=d.failState,f&&this.reportReservedArrowTypeParam(f),d.node;if((n=u)!=null&&n.node)return this.state=u.failState,u.node;throw((o=c)==null?void 0:o.error)||d.error||((h=u)==null?void 0:h.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedArrowTypeParam,e)}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(i=>{let r=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),r});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,s){if(!(s&2))return e;this.eat(17)&&(e.optional=!0);let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(x.UnexpectedTypeCastInParameter,e):this.raise(x.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,i){return Yi({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(i!==64||!s)&&["expression",!0],TSSatisfiesExpression:(i!==64||!s)&&["expression",!0],TSTypeAssertion:(i!==64||!s)&&["expression",!0]},e)||super.isValidLVal(e,s,i)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(e);return i.typeParameters=s,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.startthis.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let s=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?s+1:s}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){let s=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=s}}parseClass(e,s,i){let r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,i)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(x.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,i,r,n,o,h){let l=super.parseMethod(e,s,i,r,n,o,h);if(l.abstract&&(this.hasPlugin("estree")?!!l.value.body:!!l.body)){let{key:u}=l;this.raise(x.AbstractMethodHasImplementation,l,{methodName:u.type==="Identifier"&&!l.computed?u.name:`[${this.input.slice(u.start,u.end)}]`})}return l}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,i,r){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!1,i),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,i,r))}parseImportSpecifier(e,s,i,r,n){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!0,i),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,i,r,i?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,i){let r=s?"imported":"local",n=s?"local":"exported",o=e[r],h,l=!1,c=!0,u=o.loc.start;if(this.isContextual(93)){let d=this.parseIdentifier();if(this.isContextual(93)){let y=this.parseIdentifier();M(this.state.type)?(l=!0,o=d,h=s?this.parseIdentifier():this.parseModuleExportName(),c=!1):(h=y,c=!1)}else M(this.state.type)?(c=!1,h=s?this.parseIdentifier():this.parseModuleExportName()):(l=!0,o=d)}else M(this.state.type)&&(l=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());l&&i&&this.raise(s?x.TypeModifierIsUsedInTypeImports:x.TypeModifierIsUsedInTypeExports,u),e[r]=o,e[n]=h;let f=s?"importKind":"exportKind";e[f]=l?"type":"value",c&&this.eatContextual(93)&&(e[n]=s?this.parseIdentifier():this.parseModuleExportName()),e[n]||(e[n]=V(e[r])),s&&this.checkIdentifier(e[n],l?4098:4096)}};function sr(a){if(a.type!=="MemberExpression")return!1;let{computed:t,property:e}=a;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:cs(a.object)}function ir(a,t){var e;let{type:s}=a;if((e=a.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){let{value:i}=a;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(ls(a,t)||rr(a,t)||s==="TemplateLiteral"&&a.expressions.length===0||sr(a))}function ls(a,t){return t?a.type==="Literal"&&(typeof a.value=="number"||"bigint"in a):a.type==="NumericLiteral"||a.type==="BigIntLiteral"}function rr(a,t){if(a.type==="UnaryExpression"){let{operator:e,argument:s}=a;if(e==="-"&&ls(s,t))return!0}return!1}function cs(a){return a.type==="Identifier"?!0:a.type!=="MemberExpression"||a.computed?!1:cs(a.object)}var zt=$`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),ar=a=>class extends a{parsePlaceholder(e){if(this.match(144)){let s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let i=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=s,i?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,i,r){e!==void 0&&super.checkReservedWord(e,s,i,r)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,i){return e==="Placeholder"||super.isValidLVal(e,s,i)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var i;if(s.type!=="Placeholder"||(i=s.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){let r=e;return r.label=this.finishPlaceholder(s,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}return this.semicolon(),e.name=s.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,s,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,i)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,i){let r=s?"ClassDeclaration":"ClassExpression";this.next();let n=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(i||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,r);throw this.raise(zt.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,s,i);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,n),this.finishNode(e,r)}parseExport(e,s){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(e,s);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let r=this.startNode();return r.exported=i,e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],super.parseExport(e,s)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(H(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var i;return(i=e.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){let{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(i=>i.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let i=this.startNodeAtNode(s);return i.local=s,e.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(zt.UnexpectedSpace,this.state.lastTokEndLoc)}},nr=a=>class extends a{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,s=this.startNode();if(this.next(),S(this.state.type)){let i=this.parseIdentifierName(),r=this.createIdentifier(s,i);if(r.type="V8IntrinsicIdentifier",this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function N(a,t){let[e,s]=typeof t=="string"?[t,{}]:t,i=Object.keys(s),r=i.length===0;return a.some(n=>{if(typeof n=="string")return r&&n===e;{let[o,h]=n;if(o!==e)return!1;for(let l of i)if(h[l]!==s[l])return!1;return!0}})}function K(a,t,e){let s=a.find(i=>Array.isArray(i)?i[0]===t:i===t);return s&&Array.isArray(s)&&s.length>1?s[1][e]:null}var Kt=["minimal","fsharp","hack","smart"],Ht=["^^","@@","^","%","#"],Wt=["hash","bar"];function or(a){if(N(a,"decorators")){if(N(a,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=K(a,"decorators","decoratorsBeforeExport");if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let e=K(a,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(N(a,"flow")&&N(a,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(N(a,"placeholders")&&N(a,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(N(a,"pipelineOperator")){let t=K(a,"pipelineOperator","proposal");if(!Kt.includes(t)){let s=Kt.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}let e=N(a,["recordAndTuple",{syntaxType:"hash"}]);if(t==="hack"){if(N(a,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(N(a,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=K(a,"pipelineOperator","topicToken");if(!Ht.includes(s)){let i=Ht.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(s==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(t==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(N(a,"moduleAttributes")){if(N(a,"importAssertions")||N(a,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(K(a,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(N(a,"importAssertions")&&N(a,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(N(a,"recordAndTuple")&&K(a,"recordAndTuple","syntaxType")!=null&&!Wt.includes(K(a,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Wt.map(t=>`'${t}'`).join(", "));if(N(a,"asyncDoExpressions")&&!N(a,"doExpressions")){let t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(N(a,"optionalChainingAssign")&&K(a,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var ps={estree:li,jsx:Xi,flow:Ji,typescript:tr,v8intrinsic:nr,placeholders:ar},hr=Object.keys(ps),Ke={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function lr(a){if(a==null)return Object.assign({},Ke);if(a.annexB!=null&&a.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let s of Object.keys(Ke)){var e;t[s]=(e=a[s])!=null?e:Ke[s]}return t}var ut=class extends pt{checkProto(t,e,s,i){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let r=t.key;if((r.type==="Identifier"?r.name:r.value)==="__proto__"){if(e){this.raise(p.RecordNoProto,r);return}s.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=r.loc.start):this.raise(p.DuplicateProto,r)),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){let e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){let i=this.startNodeAt(e);for(i.expressions=[s];this.eat(12);)i.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){let s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let i;t?i=!1:(t=new ee,i=!0);let{type:r}=this.state;(r===10||S(r))&&(this.state.potentialArrowAt=this.state.start);let n=this.parseMaybeConditional(t);if(e&&(n=e.call(this,n,s)),di(this.state.type)){let o=this.startNodeAt(s),h=this.state.value;if(o.operator=h,this.match(29)){this.toAssignable(n,!0),o.left=n;let l=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=l&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=l&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=l&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=n;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(n,{in:this.finishNode(o,"AssignmentExpression")}),o}else i&&this.checkExpressionErrors(t,!0);return n}parseMaybeConditional(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprOps(t);return this.shouldExitDescending(i,s)?i:this.parseConditional(i,e,t)}parseConditional(t,e,s){if(this.eat(17)){let i=this.startNodeAt(e);return i.test=t,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){let r=this.getPrivateNameSV(t);(s>=Ie(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(p.PrivateInExpectedIn,t,{identifierName:r}),this.classScope.usePrivateName(r,t.loc.start)}let i=this.state.type;if(yi(i)&&(this.prodParam.hasIn||!this.match(58))){let r=Ie(i);if(r>s){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}let n=this.startNodeAt(e);n.left=t,n.operator=this.state.value;let o=i===41||i===42,h=i===40;if(h&&(r=Ie(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(p.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);n.right=this.parseExprOpRightExpr(i,r);let l=this.finishNode(n,o||h?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(h&&(c===41||c===42)||o&&c===40)throw this.raise(p.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(l,e,s)}}return t}parseExprOpRightExpr(t,e){let s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(p.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){let s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,bi(t)?e-1:e)}parseHackPipeBody(){var t;let{startLoc:e}=this.state,s=this.parseMaybeAssign();return ii.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(p.PipeUnparenthesizedBody,e,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipeTopicUnused,e),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(p.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){let s=this.state.startLoc,i=this.isContextual(96);if(i&&this.isAwaitAllowed()){this.next();let h=this.parseAwait(s);return e||this.checkExponentialAfterUnary(h),h}let r=this.match(34),n=this.startNode();if(Pi(this.state.type)){n.operator=this.state.value,n.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let h=this.match(89);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&h){let l=n.argument;l.type==="Identifier"?this.raise(p.StrictDelete,n):this.hasPropertyAsPrivateName(l)&&this.raise(p.DeletePrivateField,n)}if(!r)return e||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}let o=this.parseUpdate(n,r,t);if(i){let{type:h}=this.state;if((this.hasPlugin("v8intrinsic")?Je(h):Je(h)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(p.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){let n=t;return this.checkLVal(n.argument,{in:this.finishNode(n,"UpdateExpression")}),t}let i=this.state.startLoc,r=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return r;for(;xi(this.state.type)&&!this.canInsertSemicolon();){let n=this.startNodeAt(i);n.operator=this.state.value,n.prefix=!1,n.argument=r,this.next(),this.checkLVal(r,{in:r=this.finishNode(n,"UpdateExpression")})}return r}parseExprSubscripts(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(t);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,e)}parseSubscripts(t,e,s){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,i),i.maybeAsyncArrow=!1;while(!i.stop);return t}parseSubscript(t,e,s,i){let{type:r}=this.state;if(!s&&r===15)return this.parseBind(t,e,s,i);if(Le(r))return this.parseTaggedTemplateExpression(t,e,i);let n=!1;if(r===18){if(s&&(this.raise(p.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return i.stop=!0,t;i.optionalChainMember=n=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,i,n);{let o=this.eat(0);return o||n||this.eat(16)?this.parseMember(t,e,i,o,n):(i.stop=!0,t)}}parseMember(t,e,s,i,r){let n=this.startNodeAt(e);return n.object=t,n.computed=i,i?(n.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(p.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),s.optionalChainMember?(n.optional=r,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(t,e,s,i){let r=this.startNodeAt(e);return r.object=t,this.next(),r.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,i){let r=this.state.maybeInArrowParameters,n=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=t;let{maybeAsyncArrow:h,optionalChainMember:l}=s;h&&(this.expressionScope.enter(ji()),n=new ee),l&&(o.optional=i),i?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,n);let c=this.finishCallExpression(o,l);return h&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),c)):(h&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(c)),this.state.maybeInArrowParameters=r,c}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){let i=this.startNodeAt(e);return i.tag=t,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(p.OptionalChainingNoTemplate,e),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),t.arguments.length===0||t.arguments.length>2)this.raise(p.ImportCallArity,t,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let s of t.arguments)s.type==="SpreadElement"&&this.raise(p.ImportCallSpreadArgument,s);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,i,r){let n=[],o=!0,h=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(p.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),i&&this.addTrailingCommaExtraToNode(i),this.next();break}n.push(this.parseExprListItem(!1,r,s))}return this.state.inFSharpPipelineDirectBody=h,n}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&xe(t,e.innerComments),e.callee.trailingComments&&xe(t,e.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(p.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let r=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(r)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let r=e.callee=this.parseNoCallExpr();if(r.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(p.UnsupportedBind,r)}case 138:return this.raise(p.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.parseTopicReference(r);this.unexpected();break}case 47:{let r=this.input.codePointAt(this.nextTokenStart());j(r)||r===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(S(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let r=this.state.potentialArrowAt===this.state.start,n=this.state.containsEsc,o=this.parseIdentifier();if(!n&&o.name==="async"&&!this.canInsertSemicolon()){let{type:h}=this.state;if(h===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(S(h))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(h===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return r&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=L(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){let e=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(e,s,t,i)}finishTopicReference(t,e,s,i){if(this.testTopicReferenceConfiguration(s,e,i)){let r=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?p.PrimaryTopicNotAllowed:p.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,r)}else throw this.raise(p.PipeTopicUnconfiguredToken,e,{token:H(i)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:H(s)}]);case"smart":return s===27;default:throw this.raise(p.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(ke(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(p.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();let s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(p.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(p.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(p.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),e=this.startNodeAt(L(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;let i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(p.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(p.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(p.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){let s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let e=this.parseLiteral(t.value,"RegExpLiteral");return e.pattern=t.pattern,e.flags=t.flags,e}parseBooleanLiteral(t){let e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let e=this.state.startLoc,s;this.next(),this.expressionScope.enter(Ui());let i=this.state.maybeInArrowParameters,r=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let n=this.state.startLoc,o=[],h=new ee,l=!0,c,u;for(;!this.match(11);){if(l)l=!1;else if(this.expect(12,h.optionalParametersLoc===null?null:h.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let y=this.state.startLoc;if(c=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),y)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(h,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=r;let d=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(h),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,o,!1),d):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),c&&this.unexpected(c),this.checkExpressionErrors(h,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(n),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,f)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;let s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(p.UnexpectedNewTarget,s),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(p.ImportCallNotNewExpression,s)}parseTemplateElement(t){let{start:e,startLoc:s,end:i,value:r}=this.state,n=e+1,o=this.startNodeAt(L(s,1));r===null&&(t||this.raise(p.InvalidEscapeSequenceTemplate,L(this.state.firstInvalidTemplateEscapePos,1)));let h=this.match(24),l=h?-1:-2,c=i+l;o.value={raw:this.input.slice(n,c).replace(/\r\n?/g,` +`),cooked:r===null?null:r.slice(1,l)},o.tail=h,this.next();let u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,L(this.state.lastTokEndLoc,l)),u}parseTemplate(t){let e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=Object.create(null),o=!0,h=this.startNode();for(h.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(h);break}let c;e?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(i),this.checkProto(c,s,n,i)),s&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,c),c.shorthand&&this.addExtra(c,"shorthand",!0),h.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=r;let l="ObjectExpression";return e?l="ObjectPattern":s&&(l="RecordExpression"),this.finishNode(h,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(p.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc,l=this.parsePropertyName(s,t);if(!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let c=l.name;c==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(55),this.parsePropertyName(s)),(c==="get"||c==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(l),s.kind=c,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,this.state.curPosition(),{kind:c}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t);i.length!==s&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,t),t.kind==="set"&&((e=i[i.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(p.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,i,r){if(r){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,V(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(p.InvalidCoverInitializedName,r),t.value=this.parseMaybeDefault(e,V(t.key))}else t.value=V(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,i,r,n,o){let h=this.parseObjectMethod(t,s,i,r,n)||this.parseObjectProperty(t,e,r,o);return h||this.unexpected(),h}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,r;if(M(s))r=this.parseIdentifier(!0);else switch(s){case 134:r=this.parseNumericLiteral(i);break;case 133:r=this.parseStringLiteral(i);break;case 135:r=this.parseBigIntLiteral(i);break;case 136:r=this.parseDecimalLiteral(i);break;case 138:{let n=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=n):this.raise(p.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:this.unexpected()}t.key=r,s!==138&&(t.computed=!1)}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,r,n,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(r?32:0)),this.prodParam.enter(ke(s,t.generator)),this.parseFunctionParams(t,i);let h=this.parseFunctionBodyAndFinish(t,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=this.startNode();return this.next(),n.elements=this.parseExprList(t,!s,i,n),this.state.inFSharpPipelineDirectBody=r,this.finishNode(n,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,i){this.scope.enter(6);let r=ke(s,!1);!this.match(5)&&this.prodParam.hasIn&&(r|=8),this.prodParam.enter(r),this.initFunction(t,s);let n=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=n,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){let i=e&&!this.match(5);if(this.expressionScope.enter(os()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{let r=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{let h=!this.isSimpleParamList(t.params);o&&h&&this.raise(p.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let l=!r&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!h,e,l),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,l)}),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e10||!Li(t))return;if(s&&Ni(t)){this.raise(p.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?i?ss:es:Zt)(t,this.inModule)){this.raise(p.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(p.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(p.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(p.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(p.ArgumentsInClass,e);return}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(t){let e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(p.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(p.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||Le(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(p.YieldInParameter,t),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(p.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){let s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{let s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(p.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipelineTopicUnused,t)}withTopicBindingContext(t){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}},He={kind:1},cr={kind:2},pr=/[\uD800-\uDFFF]/u,We=/in(?:stanceof)?/y;function ur(a,t){for(let e=0;e0)for(let[r,n]of Array.from(this.scope.undefinedExports))this.raise(p.ModuleExportUndefined,n,{localName:r});let i;return e===139?i=this.finishNode(t,"Program"):i=this.finishNodeAt(t,"Program",L(this.state.startLoc,-1)),i}stmtToDirective(t){let e=t;e.type="Directive",e.value=e.expression,delete e.expression;let s=e.value,i=s.value,r=this.input.slice(s.start,s.end),n=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",n),this.addExtra(s,"expressionValue",i),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(j(t)){if(We.lastIndex=e,We.test(this.input)){let s=this.codePointAtPos(We.lastIndex);if(!Z(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifier(){let t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){let{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(S(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type,i=this.startNode(),r=!!(t&2),n=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return n||this.raise(this.state.strict?p.StrictFunction:this.options.annexB?p.SloppyFunctionAnnexB:p.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!r&&n);case 80:return r||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?r||this.raise(p.UnexpectedLexicalDeclaration,i):this.raise(p.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(p.UnexpectedUsingDeclaration,this.state.startLoc):r||this.raise(p.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let c=this.nextTokenStart(),u=this.codePointAtPos(c);if(u!==91&&(!r&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(u,c)&&u!==123))break}case 75:r||this.raise(p.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let c=this.state.value;return this.parseVarStatement(i,c)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let c=this.lookaheadCharCode();if(c===40||c===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(p.UnexpectedImportExport,this.state.startLoc),this.next();let c;return s===83?(c=this.parseImport(i),c.type==="ImportDeclaration"&&(!c.importKind||c.importKind==="value")&&(this.sawUnambiguousESM=!0)):(c=this.parseExport(i,e),(c.type==="ExportNamedDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportAllDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(c),c}default:if(this.isAsyncFunction())return r||this.raise(p.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!r&&n)}let h=this.state.value,l=this.parseExpression();return S(s)&&l.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,h,l,t):this.parseExpressionStatement(i,l,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(p.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(p.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(p.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(p.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,s;if(this.match(10)){let i=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(i,s);let r=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(p.DecoratorArgumentsOutsideParentheses,r)}else{for(s=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(e);i.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,s=this.finishNode(i,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){let e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;sthis.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(He);let e=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(e=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);let s=this.isContextual(100);{let h=this.isContextual(96)&&this.startsAwaitUsing(),l=h||this.isContextual(107)&&this.startsUsingForOf(),c=s&&this.hasFollowingBindingAtom()||l;if(this.match(74)||this.match(75)||c){let u=this.startNode(),f;h?(f="await using",this.isAwaitAllowed()||this.raise(p.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):f=this.state.value,this.next(),this.parseVar(u,!0,f);let d=this.finishNode(u,"VariableDeclaration"),y=this.match(58);return y&&l&&this.raise(p.ForInUsing,d),(y||this.isContextual(102))&&d.declarations.length===1?this.parseForIn(t,d,e):(e!==null&&this.unexpected(e),this.parseFor(t,d))}}let i=this.isContextual(95),r=new ee,n=this.parseExpression(!0,r),o=this.isContextual(102);if(o&&(s&&this.raise(p.ForOfLet,n),e===null&&i&&n.type==="Identifier"&&this.raise(p.ForOfAsync,n)),o||this.match(58)){this.checkDestructuringPrivate(r),this.toAssignable(n,!0);let h=o?"ForOfStatement":"ForInStatement";return this.checkLVal(n,{in:{type:h}}),this.parseForIn(t,n,e)}else this.checkExpressionErrors(r,!0);return e!==null&&this.unexpected(e),this.parseFor(t,n)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(p.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let e=t.cases=[];this.expect(5),this.state.labels.push(cr),this.scope.enter(0);let s;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let r=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),r?s.test=this.parseExpression():(i&&this.raise(p.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(p.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{in:{type:"CatchClause"},binding:9}),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(p.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(He),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(p.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,i){for(let n of this.state.labels)n.name===e&&this.raise(p.LabelRedeclaration,s,{labelName:e});let r=mi(this.state.type)?1:this.match(71)?2:null;for(let n=this.state.labels.length-1;n>=0;n--){let o=this.state.labels[n];if(o.statementStart===t.start)o.statementStart=this.state.start,o.kind=r;else break}return this.state.labels.push({name:e,kind:r,statementStart:this.state.start}),t.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){let i=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(i,t,!1,8,s),e&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,i,r){let n=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(n,e?o:void 0,s,i,r)}parseBlockOrModuleBlockBody(t,e,s,i,r){let n=this.state.strict,o=!1,h=!1;for(;!this.match(i);){let l=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!h){if(this.isValidDirective(l)){let c=this.stmtToDirective(l);e.push(c),!o&&c.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}h=!0,this.state.strictErrors.clear()}t.push(l)}r==null||r.call(this,o),n||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){let i=this.match(58);return this.next(),i?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(p.ForInOfLoopInitializer,e,{type:i?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(p.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,i=!1){let r=t.declarations=[];for(t.kind=s;;){let n=this.startNode();if(this.parseVarId(n,s),n.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,n.init===null&&!i&&(n.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(p.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):s==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(p.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"const"})),r.push(this.finishNode(n,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){let s=this.parseBindingAtom();this.checkLVal(s,{in:{type:"VariableDeclarator"},binding:e==="var"?5:8201}),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){let s=e&2,i=!!(e&1),r=i&&!(e&4),n=!!(e&8);this.initFunction(t,n),this.match(55)&&(s&&this.raise(p.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),i&&(t.id=this.parseFunctionId(r));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ke(n,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||S(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(_i()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(t){return!t.computed&&!t.static&&(t.key.name==="constructor"||t.key.value==="constructor")}parseClassBody(t,e){this.classScope.enter();let s={hadConstructor:!1,hadSuperClass:t},i=[],r=this.startNode();if(r.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(p.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let n=this.startNode();i.length&&(n.decorators=i,this.resetStartLocationFromNode(n,i[0]),i=[]),this.parseClassMember(r,n,s),n.kind==="constructor"&&n.decorators&&n.decorators.length>0&&this.raise(p.DecoratorConstructor,n)}}),this.state.strict=e,this.next(),i.length)throw this.raise(p.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(r,"ClassBody")}parseClassMemberFromModifier(t,e){let s=this.parseIdentifier(!0);if(this.isClassMethod()){let i=e;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=e;return i.computed=!1,i.key=s,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,i)}parseClassMemberWithIsStatic(t,e,s,i){let r=e,n=e,o=e,h=e,l=e,c=r,u=r;if(e.static=i,this.parsePropertyNamePrefixOperator(e),this.eat(55)){c.kind="method";let C=this.match(138);if(this.parseClassElementName(c),C){this.pushClassPrivateMethod(t,n,!0,!1);return}this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsGenerator,r.key),this.pushClassMethod(t,r,!0,!1,!1,!1);return}let f=S(this.state.type)&&!this.state.containsEsc,d=this.match(138),y=this.parseClassElementName(e),I=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(c.kind="method",d){this.pushClassPrivateMethod(t,n,!1,!1);return}let C=this.isNonstaticConstructor(r),E=!1;C&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(p.DuplicateConstructor,y),C&&this.hasPlugin("typescript")&&e.override&&this.raise(p.OverrideOnConstructor,y),s.hadConstructor=!0,E=s.hadSuperClass),this.pushClassMethod(t,r,!1,!1,C,E)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(t,h):this.pushClassProperty(t,o);else if(f&&y.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(y);let C=this.eat(55);u.optional&&this.unexpected(I),c.kind="method";let E=this.match(138);this.parseClassElementName(c),this.parsePostMemberNameModifiers(u),E?this.pushClassPrivateMethod(t,n,C,!0):(this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsAsync,r.key),this.pushClassMethod(t,r,C,!0,!1,!1))}else if(f&&(y.name==="get"||y.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(y),c.kind=y.name;let C=this.match(138);this.parseClassElementName(r),C?this.pushClassPrivateMethod(t,n,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(p.ConstructorIsAccessor,r.key),this.pushClassMethod(t,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r)}else if(f&&y.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(y);let C=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,l,C)}else this.isLineTerminator()?d?this.pushClassPrivateProperty(t,h):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){let{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(p.StaticPrototype,this.state.startLoc),e===138){s==="constructor"&&this.raise(p.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return t.key=i,i}return this.parsePropertyName(t)}parseClassStaticBlock(t,e){var s;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let r=e.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(p.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&(e.key.name==="constructor"||e.key.value==="constructor")&&this.raise(p.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){let s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){if(!s&&!e.computed){let r=e.key;(r.name==="constructor"||r.value==="constructor")&&this.raise(p.ConstructorClassField,r)}let i=this.parseClassAccessorProperty(e);t.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(t,e,s,i,r,n){t.body.push(this.parseMethod(e,s,i,r,n,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,i){let r=this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(r);let n=r.kind==="get"?r.static?6:2:r.kind==="set"?r.static?5:1:0;this.declareClassPrivateMethodInScope(r,n)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(os()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,i=8331){if(S(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,i);else if(s||!e)t.id=null;else throw this.raise(p.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){let s=this.parseMaybeImportPhase(t,!0),i=this.maybeParseExportDefaultSpecifier(t,s),r=!i||this.eat(12),n=r&&this.eatExportStar(t),o=n&&this.maybeParseExportNamespaceSpecifier(t),h=r&&(!o||this.eat(12)),l=i||n;if(n&&!o){if(i&&this.unexpected(),e)throw this.raise(p.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let c=this.maybeParseExportNamedSpecifiers(t);i&&r&&!n&&!c&&this.unexpected(null,5),o&&h&&this.unexpected(null,98);let u;if(l||c){if(u=!1,e)throw this.raise(p.UnsupportedDecoratorExport,t);this.parseExportFrom(t,l)}else u=this.maybeParseExportDeclaration(t);if(l||c||u){var f;let d=t;if(this.checkExport(d,!0,!1,!!d.source),((f=d.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(e,d.declaration,d);else if(e)throw this.raise(p.UnsupportedDecoratorExport,t);return this.finishNode(d,"ExportNamedDeclaration")}if(this.eat(65)){let d=t,y=this.parseExportDefaultExpression();if(d.declaration=y,y.type==="ClassDeclaration")this.maybeTakeDecorators(e,y,d);else if(e)throw this.raise(p.UnsupportedDecoratorExport,t);return this.checkExport(d,!0,!0),this.finishNode(d,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0:e.loc.start);let s=e||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,t.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){t.specifiers||(t.specifiers=[]);let e=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){t.specifiers||(t.specifiers=[]);let e=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(e)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(p.UnsupportedDefaultExport,this.state.startLoc);let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(S(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(S(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||S(this.state.type)&&s)return!0;if(this.match(65)&&s){let i=this.input.charCodeAt(this.nextTokenStartSince(e+4));return i===34||i===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,i){if(e){var r;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var n;let o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((n=o.extra)!=null&&n.parenthesized)&&this.raise(p.ExportDefaultFromAsIdentifier,o)}}else if((r=t.specifiers)!=null&&r.length)for(let o of t.specifiers){let{exported:h}=o,l=h.type==="Identifier"?h.name:h.value;if(this.checkDuplicateExports(o,l),!i&&o.local){let{local:c}=o;c.type!=="Identifier"?this.raise(p.ExportBindingIsString,o,{localName:c.value,exportName:l}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(t.declaration){if(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"){let o=t.declaration.id;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(t,o.name)}else if(t.declaration.type==="VariableDeclaration")for(let o of t.declaration.declarations)this.checkDeclaration(o.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(let e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(p.DuplicateDefaultExport,t):this.raise(p.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){let e=[],s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),r=this.match(133),n=this.startNode();n.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(n,r,t,i))}return e}parseExportSpecifier(t,e,s,i){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=Vi(t.local):t.exported||(t.exported=V(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let t=this.parseStringLiteral(this.state.value),e=t.value.match(pr);return e&&this.raise(p.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){let{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(p.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(p.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var i;s!=="ImportDefaultSpecifier"&&this.raise(p.ImportReflectionNotBinding,e[0].loc.start),((i=t.assertions)==null?void 0:i.length)>0&&this.raise(p.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:e}=t;if(e!=null){let s=e.find(i=>{let r;if(i.type==="ExportSpecifier"?r=i.local:i.type==="ImportSpecifier"&&(r=i.imported),r!==void 0)return r.type==="Identifier"?r.name!=="default":r.value!=="default"});s!==void 0&&this.raise(p.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,i){e||(s==="module"?(this.expectPlugin("importReflection",i),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",i),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",i),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;let s=this.parseIdentifier(!0),{type:i}=this.state;return(M(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){let{type:e}=this.state;return S(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),r=i&&this.maybeParseStarImportSpecifier(t);return i&&!r&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{in:{type:e},binding:s}),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);let t=[],e=new Set;do{if(this.match(8))break;let s=this.startNode(),i=this.state.value;if(e.has(i)&&this.raise(p.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),e.add(i),this.match(133)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(p.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],e=new Set;do{let s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(p.ModuleAttributeDifferentFromType,s.key),e.has(s.key.name)&&this.raise(p.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(p.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e,s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(p.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){let s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(M(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(p.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let s=this.startNode(),i=this.match(133),r=this.isContextual(130);s.imported=this.parseModuleExportName();let n=this.parseImportSpecifier(s,i,t.importKind==="type"||t.importKind==="typeof",r,void 0);t.specifiers.push(n)}}parseImportSpecifier(t,e,s,i,r){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:n}=t;if(e)throw this.raise(p.ImportBindingIsString,t,{importName:n.value});this.checkReservedWord(n.name,t.loc.start,!0,!0),t.local||(t.local=V(n))}return this.finishImportSpecifier(t,"ImportSpecifier",r)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},Me=class extends ft{constructor(t,e){t=lr(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=fr(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return ye}parse(){this.enterInitialScopes();let t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}};function fr(a){let t=new Map;for(let e of a){let[s,i]=Array.isArray(e)?e:[e,{}];t.has(s)||t.set(s,i||{})}return t}function dr(a,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let s=ue(t,a),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",ue(t,a).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return t.sourceType="script",ue(t,a).parse()}catch{}throw s}}else return ue(t,a).parse()}function mr(a,t){let e=ue(t,a);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function yr(a){let t={};for(let e of Object.keys(a))t[e]=_(a[e]);return t}var xr=yr(pi);function ue(a,t){let e=Me;return a!=null&&a.plugins&&(or(a.plugins),e=Pr(a.plugins)),new e(a,t)}var Jt={};function Pr(a){let t=hr.filter(i=>N(a,i)),e=t.join("/"),s=Jt[e];if(!s){s=Me;for(let i of t)s=ps[i](s);Jt[e]=s}return s}Pe.parse=dr;Pe.parseExpression=mr;Pe.tokTypes=xr});var Ds=Dt(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.extract=Vr;G.parse=zr;G.parseWithComments=Ls;G.print=Kr;G.strip=qr;var Rr=/\*\/$/,_r=/^\/\*\*?/,ks=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Ur=/(^|\s+)\/\/([^\r\n]*)/g,Es=/^(\r?\n)+/,jr=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Is=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,$r=/(\r?\n|^) *\* ?/g,vs=[];function Vr(a){let t=a.match(ks);return t?t[0].trimLeft():""}function qr(a){let t=a.match(ks);return t&&t[0]?a.substring(t[0].length):a}function zr(a){return Ls(a).pragmas}function Ls(a){let t=` +`;a=a.replace(_r,"").replace(Rr,"").replace($r,"$1");let e="";for(;e!==a;)e=a,a=a.replace(jr,`${t}$1 $2${t}`);a=a.replace(Es,"").trimRight();let s=Object.create(null),i=a.replace(Is,"").replace(Es,"").trimRight(),r;for(;r=Is.exec(a);){let n=r[2].replace(Ur,"");typeof s[r[1]]=="string"||Array.isArray(s[r[1]])?s[r[1]]=vs.concat(s[r[1]],n):s[r[1]]=n}return{comments:i,pragmas:s}}function Kr({comments:a="",pragmas:t={}}){let e=` +`,s="/**",i=" *",r=" */",n=Object.keys(t),o=n.flatMap(l=>Ns(l,t[l])).map(l=>`${i} ${l}${e}`).join("");if(!a){if(n.length===0)return"";if(n.length===1&&!Array.isArray(t[n[0]])){let l=t[n[0]];return`${s} ${Ns(n[0],l)[0]}${r}`}}let h=a.split(e).map(l=>`${i} ${l}`).join(e)+e;return s+e+(a?h:"")+(a&&n.length?i+e:"")+o+r}function Ns(a,t){return vs.concat(t).map(e=>`@${a} ${e}`.trim())}});var Lt={};Qs(Lt,{parsers:()=>aa});var je=Ve(wt(),1);function Oe(a){return(t,e,s)=>{let i=!!(s!=null&&s.backwards);if(e===!1)return!1;let{length:r}=t,n=e;for(;n>=0&&n{let i=!!(s!=null&&s.backwards);if(e===!1)return!1;let{length:r}=t,n=e;for(;n>=0&&n0}var Y=Rr;function D(a){var s;let t=a.range?a.range[0]:a.start,e=((s=a.declaration)==null?void 0:s.decorators)??a.decorators;return Y(e)?Math.min(D(e[0]),t):t}function B(a){return a.range?a.range[1]:a.end}function _r(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Cs,locStart:D,locEnd:B,...a}}var ae=_r;function Ur(a,t){let e=new SyntaxError(a+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(e,t)}var _e=Ur;function jr(a){let{message:t,loc:{line:e,column:s}}=a,i=` (${e}:${s})`;return t.endsWith(i)&&(t=t.slice(0,-i.length)),_e(t,{loc:{start:{line:e,column:s+1}},cause:a})}var Te=jr;var $r=(a,t,e)=>{if(!(a&&t==null))return Array.isArray(t)||typeof t=="string"?t[e<0?t.length+e:e]:t.at(e)},Et=$r;function Vr(a){return a=new Set(a),t=>a.has(t==null?void 0:t.type)}var Es=Vr;var qr=Es(["Block","CommentBlock","MultiLine"]),be=qr;function zr(a){return be(a)&&a.value[0]==="*"&&/@(?:type|satisfies)\b/.test(a.value)}var Is=zr;function Kr(a){let t=`*${a.value}*`.split(` -`);return t.length>1&&t.every(e=>e.trimStart()[0]==="*")}var It=Kr;var Ae=null;function Se(a){if(Ae!==null&&typeof Ae.property){let t=Ae;return Ae=Se.prototype=null,t}return Ae=Se.prototype=a??Object.create(null),new Se}var Hr=10;for(let a=0;a<=Hr;a++)Se();function Nt(a){return Se(a)}function Wr(a,t="type"){Nt(a);function e(s){let i=s[t],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return e}var Ns=Wr;var ks={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Jr=Ns(ks),vs=Jr;function kt(a,t){if(!(a!==null&&typeof a=="object"))return a;if(Array.isArray(a)){for(let s=0;s{var o;(o=n.leadingComments)!=null&&o.some(Is)&&r.add(D(n))}),a=Ue(a,n=>{if(n.type==="ParenthesizedExpression"){let{expression:o}=n;if(o.type==="TypeCastExpression")return o.range=n.range,o;let h=D(n);if(!r.has(h))return o.extra={...o.extra,parenthesized:!0},o}})}if(a=Ue(a,r=>{switch(r.type){case"LogicalExpression":if(Ls(r))return vt(r);break;case"VariableDeclaration":{let n=Et(!1,r.declarations,-1);n!=null&&n.init&&i(r,n);break}case"TSParenthesizedType":return r.typeAnnotation;case"TSTypeParameter":if(typeof r.name=="string"){let n=D(r);r.name={type:"Identifier",name:r.name,range:[n,n+r.name.length]}}break;case"TopicReference":a.extra={...a.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:n}=r;if(e==="meriyah"&&(n==null?void 0:n.type)==="Identifier"){let o=s.slice(D(n),B(n));(o.startsWith('"')||o.startsWith("'"))&&(r.exported={...r.exported,type:"Literal",value:r.exported.name,raw:o})}break}case"TSUnionType":case"TSIntersectionType":if(r.types.length===1)return r.types[0];break}}),Y(a.comments)){let r=Et(!1,a.comments,-1);for(let n=a.comments.length-2;n>=0;n--){let o=a.comments[n];B(o)===D(r)&&be(o)&&be(r)&&It(o)&&It(r)&&(a.comments.splice(n+1,1),o.value+="*//*"+r.value,o.range=[D(o),B(r)]),r=o}}return a.type==="Program"&&(a.range=[0,s.length]),a;function i(r,n){s[B(n)]!==";"&&(r.range=[D(r),B(n)])}}function Ls(a){return a.type==="LogicalExpression"&&a.right.type==="LogicalExpression"&&a.operator===a.right.operator}function vt(a){return Ls(a)?vt({type:"LogicalExpression",operator:a.operator,left:vt({type:"LogicalExpression",operator:a.operator,left:a.left,right:a.right.left,range:[D(a.left),B(a.right.left)]}),right:a.right.right,range:[D(a),B(a)]}):a}var Ds=Xr;function Gr(a){let{filepath:t}=a;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var Ms=Gr;function Yr(a,t){let{type:e="JsExpressionRoot",rootMarker:s,text:i}=t,{tokens:r,comments:n}=a;return delete a.tokens,delete a.comments,{tokens:r,comments:n,type:e,node:a,range:[0,i.length],rootMarker:s}}var je=Yr;var ne=a=>ae(ia(a)),Qr={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}]],tokens:!0,ranges:!0},Zr=["recordAndTuple",{syntaxType:"hash"}],Os="v8intrinsic",Fs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],R=(a,t=Qr)=>({...t,plugins:[...t.plugins,...a]}),ea=/@(?:no)?flow\b/;function ta(a,t){var i;if((i=t.filepath)!=null&&i.endsWith(".js.flow"))return!0;let e=Be(a);e&&(a=a.slice(e.length));let s=xs(a,0);return s!==!1&&(a=a.slice(0,s)),ea.test(a)}function sa(a,t,e){let s=a(t,e),i=s.errors.find(r=>!ra.has(r.reasonCode));if(i)throw i;return s}function ia({isExpression:a=!1,optionsCombinations:t}){return(e,s={})=>{if((s.parser==="babel"||s.parser==="__babel_estree")&&ta(e,s))return s.parser="babel-flow",$s.parse(e,s);let i=t;(s.__babelSourceType??Ms(s))==="script"&&(i=i.map(l=>({...l,sourceType:"script"}))),/#[[{]/.test(e)&&(i=i.map(l=>R([Zr],l)));let n=/%[A-Z]/.test(e);e.includes("|>")?i=(n?[...Fs,Os]:Fs).flatMap(c=>i.map(u=>R([c],u))):n&&(i=i.map(l=>R([Os],l)));let o=a?$e.parseExpression:$e.parse,h;try{h=ps(i.map(l=>()=>sa(o,e,l)))}catch({errors:[l]}){throw Te(l)}return a&&(h=je(h,{text:e,rootMarker:s.rootMarker})),Ds(h,{parser:"babel",text:e})}}var ra=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","MixedLabeledAndUnlabeledElements","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),js=[R(["jsx"])],Bs=ne({optionsCombinations:js}),Rs=ne({optionsCombinations:[R(["jsx","typescript"]),R(["typescript"])]}),_s=ne({isExpression:!0,optionsCombinations:[R(["jsx"])]}),Us=ne({isExpression:!0,optionsCombinations:[R(["typescript"])]}),$s=ne({optionsCombinations:[R(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),aa=ne({optionsCombinations:js.map(a=>R(["estree"],a))}),Vs={babel:Bs,"babel-flow":$s,"babel-ts":Rs,__js_expression:_s,__ts_expression:Us,__vue_expression:_s,__vue_ts_expression:Us,__vue_event_binding:Bs,__vue_ts_event_binding:Rs,__babel_estree:aa};var zs=qe(Ct(),1);function Ks(a={}){let{allowComments:t=!0}=a;return function(s){let i;try{i=(0,zs.parseExpression)(s,{tokens:!0,ranges:!0,attachComment:!1})}catch(r){throw(r==null?void 0:r.reasonCode)==="MissingPlugin"||(r==null?void 0:r.reasonCode)==="MissingOneOfPlugins"?Te({message:"Unexpected token",loc:r.loc}):Te(r)}if(!t&&Y(i.comments))throw W(i.comments[0],"Comment");return oe(i),je(i,{type:"JsonRoot",text:s})}}function W(a,t){let[e,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return _e(`${t} is not allowed in JSON.`,{loc:{start:e,end:s}})}function oe(a){switch(a.type){case"ArrayExpression":for(let t of a.elements)t!==null&&oe(t);return;case"ObjectExpression":for(let t of a.properties)oe(t);return;case"ObjectProperty":if(a.computed)throw W(a.key,"Computed key");if(a.shorthand)throw W(a.key,"Shorthand property");a.key.type!=="Identifier"&&oe(a.key),oe(a.value);return;case"UnaryExpression":{let{operator:t,argument:e}=a;if(t!=="+"&&t!=="-")throw W(a,`Operator '${a.operator}'`);if(e.type==="NumericLiteral"||e.type==="Identifier"&&(e.name==="Infinity"||e.name==="NaN"))return;throw W(e,`Operator '${t}' before '${e.type}'`)}case"Identifier":if(a.name!=="Infinity"&&a.name!=="NaN"&&a.name!=="undefined")throw W(a,`Identifier '${a.name}'`);return;case"TemplateLiteral":if(Y(a.expressions))throw W(a.expressions[0],"'TemplateLiteral' with expression");for(let t of a.quasis)oe(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw W(a,`'${a.type}'`)}}var qs=Ks(),na={json:ae({parse:qs,hasPragma(){return!0}}),json5:ae(qs),"json-stringify":ae({parse:Ks({allowComments:!1}),astFormat:"estree-json"})},Hs=na;var oa={...Vs,...Hs};var _n=Lt;export{_n as default,oa as parsers}; +`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var ms=Tr;function br(a,t){return t===!1?!1:a.charAt(t)==="/"&&a.charAt(t+1)==="/"?fs(a,t):t}var ys=br;function Ar(a,t){let e=null,s=t;for(;s!==e;)e=s,s=us(a,s),s=ds(a,s),s=ys(a,s),s=ms(a,s);return s}var xs=Ar;function Sr(a){let t=[];for(let e of a)try{return e()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var Ps=Sr;function wr(a){if(!a.startsWith("#!"))return"";let t=a.indexOf(` +`);return t===-1?a:a.slice(0,t)}var Fe=wr;var Cr=(a,t,e)=>{if(!(a&&t==null))return Array.isArray(t)||typeof t=="string"?t[e<0?t.length+e:e]:t.at(e)},Ct=Cr;function Er(a){return Array.isArray(a)&&a.length>0}var ge=Er;function D(a){var s,i,r;let t=((s=a.range)==null?void 0:s[0])??a.start,e=(r=((i=a.declaration)==null?void 0:i.decorators)??a.decorators)==null?void 0:r[0];return e?Math.min(D(e),t):t}function B(a){var t;return((t=a.range)==null?void 0:t[1])??a.end}function Ir(a){let t=new Set(a);return e=>t.has(e==null?void 0:e.type)}var gs=Ir;var Nr=gs(["Block","CommentBlock","MultiLine"]),Te=Nr;function kr(a){let t=`*${a.value}*`.split(` +`);return t.length>1&&t.every(e=>e.trimStart()[0]==="*")}var Et=kr;function vr(a){return Te(a)&&a.value[0]==="*"&&/@(?:type|satisfies)\b/.test(a.value)}var Ts=vr;var be=null;function Ae(a){if(be!==null&&typeof be.property){let t=be;return be=Ae.prototype=null,t}return be=Ae.prototype=a??Object.create(null),new Ae}var Lr=10;for(let a=0;a<=Lr;a++)Ae();function It(a){return Ae(a)}function Dr(a,t="type"){It(a);function e(s){let i=s[t],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return e}var bs=Dr;var As={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Mr=bs(As),Ss=Mr;function Nt(a,t){if(!(a!==null&&typeof a=="object"))return a;if(Array.isArray(a)){for(let s=0;s{var n;(n=r.leadingComments)!=null&&n.some(Ts)&&i.add(D(r))}),a=Be(a,r=>{if(r.type==="ParenthesizedExpression"){let{expression:n}=r;if(n.type==="TypeCastExpression")return n.range=[...r.range],n;let o=D(r);if(!i.has(o))return n.extra={...n.extra,parenthesized:!0},n}})}if(a=Be(a,i=>{var r;switch(i.type){case"LogicalExpression":if(ws(i))return kt(i);break;case"VariableDeclaration":{let n=Ct(!1,i.declarations,-1);n!=null&&n.init&&s[B(n)]!==";"&&(i.range=[D(i),B(n)]);break}case"TSParenthesizedType":return i.typeAnnotation;case"TSTypeParameter":if(typeof i.name=="string"){let n=D(i);i.name={type:"Identifier",name:i.name,range:[n,n+i.name.length]}}break;case"TopicReference":a.extra={...a.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(e==="meriyah"&&((r=i.exported)==null?void 0:r.type)==="Identifier"){let{exported:n}=i,o=s.slice(D(n),B(n));(o.startsWith('"')||o.startsWith("'"))&&(i.exported={...i.exported,type:"Literal",value:i.exported.name,raw:o})}break;case"TSUnionType":case"TSIntersectionType":if(i.types.length===1)return i.types[0];break}}),ge(a.comments)){let i=Ct(!1,a.comments,-1);for(let r=a.comments.length-2;r>=0;r--){let n=a.comments[r];B(n)===D(i)&&Te(n)&&Te(i)&&Et(n)&&Et(i)&&(a.comments.splice(r+1,1),n.value+="*//*"+i.value,n.range=[D(n),B(i)]),i=n}}return a.type==="Program"&&(a.range=[0,s.length]),a}function ws(a){return a.type==="LogicalExpression"&&a.right.type==="LogicalExpression"&&a.operator===a.right.operator}function kt(a){return ws(a)?kt({type:"LogicalExpression",operator:a.operator,left:kt({type:"LogicalExpression",operator:a.operator,left:a.left,right:a.right.left,range:[D(a.left),B(a.right.left)]}),right:a.right.right,range:[D(a),B(a)]}):a}var Cs=Or;function Fr(a,t){let e=new SyntaxError(a+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(e,t)}var Re=Fr;function Br(a){let{message:t,loc:{line:e,column:s},reasonCode:i}=a,r=a;(i==="MissingPlugin"||i==="MissingOneOfPlugins")&&(t="Unexpected token.",r=void 0);let n=` (${e}:${s})`;return t.endsWith(n)&&(t=t.slice(0,-n.length)),Re(t,{loc:{start:{line:e,column:s+1}},cause:r})}var _e=Br;var re=Ve(Ds(),1);function Hr(a){let t=Fe(a);t&&(a=a.slice(t.length+1));let e=(0,re.extract)(a),{pragmas:s,comments:i}=(0,re.parseWithComments)(e);return{shebang:t,text:a,pragmas:s,comments:i}}function Ms(a){let{pragmas:t}=Hr(a);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function Wr(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Ms,locStart:D,locEnd:B,...a}}var Y=Wr;function Jr(a){let{filepath:t}=a;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}}var Os=Jr;function Xr(a,t){let{type:e="JsExpressionRoot",rootMarker:s,text:i}=t,{tokens:r,comments:n}=a;return delete a.tokens,delete a.comments,{tokens:r,comments:n,type:e,node:a,range:[0,i.length],rootMarker:s}}var Ue=Xr;var ae=a=>Y(ta(a)),Gr={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}]],tokens:!0,ranges:!0},Yr=["recordAndTuple",{syntaxType:"hash"}],Fs="v8intrinsic",Bs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],R=(a,t=Gr)=>({...t,plugins:[...t.plugins,...a]}),Qr=/@(?:no)?flow\b/;function Zr(a,t){var i;if((i=t.filepath)!=null&&i.endsWith(".js.flow"))return!0;let e=Fe(a);e&&(a=a.slice(e.length));let s=xs(a,0);return s!==!1&&(a=a.slice(0,s)),Qr.test(a)}function ea(a,t,e){let s=a(t,e),i=s.errors.find(r=>!sa.has(r.reasonCode));if(i)throw i;return s}function ta({isExpression:a=!1,optionsCombinations:t}){return(e,s={})=>{if((s.parser==="babel"||s.parser==="__babel_estree")&&Zr(e,s))return s.parser="babel-flow",Vs.parse(e,s);let i=t;(s.__babelSourceType??Os(s))==="script"&&(i=i.map(l=>({...l,sourceType:"script"}))),/#[[{]/.test(e)&&(i=i.map(l=>R([Yr],l)));let n=/%[A-Z]/.test(e);e.includes("|>")?i=(n?[...Bs,Fs]:Bs).flatMap(c=>i.map(u=>R([c],u))):n&&(i=i.map(l=>R([Fs],l)));let o=a?je.parseExpression:je.parse,h;try{h=Ps(i.map(l=>()=>ea(o,e,l)))}catch({errors:[l]}){throw _e(l)}return a&&(h=Ue(h,{text:e,rootMarker:s.rootMarker})),Cs(h,{parser:"babel",text:e})}}var sa=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),$s=[R(["jsx"])],Rs=ae({optionsCombinations:$s}),_s=ae({optionsCombinations:[R(["jsx","typescript"]),R(["typescript"])]}),Us=ae({isExpression:!0,optionsCombinations:[R(["jsx"])]}),js=ae({isExpression:!0,optionsCombinations:[R(["typescript"])]}),Vs=ae({optionsCombinations:[R(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),ia=ae({optionsCombinations:$s.map(a=>R(["estree"],a))}),qs={babel:Rs,"babel-flow":Vs,"babel-ts":_s,__js_expression:Us,__ts_expression:js,__vue_expression:Us,__vue_ts_expression:js,__vue_event_binding:Rs,__vue_ts_event_binding:_s,__babel_estree:ia};var zs=Ve(wt(),1);function Ks(a={}){let{allowComments:t=!0}=a;return function(s){let i;try{i=(0,zs.parseExpression)(s,{tokens:!0,ranges:!0,attachComment:!1})}catch(r){throw _e(r)}if(!t&&ge(i.comments))throw W(i.comments[0],"Comment");return ne(i),Ue(i,{type:"JsonRoot",text:s})}}function W(a,t){let[e,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return Re(`${t} is not allowed in JSON.`,{loc:{start:e,end:s}})}function ne(a){switch(a.type){case"ArrayExpression":for(let t of a.elements)t!==null&&ne(t);return;case"ObjectExpression":for(let t of a.properties)ne(t);return;case"ObjectProperty":if(a.computed)throw W(a.key,"Computed key");if(a.shorthand)throw W(a.key,"Shorthand property");a.key.type!=="Identifier"&&ne(a.key),ne(a.value);return;case"UnaryExpression":{let{operator:t,argument:e}=a;if(t!=="+"&&t!=="-")throw W(a,`Operator '${a.operator}'`);if(e.type==="NumericLiteral"||e.type==="Identifier"&&(e.name==="Infinity"||e.name==="NaN"))return;throw W(e,`Operator '${t}' before '${e.type}'`)}case"Identifier":if(a.name!=="Infinity"&&a.name!=="NaN"&&a.name!=="undefined")throw W(a,`Identifier '${a.name}'`);return;case"TemplateLiteral":if(ge(a.expressions))throw W(a.expressions[0],"'TemplateLiteral' with expression");for(let t of a.quasis)ne(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw W(a,`'${a.type}'`)}}var vt=Ks(),ra={json:Y({parse:vt,hasPragma(){return!0}}),json5:Y(vt),jsonc:Y(vt),"json-stringify":Y({parse:Ks({allowComments:!1}),astFormat:"estree-json"})},Hs=ra;var aa={...qs,...Hs};var Fn=Lt;export{Fn as default,aa as parsers}; diff --git a/node_modules/prettier/plugins/estree.js b/node_modules/prettier/plugins/estree.js index 3e9709f..cdb23e1 100644 --- a/node_modules/prettier/plugins/estree.js +++ b/node_modules/prettier/plugins/estree.js @@ -1,35 +1,36 @@ -(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.estree=e()}})(function(){"use strict";var wa=Object.create;var Cr=Object.defineProperty;var Oa=Object.getOwnPropertyDescriptor;var va=Object.getOwnPropertyNames;var _a=Object.getPrototypeOf,ja=Object.prototype.hasOwnProperty;var Ma=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ar=(e,t)=>{for(var r in t)Cr(e,r,{get:t[r],enumerable:!0})},Us=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of va(t))!ja.call(e,s)&&s!==r&&Cr(e,s,{get:()=>t[s],enumerable:!(n=Oa(t,s))||n.enumerable});return e};var Ra=(e,t,r)=>(r=e!=null?wa(_a(e)):{},Us(t||!e||!e.__esModule?Cr(r,"default",{value:e,enumerable:!0}):r,e)),Ja=e=>Us(Cr({},"__esModule",{value:!0}),e);var Ws=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var ut=(e,t,r)=>(Ws(e,t,"read from private field"),r?r.call(e):t.get(e)),Gs=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ns=(e,t,r,n)=>(Ws(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Ca=Ma(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.extract=Ol;Pt.parse=_l;Pt.parseWithComments=Fa;Pt.print=jl;Pt.strip=vl;var Pl=/\*\/$/,kl=/^\/\*\*?/,fa=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Il=/(^|\s+)\/\/([^\r\n]*)/g,ma=/^(\r?\n)+/,Ll=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Da=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,wl=/(\r?\n|^) *\* ?/g,Ea=[];function Ol(e){let t=e.match(fa);return t?t[0].trimLeft():""}function vl(e){let t=e.match(fa);return t&&t[0]?e.substring(t[0].length):e}function _l(e){return Fa(e).pragmas}function Fa(e){let t=` -`;e=e.replace(kl,"").replace(Pl,"").replace(wl,"$1");let r="";for(;r!==e;)r=e,e=e.replace(Ll,`${t}$1 $2${t}`);e=e.replace(ma,"").trimRight();let n=Object.create(null),s=e.replace(Da,"").replace(ma,"").trimRight(),u;for(;u=Da.exec(e);){let i=u[2].replace(Il,"");typeof n[u[1]]=="string"||Array.isArray(n[u[1]])?n[u[1]]=Ea.concat(n[u[1]],i):n[u[1]]=i}return{comments:s,pragmas:n}}function jl({comments:e="",pragmas:t={}}){let r=` -`,n="/**",s=" *",u=" */",i=Object.keys(t),a=i.flatMap(p=>ya(p,t[p])).map(p=>`${s} ${p}${r}`).join("");if(!e){if(i.length===0)return"";if(i.length===1&&!Array.isArray(t[i[0]])){let p=t[i[0]];return`${n} ${ya(i[0],p)[0]}${u}`}}let o=e.split(r).map(p=>`${s} ${p}`).join(r)+r;return n+r+(e?o:"")+(e&&i.length?s+r:"")+a+u}function ya(e,t){return Ea.concat(t).map(r=>`@${e} ${r}`.trim())}});var $l={};Ar($l,{languages:()=>Xl,options:()=>ba,printers:()=>Yl});var _s={};Ar(_s,{canAttachComment:()=>Tp,embed:()=>pa,experimentalFeatures:()=>Jl,getCommentChildNodes:()=>xp,getVisitorKeys:()=>br,handleComments:()=>as,insertPragma:()=>da,isBlockComment:()=>Q,isGap:()=>gp,massageAstNode:()=>la,print:()=>Qi,printComment:()=>Gu,willPrintOwnComments:()=>os});function qa(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:s,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:a}=e,o=s(a),p=u(a);for(let D of n)s(D)>=o&&u(D)<=p&&i.add(D);return r.slice(o,p)}var Ys=qa;var ze="string",Re="array",Qe="cursor",Je="indent",qe="align",Ze="trim",ae="group",Ee="fill",Te="if-break",Ue="indent-if-break",We="line-suffix",Ge="line-suffix-boundary",oe="line",Le="label",we="break-parent",dr=new Set([Qe,Je,qe,Ze,ae,Ee,Te,Ue,We,Ge,oe,Le,we]);function Ua(e){if(typeof e=="string")return ze;if(Array.isArray(e))return Re;if(!e)return;let{type:t}=e;if(dr.has(t))return t}var et=Ua;var Wa=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Ga(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', -Expected it to be 'string' or 'object'.`;if(et(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Wa([...dr].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var In=class extends Error{name="InvalidDocError";constructor(t){super(Ga(t)),this.doc=t}},ft=In;var Xs={};function Na(e,t,r,n){let s=[e];for(;s.length>0;){let u=s.pop();if(u===Xs){r(s.pop());continue}r&&s.push(u,Xs);let i=et(u);if(!i)throw new ft(u);if((t==null?void 0:t(u))!==!1)switch(i){case Re:case Ee:{let a=i===Re?u:u.parts;for(let o=a.length,p=o-1;p>=0;--p)s.push(a[p]);break}case Te:s.push(u.flatContents,u.breakContents);break;case ae:if(n&&u.expandedStates)for(let a=u.expandedStates.length,o=a-1;o>=0;--o)s.push(u.expandedStates[o]);else s.push(u.contents);break;case qe:case Je:case Ue:case Le:case We:s.push(u.contents);break;case ze:case Qe:case Ze:case Ge:case oe:case we:break;default:throw new ft(u)}}}var Ln=Na;var $s=()=>{},Ne=$s,Tr=$s;function E(e){return Ne(e),{type:Je,contents:e}}function Fe(e,t){return Ne(t),{type:qe,contents:t,n:e}}function m(e,t={}){return Ne(e),Tr(t.expandedStates,!0),{type:ae,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Vs(e){return Fe(Number.NEGATIVE_INFINITY,e)}function xr(e){return Fe(-1,e)}function Ye(e,t){return m(e[0],{...t,expandedStates:e})}function Lt(e){return Tr(e),{type:Ee,parts:e}}function B(e,t="",r={}){return Ne(e),t!==""&&Ne(t),{type:Te,breakContents:e,flatContents:t,groupId:r.groupId}}function Et(e,t){return Ne(e),{type:Ue,contents:e,groupId:t.groupId,negate:t.negate}}function wn(e){return Ne(e),{type:We,contents:e}}var Be={type:Ge},ce={type:we};var On={type:oe,hard:!0},Ya={type:oe,hard:!0,literal:!0},d={type:oe},F={type:oe,soft:!0},C=[On,ce],gr=[Ya,ce],vn={type:Qe};function b(e,t){Ne(e),Tr(t);let r=[];for(let n=0;n0){for(let s=0;s{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},w=Xa;var hr=e=>{if(Array.isArray(e))return e;if(e.type!==Ee)throw new Error(`Expect doc to be 'array' or '${Ee}'.`);return e.parts};function it(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=s(u);return r.set(u,i),i}function s(u){switch(et(u)){case Re:return t(u.map(n));case Ee:return t({...u,parts:u.parts.map(n)});case Te:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case ae:{let{expandedStates:i,contents:a}=u;return i?(i=i.map(n),a=i[0]):a=n(a),t({...u,contents:a,expandedStates:i})}case qe:case Je:case Ue:case Le:case We:return t({...u,contents:n(u.contents)});case ze:case Qe:case Ze:case Ge:case oe:case we:return t(u);default:throw new ft(u)}}}function zs(e,t,r){let n=r,s=!1;function u(i){if(s)return!1;let a=t(i);a!==void 0&&(s=!0,n=a)}return Ln(e,u),n}function $a(e){if(e.type===ae&&e.break||e.type===oe&&e.hard||e.type===we)return!0}function K(e){return zs(e,$a,!1)}function Ks(e){if(e.length>0){let t=w(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Qs(e){let t=new Set,r=[];function n(u){if(u.type===we&&Ks(r),u.type===ae){if(r.push(u),t.has(u))return!1;t.add(u)}}function s(u){u.type===ae&&r.pop().break&&Ks(r)}Ln(e,n,s,!0)}function Va(e){return e.type===oe&&!e.hard?e.soft?"":" ":e.type===Te?e.flatContents:e}function Ht(e){return it(e,Va)}function Ha(e){switch(et(e)){case Ee:if(e.parts.every(t=>t===""))return"";break;case ae:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===ae&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case qe:case Je:case Ue:case We:if(!e.contents)return"";break;case Te:if(!e.flatContents&&!e.breakContents)return"";break;case Re:{let t=[];for(let r of e){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof w(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case ze:case Qe:case Ze:case Ge:case oe:case Le:case we:break;default:throw new ft(e)}return e}function wt(e){return it(e,t=>Ha(t))}function be(e,t=gr){return it(e,r=>typeof r=="string"?b(t,r.split(` -`)):r)}function Ka(e){if(e.type===oe)return!0}function Zs(e){return zs(e,Ka,!1)}function Kt(e,t){return e.type===Le?{...e,contents:t(e.contents)}:t(e)}function za(e){return Array.isArray(e)&&e.length>0}var k=za;var Qa=/^[\$A-Z_a-z\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][\$0-9A-Z_a-z\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]*$/,Za=e=>Qa.test(e),eu=Za;function eo(e){return e!==null&&typeof e=="object"}var tu=eo;function*to(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,s=u=>tu(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let a of i)s(a)&&(yield a);else s(i)&&(yield i)}}function*ro(e,t){let r=[e];for(let n=0;n{let s=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:u}=t,i=r;for(;i>=0&&i()=>(t||e((t={exports:{}}).exports,t),t.exports),xr=(e,t)=>{for(var r in t)Tr(e,r,{get:t[r],enumerable:!0})},Us=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ra(t))!qa.call(e,s)&&s!==r&&Tr(e,s,{get:()=>t[s],enumerable:!(n=ja(t,s))||n.enumerable});return e};var Na=(e,t,r)=>(r=e!=null?Ma(Ja(e)):{},Us(t||!e||!e.__esModule?Tr(r,"default",{value:e,enumerable:!0}):r,e)),Ga=e=>Us(Tr({},"__esModule",{value:!0}),e);var Ys=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var it=(e,t,r)=>(Ys(e,t,"read from private field"),r?r.call(e):t.get(e)),Xs=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Vs=(e,t,r,n)=>(Ys(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var yi=Wa(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.extract=Zp;Pt.parse=tc;Pt.parseWithComments=Di;Pt.print=rc;Pt.strip=ec;var $p=/\*\/$/,Hp=/^\/\*\*?/,li=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Kp=/(^|\s+)\/\/([^\r\n]*)/g,oi=/^(\r?\n)+/,zp=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,pi=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,Qp=/(\r?\n|^) *\* ?/g,mi=[];function Zp(e){let t=e.match(li);return t?t[0].trimLeft():""}function ec(e){let t=e.match(li);return t&&t[0]?e.substring(t[0].length):e}function tc(e){return Di(e).pragmas}function Di(e){let t=` +`;e=e.replace(Hp,"").replace($p,"").replace(Qp,"$1");let r="";for(;r!==e;)r=e,e=e.replace(zp,`${t}$1 $2${t}`);e=e.replace(oi,"").trimRight();let n=Object.create(null),s=e.replace(pi,"").replace(oi,"").trimRight(),u;for(;u=pi.exec(e);){let i=u[2].replace(Kp,"");typeof n[u[1]]=="string"||Array.isArray(n[u[1]])?n[u[1]]=mi.concat(n[u[1]],i):n[u[1]]=i}return{comments:s,pragmas:n}}function rc({comments:e="",pragmas:t={}}){let r=` +`,n="/**",s=" *",u=" */",i=Object.keys(t),a=i.flatMap(p=>ci(p,t[p])).map(p=>`${s} ${p}${r}`).join("");if(!e){if(i.length===0)return"";if(i.length===1&&!Array.isArray(t[i[0]])){let p=t[i[0]];return`${n} ${ci(i[0],p)[0]}${u}`}}let o=e.split(r).map(p=>`${s} ${p}`).join(r)+r;return n+r+(e?o:"")+(e&&i.length?s+r:"")+a+u}function ci(e,t){return mi.concat(t).map(r=>`@${e} ${r}`.trim())}});var nm={};xr(nm,{languages:()=>rm,options:()=>La,printers:()=>tm});var $s=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}];var Rs={};xr(Rs,{canAttachComment:()=>Fp,embed:()=>ai,experimentalFeatures:()=>Hl,getCommentChildNodes:()=>Cp,getVisitorKeys:()=>br,handleComments:()=>ns,insertPragma:()=>Ei,isBlockComment:()=>ee,isGap:()=>Ap,massageAstNode:()=>Bu,print:()=>Sa,printComment:()=>Mu,willPrintOwnComments:()=>ss});var Ua=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},H=Ua;var Ya=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},v=Ya;var Xa=/^[\$A-Z_a-z\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][\$0-9A-Z_a-z\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]*$/,Va=e=>Xa.test(e),Hs=Va;function $a(e){return e!==null&&typeof e=="object"}var Ks=$a;function*Ha(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,s=u=>Ks(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let a of i)s(a)&&(yield a);else s(i)&&(yield i)}}function*Ka(e,t){let r=[e];for(let n=0;n/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Zs(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function eu(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var tu=e=>!(Zs(e)||eu(e));var za=/[^\x20-\x7F]/;function Qa(e){if(!e)return 0;if(!za.test(e))return e.length;e=e.replace(Qs()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=tu(n)?1:2)}return t}var Ze=Qa;function gr(e){return(t,r,n)=>{let s=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:u}=t,i=r;for(;i>=0&&i/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function iu(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function au(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var ou=e=>!(iu(e)||au(e));var oo=/[^\x20-\x7F]/;function po(e){if(!e)return 0;if(!oo.test(e))return e.length;e=e.replace(uu()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=ou(n)?1:2)}return t}var rt=po;function U(e){var n;let t=e.range?e.range[0]:e.start,r=((n=e.declaration)==null?void 0:n.decorators)??e.decorators;return k(r)?Math.min(U(r[0]),t):t}function v(e){return e.range?e.range[1]:e.end}function Ft(e,t){let r=U(e);return Number.isInteger(r)&&r===U(t)}function co(e,t){let r=v(e);return Number.isInteger(r)&&r===v(t)}function pu(e,t){return Ft(e,t)&&co(e,t)}var zt=null;function Qt(e){if(zt!==null&&typeof zt.property){let t=zt;return zt=Qt.prototype=null,t}return zt=Qt.prototype=e??Object.create(null),new Qt}var lo=10;for(let e=0;e<=lo;e++)Qt();function _n(e){return Qt(e)}function mo(e,t="type"){_n(e);function r(n){let s=n[t],u=e[s];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return u}return r}var Br=mo;var cu={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Do=Br(cu),br=Do;var Pr="'",lu='"';function yo(e,t){let r=t===!0||t===Pr?Pr:lu,n=r===Pr?lu:Pr,s=0,u=0;for(let i of e)i===r?s++:i===n&&u++;return s>u?n:r}var kr=yo;var fo=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},H=fo;function Eo(e,t,r){let n=t==='"'?"'":'"',u=H(!1,e,/\\(.)|(["'])/gs,(i,a,o)=>a===n?a:o===t?"\\"+o:o||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return t+u+t}var mu=Eo;function Fo(e,t){let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":kr(r,t.singleQuote);return mu(r,n,!(t.parser==="css"||t.parser==="less"||t.parser==="scss"||t.__embeddedInHtml))}var at=Fo;function Co(e){return e=new Set(e),t=>e.has(t==null?void 0:t.type)}var J=Co;var Ao=J(["Block","CommentBlock","MultiLine"]),Q=Ao;function To(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let s=r[n];if(n===0)return e.type==="Identifier"&&e.name===s;if(e.type!=="MemberExpression"||e.optional||e.computed||e.property.type!=="Identifier"||e.property.name!==s)return!1;e=e.object}}function xo(e,t){return t.some(r=>To(e,r))}var Du=xo;var go=J(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Ir=go;function ho({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Lr=ho;function er(e,t){return t(e)||ru(e,{getVisitorKeys:br,predicate:t})}function Mt(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||I(e)||R(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||Ae(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function Eu(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Or(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var tr=J(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),Fu=J(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),G=J(["ArrayExpression","TupleExpression"]),re=J(["ObjectExpression","RecordExpression"]);function ke(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function Un(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&ke(e.argument)}function Z(e){return e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"}function Wn(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var rr=J(["Literal","BooleanLiteral","BigIntLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),Cu=J(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier","Import"]),Oe=J(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),jt=J(["FunctionExpression","ArrowFunctionExpression"]);function So(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function jn(e){return I(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var N=J(["JSXElement","JSXFragment"]);function Gn(e){return e.kind==="get"||e.kind==="set"}function Nn(e){return Gn(e)||Ft(e,e.value)}function vr(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&e.value.type==="FunctionTypeAnnotation"&&!e.static&&!Nn(e)}function Au(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!Ft(e,e.typeAnnotation)}var le=J(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Ct(e){return R(e)||e.type==="BindExpression"&&!!e.object}var Bo=J(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function Rt(e){return Lr(e)||Ir(e)||Bo(e)||(e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference")&&!e.typeParameters}function bo(e){let t=/^(?:before|after)(?:Each|All)$/;return e.callee.type==="Identifier"&&e.arguments.length===1&&t.test(e.callee.name)}var Po=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function ko(e){return Du(e,Po)}function gt(e,t){if(e.type!=="CallExpression")return!1;if(e.arguments.length===1){if(jn(e)&&t&>(t))return jt(e.arguments[0]);if(bo(e))return jn(e.arguments[0])}else if((e.arguments.length===2||e.arguments.length===3)&&(e.arguments[0].type==="TemplateLiteral"||Z(e.arguments[0]))&&ko(e.callee))return e.arguments[2]&&!ke(e.arguments[2])?!1:(e.arguments.length===2?jt(e.arguments[1]):So(e.arguments[1])&&V(e.arguments[1]).length<=1)||jn(e.arguments[1]);return!1}var I=J(["CallExpression","OptionalCallExpression"]),R=J(["MemberExpression","OptionalMemberExpression"]);function du(e){let t="expressions";e.type==="TSTemplateLiteralType"&&(t="types");let r=e[t];return r.length===0?!1:r.every(n=>{if(Jn(n)||Tu(n))return!0})}function Tu(e,{maxDepth:t=Number.POSITIVE_INFINITY}={}){if(A(e))return!1;if(e.type==="ChainExpression")return Tu(e.expression,{maxDepth:t});if(!R(e))return!1;let r=e,n=0;for(;R(r)&&n++<=t;)if(!Jn(r.property)||(r=r.object,A(r)))return!1;return Jn(r)}function Jn(e){return A(e)?!1:rr(e)||Cu(e)}function Yn(e,t=5){return xu(e,t)<=t}function xu(e,t){let r=0;for(let n in e){let s=e[n];if(s&&typeof s=="object"&&typeof s.type=="string"&&(r++,r+=xu(s,t-r)),r>t)return r}return r}var Io=.25;function nr(e,t){let{printWidth:r}=t;if(A(e))return!1;let n=r*Io;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Un(e)&&!A(e.argument))return!0;let s=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return s?s.length<=n:Z(e)?at(me(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` -`):e.type==="UnaryExpression"?nr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:rr(e)}function ve(e,t){return N(t)?ht(t):A(t,x.Leading,r=>z(e,v(r)))}function Xn(e,t){return t.parser!=="json"&&Z(e.key)&&me(e.key).slice(1,-1)===e.key.value&&(eu(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||t.parser==="typescript"&&e.type==="PropertyDefinition")||$n(e.key.value)&&String(Number(e.key.value))===e.key.value&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function $n(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function yu(e){return e.quasis.some(t=>t.value.raw.includes(` -`))}function _r(e,t){return(e.type==="TemplateLiteral"&&yu(e)||e.type==="TaggedTemplateExpression"&&yu(e.quasi))&&!z(t,U(e),{backwards:!0})}function jr(e){if(!A(e))return!1;let t=w(!1,ot(e,x.Dangling),-1);return t&&!Q(t)}function gu(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(jt(r)){if(t+=1,t>1)return!0}else if(I(r)){for(let n of r.arguments)if(jt(n))return!0}return!1}function Mr(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&I(t)&&I(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Lo=new Set(["!","-","+","~"]);function Pe(e,t=2){if(t<=0)return!1;let r=n=>Pe(n,t-1);if(Wn(e))return rt(e.pattern??e.regex.pattern)<=5;if(rr(e)||Cu(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(` -`))&&e.expressions.every(r);if(re(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(G(e))return e.elements.every(n=>n===null||r(n));if(pt(e)){if(e.type==="ImportExpression"||Pe(e.callee,t)){let n=xe(e);return n.length<=t&&n.every(r)}return!1}return R(e)?Pe(e.object,t)&&Pe(e.property,t):e.type==="UnaryExpression"&&Lo.has(e.operator)||e.type==="UpdateExpression"?Pe(e.argument,t):e.type==="TSNonNullExpression"?Pe(e.expression,t):!1}function me(e){var t;return((t=e.extra)==null?void 0:t.raw)??e.raw}function hu(e){return e}function De(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function ue(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ue(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return ue(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:ue(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:ue(e.callee,t);case"ConditionalExpression":return ue(e.test,t);case"UpdateExpression":return!e.prefix&&ue(e.argument,t);case"BindExpression":return e.object&&ue(e.object,t);case"SequenceExpression":return ue(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ue(e.expression,t);default:return t(e)}}var fu={"==":!0,"!=":!0,"===":!0,"!==":!0},wr={"*":!0,"/":!0,"%":!0},qn={">>":!0,">>>":!0,"<<":!0};function sr(e,t){return!(Zt(t)!==Zt(e)||e==="**"||fu[e]&&fu[t]||t==="%"&&wr[e]||e==="%"&&wr[t]||t!==e&&wr[t]&&wr[e]||qn[e]&&qn[t])}var wo=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function Zt(e){return wo.get(e)}function Su(e){return!!qn[e]||e==="|"||e==="^"||e==="&"}function Bu(e){var r;if(e.rest)return!0;let t=V(e);return((r=w(!1,t,-1))==null?void 0:r.type)==="RestElement"}var Mn=new WeakMap;function V(e){if(Mn.has(e))return Mn.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),Mn.set(e,t),t}function bu(e,t){let{node:r}=e,n=0,s=u=>t(u,n++);r.this&&e.call(s,"this"),Array.isArray(r.parameters)?e.each(s,"parameters"):Array.isArray(r.params)&&e.each(s,"params"),r.rest&&e.call(s,"rest")}var Rn=new WeakMap;function xe(e){if(Rn.has(e))return Rn.get(e);let t=e.arguments;return e.type==="ImportExpression"&&(t=[e.source],e.attributes&&t.push(e.attributes),e.options&&t.push(e.options)),Rn.set(e,t),t}function Rr(e,t){let{node:r}=e;r.type==="ImportExpression"?(e.call(n=>t(n,0),"source"),r.attributes&&e.call(n=>t(n,1),"attributes"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function Vn(e,t){if(e.type==="ImportExpression"){if(t===0||t===(e.attributes||e.options?-2:-1))return"source";if(e.attributes&&(t===1||t===-1))return"attributes";if(e.options&&(t===1||t===-1))return"options";throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return["arguments",t]}function ur(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function ht(e){return(e==null?void 0:e.prettierIgnore)||A(e,x.PrettierIgnore)}var x={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Pu=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,s)=>!(e&x.Leading&&!r.leading||e&x.Trailing&&!r.trailing||e&x.Dangling&&(r.leading||r.trailing)||e&x.Block&&!Q(r)||e&x.Line&&!tr(r)||e&x.First&&n!==0||e&x.Last&&n!==s.length-1||e&x.PrettierIgnore&&!ur(r)||t&&!t(r))};function A(e,t,r){if(!k(e==null?void 0:e.comments))return!1;let n=Pu(t,r);return n?e.comments.some(n):!0}function ot(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=Pu(t,r);return n?e.comments.filter(n):e.comments}var ye=(e,{originalText:t})=>_t(t,v(e));function pt(e){return I(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Ce(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!e.method&&e.kind==="init")}var ir=Symbol("ifWithoutBlockAndSameLineComment"),Ae=J(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]);function Hn(e,t){var u,i,a,o,p,D,y;if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&jo(r)&&ar(e))return!0;if(Oo(r))return!1;if(r.type==="Identifier"){if((u=r.extra)!=null&&u.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let c=(i=e.findAncestor(f=>f.type==="ForOfStatement"))==null?void 0:i.left;if(c&&ue(c,f=>f===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let c=e.findAncestor(l=>l.type==="ExpressionStatement"||l.type==="ForStatement"||l.type==="ForInStatement"),f=c?c.type==="ExpressionStatement"?c.expression:c.type==="ForStatement"?c.init:c.left:void 0;if(f&&ue(f,l=>l===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"type":{let c=e.findAncestor(f=>!Ae(f));if(c!==s&&c.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let c=(a=e.findAncestor(f=>f.type==="ExpressionStatement"))==null?void 0:a.expression;if(c&&ue(c,f=>f===r))return!0}if(r.type==="ObjectExpression"){let c=(o=e.findAncestor(f=>f.type==="ArrowFunctionExpression"))==null?void 0:o.body;if(c&&c.type!=="SequenceExpression"&&c.type!=="AssignmentExpression"&&ue(c,f=>f===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&k(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return ku(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"){if(R(r)&&r.computed)return!0;let c=!1,f=!1,l=r;for(;l;)switch(l.type){case"MemberExpression":f=!0,l=l.object;break;case"CallExpression":if(f||c)return t.parser!=="typescript";c=!0,l=l.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return t.parser!=="typescript";default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,(c,f)=>f==="returnType"&&c.type==="ArrowFunctionExpression")&&_o(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&vo(e))return!0;if(r.operator==="|>"&&((p=r.extra)!=null&&p.parenthesized)){let c=e.grandparent;if(c.type==="BinaryExpression"&&c.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Ae(r);case"ConditionalExpression":return Ae(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||Ae(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:c,type:f}=r;if(!c&&f!=="TSTypeAssertion")return!0;let l=Zt(c),h=s.operator,g=Zt(h);return g>l||n==="right"&&g===l||g===l&&!sr(h,c)?!0:g");default:return!1}case"TSFunctionType":if(e.match(c=>c.type==="TSFunctionType",(c,f)=>f==="typeAnnotation"&&c.type==="TSTypeAnnotation",(c,f)=>f==="returnType"&&c.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":if(n==="extendsType"&&s.type==="TSConditionalType"){if(r.type==="TSConditionalType")return!0;let{typeAnnotation:c}=r.returnType||r.typeAnnotation;if(c.type==="TSTypePredicate"&&c.typeAnnotation&&(c=c.typeAnnotation.typeAnnotation),c.type==="TSInferType"&&c.typeParameter.constraint)return!0}if(n==="checkType"&&s.type==="TSConditionalType")return!0;case"TSUnionType":case"TSIntersectionType":if((s.type==="TSUnionType"||s.type==="TSIntersectionType")&&s.types.length>1&&(!r.types||r.types.length>1))return!0;case"TSInferType":if(r.type==="TSInferType"&&s.type==="TSRestType")return!1;case"TSTypeOperator":return s.type==="TSArrayType"||s.type==="TSOptionalType"||s.type==="TSRestType"||n==="objectType"&&s.type==="TSIndexedAccessType"||s.type==="TSTypeOperator"||s.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return n==="objectType"&&s.type==="TSIndexedAccessType"||n==="elementType"&&s.type==="TSArrayType";case"TypeofTypeAnnotation":return n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||n==="elementType"&&s.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return s.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return s.type==="ArrayTypeAnnotation"||s.type==="NullableTypeAnnotation"||s.type==="IntersectionTypeAnnotation"||s.type==="UnionTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return s.type==="ArrayTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"FunctionTypeAnnotation":{if(e.match(void 0,(f,l)=>l==="typeAnnotation"&&f.type==="TypeAnnotation",(f,l)=>l==="returnType"&&f.type==="ArrowFunctionExpression")||e.match(void 0,(f,l)=>l==="typeAnnotation"&&f.type==="TypePredicate",(f,l)=>l==="typeAnnotation"&&f.type==="TypeAnnotation",(f,l)=>l==="returnType"&&f.type==="ArrowFunctionExpression"))return!0;let c=s.type==="NullableTypeAnnotation"?e.grandparent:s;return c.type==="UnionTypeAnnotation"||c.type==="IntersectionTypeAnnotation"||c.type==="ArrayTypeAnnotation"||n==="objectType"&&(c.type==="IndexedAccessType"||c.type==="OptionalIndexedAccessType")||n==="checkType"&&s.type==="ConditionalTypeAnnotation"||n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.returnType.type==="InferTypeAnnotation"&&r.returnType.typeParameter.bound||c.type==="NullableTypeAnnotation"||s.type==="FunctionTypeParam"&&s.name===null&&V(r).some(f=>{var l;return((l=f.typeAnnotation)==null?void 0:l.type)==="NullableTypeAnnotation"})}case"ConditionalTypeAnnotation":if(n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.type==="ConditionalTypeAnnotation"||n==="checkType"&&s.type==="ConditionalTypeAnnotation")return!0;case"OptionalIndexedAccessType":return n==="objectType"&&s.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof r.value=="string"&&s.type==="ExpressionStatement"&&!s.directive){let c=e.grandparent;return c.type==="Program"||c.type==="BlockStatement"}return n==="object"&&s.type==="MemberExpression"&&typeof r.value=="number";case"AssignmentExpression":{let c=e.grandparent;return n==="body"&&s.type==="ArrowFunctionExpression"?!0:n==="key"&&(s.type==="ClassProperty"||s.type==="PropertyDefinition")&&s.computed||(n==="init"||n==="update")&&s.type==="ForStatement"?!1:s.type==="ExpressionStatement"?r.left.type==="ObjectPattern":!(n==="key"&&s.type==="TSPropertySignature"||s.type==="AssignmentExpression"||s.type==="SequenceExpression"&&c.type==="ForStatement"&&(c.init===s||c.update===s)||n==="value"&&s.type==="Property"&&c.type==="ObjectPattern"&&c.properties.includes(s)||s.type==="NGChainedExpression")}case"ConditionalExpression":switch(s.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:n==="test";case"MemberExpression":case"OptionalMemberExpression":return n==="object";default:return!1}case"FunctionExpression":switch(s.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(s.type){case"BinaryExpression":return s.operator!=="|>"||((D=r.extra)==null?void 0:D.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return n==="test";default:return!1}case"ClassExpression":switch(s.type){case"NewExpression":return n==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(Mo(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")){let c=r;for(;c;)switch(c.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":c=c.object;break;case"TaggedTemplateExpression":c=c.tag;break;case"TSNonNullExpression":c=c.expression;break;default:return!1}}return!1;case"BindExpression":return n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")||n==="object"&&R(s);case"NGPipeExpression":return!(s.type==="NGRoot"||s.type==="NGMicrosyntaxExpression"||s.type==="ObjectProperty"&&!((y=r.extra)!=null&&y.parenthesized)||G(s)||n==="arguments"&&I(s)||n==="right"&&s.type==="NGPipeExpression"||n==="property"&&s.type==="MemberExpression"||s.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return n==="callee"||n==="left"&&s.type==="BinaryExpression"&&s.operator==="<"||!G(s)&&s.type!=="ArrowFunctionExpression"&&s.type!=="AssignmentExpression"&&s.type!=="AssignmentPattern"&&s.type!=="BinaryExpression"&&s.type!=="NewExpression"&&s.type!=="ConditionalExpression"&&s.type!=="ExpressionStatement"&&s.type!=="JsExpressionRoot"&&s.type!=="JSXAttribute"&&s.type!=="JSXElement"&&s.type!=="JSXExpressionContainer"&&s.type!=="JSXFragment"&&s.type!=="LogicalExpression"&&!I(s)&&!Ce(s)&&s.type!=="ReturnStatement"&&s.type!=="ThrowStatement"&&s.type!=="TypeCastExpression"&&s.type!=="VariableDeclarator"&&s.type!=="YieldExpression";case"TSInstantiationExpression":return n==="object"&&R(s)}return!1}var Oo=J(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function vo(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if((n==null?void 0:n.type)==="ForStatement"&&n.init===r)return!0;r=n}return!1}function _o(e){return er(e,t=>t.type==="ObjectTypeAnnotation"&&er(t,r=>r.type==="FunctionTypeAnnotation"))}function jo(e){return re(e)}function ar(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(ar);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(ar);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(ar);break;case"UnaryExpression":if(t.prefix)return e.callParent(ar);break}return!1}function ku(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!Hn(e,t):!Mt(r)||n.type!=="ExportDefaultDeclaration"&&Hn(e,t)?!1:e.call(()=>ku(e,t),...Or(r))}function Mo(e){let{node:t,parent:r,grandparent:n,key:s}=e;return!!((t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression")&&(s==="object"&&r.type==="MemberExpression"||s==="callee"&&(r.type==="CallExpression"||r.type==="NewExpression")||r.type==="TSNonNullExpression"&&n.type==="MemberExpression"&&n.object===r)||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(u,i)=>i==="expression"&&u.type==="ChainExpression")&&(e.match(void 0,void 0,(u,i)=>i==="callee"&&(u.type==="CallExpression"&&!u.optional||u.type==="NewExpression")||i==="object"&&u.type==="MemberExpression"&&!u.optional)||e.match(void 0,void 0,(u,i)=>i==="expression"&&u.type==="TSNonNullExpression",(u,i)=>i==="object"&&u.type==="MemberExpression"))||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(u,i)=>i==="expression"&&u.type==="TSNonNullExpression",(u,i)=>i==="expression"&&u.type==="ChainExpression",(u,i)=>i==="object"&&u.type==="MemberExpression"))}var ge=Hn;function Ro(e,t){let r=t-1;r=Xe(e,r,{backwards:!0}),r=$e(e,r,{backwards:!0}),r=Xe(e,r,{backwards:!0});let n=$e(e,r,{backwards:!0});return r!==n}var Iu=Ro;var Jo=()=>!0;function Kn(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function qo(e,t){var D;let r=e.node,n=[Kn(e,t)],{printer:s,originalText:u,locStart:i,locEnd:a}=t;if((D=s.isBlockComment)==null?void 0:D.call(s,r)){let y=z(u,a(r))?z(u,i(r),{backwards:!0})?C:d:" ";n.push(y)}else n.push(C);let p=$e(u,Xe(u,a(r)));return p!==!1&&z(u,p)&&n.push(C),n}function Uo(e,t,r){var p;let n=e.node,s=Kn(e,t),{printer:u,originalText:i,locStart:a}=t,o=(p=u.isBlockComment)==null?void 0:p.call(u,n);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||z(i,a(n),{backwards:!0})){let D=Iu(i,a(n));return{doc:wn([C,D?C:"",s]),isBlock:o,hasLineSuffix:!0}}return!o||r!=null&&r.hasLineSuffix?{doc:[wn([" ",s]),ce],isBlock:o,hasLineSuffix:!0}:{doc:[" ",s],isBlock:o,hasLineSuffix:!1}}function j(e,t,r={}){let{node:n}=e;if(!k(n==null?void 0:n.comments))return"";let{indent:s=!1,marker:u,filter:i=Jo}=r,a=[];if(e.each(({node:p})=>{p.leading||p.trailing||p.marker!==u||!i(p)||a.push(Kn(e,t))},"comments"),a.length===0)return"";let o=b(C,a);return s?E([C,o]):o}function zn(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(o=>!n.has(o)).length===0)return{leading:"",trailing:""};let u=[],i=[],a;return e.each(()=>{let o=e.node;if(n!=null&&n.has(o))return;let{leading:p,trailing:D}=o;p?u.push(qo(e,t)):D&&(a=Uo(e,t,a),i.push(a.doc))},"comments"),{leading:u,trailing:i}}function pe(e,t,r){let{leading:n,trailing:s}=zn(e,r);return!n&&!s?t:Kt(t,u=>[n,u,s])}var Qn=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},_e=Qn;function Zn(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var je,es=class{constructor(t){Gs(this,je,void 0);Ns(this,je,new Set(t))}getLeadingWhitespaceCount(t){let r=ut(this,je),n=0;for(let s=0;s=0&&r.has(t.charAt(s));s--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return ut(this,je).has(t.charAt(0))}hasTrailingWhitespace(t){return ut(this,je).has(w(!1,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${Zn([...ut(this,je)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return t.split(s)}hasWhitespaceCharacter(t){let r=ut(this,je);return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=ut(this,je);return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=ut(this,je);return Array.prototype.every.call(t,n=>r.has(n))}};je=new WeakMap;var Lu=es;var as={};Ar(as,{endOfLine:()=>Vo,ownLine:()=>$o,remaining:()=>Ho});function Wo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Xe(e,n),n=Ot(e,n),n=vt(e,n),n=$e(e,n);return n}var ct=Wo;function Go(e,t){let r=ct(e,t);return r===!1?"":e.charAt(r)}var Ve=Go;function No(e,t,r){for(let n=t;n20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function ts(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Yo(e)}function ie(e,t){t.leading=!0,t.trailing=!1,ts(e,t)}function he(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),ts(e,t)}function ne(e,t){t.leading=!1,t.trailing=!0,ts(e,t)}function Xo(e){return Q(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var wu=Xo;function $o(e){return[qu,vu,Mu,zo,ns,ss,Ou,_u,pp,ap,is,Ju,cp,ju,Ru,us,Qo].some(t=>t(e))}function Vo(e){return[Ko,Mu,vu,Ju,ns,ss,Ou,_u,Ru,ip,op,is,Dp,us,Ep,Fp].some(t=>t(e))}function Ho(e){return[qu,ns,ss,Zo,up,ju,is,sp,np,fp,us,yp].some(t=>t(e))}function St(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?ie(r,t):he(e,t)}function rs(e,t){e.type==="BlockStatement"?St(e,t):ie(e,t)}function Ko({comment:e,followingNode:t}){return t&&wu(e)?(ie(t,e),!0):!1}function ns({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(Ve(s,v(e))===")")return ne(t,e),!0;if(t===r.consequent&&n===r.alternate){if(t.type==="BlockStatement")ne(t,e);else{let i=e.type==="SingleLine"||e.loc.start.line===e.loc.end.line,a=e.loc.start.line===t.loc.start.line;i&&a?he(t,e,t.type==="ExpressionStatement"?ir:void 0):he(r,e)}return!0}return n.type==="BlockStatement"?(St(n,e),!0):n.type==="IfStatement"?(rs(n.consequent,e),!0):r.consequent===n?(ie(n,e),!0):!1}function ss({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:Ve(s,v(e))===")"?(ne(t,e),!0):n.type==="BlockStatement"?(St(n,e),!0):r.body===n?(ie(n,e),!0):!1}function Ou({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(ne(t,e),!0):n.type==="BlockStatement"?(St(n,e),!0):n.type==="TryStatement"?(rs(n.finalizer,e),!0):n.type==="CatchClause"?(rs(n.body,e),!0):!1}function zo({comment:e,enclosingNode:t,followingNode:r}){return R(t)&&(r==null?void 0:r.type)==="Identifier"?(ie(t,e),!0):!1}function Qo({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||(t==null?void 0:t.type)==="ConditionalTypeAnnotation"||(t==null?void 0:t.type)==="TSConditionalType")?!1:(r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType"?(he(t,e),!0):!1}function vu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s,options:u}){let i=t&&!Ie(s,v(t),U(e));return(!t||!i)&&((r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType")&&n?u.experimentalTernaries&&r.alternate===n&&!(Q(e)&&!Ie(u.originalText,U(e),v(e)))?(he(r,e),!0):(ie(n,e),!0):!1}function Zo({comment:e,precedingNode:t,enclosingNode:r}){return Ce(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(ne(r.value.left,e),!0):!1}var ep=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function _u({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(ep.has(r==null?void 0:r.type)){if(k(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return ne(w(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return St(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return ne(t,e),!0;for(let s of["implements","extends","mixins"])if(r[s]&&n===r[s][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?ne(t,e):he(r,e,s),!0}}return!1}var tp=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function ju({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&Ve(n,v(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&Ve(n,v(t))!==":"?(ne(t,e),!0):(t==null?void 0:t.type)==="Decorator"&&tp.has(r==null?void 0:r.type)?(ne(t,e),!0):!1}var rp=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function np({comment:e,precedingNode:t,enclosingNode:r,text:n}){return Ve(n,v(e))!=="("?!1:t&&rp.has(r==null?void 0:r.type)?(ne(t,e),!0):!1}function sp({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=ct(r,v(e));return n!==!1&&r.slice(n,n+2)==="=>"?(he(t,e),!0):!1}function up({comment:e,enclosingNode:t,text:r}){return Ve(r,v(e))!==")"?!1:t&&(Uu(t)&&V(t).length===0||pt(t)&&xe(t).length===0)?(he(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&V(t.value).length===0?(he(t.value,e),!0):!1}function Mu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(t==null?void 0:t.type)==="FunctionTypeParam"&&(r==null?void 0:r.type)==="FunctionTypeAnnotation"&&(n==null?void 0:n.type)!=="FunctionTypeParam"?(ne(t,e),!0):((t==null?void 0:t.type)==="Identifier"||(t==null?void 0:t.type)==="AssignmentPattern"||(t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern"||(t==null?void 0:t.type)==="RestElement"||(t==null?void 0:t.type)==="TSParameterProperty")&&Uu(r)&&Ve(s,v(e))===")"?(ne(t,e),!0):!Q(e)&&((r==null?void 0:r.type)==="FunctionDeclaration"||(r==null?void 0:r.type)==="FunctionExpression"||(r==null?void 0:r.type)==="ObjectMethod")&&(n==null?void 0:n.type)==="BlockStatement"&&r.body===n&&ct(s,v(e))===U(n)?(St(n,e),!0):!1}function Ru({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="LabeledStatement"?(ie(t,e),!0):!1}function us({comment:e,enclosingNode:t}){return((t==null?void 0:t.type)==="ContinueStatement"||(t==null?void 0:t.type)==="BreakStatement")&&!t.label?(ne(t,e),!0):!1}function ip({comment:e,precedingNode:t,enclosingNode:r}){return I(r)&&t&&r.callee===t&&r.arguments.length>0?(ie(r.arguments[0],e),!0):!1}function ap({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)==="UnionTypeAnnotation"||(r==null?void 0:r.type)==="TSUnionType"?(ur(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(ne(t,e),!0):!1):(((n==null?void 0:n.type)==="UnionTypeAnnotation"||(n==null?void 0:n.type)==="TSUnionType")&&ur(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function op({comment:e,enclosingNode:t}){return Ce(t)?(ie(t,e),!0):!1}function is({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:s}){var u;return((u=n==null?void 0:n.body)==null?void 0:u.length)===0?(s?he(n,e):ie(n,e),!0):(t==null?void 0:t.type)==="Program"&&t.body.length===0&&!k(t.directives)?(s?he(t,e):ie(t,e),!0):(r==null?void 0:r.type)==="Program"&&r.body.length===0&&(t==null?void 0:t.type)==="ModuleExpression"?(he(r,e),!0):!1}function pp({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="ForInStatement"||(t==null?void 0:t.type)==="ForOfStatement"?(ie(t,e),!0):!1}function Ju({comment:e,precedingNode:t,enclosingNode:r,text:n}){if((r==null?void 0:r.type)==="ImportSpecifier"||(r==null?void 0:r.type)==="ExportSpecifier")return ie(r,e),!0;let s=(t==null?void 0:t.type)==="ImportSpecifier"&&(r==null?void 0:r.type)==="ImportDeclaration",u=(t==null?void 0:t.type)==="ExportSpecifier"&&(r==null?void 0:r.type)==="ExportNamedDeclaration";return(s||u)&&z(n,v(e))?(ne(t,e),!0):!1}function cp({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="AssignmentPattern"?(ie(t,e),!0):!1}var lp=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),mp=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function Dp({comment:e,enclosingNode:t,followingNode:r}){return lp.has(t==null?void 0:t.type)&&r&&(mp.has(r.type)||Q(e))?(ie(r,e),!0):!1}function yp({comment:e,enclosingNode:t,followingNode:r,text:n}){return!r&&((t==null?void 0:t.type)==="TSMethodSignature"||(t==null?void 0:t.type)==="TSDeclareFunction"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Ve(n,v(e))===";"?(ne(t,e),!0):!1}function qu({comment:e,enclosingNode:t,followingNode:r}){if(ur(e)&&(t==null?void 0:t.type)==="TSMappedType"&&(r==null?void 0:r.type)==="TSTypeParameter"&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function fp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TSMappedType"?!1:(n==null?void 0:n.type)==="TSTypeParameter"&&n.name?(ie(n.name,e),!0):(t==null?void 0:t.type)==="TSTypeParameter"&&t.constraint?(ne(t.constraint,e),!0):!1}function Ep({comment:e,enclosingNode:t,followingNode:r}){return!t||t.type!=="SwitchCase"||t.test||!r||r!==t.consequent[0]?!1:(r.type==="BlockStatement"&&tr(e)?St(r,e):he(t,e),!0)}function Fp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return t&&(t.type==="TSUnionType"||t.type==="UnionTypeAnnotation")&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&n===void 0||r.type==="TSIntersectionType"||r.type==="IntersectionTypeAnnotation")?(ne(w(!1,t.types,-1),e),!0):!1}var Uu=J(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);function Cp(e){let t=`*${e.value}*`.split(` -`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Wu=Cp;function Gu(e,t){let r=e.node;if(tr(r))return t.originalText.slice(U(r),v(r)).trimEnd();if(Q(r))return Wu(r)?Ap(r):["/*",be(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Ap(e){let t=e.value.split(` -`);return["/*",b(C,t.map((r,n)=>n===0?r.trimEnd():" "+(ne===""||e===d||e===C||e===F;function hp(e,t,r){var O,M,_;let{node:n}=e;if(n.type==="JSXElement"&&Rp(n))return[r("openingElement"),r("closingElement")];let s=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),u=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[s,...e.map(r,"children"),u];n.children=n.children.map(T=>Jp(T)?{type:"JSXText",value:" ",raw:" "}:T);let i=n.children.some(N),a=n.children.filter(T=>T.type==="JSXExpressionContainer").length>1,o=n.type==="JSXElement"&&n.openingElement.attributes.length>1,p=K(s)||i||o||a,D=e.parent.rootMarker==="mdx",y=t.singleQuote?"{' '}":'{" "}',c=D?" ":B([y,F]," "),f=((M=(O=n.openingElement)==null?void 0:O.name)==null?void 0:M.name)==="fbt",l=Sp(e,t,r,c,f),h=n.children.some(T=>or(T));for(let T=l.length-2;T>=0;T--){let q=l[T]===""&&l[T+1]==="",fe=l[T]===C&&l[T+1]===""&&l[T+2]===C,Y=(l[T]===F||l[T]===C)&&l[T+1]===""&&l[T+2]===c,de=l[T]===c&&l[T+1]===""&&(l[T+2]===F||l[T+2]===C),se=l[T]===c&&l[T+1]===""&&l[T+2]===c,It=l[T]===F&&l[T+1]===""&&l[T+2]===C||l[T]===C&&l[T+1]===""&&l[T+2]===F;fe&&h||q||Y||se||It?l.splice(T,2):de&&l.splice(T+1,2)}for(;l.length>0&&ps(w(!1,l,-1));)l.pop();for(;l.length>1&&ps(l[0])&&ps(l[1]);)l.shift(),l.shift();let g=[];for(let[T,q]of l.entries()){if(q===c){if(T===1&&l[T-1]===""){if(l.length===2){g.push(y);continue}g.push([y,C]);continue}else if(T===l.length-1){g.push(y);continue}else if(l[T-1]===""&&l[T-2]===C){g.push(y);continue}}g.push(q),K(q)&&(p=!0)}let S=h?Lt(g):m(g,{shouldBreak:!0});if(((_=t.cursorNode)==null?void 0:_.type)==="JSXText"&&n.children.includes(t.cursorNode)&&(S=[vn,S,vn]),D)return S;let P=m([s,E([C,S]),C,u]);return p?P:Ye([m([s,...l,u]),P])}function Sp(e,t,r,n,s){let u=[];return e.each(({node:i,next:a})=>{if(i.type==="JSXText"){let o=me(i);if(or(i)){let p=Jr.split(o,!0);p[0]===""&&(u.push(""),p.shift(),/\n/.test(p[0])?u.push(Yu(s,p[1],i,a)):u.push(n),p.shift());let D;if(w(!1,p,-1)===""&&(p.pop(),D=p.pop()),p.length===0)return;for(let[y,c]of p.entries())y%2===1?u.push(d):u.push(c);D!==void 0?/\n/.test(D)?u.push(Yu(s,w(!1,u,-1),i,a)):u.push(n):u.push(Nu(s,w(!1,u,-1),i,a))}else/\n/.test(o)?o.match(/\n/g).length>1&&u.push("",C):u.push("",n)}else{let o=r();if(u.push(o),a&&or(a)){let D=Jr.trim(me(a)),[y]=Jr.split(D);u.push(Nu(s,y,i,a))}else u.push(C)}},"children"),u}function Nu(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?F:C:F}function Yu(e,t,r,n){return e?C:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?C:F:C}var Bp=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function bp(e,t,r){let{parent:n}=e;if(Bp.has(n.type))return t;let s=e.match(void 0,i=>i.type==="ArrowFunctionExpression",I,i=>i.type==="JSXExpressionContainer"),u=ge(e,r);return m([u?"":B("("),E([F,t]),F,u?"":B(")")],{shouldBreak:s})}function Pp(e,t,r){let{node:n}=e,s=[];if(s.push(r("name")),n.value){let u;if(Z(n.value)){let i=me(n.value),a=H(!1,H(!1,i.slice(1,-1),"'","'"),""",'"'),o=kr(a,t.jsxSingleQuote);a=o==='"'?H(!1,a,'"',"""):H(!1,a,"'","'"),u=e.call(()=>pe(e,be(o+a+o),t),"value")}else u=r("value");s.push("=",u)}return s}function kp(e,t,r){let{node:n}=e,s=(u,i)=>u.type==="JSXEmptyExpression"||!A(u)&&(G(u)||re(u)||u.type==="ArrowFunctionExpression"||u.type==="AwaitExpression"&&(s(u.argument,u)||u.argument.type==="JSXElement")||I(u)||u.type==="ChainExpression"&&I(u.expression)||u.type==="FunctionExpression"||u.type==="TemplateLiteral"||u.type==="TaggedTemplateExpression"||u.type==="DoExpression"||N(i)&&(u.type==="ConditionalExpression"||le(u)));return s(n.expression,e.parent)?m(["{",r("expression"),Be,"}"]):m(["{",E([F,r("expression")]),F,Be,"}"])}function Ip(e,t,r){var a,o;let{node:n}=e,s=A(n.name)||A(n.typeParameters)||A(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!s)return["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((a=n.attributes)==null?void 0:a.length)===1&&n.attributes[0].value&&Z(n.attributes[0].value)&&!n.attributes[0].value.value.includes(` -`)&&!s&&!A(n.attributes[0]))return m(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let u=(o=n.attributes)==null?void 0:o.some(p=>p.value&&Z(p.value)&&p.value.value.includes(` -`)),i=t.singleAttributePerLine&&n.attributes.length>1?C:d;return m(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters"),E(e.map(()=>[i,r()],"attributes")),...Lp(n,t,s)],{shouldBreak:u})}function Lp(e,t,r){return e.selfClosing?[d,"/>"]:wp(e,t,r)?[">"]:[F,">"]}function wp(e,t,r){let n=e.attributes.length>0&&A(w(!1,e.attributes,-1),x.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function Op(e,t,r){let{node:n}=e,s=[];s.push(""),s}function vp(e,t){let{node:r}=e,n=A(r),s=A(r,x.Line),u=r.type==="JSXOpeningFragment";return[u?"<":""]}function _p(e,t,r){let n=pe(e,hp(e,t,r),t);return bp(e,n,t)}function jp(e,t){let{node:r}=e,n=A(r,x.Line);return[j(e,t,{indent:n}),n?C:""]}function Mp(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let u=["...",r()];return!A(s)||!os(e)?u:[E([F,pe(e,u,t)]),F]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Xu(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return Pp(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return b(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return b(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return Mp(e,t,r);case"JSXExpressionContainer":return kp(e,t,r);case"JSXFragment":case"JSXElement":return _p(e,t,r);case"JSXOpeningElement":return Ip(e,t,r);case"JSXClosingElement":return Op(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return vp(e,t);case"JSXEmptyExpression":return jp(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new _e(n,"JSX")}}function Rp(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!or(t)}function or(e){return e.type==="JSXText"&&(Jr.hasNonWhitespaceCharacter(me(e))||!/\n/.test(me(e)))}function Jp(e){return e.type==="JSXExpressionContainer"&&Z(e.expression)&&e.expression.value===" "&&!A(e.expression)}function $u(e){let{node:t,parent:r}=e;if(!N(t)||!N(r))return!1;let{index:n,siblings:s}=e,u;for(let i=n;i>0;i--){let a=s[i-1];if(!(a.type==="JSXText"&&!or(a))){u=a;break}}return(u==null?void 0:u.type)==="JSXExpressionContainer"&&u.expression.type==="JSXEmptyExpression"&&ht(u.expression)}function qp(e){return ht(e.node)||$u(e)}var qr=qp;var Up=0;function Ur(e,t,r){var M;let{node:n,parent:s,grandparent:u,key:i}=e,a=i!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),o=n.operator==="|>"&&((M=e.root.extra)==null?void 0:M.__isUsingHackPipeline),p=cs(e,r,t,!1,a);if(a)return p;if(o)return m(p);if(I(s)&&s.callee===n||s.type==="UnaryExpression"||R(s)&&!s.computed)return m([E([F,...p]),F]);let D=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&u.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&u.type==="NGMicrosyntax"&&u.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&u.type!=="ReturnStatement"&&u.type!=="ThrowStatement"&&!I(u)||s.type==="TemplateLiteral",y=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Ce(s),c=le(n.left)&&sr(n.operator,n.left.operator);if(D||Jt(n)&&!c||!Jt(n)&&y)return m(p);if(p.length===0)return"";let f=N(n.right),l=p.findIndex(_=>typeof _!="string"&&!Array.isArray(_)&&_.type===ae),h=p.slice(0,l===-1?1:l+1),g=p.slice(h.length,f?-1:void 0),S=Symbol("logicalChain-"+ ++Up),P=m([...h,E(g)],{id:S});if(!f)return P;let O=w(!1,p,-1);return m([P,Et(O,{groupId:S})])}function cs(e,t,r,n,s){var h;let{node:u}=e;if(!le(u))return[m(t())];let i=[];sr(u.operator,u.left.operator)?i=e.call(g=>cs(g,t,r,!0,s),"left"):i.push(m(t("left")));let a=Jt(u),o=(u.operator==="|>"||u.type==="NGPipeExpression"||Wp(e,r))&&!ve(r.originalText,u.right),p=u.type==="NGPipeExpression"?"|":u.operator,D=u.type==="NGPipeExpression"&&u.arguments.length>0?m(E([F,": ",b([d,": "],e.map(()=>Fe(2,m(t())),"arguments"))])):"",y;if(a)y=[p," ",t("right"),D];else{let S=p==="|>"&&((h=e.root.extra)==null?void 0:h.__isUsingHackPipeline)?e.call(P=>cs(P,t,r,!0,s),"right"):t("right");y=[o?d:"",p,o?" ":d,S,D]}let{parent:c}=e,f=A(u.left,x.Trailing|x.Line),l=f||!(s&&u.type==="LogicalExpression")&&c.type!==u.type&&u.left.type!==u.type&&u.right.type!==u.type;if(i.push(o?"":" ",l?m(y,{shouldBreak:f}):y),n&&A(u)){let g=wt(pe(e,i,r));return Array.isArray(g)||g.type===Ee?hr(g):[g]}return i}function Jt(e){return e.type!=="LogicalExpression"?!1:!!(re(e.right)&&e.right.properties.length>0||G(e.right)&&e.right.elements.length>0||N(e.right))}var Vu=e=>e.type==="BinaryExpression"&&e.operator==="|";function Wp(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&Vu(e.node)&&!e.hasAncestor(r=>!Vu(r)&&r.type!=="JsExpressionRoot")}var lt=class extends Error{name="ArgExpansionBailout"};function Gp(e,t,r,n){let{node:s}=e;return A(s,x.Dangling)?m([r,j(e,t,{indent:!0}),F,n]):[r,n]}function qt(e,t,r){let{node:n}=e,s=[],u=n.type==="TupleExpression"?"#[":"[",i="]",a=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",o=n[a];if(o.length===0)s.push(Gp(e,t,u,i));else{let p=w(!1,o,-1),D=(p==null?void 0:p.type)!=="RestElement",y=p===null,c=Symbol("array"),f=!t.__inJestEach&&o.length>1&&o.every((g,S,P)=>{let O=g==null?void 0:g.type;if(!G(g)&&!re(g))return!1;let M=P[S+1];if(M&&O!==M.type)return!1;let _=G(g)?"elements":"properties";return g[_]&&g[_].length>1}),l=ls(n,t),h=D?y?",":De(t)?l?B(",","",{groupId:c}):B(","):"":"";s.push(m([u,E([F,l?Yp(e,t,r,h):[Np(e,t,a,r),h],j(e,t)]),F,i],{shouldBreak:f,id:c}))}return s.push($(e),X(e,r)),s}function ls(e,t){return G(e)&&e.elements.length>1&&e.elements.every(r=>r&&(ke(r)||Un(r)&&!A(r.argument))&&!A(r,x.Trailing|x.Line,n=>!z(t.originalText,U(n),{backwards:!0})))}function Hu({node:e},{originalText:t}){let r=s=>Ot(t,vt(t,s)),n=s=>t[s]===","?s:n(r(s+1));return _t(t,n(v(e)))}function Np(e,t,r,n){let s=[];return e.each(({node:u,isLast:i})=>{s.push(u?m(n()):""),i||s.push([",",d,u&&Hu(e,t)?F:""])},r),s}function Yp(e,t,r,n){let s=[];return e.each(({isLast:u,next:i})=>{s.push([r(),u?n:","]),u||s.push(Hu(e,t)?[C,C]:A(i,x.Leading|x.Line)?C:d)},"elements"),Lt(s)}function Xp(e,t,r){let{node:n}=e,s=xe(n);if(s.length===0)return["(",j(e,t),")"];if(Hp(s))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let u=!1,i=s.length-1,a=[];Rr(e,({node:c},f)=>{let l=r();f===i||(ye(c,t)?(u=!0,l=[l,",",C,C]):l=[l,",",d]),a.push(l)});let p=!(n.type==="ImportExpression"||n.callee.type==="Import")&&De(t,"all")?",":"";function D(){return m(["(",E([d,...a]),p,d,")"],{shouldBreak:!0})}if(u||e.parent.type!=="Decorator"&&gu(s))return D();if(Vp(s)){let c=a.slice(1);if(c.some(K))return D();let f;try{f=r(Vn(n,0),{expandFirstArg:!0})}catch(l){if(l instanceof lt)return D();throw l}return K(f)?[ce,Ye([["(",m(f,{shouldBreak:!0}),", ",...c,")"],D()])]:Ye([["(",f,", ",...c,")"],["(",m(f,{shouldBreak:!0}),", ",...c,")"],D()])}if($p(s,a,t)){let c=a.slice(0,-1);if(c.some(K))return D();let f;try{f=r(Vn(n,-1),{expandLastArg:!0})}catch(l){if(l instanceof lt)return D();throw l}return K(f)?[ce,Ye([["(",...c,m(f,{shouldBreak:!0}),")"],D()])]:Ye([["(",...c,f,")"],["(",...c,m(f,{shouldBreak:!0}),")"],D()])}let y=["(",E([F,...a]),B(p),F,")"];return Mr(e)?y:m(y,{shouldBreak:a.some(K)||u})}function pr(e,t=!1){return re(e)&&(e.properties.length>0||A(e))||G(e)&&(e.elements.length>0||A(e))||e.type==="TSTypeAssertion"&&pr(e.expression)||Ae(e)&&pr(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||Kp(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&pr(e.body,!0)||re(e.body)||G(e.body)||!t&&(I(e.body)||e.body.type==="ConditionalExpression")||N(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function $p(e,t,r){var u,i;let n=w(!1,e,-1);if(e.length===1){let a=w(!1,t,-1);if((u=a.label)!=null&&u.embed&&((i=a.label)==null?void 0:i.hug)!==!1)return!0}let s=w(!1,e,-2);return!A(n,x.Leading)&&!A(n,x.Trailing)&&pr(n)&&(!s||s.type!==n.type)&&(e.length!==2||s.type!=="ArrowFunctionExpression"||!G(n))&&!(e.length>1&&ls(n,r))}function Vp(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&zp(r)?!0:!A(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&Ku(r)&&!pr(r)}function Ku(e){var t;if(e.type==="ParenthesizedExpression")return Ku(e.expression);if(Ae(e)||e.type==="TypeCastExpression"){let{typeAnnotation:r}=e;return r.type==="TypeAnnotation"&&(r=r.typeAnnotation),r.type==="TSArrayType"&&(r=r.elementType,r.type==="TSArrayType"&&(r=r.elementType)),(r.type==="GenericTypeAnnotation"||r.type==="TSTypeReference")&&((t=r.typeParameters)==null?void 0:t.params.length)===1&&(r=r.typeParameters.params[0]),Rt(r)&&Pe(e.expression,1)}return pt(e)&&xe(e).length>1?!1:le(e)?Pe(e.left,1)&&Pe(e.right,1):Wn(e)||Pe(e)}function Hp(e){return e.length===2&&e[0].type==="ArrowFunctionExpression"&&V(e[0]).length===0&&e[0].body.type==="BlockStatement"&&e[1].type==="ArrayExpression"&&!e.some(t=>A(t))}function Kp(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||A(e,x.Dangling))}function zp(e){return e.type==="ObjectExpression"&&e.properties.length===1&&Ce(e.properties[0])&&e.properties[0].key.type==="Identifier"&&e.properties[0].key.name==="type"&&Z(e.properties[0].value)&&e.properties[0].value.value==="module"}var cr=Xp;function zu(e,t,r){var p;let n=r("object"),s=ms(e,t,r),{node:u,parent:i}=e,a=e.findAncestor(D=>!(R(D)||D.type==="TSNonNullExpression")),o=a&&(a.type==="NewExpression"||a.type==="BindExpression"||a.type==="AssignmentExpression"&&a.left.type!=="Identifier")||u.computed||u.object.type==="Identifier"&&u.property.type==="Identifier"&&!R(i)||(i.type==="AssignmentExpression"||i.type==="VariableDeclarator")&&(I(u.object)&&u.object.arguments.length>0||u.object.type==="TSNonNullExpression"&&I(u.object.expression)&&u.object.expression.arguments.length>0||((p=n.label)==null?void 0:p.memberChain));return tt(n.label,[n,o?s:m(E([F,s]))])}function ms(e,t,r){let n=r("property"),{node:s}=e,u=$(e);return s.computed?!s.property||ke(s.property)?[u,"[",n,"]"]:m([u,"[",E([F,n]),F,"]"]):[u,".",n]}function Qp(e,t,r){let{parent:n}=e,s=!n||n.type==="ExpressionStatement",u=[];function i(L){let{originalText:W}=t,te=ct(W,v(L));return W.charAt(te)===")"?te!==!1&&_t(W,te+1):ye(L,t)}function a(L){let{node:W}=L;I(W)&&(Ct(W.callee)||I(W.callee))?(u.unshift({node:W,printed:[pe(L,[$(L),He(L,t,r),cr(L,t,r)],t),i(W)?C:""]}),L.call(te=>a(te),"callee")):Ct(W)?(u.unshift({node:W,needsParens:ge(L,t),printed:pe(L,R(W)?ms(L,t,r):Wr(L,t,r),t)}),L.call(te=>a(te),"object")):W.type==="TSNonNullExpression"?(u.unshift({node:W,printed:pe(L,"!",t)}),L.call(te=>a(te),"expression")):u.unshift({node:W,printed:r()})}let{node:o}=e;u.unshift({node:o,printed:[$(e),He(e,t,r),cr(e,t,r)]}),o.callee&&e.call(L=>a(L),"callee");let p=[],D=[u[0]],y=1;for(;y0&&p.push(D);function f(L){return/^[A-Z]|^[$_]+$/.test(L)}function l(L){return L.length<=t.tabWidth}function h(L){var st;let W=(st=L[1][0])==null?void 0:st.node.computed;if(L[0].length===1){let xt=L[0][0].node;return xt.type==="ThisExpression"||xt.type==="Identifier"&&(f(xt.name)||s&&l(xt.name)||W)}let te=w(!1,L[0],-1).node;return R(te)&&te.property.type==="Identifier"&&(f(te.property.name)||W)}let g=p.length>=2&&!A(p[1][0].node)&&h(p);function S(L){let W=L.map(te=>te.printed);return L.length>0&&w(!1,L,-1).needsParens?["(",...W,")"]:W}function P(L){return L.length===0?"":E(m([C,b(C,L.map(S))]))}let O=p.map(S),M=O,_=g?3:2,T=p.flat(),q=T.slice(1,-1).some(L=>A(L.node,x.Leading))||T.slice(0,-1).some(L=>A(L.node,x.Trailing))||p[_]&&A(p[_][0].node,x.Leading);if(p.length<=_&&!q)return Mr(e)?M:m(M);let fe=w(!1,p[g?1:0],-1).node,Y=!I(fe)&&i(fe),de=[S(p[0]),g?p.slice(1,2).map(S):"",Y?C:"",P(p.slice(g?2:1))],se=u.map(({node:L})=>L).filter(I);function It(){let L=w(!1,w(!1,p,-1),-1).node,W=w(!1,O,-1);return I(L)&&K(W)&&se.slice(0,-1).some(te=>te.arguments.some(jt))}let Xt;return q||se.length>2&&se.some(L=>!L.arguments.every(W=>Pe(W)))||O.slice(0,-1).some(K)||It()?Xt=m(de):Xt=[K(M)||Y?ce:"",Ye([M,de])],tt({memberChain:!0},Xt)}var Qu=Qp;function Gr(e,t,r){var y;let{node:n,parent:s}=e,u=n.type==="NewExpression",i=n.type==="ImportExpression",a=$(e),o=xe(n),p=o.length===1&&_r(o[0],t.originalText);if(p||o.length>0&&!u&&!i&&(ec(n,s)||gt(n,s))){let c=[];if(Rr(e,()=>{c.push(r())}),!(p&&((y=c[0].label)!=null&&y.embed)))return[u?"new ":"",r("callee"),a,He(e,t,r),"(",b(", ",c),")"]}if(!i&&!u&&Ct(n.callee)&&!e.call(c=>ge(c,t),"callee"))return Qu(e,t,r);let D=[u?"new ":"",i?Zp(n):r("callee"),a,He(e,t,r),cr(e,t,r)];return i||I(n.callee)?m(D):D}function Zp(e){return e.phase?`import.${e.phase}`:"import"}function ec(e,t){if(e.callee.type!=="Identifier")return!1;if(e.callee.name==="require"){let r=xe(e);return r.length===1&&Z(r[0])||r.length>1}if(e.callee.name==="define"){let r=xe(e);return t.type==="ExpressionStatement"&&(r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&Z(r[0])&&r[1].type==="ArrayExpression")}return!1}function At(e,t,r,n,s,u){let i=tc(e,t,r,n,u),a=u?r(u,{assignmentLayout:i}):"";switch(i){case"break-after-operator":return m([m(n),s,m(E([d,a]))]);case"never-break-after-operator":return m([m(n),s," ",a]);case"fluid":{let o=Symbol("assignment");return m([m(n),s,m(E(d),{id:o}),Be,Et(a,{groupId:o})])}case"break-lhs":return m([n,s," ",m(a)]);case"chain":return[m(n),s,d,a];case"chain-tail":return[m(n),s,E([d,a])];case"chain-tail-arrow-chain":return[m(n),s,a];case"only-left":return n}}function ei(e,t,r){let{node:n}=e;return At(e,t,r,r("left"),[" ",n.operator],"right")}function ti(e,t,r){return At(e,t,r,r("id")," =","init")}function tc(e,t,r,n,s){let{node:u}=e,i=u[s];if(!i)return"only-left";let a=!Nr(i);if(e.match(Nr,ri,c=>!a||c.type!=="ExpressionStatement"&&c.type!=="VariableDeclaration"))return a?i.type==="ArrowFunctionExpression"&&i.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&Nr(i.right)||ve(t.originalText,i))return"break-after-operator";if(i.type==="CallExpression"&&i.callee.name==="require"||t.parser==="json5"||t.parser==="json")return"never-break-after-operator";let D=Zs(n);if(nc(u)||sc(u)||ac(u)||Ds(u)&&D)return"break-lhs";let y=pc(u,n,t);return e.call(()=>rc(e,t,r,y),s)?"break-after-operator":!D&&(y||i.type==="TemplateLiteral"||i.type==="TaggedTemplateExpression"||i.type==="BooleanLiteral"||ke(i)||i.type==="ClassExpression")?"never-break-after-operator":"fluid"}function rc(e,t,r,n){let s=e.node;if(le(s)&&!Jt(s))return!0;switch(s.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries)break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:p}=s;return le(p)&&!Jt(p)}let{consequent:a,alternate:o}=s;return a.type==="ConditionalExpression"||o.type==="ConditionalExpression"}case"ClassExpression":return k(s.decorators)}if(n)return!1;let u=s,i=[];for(;;)if(u.type==="UnaryExpression"||u.type==="AwaitExpression"||u.type==="YieldExpression"&&u.argument!==null)u=u.argument,i.push("argument");else if(u.type==="TSNonNullExpression")u=u.expression,i.push("expression");else break;return!!(Z(u)||e.call(()=>ni(e,t,r),...i))}function nc(e){if(ri(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>{var n;return Ce(r)&&(!r.shorthand||((n=r.value)==null?void 0:n.type)==="AssignmentPattern")})}return!1}function Nr(e){return e.type==="AssignmentExpression"}function ri(e){return Nr(e)||e.type==="VariableDeclarator"}function sc(e){let t=ic(e);if(k(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}var uc=J(["TSTypeAliasDeclaration","TypeAlias"]);function ic(e){var t;if(uc(e))return(t=e.typeParameters)==null?void 0:t.params}function ac(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=Zu(t.typeAnnotation);return k(r)&&r.length>1&&r.some(n=>k(Zu(n))||n.type==="TSConditionalType")}function Ds(e){var t;return e.type==="VariableDeclarator"&&((t=e.init)==null?void 0:t.type)==="ArrowFunctionExpression"}var oc=J(["TSTypeReference","GenericTypeAnnotation"]);function Zu(e){var t;if(oc(e))return(t=e.typeParameters)==null?void 0:t.params}function ni(e,t,r,n=!1){var i;let{node:s}=e,u=()=>ni(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(u,"expression");if(I(s)){if((i=Gr(e,t,r).label)!=null&&i.memberChain)return!1;let o=xe(s);return!(o.length===0||o.length===1&&nr(o[0],t))||cc(s,r)?!1:e.call(u,"callee")}return R(s)?e.call(u,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function pc(e,t,r){if(!Ce(e))return!1;t=wt(t);let n=3;return typeof t=="string"&&rt(t)1)return!0;if(r.length===1){let s=r[0];if(s.type==="TSUnionType"||s.type==="UnionTypeAnnotation"||s.type==="TSIntersectionType"||s.type==="IntersectionTypeAnnotation"||s.type==="TSTypeLiteral"||s.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(K(t(n)))return!0}return!1}function lc(e){var t;return(t=e.typeParameters??e.typeArguments)==null?void 0:t.params}function mt(e,t,r,n,s){let u=e.node,i=V(u),a=s?He(e,r,t):"";if(i.length===0)return[a,"(",j(e,r,{filter:l=>Ve(r.originalText,v(l))===")"}),")"];let{parent:o}=e,p=gt(o),D=ys(u),y=[];if(bu(e,(l,h)=>{let g=h===i.length-1;g&&u.rest&&y.push("..."),y.push(t()),!g&&(y.push(","),p||D?y.push(" "):ye(i[h],r)?y.push(C,C):y.push(d))}),n&&!Dc(e)){if(K(a)||K(y))throw new lt;return m([Ht(a),"(",Ht(y),")"])}let c=i.every(l=>!k(l.decorators));return D&&c?[a,"(",...y,")"]:p?[a,"(",...y,")"]:(vr(o)||Au(o)||o.type==="TypeAlias"||o.type==="UnionTypeAnnotation"||o.type==="TSUnionType"||o.type==="IntersectionTypeAnnotation"||o.type==="FunctionTypeAnnotation"&&o.returnType===u)&&i.length===1&&i[0].name===null&&u.this!==i[0]&&i[0].typeAnnotation&&u.typeParameters===null&&Rt(i[0].typeAnnotation)&&!u.rest?r.arrowParens==="always"?["(",...y,")"]:y:[a,"(",E([F,...y]),B(!Bu(u)&&De(r,"all")?",":""),F,")"]}function ys(e){if(!e)return!1;let t=V(e);if(t.length!==1)return!1;let[r]=t;return!A(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Oe(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Oe(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||re(r.right)&&r.right.properties.length===0||G(r.right)&&r.right.elements.length===0))}function mc(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function Bt(e,t){var s;let r=mc(e);if(!r)return!1;let n=(s=e.typeParameters)==null?void 0:s.params;if(n){if(n.length>1)return!1;if(n.length===1){let u=n[0];if(u.constraint||u.default)return!1}}return V(e).length===1&&(Oe(r)||K(t))}function Dc(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function si(e){let t=V(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}function fs(e){if(Rt(e)||Oe(e))return!0;if(e.type==="UnionTypeAnnotation"||e.type==="TSUnionType"){let t=e.types.filter(s=>s.type==="VoidTypeAnnotation"||s.type==="TSVoidKeyword"||s.type==="NullLiteralTypeAnnotation"||s.type==="TSNullKeyword").length,r=e.types.some(s=>s.type==="ObjectTypeAnnotation"||s.type==="TSTypeLiteral"||s.type==="GenericTypeAnnotation"||s.type==="TSTypeReference"),n=e.types.some(s=>A(s));if(e.types.length-1===t&&r&&!n)return!0}return!1}function ui(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[ee(e),"opaque type ",r("id"),r("typeParameters")];return s.supertype&&u.push(": ",r("supertype")),s.impltype&&u.push(" = ",r("impltype")),u.push(n),u}function Yr(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[ee(e)];u.push("type ",r("id"),r("typeParameters"));let i=s.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[At(e,t,r,u," =",i),n]}function Xr(e,t,r){let n=!1;return m(e.map(({isFirst:s,previous:u,node:i,index:a})=>{let o=r();if(s)return o;let p=Oe(i),D=Oe(u);return D&&p?[" & ",n?E(o):o]:!D&&!p?E([" &",d,o]):(a>1&&(n=!0),[" & ",a>1?E(o):o])},"types"))}function $r(e,t,r){let{node:n}=e,{parent:s}=e,u=s.type!=="TypeParameterInstantiation"&&(s.type!=="TSConditionalType"||!t.experimentalTernaries)&&(s.type!=="ConditionalTypeAnnotation"||!t.experimentalTernaries)&&s.type!=="TSTypeParameterInstantiation"&&s.type!=="GenericTypeAnnotation"&&s.type!=="TSTypeReference"&&s.type!=="TSTypeAssertion"&&s.type!=="TupleTypeAnnotation"&&s.type!=="TSTupleType"&&!(s.type==="FunctionTypeParam"&&!s.name&&e.grandparent.this!==s)&&!((s.type==="TypeAlias"||s.type==="VariableDeclarator"||s.type==="TSTypeAliasDeclaration")&&ve(t.originalText,n)),i=fs(n),a=e.map(D=>{let y=r();return i||(y=Fe(2,y)),pe(D,y,t)},"types");if(i)return b(" | ",a);let o=u&&!ve(t.originalText,n),p=[B([o?d:"","| "]),b([d,"| "],a)];return ge(e,t)?m([E(p),F]):(s.type==="TupleTypeAnnotation"||s.type==="TSTupleType")&&s[s.type==="TupleTypeAnnotation"&&s.types?"types":"elementTypes"].length>1?m([E([B(["(",F]),p]),F,B(")")]):m(u?E(p):p)}function yc(e){var n;let{node:t,parent:r}=e;return t.type==="FunctionTypeAnnotation"&&(vr(r)||!((r.type==="ObjectTypeProperty"||r.type==="ObjectTypeInternalSlot")&&!r.variance&&!r.optional&&Ft(r,t)||r.type==="ObjectTypeCallProperty"||((n=e.getParentNode(2))==null?void 0:n.type)==="DeclareFunction"))}function Vr(e,t,r){let{node:n}=e,s=[Ut(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&s.push("new ");let u=mt(e,r,t,!1,!0),i=[];return n.type==="FunctionTypeAnnotation"?i.push(yc(e)?" => ":": ",r("returnType")):i.push(X(e,r,n.returnType?"returnType":"typeAnnotation")),Bt(n,i)&&(u=m(u)),s.push(u,i),m(s)}function Hr(e,t,r){return[r("objectType"),$(e),"[",r("indexType"),"]"]}function Kr(e,t,r){return["infer ",r("typeParameter")]}function Es(e,t,r){let{node:n}=e;return[n.postfix?"":r,X(e,t),n.postfix?r:""]}function zr(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function Qr(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var fc=new WeakSet;function X(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let s=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let u=e.call(ii,r);(u==="=>"||u===":"&&A(n,x.Leading))&&(s=!0),fc.add(n)}return s?[" ",t(r)]:t(r)}var ii=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function Zr(e,t,r){let n=ii(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function en(e){return[e("elementType"),"[]"]}function tn({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument",n=e.type==="TSTypeQuery"?"typeParameters":"typeArguments";return["typeof ",t(r),t(n)]}function rn(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",X(e,t)]:""]}function $(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":I(t)||R(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function nn(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var Ec=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function ee(e){let{node:t}=e;return t.declare||Ec.has(t.type)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var Fc=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Ut({node:e}){return e.abstract||Fc.has(e.type)?"abstract ":""}function He(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function Wr(e,t,r){return["::",r("callee")]}function Dt(e,t,r){return e.type==="EmptyStatement"?";":e.type==="BlockStatement"||r?[" ",t]:E([d,t])}function sn(e,t){return["...",t("argument"),X(e,t)]}function Wt(e){return e.accessibility?e.accessibility+" ":""}function Fs(e,t,r){let{node:n}=e;return m([b(d,e.map(r,"decorators")),pi(n,t)?C:d])}function ai(e,t,r){return ci(e.node)?[b(C,e.map(r,"declaration","decorators")),C]:""}function oi(e,t,r){let{node:n,parent:s}=e,{decorators:u}=n;if(!k(u)||ci(s)||qr(e))return"";let i=n.type==="ClassExpression"||n.type==="ClassDeclaration"||pi(n,t);return[e.key==="declaration"&&Fu(s)?C:i?ce:"",b(d,e.map(r,"decorators")),d]}function pi(e,t){return e.decorators.some(r=>z(t.originalText,v(r)))}function ci(e){var r;if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let t=(r=e.declaration)==null?void 0:r.decorators;return k(t)&&Ft(e,t[0])}function li(e,t,r){let{node:n}=e;return["import",n.module?" module":"",n.phase?` ${n.phase}`:"",As(n),yi(e,t,r),Di(e,t,r),Ei(e,t,r),t.semi?";":""]}var mi=e=>e.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function un(e,t,r){let{node:n}=e,s=[ai(e,t,r),ee(e),"export",mi(n)?" default":""],{declaration:u,exported:i}=n;return A(n,x.Dangling)&&(s.push(" ",j(e,t)),jr(n)&&s.push(C)),u?s.push(" ",r("declaration")):(s.push(dc(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(s.push(" *"),i&&s.push(" as ",r("exported"))):s.push(yi(e,t,r)),s.push(Di(e,t,r),Ei(e,t,r))),s.push(Ac(n,t)),s}var Cc=J(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function Ac(e,t){return t.semi&&(!e.declaration||mi(e)&&!Cc(e.declaration))?";":""}function Cs(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function As(e,t){return Cs(e.importKind,t)}function dc(e){return Cs(e.exportKind)}function Di(e,t,r){let{node:n}=e;if(!n.source)return"";let s=[];return fi(n,t)||s.push(" from"),s.push(" ",r("source")),s}function yi(e,t,r){let{node:n}=e;if(fi(n,t))return"";let s=[" "];if(k(n.specifiers)){let u=[],i=[];e.each(()=>{let a=e.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")u.push(r());else if(a==="ExportSpecifier"||a==="ImportSpecifier")i.push(r());else throw new _e(n,"specifier")},"specifiers"),s.push(b(", ",u)),i.length>0&&(u.length>0&&s.push(", "),i.length>1||u.length>0||n.specifiers.some(o=>A(o))?s.push(m(["{",E([t.bracketSpacing?d:F,b([",",d],i)]),B(De(t)?",":""),t.bracketSpacing?d:F,"}"])):s.push(["{",t.bracketSpacing?" ":"",...i,t.bracketSpacing?" ":"","}"]))}else s.push("{}");return s}function fi(e,t){let{type:r,importKind:n,source:s,specifiers:u}=e;return r!=="ImportDeclaration"||k(u)||n==="type"?!1:!/{\s*}/.test(t.originalText.slice(U(e),U(s)))}function Ei(e,t,r){var i;let{node:n}=e,s=k(n.attributes)?"attributes":k(n.assertions)?"assertions":void 0;return s?[` ${s==="assertions"||(i=n.extra)!=null&&i.deprecatedAssertSyntax?"assert":"with"} {`,t.bracketSpacing?" ":"",b(", ",e.map(r,s)),t.bracketSpacing?" ":"","}"]:""}function Fi(e,t,r){let{node:n}=e,{type:s}=n,u=s.startsWith("Import"),i=u?"imported":"local",a=u?"local":"exported",o=n[i],p=n[a],D="",y="";return s==="ExportNamespaceSpecifier"||s==="ImportNamespaceSpecifier"?D="*":o&&(D=r(i)),p&&!Tc(n)&&(y=r(a)),[Cs(s==="ImportSpecifier"?n.importKind:n.exportKind,!1),D,D&&y?" as ":"",y]}function Tc(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;if(t.type!==r.type||!pu(t,r))return!1;if(Z(t))return t.value===r.value&&me(t)===me(r);switch(t.type){case"Identifier":return t.name===r.name;default:return!1}}function xc(e){let t=[e];for(let r=0;rc[Y]===n),l=c.type===n.type&&!f,h,g,S=0;do g=h||n,h=e.getParentNode(S),S++;while(h&&h.type===n.type&&a.every(Y=>h[Y]!==g));let P=h||c,O=g;if(s&&(N(n[a[0]])||N(o)||N(p)||xc(O))){y=!0,l=!0;let Y=se=>[B("("),E([F,se]),F,B(")")],de=se=>se.type==="NullLiteral"||se.type==="Literal"&&se.value===null||se.type==="Identifier"&&se.name==="undefined";D.push(" ? ",de(o)?r(u):Y(r(u))," : ",p.type===n.type||de(p)?r(i):Y(r(i)))}else{let Y=[d,"? ",o.type===n.type?B("","("):"",Fe(2,r(u)),o.type===n.type?B("",")"):"",d,": ",Fe(2,r(i))];D.push(c.type!==n.type||c[i]===n||f?Y:t.useTabs?xr(E(Y)):Fe(Math.max(0,t.tabWidth-2),Y))}let M=[u,i,...a].some(Y=>A(n[Y],de=>Q(de)&&Ie(t.originalText,U(de),v(de)))),_=Y=>c===P?m(Y,{shouldBreak:M}):M?[Y,ce]:Y,T=!y&&(R(c)||c.type==="NGPipeExpression"&&c.left===n)&&!c.computed,q=Sc(e),fe=_([gc(e,t,r),l?D:E(D),s&&T&&!q?F:""]);return f||q?m([E([F,fe]),F]):fe}function Bc(e,t){return(R(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function bc(e,t,r,n){return[...e.map(u=>ot(u)),ot(t),ot(r)].flat().some(u=>Q(u)&&Ie(n.originalText,U(u),v(u)))}var Pc=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"]]);function kc(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let s=0;!r;s++){let u=e.getParentNode(s);if(u.type==="ChainExpression"&&u.expression===n||I(u)&&u.callee===n||R(u)&&u.object===n||u.type==="TSNonNullExpression"&&u.expression===n){n=u;continue}u.type==="NewExpression"&&u.callee===n||Ae(u)&&u.expression===n?(r=e.getParentNode(s+1),n=u):r=u}return n===t?!1:r[Pc.get(r.type)]===n}var ds=e=>[B("("),E([F,e]),F,B(")")];function Gt(e,t,r,n){if(!t.experimentalTernaries)return Ci(e,t,r);let{node:s}=e,u=s.type==="ConditionalExpression",i=s.type==="TSConditionalType"||s.type==="ConditionalTypeAnnotation",a=u?"consequent":"trueType",o=u?"alternate":"falseType",p=u?["test"]:["checkType","extendsType"],D=s[a],y=s[o],c=p.map(Me=>s[Me]),{parent:f}=e,l=f.type===s.type,h=l&&p.some(Me=>f[Me]===s),g=l&&f[o]===s,S=D.type===s.type,P=y.type===s.type,O=P||g,M=t.tabWidth>2||t.useTabs,_,T,q=0;do T=_||s,_=e.getParentNode(q),q++;while(_&&_.type===s.type&&p.every(Me=>_[Me]!==T));let fe=_||f,Y=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),de=(f.type==="ReturnStatement"||f.type==="ThrowStatement")&&!(S||P),se=u&&fe.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",It=kc(e),Xt=Bc(s,f),L=i&&ge(e,t),W=M?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",te=bc(c,D,y,t)||S||P,st=!O&&!l&&!i&&(se?D.type==="NullLiteral"||D.type==="Literal"&&D.value===null:nr(D,t)&&Yn(s.test,3)),xt=O||g||i&&!l||l&&u&&Yn(s.test,1)||st,Ms=[];!S&&A(D,x.Dangling)&&e.call(Me=>{Ms.push(j(Me,t),C)},"consequent");let $t=[];A(s.test,x.Dangling)&&e.call(Me=>{$t.push(j(Me,t))},"test"),!P&&A(y,x.Dangling)&&e.call(Me=>{$t.push(j(Me,t))},"alternate"),A(s,x.Dangling)&&$t.push(j(e,t));let Rs=Symbol("test"),Pa=Symbol("consequent"),Er=Symbol("test-and-consequent"),ka=u?[ds(r("test")),s.test.type==="ConditionalExpression"?ce:""]:[r("checkType")," ","extends"," ",s.extendsType.type==="TSConditionalType"||s.extendsType.type==="ConditionalTypeAnnotation"||s.extendsType.type==="TSMappedType"?r("extendsType"):m(ds(r("extendsType")))],Js=m([ka," ?"],{id:Rs}),Ia=r(a),Fr=E([S||se&&(N(D)||l||O)?C:d,Ms,Ia]),La=xt?m([Js,O?Fr:B(Fr,m(Fr,{id:Pa}),{groupId:Rs})],{id:Er}):[Js,Fr],kn=r(o),qs=st?B(kn,xr(ds(kn)),{groupId:Er}):kn,Vt=[La,$t.length>0?[E([C,$t]),C]:P?C:st?B(d," ",{groupId:Er}):d,":",P?" ":M?xt?B(W,B(O||st?" ":W," "),{groupId:Er}):B(W," "):" ",P?qs:m([E(qs),se&&!st?F:""]),Xt&&!It?F:"",te?ce:""];return Y&&!te?m(E([F,m(Vt)])):Y||de?m(E(Vt)):It||i&&h?m([E([F,Vt]),L?F:""]):f===fe?m(Vt):Vt}function Ic(e,t,r=0){let n=0;for(let s=r;s0}var L=so;var hr="'",su='"';function uo(e,t){let r=t===!0||t===hr?hr:su,n=r===hr?su:hr,s=0,u=0;for(let i of e)i===r?s++:i===n&&u++;return s>u?n:r}var Sr=uo;function io(e,t,r){let n=t==='"'?"'":'"',u=H(!1,e,/\\(.)|(["'])/gs,(i,a,o)=>a===n?a:o===t?"\\"+o:o||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return t+u+t}var uu=io;function ao(e,t){let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Sr(r,t.singleQuote);return uu(r,n,!(t.parser==="css"||t.parser==="less"||t.parser==="scss"||t.__embeddedInHtml))}var at=ao;function j(e){var n,s,u;let t=((n=e.range)==null?void 0:n[0])??e.start,r=(u=((s=e.declaration)==null?void 0:s.decorators)??e.decorators)==null?void 0:u[0];return r?Math.min(j(r),t):t}function I(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function gt(e,t){let r=j(e);return Number.isInteger(r)&&r===j(t)}function oo(e,t){let r=I(e);return Number.isInteger(r)&&r===I(t)}function iu(e,t){return gt(e,t)&&oo(e,t)}var Qt=null;function Zt(e){if(Qt!==null&&typeof Qt.property){let t=Qt;return Qt=Zt.prototype=null,t}return Qt=Zt.prototype=e??Object.create(null),new Zt}var po=10;for(let e=0;e<=po;e++)Zt();function vn(e){return Zt(e)}function co(e,t="type"){vn(e);function r(n){let s=n[t],u=e[s];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return u}return r}var Br=co;var au={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var lo=Br(au),br=lo;function mo(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var M=mo;var Do=M(["Block","CommentBlock","MultiLine"]),ee=Do;var yo=M(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Pr=yo;function fo(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let s=r[n];if(n===0)return e.type==="Identifier"&&e.name===s;if(e.type!=="MemberExpression"||e.optional||e.computed||e.property.type!=="Identifier"||e.property.name!==s)return!1;e=e.object}}function Eo(e,t){return t.some(r=>fo(e,r))}var ou=Eo;function Fo({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var kr=Fo;function tr(e,t){return t(e)||zs(e,{getVisitorKeys:br,predicate:t})}function jt(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||w(e)||q(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||Ae(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function lu(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Lr(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var Rt=M(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),mu=M(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),G=M(["ArrayExpression","TupleExpression"]),se=M(["ObjectExpression","RecordExpression"]);function Pe(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function qn(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&Pe(e.argument)}function te(e){return e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"}function Wn(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var rr=M(["Literal","BooleanLiteral","BigIntLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),Du=M(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier","Import"]),Le=M(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),Mt=M(["FunctionExpression","ArrowFunctionExpression"]);function Co(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function _n(e){return w(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var U=M(["JSXElement","JSXFragment"]);function ht(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}function wr(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function yu(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!gt(e,e.typeAnnotation)}var me=M(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Et(e){return q(e)||e.type==="BindExpression"&&!!e.object}var Ao=M(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function Jt(e){return kr(e)||Pr(e)||Ao(e)||(e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference")&&!e.typeParameters}function To(e){let t=/^(?:before|after)(?:Each|All)$/;return e.callee.type==="Identifier"&&e.arguments.length===1&&t.test(e.callee.name)}var xo=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function go(e){return ou(e,xo)}function St(e,t){if(e.type!=="CallExpression")return!1;if(e.arguments.length===1){if(_n(e)&&t&&St(t))return Mt(e.arguments[0]);if(To(e))return _n(e.arguments[0])}else if((e.arguments.length===2||e.arguments.length===3)&&(e.arguments[0].type==="TemplateLiteral"||te(e.arguments[0]))&&go(e.callee))return e.arguments[2]&&!Pe(e.arguments[2])?!1:(e.arguments.length===2?Mt(e.arguments[1]):Co(e.arguments[1])&&$(e.arguments[1]).length<=1)||_n(e.arguments[1]);return!1}var fu=e=>t=>((t==null?void 0:t.type)==="ChainExpression"&&(t=t.expression),e(t)),w=fu(M(["CallExpression","OptionalCallExpression"])),q=fu(M(["MemberExpression","OptionalMemberExpression"]));function Eu(e){let t="expressions";e.type==="TSTemplateLiteralType"&&(t="types");let r=e[t];return r.length===0?!1:r.every(n=>{if(Rn(n)||Fu(n))return!0})}function Fu(e,{maxDepth:t=Number.POSITIVE_INFINITY}={}){if(A(e))return!1;if(e.type==="ChainExpression")return Fu(e.expression,{maxDepth:t});if(!q(e))return!1;let r=e,n=0;for(;q(r)&&n++<=t;)if(!Rn(r.property)||(r=r.object,A(r)))return!1;return Rn(r)}function Rn(e){return A(e)?!1:rr(e)||Du(e)}function Nn(e,t=5){return Cu(e,t)<=t}function Cu(e,t){let r=0;for(let n in e){let s=e[n];if(s&&typeof s=="object"&&typeof s.type=="string"&&(r++,r+=Cu(s,t-r)),r>t)return r}return r}var ho=.25;function nr(e,t){let{printWidth:r}=t;if(A(e))return!1;let n=r*ho;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||qn(e)&&!A(e.argument))return!0;let s=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return s?s.length<=n:te(e)?at(De(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` +`):e.type==="UnaryExpression"?nr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:rr(e)}function we(e,t){return U(t)?Bt(t):A(t,x.Leading,r=>Z(e,I(r)))}function Gn(e,t){return t.parser!=="json"&&t.parser!=="jsonc"&&te(e.key)&&De(e.key).slice(1,-1)===e.key.value&&(Hs(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||t.parser==="typescript"&&e.type==="PropertyDefinition")||Un(e.key.value)&&String(Number(e.key.value))===e.key.value&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function Un(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function pu(e){return e.quasis.some(t=>t.value.raw.includes(` +`))}function Or(e,t){return(e.type==="TemplateLiteral"&&pu(e)||e.type==="TaggedTemplateExpression"&&pu(e.quasi))&&!Z(t,j(e),{backwards:!0})}function vr(e){if(!A(e))return!1;let t=v(!1,ot(e,x.Dangling),-1);return t&&!ee(t)}function Au(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(Mt(r)){if(t+=1,t>1)return!0}else if(w(r)){for(let n of ae(r))if(Mt(n))return!0}return!1}function _r(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&w(t)&&w(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var So=new Set(["!","-","+","~"]);function be(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return be(e.expression,t);let r=n=>be(n,t-1);if(Wn(e))return Ze(e.pattern??e.regex.pattern)<=5;if(rr(e)||Du(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(` +`))&&e.expressions.every(r);if(se(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(G(e))return e.elements.every(n=>n===null||r(n));if(pt(e)){if(e.type==="ImportExpression"||be(e.callee,t)){let n=ae(e);return n.length<=t&&n.every(r)}return!1}return q(e)?be(e.object,t)&&be(e.property,t):e.type==="UnaryExpression"&&So.has(e.operator)||e.type==="UpdateExpression"?be(e.argument,t):!1}function De(e){var t;return((t=e.extra)==null?void 0:t.raw)??e.raw}function du(e){return e}function ye(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function ie(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ie(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return ie(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:ie(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:ie(e.callee,t);case"ConditionalExpression":return ie(e.test,t);case"UpdateExpression":return!e.prefix&&ie(e.argument,t);case"BindExpression":return e.object&&ie(e.object,t);case"SequenceExpression":return ie(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ie(e.expression,t);default:return t(e)}}var cu={"==":!0,"!=":!0,"===":!0,"!==":!0},Ir={"*":!0,"/":!0,"%":!0},Jn={">>":!0,">>>":!0,"<<":!0};function sr(e,t){return!(er(t)!==er(e)||e==="**"||cu[e]&&cu[t]||t==="%"&&Ir[e]||e==="%"&&Ir[t]||t!==e&&Ir[t]&&Ir[e]||Jn[e]&&Jn[t])}var Bo=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function er(e){return Bo.get(e)}function Tu(e){return!!Jn[e]||e==="|"||e==="^"||e==="&"}function xu(e){var r;if(e.rest)return!0;let t=$(e);return((r=v(!1,t,-1))==null?void 0:r.type)==="RestElement"}var Mn=new WeakMap;function $(e){if(Mn.has(e))return Mn.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),Mn.set(e,t),t}function gu(e,t){let{node:r}=e,n=0,s=u=>t(u,n++);r.this&&e.call(s,"this"),Array.isArray(r.parameters)?e.each(s,"parameters"):Array.isArray(r.params)&&e.each(s,"params"),r.rest&&e.call(s,"rest")}var jn=new WeakMap;function ae(e){if(jn.has(e))return jn.get(e);if(e.type==="ChainExpression")return ae(e.expression);let t=e.arguments;return e.type==="ImportExpression"&&(t=[e.source],e.attributes&&t.push(e.attributes),e.options&&t.push(e.options)),jn.set(e,t),t}function ur(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>ur(e,t),"expression");r.type==="ImportExpression"?(e.call(n=>t(n,0),"source"),r.attributes&&e.call(n=>t(n,1),"attributes"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function Yn(e,t){let r=[];if(e.type==="ChainExpression"&&r.push("expression"),e.type==="ImportExpression"){if(t===0||t===(e.attributes||e.options?-2:-1))return[...r,"source"];if(e.attributes&&(t===1||t===-1))return[...r,"attributes"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return[...r,"arguments",t]}function ir(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function Bt(e){return(e==null?void 0:e.prettierIgnore)||A(e,x.PrettierIgnore)}var x={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},hu=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,s)=>!(e&x.Leading&&!r.leading||e&x.Trailing&&!r.trailing||e&x.Dangling&&(r.leading||r.trailing)||e&x.Block&&!ee(r)||e&x.Line&&!Rt(r)||e&x.First&&n!==0||e&x.Last&&n!==s.length-1||e&x.PrettierIgnore&&!ir(r)||t&&!t(r))};function A(e,t,r){if(!L(e==null?void 0:e.comments))return!1;let n=hu(t,r);return n?e.comments.some(n):!0}function ot(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=hu(t,r);return n?e.comments.filter(n):e.comments}var fe=(e,{originalText:t})=>_t(t,I(e));function pt(e){return w(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Ce(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!ht(e))}var Ae=M(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),We=M(["UnionTypeAnnotation","TSUnionType"]),Mr=M(["IntersectionTypeAnnotation","TSIntersectionType"]);var bo=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),qt=e=>{for(let t of e.quasis)delete t.value};function Su(e,t,r){var s,u;if(e.type==="Program"&&delete t.sourceType,(e.type==="BigIntLiteral"||e.type==="BigIntLiteralTypeAnnotation")&&t.value&&(t.value=t.value.toLowerCase()),(e.type==="BigIntLiteral"||e.type==="Literal")&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),e.type==="DecimalLiteral"&&(t.value=Number(t.value)),e.type==="Literal"&&t.decimal&&(t.decimal=Number(t.decimal)),e.type==="EmptyStatement"||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if((e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty")&&typeof e.key=="object"&&e.key&&(e.key.type==="Literal"||e.key.type==="NumericLiteral"||e.key.type==="StringLiteral"||e.key.type==="Identifier")&&delete t.key,e.type==="JSXElement"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(i=>i.type==="JSXAttribute"&&i.name.name==="jsx"))for(let{type:i,expression:a}of t.children)i==="JSXExpressionContainer"&&a.type==="TemplateLiteral"&&qt(a);e.type==="JSXAttribute"&&e.name.name==="css"&&e.value.type==="JSXExpressionContainer"&&e.value.expression.type==="TemplateLiteral"&&qt(t.value.expression),e.type==="JSXAttribute"&&((s=e.value)==null?void 0:s.type)==="Literal"&&/["']|"|'/.test(e.value.value)&&(t.value.value=H(!1,t.value.value,/["']|"|'/g,'"'));let n=e.expression||e.callee;if(e.type==="Decorator"&&n.type==="CallExpression"&&n.callee.name==="Component"&&n.arguments.length===1){let i=e.expression.arguments[0].properties;for(let[a,o]of t.expression.arguments[0].properties.entries())switch(i[a].key.name){case"styles":G(o.value)&&qt(o.value.elements[0]);break;case"template":o.value.type==="TemplateLiteral"&&qt(o.value);break}}if(e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"||e.tag.name==="css"||e.tag.name==="md"||e.tag.name==="markdown"||e.tag.name==="html")||e.tag.type==="CallExpression")&&qt(t.quasi),e.type==="TemplateLiteral"&&((u=e.leadingComments)!=null&&u.some(a=>ee(a)&&["GraphQL","HTML"].some(o=>a.value===` ${o} `))||r.type==="CallExpression"&&r.callee.name==="graphql"||!e.leadingComments)&&qt(t),(e.type==="TSIntersectionType"||e.type==="TSUnionType")&&e.types.length===1)return t.types[0];e.type==="ChainExpression"&&e.expression.type==="TSNonNullExpression"&&([t.type,t.expression.type]=[t.expression.type,t.type])}Su.ignoredProperties=bo;var Bu=Su;var et="string",Ne="array",tt="cursor",Ge="indent",Ue="align",rt="trim",pe="group",de="fill",xe="if-break",Ye="indent-if-break",Xe="line-suffix",Ve="line-suffix-boundary",ce="line",Oe="label",ve="break-parent",jr=new Set([tt,Ge,Ue,rt,pe,de,xe,Ye,Xe,Ve,ce,Oe,ve]);function Po(e){if(typeof e=="string")return et;if(Array.isArray(e))return Ne;if(!e)return;let{type:t}=e;if(jr.has(t))return t}var nt=Po;var ko=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Io(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(nt(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ko([...jr].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var Xn=class extends Error{name="InvalidDocError";constructor(t){super(Io(t)),this.doc=t}},Ft=Xn;var bu={};function Lo(e,t,r,n){let s=[e];for(;s.length>0;){let u=s.pop();if(u===bu){r(s.pop());continue}r&&s.push(u,bu);let i=nt(u);if(!i)throw new Ft(u);if((t==null?void 0:t(u))!==!1)switch(i){case Ne:case de:{let a=i===Ne?u:u.parts;for(let o=a.length,p=o-1;p>=0;--p)s.push(a[p]);break}case xe:s.push(u.flatContents,u.breakContents);break;case pe:if(n&&u.expandedStates)for(let a=u.expandedStates.length,o=a-1;o>=0;--o)s.push(u.expandedStates[o]);else s.push(u.contents);break;case Ue:case Ge:case Ye:case Oe:case Xe:s.push(u.contents);break;case et:case tt:case rt:case Ve:case ce:case ve:break;default:throw new Ft(u)}}}var Vn=Lo;var Pu=()=>{},$e=Pu,Rr=Pu;function E(e){return $e(e),{type:Ge,contents:e}}function ge(e,t){return $e(t),{type:Ue,contents:t,n:e}}function D(e,t={}){return $e(e),Rr(t.expandedStates,!0),{type:pe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function ku(e){return ge(Number.NEGATIVE_INFINITY,e)}function Jr(e){return ge(-1,e)}function He(e,t){return D(e[0],{...t,expandedStates:e})}function Wt(e){return Rr(e),{type:de,parts:e}}function b(e,t="",r={}){return $e(e),t!==""&&$e(t),{type:xe,breakContents:e,flatContents:t,groupId:r.groupId}}function Ct(e,t){return $e(e),{type:Ye,contents:e,groupId:t.groupId,negate:t.negate}}function $n(e){return $e(e),{type:Xe,contents:e}}var ke={type:Ve},Ee={type:ve};var Hn={type:ce,hard:!0},wo={type:ce,hard:!0,literal:!0},d={type:ce},F={type:ce,soft:!0},C=[Hn,Ee],qr=[wo,Ee],Kn={type:tt};function P(e,t){$e(e),Rr(t);let r=[];for(let n=0;n0){for(let s=0;s{if(Array.isArray(e))return e;if(e.type!==de)throw new Error(`Expect doc to be 'array' or '${de}'.`);return e.parts};function ct(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=s(u);return r.set(u,i),i}function s(u){switch(nt(u)){case Ne:return t(u.map(n));case de:return t({...u,parts:u.parts.map(n)});case xe:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case pe:{let{expandedStates:i,contents:a}=u;return i?(i=i.map(n),a=i[0]):a=n(a),t({...u,contents:a,expandedStates:i})}case Ue:case Ge:case Ye:case Oe:case Xe:return t({...u,contents:n(u.contents)});case et:case tt:case rt:case Ve:case ce:case ve:return t(u);default:throw new Ft(u)}}}function wu(e,t,r){let n=r,s=!1;function u(i){if(s)return!1;let a=t(i);a!==void 0&&(s=!0,n=a)}return Vn(e,u),n}function Oo(e){if(e.type===pe&&e.break||e.type===ce&&e.hard||e.type===ve)return!0}function re(e){return wu(e,Oo,!1)}function Lu(e){if(e.length>0){let t=v(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Ou(e){let t=new Set,r=[];function n(u){if(u.type===ve&&Lu(r),u.type===pe){if(r.push(u),t.has(u))return!1;t.add(u)}}function s(u){u.type===pe&&r.pop().break&&Lu(r)}Vn(e,n,s,!0)}function vo(e){return e.type===ce&&!e.hard?e.soft?"":" ":e.type===xe?e.flatContents:e}function ar(e){return ct(e,vo)}function _o(e){switch(nt(e)){case de:if(e.parts.every(t=>t===""))return"";break;case pe:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===pe&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Ue:case Ge:case Ye:case Xe:if(!e.contents)return"";break;case xe:if(!e.flatContents&&!e.breakContents)return"";break;case Ne:{let t=[];for(let r of e){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof v(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case et:case tt:case rt:case Ve:case ce:case Oe:case ve:break;default:throw new Ft(e)}return e}function Nt(e){return ct(e,t=>_o(t))}function Ie(e,t=qr){return ct(e,r=>typeof r=="string"?P(t,r.split(` +`)):r)}function Mo(e){if(e.type===ce)return!0}function vu(e){return wu(e,Mo,!1)}function or(e,t){return e.type===Oe?{...e,contents:t(e.contents)}:t(e)}function jo(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var _u=jo;function Mu(e,t){let r=e.node;if(Rt(r))return t.originalText.slice(j(r),I(r)).trimEnd();if(ee(r))return _u(r)?Ro(r):["/*",Ie(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Ro(e){let t=e.value.split(` +`);return["/*",P(C,t.map((r,n)=>n===0?r.trimEnd():" "+(nYo,ownLine:()=>Uo,remaining:()=>Xo});function Jo(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function zn(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Jo(e)}function oe(e,t){t.leading=!0,t.trailing=!1,zn(e,t)}function he(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),zn(e,t)}function K(e,t){t.leading=!1,t.trailing=!0,zn(e,t)}function qo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Je(e,n),n=Ot(e,n),n=vt(e,n),n=qe(e,n);return n}var lt=qo;function Wo(e,t){let r=lt(e,t);return r===!1?"":e.charAt(r)}var Ke=Wo;function No(e,t,r){for(let n=t;nt(e))}function Yo(e){return[Vo,Nu,Ju,Uu,Zn,es,Ru,qu,Gu,np,up,rs,cp,ts,Dp,yp].some(t=>t(e))}function Xo(e){return[Yu,Zn,es,Ko,rp,Wu,rs,tp,ep,mp,ts,lp].some(t=>t(e))}function bt(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?oe(r,t):he(e,t)}function Qn(e,t){e.type==="BlockStatement"?bt(e,t):oe(e,t)}function Vo({comment:e,followingNode:t}){return t&&ju(e)?(oe(t,e),!0):!1}function Zn({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(Ke(s,I(e))===")")return K(t,e),!0;if(t===r.consequent&&n===r.alternate){if(t.type==="BlockStatement")K(t,e);else{let i=Rt(e)||e.loc.start.line===e.loc.end.line,a=e.loc.start.line===t.loc.start.line;i&&a?K(t,e):he(r,e)}return!0}return n.type==="BlockStatement"?(bt(n,e),!0):n.type==="IfStatement"?(Qn(n.consequent,e),!0):r.consequent===n?(oe(n,e),!0):!1}function es({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:Ke(s,I(e))===")"?(K(t,e),!0):n.type==="BlockStatement"?(bt(n,e),!0):r.body===n?(oe(n,e),!0):!1}function Ru({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(K(t,e),!0):n.type==="BlockStatement"?(bt(n,e),!0):n.type==="TryStatement"?(Qn(n.finalizer,e),!0):n.type==="CatchClause"?(Qn(n.body,e),!0):!1}function $o({comment:e,enclosingNode:t,followingNode:r}){return q(t)&&(r==null?void 0:r.type)==="Identifier"?(oe(t,e),!0):!1}function Ho({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||(t==null?void 0:t.type)==="ConditionalTypeAnnotation"||(t==null?void 0:t.type)==="TSConditionalType")?!1:(r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType"?(he(t,e),!0):!1}function Ju({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s,options:u}){let i=t&&!Te(s,I(t),j(e));return(!t||!i)&&((r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType")&&n?u.experimentalTernaries&&r.alternate===n&&!(ee(e)&&!Te(u.originalText,j(e),I(e)))?(he(r,e),!0):(oe(n,e),!0):!1}function Ko({comment:e,precedingNode:t,enclosingNode:r}){return Ce(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(K(r.value.left,e),!0):!1}var zo=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function qu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(zo.has(r==null?void 0:r.type)){if(L(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return K(v(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return bt(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return K(t,e),!0;for(let s of["implements","extends","mixins"])if(r[s]&&n===r[s][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?K(t,e):he(r,e,s),!0}}return!1}var Qo=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Wu({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&Ke(n,I(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&Ke(n,I(t))!==":"?(K(t,e),!0):(t==null?void 0:t.type)==="Decorator"&&Qo.has(r==null?void 0:r.type)?(K(t,e),!0):!1}var Zo=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function ep({comment:e,precedingNode:t,enclosingNode:r,text:n}){return Ke(n,I(e))!=="("?!1:t&&Zo.has(r==null?void 0:r.type)?(K(t,e),!0):!1}function tp({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=lt(r,I(e));return n!==!1&&r.slice(n,n+2)==="=>"?(he(t,e),!0):!1}function rp({comment:e,enclosingNode:t,text:r}){return Ke(r,I(e))!==")"?!1:t&&(Xu(t)&&$(t).length===0||pt(t)&&ae(t).length===0)?(he(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&$(t.value).length===0?(he(t.value,e),!0):!1}function Nu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(t==null?void 0:t.type)==="FunctionTypeParam"&&(r==null?void 0:r.type)==="FunctionTypeAnnotation"&&(n==null?void 0:n.type)!=="FunctionTypeParam"?(K(t,e),!0):((t==null?void 0:t.type)==="Identifier"||(t==null?void 0:t.type)==="AssignmentPattern"||(t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern"||(t==null?void 0:t.type)==="RestElement"||(t==null?void 0:t.type)==="TSParameterProperty")&&Xu(r)&&Ke(s,I(e))===")"?(K(t,e),!0):!ee(e)&&((r==null?void 0:r.type)==="FunctionDeclaration"||(r==null?void 0:r.type)==="FunctionExpression"||(r==null?void 0:r.type)==="ObjectMethod")&&(n==null?void 0:n.type)==="BlockStatement"&&r.body===n&<(s,I(e))===j(n)?(bt(n,e),!0):!1}function Gu({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="LabeledStatement"?(oe(t,e),!0):!1}function ts({comment:e,enclosingNode:t}){return((t==null?void 0:t.type)==="ContinueStatement"||(t==null?void 0:t.type)==="BreakStatement")&&!t.label?(K(t,e),!0):!1}function np({comment:e,precedingNode:t,enclosingNode:r}){return w(r)&&t&&r.callee===t&&r.arguments.length>0?(oe(r.arguments[0],e),!0):!1}function sp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return We(r)?(ir(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(K(t,e),!0):!1):(We(n)&&ir(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function up({comment:e,enclosingNode:t}){return Ce(t)?(oe(t,e),!0):!1}function rs({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:s}){var u;return((u=n==null?void 0:n.body)==null?void 0:u.length)===0?(s?he(n,e):oe(n,e),!0):(t==null?void 0:t.type)==="Program"&&t.body.length===0&&!L(t.directives)?(s?he(t,e):oe(t,e),!0):(r==null?void 0:r.type)==="Program"&&r.body.length===0&&(t==null?void 0:t.type)==="ModuleExpression"?(he(r,e),!0):!1}function ip({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="ForInStatement"||(t==null?void 0:t.type)==="ForOfStatement"?(oe(t,e),!0):!1}function Uu({comment:e,precedingNode:t,enclosingNode:r,text:n}){if((r==null?void 0:r.type)==="ImportSpecifier"||(r==null?void 0:r.type)==="ExportSpecifier")return oe(r,e),!0;let s=(t==null?void 0:t.type)==="ImportSpecifier"&&(r==null?void 0:r.type)==="ImportDeclaration",u=(t==null?void 0:t.type)==="ExportSpecifier"&&(r==null?void 0:r.type)==="ExportNamedDeclaration";return(s||u)&&Z(n,I(e))?(K(t,e),!0):!1}function ap({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="AssignmentPattern"?(oe(t,e),!0):!1}var op=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),pp=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function cp({comment:e,enclosingNode:t,followingNode:r}){return op.has(t==null?void 0:t.type)&&r&&(pp.has(r.type)||ee(e))?(oe(r,e),!0):!1}function lp({comment:e,enclosingNode:t,followingNode:r,text:n}){return!r&&((t==null?void 0:t.type)==="TSMethodSignature"||(t==null?void 0:t.type)==="TSDeclareFunction"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Ke(n,I(e))===";"?(K(t,e),!0):!1}function Yu({comment:e,enclosingNode:t,followingNode:r}){if(ir(e)&&(t==null?void 0:t.type)==="TSMappedType"&&(r==null?void 0:r.type)==="TSTypeParameter"&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function mp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TSMappedType"?!1:(n==null?void 0:n.type)==="TSTypeParameter"&&n.name?(oe(n.name,e),!0):(t==null?void 0:t.type)==="TSTypeParameter"&&t.constraint?(K(t.constraint,e),!0):!1}function Dp({comment:e,enclosingNode:t,followingNode:r}){return!t||t.type!=="SwitchCase"||t.test||!r||r!==t.consequent[0]?!1:(r.type==="BlockStatement"&&Rt(e)?bt(r,e):he(t,e),!0)}function yp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return We(t)&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&!n||Mr(r))?(K(v(!1,t.types,-1),e),!0):!1}function fp({comment:e,enclosingNode:t,precedingNode:r,followingNode:n}){if(((t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern")&&(n==null?void 0:n.type)==="TSTypeAnnotation")return r?K(r,e):he(t,e),!0}var Xu=M(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);var Ep=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function Fp(e){return!Ep.has(e.type)}function Cp(e,t){var r;if((t.parser==="typescript"||t.parser==="flow"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree")&&e.type==="MethodDefinition"&&((r=e.value)==null?void 0:r.type)==="FunctionExpression"&&$(e.value).length===0&&!e.value.returnType&&!L(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function ss(e){let{node:t,parent:r}=e;return(U(t)||r&&(r.type==="JSXSpreadAttribute"||r.type==="JSXSpreadChild"||We(r)||(r.type==="ClassDeclaration"||r.type==="ClassExpression")&&r.superClass===t))&&(!Bt(t)||We(r))}function Ap(e,{parser:t}){if(t==="flow"||t==="babel-flow")return e=H(!1,e,/[\s(]/g,""),e===""||e==="/*"||e==="/*::"}function Vu(e){switch(e){case"cr":return"\r";case"crlf":return`\r `;default:return` -`}}var Se=Symbol("MODE_BREAK"),nt=Symbol("MODE_FLAT"),lr=Symbol("cursor");function xi(){return{value:"",length:0,queue:[]}}function wc(e,t){return Ts(e,{type:"indent"},t)}function Oc(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||xi():t<0?Ts(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:Ts(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function Ts(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],s="",u=0,i=0,a=0;for(let l of n)switch(l.type){case"indent":D(),r.useTabs?o(1):p(r.tabWidth);break;case"stringAlign":D(),s+=l.n,u+=l.n.length;break;case"numberAlign":i+=1,a+=l.n;break;default:throw new Error(`Unexpected type '${l.type}'`)}return c(),{...e,value:s,length:u,queue:n};function o(l){s+=" ".repeat(l),u+=r.tabWidth*l}function p(l){s+=" ".repeat(l),u+=l}function D(){r.useTabs?y():c()}function y(){i>0&&o(i),f()}function c(){a>0&&p(a),f()}function f(){i=0,a=0}}function xs(e){let t=0,r=0,n=e.length;e:for(;n--;){let s=e[n];if(s===lr){r++;continue}for(let u=s.length-1;u>=0;u--){let i=s[u];if(i===" "||i===" ")t++;else{e[n]=s.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(lr);return t}function an(e,t,r,n,s,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,a=[e],o=[];for(;r>=0;){if(a.length===0){if(i===0)return!0;a.push(t[--i]);continue}let{mode:p,doc:D}=a.pop();switch(et(D)){case ze:o.push(D),r-=rt(D);break;case Re:case Ee:{let y=hr(D);for(let c=y.length-1;c>=0;c--)a.push({mode:p,doc:y[c]});break}case Je:case qe:case Ue:case Le:a.push({mode:p,doc:D.contents});break;case Ze:r+=xs(o);break;case ae:{if(u&&D.break)return!1;let y=D.break?Se:p,c=D.expandedStates&&y===Se?w(!1,D.expandedStates,-1):D.contents;a.push({mode:y,doc:c});break}case Te:{let c=(D.groupId?s[D.groupId]||nt:p)===Se?D.breakContents:D.flatContents;c&&a.push({mode:p,doc:c});break}case oe:if(p===Se||D.hard)return!0;D.soft||(o.push(" "),r--);break;case We:n=!0;break;case Ge:if(n)return!1;break}}return!1}function gs(e,t){let r={},n=t.printWidth,s=Ti(t.endOfLine),u=0,i=[{ind:xi(),mode:Se,doc:e}],a=[],o=!1,p=[],D=0;for(Qs(e);i.length>0;){let{ind:c,mode:f,doc:l}=i.pop();switch(et(l)){case ze:{let h=s!==` +`}}var Se=Symbol("MODE_BREAK"),ut=Symbol("MODE_FLAT"),pr=Symbol("cursor");function $u(){return{value:"",length:0,queue:[]}}function dp(e,t){return us(e,{type:"indent"},t)}function Tp(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||$u():t<0?us(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:us(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function us(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],s="",u=0,i=0,a=0;for(let l of n)switch(l.type){case"indent":m(),r.useTabs?o(1):p(r.tabWidth);break;case"stringAlign":m(),s+=l.n,u+=l.n.length;break;case"numberAlign":i+=1,a+=l.n;break;default:throw new Error(`Unexpected type '${l.type}'`)}return c(),{...e,value:s,length:u,queue:n};function o(l){s+=" ".repeat(l),u+=r.tabWidth*l}function p(l){s+=" ".repeat(l),u+=l}function m(){r.useTabs?y():c()}function y(){i>0&&o(i),f()}function c(){a>0&&p(a),f()}function f(){i=0,a=0}}function is(e){let t=0,r=0,n=e.length;e:for(;n--;){let s=e[n];if(s===pr){r++;continue}for(let u=s.length-1;u>=0;u--){let i=s[u];if(i===" "||i===" ")t++;else{e[n]=s.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(pr);return t}function Nr(e,t,r,n,s,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,a=[e],o=[];for(;r>=0;){if(a.length===0){if(i===0)return!0;a.push(t[--i]);continue}let{mode:p,doc:m}=a.pop();switch(nt(m)){case et:o.push(m),r-=Ze(m);break;case Ne:case de:{let y=Wr(m);for(let c=y.length-1;c>=0;c--)a.push({mode:p,doc:y[c]});break}case Ge:case Ue:case Ye:case Oe:a.push({mode:p,doc:m.contents});break;case rt:r+=is(o);break;case pe:{if(u&&m.break)return!1;let y=m.break?Se:p,c=m.expandedStates&&y===Se?v(!1,m.expandedStates,-1):m.contents;a.push({mode:y,doc:c});break}case xe:{let c=(m.groupId?s[m.groupId]||ut:p)===Se?m.breakContents:m.flatContents;c&&a.push({mode:p,doc:c});break}case ce:if(p===Se||m.hard)return!0;m.soft||(o.push(" "),r--);break;case Xe:n=!0;break;case Ve:if(n)return!1;break}}return!1}function Gr(e,t){let r={},n=t.printWidth,s=Vu(t.endOfLine),u=0,i=[{ind:$u(),mode:Se,doc:e}],a=[],o=!1,p=[],m=0;for(Ou(e);i.length>0;){let{ind:c,mode:f,doc:l}=i.pop();switch(nt(l)){case et:{let h=s!==` `?H(!1,l,` -`,s):l;a.push(h),i.length>0&&(u+=rt(h));break}case Re:for(let h=l.length-1;h>=0;h--)i.push({ind:c,mode:f,doc:l[h]});break;case Qe:if(D>=2)throw new Error("There are too many 'cursor' in doc.");a.push(lr),D++;break;case Je:i.push({ind:wc(c,t),mode:f,doc:l.contents});break;case qe:i.push({ind:Oc(c,l.n,t),mode:f,doc:l.contents});break;case Ze:u-=xs(a);break;case ae:switch(f){case nt:if(!o){i.push({ind:c,mode:l.break?Se:nt,doc:l.contents});break}case Se:{o=!1;let h={ind:c,mode:nt,doc:l.contents},g=n-u,S=p.length>0;if(!l.break&&an(h,i,g,S,r))i.push(h);else if(l.expandedStates){let P=w(!1,l.expandedStates,-1);if(l.break){i.push({ind:c,mode:Se,doc:P});break}else for(let O=1;O=l.expandedStates.length){i.push({ind:c,mode:Se,doc:P});break}else{let M=l.expandedStates[O],_={ind:c,mode:nt,doc:M};if(an(_,i,g,S,r)){i.push(_);break}}}else i.push({ind:c,mode:Se,doc:l.contents});break}}l.id&&(r[l.id]=w(!1,i,-1).mode);break;case Ee:{let h=n-u,{parts:g}=l;if(g.length===0)break;let[S,P]=g,O={ind:c,mode:nt,doc:S},M={ind:c,mode:Se,doc:S},_=an(O,[],h,p.length>0,r,!0);if(g.length===1){_?i.push(O):i.push(M);break}let T={ind:c,mode:nt,doc:P},q={ind:c,mode:Se,doc:P};if(g.length===2){_?i.push(T,O):i.push(q,M);break}g.splice(0,2);let fe={ind:c,mode:f,doc:Lt(g)},Y=g[0];an({ind:c,mode:nt,doc:[S,P,Y]},[],h,p.length>0,r,!0)?i.push(fe,T,O):_?i.push(fe,q,O):i.push(fe,q,M);break}case Te:case Ue:{let h=l.groupId?r[l.groupId]:f;if(h===Se){let g=l.type===Te?l.breakContents:l.negate?l.contents:E(l.contents);g&&i.push({ind:c,mode:f,doc:g})}if(h===nt){let g=l.type===Te?l.flatContents:l.negate?E(l.contents):l.contents;g&&i.push({ind:c,mode:f,doc:g})}break}case We:p.push({ind:c,mode:f,doc:l.contents});break;case Ge:p.length>0&&i.push({ind:c,mode:f,doc:On});break;case oe:switch(f){case nt:if(l.hard)o=!0;else{l.soft||(a.push(" "),u+=1);break}case Se:if(p.length>0){i.push({ind:c,mode:f,doc:l},...p.reverse()),p.length=0;break}l.literal?c.root?(a.push(s,c.root.value),u=c.root.length):(a.push(s),u=0):(u-=xs(a),a.push(s+c.value),u=c.length);break}break;case Le:i.push({ind:c,mode:f,doc:l.contents});break;case we:break;default:throw new ft(l)}i.length===0&&p.length>0&&(i.push(...p.reverse()),p.length=0)}let y=a.indexOf(lr);if(y!==-1){let c=a.indexOf(lr,y+1),f=a.slice(0,y).join(""),l=a.slice(y+1,c).join(""),h=a.slice(c+1).join("");return{formatted:f+l+h,cursorNodeStart:f.length,cursorNodeText:l}}return{formatted:a.join("")}}function on(e,t,r){let{node:n}=e;if(n.type==="TemplateLiteral"&&jc(e)){let D=vc(e,r,t);if(D)return D}let u="expressions";n.type==="TSTemplateLiteralType"&&(u="types");let i=[],a=e.map(t,u),o=du(n);o&&(a=a.map(D=>gs(D,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted)),i.push(Be,"`");let p=0;return e.each(({index:D,node:y})=>{if(i.push(t()),y.tail)return;let{tabWidth:c}=r,f=y.value.raw,l=f.includes(` -`)?di(f,c):p;p=l;let h=a[D];if(!o){let S=n[u][D];(A(S)||R(S)||S.type==="ConditionalExpression"||S.type==="SequenceExpression"||Ae(S)||le(S))&&(h=[E([F,h]),F])}let g=l===0&&f.endsWith(` -`)?Fe(Number.NEGATIVE_INFINITY,h):Hs(h,l,c);i.push(m(["${",g,Be,"}"]))},"quasis"),i.push("`"),i}function gi(e){let t=e("quasi");return tt(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),Be,t])}function vc(e,t,r){let{node:n}=e,s=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(s.length>1||s.some(u=>u.length>0)){t.__inJestEach=!0;let u=e.map(r,"expressions");t.__inJestEach=!1;let i=[],a=u.map(c=>"${"+gs(c,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),o=[{hasLineBreak:!1,cells:[]}];for(let c=1;c0&&(u+=Ze(h));break}case Ne:for(let h=l.length-1;h>=0;h--)i.push({ind:c,mode:f,doc:l[h]});break;case tt:if(m>=2)throw new Error("There are too many 'cursor' in doc.");a.push(pr),m++;break;case Ge:i.push({ind:dp(c,t),mode:f,doc:l.contents});break;case Ue:i.push({ind:Tp(c,l.n,t),mode:f,doc:l.contents});break;case rt:u-=is(a);break;case pe:switch(f){case ut:if(!o){i.push({ind:c,mode:l.break?Se:ut,doc:l.contents});break}case Se:{o=!1;let h={ind:c,mode:ut,doc:l.contents},g=n-u,S=p.length>0;if(!l.break&&Nr(h,i,g,S,r))i.push(h);else if(l.expandedStates){let B=v(!1,l.expandedStates,-1);if(l.break){i.push({ind:c,mode:Se,doc:B});break}else for(let O=1;O=l.expandedStates.length){i.push({ind:c,mode:Se,doc:B});break}else{let R=l.expandedStates[O],_={ind:c,mode:ut,doc:R};if(Nr(_,i,g,S,r)){i.push(_);break}}}else i.push({ind:c,mode:Se,doc:l.contents});break}}l.id&&(r[l.id]=v(!1,i,-1).mode);break;case de:{let h=n-u,{parts:g}=l;if(g.length===0)break;let[S,B]=g,O={ind:c,mode:ut,doc:S},R={ind:c,mode:Se,doc:S},_=Nr(O,[],h,p.length>0,r,!0);if(g.length===1){_?i.push(O):i.push(R);break}let T={ind:c,mode:ut,doc:B},W={ind:c,mode:Se,doc:B};if(g.length===2){_?i.push(T,O):i.push(W,R);break}g.splice(0,2);let Fe={ind:c,mode:f,doc:Wt(g)},X=g[0];Nr({ind:c,mode:ut,doc:[S,B,X]},[],h,p.length>0,r,!0)?i.push(Fe,T,O):_?i.push(Fe,W,O):i.push(Fe,W,R);break}case xe:case Ye:{let h=l.groupId?r[l.groupId]:f;if(h===Se){let g=l.type===xe?l.breakContents:l.negate?l.contents:E(l.contents);g&&i.push({ind:c,mode:f,doc:g})}if(h===ut){let g=l.type===xe?l.flatContents:l.negate?E(l.contents):l.contents;g&&i.push({ind:c,mode:f,doc:g})}break}case Xe:p.push({ind:c,mode:f,doc:l.contents});break;case Ve:p.length>0&&i.push({ind:c,mode:f,doc:Hn});break;case ce:switch(f){case ut:if(l.hard)o=!0;else{l.soft||(a.push(" "),u+=1);break}case Se:if(p.length>0){i.push({ind:c,mode:f,doc:l},...p.reverse()),p.length=0;break}l.literal?c.root?(a.push(s,c.root.value),u=c.root.length):(a.push(s),u=0):(u-=is(a),a.push(s+c.value),u=c.length);break}break;case Oe:i.push({ind:c,mode:f,doc:l.contents});break;case ve:break;default:throw new Ft(l)}i.length===0&&p.length>0&&(i.push(...p.reverse()),p.length=0)}let y=a.indexOf(pr);if(y!==-1){let c=a.indexOf(pr,y+1),f=a.slice(0,y).join(""),l=a.slice(y+1,c).join(""),h=a.slice(c+1).join("");return{formatted:f+l+h,cursorNodeStart:f.length,cursorNodeText:l}}return{formatted:a.join("")}}function xp(e,t,r=0){let n=0;for(let s=r;sGr(m,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted)),i.push(ke,"`");let p=0;return e.each(({index:m,node:y})=>{if(i.push(t()),y.tail)return;let{tabWidth:c}=r,f=y.value.raw,l=f.includes(` +`)?Ku(f,c):p;p=l;let h=a[m];if(!o){let S=n[u][m],B=Te(r.originalText,I(y),j(n.quasis[m+1]));if(!B){let O=Gr(h,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted;O.includes(` +`)?B=!0:h=O}B&&(A(S)||q(S)||S.type==="ConditionalExpression"||S.type==="SequenceExpression"||Ae(S)||me(S))&&(h=[E([F,h]),F])}let g=l===0&&f.endsWith(` +`)?ge(Number.NEGATIVE_INFINITY,h):Iu(h,l,c);i.push(D(["${",g,ke,"}"]))},"quasis"),i.push("`"),i}function zu(e){let t=e("quasi");return st(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),ke,t])}function hp(e,t,r){let{node:n}=e,s=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(s.length>1||s.some(u=>u.length>0)){t.__inJestEach=!0;let u=e.map(r,"expressions");t.__inJestEach=!1;let i=[],a=u.map(c=>"${"+Gr(c,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),o=[{hasLineBreak:!1,cells:[]}];for(let c=1;cc.cells.length)),D=Array.from({length:p}).fill(0),y=[{cells:s},...o.filter(c=>c.cells.length>0)];for(let{cells:c}of y.filter(f=>!f.hasLineBreak))for(let[f,l]of c.entries())D[f]=Math.max(D[f],rt(l));return i.push(Be,"`",E([C,b(C,y.map(c=>b(" | ",c.cells.map((f,l)=>c.hasLineBreak?f:f+" ".repeat(D[l]-rt(f))))))]),C,"`"),i}}function _c(e,t){let{node:r}=e,n=t();return A(r)&&(n=m([E([F,n]),F])),["${",n,Be,"}"]}function Nt(e,t){return e.map(r=>_c(r,t),"expressions")}function pn(e,t){return it(e,r=>typeof r=="string"?t?H(!1,r,/(\\*)`/g,"$1$1\\`"):hs(r):r)}function hs(e){return H(!1,e,/([\\`]|\${)/g,"\\$1")}function jc({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}function Mc(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var cn=Mc;function Rc(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function hi(e,t,r){let{node:n}=e;return m([n.variance?r("variance"):"","[",E([r("keyTparam")," in ",r("sourceType")]),"]",Rc(n.optional),": ",r("propType")])}function Ss(e,t){return e==="+"||e==="-"?e+t:t}function Si(e,t,r){let{node:n}=e,s=Ie(t.originalText,U(n),U(n.typeParameter));return m(["{",E([t.bracketSpacing?d:F,m([r("typeParameter"),n.optional?Ss(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?B(";"):""]),j(e,t),t.bracketSpacing?d:F,"}"],{shouldBreak:s})}var mr=cn("typeParameters");function Jc(e,t,r){let{node:n}=e;return V(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/.test(t.filepath))}function bt(e,t,r,n){let{node:s}=e;if(!s[n])return"";if(!Array.isArray(s[n]))return r(n);let u=e.getNode(2),i=u&>(u),a=e.match(D=>!(D[n].length===1&&Oe(D[n][0])),void 0,(D,y)=>y==="typeAnnotation",D=>D.type==="Identifier",Ds);if(s[n].length===0||!a&&(i||s[n].length===1&&(s[n][0].type==="NullableTypeAnnotation"||fs(s[n][0]))))return["<",b(", ",e.map(r,n)),qc(e,t),">"];let p=s.type==="TSTypeParameterInstantiation"?"":Jc(e,t,n)?",":De(t)?B(","):"";return m(["<",E([F,b([",",d],e.map(r,n))]),p,F,">"],{id:mr(s)})}function qc(e,t){let{node:r}=e;if(!A(r,x.Dangling))return"";let n=!A(r,x.Line),s=j(e,t,{indent:!n});return n?s:[s,C]}function ln(e,t,r){let{node:n,parent:s}=e,u=[n.type==="TSTypeParameter"&&n.const?"const ":""],i=n.type==="TSTypeParameter"?r("name"):n.name;if(s.type==="TSMappedType")return s.readonly&&u.push(Ss(s.readonly,"readonly")," "),u.push("[",i),n.constraint&&u.push(" in ",r("constraint")),s.nameType&&u.push(" as ",e.callParent(()=>r("nameType"))),u.push("]"),u;if(n.variance&&u.push(r("variance")),n.in&&u.push("in "),n.out&&u.push("out "),u.push(i),n.bound&&(n.usesExtendsBound&&u.push(" extends "),u.push(X(e,r,"bound"))),n.constraint){let a=Symbol("constraint");u.push(" extends",m(E(d),{id:a}),Be,Et(r("constraint"),{groupId:a}))}return n.default&&u.push(" = ",r("default")),m(u)}var Bi=new Proxy(()=>{},{get:()=>Bi}),mn=Bi;function Uc(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}var Ke=Uc;var Dn=new WeakMap;function yt(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:s}=e,{key:u}=n;if(t.quoteProps==="consistent"&&!Dn.has(s)){let i=(s.properties||s.body||s.members).some(a=>!a.computed&&a.key&&Z(a.key)&&!Xn(a,t));Dn.set(s,i)}if((u.type==="Identifier"||ke(u)&&$n(Ke(me(u)))&&String(u.value)===Ke(me(u))&&!(t.parser==="typescript"||t.parser==="babel-ts"))&&(t.parser==="json"||t.quoteProps==="consistent"&&Dn.get(s))){let i=at(JSON.stringify(u.type==="Identifier"?u.name:u.value.toString()),t);return e.call(a=>pe(a,i,t),"key")}return Xn(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!Dn.get(s))?e.call(i=>pe(i,/^\d/.test(u.value)?Ke(u.value):u.value,t),"key"):r("key")}function bi(e,t,r){let{node:n}=e;return n.shorthand?r("value"):At(e,t,r,yt(e,t,r),":","value")}var Wc=e=>e.type==="ObjectMethod"||e.type==="ClassMethod"||e.type==="ClassPrivateMethod"||e.type==="MethodDefinition"||e.type==="TSAbstractMethodDefinition"||e.type==="TSDeclareMethod"||(e.type==="Property"||e.type==="ObjectProperty")&&(e.method||e.kind==="get"||e.kind==="set"),Gc=e=>e.node.type==="FunctionExpression"&&e.key==="value"&&Wc(e.parent);function yn(e,t,r,n){if(Gc(e))return fn(e,r,t);let{node:s}=e,u=!1;if((s.type==="FunctionDeclaration"||s.type==="FunctionExpression")&&(n!=null&&n.expandLastArg)){let{parent:D}=e;I(D)&&(xe(D).length>1||V(s).every(y=>y.type==="Identifier"&&!y.typeAnnotation))&&(u=!0)}let i=[ee(e),s.async?"async ":"",`function${s.generator?"*":""} `,s.id?t("id"):""],a=mt(e,t,r,u),o=Fn(e,t),p=Bt(s,o);return i.push(He(e,r,t),m([p?m(a):a,o]),s.body?" ":"",t("body")),r.semi&&(s.declare||!s.body)&&i.push(";"),i}function Dr(e,t,r){let{node:n}=e,{kind:s}=n,u=n.value||n,i=[];return!s||s==="init"||s==="method"||s==="constructor"?u.async&&i.push("async "):(mn.ok(s==="get"||s==="set"),i.push(s," ")),u.generator&&i.push("*"),i.push(yt(e,t,r),n.optional||n.key.optional?"?":"",n===u?fn(e,t,r):r("value")),i}function fn(e,t,r){let{node:n}=e,s=mt(e,r,t),u=Fn(e,r),i=si(n),a=Bt(n,u),o=[He(e,t,r),m([i?m(s,{shouldBreak:!0}):a?m(s):s,u])];return n.body?o.push(" ",r("body")):o.push(t.semi?";":""),o}function Nc(e){let t=V(e);return t.length===1&&!e.typeParameters&&!A(e,x.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!A(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function En(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return Nc(r)}return!1}function Fn(e,t){let{node:r}=e,s=[X(e,t,"returnType")];return r.predicate&&s.push(t("predicate")),s}function Pi(e,t,r){let{node:n}=e,s=t.semi?";":"",u=[];if(n.argument){let o=r("argument");Yc(t,n.argument)?o=["(",E([C,o]),C,")"]:(le(n.argument)||n.argument.type==="SequenceExpression"||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(o=m([B("("),E([F,o]),F,B(")")])),u.push(" ",o)}let i=A(n,x.Dangling),a=s&&i&&A(n,x.Last|x.Line);return a&&u.push(s),i&&u.push(" ",j(e,t)),a||u.push(s),u}function ki(e,t,r){return["return",Pi(e,t,r)]}function Ii(e,t,r){return["throw",Pi(e,t,r)]}function Yc(e,t){if(ve(e.originalText,t)||A(t,x.Leading,r=>Ie(e.originalText,U(r),v(r)))&&!N(t))return!0;if(Mt(t)){let r=t,n;for(;n=Eu(r);)if(r=n,ve(e.originalText,r))return!0}return!1}var Li=J(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Cn(e,t,r){let{node:n}=e,s=[ee(e),Ut(e),"class"],u=A(n.id,x.Trailing)||A(n.typeParameters,x.Trailing)||A(n.superClass)||k(n.extends)||k(n.mixins)||k(n.implements),i=[],a=[];if(n.id&&i.push(" ",r("id")),i.push(r("typeParameters")),n.superClass){let o=[$c(e,t,r),r("superTypeParameters")],p=e.call(D=>["extends ",pe(D,o,t)],"superClass");u?a.push(d,m(p)):a.push(" ",p)}else a.push(Bs(e,t,r,"extends"));if(a.push(Bs(e,t,r,"mixins"),Bs(e,t,r,"implements")),u){let o;Oi(n)?o=[...i,E(a)]:o=E([...i,a]),s.push(m(o,{id:wi(n)}))}else s.push(...i,...a);return s.push(" ",r("body")),s}var wi=cn("heritageGroup");function bs(e){return B(C,"",{groupId:wi(e)})}function Xc(e){return["extends","mixins","implements"].reduce((t,r)=>t+(Array.isArray(e[r])?e[r].length:0),e.superClass?1:0)>1}function Oi(e){return e.typeParameters&&!A(e.typeParameters,x.Trailing|x.Line)&&!Xc(e)}function Bs(e,t,r,n){let{node:s}=e;if(!k(s[n]))return"";let u=j(e,t,{marker:n});return[Oi(s)?B(" ",d,{groupId:mr(s.typeParameters)}):d,u,u&&C,n,m(E([d,b([",",d],e.map(r,n))]))]}function $c(e,t,r){let n=r("superClass"),{parent:s}=e;return s.type==="AssignmentExpression"?m(B(["(",E([F,n]),F,")"],n)):n}function An(e,t,r){let{node:n}=e,s=[];return k(n.decorators)&&s.push(Fs(e,t,r)),s.push(Wt(n)),n.static&&s.push("static "),s.push(Ut(e)),n.override&&s.push("override "),s.push(Dr(e,t,r)),s}function dn(e,t,r){let{node:n}=e,s=[],u=t.semi?";":"";k(n.decorators)&&s.push(Fs(e,t,r)),s.push(Wt(n),ee(e)),n.static&&s.push("static "),s.push(Ut(e)),n.override&&s.push("override "),n.readonly&&s.push("readonly "),n.variance&&s.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&s.push("accessor "),s.push(yt(e,t,r),$(e),nn(e),X(e,r));let i=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[At(e,t,r,s," =",i?void 0:"value"),u]}function vi(e,t,r){let{node:n}=e,s=[];return e.each(({node:u,next:i,isLast:a})=>{s.push(r()),!t.semi&&Li(u)&&Vc(u,i)&&s.push(";"),a||(s.push(C),ye(u,t)&&s.push(C))},"body"),A(n,x.Dangling)&&s.push(j(e,t)),[k(n.body)?bs(e.parent):"","{",s.length>0?[E([C,s]),C]:"","}"]}function Vc(e,t){var s;let{type:r,name:n}=e.key;if(!e.computed&&r==="Identifier"&&(n==="static"||n==="get"||n==="set")&&!e.value&&!e.typeAnnotation)return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let u=(s=t.key)==null?void 0:s.name;if(u==="in"||u==="instanceof")return!0}if(Li(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let i=t.value?t.value.generator:t.generator;return!!(t.computed||i)}case"TSIndexSignature":return!0}return!1}function dt(e,t,r){var _;let n=t.semi?";":"",{node:s}=e,u=s.type==="ObjectTypeAnnotation",i=s.type==="TSEnumDeclaration"||s.type==="EnumBooleanBody"||s.type==="EnumNumberBody"||s.type==="EnumStringBody"||s.type==="EnumSymbolBody",a=[s.type==="TSTypeLiteral"||i?"members":s.type==="TSInterfaceBody"?"body":"properties"];u&&a.push("indexers","callProperties","internalSlots");let o=a.flatMap(T=>e.map(({node:q})=>({node:q,printed:r(),loc:U(q)}),T));a.length>1&&o.sort((T,q)=>T.loc-q.loc);let{parent:p,key:D}=e,y=u&&D==="body"&&(p.type==="InterfaceDeclaration"||p.type==="DeclareInterface"||p.type==="DeclareClass"),c=s.type==="TSInterfaceBody"||i||y||s.type==="ObjectPattern"&&p.type!=="FunctionDeclaration"&&p.type!=="FunctionExpression"&&p.type!=="ArrowFunctionExpression"&&p.type!=="ObjectMethod"&&p.type!=="ClassMethod"&&p.type!=="ClassPrivateMethod"&&p.type!=="AssignmentPattern"&&p.type!=="CatchClause"&&s.properties.some(T=>T.value&&(T.value.type==="ObjectPattern"||T.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&o.length>0&&Ie(t.originalText,U(s),o[0].loc),f=y?";":s.type==="TSInterfaceBody"||s.type==="TSTypeLiteral"?B(n,";"):",",l=s.type==="RecordExpression"?"#{":s.exact?"{|":"{",h=s.exact?"|}":"}",g=[],S=o.map(T=>{let q=[...g,m(T.printed)];return g=[f,d],(T.node.type==="TSPropertySignature"||T.node.type==="TSMethodSignature"||T.node.type==="TSConstructSignatureDeclaration"||T.node.type==="TSCallSignatureDeclaration")&&A(T.node,x.PrettierIgnore)&&g.shift(),ye(T.node,t)&&g.push(C),q});if(s.inexact||s.hasUnknownMembers){let T;if(A(s,x.Dangling)){let q=A(s,x.Line);T=[j(e,t),q||z(t.originalText,v(w(!1,ot(s),-1)))?C:d,"..."]}else T=["..."];S.push([...g,...T])}let P=(_=w(!1,o,-1))==null?void 0:_.node,O=!(s.inexact||s.hasUnknownMembers||P&&(P.type==="RestElement"||(P.type==="TSPropertySignature"||P.type==="TSCallSignatureDeclaration"||P.type==="TSMethodSignature"||P.type==="TSConstructSignatureDeclaration")&&A(P,x.PrettierIgnore))),M;if(S.length===0){if(!A(s,x.Dangling))return[l,h,X(e,r)];M=m([l,j(e,t,{indent:!0}),F,h,$(e),X(e,r)])}else M=[y&&k(s.properties)?bs(p):"",l,E([t.bracketSpacing?d:F,...S]),B(O&&(f!==","||De(t))?f:""),t.bracketSpacing?d:F,h,$(e),X(e,r)];return e.match(T=>T.type==="ObjectPattern"&&!k(T.decorators),Ps)||Oe(s)&&(e.match(void 0,(T,q)=>q==="typeAnnotation",(T,q)=>q==="typeAnnotation",Ps)||e.match(void 0,(T,q)=>T.type==="FunctionTypeParam"&&q==="typeAnnotation",Ps))||!c&&e.match(T=>T.type==="ObjectPattern",T=>T.type==="AssignmentExpression"||T.type==="VariableDeclarator")?M:m(M,{shouldBreak:c})}function Ps(e,t){return(t==="params"||t==="parameters"||t==="this"||t==="rest")&&ys(e)}var ks=new WeakMap;function _i(e){return ks.has(e)||ks.set(e,e.type==="ConditionalExpression"&&!ue(e,t=>t.type==="ObjectExpression")),ks.get(e)}var ji=e=>e.type==="SequenceExpression";function Mi(e,t,r,n={}){let s=[],u,i=[],a=!1,o=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",p;(function g(){let{node:S}=e,P=Hc(e,t,r,n);if(s.length===0)s.push(P);else{let{leading:O,trailing:M}=zn(e,t);s.push([O,P]),i.unshift(M)}o&&(a||(a=S.returnType&&V(S).length>0||S.typeParameters||V(S).some(O=>O.type!=="Identifier"))),!o||S.body.type!=="ArrowFunctionExpression"?(u=r("body",n),p=S.body):e.call(g,"body")})();let D=!ve(t.originalText,p)&&(ji(p)||Kc(p,u,t)||!a&&_i(p)),y=e.key==="callee"&&pt(e.parent),c=Symbol("arrow-chain"),f=zc(e,n,{signatureDocs:s,shouldBreak:a}),l,h=!1;return o&&(y||n.assignmentLayout)&&(h=!0,l=n.assignmentLayout==="chain-tail-arrow-chain"||y&&!D),u=Qc(e,t,n,{bodyDoc:u,bodyComments:i,functionBody:p,shouldPutBodyOnSameLine:D}),m([m(h?E([F,f]):f,{shouldBreak:l,id:c})," =>",o?Et(u,{groupId:c}):m(u),o&&y?B(F,"",{groupId:c}):""])}function Hc(e,t,r,n){let{node:s}=e,u=[];if(s.async&&u.push("async "),En(e,t))u.push(r(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,o=Fn(e,r);if(a){if(K(o))throw new lt;o=m(Ht(o))}u.push(m([mt(e,r,t,a,!0),o]))}let i=j(e,t,{filter(a){let o=ct(t.originalText,v(a));return o!==!1&&t.originalText.slice(o,o+2)==="=>"}});return i&&u.push(" ",i),u}function Kc(e,t,r){var n,s;return G(e)||re(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||N(e)||((n=t.label)==null?void 0:n.hug)!==!1&&(((s=t.label)==null?void 0:s.embed)||_r(e,r.originalText))}function zc(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:s,key:u}=e;return u!=="callee"&&pt(s)||le(s)?m([r[0]," =>",E([d,b([" =>",d],r.slice(1))])],{shouldBreak:n}):u==="callee"&&pt(s)||t.assignmentLayout?m(b([" =>",d],r),{shouldBreak:n}):m(E(b([" =>",d],r)),{shouldBreak:n})}function Qc(e,t,r,{bodyDoc:n,bodyComments:s,functionBody:u,shouldPutBodyOnSameLine:i}){let{node:a,parent:o}=e,p=r.expandLastArg&&De(t,"all")?B(","):"",D=(r.expandLastArg||o.type==="JSXExpressionContainer")&&!A(a)?F:"";return i&&_i(u)?[" ",m([B("","("),E([F,n]),B("",")"),p,D]),s]:(ji(u)&&(n=m(["(",E([F,n]),F,")"])),i?[" ",n,s]:[E([d,n,s]),p,D])}function yr(e,t,r,n){let{node:s}=e,u=[],i=Zc(s[n]);return e.each(({node:a})=>{a.type!=="EmptyStatement"&&(u.push(r()),a!==i&&(u.push(C),ye(a,t)&&u.push(C)))},n),u}function Zc(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r.type!=="EmptyStatement")return r}}function Tn(e,t,r){let{node:n}=e,s=[];n.type==="StaticBlock"&&s.push("static "),s.push("{");let u=Is(e,t,r);if(u)s.push(E([C,u]),C);else{let{parent:i}=e,a=e.grandparent;i.type==="ArrowFunctionExpression"||i.type==="FunctionExpression"||i.type==="FunctionDeclaration"||i.type==="ObjectMethod"||i.type==="ClassMethod"||i.type==="ClassPrivateMethod"||i.type==="ForStatement"||i.type==="WhileStatement"||i.type==="DoWhileStatement"||i.type==="DoExpression"||i.type==="CatchClause"&&!a.finalizer||i.type==="TSModuleDeclaration"||i.type==="TSDeclareFunction"||n.type==="StaticBlock"||s.push(C)}return s.push("}"),s}function Is(e,t,r){var o;let{node:n}=e,s=k(n.directives),u=n.body.some(p=>p.type!=="EmptyStatement"),i=A(n,x.Dangling);if(!s&&!u&&!i)return"";let a=[];return s&&(a.push(yr(e,t,r,"directives")),(u||i)&&(a.push(C),ye(w(!1,n.directives,-1),t)&&a.push(C))),u&&a.push(yr(e,t,r,"body")),i&&a.push(j(e,t)),n.type==="Program"&&((o=e.parent)==null?void 0:o.type)!=="ModuleExpression"&&a.push(C),a}function qi(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return Ri(r);case"BigIntLiteral":return xn(r.extra.raw);case"NumericLiteral":return Ke(r.extra.raw);case"StringLiteral":return be(at(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Ke(r.value)+"m";case"DirectiveLiteral":return Ji(r.extra.raw,t);case"Literal":{if(r.regex)return Ri(r.regex);if(r.bigint)return xn(r.raw);if(r.decimal)return Ke(r.decimal)+"m";let{value:n}=r;return typeof n=="number"?Ke(r.raw):typeof n=="string"?el(e)?Ji(r.raw,t):be(at(r.raw,t)):String(n)}}}function el(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&t.directive}function xn(e){return e.toLowerCase()}function Ri({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}function Ji(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}function Ui(e,t){if(t.semi||Ls(e,t)||Os(e,t))return!1;let{node:r,key:n,parent:s}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(s.type==="Program"||s.type==="BlockStatement"||s.type==="StaticBlock"||s.type==="TSModuleBlock")||n==="consequent"&&s.type==="SwitchCase")&&e.call(()=>Wi(e,t),"expression"))}function Wi(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!En(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:s}=r;if(n&&(s==="+"||s==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(N(r))return!0}return ge(e,t)?!0:Mt(r)?e.call(()=>Wi(e,t),...Or(r)):!1}function Ls({node:e,parent:t},r){return(r.parentParser==="markdown"||r.parentParser==="mdx")&&e.type==="ExpressionStatement"&&N(e.expression)&&t.type==="Program"&&t.body.length===1}function ws(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return ws(e.object)}return!1;case"Identifier":return!0;default:return!1}}function Os({node:e,parent:t},r){return(r.parser==="__vue_event_binding"||r.parser==="__vue_ts_event_binding")&&e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1}function Gi(e,t,r){let n=[r("expression")];return Os(e,t)?ws(e.node.expression)&&n.push(";"):Ls(e,t)||t.semi&&n.push(";"),A(e.node,x.Dangling,({marker:s})=>s===ir)&&n.push(" ",j(e,t,{marker:ir})),n}function Ni(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let s=b([",",d],n);return t.__isVueForBindingLeft?["(",E([F,m(s)]),F,")"]:s}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return b([",",d],n)}}function Yi(e,t,r,n){let{node:s}=e;if(rr(s))return qi(e,t);let u=t.semi?";":"",i=[];switch(s.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),C];case"File":return Ni(e,t,r)??r("program");case"Program":return Is(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return Gi(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!A(s.expression)&&(re(s.expression)||G(s.expression))?["(",r("expression"),")"]:m(["(",E([F,r("expression")]),F,")"]);case"AssignmentExpression":return ei(e,t,r);case"VariableDeclarator":return ti(e,t,r);case"BinaryExpression":case"LogicalExpression":return Ur(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return zu(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return s.object&&i.push(r("object")),i.push(m(E([F,Wr(e,t,r)]))),i;case"Identifier":return[s.name,$(e),nn(e),X(e,r)];case"V8IntrinsicIdentifier":return["%",s.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return sn(e,r);case"FunctionDeclaration":case"FunctionExpression":return yn(e,r,t,n);case"ArrowFunctionExpression":return Mi(e,t,r,n);case"YieldExpression":return i.push("yield"),s.delegate&&i.push("*"),s.argument&&i.push(" ",r("argument")),i;case"AwaitExpression":if(i.push("await"),s.argument){i.push(" ",r("argument"));let{parent:a}=e;if(I(a)&&a.callee===s||R(a)&&a.object===s){i=[E([F,...i]),F];let o=e.findAncestor(p=>p.type==="AwaitExpression"||p.type==="BlockStatement");if((o==null?void 0:o.type)!=="AwaitExpression"||!ue(o.argument,p=>p===s))return m(i)}}return i;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return un(e,t,r);case"ImportDeclaration":return li(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Fi(e,t,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return Tn(e,t,r);case"ClassBody":return vi(e,t,r);case"ThrowStatement":return Ii(e,t,r);case"ReturnStatement":return ki(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return Gr(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return dt(e,t,r);case"ObjectProperty":case"Property":return s.method||s.kind==="get"||s.kind==="set"?Dr(e,t,r):bi(e,t,r);case"ObjectMethod":return Dr(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return qt(e,t,r);case"SequenceExpression":{let{parent:a}=e;if(a.type==="ExpressionStatement"||a.type==="ForStatement"){let o=[];return e.each(({isFirst:p})=>{p?o.push(r()):o.push(",",E([d,r()]))},"expressions"),m(o)}return m(b([",",d],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),u];case"UnaryExpression":return i.push(s.operator),/[a-z]$/.test(s.operator)&&i.push(" "),A(s.argument)?i.push(m(["(",E([F,r("argument")]),F,")"])):i.push(r("argument")),i;case"UpdateExpression":return i.push(r("argument"),s.operator),s.prefix&&i.reverse(),i;case"ConditionalExpression":return Gt(e,t,r,n);case"VariableDeclaration":{let a=e.map(r,"declarations"),o=e.parent,p=o.type==="ForStatement"||o.type==="ForInStatement"||o.type==="ForOfStatement",D=s.declarations.some(c=>c.init),y;return a.length===1&&!A(s.declarations[0])?y=a[0]:a.length>0&&(y=E(a[0])),i=[ee(e),s.kind,y?[" ",y]:"",E(a.slice(1).map(c=>[",",D&&!p?C:d,c]))],p&&o.body!==s||i.push(u),m(i)}case"WithStatement":return m(["with (",r("object"),")",Dt(s.body,r("body"))]);case"IfStatement":{let a=Dt(s.consequent,r("consequent")),o=m(["if (",m([E([F,r("test")]),F]),")",a]);if(i.push(o),s.alternate){let p=A(s.consequent,x.Trailing|x.Line)||jr(s),D=s.consequent.type==="BlockStatement"&&!p;i.push(D?" ":C),A(s,x.Dangling)&&i.push(j(e,t),p?C:" "),i.push("else",m(Dt(s.alternate,r("alternate"),s.alternate.type==="IfStatement")))}return i}case"ForStatement":{let a=Dt(s.body,r("body")),o=j(e,t),p=o?[o,F]:"";return!s.init&&!s.test&&!s.update?[p,m(["for (;;)",a])]:[p,m(["for (",m([E([F,r("init"),";",d,r("test"),";",d,r("update")]),F]),")",a])]}case"WhileStatement":return m(["while (",m([E([F,r("test")]),F]),")",Dt(s.body,r("body"))]);case"ForInStatement":return m(["for (",r("left")," in ",r("right"),")",Dt(s.body,r("body"))]);case"ForOfStatement":return m(["for",s.await?" await":""," (",r("left")," of ",r("right"),")",Dt(s.body,r("body"))]);case"DoWhileStatement":{let a=Dt(s.body,r("body"));return i=[m(["do",a])],s.body.type==="BlockStatement"?i.push(" "):i.push(C),i.push("while (",m([E([F,r("test")]),F]),")",u),i}case"DoExpression":return[s.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return i.push(s.type==="BreakStatement"?"break":"continue"),s.label&&i.push(" ",r("label")),i.push(u),i;case"LabeledStatement":return s.body.type==="EmptyStatement"?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),s.handler?[" ",r("handler")]:"",s.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(s.param){let a=A(s.param,p=>!Q(p)||p.leading&&z(t.originalText,v(p))||p.trailing&&z(t.originalText,U(p),{backwards:!0})),o=r("param");return["catch ",a?["(",E([F,o]),F,") "]:["(",o,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[m(["switch (",E([F,r("discriminant")]),F,")"])," {",s.cases.length>0?E([C,b(C,e.map(({node:a,isLast:o})=>[r(),!o&&ye(a,t)?C:""],"cases"))]):"",C,"}"];case"SwitchCase":{s.test?i.push("case ",r("test"),":"):i.push("default:"),A(s,x.Dangling)&&i.push(" ",j(e,t));let a=s.consequent.filter(o=>o.type!=="EmptyStatement");if(a.length>0){let o=yr(e,t,r,"consequent");i.push(a.length===1&&a[0].type==="BlockStatement"?[" ",o]:E([C,o]))}return i}case"DebuggerStatement":return["debugger",u];case"ClassDeclaration":case"ClassExpression":return Cn(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return An(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return dn(e,t,r);case"TemplateElement":return be(s.value.raw);case"TemplateLiteral":return on(e,r,t);case"TaggedTemplateExpression":return gi(r);case"PrivateIdentifier":return["#",s.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{i.push("module {");let a=r("body");return a&&i.push(E([C,a]),C),i.push("}"),i}case"InterpreterDirective":default:throw new _e(s,"ESTree")}}function $i(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),A(n.node)?" //"+ot(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return Ur(e,t,r);case"NGChainedExpression":return m(b([";",d],e.map(()=>rl(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":Xi(e)?" ":[";",d],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:s,parent:u}=e,i=Xi(e)||(s===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||s===2&&(n.key.name==="else"&&u.body[s-1].type==="NGMicrosyntaxKeyedExpression"&&u.body[s-1].key.name==="then"||n.key.name==="track"))&&u.body[0].type==="NGMicrosyntaxExpression";return[r("key"),i?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new _e(n,"Angular")}}function Xi({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}var tl=J(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function rl({node:e}){return er(e,tl)}function gn(e,t,r){let{parent:n,node:s}=e,u=[];switch(s.type){case"AsConstExpression":u=[r("expression")," as const"];break;case"AsExpression":case"TSAsExpression":u=[r("expression")," ","as"," ",r("typeAnnotation")];break;case"SatisfiesExpression":case"TSSatisfiesExpression":u=[r("expression")," ","satisfies"," ",r("typeAnnotation")];break}return I(n)&&n.callee===s||R(n)&&n.object===s?m([E([F,...u]),F]):u}function hn(e,t,r){let{node:n}=e,s=[ee(e),"interface"],u=[],i=[];n.type!=="InterfaceTypeAnnotation"&&u.push(" ",r("id"),r("typeParameters"));let a=n.typeParameters&&!A(n.typeParameters,x.Trailing|x.Line);return k(n.extends)&&i.push(a?B(" ",d,{groupId:mr(n.typeParameters)}):d,"extends ",(n.extends.length===1?hu:E)(b([",",d],e.map(r,"extends")))),A(n.id,x.Trailing)||k(n.extends)?a?s.push(m([...u,E(i)])):s.push(m(E([...u,...i]))):s.push(...u,...i),s.push(" ",r("body")),m(s)}function Vi(e,t,r){return dt(e,r,t)}function Sn(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let s="";return r.initializer&&(s=t("initializer")),r.init&&(s=t("init")),s?[n," = ",s]:n}function Hi(e,t,r){let{node:n}=e,s;if(n.type==="EnumSymbolBody"||n.explicitType)switch(n.type){case"EnumBooleanBody":s="boolean";break;case"EnumNumberBody":s="number";break;case"EnumStringBody":s="string";break;case"EnumSymbolBody":s="symbol";break}return[s?`of ${s} `:"",Vi(e,t,r)]}function Bn(e,t,r){let{node:n}=e;return[ee(e),n.const?"const ":"","enum ",t("id")," ",n.type==="TSEnumDeclaration"?Vi(e,t,r):t("body")]}function Ki(e,t,r){let{node:n}=e;if(Ir(n))return n.type.slice(0,-14).toLowerCase();let s=t.semi?";":"";switch(n.type){case"DeclareClass":return Cn(e,t,r);case"DeclareFunction":return[ee(e),"function ",r("id"),r("predicate"),s];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",X(e,r),s];case"DeclareVariable":return[ee(e),n.kind??"var"," ",r("id"),s];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return un(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return ui(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return Yr(e,t,r);case"IntersectionTypeAnnotation":return Xr(e,t,r);case"UnionTypeAnnotation":return $r(e,t,r);case"ConditionalTypeAnnotation":return Gt(e,t,r);case"InferTypeAnnotation":return Kr(e,t,r);case"FunctionTypeAnnotation":return Vr(e,t,r);case"TupleTypeAnnotation":return qt(e,t,r);case"TupleTypeLabeledElement":return Qr(e,t,r);case"TupleTypeSpreadElement":return zr(e,t,r);case"GenericTypeAnnotation":return[r("id"),bt(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return Hr(e,t,r);case"TypeAnnotation":return Zr(e,t,r);case"TypeParameter":return ln(e,t,r);case"TypeofTypeAnnotation":return tn(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return en(r);case"DeclareEnum":case"EnumDeclaration":return Bn(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return Hi(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return Sn(e,r);case"FunctionTypeParam":{let u=n.name?r("name"):e.parent.this===n?"this":"";return[u,$(e),u?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return hn(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:u}=n;return mn.ok(u==="plus"||u==="minus"),u==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return hi(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let u="";return n.proto?u="proto ":n.static&&(u="static "),[u,Gn(n)?n.kind+" ":"",n.variance?r("variance"):"",yt(e,t,r),$(e),Nn(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return dt(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",$(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return sn(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return be(at(me(n),t));case"NumberLiteralTypeAnnotation":return Ke(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return xn(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),X(e,r),")"];case"TypePredicate":return rn(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return bt(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return gn(e,t,r)}}function zi(e,t,r){var i;let{node:n}=e;if(!n.type.startsWith("TS"))return;if(Lr(n))return n.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",u=[];switch(n.type){case"TSThisType":return"this";case"TSTypeAssertion":{let a=!(G(n.expression)||re(n.expression)),o=m(["<",E([F,r("typeAnnotation")]),F,">"]),p=[B("("),E([F,r("expression")]),F,B(")")];return a?Ye([[o,r("expression")],[o,m(p,{shouldBreak:!0})],[o,r("expression")]]):m([o,r("expression")])}case"TSDeclareFunction":return yn(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Tn(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return dt(e,t,r);case"TSTypeAliasDeclaration":return Yr(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return An(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return dn(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return on(e,r,t);case"TSNamedTupleMember":return Qr(e,t,r);case"TSRestType":return zr(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return hn(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return bt(e,t,r,"params");case"TSTypeParameter":return ln(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return gn(e,t,r);case"TSArrayType":return en(r);case"TSPropertySignature":return[n.readonly?"readonly ":"",yt(e,t,r),$(e),X(e,r)];case"TSParameterProperty":return[Wt(n),n.static?"static ":"",n.override?"override ":"",n.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return tn(e,r);case"TSIndexSignature":{let a=n.parameters.length>1?B(De(t)?",":""):"",o=m([E([F,b([", ",F],e.map(r,"parameters"))]),a,F]),p=e.parent.type==="ClassBody"&&e.key==="body";return[p&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?o:"","]",X(e,r),p?s:""]}case"TSTypePredicate":return rn(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[n.isTypeOf?"typeof ":"","import(",r("argument"),")",n.qualifier?[".",r("qualifier")]:"",bt(e,t,r,n.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return Hr(e,t,r);case"TSTypeOperator":return[n.operator," ",r("typeAnnotation")];case"TSMappedType":return Si(e,t,r);case"TSMethodSignature":{let a=n.kind&&n.kind!=="method"?`${n.kind} `:"";u.push(Wt(n),a,n.computed?"[":"",r("key"),n.computed?"]":"",$(e));let o=mt(e,r,t,!1,!0),p=n.returnType?"returnType":"typeAnnotation",D=n[p],y=D?X(e,r,p):"",c=Bt(n,y);return u.push(c?m(o):o),D&&u.push(m(y)),m(u)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return Bn(e,r,t);case"TSEnumMember":return Sn(e,r);case"TSImportEqualsDeclaration":return[n.isExport?"export ":"","import ",As(n,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:a}=e,o=a.type==="TSModuleDeclaration",p=((i=n.body)==null?void 0:i.type)==="TSModuleDeclaration";if(o)u.push(".");else if(u.push(ee(e)),!(n.kind==="global"||n.global)){let y=n.kind??(Z(n.id)||/(?:^|\s)module(?:\s|$)/.test(t.originalText.slice(U(n),U(n.id)))?"module":"namespace");u.push(y," ")}return u.push(r("id")),p?u.push(r("body")):n.body?u.push(" ",m(r("body"))):u.push(s),u}case"TSConditionalType":return Gt(e,t,r);case"TSInferType":return Kr(e,t,r);case"TSIntersectionType":return Xr(e,t,r);case"TSUnionType":return $r(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return Vr(e,t,r);case"TSTupleType":return qt(e,t,r);case"TSTypeReference":return[r("typeName"),bt(e,t,r,"typeParameters")];case"TSTypeAnnotation":return Zr(e,t,r);case"TSEmptyBodyFunctionExpression":return fn(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return Es(e,r,"?");case"TSJSDocNonNullableType":return Es(e,r,"!");case"TSParenthesizedType":default:throw new _e(n,"TypeScript")}}function nl(e,t,r,n){if(qr(e))return Ys(e,t);for(let s of[$i,Xu,Ki,zi,Yi]){let u=s(e,t,r,n);if(u!==void 0)return u}}var sl=J(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function ul(e,t,r,n){var y;e.isRoot&&((y=t.__onHtmlBindingRoot)==null||y.call(t,e.node,t));let s=nl(e,t,r,n);if(!s)return"";let{node:u}=e;if(sl(u))return s;let i=k(u.decorators),a=oi(e,t,r),o=u.type==="ClassExpression";if(i&&!o)return Kt(s,c=>m([a,c]));let p=ge(e,t),D=Ui(e,t);return!a&&!p&&!D?s:Kt(s,c=>[D?";":"",p?"(":"",p&&o&&i?[E([d,a,c]),d]:[a,c],p?")":""])}var Qi=ul;var ea=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function ta(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>G(t)&&r==="elements",(t,r)=>Ce(t)&&t.key.type==="Identifier"&&t.key.name==="styles"&&r==="value",...ea)}function ra(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Ce(t)&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...ea)}function Zi(e,t){return A(e,x.Block|x.Leading,({value:r})=>r===` ${t} `)}function bn({node:e,parent:t},r){return Zi(e,r)||il(t)&&Zi(t,r)}function il(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function al(e,t,r){let{node:n}=r,s=n.quasis.map(D=>D.value.raw),u=0,i=s.reduce((D,y,c)=>c===0?y:D+"@prettier-placeholder-"+u+++"-id"+y,""),a=await e(i,{parser:"scss"}),o=Nt(r,t),p=ol(a,o);if(!p)throw new Error("Couldn't insert all the expressions");return["`",E([C,p]),F,"`"]}function ol(e,t){if(!k(t))return e;let r=0,n=it(wt(e),s=>typeof s!="string"||!s.includes("@prettier-placeholder")?s:s.split(/@prettier-placeholder-(\d+)-id/).map((u,i)=>i%2===0?be(u):(r++,t[u])));return t.length===r?n:null}function pl({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function Pn(e){return e.type==="Identifier"&&e.name==="styled"}function na(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function cl({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Pn(t.object)||na(t);case"CallExpression":return Pn(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Pn(t.callee.object.object)||na(t.callee.object))||t.callee.object.type==="CallExpression"&&Pn(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function ll({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function ml(e){if(pl(e)||cl(e)||ll(e)||ta(e))return al}var sa=ml;async function Dl(e,t,r){let{node:n}=r,s=n.quasis.length,u=Nt(r,t),i=[];for(let a=0;a2&&c[0].trim()===""&&c[1].trim()==="",g=f>2&&c[f-1].trim()===""&&c[f-2].trim()==="",S=c.every(O=>/^\s*(?:#[^\n\r]*)?$/.test(O));if(!D&&/#[^\n\r]*$/.test(c[f-1]))return null;let P=null;S?P=yl(c):P=await e(y,{parser:"graphql"}),P?(P=pn(P,!1),!p&&h&&i.push(""),i.push(P),!D&&g&&i.push("")):!p&&!D&&h&&i.push(""),l&&i.push(l)}return["`",E([C,b(C,i)]),C,"`"]}function yl(e){let t=[],r=!1,n=e.map(s=>s.trim());for(let[s,u]of n.entries())u!==""&&(n[s-1]===""&&r?t.push([C,u]):t.push(u),r=!0);return t.length===0?null:b(C,t)}function fl({node:e,parent:t}){return bn({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function El(e){if(fl(e))return Dl}var ua=El;var vs=0;async function ia(e,t,r,n,s){let{node:u}=n,i=vs;vs=vs+1>>>0;let a=S=>`PRETTIER_HTML_PLACEHOLDER_${S}_${i}_IN_JS`,o=u.quasis.map((S,P,O)=>P===O.length-1?S.value.cooked:S.value.cooked+a(P)).join(""),p=Nt(n,r),D=new RegExp(a("(\\d+)"),"g"),y=0,c=await t(o,{parser:e,__onHtmlRoot(S){y=S.children.length}}),f=it(c,S=>{if(typeof S!="string")return S;let P=[],O=S.split(D);for(let M=0;M1?E(m(f)):m(f),h,"`"]))}function Fl(e){return bn(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var Cl=ia.bind(void 0,"html"),Al=ia.bind(void 0,"angular");function dl(e){if(Fl(e))return Cl;if(ra(e))return Al}var aa=dl;async function Tl(e,t,r){let{node:n}=r,s=H(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(o,p)=>"\\".repeat(p.length/2)+"`"),u=xl(s),i=u!=="";i&&(s=H(!1,s,new RegExp(`^${u}`,"gm"),""));let a=pn(await e(s,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",i?E([F,a]):[gr,Vs(a)],F,"`"]}function xl(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function gl(e){if(hl(e))return Tl}function hl({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var oa=gl;function Sl(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||Bl(t))return;let r;for(let n of[sa,ua,aa,oa])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...s)=>{let u=await r(...s);return u&&tt({embed:!0,...u.label},u)}}function Bl({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var pa=Sl;var bl=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Yt=e=>{for(let t of e.quasis)delete t.value};function ca(e,t,r){var s,u;if(e.type==="Program"&&delete t.sourceType,(e.type==="BigIntLiteral"||e.type==="BigIntLiteralTypeAnnotation")&&t.value&&(t.value=t.value.toLowerCase()),(e.type==="BigIntLiteral"||e.type==="Literal")&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),e.type==="DecimalLiteral"&&(t.value=Number(t.value)),e.type==="Literal"&&t.decimal&&(t.decimal=Number(t.decimal)),e.type==="EmptyStatement"||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if((e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty")&&typeof e.key=="object"&&e.key&&(e.key.type==="Literal"||e.key.type==="NumericLiteral"||e.key.type==="StringLiteral"||e.key.type==="Identifier")&&delete t.key,e.type==="JSXElement"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(i=>i.type==="JSXAttribute"&&i.name.name==="jsx"))for(let{type:i,expression:a}of t.children)i==="JSXExpressionContainer"&&a.type==="TemplateLiteral"&&Yt(a);e.type==="JSXAttribute"&&e.name.name==="css"&&e.value.type==="JSXExpressionContainer"&&e.value.expression.type==="TemplateLiteral"&&Yt(t.value.expression),e.type==="JSXAttribute"&&((s=e.value)==null?void 0:s.type)==="Literal"&&/["']|"|'/.test(e.value.value)&&(t.value.value=H(!1,t.value.value,/["']|"|'/g,'"'));let n=e.expression||e.callee;if(e.type==="Decorator"&&n.type==="CallExpression"&&n.callee.name==="Component"&&n.arguments.length===1){let i=e.expression.arguments[0].properties;for(let[a,o]of t.expression.arguments[0].properties.entries())switch(i[a].key.name){case"styles":G(o.value)&&Yt(o.value.elements[0]);break;case"template":o.value.type==="TemplateLiteral"&&Yt(o.value);break}}if(e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"||e.tag.name==="css"||e.tag.name==="md"||e.tag.name==="markdown"||e.tag.name==="html")||e.tag.type==="CallExpression")&&Yt(t.quasi),e.type==="TemplateLiteral"&&((u=e.leadingComments)!=null&&u.some(a=>Q(a)&&["GraphQL","HTML"].some(o=>a.value===` ${o} `))||r.type==="CallExpression"&&r.callee.name==="graphql"||!e.leadingComments)&&Yt(t),(e.type==="TSIntersectionType"||e.type==="TSUnionType")&&e.types.length===1)return t.types[0];e.type==="ChainExpression"&&e.expression.type==="TSNonNullExpression"&&([t.type,t.expression.type]=[t.expression.type,t.type])}ca.ignoredProperties=bl;var la=ca;var Tt=Ra(Ca(),1);function Ml(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` -`);return t===-1?e:e.slice(0,t)}var Aa=Ml;function Rl(e){let t=Aa(e);t&&(e=e.slice(t.length+1));let r=(0,Tt.extract)(e),{pragmas:n,comments:s}=(0,Tt.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:s}}function da(e){let{shebang:t,text:r,pragmas:n,comments:s}=Rl(e),u=(0,Tt.strip)(r),i=(0,Tt.print)({pragmas:{format:"",...n},comments:s.trimStart()});return(t?`${t} +`)&&o.push({hasLineBreak:!1,cells:[]})}let p=Math.max(s.length,...o.map(c=>c.cells.length)),m=Array.from({length:p}).fill(0),y=[{cells:s},...o.filter(c=>c.cells.length>0)];for(let{cells:c}of y.filter(f=>!f.hasLineBreak))for(let[f,l]of c.entries())m[f]=Math.max(m[f],Ze(l));return i.push(ke,"`",E([C,P(C,y.map(c=>P(" | ",c.cells.map((f,l)=>c.hasLineBreak?f:f+" ".repeat(m[l]-Ze(f))))))]),C,"`"),i}}function Sp(e,t){let{node:r}=e,n=t();return A(r)&&(n=D([E([F,n]),F])),["${",n,ke,"}"]}function Gt(e,t){return e.map(r=>Sp(r,t),"expressions")}function Yr(e,t){return ct(e,r=>typeof r=="string"?t?H(!1,r,/(\\*)`/g,"$1$1\\`"):as(r):r)}function as(e){return H(!1,e,/([\\`]|\${)/g,"\\$1")}function Bp({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var os=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function Zu(e){let t=n=>n.type==="TemplateLiteral",r=(n,s)=>Ce(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&s==="value";return e.match(t,(n,s)=>G(n)&&s==="elements",r,...os)||e.match(t,r,...os)}function ei(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Ce(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...os)}function Qu(e,t){return A(e,x.Block|x.Leading,({value:r})=>r===` ${t} `)}function Xr({node:e,parent:t},r){return Qu(e,r)||bp(t)&&Qu(t,r)}function bp(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function Pp(e,t,r){let{node:n}=r,s=n.quasis.map(m=>m.value.raw),u=0,i=s.reduce((m,y,c)=>c===0?y:m+"@prettier-placeholder-"+u+++"-id"+y,""),a=await e(i,{parser:"scss"}),o=Gt(r,t),p=kp(a,o);if(!p)throw new Error("Couldn't insert all the expressions");return["`",E([C,p]),F,"`"]}function kp(e,t){if(!L(t))return e;let r=0,n=ct(Nt(e),s=>typeof s!="string"||!s.includes("@prettier-placeholder")?s:s.split(/@prettier-placeholder-(\d+)-id/).map((u,i)=>i%2===0?Ie(u):(r++,t[u])));return t.length===r?n:null}function Ip({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function Vr(e){return e.type==="Identifier"&&e.name==="styled"}function ti(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function Lp({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Vr(t.object)||ti(t);case"CallExpression":return Vr(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Vr(t.callee.object.object)||ti(t.callee.object))||t.callee.object.type==="CallExpression"&&Vr(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function wp({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function Op(e){if(Ip(e)||Lp(e)||wp(e)||Zu(e))return Pp}var ri=Op;async function vp(e,t,r){let{node:n}=r,s=n.quasis.length,u=Gt(r,t),i=[];for(let a=0;a2&&c[0].trim()===""&&c[1].trim()==="",g=f>2&&c[f-1].trim()===""&&c[f-2].trim()==="",S=c.every(O=>/^\s*(?:#[^\n\r]*)?$/.test(O));if(!m&&/#[^\n\r]*$/.test(c[f-1]))return null;let B=null;S?B=_p(c):B=await e(y,{parser:"graphql"}),B?(B=Yr(B,!1),!p&&h&&i.push(""),i.push(B),!m&&g&&i.push("")):!p&&!m&&h&&i.push(""),l&&i.push(l)}return["`",E([C,P(C,i)]),C,"`"]}function _p(e){let t=[],r=!1,n=e.map(s=>s.trim());for(let[s,u]of n.entries())u!==""&&(n[s-1]===""&&r?t.push([C,u]):t.push(u),r=!0);return t.length===0?null:P(C,t)}function Mp({node:e,parent:t}){return Xr({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function jp(e){if(Mp(e))return vp}var ni=jp;var ps=0;async function si(e,t,r,n,s){let{node:u}=n,i=ps;ps=ps+1>>>0;let a=S=>`PRETTIER_HTML_PLACEHOLDER_${S}_${i}_IN_JS`,o=u.quasis.map((S,B,O)=>B===O.length-1?S.value.cooked:S.value.cooked+a(B)).join(""),p=Gt(n,r),m=new RegExp(a("(\\d+)"),"g"),y=0,c=await t(o,{parser:e,__onHtmlRoot(S){y=S.children.length}}),f=ct(c,S=>{if(typeof S!="string")return S;let B=[],O=S.split(m);for(let R=0;R1?E(D(f)):D(f),h,"`"]))}function Rp(e){return Xr(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var Jp=si.bind(void 0,"html"),qp=si.bind(void 0,"angular");function Wp(e){if(Rp(e))return Jp;if(ei(e))return qp}var ui=Wp;async function Np(e,t,r){let{node:n}=r,s=H(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(o,p)=>"\\".repeat(p.length/2)+"`"),u=Gp(s),i=u!=="";i&&(s=H(!1,s,new RegExp(`^${u}`,"gm"),""));let a=Yr(await e(s,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",i?E([F,a]):[qr,ku(a)],F,"`"]}function Gp(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function Up(e){if(Yp(e))return Np}function Yp({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var ii=Up;function Xp(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||Vp(t))return;let r;for(let n of[ri,ni,ui,ii])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...s)=>{let u=await r(...s);return u&&st({embed:!0,...u.label},u)}}function Vp({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var ai=Xp;var At=Na(yi(),1);function nc(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var fi=nc;function sc(e){let t=fi(e);t&&(e=e.slice(t.length+1));let r=(0,At.extract)(e),{pragmas:n,comments:s}=(0,At.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:s}}function Ei(e){let{shebang:t,text:r,pragmas:n,comments:s}=sc(e),u=(0,At.strip)(r),i=(0,At.print)({pragmas:{format:"",...n},comments:s.trimStart()});return(t?`${t} `:"")+i+(u.startsWith(` `)?` `:` -`)+u}var Jl={avoidAstMutation:!0};var Ta=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}];var js={};Ar(js,{getVisitorKeys:()=>ga,massageAstNode:()=>Sa,print:()=>Wl});var ql={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},xa=ql;var Ul=Br(xa),ga=Ul;function Wl(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),C];case"ArrayExpression":{if(n.elements.length===0)return"[]";let s=e.map(()=>e.node===null?"null":r(),"elements");return["[",E([C,b([",",C],s)]),C,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",E([C,b([",",C],e.map(r,"properties"))]),C,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return ha(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return ha(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new _e(n,"JSON")}}function ha(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var Gl=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function Sa(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,s]of e.elements.entries())s===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}Sa.ignoredProperties=Gl;var Ba=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","devcontainer.json","jsconfig.json","language-configuration.json","tsconfig.json","tslint.json",".eslintrc"],parsers:["json"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}];var fr={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var kt="JavaScript",Nl={arrowParens:{category:kt,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:fr.bracketSameLine,bracketSpacing:fr.bracketSpacing,jsxBracketSameLine:{category:kt,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:kt,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:kt,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:fr.singleQuote,jsxSingleQuote:{category:kt,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:kt,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:kt,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:fr.singleAttributePerLine},ba=Nl;var Yl={estree:_s,"estree-json":js},Xl=[...Ta,...Ba];return Ja($l);}); \ No newline at end of file +`)+u}function uc(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:s,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:a}=e,o=s(a),p=u(a);for(let m of n)s(m)>=o&&u(m)<=p&&i.add(m);return r.slice(o,p)}var Fi=uc;function cs(e,t){var u,i,a,o,p,m,y;if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&pc(r)&&cr(e))return!0;if(ic(r))return!1;if(r.type==="Identifier"){if((u=r.extra)!=null&&u.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let c=(i=e.findAncestor(f=>f.type==="ForOfStatement"))==null?void 0:i.left;if(c&&ie(c,f=>f===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let c=e.findAncestor(l=>l.type==="ExpressionStatement"||l.type==="ForStatement"||l.type==="ForInStatement"),f=c?c.type==="ExpressionStatement"?c.expression:c.type==="ForStatement"?c.init:c.left:void 0;if(f&&ie(f,l=>l===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"type":{let c=e.findAncestor(f=>!Ae(f));if(c!==s&&c.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let c=(a=e.findAncestor(f=>f.type==="ExpressionStatement"))==null?void 0:a.expression;if(c&&ie(c,f=>f===r))return!0}if(r.type==="ObjectExpression"){let c=(o=e.findAncestor(f=>f.type==="ArrowFunctionExpression"))==null?void 0:o.body;if(c&&c.type!=="SequenceExpression"&&c.type!=="AssignmentExpression"&&ie(c,f=>f===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&L(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return Ci(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"){if(q(r)&&r.computed)return!0;let c=!1,f=!1,l=r;for(;l;)switch(l.type){case"MemberExpression":f=!0,l=l.object;break;case"CallExpression":if(f||c)return t.parser!=="typescript";c=!0,l=l.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return t.parser!=="typescript";default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,(c,f)=>f==="returnType"&&c.type==="ArrowFunctionExpression")&&oc(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&ac(e))return!0;if(r.operator==="|>"&&((p=r.extra)!=null&&p.parenthesized)){let c=e.grandparent;if(c.type==="BinaryExpression"&&c.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Ae(r);case"ConditionalExpression":return Ae(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||Ae(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:c,type:f}=r;if(!c&&f!=="TSTypeAssertion")return!0;let l=er(c),h=s.operator,g=er(h);return g>l||n==="right"&&g===l||g===l&&!sr(h,c)?!0:g");default:return!1}case"TSFunctionType":if(e.match(c=>c.type==="TSFunctionType",(c,f)=>f==="typeAnnotation"&&c.type==="TSTypeAnnotation",(c,f)=>f==="returnType"&&c.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":if(n==="extendsType"&&s.type==="TSConditionalType"){if(r.type==="TSConditionalType")return!0;let{typeAnnotation:c}=r.returnType||r.typeAnnotation;if(c.type==="TSTypePredicate"&&c.typeAnnotation&&(c=c.typeAnnotation.typeAnnotation),c.type==="TSInferType"&&c.typeParameter.constraint)return!0}if(n==="checkType"&&s.type==="TSConditionalType")return!0;case"TSUnionType":case"TSIntersectionType":if((s.type==="TSUnionType"||s.type==="TSIntersectionType")&&s.types.length>1&&(!r.types||r.types.length>1))return!0;case"TSInferType":if(r.type==="TSInferType"&&s.type==="TSRestType")return!1;case"TSTypeOperator":return s.type==="TSArrayType"||s.type==="TSOptionalType"||s.type==="TSRestType"||n==="objectType"&&s.type==="TSIndexedAccessType"||s.type==="TSTypeOperator"||s.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return n==="objectType"&&s.type==="TSIndexedAccessType"||n==="elementType"&&s.type==="TSArrayType";case"TypeofTypeAnnotation":return n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||n==="elementType"&&s.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return s.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return s.type==="ArrayTypeAnnotation"||s.type==="NullableTypeAnnotation"||s.type==="IntersectionTypeAnnotation"||s.type==="UnionTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return s.type==="ArrayTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"FunctionTypeAnnotation":{if(e.match(void 0,(f,l)=>l==="typeAnnotation"&&f.type==="TypeAnnotation",(f,l)=>l==="returnType"&&f.type==="ArrowFunctionExpression")||e.match(void 0,(f,l)=>l==="typeAnnotation"&&f.type==="TypePredicate",(f,l)=>l==="typeAnnotation"&&f.type==="TypeAnnotation",(f,l)=>l==="returnType"&&f.type==="ArrowFunctionExpression"))return!0;let c=s.type==="NullableTypeAnnotation"?e.grandparent:s;return c.type==="UnionTypeAnnotation"||c.type==="IntersectionTypeAnnotation"||c.type==="ArrayTypeAnnotation"||n==="objectType"&&(c.type==="IndexedAccessType"||c.type==="OptionalIndexedAccessType")||n==="checkType"&&s.type==="ConditionalTypeAnnotation"||n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.returnType.type==="InferTypeAnnotation"&&r.returnType.typeParameter.bound||c.type==="NullableTypeAnnotation"||s.type==="FunctionTypeParam"&&s.name===null&&$(r).some(f=>{var l;return((l=f.typeAnnotation)==null?void 0:l.type)==="NullableTypeAnnotation"})}case"ConditionalTypeAnnotation":if(n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.type==="ConditionalTypeAnnotation"||n==="checkType"&&s.type==="ConditionalTypeAnnotation")return!0;case"OptionalIndexedAccessType":return n==="objectType"&&s.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof r.value=="string"&&s.type==="ExpressionStatement"&&!s.directive){let c=e.grandparent;return c.type==="Program"||c.type==="BlockStatement"}return n==="object"&&s.type==="MemberExpression"&&typeof r.value=="number";case"AssignmentExpression":{let c=e.grandparent;return n==="body"&&s.type==="ArrowFunctionExpression"?!0:n==="key"&&(s.type==="ClassProperty"||s.type==="PropertyDefinition")&&s.computed||(n==="init"||n==="update")&&s.type==="ForStatement"?!1:s.type==="ExpressionStatement"?r.left.type==="ObjectPattern":!(n==="key"&&s.type==="TSPropertySignature"||s.type==="AssignmentExpression"||s.type==="SequenceExpression"&&c.type==="ForStatement"&&(c.init===s||c.update===s)||n==="value"&&s.type==="Property"&&c.type==="ObjectPattern"&&c.properties.includes(s)||s.type==="NGChainedExpression")}case"ConditionalExpression":switch(s.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:n==="test";case"MemberExpression":case"OptionalMemberExpression":return n==="object";default:return!1}case"FunctionExpression":switch(s.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(s.type){case"BinaryExpression":return s.operator!=="|>"||((m=r.extra)==null?void 0:m.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return n==="test";default:return!1}case"ClassExpression":switch(s.type){case"NewExpression":return n==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(cc(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")){let c=r;for(;c;)switch(c.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":c=c.object;break;case"TaggedTemplateExpression":c=c.tag;break;case"TSNonNullExpression":c=c.expression;break;default:return!1}}return!1;case"BindExpression":return n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")||n==="object"&&q(s);case"NGPipeExpression":return!(s.type==="NGRoot"||s.type==="NGMicrosyntaxExpression"||s.type==="ObjectProperty"&&!((y=r.extra)!=null&&y.parenthesized)||G(s)||n==="arguments"&&w(s)||n==="right"&&s.type==="NGPipeExpression"||n==="property"&&s.type==="MemberExpression"||s.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return n==="callee"||n==="left"&&s.type==="BinaryExpression"&&s.operator==="<"||!G(s)&&s.type!=="ArrowFunctionExpression"&&s.type!=="AssignmentExpression"&&s.type!=="AssignmentPattern"&&s.type!=="BinaryExpression"&&s.type!=="NewExpression"&&s.type!=="ConditionalExpression"&&s.type!=="ExpressionStatement"&&s.type!=="JsExpressionRoot"&&s.type!=="JSXAttribute"&&s.type!=="JSXElement"&&s.type!=="JSXExpressionContainer"&&s.type!=="JSXFragment"&&s.type!=="LogicalExpression"&&!w(s)&&!Ce(s)&&s.type!=="ReturnStatement"&&s.type!=="ThrowStatement"&&s.type!=="TypeCastExpression"&&s.type!=="VariableDeclarator"&&s.type!=="YieldExpression";case"TSInstantiationExpression":return n==="object"&&q(s)}return!1}var ic=M(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function ac(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if((n==null?void 0:n.type)==="ForStatement"&&n.init===r)return!0;r=n}return!1}function oc(e){return tr(e,t=>t.type==="ObjectTypeAnnotation"&&tr(t,r=>r.type==="FunctionTypeAnnotation"))}function pc(e){return se(e)}function cr(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(cr);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(cr);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(cr);break;case"UnaryExpression":if(t.prefix)return e.callParent(cr);break}return!1}function Ci(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!cs(e,t):!jt(r)||n.type!=="ExportDefaultDeclaration"&&cs(e,t)?!1:e.call(()=>Ci(e,t),...Lr(r))}function cc(e){let{node:t,parent:r,grandparent:n,key:s}=e;return!!((t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression")&&(s==="object"&&r.type==="MemberExpression"||s==="callee"&&(r.type==="CallExpression"||r.type==="NewExpression")||r.type==="TSNonNullExpression"&&n.type==="MemberExpression"&&n.object===r)||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(u,i)=>i==="expression"&&u.type==="ChainExpression")&&(e.match(void 0,void 0,(u,i)=>i==="callee"&&(u.type==="CallExpression"&&!u.optional||u.type==="NewExpression")||i==="object"&&u.type==="MemberExpression"&&!u.optional)||e.match(void 0,void 0,(u,i)=>i==="expression"&&u.type==="TSNonNullExpression",(u,i)=>i==="object"&&u.type==="MemberExpression"))||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(u,i)=>i==="expression"&&u.type==="TSNonNullExpression",(u,i)=>i==="expression"&&u.type==="ChainExpression",(u,i)=>i==="object"&&u.type==="MemberExpression"))}var Be=cs;function lc(e,t){let r=t-1;r=Je(e,r,{backwards:!0}),r=qe(e,r,{backwards:!0}),r=Je(e,r,{backwards:!0});let n=qe(e,r,{backwards:!0});return r!==n}var Ai=lc;var mc=()=>!0;function ls(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function Dc(e,t){var m;let r=e.node,n=[ls(e,t)],{printer:s,originalText:u,locStart:i,locEnd:a}=t;if((m=s.isBlockComment)==null?void 0:m.call(s,r)){let y=Z(u,a(r))?Z(u,i(r),{backwards:!0})?C:d:" ";n.push(y)}else n.push(C);let p=qe(u,Je(u,a(r)));return p!==!1&&Z(u,p)&&n.push(C),n}function yc(e,t,r){var p;let n=e.node,s=ls(e,t),{printer:u,originalText:i,locStart:a}=t,o=(p=u.isBlockComment)==null?void 0:p.call(u,n);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||Z(i,a(n),{backwards:!0})){let m=Ai(i,a(n));return{doc:$n([C,m?C:"",s]),isBlock:o,hasLineSuffix:!0}}return!o||r!=null&&r.hasLineSuffix?{doc:[$n([" ",s]),Ee],isBlock:o,hasLineSuffix:!0}:{doc:[" ",s],isBlock:o,hasLineSuffix:!1}}function J(e,t,r={}){let{node:n}=e;if(!L(n==null?void 0:n.comments))return"";let{indent:s=!1,marker:u,filter:i=mc}=r,a=[];if(e.each(({node:p})=>{p.leading||p.trailing||p.marker!==u||!i(p)||a.push(ls(e,t))},"comments"),a.length===0)return"";let o=P(C,a);return s?E([C,o]):o}function ms(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(o=>!n.has(o)).length===0)return{leading:"",trailing:""};let u=[],i=[],a;return e.each(()=>{let o=e.node;if(n!=null&&n.has(o))return;let{leading:p,trailing:m}=o;p?u.push(Dc(e,t)):m&&(a=yc(e,t,a),i.push(a.doc))},"comments"),{leading:u,trailing:i}}function le(e,t,r){let{leading:n,trailing:s}=ms(e,r);return!n&&!s?t:or(t,u=>[n,u,s])}var Ds=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},_e=Ds;function ys(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Me,fs=class{constructor(t){Xs(this,Me,void 0);Vs(this,Me,new Set(t))}getLeadingWhitespaceCount(t){let r=it(this,Me),n=0;for(let s=0;s=0&&r.has(t.charAt(s));s--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return it(this,Me).has(t.charAt(0))}hasTrailingWhitespace(t){return it(this,Me).has(v(!1,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${ys([...it(this,Me)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return t.split(s)}hasWhitespaceCharacter(t){let r=it(this,Me);return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=it(this,Me);return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=it(this,Me);return Array.prototype.every.call(t,n=>r.has(n))}};Me=new WeakMap;var di=fs;var $r=new di(` +\r `),Es=e=>e===""||e===d||e===C||e===F;function fc(e,t,r){var O,R,_;let{node:n}=e;if(n.type==="JSXElement"&&kc(n))return[r("openingElement"),r("closingElement")];let s=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),u=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[s,...e.map(r,"children"),u];n.children=n.children.map(T=>Ic(T)?{type:"JSXText",value:" ",raw:" "}:T);let i=n.children.some(U),a=n.children.filter(T=>T.type==="JSXExpressionContainer").length>1,o=n.type==="JSXElement"&&n.openingElement.attributes.length>1,p=re(s)||i||o||a,m=e.parent.rootMarker==="mdx",y=t.singleQuote?"{' '}":'{" "}',c=m?" ":b([y,F]," "),f=((R=(O=n.openingElement)==null?void 0:O.name)==null?void 0:R.name)==="fbt",l=Ec(e,t,r,c,f),h=n.children.some(T=>lr(T));for(let T=l.length-2;T>=0;T--){let W=l[T]===""&&l[T+1]==="",Fe=l[T]===C&&l[T+1]===""&&l[T+2]===C,X=(l[T]===F||l[T]===C)&&l[T+1]===""&&l[T+2]===c,ue=l[T]===c&&l[T+1]===""&&(l[T+2]===F||l[T+2]===C),z=l[T]===c&&l[T+1]===""&&l[T+2]===c,wt=l[T]===F&&l[T+1]===""&&l[T+2]===C||l[T]===C&&l[T+1]===""&&l[T+2]===F;Fe&&h||W||X||z||wt?l.splice(T,2):ue&&l.splice(T+1,2)}for(;l.length>0&&Es(v(!1,l,-1));)l.pop();for(;l.length>1&&Es(l[0])&&Es(l[1]);)l.shift(),l.shift();let g=[];for(let[T,W]of l.entries()){if(W===c){if(T===1&&l[T-1]===""){if(l.length===2){g.push(y);continue}g.push([y,C]);continue}else if(T===l.length-1){g.push(y);continue}else if(l[T-1]===""&&l[T-2]===C){g.push(y);continue}}g.push(W),re(W)&&(p=!0)}let S=h?Wt(g):D(g,{shouldBreak:!0});if(((_=t.cursorNode)==null?void 0:_.type)==="JSXText"&&n.children.includes(t.cursorNode)&&(S=[Kn,S,Kn]),m)return S;let B=D([s,E([C,S]),C,u]);return p?B:He([D([s,...l,u]),B])}function Ec(e,t,r,n,s){let u=[];return e.each(({node:i,next:a})=>{if(i.type==="JSXText"){let o=De(i);if(lr(i)){let p=$r.split(o,!0);p[0]===""&&(u.push(""),p.shift(),/\n/.test(p[0])?u.push(xi(s,p[1],i,a)):u.push(n),p.shift());let m;if(v(!1,p,-1)===""&&(p.pop(),m=p.pop()),p.length===0)return;for(let[y,c]of p.entries())y%2===1?u.push(d):u.push(c);m!==void 0?/\n/.test(m)?u.push(xi(s,v(!1,u,-1),i,a)):u.push(n):u.push(Ti(s,v(!1,u,-1),i,a))}else/\n/.test(o)?o.match(/\n/g).length>1&&u.push("",C):u.push("",n)}else{let o=r();if(u.push(o),a&&lr(a)){let m=$r.trim(De(a)),[y]=$r.split(m);u.push(Ti(s,y,i,a))}else u.push(C)}},"children"),u}function Ti(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?F:C:F}function xi(e,t,r,n){return e?C:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?C:F:C}var Fc=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function Cc(e,t,r){let{parent:n}=e;if(Fc.has(n.type))return t;let s=e.match(void 0,i=>i.type==="ArrowFunctionExpression",w,i=>i.type==="JSXExpressionContainer"),u=Be(e,r);return D([u?"":b("("),E([F,t]),F,u?"":b(")")],{shouldBreak:s})}function Ac(e,t,r){let{node:n}=e,s=[];if(s.push(r("name")),n.value){let u;if(te(n.value)){let i=De(n.value),a=H(!1,H(!1,i.slice(1,-1),"'","'"),""",'"'),o=Sr(a,t.jsxSingleQuote);a=o==='"'?H(!1,a,'"',"""):H(!1,a,"'","'"),u=e.call(()=>le(e,Ie(o+a+o),t),"value")}else u=r("value");s.push("=",u)}return s}function dc(e,t,r){let{node:n}=e,s=(u,i)=>u.type==="JSXEmptyExpression"||!A(u)&&(G(u)||se(u)||u.type==="ArrowFunctionExpression"||u.type==="AwaitExpression"&&(s(u.argument,u)||u.argument.type==="JSXElement")||w(u)||u.type==="ChainExpression"&&w(u.expression)||u.type==="FunctionExpression"||u.type==="TemplateLiteral"||u.type==="TaggedTemplateExpression"||u.type==="DoExpression"||U(i)&&(u.type==="ConditionalExpression"||me(u)));return s(n.expression,e.parent)?D(["{",r("expression"),ke,"}"]):D(["{",E([F,r("expression")]),F,ke,"}"])}function Tc(e,t,r){var a,o;let{node:n}=e,s=A(n.name)||A(n.typeParameters)||A(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!s)return["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((a=n.attributes)==null?void 0:a.length)===1&&n.attributes[0].value&&te(n.attributes[0].value)&&!n.attributes[0].value.value.includes(` +`)&&!s&&!A(n.attributes[0]))return D(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let u=(o=n.attributes)==null?void 0:o.some(p=>p.value&&te(p.value)&&p.value.value.includes(` +`)),i=t.singleAttributePerLine&&n.attributes.length>1?C:d;return D(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters"),E(e.map(()=>[i,r()],"attributes")),...xc(n,t,s)],{shouldBreak:u})}function xc(e,t,r){return e.selfClosing?[d,"/>"]:gc(e,t,r)?[">"]:[F,">"]}function gc(e,t,r){let n=e.attributes.length>0&&A(v(!1,e.attributes,-1),x.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function hc(e,t,r){let{node:n}=e,s=[];s.push(""),s}function Sc(e,t){let{node:r}=e,n=A(r),s=A(r,x.Line),u=r.type==="JSXOpeningFragment";return[u?"<":""]}function Bc(e,t,r){let n=le(e,fc(e,t,r),t);return Cc(e,n,t)}function bc(e,t){let{node:r}=e,n=A(r,x.Line);return[J(e,t,{indent:n}),n?C:""]}function Pc(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let u=["...",r()];return!A(s)||!ss(e)?u:[E([F,le(e,u,t)]),F]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function gi(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return Ac(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return P(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return P(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return Pc(e,t,r);case"JSXExpressionContainer":return dc(e,t,r);case"JSXFragment":case"JSXElement":return Bc(e,t,r);case"JSXOpeningElement":return Tc(e,t,r);case"JSXClosingElement":return hc(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return Sc(e,t);case"JSXEmptyExpression":return bc(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new _e(n,"JSX")}}function kc(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!lr(t)}function lr(e){return e.type==="JSXText"&&($r.hasNonWhitespaceCharacter(De(e))||!/\n/.test(De(e)))}function Ic(e){return e.type==="JSXExpressionContainer"&&te(e.expression)&&e.expression.value===" "&&!A(e.expression)}function hi(e){let{node:t,parent:r}=e;if(!U(t)||!U(r))return!1;let{index:n,siblings:s}=e,u;for(let i=n;i>0;i--){let a=s[i-1];if(!(a.type==="JSXText"&&!lr(a))){u=a;break}}return(u==null?void 0:u.type)==="JSXExpressionContainer"&&u.expression.type==="JSXEmptyExpression"&&Bt(u.expression)}function Lc(e){return Bt(e.node)||hi(e)}var Hr=Lc;var wc=0;function Kr(e,t,r){var R;let{node:n,parent:s,grandparent:u,key:i}=e,a=i!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),o=n.operator==="|>"&&((R=e.root.extra)==null?void 0:R.__isUsingHackPipeline),p=Fs(e,r,t,!1,a);if(a)return p;if(o)return D(p);if(w(s)&&s.callee===n||s.type==="UnaryExpression"||q(s)&&!s.computed)return D([E([F,...p]),F]);let m=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&u.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&u.type==="NGMicrosyntax"&&u.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&u.type!=="ReturnStatement"&&u.type!=="ThrowStatement"&&!w(u)||s.type==="TemplateLiteral",y=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Ce(s),c=me(n.left)&&sr(n.operator,n.left.operator);if(m||Ut(n)&&!c||!Ut(n)&&y)return D(p);if(p.length===0)return"";let f=U(n.right),l=p.findIndex(_=>typeof _!="string"&&!Array.isArray(_)&&_.type===pe),h=p.slice(0,l===-1?1:l+1),g=p.slice(h.length,f?-1:void 0),S=Symbol("logicalChain-"+ ++wc),B=D([...h,E(g)],{id:S});if(!f)return B;let O=v(!1,p,-1);return D([B,Ct(O,{groupId:S})])}function Fs(e,t,r,n,s){var h;let{node:u}=e;if(!me(u))return[D(t())];let i=[];sr(u.operator,u.left.operator)?i=e.call(g=>Fs(g,t,r,!0,s),"left"):i.push(D(t("left")));let a=Ut(u),o=(u.operator==="|>"||u.type==="NGPipeExpression"||Oc(e,r))&&!we(r.originalText,u.right),p=u.type==="NGPipeExpression"?"|":u.operator,m=u.type==="NGPipeExpression"&&u.arguments.length>0?D(E([F,": ",P([d,": "],e.map(()=>ge(2,D(t())),"arguments"))])):"",y;if(a)y=[p," ",t("right"),m];else{let S=p==="|>"&&((h=e.root.extra)==null?void 0:h.__isUsingHackPipeline)?e.call(B=>Fs(B,t,r,!0,s),"right"):t("right");y=[o?d:"",p,o?" ":d,S,m]}let{parent:c}=e,f=A(u.left,x.Trailing|x.Line),l=f||!(s&&u.type==="LogicalExpression")&&c.type!==u.type&&u.left.type!==u.type&&u.right.type!==u.type;if(i.push(o?"":" ",l?D(y,{shouldBreak:f}):y),n&&A(u)){let g=Nt(le(e,i,r));return Array.isArray(g)||g.type===de?Wr(g):[g]}return i}function Ut(e){return e.type!=="LogicalExpression"?!1:!!(se(e.right)&&e.right.properties.length>0||G(e.right)&&e.right.elements.length>0||U(e.right))}var Si=e=>e.type==="BinaryExpression"&&e.operator==="|";function Oc(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&Si(e.node)&&!e.hasAncestor(r=>!Si(r)&&r.type!=="JsExpressionRoot")}function bi(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),A(n.node)?" //"+ot(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return Kr(e,t,r);case"NGChainedExpression":return D(P([";",d],e.map(()=>_c(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":Bi(e)?" ":[";",d],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:s,parent:u}=e,i=Bi(e)||(s===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||(s===2||s===3)&&(n.key.name==="else"&&u.body[s-1].type==="NGMicrosyntaxKeyedExpression"&&u.body[s-1].key.name==="then"||n.key.name==="track"))&&u.body[0].type==="NGMicrosyntaxExpression";return[r("key"),i?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new _e(n,"Angular")}}function Bi({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}var vc=M(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function _c({node:e}){return tr(e,vc)}function Cs(e,t,r){let{node:n}=e;return D([P(d,e.map(r,"decorators")),Ii(n,t)?C:d])}function Pi(e,t,r){return Li(e.node)?[P(C,e.map(r,"declaration","decorators")),C]:""}function ki(e,t,r){let{node:n,parent:s}=e,{decorators:u}=n;if(!L(u)||Li(s)||Hr(e))return"";let i=n.type==="ClassExpression"||n.type==="ClassDeclaration"||Ii(n,t);return[e.key==="declaration"&&mu(s)?C:i?Ee:"",P(d,e.map(r,"decorators")),d]}function Ii(e,t){return e.decorators.some(r=>Z(t.originalText,I(r)))}function Li(e){var r;if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let t=(r=e.declaration)==null?void 0:r.decorators;return L(t)&>(e,t[0])}var mt=class extends Error{name="ArgExpansionBailout"};function Mc(e,t,r){let{node:n}=e,s=ae(n);if(s.length===0)return["(",J(e,t),")"];if(Jc(s))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let u=!1,i=s.length-1,a=[];ur(e,({node:c},f)=>{let l=r();f===i||(fe(c,t)?(u=!0,l=[l,",",C,C]):l=[l,",",d]),a.push(l)});let p=!(n.type==="ImportExpression"||n.callee.type==="Import")&&ye(t,"all")?",":"";function m(){return D(["(",E([d,...a]),p,d,")"],{shouldBreak:!0})}if(u||e.parent.type!=="Decorator"&&Au(s))return m();if(Rc(s)){let c=a.slice(1);if(c.some(re))return m();let f;try{f=r(Yn(n,0),{expandFirstArg:!0})}catch(l){if(l instanceof mt)return m();throw l}return re(f)?[Ee,He([["(",D(f,{shouldBreak:!0}),", ",...c,")"],m()])]:He([["(",f,", ",...c,")"],["(",D(f,{shouldBreak:!0}),", ",...c,")"],m()])}if(jc(s,a,t)){let c=a.slice(0,-1);if(c.some(re))return m();let f;try{f=r(Yn(n,-1),{expandLastArg:!0})}catch(l){if(l instanceof mt)return m();throw l}return re(f)?[Ee,He([["(",...c,D(f,{shouldBreak:!0}),")"],m()])]:He([["(",...c,f,")"],["(",...c,D(f,{shouldBreak:!0}),")"],m()])}let y=["(",E([F,...a]),b(p),F,")"];return _r(e)?y:D(y,{shouldBreak:a.some(re)||u})}function mr(e,t=!1){return se(e)&&(e.properties.length>0||A(e))||G(e)&&(e.elements.length>0||A(e))||e.type==="TSTypeAssertion"&&mr(e.expression)||Ae(e)&&mr(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||qc(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&mr(e.body,!0)||se(e.body)||G(e.body)||!t&&(w(e.body)||e.body.type==="ConditionalExpression")||U(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function jc(e,t,r){var u,i;let n=v(!1,e,-1);if(e.length===1){let a=v(!1,t,-1);if((u=a.label)!=null&&u.embed&&((i=a.label)==null?void 0:i.hug)!==!1)return!0}let s=v(!1,e,-2);return!A(n,x.Leading)&&!A(n,x.Trailing)&&mr(n)&&(!s||s.type!==n.type)&&(e.length!==2||s.type!=="ArrowFunctionExpression"||!G(n))&&!(e.length>1&&As(n,r))}function Rc(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&Wc(r)?!0:!A(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&wi(r)&&!mr(r)}function wi(e){var t;if(e.type==="ParenthesizedExpression")return wi(e.expression);if(Ae(e)||e.type==="TypeCastExpression"){let{typeAnnotation:r}=e;return r.type==="TypeAnnotation"&&(r=r.typeAnnotation),r.type==="TSArrayType"&&(r=r.elementType,r.type==="TSArrayType"&&(r=r.elementType)),(r.type==="GenericTypeAnnotation"||r.type==="TSTypeReference")&&((t=r.typeParameters)==null?void 0:t.params.length)===1&&(r=r.typeParameters.params[0]),Jt(r)&&be(e.expression,1)}return pt(e)&&ae(e).length>1?!1:me(e)?be(e.left,1)&&be(e.right,1):Wn(e)||be(e)}function Jc(e){return e.length===2&&e[0].type==="ArrowFunctionExpression"&&$(e[0]).length===0&&e[0].body.type==="BlockStatement"&&e[1].type==="ArrayExpression"&&!e.some(t=>A(t))}function qc(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||A(e,x.Dangling))}function Wc(e){return e.type==="ObjectExpression"&&e.properties.length===1&&Ce(e.properties[0])&&e.properties[0].key.type==="Identifier"&&e.properties[0].key.name==="type"&&te(e.properties[0].value)&&e.properties[0].value.value==="module"}var Dr=Mc;var Nc=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),w(e)&&ae(e).length>0);function Oi(e,t,r){var p;let n=r("object"),s=ds(e,t,r),{node:u}=e,i=e.findAncestor(m=>!(q(m)||m.type==="TSNonNullExpression")),a=e.findAncestor(m=>!(m.type==="ChainExpression"||m.type==="TSNonNullExpression")),o=i&&(i.type==="NewExpression"||i.type==="BindExpression"||i.type==="AssignmentExpression"&&i.left.type!=="Identifier")||u.computed||u.object.type==="Identifier"&&u.property.type==="Identifier"&&!q(a)||(a.type==="AssignmentExpression"||a.type==="VariableDeclarator")&&(Nc(u.object)||((p=n.label)==null?void 0:p.memberChain));return st(n.label,[n,o?s:D(E([F,s]))])}function ds(e,t,r){let n=r("property"),{node:s}=e,u=V(e);return s.computed?!s.property||Pe(s.property)?[u,"[",n,"]"]:D([u,"[",E([F,n]),F,"]"]):[u,".",n]}function vi(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>vi(e,t,r),"expression");let{parent:n}=e,s=!n||n.type==="ExpressionStatement",u=[];function i(k){let{originalText:N}=t,Q=lt(N,I(k));return N.charAt(Q)===")"?Q!==!1&&_t(N,Q+1):fe(k,t)}function a(k){let{node:N}=k;if(N.type==="ChainExpression")return k.call(()=>a(k),"expression");if(w(N)&&(Et(N.callee)||w(N.callee))){let Q=i(N);u.unshift({node:N,hasTrailingEmptyLine:Q,printed:[le(k,[V(k),ze(k,t,r),Dr(k,t,r)],t),Q?C:""]}),k.call(je=>a(je),"callee")}else Et(N)?(u.unshift({node:N,needsParens:Be(k,t),printed:le(k,q(N)?ds(k,t,r):zr(k,t,r),t)}),k.call(Q=>a(Q),"object")):N.type==="TSNonNullExpression"?(u.unshift({node:N,printed:le(k,"!",t)}),k.call(Q=>a(Q),"expression")):u.unshift({node:N,printed:r()})}let{node:o}=e;u.unshift({node:o,printed:[V(e),ze(e,t,r),Dr(e,t,r)]}),o.callee&&e.call(k=>a(k),"callee");let p=[],m=[u[0]],y=1;for(;y0&&p.push(m);function f(k){return/^[A-Z]|^[$_]+$/.test(k)}function l(k){return k.length<=t.tabWidth}function h(k){var je;let N=(je=k[1][0])==null?void 0:je.node.computed;if(k[0].length===1){let xt=k[0][0].node;return xt.type==="ThisExpression"||xt.type==="Identifier"&&(f(xt.name)||s&&l(xt.name)||N)}let Q=v(!1,k[0],-1).node;return q(Q)&&Q.property.type==="Identifier"&&(f(Q.property.name)||N)}let g=p.length>=2&&!A(p[1][0].node)&&h(p);function S(k){let N=k.map(Q=>Q.printed);return k.length>0&&v(!1,k,-1).needsParens?["(",...N,")"]:N}function B(k){return k.length===0?"":E([C,P(C,k.map(S))])}let O=p.map(S),R=O,_=g?3:2,T=p.flat(),W=T.slice(1,-1).some(k=>A(k.node,x.Leading))||T.slice(0,-1).some(k=>A(k.node,x.Trailing))||p[_]&&A(p[_][0].node,x.Leading);if(p.length<=_&&!W&&!p.some(k=>v(!1,k,-1).hasTrailingEmptyLine))return _r(e)?R:D(R);let Fe=v(!1,p[g?1:0],-1).node,X=!w(Fe)&&i(Fe),ue=[S(p[0]),g?p.slice(1,2).map(S):"",X?C:"",B(p.slice(g?2:1))],z=u.map(({node:k})=>k).filter(w);function wt(){let k=v(!1,v(!1,p,-1),-1).node,N=v(!1,O,-1);return w(k)&&re(N)&&z.slice(0,-1).some(Q=>Q.arguments.some(Mt))}let Ht;return W||z.length>2&&z.some(k=>!k.arguments.every(N=>be(N)))||O.slice(0,-1).some(re)||wt()?Ht=D(ue):Ht=[re(R)||X?Ee:"",He([R,ue])],st({memberChain:!0},Ht)}var _i=vi;function Qr(e,t,r){var y;let{node:n,parent:s}=e,u=n.type==="NewExpression",i=n.type==="ImportExpression",a=V(e),o=ae(n),p=o.length===1&&Or(o[0],t.originalText);if(p||o.length>0&&!u&&!i&&(Uc(n,s)||St(n,s))){let c=[];if(ur(e,()=>{c.push(r())}),!(p&&((y=c[0].label)!=null&&y.embed)))return[u?"new ":"",r("callee"),a,ze(e,t,r),"(",P(", ",c),")"]}if(!i&&!u&&Et(n.callee)&&!e.call(c=>Be(c,t),"callee",...n.callee.type==="ChainExpression"?["expression"]:[]))return _i(e,t,r);let m=[u?"new ":"",i?Gc(n):r("callee"),a,ze(e,t,r),Dr(e,t,r)];return i||w(n.callee)?D(m):m}function Gc(e){return e.phase?`import.${e.phase}`:"import"}function Uc(e,t){if(e.callee.type!=="Identifier")return!1;if(e.callee.name==="require"){let r=ae(e);return r.length===1&&te(r[0])||r.length>1}if(e.callee.name==="define"){let r=ae(e);return t.type==="ExpressionStatement"&&(r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&te(r[0])&&r[1].type==="ArrayExpression")}return!1}function dt(e,t,r,n,s,u){let i=Yc(e,t,r,n,u),a=u?r(u,{assignmentLayout:i}):"";switch(i){case"break-after-operator":return D([D(n),s,D(E([d,a]))]);case"never-break-after-operator":return D([D(n),s," ",a]);case"fluid":{let o=Symbol("assignment");return D([D(n),s,D(E(d),{id:o}),ke,Ct(a,{groupId:o})])}case"break-lhs":return D([n,s," ",D(a)]);case"chain":return[D(n),s,d,a];case"chain-tail":return[D(n),s,E([d,a])];case"chain-tail-arrow-chain":return[D(n),s,a];case"only-left":return n}}function ji(e,t,r){let{node:n}=e;return dt(e,t,r,r("left"),[" ",n.operator],"right")}function Ri(e,t,r){return dt(e,t,r,r("id")," =","init")}function Yc(e,t,r,n,s){let{node:u}=e,i=u[s];if(!i)return"only-left";let a=!Zr(i);if(e.match(Zr,Ji,c=>!a||c.type!=="ExpressionStatement"&&c.type!=="VariableDeclaration"))return a?i.type==="ArrowFunctionExpression"&&i.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&Zr(i.right)||we(t.originalText,i))return"break-after-operator";if(i.type==="CallExpression"&&i.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let m=vu(n);if(Vc(u)||zc(u)||Ts(u)&&m)return"break-lhs";let y=Zc(u,n,t);return e.call(()=>Xc(e,t,r,y),s)?"break-after-operator":$c(u)?"break-lhs":!m&&(y||i.type==="TemplateLiteral"||i.type==="TaggedTemplateExpression"||i.type==="BooleanLiteral"||Pe(i)||i.type==="ClassExpression")?"never-break-after-operator":"fluid"}function Xc(e,t,r,n){let s=e.node;if(me(s)&&!Ut(s))return!0;switch(s.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!rl(s))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:p}=s;return me(p)&&!Ut(p)}let{consequent:a,alternate:o}=s;return a.type==="ConditionalExpression"||o.type==="ConditionalExpression"}case"ClassExpression":return L(s.decorators)}if(n)return!1;let u=s,i=[];for(;;)if(u.type==="UnaryExpression"||u.type==="AwaitExpression"||u.type==="YieldExpression"&&u.argument!==null)u=u.argument,i.push("argument");else if(u.type==="TSNonNullExpression")u=u.expression,i.push("expression");else break;return!!(te(u)||e.call(()=>qi(e,t,r),...i))}function Vc(e){if(Ji(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>{var n;return Ce(r)&&(!r.shorthand||((n=r.value)==null?void 0:n.type)==="AssignmentPattern")})}return!1}function Zr(e){return e.type==="AssignmentExpression"}function Ji(e){return Zr(e)||e.type==="VariableDeclarator"}function $c(e){let t=Kc(e);if(L(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}var Hc=M(["TSTypeAliasDeclaration","TypeAlias"]);function Kc(e){var t;if(Hc(e))return(t=e.typeParameters)==null?void 0:t.params}function zc(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=Mi(t.typeAnnotation);return L(r)&&r.length>1&&r.some(n=>L(Mi(n))||n.type==="TSConditionalType")}function Ts(e){var t;return e.type==="VariableDeclarator"&&((t=e.init)==null?void 0:t.type)==="ArrowFunctionExpression"}var Qc=M(["TSTypeReference","GenericTypeAnnotation"]);function Mi(e){var t;if(Qc(e))return(t=e.typeParameters)==null?void 0:t.params}function qi(e,t,r,n=!1){var i;let{node:s}=e,u=()=>qi(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(u,"expression");if(w(s)){if((i=Qr(e,t,r).label)!=null&&i.memberChain)return!1;let o=ae(s);return!(o.length===0||o.length===1&&nr(o[0],t))||el(s,r)?!1:e.call(u,"callee")}return q(s)?e.call(u,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function Zc(e,t,r){return Ce(e)?(t=Nt(t),typeof t=="string"&&Ze(t)1)return!0;if(r.length===1){let s=r[0];if(We(s)||Mr(s)||s.type==="TSTypeLiteral"||s.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(re(t(n)))return!0}return!1}function tl(e){var t;return(t=e.typeParameters??e.typeArguments)==null?void 0:t.params}function rl(e){function t(r){switch(r.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":case"TSTypeReference":return!!r.typeParameters;default:return!1}}return t(e.checkType)||t(e.extendsType)}function Dt(e,t,r,n,s){let u=e.node,i=$(u),a=s?ze(e,r,t):"";if(i.length===0)return[a,"(",J(e,r,{filter:l=>Ke(r.originalText,I(l))===")"}),")"];let{parent:o}=e,p=St(o),m=xs(u),y=[];if(gu(e,(l,h)=>{let g=h===i.length-1;g&&u.rest&&y.push("..."),y.push(t()),!g&&(y.push(","),p||m?y.push(" "):fe(i[h],r)?y.push(C,C):y.push(d))}),n&&!sl(e)){if(re(a)||re(y))throw new mt;return D([ar(a),"(",ar(y),")"])}let c=i.every(l=>!L(l.decorators));return m&&c?[a,"(",...y,")"]:p?[a,"(",...y,")"]:(wr(o)||yu(o)||o.type==="TypeAlias"||o.type==="UnionTypeAnnotation"||o.type==="IntersectionTypeAnnotation"||o.type==="FunctionTypeAnnotation"&&o.returnType===u)&&i.length===1&&i[0].name===null&&u.this!==i[0]&&i[0].typeAnnotation&&u.typeParameters===null&&Jt(i[0].typeAnnotation)&&!u.rest?r.arrowParens==="always"?["(",...y,")"]:y:[a,"(",E([F,...y]),b(!xu(u)&&ye(r,"all")?",":""),F,")"]}function xs(e){if(!e)return!1;let t=$(e);if(t.length!==1)return!1;let[r]=t;return!A(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Le(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Le(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||se(r.right)&&r.right.properties.length===0||G(r.right)&&r.right.elements.length===0))}function nl(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function kt(e,t){var s;let r=nl(e);if(!r)return!1;let n=(s=e.typeParameters)==null?void 0:s.params;if(n){if(n.length>1)return!1;if(n.length===1){let u=n[0];if(u.constraint||u.default)return!1}}return $(e).length===1&&(Le(r)||re(t))}function sl(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function Wi(e){let t=$(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}var ul=M(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),il=M(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function al(e){let{types:t}=e;if(t.some(n=>A(n)))return!1;let r=t.find(n=>il(n));return r?t.every(n=>n===r||ul(n)):!1}function gs(e){return Jt(e)||Le(e)?!0:We(e)?al(e):!1}function Ni(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[ne(e),"opaque type ",r("id"),r("typeParameters")];return s.supertype&&u.push(": ",r("supertype")),s.impltype&&u.push(" = ",r("impltype")),u.push(n),u}function en(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[ne(e)];u.push("type ",r("id"),r("typeParameters"));let i=s.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[dt(e,t,r,u," =",i),n]}function tn(e,t,r){let n=!1;return D(e.map(({isFirst:s,previous:u,node:i,index:a})=>{let o=r();if(s)return o;let p=Le(i),m=Le(u);return m&&p?[" & ",n?E(o):o]:!m&&!p?E([" &",d,o]):(a>1&&(n=!0),[" & ",a>1?E(o):o])},"types"))}function rn(e,t,r){let{node:n}=e,{parent:s}=e,u=s.type!=="TypeParameterInstantiation"&&(s.type!=="TSConditionalType"||!t.experimentalTernaries)&&(s.type!=="ConditionalTypeAnnotation"||!t.experimentalTernaries)&&s.type!=="TSTypeParameterInstantiation"&&s.type!=="GenericTypeAnnotation"&&s.type!=="TSTypeReference"&&s.type!=="TSTypeAssertion"&&s.type!=="TupleTypeAnnotation"&&s.type!=="TSTupleType"&&!(s.type==="FunctionTypeParam"&&!s.name&&e.grandparent.this!==s)&&!((s.type==="TypeAlias"||s.type==="VariableDeclarator"||s.type==="TSTypeAliasDeclaration")&&we(t.originalText,n)),i=gs(n),a=e.map(m=>{let y=r();return i||(y=ge(2,y)),le(m,y,t)},"types");if(i)return P(" | ",a);let o=u&&!we(t.originalText,n),p=[b([o?d:"","| "]),P([d,"| "],a)];return Be(e,t)?D([E(p),F]):(s.type==="TupleTypeAnnotation"||s.type==="TSTupleType")&&s[s.type==="TupleTypeAnnotation"&&s.types?"types":"elementTypes"].length>1?D([E([b(["(",F]),p]),F,b(")")]):D(u?E(p):p)}function ol(e){var n;let{node:t,parent:r}=e;return t.type==="FunctionTypeAnnotation"&&(wr(r)||!((r.type==="ObjectTypeProperty"||r.type==="ObjectTypeInternalSlot")&&!r.variance&&!r.optional&>(r,t)||r.type==="ObjectTypeCallProperty"||((n=e.getParentNode(2))==null?void 0:n.type)==="DeclareFunction"))}function nn(e,t,r){let{node:n}=e,s=[Yt(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&s.push("new ");let u=Dt(e,r,t,!1,!0),i=[];return n.type==="FunctionTypeAnnotation"?i.push(ol(e)?" => ":": ",r("returnType")):i.push(Y(e,r,n.returnType?"returnType":"typeAnnotation")),kt(n,i)&&(u=D(u)),s.push(u,i),D(s)}function sn(e,t,r){return[r("objectType"),V(e),"[",r("indexType"),"]"]}function un(e,t,r){return["infer ",r("typeParameter")]}function hs(e,t,r){let{node:n}=e;return[n.postfix?"":r,Y(e,t),n.postfix?r:""]}function an(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function on(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var pl=new WeakSet;function Y(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let s=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let u=e.call(Gi,r);(u==="=>"||u===":"&&A(n,x.Leading))&&(s=!0),pl.add(n)}return s?[" ",t(r)]:t(r)}var Gi=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function pn(e,t,r){let n=Gi(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function cn(e){return[e("elementType"),"[]"]}function ln({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument",n=e.type==="TSTypeQuery"?"typeParameters":"typeArguments";return["typeof ",t(r),t(n)]}function mn(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",Y(e,t)]:""]}function V(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":w(t)||q(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function Dn(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var cl=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function ne(e){let{node:t}=e;return t.declare||cl.has(t.type)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var ll=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Yt({node:e}){return e.abstract||ll.has(e.type)?"abstract ":""}function ze(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function zr(e,t,r){return["::",r("callee")]}function yt(e,t,r){return e.type==="EmptyStatement"?";":e.type==="BlockStatement"||r?[" ",t]:E([d,t])}function yn(e,t){return["...",t("argument"),Y(e,t)]}function Xt(e){return e.accessibility?e.accessibility+" ":""}function ml(e,t,r,n){let{node:s}=e;return A(s,x.Dangling)?D([r,J(e,t,{indent:!0}),F,n]):[r,n]}function Vt(e,t,r){let{node:n}=e,s=[],u=n.type==="TupleExpression"?"#[":"[",i="]",a=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",o=n[a];if(o.length===0)s.push(ml(e,t,u,i));else{let p=v(!1,o,-1),m=(p==null?void 0:p.type)!=="RestElement",y=p===null,c=Symbol("array"),f=!t.__inJestEach&&o.length>1&&o.every((g,S,B)=>{let O=g==null?void 0:g.type;if(!G(g)&&!se(g))return!1;let R=B[S+1];if(R&&O!==R.type)return!1;let _=G(g)?"elements":"properties";return g[_]&&g[_].length>1}),l=As(n,t),h=m?y?",":ye(t)?l?b(",","",{groupId:c}):b(","):"":"";s.push(D([u,E([F,l?yl(e,t,r,h):[Dl(e,t,a,r),h],J(e,t)]),F,i],{shouldBreak:f,id:c}))}return s.push(V(e),Y(e,r)),s}function As(e,t){return G(e)&&e.elements.length>1&&e.elements.every(r=>r&&(Pe(r)||qn(r)&&!A(r.argument))&&!A(r,x.Trailing|x.Line,n=>!Z(t.originalText,j(n),{backwards:!0})))}function Ui({node:e},{originalText:t}){let r=s=>Ot(t,vt(t,s)),n=s=>t[s]===","?s:n(r(s+1));return _t(t,n(I(e)))}function Dl(e,t,r,n){let s=[];return e.each(({node:u,isLast:i})=>{s.push(u?D(n()):""),i||s.push([",",d,u&&Ui(e,t)?F:""])},r),s}function yl(e,t,r,n){let s=[];return e.each(({isLast:u,next:i})=>{s.push([r(),u?n:","]),u||s.push(Ui(e,t)?[C,C]:A(i,x.Leading|x.Line)?C:d)},"elements"),Wt(s)}var Yi=new Proxy(()=>{},{get:()=>Yi}),fn=Yi;function fl(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}var Qe=fl;var En=new WeakMap;function ft(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:s}=e,{key:u}=n;if(t.quoteProps==="consistent"&&!En.has(s)){let i=(s.properties||s.body||s.members).some(a=>!a.computed&&a.key&&te(a.key)&&!Gn(a,t));En.set(s,i)}if((u.type==="Identifier"||Pe(u)&&Un(Qe(De(u)))&&String(u.value)===Qe(De(u))&&!(t.parser==="typescript"||t.parser==="babel-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&En.get(s))){let i=at(JSON.stringify(u.type==="Identifier"?u.name:u.value.toString()),t);return e.call(a=>le(a,i,t),"key")}return Gn(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!En.get(s))?e.call(i=>le(i,/^\d/.test(u.value)?Qe(u.value):u.value,t),"key"):r("key")}function Ss(e,t,r){let{node:n}=e;return n.shorthand?r("value"):dt(e,t,r,ft(e,t,r),":","value")}var El=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&ht(r));function Fn(e,t,r,n){if(El(e))return Cn(e,r,t);let{node:s}=e,u=!1;if((s.type==="FunctionDeclaration"||s.type==="FunctionExpression")&&(n!=null&&n.expandLastArg)){let{parent:m}=e;w(m)&&(ae(m).length>1||$(s).every(y=>y.type==="Identifier"&&!y.typeAnnotation))&&(u=!0)}let i=[ne(e),s.async?"async ":"",`function${s.generator?"*":""} `,s.id?t("id"):""],a=Dt(e,t,r,u),o=dn(e,t),p=kt(s,o);return i.push(ze(e,r,t),D([p?D(a):a,o]),s.body?" ":"",t("body")),r.semi&&(s.declare||!s.body)&&i.push(";"),i}function yr(e,t,r){let{node:n}=e,{kind:s}=n,u=n.value||n,i=[];return!s||s==="init"||s==="method"||s==="constructor"?u.async&&i.push("async "):(fn.ok(s==="get"||s==="set"),i.push(s," ")),u.generator&&i.push("*"),i.push(ft(e,t,r),n.optional||n.key.optional?"?":"",n===u?Cn(e,t,r):r("value")),i}function Cn(e,t,r){let{node:n}=e,s=Dt(e,r,t),u=dn(e,r),i=Wi(n),a=kt(n,u),o=[ze(e,t,r),D([i?D(s,{shouldBreak:!0}):a?D(s):s,u])];return n.body?o.push(" ",r("body")):o.push(t.semi?";":""),o}function Fl(e){let t=$(e);return t.length===1&&!e.typeParameters&&!A(e,x.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!A(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function An(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return Fl(r)}return!1}function dn(e,t){let{node:r}=e,s=[Y(e,t,"returnType")];return r.predicate&&s.push(t("predicate")),s}function Xi(e,t,r){let{node:n}=e,s=t.semi?";":"",u=[];if(n.argument){let o=r("argument");Cl(t,n.argument)?o=["(",E([C,o]),C,")"]:(me(n.argument)||n.argument.type==="SequenceExpression"||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(o=D([b("("),E([F,o]),F,b(")")])),u.push(" ",o)}let i=A(n,x.Dangling),a=s&&i&&A(n,x.Last|x.Line);return a&&u.push(s),i&&u.push(" ",J(e,t)),a||u.push(s),u}function Vi(e,t,r){return["return",Xi(e,t,r)]}function $i(e,t,r){return["throw",Xi(e,t,r)]}function Cl(e,t){if(we(e.originalText,t)||A(t,x.Leading,r=>Te(e.originalText,j(r),I(r)))&&!U(t))return!0;if(jt(t)){let r=t,n;for(;n=lu(r);)if(r=n,we(e.originalText,r))return!0}return!1}var Bs=new WeakMap;function Hi(e){return Bs.has(e)||Bs.set(e,e.type==="ConditionalExpression"&&!ie(e,t=>t.type==="ObjectExpression")),Bs.get(e)}var Ki=e=>e.type==="SequenceExpression";function zi(e,t,r,n={}){let s=[],u,i=[],a=!1,o=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",p;(function g(){let{node:S}=e,B=Al(e,t,r,n);if(s.length===0)s.push(B);else{let{leading:O,trailing:R}=ms(e,t);s.push([O,B]),i.unshift(R)}o&&(a||(a=S.returnType&&$(S).length>0||S.typeParameters||$(S).some(O=>O.type!=="Identifier"))),!o||S.body.type!=="ArrowFunctionExpression"?(u=r("body",n),p=S.body):e.call(g,"body")})();let m=!we(t.originalText,p)&&(Ki(p)||dl(p,u,t)||!a&&Hi(p)),y=e.key==="callee"&&pt(e.parent),c=Symbol("arrow-chain"),f=Tl(e,n,{signatureDocs:s,shouldBreak:a}),l,h=!1;return o&&(y||n.assignmentLayout)&&(h=!0,l=n.assignmentLayout==="chain-tail-arrow-chain"||y&&!m),u=xl(e,t,n,{bodyDoc:u,bodyComments:i,functionBody:p,shouldPutBodyOnSameLine:m}),D([D(h?E([F,f]):f,{shouldBreak:l,id:c})," =>",o?Ct(u,{groupId:c}):D(u),o&&y?b(F,"",{groupId:c}):""])}function Al(e,t,r,n){let{node:s}=e,u=[];if(s.async&&u.push("async "),An(e,t))u.push(r(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,o=dn(e,r);if(a){if(re(o))throw new mt;o=D(ar(o))}u.push(D([Dt(e,r,t,a,!0),o]))}let i=J(e,t,{filter(a){let o=lt(t.originalText,I(a));return o!==!1&&t.originalText.slice(o,o+2)==="=>"}});return i&&u.push(" ",i),u}function dl(e,t,r){var n,s;return G(e)||se(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||U(e)||((n=t.label)==null?void 0:n.hug)!==!1&&(((s=t.label)==null?void 0:s.embed)||Or(e,r.originalText))}function Tl(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:s,key:u}=e;return u!=="callee"&&pt(s)||me(s)?D([r[0]," =>",E([d,P([" =>",d],r.slice(1))])],{shouldBreak:n}):u==="callee"&&pt(s)||t.assignmentLayout?D(P([" =>",d],r),{shouldBreak:n}):D(E(P([" =>",d],r)),{shouldBreak:n})}function xl(e,t,r,{bodyDoc:n,bodyComments:s,functionBody:u,shouldPutBodyOnSameLine:i}){let{node:a,parent:o}=e,p=r.expandLastArg&&ye(t,"all")?b(","):"",m=(r.expandLastArg||o.type==="JSXExpressionContainer")&&!A(a)?F:"";return i&&Hi(u)?[" ",D([b("","("),E([F,n]),b("",")"),p,m]),s]:(Ki(u)&&(n=D(["(",E([F,n]),F,")"])),i?[" ",n,s]:[E([d,n,s]),p,m])}var gl=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let s=t[n];if(r(s,n,t))return s}}},Qi=gl;function fr(e,t,r,n){let{node:s}=e,u=[],i=Qi(!1,s[n],a=>a.type!=="EmptyStatement");return e.each(({node:a})=>{a.type!=="EmptyStatement"&&(u.push(r()),a!==i&&(u.push(C),fe(a,t)&&u.push(C)))},n),u}function Tn(e,t,r){let{node:n}=e,s=[];n.type==="StaticBlock"&&s.push("static "),s.push("{");let u=bs(e,t,r);if(u)s.push(E([C,u]),C);else{let{parent:i}=e,a=e.grandparent;i.type==="ArrowFunctionExpression"||i.type==="FunctionExpression"||i.type==="FunctionDeclaration"||i.type==="ObjectMethod"||i.type==="ClassMethod"||i.type==="ClassPrivateMethod"||i.type==="ForStatement"||i.type==="WhileStatement"||i.type==="DoWhileStatement"||i.type==="DoExpression"||i.type==="CatchClause"&&!a.finalizer||i.type==="TSModuleDeclaration"||i.type==="TSDeclareFunction"||n.type==="StaticBlock"||s.push(C)}return s.push("}"),s}function bs(e,t,r){var o;let{node:n}=e,s=L(n.directives),u=n.body.some(p=>p.type!=="EmptyStatement"),i=A(n,x.Dangling);if(!s&&!u&&!i)return"";let a=[];return s&&(a.push(fr(e,t,r,"directives")),(u||i)&&(a.push(C),fe(v(!1,n.directives,-1),t)&&a.push(C))),u&&a.push(fr(e,t,r,"body")),i&&a.push(J(e,t)),n.type==="Program"&&((o=e.parent)==null?void 0:o.type)!=="ModuleExpression"&&a.push(C),a}function hl(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var xn=hl;function Sl(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function Zi(e,t,r){let{node:n}=e;return D([n.variance?r("variance"):"","[",E([r("keyTparam")," in ",r("sourceType")]),"]",Sl(n.optional),": ",r("propType")])}function Ps(e,t){return e==="+"||e==="-"?e+t:t}function ea(e,t,r){let{node:n}=e,s=Te(t.originalText,j(n),j(n.typeParameter));return D(["{",E([t.bracketSpacing?d:F,D([r("typeParameter"),n.optional?Ps(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?b(";"):""]),J(e,t),t.bracketSpacing?d:F,"}"],{shouldBreak:s})}var Er=xn("typeParameters");function Bl(e,t,r){let{node:n}=e;return $(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/.test(t.filepath))}function It(e,t,r,n){let{node:s}=e;if(!s[n])return"";if(!Array.isArray(s[n]))return r(n);let u=e.getNode(2),i=u&&St(u),a=e.match(m=>!(m[n].length===1&&Le(m[n][0])),void 0,(m,y)=>y==="typeAnnotation",m=>m.type==="Identifier",Ts);if(s[n].length===0||!a&&(i||s[n].length===1&&(s[n][0].type==="NullableTypeAnnotation"||gs(s[n][0]))))return["<",P(", ",e.map(r,n)),bl(e,t),">"];let p=s.type==="TSTypeParameterInstantiation"?"":Bl(e,t,n)?",":ye(t)?b(","):"";return D(["<",E([F,P([",",d],e.map(r,n))]),p,F,">"],{id:Er(s)})}function bl(e,t){let{node:r}=e;if(!A(r,x.Dangling))return"";let n=!A(r,x.Line),s=J(e,t,{indent:!n});return n?s:[s,C]}function gn(e,t,r){let{node:n,parent:s}=e,u=[n.type==="TSTypeParameter"&&n.const?"const ":""],i=n.type==="TSTypeParameter"?r("name"):n.name;if(s.type==="TSMappedType")return s.readonly&&u.push(Ps(s.readonly,"readonly")," "),u.push("[",i),n.constraint&&u.push(" in ",r("constraint")),s.nameType&&u.push(" as ",e.callParent(()=>r("nameType"))),u.push("]"),u;if(n.variance&&u.push(r("variance")),n.in&&u.push("in "),n.out&&u.push("out "),u.push(i),n.bound&&(n.usesExtendsBound&&u.push(" extends "),u.push(Y(e,r,"bound"))),n.constraint){let a=Symbol("constraint");u.push(" extends",D(E(d),{id:a}),ke,Ct(r("constraint"),{groupId:a}))}return n.default&&u.push(" = ",r("default")),D(u)}var ta=M(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function hn(e,t,r){let{node:n}=e,s=[ne(e),Yt(e),"class"],u=A(n.id,x.Trailing)||A(n.typeParameters,x.Trailing)||A(n.superClass)||L(n.extends)||L(n.mixins)||L(n.implements),i=[],a=[];if(n.id&&i.push(" ",r("id")),i.push(r("typeParameters")),n.superClass){let o=[kl(e,t,r),r("superTypeParameters")],p=e.call(m=>["extends ",le(m,o,t)],"superClass");u?a.push(d,D(p)):a.push(" ",p)}else a.push(ks(e,t,r,"extends"));if(a.push(ks(e,t,r,"mixins"),ks(e,t,r,"implements")),u){let o;na(n)?o=[...i,E(a)]:o=E([...i,a]),s.push(D(o,{id:ra(n)}))}else s.push(...i,...a);return s.push(" ",r("body")),s}var ra=xn("heritageGroup");function Is(e){return b(C,"",{groupId:ra(e)})}function Pl(e){return["extends","mixins","implements"].reduce((t,r)=>t+(Array.isArray(e[r])?e[r].length:0),e.superClass?1:0)>1}function na(e){return e.typeParameters&&!A(e.typeParameters,x.Trailing|x.Line)&&!Pl(e)}function ks(e,t,r,n){let{node:s}=e;if(!L(s[n]))return"";let u=J(e,t,{marker:n});return[na(s)?b(" ",d,{groupId:Er(s.typeParameters)}):d,u,u&&C,n,D(E([d,P([",",d],e.map(r,n))]))]}function kl(e,t,r){let n=r("superClass"),{parent:s}=e;return s.type==="AssignmentExpression"?D(b(["(",E([F,n]),F,")"],n)):n}function Sn(e,t,r){let{node:n}=e,s=[];return L(n.decorators)&&s.push(Cs(e,t,r)),s.push(Xt(n)),n.static&&s.push("static "),s.push(Yt(e)),n.override&&s.push("override "),s.push(yr(e,t,r)),s}function Bn(e,t,r){let{node:n}=e,s=[],u=t.semi?";":"";L(n.decorators)&&s.push(Cs(e,t,r)),s.push(Xt(n),ne(e)),n.static&&s.push("static "),s.push(Yt(e)),n.override&&s.push("override "),n.readonly&&s.push("readonly "),n.variance&&s.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&s.push("accessor "),s.push(ft(e,t,r),V(e),Dn(e),Y(e,r));let i=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[dt(e,t,r,s," =",i?void 0:"value"),u]}function sa(e,t,r){let{node:n}=e,s=[];return e.each(({node:u,next:i,isLast:a})=>{s.push(r()),!t.semi&&ta(u)&&Il(u,i)&&s.push(";"),a||(s.push(C),fe(u,t)&&s.push(C))},"body"),A(n,x.Dangling)&&s.push(J(e,t)),[L(n.body)?Is(e.parent):"","{",s.length>0?[E([C,s]),C]:"","}"]}function Il(e,t){var s;let{type:r,name:n}=e.key;if(!e.computed&&r==="Identifier"&&(n==="static"||n==="get"||n==="set")&&!e.value&&!e.typeAnnotation)return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let u=(s=t.key)==null?void 0:s.name;if(u==="in"||u==="instanceof")return!0}if(ta(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let i=t.value?t.value.generator:t.generator;return!!(t.computed||i)}case"TSIndexSignature":return!0}return!1}function ua(e,t){if(t.semi||Ls(e,t)||Os(e,t))return!1;let{node:r,key:n,parent:s}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(s.type==="Program"||s.type==="BlockStatement"||s.type==="StaticBlock"||s.type==="TSModuleBlock")||n==="consequent"&&s.type==="SwitchCase")&&e.call(()=>ia(e,t),"expression"))}function ia(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!An(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:s}=r;if(n&&(s==="+"||s==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(U(r))return!0}return Be(e,t)?!0:jt(r)?e.call(()=>ia(e,t),...Lr(r)):!1}function Ls({node:e,parent:t},r){return(r.parentParser==="markdown"||r.parentParser==="mdx")&&e.type==="ExpressionStatement"&&U(e.expression)&&t.type==="Program"&&t.body.length===1}function ws(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return ws(e.object)}return!1;case"Identifier":return!0;default:return!1}}function Os({node:e,parent:t},r){return(r.parser==="__vue_event_binding"||r.parser==="__vue_ts_event_binding")&&e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1}function aa(e,t,r){let n=[r("expression")];return Os(e,t)?ws(e.node.expression)&&n.push(";"):Ls(e,t)||t.semi&&n.push(";"),n}function oa(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let s=P([",",d],n);return t.__isVueForBindingLeft?["(",E([F,D(s)]),F,")"]:s}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return P([",",d],n)}}function la(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return pa(r);case"BigIntLiteral":return bn(r.extra.raw);case"NumericLiteral":return Qe(r.extra.raw);case"StringLiteral":return Ie(at(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Qe(r.value)+"m";case"DirectiveLiteral":return ca(r.extra.raw,t);case"Literal":{if(r.regex)return pa(r.regex);if(r.bigint)return bn(r.raw);if(r.decimal)return Qe(r.decimal)+"m";let{value:n}=r;return typeof n=="number"?Qe(r.raw):typeof n=="string"?Ll(e)?ca(r.raw,t):Ie(at(r.raw,t)):String(n)}}}function Ll(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&t.directive}function bn(e){return e.toLowerCase()}function pa({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}function ca(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}function wl(e,t,r){let n=e.originalText.slice(t,r);for(let s of e[Symbol.for("comments")]){let u=j(s);if(u>r)break;let i=I(s);if(ie.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function Pn(e,t,r){let{node:n}=e,s=[Pi(e,t,r),ne(e),"export",Da(n)?" default":""],{declaration:u,exported:i}=n;return A(n,x.Dangling)&&(s.push(" ",J(e,t)),vr(n)&&s.push(C)),u?s.push(" ",r("declaration")):(s.push(_l(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(s.push(" *"),i&&s.push(" as ",r("exported"))):s.push(fa(e,t,r)),s.push(ya(e,t,r),Fa(e,t,r))),s.push(vl(n,t)),s}var Ol=M(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function vl(e,t){return t.semi&&(!e.declaration||Da(e)&&!Ol(e.declaration))?";":""}function vs(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function _s(e,t){return vs(e.importKind,t)}function _l(e){return vs(e.exportKind)}function ya(e,t,r){let{node:n}=e;if(!n.source)return"";let s=[];return Ea(n,t)&&s.push(" from"),s.push(" ",r("source")),s}function fa(e,t,r){let{node:n}=e;if(!Ea(n,t))return"";let s=[" "];if(L(n.specifiers)){let u=[],i=[];e.each(()=>{let a=e.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")u.push(r());else if(a==="ExportSpecifier"||a==="ImportSpecifier")i.push(r());else throw new _e(n,"specifier")},"specifiers"),s.push(P(", ",u)),i.length>0&&(u.length>0&&s.push(", "),i.length>1||u.length>0||n.specifiers.some(o=>A(o))?s.push(D(["{",E([t.bracketSpacing?d:F,P([",",d],i)]),b(ye(t)?",":""),t.bracketSpacing?d:F,"}"])):s.push(["{",t.bracketSpacing?" ":"",...i,t.bracketSpacing?" ":"","}"]))}else s.push("{}");return s}function Ea(e,t){return e.type!=="ImportDeclaration"||L(e.specifiers)||e.importKind==="type"?!0:Fr(t,j(e),j(e.source)).trimEnd().endsWith("from")}function Ml(e,t){var n,s;if((n=e.extra)!=null&&n.deprecatedAssertSyntax)return"assert";let r=Fr(t,I(e.source),(s=e.attributes)!=null&&s[0]?j(e.attributes[0]):I(e)).trimStart();return r.startsWith("assert")?"assert":r.startsWith("with")||L(e.attributes)?"with":void 0}function Fa(e,t,r){let{node:n}=e;if(!n.source)return"";let s=Ml(n,t);if(!s)return"";let u=[` ${s} {`];return L(n.attributes)&&(t.bracketSpacing&&u.push(" "),u.push(P(", ",e.map(r,"attributes"))),t.bracketSpacing&&u.push(" ")),u.push("}"),u}function Ca(e,t,r){let{node:n}=e,{type:s}=n,u=s.startsWith("Import"),i=u?"imported":"local",a=u?"local":"exported",o=n[i],p=n[a],m="",y="";return s==="ExportNamespaceSpecifier"||s==="ImportNamespaceSpecifier"?m="*":o&&(m=r(i)),p&&!jl(n)&&(y=r(a)),[vs(s==="ImportSpecifier"?n.importKind:n.exportKind,!1),m,m&&y?" as ":"",y]}function jl(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;if(t.type!==r.type||!iu(t,r))return!1;if(te(t))return t.value===r.value&&De(t)===De(r);switch(t.type){case"Identifier":return t.name===r.name;default:return!1}}function Tt(e,t,r){var _;let n=t.semi?";":"",{node:s}=e,u=s.type==="ObjectTypeAnnotation",i=s.type==="TSEnumDeclaration"||s.type==="EnumBooleanBody"||s.type==="EnumNumberBody"||s.type==="EnumStringBody"||s.type==="EnumSymbolBody",a=[s.type==="TSTypeLiteral"||i?"members":s.type==="TSInterfaceBody"?"body":"properties"];u&&a.push("indexers","callProperties","internalSlots");let o=a.flatMap(T=>e.map(({node:W})=>({node:W,printed:r(),loc:j(W)}),T));a.length>1&&o.sort((T,W)=>T.loc-W.loc);let{parent:p,key:m}=e,y=u&&m==="body"&&(p.type==="InterfaceDeclaration"||p.type==="DeclareInterface"||p.type==="DeclareClass"),c=s.type==="TSInterfaceBody"||i||y||s.type==="ObjectPattern"&&p.type!=="FunctionDeclaration"&&p.type!=="FunctionExpression"&&p.type!=="ArrowFunctionExpression"&&p.type!=="ObjectMethod"&&p.type!=="ClassMethod"&&p.type!=="ClassPrivateMethod"&&p.type!=="AssignmentPattern"&&p.type!=="CatchClause"&&s.properties.some(T=>T.value&&(T.value.type==="ObjectPattern"||T.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&o.length>0&&Te(t.originalText,j(s),o[0].loc),f=y?";":s.type==="TSInterfaceBody"||s.type==="TSTypeLiteral"?b(n,";"):",",l=s.type==="RecordExpression"?"#{":s.exact?"{|":"{",h=s.exact?"|}":"}",g=[],S=o.map(T=>{let W=[...g,D(T.printed)];return g=[f,d],(T.node.type==="TSPropertySignature"||T.node.type==="TSMethodSignature"||T.node.type==="TSConstructSignatureDeclaration"||T.node.type==="TSCallSignatureDeclaration")&&A(T.node,x.PrettierIgnore)&&g.shift(),fe(T.node,t)&&g.push(C),W});if(s.inexact||s.hasUnknownMembers){let T;if(A(s,x.Dangling)){let W=A(s,x.Line);T=[J(e,t),W||Z(t.originalText,I(v(!1,ot(s),-1)))?C:d,"..."]}else T=["..."];S.push([...g,...T])}let B=(_=v(!1,o,-1))==null?void 0:_.node,O=!(s.inexact||s.hasUnknownMembers||B&&(B.type==="RestElement"||(B.type==="TSPropertySignature"||B.type==="TSCallSignatureDeclaration"||B.type==="TSMethodSignature"||B.type==="TSConstructSignatureDeclaration")&&A(B,x.PrettierIgnore))),R;if(S.length===0){if(!A(s,x.Dangling))return[l,h,Y(e,r)];R=D([l,J(e,t,{indent:!0}),F,h,V(e),Y(e,r)])}else R=[y&&L(s.properties)?Is(p):"",l,E([t.bracketSpacing?d:F,...S]),b(O&&(f!==","||ye(t))?f:""),t.bracketSpacing?d:F,h,V(e),Y(e,r)];return e.match(T=>T.type==="ObjectPattern"&&!L(T.decorators),Ms)||Le(s)&&(e.match(void 0,(T,W)=>W==="typeAnnotation",(T,W)=>W==="typeAnnotation",Ms)||e.match(void 0,(T,W)=>T.type==="FunctionTypeParam"&&W==="typeAnnotation",Ms))||!c&&e.match(T=>T.type==="ObjectPattern",T=>T.type==="AssignmentExpression"||T.type==="VariableDeclarator")?R:D(R,{shouldBreak:c})}function Ms(e,t){return(t==="params"||t==="parameters"||t==="this"||t==="rest")&&xs(e)}function Rl(e){let t=[e];for(let r=0;rc[X]===n),l=c.type===n.type&&!f,h,g,S=0;do g=h||n,h=e.getParentNode(S),S++;while(h&&h.type===n.type&&a.every(X=>h[X]!==g));let B=h||c,O=g;if(s&&(U(n[a[0]])||U(o)||U(p)||Rl(O))){y=!0,l=!0;let X=z=>[b("("),E([F,z]),F,b(")")],ue=z=>z.type==="NullLiteral"||z.type==="Literal"&&z.value===null||z.type==="Identifier"&&z.name==="undefined";m.push(" ? ",ue(o)?r(u):X(r(u))," : ",p.type===n.type||ue(p)?r(i):X(r(i)))}else{let X=z=>t.useTabs?E(r(z)):ge(2,r(z)),ue=[d,"? ",o.type===n.type?b("","("):"",X(u),o.type===n.type?b("",")"):"",d,": ",X(i)];m.push(c.type!==n.type||c[i]===n||f?ue:t.useTabs?Jr(E(ue)):ge(Math.max(0,t.tabWidth-2),ue))}let R=[u,i,...a].some(X=>A(n[X],ue=>ee(ue)&&Te(t.originalText,j(ue),I(ue)))),_=X=>c===B?D(X,{shouldBreak:R}):R?[X,Ee]:X,T=!y&&(q(c)||c.type==="NGPipeExpression"&&c.left===n)&&!c.computed,W=Wl(e),Fe=_([Jl(e,t,r),l?m:E(m),s&&T&&!W?F:""]);return f||W?D([E([F,Fe]),F]):Fe}function Nl(e,t){return(q(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function Gl(e,t,r,n){return[...e.map(u=>ot(u)),ot(t),ot(r)].flat().some(u=>ee(u)&&Te(n.originalText,j(u),I(u)))}var Ul=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function Yl(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let s=0;!r;s++){let u=e.getParentNode(s);if(u.type==="ChainExpression"&&u.expression===n||w(u)&&u.callee===n||q(u)&&u.object===n||u.type==="TSNonNullExpression"&&u.expression===n){n=u;continue}u.type==="NewExpression"&&u.callee===n||Ae(u)&&u.expression===n?(r=e.getParentNode(s+1),n=u):r=u}return n===t?!1:r[Ul.get(r.type)]===n}var js=e=>[b("("),E([F,e]),F,b(")")];function $t(e,t,r,n){if(!t.experimentalTernaries)return Aa(e,t,r);let{node:s}=e,u=s.type==="ConditionalExpression",i=s.type==="TSConditionalType"||s.type==="ConditionalTypeAnnotation",a=u?"consequent":"trueType",o=u?"alternate":"falseType",p=u?["test"]:["checkType","extendsType"],m=s[a],y=s[o],c=p.map(Re=>s[Re]),{parent:f}=e,l=f.type===s.type,h=l&&p.some(Re=>f[Re]===s),g=l&&f[o]===s,S=m.type===s.type,B=y.type===s.type,O=B||g,R=t.tabWidth>2||t.useTabs,_,T,W=0;do T=_||s,_=e.getParentNode(W),W++;while(_&&_.type===s.type&&p.every(Re=>_[Re]!==T));let Fe=_||f,X=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),ue=(f.type==="ReturnStatement"||f.type==="ThrowStatement")&&!(S||B),z=u&&Fe.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",wt=Yl(e),Ht=Nl(s,f),k=i&&Be(e,t),N=R?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",Q=Gl(c,m,y,t)||S||B,je=!O&&!l&&!i&&(z?m.type==="NullLiteral"||m.type==="Literal"&&m.value===null:nr(m,t)&&Nn(s.test,3)),xt=O||g||i&&!l||l&&u&&Nn(s.test,1)||je,qs=[];!S&&A(m,x.Dangling)&&e.call(Re=>{qs.push(J(Re,t),C)},"consequent");let Kt=[];A(s.test,x.Dangling)&&e.call(Re=>{Kt.push(J(Re,t))},"test"),!B&&A(y,x.Dangling)&&e.call(Re=>{Kt.push(J(Re,t))},"alternate"),A(s,x.Dangling)&&Kt.push(J(e,t));let Ws=Symbol("test"),wa=Symbol("consequent"),Ar=Symbol("test-and-consequent"),Oa=u?[js(r("test")),s.test.type==="ConditionalExpression"?Ee:""]:[r("checkType")," ","extends"," ",s.extendsType.type==="TSConditionalType"||s.extendsType.type==="ConditionalTypeAnnotation"||s.extendsType.type==="TSMappedType"?r("extendsType"):D(js(r("extendsType")))],Ns=D([Oa," ?"],{id:Ws}),va=r(a),dr=E([S||z&&(U(m)||l||O)?C:d,qs,va]),_a=xt?D([Ns,O?dr:b(dr,D(dr,{id:wa}),{groupId:Ws})],{id:Ar}):[Ns,dr],On=r(o),Gs=je?b(On,Jr(js(On)),{groupId:Ar}):On,zt=[_a,Kt.length>0?[E([C,Kt]),C]:B?C:je?b(d," ",{groupId:Ar}):d,":",B?" ":R?xt?b(N,b(O||je?" ":N," "),{groupId:Ar}):b(N," "):" ",B?Gs:D([E(Gs),z&&!je?F:""]),Ht&&!wt?F:"",Q?Ee:""];return X&&!Q?D(E([F,D(zt)])):X||ue?D(E(zt)):wt||i&&h?D([E([F,zt]),k?F:""]):f===Fe?D(zt):zt}function da(e,t,r,n){let{node:s}=e;if(rr(s))return la(e,t);let u=t.semi?";":"",i=[];switch(s.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),C];case"File":return oa(e,t,r)??r("program");case"Program":return bs(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return aa(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!A(s.expression)&&(se(s.expression)||G(s.expression))?["(",r("expression"),")"]:D(["(",E([F,r("expression")]),F,")"]);case"AssignmentExpression":return ji(e,t,r);case"VariableDeclarator":return Ri(e,t,r);case"BinaryExpression":case"LogicalExpression":return Kr(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return Oi(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return s.object&&i.push(r("object")),i.push(D(E([F,zr(e,t,r)]))),i;case"Identifier":return[s.name,V(e),Dn(e),Y(e,r)];case"V8IntrinsicIdentifier":return["%",s.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return yn(e,r);case"FunctionDeclaration":case"FunctionExpression":return Fn(e,r,t,n);case"ArrowFunctionExpression":return zi(e,t,r,n);case"YieldExpression":return i.push("yield"),s.delegate&&i.push("*"),s.argument&&i.push(" ",r("argument")),i;case"AwaitExpression":if(i.push("await"),s.argument){i.push(" ",r("argument"));let{parent:a}=e;if(w(a)&&a.callee===s||q(a)&&a.object===s){i=[E([F,...i]),F];let o=e.findAncestor(p=>p.type==="AwaitExpression"||p.type==="BlockStatement");if((o==null?void 0:o.type)!=="AwaitExpression"||!ie(o.argument,p=>p===s))return D(i)}}return i;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return Pn(e,t,r);case"ImportDeclaration":return ma(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Ca(e,t,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return Tn(e,t,r);case"ClassBody":return sa(e,t,r);case"ThrowStatement":return $i(e,t,r);case"ReturnStatement":return Vi(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return Qr(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return Tt(e,t,r);case"Property":return ht(s)?yr(e,t,r):Ss(e,t,r);case"ObjectProperty":return Ss(e,t,r);case"ObjectMethod":return yr(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return Vt(e,t,r);case"SequenceExpression":{let{parent:a}=e;if(a.type==="ExpressionStatement"||a.type==="ForStatement"){let o=[];return e.each(({isFirst:p})=>{p?o.push(r()):o.push(",",E([d,r()]))},"expressions"),D(o)}return D(P([",",d],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),u];case"UnaryExpression":return i.push(s.operator),/[a-z]$/.test(s.operator)&&i.push(" "),A(s.argument)?i.push(D(["(",E([F,r("argument")]),F,")"])):i.push(r("argument")),i;case"UpdateExpression":return i.push(r("argument"),s.operator),s.prefix&&i.reverse(),i;case"ConditionalExpression":return $t(e,t,r,n);case"VariableDeclaration":{let a=e.map(r,"declarations"),o=e.parent,p=o.type==="ForStatement"||o.type==="ForInStatement"||o.type==="ForOfStatement",m=s.declarations.some(c=>c.init),y;return a.length===1&&!A(s.declarations[0])?y=a[0]:a.length>0&&(y=E(a[0])),i=[ne(e),s.kind,y?[" ",y]:"",E(a.slice(1).map(c=>[",",m&&!p?C:d,c]))],p&&o.body!==s||i.push(u),D(i)}case"WithStatement":return D(["with (",r("object"),")",yt(s.body,r("body"))]);case"IfStatement":{let a=yt(s.consequent,r("consequent")),o=D(["if (",D([E([F,r("test")]),F]),")",a]);if(i.push(o),s.alternate){let p=A(s.consequent,x.Trailing|x.Line)||vr(s),m=s.consequent.type==="BlockStatement"&&!p;i.push(m?" ":C),A(s,x.Dangling)&&i.push(J(e,t),p?C:" "),i.push("else",D(yt(s.alternate,r("alternate"),s.alternate.type==="IfStatement")))}return i}case"ForStatement":{let a=yt(s.body,r("body")),o=J(e,t),p=o?[o,F]:"";return!s.init&&!s.test&&!s.update?[p,D(["for (;;)",a])]:[p,D(["for (",D([E([F,r("init"),";",d,r("test"),";",d,r("update")]),F]),")",a])]}case"WhileStatement":return D(["while (",D([E([F,r("test")]),F]),")",yt(s.body,r("body"))]);case"ForInStatement":return D(["for (",r("left")," in ",r("right"),")",yt(s.body,r("body"))]);case"ForOfStatement":return D(["for",s.await?" await":""," (",r("left")," of ",r("right"),")",yt(s.body,r("body"))]);case"DoWhileStatement":{let a=yt(s.body,r("body"));return i=[D(["do",a])],s.body.type==="BlockStatement"?i.push(" "):i.push(C),i.push("while (",D([E([F,r("test")]),F]),")",u),i}case"DoExpression":return[s.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return i.push(s.type==="BreakStatement"?"break":"continue"),s.label&&i.push(" ",r("label")),i.push(u),i;case"LabeledStatement":return s.body.type==="EmptyStatement"?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),s.handler?[" ",r("handler")]:"",s.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(s.param){let a=A(s.param,p=>!ee(p)||p.leading&&Z(t.originalText,I(p))||p.trailing&&Z(t.originalText,j(p),{backwards:!0})),o=r("param");return["catch ",a?["(",E([F,o]),F,") "]:["(",o,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[D(["switch (",E([F,r("discriminant")]),F,")"])," {",s.cases.length>0?E([C,P(C,e.map(({node:a,isLast:o})=>[r(),!o&&fe(a,t)?C:""],"cases"))]):"",C,"}"];case"SwitchCase":{s.test?i.push("case ",r("test"),":"):i.push("default:"),A(s,x.Dangling)&&i.push(" ",J(e,t));let a=s.consequent.filter(o=>o.type!=="EmptyStatement");if(a.length>0){let o=fr(e,t,r,"consequent");i.push(a.length===1&&a[0].type==="BlockStatement"?[" ",o]:E([C,o]))}return i}case"DebuggerStatement":return["debugger",u];case"ClassDeclaration":case"ClassExpression":return hn(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return Sn(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return Bn(e,t,r);case"TemplateElement":return Ie(s.value.raw);case"TemplateLiteral":return Ur(e,r,t);case"TaggedTemplateExpression":return zu(r);case"PrivateIdentifier":return["#",s.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{i.push("module {");let a=r("body");return a&&i.push(E([C,a]),C),i.push("}"),i}case"InterpreterDirective":default:throw new _e(s,"ESTree")}}function kn(e,t,r){let{parent:n,node:s,key:u}=e,i=[r("expression")];switch(s.type){case"AsConstExpression":i.push(" as const");break;case"AsExpression":case"TSAsExpression":i.push(" as ",r("typeAnnotation"));break;case"SatisfiesExpression":case"TSSatisfiesExpression":i.push(" satisfies ",r("typeAnnotation"));break}return u==="callee"&&w(n)||u==="object"&&q(n)?D([E([F,...i]),F]):i}function Ta(e,t,r){return Tt(e,r,t)}function In(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let s="";return r.initializer&&(s=t("initializer")),r.init&&(s=t("init")),s?[n," = ",s]:n}function xa(e,t,r){let{node:n}=e,s;if(n.type==="EnumSymbolBody"||n.explicitType)switch(n.type){case"EnumBooleanBody":s="boolean";break;case"EnumNumberBody":s="number";break;case"EnumStringBody":s="string";break;case"EnumSymbolBody":s="symbol";break}return[s?`of ${s} `:"",Ta(e,t,r)]}function Ln(e,t,r){let{node:n}=e;return[ne(e),n.const?"const ":"","enum ",t("id")," ",n.type==="TSEnumDeclaration"?Ta(e,t,r):t("body")]}function wn(e,t,r){let{node:n}=e,s=[ne(e),"interface"],u=[],i=[];n.type!=="InterfaceTypeAnnotation"&&u.push(" ",r("id"),r("typeParameters"));let a=n.typeParameters&&!A(n.typeParameters,x.Trailing|x.Line);return L(n.extends)&&i.push(a?b(" ",d,{groupId:Er(n.typeParameters)}):d,"extends ",(n.extends.length===1?du:E)(P([",",d],e.map(r,"extends")))),A(n.id,x.Trailing)||L(n.extends)?a?s.push(D([...u,E(i)])):s.push(D(E([...u,...i]))):s.push(...u,...i),s.push(" ",r("body")),D(s)}function ga(e,t,r){let{node:n}=e;if(Pr(n))return n.type.slice(0,-14).toLowerCase();let s=t.semi?";":"";switch(n.type){case"DeclareClass":return hn(e,t,r);case"DeclareFunction":return[ne(e),"function ",r("id"),r("predicate"),s];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",Y(e,r),s];case"DeclareVariable":return[ne(e),n.kind??"var"," ",r("id"),s];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return Pn(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return Ni(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return en(e,t,r);case"IntersectionTypeAnnotation":return tn(e,t,r);case"UnionTypeAnnotation":return rn(e,t,r);case"ConditionalTypeAnnotation":return $t(e,t,r);case"InferTypeAnnotation":return un(e,t,r);case"FunctionTypeAnnotation":return nn(e,t,r);case"TupleTypeAnnotation":return Vt(e,t,r);case"TupleTypeLabeledElement":return on(e,t,r);case"TupleTypeSpreadElement":return an(e,t,r);case"GenericTypeAnnotation":return[r("id"),It(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return sn(e,t,r);case"TypeAnnotation":return pn(e,t,r);case"TypeParameter":return gn(e,t,r);case"TypeofTypeAnnotation":return ln(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return cn(r);case"DeclareEnum":case"EnumDeclaration":return Ln(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return xa(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return In(e,r);case"FunctionTypeParam":{let u=n.name?r("name"):e.parent.this===n?"this":"";return[u,V(e),u?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return wn(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:u}=n;return fn.ok(u==="plus"||u==="minus"),u==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return Zi(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let u="";return n.proto?u="proto ":n.static&&(u="static "),[u,n.kind!=="init"?n.kind+" ":"",n.variance?r("variance"):"",ft(e,t,r),V(e),ht(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return Tt(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",V(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return yn(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return Ie(at(De(n),t));case"NumberLiteralTypeAnnotation":return Qe(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return bn(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),Y(e,r),")"];case"TypePredicate":return mn(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return It(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return kn(e,t,r)}}function ha(e,t,r){var i;let{node:n}=e;if(!n.type.startsWith("TS"))return;if(kr(n))return n.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",u=[];switch(n.type){case"TSThisType":return"this";case"TSTypeAssertion":{let a=!(G(n.expression)||se(n.expression)),o=D(["<",E([F,r("typeAnnotation")]),F,">"]),p=[b("("),E([F,r("expression")]),F,b(")")];return a?He([[o,r("expression")],[o,D(p,{shouldBreak:!0})],[o,r("expression")]]):D([o,r("expression")])}case"TSDeclareFunction":return Fn(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Tn(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return Tt(e,t,r);case"TSTypeAliasDeclaration":return en(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Sn(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Bn(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return Ur(e,r,t);case"TSNamedTupleMember":return on(e,t,r);case"TSRestType":return an(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return wn(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return It(e,t,r,"params");case"TSTypeParameter":return gn(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return kn(e,t,r);case"TSArrayType":return cn(r);case"TSPropertySignature":return[n.readonly?"readonly ":"",ft(e,t,r),V(e),Y(e,r)];case"TSParameterProperty":return[Xt(n),n.static?"static ":"",n.override?"override ":"",n.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return ln(e,r);case"TSIndexSignature":{let a=n.parameters.length>1?b(ye(t)?",":""):"",o=D([E([F,P([", ",F],e.map(r,"parameters"))]),a,F]),p=e.parent.type==="ClassBody"&&e.key==="body";return[p&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?o:"","]",Y(e,r),p?s:""]}case"TSTypePredicate":return mn(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[n.isTypeOf?"typeof ":"","import(",r("argument"),")",n.qualifier?[".",r("qualifier")]:"",It(e,t,r,n.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return sn(e,t,r);case"TSTypeOperator":return[n.operator," ",r("typeAnnotation")];case"TSMappedType":return ea(e,t,r);case"TSMethodSignature":{let a=n.kind&&n.kind!=="method"?`${n.kind} `:"";u.push(Xt(n),a,n.computed?"[":"",r("key"),n.computed?"]":"",V(e));let o=Dt(e,r,t,!1,!0),p=n.returnType?"returnType":"typeAnnotation",m=n[p],y=m?Y(e,r,p):"",c=kt(n,y);return u.push(c?D(o):o),m&&u.push(D(y)),D(u)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return Ln(e,r,t);case"TSEnumMember":return In(e,r);case"TSImportEqualsDeclaration":return[n.isExport?"export ":"","import ",_s(n,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:a}=e,o=a.type==="TSModuleDeclaration",p=((i=n.body)==null?void 0:i.type)==="TSModuleDeclaration";if(o)u.push(".");else if(u.push(ne(e)),!(n.kind==="global"||n.global)){let y=n.kind??(te(n.id)||Fr(t,j(n),j(n.id)).trim().endsWith("module")?"module":"namespace");u.push(y," ")}return u.push(r("id")),p?u.push(r("body")):n.body?u.push(" ",D(r("body"))):u.push(s),u}case"TSConditionalType":return $t(e,t,r);case"TSInferType":return un(e,t,r);case"TSIntersectionType":return tn(e,t,r);case"TSUnionType":return rn(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return nn(e,t,r);case"TSTupleType":return Vt(e,t,r);case"TSTypeReference":return[r("typeName"),It(e,t,r,"typeParameters")];case"TSTypeAnnotation":return pn(e,t,r);case"TSEmptyBodyFunctionExpression":return Cn(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return hs(e,r,"?");case"TSJSDocNonNullableType":return hs(e,r,"!");case"TSParenthesizedType":default:throw new _e(n,"TypeScript")}}function Xl(e,t,r,n){if(Hr(e))return Fi(e,t);for(let s of[bi,gi,ga,ha,da]){let u=s(e,t,r,n);if(u!==void 0)return u}}var Vl=M(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function $l(e,t,r,n){var y;e.isRoot&&((y=t.__onHtmlBindingRoot)==null||y.call(t,e.node,t));let s=Xl(e,t,r,n);if(!s)return"";let{node:u}=e;if(Vl(u))return s;let i=L(u.decorators),a=ki(e,t,r),o=u.type==="ClassExpression";if(i&&!o)return or(s,c=>D([a,c]));let p=Be(e,t),m=ua(e,t);return!a&&!p&&!m?s:or(s,c=>[m?";":"",p?"(":"",p&&o&&i?[E([d,a,c]),d]:[a,c],p?")":""])}var Sa=$l;var Hl={avoidAstMutation:!0};var Ba=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}];var Js={};xr(Js,{getVisitorKeys:()=>Pa,massageAstNode:()=>Ia,print:()=>Ql});var Kl={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},ba=Kl;var zl=Br(ba),Pa=zl;function Ql(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),C];case"ArrayExpression":{if(n.elements.length===0)return"[]";let s=e.map(()=>e.node===null?"null":r(),"elements");return["[",E([C,P([",",C],s)]),C,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",E([C,P([",",C],e.map(r,"properties"))]),C,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return ka(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return ka(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new _e(n,"JSON")}}function ka(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var Zl=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function Ia(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,s]of e.elements.entries())s===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}Ia.ignoredProperties=Zl;var Cr={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Lt="JavaScript",em={arrowParens:{category:Lt,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Cr.bracketSameLine,bracketSpacing:Cr.bracketSpacing,jsxBracketSameLine:{category:Lt,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Lt,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:Lt,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Cr.singleQuote,jsxSingleQuote:{category:Lt,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Lt,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Lt,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Cr.singleAttributePerLine},La=em;var tm={estree:Rs,"estree-json":Js},rm=[...$s,...Ba];return Ga(nm);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/estree.mjs b/node_modules/prettier/plugins/estree.mjs index c77ec79..2a9ab59 100644 --- a/node_modules/prettier/plugins/estree.mjs +++ b/node_modules/prettier/plugins/estree.mjs @@ -1,35 +1,36 @@ -var wa=Object.create;var kn=Object.defineProperty;var Oa=Object.getOwnPropertyDescriptor;var va=Object.getOwnPropertyNames;var _a=Object.getPrototypeOf,ja=Object.prototype.hasOwnProperty;var Ma=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cr=(e,t)=>{for(var r in t)kn(e,r,{get:t[r],enumerable:!0})},Ra=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of va(t))!ja.call(e,s)&&s!==r&&kn(e,s,{get:()=>t[s],enumerable:!(n=Oa(t,s))||n.enumerable});return e};var Ja=(e,t,r)=>(r=e!=null?wa(_a(e)):{},Ra(t||!e||!e.__esModule?kn(r,"default",{value:e,enumerable:!0}):r,e));var Ws=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var ut=(e,t,r)=>(Ws(e,t,"read from private field"),r?r.call(e):t.get(e)),Gs=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ns=(e,t,r,n)=>(Ws(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var Ca=Ma(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.extract=Ol;Pt.parse=_l;Pt.parseWithComments=Fa;Pt.print=jl;Pt.strip=vl;var Pl=/\*\/$/,kl=/^\/\*\*?/,fa=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Il=/(^|\s+)\/\/([^\r\n]*)/g,ma=/^(\r?\n)+/,Ll=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Da=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,wl=/(\r?\n|^) *\* ?/g,Ea=[];function Ol(e){let t=e.match(fa);return t?t[0].trimLeft():""}function vl(e){let t=e.match(fa);return t&&t[0]?e.substring(t[0].length):e}function _l(e){return Fa(e).pragmas}function Fa(e){let t=` -`;e=e.replace(kl,"").replace(Pl,"").replace(wl,"$1");let r="";for(;r!==e;)r=e,e=e.replace(Ll,`${t}$1 $2${t}`);e=e.replace(ma,"").trimRight();let n=Object.create(null),s=e.replace(Da,"").replace(ma,"").trimRight(),u;for(;u=Da.exec(e);){let i=u[2].replace(Il,"");typeof n[u[1]]=="string"||Array.isArray(n[u[1]])?n[u[1]]=Ea.concat(n[u[1]],i):n[u[1]]=i}return{comments:s,pragmas:n}}function jl({comments:e="",pragmas:t={}}){let r=` -`,n="/**",s=" *",u=" */",i=Object.keys(t),a=i.flatMap(p=>ya(p,t[p])).map(p=>`${s} ${p}${r}`).join("");if(!e){if(i.length===0)return"";if(i.length===1&&!Array.isArray(t[i[0]])){let p=t[i[0]];return`${n} ${ya(i[0],p)[0]}${u}`}}let o=e.split(r).map(p=>`${s} ${p}`).join(r)+r;return n+r+(e?o:"")+(e&&i.length?s+r:"")+a+u}function ya(e,t){return Ea.concat(t).map(r=>`@${e} ${r}`.trim())}});var Ms={};Cr(Ms,{languages:()=>Xl,options:()=>ba,printers:()=>Yl});var _s={};Cr(_s,{canAttachComment:()=>Tp,embed:()=>pa,experimentalFeatures:()=>Jl,getCommentChildNodes:()=>xp,getVisitorKeys:()=>Br,handleComments:()=>as,insertPragma:()=>da,isBlockComment:()=>Q,isGap:()=>gp,massageAstNode:()=>la,print:()=>Qi,printComment:()=>Gu,willPrintOwnComments:()=>os});function qa(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:s,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:a}=e,o=s(a),p=u(a);for(let D of n)s(D)>=o&&u(D)<=p&&i.add(D);return r.slice(o,p)}var Ys=qa;var ze="string",Re="array",Qe="cursor",Je="indent",qe="align",Ze="trim",ae="group",Ee="fill",Te="if-break",Ue="indent-if-break",We="line-suffix",Ge="line-suffix-boundary",oe="line",Le="label",we="break-parent",Ar=new Set([Qe,Je,qe,Ze,ae,Ee,Te,Ue,We,Ge,oe,Le,we]);function Ua(e){if(typeof e=="string")return ze;if(Array.isArray(e))return Re;if(!e)return;let{type:t}=e;if(Ar.has(t))return t}var et=Ua;var Wa=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Ga(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', -Expected it to be 'string' or 'object'.`;if(et(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Wa([...Ar].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var In=class extends Error{name="InvalidDocError";constructor(t){super(Ga(t)),this.doc=t}},ft=In;var Xs={};function Na(e,t,r,n){let s=[e];for(;s.length>0;){let u=s.pop();if(u===Xs){r(s.pop());continue}r&&s.push(u,Xs);let i=et(u);if(!i)throw new ft(u);if((t==null?void 0:t(u))!==!1)switch(i){case Re:case Ee:{let a=i===Re?u:u.parts;for(let o=a.length,p=o-1;p>=0;--p)s.push(a[p]);break}case Te:s.push(u.flatContents,u.breakContents);break;case ae:if(n&&u.expandedStates)for(let a=u.expandedStates.length,o=a-1;o>=0;--o)s.push(u.expandedStates[o]);else s.push(u.contents);break;case qe:case Je:case Ue:case Le:case We:s.push(u.contents);break;case ze:case Qe:case Ze:case Ge:case oe:case we:break;default:throw new ft(u)}}}var Ln=Na;var $s=()=>{},Ne=$s,dr=$s;function E(e){return Ne(e),{type:Je,contents:e}}function Fe(e,t){return Ne(t),{type:qe,contents:t,n:e}}function m(e,t={}){return Ne(e),dr(t.expandedStates,!0),{type:ae,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Vs(e){return Fe(Number.NEGATIVE_INFINITY,e)}function Tr(e){return Fe(-1,e)}function Ye(e,t){return m(e[0],{...t,expandedStates:e})}function Lt(e){return dr(e),{type:Ee,parts:e}}function B(e,t="",r={}){return Ne(e),t!==""&&Ne(t),{type:Te,breakContents:e,flatContents:t,groupId:r.groupId}}function Et(e,t){return Ne(e),{type:Ue,contents:e,groupId:t.groupId,negate:t.negate}}function wn(e){return Ne(e),{type:We,contents:e}}var Be={type:Ge},ce={type:we};var On={type:oe,hard:!0},Ya={type:oe,hard:!0,literal:!0},d={type:oe},F={type:oe,soft:!0},C=[On,ce],xr=[Ya,ce],vn={type:Qe};function b(e,t){Ne(e),dr(t);let r=[];for(let n=0;n0){for(let s=0;s{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},w=Xa;var gr=e=>{if(Array.isArray(e))return e;if(e.type!==Ee)throw new Error(`Expect doc to be 'array' or '${Ee}'.`);return e.parts};function it(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=s(u);return r.set(u,i),i}function s(u){switch(et(u)){case Re:return t(u.map(n));case Ee:return t({...u,parts:u.parts.map(n)});case Te:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case ae:{let{expandedStates:i,contents:a}=u;return i?(i=i.map(n),a=i[0]):a=n(a),t({...u,contents:a,expandedStates:i})}case qe:case Je:case Ue:case Le:case We:return t({...u,contents:n(u.contents)});case ze:case Qe:case Ze:case Ge:case oe:case we:return t(u);default:throw new ft(u)}}}function zs(e,t,r){let n=r,s=!1;function u(i){if(s)return!1;let a=t(i);a!==void 0&&(s=!0,n=a)}return Ln(e,u),n}function $a(e){if(e.type===ae&&e.break||e.type===oe&&e.hard||e.type===we)return!0}function K(e){return zs(e,$a,!1)}function Ks(e){if(e.length>0){let t=w(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Qs(e){let t=new Set,r=[];function n(u){if(u.type===we&&Ks(r),u.type===ae){if(r.push(u),t.has(u))return!1;t.add(u)}}function s(u){u.type===ae&&r.pop().break&&Ks(r)}Ln(e,n,s,!0)}function Va(e){return e.type===oe&&!e.hard?e.soft?"":" ":e.type===Te?e.flatContents:e}function Ht(e){return it(e,Va)}function Ha(e){switch(et(e)){case Ee:if(e.parts.every(t=>t===""))return"";break;case ae:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===ae&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case qe:case Je:case Ue:case We:if(!e.contents)return"";break;case Te:if(!e.flatContents&&!e.breakContents)return"";break;case Re:{let t=[];for(let r of e){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof w(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case ze:case Qe:case Ze:case Ge:case oe:case Le:case we:break;default:throw new ft(e)}return e}function wt(e){return it(e,t=>Ha(t))}function be(e,t=xr){return it(e,r=>typeof r=="string"?b(t,r.split(` -`)):r)}function Ka(e){if(e.type===oe)return!0}function Zs(e){return zs(e,Ka,!1)}function Kt(e,t){return e.type===Le?{...e,contents:t(e.contents)}:t(e)}function za(e){return Array.isArray(e)&&e.length>0}var k=za;var Qa=/^[\$A-Z_a-z\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][\$0-9A-Z_a-z\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]*$/,Za=e=>Qa.test(e),eu=Za;function eo(e){return e!==null&&typeof e=="object"}var tu=eo;function*to(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,s=u=>tu(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let a of i)s(a)&&(yield a);else s(i)&&(yield i)}}function*ro(e,t){let r=[e];for(let n=0;n{let s=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:u}=t,i=r;for(;i>=0&&i()=>(t||e((t={exports:{}}).exports,t),t.exports),Tr=(e,t)=>{for(var r in t)On(e,r,{get:t[r],enumerable:!0})},Na=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ra(t))!qa.call(e,s)&&s!==r&&On(e,s,{get:()=>t[s],enumerable:!(n=ja(t,s))||n.enumerable});return e};var Ga=(e,t,r)=>(r=e!=null?Ma(Ja(e)):{},Na(t||!e||!e.__esModule?On(r,"default",{value:e,enumerable:!0}):r,e));var Ys=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var it=(e,t,r)=>(Ys(e,t,"read from private field"),r?r.call(e):t.get(e)),Xs=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Vs=(e,t,r,n)=>(Ys(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var yi=Wa(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.extract=Zp;Pt.parse=tc;Pt.parseWithComments=Di;Pt.print=rc;Pt.strip=ec;var $p=/\*\/$/,Hp=/^\/\*\*?/,li=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Kp=/(^|\s+)\/\/([^\r\n]*)/g,oi=/^(\r?\n)+/,zp=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,pi=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,Qp=/(\r?\n|^) *\* ?/g,mi=[];function Zp(e){let t=e.match(li);return t?t[0].trimLeft():""}function ec(e){let t=e.match(li);return t&&t[0]?e.substring(t[0].length):e}function tc(e){return Di(e).pragmas}function Di(e){let t=` +`;e=e.replace(Hp,"").replace($p,"").replace(Qp,"$1");let r="";for(;r!==e;)r=e,e=e.replace(zp,`${t}$1 $2${t}`);e=e.replace(oi,"").trimRight();let n=Object.create(null),s=e.replace(pi,"").replace(oi,"").trimRight(),u;for(;u=pi.exec(e);){let i=u[2].replace(Kp,"");typeof n[u[1]]=="string"||Array.isArray(n[u[1]])?n[u[1]]=mi.concat(n[u[1]],i):n[u[1]]=i}return{comments:s,pragmas:n}}function rc({comments:e="",pragmas:t={}}){let r=` +`,n="/**",s=" *",u=" */",i=Object.keys(t),a=i.flatMap(p=>ci(p,t[p])).map(p=>`${s} ${p}${r}`).join("");if(!e){if(i.length===0)return"";if(i.length===1&&!Array.isArray(t[i[0]])){let p=t[i[0]];return`${n} ${ci(i[0],p)[0]}${u}`}}let o=e.split(r).map(p=>`${s} ${p}`).join(r)+r;return n+r+(e?o:"")+(e&&i.length?s+r:"")+a+u}function ci(e,t){return mi.concat(t).map(r=>`@${e} ${r}`.trim())}});var qs={};Tr(qs,{languages:()=>rm,options:()=>La,printers:()=>tm});var $s=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}];var Rs={};Tr(Rs,{canAttachComment:()=>Fp,embed:()=>ai,experimentalFeatures:()=>Hl,getCommentChildNodes:()=>Cp,getVisitorKeys:()=>Br,handleComments:()=>ns,insertPragma:()=>Ei,isBlockComment:()=>ee,isGap:()=>Ap,massageAstNode:()=>Bu,print:()=>Sa,printComment:()=>Mu,willPrintOwnComments:()=>ss});var Ua=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},H=Ua;var Ya=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},v=Ya;var Xa=/^[\$A-Z_a-z\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][\$0-9A-Z_a-z\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]*$/,Va=e=>Xa.test(e),Hs=Va;function $a(e){return e!==null&&typeof e=="object"}var Ks=$a;function*Ha(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,s=u=>Ks(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let a of i)s(a)&&(yield a);else s(i)&&(yield i)}}function*Ka(e,t){let r=[e];for(let n=0;n/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Zs(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function eu(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var tu=e=>!(Zs(e)||eu(e));var za=/[^\x20-\x7F]/;function Qa(e){if(!e)return 0;if(!za.test(e))return e.length;e=e.replace(Qs()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=tu(n)?1:2)}return t}var Ze=Qa;function xr(e){return(t,r,n)=>{let s=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:u}=t,i=r;for(;i>=0&&i/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function iu(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function au(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var ou=e=>!(iu(e)||au(e));var oo=/[^\x20-\x7F]/;function po(e){if(!e)return 0;if(!oo.test(e))return e.length;e=e.replace(uu()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=ou(n)?1:2)}return t}var rt=po;function U(e){var n;let t=e.range?e.range[0]:e.start,r=((n=e.declaration)==null?void 0:n.decorators)??e.decorators;return k(r)?Math.min(U(r[0]),t):t}function v(e){return e.range?e.range[1]:e.end}function Ft(e,t){let r=U(e);return Number.isInteger(r)&&r===U(t)}function co(e,t){let r=v(e);return Number.isInteger(r)&&r===v(t)}function pu(e,t){return Ft(e,t)&&co(e,t)}var zt=null;function Qt(e){if(zt!==null&&typeof zt.property){let t=zt;return zt=Qt.prototype=null,t}return zt=Qt.prototype=e??Object.create(null),new Qt}var lo=10;for(let e=0;e<=lo;e++)Qt();function _n(e){return Qt(e)}function mo(e,t="type"){_n(e);function r(n){let s=n[t],u=e[s];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return u}return r}var Sr=mo;var cu={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var Do=Sr(cu),Br=Do;var br="'",lu='"';function yo(e,t){let r=t===!0||t===br?br:lu,n=r===br?lu:br,s=0,u=0;for(let i of e)i===r?s++:i===n&&u++;return s>u?n:r}var Pr=yo;var fo=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},H=fo;function Eo(e,t,r){let n=t==='"'?"'":'"',u=H(!1,e,/\\(.)|(["'])/gs,(i,a,o)=>a===n?a:o===t?"\\"+o:o||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return t+u+t}var mu=Eo;function Fo(e,t){let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Pr(r,t.singleQuote);return mu(r,n,!(t.parser==="css"||t.parser==="less"||t.parser==="scss"||t.__embeddedInHtml))}var at=Fo;function Co(e){return e=new Set(e),t=>e.has(t==null?void 0:t.type)}var J=Co;var Ao=J(["Block","CommentBlock","MultiLine"]),Q=Ao;function To(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let s=r[n];if(n===0)return e.type==="Identifier"&&e.name===s;if(e.type!=="MemberExpression"||e.optional||e.computed||e.property.type!=="Identifier"||e.property.name!==s)return!1;e=e.object}}function xo(e,t){return t.some(r=>To(e,r))}var Du=xo;var go=J(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),kr=go;function ho({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Ir=ho;function er(e,t){return t(e)||ru(e,{getVisitorKeys:Br,predicate:t})}function Mt(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||I(e)||R(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||Ae(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function Eu(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function wr(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var tr=J(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),Fu=J(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),G=J(["ArrayExpression","TupleExpression"]),re=J(["ObjectExpression","RecordExpression"]);function ke(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function Un(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&ke(e.argument)}function Z(e){return e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"}function Wn(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var rr=J(["Literal","BooleanLiteral","BigIntLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),Cu=J(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier","Import"]),Oe=J(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),jt=J(["FunctionExpression","ArrowFunctionExpression"]);function So(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function jn(e){return I(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var N=J(["JSXElement","JSXFragment"]);function Gn(e){return e.kind==="get"||e.kind==="set"}function Nn(e){return Gn(e)||Ft(e,e.value)}function Or(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&e.value.type==="FunctionTypeAnnotation"&&!e.static&&!Nn(e)}function Au(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!Ft(e,e.typeAnnotation)}var le=J(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Ct(e){return R(e)||e.type==="BindExpression"&&!!e.object}var Bo=J(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function Rt(e){return Ir(e)||kr(e)||Bo(e)||(e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference")&&!e.typeParameters}function bo(e){let t=/^(?:before|after)(?:Each|All)$/;return e.callee.type==="Identifier"&&e.arguments.length===1&&t.test(e.callee.name)}var Po=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function ko(e){return Du(e,Po)}function gt(e,t){if(e.type!=="CallExpression")return!1;if(e.arguments.length===1){if(jn(e)&&t&>(t))return jt(e.arguments[0]);if(bo(e))return jn(e.arguments[0])}else if((e.arguments.length===2||e.arguments.length===3)&&(e.arguments[0].type==="TemplateLiteral"||Z(e.arguments[0]))&&ko(e.callee))return e.arguments[2]&&!ke(e.arguments[2])?!1:(e.arguments.length===2?jt(e.arguments[1]):So(e.arguments[1])&&V(e.arguments[1]).length<=1)||jn(e.arguments[1]);return!1}var I=J(["CallExpression","OptionalCallExpression"]),R=J(["MemberExpression","OptionalMemberExpression"]);function du(e){let t="expressions";e.type==="TSTemplateLiteralType"&&(t="types");let r=e[t];return r.length===0?!1:r.every(n=>{if(Jn(n)||Tu(n))return!0})}function Tu(e,{maxDepth:t=Number.POSITIVE_INFINITY}={}){if(A(e))return!1;if(e.type==="ChainExpression")return Tu(e.expression,{maxDepth:t});if(!R(e))return!1;let r=e,n=0;for(;R(r)&&n++<=t;)if(!Jn(r.property)||(r=r.object,A(r)))return!1;return Jn(r)}function Jn(e){return A(e)?!1:rr(e)||Cu(e)}function Yn(e,t=5){return xu(e,t)<=t}function xu(e,t){let r=0;for(let n in e){let s=e[n];if(s&&typeof s=="object"&&typeof s.type=="string"&&(r++,r+=xu(s,t-r)),r>t)return r}return r}var Io=.25;function nr(e,t){let{printWidth:r}=t;if(A(e))return!1;let n=r*Io;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Un(e)&&!A(e.argument))return!0;let s=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return s?s.length<=n:Z(e)?at(me(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` -`):e.type==="UnaryExpression"?nr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:rr(e)}function ve(e,t){return N(t)?ht(t):A(t,x.Leading,r=>z(e,v(r)))}function Xn(e,t){return t.parser!=="json"&&Z(e.key)&&me(e.key).slice(1,-1)===e.key.value&&(eu(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||t.parser==="typescript"&&e.type==="PropertyDefinition")||$n(e.key.value)&&String(Number(e.key.value))===e.key.value&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function $n(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function yu(e){return e.quasis.some(t=>t.value.raw.includes(` -`))}function vr(e,t){return(e.type==="TemplateLiteral"&&yu(e)||e.type==="TaggedTemplateExpression"&&yu(e.quasi))&&!z(t,U(e),{backwards:!0})}function _r(e){if(!A(e))return!1;let t=w(!1,ot(e,x.Dangling),-1);return t&&!Q(t)}function gu(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(jt(r)){if(t+=1,t>1)return!0}else if(I(r)){for(let n of r.arguments)if(jt(n))return!0}return!1}function jr(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&I(t)&&I(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Lo=new Set(["!","-","+","~"]);function Pe(e,t=2){if(t<=0)return!1;let r=n=>Pe(n,t-1);if(Wn(e))return rt(e.pattern??e.regex.pattern)<=5;if(rr(e)||Cu(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(` -`))&&e.expressions.every(r);if(re(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(G(e))return e.elements.every(n=>n===null||r(n));if(pt(e)){if(e.type==="ImportExpression"||Pe(e.callee,t)){let n=xe(e);return n.length<=t&&n.every(r)}return!1}return R(e)?Pe(e.object,t)&&Pe(e.property,t):e.type==="UnaryExpression"&&Lo.has(e.operator)||e.type==="UpdateExpression"?Pe(e.argument,t):e.type==="TSNonNullExpression"?Pe(e.expression,t):!1}function me(e){var t;return((t=e.extra)==null?void 0:t.raw)??e.raw}function hu(e){return e}function De(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function ue(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ue(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return ue(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:ue(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:ue(e.callee,t);case"ConditionalExpression":return ue(e.test,t);case"UpdateExpression":return!e.prefix&&ue(e.argument,t);case"BindExpression":return e.object&&ue(e.object,t);case"SequenceExpression":return ue(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ue(e.expression,t);default:return t(e)}}var fu={"==":!0,"!=":!0,"===":!0,"!==":!0},Lr={"*":!0,"/":!0,"%":!0},qn={">>":!0,">>>":!0,"<<":!0};function sr(e,t){return!(Zt(t)!==Zt(e)||e==="**"||fu[e]&&fu[t]||t==="%"&&Lr[e]||e==="%"&&Lr[t]||t!==e&&Lr[t]&&Lr[e]||qn[e]&&qn[t])}var wo=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function Zt(e){return wo.get(e)}function Su(e){return!!qn[e]||e==="|"||e==="^"||e==="&"}function Bu(e){var r;if(e.rest)return!0;let t=V(e);return((r=w(!1,t,-1))==null?void 0:r.type)==="RestElement"}var Mn=new WeakMap;function V(e){if(Mn.has(e))return Mn.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),Mn.set(e,t),t}function bu(e,t){let{node:r}=e,n=0,s=u=>t(u,n++);r.this&&e.call(s,"this"),Array.isArray(r.parameters)?e.each(s,"parameters"):Array.isArray(r.params)&&e.each(s,"params"),r.rest&&e.call(s,"rest")}var Rn=new WeakMap;function xe(e){if(Rn.has(e))return Rn.get(e);let t=e.arguments;return e.type==="ImportExpression"&&(t=[e.source],e.attributes&&t.push(e.attributes),e.options&&t.push(e.options)),Rn.set(e,t),t}function Mr(e,t){let{node:r}=e;r.type==="ImportExpression"?(e.call(n=>t(n,0),"source"),r.attributes&&e.call(n=>t(n,1),"attributes"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function Vn(e,t){if(e.type==="ImportExpression"){if(t===0||t===(e.attributes||e.options?-2:-1))return"source";if(e.attributes&&(t===1||t===-1))return"attributes";if(e.options&&(t===1||t===-1))return"options";throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return["arguments",t]}function ur(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function ht(e){return(e==null?void 0:e.prettierIgnore)||A(e,x.PrettierIgnore)}var x={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},Pu=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,s)=>!(e&x.Leading&&!r.leading||e&x.Trailing&&!r.trailing||e&x.Dangling&&(r.leading||r.trailing)||e&x.Block&&!Q(r)||e&x.Line&&!tr(r)||e&x.First&&n!==0||e&x.Last&&n!==s.length-1||e&x.PrettierIgnore&&!ur(r)||t&&!t(r))};function A(e,t,r){if(!k(e==null?void 0:e.comments))return!1;let n=Pu(t,r);return n?e.comments.some(n):!0}function ot(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=Pu(t,r);return n?e.comments.filter(n):e.comments}var ye=(e,{originalText:t})=>_t(t,v(e));function pt(e){return I(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Ce(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!e.method&&e.kind==="init")}var ir=Symbol("ifWithoutBlockAndSameLineComment"),Ae=J(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]);function Hn(e,t){var u,i,a,o,p,D,y;if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&jo(r)&&ar(e))return!0;if(Oo(r))return!1;if(r.type==="Identifier"){if((u=r.extra)!=null&&u.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let c=(i=e.findAncestor(f=>f.type==="ForOfStatement"))==null?void 0:i.left;if(c&&ue(c,f=>f===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let c=e.findAncestor(l=>l.type==="ExpressionStatement"||l.type==="ForStatement"||l.type==="ForInStatement"),f=c?c.type==="ExpressionStatement"?c.expression:c.type==="ForStatement"?c.init:c.left:void 0;if(f&&ue(f,l=>l===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"type":{let c=e.findAncestor(f=>!Ae(f));if(c!==s&&c.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let c=(a=e.findAncestor(f=>f.type==="ExpressionStatement"))==null?void 0:a.expression;if(c&&ue(c,f=>f===r))return!0}if(r.type==="ObjectExpression"){let c=(o=e.findAncestor(f=>f.type==="ArrowFunctionExpression"))==null?void 0:o.body;if(c&&c.type!=="SequenceExpression"&&c.type!=="AssignmentExpression"&&ue(c,f=>f===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&k(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return ku(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"){if(R(r)&&r.computed)return!0;let c=!1,f=!1,l=r;for(;l;)switch(l.type){case"MemberExpression":f=!0,l=l.object;break;case"CallExpression":if(f||c)return t.parser!=="typescript";c=!0,l=l.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return t.parser!=="typescript";default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,(c,f)=>f==="returnType"&&c.type==="ArrowFunctionExpression")&&_o(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&vo(e))return!0;if(r.operator==="|>"&&((p=r.extra)!=null&&p.parenthesized)){let c=e.grandparent;if(c.type==="BinaryExpression"&&c.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Ae(r);case"ConditionalExpression":return Ae(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||Ae(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:c,type:f}=r;if(!c&&f!=="TSTypeAssertion")return!0;let l=Zt(c),h=s.operator,g=Zt(h);return g>l||n==="right"&&g===l||g===l&&!sr(h,c)?!0:g");default:return!1}case"TSFunctionType":if(e.match(c=>c.type==="TSFunctionType",(c,f)=>f==="typeAnnotation"&&c.type==="TSTypeAnnotation",(c,f)=>f==="returnType"&&c.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":if(n==="extendsType"&&s.type==="TSConditionalType"){if(r.type==="TSConditionalType")return!0;let{typeAnnotation:c}=r.returnType||r.typeAnnotation;if(c.type==="TSTypePredicate"&&c.typeAnnotation&&(c=c.typeAnnotation.typeAnnotation),c.type==="TSInferType"&&c.typeParameter.constraint)return!0}if(n==="checkType"&&s.type==="TSConditionalType")return!0;case"TSUnionType":case"TSIntersectionType":if((s.type==="TSUnionType"||s.type==="TSIntersectionType")&&s.types.length>1&&(!r.types||r.types.length>1))return!0;case"TSInferType":if(r.type==="TSInferType"&&s.type==="TSRestType")return!1;case"TSTypeOperator":return s.type==="TSArrayType"||s.type==="TSOptionalType"||s.type==="TSRestType"||n==="objectType"&&s.type==="TSIndexedAccessType"||s.type==="TSTypeOperator"||s.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return n==="objectType"&&s.type==="TSIndexedAccessType"||n==="elementType"&&s.type==="TSArrayType";case"TypeofTypeAnnotation":return n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||n==="elementType"&&s.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return s.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return s.type==="ArrayTypeAnnotation"||s.type==="NullableTypeAnnotation"||s.type==="IntersectionTypeAnnotation"||s.type==="UnionTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return s.type==="ArrayTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"FunctionTypeAnnotation":{if(e.match(void 0,(f,l)=>l==="typeAnnotation"&&f.type==="TypeAnnotation",(f,l)=>l==="returnType"&&f.type==="ArrowFunctionExpression")||e.match(void 0,(f,l)=>l==="typeAnnotation"&&f.type==="TypePredicate",(f,l)=>l==="typeAnnotation"&&f.type==="TypeAnnotation",(f,l)=>l==="returnType"&&f.type==="ArrowFunctionExpression"))return!0;let c=s.type==="NullableTypeAnnotation"?e.grandparent:s;return c.type==="UnionTypeAnnotation"||c.type==="IntersectionTypeAnnotation"||c.type==="ArrayTypeAnnotation"||n==="objectType"&&(c.type==="IndexedAccessType"||c.type==="OptionalIndexedAccessType")||n==="checkType"&&s.type==="ConditionalTypeAnnotation"||n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.returnType.type==="InferTypeAnnotation"&&r.returnType.typeParameter.bound||c.type==="NullableTypeAnnotation"||s.type==="FunctionTypeParam"&&s.name===null&&V(r).some(f=>{var l;return((l=f.typeAnnotation)==null?void 0:l.type)==="NullableTypeAnnotation"})}case"ConditionalTypeAnnotation":if(n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.type==="ConditionalTypeAnnotation"||n==="checkType"&&s.type==="ConditionalTypeAnnotation")return!0;case"OptionalIndexedAccessType":return n==="objectType"&&s.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof r.value=="string"&&s.type==="ExpressionStatement"&&!s.directive){let c=e.grandparent;return c.type==="Program"||c.type==="BlockStatement"}return n==="object"&&s.type==="MemberExpression"&&typeof r.value=="number";case"AssignmentExpression":{let c=e.grandparent;return n==="body"&&s.type==="ArrowFunctionExpression"?!0:n==="key"&&(s.type==="ClassProperty"||s.type==="PropertyDefinition")&&s.computed||(n==="init"||n==="update")&&s.type==="ForStatement"?!1:s.type==="ExpressionStatement"?r.left.type==="ObjectPattern":!(n==="key"&&s.type==="TSPropertySignature"||s.type==="AssignmentExpression"||s.type==="SequenceExpression"&&c.type==="ForStatement"&&(c.init===s||c.update===s)||n==="value"&&s.type==="Property"&&c.type==="ObjectPattern"&&c.properties.includes(s)||s.type==="NGChainedExpression")}case"ConditionalExpression":switch(s.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:n==="test";case"MemberExpression":case"OptionalMemberExpression":return n==="object";default:return!1}case"FunctionExpression":switch(s.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(s.type){case"BinaryExpression":return s.operator!=="|>"||((D=r.extra)==null?void 0:D.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return n==="test";default:return!1}case"ClassExpression":switch(s.type){case"NewExpression":return n==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(Mo(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")){let c=r;for(;c;)switch(c.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":c=c.object;break;case"TaggedTemplateExpression":c=c.tag;break;case"TSNonNullExpression":c=c.expression;break;default:return!1}}return!1;case"BindExpression":return n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")||n==="object"&&R(s);case"NGPipeExpression":return!(s.type==="NGRoot"||s.type==="NGMicrosyntaxExpression"||s.type==="ObjectProperty"&&!((y=r.extra)!=null&&y.parenthesized)||G(s)||n==="arguments"&&I(s)||n==="right"&&s.type==="NGPipeExpression"||n==="property"&&s.type==="MemberExpression"||s.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return n==="callee"||n==="left"&&s.type==="BinaryExpression"&&s.operator==="<"||!G(s)&&s.type!=="ArrowFunctionExpression"&&s.type!=="AssignmentExpression"&&s.type!=="AssignmentPattern"&&s.type!=="BinaryExpression"&&s.type!=="NewExpression"&&s.type!=="ConditionalExpression"&&s.type!=="ExpressionStatement"&&s.type!=="JsExpressionRoot"&&s.type!=="JSXAttribute"&&s.type!=="JSXElement"&&s.type!=="JSXExpressionContainer"&&s.type!=="JSXFragment"&&s.type!=="LogicalExpression"&&!I(s)&&!Ce(s)&&s.type!=="ReturnStatement"&&s.type!=="ThrowStatement"&&s.type!=="TypeCastExpression"&&s.type!=="VariableDeclarator"&&s.type!=="YieldExpression";case"TSInstantiationExpression":return n==="object"&&R(s)}return!1}var Oo=J(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function vo(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if((n==null?void 0:n.type)==="ForStatement"&&n.init===r)return!0;r=n}return!1}function _o(e){return er(e,t=>t.type==="ObjectTypeAnnotation"&&er(t,r=>r.type==="FunctionTypeAnnotation"))}function jo(e){return re(e)}function ar(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(ar);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(ar);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(ar);break;case"UnaryExpression":if(t.prefix)return e.callParent(ar);break}return!1}function ku(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!Hn(e,t):!Mt(r)||n.type!=="ExportDefaultDeclaration"&&Hn(e,t)?!1:e.call(()=>ku(e,t),...wr(r))}function Mo(e){let{node:t,parent:r,grandparent:n,key:s}=e;return!!((t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression")&&(s==="object"&&r.type==="MemberExpression"||s==="callee"&&(r.type==="CallExpression"||r.type==="NewExpression")||r.type==="TSNonNullExpression"&&n.type==="MemberExpression"&&n.object===r)||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(u,i)=>i==="expression"&&u.type==="ChainExpression")&&(e.match(void 0,void 0,(u,i)=>i==="callee"&&(u.type==="CallExpression"&&!u.optional||u.type==="NewExpression")||i==="object"&&u.type==="MemberExpression"&&!u.optional)||e.match(void 0,void 0,(u,i)=>i==="expression"&&u.type==="TSNonNullExpression",(u,i)=>i==="object"&&u.type==="MemberExpression"))||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(u,i)=>i==="expression"&&u.type==="TSNonNullExpression",(u,i)=>i==="expression"&&u.type==="ChainExpression",(u,i)=>i==="object"&&u.type==="MemberExpression"))}var ge=Hn;function Ro(e,t){let r=t-1;r=Xe(e,r,{backwards:!0}),r=$e(e,r,{backwards:!0}),r=Xe(e,r,{backwards:!0});let n=$e(e,r,{backwards:!0});return r!==n}var Iu=Ro;var Jo=()=>!0;function Kn(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function qo(e,t){var D;let r=e.node,n=[Kn(e,t)],{printer:s,originalText:u,locStart:i,locEnd:a}=t;if((D=s.isBlockComment)==null?void 0:D.call(s,r)){let y=z(u,a(r))?z(u,i(r),{backwards:!0})?C:d:" ";n.push(y)}else n.push(C);let p=$e(u,Xe(u,a(r)));return p!==!1&&z(u,p)&&n.push(C),n}function Uo(e,t,r){var p;let n=e.node,s=Kn(e,t),{printer:u,originalText:i,locStart:a}=t,o=(p=u.isBlockComment)==null?void 0:p.call(u,n);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||z(i,a(n),{backwards:!0})){let D=Iu(i,a(n));return{doc:wn([C,D?C:"",s]),isBlock:o,hasLineSuffix:!0}}return!o||r!=null&&r.hasLineSuffix?{doc:[wn([" ",s]),ce],isBlock:o,hasLineSuffix:!0}:{doc:[" ",s],isBlock:o,hasLineSuffix:!1}}function j(e,t,r={}){let{node:n}=e;if(!k(n==null?void 0:n.comments))return"";let{indent:s=!1,marker:u,filter:i=Jo}=r,a=[];if(e.each(({node:p})=>{p.leading||p.trailing||p.marker!==u||!i(p)||a.push(Kn(e,t))},"comments"),a.length===0)return"";let o=b(C,a);return s?E([C,o]):o}function zn(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(o=>!n.has(o)).length===0)return{leading:"",trailing:""};let u=[],i=[],a;return e.each(()=>{let o=e.node;if(n!=null&&n.has(o))return;let{leading:p,trailing:D}=o;p?u.push(qo(e,t)):D&&(a=Uo(e,t,a),i.push(a.doc))},"comments"),{leading:u,trailing:i}}function pe(e,t,r){let{leading:n,trailing:s}=zn(e,r);return!n&&!s?t:Kt(t,u=>[n,u,s])}var Qn=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},_e=Qn;function Zn(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var je,es=class{constructor(t){Gs(this,je,void 0);Ns(this,je,new Set(t))}getLeadingWhitespaceCount(t){let r=ut(this,je),n=0;for(let s=0;s=0&&r.has(t.charAt(s));s--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return ut(this,je).has(t.charAt(0))}hasTrailingWhitespace(t){return ut(this,je).has(w(!1,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${Zn([...ut(this,je)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return t.split(s)}hasWhitespaceCharacter(t){let r=ut(this,je);return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=ut(this,je);return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=ut(this,je);return Array.prototype.every.call(t,n=>r.has(n))}};je=new WeakMap;var Lu=es;var as={};Cr(as,{endOfLine:()=>Vo,ownLine:()=>$o,remaining:()=>Ho});function Wo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Xe(e,n),n=Ot(e,n),n=vt(e,n),n=$e(e,n);return n}var ct=Wo;function Go(e,t){let r=ct(e,t);return r===!1?"":e.charAt(r)}var Ve=Go;function No(e,t,r){for(let n=t;n20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function ts(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Yo(e)}function ie(e,t){t.leading=!0,t.trailing=!1,ts(e,t)}function he(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),ts(e,t)}function ne(e,t){t.leading=!1,t.trailing=!0,ts(e,t)}function Xo(e){return Q(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var wu=Xo;function $o(e){return[qu,vu,Mu,zo,ns,ss,Ou,_u,pp,ap,is,Ju,cp,ju,Ru,us,Qo].some(t=>t(e))}function Vo(e){return[Ko,Mu,vu,Ju,ns,ss,Ou,_u,Ru,ip,op,is,Dp,us,Ep,Fp].some(t=>t(e))}function Ho(e){return[qu,ns,ss,Zo,up,ju,is,sp,np,fp,us,yp].some(t=>t(e))}function St(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?ie(r,t):he(e,t)}function rs(e,t){e.type==="BlockStatement"?St(e,t):ie(e,t)}function Ko({comment:e,followingNode:t}){return t&&wu(e)?(ie(t,e),!0):!1}function ns({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(Ve(s,v(e))===")")return ne(t,e),!0;if(t===r.consequent&&n===r.alternate){if(t.type==="BlockStatement")ne(t,e);else{let i=e.type==="SingleLine"||e.loc.start.line===e.loc.end.line,a=e.loc.start.line===t.loc.start.line;i&&a?he(t,e,t.type==="ExpressionStatement"?ir:void 0):he(r,e)}return!0}return n.type==="BlockStatement"?(St(n,e),!0):n.type==="IfStatement"?(rs(n.consequent,e),!0):r.consequent===n?(ie(n,e),!0):!1}function ss({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:Ve(s,v(e))===")"?(ne(t,e),!0):n.type==="BlockStatement"?(St(n,e),!0):r.body===n?(ie(n,e),!0):!1}function Ou({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(ne(t,e),!0):n.type==="BlockStatement"?(St(n,e),!0):n.type==="TryStatement"?(rs(n.finalizer,e),!0):n.type==="CatchClause"?(rs(n.body,e),!0):!1}function zo({comment:e,enclosingNode:t,followingNode:r}){return R(t)&&(r==null?void 0:r.type)==="Identifier"?(ie(t,e),!0):!1}function Qo({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||(t==null?void 0:t.type)==="ConditionalTypeAnnotation"||(t==null?void 0:t.type)==="TSConditionalType")?!1:(r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType"?(he(t,e),!0):!1}function vu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s,options:u}){let i=t&&!Ie(s,v(t),U(e));return(!t||!i)&&((r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType")&&n?u.experimentalTernaries&&r.alternate===n&&!(Q(e)&&!Ie(u.originalText,U(e),v(e)))?(he(r,e),!0):(ie(n,e),!0):!1}function Zo({comment:e,precedingNode:t,enclosingNode:r}){return Ce(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(ne(r.value.left,e),!0):!1}var ep=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function _u({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(ep.has(r==null?void 0:r.type)){if(k(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return ne(w(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return St(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return ne(t,e),!0;for(let s of["implements","extends","mixins"])if(r[s]&&n===r[s][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?ne(t,e):he(r,e,s),!0}}return!1}var tp=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function ju({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&Ve(n,v(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&Ve(n,v(t))!==":"?(ne(t,e),!0):(t==null?void 0:t.type)==="Decorator"&&tp.has(r==null?void 0:r.type)?(ne(t,e),!0):!1}var rp=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function np({comment:e,precedingNode:t,enclosingNode:r,text:n}){return Ve(n,v(e))!=="("?!1:t&&rp.has(r==null?void 0:r.type)?(ne(t,e),!0):!1}function sp({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=ct(r,v(e));return n!==!1&&r.slice(n,n+2)==="=>"?(he(t,e),!0):!1}function up({comment:e,enclosingNode:t,text:r}){return Ve(r,v(e))!==")"?!1:t&&(Uu(t)&&V(t).length===0||pt(t)&&xe(t).length===0)?(he(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&V(t.value).length===0?(he(t.value,e),!0):!1}function Mu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(t==null?void 0:t.type)==="FunctionTypeParam"&&(r==null?void 0:r.type)==="FunctionTypeAnnotation"&&(n==null?void 0:n.type)!=="FunctionTypeParam"?(ne(t,e),!0):((t==null?void 0:t.type)==="Identifier"||(t==null?void 0:t.type)==="AssignmentPattern"||(t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern"||(t==null?void 0:t.type)==="RestElement"||(t==null?void 0:t.type)==="TSParameterProperty")&&Uu(r)&&Ve(s,v(e))===")"?(ne(t,e),!0):!Q(e)&&((r==null?void 0:r.type)==="FunctionDeclaration"||(r==null?void 0:r.type)==="FunctionExpression"||(r==null?void 0:r.type)==="ObjectMethod")&&(n==null?void 0:n.type)==="BlockStatement"&&r.body===n&&ct(s,v(e))===U(n)?(St(n,e),!0):!1}function Ru({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="LabeledStatement"?(ie(t,e),!0):!1}function us({comment:e,enclosingNode:t}){return((t==null?void 0:t.type)==="ContinueStatement"||(t==null?void 0:t.type)==="BreakStatement")&&!t.label?(ne(t,e),!0):!1}function ip({comment:e,precedingNode:t,enclosingNode:r}){return I(r)&&t&&r.callee===t&&r.arguments.length>0?(ie(r.arguments[0],e),!0):!1}function ap({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)==="UnionTypeAnnotation"||(r==null?void 0:r.type)==="TSUnionType"?(ur(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(ne(t,e),!0):!1):(((n==null?void 0:n.type)==="UnionTypeAnnotation"||(n==null?void 0:n.type)==="TSUnionType")&&ur(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function op({comment:e,enclosingNode:t}){return Ce(t)?(ie(t,e),!0):!1}function is({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:s}){var u;return((u=n==null?void 0:n.body)==null?void 0:u.length)===0?(s?he(n,e):ie(n,e),!0):(t==null?void 0:t.type)==="Program"&&t.body.length===0&&!k(t.directives)?(s?he(t,e):ie(t,e),!0):(r==null?void 0:r.type)==="Program"&&r.body.length===0&&(t==null?void 0:t.type)==="ModuleExpression"?(he(r,e),!0):!1}function pp({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="ForInStatement"||(t==null?void 0:t.type)==="ForOfStatement"?(ie(t,e),!0):!1}function Ju({comment:e,precedingNode:t,enclosingNode:r,text:n}){if((r==null?void 0:r.type)==="ImportSpecifier"||(r==null?void 0:r.type)==="ExportSpecifier")return ie(r,e),!0;let s=(t==null?void 0:t.type)==="ImportSpecifier"&&(r==null?void 0:r.type)==="ImportDeclaration",u=(t==null?void 0:t.type)==="ExportSpecifier"&&(r==null?void 0:r.type)==="ExportNamedDeclaration";return(s||u)&&z(n,v(e))?(ne(t,e),!0):!1}function cp({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="AssignmentPattern"?(ie(t,e),!0):!1}var lp=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),mp=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function Dp({comment:e,enclosingNode:t,followingNode:r}){return lp.has(t==null?void 0:t.type)&&r&&(mp.has(r.type)||Q(e))?(ie(r,e),!0):!1}function yp({comment:e,enclosingNode:t,followingNode:r,text:n}){return!r&&((t==null?void 0:t.type)==="TSMethodSignature"||(t==null?void 0:t.type)==="TSDeclareFunction"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Ve(n,v(e))===";"?(ne(t,e),!0):!1}function qu({comment:e,enclosingNode:t,followingNode:r}){if(ur(e)&&(t==null?void 0:t.type)==="TSMappedType"&&(r==null?void 0:r.type)==="TSTypeParameter"&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function fp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TSMappedType"?!1:(n==null?void 0:n.type)==="TSTypeParameter"&&n.name?(ie(n.name,e),!0):(t==null?void 0:t.type)==="TSTypeParameter"&&t.constraint?(ne(t.constraint,e),!0):!1}function Ep({comment:e,enclosingNode:t,followingNode:r}){return!t||t.type!=="SwitchCase"||t.test||!r||r!==t.consequent[0]?!1:(r.type==="BlockStatement"&&tr(e)?St(r,e):he(t,e),!0)}function Fp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return t&&(t.type==="TSUnionType"||t.type==="UnionTypeAnnotation")&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&n===void 0||r.type==="TSIntersectionType"||r.type==="IntersectionTypeAnnotation")?(ne(w(!1,t.types,-1),e),!0):!1}var Uu=J(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);function Cp(e){let t=`*${e.value}*`.split(` -`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var Wu=Cp;function Gu(e,t){let r=e.node;if(tr(r))return t.originalText.slice(U(r),v(r)).trimEnd();if(Q(r))return Wu(r)?Ap(r):["/*",be(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Ap(e){let t=e.value.split(` -`);return["/*",b(C,t.map((r,n)=>n===0?r.trimEnd():" "+(ne===""||e===d||e===C||e===F;function hp(e,t,r){var O,M,_;let{node:n}=e;if(n.type==="JSXElement"&&Rp(n))return[r("openingElement"),r("closingElement")];let s=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),u=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[s,...e.map(r,"children"),u];n.children=n.children.map(T=>Jp(T)?{type:"JSXText",value:" ",raw:" "}:T);let i=n.children.some(N),a=n.children.filter(T=>T.type==="JSXExpressionContainer").length>1,o=n.type==="JSXElement"&&n.openingElement.attributes.length>1,p=K(s)||i||o||a,D=e.parent.rootMarker==="mdx",y=t.singleQuote?"{' '}":'{" "}',c=D?" ":B([y,F]," "),f=((M=(O=n.openingElement)==null?void 0:O.name)==null?void 0:M.name)==="fbt",l=Sp(e,t,r,c,f),h=n.children.some(T=>or(T));for(let T=l.length-2;T>=0;T--){let q=l[T]===""&&l[T+1]==="",fe=l[T]===C&&l[T+1]===""&&l[T+2]===C,Y=(l[T]===F||l[T]===C)&&l[T+1]===""&&l[T+2]===c,de=l[T]===c&&l[T+1]===""&&(l[T+2]===F||l[T+2]===C),se=l[T]===c&&l[T+1]===""&&l[T+2]===c,It=l[T]===F&&l[T+1]===""&&l[T+2]===C||l[T]===C&&l[T+1]===""&&l[T+2]===F;fe&&h||q||Y||se||It?l.splice(T,2):de&&l.splice(T+1,2)}for(;l.length>0&&ps(w(!1,l,-1));)l.pop();for(;l.length>1&&ps(l[0])&&ps(l[1]);)l.shift(),l.shift();let g=[];for(let[T,q]of l.entries()){if(q===c){if(T===1&&l[T-1]===""){if(l.length===2){g.push(y);continue}g.push([y,C]);continue}else if(T===l.length-1){g.push(y);continue}else if(l[T-1]===""&&l[T-2]===C){g.push(y);continue}}g.push(q),K(q)&&(p=!0)}let S=h?Lt(g):m(g,{shouldBreak:!0});if(((_=t.cursorNode)==null?void 0:_.type)==="JSXText"&&n.children.includes(t.cursorNode)&&(S=[vn,S,vn]),D)return S;let P=m([s,E([C,S]),C,u]);return p?P:Ye([m([s,...l,u]),P])}function Sp(e,t,r,n,s){let u=[];return e.each(({node:i,next:a})=>{if(i.type==="JSXText"){let o=me(i);if(or(i)){let p=Rr.split(o,!0);p[0]===""&&(u.push(""),p.shift(),/\n/.test(p[0])?u.push(Yu(s,p[1],i,a)):u.push(n),p.shift());let D;if(w(!1,p,-1)===""&&(p.pop(),D=p.pop()),p.length===0)return;for(let[y,c]of p.entries())y%2===1?u.push(d):u.push(c);D!==void 0?/\n/.test(D)?u.push(Yu(s,w(!1,u,-1),i,a)):u.push(n):u.push(Nu(s,w(!1,u,-1),i,a))}else/\n/.test(o)?o.match(/\n/g).length>1&&u.push("",C):u.push("",n)}else{let o=r();if(u.push(o),a&&or(a)){let D=Rr.trim(me(a)),[y]=Rr.split(D);u.push(Nu(s,y,i,a))}else u.push(C)}},"children"),u}function Nu(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?F:C:F}function Yu(e,t,r,n){return e?C:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?C:F:C}var Bp=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function bp(e,t,r){let{parent:n}=e;if(Bp.has(n.type))return t;let s=e.match(void 0,i=>i.type==="ArrowFunctionExpression",I,i=>i.type==="JSXExpressionContainer"),u=ge(e,r);return m([u?"":B("("),E([F,t]),F,u?"":B(")")],{shouldBreak:s})}function Pp(e,t,r){let{node:n}=e,s=[];if(s.push(r("name")),n.value){let u;if(Z(n.value)){let i=me(n.value),a=H(!1,H(!1,i.slice(1,-1),"'","'"),""",'"'),o=Pr(a,t.jsxSingleQuote);a=o==='"'?H(!1,a,'"',"""):H(!1,a,"'","'"),u=e.call(()=>pe(e,be(o+a+o),t),"value")}else u=r("value");s.push("=",u)}return s}function kp(e,t,r){let{node:n}=e,s=(u,i)=>u.type==="JSXEmptyExpression"||!A(u)&&(G(u)||re(u)||u.type==="ArrowFunctionExpression"||u.type==="AwaitExpression"&&(s(u.argument,u)||u.argument.type==="JSXElement")||I(u)||u.type==="ChainExpression"&&I(u.expression)||u.type==="FunctionExpression"||u.type==="TemplateLiteral"||u.type==="TaggedTemplateExpression"||u.type==="DoExpression"||N(i)&&(u.type==="ConditionalExpression"||le(u)));return s(n.expression,e.parent)?m(["{",r("expression"),Be,"}"]):m(["{",E([F,r("expression")]),F,Be,"}"])}function Ip(e,t,r){var a,o;let{node:n}=e,s=A(n.name)||A(n.typeParameters)||A(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!s)return["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((a=n.attributes)==null?void 0:a.length)===1&&n.attributes[0].value&&Z(n.attributes[0].value)&&!n.attributes[0].value.value.includes(` -`)&&!s&&!A(n.attributes[0]))return m(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let u=(o=n.attributes)==null?void 0:o.some(p=>p.value&&Z(p.value)&&p.value.value.includes(` -`)),i=t.singleAttributePerLine&&n.attributes.length>1?C:d;return m(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters"),E(e.map(()=>[i,r()],"attributes")),...Lp(n,t,s)],{shouldBreak:u})}function Lp(e,t,r){return e.selfClosing?[d,"/>"]:wp(e,t,r)?[">"]:[F,">"]}function wp(e,t,r){let n=e.attributes.length>0&&A(w(!1,e.attributes,-1),x.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function Op(e,t,r){let{node:n}=e,s=[];s.push(""),s}function vp(e,t){let{node:r}=e,n=A(r),s=A(r,x.Line),u=r.type==="JSXOpeningFragment";return[u?"<":""]}function _p(e,t,r){let n=pe(e,hp(e,t,r),t);return bp(e,n,t)}function jp(e,t){let{node:r}=e,n=A(r,x.Line);return[j(e,t,{indent:n}),n?C:""]}function Mp(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let u=["...",r()];return!A(s)||!os(e)?u:[E([F,pe(e,u,t)]),F]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Xu(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return Pp(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return b(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return b(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return Mp(e,t,r);case"JSXExpressionContainer":return kp(e,t,r);case"JSXFragment":case"JSXElement":return _p(e,t,r);case"JSXOpeningElement":return Ip(e,t,r);case"JSXClosingElement":return Op(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return vp(e,t);case"JSXEmptyExpression":return jp(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new _e(n,"JSX")}}function Rp(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!or(t)}function or(e){return e.type==="JSXText"&&(Rr.hasNonWhitespaceCharacter(me(e))||!/\n/.test(me(e)))}function Jp(e){return e.type==="JSXExpressionContainer"&&Z(e.expression)&&e.expression.value===" "&&!A(e.expression)}function $u(e){let{node:t,parent:r}=e;if(!N(t)||!N(r))return!1;let{index:n,siblings:s}=e,u;for(let i=n;i>0;i--){let a=s[i-1];if(!(a.type==="JSXText"&&!or(a))){u=a;break}}return(u==null?void 0:u.type)==="JSXExpressionContainer"&&u.expression.type==="JSXEmptyExpression"&&ht(u.expression)}function qp(e){return ht(e.node)||$u(e)}var Jr=qp;var Up=0;function qr(e,t,r){var M;let{node:n,parent:s,grandparent:u,key:i}=e,a=i!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),o=n.operator==="|>"&&((M=e.root.extra)==null?void 0:M.__isUsingHackPipeline),p=cs(e,r,t,!1,a);if(a)return p;if(o)return m(p);if(I(s)&&s.callee===n||s.type==="UnaryExpression"||R(s)&&!s.computed)return m([E([F,...p]),F]);let D=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&u.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&u.type==="NGMicrosyntax"&&u.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&u.type!=="ReturnStatement"&&u.type!=="ThrowStatement"&&!I(u)||s.type==="TemplateLiteral",y=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Ce(s),c=le(n.left)&&sr(n.operator,n.left.operator);if(D||Jt(n)&&!c||!Jt(n)&&y)return m(p);if(p.length===0)return"";let f=N(n.right),l=p.findIndex(_=>typeof _!="string"&&!Array.isArray(_)&&_.type===ae),h=p.slice(0,l===-1?1:l+1),g=p.slice(h.length,f?-1:void 0),S=Symbol("logicalChain-"+ ++Up),P=m([...h,E(g)],{id:S});if(!f)return P;let O=w(!1,p,-1);return m([P,Et(O,{groupId:S})])}function cs(e,t,r,n,s){var h;let{node:u}=e;if(!le(u))return[m(t())];let i=[];sr(u.operator,u.left.operator)?i=e.call(g=>cs(g,t,r,!0,s),"left"):i.push(m(t("left")));let a=Jt(u),o=(u.operator==="|>"||u.type==="NGPipeExpression"||Wp(e,r))&&!ve(r.originalText,u.right),p=u.type==="NGPipeExpression"?"|":u.operator,D=u.type==="NGPipeExpression"&&u.arguments.length>0?m(E([F,": ",b([d,": "],e.map(()=>Fe(2,m(t())),"arguments"))])):"",y;if(a)y=[p," ",t("right"),D];else{let S=p==="|>"&&((h=e.root.extra)==null?void 0:h.__isUsingHackPipeline)?e.call(P=>cs(P,t,r,!0,s),"right"):t("right");y=[o?d:"",p,o?" ":d,S,D]}let{parent:c}=e,f=A(u.left,x.Trailing|x.Line),l=f||!(s&&u.type==="LogicalExpression")&&c.type!==u.type&&u.left.type!==u.type&&u.right.type!==u.type;if(i.push(o?"":" ",l?m(y,{shouldBreak:f}):y),n&&A(u)){let g=wt(pe(e,i,r));return Array.isArray(g)||g.type===Ee?gr(g):[g]}return i}function Jt(e){return e.type!=="LogicalExpression"?!1:!!(re(e.right)&&e.right.properties.length>0||G(e.right)&&e.right.elements.length>0||N(e.right))}var Vu=e=>e.type==="BinaryExpression"&&e.operator==="|";function Wp(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&Vu(e.node)&&!e.hasAncestor(r=>!Vu(r)&&r.type!=="JsExpressionRoot")}var lt=class extends Error{name="ArgExpansionBailout"};function Gp(e,t,r,n){let{node:s}=e;return A(s,x.Dangling)?m([r,j(e,t,{indent:!0}),F,n]):[r,n]}function qt(e,t,r){let{node:n}=e,s=[],u=n.type==="TupleExpression"?"#[":"[",i="]",a=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",o=n[a];if(o.length===0)s.push(Gp(e,t,u,i));else{let p=w(!1,o,-1),D=(p==null?void 0:p.type)!=="RestElement",y=p===null,c=Symbol("array"),f=!t.__inJestEach&&o.length>1&&o.every((g,S,P)=>{let O=g==null?void 0:g.type;if(!G(g)&&!re(g))return!1;let M=P[S+1];if(M&&O!==M.type)return!1;let _=G(g)?"elements":"properties";return g[_]&&g[_].length>1}),l=ls(n,t),h=D?y?",":De(t)?l?B(",","",{groupId:c}):B(","):"":"";s.push(m([u,E([F,l?Yp(e,t,r,h):[Np(e,t,a,r),h],j(e,t)]),F,i],{shouldBreak:f,id:c}))}return s.push($(e),X(e,r)),s}function ls(e,t){return G(e)&&e.elements.length>1&&e.elements.every(r=>r&&(ke(r)||Un(r)&&!A(r.argument))&&!A(r,x.Trailing|x.Line,n=>!z(t.originalText,U(n),{backwards:!0})))}function Hu({node:e},{originalText:t}){let r=s=>Ot(t,vt(t,s)),n=s=>t[s]===","?s:n(r(s+1));return _t(t,n(v(e)))}function Np(e,t,r,n){let s=[];return e.each(({node:u,isLast:i})=>{s.push(u?m(n()):""),i||s.push([",",d,u&&Hu(e,t)?F:""])},r),s}function Yp(e,t,r,n){let s=[];return e.each(({isLast:u,next:i})=>{s.push([r(),u?n:","]),u||s.push(Hu(e,t)?[C,C]:A(i,x.Leading|x.Line)?C:d)},"elements"),Lt(s)}function Xp(e,t,r){let{node:n}=e,s=xe(n);if(s.length===0)return["(",j(e,t),")"];if(Hp(s))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let u=!1,i=s.length-1,a=[];Mr(e,({node:c},f)=>{let l=r();f===i||(ye(c,t)?(u=!0,l=[l,",",C,C]):l=[l,",",d]),a.push(l)});let p=!(n.type==="ImportExpression"||n.callee.type==="Import")&&De(t,"all")?",":"";function D(){return m(["(",E([d,...a]),p,d,")"],{shouldBreak:!0})}if(u||e.parent.type!=="Decorator"&&gu(s))return D();if(Vp(s)){let c=a.slice(1);if(c.some(K))return D();let f;try{f=r(Vn(n,0),{expandFirstArg:!0})}catch(l){if(l instanceof lt)return D();throw l}return K(f)?[ce,Ye([["(",m(f,{shouldBreak:!0}),", ",...c,")"],D()])]:Ye([["(",f,", ",...c,")"],["(",m(f,{shouldBreak:!0}),", ",...c,")"],D()])}if($p(s,a,t)){let c=a.slice(0,-1);if(c.some(K))return D();let f;try{f=r(Vn(n,-1),{expandLastArg:!0})}catch(l){if(l instanceof lt)return D();throw l}return K(f)?[ce,Ye([["(",...c,m(f,{shouldBreak:!0}),")"],D()])]:Ye([["(",...c,f,")"],["(",...c,m(f,{shouldBreak:!0}),")"],D()])}let y=["(",E([F,...a]),B(p),F,")"];return jr(e)?y:m(y,{shouldBreak:a.some(K)||u})}function pr(e,t=!1){return re(e)&&(e.properties.length>0||A(e))||G(e)&&(e.elements.length>0||A(e))||e.type==="TSTypeAssertion"&&pr(e.expression)||Ae(e)&&pr(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||Kp(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&pr(e.body,!0)||re(e.body)||G(e.body)||!t&&(I(e.body)||e.body.type==="ConditionalExpression")||N(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function $p(e,t,r){var u,i;let n=w(!1,e,-1);if(e.length===1){let a=w(!1,t,-1);if((u=a.label)!=null&&u.embed&&((i=a.label)==null?void 0:i.hug)!==!1)return!0}let s=w(!1,e,-2);return!A(n,x.Leading)&&!A(n,x.Trailing)&&pr(n)&&(!s||s.type!==n.type)&&(e.length!==2||s.type!=="ArrowFunctionExpression"||!G(n))&&!(e.length>1&&ls(n,r))}function Vp(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&zp(r)?!0:!A(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&Ku(r)&&!pr(r)}function Ku(e){var t;if(e.type==="ParenthesizedExpression")return Ku(e.expression);if(Ae(e)||e.type==="TypeCastExpression"){let{typeAnnotation:r}=e;return r.type==="TypeAnnotation"&&(r=r.typeAnnotation),r.type==="TSArrayType"&&(r=r.elementType,r.type==="TSArrayType"&&(r=r.elementType)),(r.type==="GenericTypeAnnotation"||r.type==="TSTypeReference")&&((t=r.typeParameters)==null?void 0:t.params.length)===1&&(r=r.typeParameters.params[0]),Rt(r)&&Pe(e.expression,1)}return pt(e)&&xe(e).length>1?!1:le(e)?Pe(e.left,1)&&Pe(e.right,1):Wn(e)||Pe(e)}function Hp(e){return e.length===2&&e[0].type==="ArrowFunctionExpression"&&V(e[0]).length===0&&e[0].body.type==="BlockStatement"&&e[1].type==="ArrayExpression"&&!e.some(t=>A(t))}function Kp(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||A(e,x.Dangling))}function zp(e){return e.type==="ObjectExpression"&&e.properties.length===1&&Ce(e.properties[0])&&e.properties[0].key.type==="Identifier"&&e.properties[0].key.name==="type"&&Z(e.properties[0].value)&&e.properties[0].value.value==="module"}var cr=Xp;function zu(e,t,r){var p;let n=r("object"),s=ms(e,t,r),{node:u,parent:i}=e,a=e.findAncestor(D=>!(R(D)||D.type==="TSNonNullExpression")),o=a&&(a.type==="NewExpression"||a.type==="BindExpression"||a.type==="AssignmentExpression"&&a.left.type!=="Identifier")||u.computed||u.object.type==="Identifier"&&u.property.type==="Identifier"&&!R(i)||(i.type==="AssignmentExpression"||i.type==="VariableDeclarator")&&(I(u.object)&&u.object.arguments.length>0||u.object.type==="TSNonNullExpression"&&I(u.object.expression)&&u.object.expression.arguments.length>0||((p=n.label)==null?void 0:p.memberChain));return tt(n.label,[n,o?s:m(E([F,s]))])}function ms(e,t,r){let n=r("property"),{node:s}=e,u=$(e);return s.computed?!s.property||ke(s.property)?[u,"[",n,"]"]:m([u,"[",E([F,n]),F,"]"]):[u,".",n]}function Qp(e,t,r){let{parent:n}=e,s=!n||n.type==="ExpressionStatement",u=[];function i(L){let{originalText:W}=t,te=ct(W,v(L));return W.charAt(te)===")"?te!==!1&&_t(W,te+1):ye(L,t)}function a(L){let{node:W}=L;I(W)&&(Ct(W.callee)||I(W.callee))?(u.unshift({node:W,printed:[pe(L,[$(L),He(L,t,r),cr(L,t,r)],t),i(W)?C:""]}),L.call(te=>a(te),"callee")):Ct(W)?(u.unshift({node:W,needsParens:ge(L,t),printed:pe(L,R(W)?ms(L,t,r):Ur(L,t,r),t)}),L.call(te=>a(te),"object")):W.type==="TSNonNullExpression"?(u.unshift({node:W,printed:pe(L,"!",t)}),L.call(te=>a(te),"expression")):u.unshift({node:W,printed:r()})}let{node:o}=e;u.unshift({node:o,printed:[$(e),He(e,t,r),cr(e,t,r)]}),o.callee&&e.call(L=>a(L),"callee");let p=[],D=[u[0]],y=1;for(;y0&&p.push(D);function f(L){return/^[A-Z]|^[$_]+$/.test(L)}function l(L){return L.length<=t.tabWidth}function h(L){var st;let W=(st=L[1][0])==null?void 0:st.node.computed;if(L[0].length===1){let xt=L[0][0].node;return xt.type==="ThisExpression"||xt.type==="Identifier"&&(f(xt.name)||s&&l(xt.name)||W)}let te=w(!1,L[0],-1).node;return R(te)&&te.property.type==="Identifier"&&(f(te.property.name)||W)}let g=p.length>=2&&!A(p[1][0].node)&&h(p);function S(L){let W=L.map(te=>te.printed);return L.length>0&&w(!1,L,-1).needsParens?["(",...W,")"]:W}function P(L){return L.length===0?"":E(m([C,b(C,L.map(S))]))}let O=p.map(S),M=O,_=g?3:2,T=p.flat(),q=T.slice(1,-1).some(L=>A(L.node,x.Leading))||T.slice(0,-1).some(L=>A(L.node,x.Trailing))||p[_]&&A(p[_][0].node,x.Leading);if(p.length<=_&&!q)return jr(e)?M:m(M);let fe=w(!1,p[g?1:0],-1).node,Y=!I(fe)&&i(fe),de=[S(p[0]),g?p.slice(1,2).map(S):"",Y?C:"",P(p.slice(g?2:1))],se=u.map(({node:L})=>L).filter(I);function It(){let L=w(!1,w(!1,p,-1),-1).node,W=w(!1,O,-1);return I(L)&&K(W)&&se.slice(0,-1).some(te=>te.arguments.some(jt))}let Xt;return q||se.length>2&&se.some(L=>!L.arguments.every(W=>Pe(W)))||O.slice(0,-1).some(K)||It()?Xt=m(de):Xt=[K(M)||Y?ce:"",Ye([M,de])],tt({memberChain:!0},Xt)}var Qu=Qp;function Wr(e,t,r){var y;let{node:n,parent:s}=e,u=n.type==="NewExpression",i=n.type==="ImportExpression",a=$(e),o=xe(n),p=o.length===1&&vr(o[0],t.originalText);if(p||o.length>0&&!u&&!i&&(ec(n,s)||gt(n,s))){let c=[];if(Mr(e,()=>{c.push(r())}),!(p&&((y=c[0].label)!=null&&y.embed)))return[u?"new ":"",r("callee"),a,He(e,t,r),"(",b(", ",c),")"]}if(!i&&!u&&Ct(n.callee)&&!e.call(c=>ge(c,t),"callee"))return Qu(e,t,r);let D=[u?"new ":"",i?Zp(n):r("callee"),a,He(e,t,r),cr(e,t,r)];return i||I(n.callee)?m(D):D}function Zp(e){return e.phase?`import.${e.phase}`:"import"}function ec(e,t){if(e.callee.type!=="Identifier")return!1;if(e.callee.name==="require"){let r=xe(e);return r.length===1&&Z(r[0])||r.length>1}if(e.callee.name==="define"){let r=xe(e);return t.type==="ExpressionStatement"&&(r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&Z(r[0])&&r[1].type==="ArrayExpression")}return!1}function At(e,t,r,n,s,u){let i=tc(e,t,r,n,u),a=u?r(u,{assignmentLayout:i}):"";switch(i){case"break-after-operator":return m([m(n),s,m(E([d,a]))]);case"never-break-after-operator":return m([m(n),s," ",a]);case"fluid":{let o=Symbol("assignment");return m([m(n),s,m(E(d),{id:o}),Be,Et(a,{groupId:o})])}case"break-lhs":return m([n,s," ",m(a)]);case"chain":return[m(n),s,d,a];case"chain-tail":return[m(n),s,E([d,a])];case"chain-tail-arrow-chain":return[m(n),s,a];case"only-left":return n}}function ei(e,t,r){let{node:n}=e;return At(e,t,r,r("left"),[" ",n.operator],"right")}function ti(e,t,r){return At(e,t,r,r("id")," =","init")}function tc(e,t,r,n,s){let{node:u}=e,i=u[s];if(!i)return"only-left";let a=!Gr(i);if(e.match(Gr,ri,c=>!a||c.type!=="ExpressionStatement"&&c.type!=="VariableDeclaration"))return a?i.type==="ArrowFunctionExpression"&&i.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&Gr(i.right)||ve(t.originalText,i))return"break-after-operator";if(i.type==="CallExpression"&&i.callee.name==="require"||t.parser==="json5"||t.parser==="json")return"never-break-after-operator";let D=Zs(n);if(nc(u)||sc(u)||ac(u)||Ds(u)&&D)return"break-lhs";let y=pc(u,n,t);return e.call(()=>rc(e,t,r,y),s)?"break-after-operator":!D&&(y||i.type==="TemplateLiteral"||i.type==="TaggedTemplateExpression"||i.type==="BooleanLiteral"||ke(i)||i.type==="ClassExpression")?"never-break-after-operator":"fluid"}function rc(e,t,r,n){let s=e.node;if(le(s)&&!Jt(s))return!0;switch(s.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries)break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:p}=s;return le(p)&&!Jt(p)}let{consequent:a,alternate:o}=s;return a.type==="ConditionalExpression"||o.type==="ConditionalExpression"}case"ClassExpression":return k(s.decorators)}if(n)return!1;let u=s,i=[];for(;;)if(u.type==="UnaryExpression"||u.type==="AwaitExpression"||u.type==="YieldExpression"&&u.argument!==null)u=u.argument,i.push("argument");else if(u.type==="TSNonNullExpression")u=u.expression,i.push("expression");else break;return!!(Z(u)||e.call(()=>ni(e,t,r),...i))}function nc(e){if(ri(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>{var n;return Ce(r)&&(!r.shorthand||((n=r.value)==null?void 0:n.type)==="AssignmentPattern")})}return!1}function Gr(e){return e.type==="AssignmentExpression"}function ri(e){return Gr(e)||e.type==="VariableDeclarator"}function sc(e){let t=ic(e);if(k(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}var uc=J(["TSTypeAliasDeclaration","TypeAlias"]);function ic(e){var t;if(uc(e))return(t=e.typeParameters)==null?void 0:t.params}function ac(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=Zu(t.typeAnnotation);return k(r)&&r.length>1&&r.some(n=>k(Zu(n))||n.type==="TSConditionalType")}function Ds(e){var t;return e.type==="VariableDeclarator"&&((t=e.init)==null?void 0:t.type)==="ArrowFunctionExpression"}var oc=J(["TSTypeReference","GenericTypeAnnotation"]);function Zu(e){var t;if(oc(e))return(t=e.typeParameters)==null?void 0:t.params}function ni(e,t,r,n=!1){var i;let{node:s}=e,u=()=>ni(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(u,"expression");if(I(s)){if((i=Wr(e,t,r).label)!=null&&i.memberChain)return!1;let o=xe(s);return!(o.length===0||o.length===1&&nr(o[0],t))||cc(s,r)?!1:e.call(u,"callee")}return R(s)?e.call(u,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function pc(e,t,r){if(!Ce(e))return!1;t=wt(t);let n=3;return typeof t=="string"&&rt(t)1)return!0;if(r.length===1){let s=r[0];if(s.type==="TSUnionType"||s.type==="UnionTypeAnnotation"||s.type==="TSIntersectionType"||s.type==="IntersectionTypeAnnotation"||s.type==="TSTypeLiteral"||s.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(K(t(n)))return!0}return!1}function lc(e){var t;return(t=e.typeParameters??e.typeArguments)==null?void 0:t.params}function mt(e,t,r,n,s){let u=e.node,i=V(u),a=s?He(e,r,t):"";if(i.length===0)return[a,"(",j(e,r,{filter:l=>Ve(r.originalText,v(l))===")"}),")"];let{parent:o}=e,p=gt(o),D=ys(u),y=[];if(bu(e,(l,h)=>{let g=h===i.length-1;g&&u.rest&&y.push("..."),y.push(t()),!g&&(y.push(","),p||D?y.push(" "):ye(i[h],r)?y.push(C,C):y.push(d))}),n&&!Dc(e)){if(K(a)||K(y))throw new lt;return m([Ht(a),"(",Ht(y),")"])}let c=i.every(l=>!k(l.decorators));return D&&c?[a,"(",...y,")"]:p?[a,"(",...y,")"]:(Or(o)||Au(o)||o.type==="TypeAlias"||o.type==="UnionTypeAnnotation"||o.type==="TSUnionType"||o.type==="IntersectionTypeAnnotation"||o.type==="FunctionTypeAnnotation"&&o.returnType===u)&&i.length===1&&i[0].name===null&&u.this!==i[0]&&i[0].typeAnnotation&&u.typeParameters===null&&Rt(i[0].typeAnnotation)&&!u.rest?r.arrowParens==="always"?["(",...y,")"]:y:[a,"(",E([F,...y]),B(!Bu(u)&&De(r,"all")?",":""),F,")"]}function ys(e){if(!e)return!1;let t=V(e);if(t.length!==1)return!1;let[r]=t;return!A(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Oe(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Oe(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||re(r.right)&&r.right.properties.length===0||G(r.right)&&r.right.elements.length===0))}function mc(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function Bt(e,t){var s;let r=mc(e);if(!r)return!1;let n=(s=e.typeParameters)==null?void 0:s.params;if(n){if(n.length>1)return!1;if(n.length===1){let u=n[0];if(u.constraint||u.default)return!1}}return V(e).length===1&&(Oe(r)||K(t))}function Dc(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function si(e){let t=V(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}function fs(e){if(Rt(e)||Oe(e))return!0;if(e.type==="UnionTypeAnnotation"||e.type==="TSUnionType"){let t=e.types.filter(s=>s.type==="VoidTypeAnnotation"||s.type==="TSVoidKeyword"||s.type==="NullLiteralTypeAnnotation"||s.type==="TSNullKeyword").length,r=e.types.some(s=>s.type==="ObjectTypeAnnotation"||s.type==="TSTypeLiteral"||s.type==="GenericTypeAnnotation"||s.type==="TSTypeReference"),n=e.types.some(s=>A(s));if(e.types.length-1===t&&r&&!n)return!0}return!1}function ui(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[ee(e),"opaque type ",r("id"),r("typeParameters")];return s.supertype&&u.push(": ",r("supertype")),s.impltype&&u.push(" = ",r("impltype")),u.push(n),u}function Nr(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[ee(e)];u.push("type ",r("id"),r("typeParameters"));let i=s.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[At(e,t,r,u," =",i),n]}function Yr(e,t,r){let n=!1;return m(e.map(({isFirst:s,previous:u,node:i,index:a})=>{let o=r();if(s)return o;let p=Oe(i),D=Oe(u);return D&&p?[" & ",n?E(o):o]:!D&&!p?E([" &",d,o]):(a>1&&(n=!0),[" & ",a>1?E(o):o])},"types"))}function Xr(e,t,r){let{node:n}=e,{parent:s}=e,u=s.type!=="TypeParameterInstantiation"&&(s.type!=="TSConditionalType"||!t.experimentalTernaries)&&(s.type!=="ConditionalTypeAnnotation"||!t.experimentalTernaries)&&s.type!=="TSTypeParameterInstantiation"&&s.type!=="GenericTypeAnnotation"&&s.type!=="TSTypeReference"&&s.type!=="TSTypeAssertion"&&s.type!=="TupleTypeAnnotation"&&s.type!=="TSTupleType"&&!(s.type==="FunctionTypeParam"&&!s.name&&e.grandparent.this!==s)&&!((s.type==="TypeAlias"||s.type==="VariableDeclarator"||s.type==="TSTypeAliasDeclaration")&&ve(t.originalText,n)),i=fs(n),a=e.map(D=>{let y=r();return i||(y=Fe(2,y)),pe(D,y,t)},"types");if(i)return b(" | ",a);let o=u&&!ve(t.originalText,n),p=[B([o?d:"","| "]),b([d,"| "],a)];return ge(e,t)?m([E(p),F]):(s.type==="TupleTypeAnnotation"||s.type==="TSTupleType")&&s[s.type==="TupleTypeAnnotation"&&s.types?"types":"elementTypes"].length>1?m([E([B(["(",F]),p]),F,B(")")]):m(u?E(p):p)}function yc(e){var n;let{node:t,parent:r}=e;return t.type==="FunctionTypeAnnotation"&&(Or(r)||!((r.type==="ObjectTypeProperty"||r.type==="ObjectTypeInternalSlot")&&!r.variance&&!r.optional&&Ft(r,t)||r.type==="ObjectTypeCallProperty"||((n=e.getParentNode(2))==null?void 0:n.type)==="DeclareFunction"))}function $r(e,t,r){let{node:n}=e,s=[Ut(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&s.push("new ");let u=mt(e,r,t,!1,!0),i=[];return n.type==="FunctionTypeAnnotation"?i.push(yc(e)?" => ":": ",r("returnType")):i.push(X(e,r,n.returnType?"returnType":"typeAnnotation")),Bt(n,i)&&(u=m(u)),s.push(u,i),m(s)}function Vr(e,t,r){return[r("objectType"),$(e),"[",r("indexType"),"]"]}function Hr(e,t,r){return["infer ",r("typeParameter")]}function Es(e,t,r){let{node:n}=e;return[n.postfix?"":r,X(e,t),n.postfix?r:""]}function Kr(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function zr(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var fc=new WeakSet;function X(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let s=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let u=e.call(ii,r);(u==="=>"||u===":"&&A(n,x.Leading))&&(s=!0),fc.add(n)}return s?[" ",t(r)]:t(r)}var ii=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function Qr(e,t,r){let n=ii(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function Zr(e){return[e("elementType"),"[]"]}function en({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument",n=e.type==="TSTypeQuery"?"typeParameters":"typeArguments";return["typeof ",t(r),t(n)]}function tn(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",X(e,t)]:""]}function $(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":I(t)||R(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function rn(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var Ec=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function ee(e){let{node:t}=e;return t.declare||Ec.has(t.type)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var Fc=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Ut({node:e}){return e.abstract||Fc.has(e.type)?"abstract ":""}function He(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function Ur(e,t,r){return["::",r("callee")]}function Dt(e,t,r){return e.type==="EmptyStatement"?";":e.type==="BlockStatement"||r?[" ",t]:E([d,t])}function nn(e,t){return["...",t("argument"),X(e,t)]}function Wt(e){return e.accessibility?e.accessibility+" ":""}function Fs(e,t,r){let{node:n}=e;return m([b(d,e.map(r,"decorators")),pi(n,t)?C:d])}function ai(e,t,r){return ci(e.node)?[b(C,e.map(r,"declaration","decorators")),C]:""}function oi(e,t,r){let{node:n,parent:s}=e,{decorators:u}=n;if(!k(u)||ci(s)||Jr(e))return"";let i=n.type==="ClassExpression"||n.type==="ClassDeclaration"||pi(n,t);return[e.key==="declaration"&&Fu(s)?C:i?ce:"",b(d,e.map(r,"decorators")),d]}function pi(e,t){return e.decorators.some(r=>z(t.originalText,v(r)))}function ci(e){var r;if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let t=(r=e.declaration)==null?void 0:r.decorators;return k(t)&&Ft(e,t[0])}function li(e,t,r){let{node:n}=e;return["import",n.module?" module":"",n.phase?` ${n.phase}`:"",As(n),yi(e,t,r),Di(e,t,r),Ei(e,t,r),t.semi?";":""]}var mi=e=>e.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function sn(e,t,r){let{node:n}=e,s=[ai(e,t,r),ee(e),"export",mi(n)?" default":""],{declaration:u,exported:i}=n;return A(n,x.Dangling)&&(s.push(" ",j(e,t)),_r(n)&&s.push(C)),u?s.push(" ",r("declaration")):(s.push(dc(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(s.push(" *"),i&&s.push(" as ",r("exported"))):s.push(yi(e,t,r)),s.push(Di(e,t,r),Ei(e,t,r))),s.push(Ac(n,t)),s}var Cc=J(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function Ac(e,t){return t.semi&&(!e.declaration||mi(e)&&!Cc(e.declaration))?";":""}function Cs(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function As(e,t){return Cs(e.importKind,t)}function dc(e){return Cs(e.exportKind)}function Di(e,t,r){let{node:n}=e;if(!n.source)return"";let s=[];return fi(n,t)||s.push(" from"),s.push(" ",r("source")),s}function yi(e,t,r){let{node:n}=e;if(fi(n,t))return"";let s=[" "];if(k(n.specifiers)){let u=[],i=[];e.each(()=>{let a=e.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")u.push(r());else if(a==="ExportSpecifier"||a==="ImportSpecifier")i.push(r());else throw new _e(n,"specifier")},"specifiers"),s.push(b(", ",u)),i.length>0&&(u.length>0&&s.push(", "),i.length>1||u.length>0||n.specifiers.some(o=>A(o))?s.push(m(["{",E([t.bracketSpacing?d:F,b([",",d],i)]),B(De(t)?",":""),t.bracketSpacing?d:F,"}"])):s.push(["{",t.bracketSpacing?" ":"",...i,t.bracketSpacing?" ":"","}"]))}else s.push("{}");return s}function fi(e,t){let{type:r,importKind:n,source:s,specifiers:u}=e;return r!=="ImportDeclaration"||k(u)||n==="type"?!1:!/{\s*}/.test(t.originalText.slice(U(e),U(s)))}function Ei(e,t,r){var i;let{node:n}=e,s=k(n.attributes)?"attributes":k(n.assertions)?"assertions":void 0;return s?[` ${s==="assertions"||(i=n.extra)!=null&&i.deprecatedAssertSyntax?"assert":"with"} {`,t.bracketSpacing?" ":"",b(", ",e.map(r,s)),t.bracketSpacing?" ":"","}"]:""}function Fi(e,t,r){let{node:n}=e,{type:s}=n,u=s.startsWith("Import"),i=u?"imported":"local",a=u?"local":"exported",o=n[i],p=n[a],D="",y="";return s==="ExportNamespaceSpecifier"||s==="ImportNamespaceSpecifier"?D="*":o&&(D=r(i)),p&&!Tc(n)&&(y=r(a)),[Cs(s==="ImportSpecifier"?n.importKind:n.exportKind,!1),D,D&&y?" as ":"",y]}function Tc(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;if(t.type!==r.type||!pu(t,r))return!1;if(Z(t))return t.value===r.value&&me(t)===me(r);switch(t.type){case"Identifier":return t.name===r.name;default:return!1}}function xc(e){let t=[e];for(let r=0;rc[Y]===n),l=c.type===n.type&&!f,h,g,S=0;do g=h||n,h=e.getParentNode(S),S++;while(h&&h.type===n.type&&a.every(Y=>h[Y]!==g));let P=h||c,O=g;if(s&&(N(n[a[0]])||N(o)||N(p)||xc(O))){y=!0,l=!0;let Y=se=>[B("("),E([F,se]),F,B(")")],de=se=>se.type==="NullLiteral"||se.type==="Literal"&&se.value===null||se.type==="Identifier"&&se.name==="undefined";D.push(" ? ",de(o)?r(u):Y(r(u))," : ",p.type===n.type||de(p)?r(i):Y(r(i)))}else{let Y=[d,"? ",o.type===n.type?B("","("):"",Fe(2,r(u)),o.type===n.type?B("",")"):"",d,": ",Fe(2,r(i))];D.push(c.type!==n.type||c[i]===n||f?Y:t.useTabs?Tr(E(Y)):Fe(Math.max(0,t.tabWidth-2),Y))}let M=[u,i,...a].some(Y=>A(n[Y],de=>Q(de)&&Ie(t.originalText,U(de),v(de)))),_=Y=>c===P?m(Y,{shouldBreak:M}):M?[Y,ce]:Y,T=!y&&(R(c)||c.type==="NGPipeExpression"&&c.left===n)&&!c.computed,q=Sc(e),fe=_([gc(e,t,r),l?D:E(D),s&&T&&!q?F:""]);return f||q?m([E([F,fe]),F]):fe}function Bc(e,t){return(R(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function bc(e,t,r,n){return[...e.map(u=>ot(u)),ot(t),ot(r)].flat().some(u=>Q(u)&&Ie(n.originalText,U(u),v(u)))}var Pc=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"]]);function kc(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let s=0;!r;s++){let u=e.getParentNode(s);if(u.type==="ChainExpression"&&u.expression===n||I(u)&&u.callee===n||R(u)&&u.object===n||u.type==="TSNonNullExpression"&&u.expression===n){n=u;continue}u.type==="NewExpression"&&u.callee===n||Ae(u)&&u.expression===n?(r=e.getParentNode(s+1),n=u):r=u}return n===t?!1:r[Pc.get(r.type)]===n}var ds=e=>[B("("),E([F,e]),F,B(")")];function Gt(e,t,r,n){if(!t.experimentalTernaries)return Ci(e,t,r);let{node:s}=e,u=s.type==="ConditionalExpression",i=s.type==="TSConditionalType"||s.type==="ConditionalTypeAnnotation",a=u?"consequent":"trueType",o=u?"alternate":"falseType",p=u?["test"]:["checkType","extendsType"],D=s[a],y=s[o],c=p.map(Me=>s[Me]),{parent:f}=e,l=f.type===s.type,h=l&&p.some(Me=>f[Me]===s),g=l&&f[o]===s,S=D.type===s.type,P=y.type===s.type,O=P||g,M=t.tabWidth>2||t.useTabs,_,T,q=0;do T=_||s,_=e.getParentNode(q),q++;while(_&&_.type===s.type&&p.every(Me=>_[Me]!==T));let fe=_||f,Y=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),de=(f.type==="ReturnStatement"||f.type==="ThrowStatement")&&!(S||P),se=u&&fe.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",It=kc(e),Xt=Bc(s,f),L=i&&ge(e,t),W=M?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",te=bc(c,D,y,t)||S||P,st=!O&&!l&&!i&&(se?D.type==="NullLiteral"||D.type==="Literal"&&D.value===null:nr(D,t)&&Yn(s.test,3)),xt=O||g||i&&!l||l&&u&&Yn(s.test,1)||st,Rs=[];!S&&A(D,x.Dangling)&&e.call(Me=>{Rs.push(j(Me,t),C)},"consequent");let $t=[];A(s.test,x.Dangling)&&e.call(Me=>{$t.push(j(Me,t))},"test"),!P&&A(y,x.Dangling)&&e.call(Me=>{$t.push(j(Me,t))},"alternate"),A(s,x.Dangling)&&$t.push(j(e,t));let Js=Symbol("test"),Pa=Symbol("consequent"),Er=Symbol("test-and-consequent"),ka=u?[ds(r("test")),s.test.type==="ConditionalExpression"?ce:""]:[r("checkType")," ","extends"," ",s.extendsType.type==="TSConditionalType"||s.extendsType.type==="ConditionalTypeAnnotation"||s.extendsType.type==="TSMappedType"?r("extendsType"):m(ds(r("extendsType")))],qs=m([ka," ?"],{id:Js}),Ia=r(a),Fr=E([S||se&&(N(D)||l||O)?C:d,Rs,Ia]),La=xt?m([qs,O?Fr:B(Fr,m(Fr,{id:Pa}),{groupId:Js})],{id:Er}):[qs,Fr],Pn=r(o),Us=st?B(Pn,Tr(ds(Pn)),{groupId:Er}):Pn,Vt=[La,$t.length>0?[E([C,$t]),C]:P?C:st?B(d," ",{groupId:Er}):d,":",P?" ":M?xt?B(W,B(O||st?" ":W," "),{groupId:Er}):B(W," "):" ",P?Us:m([E(Us),se&&!st?F:""]),Xt&&!It?F:"",te?ce:""];return Y&&!te?m(E([F,m(Vt)])):Y||de?m(E(Vt)):It||i&&h?m([E([F,Vt]),L?F:""]):f===fe?m(Vt):Vt}function Ic(e,t,r=0){let n=0;for(let s=r;s0}var L=so;var gr="'",su='"';function uo(e,t){let r=t===!0||t===gr?gr:su,n=r===gr?su:gr,s=0,u=0;for(let i of e)i===r?s++:i===n&&u++;return s>u?n:r}var hr=uo;function io(e,t,r){let n=t==='"'?"'":'"',u=H(!1,e,/\\(.)|(["'])/gs,(i,a,o)=>a===n?a:o===t?"\\"+o:o||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return t+u+t}var uu=io;function ao(e,t){let r=e.slice(1,-1),n=t.parser==="json"||t.parser==="jsonc"||t.parser==="json5"&&t.quoteProps==="preserve"&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":hr(r,t.singleQuote);return uu(r,n,!(t.parser==="css"||t.parser==="less"||t.parser==="scss"||t.__embeddedInHtml))}var at=ao;function j(e){var n,s,u;let t=((n=e.range)==null?void 0:n[0])??e.start,r=(u=((s=e.declaration)==null?void 0:s.decorators)??e.decorators)==null?void 0:u[0];return r?Math.min(j(r),t):t}function I(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function gt(e,t){let r=j(e);return Number.isInteger(r)&&r===j(t)}function oo(e,t){let r=I(e);return Number.isInteger(r)&&r===I(t)}function iu(e,t){return gt(e,t)&&oo(e,t)}var Qt=null;function Zt(e){if(Qt!==null&&typeof Qt.property){let t=Qt;return Qt=Zt.prototype=null,t}return Qt=Zt.prototype=e??Object.create(null),new Zt}var po=10;for(let e=0;e<=po;e++)Zt();function vn(e){return Zt(e)}function co(e,t="type"){vn(e);function r(n){let s=n[t],u=e[s];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return u}return r}var Sr=co;var au={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var lo=Sr(au),Br=lo;function mo(e){let t=new Set(e);return r=>t.has(r==null?void 0:r.type)}var M=mo;var Do=M(["Block","CommentBlock","MultiLine"]),ee=Do;var yo=M(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),br=yo;function fo(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let s=r[n];if(n===0)return e.type==="Identifier"&&e.name===s;if(e.type!=="MemberExpression"||e.optional||e.computed||e.property.type!=="Identifier"||e.property.name!==s)return!1;e=e.object}}function Eo(e,t){return t.some(r=>fo(e,r))}var ou=Eo;function Fo({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Pr=Fo;function tr(e,t){return t(e)||zs(e,{getVisitorKeys:Br,predicate:t})}function jt(e){return e.type==="AssignmentExpression"||e.type==="BinaryExpression"||e.type==="LogicalExpression"||e.type==="NGPipeExpression"||e.type==="ConditionalExpression"||w(e)||q(e)||e.type==="SequenceExpression"||e.type==="TaggedTemplateExpression"||e.type==="BindExpression"||e.type==="UpdateExpression"&&!e.prefix||Ae(e)||e.type==="TSNonNullExpression"||e.type==="ChainExpression"}function lu(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Ir(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var Rt=M(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),mu=M(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),G=M(["ArrayExpression","TupleExpression"]),se=M(["ObjectExpression","RecordExpression"]);function Pe(e){return e.type==="NumericLiteral"||e.type==="Literal"&&typeof e.value=="number"}function qn(e){return e.type==="UnaryExpression"&&(e.operator==="+"||e.operator==="-")&&Pe(e.argument)}function te(e){return e.type==="StringLiteral"||e.type==="Literal"&&typeof e.value=="string"}function Wn(e){return e.type==="RegExpLiteral"||e.type==="Literal"&&!!e.regex}var rr=M(["Literal","BooleanLiteral","BigIntLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),Du=M(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier","Import"]),Le=M(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),Mt=M(["FunctionExpression","ArrowFunctionExpression"]);function Co(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function _n(e){return w(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var U=M(["JSXElement","JSXFragment"]);function ht(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}function Lr(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function yu(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!gt(e,e.typeAnnotation)}var me=M(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Et(e){return q(e)||e.type==="BindExpression"&&!!e.object}var Ao=M(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function Jt(e){return Pr(e)||br(e)||Ao(e)||(e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference")&&!e.typeParameters}function To(e){let t=/^(?:before|after)(?:Each|All)$/;return e.callee.type==="Identifier"&&e.arguments.length===1&&t.test(e.callee.name)}var xo=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function go(e){return ou(e,xo)}function St(e,t){if(e.type!=="CallExpression")return!1;if(e.arguments.length===1){if(_n(e)&&t&&St(t))return Mt(e.arguments[0]);if(To(e))return _n(e.arguments[0])}else if((e.arguments.length===2||e.arguments.length===3)&&(e.arguments[0].type==="TemplateLiteral"||te(e.arguments[0]))&&go(e.callee))return e.arguments[2]&&!Pe(e.arguments[2])?!1:(e.arguments.length===2?Mt(e.arguments[1]):Co(e.arguments[1])&&$(e.arguments[1]).length<=1)||_n(e.arguments[1]);return!1}var fu=e=>t=>((t==null?void 0:t.type)==="ChainExpression"&&(t=t.expression),e(t)),w=fu(M(["CallExpression","OptionalCallExpression"])),q=fu(M(["MemberExpression","OptionalMemberExpression"]));function Eu(e){let t="expressions";e.type==="TSTemplateLiteralType"&&(t="types");let r=e[t];return r.length===0?!1:r.every(n=>{if(Rn(n)||Fu(n))return!0})}function Fu(e,{maxDepth:t=Number.POSITIVE_INFINITY}={}){if(A(e))return!1;if(e.type==="ChainExpression")return Fu(e.expression,{maxDepth:t});if(!q(e))return!1;let r=e,n=0;for(;q(r)&&n++<=t;)if(!Rn(r.property)||(r=r.object,A(r)))return!1;return Rn(r)}function Rn(e){return A(e)?!1:rr(e)||Du(e)}function Nn(e,t=5){return Cu(e,t)<=t}function Cu(e,t){let r=0;for(let n in e){let s=e[n];if(s&&typeof s=="object"&&typeof s.type=="string"&&(r++,r+=Cu(s,t-r)),r>t)return r}return r}var ho=.25;function nr(e,t){let{printWidth:r}=t;if(A(e))return!1;let n=r*ho;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||qn(e)&&!A(e.argument))return!0;let s=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return s?s.length<=n:te(e)?at(De(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(` +`):e.type==="UnaryExpression"?nr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:rr(e)}function we(e,t){return U(t)?Bt(t):A(t,x.Leading,r=>Z(e,I(r)))}function Gn(e,t){return t.parser!=="json"&&t.parser!=="jsonc"&&te(e.key)&&De(e.key).slice(1,-1)===e.key.value&&(Hs(e.key.value)&&!(t.parser==="babel-ts"&&e.type==="ClassProperty"||t.parser==="typescript"&&e.type==="PropertyDefinition")||Un(e.key.value)&&String(Number(e.key.value))===e.key.value&&(t.parser==="babel"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree"))}function Un(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function pu(e){return e.quasis.some(t=>t.value.raw.includes(` +`))}function wr(e,t){return(e.type==="TemplateLiteral"&&pu(e)||e.type==="TaggedTemplateExpression"&&pu(e.quasi))&&!Z(t,j(e),{backwards:!0})}function Or(e){if(!A(e))return!1;let t=v(!1,ot(e,x.Dangling),-1);return t&&!ee(t)}function Au(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(Mt(r)){if(t+=1,t>1)return!0}else if(w(r)){for(let n of ae(r))if(Mt(n))return!0}return!1}function vr(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&w(t)&&w(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var So=new Set(["!","-","+","~"]);function be(e,t=2){if(t<=0)return!1;if(e.type==="ChainExpression"||e.type==="TSNonNullExpression")return be(e.expression,t);let r=n=>be(n,t-1);if(Wn(e))return Ze(e.pattern??e.regex.pattern)<=5;if(rr(e)||Du(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(` +`))&&e.expressions.every(r);if(se(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(G(e))return e.elements.every(n=>n===null||r(n));if(pt(e)){if(e.type==="ImportExpression"||be(e.callee,t)){let n=ae(e);return n.length<=t&&n.every(r)}return!1}return q(e)?be(e.object,t)&&be(e.property,t):e.type==="UnaryExpression"&&So.has(e.operator)||e.type==="UpdateExpression"?be(e.argument,t):!1}function De(e){var t;return((t=e.extra)==null?void 0:t.raw)??e.raw}function du(e){return e}function ye(e,t="es5"){return e.trailingComma==="es5"&&t==="es5"||e.trailingComma==="all"&&(t==="all"||t==="es5")}function ie(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ie(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return ie(e.object,t);case"TaggedTemplateExpression":return e.tag.type==="FunctionExpression"?!1:ie(e.tag,t);case"CallExpression":case"OptionalCallExpression":return e.callee.type==="FunctionExpression"?!1:ie(e.callee,t);case"ConditionalExpression":return ie(e.test,t);case"UpdateExpression":return!e.prefix&&ie(e.argument,t);case"BindExpression":return e.object&&ie(e.object,t);case"SequenceExpression":return ie(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ie(e.expression,t);default:return t(e)}}var cu={"==":!0,"!=":!0,"===":!0,"!==":!0},kr={"*":!0,"/":!0,"%":!0},Jn={">>":!0,">>>":!0,"<<":!0};function sr(e,t){return!(er(t)!==er(e)||e==="**"||cu[e]&&cu[t]||t==="%"&&kr[e]||e==="%"&&kr[t]||t!==e&&kr[t]&&kr[e]||Jn[e]&&Jn[t])}var Bo=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((e,t)=>e.map(r=>[r,t])));function er(e){return Bo.get(e)}function Tu(e){return!!Jn[e]||e==="|"||e==="^"||e==="&"}function xu(e){var r;if(e.rest)return!0;let t=$(e);return((r=v(!1,t,-1))==null?void 0:r.type)==="RestElement"}var Mn=new WeakMap;function $(e){if(Mn.has(e))return Mn.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),Mn.set(e,t),t}function gu(e,t){let{node:r}=e,n=0,s=u=>t(u,n++);r.this&&e.call(s,"this"),Array.isArray(r.parameters)?e.each(s,"parameters"):Array.isArray(r.params)&&e.each(s,"params"),r.rest&&e.call(s,"rest")}var jn=new WeakMap;function ae(e){if(jn.has(e))return jn.get(e);if(e.type==="ChainExpression")return ae(e.expression);let t=e.arguments;return e.type==="ImportExpression"&&(t=[e.source],e.attributes&&t.push(e.attributes),e.options&&t.push(e.options)),jn.set(e,t),t}function ur(e,t){let{node:r}=e;if(r.type==="ChainExpression")return e.call(()=>ur(e,t),"expression");r.type==="ImportExpression"?(e.call(n=>t(n,0),"source"),r.attributes&&e.call(n=>t(n,1),"attributes"),r.options&&e.call(n=>t(n,1),"options")):e.each(t,"arguments")}function Yn(e,t){let r=[];if(e.type==="ChainExpression"&&r.push("expression"),e.type==="ImportExpression"){if(t===0||t===(e.attributes||e.options?-2:-1))return[...r,"source"];if(e.attributes&&(t===1||t===-1))return[...r,"attributes"];if(e.options&&(t===1||t===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return[...r,"arguments",t]}function ir(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}function Bt(e){return(e==null?void 0:e.prettierIgnore)||A(e,x.PrettierIgnore)}var x={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},hu=(e,t)=>{if(typeof e=="function"&&(t=e,e=0),e||t)return(r,n,s)=>!(e&x.Leading&&!r.leading||e&x.Trailing&&!r.trailing||e&x.Dangling&&(r.leading||r.trailing)||e&x.Block&&!ee(r)||e&x.Line&&!Rt(r)||e&x.First&&n!==0||e&x.Last&&n!==s.length-1||e&x.PrettierIgnore&&!ir(r)||t&&!t(r))};function A(e,t,r){if(!L(e==null?void 0:e.comments))return!1;let n=hu(t,r);return n?e.comments.some(n):!0}function ot(e,t,r){if(!Array.isArray(e==null?void 0:e.comments))return[];let n=hu(t,r);return n?e.comments.filter(n):e.comments}var fe=(e,{originalText:t})=>_t(t,I(e));function pt(e){return w(e)||e.type==="NewExpression"||e.type==="ImportExpression"}function Ce(e){return e&&(e.type==="ObjectProperty"||e.type==="Property"&&!ht(e))}var Ae=M(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),We=M(["UnionTypeAnnotation","TSUnionType"]),_r=M(["IntersectionTypeAnnotation","TSIntersectionType"]);var bo=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),qt=e=>{for(let t of e.quasis)delete t.value};function Su(e,t,r){var s,u;if(e.type==="Program"&&delete t.sourceType,(e.type==="BigIntLiteral"||e.type==="BigIntLiteralTypeAnnotation")&&t.value&&(t.value=t.value.toLowerCase()),(e.type==="BigIntLiteral"||e.type==="Literal")&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),e.type==="DecimalLiteral"&&(t.value=Number(t.value)),e.type==="Literal"&&t.decimal&&(t.decimal=Number(t.decimal)),e.type==="EmptyStatement"||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if((e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty")&&typeof e.key=="object"&&e.key&&(e.key.type==="Literal"||e.key.type==="NumericLiteral"||e.key.type==="StringLiteral"||e.key.type==="Identifier")&&delete t.key,e.type==="JSXElement"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(i=>i.type==="JSXAttribute"&&i.name.name==="jsx"))for(let{type:i,expression:a}of t.children)i==="JSXExpressionContainer"&&a.type==="TemplateLiteral"&&qt(a);e.type==="JSXAttribute"&&e.name.name==="css"&&e.value.type==="JSXExpressionContainer"&&e.value.expression.type==="TemplateLiteral"&&qt(t.value.expression),e.type==="JSXAttribute"&&((s=e.value)==null?void 0:s.type)==="Literal"&&/["']|"|'/.test(e.value.value)&&(t.value.value=H(!1,t.value.value,/["']|"|'/g,'"'));let n=e.expression||e.callee;if(e.type==="Decorator"&&n.type==="CallExpression"&&n.callee.name==="Component"&&n.arguments.length===1){let i=e.expression.arguments[0].properties;for(let[a,o]of t.expression.arguments[0].properties.entries())switch(i[a].key.name){case"styles":G(o.value)&&qt(o.value.elements[0]);break;case"template":o.value.type==="TemplateLiteral"&&qt(o.value);break}}if(e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"||e.tag.name==="css"||e.tag.name==="md"||e.tag.name==="markdown"||e.tag.name==="html")||e.tag.type==="CallExpression")&&qt(t.quasi),e.type==="TemplateLiteral"&&((u=e.leadingComments)!=null&&u.some(a=>ee(a)&&["GraphQL","HTML"].some(o=>a.value===` ${o} `))||r.type==="CallExpression"&&r.callee.name==="graphql"||!e.leadingComments)&&qt(t),(e.type==="TSIntersectionType"||e.type==="TSUnionType")&&e.types.length===1)return t.types[0];e.type==="ChainExpression"&&e.expression.type==="TSNonNullExpression"&&([t.type,t.expression.type]=[t.expression.type,t.type])}Su.ignoredProperties=bo;var Bu=Su;var et="string",Ne="array",tt="cursor",Ge="indent",Ue="align",rt="trim",pe="group",de="fill",xe="if-break",Ye="indent-if-break",Xe="line-suffix",Ve="line-suffix-boundary",ce="line",Oe="label",ve="break-parent",Mr=new Set([tt,Ge,Ue,rt,pe,de,xe,Ye,Xe,Ve,ce,Oe,ve]);function Po(e){if(typeof e=="string")return et;if(Array.isArray(e))return Ne;if(!e)return;let{type:t}=e;if(Mr.has(t))return t}var nt=Po;var ko=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Io(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(nt(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ko([...Mr].map(s=>`'${s}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var Xn=class extends Error{name="InvalidDocError";constructor(t){super(Io(t)),this.doc=t}},Ft=Xn;var bu={};function Lo(e,t,r,n){let s=[e];for(;s.length>0;){let u=s.pop();if(u===bu){r(s.pop());continue}r&&s.push(u,bu);let i=nt(u);if(!i)throw new Ft(u);if((t==null?void 0:t(u))!==!1)switch(i){case Ne:case de:{let a=i===Ne?u:u.parts;for(let o=a.length,p=o-1;p>=0;--p)s.push(a[p]);break}case xe:s.push(u.flatContents,u.breakContents);break;case pe:if(n&&u.expandedStates)for(let a=u.expandedStates.length,o=a-1;o>=0;--o)s.push(u.expandedStates[o]);else s.push(u.contents);break;case Ue:case Ge:case Ye:case Oe:case Xe:s.push(u.contents);break;case et:case tt:case rt:case Ve:case ce:case ve:break;default:throw new Ft(u)}}}var Vn=Lo;var Pu=()=>{},$e=Pu,jr=Pu;function E(e){return $e(e),{type:Ge,contents:e}}function ge(e,t){return $e(t),{type:Ue,contents:t,n:e}}function D(e,t={}){return $e(e),jr(t.expandedStates,!0),{type:pe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function ku(e){return ge(Number.NEGATIVE_INFINITY,e)}function Rr(e){return ge(-1,e)}function He(e,t){return D(e[0],{...t,expandedStates:e})}function Wt(e){return jr(e),{type:de,parts:e}}function b(e,t="",r={}){return $e(e),t!==""&&$e(t),{type:xe,breakContents:e,flatContents:t,groupId:r.groupId}}function Ct(e,t){return $e(e),{type:Ye,contents:e,groupId:t.groupId,negate:t.negate}}function $n(e){return $e(e),{type:Xe,contents:e}}var ke={type:Ve},Ee={type:ve};var Hn={type:ce,hard:!0},wo={type:ce,hard:!0,literal:!0},d={type:ce},F={type:ce,soft:!0},C=[Hn,Ee],Jr=[wo,Ee],Kn={type:tt};function P(e,t){$e(e),jr(t);let r=[];for(let n=0;n0){for(let s=0;s{if(Array.isArray(e))return e;if(e.type!==de)throw new Error(`Expect doc to be 'array' or '${de}'.`);return e.parts};function ct(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=s(u);return r.set(u,i),i}function s(u){switch(nt(u)){case Ne:return t(u.map(n));case de:return t({...u,parts:u.parts.map(n)});case xe:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case pe:{let{expandedStates:i,contents:a}=u;return i?(i=i.map(n),a=i[0]):a=n(a),t({...u,contents:a,expandedStates:i})}case Ue:case Ge:case Ye:case Oe:case Xe:return t({...u,contents:n(u.contents)});case et:case tt:case rt:case Ve:case ce:case ve:return t(u);default:throw new Ft(u)}}}function wu(e,t,r){let n=r,s=!1;function u(i){if(s)return!1;let a=t(i);a!==void 0&&(s=!0,n=a)}return Vn(e,u),n}function Oo(e){if(e.type===pe&&e.break||e.type===ce&&e.hard||e.type===ve)return!0}function re(e){return wu(e,Oo,!1)}function Lu(e){if(e.length>0){let t=v(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Ou(e){let t=new Set,r=[];function n(u){if(u.type===ve&&Lu(r),u.type===pe){if(r.push(u),t.has(u))return!1;t.add(u)}}function s(u){u.type===pe&&r.pop().break&&Lu(r)}Vn(e,n,s,!0)}function vo(e){return e.type===ce&&!e.hard?e.soft?"":" ":e.type===xe?e.flatContents:e}function ar(e){return ct(e,vo)}function _o(e){switch(nt(e)){case de:if(e.parts.every(t=>t===""))return"";break;case pe:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===pe&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Ue:case Ge:case Ye:case Xe:if(!e.contents)return"";break;case xe:if(!e.flatContents&&!e.breakContents)return"";break;case Ne:{let t=[];for(let r of e){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof v(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...s)}return t.length===0?"":t.length===1?t[0]:t}case et:case tt:case rt:case Ve:case ce:case Oe:case ve:break;default:throw new Ft(e)}return e}function Nt(e){return ct(e,t=>_o(t))}function Ie(e,t=Jr){return ct(e,r=>typeof r=="string"?P(t,r.split(` +`)):r)}function Mo(e){if(e.type===ce)return!0}function vu(e){return wu(e,Mo,!1)}function or(e,t){return e.type===Oe?{...e,contents:t(e.contents)}:t(e)}function jo(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var _u=jo;function Mu(e,t){let r=e.node;if(Rt(r))return t.originalText.slice(j(r),I(r)).trimEnd();if(ee(r))return _u(r)?Ro(r):["/*",Ie(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Ro(e){let t=e.value.split(` +`);return["/*",P(C,t.map((r,n)=>n===0?r.trimEnd():" "+(nYo,ownLine:()=>Uo,remaining:()=>Xo});function Jo(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function zn(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Jo(e)}function oe(e,t){t.leading=!0,t.trailing=!1,zn(e,t)}function he(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),zn(e,t)}function K(e,t){t.leading=!1,t.trailing=!0,zn(e,t)}function qo(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Je(e,n),n=Ot(e,n),n=vt(e,n),n=qe(e,n);return n}var lt=qo;function Wo(e,t){let r=lt(e,t);return r===!1?"":e.charAt(r)}var Ke=Wo;function No(e,t,r){for(let n=t;nt(e))}function Yo(e){return[Vo,Nu,Ju,Uu,Zn,es,Ru,qu,Gu,np,up,rs,cp,ts,Dp,yp].some(t=>t(e))}function Xo(e){return[Yu,Zn,es,Ko,rp,Wu,rs,tp,ep,mp,ts,lp].some(t=>t(e))}function bt(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?oe(r,t):he(e,t)}function Qn(e,t){e.type==="BlockStatement"?bt(e,t):oe(e,t)}function Vo({comment:e,followingNode:t}){return t&&ju(e)?(oe(t,e),!0):!1}function Zn({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){if((r==null?void 0:r.type)!=="IfStatement"||!n)return!1;if(Ke(s,I(e))===")")return K(t,e),!0;if(t===r.consequent&&n===r.alternate){if(t.type==="BlockStatement")K(t,e);else{let i=Rt(e)||e.loc.start.line===e.loc.end.line,a=e.loc.start.line===t.loc.start.line;i&&a?K(t,e):he(r,e)}return!0}return n.type==="BlockStatement"?(bt(n,e),!0):n.type==="IfStatement"?(Qn(n.consequent,e),!0):r.consequent===n?(oe(n,e),!0):!1}function es({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(r==null?void 0:r.type)!=="WhileStatement"||!n?!1:Ke(s,I(e))===")"?(K(t,e),!0):n.type==="BlockStatement"?(bt(n,e),!0):r.body===n?(oe(n,e),!0):!1}function Ru({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TryStatement"&&(r==null?void 0:r.type)!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(K(t,e),!0):n.type==="BlockStatement"?(bt(n,e),!0):n.type==="TryStatement"?(Qn(n.finalizer,e),!0):n.type==="CatchClause"?(Qn(n.body,e),!0):!1}function $o({comment:e,enclosingNode:t,followingNode:r}){return q(t)&&(r==null?void 0:r.type)==="Identifier"?(oe(t,e),!0):!1}function Ho({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!((t==null?void 0:t.type)==="ConditionalExpression"||(t==null?void 0:t.type)==="ConditionalTypeAnnotation"||(t==null?void 0:t.type)==="TSConditionalType")?!1:(r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType"?(he(t,e),!0):!1}function Ju({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s,options:u}){let i=t&&!Te(s,I(t),j(e));return(!t||!i)&&((r==null?void 0:r.type)==="ConditionalExpression"||(r==null?void 0:r.type)==="ConditionalTypeAnnotation"||(r==null?void 0:r.type)==="TSConditionalType")&&n?u.experimentalTernaries&&r.alternate===n&&!(ee(e)&&!Te(u.originalText,j(e),I(e)))?(he(r,e),!0):(oe(n,e),!0):!1}function Ko({comment:e,precedingNode:t,enclosingNode:r}){return Ce(r)&&r.shorthand&&r.key===t&&r.value.type==="AssignmentPattern"?(K(r.value.left,e),!0):!1}var zo=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function qu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(zo.has(r==null?void 0:r.type)){if(L(r.decorators)&&(n==null?void 0:n.type)!=="Decorator")return K(v(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return bt(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return K(t,e),!0;for(let s of["implements","extends","mixins"])if(r[s]&&n===r[s][0])return t&&(t===r.id||t===r.typeParameters||t===r.superClass)?K(t,e):he(r,e,s),!0}}return!1}var Qo=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Wu({comment:e,precedingNode:t,enclosingNode:r,text:n}){return r&&t&&Ke(n,I(e))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&t.type==="Identifier"&&r.key===t&&Ke(n,I(t))!==":"?(K(t,e),!0):(t==null?void 0:t.type)==="Decorator"&&Qo.has(r==null?void 0:r.type)?(K(t,e),!0):!1}var Zo=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function ep({comment:e,precedingNode:t,enclosingNode:r,text:n}){return Ke(n,I(e))!=="("?!1:t&&Zo.has(r==null?void 0:r.type)?(K(t,e),!0):!1}function tp({comment:e,enclosingNode:t,text:r}){if((t==null?void 0:t.type)!=="ArrowFunctionExpression")return!1;let n=lt(r,I(e));return n!==!1&&r.slice(n,n+2)==="=>"?(he(t,e),!0):!1}function rp({comment:e,enclosingNode:t,text:r}){return Ke(r,I(e))!==")"?!1:t&&(Xu(t)&&$(t).length===0||pt(t)&&ae(t).length===0)?(he(t,e),!0):((t==null?void 0:t.type)==="MethodDefinition"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&$(t.value).length===0?(he(t.value,e),!0):!1}function Nu({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:s}){return(t==null?void 0:t.type)==="FunctionTypeParam"&&(r==null?void 0:r.type)==="FunctionTypeAnnotation"&&(n==null?void 0:n.type)!=="FunctionTypeParam"?(K(t,e),!0):((t==null?void 0:t.type)==="Identifier"||(t==null?void 0:t.type)==="AssignmentPattern"||(t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern"||(t==null?void 0:t.type)==="RestElement"||(t==null?void 0:t.type)==="TSParameterProperty")&&Xu(r)&&Ke(s,I(e))===")"?(K(t,e),!0):!ee(e)&&((r==null?void 0:r.type)==="FunctionDeclaration"||(r==null?void 0:r.type)==="FunctionExpression"||(r==null?void 0:r.type)==="ObjectMethod")&&(n==null?void 0:n.type)==="BlockStatement"&&r.body===n&<(s,I(e))===j(n)?(bt(n,e),!0):!1}function Gu({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="LabeledStatement"?(oe(t,e),!0):!1}function ts({comment:e,enclosingNode:t}){return((t==null?void 0:t.type)==="ContinueStatement"||(t==null?void 0:t.type)==="BreakStatement")&&!t.label?(K(t,e),!0):!1}function np({comment:e,precedingNode:t,enclosingNode:r}){return w(r)&&t&&r.callee===t&&r.arguments.length>0?(oe(r.arguments[0],e),!0):!1}function sp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return We(r)?(ir(e)&&(n.prettierIgnore=!0,e.unignore=!0),t?(K(t,e),!0):!1):(We(n)&&ir(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function up({comment:e,enclosingNode:t}){return Ce(t)?(oe(t,e),!0):!1}function rs({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:s}){var u;return((u=n==null?void 0:n.body)==null?void 0:u.length)===0?(s?he(n,e):oe(n,e),!0):(t==null?void 0:t.type)==="Program"&&t.body.length===0&&!L(t.directives)?(s?he(t,e):oe(t,e),!0):(r==null?void 0:r.type)==="Program"&&r.body.length===0&&(t==null?void 0:t.type)==="ModuleExpression"?(he(r,e),!0):!1}function ip({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="ForInStatement"||(t==null?void 0:t.type)==="ForOfStatement"?(oe(t,e),!0):!1}function Uu({comment:e,precedingNode:t,enclosingNode:r,text:n}){if((r==null?void 0:r.type)==="ImportSpecifier"||(r==null?void 0:r.type)==="ExportSpecifier")return oe(r,e),!0;let s=(t==null?void 0:t.type)==="ImportSpecifier"&&(r==null?void 0:r.type)==="ImportDeclaration",u=(t==null?void 0:t.type)==="ExportSpecifier"&&(r==null?void 0:r.type)==="ExportNamedDeclaration";return(s||u)&&Z(n,I(e))?(K(t,e),!0):!1}function ap({comment:e,enclosingNode:t}){return(t==null?void 0:t.type)==="AssignmentPattern"?(oe(t,e),!0):!1}var op=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),pp=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function cp({comment:e,enclosingNode:t,followingNode:r}){return op.has(t==null?void 0:t.type)&&r&&(pp.has(r.type)||ee(e))?(oe(r,e),!0):!1}function lp({comment:e,enclosingNode:t,followingNode:r,text:n}){return!r&&((t==null?void 0:t.type)==="TSMethodSignature"||(t==null?void 0:t.type)==="TSDeclareFunction"||(t==null?void 0:t.type)==="TSAbstractMethodDefinition")&&Ke(n,I(e))===";"?(K(t,e),!0):!1}function Yu({comment:e,enclosingNode:t,followingNode:r}){if(ir(e)&&(t==null?void 0:t.type)==="TSMappedType"&&(r==null?void 0:r.type)==="TSTypeParameter"&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function mp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return(r==null?void 0:r.type)!=="TSMappedType"?!1:(n==null?void 0:n.type)==="TSTypeParameter"&&n.name?(oe(n.name,e),!0):(t==null?void 0:t.type)==="TSTypeParameter"&&t.constraint?(K(t.constraint,e),!0):!1}function Dp({comment:e,enclosingNode:t,followingNode:r}){return!t||t.type!=="SwitchCase"||t.test||!r||r!==t.consequent[0]?!1:(r.type==="BlockStatement"&&Rt(e)?bt(r,e):he(t,e),!0)}function yp({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return We(t)&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&!n||_r(r))?(K(v(!1,t.types,-1),e),!0):!1}function fp({comment:e,enclosingNode:t,precedingNode:r,followingNode:n}){if(((t==null?void 0:t.type)==="ObjectPattern"||(t==null?void 0:t.type)==="ArrayPattern")&&(n==null?void 0:n.type)==="TSTypeAnnotation")return r?K(r,e):he(t,e),!0}var Xu=M(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);var Ep=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function Fp(e){return!Ep.has(e.type)}function Cp(e,t){var r;if((t.parser==="typescript"||t.parser==="flow"||t.parser==="acorn"||t.parser==="espree"||t.parser==="meriyah"||t.parser==="__babel_estree")&&e.type==="MethodDefinition"&&((r=e.value)==null?void 0:r.type)==="FunctionExpression"&&$(e.value).length===0&&!e.value.returnType&&!L(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function ss(e){let{node:t,parent:r}=e;return(U(t)||r&&(r.type==="JSXSpreadAttribute"||r.type==="JSXSpreadChild"||We(r)||(r.type==="ClassDeclaration"||r.type==="ClassExpression")&&r.superClass===t))&&(!Bt(t)||We(r))}function Ap(e,{parser:t}){if(t==="flow"||t==="babel-flow")return e=H(!1,e,/[\s(]/g,""),e===""||e==="/*"||e==="/*::"}function Vu(e){switch(e){case"cr":return"\r";case"crlf":return`\r `;default:return` -`}}var Se=Symbol("MODE_BREAK"),nt=Symbol("MODE_FLAT"),lr=Symbol("cursor");function xi(){return{value:"",length:0,queue:[]}}function wc(e,t){return Ts(e,{type:"indent"},t)}function Oc(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||xi():t<0?Ts(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:Ts(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function Ts(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],s="",u=0,i=0,a=0;for(let l of n)switch(l.type){case"indent":D(),r.useTabs?o(1):p(r.tabWidth);break;case"stringAlign":D(),s+=l.n,u+=l.n.length;break;case"numberAlign":i+=1,a+=l.n;break;default:throw new Error(`Unexpected type '${l.type}'`)}return c(),{...e,value:s,length:u,queue:n};function o(l){s+=" ".repeat(l),u+=r.tabWidth*l}function p(l){s+=" ".repeat(l),u+=l}function D(){r.useTabs?y():c()}function y(){i>0&&o(i),f()}function c(){a>0&&p(a),f()}function f(){i=0,a=0}}function xs(e){let t=0,r=0,n=e.length;e:for(;n--;){let s=e[n];if(s===lr){r++;continue}for(let u=s.length-1;u>=0;u--){let i=s[u];if(i===" "||i===" ")t++;else{e[n]=s.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(lr);return t}function un(e,t,r,n,s,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,a=[e],o=[];for(;r>=0;){if(a.length===0){if(i===0)return!0;a.push(t[--i]);continue}let{mode:p,doc:D}=a.pop();switch(et(D)){case ze:o.push(D),r-=rt(D);break;case Re:case Ee:{let y=gr(D);for(let c=y.length-1;c>=0;c--)a.push({mode:p,doc:y[c]});break}case Je:case qe:case Ue:case Le:a.push({mode:p,doc:D.contents});break;case Ze:r+=xs(o);break;case ae:{if(u&&D.break)return!1;let y=D.break?Se:p,c=D.expandedStates&&y===Se?w(!1,D.expandedStates,-1):D.contents;a.push({mode:y,doc:c});break}case Te:{let c=(D.groupId?s[D.groupId]||nt:p)===Se?D.breakContents:D.flatContents;c&&a.push({mode:p,doc:c});break}case oe:if(p===Se||D.hard)return!0;D.soft||(o.push(" "),r--);break;case We:n=!0;break;case Ge:if(n)return!1;break}}return!1}function gs(e,t){let r={},n=t.printWidth,s=Ti(t.endOfLine),u=0,i=[{ind:xi(),mode:Se,doc:e}],a=[],o=!1,p=[],D=0;for(Qs(e);i.length>0;){let{ind:c,mode:f,doc:l}=i.pop();switch(et(l)){case ze:{let h=s!==` +`}}var Se=Symbol("MODE_BREAK"),ut=Symbol("MODE_FLAT"),pr=Symbol("cursor");function $u(){return{value:"",length:0,queue:[]}}function dp(e,t){return us(e,{type:"indent"},t)}function Tp(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||$u():t<0?us(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:us(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function us(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],s="",u=0,i=0,a=0;for(let l of n)switch(l.type){case"indent":m(),r.useTabs?o(1):p(r.tabWidth);break;case"stringAlign":m(),s+=l.n,u+=l.n.length;break;case"numberAlign":i+=1,a+=l.n;break;default:throw new Error(`Unexpected type '${l.type}'`)}return c(),{...e,value:s,length:u,queue:n};function o(l){s+=" ".repeat(l),u+=r.tabWidth*l}function p(l){s+=" ".repeat(l),u+=l}function m(){r.useTabs?y():c()}function y(){i>0&&o(i),f()}function c(){a>0&&p(a),f()}function f(){i=0,a=0}}function is(e){let t=0,r=0,n=e.length;e:for(;n--;){let s=e[n];if(s===pr){r++;continue}for(let u=s.length-1;u>=0;u--){let i=s[u];if(i===" "||i===" ")t++;else{e[n]=s.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(pr);return t}function Wr(e,t,r,n,s,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,a=[e],o=[];for(;r>=0;){if(a.length===0){if(i===0)return!0;a.push(t[--i]);continue}let{mode:p,doc:m}=a.pop();switch(nt(m)){case et:o.push(m),r-=Ze(m);break;case Ne:case de:{let y=qr(m);for(let c=y.length-1;c>=0;c--)a.push({mode:p,doc:y[c]});break}case Ge:case Ue:case Ye:case Oe:a.push({mode:p,doc:m.contents});break;case rt:r+=is(o);break;case pe:{if(u&&m.break)return!1;let y=m.break?Se:p,c=m.expandedStates&&y===Se?v(!1,m.expandedStates,-1):m.contents;a.push({mode:y,doc:c});break}case xe:{let c=(m.groupId?s[m.groupId]||ut:p)===Se?m.breakContents:m.flatContents;c&&a.push({mode:p,doc:c});break}case ce:if(p===Se||m.hard)return!0;m.soft||(o.push(" "),r--);break;case Xe:n=!0;break;case Ve:if(n)return!1;break}}return!1}function Nr(e,t){let r={},n=t.printWidth,s=Vu(t.endOfLine),u=0,i=[{ind:$u(),mode:Se,doc:e}],a=[],o=!1,p=[],m=0;for(Ou(e);i.length>0;){let{ind:c,mode:f,doc:l}=i.pop();switch(nt(l)){case et:{let h=s!==` `?H(!1,l,` -`,s):l;a.push(h),i.length>0&&(u+=rt(h));break}case Re:for(let h=l.length-1;h>=0;h--)i.push({ind:c,mode:f,doc:l[h]});break;case Qe:if(D>=2)throw new Error("There are too many 'cursor' in doc.");a.push(lr),D++;break;case Je:i.push({ind:wc(c,t),mode:f,doc:l.contents});break;case qe:i.push({ind:Oc(c,l.n,t),mode:f,doc:l.contents});break;case Ze:u-=xs(a);break;case ae:switch(f){case nt:if(!o){i.push({ind:c,mode:l.break?Se:nt,doc:l.contents});break}case Se:{o=!1;let h={ind:c,mode:nt,doc:l.contents},g=n-u,S=p.length>0;if(!l.break&&un(h,i,g,S,r))i.push(h);else if(l.expandedStates){let P=w(!1,l.expandedStates,-1);if(l.break){i.push({ind:c,mode:Se,doc:P});break}else for(let O=1;O=l.expandedStates.length){i.push({ind:c,mode:Se,doc:P});break}else{let M=l.expandedStates[O],_={ind:c,mode:nt,doc:M};if(un(_,i,g,S,r)){i.push(_);break}}}else i.push({ind:c,mode:Se,doc:l.contents});break}}l.id&&(r[l.id]=w(!1,i,-1).mode);break;case Ee:{let h=n-u,{parts:g}=l;if(g.length===0)break;let[S,P]=g,O={ind:c,mode:nt,doc:S},M={ind:c,mode:Se,doc:S},_=un(O,[],h,p.length>0,r,!0);if(g.length===1){_?i.push(O):i.push(M);break}let T={ind:c,mode:nt,doc:P},q={ind:c,mode:Se,doc:P};if(g.length===2){_?i.push(T,O):i.push(q,M);break}g.splice(0,2);let fe={ind:c,mode:f,doc:Lt(g)},Y=g[0];un({ind:c,mode:nt,doc:[S,P,Y]},[],h,p.length>0,r,!0)?i.push(fe,T,O):_?i.push(fe,q,O):i.push(fe,q,M);break}case Te:case Ue:{let h=l.groupId?r[l.groupId]:f;if(h===Se){let g=l.type===Te?l.breakContents:l.negate?l.contents:E(l.contents);g&&i.push({ind:c,mode:f,doc:g})}if(h===nt){let g=l.type===Te?l.flatContents:l.negate?E(l.contents):l.contents;g&&i.push({ind:c,mode:f,doc:g})}break}case We:p.push({ind:c,mode:f,doc:l.contents});break;case Ge:p.length>0&&i.push({ind:c,mode:f,doc:On});break;case oe:switch(f){case nt:if(l.hard)o=!0;else{l.soft||(a.push(" "),u+=1);break}case Se:if(p.length>0){i.push({ind:c,mode:f,doc:l},...p.reverse()),p.length=0;break}l.literal?c.root?(a.push(s,c.root.value),u=c.root.length):(a.push(s),u=0):(u-=xs(a),a.push(s+c.value),u=c.length);break}break;case Le:i.push({ind:c,mode:f,doc:l.contents});break;case we:break;default:throw new ft(l)}i.length===0&&p.length>0&&(i.push(...p.reverse()),p.length=0)}let y=a.indexOf(lr);if(y!==-1){let c=a.indexOf(lr,y+1),f=a.slice(0,y).join(""),l=a.slice(y+1,c).join(""),h=a.slice(c+1).join("");return{formatted:f+l+h,cursorNodeStart:f.length,cursorNodeText:l}}return{formatted:a.join("")}}function an(e,t,r){let{node:n}=e;if(n.type==="TemplateLiteral"&&jc(e)){let D=vc(e,r,t);if(D)return D}let u="expressions";n.type==="TSTemplateLiteralType"&&(u="types");let i=[],a=e.map(t,u),o=du(n);o&&(a=a.map(D=>gs(D,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted)),i.push(Be,"`");let p=0;return e.each(({index:D,node:y})=>{if(i.push(t()),y.tail)return;let{tabWidth:c}=r,f=y.value.raw,l=f.includes(` -`)?di(f,c):p;p=l;let h=a[D];if(!o){let S=n[u][D];(A(S)||R(S)||S.type==="ConditionalExpression"||S.type==="SequenceExpression"||Ae(S)||le(S))&&(h=[E([F,h]),F])}let g=l===0&&f.endsWith(` -`)?Fe(Number.NEGATIVE_INFINITY,h):Hs(h,l,c);i.push(m(["${",g,Be,"}"]))},"quasis"),i.push("`"),i}function gi(e){let t=e("quasi");return tt(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),Be,t])}function vc(e,t,r){let{node:n}=e,s=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(s.length>1||s.some(u=>u.length>0)){t.__inJestEach=!0;let u=e.map(r,"expressions");t.__inJestEach=!1;let i=[],a=u.map(c=>"${"+gs(c,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),o=[{hasLineBreak:!1,cells:[]}];for(let c=1;c0&&(u+=Ze(h));break}case Ne:for(let h=l.length-1;h>=0;h--)i.push({ind:c,mode:f,doc:l[h]});break;case tt:if(m>=2)throw new Error("There are too many 'cursor' in doc.");a.push(pr),m++;break;case Ge:i.push({ind:dp(c,t),mode:f,doc:l.contents});break;case Ue:i.push({ind:Tp(c,l.n,t),mode:f,doc:l.contents});break;case rt:u-=is(a);break;case pe:switch(f){case ut:if(!o){i.push({ind:c,mode:l.break?Se:ut,doc:l.contents});break}case Se:{o=!1;let h={ind:c,mode:ut,doc:l.contents},g=n-u,S=p.length>0;if(!l.break&&Wr(h,i,g,S,r))i.push(h);else if(l.expandedStates){let B=v(!1,l.expandedStates,-1);if(l.break){i.push({ind:c,mode:Se,doc:B});break}else for(let O=1;O=l.expandedStates.length){i.push({ind:c,mode:Se,doc:B});break}else{let R=l.expandedStates[O],_={ind:c,mode:ut,doc:R};if(Wr(_,i,g,S,r)){i.push(_);break}}}else i.push({ind:c,mode:Se,doc:l.contents});break}}l.id&&(r[l.id]=v(!1,i,-1).mode);break;case de:{let h=n-u,{parts:g}=l;if(g.length===0)break;let[S,B]=g,O={ind:c,mode:ut,doc:S},R={ind:c,mode:Se,doc:S},_=Wr(O,[],h,p.length>0,r,!0);if(g.length===1){_?i.push(O):i.push(R);break}let T={ind:c,mode:ut,doc:B},W={ind:c,mode:Se,doc:B};if(g.length===2){_?i.push(T,O):i.push(W,R);break}g.splice(0,2);let Fe={ind:c,mode:f,doc:Wt(g)},X=g[0];Wr({ind:c,mode:ut,doc:[S,B,X]},[],h,p.length>0,r,!0)?i.push(Fe,T,O):_?i.push(Fe,W,O):i.push(Fe,W,R);break}case xe:case Ye:{let h=l.groupId?r[l.groupId]:f;if(h===Se){let g=l.type===xe?l.breakContents:l.negate?l.contents:E(l.contents);g&&i.push({ind:c,mode:f,doc:g})}if(h===ut){let g=l.type===xe?l.flatContents:l.negate?E(l.contents):l.contents;g&&i.push({ind:c,mode:f,doc:g})}break}case Xe:p.push({ind:c,mode:f,doc:l.contents});break;case Ve:p.length>0&&i.push({ind:c,mode:f,doc:Hn});break;case ce:switch(f){case ut:if(l.hard)o=!0;else{l.soft||(a.push(" "),u+=1);break}case Se:if(p.length>0){i.push({ind:c,mode:f,doc:l},...p.reverse()),p.length=0;break}l.literal?c.root?(a.push(s,c.root.value),u=c.root.length):(a.push(s),u=0):(u-=is(a),a.push(s+c.value),u=c.length);break}break;case Oe:i.push({ind:c,mode:f,doc:l.contents});break;case ve:break;default:throw new Ft(l)}i.length===0&&p.length>0&&(i.push(...p.reverse()),p.length=0)}let y=a.indexOf(pr);if(y!==-1){let c=a.indexOf(pr,y+1),f=a.slice(0,y).join(""),l=a.slice(y+1,c).join(""),h=a.slice(c+1).join("");return{formatted:f+l+h,cursorNodeStart:f.length,cursorNodeText:l}}return{formatted:a.join("")}}function xp(e,t,r=0){let n=0;for(let s=r;sNr(m,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted)),i.push(ke,"`");let p=0;return e.each(({index:m,node:y})=>{if(i.push(t()),y.tail)return;let{tabWidth:c}=r,f=y.value.raw,l=f.includes(` +`)?Ku(f,c):p;p=l;let h=a[m];if(!o){let S=n[u][m],B=Te(r.originalText,I(y),j(n.quasis[m+1]));if(!B){let O=Nr(h,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted;O.includes(` +`)?B=!0:h=O}B&&(A(S)||q(S)||S.type==="ConditionalExpression"||S.type==="SequenceExpression"||Ae(S)||me(S))&&(h=[E([F,h]),F])}let g=l===0&&f.endsWith(` +`)?ge(Number.NEGATIVE_INFINITY,h):Iu(h,l,c);i.push(D(["${",g,ke,"}"]))},"quasis"),i.push("`"),i}function zu(e){let t=e("quasi");return st(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),ke,t])}function hp(e,t,r){let{node:n}=e,s=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(s.length>1||s.some(u=>u.length>0)){t.__inJestEach=!0;let u=e.map(r,"expressions");t.__inJestEach=!1;let i=[],a=u.map(c=>"${"+Nr(c,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),o=[{hasLineBreak:!1,cells:[]}];for(let c=1;cc.cells.length)),D=Array.from({length:p}).fill(0),y=[{cells:s},...o.filter(c=>c.cells.length>0)];for(let{cells:c}of y.filter(f=>!f.hasLineBreak))for(let[f,l]of c.entries())D[f]=Math.max(D[f],rt(l));return i.push(Be,"`",E([C,b(C,y.map(c=>b(" | ",c.cells.map((f,l)=>c.hasLineBreak?f:f+" ".repeat(D[l]-rt(f))))))]),C,"`"),i}}function _c(e,t){let{node:r}=e,n=t();return A(r)&&(n=m([E([F,n]),F])),["${",n,Be,"}"]}function Nt(e,t){return e.map(r=>_c(r,t),"expressions")}function on(e,t){return it(e,r=>typeof r=="string"?t?H(!1,r,/(\\*)`/g,"$1$1\\`"):hs(r):r)}function hs(e){return H(!1,e,/([\\`]|\${)/g,"\\$1")}function jc({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}function Mc(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var pn=Mc;function Rc(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function hi(e,t,r){let{node:n}=e;return m([n.variance?r("variance"):"","[",E([r("keyTparam")," in ",r("sourceType")]),"]",Rc(n.optional),": ",r("propType")])}function Ss(e,t){return e==="+"||e==="-"?e+t:t}function Si(e,t,r){let{node:n}=e,s=Ie(t.originalText,U(n),U(n.typeParameter));return m(["{",E([t.bracketSpacing?d:F,m([r("typeParameter"),n.optional?Ss(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?B(";"):""]),j(e,t),t.bracketSpacing?d:F,"}"],{shouldBreak:s})}var mr=pn("typeParameters");function Jc(e,t,r){let{node:n}=e;return V(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/.test(t.filepath))}function bt(e,t,r,n){let{node:s}=e;if(!s[n])return"";if(!Array.isArray(s[n]))return r(n);let u=e.getNode(2),i=u&>(u),a=e.match(D=>!(D[n].length===1&&Oe(D[n][0])),void 0,(D,y)=>y==="typeAnnotation",D=>D.type==="Identifier",Ds);if(s[n].length===0||!a&&(i||s[n].length===1&&(s[n][0].type==="NullableTypeAnnotation"||fs(s[n][0]))))return["<",b(", ",e.map(r,n)),qc(e,t),">"];let p=s.type==="TSTypeParameterInstantiation"?"":Jc(e,t,n)?",":De(t)?B(","):"";return m(["<",E([F,b([",",d],e.map(r,n))]),p,F,">"],{id:mr(s)})}function qc(e,t){let{node:r}=e;if(!A(r,x.Dangling))return"";let n=!A(r,x.Line),s=j(e,t,{indent:!n});return n?s:[s,C]}function cn(e,t,r){let{node:n,parent:s}=e,u=[n.type==="TSTypeParameter"&&n.const?"const ":""],i=n.type==="TSTypeParameter"?r("name"):n.name;if(s.type==="TSMappedType")return s.readonly&&u.push(Ss(s.readonly,"readonly")," "),u.push("[",i),n.constraint&&u.push(" in ",r("constraint")),s.nameType&&u.push(" as ",e.callParent(()=>r("nameType"))),u.push("]"),u;if(n.variance&&u.push(r("variance")),n.in&&u.push("in "),n.out&&u.push("out "),u.push(i),n.bound&&(n.usesExtendsBound&&u.push(" extends "),u.push(X(e,r,"bound"))),n.constraint){let a=Symbol("constraint");u.push(" extends",m(E(d),{id:a}),Be,Et(r("constraint"),{groupId:a}))}return n.default&&u.push(" = ",r("default")),m(u)}var Bi=new Proxy(()=>{},{get:()=>Bi}),ln=Bi;function Uc(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}var Ke=Uc;var mn=new WeakMap;function yt(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:s}=e,{key:u}=n;if(t.quoteProps==="consistent"&&!mn.has(s)){let i=(s.properties||s.body||s.members).some(a=>!a.computed&&a.key&&Z(a.key)&&!Xn(a,t));mn.set(s,i)}if((u.type==="Identifier"||ke(u)&&$n(Ke(me(u)))&&String(u.value)===Ke(me(u))&&!(t.parser==="typescript"||t.parser==="babel-ts"))&&(t.parser==="json"||t.quoteProps==="consistent"&&mn.get(s))){let i=at(JSON.stringify(u.type==="Identifier"?u.name:u.value.toString()),t);return e.call(a=>pe(a,i,t),"key")}return Xn(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!mn.get(s))?e.call(i=>pe(i,/^\d/.test(u.value)?Ke(u.value):u.value,t),"key"):r("key")}function bi(e,t,r){let{node:n}=e;return n.shorthand?r("value"):At(e,t,r,yt(e,t,r),":","value")}var Wc=e=>e.type==="ObjectMethod"||e.type==="ClassMethod"||e.type==="ClassPrivateMethod"||e.type==="MethodDefinition"||e.type==="TSAbstractMethodDefinition"||e.type==="TSDeclareMethod"||(e.type==="Property"||e.type==="ObjectProperty")&&(e.method||e.kind==="get"||e.kind==="set"),Gc=e=>e.node.type==="FunctionExpression"&&e.key==="value"&&Wc(e.parent);function Dn(e,t,r,n){if(Gc(e))return yn(e,r,t);let{node:s}=e,u=!1;if((s.type==="FunctionDeclaration"||s.type==="FunctionExpression")&&(n!=null&&n.expandLastArg)){let{parent:D}=e;I(D)&&(xe(D).length>1||V(s).every(y=>y.type==="Identifier"&&!y.typeAnnotation))&&(u=!0)}let i=[ee(e),s.async?"async ":"",`function${s.generator?"*":""} `,s.id?t("id"):""],a=mt(e,t,r,u),o=En(e,t),p=Bt(s,o);return i.push(He(e,r,t),m([p?m(a):a,o]),s.body?" ":"",t("body")),r.semi&&(s.declare||!s.body)&&i.push(";"),i}function Dr(e,t,r){let{node:n}=e,{kind:s}=n,u=n.value||n,i=[];return!s||s==="init"||s==="method"||s==="constructor"?u.async&&i.push("async "):(ln.ok(s==="get"||s==="set"),i.push(s," ")),u.generator&&i.push("*"),i.push(yt(e,t,r),n.optional||n.key.optional?"?":"",n===u?yn(e,t,r):r("value")),i}function yn(e,t,r){let{node:n}=e,s=mt(e,r,t),u=En(e,r),i=si(n),a=Bt(n,u),o=[He(e,t,r),m([i?m(s,{shouldBreak:!0}):a?m(s):s,u])];return n.body?o.push(" ",r("body")):o.push(t.semi?";":""),o}function Nc(e){let t=V(e);return t.length===1&&!e.typeParameters&&!A(e,x.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!A(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function fn(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return Nc(r)}return!1}function En(e,t){let{node:r}=e,s=[X(e,t,"returnType")];return r.predicate&&s.push(t("predicate")),s}function Pi(e,t,r){let{node:n}=e,s=t.semi?";":"",u=[];if(n.argument){let o=r("argument");Yc(t,n.argument)?o=["(",E([C,o]),C,")"]:(le(n.argument)||n.argument.type==="SequenceExpression"||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(o=m([B("("),E([F,o]),F,B(")")])),u.push(" ",o)}let i=A(n,x.Dangling),a=s&&i&&A(n,x.Last|x.Line);return a&&u.push(s),i&&u.push(" ",j(e,t)),a||u.push(s),u}function ki(e,t,r){return["return",Pi(e,t,r)]}function Ii(e,t,r){return["throw",Pi(e,t,r)]}function Yc(e,t){if(ve(e.originalText,t)||A(t,x.Leading,r=>Ie(e.originalText,U(r),v(r)))&&!N(t))return!0;if(Mt(t)){let r=t,n;for(;n=Eu(r);)if(r=n,ve(e.originalText,r))return!0}return!1}var Li=J(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Fn(e,t,r){let{node:n}=e,s=[ee(e),Ut(e),"class"],u=A(n.id,x.Trailing)||A(n.typeParameters,x.Trailing)||A(n.superClass)||k(n.extends)||k(n.mixins)||k(n.implements),i=[],a=[];if(n.id&&i.push(" ",r("id")),i.push(r("typeParameters")),n.superClass){let o=[$c(e,t,r),r("superTypeParameters")],p=e.call(D=>["extends ",pe(D,o,t)],"superClass");u?a.push(d,m(p)):a.push(" ",p)}else a.push(Bs(e,t,r,"extends"));if(a.push(Bs(e,t,r,"mixins"),Bs(e,t,r,"implements")),u){let o;Oi(n)?o=[...i,E(a)]:o=E([...i,a]),s.push(m(o,{id:wi(n)}))}else s.push(...i,...a);return s.push(" ",r("body")),s}var wi=pn("heritageGroup");function bs(e){return B(C,"",{groupId:wi(e)})}function Xc(e){return["extends","mixins","implements"].reduce((t,r)=>t+(Array.isArray(e[r])?e[r].length:0),e.superClass?1:0)>1}function Oi(e){return e.typeParameters&&!A(e.typeParameters,x.Trailing|x.Line)&&!Xc(e)}function Bs(e,t,r,n){let{node:s}=e;if(!k(s[n]))return"";let u=j(e,t,{marker:n});return[Oi(s)?B(" ",d,{groupId:mr(s.typeParameters)}):d,u,u&&C,n,m(E([d,b([",",d],e.map(r,n))]))]}function $c(e,t,r){let n=r("superClass"),{parent:s}=e;return s.type==="AssignmentExpression"?m(B(["(",E([F,n]),F,")"],n)):n}function Cn(e,t,r){let{node:n}=e,s=[];return k(n.decorators)&&s.push(Fs(e,t,r)),s.push(Wt(n)),n.static&&s.push("static "),s.push(Ut(e)),n.override&&s.push("override "),s.push(Dr(e,t,r)),s}function An(e,t,r){let{node:n}=e,s=[],u=t.semi?";":"";k(n.decorators)&&s.push(Fs(e,t,r)),s.push(Wt(n),ee(e)),n.static&&s.push("static "),s.push(Ut(e)),n.override&&s.push("override "),n.readonly&&s.push("readonly "),n.variance&&s.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&s.push("accessor "),s.push(yt(e,t,r),$(e),rn(e),X(e,r));let i=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[At(e,t,r,s," =",i?void 0:"value"),u]}function vi(e,t,r){let{node:n}=e,s=[];return e.each(({node:u,next:i,isLast:a})=>{s.push(r()),!t.semi&&Li(u)&&Vc(u,i)&&s.push(";"),a||(s.push(C),ye(u,t)&&s.push(C))},"body"),A(n,x.Dangling)&&s.push(j(e,t)),[k(n.body)?bs(e.parent):"","{",s.length>0?[E([C,s]),C]:"","}"]}function Vc(e,t){var s;let{type:r,name:n}=e.key;if(!e.computed&&r==="Identifier"&&(n==="static"||n==="get"||n==="set")&&!e.value&&!e.typeAnnotation)return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let u=(s=t.key)==null?void 0:s.name;if(u==="in"||u==="instanceof")return!0}if(Li(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let i=t.value?t.value.generator:t.generator;return!!(t.computed||i)}case"TSIndexSignature":return!0}return!1}function dt(e,t,r){var _;let n=t.semi?";":"",{node:s}=e,u=s.type==="ObjectTypeAnnotation",i=s.type==="TSEnumDeclaration"||s.type==="EnumBooleanBody"||s.type==="EnumNumberBody"||s.type==="EnumStringBody"||s.type==="EnumSymbolBody",a=[s.type==="TSTypeLiteral"||i?"members":s.type==="TSInterfaceBody"?"body":"properties"];u&&a.push("indexers","callProperties","internalSlots");let o=a.flatMap(T=>e.map(({node:q})=>({node:q,printed:r(),loc:U(q)}),T));a.length>1&&o.sort((T,q)=>T.loc-q.loc);let{parent:p,key:D}=e,y=u&&D==="body"&&(p.type==="InterfaceDeclaration"||p.type==="DeclareInterface"||p.type==="DeclareClass"),c=s.type==="TSInterfaceBody"||i||y||s.type==="ObjectPattern"&&p.type!=="FunctionDeclaration"&&p.type!=="FunctionExpression"&&p.type!=="ArrowFunctionExpression"&&p.type!=="ObjectMethod"&&p.type!=="ClassMethod"&&p.type!=="ClassPrivateMethod"&&p.type!=="AssignmentPattern"&&p.type!=="CatchClause"&&s.properties.some(T=>T.value&&(T.value.type==="ObjectPattern"||T.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&o.length>0&&Ie(t.originalText,U(s),o[0].loc),f=y?";":s.type==="TSInterfaceBody"||s.type==="TSTypeLiteral"?B(n,";"):",",l=s.type==="RecordExpression"?"#{":s.exact?"{|":"{",h=s.exact?"|}":"}",g=[],S=o.map(T=>{let q=[...g,m(T.printed)];return g=[f,d],(T.node.type==="TSPropertySignature"||T.node.type==="TSMethodSignature"||T.node.type==="TSConstructSignatureDeclaration"||T.node.type==="TSCallSignatureDeclaration")&&A(T.node,x.PrettierIgnore)&&g.shift(),ye(T.node,t)&&g.push(C),q});if(s.inexact||s.hasUnknownMembers){let T;if(A(s,x.Dangling)){let q=A(s,x.Line);T=[j(e,t),q||z(t.originalText,v(w(!1,ot(s),-1)))?C:d,"..."]}else T=["..."];S.push([...g,...T])}let P=(_=w(!1,o,-1))==null?void 0:_.node,O=!(s.inexact||s.hasUnknownMembers||P&&(P.type==="RestElement"||(P.type==="TSPropertySignature"||P.type==="TSCallSignatureDeclaration"||P.type==="TSMethodSignature"||P.type==="TSConstructSignatureDeclaration")&&A(P,x.PrettierIgnore))),M;if(S.length===0){if(!A(s,x.Dangling))return[l,h,X(e,r)];M=m([l,j(e,t,{indent:!0}),F,h,$(e),X(e,r)])}else M=[y&&k(s.properties)?bs(p):"",l,E([t.bracketSpacing?d:F,...S]),B(O&&(f!==","||De(t))?f:""),t.bracketSpacing?d:F,h,$(e),X(e,r)];return e.match(T=>T.type==="ObjectPattern"&&!k(T.decorators),Ps)||Oe(s)&&(e.match(void 0,(T,q)=>q==="typeAnnotation",(T,q)=>q==="typeAnnotation",Ps)||e.match(void 0,(T,q)=>T.type==="FunctionTypeParam"&&q==="typeAnnotation",Ps))||!c&&e.match(T=>T.type==="ObjectPattern",T=>T.type==="AssignmentExpression"||T.type==="VariableDeclarator")?M:m(M,{shouldBreak:c})}function Ps(e,t){return(t==="params"||t==="parameters"||t==="this"||t==="rest")&&ys(e)}var ks=new WeakMap;function _i(e){return ks.has(e)||ks.set(e,e.type==="ConditionalExpression"&&!ue(e,t=>t.type==="ObjectExpression")),ks.get(e)}var ji=e=>e.type==="SequenceExpression";function Mi(e,t,r,n={}){let s=[],u,i=[],a=!1,o=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",p;(function g(){let{node:S}=e,P=Hc(e,t,r,n);if(s.length===0)s.push(P);else{let{leading:O,trailing:M}=zn(e,t);s.push([O,P]),i.unshift(M)}o&&(a||(a=S.returnType&&V(S).length>0||S.typeParameters||V(S).some(O=>O.type!=="Identifier"))),!o||S.body.type!=="ArrowFunctionExpression"?(u=r("body",n),p=S.body):e.call(g,"body")})();let D=!ve(t.originalText,p)&&(ji(p)||Kc(p,u,t)||!a&&_i(p)),y=e.key==="callee"&&pt(e.parent),c=Symbol("arrow-chain"),f=zc(e,n,{signatureDocs:s,shouldBreak:a}),l,h=!1;return o&&(y||n.assignmentLayout)&&(h=!0,l=n.assignmentLayout==="chain-tail-arrow-chain"||y&&!D),u=Qc(e,t,n,{bodyDoc:u,bodyComments:i,functionBody:p,shouldPutBodyOnSameLine:D}),m([m(h?E([F,f]):f,{shouldBreak:l,id:c})," =>",o?Et(u,{groupId:c}):m(u),o&&y?B(F,"",{groupId:c}):""])}function Hc(e,t,r,n){let{node:s}=e,u=[];if(s.async&&u.push("async "),fn(e,t))u.push(r(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,o=En(e,r);if(a){if(K(o))throw new lt;o=m(Ht(o))}u.push(m([mt(e,r,t,a,!0),o]))}let i=j(e,t,{filter(a){let o=ct(t.originalText,v(a));return o!==!1&&t.originalText.slice(o,o+2)==="=>"}});return i&&u.push(" ",i),u}function Kc(e,t,r){var n,s;return G(e)||re(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||N(e)||((n=t.label)==null?void 0:n.hug)!==!1&&(((s=t.label)==null?void 0:s.embed)||vr(e,r.originalText))}function zc(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:s,key:u}=e;return u!=="callee"&&pt(s)||le(s)?m([r[0]," =>",E([d,b([" =>",d],r.slice(1))])],{shouldBreak:n}):u==="callee"&&pt(s)||t.assignmentLayout?m(b([" =>",d],r),{shouldBreak:n}):m(E(b([" =>",d],r)),{shouldBreak:n})}function Qc(e,t,r,{bodyDoc:n,bodyComments:s,functionBody:u,shouldPutBodyOnSameLine:i}){let{node:a,parent:o}=e,p=r.expandLastArg&&De(t,"all")?B(","):"",D=(r.expandLastArg||o.type==="JSXExpressionContainer")&&!A(a)?F:"";return i&&_i(u)?[" ",m([B("","("),E([F,n]),B("",")"),p,D]),s]:(ji(u)&&(n=m(["(",E([F,n]),F,")"])),i?[" ",n,s]:[E([d,n,s]),p,D])}function yr(e,t,r,n){let{node:s}=e,u=[],i=Zc(s[n]);return e.each(({node:a})=>{a.type!=="EmptyStatement"&&(u.push(r()),a!==i&&(u.push(C),ye(a,t)&&u.push(C)))},n),u}function Zc(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r.type!=="EmptyStatement")return r}}function dn(e,t,r){let{node:n}=e,s=[];n.type==="StaticBlock"&&s.push("static "),s.push("{");let u=Is(e,t,r);if(u)s.push(E([C,u]),C);else{let{parent:i}=e,a=e.grandparent;i.type==="ArrowFunctionExpression"||i.type==="FunctionExpression"||i.type==="FunctionDeclaration"||i.type==="ObjectMethod"||i.type==="ClassMethod"||i.type==="ClassPrivateMethod"||i.type==="ForStatement"||i.type==="WhileStatement"||i.type==="DoWhileStatement"||i.type==="DoExpression"||i.type==="CatchClause"&&!a.finalizer||i.type==="TSModuleDeclaration"||i.type==="TSDeclareFunction"||n.type==="StaticBlock"||s.push(C)}return s.push("}"),s}function Is(e,t,r){var o;let{node:n}=e,s=k(n.directives),u=n.body.some(p=>p.type!=="EmptyStatement"),i=A(n,x.Dangling);if(!s&&!u&&!i)return"";let a=[];return s&&(a.push(yr(e,t,r,"directives")),(u||i)&&(a.push(C),ye(w(!1,n.directives,-1),t)&&a.push(C))),u&&a.push(yr(e,t,r,"body")),i&&a.push(j(e,t)),n.type==="Program"&&((o=e.parent)==null?void 0:o.type)!=="ModuleExpression"&&a.push(C),a}function qi(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return Ri(r);case"BigIntLiteral":return Tn(r.extra.raw);case"NumericLiteral":return Ke(r.extra.raw);case"StringLiteral":return be(at(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Ke(r.value)+"m";case"DirectiveLiteral":return Ji(r.extra.raw,t);case"Literal":{if(r.regex)return Ri(r.regex);if(r.bigint)return Tn(r.raw);if(r.decimal)return Ke(r.decimal)+"m";let{value:n}=r;return typeof n=="number"?Ke(r.raw):typeof n=="string"?el(e)?Ji(r.raw,t):be(at(r.raw,t)):String(n)}}}function el(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&t.directive}function Tn(e){return e.toLowerCase()}function Ri({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}function Ji(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}function Ui(e,t){if(t.semi||Ls(e,t)||Os(e,t))return!1;let{node:r,key:n,parent:s}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(s.type==="Program"||s.type==="BlockStatement"||s.type==="StaticBlock"||s.type==="TSModuleBlock")||n==="consequent"&&s.type==="SwitchCase")&&e.call(()=>Wi(e,t),"expression"))}function Wi(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!fn(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:s}=r;if(n&&(s==="+"||s==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(N(r))return!0}return ge(e,t)?!0:Mt(r)?e.call(()=>Wi(e,t),...wr(r)):!1}function Ls({node:e,parent:t},r){return(r.parentParser==="markdown"||r.parentParser==="mdx")&&e.type==="ExpressionStatement"&&N(e.expression)&&t.type==="Program"&&t.body.length===1}function ws(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return ws(e.object)}return!1;case"Identifier":return!0;default:return!1}}function Os({node:e,parent:t},r){return(r.parser==="__vue_event_binding"||r.parser==="__vue_ts_event_binding")&&e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1}function Gi(e,t,r){let n=[r("expression")];return Os(e,t)?ws(e.node.expression)&&n.push(";"):Ls(e,t)||t.semi&&n.push(";"),A(e.node,x.Dangling,({marker:s})=>s===ir)&&n.push(" ",j(e,t,{marker:ir})),n}function Ni(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let s=b([",",d],n);return t.__isVueForBindingLeft?["(",E([F,m(s)]),F,")"]:s}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return b([",",d],n)}}function Yi(e,t,r,n){let{node:s}=e;if(rr(s))return qi(e,t);let u=t.semi?";":"",i=[];switch(s.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),C];case"File":return Ni(e,t,r)??r("program");case"Program":return Is(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return Gi(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!A(s.expression)&&(re(s.expression)||G(s.expression))?["(",r("expression"),")"]:m(["(",E([F,r("expression")]),F,")"]);case"AssignmentExpression":return ei(e,t,r);case"VariableDeclarator":return ti(e,t,r);case"BinaryExpression":case"LogicalExpression":return qr(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return zu(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return s.object&&i.push(r("object")),i.push(m(E([F,Ur(e,t,r)]))),i;case"Identifier":return[s.name,$(e),rn(e),X(e,r)];case"V8IntrinsicIdentifier":return["%",s.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return nn(e,r);case"FunctionDeclaration":case"FunctionExpression":return Dn(e,r,t,n);case"ArrowFunctionExpression":return Mi(e,t,r,n);case"YieldExpression":return i.push("yield"),s.delegate&&i.push("*"),s.argument&&i.push(" ",r("argument")),i;case"AwaitExpression":if(i.push("await"),s.argument){i.push(" ",r("argument"));let{parent:a}=e;if(I(a)&&a.callee===s||R(a)&&a.object===s){i=[E([F,...i]),F];let o=e.findAncestor(p=>p.type==="AwaitExpression"||p.type==="BlockStatement");if((o==null?void 0:o.type)!=="AwaitExpression"||!ue(o.argument,p=>p===s))return m(i)}}return i;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return sn(e,t,r);case"ImportDeclaration":return li(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Fi(e,t,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return dn(e,t,r);case"ClassBody":return vi(e,t,r);case"ThrowStatement":return Ii(e,t,r);case"ReturnStatement":return ki(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return Wr(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return dt(e,t,r);case"ObjectProperty":case"Property":return s.method||s.kind==="get"||s.kind==="set"?Dr(e,t,r):bi(e,t,r);case"ObjectMethod":return Dr(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return qt(e,t,r);case"SequenceExpression":{let{parent:a}=e;if(a.type==="ExpressionStatement"||a.type==="ForStatement"){let o=[];return e.each(({isFirst:p})=>{p?o.push(r()):o.push(",",E([d,r()]))},"expressions"),m(o)}return m(b([",",d],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),u];case"UnaryExpression":return i.push(s.operator),/[a-z]$/.test(s.operator)&&i.push(" "),A(s.argument)?i.push(m(["(",E([F,r("argument")]),F,")"])):i.push(r("argument")),i;case"UpdateExpression":return i.push(r("argument"),s.operator),s.prefix&&i.reverse(),i;case"ConditionalExpression":return Gt(e,t,r,n);case"VariableDeclaration":{let a=e.map(r,"declarations"),o=e.parent,p=o.type==="ForStatement"||o.type==="ForInStatement"||o.type==="ForOfStatement",D=s.declarations.some(c=>c.init),y;return a.length===1&&!A(s.declarations[0])?y=a[0]:a.length>0&&(y=E(a[0])),i=[ee(e),s.kind,y?[" ",y]:"",E(a.slice(1).map(c=>[",",D&&!p?C:d,c]))],p&&o.body!==s||i.push(u),m(i)}case"WithStatement":return m(["with (",r("object"),")",Dt(s.body,r("body"))]);case"IfStatement":{let a=Dt(s.consequent,r("consequent")),o=m(["if (",m([E([F,r("test")]),F]),")",a]);if(i.push(o),s.alternate){let p=A(s.consequent,x.Trailing|x.Line)||_r(s),D=s.consequent.type==="BlockStatement"&&!p;i.push(D?" ":C),A(s,x.Dangling)&&i.push(j(e,t),p?C:" "),i.push("else",m(Dt(s.alternate,r("alternate"),s.alternate.type==="IfStatement")))}return i}case"ForStatement":{let a=Dt(s.body,r("body")),o=j(e,t),p=o?[o,F]:"";return!s.init&&!s.test&&!s.update?[p,m(["for (;;)",a])]:[p,m(["for (",m([E([F,r("init"),";",d,r("test"),";",d,r("update")]),F]),")",a])]}case"WhileStatement":return m(["while (",m([E([F,r("test")]),F]),")",Dt(s.body,r("body"))]);case"ForInStatement":return m(["for (",r("left")," in ",r("right"),")",Dt(s.body,r("body"))]);case"ForOfStatement":return m(["for",s.await?" await":""," (",r("left")," of ",r("right"),")",Dt(s.body,r("body"))]);case"DoWhileStatement":{let a=Dt(s.body,r("body"));return i=[m(["do",a])],s.body.type==="BlockStatement"?i.push(" "):i.push(C),i.push("while (",m([E([F,r("test")]),F]),")",u),i}case"DoExpression":return[s.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return i.push(s.type==="BreakStatement"?"break":"continue"),s.label&&i.push(" ",r("label")),i.push(u),i;case"LabeledStatement":return s.body.type==="EmptyStatement"?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),s.handler?[" ",r("handler")]:"",s.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(s.param){let a=A(s.param,p=>!Q(p)||p.leading&&z(t.originalText,v(p))||p.trailing&&z(t.originalText,U(p),{backwards:!0})),o=r("param");return["catch ",a?["(",E([F,o]),F,") "]:["(",o,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[m(["switch (",E([F,r("discriminant")]),F,")"])," {",s.cases.length>0?E([C,b(C,e.map(({node:a,isLast:o})=>[r(),!o&&ye(a,t)?C:""],"cases"))]):"",C,"}"];case"SwitchCase":{s.test?i.push("case ",r("test"),":"):i.push("default:"),A(s,x.Dangling)&&i.push(" ",j(e,t));let a=s.consequent.filter(o=>o.type!=="EmptyStatement");if(a.length>0){let o=yr(e,t,r,"consequent");i.push(a.length===1&&a[0].type==="BlockStatement"?[" ",o]:E([C,o]))}return i}case"DebuggerStatement":return["debugger",u];case"ClassDeclaration":case"ClassExpression":return Fn(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return Cn(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return An(e,t,r);case"TemplateElement":return be(s.value.raw);case"TemplateLiteral":return an(e,r,t);case"TaggedTemplateExpression":return gi(r);case"PrivateIdentifier":return["#",s.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{i.push("module {");let a=r("body");return a&&i.push(E([C,a]),C),i.push("}"),i}case"InterpreterDirective":default:throw new _e(s,"ESTree")}}function $i(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),A(n.node)?" //"+ot(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return qr(e,t,r);case"NGChainedExpression":return m(b([";",d],e.map(()=>rl(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":Xi(e)?" ":[";",d],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:s,parent:u}=e,i=Xi(e)||(s===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||s===2&&(n.key.name==="else"&&u.body[s-1].type==="NGMicrosyntaxKeyedExpression"&&u.body[s-1].key.name==="then"||n.key.name==="track"))&&u.body[0].type==="NGMicrosyntaxExpression";return[r("key"),i?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new _e(n,"Angular")}}function Xi({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}var tl=J(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function rl({node:e}){return er(e,tl)}function xn(e,t,r){let{parent:n,node:s}=e,u=[];switch(s.type){case"AsConstExpression":u=[r("expression")," as const"];break;case"AsExpression":case"TSAsExpression":u=[r("expression")," ","as"," ",r("typeAnnotation")];break;case"SatisfiesExpression":case"TSSatisfiesExpression":u=[r("expression")," ","satisfies"," ",r("typeAnnotation")];break}return I(n)&&n.callee===s||R(n)&&n.object===s?m([E([F,...u]),F]):u}function gn(e,t,r){let{node:n}=e,s=[ee(e),"interface"],u=[],i=[];n.type!=="InterfaceTypeAnnotation"&&u.push(" ",r("id"),r("typeParameters"));let a=n.typeParameters&&!A(n.typeParameters,x.Trailing|x.Line);return k(n.extends)&&i.push(a?B(" ",d,{groupId:mr(n.typeParameters)}):d,"extends ",(n.extends.length===1?hu:E)(b([",",d],e.map(r,"extends")))),A(n.id,x.Trailing)||k(n.extends)?a?s.push(m([...u,E(i)])):s.push(m(E([...u,...i]))):s.push(...u,...i),s.push(" ",r("body")),m(s)}function Vi(e,t,r){return dt(e,r,t)}function hn(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let s="";return r.initializer&&(s=t("initializer")),r.init&&(s=t("init")),s?[n," = ",s]:n}function Hi(e,t,r){let{node:n}=e,s;if(n.type==="EnumSymbolBody"||n.explicitType)switch(n.type){case"EnumBooleanBody":s="boolean";break;case"EnumNumberBody":s="number";break;case"EnumStringBody":s="string";break;case"EnumSymbolBody":s="symbol";break}return[s?`of ${s} `:"",Vi(e,t,r)]}function Sn(e,t,r){let{node:n}=e;return[ee(e),n.const?"const ":"","enum ",t("id")," ",n.type==="TSEnumDeclaration"?Vi(e,t,r):t("body")]}function Ki(e,t,r){let{node:n}=e;if(kr(n))return n.type.slice(0,-14).toLowerCase();let s=t.semi?";":"";switch(n.type){case"DeclareClass":return Fn(e,t,r);case"DeclareFunction":return[ee(e),"function ",r("id"),r("predicate"),s];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",X(e,r),s];case"DeclareVariable":return[ee(e),n.kind??"var"," ",r("id"),s];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return sn(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return ui(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return Nr(e,t,r);case"IntersectionTypeAnnotation":return Yr(e,t,r);case"UnionTypeAnnotation":return Xr(e,t,r);case"ConditionalTypeAnnotation":return Gt(e,t,r);case"InferTypeAnnotation":return Hr(e,t,r);case"FunctionTypeAnnotation":return $r(e,t,r);case"TupleTypeAnnotation":return qt(e,t,r);case"TupleTypeLabeledElement":return zr(e,t,r);case"TupleTypeSpreadElement":return Kr(e,t,r);case"GenericTypeAnnotation":return[r("id"),bt(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return Vr(e,t,r);case"TypeAnnotation":return Qr(e,t,r);case"TypeParameter":return cn(e,t,r);case"TypeofTypeAnnotation":return en(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return Zr(r);case"DeclareEnum":case"EnumDeclaration":return Sn(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return Hi(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return hn(e,r);case"FunctionTypeParam":{let u=n.name?r("name"):e.parent.this===n?"this":"";return[u,$(e),u?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return gn(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:u}=n;return ln.ok(u==="plus"||u==="minus"),u==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return hi(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let u="";return n.proto?u="proto ":n.static&&(u="static "),[u,Gn(n)?n.kind+" ":"",n.variance?r("variance"):"",yt(e,t,r),$(e),Nn(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return dt(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",$(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return nn(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return be(at(me(n),t));case"NumberLiteralTypeAnnotation":return Ke(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return Tn(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),X(e,r),")"];case"TypePredicate":return tn(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return bt(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return xn(e,t,r)}}function zi(e,t,r){var i;let{node:n}=e;if(!n.type.startsWith("TS"))return;if(Ir(n))return n.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",u=[];switch(n.type){case"TSThisType":return"this";case"TSTypeAssertion":{let a=!(G(n.expression)||re(n.expression)),o=m(["<",E([F,r("typeAnnotation")]),F,">"]),p=[B("("),E([F,r("expression")]),F,B(")")];return a?Ye([[o,r("expression")],[o,m(p,{shouldBreak:!0})],[o,r("expression")]]):m([o,r("expression")])}case"TSDeclareFunction":return Dn(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return dn(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return dt(e,t,r);case"TSTypeAliasDeclaration":return Nr(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Cn(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return An(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return an(e,r,t);case"TSNamedTupleMember":return zr(e,t,r);case"TSRestType":return Kr(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return gn(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return bt(e,t,r,"params");case"TSTypeParameter":return cn(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return xn(e,t,r);case"TSArrayType":return Zr(r);case"TSPropertySignature":return[n.readonly?"readonly ":"",yt(e,t,r),$(e),X(e,r)];case"TSParameterProperty":return[Wt(n),n.static?"static ":"",n.override?"override ":"",n.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return en(e,r);case"TSIndexSignature":{let a=n.parameters.length>1?B(De(t)?",":""):"",o=m([E([F,b([", ",F],e.map(r,"parameters"))]),a,F]),p=e.parent.type==="ClassBody"&&e.key==="body";return[p&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?o:"","]",X(e,r),p?s:""]}case"TSTypePredicate":return tn(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[n.isTypeOf?"typeof ":"","import(",r("argument"),")",n.qualifier?[".",r("qualifier")]:"",bt(e,t,r,n.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return Vr(e,t,r);case"TSTypeOperator":return[n.operator," ",r("typeAnnotation")];case"TSMappedType":return Si(e,t,r);case"TSMethodSignature":{let a=n.kind&&n.kind!=="method"?`${n.kind} `:"";u.push(Wt(n),a,n.computed?"[":"",r("key"),n.computed?"]":"",$(e));let o=mt(e,r,t,!1,!0),p=n.returnType?"returnType":"typeAnnotation",D=n[p],y=D?X(e,r,p):"",c=Bt(n,y);return u.push(c?m(o):o),D&&u.push(m(y)),m(u)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return Sn(e,r,t);case"TSEnumMember":return hn(e,r);case"TSImportEqualsDeclaration":return[n.isExport?"export ":"","import ",As(n,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:a}=e,o=a.type==="TSModuleDeclaration",p=((i=n.body)==null?void 0:i.type)==="TSModuleDeclaration";if(o)u.push(".");else if(u.push(ee(e)),!(n.kind==="global"||n.global)){let y=n.kind??(Z(n.id)||/(?:^|\s)module(?:\s|$)/.test(t.originalText.slice(U(n),U(n.id)))?"module":"namespace");u.push(y," ")}return u.push(r("id")),p?u.push(r("body")):n.body?u.push(" ",m(r("body"))):u.push(s),u}case"TSConditionalType":return Gt(e,t,r);case"TSInferType":return Hr(e,t,r);case"TSIntersectionType":return Yr(e,t,r);case"TSUnionType":return Xr(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return $r(e,t,r);case"TSTupleType":return qt(e,t,r);case"TSTypeReference":return[r("typeName"),bt(e,t,r,"typeParameters")];case"TSTypeAnnotation":return Qr(e,t,r);case"TSEmptyBodyFunctionExpression":return yn(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return Es(e,r,"?");case"TSJSDocNonNullableType":return Es(e,r,"!");case"TSParenthesizedType":default:throw new _e(n,"TypeScript")}}function nl(e,t,r,n){if(Jr(e))return Ys(e,t);for(let s of[$i,Xu,Ki,zi,Yi]){let u=s(e,t,r,n);if(u!==void 0)return u}}var sl=J(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function ul(e,t,r,n){var y;e.isRoot&&((y=t.__onHtmlBindingRoot)==null||y.call(t,e.node,t));let s=nl(e,t,r,n);if(!s)return"";let{node:u}=e;if(sl(u))return s;let i=k(u.decorators),a=oi(e,t,r),o=u.type==="ClassExpression";if(i&&!o)return Kt(s,c=>m([a,c]));let p=ge(e,t),D=Ui(e,t);return!a&&!p&&!D?s:Kt(s,c=>[D?";":"",p?"(":"",p&&o&&i?[E([d,a,c]),d]:[a,c],p?")":""])}var Qi=ul;var ea=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function ta(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>G(t)&&r==="elements",(t,r)=>Ce(t)&&t.key.type==="Identifier"&&t.key.name==="styles"&&r==="value",...ea)}function ra(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Ce(t)&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...ea)}function Zi(e,t){return A(e,x.Block|x.Leading,({value:r})=>r===` ${t} `)}function Bn({node:e,parent:t},r){return Zi(e,r)||il(t)&&Zi(t,r)}function il(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function al(e,t,r){let{node:n}=r,s=n.quasis.map(D=>D.value.raw),u=0,i=s.reduce((D,y,c)=>c===0?y:D+"@prettier-placeholder-"+u+++"-id"+y,""),a=await e(i,{parser:"scss"}),o=Nt(r,t),p=ol(a,o);if(!p)throw new Error("Couldn't insert all the expressions");return["`",E([C,p]),F,"`"]}function ol(e,t){if(!k(t))return e;let r=0,n=it(wt(e),s=>typeof s!="string"||!s.includes("@prettier-placeholder")?s:s.split(/@prettier-placeholder-(\d+)-id/).map((u,i)=>i%2===0?be(u):(r++,t[u])));return t.length===r?n:null}function pl({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function bn(e){return e.type==="Identifier"&&e.name==="styled"}function na(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function cl({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return bn(t.object)||na(t);case"CallExpression":return bn(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(bn(t.callee.object.object)||na(t.callee.object))||t.callee.object.type==="CallExpression"&&bn(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function ll({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function ml(e){if(pl(e)||cl(e)||ll(e)||ta(e))return al}var sa=ml;async function Dl(e,t,r){let{node:n}=r,s=n.quasis.length,u=Nt(r,t),i=[];for(let a=0;a2&&c[0].trim()===""&&c[1].trim()==="",g=f>2&&c[f-1].trim()===""&&c[f-2].trim()==="",S=c.every(O=>/^\s*(?:#[^\n\r]*)?$/.test(O));if(!D&&/#[^\n\r]*$/.test(c[f-1]))return null;let P=null;S?P=yl(c):P=await e(y,{parser:"graphql"}),P?(P=on(P,!1),!p&&h&&i.push(""),i.push(P),!D&&g&&i.push("")):!p&&!D&&h&&i.push(""),l&&i.push(l)}return["`",E([C,b(C,i)]),C,"`"]}function yl(e){let t=[],r=!1,n=e.map(s=>s.trim());for(let[s,u]of n.entries())u!==""&&(n[s-1]===""&&r?t.push([C,u]):t.push(u),r=!0);return t.length===0?null:b(C,t)}function fl({node:e,parent:t}){return Bn({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function El(e){if(fl(e))return Dl}var ua=El;var vs=0;async function ia(e,t,r,n,s){let{node:u}=n,i=vs;vs=vs+1>>>0;let a=S=>`PRETTIER_HTML_PLACEHOLDER_${S}_${i}_IN_JS`,o=u.quasis.map((S,P,O)=>P===O.length-1?S.value.cooked:S.value.cooked+a(P)).join(""),p=Nt(n,r),D=new RegExp(a("(\\d+)"),"g"),y=0,c=await t(o,{parser:e,__onHtmlRoot(S){y=S.children.length}}),f=it(c,S=>{if(typeof S!="string")return S;let P=[],O=S.split(D);for(let M=0;M1?E(m(f)):m(f),h,"`"]))}function Fl(e){return Bn(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var Cl=ia.bind(void 0,"html"),Al=ia.bind(void 0,"angular");function dl(e){if(Fl(e))return Cl;if(ra(e))return Al}var aa=dl;async function Tl(e,t,r){let{node:n}=r,s=H(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(o,p)=>"\\".repeat(p.length/2)+"`"),u=xl(s),i=u!=="";i&&(s=H(!1,s,new RegExp(`^${u}`,"gm"),""));let a=on(await e(s,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",i?E([F,a]):[xr,Vs(a)],F,"`"]}function xl(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function gl(e){if(hl(e))return Tl}function hl({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var oa=gl;function Sl(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||Bl(t))return;let r;for(let n of[sa,ua,aa,oa])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...s)=>{let u=await r(...s);return u&&tt({embed:!0,...u.label},u)}}function Bl({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var pa=Sl;var bl=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Yt=e=>{for(let t of e.quasis)delete t.value};function ca(e,t,r){var s,u;if(e.type==="Program"&&delete t.sourceType,(e.type==="BigIntLiteral"||e.type==="BigIntLiteralTypeAnnotation")&&t.value&&(t.value=t.value.toLowerCase()),(e.type==="BigIntLiteral"||e.type==="Literal")&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),e.type==="DecimalLiteral"&&(t.value=Number(t.value)),e.type==="Literal"&&t.decimal&&(t.decimal=Number(t.decimal)),e.type==="EmptyStatement"||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if((e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="ObjectTypeProperty")&&typeof e.key=="object"&&e.key&&(e.key.type==="Literal"||e.key.type==="NumericLiteral"||e.key.type==="StringLiteral"||e.key.type==="Identifier")&&delete t.key,e.type==="JSXElement"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(i=>i.type==="JSXAttribute"&&i.name.name==="jsx"))for(let{type:i,expression:a}of t.children)i==="JSXExpressionContainer"&&a.type==="TemplateLiteral"&&Yt(a);e.type==="JSXAttribute"&&e.name.name==="css"&&e.value.type==="JSXExpressionContainer"&&e.value.expression.type==="TemplateLiteral"&&Yt(t.value.expression),e.type==="JSXAttribute"&&((s=e.value)==null?void 0:s.type)==="Literal"&&/["']|"|'/.test(e.value.value)&&(t.value.value=H(!1,t.value.value,/["']|"|'/g,'"'));let n=e.expression||e.callee;if(e.type==="Decorator"&&n.type==="CallExpression"&&n.callee.name==="Component"&&n.arguments.length===1){let i=e.expression.arguments[0].properties;for(let[a,o]of t.expression.arguments[0].properties.entries())switch(i[a].key.name){case"styles":G(o.value)&&Yt(o.value.elements[0]);break;case"template":o.value.type==="TemplateLiteral"&&Yt(o.value);break}}if(e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"||e.tag.name==="css"||e.tag.name==="md"||e.tag.name==="markdown"||e.tag.name==="html")||e.tag.type==="CallExpression")&&Yt(t.quasi),e.type==="TemplateLiteral"&&((u=e.leadingComments)!=null&&u.some(a=>Q(a)&&["GraphQL","HTML"].some(o=>a.value===` ${o} `))||r.type==="CallExpression"&&r.callee.name==="graphql"||!e.leadingComments)&&Yt(t),(e.type==="TSIntersectionType"||e.type==="TSUnionType")&&e.types.length===1)return t.types[0];e.type==="ChainExpression"&&e.expression.type==="TSNonNullExpression"&&([t.type,t.expression.type]=[t.expression.type,t.type])}ca.ignoredProperties=bl;var la=ca;var Tt=Ja(Ca(),1);function Ml(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` -`);return t===-1?e:e.slice(0,t)}var Aa=Ml;function Rl(e){let t=Aa(e);t&&(e=e.slice(t.length+1));let r=(0,Tt.extract)(e),{pragmas:n,comments:s}=(0,Tt.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:s}}function da(e){let{shebang:t,text:r,pragmas:n,comments:s}=Rl(e),u=(0,Tt.strip)(r),i=(0,Tt.print)({pragmas:{format:"",...n},comments:s.trimStart()});return(t?`${t} +`)&&o.push({hasLineBreak:!1,cells:[]})}let p=Math.max(s.length,...o.map(c=>c.cells.length)),m=Array.from({length:p}).fill(0),y=[{cells:s},...o.filter(c=>c.cells.length>0)];for(let{cells:c}of y.filter(f=>!f.hasLineBreak))for(let[f,l]of c.entries())m[f]=Math.max(m[f],Ze(l));return i.push(ke,"`",E([C,P(C,y.map(c=>P(" | ",c.cells.map((f,l)=>c.hasLineBreak?f:f+" ".repeat(m[l]-Ze(f))))))]),C,"`"),i}}function Sp(e,t){let{node:r}=e,n=t();return A(r)&&(n=D([E([F,n]),F])),["${",n,ke,"}"]}function Gt(e,t){return e.map(r=>Sp(r,t),"expressions")}function Ur(e,t){return ct(e,r=>typeof r=="string"?t?H(!1,r,/(\\*)`/g,"$1$1\\`"):as(r):r)}function as(e){return H(!1,e,/([\\`]|\${)/g,"\\$1")}function Bp({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&r.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&r.test(t.tag.object.object.name))}var os=[(e,t)=>e.type==="ObjectExpression"&&t==="properties",(e,t)=>e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component"&&t==="arguments",(e,t)=>e.type==="Decorator"&&t==="expression"];function Zu(e){let t=n=>n.type==="TemplateLiteral",r=(n,s)=>Ce(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&s==="value";return e.match(t,(n,s)=>G(n)&&s==="elements",r,...os)||e.match(t,r,...os)}function ei(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Ce(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...os)}function Qu(e,t){return A(e,x.Block|x.Leading,({value:r})=>r===` ${t} `)}function Yr({node:e,parent:t},r){return Qu(e,r)||bp(t)&&Qu(t,r)}function bp(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function Pp(e,t,r){let{node:n}=r,s=n.quasis.map(m=>m.value.raw),u=0,i=s.reduce((m,y,c)=>c===0?y:m+"@prettier-placeholder-"+u+++"-id"+y,""),a=await e(i,{parser:"scss"}),o=Gt(r,t),p=kp(a,o);if(!p)throw new Error("Couldn't insert all the expressions");return["`",E([C,p]),F,"`"]}function kp(e,t){if(!L(t))return e;let r=0,n=ct(Nt(e),s=>typeof s!="string"||!s.includes("@prettier-placeholder")?s:s.split(/@prettier-placeholder-(\d+)-id/).map((u,i)=>i%2===0?Ie(u):(r++,t[u])));return t.length===r?n:null}function Ip({node:e,parent:t,grandparent:r}){return r&&e.quasis&&t.type==="JSXExpressionContainer"&&r.type==="JSXElement"&&r.openingElement.name.name==="style"&&r.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.name==="jsx")||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="css"||(t==null?void 0:t.type)==="TaggedTemplateExpression"&&t.tag.type==="MemberExpression"&&t.tag.object.name==="css"&&(t.tag.property.name==="global"||t.tag.property.name==="resolve")}function Xr(e){return e.type==="Identifier"&&e.name==="styled"}function ti(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function Lp({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Xr(t.object)||ti(t);case"CallExpression":return Xr(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Xr(t.callee.object.object)||ti(t.callee.object))||t.callee.object.type==="CallExpression"&&Xr(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function wp({parent:e,grandparent:t}){return(t==null?void 0:t.type)==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}function Op(e){if(Ip(e)||Lp(e)||wp(e)||Zu(e))return Pp}var ri=Op;async function vp(e,t,r){let{node:n}=r,s=n.quasis.length,u=Gt(r,t),i=[];for(let a=0;a2&&c[0].trim()===""&&c[1].trim()==="",g=f>2&&c[f-1].trim()===""&&c[f-2].trim()==="",S=c.every(O=>/^\s*(?:#[^\n\r]*)?$/.test(O));if(!m&&/#[^\n\r]*$/.test(c[f-1]))return null;let B=null;S?B=_p(c):B=await e(y,{parser:"graphql"}),B?(B=Ur(B,!1),!p&&h&&i.push(""),i.push(B),!m&&g&&i.push("")):!p&&!m&&h&&i.push(""),l&&i.push(l)}return["`",E([C,P(C,i)]),C,"`"]}function _p(e){let t=[],r=!1,n=e.map(s=>s.trim());for(let[s,u]of n.entries())u!==""&&(n[s-1]===""&&r?t.push([C,u]):t.push(u),r=!0);return t.length===0?null:P(C,t)}function Mp({node:e,parent:t}){return Yr({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}function jp(e){if(Mp(e))return vp}var ni=jp;var ps=0;async function si(e,t,r,n,s){let{node:u}=n,i=ps;ps=ps+1>>>0;let a=S=>`PRETTIER_HTML_PLACEHOLDER_${S}_${i}_IN_JS`,o=u.quasis.map((S,B,O)=>B===O.length-1?S.value.cooked:S.value.cooked+a(B)).join(""),p=Gt(n,r),m=new RegExp(a("(\\d+)"),"g"),y=0,c=await t(o,{parser:e,__onHtmlRoot(S){y=S.children.length}}),f=ct(c,S=>{if(typeof S!="string")return S;let B=[],O=S.split(m);for(let R=0;R1?E(D(f)):D(f),h,"`"]))}function Rp(e){return Yr(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var Jp=si.bind(void 0,"html"),qp=si.bind(void 0,"angular");function Wp(e){if(Rp(e))return Jp;if(ei(e))return qp}var ui=Wp;async function Np(e,t,r){let{node:n}=r,s=H(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(o,p)=>"\\".repeat(p.length/2)+"`"),u=Gp(s),i=u!=="";i&&(s=H(!1,s,new RegExp(`^${u}`,"gm"),""));let a=Ur(await e(s,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",i?E([F,a]):[Jr,ku(a)],F,"`"]}function Gp(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function Up(e){if(Yp(e))return Np}function Yp({node:e,parent:t}){return(t==null?void 0:t.type)==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var ii=Up;function Xp(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||Vp(t))return;let r;for(let n of[ri,ni,ui,ii])if(r=n(e),!!r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":async(...s)=>{let u=await r(...s);return u&&st({embed:!0,...u.label},u)}}function Vp({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var ai=Xp;var At=Ga(yi(),1);function nc(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var fi=nc;function sc(e){let t=fi(e);t&&(e=e.slice(t.length+1));let r=(0,At.extract)(e),{pragmas:n,comments:s}=(0,At.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:s}}function Ei(e){let{shebang:t,text:r,pragmas:n,comments:s}=sc(e),u=(0,At.strip)(r),i=(0,At.print)({pragmas:{format:"",...n},comments:s.trimStart()});return(t?`${t} `:"")+i+(u.startsWith(` `)?` `:` -`)+u}var Jl={avoidAstMutation:!0};var Ta=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]}];var js={};Cr(js,{getVisitorKeys:()=>ga,massageAstNode:()=>Sa,print:()=>Wl});var ql={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},xa=ql;var Ul=Sr(xa),ga=Ul;function Wl(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),C];case"ArrayExpression":{if(n.elements.length===0)return"[]";let s=e.map(()=>e.node===null?"null":r(),"elements");return["[",E([C,b([",",C],s)]),C,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",E([C,b([",",C],e.map(r,"properties"))]),C,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return ha(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return ha(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new _e(n,"JSON")}}function ha(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var Gl=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function Sa(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,s]of e.elements.entries())s===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}Sa.ignoredProperties=Gl;var Ba=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","devcontainer.json","jsconfig.json","language-configuration.json","tsconfig.json","tslint.json",".eslintrc"],parsers:["json"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}];var fr={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var kt="JavaScript",Nl={arrowParens:{category:kt,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:fr.bracketSameLine,bracketSpacing:fr.bracketSpacing,jsxBracketSameLine:{category:kt,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:kt,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:kt,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:fr.singleQuote,jsxSingleQuote:{category:kt,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:kt,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:kt,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:fr.singleAttributePerLine},ba=Nl;var Yl={estree:_s,"estree-json":js},Xl=[...Ta,...Ba];var yT=Ms;export{yT as default,Xl as languages,ba as options,Yl as printers}; +`)+u}function uc(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:s,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:a}=e,o=s(a),p=u(a);for(let m of n)s(m)>=o&&u(m)<=p&&i.add(m);return r.slice(o,p)}var Fi=uc;function cs(e,t){var u,i,a,o,p,m,y;if(e.isRoot)return!1;let{node:r,key:n,parent:s}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&pc(r)&&cr(e))return!0;if(ic(r))return!1;if(r.type==="Identifier"){if((u=r.extra)!=null&&u.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r.name)||n==="left"&&(r.name==="async"&&!s.await||r.name==="let")&&s.type==="ForOfStatement")return!0;if(r.name==="let"){let c=(i=e.findAncestor(f=>f.type==="ForOfStatement"))==null?void 0:i.left;if(c&&ie(c,f=>f===r))return!0}if(n==="object"&&r.name==="let"&&s.type==="MemberExpression"&&s.computed&&!s.optional){let c=e.findAncestor(l=>l.type==="ExpressionStatement"||l.type==="ForStatement"||l.type==="ForInStatement"),f=c?c.type==="ExpressionStatement"?c.expression:c.type==="ForStatement"?c.init:c.left:void 0;if(f&&ie(f,l=>l===r))return!0}if(n==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"type":{let c=e.findAncestor(f=>!Ae(f));if(c!==s&&c.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let c=(a=e.findAncestor(f=>f.type==="ExpressionStatement"))==null?void 0:a.expression;if(c&&ie(c,f=>f===r))return!0}if(r.type==="ObjectExpression"){let c=(o=e.findAncestor(f=>f.type==="ArrowFunctionExpression"))==null?void 0:o.body;if(c&&c.type!=="SequenceExpression"&&c.type!=="AssignmentExpression"&&ie(c,f=>f===r))return!0}switch(s.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(n==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&L(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return Ci(e,t)||r.type==="SequenceExpression";case"Decorator":if(n==="expression"){if(q(r)&&r.computed)return!0;let c=!1,f=!1,l=r;for(;l;)switch(l.type){case"MemberExpression":f=!0,l=l.object;break;case"CallExpression":if(f||c)return t.parser!=="typescript";c=!0,l=l.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return t.parser!=="typescript";default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,(c,f)=>f==="returnType"&&c.type==="ArrowFunctionExpression")&&oc(r))return!0;break;case"BinaryExpression":if(n==="left"&&(s.operator==="in"||s.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break}switch(r.type){case"UpdateExpression":if(s.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&s.operator==="+"||r.operator==="--"&&s.operator==="-");case"UnaryExpression":switch(s.type){case"UnaryExpression":return r.operator===s.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"BinaryExpression":return n==="left"&&s.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(s.type==="UpdateExpression"||r.operator==="in"&&ac(e))return!0;if(r.operator==="|>"&&((p=r.extra)!=null&&p.parenthesized)){let c=e.grandparent;if(c.type==="BinaryExpression"&&c.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(s.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Ae(r);case"ConditionalExpression":return Ae(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return n==="callee";case"ClassExpression":case"ClassDeclaration":return n==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"AssignmentExpression":case"AssignmentPattern":return n==="left"&&(r.type==="TSTypeAssertion"||Ae(r));case"LogicalExpression":if(r.type==="LogicalExpression")return s.operator!==r.operator;case"BinaryExpression":{let{operator:c,type:f}=r;if(!c&&f!=="TSTypeAssertion")return!0;let l=er(c),h=s.operator,g=er(h);return g>l||n==="right"&&g===l||g===l&&!sr(h,c)?!0:g");default:return!1}case"TSFunctionType":if(e.match(c=>c.type==="TSFunctionType",(c,f)=>f==="typeAnnotation"&&c.type==="TSTypeAnnotation",(c,f)=>f==="returnType"&&c.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":if(n==="extendsType"&&s.type==="TSConditionalType"){if(r.type==="TSConditionalType")return!0;let{typeAnnotation:c}=r.returnType||r.typeAnnotation;if(c.type==="TSTypePredicate"&&c.typeAnnotation&&(c=c.typeAnnotation.typeAnnotation),c.type==="TSInferType"&&c.typeParameter.constraint)return!0}if(n==="checkType"&&s.type==="TSConditionalType")return!0;case"TSUnionType":case"TSIntersectionType":if((s.type==="TSUnionType"||s.type==="TSIntersectionType")&&s.types.length>1&&(!r.types||r.types.length>1))return!0;case"TSInferType":if(r.type==="TSInferType"&&s.type==="TSRestType")return!1;case"TSTypeOperator":return s.type==="TSArrayType"||s.type==="TSOptionalType"||s.type==="TSRestType"||n==="objectType"&&s.type==="TSIndexedAccessType"||s.type==="TSTypeOperator"||s.type==="TSTypeAnnotation"&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return n==="objectType"&&s.type==="TSIndexedAccessType"||n==="elementType"&&s.type==="TSArrayType";case"TypeofTypeAnnotation":return n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType")||n==="elementType"&&s.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return s.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return s.type==="ArrayTypeAnnotation"||s.type==="NullableTypeAnnotation"||s.type==="IntersectionTypeAnnotation"||s.type==="UnionTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return s.type==="ArrayTypeAnnotation"||n==="objectType"&&(s.type==="IndexedAccessType"||s.type==="OptionalIndexedAccessType");case"FunctionTypeAnnotation":{if(e.match(void 0,(f,l)=>l==="typeAnnotation"&&f.type==="TypeAnnotation",(f,l)=>l==="returnType"&&f.type==="ArrowFunctionExpression")||e.match(void 0,(f,l)=>l==="typeAnnotation"&&f.type==="TypePredicate",(f,l)=>l==="typeAnnotation"&&f.type==="TypeAnnotation",(f,l)=>l==="returnType"&&f.type==="ArrowFunctionExpression"))return!0;let c=s.type==="NullableTypeAnnotation"?e.grandparent:s;return c.type==="UnionTypeAnnotation"||c.type==="IntersectionTypeAnnotation"||c.type==="ArrayTypeAnnotation"||n==="objectType"&&(c.type==="IndexedAccessType"||c.type==="OptionalIndexedAccessType")||n==="checkType"&&s.type==="ConditionalTypeAnnotation"||n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.returnType.type==="InferTypeAnnotation"&&r.returnType.typeParameter.bound||c.type==="NullableTypeAnnotation"||s.type==="FunctionTypeParam"&&s.name===null&&$(r).some(f=>{var l;return((l=f.typeAnnotation)==null?void 0:l.type)==="NullableTypeAnnotation"})}case"ConditionalTypeAnnotation":if(n==="extendsType"&&s.type==="ConditionalTypeAnnotation"&&r.type==="ConditionalTypeAnnotation"||n==="checkType"&&s.type==="ConditionalTypeAnnotation")return!0;case"OptionalIndexedAccessType":return n==="objectType"&&s.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof r.value=="string"&&s.type==="ExpressionStatement"&&!s.directive){let c=e.grandparent;return c.type==="Program"||c.type==="BlockStatement"}return n==="object"&&s.type==="MemberExpression"&&typeof r.value=="number";case"AssignmentExpression":{let c=e.grandparent;return n==="body"&&s.type==="ArrowFunctionExpression"?!0:n==="key"&&(s.type==="ClassProperty"||s.type==="PropertyDefinition")&&s.computed||(n==="init"||n==="update")&&s.type==="ForStatement"?!1:s.type==="ExpressionStatement"?r.left.type==="ObjectPattern":!(n==="key"&&s.type==="TSPropertySignature"||s.type==="AssignmentExpression"||s.type==="SequenceExpression"&&c.type==="ForStatement"&&(c.init===s||c.update===s)||n==="value"&&s.type==="Property"&&c.type==="ObjectPattern"&&c.properties.includes(s)||s.type==="NGChainedExpression")}case"ConditionalExpression":switch(s.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"ConditionalExpression":return t.experimentalTernaries?!1:n==="test";case"MemberExpression":case"OptionalMemberExpression":return n==="object";default:return!1}case"FunctionExpression":switch(s.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(s.type){case"BinaryExpression":return s.operator!=="|>"||((m=r.extra)==null?void 0:m.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return n==="callee";case"MemberExpression":case"OptionalMemberExpression":return n==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return n==="test";default:return!1}case"ClassExpression":switch(s.type){case"NewExpression":return n==="callee";default:return!1}case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(cc(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")){let c=r;for(;c;)switch(c.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":c=c.object;break;case"TaggedTemplateExpression":c=c.tag;break;case"TSNonNullExpression":c=c.expression;break;default:return!1}}return!1;case"BindExpression":return n==="callee"&&(s.type==="BindExpression"||s.type==="NewExpression")||n==="object"&&q(s);case"NGPipeExpression":return!(s.type==="NGRoot"||s.type==="NGMicrosyntaxExpression"||s.type==="ObjectProperty"&&!((y=r.extra)!=null&&y.parenthesized)||G(s)||n==="arguments"&&w(s)||n==="right"&&s.type==="NGPipeExpression"||n==="property"&&s.type==="MemberExpression"||s.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return n==="callee"||n==="left"&&s.type==="BinaryExpression"&&s.operator==="<"||!G(s)&&s.type!=="ArrowFunctionExpression"&&s.type!=="AssignmentExpression"&&s.type!=="AssignmentPattern"&&s.type!=="BinaryExpression"&&s.type!=="NewExpression"&&s.type!=="ConditionalExpression"&&s.type!=="ExpressionStatement"&&s.type!=="JsExpressionRoot"&&s.type!=="JSXAttribute"&&s.type!=="JSXElement"&&s.type!=="JSXExpressionContainer"&&s.type!=="JSXFragment"&&s.type!=="LogicalExpression"&&!w(s)&&!Ce(s)&&s.type!=="ReturnStatement"&&s.type!=="ThrowStatement"&&s.type!=="TypeCastExpression"&&s.type!=="VariableDeclarator"&&s.type!=="YieldExpression";case"TSInstantiationExpression":return n==="object"&&q(s)}return!1}var ic=M(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function ac(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if((n==null?void 0:n.type)==="ForStatement"&&n.init===r)return!0;r=n}return!1}function oc(e){return tr(e,t=>t.type==="ObjectTypeAnnotation"&&tr(t,r=>r.type==="FunctionTypeAnnotation"))}function pc(e){return se(e)}function cr(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if(r==="arguments"&&e.isLast)return e.callParent(cr);break;case"ObjectProperty":if(r==="value")return e.callParent(()=>e.key==="properties"&&e.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return e.callParent(cr);break;case"ConditionalExpression":if(r==="alternate")return e.callParent(cr);break;case"UnaryExpression":if(t.prefix)return e.callParent(cr);break}return!1}function Ci(e,t){let{node:r,parent:n}=e;return r.type==="FunctionExpression"||r.type==="ClassExpression"?n.type==="ExportDefaultDeclaration"||!cs(e,t):!jt(r)||n.type!=="ExportDefaultDeclaration"&&cs(e,t)?!1:e.call(()=>Ci(e,t),...Ir(r))}function cc(e){let{node:t,parent:r,grandparent:n,key:s}=e;return!!((t.type==="OptionalMemberExpression"||t.type==="OptionalCallExpression")&&(s==="object"&&r.type==="MemberExpression"||s==="callee"&&(r.type==="CallExpression"||r.type==="NewExpression")||r.type==="TSNonNullExpression"&&n.type==="MemberExpression"&&n.object===r)||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(u,i)=>i==="expression"&&u.type==="ChainExpression")&&(e.match(void 0,void 0,(u,i)=>i==="callee"&&(u.type==="CallExpression"&&!u.optional||u.type==="NewExpression")||i==="object"&&u.type==="MemberExpression"&&!u.optional)||e.match(void 0,void 0,(u,i)=>i==="expression"&&u.type==="TSNonNullExpression",(u,i)=>i==="object"&&u.type==="MemberExpression"))||e.match(()=>t.type==="CallExpression"||t.type==="MemberExpression",(u,i)=>i==="expression"&&u.type==="TSNonNullExpression",(u,i)=>i==="expression"&&u.type==="ChainExpression",(u,i)=>i==="object"&&u.type==="MemberExpression"))}var Be=cs;function lc(e,t){let r=t-1;r=Je(e,r,{backwards:!0}),r=qe(e,r,{backwards:!0}),r=Je(e,r,{backwards:!0});let n=qe(e,r,{backwards:!0});return r!==n}var Ai=lc;var mc=()=>!0;function ls(e,t){let r=e.node;return r.printed=!0,t.printer.printComment(e,t)}function Dc(e,t){var m;let r=e.node,n=[ls(e,t)],{printer:s,originalText:u,locStart:i,locEnd:a}=t;if((m=s.isBlockComment)==null?void 0:m.call(s,r)){let y=Z(u,a(r))?Z(u,i(r),{backwards:!0})?C:d:" ";n.push(y)}else n.push(C);let p=qe(u,Je(u,a(r)));return p!==!1&&Z(u,p)&&n.push(C),n}function yc(e,t,r){var p;let n=e.node,s=ls(e,t),{printer:u,originalText:i,locStart:a}=t,o=(p=u.isBlockComment)==null?void 0:p.call(u,n);if(r!=null&&r.hasLineSuffix&&!(r!=null&&r.isBlock)||Z(i,a(n),{backwards:!0})){let m=Ai(i,a(n));return{doc:$n([C,m?C:"",s]),isBlock:o,hasLineSuffix:!0}}return!o||r!=null&&r.hasLineSuffix?{doc:[$n([" ",s]),Ee],isBlock:o,hasLineSuffix:!0}:{doc:[" ",s],isBlock:o,hasLineSuffix:!1}}function J(e,t,r={}){let{node:n}=e;if(!L(n==null?void 0:n.comments))return"";let{indent:s=!1,marker:u,filter:i=mc}=r,a=[];if(e.each(({node:p})=>{p.leading||p.trailing||p.marker!==u||!i(p)||a.push(ls(e,t))},"comments"),a.length===0)return"";let o=P(C,a);return s?E([C,o]):o}function ms(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if((r.comments||[]).filter(o=>!n.has(o)).length===0)return{leading:"",trailing:""};let u=[],i=[],a;return e.each(()=>{let o=e.node;if(n!=null&&n.has(o))return;let{leading:p,trailing:m}=o;p?u.push(Dc(e,t)):m&&(a=yc(e,t,a),i.push(a.doc))},"comments"),{leading:u,trailing:i}}function le(e,t,r){let{leading:n,trailing:s}=ms(e,r);return!n&&!s?t:or(t,u=>[n,u,s])}var Ds=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},_e=Ds;function ys(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Me,fs=class{constructor(t){Xs(this,Me,void 0);Vs(this,Me,new Set(t))}getLeadingWhitespaceCount(t){let r=it(this,Me),n=0;for(let s=0;s=0&&r.has(t.charAt(s));s--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return it(this,Me).has(t.charAt(0))}hasTrailingWhitespace(t){return it(this,Me).has(v(!1,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${ys([...it(this,Me)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return t.split(s)}hasWhitespaceCharacter(t){let r=it(this,Me);return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=it(this,Me);return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=it(this,Me);return Array.prototype.every.call(t,n=>r.has(n))}};Me=new WeakMap;var di=fs;var Vr=new di(` +\r `),Es=e=>e===""||e===d||e===C||e===F;function fc(e,t,r){var O,R,_;let{node:n}=e;if(n.type==="JSXElement"&&kc(n))return[r("openingElement"),r("closingElement")];let s=n.type==="JSXElement"?r("openingElement"):r("openingFragment"),u=n.type==="JSXElement"?r("closingElement"):r("closingFragment");if(n.children.length===1&&n.children[0].type==="JSXExpressionContainer"&&(n.children[0].expression.type==="TemplateLiteral"||n.children[0].expression.type==="TaggedTemplateExpression"))return[s,...e.map(r,"children"),u];n.children=n.children.map(T=>Ic(T)?{type:"JSXText",value:" ",raw:" "}:T);let i=n.children.some(U),a=n.children.filter(T=>T.type==="JSXExpressionContainer").length>1,o=n.type==="JSXElement"&&n.openingElement.attributes.length>1,p=re(s)||i||o||a,m=e.parent.rootMarker==="mdx",y=t.singleQuote?"{' '}":'{" "}',c=m?" ":b([y,F]," "),f=((R=(O=n.openingElement)==null?void 0:O.name)==null?void 0:R.name)==="fbt",l=Ec(e,t,r,c,f),h=n.children.some(T=>lr(T));for(let T=l.length-2;T>=0;T--){let W=l[T]===""&&l[T+1]==="",Fe=l[T]===C&&l[T+1]===""&&l[T+2]===C,X=(l[T]===F||l[T]===C)&&l[T+1]===""&&l[T+2]===c,ue=l[T]===c&&l[T+1]===""&&(l[T+2]===F||l[T+2]===C),z=l[T]===c&&l[T+1]===""&&l[T+2]===c,wt=l[T]===F&&l[T+1]===""&&l[T+2]===C||l[T]===C&&l[T+1]===""&&l[T+2]===F;Fe&&h||W||X||z||wt?l.splice(T,2):ue&&l.splice(T+1,2)}for(;l.length>0&&Es(v(!1,l,-1));)l.pop();for(;l.length>1&&Es(l[0])&&Es(l[1]);)l.shift(),l.shift();let g=[];for(let[T,W]of l.entries()){if(W===c){if(T===1&&l[T-1]===""){if(l.length===2){g.push(y);continue}g.push([y,C]);continue}else if(T===l.length-1){g.push(y);continue}else if(l[T-1]===""&&l[T-2]===C){g.push(y);continue}}g.push(W),re(W)&&(p=!0)}let S=h?Wt(g):D(g,{shouldBreak:!0});if(((_=t.cursorNode)==null?void 0:_.type)==="JSXText"&&n.children.includes(t.cursorNode)&&(S=[Kn,S,Kn]),m)return S;let B=D([s,E([C,S]),C,u]);return p?B:He([D([s,...l,u]),B])}function Ec(e,t,r,n,s){let u=[];return e.each(({node:i,next:a})=>{if(i.type==="JSXText"){let o=De(i);if(lr(i)){let p=Vr.split(o,!0);p[0]===""&&(u.push(""),p.shift(),/\n/.test(p[0])?u.push(xi(s,p[1],i,a)):u.push(n),p.shift());let m;if(v(!1,p,-1)===""&&(p.pop(),m=p.pop()),p.length===0)return;for(let[y,c]of p.entries())y%2===1?u.push(d):u.push(c);m!==void 0?/\n/.test(m)?u.push(xi(s,v(!1,u,-1),i,a)):u.push(n):u.push(Ti(s,v(!1,u,-1),i,a))}else/\n/.test(o)?o.match(/\n/g).length>1&&u.push("",C):u.push("",n)}else{let o=r();if(u.push(o),a&&lr(a)){let m=Vr.trim(De(a)),[y]=Vr.split(m);u.push(Ti(s,y,i,a))}else u.push(C)}},"children"),u}function Ti(e,t,r,n){return e?"":r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?t.length===1?F:C:F}function xi(e,t,r,n){return e?C:t.length===1?r.type==="JSXElement"&&!r.closingElement||(n==null?void 0:n.type)==="JSXElement"&&!n.closingElement?C:F:C}var Fc=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function Cc(e,t,r){let{parent:n}=e;if(Fc.has(n.type))return t;let s=e.match(void 0,i=>i.type==="ArrowFunctionExpression",w,i=>i.type==="JSXExpressionContainer"),u=Be(e,r);return D([u?"":b("("),E([F,t]),F,u?"":b(")")],{shouldBreak:s})}function Ac(e,t,r){let{node:n}=e,s=[];if(s.push(r("name")),n.value){let u;if(te(n.value)){let i=De(n.value),a=H(!1,H(!1,i.slice(1,-1),"'","'"),""",'"'),o=hr(a,t.jsxSingleQuote);a=o==='"'?H(!1,a,'"',"""):H(!1,a,"'","'"),u=e.call(()=>le(e,Ie(o+a+o),t),"value")}else u=r("value");s.push("=",u)}return s}function dc(e,t,r){let{node:n}=e,s=(u,i)=>u.type==="JSXEmptyExpression"||!A(u)&&(G(u)||se(u)||u.type==="ArrowFunctionExpression"||u.type==="AwaitExpression"&&(s(u.argument,u)||u.argument.type==="JSXElement")||w(u)||u.type==="ChainExpression"&&w(u.expression)||u.type==="FunctionExpression"||u.type==="TemplateLiteral"||u.type==="TaggedTemplateExpression"||u.type==="DoExpression"||U(i)&&(u.type==="ConditionalExpression"||me(u)));return s(n.expression,e.parent)?D(["{",r("expression"),ke,"}"]):D(["{",E([F,r("expression")]),F,ke,"}"])}function Tc(e,t,r){var a,o;let{node:n}=e,s=A(n.name)||A(n.typeParameters)||A(n.typeArguments);if(n.selfClosing&&n.attributes.length===0&&!s)return["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," />"];if(((a=n.attributes)==null?void 0:a.length)===1&&n.attributes[0].value&&te(n.attributes[0].value)&&!n.attributes[0].value.value.includes(` +`)&&!s&&!A(n.attributes[0]))return D(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let u=(o=n.attributes)==null?void 0:o.some(p=>p.value&&te(p.value)&&p.value.value.includes(` +`)),i=t.singleAttributePerLine&&n.attributes.length>1?C:d;return D(["<",r("name"),n.typeArguments?r("typeArguments"):r("typeParameters"),E(e.map(()=>[i,r()],"attributes")),...xc(n,t,s)],{shouldBreak:u})}function xc(e,t,r){return e.selfClosing?[d,"/>"]:gc(e,t,r)?[">"]:[F,">"]}function gc(e,t,r){let n=e.attributes.length>0&&A(v(!1,e.attributes,-1),x.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function hc(e,t,r){let{node:n}=e,s=[];s.push(""),s}function Sc(e,t){let{node:r}=e,n=A(r),s=A(r,x.Line),u=r.type==="JSXOpeningFragment";return[u?"<":""]}function Bc(e,t,r){let n=le(e,fc(e,t,r),t);return Cc(e,n,t)}function bc(e,t){let{node:r}=e,n=A(r,x.Line);return[J(e,t,{indent:n}),n?C:""]}function Pc(e,t,r){let{node:n}=e;return["{",e.call(({node:s})=>{let u=["...",r()];return!A(s)||!ss(e)?u:[E([F,le(e,u,t)]),F]},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function gi(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return Ac(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return P(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return P(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return Pc(e,t,r);case"JSXExpressionContainer":return dc(e,t,r);case"JSXFragment":case"JSXElement":return Bc(e,t,r);case"JSXOpeningElement":return Tc(e,t,r);case"JSXClosingElement":return hc(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return Sc(e,t);case"JSXEmptyExpression":return bc(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new _e(n,"JSX")}}function kc(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!lr(t)}function lr(e){return e.type==="JSXText"&&(Vr.hasNonWhitespaceCharacter(De(e))||!/\n/.test(De(e)))}function Ic(e){return e.type==="JSXExpressionContainer"&&te(e.expression)&&e.expression.value===" "&&!A(e.expression)}function hi(e){let{node:t,parent:r}=e;if(!U(t)||!U(r))return!1;let{index:n,siblings:s}=e,u;for(let i=n;i>0;i--){let a=s[i-1];if(!(a.type==="JSXText"&&!lr(a))){u=a;break}}return(u==null?void 0:u.type)==="JSXExpressionContainer"&&u.expression.type==="JSXEmptyExpression"&&Bt(u.expression)}function Lc(e){return Bt(e.node)||hi(e)}var $r=Lc;var wc=0;function Hr(e,t,r){var R;let{node:n,parent:s,grandparent:u,key:i}=e,a=i!=="body"&&(s.type==="IfStatement"||s.type==="WhileStatement"||s.type==="SwitchStatement"||s.type==="DoWhileStatement"),o=n.operator==="|>"&&((R=e.root.extra)==null?void 0:R.__isUsingHackPipeline),p=Fs(e,r,t,!1,a);if(a)return p;if(o)return D(p);if(w(s)&&s.callee===n||s.type==="UnaryExpression"||q(s)&&!s.computed)return D([E([F,...p]),F]);let m=s.type==="ReturnStatement"||s.type==="ThrowStatement"||s.type==="JSXExpressionContainer"&&u.type==="JSXAttribute"||n.operator!=="|"&&s.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(s.type==="NGRoot"&&t.parser==="__ng_binding"||s.type==="NGMicrosyntaxExpression"&&u.type==="NGMicrosyntax"&&u.body.length===1)||n===s.body&&s.type==="ArrowFunctionExpression"||n!==s.body&&s.type==="ForStatement"||s.type==="ConditionalExpression"&&u.type!=="ReturnStatement"&&u.type!=="ThrowStatement"&&!w(u)||s.type==="TemplateLiteral",y=s.type==="AssignmentExpression"||s.type==="VariableDeclarator"||s.type==="ClassProperty"||s.type==="PropertyDefinition"||s.type==="TSAbstractPropertyDefinition"||s.type==="ClassPrivateProperty"||Ce(s),c=me(n.left)&&sr(n.operator,n.left.operator);if(m||Ut(n)&&!c||!Ut(n)&&y)return D(p);if(p.length===0)return"";let f=U(n.right),l=p.findIndex(_=>typeof _!="string"&&!Array.isArray(_)&&_.type===pe),h=p.slice(0,l===-1?1:l+1),g=p.slice(h.length,f?-1:void 0),S=Symbol("logicalChain-"+ ++wc),B=D([...h,E(g)],{id:S});if(!f)return B;let O=v(!1,p,-1);return D([B,Ct(O,{groupId:S})])}function Fs(e,t,r,n,s){var h;let{node:u}=e;if(!me(u))return[D(t())];let i=[];sr(u.operator,u.left.operator)?i=e.call(g=>Fs(g,t,r,!0,s),"left"):i.push(D(t("left")));let a=Ut(u),o=(u.operator==="|>"||u.type==="NGPipeExpression"||Oc(e,r))&&!we(r.originalText,u.right),p=u.type==="NGPipeExpression"?"|":u.operator,m=u.type==="NGPipeExpression"&&u.arguments.length>0?D(E([F,": ",P([d,": "],e.map(()=>ge(2,D(t())),"arguments"))])):"",y;if(a)y=[p," ",t("right"),m];else{let S=p==="|>"&&((h=e.root.extra)==null?void 0:h.__isUsingHackPipeline)?e.call(B=>Fs(B,t,r,!0,s),"right"):t("right");y=[o?d:"",p,o?" ":d,S,m]}let{parent:c}=e,f=A(u.left,x.Trailing|x.Line),l=f||!(s&&u.type==="LogicalExpression")&&c.type!==u.type&&u.left.type!==u.type&&u.right.type!==u.type;if(i.push(o?"":" ",l?D(y,{shouldBreak:f}):y),n&&A(u)){let g=Nt(le(e,i,r));return Array.isArray(g)||g.type===de?qr(g):[g]}return i}function Ut(e){return e.type!=="LogicalExpression"?!1:!!(se(e.right)&&e.right.properties.length>0||G(e.right)&&e.right.elements.length>0||U(e.right))}var Si=e=>e.type==="BinaryExpression"&&e.operator==="|";function Oc(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&Si(e.node)&&!e.hasAncestor(r=>!Si(r)&&r.type!=="JsExpressionRoot")}function bi(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),A(n.node)?" //"+ot(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return Hr(e,t,r);case"NGChainedExpression":return D(P([";",d],e.map(()=>_c(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":Bi(e)?" ":[";",d],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:s,parent:u}=e,i=Bi(e)||(s===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||(s===2||s===3)&&(n.key.name==="else"&&u.body[s-1].type==="NGMicrosyntaxKeyedExpression"&&u.body[s-1].key.name==="then"||n.key.name==="track"))&&u.body[0].type==="NGMicrosyntaxExpression";return[r("key"),i?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new _e(n,"Angular")}}function Bi({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="of"&&t===1}var vc=M(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function _c({node:e}){return tr(e,vc)}function Cs(e,t,r){let{node:n}=e;return D([P(d,e.map(r,"decorators")),Ii(n,t)?C:d])}function Pi(e,t,r){return Li(e.node)?[P(C,e.map(r,"declaration","decorators")),C]:""}function ki(e,t,r){let{node:n,parent:s}=e,{decorators:u}=n;if(!L(u)||Li(s)||$r(e))return"";let i=n.type==="ClassExpression"||n.type==="ClassDeclaration"||Ii(n,t);return[e.key==="declaration"&&mu(s)?C:i?Ee:"",P(d,e.map(r,"decorators")),d]}function Ii(e,t){return e.decorators.some(r=>Z(t.originalText,I(r)))}function Li(e){var r;if(e.type!=="ExportDefaultDeclaration"&&e.type!=="ExportNamedDeclaration"&&e.type!=="DeclareExportDeclaration")return!1;let t=(r=e.declaration)==null?void 0:r.decorators;return L(t)&>(e,t[0])}var mt=class extends Error{name="ArgExpansionBailout"};function Mc(e,t,r){let{node:n}=e,s=ae(n);if(s.length===0)return["(",J(e,t),")"];if(Jc(s))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let u=!1,i=s.length-1,a=[];ur(e,({node:c},f)=>{let l=r();f===i||(fe(c,t)?(u=!0,l=[l,",",C,C]):l=[l,",",d]),a.push(l)});let p=!(n.type==="ImportExpression"||n.callee.type==="Import")&&ye(t,"all")?",":"";function m(){return D(["(",E([d,...a]),p,d,")"],{shouldBreak:!0})}if(u||e.parent.type!=="Decorator"&&Au(s))return m();if(Rc(s)){let c=a.slice(1);if(c.some(re))return m();let f;try{f=r(Yn(n,0),{expandFirstArg:!0})}catch(l){if(l instanceof mt)return m();throw l}return re(f)?[Ee,He([["(",D(f,{shouldBreak:!0}),", ",...c,")"],m()])]:He([["(",f,", ",...c,")"],["(",D(f,{shouldBreak:!0}),", ",...c,")"],m()])}if(jc(s,a,t)){let c=a.slice(0,-1);if(c.some(re))return m();let f;try{f=r(Yn(n,-1),{expandLastArg:!0})}catch(l){if(l instanceof mt)return m();throw l}return re(f)?[Ee,He([["(",...c,D(f,{shouldBreak:!0}),")"],m()])]:He([["(",...c,f,")"],["(",...c,D(f,{shouldBreak:!0}),")"],m()])}let y=["(",E([F,...a]),b(p),F,")"];return vr(e)?y:D(y,{shouldBreak:a.some(re)||u})}function mr(e,t=!1){return se(e)&&(e.properties.length>0||A(e))||G(e)&&(e.elements.length>0||A(e))||e.type==="TSTypeAssertion"&&mr(e.expression)||Ae(e)&&mr(e.expression)||e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&(!e.returnType||!e.returnType.typeAnnotation||e.returnType.typeAnnotation.type!=="TSTypeReference"||qc(e.body))&&(e.body.type==="BlockStatement"||e.body.type==="ArrowFunctionExpression"&&mr(e.body,!0)||se(e.body)||G(e.body)||!t&&(w(e.body)||e.body.type==="ConditionalExpression")||U(e.body))||e.type==="DoExpression"||e.type==="ModuleExpression"}function jc(e,t,r){var u,i;let n=v(!1,e,-1);if(e.length===1){let a=v(!1,t,-1);if((u=a.label)!=null&&u.embed&&((i=a.label)==null?void 0:i.hug)!==!1)return!0}let s=v(!1,e,-2);return!A(n,x.Leading)&&!A(n,x.Trailing)&&mr(n)&&(!s||s.type!==n.type)&&(e.length!==2||s.type!=="ArrowFunctionExpression"||!G(n))&&!(e.length>1&&As(n,r))}function Rc(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&Wc(r)?!0:!A(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&wi(r)&&!mr(r)}function wi(e){var t;if(e.type==="ParenthesizedExpression")return wi(e.expression);if(Ae(e)||e.type==="TypeCastExpression"){let{typeAnnotation:r}=e;return r.type==="TypeAnnotation"&&(r=r.typeAnnotation),r.type==="TSArrayType"&&(r=r.elementType,r.type==="TSArrayType"&&(r=r.elementType)),(r.type==="GenericTypeAnnotation"||r.type==="TSTypeReference")&&((t=r.typeParameters)==null?void 0:t.params.length)===1&&(r=r.typeParameters.params[0]),Jt(r)&&be(e.expression,1)}return pt(e)&&ae(e).length>1?!1:me(e)?be(e.left,1)&&be(e.right,1):Wn(e)||be(e)}function Jc(e){return e.length===2&&e[0].type==="ArrowFunctionExpression"&&$(e[0]).length===0&&e[0].body.type==="BlockStatement"&&e[1].type==="ArrayExpression"&&!e.some(t=>A(t))}function qc(e){return e.type==="BlockStatement"&&(e.body.some(t=>t.type!=="EmptyStatement")||A(e,x.Dangling))}function Wc(e){return e.type==="ObjectExpression"&&e.properties.length===1&&Ce(e.properties[0])&&e.properties[0].key.type==="Identifier"&&e.properties[0].key.name==="type"&&te(e.properties[0].value)&&e.properties[0].value.value==="module"}var Dr=Mc;var Nc=e=>((e.type==="ChainExpression"||e.type==="TSNonNullExpression")&&(e=e.expression),w(e)&&ae(e).length>0);function Oi(e,t,r){var p;let n=r("object"),s=ds(e,t,r),{node:u}=e,i=e.findAncestor(m=>!(q(m)||m.type==="TSNonNullExpression")),a=e.findAncestor(m=>!(m.type==="ChainExpression"||m.type==="TSNonNullExpression")),o=i&&(i.type==="NewExpression"||i.type==="BindExpression"||i.type==="AssignmentExpression"&&i.left.type!=="Identifier")||u.computed||u.object.type==="Identifier"&&u.property.type==="Identifier"&&!q(a)||(a.type==="AssignmentExpression"||a.type==="VariableDeclarator")&&(Nc(u.object)||((p=n.label)==null?void 0:p.memberChain));return st(n.label,[n,o?s:D(E([F,s]))])}function ds(e,t,r){let n=r("property"),{node:s}=e,u=V(e);return s.computed?!s.property||Pe(s.property)?[u,"[",n,"]"]:D([u,"[",E([F,n]),F,"]"]):[u,".",n]}function vi(e,t,r){if(e.node.type==="ChainExpression")return e.call(()=>vi(e,t,r),"expression");let{parent:n}=e,s=!n||n.type==="ExpressionStatement",u=[];function i(k){let{originalText:N}=t,Q=lt(N,I(k));return N.charAt(Q)===")"?Q!==!1&&_t(N,Q+1):fe(k,t)}function a(k){let{node:N}=k;if(N.type==="ChainExpression")return k.call(()=>a(k),"expression");if(w(N)&&(Et(N.callee)||w(N.callee))){let Q=i(N);u.unshift({node:N,hasTrailingEmptyLine:Q,printed:[le(k,[V(k),ze(k,t,r),Dr(k,t,r)],t),Q?C:""]}),k.call(je=>a(je),"callee")}else Et(N)?(u.unshift({node:N,needsParens:Be(k,t),printed:le(k,q(N)?ds(k,t,r):Kr(k,t,r),t)}),k.call(Q=>a(Q),"object")):N.type==="TSNonNullExpression"?(u.unshift({node:N,printed:le(k,"!",t)}),k.call(Q=>a(Q),"expression")):u.unshift({node:N,printed:r()})}let{node:o}=e;u.unshift({node:o,printed:[V(e),ze(e,t,r),Dr(e,t,r)]}),o.callee&&e.call(k=>a(k),"callee");let p=[],m=[u[0]],y=1;for(;y0&&p.push(m);function f(k){return/^[A-Z]|^[$_]+$/.test(k)}function l(k){return k.length<=t.tabWidth}function h(k){var je;let N=(je=k[1][0])==null?void 0:je.node.computed;if(k[0].length===1){let xt=k[0][0].node;return xt.type==="ThisExpression"||xt.type==="Identifier"&&(f(xt.name)||s&&l(xt.name)||N)}let Q=v(!1,k[0],-1).node;return q(Q)&&Q.property.type==="Identifier"&&(f(Q.property.name)||N)}let g=p.length>=2&&!A(p[1][0].node)&&h(p);function S(k){let N=k.map(Q=>Q.printed);return k.length>0&&v(!1,k,-1).needsParens?["(",...N,")"]:N}function B(k){return k.length===0?"":E([C,P(C,k.map(S))])}let O=p.map(S),R=O,_=g?3:2,T=p.flat(),W=T.slice(1,-1).some(k=>A(k.node,x.Leading))||T.slice(0,-1).some(k=>A(k.node,x.Trailing))||p[_]&&A(p[_][0].node,x.Leading);if(p.length<=_&&!W&&!p.some(k=>v(!1,k,-1).hasTrailingEmptyLine))return vr(e)?R:D(R);let Fe=v(!1,p[g?1:0],-1).node,X=!w(Fe)&&i(Fe),ue=[S(p[0]),g?p.slice(1,2).map(S):"",X?C:"",B(p.slice(g?2:1))],z=u.map(({node:k})=>k).filter(w);function wt(){let k=v(!1,v(!1,p,-1),-1).node,N=v(!1,O,-1);return w(k)&&re(N)&&z.slice(0,-1).some(Q=>Q.arguments.some(Mt))}let Ht;return W||z.length>2&&z.some(k=>!k.arguments.every(N=>be(N)))||O.slice(0,-1).some(re)||wt()?Ht=D(ue):Ht=[re(R)||X?Ee:"",He([R,ue])],st({memberChain:!0},Ht)}var _i=vi;function zr(e,t,r){var y;let{node:n,parent:s}=e,u=n.type==="NewExpression",i=n.type==="ImportExpression",a=V(e),o=ae(n),p=o.length===1&&wr(o[0],t.originalText);if(p||o.length>0&&!u&&!i&&(Uc(n,s)||St(n,s))){let c=[];if(ur(e,()=>{c.push(r())}),!(p&&((y=c[0].label)!=null&&y.embed)))return[u?"new ":"",r("callee"),a,ze(e,t,r),"(",P(", ",c),")"]}if(!i&&!u&&Et(n.callee)&&!e.call(c=>Be(c,t),"callee",...n.callee.type==="ChainExpression"?["expression"]:[]))return _i(e,t,r);let m=[u?"new ":"",i?Gc(n):r("callee"),a,ze(e,t,r),Dr(e,t,r)];return i||w(n.callee)?D(m):m}function Gc(e){return e.phase?`import.${e.phase}`:"import"}function Uc(e,t){if(e.callee.type!=="Identifier")return!1;if(e.callee.name==="require"){let r=ae(e);return r.length===1&&te(r[0])||r.length>1}if(e.callee.name==="define"){let r=ae(e);return t.type==="ExpressionStatement"&&(r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&te(r[0])&&r[1].type==="ArrayExpression")}return!1}function dt(e,t,r,n,s,u){let i=Yc(e,t,r,n,u),a=u?r(u,{assignmentLayout:i}):"";switch(i){case"break-after-operator":return D([D(n),s,D(E([d,a]))]);case"never-break-after-operator":return D([D(n),s," ",a]);case"fluid":{let o=Symbol("assignment");return D([D(n),s,D(E(d),{id:o}),ke,Ct(a,{groupId:o})])}case"break-lhs":return D([n,s," ",D(a)]);case"chain":return[D(n),s,d,a];case"chain-tail":return[D(n),s,E([d,a])];case"chain-tail-arrow-chain":return[D(n),s,a];case"only-left":return n}}function ji(e,t,r){let{node:n}=e;return dt(e,t,r,r("left"),[" ",n.operator],"right")}function Ri(e,t,r){return dt(e,t,r,r("id")," =","init")}function Yc(e,t,r,n,s){let{node:u}=e,i=u[s];if(!i)return"only-left";let a=!Qr(i);if(e.match(Qr,Ji,c=>!a||c.type!=="ExpressionStatement"&&c.type!=="VariableDeclaration"))return a?i.type==="ArrowFunctionExpression"&&i.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!a&&Qr(i.right)||we(t.originalText,i))return"break-after-operator";if(i.type==="CallExpression"&&i.callee.name==="require"||t.parser==="json5"||t.parser==="jsonc"||t.parser==="json")return"never-break-after-operator";let m=vu(n);if(Vc(u)||zc(u)||Ts(u)&&m)return"break-lhs";let y=Zc(u,n,t);return e.call(()=>Xc(e,t,r,y),s)?"break-after-operator":$c(u)?"break-lhs":!m&&(y||i.type==="TemplateLiteral"||i.type==="TaggedTemplateExpression"||i.type==="BooleanLiteral"||Pe(i)||i.type==="ClassExpression")?"never-break-after-operator":"fluid"}function Xc(e,t,r,n){let s=e.node;if(me(s)&&!Ut(s))return!0;switch(s.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!t.experimentalTernaries&&!rl(s))break;return!0;case"ConditionalExpression":{if(!t.experimentalTernaries){let{test:p}=s;return me(p)&&!Ut(p)}let{consequent:a,alternate:o}=s;return a.type==="ConditionalExpression"||o.type==="ConditionalExpression"}case"ClassExpression":return L(s.decorators)}if(n)return!1;let u=s,i=[];for(;;)if(u.type==="UnaryExpression"||u.type==="AwaitExpression"||u.type==="YieldExpression"&&u.argument!==null)u=u.argument,i.push("argument");else if(u.type==="TSNonNullExpression")u=u.expression,i.push("expression");else break;return!!(te(u)||e.call(()=>qi(e,t,r),...i))}function Vc(e){if(Ji(e)){let t=e.left||e.id;return t.type==="ObjectPattern"&&t.properties.length>2&&t.properties.some(r=>{var n;return Ce(r)&&(!r.shorthand||((n=r.value)==null?void 0:n.type)==="AssignmentPattern")})}return!1}function Qr(e){return e.type==="AssignmentExpression"}function Ji(e){return Qr(e)||e.type==="VariableDeclarator"}function $c(e){let t=Kc(e);if(L(t)){let r=e.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(t.length>1&&t.some(n=>n[r]||n.default))return!0}return!1}var Hc=M(["TSTypeAliasDeclaration","TypeAlias"]);function Kc(e){var t;if(Hc(e))return(t=e.typeParameters)==null?void 0:t.params}function zc(e){if(e.type!=="VariableDeclarator")return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=Mi(t.typeAnnotation);return L(r)&&r.length>1&&r.some(n=>L(Mi(n))||n.type==="TSConditionalType")}function Ts(e){var t;return e.type==="VariableDeclarator"&&((t=e.init)==null?void 0:t.type)==="ArrowFunctionExpression"}var Qc=M(["TSTypeReference","GenericTypeAnnotation"]);function Mi(e){var t;if(Qc(e))return(t=e.typeParameters)==null?void 0:t.params}function qi(e,t,r,n=!1){var i;let{node:s}=e,u=()=>qi(e,t,r,!0);if(s.type==="ChainExpression"||s.type==="TSNonNullExpression")return e.call(u,"expression");if(w(s)){if((i=zr(e,t,r).label)!=null&&i.memberChain)return!1;let o=ae(s);return!(o.length===0||o.length===1&&nr(o[0],t))||el(s,r)?!1:e.call(u,"callee")}return q(s)?e.call(u,"object"):n&&(s.type==="Identifier"||s.type==="ThisExpression")}function Zc(e,t,r){return Ce(e)?(t=Nt(t),typeof t=="string"&&Ze(t)1)return!0;if(r.length===1){let s=r[0];if(We(s)||_r(s)||s.type==="TSTypeLiteral"||s.type==="ObjectTypeAnnotation")return!0}let n=e.typeParameters?"typeParameters":"typeArguments";if(re(t(n)))return!0}return!1}function tl(e){var t;return(t=e.typeParameters??e.typeArguments)==null?void 0:t.params}function rl(e){function t(r){switch(r.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":case"TSTypeReference":return!!r.typeParameters;default:return!1}}return t(e.checkType)||t(e.extendsType)}function Dt(e,t,r,n,s){let u=e.node,i=$(u),a=s?ze(e,r,t):"";if(i.length===0)return[a,"(",J(e,r,{filter:l=>Ke(r.originalText,I(l))===")"}),")"];let{parent:o}=e,p=St(o),m=xs(u),y=[];if(gu(e,(l,h)=>{let g=h===i.length-1;g&&u.rest&&y.push("..."),y.push(t()),!g&&(y.push(","),p||m?y.push(" "):fe(i[h],r)?y.push(C,C):y.push(d))}),n&&!sl(e)){if(re(a)||re(y))throw new mt;return D([ar(a),"(",ar(y),")"])}let c=i.every(l=>!L(l.decorators));return m&&c?[a,"(",...y,")"]:p?[a,"(",...y,")"]:(Lr(o)||yu(o)||o.type==="TypeAlias"||o.type==="UnionTypeAnnotation"||o.type==="IntersectionTypeAnnotation"||o.type==="FunctionTypeAnnotation"&&o.returnType===u)&&i.length===1&&i[0].name===null&&u.this!==i[0]&&i[0].typeAnnotation&&u.typeParameters===null&&Jt(i[0].typeAnnotation)&&!u.rest?r.arrowParens==="always"?["(",...y,")"]:y:[a,"(",E([F,...y]),b(!xu(u)&&ye(r,"all")?",":""),F,")"]}function xs(e){if(!e)return!1;let t=$(e);if(t.length!==1)return!1;let[r]=t;return!A(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Le(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Le(r.typeAnnotation)&&r!==e.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||se(r.right)&&r.right.properties.length===0||G(r.right)&&r.right.elements.length===0))}function nl(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}function kt(e,t){var s;let r=nl(e);if(!r)return!1;let n=(s=e.typeParameters)==null?void 0:s.params;if(n){if(n.length>1)return!1;if(n.length===1){let u=n[0];if(u.constraint||u.default)return!1}}return $(e).length===1&&(Le(r)||re(t))}function sl(e){return e.match(t=>t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement",(t,r)=>{if(t.type==="CallExpression"&&r==="arguments"&&t.arguments.length===1&&t.callee.type==="CallExpression"){let n=t.callee.callee;return n.type==="Identifier"||n.type==="MemberExpression"&&!n.computed&&n.object.type==="Identifier"&&n.property.type==="Identifier"}return!1},(t,r)=>t.type==="VariableDeclarator"&&r==="init"||t.type==="ExportDefaultDeclaration"&&r==="declaration"||t.type==="TSExportAssignment"&&r==="expression"||t.type==="AssignmentExpression"&&r==="right"&&t.left.type==="MemberExpression"&&t.left.object.type==="Identifier"&&t.left.object.name==="module"&&t.left.property.type==="Identifier"&&t.left.property.name==="exports",t=>t.type!=="VariableDeclaration"||t.kind==="const"&&t.declarations.length===1)}function Wi(e){let t=$(e);return t.length>1&&t.some(r=>r.type==="TSParameterProperty")}var ul=M(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),il=M(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function al(e){let{types:t}=e;if(t.some(n=>A(n)))return!1;let r=t.find(n=>il(n));return r?t.every(n=>n===r||ul(n)):!1}function gs(e){return Jt(e)||Le(e)?!0:We(e)?al(e):!1}function Ni(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[ne(e),"opaque type ",r("id"),r("typeParameters")];return s.supertype&&u.push(": ",r("supertype")),s.impltype&&u.push(" = ",r("impltype")),u.push(n),u}function Zr(e,t,r){let n=t.semi?";":"",{node:s}=e,u=[ne(e)];u.push("type ",r("id"),r("typeParameters"));let i=s.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[dt(e,t,r,u," =",i),n]}function en(e,t,r){let n=!1;return D(e.map(({isFirst:s,previous:u,node:i,index:a})=>{let o=r();if(s)return o;let p=Le(i),m=Le(u);return m&&p?[" & ",n?E(o):o]:!m&&!p?E([" &",d,o]):(a>1&&(n=!0),[" & ",a>1?E(o):o])},"types"))}function tn(e,t,r){let{node:n}=e,{parent:s}=e,u=s.type!=="TypeParameterInstantiation"&&(s.type!=="TSConditionalType"||!t.experimentalTernaries)&&(s.type!=="ConditionalTypeAnnotation"||!t.experimentalTernaries)&&s.type!=="TSTypeParameterInstantiation"&&s.type!=="GenericTypeAnnotation"&&s.type!=="TSTypeReference"&&s.type!=="TSTypeAssertion"&&s.type!=="TupleTypeAnnotation"&&s.type!=="TSTupleType"&&!(s.type==="FunctionTypeParam"&&!s.name&&e.grandparent.this!==s)&&!((s.type==="TypeAlias"||s.type==="VariableDeclarator"||s.type==="TSTypeAliasDeclaration")&&we(t.originalText,n)),i=gs(n),a=e.map(m=>{let y=r();return i||(y=ge(2,y)),le(m,y,t)},"types");if(i)return P(" | ",a);let o=u&&!we(t.originalText,n),p=[b([o?d:"","| "]),P([d,"| "],a)];return Be(e,t)?D([E(p),F]):(s.type==="TupleTypeAnnotation"||s.type==="TSTupleType")&&s[s.type==="TupleTypeAnnotation"&&s.types?"types":"elementTypes"].length>1?D([E([b(["(",F]),p]),F,b(")")]):D(u?E(p):p)}function ol(e){var n;let{node:t,parent:r}=e;return t.type==="FunctionTypeAnnotation"&&(Lr(r)||!((r.type==="ObjectTypeProperty"||r.type==="ObjectTypeInternalSlot")&&!r.variance&&!r.optional&>(r,t)||r.type==="ObjectTypeCallProperty"||((n=e.getParentNode(2))==null?void 0:n.type)==="DeclareFunction"))}function rn(e,t,r){let{node:n}=e,s=[Yt(e)];(n.type==="TSConstructorType"||n.type==="TSConstructSignatureDeclaration")&&s.push("new ");let u=Dt(e,r,t,!1,!0),i=[];return n.type==="FunctionTypeAnnotation"?i.push(ol(e)?" => ":": ",r("returnType")):i.push(Y(e,r,n.returnType?"returnType":"typeAnnotation")),kt(n,i)&&(u=D(u)),s.push(u,i),D(s)}function nn(e,t,r){return[r("objectType"),V(e),"[",r("indexType"),"]"]}function sn(e,t,r){return["infer ",r("typeParameter")]}function hs(e,t,r){let{node:n}=e;return[n.postfix?"":r,Y(e,t),n.postfix?r:""]}function un(e,t,r){let{node:n}=e;return["...",...n.type==="TupleTypeSpreadElement"&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function an(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var pl=new WeakSet;function Y(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let s=!1;if(n.type==="TSTypeAnnotation"||n.type==="TypeAnnotation"){let u=e.call(Gi,r);(u==="=>"||u===":"&&A(n,x.Leading))&&(s=!0),pl.add(n)}return s?[" ",t(r)]:t(r)}var Gi=e=>e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>(r==="returnType"||r==="typeAnnotation")&&(t.type==="TSFunctionType"||t.type==="TSConstructorType"))?"=>":e.match(t=>t.type==="TSTypeAnnotation",(t,r)=>r==="typeAnnotation"&&(t.type==="TSJSDocNullableType"||t.type==="TSJSDocNonNullableType"||t.type==="TSTypePredicate"))||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="typeAnnotation"&&t.type==="Identifier",(t,r)=>r==="id"&&t.type==="DeclareFunction")||e.match(t=>t.type==="TypeAnnotation",(t,r)=>r==="bound"&&t.type==="TypeParameter"&&t.usesExtendsBound)?"":":";function on(e,t,r){let n=Gi(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function pn(e){return[e("elementType"),"[]"]}function cn({node:e},t){let r=e.type==="TSTypeQuery"?"exprName":"argument",n=e.type==="TSTypeQuery"?"typeParameters":"typeArguments";return["typeof ",t(r),t(n)]}function ln(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",Y(e,t)]:""]}function V(e){let{node:t}=e;return!t.optional||t.type==="Identifier"&&t===e.parent.key?"":w(t)||q(t)&&t.computed||t.type==="OptionalIndexedAccessType"?"?.":"?"}function mn(e){return e.node.definite||e.match(void 0,(t,r)=>r==="id"&&t.type==="VariableDeclarator"&&t.definite)?"!":""}var cl=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function ne(e){let{node:t}=e;return t.declare||cl.has(t.type)&&e.parent.type!=="DeclareExportDeclaration"?"declare ":""}var ll=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Yt({node:e}){return e.abstract||ll.has(e.type)?"abstract ":""}function ze(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function Kr(e,t,r){return["::",r("callee")]}function yt(e,t,r){return e.type==="EmptyStatement"?";":e.type==="BlockStatement"||r?[" ",t]:E([d,t])}function Dn(e,t){return["...",t("argument"),Y(e,t)]}function Xt(e){return e.accessibility?e.accessibility+" ":""}function ml(e,t,r,n){let{node:s}=e;return A(s,x.Dangling)?D([r,J(e,t,{indent:!0}),F,n]):[r,n]}function Vt(e,t,r){let{node:n}=e,s=[],u=n.type==="TupleExpression"?"#[":"[",i="]",a=n.type==="TupleTypeAnnotation"&&n.types?"types":n.type==="TSTupleType"||n.type==="TupleTypeAnnotation"?"elementTypes":"elements",o=n[a];if(o.length===0)s.push(ml(e,t,u,i));else{let p=v(!1,o,-1),m=(p==null?void 0:p.type)!=="RestElement",y=p===null,c=Symbol("array"),f=!t.__inJestEach&&o.length>1&&o.every((g,S,B)=>{let O=g==null?void 0:g.type;if(!G(g)&&!se(g))return!1;let R=B[S+1];if(R&&O!==R.type)return!1;let _=G(g)?"elements":"properties";return g[_]&&g[_].length>1}),l=As(n,t),h=m?y?",":ye(t)?l?b(",","",{groupId:c}):b(","):"":"";s.push(D([u,E([F,l?yl(e,t,r,h):[Dl(e,t,a,r),h],J(e,t)]),F,i],{shouldBreak:f,id:c}))}return s.push(V(e),Y(e,r)),s}function As(e,t){return G(e)&&e.elements.length>1&&e.elements.every(r=>r&&(Pe(r)||qn(r)&&!A(r.argument))&&!A(r,x.Trailing|x.Line,n=>!Z(t.originalText,j(n),{backwards:!0})))}function Ui({node:e},{originalText:t}){let r=s=>Ot(t,vt(t,s)),n=s=>t[s]===","?s:n(r(s+1));return _t(t,n(I(e)))}function Dl(e,t,r,n){let s=[];return e.each(({node:u,isLast:i})=>{s.push(u?D(n()):""),i||s.push([",",d,u&&Ui(e,t)?F:""])},r),s}function yl(e,t,r,n){let s=[];return e.each(({isLast:u,next:i})=>{s.push([r(),u?n:","]),u||s.push(Ui(e,t)?[C,C]:A(i,x.Leading|x.Line)?C:d)},"elements"),Wt(s)}var Yi=new Proxy(()=>{},{get:()=>Yi}),yn=Yi;function fl(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}var Qe=fl;var fn=new WeakMap;function ft(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:s}=e,{key:u}=n;if(t.quoteProps==="consistent"&&!fn.has(s)){let i=(s.properties||s.body||s.members).some(a=>!a.computed&&a.key&&te(a.key)&&!Gn(a,t));fn.set(s,i)}if((u.type==="Identifier"||Pe(u)&&Un(Qe(De(u)))&&String(u.value)===Qe(De(u))&&!(t.parser==="typescript"||t.parser==="babel-ts"))&&(t.parser==="json"||t.parser==="jsonc"||t.quoteProps==="consistent"&&fn.get(s))){let i=at(JSON.stringify(u.type==="Identifier"?u.name:u.value.toString()),t);return e.call(a=>le(a,i,t),"key")}return Gn(n,t)&&(t.quoteProps==="as-needed"||t.quoteProps==="consistent"&&!fn.get(s))?e.call(i=>le(i,/^\d/.test(u.value)?Qe(u.value):u.value,t),"key"):r("key")}function Ss(e,t,r){let{node:n}=e;return n.shorthand?r("value"):dt(e,t,r,ft(e,t,r),":","value")}var El=({node:e,key:t,parent:r})=>t==="value"&&e.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&ht(r));function En(e,t,r,n){if(El(e))return Fn(e,r,t);let{node:s}=e,u=!1;if((s.type==="FunctionDeclaration"||s.type==="FunctionExpression")&&(n!=null&&n.expandLastArg)){let{parent:m}=e;w(m)&&(ae(m).length>1||$(s).every(y=>y.type==="Identifier"&&!y.typeAnnotation))&&(u=!0)}let i=[ne(e),s.async?"async ":"",`function${s.generator?"*":""} `,s.id?t("id"):""],a=Dt(e,t,r,u),o=An(e,t),p=kt(s,o);return i.push(ze(e,r,t),D([p?D(a):a,o]),s.body?" ":"",t("body")),r.semi&&(s.declare||!s.body)&&i.push(";"),i}function yr(e,t,r){let{node:n}=e,{kind:s}=n,u=n.value||n,i=[];return!s||s==="init"||s==="method"||s==="constructor"?u.async&&i.push("async "):(yn.ok(s==="get"||s==="set"),i.push(s," ")),u.generator&&i.push("*"),i.push(ft(e,t,r),n.optional||n.key.optional?"?":"",n===u?Fn(e,t,r):r("value")),i}function Fn(e,t,r){let{node:n}=e,s=Dt(e,r,t),u=An(e,r),i=Wi(n),a=kt(n,u),o=[ze(e,t,r),D([i?D(s,{shouldBreak:!0}):a?D(s):s,u])];return n.body?o.push(" ",r("body")):o.push(t.semi?";":""),o}function Fl(e){let t=$(e);return t.length===1&&!e.typeParameters&&!A(e,x.Dangling)&&t[0].type==="Identifier"&&!t[0].typeAnnotation&&!A(t[0])&&!t[0].optional&&!e.predicate&&!e.returnType}function Cn(e,t){if(t.arrowParens==="always")return!1;if(t.arrowParens==="avoid"){let{node:r}=e;return Fl(r)}return!1}function An(e,t){let{node:r}=e,s=[Y(e,t,"returnType")];return r.predicate&&s.push(t("predicate")),s}function Xi(e,t,r){let{node:n}=e,s=t.semi?";":"",u=[];if(n.argument){let o=r("argument");Cl(t,n.argument)?o=["(",E([C,o]),C,")"]:(me(n.argument)||n.argument.type==="SequenceExpression"||t.experimentalTernaries&&n.argument.type==="ConditionalExpression"&&(n.argument.consequent.type==="ConditionalExpression"||n.argument.alternate.type==="ConditionalExpression"))&&(o=D([b("("),E([F,o]),F,b(")")])),u.push(" ",o)}let i=A(n,x.Dangling),a=s&&i&&A(n,x.Last|x.Line);return a&&u.push(s),i&&u.push(" ",J(e,t)),a||u.push(s),u}function Vi(e,t,r){return["return",Xi(e,t,r)]}function $i(e,t,r){return["throw",Xi(e,t,r)]}function Cl(e,t){if(we(e.originalText,t)||A(t,x.Leading,r=>Te(e.originalText,j(r),I(r)))&&!U(t))return!0;if(jt(t)){let r=t,n;for(;n=lu(r);)if(r=n,we(e.originalText,r))return!0}return!1}var Bs=new WeakMap;function Hi(e){return Bs.has(e)||Bs.set(e,e.type==="ConditionalExpression"&&!ie(e,t=>t.type==="ObjectExpression")),Bs.get(e)}var Ki=e=>e.type==="SequenceExpression";function zi(e,t,r,n={}){let s=[],u,i=[],a=!1,o=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",p;(function g(){let{node:S}=e,B=Al(e,t,r,n);if(s.length===0)s.push(B);else{let{leading:O,trailing:R}=ms(e,t);s.push([O,B]),i.unshift(R)}o&&(a||(a=S.returnType&&$(S).length>0||S.typeParameters||$(S).some(O=>O.type!=="Identifier"))),!o||S.body.type!=="ArrowFunctionExpression"?(u=r("body",n),p=S.body):e.call(g,"body")})();let m=!we(t.originalText,p)&&(Ki(p)||dl(p,u,t)||!a&&Hi(p)),y=e.key==="callee"&&pt(e.parent),c=Symbol("arrow-chain"),f=Tl(e,n,{signatureDocs:s,shouldBreak:a}),l,h=!1;return o&&(y||n.assignmentLayout)&&(h=!0,l=n.assignmentLayout==="chain-tail-arrow-chain"||y&&!m),u=xl(e,t,n,{bodyDoc:u,bodyComments:i,functionBody:p,shouldPutBodyOnSameLine:m}),D([D(h?E([F,f]):f,{shouldBreak:l,id:c})," =>",o?Ct(u,{groupId:c}):D(u),o&&y?b(F,"",{groupId:c}):""])}function Al(e,t,r,n){let{node:s}=e,u=[];if(s.async&&u.push("async "),Cn(e,t))u.push(r(["params",0]));else{let a=n.expandLastArg||n.expandFirstArg,o=An(e,r);if(a){if(re(o))throw new mt;o=D(ar(o))}u.push(D([Dt(e,r,t,a,!0),o]))}let i=J(e,t,{filter(a){let o=lt(t.originalText,I(a));return o!==!1&&t.originalText.slice(o,o+2)==="=>"}});return i&&u.push(" ",i),u}function dl(e,t,r){var n,s;return G(e)||se(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||U(e)||((n=t.label)==null?void 0:n.hug)!==!1&&(((s=t.label)==null?void 0:s.embed)||wr(e,r.originalText))}function Tl(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:s,key:u}=e;return u!=="callee"&&pt(s)||me(s)?D([r[0]," =>",E([d,P([" =>",d],r.slice(1))])],{shouldBreak:n}):u==="callee"&&pt(s)||t.assignmentLayout?D(P([" =>",d],r),{shouldBreak:n}):D(E(P([" =>",d],r)),{shouldBreak:n})}function xl(e,t,r,{bodyDoc:n,bodyComments:s,functionBody:u,shouldPutBodyOnSameLine:i}){let{node:a,parent:o}=e,p=r.expandLastArg&&ye(t,"all")?b(","):"",m=(r.expandLastArg||o.type==="JSXExpressionContainer")&&!A(a)?F:"";return i&&Hi(u)?[" ",D([b("","("),E([F,n]),b("",")"),p,m]),s]:(Ki(u)&&(n=D(["(",E([F,n]),F,")"])),i?[" ",n,s]:[E([d,n,s]),p,m])}var gl=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let s=t[n];if(r(s,n,t))return s}}},Qi=gl;function fr(e,t,r,n){let{node:s}=e,u=[],i=Qi(!1,s[n],a=>a.type!=="EmptyStatement");return e.each(({node:a})=>{a.type!=="EmptyStatement"&&(u.push(r()),a!==i&&(u.push(C),fe(a,t)&&u.push(C)))},n),u}function dn(e,t,r){let{node:n}=e,s=[];n.type==="StaticBlock"&&s.push("static "),s.push("{");let u=bs(e,t,r);if(u)s.push(E([C,u]),C);else{let{parent:i}=e,a=e.grandparent;i.type==="ArrowFunctionExpression"||i.type==="FunctionExpression"||i.type==="FunctionDeclaration"||i.type==="ObjectMethod"||i.type==="ClassMethod"||i.type==="ClassPrivateMethod"||i.type==="ForStatement"||i.type==="WhileStatement"||i.type==="DoWhileStatement"||i.type==="DoExpression"||i.type==="CatchClause"&&!a.finalizer||i.type==="TSModuleDeclaration"||i.type==="TSDeclareFunction"||n.type==="StaticBlock"||s.push(C)}return s.push("}"),s}function bs(e,t,r){var o;let{node:n}=e,s=L(n.directives),u=n.body.some(p=>p.type!=="EmptyStatement"),i=A(n,x.Dangling);if(!s&&!u&&!i)return"";let a=[];return s&&(a.push(fr(e,t,r,"directives")),(u||i)&&(a.push(C),fe(v(!1,n.directives,-1),t)&&a.push(C))),u&&a.push(fr(e,t,r,"body")),i&&a.push(J(e,t)),n.type==="Program"&&((o=e.parent)==null?void 0:o.type)!=="ModuleExpression"&&a.push(C),a}function hl(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}}var Tn=hl;function Sl(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function Zi(e,t,r){let{node:n}=e;return D([n.variance?r("variance"):"","[",E([r("keyTparam")," in ",r("sourceType")]),"]",Sl(n.optional),": ",r("propType")])}function Ps(e,t){return e==="+"||e==="-"?e+t:t}function ea(e,t,r){let{node:n}=e,s=Te(t.originalText,j(n),j(n.typeParameter));return D(["{",E([t.bracketSpacing?d:F,D([r("typeParameter"),n.optional?Ps(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?b(";"):""]),J(e,t),t.bracketSpacing?d:F,"}"],{shouldBreak:s})}var Er=Tn("typeParameters");function Bl(e,t,r){let{node:n}=e;return $(n).length===1&&n.type.startsWith("TS")&&!n[r][0].constraint&&e.parent.type==="ArrowFunctionExpression"&&!(t.filepath&&/\.ts$/.test(t.filepath))}function It(e,t,r,n){let{node:s}=e;if(!s[n])return"";if(!Array.isArray(s[n]))return r(n);let u=e.getNode(2),i=u&&St(u),a=e.match(m=>!(m[n].length===1&&Le(m[n][0])),void 0,(m,y)=>y==="typeAnnotation",m=>m.type==="Identifier",Ts);if(s[n].length===0||!a&&(i||s[n].length===1&&(s[n][0].type==="NullableTypeAnnotation"||gs(s[n][0]))))return["<",P(", ",e.map(r,n)),bl(e,t),">"];let p=s.type==="TSTypeParameterInstantiation"?"":Bl(e,t,n)?",":ye(t)?b(","):"";return D(["<",E([F,P([",",d],e.map(r,n))]),p,F,">"],{id:Er(s)})}function bl(e,t){let{node:r}=e;if(!A(r,x.Dangling))return"";let n=!A(r,x.Line),s=J(e,t,{indent:!n});return n?s:[s,C]}function xn(e,t,r){let{node:n,parent:s}=e,u=[n.type==="TSTypeParameter"&&n.const?"const ":""],i=n.type==="TSTypeParameter"?r("name"):n.name;if(s.type==="TSMappedType")return s.readonly&&u.push(Ps(s.readonly,"readonly")," "),u.push("[",i),n.constraint&&u.push(" in ",r("constraint")),s.nameType&&u.push(" as ",e.callParent(()=>r("nameType"))),u.push("]"),u;if(n.variance&&u.push(r("variance")),n.in&&u.push("in "),n.out&&u.push("out "),u.push(i),n.bound&&(n.usesExtendsBound&&u.push(" extends "),u.push(Y(e,r,"bound"))),n.constraint){let a=Symbol("constraint");u.push(" extends",D(E(d),{id:a}),ke,Ct(r("constraint"),{groupId:a}))}return n.default&&u.push(" = ",r("default")),D(u)}var ta=M(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function gn(e,t,r){let{node:n}=e,s=[ne(e),Yt(e),"class"],u=A(n.id,x.Trailing)||A(n.typeParameters,x.Trailing)||A(n.superClass)||L(n.extends)||L(n.mixins)||L(n.implements),i=[],a=[];if(n.id&&i.push(" ",r("id")),i.push(r("typeParameters")),n.superClass){let o=[kl(e,t,r),r("superTypeParameters")],p=e.call(m=>["extends ",le(m,o,t)],"superClass");u?a.push(d,D(p)):a.push(" ",p)}else a.push(ks(e,t,r,"extends"));if(a.push(ks(e,t,r,"mixins"),ks(e,t,r,"implements")),u){let o;na(n)?o=[...i,E(a)]:o=E([...i,a]),s.push(D(o,{id:ra(n)}))}else s.push(...i,...a);return s.push(" ",r("body")),s}var ra=Tn("heritageGroup");function Is(e){return b(C,"",{groupId:ra(e)})}function Pl(e){return["extends","mixins","implements"].reduce((t,r)=>t+(Array.isArray(e[r])?e[r].length:0),e.superClass?1:0)>1}function na(e){return e.typeParameters&&!A(e.typeParameters,x.Trailing|x.Line)&&!Pl(e)}function ks(e,t,r,n){let{node:s}=e;if(!L(s[n]))return"";let u=J(e,t,{marker:n});return[na(s)?b(" ",d,{groupId:Er(s.typeParameters)}):d,u,u&&C,n,D(E([d,P([",",d],e.map(r,n))]))]}function kl(e,t,r){let n=r("superClass"),{parent:s}=e;return s.type==="AssignmentExpression"?D(b(["(",E([F,n]),F,")"],n)):n}function hn(e,t,r){let{node:n}=e,s=[];return L(n.decorators)&&s.push(Cs(e,t,r)),s.push(Xt(n)),n.static&&s.push("static "),s.push(Yt(e)),n.override&&s.push("override "),s.push(yr(e,t,r)),s}function Sn(e,t,r){let{node:n}=e,s=[],u=t.semi?";":"";L(n.decorators)&&s.push(Cs(e,t,r)),s.push(Xt(n),ne(e)),n.static&&s.push("static "),s.push(Yt(e)),n.override&&s.push("override "),n.readonly&&s.push("readonly "),n.variance&&s.push(r("variance")),(n.type==="ClassAccessorProperty"||n.type==="AccessorProperty"||n.type==="TSAbstractAccessorProperty")&&s.push("accessor "),s.push(ft(e,t,r),V(e),mn(e),Y(e,r));let i=n.type==="TSAbstractPropertyDefinition"||n.type==="TSAbstractAccessorProperty";return[dt(e,t,r,s," =",i?void 0:"value"),u]}function sa(e,t,r){let{node:n}=e,s=[];return e.each(({node:u,next:i,isLast:a})=>{s.push(r()),!t.semi&&ta(u)&&Il(u,i)&&s.push(";"),a||(s.push(C),fe(u,t)&&s.push(C))},"body"),A(n,x.Dangling)&&s.push(J(e,t)),[L(n.body)?Is(e.parent):"","{",s.length>0?[E([C,s]),C]:"","}"]}function Il(e,t){var s;let{type:r,name:n}=e.key;if(!e.computed&&r==="Identifier"&&(n==="static"||n==="get"||n==="set")&&!e.value&&!e.typeAnnotation)return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let u=(s=t.key)==null?void 0:s.name;if(u==="in"||u==="instanceof")return!0}if(ta(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||t.kind==="get"||t.kind==="set")return!1;let i=t.value?t.value.generator:t.generator;return!!(t.computed||i)}case"TSIndexSignature":return!0}return!1}function ua(e,t){if(t.semi||Ls(e,t)||Os(e,t))return!1;let{node:r,key:n,parent:s}=e;return!!(r.type==="ExpressionStatement"&&(n==="body"&&(s.type==="Program"||s.type==="BlockStatement"||s.type==="StaticBlock"||s.type==="TSModuleBlock")||n==="consequent"&&s.type==="SwitchCase")&&e.call(()=>ia(e,t),"expression"))}function ia(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!Cn(e,t))return!0;break;case"UnaryExpression":{let{prefix:n,operator:s}=r;if(n&&(s==="+"||s==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(U(r))return!0}return Be(e,t)?!0:jt(r)?e.call(()=>ia(e,t),...Ir(r)):!1}function Ls({node:e,parent:t},r){return(r.parentParser==="markdown"||r.parentParser==="mdx")&&e.type==="ExpressionStatement"&&U(e.expression)&&t.type==="Program"&&t.body.length===1}function ws(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return ws(e.object)}return!1;case"Identifier":return!0;default:return!1}}function Os({node:e,parent:t},r){return(r.parser==="__vue_event_binding"||r.parser==="__vue_ts_event_binding")&&e.type==="ExpressionStatement"&&t.type==="Program"&&t.body.length===1}function aa(e,t,r){let n=[r("expression")];return Os(e,t)?ws(e.node.expression)&&n.push(";"):Ls(e,t)||t.semi&&n.push(";"),n}function oa(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(n.length===1)return n[0];let s=P([",",d],n);return t.__isVueForBindingLeft?["(",E([F,D(s)]),F,")"]:s}if(t.__isEmbeddedTypescriptGenericParameters){let n=e.map(r,"program","body",0,"typeParameters","params");return P([",",d],n)}}function la(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return pa(r);case"BigIntLiteral":return Bn(r.extra.raw);case"NumericLiteral":return Qe(r.extra.raw);case"StringLiteral":return Ie(at(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Qe(r.value)+"m";case"DirectiveLiteral":return ca(r.extra.raw,t);case"Literal":{if(r.regex)return pa(r.regex);if(r.bigint)return Bn(r.raw);if(r.decimal)return Qe(r.decimal)+"m";let{value:n}=r;return typeof n=="number"?Qe(r.raw):typeof n=="string"?Ll(e)?ca(r.raw,t):Ie(at(r.raw,t)):String(n)}}}function Ll(e){if(e.key!=="expression")return;let{parent:t}=e;return t.type==="ExpressionStatement"&&t.directive}function Bn(e){return e.toLowerCase()}function pa({pattern:e,flags:t}){return t=[...t].sort().join(""),`/${e}/${t}`}function ca(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}function wl(e,t,r){let n=e.originalText.slice(t,r);for(let s of e[Symbol.for("comments")]){let u=j(s);if(u>r)break;let i=I(s);if(ie.type==="ExportDefaultDeclaration"||e.type==="DeclareExportDeclaration"&&e.default;function bn(e,t,r){let{node:n}=e,s=[Pi(e,t,r),ne(e),"export",Da(n)?" default":""],{declaration:u,exported:i}=n;return A(n,x.Dangling)&&(s.push(" ",J(e,t)),Or(n)&&s.push(C)),u?s.push(" ",r("declaration")):(s.push(_l(n)),n.type==="ExportAllDeclaration"||n.type==="DeclareExportAllDeclaration"?(s.push(" *"),i&&s.push(" as ",r("exported"))):s.push(fa(e,t,r)),s.push(ya(e,t,r),Fa(e,t,r))),s.push(vl(n,t)),s}var Ol=M(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function vl(e,t){return t.semi&&(!e.declaration||Da(e)&&!Ol(e.declaration))?";":""}function vs(e,t=!0){return e&&e!=="value"?`${t?" ":""}${e}${t?"":" "}`:""}function _s(e,t){return vs(e.importKind,t)}function _l(e){return vs(e.exportKind)}function ya(e,t,r){let{node:n}=e;if(!n.source)return"";let s=[];return Ea(n,t)&&s.push(" from"),s.push(" ",r("source")),s}function fa(e,t,r){let{node:n}=e;if(!Ea(n,t))return"";let s=[" "];if(L(n.specifiers)){let u=[],i=[];e.each(()=>{let a=e.node.type;if(a==="ExportNamespaceSpecifier"||a==="ExportDefaultSpecifier"||a==="ImportNamespaceSpecifier"||a==="ImportDefaultSpecifier")u.push(r());else if(a==="ExportSpecifier"||a==="ImportSpecifier")i.push(r());else throw new _e(n,"specifier")},"specifiers"),s.push(P(", ",u)),i.length>0&&(u.length>0&&s.push(", "),i.length>1||u.length>0||n.specifiers.some(o=>A(o))?s.push(D(["{",E([t.bracketSpacing?d:F,P([",",d],i)]),b(ye(t)?",":""),t.bracketSpacing?d:F,"}"])):s.push(["{",t.bracketSpacing?" ":"",...i,t.bracketSpacing?" ":"","}"]))}else s.push("{}");return s}function Ea(e,t){return e.type!=="ImportDeclaration"||L(e.specifiers)||e.importKind==="type"?!0:Fr(t,j(e),j(e.source)).trimEnd().endsWith("from")}function Ml(e,t){var n,s;if((n=e.extra)!=null&&n.deprecatedAssertSyntax)return"assert";let r=Fr(t,I(e.source),(s=e.attributes)!=null&&s[0]?j(e.attributes[0]):I(e)).trimStart();return r.startsWith("assert")?"assert":r.startsWith("with")||L(e.attributes)?"with":void 0}function Fa(e,t,r){let{node:n}=e;if(!n.source)return"";let s=Ml(n,t);if(!s)return"";let u=[` ${s} {`];return L(n.attributes)&&(t.bracketSpacing&&u.push(" "),u.push(P(", ",e.map(r,"attributes"))),t.bracketSpacing&&u.push(" ")),u.push("}"),u}function Ca(e,t,r){let{node:n}=e,{type:s}=n,u=s.startsWith("Import"),i=u?"imported":"local",a=u?"local":"exported",o=n[i],p=n[a],m="",y="";return s==="ExportNamespaceSpecifier"||s==="ImportNamespaceSpecifier"?m="*":o&&(m=r(i)),p&&!jl(n)&&(y=r(a)),[vs(s==="ImportSpecifier"?n.importKind:n.exportKind,!1),m,m&&y?" as ":"",y]}function jl(e){if(e.type!=="ImportSpecifier"&&e.type!=="ExportSpecifier")return!1;let{local:t,[e.type==="ImportSpecifier"?"imported":"exported"]:r}=e;if(t.type!==r.type||!iu(t,r))return!1;if(te(t))return t.value===r.value&&De(t)===De(r);switch(t.type){case"Identifier":return t.name===r.name;default:return!1}}function Tt(e,t,r){var _;let n=t.semi?";":"",{node:s}=e,u=s.type==="ObjectTypeAnnotation",i=s.type==="TSEnumDeclaration"||s.type==="EnumBooleanBody"||s.type==="EnumNumberBody"||s.type==="EnumStringBody"||s.type==="EnumSymbolBody",a=[s.type==="TSTypeLiteral"||i?"members":s.type==="TSInterfaceBody"?"body":"properties"];u&&a.push("indexers","callProperties","internalSlots");let o=a.flatMap(T=>e.map(({node:W})=>({node:W,printed:r(),loc:j(W)}),T));a.length>1&&o.sort((T,W)=>T.loc-W.loc);let{parent:p,key:m}=e,y=u&&m==="body"&&(p.type==="InterfaceDeclaration"||p.type==="DeclareInterface"||p.type==="DeclareClass"),c=s.type==="TSInterfaceBody"||i||y||s.type==="ObjectPattern"&&p.type!=="FunctionDeclaration"&&p.type!=="FunctionExpression"&&p.type!=="ArrowFunctionExpression"&&p.type!=="ObjectMethod"&&p.type!=="ClassMethod"&&p.type!=="ClassPrivateMethod"&&p.type!=="AssignmentPattern"&&p.type!=="CatchClause"&&s.properties.some(T=>T.value&&(T.value.type==="ObjectPattern"||T.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&o.length>0&&Te(t.originalText,j(s),o[0].loc),f=y?";":s.type==="TSInterfaceBody"||s.type==="TSTypeLiteral"?b(n,";"):",",l=s.type==="RecordExpression"?"#{":s.exact?"{|":"{",h=s.exact?"|}":"}",g=[],S=o.map(T=>{let W=[...g,D(T.printed)];return g=[f,d],(T.node.type==="TSPropertySignature"||T.node.type==="TSMethodSignature"||T.node.type==="TSConstructSignatureDeclaration"||T.node.type==="TSCallSignatureDeclaration")&&A(T.node,x.PrettierIgnore)&&g.shift(),fe(T.node,t)&&g.push(C),W});if(s.inexact||s.hasUnknownMembers){let T;if(A(s,x.Dangling)){let W=A(s,x.Line);T=[J(e,t),W||Z(t.originalText,I(v(!1,ot(s),-1)))?C:d,"..."]}else T=["..."];S.push([...g,...T])}let B=(_=v(!1,o,-1))==null?void 0:_.node,O=!(s.inexact||s.hasUnknownMembers||B&&(B.type==="RestElement"||(B.type==="TSPropertySignature"||B.type==="TSCallSignatureDeclaration"||B.type==="TSMethodSignature"||B.type==="TSConstructSignatureDeclaration")&&A(B,x.PrettierIgnore))),R;if(S.length===0){if(!A(s,x.Dangling))return[l,h,Y(e,r)];R=D([l,J(e,t,{indent:!0}),F,h,V(e),Y(e,r)])}else R=[y&&L(s.properties)?Is(p):"",l,E([t.bracketSpacing?d:F,...S]),b(O&&(f!==","||ye(t))?f:""),t.bracketSpacing?d:F,h,V(e),Y(e,r)];return e.match(T=>T.type==="ObjectPattern"&&!L(T.decorators),Ms)||Le(s)&&(e.match(void 0,(T,W)=>W==="typeAnnotation",(T,W)=>W==="typeAnnotation",Ms)||e.match(void 0,(T,W)=>T.type==="FunctionTypeParam"&&W==="typeAnnotation",Ms))||!c&&e.match(T=>T.type==="ObjectPattern",T=>T.type==="AssignmentExpression"||T.type==="VariableDeclarator")?R:D(R,{shouldBreak:c})}function Ms(e,t){return(t==="params"||t==="parameters"||t==="this"||t==="rest")&&xs(e)}function Rl(e){let t=[e];for(let r=0;rc[X]===n),l=c.type===n.type&&!f,h,g,S=0;do g=h||n,h=e.getParentNode(S),S++;while(h&&h.type===n.type&&a.every(X=>h[X]!==g));let B=h||c,O=g;if(s&&(U(n[a[0]])||U(o)||U(p)||Rl(O))){y=!0,l=!0;let X=z=>[b("("),E([F,z]),F,b(")")],ue=z=>z.type==="NullLiteral"||z.type==="Literal"&&z.value===null||z.type==="Identifier"&&z.name==="undefined";m.push(" ? ",ue(o)?r(u):X(r(u))," : ",p.type===n.type||ue(p)?r(i):X(r(i)))}else{let X=z=>t.useTabs?E(r(z)):ge(2,r(z)),ue=[d,"? ",o.type===n.type?b("","("):"",X(u),o.type===n.type?b("",")"):"",d,": ",X(i)];m.push(c.type!==n.type||c[i]===n||f?ue:t.useTabs?Rr(E(ue)):ge(Math.max(0,t.tabWidth-2),ue))}let R=[u,i,...a].some(X=>A(n[X],ue=>ee(ue)&&Te(t.originalText,j(ue),I(ue)))),_=X=>c===B?D(X,{shouldBreak:R}):R?[X,Ee]:X,T=!y&&(q(c)||c.type==="NGPipeExpression"&&c.left===n)&&!c.computed,W=Wl(e),Fe=_([Jl(e,t,r),l?m:E(m),s&&T&&!W?F:""]);return f||W?D([E([F,Fe]),F]):Fe}function Nl(e,t){return(q(t)||t.type==="NGPipeExpression"&&t.left===e)&&!t.computed}function Gl(e,t,r,n){return[...e.map(u=>ot(u)),ot(t),ot(r)].flat().some(u=>ee(u)&&Te(n.originalText,j(u),I(u)))}var Ul=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function Yl(e){let{node:t}=e;if(t.type!=="ConditionalExpression")return!1;let r,n=t;for(let s=0;!r;s++){let u=e.getParentNode(s);if(u.type==="ChainExpression"&&u.expression===n||w(u)&&u.callee===n||q(u)&&u.object===n||u.type==="TSNonNullExpression"&&u.expression===n){n=u;continue}u.type==="NewExpression"&&u.callee===n||Ae(u)&&u.expression===n?(r=e.getParentNode(s+1),n=u):r=u}return n===t?!1:r[Ul.get(r.type)]===n}var js=e=>[b("("),E([F,e]),F,b(")")];function $t(e,t,r,n){if(!t.experimentalTernaries)return Aa(e,t,r);let{node:s}=e,u=s.type==="ConditionalExpression",i=s.type==="TSConditionalType"||s.type==="ConditionalTypeAnnotation",a=u?"consequent":"trueType",o=u?"alternate":"falseType",p=u?["test"]:["checkType","extendsType"],m=s[a],y=s[o],c=p.map(Re=>s[Re]),{parent:f}=e,l=f.type===s.type,h=l&&p.some(Re=>f[Re]===s),g=l&&f[o]===s,S=m.type===s.type,B=y.type===s.type,O=B||g,R=t.tabWidth>2||t.useTabs,_,T,W=0;do T=_||s,_=e.getParentNode(W),W++;while(_&&_.type===s.type&&p.every(Re=>_[Re]!==T));let Fe=_||f,X=n&&n.assignmentLayout&&n.assignmentLayout!=="break-after-operator"&&(f.type==="AssignmentExpression"||f.type==="VariableDeclarator"||f.type==="ClassProperty"||f.type==="PropertyDefinition"||f.type==="ClassPrivateProperty"||f.type==="ObjectProperty"||f.type==="Property"),ue=(f.type==="ReturnStatement"||f.type==="ThrowStatement")&&!(S||B),z=u&&Fe.type==="JSXExpressionContainer"&&e.grandparent.type!=="JSXAttribute",wt=Yl(e),Ht=Nl(s,f),k=i&&Be(e,t),N=R?t.useTabs?" ":" ".repeat(t.tabWidth-1):"",Q=Gl(c,m,y,t)||S||B,je=!O&&!l&&!i&&(z?m.type==="NullLiteral"||m.type==="Literal"&&m.value===null:nr(m,t)&&Nn(s.test,3)),xt=O||g||i&&!l||l&&u&&Nn(s.test,1)||je,Ws=[];!S&&A(m,x.Dangling)&&e.call(Re=>{Ws.push(J(Re,t),C)},"consequent");let Kt=[];A(s.test,x.Dangling)&&e.call(Re=>{Kt.push(J(Re,t))},"test"),!B&&A(y,x.Dangling)&&e.call(Re=>{Kt.push(J(Re,t))},"alternate"),A(s,x.Dangling)&&Kt.push(J(e,t));let Ns=Symbol("test"),wa=Symbol("consequent"),Ar=Symbol("test-and-consequent"),Oa=u?[js(r("test")),s.test.type==="ConditionalExpression"?Ee:""]:[r("checkType")," ","extends"," ",s.extendsType.type==="TSConditionalType"||s.extendsType.type==="ConditionalTypeAnnotation"||s.extendsType.type==="TSMappedType"?r("extendsType"):D(js(r("extendsType")))],Gs=D([Oa," ?"],{id:Ns}),va=r(a),dr=E([S||z&&(U(m)||l||O)?C:d,Ws,va]),_a=xt?D([Gs,O?dr:b(dr,D(dr,{id:wa}),{groupId:Ns})],{id:Ar}):[Gs,dr],wn=r(o),Us=je?b(wn,Rr(js(wn)),{groupId:Ar}):wn,zt=[_a,Kt.length>0?[E([C,Kt]),C]:B?C:je?b(d," ",{groupId:Ar}):d,":",B?" ":R?xt?b(N,b(O||je?" ":N," "),{groupId:Ar}):b(N," "):" ",B?Us:D([E(Us),z&&!je?F:""]),Ht&&!wt?F:"",Q?Ee:""];return X&&!Q?D(E([F,D(zt)])):X||ue?D(E(zt)):wt||i&&h?D([E([F,zt]),k?F:""]):f===Fe?D(zt):zt}function da(e,t,r,n){let{node:s}=e;if(rr(s))return la(e,t);let u=t.semi?";":"",i=[];switch(s.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),C];case"File":return oa(e,t,r)??r("program");case"Program":return bs(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return aa(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!A(s.expression)&&(se(s.expression)||G(s.expression))?["(",r("expression"),")"]:D(["(",E([F,r("expression")]),F,")"]);case"AssignmentExpression":return ji(e,t,r);case"VariableDeclarator":return Ri(e,t,r);case"BinaryExpression":case"LogicalExpression":return Hr(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return Oi(e,t,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return s.object&&i.push(r("object")),i.push(D(E([F,Kr(e,t,r)]))),i;case"Identifier":return[s.name,V(e),mn(e),Y(e,r)];case"V8IntrinsicIdentifier":return["%",s.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return Dn(e,r);case"FunctionDeclaration":case"FunctionExpression":return En(e,r,t,n);case"ArrowFunctionExpression":return zi(e,t,r,n);case"YieldExpression":return i.push("yield"),s.delegate&&i.push("*"),s.argument&&i.push(" ",r("argument")),i;case"AwaitExpression":if(i.push("await"),s.argument){i.push(" ",r("argument"));let{parent:a}=e;if(w(a)&&a.callee===s||q(a)&&a.object===s){i=[E([F,...i]),F];let o=e.findAncestor(p=>p.type==="AwaitExpression"||p.type==="BlockStatement");if((o==null?void 0:o.type)!=="AwaitExpression"||!ie(o.argument,p=>p===s))return D(i)}}return i;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return bn(e,t,r);case"ImportDeclaration":return ma(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Ca(e,t,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return dn(e,t,r);case"ClassBody":return sa(e,t,r);case"ThrowStatement":return $i(e,t,r);case"ReturnStatement":return Vi(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return zr(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return Tt(e,t,r);case"Property":return ht(s)?yr(e,t,r):Ss(e,t,r);case"ObjectProperty":return Ss(e,t,r);case"ObjectMethod":return yr(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return Vt(e,t,r);case"SequenceExpression":{let{parent:a}=e;if(a.type==="ExpressionStatement"||a.type==="ForStatement"){let o=[];return e.each(({isFirst:p})=>{p?o.push(r()):o.push(",",E([d,r()]))},"expressions"),D(o)}return D(P([",",d],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),u];case"UnaryExpression":return i.push(s.operator),/[a-z]$/.test(s.operator)&&i.push(" "),A(s.argument)?i.push(D(["(",E([F,r("argument")]),F,")"])):i.push(r("argument")),i;case"UpdateExpression":return i.push(r("argument"),s.operator),s.prefix&&i.reverse(),i;case"ConditionalExpression":return $t(e,t,r,n);case"VariableDeclaration":{let a=e.map(r,"declarations"),o=e.parent,p=o.type==="ForStatement"||o.type==="ForInStatement"||o.type==="ForOfStatement",m=s.declarations.some(c=>c.init),y;return a.length===1&&!A(s.declarations[0])?y=a[0]:a.length>0&&(y=E(a[0])),i=[ne(e),s.kind,y?[" ",y]:"",E(a.slice(1).map(c=>[",",m&&!p?C:d,c]))],p&&o.body!==s||i.push(u),D(i)}case"WithStatement":return D(["with (",r("object"),")",yt(s.body,r("body"))]);case"IfStatement":{let a=yt(s.consequent,r("consequent")),o=D(["if (",D([E([F,r("test")]),F]),")",a]);if(i.push(o),s.alternate){let p=A(s.consequent,x.Trailing|x.Line)||Or(s),m=s.consequent.type==="BlockStatement"&&!p;i.push(m?" ":C),A(s,x.Dangling)&&i.push(J(e,t),p?C:" "),i.push("else",D(yt(s.alternate,r("alternate"),s.alternate.type==="IfStatement")))}return i}case"ForStatement":{let a=yt(s.body,r("body")),o=J(e,t),p=o?[o,F]:"";return!s.init&&!s.test&&!s.update?[p,D(["for (;;)",a])]:[p,D(["for (",D([E([F,r("init"),";",d,r("test"),";",d,r("update")]),F]),")",a])]}case"WhileStatement":return D(["while (",D([E([F,r("test")]),F]),")",yt(s.body,r("body"))]);case"ForInStatement":return D(["for (",r("left")," in ",r("right"),")",yt(s.body,r("body"))]);case"ForOfStatement":return D(["for",s.await?" await":""," (",r("left")," of ",r("right"),")",yt(s.body,r("body"))]);case"DoWhileStatement":{let a=yt(s.body,r("body"));return i=[D(["do",a])],s.body.type==="BlockStatement"?i.push(" "):i.push(C),i.push("while (",D([E([F,r("test")]),F]),")",u),i}case"DoExpression":return[s.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return i.push(s.type==="BreakStatement"?"break":"continue"),s.label&&i.push(" ",r("label")),i.push(u),i;case"LabeledStatement":return s.body.type==="EmptyStatement"?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),s.handler?[" ",r("handler")]:"",s.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(s.param){let a=A(s.param,p=>!ee(p)||p.leading&&Z(t.originalText,I(p))||p.trailing&&Z(t.originalText,j(p),{backwards:!0})),o=r("param");return["catch ",a?["(",E([F,o]),F,") "]:["(",o,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[D(["switch (",E([F,r("discriminant")]),F,")"])," {",s.cases.length>0?E([C,P(C,e.map(({node:a,isLast:o})=>[r(),!o&&fe(a,t)?C:""],"cases"))]):"",C,"}"];case"SwitchCase":{s.test?i.push("case ",r("test"),":"):i.push("default:"),A(s,x.Dangling)&&i.push(" ",J(e,t));let a=s.consequent.filter(o=>o.type!=="EmptyStatement");if(a.length>0){let o=fr(e,t,r,"consequent");i.push(a.length===1&&a[0].type==="BlockStatement"?[" ",o]:E([C,o]))}return i}case"DebuggerStatement":return["debugger",u];case"ClassDeclaration":case"ClassExpression":return gn(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return hn(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return Sn(e,t,r);case"TemplateElement":return Ie(s.value.raw);case"TemplateLiteral":return Gr(e,r,t);case"TaggedTemplateExpression":return zu(r);case"PrivateIdentifier":return["#",s.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{i.push("module {");let a=r("body");return a&&i.push(E([C,a]),C),i.push("}"),i}case"InterpreterDirective":default:throw new _e(s,"ESTree")}}function Pn(e,t,r){let{parent:n,node:s,key:u}=e,i=[r("expression")];switch(s.type){case"AsConstExpression":i.push(" as const");break;case"AsExpression":case"TSAsExpression":i.push(" as ",r("typeAnnotation"));break;case"SatisfiesExpression":case"TSSatisfiesExpression":i.push(" satisfies ",r("typeAnnotation"));break}return u==="callee"&&w(n)||u==="object"&&q(n)?D([E([F,...i]),F]):i}function Ta(e,t,r){return Tt(e,r,t)}function kn(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let s="";return r.initializer&&(s=t("initializer")),r.init&&(s=t("init")),s?[n," = ",s]:n}function xa(e,t,r){let{node:n}=e,s;if(n.type==="EnumSymbolBody"||n.explicitType)switch(n.type){case"EnumBooleanBody":s="boolean";break;case"EnumNumberBody":s="number";break;case"EnumStringBody":s="string";break;case"EnumSymbolBody":s="symbol";break}return[s?`of ${s} `:"",Ta(e,t,r)]}function In(e,t,r){let{node:n}=e;return[ne(e),n.const?"const ":"","enum ",t("id")," ",n.type==="TSEnumDeclaration"?Ta(e,t,r):t("body")]}function Ln(e,t,r){let{node:n}=e,s=[ne(e),"interface"],u=[],i=[];n.type!=="InterfaceTypeAnnotation"&&u.push(" ",r("id"),r("typeParameters"));let a=n.typeParameters&&!A(n.typeParameters,x.Trailing|x.Line);return L(n.extends)&&i.push(a?b(" ",d,{groupId:Er(n.typeParameters)}):d,"extends ",(n.extends.length===1?du:E)(P([",",d],e.map(r,"extends")))),A(n.id,x.Trailing)||L(n.extends)?a?s.push(D([...u,E(i)])):s.push(D(E([...u,...i]))):s.push(...u,...i),s.push(" ",r("body")),D(s)}function ga(e,t,r){let{node:n}=e;if(br(n))return n.type.slice(0,-14).toLowerCase();let s=t.semi?";":"";switch(n.type){case"DeclareClass":return gn(e,t,r);case"DeclareFunction":return[ne(e),"function ",r("id"),r("predicate"),s];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",Y(e,r),s];case"DeclareVariable":return[ne(e),n.kind??"var"," ",r("id"),s];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return bn(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return Ni(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return Zr(e,t,r);case"IntersectionTypeAnnotation":return en(e,t,r);case"UnionTypeAnnotation":return tn(e,t,r);case"ConditionalTypeAnnotation":return $t(e,t,r);case"InferTypeAnnotation":return sn(e,t,r);case"FunctionTypeAnnotation":return rn(e,t,r);case"TupleTypeAnnotation":return Vt(e,t,r);case"TupleTypeLabeledElement":return an(e,t,r);case"TupleTypeSpreadElement":return un(e,t,r);case"GenericTypeAnnotation":return[r("id"),It(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return nn(e,t,r);case"TypeAnnotation":return on(e,t,r);case"TypeParameter":return xn(e,t,r);case"TypeofTypeAnnotation":return cn(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return pn(r);case"DeclareEnum":case"EnumDeclaration":return In(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return xa(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return kn(e,r);case"FunctionTypeParam":{let u=n.name?r("name"):e.parent.this===n?"this":"";return[u,V(e),u?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return Ln(e,t,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:u}=n;return yn.ok(u==="plus"||u==="minus"),u==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return Zi(e,t,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let u="";return n.proto?u="proto ":n.static&&(u="static "),[u,n.kind!=="init"?n.kind+" ":"",n.variance?r("variance"):"",ft(e,t,r),V(e),ht(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return Tt(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",V(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return Dn(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return Ie(at(De(n),t));case"NumberLiteralTypeAnnotation":return Qe(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return Bn(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),Y(e,r),")"];case"TypePredicate":return ln(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return It(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[e.key==="predicate"&&e.parent.type!=="DeclareFunction"&&!e.parent.returnType?": ":" ","%checks",...n.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return Pn(e,t,r)}}function ha(e,t,r){var i;let{node:n}=e;if(!n.type.startsWith("TS"))return;if(Pr(n))return n.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",u=[];switch(n.type){case"TSThisType":return"this";case"TSTypeAssertion":{let a=!(G(n.expression)||se(n.expression)),o=D(["<",E([F,r("typeAnnotation")]),F,">"]),p=[b("("),E([F,r("expression")]),F,b(")")];return a?He([[o,r("expression")],[o,D(p,{shouldBreak:!0})],[o,r("expression")]]):D([o,r("expression")])}case"TSDeclareFunction":return En(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return dn(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return Tt(e,t,r);case"TSTypeAliasDeclaration":return Zr(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return hn(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Sn(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return Gr(e,r,t);case"TSNamedTupleMember":return an(e,t,r);case"TSRestType":return un(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return Ln(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return It(e,t,r,"params");case"TSTypeParameter":return xn(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return Pn(e,t,r);case"TSArrayType":return pn(r);case"TSPropertySignature":return[n.readonly?"readonly ":"",ft(e,t,r),V(e),Y(e,r)];case"TSParameterProperty":return[Xt(n),n.static?"static ":"",n.override?"override ":"",n.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return cn(e,r);case"TSIndexSignature":{let a=n.parameters.length>1?b(ye(t)?",":""):"",o=D([E([F,P([", ",F],e.map(r,"parameters"))]),a,F]),p=e.parent.type==="ClassBody"&&e.key==="body";return[p&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?o:"","]",Y(e,r),p?s:""]}case"TSTypePredicate":return ln(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[n.isTypeOf?"typeof ":"","import(",r("argument"),")",n.qualifier?[".",r("qualifier")]:"",It(e,t,r,n.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return nn(e,t,r);case"TSTypeOperator":return[n.operator," ",r("typeAnnotation")];case"TSMappedType":return ea(e,t,r);case"TSMethodSignature":{let a=n.kind&&n.kind!=="method"?`${n.kind} `:"";u.push(Xt(n),a,n.computed?"[":"",r("key"),n.computed?"]":"",V(e));let o=Dt(e,r,t,!1,!0),p=n.returnType?"returnType":"typeAnnotation",m=n[p],y=m?Y(e,r,p):"",c=kt(n,y);return u.push(c?D(o):o),m&&u.push(D(y)),D(u)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return In(e,r,t);case"TSEnumMember":return kn(e,r);case"TSImportEqualsDeclaration":return[n.isExport?"export ":"","import ",_s(n,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:a}=e,o=a.type==="TSModuleDeclaration",p=((i=n.body)==null?void 0:i.type)==="TSModuleDeclaration";if(o)u.push(".");else if(u.push(ne(e)),!(n.kind==="global"||n.global)){let y=n.kind??(te(n.id)||Fr(t,j(n),j(n.id)).trim().endsWith("module")?"module":"namespace");u.push(y," ")}return u.push(r("id")),p?u.push(r("body")):n.body?u.push(" ",D(r("body"))):u.push(s),u}case"TSConditionalType":return $t(e,t,r);case"TSInferType":return sn(e,t,r);case"TSIntersectionType":return en(e,t,r);case"TSUnionType":return tn(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return rn(e,t,r);case"TSTupleType":return Vt(e,t,r);case"TSTypeReference":return[r("typeName"),It(e,t,r,"typeParameters")];case"TSTypeAnnotation":return on(e,t,r);case"TSEmptyBodyFunctionExpression":return Fn(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return hs(e,r,"?");case"TSJSDocNonNullableType":return hs(e,r,"!");case"TSParenthesizedType":default:throw new _e(n,"TypeScript")}}function Xl(e,t,r,n){if($r(e))return Fi(e,t);for(let s of[bi,gi,ga,ha,da]){let u=s(e,t,r,n);if(u!==void 0)return u}}var Vl=M(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function $l(e,t,r,n){var y;e.isRoot&&((y=t.__onHtmlBindingRoot)==null||y.call(t,e.node,t));let s=Xl(e,t,r,n);if(!s)return"";let{node:u}=e;if(Vl(u))return s;let i=L(u.decorators),a=ki(e,t,r),o=u.type==="ClassExpression";if(i&&!o)return or(s,c=>D([a,c]));let p=Be(e,t),m=ua(e,t);return!a&&!p&&!m?s:or(s,c=>[m?";":"",p?"(":"",p&&o&&i?[E([d,a,c]),d]:[a,c],p?")":""])}var Sa=$l;var Hl={avoidAstMutation:!0};var Ba=[{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],parsers:["jsonc"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}];var Js={};Tr(Js,{getVisitorKeys:()=>Pa,massageAstNode:()=>Ia,print:()=>Ql});var Kl={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]},ba=Kl;var zl=Sr(ba),Pa=zl;function Ql(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),C];case"ArrayExpression":{if(n.elements.length===0)return"[]";let s=e.map(()=>e.node===null?"null":r(),"elements");return["[",E([C,P([",",C],s)]),C,"]"]}case"ObjectExpression":return n.properties.length===0?"{}":["{",E([C,P([",",C],e.map(r,"properties"))]),C,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[n.operator==="+"?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return ka(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return ka(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new _e(n,"JSON")}}function ka(e){return e.key==="key"&&e.parent.type==="ObjectProperty"}var Zl=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function Ia(e,t){let{type:r}=e;if(r==="ObjectProperty"){let{key:n}=e;n.type==="Identifier"?t.key={type:"StringLiteral",value:n.name}:n.type==="NumericLiteral"&&(t.key={type:"StringLiteral",value:String(n.value)});return}if(r==="UnaryExpression"&&e.operator==="+")return t.argument;if(r==="ArrayExpression"){for(let[n,s]of e.elements.entries())s===null&&t.elements.splice(n,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:e.quasis[0].value.cooked}}Ia.ignoredProperties=Zl;var Cr={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Lt="JavaScript",em={arrowParens:{category:Lt,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Cr.bracketSameLine,bracketSpacing:Cr.bracketSpacing,jsxBracketSameLine:{category:Lt,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Lt,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalTernaries:{category:Lt,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Cr.singleQuote,jsxSingleQuote:{category:Lt,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Lt,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Lt,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Cr.singleAttributePerLine},La=em;var tm={estree:Rs,"estree-json":Js},rm=[...$s,...Ba];var LT=qs;export{LT as default,rm as languages,La as options,tm as printers}; diff --git a/node_modules/prettier/plugins/flow.js b/node_modules/prettier/plugins/flow.js index 6d8730d..8ecbf5c 100644 --- a/node_modules/prettier/plugins/flow.js +++ b/node_modules/prettier/plugins/flow.js @@ -1,21 +1,21 @@ -(function(i){function e(){var f=i();return f.default||f}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.flow=e()}})(function(){"use strict";var xN0=Object.create;var dm=Object.defineProperty;var rN0=Object.getOwnPropertyDescriptor;var eN0=Object.getOwnPropertyNames;var tN0=Object.getPrototypeOf,nN0=Object.prototype.hasOwnProperty;var QK=(p0,wx)=>()=>(wx||p0((wx={exports:{}}).exports,wx),wx.exports),FK=(p0,wx)=>{for(var tr in wx)dm(p0,tr,{get:wx[tr],enumerable:!0})},HK=(p0,wx,tr,gr)=>{if(wx&&typeof wx=="object"||typeof wx=="function")for(let C1 of eN0(wx))!nN0.call(p0,C1)&&C1!==tr&&dm(p0,C1,{get:()=>wx[C1],enumerable:!(gr=rN0(wx,C1))||gr.enumerable});return p0};var qK=(p0,wx,tr)=>(tr=p0!=null?xN0(tN0(p0)):{},HK(wx||!p0||!p0.__esModule?dm(tr,"default",{value:p0,enumerable:!0}):tr,p0)),uN0=p0=>HK(dm({},"__esModule",{value:!0}),p0);var GK=QK(DM=>{(function(p0){typeof globalThis!="object"&&(this?wx():(p0.defineProperty(p0.prototype,"_T_",{configurable:!0,get:wx}),_T_));function wx(){var tr=this||self;tr.globalThis=tr,delete p0.prototype._T_}})(Object);(function(p0){"use strict";var wx="symbol",tr=271,gr=126548,C1="renders",ir=71127,ur="member_property",k1=65007,la=273,Nt=66517,Vn="jsx_attribute_value_expression",km=119980,zn="function_declaration",Re="<2>",hm=68466,VM="%=",_m="??",wm=70080,J4="&",Rt="identifier",V4=72163,Tm=71723,Sm="properties",Em=183969,gm=68223,Kn="function_return_annotation",Am=124903,zM=261,Pm=70106,KM=241,ZM="(",WM=213,Cm=120074,Nm=70708,Rm=71679,Zn="logical",f2="camlinternalFormat.ml",Wn="type_guard_annotation",Im=92975,$M=">>>",Om="RestElement",Lm=67897,QM=179,Mm="start",Dm=113775,z4=126521,FM="%i",V3="`",HM="#",jm=43702,K4=126,Um=110947,$n="function_identifier",Z4=119893,Bm=70366,Ym=65547,Xm=43743,Jm=-43,sv=8238,qM=",",ov=8286,Qn="keyof_type",Vm=66717,W4=12336,GM=201,zm=71338,$4=11565,Km=69289,Zm=55291,Wm=73030,$m=70479,Qm=69572,Fm=11623,Fn="tuple_spread_element",Hn="component_type_rest_param",vv=8239,Hm=64310,pa="@]",qm=42993,Q4=11558,F4="Map.bal",z3="public",bM=-32,da="Literal",qn="jsx_member_expression_identifier",Gn="for_in_assignment_pattern",Gm=71450,H4=126557,nn=103,bm=12292,xk=110579,q4=120597,rk=13311,ek=12348,bn="export_default_declaration_decl",x7="tuple_type",tk=113663,G4=170,nk=67413,xD="Assert_failure",rD="comments",K3="%S",un=127343600,uk=12341,ik=67646,eD="ENOTEMPTY",fk=72160,ck=70187,tD=222,sk=12343,nD=2147483647,ok=126624,vk=43442,ak=70312,uD=281,r7="interface_type",av="new",lk=66256,b4=68296,pk=124908,xp=126579,rp=70107,dk=249,yk=71167,e7="union_type",qr=248,mk=126546,t7="enum_bigint_member",iD=133,kk=67871,hk=66955,fD=1027,n7="class_declaration",u7="optional_call",cD="a string",ep=11703,sD="<<",tp=126564,i7="jsx_element",f7="object_property_type",_k=94207,c7="enum_declaration",wk=68023,Tk=67669,Sk=8318,oD="prefix",lv="this",Ek=126578,s7="if_consequent_statement",vD=-696510241,gk=66963,pv="default",np=72967,It=101,aD="buffer.ml",Ak=74649,fn=65535,Pk=43709,lD=175,_o="component",pD="===",dv=117,o7="jsx_identifier",dD="EnumDefaultedMember",up=70006,Ck=70161,Nk=126633,Rk=66965,v7="member_property_expression",Ik=101589,Ok=64274,ya="function",Lk=66303,Mk=42954,Dk=126529,jk=72191,a7="new_",Uk=64433,ip=126559,Bk=72144,yD="==",wo=-744106340,Yk=43359,Xk=171,mD="Printexc.handle_uncaught_exception",Jk=66735,Vk=126534,zk=74879,Kk=42785,fp=120629,Z3="0o",kD="End_of_file",Zk=66175,hD="&=",Wk="nan",cp=126503,l7="pattern_number_literal",$k=43470,p7="import_namespace_specifier",Qk=77711,sp=70302,d7="component_param",op="@])",vp=126515,ma=118,Ie="continue",Fk=43798,ap=";@ ",Hk=74751,qk="src/parser/statement_parser.ml",Gk="rmdir",bk=94177,y7="for_in_statement",_D=12520,wD="TypeParameterInstantiation",hx="",TD="**=",xh=120126,SD=197,rh=67829,lp="_bigarr02",m7="export_named_declaration_specifier",pp=": No such file or directory",k7="render_type",dp=64319,eh=69926,h7="pattern_object_p",ED="TypeAnnotation",_7="array_type",W3="@[%s =@ ",th=72847,w7="export_default_declaration",yp=126590,nh=42774,uh=": Not a directory",ka="let",yv=12288,q2="argument",G2="/",mp="an identifier",Ps="typeof",kp=68116,ih=182,T7="declare_export_declaration_decl",fh=67589,ch=66771,$3="class",gD="tokens",hp=70281,Q3=255,sh=43638,mv="key",oh=69955,AD=">>",S7="function_expression_or_method",vh=43587,cn="block",ah=100351,_p="mixed",lh=66503,ph="ENOTDIR",dh=65135,E7="string_literal",ce="@ ",yh=43334,g7="if_alternate_statement",mh=70448,wp=8485,A7="type_args",kh=69864,P7="if_statement",PD="+=",C7="typeof_identifier",Tp="with",Sp=65595,hh=64286,_h=71086,Cs="true",wh=69423,N7="catch_clause",Th="e",ha="asserts",CD=">>=",Ep=131,Sh=43388,Eh=43887,Z1=-48,gh=120779,ND=190,Ah=194,R7="pattern_bigint_literal",Ph=71351,Ch=65629,I7="call",Nh=-42,gp=126553,Rh=43695,RD=177,Ih=42124,Oh=12703,Lh=12442,Mh=11718,Ap=70449,Pp=126547,Dh=67462,Ns="left",O7="infer_type",jh=11742,Uh=65597,Cp="Unix.Unix_error",Bh=122623,Yh=124911,Xh=72959,Jh="opaque",L7="object_internal_slot_property_type",ID="Enum `",kv=65279,Vh=71983,zh=12329,B1=110,M7="spread_property",OD="importKind",F3=" =",D7="remote_identifier",j7="labeled_statement",U7="jsx_fragment",Kh=120770,B7="function_param",D2=112,Zh="exportKind",Y7="binary",Rs="`.",Wh=42511,LD="<=",X7="jsx_spread_attribute",j2="import",J7="typeof_member_identifier",$h=69414,Qh=19967,Np=11687,Fh=93823,MD=67714067,DD=209,Hh=71903,qh="of",Gh=72e3,Rp="typeArguments",V7="type_identifier",z7="pattern_array_element_pattern",Ip=69744,_a=192,K7="class_element",Z7="export_source",W7="component_param_pattern",bh=42508,x_=125124,jD="Unexpected token `",$7="for_in_left_declaration",Q7="object_call_property_type",r_="abstract",e_=8584,t_=68786,n_=71999,Op=123214,u_=123565,Lp=186,F7="class_implements_interface",Mp=126536,i_=69749,UD="Invalid legacy octal ",f_=71295,c_=66927,H7="pattern_expression",s_=11679,o_=-61,Dp=65141,v_=11694,q7="update_expression",BD="minus",Oe="debugger",a_=71352,l_=65470,wa="number",p_=123627,jp=64322,Up=43471,G7="for_of_assignment_pattern",Bp=126589,d_=43784,YD="Internal Error: Found object private prop",y_=183983,Gr="id",m_=123190,Yp="finally",Xp=120070,k_=72095,b7="as_expression",xu="syntax",h_=110591,Is="false",XD=-10,Jp="AssignmentPattern",ru="typeof_expression",__=43764,JD="FunctionTypeParam",eu="function_body_any",w_=126627,T_=71998,S_=126543,tu="call_type_arg",E_=64316,Vp=64285,g_=8454,VD=137,zD="**",nu="object_type_property_setter",A_=68607,sn=108,P_="out",C_=68799,hv=65278,uu="jsx_member_expression",N_=92728,_v="null",R_=66431,I_=72249,on=128,zp=119994,O_=66207,L_=43583,Kp="else",Zp=94179,Wp=11735,M_=64911,iu="jsx_attribute_name_namespaced",KD="!",D_=42539,j_=72250,U_=71215,B_=69746,Y_=65487,fu="pattern_object_property_key",ZD=", ",X_=8505,J_="=",V_=64111,z_=8507,$p=120134,Qp="while",K_=120596,Z_=43002,H3="protected",W_=68479,$_=43395,Q_=68252,WD="v",F_=70278,H_="rendersType",q_=70853,Fp=120145,G_=69297,b_=73112,Hp=8488,xw=68351,rw=42655,cu="for_of_left_declaration",ew=44031,tw="Failure",nw=92159,su="object_key_identifier",$D=195,wv="bigint",ou="import_default_specifier",q3=256,vu="member",QD="!==",au="component_identifier",uw=73008,iw=72283,qp=126500,Gp=120127,lu="jsx_attribute_name",pu="for_statement_init",fw=67711,du="private_name",bp="case",x8=8489,yu="import_specifier",cw=64279,sw=94098,ow=119974,mu="pattern_string_literal",vw=72969,FD=193,HD="!=",r8=126520,aw=71944,qD=259,lw=42191,ku="generic_qualified_identifier_type",Tv="implements",pw=194559,GD="%",G3="hasUnknownMembers",dw=71039,bD=211,yw=83526,hu="init",_u="jsx_attribute_value",mw=70271,Ta=240,wu="function_type_return_annotation",kw=70018,hw="rest",Tu="readonly_type",_w=512,ww=68095,Tw=120003,e8=126563,t8=71236,Sw=69375,Ew=68850,gw=70105,Aw=43866,xj="T_RENDERS_QUESTION",n8=888960333,Pw=43013,Su="assignment_pattern",Cw="specifiers",rj=710,ej=145,vn="as",Nw=120570,Rw=11507,tj=204,Eu="jsx_element_name_identifier",gu="pattern_object_property_string_literal_key",Au="class_expression",nj=257,Iw=44002,Ow=82943,Sa="src/parser/type_parser.ml",Ea="test",uj=-67,Lw=64217,u8="package",ij="collect_comments",fj="Pervasives.do_at_exit",Mw=125183,Dw=42606,Pu="tuple_element",Cu="enum_boolean_member",jw=65312,i8=119981,Uw=65495,f8=120085,cj=-80,Bw=138,c8=126555,Yw=65276,h1=128,sj="{ ",Nu="for_statement",Ru="class_method",s8="if",Iu="generic_type",Nr=113,Xw=43071,Jw=72001,Vw=71131,zw=70002,oj="renders*",Kw=42888,o8=8469,b3="instanceof",Zw=11502,v8=94178,Ww=64321,$w=64913,vj="Division_by_zero",Qw=92879,Fw=71945,aj=185,Hw=66938,a8=65535,qw=113800,lj=": file descriptor already closed",l8=223,pj="*=",Gw=68899,Ou="switch_case",Lu="pattern_array_element",Mu="enum_string_member",Du="pattern_object_property_bigint_literal_key",dj="visit_trailing_comment",p8="export",d8=120122,y8=43823,bw=43792,xT=42527,rT=70726,ju="enum_defaulted_member",eT=68497,m8=72349,Uu="program",Bu="member_type_identifier",tT="object",Yu="for_of_statement_lhs",nT=113791,uT=67391,Xu="jsx_spread_child",k8=126554,h8=8526,_8=43880,w8=69415,iT=43822,Ju="pattern_identifier",fT=93052,ga="readonly",Le="name",cT=68119,sT=71494,oT=120121,T8=8486,yj=2047,Vu="enum_symbol_body",mj=142,kj="PropertyDefinition",vT=177976,zu="declare_class",aT=65489,lT=72367,pT=70440,Ku="import_named_specifier",hj="Popping lex mode from empty stack",dT=68111,yT=66463,_j="*-/",mT=43187,S8=8487,kT=11567,hT=67861,_T=` -`,wT=66383,Zu="declare_interface",TT=-24976191,ST=238,ET=-24,wj="@ }@]",gT=43645,AT=176,PT=119976,E8=69959,CT=126519,NT=";",Tj="trailingComments",g8=65548,Wu="number_literal",Aa=449540197,RT=43704,A8=126584,IT=8467,Sj="||",P8=11695,OT="exported",LT=120712,Os="void",Ej="mixins",MT=92783,DT=215,$u="body_expression",gj="%ni",xl=">",Qu="jsx_child",jT=8516,Fu="optional_indexed_access_type",Hu="typeof_type",qu="spread_element",UT=42963,Aj="@[",Gu="component_params",BT=43042,C8="",bu="function_",N8="for",R8=65575,an="params",YT=168,Pj="win32",Sv=8202,Cj="@",I8="^",Nj=164,ft="optional",XT=65574,rl="boolean",Rj=139,JT=12548,O8=120539,Ij="Not_found",el=246,xi="expression_statement",VT="EBADF",zT=66815,ri="module_ref_literal",KT=55203,ei="function_param_type",ZT=73064,L8=70279,WT=110580,Oj=233,$T="<",Lj="visit_leading_comment",QT=66855,FT=66966,HT=66499,qT=111355,GT=68680,bT=206,Mj="--",xS=65497,M8=11711,ti="function_param_pattern",Ev="constructor",rS=5760,Dj="infinity",D8=43642,DN0="fs",eS=92991,j8=126544,tS=101640,U8=72162,nS=67583,B8=8468,U2="typeParameters",jj="elements",uS=71423,Uj="Sys_blocked_io",ni="interface_declaration",ui="variable_declaration",ii="function_rest_param",fi="type",iS="Invalid number ",fS=" : flags Open_rdonly and Open_wronly are not compatible",cS=69404,ci="jsx_element_name_member_expression",Y8="keyof",X8="never",si="with_",ln=32768,Bj="|=",J8=70404,V8=70441,sS=42969,tl="declare",oS=73061,oi="object_type",vi="object_property_value_type",vS=69687,Yj="Invalid binary/octal ",Xj=230,aS=64324,Jj="range",Vj="infer",lS=120744,ai="array_element",pS=70730,dS=43641,zj=166,yS=70461,mS=69890,kS=69487,hS=74862,_S=68149,z8=73065,Kj="%a",wS=72348,Zj=172,li="jsx_expression",TS=65663,SS=126495,ES=245,gS=124907,pi="member_property_identifier",Wj=226,AS=43615,di="comment",K8=119965,yi="catch_clause_pattern",mi="object_type_property_getter",$j=136,PS=43019,CS=67455,Z8=126628,Qj=331416730,Fj="the start of a statement",NS=122654,RS="shorthand",IS=43595,OS=11710,ki="typeof_qualified_identifier",LS=72750,Hj="elementType",H1="typeAnnotation",MS=124895,qj=162,W8=11559,DS=67382,Gj="??=",jS=72329,US="target",hi="component_type",bj=180,BS=189,xU=8206,YS=43513,XS=173823,JS=126467,_i="type_guard",VS=43700,zS=12783,$8=8305,wi="type_annotation",rU=141,Me="break",Q8=42999,KS=65019,eU=160,ZS=70460,Ti="expression_or_spread",WS=")",Si="class_private_field",$S=55215,QS=65338,FS=40981,nl="members",Ei="import_declaration",HS=69634,F8=94031,qS="ENOENT",GS=8457,tU="satisfies",gi="generic_identifier_type",Ai="function_this_param",bS=66993,Pi="type_",xE=67423,rE=11557,eE=12799,H8=239,tE=93026,nE=66377,uE=123180,nU=221,uU=-594953737,iE=67967,fE=43586,ct=105,iU="src/parser/flow_lexer.ml",cE=66559,Ci="class_property_value",fU=150,sE=67637,cU="closedir",oE=43010,vE=8521,q8=69956,aE=42959,lE=212,pE=92735,G8="}",ul="method",dE=11498,b8=247,se="empty",Ni=16777215,yE=161,mE=42887,Ri=116,Ii="type_identifier_reference",x5=126634,kE=68029,sU="regexp",hE=70414,il=121,Oi="template_literal_element",_E=8449,wE=126562,gv=12287,TE=-45,r5=64297,e5=126523,SE=43301,Ot=111,EE=126498,gE=43776,oU="EEXIST",AE=119892,PE=43807,vU=4096,Av=252,Ls=255,CE=68295,Li="variable_declarator_pattern",Mi="do_while",t5="catch",NE=66962,RE=120654,Di=125,ji="label_identifier",IE=11263,OE=8525,Ui="assignment",LE=191456,ME=43273,aU="%u",DE=65381,jE=110927,UE=65479,BE=120538,Pv="await",YE=71487,XE="jsError",JE=110588,VE=120084,zE=42890,Pa=224,Bi="object_key",KE=43696,ZE=73647,WE=43761,$E=12295,QE=64967,n5=11647,lU=191,Lt=123,FE="generator",HE=123583,Yi="for_of_statement",Xi="enum_bigint_body",qE=110959,GE=92995,bE=120686,xg="b",rg=119969,u5=126522,i5=64318,eg=71839,f5=126602,tg=65908,fl=65536,pU=231,dU=-602162310,yU="comment_bounds",Mt="-",mU=-55,Ji="pattern_object_property",ng=43493,ug=69505,ig=8471,kU=277,fg=187,c5=120745,Vi="enum_member_identifier",cg=71959,sg=66863,og=65594,vg=253,s5='"',o5=70286,zi="jsx_attribute_value_literal",ag=68447,hU="the",lg="index out of bounds",Ki="declare_export_declaration",Zi="jsx_attribute",Wi="class_extends",br=122,c2=106,$i="binding_pattern",Qi="ts_type_cast",pg=113807,dg=93951,Ca=119,yg="types",mg=8335,Fi="statement_fork_point",Na="_",kg=65500,Hi="function_type",hg=68220,qi="statement_list",Ra=-835925911,_g=123535,wg=258,v5=43815,_U=199,a5=120571,Tg=67514,wU="Property",l5=72713,TU="Unexpected ",p5=169,SU=", characters ",d5=43867,Sg=42537,Gi="component_declaration",EU=" : is a directory",bi="object_key_number_literal",Xr=127,s2=-36,cl=912068366,sl="delete",st=114,Eg=120076,xf="regexp_literal",gg=65370,Ag=65481,d1="value",Pg=68405,Ia="operator",ol="const",gU=283,To=109,y5="any",Cg=69958,Ng=70831,Rg=73111,Ig=72767,Og="Identifier",rf="jsx_opening_attribute",ef="conditional_type",Lg="loc",Mg=67071,m5=120004,Dg=43492,jg=70005,AU=188,k5=72272,Ug=11389,Bg=251,Yg=73055,h5=70280,PU=286,_5=1114111,Xg=66421,CU="Stack_overflow",Jg=70301,Vg=19903,So="0x",zg=69967,Kg=12447,w5=66512,NU=`Fatal error: exception %s -`,vl=1e3,Zg=69295,T5=120093,RU=">=",IU=149,S5=64325,tf="class_identifier",Wg=119967,$g=68415,OU="end",nf="enum_boolean_body",uf="member_private_name",ff="super_expression",Qg=71955,Fg=126514,E5=67593,Hg=66939,qg=12591,g5=126538,Gg=110590,cf="component_renders_annotation",bg=72703,xA=72105,A5=65598,rA=73727,P5=126504,C5=126551,eA=70143,al="from",sf="class_property",of="enum_number_body",tA=42559,nA=93759,uA=66994,pn="right",LU=225,iA=67702,fA=65473,cA=43697,N5=70855,sA=119993,oA=72103,vA=178205,vf="call_type_args",aA=66511,af="export_batch_specifier",lf="component_type_param",dn=782176664,Cv="get",ll="local",MU=228,pf="object_mapped_type_property",df="class_decorator",DU=220,yf="enum_body",jU="<<=",lA=71956,pA=69839,Oa="super",dA=173791,yA=71942,q1="expression",mA=72440,La=254,kA=70412,UU="renders?",mf="try_catch",BU=32752,kf="declare_module_exports",hA=12320,YU=134,_A=94175,pl="enum",XU=196,hf="import_source",wA=43814,TA=120069,_f="while_",R5=126537,SA=43262,wf="function_rest_param_type",EA=66378,I5=119996,Tf="declare_component",gA=73097,AA=70783,PA=43503,CA=131071,NA=11492,RA=92766,JU=173,IA=113770,OA=73029,LA=66978,Sf="tagged_template",Ef="jsx_element_name",gf="for_init_declaration",MA=123213,Af="object_indexer_property_type",Pf="object_spread_property_type",O5=72970,L5=70854,DA=110930,dl="var",VU=217,jA=119972,UA=69622,BA=63743,YA=42237,XA=870530776,M5="returnType",zU=56320,KU=143,Ma="computed",JA=42735,Cf="arg_list",VA=67461,Nf="export_named_declaration",zA=72817,KA=73439,ZA=43782,WA=66775,$A=70655,D5="bool",QA=65140,FA=75075,HA=126651,qA=71947,GA=42961,bA=12735,xP=78894,rP=64262,ZU=237,b2="interface",WU="Match_failure",eP=42962,tP=69748,$U="leadingComments",Rf="this_expression",yl=461894857,j5=12592,QU=8204,nP=119807,uP=66348,If="declare_variable",iP=8348,Of="optional_member",Lf=120,Mf="arrow_function",fP=72768,cP=70851,Df="array",sP=43249,U5=126468,oP=177983,vP="compare: functional value",aP=126550,lP=64847,jf="binding_type_identifier",pP=120132,Uf="function_params",dP=93071,ml=1024,yP=42783,FU=1039100673,HU="@{",mP=12352,kP=42653,hP=120628,Bf="declare_function",Yf="for_in_statement_lhs",_P=72271,wP=69807,TP=67826,Xf="syntax_opt",Jf="object_key_bigint_literal",qU=243,SP=94032,GU="Undefined_recursive_module",bU=-1053382366,EP=72242,Vf="variance_opt",gP=101631,AP="arguments",PP=72161,CP=8511,B5="unknown",NP=43560,xB="the end of an expression statement (`;`)",rB=1026,RP=12543,IP=11670,eB="?",OP=69247,Y5=11631,X5="line",LP=72202,zf="pattern_object_rest_property",Dt=" ",MP=43487,Eo=115,DP=-673950933,Kf="intersection_type",jP=120144,kl="is",UP=178207,BP=100343,tB="||=",nB="f",J5=8455,Zf=102,Wf="pattern_object_property_number_literal_key",YP=70418,XP=8543,uB="Internal Error: Found private field in object props",V5=126540,z5=119995,Nv=8287,$f="indexed_access_type",Qf="export_named_specifier",iB=266,fB=224,JP=124926,VP=-103,cB=167,K5=65344,Z5=126530,zP=113788,KP=67505,ZP="property",WP=43014,De="return",Ms=-85,$P=126601,sB=214,oB="children",Ff="type_alias",W5=43259,QP=126583,FP=71958,HP=65613,qP=67431,$5=126535,GP=69599,Hf="type_params",qf="object_key_computed",bP=124910,B2="variance",Q5=11727,xC=66954,rC=126463,Gf="catch_body",eC=69445,bf="type_param",xc="component_type_params",tC=124902,F5=120687,vB="collect_comments_opt",nC=15,uC=120485,iC=70416,fC=125259,rc="jsx_namespaced_name",cC=43712,sC=72712,aB="~",H5=12448,ec="jsx_member_expression_object",q5=126499,G5=-97,tc="pattern_object_property_identifier_key",lB=219,nc="component_body",uc="opaque_type",ic=".",oC=43009,vC="consequent",pB="SpreadElement",Y1="body",dB=178,yB=202,fc="jsx_opening_element",cc="declare_module",b5=67638,aC=8477,sc="object_type_property",lC=110882,oc="function_body",pC=94111,mB="module",kB="alternate",dC=67839,Rv=8191,yC=43881,hB=": closedir failed",go="kind",vc="tuple_labeled_element",Iv=-46,mC=67640,ac="declare_type_alias",xd=70750,kC=77808,hl="column",lc="jsx_closing_element",hC=66977,_C="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",wC=65786,pc="function_expression",jt=104,rd=11719,TC=11505,SC="mkdir",EC=70319,_B="Invalid_argument",gC=43738,AC=113817,dc="bigint_literal",PC=70084,CC=126566,ed="do",td=42622,yc="computed_key",mc="pattern_object_property_computed_key",wB="fd ",nd=126571,NC=126619,TB=140,Ao="prototype",SB=208,RC=67004,ud=130,EB=242,gB=">>>=",IC=68863,OC=11726,Ut="raw",LC=64466,xe=107,MC=67679,kc="enum_string_body",DC=244,AB="unreachable jsxtext",PB="*",jC=66335,UC=126570,CB=229,BC=" : file already exists",id=184,YC=67807,XC=70753,hc="boolean_literal",JC=65437,VC=70451,zC=67002,Da=124,_c="conditional",fd=43260,NB="Sys_error",KC=123135,_l="meta",ZC=64109,wc="pattern_array_rest_element",WC=43255,cd=67644,Tc="pattern_object_rest_property_pattern",Sc="sequence",$C=65855,QC=110951,FC=67643,Ec="predicate_expression",je="static",HC=120512,qC="declaration",sd=64317,GC=68437,od=126558,gc="meta_property",bC=11564,Ac="declare_enum",yn="pattern",xN=216,RB=282,IB=289,rN=68191,vd="undefined",ad=8319,ld=120133,eN=132,tN=42239,OB=-99,nN=124927,uN=120092,iN=43137,Pc="component_rest_param",LB=144,MB="expected *",fN=125251,DB="%li",cN=55242,sN=12294,Cc="enum_number_member",Po="in",jB="\\\\",Ov=":",oN=68115,UB="Cygwin",vN=77823,aN=65615,pd=70162,BB="/static/",lN=11519,pN=72966,dN=12686,yN=165,mN=183,wl=129,dd=72192,kN=42964,yd="try",md=120655,hN=11702,YB="expressions",_N=2048,Nc="class_body",wN=55238,XB=240,TN=66915,SN=43311,EN=43018,JB=235,gN=73648,VB="([^/]+)",AN=125258,PN=64829,CN=68735,zB="++",KB=163,ZB="qualification",WB=57343,$B=931,Rc="default_opt",NN=71235,QB=8472,RN=71934,FB=205,HB=218,qB="callee",IN=43711,ON=64284,LN=43754,MN=43790,GB="%Li",Ic="pattern_array_rest_element_pattern",kd="decorators",DN=8304,Oc="statement",hd=73062,Lc="jsx_children",jN=70492,UN=64255,BN=11630,YN=1255,_d=67592,wd=43519,Td=64311,Sd=12539,XN="proto",Ed=120513,JN=68031,Lv="source",Tl="a",VN=93047,zN=92927,KN=126588,ZN=73458,WN=67742,$N=43714,bB=288,xY=236,QN=-253313196,Sl="label",rY="@[<2>{ ",gd=126539,Ad=126552,FN=120487,eY="Out_of_memory",HN=605857695,qN=94026,tY=267,Pd=126496,Co="async",nY=203,Cd=126560,GN=68287,Mc="unary_expression",bN=-26065557,xR=110587,uY=280,Nd=120771,rR=69762,eR=126502,ja="set",Dc="object_",jc="template_literal",tR=43258,Uc="nullable_type",Ds="int_of_string",iY="^=",Ue="predicate",Ua="string",Rd=8450,fY="camlinternalMod.ml",nR=70285,js="+",uR=110575,cY=198,Bc="extends",sY=-692038429,Id=67827,oY=210,vY=227,Od="explicitType",Ld=70452,iR=70497,Ba=63,El="private",fR=64296,cR=67591,sR=92909,aY="T_JSX_TEXT",oR="Fatal error: exception ",vR=120137,Md=68120,Yc="pattern_array_e",aR=119964,lR=92862,pR=66461,lY="&&=",pY=174,o2=8231,Xc="null_literal",dY="/=",dR=66811,Dd=70108,yR=67504,mR=11686,kR=67001,hR=" : flags Open_text and Open_binary are not compatible",_R=43741,wR=66204,G1=8233,Jc="type_annotation_hint",TR=123197,Vc="object_property",yY="${",jd=70480,mY="&&",zc="type_cast",gl="%d",Ud=8484,kY=207,SR=70066,ER=68324,Bd=120713,hY=135,Yd=126556,re="0",Y2="yield",Xd=126591,ot=100,gR=69551,Kc="jsx_element_name_namespaced",_Y=232,Zc="object_key_string_literal",Wc="function_this_param_type",$c="pattern_object_property_pattern",Be="throw",Ye="switch",wY=2048,Jd=119970,Qc="toplevel_statement_list",Ya=250,AR=12438,Fc="class_implements",Hc="variable_declarator",PR=43713,Vd=68096,CR=70457,NR=12538,RR=11734,TY="-=",SY=234,qc="component_param_name",IR=43123,Gc="class_",EY="|",OR=200,LR=43518,MR=8483,bc="jsx_attribute_name_identifier",DR=181;function hZ(x,r,e,t,u){if(t<=r)for(var i=1;i<=u;i++)e[t+i]=x[r+i];else for(var i=u;i>=1;i--)e[t+i]=x[r+i];return 0}function _Z(x){for(var r=[0];x!==0;){for(var e=x[1],t=1;t=e.l||e.t==2&&u>=e.c.length))e.c=x.t==4?zd(x.c,r,u):r==0&&x.c.length==u?x.c:x.c.substr(r,u),e.t=e.c.length==e.l?0:2;else if(e.t==2&&t==e.c.length)e.c+=x.t==4?zd(x.c,r,u):r==0&&x.c.length==u?x.c:x.c.substr(r,u),e.t=e.c.length==e.l?0:2;else{e.t!=4&&Kd(e);var i=x.c,f=e.c;if(x.t==4)if(t<=r)for(var o=0;o=0;o--)f[t+o]=i[r+o];else{for(var a=Math.min(u,i.length-r),o=0;o>=1,x==0)return e;r+=r,t++,t==9&&r.slice(0,1)}}function Zd(x){x.t==2?x.c+=Xa(x.l-x.c.length,"\0"):x.c=zd(x.c,0,x.c.length),x.t=0}function jR(x){if(x.length<24){for(var r=0;rXr)return!1;return!0}else return!/[^\x00-\x7f]/.test(x)}function gY(x){for(var r=hx,e=hx,t,u,i,f,o=0,a=x.length;o_w?(e.substr(0,1),r+=e,e=hx,r+=x.slice(o,d)):e+=x.slice(o,d),d==a)break;o=d}f=1,++o=55295&&f<57344)&&(f=2)):(f=3,++o1114111)&&(f=3)))))),f<4?(o-=f,e+="\uFFFD"):f>fn?e+=String.fromCharCode(55232+(f>>10),zU+(f&1023)):e+=String.fromCharCode(f),e.length>ml&&(e.substr(0,1),r+=e,e=hx)}return r+e}function Bs(x,r,e){this.t=x,this.c=r,this.l=e}Bs.prototype.toString=function(){switch(this.t){case 9:return this.c;default:Zd(this);case 0:if(jR(this.c))return this.t=9,this.c;this.t=8;case 8:return this.c}},Bs.prototype.toUtf16=function(){var x=this.toString();return this.t==9?x:gY(x)},Bs.prototype.slice=function(){var x=this.t==4?this.c.slice():this.c;return new Bs(this.t,x,this.l)};function AY(x){return new Bs(0,x,x.length)}function jN0(x){return x}function xs(x){return AY(x)}function rs(x,r,e,t,u){return Us(xs(x),r,e,t,u),0}function PY(x){var r=p0.process;if(r&&r.env&&r.env[x]!=null)return r.env[x];if(p0.jsoo_static_env&&p0.jsoo_static_env[x])return p0.jsoo_static_env[x]}var UR=0;(function(){var x=PY("OCAMLRUNPARAM");if(x!==void 0)for(var r=x.split(qM),e=0;e>>0>=x.l&&EZ(),Kr(x,r,e)}function oe(x,r){switch(x.t&6){default:if(r>=x.c.length)return 0;case 0:return x.c.charCodeAt(r);case 4:return x.c[r]}}function Ys(x,r){var e=x.l>=0?x.l:x.l=x.length,t=r.length,u=e-t;if(u==0)return x.apply(null,r);if(u<0){var i=x.apply(null,r.slice(0,e));return typeof i!="function"?i:Ys(i,r.slice(e))}else{switch(u){case 1:{var i=function(a){for(var d=new Array(t+1),k=0;k>>0>=x.length-1&&Al(),x}function gZ(x){return isFinite(x)?Math.abs(x)>=22250738585072014e-324?0:x!=0?1:2:isNaN(x)?4:3}function AZ(x){return 0}var PZ=Math.log2&&Math.log2(11235582092889474e291)==1020;function CZ(x){if(PZ)return Math.floor(Math.log2(x));var r=0;if(x==0)return-1/0;if(x>=1)for(;x>=2;)x/=2,r++;else for(;x<1;)x*=2,r--;return r}function YR(x){var r=new Float32Array(1);r[0]=x;var e=new Int32Array(r.buffer);return e[0]|0}var CY=Math.pow(2,-24);function NY(x){throw x}function RY(){NY(X2.Division_by_zero)}function fr(x,r,e){this.lo=x&Ni,this.mi=r&Ni,this.hi=e&fn}fr.prototype.caml_custom="_j",fr.prototype.copy=function(){return new fr(this.lo,this.mi,this.hi)},fr.prototype.ucompare=function(x){return this.hi>x.hi?1:this.hix.mi?1:this.mix.lo?1:this.loe?1:rx.mi?1:this.mix.lo?1:this.lo>24),e=-this.hi+(r>>24);return new fr(x,r,e)},fr.prototype.add=function(x){var r=this.lo+x.lo,e=this.mi+x.mi+(r>>24),t=this.hi+x.hi+(e>>24);return new fr(r,e,t)},fr.prototype.sub=function(x){var r=this.lo-x.lo,e=this.mi-x.mi+(r>>24),t=this.hi-x.hi+(e>>24);return new fr(r,e,t)},fr.prototype.mul=function(x){var r=this.lo*x.lo,e=(r*CY|0)+this.mi*x.lo+this.lo*x.mi,t=(e*CY|0)+this.hi*x.lo+this.mi*x.mi+this.lo*x.hi;return new fr(r,e,t)},fr.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0},fr.prototype.isNeg=function(){return this.hi<<16<0},fr.prototype.and=function(x){return new fr(this.lo&x.lo,this.mi&x.mi,this.hi&x.hi)},fr.prototype.or=function(x){return new fr(this.lo|x.lo,this.mi|x.mi,this.hi|x.hi)},fr.prototype.xor=function(x){return new fr(this.lo^x.lo,this.mi^x.mi,this.hi^x.hi)},fr.prototype.shift_left=function(x){return x=x&63,x==0?this:x<24?new fr(this.lo<>24-x,this.hi<>24-x):x<48?new fr(0,this.lo<>48-x):new fr(0,0,this.lo<>x|this.mi<<24-x,this.mi>>x|this.hi<<24-x,this.hi>>x):x<48?new fr(this.mi>>x-24|this.hi<<48-x,this.hi>>x-24,0):new fr(this.hi>>x-48,0,0)},fr.prototype.shift_right=function(x){if(x=x&63,x==0)return this;var r=this.hi<<16>>16;if(x<24)return new fr(this.lo>>x|this.mi<<24-x,this.mi>>x|r<<24-x,this.hi<<16>>x>>>16);var e=this.hi<<16>>31;return x<48?new fr(this.mi>>x-24|this.hi<<48-x,this.hi<<16>>x-24>>16,e&fn):new fr(this.hi<<16>>x-32,e,e)},fr.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23,this.mi=(this.mi<<1|this.lo>>23)&Ni,this.lo=this.lo<<1&Ni},fr.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&Ni,this.mi=(this.mi>>>1|this.hi<<23)&Ni,this.hi=this.hi>>>1},fr.prototype.udivmod=function(x){for(var r=0,e=this.copy(),t=x.copy(),u=new fr(0,0,0);e.ucompare(t)>0;)r++,t.lsl1();for(;r>=0;)r--,u.lsl1(),e.ucompare(t)>=0&&(u.lo++,e=e.sub(t)),t.lsr1();return{quotient:u,modulus:e}},fr.prototype.div=function(x){var r=this;x.isZero()&&RY();var e=r.hi^x.hi;r.hi&ln&&(r=r.neg()),x.hi&ln&&(x=x.neg());var t=r.udivmod(x).quotient;return e&ln&&(t=t.neg()),t},fr.prototype.mod=function(x){var r=this;x.isZero()&&RY();var e=r.hi;r.hi&ln&&(r=r.neg()),x.hi&ln&&(x=x.neg());var t=r.udivmod(x).modulus;return e&ln&&(t=t.neg()),t},fr.prototype.toInt=function(){return this.lo|this.mi<<24},fr.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo},fr.prototype.toArray=function(){return[this.hi>>8,this.hi&Ls,this.mi>>16,this.mi>>8&Ls,this.mi&Ls,this.lo>>16,this.lo>>8&Ls,this.lo&Ls]},fr.prototype.lo32=function(){return this.lo|(this.mi&Ls)<<24},fr.prototype.hi32=function(){return this.mi>>>8&fn|this.hi<<16};function Wd(x,r,e){return new fr(x,r,e)}function $d(x){if(!isFinite(x))return isNaN(x)?Wd(1,0,BU):x>0?Wd(0,0,BU):Wd(0,0,65520);var r=x==0&&1/x==-1/0?ln:x>=0?0:ln;r&&(x=-x);var e=CZ(x)+1023;e<=0?(e=0,x/=Math.pow(2,-rB)):(x/=Math.pow(2,e-fD),x<16&&(x*=2,e-=1),e==0&&(x/=2));var t=Math.pow(2,24),u=x|0;x=(x-u)*t;var i=x|0;x=(x-i)*t;var f=x|0;return u=u&nC|r|e<<4,Wd(f,i,u)}function Pl(x){return x.toArray()}function IY(x,r,e){if(x.write(32,r.dims.length),x.write(32,r.kind|r.layout<<8),r.caml_custom==lp)for(var t=0;t>4;if(u==yj)return r|e|t&nC?NaN:t&ln?-1/0:1/0;var i=Math.pow(2,-24),f=(r*i+e)*i+(t&nC);return u>0?(f+=16,f*=Math.pow(2,u-fD)):f*=Math.pow(2,-rB),t&ln&&(f=-f),f}function VR(x){for(var r=x.length,e=1,t=0;t>>24&Ls|(r&fn)<<8,r>>>16&fn)}function zR(x){return x.hi32()}function KR(x){return x.lo32()}var IZ=lp;function No(x,r,e,t){this.kind=x,this.layout=r,this.dims=e,this.data=t}No.prototype.caml_custom=IZ,No.prototype.offset=function(x){var r=0;if(typeof x=="number"&&(x=[x]),x instanceof Array||b1("bigarray.js: invalid offset"),this.dims.length!=x.length&&b1("Bigarray.get/set: bad number of dimensions"),this.layout==0)for(var e=0;e=this.dims[e])&&Al(),r=r*this.dims[e]+x[e];else for(var e=this.dims.length-1;e>=0;e--)(x[e]<1||x[e]>this.dims[e])&&Al(),r=r*this.dims[e]+(x[e]-1);return r},No.prototype.get=function(x){switch(this.kind){case 7:var r=this.data[x*2+0],e=this.data[x*2+1];return RZ(r,e);case 10:case 11:var t=this.data[x*2+0],u=this.data[x*2+1];return[La,t,u];default:return this.data[x]}},No.prototype.set=function(x,r){switch(this.kind){case 7:this.data[x*2+0]=KR(r),this.data[x*2+1]=zR(r);break;case 10:case 11:this.data[x*2+0]=r[1],this.data[x*2+1]=r[2];break;default:this.data[x]=r;break}return 0},No.prototype.fill=function(x){switch(this.kind){case 7:var r=KR(x),e=zR(x);if(r==e)this.data.fill(r);else for(var t=0;tf)return 1;if(i!=f){if(!r)return NaN;if(i==i)return 1;if(f==f)return-1}}break;case 7:for(var u=0;ux.data[u+1])return 1;if(this.data[u]>>>0>>0)return-1;if(this.data[u]>>>0>x.data[u]>>>0)return 1}break;case 2:case 3:case 4:case 5:case 6:case 8:case 9:case 12:for(var u=0;ux.data[u])return 1}break}return 0};function Va(x,r,e,t){this.kind=x,this.layout=r,this.dims=e,this.data=t}Va.prototype=new No,Va.prototype.offset=function(x){return typeof x!="number"&&(x instanceof Array&&x.length==1?x=x[0]:b1("Ml_Bigarray_c_1_1.offset")),(x<0||x>=this.dims[0])&&Al(),x},Va.prototype.get=function(x){return this.data[x]},Va.prototype.set=function(x,r){return this.data[x]=r,0},Va.prototype.fill=function(x){return this.data.fill(x),0};function LY(x,r,e,t){var u=OY(x);return VR(e)*u!=t.length&&b1("length doesn't match dims"),r==0&&e.length==1&&u==1?new Va(x,r,e,t):new No(x,r,e,t)}function J2(x){X2.Failure||(X2.Failure=[qr,tw,-3]),BR(X2.Failure,x)}function MY(x,r,e){var t=x.read32s();(t<0||t>16)&&J2("input_value: wrong number of bigarray dimensions");var u=x.read32s(),i=u&Ls,f=u>>8&1,o=[];if(e==lp)for(var a=0;a>>32-15,r=jY(r,461845907),x^=r,x=x<<13|x>>>32-13,(x+(x<<2)|0)+-430675100|0}function OZ(x,r){return x=Xs(x,KR(r)),x=Xs(x,zR(r)),x}function UY(x,r){return OZ(x,$d(r))}function BY(x){var r=VR(x.dims),e=0;switch(x.kind){case 2:case 3:case 12:r>q3&&(r=q3);var t=0,u=0;for(u=0;u+4<=x.data.length;u+=4)t=x.data[u+0]|x.data[u+1]<<8|x.data[u+2]<<16|x.data[u+3]<<24,e=Xs(e,t);switch(t=0,r&3){case 3:t=x.data[u+2]<<16;case 2:t|=x.data[u+1]<<8;case 1:t|=x.data[u+0],e=Xs(e,t)}break;case 4:case 5:r>h1&&(r=h1);var t=0,u=0;for(u=0;u+2<=x.data.length;u+=2)t=x.data[u+0]|x.data[u+1]<<16,e=Xs(e,t);r&1&&(e=Xs(e,x.data[u]));break;case 6:r>64&&(r=64);for(var u=0;u64&&(r=64);for(var u=0;u32&&(r=32),r*=2;for(var u=0;u64&&(r=64);for(var u=0;u32&&(r=32);for(var u=0;u0?u(r,x,t):u(x,r,t);if(t&&i!=i)return e;if(+i!=+i)return+i;if(i|0)return i|0}return e}function WR(x){return typeof x=="string"&&!/[^\x00-\xff]/.test(x)}function $R(x){return x instanceof Bs}function JY(x){if(typeof x=="number")return vl;if($R(x))return Av;if(WR(x))return 1252;if(x instanceof Array&&x[0]===x[0]>>>0&&x[0]<=Q3){var r=x[0]|0;return r==La?0:r}else{if(x instanceof String)return _D;if(typeof x=="string")return _D;if(x instanceof Number)return vl;if(x&&x.caml_custom)return YN;if(x&&x.compare)return 1256;if(typeof x=="function")return 1247;if(typeof x=="symbol")return 1251}return 1001}function Bt(x,r){return xr?1:0}function YZ(x,r){return x.t&6&&Zd(x),r.t&6&&Zd(r),x.cr.c?1:0}function Qd(x,r,e){for(var t=[];;){if(!(e&&x===r)){var u=JY(x);if(u==Ya){x=x[1];continue}var i=JY(r);if(i==Ya){r=r[1];continue}if(u!==i)return u==vl?i==YN?XY(x,r,-1,e):-1:i==vl?u==YN?XY(r,x,1,e):1:ur)return 1;if(x!=r){if(!e)return NaN;if(x==x)return 1;if(r==r)return-1}break;case 1001:if(xr)return 1;if(x!=r){if(!e)return NaN;if(x==x)return 1;if(r==r)return-1}break;case 1251:if(x!==r)return e?1:NaN;break;case 1252:var x=x,r=r;if(x!==r){if(xr)return 1}break;case 12520:var x=x.toString(),r=r.toString();if(x!==r){if(xr)return 1}break;case 246:case 254:default:if(AZ(u)){b1("compare: continuation value");break}if(x.length!=r.length)return x.length1&&t.push(x,r,1);break}}if(t.length==0)return 0;var a=t.pop();r=t.pop(),x=t.pop(),a+10)if(r==0&&(e>=x.l||x.t==2&&e>=x.c.length))t==0?(x.c=hx,x.t=2):(x.c=Xa(e,String.fromCharCode(t)),x.t=e==x.l?0:2);else for(x.t!=4&&Kd(x),e+=r;r0&&r===r||(x=x.replace(/_/g,hx),r=+x,x.length>0&&r===r||/^[+-]?nan$/i.test(x)))return r;var e=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)(p([+-]?[0-9]+))?/i.exec(x);if(e){var t=e[3].replace(/0+$/,hx),u=parseInt(e[1]+e[2]+t,16),i=(e[5]|0)-4*t.length;return r=u*Math.pow(2,i),r}if(/^\+?inf(inity)?$/i.test(x))return 1/0;if(/^-inf(inity)?$/i.test(x))return-1/0;J2("float_of_string")}function FR(x){x=x;var r=x.length;r>31&&b1("format_int: format too long");for(var e={justify:js,signstyle:Mt,filler:Dt,alternate:!1,base:0,signedconv:!1,width:0,uppercase:!1,sign:1,prec:-1,conv:nB},t=0;t=0&&u<=9;)e.width=e.width*10+u,t++;t--;break;case".":for(e.prec=0,t++;u=x.charCodeAt(t)-48,u>=0&&u<=9;)e.prec=e.prec*10+u,t++;t--;case"d":case"i":e.signedconv=!0;case"u":e.base=10;break;case"x":e.base=16;break;case"X":e.base=16,e.uppercase=!0;break;case"o":e.base=8;break;case"e":case"f":case"g":e.signedconv=!0,e.conv=u;break;case"E":case"F":case"G":e.signedconv=!0,e.uppercase=!0,e.conv=u.toLowerCase();break}}return e}function HR(x,r){x.uppercase&&(r=r.toUpperCase());var e=r.length;x.signedconv&&(x.sign<0||x.signstyle!=Mt)&&e++,x.alternate&&(x.base==8&&(e+=1),x.base==16&&(e+=2));var t=hx;if(x.justify==js&&x.filler==Dt)for(var u=e;u20?(g-=20,k/=Math.pow(10,g),k+=new Array(g+1).join(re),T>0&&(k=k+ic+new Array(T+1).join(re)),k):k.toFixed(T)}var t,u=FR(x),i=u.prec<0?6:u.prec;if((r<0||r==0&&1/r==-1/0)&&(u.sign=-1,r=-r),isNaN(r))t=Wk,u.filler=Dt;else if(!isFinite(r))t="inf",u.filler=Dt;else switch(u.conv){case"e":var t=r.toExponential(i),f=t.length;t.charAt(f-3)==Th&&(t=t.slice(0,f-1)+re+t.slice(f-1));break;case"f":t=e(r,i);break;case"g":i=i||1,t=r.toExponential(i-1);var o=t.indexOf(Th),a=+t.slice(o+1);if(a<-4||r>=1e21||r.toFixed(0).length>i){for(var f=o-1;t.charAt(f)==re;)f--;t.charAt(f)==ic&&f--,t=t.slice(0,f+1)+t.slice(o),f=t.length,t.charAt(f-3)==Th&&(t=t.slice(0,f-1)+re+t.slice(f-1));break}else{var d=i;if(a<0)d-=a+1,t=r.toFixed(d);else for(;t=r.toFixed(d),t.length>i+1;)d--;if(d){for(var f=t.length-1;t.charAt(f)==re;)f--;t.charAt(f)==ic&&f--,t=t.slice(0,f+1)}}break}return HR(u,t)}function Fd(x,r){if(x==gl)return hx+r;var e=FR(x);r<0&&(e.signedconv?(e.sign=-1,r=-r):r>>>=0);var t=r.toString(e.base);if(e.prec>=0){e.filler=Dt;var u=e.prec-t.length;u>0&&(t=Xa(u,re)+t)}return HR(e,t)}var zY=0;function Js(){return zY++}function KY(){return[0]}var Hd=[];function Gx(x,r,e){var t=x[1],u=Hd[e];if(u===void 0)for(var i=Hd.length;i>1|1,r_w?(e.substr(0,1),r+=e,e=hx,r+=x.slice(i,o)):e+=x.slice(i,o),o==f)break;i=o}t>6),e+=String.fromCharCode(on|t&Ba)):t<55296||t>=WB?e+=String.fromCharCode(fB|t>>12,on|t>>6&Ba,on|t&Ba):t>=56319||i+1==f||(u=x.charCodeAt(i+1))WB?e+="\xEF\xBF\xBD":(i++,t=(t<<10)+u-56613888,e+=String.fromCharCode(XB|t>>18,on|t>>12&Ba,on|t>>6&Ba,on|t&Ba)),e.length>ml&&(e.substr(0,1),r+=e,e=hx)}return r+e}function Yt(x){return jR(x)?x:VZ(x)}function zZ(x,r,e){if(!isFinite(x))return isNaN(x)?Yt(Wk):Yt(x>0?Dj:"-infinity");var t=x==0&&1/x==-1/0?1:x>=0?0:1;t&&(x=-x);var u=0;if(x!=0)if(x<1)for(;x<1&&u>-1022;)x*=2,u--;else for(;x>=2;)x/=2,u++;var i=u<0?hx:js,f=hx;if(t)f=Mt;else switch(e){case 43:f=js;break;case 32:f=Dt;break;default:break}if(r>=0&&r<13){var o=Math.pow(2,r*4);x=Math.round(x*o)/o}var a=x.toString(16);if(r>=0){var d=a.indexOf(ic);if(d<0)a+=ic+Xa(r,re);else{var k=d+1+r;a.length>24&Ni,x>>31&fn)}function ZZ(x){return x.toInt()}function WZ(x){return+x.isNeg()}function GR(x){return x.neg()}function $Z(x,r){var e=FR(x);e.signedconv&&WZ(r)&&(e.sign=-1,r=GR(r));var t=hx,u=qd(e.base),i="0123456789abcdef";do{var f=r.udivmod(u);r=f.quotient,t=i.charAt(ZZ(f.modulus))+t}while(!KZ(r));if(e.prec>=0){e.filler=Dt;var o=e.prec-t.length;o>0&&(t=Xa(o,re)+t)}return HR(e,t)}function Xx(x){return x.length}function fx(x,r){return x.charCodeAt(r)}function QZ(x,r){return x.add(r)}function FZ(x,r){return x.mul(r)}function bR(x,r){return x.ucompare(r)<0}function ZY(x){var r=0,e=Xx(x),t=10,u=1;if(e>0)switch(fx(x,r)){case 45:r++,u=-1;break;case 43:r++,u=1;break}if(r+1=48&&x<=57?x-48:x>=65&&x<=90?x-55:x>=97&&x<=br?x-87:-1}function Rl(x){var r=ZY(x),e=r[0],t=r[1],u=r[2],i=qd(u),f=new fr(Ni,268435455,fn).udivmod(i).quotient,o=fx(x,e),a=Gd(o);(a<0||a>=u)&&J2(Ds);for(var d=qd(a);;)if(e++,o=fx(x,e),o!=95){if(a=Gd(o),a<0||a>=u)break;bR(f,d)&&J2(Ds),a=qd(a),d=QZ(FZ(i,d),a),bR(d,a)&&J2(Ds)}return e!=Xx(x)&&J2(Ds),u==10&&bR(new fr(0,0,ln),d)&&J2(Ds),t<0&&(d=GR(d)),d}function bd(x){return x.toFloat()}function vt(x){var r=ZY(x),e=r[0],t=r[1],u=r[2],i=Xx(x),f=-1>>>0,o=e=u)&&J2(Ds);var d=a;for(e++;e=u)break;d=u*d+a,d>f&&J2(Ds)}return e!=i&&J2(Ds),d=t*d,u==10&&(d|0)!=d&&J2(Ds),d|0}function HZ(x){return x.slice(1)}function xr(x){return jR(x)?x:gY(x)}function qZ(x){for(var r={},e=1;e=0?x.l:x.l=x.length}function bZ(x){return function(){for(var r=GZ(x),e=new Array(r),t=0;t1&&t.pop();break;case".":break;case"":break;default:t.push(e[u]);break}return t.unshift(r[0]),t.orig=x,t}var uW=["E2BIG","EACCES","EAGAIN",VT,"EBUSY","ECHILD","EDEADLK","EDOM",oU,"EFAULT","EFBIG","EINTR","EINVAL","EIO","EISDIR","EMFILE","EMLINK","ENAMETOOLONG","ENFILE","ENODEV",qS,"ENOEXEC","ENOLCK","ENOMEM","ENOSPC","ENOSYS",ph,eD,"ENOTTY","ENXIO","EPERM","EPIPE","ERANGE","EROFS","ESPIPE","ESRCH","EXDEV","EWOULDBLOCK","EINPROGRESS","EALREADY","ENOTSOCK","EDESTADDRREQ","EMSGSIZE","EPROTOTYPE","ENOPROTOOPT","EPROTONOSUPPORT","ESOCKTNOSUPPORT","EOPNOTSUPP","EPFNOSUPPORT","EAFNOSUPPORT","EADDRINUSE","EADDRNOTAVAIL","ENETDOWN","ENETUNREACH","ENETRESET","ECONNABORTED","ECONNRESET","ENOBUFS","EISCONN","ENOTCONN","ESHUTDOWN","ETOOMANYREFS","ETIMEDOUT","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","ELOOP","EOVERFLOW"];function zs(x,r,e,t){var u=uW.indexOf(x);u<0&&(t==null&&(t=-9999),u=[0,t]);var i=[u,Yt(r||hx),Yt(e||hx)];return i}var FY={};function Ro(x){return FY[x]}function Ks(x,r){throw q0([0,x].concat(r))}function rI(x){return x instanceof Uint8Array||(x=new Uint8Array(x)),new Bs(4,x,x.length)}function HY(x){Or(x+pp)}function ee(x){this.data=x}ee.prototype=new WY,ee.prototype.constructor=ee,ee.prototype.truncate=function(x){var r=this.data;this.data=S1(x|0),Us(r,0,this.data,0,x)},ee.prototype.length=function(){return at(this.data)},ee.prototype.write=function(x,r,e,t){var u=this.length();if(x+t>=u){var i=S1(x+t),f=this.data;this.data=i,Us(f,0,this.data,0,u)}return Us(rI(r),e,this.data,x,t),0},ee.prototype.read=function(x,r,e,t){var u=this.length();if(x+t>=u&&(t=u-x),t){var i=S1(t|0);Us(this.data,x,i,0,t),r.set($Y(i),e)}return t};function Mv(x,r,e){this.file=r,this.name=x,this.flags=e}Mv.prototype.err_closed=function(){Or(this.name+lj)},Mv.prototype.length=function(){if(this.file)return this.file.length();this.err_closed()},Mv.prototype.write=function(x,r,e,t){if(this.file)return this.file.write(x,r,e,t);this.err_closed()},Mv.prototype.read=function(x,r,e,t){if(this.file)return this.file.read(x,r,e,t);this.err_closed()},Mv.prototype.close=function(){this.file=void 0};function d2(x,r){this.content={},this.root=x,this.lookupFun=r}d2.prototype.nm=function(x){return this.root+x},d2.prototype.create_dir_if_needed=function(x){for(var r=x.split(G2),e=hx,t=0;t0&&e>=0&&e+t<=r.length&&r[e+t-1]==10&&t--;var u=S1(t);return Us(rI(r),e,u,0,t),this.log(u.toUtf16()),0}Or(this.fd+lj)},Ll.prototype.read=function(x,r,e,t){Or(this.fd+": file descriptor is write only")},Ll.prototype.close=function(){this.log=void 0};function ty(x,r){return r==null&&(r=ry.length),ry[r]=x,r|0}function YN0(x,r,e){for(var t={};r;){switch(r[1]){case 0:t.rdonly=1;break;case 1:t.wronly=1;break;case 2:t.append=1;break;case 3:t.create=1;break;case 4:t.truncate=1;break;case 5:t.excl=1;break;case 6:t.binary=1;break;case 7:t.text=1;break;case 8:t.nonblock=1;break}r=r[2]}t.rdonly&&t.wronly&&Or(x+fS),t.text&&t.binary&&Or(x+hR);var u=iW(x),i=u.device.open(u.rest,t);return ty(i,void 0)}(function(){function x(r,e){return Il()?eW(r,e):new Ll(r,e)}ty(x(0,{rdonly:1,altname:"/dev/stdin",isCharacterDevice:!0}),0),ty(x(1,{buffered:2,wronly:1,isCharacterDevice:!0}),1),ty(x(2,{buffered:2,wronly:1,isCharacterDevice:!0}),2)})();function fW(x){var r=ry[x];r.flags.wronly&&Or(wB+x+" is writeonly");var e=null,t={file:r,offset:r.flags.append?r.length():0,fd:x,opened:!0,out:!1,buffer_curr:0,buffer_max:0,buffer:new Uint8Array(fl),refill:e};return Vs[t.fd]=t,t.fd}function GY(x){var r=ry[x];r.flags.rdonly&&Or(wB+x+" is readonly");var e=r.flags.buffered!==void 0?r.flags.buffered:1,t={file:r,offset:r.flags.append?r.length():0,fd:x,opened:!0,out:!0,buffer_curr:0,buffer:new Uint8Array(fl),buffered:e};return Vs[t.fd]=t,t.fd}function cW(){for(var x=0,r=0;ru.buffer.length){var f=new Uint8Array(u.buffer_curr+i.length);f.set(u.buffer),u.buffer=f}switch(u.buffered){case 0:u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,es(x);break;case 1:u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,u.buffer_curr>=u.buffer.length&&es(x);break;case 2:var o=i.lastIndexOf(10);o<0?(u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,u.buffer_curr>=u.buffer.length&&es(x)):(u.buffer.set(i.subarray(0,o+1),u.buffer_curr),u.buffer_curr+=o+1,es(x),u.buffer.set(i.subarray(o+1),u.buffer_curr),u.buffer_curr+=i.length-o-1);break}return 0}function eI(x,r,e,t){return sW(x,xs(r),e,t)}function bY(x,r){var e=String.fromCharCode(r);return eI(x,e,0,1),0}function Ml(x,r){return+(Qd(x,r,!1)!=0)}function tI(x,r){var e=new Array(r+1);e[0]=x;for(var t=1;t<=r;t++)e[t]=0;return e}function oW(x,r){return x[0]=Ya,x[1]=r,0}function Dv(x){return x instanceof Array&&x[0]==x[0]>>>0?x[0]:$R(x)||WR(x)?Av:x instanceof Function||typeof x=="function"?b8:x&&x.caml_custom?Q3:vl}function vW(x){for(var r;x;)if(xr(x[1][1])=="SYJS"){r=x[1][2];break}else x=x[2];var e={};if(r)for(var t=1;t=0?x=u:J2("caml_register_global: cannot locate "+t)}}X2[x+1]=r,e&&(X2[e]=r)}function nI(x,r){return FY[x]=r,0}function aW(x){return x[2]=zY++,x}function Ar(x,r){return x===r?1:0}function lW(){b1(lg)}function O1(x,r){return r>>>0>=Xx(x)&&lW(),fx(x,r)}function P(x,r){return 1-Ar(x,r)}function pW(){return 2147483647/4|0}var dW=p0.process&&p0.process.platform&&p0.process.platform==Pj?UB:"Unix";function yW(){return[0,dW,32,0]}function mW(){NY(X2.Not_found)}function xX(x){var r=PY(xr(x));return r===void 0&&mW(),Yt(r)}function uI(x){for(var r=1;x&&x.joo_tramp;)x=x.joo_tramp.apply(null,x.joo_args),r++;return x}function y2(x,r){return{joo_tramp:x,joo_args:r}}function I0(x,r){if(typeof r=="function")return x.fun=r,0;if(r.fun)return x.fun=r.fun,0;for(var e=r.length;e--;)x[e]=r[e];return 0}function L1(x){{if(x instanceof Array)return x;var r;return p0.RangeError&&x instanceof p0.RangeError&&x.message&&x.message.match(/maximum call stack/i)||p0.InternalError&&x instanceof p0.InternalError&&x.message&&x.message.match(/too much recursion/i)?r=X2.Stack_overflow:x instanceof p0.Error&&Ro(XE)?r=[0,Ro(XE),x]:r=[0,X2.Failure,Yt(String(x))],x instanceof p0.Error&&(r.js_error=x),r}}function kW(x){switch(x[2]){case-8:case-11:case-12:return 1;default:return 0}}function hW(x){var r=hx;if(x[0]==0){if(r+=x[1][1],x.length==3&&x[2][0]==0&&kW(x[1]))var t=x[2],e=1;else var e=2,t=x;r+=ZM;for(var u=e;ue&&(r+=ZD);var i=t[u];typeof i=="number"?r+=i.toString():i instanceof Bs||typeof i=="string"?r+=s5+i.toString()+s5:r+=Na}r+=WS}else x[0]==qr&&(r+=x[1]);return r}function rX(x){if(x instanceof Array&&(x[0]==0||x[0]==qr)){var r=Ro(mD);if(r)xy(r,[x,!1]);else{var e=hW(x),t=Ro(fj);if(t&&xy(t,[0]),console.error(oR+e+` -`),x.js_error)throw x.js_error}}else throw x}function _W(){var x=p0.process;x&&x.on?x.on("uncaughtException",function(r,e){rX(r),x.exit(2)}):p0.addEventListener&&p0.addEventListener("error",function(r){r.error&&rX(r.error)})}_W();function l(x,r){return(x.l>=0?x.l:x.l=x.length)==1?x(r):Ys(x,[r])}function p(x,r,e){return(x.l>=0?x.l:x.l=x.length)==2?x(r,e):Ys(x,[r,e])}function G0(x,r,e,t){return(x.l>=0?x.l:x.l=x.length)==3?x(r,e,t):Ys(x,[r,e,t])}function ve(x,r,e,t,u){return(x.l>=0?x.l:x.l=x.length)==4?x(r,e,t,u):Ys(x,[r,e,t,u])}function Xe(x,r,e,t,u,i){return(x.l>=0?x.l:x.l=x.length)==5?x(r,e,t,u,i):Ys(x,[r,e,t,u,i])}function wW(x,r,e,t,u,i,f,o){return(x.l>=0?x.l:x.l=x.length)==7?x(r,e,t,u,i,f,o):Ys(x,[r,e,t,u,i,f,o])}var iI=[qr,eY,-1],eX=[qr,NB,-2],kn=[qr,tw,-3],fI=[qr,_B,-4],P2=[qr,Ij,-7],tX=[qr,WU,-8],nX=[qr,CU,-9],wr=[qr,xD,-11],Dl=[qr,GU,-12],TW=[4,0,0,0,[12,45,[4,0,0,0,0]]],cI=[0,[11,'File "',[2,0,[11,'", line ',[4,0,0,0,[11,SU,[4,0,0,0,[12,45,[4,0,0,0,[11,": ",[2,0,0]]]]]]]]]],'File "%s", line %d, characters %d-%d: %s'],Za=[0,0,[0,0,0],[0,0,0]],jl=[0,0,0,0,1,0,0,0],uX=[0,"first_leading","last_trailing"],iX=[0,Cf,Df,ai,_7,Mf,b7,Ui,Su,dc,Y7,$i,jf,cn,$u,hc,Me,I7,tu,vf,Gf,N7,yi,Gc,Nc,n7,df,K7,Au,Wi,tf,Fc,F7,Ru,Si,sf,Ci,di,nc,Gi,au,d7,qc,W7,Gu,cf,Pc,hi,lf,xc,Hn,yc,_c,ef,Ie,Oe,zu,Tf,Ac,Ki,T7,Bf,Zu,cc,kf,ac,If,Rc,Mi,se,Xi,t7,yf,nf,Cu,c7,ju,Vi,of,Cc,kc,Mu,Vu,af,w7,bn,Nf,m7,Qf,Z7,q1,Ti,xi,Gn,$7,y7,Yf,gf,G7,cu,Yi,Yu,Nu,pu,bu,oc,eu,zn,pc,S7,$n,B7,ti,ei,Uf,ii,wf,Kn,Ai,Wc,Hi,wu,gi,ku,Iu,Rt,g7,s7,P7,j2,Ei,ou,Ku,p7,hf,yu,$f,O7,b2,ni,r7,Kf,Zi,lu,bc,iu,_u,Vn,zi,Qu,Lc,lc,i7,Ef,Eu,ci,Kc,li,U7,o7,uu,qn,ec,rc,rf,fc,X7,Xu,Qn,ji,j7,Zn,vu,uf,ur,v7,pi,Bu,gc,ri,a7,Xc,Uc,Wu,Dc,Q7,Af,L7,Bi,Jf,qf,su,bi,Zc,pf,Vc,f7,vi,Pf,oi,sc,mi,nu,uc,u7,Fu,Of,yn,Yc,Lu,z7,wc,Ic,R7,H7,Ju,l7,h7,Ji,Du,mc,tc,fu,Wf,$c,gu,zf,Tc,mu,Ue,Ec,du,Uu,Tu,xf,D7,k7,De,Sc,qu,M7,Oc,Fi,qi,E7,ff,Ye,Ou,xu,Xf,Sf,jc,Oi,Rf,Be,Qc,mf,Qi,Pu,vc,Fn,x7,Pi,Ff,wi,Jc,A7,zc,_i,Wn,V7,Ii,bf,Hf,ru,C7,J7,ki,Hu,Mc,e7,q7,ui,Hc,Li,B2,Vf,_f,si,Y2],hn=[0,0,0];Xt(11,Dl,GU),Xt(10,wr,xD),Xt(9,[qr,Uj,XD],Uj),Xt(8,nX,CU),Xt(7,tX,WU),Xt(6,P2,Ij),Xt(5,[qr,vj,-6],vj),Xt(4,[qr,kD,-5],kD),Xt(3,fI,_B),Xt(2,kn,tw),Xt(1,eX,NB),Xt(0,iI,eY);var SW="output_substring",EW=ic,gW=Cs,AW=Is,PW="CamlinternalLazy.Undefined",CW=jB,NW="\\'",RW="\\b",IW="\\t",OW="\\n",LW="\\r",MW="List.iter2",DW="tl",jW="hd",UW="String.blit / Bytes.blit_string",BW="Bytes.blit",YW="String.sub / Bytes.sub",XW="String.concat",JW="Array.blit",VW="Array.sub",zW="Map.remove_min_elt",KW=[0,0,0,0],ZW=[0,"map.ml",400,10],WW=[0,0,0],$W=F4,QW=F4,FW=F4,HW=F4,qW="Stdlib.Queue.Empty",GW="Buffer.add_substring/add_subbytes",bW="Buffer.add: cannot grow buffer",x$=[0,aD,93,2],r$=[0,aD,94,2],e$="Buffer.sub",t$="%c",n$="%s",u$=FM,i$=DB,f$=gj,c$=GB,s$="%f",o$="%B",v$="%{",a$="%}",l$="%(",p$="%)",d$=Kj,y$="%t",m$="%?",k$="%r",h$="%_r",_$=[0,f2,850,23],w$=[0,f2,814,21],T$=[0,f2,815,21],S$=[0,f2,818,21],E$=[0,f2,819,21],g$=[0,f2,822,19],A$=[0,f2,823,19],P$=[0,f2,826,22],C$=[0,f2,827,22],N$=[0,f2,831,30],R$=[0,f2,832,30],I$=[0,f2,836,26],O$=[0,f2,837,26],L$=[0,f2,846,28],M$=[0,f2,847,28],D$=[0,f2,851,23],j$=[0,f2,1558,4],U$="Printf: bad conversion %[",B$=[0,f2,1626,39],Y$=[0,f2,1649,31],X$=[0,f2,1650,31],J$="Printf: bad conversion %_",V$=HU,z$=Aj,K$=HU,Z$=Aj,W$=[0,[11,"invalid box description ",[3,0,0]],"invalid box description %S"],$$=[0,0,4],Q$=Wk,F$="neg_infinity",H$=Dj,q$=ic,G$=[0,nn],b$="%+nd",xQ="% nd",rQ="%+ni",eQ="% ni",tQ="%nx",nQ="%#nx",uQ="%nX",iQ="%#nX",fQ="%no",cQ="%#no",sQ="%nd",oQ=gj,vQ="%nu",aQ="%+ld",lQ="% ld",pQ="%+li",dQ="% li",yQ="%lx",mQ="%#lx",kQ="%lX",hQ="%#lX",_Q="%lo",wQ="%#lo",TQ="%ld",SQ=DB,EQ="%lu",gQ="%+Ld",AQ="% Ld",PQ="%+Li",CQ="% Li",NQ="%Lx",RQ="%#Lx",IQ="%LX",OQ="%#LX",LQ="%Lo",MQ="%#Lo",DQ="%Ld",jQ=GB,UQ="%Lu",BQ="%+d",YQ="% d",XQ="%+i",JQ="% i",VQ="%x",zQ="%#x",KQ="%X",ZQ="%#X",WQ="%o",$Q="%#o",QQ=gl,FQ=FM,HQ=aU,qQ=pa,GQ="@}",bQ="@?",xF=`@ -`,rF="@.",eF="@@",tF="@%",nF=Cj,uF="CamlinternalFormat.Type_mismatch",iF=hx,fF=[0,[11,ZD,[2,0,[2,0,0]]],", %s%s"],cF=[0,[11,oR,[2,0,[12,10,0]]],NU],sF=[0,[11,"Fatal error in uncaught exception handler: exception ",[2,0,[12,10,0]]],`Fatal error in uncaught exception handler: exception %s -`],oF="Fatal error: out of memory in uncaught exception handler",vF=[0,[11,oR,[2,0,[12,10,0]]],NU],aF=[0,[2,0,[12,10,0]],`%s -`],lF="Raised at",pF="Re-raised at",dF="Raised by primitive operation at",yF="Called from",mF=" (inlined)",kF=hx,hF=[0,[2,0,[12,32,[2,0,[11,' in file "',[2,0,[12,34,[2,0,[11,", line ",[4,0,0,0,[11,SU,TW]]]]]]]]]],'%s %s in file "%s"%s, line %d, characters %d-%d'],_F=[0,[2,0,[11," unknown location",0]],"%s unknown location"],wF="Out of memory",TF="Stack overflow",SF="Pattern matching failed",EF="Assertion failed",gF="Undefined recursive module",AF=[0,[12,40,[2,0,[2,0,[12,41,0]]]],"(%s%s)"],PF=hx,CF=hx,NF=[0,[12,40,[2,0,[12,41,0]]],"(%s)"],RF=[0,[4,0,0,0,0],gl],IF=[0,[3,0,0],K3],OF=Na,LF=[0,hx,`(Cannot print locations: +(function(i){function e(){var f=i();return f.default||f}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.flow=e()}})(function(){"use strict";var xN0=Object.create;var dm=Object.defineProperty;var rN0=Object.getOwnPropertyDescriptor;var eN0=Object.getOwnPropertyNames;var tN0=Object.getPrototypeOf,nN0=Object.prototype.hasOwnProperty;var $K=(d0,wx)=>()=>(wx||d0((wx={exports:{}}).exports,wx),wx.exports),QK=(d0,wx)=>{for(var Gx in wx)dm(d0,Gx,{get:wx[Gx],enumerable:!0})},FK=(d0,wx,Gx,gr)=>{if(wx&&typeof wx=="object"||typeof wx=="function")for(let rr of eN0(wx))!nN0.call(d0,rr)&&rr!==Gx&&dm(d0,rr,{get:()=>wx[rr],enumerable:!(gr=rN0(wx,rr))||gr.enumerable});return d0};var HK=(d0,wx,Gx)=>(Gx=d0!=null?xN0(tN0(d0)):{},FK(wx||!d0||!d0.__esModule?dm(Gx,"default",{value:d0,enumerable:!0}):Gx,d0)),uN0=d0=>FK(dm({},"__esModule",{value:!0}),d0);var qK=$K(MM=>{(function(d0){typeof globalThis!="object"&&(this?wx():(d0.defineProperty(d0.prototype,"_T_",{configurable:!0,get:wx}),_T_));function wx(){var Gx=this||self;Gx.globalThis=Gx,delete d0.prototype._T_}})(Object);(function(d0){"use strict";var wx="symbol",Gx=271,gr=126548,rr="renders",jr=71127,ir="member_property",tn=65007,X4=273,Ct=66517,Vn="jsx_attribute_value_expression",mm=119980,zn="function_declaration",Ne="<2>",km=68466,JM="%=",hm="??",_m=70080,J4="&",Nt="identifier",V4=72163,wm=71723,Tm="properties",Sm=183969,Em=68223,Kn="function_return_annotation",gm=124903,VM=261,Am=70106,zM=241,KM="(",ZM=213,Pm=120074,Cm=70708,Nm=71679,Zn="logical",i2="camlinternalFormat.ml",Wn="type_guard_annotation",Rm=92975,WM=">>>",Om="RestElement",Im=67897,$M=179,Lm="start",Mm=113775,z4=126521,QM="%i",J3="`",FM="#",Dm=43702,K4=126,jm=110947,$n="function_identifier",Z4=119893,Um=70366,Bm=65547,Ym=43743,Xm=-43,sv=8238,HM=",",ov=8286,Qn="keyof_type",Jm=66717,W4=12336,qM=201,Vm=71338,$4=11565,zm=69289,Km=55291,Zm=73030,Wm=70479,$m=69572,Qm=11623,Fn="tuple_spread_element",Hn="component_type_rest_param",vv=8239,Fm=64310,la="@]",Hm=42993,Q4=11558,F4="Map.bal",V3="public",GM=-32,pa="Literal",qn="jsx_member_expression_identifier",Gn="for_in_assignment_pattern",qm=71450,H4=126557,nn=103,Gm=12292,bm=110579,q4=120597,xk=13311,rk=12348,bn="export_default_declaration_decl",x7="tuple_type",ek=113663,G4=170,tk=67413,bM="Assert_failure",xD="comments",z3="%S",un=127343600,nk=12341,uk=67646,rD="ENOTEMPTY",ik=72160,fk=70187,eD=222,ck=12343,tD=2147483647,sk=126624,ok=43442,vk=70312,nD=281,r7="interface_type",av="new",ak=66256,b4=68296,lk=124908,xp=126579,rp=70107,pk=249,dk=71167,e7="union_type",Gr=248,yk=126546,t7="enum_bigint_member",uD=133,mk=67871,kk=66955,iD=1027,n7="class_declaration",u7="optional_call",fD="a string",ep=11703,cD="<<",tp=126564,i7="jsx_element",f7="object_property_type",hk=94207,c7="enum_declaration",_k=68023,wk=67669,Tk=8318,sD="prefix",lv="this",Sk=126578,s7="if_consequent_statement",oD=-696510241,Ek=66963,pv="default",np=72967,Rt=101,vD="buffer.ml",gk=74649,fn=65535,Ak=43709,aD=175,_o="component",lD="===",dv=117,o7="jsx_identifier",pD="EnumDefaultedMember",up=70006,Pk=70161,Ck=126633,Nk=66965,v7="member_property_expression",Rk=101589,Ok=64274,da="function",Ik=66303,Lk=42954,Mk=126529,Dk=72191,a7="new_",jk=64433,ip=126559,Uk=72144,dD="==",wo=-744106340,Bk=43359,Yk=171,yD="Printexc.handle_uncaught_exception",Xk=66735,Jk=126534,Vk=74879,zk=42785,fp=120629,K3="0o",mD="End_of_file",Kk=66175,kD="&=",Zk="nan",cp=126503,l7="pattern_number_literal",Wk=43470,p7="import_namespace_specifier",$k=77711,sp=70302,d7="component_param",op="@])",vp=126515,ya=118,Re="continue",Qk=43798,ap=";@ ",Fk=74751,Hk="src/parser/statement_parser.ml",qk="rmdir",Gk=94177,y7="for_in_statement",hD=12520,_D="TypeParameterInstantiation",hx="",wD="**=",bk=120126,TD=197,xh=67829,lp="_bigarr02",m7="export_named_declaration_specifier",pp=": No such file or directory",k7="render_type",dp=64319,rh=69926,h7="pattern_object_p",SD="TypeAnnotation",_7="array_type",Z3="@[%s =@ ",eh=72847,w7="export_default_declaration",yp=126590,th=42774,nh=": Not a directory",ma="let",yv=12288,H2="argument",q2="/",mp="an identifier",Ps="typeof",kp=68116,uh=182,T7="declare_export_declaration_decl",ih=67589,fh=66771,W3="class",ED="tokens",hp=70281,$3=255,ch=43638,mv="key",sh=69955,gD=">>",S7="function_expression_or_method",oh=43587,cn="block",vh=100351,_p="mixed",ah=66503,lh="ENOTDIR",ph=65135,E7="string_literal",fe="@ ",dh=43334,g7="if_alternate_statement",yh=70448,wp=8485,A7="type_args",mh=69864,P7="if_statement",AD="+=",C7="typeof_identifier",Tp="with",Sp=65595,kh=64286,hh=71086,Cs="true",_h=69423,N7="catch_clause",wh="e",ka="asserts",PD=">>=",Ep=131,Th=43388,Sh=43887,K1=-48,Eh=120779,CD=190,gh=194,R7="pattern_bigint_literal",Ah=71351,Ph=65629,O7="call",Ch=-42,gp=126553,Nh=43695,ND=177,Rh=42124,Oh=12703,Ih=12442,Lh=11718,Ap=70449,Pp=126547,Mh=67462,Ns="left",I7="infer_type",Dh=11742,jh=65597,Cp="Unix.Unix_error",Uh=122623,Bh=124911,Yh=72959,Xh="opaque",L7="object_internal_slot_property_type",RD="Enum `",kv=65279,Jh=71983,Vh=12329,U1=110,M7="spread_property",OD="importKind",Q3=" =",D7="remote_identifier",j7="labeled_statement",U7="jsx_fragment",zh=120770,B7="function_param",M2=112,Kh="exportKind",Y7="binary",Rs="`.",Zh=42511,ID="<=",X7="jsx_spread_attribute",D2="import",J7="typeof_member_identifier",Wh=69414,$h=19967,Np=11687,Qh=93823,LD=67714067,MD=209,Fh=71903,Hh="of",qh=72e3,Rp="typeArguments",V7="type_identifier",z7="pattern_array_element_pattern",Op=69744,ha=192,K7="class_element",Z7="export_source",W7="component_param_pattern",Gh=42508,bh=125124,DD="Unexpected token `",$7="for_in_left_declaration",Q7="object_call_property_type",x_="abstract",r_=8584,e_=68786,t_=71999,Ip=123214,n_=123565,Lp=186,F7="class_implements_interface",Mp=126536,u_=69749,jD="Invalid legacy octal ",i_=71295,f_=66927,H7="pattern_expression",c_=11679,s_=-61,Dp=65141,o_=11694,q7="update_expression",UD="minus",Oe="debugger",v_=71352,a_=65470,_a="number",l_=123627,jp=64322,Up=43471,G7="for_of_assignment_pattern",Bp=126589,p_=43784,BD="Internal Error: Found object private prop",d_=183983,br="id",y_=123190,Yp="finally",Xp=120070,m_=72095,b7="as_expression",xu="syntax",k_=110591,Os="false",YD=-10,Jp="AssignmentPattern",ru="typeof_expression",h_=43764,XD="FunctionTypeParam",eu="function_body_any",__=126627,w_=71998,T_=126543,tu="call_type_arg",S_=64316,Vp=64285,E_=8454,JD=137,VD="**",nu="object_type_property_setter",g_=68607,sn=108,A_="out",P_=68799,hv=65278,uu="jsx_member_expression",C_=92728,_v="null",N_=66431,R_=72249,on=128,zp=119994,O_=66207,I_=43583,Kp="else",Zp=94179,Wp=11735,L_=64911,iu="jsx_attribute_name_namespaced",zD="!",M_=42539,D_=72250,j_=71215,U_=69746,B_=65487,fu="pattern_object_property_key",KD=", ",Y_=8505,X_="=",J_=64111,V_=8507,$p=120134,Qp="while",z_=120596,K_=43002,F3="protected",Z_=68479,W_=43395,$_=68252,ZD="v",Q_=70278,F_="rendersType",H_=70853,Fp=120145,q_=69297,G_=73112,Hp=8488,b_=68351,xw=42655,cu="for_of_left_declaration",rw=44031,ew="Failure",tw=92159,su="object_key_identifier",WD=195,wv="bigint",ou="import_default_specifier",H3=256,vu="member",$D="!==",au="component_identifier",nw=73008,uw=72283,qp=126500,Gp=120127,lu="jsx_attribute_name",pu="for_statement_init",iw=67711,du="private_name",bp="case",x8=8489,yu="import_specifier",fw=64279,cw=94098,sw=119974,mu="pattern_string_literal",ow=72969,QD=193,FD="!=",r8=126520,vw=71944,HD=259,aw=42191,ku="generic_qualified_identifier_type",Tv="implements",lw=194559,qD="%",q3="hasUnknownMembers",pw=71039,GD=211,dw=83526,hu="init",_u="jsx_attribute_value",yw=70271,wa=240,wu="function_type_return_annotation",mw=70018,kw="rest",Tu="readonly_type",hw=512,_w=68095,ww=120003,e8=126563,t8=71236,Tw=69375,Sw=68850,Ew=70105,gw=43866,bD="T_RENDERS_QUESTION",n8=888960333,Aw=43013,Su="assignment_pattern",Pw="specifiers",xj=710,rj=145,vn="as",Cw=120570,Nw=11507,ej=204,Eu="jsx_element_name_identifier",gu="pattern_object_property_string_literal_key",Au="class_expression",tj=257,Rw=44002,Ow=82943,Ta="src/parser/type_parser.ml",Sa="test",nj=-67,Iw=64217,u8="package",uj="collect_comments",ij="Pervasives.do_at_exit",Lw=125183,Mw=42606,Pu="tuple_element",Cu="enum_boolean_member",Dw=65312,i8=119981,jw=65495,f8=120085,fj=-80,Uw=138,c8=126555,Bw=65276,h1=128,cj="{ ",Nu="for_statement",Ru="class_method",s8="if",Ou="generic_type",Nr=113,Yw=43071,Xw=72001,Jw=71131,Vw=70002,sj="renders*",zw=42888,o8=8469,G3="instanceof",Kw=11502,v8=94178,Zw=64321,Ww=64913,oj="Division_by_zero",$w=92879,Qw=71945,vj=185,Fw=66938,a8=65535,Hw=113800,aj=": file descriptor already closed",l8=223,lj="*=",qw=68899,Iu="switch_case",Lu="pattern_array_element",Mu="enum_string_member",Du="pattern_object_property_bigint_literal_key",pj="visit_trailing_comment",p8="export",d8=120122,y8=43823,Gw=43792,bw=42527,xT=70726,ju="enum_defaulted_member",rT=68497,m8=72349,Uu="program",Bu="member_type_identifier",eT="object",Yu="for_of_statement_lhs",tT=113791,nT=67391,Xu="jsx_spread_child",k8=126554,h8=8526,_8=43880,w8=69415,uT=43822,Ju="pattern_identifier",iT=93052,Ea="readonly",Ie="name",fT=68119,cT=71494,sT=120121,T8=8486,dj=2047,Vu="enum_symbol_body",yj=142,mj="PropertyDefinition",oT=177976,zu="declare_class",vT=65489,aT=72367,lT=70440,Ku="import_named_specifier",kj="Popping lex mode from empty stack",pT=68111,dT=66463,hj="*-/",yT=43187,S8=8487,mT=11567,kT=67861,hT=` +`,_T=66383,Zu="declare_interface",wT=-24976191,TT=238,ST=-24,_j="@ }@]",ET=43645,gT=176,AT=119976,E8=69959,PT=126519,CT=";",wj="trailingComments",g8=65548,Wu="number_literal",ga=449540197,NT=43704,A8=126584,RT=8467,Tj="||",P8=11695,OT="exported",IT=120712,Is="void",Sj="mixins",LT=92783,MT=215,$u="body_expression",Ej="%ni",b3=">",Qu="jsx_child",DT=8516,Fu="optional_indexed_access_type",Hu="typeof_type",qu="spread_element",jT=42963,gj="@[",Gu="component_params",UT=43042,C8="",bu="function_",N8="for",R8=65575,an="params",BT=168,Aj="win32",Sv=8202,Pj="@",O8="^",Cj=164,it="optional",YT=65574,xl="boolean",Nj=139,XT=12548,I8=120539,Rj="Not_found",rl=246,xi="expression_statement",JT="EBADF",VT=66815,ri="module_ref_literal",zT=55203,ei="function_param_type",KT=73064,L8=70279,ZT=110580,Oj=233,WT="<",Ij="visit_leading_comment",$T=66855,QT=66966,FT=66499,HT=111355,qT=68680,GT=206,Lj="--",bT=65497,M8=11711,ti="function_param_pattern",Ev="constructor",xS=5760,Mj="infinity",D8=43642,DN0="fs",rS=92991,j8=126544,eS=101640,U8=72162,tS=67583,B8=8468,j2="typeParameters",Dj="elements",nS=71423,jj="Sys_blocked_io",ni="interface_declaration",ui="variable_declaration",ii="function_rest_param",fi="type",uS="Invalid number ",iS=" : flags Open_rdonly and Open_wronly are not compatible",fS=69404,ci="jsx_element_name_member_expression",Y8="keyof",X8="never",si="with_",ln=32768,Uj="|=",J8=70404,V8=70441,cS=42969,el="declare",sS=73061,oi="object_type",vi="object_property_value_type",oS=69687,Bj="Invalid binary/octal ",Yj=230,vS=64324,Xj="range",Jj="infer",aS=120744,ai="array_element",lS=70730,pS=43641,Vj=166,dS=70461,yS=69890,mS=69487,kS=74862,hS=68149,z8=73065,zj="%a",_S=72348,Kj=172,li="jsx_expression",wS=65663,TS=126495,SS=245,ES=124907,pi="member_property_identifier",Zj=226,gS=43615,di="comment",K8=119965,yi="catch_clause_pattern",mi="object_type_property_getter",Wj=136,AS=43019,PS=67455,Z8=126628,$j=331416730,Qj="the start of a statement",CS=122654,NS="shorthand",RS=43595,OS=11710,ki="typeof_qualified_identifier",IS=72750,Fj="elementType",F1="typeAnnotation",LS=124895,Hj=162,W8=11559,MS=67382,qj="??=",DS=72329,jS="target",hi="component_type",Gj=180,US=189,bj=8206,BS=43513,YS=173823,XS=126467,_i="type_guard",JS=43700,VS=12783,$8=8305,wi="type_annotation",xU=141,Le="break",Q8=42999,zS=65019,rU=160,KS=70460,Ti="expression_or_spread",ZS=")",Si="class_private_field",WS=55215,$S=65338,QS=40981,tl="members",Ei="import_declaration",FS=69634,F8=94031,HS="ENOENT",qS=8457,eU="satisfies",gi="generic_identifier_type",Ai="function_this_param",GS=66993,Pi="type_",bS=67423,xE=11557,rE=12799,H8=239,eE=93026,tE=66377,nE=123180,tU=221,nU=-594953737,uE=67967,iE=43586,ft=105,uU="src/parser/flow_lexer.ml",fE=66559,Ci="class_property_value",iU=150,cE=67637,fU="closedir",sE=43010,oE=8521,q8=69956,vE=42959,aE=212,lE=92735,G8="}",nl="method",pE=11498,b8=247,ce="empty",Ni=16777215,dE=161,yE=42887,Ri=116,Oi="type_identifier_reference",x5=126634,mE=68029,cU="regexp",kE=70414,ul=121,Ii="template_literal_element",hE=8449,_E=126562,gv=12287,wE=-45,r5=64297,e5=126523,TE=43301,Ot=111,SE=126498,EE=43776,sU="EEXIST",gE=119892,AE=43807,oU=4096,Av=252,Ls=255,PE=68295,Li="variable_declarator_pattern",Mi="do_while",t5="catch",CE=66962,NE=120654,Di=125,ji="label_identifier",RE=11263,OE=8525,Ui="assignment",IE=191456,LE=43273,vU="%u",ME=65381,DE=110927,jE=65479,UE=120538,Pv="await",BE=71487,YE="jsError",XE=110588,JE=120084,VE=42890,Aa=224,Bi="object_key",zE=43696,KE=73647,ZE=43761,WE=12295,$E=64967,n5=11647,aU=191,It=123,QE="generator",FE=123583,Yi="for_of_statement",Xi="enum_bigint_body",HE=110959,qE=92995,GE=120686,bE="b",xg=119969,u5=126522,i5=64318,rg=71839,f5=126602,eg=65908,il=65536,lU=231,pU=-602162310,dU="comment_bounds",Lt="-",yU=-55,Ji="pattern_object_property",tg=43493,ng=69505,ug=8471,mU=277,ig=187,c5=120745,Vi="enum_member_identifier",fg=71959,cg=66863,sg=65594,og=253,s5='"',o5=70286,zi="jsx_attribute_value_literal",vg=68447,kU="the",ag="index out of bounds",Ki="declare_export_declaration",Zi="jsx_attribute",Wi="class_extends",x1=122,f2=106,$i="binding_pattern",Qi="ts_type_cast",lg=113807,pg=93951,Pa=119,dg="types",yg=8335,Fi="statement_fork_point",Ca="_",mg=65500,Hi="function_type",kg=68220,qi="statement_list",Na=-835925911,hg=123535,_g=258,v5=43815,hU=199,a5=120571,wg=67514,_U="Property",l5=72713,wU="Unexpected ",p5=169,TU=", characters ",d5=43867,Tg=42537,Gi="component_declaration",SU=" : is a directory",bi="object_key_number_literal",Jr=127,c2=-36,fl=912068366,cl="delete",ct=114,Sg=120076,xf="regexp_literal",Eg=65370,gg=65481,y1="value",Ag=68405,Ra="operator",sl="const",EU=283,To=109,y5="any",Pg=69958,Cg=70831,Ng=73111,Rg=72767,Og="Identifier",rf="jsx_opening_attribute",ef="conditional_type",Ig="loc",Lg=67071,m5=120004,Mg=43492,Dg=70005,gU=188,k5=72272,jg=11389,Ug=251,Bg=73055,h5=70280,AU=286,_5=1114111,Yg=66421,PU="Stack_overflow",Xg=70301,Jg=19903,So="0x",Vg=69967,zg=12447,w5=66512,CU=`Fatal error: exception %s +`,ol=1e3,Kg=69295,T5=120093,NU=">=",RU=149,S5=64325,tf="class_identifier",Zg=119967,Wg=68415,OU="end",nf="enum_boolean_body",uf="member_private_name",ff="super_expression",$g=71955,Qg=126514,E5=67593,Fg=66939,Hg=12591,g5=126538,qg=110590,cf="component_renders_annotation",Gg=72703,bg=72105,A5=65598,xA=73727,P5=126504,C5=126551,rA=70143,vl="from",sf="class_property",of="enum_number_body",eA=42559,tA=93759,nA=66994,pn="right",IU=225,uA=67702,iA=65473,fA=43697,N5=70855,cA=119993,sA=72103,oA=178205,vf="call_type_args",vA=66511,af="export_batch_specifier",lf="component_type_param",dn=782176664,Cv="get",al="local",LU=228,pf="object_mapped_type_property",df="class_decorator",MU=220,yf="enum_body",DU="<<=",aA=71956,lA=69839,Oa="super",pA=173791,dA=71942,H1="expression",yA=72440,Ia=254,mA=70412,jU="renders?",mf="try_catch",UU=32752,kf="declare_module_exports",kA=12320,BU=134,hA=94175,ll="enum",YU=196,hf="import_source",_A=43814,wA=120069,_f="while_",R5=126537,TA=43262,wf="function_rest_param_type",SA=66378,O5=119996,Tf="declare_component",EA=73097,gA=70783,AA=43503,PA=131071,CA=11492,NA=92766,XU=173,RA=113770,OA=73029,IA=66978,Sf="tagged_template",Ef="jsx_element_name",gf="for_init_declaration",LA=123213,Af="object_indexer_property_type",Pf="object_spread_property_type",I5=72970,L5=70854,MA=110930,pl="var",JU=217,DA=119972,jA=69622,UA=63743,BA=42237,YA=870530776,M5="returnType",VU=56320,zU=143,La="computed",XA=42735,Cf="arg_list",JA=67461,Nf="export_named_declaration",VA=72817,zA=73439,KA=43782,ZA=66775,WA=70655,D5="bool",$A=65140,QA=75075,FA=126651,HA=71947,qA=42961,GA=12735,bA=78894,xP=64262,KU=237,G2="interface",ZU="Match_failure",rP=42962,eP=69748,WU="leadingComments",Rf="this_expression",dl=461894857,j5=12592,$U=8204,tP=119807,nP=66348,Of="declare_variable",uP=8348,If="optional_member",Lf=120,Mf="arrow_function",iP=72768,fP=70851,Df="array",cP=43249,U5=126468,sP=177983,oP="compare: functional value",vP=126550,aP=64847,jf="binding_type_identifier",lP=120132,Uf="function_params",pP=93071,yl=1024,dP=42783,QU=1039100673,FU="@{",yP=12352,mP=42653,kP=120628,Bf="declare_function",Yf="for_in_statement_lhs",hP=72271,_P=69807,wP=67826,Xf="syntax_opt",Jf="object_key_bigint_literal",HU=243,TP=94032,qU="Undefined_recursive_module",GU=-1053382366,SP=72242,Vf="variance_opt",EP=101631,gP="arguments",AP=72161,PP=8511,B5="unknown",CP=43560,bU="the end of an expression statement (`;`)",xB=1026,NP=12543,RP=11670,rB="?",OP=69247,Y5=11631,X5="line",IP=72202,zf="pattern_object_rest_property",Mt=" ",LP=43487,Eo=115,MP=-673950933,Kf="intersection_type",DP=120144,ml="is",jP=178207,UP=100343,eB="||=",tB="f",J5=8455,Zf=102,Wf="pattern_object_property_number_literal_key",BP=70418,YP=8543,nB="Internal Error: Found private field in object props",V5=126540,z5=119995,Nv=8287,$f="indexed_access_type",Qf="export_named_specifier",uB=266,iB=224,XP=124926,JP=-103,fB=167,K5=65344,Z5=126530,VP=113788,zP=67505,KP="property",ZP=43014,Me="return",Ms=-85,WP=126601,cB=214,sB="children",Ff="type_alias",W5=43259,$P=126583,QP=71958,FP=65613,HP=67431,$5=126535,qP=69599,Hf="type_params",qf="object_key_computed",GP=124910,U2="variance",Q5=11727,bP=66954,xC=126463,Gf="catch_body",rC=69445,bf="type_param",xc="component_type_params",eC=124902,F5=120687,oB="collect_comments_opt",tC=15,nC=120485,uC=70416,iC=125259,rc="jsx_namespaced_name",fC=43712,cC=72712,vB="~",H5=12448,ec="jsx_member_expression_object",q5=126499,G5=-97,tc="pattern_object_property_identifier_key",aB=219,nc="component_body",uc="opaque_type",ic=".",sC=43009,oC="consequent",lB="SpreadElement",B1="body",pB=178,dB=202,fc="jsx_opening_element",cc="declare_module",b5=67638,vC=8477,sc="object_type_property",aC=110882,oc="function_body",lC=94111,yB="module",mB="alternate",pC=67839,Rv=8191,dC=43881,kB=": closedir failed",go="kind",vc="tuple_labeled_element",Ov=-46,yC=67640,ac="declare_type_alias",xd=70750,mC=77808,kl="column",lc="jsx_closing_element",kC=66977,hC="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",_C=65786,pc="function_expression",Dt=104,rd=11719,wC=11505,TC="mkdir",SC=70319,hB="Invalid_argument",EC=43738,gC=113817,dc="bigint_literal",AC=70084,PC=126566,ed="do",td=42622,yc="computed_key",mc="pattern_object_property_computed_key",_B="fd ",nd=126571,CC=126619,wB=140,Ao="prototype",TB=208,NC=67004,ud=130,SB=242,EB=">>>=",RC=68863,OC=11726,jt="raw",IC=64466,b2=107,LC=67679,kc="enum_string_body",MC=244,gB="unreachable jsxtext",AB="*",DC=66335,jC=126570,PB=229,UC=" : file already exists",id=184,BC=67807,YC=70753,hc="boolean_literal",XC=65437,JC=70451,VC=67002,Ma=124,_c="conditional",fd=43260,CB="Sys_error",zC=123135,hl="meta",KC=64109,wc="pattern_array_rest_element",ZC=43255,cd=67644,Tc="pattern_object_rest_property_pattern",Sc="sequence",WC=65855,$C=110951,QC=67643,Ec="predicate_expression",De="static",FC=120512,HC="declaration",sd=64317,qC=68437,od=126558,gc="meta_property",GC=11564,Ac="declare_enum",yn="pattern",bC=216,NB=282,RB=289,xN=68191,vd="undefined",ad=8319,ld=120133,rN=132,eN=42239,OB=-99,tN=124927,nN=120092,uN=43137,Pc="component_rest_param",IB=144,LB="expected *",iN=125251,MB="%li",fN=55242,cN=12294,Cc="enum_number_member",Po="in",DB="\\\\",Iv=":",sN=68115,jB="Cygwin",oN=77823,vN=65615,pd=70162,UB="/static/",aN=11519,lN=72966,pN=12686,dN=165,yN=183,_l=129,dd=72192,mN=42964,yd="try",md=120655,kN=11702,BB="expressions",hN=2048,Nc="class_body",_N=55238,YB=240,wN=66915,TN=43311,SN=43018,XB=235,EN=73648,JB="([^/]+)",gN=125258,AN=64829,PN=68735,VB="++",zB=163,KB="qualification",ZB=57343,WB=931,Rc="default_opt",CN=71235,$B=8472,NN=71934,QB=205,FB=218,HB="callee",RN=43711,ON=64284,IN=43754,LN=43790,qB="%Li",Oc="pattern_array_rest_element_pattern",kd="decorators",MN=8304,Ic="statement",hd=73062,Lc="jsx_children",DN=70492,jN=64255,UN=11630,BN=1255,_d=67592,wd=43519,Td=64311,Sd=12539,YN="proto",Ed=120513,XN=68031,Lv="source",wl="a",JN=93047,VN=92927,zN=126588,KN=73458,ZN=67742,WN=43714,GB=288,bB=236,$N=-253313196,Tl="label",xY="@[<2>{ ",gd=126539,Ad=126552,QN=120487,rY="Out_of_memory",FN=605857695,HN=94026,eY=267,Pd=126496,Co="async",tY=203,Cd=126560,qN=68287,Mc="unary_expression",GN=-26065557,bN=110587,nY=280,Nd=120771,xR=69762,rR=126502,Da="set",Dc="object_",jc="template_literal",eR=43258,Uc="nullable_type",Ds="int_of_string",uY="^=",je="predicate",ja="string",Rd=8450,iY="camlinternalMod.ml",tR=70285,js="+",nR=110575,fY=198,Bc="extends",cY=-692038429,Od=67827,sY=210,oY=227,Id="explicitType",Ld=70452,uR=70497,Ua=63,Sl="private",iR=64296,fR=67591,cR=92909,vY="T_JSX_TEXT",sR="Fatal error: exception ",oR=120137,Md=68120,Yc="pattern_array_e",vR=119964,aR=92862,lR=66461,aY="&&=",lY=174,s2=8231,Xc="null_literal",pY="/=",pR=66811,Dd=70108,dR=67504,yR=11686,mR=67001,kR=" : flags Open_text and Open_binary are not compatible",hR=43741,_R=66204,q1=8233,Jc="type_annotation_hint",wR=123197,Vc="object_property",dY="${",jd=70480,yY="&&",zc="type_cast",El="%d",Ud=8484,mY=207,TR=70066,SR=68324,Bd=120713,kY=135,Yd=126556,xe="0",B2="yield",Xd=126591,st=100,ER=69551,Kc="jsx_element_name_namespaced",hY=232,Zc="object_key_string_literal",Wc="function_this_param_type",$c="pattern_object_property_pattern",Ue="throw",Be="switch",_Y=2048,Jd=119970,Qc="toplevel_statement_list",Ba=250,gR=12438,Fc="class_implements",Hc="variable_declarator",AR=43713,Vd=68096,PR=70457,CR=12538,NR=11734,wY="-=",TY=234,qc="component_param_name",RR=43123,Gc="class_",SY="|",OR=200,IR=43518,LR=8483,bc="jsx_attribute_name_identifier",MR=181;function hZ(x,r,e,t,u){if(t<=r)for(var i=1;i<=u;i++)e[t+i]=x[r+i];else for(var i=u;i>=1;i--)e[t+i]=x[r+i];return 0}function _Z(x){for(var r=[0];x!==0;){for(var e=x[1],t=1;t=e.l||e.t==2&&u>=e.c.length))e.c=x.t==4?zd(x.c,r,u):r==0&&x.c.length==u?x.c:x.c.substr(r,u),e.t=e.c.length==e.l?0:2;else if(e.t==2&&t==e.c.length)e.c+=x.t==4?zd(x.c,r,u):r==0&&x.c.length==u?x.c:x.c.substr(r,u),e.t=e.c.length==e.l?0:2;else{e.t!=4&&Kd(e);var i=x.c,f=e.c;if(x.t==4)if(t<=r)for(var o=0;o=0;o--)f[t+o]=i[r+o];else{for(var a=Math.min(u,i.length-r),o=0;o>=1,x==0)return e;r+=r,t++,t==9&&r.slice(0,1)}}function Zd(x){x.t==2?x.c+=Ya(x.l-x.c.length,"\0"):x.c=zd(x.c,0,x.c.length),x.t=0}function DR(x){if(x.length<24){for(var r=0;rJr)return!1;return!0}else return!/[^\x00-\x7f]/.test(x)}function EY(x){for(var r=hx,e=hx,t,u,i,f,o=0,a=x.length;ohw?(e.substr(0,1),r+=e,e=hx,r+=x.slice(o,d)):e+=x.slice(o,d),d==a)break;o=d}f=1,++o=55295&&f<57344)&&(f=2)):(f=3,++o1114111)&&(f=3)))))),f<4?(o-=f,e+="\uFFFD"):f>fn?e+=String.fromCharCode(55232+(f>>10),VU+(f&1023)):e+=String.fromCharCode(f),e.length>yl&&(e.substr(0,1),r+=e,e=hx)}return r+e}function Bs(x,r,e){this.t=x,this.c=r,this.l=e}Bs.prototype.toString=function(){switch(this.t){case 9:return this.c;default:Zd(this);case 0:if(DR(this.c))return this.t=9,this.c;this.t=8;case 8:return this.c}},Bs.prototype.toUtf16=function(){var x=this.toString();return this.t==9?x:EY(x)},Bs.prototype.slice=function(){var x=this.t==4?this.c.slice():this.c;return new Bs(this.t,x,this.l)};function gY(x){return new Bs(0,x,x.length)}function jN0(x){return x}function xs(x){return gY(x)}function rs(x,r,e,t,u){return Us(xs(x),r,e,t,u),0}function AY(x){var r=d0.process;if(r&&r.env&&r.env[x]!=null)return r.env[x];if(d0.jsoo_static_env&&d0.jsoo_static_env[x])return d0.jsoo_static_env[x]}var jR=0;(function(){var x=AY("OCAMLRUNPARAM");if(x!==void 0)for(var r=x.split(HM),e=0;e>>0>=x.l&&EZ(),Zr(x,r,e)}function se(x,r){switch(x.t&6){default:if(r>=x.c.length)return 0;case 0:return x.c.charCodeAt(r);case 4:return x.c[r]}}function Ys(x,r){var e=x.l>=0?x.l:x.l=x.length,t=r.length,u=e-t;if(u==0)return x.apply(null,r);if(u<0){var i=x.apply(null,r.slice(0,e));return typeof i!="function"?i:Ys(i,r.slice(e))}else{switch(u){case 1:{var i=function(a){for(var d=new Array(t+1),k=0;k>>0>=x.length-1&&gl(),x}function gZ(x){return isFinite(x)?Math.abs(x)>=22250738585072014e-324?0:x!=0?1:2:isNaN(x)?4:3}function AZ(x){return 0}var PZ=Math.log2&&Math.log2(11235582092889474e291)==1020;function CZ(x){if(PZ)return Math.floor(Math.log2(x));var r=0;if(x==0)return-1/0;if(x>=1)for(;x>=2;)x/=2,r++;else for(;x<1;)x*=2,r--;return r}function BR(x){var r=new Float32Array(1);r[0]=x;var e=new Int32Array(r.buffer);return e[0]|0}var PY=Math.pow(2,-24);function CY(x){throw x}function NY(){CY(Y2.Division_by_zero)}function fr(x,r,e){this.lo=x&Ni,this.mi=r&Ni,this.hi=e&fn}fr.prototype.caml_custom="_j",fr.prototype.copy=function(){return new fr(this.lo,this.mi,this.hi)},fr.prototype.ucompare=function(x){return this.hi>x.hi?1:this.hix.mi?1:this.mix.lo?1:this.loe?1:rx.mi?1:this.mix.lo?1:this.lo>24),e=-this.hi+(r>>24);return new fr(x,r,e)},fr.prototype.add=function(x){var r=this.lo+x.lo,e=this.mi+x.mi+(r>>24),t=this.hi+x.hi+(e>>24);return new fr(r,e,t)},fr.prototype.sub=function(x){var r=this.lo-x.lo,e=this.mi-x.mi+(r>>24),t=this.hi-x.hi+(e>>24);return new fr(r,e,t)},fr.prototype.mul=function(x){var r=this.lo*x.lo,e=(r*PY|0)+this.mi*x.lo+this.lo*x.mi,t=(e*PY|0)+this.hi*x.lo+this.mi*x.mi+this.lo*x.hi;return new fr(r,e,t)},fr.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0},fr.prototype.isNeg=function(){return this.hi<<16<0},fr.prototype.and=function(x){return new fr(this.lo&x.lo,this.mi&x.mi,this.hi&x.hi)},fr.prototype.or=function(x){return new fr(this.lo|x.lo,this.mi|x.mi,this.hi|x.hi)},fr.prototype.xor=function(x){return new fr(this.lo^x.lo,this.mi^x.mi,this.hi^x.hi)},fr.prototype.shift_left=function(x){return x=x&63,x==0?this:x<24?new fr(this.lo<>24-x,this.hi<>24-x):x<48?new fr(0,this.lo<>48-x):new fr(0,0,this.lo<>x|this.mi<<24-x,this.mi>>x|this.hi<<24-x,this.hi>>x):x<48?new fr(this.mi>>x-24|this.hi<<48-x,this.hi>>x-24,0):new fr(this.hi>>x-48,0,0)},fr.prototype.shift_right=function(x){if(x=x&63,x==0)return this;var r=this.hi<<16>>16;if(x<24)return new fr(this.lo>>x|this.mi<<24-x,this.mi>>x|r<<24-x,this.hi<<16>>x>>>16);var e=this.hi<<16>>31;return x<48?new fr(this.mi>>x-24|this.hi<<48-x,this.hi<<16>>x-24>>16,e&fn):new fr(this.hi<<16>>x-32,e,e)},fr.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23,this.mi=(this.mi<<1|this.lo>>23)&Ni,this.lo=this.lo<<1&Ni},fr.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&Ni,this.mi=(this.mi>>>1|this.hi<<23)&Ni,this.hi=this.hi>>>1},fr.prototype.udivmod=function(x){for(var r=0,e=this.copy(),t=x.copy(),u=new fr(0,0,0);e.ucompare(t)>0;)r++,t.lsl1();for(;r>=0;)r--,u.lsl1(),e.ucompare(t)>=0&&(u.lo++,e=e.sub(t)),t.lsr1();return{quotient:u,modulus:e}},fr.prototype.div=function(x){var r=this;x.isZero()&&NY();var e=r.hi^x.hi;r.hi&ln&&(r=r.neg()),x.hi&ln&&(x=x.neg());var t=r.udivmod(x).quotient;return e&ln&&(t=t.neg()),t},fr.prototype.mod=function(x){var r=this;x.isZero()&&NY();var e=r.hi;r.hi&ln&&(r=r.neg()),x.hi&ln&&(x=x.neg());var t=r.udivmod(x).modulus;return e&ln&&(t=t.neg()),t},fr.prototype.toInt=function(){return this.lo|this.mi<<24},fr.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo},fr.prototype.toArray=function(){return[this.hi>>8,this.hi&Ls,this.mi>>16,this.mi>>8&Ls,this.mi&Ls,this.lo>>16,this.lo>>8&Ls,this.lo&Ls]},fr.prototype.lo32=function(){return this.lo|(this.mi&Ls)<<24},fr.prototype.hi32=function(){return this.mi>>>8&fn|this.hi<<16};function Wd(x,r,e){return new fr(x,r,e)}function $d(x){if(!isFinite(x))return isNaN(x)?Wd(1,0,UU):x>0?Wd(0,0,UU):Wd(0,0,65520);var r=x==0&&1/x==-1/0?ln:x>=0?0:ln;r&&(x=-x);var e=CZ(x)+1023;e<=0?(e=0,x/=Math.pow(2,-xB)):(x/=Math.pow(2,e-iD),x<16&&(x*=2,e-=1),e==0&&(x/=2));var t=Math.pow(2,24),u=x|0;x=(x-u)*t;var i=x|0;x=(x-i)*t;var f=x|0;return u=u&tC|r|e<<4,Wd(f,i,u)}function Al(x){return x.toArray()}function RY(x,r,e){if(x.write(32,r.dims.length),x.write(32,r.kind|r.layout<<8),r.caml_custom==lp)for(var t=0;t>4;if(u==dj)return r|e|t&tC?NaN:t&ln?-1/0:1/0;var i=Math.pow(2,-24),f=(r*i+e)*i+(t&tC);return u>0?(f+=16,f*=Math.pow(2,u-iD)):f*=Math.pow(2,-xB),t&ln&&(f=-f),f}function JR(x){for(var r=x.length,e=1,t=0;t>>24&Ls|(r&fn)<<8,r>>>16&fn)}function VR(x){return x.hi32()}function zR(x){return x.lo32()}var OZ=lp;function No(x,r,e,t){this.kind=x,this.layout=r,this.dims=e,this.data=t}No.prototype.caml_custom=OZ,No.prototype.offset=function(x){var r=0;if(typeof x=="number"&&(x=[x]),x instanceof Array||G1("bigarray.js: invalid offset"),this.dims.length!=x.length&&G1("Bigarray.get/set: bad number of dimensions"),this.layout==0)for(var e=0;e=this.dims[e])&&gl(),r=r*this.dims[e]+x[e];else for(var e=this.dims.length-1;e>=0;e--)(x[e]<1||x[e]>this.dims[e])&&gl(),r=r*this.dims[e]+(x[e]-1);return r},No.prototype.get=function(x){switch(this.kind){case 7:var r=this.data[x*2+0],e=this.data[x*2+1];return RZ(r,e);case 10:case 11:var t=this.data[x*2+0],u=this.data[x*2+1];return[Ia,t,u];default:return this.data[x]}},No.prototype.set=function(x,r){switch(this.kind){case 7:this.data[x*2+0]=zR(r),this.data[x*2+1]=VR(r);break;case 10:case 11:this.data[x*2+0]=r[1],this.data[x*2+1]=r[2];break;default:this.data[x]=r;break}return 0},No.prototype.fill=function(x){switch(this.kind){case 7:var r=zR(x),e=VR(x);if(r==e)this.data.fill(r);else for(var t=0;tf)return 1;if(i!=f){if(!r)return NaN;if(i==i)return 1;if(f==f)return-1}}break;case 7:for(var u=0;ux.data[u+1])return 1;if(this.data[u]>>>0>>0)return-1;if(this.data[u]>>>0>x.data[u]>>>0)return 1}break;case 2:case 3:case 4:case 5:case 6:case 8:case 9:case 12:for(var u=0;ux.data[u])return 1}break}return 0};function Ja(x,r,e,t){this.kind=x,this.layout=r,this.dims=e,this.data=t}Ja.prototype=new No,Ja.prototype.offset=function(x){return typeof x!="number"&&(x instanceof Array&&x.length==1?x=x[0]:G1("Ml_Bigarray_c_1_1.offset")),(x<0||x>=this.dims[0])&&gl(),x},Ja.prototype.get=function(x){return this.data[x]},Ja.prototype.set=function(x,r){return this.data[x]=r,0},Ja.prototype.fill=function(x){return this.data.fill(x),0};function IY(x,r,e,t){var u=OY(x);return JR(e)*u!=t.length&&G1("length doesn't match dims"),r==0&&e.length==1&&u==1?new Ja(x,r,e,t):new No(x,r,e,t)}function X2(x){Y2.Failure||(Y2.Failure=[Gr,ew,-3]),UR(Y2.Failure,x)}function LY(x,r,e){var t=x.read32s();(t<0||t>16)&&X2("input_value: wrong number of bigarray dimensions");var u=x.read32s(),i=u&Ls,f=u>>8&1,o=[];if(e==lp)for(var a=0;a>>17,r=DY(r,461845907),x^=r,x=x<<13|x>>>19,(x+(x<<2)|0)+-430675100|0}function IZ(x,r){return x=Xs(x,zR(r)),x=Xs(x,VR(r)),x}function jY(x,r){return IZ(x,$d(r))}function UY(x){var r=JR(x.dims),e=0;switch(x.kind){case 2:case 3:case 12:r>H3&&(r=H3);var t=0,u=0;for(u=0;u+4<=x.data.length;u+=4)t=x.data[u+0]|x.data[u+1]<<8|x.data[u+2]<<16|x.data[u+3]<<24,e=Xs(e,t);switch(t=0,r&3){case 3:t=x.data[u+2]<<16;case 2:t|=x.data[u+1]<<8;case 1:t|=x.data[u+0],e=Xs(e,t)}break;case 4:case 5:r>h1&&(r=h1);var t=0,u=0;for(u=0;u+2<=x.data.length;u+=2)t=x.data[u+0]|x.data[u+1]<<16,e=Xs(e,t);r&1&&(e=Xs(e,x.data[u]));break;case 6:r>64&&(r=64);for(var u=0;u64&&(r=64);for(var u=0;u32&&(r=32),r*=2;for(var u=0;u64&&(r=64);for(var u=0;u32&&(r=32);for(var u=0;u0?u(r,x,t):u(x,r,t);if(t&&i!=i)return e;if(+i!=+i)return+i;if(i|0)return i|0}return e}function ZR(x){return typeof x=="string"&&!/[^\x00-\xff]/.test(x)}function WR(x){return x instanceof Bs}function XY(x){if(typeof x=="number")return ol;if(WR(x))return Av;if(ZR(x))return 1252;if(x instanceof Array&&x[0]===x[0]>>>0&&x[0]<=$3){var r=x[0]|0;return r==Ia?0:r}else{if(x instanceof String)return hD;if(typeof x=="string")return hD;if(x instanceof Number)return ol;if(x&&x.caml_custom)return BN;if(x&&x.compare)return 1256;if(typeof x=="function")return 1247;if(typeof x=="symbol")return 1251}return 1001}function Ut(x,r){return xr?1:0}function YZ(x,r){return x.t&6&&Zd(x),r.t&6&&Zd(r),x.cr.c?1:0}function Qd(x,r,e){for(var t=[];;){if(!(e&&x===r)){var u=XY(x);if(u==Ba){x=x[1];continue}var i=XY(r);if(i==Ba){r=r[1];continue}if(u!==i)return u==ol?i==BN?YY(x,r,-1,e):-1:i==ol?u==BN?YY(r,x,1,e):1:ur)return 1;if(x!=r){if(!e)return NaN;if(x==x)return 1;if(r==r)return-1}break;case 1001:if(xr)return 1;if(x!=r){if(!e)return NaN;if(x==x)return 1;if(r==r)return-1}break;case 1251:if(x!==r)return e?1:NaN;break;case 1252:var x=x,r=r;if(x!==r){if(xr)return 1}break;case 12520:var x=x.toString(),r=r.toString();if(x!==r){if(xr)return 1}break;case 246:case 254:default:if(AZ(u)){G1("compare: continuation value");break}if(x.length!=r.length)return x.length1&&t.push(x,r,1);break}}if(t.length==0)return 0;var a=t.pop();r=t.pop(),x=t.pop(),a+10)if(r==0&&(e>=x.l||x.t==2&&e>=x.c.length))t==0?(x.c=hx,x.t=2):(x.c=Ya(e,String.fromCharCode(t)),x.t=e==x.l?0:2);else for(x.t!=4&&Kd(x),e+=r;r0&&r===r||(x=x.replace(/_/g,hx),r=+x,x.length>0&&r===r||/^[+-]?nan$/i.test(x)))return r;var e=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)(p([+-]?[0-9]+))?/i.exec(x);if(e){var t=e[3].replace(/0+$/,hx),u=parseInt(e[1]+e[2]+t,16),i=(e[5]|0)-4*t.length;return r=u*Math.pow(2,i),r}if(/^\+?inf(inity)?$/i.test(x))return 1/0;if(/^-inf(inity)?$/i.test(x))return-1/0;X2("float_of_string")}function QR(x){x=x;var r=x.length;r>31&&G1("format_int: format too long");for(var e={justify:js,signstyle:Lt,filler:Mt,alternate:!1,base:0,signedconv:!1,width:0,uppercase:!1,sign:1,prec:-1,conv:tB},t=0;t=0&&u<=9;)e.width=e.width*10+u,t++;t--;break;case".":for(e.prec=0,t++;u=x.charCodeAt(t)-48,u>=0&&u<=9;)e.prec=e.prec*10+u,t++;t--;case"d":case"i":e.signedconv=!0;case"u":e.base=10;break;case"x":e.base=16;break;case"X":e.base=16,e.uppercase=!0;break;case"o":e.base=8;break;case"e":case"f":case"g":e.signedconv=!0,e.conv=u;break;case"E":case"F":case"G":e.signedconv=!0,e.uppercase=!0,e.conv=u.toLowerCase();break}}return e}function FR(x,r){x.uppercase&&(r=r.toUpperCase());var e=r.length;x.signedconv&&(x.sign<0||x.signstyle!=Lt)&&e++,x.alternate&&(x.base==8&&(e+=1),x.base==16&&(e+=2));var t=hx;if(x.justify==js&&x.filler==Mt)for(var u=e;u20?(g-=20,k/=Math.pow(10,g),k+=new Array(g+1).join(xe),T>0&&(k=k+ic+new Array(T+1).join(xe)),k):k.toFixed(T)}var t,u=QR(x),i=u.prec<0?6:u.prec;if((r<0||r==0&&1/r==-1/0)&&(u.sign=-1,r=-r),isNaN(r))t=Zk,u.filler=Mt;else if(!isFinite(r))t="inf",u.filler=Mt;else switch(u.conv){case"e":var t=r.toExponential(i),f=t.length;t.charAt(f-3)==wh&&(t=t.slice(0,f-1)+xe+t.slice(f-1));break;case"f":t=e(r,i);break;case"g":i=i||1,t=r.toExponential(i-1);var o=t.indexOf(wh),a=+t.slice(o+1);if(a<-4||r>=1e21||r.toFixed(0).length>i){for(var f=o-1;t.charAt(f)==xe;)f--;t.charAt(f)==ic&&f--,t=t.slice(0,f+1)+t.slice(o),f=t.length,t.charAt(f-3)==wh&&(t=t.slice(0,f-1)+xe+t.slice(f-1));break}else{var d=i;if(a<0)d-=a+1,t=r.toFixed(d);else for(;t=r.toFixed(d),t.length>i+1;)d--;if(d){for(var f=t.length-1;t.charAt(f)==xe;)f--;t.charAt(f)==ic&&f--,t=t.slice(0,f+1)}}break}return FR(u,t)}function Fd(x,r){if(x==El)return hx+r;var e=QR(x);r<0&&(e.signedconv?(e.sign=-1,r=-r):r>>>=0);var t=r.toString(e.base);if(e.prec>=0){e.filler=Mt;var u=e.prec-t.length;u>0&&(t=Ya(u,xe)+t)}return FR(e,t)}var VY=0;function Js(){return VY++}function zY(){return[0]}var Hd=[];function bx(x,r,e){var t=x[1],u=Hd[e];if(u===void 0)for(var i=Hd.length;i>1|1,rhw?(e.substr(0,1),r+=e,e=hx,r+=x.slice(i,o)):e+=x.slice(i,o),o==f)break;i=o}t<_Y?(e+=String.fromCharCode(192|t>>6),e+=String.fromCharCode(on|t&Ua)):t<55296||t>=ZB?e+=String.fromCharCode(iB|t>>12,on|t>>6&Ua,on|t&Ua):t>=56319||i+1==f||(u=x.charCodeAt(i+1))ZB?e+="\xEF\xBF\xBD":(i++,t=(t<<10)+u-56613888,e+=String.fromCharCode(YB|t>>18,on|t>>12&Ua,on|t>>6&Ua,on|t&Ua)),e.length>yl&&(e.substr(0,1),r+=e,e=hx)}return r+e}function Bt(x){return DR(x)?x:VZ(x)}function zZ(x,r,e){if(!isFinite(x))return isNaN(x)?Bt(Zk):Bt(x>0?Mj:"-infinity");var t=x==0&&1/x==-1/0?1:x>=0?0:1;t&&(x=-x);var u=0;if(x!=0)if(x<1)for(;x<1&&u>-1022;)x*=2,u--;else for(;x>=2;)x/=2,u++;var i=u<0?hx:js,f=hx;if(t)f=Lt;else switch(e){case 43:f=js;break;case 32:f=Mt;break;default:break}if(r>=0&&r<13){var o=Math.pow(2,r*4);x=Math.round(x*o)/o}var a=x.toString(16);if(r>=0){var d=a.indexOf(ic);if(d<0)a+=ic+Ya(r,xe);else{var k=d+1+r;a.length>24&Ni,x>>31&fn)}function ZZ(x){return x.toInt()}function WZ(x){return+x.isNeg()}function qR(x){return x.neg()}function $Z(x,r){var e=QR(x);e.signedconv&&WZ(r)&&(e.sign=-1,r=qR(r));var t=hx,u=qd(e.base),i="0123456789abcdef";do{var f=r.udivmod(u);r=f.quotient,t=i.charAt(ZZ(f.modulus))+t}while(!KZ(r));if(e.prec>=0){e.filler=Mt;var o=e.prec-t.length;o>0&&(t=Ya(o,xe)+t)}return FR(e,t)}function Xx(x){return x.length}function fx(x,r){return x.charCodeAt(r)}function QZ(x,r){return x.add(r)}function FZ(x,r){return x.mul(r)}function GR(x,r){return x.ucompare(r)<0}function KY(x){var r=0,e=Xx(x),t=10,u=1;if(e>0)switch(fx(x,r)){case 45:r++,u=-1;break;case 43:r++,u=1;break}if(r+1=48&&x<=57?x-48:x>=65&&x<=90?x-55:x>=97&&x<=x1?x-87:-1}function Nl(x){var r=KY(x),e=r[0],t=r[1],u=r[2],i=qd(u),f=new fr(Ni,268435455,fn).udivmod(i).quotient,o=fx(x,e),a=Gd(o);(a<0||a>=u)&&X2(Ds);for(var d=qd(a);;)if(e++,o=fx(x,e),o!=95){if(a=Gd(o),a<0||a>=u)break;GR(f,d)&&X2(Ds),a=qd(a),d=QZ(FZ(i,d),a),GR(d,a)&&X2(Ds)}return e!=Xx(x)&&X2(Ds),u==10&&GR(new fr(0,0,ln),d)&&X2(Ds),t<0&&(d=qR(d)),d}function bd(x){return x.toFloat()}function ot(x){var r=KY(x),e=r[0],t=r[1],u=r[2],i=Xx(x),f=-1>>>0,o=e=u)&&X2(Ds);var d=a;for(e++;e=u)break;d=u*d+a,d>f&&X2(Ds)}return e!=i&&X2(Ds),d=t*d,u==10&&(d|0)!=d&&X2(Ds),d|0}function HZ(x){return x.slice(1)}function er(x){return DR(x)?x:EY(x)}function qZ(x){for(var r={},e=1;e=0?x.l:x.l=x.length}function bZ(x){return function(){for(var r=GZ(x),e=new Array(r),t=0;t1&&t.pop();break;case".":break;case"":break;default:t.push(e[u]);break}return t.unshift(r[0]),t.orig=x,t}var uW=["E2BIG","EACCES","EAGAIN",JT,"EBUSY","ECHILD","EDEADLK","EDOM",sU,"EFAULT","EFBIG","EINTR","EINVAL","EIO","EISDIR","EMFILE","EMLINK","ENAMETOOLONG","ENFILE","ENODEV",HS,"ENOEXEC","ENOLCK","ENOMEM","ENOSPC","ENOSYS",lh,rD,"ENOTTY","ENXIO","EPERM","EPIPE","ERANGE","EROFS","ESPIPE","ESRCH","EXDEV","EWOULDBLOCK","EINPROGRESS","EALREADY","ENOTSOCK","EDESTADDRREQ","EMSGSIZE","EPROTOTYPE","ENOPROTOOPT","EPROTONOSUPPORT","ESOCKTNOSUPPORT","EOPNOTSUPP","EPFNOSUPPORT","EAFNOSUPPORT","EADDRINUSE","EADDRNOTAVAIL","ENETDOWN","ENETUNREACH","ENETRESET","ECONNABORTED","ECONNRESET","ENOBUFS","EISCONN","ENOTCONN","ESHUTDOWN","ETOOMANYREFS","ETIMEDOUT","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","ELOOP","EOVERFLOW"];function zs(x,r,e,t){var u=uW.indexOf(x);u<0&&(t==null&&(t=-9999),u=[0,t]);var i=[u,Bt(r||hx),Bt(e||hx)];return i}var QY={};function Ro(x){return QY[x]}function Ks(x,r){throw q0([0,x].concat(r))}function xO(x){return x instanceof Uint8Array||(x=new Uint8Array(x)),new Bs(4,x,x.length)}function FY(x){Ir(x+pp)}function re(x){this.data=x}re.prototype=new ZY,re.prototype.constructor=re,re.prototype.truncate=function(x){var r=this.data;this.data=S1(x|0),Us(r,0,this.data,0,x)},re.prototype.length=function(){return vt(this.data)},re.prototype.write=function(x,r,e,t){var u=this.length();if(x+t>=u){var i=S1(x+t),f=this.data;this.data=i,Us(f,0,this.data,0,u)}return Us(xO(r),e,this.data,x,t),0},re.prototype.read=function(x,r,e,t){var u=this.length();if(x+t>=u&&(t=u-x),t){var i=S1(t|0);Us(this.data,x,i,0,t),r.set(WY(i),e)}return t};function Mv(x,r,e){this.file=r,this.name=x,this.flags=e}Mv.prototype.err_closed=function(){Ir(this.name+aj)},Mv.prototype.length=function(){if(this.file)return this.file.length();this.err_closed()},Mv.prototype.write=function(x,r,e,t){if(this.file)return this.file.write(x,r,e,t);this.err_closed()},Mv.prototype.read=function(x,r,e,t){if(this.file)return this.file.read(x,r,e,t);this.err_closed()},Mv.prototype.close=function(){this.file=void 0};function p2(x,r){this.content={},this.root=x,this.lookupFun=r}p2.prototype.nm=function(x){return this.root+x},p2.prototype.create_dir_if_needed=function(x){for(var r=x.split(q2),e=hx,t=0;t0&&e>=0&&e+t<=r.length&&r[e+t-1]==10&&t--;var u=S1(t);return Us(xO(r),e,u,0,t),this.log(u.toUtf16()),0}Ir(this.fd+aj)},Il.prototype.read=function(x,r,e,t){Ir(this.fd+": file descriptor is write only")},Il.prototype.close=function(){this.log=void 0};function ty(x,r){return r==null&&(r=ry.length),ry[r]=x,r|0}function YN0(x,r,e){for(var t={};r;){switch(r[1]){case 0:t.rdonly=1;break;case 1:t.wronly=1;break;case 2:t.append=1;break;case 3:t.create=1;break;case 4:t.truncate=1;break;case 5:t.excl=1;break;case 6:t.binary=1;break;case 7:t.text=1;break;case 8:t.nonblock=1;break}r=r[2]}t.rdonly&&t.wronly&&Ir(x+iS),t.text&&t.binary&&Ir(x+kR);var u=iW(x),i=u.device.open(u.rest,t);return ty(i,void 0)}(function(){function x(r,e){return Rl()?eW(r,e):new Il(r,e)}ty(x(0,{rdonly:1,altname:"/dev/stdin",isCharacterDevice:!0}),0),ty(x(1,{buffered:2,wronly:1,isCharacterDevice:!0}),1),ty(x(2,{buffered:2,wronly:1,isCharacterDevice:!0}),2)})();function fW(x){var r=ry[x];r.flags.wronly&&Ir(_B+x+" is writeonly");var e=null,t={file:r,offset:r.flags.append?r.length():0,fd:x,opened:!0,out:!1,buffer_curr:0,buffer_max:0,buffer:new Uint8Array(il),refill:e};return Vs[t.fd]=t,t.fd}function qY(x){var r=ry[x];r.flags.rdonly&&Ir(_B+x+" is readonly");var e=r.flags.buffered!==void 0?r.flags.buffered:1,t={file:r,offset:r.flags.append?r.length():0,fd:x,opened:!0,out:!0,buffer_curr:0,buffer:new Uint8Array(il),buffered:e};return Vs[t.fd]=t,t.fd}function cW(){for(var x=0,r=0;ru.buffer.length){var f=new Uint8Array(u.buffer_curr+i.length);f.set(u.buffer),u.buffer=f}switch(u.buffered){case 0:u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,es(x);break;case 1:u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,u.buffer_curr>=u.buffer.length&&es(x);break;case 2:var o=i.lastIndexOf(10);o<0?(u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,u.buffer_curr>=u.buffer.length&&es(x)):(u.buffer.set(i.subarray(0,o+1),u.buffer_curr),u.buffer_curr+=o+1,es(x),u.buffer.set(i.subarray(o+1),u.buffer_curr),u.buffer_curr+=i.length-o-1);break}return 0}function rO(x,r,e,t){return sW(x,xs(r),e,t)}function GY(x,r){var e=String.fromCharCode(r);return rO(x,e,0,1),0}function Ll(x,r){return+(Qd(x,r,!1)!=0)}function eO(x,r){var e=new Array(r+1);e[0]=x;for(var t=1;t<=r;t++)e[t]=0;return e}function oW(x,r){return x[0]=Ba,x[1]=r,0}function Dv(x){return x instanceof Array&&x[0]==x[0]>>>0?x[0]:WR(x)||ZR(x)?Av:x instanceof Function||typeof x=="function"?b8:x&&x.caml_custom?$3:ol}function vW(x){for(var r;x;)if(er(x[1][1])=="SYJS"){r=x[1][2];break}else x=x[2];var e={};if(r)for(var t=1;t=0?x=u:X2("caml_register_global: cannot locate "+t)}}Y2[x+1]=r,e&&(Y2[e]=r)}function tO(x,r){return QY[x]=r,0}function aW(x){return x[2]=VY++,x}function Ar(x,r){return x===r?1:0}function lW(){G1(ag)}function O1(x,r){return r>>>0>=Xx(x)&&lW(),fx(x,r)}function P(x,r){return 1-Ar(x,r)}function pW(){return 2147483647/4|0}var dW=d0.process&&d0.process.platform&&d0.process.platform==Aj?jB:"Unix";function yW(){return[0,dW,32,0]}function mW(){CY(Y2.Not_found)}function bY(x){var r=AY(er(x));return r===void 0&&mW(),Bt(r)}function nO(x){for(var r=1;x&&x.joo_tramp;)x=x.joo_tramp.apply(null,x.joo_args),r++;return x}function d2(x,r){return{joo_tramp:x,joo_args:r}}function O0(x,r){if(typeof r=="function")return x.fun=r,0;if(r.fun)return x.fun=r.fun,0;for(var e=r.length;e--;)x[e]=r[e];return 0}function I1(x){{if(x instanceof Array)return x;var r;return d0.RangeError&&x instanceof d0.RangeError&&x.message&&x.message.match(/maximum call stack/i)||d0.InternalError&&x instanceof d0.InternalError&&x.message&&x.message.match(/too much recursion/i)?r=Y2.Stack_overflow:x instanceof d0.Error&&Ro(YE)?r=[0,Ro(YE),x]:r=[0,Y2.Failure,Bt(String(x))],x instanceof d0.Error&&(r.js_error=x),r}}function kW(x){switch(x[2]){case-8:case-11:case-12:return 1;default:return 0}}function hW(x){var r=hx;if(x[0]==0){if(r+=x[1][1],x.length==3&&x[2][0]==0&&kW(x[1]))var t=x[2],e=1;else var e=2,t=x;r+=KM;for(var u=e;ue&&(r+=KD);var i=t[u];typeof i=="number"?r+=i.toString():i instanceof Bs||typeof i=="string"?r+=s5+i.toString()+s5:r+=Ca}r+=ZS}else x[0]==Gr&&(r+=x[1]);return r}function xX(x){if(x instanceof Array&&(x[0]==0||x[0]==Gr)){var r=Ro(yD);if(r)xy(r,[x,!1]);else{var e=hW(x),t=Ro(ij);if(t&&xy(t,[0]),console.error(sR+e+` +`),x.js_error)throw x.js_error}}else throw x}function _W(){var x=d0.process;x&&x.on?x.on("uncaughtException",function(r,e){xX(r),x.exit(2)}):d0.addEventListener&&d0.addEventListener("error",function(r){r.error&&xX(r.error)})}_W();function l(x,r){return(x.l>=0?x.l:x.l=x.length)==1?x(r):Ys(x,[r])}function p(x,r,e){return(x.l>=0?x.l:x.l=x.length)==2?x(r,e):Ys(x,[r,e])}function G0(x,r,e,t){return(x.l>=0?x.l:x.l=x.length)==3?x(r,e,t):Ys(x,[r,e,t])}function oe(x,r,e,t,u){return(x.l>=0?x.l:x.l=x.length)==4?x(r,e,t,u):Ys(x,[r,e,t,u])}function Ye(x,r,e,t,u,i){return(x.l>=0?x.l:x.l=x.length)==5?x(r,e,t,u,i):Ys(x,[r,e,t,u,i])}function wW(x,r,e,t,u,i,f,o){return(x.l>=0?x.l:x.l=x.length)==7?x(r,e,t,u,i,f,o):Ys(x,[r,e,t,u,i,f,o])}var uO=[Gr,rY,-1],rX=[Gr,CB,-2],kn=[Gr,ew,-3],iO=[Gr,hB,-4],A2=[Gr,Rj,-7],eX=[Gr,ZU,-8],tX=[Gr,PU,-9],wr=[Gr,bM,-11],Ml=[Gr,qU,-12],TW=[4,0,0,0,[12,45,[4,0,0,0,0]]],fO=[0,[11,'File "',[2,0,[11,'", line ',[4,0,0,0,[11,TU,[4,0,0,0,[12,45,[4,0,0,0,[11,": ",[2,0,0]]]]]]]]]],'File "%s", line %d, characters %d-%d: %s'],Ka=[0,0,[0,0,0],[0,0,0]],Dl=[0,0,0,0,1,0,0,0],nX=[0,"first_leading","last_trailing"],uX=[0,Cf,Df,ai,_7,Mf,b7,Ui,Su,dc,Y7,$i,jf,cn,$u,hc,Le,O7,tu,vf,Gf,N7,yi,Gc,Nc,n7,df,K7,Au,Wi,tf,Fc,F7,Ru,Si,sf,Ci,di,nc,Gi,au,d7,qc,W7,Gu,cf,Pc,hi,lf,xc,Hn,yc,_c,ef,Re,Oe,zu,Tf,Ac,Ki,T7,Bf,Zu,cc,kf,ac,Of,Rc,Mi,ce,Xi,t7,yf,nf,Cu,c7,ju,Vi,of,Cc,kc,Mu,Vu,af,w7,bn,Nf,m7,Qf,Z7,H1,Ti,xi,Gn,$7,y7,Yf,gf,G7,cu,Yi,Yu,Nu,pu,bu,oc,eu,zn,pc,S7,$n,B7,ti,ei,Uf,ii,wf,Kn,Ai,Wc,Hi,wu,gi,ku,Ou,Nt,g7,s7,P7,D2,Ei,ou,Ku,p7,hf,yu,$f,I7,G2,ni,r7,Kf,Zi,lu,bc,iu,_u,Vn,zi,Qu,Lc,lc,i7,Ef,Eu,ci,Kc,li,U7,o7,uu,qn,ec,rc,rf,fc,X7,Xu,Qn,ji,j7,Zn,vu,uf,ir,v7,pi,Bu,gc,ri,a7,Xc,Uc,Wu,Dc,Q7,Af,L7,Bi,Jf,qf,su,bi,Zc,pf,Vc,f7,vi,Pf,oi,sc,mi,nu,uc,u7,Fu,If,yn,Yc,Lu,z7,wc,Oc,R7,H7,Ju,l7,h7,Ji,Du,mc,tc,fu,Wf,$c,gu,zf,Tc,mu,je,Ec,du,Uu,Tu,xf,D7,k7,Me,Sc,qu,M7,Ic,Fi,qi,E7,ff,Be,Iu,xu,Xf,Sf,jc,Ii,Rf,Ue,Qc,mf,Qi,Pu,vc,Fn,x7,Pi,Ff,wi,Jc,A7,zc,_i,Wn,V7,Oi,bf,Hf,ru,C7,J7,ki,Hu,Mc,e7,q7,ui,Hc,Li,U2,Vf,_f,si,B2],hn=[0,0,0];Yt(11,Ml,qU),Yt(10,wr,bM),Yt(9,[Gr,jj,YD],jj),Yt(8,tX,PU),Yt(7,eX,ZU),Yt(6,A2,Rj),Yt(5,[Gr,oj,-6],oj),Yt(4,[Gr,mD,-5],mD),Yt(3,iO,hB),Yt(2,kn,ew),Yt(1,rX,CB),Yt(0,uO,rY);var SW="output_substring",EW=ic,gW=Cs,AW=Os,PW="CamlinternalLazy.Undefined",CW=DB,NW="\\'",RW="\\b",OW="\\t",IW="\\n",LW="\\r",MW="List.iter2",DW="tl",jW="hd",UW="String.blit / Bytes.blit_string",BW="Bytes.blit",YW="String.sub / Bytes.sub",XW="String.concat",JW="Array.blit",VW="Array.sub",zW="Map.remove_min_elt",KW=[0,0,0,0],ZW=[0,"map.ml",400,10],WW=[0,0,0],$W=F4,QW=F4,FW=F4,HW=F4,qW="Stdlib.Queue.Empty",GW="Buffer.add_substring/add_subbytes",bW="Buffer.add: cannot grow buffer",x$=[0,vD,93,2],r$=[0,vD,94,2],e$="Buffer.sub",t$="%c",n$="%s",u$=QM,i$=MB,f$=Ej,c$=qB,s$="%f",o$="%B",v$="%{",a$="%}",l$="%(",p$="%)",d$=zj,y$="%t",m$="%?",k$="%r",h$="%_r",_$=[0,i2,850,23],w$=[0,i2,814,21],T$=[0,i2,815,21],S$=[0,i2,818,21],E$=[0,i2,819,21],g$=[0,i2,822,19],A$=[0,i2,823,19],P$=[0,i2,826,22],C$=[0,i2,827,22],N$=[0,i2,831,30],R$=[0,i2,832,30],O$=[0,i2,836,26],I$=[0,i2,837,26],L$=[0,i2,846,28],M$=[0,i2,847,28],D$=[0,i2,851,23],j$=[0,i2,1558,4],U$="Printf: bad conversion %[",B$=[0,i2,1626,39],Y$=[0,i2,1649,31],X$=[0,i2,1650,31],J$="Printf: bad conversion %_",V$=FU,z$=gj,K$=FU,Z$=gj,W$=[0,[11,"invalid box description ",[3,0,0]],"invalid box description %S"],$$=[0,0,4],Q$=Zk,F$="neg_infinity",H$=Mj,q$=ic,G$=[0,nn],b$="%+nd",xQ="% nd",rQ="%+ni",eQ="% ni",tQ="%nx",nQ="%#nx",uQ="%nX",iQ="%#nX",fQ="%no",cQ="%#no",sQ="%nd",oQ=Ej,vQ="%nu",aQ="%+ld",lQ="% ld",pQ="%+li",dQ="% li",yQ="%lx",mQ="%#lx",kQ="%lX",hQ="%#lX",_Q="%lo",wQ="%#lo",TQ="%ld",SQ=MB,EQ="%lu",gQ="%+Ld",AQ="% Ld",PQ="%+Li",CQ="% Li",NQ="%Lx",RQ="%#Lx",OQ="%LX",IQ="%#LX",LQ="%Lo",MQ="%#Lo",DQ="%Ld",jQ=qB,UQ="%Lu",BQ="%+d",YQ="% d",XQ="%+i",JQ="% i",VQ="%x",zQ="%#x",KQ="%X",ZQ="%#X",WQ="%o",$Q="%#o",QQ=El,FQ=QM,HQ=vU,qQ=la,GQ="@}",bQ="@?",xF=`@ +`,rF="@.",eF="@@",tF="@%",nF=Pj,uF="CamlinternalFormat.Type_mismatch",iF=hx,fF=[0,[11,KD,[2,0,[2,0,0]]],", %s%s"],cF=[0,[11,sR,[2,0,[12,10,0]]],CU],sF=[0,[11,"Fatal error in uncaught exception handler: exception ",[2,0,[12,10,0]]],`Fatal error in uncaught exception handler: exception %s +`],oF="Fatal error: out of memory in uncaught exception handler",vF=[0,[11,sR,[2,0,[12,10,0]]],CU],aF=[0,[2,0,[12,10,0]],`%s +`],lF="Raised at",pF="Re-raised at",dF="Raised by primitive operation at",yF="Called from",mF=" (inlined)",kF=hx,hF=[0,[2,0,[12,32,[2,0,[11,' in file "',[2,0,[12,34,[2,0,[11,", line ",[4,0,0,0,[11,TU,TW]]]]]]]]]],'%s %s in file "%s"%s, line %d, characters %d-%d'],_F=[0,[2,0,[11," unknown location",0]],"%s unknown location"],wF="Out of memory",TF="Stack overflow",SF="Pattern matching failed",EF="Assertion failed",gF="Undefined recursive module",AF=[0,[12,40,[2,0,[2,0,[12,41,0]]]],"(%s%s)"],PF=hx,CF=hx,NF=[0,[12,40,[2,0,[12,41,0]]],"(%s)"],RF=[0,[4,0,0,0,0],El],OF=[0,[3,0,0],z3],IF=Ca,LF=[0,hx,`(Cannot print locations: bytecode executable program file not found)`,`(Cannot print locations: bytecode executable program file appears to be corrupt)`,`(Cannot print locations: bytecode executable program file has wrong magic number)`,`(Cannot print locations: bytecode executable program file cannot be opened; - -- too many open files. Try running with OCAMLRUNPARAM=b=2)`],MF=[3,0,3],DF=ic,jF=xl,UF="{"],sH=[0,[12,32,0],Dt],oH=[0,[12,32,0],Dt],vH=[0,[17,[0,"@,",0,0],[12,Di,[17,0,0]]],"@,}@]"],aH=[0,"src/hack_forked/utils/collections/third-party/flow_set.ml",379,14],lH=rl,pH=wa,dH=Ua,yH=wx,mH=wv,kH=[0,[12,40,[18,[1,[0,[11,Re,0],Re]],[11,"File_key.LibFile",[17,[0,ce,1,0],0]]]],"(@[<2>File_key.LibFile@ "],hH=[0,[3,0,0],K3],_H=[0,[17,0,[12,41,0]],op],wH=[0,[12,40,[18,[1,[0,[11,Re,0],Re]],[11,"File_key.SourceFile",[17,[0,ce,1,0],0]]]],"(@[<2>File_key.SourceFile@ "],TH=[0,[3,0,0],K3],SH=[0,[17,0,[12,41,0]],op],EH=[0,[12,40,[18,[1,[0,[11,Re,0],Re]],[11,"File_key.JsonFile",[17,[0,ce,1,0],0]]]],"(@[<2>File_key.JsonFile@ "],gH=[0,[3,0,0],K3],AH=[0,[17,0,[12,41,0]],op],PH=[0,[12,40,[18,[1,[0,[11,Re,0],Re]],[11,"File_key.ResourceFile",[17,[0,ce,1,0],0]]]],"(@[<2>File_key.ResourceFile@ "],CH=[0,[3,0,0],K3],NH=[0,[17,0,[12,41,0]],op],RH=[0,1],IH=[0,0],OH=[0,1],LH=[0,2],MH=[0,0],DH=[0,1],jH=[0,1],UH=[0,1],BH=[0,1],YH=[0,1],XH=[0,1],JH=[0,0,0],VH=[0,0,0],zH=[0,Y2,si,_f,Vf,B2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Ii,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Be,Rf,Oi,jc,Sf,Xf,xu,Ou,Ye,ff,E7,qi,Fi,Oc,M7,qu,Sc,De,k7,D7,xf,Tu,Uu,du,Ec,Ue,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Ic,wc,z7,Lu,Yc,yn,Of,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ur,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,b2,O7,$f,yu,hf,p7,Ku,ou,Ei,j2,P7,s7,g7,Rt,Iu,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,q1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,se,Mi,Rc,If,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Ie,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,I7,Me,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],KH=[0,Oc,Vn,ei,Iu,Kn,I7,Uc,qf,li,r7,$u,Jc,sc,Ye,nu,Qf,df,pf,lc,a7,O7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Rt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Ou,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,Of,Cf,$c,d7,_i,su,zf,uu,F7,oi,Ue,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,B2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,se,G7,wi,Y2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Ic,ec,qc,ur,j2,De,C7,Ii,ff,H7,Be,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,If,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,q1,Lu,nc,xi,Qi,zn,eu,Fi,Ie,$n,Gu,fu,af,ac,Oi,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Me,Mf,b2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],ZH=yD,WH=HD,$H=pD,QH=QD,FH=$T,HH=LD,qH=xl,GH=RU,bH=sD,xq=AD,rq=$M,eq=js,tq=Mt,nq=PB,uq=zD,iq=G2,fq=GD,cq=EY,sq=I8,oq=J4,vq=Po,aq=b3,lq=PD,pq=TY,dq=pj,yq=TD,mq=dY,kq=VM,hq=jU,_q=CD,wq=gB,Tq=Bj,Sq=iY,Eq=hD,gq=Gj,Aq=lY,Pq=tB,Cq=[0,[18,[1,[0,[11,Re,0],Re]],[11,sj,0]],rY],Nq="Loc.line",Rq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],Iq=[0,[4,0,0,0,0],gl],Oq=[0,[17,0,0],pa],Lq=[0,[12,59,[17,[0,ce,1,0],0]],ap],Mq=hl,Dq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],jq=[0,[4,0,0,0,0],gl],Uq=[0,[17,0,0],pa],Bq=[0,[17,[0,ce,1,0],[12,Di,[17,0,0]]],wj],Yq=[0,[15,0],Kj],Xq="(Some ",Jq=WS,Vq="None",zq=[0,[18,[1,[0,[11,Re,0],Re]],[11,sj,0]],rY],Kq="Loc.source",Zq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],Wq=[0,[17,0,0],pa],$q=[0,[12,59,[17,[0,ce,1,0],0]],ap],Qq=Mm,Fq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],Hq=[0,[17,0,0],pa],qq=[0,[12,59,[17,[0,ce,1,0],0]],ap],Gq="_end",bq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],xG=[0,[17,0,0],pa],rG=[0,[17,[0,ce,1,0],[12,Di,[17,0,0]]],wj],eG="Object literal may not have data and accessor property with the same name",tG="Object literal may not have multiple get/set accessors with the same name",nG="Unexpected token <. Remember, adjacent JSX elements must be wrapped in an enclosing parent tag",uG="Modules can only have 1 since they are either an ES module xor they are a CommonJS module.",iG="Found both `declare module.exports` and `declare export` in the same module. ",fG="`let [` is ambiguous in this position because it is either a `let` binding pattern, or a member expression.",cG="Async functions can only be declared at top level or immediately within another function.",sG="`await` is an invalid identifier in async functions",oG="`await` is not allowed in async function parameters.",vG="Computed properties must have a value.",aG="Constructor can't be an accessor.",lG="Constructor can't be an async function.",pG="Constructor can't be a generator.",dG="It is sufficient for your declare function to just have a Promise return type.",yG="async is an implementation detail and isn't necessary for your declare function statement. ",mG="`declare` modifier can only appear on class fields.",kG="Unexpected token `=`. Initializers are not allowed in a `declare`.",hG="`declare export interface` is not supported. Use `export interface` instead.",_G="`declare export type` is not supported. Use `export type` instead.",wG="Unexpected token `=`. Initializers are not allowed in a `declare opaque type`.",TG="Classes may only have one constructor",SG="Duplicate `declare module.exports` statement!",EG="Rest element must be final element of an array pattern",gG="Cannot export an enum with `export type`, try `export enum E {}` or `module.exports = E;` instead.",AG="Enum members are separated with `,`. Replace `;` with `,`.",PG="`const` enums are not supported. Flow Enums are designed to allow for inlining, however the inlining itself needs to be part of the build system (whatever you use) rather than Flow itself.",CG="Expected an object pattern, array pattern, or an identifier but found an expression instead",NG="Missing comma between export specifiers",RG="Generators can only be declared at top level or immediately within another function.",IG="Getter should have zero parameters",OG="A getter cannot have a `this` parameter.",LG="Illegal break statement",MG="Illegal continue statement",DG="Illegal return statement",jG="Illegal Unicode escape",UG="Missing comma between import specifiers",BG="It cannot be used with `import type` or `import typeof` statements",YG="The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. ",XG="Explicit inexact syntax cannot appear inside an explicit exact object type",JG="Explicit inexact syntax can only appear inside an object type",VG="Component params must be an identifier. If you'd like to destructure, you should use `name as {destructure}`",zG="Components use `renders` instead of `:` to annotate the render type of a component.",KG="A bigint literal must be an integer",ZG="JSX value should be either an expression or a quoted JSX text",WG="Invalid left-hand side in assignment",$G="Invalid left-hand side in exponentiation expression",QG="Invalid left-hand side in for-in",FG="Invalid left-hand side in for-of",HG="Imports within a `declare module` body must always be `import type` or `import typeof`!",qG="Invalid optional indexed access. Indexed access uses bracket notation. Use the format `T?.[K]`.",GG="Invalid regular expression",bG="A bigint literal cannot use exponential notation",xb="Tuple spread elements cannot be optional.",rb="Tuple variance annotations can only be used with labeled tuple elements, e.g. `[+foo: number]`",eb="`typeof` can only be used to get the type of variables.",tb="JSX attributes must only be assigned a non-empty expression",nb="Literals cannot be used as shorthand properties.",ub="Malformed unicode",ib="Object pattern can't contain methods",fb="Expected at least one type parameter.",cb="Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",sb="More than one default clause in switch statement",ob="Illegal newline after throw",vb="Illegal newline before arrow",ab="Missing catch or finally after try",lb="Const must be initialized",pb="Destructuring assignment must be initialized",db="An optional chain may not be used in a `new` expression.",yb="Template literals may not be used in an optional chain.",mb="Rest parameter must be final parameter of an argument list",kb="Private fields may not be deleted.",hb="Private fields can only be referenced from within a class.",_b="Rest property must be final property of an object pattern",wb="Setter should have exactly one parameter",Tb="A setter cannot have a `this` parameter.",Sb="Catch variable may not be eval or arguments in strict mode",Eb="Delete of an unqualified identifier in strict mode.",gb="Duplicate data property in object literal not allowed in strict mode",Ab="Function name may not be eval or arguments in strict mode",Pb="Assignment to eval or arguments is not allowed in strict mode",Cb="Postfix increment/decrement may not have eval or arguments operand in strict mode",Nb="Prefix increment/decrement may not have eval or arguments operand in strict mode",Rb="Strict mode code may not include a with statement",Ib="Number literals with leading zeros are not allowed in strict mode.",Ob="Octal literals are not allowed in strict mode.",Lb="Strict mode function may not have duplicate parameter names",Mb="Parameter name eval or arguments is not allowed in strict mode",Db='Illegal "use strict" directive in function with non-simple parameter list',jb="Use of reserved word in strict mode",Ub="Variable name may not be eval or arguments in strict mode",Bb="You may not access a private field through the `super` keyword.",Yb="Flow does not support abstract classes.",Xb="Flow does not support template literal types.",Jb="A type annotation is required for the `this` parameter.",Vb="Arrow functions cannot have a `this` parameter; arrow functions automatically bind `this` when declared.",zb="Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",Kb="The `this` parameter cannot be optional.",Zb="The `this` parameter must be the first function parameter.",Wb="A trailing comma is not permitted after the rest element",$b="Unexpected end of input",Qb="Explicit inexact syntax must come at the end of an object type",Fb="Opaque type aliases are not allowed in untyped mode",Hb="Unexpected proto modifier",qb="Unexpected reserved word",Gb="Unexpected reserved type",bb="Spreading a type is only allowed inside an object type",x00="Unexpected static modifier",r00="Unexpected `super` outside of a class method",e00="`super()` is only valid in a class constructor",t00="Type aliases are not allowed in untyped mode",n00="Type annotations are not allowed in untyped mode",u00="Type declarations are not allowed in untyped mode",i00="Type exports are not allowed in untyped mode",f00="Type imports are not allowed in untyped mode",c00="Interfaces are not allowed in untyped mode",s00="Unexpected variance sigil",o00="Found a decorator in an unsupported position.",v00="Invalid regular expression: missing /",a00="Unexpected whitespace between `#` and identifier",l00="`yield` is an invalid identifier in generators",p00="Yield expression not allowed in formal parameter",d00=[0,[11,"Duplicate export for `",[2,0,[12,96,0]]],"Duplicate export for `%s`"],y00=[0,[11,"Private fields may only be declared once. `#",[2,0,[11,"` is declared more than once.",0]]],"Private fields may only be declared once. `#%s` is declared more than once."],m00=[0,[11,"bigint enum members need to be initialized, e.g. `",[2,0,[11," = 1n,` in enum `",[2,0,[11,Rs,0]]]]],"bigint enum members need to be initialized, e.g. `%s = 1n,` in enum `%s`."],k00=[0,[11,"Boolean enum members need to be initialized. Use either `",[2,0,[11," = true,` or `",[2,0,[11," = false,` in enum `",[2,0,[11,Rs,0]]]]]]],"Boolean enum members need to be initialized. Use either `%s = true,` or `%s = false,` in enum `%s`."],h00=[0,[11,"Enum member names need to be unique, but the name `",[2,0,[11,"` has already been used before in enum `",[2,0,[11,Rs,0]]]]],"Enum member names need to be unique, but the name `%s` has already been used before in enum `%s`."],_00=[0,[11,ID,[2,0,[11,"` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",0]]],"Enum `%s` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers."],w00="The `...` must come at the end of the enum body. Remove the trailing comma.",T00="The `...` must come after all enum members. Move it to the end of the enum body.",S00=[0,[11,"Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `",[2,0,[11,Rs,0]]],"Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `%s`."],E00=[0,[11,"Enum type `",[2,0,[11,"` is not valid. ",[2,0,0]]]],"Enum type `%s` is not valid. %s"],g00=[0,[11,"Supplied enum type is not valid. ",[2,0,0]],"Supplied enum type is not valid. %s"],A00=[0,[11,"Enum member names and initializers are separated with `=`. Replace `",[2,0,[11,":` with `",[2,0,[11," =`.",0]]]]],"Enum member names and initializers are separated with `=`. Replace `%s:` with `%s =`."],P00=[0,[11,ID,[2,0,[11,"` has type `",[2,0,[11,"`, so the initializer of `",[2,0,[11,"` needs to be a ",[2,0,[11," literal.",0]]]]]]]]],"Enum `%s` has type `%s`, so the initializer of `%s` needs to be a %s literal."],C00=[0,[11,"Symbol enum members cannot be initialized. Use `",[2,0,[11,",` in enum `",[2,0,[11,Rs,0]]]]],"Symbol enum members cannot be initialized. Use `%s,` in enum `%s`."],N00=[0,[11,"The enum member initializer for `",[2,0,[11,"` needs to be a literal (either a boolean, number, or string) in enum `",[2,0,[11,Rs,0]]]]],"The enum member initializer for `%s` needs to be a literal (either a boolean, number, or string) in enum `%s`."],R00=[0,[11,"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `",[2,0,[11,"`, consider using `",[2,0,[11,"`, in enum `",[2,0,[11,Rs,0]]]]]]],"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%s`, consider using `%s`, in enum `%s`."],I00=[0,[11,"Number enum members need to be initialized, e.g. `",[2,0,[11," = 1,` in enum `",[2,0,[11,Rs,0]]]]],"Number enum members need to be initialized, e.g. `%s = 1,` in enum `%s`."],O00=[0,[11,"String enum members need to consistently either all use initializers, or use no initializers, in enum ",[2,0,[12,46,0]]],"String enum members need to consistently either all use initializers, or use no initializers, in enum %s."],L00=[0,[11,"Expected corresponding JSX closing tag for ",[2,0,0]],"Expected corresponding JSX closing tag for %s"],M00="immediately within another function.",D00="In strict mode code, functions can only be declared at top level or ",j00="inside a block, or as the body of an if statement.",U00="In non-strict mode code, functions can only be declared at top level, ",B00="static ",Y00=hx,X00="methods",J00="fields",V00=HM,z00=[0,[11,"Classes may not have ",[2,0,[2,0,[11," named `",[2,0,[11,Rs,0]]]]]],"Classes may not have %s%s named `%s`."],K00=eB,Z00=hx,W00=[0,[11,"String params require local bindings using `as` renaming. You can use `'",[2,0,[11,"' as ",[2,0,[2,0,[11,": ` ",0]]]]]],"String params require local bindings using `as` renaming. You can use `'%s' as %s%s: ` "],$00="Remove the period.",Q00="Indexed access uses bracket notation.",F00=[0,[11,"Invalid indexed access. ",[2,0,[11," Use the format `T[K]`.",0]]],"Invalid indexed access. %s Use the format `T[K]`."],H00=[0,[11,"Invalid flags supplied to RegExp constructor '",[2,0,[12,39,0]]],"Invalid flags supplied to RegExp constructor '%s'"],q00=[0,[11,"JSX element ",[2,0,[11," has no corresponding closing tag.",0]]],"JSX element %s has no corresponding closing tag."],G00=[0,[11,jD,[2,0,[11,"`. Parentheses are required to combine `??` with `&&` or `||` expressions.",0]]],"Unexpected token `%s`. Parentheses are required to combine `??` with `&&` or `||` expressions."],b00=[0,[2,0,[11," '",[2,0,[11,"' has already been declared",0]]]],"%s '%s' has already been declared"],xx0=hx,rx0=H3,ex0=" You can try using JavaScript private fields by prepending `#` to the field name.",tx0=El,nx0=" Fields and methods are public by default. You can simply omit the `public` keyword.",ux0=z3,ix0=[0,[11,"Flow does not support using `",[2,0,[11,"` in classes.",[2,0,0]]]],"Flow does not support using `%s` in classes.%s"],fx0=[0,[11,"Private fields must be declared before they can be referenced. `#",[2,0,[11,"` has not been declared.",0]]],"Private fields must be declared before they can be referenced. `#%s` has not been declared."],cx0=[0,[11,TU,[2,0,0]],"Unexpected %s"],sx0=[0,[11,jD,[2,0,[11,"`. Did you mean `",[2,0,[11,"`?",0]]]]],"Unexpected token `%s`. Did you mean `%s`?"],ox0=[0,[11,TU,[2,0,[11,", expected ",[2,0,0]]]],"Unexpected %s, expected %s"],vx0=[0,[11,"Undefined label '",[2,0,[12,39,0]]],"Undefined label '%s'"],ax0="Parse_error.Error",lx0=[0,[0,36,37],[0,48,58],[0,65,91],[0,95,96],[0,97,Lt],[0,G4,Xk],[0,DR,ih],[0,mN,id],[0,Lp,fg],[0,_a,DT],[0,xN,b8],[0,qr,706],[0,rj,722],[0,736,741],[0,748,749],[0,750,751],[0,768,885],[0,886,888],[0,890,894],[0,895,896],[0,902,907],[0,908,909],[0,910,930],[0,$B,1014],[0,1015,1154],[0,1155,1160],[0,1162,1328],[0,1329,1367],[0,1369,1370],[0,1376,1417],[0,1425,1470],[0,1471,1472],[0,1473,1475],[0,1476,1478],[0,1479,1480],[0,1488,1515],[0,1519,1523],[0,1552,1563],[0,1568,1642],[0,1646,1748],[0,1749,1757],[0,1759,1769],[0,1770,1789],[0,1791,1792],[0,1808,1867],[0,1869,1970],[0,1984,2038],[0,2042,2043],[0,2045,2046],[0,_N,2094],[0,2112,2140],[0,2144,2155],[0,2208,2229],[0,2230,2238],[0,2259,2274],[0,2275,2404],[0,2406,2416],[0,2417,2436],[0,2437,2445],[0,2447,2449],[0,2451,2473],[0,2474,2481],[0,2482,2483],[0,2486,2490],[0,2492,2501],[0,2503,2505],[0,2507,2511],[0,2519,2520],[0,2524,2526],[0,2527,2532],[0,2534,2546],[0,2556,2557],[0,2558,2559],[0,2561,2564],[0,2565,2571],[0,2575,2577],[0,2579,2601],[0,2602,2609],[0,2610,2612],[0,2613,2615],[0,2616,2618],[0,2620,2621],[0,2622,2627],[0,2631,2633],[0,2635,2638],[0,2641,2642],[0,2649,2653],[0,2654,2655],[0,2662,2678],[0,2689,2692],[0,2693,2702],[0,2703,2706],[0,2707,2729],[0,2730,2737],[0,2738,2740],[0,2741,2746],[0,2748,2758],[0,2759,2762],[0,2763,2766],[0,2768,2769],[0,2784,2788],[0,2790,2800],[0,2809,2816],[0,2817,2820],[0,2821,2829],[0,2831,2833],[0,2835,2857],[0,2858,2865],[0,2866,2868],[0,2869,2874],[0,2876,2885],[0,2887,2889],[0,2891,2894],[0,2902,2904],[0,2908,2910],[0,2911,2916],[0,2918,2928],[0,2929,2930],[0,2946,2948],[0,2949,2955],[0,2958,2961],[0,2962,2966],[0,2969,2971],[0,2972,2973],[0,2974,2976],[0,2979,2981],[0,2984,2987],[0,2990,3002],[0,3006,3011],[0,3014,3017],[0,3018,3022],[0,3024,3025],[0,3031,3032],[0,3046,3056],[0,3072,3085],[0,3086,3089],[0,3090,3113],[0,3114,3130],[0,3133,3141],[0,3142,3145],[0,3146,3150],[0,3157,3159],[0,3160,3163],[0,3168,3172],[0,3174,3184],[0,3200,3204],[0,3205,3213],[0,3214,3217],[0,3218,3241],[0,3242,3252],[0,3253,3258],[0,3260,3269],[0,3270,3273],[0,3274,3278],[0,3285,3287],[0,3294,3295],[0,3296,3300],[0,3302,3312],[0,3313,3315],[0,3328,3332],[0,3333,3341],[0,3342,3345],[0,3346,3397],[0,3398,3401],[0,3402,3407],[0,3412,3416],[0,3423,3428],[0,3430,3440],[0,3450,3456],[0,3458,3460],[0,3461,3479],[0,3482,3506],[0,3507,3516],[0,3517,3518],[0,3520,3527],[0,3530,3531],[0,3535,3541],[0,3542,3543],[0,3544,3552],[0,3558,3568],[0,3570,3572],[0,3585,3643],[0,3648,3663],[0,3664,3674],[0,3713,3715],[0,3716,3717],[0,3718,3723],[0,3724,3748],[0,3749,3750],[0,3751,3774],[0,3776,3781],[0,3782,3783],[0,3784,3790],[0,3792,3802],[0,3804,3808],[0,3840,3841],[0,3864,3866],[0,3872,3882],[0,3893,3894],[0,3895,3896],[0,3897,3898],[0,3902,3912],[0,3913,3949],[0,3953,3973],[0,3974,3992],[0,3993,4029],[0,4038,4039],[0,vU,4170],[0,4176,4254],[0,4256,4294],[0,4295,4296],[0,4301,4302],[0,4304,4347],[0,4348,4681],[0,4682,4686],[0,4688,4695],[0,4696,4697],[0,4698,4702],[0,4704,4745],[0,4746,4750],[0,4752,4785],[0,4786,4790],[0,4792,4799],[0,4800,4801],[0,4802,4806],[0,4808,4823],[0,4824,4881],[0,4882,4886],[0,4888,4955],[0,4957,4960],[0,4969,4978],[0,4992,5008],[0,5024,5110],[0,5112,5118],[0,5121,5741],[0,5743,rS],[0,5761,5787],[0,5792,5867],[0,5870,5881],[0,5888,5901],[0,5902,5909],[0,5920,5941],[0,5952,5972],[0,5984,5997],[0,5998,6001],[0,6002,6004],[0,6016,6100],[0,6103,6104],[0,6108,6110],[0,6112,6122],[0,6155,6158],[0,6160,6170],[0,6176,6265],[0,6272,6315],[0,6320,6390],[0,6400,6431],[0,6432,6444],[0,6448,6460],[0,6470,6510],[0,6512,6517],[0,6528,6572],[0,6576,6602],[0,6608,6619],[0,6656,6684],[0,6688,6751],[0,6752,6781],[0,6783,6794],[0,6800,6810],[0,6823,6824],[0,6832,6846],[0,6912,6988],[0,6992,7002],[0,7019,7028],[0,7040,7156],[0,7168,7224],[0,7232,7242],[0,7245,7294],[0,7296,7305],[0,7312,7355],[0,7357,7360],[0,7376,7379],[0,7380,7419],[0,7424,7674],[0,7675,7958],[0,7960,7966],[0,7968,8006],[0,8008,8014],[0,8016,8024],[0,8025,8026],[0,8027,8028],[0,8029,8030],[0,8031,8062],[0,8064,8117],[0,8118,8125],[0,8126,8127],[0,8130,8133],[0,8134,8141],[0,8144,8148],[0,8150,8156],[0,8160,8173],[0,8178,8181],[0,8182,8189],[0,QU,xU],[0,8255,8257],[0,8276,8277],[0,$8,8306],[0,ad,8320],[0,8336,8349],[0,8400,8413],[0,8417,8418],[0,8421,8433],[0,Rd,8451],[0,J5,8456],[0,8458,B8],[0,o8,8470],[0,QB,8478],[0,Ud,wp],[0,T8,S8],[0,Hp,x8],[0,8490,8506],[0,8508,8512],[0,8517,8522],[0,h8,8527],[0,8544,8585],[0,11264,11311],[0,11312,11359],[0,11360,11493],[0,11499,11508],[0,11520,Q4],[0,W8,11560],[0,$4,11566],[0,11568,11624],[0,Y5,11632],[0,n5,11671],[0,11680,Np],[0,11688,P8],[0,11696,ep],[0,11704,M8],[0,11712,rd],[0,11720,Q5],[0,11728,Wp],[0,11736,11743],[0,11744,11776],[0,12293,12296],[0,12321,W4],[0,12337,12342],[0,12344,12349],[0,12353,12439],[0,12441,H5],[0,12449,Sd],[0,12540,12544],[0,12549,j5],[0,12593,12687],[0,12704,12731],[0,12784,12800],[0,13312,19894],[0,19968,40944],[0,40960,42125],[0,42192,42238],[0,42240,42509],[0,42512,42540],[0,42560,42608],[0,42612,td],[0,42623,42738],[0,42775,42784],[0,42786,42889],[0,42891,42944],[0,42946,42951],[0,Q8,43048],[0,43072,43124],[0,43136,43206],[0,43216,43226],[0,43232,43256],[0,W5,fd],[0,43261,43310],[0,43312,43348],[0,43360,43389],[0,43392,43457],[0,Up,43482],[0,43488,wd],[0,43520,43575],[0,43584,43598],[0,43600,43610],[0,43616,43639],[0,D8,43715],[0,43739,43742],[0,43744,43760],[0,43762,43767],[0,43777,43783],[0,43785,43791],[0,43793,43799],[0,43808,v5],[0,43816,y8],[0,43824,d5],[0,43868,_8],[0,43888,44011],[0,44012,44014],[0,44016,44026],[0,44032,55204],[0,55216,55239],[0,55243,55292],[0,63744,64110],[0,64112,64218],[0,64256,64263],[0,64275,64280],[0,Vp,r5],[0,64298,Td],[0,64312,sd],[0,i5,dp],[0,64320,jp],[0,64323,S5],[0,64326,64434],[0,64467,64830],[0,64848,64912],[0,64914,64968],[0,65008,65020],[0,65024,65040],[0,65056,65072],[0,65075,65077],[0,65101,65104],[0,65136,Dp],[0,65142,65277],[0,65296,65306],[0,65313,65339],[0,65343,K5],[0,65345,65371],[0,65382,65471],[0,65474,65480],[0,65482,65488],[0,65490,65496],[0,65498,65501],[0,fl,g8],[0,65549,R8],[0,65576,Sp],[0,65596,A5],[0,65599,65614],[0,65616,65630],[0,65664,65787],[0,65856,65909],[0,66045,66046],[0,66176,66205],[0,66208,66257],[0,66272,66273],[0,66304,66336],[0,66349,66379],[0,66384,66427],[0,66432,66462],[0,66464,66500],[0,66504,w5],[0,66513,66518],[0,66560,66718],[0,66720,66730],[0,66736,66772],[0,66776,66812],[0,66816,66856],[0,66864,66916],[0,67072,67383],[0,67392,67414],[0,67424,67432],[0,67584,67590],[0,_d,E5],[0,67594,b5],[0,67639,67641],[0,cd,67645],[0,67647,67670],[0,67680,67703],[0,67712,67743],[0,67808,Id],[0,67828,67830],[0,67840,67862],[0,67872,67898],[0,67968,68024],[0,68030,68032],[0,Vd,68100],[0,68101,68103],[0,68108,kp],[0,68117,Md],[0,68121,68150],[0,68152,68155],[0,68159,68160],[0,68192,68221],[0,68224,68253],[0,68288,b4],[0,68297,68327],[0,68352,68406],[0,68416,68438],[0,68448,68467],[0,68480,68498],[0,68608,68681],[0,68736,68787],[0,68800,68851],[0,68864,68904],[0,68912,68922],[0,69376,69405],[0,w8,69416],[0,69424,69457],[0,69600,69623],[0,69632,69703],[0,69734,Ip],[0,69759,69819],[0,69840,69865],[0,69872,69882],[0,69888,69941],[0,69942,69952],[0,q8,E8],[0,69968,70004],[0,up,70007],[0,70016,70085],[0,70089,70093],[0,70096,rp],[0,Dd,70109],[0,70144,pd],[0,70163,70200],[0,70206,70207],[0,70272,L8],[0,h5,hp],[0,70282,o5],[0,70287,sp],[0,70303,70313],[0,70320,70379],[0,70384,70394],[0,70400,J8],[0,70405,70413],[0,70415,70417],[0,70419,V8],[0,70442,Ap],[0,70450,Ld],[0,70453,70458],[0,70459,70469],[0,70471,70473],[0,70475,70478],[0,jd,70481],[0,70487,70488],[0,70493,70500],[0,70502,70509],[0,70512,70517],[0,70656,70731],[0,70736,70746],[0,xd,70752],[0,70784,L5],[0,N5,70856],[0,70864,70874],[0,71040,71094],[0,71096,71105],[0,71128,71134],[0,71168,71233],[0,t8,71237],[0,71248,71258],[0,71296,71353],[0,71360,71370],[0,71424,71451],[0,71453,71468],[0,71472,71482],[0,71680,71739],[0,71840,71914],[0,71935,71936],[0,72096,72104],[0,72106,72152],[0,72154,U8],[0,V4,72165],[0,dd,72255],[0,72263,72264],[0,k5,72346],[0,m8,72350],[0,72384,72441],[0,72704,l5],[0,72714,72759],[0,72760,72769],[0,72784,72794],[0,72818,72848],[0,72850,72872],[0,72873,72887],[0,72960,np],[0,72968,O5],[0,72971,73015],[0,73018,73019],[0,73020,73022],[0,73023,73032],[0,73040,73050],[0,73056,hd],[0,73063,z8],[0,73066,73103],[0,73104,73106],[0,73107,73113],[0,73120,73130],[0,73440,73463],[0,73728,74650],[0,74752,74863],[0,74880,75076],[0,77824,78895],[0,82944,83527],[0,92160,92729],[0,92736,92767],[0,92768,92778],[0,92880,92910],[0,92912,92917],[0,92928,92983],[0,92992,92996],[0,93008,93018],[0,93027,93048],[0,93053,93072],[0,93760,93824],[0,93952,94027],[0,F8,94088],[0,94095,94112],[0,94176,v8],[0,Zp,94180],[0,94208,100344],[0,100352,101107],[0,110592,110879],[0,110928,110931],[0,110948,110952],[0,110960,111356],[0,113664,113771],[0,113776,113789],[0,113792,113801],[0,113808,113818],[0,113821,113823],[0,119141,119146],[0,119149,119155],[0,119163,119171],[0,119173,119180],[0,119210,119214],[0,119362,119365],[0,119808,Z4],[0,119894,K8],[0,119966,119968],[0,Jd,119971],[0,119973,119975],[0,119977,i8],[0,119982,zp],[0,z5,I5],[0,119997,m5],[0,120005,Xp],[0,120071,120075],[0,120077,f8],[0,120086,T5],[0,120094,d8],[0,120123,Gp],[0,120128,ld],[0,$p,120135],[0,120138,Fp],[0,120146,120486],[0,120488,Ed],[0,120514,O8],[0,120540,a5],[0,120572,q4],[0,120598,fp],[0,120630,md],[0,120656,F5],[0,120688,Bd],[0,120714,c5],[0,120746,Nd],[0,120772,120780],[0,120782,120832],[0,121344,121399],[0,121403,121453],[0,121461,121462],[0,121476,121477],[0,121499,121504],[0,121505,121520],[0,122880,122887],[0,122888,122905],[0,122907,122914],[0,122915,122917],[0,122918,122923],[0,123136,123181],[0,123184,123198],[0,123200,123210],[0,Op,123215],[0,123584,123642],[0,124928,125125],[0,125136,125143],[0,125184,125260],[0,125264,125274],[0,126464,U5],[0,126469,Pd],[0,126497,q5],[0,qp,126501],[0,cp,P5],[0,126505,vp],[0,126516,r8],[0,z4,u5],[0,e5,126524],[0,Z5,126531],[0,$5,Mp],[0,R5,g5],[0,gd,V5],[0,126541,j8],[0,126545,Pp],[0,gr,126549],[0,C5,Ad],[0,gp,k8],[0,c8,Yd],[0,H4,od],[0,ip,Cd],[0,126561,e8],[0,tp,126565],[0,126567,nd],[0,126572,xp],[0,126580,A8],[0,126585,Bp],[0,yp,Xd],[0,126592,f5],[0,126603,126620],[0,126625,Z8],[0,126629,x5],[0,126635,126652],[0,131072,173783],[0,173824,177973],[0,177984,178206],[0,178208,183970],[0,183984,191457],[0,194560,195102],[0,917760,918e3]],px0=[0,1,0],dx0=[0,0,[0,1,0],[0,1,0]],yx0=hU,mx0="end of input",kx0=Tl,hx0="template literal part",_x0=Tl,wx0=sU,Tx0=hU,Sx0=Tl,Ex0=wa,gx0=Tl,Ax0=wv,Px0=Tl,Cx0=Ua,Nx0="an",Rx0=Rt,Ix0=Dt,Ox0=[0,[11,"token `",[2,0,[12,96,0]]],"token `%s`"],Lx0="{",Mx0=G8,Dx0="{|",jx0="|}",Ux0=ZM,Bx0=WS,Yx0="[",Xx0="]",Jx0=NT,Vx0=qM,zx0=ic,Kx0="=>",Zx0="...",Wx0=Cj,$x0=HM,Qx0=ya,Fx0=s8,Hx0=Po,qx0=b3,Gx0=De,bx0=Ye,xr0=lv,rr0=Be,er0=yd,tr0=dl,nr0=Qp,ur0=Tp,ir0=ol,fr0=ka,cr0=_v,sr0=Is,or0=Cs,vr0=Me,ar0=bp,lr0=t5,pr0=Ie,dr0=pv,yr0=ed,mr0=Yp,kr0=N8,hr0=$3,_r0=Bc,wr0=je,Tr0=Kp,Sr0=av,Er0=sl,gr0=Ps,Ar0=Os,Pr0=pl,Cr0=p8,Nr0=j2,Rr0=Oa,Ir0=Tv,Or0=b2,Lr0=u8,Mr0=El,Dr0=H3,jr0=z3,Ur0=Y2,Br0=Oe,Yr0=tl,Xr0=fi,Jr0=Jh,Vr0=qh,zr0=Co,Kr0=Pv,Zr0="%checks",Wr0=gB,$r0=CD,Qr0=jU,Fr0=iY,Hr0=Bj,qr0=hD,Gr0=VM,br0=dY,x10=pj,r10=TD,e10=TY,t10=PD,n10=Gj,u10=lY,i10=tB,f10=J_,c10="?.",s10=_m,o10=eB,v10=Ov,a10=Sj,l10=mY,p10=EY,d10=I8,y10=J4,m10=yD,k10=HD,h10=pD,_10=QD,w10=LD,T10=RU,S10=$T,E10=xl,g10=sD,A10=AD,P10=$M,C10=js,N10=Mt,R10=G2,I10=PB,O10=zD,L10=GD,M10=KD,D10=aB,j10=zB,U10=Mj,B10=hx,Y10=y5,X10=_p,J10=se,V10=wa,z10=wv,K10=Ua,Z10=Os,W10=wx,$10=B5,Q10=X8,F10=vd,H10=Y8,q10=ga,G10=Vj,b10=kl,x20=ha,r20=UU,e20=oj,t20=V3,n20=V3,u20=yY,i20=V3,f20=V3,c20=G8,s20=G8,o20=yY,v20=G2,a20=G2,l20=rl,p20=D5,d20="T_LCURLY",y20="T_RCURLY",m20="T_LCURLYBAR",k20="T_RCURLYBAR",h20="T_LPAREN",_20="T_RPAREN",w20="T_LBRACKET",T20="T_RBRACKET",S20="T_SEMICOLON",E20="T_COMMA",g20="T_PERIOD",A20="T_ARROW",P20="T_ELLIPSIS",C20="T_AT",N20="T_POUND",R20="T_FUNCTION",I20="T_IF",O20="T_IN",L20="T_INSTANCEOF",M20="T_RETURN",D20="T_SWITCH",j20="T_THIS",U20="T_THROW",B20="T_TRY",Y20="T_VAR",X20="T_WHILE",J20="T_WITH",V20="T_CONST",z20="T_LET",K20="T_NULL",Z20="T_FALSE",W20="T_TRUE",$20="T_BREAK",Q20="T_CASE",F20="T_CATCH",H20="T_CONTINUE",q20="T_DEFAULT",G20="T_DO",b20="T_FINALLY",xe0="T_FOR",re0="T_CLASS",ee0="T_EXTENDS",te0="T_STATIC",ne0="T_ELSE",ue0="T_NEW",ie0="T_DELETE",fe0="T_TYPEOF",ce0="T_VOID",se0="T_ENUM",oe0="T_EXPORT",ve0="T_IMPORT",ae0="T_SUPER",le0="T_IMPLEMENTS",pe0="T_INTERFACE",de0="T_PACKAGE",ye0="T_PRIVATE",me0="T_PROTECTED",ke0="T_PUBLIC",he0="T_YIELD",_e0="T_DEBUGGER",we0="T_DECLARE",Te0="T_TYPE",Se0="T_OPAQUE",Ee0="T_OF",ge0="T_ASYNC",Ae0="T_AWAIT",Pe0="T_CHECKS",Ce0="T_RSHIFT3_ASSIGN",Ne0="T_RSHIFT_ASSIGN",Re0="T_LSHIFT_ASSIGN",Ie0="T_BIT_XOR_ASSIGN",Oe0="T_BIT_OR_ASSIGN",Le0="T_BIT_AND_ASSIGN",Me0="T_MOD_ASSIGN",De0="T_DIV_ASSIGN",je0="T_MULT_ASSIGN",Ue0="T_EXP_ASSIGN",Be0="T_MINUS_ASSIGN",Ye0="T_PLUS_ASSIGN",Xe0="T_NULLISH_ASSIGN",Je0="T_AND_ASSIGN",Ve0="T_OR_ASSIGN",ze0="T_ASSIGN",Ke0="T_PLING_PERIOD",Ze0="T_PLING_PLING",We0="T_PLING",$e0="T_COLON",Qe0="T_OR",Fe0="T_AND",He0="T_BIT_OR",qe0="T_BIT_XOR",Ge0="T_BIT_AND",be0="T_EQUAL",xt0="T_NOT_EQUAL",rt0="T_STRICT_EQUAL",et0="T_STRICT_NOT_EQUAL",tt0="T_LESS_THAN_EQUAL",nt0="T_GREATER_THAN_EQUAL",ut0="T_LESS_THAN",it0="T_GREATER_THAN",ft0="T_LSHIFT",ct0="T_RSHIFT",st0="T_RSHIFT3",ot0="T_PLUS",vt0="T_MINUS",at0="T_DIV",lt0="T_MULT",pt0="T_EXP",dt0="T_MOD",yt0="T_NOT",mt0="T_BIT_NOT",kt0="T_INCR",ht0="T_DECR",_t0="T_EOF",wt0="T_ANY_TYPE",Tt0="T_MIXED_TYPE",St0="T_EMPTY_TYPE",Et0="T_NUMBER_TYPE",gt0="T_BIGINT_TYPE",At0="T_STRING_TYPE",Pt0="T_VOID_TYPE",Ct0="T_SYMBOL_TYPE",Nt0="T_UNKNOWN_TYPE",Rt0="T_NEVER_TYPE",It0="T_UNDEFINED_TYPE",Ot0="T_KEYOF",Lt0="T_READONLY",Mt0="T_INFER",Dt0="T_IS",jt0="T_ASSERTS",Ut0=xj,Bt0=xj,Yt0="T_NUMBER",Xt0="T_BIGINT",Jt0="T_STRING",Vt0="T_TEMPLATE_PART",zt0="T_IDENTIFIER",Kt0="T_REGEXP",Zt0="T_INTERPRETER",Wt0="T_ERROR",$t0="T_JSX_IDENTIFIER",Qt0=aY,Ft0=aY,Ht0="T_BOOLEAN_TYPE",qt0="T_NUMBER_SINGLETON_TYPE",Gt0="T_BIGINT_SINGLETON_TYPE",bt0=[0,iU,BS,9],xn0=[0,iU,bT,9],rn0=_j,en0="*/",tn0=_j,nn0="unreachable line_comment",un0="unreachable string_quote",in0="\\",fn0="unreachable template_part",cn0=`\r -`,sn0=_T,on0="unreachable regexp_class",vn0=jB,an0="unreachable regexp_body",ln0=hx,pn0=hx,dn0=hx,yn0=hx,mn0=AB,kn0="{'>'}",hn0=xl,_n0="{'}'}",wn0=G8,Tn0=So,Sn0=NT,En0=J4,gn0=AB,An0=So,Pn0=NT,Cn0=J4,Nn0="unreachable type_token wholenumber",Rn0="unreachable type_token wholebigint",In0="unreachable type_token floatbigint",On0="unreachable type_token scinumber",Ln0="unreachable type_token scibigint",Mn0="unreachable type_token hexnumber",Dn0="unreachable type_token hexbigint",jn0="unreachable type_token legacyoctnumber",Un0="unreachable type_token octnumber",Bn0="unreachable type_token octbigint",Yn0="unreachable type_token binnumber",Xn0="unreachable type_token bigbigint",Jn0="unreachable type_token",Vn0=MB,zn0=[11,1],Kn0=[11,0],Zn0="unreachable template_tail",Wn0=hx,$n0=hx,Qn0="unreachable jsx_child",Fn0="unreachable jsx_tag",Hn0=[0,SD],qn0=[0,913],Gn0=[0,_a],bn0=[0,Ah],x70=[0,FD],r70=[0,cY],e70=[0,8747],t70=[0,SB],n70=[0,916],u70=[0,8225],i70=[0,935],f70=[0,_U],c70=[0,914],s70=[0,XU],o70=[0,$D],v70=[0,FB],a70=[0,915],l70=[0,nY],p70=[0,919],d70=[0,917],y70=[0,OR],m70=[0,yB],k70=[0,DD],h70=[0,924],_70=[0,923],w70=[0,922],T70=[0,kY],S70=[0,921],E70=[0,tj],g70=[0,bT],A70=[0,GM],P70=[0,xN],C70=[0,927],N70=[0,937],R70=[0,oY],I70=[0,lE],O70=[0,bD],L70=[0,338],M70=[0,352],D70=[0,929],j70=[0,936],U70=[0,8243],B70=[0,928],Y70=[0,934],X70=[0,sB],J70=[0,WM],V70=[0,933],z70=[0,VU],K70=[0,lB],Z70=[0,HB],W70=[0,920],$70=[0,932],Q70=[0,tD],F70=[0,bj],H70=[0,Wj],q70=[0,LU],G70=[0,918],b70=[0,376],xu0=[0,nU],ru0=[0,926],eu0=[0,DU],tu0=[0,$B],nu0=[0,925],uu0=[0,39],iu0=[0,8736],fu0=[0,8743],cu0=[0,38],su0=[0,945],ou0=[0,8501],vu0=[0,Pa],au0=[0,8226],lu0=[0,zj],pu0=[0,946],du0=[0,8222],yu0=[0,MU],mu0=[0,vY],ku0=[0,8776],hu0=[0,CB],_u0=[0,8773],wu0=[0,9827],Tu0=[0,rj],Su0=[0,967],Eu0=[0,qj],gu0=[0,id],Au0=[0,pU],Pu0=[0,AT],Cu0=[0,8595],Nu0=[0,8224],Ru0=[0,8659],Iu0=[0,Nj],Ou0=[0,8746],Lu0=[0,8629],Mu0=[0,p5],Du0=[0,8745],ju0=[0,8195],Uu0=[0,8709],Bu0=[0,_Y],Yu0=[0,SY],Xu0=[0,Oj],Ju0=[0,b8],Vu0=[0,9830],zu0=[0,8707],Ku0=[0,8364],Zu0=[0,JB],Wu0=[0,Ta],$u0=[0,951],Qu0=[0,8801],Fu0=[0,949],Hu0=[0,8194],qu0=[0,8805],Gu0=[0,947],bu0=[0,8260],xi0=[0,ND],ri0=[0,AU],ei0=[0,BS],ti0=[0,8704],ni0=[0,ST],ui0=[0,ZU],ii0=[0,8230],fi0=[0,9829],ci0=[0,8596],si0=[0,8660],oi0=[0,62],vi0=[0,402],ai0=[0,948],li0=[0,Xj],pi0=[0,H8],di0=[0,8712],yi0=[0,lU],mi0=[0,953],ki0=[0,8734],hi0=[0,8465],_i0=[0,xY],wi0=[0,8220],Ti0=[0,8968],Si0=[0,8592],Ei0=[0,Xk],gi0=[0,10216],Ai0=[0,955],Pi0=[0,8656],Ci0=[0,954],Ni0=[0,60],Ri0=[0,8216],Ii0=[0,8249],Oi0=[0,xU],Li0=[0,9674],Mi0=[0,8727],Di0=[0,8970],ji0=[0,eU],Ui0=[0,8711],Bi0=[0,956],Yi0=[0,8722],Xi0=[0,mN],Ji0=[0,DR],Vi0=[0,8212],zi0=[0,lD],Ki0=[0,8804],Zi0=[0,957],Wi0=[0,KM],$i0=[0,8836],Qi0=[0,8713],Fi0=[0,Zj],Hi0=[0,8715],qi0=[0,8800],Gi0=[0,8853],bi0=[0,959],xf0=[0,969],rf0=[0,8254],ef0=[0,EB],tf0=[0,339],nf0=[0,DC],uf0=[0,qU],if0=[0,ih],ff0=[0,el],cf0=[0,8855],sf0=[0,ES],of0=[0,qr],vf0=[0,Lp],af0=[0,G4],lf0=[0,KB],pf0=[0,RD],df0=[0,982],yf0=[0,960],mf0=[0,966],kf0=[0,8869],hf0=[0,8240],_f0=[0,8706],wf0=[0,8744],Tf0=[0,8211],Sf0=[0,10217],Ef0=[0,8730],gf0=[0,8658],Af0=[0,34],Pf0=[0,968],Cf0=[0,8733],Nf0=[0,8719],Rf0=[0,961],If0=[0,8971],Of0=[0,pY],Lf0=[0,8476],Mf0=[0,8221],Df0=[0,8969],jf0=[0,8594],Uf0=[0,fg],Bf0=[0,JU],Yf0=[0,cB],Xf0=[0,8901],Jf0=[0,353],Vf0=[0,8218],zf0=[0,8217],Kf0=[0,8250],Zf0=[0,8835],Wf0=[0,8721],$f0=[0,8838],Qf0=[0,8834],Ff0=[0,9824],Hf0=[0,8764],qf0=[0,962],Gf0=[0,963],bf0=[0,8207],xc0=[0,952],rc0=[0,8756],ec0=[0,964],tc0=[0,l8],nc0=[0,8839],uc0=[0,QM],ic0=[0,dB],fc0=[0,Ya],cc0=[0,8657],sc0=[0,8482],oc0=[0,DT],vc0=[0,732],ac0=[0,La],lc0=[0,8201],pc0=[0,977],dc0=[0,QB],yc0=[0,Av],mc0=[0,965],kc0=[0,978],hc0=[0,YT],_c0=[0,dk],wc0=[0,Bg],Tc0=[0,QU],Sc0=[0,8205],Ec0=[0,950],gc0=[0,Q3],Ac0=[0,yN],Pc0=[0,vg],Cc0=[0,958],Nc0=[0,8593],Rc0=[0,aj],Ic0=[0,8242],Oc0=[0,yE],Lc0="unreachable regexp",Mc0="unreachable token wholenumber",Dc0="unreachable token wholebigint",jc0="unreachable token floatbigint",Uc0="unreachable token scinumber",Bc0="unreachable token scibigint",Yc0="unreachable token hexnumber",Xc0="unreachable token hexbigint",Jc0="unreachable token legacyoctnumber",Vc0="unreachable token legacynonoctnumber",zc0="unreachable token octnumber",Kc0="unreachable token octbigint",Zc0="unreachable token bignumber",Wc0="unreachable token bigint",$c0="unreachable token",Qc0=MB,Fc0=[7,"#!"],Hc0="expected ?",qc0="unreachable string_escape",Gc0=re,bc0=Z3,xs0=Z3,rs0=re,es0=xg,ts0=nB,ns0="n",us0="r",is0="t",fs0=WD,cs0=Z3,ss0=So,os0=So,vs0="unreachable id_char",as0=So,ls0=So,ps0=Z3,ds0=UD,ys0=Yj,ms0=iS,ks0=[24,"token ILLEGAL"],hs0=[0,[11,"the identifier `",[2,0,[12,96,0]]],"the identifier `%s`"],_s0=[0,1],ws0=[0,1],Ts0=hj,Ss0=hj,Es0=[0,[11,"an identifier. When exporting a ",[2,0,[11," as a named export, you must specify a ",[2,0,[11," name. Did you mean `export default ",[2,0,[11," ...`?",0]]]]]]],"an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `export default %s ...`?"],gs0=mp,As0="Peeking current location when not available",Ps0=[0,"src/parser/parser_env.ml",351,9],Cs0="Internal Error: Tried to add_declared_private with outside of class scope.",Ns0="Internal Error: `exit_class` called before a matching `enter_class`",Rs0=hx,Is0=[0,0,0],Os0=[0,0,0],Ls0="Parser_env.Try.Rollback",Ms0=hx,Ds0=hx,js0=[0,Y2,si,_f,dj,Lj,Vf,B2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Ii,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Be,Rf,Oi,jc,Sf,Xf,xu,Ou,Ye,ff,E7,qi,Fi,Oc,M7,qu,Sc,De,k7,D7,xf,Tu,Uu,du,Ec,Ue,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Ic,wc,z7,Lu,Yc,yn,Of,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ur,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,b2,O7,$f,yu,hf,p7,Ku,ou,Ei,j2,P7,s7,g7,Rt,Iu,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,q1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,se,Mi,Rc,If,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Ie,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,yU,di,vB,ij,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,I7,Me,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],Us0=[0,Y2,si,_f,Vf,B2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Ii,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Be,Rf,Oi,jc,Sf,Xf,xu,Ou,Ye,ff,E7,qi,Fi,Oc,M7,qu,Sc,De,k7,D7,xf,Tu,Uu,du,Ec,Ue,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Ic,wc,z7,Lu,Yc,yn,Of,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ur,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,b2,O7,$f,yu,hf,p7,Ku,ou,Ei,j2,P7,s7,g7,Rt,Iu,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,q1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,se,Mi,Rc,If,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Ie,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,I7,Me,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],Bs0=[0,Oc,Vn,ei,Iu,Kn,I7,Uc,qf,li,r7,$u,Jc,sc,Ye,nu,Qf,df,pf,lc,a7,O7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Rt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Ou,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,Of,Cf,$c,d7,_i,su,zf,uu,F7,oi,Ue,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,B2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,se,G7,wi,Y2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Ic,ec,qc,ur,j2,De,C7,Ii,ff,H7,Be,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,If,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,q1,Lu,nc,xi,Qi,zn,eu,Fi,Ie,$n,Gu,fu,af,ac,Oi,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Me,Mf,b2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],Ys0=[0,Oc,Vn,ei,Iu,Kn,I7,Uc,qf,li,r7,$u,Jc,sc,Ye,nu,Qf,df,pf,lc,a7,O7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Rt,Vf,Lj,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Ou,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,Of,Cf,$c,d7,vB,_i,su,zf,uu,F7,oi,Ue,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,B2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,se,G7,wi,Y2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Ic,ec,qc,ur,j2,De,C7,Ii,ff,H7,Be,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,ij,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,yU,Df,Hc,Rc,N7,zc,dj,If,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,q1,Lu,nc,xi,Qi,zn,eu,Fi,Ie,$n,Gu,fu,af,ac,Oi,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Me,Mf,b2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],Xs0=ya,Js0=s8,Vs0=Po,zs0=b3,Ks0=De,Zs0=Ye,Ws0=lv,$s0=Be,Qs0=yd,Fs0=dl,Hs0=Qp,qs0=Tp,Gs0=ol,bs0=ka,xo0=_v,ro0=Is,eo0=Cs,to0=Me,no0=bp,uo0=t5,io0=Ie,fo0=pv,co0=ed,so0=Yp,oo0=N8,vo0=$3,ao0=Bc,lo0=je,po0=Kp,do0=av,yo0=sl,mo0=Ps,ko0=Os,ho0=pl,_o0=p8,wo0=j2,To0=Oa,So0=Tv,Eo0=b2,go0=u8,Ao0=El,Po0=H3,Co0=z3,No0=Y2,Ro0=Oe,Io0=tl,Oo0=fi,Lo0=Jh,Mo0=qh,Do0=Co,jo0=Pv,Uo0=y5,Bo0=_p,Yo0=se,Xo0=wa,Jo0=wv,Vo0=Ua,zo0=Os,Ko0=wx,Zo0=B5,Wo0=X8,$o0=vd,Qo0=Y8,Fo0=ga,Ho0=kl,qo0=ha,Go0=rl,bo0=D5,xv0=[0,mp],rv0=hx,ev0=[0,1],tv0=[0,Sa,1416,6],nv0=[0,Sa,1419,6],uv0=[0,Sa,1522,8],iv0=[0,1],fv0=[0,Sa,1539,8],cv0="Can not have both `static` and `proto`",sv0=je,ov0=XN,vv0=[0,0,0,0],av0=[0,0],lv0=[0,[0,0,0,0,0]],pv0="You should only call render_type after making sure the next token is a renders variant",dv0=kl,yv0=ha,mv0=[0,"a number literal type"],kv0=[0,0],hv0=_o,_v0=[0,0],wv0=[0,"a type"],Tv0=[0,0],Sv0=[0,0],Ev0=[17,1],gv0=[17,0],Av0=[0,Sa,ES,15],Pv0=[0,Sa,lE,15],Cv0=Mt,Nv0=Mt,Rv0=X5,Iv0=hl,Ov0=[0,[11,"Failure while looking up ",[2,0,[11,". Index: ",[4,0,0,0,[11,". Length: ",[4,0,0,0,[12,46,0]]]]]]],"Failure while looking up %s. Index: %d. Length: %d."],Lv0=[0,0,0,0],Mv0="Offset_utils.Offset_lookup_failed",Dv0=d1,jv0=Jj,Uv0=hl,Bv0=X5,Yv0=OU,Xv0=hl,Jv0=X5,Vv0=Mm,zv0=Lg,Kv0="normal",Zv0=fi,Wv0="jsxTag",$v0="jsxChild",Qv0="template",Fv0=sU,Hv0="context",qv0=fi,Gv0=[6,0],bv0=[0,0],xa0=[0,1],ra0=[0,4],ea0=[0,2],ta0=[0,3],na0=[0,0],ua0=[0,0,0,0,0,0],ia0=_o,fa0=[0,75],ca0=[0,hx,0],sa0=vn,oa0=[0,75],va0=[0,75],aa0=ya,la0=[0,hx,0],pa0=[0,0,0],da0=[0,0,0],ya0=[0,83],ma0=G2,ka0=G2,ha0=[0,"a regular expression"],_a0=hx,wa0=hx,Ta0=hx,Sa0=[0,"src/parser/expression_parser.ml",1388,17],Ea0=[0,"a template literal part"],ga0=[0,[0,hx,hx],1],Aa0=[0,0],Pa0=Z3,Ca0=UD,Na0=iS,Ra0=iS,Ia0=Yj,Oa0=[0,75],La0=[0,1],Ma0=[0,1],Da0=[0,1],ja0=[0,1],Ua0=[0,1],Ba0=Na,Ya0=av,Xa0=[0,"the identifier `target`"],Ja0=[0,0],Va0=j2,za0=_l,Ka0=_l,Za0=Oa,Wa0=[0,"either a call or access of `super`"],$a0=Oa,Qa0=[0,1],Fa0=[0,0],Ha0=[0,1],qa0=[0,0],Ga0=[0,1],ba0=[0,0],x30=[0,2],r30=[0,3],e30=[0,7],t30=[0,6],n30=[0,4],u30=[0,5],i30=[0,6],f30=[0,[0,17,[0,2]]],c30=[0,[0,18,[0,3]]],s30=[0,[0,19,[0,4]]],o30=[0,[0,0,[0,5]]],v30=[0,[0,1,[0,5]]],a30=[0,[0,2,[0,5]]],l30=[0,[0,3,[0,5]]],p30=[0,[0,5,[0,6]]],d30=[0,[0,7,[0,6]]],y30=[0,[0,4,[0,6]]],m30=[0,[0,6,[0,6]]],k30=[0,[0,8,[0,7]]],h30=[0,[0,9,[0,7]]],_30=[0,[0,10,[0,7]]],w30=[0,[0,11,[0,8]]],T30=[0,[0,12,[0,8]]],S30=[0,[0,15,[0,9]]],E30=[0,[0,13,[0,9]]],g30=[0,[0,14,[1,10]]],A30=[0,[0,16,[0,9]]],P30=[0,[0,21,[0,6]]],C30=[0,[0,20,[0,6]]],N30=[20,_m],R30=[0,[0,8]],I30=[0,[0,7]],O30=[0,[0,6]],L30=[0,[0,10]],M30=[0,[0,9]],D30=[0,[0,11]],j30=[0,[0,5]],U30=[0,[0,4]],B30=[0,[0,2]],Y30=[0,[0,3]],X30=[0,[0,1]],J30=[0,[0,0]],V30=[0,[0,12]],z30=[0,[0,13]],K30=[0,[0,14]],Z30=[0,0],W30=$3,$30=[0,hx,0],Q30="unexpected PrivateName in Property, expected a PrivateField",F30=[0,0,0],H30=Ao,q30="Must be one of the above",G30=[0,1],b30=[0,1],xl0=[0,1],rl0=Ao,el0=Ao,tl0=J_,nl0="Internal Error: private name found in object props",ul0=[0,1],il0=[0,qk,1854,21],fl0=[0,"a declaration, statement or export specifiers"],cl0=[0,86],sl0=al,ol0=[0,hx,hx,0],vl0=[0,cD],al0="exports",ll0=[0,1],pl0=[0,1],dl0=[0,0],yl0=mB,ml0=[0,86],kl0=_o,hl0=[0,75],_l0=[0,0],wl0=[0,1],Tl0=[0,"the keyword `as`"],Sl0=[0,34],El0=[0,34],gl0=[0,0],Al0=[0,1],Pl0=[0,cD],Cl0=[0,"the keyword `from`"],Nl0=[0,hx,hx,0],Rl0=[0,xB],Il0="Label",Ol0=[0,xB],Ll0=[0,0,0],Ml0=[0,44],Dl0=[0,qk,429,22],jl0=[0,43],Ul0=[0,qk,448,22],Bl0=[0,0],Yl0="the token `;`",Xl0=[0,0],Jl0=[0,0],Vl0=YD,zl0=[0,mp],Kl0=YD,Zl0=[24,Rt],Wl0=Ov,$l0=ic,Ql0=[13,"JSX fragment"],Fl0=[0,un],Hl0=[1,un],ql0=[0,hx,hx,0],Gl0=[0,mp],bl0=hx,x60=[0,Fj],r60=[18,[0,0]],e60=[0,Fj],t60=[0,0,0,0],n60=_T,u60="Nooo: ",i60=pv,f60="Parser error: No such thing as an expression pattern!",c60=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],s60=[0,"src/parser/parser_flow.ml",p5,28],o60=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],v60=Jj,a60=Lg,l60=Tj,p60=$U,d60=$U,y60=Tj,m60=fi,k60=rD,h60=Y1,_60=d1,w60="InterpreterDirective",T60="interpreter",S60="Program",E60=Sl,g60="BreakStatement",A60=Sl,P60="ContinueStatement",C60="DebuggerStatement",N60=Lv,R60="DeclareExportAllDeclaration",I60=Lv,O60=Cw,L60=qC,M60=pv,D60="DeclareExportDeclaration",j60=go,U60=Y1,B60=Gr,Y60="DeclareModule",X60=H1,J60="DeclareModuleExports",V60=Ea,z60=Y1,K60="DoWhileStatement",Z60="EmptyStatement",W60=Zh,$60=qC,Q60="ExportDefaultDeclaration",F60=Zh,H60=OT,q60=Lv,G60="ExportAllDeclaration",b60=Zh,x40=Lv,r40=Cw,e40=qC,t40="ExportNamedDeclaration",n40="directive",u40=q1,i40="ExpressionStatement",f40=Y1,c40="update",s40=Ea,o40=hu,v40="ForStatement",a40="each",l40=Y1,p40=pn,d40=Ns,y40="ForInStatement",m40=Pv,k40=Y1,h40=pn,_40=Ns,w40="ForOfStatement",T40=kB,S40=vC,E40=Ea,g40="IfStatement",A40=fi,P40=Ps,C40=d1,N40=OD,R40=Lv,I40=Cw,O40="ImportDeclaration",L40=Y1,M40=Sl,D40="LabeledStatement",j40=q2,U40="ReturnStatement",B40="cases",Y40="discriminant",X40="SwitchStatement",J40=q2,V40="ThrowStatement",z40="finalizer",K40="handler",Z40=cn,W40="TryStatement",$40=Y1,Q40=Ea,F40="WhileStatement",H40=Y1,q40=tT,G40="WithStatement",b40=jj,xp0="ArrayExpression",rp0=U2,ep0=M5,tp0=q1,np0=Ue,up0=FE,ip0=Co,fp0=Y1,cp0=an,sp0=Gr,op0="ArrowFunctionExpression",vp0=H1,ap0=q1,lp0="AsExpression",pp0=J_,dp0=pn,yp0=Ns,mp0=Ia,kp0="AssignmentExpression",hp0=pn,_p0=Ns,wp0=Ia,Tp0="BinaryExpression",Sp0="CallExpression",Ep0=kB,gp0=vC,Ap0=Ea,Pp0="ConditionalExpression",Cp0=Lv,Np0="ImportExpression",Rp0=Sj,Ip0=mY,Op0=_m,Lp0=pn,Mp0=Ns,Dp0=Ia,jp0="LogicalExpression",Up0="MemberExpression",Bp0=ZP,Yp0=_l,Xp0="MetaProperty",Jp0=AP,Vp0=Rp,zp0=qB,Kp0="NewExpression",Zp0=Sm,Wp0="ObjectExpression",$p0=ft,Qp0="OptionalCallExpression",Fp0=ft,Hp0="OptionalMemberExpression",qp0=YB,Gp0="SequenceExpression",bp0="Super",x80="ThisExpression",r80=H1,e80=q1,t80="TypeCastExpression",n80=H1,u80=q1,i80="SatisfiesExpression",f80=q1,c80="AsConstExpression",s80=q2,o80="AwaitExpression",v80=Mt,a80=js,l80=KD,p80=aB,d80=Ps,y80=Os,m80=sl,k80="matched above",h80=q2,_80=oD,w80=Ia,T80="UnaryExpression",S80=Mj,E80=zB,g80=oD,A80=q2,P80=Ia,C80="UpdateExpression",N80="delegate",R80=q2,I80="YieldExpression",O80="Unexpected FunctionDeclaration with BodyExpression",L80=U2,M80=M5,D80=q1,j80=Ue,U80=FE,B80=Co,Y80=Y1,X80=an,J80=Gr,V80="FunctionDeclaration",z80="Unexpected FunctionExpression with BodyExpression",K80=U2,Z80=M5,W80=q1,$80=Ue,Q80=FE,F80=Co,H80=Y1,q80=an,G80=Gr,b80="FunctionExpression",x50=ft,r50=H1,e50=Le,t50=Og,n50=ft,u50=H1,i50=Le,f50="PrivateIdentifier",c50=ft,s50=H1,o50=Le,v50=Og,a50=vC,l50=Ea,p50="SwitchCase",d50=Y1,y50="param",m50="CatchClause",k50=Y1,h50="BlockStatement",_50=go,w50=Gr,T50="DeclareVariable",S50=Ue,E50=Gr,g50="DeclareFunction",A50=Ej,P50=Tv,C50=Bc,N50=Y1,R50=U2,I50=Gr,O50="DeclareClass",L50=U2,M50=H_,D50=an,j50=hw,U50=an,B50=Gr,Y50="DeclareComponent",X50=U2,J50=H_,V50=hw,z50=an,K50="ComponentTypeAnnotation",Z50=ft,W50=H1,$50=Le,Q50="ComponentTypeParameter",F50=Y1,H50=Gr,q50="DeclareEnum",G50=Bc,b50=Y1,xd0=U2,rd0=Gr,ed0="DeclareInterface",td0=d1,nd0=fi,ud0=OT,id0="ExportNamespaceSpecifier",fd0=pn,cd0=U2,sd0=Gr,od0="DeclareTypeAlias",vd0=pn,ad0=U2,ld0=Gr,pd0="TypeAlias",dd0="DeclareOpaqueType",yd0="OpaqueType",md0="supertype",kd0="impltype",hd0=U2,_d0=Gr,wd0="ClassDeclaration",Td0="ClassExpression",Sd0=kd,Ed0=Tv,gd0="superTypeParameters",Ad0="superClass",Pd0=U2,Cd0=Y1,Nd0=Gr,Rd0=q1,Id0="Decorator",Od0=U2,Ld0=Gr,Md0="ClassImplements",Dd0=Y1,jd0="ClassBody",Ud0=Ev,Bd0=ul,Yd0=Cv,Xd0=ja,Jd0=kd,Vd0=Ma,zd0=je,Kd0=go,Zd0=d1,Wd0=mv,$d0="MethodDefinition",Qd0=tl,Fd0=kd,Hd0=B2,qd0=je,Gd0=Ma,bd0=H1,xy0=d1,ry0=mv,ey0=kj,ty0="Internal Error: Private name found in class prop",ny0=tl,uy0=kd,iy0=B2,fy0=je,cy0=Ma,sy0=H1,oy0=d1,vy0=mv,ay0=kj,ly0=U2,py0=H_,dy0=an,yy0=Gr,my0=Y1,ky0="ComponentDeclaration",hy0=q2,_y0=Om,wy0=pn,Ty0=Ns,Sy0=Jp,Ey0=RS,gy0=ll,Ay0=Le,Py0="ComponentParameter",Cy0=hu,Ny0=Gr,Ry0="EnumBigIntMember",Iy0=Gr,Oy0=dD,Ly0=hu,My0=Gr,Dy0="EnumStringMember",jy0=Gr,Uy0=dD,By0=hu,Yy0=Gr,Xy0="EnumNumberMember",Jy0=hu,Vy0=Gr,zy0="EnumBooleanMember",Ky0=G3,Zy0=Od,Wy0=nl,$y0="EnumBooleanBody",Qy0=G3,Fy0=Od,Hy0=nl,qy0="EnumNumberBody",Gy0=G3,by0=Od,x90=nl,r90="EnumStringBody",e90=G3,t90=nl,n90="EnumSymbolBody",u90=G3,i90=Od,f90=nl,c90="EnumBigIntBody",s90=Y1,o90=Gr,v90="EnumDeclaration",a90=Bc,l90=Y1,p90=U2,d90=Gr,y90="InterfaceDeclaration",m90=U2,k90=Gr,h90="InterfaceExtends",_90=H1,w90=Sm,T90="ObjectPattern",S90=H1,E90=jj,g90="ArrayPattern",A90=pn,P90=Ns,C90=Jp,N90=H1,R90=Le,I90=Og,O90=q2,L90=Om,M90=q2,D90=Om,j90=pn,U90=Ns,B90=Jp,Y90=hu,X90=hu,J90=Cv,V90=ja,z90=uB,K90=Ma,Z90=RS,W90=ul,$90=go,Q90=d1,F90=mv,H90=wU,q90=q2,G90=pB,b90=pn,xm0=Ns,rm0=Jp,em0=Ma,tm0=RS,nm0=ul,um0=go,im0=d1,fm0=mv,cm0=wU,sm0=q2,om0=pB,vm0=Ut,am0=d1,lm0=da,pm0=Ut,dm0=wv,ym0=d1,mm0=da,km0=Ut,hm0=d1,_m0=da,wm0=Cs,Tm0=Is,Sm0=Ut,Em0=d1,gm0=da,Am0="flags",Pm0=yn,Cm0="regex",Nm0=Ut,Rm0=d1,Im0=da,Om0=Ut,Lm0=d1,Mm0=da,Dm0=YB,jm0="quasis",Um0="TemplateLiteral",Bm0="cooked",Ym0=Ut,Xm0="tail",Jm0=d1,Vm0="TemplateElement",zm0="quasi",Km0="tag",Zm0="TaggedTemplateExpression",Wm0=dl,$m0=ka,Qm0=ol,Fm0=go,Hm0="declarations",qm0="VariableDeclaration",Gm0=hu,bm0=Gr,xk0="VariableDeclarator",rk0="plus",ek0=BD,tk0=ga,nk0=Po,uk0=P_,ik0="in-out",fk0=go,ck0="Variance",sk0="AnyTypeAnnotation",ok0="MixedTypeAnnotation",vk0="EmptyTypeAnnotation",ak0="VoidTypeAnnotation",lk0="NullLiteralTypeAnnotation",pk0="SymbolTypeAnnotation",dk0="NumberTypeAnnotation",yk0="BigIntTypeAnnotation",mk0="StringTypeAnnotation",kk0="BooleanTypeAnnotation",hk0=H1,_k0="NullableTypeAnnotation",wk0="UnknownTypeAnnotation",Tk0="NeverTypeAnnotation",Sk0="UndefinedTypeAnnotation",Ek0=ha,gk0=H1,Ak0="parameterName",Pk0="TypePredicate",Ck0=U2,Nk0=hw,Rk0=M5,Ik0=lv,Ok0=an,Lk0="FunctionTypeAnnotation",Mk0=ft,Dk0=H1,jk0=Le,Uk0=JD,Bk0=ft,Yk0=H1,Xk0=Le,Jk0=JD,Vk0=[0,0,0,0,0],zk0="internalSlots",Kk0="callProperties",Zk0="indexers",Wk0=Sm,$k0="exact",Qk0="inexact",Fk0="ObjectTypeAnnotation",Hk0=uB,qk0="There should not be computed object type property keys",Gk0=hu,bk0=Cv,xh0=ja,rh0=go,eh0=B2,th0=XN,nh0=je,uh0=ft,ih0=ul,fh0=d1,ch0=mv,sh0="ObjectTypeProperty",oh0=q2,vh0="ObjectTypeSpreadProperty",ah0=B2,lh0=je,ph0=d1,dh0=mv,yh0=Gr,mh0="ObjectTypeIndexer",kh0=je,hh0=d1,_h0="ObjectTypeCallProperty",wh0=ft,Th0=B2,Sh0="sourceType",Eh0="propType",gh0="keyTparam",Ah0="ObjectTypeMappedTypeProperty",Ph0=d1,Ch0=ul,Nh0=je,Rh0=ft,Ih0=Gr,Oh0="ObjectTypeInternalSlot",Lh0=Y1,Mh0=Bc,Dh0="InterfaceTypeAnnotation",jh0=Hj,Uh0="ArrayTypeAnnotation",Bh0="falseType",Yh0="trueType",Xh0="extendsType",Jh0="checkType",Vh0="ConditionalTypeAnnotation",zh0="typeParameter",Kh0="InferTypeAnnotation",Zh0=Gr,Wh0=ZB,$h0="QualifiedTypeIdentifier",Qh0=U2,Fh0=Gr,Hh0="GenericTypeAnnotation",qh0="indexType",Gh0="objectType",bh0="IndexedAccessType",x_0=ft,r_0="OptionalIndexedAccessType",e_0=yg,t_0="UnionTypeAnnotation",n_0=yg,u_0="IntersectionTypeAnnotation",i_0=Rp,f_0=q2,c_0="TypeofTypeAnnotation",s_0=Gr,o_0=ZB,v_0="QualifiedTypeofIdentifier",a_0=q2,l_0="KeyofTypeAnnotation",p_0=C1,d_0=UU,y_0=oj,m_0=H1,k_0=Ia,h_0="TypeOperator",__0=q2,w_0="ReadOnlyTypeAnnotation",T_0="elementTypes",S_0="TupleTypeAnnotation",E_0=ft,g_0=B2,A_0=Hj,P_0=Sl,C_0="TupleTypeLabeledElement",N_0=H1,R_0=Sl,I_0="TupleTypeSpreadElement",O_0=Ut,L_0=d1,M_0="StringLiteralTypeAnnotation",D_0=Ut,j_0=d1,U_0="NumberLiteralTypeAnnotation",B_0=Ut,Y_0=d1,X_0="BigIntLiteralTypeAnnotation",J_0=Cs,V_0=Is,z_0=Ut,K_0=d1,Z_0="BooleanLiteralTypeAnnotation",W_0="ExistsTypeAnnotation",$_0=H1,Q_0=ED,F_0=H1,H_0=ED,q_0=an,G_0="TypeParameterDeclaration",b_0="usesExtendsBound",xw0=pv,rw0=B2,ew0="bound",tw0=Le,nw0="TypeParameter",uw0=an,iw0=wD,fw0=an,cw0=wD,sw0=Na,ow0=oB,vw0="closingElement",aw0="openingElement",lw0="JSXElement",pw0="closingFragment",dw0=oB,yw0="openingFragment",mw0="JSXFragment",kw0=Rp,hw0="selfClosing",_w0="attributes",ww0=Le,Tw0="JSXOpeningElement",Sw0="JSXOpeningFragment",Ew0=Le,gw0="JSXClosingElement",Aw0="JSXClosingFragment",Pw0=d1,Cw0=Le,Nw0="JSXAttribute",Rw0=q2,Iw0="JSXSpreadAttribute",Ow0="JSXEmptyExpression",Lw0=q1,Mw0="JSXExpressionContainer",Dw0=q1,jw0="JSXSpreadChild",Uw0=Ut,Bw0=d1,Yw0="JSXText",Xw0=ZP,Jw0=tT,Vw0="JSXMemberExpression",zw0=Le,Kw0="namespace",Zw0="JSXNamespacedName",Ww0=Le,$w0="JSXIdentifier",Qw0=OT,Fw0=ll,Hw0="ExportSpecifier",qw0=ll,Gw0="ImportDefaultSpecifier",bw0=ll,xT0="ImportNamespaceSpecifier",rT0=OD,eT0=ll,tT0="imported",nT0="ImportSpecifier",uT0="Line",iT0="Block",fT0=d1,cT0=d1,sT0="DeclaredPredicate",oT0="InferredPredicate",vT0=AP,aT0=Rp,lT0=qB,pT0=Ma,dT0=ZP,yT0=tT,mT0="message",kT0=Lg,hT0=OU,_T0=Mm,wT0=Lv,TT0=hl,ST0=X5,ET0=[0,Cf,Df,ai,_7,Mf,b7,Ui,Su,dc,Y7,$i,jf,cn,$u,hc,Me,I7,tu,vf,Gf,N7,yi,Gc,Nc,n7,df,K7,Au,Wi,tf,Fc,F7,Ru,Si,sf,Ci,di,nc,Gi,au,d7,qc,W7,Gu,cf,Pc,hi,lf,xc,Hn,yc,_c,ef,Ie,Oe,zu,Tf,Ac,Ki,T7,Bf,Zu,cc,kf,ac,If,Rc,Mi,se,Xi,t7,yf,nf,Cu,c7,ju,Vi,of,Cc,kc,Mu,Vu,af,w7,bn,Nf,m7,Qf,Z7,q1,Ti,xi,Gn,$7,y7,Yf,gf,G7,cu,Yi,Yu,Nu,pu,bu,oc,eu,zn,pc,S7,$n,B7,ti,ei,Uf,ii,wf,Kn,Ai,Wc,Hi,wu,gi,ku,Iu,Rt,g7,s7,P7,j2,Ei,ou,Ku,p7,hf,yu,$f,O7,b2,ni,r7,Kf,Zi,lu,bc,iu,_u,Vn,zi,Qu,Lc,lc,i7,Ef,Eu,ci,Kc,li,U7,o7,uu,qn,ec,rc,rf,fc,X7,Xu,Qn,ji,j7,Zn,vu,uf,ur,v7,pi,Bu,gc,ri,a7,Xc,Uc,Wu,Dc,Q7,Af,L7,Bi,Jf,qf,su,bi,Zc,pf,Vc,f7,vi,Pf,oi,sc,mi,nu,uc,u7,Fu,Of,yn,Yc,Lu,z7,wc,Ic,R7,H7,Ju,l7,h7,Ji,Du,mc,tc,fu,Wf,$c,gu,zf,Tc,mu,Ue,Ec,du,Uu,Tu,xf,D7,k7,De,Sc,qu,M7,Oc,Fi,qi,E7,ff,Ye,Ou,xu,Xf,Sf,jc,Oi,Rf,Be,Qc,mf,Qi,Pu,vc,Fn,x7,Pi,Ff,wi,Jc,A7,zc,_i,Wn,V7,Ii,bf,Hf,ru,C7,J7,ki,Hu,Mc,e7,q7,ui,Hc,Li,B2,Vf,_f,si,Y2],gT0=[0,Y2,si,_f,Vf,B2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Ii,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Be,Rf,Oi,jc,Sf,Xf,xu,Ou,Ye,ff,E7,qi,Fi,Oc,M7,qu,Sc,De,k7,D7,xf,Tu,Uu,du,Ec,Ue,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Ic,wc,z7,Lu,Yc,yn,Of,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ur,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,b2,O7,$f,yu,hf,p7,Ku,ou,Ei,j2,P7,s7,g7,Rt,Iu,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,q1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,se,Mi,Rc,If,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Ie,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,I7,Me,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],AT0=[0,Oc,Vn,ei,Iu,Kn,I7,Uc,qf,li,r7,$u,Jc,sc,Ye,nu,Qf,df,pf,lc,a7,O7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Rt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Ou,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,Of,Cf,$c,d7,_i,su,zf,uu,F7,oi,Ue,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,B2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,se,G7,wi,Y2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Ic,ec,qc,ur,j2,De,C7,Ii,ff,H7,Be,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,If,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,q1,Lu,nc,xi,Qi,zn,eu,Fi,Ie,$n,Gu,fu,af,ac,Oi,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Me,Mf,b2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],PT0="Jsoo_runtime.Error.Exn",CT0=[0,0],NT0="use_strict",RT0=yg,IT0="esproposal_decorators",OT0="enums",LT0="components",MT0="Internal error: ";function M1(x){if(typeof x=="number")return 0;switch(x[0]){case 0:return[0,M1(x[1])];case 1:return[1,M1(x[1])];case 2:return[2,M1(x[1])];case 3:return[3,M1(x[1])];case 4:return[4,M1(x[1])];case 5:return[5,M1(x[1])];case 6:return[6,M1(x[1])];case 7:return[7,M1(x[1])];case 8:var r=x[1];return[8,r,M1(x[2])];case 9:var e=x[1];return[9,e,e,M1(x[3])];case 10:return[10,M1(x[1])];case 11:return[11,M1(x[1])];case 12:return[12,M1(x[1])];case 13:return[13,M1(x[1])];default:return[14,M1(x[1])]}}function te(x,r){if(typeof x=="number")return r;switch(x[0]){case 0:return[0,te(x[1],r)];case 1:return[1,te(x[1],r)];case 2:return[2,te(x[1],r)];case 3:return[3,te(x[1],r)];case 4:return[4,te(x[1],r)];case 5:return[5,te(x[1],r)];case 6:return[6,te(x[1],r)];case 7:return[7,te(x[1],r)];case 8:var e=x[1];return[8,e,te(x[2],r)];case 9:var t=x[2],u=x[1];return[9,u,t,te(x[3],r)];case 10:return[10,te(x[1],r)];case 11:return[11,te(x[1],r)];case 12:return[12,te(x[1],r)];case 13:return[13,te(x[1],r)];default:return[14,te(x[1],r)]}}function E1(x,r){if(typeof x=="number")return r;switch(x[0]){case 0:return[0,E1(x[1],r)];case 1:return[1,E1(x[1],r)];case 2:var e=x[1];return[2,e,E1(x[2],r)];case 3:var t=x[1];return[3,t,E1(x[2],r)];case 4:var u=x[3],i=x[2],f=x[1];return[4,f,i,u,E1(x[4],r)];case 5:var o=x[3],a=x[2],d=x[1];return[5,d,a,o,E1(x[4],r)];case 6:var k=x[3],T=x[2],g=x[1];return[6,g,T,k,E1(x[4],r)];case 7:var A=x[3],N=x[2],R=x[1];return[7,R,N,A,E1(x[4],r)];case 8:var I=x[3],M=x[2],L=x[1];return[8,L,M,I,E1(x[4],r)];case 9:var z=x[1];return[9,z,E1(x[2],r)];case 10:return[10,E1(x[1],r)];case 11:var V=x[1];return[11,V,E1(x[2],r)];case 12:var Z=x[1];return[12,Z,E1(x[2],r)];case 13:var $=x[2],i0=x[1];return[13,i0,$,E1(x[3],r)];case 14:var U=x[2],J=x[1];return[14,J,U,E1(x[3],r)];case 15:return[15,E1(x[1],r)];case 16:return[16,E1(x[1],r)];case 17:var Y=x[1];return[17,Y,E1(x[2],r)];case 18:var F=x[1];return[18,F,E1(x[2],r)];case 19:return[19,E1(x[1],r)];case 20:var n0=x[2],Q=x[1];return[20,Q,n0,E1(x[3],r)];case 21:var f0=x[1];return[21,f0,E1(x[2],r)];case 22:return[22,E1(x[1],r)];case 23:var s0=x[1];return[23,s0,E1(x[2],r)];default:var v0=x[2],o0=x[1];return[24,o0,v0,E1(x[3],r)]}}function sI(x,r,e){return x[1]===r?(x[1]=e,1):0}function Nx(x){throw q0([0,kn,x],1)}function m2(x){throw q0([0,fI,x],1)}function ny(x){return 0<=x?x:-x|0}var DT0=nD;function Qx(x,r){var e=Xx(x),t=Xx(r),u=S1(e+t|0);return rs(x,0,u,0,e),rs(r,0,u,e,t),A2(u)}function jT0(x){return x?gW:AW}function Fx(x,r){if(!x)return r;var e=x[1];return[0,e,Fx(x[2],r)]}fW(0);var UT0=GY(1),ts=GY(2);function BT0(x){for(var r=cW(0);;){if(!r)return 0;var e=r[2],t=r[1];try{es(t)}catch(f){var u=L1(f);if(u[1]!==eX)throw q0(u,0)}var r=e}}function Ul(x,r){return eI(x,r,0,Xx(r))}function fX(x){return Ul(ts,x),bY(ts,10),es(ts)}var oI=[0,BT0];function vI(x){return l(oI[1],0)}nI(fj,vI);var cX=yW(0)[1],Bl=(4*pW(0)|0)-1|0,YT0=[qr,PW,Js(0)];function XT0(x){throw q0(YT0,1)}function uy(x,r){return r?[0,l(x,r[1])]:0}function sX(x){return 25>>0?x:x+bM|0}function ns(x){for(var r=0,e=x;;){if(!e)return r;var r=r+1|0,e=e[2]}}function Yl(x){return x?x[1]:Nx(jW)}function oX(x){return x?x[2]:Nx(DW)}function us(x,r){for(var e=x,t=r;;){if(!e)return t;var u=[0,e[1],t],e=e[2],t=u}}function Ax(x){return us(x,0)}function Xl(x){if(!x)return 0;var r=x[1];return Fx(r,Xl(x[2]))}function _n(x,r){if(!r)return 0;var e=r[2],t=l(x,r[1]);return[0,t,_n(x,e)]}function iy(x,r){for(var e=0,t=r;;){if(!t)return e;var u=t[2],e=[0,l(x,t[1]),e],t=u}}function C2(x,r){for(var e=r;;){if(!e)return 0;var t=e[2];l(x,e[1]);var e=t}}function r2(x,r,e){for(var t=r,u=e;;){if(!u)return t;var i=u[2],t=p(x,t,u[1]),u=i}}function aI(x,r,e){if(!r)return e;var t=r[1];return p(x,t,aI(x,r[2],e))}function vX(x,r,e){for(var t=r,u=e;;){if(t){if(u){var i=u[2],f=t[2];p(x,t[1],u[1]);var t=f,u=i;continue}}else if(!u)return 0;return m2(MW)}}function lI(x,r){for(var e=r;;){if(!e)return 0;var t=e[2],u=l(x,e[1]);if(u)return u;var e=t}}function pI(x,r){for(var e=r;;){if(!e)return 0;var t=e[2],u=VY(e[1],x)===0?1:0;if(u)return u;var e=t}}function Jl(x){var r=0;return function(e){for(var t=r,u=e;;){if(!u)return Ax(t);var i=u[2],f=u[1];if(l(x,f)){var t=[0,f,t],u=i;continue}var u=i}}}function jv(x,r){var e=S1(x);return JZ(e,0,x,r),e}function aX(x){var r=at(x),e=S1(r);return Us(x,0,e,0,r),e}function lX(x,r,e){if(0<=r&&0<=e&&(at(x)-e|0)>=r){var t=S1(e);return Us(x,r,t,0,e),t}return m2(YW)}function Wa(x,r,e){return A2(lX(x,r,e))}function pX(x,r,e,t,u){return 0<=u&&0<=r&&(at(x)-u|0)>=r&&0<=t&&(at(e)-u|0)>=t?Us(x,r,e,t,u):m2(BW)}function Zs(x,r,e,t,u){return 0<=u&&0<=r&&(Xx(x)-u|0)>=r&&0<=t&&(at(e)-u|0)>=t?rs(x,r,e,t,u):m2(UW)}function fy(x,r){return A2(jv(x,r))}function k2(x,r,e){return A2(lX(xs(x),r,e))}function dX(x){var r=xs(x);if(at(r)===0)var e=r;else{var t=aX(r);Kr(t,0,sX(oe(r,0)));var e=t}return A2(e)}function yX(x,r){var e=Xx(x),t=e<=Xx(r)?1:0;if(!t)return t;for(var u=0;;){if(u===e)return 1;if(fx(r,u)!==fx(x,u))return 0;var u=u+1|0}}var JT0=Tx;function mX(x,r){var e=r.length-1-1|0,t=0;if(e>=0)for(var u=t;;){l(x,r[1+u]);var i=u+1|0;if(e!==u){var u=i;continue}break}return 0}function cy(x,r){var e=r.length-1;if(e===0)return[0];var t=za(e,l(x,r[1])),u=e-1|0,i=1;if(u>=1)for(var f=i;;){t[1+f]=l(x,r[1+f]);var o=f+1|0;if(u!==f){var f=o;continue}break}return t}function Vl(x){if(!x)return[0];for(var r=0,e=x,t=x[2],u=x[1];;){if(e){var r=r+1|0,e=e[2];continue}for(var i=za(r,u),f=1,o=t;;){if(!o)return i;var a=o[2];i[1+f]=o[1];var f=f+1|0,o=a}}}function kX(x){try{var r=[0,Rl(x)];return r}catch(t){var e=L1(t);if(e[1]===kn)return 0;throw q0(e,0)}}function dI(x){function r(H){return H?H[5]:0}function e(H,b,B,a0){var m0=r(H),P0=r(a0),D=P0<=m0?m0+1|0:P0+1|0;return[0,H,b,B,a0,D]}function t(H,b){return[0,0,H,b,0,1]}function u(H,b,B,a0){var m0=H?H[5]:0,P0=a0?a0[5]:0;if((P0+2|0)=P0){var X=P0<=m0?m0+1|0:P0+1|0;return[0,H,b,B,a0,X]}if(!a0)return m2(HW);var W0=a0[4],sx=a0[3],tx=a0[2],j0=a0[1],Px=r(j0);if(Px<=r(W0))return e(e(H,b,B,j0),tx,sx,W0);if(!j0)return m2(FW);var Ex=j0[3],Ox=j0[2],qx=j0[1],B0=e(j0[4],tx,sx,W0);return e(e(H,b,B,qx),Ox,Ex,B0)}var i=0;function f(H){return H?0:1}function o(H,b,B){if(!B)return[0,0,H,b,0,1];var a0=B[4],m0=B[3],P0=B[2],D=B[1],N0=B[5],X0=p(x[1],H,P0);if(X0===0)return m0===b?B:[0,D,H,b,a0,N0];if(0<=X0){var D0=o(H,b,a0);return a0===D0?B:u(D,P0,m0,D0)}var ox=o(H,b,D);return D===ox?B:u(ox,P0,m0,a0)}function a(H,b){for(var B=b;;){if(!B)throw q0(P2,1);var a0=B[4],m0=B[3],P0=B[1],D=p(x[1],H,B[2]);if(D===0)return m0;var N0=0<=D?a0:P0,B=N0}}function d(H,b){for(var B=b;;){if(!B)throw q0(P2,1);var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=m0;continue}for(var N0=a0,X0=P0,D0=D;;){if(!D0)return[0,N0,X0];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=V0;continue}var D0=b0}}}function k(H,b){for(var B=b;;){if(!B)return 0;var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=m0;continue}for(var N0=a0,X0=P0,D0=D;;){if(!D0)return[0,[0,N0,X0]];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=V0;continue}var D0=b0}}}function T(H,b){for(var B=b;;){if(!B)throw q0(P2,1);var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=D;continue}for(var N0=a0,X0=P0,D0=m0;;){if(!D0)return[0,N0,X0];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=b0;continue}var D0=V0}}}function g(H,b){for(var B=b;;){if(!B)return 0;var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=D;continue}for(var N0=a0,X0=P0,D0=m0;;){if(!D0)return[0,[0,N0,X0]];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=b0;continue}var D0=V0}}}function A(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[3],P0=B[1],D=p(x[1],H,B[2]);if(D===0)return[0,m0];var N0=0<=D?a0:P0,B=N0}}function N(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[1],P0=p(x[1],H,B[2]),D=P0===0?1:0;if(D)return D;var N0=0<=P0?a0:m0,B=N0}}function R(H){for(var b=H;;){if(!b)throw q0(P2,1);var B=b[1];if(!B)return[0,b[2],b[3]];var b=B}}function I(H){for(var b=H;;){if(!b)return 0;var B=b[1];if(!B)return[0,[0,b[2],b[3]]];var b=B}}function M(H){for(var b=H;;){if(!b)throw q0(P2,1);if(!b[4])return[0,b[2],b[3]];var b=b[4]}}function L(H){for(var b=H;;){if(!b)return 0;if(!b[4])return[0,[0,b[2],b[3]]];var b=b[4]}}function z(H){if(!H)return m2(zW);var b=H[1];if(!b)return H[4];var B=H[4],a0=H[3],m0=H[2];return u(z(b),m0,a0,B)}function V(H,b){if(!H)return b;if(!b)return H;var B=R(b),a0=B[2],m0=B[1];return u(H,m0,a0,z(b))}function Z(H,b){if(!b)return 0;var B=b[4],a0=b[3],m0=b[2],P0=b[1],D=p(x[1],H,m0);if(D===0)return V(P0,B);if(0<=D){var N0=Z(H,B);return B===N0?b:u(P0,m0,a0,N0)}var X0=Z(H,P0);return P0===X0?b:u(X0,m0,a0,B)}function $(H,b,B){if(!B){var a0=l(b,0);return a0?[0,0,H,a0[1],0,1]:0}var m0=B[4],P0=B[3],D=B[2],N0=B[1],X0=B[5],D0=p(x[1],H,D);if(D0===0){var ox=l(b,[0,P0]);if(!ox)return V(N0,m0);var b0=ox[1];return P0===b0?B:[0,N0,H,b0,m0,X0]}if(0<=D0){var kx=$(H,b,m0);return m0===kx?B:u(N0,D,P0,kx)}var V0=$(H,b,N0);return N0===V0?B:u(V0,D,P0,m0)}function i0(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[3],P0=B[2];i0(H,B[1]),p(H,P0,m0);var B=a0}}function U(H,b){if(!b)return 0;var B=b[5],a0=b[4],m0=b[3],P0=b[2],D=U(H,b[1]),N0=l(H,m0);return[0,D,P0,N0,U(H,a0),B]}function J(H,b){if(!b)return 0;var B=b[2],a0=b[5],m0=b[4],P0=b[3],D=J(H,b[1]),N0=p(H,B,P0);return[0,D,B,N0,J(H,m0),a0]}function Y(H,b,B){for(var a0=b,m0=B;;){if(!a0)return m0;var P0=a0[4],D=a0[3],N0=a0[2],X0=G0(H,N0,D,Y(H,a0[1],m0)),a0=P0,m0=X0}}function F(H,b){for(var B=b;;){if(!B)return 1;var a0=B[4],m0=B[1],P0=p(H,B[2],B[3]);if(P0){var D=F(H,m0);if(D){var B=a0;continue}var N0=D}else var N0=P0;return N0}}function n0(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[1],P0=p(H,B[2],B[3]);if(P0)var D=P0;else{var N0=n0(H,m0);if(!N0){var B=a0;continue}var D=N0}return D}}function Q(H,b,B){if(!B)return t(H,b);var a0=B[4],m0=B[3],P0=B[2];return u(Q(H,b,B[1]),P0,m0,a0)}function f0(H,b,B){if(!B)return t(H,b);var a0=B[3],m0=B[2],P0=B[1];return u(P0,m0,a0,f0(H,b,B[4]))}function s0(H,b,B,a0){if(!H)return Q(b,B,a0);if(!a0)return f0(b,B,H);var m0=a0[5],P0=H[5],D=a0[4],N0=a0[3],X0=a0[2],D0=a0[1],ox=H[4],b0=H[3],kx=H[2],V0=H[1];return(m0+2|0)x[3])throw q0([0,wr,x$],1);if((e+r|0)<=x[3])return 0;throw q0([0,wr,r$],1)}}function lt(x,r){var e=x[2];return x[3]<=e&&kI(x,1),Kr(x[1],e,r),x[2]=e+1|0,0}function _X(x,r,e,t){var u=e<0?1:0;if(u)var f=u;else var i=t<0?1:0,f=i||((Xx(r)-t|0)=u+G5>>>0&&(i=1):65<=u&&(i=1);else{var f=0;if(u===32)f=1;else if(43<=u)switch(u+Jm|0){case 5:if(t<(e+2|0)&&1>>0?33>>0&&(i=1):u===2&&(i=1),!i){var r=r+1|0;continue}var f=xs(x),o=[0,0],a=at(f)-1|0,d=0;if(a>=0)for(var k=d;;){var T=oe(f,k),g=0;if(32<=T){var A=T-34|0,N=0;if(58>>0?93>A&&(N=1):56>>0?g=1:N=1,N){var R=1;g=2}}else 11<=T?T===13&&(g=1):8<=T&&(g=1);switch(g){case 0:var R=4;break;case 1:var R=2;break}o[1]=o[1]+R|0;var I=k+1|0;if(a!==k){var k=I;continue}break}if(o[1]===at(f))var M=aX(f);else{var L=S1(o[1]);o[1]=0;var z=at(f)-1|0,V=0;if(z>=0)for(var Z=V;;){var $=oe(f,Z),i0=0;if(35<=$)$===92?i0=2:Xr<=$?i0=1:i0=3;else if(32<=$)34<=$?i0=2:i0=3;else if(14<=$)i0=1;else switch($){case 8:Kr(L,o[1],92),o[1]++,Kr(L,o[1],98);break;case 9:Kr(L,o[1],92),o[1]++,Kr(L,o[1],Ri);break;case 10:Kr(L,o[1],92),o[1]++,Kr(L,o[1],B1);break;case 13:Kr(L,o[1],92),o[1]++,Kr(L,o[1],st);break;default:i0=1}switch(i0){case 1:Kr(L,o[1],92),o[1]++,Kr(L,o[1],48+($/ot|0)|0),o[1]++,Kr(L,o[1],48+(($/10|0)%10|0)|0),o[1]++,Kr(L,o[1],48+($%10|0)|0);break;case 2:Kr(L,o[1],92),o[1]++,Kr(L,o[1],$);break;case 3:Kr(L,o[1],$);break}o[1]++;var U=Z+1|0;if(z!==Z){var Z=U;continue}break}var M=L}var t=A2(M)}var J=Xx(t),Y=jv(J+2|0,34);return rs(t,0,Y,1,J),A2(Y)}}function gX(x,r){var e=ny(r),t=G$[1];switch(x[2]){case 0:var u=Zf;break;case 1:var u=It;break;case 2:var u=69;break;case 3:var u=nn;break;case 4:var u=71;break;case 5:var u=t;break;case 6:var u=jt;break;case 7:var u=72;break;default:var u=70}var i=wX(16);switch(Fa(i,37),x[1]){case 0:break;case 1:Fa(i,43);break;default:Fa(i,32)}return 8<=x[2]&&Fa(i,35),Fa(i,46),N2(i,hx+e),Fa(i,u),SX(i)}function oy(x,r){if(13>x)return r;var e=[0,0],t=Xx(r)-1|0,u=0;if(t>=0)for(var i=u;;){9>=fx(r,i)+Z1>>>0&&e[1]++;var f=i+1|0;if(t!==i){var i=f;continue}break}var o=e[1],a=S1(Xx(r)+((o-1|0)/3|0)|0),d=[0,0];function k(M){return Ja(a,d[1],M),d[1]++,0}var T=[0,((o-1|0)%3|0)+1|0],g=Xx(r)-1|0,A=0;if(g>=0)for(var N=A;;){var R=fx(r,N);9>>0||(T[1]===0&&(k(95),T[1]=3),T[1]+=-1),k(R);var I=N+1|0;if(g!==N){var N=I;continue}break}return A2(a)}function KT0(x,r){switch(x){case 1:var e=BQ;break;case 2:var e=YQ;break;case 4:var e=XQ;break;case 5:var e=JQ;break;case 6:var e=VQ;break;case 7:var e=zQ;break;case 8:var e=KQ;break;case 9:var e=ZQ;break;case 10:var e=WQ;break;case 11:var e=$Q;break;case 0:case 13:var e=QQ;break;case 3:case 14:var e=FQ;break;default:var e=HQ}return oy(x,Fd(e,r))}function ZT0(x,r){switch(x){case 1:var e=aQ;break;case 2:var e=lQ;break;case 4:var e=pQ;break;case 5:var e=dQ;break;case 6:var e=yQ;break;case 7:var e=mQ;break;case 8:var e=kQ;break;case 9:var e=hQ;break;case 10:var e=_Q;break;case 11:var e=wQ;break;case 0:case 13:var e=TQ;break;case 3:case 14:var e=SQ;break;default:var e=EQ}return oy(x,Fd(e,r))}function WT0(x,r){switch(x){case 1:var e=b$;break;case 2:var e=xQ;break;case 4:var e=rQ;break;case 5:var e=eQ;break;case 6:var e=tQ;break;case 7:var e=nQ;break;case 8:var e=uQ;break;case 9:var e=iQ;break;case 10:var e=fQ;break;case 11:var e=cQ;break;case 0:case 13:var e=sQ;break;case 3:case 14:var e=oQ;break;default:var e=vQ}return oy(x,Fd(e,r))}function $T0(x,r){switch(x){case 1:var e=gQ;break;case 2:var e=AQ;break;case 4:var e=PQ;break;case 5:var e=CQ;break;case 6:var e=NQ;break;case 7:var e=RQ;break;case 8:var e=IQ;break;case 9:var e=OQ;break;case 10:var e=LQ;break;case 11:var e=MQ;break;case 0:case 13:var e=DQ;break;case 3:case 14:var e=jQ;break;default:var e=UQ}return oy(x,$Z(e,r))}function Ws(x,r,e){function t(V){switch(x[1]){case 0:var Z=45;break;case 1:var Z=43;break;default:var Z=32}return zZ(e,r,Z)}function u(V){var Z=gZ(e);return Z===3?e<0?F$:H$:4<=Z?Q$:V}switch(x[2]){case 5:for(var i=qR(gX(x,r),e),f=0,o=Xx(i);;){if(f===o)var a=0;else{var d=O1(i,f)+Iv|0,k=0;if(23>>0?d===55&&(k=1):21>>0&&(k=1),!k){var f=f+1|0;continue}var a=1}var T=a?i:Qx(i,q$);return u(T)}case 6:return t(0);case 7:var g=xs(t(0)),A=at(g);if(A===0)var N=g;else{var R=S1(A),I=A-1|0,M=0;if(I>=0)for(var L=M;;){Kr(R,L,sX(oe(g,L)));var z=L+1|0;if(I!==L){var L=z;continue}break}var N=R}return A2(N);case 8:return u(t(0));default:return qR(gX(x,r),e)}}function vy(x,r,e,t,u,i,f){if(typeof t=="number"){if(typeof u=="number")return u?function(A,N){return Ur(x,[4,r,Ha(A,p(i,f,N))],e)}:function(A){return Ur(x,[4,r,p(i,f,A)],e)};var o=u[1];return function(A){return Ur(x,[4,r,Ha(o,p(i,f,A))],e)}}if(t[0]===0){var a=t[2],d=t[1];if(typeof u=="number")return u?function(A,N){return Ur(x,[4,r,Ve(d,a,Ha(A,p(i,f,N)))],e)}:function(A){return Ur(x,[4,r,Ve(d,a,p(i,f,A))],e)};var k=u[1];return function(A){return Ur(x,[4,r,Ve(d,a,Ha(k,p(i,f,A)))],e)}}var T=t[1];if(typeof u=="number")return u?function(A,N,R){return Ur(x,[4,r,Ve(T,A,Ha(N,p(i,f,R)))],e)}:function(A,N){return Ur(x,[4,r,Ve(T,A,p(i,f,N))],e)};var g=u[1];return function(A,N){return Ur(x,[4,r,Ve(T,A,Ha(g,p(i,f,N)))],e)}}function TI(x,r,e,t,u){if(typeof t=="number")return function(a){return Ur(x,[4,r,l(u,a)],e)};if(t[0]===0){var i=t[2],f=t[1];return function(a){return Ur(x,[4,r,Ve(f,i,l(u,a))],e)}}var o=t[1];return function(a,d){return Ur(x,[4,r,Ve(o,a,l(u,d))],e)}}function Wl(x,r,e,t){for(var u=r,i=e,f=t;;){if(typeof f=="number")return l(u,i);switch(f[0]){case 0:var o=f[1];return function(C0){return Ur(u,[5,i,C0],o)};case 1:var a=f[1];return function(C0){var A0=0;if(40<=C0)if(C0===92)var U0=CW;else Xr<=C0?A0=1:A0=2;else if(32<=C0)if(39<=C0)var U0=NW;else A0=2;else if(14<=C0)A0=1;else switch(C0){case 8:var U0=RW;break;case 9:var U0=IW;break;case 10:var U0=OW;break;case 13:var U0=LW;break;default:A0=1}switch(A0){case 1:var Q0=S1(4);Kr(Q0,0,92),Kr(Q0,1,48+(C0/ot|0)|0),Kr(Q0,2,48+((C0/10|0)%10|0)|0),Kr(Q0,3,48+(C0%10|0)|0);var U0=A2(Q0);break;case 2:var H=S1(1);Kr(H,0,C0);var U0=A2(H);break}var b=Xx(U0),B=jv(b+2|0,39);return rs(U0,0,B,1,b),Ur(u,[4,i,A2(B)],a)};case 2:var d=f[2],k=f[1];return TI(u,i,d,k,function(C0){return C0});case 3:return TI(u,i,f[2],f[1],zT0);case 4:return vy(u,i,f[4],f[2],f[3],KT0,f[1]);case 5:return vy(u,i,f[4],f[2],f[3],ZT0,f[1]);case 6:return vy(u,i,f[4],f[2],f[3],WT0,f[1]);case 7:return vy(u,i,f[4],f[2],f[3],$T0,f[1]);case 8:var T=f[4],g=f[3],A=f[2],N=f[1];if(typeof A=="number"){if(typeof g=="number")return g?function(C0,A0){return Ur(u,[4,i,Ws(N,C0,A0)],T)}:function(C0){return Ur(u,[4,i,Ws(N,_I(N),C0)],T)};var R=g[1];return function(C0){return Ur(u,[4,i,Ws(N,R,C0)],T)}}if(A[0]===0){var I=A[2],M=A[1];if(typeof g=="number")return g?function(C0,A0){return Ur(u,[4,i,Ve(M,I,Ws(N,C0,A0))],T)}:function(C0){return Ur(u,[4,i,Ve(M,I,Ws(N,_I(N),C0))],T)};var L=g[1];return function(C0){return Ur(u,[4,i,Ve(M,I,Ws(N,L,C0))],T)}}var z=A[1];if(typeof g=="number")return g?function(C0,A0,U0){return Ur(u,[4,i,Ve(z,C0,Ws(N,A0,U0))],T)}:function(C0,A0){return Ur(u,[4,i,Ve(z,C0,Ws(N,_I(N),A0))],T)};var V=g[1];return function(C0,A0){return Ur(u,[4,i,Ve(z,C0,Ws(N,V,A0))],T)};case 9:return TI(u,i,f[2],f[1],jT0);case 10:var i=[7,i],f=f[1];continue;case 11:var i=[2,i,f[1]],f=f[2];continue;case 12:var i=[3,i,f[1]],f=f[2];continue;case 13:var Z=f[3],$=f[2],i0=wX(16);wI(i0,$);var U=SX(i0);return function(C0){return Ur(u,[4,i,U],Z)};case 14:var J=f[3],Y=f[2];return function(C0){var A0=C0[1],U0=s1(A0,M1(e2(Y)));if(typeof U0[2]=="number")return Ur(u,i,E1(U0[1],J));throw q0(h2,1)};case 15:var F=f[1];return function(C0,A0){return Ur(u,[6,i,function(U0){return p(C0,U0,A0)}],F)};case 16:var n0=f[1];return function(C0){return Ur(u,[6,i,C0],n0)};case 17:var i=[0,i,f[1]],f=f[2];continue;case 18:var Q=f[1];if(Q[0]===0){var f0=f[2],s0=Q[1][1],v0=0,u=function(Q0,H,b){return function(B){return Ur(H,[1,Q0,[0,B]],b)}}(i,u,f0),i=v0,f=s0;continue}var o0=f[2],c0=Q[1][1],T0=0,u=function(C0,A0,U0){return function(Q0){return Ur(A0,[1,C0,[1,Q0]],U0)}}(i,u,o0),i=T0,f=c0;continue;case 19:throw q0([0,wr,j$],1);case 20:var E0=f[3],M0=[8,i,U$];return function(C0){return Ur(u,M0,E0)};case 21:var Y0=f[2];return function(C0){return Ur(u,[4,i,Fd(aU,C0)],Y0)};case 22:var rx=f[1];return function(C0){return Ur(u,[5,i,C0],rx)};case 23:var g0=f[2],H0=f[1];if(typeof H0=="number")switch(H0){case 0:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 1:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 2:throw q0([0,wr,B$],1);default:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0])}switch(H0[0]){case 0:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 1:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 2:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 3:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 4:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 5:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 6:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 7:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 8:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 9:var t0=H0[2];return x<50?SI(x+1|0,u,i,t0,g0):y2(SI,[0,u,i,t0,g0]);case 10:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);default:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0])}default:var ex=f[3],xx=f[1],ax=l(f[2],0);return x<50?EI(x+1|0,u,i,ex,xx,ax):y2(EI,[0,u,i,ex,xx,ax])}}}function SI(x,r,e,t,u){if(typeof t=="number")return x<50?e1(x+1|0,r,e,u):y2(e1,[0,r,e,u]);switch(t[0]){case 0:var i=t[1];return function(V){return pt(r,e,i,u)};case 1:var f=t[1];return function(V){return pt(r,e,f,u)};case 2:var o=t[1];return function(V){return pt(r,e,o,u)};case 3:var a=t[1];return function(V){return pt(r,e,a,u)};case 4:var d=t[1];return function(V){return pt(r,e,d,u)};case 5:var k=t[1];return function(V){return pt(r,e,k,u)};case 6:var T=t[1];return function(V){return pt(r,e,T,u)};case 7:var g=t[1];return function(V){return pt(r,e,g,u)};case 8:var A=t[2];return function(V){return pt(r,e,A,u)};case 9:var N=t[3],R=t[2],I=v2(e2(t[1]),R);return function(V){return pt(r,e,te(I,N),u)};case 10:var M=t[1];return function(V,Z){return pt(r,e,M,u)};case 11:var L=t[1];return function(V){return pt(r,e,L,u)};case 12:var z=t[1];return function(V){return pt(r,e,z,u)};case 13:throw q0([0,wr,Y$],1);default:throw q0([0,wr,X$],1)}}function e1(x,r,e,t){var u=[8,e,J$];return x<50?Wl(x+1|0,r,u,t):y2(Wl,[0,r,u,t])}function EI(x,r,e,t,u,i){if(u){var f=u[1];return function(a){return QT0(r,e,t,f,l(i,a))}}var o=[4,e,i];return x<50?Wl(x+1|0,r,o,t):y2(Wl,[0,r,o,t])}function Ur(x,r,e){return uI(Wl(0,x,r,e))}function pt(x,r,e,t){return uI(SI(0,x,r,e,t))}function QT0(x,r,e,t,u){return uI(EI(0,x,r,e,t,u))}function $s(x,r){for(var e=r;;){if(typeof e=="number")return 0;switch(e[0]){case 0:var t=e[1],u=EX(e[2]);return $s(x,t),Ul(x,u);case 1:var i=e[2],f=e[1];if(i[0]===0){var o=i[1];$s(x,f),Ul(x,V$);var e=o;continue}var a=i[1];$s(x,f),Ul(x,z$);var e=a;continue;case 6:var d=e[2];return $s(x,e[1]),l(d,x);case 7:return $s(x,e[1]),es(x);case 8:var k=e[2];return $s(x,e[1]),m2(k);case 2:case 4:var T=e[2];return $s(x,e[1]),Ul(x,T);default:var g=e[2];return $s(x,e[1]),bY(x,g)}}}function Qs(x,r){for(var e=r;;){if(typeof e=="number")return 0;switch(e[0]){case 0:var t=e[1],u=EX(e[2]);return Qs(x,t),vr(x,u);case 1:var i=e[2],f=e[1];if(i[0]===0){var o=i[1];Qs(x,f),vr(x,K$);var e=o;continue}var a=i[1];Qs(x,f),vr(x,Z$);var e=a;continue;case 6:var d=e[2];return Qs(x,e[1]),vr(x,l(d,0));case 7:var e=e[1];continue;case 8:var k=e[2];return Qs(x,e[1]),m2(k);case 2:case 4:var T=e[2];return Qs(x,e[1]),vr(x,T);default:var g=e[2];return Qs(x,e[1]),lt(x,g)}}}function AX(x,r){var e=r[1],t=0;return Ur(function(u){return $s(x,u),0},t,e)}function gI(x){return AX(ts,x)}function Tr(x){var r=x[1];return Ur(function(e){var t=Qr(64);return Qs(t,e),X1(t)},0,r)}var AI=[0,0];function PI(x,r){var e=x[1+r];if(!(1-(typeof e=="number"?1:0)))return l(Tr(RF),e);if(Dv(e)===Av)return l(Tr(IF),e);if(Dv(e)!==vg)return OF;for(var t=qR("%.12g",e),u=0,i=Xx(t);;){if(i<=u)return Qx(t,EW);var f=O1(t,u),o=0;if(48<=f?58>f&&(o=1):f===45&&(o=1),!o)return t;var u=u+1|0}}function PX(x,r){if(x.length-1<=r)return iF;var e=PX(x,r+1|0),t=PI(x,r);return p(Tr(fF),t,e)}function ay(x){for(var r=AI[1];;){if(r){var e=0,t=r[2],u=r[1];try{var i=l(u,x)}catch{e=1}var f=0;if(e||!i)f=1;else var o=[0,i[1]];if(f){var r=t;continue}}else var o=0;if(o)return o[1];if(x===iI)return wF;if(x===nX)return TF;if(x[1]===tX){var a=x[2],d=a[3],k=a[2],T=a[1];return Xe(Tr(cI),T,k,d,d+5|0,SF)}if(x[1]===wr){var g=x[2],A=g[3],N=g[2],R=g[1];return Xe(Tr(cI),R,N,A,A+6|0,EF)}if(x[1]===Dl){var I=x[2],M=I[3],L=I[2],z=I[1];return Xe(Tr(cI),z,L,M,M+6|0,gF)}if(Dv(x)!==0)return x[1];var V=x.length-1,Z=x[1][1];if(2>>0)var $=PX(x,2),i0=PI(x,1),U=p(Tr(AF),i0,$);else switch(V){case 0:var U=PF;break;case 1:var U=CF;break;default:var J=PI(x,1),U=l(Tr(NF),J)}return Qx(Z,U)}}function CI(x,r){var e=XZ(r),t=e.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var f=W1(e,i)[1+i],o=function(z){return function(V){return V?z===0?lF:pF:z===0?dF:yF}}(i);if(f[0]===0)var a=f[5],d=f[4],k=f[3],T=f[6]?mF:kF,g=f[2],A=f[7],N=o(f[1]),I=[0,wW(Tr(hF),N,A,g,T,k,d,a)];else if(f[1])var I=0;else var R=o(0),I=[0,l(Tr(_F),R)];if(I){var M=I[1];l(AX(x,aF),M)}var L=i+1|0;if(t!==i){var i=L;continue}break}return 0}function CX(x){for(;;){var r=AI[1],e=1-sI(AI,r,[0,x,r]);if(!e)return e}}var FT0=LF.slice(),HT0=[0];nI(mD,function(x,r){try{try{var e=r?HT0:KY(0);try{vI(0)}catch{}try{var t=ay(x);l(gI(vF),t),CI(ts,e);var u=rW(0);if(u<0){var i=ny(u);fX(W1(FT0,i)[1+i])}var f=es(ts),o=f}catch(A){var a=L1(A),d=ay(x);l(gI(cF),d),CI(ts,e);var k=ay(a);l(gI(sF),k),CI(ts,KY(0));var o=es(ts)}var T=o}catch(A){var g=L1(A);if(g!==iI)throw q0(g,0);var T=fX(oF)}return T}catch{return 0}});var NI=[qr,bF,Js(0)],ly=0,NX=-1;function $l(x,r){return x[13]=x[13]+r[3]|0,mI(r,x[28])}var RX=1000000010;function RI(x,r){return G0(x[17],r,0,Xx(r))}function py(x){return l(x[19],0)}function IX(x,r,e){return x[9]=x[9]-r|0,RI(x,e),x[11]=0,0}function dy(x,r){var e=P(r,hx);return e&&IX(x,Xx(r),r)}function Bv(x,r,e){var t=r[3],u=r[2];dy(x,r[1]),py(x),x[11]=1;var i=(x[6]-e|0)+u|0,f=x[8],o=f<=i?f:i;return x[10]=o,x[9]=x[6]-x[10]|0,l(x[21],x[10]),dy(x,t)}function OX(x,r){return Bv(x,GF,r)}function qa(x,r){var e=r[2],t=r[3];return dy(x,r[1]),x[9]=x[9]-e|0,l(x[20],e),dy(x,t)}function qT0(x,r,e){if(typeof e=="number")switch(e){case 0:var t=Qa(x[3]);if(!t)return 0;var u=t[1][1],i=function(ax,dx){if(!dx)return[0,ax,0];var mx=dx[1],L0=dx[2];return xW(ax,mx)?[0,ax,dx]:[0,mx,i(ax,L0)]};return u[1]=i(x[6]-x[9]|0,u[1]),0;case 1:return $a(x[2]),0;case 2:return $a(x[3]),0;case 3:var f=Qa(x[2]);return f?OX(x,f[1][2]):py(x);case 4:var o=x[10]!==(x[6]-x[9]|0)?1:0;if(!o)return o;var a=x[28],d=a[2];if(d){var k=d[1];if(d[2]){var T=d[2];a[1]=a[1]-1|0,a[2]=T;var g=[0,k]}else{yI(a);var g=[0,k]}}else var g=0;if(!g)return 0;var A=g[1],N=A[1];return x[12]=x[12]-A[3]|0,x[9]=x[9]+N|0,0;default:var R=$a(x[5]);return R?RI(x,l(x[25],R[1])):0}switch(e[0]){case 0:return IX(x,r,e[1]);case 1:var I=e[2],M=e[1],L=I[1],z=I[2],V=Qa(x[2]);if(!V)return 0;var Z=V[1],$=Z[2];switch(Z[1]){case 0:return qa(x,M);case 1:return Bv(x,I,$);case 2:return Bv(x,I,$);case 3:return x[9]<(r+Xx(L)|0)?Bv(x,I,$):qa(x,M);case 4:return x[11]?qa(x,M):x[9]<(r+Xx(L)|0)||((x[6]-$|0)+z|0)s0){var Q=v0;continue}var o0=s0}else var o0=f0;var c0=o0;break}else var c0=i0;var T0=c0-i0|0;return 0<=T0?qa(x,[0,FF,T0+J|0,QF]):Bv(x,[0,qF,c0+U|0,HF],x[6]);case 3:var E0=e[2],M0=e[1];if(x[8]<(x[6]-x[9]|0)){var Y0=Qa(x[2]);if(Y0){var rx=Y0[1],g0=rx[2],H0=rx[1];x[9]=H0-1>>>0&&OX(x,g0)}else py(x)}var t0=x[9]-M0|0,ex=E0===1?1:x[9]=e)return G0(x[17],JX,0,e);G0(x[17],JX,0,80);var e=e+cj|0}}function GT0(x){return x[1]===NI?Qx(XF,Qx(x[2],YF)):JF}function bT0(x){return x[1]===NI?Qx(UF,Qx(x[2],jF)):BF}function xS0(x){return 0}function rS0(x){return 0}function zX(x,r){function e(g){return 0}function t(g){return 0}function u(g){return 0}var i=hX(0),f=[0,NX,MF,0];mI(f,i);var o=zl(0);II(o),Uv([0,1,f],o);var a=zl(0),d=zl(0),k=zl(0),T=[0,o,zl(0),k,d,a,78,10,68,78,0,1,1,1,1,DT0,DF,x,r,u,t,e,0,0,GT0,bT0,xS0,rS0,i];return T[19]=function(g){return G0(T[17],VF,0,1)},T[20]=function(g){return VX(T,g)},T[21]=function(g){return VX(T,g)},T}function KX(x){function r(e){return es(x)}return zX(function(e,t,u){return 0<=t&&0<=u&&(Xx(e)-u|0)>=t?eI(x,e,t,u):m2(SW)},r)}function DI(x){function r(e){return 0}return zX(function(e,t,u){return _X(x,e,t,u)},r)}var eS0=_w;function ZX(x){return Qr(eS0)}var tS0=ZX(0),nS0=KX(UT0),uS0=KX(ts);DI(tS0);function WX(x,r){var e=Qr(16),t=DI(e);p(x,t,r),Fl(t,0);var u=e[2];if(2>u)return X1(e);var i=u-2|0,f=1;return 0<=i&&(e[2]-i|0)>=1?Wa(e[1],f,i):m2(e$)}function ze(x,r){var e=0;if(typeof r=="number")return 0;switch(r[0]){case 0:var t=r[2];if(ze(x,r[1]),typeof t=="number")switch(t){case 0:return BX(x,0);case 1:return YX(x,0);case 2:return Fl(x,0);case 3:var u=x[14]=O1(L,U)+G5>>>0){var U=U+1|0;continue}for(var J=k2(L,i0,U-i0|0),Y=$(U),F=Y;;){if(F!==V){var n0=O1(L,F),Q=0;if(48<=n0?58>n0&&(Q=1):n0===45&&(Q=1),Q){var F=F+1|0;continue}}if(Y===F)var f0=0;else try{var s0=vt(k2(L,Y,F-Y|0)),f0=s0}catch(b0){var v0=L1(b0);if(v0[1]!==kn)throw q0(v0,0);var f0=Z(0)}$(F)!==V&&Z(0);var o0=0;if(P(J,hx)&&P(J,xg))var c0=P(J,"h")?P(J,"hov")?P(J,"hv")?P(J,WD)?Z(0):1:2:3:0;else o0=1;if(o0)var c0=4;var z=[0,f0,c0];break}break}return UX(x,z[1],z[2]);case 2:var T0=r[1],E0=0;if(typeof T0=="number"||T0[0]!==0)E0=1;else{var M0=T0[2],Y0=0;if(typeof M0=="number"||M0[0]!==1)Y0=1;else var rx=r[2],g0=M0[2],H0=T0[1];Y0&&(E0=1)}if(E0){var t0=r[2],ex=T0;e=2}break;case 3:var xx=r[1],ax=0;if(typeof xx=="number"||xx[0]!==0)ax=1;else{var dx=xx[2],mx=0;if(typeof dx=="number"||dx[0]!==1)mx=1;else{var L0=r[2],C0=dx[2],A0=xx[1];e=1}mx&&(ax=1)}if(ax){var U0=r[2],Q0=xx;e=3}break;case 4:var H=r[1],b=0;if(typeof H=="number"||H[0]!==0)b=1;else{var B=H[2],a0=0;if(typeof B=="number"||B[0]!==1)a0=1;else var rx=r[2],g0=B[2],H0=H[1];a0&&(b=1)}if(b){var t0=r[2],ex=H;e=2}break;case 5:var m0=r[1],P0=0;if(typeof m0=="number"||m0[0]!==0)P0=1;else{var D=m0[2],N0=0;if(typeof D=="number"||D[0]!==1)N0=1;else{var L0=r[2],C0=D[2],A0=m0[1];e=1}N0&&(P0=1)}if(P0){var U0=r[2],Q0=m0;e=3}break;case 6:var X0=r[2];return ze(x,r[1]),l(X0,x);case 7:return ze(x,r[1]),Fl(x,0);default:var D0=r[2];return ze(x,r[1]),m2(D0)}switch(e){case 0:return ze(x,H0),MI(x,g0,rx);case 1:return ze(x,A0),MI(x,C0,fy(1,L0));case 2:return ze(x,ex),yy(x,t0);default:return ze(x,Q0),Ql(x,U0)}}function Br(x){return function(r){var e=r[1],t=0;return Ur(function(u){return ze(x,u),0},t,e)}}for(;;){var $X=oI[1],iS0=[0,1];if(!(1-sI(oI,$X,function(x,r){return function(e){return sI(x,1,0)&&(Fl(nS0,0),Fl(uS0,0)),l(r,0)}}(iS0,$X)))){var fS0=2,cS0=function(x){var r=[0,0],e=Xx(x)-1|0,t=0;if(e>=0)for(var u=t;;){var i=O1(x,u);r[1]=(l8*r[1]|0)+i|0;var f=u+1|0;if(e!==u){var u=f;continue}break}r[1]=r[1]&nD;var o=1073741823=0)for(var f=i;;){var o=(f*2|0)+3|0,a=W1(x,f)[1+f];W1(e,o)[1+o]=a;var d=f+1|0;if(u!==f){var f=d;continue}break}return[0,fS0,e,Yv[1],Io[1],0,0,Fs[1],0]},jI=function(x,r){var e=x[2].length-1,t=e=0&&(u.length-1-e|0)>=0&&(hZ(i,0,u,0,e),f=1),f||m2(JW),x[2]=u;var o=0}else var o=t;return o},qX=[0,0],oS0=[0,0],UI=function(x){var r=x[2].length-1;return jI(x,r+1|0),r},Hl=function(x,r){try{var e=p(Yv[28],r,x[3]);return e}catch(i){var t=L1(i);if(t!==P2)throw q0(t,0);var u=UI(x);return x[3]=G0(Yv[4],r,u,x[3]),x[4]=G0(Io[4],u,1,x[4]),u}},BI=function(x,r){return cy(function(e){return Hl(x,e)},r)},GX=function(x,r,e){return oS0[1]++,p(Io[28],r,x[4])?(jI(x,r+1|0),W1(x[2],r)[1+r]=e,0):(x[6]=[0,[0,r,e],x[6]],0)},YI=function(x){if(x===0)return 0;for(var r=x.length-1-1|0,e=0;;){if(0>r)return e;var t=[0,x[1+r],e],r=r-1|0,e=t}},XI=function(x,r){try{var e=p(Fs[28],r,x[7]);return e}catch(i){var t=L1(i);if(t!==P2)throw q0(t,0);var u=x[1];return x[1]=u+1|0,P(r,hx)&&(x[7]=G0(Fs[4],r,u,x[7])),u}},JI=function(x){return Nl(x,0)?[0]:x},VI=function(x,r,e,t,u,i){var f=u[2],o=u[4],a=YI(r),d=YI(e),k=YI(t),T=_n(function(o0){return Hl(x,o0)},d),g=_n(function(o0){return Hl(x,o0)},k);x[5]=[0,[0,x[3],x[4],x[6],x[7],T,a],x[5]];var A=Fs[1],N=x[7];function R(o0,c0,T0){return pI(o0,a)?G0(Fs[4],o0,c0,T0):T0}x[7]=G0(Fs[13],R,N,A);var I=[0,Yv[1]],M=[0,Io[1]];vX(function(o0,c0){I[1]=G0(Yv[4],o0,c0,I[1]);var T0=M[1];try{var E0=p(Io[28],c0,x[4]),M0=E0}catch(rx){var Y0=L1(rx);if(Y0!==P2)throw q0(Y0,0);var M0=1}return M[1]=G0(Io[4],c0,M0,T0),0},k,g),vX(function(o0,c0){return I[1]=G0(Yv[4],o0,c0,I[1]),M[1]=G0(Io[4],c0,0,M[1]),0},d,T),x[3]=I[1],x[4]=M[1];var L=0,z=x[6];x[6]=aI(function(o0,c0){return pI(o0[1],T)?c0:[0,o0,c0]},z,L);var V=i?p(f,x,o):l(f,x),Z=Yl(x[5]),$=Z[6],i0=Z[5],U=Z[4],J=Z[3],Y=Z[2],F=Z[1];x[5]=oX(x[5]),x[7]=r2(function(o0,c0){var T0=p(Fs[28],c0,x[7]);return G0(Fs[4],c0,T0,o0)},U,$),x[3]=F,x[4]=Y;var n0=x[6];x[6]=aI(function(o0,c0){return pI(o0[1],i0)?c0:[0,o0,c0]},n0,J);var Q=0,f0=JI(t),s0=[0,cy(function(o0){var c0=Hl(x,o0);try{for(var T0=x[6];;){if(!T0)throw q0(P2,1);var E0=T0[1],M0=T0[2],Y0=E0[2];if(VY(E0[1],c0)===0)return Y0;var T0=M0}}catch(g0){var rx=L1(g0);if(rx===P2)return W1(x[2],c0)[1+c0];throw q0(rx,0)}},f0),Q],v0=JI(r);return _Z([0,[0,V],[0,cy(function(o0){try{var c0=p(Fs[28],o0,x[7]);return c0}catch(E0){var T0=L1(E0);throw T0===P2?q0([0,wr,xH],1):q0(T0,0)}},v0),s0]])},my=function(x,r){if(x===0)var e=HX([0]);else{var t=HX(cy(cS0,x)),u=x.length-1-1|0,i=0;if(u>=0)for(var f=i;;){var o=(f*2|0)+2|0;t[3]=G0(Yv[4],x[1+f],o,t[3]),t[4]=G0(Io[4],o,1,t[4]);var a=f+1|0;if(u!==f){var f=a;continue}break}var e=t}var d=l(r,e);return qX[1]=(qX[1]+e[1]|0)-1|0,e[8]=Ax(e[8]),jI(e,3+((W1(e[2],1)[2]*16|0)/32|0)|0),[0,l(d,0),r,d,0]},ky=function(x,r){if(x)return x;var e=tI(qr,r[1]);return e[1]=r[2],aW(e)},zI=function(x,r,e){if(x)return r;var t=e[8];if(t!==0)for(var u=t;;){if(u){var i=u[2];l(u[1],r);var u=i;continue}break}return r},hy=function(x){var r=UI(x),e=0;if(r%2|0&&(2+((W1(x[2],1)[2]*16|0)/32|0)|0)>=r){var t=UI(x);e=1}if(!e)var t=r;return W1(x[2],t)[1+t]=0,t},KI=function(x,r){for(var e=[0,0],t=r.length-1;;){if(e[1]>=t)return 0;var u=e[1],i=W1(r,u)[1+u],f=function(kx){e[1]++;var V0=e[1];return W1(r,V0)[1+V0]},o=f(0);if(typeof o=="number")switch(o){case 0:var a=f(0),b0=function(V0){return function(h){return V0}}(a);break;case 1:var d=f(0),b0=function(V0){return function(h){return h[1+V0]}}(d);break;case 2:var k=f(0),T=f(0),b0=function(V0,h){return function(X){return X[1+V0][1+h]}}(k,T);break;case 3:var g=f(0),b0=function(V0){return function(h){return l(h[1][1+V0],h)}}(g);break;case 4:var A=f(0),b0=function(V0){return function(h,X){return h[1+V0]=X,0}}(A);break;case 5:var N=f(0),R=f(0),b0=function(V0,h){return function(X){return l(V0,h)}}(N,R);break;case 6:var I=f(0),M=f(0),b0=function(V0,h){return function(X){return l(V0,X[1+h])}}(I,M);break;case 7:var L=f(0),z=f(0),V=f(0),b0=function(V0,h,X){return function(W0){return l(V0,W0[1+h][1+X])}}(L,z,V);break;case 8:var Z=f(0),$=f(0),b0=function(V0,h){return function(X){return l(V0,l(X[1][1+h],X))}}(Z,$);break;case 9:var i0=f(0),U=f(0),J=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,X)}}(i0,U,J);break;case 10:var Y=f(0),F=f(0),n0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,W0[1+X])}}(Y,F,n0);break;case 11:var Q=f(0),f0=f(0),s0=f(0),v0=f(0),b0=function(V0,h,X,W0){return function(sx){return p(V0,h,sx[1+X][1+W0])}}(Q,f0,s0,v0);break;case 12:var o0=f(0),c0=f(0),T0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,l(W0[1][1+X],W0))}}(o0,c0,T0);break;case 13:var E0=f(0),M0=f(0),Y0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,W0[1+h],X)}}(E0,M0,Y0);break;case 14:var rx=f(0),g0=f(0),H0=f(0),t0=f(0),b0=function(V0,h,X,W0){return function(sx){return p(V0,sx[1+h][1+X],W0)}}(rx,g0,H0,t0);break;case 15:var ex=f(0),xx=f(0),ax=f(0),b0=function(V0,h,X){return function(W0){return p(V0,l(W0[1][1+h],W0),X)}}(ex,xx,ax);break;case 16:var dx=f(0),mx=f(0),b0=function(V0,h){return function(X){return p(X[1][1+V0],X,h)}}(dx,mx);break;case 17:var L0=f(0),C0=f(0),b0=function(V0,h){return function(X){return p(X[1][1+V0],X,X[1+h])}}(L0,C0);break;case 18:var A0=f(0),U0=f(0),Q0=f(0),b0=function(V0,h,X){return function(W0){return p(W0[1][1+V0],W0,W0[1+h][1+X])}}(A0,U0,Q0);break;case 19:var H=f(0),b=f(0),b0=function(V0,h){return function(X){var W0=l(X[1][1+h],X);return p(X[1][1+V0],X,W0)}}(H,b);break;case 20:var B=f(0),a0=f(0);hy(x);var b0=function(V0,h){return function(X){return l(Gx(h,V0,0),h)}}(B,a0);break;case 21:var m0=f(0),P0=f(0);hy(x);var b0=function(V0,h){return function(X){var W0=X[1+h];return l(Gx(W0,V0,0),W0)}}(m0,P0);break;case 22:var D=f(0),N0=f(0),X0=f(0);hy(x);var b0=function(V0,h,X){return function(W0){var sx=W0[1+h][1+X];return l(Gx(sx,V0,0),sx)}}(D,N0,X0);break;default:var D0=f(0),ox=f(0);hy(x);var b0=function(V0,h){return function(X){var W0=l(X[1][1+h],X);return l(Gx(W0,V0,0),W0)}}(D0,ox)}else var b0=o;GX(x,i,b0),e[1]++}},bX=function(x,r){var e=r.length-1,t=tI(0,e),u=e-1|0,i=0;if(u>=0)for(var f=i;;){var o=W1(r,f)[1+f];if(typeof o=="number")switch(o){case 0:var k=function(A){function N(R){var I=t[1+A];if(N===I)throw q0([0,Dl,x],1);return l(I,R)}return N}(f);break;case 1:var a=[];I0(a,[el,function(A,N){return function(R){var I=t[1+N];if(A===I)throw q0([0,Dl,x],1);var M=Dv(I);if(Ya===M)return I[1];if(el!==M)return I;var L=I[1];I[1]=XT0;try{var z=l(L,0);return oW(I,z),z}catch(Z){var V=L1(Z);throw I[1]=function($){throw q0(V,0)},q0(V,0)}}}(a,f)]);var k=a;break;default:var d=function(A){throw q0([0,Dl,x],1)},k=[0,d,d,d,0]}else var k=o[0]===0?bX(x,o[1]):o[1];t[1+f]=k;var T=f+1|0;if(u!==f){var f=T;continue}break}return t},xJ=function(x,r,e){if(Dv(e)===0&&x.length-1<=e.length-1){var t=x.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var f=e[1+i],o=W1(x,i)[1+i];if(typeof o=="number")if(o===2){var a=0;if(Dv(f)===0&&f.length-1===4)for(var d=0,k=r[1+i];;){k[1+d]=f[1+d];var T=d+1|0;if(d!==3){var d=T;continue}break}else a=1;if(a)throw q0([0,wr,rH],1)}else r[1+i]=f;else o[0]===0&&xJ(o[1],r[1+i],f);var g=i+1|0;if(t!==i){var i=g;continue}break}return 0}throw q0([0,wr,eH],1)};try{xX("TMPDIR")}catch(x){var rJ=L1(x);if(rJ!==P2)throw q0(rJ,0)}try{xX("TEMP")}catch(x){var eJ=L1(x);if(eJ!==P2)throw q0(eJ,0)}P(cX,UB)&&P(cX,"Win32");var is=function(x,r){function e(t){return lt(x,t)}return fl<=r?(e(Ta|r>>>18|0),e(h1|(r>>>12|0)&63),e(h1|(r>>>6|0)&63),e(h1|r&63)):_N<=r?(e(Pa|r>>>12|0),e(h1|(r>>>6|0)&63),e(h1|r&63)):h1<=r?(e(_a|r>>>6|0),e(h1|r&63)):e(r)},Oo=[qr,uH,Js(0)],tJ=0,nJ=0,uJ=0,iJ=0,fJ=0,cJ=0,sJ=0,oJ=0,vJ=0,aJ=0,m=function(x){if(x[3]===x[2])return-1;var r=x[1][1+x[3]];return x[3]=x[3]+1|0,r===10&&(x[5]!==0&&(x[5]=x[5]+1|0),x[4]=x[3]),r},r0=function(x,r){return x[9]=x[3],x[10]=x[4],x[11]=x[5],x[12]=r,0},yr=function(x){return x[6]=x[3],x[7]=x[4],x[8]=x[5],r0(x,-1)},_=function(x){return x[3]=x[9],x[4]=x[10],x[5]=x[11],x[12]},Ga=function(x){return x[3]=x[6],x[4]=x[7],x[5]=x[8],0},ZI=function(x,r){return x[6]=r,0},_y=function(x){return x[3]-x[6]|0},t1=function(x){var r=x[3]-x[6]|0,e=x[6],t=x[1];return 0<=e&&0<=r&&(t.length-1-r|0)>=e?wZ(t,e,r):m2(VW)},lJ=function(x){var r=x[6];return W1(x[1],r)[1+r]},ql=function(x,r,e,t){for(var u=[0,r],i=[0,e],f=[0,0];;){if(0>=i[1])return f[1];var o=x[1+u[1]];if(0>o)throw q0(Oo,1);if(Xr>>18|0),Kr(t,f[1]+1|0,h1|(o>>>12|0)&63),Kr(t,f[1]+2|0,h1|(o>>>6|0)&63),Kr(t,f[1]+3|0,h1|o&63),f[1]=f[1]+4|0}else Kr(t,f[1],Pa|o>>>12|0),Kr(t,f[1]+1|0,h1|(o>>>6|0)&63),Kr(t,f[1]+2|0,h1|o&63),f[1]=f[1]+3|0;else Kr(t,f[1],_a|o>>>6|0),Kr(t,f[1]+1|0,h1|o&63),f[1]=f[1]+2|0;else Kr(t,f[1],o),f[1]++;u[1]++,i[1]+=-1}},pJ=function(x){for(var r=Xx(x),e=za(r,0),t=[0,0],u=[0,0];;){if(t[1]>=r)return[0,e,u[1],aJ,vJ,oJ,sJ,cJ,fJ,iJ,uJ,nJ,tJ];var i=fx(x,t[1]),f=0;if(_a<=i)if(Ta<=i)if(qr<=i)f=1;else{var o=fx(x,t[1]+1|0),a=fx(x,t[1]+2|0),d=fx(x,t[1]+3|0),k=(o>>>6|0)!==2?1:0;if(k)var g=k;else var T=(a>>>6|0)!==2?1:0,g=T||((d>>>6|0)!==2?1:0);if(g)throw q0(Oo,1);var A=(i&7)<<18|(o&63)<<12|(a&63)<<6|d&63;if(_5>>6|0)!==2?1:0,L=M||((R>>>6|0)!==2?1:0);if(L)var V=L;else var z=55296<=I?1:0,V=z&&(I<=57343?1:0);if(V)throw q0(Oo,1);e[1+u[1]]=I,t[1]=t[1]+3|0}else{var Z=fx(x,t[1]+1|0);if((Z>>>6|0)!==2)throw q0(Oo,1);e[1+u[1]]=(i&31)<<6|Z&63,t[1]=t[1]+2|0}else h1<=i?f=1:(e[1+u[1]]=i,t[1]++);if(f)throw q0(Oo,1);u[1]++}},Gl=function(x,r,e){var t=x[6]+r|0,u=S1(e*4|0),i=x[1];if((t+e|0)<=i.length-1)return Wa(u,0,ql(i,t,e,u));throw q0([0,wr,nH],1)},Jx=function(x){var r=x[6],e=x[3]-r|0,t=S1(e*4|0);return Wa(t,0,ql(x[1],r,e,t))},wy=function(x,r){var e=x[6],t=x[3]-e|0,u=S1(t*4|0);return hI(r,u,0,ql(x[1],e,t,u))},bl=function(x){var r=x.length-1,e=S1(r*4|0);return Wa(e,0,ql(x,0,r,e))},dJ=function(x,r){return x[3]=x[3]-r|0,0},fs=function(x){return typeof x=="number"?0:x[0]===0?1:x[1]},Xv=function(x,r,e,t){var u=fs(x),i=fs(t),f=i<=u?u+1|0:i+1|0;return f===1?[0,r,e]:[1,f,r,e,x,t]},Ty=function(x,r,e,t){var u=fs(x),i=fs(t),f=i<=u?u+1|0:i+1|0;return[1,f,r,e,x,t]},yJ=function(x,r,e,t){var u=fs(x),i=fs(t);if((i+2|0)=i)return Xv(x,r,e,t);var R=t[5],I=t[4],M=t[3],L=t[2],z=fs(I);if(z<=fs(R))return Ty(Xv(x,r,e,I),L,M,R);var V=I[4],Z=I[3],$=I[2],i0=Xv(I[5],L,M,R);return Ty(Xv(x,r,e,V),$,Z,i0)},vS0=0,ba=function(x,r){for(var e=x,t=r;;){if(typeof e=="number")return t;if(e[0]===0)return[0,e[1],0,t];var u=[0,e[2],e[4],t],e=e[3],t=u}},mJ=function(x,r){if(!x)return 0;var e=x[1],t=ba(x[2],x[3]);return[0,e,function(u){return mJ(t,u)}]},aS0=function(x){var r=ba(x,0);return function(e){return mJ(r,e)}},Hs=function(x){return typeof x=="number"?0:x[0]===0?1:x[1]},lS0=function(x){return[0,x]},Ke=function(x,r,e){var t=0;if(typeof x=="number"){if(typeof e=="number")return[0,r];e[0]===1&&(t=1)}else if(x[0]===0)typeof e!="number"&&e[0]===1&&(t=1);else{var u=x[1];if(typeof e!="number"&&e[0]===1){var i=e[1],f=i<=u?u+1|0:i+1|0;return[1,f,r,x,e]}var o=u;t=2}switch(t){case 1:var o=e[1];break;case 0:return[1,2,r,x,e]}return[1,o+1|0,r,x,e]},Lo=function(x,r,e){var t=Hs(x),u=Hs(e),i=u<=t?t+1|0:u+1|0;return[1,i,r,x,e]},Sy=function(x,r){if(r===0)return 0;if(r===1)return[0,l(x,0)];var e=r>>>1|0,t=Sy(x,e),u=l(x,0),i=Sy(x,(r-e|0)-1|0);return[1,Hs(t)+1|0,u,t,i]},pS0=function(x){var r=[0,0],e=x.length-1;return Sy(function(t){var u=r[1],i=W1(x,u)[1+u];return r[1]++,i},e)},Jt=function(x,r,e){var t=Hs(x),u=Hs(e);if((u+2|0)=u)return Ke(x,r,e);var g=e[4],A=e[3],N=e[2],R=Hs(A);if(R<=Hs(g))return Lo(Ke(x,r,A),N,g);var I=A[3],M=A[2],L=Ke(A[4],N,g);return Lo(Ke(x,r,I),M,L)},kJ=function(x,r){if(typeof r=="number")return[0,x];if(r[0]===0)return Ke([0,x],r[1],0);var e=r[4],t=r[2];return Jt(kJ(x,r[3]),t,e)},hJ=function(x,r){if(typeof r=="number")return[0,x];if(r[0]===0)return Ke(0,r[1],[0,x]);var e=r[3],t=r[2];return Jt(e,t,hJ(x,r[4]))},V2=function(x,r,e){if(typeof x=="number")return kJ(r,e);if(x[0]===0){if(typeof e!="number"){if(e[0]===0)return Ke(x,r,e);var t=e[4],u=e[3],i=e[2];return 3>1,h=T0(V0,H0),X=h[1],W0=T0(g0-V0|0,h[2]),sx=X,tx=W0[1],j0=0,Px=W0[2];;){if(sx){if(tx){var Ex=tx[2],Ox=tx[1],qx=sx[2],B0=sx[1],rr=p(o0,B0,Ox);if(rr===0){var sx=qx,tx=Ex,j0=[0,B0,j0];continue}if(0>1,h=c0(V0,H0),X=h[1],W0=c0(g0-V0|0,h[2]),sx=X,tx=W0[1],j0=0,Px=W0[2];;){if(sx){if(tx){var Ex=tx[2],Ox=tx[1],qx=sx[2],B0=sx[1],rr=p(o0,B0,Ox);if(rr===0){var sx=qx,tx=Ex,j0=[0,B0,j0];continue}if(0<=rr){var tx=Ex,j0=[0,Ox,j0];continue}var sx=qx,j0=[0,B0,j0];continue}var Ux=us(sx,j0)}else var Ux=us(tx,j0);return[0,Ux,Px]}},E0=ns(U),M0=2<=E0?c0(E0,U)[1]:U,Y0=function(g0,H0){if(3>=g0>>>0)switch(g0){case 0:return[0,0,H0];case 1:if(H0)return[0,[0,H0[1]],H0[2]];break;case 2:if(H0){var t0=H0[2];if(t0)return[0,[1,2,t0[1],[0,H0[1]],0],t0[2]]}break;default:if(H0){var ex=H0[2];if(ex){var xx=ex[2];if(xx)return[0,[1,2,ex[1],[0,H0[1]],[0,xx[1]]],xx[2]]}}}var ax=g0/2|0,dx=Y0(ax,H0),mx=dx[2],L0=dx[1];if(!mx)throw q0([0,wr,aH],1);var C0=mx[1],A0=Y0((g0-ax|0)-1|0,mx[2]),U0=A0[2];return[0,Lo(L0,C0,A0[1]),U0]};return Y0(ns(M0),M0)[1]}var rx=s0[1];return r(rx,r(v0,r(f0,r(n0,[0,Y]))))}function i0(U,J,Y){l(Br(J),cH);var F=SJ(Y);F&&l(Br(J),sH);var n0=0;return r2(function(Q,f0){return Q&&l(Br(J),fH),p(U,J,f0),1},n0,F),F&&l(Br(J),oH),l(Br(J),vH)}return[0,n1,QI,t,r,lS0,u,i,f,a,d,k,T,g,A,Z,N,R,I,M,L,$I,SJ,x6,_J,wJ,dS0,x6,_J,z,V,aS0,$,i0,Sy,pS0,function(U,J){for(var Y=J;;){if(typeof Y=="number")return 0;if(Y[0]===0){var F=Y[1];return l(U,F)?[0,F]:0}var n0=Y[2],Q=Y[4],f0=Y[3];if(!l(U,n0)){var Y=Q;continue}for(var s0=n0,v0=f0;;){if(typeof v0=="number")return[0,s0];if(v0[0]===0){var o0=v0[1];return l(U,o0)?[0,o0]:[0,s0]}var c0=v0[2],T0=v0[4],E0=v0[3];if(l(U,c0)){var s0=c0,v0=E0;continue}var v0=T0}}}]},gJ=function(x){switch(x[0]){case 0:return 1;case 1:return 2;case 2:return 2;default:return 3}},Vx=function(x,r){if(!r)return r;var e=r[1],t=l(x,e);return e===t?r:[0,t]},cx=function(x,r,e,t,u){var i=p(x,r,e);return e===i?t:l(u,i)},$0=function(x,r,e,t){var u=l(x,r);return r===u?e:l(t,u)},t2=function(x,r){var e=r[1],t=r[2];return cx(x,e,t,r,function(u){return[0,e,u]})},AJ=function(x,r){return Vx(function(e){var t=e[1],u=e[2];return cx(x,t,u,e,function(i){return[0,t,i]})},r)},Sr=function(x,r){var e=r2(function(u,i){var f=u[2],o=u[1],a=l(x,i),d=f||(a!==i?1:0);return[0,[0,a,o],d]},VH,r),t=e[1];return e[2]?Ax(t):r},FI=my(KH,function(x){var r=BI(x,zH),e=r[1],t=r[2],u=r[3],i=r[4],f=r[5],o=r[6],a=r[7],d=r[8],k=r[9],T=r[10],g=r[11],A=r[12],N=r[13],R=r[14],I=r[15],M=r[16],L=r[17],z=r[18],V=r[19],Z=r[20],$=r[21],i0=r[22],U=r[23],J=r[24],Y=r[25],F=r[26],n0=r[27],Q=r[28],f0=r[29],s0=r[30],v0=r[31],o0=r[32],c0=r[33],T0=r[34],E0=r[35],M0=r[36],Y0=r[37],rx=r[38],g0=r[39],H0=r[40],t0=r[41],ex=r[42],xx=r[43],ax=r[44],dx=r[45],mx=r[46],L0=r[47],C0=r[48],A0=r[49],U0=r[50],Q0=r[51],H=r[52],b=r[53],B=r[54],a0=r[55],m0=r[56],P0=r[57],D=r[59],N0=r[60],X0=r[61],D0=r[62],ox=r[63],b0=r[64],kx=r[65],V0=r[66],h=r[67],X=r[68],W0=r[69],sx=r[70],tx=r[71],j0=r[72],Px=r[73],Ex=r[74],Ox=r[75],qx=r[76],B0=r[77],rr=r[78],Ux=r[79],K0=r[80],nr=r[81],z0=r[82],or=r[83],jr=r[84],lx=r[85],v1=r[86],K1=r[87],w1=r[88],Cr=r[89],u2=r[90],w=r[91],x0=r[92],e0=r[93],S0=r[94],G=r[95],k0=r[96],J0=r[97],O0=r[98],ix=r[99],Wx=r[ot],Bx=r[It],Hx=r[Zf],$x=r[nn],er=r[jt],Zx=r[ct],Lr=r[c2],Yx=r[xe],ie=r[sn],Ft=r[To],E2=r[B1],We=r[Ot],fo=r[D2],gn=r[Nr],ds=r[st],me=r[Eo],An=r[Ri],Ht=r[dv],$e=r[ma],qt=r[Ca],dr=r[Lf],mt=r[il],Qo=r[br],ke=r[Lt],Pn=r[Da],co=r[Di],Fo=r[K4],so=r[Xr],oo=r[h1],l2=r[wl],ys=r[ud],he=r[Ep],Cn=r[eN],Ho=r[iD],bv=r[YU],xa=r[hY],vo=r[$j],ms=r[VD],kt=r[Bw],qo=r[Rj],Go=r[TB],ao=r[rU],ra=r[mj],ea=r[KU],ks=r[LB],ta=r[ej],lo=r[146],bo=r[147],xv=r[148],Nn=r[IU],rv=r[fU],$9=r[151],k3=r[152],Q9=r[153],U6=r[154],B6=r[155],Y6=r[156],X6=r[157],h3=r[158],F9=r[159],H9=r[eU],na=r[yE],_3=r[qj],q9=r[KB],G9=r[Nj],j1=r[yN],ev=r[zj],po=r[cB],ua=r[YT],q=r[p5],C=r[G4],j=r[Xk],h0=r[Zj],R0=r[JU],nx=r[pY],Sx=r[lD],Dx=r[AT],jx=r[RD],bx=r[dB],hr=r[QM],cr=r[bj],lr=r[DR],kr=r[ih],sr=r[mN],Er=r[id],Wr=r[aj],Vr=r[Lp],x1=r[fg],Ir=r[AU],r1=r[BS],a1=r[ND],T1=r[lU],l1=r[_a],u1=r[FD],i1=r[Ah],p1=r[$D],P1=r[XU],Q1=r[SD],p2=r[cY],Hr=r[_U],Kx=r[OR],Yr=r[GM],Mr=r[yB],Dr=r[nY],$r=r[tj],I1=r[FB],Qe=r[bT],Fe=r[kY],zr=r[SB],i2=r[DD],Gt=r[oY],He=r[bD],U1=r[lE],F1=r[WM],W2=r[sB],_e=r[DT],bt=r[xN],we=r[VU],Te=r[HB],ht=r[lB],Se=r[DU],$2=r[nU],Ee=r[tD],Q2=r[l8],ge=r[Pa],_t=r[LU],wt=r[Wj],g2=r[vY],L2=r[MU],F2=r[CB],Rn=r[Xj],In=r[pU],xn=r[_Y],Tt=r[Oj],rn=r[SY],On=r[JB],Ae=r[xY],qe=r[ZU],M2=r[ST],Ln=r[H8],St=r[Ta],Et=r[KM],gt=r[EB],hs=r[qU],Mn=r[DC],H2=r[ES],Ge=r[el],Dn=r[b8],jn=r[qr],_s=r[dk],tv=r[Ya],ia=r[Bg],w3=r[Av],yo=r[vg],mo=r[La],T3=r[Q3],S3=r[q3],E3=r[nj],ko=r[wg],nv=r[qD],fa=r[260],g3=r[zM],Un=r[262],A3=r[263],Bn=r[264],P3=r[265],C3=r[iB],ca=r[tY],uv=r[268],N3=r[269],R3=r[270],iv=r[tr],At=r[272],ws=r[la],sa=r[274],oa=r[275],I3=r[276],en=r[kU],Pe=r[278],Ts=r[279],Yn=r[uY],tn=r[uD],Ce=r[RB],ho=r[gU],O3=r[284],L3=r[285],M3=r[PU],D3=r[287],fe=r[bB],fv=r[IB],j3=r[58];function b9(n,s,c){var v=c[2],y=c[1],S=c[4],E=c[3],O=Vx(l(n[1][1+Kx],n),y),W=p(n[1][1+t0],n,v);return v===W&&y===O?c:[0,O,W,E,S]}function JL(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+Pe],n,E),W=Vx(l(n[1][1+L],n),S),d0=p(n[1][1+Q],n,y),w0=p(n[1][1+t0],n,v);return E===O&&y===d0&&S===W&&v===w0?c:[0,O,W,d0,w0]}function VL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function zL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+N0],n,S),O=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function KL(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],O=G0(n[1][1+o],n,s,S),W=Vx(l(n[1][1+Kx],n),y);return S===O&&y===W?c:[0,E,[0,O,W]]}function ZL(n,s,c){var v=c[3],y=c[2],S=c[1],E=Sr(p(n[1][1+a],n,y),S),O=p(n[1][1+t0],n,v);return S===E&&v===O?c:[0,E,y,O]}function WL(n,s,c){var v=c[4],y=c[2],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],S,c[3],E]}function $L(n,s,c){var v=c[3],y=c[2],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],S,E]}function QL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S);if(y)var O=y[1],W=p(n[1][1+Q],n,O),d0=O===W?y:[0,W],w0=d0;else var w0=y;var F0=p(n[1][1+t0],n,v);return E===S&&F0===v?c:[0,E,w0,F0]}function FL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=p(n[1][1+F],n,y),W=p(n[1][1+t0],n,v);return E===S&&O===y&&W===v?c:[0,E,O,W]}function HL(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=t2(l(n[1][1+en],n),E);if(S)var W=S[1],d0=W[1],w0=W[2],F0=function(m1){return[0,[0,d0,m1]]},vx=cx(l(n[1][1+N3],n),d0,w0,S,F0);else var vx=S;if(y)var Lx=y[1],_x=Lx[1],_r=Lx[2],f1=function(m1){return[0,[0,_x,m1]]},c1=cx(l(n[1][1+en],n),_x,_r,y,f1);else var c1=y;var y1=p(n[1][1+t0],n,v);return E===O&&S===vx&&y===c1&&v===y1?c:[0,O,vx,c1,y1]}function qL(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function GL(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function bL(n,s){return s}function xM(n,s,c){var v=c[3],y=c[2],S=c[1],E=Sr(l(n[1][1+rx],n),S),O=Sr(l(n[1][1+Kx],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function U3(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=t2(l(n[1][1+g0],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function xm(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],O=Vx(l(n[1][1+Kx],n),S),W=p(n[1][1+L0],n,y),d0=p(n[1][1+t0],n,v);return S===O&&y===W&&v===d0?s:[0,E,[0,O,W,d0]]}function rM(n,s,c){var v=c[3],y=c[2],S=c[1],E=c[4],O=p(n[1][1+Kx],n,S),W=Sr(l(n[1][1+xx],n),y),d0=p(n[1][1+t0],n,v);return S===O&&y===W&&v===d0?c:[0,O,W,d0,E]}function eM(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function tM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function rm(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function em(n,s){return[0,p(n[1][1+A0],n,s),0]}function nM(n,s){var c=l(n[1][1+C0],n),v=r2(function(S,E){var O=S[2],W=S[1],d0=l(c,E);if(!d0)return[0,W,1];if(d0[2])return[0,us(d0,W),1];var w0=d0[1],F0=O||(E!==w0?1:0);return[0,[0,w0,W],F0]},JH,s),y=v[1];return v[2]?Ax(y):s}function va(n,s){return p(n[1][1+L0],n,s)}function tm(n,s,c){var v=c[2],y=c[1],S=Sr(l(n[1][1+Kx],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function nm(n,s,c){var v=c[2],y=c[1],S=c[3],E=Vx(l(n[1][1+Kx],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?c:[0,E,O,S]}function uM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+bx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function iM(n,s){var c=s[2],v=c[3],y=c[2],S=y[2],E=y[1],O=c[1],W=s[1],d0=p(n[1][1+j1],n,E),w0=Vx(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return d0===E&&w0===S&&F0===v?s:[0,W,[0,O,[0,d0,w0],F0]]}function fM(n,s){var c=s[2],v=s[1],y=p(n[1][1+i0],n,c);return Nl(y,c)?s:[0,v,y]}function J6(n,s){return p(n[1][1+Kx],n,s)}function cM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1];if(y)var E=y[1],O=function(w0){return[0,w0]},W=$0(l(n[1][1+Kx],n),E,y,O);else var W=y;var d0=p(n[1][1+t0],n,v);return y===W&&v===d0?s:[0,S,[0,W,d0]]}function um(n,s){return p(n[1][1+Kx],n,s)}function sM(n,s,c){return G0(n[1][1+or],n,s,c)}function im(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],O=G0(n[1][1+rr],n,s,S),W=p(n[1][1+t0],n,y);return O===S&&y===W?c:[0,E,[0,O,W]]}function V6(n,s,c){return G0(n[1][1+or],n,s,c)}function fm(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],O=G0(n[1][1+K0],n,s,S),W=p(n[1][1+Q2],n,y);return S===O&&y===W?c:[0,E,[0,O,W]]}function oM(n,s,c){switch(c[0]){case 0:var v=c[1],y=function(O){return[0,O]};return $0(p(n[1][1+nr],n,s),v,c,y);case 1:var S=c[1],E=function(O){return[1,O]};return $0(p(n[1][1+Ux],n,s),S,c,E);default:return c}}function cm(n,s,c){return G0(n[1][1+or],n,s,c)}function z6(n,s,c){return G0(n[1][1+or],n,s,c)}function vM(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],O=G0(n[1][1+ox],n,s,S),W=p(n[1][1+t0],n,y);return O===S&&y===W?c:[0,E,[0,O,W]]}function K6(n,s,c){return p(n[1][1+Ln],n,c)}function aM(n,s,c){return G0(n[1][1+Ox],n,s,c)}function lM(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+B0],n,s),v,y,c,S)}function pM(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+Ex],n,s),v,y,c,S)}function sm(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+D0],n,s),v,y,c,S)}function dM(n,s,c){switch(c[0]){case 0:var v=c[1],y=function(Lx){return[0,Lx]};return $0(p(n[1][1+kx],n,s),v,c,y);case 1:var S=c[1],E=function(Lx){return[1,Lx]};return $0(p(n[1][1+h],n,s),S,c,E);case 2:var O=c[1],W=function(Lx){return[2,Lx]};return $0(p(n[1][1+tx],n,s),O,c,W);case 3:var d0=c[1],w0=function(Lx){return[3,Lx]};return $0(p(n[1][1+W0],n,s),d0,c,w0);default:var F0=c[1],vx=function(Lx){return[4,Lx]};return $0(p(n[1][1+sx],n,s),F0,c,vx)}}function Z6(n,s,c){var v=c[2],y=v[4],S=v[3],E=v[2],O=v[1],W=c[1],d0=G0(n[1][1+X],n,s,O),w0=G0(n[1][1+V0],n,s,E),F0=p(n[1][1+Q2],n,S);if(y){var vx=0;if(d0[0]===3){var Lx=w0[2];if(Lx[0]===2)var _r=Ar(d0[1][2][1],Lx[1][1][2][1]);else vx=1}else vx=1;if(vx)var _x=O===d0?1:0,_r=_x&&(E===w0?1:0)}else var _r=y;return d0===O&&w0===E&&F0===S&&y===_r?c:[0,W,[0,d0,w0,F0,_r]]}function yM(n,s,c){if(c[0]===0){var v=c[1],y=function(O){return[0,O]};return $0(p(n[1][1+j0],n,s),v,c,y)}var S=c[1];function E(O){return[1,O]}return $0(p(n[1][1+b0],n,s),S,c,E)}function mM(n,s,c,v){return G0(n[1][1+tn],n,c,v)}function kM(n,s,c,v){return G0(n[1][1+Yx],n,c,v)}function om(n,s,c,v){return G0(n[1][1+mx],n,c,v)}function hM(n,s,c){return p(n[1][1+j1],n,c)}function B3(n,s,c){var v=c[2],y=c[1];switch(v[0]){case 0:var S=v[1],E=S[3],O=S[2],W=S[1],d0=Sr(p(n[1][1+Px],n,s),W),w0=p(n[1][1+Y],n,O),F0=p(n[1][1+t0],n,E),vx=0;if(d0===W&&w0===O&&F0===E){var Lx=v;vx=1}if(!vx)var Lx=[0,[0,d0,w0,F0]];var it=Lx;break;case 1:var _x=v[1],_r=_x[3],f1=_x[2],c1=_x[1],y1=Sr(p(n[1][1+z0],n,s),c1),m1=p(n[1][1+Y],n,f1),be=p(n[1][1+t0],n,_r),xt=0;if(_r===be&&y1===c1&&m1===f1){var rt=v;xt=1}if(!xt)var rt=[1,[0,y1,m1,be]];var it=rt;break;case 2:var Ne=v[1],et=Ne[2],tt=Ne[1],Pt=Ne[3],nt=G0(n[1][1+Ox],n,s,tt),ut=p(n[1][1+Y],n,et),Xn=0;if(tt===nt&&et===ut){var Jn=v;Xn=1}if(!Xn)var Jn=[2,[0,nt,ut,Pt]];var it=Jn;break;default:var Ss=v[1],Es=function(gs){return[3,gs]},it=$0(l(n[1][1+qx],n),Ss,v,Es)}return v===it?c:[0,y,it]}function _M(n,s){return G0(n[1][1+or],n,0,s)}function wM(n,s,c){var v=s?s[1]:0;return G0(n[1][1+or],n,[0,v],c)}function TM(n,s){return p(n[1][1+Ce],n,s)}function SM(n,s){return p(n[1][1+Ce],n,s)}function EM(n,s){return G0(n[1][1+Ts],n,XH,s)}function W6(n,s,c){return G0(n[1][1+Ts],n,[0,s],c)}function gM(n,s){return G0(n[1][1+Ts],n,YH,s)}function AM(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=p(n[1][1+Pe],n,O),d0=Vx(l(n[1][1+L],n),E),w0=Vx(l(n[1][1+Q],n),S),F0=Vx(l(n[1][1+Q],n),y),vx=p(n[1][1+t0],n,v);return O===W&&S===w0&&E===d0&&S===w0&&y===F0&&v===vx?c:[0,W,d0,w0,F0,vx]}function PM(n,s){return p(n[1][1+Ln],n,s)}function $6(n,s){return p(n[1][1+j1],n,s)}function CM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+tn],n),c,v,s,y)}function NM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+Yx],n),c,v,s,y)}function RM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+mx],n),c,v,s,y)}function Q6(n,s){switch(s[0]){case 0:var c=s[1],v=function(_x){return[0,_x]};return $0(l(n[1][1+J0],n),c,s,v);case 1:var y=s[1],S=function(_x){return[1,_x]};return $0(l(n[1][1+O0],n),y,s,S);case 2:var E=s[1],O=function(_x){return[2,_x]};return $0(l(n[1][1+Bx],n),E,s,O);case 3:var W=s[1],d0=function(_x){return[3,_x]};return $0(l(n[1][1+ix],n),W,s,d0);case 4:var w0=s[1],F0=function(_x){return[4,_x]};return $0(l(n[1][1+D],n),w0,s,F0);default:var vx=s[1],Lx=function(_x){return[5,_x]};return $0(l(n[1][1+Wx],n),vx,s,Lx)}}function F6(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[3],S=c[2],E=c[1],O=p(n[1][1+Hx],n,E),W=p(n[1][1+Kx],n,S);if(y){var d0=0;if(O[0]===3){var w0=W[2];if(w0[0]===9)var vx=Ar(O[1][2][1],w0[1][2][1]);else d0=1}else d0=1;if(d0)var F0=E===O?1:0,vx=F0&&(S===W?1:0)}else var vx=y;return E===O&&S===W&&y===vx?s:[0,v,[0,O,W,vx]];case 1:var Lx=c[2],_x=c[1],_r=p(n[1][1+Hx],n,_x),f1=t2(l(n[1][1+lr],n),Lx);return _x===_r&&Lx===f1?s:[0,v,[1,_r,f1]];case 2:var c1=c[3],y1=c[2],m1=c[1],be=p(n[1][1+Hx],n,m1),xt=t2(l(n[1][1+lr],n),y1),rt=p(n[1][1+t0],n,c1);return m1===be&&y1===xt&&c1===rt?s:[0,v,[2,be,xt,rt]];default:var Ne=c[3],et=c[2],tt=c[1],Pt=p(n[1][1+Hx],n,tt),nt=t2(l(n[1][1+lr],n),et),ut=p(n[1][1+t0],n,Ne);return tt===Pt&&et===nt&&Ne===ut?s:[0,v,[3,Pt,nt,ut]]}}function Y3(n,s,c){var v=c[2],y=c[1],S=Sr(function(O){if(O[0]===0){var W=O[1],d0=p(n[1][1+G],n,W);return W===d0?O:[0,d0]}var w0=O[1],F0=p(n[1][1+U0],n,w0);return w0===F0?O:[1,F0]},y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function X3(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+Kx],n,E),W=Vx(l(n[1][1+iv],n),S),d0=Vx(l(n[1][1+fv],n),y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function vm(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+j1],n,S),O=p(n[1][1+j1],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function IM(n,s){return p(n[1][1+Kx],n,s)}function OM(n,s){return p(n[1][1+D],n,s)}function am(n,s){return p(n[1][1+j1],n,s)}function LM(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+ds],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+Ht],n),y,s,S);default:var E=s[1],O=function(W){return[2,W]};return $0(l(n[1][1+me],n),E,s,O)}}function H6(n,s,c){var v=c[1],y=G0(n[1][1+$e],n,s,v);return v===y?c:[0,y,c[2],c[3]]}function lm(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=p(n[1][1+An],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function pm(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Kx],n,S),O=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,c[1],E,O,W]}function MM(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+mt],n,S),O=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function eg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function tg0(n,s){return p(n[1][1+vo],n,s)}function ng0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+l2],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+ys],n),y,s,S)}function ug0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+oo],n,y),O=p(n[1][1+he],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function ig0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+he],n,y),O=p(n[1][1+he],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function fg0(n,s){return p(n[1][1+ys],n,s)}function cg0(n,s){return p(n[1][1+so],n,s)}function sg0(n,s){return p(n[1][1+he],n,s)}function og0(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+vo],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+bv],n),y,s,S);default:var E=s[1],O=function(W){return[2,W]};return $0(l(n[1][1+xa],n),E,s,O)}}function vg0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Kx],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function ag0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+t0],n,v);if(!y)return v===S?c:[0,0,S];var E=y[1],O=p(n[1][1+Kx],n,E);return E===O&&v===S?c:[0,[0,O],S]}function lg0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(vx){return[0,v,[0,vx]]};return cx(l(n[1][1+kt],n),v,y,s,S);case 1:var E=c[1],O=function(vx){return[0,v,[1,vx]]};return cx(l(n[1][1+Cn],n),v,E,s,O);case 2:var W=c[1],d0=function(vx){return[0,v,[2,vx]]};return cx(l(n[1][1+Ho],n),v,W,s,d0);case 3:var w0=c[1],F0=function(vx){return[0,v,[3,vx]]};return $0(l(n[1][1+ke],n),w0,s,F0);default:return s}}function pg0(n,s){var c=s[2],v=s[1],y=Sr(l(n[1][1+ao],n),c);return c===y?s:[0,v,y]}function dg0(n,s,c){return G0(n[1][1+mx],n,s,c)}function yg0(n,s,c){return G0(n[1][1+Ho],n,s,c)}function mg0(n,s){if(s[0]===0){var c=s[1],v=c[1],y=c[2],S=function(w0){return[0,[0,v,w0]]};return cx(l(n[1][1+ra],n),v,y,s,S)}var E=s[1],O=E[1],W=E[2];function d0(w0){return[1,[0,O,w0]]}return cx(l(n[1][1+ea],n),O,W,s,d0)}function kg0(n,s){return p(n[1][1+so],n,s)}function hg0(n,s){return p(n[1][1+he],n,s)}function _g0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+lo],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+ta],n),y,s,S)}function wg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+bo],n,y),O=Vx(l(n[1][1+ks],n),v);return y===E&&v===O?s:[0,S,[0,E,O]]}function Tg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Sg0(n,s){if(s[0]===0){var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+xv],n),c,s,v)}var y=s[1],S=y[1],E=y[2];function O(W){return[1,[0,S,W]]}return cx(l(n[1][1+Pn],n),S,E,s,O)}function Eg0(n,s){var c=s[2][1],v=s[1],y=p(n[1][1+ms],n,c);return c===y?s:[0,v,[0,y]]}function gg0(n,s){var c=s[2],v=c[4],y=c[2],S=c[1],E=c[3],O=s[1],W=p(n[1][1+ms],n,S),d0=Vx(l(n[1][1+iv],n),y),w0=Sr(l(n[1][1+Fo],n),v);return S===W&&y===d0&&v===w0?s:[0,O,[0,W,d0,E,w0]]}function Ag0(n,s,c){var v=c[4],y=c[3],S=p(n[1][1+Go],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],c[2],S,E]}function Pg0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+co],n,E),W=Vx(l(n[1][1+qo],n),S),d0=p(n[1][1+Go],n,y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function Cg0(n,s,c,v){var y=2<=s?p(n[1][1+Ox],n,BH):l(n[1][1+Pe],n);return l(y,v)}function Ng0(n,s,c){var v=2<=s?p(n[1][1+Ox],n,UH):l(n[1][1+Pe],n);return l(v,c)}function Rg0(n,s,c){var v=c[3],y=c[2],S=c[1],E=0,O=c[4];if(s){var W=0;if(S)switch(S[1]){case 0:E=1;break;case 1:W=2;break;default:W=1}else W=1;var d0=0;switch(W){case 0:break;case 1:if(2<=s)var w0=0,F0=0;else d0=1;break;default:d0=1}if(d0)var w0=1,F0=0}else E=1;if(E)var w0=1,F0=1;var vx=y?p(n[1][1+a0],n,v):F0?p(n[1][1+Pe],n,v):G0(n[1][1+Ox],n,DH,v);if(y)var Lx=y[1],_x=w0?l(n[1][1+Pe],n):p(n[1][1+Ox],n,jH),_r=$0(_x,Lx,y,function(f1){return[0,f1]});else var _r=0;return y===_r&&v===vx?c:[0,S,_r,vx,O]}function Ig0(n,s){return p(n[1][1+j1],n,s)}function Og0(n,s,c){if(c[0]===0){var v=c[1],y=Sr(p(n[1][1+h3],n,s),v);return v===y?c:[0,y]}var S=c[1],E=S[1],O=S[2];function W(d0){return[1,[0,E,d0]]}return cx(p(n[1][1+X6],n,s),E,O,c,W)}function Lg0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function Mg0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=t2(l(n[1][1+Y6],n),E),d0=Vx(p(n[1][1+B6],n,O),y),w0=Vx(function(vx){var Lx=vx[1],_x=vx[2],_r=G0(n[1][1+F9],n,O,Lx);return _r===Lx?vx:[0,_r,_x]},S),F0=p(n[1][1+t0],n,v);return E===W&&y===d0&&S===w0&&v===F0?c:[0,O,W,w0,d0,F0]}function Dg0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+N0],n,E),W=G0(n[1][1+q9],n,y!==0?1:0,S),d0=l(n[1][1+G9],n),w0=Vx(function(vx){return t2(d0,vx)},y),F0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===w0&&v===F0?c:[0,O,W,w0,F0]}function jg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+A0],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Ug0(n,s,c){return p(n[1][1+A0],n,c)}function Bg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Yg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function Xg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function Jg0(n,s,c){return G0(n[1][1+k3],n,s,c)}function Vg0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=p(n[1][1+Pe],n,O),d0=Vx(l(n[1][1+L],n),E),w0=l(n[1][1+ev],n),F0=Sr(function(_x){return t2(w0,_x)},S),vx=t2(l(n[1][1+w],n),y),Lx=p(n[1][1+t0],n,v);return W===O&&d0===E&&F0===S&&vx===y&&Lx===v?c:[0,W,d0,F0,vx,Lx]}function zg0(n,s){return p(n[1][1+Z],n,s)}function Kg0(n,s){return p(n[1][1+Z],n,s)}function Zg0(n,s){return p(n[1][1+j1],n,s)}function Wg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function $g0(n,s){return G0(n[1][1+Ox],n,MH,s)}function Qg0(n,s){return p(n[1][1+Kx],n,s)}function Fg0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+en],n),c,v,s,y)}function Hg0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Wr],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+I3],n),y,s,S)}function qg0(n,s){switch(s[0]){case 0:return s;case 1:var c=s[1],v=function(E){return[1,E]};return $0(l(n[1][1+F],n),c,s,v);default:var y=s[1],S=function(E){return[2,E]};return $0(l(n[1][1+$],n),y,s,S)}}function Gg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+bx],n,y),O=p(n[1][1+Q2],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function bg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+F],n,y),O=p(n[1][1+t0],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function xA0(n,s){var c=s[2],v=c[4],y=c[3],S=c[2],E=c[1],O=s[1],W=Sr(l(n[1][1+hr],n),S),d0=Vx(l(n[1][1+Sx],n),y),w0=Vx(l(n[1][1+h0],n),E),F0=p(n[1][1+t0],n,v);return S===W&&y===d0&&v===F0&&E===w0?s:[0,O,[0,w0,W,d0,F0]]}function rA0(n,s,c){var v=c[9],y=c[8],S=c[7],E=c[6],O=c[3],W=c[2],d0=c[1],w0=c[10],F0=c[5],vx=c[4],Lx=Vx(l(n[1][1+cr],n),d0),_x=Vx(l(n[1][1+L],n),y),_r=p(n[1][1+Dx],n,W),f1=p(n[1][1+R0],n,S),c1=p(n[1][1+Er],n,O),y1=Vx(l(n[1][1+X0],n),E),m1=p(n[1][1+t0],n,v);return d0===Lx&&W===_r&&O===c1&&E===y1&&S===f1&&y===_x&&v===m1?c:[0,Lx,_r,c1,vx,F0,y1,f1,_x,m1,w0]}function eA0(n,s,c){return G0(n[1][1+Vr],n,s,c)}function tA0(n,s,c){return G0(n[1][1+lr],n,s,c)}function nA0(n,s,c){return G0(n[1][1+Vr],n,s,c)}function uA0(n,s){if(s[0]===0)return s;var c=s[2],v=s[1],y=p(n[1][1+B],n,c);return y===c?s:[1,v,y]}function iA0(n,s){if(s[0]===0)return s;var c=s[1];function v(y){return[1,y]}return $0(l(n[1][1+F],n),c,s,v)}function fA0(n,s){var c=s[2],v=s[1];function y(S){return[0,v,S]}return $0(l(n[1][1+Q],n),c,s,y)}function cA0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Rx){return[0,v,[0,Rx]]};return $0(l(n[1][1+t0],n),y,s,S);case 1:var E=c[1],O=function(Rx){return[0,v,[1,Rx]]};return $0(l(n[1][1+t0],n),E,s,O);case 2:var W=c[1],d0=function(Rx){return[0,v,[2,Rx]]};return $0(l(n[1][1+t0],n),W,s,d0);case 3:var w0=c[1],F0=function(Rx){return[0,v,[3,Rx]]};return $0(l(n[1][1+t0],n),w0,s,F0);case 4:var vx=c[1],Lx=function(Rx){return[0,v,[4,Rx]]};return $0(l(n[1][1+t0],n),vx,s,Lx);case 5:var _x=c[1],_r=function(Rx){return[0,v,[5,Rx]]};return $0(l(n[1][1+t0],n),_x,s,_r);case 6:var f1=c[1],c1=function(Rx){return[0,v,[6,Rx]]};return $0(l(n[1][1+t0],n),f1,s,c1);case 7:var y1=c[1],m1=function(Rx){return[0,v,[7,Rx]]};return $0(l(n[1][1+t0],n),y1,s,m1);case 8:var be=c[2],xt=c[1],rt=function(Rx){return[0,v,[8,xt,Rx]]};return $0(l(n[1][1+t0],n),be,s,rt);case 9:var Ne=c[1],et=function(Rx){return[0,v,[9,Rx]]};return $0(l(n[1][1+t0],n),Ne,s,et);case 10:var tt=c[1],Pt=function(Rx){return[0,v,[10,Rx]]};return $0(l(n[1][1+t0],n),tt,s,Pt);case 11:var nt=c[1],ut=function(Rx){return[0,v,[11,Rx]]};return $0(l(n[1][1+ie],n),nt,s,ut);case 12:var Xn=c[1],Jn=function(Rx){return[0,v,[12,Rx]]};return cx(l(n[1][1+C],n),v,Xn,s,Jn);case 13:var Ss=c[1],Es=function(Rx){return[0,v,[13,Rx]]};return cx(l(n[1][1+hs],n),v,Ss,s,Es);case 14:var it=c[1],gs=function(Rx){return[0,v,[14,Rx]]};return cx(l(n[1][1+w],n),v,it,s,gs);case 15:var cv=c[1],q6=function(Rx){return[0,v,[15,Rx]]};return cx(l(n[1][1+rv],n),v,cv,s,q6);case 16:var G6=c[1],b6=function(Rx){return[0,v,[16,Rx]]};return $0(l(n[1][1+M3],n),G6,s,b6);case 17:var x4=c[1],r4=function(Rx){return[0,v,[17,Rx]]};return $0(l(n[1][1+qe],n),x4,s,r4);case 18:var e4=c[1],t4=function(Rx){return[0,v,[18,Rx]]};return $0(l(n[1][1+Q9],n),e4,s,t4);case 19:var n4=c[1],u4=function(Rx){return[0,v,[19,Rx]]};return cx(l(n[1][1+ev],n),v,n4,s,u4);case 20:var i4=c[1],f4=function(Rx){return[0,v,[20,Rx]]};return cx(l(n[1][1+U6],n),v,i4,s,f4);case 21:var c4=c[1],s4=function(Rx){return[0,v,[21,Rx]]};return cx(l(n[1][1+lx],n),v,c4,s,s4);case 22:var o4=c[1],v4=function(Rx){return[0,v,[22,Rx]]};return cx(l(n[1][1+T],n),v,o4,s,v4);case 23:var a4=c[1],l4=function(Rx){return[0,v,[23,Rx]]};return cx(l(n[1][1+Nn],n),v,a4,s,l4);case 24:var p4=c[1],d4=function(Rx){return[0,v,[24,Rx]]};return $0(l(n[1][1+A],n),p4,s,d4);case 25:var y4=c[1],m4=function(Rx){return[0,v,[25,Rx]]};return $0(l(n[1][1+Qo],n),y4,s,m4);case 26:var k4=c[1],h4=function(Rx){return[0,v,[26,Rx]]};return $0(l(n[1][1+B],n),k4,s,h4);case 27:var _4=c[1],w4=function(Rx){return[0,v,[27,Rx]]};return $0(l(n[1][1+P0],n),_4,s,w4);case 28:var T4=c[1],S4=function(Rx){return[0,v,[28,Rx]]};return $0(l(n[1][1+f0],n),T4,s,S4);case 29:var E4=c[1],g4=function(Rx){return[0,v,[29,Rx]]};return cx(l(n[1][1+mx],n),v,E4,s,g4);case 30:var A4=c[1],P4=function(Rx){return[0,v,[30,Rx]]};return cx(l(n[1][1+Yx],n),v,A4,s,P4);case 31:var C4=c[1],N4=function(Rx){return[0,v,[31,Rx]]};return cx(l(n[1][1+tn],n),v,C4,s,N4);case 32:var R4=c[1],I4=function(Rx){return[0,v,[32,Rx]]};return cx(l(n[1][1+oa],n),v,R4,s,I4);case 33:var O4=c[1],L4=function(Rx){return[0,v,[33,Rx]]};return $0(l(n[1][1+t0],n),O4,s,L4);case 34:var M4=c[1],D4=function(Rx){return[0,v,[34,Rx]]};return $0(l(n[1][1+t0],n),M4,s,D4);default:var j4=c[1],U4=function(Rx){return[0,v,[35,Rx]]};return $0(l(n[1][1+t0],n),j4,s,U4)}}function sA0(n,s,c){var v=c[2],y=c[1],S=y[3],E=y[2],O=y[1],W=p(n[1][1+Q],n,O),d0=p(n[1][1+Q],n,E),w0=Sr(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return W===O&&d0===E&&w0===S&&F0===v?c:[0,[0,W,d0,w0],F0]}function oA0(n,s,c){var v=c[2],y=c[1],S=y[3],E=y[2],O=y[1],W=p(n[1][1+Q],n,O),d0=p(n[1][1+Q],n,E),w0=Sr(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return W===O&&d0===E&&w0===S&&F0===v?c:[0,[0,W,d0,w0],F0]}function vA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function aA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,c);return y===c?s:[0,v,y]}function lA0(n,s){var c=s[3],v=s[2],y=s[4],S=s[1],E=p(n[1][1+Q],n,v),O=p(n[1][1+i],n,c);return E===v&&O===c?s:[0,S,E,O,y]}function pA0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(w0){return[0,v,[0,w0]]};return $0(l(n[1][1+Q],n),y,s,S);case 1:var E=c[1],O=function(w0){return[0,v,[1,w0]]};return $0(l(n[1][1+v0],n),E,s,O);default:var W=c[1],d0=function(w0){return[0,v,[2,w0]]};return $0(l(n[1][1+s0],n),W,s,d0)}}function dA0(n,s){var c=s[2],v=s[1],y=Sr(l(n[1][1+o0],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function yA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function mA0(n,s){var c=s[3],v=s[2],y=s[4],S=s[1],E=p(n[1][1+Q],n,v),O=p(n[1][1+t0],n,c);return v===E&&c===O?s:[0,S,E,O,y]}function kA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function hA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+M],n,y),O=p(n[1][1+R],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function _A0(n,s){return p(n[1][1+j1],n,s)}function wA0(n,s){return p(n[1][1+j1],n,s)}function TA0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+I],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+N],n),y,s,S)}function SA0(n,s){var c=s[3],v=s[2],y=s[1],S=p(n[1][1+M],n,y),E=Vx(l(n[1][1+J],n),v),O=p(n[1][1+t0],n,c);return y===S&&Nl(v,E)&&c===O?s:[0,S,E,O]}function EA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+z],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function gA0(n,s){var c=s[5],v=s[4],y=s[3],S=s[2],E=s[1],O=p(n[1][1+Q],n,E),W=p(n[1][1+Q],n,S),d0=p(n[1][1+Q],n,y),w0=p(n[1][1+Q],n,v),F0=p(n[1][1+t0],n,c);return E===O&&S===W&&y===d0&&v===w0&&c===F0?s:[0,O,W,d0,w0,F0]}function AA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function PA0(n,s,c){var v=c[6],y=c[5],S=c[4],E=c[3],O=c[2],W=c[1];return v===p(n[1][1+t0],n,v)?c:[0,W,O,E,S,y,v]}function CA0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+t0],n,v);return v===O?c:[0,E,S,y,O]}function NA0(n,s,c){return p(n[1][1+t0],n,c)}function RA0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+t0],n,v);return v===S?c:[0,y,S]}function IA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function OA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function LA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function MA0(n,s,c){var v=c[1],y=c[2],S=G0(n[1][1+U6],n,s,v);return S===v?c:[0,S,y]}function DA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Q],n,S),O=p(n[1][1+Q],n,y),W=p(n[1][1+t0],n,v);return E===S&&O===y&&W===v?c:[0,E,O,W]}function jA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+ua],n,S),O=Vx(l(n[1][1+J],n),y),W=p(n[1][1+t0],n,v);return E===S&&O===y&&W===v?c:[0,E,O,W]}function UA0(n,s){var c=s[2],v=c[5],y=c[4],S=c[2],E=c[1],O=c[3],W=s[1],d0=p(n[1][1+Y],n,S),w0=p(n[1][1+i],n,y),F0=Vx(l(n[1][1+Q],n),v),vx=p(n[1][1+Pe],n,E);return vx===E&&d0===S&&w0===y&&F0===v?s:[0,W,[0,vx,d0,O,w0,F0]]}function BA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+z],n),y),O=p(n[1][1+t0],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function YA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+Q],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function XA0(n,s){return Vx(l(n[1][1+f],n),s)}function JA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function VA0(n,s){return p(n[1][1+j1],n,s)}function zA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+ua],n,y),O=p(n[1][1+gn],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function KA0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+V],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+po],n),y,s,S)}function ZA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=l(n[1][1+ev],n),O=Sr(function(w0){return t2(E,w0)},y),W=t2(l(n[1][1+w],n),S),d0=p(n[1][1+t0],n,v);return O===y&&W===S&&v===d0?c:[0,W,O,d0]}function WA0(n,s){switch(s[0]){case 0:var c=s[1],v=function(_x){return[0,_x]};return $0(l(n[1][1+S0],n),c,s,v);case 1:var y=s[1],S=function(_x){return[1,_x]};return $0(l(n[1][1+x0],n),y,s,S);case 2:var E=s[1],O=function(_x){return[2,_x]};return $0(l(n[1][1+er],n),E,s,O);case 3:var W=s[1],d0=function(_x){return[3,_x]};return $0(l(n[1][1+Zx],n),W,s,d0);case 4:var w0=s[1],F0=function(_x){return[4,_x]};return $0(l(n[1][1+$x],n),w0,s,F0);default:var vx=s[1],Lx=function(_x){return[5,_x]};return $0(l(n[1][1+k0],n),vx,s,Lx)}}function $A0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=Sr(l(n[1][1+u2],n),y),W=p(n[1][1+t0],n,v);return O===y&&v===W?c:[0,E,S,O,W]}function QA0(n,s){var c=s[2],v=c[6],y=c[4],S=c[3],E=c[2],O=c[1],W=c[5],d0=s[1],w0=p(n[1][1+z],n,O),F0=p(n[1][1+Q],n,E),vx=p(n[1][1+Q],n,S),Lx=p(n[1][1+i],n,y),_x=p(n[1][1+t0],n,v);return w0===O&&F0===E&&vx===S&&Lx===y&&_x===v?s:[0,d0,[0,w0,F0,vx,Lx,W,_x]]}function FA0(n,s){var c=s[2],v=c[3],y=c[1],S=y[2],E=y[1],O=c[2],W=s[1],d0=G0(n[1][1+C],n,E,S),w0=p(n[1][1+t0],n,v);return S===d0&&v===w0?s:[0,W,[0,[0,E,d0],O,w0]]}function HA0(n,s){var c=s[2],v=c[6],y=c[2],S=c[1],E=c[5],O=c[4],W=c[3],d0=s[1],w0=p(n[1][1+j1],n,S),F0=p(n[1][1+Q],n,y),vx=p(n[1][1+t0],n,v);return S===w0&&y===F0&&v===vx?s:[0,d0,[0,w0,F0,W,O,E,vx]]}function qA0(n,s){var c=s[2],v=c[6],y=c[5],S=c[3],E=c[2],O=c[4],W=c[1],d0=s[1],w0=p(n[1][1+Q],n,E),F0=p(n[1][1+Q],n,S),vx=p(n[1][1+i],n,y),Lx=p(n[1][1+t0],n,v);return w0===E&&F0===S&&vx===y&&Lx===v?s:[0,d0,[0,W,w0,F0,O,vx,Lx]]}function GA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Q],n,y),O=p(n[1][1+t0],n,v);return E===y&&v===O?s:[0,S,[0,E,O]]}function bA0(n,s){var c=s[2],v=c[8],y=c[7],S=c[2],E=c[1],O=c[6],W=c[5],d0=c[4],w0=c[3],F0=s[1],vx=p(n[1][1+Hx],n,E),Lx=p(n[1][1+e0],n,S),_x=p(n[1][1+i],n,y),_r=p(n[1][1+t0],n,v);return vx===E&&Lx===S&&_x===y&&_r===v?s:[0,F0,[0,vx,Lx,w0,d0,W,O,_x,_r]]}function xP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+C],n),c,v,s,y)}function rP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+C],n),c,v,s,y)}function eP0(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+Q],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+Cr],n),y,s,S);default:var E=s[1],O=function(W){return[2,W]};return $0(l(n[1][1+w1],n),E,s,O)}}function tP0(n,s){return p(n[1][1+j1],n,s)}function nP0(n,s,c){var v=c[4],y=c[3],S=c[2],E=S[2],O=E[4],W=E[3],d0=E[2],w0=E[1],F0=c[1],vx=S[1],Lx=Vx(l(n[1][1+L],n),F0),_x=Vx(l(n[1][1+j],n),w0),_r=Sr(l(n[1][1+jx],n),d0),f1=Vx(l(n[1][1+nx],n),W),c1=p(n[1][1+q],n,y),y1=p(n[1][1+t0],n,v),m1=p(n[1][1+t0],n,O);return _r===d0&&f1===W&&c1===y&&Lx===F0&&y1===v&&m1===O&&_x===w0?c:[0,Lx,[0,vx,[0,_x,_r,f1,m1]],c1,y1]}function uP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Q],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+i0],n),y,s,S)}function iP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+F],n,y),O=p(n[1][1+t0],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function fP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+jx],n,y),O=p(n[1][1+t0],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function cP0(n,s){var c=s[2],v=c[2],y=c[1],S=c[3],E=s[1],O=p(n[1][1+Q],n,v),W=Vx(l(n[1][1+j1],n),y);return O===v&&W===y?s:[0,E,[0,W,O,S]]}function sP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function oP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+u1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Kx],n),y,s,S)}function vP0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=Vx(l(n[1][1+x1],n),O),d0=Vx(l(n[1][1+N0],n),E),w0=Vx(l(n[1][1+Kx],n),S),F0=p(n[1][1+A0],n,y),vx=p(n[1][1+t0],n,v);return O===W&&E===d0&&S===w0&&y===F0&&v===vx?c:[0,W,d0,w0,F0,vx]}function aP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function lP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+T1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+l1],n),y,s,S)}function pP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],O=c[4],W=p(n[1][1+r1],n,E),d0=p(n[1][1+Kx],n,S),w0=p(n[1][1+A0],n,y),F0=p(n[1][1+t0],n,v);return E===W&&S===d0&&y===w0&&v===F0?c:[0,W,d0,w0,O,F0]}function dP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function yP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+P1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Q1],n),y,s,S)}function mP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],O=c[4],W=p(n[1][1+i1],n,E),d0=p(n[1][1+Kx],n,S),w0=p(n[1][1+A0],n,y),F0=p(n[1][1+t0],n,v);return E===W&&S===d0&&y===w0&&v===F0?c:[0,W,d0,w0,O,F0]}function kP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Kx],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Q0],n),y,s,S)}function hP0(n,s,c){var v=c[3],y=c[1],S=c[2],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?c:[0,E,S,O]}function _P0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function wP0(n,s){if(s[0]===0){var c=s[1],v=Sr(l(n[1][1+Dr],n),c);return c===v?s:[0,v]}var y=s[1],S=p(n[1][1+Fe],n,y);return y===S?s:[1,S]}function TP0(n,s){var c=s[2],v=s[1],y=Vx(l(n[1][1+j1],n),c);return c===y?s:[0,v,y]}function SP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+j1],n,y),O=Vx(l(n[1][1+j1],n),v);return y===E&&v===O?s:[0,S,[0,E,O]]}function EP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],O=c[4],W=AJ(l(n[1][1+Yr],n),y),d0=Vx(l(n[1][1+Mr],n),S),w0=Vx(l(n[1][1+A0],n),E),F0=p(n[1][1+t0],n,v);return y===W&&S===d0&&E===w0&&v===F0?c:[0,w0,d0,W,O,F0]}function gP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+A0],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Kx],n),y,s,S)}function AP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+I1],n,y),O=p(n[1][1+t0],n,v);return E===y&&O===v?c:[0,S,E,O]}function PP0(n,s){return p(n[1][1+j1],n,s)}function CP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+F1],n,v);return v===E?s:[0,S,[0,E,y]]}function NP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+F1],n,v);return v===E?s:[0,S,[0,E,y]]}function RP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+F1],n,v);return v===E?s:[0,S,[0,E,y]]}function IP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+F1],n,v);return v===E?s:[0,S,[0,E,y]]}function OP0(n,s){var c=s[2][1],v=s[1],y=p(n[1][1+F1],n,c);return c===y?s:[0,v,[0,y]]}function LP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+ht],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function MP0(n,s){var c=s[3],v=s[1],y=Sr(l(n[1][1+W2],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],S]}function DP0(n,s){var c=s[4],v=s[1];if(v[0]===0)var y=v[1],S=function(vx){return[0,vx]},E=l(n[1][1+W2],n),w0=$0(function(vx){return Sr(E,vx)},y,v,S);else var O=v[1],W=function(vx){return[1,vx]},d0=l(n[1][1+i2],n),w0=$0(function(vx){return Sr(d0,vx)},O,v,W);var F0=p(n[1][1+t0],n,c);return v===w0&&c===F0?s:[0,w0,s[2],s[3],F0]}function jP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+He],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function UP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+bt],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function BP0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(_x){return[0,v,[0,_x]]};return $0(l(n[1][1+we],n),y,s,S);case 1:var E=c[1],O=function(_x){return[0,v,[1,_x]]};return $0(l(n[1][1+U1],n),E,s,O);case 2:var W=c[1],d0=function(_x){return[0,v,[2,_x]]};return $0(l(n[1][1+Gt],n),W,s,d0);case 3:var w0=c[1],F0=function(_x){return[0,v,[3,_x]]};return $0(l(n[1][1+zr],n),w0,s,F0);default:var vx=c[1],Lx=function(_x){return[0,v,[4,_x]]};return $0(l(n[1][1+Se],n),vx,s,Lx)}}function YP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=G0(n[1][1+Ox],n,LH,S),O=p(n[1][1+Te],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function XP0(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function JP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+A0],n,S),O=p(n[1][1+N0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function VP0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=G0(n[1][1+Ox],n,[0,y],E),W=p(n[1][1+F],n,S),d0=p(n[1][1+t0],n,v);return O===E&&W===S&&d0===v?c:[0,O,W,y,d0]}function zP0(n,s,c){return G0(n[1][1+n0],n,s,c)}function KP0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+F],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function ZP0(n,s,c){var v=c[4],y=c[2],S=c[3],E=c[1],O=t2(l(n[1][1+en],n),y),W=p(n[1][1+t0],n,v);return O===y&&v===W?c:[0,E,O,S,W]}function WP0(n,s,c){return G0(n[1][1+k3],n,s,c)}function $P0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+cr],n,E),W=p(n[1][1+F],n,S),d0=Vx(l(n[1][1+X0],n),y),w0=p(n[1][1+t0],n,v);return O===E&&W===S&&d0===y&&w0===v?c:[0,O,W,d0,w0]}function QP0(n,s){switch(s[0]){case 0:var c=s[1],v=c[2],y=c[1],S=G0(n[1][1+ge],n,y,v);return S===v?s:[0,[0,y,S]];case 1:var E=s[1],O=E[2],W=E[1],d0=G0(n[1][1+F2],n,W,O);return d0===O?s:[1,[0,W,d0]];case 2:var w0=s[1],F0=w0[2],vx=w0[1],Lx=G0(n[1][1+rn],n,vx,F0);return Lx===F0?s:[2,[0,vx,Lx]];case 3:var _x=s[1],_r=_x[2],f1=_x[1],c1=G0(n[1][1+Tt],n,f1,_r);return c1===_r?s:[3,[0,f1,c1]];case 4:var y1=s[1],m1=p(n[1][1+Q],n,y1);return m1===y1?s:[4,m1];case 5:var be=s[1],xt=be[2],rt=be[1],Ne=G0(n[1][1+n0],n,rt,xt);return Ne===xt?s:[5,[0,rt,Ne]];case 6:var et=s[1],tt=et[2],Pt=et[1],nt=G0(n[1][1+K1],n,Pt,tt);return nt===tt?s:[6,[0,Pt,nt]];case 7:var ut=s[1],Xn=ut[2],Jn=ut[1],Ss=G0(n[1][1+k3],n,Jn,Xn);return Ss===Xn?s:[7,[0,Jn,Ss]];default:var Es=s[1],it=Es[2],gs=Es[1],cv=G0(n[1][1+_e],n,gs,it);return cv===it?s:[8,[0,gs,cv]]}}function FP0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=AJ(l(n[1][1+Yr],n),y),d0=Vx(l(n[1][1+Mr],n),S),w0=Vx(l(n[1][1+Rn],n),E),F0=p(n[1][1+t0],n,v);return y===W&&S===d0&&E===w0&&v===F0?c:[0,O,w0,d0,W,F0]}function HP0(n,s,c){return G0(n[1][1+_e],n,s,c)}function qP0(n,s){var c=s[2],v=c[4],y=c[2],S=c[1],E=c[3],O=s[1],W=Vx(l(n[1][1+j1],n),S),d0=p(n[1][1+Q],n,y),w0=p(n[1][1+t0],n,v);return S===W&&y===d0&&v===w0?s:[0,O,[0,W,d0,E,w0]]}function GP0(n,s){var c=s[2],v=c[2],y=c[1],S=c[3],E=s[1],O=p(n[1][1+jn],n,y),W=p(n[1][1+F],n,v);return y===O&&v===W?s:[0,E,[0,O,W,S]]}function bP0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],O=Sr(l(n[1][1+gt],n),S),W=Vx(l(n[1][1+St],n),y),d0=p(n[1][1+t0],n,v);return S===O&&y===W&&v===d0?s:[0,E,[0,O,W,d0]]}function xC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=Vx(l(n[1][1+L],n),E),W=p(n[1][1+Et],n,S),d0=p(n[1][1+H2],n,y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function rC0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=p(n[1][1+tv],n,O),d0=Vx(l(n[1][1+L],n),E),w0=p(n[1][1+Et],n,S),F0=p(n[1][1+H2],n,y),vx=p(n[1][1+t0],n,v);return O===W&&E===d0&&S===w0&&y===F0&&v===vx?c:[0,W,d0,w0,F0,vx]}function eC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[4],O=c[3],W=c[2],d0=c[1],w0=p(n[1][1+fa],n,d0),F0=Vx(l(n[1][1+L],n),W),vx=t2(l(n[1][1+w],n),O),Lx=l(n[1][1+ev],n),_x=Vx(function(m1){return t2(Lx,m1)},E),_r=l(n[1][1+ev],n),f1=Sr(function(m1){return t2(_r,m1)},S),c1=Vx(l(n[1][1+nv],n),y),y1=p(n[1][1+t0],n,v);return w0===d0&&F0===W&&vx===O&&_x===E&&f1===S&&c1===y&&y1===v?c:[0,w0,F0,vx,_x,f1,c1,y1]}function tC0(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function nC0(n,s,c){var v=c[2],y=c[1],S=Vx(l(n[1][1+mt],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function uC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+N0],n,E),W=p(n[1][1+Kx],n,S),d0=p(n[1][1+Kx],n,y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function iC0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+en],n),c,v,s,y)}function fC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Dn],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function cC0(n,s){return G0(n[1][1+Ts],n,OH,s)}function sC0(n,s){if(s[0]===0)return[0,p(n[1][1+j1],n,s[1])];var c=s[1],v=c[1];return[1,[0,v,G0(n[1][1+mx],n,v,c[2])]]}function oC0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=c[4],O=s[1],W=p(n[1][1+jn],n,S),d0=p(n[1][1+Dn],n,y),w0=p(n[1][1+Q2],n,v);return S===W&&y===d0&&v===w0?s:[0,O,[0,W,d0,w0,E]]}function vC0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],O=Sr(l(n[1][1+_s],n),S),W=Vx(l(n[1][1+Mn],n),y),d0=p(n[1][1+t0],n,v);return S===O&&y===W&&v===d0?s:[0,E,[0,O,W,d0]]}function aC0(n,s){return G0(n[1][1+Ox],n,IH,s)}function lC0(n,s,c){var v=c[6],y=c[5],S=c[4],E=c[3],O=c[2],W=c[1],d0=c[7],w0=p(n[1][1+tv],n,W),F0=Vx(l(n[1][1+L],n),O),vx=p(n[1][1+Ge],n,E),Lx=p(n[1][1+w3],n,y),_x=p(n[1][1+H2],n,S),_r=p(n[1][1+t0],n,v);return W===w0&&O===F0&&E===vx&&y===Lx&&S===_x&&v===_r?c:[0,w0,F0,vx,_x,Lx,_r,d0]}function pC0(n,s){return Vx(l(n[1][1+Kx],n),s)}function dC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[3],O=c[2],W=c[1],d0=p(n[1][1+D],n,W),w0=p(n[1][1+mo],n,O),F0=p(n[1][1+Y],n,E),vx=p(n[1][1+i],n,S),Lx=Sr(l(n[1][1+Bn],n),y),_x=p(n[1][1+t0],n,v);return W===d0&&O===w0&&F0===E&&vx===S&&Lx===y&&_x===v?c:[0,d0,w0,F0,c[4],vx,Lx,_x]}function yC0(n,s){if(typeof s=="number")return s;var c=s[1],v=p(n[1][1+Kx],n,c);return c===v?s:[0,v]}function mC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[3],O=c[2],W=c[1],d0=p(n[1][1+Hx],n,W),w0=p(n[1][1+mo],n,O),F0=p(n[1][1+Y],n,E),vx=p(n[1][1+i],n,S),Lx=Sr(l(n[1][1+Bn],n),y),_x=p(n[1][1+t0],n,v);return W===d0&&O===w0&&F0===E&&vx===S&&Lx===y&&_x===v?c:[0,d0,w0,F0,c[4],vx,Lx,_x]}function kC0(n,s,c){var v=c[6],y=c[5],S=c[3],E=c[2],O=p(n[1][1+Hx],n,E),W=t2(l(n[1][1+lr],n),S),d0=Sr(l(n[1][1+Bn],n),y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,c[1],O,W,c[4],d0,w0]}function hC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+V],n,y),O=Vx(l(n[1][1+J],n),v);return y===E&&v===O?s:[0,S,[0,E,O]]}function _C0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+ko],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function wC0(n,s){switch(s[0]){case 0:var c=s[1],v=c[1],y=c[2],S=function(_x){return[0,[0,v,_x]]};return cx(l(n[1][1+E3],n),v,y,s,S);case 1:var E=s[1],O=E[1],W=E[2],d0=function(_x){return[1,[0,O,_x]]};return cx(l(n[1][1+T3],n),O,W,s,d0);default:var w0=s[1],F0=w0[1],vx=w0[2],Lx=function(_x){return[2,[0,F0,_x]]};return cx(l(n[1][1+S3],n),F0,vx,s,Lx)}}function TC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function SC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+A3],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function EC0(n,s){return G0(n[1][1+Ox],n,RH,s)}function gC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=Vx(l(n[1][1+J],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function AC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[4],O=c[3],W=c[2],d0=c[1],w0=Vx(l(n[1][1+fa],n),d0),F0=Vx(l(n[1][1+L],n),O),vx=p(n[1][1+C3],n,W),Lx=l(n[1][1+g3],n),_x=Vx(function(y1){return t2(Lx,y1)},E),_r=Vx(l(n[1][1+nv],n),S),f1=Sr(l(n[1][1+Bn],n),y),c1=p(n[1][1+t0],n,v);return d0===w0&&W===vx&&E===_x&&S===_r&&y===f1&&v===c1&&O===F0?c:[0,w0,vx,F0,_x,_r,f1,c1]}function PC0(n,s,c){return G0(n[1][1+ca],n,s,c)}function CC0(n,s,c){return G0(n[1][1+ca],n,s,c)}function NC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=Vx(l(n[1][1+uv],n),S),O=p(n[1][1+R3],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function RC0(n,s){return t2(l(n[1][1+en],n),s)}function IC0(n,s){if(s[0]===0){var c=s[1],v=p(n[1][1+Q],n,c);return v===c?s:[0,v]}var y=s[1],S=y[2][1],E=y[1],O=p(n[1][1+t0],n,S);return S===O?s:[1,[0,E,[0,O]]]}function OC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+At],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function LC0(n,s,c){var v=c[1],y=G0(n[1][1+ws],n,s,v);return v===y?c:[0,y,c[2],c[3]]}function MC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+Hr],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function DC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+Kx],n,E),W=Vx(l(n[1][1+iv],n),S),d0=p(n[1][1+fv],n,y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function jC0(n,s,c){var v=c[2],y=c[1],S=Vx(l(n[1][1+mt],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function UC0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+L0],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function BC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Kx],n,S),O=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,c[1],E,O,W]}function YC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Ce],n,S),O=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,c[1],E,O,W]}function XC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=p(n[1][1+F],n,y),W=p(n[1][1+t0],n,v);return E===S&&O===y&&W===v?c:[0,E,O,W]}function JC0(n,s,c){return G0(n[1][1+Vr],n,s,c)}function VC0(n,s){switch(s[0]){case 0:var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Kx],n),c,s,v);case 1:var y=s[1],S=function(E){return[1,E]};return $0(l(n[1][1+Q0],n),y,s,S);default:return s}}function zC0(n,s,c){var v=c[2],y=c[1],S=Sr(l(n[1][1+D3],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function KC0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Ix){return[0,v,[0,Ix]]};return cx(l(n[1][1+fe],n),v,y,s,S);case 1:var E=c[1],O=function(Ix){return[0,v,[1,Ix]]};return cx(l(n[1][1+L3],n),v,E,s,O);case 2:var W=c[1],d0=function(Ix){return[0,v,[2,Ix]]};return cx(l(n[1][1+O3],n),v,W,s,d0);case 3:var w0=c[1],F0=function(Ix){return[0,v,[3,Ix]]};return cx(l(n[1][1+ho],n),v,w0,s,F0);case 4:var vx=c[1],Lx=function(Ix){return[0,v,[4,Ix]]};return cx(l(n[1][1+Yn],n),v,vx,s,Lx);case 5:var _x=c[1],_r=function(Ix){return[0,v,[5,Ix]]};return cx(l(n[1][1+ws],n),v,_x,s,_r);case 6:var f1=c[1],c1=function(Ix){return[0,v,[6,Ix]]};return cx(l(n[1][1+Un],n),v,f1,s,c1);case 7:var y1=c[1],m1=function(Ix){return[0,v,[7,Ix]]};return cx(l(n[1][1+M2],n),v,y1,s,m1);case 8:var be=c[1],xt=function(Ix){return[0,v,[8,Ix]]};return cx(l(n[1][1+kr],n),v,be,s,xt);case 9:var rt=c[1],Ne=function(Ix){return[0,v,[9,Ix]]};return $0(l(n[1][1+j1],n),rt,s,Ne);case 10:var et=c[1],tt=function(Ix){return[0,v,[10,Ix]]};return $0(p(n[1][1+na],n,v),et,s,tt);case 11:var Pt=c[1],nt=function(Ix){return[0,v,[11,Ix]]};return cx(l(n[1][1+kt],n),v,Pt,s,nt);case 12:var ut=c[1],Xn=function(Ix){return[0,v,[12,Ix]]};return cx(l(n[1][1+Cn],n),v,ut,s,Xn);case 13:var Jn=c[1],Ss=function(Ix){return[0,v,[13,Ix]]};return cx(l(n[1][1+mx],n),v,Jn,s,Ss);case 14:var Es=c[1],it=function(Ix){return[0,v,[14,Ix]]};return cx(l(n[1][1+oa],n),v,Es,s,it);case 15:var gs=c[1],cv=function(Ix){return[0,v,[15,Ix]]};return cx(l(n[1][1+Ft],n),v,gs,s,cv);case 16:var q6=c[1],G6=function(Ix){return[0,v,[16,Ix]]};return cx(l(n[1][1+Yx],n),v,q6,s,G6);case 17:var b6=c[1],x4=function(Ix){return[0,v,[17,Ix]]};return cx(l(n[1][1+tn],n),v,b6,s,x4);case 18:var r4=c[1],e4=function(Ix){return[0,v,[18,Ix]]};return cx(l(n[1][1+m0],n),v,r4,s,e4);case 19:var t4=c[1],n4=function(Ix){return[0,v,[19,Ix]]};return cx(l(n[1][1+We],n),v,t4,s,n4);case 20:var u4=c[1],i4=function(Ix){return[0,v,[20,Ix]]};return cx(l(n[1][1+qt],n),v,u4,s,i4);case 21:var f4=c[1],c4=function(Ix){return[0,v,[21,Ix]]};return cx(l(n[1][1+$e],n),v,f4,s,c4);case 22:var s4=c[1],o4=function(Ix){return[0,v,[22,Ix]]};return cx(l(n[1][1+fo],n),v,s4,s,o4);case 23:var v4=c[1],a4=function(Ix){return[0,v,[23,Ix]]};return cx(l(n[1][1+E2],n),v,v4,s,a4);case 24:var l4=c[1],p4=function(Ix){return[0,v,[24,Ix]]};return cx(l(n[1][1+Lr],n),v,l4,s,p4);case 25:var d4=c[1],y4=function(Ix){return[0,v,[25,Ix]]};return $0(p(n[1][1+v1],n,v),d4,s,y4);case 26:var m4=c[1],k4=function(Ix){return[0,v,[26,Ix]]};return cx(l(n[1][1+jr],n),v,m4,s,k4);case 27:var h4=c[1],_4=function(Ix){return[0,v,[27,Ix]]};return cx(l(n[1][1+H],n),v,h4,s,_4);case 28:var w4=c[1],T4=function(Ix){return[0,v,[28,Ix]]};return cx(l(n[1][1+dx],n),v,w4,s,T4);case 29:var S4=c[1],E4=function(Ix){return[0,v,[29,Ix]]};return cx(l(n[1][1+H0],n),v,S4,s,E4);case 30:var g4=c[1],A4=function(Ix){return[0,v,[30,Ix]]};return cx(l(n[1][1+g0],n),v,g4,s,A4);case 31:var P4=c[1],C4=function(Ix){return[0,v,[31,Ix]]};return cx(l(n[1][1+Y0],n),v,P4,s,C4);case 32:var N4=c[1],R4=function(Ix){return[0,v,[32,Ix]]};return cx(l(n[1][1+U],n),v,N4,s,R4);case 33:var I4=c[1],O4=function(Ix){return[0,v,[33,Ix]]};return cx(l(n[1][1+c0],n),v,I4,s,O4);case 34:var L4=c[1],M4=function(Ix){return[0,v,[34,Ix]]};return cx(l(n[1][1+g],n),v,L4,s,M4);case 35:var D4=c[1],j4=function(Ix){return[0,v,[35,Ix]]};return cx(l(n[1][1+k],n),v,D4,s,j4);default:var U4=c[1],Rx=function(Ix){return[0,v,[36,Ix]]};return cx(l(n[1][1+e],n),v,U4,s,Rx)}}function ZC0(n,s){var c=s[2],v=s[1],y=s[3],S=Sr(l(n[1][1+yo],n),v),E=Sr(l(n[1][1+yo],n),c);return v===S&&c===E?s:[0,S,E,y]}function WC0(n){var s=l(n[1][1+ex],n);return function(c){return Vx(s,c)}}function $C0(n,s){return s}function QC0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Cx){return[0,v,[0,Cx]]};return cx(l(n[1][1+en],n),v,y,s,S);case 1:var E=c[1],O=function(Cx){return[0,v,[1,Cx]]};return cx(l(n[1][1+sa],n),v,E,s,O);case 2:var W=c[1],d0=function(Cx){return[0,v,[2,Cx]]};return cx(l(n[1][1+P3],n),v,W,s,d0);case 3:var w0=c[1],F0=function(Cx){return[0,v,[3,Cx]]};return cx(l(n[1][1+ia],n),v,w0,s,F0);case 4:var vx=c[1],Lx=function(Cx){return[0,v,[4,Cx]]};return cx(l(n[1][1+Ae],n),v,vx,s,Lx);case 5:var _x=c[1],_r=function(Cx){return[0,v,[5,Cx]]};return cx(l(n[1][1+On],n),v,_x,s,_r);case 6:var f1=c[1],c1=function(Cx){return[0,v,[6,Cx]]};return cx(l(n[1][1+rn],n),v,f1,s,c1);case 7:var y1=c[1],m1=function(Cx){return[0,v,[7,Cx]]};return cx(l(n[1][1+Tt],n),v,y1,s,m1);case 8:var be=c[1],xt=function(Cx){return[0,v,[8,Cx]]};return cx(l(n[1][1+xn],n),v,be,s,xt);case 9:var rt=c[1],Ne=function(Cx){return[0,v,[9,Cx]]};return cx(l(n[1][1+In],n),v,rt,s,Ne);case 10:var et=c[1],tt=function(Cx){return[0,v,[10,Cx]]};return cx(l(n[1][1+F2],n),v,et,s,tt);case 11:var Pt=c[1],nt=function(Cx){return[0,v,[11,Cx]]};return cx(l(n[1][1+L2],n),v,Pt,s,nt);case 12:var ut=c[1],Xn=function(Cx){return[0,v,[12,Cx]]};return cx(l(n[1][1+g2],n),v,ut,s,Xn);case 13:var Jn=c[1],Ss=function(Cx){return[0,v,[13,Cx]]};return cx(l(n[1][1+wt],n),v,Jn,s,Ss);case 14:var Es=c[1],it=function(Cx){return[0,v,[14,Cx]]};return cx(l(n[1][1+_t],n),v,Es,s,it);case 15:var gs=c[1],cv=function(Cx){return[0,v,[15,Cx]]};return cx(l(n[1][1+K1],n),v,gs,s,cv);case 16:var q6=c[1],G6=function(Cx){return[0,v,[16,Cx]]};return cx(l(n[1][1+ge],n),v,q6,s,G6);case 17:var b6=c[1],x4=function(Cx){return[0,v,[17,Cx]]};return cx(l(n[1][1+Ee],n),v,b6,s,x4);case 18:var r4=c[1],e4=function(Cx){return[0,v,[18,Cx]]};return cx(l(n[1][1+$2],n),v,r4,s,e4);case 19:var t4=c[1],n4=function(Cx){return[0,v,[19,Cx]]};return cx(l(n[1][1+_e],n),v,t4,s,n4);case 20:var u4=c[1],i4=function(Cx){return[0,v,[20,Cx]]};return cx(l(n[1][1+Qe],n),v,u4,s,i4);case 21:var f4=c[1],c4=function(Cx){return[0,v,[21,Cx]]};return cx(l(n[1][1+$r],n),v,f4,s,c4);case 22:var s4=c[1],o4=function(Cx){return[0,v,[22,Cx]]};return cx(l(n[1][1+p2],n),v,s4,s,o4);case 23:var v4=c[1],a4=function(Cx){return[0,v,[23,Cx]]};return cx(l(n[1][1+Ir],n),v,v4,s,a4);case 24:var l4=c[1],p4=function(Cx){return[0,v,[24,Cx]]};return cx(l(n[1][1+p1],n),v,l4,s,p4);case 25:var d4=c[1],y4=function(Cx){return[0,v,[25,Cx]]};return cx(l(n[1][1+a1],n),v,d4,s,y4);case 26:var m4=c[1],k4=function(Cx){return[0,v,[26,Cx]]};return cx(l(n[1][1+sr],n),v,m4,s,k4);case 27:var h4=c[1],_4=function(Cx){return[0,v,[27,Cx]]};return cx(l(n[1][1+_3],n),v,h4,s,_4);case 28:var w4=c[1],T4=function(Cx){return[0,v,[28,Cx]]};return cx(l(n[1][1+H9],n),v,w4,s,T4);case 29:var S4=c[1],E4=function(Cx){return[0,v,[29,Cx]]};return cx(l(n[1][1+$9],n),v,S4,s,E4);case 30:var g4=c[1],A4=function(Cx){return[0,v,[30,Cx]]};return cx(l(n[1][1+dr],n),v,g4,s,A4);case 31:var P4=c[1],C4=function(Cx){return[0,v,[31,Cx]]};return cx(l(n[1][1+b],n),v,P4,s,C4);case 32:var N4=c[1],R4=function(Cx){return[0,v,[32,Cx]]};return cx(l(n[1][1+ax],n),v,N4,s,R4);case 33:var I4=c[1],O4=function(Cx){return[0,v,[33,Cx]]};return cx(l(n[1][1+M0],n),v,I4,s,O4);case 34:var L4=c[1],M4=function(Cx){return[0,v,[34,Cx]]};return cx(l(n[1][1+T0],n),v,L4,s,M4);case 35:var D4=c[1],j4=function(Cx){return[0,v,[35,Cx]]};return cx(l(n[1][1+n0],n),v,D4,s,j4);case 36:var U4=c[1],Rx=function(Cx){return[0,v,[36,Cx]]};return cx(l(n[1][1+K1],n),v,U4,s,Rx);case 37:var Ix=c[1],FC0=function(Cx){return[0,v,[37,Cx]]};return cx(l(n[1][1+d],n),v,Ix,s,FC0);case 38:var HC0=c[1],qC0=function(Cx){return[0,v,[38,Cx]]};return cx(l(n[1][1+u],n),v,HC0,s,qC0);default:var GC0=c[1],bC0=function(Cx){return[0,v,[39,Cx]]};return cx(l(n[1][1+t],n),v,GC0,s,bC0)}}return KI(x,[0,j3,function(n,s){var c=s[2],v=c[4],y=c[3],S=c[1],E=c[2],O=s[1],W=p(n[1][1+E0],n,S),d0=p(n[1][1+t0],n,y),w0=Sr(l(n[1][1+yo],n),v);return S===W&&y===d0&&v===w0?s:[0,O,[0,W,E,d0,w0]]},A0,QC0,yo,$C0,t0,WC0,ex,ZC0,Kx,KC0,fe,zC0,D3,VC0,L3,JC0,O3,XC0,ho,YC0,Yn,BC0,en,UC0,sa,jC0,ws,DC0,fv,MC0,v1,LC0,iv,OC0,At,IC0,R3,RC0,N3,NC0,P3,CC0,Un,PC0,ca,AC0,g3,gC0,fa,EC0,C3,SC0,Bn,TC0,A3,wC0,nv,_C0,ko,hC0,E3,kC0,T3,mC0,mo,yC0,S3,dC0,Q2,pC0,ia,lC0,tv,aC0,Ge,vC0,_s,oC0,jn,sC0,Dn,cC0,Mn,fC0,w3,iC0,M2,uC0,Ae,nC0,On,tC0,rn,eC0,Tt,rC0,hs,xC0,Et,bP0,gt,GP0,St,qP0,xn,HP0,In,FP0,Rn,QP0,F2,$P0,L2,WP0,g2,ZP0,wt,KP0,_t,zP0,ge,VP0,Ee,JP0,$2,XP0,_e,YP0,Te,BP0,we,UP0,U1,jP0,Gt,DP0,zr,MP0,Se,LP0,W2,OP0,bt,IP0,He,RP0,i2,NP0,ht,CP0,F1,PP0,Qe,AP0,I1,gP0,$r,EP0,Dr,SP0,Fe,TP0,Mr,wP0,Yr,_P0,p2,hP0,Hr,kP0,p1,mP0,i1,yP0,P1,dP0,a1,pP0,r1,lP0,T1,aP0,Ir,vP0,x1,oP0,u1,sP0,jx,cP0,nx,fP0,j,iP0,q,uP0,C,nP0,mt,tP0,e0,eP0,Cr,rP0,w1,xP0,S0,bA0,x0,GA0,er,qA0,$x,HA0,Zx,FA0,k0,QA0,w,$A0,u2,WA0,rv,ZA0,ua,KA0,po,zA0,gn,VA0,f,JA0,i,XA0,J,YA0,L,BA0,z,UA0,ev,jA0,U6,DA0,lx,MA0,mx,LA0,Yx,OA0,tn,IA0,oa,RA0,Ft,NA0,m0,CA0,We,PA0,ie,AA0,qe,gA0,Q9,EA0,A,SA0,M,TA0,I,wA0,R,_A0,N,hA0,Qo,kA0,B,mA0,P0,yA0,f0,dA0,o0,pA0,v0,lA0,s0,aA0,M3,vA0,T,oA0,Nn,sA0,Q,cA0,F,fA0,Y,iA0,H2,uA0,sr,nA0,kr,tA0,lr,eA0,Vr,rA0,Dx,xA0,h0,bg0,hr,Gg0,R0,qg0,Er,Hg0,Wr,Fg0,I3,Qg0,cr,$g0,j1,Wg0,Z,Zg0,V,Kg0,Pe,zg0,k3,Vg0,$9,Jg0,D,Xg0,Ln,Yg0,na,Bg0,q9,Ug0,G9,jg0,_3,Dg0,H9,Mg0,Y6,Lg0,B6,Og0,a0,Ig0,h3,Rg0,F9,Ng0,X6,Cg0,kt,Pg0,Cn,Ag0,co,gg0,qo,Eg0,Fo,Sg0,Pn,Tg0,xv,wg0,bo,_g0,lo,hg0,ta,kg0,ks,mg0,ea,yg0,ra,dg0,Go,pg0,ao,lg0,Ho,ag0,ke,vg0,ms,og0,vo,sg0,bv,cg0,xa,fg0,so,ig0,ys,ug0,oo,ng0,l2,tg0,he,eg0,dr,MM,qt,pm,$e,lm,jr,H6,An,LM,ds,am,Ht,OM,me,IM,fo,vm,E2,X3,Lr,Y3,G,F6,Hx,Q6,J0,RM,O0,NM,Bx,CM,ix,$6,Wx,PM,K1,AM,bx,gM,o,W6,uv,EM,Q1,SM,l1,TM,Ts,wM,Ce,_M,or,B3,Ox,hM,D0,om,Ex,kM,B0,mM,Px,yM,j0,Z6,X,dM,kx,sm,h,pM,tx,lM,W0,aM,sx,K6,b0,vM,V0,z6,ox,cm,z0,oM,nr,fm,K0,V6,Ux,im,rr,sM,qx,um,X0,cM,N0,J6,$,fM,i0,iM,Sx,uM,b,nm,H,tm,E0,va,L0,nM,C0,em,Q0,rm,U0,tM,dx,eM,ax,rM,xx,xm,H0,U3,g0,xM,rx,bL,Y0,GL,M0,qL,T0,HL,U,FL,c0,QL,g,$L,k,WL,d,ZL,a,KL,u,zL,t,VL,n0,JL,e,b9]),function(n,s){return ky(s,x)}}),HI=function x(r,e,t){return x.fun(r,e,t)};I0(HI,function(x,r,e){var t=e[2];switch(t[0]){case 0:var u=t[1][1];return r2(function(f){return function(o){var a=o[0]===0?o[1][2][2]:o[1][2][1];return G0(HI,x,f,a)}},r,u);case 1:var i=t[1][1];return r2(function(f){return function(o){return o[0]===2?f:G0(HI,x,f,o[1][2][1])}},r,i);case 2:return p(x,r,t[1][1]);default:return r}});var qI=function x(r){return x.fun(r)},yS0=function(x){var r=x[0]===0?x[1][2][2]:x[1][2][1];return l(qI,r)},mS0=function(x){return x[0]===2?0:l(qI,x[1][2][1])};I0(qI,function(x){var r=x[2];switch(r[0]){case 0:return lI(yS0,r[1][1]);case 1:return lI(mS0,r[1][1]);case 2:return 1;default:return 0}});var wn=function(x,r){return[0,r[1],[0,r[2],x]]},PJ=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0;return[0,t,u,e]},y0=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0;return!t&&!u?0:[0,PJ([0,t],[0,u],0)]},J1=function(x,r,e,t){var u=x?x[1]:0,i=r?r[1]:0;return!u&&!i&&!e?0:[0,PJ([0,u],[0,i],e)]},I2=function(x,r){if(x){if(r){var e=r[1],t=x[1],u=[0,Fx(t[2],e[2])];return y0([0,Fx(e[1],t[1])],u,0)}var i=x}else var i=r;return i},GI=function(x,r){if(!r)return x;if(x){var e=r[1],t=x[1],u=e[1],i=t[3],f=t[1],o=[0,Fx(t[2],e[2])];return J1([0,Fx(u,f)],o,i,0)}var a=r[1];return J1([0,a[1]],[0,a[2]],0,0)},CJ=function(x,r){l(Br(x),Cq),p(Br(x),Rq,Nq);var e=r[1];l(l(Br(x),Iq),e),l(Br(x),Oq),l(Br(x),Lq),p(Br(x),Dq,Mq);var t=r[2];return l(l(Br(x),jq),t),l(Br(x),Uq),l(Br(x),Bq)},NJ=function x(r,e){return x.fun(r,e)},kS0=function x(r){return x.fun(r)};I0(NJ,function(x,r){l(Br(x),zq),p(Br(x),Zq,Kq);var e=r[1];if(e){var t=e[1];switch(yy(x,Xq),t[0]){case 0:var u=t[1];l(Br(x),kH),l(l(Br(x),hH),u),l(Br(x),_H);break;case 1:var i=t[1];l(Br(x),wH),l(l(Br(x),TH),i),l(Br(x),SH);break;case 2:var f=t[1];l(Br(x),EH),l(l(Br(x),gH),f),l(Br(x),AH);break;default:var o=t[1];l(Br(x),PH),l(l(Br(x),CH),o),l(Br(x),NH)}yy(x,Jq)}else yy(x,Vq);return l(Br(x),Wq),l(Br(x),$q),p(Br(x),Fq,Qq),CJ(x,r[2]),l(Br(x),Hq),l(Br(x),qq),p(Br(x),bq,Gq),CJ(x,r[3]),l(Br(x),xG),l(Br(x),rG)}),I0(kS0,function(x){var r=Yq[1],e=ZX(0),t=DI(e);return p(Ur(function(u){ze(t,u),LI(t,0);var i=X1(e);return e[2]=0,e[1]=e[4],e[3]=at(e[1]),i},0,r),NJ,x)});var Fr=function(x,r){return[0,x[1],x[2],r[3]]},qs=function(x,r){var e=x[1]-r[1]|0;return e===0?x[2]-r[2]|0:e},RJ=function(x,r){var e=r[1],t=x[1];if(t){var u=t[1];if(e)var i=e[1],f=gJ(i),o=gJ(u)-f|0,a=o===0?Tx(u[1],i[1]):o;else var a=-1}else var a=e?1:0;if(a!==0)return a;var d=qs(x[2],r[2]);return d===0?qs(x[3],r[3]):d},Mo=function(x,r){return RJ(x,r)===0?1:0},IJ=function x(r,e){return x.fun(r,e)};I0(IJ,function(x,r){if(typeof x=="number"){var e=x;if(59<=e)switch(e){case 59:if(typeof r=="number"&&r===59)return 0;break;case 60:if(typeof r=="number"&&r===60)return 0;break;case 61:if(typeof r=="number"&&r===61)return 0;break;case 62:if(typeof r=="number"&&r===62)return 0;break;case 63:if(typeof r=="number"&&r===63)return 0;break;case 64:if(typeof r=="number"&&r===64)return 0;break;case 65:if(typeof r=="number"&&r===65)return 0;break;case 66:if(typeof r=="number"&&r===66)return 0;break;case 67:if(typeof r=="number"&&r===67)return 0;break;case 68:if(typeof r=="number"&&r===68)return 0;break;case 69:if(typeof r=="number"&&r===69)return 0;break;case 70:if(typeof r=="number"&&r===70)return 0;break;case 71:if(typeof r=="number"&&r===71)return 0;break;case 72:if(typeof r=="number"&&r===72)return 0;break;case 73:if(typeof r=="number"&&r===73)return 0;break;case 74:if(typeof r=="number"&&r===74)return 0;break;case 75:if(typeof r=="number"&&r===75)return 0;break;case 76:if(typeof r=="number"&&r===76)return 0;break;case 77:if(typeof r=="number"&&r===77)return 0;break;case 78:if(typeof r=="number"&&r===78)return 0;break;case 79:if(typeof r=="number"&&r===79)return 0;break;case 80:if(typeof r=="number"&&r===80)return 0;break;case 81:if(typeof r=="number"&&r===81)return 0;break;case 82:if(typeof r=="number"&&r===82)return 0;break;case 83:if(typeof r=="number"&&r===83)return 0;break;case 84:if(typeof r=="number"&&r===84)return 0;break;case 85:if(typeof r=="number"&&r===85)return 0;break;case 86:if(typeof r=="number"&&r===86)return 0;break;case 87:if(typeof r=="number"&&r===87)return 0;break;case 88:if(typeof r=="number"&&r===88)return 0;break;case 89:if(typeof r=="number"&&r===89)return 0;break;case 90:if(typeof r=="number"&&r===90)return 0;break;case 91:if(typeof r=="number"&&r===91)return 0;break;case 92:if(typeof r=="number"&&r===92)return 0;break;case 93:if(typeof r=="number"&&r===93)return 0;break;case 94:if(typeof r=="number"&&r===94)return 0;break;case 95:if(typeof r=="number"&&r===95)return 0;break;case 96:if(typeof r=="number"&&r===96)return 0;break;case 97:if(typeof r=="number"&&r===97)return 0;break;case 98:if(typeof r=="number"&&r===98)return 0;break;case 99:if(typeof r=="number"&&r===99)return 0;break;case 100:if(typeof r=="number"&&ot===r)return 0;break;case 101:if(typeof r=="number"&&It===r)return 0;break;case 102:if(typeof r=="number"&&Zf===r)return 0;break;case 103:if(typeof r=="number"&&nn===r)return 0;break;case 104:if(typeof r=="number"&&jt===r)return 0;break;case 105:if(typeof r=="number"&&ct===r)return 0;break;case 106:if(typeof r=="number"&&c2===r)return 0;break;case 107:if(typeof r=="number"&&xe===r)return 0;break;case 108:if(typeof r=="number"&&sn===r)return 0;break;case 109:if(typeof r=="number"&&To===r)return 0;break;case 110:if(typeof r=="number"&&B1===r)return 0;break;case 111:if(typeof r=="number"&&Ot===r)return 0;break;case 112:if(typeof r=="number"&&D2===r)return 0;break;case 113:if(typeof r=="number"&&Nr===r)return 0;break;case 114:if(typeof r=="number"&&st===r)return 0;break;case 115:if(typeof r=="number"&&Eo===r)return 0;break;case 116:if(typeof r=="number"&&Ri===r)return 0;break;default:if(typeof r=="number"&&dv<=r)return 0}else switch(e){case 0:if(typeof r=="number"&&!r)return 0;break;case 1:if(typeof r=="number"&&r===1)return 0;break;case 2:if(typeof r=="number"&&r===2)return 0;break;case 3:if(typeof r=="number"&&r===3)return 0;break;case 4:if(typeof r=="number"&&r===4)return 0;break;case 5:if(typeof r=="number"&&r===5)return 0;break;case 6:if(typeof r=="number"&&r===6)return 0;break;case 7:if(typeof r=="number"&&r===7)return 0;break;case 8:if(typeof r=="number"&&r===8)return 0;break;case 9:if(typeof r=="number"&&r===9)return 0;break;case 10:if(typeof r=="number"&&r===10)return 0;break;case 11:if(typeof r=="number"&&r===11)return 0;break;case 12:if(typeof r=="number"&&r===12)return 0;break;case 13:if(typeof r=="number"&&r===13)return 0;break;case 14:if(typeof r=="number"&&r===14)return 0;break;case 15:if(typeof r=="number"&&r===15)return 0;break;case 16:if(typeof r=="number"&&r===16)return 0;break;case 17:if(typeof r=="number"&&r===17)return 0;break;case 18:if(typeof r=="number"&&r===18)return 0;break;case 19:if(typeof r=="number"&&r===19)return 0;break;case 20:if(typeof r=="number"&&r===20)return 0;break;case 21:if(typeof r=="number"&&r===21)return 0;break;case 22:if(typeof r=="number"&&r===22)return 0;break;case 23:if(typeof r=="number"&&r===23)return 0;break;case 24:if(typeof r=="number"&&r===24)return 0;break;case 25:if(typeof r=="number"&&r===25)return 0;break;case 26:if(typeof r=="number"&&r===26)return 0;break;case 27:if(typeof r=="number"&&r===27)return 0;break;case 28:if(typeof r=="number"&&r===28)return 0;break;case 29:if(typeof r=="number"&&r===29)return 0;break;case 30:if(typeof r=="number"&&r===30)return 0;break;case 31:if(typeof r=="number"&&r===31)return 0;break;case 32:if(typeof r=="number"&&r===32)return 0;break;case 33:if(typeof r=="number"&&r===33)return 0;break;case 34:if(typeof r=="number"&&r===34)return 0;break;case 35:if(typeof r=="number"&&r===35)return 0;break;case 36:if(typeof r=="number"&&r===36)return 0;break;case 37:if(typeof r=="number"&&r===37)return 0;break;case 38:if(typeof r=="number"&&r===38)return 0;break;case 39:if(typeof r=="number"&&r===39)return 0;break;case 40:if(typeof r=="number"&&r===40)return 0;break;case 41:if(typeof r=="number"&&r===41)return 0;break;case 42:if(typeof r=="number"&&r===42)return 0;break;case 43:if(typeof r=="number"&&r===43)return 0;break;case 44:if(typeof r=="number"&&r===44)return 0;break;case 45:if(typeof r=="number"&&r===45)return 0;break;case 46:if(typeof r=="number"&&r===46)return 0;break;case 47:if(typeof r=="number"&&r===47)return 0;break;case 48:if(typeof r=="number"&&r===48)return 0;break;case 49:if(typeof r=="number"&&r===49)return 0;break;case 50:if(typeof r=="number"&&r===50)return 0;break;case 51:if(typeof r=="number"&&r===51)return 0;break;case 52:if(typeof r=="number"&&r===52)return 0;break;case 53:if(typeof r=="number"&&r===53)return 0;break;case 54:if(typeof r=="number"&&r===54)return 0;break;case 55:if(typeof r=="number"&&r===55)return 0;break;case 56:if(typeof r=="number"&&r===56)return 0;break;case 57:if(typeof r=="number"&&r===57)return 0;break;default:if(typeof r=="number"&&r===58)return 0}}else switch(x[0]){case 0:if(typeof r!="number"&&r[0]===0)return Tx(x[1],r[1]);break;case 1:if(typeof r!="number"&&r[0]===1)return Tx(x[1],r[1]);break;case 2:if(typeof r!="number"&&r[0]===2){var t=Tx(x[1],r[1]),u=r[2],i=x[2];return t===0?Tx(i,u):t}break;case 3:if(typeof r!="number"&&r[0]===3){var f=Tx(x[1],r[1]),o=r[2],a=x[2];return f===0?Tx(a,o):f}break;case 4:if(typeof r!="number"&&r[0]===4){var d=Tx(x[1],r[1]),k=r[2],T=x[2];return d===0?Tx(T,k):d}break;case 5:if(typeof r!="number"&&r[0]===5)return Tx(x[1],r[1]);break;case 6:if(typeof r!="number"&&r[0]===6)return Bt(x[1],r[1]);break;case 7:if(typeof r!="number"&&r[0]===7){var g=r[2],A=x[2],N=Tx(x[1],r[1]);if(N!==0)return N;if(!A)return g?-1:0;var R=A[1];return g?Tx(R,g[1]):1}break;case 8:if(typeof r!="number"&&r[0]===8)return Tx(x[1],r[1]);break;case 9:if(typeof r!="number"&&r[0]===9){var I=r[2],M=x[2],L=Tx(x[1],r[1]),z=r[3],V=x[3];if(L!==0)return L;if(M){var Z=M[1];if(I){var $=I[1],i0=0;switch(Z){case 0:if($)i0=1;else var Y=0;break;case 1:if($===1)var Y=0;else i0=1;break;case 2:if($===2)var Y=0;else i0=1;break;case 3:if($===3)var Y=0;else i0=1;break;default:if(4<=$)var Y=0;else i0=1}if(i0)var U=function(ox){switch(ox){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;default:return 4}},J=U($),Y=Bt(U(Z),J);var F=Y}else var F=1}else var F=I?-1:0;return F===0?Tx(V,z):F}break;case 10:if(typeof r!="number"&&r[0]===10){var n0=Tx(x[1],r[1]),Q=r[2],f0=x[2];return n0===0?Tx(f0,Q):n0}break;case 11:if(typeof r!="number"&&r[0]===11){var s0=Tx(x[1],r[1]),v0=r[2],o0=x[2];return s0===0?Tx(o0,v0):s0}break;case 12:if(typeof r!="number"&&r[0]===12)return Tx(x[1],r[1]);break;case 13:if(typeof r!="number"&&r[0]===13)return Tx(x[1],r[1]);break;case 14:if(typeof r!="number"&&r[0]===14)return Bt(x[1],r[1]);break;case 15:if(typeof r!="number"&&r[0]===15){var c0=Tx(x[1],r[1]),T0=r[4],E0=r[3],M0=r[2],Y0=x[4],rx=x[3],g0=x[2];if(c0!==0)return c0;var H0=Bt(g0,M0);if(H0!==0)return H0;var t0=Bt(rx,E0);return t0===0?Bt(Y0,T0):t0}break;case 16:if(typeof r!="number"&&r[0]===16){var ex=Bt(x[1],r[1]),xx=r[2],ax=x[2];return ex===0?Tx(ax,xx):ex}break;case 17:if(typeof r!="number"&&r[0]===17)return Bt(x[1],r[1]);break;case 18:if(typeof r!="number"&&r[0]===18)return Tx(x[1],r[1]);break;case 19:if(typeof r!="number"&&r[0]===19)return Tx(x[1],r[1]);break;case 20:if(typeof r!="number"&&r[0]===20)return Tx(x[1],r[1]);break;case 21:if(typeof r!="number"&&r[0]===21){var dx=Tx(x[1],r[1]),mx=r[2],L0=x[2];return dx===0?Tx(L0,mx):dx}break;case 22:if(typeof r!="number"&&r[0]===22){var C0=r[1],A0=x[1];if(yl===A0){if(yl===C0)return 0}else if(cl<=A0){if(cl===C0)return 0}else if(sY===C0)return 0;var U0=function(X0){return yl===X0?0:cl<=X0?2:1},Q0=U0(C0);return Bt(U0(A0),Q0)}break;case 23:if(typeof r!="number"&&r[0]===23)return Tx(x[1],r[1]);break;case 24:if(typeof r!="number"&&r[0]===24)return Tx(x[1],r[1]);break;case 25:if(typeof r!="number"&&r[0]===25){var H=Tx(x[1],r[1]),b=r[2],B=x[2];return H===0?Tx(B,b):H}break;case 26:if(typeof r!="number"&&r[0]===26){var a0=Tx(x[1],r[1]),m0=r[2],P0=x[2];return a0===0?Tx(P0,m0):a0}break;default:if(typeof r!="number"&&r[0]===27)return Tx(x[1],r[1])}function D(X0){if(typeof X0!="number")switch(X0[0]){case 0:return 20;case 1:return 21;case 2:return 23;case 3:return 24;case 4:return 25;case 5:return 26;case 6:return 27;case 7:return 28;case 8:return 30;case 9:return 31;case 10:return 32;case 11:return 34;case 12:return 35;case 13:return 37;case 14:return 40;case 15:return 52;case 16:return 55;case 17:return 57;case 18:return 66;case 19:return 75;case 20:return 84;case 21:return 91;case 22:return Ot;case 23:return Ca;case 24:return Lf;case 25:return Ep;case 26:return Rj;default:return TB}var D0=X0;if(59<=D0)switch(D0){case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 82;case 63:return 83;case 64:return 85;case 65:return 86;case 66:return 87;case 67:return 88;case 68:return 89;case 69:return 90;case 70:return 92;case 71:return 93;case 72:return 94;case 73:return 95;case 74:return 96;case 75:return 97;case 76:return 98;case 77:return 99;case 78:return ot;case 79:return It;case 80:return Zf;case 81:return nn;case 82:return jt;case 83:return ct;case 84:return c2;case 85:return xe;case 86:return sn;case 87:return To;case 88:return B1;case 89:return D2;case 90:return Nr;case 91:return st;case 92:return Eo;case 93:return Ri;case 94:return dv;case 95:return ma;case 96:return il;case 97:return br;case 98:return Lt;case 99:return Da;case 100:return Di;case 101:return K4;case 102:return Xr;case 103:return h1;case 104:return wl;case 105:return ud;case 106:return eN;case 107:return iD;case 108:return YU;case 109:return hY;case 110:return $j;case 111:return VD;case 112:return Bw;case 113:return rU;case 114:return mj;case 115:return KU;case 116:return LB;default:return ej}switch(D0){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 6;case 7:return 7;case 8:return 8;case 9:return 9;case 10:return 10;case 11:return 11;case 12:return 12;case 13:return 13;case 14:return 14;case 15:return 15;case 16:return 16;case 17:return 17;case 18:return 18;case 19:return 19;case 20:return 22;case 21:return 29;case 22:return 33;case 23:return 36;case 24:return 38;case 25:return 39;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 53;case 38:return 54;case 39:return 56;case 40:return 58;case 41:return 59;case 42:return 60;case 43:return 61;case 44:return 62;case 45:return 63;case 46:return 64;case 47:return 65;case 48:return 67;case 49:return 68;case 50:return 69;case 51:return 70;case 52:return 71;case 53:return 72;case 54:return 73;case 55:return 74;case 56:return 76;case 57:return 77;default:return 78}}var N0=D(r);return Bt(D(x),N0)});var hS0=[qr,ax0,Js(0)],_S0=function(x){if(typeof x=="number"){var r=x;if(59<=r)switch(r){case 59:return ob;case 60:return vb;case 61:return ab;case 62:return lb;case 63:return pb;case 64:return db;case 65:return yb;case 66:return mb;case 67:return kb;case 68:return hb;case 69:return _b;case 70:return wb;case 71:return Tb;case 72:return Sb;case 73:return Eb;case 74:return gb;case 75:return Ab;case 76:return Pb;case 77:return Cb;case 78:return Nb;case 79:return Rb;case 80:return Ib;case 81:return Ob;case 82:return Lb;case 83:return Mb;case 84:return Db;case 85:return jb;case 86:return Ub;case 87:return Bb;case 88:return Yb;case 89:return Xb;case 90:return Jb;case 91:return Vb;case 92:return zb;case 93:return Kb;case 94:return Zb;case 95:return Wb;case 96:return $b;case 97:return Qb;case 98:return Fb;case 99:return Hb;case 100:return qb;case 101:return Gb;case 102:return bb;case 103:return x00;case 104:return r00;case 105:return e00;case 106:return t00;case 107:return n00;case 108:return u00;case 109:return i00;case 110:return f00;case 111:return c00;case 112:return s00;case 113:return o00;case 114:return v00;case 115:return a00;case 116:return l00;default:return p00}switch(r){case 0:return eG;case 1:return tG;case 2:return nG;case 3:return Qx(iG,uG);case 4:return fG;case 5:return cG;case 6:return sG;case 7:return oG;case 8:return vG;case 9:return aG;case 10:return lG;case 11:return pG;case 12:return Qx(yG,dG);case 13:return mG;case 14:return kG;case 15:return hG;case 16:return _G;case 17:return wG;case 18:return TG;case 19:return SG;case 20:return EG;case 21:return gG;case 22:return AG;case 23:return PG;case 24:return CG;case 25:return NG;case 26:return RG;case 27:return IG;case 28:return OG;case 29:return LG;case 30:return MG;case 31:return DG;case 32:return jG;case 33:return UG;case 34:return Qx(YG,BG);case 35:return XG;case 36:return JG;case 37:return VG;case 38:return zG;case 39:return KG;case 40:return ZG;case 41:return WG;case 42:return $G;case 43:return QG;case 44:return FG;case 45:return HG;case 46:return qG;case 47:return GG;case 48:return bG;case 49:return xb;case 50:return rb;case 51:return eb;case 52:return tb;case 53:return nb;case 54:return ub;case 55:return ib;case 56:return fb;case 57:return cb;default:return sb}}switch(x[0]){case 0:var e=x[1];return l(Tr(d00),e);case 1:var t=x[1];return l(Tr(y00),t);case 2:var u=x[2],i=x[1];return p(Tr(m00),u,i);case 3:var f=x[2],o=x[1];return G0(Tr(k00),f,f,o);case 4:var a=x[2],d=x[1];return p(Tr(h00),a,d);case 5:var k=x[1];return l(Tr(_00),k);case 6:return x[1]?w00:T00;case 7:var T=x[2],g=x[1],A=l(Tr(S00),g);if(!T)return l(Tr(g00),A);var N=T[1];return p(Tr(E00),N,A);case 8:var R=x[1];return p(Tr(A00),R,R);case 9:var I=x[3],M=x[2],L=x[1];if(!M)return p(Tr(N00),I,L);var z=M[1];if(z===3)return p(Tr(C00),I,L);switch(z){case 0:var V=lH;break;case 1:var V=pH;break;case 2:var V=dH;break;case 3:var V=yH;break;default:var V=mH}return ve(Tr(P00),L,V,I,V);case 10:var Z=x[2],$=x[1],i0=dX(Z);return G0(Tr(R00),Z,i0,$);case 11:var U=x[2],J=x[1];return p(Tr(I00),U,J);case 12:var Y=x[1];return l(Tr(O00),Y);case 13:var F=x[1];return l(Tr(L00),F);case 14:return x[1]?Qx(D00,M00):Qx(U00,j00);case 15:var n0=x[1],Q=x[4],f0=x[3],s0=x[2]?B00:Y00,v0=f0?X00:J00,o0=Q?Qx(V00,n0):n0;return G0(Tr(z00),s0,v0,o0);case 16:var c0=x[2],T0=[0,0],E0=[0,Xx(c0)],M0=Xx(c0)-1|0,Y0=x[1];if(M0>=0)for(var rx=M0;;){if(fx(c0,rx)===45){var g0=T0[1];T0[1]=[0,k2(c0,rx+1|0,(E0[1]-rx|0)-1|0),g0],E0[1]=rx}var H0=rx-1|0;if(rx!==0){var rx=H0;continue}break}var t0=T0[1],ex=k2(c0,0,E0[1]);if(t0)for(var xx=[0,ex,_n(dX,t0)],ax=0,dx=xx,mx=0;;){if(dx){var L0=dx[1];if(dx[2]){var C0=(Xx(L0)|0)+ax|0,A0=dx[2],U0=ax<=C0?C0:m2(XW),ax=U0,dx=A0;continue}var Q0=Xx(L0)+ax|0}else var Q0=ax;for(var H=S1(Q0),b=mx,B=xx;;){if(B){var a0=B[1];if(B[2]){var m0=B[2];rs(a0,0,H,b,Xx(a0)),rs(hx,0,H,b+Xx(a0)|0,0);var b=b+Xx(a0)|0|0,B=m0;continue}rs(a0,0,H,b,Xx(a0))}var P0=A2(H);break}break}else var P0=ex;var D=Y0?K00:Z00;return G0(Tr(W00),c0,P0,D);case 17:var N0=x[1]?$00:Q00;return l(Tr(F00),N0);case 18:var X0=x[1];return l(Tr(H00),X0);case 19:var D0=x[1];return l(Tr(q00),D0);case 20:var ox=x[1];return l(Tr(G00),ox);case 21:var b0=x[2],kx=x[1];return p(Tr(b00),kx,b0);case 22:var V0=x[1];if(yl===V0)var h=nx0,X=ux0;else if(cl<=V0)var h=xx0,X=rx0;else var h=ex0,X=tx0;return p(Tr(ix0),X,h);case 23:var W0=x[1];return l(Tr(fx0),W0);case 24:var sx=x[1];return l(Tr(cx0),sx);case 25:var tx=x[2],j0=x[1];return p(Tr(sx0),j0,tx);case 26:var Px=x[2],Ex=x[1];return p(Tr(ox0),Ex,Px);default:var Ox=x[1];return l(Tr(vx0),Ox)}},OJ=lx0.slice(),bI=function(x){for(var r=0,e=OJ.length-1-1|0;;){if(ex)return 1;var r=t+1|0}},LJ=0,MJ=function(x){var r=x[2];return[0,x[1],[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12]],x[3],x[4],x[5],x[6],x[7]]},DJ=function(x){return x[3][1]},Ey=function(x,r){return x!==r[4]?[0,r[1],r[2],r[3],x,r[5],r[6],r[7]]:r},xO=function x(r,e){return x.fun(r,e)},jJ=function x(r,e){return x.fun(r,e)},rO=function x(r,e){return x.fun(r,e)},eO=function x(r,e){return x.fun(r,e)};I0(xO,function(x,r){if(typeof x=="number"){var e=x;if(66<=e)if(99<=e)switch(e){case 99:if(typeof r=="number"&&r===99)return 1;break;case 100:if(typeof r=="number"&&ot===r)return 1;break;case 101:if(typeof r=="number"&&It===r)return 1;break;case 102:if(typeof r=="number"&&Zf===r)return 1;break;case 103:if(typeof r=="number"&&nn===r)return 1;break;case 104:if(typeof r=="number"&&jt===r)return 1;break;case 105:if(typeof r=="number"&&ct===r)return 1;break;case 106:if(typeof r=="number"&&c2===r)return 1;break;case 107:if(typeof r=="number"&&xe===r)return 1;break;case 108:if(typeof r=="number"&&sn===r)return 1;break;case 109:if(typeof r=="number"&&To===r)return 1;break;case 110:if(typeof r=="number"&&B1===r)return 1;break;case 111:if(typeof r=="number"&&Ot===r)return 1;break;case 112:if(typeof r=="number"&&D2===r)return 1;break;case 113:if(typeof r=="number"&&Nr===r)return 1;break;case 114:if(typeof r=="number"&&st===r)return 1;break;case 115:if(typeof r=="number"&&Eo===r)return 1;break;case 116:if(typeof r=="number"&&Ri===r)return 1;break;case 117:if(typeof r=="number"&&dv===r)return 1;break;case 118:if(typeof r=="number"&&ma===r)return 1;break;case 119:if(typeof r=="number"&&Ca===r)return 1;break;case 120:if(typeof r=="number"&&Lf===r)return 1;break;case 121:if(typeof r=="number"&&il===r)return 1;break;case 122:if(typeof r=="number"&&br===r)return 1;break;case 123:if(typeof r=="number"&&Lt===r)return 1;break;case 124:if(typeof r=="number"&&Da===r)return 1;break;case 125:if(typeof r=="number"&&Di===r)return 1;break;case 126:if(typeof r=="number"&&K4===r)return 1;break;case 127:if(typeof r=="number"&&Xr===r)return 1;break;case 128:if(typeof r=="number"&&h1===r)return 1;break;case 129:if(typeof r=="number"&&wl===r)return 1;break;case 130:if(typeof r=="number"&&ud===r)return 1;break;default:if(typeof r=="number"&&Ep<=r)return 1}else switch(e){case 66:if(typeof r=="number"&&r===66)return 1;break;case 67:if(typeof r=="number"&&r===67)return 1;break;case 68:if(typeof r=="number"&&r===68)return 1;break;case 69:if(typeof r=="number"&&r===69)return 1;break;case 70:if(typeof r=="number"&&r===70)return 1;break;case 71:if(typeof r=="number"&&r===71)return 1;break;case 72:if(typeof r=="number"&&r===72)return 1;break;case 73:if(typeof r=="number"&&r===73)return 1;break;case 74:if(typeof r=="number"&&r===74)return 1;break;case 75:if(typeof r=="number"&&r===75)return 1;break;case 76:if(typeof r=="number"&&r===76)return 1;break;case 77:if(typeof r=="number"&&r===77)return 1;break;case 78:if(typeof r=="number"&&r===78)return 1;break;case 79:if(typeof r=="number"&&r===79)return 1;break;case 80:if(typeof r=="number"&&r===80)return 1;break;case 81:if(typeof r=="number"&&r===81)return 1;break;case 82:if(typeof r=="number"&&r===82)return 1;break;case 83:if(typeof r=="number"&&r===83)return 1;break;case 84:if(typeof r=="number"&&r===84)return 1;break;case 85:if(typeof r=="number"&&r===85)return 1;break;case 86:if(typeof r=="number"&&r===86)return 1;break;case 87:if(typeof r=="number"&&r===87)return 1;break;case 88:if(typeof r=="number"&&r===88)return 1;break;case 89:if(typeof r=="number"&&r===89)return 1;break;case 90:if(typeof r=="number"&&r===90)return 1;break;case 91:if(typeof r=="number"&&r===91)return 1;break;case 92:if(typeof r=="number"&&r===92)return 1;break;case 93:if(typeof r=="number"&&r===93)return 1;break;case 94:if(typeof r=="number"&&r===94)return 1;break;case 95:if(typeof r=="number"&&r===95)return 1;break;case 96:if(typeof r=="number"&&r===96)return 1;break;case 97:if(typeof r=="number"&&r===97)return 1;break;default:if(typeof r=="number"&&r===98)return 1}else if(33<=e)switch(e){case 33:if(typeof r=="number"&&r===33)return 1;break;case 34:if(typeof r=="number"&&r===34)return 1;break;case 35:if(typeof r=="number"&&r===35)return 1;break;case 36:if(typeof r=="number"&&r===36)return 1;break;case 37:if(typeof r=="number"&&r===37)return 1;break;case 38:if(typeof r=="number"&&r===38)return 1;break;case 39:if(typeof r=="number"&&r===39)return 1;break;case 40:if(typeof r=="number"&&r===40)return 1;break;case 41:if(typeof r=="number"&&r===41)return 1;break;case 42:if(typeof r=="number"&&r===42)return 1;break;case 43:if(typeof r=="number"&&r===43)return 1;break;case 44:if(typeof r=="number"&&r===44)return 1;break;case 45:if(typeof r=="number"&&r===45)return 1;break;case 46:if(typeof r=="number"&&r===46)return 1;break;case 47:if(typeof r=="number"&&r===47)return 1;break;case 48:if(typeof r=="number"&&r===48)return 1;break;case 49:if(typeof r=="number"&&r===49)return 1;break;case 50:if(typeof r=="number"&&r===50)return 1;break;case 51:if(typeof r=="number"&&r===51)return 1;break;case 52:if(typeof r=="number"&&r===52)return 1;break;case 53:if(typeof r=="number"&&r===53)return 1;break;case 54:if(typeof r=="number"&&r===54)return 1;break;case 55:if(typeof r=="number"&&r===55)return 1;break;case 56:if(typeof r=="number"&&r===56)return 1;break;case 57:if(typeof r=="number"&&r===57)return 1;break;case 58:if(typeof r=="number"&&r===58)return 1;break;case 59:if(typeof r=="number"&&r===59)return 1;break;case 60:if(typeof r=="number"&&r===60)return 1;break;case 61:if(typeof r=="number"&&r===61)return 1;break;case 62:if(typeof r=="number"&&r===62)return 1;break;case 63:if(typeof r=="number"&&r===63)return 1;break;case 64:if(typeof r=="number"&&r===64)return 1;break;default:if(typeof r=="number"&&r===65)return 1}else switch(e){case 0:if(typeof r=="number"&&!r)return 1;break;case 1:if(typeof r=="number"&&r===1)return 1;break;case 2:if(typeof r=="number"&&r===2)return 1;break;case 3:if(typeof r=="number"&&r===3)return 1;break;case 4:if(typeof r=="number"&&r===4)return 1;break;case 5:if(typeof r=="number"&&r===5)return 1;break;case 6:if(typeof r=="number"&&r===6)return 1;break;case 7:if(typeof r=="number"&&r===7)return 1;break;case 8:if(typeof r=="number"&&r===8)return 1;break;case 9:if(typeof r=="number"&&r===9)return 1;break;case 10:if(typeof r=="number"&&r===10)return 1;break;case 11:if(typeof r=="number"&&r===11)return 1;break;case 12:if(typeof r=="number"&&r===12)return 1;break;case 13:if(typeof r=="number"&&r===13)return 1;break;case 14:if(typeof r=="number"&&r===14)return 1;break;case 15:if(typeof r=="number"&&r===15)return 1;break;case 16:if(typeof r=="number"&&r===16)return 1;break;case 17:if(typeof r=="number"&&r===17)return 1;break;case 18:if(typeof r=="number"&&r===18)return 1;break;case 19:if(typeof r=="number"&&r===19)return 1;break;case 20:if(typeof r=="number"&&r===20)return 1;break;case 21:if(typeof r=="number"&&r===21)return 1;break;case 22:if(typeof r=="number"&&r===22)return 1;break;case 23:if(typeof r=="number"&&r===23)return 1;break;case 24:if(typeof r=="number"&&r===24)return 1;break;case 25:if(typeof r=="number"&&r===25)return 1;break;case 26:if(typeof r=="number"&&r===26)return 1;break;case 27:if(typeof r=="number"&&r===27)return 1;break;case 28:if(typeof r=="number"&&r===28)return 1;break;case 29:if(typeof r=="number"&&r===29)return 1;break;case 30:if(typeof r=="number"&&r===30)return 1;break;case 31:if(typeof r=="number"&&r===31)return 1;break;default:if(typeof r=="number"&&r===32)return 1}}else switch(x[0]){case 0:if(typeof r!="number"&&r[0]===0){var t=r[2],u=r[1],i=x[2],f=l(l(rO,x[1]),u);return f&&Ar(i,t)}break;case 1:if(typeof r!="number"&&r[0]===1){var o=r[2],a=r[1],d=x[2],k=l(l(eO,x[1]),a);return k&&Ar(d,o)}break;case 2:if(typeof r!="number"&&r[0]===2){var T=r[1],g=x[1],A=T[4],N=T[3],R=T[2],I=g[4],M=g[3],L=g[2],z=Mo(g[1],T[1]),V=z&&Ar(L,R),Z=V&&Ar(M,N);return Z&&(I===A?1:0)}break;case 3:if(typeof r!="number"&&r[0]===3){var $=r[1],i0=x[1],U=$[5],J=$[4],Y=$[3],F=$[2],n0=i0[5],Q=i0[4],f0=i0[3],s0=i0[2],v0=Mo(i0[1],$[1]),o0=v0&&Ar(s0,F),c0=o0&&Ar(f0,Y),T0=c0&&(Q===J?1:0);return T0&&(n0===U?1:0)}break;case 4:if(typeof r!="number"&&r[0]===4){var E0=r[3],M0=r[2],Y0=x[3],rx=x[2],g0=Mo(x[1],r[1]),H0=g0&&Ar(rx,M0);return H0&&Ar(Y0,E0)}break;case 5:if(typeof r!="number"&&r[0]===5){var t0=r[3],ex=r[2],xx=x[3],ax=x[2],dx=Mo(x[1],r[1]),mx=dx&&Ar(ax,ex);return mx&&Ar(xx,t0)}break;case 6:if(typeof r!="number"&&r[0]===6){var L0=r[2],C0=x[2],A0=Mo(x[1],r[1]);return A0&&Ar(C0,L0)}break;case 7:if(typeof r!="number"&&r[0]===7)return Ar(x[1],r[1]);break;case 8:if(typeof r!="number"&&r[0]===8){var U0=Ar(x[1],r[1]),Q0=r[2],H=x[2];return U0&&Mo(H,Q0)}break;case 9:if(typeof r!="number"&&r[0]===9){var b=r[3],B=r[2],a0=x[3],m0=x[2],P0=Mo(x[1],r[1]),D=P0&&Ar(m0,B);return D&&Ar(a0,b)}break;case 10:if(typeof r!="number"&&r[0]===10){var N0=r[3],X0=r[2],D0=x[3],ox=x[2],b0=Mo(x[1],r[1]),kx=b0&&Ar(ox,X0);return kx&&Ar(D0,N0)}break;case 11:if(typeof r!="number"&&r[0]===11){var V0=r[1];return l(l(jJ,x[1]),V0)}break;case 12:if(typeof r!="number"&&r[0]===12){var h=r[3],X=r[2],W0=r[1],sx=x[3],tx=x[2],j0=l(l(rO,x[1]),W0),Px=j0&&(tx==X?1:0);return Px&&Ar(sx,h)}break;default:if(typeof r!="number"&&r[0]===13){var Ex=r[2],Ox=x[2],qx=r[3],B0=r[1],rr=x[3],Ux=l(l(eO,x[1]),B0);if(Ux){var K0=0;if(Ox)if(Ex)var nr=Nl(Ox[1],Ex[1]);else K0=1;else if(Ex)K0=1;else var nr=1;if(K0)var nr=0;var z0=nr}else var z0=Ux;return z0&&Ar(rr,qx)}}return 0}),I0(jJ,function(x,r){if(x){if(r)return 1}else if(!r)return 1;return 0}),I0(rO,function(x,r){switch(x){case 0:if(!r)return 1;break;case 1:if(r===1)return 1;break;case 2:if(r===2)return 1;break;case 3:if(r===3)return 1;break;default:if(4<=r)return 1}return 0}),I0(eO,function(x,r){switch(x){case 0:if(!r)return 1;break;case 1:if(r===1)return 1;break;default:if(2<=r)return 1}return 0});var UJ=function(x){if(typeof x!="number")switch(x[0]){case 0:return Yt0;case 1:return Xt0;case 2:return Jt0;case 3:return Vt0;case 4:return zt0;case 5:return Kt0;case 6:return Zt0;case 7:return Wt0;case 8:return $t0;case 9:return Qt0;case 10:return Ft0;case 11:return Ht0;case 12:return qt0;default:return Gt0}var r=x;if(66<=r){if(99<=r)switch(r){case 99:return it0;case 100:return ft0;case 101:return ct0;case 102:return st0;case 103:return ot0;case 104:return vt0;case 105:return at0;case 106:return lt0;case 107:return pt0;case 108:return dt0;case 109:return yt0;case 110:return mt0;case 111:return kt0;case 112:return ht0;case 113:return _t0;case 114:return wt0;case 115:return Tt0;case 116:return St0;case 117:return Et0;case 118:return gt0;case 119:return At0;case 120:return Pt0;case 121:return Ct0;case 122:return Nt0;case 123:return Rt0;case 124:return It0;case 125:return Ot0;case 126:return Lt0;case 127:return Mt0;case 128:return Dt0;case 129:return jt0;case 130:return Ut0;default:return Bt0}switch(r){case 66:return Pe0;case 67:return Ce0;case 68:return Ne0;case 69:return Re0;case 70:return Ie0;case 71:return Oe0;case 72:return Le0;case 73:return Me0;case 74:return De0;case 75:return je0;case 76:return Ue0;case 77:return Be0;case 78:return Ye0;case 79:return Xe0;case 80:return Je0;case 81:return Ve0;case 82:return ze0;case 83:return Ke0;case 84:return Ze0;case 85:return We0;case 86:return $e0;case 87:return Qe0;case 88:return Fe0;case 89:return He0;case 90:return qe0;case 91:return Ge0;case 92:return be0;case 93:return xt0;case 94:return rt0;case 95:return et0;case 96:return tt0;case 97:return nt0;default:return ut0}}if(33<=r)switch(r){case 33:return Q20;case 34:return F20;case 35:return H20;case 36:return q20;case 37:return G20;case 38:return b20;case 39:return xe0;case 40:return re0;case 41:return ee0;case 42:return te0;case 43:return ne0;case 44:return ue0;case 45:return ie0;case 46:return fe0;case 47:return ce0;case 48:return se0;case 49:return oe0;case 50:return ve0;case 51:return ae0;case 52:return le0;case 53:return pe0;case 54:return de0;case 55:return ye0;case 56:return me0;case 57:return ke0;case 58:return he0;case 59:return _e0;case 60:return we0;case 61:return Te0;case 62:return Se0;case 63:return Ee0;case 64:return ge0;default:return Ae0}switch(r){case 0:return d20;case 1:return y20;case 2:return m20;case 3:return k20;case 4:return h20;case 5:return _20;case 6:return w20;case 7:return T20;case 8:return S20;case 9:return E20;case 10:return g20;case 11:return A20;case 12:return P20;case 13:return C20;case 14:return N20;case 15:return R20;case 16:return I20;case 17:return O20;case 18:return L20;case 19:return M20;case 20:return D20;case 21:return j20;case 22:return U20;case 23:return B20;case 24:return Y20;case 25:return X20;case 26:return J20;case 27:return V20;case 28:return z20;case 29:return K20;case 30:return Z20;case 31:return W20;default:return $20}},tO=function(x){if(typeof x!="number")switch(x[0]){case 0:return x[2];case 1:return x[2];case 2:return x[1][3];case 3:var r=x[1],e=r[5],t=r[4],u=r[3];return t&&e?Qx(n20,Qx(u,t20)):t?Qx(i20,Qx(u,u20)):e?Qx(c20,Qx(u,f20)):Qx(o20,Qx(u,s20));case 4:return x[3];case 5:var i=x[2];return Qx(a20,Qx(i,Qx(v20,x[3])));case 6:return x[2];case 7:return x[1];case 8:return x[1];case 9:return x[3];case 10:return x[3];case 11:return x[1]?l20:p20;case 12:return x[3];default:return x[3]}var f=x;if(66<=f){if(99<=f)switch(f){case 99:return E10;case 100:return g10;case 101:return A10;case 102:return P10;case 103:return C10;case 104:return N10;case 105:return R10;case 106:return I10;case 107:return O10;case 108:return L10;case 109:return M10;case 110:return D10;case 111:return j10;case 112:return U10;case 113:return B10;case 114:return Y10;case 115:return X10;case 116:return J10;case 117:return V10;case 118:return z10;case 119:return K10;case 120:return Z10;case 121:return W10;case 122:return $10;case 123:return Q10;case 124:return F10;case 125:return H10;case 126:return q10;case 127:return G10;case 128:return b10;case 129:return x20;case 130:return r20;default:return e20}switch(f){case 66:return Zr0;case 67:return Wr0;case 68:return $r0;case 69:return Qr0;case 70:return Fr0;case 71:return Hr0;case 72:return qr0;case 73:return Gr0;case 74:return br0;case 75:return x10;case 76:return r10;case 77:return e10;case 78:return t10;case 79:return n10;case 80:return u10;case 81:return i10;case 82:return f10;case 83:return c10;case 84:return s10;case 85:return o10;case 86:return v10;case 87:return a10;case 88:return l10;case 89:return p10;case 90:return d10;case 91:return y10;case 92:return m10;case 93:return k10;case 94:return h10;case 95:return _10;case 96:return w10;case 97:return T10;default:return S10}}if(33<=f)switch(f){case 33:return ar0;case 34:return lr0;case 35:return pr0;case 36:return dr0;case 37:return yr0;case 38:return mr0;case 39:return kr0;case 40:return hr0;case 41:return _r0;case 42:return wr0;case 43:return Tr0;case 44:return Sr0;case 45:return Er0;case 46:return gr0;case 47:return Ar0;case 48:return Pr0;case 49:return Cr0;case 50:return Nr0;case 51:return Rr0;case 52:return Ir0;case 53:return Or0;case 54:return Lr0;case 55:return Mr0;case 56:return Dr0;case 57:return jr0;case 58:return Ur0;case 59:return Br0;case 60:return Yr0;case 61:return Xr0;case 62:return Jr0;case 63:return Vr0;case 64:return zr0;default:return Kr0}switch(f){case 0:return Lx0;case 1:return Mx0;case 2:return Dx0;case 3:return jx0;case 4:return Ux0;case 5:return Bx0;case 6:return Yx0;case 7:return Xx0;case 8:return Jx0;case 9:return Vx0;case 10:return zx0;case 11:return Kx0;case 12:return Zx0;case 13:return Wx0;case 14:return $x0;case 15:return Qx0;case 16:return Fx0;case 17:return Hx0;case 18:return qx0;case 19:return Gx0;case 20:return bx0;case 21:return xr0;case 22:return rr0;case 23:return er0;case 24:return tr0;case 25:return nr0;case 26:return ur0;case 27:return ir0;case 28:return fr0;case 29:return cr0;case 30:return sr0;case 31:return or0;default:return vr0}},gy=function(x){return l(Tr(Ox0),x)},nO=function(x,r){var e=x?x[1]:0,t=0;if(typeof r=="number")if(Nr===r)var u=yx0,i=mx0;else t=1;else switch(r[0]){case 3:var u=kx0,i=hx0;break;case 5:var u=_x0,i=wx0;break;case 0:case 12:var u=Sx0,i=Ex0;break;case 1:case 13:var u=gx0,i=Ax0;break;case 4:case 8:var u=Nx0,i=Rx0;break;case 6:case 7:case 11:t=1;break;default:var u=Px0,i=Cx0}if(t)var u=Tx0,i=gy(tO(r));return e?Qx(u,Qx(Ix0,i)):i},wS0=function(x){return Rv>>0)var t=_(x);else switch(e){case 0:var t=1;break;case 1:var t=2;break;case 2:var t=0;break;default:if(r0(x,2),Xo(m(x))===0){var u=Vv(m(x));if(u===0)var t=Pr(m(x))===0&&Pr(m(x))===0&&Pr(m(x))===0?0:_(x);else if(u===1&&Pr(m(x))===0)for(;;){var i=Jv(m(x));if(i!==0){var t=i===1?0:_(x);break}}else var t=_(x)}else var t=_(x)}if(2>>0)throw q0([0,wr,bt0],1);switch(t){case 0:continue;case 1:return 1;default:if(bI(lJ(x)))continue;return dJ(x,1),0}}},Hy=function(x,r){var e=r-x[3][2]|0;return[0,DJ(x),e]},n6=function(x,r,e){var t=Hy(x,e),u=Hy(x,r);return[0,x[1],u,t]},_2=function(x,r){return Hy(x,r[6])},de=function(x,r){return Hy(x,r[3])},Jr=function(x,r){return n6(x,r[6],r[3])},fV=function(x,r){var e=0;if(typeof r=="number")e=1;else switch(r[0]){case 2:var t=r[1][1];break;case 3:return r[1][1];case 4:var t=r[1];break;case 5:return r[1];case 8:var t=r[2];break;case 9:return r[1];case 10:return r[1];default:e=1}return e?Jr(x,x[2]):t},w2=function(x,r,e){return[0,x[1],x[2],x[3],x[4],x[5],[0,[0,r,e],x[6]],x[7]]},cV=function(x,r,e){return w2(x,r,[24,gy(e)])},oO=function(x,r,e,t){return w2(x,r,[25,e,t])},dt=function(x,r){return w2(x,r,ks0)},K2=function(x,r){var e=r[3],t=[0,DJ(x)+1|0,e];return[0,x[1],x[2],t,x[4],x[5],x[6],x[7]]},Kt=function(x,r,e,t,u){var i=[0,x[1],r,e],f=X1(t),o=u?0:1;return[0,i,[0,o,f,x[7][3][1]>>0)var a=_(t);else switch(o){case 0:var a=2;break;case 1:for(;;){r0(t,3);var d=m(t),k=-1>>0)return Nx(vs0);switch(a){case 0:var A=oV(i,e,t,2,0),N=A[1],R=vt(Qx(as0,A[2])),I=0<=R?1:0,M=I&&(R<=55295?1:0);if(M)var z=M;else var L=57344<=R?1:0,z=L&&(R<=_5?1:0);var V=z?sV(i,N,R):w2(i,N,32);is(u,R);var i=V;continue;case 1:var Z=oV(i,e,t,3,1),$=Z[1],i0=vt(Qx(ls0,Z[2])),U=sV(i,$,i0);is(u,i0);var i=U;continue;case 2:return[0,i,X1(u)];default:wy(t,u);continue}}},N1=function(x,r,e){var t=dt(x,Jr(x,r));return Ga(r),p(e,t,r)},Kv=function(x,r,e){for(var t=x;;){yr(e);var u=m(e),i=-1>>0)var f=_(e);else switch(i){case 0:for(;;){r0(e,3);var o=m(e),a=-1>>0){var T=dt(t,Jr(t,e));return[0,T,de(T,e)]}switch(f){case 0:var g=K2(t,e);wy(e,r);var t=g;continue;case 1:var A=t[4]?oO(t,Jr(t,e),en0,rn0):t;return[0,A,de(A,e)];case 2:if(t[4])return[0,t,de(t,e)];vr(r,tn0);continue;default:wy(e,r);continue}}},t3=function(x,r,e){for(;;){yr(e);var t=m(e),u=13>>0)var i=_(e);else switch(u){case 0:var i=0;break;case 1:for(;;){r0(e,2);var f=m(e),o=-1>>0)return Nx(nn0);switch(i){case 0:return[0,x,de(x,e)];case 1:var a=de(x,e),d=a[2],k=a[1],T=K2(x,e);return[0,T,[0,k,d-_y(e)|0]];default:wy(e,r);continue}}},aV=function(x,r){function e($){return r0($,3),z2(m($))===0?2:_($)}yr(r);var t=m(r),u=Lf>>0)var i=_(r);else switch(u){case 0:var i=0;break;case 1:var i=16;break;case 2:var i=15;break;case 3:r0(r,15);var i=pe(m(r))===0?15:_(r);break;case 4:r0(r,4);var i=z2(m(r))===0?e(r):_(r);break;case 5:r0(r,11);var i=z2(m(r))===0?e(r):_(r);break;case 6:var i=0;break;case 7:var i=5;break;case 8:var i=6;break;case 9:var i=7;break;case 10:var i=8;break;case 11:var i=9;break;case 12:r0(r,14);var f=Vv(m(r));if(f===0)var i=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?12:_(r);else if(f===1&&Pr(m(r))===0)for(;;){var o=Jv(m(r));if(o!==0){var i=o===1?13:_(r);break}}else var i=_(r);break;case 13:var i=10;break;default:r0(r,14);var i=Pr(m(r))===0&&Pr(m(r))===0?1:_(r)}if(16>>0)return Nx(qc0);switch(i){case 0:var a=Jx(r);return[0,x,a,t1(r),0];case 1:var d=Jx(r);return[0,x,d,[0,vt(Qx(Gc0,d))],0];case 2:var k=Jx(r),T=vt(Qx(bc0,k));return q3<=T?[0,x,k,[0,T>>>3|0,48+(T&7)|0],1]:[0,x,k,[0,T],1];case 3:var g=Jx(r);return[0,x,g,[0,vt(Qx(xs0,g))],1];case 4:return[0,x,rs0,[0,0],0];case 5:return[0,x,es0,[0,8],0];case 6:return[0,x,ts0,[0,12],0];case 7:return[0,x,ns0,[0,10],0];case 8:return[0,x,us0,[0,13],0];case 9:return[0,x,is0,[0,9],0];case 10:return[0,x,fs0,[0,11],0];case 11:var A=Jx(r);return[0,x,A,[0,vt(Qx(cs0,A))],1];case 12:var N=Jx(r);return[0,x,N,[0,vt(Qx(ss0,k2(N,1,Xx(N)-1|0)))],0];case 13:var R=Jx(r),I=vt(Qx(os0,k2(R,2,Xx(R)-3|0))),M=_5>>0)var k=_(i);else switch(d){case 0:var k=3;break;case 1:for(;;){r0(i,4);var T=m(i),g=-1>>0)return Nx(un0);switch(k){case 0:var A=Jx(i);if(vr(t,A),Ar(r,A))return[0,f,de(f,i),o];vr(e,A);continue;case 1:vr(t,in0);var N=aV(f,i),R=N[4],I=N[3],M=N[2],L=N[1],z=R||o;vr(t,M),mX(function(f0){return is(e,f0)},I);var f=L,o=z;continue;case 2:var V=Jx(i);vr(t,V);var Z=K2(dt(f,Jr(f,i)),i);return vr(e,V),[0,Z,de(Z,i),o];case 3:var $=Jx(i);vr(t,$);var i0=dt(f,Jr(f,i));return vr(e,$),[0,i0,de(i0,i),o];default:var U=i[6],J=i[3]-U|0,Y=S1(J*4|0),F=ql(i[1],U,J,Y);hI(t,Y,0,F),hI(e,Y,0,F);continue}}},pV=function(x,r,e,t){for(var u=x;;){yr(t);var i=m(t),f=96>>0)var o=_(t);else switch(f){case 0:var o=0;break;case 1:for(;;){r0(t,6);var a=m(t),d=-1>>0)return Nx(fn0);switch(o){case 0:return[0,dt(u,Jr(u,t)),1];case 1:return[0,u,1];case 2:return[0,u,0];case 3:lt(e,92);var g=aV(u,t),A=g[3],N=g[1];vr(e,g[2]),mX(function(M){return is(r,M)},A);var u=N;continue;case 4:vr(e,cn0),vr(r,sn0);var u=K2(u,t);continue;case 5:vr(e,Jx(t)),lt(r,10);var u=K2(u,t);continue;default:var R=Jx(t);vr(e,R),vr(r,R);continue}}},ES0=function(x,r){function e(w){for(;;)if(r0(w,33),ar(m(w))!==0)return _(w)}function t(w){r0(w,32);var x0=D1(m(w));if(x0!==0)return x0===1?e(w):_(w);for(;;)if(r0(w,30),ar(m(w))!==0)return _(w)}function u(w){r0(w,31);var x0=D1(m(w));if(x0!==0)return x0===1?e(w):_(w);for(;;)if(r0(w,29),ar(m(w))!==0)return _(w)}function i(w){r0(w,34);var x0=x3(m(w));if(2>>0)return _(w);switch(x0){case 0:return e(w);case 1:for(;;){r0(w,34);var e0=os(m(w));if(3>>0)return _(w);switch(e0){case 0:return e(w);case 1:continue;case 2:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var S0=os(m(w));if(3>>0)return _(w);switch(S0){case 0:return e(w);case 1:continue;case 2:continue x;default:return u(w)}}}default:return u(w)}}default:return u(w)}}function f(w){x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var x0=qJ(m(w));if(4>>0)return _(w);switch(x0){case 0:return e(w);case 1:return i(w);case 2:continue;case 3:continue x;default:return t(w)}}}}function o(w){for(;;)if(r0(w,23),ar(m(w))!==0)return _(w)}function a(w){for(;;)if(r0(w,23),ar(m(w))!==0)return _(w)}function d(w){for(;;)if(r0(w,15),ar(m(w))!==0)return _(w)}function k(w){for(;;)if(r0(w,15),ar(m(w))!==0)return _(w)}function T(w){for(;;)if(r0(w,11),ar(m(w))!==0)return _(w)}function g(w){for(;;)if(r0(w,11),ar(m(w))!==0)return _(w)}function A(w){for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}function N(w){for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}function R(w){for(;;)if(r0(w,19),ar(m(w))!==0)return _(w)}function I(w){for(;;)if(r0(w,27),ar(m(w))!==0)return _(w)}function M(w){r0(w,26);var x0=D1(m(w));if(x0!==0)return x0===1?I(w):_(w);for(;;)if(r0(w,25),ar(m(w))!==0)return _(w)}function L(w){for(;;)if(r0(w,27),ar(m(w))!==0)return _(w)}function z(w){r0(w,26);var x0=D1(m(w));if(x0!==0)return x0===1?L(w):_(w);for(;;)if(r0(w,25),ar(m(w))!==0)return _(w)}function V(w){x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,28);var x0=os(m(w));if(3>>0)return _(w);switch(x0){case 0:return L(w);case 1:continue;case 2:continue x;default:return z(w)}}}}function Z(w){r0(w,33);var x0=bJ(m(w));if(3>>0)return _(w);switch(x0){case 0:return e(w);case 1:var e0=jo(m(w));if(e0===0)for(;;){r0(w,28);var S0=x3(m(w));if(2>>0)return _(w);switch(S0){case 0:return L(w);case 1:continue;default:return z(w)}}if(e0!==1)return _(w);for(;;){r0(w,28);var G=os(m(w));if(3>>0)return _(w);switch(G){case 0:return L(w);case 1:continue;case 2:return V(w);default:return z(w)}}case 2:for(;;){r0(w,28);var k0=x3(m(w));if(2>>0)return _(w);switch(k0){case 0:return I(w);case 1:continue;default:return M(w)}}default:for(;;){r0(w,28);var J0=os(m(w));if(3>>0)return _(w);switch(J0){case 0:return I(w);case 1:continue;case 2:return V(w);default:return M(w)}}}}function $(w){r0(w,34);var x0=zJ(m(w));if(3>>0)return _(w);switch(x0){case 0:return e(w);case 1:for(;;){r0(w,34);var e0=Uo(m(w));if(4>>0)return _(w);switch(e0){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var S0=Uo(m(w));if(4>>0)return _(w);switch(S0){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:continue x;default:return u(w)}}}default:return u(w)}}case 2:return Z(w);default:return u(w)}}function i0(w){return zy(m(w))===0&&Yy(m(w))===0&&rV(m(w))===0&&ZJ(m(w))===0&&WJ(m(w))===0&&By(m(w))===0&&e6(m(w))===0&&zy(m(w))===0&&Xo(m(w))===0&&sO(m(w))===0&&zv(m(w))===0?3:_(w)}function U(w){return r0(w,3),nV(m(w))===0?3:_(w)}function J(w){var x0=wS0(m(w));if(36>>0)return _(w);switch(x0){case 0:return 98;case 1:return 99;case 2:if(r0(w,1),cs(m(w))!==0)return _(w);for(;;)if(r0(w,1),cs(m(w))!==0)return _(w);case 3:return 0;case 4:return r0(w,0),pe(m(w))===0?0:_(w);case 5:return r0(w,88),Tn(m(w))===0?(r0(w,58),Tn(m(w))===0?54:_(w)):_(w);case 6:return 7;case 7:r0(w,95);var e0=m(w),S0=32>>0)return _(w);switch(J0){case 0:return r0(w,83),Tn(m(w))===0?70:_(w);case 1:return 4;default:return 69}case 14:r0(w,80);var O0=m(w),ix=42>>0)return _(w);switch($x){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var er=Uo(m(w));if(4>>0)return _(w);switch(er){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:continue x;default:return u(w)}}}default:return u(w)}}case 18:r0(w,93);var Zx=KJ(m(w));if(2>>0)return _(w);switch(Zx){case 0:r0(w,2);var Lr=Oy(m(w));if(2>>0)return _(w);switch(Lr){case 0:for(;;){var Yx=Oy(m(w));if(2>>0)return _(w);switch(Yx){case 0:continue;case 1:return U(w);default:return i0(w)}}case 1:return U(w);default:return i0(w)}case 1:return 5;default:return 92}case 19:r0(w,34);var ie=QJ(m(w));if(8>>0)return _(w);switch(ie){case 0:return e(w);case 1:return $(w);case 2:for(;;){r0(w,20);var Ft=xV(m(w));if(4>>0)return _(w);switch(Ft){case 0:return R(w);case 1:return i(w);case 2:continue;case 3:for(;;){r0(w,18);var E2=Iy(m(w));if(3>>0)return _(w);switch(E2){case 0:return N(w);case 1:return i(w);case 2:continue;default:r0(w,17);var We=D1(m(w));if(We!==0)return We===1?N(w):_(w);for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}}default:r0(w,19);var fo=D1(m(w));if(fo!==0)return fo===1?R(w):_(w);for(;;)if(r0(w,19),ar(m(w))!==0)return _(w)}}case 3:for(;;){r0(w,18);var gn=Iy(m(w));if(3>>0)return _(w);switch(gn){case 0:return A(w);case 1:return i(w);case 2:continue;default:r0(w,17);var ds=D1(m(w));if(ds!==0)return ds===1?A(w):_(w);for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}}case 4:r0(w,33);var me=$J(m(w));if(me===0)return e(w);if(me!==1)return _(w);for(;;){r0(w,12);var An=$y(m(w));if(3>>0)return _(w);switch(An){case 0:return g(w);case 1:continue;case 2:x:for(;;){if(ss(m(w))!==0)return _(w);for(;;){r0(w,12);var Ht=$y(m(w));if(3>>0)return _(w);switch(Ht){case 0:return T(w);case 1:continue;case 2:continue x;default:r0(w,10);var $e=D1(m(w));if($e!==0)return $e===1?T(w):_(w);for(;;)if(r0(w,9),ar(m(w))!==0)return _(w)}}}default:r0(w,10);var qt=D1(m(w));if(qt!==0)return qt===1?g(w):_(w);for(;;)if(r0(w,9),ar(m(w))!==0)return _(w)}}case 5:return Z(w);case 6:r0(w,33);var dr=FJ(m(w));if(dr===0)return e(w);if(dr!==1)return _(w);for(;;){r0(w,16);var mt=Zy(m(w));if(3>>0)return _(w);switch(mt){case 0:return k(w);case 1:continue;case 2:x:for(;;){if(z2(m(w))!==0)return _(w);for(;;){r0(w,16);var Qo=Zy(m(w));if(3>>0)return _(w);switch(Qo){case 0:return d(w);case 1:continue;case 2:continue x;default:r0(w,14);var ke=D1(m(w));if(ke!==0)return ke===1?d(w):_(w);for(;;)if(r0(w,13),ar(m(w))!==0)return _(w)}}}default:r0(w,14);var Pn=D1(m(w));if(Pn!==0)return Pn===1?k(w):_(w);for(;;)if(r0(w,13),ar(m(w))!==0)return _(w)}}case 7:r0(w,33);var co=XJ(m(w));if(co===0)return e(w);if(co!==1)return _(w);for(;;){r0(w,24);var Fo=Qy(m(w));if(3>>0)return _(w);switch(Fo){case 0:return a(w);case 1:continue;case 2:x:for(;;){if(Pr(m(w))!==0)return _(w);for(;;){r0(w,24);var so=Qy(m(w));if(3>>0)return _(w);switch(so){case 0:return o(w);case 1:continue;case 2:continue x;default:r0(w,22);var oo=D1(m(w));if(oo!==0)return oo===1?o(w):_(w);for(;;)if(r0(w,21),ar(m(w))!==0)return _(w)}}}default:r0(w,22);var l2=D1(m(w));if(l2!==0)return l2===1?a(w):_(w);for(;;)if(r0(w,21),ar(m(w))!==0)return _(w)}}default:return t(w)}case 20:r0(w,34);var ys=My(m(w));if(5>>0)return _(w);switch(ys){case 0:return e(w);case 1:return $(w);case 2:for(;;){r0(w,34);var he=My(m(w));if(5>>0)return _(w);switch(he){case 0:return e(w);case 1:return $(w);case 2:continue;case 3:return Z(w);case 4:return f(w);default:return t(w)}}case 3:return Z(w);case 4:return f(w);default:return t(w)}case 21:return 46;case 22:return 44;case 23:r0(w,78);var Cn=m(w),Ho=59>>0)return Nx($c0);var F=Y;if(50>F)switch(F){case 0:return[2,K2(x,r)];case 1:return[2,x];case 2:var n0=_2(x,r),Q=Qr(Xr),f0=Kv(x,Q,r),s0=f0[1];return[1,s0,Kt(s0,n0,f0[2],Q,1)];case 3:var v0=Jx(r);if(!x[5]){var o0=_2(x,r),c0=Qr(Xr);vr(c0,k2(v0,2,Xx(v0)-2|0));var T0=Kv(x,c0,r),E0=T0[1];return[1,E0,Kt(E0,o0,T0[2],c0,1)]}var M0=x[4]?cV(x,Jr(x,r),v0):x,Y0=Ey(1,M0),rx=_y(r);return Ar(Gl(r,rx-1|0,1),Ov)&&P(Gl(r,rx-2|0,1),Ov)?[0,Y0,86]:[2,Y0];case 4:if(x[4])return[2,Ey(0,x)];Ga(r),yr(r);var g0=VJ(m(r))===0?0:_(r);return g0===0?[0,x,c2]:Nx(Qc0);case 5:var H0=_2(x,r),t0=Qr(Xr),ex=t3(x,t0,r),xx=ex[1];return[1,xx,Kt(xx,H0,ex[2],t0,0)];case 6:if(r[6]!==0)return[0,x,Fc0];var ax=_2(x,r),dx=Qr(Xr),mx=t3(x,dx,r),L0=mx[1],C0=[0,L0[1],ax,mx[2]];return[0,L0,[6,C0,X1(dx)]];case 7:var A0=Jx(r),U0=_2(x,r),Q0=Qr(Xr),H=Qr(Xr);vr(H,A0);var b=lV(x,A0,Q0,H,0,r),B=b[1],a0=b[3],m0=[0,B[1],U0,b[2]],P0=X1(H);return[0,B,[2,[0,m0,X1(Q0),P0,a0]]];case 8:var D=Qr(Xr),N0=Qr(Xr),X0=_2(x,r),D0=pV(x,D,N0,r),ox=D0[1],b0=D0[2],kx=de(ox,r),V0=[0,ox[1],X0,kx],h=X1(N0);return[0,ox,[3,[0,V0,X1(D),h,1,b0]]];case 9:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&jy(m(x0))===0&&ss(m(x0))===0)for(;;){var e0=Ny(m(x0));if(2>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(ss(m(x0))===0)for(;;){var S0=Ny(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,0,Jx(x0)]]:Nx(Wc0)});case 10:return[0,x,[1,0,Jx(r)]];case 11:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&jy(m(x0))===0&&ss(m(x0))===0)for(;;){r0(x0,0);var e0=Cy(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(ss(m(x0))===0)for(;;){r0(x0,0);var S0=Cy(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,0,Jx(x0)]]:Nx(Zc0)});case 12:return[0,x,[0,0,Jx(r)]];case 13:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&Jy(m(x0))===0&&z2(m(x0))===0)for(;;){var e0=Dy(m(x0));if(2>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(z2(m(x0))===0)for(;;){var S0=Dy(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,1,Jx(x0)]]:Nx(Kc0)});case 14:return[0,x,[1,1,Jx(r)]];case 15:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&Jy(m(x0))===0&&z2(m(x0))===0)for(;;){r0(x0,0);var e0=Ly(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(z2(m(x0))===0)for(;;){r0(x0,0);var S0=Ly(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,3,Jx(x0)]]:Nx(zc0)});case 16:return[0,x,[0,3,Jx(r)]];case 17:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0)for(;;){var e0=m(x0),S0=47>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(Pr(m(x0))===0)for(;;){var S0=Ry(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,2,Jx(x0)]]:Nx(Xc0)});case 22:return[0,x,[1,2,Jx(r)]];case 23:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&Ay(m(x0))===0&&Pr(m(x0))===0)for(;;){r0(x0,0);var e0=Ky(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(Pr(m(x0))===0)for(;;){r0(x0,0);var S0=Ky(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,4,Jx(x0)]]:Nx(Yc0)});case 24:return[0,x,[0,4,Jx(r)]];case 25:return N1(x,r,function(w,x0){function e0(Zx){for(;;){var Lr=Vt(m(Zx));if(2>>0)return _(Zx);switch(Lr){case 0:continue;case 1:x:for(;;){if(mr(m(Zx))!==0)return _(Zx);for(;;){var Yx=Vt(m(Zx));if(2>>0)return _(Zx);switch(Yx){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function S0(Zx){for(;;){var Lr=r3(m(Zx));if(Lr!==0)return Lr===1?0:_(Zx)}}function G(Zx){var Lr=Fy(m(Zx));if(2>>0)return _(Zx);switch(Lr){case 0:var Yx=jo(m(Zx));return Yx===0?S0(Zx):Yx===1?e0(Zx):_(Zx);case 1:return S0(Zx);default:return e0(Zx)}}function k0(Zx){var Lr=Vy(m(Zx));if(Lr!==0)return Lr===1?G(Zx):_(Zx);for(;;){var Yx=ne(m(Zx));if(2>>0)return _(Zx);switch(Yx){case 0:continue;case 1:return G(Zx);default:x:for(;;){if(mr(m(Zx))!==0)return _(Zx);for(;;){var ie=ne(m(Zx));if(2>>0)return _(Zx);switch(ie){case 0:continue;case 1:return G(Zx);default:continue x}}}}}}yr(x0);var J0=Do(m(x0));if(2>>0)var O0=_(x0);else switch(J0){case 0:if(mr(m(x0))===0)for(;;){var ix=ne(m(x0));if(2>>0)var O0=_(x0);else switch(ix){case 0:continue;case 1:var O0=G(x0);break;default:x:for(;;){if(mr(m(x0))===0)for(;;){var Wx=ne(m(x0));if(2>>0)var Bx=_(x0);else switch(Wx){case 0:continue;case 1:var Bx=G(x0);break;default:continue x}break}else var Bx=_(x0);var O0=Bx;break}}break}else var O0=_(x0);break;case 1:var Hx=Py(m(x0)),O0=Hx===0?k0(x0):Hx===1?G(x0):_(x0);break;default:for(;;){var $x=Xy(m(x0));if(2<$x>>>0)var O0=_(x0);else switch($x){case 0:var O0=k0(x0);break;case 1:continue;default:var O0=G(x0)}break}}if(O0!==0)return Nx(Bc0);var er=w2(w,Jr(w,x0),48);return[0,er,[1,2,Jx(x0)]]});case 26:var X=w2(x,Jr(x,r),48);return[0,X,[1,2,Jx(r)]];case 27:return N1(x,r,function(w,x0){function e0(er){for(;;){r0(er,0);var Zx=Bo(m(er));if(Zx!==0){if(Zx!==1)return _(er);x:for(;;){if(mr(m(er))!==0)return _(er);for(;;){r0(er,0);var Lr=Bo(m(er));if(Lr!==0){if(Lr===1)continue x;return _(er)}}}}}}function S0(er){for(;;)if(r0(er,0),mr(m(er))!==0)return _(er)}function G(er){var Zx=Fy(m(er));if(2>>0)return _(er);switch(Zx){case 0:var Lr=jo(m(er));return Lr===0?S0(er):Lr===1?e0(er):_(er);case 1:return S0(er);default:return e0(er)}}function k0(er){var Zx=Vy(m(er));if(Zx!==0)return Zx===1?G(er):_(er);for(;;){var Lr=ne(m(er));if(2>>0)return _(er);switch(Lr){case 0:continue;case 1:return G(er);default:x:for(;;){if(mr(m(er))!==0)return _(er);for(;;){var Yx=ne(m(er));if(2>>0)return _(er);switch(Yx){case 0:continue;case 1:return G(er);default:continue x}}}}}}yr(x0);var J0=Do(m(x0));if(2>>0)var O0=_(x0);else switch(J0){case 0:if(mr(m(x0))===0)for(;;){var ix=ne(m(x0));if(2>>0)var O0=_(x0);else switch(ix){case 0:continue;case 1:var O0=G(x0);break;default:x:for(;;){if(mr(m(x0))===0)for(;;){var Wx=ne(m(x0));if(2>>0)var Bx=_(x0);else switch(Wx){case 0:continue;case 1:var Bx=G(x0);break;default:continue x}break}else var Bx=_(x0);var O0=Bx;break}}break}else var O0=_(x0);break;case 1:var Hx=Py(m(x0)),O0=Hx===0?k0(x0):Hx===1?G(x0):_(x0);break;default:for(;;){var $x=Xy(m(x0));if(2<$x>>>0)var O0=_(x0);else switch($x){case 0:var O0=k0(x0);break;case 1:continue;default:var O0=G(x0)}break}}return O0===0?[0,w,[0,4,Jx(x0)]]:Nx(Uc0)});case 28:return[0,x,[0,4,Jx(r)]];case 29:return N1(x,r,function(w,x0){function e0(Hx){for(;;){var $x=Vt(m(Hx));if(2<$x>>>0)return _(Hx);switch($x){case 0:continue;case 1:x:for(;;){if(mr(m(Hx))!==0)return _(Hx);for(;;){var er=Vt(m(Hx));if(2>>0)return _(Hx);switch(er){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function S0(Hx){var $x=r3(m(Hx));return $x===0?e0(Hx):$x===1?0:_(Hx)}yr(x0);var G=Do(m(x0));if(2>>0)var k0=_(x0);else switch(G){case 0:var k0=mr(m(x0))===0?e0(x0):_(x0);break;case 1:for(;;){var J0=e3(m(x0));if(J0===0)var k0=S0(x0);else{if(J0===1)continue;var k0=_(x0)}break}break;default:for(;;){var O0=Yo(m(x0));if(2>>0)var k0=_(x0);else switch(O0){case 0:var k0=S0(x0);break;case 1:continue;default:x:for(;;){if(mr(m(x0))===0)for(;;){var ix=Yo(m(x0));if(2>>0)var Wx=_(x0);else switch(ix){case 0:var Wx=S0(x0);break;case 1:continue;default:continue x}break}else var Wx=_(x0);var k0=Wx;break}}break}}if(k0!==0)return Nx(jc0);var Bx=w2(w,Jr(w,x0),39);return[0,Bx,[1,2,Jx(x0)]]});case 30:return N1(x,r,function(w,x0){yr(x0);var e0=jo(m(x0));if(e0===0)for(;;){var S0=r3(m(x0));if(S0!==0){var O0=S0===1?0:_(x0);break}}else if(e0===1)for(;;){var G=Vt(m(x0));if(2>>0)var O0=_(x0);else switch(G){case 0:continue;case 1:x:for(;;){if(mr(m(x0))===0)for(;;){var k0=Vt(m(x0));if(2>>0)var J0=_(x0);else switch(k0){case 0:continue;case 1:continue x;default:var J0=0}break}else var J0=_(x0);var O0=J0;break}break;default:var O0=0}break}else var O0=_(x0);return O0===0?[0,w,[1,2,Jx(x0)]]:Nx(Dc0)});case 31:var W0=w2(x,Jr(x,r),39);return[0,W0,[1,2,Jx(r)]];case 32:return[0,x,[1,2,Jx(r)]];case 33:return N1(x,r,function(w,x0){function e0(Bx){for(;;){r0(Bx,0);var Hx=Bo(m(Bx));if(Hx!==0){if(Hx!==1)return _(Bx);x:for(;;){if(mr(m(Bx))!==0)return _(Bx);for(;;){r0(Bx,0);var $x=Bo(m(Bx));if($x!==0){if($x===1)continue x;return _(Bx)}}}}}}function S0(Bx){return r0(Bx,0),mr(m(Bx))===0?e0(Bx):_(Bx)}yr(x0);var G=Do(m(x0));if(2>>0)var k0=_(x0);else switch(G){case 0:var k0=mr(m(x0))===0?e0(x0):_(x0);break;case 1:for(;;){r0(x0,0);var J0=e3(m(x0));if(J0===0)var k0=S0(x0);else{if(J0===1)continue;var k0=_(x0)}break}break;default:for(;;){r0(x0,0);var O0=Yo(m(x0));if(2>>0)var k0=_(x0);else switch(O0){case 0:var k0=S0(x0);break;case 1:continue;default:x:for(;;){if(mr(m(x0))===0)for(;;){r0(x0,0);var ix=Yo(m(x0));if(2>>0)var Wx=_(x0);else switch(ix){case 0:var Wx=S0(x0);break;case 1:continue;default:continue x}break}else var Wx=_(x0);var k0=Wx;break}}break}}return k0===0?[0,w,[0,4,Jx(x0)]]:Nx(Mc0)});case 34:return[0,x,[0,4,Jx(r)]];case 35:var sx=Jr(x,r),tx=Jx(r);return[0,x,[4,sx,tx,tx]];case 36:return[0,x,0];case 37:return[0,x,1];case 38:return[0,x,4];case 39:return[0,x,5];case 40:return[0,x,6];case 41:return[0,x,7];case 42:return[0,x,12];case 43:return[0,x,10];case 44:return[0,x,8];case 45:return[0,x,9];case 46:return[0,x,86];case 47:Ga(r),yr(r);var j0=m(r),Px=62=rr)return[0,x,18];var Ux=Tx(B0,Oa);if(0<=Ux){if(0>=Ux)return[0,x,51];var K0=Tx(B0,Ps);if(0<=K0){if(0>=K0)return[0,x,46];if(!P(B0,dl))return[0,x,24];if(!P(B0,Os))return[0,x,47];if(!P(B0,Qp))return[0,x,25];if(!P(B0,Tp))return[0,x,26];if(!P(B0,Y2))return[0,x,58]}else{if(!P(B0,Ye))return[0,x,20];if(!P(B0,lv))return[0,x,21];if(!P(B0,Be))return[0,x,22];if(!P(B0,Cs))return[0,x,31];if(!P(B0,yd))return[0,x,23];if(!P(B0,fi))return[0,x,61]}}else{var nr=Tx(B0,u8);if(0<=nr){if(0>=nr)return[0,x,54];if(!P(B0,El))return[0,x,55];if(!P(B0,H3))return[0,x,56];if(!P(B0,z3))return[0,x,57];if(!P(B0,De))return[0,x,19];if(!P(B0,je))return[0,x,42]}else{if(!P(B0,b2))return[0,x,53];if(!P(B0,ka))return[0,x,28];if(!P(B0,av))return[0,x,44];if(!P(B0,_v))return[0,x,29];if(!P(B0,qh))return[0,x,63];if(!P(B0,Jh))return[0,x,62]}}}else{var z0=Tx(B0,ed);if(0<=z0){if(0>=z0)return[0,x,37];var or=Tx(B0,N8);if(0<=or){if(0>=or)return[0,x,39];if(!P(B0,ya))return[0,x,15];if(!P(B0,s8))return[0,x,16];if(!P(B0,Tv))return[0,x,52];if(!P(B0,j2))return[0,x,50];if(!P(B0,Po))return[0,x,17]}else{if(!P(B0,Kp))return[0,x,43];if(!P(B0,pl))return[0,x,48];if(!P(B0,p8))return[0,x,49];if(!P(B0,Bc))return[0,x,41];if(!P(B0,Is))return[0,x,30];if(!P(B0,Yp))return[0,x,38]}}else{var jr=Tx(B0,ol);if(0<=jr){if(0>=jr)return[0,x,27];if(!P(B0,Ie))return[0,x,35];if(!P(B0,Oe))return[0,x,59];if(!P(B0,tl))return[0,x,60];if(!P(B0,pv))return[0,x,36];if(!P(B0,sl))return[0,x,45]}else{if(!P(B0,Co))return[0,x,64];if(!P(B0,Pv))return[0,x,65];if(!P(B0,Me))return[0,x,32];if(!P(B0,bp))return[0,x,33];if(!P(B0,t5))return[0,x,34];if(!P(B0,$3))return[0,x,40]}}}var lx=t1(r),v1=vV(x,lx),K1=v1[2],w1=v1[1];return[0,w1,[4,qx,K1,bl(lx)]];case 98:var Cr=x[4]?w2(x,Jr(x,r),96):x;return[0,Cr,Nr];default:var u2=dt(x,Jr(x,r));return[0,u2,[7,Jx(r)]]}},gS0=function(x,r,e){var t=x;x:for(;;){yr(e);var u=m(e),i=92>>0)var f=_(e);else switch(i){case 0:var f=0;break;case 1:for(;;){r0(e,7);var o=m(e),a=-1>>0)var f=_(e);else switch(k){case 0:var f=2;break;case 1:var f=1;break;default:r0(e,1);var f=pe(m(e))===0?1:_(e)}}if(7>>0)return Nx(an0);switch(f){case 0:return[0,w2(t,Jr(t,e),st),ln0];case 1:return[0,K2(w2(t,Jr(t,e),st),e),pn0];case 2:vr(r,Jx(e));continue;case 3:var T=Jx(e);return[0,t,k2(T,1,Xx(T)-1|0)];case 4:return[0,t,dn0];case 5:for(lt(r,91);;){yr(e);var g=m(e),A=93>>0)var N=_(e);else switch(A){case 0:var N=0;break;case 1:for(;;){r0(e,5);var R=m(e),I=-1>>0)var z=Nx(on0);else switch(N){case 0:var z=t;break;case 1:vr(r,vn0);continue;case 2:lt(r,92),lt(r,93);continue;case 3:lt(r,93);var z=t;break;case 4:var z=K2(w2(t,Jr(t,e),st),e);break;default:vr(r,Jx(e));continue}var t=z;continue x}case 6:return[0,K2(w2(t,Jr(t,e),st),e),yn0];default:vr(r,Jx(e));continue}}},AS0=function(x,r){yr(r);var e=m(r),t=Rv>>0)var u=_(r);else switch(t){case 0:var u=0;break;case 1:var u=6;break;case 2:if(r0(r,2),cs(m(r))===0){for(;;)if(r0(r,2),cs(m(r))!==0){var u=_(r);break}}else var u=_(r);break;case 3:var u=1;break;case 4:r0(r,1);var u=pe(m(r))===0?1:_(r);break;default:r0(r,5);var i=Wy(m(r)),u=i===0?4:i===1?3:_(r)}if(6>>0)return Nx(Lc0);switch(u){case 0:return[0,x,Nr];case 1:return[2,K2(x,r)];case 2:return[2,x];case 3:var f=_2(x,r),o=Qr(Xr),a=t3(x,o,r),d=a[1];return[1,d,Kt(d,f,a[2],o,0)];case 4:var k=_2(x,r),T=Qr(Xr),g=Kv(x,T,r),A=g[1];return[1,A,Kt(A,k,g[2],T,1)];case 5:var N=_2(x,r),R=Qr(Xr),I=gS0(x,R,r),M=I[1],L=I[2],z=de(M,r),V=[0,M[1],N,z];return[0,M,[5,V,X1(R),L]];default:var Z=dt(x,Jr(x,r));return[0,Z,[7,Jx(r)]]}},dV=function(x){var r=Tx(x,"iexcl");if(0<=r){if(0>=r)return Oc0;var e=Tx(x,"prime");if(0<=e){if(0>=e)return Ic0;var t=Tx(x,"sup1");if(0<=t){if(0>=t)return Rc0;var u=Tx(x,"uarr");if(0<=u){if(0>=u)return Nc0;var i=Tx(x,"xi");if(0<=i){if(0>=i)return Cc0;if(!P(x,"yacute"))return Pc0;if(!P(x,"yen"))return Ac0;if(!P(x,"yuml"))return gc0;if(!P(x,"zeta"))return Ec0;if(!P(x,"zwj"))return Sc0;if(!P(x,"zwnj"))return Tc0}else{if(!P(x,"ucirc"))return wc0;if(!P(x,"ugrave"))return _c0;if(!P(x,"uml"))return hc0;if(!P(x,"upsih"))return kc0;if(!P(x,"upsilon"))return mc0;if(!P(x,"uuml"))return yc0;if(!P(x,"weierp"))return dc0}}else{var f=Tx(x,"thetasym");if(0<=f){if(0>=f)return pc0;if(!P(x,"thinsp"))return lc0;if(!P(x,"thorn"))return ac0;if(!P(x,"tilde"))return vc0;if(!P(x,"times"))return oc0;if(!P(x,"trade"))return sc0;if(!P(x,"uArr"))return cc0;if(!P(x,"uacute"))return fc0}else{if(!P(x,"sup2"))return ic0;if(!P(x,"sup3"))return uc0;if(!P(x,"supe"))return nc0;if(!P(x,"szlig"))return tc0;if(!P(x,"tau"))return ec0;if(!P(x,"there4"))return rc0;if(!P(x,"theta"))return xc0}}}else{var o=Tx(x,"rlm");if(0<=o){if(0>=o)return bf0;var a=Tx(x,"sigma");if(0<=a){if(0>=a)return Gf0;if(!P(x,"sigmaf"))return qf0;if(!P(x,"sim"))return Hf0;if(!P(x,"spades"))return Ff0;if(!P(x,"sub"))return Qf0;if(!P(x,"sube"))return $f0;if(!P(x,"sum"))return Wf0;if(!P(x,"sup"))return Zf0}else{if(!P(x,"rsaquo"))return Kf0;if(!P(x,"rsquo"))return zf0;if(!P(x,"sbquo"))return Vf0;if(!P(x,"scaron"))return Jf0;if(!P(x,"sdot"))return Xf0;if(!P(x,"sect"))return Yf0;if(!P(x,"shy"))return Bf0}}else{var d=Tx(x,"raquo");if(0<=d){if(0>=d)return Uf0;if(!P(x,"rarr"))return jf0;if(!P(x,"rceil"))return Df0;if(!P(x,"rdquo"))return Mf0;if(!P(x,"real"))return Lf0;if(!P(x,"reg"))return Of0;if(!P(x,"rfloor"))return If0;if(!P(x,"rho"))return Rf0}else{if(!P(x,"prod"))return Nf0;if(!P(x,"prop"))return Cf0;if(!P(x,"psi"))return Pf0;if(!P(x,"quot"))return Af0;if(!P(x,"rArr"))return gf0;if(!P(x,"radic"))return Ef0;if(!P(x,"rang"))return Sf0}}}}else{var k=Tx(x,"ndash");if(0<=k){if(0>=k)return Tf0;var T=Tx(x,"or");if(0<=T){if(0>=T)return wf0;var g=Tx(x,"part");if(0<=g){if(0>=g)return _f0;if(!P(x,"permil"))return hf0;if(!P(x,"perp"))return kf0;if(!P(x,"phi"))return mf0;if(!P(x,"pi"))return yf0;if(!P(x,"piv"))return df0;if(!P(x,"plusmn"))return pf0;if(!P(x,"pound"))return lf0}else{if(!P(x,"ordf"))return af0;if(!P(x,"ordm"))return vf0;if(!P(x,"oslash"))return of0;if(!P(x,"otilde"))return sf0;if(!P(x,"otimes"))return cf0;if(!P(x,"ouml"))return ff0;if(!P(x,"para"))return if0}}else{var A=Tx(x,"oacute");if(0<=A){if(0>=A)return uf0;if(!P(x,"ocirc"))return nf0;if(!P(x,"oelig"))return tf0;if(!P(x,"ograve"))return ef0;if(!P(x,"oline"))return rf0;if(!P(x,"omega"))return xf0;if(!P(x,"omicron"))return bi0;if(!P(x,"oplus"))return Gi0}else{if(!P(x,"ne"))return qi0;if(!P(x,"ni"))return Hi0;if(!P(x,"not"))return Fi0;if(!P(x,"notin"))return Qi0;if(!P(x,"nsub"))return $i0;if(!P(x,"ntilde"))return Wi0;if(!P(x,"nu"))return Zi0}}}else{var N=Tx(x,"le");if(0<=N){if(0>=N)return Ki0;var R=Tx(x,"macr");if(0<=R){if(0>=R)return zi0;if(!P(x,"mdash"))return Vi0;if(!P(x,"micro"))return Ji0;if(!P(x,"middot"))return Xi0;if(!P(x,BD))return Yi0;if(!P(x,"mu"))return Bi0;if(!P(x,"nabla"))return Ui0;if(!P(x,"nbsp"))return ji0}else{if(!P(x,"lfloor"))return Di0;if(!P(x,"lowast"))return Mi0;if(!P(x,"loz"))return Li0;if(!P(x,"lrm"))return Oi0;if(!P(x,"lsaquo"))return Ii0;if(!P(x,"lsquo"))return Ri0;if(!P(x,"lt"))return Ni0}}else{var I=Tx(x,"kappa");if(0<=I){if(0>=I)return Ci0;if(!P(x,"lArr"))return Pi0;if(!P(x,"lambda"))return Ai0;if(!P(x,"lang"))return gi0;if(!P(x,"laquo"))return Ei0;if(!P(x,"larr"))return Si0;if(!P(x,"lceil"))return Ti0;if(!P(x,"ldquo"))return wi0}else{if(!P(x,"igrave"))return _i0;if(!P(x,"image"))return hi0;if(!P(x,"infin"))return ki0;if(!P(x,"iota"))return mi0;if(!P(x,"iquest"))return yi0;if(!P(x,"isin"))return di0;if(!P(x,"iuml"))return pi0}}}}}else{var M=Tx(x,"aelig");if(0<=M){if(0>=M)return li0;var L=Tx(x,"delta");if(0<=L){if(0>=L)return ai0;var z=Tx(x,"fnof");if(0<=z){if(0>=z)return vi0;var V=Tx(x,"gt");if(0<=V){if(0>=V)return oi0;if(!P(x,"hArr"))return si0;if(!P(x,"harr"))return ci0;if(!P(x,"hearts"))return fi0;if(!P(x,"hellip"))return ii0;if(!P(x,"iacute"))return ui0;if(!P(x,"icirc"))return ni0}else{if(!P(x,"forall"))return ti0;if(!P(x,"frac12"))return ei0;if(!P(x,"frac14"))return ri0;if(!P(x,"frac34"))return xi0;if(!P(x,"frasl"))return bu0;if(!P(x,"gamma"))return Gu0;if(!P(x,"ge"))return qu0}}else{var Z=Tx(x,"ensp");if(0<=Z){if(0>=Z)return Hu0;if(!P(x,"epsilon"))return Fu0;if(!P(x,"equiv"))return Qu0;if(!P(x,"eta"))return $u0;if(!P(x,"eth"))return Wu0;if(!P(x,"euml"))return Zu0;if(!P(x,"euro"))return Ku0;if(!P(x,"exist"))return zu0}else{if(!P(x,"diams"))return Vu0;if(!P(x,"divide"))return Ju0;if(!P(x,"eacute"))return Xu0;if(!P(x,"ecirc"))return Yu0;if(!P(x,"egrave"))return Bu0;if(!P(x,se))return Uu0;if(!P(x,"emsp"))return ju0}}}else{var $=Tx(x,"cap");if(0<=$){if(0>=$)return Du0;var i0=Tx(x,"copy");if(0<=i0){if(0>=i0)return Mu0;if(!P(x,"crarr"))return Lu0;if(!P(x,"cup"))return Ou0;if(!P(x,"curren"))return Iu0;if(!P(x,"dArr"))return Ru0;if(!P(x,"dagger"))return Nu0;if(!P(x,"darr"))return Cu0;if(!P(x,"deg"))return Pu0}else{if(!P(x,"ccedil"))return Au0;if(!P(x,"cedil"))return gu0;if(!P(x,"cent"))return Eu0;if(!P(x,"chi"))return Su0;if(!P(x,"circ"))return Tu0;if(!P(x,"clubs"))return wu0;if(!P(x,"cong"))return _u0}}else{var U=Tx(x,"aring");if(0<=U){if(0>=U)return hu0;if(!P(x,"asymp"))return ku0;if(!P(x,"atilde"))return mu0;if(!P(x,"auml"))return yu0;if(!P(x,"bdquo"))return du0;if(!P(x,"beta"))return pu0;if(!P(x,"brvbar"))return lu0;if(!P(x,"bull"))return au0}else{if(!P(x,"agrave"))return vu0;if(!P(x,"alefsym"))return ou0;if(!P(x,"alpha"))return su0;if(!P(x,"amp"))return cu0;if(!P(x,"and"))return fu0;if(!P(x,"ang"))return iu0;if(!P(x,"apos"))return uu0}}}}else{var J=Tx(x,"Nu");if(0<=J){if(0>=J)return nu0;var Y=Tx(x,"Sigma");if(0<=Y){if(0>=Y)return tu0;var F=Tx(x,"Uuml");if(0<=F){if(0>=F)return eu0;if(!P(x,"Xi"))return ru0;if(!P(x,"Yacute"))return xu0;if(!P(x,"Yuml"))return b70;if(!P(x,"Zeta"))return G70;if(!P(x,"aacute"))return q70;if(!P(x,"acirc"))return H70;if(!P(x,"acute"))return F70}else{if(!P(x,"THORN"))return Q70;if(!P(x,"Tau"))return $70;if(!P(x,"Theta"))return W70;if(!P(x,"Uacute"))return Z70;if(!P(x,"Ucirc"))return K70;if(!P(x,"Ugrave"))return z70;if(!P(x,"Upsilon"))return V70}}else{var n0=Tx(x,"Otilde");if(0<=n0){if(0>=n0)return J70;if(!P(x,"Ouml"))return X70;if(!P(x,"Phi"))return Y70;if(!P(x,"Pi"))return B70;if(!P(x,"Prime"))return U70;if(!P(x,"Psi"))return j70;if(!P(x,"Rho"))return D70;if(!P(x,"Scaron"))return M70}else{if(!P(x,"OElig"))return L70;if(!P(x,"Oacute"))return O70;if(!P(x,"Ocirc"))return I70;if(!P(x,"Ograve"))return R70;if(!P(x,"Omega"))return N70;if(!P(x,"Omicron"))return C70;if(!P(x,"Oslash"))return P70}}}else{var Q=Tx(x,"Eacute");if(0<=Q){if(0>=Q)return A70;var f0=Tx(x,"Icirc");if(0<=f0){if(0>=f0)return g70;if(!P(x,"Igrave"))return E70;if(!P(x,"Iota"))return S70;if(!P(x,"Iuml"))return T70;if(!P(x,"Kappa"))return w70;if(!P(x,"Lambda"))return _70;if(!P(x,"Mu"))return h70;if(!P(x,"Ntilde"))return k70}else{if(!P(x,"Ecirc"))return m70;if(!P(x,"Egrave"))return y70;if(!P(x,"Epsilon"))return d70;if(!P(x,"Eta"))return p70;if(!P(x,"Euml"))return l70;if(!P(x,"Gamma"))return a70;if(!P(x,"Iacute"))return v70}}else{var s0=Tx(x,"Atilde");if(0<=s0){if(0>=s0)return o70;if(!P(x,"Auml"))return s70;if(!P(x,"Beta"))return c70;if(!P(x,"Ccedil"))return f70;if(!P(x,"Chi"))return i70;if(!P(x,"Dagger"))return u70;if(!P(x,"Delta"))return n70;if(!P(x,"ETH"))return t70}else{if(!P(x,"'int'"))return e70;if(!P(x,"AElig"))return r70;if(!P(x,"Aacute"))return x70;if(!P(x,"Acirc"))return bn0;if(!P(x,"Agrave"))return Gn0;if(!P(x,"Alpha"))return qn0;if(!P(x,"Aring"))return Hn0}}}}}return 0},yV=function(x,r,e,t){for(var u=x;;){var i=function(n0){for(;;)if(r0(n0,8),iO(m(n0))!==0)return _(n0)};yr(t);var f=m(t),o=Di>>0)var a=_(t);else switch(o){case 0:var a=3;break;case 1:var a=i(t);break;case 2:var a=4;break;case 3:r0(t,4);var a=pe(m(t))===0?4:_(t);break;case 4:r0(t,8);var d=uV(m(t));if(d===0){var k=BJ(m(t));if(k===0)for(;;){var T=YJ(m(t));if(T!==0){var a=T===1?6:_(t);break}}else if(k===1&&Pr(m(t))===0)for(;;){var g=eV(m(t));if(g!==0){var a=g===1?5:_(t);break}}else var a=_(t)}else if(d===1&&ar(m(t))===0){var A=zt(m(t));if(A===0){var N=zt(m(t));if(N===0){var R=zt(m(t));if(R===0){var I=zt(m(t));if(I===0){var M=zt(m(t));if(M===0)var L=zt(m(t)),a=L===0?GJ(m(t))===0?7:_(t):L===1?7:_(t);else var a=M===1?7:_(t)}else var a=I===1?7:_(t)}else var a=R===1?7:_(t)}else var a=N===1?7:_(t)}else var a=A===1?7:_(t)}else var a=_(t);break;case 5:var a=0;break;case 6:r0(t,1);var a=iO(m(t))===0?i(t):_(t);break;default:r0(t,2);var a=iO(m(t))===0?i(t):_(t)}if(8>>0)return Nx(mn0);switch(a){case 0:return Ga(t),u;case 1:return oO(u,Jr(u,t),hn0,kn0);case 2:return oO(u,Jr(u,t),wn0,_n0);case 3:return dt(u,Jr(u,t));case 4:var z=Jx(t);vr(e,z),vr(r,z);var u=K2(u,t);continue;case 5:var V=Jx(t),Z=k2(V,3,Xx(V)-4|0);vr(e,V),is(r,vt(Qx(Tn0,Z)));continue;case 6:var $=Jx(t),i0=k2($,2,Xx($)-3|0);vr(e,$),is(r,vt(i0));continue;case 7:var U=Jx(t),J=k2(U,1,Xx(U)-2|0);vr(e,U);var Y=dV(J);Y?is(r,Y[1]):vr(r,Qx(En0,Qx(J,Sn0)));continue;default:var F=Jx(t);vr(e,F),vr(r,F);continue}}},PS0=function(x,r){yr(r);var e=SS0(m(r));if(14>>0)var t=_(r);else switch(e){case 0:var t=0;break;case 1:var t=14;break;case 2:if(r0(r,2),cs(m(r))===0){for(;;)if(r0(r,2),cs(m(r))!==0){var t=_(r);break}}else var t=_(r);break;case 3:var t=1;break;case 4:r0(r,1);var t=pe(m(r))===0?1:_(r);break;case 5:var t=12;break;case 6:var t=13;break;case 7:var t=10;break;case 8:r0(r,6);var u=Wy(m(r)),t=u===0?4:u===1?3:_(r);break;case 9:var t=9;break;case 10:var t=5;break;case 11:var t=11;break;case 12:var t=7;break;case 13:if(r0(r,14),Xo(m(r))===0){var i=Vv(m(r));if(i===0)var t=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?13:_(r);else if(i===1&&Pr(m(r))===0)for(;;){var f=Jv(m(r));if(f!==0){var t=f===1?13:_(r);break}}else var t=_(r)}else var t=_(r);break;default:var t=8}if(14>>0)return Nx(Fn0);switch(t){case 0:return[0,x,Nr];case 1:return[2,K2(x,r)];case 2:return[2,x];case 3:var o=_2(x,r),a=Qr(Xr),d=t3(x,a,r),k=d[1];return[1,k,Kt(k,o,d[2],a,0)];case 4:var T=_2(x,r),g=Qr(Xr),A=Kv(x,g,r),N=A[1];return[1,N,Kt(N,T,A[2],g,1)];case 5:return[0,x,98];case 6:return[0,x,ct];case 7:return[0,x,99];case 8:return[0,x,0];case 9:return[0,x,86];case 10:return[0,x,10];case 11:return[0,x,82];case 12:var R=Jx(r),I=_2(x,r),M=Qr(Xr),L=Qr(Xr);vr(L,R);for(var z=Ar(R,"'"),V=x;;){yr(r);var Z=m(r),$=39>>0)var i0=_(r);else switch($){case 0:var i0=2;break;case 1:for(;;){r0(r,7);var U=m(r),J=-1>>0)var E0=Nx(gn0);else switch(i0){case 0:if(!z){lt(L,39),lt(M,39);continue}var E0=V;break;case 1:if(z){lt(L,34),lt(M,34);continue}var E0=V;break;case 2:var E0=dt(V,Jr(V,r));break;case 3:var M0=Jx(r);vr(L,M0),vr(M,M0);var V=K2(V,r);continue;case 4:var Y0=Jx(r),rx=k2(Y0,3,Xx(Y0)-4|0);vr(L,Y0),is(M,vt(Qx(An0,rx)));continue;case 5:var g0=Jx(r),H0=k2(g0,2,Xx(g0)-3|0);vr(L,g0),is(M,vt(H0));continue;case 6:var t0=Jx(r),ex=k2(t0,1,Xx(t0)-2|0);vr(L,t0);var xx=dV(ex);xx?is(M,xx[1]):vr(M,Qx(Cn0,Qx(ex,Pn0)));continue;default:var ax=Jx(r);vr(L,ax),vr(M,ax);continue}var dx=de(E0,r);vr(L,R);var mx=X1(M),L0=X1(L);return[0,E0,[10,[0,E0[1],I,dx],mx,L0]]}case 13:for(var C0=r[6];;){yr(r);var A0=m(r),U0=br>>0)var Q0=_(r);else switch(U0){case 0:var Q0=1;break;case 1:var Q0=2;break;case 2:var Q0=0;break;default:if(r0(r,2),Xo(m(r))===0){var H=Vv(m(r));if(H===0)var Q0=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?0:_(r);else if(H===1&&Pr(m(r))===0)for(;;){var b=Jv(m(r));if(b!==0){var Q0=b===1?0:_(r);break}}else var Q0=_(r)}else var Q0=_(r)}if(2>>0)throw q0([0,wr,xn0],1);switch(Q0){case 0:continue;case 1:break;default:if(bI(lJ(r)))continue;dJ(r,1)}var B=r[3];ZI(r,C0);var a0=t1(r),m0=n6(x,C0,B);return[0,x,[8,bl(a0),m0]]}default:return[0,x,[7,Jx(r)]]}},CS0=function(x,r){yr(r);var e=m(r),t=-1>>0)var u=_(r);else switch(t){case 0:var u=5;break;case 1:if(r0(r,1),cs(m(r))===0){for(;;)if(r0(r,1),cs(m(r))!==0){var u=_(r);break}}else var u=_(r);break;case 2:var u=0;break;case 3:r0(r,0);var u=pe(m(r))===0?0:_(r);break;case 4:r0(r,5);var i=Wy(m(r)),u=i===0?3:i===1?2:_(r);break;default:var u=4}if(5>>0)return Nx(Zn0);switch(u){case 0:return[2,K2(x,r)];case 1:return[2,x];case 2:var f=_2(x,r),o=Qr(Xr),a=t3(x,o,r),d=a[1];return[1,d,Kt(d,f,a[2],o,0)];case 3:var k=_2(x,r),T=Qr(Xr),g=Kv(x,T,r),A=g[1];return[1,A,Kt(A,k,g[2],T,1)];case 4:var N=_2(x,r),R=Qr(Xr),I=Qr(Xr),M=pV(x,R,I,r),L=M[1],z=M[2],V=de(L,r),Z=[0,L[1],N,V],$=X1(I);return[0,L,[3,[0,Z,X1(R),$,0,z]]];default:var i0=dt(x,Jr(x,r));return[0,i0,[3,[0,Jr(i0,r),$n0,Wn0,0,1]]]}},NS0=function(x,r){function e(h){for(;;)if(r0(h,29),ar(m(h))!==0)return _(h)}function t(h){r0(h,28);var X=D1(m(h));if(X!==0)return X===1?e(h):_(h);for(;;)if(r0(h,26),ar(m(h))!==0)return _(h)}function u(h){r0(h,27);var X=D1(m(h));if(X!==0)return X===1?e(h):_(h);for(;;)if(r0(h,25),ar(m(h))!==0)return _(h)}function i(h){r0(h,30);var X=x3(m(h));if(2>>0)return _(h);switch(X){case 0:return e(h);case 1:for(;;){r0(h,30);var W0=os(m(h));if(3>>0)return _(h);switch(W0){case 0:return e(h);case 1:continue;case 2:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var sx=os(m(h));if(3>>0)return _(h);switch(sx){case 0:return e(h);case 1:continue;case 2:continue x;default:return u(h)}}}default:return u(h)}}default:return u(h)}}function f(h){x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var X=qJ(m(h));if(4>>0)return _(h);switch(X){case 0:return e(h);case 1:return i(h);case 2:continue;case 3:continue x;default:return t(h)}}}}function o(h){for(;;)if(r0(h,19),ar(m(h))!==0)return _(h)}function a(h){for(;;)if(r0(h,19),ar(m(h))!==0)return _(h)}function d(h){for(;;)if(r0(h,13),ar(m(h))!==0)return _(h)}function k(h){for(;;)if(r0(h,13),ar(m(h))!==0)return _(h)}function T(h){for(;;)if(r0(h,9),ar(m(h))!==0)return _(h)}function g(h){for(;;)if(r0(h,9),ar(m(h))!==0)return _(h)}function A(h){for(;;)if(r0(h,15),ar(m(h))!==0)return _(h)}function N(h){r0(h,15);var X=D1(m(h));if(X!==0)return X===1?A(h):_(h);for(;;)if(r0(h,15),ar(m(h))!==0)return _(h)}function R(h){for(;;)if(r0(h,23),ar(m(h))!==0)return _(h)}function I(h){r0(h,22);var X=D1(m(h));if(X!==0)return X===1?R(h):_(h);for(;;)if(r0(h,21),ar(m(h))!==0)return _(h)}function M(h){for(;;)if(r0(h,23),ar(m(h))!==0)return _(h)}function L(h){r0(h,22);var X=D1(m(h));if(X!==0)return X===1?M(h):_(h);for(;;)if(r0(h,21),ar(m(h))!==0)return _(h)}function z(h){x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,24);var X=os(m(h));if(3>>0)return _(h);switch(X){case 0:return M(h);case 1:continue;case 2:continue x;default:return L(h)}}}}function V(h){r0(h,29);var X=bJ(m(h));if(3>>0)return _(h);switch(X){case 0:return e(h);case 1:var W0=jo(m(h));if(W0===0)for(;;){r0(h,24);var sx=x3(m(h));if(2>>0)return _(h);switch(sx){case 0:return M(h);case 1:continue;default:return L(h)}}if(W0!==1)return _(h);for(;;){r0(h,24);var tx=os(m(h));if(3>>0)return _(h);switch(tx){case 0:return M(h);case 1:continue;case 2:return z(h);default:return L(h)}}case 2:for(;;){r0(h,24);var j0=x3(m(h));if(2>>0)return _(h);switch(j0){case 0:return R(h);case 1:continue;default:return I(h)}}default:for(;;){r0(h,24);var Px=os(m(h));if(3>>0)return _(h);switch(Px){case 0:return R(h);case 1:continue;case 2:return z(h);default:return I(h)}}}}function Z(h){r0(h,30);var X=zJ(m(h));if(3>>0)return _(h);switch(X){case 0:return e(h);case 1:for(;;){r0(h,30);var W0=Uo(m(h));if(4>>0)return _(h);switch(W0){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var sx=Uo(m(h));if(4>>0)return _(h);switch(sx){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:continue x;default:return u(h)}}}default:return u(h)}}case 2:return V(h);default:return u(h)}}function $(h){return zy(m(h))===0&&Yy(m(h))===0&&rV(m(h))===0&&ZJ(m(h))===0&&WJ(m(h))===0&&By(m(h))===0&&e6(m(h))===0&&zy(m(h))===0&&Xo(m(h))===0&&sO(m(h))===0&&zv(m(h))===0?3:_(h)}function i0(h){return r0(h,3),nV(m(h))===0?3:_(h)}function U(h){var X=TS0(m(h));if(31>>0)return _(h);switch(X){case 0:return 66;case 1:return 67;case 2:if(r0(h,1),cs(m(h))!==0)return _(h);for(;;)if(r0(h,1),cs(m(h))!==0)return _(h);case 3:return 0;case 4:return r0(h,0),pe(m(h))===0?0:_(h);case 5:return 6;case 6:return 65;case 7:if(r0(h,67),e6(m(h))!==0)return _(h);var W0=m(h),sx=nn>>0)return _(h);switch(qx){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var B0=Uo(m(h));if(4>>0)return _(h);switch(B0){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:continue x;default:return u(h)}}}default:return u(h)}}case 16:r0(h,67);var rr=Wy(m(h));if(rr!==0)return rr===1?5:_(h);r0(h,2);var Ux=Oy(m(h));if(2>>0)return _(h);switch(Ux){case 0:for(;;){var K0=Oy(m(h));if(2>>0)return _(h);switch(K0){case 0:continue;case 1:return i0(h);default:return $(h)}}case 1:return i0(h);default:return $(h)}case 17:r0(h,30);var nr=QJ(m(h));if(8>>0)return _(h);switch(nr){case 0:return e(h);case 1:return Z(h);case 2:for(;;){r0(h,16);var z0=xV(m(h));if(4>>0)return _(h);switch(z0){case 0:return A(h);case 1:return i(h);case 2:continue;case 3:for(;;){r0(h,15);var or=Iy(m(h));if(3>>0)return _(h);switch(or){case 0:return A(h);case 1:return i(h);case 2:continue;default:return N(h)}}default:return N(h)}}case 3:for(;;){r0(h,30);var jr=Iy(m(h));if(3>>0)return _(h);switch(jr){case 0:return e(h);case 1:return i(h);case 2:continue;default:return t(h)}}case 4:r0(h,29);var lx=$J(m(h));if(lx===0)return e(h);if(lx!==1)return _(h);for(;;){r0(h,10);var v1=$y(m(h));if(3>>0)return _(h);switch(v1){case 0:return g(h);case 1:continue;case 2:x:for(;;){if(ss(m(h))!==0)return _(h);for(;;){r0(h,10);var K1=$y(m(h));if(3>>0)return _(h);switch(K1){case 0:return T(h);case 1:continue;case 2:continue x;default:r0(h,8);var w1=D1(m(h));if(w1!==0)return w1===1?T(h):_(h);for(;;)if(r0(h,7),ar(m(h))!==0)return _(h)}}}default:r0(h,8);var Cr=D1(m(h));if(Cr!==0)return Cr===1?g(h):_(h);for(;;)if(r0(h,7),ar(m(h))!==0)return _(h)}}case 5:return V(h);case 6:r0(h,29);var u2=FJ(m(h));if(u2===0)return e(h);if(u2!==1)return _(h);for(;;){r0(h,14);var w=Zy(m(h));if(3>>0)return _(h);switch(w){case 0:return k(h);case 1:continue;case 2:x:for(;;){if(z2(m(h))!==0)return _(h);for(;;){r0(h,14);var x0=Zy(m(h));if(3>>0)return _(h);switch(x0){case 0:return d(h);case 1:continue;case 2:continue x;default:r0(h,12);var e0=D1(m(h));if(e0!==0)return e0===1?d(h):_(h);for(;;)if(r0(h,11),ar(m(h))!==0)return _(h)}}}default:r0(h,12);var S0=D1(m(h));if(S0!==0)return S0===1?k(h):_(h);for(;;)if(r0(h,11),ar(m(h))!==0)return _(h)}}case 7:r0(h,29);var G=XJ(m(h));if(G===0)return e(h);if(G!==1)return _(h);for(;;){r0(h,20);var k0=Qy(m(h));if(3>>0)return _(h);switch(k0){case 0:return a(h);case 1:continue;case 2:x:for(;;){if(Pr(m(h))!==0)return _(h);for(;;){r0(h,20);var J0=Qy(m(h));if(3>>0)return _(h);switch(J0){case 0:return o(h);case 1:continue;case 2:continue x;default:r0(h,18);var O0=D1(m(h));if(O0!==0)return O0===1?o(h):_(h);for(;;)if(r0(h,17),ar(m(h))!==0)return _(h)}}}default:r0(h,18);var ix=D1(m(h));if(ix!==0)return ix===1?a(h):_(h);for(;;)if(r0(h,17),ar(m(h))!==0)return _(h)}}default:return t(h)}case 18:r0(h,30);var Wx=My(m(h));if(5>>0)return _(h);switch(Wx){case 0:return e(h);case 1:return Z(h);case 2:for(;;){r0(h,30);var Bx=My(m(h));if(5>>0)return _(h);switch(Bx){case 0:return e(h);case 1:return Z(h);case 2:continue;case 3:return V(h);case 4:return f(h);default:return t(h)}}case 3:return V(h);case 4:return f(h);default:return t(h)}case 19:return 44;case 20:return 42;case 21:return 49;case 22:r0(h,51);var Hx=m(h),$x=61>>0)return Nx(Jn0);var Y=J;if(34>Y)switch(Y){case 0:return[2,K2(x,r)];case 1:return[2,x];case 2:var F=_2(x,r),n0=Qr(Xr),Q=Kv(x,n0,r),f0=Q[1];return[1,f0,Kt(f0,F,Q[2],n0,1)];case 3:var s0=Jx(r);if(!x[5]){var v0=_2(x,r),o0=Qr(Xr);vr(o0,s0);var c0=Kv(x,o0,r),T0=c0[1];return[1,T0,Kt(T0,v0,c0[2],o0,1)]}var E0=x[4]?cV(x,Jr(x,r),s0):x,M0=Ey(1,E0),Y0=_y(r);return Ar(Gl(r,Y0-1|0,1),Ov)&&P(Gl(r,Y0-2|0,1),Ov)?[0,M0,86]:[2,M0];case 4:if(x[4])return[2,Ey(0,x)];Ga(r),yr(r);var rx=VJ(m(r))===0?0:_(r);return rx===0?[0,x,c2]:Nx(Vn0);case 5:var g0=_2(x,r),H0=Qr(Xr),t0=t3(x,H0,r),ex=t0[1];return[1,ex,Kt(ex,g0,t0[2],H0,0)];case 6:var xx=Jx(r),ax=_2(x,r),dx=Qr(Xr),mx=Qr(Xr);vr(mx,xx);var L0=lV(x,xx,dx,mx,0,r),C0=L0[1],A0=L0[3],U0=[0,C0[1],ax,L0[2]],Q0=X1(mx);return[0,C0,[2,[0,U0,X1(dx),Q0,A0]]];case 7:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&jy(m(X))===0&&ss(m(X))===0)for(;;){var W0=Ny(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(ss(m(X))===0)for(;;){var sx=Ny(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Wt(0,t1(X))]:Nx(Xn0)});case 8:return[0,x,Wt(0,t1(r))];case 9:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&jy(m(X))===0&&ss(m(X))===0)for(;;){r0(X,0);var W0=Cy(m(X));if(W0!==0){if(W0===1)x:for(;;){if(ss(m(X))===0)for(;;){r0(X,0);var sx=Cy(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Zt(0,t1(X))]:Nx(Yn0)});case 10:return[0,x,Zt(0,t1(r))];case 11:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&Jy(m(X))===0&&z2(m(X))===0)for(;;){var W0=Dy(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(z2(m(X))===0)for(;;){var sx=Dy(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Wt(1,t1(X))]:Nx(Bn0)});case 12:return[0,x,Wt(1,t1(r))];case 13:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&Jy(m(X))===0&&z2(m(X))===0)for(;;){r0(X,0);var W0=Ly(m(X));if(W0!==0){if(W0===1)x:for(;;){if(z2(m(X))===0)for(;;){r0(X,0);var sx=Ly(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Zt(3,t1(X))]:Nx(Un0)});case 14:return[0,x,Zt(3,t1(r))];case 15:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&z2(m(X))===0){for(;;)if(r0(X,0),z2(m(X))!==0){var W0=_(X);break}}else var W0=_(X);return W0===0?[0,h,Zt(1,t1(X))]:Nx(jn0)});case 16:return[0,x,Zt(1,t1(r))];case 17:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&Ay(m(X))===0&&Pr(m(X))===0)for(;;){var W0=Ry(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(Pr(m(X))===0)for(;;){var sx=Ry(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Wt(2,t1(X))]:Nx(Dn0)});case 18:return[0,x,Wt(2,t1(r))];case 19:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&Ay(m(X))===0&&Pr(m(X))===0)for(;;){r0(X,0);var W0=Ky(m(X));if(W0!==0){if(W0===1)x:for(;;){if(Pr(m(X))===0)for(;;){r0(X,0);var sx=Ky(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Zt(4,t1(X))]:Nx(Mn0)});case 20:return[0,x,Zt(4,t1(r))];case 21:return N1(x,r,function(h,X){function W0(z0){for(;;){var or=Vt(m(z0));if(2>>0)return _(z0);switch(or){case 0:continue;case 1:x:for(;;){if(mr(m(z0))!==0)return _(z0);for(;;){var jr=Vt(m(z0));if(2>>0)return _(z0);switch(jr){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function sx(z0){for(;;){var or=r3(m(z0));if(or!==0)return or===1?0:_(z0)}}function tx(z0){var or=Fy(m(z0));if(2>>0)return _(z0);switch(or){case 0:var jr=jo(m(z0));return jr===0?sx(z0):jr===1?W0(z0):_(z0);case 1:return sx(z0);default:return W0(z0)}}function j0(z0){var or=Vy(m(z0));if(or!==0)return or===1?tx(z0):_(z0);for(;;){var jr=ne(m(z0));if(2>>0)return _(z0);switch(jr){case 0:continue;case 1:return tx(z0);default:x:for(;;){if(mr(m(z0))!==0)return _(z0);for(;;){var lx=ne(m(z0));if(2>>0)return _(z0);switch(lx){case 0:continue;case 1:return tx(z0);default:continue x}}}}}}yr(X);var Px=Do(m(X));if(2>>0)var Ex=_(X);else switch(Px){case 0:if(mr(m(X))===0)for(;;){var Ox=ne(m(X));if(2>>0)var Ex=_(X);else switch(Ox){case 0:continue;case 1:var Ex=tx(X);break;default:x:for(;;){if(mr(m(X))===0)for(;;){var qx=ne(m(X));if(2>>0)var B0=_(X);else switch(qx){case 0:continue;case 1:var B0=tx(X);break;default:continue x}break}else var B0=_(X);var Ex=B0;break}}break}else var Ex=_(X);break;case 1:var rr=Py(m(X)),Ex=rr===0?j0(X):rr===1?tx(X):_(X);break;default:for(;;){var Ux=Xy(m(X));if(2>>0)var Ex=_(X);else switch(Ux){case 0:var Ex=j0(X);break;case 1:continue;default:var Ex=tx(X)}break}}if(Ex!==0)return Nx(Ln0);var K0=t1(X),nr=w2(h,Jr(h,X),48);return[0,nr,Wt(2,K0)]});case 22:var H=t1(r),b=w2(x,Jr(x,r),48);return[0,b,Wt(2,H)];case 23:return N1(x,r,function(h,X){function W0(K0){for(;;){r0(K0,0);var nr=Bo(m(K0));if(nr!==0){if(nr!==1)return _(K0);x:for(;;){if(mr(m(K0))!==0)return _(K0);for(;;){r0(K0,0);var z0=Bo(m(K0));if(z0!==0){if(z0===1)continue x;return _(K0)}}}}}}function sx(K0){for(;;)if(r0(K0,0),mr(m(K0))!==0)return _(K0)}function tx(K0){var nr=Fy(m(K0));if(2>>0)return _(K0);switch(nr){case 0:var z0=jo(m(K0));return z0===0?sx(K0):z0===1?W0(K0):_(K0);case 1:return sx(K0);default:return W0(K0)}}function j0(K0){var nr=Vy(m(K0));if(nr!==0)return nr===1?tx(K0):_(K0);for(;;){var z0=ne(m(K0));if(2>>0)return _(K0);switch(z0){case 0:continue;case 1:return tx(K0);default:x:for(;;){if(mr(m(K0))!==0)return _(K0);for(;;){var or=ne(m(K0));if(2>>0)return _(K0);switch(or){case 0:continue;case 1:return tx(K0);default:continue x}}}}}}yr(X);var Px=Do(m(X));if(2>>0)var Ex=_(X);else switch(Px){case 0:if(mr(m(X))===0)for(;;){var Ox=ne(m(X));if(2>>0)var Ex=_(X);else switch(Ox){case 0:continue;case 1:var Ex=tx(X);break;default:x:for(;;){if(mr(m(X))===0)for(;;){var qx=ne(m(X));if(2>>0)var B0=_(X);else switch(qx){case 0:continue;case 1:var B0=tx(X);break;default:continue x}break}else var B0=_(X);var Ex=B0;break}}break}else var Ex=_(X);break;case 1:var rr=Py(m(X)),Ex=rr===0?j0(X):rr===1?tx(X):_(X);break;default:for(;;){var Ux=Xy(m(X));if(2>>0)var Ex=_(X);else switch(Ux){case 0:var Ex=j0(X);break;case 1:continue;default:var Ex=tx(X)}break}}return Ex===0?[0,h,Zt(4,t1(X))]:Nx(On0)});case 24:return[0,x,Zt(4,t1(r))];case 25:return N1(x,r,function(h,X){function W0(Ux){for(;;){var K0=Vt(m(Ux));if(2>>0)return _(Ux);switch(K0){case 0:continue;case 1:x:for(;;){if(mr(m(Ux))!==0)return _(Ux);for(;;){var nr=Vt(m(Ux));if(2>>0)return _(Ux);switch(nr){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function sx(Ux){var K0=r3(m(Ux));return K0===0?W0(Ux):K0===1?0:_(Ux)}yr(X);var tx=Do(m(X));if(2>>0)var j0=_(X);else switch(tx){case 0:var j0=mr(m(X))===0?W0(X):_(X);break;case 1:for(;;){var Px=e3(m(X));if(Px===0)var j0=sx(X);else{if(Px===1)continue;var j0=_(X)}break}break;default:for(;;){var Ex=Yo(m(X));if(2>>0)var j0=_(X);else switch(Ex){case 0:var j0=sx(X);break;case 1:continue;default:x:for(;;){if(mr(m(X))===0)for(;;){var Ox=Yo(m(X));if(2>>0)var qx=_(X);else switch(Ox){case 0:var qx=sx(X);break;case 1:continue;default:continue x}break}else var qx=_(X);var j0=qx;break}}break}}if(j0!==0)return Nx(In0);var B0=t1(X),rr=w2(h,Jr(h,X),39);return[0,rr,Wt(2,B0)]});case 26:return N1(x,r,function(h,X){yr(X);var W0=jo(m(X));if(W0===0)for(;;){var sx=r3(m(X));if(sx!==0){var Ex=sx===1?0:_(X);break}}else if(W0===1)for(;;){var tx=Vt(m(X));if(2>>0)var Ex=_(X);else switch(tx){case 0:continue;case 1:x:for(;;){if(mr(m(X))===0)for(;;){var j0=Vt(m(X));if(2>>0)var Px=_(X);else switch(j0){case 0:continue;case 1:continue x;default:var Px=0}break}else var Px=_(X);var Ex=Px;break}break;default:var Ex=0}break}else var Ex=_(X);return Ex===0?[0,h,Wt(2,t1(X))]:Nx(Rn0)});case 27:var B=t1(r),a0=w2(x,Jr(x,r),39);return[0,a0,Wt(2,B)];case 28:return[0,x,Wt(2,t1(r))];case 29:return N1(x,r,function(h,X){function W0(B0){for(;;){r0(B0,0);var rr=Bo(m(B0));if(rr!==0){if(rr!==1)return _(B0);x:for(;;){if(mr(m(B0))!==0)return _(B0);for(;;){r0(B0,0);var Ux=Bo(m(B0));if(Ux!==0){if(Ux===1)continue x;return _(B0)}}}}}}function sx(B0){return r0(B0,0),mr(m(B0))===0?W0(B0):_(B0)}yr(X);var tx=Do(m(X));if(2>>0)var j0=_(X);else switch(tx){case 0:var j0=mr(m(X))===0?W0(X):_(X);break;case 1:for(;;){r0(X,0);var Px=e3(m(X));if(Px===0)var j0=sx(X);else{if(Px===1)continue;var j0=_(X)}break}break;default:for(;;){r0(X,0);var Ex=Yo(m(X));if(2>>0)var j0=_(X);else switch(Ex){case 0:var j0=sx(X);break;case 1:continue;default:x:for(;;){if(mr(m(X))===0)for(;;){r0(X,0);var Ox=Yo(m(X));if(2>>0)var qx=_(X);else switch(Ox){case 0:var qx=sx(X);break;case 1:continue;default:continue x}break}else var qx=_(X);var j0=qx;break}}break}}return j0===0?[0,h,Zt(4,t1(X))]:Nx(Nn0)});case 30:return[0,x,Zt(4,t1(r))];case 31:return[0,x,66];case 32:return[0,x,6];default:return[0,x,7]}switch(Y){case 34:return[0,x,0];case 35:return[0,x,1];case 36:return[0,x,2];case 37:return[0,x,3];case 38:return[0,x,4];case 39:return[0,x,5];case 40:return[0,x,12];case 41:return[0,x,10];case 42:return[0,x,8];case 43:return[0,x,9];case 44:return[0,x,86];case 45:return[0,x,83];case 46:return[0,x,85];case 47:return[0,x,6];case 48:return[0,x,7];case 49:return[0,x,98];case 50:return[0,x,99];case 51:return[0,x,82];case 52:return[0,x,85];case 53:return[0,x,c2];case 54:return[0,x,86];case 55:return[0,x,88];case 56:return[0,x,87];case 57:return[0,x,89];case 58:return[0,x,91];case 59:return[0,x,11];case 60:return[0,x,82];case 61:return[0,x,nn];case 62:return[0,x,jt];case 63:return[0,x,ud];case 64:return[0,x,Ep];case 65:var m0=r[6];iV(r);var P0=n6(x,m0,r[3]);ZI(r,m0);var D=t1(r),N0=vV(x,D),X0=N0[2],D0=N0[1],ox=Tx(X0,_p);if(0<=ox){if(0>=ox)return[0,D0,Eo];var b0=Tx(X0,wx);if(0<=b0){if(0>=b0)return[0,D0,il];if(!P(X0,Cs))return[0,D0,31];if(!P(X0,Ps))return[0,D0,46];if(!P(X0,vd))return[0,D0,Da];if(!P(X0,B5))return[0,D0,br];if(!P(X0,Os))return[0,D0,Lf]}else{if(!P(X0,X8))return[0,D0,Lt];if(!P(X0,_v))return[0,D0,29];if(!P(X0,wa))return[0,D0,dv];if(!P(X0,ga))return[0,D0,K4];if(!P(X0,je))return[0,D0,42];if(!P(X0,Ua))return[0,D0,Ca]}}else{var kx=Tx(X0,Bc);if(0<=kx){if(0>=kx)return[0,D0,41];if(!P(X0,Is))return[0,D0,30];if(!P(X0,Vj))return[0,D0,Xr];if(!P(X0,b2))return[0,D0,53];if(!P(X0,kl))return[0,D0,h1];if(!P(X0,Y8))return[0,D0,Di]}else{if(!P(X0,y5))return[0,D0,st];if(!P(X0,ha))return[0,D0,wl];if(!P(X0,wv))return[0,D0,ma];if(!P(X0,D5))return[0,D0,Kn0];if(!P(X0,rl))return[0,D0,zn0];if(!P(X0,se))return[0,D0,Ri]}}return[0,D0,[4,P0,X0,bl(D)]];case 66:var V0=x[4]?w2(x,Jr(x,r),96):x;return[0,V0,Nr];default:return[0,x,[7,Jx(r)]]}},u6=function(x){return function(r){for(var e=0,t=r;;){var u=p(x,t,t[2]);switch(u[0]){case 0:var i=u[2],f=u[1],o=fV(f,i),a=e===0?0:Ax(e),d=f[6];if(d===0)return[0,[0,f[1],f[2],f[3],f[4],f[5],f[6],o],[0,i,o,0,a]];var k=[0,i,o,Ax(d),a];return[0,[0,f[1],f[2],f[3],f[4],f[5],LJ,o],k];case 1:var T=u[2],g=u[1],e=[0,T,e],t=[0,g[1],g[2],g[3],g[4],g[5],g[6],T[1]];continue;default:var t=u[1];continue}}}},RS0=u6(AS0),IS0=u6(PS0),OS0=u6(CS0),LS0=u6(NS0),MS0=u6(ES0),T2=EJ([0,JT0]),i6=function(x,r){return[0,0,0,r,MJ(x)]},qy=function(x){var r=x[4];switch(x[3]){case 0:var J=l(MS0,r);break;case 1:var J=l(LS0,r);break;case 2:var J=l(IS0,r);break;case 3:var e=de(r,r[2]),t=Qr(Xr),u=Qr(Xr),i=r[2];yr(i);var f=m(i),o=Lt>>0)var a=_(i);else switch(o){case 0:var a=1;break;case 1:var a=4;break;case 2:var a=0;break;case 3:r0(i,0);var a=pe(m(i))===0?0:_(i);break;case 4:var a=2;break;default:var a=3}if(4>>0)var d=Nx(Qn0);else switch(a){case 0:var k=Jx(i);vr(u,k),vr(t,k);var T=yV(K2(r,i),t,u,i),g=de(T,i),A=X1(t),N=X1(u),d=[0,T,[9,[0,T[1],e,g],A,N]];break;case 1:var d=[0,r,Nr];break;case 2:var d=[0,r,98];break;case 3:var d=[0,r,0];break;default:Ga(i);var R=yV(r,t,u,i),I=de(R,i),M=X1(t),L=X1(u),d=[0,R,[9,[0,R[1],e,I],M,L]]}var z=d[2],V=d[1],Z=fV(V,z),$=V[6];if($===0)var U=[0,V,[0,z,Z,0,0]];else var i0=[0,z,Z,Ax($),0],U=[0,[0,V[1],V[2],V[3],V[4],V[5],0,V[7]],i0];var J=U;break;case 4:var J=l(OS0,r);break;default:var J=l(RS0,r)}var Y=J[1],F=J[2],n0=[0,MJ(Y),F];return x[4]=Y,x[1]?x[2]=[0,n0]:x[1]=[0,n0],n0},mV=function(x){var r=x[1];return r?r[1][2]:qy(x)[2]},n3=function(x){return Yl(x[24][1])},_1=function(x){return x[28][4]},ux=function(x,r){var e=r[2];x[1][1]=[0,[0,r[1],e],x[1][1]];var t=x[23];return t?p(t[1],x,e):0},f6=function(x,r){return x[31][1]=r,0},Jo=function(x,r){if(x===0)return mV(r[26][1]);if(x!==1)throw q0([0,wr,Ps0],1);var e=r[26][1];e[1]||qy(e);var t=e[2];return t?t[1][2]:qy(e)[2]},Gs=function(x,r){return x===r[5]?r:[0,r[1],r[2],r[3],r[4],x,r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},kV=function(x,r){return x===r[10]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],x,r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},vO=function(x,r){return x===r[18]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],x,r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},aO=function(x,r){return x===r[19]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],x,r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},hV=function(x,r){return x===r[20]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],x,r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Zv=function(x,r){return x===r[22]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],x,r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},lO=function(x,r){return x===r[14]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],x,r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},c6=function(x,r){return x===r[8]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],x,r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},s6=function(x,r){return x===r[12]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],x,r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Wv=function(x,r){return x===r[15]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],x,r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},pO=function(x,r){return x===r[16]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],x,r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},_V=function(x,r){return x===r[6]?r:[0,r[1],r[2],r[3],r[4],r[5],x,r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},wV=function(x,r){return x===r[7]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],x,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},dO=function(x,r){return x===r[13]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],x,r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Gy=function(x,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],[0,x],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},yO=function(x){function r(e){return ux(x,e)}return function(e){return C2(r,e)}},u3=function(x){var r=x[4][1];return r?[0,r[1][2]]:0},TV=function(x){var r=x[4][1];return r?[0,r[1][1]]:0},SV=function(x){return[0,x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15],x[16],x[17],x[18],x[19],x[20],x[21],x[22],0,x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]]},EV=function(x,r,e,t){return[0,x[1],x[2],T2[1],x[4],x[5],0,0,0,0,0,1,x[12],x[13],x[14],x[15],x[16],x[17],e,r,x[20],t,x[22],x[23],x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]]},i3=function(x){return P(x,Tv)&&P(x,b2)&&P(x,ka)&&P(x,u8)&&P(x,El)&&P(x,H3)&&P(x,z3)&&P(x,je)&&P(x,Y2)?0:1},$v=function(x){return P(x,AP)&&P(x,"eval")?0:1},by=function(x){var r=Tx(x,s8),e=0;if(0<=r){if(0>>0){if(D2>=t+1>>>0)return 1}else if(t===6)return 0}return v6(x,r)},f3=function(x){return PV(0,x)},Vo=function(x,r){var e=pr(x,r),t=0;if(typeof e=="number")switch(e){case 28:case 42:case 52:case 53:case 54:case 55:case 56:case 57:case 58:var u=1;break;default:t=1}else if(e[0]===4)var u=i3(e[2]);else t=1;if(t)var u=0;if(u)return 1;var i=0;if(typeof e=="number")switch(e){case 14:case 48:case 60:case 61:case 62:case 63:case 64:case 65:case 126:i=1;break}else e[0]===4&&(i=1);return i?1:0},x9=function(x,r){return gV(r,pr(x,r))},CV=function(x,r){var e=Vo(x,r);return e||x9(x,r)},vs=function(x){return Vo(0,x)},zo=function(x){var r=K(x)===15?1:0;if(r)var e=r;else{var t=K(x)===64?1:0;if(t){var u=pr(1,x)===15?1:0;if(u)var i=o6(1,x)[2][1],e=gx(x)[3][1]===i?1:0;else var e=u}else var e=t}return e},a6=function(x){var r=K(x);if(typeof r=="number")switch(r){case 13:case 40:return 1}else if(r[0]===4&&!P(r[3],r_)&&pr(1,x)===40)return 1;return 0},hO=function(x){var r=x[28][1];if(r){var e=K(x);if(typeof e!="number"&&e[0]===4&&!P(e[3],_o)&&Vo(1,x))return 1;var t=0}else var t=r;return t},_O=function(x){var r=K(x);return typeof r!="number"&&r[0]===4&&!P(r[3],C1)?1:0},zx=function(x,r){return ux(x,[0,gx(x),r])},NV=function(x,r){var e=nO(0,r);return x?[26,e,x[1]]:[24,e]},g1=function(x,r){var e=kO(r);return l(yO(r),e),zx(r,NV(x,K(r)))},r9=function(x){function r(e){return ux(x,[0,e[1],Nr])}return function(e){return C2(r,e)}},RV=function(x,r){var e=x[6]?G0(Tr(Es0),r,r,r):gs0;return g1([0,e],x)},$t=function(x,r){var e=x[5];return e&&zx(x,r)},yt=function(x,r){var e=x[5],t=r[2],u=r[1];return e&&ux(x,[0,u,t])},Qv=function(x,r){return ux(x,[0,r,[14,x[5]]])},Z0=function(x){var r=x[27][1];if(r){var e=r[1],t=n3(x),u=K(x);l(e,[0,gx(x),u,t])}var i=x[26][1],f=i[1],o=f?f[1][1]:qy(i)[1];x[25][1]=o;var a=kO(x);l(yO(x),a);var d=x[2][1],k=us(Jo(0,x)[4],d);x[2][1]=k;var T=[0,Jo(0,x)];x[4][1]=T;var g=x[26][1];return g[2]?(g[1]=g[2],g[2]=0,0):(mV(g),g[1]=0,0)},o1=function(x,r){var e=p(xO,K(x),r);return e&&Z0(x),e},V1=function(x,r){x[24][1]=[0,r,x[24][1]];var e=n3(x),t=i6(x[25][1],e);return x[26][1]=t,0},$1=function(x){var r=x[24][1],e=r?r[2]:Nx(Ss0);x[24][1]=e;var t=n3(x),u=i6(x[25][1],t);return x[26][1]=u,0},yx=function(x){var r=gx(x);if(K(x)===9&&v6(1,x)){var e=_0(x),t=Jo(1,x)[4],u=Fx(e,l(Jl(function(f){return f[1][2][1]<=r[3][1]?1:0}),t));return f6(x,[0,r[3][1]+1|0,0]),u}var i=_0(x);return f6(x,r[3]),i},Ko=function(x){var r=x[4][1];if(!r)return 0;var e=r[1][2],t=_0(x),u=l(Jl(function(i){return i[1][2][1]<=e[3][1]?1:0}),t);return f6(x,[0,e[3][1]+1|0,0]),u},xo=function(x,r){return g1([0,nO(_s0,r)],x)},u0=function(x,r){return 1-p(xO,K(x),r)&&xo(x,r),Z0(x)},IV=function(x,r){var e=o1(x,r);return 1-e&&xo(x,r),e},e9=function(x,r){return IV(x,r),0},ro=function(x,r){var e=K(x),t=0;return typeof e!="number"&&e[0]===4&&Ar(e[3],r)&&(t=1),t||g1([0,l(Tr(hs0),r)],x),Z0(x)},as=[qr,Ls0,Js(0)],OV=function(x,r,e){if(!e)return 0;var t=e[1],u=t[1],i=t[2];if(r[27][1]=[0,u],!x)return x;for(var f=i[2];;){if(!f)return 0;var o=f[2];l(u,f[1]);var f=o}},wO=function(x,r){var e=x[27][1];if(e){var t=e[1],u=hX(0),i=[0,function(z){return mI(z,u)}];x[27][1]=i;var f=[0,[0,t,u]]}else var f=0;var o=x[31][1],a=x[25][1],d=x[24][1],k=x[4][1],T=x[2][1],g=x[1][1];try{var A=l(r,x);OV(1,x,f);var N=[0,A];return N}catch(L){var R=L1(L);if(R!==as)throw q0(R,0);OV(0,x,f),x[1][1]=g,x[2][1]=T,x[4][1]=k,x[24][1]=d,x[25][1]=a,x[31][1]=o;var I=n3(x),M=i6(x[25][1],I);return x[26][1]=M,0}},t9=function(x,r,e){var t=wO(x,e);return t?t[1]:r},l6=function(x,r){var e=Ax(r);if(!e)return r;var t=e[1],u=e[2],i=l(x,t);return t===i?r:Ax([0,i,u])},LV=my(Bs0,function(x){var r=XI(x,Ds0),e=BI(x,Us0),t=e[24],u=e[28],i=e[41],f=e[91],o=e[yN],a=e[OR],d=e[wg],k=e[iB],T=e[tr],g=e[IB],A=e[6],N=e[7],R=e[10],I=e[17],M=e[23],L=e[29],z=e[39],V=e[42],Z=e[52],$=e[61],i0=e[c2],U=e[B1],J=e[Ri],Y=e[ma],F=e[Ca],n0=e[eN],Q=e[Bw],f0=e[IU],s0=e[fU],v0=e[yE],o0=e[YT],c0=e[p5],T0=e[G4],E0=e[AT],M0=e[id],Y0=e[Lp],rx=e[ST],g0=e[H8],H0=e[el],t0=e[Bg],ex=e[Av],xx=e[qD],ax=e[zM],dx=e[tY],mx=e[la],L0=e[kU],C0=e[uY],A0=e[gU],U0=e[PU],Q0=e[bB],H=VI(x,0,0,iX,FI,1)[1];function b(e0,S0,G){var k0=G[2],J0=k0[2],O0=k0[1],ix=G[1];if(J0){var Wx=J0[1],Bx=function($x){return[0,ix,[0,O0,[0,$x]]]};return $0(l(e0[1][1+a],e0),Wx,G,Bx)}function Hx($x){return[0,ix,[0,$x,J0]]}return $0(p(e0[1][1+A],e0,S0),O0,G,Hx)}function B(e0,S0,G){var k0=G[2],J0=G[1],O0=J0[3],ix=J0[2],Wx=J0[1];if(O0)var Bx=l6(l(e0[1][1+u],e0),O0),Hx=ix;else var Bx=0,Hx=p(e0[1][1+u],e0,ix);var $x=p(e0[1][1+i],e0,k0);return ix===Hx&&O0===Bx&&k0===$x?G:[0,[0,Wx,Hx,Bx],$x]}function a0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function m0(e0,S0,G){var k0=G[3];function J0(O0){return[0,G[1],G[2],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function P0(e0,S0){var G=S0[2];function k0(J0){return[0,S0[1],J0]}return $0(l(e0[1][1+i],e0),G,S0,k0)}function D(e0,S0,G){var k0=G[3];function J0(O0){return[0,G[1],G[2],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function N0(e0,S0,G){var k0=G[2],J0=G[1],O0=l6(l(e0[1][1+a],e0),J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,O0,ix]}function X0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function D0(e0,S0,G){var k0=G[4];function J0(O0){return[0,G[1],G[2],G[3],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function ox(e0,S0,G){var k0=G[2];function J0(O0){return[0,G[1],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function b0(e0,S0,G){var k0=G[3],J0=G[2],O0=p(e0[1][1+J],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],O0,ix]}function kx(e0,S0,G){var k0=G[4],J0=G[3],O0=G[2],ix=G[1],Wx=p(e0[1][1+i],e0,k0);if(J0){var Bx=Vx(l(e0[1][1+g],e0),J0);return J0===Bx&&k0===Wx?G:[0,G[1],G[2],Bx,Wx]}if(O0){var Hx=Vx(l(e0[1][1+T],e0),O0);return O0===Hx&&k0===Wx?G:[0,G[1],Hx,G[3],Wx]}var $x=p(e0[1][1+a],e0,ix);return ix===$x&&k0===Wx?G:[0,$x,G[2],G[3],Wx]}function V0(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function h(e0,S0,G){var k0=G[4];function J0(O0){return[0,G[1],G[2],G[3],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function X(e0,S0,G){var k0=G[4];function J0(O0){return[0,G[1],G[2],G[3],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function W0(e0,S0,G){var k0=G[2],J0=G[1],O0=J0[3],ix=J0[2],Wx=J0[1];if(O0)var Bx=l6(l(e0[1][1+u],e0),O0),Hx=ix;else var Bx=0,Hx=p(e0[1][1+u],e0,ix);var $x=p(e0[1][1+i],e0,k0);return ix===Hx&&O0===Bx&&k0===$x?G:[0,[0,Wx,Hx,Bx],$x]}function sx(e0,S0,G){var k0=G[3],J0=G[1],O0=t2(l(e0[1][1+f],e0),J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,O0,G[2],ix]}function tx(e0,S0,G){var k0=G[2];function J0(O0){return[0,G[1],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function j0(e0,S0){if(S0[0]===0){var G=S0[1],k0=function(Hx){return[0,Hx]};return $0(l(e0[1][1+o],e0),G,S0,k0)}var J0=S0[1],O0=J0[2],ix=O0[2],Wx=J0[1],Bx=p(e0[1][1+o],e0,ix);return ix===Bx?S0:[1,[0,Wx,[0,O0[1],Bx]]]}function Px(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+c0],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function Ex(e0,S0){var G=S0[2],k0=S0[1],J0=G[4];function O0(ix){return[0,k0,[0,G[1],G[2],G[3],ix]]}return $0(l(e0[1][1+i],e0),J0,[0,k0,G],O0)}function Ox(e0,S0,G){var k0=G[9],J0=G[3],O0=p(e0[1][1+M0],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,G[4],G[5],G[6],G[7],G[8],ix,G[10]]}function qx(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function B0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function rr(e0,S0){var G=S0[2],k0=S0[1],J0=G[3];function O0(ix){return[0,k0,[0,G[1],G[2],ix]]}return $0(l(e0[1][1+i],e0),J0,[0,k0,G],O0)}function Ux(e0,S0,G){var k0=G[6],J0=G[5],O0=p(e0[1][1+ex],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],G[3],G[4],O0,ix,G[7]]}function K0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];if(k0===0){var ix=function(Hx){return[0,O0,[0,Hx,k0]]};return $0(l(e0[1][1+o],e0),J0,S0,ix)}function Wx(Hx){return[0,O0,[0,J0,Hx]]}var Bx=l(e0[1][1+t],e0);return $0(function(Hx){return Vx(Bx,Hx)},k0,S0,Wx)}function nr(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Bx){return[0,O0,[0,Bx,k0]]}var Wx=l(e0[1][1+d],e0);return $0(function(Bx){return l6(Wx,Bx)},J0,S0,ix)}function z0(e0,S0,G){var k0=G[2],J0=G[1];if(k0===0){var O0=function(Bx){return[0,Bx,G[2],G[3]]};return $0(l(e0[1][1+a],e0),J0,G,O0)}function ix(Bx){return[0,G[1],Bx,G[3]]}var Wx=l(e0[1][1+t],e0);return $0(function(Bx){return Vx(Wx,Bx)},k0,G,ix)}function or(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function jr(e0,S0,G){var k0=G[7],J0=G[2],O0=p(e0[1][1+k],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],O0,G[3],G[4],G[5],G[6],ix]}function lx(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function v1(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function K1(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+g],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function w1(e0,S0,G){var k0=G[2];function J0(O0){return[0,G[1],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function Cr(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function u2(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function w(e0,S0){var G=S0[2];function k0(J0){return[0,S0[1],J0]}return $0(l(e0[1][1+i],e0),G,S0,k0)}function x0(e0,S0,G){var k0=G[2];function J0(O0){return[0,G[1],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}return KI(x,[0,V,function(e0,S0){var G=S0[2],k0=l(Jl(function(O0){return qs(O0[1][2],e0[1+r])<0?1:0}),G),J0=ns(k0);return ns(G)===J0?S0:[0,S0[1],k0,S0[3]]},Q0,x0,U0,w,A0,u2,C0,Cr,L0,w1,mx,K1,g,v1,T,lx,dx,jr,k,or,ax,z0,xx,nr,d,K0,t0,Ux,H0,rr,g0,B0,rx,qx,Y0,Ox,E0,Ex,T0,Px,o0,j0,v0,tx,s0,sx,f0,W0,Q,X,n0,h,F,V0,U,kx,Y,b0,i0,ox,f,D0,$,X0,Z,N0,z,D,L,P0,M,m0,I,a0,R,B,N,b]),function(e0,S0,G){var k0=ky(S0,x);return k0[1+r]=G,l(H,k0),zI(S0,k0,x)}}),n9=function(x){var r=u3(x);if(r)var e=r[1],t=AV(x)?(f6(x,e[3]),[0,p(LV[1],0,e[3])]):0,u=t;else var u=0;return[0,0,function(i,f){return u?p(f,u[1],i):i}]},p6=function(x){var r=u3(x);if(r){var e=r[1];if(AV(x)){f6(x,e[3]);var t=Ko(x),u=[0,p(LV[1],0,[0,e[3][1]+1|0,0])],i=t}else var u=0,i=Ko(x)}else var u=0,i=0;return[0,i,function(f,o){return u?p(o,u[1],f):f}]},R1=function(x){return Z2(x)?p6(x):n9(x)},Sn=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,Ra,2),t,u)})},ue=function(x,r){if(!r)return 0;var e=r[1],t=R1(x)[2];return[0,p(t,e,function(u,i){return p(Gx(u,bN,5),u,i)})]},TO=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,MD,8),t,u)})},c3=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,-1045824777,9),t,u)})},d6=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,-455772979,10),t,u)})},MV=function(x,r){if(!r)return 0;var e=r[1],t=R1(x)[2];return[0,p(t,e,function(u,i){return p(Gx(u,uU,13),u,i)})]},En=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,vD,14),t,u)})},DV=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){var i=l(Gx(t,bU,16),t);return l6(function(f){return t2(i,f)},u)})},jV=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,-21476009,17),t,u)})},DS0=function(x,r){var e=x[2],t=x[1];function u(v1){return I2(v1,r)}switch(e[0]){case 0:var i=e[1],f=GI(i[2],r),lx=[0,[0,i[1],f]];break;case 1:var o=e[1],a=u(o[2]),lx=[1,[0,o[1],a]];break;case 2:var d=e[1],k=u(d[7]),lx=[2,[0,d[1],d[2],d[3],d[4],d[5],d[6],k]];break;case 3:var T=e[1],g=T[7],A=u(T[6]),lx=[3,[0,T[1],T[2],T[3],T[4],T[5],A,g]];break;case 4:var N=e[1],R=u(N[2]),lx=[4,[0,N[1],R]];break;case 5:var lx=[5,[0,u(e[1][1])]];break;case 6:var I=e[1],M=u(I[7]),lx=[6,[0,I[1],I[2],I[3],I[4],I[5],I[6],M]];break;case 7:var L=e[1],z=u(L[5]),lx=[7,[0,L[1],L[2],L[3],L[4],z]];break;case 8:var V=e[1],Z=u(V[3]),lx=[8,[0,V[1],V[2],Z]];break;case 9:var $=e[1],i0=u($[5]),lx=[9,[0,$[1],$[2],$[3],$[4],i0]];break;case 10:var U=e[1],J=u(U[4]),lx=[10,[0,U[1],U[2],U[3],J]];break;case 11:var Y=e[1],F=u(Y[5]),lx=[11,[0,Y[1],Y[2],Y[3],Y[4],F]];break;case 12:var n0=e[1],Q=u(n0[4]),lx=[12,[0,n0[1],n0[2],n0[3],Q]];break;case 13:var f0=e[1],s0=u(f0[2]),lx=[13,[0,f0[1],s0]];break;case 14:var v0=e[1],o0=u(v0[4]),lx=[14,[0,v0[1],v0[2],v0[3],o0]];break;case 15:var c0=e[1],T0=u(c0[5]),lx=[15,[0,c0[1],c0[2],c0[3],c0[4],T0]];break;case 16:var E0=e[1],M0=u(E0[4]),lx=[16,[0,E0[1],E0[2],E0[3],M0]];break;case 17:var Y0=e[1],rx=u(Y0[3]),lx=[17,[0,Y0[1],Y0[2],rx]];break;case 18:var lx=[18,[0,u(e[1][1])]];break;case 19:var g0=e[1],H0=u(g0[3]),lx=[19,[0,g0[1],g0[2],H0]];break;case 20:var t0=e[1],ex=u(t0[3]),lx=[20,[0,t0[1],t0[2],ex]];break;case 21:var xx=e[1],ax=u(xx[5]),lx=[21,[0,xx[1],xx[2],xx[3],xx[4],ax]];break;case 22:var dx=e[1],mx=u(dx[3]),lx=[22,[0,dx[1],dx[2],mx]];break;case 23:var L0=e[1],C0=u(L0[5]),lx=[23,[0,L0[1],L0[2],L0[3],L0[4],C0]];break;case 24:var A0=e[1],U0=u(A0[5]),lx=[24,[0,A0[1],A0[2],A0[3],A0[4],U0]];break;case 25:var Q0=e[1],H=u(Q0[5]),lx=[25,[0,Q0[1],Q0[2],Q0[3],Q0[4],H]];break;case 26:var b=e[1],B=b[10],a0=u(b[9]),lx=[26,[0,b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],a0,B]];break;case 27:var m0=e[1],P0=u(m0[4]),lx=[27,[0,m0[1],m0[2],m0[3],P0]];break;case 28:var D=e[1],N0=u(D[5]),lx=[28,[0,D[1],D[2],D[3],D[4],N0]];break;case 29:var X0=e[1],D0=u(X0[5]),lx=[29,[0,X0[1],X0[2],X0[3],X0[4],D0]];break;case 30:var ox=e[1],b0=u(ox[3]),lx=[30,[0,ox[1],ox[2],b0]];break;case 31:var kx=e[1],V0=kx[3],h=u(kx[2]),lx=[31,[0,kx[1],h,V0]];break;case 32:var X=e[1],W0=X[4],sx=u(X[3]),lx=[32,[0,X[1],X[2],sx,W0]];break;case 33:var tx=e[1],j0=u(tx[2]),lx=[33,[0,tx[1],j0]];break;case 34:var Px=e[1],Ex=u(Px[4]),lx=[34,[0,Px[1],Px[2],Px[3],Ex]];break;case 35:var Ox=e[1],qx=u(Ox[4]),lx=[35,[0,Ox[1],Ox[2],Ox[3],qx]];break;case 36:var B0=e[1],rr=u(B0[5]),lx=[36,[0,B0[1],B0[2],B0[3],B0[4],rr]];break;case 37:var Ux=e[1],K0=u(Ux[3]),lx=[37,[0,Ux[1],Ux[2],K0]];break;case 38:var nr=e[1],z0=u(nr[3]),lx=[38,[0,nr[1],nr[2],z0]];break;default:var or=e[1],jr=u(or[3]),lx=[39,[0,or[1],or[2],jr]]}return[0,t,lx]};my(Ys0,function(x){var r=XI(x,Ms0),e=JI(js0),t=e.length-1,u=uX.length-1,i=za(t+u|0,0),f=t-1|0,o=0;if(f>=0)for(var a=o;;){var d=Hl(x,W1(e,a)[1+a]);W1(i,a)[1+a]=d;var k=a+1|0;if(f!==a){var a=k;continue}break}var T=u-1|0,g=0;if(T>=0)for(var A=g;;){var N=A+t|0,R=XI(x,W1(uX,A)[1+A]);W1(i,N)[1+N]=R;var I=A+1|0;if(T!==A){var A=I;continue}break}var M=i[4],L=i[5],z=i[nj],V=i[wg],Z=i[295],$=i[296],i0=i[44],U=i[Q3],J=i[RB],Y=VI(x,0,0,iX,FI,1)[1];function F(o0,c0,T0){return p(o0[1][1+z],o0,T0[2]),T0}function n0(o0,c0){return p(o0[1][1+V],o0,c0),c0}function Q(o0,c0){var T0=c0[1],E0=o0[1+$];if(E0){var M0=qs(E0[1][1][2],T0[2])<0?1:0,Y0=M0&&(o0[1+$]=[0,c0],0);return Y0}var rx=0<=qs(T0[2],o0[1+r][3])?1:0,g0=rx&&(o0[1+$]=[0,c0],0);return g0}function f0(o0,c0){var T0=c0[1],E0=o0[1+Z];if(E0){var M0=qs(T0[2],E0[1][1][2])<0?1:0,Y0=M0&&(o0[1+Z]=[0,c0],0);return Y0}var rx=qs(T0[2],o0[1+r][2])<0?1:0,g0=rx&&(o0[1+Z]=[0,c0],0);return g0}function s0(o0,c0){return c0?p(o0[1][1+V],o0,c0[1]):0}function v0(o0,c0){var T0=c0[2],E0=c0[1];return C2(l(o0[1][1+L],o0),E0),C2(l(o0[1][1+M],o0),T0)}return KI(x,[0,U,function(o0){return[0,o0[1+Z],o0[1+$]]},V,v0,z,s0,L,f0,M,Q,i0,n0,J,F]),function(o0,c0,T0){var E0=ky(c0,x);return E0[1+r]=T0,l(Y,E0),E0[1+Z]=0,E0[1+$]=0,zI(c0,E0,x)}});var UV=function(x){var r=K(x),e=0;if(typeof r=="number"){var t=r;if(49<=t)switch(t){case 49:var u=_o0;break;case 50:var u=wo0;break;case 51:var u=To0;break;case 52:var u=So0;break;case 53:var u=Eo0;break;case 54:var u=go0;break;case 55:var u=Ao0;break;case 56:var u=Po0;break;case 57:var u=Co0;break;case 58:var u=No0;break;case 59:var u=Ro0;break;case 60:var u=Io0;break;case 61:var u=Oo0;break;case 62:var u=Lo0;break;case 63:var u=Mo0;break;case 64:var u=Do0;break;case 65:var u=jo0;break;case 114:var u=Uo0;break;case 115:var u=Bo0;break;case 116:var u=Yo0;break;case 117:var u=Xo0;break;case 118:var u=Jo0;break;case 119:var u=Vo0;break;case 120:var u=zo0;break;case 121:var u=Ko0;break;case 122:var u=Zo0;break;case 123:var u=Wo0;break;case 124:var u=$o0;break;case 125:var u=Qo0;break;case 126:var u=Fo0;break;case 128:var u=Ho0;break;case 129:var u=qo0;break;default:e=1}else switch(t){case 15:var u=Xs0;break;case 16:var u=Js0;break;case 17:var u=Vs0;break;case 18:var u=zs0;break;case 19:var u=Ks0;break;case 20:var u=Zs0;break;case 21:var u=Ws0;break;case 22:var u=$s0;break;case 23:var u=Qs0;break;case 24:var u=Fs0;break;case 25:var u=Hs0;break;case 26:var u=qs0;break;case 27:var u=Gs0;break;case 28:var u=bs0;break;case 29:var u=xo0;break;case 30:var u=ro0;break;case 31:var u=eo0;break;case 32:var u=to0;break;case 33:var u=no0;break;case 34:var u=uo0;break;case 35:var u=io0;break;case 36:var u=fo0;break;case 37:var u=co0;break;case 38:var u=so0;break;case 39:var u=oo0;break;case 40:var u=vo0;break;case 41:var u=ao0;break;case 42:var u=lo0;break;case 43:var u=po0;break;case 44:var u=do0;break;case 45:var u=yo0;break;case 46:var u=mo0;break;case 47:var u=ko0;break;case 48:var u=ho0;break;default:e=1}}else switch(r[0]){case 4:var u=r[2];break;case 11:var i=r[1]?Go0:bo0,u=i;break;default:e=1}if(e){g1(xv0,x);var u=rv0}return Z0(x),u},S2=function(x){var r=gx(x),e=_0(x),t=UV(x);return[0,r,[0,t,y0([0,e],[0,yx(x)],0)]]},BV=function(x){var r=gx(x),e=_0(x);u0(x,14);var t=gx(x),u=UV(x),i=y0([0,e],[0,yx(x)],0),f=Fr(r,t),o=t[2],a=r[3],d=a[1]===o[1]?1:0,k=d&&(a[2]===o[2]?1:0);return 1-k&&ux(x,[0,f,Eo]),[0,f,[0,u,i]]},Fv=function(x){var r=x[2],e=r[3]===0?1:0,t=r[2];if(!e)return e;for(var u=t;;){if(!u)return 1;var i=u[1][2],f=0,o=u[2];if(i[1][2][0]===2&&!i[2]){var a=1;f=1}if(!f)var a=0;if(!a)return a;var u=o}},y6=function(x){for(var r=x;;){var e=r[2];if(e[0]!==30)return 0;var t=e[1][2];if(t[2][0]===26)return 1;var r=t}},u9=function(x,r,e){var t=e[2][1],u=e[1];if(!P(t,Pv)){var i=r[19];return i&&ux(r,[0,u,6])}if(P(t,ka)){if(!P(t,Y2))return r[18]?ux(r,[0,u,ot]):yt(r,[0,u,85])}else if(r[14])return ux(r,[0,u,[24,gy(t)]]);if(i3(t))return yt(r,[0,u,85]);if(by(t))return ux(r,[0,u,ot]);if(x){var f=x[1];if($v(t))return yt(r,[0,u,f])}return 0},l0=function(x,r,e){var t=x?x[1]:gx(e),u=l(r,e),i=u3(e),f=i?Fr(t,i[1]):t;return[0,f,u]},i9=function(x,r,e){var t=l0(x,r,e),u=t[2];return[0,[0,t[1],u[1]],u[2]]},f9=function(x){V1(x,0);var r=K(x);$1(x);var e=pr(1,x),t=0;if(typeof r=="number")r===21&&(t=1);else if(r[0]===4)if(P(r[3],ha))t=1;else{var u=0;typeof e=="number"?e===21&&(u=1):e[0]===4&&(u=1),t=u?2:1}var i=0;switch(t){case 1:typeof e=="number"?h1===e&&(i=1):e[0]===4&&!P(e[3],kl)&&(i=1);break;case 0:break;default:i=1}return i?1:0},YV=function(x){switch(x){case 3:return 2;case 4:return 1;case 5:return 1;case 6:return 1;case 7:return 1;default:return 1}},SO=function(x,r,e){if(e){var t=e[1],u=0;if(t===8232||G1===t)u=1;else var i=t===10?6:t===13?5:fl<=t?3:_N<=t?2:h1<=t?1:0;if(u)var i=7;var f=i}else var f=4;return[0,f,x]},jS0=[qr,Mv0,Js(0)],XV=function(x,r,e,t){try{var u=W1(x,r)[1+r];return u}catch(f){var i=L1(f);throw i[1]===fI?q0([0,jS0,e,G0(Tr(Ov0),t,r,x.length-1)],1):q0(i,0)}},c9=function(x,r){if(r[1]===0&&r[2]===0)return 0;var e=XV(x,r[1]-1|0,r,Rv0);return XV(e,r[2],r,Iv0)},JV=function(x){var r=[0,ua0,T2[1],0,0];function e(o){var a=K(o);if(typeof a=="number"){var d=0;if(8<=a?10>a&&(d=1):a===1&&(d=1),d)return 1}return 0}function t(o){var a=gx(o),d=_0(o),k=K(o);if(typeof k=="number")switch(k){case 30:case 31:Z0(o);var T=yx(o);return e(o)?[1,a,[0,k===31?1:0,y0([0,d],[0,T],0)]]:[0,a]}else switch(k[0]){case 0:var g=k[2],A=G0(x[24],o,k[1],g),N=yx(o);return e(o)?[2,a,[0,A,g,y0([0,d],[0,N],0)]]:[0,a];case 1:var R=k[2],I=G0(x[26],o,k[1],R),M=yx(o);return e(o)?[4,a,[0,I,R,y0([0,d],[0,M],0)]]:[0,a];case 2:var L=k[1],z=L[1],V=L[3],Z=L[2];L[4]&&$t(o,81),Z0(o);var $=yx(o);return e(o)?[3,z,[0,Z,V,y0([0,d],[0,$],0)]]:[0,z]}return Z0(o),[0,a]}function u(o){var a=S2(o),d=K(o),k=0;if(typeof d=="number")if(d===82){u0(o,82);var T=t(o)}else if(d===86){zx(o,[8,a[2][1]]),u0(o,86);var T=t(o)}else k=1;else k=1;if(k)var T=0;return[0,a,T]}var i=0;function f(o,a,d,k,T,g,A){var N=ns(T),R=ns(g);function I(L){return[2,[0,[0,g],d,k,A]]}function M(L){return[2,[0,[1,T],d,k,A]]}return N===0?I(0):R===0?M(0):N>>0){if(D2>=i0+1>>>0){var U=Z[3],J=Z[4],Y=Ax(Z[1][5]),F=Ax(Z[1][4]),n0=Ax(Z[1][3]),Q=Ax(Z[1][2]),f0=Ax(Z[1][1]),s0=Fx(J,_0(R));u0(R,1);var v0=K(R),o0=0;if(typeof v0=="number"){var c0=0;if(v0===1||Nr===v0?c0=1:o0=1,c0)var T0=yx(R)}else o0=1;if(o0)var T0=Z2(R)?Ko(R):0;var E0=J1([0,V],[0,T0],s0,0);if(z){switch(z[1]){case 0:var M0=[0,[0,f0,1,U,E0]];break;case 1:var M0=[1,[0,Q,1,U,E0]];break;case 2:var M0=f(R,g,1,U,n0,Y,E0);break;case 3:var M0=[3,[0,Y,U,E0]];break;default:var M0=[4,[0,F,1,U,E0]]}var Y0=M0}else{var rx=ns(f0),g0=ns(Q),H0=ns(n0),t0=ns(Y),ex=function(x0){return[2,[0,bv0,0,U,E0]]},xx=0;if(rx===0&&g0===0){var ax=0;if(H0===0&&t0===0)var dx=ex(0);else ax=1;if(ax)var dx=f(R,g,0,U,n0,Y,E0)}else xx=1;if(xx){var mx=0;if(g0===0&&H0===0&&t0<=rx){C2(function(e0){return ux(R,[0,e0[1],[3,g,e0[2][1][2][1]]])},Y);var dx=[0,[0,f0,0,U,E0]];mx=1}if(!mx){var L0=0;if(rx===0&&H0===0&&t0<=g0){C2(function(e0){return ux(R,[0,e0[1],[11,g,e0[2][1][2][1]]])},Y);var dx=[1,[0,Q,0,U,E0]];L0=1}if(!L0){ux(R,[0,A,[5,g]]);var dx=ex(0)}}}var Y0=dx}return Y0}}else if(i0===10){var C0=gx(R),A0=_0(R);Z0(R);var U0=K(R),Q0=0;if(typeof U0=="number"){var H=U0-2|0,b=0;if(B1>>0)D2>=H+1>>>0&&(b=1);else if(H===7){u0(R,9);var B=K(R),a0=0;if(typeof B=="number"){var m0=0;if((B===1||Nr===B)&&(m0=1),m0){var P0=1;a0=1}}if(!a0)var P0=0;ux(R,[0,C0,[6,P0]]),b=1}b&&(Q0=1)}Q0||ux(R,[0,C0,Gv0]);var Z=[0,Z[1],Z[2],1,A0];continue}}var D=Z[2],N0=Z[1],X0=l0(i,u,R),D0=X0[2],ox=D0[2],b0=D0[1],kx=X0[1],V0=b0[2][1],h=b0[1];if(Ar(V0,hx))var X=Z;else{var W0=O1(V0,0),sx=97<=W0?1:0,tx=sx&&(W0<=br?1:0);tx&&ux(R,[0,h,[10,g,V0]]),p(T2[3],V0,D)&&ux(R,[0,h,[4,g,V0]]);var j0=Z[4],Px=Z[3],Ex=p(T2[4],V0,D),Ox=[0,Z[1],Ex,Px,j0],qx=function(w){return function(x0,e0){return z&&z[1]!==x0?ux(R,[0,e0,[9,g,z,w]]):0}}(V0);if(typeof ox=="number"){var B0=0;if(z)switch(z[1]){case 0:ux(R,[0,kx,[3,g,V0]]);var X=Ox;break;case 1:ux(R,[0,kx,[11,g,V0]]);var X=Ox;break;case 4:ux(R,[0,kx,[2,g,V0]]);var X=Ox;break;default:B0=1}else B0=1;if(B0)var X=[0,[0,N0[1],N0[2],N0[3],N0[4],[0,[0,kx,[0,b0]],N0[5]]],Ex,Px,j0]}else switch(ox[0]){case 0:ux(R,[0,ox[1],[9,g,z,V0]]);var X=Ox;break;case 1:var rr=ox[1],Ux=ox[2];qx(0,rr);var X=[0,[0,[0,[0,kx,[0,b0,[0,rr,Ux]]],N0[1]],N0[2],N0[3],N0[4],N0[5]],Ex,Px,j0];break;case 2:var K0=ox[1],nr=ox[2];qx(1,K0);var X=[0,[0,N0[1],[0,[0,kx,[0,b0,[0,K0,nr]]],N0[2]],N0[3],N0[4],N0[5]],Ex,Px,j0];break;case 3:var z0=ox[1],or=ox[2];qx(2,z0);var X=[0,[0,N0[1],N0[2],[0,[0,kx,[0,b0,[0,z0,or]]],N0[3]],N0[4],N0[5]],Ex,Px,j0];break;default:var jr=ox[1],lx=ox[2];qx(4,jr);var X=[0,[0,N0[1],N0[2],N0[3],[0,[0,kx,[0,b0,[0,jr,lx]]],N0[4]],N0[5]],Ex,Px,j0]}}var v1=K(R),K1=0;if(typeof v1=="number"){var w1=v1-2|0,Cr=0;B1>>0?D2>=w1+1>>>0&&(Cr=1):w1===6&&(zx(R,22),u0(R,8),Cr=1),Cr&&(K1=1)}K1||u0(R,9);var Z=X}},a);return[0,T,N,y0([0,k],0,0)]}]},s9=function(x,r,e){if(typeof e=="number")return[0,x,r];if(e[0]===0){var t=e[1],u=Tx(x,t),i=e[2];return u===0?i===r?e:[0,t,r]:0<=u?[1,2,x,r,e,0]:[1,2,x,r,0,e]}var f=e[5],o=e[4],a=e[3],d=e[2],k=Tx(x,d),T=e[1];if(k===0)return a===r?e:[1,T,x,r,o,f];if(0<=k){var g=s9(x,r,f);return f===g?e:yJ(o,d,a,g)}var A=s9(x,r,o);return o===A?e:yJ(A,d,a,f)},s3=function(x){return[0,bs(x)]},EO=EJ([0,function(x,r){var e=r[2],t=x[2],u=RJ(x[1],r[1]);return u===0?p(IJ,t,e):u}]),m6=function(x,r,e){var t=e[2][1],u=e[1];return Ar(t,hx)?r:p(T2[3],t,r)?(ux(x,[0,u,[0,t]]),r):p(T2[4],t,r)},gO=function(x){return function(r){var e=r[2];switch(e[0]){case 0:var t=e[1][1];return r2(function(i,f){var o=f[0]===0?f[1][2][2]:f[1][2][1];return l(gO(i),o)},x,t);case 1:var u=e[1][1];return r2(function(i,f){if(f[0]===2)return i;var o=f[1][2][1];return l(gO(i),o)},x,u);case 2:return[0,e[1][1],x];default:return Nx(f60)}}},px=bX(s60,c60[1]),o9=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0,i=gx(e),f=K(e);if(typeof f=="number")switch(f){case 103:var o=_0(e);return Z0(e),[0,[0,i,[0,0,y0([0,o],0,0)]]];case 104:var a=_0(e);return Z0(e),[0,[0,i,[0,1,y0([0,a],0,0)]]];case 126:if(t){var d=_0(e);return Z0(e),[0,[0,i,[0,2,y0([0,d],0,0)]]]}break}else if(f[0]===4){var k=f[3];if(P(k,Po)){if(!P(k,P_)&&u&&x9(1,e)){var T=_0(e);return Z0(e),[0,[0,i,[0,4,y0([0,T],0,0)]]]}}else if(u&&x9(1,e)){var g=_0(e);Z0(e);var A=K(e),N=0;if(typeof A!="number"&&A[0]===4&&!P(A[3],P_)){var R=gx(e);Z0(e);var I=Fr(i,R),M=5;N=1}if(!N)var I=i,M=3;return[0,[0,I,[0,M,y0([0,g],0,0)]]]}}return 0},VV=function(x,r,e,t,u){r===1&&$t(u,81);var i=_0(u);Z0(u);var f=yx(u);if(x)var o=y0([0,Fx(x[1],i)],[0,f],0),a=o,d=Qx(Nv0,t),k=-e;else var a=y0([0,i],[0,f],0),d=t,k=e;return[30,[0,k,d,a]]},zV=function(x,r,e,t){var u=_0(t);Z0(t);var i=yx(t);if(x)var f=y0([0,Fx(x[1],u)],[0,i],0),o=Qx(Cv0,e),a=f,d=o,k=uy(GR,r);else var a=y0([0,u],[0,i],0),d=e,k=r;return[31,[0,k,d,a]]},Zr=function x(r){return x.fun(r)},o3=function x(r){return x.fun(r)},KV=function x(r){return x.fun(r)},ZV=function x(r){return x.fun(r)},AO=function x(r,e,t){return x.fun(r,e,t)},v9=function x(r){return x.fun(r)},PO=function x(r,e,t,u){return x.fun(r,e,t,u)},CO=function x(r){return x.fun(r)},NO=function x(r,e,t,u){return x.fun(r,e,t,u)},RO=function x(r){return x.fun(r)},IO=function x(r,e){return x.fun(r,e)},a9=function x(r){return x.fun(r)},WV=function x(r){return x.fun(r)},l9=function x(r,e,t,u){return x.fun(r,e,t,u)},p9=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},$V=function x(r){return x.fun(r)},QV=function x(r,e){return x.fun(r,e)},OO=function x(r){return x.fun(r)},FV=function x(r){return x.fun(r)},HV=function x(r){return x.fun(r)},qV=function x(r){return x.fun(r)},GV=function x(r){return x.fun(r)},LO=function x(r,e){return x.fun(r,e)},bV=function x(r){return x.fun(r)},xz=function x(r){return x.fun(r)},MO=function x(r){return x.fun(r)},k6=function x(r,e){return x.fun(r,e)},rz=function x(r){return x.fun(r)},eo=function x(r){return x.fun(r)},d9=function x(r){return x.fun(r)},ez=function x(r,e){return x.fun(r,e)},DO=function x(r){return x.fun(r)},tz=function x(r){return x.fun(r)},nz=function x(r){return x.fun(r)},uz=function x(r){return x.fun(r)},iz=function x(r){return x.fun(r)},y9=function x(r,e,t,u){return x.fun(r,e,t,u)},jO=function x(r){return x.fun(r)},m9=function x(r){return x.fun(r)},UO=function x(r,e){return x.fun(r,e)},k9=function x(r,e,t,u){return x.fun(r,e,t,u)},BO=function x(r){return x.fun(r)},Zo=function x(r){return x.fun(r)},fz=function x(r){return x.fun(r)},Hv=function x(r){return x.fun(r)},h9=function x(r){return x.fun(r)},_9=function x(r){return x.fun(r)},YO=function x(r,e){return x.fun(r,e)},cz=function x(r,e){return x.fun(r,e)},sz=function x(r){return x.fun(r)},oz=function x(r){return x.fun(r)},w9=function x(r){return x.fun(r)},vz=function x(r,e,t){return x.fun(r,e,t)};I0(Zr,function(x){return l(ZV,x)}),I0(o3,function(x){return 1-_1(x)&&zx(x,xe),l0(0,function(r){return u0(r,86),l(Zr,r)},x)}),I0(KV,function(x){1-_1(x)&&zx(x,xe);var r=gx(x);return u0(x,86),f9(x)?[2,p(UO,x,r)]:[1,l0([0,r],Zr,x)]}),I0(ZV,function(x){var r=gx(x),e=pO(0,x);return G0(AO,e,r,l(v9,e))}),I0(AO,function(x,r,e){var t=K(x);return typeof t=="number"&&t===41?l0([0,r],function(u){u0(u,41);var i=l(v9,pO(1,u));e9(u,85);var f=l(Zr,u);e9(u,86);var o=l(Zr,u);return[17,[0,e,i,f,o,y0(0,[0,yx(u)],0)]]},x):e}),I0(v9,function(x){var r=gx(x);if(K(x)===89){var e=_0(x);Z0(x);var t=e}else var t=0;return ve(PO,x,[0,t],r,l(CO,x))}),I0(PO,function(x,r,e,t){var u=r?r[1]:0;if(K(x)!==89)return t;var i=[0,t,0];return l0([0,e],function(f){for(var o=i;;){if(o1(f,89)){var o=[0,l(CO,f),o];continue}var a=Ax(o);if(a){var d=a[2];if(d){var k=d[2],T=d[1],g=a[1];return[22,[0,[0,g,T,k],y0([0,u],0,0)]]}}throw q0([0,wr,Pv0],1)}},x)}),I0(CO,function(x){var r=gx(x);if(K(x)===91){var e=_0(x);Z0(x);var t=e}else var t=0;return ve(NO,x,[0,t],r,l(RO,x))}),I0(NO,function(x,r,e,t){var u=r?r[1]:0;if(K(x)!==91)return t;var i=[0,t,0];return l0([0,e],function(f){for(var o=i;;){if(o1(f,91)){var o=[0,l(RO,f),o];continue}var a=Ax(o);if(a){var d=a[2];if(d){var k=d[2],T=d[1],g=a[1];return[23,[0,[0,g,T,k],y0([0,u],0,0)]]}}throw q0([0,wr,Av0],1)}},x)}),I0(RO,function(x){return p(IO,x,l(a9,x))}),I0(IO,function(x,r){var e=K(x);if(typeof e=="number"&&e===11&&!x[15]){var t=p(k6,x,r);return ve(y9,x,t[1],0,[0,t[1],[0,0,[0,t,0],0,0]])}return r}),I0(a9,function(x){var r=K(x);return typeof r=="number"&&r===85?l0(0,function(e){var t=_0(e);u0(e,85);var u=y0([0,t],0,0);return[11,[0,l(a9,e),u]]},x):l(WV,x)}),I0(WV,function(x){var r=gx(x);return ve(l9,0,x,r,l(HV,x))}),I0(l9,function(x,r,e,t){var u=x?x[1]:0;if(Z2(r))return t;var i=K(r);if(typeof i=="number"){if(i===6)return Z0(r),Xe(p9,u,0,r,e,t);if(i===10){var f=pr(1,r);return typeof f=="number"&&f===6?(zx(r,Ev0),u0(r,10),u0(r,6),Xe(p9,u,0,r,e,t)):(zx(r,gv0),t)}if(i===83)return Z0(r),K(r)!==6&&zx(r,46),u0(r,6),Xe(p9,1,1,r,e,t)}return t}),I0(p9,function(x,r,e,t,u){return ve(l9,[0,x],e,t,l0([0,t],function(i){if(!r&&o1(i,7))return[16,[0,u,y0(0,[0,yx(i)],0)]];var f=l(Zr,i);u0(i,7);var o=[0,u,f,y0(0,[0,yx(i)],0)];return x?[21,[0,o,r]]:[20,o]},e))}),I0($V,function(x){return p(QV,x,p(px[13],0,x))}),I0(QV,function(x,r){for(var e=[0,r[1],[0,r]];;){var t=e[2],u=e[1];if(K(x)===10&&CV(1,x)){var i=l0([0,u],function(a){return function(d){return u0(d,10),[0,a,S2(d)]}}(t),x),f=i[1],e=[0,f,[1,[0,f,i[2]]]];continue}return t}}),I0(OO,function(x){if(V1(x,0),K(x)===4){Z0(x);var r=l(OO,x);u0(x,5);var e=r}else var e=vs(x)?[0,l($V,x)]:(zx(x,51),0);return $1(x),e}),I0(FV,function(x){return l0(0,function(r){var e=_0(r);u0(r,46);var t=l(OO,r);if(!t)return Sv0;var u=t[1],i=Z2(r)?0:l(h9,r);return[24,[0,u,i,y0([0,e],0,0)]]},x)}),I0(HV,function(x){var r=gx(x),e=K(x),t=0;if(typeof e=="number")switch(e){case 4:return l(uz,x);case 6:return l(xz,x);case 46:return l(FV,x);case 53:return l0(0,function($){var i0=_0($);Z0($);var U=l(BO,$),J=U[2],Y=U[1];return[15,[0,J,Y,y0([0,i0],0,0)]]},x);case 98:return l(iz,x);case 104:return l0(0,qV,x);case 106:var u=_0(x);return Z0(x),[0,r,[10,y0([0,u],[0,yx(x)],0)]];case 125:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l(Zr,$);return[25,[0,J,y0([0,i0],[0,U],0)]]},x);case 126:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l(Zr,$);return[27,[0,J,y0([0,i0],[0,U],0)]]},x);case 127:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l0(0,function(Y){var F=l(Zo,Y);function n0(Q){if(1-o1(Q,41))throw q0(as,1);var f0=l(v9,Q);if(!Q[16]&&K(Q)===85)throw q0(as,1);return[1,[0,f0[1],f0]]}return[0,F,t9(Y,[0,gx(Y)],n0),1,0,0]},$);return[18,[0,J,y0([0,i0],[0,U],0)]]},x);case 0:case 2:var i=ve(k9,0,1,1,x);return[0,i[1],[14,i[2]]];case 130:case 131:t=2;break;case 41:case 42:t=1;break;case 30:case 31:var f=_0(x);return Z0(x),[0,r,[32,[0,e===31?1:0,y0([0,f],[0,yx(x)],0)]]]}else switch(e[0]){case 2:var o=e[1],a=o[3],d=o[2],k=o[1];o[4]&&$t(x,81);var T=_0(x);return Z0(x),[0,k,[29,[0,d,a,y0([0,T],[0,yx(x)],0)]]];case 4:var g=e[3];if(P(g,_o))P(g,C1)?t=1:t=2;else{if(x[28][1])return l0(0,function($){var i0=_0($);ro($,hv0);var U=ue($,l(Hv,$)),J=l(DO,$);if(_O($))var n0=TO($,l(w9,$)),Q=J;else var Y=l(w9,$),F=R1($)[2],n0=Y,Q=p(F,J,function(f0,s0){return p(Gx(f0,420776873,12),f0,s0)});return[13,[0,U,Q,n0,y0([0,i0],0,0)]]},x);t=1}break;case 7:if(!P(e[1],V3))return zx(x,89),[0,r,_v0];break;case 12:var A=e[3],N=e[2],R=e[1],I=0;return l0(0,function($){return VV(I,R,N,A,$)},x);case 13:var M=e[3],L=e[2],z=0;return l0(0,function($){return zV(z,L,M,$)},x)}switch(t){case 0:var V=l(bV,x);return V?[0,r,V[1]]:(g1(wv0,x),[0,r,Tv0]);case 2:return l0(0,function($){return[26,l(MO,$)]},x);default:var Z=l(_9,x);return[0,Z[1],[19,Z[2]]]}}),I0(qV,function(x){var r=_0(x);Z0(x);var e=K(x);if(typeof e!="number")switch(e[0]){case 12:return VV([0,r],e[1],e[2],e[3],x);case 13:return zV([0,r],e[2],e[3],x)}return g1(mv0,x),kv0}),I0(GV,function(x){var r=0;if(typeof x=="number")switch(x){case 29:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:case 123:case 124:r=1;break}else x[0]===11&&(r=1);return r?1:0}),I0(LO,function(x,r){var e=_0(x),t=l0(0,Z0,x)[1],u=y0([0,e],[0,yx(x)],0);return[0,[19,[0,[0,wn(0,[0,t,r])],0,u]]]}),I0(bV,function(x){var r=_0(x),e=K(x);if(typeof e=="number")switch(e){case 29:return Z0(x),[0,[4,y0([0,r],[0,yx(x)],0)]];case 114:return Z0(x),[0,[0,y0([0,r],[0,yx(x)],0)]];case 115:return Z0(x),[0,[1,y0([0,r],[0,yx(x)],0)]];case 116:return Z0(x),[0,[2,y0([0,r],[0,yx(x)],0)]];case 117:return Z0(x),[0,[5,y0([0,r],[0,yx(x)],0)]];case 118:return Z0(x),[0,[6,y0([0,r],[0,yx(x)],0)]];case 119:return Z0(x),[0,[7,y0([0,r],[0,yx(x)],0)]];case 120:return Z0(x),[0,[3,y0([0,r],[0,yx(x)],0)]];case 121:return Z0(x),[0,[9,y0([0,r],[0,yx(x)],0)]];case 122:return Z0(x),[0,[33,y0([0,r],[0,yx(x)],0)]];case 123:return Z0(x),[0,[34,y0([0,r],[0,yx(x)],0)]];case 124:return Z0(x),[0,[35,y0([0,r],[0,yx(x)],0)]];case 128:return p(LO,x,dv0);case 129:return p(LO,x,yv0)}else if(e[0]===11){var t=e[1];Z0(x);var u=yx(x),i=t?-883944824:737456202;return[0,[8,i,y0([0,r],[0,u],0)]]}return 0}),I0(xz,function(x){return l0(0,function(r){var e=_0(r);u0(r,6);for(var t=Wv(0,r),u=0;;){var i=K(t);if(typeof i=="number"){var f=0;if(i!==7&&Nr!==i&&(f=1),!f){var o=Ax(u);return u0(r,7),[28,[0,o,y0([0,e],[0,yx(r)],0)]]}}var a=[0,l0(0,function(k){if(!o1(k,12)){var T=K(k),g=0;if(typeof T=="number"&&(nn===T||jt===T&&Vo(1,k))){var A=o9(0,0,k);g=1}if(!g)var A=0;var N=vs(k),R=pr(1,k);if(N&&typeof R=="number"&&1>=R+Ms>>>0){var I=S2(k),M=o1(k,85);return u0(k,86),[1,[0,I,l(Zr,k),A,M]]}var L=A?1:0;return L&&zx(k,50),[0,l(Zr,k)]}var z=vs(k),V=pr(1,k),Z=0;if(z&&typeof V=="number"&&1>=V+Ms>>>0){var $=S2(k);K(k)===85&&(zx(k,49),Z0(k)),u0(k,86);var i0=[0,$];Z=1}if(!Z)var i0=0;return[2,[0,i0,l(Zr,k)]]},t),u];K(t)!==7&&u0(t,9);var u=a}},x)}),I0(MO,function(x){var r=_0(x),e=K(x),t=0;if(typeof e=="number")switch(e){case 130:var u=1;break;case 131:var u=2;break;default:t=1}else if(e[0]===4&&!P(e[3],C1))var u=0;else t=1;if(t)var u=Nx(pv0);var i=gx(x);Z0(x);var f=yx(x),o=l(a9,x);return[0,i,o,y0([0,r],[0,f],0),u]}),I0(k6,function(x,r){return[0,r[1],[0,0,r,0]]}),I0(rz,function(x){return l0(0,function(r){V1(r,0);var e=p(px[13],0,r);$1(r),1-_1(r)&&zx(r,xe);var t=o1(r,85);return u0(r,86),[0,[0,e],l(Zr,r),t]},x)});var az=function(x){var r=pr(1,x);return typeof r=="number"&&1>=r+Ms>>>0?l(rz,x):p(k6,x,l(Zr,x))};I0(eo,function(x){var r=0;return function(e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number")switch(i){case 5:case 12:case 113:var f=i===12?[0,l0(0,function(A){var N=_0(A);u0(A,12);var R=y0([0,N],0,0);return[0,az(A),R]},x)]:0;return[0,t,Ax(u),f,0]}else if(i[0]===4&&!P(i[3],lv)){var o=0;if(pr(1,x)!==86&&pr(1,x)!==85&&(o=1),!o){var a=t!==0?1:0,d=a||(u!==0?1:0);d&&zx(x,94);var k=l0(0,function(N){var R=_0(N);Z0(N),K(N)===85&&zx(N,93);var I=y0([0,R],0,0);return[0,l(o3,N),I]},x);K(x)!==5&&u0(x,9);var t=[0,k];continue}}var T=[0,az(x),u];K(x)!==5&&u0(x,9);var u=T}}}),I0(d9,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);var t=p(eo,r,0),u=_0(r);u0(r,5);var i=J1([0,e],[0,yx(r)],u,0);return[0,t[1],t[2],t[3],i]},x)}),I0(ez,function(x,r){for(var e=r;;){var t=K(x);if(typeof t=="number"){var u=t-5|0,i=0;if(7>>0?sn===u&&(i=1):5>>0&&(i=1),i){var f=t===12?[0,l0(0,function(d){var k=_0(d);u0(d,12);var T=pr(1,d),g=0;if(typeof T=="number")if(T===85){V1(d,0);var A=p(px[13],0,d);$1(d),u0(d,85),u0(d,86);var R=1,I=[0,A]}else if(T===86){V1(d,0);var N=p(px[13],0,d);$1(d),u0(d,86);var R=0,I=[0,N]}else g=1;else g=1;if(g)var R=0,I=0;var M=l(Zr,d);return[0,I,M,R,y0([0,k],0,0)]},x)]:0;return[0,Ax(e),f,0]}}var o=[0,l0(0,function(d){var k=K(d),T=0;if(typeof k!="number"&&k[0]===2){var g=k[1],A=g[4],N=g[3],R=g[2],I=g[1];A&&$t(d,81),u0(d,[2,[0,I,R,N,A]]);var M=[1,[0,I,[0,R,N,y0(0,[0,yx(d)],0)]]];T=1}if(!T){V1(d,0);var L=p(px[13],0,d);$1(d);var M=[0,L]}var z=o1(d,85);return[0,M,l(o3,d),z]},x),e];K(x)!==5&&u0(x,9);var e=o}}),I0(DO,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);var t=p(ez,r,0),u=_0(r);u0(r,5);var i=J1([0,e],[0,yx(r)],u,0);return[0,t[1],t[2],i]},x)}),I0(tz,function(x){var r=_0(x);u0(x,4);var e=Wv(0,x),t=K(e),u=0;if(typeof t=="number")switch(t){case 5:var a=lv0;break;case 130:var i=pr(1,e),f=0;if(typeof i=="number"&&i===86){var o=[0,p(eo,e,0)];f=1}if(!f)var o=[1,l(Zr,e)];var a=o;break;case 42:u=2;break;case 12:case 113:var a=[0,p(eo,e,0)];break;default:u=1}else if(t[0]===4)if(P(t[3],C1))u=2;else{var d=pr(1,e),k=0;if(typeof d=="number"&&1>=d+Ms>>>0){var T=[0,p(eo,e,0)];k=1}if(!k)var T=[1,l(Zr,e)];var a=T}else u=1;switch(u){case 1:if(l(GV,t)){var g=pr(1,e),A=0;if(typeof g=="number"&&1>=g+Ms>>>0){var N=[0,p(eo,e,0)];A=1}if(!A)var N=[1,l(Zr,e)];var a=N}else var a=[1,l(Zr,e)];break;case 2:var a=l(nz,e);break}if(a[0]===0)var R=a;else{var I=a[1];if(x[15])var M=a;else{var L=K(x),z=0;if(typeof L=="number")if(L===5)var V=pr(1,x)===11?[0,p(eo,x,[0,p(k6,x,I),0])]:[1,I];else if(L===9){u0(x,9);var V=[0,p(eo,x,[0,p(k6,x,I),0])]}else z=1;else z=1;if(z)var V=a;var M=V}var R=M}var Z=_0(x);u0(x,5);var $=yx(x);if(R[0]===0)var i0=R[1],U=J1([0,r],[0,$],Z,0),J=[0,[0,i0[1],i0[2],i0[3],U]];else var J=[1,G0(vz,R[1],r,$)];return J}),I0(nz,function(x){var r=pr(1,x);if(typeof r=="number"&&1>=r+Ms>>>0)return[0,p(eo,x,0)];var e=gx(x),t=p(cz,x,l(Zo,x)),u=l(G0(l9,0,x,e),t),i=l(l(IO,x),u),f=l(p(l(NO,x),0,e),i),o=l(p(l(PO,x),0,e),f);return[1,l(p(AO,pO(0,x),e),o)]}),I0(uz,function(x){var r=gx(x),e=l0(0,tz,x),t=e[2],u=e[1];return t[0]===0?ve(y9,x,r,0,[0,u,t[1]]):t[1]}),I0(iz,function(x){var r=gx(x),e=ue(x,l(Hv,x));return ve(y9,x,r,e,l(d9,x))}),I0(y9,function(x,r,e,t){return l0([0,r],function(u){return u0(u,11),[12,[0,e,t,l(jO,u),0]]},x)}),I0(jO,function(x){return f9(x)?[1,l(m9,x)]:[0,l(Zr,x)]}),I0(m9,function(x){return l0(0,function(r){var e=_0(r),t=o1(r,wl);V1(r,0);var u=S2(r);$1(r);var i=K(r),f=0;if(typeof i=="number"&&h1===i){var o=_0(r);u0(r,h1);var a=Fx(o,_0(r)),d=a,k=[0,l(Zr,r)];f=1}if(!f)var d=0,k=0;return[0,t,[0,u,k],J1([0,e],0,d,0)]},x)}),I0(UO,function(x,r){return l0([0,r],m9,x)});var T9=function(x,r,e){return l0([0,r],function(t){var u=l(d9,t);return u0(t,86),[0,e,u,l(jO,t),0]},x)},lz=function(x,r,e,t,u){var i=En(x,t),f=T9(x,r,ue(x,l(Hv,x))),o=[0,f[1],[12,f[2]]],a=[0,i,[0,o],0,e!==0?1:0,0,1,0,y0([0,u],0,0)];return[0,[0,o[1],a]]},S9=function(x,r,e,t,u,i,f){var o=f[2],a=f[1];return 1-_1(x)&&zx(x,xe),[0,l0([0,r],function(d){var k=o1(d,85),T=IV(d,86)?l(Zr,d):[0,a,av0];return[0,o,[0,T],k,t!==0?1:0,u!==0?1:0,0,e,y0([0,i],0,0)]},x)]},h6=function(x,r){var e=K(r);if(typeof e=="number"&&10>e)switch(e){case 1:if(!x)return 0;break;case 3:if(x)return 0;break;case 8:case 9:return Z0(r)}return xo(r,9)},_6=function(x,r){return r?ux(x,[0,r[1][1],D2]):0},w6=function(x,r){return r?ux(x,[0,r[1],99]):0},US0=function(x,r,e,t,u,i,f,o,a){for(var d=e,k=t,T=u,g=i,A=f,N=o;;){var R=K(x);if(typeof R=="number")switch(R){case 6:w6(x,A);var I=pr(1,x);if(typeof I=="number"&&I===6)return _6(x,T),[4,l0([0,a],function(L0){var C0=Fx(N,_0(L0));u0(L0,6),u0(L0,6);var A0=S2(L0);u0(L0,7),u0(L0,7);var U0=K(L0),Q0=0;if(typeof U0=="number"){var H=0;if((U0===4||U0===98)&&(H=1),H){var b=T9(L0,a,ue(L0,l(Hv,L0))),B=0,a0=[0,b[1],[12,b[2]]],m0=1,P0=0;Q0=1}}if(!Q0){var D=o1(L0,85),N0=yx(L0);u0(L0,86);var B=N0,a0=l(Zr,L0),m0=0,P0=D}return[0,A0,a0,P0,g!==0?1:0,m0,y0([0,C0],[0,B],0)]},x)];var M=Fx(N,_0(x));u0(x,6);var L=pr(1,x);return typeof L!="number"&&L[0]===4&&!P(L[3],Po)&&g===0?[5,l0([0,a],function(L0){var C0=l(Zo,L0),A0=C0[1];Z0(L0);var U0=l(Zr,L0);u0(L0,7);var Q0=K(L0),H=0,b=[0,C0,[0,A0],0,0,0];if(typeof Q0=="number"){var B=Q0+VP|0,a0=0;if(1>>0)if(B===-18){Z0(L0);var m0=2}else a0=1;else var m0=B?(Z0(L0),u0(L0,85),1):(Z0(L0),u0(L0,85),0);if(!a0){var P0=m0;H=1}}if(!H)var P0=3;u0(L0,86);var D=l(Zr,L0);return[0,[0,A0,b],D,U0,T,P0,y0([0,M],[0,yx(L0)],0)]},x)]:[2,l0([0,a],function(L0){if(pr(1,L0)===86){var C0=S2(L0);u0(L0,86);var A0=[0,C0]}else var A0=0;var U0=l(Zr,L0);u0(L0,7);var Q0=yx(L0);u0(L0,86);var H=l(Zr,L0);return[0,A0,U0,H,g!==0?1:0,T,y0([0,M],[0,Q0],0)]},x)];case 42:if(d){if(T!==0)throw q0([0,wr,uv0],1);var z=[0,gx(x)],V=Fx(N,_0(x));Z0(x);var d=0,k=0,g=z,N=V;continue}break;case 126:if(T===0){var Z=0;if((Vo(1,x)||pr(1,x)===6)&&(Z=1),Z){var d=0,k=0,T=o9(iv0,0,x);continue}}break;case 103:case 104:if(T===0){var d=0,k=0,T=o9(0,0,x);continue}break;case 4:case 98:return w6(x,A),_6(x,T),[3,l0([0,a],function(L0){var C0=gx(L0),A0=T9(L0,C0,ue(L0,l(Hv,L0)));return[0,A0,g!==0?1:0,y0([0,N],0,0)]},x)]}else if(R[0]===4&&!P(R[3],XN)&&k){if(T!==0)throw q0([0,wr,fv0],1);var $=[0,gx(x)],i0=Fx(N,_0(x));Z0(x);var d=0,k=0,A=$,N=i0;continue}if(g){var U=g[1];if(A)return Nx(cv0);if(typeof R=="number"&&1>=R+Ms>>>0)return S9(x,a,T,0,A,0,[0,U,[3,wn(y0([0,N],0,0),[0,U,sv0])]])}else if(A){var J=A[1];if(typeof R=="number"&&1>=R+Ms>>>0)return S9(x,a,T,g,0,0,[0,J,[3,wn(y0([0,N],0,0),[0,J,ov0])]])}var Y=function(L0){V1(L0,0);var C0=p(px[20],0,L0);return $1(L0),C0},F=_0(x),n0=Y(x),Q=n0[1],f0=n0[2];if(f0[0]===3){var s0=f0[1][2][1],v0=0;if(P(s0,Cv)&&P(s0,ja)&&(v0=1),!v0){var o0=K(x);if(typeof o0=="number"){var c0=o0-5|0;if(92>>0){if(94>=c0+1>>>0)return w6(x,A),_6(x,T),lz(x,a,g,f0,N)}else if(1>=c0+cj>>>0)return S9(x,a,T,g,A,N,[0,Q,f0])}En(x,f0);var T0=Y(x),E0=Ar(s0,Cv),M0=Fx(N,F);return w6(x,A),_6(x,T),[0,l0([0,a],function(L0){var C0=T0[1],A0=En(L0,T0[2]),U0=T9(L0,a,0),Q0=U0[2][2];if(E0){var H=Q0[2],b=0;if(H[1])ux(L0,[0,C0,28]),b=1;else{var B=0;H[2]||H[3]?B=1:b=1,B&&ux(L0,[0,C0,27])}}else{var a0=Q0[2],m0=0;if(a0[1])ux(L0,[0,C0,71]);else{var P0=a0[2],D=0;if(a0[3])ux(L0,[0,C0,70]),D=1;else{var N0=0;P0&&!P0[2]?D=1:N0=1,N0&&(ux(L0,[0,C0,70]),m0=1)}}}var X0=y0([0,M0],0,0),D0=0,ox=0,b0=0,kx=g!==0?1:0,V0=0,h=E0?[1,U0]:[2,U0];return[0,A0,h,V0,kx,b0,ox,D0,X0]},x)]}}var Y0=n0[2],rx=K(x);if(typeof rx=="number"){var g0=0;if(rx!==4&&rx!==98&&(g0=1),!g0)return w6(x,A),_6(x,T),lz(x,a,g,Y0,N)}var H0=g!==0?1:0,t0=0;if(Y0[0]===3){var ex=Y0[1],xx=ex[2][1],ax=0,dx=ex[1];if(r){var mx=0;(Ar(Ev,xx)||H0&&Ar(Ao,xx))&&(mx=1),mx&&(ux(x,[0,dx,[15,xx,H0,0,0]]),t0=1,ax=1)}}return S9(x,a,T,g,A,N,[0,Q,Y0])}};I0(k9,function(x,r,e,t){var u=r&&(K(t)===2?1:0),i=r&&1-u;return l0(0,function(f){var o=_0(f),a=u?2:0;u0(f,a);for(var d=Wv(0,f),k=vv0;;){var T=k[3],g=k[2],A=k[1];if(x&&e)throw q0([0,wr,tv0],1);if(i&&!e)throw q0([0,wr,nv0],1);var N=gx(d),R=K(d);if(typeof R=="number"){var I=0;if(13<=R){if(Nr===R){var M=[0,Ax(A),g,T];I=1}}else if(R)switch(R-1|0){case 0:if(!u){var M=[0,Ax(A),g,T];I=1}break;case 2:if(u){var M=[0,Ax(A),g,T];I=1}break;case 11:if(!e){Z0(d);var L=K(d);if(typeof L=="number"&&10>L)switch(L){case 1:case 3:case 8:case 9:ux(d,[0,N,36]),h6(u,d);continue}var z=kO(d);l(yO(d),z),ux(d,[0,N,Zf]),Z0(d),h6(u,d);continue}var V=_0(d);Z0(d);var Z=K(d),$=0;if(typeof Z=="number"&&10>Z)switch(Z){case 1:case 3:case 8:case 9:h6(u,d);var i0=K(d),U=0;if(typeof i0=="number"){var J=i0-1|0;if(2>=J>>>0)switch(J){case 0:if(i){var M=[0,Ax(A),1,V];I=1,$=1,U=1}break;case 1:break;default:ux(d,[0,N,35]);var M=[0,Ax(A),g,T];I=1,$=1,U=1}}if(!U){ux(d,[0,N,97]);continue}break}if(!$){var Y=[1,l0([0,N],function(T0){return function(E0){var M0=y0([0,T0],0,0);return[0,l(Zr,E0),M0]}}(V),d)];h6(u,d);var k=[0,[0,Y,A],g,T];continue}break}if(I){var F=M[3],n0=M[2],Q=M[1],f0=Fx(F,_0(f)),s0=u?3:1;return u0(f,s0),[0,u,n0,Q,J1([0,o],[0,yx(f)],f0,0)]}}var v0=US0(d,x,x,x,0,0,0,0,N);h6(u,d);var k=[0,[0,v0,A],g,T]}},t)}),I0(BO,function(x){if(o1(x,41))for(var r=0;;){var e=[0,l(_9,x),r],t=K(x);if(typeof t=="number"&&t===9){u0(x,9);var r=e;continue}var u=DV(x,Ax(e));break}else var u=0;return[0,u,ve(k9,0,0,0,x)]}),I0(Zo,function(x){var r=S2(x),e=r[2],t=e[1],u=r[1],i=e[2];return mO(t)&&ux(x,[0,u,It]),[0,u,[0,t,i]]}),I0(fz,function(x){return l0(0,function(r){var e=l(Zo,r),t=K(r),u=0;if(typeof t=="number")if(t===41)var i=1,f=i,o=[1,l0(0,function(a){return Z0(a),l(Zr,a)},r)];else if(t===86)var f=0,o=[1,l(o3,r)];else u=1;else u=1;if(u)var f=0,o=[0,bs(r)];return[0,e,o,f]},x)});var pz=function(x,r){var e=gV(x,r);if(e)var t=e;else{var u=0;if(typeof r=="number"&&1>=r+VP>>>0){var i=1;u=1}if(!u)var i=0;if(!i){var f=0;if(typeof r=="number")switch(r){case 15:case 29:case 30:case 31:case 41:case 42:case 46:case 53:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:case 123:case 124:case 125:case 126:f=1;break}else switch(r[0]){case 4:if(mO(r[3]))return 1;break;case 11:f=1;break}return f?1:0}var t=i}return t};I0(Hv,function(x){if(K(x)!==98)return 0;1-_1(x)&&zx(x,xe);var r=l0(0,function(t){var u=_0(t);u0(t,98);for(var i=0,f=0;;){if(pz(t,K(t)))var o=i9(0,function(Z){return function($){var i0=o9(0,ev0,$),U=l(fz,$),J=U[2],Y=J[3],F=J[2],n0=J[1],Q=U[1],f0=K($),s0=0;if(typeof f0=="number"&&f0===82){Z0($);var v0=1,o0=[0,l(Zr,$)];s0=1}if(!s0){Z&&ux($,[0,Q,57]);var v0=Z,o0=0}return[0,[0,n0,F,Y,i0,o0],v0]}}(i),t),a=o[2],d=[0,o[1],f];else var a=i,d=f;var k=K(t),T=0;if(typeof k=="number"){var g=k+OB|0;if(14>>0){if(g===-90){Z0(t);var i=a,f=d;continue}}else if(12>>0){var A=Ax(d);T=1}}if(!T){var N=0;if(typeof k=="number")switch(k){case 4:case 82:N=2;break}else if(k[0]===4){var R=k[3],I=0;if(by(R))I=1;else{var M=0;if(P(R,Pv)&&P(R,Y2)){var L=0;M=1}if(!M)var L=1;if(L)I=1;else if(P(R,pl))(!P(R,Tv)||!P(R,fi))&&(N=2);else if(t[28][2]){var z=1;N=1}}if(I){var z=1;N=1}}switch(N){case 0:var z=0;break;case 2:var z=1;break}if(!z){if(pz(t,k)){xo(t,9);var i=a,f=d;continue}u0(t,9);var i=a,f=d;continue}xo(t,99);var A=Ax(d)}var V=_0(t);return e9(t,99),[0,A,J1([0,u],[0,yx(t)],V,0)]}},x),e=r[1];return r[2][1]||ux(x,[0,e,56]),[0,r]}),I0(h9,function(x){return K(x)===98?[0,l0(0,function(r){var e=_0(r);u0(r,98);for(var t=Wv(0,r),u=0;;){var i=K(t);if(typeof i=="number"){var f=0;if(i!==99&&Nr!==i&&(f=1),!f){var o=Ax(u),a=_0(t);return u0(t,99),[0,o,J1([0,e],[0,yx(t)],a,0)]}}var d=[0,l(Zr,t),u];K(t)!==99&&u0(t,9);var u=d}},x)]:0}),I0(_9,function(x){return p(YO,x,l(Zo,x))}),I0(YO,function(x,r){function e(t){for(var u=[0,r[1],[0,r]];;){var i=u[2],f=u[1];if(K(t)===10&&x9(1,t)){var o=l0([0,f],function(g){return function(A){return u0(A,10),[0,g,l(Zo,A)]}}(i),t),a=o[1],u=[0,a,[1,[0,a,o[2]]]];continue}if(K(t)===98)var d=R1(t)[2],k=p(d,i,function(T,g){return p(Gx(T,-860373976,61),T,g)});else var k=i;return[0,k,l(h9,t),0]}}return l0([0,r[1]],e,x)}),I0(cz,function(x,r){var e=p(YO,x,r);return[0,e[1],[19,e[2]]]}),I0(sz,function(x){var r=K(x);return typeof r=="number"&&r===86?l(KV,x):[0,bs(x)]}),I0(oz,function(x){var r=K(x);return typeof r=="number"&&r===86?[1,l(o3,x)]:[0,bs(x)]}),I0(w9,function(x){var r=K(x),e=0;if(typeof r=="number")switch(r){case 86:var t=gx(x);1-_1(x)&&zx(x,xe),zx(x,38),Z0(x);var u=l0(0,Zr,x);return[1,u[1],[0,t,u[2],0,0]];case 130:case 131:e=1;break}else r[0]===4&&!P(r[3],C1)&&(e=1);if(!e)return[0,bs(x)];1-_1(x)&&zx(x,xe);var i=l0([0,gx(x)],MO,x);return[1,i[1],i[2]]}),I0(vz,function(x,r,e){var t=x[2],u=x[1];function i(a0){return I2(a0,y0([0,r],[0,e],0))}switch(t[0]){case 0:var B=[0,i(t[1])];break;case 1:var B=[1,i(t[1])];break;case 2:var B=[2,i(t[1])];break;case 3:var B=[3,i(t[1])];break;case 4:var B=[4,i(t[1])];break;case 5:var B=[5,i(t[1])];break;case 6:var B=[6,i(t[1])];break;case 7:var B=[7,i(t[1])];break;case 8:var f=i(t[2]),B=[8,t[1],f];break;case 9:var B=[9,i(t[1])];break;case 10:var B=[10,i(t[1])];break;case 11:var o=t[1],a=i(o[2]),B=[11,[0,o[1],a]];break;case 12:var d=t[1],k=i(d[4]),B=[12,[0,d[1],d[2],d[3],k]];break;case 13:var T=t[1],g=i(T[4]),B=[13,[0,T[1],T[2],T[3],g]];break;case 14:var A=t[1],N=A[4],R=GI(N,y0([0,r],[0,e],0)),B=[14,[0,A[1],A[2],A[3],R]];break;case 15:var I=t[1],M=i(I[3]),B=[15,[0,I[1],I[2],M]];break;case 16:var L=t[1],z=i(L[2]),B=[16,[0,L[1],z]];break;case 17:var V=t[1],Z=i(V[5]),B=[17,[0,V[1],V[2],V[3],V[4],Z]];break;case 18:var $=t[1],i0=i($[2]),B=[18,[0,$[1],i0]];break;case 19:var U=t[1],J=i(U[3]),B=[19,[0,U[1],U[2],J]];break;case 20:var Y=t[1],F=i(Y[3]),B=[20,[0,Y[1],Y[2],F]];break;case 21:var n0=t[1],Q=n0[1],f0=n0[2],s0=i(Q[3]),B=[21,[0,[0,Q[1],Q[2],s0],f0]];break;case 22:var v0=t[1],o0=i(v0[2]),B=[22,[0,v0[1],o0]];break;case 23:var c0=t[1],T0=i(c0[2]),B=[23,[0,c0[1],T0]];break;case 24:var E0=t[1],M0=i(E0[3]),B=[24,[0,E0[1],E0[2],M0]];break;case 25:var Y0=t[1],rx=i(Y0[2]),B=[25,[0,Y0[1],rx]];break;case 26:var g0=t[1],H0=g0[4],t0=i(g0[3]),B=[26,[0,g0[1],g0[2],t0,H0]];break;case 27:var ex=t[1],xx=i(ex[2]),B=[27,[0,ex[1],xx]];break;case 28:var ax=t[1],dx=i(ax[2]),B=[28,[0,ax[1],dx]];break;case 29:var mx=t[1],L0=i(mx[3]),B=[29,[0,mx[1],mx[2],L0]];break;case 30:var C0=t[1],A0=i(C0[3]),B=[30,[0,C0[1],C0[2],A0]];break;case 31:var U0=t[1],Q0=i(U0[3]),B=[31,[0,U0[1],U0[2],Q0]];break;case 32:var H=t[1],b=i(H[2]),B=[32,[0,H[1],b]];break;case 33:var B=[33,i(t[1])];break;case 34:var B=[34,i(t[1])];break;default:var B=[35,i(t[1])]}return[0,u,B]});var dz=function(x,r){if(K(x)!==4)return[0,0,y0([0,r],[0,yx(x)],0)];var e=Fx(r,_0(x));u0(x,4),V1(x,0);var t=l(px[9],x);return $1(x),u0(x,5),[0,[0,t],y0([0,e],[0,yx(x)],0)]},BS0=function(x){var r=_0(x);return u0(x,66),dz(x,r)},YS0=0,yz=function(x){var r=Wv(0,x),e=K(r);return typeof e=="number"&&e===66?[0,l0(YS0,BS0,r)]:0},XS0=function(x){var r=K(x);if(typeof r=="number"&&r===86){1-_1(x)&&zx(x,xe);var e=bs(x),t=gx(x);u0(x,86);var u=K(x);if(typeof u=="number"&&u===66){var i=Wv(0,x);return[0,[0,e],[0,l0([0,t],function(a){var d=_0(a);return u0(a,66),dz(a,d)},i)]]}if(f9(x))return[0,[2,p(UO,x,t)],0];var f=[1,l0([0,t],Zr,x)],o=K(x)===66?c3(x,f):f;return[0,o,yz(x)]}return[0,[0,bs(x)],0]},ye=function(x,r){var e=Gs(1,r);V1(e,1);var t=l(x,e);return $1(e),t},to=function(x){return ye(Zr,x)},ls=function(x){return ye(Zo,x)},Ze=function(x){return ye(Hv,x)},mz=function(x){return ye(h9,x)},qv=function(x){return ye(o3,x)},XO=function(x){return ye(oz,x)},JO=function(x){return ye(sz,x)},VO=function(x){return ye(XS0,x)},kz=function(x){return ye(_9,x)},zO=function(x){return ye(w9,x)},JS0=JV(px),Wo=function(x,r){var e=r[2],t=r[1],u=x[1];switch(e[0]){case 0:return r2(VS0,x,e[1][1]);case 1:return r2(zS0,x,e[1][1]);case 2:var i=e[1][1],f=i[2][1],o=x[2],a=x[1],d=i[1];p(T2[3],f,o)&&ux(a,[0,d,82]);var k=i[2][1],T=i[1];return $v(k)&&yt(a,[0,T,83]),i3(k)&&yt(a,[0,T,85]),[0,a,p(T2[4],f,o)];default:return ux(u,[0,t,24]),x}},VS0=function(x){return function(r){return r[0]===0?Wo(x,r[1][2][2]):Wo(x,r[1][2][1])}},zS0=function(x){return function(r){switch(r[0]){case 0:return Wo(x,r[1][2][1]);case 1:return Wo(x,r[1][2][1]);default:return x}}},hz=function(x,r){var e=r[2],t=e[3],u=e[2],i=[0,x,T2[1]],f=r2(function(o,a){return Wo(o,a[2][1])},i,u);return t&&Wo(f,t[1][2][1]),0},_z=function(x,r,e,t){var u=x[5],i=t[0]===0?Fv(t[1]):0,f=Gs(u?0:r,x),o=r||u||1-i;if(!o)return o;if(e){var a=e[1],d=a[2][1],k=a[1];$v(d)&&yt(f,[0,k,75]),i3(d)&&yt(f,[0,k,85])}if(t[0]===0)return hz(f,t[1]);var T=t[1][2],g=T[2],A=T[1],N=[0,Za,[0,[0,_n(function(I){var M=I[2],L=M[1],z=M[4],V=M[3],Z=M[2],$=L[0]===0?[3,L[1]]:[0,[0,Za,L[1][2]]];return[0,[0,Za,[0,$,Z,V,z]]]},A),[0,Za],0]]],R=Wo([0,f,T2[1]],N);return g&&Wo(R,g[1][2][1]),0},v3=function(x,r,e,t){return _z(x,r,e,[0,t])},wz=function(x,r){if(r!==12)return 0;var e=_0(x),t=l0(0,function(f){return u0(f,12),p(px[18],f,83)},x),u=t[2],i=t[1];return[0,[0,i,u,y0([0,e],0,0)]]},KO=function x(r,e){return x.fun(r,e)},KS0=function(x){K(x)===21&&zx(x,94);var r=p(px[18],x,83),e=K(x)===82?(u0(x,82),[0,l(px[10],x)]):0;return[0,r,e]},ZS0=0;I0(KO,function(x,r){var e=K(x);if(typeof e=="number"){var t=e-5|0,u=0;if(7>>0?sn===t&&(u=1):5>>0&&(u=1),u){var i=wz(x,e),f=uy(function(a){return[0,a[1],[0,a[2],a[3]]]},i);return K(x)!==5&&zx(x,66),[0,Ax(r),f]}}var o=l0(ZS0,KS0,x);return K(x)!==5&&u0(x,9),p(KO,x,[0,o,r])});var a3=function(x,r){function e(u){var i=kV(1,vO(r,aO(x,u))),f=_0(i);u0(i,4);var o=0;if(_1(i)&&K(i)===21){var a=_0(i),d=l0(0,function(z){return u0(z,21),K(z)===86?[0,qv(z)]:(zx(z,90),0)},i),k=d[2],T=d[1];if(k){var g=k[1];K(i)===9&&Z0(i);var A=[0,[0,T,[0,g,y0([0,a],0,0)]]]}else var A=0}else o=1;if(o)var A=0;var N=p(KO,i,0),R=N[2],I=N[1],M=_0(i);return u0(i,5),[0,A,I,R,J1([0,f],[0,yx(i)],M,0)]}var t=0;return function(u){return l0(t,e,u)}},Tz=function(x,r,e,t,u){var i=EV(x,r,e,u);return p(px[16],t,i)},T6=function(x,r,e,t,u){var i=Tz(x,r,e,t,u);return[0,[0,i[1]],i[2]]},l3=function(x){if(c2!==K(x))return da0;var r=_0(x);return Z0(x),[0,1,r]},E9=function(x){if(K(x)===64&&!v6(1,x)){var r=_0(x);return Z0(x),[0,1,r]}return pa0},WS0=function(x){var r=E9(x),e=r[1],t=r[2],u=l0(0,function(I){var M=_0(I);u0(I,15);var L=l3(I),z=L[1],V=Xl([0,t,[0,M,[0,L[2],0]]]),Z=I[7],$=K(I),i0=0;if(Z&&typeof $=="number"){if($===4){var F=0,n0=0;i0=1}else if($===98){var U=ue(I,Ze(I)),J=K(I)===4?0:[0,Sn(I,p(px[13],oa0,I))],F=J,n0=U;i0=1}}if(!i0)var Y=vs(I)?Sn(I,p(px[13],va0,I)):(RV(I,aa0),[0,gx(I),la0]),F=[0,Y],n0=ue(I,Ze(I));var Q=l(a3(e,z),I),f0=K(I)===86?Q:d6(I,Q),s0=VO(I),v0=s0[2],o0=s0[1];if(v0)var c0=MV(I,v0),T0=o0;else var c0=v0,T0=c3(I,o0);return[0,z,n0,F,f0,T0,c0,V]},x),i=u[2],f=i[4],o=i[3],a=i[1],d=i[7],k=i[6],T=i[5],g=i[2],A=u[1],N=T6(x,e,a,0,Fv(f)),R=N[1];return v3(x,N[2],o,f),[26,[0,o,f,R,e,a,k,T,g,y0([0,d],0,0),A]]},$S0=0,S6=function(x){return l0($S0,WS0,x)},ZO=function(x,r){var e=_0(r);u0(r,x);var t=r[28][2];if(t)var u=x===27?1:0,i=u&&(K(r)===48?1:0);else var i=t;i&&zx(r,23);for(var f=0,o=0;;){var a=l0(0,function(N){var R=p(px[18],N,86);if(o1(N,82))var I=0,M=[0,l(px[10],N)];else{var L=R[1];if(R[2][0]===2)var I=0,M=0;else var I=[0,[0,L,63]],M=0}return[0,[0,R,M],I]},r),d=a[2],k=d[2],T=[0,[0,a[1],d[1]],f],g=k?[0,k[1],o]:o;if(o1(r,9)){var f=T,o=g;continue}var A=Ax(g);return[0,Ax(T),e,A]}},QS0=24,Sz=function(x){return ZO(QS0,x)},Ez=function(x){var r=ZO(27,lO(1,x)),e=r[1],t=r[3],u=r[2];return[0,e,u,Ax(r2(function(i,f){return f[2][2]?i:[0,[0,f[1],62],i]},t,e))]},gz=function(x){return ZO(28,lO(1,x))},Az=function(x){function r(t){return[19,p(JS0[1],x,t)]}var e=0;return function(t){return l0(e,r,t)}},WO=function x(r,e){return x.fun(r,e)},FS0=function(x){var r=_0(x),e=K(x),t=pr(1,x),u=0;if(typeof e!="number"&&e[0]===2){var i=e[1],f=i[4],o=i[3],a=i[2],d=i[1],k=0;if(typeof t=="number")switch(t){case 85:case 86:k=2;break;default:k=1}else t[0]===4?P(t[3],vn)||(k=2):k=1;switch(k){case 0:break;case 1:break;default:f&&$t(x,81),u0(x,[2,[0,d,a,o,f]]);var T=[1,[0,d,[0,a,o,y0([0,r],[0,yx(x)],0)]]],g=0;if(typeof t=="number"&&!(1>>0)){var A=t===85?1:0;zx(x,[16,A,a]),A&&Z0(x);var N=gx(x),R=0,I=[0,N,[2,[0,[0,N,ca0],XO(x),A]]],M=T;u=1}else g=1;if(g){Z0(x);var R=0,I=p(px[18],x,83),M=T;u=1}}}if(!u){var L=0;if(typeof t!="number"&&t[0]===4&&!P(t[3],vn)){var z=[0,S2(x)];ro(x,sa0);var R=0,I=p(px[18],x,83),M=z;L=1}if(!L)var V=G0(px[14],x,0,83),Z=V[2],R=1,I=[0,V[1],[2,Z]],M=[0,Z[1]]}var $=K(x)===82?(u0(x,82),[0,l(px[10],x)]):0;return[0,M,I,$,R]},HS0=0;I0(WO,function(x,r){var e=K(x);if(typeof e=="number"){var t=e-5|0,u=0;if(7>>0?sn===t&&(u=1):5>>0&&(u=1),u){var i=wz(x,e),f=uy(function(a){return[0,a[1],[0,a[2],a[3]]]},i);return K(x)!==5&&zx(x,66),[0,Ax(r),f]}}var o=l0(HS0,FS0,x);return K(x)!==5&&u0(x,9),p(WO,x,[0,o,r])});var qS0=function(x){var r=kV(1,x),e=_0(r);u0(r,4);var t=p(WO,r,0),u=t[2],i=t[1],f=_0(r);return u0(r,5),[0,i,u,J1([0,e],[0,yx(r)],f,0)]},GS0=0,bS0=function(x){var r=l0(0,function(T){var g=_0(T);ro(T,ia0);var A=Sn(T,p(px[13],fa0,T)),N=ue(T,Ze(T)),R=l0(GS0,qS0,T);if(_O(T))var M=R;else var I=R1(T)[2],M=p(I,R,function(L,z){return p(Gx(L,842685896,11),L,z)});return[0,N,A,M,TO(T,zO(T)),g]},x),e=r[2],t=e[3],u=e[2],i=e[5],f=e[4],o=e[1],a=r[1],d=Tz(x,0,0,0,0),k=d[1];return _z(x,d[2],[0,u],[1,t]),[3,[0,u,o,t,f,k,y0([0,i],0,0),a]]},xE0=0,$O=function(x){return l0(xE0,bS0,x)},a2=function(x,r){if(r[0]===0)return r[1];var e=r[2][1],t=r[1];return C2(function(u){return ux(x,u)},e),t},QO=function(x,r,e){var t=x?x[1]:41;if(e[0]===0)var u=e[1];else{var i=e[2][2],f=e[1];C2(function(T){return ux(r,T)},i);var u=f}1-l(px[23],u)&&ux(r,[0,u[1],t]);var o=u[2],a=0;if(o[0]===9){var d=u[1];$v(o[1][2][1])&&(yt(r,[0,d,76]),a=1)}return p(px[19],r,u)},FO=function(x,r){var e=us(x[2],r[2]);return[0,us(x[1],r[1]),e]},Pz=function(x){var r=Ax(x[2]);return[0,Ax(x[1]),r]},Cz=function(x,r){var e=x[0]===0?x[1]:x[1]-1|0,t=(r[0]===0,r[1]);return t<=e?1:0},p3=function x(r){return x.fun(r)},Qt=function x(r){return x.fun(r)},Nz=function x(r){return x.fun(r)},HO=function x(r){return x.fun(r)},Rz=function x(r){return x.fun(r)},qO=function x(r){return x.fun(r)},Iz=function x(r){return x.fun(r)},Oz=function x(r){return x.fun(r)},E6=function x(r){return x.fun(r)},GO=function x(r){return x.fun(r)},bO=function x(r){return x.fun(r)},xL=function x(r){return x.fun(r)},Lz=function x(r){return x.fun(r)},rL=function x(r){return x.fun(r)},g9=function x(r){return x.fun(r)},eL=function x(r){return x.fun(r)},Mz=function x(r){return x.fun(r)},Gv=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},tL=function x(r,e,t,u){return x.fun(r,e,t,u)},nL=function x(r){return x.fun(r)},A9=function x(r){return x.fun(r)},uL=function x(r){return x.fun(r)},iL=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},Dz=function x(r,e,t,u){return x.fun(r,e,t,u)},fL=function x(r){return x.fun(r)},P9=function x(r,e,t){return x.fun(r,e,t)},jz=function x(r){return x.fun(r)},C9=function x(r,e,t){return x.fun(r,e,t)},cL=function x(r){return x.fun(r)},Uz=function x(r){return x.fun(r)},sL=function x(r,e){return x.fun(r,e)},oL=function x(r,e,t,u){return x.fun(r,e,t,u)},Bz=function x(r){return x.fun(r)},vL=function x(r,e,t){return x.fun(r,e,t)},Yz=function x(r){return x.fun(r)},Xz=function x(r){return x.fun(r)},aL=function x(r){return x.fun(r)},N9=function x(r,e,t){return x.fun(r,e,t)},rE0=function(x){var r=x[2];switch(r[0]){case 22:var e=r[1],t=e[1][2][1];if(P(t,j2)){if(!P(t,av)&&!P(e[2][2][1],US))return 0}else if(!P(e[2][2][1],_l))return 0;break;case 0:case 9:case 21:case 24:break;default:return 0}return 1},lL=function(x){var r=gx(x),e=l(qO,x),t=l(Rz,x);if(!t)return e;var u=t[1];return[0,l0([0,r],function(i){var f=QO(0,i,e);return[3,[0,u,f,l(Qt,i),0]]},x)]},eE0=function(x,r){if(typeof r=="number"&&r===85)return 0;throw q0(as,1)},Jz=function(x){var r=Gy(eE0,x),e=lL(r),t=K(r);if(typeof t=="number"){if(t===11)throw q0(as,1);if(t===86){var u=TV(r),i=0;if(u){var f=u[1];if(typeof f=="number"&&f===5){var o=1;i=1}}if(!i)var o=0;if(o)throw q0(as,1)}}if(!vs(r))return e;if(e[0]===0){var a=e[1][2];if(a[0]===9&&!P(a[1][2][1],Co)&&!Z2(r))throw q0(as,1)}return e};I0(p3,function(x){var r=vs(x);if(r){var e=K(x),t=0;if(typeof e=="number"){if(e===58){if(x[18]){var u=0;t=1}}else if(e===65&&x[19]){var u=0;t=1}}if(!t)var u=1;var i=u}else var i=r;var f=K(x),o=0;if(typeof f=="number"){var a=0;if(22<=f)if(f===58){if(x[18])return[0,l(Nz,x)];a=1}else f!==98&&(a=1);else f!==4&&21>f&&(a=1);a||(o=1)}if(!o&&!i)return lL(x);var d=0;if(f===64&&_1(x)&&pr(1,x)===98){var k=Jz,T=aL;d=1}if(!d)var k=aL,T=Jz;var g=wO(x,T);if(g)return g[1];var A=wO(x,k);return A?A[1]:lL(x)}),I0(Qt,function(x){return a2(x,l(p3,x))}),I0(Nz,function(x){return l0(0,function(r){r[10]&&zx(r,dv);var e=_0(r),t=gx(r);u0(r,58);var u=gx(r);if(f3(r))var i=0,f=0;else{var o=o1(r,c2),a=K(r),d=0;if(typeof a=="number"){var k=0;if(a===86)k=1;else if(10>a)switch(a){case 0:case 2:case 3:case 4:case 6:break;default:k=1}if(k){var T=0;d=1}}if(!d)var T=1;var g=0;if(!o&&!T){var A=0;g=1}if(!g)var A=[0,l(Qt,r)];var i=o,f=A}var N=f?0:yx(r),R=Fr(t,u);return[36,[0,f,y0([0,e],[0,N],0),i,R]]},x)}),I0(HO,function(x){var r=x[2];switch(r[0]){case 22:var e=r[1],t=e[1][2][1];if(P(t,j2)){if(!P(t,av)&&!P(e[2][2][1],US))return 0}else if(!P(e[2][2][1],_l))return 0;break;case 9:case 21:break;default:return 0}return 1}),I0(Rz,function(x){var r=K(x),e=0;if(typeof r=="number"){var t=r+uj|0;if(15>=t>>>0){switch(t){case 0:var u=R30;break;case 1:var u=I30;break;case 2:var u=O30;break;case 3:var u=L30;break;case 4:var u=M30;break;case 5:var u=D30;break;case 6:var u=j30;break;case 7:var u=U30;break;case 8:var u=B30;break;case 9:var u=Y30;break;case 10:var u=X30;break;case 11:var u=J30;break;case 12:var u=V30;break;case 13:var u=z30;break;case 14:var u=K30;break;default:var u=Z30}var i=u;e=1}}if(!e)var i=0;return i!==0&&Z0(x),i}),I0(qO,function(x){var r=gx(x),e=l(Oz,x);if(K(x)!==85)return e;Z0(x);var t=l(Qt,s6(0,x));u0(x,86);var u=l0([0,r],Qt,x),i=u[2],f=u[1];return[0,[0,f,[7,[0,a2(x,e),t,i,0]]]]}),I0(Iz,function(x){return a2(x,l(qO,x))});var pL=function(x,r,e,t,u){var i=a2(x,r);return[0,[0,u,[20,[0,t,i,a2(x,e),0]]]]},dL=function(x,r,e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number"&&i===88){Z0(x);var f=l0(0,E6,x),o=f[2],a=Fr(u,f[1]),d=yL(0,x,pL(x,t,o,1,a),a),t=d[2],u=d[1];continue}return[0,u,t]}},Vz=function(x,r,e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number"&&i===87){Z0(x);var f=l0(0,E6,x),o=dL(x,f[2],f[1]),a=o[2],d=Fr(u,o[1]),k=yL(0,x,pL(x,t,a,0,d),d),t=k[2],u=k[1];continue}return[0,u,t]}},yL=function(x,r,e,t){for(var u=x,i=e,f=t;;){var o=K(r);if(typeof o=="number"&&o===84){1-u&&zx(r,N30),u0(r,84);var a=l0(0,E6,r),d=a[2],k=a[1],T=K(r),g=0;if(typeof T=="number"&&1>=T-87>>>0){zx(r,[20,tO(T)]);var A=dL(r,d,k),N=Vz(r,A[2],A[1]),R=N[2],I=N[1];g=1}if(!g)var R=d,I=k;var M=Fr(f,I),u=1,i=pL(r,i,R,2,M),f=M;continue}return[0,f,i]}};I0(Oz,function(x){var r=l0(0,E6,x),e=r[2],t=r[1],u=K(x),i=0;if(typeof u=="number"&&u===84){var o=yL(1,x,e,t);i=1}if(!i)var f=dL(x,e,t),o=Vz(x,f[2],f[1]);return o[2]});var mL=function(x,r,e,t){return[0,t,[4,[0,e,x,r,0]]]};I0(E6,function(x){var r=0;x:for(;;){var e=l0(0,function(xx){var ax=l(GO,xx)!==0?1:0;return[0,ax,l(bO,s6(0,xx))]},x),t=e[2],u=t[2],i=t[1],f=e[1];if(K(x)===98){var o=0;u[0]===0&&u[1][2][0]===11&&(zx(x,2),o=1)}var a=function(xx){return function(ax,dx){for(var mx=ax,L0=dx;;){var C0=K(x);if(typeof C0!="number"&&C0[0]===4){var A0=C0[3],U0=0;if(P(A0,vn)&&P(A0,tU)&&(U0=1),!U0&&_1(x)){Z0(x);var Q0=a2(x,L0),H=0;if(mx){var b=mx[1],B=b[2],a0=mx[2],m0=b[3],P0=B[1],D=b[1];if(Cz(B[2],i30)){var N0=mL(D,Q0,P0,Fr(m0,xx)),X0=a0;H=1}}if(!H)var N0=Q0,X0=mx;var D0=N0[1];if(Ar(A0,tU))var ox=to(x),h=[0,[0,Fr(D0,ox[1]),[33,[0,N0,[0,ox],0]]]];else if(K(x)===27){var b0=Fr(D0,gx(x));Z0(x);var h=[0,[0,b0,[33,[0,N0,0,0]]]]}else var kx=to(x),V0=kx[1],h=[0,[0,Fr(D0,V0),[2,[0,N0,[0,V0,kx],0]]]];var mx=X0,L0=h;continue}}return[0,mx,L0]}}}(f)(r,u),d=a[2],k=a[1],T=K(x),g=0;if(typeof T=="number"){var A=T-17|0,N=0;if(1>>0)if(72<=A){var R=0;switch(A-72|0){case 0:var I=f30;break;case 1:var I=c30;break;case 2:var I=s30;break;case 3:var I=o30;break;case 4:var I=v30;break;case 5:var I=a30;break;case 6:var I=l30;break;case 7:var I=p30;break;case 8:var I=d30;break;case 9:var I=y30;break;case 10:var I=m30;break;case 11:var I=k30;break;case 12:var I=h30;break;case 13:var I=_30;break;case 14:var I=w30;break;case 15:var I=T30;break;case 16:var I=S30;break;case 17:var I=E30;break;case 18:var I=g30;break;case 19:var I=A30;break;default:N=1,R=1}if(!R)var M=I}else N=1;else var M=A?P30:x[12]?0:C30;if(!N){var L=M;g=1}}if(!g)var L=0;if(L!==0&&Z0(x),!k&&!L)return d;if(!L)for(var z=a2(x,d),V=f,Z=k;;){if(!Z)return[0,z];var $=Z[1],i0=Z[2],U=$[2][1],J=$[1],Y=Fr($[3],V),z=mL(J,z,U,Y),V=Y,Z=i0}var F=L[1],n0=F[1],Q=F[2],f0=i&&(n0===14?1:0);f0&&ux(x,[0,f,42]);for(var s0=a2(x,d),v0=[0,n0,Q],o0=f,c0=k;;){var T0=v0[2],E0=v0[1];if(c0){var M0=c0[1],Y0=M0[2],rx=c0[2],g0=M0[3],H0=Y0[1],t0=M0[1];if(Cz(Y0[2],T0)){var ex=Fr(g0,o0),s0=mL(t0,s0,H0,ex),v0=[0,E0,T0],o0=ex,c0=rx;continue}}var r=[0,[0,s0,[0,E0,T0],o0],c0];continue x}}}),I0(GO,function(x){var r=K(x);if(typeof r=="number"){if(48<=r){if(nn<=r){if(Ot>r)switch(r+VP|0){case 0:return Ga0;case 1:return ba0;case 6:return x30;case 7:return r30}}else if(r===65&&x[19])return x[10]&&zx(x,7),e30}else if(45<=r)switch(r+TE|0){case 0:return t30;case 1:return n30;default:return u30}}return 0}),I0(bO,function(x){var r=gx(x),e=_0(x),t=l(GO,x);if(t){var u=t[1];Z0(x);var i=l0([0,r],xL,x),f=i[2],o=i[1],a=0;if(u===6){var d=f[2],k=0;switch(d[0]){case 9:yt(x,[0,o,73]),k=1;break;case 21:d[1][2][0]===1&&ux(x,[0,o,67]),k=1;break}k&&(a=1)}return[0,[0,o,[34,[0,u,f,y0([0,e],0,0)]]]]}var T=K(x),g=0;if(typeof T=="number")if(Ot===T)var A=qa0;else if(D2===T)var A=Ha0;else g=1;else g=1;if(g)var A=0;if(!A)return l(Lz,x);var N=A[1];Z0(x);var R=l0([0,r],xL,x),I=R[2],M=R[1];1-l(HO,I)&&ux(x,[0,I[1],41]);var L=I[2],z=0;return L[0]===9&&$v(L[1][2][1])&&($t(x,78),z=1),[0,[0,M,[35,[0,N,I,1,y0([0,e],0,0)]]]]}),I0(xL,function(x){return a2(x,l(bO,x))}),I0(Lz,function(x){var r=l(rL,x);if(Z2(x))return r;var e=K(x),t=0;if(typeof e=="number")if(Ot===e)var u=Fa0;else if(D2===e)var u=Qa0;else t=1;else t=1;if(t)var u=0;if(!u)return r;var i=u[1],f=a2(x,r);1-l(HO,f)&&ux(x,[0,f[1],41]);var o=f[2],a=0;o[0]===9&&$v(o[1][2][1])&&($t(x,77),a=1);var d=gx(x);Z0(x);var k=yx(x),T=Fr(f[1],d);return[0,[0,T,[35,[0,i,f,0,y0(0,[0,k],0)]]]]}),I0(rL,function(x){var r=gx(x),e=1-x[17],t=0,u=x[17]===0?x:[0,x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15],x[16],t,x[18],x[19],x[20],x[21],x[22],x[23],x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]],i=K(u),f=0;if(typeof i=="number"){var o=i-44|0;if(7>=o>>>0){var a=0;switch(o){case 0:if(e)var d=[0,l(nL,u)];else a=1;break;case 6:var d=[0,l(Mz,u)];break;case 7:var d=[0,l(eL,u)];break;default:a=1}if(!a){var k=d;f=1}}}if(!f)var k=zo(u)?[0,l(fL,u)]:l(cL,u);return Xe(Gv,0,0,u,r,k)}),I0(g9,function(x){return a2(x,l(rL,x))}),I0(eL,function(x){switch(x[22]){case 0:var r=0,e=0;break;case 1:var r=0,e=1;break;default:var r=1,e=1}var t=gx(x),u=_0(x);u0(x,51);var i=[0,t,[28,[0,y0([0,u],[0,yx(x)],0)]]],f=K(x);if(typeof f=="number"&&11>f)switch(f){case 4:var o=r?i:(ux(x,[0,t,ct]),[0,t,[9,wn(0,[0,t,Za0])]]);return ve(tL,0,x,t,o);case 6:case 10:var a=e?i:(ux(x,[0,t,jt]),[0,t,[9,wn(0,[0,t,$a0])]]);return ve(tL,0,x,t,a)}return e?g1(Wa0,x):ux(x,[0,t,jt]),i}),I0(Mz,function(x){return l0(0,function(r){var e=_0(r),t=gx(r);if(u0(r,50),o1(r,10)){var u=wn(0,[0,t,Va0]),i=gx(r);ro(r,za0);var f=wn(0,[0,i,Ka0]);return[22,[0,u,f,y0([0,e],[0,yx(r)],0)]]}var o=_0(r);u0(r,4);var a=G0(vL,[0,o],0,l(Qt,s6(0,r)));return u0(r,5),[10,[0,a,y0([0,e],[0,yx(r)],0)]]},x)}),I0(Gv,function(x,r,e,t,u){var i=x?x[1]:1,f=r?r[1]:0,o=Xe(iL,[0,i],[0,f],e,t,u),a=TV(e),d=0;if(a){var k=a[1];if(typeof k=="number"&&k===83){var T=1;d=1}}if(!d)var T=0;function g(M){var L=R1(M)[2];function z(V,Z){return p(Gx(V,dn,62),V,Z)}return p(L,a2(M,o),z)}function A(M,L,z){var V=l(uL,L),Z=V[1],$=V[2],i0=Fr(t,Z),U=[0,z,M,[0,Z,$],0],J=0;if(!T&&!f){var Y=[5,U];J=1}if(!J)var Y=[25,[0,U,i0,T]];var F=f||T;return Xe(Gv,[0,i],[0,F],L,t,[0,[0,i0,Y]])}if(e[13])return o;var N=K(e);if(typeof N=="number"){var R=N-98|0;if(2>>0){if(R===-94)return A(0,e,g(e))}else if(R!==1&&_1(e)){var I=Gy(function(M,L){throw q0(as,1)},e);return t9(I,o,function(M){var L=g(M);return A(l(A9,M),M,L)})}}return o}),I0(tL,function(x,r,e,t){var u=x?x[1]:1;return a2(r,Xe(Gv,[0,u],0,r,e,[0,t]))}),I0(nL,function(x){return l0(0,function(r){var e=gx(r),t=_0(r);if(u0(r,44),r[11]&&K(r)===10){var u=yx(r);Z0(r);var i=wn(y0([0,t],[0,u],0),[0,e,Ya0]),f=K(r);return typeof f!="number"&&f[0]===4&&!P(f[3],US)?[22,[0,i,p(px[13],0,r),0]]:(g1(Xa0,r),Z0(r),[9,i])}var o=gx(r),a=K(r),d=0;if(typeof a=="number")if(a===44)var k=l(nL,r);else if(a===51)var k=l(eL,dO(1,r));else d=1;else d=1;if(d)var k=zo(r)?l(fL,r):l(Uz,r);var T=ve(Dz,Ja0,dO(1,r),o,k),g=K(r),A=0;if(typeof g!="number"&&g[0]===3){var N=ve(oL,r,o,T,g[1]);A=1}if(!A)var N=T;var R=0;if(K(r)!==4){var I=0;if((!_1(r)||K(r)!==98)&&(I=1),I){var L=N;R=1}}if(!R)var M=R1(r)[2],L=p(M,N,function(i0,U){return p(Gx(i0,dn,63),i0,U)});var z=_1(r)?t9(Gy(function(i0,U){throw q0(as,1)},r),0,A9):0,V=K(r),Z=0;if(typeof V=="number"&&V===4){var $=[0,l(uL,r)];Z=1}if(!Z)var $=0;return[23,[0,L,z,$,y0([0,t],0,0)]]},x)});var tE0=function(x){var r=_0(x);u0(x,98);for(var e=0;;){var t=K(x);if(typeof t=="number"){var u=0;if(t!==99&&Nr!==t&&(u=1),!u){var i=Ax(e),f=_0(x);u0(x,99);var o=K(x)===4?R1(x)[1]:yx(x);return[0,i,J1([0,r],[0,o],f,0)]}}var a=K(x),d=0;if(typeof a!="number"&&a[0]===4&&!P(a[2],Na)){var k=gx(x),T=_0(x);ro(x,Ba0);var g=[1,[0,k,[0,y0([0,T],[0,yx(x)],0)]]];d=1}if(!d)var g=[0,to(x)];var A=[0,g,e];K(x)!==99&&u0(x,9);var e=A}};I0(A9,function(x){V1(x,1);var r=K(x)===98?[0,l0(0,tE0,x)]:0;return $1(x),r});var nE0=function(x){var r=_0(x);u0(x,12);var e=l(Qt,x);return[0,e,y0([0,r],0,0)]};I0(uL,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);for(var t=0;;){var u=K(r);if(typeof u=="number"){var i=0;if(u!==5&&Nr!==u&&(i=1),!i){var f=Ax(t),o=_0(r);return u0(r,5),[0,f,J1([0,e],[0,yx(r)],o,0)]}}var a=K(r),d=0;if(typeof a=="number"&&a===12){var k=[1,l0(0,nE0,r)];d=1}if(!d)var k=[0,l(Qt,r)];var T=[0,k,t];K(r)!==5&&u0(r,9);var t=T}},x)});var zz=function(x,r,e,t,u,i){var f=x?x[1]:1,o=r?r[1]:0,a=e?e[1]:0,d=dO(0,t),k=l(px[7],d),T=gx(t);u0(t,7);var g=yx(t),A=Fr(u,T),N=y0(0,[0,g],0),R=[0,a2(t,i),[2,k],N],I=o?[26,[0,R,A,a]]:[21,R];return Xe(Gv,[0,f],[0,o],t,u,[0,[0,A,I]])},Kz=function(x,r,e,t,u,i){var f=x?x[1]:1,o=r?r[1]:0,a=e?e[1]:0,d=K(t),k=0;if(typeof d=="number"&&d===14){var T=BV(t),g=T[1],A=t[30][1],N=T[2][1];if(A){var R=A[1];t[30][1]=[0,[0,R[1],[0,[0,N,g],R[2]]],A[2]]}else ux(t,[0,g,68]);var M=[1,T],L=g;k=1}if(!k)var I=S2(t),M=[0,I],L=I[1];var z=Fr(u,L),V=0;i[0]===0&&i[1][2][0]===28&&M[0]===1&&(ux(t,[0,z,87]),V=1);var Z=[0,a2(t,i),M,0],$=o?[26,[0,Z,z,a]]:[21,Z];return Xe(Gv,[0,f],[0,o],t,u,[0,[0,z,$]])};I0(iL,function(x,r,e,t,u){var i=x?x[1]:1,f=r?r[1]:0,o=K(e);if(typeof o=="number")switch(o){case 6:return Z0(e),zz([0,i],[0,f],0,e,t,u);case 10:return Z0(e),Kz([0,i],[0,f],0,e,t,u);case 83:1-i&&zx(e,64),u0(e,83);var a=K(e);if(typeof a=="number")switch(a){case 4:return u;case 6:return Z0(e),zz([0,i],Ma0,La0,e,t,u);case 98:if(_1(e))return u;break}else if(a[0]===3)return zx(e,65),u;return Kz([0,i],ja0,Da0,e,t,u)}else if(o[0]===3){var d=o[1];return f&&zx(e,65),Xe(Gv,Ua0,0,e,t,[0,ve(oL,e,t,a2(e,u),d)])}return u}),I0(Dz,function(x,r,e,t){var u=x?x[1]:1;return a2(r,Xe(iL,[0,u],0,r,e,[0,t]))}),I0(fL,function(x){return l0(0,function(r){var e=E9(r),t=e[1],u=e[2],i=l0(0,function(M){var L=_0(M);u0(M,15);var z=l3(M),V=z[1],Z=Xl([0,u,[0,L,[0,z[2],0]]]);if(K(M)===4)var $=0,i0=0;else{var U=K(M),J=0;if(typeof U=="number"&&U===98){var F=0;J=1}if(!J)var Y=vO(V,aO(t,M)),F=[0,Sn(Y,p(px[13],Oa0,Y))];var $=ue(M,Ze(M)),i0=F}var n0=Zv(0,M),Q=t||n0[19],f0=l(a3(Q,V),n0),s0=K(n0)===86?f0:d6(n0,f0),v0=VO(n0),o0=v0[2],c0=v0[1];if(o0)var T0=MV(n0,o0),E0=c0;else var T0=o0,E0=c3(n0,c0);return[0,i0,s0,V,T0,E0,$,Z]},r),f=i[2],o=f[3],a=f[2],d=f[1],k=f[7],T=f[6],g=f[5],A=f[4],N=i[1],R=T6(r,t,o,1,Fv(a)),I=R[1];return v3(r,R[2],d,a),[8,[0,d,a,I,t,o,A,g,T,y0([0,k],0,0),N]]},x)}),I0(P9,function(x,r,e){switch(r){case 1:$t(x,81);try{var t=bd(Rl(Qx(Pa0,e))),u=t}catch(g){var i=L1(g);if(i[1]!==kn)throw q0(i,0);var u=Nx(Qx(Ca0,e))}break;case 2:$t(x,80);try{var f=QR(e),u=f}catch(g){var o=L1(g);if(o[1]!==kn)throw q0(o,0);var u=Nx(Qx(Na0,e))}break;case 4:try{var a=QR(e),u=a}catch(g){var d=L1(g);if(d[1]!==kn)throw q0(d,0);var u=Nx(Qx(Ra0,e))}break;default:try{var k=bd(Rl(e)),u=k}catch(g){var T=L1(g);if(T[1]!==kn)throw q0(T,0);var u=Nx(Qx(Ia0,e))}}return u0(x,[0,r,e]),u}),I0(jz,function(x){var r=Xx(x),e=0;if(r!==0&&B1===O1(x,r-1|0)){var t=k2(x,0,r-1|0);e=1}if(!e)var t=x;return t}),I0(C9,function(x,r,e){var t=kX(l(jz,e));return u0(x,[1,r,e]),t}),I0(cL,function(x){var r=gx(x),e=_0(x),t=K(x);if(typeof t=="number")switch(t){case 0:var u=l(px[12],x);return[1,[0,u[1],[24,u[2]]],u[3]];case 4:return[0,l(Bz,x)];case 6:var i=l0(0,Yz,x),f=i[2];return[1,[0,i[1],[0,f[1]]],f[2]];case 21:return Z0(x),[0,[0,r,[31,[0,y0([0,e],[0,yx(x)],0)]]]];case 29:return Z0(x),[0,[0,r,[15,y0([0,e],[0,yx(x)],0)]]];case 40:return[0,l(px[22],x)];case 98:var o=l(px[17],x),a=o[2],d=o[1],k=un<=a[1]?[12,a[2]]:[11,a[2]];return[0,[0,d,k]];case 30:case 31:return Z0(x),[0,[0,r,[14,[0,t===31?1:0,y0([0,e],[0,yx(x)],0)]]]];case 74:case 105:return[0,l(Xz,x)]}else switch(t[0]){case 0:var T=t[2],g=G0(P9,x,t[1],T);return[0,[0,r,[16,[0,g,T,y0([0,e],[0,yx(x)],0)]]]];case 1:var A=t[2],N=G0(C9,x,t[1],A);return[0,[0,r,[17,[0,N,A,y0([0,e],[0,yx(x)],0)]]]];case 2:var R=t[1],I=R[3],M=R[2],L=R[1];R[4]&&$t(x,81),Z0(x);var z=y0([0,e],[0,yx(x)],0),V=x[28],Z=V[6],$=V[7],i0=0;if(Z){var U=Z[1];if(yX(U,M))var J=[19,[0,M,L,Xx(U),0,I,z]];else i0=1}else i0=1;if(i0){var Y=0;if($){var F=$[1];if(yX(F,M)){var J=[19,[0,M,L,Xx(F),1,I,z]];Y=1}}if(!Y)var J=[13,[0,M,I,z]]}return[0,[0,L,J]];case 3:var n0=p(sL,x,t[1]);return[0,[0,n0[1],[30,n0[2]]]];case 4:if(!P(t[3],r_)&&pr(1,x)===40)return[0,l(px[22],x)];break}if(vs(x)){var Q=p(px[13],0,x);return[0,[0,Q[1],[9,Q]]]}g1(0,x);var f0=0;return typeof t!="number"&&t[0]===7&&(Z0(x),f0=1),[0,[0,r,[15,y0([0,e],Aa0,0)]]]}),I0(Uz,function(x){return a2(x,l(cL,x))}),I0(sL,function(x,r){var e=r[5],t=r[1],u=r[3],i=r[2],f=_0(x);u0(x,[3,r]);var o=[0,t,[0,[0,u,i],e]];if(e)var a=0,d=[0,o,0],k=t;else for(var T=[0,o,0],g=0;;){var A=l(px[7],x),N=[0,A,g],R=K(x),I=0;if(typeof R=="number"&&R===1){V1(x,4);var M=K(x),L=0;if(typeof M=="number"||M[0]!==3)L=1;else{var z=M[1],V=z[5],Z=z[1],$=z[3],i0=z[2];Z0(x),$1(x);var U=[0,[0,Z,[0,[0,$,i0],V]],T];if(!V){var T=U,g=N;continue}var J=Ax(N),Y=[0,Z,Ax(U),J];I=1}if(L)throw q0([0,wr,Sa0],1)}if(!I){g1(Ea0,x);var F=[0,A[1],ga0],n0=Ax(N),Q=Ax([0,F,T]),Y=[0,A[1],Q,n0]}var a=Y[3],d=Y[2],k=Y[1];break}var f0=yx(x),s0=Fr(t,k);return[0,s0,[0,d,a,y0([0,f],[0,f0],0)]]}),I0(oL,function(x,r,e,t){var u=R1(x)[2],i=p(u,e,function(o,a){return p(Gx(o,dn,3),o,a)}),f=p(sL,x,t);return[0,Fr(r,f[1]),[29,[0,i,f,0]]]}),I0(Bz,function(x){var r=_0(x),e=l0(0,function(o){u0(o,4);var a=gx(o),d=l(Qt,o),k=K(o),T=0;if(typeof k=="number")if(k===9)var g=[0,G0(N9,o,a,[0,d,0])];else if(k===86)var g=[1,[0,d,qv(o),0]];else T=1;else T=1;if(T)var g=[0,d];return u0(o,5),g},x),t=e[2],u=e[1],i=yx(x),f=t[0]===0?t[1]:[0,u,[32,t[1]]];return G0(vL,[0,r],[0,i],f)}),I0(vL,function(x,r,e){var t=e[2],u=e[1],i=x?x[1]:0,f=r?r[1]:0;function o(v1){return I2(v1,y0([0,i],[0,f],0))}function a(v1){return GI(v1,y0([0,i],[0,f],0))}switch(t[0]){case 0:var d=t[1],k=a(d[2]),lx=[0,[0,d[1],k]];break;case 1:var T=t[1],g=T[10],A=o(T[9]),lx=[1,[0,T[1],T[2],T[3],T[4],T[5],T[6],T[7],T[8],A,g]];break;case 3:var N=t[1],R=o(N[4]),lx=[3,[0,N[1],N[2],N[3],R]];break;case 4:var I=t[1],M=o(I[4]),lx=[4,[0,I[1],I[2],I[3],M]];break;case 5:var L=t[1],z=o(L[4]),lx=[5,[0,L[1],L[2],L[3],z]];break;case 6:var V=t[1],Z=o(V[7]),lx=[6,[0,V[1],V[2],V[3],V[4],V[5],V[6],Z]];break;case 7:var $=t[1],i0=o($[4]),lx=[7,[0,$[1],$[2],$[3],i0]];break;case 8:var U=t[1],J=U[10],Y=o(U[9]),lx=[8,[0,U[1],U[2],U[3],U[4],U[5],U[6],U[7],U[8],Y,J]];break;case 9:var F=t[1],n0=F[2],Q=F[1],f0=o(n0[2]),lx=[9,[0,Q,[0,n0[1],f0]]];break;case 10:var s0=t[1],v0=o(s0[2]),lx=[10,[0,s0[1],v0]];break;case 11:var o0=t[1],c0=o(o0[4]),lx=[11,[0,o0[1],o0[2],o0[3],c0]];break;case 12:var T0=t[1],E0=o(T0[4]),lx=[12,[0,T0[1],T0[2],T0[3],E0]];break;case 13:var M0=t[1],Y0=o(M0[3]),lx=[13,[0,M0[1],M0[2],Y0]];break;case 14:var rx=t[1],g0=o(rx[2]),lx=[14,[0,rx[1],g0]];break;case 15:var lx=[15,o(t[1])];break;case 16:var H0=t[1],t0=o(H0[3]),lx=[16,[0,H0[1],H0[2],t0]];break;case 17:var ex=t[1],xx=o(ex[3]),lx=[17,[0,ex[1],ex[2],xx]];break;case 18:var ax=t[1],dx=o(ax[4]),lx=[18,[0,ax[1],ax[2],ax[3],dx]];break;case 19:var mx=t[1],L0=o(mx[6]),lx=[19,[0,mx[1],mx[2],mx[3],mx[4],mx[5],L0]];break;case 20:var C0=t[1],A0=o(C0[4]),lx=[20,[0,C0[1],C0[2],C0[3],A0]];break;case 21:var U0=t[1],Q0=o(U0[3]),lx=[21,[0,U0[1],U0[2],Q0]];break;case 22:var H=t[1],b=o(H[3]),lx=[22,[0,H[1],H[2],b]];break;case 23:var B=t[1],a0=o(B[4]),lx=[23,[0,B[1],B[2],B[3],a0]];break;case 24:var m0=t[1],P0=a(m0[2]),lx=[24,[0,m0[1],P0]];break;case 25:var D=t[1],N0=D[1],X0=D[3],D0=D[2],ox=o(N0[4]),lx=[25,[0,[0,N0[1],N0[2],N0[3],ox],D0,X0]];break;case 26:var b0=t[1],kx=b0[1],V0=b0[3],h=b0[2],X=o(kx[3]),lx=[26,[0,[0,kx[1],kx[2],X],h,V0]];break;case 27:var W0=t[1],sx=o(W0[2]),lx=[27,[0,W0[1],sx]];break;case 28:var lx=[28,[0,o(t[1][1])]];break;case 29:var tx=t[1],j0=o(tx[3]),lx=[29,[0,tx[1],tx[2],j0]];break;case 30:var Px=t[1],Ex=o(Px[3]),lx=[30,[0,Px[1],Px[2],Ex]];break;case 31:var lx=[31,[0,o(t[1][1])]];break;case 32:var Ox=t[1],qx=o(Ox[3]),lx=[32,[0,Ox[1],Ox[2],qx]];break;case 34:var B0=t[1],rr=o(B0[3]),lx=[34,[0,B0[1],B0[2],rr]];break;case 35:var Ux=t[1],K0=o(Ux[4]),lx=[35,[0,Ux[1],Ux[2],Ux[3],K0]];break;case 36:var nr=t[1],z0=nr[4],or=nr[3],jr=o(nr[2]),lx=[36,[0,nr[1],jr,or,z0]];break;default:var lx=t}return[0,u,lx]}),I0(Yz,function(x){var r=_0(x);u0(x,6);for(var e=[0,0,hn];;){var t=e[2],u=e[1],i=K(x);if(typeof i=="number"){var f=0;if(13<=i)Nr===i&&(f=1);else if(7<=i)switch(i-7|0){case 0:f=1;break;case 2:var o=gx(x);Z0(x);var e=[0,[0,[2,o],u],t];continue;case 5:var a=_0(x),d=l0(0,function(Y){Z0(Y);var F=l(p3,Y);return F[0]===0?[0,F[1],hn]:[0,F[1],F[2]]},x),k=d[2],T=k[2],g=d[1],A=k[1],N=[1,[0,g,[0,A,y0([0,a],0,0)]]],R=K(x)===7?1:0,I=0;if(!R&&pr(1,x)===7){var M=[0,T[1],[0,[0,g,20],T[2]]];I=1}if(!I)var M=T;1-R&&u0(x,9);var e=[0,[0,N,u],FO(M,t)];continue}if(f){var L=Pz(t),z=Ax(u),V=_0(x);return u0(x,7),[0,[0,z,J1([0,r],[0,yx(x)],V,0)],L]}}var Z=l(p3,x);if(Z[0]===0)var $=hn,i0=Z[1];else var $=Z[2],i0=Z[1];K(x)!==7&&u0(x,9);var e=[0,[0,[0,i0],u],FO($,t)]}}),I0(Xz,function(x){V1(x,5);var r=gx(x),e=_0(x),t=K(x),u=0;if(typeof t!="number"&&t[0]===5){var i=t[3],f=t[2];Z0(x);var o=yx(x),a=o,d=i,k=f,T=Qx(ka0,Qx(f,Qx(ma0,i)));u=1}if(!u){g1(ha0,x);var a=0,d=_a0,k=wa0,T=Ta0}$1(x);var g=Qr(Xx(d)),A=Xx(d)-1|0,N=0;if(A>=0)for(var R=N;;){var I=fx(d,R),M=I-100|0,L=0;if(21>=M>>>0)switch(M){case 0:case 3:case 5:case 9:case 15:case 17:case 21:lt(g,I),L=1;break}var z=R+1|0;if(A!==R){var R=z;continue}break}var V=X1(g);return P(V,d)&&zx(x,[18,d]),[0,r,[18,[0,k,V,T,y0([0,e],[0,a],0)]]]});var uE0=function(x){return function(r){if(typeof r=="number"){var e=0;if(66<=r){var t=r+uj|0;if(49>>0)e=1;else{var u=t-15|0;if(9>=u>>>0)switch(u){case 0:case 1:case 3:case 9:e=1;break}}}else 8<=r?r===60&&(e=1):6<=r&&(e=1);if(e)return 0}throw q0(as,1)}},iE0=function(x){var r=K(x);if(typeof r=="number"&&!r){var e=p(px[16],1,x);return[0,[0,e[1]],e[2]]}return[0,[1,l(px[10],x)],0]};I0(aL,function(x){var r=Gy(uE0,x),e=gx(r);if(pr(1,r)===11)var u=0,i=0;else var t=E9(r),u=t[2],i=t[1];var f=i||r[19],o=aO(f,r),a=o[18],d=l0(0,function(c0){var T0=ue(c0,Ze(c0));if(vs(c0)&&T0===0){var E0=p(px[13],ya0,c0),M0=E0[1],Y0=[0,M0,[0,[0,M0,[2,[0,E0,[0,bs(c0)],0]]],0]];return[0,T0,[0,M0,[0,0,[0,Y0,0],0,0]],[0,[0,M0[1],M0[3],M0[3]]],0]}var rx=l(a3(f,a),c0);hz(c0,rx);var g0=VO(Wv(1,c0));return[0,T0,rx,g0[1],g0[2]]},o),k=d[2],T=k[2],g=T[2],A=0,N=k[4],R=k[3],I=k[1],M=d[1];if(!g[1]){var L=0,z=g[2];if((g[3]||!z)&&(L=1),L){var V=SV(o);A=1}}if(!A)var V=o;var Z=T[2],$=Z[1];if($){var i0=T[1];ux(V,[0,$[1][1],91]);var U=[0,i0,[0,0,Z[2],Z[3],Z[4]]]}else var U=T;var J=Fv(U),Y=Z2(V),F=Y&&(K(V)===11?1:0);F&&zx(V,60),u0(V,11);var n0=EV(SV(V),i,0,J),Q=l0(0,iE0,n0),f0=Q[2],s0=f0[1],v0=Q[1];v3(n0,f0[2],0,U);var o0=Fr(e,v0);return[0,[0,o0,[1,[0,0,U,s0,i,0,N,R,I,y0([0,u],0,0),M]]]]}),I0(N9,function(x,r,e){return l0([0,r],function(t){for(var u=e;;){var i=K(t);if(typeof i=="number"&&i===9){Z0(t);var u=[0,l(Qt,t),u];continue}return[27,[0,Ax(u),0]]}},x)});var fE0=function(x){var r=_0(x);Z0(x);var e=y0([0,r],0,0),t=l(g9,x),u=Z2(x)?p6(x):n9(x),i=u[2];return[0,p(i,t,function(f,o){return p(Gx(f,dn,64),f,o)}),e]},kL=function(x){if(!x[28][3])return 0;for(var r=0;;){var e=K(x);if(typeof e=="number"&&e===13){var r=[0,l0(0,fE0,x),r];continue}return Ax(r)}},$o=function(x,r){var e=x?x[1]:0,t=_0(r),u=K(r);if(typeof u=="number")switch(u){case 6:var i=l0(0,function(v0){var o0=_0(v0);u0(v0,6);var c0=s6(0,v0),T0=l(px[10],c0);return u0(v0,7),[0,T0,y0([0,o0],[0,yx(v0)],0)]},r),f=i[1];return[0,f,[5,[0,f,i[2]]]];case 14:if(!e){var o=l0(0,function(v0){return Z0(v0),[3,S2(v0)]},r),a=o[1],d=o[2];return ux(r,[0,a,68]),[0,a,d]}var k=BV(r),T=r[30][1],g=k[2][1],A=k[1];if(T){var N=T[1],R=T[2],I=N[2],M=[0,[0,p(T2[4],g,N[1]),I],R];r[30][1]=M}else Nx(Cs0);return[0,A,[4,k]]}else switch(u[0]){case 0:var L=u[2],z=u[1],V=gx(r),Z=G0(P9,r,z,L);return[0,V,[1,[0,V,[0,Z,L,y0([0,t],[0,yx(r)],0)]]]];case 1:var $=u[2],i0=u[1],U=gx(r),J=G0(C9,r,i0,$);return[0,U,[2,[0,U,[0,J,$,y0([0,t],[0,yx(r)],0)]]]];case 2:var Y=u[1],F=Y[4],n0=Y[3],Q=Y[2],f0=Y[1];return F&&$t(r,81),u0(r,[2,[0,f0,Q,n0,F]]),[0,f0,[0,[0,f0,[0,Q,n0,y0([0,t],[0,yx(r)],0)]]]]}var s0=S2(r);return[0,s0[1],[3,s0]]},R9=function(x,r,e){var t=l3(x),u=t[1],i=t[2],f=$o([0,r],x),o=f[1],a=0,d=En(x,f[2]);return[0,d,l0(0,function(k){var T=Zv(1,k),g=l0(0,function(V){var Z=l(a3(0,0),V),$=0,i0=K(V)===86?Z:d6(V,Z);if(e){var U=i0[2],J=0;if(U[1])ux(V,[0,o,28]),J=1;else{var Y=0;U[2]||U[3]?Y=1:J=1,Y&&ux(V,[0,o,27])}}else{var F=i0[2];if(F[1])ux(V,[0,o,71]);else{var n0=F[2],Q=0;n0&&!n0[2]&&!F[3]&&(Q=1),Q||(F[3]?ux(V,[0,o,70]):ux(V,[0,o,70]))}}return[0,$,i0,c3(V,JO(V))]},T),A=g[2],N=A[2],R=A[3],I=A[1],M=g[1],L=T6(T,a,u,0,Fv(N)),z=L[1];return v3(T,L[2],0,N),[0,0,N,z,a,u,0,R,I,y0([0,i],0,0),M]},x)]},Zz=function(x){var r=l(p3,x);return r[0]===0?[0,r[1],hn]:[0,r[1],r[2]]},Wz=function(x,r){switch(r[0]){case 0:var e=r[1],t=e[1],u=e[2];return ux(x,[0,t,53]),[0,t,[13,u]];case 1:var i=r[1],f=i[1],o=i[2];return ux(x,[0,f,53]),[0,f,[16,o]];case 2:var a=r[1],d=a[1],k=a[2];return ux(x,[0,d,53]),[0,d,[17,k]];case 3:var T=r[1],g=T[2][1],A=T[1];return by(g)?ux(x,[0,A,ot]):i3(g)&&yt(x,[0,A,85]),[0,A,[9,T]];case 4:return Nx(nl0);default:var N=r[1][2][1];return ux(x,[0,N[1],8]),N}},$z=function(x,r,e){function t(i){var f=Zv(1,i),o=l0(0,function(R){var I=ue(R,Ze(R)),M=l(a3(x,r),R),L=K(R)===86?M:d6(R,M);return[0,I,L,c3(R,JO(R))]},f),a=o[2],d=a[2],k=a[3],T=a[1],g=o[1],A=T6(f,x,r,0,Fv(d)),N=A[1];return v3(f,A[2],0,d),[0,0,d,N,x,r,0,k,T,y0([0,e],0,0),g]}var u=0;return function(i){return l0(u,t,i)}},Qz=function(x){return u0(x,86),Zz(x)},hL=function(x,r,e,t,u,i){var f=l0([0,r],function(a){if(!t&&!u){var d=K(a);if(typeof d=="number"){var k=0;if(86<=d){if(d===98)k=1;else if(87>d){var T=Qz(a);return[0,[0,e,T[1],0],T[2]]}}else{if(d===82){if(e[0]===3)var g=e[1],A=gx(a),N=function(z){var V=_0(z);u0(z,82);var Z=yx(z),$=p(px[19],z,[0,g[1],[9,g]]),i0=l(px[10],z);return[3,[0,0,$,i0,y0([0,V],[0,Z],0)]]},R=l0([0,g[1]],N,a),I=[0,R,[0,[0,[0,A,[24,gy(tl0)]],0],0]];else var I=Qz(a);return[0,[0,e,I[1],1],I[2]]}if(10>d)switch(d){case 4:k=1;break;case 1:case 9:return[0,[0,e,Wz(a,e),1],hn]}}if(k){var M=En(a,e);return[0,[1,M,l($z(t,u,i),a)],hn]}}return[0,[0,e,Wz(a,e),1],hn]}var L=En(a,e);return[0,[1,L,l($z(t,u,i),a)],hn]},x),o=f[2];return[0,[0,[0,f[1],o[1]]],o[2]]},cE0=function(x){if(K(x)===12){var r=_0(x),e=l0(0,function(M0){return u0(M0,12),Zz(M0)},x),t=e[2],u=t[2],i=t[1],f=e[1];return[0,[1,[0,f,[0,i,y0([0,r],0,0)]]],u]}var o=gx(x),a=pr(1,x),d=0;if(typeof a=="number"){var k=0;if(86<=a)a!==98&&87<=a&&(k=1);else if(a!==82)if(10<=a)k=1;else switch(a){case 1:case 4:case 9:break;default:k=1}if(!k){var g=0,A=0;d=1}}if(!d)var T=E9(x),g=T[2],A=T[1];var N=l3(x),R=N[1],I=Fx(g,N[2]),M=K(x);if(!A&&!R&&typeof M!="number"&&M[0]===4){var L=M[3];if(!P(L,Cv)){var z=_0(x),V=$o(0,x)[2],Z=K(x);if(typeof Z=="number"){var $=0;if(86<=Z)Z!==98&&87<=Z&&($=1);else if(Z!==82)if(10<=Z)$=1;else switch(Z){case 1:case 4:case 9:break;default:$=1}if(!$)return hL(x,o,V,0,0,0)}En(x,V);var i0=l0([0,o],function(M0){return R9(M0,0,1)},x),U=i0[2],J=U[2],Y=U[1],F=i0[1];return[0,[0,[0,F,[2,Y,J,y0([0,z],0,0)]]],hn]}if(!P(L,ja)){var n0=_0(x),Q=$o(0,x)[2],f0=K(x);if(typeof f0=="number"){var s0=0;if(86<=f0)f0!==98&&87<=f0&&(s0=1);else if(f0!==82)if(10<=f0)s0=1;else switch(f0){case 1:case 4:case 9:break;default:s0=1}if(!s0)return hL(x,o,Q,0,0,0)}En(x,Q);var v0=l0([0,o],function(M0){return R9(M0,0,0)},x),o0=v0[2],c0=o0[2],T0=o0[1],E0=v0[1];return[0,[0,[0,E0,[3,T0,c0,y0([0,n0],0,0)]]],hn]}}return hL(x,o,$o(0,x)[2],A,R,I)},sE0=function(x){var r=l0(0,function(t){var u=_0(t);u0(t,0);for(var i=0,f=[0,0,hn];;){var o=f[2],a=f[1],d=K(t);if(typeof d=="number"){var k=0;if(d!==1&&Nr!==d&&(k=1),!k){var T=i?[0,o[1],[0,[0,i[1],95],o[2]]]:o,g=Pz(T),A=Ax(a),N=_0(t);return u0(t,1),[0,[0,A,J1([0,u],[0,yx(t)],N,0)],g]}}var R=cE0(t),I=R[1],M=0,L=R[2];if(I[0]===1&&K(t)===9){var z=[0,gx(t)];M=1}if(!M)var z=0;var V=FO(L,o),Z=K(t),$=0;if(typeof Z=="number"){var i0=Z-2|0,U=0;if(B1>>0?D2>=i0+1>>>0&&(U=1):i0===7&&(Z0(t),U=1),U){var J=V;$=1}}if(!$){var Y=nO(ws0,9),F=NV([0,Y],K(t)),n0=[0,gx(t),F];o1(t,8);var J=[0,[0,n0,V[1]],[0,n0,V[2]]]}var i=z,f=[0,[0,I,a],J]}},x),e=r[2];return[0,r[1],e[1],e[2]]},I9=function(x,r,e,t){var u=e[2][1],i=e[1];if(Ar(u,Ev))return ux(x,[0,i,[15,u,0,FU===t?1:0,1]]),r;for(var f=r;;){if(typeof f=="number")var a=0;else if(f[0]===0)var o=f[2],a=Tx(u,f[1])===0?[0,o]:0;else{var d=Tx(u,f[2]),k=f[5],T=f[4],g=f[3];if(d!==0){var A=0<=d?k:T,f=A;continue}var a=[0,g]}if(!a)return s9(u,t,r);var N=a[1],R=0;return DP===t?HN===N&&(R=1):HN===t&&DP===N&&(R=1),R||ux(x,[0,i,[1,u]]),s9(u,Qj,r)}},Fz=function(x,r){return l0(0,function(e){var t=r?_0(e):0;u0(e,52);for(var u=0;;){var i=[0,l0(0,function(a){var d=ls(a);if(K(a)===98)var k=R1(a)[2],T=p(k,d,function(g,A){return p(Gx(g,Ra,65),g,A)});else var T=d;return[0,T,mz(a)]},e),u],f=K(e);if(typeof f=="number"&&f===9){u0(e,9);var u=i;continue}var o=Ax(i);return[0,o,y0([0,t],0,0)]}},x)},_L=function(x){switch(x[0]){case 0:case 3:var r=x[1];return[0,[0,r[1],r[2][1]]];default:return 0}},wL=function(x,r){return r?ux(x,[0,r[1][1],D2]):0},TL=function(x,r){return r?ux(x,[0,r[1],13]):0},Hz=function(x,r,e,t,u,i,f,o){var a=l0([0,r],function(R){var I=XO(R),M=K(R);if(i){var L=0;if(typeof M=="number"&&M===82){zx(R,14),Z0(R);var z=0}else L=1;if(L)var z=0}else{var V=0;if(typeof M=="number"&&M===82){Z0(R);var Z=Zv(1,R),z=[0,l(px[7],Z)];V=1}if(!V)var z=1}var $=K(R),i0=0;if(typeof $=="number"&&9>$)switch($){case 8:Z0(R);var U=K(R),J=0;if(typeof U=="number"){var Y=0;if(U===1||Nr===U?Y=1:J=1,Y)var F=yx(R)}else J=1;if(J)var F=Z2(R)?Ko(R):0;var n0=[0,t,I,z,F];i0=1;break;case 4:case 6:g1(0,R);var n0=[0,t,I,z,0];i0=1;break}if(!i0){var Q=K(R),f0=0;if(typeof Q=="number"){var s0=0;if(Q===1||Nr===Q?s0=1:f0=1,s0)var v0=[0,0,function(dx,mx){return dx}]}else f0=1;if(f0)var v0=Z2(R)?p6(R):n9(R);if(typeof z=="number")if(I[0]===0)var o0=function(ax,dx){return p(Gx(ax,vD,68),ax,dx)},Y0=z,rx=I,g0=p(v0[2],t,o0);else var c0=I[1],T0=function(ax,dx){return p(Gx(ax,QN,69),ax,dx)},Y0=z,rx=[1,p(v0[2],c0,T0)],g0=t;else var E0=z[1],M0=function(ax,dx){return p(Gx(ax,dn,70),ax,dx)},Y0=[0,p(v0[2],E0,M0)],rx=I,g0=t;var n0=[0,g0,rx,Y0,0]}var H0=n0[3],t0=n0[2],ex=n0[1];return[0,ex,t0,H0,y0([0,o],[0,n0[4]],0)]},x),d=a[2],k=d[4],T=d[3],g=d[2],A=d[1],N=a[1];return A[0]===4?[2,[0,N,[0,A[1],T,g,u,f,e,k]]]:[1,[0,N,[0,A,T,g,u,f,e,k]]]},SL=function(x,r,e,t,u,i,f,o,a,d){for(;;){var k=K(x);if(typeof k=="number"){var T=k-1|0,g=0;if(7>>0){var A=T-81|0;if(4>=A>>>0)switch(A){case 3:g1(0,x),Z0(x);continue;case 0:case 4:g=1;break}}else 5>>0&&(g=1);if(g&&!u&&!i)return Hz(x,r,e,t,f,o,a,d)}var N=K(x),R=0;if(typeof N=="number"&&(N===4||N===98))var I=0;else R=1;if(R)var I=f3(x)?1:0;if(I)return Hz(x,r,e,t,f,o,a,d);TL(x,o),wL(x,a);var M=_L(t),L=0;if(f){if(M){var z=M[1],V=z[1];if(!P(z[2],Ao)){ux(x,[0,V,[15,H30,f,1,0]]);var i0=Zv(1,x),U=1;L=1}}}else if(M){var Z=M[1],$=Z[1];if(!P(Z[2],Ev)){u&&ux(x,[0,$,10]),i&&ux(x,[0,$,11]);var i0=Zv(2,x),U=0;L=1}}if(!L)var i0=Zv(1,x),U=1;var J=En(i0,t),Y=l0(0,function(n0){var Q=l0(0,function(M0){var Y0=ue(M0,Ze(M0)),rx=l(a3(u,i),M0),g0=K(M0)===86?rx:d6(M0,rx),H0=g0[2],t0=H0[1],ex=0;if(t0){var xx=t0[1][1],ax=g0[1];if(U===0){ux(M0,[0,xx,92]);var dx=[0,ax,[0,0,H0[2],H0[3],H0[4]]];ex=1}}if(!ex)var dx=g0;return[0,Y0,dx,c3(M0,JO(M0))]},n0),f0=Q[2],s0=f0[2],v0=f0[3],o0=f0[1],c0=Q[1],T0=T6(n0,u,i,0,Fv(s0)),E0=T0[1];return v3(n0,T0[2],0,s0),[0,0,s0,E0,u,i,0,v0,o0,0,c0]},i0),F=[0,U,J,Y,f,e,y0([0,d],0,0)];return[0,[0,Fr(r,Y[1]),F]]}},EL=function(x,r){var e=pr(x,r);if(typeof e=="number"){var t=0;if(86<=e)e!==98&&87<=e&&(t=1);else if(e!==82)if(9<=e)t=1;else switch(e){case 1:case 4:case 8:break;default:t=1}if(!t)return 1}return 0},oE0=0,qz=function(x){return EL(oE0,x)},vE0=function(x){var r=gx(x),e=kL(x),t=K(x),u=0;if(typeof t=="number"&&t===60&&!EL(1,x)){var i=[0,gx(x)],f=_0(x);Z0(x);var o=f,a=i;u=1}if(!u)var o=0,a=0;var d=K(x),k=0;if(typeof d=="number"&&2>=d+mU>>>0&&Vo(1,x)){var T=0;if(typeof d=="number"){var g=d+mU|0;if(2>=g>>>0){switch(g){case 0:var A=sY;break;case 1:var A=cl;break;default:var A=yl}var N=A;T=1}}if(!T)var N=Nx(q30);zx(x,[22,N]),Z0(x),k=1}var R=K(x)===42?1:0;if(R){var I=pr(1,x),M=0;if(typeof I=="number"){var L=0;if(87<=I)I!==98&&Nr!==I&&(L=1);else{var z=I-9|0;if(76>>0){if(77>z)switch(z+9|0){case 1:case 4:case 8:break;default:L=1}}else z!==73&&(L=1)}if(!L){var V=0;M=1}}if(!M)var V=1;var Z=V}else var Z=R;if(Z){var $=_0(x);Z0(x);var i0=$}else var i0=0;var U=K(x)===64?1:0;if(U)var J=1-EL(1,x),Y=J&&1-v6(1,x);else var Y=U;if(Y){var F=_0(x);Z0(x);var n0=F}else var n0=0;var Q=l3(x),f0=Q[1],s0=Q[2],v0=Vo(1,x),o0=v0||(pr(1,x)===6?1:0),c0=gx(x),T0=K(x),E0=0;if(typeof T0=="number")switch(T0){case 103:var M0=_0(x);Z0(x);var g0=[0,[0,c0,[0,0,y0([0,M0],0,0)]]];E0=1;break;case 104:var Y0=_0(x);Z0(x);var g0=[0,[0,c0,[0,1,y0([0,Y0],0,0)]]];E0=1;break}else if(T0[0]===4&&!P(T0[3],ga)&&o0){var rx=_0(x);Z0(x);var g0=[0,[0,c0,[0,2,y0([0,rx],0,0)]]];E0=1}if(!E0)var g0=0;var H0=0;if(g0){var t0=0,ex=g0[1][1];if((Y||f0)&&(t0=1),t0){ux(x,[0,ex,D2]);var xx=0;H0=1}}if(!H0)var xx=g0;var ax=0;if(!f0&&xx){var dx=l3(x),mx=dx[2],L0=dx[1];ax=1}if(!ax)var mx=s0,L0=f0;var C0=Xl([0,o,[0,i0,[0,n0,[0,mx,0]]]]),A0=K(x);if(!Y&&!L0&&typeof A0!="number"&&A0[0]===4){var U0=A0[3];if(!P(U0,Cv)){var Q0=_0(x),H=$o(b30,x)[2];if(qz(x))return SL(x,r,e,H,Y,L0,Z,a,xx,C0);TL(x,a),wL(x,xx),En(x,H);var b=Fx(C0,Q0),B=l0([0,r],function(K0){return R9(K0,1,1)},x),a0=B[2],m0=a0[1],P0=a0[2],D=B[1],N0=_L(m0),X0=0;if(Z){if(N0){var D0=N0[1],ox=D0[1];P(D0[2],Ao)||(ux(x,[0,ox,[15,el0,Z,0,0]]),X0=1)}}else if(N0){var b0=N0[1],kx=b0[1];P(b0[2],Ev)||(ux(x,[0,kx,9]),X0=1)}return[0,[0,D,[0,2,m0,P0,Z,e,y0([0,b],0,0)]]]}if(!P(U0,ja)){var V0=_0(x),h=$o(G30,x)[2];if(qz(x))return SL(x,r,e,h,Y,L0,Z,a,xx,C0);TL(x,a),wL(x,xx),En(x,h);var X=Fx(C0,V0),W0=l0([0,r],function(K0){return R9(K0,1,0)},x),sx=W0[2],tx=sx[1],j0=sx[2],Px=W0[1],Ex=_L(tx),Ox=0;if(Z){if(Ex){var qx=Ex[1],B0=qx[1];P(qx[2],Ao)||(ux(x,[0,B0,[15,rl0,Z,0,0]]),Ox=1)}}else if(Ex){var rr=Ex[1],Ux=rr[1];P(rr[2],Ev)||(ux(x,[0,Ux,9]),Ox=1)}return[0,[0,Px,[0,3,tx,j0,Z,e,y0([0,X],0,0)]]]}}return SL(x,r,e,$o(xl0,x)[2],Y,L0,Z,a,xx,C0)},Gz=function(x,r,e,t){var u=x?x[1]:0,i=Gs(1,r),f=Fx(u,kL(i)),o=_0(i),a=K(i),d=0;typeof a!="number"&&a[0]===4&&!P(a[3],r_)&&(zx(i,88),Z0(i),d=1),u0(i,40);var k=lO(1,i),T=K(k),g=0;if(e&&typeof T=="number"){var A=0;if(52<=T?T!==98&&53<=T&&(A=1):T!==41&&T&&(A=1),!A){var I=0;g=1}}if(!g)if(vs(i))var N=p(px[13],0,k),R=R1(i)[2],I=[0,p(R,N,function(Q,f0){return p(Gx(Q,Ra,72),Q,f0)})];else{RV(i,W30);var I=[0,[0,gx(i),$30]]}var M=Ze(i);if(M)var L=M[1],z=R1(i)[2],V=[0,p(z,L,function(Q,f0){return p(Gx(Q,bN,71),Q,f0)})];else var V=0;var Z=_0(i);if(o1(i,41))var $=l0(0,function(Q){var f0=l(g9,vO(0,Q));if(K(Q)===98)var s0=R1(Q)[2],v0=p(s0,f0,function(c0,T0){return p(Gx(c0,dn,66),c0,T0)});else var v0=f0;var o0=mz(Q);return[0,v0,o0,y0([0,Z],0,0)]},i),i0=$[1],U=$[2],J=R1(i)[2],Y=[0,[0,i0,p(J,U,function(Q,f0){return G0(Gx(Q,-663447790,67),Q,i0,f0)})]];else var Y=0;if(K(i)===52){1-_1(i)&&zx(i,Ot);var F=[0,jV(i,Fz(i,1))]}else var F=0;var n0=l0(0,function(Q){var f0=_0(Q);if(!o1(Q,0))return xo(Q,0),F30;Q[30][1]=[0,[0,T2[1],0],Q[30][1]];for(var s0=0,v0=vS0,o0=0;;){var c0=K(Q);if(typeof c0=="number"){var T0=c0-2|0;if(B1>>0){if(D2>=T0+1>>>0){var E0=Ax(o0),M0=function(B0,rr){return l(Jl(function(Ux){return 1-p(T2[3],Ux[1],B0)}),rr)},Y0=Q[30][1];if(Y0){var rx=Y0[1],g0=rx[1];if(Y0[2]){var H0=Y0[2],t0=M0(g0,rx[2]),ex=Yl(H0),xx=ex[2],ax=ex[1],dx=oX(H0),mx=[0,[0,ax,Fx(xx,t0)],dx];Q[30][1]=mx}else{var L0=M0(g0,rx[2]);C2(function(B0){return ux(Q,[0,B0[2],[23,B0[1]]])},L0),Q[30][1]=0}}else Nx(Ns0);u0(Q,1);var C0=K(Q),A0=0;if(!t){var U0=0;if((typeof C0!="number"||C0!==1&&Nr!==C0)&&(U0=1),U0)if(Z2(Q)){var Q0=Ko(Q);A0=1}else{var Q0=0;A0=1}}if(!A0)var Q0=yx(Q);return[0,E0,y0([0,f0],[0,Q0],0)]}}else if(T0===6){u0(Q,8);continue}}var H=vE0(Q);switch(H[0]){case 0:var b=H[1],B=b[2],a0=b[1];switch(B[1]){case 0:if(B[4])var j0=v0,Px=s0;else{s0&&ux(Q,[0,a0,18]);var j0=v0,Px=1}break;case 1:var m0=B[2],P0=m0[0]===4?I9(Q,v0,m0[1],FU):v0,j0=P0,Px=s0;break;case 2:var D=B[2],N0=D[0]===4?I9(Q,v0,D[1],DP):v0,j0=N0,Px=s0;break;default:var X0=B[2],D0=X0[0]===4?I9(Q,v0,X0[1],HN):v0,j0=D0,Px=s0}break;case 1:var ox=H[1][2],b0=ox[4],kx=ox[1];switch(kx[0]){case 4:Nx(Q30);break;case 0:case 3:var V0=kx[1],h=V0[2][1],X=Ar(h,Ev),W0=V0[1];if(X)var tx=X;else var sx=Ar(h,Ao),tx=sx&&b0;tx&&ux(Q,[0,W0,[15,h,b0,0,0]]);break}var j0=v0,Px=s0;break;default:var j0=I9(Q,v0,H[1][2][1],Qj),Px=s0}var s0=Px,v0=j0,o0=[0,H,o0]}},i);return[0,I,n0,V,Y,F,f,y0([0,o],0,0)]},O9=function(x,r){return l0(0,function(e){return[2,Gz([0,r],e,e[7],0)]},x)},aE0=function(x){return[6,Gz(0,x,1,1)]},lE0=0,pE0=function(x){return l0(lE0,aE0,x)},bz=JV(px),xK=function(x){var r=S6(x);if(x[5])Qv(x,r[1]);else{var e=r[2],t=0;if(e[0]===26){var u=e[1],i=r[1],f=0;u[4]?(ux(x,[0,i,5]),f=1):u[5]&&(ux(x,[0,i,26]),f=1),f&&(t=1)}}return r},L9=function(x,r){var e=r[4],t=r[3],u=r[2],i=r[1];e&&$t(x,81);var f=_0(x);return u0(x,[2,[0,i,u,t,e]]),[0,i,[0,u,t,y0([0,f],[0,yx(x)],0)]]},n2=function(x,r,e){var t=x?x[1]:Yl0,u=r?r[1]:1,i=K(e);if(typeof i=="number"){var f=i-2|0;if(B1>>0){if(D2>=f+1>>>0){var o=function(k,T){return k};return[1,[0,yx(e),o]]}}else if(f===6){Z0(e);var a=K(e);if(typeof a=="number"){var d=0;if(a!==1&&Nr!==a&&(d=1),!d)return[0,yx(e)]}return Z2(e)?[0,Ko(e)]:Xl0}}return Z2(e)?[1,p6(e)]:(u&&g1([0,t],e),Jl0)},no=function(x){var r=K(x);if(typeof r=="number"){var e=0;if(r!==1&&Nr!==r&&(e=1),!e){var t=function(u,i){return u};return[0,yx(x),t]}}return Z2(x)?p6(x):n9(x)},gL=function(x,r,e){var t=n2(0,0,r);if(t[0]===0)return[0,t[1],e];var u=t[1][2],i=Ax(e);if(i)var f=i[2],o=i[1],a=Ax([0,p(u,o,function(d,k){return G0(Gx(d,634872468,73),d,x,k)}),f]);else var a=0;return[0,0,a]},rK=function x(r){return x.fun(r)},eK=function x(r){return x.fun(r)},tK=function x(r){return x.fun(r)},nK=function x(r){return x.fun(r)},uK=function x(r){return x.fun(r)},g6=function x(r,e){return x.fun(r,e)},iK=function x(r){return x.fun(r)},fK=function x(r){return x.fun(r)},A6=function x(r,e,t){return x.fun(r,e,t)},cK=function x(r){return x.fun(r)},sK=function x(r){return x.fun(r)},P6=function x(r,e){return x.fun(r,e)},oK=function x(r){return x.fun(r)},vK=function x(r){return x.fun(r)},M9=function x(r,e){return x.fun(r,e)},aK=function x(r){return x.fun(r)},D9=function x(r,e){return x.fun(r,e)},lK=function x(r){return x.fun(r)},pK=function x(r){return x.fun(r)},j9=function x(r,e){return x.fun(r,e)},dK=function x(r){return x.fun(r)},C6=function x(r,e,t){return x.fun(r,e,t)},N6=function x(r,e){return x.fun(r,e)},yK=function x(r,e){return x.fun(r,e)},mK=function x(r,e){return x.fun(r,e)},AL=function x(r,e){return x.fun(r,e)},kK=function x(r){return x.fun(r)},d3=function x(r){return x.fun(r)},U9=function x(r,e,t){return x.fun(r,e,t)},PL=function x(r,e){return x.fun(r,e)},hK=function x(r,e){return x.fun(r,e)},CL=function x(r){return x.fun(r)},dE0=function(x){var r=_0(x);u0(x,59);var e=K(x)===8?yx(x):0,t=n2(0,0,x),u=t[0]===0?t[1]:t[1][1];return[5,[0,y0([0,r],[0,Fx(e,u)],0)]]},yE0=0,mE0=function(x){var r=_0(x);u0(x,37);var e=c6(1,x),t=l(px[2],e),u=1-x[5],i=u&&y6(t);i&&Qv(x,t[1]);var f=yx(x);u0(x,25);var o=yx(x);u0(x,4);var a=l(px[7],x);u0(x,5);var d=K(x)===8?yx(x):0,k=n2(0,Bl0,x),T=k[0]===0?Fx(d,k[1]):k[1][1];return[17,[0,t,a,y0([0,r],[0,Fx(f,Fx(o,T))],0)]]},kE0=0,_K=function(x,r,e){var t=e[2][1],u=e[1];return t&&!t[1][2][2]&&!t[2]?0:ux(x,[0,u,r])},NL=function(x,r){return!x[5]&&y6(r)?Qv(x,r[1]):0},hE0=function(x){var r=_0(x);u0(x,39);var e=x[19],t=e&&o1(x,65),u=Fx(r,_0(x));u0(x,4);var i=y0([0,u],0,0),f=K(x),o=0;if(typeof f=="number"&&f===64){var a=1;o=1}if(!o)var a=0;var d=s6(1,x),k=K(d),T=0;if(typeof k=="number"){if(24<=k){if(29>k)switch(k+ET|0){case 0:var g=l0(0,Sz,d),A=g[2],N=A[3],R=A[1],I=g[1],F=N,n0=[0,[1,[0,I,[0,R,0,y0([0,A[2]],0,0)]]]];T=1;break;case 3:var M=l0(0,Ez,d),L=M[2],z=L[3],V=L[1],Z=M[1],F=z,n0=[0,[1,[0,Z,[0,V,2,y0([0,L[2]],0,0)]]]];T=1;break;case 4:if(pr(1,d)!==17){var $=l0(0,gz,d),i0=$[2],U=i0[3],J=i0[1],Y=$[1],F=U,n0=[0,[1,[0,Y,[0,J,1,y0([0,i0[2]],0,0)]]]];T=1}break}}else if(k===8){var F=0,n0=0;T=1}}if(!T)var F=0,n0=[0,[0,l(px[8],d)]];var Q=K(x);if(typeof Q=="number"){if(Q===17){if(!n0)throw q0([0,wr,Ul0],1);var f0=n0[1];if(f0[0]===0)var s0=[1,QO(jl0,x,f0[1])];else{var v0=f0[1];_K(x,43,v0);var s0=[0,v0]}t?u0(x,63):u0(x,17);var o0=l(px[7],x);u0(x,5);var c0=c6(1,x),T0=l(px[2],c0);return NL(x,T0),[24,[0,s0,o0,T0,0,i]]}if(Q===63){if(!n0)throw q0([0,wr,Dl0],1);var E0=n0[1];if(E0[0]===0){var M0=QO(Ml0,x,E0[1]),Y0=1-t,rx=Y0&&a,g0=0;if(rx){var H0=M0[2];if(H0[0]===2){var t0=H0[1][1],ex=t0[1];P(t0[2][1],Co)||(ux(x,[0,ex,44]),g0=1)}}var xx=[1,M0]}else{var ax=E0[1];_K(x,44,ax);var xx=[0,ax]}u0(x,63);var dx=l(px[10],x);u0(x,5);var mx=c6(1,x),L0=l(px[2],mx);return NL(x,L0),[25,[0,xx,dx,L0,t,i]]}}if(C2(function(N0){return ux(x,N0)},F),t?u0(x,63):u0(x,8),n0)var C0=n0[1],A0=C0[0]===0?[0,[1,a2(x,C0[1])]]:[0,[0,C0[1]]],U0=A0;else var U0=0;var Q0=K(x),H=0;if(typeof Q0=="number"&&Q0===8){var b=0;H=1}if(!H)var b=[0,l(px[7],x)];u0(x,8);var B=K(x),a0=0;if(typeof B=="number"&&B===5){var m0=0;a0=1}if(!a0)var m0=[0,l(px[7],x)];u0(x,5);var P0=c6(1,x),D=l(px[2],P0);return NL(x,D),[23,[0,U0,b,m0,D,i]]},_E0=0,wK=function(x){var r=zo(x)?xK(x):l(px[2],x),e=1-x[5],t=e&&y6(r);return t&&Qv(x,r[1]),r},wE0=function(x){var r=_0(x);u0(x,43);var e=wK(x);return[0,e,y0([0,r],0,0)]},TE0=function(x){var r=_0(x);u0(x,16);var e=Fx(r,_0(x));u0(x,4);var t=l(px[7],x);u0(x,5);var u=wK(x),i=K(x)===43?[0,l0(0,wE0,x)]:0;return[27,[0,t,u,i,y0([0,e],0,0)]]},SE0=0,TK=function(x){return l0(SE0,TE0,x)},EE0=function(x){1-x[11]&&zx(x,31);var r=_0(x),e=gx(x);u0(x,19);var t=K(x)===8?yx(x):0,u=0;if(K(x)!==8&&!f3(x)){var i=[0,l(px[7],x)];u=1}if(!u)var i=0;var f=Fr(e,gx(x)),o=n2(0,0,x),a=0;if(o[0]===0)var d=o[1];else{var k=o[1],T=k[1];if(i){var g=i[1],A=k[2],N=[0,p(A,g,function(z,V){return p(Gx(z,dn,74),z,V)})],R=t;a=1}else var d=T}if(!a)var N=i,R=Fx(t,d);return[31,[0,N,y0([0,r],[0,R],0),f]]},gE0=0,AE0=function(x){var r=_0(x);u0(x,20),u0(x,4);var e=l(px[7],x);u0(x,5),u0(x,0);for(var t=Ll0;;){var u=t[2],i=t[1],f=K(x);if(typeof f=="number"){var o=0;if(f!==1&&Nr!==f&&(o=1),!o){var a=Ax(u);u0(x,1);var d=no(x)[1],k=e[1];return[32,[0,e,a,y0([0,r],[0,d],0),k]]}}var T=i9(0,function(A){return function(N){var R=_0(N),I=K(N),M=0;if(typeof I=="number"&&I===36){A&&zx(N,58),u0(N,36);var L=yx(N),z=0;M=1}if(!M){u0(N,33);var L=0,z=[0,l(px[7],N)]}var V=A||(z===0?1:0);u0(N,86);var Z=Fx(L,no(N)[1]);function $(Y){if(typeof Y=="number"){var F=Y-1|0,n0=0;if(32>>0?F===35&&(n0=1):30>>0&&(n0=1),n0)return 1}return 0}var i0=1,U=N[9]===1?N:[0,N[1],N[2],N[3],N[4],N[5],N[6],N[7],N[8],i0,N[10],N[11],N[12],N[13],N[14],N[15],N[16],N[17],N[18],N[19],N[20],N[21],N[22],N[23],N[24],N[25],N[26],N[27],N[28],N[29],N[30],N[31]],J=p(px[4],$,U);return[0,[0,z,J,y0([0,R],[0,Z],0)],V]}}(i),x),t=[0,T[2],[0,T[1],u]]}},PE0=0,CE0=function(x){var r=_0(x),e=gx(x);u0(x,22),Z2(x)&&ux(x,[0,e,59]);var t=l(px[7],x),u=n2(0,0,x);if(u[0]===0)var o=t,a=u[1];else var i=u[1][2],f=0,o=p(i,t,function(d,k){return p(Gx(d,dn,75),d,k)}),a=f;return[33,[0,o,y0([0,r],[0,a],0)]]},NE0=0,RE0=function(x){var r=_0(x);u0(x,23);var e=l(px[15],x);if(K(x)===34)var t=R1(x)[2],u=p(t,e,function(M,L){var z=L[1];return[0,z,G0(Gx(M,n8,4),M,z,L[2])]});else var u=e;var i=K(x),f=0;if(typeof i=="number"&&i===34){var o=[0,l0(0,function(L){var z=_0(L);u0(L,34);var V=yx(L);if(K(L)===4){u0(L,4);var Z=[0,p(px[18],L,72)];u0(L,5);var $=Z}else var $=0;var i0=l(px[15],L);if(K(L)===38)var J=i0;else var U=no(L)[2],J=p(U,i0,function(Y,F){var n0=F[1];return[0,n0,G0(Gx(Y,n8,76),Y,n0,F[2])]});return[0,$,J,y0([0,z],[0,V],0)]},x)];f=1}if(!f)var o=0;var a=K(x),d=0;if(typeof a=="number"&&a===38){u0(x,38);var k=l(px[15],x),T=k[1],g=k[2],A=no(x)[2],N=[0,[0,T,p(A,g,function(L,z){return G0(Gx(L,n8,77),L,T,z)})]];d=1}if(!d)var N=0;var R=o===0?1:0,I=R&&(N===0?1:0);return I&&ux(x,[0,u[1],61]),[34,[0,u,o,N,y0([0,r],0,0)]]},IE0=0,OE0=function(x){var r=Sz(x),e=r[3],t=r[2],u=gL(0,x,r[1]),i=0,f=u[2],o=u[1];return C2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},LE0=0,ME0=function(x){var r=Ez(x),e=r[3],t=r[2],u=gL(2,x,r[1]),i=2,f=u[2],o=u[1];return C2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},DE0=0,jE0=function(x){var r=gz(x),e=r[3],t=r[2],u=gL(1,x,r[1]),i=1,f=u[2],o=u[1];return C2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},UE0=0,BE0=function(x){var r=_0(x);u0(x,25);var e=Fx(r,_0(x));u0(x,4);var t=l(px[7],x);u0(x,5);var u=c6(1,x),i=l(px[2],u),f=1-x[5],o=f&&y6(i);return o&&Qv(x,i[1]),[38,[0,t,i,y0([0,e],0,0)]]},YE0=0,XE0=function(x){var r=_0(x),e=l(px[7],x),t=K(x),u=e[2];if(u[0]===9&&typeof t=="number"&&t===86){var i=u[1],f=i[2][1],o=e[1];u0(x,86),p(T2[3],f,x[3])&&ux(x,[0,o,[21,Il0,f]]);var a=x[31],d=x[30],k=x[29],T=x[28],g=x[27],A=x[26],N=x[25],R=x[24],I=x[23],M=x[22],L=x[21],z=x[20],V=x[19],Z=x[18],$=x[17],i0=x[16],U=x[15],J=x[14],Y=x[13],F=x[12],n0=x[11],Q=x[10],f0=x[9],s0=x[8],v0=x[7],o0=x[6],c0=x[5],T0=x[4],E0=p(T2[4],f,x[3]),M0=[0,x[1],x[2],E0,T0,c0,o0,v0,s0,f0,Q,n0,F,Y,J,U,i0,$,Z,V,z,L,M,I,R,N,A,g,T,k,d,a],Y0=zo(M0)?xK(M0):l(px[2],M0);return[30,[0,i,Y0,y0([0,r],0,0)]]}var rx=n2(Ol0,0,x);if(rx[0]===0)var t0=e,ex=rx[1];else var g0=rx[1][2],H0=0,t0=p(g0,e,function(xx,ax){return p(Gx(xx,dn,78),xx,ax)}),ex=H0;return[22,[0,t0,0,y0(0,[0,ex],0)]]},JE0=0,VE0=function(x){var r=l(px[7],x),e=n2(Rl0,0,x);if(e[0]===0)var i=r,f=e[1];else var t=e[1][2],u=0,i=p(t,r,function(N,R){return p(Gx(N,dn,79),N,R)}),f=u;if(x[20]){var o=i[2];if(o[0]===13){var a=o[1][2],d=0;if(1i)switch(i-53|0){case 0:return l0([0,u],function(a){1-_1(a)&&zx(a,To);var d=l0(0,l(P6,0),a),k=[0,d[1],[29,d[2]]];return[21,[0,[0,k],0,0,0,y0([0,t],0,0)]]},e);case 8:if(pr(1,e)!==0)return l0([0,u],function(a){1-_1(a)&&zx(a,To);var d=pr(1,a);if(typeof d=="number"){if(d===48)return zx(a,21),u0(a,61),[21,[0,0,0,0,0,y0([0,t],0,0)]];if(c2===d){u0(a,61);var k=gx(a);u0(a,c2);var T=l(d3,a),g=T[1];return[21,[0,0,[0,[1,[0,k,0]]],[0,g],0,y0([0,t],[0,T[2]],0)]]}}var A=l0(0,l(g6,0),a),N=[0,A[1],[35,A[2]]];return[21,[0,[0,N],0,0,0,y0([0,t],0,0)]]},e);break;case 9:return l0([0,u],function(a){var d=l0(0,function(T){return l(p(A6,0,0),T)},a),k=[0,d[1],[36,d[2]]];return[21,[0,[0,k],0,0,0,y0([0,t],0,0)]]},e)}}else if(i===36)return l0([0,u],function(a){var d=Fx(t,_0(a)),k=l0(0,function(V){return u0(V,36)},a)[1],T=wV(1,a);if(zo(T))var g=0,A=[0,S6(T)];else if(a6(T))var g=0,A=[0,O9(T,x)];else if(K(T)===48)var g=0,A=[0,l(Az(0),T)];else if(hO(T))var g=0,A=[0,$O(T)];else{var N=l(px[10],T),R=n2(0,0,T);if(R[0]===0)var L=R[1],z=N;else var I=R[1][2],M=0,L=M,z=p(I,N,function($,i0){return p(Gx($,dn,97),$,i0)});var g=L,A=[1,z]}return[20,[0,k,A,y0([0,d],[0,g],0)]]},e)}if(a6(e))return l0([0,u],function(a){var d=O9(a,x);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(zo(e))return l0([0,u],function(a){l(r9(a),x);var d=S6(a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(typeof i=="number"){var f=i+ET|0;if(4>>0){if(f===24&&e[28][2])return l0([0,u],function(a){var d=p(px[3],[0,x],a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e)}else if(1>>0)return l0([0,u],function(a){var d=p(px[3],[0,x],a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e)}if(hO(e))return l0([0,u],function(a){var d=$O(a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(typeof i=="number"&&c2===i)return l0([0,u],function(a){var d=gx(a);u0(a,c2);var k=K(a),T=0;if(typeof k!="number"&&k[0]===4&&!P(k[3],vn)){Z0(a);var g=[0,S2(a)];T=1}if(!T)var g=0;var A=l(d3,a),N=A[1];return[21,[0,0,[0,[1,[0,d,g]]],[0,N],1,y0([0,t],[0,A[2]],0)]]},e);var o=o1(e,61)?0:1;return o1(e,0)?l0([0,u],function(a){var d=G0(U9,0,a,0);u0(a,1);var k=K(a),T=0;if(typeof k!="number"&&k[0]===4&&!P(k[3],al)){var g=l(d3,a),A=g[2],N=[0,g[1]];T=1}if(!T){p(PL,a,d);var R=n2(0,0,a),I=R[0]===0?R[1]:R[1][1],A=I,N=0}return[21,[0,0,[0,[0,d]],N,o,y0([0,t],[0,A],0)]]},e):(g1(fl0,e),p(px[3],[0,x],e))}),I0(CL,function(x){var r=x?x[1]:0;function e(u){1-_1(u)&&zx(u,sn);var i=_0(u);u0(u,60);var f=_V(1,Gs(1,u)),o=Fx(i,_0(f));u0(f,49);var a=K(f);if(typeof a=="number")switch(a){case 36:var d=Fx(o,_0(f)),k=l0(0,function(A0){return u0(A0,36)},f)[1],T=wV(1,f),g=K(T),A=0;if(typeof g=="number")switch(g){case 15:var N=0,R=N,I=[0,[1,l0(0,function(A0){return p(j9,0,A0)},T)]];A=1;break;case 40:var R=0,I=[0,[2,l0(0,l(M9,0),T)]];A=1;break}else if(g[0]===4&&!P(g[3],_o)&&T[28][1]){var R=0,I=[0,[3,l0(0,l(D9,0),T)]];A=1}if(!A){var M=to(T),L=n2(0,0,T);if(L[0]===0)var Z=L[1],$=M;else var z=L[1][2],V=0,Z=V,$=p(z,M,function(Q0,H){return p(Gx(Q0,Aa,98),Q0,H)});var R=Z,I=[0,[4,$]]}return[9,[0,[0,k],I,0,0,y0([0,d],[0,R],0)]];case 48:if(f[28][2]){var i0=bz[1],U=l0(0,function(A0){return p(i0,0,A0)},f);return[9,[0,0,[0,[8,U]],0,0,y0([0,o],0,0)]]}break;case 53:if(r){var J=l0(0,l(P6,0),f);return[9,[0,0,[0,[7,J]],0,0,y0([0,o],0,0)]]}break;case 61:if(r){var Y=l0(0,l(g6,0),f);return[9,[0,0,[0,[5,Y]],0,0,y0([0,o],0,0)]]}break;case 62:var F=l0(0,p(A6,ul0,0),f);return[9,[0,0,[0,[6,F]],0,0,y0([0,o],0,0)]];case 106:var n0=gx(f);u0(f,c2);var Q=K(f),f0=0;if(typeof Q!="number"&&Q[0]===4&&!P(Q[3],vn)){Z0(f);var s0=[0,p(px[13],0,f)];f0=1}if(!f0)var s0=0;var v0=l(d3,f),o0=v0[1];return[9,[0,0,0,[0,[1,[0,n0,s0]]],[0,o0],y0([0,o],[0,v0[2]],0)]];case 15:case 24:case 27:case 28:case 40:var c0=K(f);if(typeof c0=="number"){var T0=0;if(24<=c0){if(41>c0){var E0=0;switch(c0+ET|0){case 0:var M0=[0,[0,l0(0,function(A0){return G0(C6,0,A0,0)},f)]];break;case 3:var M0=[0,[0,l0(0,function(A0){return G0(C6,2,A0,0)},f)]];break;case 4:var M0=[0,[0,l0(0,function(A0){return G0(C6,1,A0,0)},f)]];break;case 16:var M0=[0,[2,l0(0,l(M9,0),f)]];break;default:E0=1}if(!E0){var Y0=M0;T0=1}}}else if(c0===15){var Y0=[0,[1,l0(0,function(U0){return p(j9,0,U0)},f)]];T0=1}if(T0)return[9,[0,0,Y0,0,0,y0([0,o],0,0)]]}throw q0([0,wr,il0],1)}else if(a[0]===4&&!P(a[3],_o)&&f[28][1]){var rx=[0,[3,l0(0,l(D9,0),f)]];return[9,[0,0,rx,0,0,y0([0,o],0,0)]]}var g0=K(f),H0=0;typeof g0=="number"?g0===53?zx(f,15):g0===61?zx(f,16):H0=1:H0=1,u0(f,0);var t0=G0(U9,0,f,0);u0(f,1);var ex=K(f),xx=0;if(typeof ex!="number"&&ex[0]===4&&!P(ex[3],al)){var ax=l(d3,f),dx=ax[2],mx=[0,ax[1]];xx=1}if(!xx){p(PL,f,t0);var L0=n2(0,0,f),C0=L0[0]===0?L0[1]:L0[1][1],dx=C0,mx=0}return[9,[0,0,0,[0,[0,t0]],mx,y0([0,o],[0,dx],0)]]}var t=0;return function(u){return l0(t,e,u)}});var AK=function x(r,e){return x.fun(r,e)},PK=function x(r,e){return x.fun(r,e)},O6=function x(r,e){return x.fun(r,e)},X9=function(x,r){return function(e){if(!e)return Ax(r);var t=e[1];if(t[0]!==0){var u=t[1],i=u[1];if(e[2]){var f=e[2];return ux(x,[0,i,69]),l(X9(x,r),f)}var o=u[2],a=o[2];return l(X9(x,[0,[1,[0,i,[0,p(O6,x,o[1]),a]]],r]),0)}var d=t[1],k=d[2],T=e[2],g=d[1];switch(k[0]){case 0:var A=k[2],N=k[1],R=k[3];switch(N[0]){case 0:var I=[0,N[1]];break;case 1:var I=[1,N[1]];break;case 2:var I=[2,N[1]];break;case 3:var I=[3,N[1]];break;case 4:var I=Nx(Kl0);break;default:var I=[4,N[1]]}var M=A[2],L=0;if(M[0]===3){var z=M[1];if(!z[1]){var V=[0,z[3]],Z=z[2];L=1}}if(!L)var V=0,Z=p(O6,x,A);var $=[0,[0,[0,g,[0,I,Z,V,R]]],r];break;case 1:ux(x,[0,k[2][1],55]);var $=r;break;default:ux(x,[0,k[2][1],Zl0]);var $=r}return l(X9(x,$),T)}};I0(AK,function(x,r){var e=r[2],t=e[2],u=e[1],i=r[1],f=s3(x);return[0,i,[0,[0,l(X9(x,0),u),f,t]]]});var CK=function(x,r){var e=r[1];return l(px[23],r)?[0,p(O6,x,r)]:(ux(x,[0,e,41]),0)},y3=function(x,r){return function(e){if(!e)return Ax(r);var t=e[1];switch(t[0]){case 0:var u=t[1],i=u[2];if(i[0]===3){var f=i[1];if(!f[1]){var o=e[2];return l(y3(x,[0,[0,[0,u[1],[0,f[2],[0,f[3]]]]],r]),o)}}var a=e[2],d=CK(x,u);if(d)var k=d[1],T=[0,[0,[0,k[1],[0,k,0]]],r];else var T=r;return l(y3(x,T),a);case 1:var g=t[1],A=g[1];if(e[2]){var N=e[2];return ux(x,[0,A,20]),l(y3(x,r),N)}var R=g[2],I=R[2],M=CK(x,R[1]),L=M?[0,[1,[0,A,[0,M[1],I]]],r]:r;return l(y3(x,L),0);default:var z=e[2];return l(y3(x,[0,[2,t[1]],r]),z)}}};I0(PK,function(x,r){var e=r[2],t=e[2],u=e[1],i=r[1],f=s3(x);return[0,i,[1,[0,l(y3(x,0),u),f,t]]]}),I0(O6,function(x,r){var e=r[2],t=r[1];switch(e[0]){case 0:return p(PK,x,[0,t,e[1]]);case 9:var u=e[1],i=u[2][1],f=u[1],o=0;if(x[5]&&$v(i)?ux(x,[0,f,76]):o=1,o&&1-x[5]){var a=0;if(x[18]&&Ar(i,Y2)?ux(x,[0,f,Ri]):a=1,a){var d=x[19],k=d&&Ar(i,Pv);k&&ux(x,[0,f,6])}}return[0,t,[2,[0,u,s3(x),0]]];case 24:return p(AK,x,[0,t,e[1]]);default:return[0,t,[3,[0,t,e]]]}});var L6=function(x,r){var e=K(x);if(typeof e=="number"){if(e===6)return l0(0,function(i){var f=_0(i);u0(i,6);for(var o=0;;){var a=K(i);if(typeof a=="number"){var d=0;if(13<=a)Nr===a&&(d=1);else if(7<=a)switch(a-7|0){case 0:d=1;break;case 2:var k=gx(i);u0(i,9);var o=[0,[2,k],o];continue;case 5:var T=_0(i),g=l0(0,function(U){return u0(U,12),L6(U,r)},i),A=g[1],N=g[2],R=[1,[0,A,[0,N,y0([0,T],0,0)]]];K(i)!==7&&(ux(i,[0,A,20]),K(i)===9&&Z0(i));var o=[0,R,o];continue}if(d){var I=Ax(o),M=_0(i);u0(i,7);var L=K(i)===86?[1,qv(i)]:s3(i);return[1,[0,I,L,J1([0,f],[0,yx(i)],M,0)]]}}var z=l0(0,function(i0){var U=L6(i0,r),J=K(i0),Y=0;if(typeof J=="number"&&J===82){u0(i0,82);var F=[0,l(px[10],i0)];Y=1}if(!Y)var F=0;return[0,U,F]},i),V=z[2],Z=[0,[0,z[1],[0,V[1],V[2]]]];K(i)!==7&&u0(i,9);var o=[0,Z,o]}},x);if(!e){var t=function(i){var f=K(i);return typeof f=="number"&&f===82?(u0(i,82),[0,l(px[10],i)]):0};return l0(0,function(i){var f=_0(i);u0(i,0);for(var o=0,a=0,d=0;;){var k=K(i);if(typeof k=="number"){var T=0;if(k!==1&&Nr!==k&&(T=1),!T){a&&ux(i,[0,a[1],95]);var g=Ax(d),A=_0(i);u0(i,1);var N=yx(i),R=K(i)===86?[1,qv(i)]:s3(i);return[0,[0,g,R,J1([0,f],[0,N],A,0)]]}}if(K(i)===12)var I=_0(i),M=l0(0,function(mx){return u0(mx,12),L6(mx,r)},i),L=M[2],z=M[1],V=[0,[1,[0,z,[0,L,y0([0,I],0,0)]]]];else{var Z=gx(i),$=p(px[20],0,i),i0=K(i),U=0;if(typeof i0=="number"&&i0===86){u0(i,86);var J=l0([0,Z],function(L0){var C0=L6(L0,r);return[0,C0,t(L0)]},i),Y=J[2],F=$[2],n0=Y[2],Q=Y[1],f0=J[1];switch(F[0]){case 0:var s0=[0,F[1]];break;case 1:var s0=[1,F[1]];break;case 2:var s0=[2,F[1]];break;case 3:var s0=[3,F[1]];break;case 4:var s0=Nx(Vl0);break;default:var s0=[4,F[1]]}var V=[0,[0,[0,f0,[0,s0,Q,n0,0]]]]}else U=1;if(U){var v0=$[2];if(v0[0]===3){var o0=v0[1],c0=o0[2][1],T0=o0[1];by(c0)?ux(i,[0,T0,ot]):i3(c0)&&yt(i,[0,T0,85]);var E0=l0([0,Z],function(L0,C0){return function(A0){var U0=[0,C0,[2,[0,L0,s3(A0),0]]];return[0,U0,t(A0)]}}(o0,T0),i),M0=E0[2],V=[0,[0,[0,E0[1],[0,[3,o0],M0[1],M0[2],1]]]]}else{g1(zl0,i);var V=0}}}if(V){var Y0=V[1],rx=Y0[1][1],g0=o?(ux(i,[0,rx,69]),0):a;if(Y0[0]===0)var t0=g0,ex=o;else var H0=K(i)===9?[0,gx(i)]:0,t0=H0,ex=1;K(i)!==1&&u0(i,9);var o=ex,a=t0,d=[0,Y0,d]}}},x)}}var u=G0(px[14],x,0,r);return[0,u[1],[2,u[2]]]},J9=function(x){var r=K(x);if(typeof r=="number"){var e=r+OB|0,t=0;if(6>>0?e===14&&(t=1):4>>0&&(t=1),t)return yx(x)}return Z2(x)?Ko(x):0},NK=function(x){return K(x)===1?0:[0,l(px[7],x)]},uo=function(x){var r=gx(x),e=K(x),t=0;if(typeof e!="number"&&e[0]===8){var u=e[1];t=1}if(!t){g1(Gl0,x);var u=bl0}var i=_0(x);Z0(x);var f=K(x),o=0;if(typeof f=="number"){var a=f+XD|0,d=0;if(72>>0?a===76&&(d=1):70>>0&&(d=1),d){var k=yx(x);o=1}}if(!o)var k=J9(x);return[0,r,[0,u,y0([0,i],[0,k],0)]]},RK=function(x){var r=pr(1,x);if(typeof r=="number"){if(r===10)for(var e=l0(0,function(i){var f=[0,uo(i)];return u0(i,10),[0,f,uo(i)]},x);;){var t=K(x);if(typeof t=="number"&&t===10){var u=e[1],e=l0([0,u],function(f){return function(o){return u0(o,10),[0,[1,f],uo(o)]}}(e),x);continue}return[2,e]}if(r===86)return[1,l0(0,function(i){var f=uo(i);return u0(i,86),[0,f,uo(i)]},x)]}return[0,uo(x)]},M6=function(x,r){return Ar(x[2][1],r[2][1])},IK=function(x,r){var e=x[2],t=e[1],u=r[2],i=u[1],f=0,o=e[2],a=u[2];if(t[0]===0){var d=t[1];if(i[0]===0)var T=M6(d,i[1]);else f=1}else{var k=t[1];if(i[0]===0)f=1;else var T=IK(k,i[1])}if(f)var T=0;return T&&M6(o,a)},V9=function(x,r){switch(x[0]){case 0:var e=x[1];if(r[0]===0)return M6(e,r[1]);break;case 1:var t=x[1];if(r[0]===1){var u=t[2],i=r[1][2],f=u[2],o=i[2],a=M6(u[1],i[1]);return a&&M6(f,o)}break;default:var d=x[1];if(r[0]===2)return IK(d,r[1])}return 0},OL=function(x){switch(x[0]){case 0:return x[1][1];case 1:return x[1][1];default:return x[1][1]}},OK=function x(r,e){return x.fun(r,e)},LL=function x(r,e){return x.fun(r,e)},ML=function x(r,e){return x.fun(r,e)};I0(OK,function(x,r){var e=K(r);if(typeof e=="number"){if(e===0){V1(r,0);var t=l0(0,function(g){u0(g,0);var A=K(g),N=0;if(typeof A=="number"&&A===12){var R=_0(g);u0(g,12);var I=l(px[10],g),z=[3,[0,I,y0([0,R],0,0)]];N=1}if(!N)var M=NK(g),L=M?0:_0(g),z=[2,[0,M,J1(0,0,L,0)]];return u0(g,1),z},r),u=t[2],i=t[1];return $1(r),[0,i,u]}}else if(e[0]===9){var f=e[3],o=e[2],a=e[1];return u0(r,e),[0,a,[4,[0,o,f]]]}var d=p(ML,x,r),k=d[2],T=d[1];return un<=k[1]?[0,T,[1,k[2]]]:[0,T,[0,k[2]]]});var z9=function(x){switch(x[0]){case 0:return x[1][2][1];case 1:var r=x[1][2],e=r[1],t=Qx(Wl0,r[2][2][1]);return Qx(e[2][1],t);default:var u=x[1][2],i=u[1],f=u[2],o=i[0]===0?i[1][2][1]:z9([2,i[1]]);return Qx(o,Qx($l0,f[2][1]))}};I0(LL,function(x,r){var e=_0(r),t=l0(0,function(Cr){u0(Cr,98);var u2=K(Cr);if(typeof u2=="number"){if(u2===99)return Z0(Cr),Fl0}else if(u2[0]===8){var w=RK(Cr),x0=0;if(_1(Cr)&&K(Cr)===98&&ct!==pr(1,Cr)){var e0=t9(Cr,0,A9);x0=1}if(!x0)var e0=0;for(var S0=0;;){var G=K(Cr);if(typeof G=="number"){if(G===0){var k0=_0(Cr);V1(Cr,0);var J0=l0(0,function($x){u0($x,0),u0($x,12);var er=l(px[10],$x);return u0($x,1),er},Cr),O0=J0[2],ix=J0[1];$1(Cr);var S0=[0,[1,[0,ix,[0,O0,y0([0,k0],[0,J9(Cr)],0)]]],S0];continue}}else if(G[0]===8){var S0=[0,[0,l0(0,function($x){var er=pr(1,$x),Zx=0;if(typeof er=="number"&&er===86){var Lr=[1,l0(0,function(ke){var Pn=uo(ke);return u0(ke,86),[0,Pn,uo(ke)]},$x)];Zx=1}if(!Zx)var Lr=[0,uo($x)];var Yx=K($x),ie=0;if(typeof Yx=="number"&&Yx===82){u0($x,82);var Ft=_0($x),E2=K($x),We=0;if(typeof E2=="number")if(E2===0){var fo=_0($x);V1($x,0);var gn=l0(0,function(ke){u0(ke,0);var Pn=NK(ke);return u0(ke,1),Pn},$x),ds=gn[1],me=gn[2];$1($x);var An=[0,me,J1([0,fo],[0,J9($x)],0,0)];An[1]||ux($x,[0,ds,52]);var Ht=[0,[1,[0,ds,An]]]}else We=1;else if(E2[0]===10){var $e=E2[3],qt=E2[2],dr=E2[1];u0($x,E2);var Ht=[0,[0,[0,dr,[0,qt,$e,y0([0,Ft],[0,J9($x)],0)]]]]}else We=1;if(We){zx($x,40);var Ht=[0,[0,[0,gx($x),ql0]]]}var mt=Ht;ie=1}if(!ie)var mt=0;return[0,Lr,mt]},Cr)],S0];continue}var Wx=Ax(S0),Bx=[0,wo,[0,w,e0,o1(Cr,ct),Wx]];return o1(Cr,99)?[0,Bx]:(xo(Cr,99),[1,Bx])}}return xo(Cr,99),Hl0},r);$1(r);var u=t[2];if(u[0]===0)var i=u[1],f=typeof i=="number"?0:i[2][3];else var f=1;if(f)var o=XA,a=o,d=l0(0,function(Cr){return 0},r);else{V1(r,3);for(var k=t[2][1],T=typeof k=="number"?0:[0,k[2][1]],g=gx(r),A=0;;){var N=u3(r),R=0;if(A&&T){var I=A[1],M=I[2],L=0,z=T[1],V=A[2];if(M[0]===0){var Z=M[1],$=Z[2];if($)var i0=$[1][2][1],U=1-V9(Z[1][2][1],i0),J=U&&V9(z,i0);else L=1}else L=1;if(L)var J=0;if(J){var Y=I[2],F=0;if(Y[0]===0){var n0=Y[1],Q=n0[2];if(Q){var f0=Q[1],s0=Fr(I[1],n0[3][1]),v0=[0,wo,f0],o0=[0,s0,[0,[0,n0[1],0,n0[3],n0[4]]]];F=1}}if(!F)var v0=XA,o0=I;$1(r);var c0=[0,Ax([0,o0,V]),N,v0];R=1}}if(!R){var T0=K(r),E0=0;if(typeof T0=="number"){if(T0===98){V1(r,2);var M0=K(r),Y0=pr(1,r),rx=0;if(typeof M0=="number"&&M0===98&&typeof Y0=="number"){var g0=0;if((ct===Y0||Nr===Y0)&&(g0=1),g0){var H0=l0(0,function(x0){u0(x0,98),u0(x0,ct);var e0=K(x0);if(typeof e0=="number"){if(e0===99)return Z0(x0),un}else if(e0[0]===8){var S0=RK(x0);return e9(x0,99),[0,wo,[0,S0]]}return xo(x0,99),un},r),t0=H0[2],ex=H0[1],xx=typeof t0=="number"?[0,un,ex]:[0,wo,[0,ex,t0[2]]],ax=r[24][1],dx=0;if(ax){var mx=ax[2];if(mx){var L0=mx[2];dx=1}}if(!dx)var L0=Nx(Ts0);r[24][1]=L0;var C0=n3(r),A0=i6(r[25][1],C0);r[26][1]=A0;var c0=[0,Ax(A),N,xx];E0=1,rx=1}}if(!rx){var U0=p(LL,T,r),Q0=U0[2],H=U0[1],b=un<=Q0[1]?[0,H,[1,Q0[2]]]:[0,H,[0,Q0[2]]],A=[0,b,A];continue}}else if(Nr===T0){g1(0,r);var c0=[0,Ax(A),N,XA];E0=1}}if(!E0){var A=[0,p(OK,T,r),A];continue}}var B=c0[3],a0=c0[1],m0=N?N[1]:g,a=B,d=[0,Fr(g,m0),a0];break}}var P0=yx(r),D=0;if(typeof a!="number"){var N0=a[1],X0=0;if(wo===N0){var D0=a[2],ox=D0[2][1],b0=t[2],kx=D0[1];if(b0[0]===0){var V0=b0[1];if(typeof V0=="number")ux(r,[0,OL(ox),Ql0]);else{var h=V0[2][1];if(1-V9(ox,h)){var X=0;if(x&&V9(x[1],ox)){var W0=[19,z9(h)];ux(r,[0,OL(h),W0]),X=1}if(!X){var sx=[13,z9(h)];ux(r,[0,OL(ox),sx])}}}}var tx=kx;X0=1}else if(un===N0){var j0=a[2],Px=t[2];if(Px[0]===0){var Ex=Px[1];typeof Ex!="number"&&ux(r,[0,j0,[13,z9(Ex[2][1])]])}var tx=j0;X0=1}if(X0){var Ox=tx;D=1}}if(!D)var Ox=t[1];var qx=t[2][1],B0=t[1];if(typeof qx=="number"){var rr=0,Ux=y0([0,e],[0,P0],0);if(typeof a!="number"){var K0=a[1],nr=0;if(wo===K0){var z0=a[2][1];nr=1}else if(un===K0){var z0=a[2];nr=1}if(nr){var or=z0;rr=1}}if(!rr)var or=Ox;var jr=[0,un,[0,B0,or,d,Ux]]}else{var lx=qx[2],v1=0,K1=y0([0,e],[0,P0],0);if(typeof a!="number"&&wo===a[1]){var w1=[0,a[2]];v1=1}if(!v1)var w1=0;var jr=[0,wo,[0,[0,B0,lx],w1,d,K1]]}return[0,Fr(t[1],Ox),jr]}),I0(ML,function(x,r){return V1(r,2),p(LL,x,r)});var LK=function(x,r){var e=S2(r);return u9(x,r,e),e},MK=function x(r){return x.fun(r)},DL=function x(r,e,t){return x.fun(r,e,t)},jL=function x(r){return x.fun(r)},DK=function x(r,e){return x.fun(r,e)},UL=function x(r,e){return x.fun(r,e)},BL=function x(r,e){return x.fun(r,e)},K9=function x(r,e){return x.fun(r,e)},D6=function x(r,e){return x.fun(r,e)},Z9=function x(r){return x.fun(r)},jK=function x(r){return x.fun(r)},UK=function x(r){return x.fun(r)},BK=function x(r,e,t){return x.fun(r,e,t)},YK=function x(r){return x.fun(r)},XK=function x(r){return x.fun(r)},$E0=l(ML,0);I0(MK,function(x){var r=K(x),e=0;if(typeof r!="number"&&r[0]===6){var t=r[2],u=r[1];Z0(x);var i=[0,[0,u,t]];e=1}if(!e)var i=0;var f=_0(x),o=Ax(f),a=5;x:for(;;){if(o)for(var d=o[2],k=o[1],T=k[2],g=k[1],A=T[2],N=0,R=Xx(A);;){if(R<(N+5|0))var I=0;else{var M=Ar(k2(A,N,a),"@flow");if(!M){var N=N+1|0;continue}var I=M}if(!I){var o=d;continue x}x[31][1]=g[3];var L=Ax([0,[0,g,T],d]);break}else var L=0;if(L===0){var z=0;if(f){var V=f[1],Z=V[2];if(!Z[1]){var $=Z[2],i0=0,U=V[1];if(1<=Xx($)&&O1($,0)===42){x[31][1]=U[3];var J=[0,V,0];z=1}else i0=1}}if(!z)var J=0}else var J=L;var Y=p(DK,x,function(v0){return 0}),F=gx(x);u0(x,Nr);var n0=T2[1];if(r2(function(v0,o0){var c0=o0[2];switch(c0[0]){case 20:return m6(x,v0,wn(0,[0,c0[1][1],i60]));case 21:var T0=c0[1],E0=T0[1];if(E0){if(!T0[2]){var M0=E0[1],Y0=M0[2],rx=0,g0=M0[1];switch(Y0[0]){case 37:var H0=Y0[1][1],t0=0,ex=r2(function(C0,A0){return r2(gO,C0,[0,A0[2][1],0])},t0,H0);return r2(function(C0,A0){return m6(x,C0,A0)},v0,ex);case 2:case 26:var xx=Y0[1][1];if(xx)var ax=xx[1];else rx=1;break;case 3:case 19:case 29:case 35:case 36:var ax=Y0[1][1];break;default:rx=1}return rx?v0:m6(x,v0,wn(0,[0,g0,ax[2][1]]))}}else{var dx=T0[2];if(dx){var mx=dx[1];if(mx[0]!==0)return v0;var L0=mx[1];return r2(function(C0,A0){var U0=A0[2],Q0=U0[2],H=U0[1];return Q0?m6(x,C0,Q0[1]):m6(x,C0,H)},v0,L0)}}return v0;default:return v0}},n0,Y),Y)var Q=Yl(Ax(Y))[1],f0=Fr(Yl(Y)[1],Q);else var f0=F;var s0=Ax(x[2][1]);return[0,f0,[0,Y,i,y0([0,J],0,0),s0]]}});var QE0=function(x,r,e,t){for(var u=x,i=t;;){var f=i[3],o=i[2],a=i[1],d=K(u);if(typeof d=="number"&&Nr===d)return[0,u,a,o,f];if(l(r,d))return[0,u,a,o,f];if(typeof d!="number"&&d[0]===2){var k=l(e,u),T=[0,k,o],g=k[2];if(g[0]===22){var A=g[1][2];if(A){var N=Ar(A[1],"use strict"),R=k[1],I=N&&1-u[21];I&&ux(u,[0,R,84]);var M=N?Gs(1,u):u,L=[0,d,a],z=f||N,u=M,i=[0,L,T,z];continue}}return[0,u,a,T,f]}return[0,u,a,o,f]}};I0(DL,function(x,r,e){var t=QE0(hV(1,x),r,e,t60),u=t[4],i=t[3],f=t[2],o=hV(0,t[1]),a=Ax(f);return C2(function(d){if(typeof d!="number"&&d[0]===2){var k=d[1],T=k[4],g=k[1];return T&&yt(o,[0,g,81])}return Nx(Qx(u60,Qx(UJ(d),n60)))},a),[0,o,i,u]}),I0(jL,function(x){var r=kL(x),e=K(x);if(typeof e=="number"){var t=e-49|0;if(11>=t>>>0)switch(t){case 0:return p(hK,r,x);case 1:l(r9(x),r);var u=pr(1,x),i=0;if(typeof u=="number"){var f=0;if((u===4||u===10)&&(f=1),f){var o=R6(x);i=1}}if(!i)var o=IL(x);return o;case 11:if(pr(1,x)===49)return l(r9(x),r),p(CL,0,x);break}}return p(D6,[0,r],x)}),I0(DK,function(x,r){var e=G0(DL,x,r,jL),t=e[2],u=p(UL,r,e[1]);return r2(function(i,f){return[0,f,i]},u,t)}),I0(UL,function(x,r){for(var e=0;;){var t=K(r);if(typeof t=="number"&&Nr===t||l(x,t))return Ax(e);var e=[0,l(jL,r),e]}}),I0(BL,function(x,r){var e=G0(DL,r,x,function(f){return p(D6,0,f)}),t=e[3],u=e[2],i=p(K9,x,e[1]);return[0,r2(function(f,o){return[0,o,f]},i,u),t]}),I0(K9,function(x,r){for(var e=0;;){var t=K(r);if(typeof t=="number"&&Nr===t||l(x,t))return Ax(e);var e=[0,p(D6,0,r),e]}}),I0(D6,function(x,r){var e=x?x[1]:0;1-a6(r)&&l(r9(r),e);var t=K(r);if(typeof t=="number"){if(t===27)return l0(DE0,ME0,r);if(t===28)return l0(UE0,jE0,r)}if(zo(r))return S6(r);if(a6(r))return O9(r,e);if(typeof t=="number"){var u=t+Z1|0;if(14>=u>>>0)switch(u){case 0:if(r[28][2])return l(Az(0),r);break;case 5:return l(vK,r);case 12:return p(AL,0,r);case 13:return l(fK,r);case 14:return l(sK,r)}}return hO(r)?$O(r):l(Z9,r)}),I0(Z9,function(x){var r=K(x);if(typeof r=="number"&&st>r)switch(r){case 0:return l(uK,x);case 8:return l(rK,x);case 16:return TK(x);case 19:return l0(gE0,EE0,x);case 20:return l0(PE0,AE0,x);case 22:return l0(NE0,CE0,x);case 23:return l0(IE0,RE0,x);case 24:return l0(LE0,OE0,x);case 25:return l0(YE0,BE0,x);case 26:return l(nK,x);case 32:return l(eK,x);case 35:return l(tK,x);case 37:return l0(kE0,mE0,x);case 39:return l0(_E0,hE0,x);case 43:return TK(x);case 59:return l0(yE0,dE0,x);case 113:return g1(x60,x),[0,gx(x),r60];case 1:case 5:case 7:case 9:case 10:case 11:case 12:case 17:case 18:case 33:case 34:case 36:case 38:case 41:case 42:case 49:case 83:case 86:return g1(e60,x),Z0(x),l(Z9,x)}if(zo(x)){var e=S6(x);return Qv(x,e[1]),e}if(typeof r=="number"&&r===28&&pr(1,x)===6){var t=o6(1,x);return ux(x,[0,Fr(gx(x),t),4]),R6(x)}return vs(x)?l0(JE0,XE0,x):(a6(x)&&(g1(0,x),Z0(x)),R6(x))}),I0(jK,function(x){var r=gx(x),e=l(Qt,x),t=K(x);return typeof t=="number"&&t===9?G0(N9,x,r,[0,e,0]):e}),I0(UK,function(x){var r=gx(x),e=l(p3,x),t=K(x);return typeof t=="number"&&t===9?[0,G0(N9,x,r,[0,a2(x,e),0])]:e}),I0(BK,function(x,r,e){var t=r?r[1]:0;return l0(0,function(u){var i=1-t,f=LK([0,e],u),o=i&&(K(u)===85?1:0);return o&&(1-_1(u)&&zx(u,xe),u0(u,85)),[0,f,XO(u),o]},x)}),I0(YK,function(x){var r=gx(x),e=_0(x);u0(x,0);var t=p(K9,function(o){return o===1?1:0},x),u=gx(x),i=t===0?_0(x):0;u0(x,1);var f=[0,t,J1([0,e],[0,yx(x)],i,0)];return[0,Fr(r,u),f]}),I0(XK,function(x){function r(t){var u=_0(t);u0(t,0);var i=p(BL,function(A){return A===1?1:0},t),f=i[1],o=i[2],a=f===0?_0(t):0;u0(t,1);var d=K(t),k=0;if(!x){var T=0;if((typeof d!="number"||d!==1&&Nr!==d)&&(T=1),T)if(Z2(t)){var g=Ko(t);k=1}else{var g=0;k=1}}if(!k)var g=yx(t);return[0,[0,f,J1([0,u],[0,g],a,0)],o]}var e=0;return function(t){return i9(e,r,t)}}),xJ(o60[1],px,[0,MK,Z9,D6,K9,BL,UL,jK,UK,Iz,Qt,g9,sE0,LK,BK,YK,XK,$E0,L6,O6,$o,O9,pE0,rE0,P9,qv,C9]);var YL=[qr,PT0,Js(0)],XL=[0,YL,[0]],FE0=my(AT0,function(x){var r=BI(x,gT0)[41],e=VI(x,0,0,ET0,FI,1)[1];return GX(x,r,function(t,u){return 0}),function(t,u){var i=ky(u,x);return l(e,i),zI(u,i,x)}}),HE0=Dv(XL)===qr?XL:XL[1];nI(XE,HE0);var io=p0,O2=null,JK=void 0,qE0=function(x){throw x},W9=function(x){return x!==JK?1:0};io.String,io.RegExp,io.Object,io.Date,io.Math;var GE0=io.Array,bE0=io.Error,VK=function(x){return l(qE0,x)};io.JSON,CX(function(x){return x[1]===YL?[0,Yt(x[2].toString())]:0}),CX(function(x){return x instanceof GE0?0:[0,Yt(x.toString())]});var zK=[0,0],xg0=xr,ps=function(x){return qZ(Vl(x))},z1=function(x){return HZ(Vl(x))},Rr=function(x,r){return z1(Ax(iy(x,r)))},Mx=function(x,r){return r?l(x,r[1]):O2},m3=function(x,r){return r[0]===0?O2:l(x,r[1])},KK=function(x){return ps([0,[0,ST0,x[1]],[0,[0,TT0,x[2]],0]])},ZK=function(x){var r=x[1],e=r?xr(r[1][1]):O2,t=[0,[0,hT0,KK(x[3])],0];return ps([0,[0,wT0,e],[0,[0,_T0,KK(x[2])],t]])},A1=function(x){if(!x)return 0;var r=x[1],e=r[1];return y0([0,e],[0,Fx(r[3],r[2])],0)},j6=function(x,r,e){var t=r[e];return W9(t)?t|0:x},rg0=function(x,r){var e=Nl(r,JK)?{}:r,t=Yt(x),u=j6(jl[5],e,NT0),i=j6(jl[4],e,RT0),f=j6(jl[3],e,IT0),o=j6(jl[2],e,OT0),a=[0,j6(jl[1],e,LT0),o,f,i,u,0,0],d=e[gD],k=W9(d),T=k&&d|0,g=e[rD],A=W9(g)?g|0:1,N=e.all_comments,R=W9(N)?N|0:1,I=[0,0],M=T?[0,function(po){return I[1]=[0,po,I[1]],0}]:0,L=CT0[1],z=0;try{var V=0,Z=pJ(t),$=V,i0=Z}catch(po){var U=L1(po);if(U!==Oo)throw q0(U,0);var J=[0,[0,[0,z,Za[2],Za[3]],54],0],$=J,i0=pJ(Rs0)}var Y=[0,z,i0,px0,0,a[4],LJ,dx0],F=[0,i6(Y,0)],n0=[0,[0,$],[0,0],T2[1],[0,0],a[5],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,[0,Os0],[0,Y],F,[0,M],a,z,[0,0],[0,Is0]],Q=l(px[1],n0),f0=Ax(n0[1][1]),s0=[0,EO[1],0],v0=Ax(r2(function(po,ua){var q=po[2],C=po[1];return p(EO[3],ua,C)?[0,C,q]:[0,p(EO[4],ua,C),[0,ua,q]]},s0,f0)[2]);if(v0){var o0=v0[2],c0=v0[1];if(L)throw q0([0,hS0,c0,o0],1)}zK[1]=0;for(var T0=Xx(t)-0|0,E0=xs(t),M0=0,Y0=0;;){if(Y0===T0)var rx=M0;else{var g0=oe(E0,Y0),H0=0;if(0<=g0&&!(Xr=g0){var t0=4;ax=1}if(!ax)var t0=0}}}if(t0===0){var M0=SO(M0,Y0,0),Y0=Y0+1|0;continue}if((T0-Y0|0)>=t0){var dx=t0-1|0,mx=Y0+t0|0;if(3>>0)throw q0([0,wr,tH],1);switch(dx){case 0:var L0=oe(E0,Y0);break;case 1:var L0=(oe(E0,Y0)&31)<<6|oe(E0,Y0+1|0)&63;break;case 2:var L0=(oe(E0,Y0)&15)<<12|(oe(E0,Y0+1|0)&63)<<6|oe(E0,Y0+2|0)&63;break;default:var L0=(oe(E0,Y0)&7)<<18|(oe(E0,Y0+1|0)&63)<<12|(oe(E0,Y0+2|0)&63)<<6|oe(E0,Y0+3|0)&63}var M0=SO(M0,Y0,[0,L0]),Y0=mx;continue}var rx=SO(M0,Y0,0)}for(var C0=Lv0,A0=Ax([0,6,rx]);;){var U0=C0[3],Q0=C0[2],H=C0[1];if(!A0){var b=Vl(Ax(U0));if(A)var a0=Q;else var B=l(FE0[1],0),a0=p(Gx(B,-201766268,99),B,Q);if(R)var P0=a0;else var m0=a0[2],P0=[0,a0[1],[0,m0[1],m0[2],m0[3],0]];var D=function(q,C,j,h0){var R0=[0,c9(b,C[3]),0],nx=[0,[0,v60,z1([0,c9(b,C[2]),R0])],0],Sx=Fx(nx,[0,[0,a60,ZK(C)],0]);if(j){var Dx=j[1],jx=Dx[1];if(jx){var bx=Dx[2];if(bx)var hr=[0,[0,l60,ks(bx)],0],cr=[0,[0,p60,ks(jx)],hr];else var cr=[0,[0,d60,ks(jx)],0];var sr=cr}else var lr=Dx[2],kr=lr?[0,[0,y60,ks(lr)],0]:0,sr=kr;var Er=sr}else var Er=0;return ps(us(Fx(Sx,Fx(Er,[0,[0,m60,xr(q)],0])),h0))},N0=function(q){return Rr(j0,q)},X0=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,Fm0,xr(gn(C[2]))],0];return D(qm0,R0,j,[0,[0,Hm0,Rr(ds,h0)],nx])},D0=function(q){var C=q[2],j=C[5],h0=C[4],R0=C[2],nx=C[1],Sx=q[1],Dx=[0,[0,a90,Rr(O0,C[3])],0],jx=[0,[0,l90,$e(0,h0)],Dx],bx=[0,[0,p90,Mx(l2,R0)],jx];return D(y90,Sx,j,[0,[0,d90,K0(nx)],bx])},ox=function(q,C){var j=C[2],h0=j[7],R0=j[5],nx=j[4],Sx=j[2],Dx=j[6],jx=j[3],bx=j[1],hr=C[1];if(nx)var cr=nx[1][2],lr=cr[2],kr=cr[1],sr=I2(cr[3],h0),Er=lr,Wr=[0,kr];else var sr=h0,Er=0,Wr=0;if(R0)var Vr=R0[1][2],x1=Vr[1],Ir=I2(Vr[2],sr),r1=Ir,a1=Rr(S0,x1);else var r1=sr,a1=z1(0);var T1=[0,[0,Ed0,a1],[0,[0,Sd0,Rr(e0,Dx)],0]],l1=[0,[0,gd0,Mx(he,Er)],T1],u1=[0,[0,Ad0,Mx(z0,Wr)],l1],i1=[0,[0,Pd0,Mx(l2,jx)],u1],p1=Sx[2],P1=p1[2],Q1=Sx[1],p2=[0,[0,Cd0,D(jd0,Q1,P1,[0,[0,Dd0,Rr(G,p1[1])],0])],i1];return D(q,hr,r1,[0,[0,Nd0,Mx(K0,bx)],p2])},b0=function(q,C){var j=C[2],h0=j[5],R0=j[4],nx=j[3],Sx=j[2],Dx=j[1],jx=C[1],bx=q?dd0:yd0,hr=[0,[0,md0,Mx(dr,R0)],0],cr=[0,[0,kd0,Mx(dr,nx)],hr],lr=[0,[0,hd0,Mx(l2,Sx)],cr];return D(bx,jx,h0,[0,[0,_d0,K0(Dx)],lr])},kx=function(q){var C=q[2],j=C[4],h0=C[2],R0=C[1],nx=q[1],Sx=[0,[0,vd0,dr(C[3])],0],Dx=[0,[0,ad0,Mx(l2,h0)],Sx];return D(pd0,nx,j,[0,[0,ld0,K0(R0)],Dx])},V0=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,F50,J0(C[2])],0];return D(q50,R0,j,[0,[0,H50,K0(h0)],nx])},h=function(q){var C=q[2],j=C[3],h0=q[1],R0=C[5],nx=C[4],Sx=C[2],Dx=C[1],jx=I2(A1(j[2][3]),R0),bx=j[2],hr=bx[1],cr=bx[2],lr=[0,[0,L50,Mx(l2,Sx)],0],kr=[0,[0,M50,oo(nx)],lr],sr=[0,[0,D50,w1(hr)],kr],Er=[0,[0,j50,Mx(u2,cr)],sr],Wr=[0,[0,U50,w1(hr)],Er];return D(Y50,h0,jx,[0,[0,B50,K0(Dx)],Wr])},X=function(q){var C=q[2],j=C[6],h0=C[4],R0=C[7],nx=C[5],Sx=C[3],Dx=C[2],jx=C[1],bx=q[1],hr=z1(h0?[0,O0(h0[1]),0]:0),cr=j?Rr(S0,j[1][2][1]):z1(0),lr=[0,[0,C50,hr],[0,[0,P50,cr],[0,[0,A50,Rr(O0,nx)],0]]],kr=[0,[0,N50,$e(0,Sx)],lr],sr=[0,[0,R50,Mx(l2,Dx)],kr];return D(O50,bx,R0,[0,[0,I50,K0(jx)],sr])},W0=function(q){var C=q[2],j=C[2],h0=C[1],R0=C[4],nx=C[3],Sx=q[1],Dx=Fr(h0[1],j[1]),jx=[0,[0,S50,Mx(lo,nx)],0];return D(g50,Sx,R0,[0,[0,E50,jr(Dx,[0,h0,[1,j],0])],jx])},sx=function(q){var C=q[2],j=C[2],h0=C[1],R0=C[4],nx=C[3],Sx=q[1],Dx=Fr(h0[1],j[1]),jx=[0,[0,_50,xr(gn(nx))],0];return D(T50,Sx,R0,[0,[0,w50,jr(Dx,[0,h0,[1,j],0])],jx])},tx=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,k50,N0(C[1])],0];return D(h50,h0,A1(j),R0)},j0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return tx([0,j,C[1]]);case 1:var h0=C[1],R0=h0[2];return D(g60,j,R0,[0,[0,E60,Mx(K0,h0[1])],0]);case 2:return ox(wd0,[0,j,C[1]]);case 3:var nx=C[1],Sx=nx[3],Dx=nx[6],jx=nx[5],bx=nx[4],hr=nx[2],cr=nx[1],lr=I2(A1(Sx[2][3]),Dx),kr=[0,[0,ly0,Mx(l2,hr)],0],sr=[0,[0,py0,oo(bx)],kr],Er=Sx[2],Wr=Er[2],Vr=Er[1];if(Wr)var x1=Wr[1],Ir=x1[2],r1=Ir[2],a1=x1[1],T1=D(_y0,a1,r1,[0,[0,hy0,ix(Ir[1])],0]),l1=z1(Ax([0,T1,iy(k0,Vr)]));else var l1=z1(_n(k0,Vr));var u1=[0,[0,yy0,K0(cr)],[0,[0,dy0,l1],sr]];return D(ky0,j,lr,[0,[0,my0,tx(jx)],u1]);case 4:var i1=C[1],p1=i1[2];return D(P60,j,p1,[0,[0,A60,Mx(K0,i1[1])],0]);case 5:return D(C60,j,C[1][1],0);case 6:return X([0,j,C[1]]);case 7:return h([0,j,C[1]]);case 8:return V0([0,j,C[1]]);case 9:var P1=C[1],Q1=P1[5],p2=P1[4],Hr=P1[3],Kx=P1[2],Yr=P1[1];if(Hr){var Mr=Hr[1];if(Mr[0]!==0&&!Mr[1][2])return D(R60,j,Q1,[0,[0,N60,Mx(B0,p2)],0])}if(Kx){var Dr=Kx[1];switch(Dr[0]){case 0:var $r=sx(Dr[1]);break;case 1:var $r=W0(Dr[1]);break;case 2:var $r=X(Dr[1]);break;case 3:var $r=h(Dr[1]);break;case 4:var $r=dr(Dr[1]);break;case 5:var $r=kx(Dr[1]);break;case 6:var $r=b0(1,Dr[1]);break;case 7:var $r=D0(Dr[1]);break;default:var $r=V0(Dr[1])}var I1=$r}else var I1=O2;var Qe=[0,[0,I60,Mx(B0,p2)],0],Fe=[0,[0,L60,I1],[0,[0,O60,x0(Hr)],Qe]],zr=Yr?1:0;return D(D60,j,Q1,[0,[0,M60,!!zr],Fe]);case 10:return W0([0,j,C[1]]);case 11:var i2=C[1],Gt=i2[5],He=i2[4],U1=i2[2],F1=i2[1],W2=[0,[0,G50,Rr(O0,i2[3])],0],_e=[0,[0,b50,$e(0,He)],W2],bt=[0,[0,xd0,Mx(l2,U1)],_e];return D(ed0,j,Gt,[0,[0,rd0,K0(F1)],bt]);case 12:var we=C[1],Te=we[1],ht=we[4],Se=we[3],$2=we[2],Ee=Te[0]===0?K0(Te[1]):B0(Te[1]),Q2=0,ge=Se?"ES":"CommonJS";return D(Y60,j,ht,[0,[0,B60,Ee],[0,[0,U60,tx($2)],[0,[0,j60,ge],Q2]]]);case 13:var _t=C[1],wt=_t[2];return D(J60,j,wt,[0,[0,X60,Zx(_t[1])],0]);case 14:var g2=C[1],L2=g2[4],F2=g2[2],Rn=g2[1],In=[0,[0,fd0,dr(g2[3])],0],xn=[0,[0,cd0,Mx(l2,F2)],In];return D(od0,j,L2,[0,[0,sd0,K0(Rn)],xn]);case 15:return b0(1,[0,j,C[1]]);case 16:return sx([0,j,C[1]]);case 17:var Tt=C[1],rn=Tt[3],On=Tt[1],Ae=[0,[0,V60,z0(Tt[2])],0];return D(K60,j,rn,[0,[0,z60,j0(On)],Ae]);case 18:return D(Z60,j,C[1][1],0);case 19:var qe=C[1],M2=qe[3],Ln=qe[1],St=[0,[0,s90,J0(qe[2])],0];return D(v90,j,M2,[0,[0,o90,K0(Ln)],St]);case 20:var Et=C[1],gt=Et[2],hs=Et[3],Mn=gt[0]===0?j0(gt[1]):z0(gt[1]);return D(Q60,j,hs,[0,[0,$60,Mn],[0,[0,W60,xr(w(1))],0]]);case 21:var H2=C[1],Ge=H2[5],Dn=H2[4],jn=H2[3],_s=H2[2],tv=H2[1];if(_s){var ia=_s[1];if(ia[0]!==0){var w3=ia[1][2],yo=[0,[0,F60,xr(w(Dn))],0],mo=[0,[0,H60,Mx(K0,w3)],yo];return D(G60,j,Ge,[0,[0,q60,Mx(B0,jn)],mo])}}var T3=[0,[0,b60,xr(w(Dn))],0],S3=[0,[0,x40,Mx(B0,jn)],T3],E3=[0,[0,r40,x0(_s)],S3];return D(t40,j,Ge,[0,[0,e40,Mx(j0,tv)],E3]);case 22:var ko=C[1],nv=ko[3],fa=ko[1],g3=[0,[0,n40,Mx(xg0,ko[2])],0];return D(i40,j,nv,[0,[0,u40,z0(fa)],g3]);case 23:var Un=C[1],A3=Un[5],Bn=Un[4],P3=Un[3],C3=Un[2],ca=Un[1],uv=function(Q6){return Q6[0]===0?X0(Q6[1]):z0(Q6[1])},N3=[0,[0,f40,j0(Bn)],0],R3=[0,[0,c40,Mx(z0,P3)],N3],iv=[0,[0,s40,Mx(z0,C3)],R3];return D(v40,j,A3,[0,[0,o40,Mx(uv,ca)],iv]);case 24:var At=C[1],ws=At[1],sa=At[5],oa=At[4],I3=At[3],en=At[2],Pe=ws[0]===0?X0(ws[1]):ix(ws[1]),Ts=[0,[0,l40,j0(I3)],[0,[0,a40,!!oa],0]];return D(y40,j,sa,[0,[0,d40,Pe],[0,[0,p40,z0(en)],Ts]]);case 25:var Yn=C[1],tn=Yn[1],Ce=Yn[5],ho=Yn[4],O3=Yn[3],L3=Yn[2],M3=tn[0]===0?X0(tn[1]):ix(tn[1]),D3=[0,[0,k40,j0(O3)],[0,[0,m40,!!ho],0]];return D(w40,j,Ce,[0,[0,_40,M3],[0,[0,h40,z0(L3)],D3]]);case 26:var fe=C[1],fv=fe[3],j3=fe[2],b9=fe[9],JL=fe[8],VL=fe[7],zL=fe[6],KL=fe[5],ZL=fe[4],WL=j3[2][4],$L=fe[1],QL=fv[0]===0?fv[1]:Nx(O80),FL=I2(A1(WL),b9),HL=[0,[0,L80,Mx(l2,JL)],0],qL=[0,[0,D80,!1],[0,[0,M80,Lr(VL)],HL]],GL=[0,[0,B80,!!ZL],[0,[0,U80,!!KL],[0,[0,j80,Mx(lo,zL)],qL]]],bL=[0,[0,Y80,tx(QL)],GL],xM=[0,[0,X80,Hx(j3)],bL];return D(V80,j,FL,[0,[0,J80,Mx(K0,$L)],xM]);case 27:var U3=C[1],xm=U3[3],rM=U3[4],eM=U3[2],tM=U3[1];if(xm)var rm=xm[1][2],em=j0(DS0(rm[1],rm[2]));else var em=O2;var nM=[0,[0,S40,j0(eM)],[0,[0,T40,em],0]];return D(g40,j,rM,[0,[0,E40,z0(tM)],nM]);case 28:var va=C[1],tm=va[4],nm=va[3],uM=va[5],iM=va[2],fM=va[1];if(tm){var J6=tm[1];if(J6[0]===0)var cM=J6[1],im=_n(function(F6){var Y3=F6[3],X3=F6[2],vm=F6[1],IM=X3?Fr(Y3[1],X3[1][1]):Y3[1],OM=X3?X3[1]:Y3,am=0,LM=0;if(vm){var H6=0;switch(vm[1]){case 0:var lm=fi;H6=1;break;case 1:var lm=Ps;H6=1;break}if(H6){var pm=lm;am=1}}if(!am)var pm=O2;var MM=[0,[0,eT0,K0(OM)],[0,[0,rT0,pm],LM]];return D(nT0,IM,0,[0,[0,tT0,K0(Y3)],MM])},cM);else var um=J6[1],sM=um[1],im=[0,D(xT0,sM,0,[0,[0,bw0,K0(um[2])],0]),0];var V6=im}else var V6=0;if(nm)var fm=nm[1][1],oM=[0,[0,qw0,K0(fm)],0],cm=[0,D(Gw0,fm[1],0,oM),V6];else var cm=V6;switch(fM){case 0:var z6=A40;break;case 1:var z6=P40;break;default:var z6=C40}var vM=[0,[0,R40,B0(iM)],[0,[0,N40,xr(z6)],0]];return D(O40,j,uM,[0,[0,I40,z1(cm)],vM]);case 29:return D0([0,j,C[1]]);case 30:var K6=C[1],aM=K6[3],lM=K6[1],pM=[0,[0,L40,j0(K6[2])],0];return D(D40,j,aM,[0,[0,M40,K0(lM)],pM]);case 31:var sm=C[1],dM=sm[2];return D(U40,j,dM,[0,[0,j40,Mx(z0,sm[1])],0]);case 32:var Z6=C[1],yM=Z6[3],mM=Z6[1],kM=[0,[0,B40,Rr(v1,Z6[2])],0];return D(X40,j,yM,[0,[0,Y40,z0(mM)],kM]);case 33:var om=C[1],hM=om[2];return D(V40,j,hM,[0,[0,J40,z0(om[1])],0]);case 34:var B3=C[1],_M=B3[4],wM=B3[2],TM=B3[1],SM=[0,[0,z40,Mx(tx,B3[3])],0],EM=[0,[0,K40,Mx(K1,wM)],SM];return D(W40,j,_M,[0,[0,Z40,tx(TM)],EM]);case 35:return kx([0,j,C[1]]);case 36:return b0(0,[0,j,C[1]]);case 37:return X0([0,j,C[1]]);case 38:var W6=C[1],gM=W6[3],AM=W6[1],PM=[0,[0,$40,j0(W6[2])],0];return D(F40,j,gM,[0,[0,Q40,z0(AM)],PM]);default:var $6=C[1],CM=$6[3],NM=$6[1],RM=[0,[0,H40,j0($6[2])],0];return D(G40,j,CM,[0,[0,q40,z0(NM)],RM])}},Px=function(q){var C=q[2],j=C[4],h0=C[3][2],R0=C[1],nx=q[1],Sx=[0,[0,pw0,D(Aw0,C[2],0,0)],0],Dx=[0,[0,dw0,Rr(ms,h0)],Sx];return D(mw0,nx,j,[0,[0,yw0,D(Sw0,R0,0,0)],Dx])},Ex=function(q){var C=q[2],j=C[1],h0=C[4],R0=C[2],nx=q[1],Sx=[0,[0,ow0,Rr(ms,C[3][2])],0],Dx=[0,[0,vw0,Mx(xa,R0)],Sx],jx=j[2],bx=jx[2],hr=jx[4],cr=jx[3],lr=jx[1],kr=j[1],sr=bx?[0,[0,kw0,Cn(bx[1])],0]:0,Er=[0,[0,_w0,Rr(bv,hr)],[0,[0,hw0,!!cr],0]];return D(lw0,nx,h0,[0,[0,aw0,D(Tw0,kr,0,Fx([0,[0,ww0,ao(lr)],Er],sr))],Dx])},Ox=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,Dm0,Rr(z0,C[2])],0];return D(Um0,R0,j,[0,[0,jm0,Rr(fo,h0)],nx])},qx=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j?wm0:Tm0;return D(gm0,R0,h0,[0,[0,Em0,!!j],[0,[0,Sm0,xr(nx)],0]])},B0=function(q){var C=q[2];return D(_m0,q[1],C[3],[0,[0,hm0,xr(C[1])],[0,[0,km0,xr(C[2])],0]])},rr=function(q){var C=q[2],j=C[2],h0=C[3],R0=q[1];return D(mm0,R0,h0,[0,[0,ym0,O2],[0,[0,dm0,xr(k2(j,0,Xx(j)-1|0))],[0,[0,pm0,xr(j)],0]]])},Ux=function(q){var C=q[2];return D(lm0,q[1],C[3],[0,[0,am0,C[1]],[0,[0,vm0,xr(C[2])],0]])},K0=function(q){var C=q[2];return D(t50,q[1],C[2],[0,[0,e50,xr(C[1])],[0,[0,r50,O2],[0,[0,x50,!1],0]]])},nr=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[9],nx=C[8],Sx=C[7],Dx=C[6],jx=C[5],bx=C[4],hr=h0[2][4],cr=C[1],lr=q[1],kr=j[0]===0?j[1]:Nx(z80),sr=I2(A1(hr),R0),Er=[0,[0,K80,Mx(l2,nx)],0],Wr=[0,[0,W80,!1],[0,[0,Z80,Lr(Sx)],Er]],Vr=[0,[0,F80,!!bx],[0,[0,Q80,!!jx],[0,[0,$80,Mx(lo,Dx)],Wr]]],x1=[0,[0,H80,tx(kr)],Vr],Ir=[0,[0,q80,Hx(h0)],x1];return D(b80,lr,sr,[0,[0,G80,Mx(K0,cr)],Ir])},z0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[2],nx=[0,[0,b40,Rr(We,h0[1])],0];return D(xp0,j,A1(R0),nx);case 1:var Sx=C[1],Dx=Sx[3],jx=Sx[2],bx=Sx[9],hr=Sx[8],cr=Sx[7],lr=Sx[6],kr=Sx[4],sr=jx[2][4];if(Dx[0]===0)var Er=0,Wr=tx(Dx[1]);else var Er=1,Wr=z0(Dx[1]);var Vr=I2(A1(sr),bx),x1=[0,[0,rp0,Mx(l2,hr)],0],Ir=[0,[0,tp0,!!Er],[0,[0,ep0,Lr(cr)],x1]],r1=[0,[0,fp0,Wr],[0,[0,ip0,!!kr],[0,[0,up0,!1],[0,[0,np0,Mx(lo,lr)],Ir]]]];return D(op0,j,Vr,[0,[0,sp0,O2],[0,[0,cp0,Hx(jx)],r1]]);case 2:var a1=C[1],T1=a1[3],l1=a1[1],u1=[0,[0,vp0,dr(a1[2][2])],0];return D(lp0,j,T1,[0,[0,ap0,z0(l1)],u1]);case 3:var i1=C[1],p1=i1[1],P1=i1[4],Q1=i1[3],p2=i1[2];if(p1){switch(p1[1]){case 0:var Hr=lq;break;case 1:var Hr=pq;break;case 2:var Hr=dq;break;case 3:var Hr=yq;break;case 4:var Hr=mq;break;case 5:var Hr=kq;break;case 6:var Hr=hq;break;case 7:var Hr=_q;break;case 8:var Hr=wq;break;case 9:var Hr=Tq;break;case 10:var Hr=Sq;break;case 11:var Hr=Eq;break;case 12:var Hr=gq;break;case 13:var Hr=Aq;break;default:var Hr=Pq}var Kx=Hr}else var Kx=pp0;var Yr=[0,[0,dp0,z0(Q1)],0];return D(kp0,j,P1,[0,[0,mp0,xr(Kx)],[0,[0,yp0,ix(p2)],Yr]]);case 4:var Mr=C[1],Dr=Mr[4],$r=Mr[2],I1=Mr[1],Qe=[0,[0,hp0,z0(Mr[3])],0],Fe=[0,[0,_p0,z0($r)],Qe];switch(I1){case 0:var zr=ZH;break;case 1:var zr=WH;break;case 2:var zr=$H;break;case 3:var zr=QH;break;case 4:var zr=FH;break;case 5:var zr=HH;break;case 6:var zr=qH;break;case 7:var zr=GH;break;case 8:var zr=bH;break;case 9:var zr=xq;break;case 10:var zr=rq;break;case 11:var zr=eq;break;case 12:var zr=tq;break;case 13:var zr=nq;break;case 14:var zr=uq;break;case 15:var zr=iq;break;case 16:var zr=fq;break;case 17:var zr=cq;break;case 18:var zr=sq;break;case 19:var zr=oq;break;case 20:var zr=vq;break;default:var zr=aq}return D(Tp0,j,Dr,[0,[0,wp0,xr(zr)],Fe]);case 5:var i2=C[1],Gt=i2[4],He=I2(A1(i2[3][2][2]),Gt);return D(Sp0,j,He,bo(i2));case 6:return ox(Td0,[0,j,C[1]]);case 7:var U1=C[1],F1=U1[4],W2=U1[2],_e=U1[1],bt=[0,[0,Ep0,z0(U1[3])],0],we=[0,[0,gp0,z0(W2)],bt];return D(Pp0,j,F1,[0,[0,Ap0,z0(_e)],we]);case 8:return nr([0,j,C[1]]);case 9:return K0(C[1]);case 10:var Te=C[1],ht=Te[2];return D(Np0,j,ht,[0,[0,Cp0,z0(Te[1])],0]);case 11:return Ex([0,j,C[1]]);case 12:return Px([0,j,C[1]]);case 13:return B0([0,j,C[1]]);case 14:return qx([0,j,C[1]]);case 15:return D(Mm0,j,C[1],[0,[0,Lm0,O2],[0,[0,Om0,_v],0]]);case 16:return Ux([0,j,C[1]]);case 17:return rr([0,j,C[1]]);case 18:var Se=C[1],$2=Se[2],Ee=Se[1],Q2=Se[4],ge=Se[3];try{var _t=new RegExp(xr(Ee),xr($2)),wt=_t}catch{var wt=O2}return D(Im0,j,Q2,[0,[0,Rm0,wt],[0,[0,Nm0,xr(ge)],[0,[0,Cm0,ps([0,[0,Pm0,xr(Ee)],[0,[0,Am0,xr($2)],0]])],0]]]);case 19:var g2=C[1];return B0([0,j,[0,g2[1],g2[5],g2[6]]]);case 20:var L2=C[1],F2=L2[4],Rn=L2[3],In=L2[2];switch(L2[1]){case 0:var xn=Rp0;break;case 1:var xn=Ip0;break;default:var xn=Op0}var Tt=[0,[0,Lp0,z0(Rn)],0];return D(jp0,j,F2,[0,[0,Dp0,xr(xn)],[0,[0,Mp0,z0(In)],Tt]]);case 21:var rn=C[1],On=rn[3];return D(Up0,j,On,xv(rn));case 22:var Ae=C[1],qe=Ae[3],M2=Ae[1],Ln=[0,[0,Bp0,K0(Ae[2])],0];return D(Xp0,j,qe,[0,[0,Yp0,K0(M2)],Ln]);case 23:var St=C[1],Et=St[4],gt=St[3],hs=St[2],Mn=St[1];if(gt)var H2=gt[1],Ge=I2(A1(H2[2][2]),Et),Dn=Ge,jn=lx(H2);else var Dn=Et,jn=z1(0);var _s=[0,[0,Vp0,Mx(Cn,hs)],[0,[0,Jp0,jn],0]];return D(Kp0,j,Dn,[0,[0,zp0,z0(Mn)],_s]);case 24:var tv=C[1],ia=tv[2],w3=[0,[0,Zp0,Rr(Yx,tv[1])],0];return D(Wp0,j,A1(ia),w3);case 25:var yo=C[1],mo=yo[1],T3=yo[3],S3=mo[4],E3=I2(A1(mo[3][2][2]),S3);return D(Qp0,j,E3,Fx(bo(mo),[0,[0,$p0,!!T3],0]));case 26:var ko=C[1],nv=ko[1],fa=nv[3],g3=[0,[0,Fp0,!!ko[3]],0];return D(Hp0,j,fa,Fx(xv(nv),g3));case 27:var Un=C[1],A3=Un[2];return D(Gp0,j,A3,[0,[0,qp0,Rr(z0,Un[1])],0]);case 28:return D(bp0,j,C[1][1],0);case 29:var Bn=C[1],P3=Bn[3],C3=Bn[1],ca=[0,[0,zm0,Ox(Bn[2])],0];return D(Zm0,j,P3,[0,[0,Km0,z0(C3)],ca]);case 30:return Ox([0,j,C[1]]);case 31:return D(x80,j,C[1][1],0);case 32:var uv=C[1],N3=uv[3],R3=uv[1],iv=[0,[0,r80,Zx(uv[2])],0];return D(t80,j,N3,[0,[0,e80,z0(R3)],iv]);case 33:var At=C[1],ws=At[2],sa=At[1];if(ws){var oa=At[3],I3=[0,[0,n80,dr(ws[1])],0];return D(i80,j,oa,[0,[0,u80,z0(sa)],I3])}var en=At[3];return D(c80,j,en,[0,[0,f80,z0(sa)],0]);case 34:var Pe=C[1],Ts=Pe[3],Yn=Pe[2],tn=Pe[1];if(7<=tn)return D(o80,j,Ts,[0,[0,s80,z0(Yn)],0]);switch(tn){case 0:var Ce=v80;break;case 1:var Ce=a80;break;case 2:var Ce=l80;break;case 3:var Ce=p80;break;case 4:var Ce=d80;break;case 5:var Ce=y80;break;case 6:var Ce=m80;break;default:var Ce=Nx(k80)}return D(T80,j,Ts,[0,[0,w80,xr(Ce)],[0,[0,_80,!0],[0,[0,h80,z0(Yn)],0]]]);case 35:var ho=C[1],O3=ho[4],L3=ho[3],M3=ho[2],D3=ho[1]?S80:E80;return D(C80,j,O3,[0,[0,P80,xr(D3)],[0,[0,A80,z0(M3)],[0,[0,g80,!!L3],0]]]);default:var fe=C[1],fv=fe[2],j3=[0,[0,N80,!!fe[3]],0];return D(I80,j,fv,[0,[0,R80,Mx(z0,fe[1])],j3])}},or=function(q){var C=q[2];return D(f50,q[1],C[2],[0,[0,i50,xr(C[1])],[0,[0,u50,O2],[0,[0,n50,!1],0]]])},jr=function(q,C){var j=C[1][2],h0=j[2],R0=j[1],nx=[0,[0,c50,!!C[3]],0];return D(v50,q,h0,[0,[0,o50,xr(R0)],[0,[0,s50,m3(Zx,C[2])],nx]])},lx=function(q){return Rr(E2,q[2][1])},v1=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,a50,Rr(j0,C[2])],0];return D(p50,R0,j,[0,[0,l50,Mx(z0,h0)],nx])},K1=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,d50,tx(C[2])],0];return D(m50,R0,j,[0,[0,y50,Mx(ix,h0)],nx])},w1=function(q){return z1(_n(function(C){var j=C[2];return Cr(0,j[3],C[1],[0,j[1]],j[2][2])},q))},Cr=function(q,C,j,h0,R0){if(h0)var nx=h0[1],Sx=nx[0]===0?Mx(K0,[0,nx[1]]):Mx(B0,[0,nx[1]]),Dx=Sx;else var Dx=Mx(K0,0);return D(Q50,j,q,[0,[0,$50,Dx],[0,[0,W50,dr(R0)],[0,[0,Z50,!!C],0]]])},u2=function(q){var C=q[2],j=C[4],h0=C[3],R0=C[2],nx=C[1],Sx=q[1];return Cr(j,h0,Sx,uy(function(Dx){return[0,Dx]},nx),R0)},w=function(q){return q?td0:nd0},x0=function(q){if(!q)return z1(0);var C=q[1];if(C[0]===0)return Rr(ea,C[1]);var j=C[1],h0=j[2],R0=j[1];return z1(h0?[0,D(id0,R0,0,[0,[0,ud0,K0(h0[1])],0]),0]:0)},e0=function(q){var C=q[2],j=C[2],h0=q[1];return D(Id0,h0,j,[0,[0,Rd0,z0(C[1])],0])},S0=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,Od0,Mx(he,C[2])],0];return D(Md0,h0,0,[0,[0,Ld0,K0(j)],R0])},G=function(q){switch(q[0]){case 0:var C=q[1],j=C[2],h0=j[6],R0=j[2],nx=j[5],Sx=j[4],Dx=j[3],jx=j[1],bx=C[1];switch(R0[0]){case 0:var kr=h0,sr=0,Er=B0(R0[1]);break;case 1:var kr=h0,sr=0,Er=Ux(R0[1]);break;case 2:var kr=h0,sr=0,Er=rr(R0[1]);break;case 3:var kr=h0,sr=0,Er=K0(R0[1]);break;case 4:var kr=h0,sr=0,Er=or(R0[1]);break;default:var hr=R0[1][2],cr=hr[1],lr=I2(hr[2],h0),kr=lr,sr=1,Er=z0(cr)}switch(jx){case 0:var Wr=Ud0;break;case 1:var Wr=Bd0;break;case 2:var Wr=Yd0;break;default:var Wr=Xd0}var Vr=[0,[0,Kd0,xr(Wr)],[0,[0,zd0,!!Sx],[0,[0,Vd0,!!sr],[0,[0,Jd0,Rr(e0,nx)],0]]]];return D($d0,bx,kr,[0,[0,Wd0,Er],[0,[0,Zd0,nr(Dx)],Vr]]);case 1:var x1=q[1],Ir=x1[2],r1=Ir[7],a1=Ir[6],T1=Ir[2],l1=Ir[1],u1=Ir[5],i1=Ir[4],p1=Ir[3],P1=x1[1];switch(l1[0]){case 0:var Yr=r1,Mr=0,Dr=B0(l1[1]);break;case 1:var Yr=r1,Mr=0,Dr=Ux(l1[1]);break;case 2:var Yr=r1,Mr=0,Dr=rr(l1[1]);break;case 3:var Yr=r1,Mr=0,Dr=K0(l1[1]);break;case 4:var Q1=Nx(ty0),Yr=Q1[3],Mr=Q1[2],Dr=Q1[1];break;default:var p2=l1[1][2],Hr=p2[1],Kx=I2(p2[2],r1),Yr=Kx,Mr=1,Dr=z0(Hr)}if(typeof T1=="number")if(T1)var $r=0,I1=0;else var $r=1,I1=0;else var $r=0,I1=[0,T1[1]];var Qe=$r?[0,[0,ny0,!!$r],0]:0,Fe=a1===0?0:[0,[0,uy0,Rr(e0,a1)],0],zr=Fx(Fe,Qe),i2=[0,[0,cy0,!!Mr],[0,[0,fy0,!!i1],[0,[0,iy0,Mx(me,u1)],0]]],Gt=[0,[0,sy0,m3(Zx,p1)],i2];return D(ay0,P1,Yr,Fx([0,[0,vy0,Dr],[0,[0,oy0,Mx(z0,I1)],Gt]],zr));default:var He=q[1],U1=He[2],F1=U1[6],W2=U1[2],_e=U1[7],bt=U1[5],we=U1[4],Te=U1[3],ht=U1[1],Se=He[1];if(typeof W2=="number")if(W2)var $2=0,Ee=0;else var $2=1,Ee=0;else var $2=0,Ee=[0,W2[1]];var Q2=$2?[0,[0,Qd0,!!$2],0]:0,ge=F1===0?0:[0,[0,Fd0,Rr(e0,F1)],0],_t=Fx(ge,Q2),wt=[0,[0,Gd0,!1],[0,[0,qd0,!!we],[0,[0,Hd0,Mx(me,bt)],0]]],g2=[0,[0,bd0,m3(Zx,Te)],wt],L2=[0,[0,xy0,Mx(z0,Ee)],g2];return D(ey0,Se,_e,Fx([0,[0,ry0,or(ht)],L2],_t))}},k0=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[1],nx=q[1],Sx=C[4],Dx=R0[0]===0?K0(R0[1]):B0(R0[1]);if(j)var jx=[0,[0,wy0,z0(j[1])],0],bx=D(Sy0,nx,0,[0,[0,Ty0,ix(h0)],jx]);else var bx=ix(h0);return D(Py0,nx,0,[0,[0,Ay0,Dx],[0,[0,gy0,bx],[0,[0,Ey0,!!Sx],0]]])},J0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[4],nx=h0[1],Sx=[0,[0,Zy0,!!h0[2]],[0,[0,Ky0,!!h0[3]],0]],Dx=[0,[0,Wy0,Rr(function(Yr){var Mr=Yr[2],Dr=Mr[1],$r=Yr[1],I1=[0,[0,Jy0,qx(Mr[2])],0];return D(zy0,$r,0,[0,[0,Vy0,K0(Dr)],I1])},nx)],Sx];return D($y0,j,A1(R0),Dx);case 1:var jx=C[1],bx=jx[4],hr=jx[1],cr=[0,[0,Fy0,!!jx[2]],[0,[0,Qy0,!!jx[3]],0]],lr=[0,[0,Hy0,Rr(function(Yr){var Mr=Yr[2],Dr=Mr[1],$r=Yr[1],I1=[0,[0,By0,Ux(Mr[2])],0];return D(Xy0,$r,0,[0,[0,Yy0,K0(Dr)],I1])},hr)],cr];return D(qy0,j,A1(bx),lr);case 2:var kr=C[1],sr=kr[1],Er=kr[4],Wr=kr[3],Vr=kr[2];if(sr[0]===0)var x1=sr[1],r1=_n(function(Yr){var Mr=Yr[1];return D(Uy0,Mr,0,[0,[0,jy0,K0(Yr[2][1])],0])},x1);else var Ir=sr[1],r1=_n(function(Yr){var Mr=Yr[2],Dr=Mr[1],$r=Yr[1],I1=[0,[0,Ly0,B0(Mr[2])],0];return D(Dy0,$r,0,[0,[0,My0,K0(Dr)],I1])},Ir);var a1=[0,[0,x90,z1(r1)],[0,[0,by0,!!Vr],[0,[0,Gy0,!!Wr],0]]];return D(r90,j,A1(Er),a1);case 3:var T1=C[1],l1=T1[3],u1=T1[1],i1=[0,[0,e90,!!T1[2]],0],p1=[0,[0,t90,Rr(function(Yr){var Mr=Yr[1];return D(Oy0,Mr,0,[0,[0,Iy0,K0(Yr[2][1])],0])},u1)],i1];return D(n90,j,A1(l1),p1);default:var P1=C[1],Q1=P1[4],p2=P1[1],Hr=[0,[0,i90,!!P1[2]],[0,[0,u90,!!P1[3]],0]],Kx=[0,[0,f90,Rr(function(Yr){var Mr=Yr[2],Dr=Mr[1],$r=Yr[1],I1=[0,[0,Cy0,rr(Mr[2])],0];return D(Ry0,$r,0,[0,[0,Ny0,K0(Dr)],I1])},p2)],Hr];return D(c90,j,A1(Q1),Kx)}},O0=function(q){var C=q[2],j=C[1],h0=C[3],R0=C[2],nx=q[1],Sx=j[0]===0?K0(j[1]):co(j[1]);return D(h90,nx,h0,[0,[0,k90,Sx],[0,[0,m90,Mx(he,R0)],0]])},ix=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[3],nx=h0[1],Sx=[0,[0,_90,m3(Zx,h0[2])],0],Dx=[0,[0,w90,Rr(ie,nx)],Sx];return D(T90,j,A1(R0),Dx);case 1:var jx=C[1],bx=jx[3],hr=jx[1],cr=[0,[0,S90,m3(Zx,jx[2])],0],lr=[0,[0,E90,Rr(er,hr)],cr];return D(g90,j,A1(bx),lr);case 2:return jr(j,C[1]);default:return z0(C[1])}},Wx=function(q){var C=q[2],j=C[2],h0=C[1],R0=q[1];if(!j)return ix(h0);var nx=[0,[0,A90,z0(j[1])],0];return D(C90,R0,0,[0,[0,P90,ix(h0)],nx])},Bx=function(q){var C=q[2],j=C[2],h0=q[1];return D(I90,h0,j,[0,[0,R90,lv],[0,[0,N90,Zx(C[1])],0]])},Hx=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[1];if(j){var nx=j[1],Sx=nx[2],Dx=Sx[2],jx=nx[1],bx=D(L90,jx,Dx,[0,[0,O90,ix(Sx[1])],0]),hr=Ax([0,bx,iy(Wx,h0)]),cr=R0?[0,Bx(R0[1]),hr]:hr;return z1(cr)}var lr=_n(Wx,h0),kr=R0?[0,Bx(R0[1]),lr]:lr;return z1(kr)},$x=function(q,C){var j=C[2];return D(D90,q,j,[0,[0,M90,ix(C[1])],0])},er=function(q){switch(q[0]){case 0:var C=q[1],j=C[2],h0=j[2],R0=j[1],nx=C[1];if(!h0)return ix(R0);var Sx=[0,[0,j90,z0(h0[1])],0];return D(B90,nx,0,[0,[0,U90,ix(R0)],Sx]);case 1:var Dx=q[1];return $x(Dx[1],Dx[2]);default:return O2}},Zx=function(q){var C=q[1];return D(Q_0,C,0,[0,[0,$_0,dr(q[2])],0])},Lr=function(q){switch(q[0]){case 0:return O2;case 1:return Zx(q[1]);default:var C=q[1],j=C[2],h0=C[1];return D(H_0,h0,0,[0,[0,F_0,mt([0,j[1],j[2]])],0])}},Yx=function(q){if(q[0]===0){var C=q[1],j=C[2],h0=C[1];switch(j[0]){case 0:var R0=j[3],nx=j[1],sr=0,Er=R0,Wr=0,Vr=Y90,x1=z0(j[2]),Ir=nx;break;case 1:var Sx=j[2],Dx=j[1],sr=0,Er=0,Wr=1,Vr=X90,x1=nr([0,Sx[1],Sx[2]]),Ir=Dx;break;case 2:var jx=j[2],bx=j[3],hr=j[1],sr=bx,Er=0,Wr=0,Vr=J90,x1=nr([0,jx[1],jx[2]]),Ir=hr;break;default:var cr=j[2],lr=j[3],kr=j[1],sr=lr,Er=0,Wr=0,Vr=V90,x1=nr([0,cr[1],cr[2]]),Ir=kr}switch(Ir[0]){case 0:var u1=sr,i1=0,p1=B0(Ir[1]);break;case 1:var u1=sr,i1=0,p1=Ux(Ir[1]);break;case 2:var u1=sr,i1=0,p1=rr(Ir[1]);break;case 3:var u1=sr,i1=0,p1=K0(Ir[1]);break;case 4:var r1=Nx(z90),u1=r1[3],i1=r1[2],p1=r1[1];break;default:var a1=Ir[1][2],T1=a1[1],l1=I2(a1[2],sr),u1=l1,i1=1,p1=z0(T1)}return D(H90,h0,u1,[0,[0,F90,p1],[0,[0,Q90,x1],[0,[0,$90,xr(Vr)],[0,[0,W90,!!Wr],[0,[0,Z90,!!Er],[0,[0,K90,!!i1],0]]]]]])}var P1=q[1],Q1=P1[2],p2=Q1[2],Hr=P1[1];return D(G90,Hr,p2,[0,[0,q90,z0(Q1[1])],0])},ie=function(q){if(q[0]!==0){var C=q[1];return $x(C[1],C[2])}var j=q[1],h0=j[2],R0=h0[3],nx=h0[2],Sx=h0[1],Dx=h0[4],jx=j[1];switch(Sx[0]){case 0:var cr=0,lr=0,kr=B0(Sx[1]);break;case 1:var cr=0,lr=0,kr=Ux(Sx[1]);break;case 2:var cr=0,lr=0,kr=rr(Sx[1]);break;case 3:var cr=0,lr=0,kr=K0(Sx[1]);break;default:var bx=Sx[1][2],hr=bx[2],cr=hr,lr=1,kr=z0(bx[1])}if(R0)var sr=R0[1],Er=Fr(nx[1],sr[1]),Wr=[0,[0,b90,z0(sr)],0],Vr=D(rm0,Er,0,[0,[0,xm0,ix(nx)],Wr]);else var Vr=ix(nx);return D(cm0,jx,cr,[0,[0,fm0,kr],[0,[0,im0,Vr],[0,[0,um0,hu],[0,[0,nm0,!1],[0,[0,tm0,!!Dx],[0,[0,em0,!!lr],0]]]]]])},Ft=function(q){var C=q[2],j=C[2],h0=q[1];return D(om0,h0,j,[0,[0,sm0,z0(C[1])],0])},E2=function(q){return q[0]===0?z0(q[1]):Ft(q[1])},We=function(q){switch(q[0]){case 0:return z0(q[1]);case 1:return Ft(q[1]);default:return O2}},fo=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1];return D(Vm0,R0,0,[0,[0,Jm0,ps([0,[0,Ym0,xr(j[1])],[0,[0,Bm0,xr(j[2])],0]])],[0,[0,Xm0,!!h0],0]])},gn=function(q){switch(q){case 0:return Wm0;case 1:return $m0;default:return Qm0}},ds=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,Gm0,Mx(z0,C[2])],0];return D(xk0,h0,0,[0,[0,bm0,ix(j)],R0])},me=function(q){var C=q[2],j=C[2],h0=q[1];switch(C[1]){case 0:var R0=rk0;break;case 1:var R0=ek0;break;case 2:var R0=tk0;break;case 3:var R0=nk0;break;case 4:var R0=uk0;break;default:var R0=ik0}return D(ck0,h0,j,[0,[0,fk0,xr(R0)],0])},An=function(q,C){var j=C[3],h0=C[2];switch(C[4]){case 0:var R0=p_0;break;case 1:var R0=d_0;break;default:var R0=y_0}return D(h_0,q,j,[0,[0,k_0,xr(R0)],[0,[0,m_0,dr(h0)],0]])},Ht=function(q){var C=q[2],j=C[1],h0=C[3],R0=C[2],nx=q[1],Sx=j[0]===0?K0(j[1]):co(j[1]);return D(Hh0,nx,h0,[0,[0,Fh0,Sx],[0,[0,Qh0,Mx(he,R0)],0]])},$e=function(q,C){var j=C[2],h0=j[4],R0=j[3],nx=j[2],Sx=j[1],Dx=C[1],jx=r2(function(Vr,x1){var Ir=Vr[4],r1=Vr[3],a1=Vr[2],T1=Vr[1];switch(x1[0]){case 0:var l1=x1[1],u1=l1[2],i1=u1[2],p1=u1[1],P1=u1[8],Q1=u1[7],p2=u1[6],Hr=u1[5],Kx=u1[4],Yr=u1[3],Mr=l1[1];switch(p1[0]){case 0:var Dr=B0(p1[1]);break;case 1:var Dr=Ux(p1[1]);break;case 2:var Dr=rr(p1[1]);break;case 3:var Dr=K0(p1[1]);break;case 4:var Dr=Nx(Hk0);break;default:var Dr=Nx(qk0)}switch(i1[0]){case 0:var Qe=Gk0,Fe=dr(i1[1]);break;case 1:var $r=i1[1],Qe=bk0,Fe=qt([0,$r[1],$r[2]]);break;default:var I1=i1[1],Qe=xh0,Fe=qt([0,I1[1],I1[2]])}return[0,[0,D(sh0,Mr,P1,[0,[0,ch0,Dr],[0,[0,fh0,Fe],[0,[0,ih0,!!p2],[0,[0,uh0,!!Yr],[0,[0,nh0,!!Kx],[0,[0,th0,!!Hr],[0,[0,eh0,Mx(me,Q1)],[0,[0,rh0,xr(Qe)],0]]]]]]]]),T1],a1,r1,Ir];case 1:var zr=x1[1],i2=zr[2],Gt=i2[2],He=zr[1];return[0,[0,D(vh0,He,Gt,[0,[0,oh0,dr(i2[1])],0]),T1],a1,r1,Ir];case 2:var U1=x1[1],F1=U1[2],W2=F1[6],_e=F1[4],bt=F1[3],we=F1[2],Te=F1[1],ht=U1[1],Se=[0,[0,lh0,!!_e],[0,[0,ah0,Mx(me,F1[5])],0]],$2=[0,[0,ph0,dr(bt)],Se],Ee=[0,[0,dh0,dr(we)],$2];return[0,T1,[0,D(mh0,ht,W2,[0,[0,yh0,Mx(K0,Te)],Ee]),a1],r1,Ir];case 3:var Q2=x1[1],ge=Q2[2],_t=ge[3],wt=Q2[1],g2=[0,[0,kh0,!!ge[2]],0];return[0,T1,a1,[0,D(_h0,wt,_t,[0,[0,hh0,qt(ge[1])],g2]),r1],Ir];case 4:var L2=x1[1],F2=L2[2],Rn=F2[6],In=F2[5],xn=F2[4],Tt=F2[3],rn=F2[1],On=L2[1],Ae=[0,[0,Rh0,!!Tt],[0,[0,Nh0,!!xn],[0,[0,Ch0,!!In],[0,[0,Ph0,dr(F2[2])],0]]]];return[0,T1,a1,r1,[0,D(Oh0,On,Rn,[0,[0,Ih0,K0(rn)],Ae]),Ir]];default:var qe=x1[1],M2=qe[2],Ln=M2[6],St=M2[4],Et=M2[3],gt=M2[2],hs=M2[1],Mn=qe[1],H2=0;switch(M2[5]){case 0:var Ge="PlusOptional";break;case 1:var Ge="MinusOptional";break;case 2:var Ge="Optional";break;default:var Ge=O2}var Dn=[0,[0,Th0,Mx(me,St)],[0,[0,wh0,Ge],H2]],jn=[0,[0,Sh0,dr(Et)],Dn],_s=[0,[0,Eh0,dr(gt)],jn];return[0,[0,D(Ah0,Mn,Ln,[0,[0,gh0,ys(hs)],_s]),T1],a1,r1,Ir]}},Vk0,R0),bx=jx[3],hr=jx[2],cr=jx[1],lr=[0,[0,zk0,z1(Ax(jx[4]))],0],kr=[0,[0,Kk0,z1(Ax(bx))],lr],sr=[0,[0,Zk0,z1(Ax(hr))],kr],Er=[0,[0,$k0,!!Sx],[0,[0,Wk0,z1(Ax(cr))],sr]],Wr=q?[0,[0,Qk0,!!nx],Er]:Er;return D(Fk0,Dx,A1(h0),Wr)},qt=function(q){var C=q[2],j=C[3],h0=C[2][2],R0=C[4],nx=h0[3],Sx=h0[2],Dx=h0[1],jx=C[1],bx=q[1],hr=I2(A1(h0[4]),R0),cr=[0,[0,Ck0,Mx(l2,jx)],0],lr=[0,[0,Nk0,Mx(ke,nx)],cr],kr=j[0]===0?dr(j[1]):mt(j[1]),sr=[0,[0,Ik0,Mx(Pn,Dx)],[0,[0,Rk0,kr],lr]];return D(Lk0,bx,hr,[0,[0,Ok0,Rr(function(Er){return Qo(0,Er)},Sx)],sr])},dr=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return D(sk0,j,C[1],0);case 1:return D(ok0,j,C[1],0);case 2:return D(vk0,j,C[1],0);case 3:return D(ak0,j,C[1],0);case 4:return D(lk0,j,C[1],0);case 5:return D(dk0,j,C[1],0);case 6:return D(yk0,j,C[1],0);case 7:return D(mk0,j,C[1],0);case 8:return D(kk0,j,C[2],0);case 9:return D(pk0,j,C[1],0);case 10:return D(W_0,j,C[1],0);case 11:var h0=C[1],R0=h0[2];return D(_k0,j,R0,[0,[0,hk0,dr(h0[1])],0]);case 12:return qt([0,j,C[1]]);case 13:var nx=C[1],Sx=nx[2],Dx=nx[4],jx=nx[3],bx=nx[1],hr=I2(A1(Sx[2][3]),Dx),cr=Sx[2],lr=cr[2],kr=cr[1],sr=[0,[0,X50,Mx(l2,bx)],0],Er=[0,[0,J50,oo(jx)],sr],Wr=[0,[0,V50,Mx(u2,lr)],Er];return D(K50,j,hr,[0,[0,z50,w1(kr)],Wr]);case 14:return $e(1,[0,j,C[1]]);case 15:var Vr=C[1],x1=Vr[3],Ir=Vr[2],r1=[0,[0,Lh0,$e(0,Vr[1])],0];return D(Dh0,j,x1,[0,[0,Mh0,Rr(O0,Ir)],r1]);case 16:var a1=C[1],T1=a1[2];return D(Uh0,j,T1,[0,[0,jh0,dr(a1[1])],0]);case 17:var l1=C[1],u1=l1[5],i1=l1[3],p1=l1[2],P1=l1[1],Q1=[0,[0,Bh0,dr(l1[4])],0],p2=[0,[0,Yh0,dr(i1)],Q1],Hr=[0,[0,Xh0,dr(p1)],p2];return D(Vh0,j,u1,[0,[0,Jh0,dr(P1)],Hr]);case 18:var Kx=C[1],Yr=Kx[2];return D(Kh0,j,Yr,[0,[0,zh0,ys(Kx[1])],0]);case 19:return Ht([0,j,C[1]]);case 20:var Mr=C[1],Dr=Mr[3];return D(bh0,j,Dr,Fo(Mr));case 21:var $r=C[1],I1=$r[1],Qe=I1[3],Fe=[0,[0,x_0,!!$r[2]],0];return D(r_0,j,Qe,Fx(Fo(I1),Fe));case 22:var zr=C[1],i2=zr[1],Gt=zr[2];return D(t_0,j,Gt,[0,[0,e_0,Rr(dr,[0,i2[1],[0,i2[2],i2[3]]])],0]);case 23:var He=C[1],U1=He[1],F1=He[2];return D(u_0,j,F1,[0,[0,n_0,Rr(dr,[0,U1[1],[0,U1[2],U1[3]]])],0]);case 24:var W2=C[1],_e=W2[2],bt=W2[3],we=W2[1],Te=_e?[0,[0,i_0,he(_e[1])],0]:0;return D(c_0,j,bt,[0,[0,f_0,so(we)],Te]);case 25:var ht=C[1],Se=ht[2];return D(l_0,j,Se,[0,[0,a_0,dr(ht[1])],0]);case 26:return An(j,C[1]);case 27:var $2=C[1],Ee=$2[2];return D(w_0,j,Ee,[0,[0,__0,dr($2[1])],0]);case 28:var Q2=C[1],ge=Q2[2],_t=Q2[1],wt=0;return D(S_0,j,ge,[0,[0,T_0,Rr(function(On){var Ae=On[2],qe=On[1];switch(Ae[0]){case 0:return dr(Ae[1]);case 1:var M2=Ae[1],Ln=M2[2],St=M2[1],Et=[0,[0,E_0,!!M2[4]],0],gt=[0,[0,g_0,Mx(me,M2[3])],Et],hs=[0,[0,A_0,dr(Ln)],gt];return D(C_0,qe,0,[0,[0,P_0,K0(St)],hs]);default:var Mn=Ae[1],H2=Mn[1],Ge=[0,[0,N_0,dr(Mn[2])],0];return D(I_0,qe,0,[0,[0,R_0,Mx(K0,H2)],Ge])}},_t)],wt]);case 29:var g2=C[1];return D(M_0,j,g2[3],[0,[0,L_0,xr(g2[1])],[0,[0,O_0,xr(g2[2])],0]]);case 30:var L2=C[1];return D(U_0,j,L2[3],[0,[0,j_0,L2[1]],[0,[0,D_0,xr(L2[2])],0]]);case 31:var F2=C[1];return D(X_0,j,F2[3],[0,[0,Y_0,O2],[0,[0,B_0,xr(F2[2])],0]]);case 32:var Rn=C[1],In=Rn[1],xn=Rn[2],Tt=0,rn=In?J_0:V_0;return D(Z_0,j,xn,[0,[0,K_0,!!In],[0,[0,z_0,xr(rn)],Tt]]);case 33:return D(wk0,j,C[1],0);case 34:return D(Tk0,j,C[1],0);default:return D(Sk0,j,C[1],0)}},mt=function(q){var C=q[2],j=C[2],h0=C[3],R0=j[1],nx=q[1],Sx=[0,[0,Ek0,!!C[1]],0],Dx=[0,[0,gk0,Mx(dr,j[2])],Sx],jx=[0,[0,Ak0,K0(R0)],Dx];return D(Pk0,nx,A1(h0),jx)},Qo=function(q,C){var j=C[2],h0=j[1],R0=C[1],nx=[0,[0,Mk0,!!j[3]],0],Sx=[0,[0,Dk0,dr(j[2])],nx];return D(Uk0,R0,q,[0,[0,jk0,Mx(K0,h0)],Sx])},ke=function(q){var C=q[2];return Qo(C[2],C[1])},Pn=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,Yk0,dr(C[1][2])],[0,[0,Bk0,!1],0]];return D(Jk0,h0,j,[0,[0,Xk0,Mx(K0,0)],R0])},co=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j[0]===0?K0(j[1]):co(j[1]);return D($h0,R0,0,[0,[0,Wh0,nx],[0,[0,Zh0,K0(h0)],0]])},Fo=function(q){var C=q[1],j=[0,[0,qh0,dr(q[2])],0];return[0,[0,Gh0,dr(C)],j]},so=function(q){if(q[0]===0)return K0(q[1]);var C=q[1],j=C[2],h0=j[2],R0=C[1],nx=so(j[1]);return D(v_0,R0,0,[0,[0,o_0,nx],[0,[0,s_0,K0(h0)],0]])},oo=function(q){return q[0]===0?O2:An(q[1],q[2])},l2=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,q_0,Rr(ys,C[1])],0];return D(G_0,h0,A1(j),R0)},ys=function(q){var C=q[2],j=C[1][2],h0=C[5],R0=C[4],nx=C[2],Sx=j[2],Dx=j[1],jx=q[1],bx=C[3]?[0,[0,b_0,!0],0]:0,hr=[0,[0,xw0,Mx(dr,h0)],0],cr=[0,[0,rw0,Mx(me,R0)],hr];return D(nw0,jx,Sx,Fx([0,[0,tw0,xr(Dx)],[0,[0,ew0,m3(Zx,nx)],cr]],bx))},he=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,uw0,Rr(dr,C[1])],0];return D(iw0,h0,A1(j),R0)},Cn=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,fw0,Rr(Ho,C[1])],0];return D(cw0,h0,A1(j),R0)},Ho=function(q){if(q[0]===0)return dr(q[1]);var C=q[1],j=C[1],h0=C[2][1];return Ht([0,j,[0,[0,wn(0,[0,j,sw0])],0,h0]])},bv=function(q){if(q[0]===0){var C=q[1],j=C[2],h0=j[1],R0=j[2],nx=C[1],Sx=h0[0]===0?kt(h0[1]):qo(h0[1]);return D(Nw0,nx,0,[0,[0,Cw0,Sx],[0,[0,Pw0,Mx(ra,R0)],0]])}var Dx=q[1],jx=Dx[2],bx=jx[2],hr=Dx[1];return D(Iw0,hr,bx,[0,[0,Rw0,z0(jx[1])],0])},xa=function(q){var C=q[1];return D(gw0,C,0,[0,[0,Ew0,ao(q[2][1])],0])},vo=function(q){var C=q[2],j=C[1],h0=q[1],R0=C[2],nx=j?z0(j[1]):D(Ow0,[0,h0[1],[0,h0[2][1],h0[2][2]+1|0],[0,h0[3][1],h0[3][2]-1|0]],0,0);return D(Mw0,h0,A1(R0),[0,[0,Lw0,nx],0])},ms=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return Ex([0,j,C[1]]);case 1:return Px([0,j,C[1]]);case 2:return vo([0,j,C[1]]);case 3:var h0=C[1],R0=h0[2];return D(jw0,j,R0,[0,[0,Dw0,z0(h0[1])],0]);default:var nx=C[1];return D(Yw0,j,0,[0,[0,Bw0,xr(nx[1])],[0,[0,Uw0,xr(nx[2])],0]])}},kt=function(q){var C=q[2];return D($w0,q[1],C[2],[0,[0,Ww0,xr(C[1])],0])},qo=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,zw0,kt(C[2])],0];return D(Zw0,h0,0,[0,[0,Kw0,kt(j)],R0])},Go=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j[0]===0?kt(j[1]):Go(j[1]);return D(Vw0,R0,0,[0,[0,Jw0,nx],[0,[0,Xw0,kt(h0)],0]])},ao=function(q){switch(q[0]){case 0:return kt(q[1]);case 1:return qo(q[1]);default:return Go(q[1])}},ra=function(q){if(q[0]===0){var C=q[1];return B0([0,C[1],C[2]])}var j=q[1];return vo([0,j[1],j[2]])},ea=function(q){var C=q[2],j=C[2],h0=C[1],R0=q[1],nx=K0(j?j[1]:h0);return D(Hw0,R0,0,[0,[0,Fw0,K0(h0)],[0,[0,Qw0,nx],0]])},ks=function(q){return Rr(ta,q)},ta=function(q){var C=q[2],j=q[1];if(C[1])var h0=C[2],R0=uT0;else var h0=C[2],R0=iT0;return D(R0,j,0,[0,[0,fT0,xr(h0)],0])},lo=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1];if(j)var nx=[0,[0,cT0,z0(j[1])],0],Sx=sT0;else var nx=0,Sx=oT0;return D(Sx,R0,h0,nx)},bo=function(q){var C=q[2],j=q[1],h0=[0,[0,vT0,lx(q[3])],0],R0=[0,[0,aT0,Mx(Cn,C)],h0];return[0,[0,lT0,z0(j)],R0]},xv=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=0,R0=K0(C[1]);break;case 1:var h0=0,R0=or(C[1]);break;default:var h0=1,R0=z0(C[1])}return[0,[0,yT0,z0(j)],[0,[0,dT0,R0],[0,[0,pT0,!!h0],0]]]},Nn=P0[2],rv=Nn[2],$9=Nn[4],k3=Nn[3],Q9=P0[1],U6=N0(Nn[1]),B6=[0,[0,h60,U6],[0,[0,k60,ks($9)],0]];if(rv)var Y6=rv[1],X6=Fx(B6,[0,[0,T60,D(w60,Y6[1],0,[0,[0,_60,xr(Y6[2])],0])],0]);else var X6=B6;var h3=D(S60,Q9,k3,X6),F9=Fx(v0,zK[1]);if(h3.errors=Rr(function(q){var C=q[1],j=[0,[0,mT0,xr(_S0(q[2]))],0];return ps([0,[0,kT0,ZK(C)],j])},F9),T){var H9=I[1];h3[gD]=z1(iy(function(q){var C=q[2],j=q[1],h0=q[3],R0=[0,[0,Dv0,xr(tO(C))],0],nx=[0,c9(b,j[3]),0],Sx=[0,[0,jv0,z1([0,c9(b,j[2]),nx])],R0],Dx=[0,[0,Yv0,ps([0,[0,Bv0,j[3][1]],[0,[0,Uv0,j[3][2]],0]])],0],jx=[0,[0,zv0,ps([0,[0,Vv0,ps([0,[0,Jv0,j[2][1]],[0,[0,Xv0,j[2][2]],0]])],Dx])],Sx];switch(h0){case 0:var bx=Kv0;break;case 1:var bx=Zv0;break;case 2:var bx=Wv0;break;case 3:var bx=$v0;break;case 4:var bx=Qv0;break;default:var bx=Fv0}return ps([0,[0,qv0,xr(UJ(C))],[0,[0,Hv0,xr(bx)],jx]])},H9))}return h3}var na=A0[1];if(na===5){var _3=A0[2];if(_3&&_3[1]===6){var q9=_3[2],C0=[0,H+2|0,0,[0,Vl(Ax([0,H,Q0])),U0]],A0=q9;continue}}else if(6>na){var G9=A0[2],C0=[0,H+YV(na)|0,[0,H,Q0],U0],A0=G9;continue}var j1=A0[2],ev=[0,Vl(Ax([0,H,Q0])),U0],C0=[0,H+YV(na)|0,0,ev],A0=j1}}};if(typeof DM<"u")var WK=DM;else{var $K={};io.flow=$K;var WK=$K}WK.parse=bZ(function(x,r){try{var e=rg0(x,r);return e}catch(u){var t=L1(u);return t[1]===YL?VK(t[2]):VK(new bE0(xr(Qx(MT0,ay(t)))))}}),vI(0);return}}})(globalThis)});var iZ=QK(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.extract=aN0;aa.parse=pN0;aa.parseWithComments=uZ;aa.print=dN0;aa.strip=lN0;var fN0=/\*\/$/,cN0=/^\/\*\*?/,tZ=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,sN0=/(^|\s+)\/\/([^\r\n]*)/g,xZ=/^(\r?\n)+/,oN0=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,rZ=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,vN0=/(\r?\n|^) *\* ?/g,nZ=[];function aN0(p0){let wx=p0.match(tZ);return wx?wx[0].trimLeft():""}function lN0(p0){let wx=p0.match(tZ);return wx&&wx[0]?p0.substring(wx[0].length):p0}function pN0(p0){return uZ(p0).pragmas}function uZ(p0){let wx=` -`;p0=p0.replace(cN0,"").replace(fN0,"").replace(vN0,"$1");let tr="";for(;tr!==p0;)tr=p0,p0=p0.replace(oN0,`${wx}$1 $2${wx}`);p0=p0.replace(xZ,"").trimRight();let gr=Object.create(null),C1=p0.replace(rZ,"").replace(xZ,"").trimRight(),ir;for(;ir=rZ.exec(p0);){let ur=ir[2].replace(sN0,"");typeof gr[ir[1]]=="string"||Array.isArray(gr[ir[1]])?gr[ir[1]]=nZ.concat(gr[ir[1]],ur):gr[ir[1]]=ur}return{comments:C1,pragmas:gr}}function dN0({comments:p0="",pragmas:wx={}}){let tr=` -`,gr="/**",C1=" *",ir=" */",ur=Object.keys(wx),k1=ur.flatMap(Nt=>eZ(Nt,wx[Nt])).map(Nt=>`${C1} ${Nt}${tr}`).join("");if(!p0){if(ur.length===0)return"";if(ur.length===1&&!Array.isArray(wx[ur[0]])){let Nt=wx[ur[0]];return`${gr} ${eZ(ur[0],Nt)[0]}${ir}`}}let la=p0.split(tr).map(Nt=>`${C1} ${Nt}`).join(tr)+tr;return gr+tr+(p0?la:"")+(p0&&ur.length?C1+tr:"")+k1+ir}function eZ(p0,wx){return nZ.concat(wx).map(tr=>`@${p0} ${tr}`.trim())}});var MN0={};FK(MN0,{parsers:()=>JM});var JM={};FK(JM,{flow:()=>LN0});var kZ=qK(GK(),1);function iN0(p0,wx){let tr=new SyntaxError(p0+" ("+wx.loc.start.line+":"+wx.loc.start.column+")");return Object.assign(tr,wx)}var bK=iN0;var J3=qK(iZ(),1);function yN0(p0){if(!p0.startsWith("#!"))return"";let wx=p0.indexOf(` -`);return wx===-1?p0:p0.slice(0,wx)}var fZ=yN0;function mN0(p0){let wx=fZ(p0);wx&&(p0=p0.slice(wx.length+1));let tr=(0,J3.extract)(p0),{pragmas:gr,comments:C1}=(0,J3.parseWithComments)(tr);return{shebang:wx,text:p0,pragmas:gr,comments:C1}}function cZ(p0){let{pragmas:wx}=mN0(p0);return Object.prototype.hasOwnProperty.call(wx,"prettier")||Object.prototype.hasOwnProperty.call(wx,"format")}function kN0(p0){return Array.isArray(p0)&&p0.length>0}var ym=kN0;function Ct(p0){var gr;let wx=p0.range?p0.range[0]:p0.start,tr=((gr=p0.declaration)==null?void 0:gr.decorators)??p0.decorators;return ym(tr)?Math.min(Ct(tr[0]),wx):wx}function As(p0){return p0.range?p0.range[1]:p0.end}function hN0(p0){return p0=typeof p0=="function"?{parse:p0}:p0,{astFormat:"estree",hasPragma:cZ,locStart:Ct,locEnd:As,...p0}}var sZ=hN0;function _N0(p0){return p0.charAt(0)==="#"&&p0.charAt(1)==="!"?"//"+p0.slice(2):p0}var oZ=_N0;var wN0=(p0,wx,tr)=>{if(!(p0&&wx==null))return Array.isArray(wx)||typeof wx=="string"?wx[tr<0?wx.length+tr:tr]:wx.at(tr)},jM=wN0;function TN0(p0){return p0=new Set(p0),wx=>p0.has(wx==null?void 0:wx.type)}var vZ=TN0;var SN0=vZ(["Block","CommentBlock","MultiLine"]),B4=SN0;function EN0(p0){return B4(p0)&&p0.value[0]==="*"&&/@(?:type|satisfies)\b/.test(p0.value)}var aZ=EN0;function gN0(p0){let wx=`*${p0.value}*`.split(` -`);return wx.length>1&&wx.every(tr=>tr.trimStart()[0]==="*")}var UM=gN0;var Y4=null;function X4(p0){if(Y4!==null&&typeof Y4.property){let wx=Y4;return Y4=X4.prototype=null,wx}return Y4=X4.prototype=p0??Object.create(null),new X4}var AN0=10;for(let p0=0;p0<=AN0;p0++)X4();function BM(p0){return X4(p0)}function PN0(p0,wx="type"){BM(p0);function tr(gr){let C1=gr[wx],ir=p0[C1];if(!Array.isArray(ir))throw Object.assign(new Error(`Missing visitor keys for '${C1}'.`),{node:gr});return ir}return tr}var lZ=PN0;var pZ={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var CN0=lZ(pZ),dZ=CN0;function YM(p0,wx){if(!(p0!==null&&typeof p0=="object"))return p0;if(Array.isArray(p0)){for(let gr=0;gr{var k1;(k1=ur.leadingComments)!=null&&k1.some(aZ)&&ir.add(Ct(ur))}),p0=mm(p0,ur=>{if(ur.type==="ParenthesizedExpression"){let{expression:k1}=ur;if(k1.type==="TypeCastExpression")return k1.range=ur.range,k1;let la=Ct(ur);if(!ir.has(la))return k1.extra={...k1.extra,parenthesized:!0},k1}})}if(p0=mm(p0,ir=>{switch(ir.type){case"LogicalExpression":if(yZ(ir))return XM(ir);break;case"VariableDeclaration":{let ur=jM(!1,ir.declarations,-1);ur!=null&&ur.init&&C1(ir,ur);break}case"TSParenthesizedType":return ir.typeAnnotation;case"TSTypeParameter":if(typeof ir.name=="string"){let ur=Ct(ir);ir.name={type:"Identifier",name:ir.name,range:[ur,ur+ir.name.length]}}break;case"TopicReference":p0.extra={...p0.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:ur}=ir;if(tr==="meriyah"&&(ur==null?void 0:ur.type)==="Identifier"){let k1=gr.slice(Ct(ur),As(ur));(k1.startsWith('"')||k1.startsWith("'"))&&(ir.exported={...ir.exported,type:"Literal",value:ir.exported.name,raw:k1})}break}case"TSUnionType":case"TSIntersectionType":if(ir.types.length===1)return ir.types[0];break}}),ym(p0.comments)){let ir=jM(!1,p0.comments,-1);for(let ur=p0.comments.length-2;ur>=0;ur--){let k1=p0.comments[ur];As(k1)===Ct(ir)&&B4(k1)&&B4(ir)&&UM(k1)&&UM(ir)&&(p0.comments.splice(ur+1,1),k1.value+="*//*"+ir.value,k1.range=[Ct(k1),As(ir)]),ir=k1}}return p0.type==="Program"&&(p0.range=[0,gr.length]),p0;function C1(ir,ur){gr[As(ur)]!==";"&&(ir.range=[Ct(ir),As(ur)])}}function yZ(p0){return p0.type==="LogicalExpression"&&p0.right.type==="LogicalExpression"&&p0.operator===p0.right.operator}function XM(p0){return yZ(p0)?XM({type:"LogicalExpression",operator:p0.operator,left:XM({type:"LogicalExpression",operator:p0.operator,left:p0.left,right:p0.right.left,range:[Ct(p0.left),As(p0.right.left)]}),right:p0.right.right,range:[Ct(p0),As(p0)]}):p0}var mZ=NN0;var RN0={comments:!1,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!0};function IN0(p0){let{message:wx,loc:{start:tr,end:gr}}=p0;return bK(wx,{loc:{start:{line:tr.line,column:tr.column+1},end:{line:gr.line,column:gr.column+1}},cause:p0})}function ON0(p0){let wx=kZ.default.parse(oZ(p0),RN0),[tr]=wx.errors;if(tr)throw IN0(tr);return mZ(wx,{text:p0})}var LN0=sZ(ON0);return uN0(MN0);}); \ No newline at end of file + -- too many open files. Try running with OCAMLRUNPARAM=b=2)`],MF=[3,0,3],DF=ic,jF=b3,UF="{"],sH=[0,[12,32,0],Mt],oH=[0,[12,32,0],Mt],vH=[0,[17,[0,"@,",0,0],[12,Di,[17,0,0]]],"@,}@]"],aH=[0,"src/hack_forked/utils/collections/third-party/flow_set.ml",379,14],lH=xl,pH=_a,dH=ja,yH=wx,mH=wv,kH=[0,[12,40,[18,[1,[0,[11,Ne,0],Ne]],[11,"File_key.LibFile",[17,[0,fe,1,0],0]]]],"(@[<2>File_key.LibFile@ "],hH=[0,[3,0,0],z3],_H=[0,[17,0,[12,41,0]],op],wH=[0,[12,40,[18,[1,[0,[11,Ne,0],Ne]],[11,"File_key.SourceFile",[17,[0,fe,1,0],0]]]],"(@[<2>File_key.SourceFile@ "],TH=[0,[3,0,0],z3],SH=[0,[17,0,[12,41,0]],op],EH=[0,[12,40,[18,[1,[0,[11,Ne,0],Ne]],[11,"File_key.JsonFile",[17,[0,fe,1,0],0]]]],"(@[<2>File_key.JsonFile@ "],gH=[0,[3,0,0],z3],AH=[0,[17,0,[12,41,0]],op],PH=[0,[12,40,[18,[1,[0,[11,Ne,0],Ne]],[11,"File_key.ResourceFile",[17,[0,fe,1,0],0]]]],"(@[<2>File_key.ResourceFile@ "],CH=[0,[3,0,0],z3],NH=[0,[17,0,[12,41,0]],op],RH=[0,1],OH=[0,0],IH=[0,1],LH=[0,2],MH=[0,0],DH=[0,1],jH=[0,1],UH=[0,1],BH=[0,1],YH=[0,1],XH=[0,1],JH=[0,0,0],VH=[0,0,0],zH=[0,B2,si,_f,Vf,U2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Oi,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Ue,Rf,Ii,jc,Sf,Xf,xu,Iu,Be,ff,E7,qi,Fi,Ic,M7,qu,Sc,Me,k7,D7,xf,Tu,Uu,du,Ec,je,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Oc,wc,z7,Lu,Yc,yn,If,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ir,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,G2,I7,$f,yu,hf,p7,Ku,ou,Ei,D2,P7,s7,g7,Nt,Ou,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,H1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,ce,Mi,Rc,Of,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Re,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,O7,Le,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],KH=[0,Ic,Vn,ei,Ou,Kn,O7,Uc,qf,li,r7,$u,Jc,sc,Be,nu,Qf,df,pf,lc,a7,I7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Nt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Iu,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,If,Cf,$c,d7,_i,su,zf,uu,F7,oi,je,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,U2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,ce,G7,wi,B2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Oc,ec,qc,ir,D2,Me,C7,Oi,ff,H7,Ue,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,Of,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,H1,Lu,nc,xi,Qi,zn,eu,Fi,Re,$n,Gu,fu,af,ac,Ii,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Le,Mf,G2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],ZH=dD,WH=FD,$H=lD,QH=$D,FH=WT,HH=ID,qH=b3,GH=NU,bH=cD,xq=gD,rq=WM,eq=js,tq=Lt,nq=AB,uq=VD,iq=q2,fq=qD,cq=SY,sq=O8,oq=J4,vq=Po,aq=G3,lq=AD,pq=wY,dq=lj,yq=wD,mq=pY,kq=JM,hq=DU,_q=PD,wq=EB,Tq=Uj,Sq=uY,Eq=kD,gq=qj,Aq=aY,Pq=eB,Cq=[0,[18,[1,[0,[11,Ne,0],Ne]],[11,cj,0]],xY],Nq="Loc.line",Rq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],Oq=[0,[4,0,0,0,0],El],Iq=[0,[17,0,0],la],Lq=[0,[12,59,[17,[0,fe,1,0],0]],ap],Mq=kl,Dq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],jq=[0,[4,0,0,0,0],El],Uq=[0,[17,0,0],la],Bq=[0,[17,[0,fe,1,0],[12,Di,[17,0,0]]],_j],Yq=[0,[15,0],zj],Xq="(Some ",Jq=ZS,Vq="None",zq=[0,[18,[1,[0,[11,Ne,0],Ne]],[11,cj,0]],xY],Kq="Loc.source",Zq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],Wq=[0,[17,0,0],la],$q=[0,[12,59,[17,[0,fe,1,0],0]],ap],Qq=Lm,Fq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],Hq=[0,[17,0,0],la],qq=[0,[12,59,[17,[0,fe,1,0],0]],ap],Gq="_end",bq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],xG=[0,[17,0,0],la],rG=[0,[17,[0,fe,1,0],[12,Di,[17,0,0]]],_j],eG="Object literal may not have data and accessor property with the same name",tG="Object literal may not have multiple get/set accessors with the same name",nG="Unexpected token <. Remember, adjacent JSX elements must be wrapped in an enclosing parent tag",uG="Modules can only have 1 since they are either an ES module xor they are a CommonJS module.",iG="Found both `declare module.exports` and `declare export` in the same module. ",fG="`let [` is ambiguous in this position because it is either a `let` binding pattern, or a member expression.",cG="Async functions can only be declared at top level or immediately within another function.",sG="`await` is an invalid identifier in async functions",oG="`await` is not allowed in async function parameters.",vG="Computed properties must have a value.",aG="Constructor can't be an accessor.",lG="Constructor can't be an async function.",pG="Constructor can't be a generator.",dG="It is sufficient for your declare function to just have a Promise return type.",yG="async is an implementation detail and isn't necessary for your declare function statement. ",mG="`declare` modifier can only appear on class fields.",kG="Unexpected token `=`. Initializers are not allowed in a `declare`.",hG="`declare export interface` is not supported. Use `export interface` instead.",_G="`declare export type` is not supported. Use `export type` instead.",wG="Unexpected token `=`. Initializers are not allowed in a `declare opaque type`.",TG="Classes may only have one constructor",SG="Duplicate `declare module.exports` statement!",EG="Rest element must be final element of an array pattern",gG="Cannot export an enum with `export type`, try `export enum E {}` or `module.exports = E;` instead.",AG="Enum members are separated with `,`. Replace `;` with `,`.",PG="`const` enums are not supported. Flow Enums are designed to allow for inlining, however the inlining itself needs to be part of the build system (whatever you use) rather than Flow itself.",CG="Expected an object pattern, array pattern, or an identifier but found an expression instead",NG="Missing comma between export specifiers",RG="Generators can only be declared at top level or immediately within another function.",OG="Getter should have zero parameters",IG="A getter cannot have a `this` parameter.",LG="Illegal break statement",MG="Illegal continue statement",DG="Illegal return statement",jG="Illegal Unicode escape",UG="Missing comma between import specifiers",BG="It cannot be used with `import type` or `import typeof` statements",YG="The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. ",XG="Explicit inexact syntax cannot appear inside an explicit exact object type",JG="Explicit inexact syntax can only appear inside an object type",VG="Component params must be an identifier. If you'd like to destructure, you should use `name as {destructure}`",zG="Components use `renders` instead of `:` to annotate the render type of a component.",KG="A bigint literal must be an integer",ZG="JSX value should be either an expression or a quoted JSX text",WG="Invalid left-hand side in assignment",$G="Invalid left-hand side in exponentiation expression",QG="Invalid left-hand side in for-in",FG="Invalid left-hand side in for-of",HG="Imports within a `declare module` body must always be `import type` or `import typeof`!",qG="Invalid optional indexed access. Indexed access uses bracket notation. Use the format `T?.[K]`.",GG="Invalid regular expression",bG="A bigint literal cannot use exponential notation",xb="Tuple spread elements cannot be optional.",rb="Tuple variance annotations can only be used with labeled tuple elements, e.g. `[+foo: number]`",eb="`typeof` can only be used to get the type of variables.",tb="JSX attributes must only be assigned a non-empty expression",nb="Literals cannot be used as shorthand properties.",ub="Malformed unicode",ib="Object pattern can't contain methods",fb="Expected at least one type parameter.",cb="Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",sb="More than one default clause in switch statement",ob="Illegal newline after throw",vb="Illegal newline before arrow",ab="Missing catch or finally after try",lb="Const must be initialized",pb="Destructuring assignment must be initialized",db="An optional chain may not be used in a `new` expression.",yb="Template literals may not be used in an optional chain.",mb="Rest parameter must be final parameter of an argument list",kb="Private fields may not be deleted.",hb="Private fields can only be referenced from within a class.",_b="Rest property must be final property of an object pattern",wb="Setter should have exactly one parameter",Tb="A setter cannot have a `this` parameter.",Sb="Catch variable may not be eval or arguments in strict mode",Eb="Delete of an unqualified identifier in strict mode.",gb="Duplicate data property in object literal not allowed in strict mode",Ab="Function name may not be eval or arguments in strict mode",Pb="Assignment to eval or arguments is not allowed in strict mode",Cb="Postfix increment/decrement may not have eval or arguments operand in strict mode",Nb="Prefix increment/decrement may not have eval or arguments operand in strict mode",Rb="Strict mode code may not include a with statement",Ob="Number literals with leading zeros are not allowed in strict mode.",Ib="Octal literals are not allowed in strict mode.",Lb="Strict mode function may not have duplicate parameter names",Mb="Parameter name eval or arguments is not allowed in strict mode",Db='Illegal "use strict" directive in function with non-simple parameter list',jb="Use of reserved word in strict mode",Ub="Variable name may not be eval or arguments in strict mode",Bb="You may not access a private field through the `super` keyword.",Yb="Flow does not support abstract classes.",Xb="Flow does not support template literal types.",Jb="A type annotation is required for the `this` parameter.",Vb="Arrow functions cannot have a `this` parameter; arrow functions automatically bind `this` when declared.",zb="Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",Kb="The `this` parameter cannot be optional.",Zb="The `this` parameter must be the first function parameter.",Wb="A trailing comma is not permitted after the rest element",$b="Unexpected end of input",Qb="Explicit inexact syntax must come at the end of an object type",Fb="Opaque type aliases are not allowed in untyped mode",Hb="Unexpected proto modifier",qb="Unexpected reserved word",Gb="Unexpected reserved type",bb="Spreading a type is only allowed inside an object type",x00="Unexpected static modifier",r00="Unexpected `super` outside of a class method",e00="`super()` is only valid in a class constructor",t00="Type aliases are not allowed in untyped mode",n00="Type annotations are not allowed in untyped mode",u00="Type declarations are not allowed in untyped mode",i00="Type exports are not allowed in untyped mode",f00="Type imports are not allowed in untyped mode",c00="Interfaces are not allowed in untyped mode",s00="Unexpected variance sigil",o00="Found a decorator in an unsupported position.",v00="Invalid regular expression: missing /",a00="Unexpected whitespace between `#` and identifier",l00="`yield` is an invalid identifier in generators",p00="Yield expression not allowed in formal parameter",d00=[0,[11,"Duplicate export for `",[2,0,[12,96,0]]],"Duplicate export for `%s`"],y00=[0,[11,"Private fields may only be declared once. `#",[2,0,[11,"` is declared more than once.",0]]],"Private fields may only be declared once. `#%s` is declared more than once."],m00=[0,[11,"bigint enum members need to be initialized, e.g. `",[2,0,[11," = 1n,` in enum `",[2,0,[11,Rs,0]]]]],"bigint enum members need to be initialized, e.g. `%s = 1n,` in enum `%s`."],k00=[0,[11,"Boolean enum members need to be initialized. Use either `",[2,0,[11," = true,` or `",[2,0,[11," = false,` in enum `",[2,0,[11,Rs,0]]]]]]],"Boolean enum members need to be initialized. Use either `%s = true,` or `%s = false,` in enum `%s`."],h00=[0,[11,"Enum member names need to be unique, but the name `",[2,0,[11,"` has already been used before in enum `",[2,0,[11,Rs,0]]]]],"Enum member names need to be unique, but the name `%s` has already been used before in enum `%s`."],_00=[0,[11,RD,[2,0,[11,"` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",0]]],"Enum `%s` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers."],w00="The `...` must come at the end of the enum body. Remove the trailing comma.",T00="The `...` must come after all enum members. Move it to the end of the enum body.",S00=[0,[11,"Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `",[2,0,[11,Rs,0]]],"Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `%s`."],E00=[0,[11,"Enum type `",[2,0,[11,"` is not valid. ",[2,0,0]]]],"Enum type `%s` is not valid. %s"],g00=[0,[11,"Supplied enum type is not valid. ",[2,0,0]],"Supplied enum type is not valid. %s"],A00=[0,[11,"Enum member names and initializers are separated with `=`. Replace `",[2,0,[11,":` with `",[2,0,[11," =`.",0]]]]],"Enum member names and initializers are separated with `=`. Replace `%s:` with `%s =`."],P00=[0,[11,RD,[2,0,[11,"` has type `",[2,0,[11,"`, so the initializer of `",[2,0,[11,"` needs to be a ",[2,0,[11," literal.",0]]]]]]]]],"Enum `%s` has type `%s`, so the initializer of `%s` needs to be a %s literal."],C00=[0,[11,"Symbol enum members cannot be initialized. Use `",[2,0,[11,",` in enum `",[2,0,[11,Rs,0]]]]],"Symbol enum members cannot be initialized. Use `%s,` in enum `%s`."],N00=[0,[11,"The enum member initializer for `",[2,0,[11,"` needs to be a literal (either a boolean, number, or string) in enum `",[2,0,[11,Rs,0]]]]],"The enum member initializer for `%s` needs to be a literal (either a boolean, number, or string) in enum `%s`."],R00=[0,[11,"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `",[2,0,[11,"`, consider using `",[2,0,[11,"`, in enum `",[2,0,[11,Rs,0]]]]]]],"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%s`, consider using `%s`, in enum `%s`."],O00=[0,[11,"Number enum members need to be initialized, e.g. `",[2,0,[11," = 1,` in enum `",[2,0,[11,Rs,0]]]]],"Number enum members need to be initialized, e.g. `%s = 1,` in enum `%s`."],I00=[0,[11,"String enum members need to consistently either all use initializers, or use no initializers, in enum ",[2,0,[12,46,0]]],"String enum members need to consistently either all use initializers, or use no initializers, in enum %s."],L00=[0,[11,"Expected corresponding JSX closing tag for ",[2,0,0]],"Expected corresponding JSX closing tag for %s"],M00="immediately within another function.",D00="In strict mode code, functions can only be declared at top level or ",j00="inside a block, or as the body of an if statement.",U00="In non-strict mode code, functions can only be declared at top level, ",B00="static ",Y00=hx,X00="methods",J00="fields",V00=FM,z00=[0,[11,"Classes may not have ",[2,0,[2,0,[11," named `",[2,0,[11,Rs,0]]]]]],"Classes may not have %s%s named `%s`."],K00=rB,Z00=hx,W00=[0,[11,"String params require local bindings using `as` renaming. You can use `'",[2,0,[11,"' as ",[2,0,[2,0,[11,": ` ",0]]]]]],"String params require local bindings using `as` renaming. You can use `'%s' as %s%s: ` "],$00="Remove the period.",Q00="Indexed access uses bracket notation.",F00=[0,[11,"Invalid indexed access. ",[2,0,[11," Use the format `T[K]`.",0]]],"Invalid indexed access. %s Use the format `T[K]`."],H00=[0,[11,"Invalid flags supplied to RegExp constructor '",[2,0,[12,39,0]]],"Invalid flags supplied to RegExp constructor '%s'"],q00=[0,[11,"JSX element ",[2,0,[11," has no corresponding closing tag.",0]]],"JSX element %s has no corresponding closing tag."],G00=[0,[11,DD,[2,0,[11,"`. Parentheses are required to combine `??` with `&&` or `||` expressions.",0]]],"Unexpected token `%s`. Parentheses are required to combine `??` with `&&` or `||` expressions."],b00=[0,[2,0,[11," '",[2,0,[11,"' has already been declared",0]]]],"%s '%s' has already been declared"],xx0=hx,rx0=F3,ex0=" You can try using JavaScript private fields by prepending `#` to the field name.",tx0=Sl,nx0=" Fields and methods are public by default. You can simply omit the `public` keyword.",ux0=V3,ix0=[0,[11,"Flow does not support using `",[2,0,[11,"` in classes.",[2,0,0]]]],"Flow does not support using `%s` in classes.%s"],fx0=[0,[11,"Private fields must be declared before they can be referenced. `#",[2,0,[11,"` has not been declared.",0]]],"Private fields must be declared before they can be referenced. `#%s` has not been declared."],cx0=[0,[11,wU,[2,0,0]],"Unexpected %s"],sx0=[0,[11,DD,[2,0,[11,"`. Did you mean `",[2,0,[11,"`?",0]]]]],"Unexpected token `%s`. Did you mean `%s`?"],ox0=[0,[11,wU,[2,0,[11,", expected ",[2,0,0]]]],"Unexpected %s, expected %s"],vx0=[0,[11,"Undefined label '",[2,0,[12,39,0]]],"Undefined label '%s'"],ax0="Parse_error.Error",lx0=[0,[0,36,37],[0,48,58],[0,65,91],[0,95,96],[0,97,It],[0,G4,Yk],[0,MR,uh],[0,yN,id],[0,Lp,ig],[0,ha,MT],[0,bC,b8],[0,Gr,706],[0,xj,722],[0,736,741],[0,748,749],[0,750,751],[0,768,885],[0,886,888],[0,890,894],[0,895,896],[0,902,907],[0,908,909],[0,910,930],[0,WB,1014],[0,1015,1154],[0,1155,1160],[0,1162,1328],[0,1329,1367],[0,1369,1370],[0,1376,1417],[0,1425,1470],[0,1471,1472],[0,1473,1475],[0,1476,1478],[0,1479,1480],[0,1488,1515],[0,1519,1523],[0,1552,1563],[0,1568,1642],[0,1646,1748],[0,1749,1757],[0,1759,1769],[0,1770,1789],[0,1791,1792],[0,1808,1867],[0,1869,1970],[0,1984,2038],[0,2042,2043],[0,2045,2046],[0,hN,2094],[0,2112,2140],[0,2144,2155],[0,2208,2229],[0,2230,2238],[0,2259,2274],[0,2275,2404],[0,2406,2416],[0,2417,2436],[0,2437,2445],[0,2447,2449],[0,2451,2473],[0,2474,2481],[0,2482,2483],[0,2486,2490],[0,2492,2501],[0,2503,2505],[0,2507,2511],[0,2519,2520],[0,2524,2526],[0,2527,2532],[0,2534,2546],[0,2556,2557],[0,2558,2559],[0,2561,2564],[0,2565,2571],[0,2575,2577],[0,2579,2601],[0,2602,2609],[0,2610,2612],[0,2613,2615],[0,2616,2618],[0,2620,2621],[0,2622,2627],[0,2631,2633],[0,2635,2638],[0,2641,2642],[0,2649,2653],[0,2654,2655],[0,2662,2678],[0,2689,2692],[0,2693,2702],[0,2703,2706],[0,2707,2729],[0,2730,2737],[0,2738,2740],[0,2741,2746],[0,2748,2758],[0,2759,2762],[0,2763,2766],[0,2768,2769],[0,2784,2788],[0,2790,2800],[0,2809,2816],[0,2817,2820],[0,2821,2829],[0,2831,2833],[0,2835,2857],[0,2858,2865],[0,2866,2868],[0,2869,2874],[0,2876,2885],[0,2887,2889],[0,2891,2894],[0,2902,2904],[0,2908,2910],[0,2911,2916],[0,2918,2928],[0,2929,2930],[0,2946,2948],[0,2949,2955],[0,2958,2961],[0,2962,2966],[0,2969,2971],[0,2972,2973],[0,2974,2976],[0,2979,2981],[0,2984,2987],[0,2990,3002],[0,3006,3011],[0,3014,3017],[0,3018,3022],[0,3024,3025],[0,3031,3032],[0,3046,3056],[0,3072,3085],[0,3086,3089],[0,3090,3113],[0,3114,3130],[0,3133,3141],[0,3142,3145],[0,3146,3150],[0,3157,3159],[0,3160,3163],[0,3168,3172],[0,3174,3184],[0,3200,3204],[0,3205,3213],[0,3214,3217],[0,3218,3241],[0,3242,3252],[0,3253,3258],[0,3260,3269],[0,3270,3273],[0,3274,3278],[0,3285,3287],[0,3294,3295],[0,3296,3300],[0,3302,3312],[0,3313,3315],[0,3328,3332],[0,3333,3341],[0,3342,3345],[0,3346,3397],[0,3398,3401],[0,3402,3407],[0,3412,3416],[0,3423,3428],[0,3430,3440],[0,3450,3456],[0,3458,3460],[0,3461,3479],[0,3482,3506],[0,3507,3516],[0,3517,3518],[0,3520,3527],[0,3530,3531],[0,3535,3541],[0,3542,3543],[0,3544,3552],[0,3558,3568],[0,3570,3572],[0,3585,3643],[0,3648,3663],[0,3664,3674],[0,3713,3715],[0,3716,3717],[0,3718,3723],[0,3724,3748],[0,3749,3750],[0,3751,3774],[0,3776,3781],[0,3782,3783],[0,3784,3790],[0,3792,3802],[0,3804,3808],[0,3840,3841],[0,3864,3866],[0,3872,3882],[0,3893,3894],[0,3895,3896],[0,3897,3898],[0,3902,3912],[0,3913,3949],[0,3953,3973],[0,3974,3992],[0,3993,4029],[0,4038,4039],[0,oU,4170],[0,4176,4254],[0,4256,4294],[0,4295,4296],[0,4301,4302],[0,4304,4347],[0,4348,4681],[0,4682,4686],[0,4688,4695],[0,4696,4697],[0,4698,4702],[0,4704,4745],[0,4746,4750],[0,4752,4785],[0,4786,4790],[0,4792,4799],[0,4800,4801],[0,4802,4806],[0,4808,4823],[0,4824,4881],[0,4882,4886],[0,4888,4955],[0,4957,4960],[0,4969,4978],[0,4992,5008],[0,5024,5110],[0,5112,5118],[0,5121,5741],[0,5743,xS],[0,5761,5787],[0,5792,5867],[0,5870,5881],[0,5888,5901],[0,5902,5909],[0,5920,5941],[0,5952,5972],[0,5984,5997],[0,5998,6001],[0,6002,6004],[0,6016,6100],[0,6103,6104],[0,6108,6110],[0,6112,6122],[0,6155,6158],[0,6160,6170],[0,6176,6265],[0,6272,6315],[0,6320,6390],[0,6400,6431],[0,6432,6444],[0,6448,6460],[0,6470,6510],[0,6512,6517],[0,6528,6572],[0,6576,6602],[0,6608,6619],[0,6656,6684],[0,6688,6751],[0,6752,6781],[0,6783,6794],[0,6800,6810],[0,6823,6824],[0,6832,6846],[0,6912,6988],[0,6992,7002],[0,7019,7028],[0,7040,7156],[0,7168,7224],[0,7232,7242],[0,7245,7294],[0,7296,7305],[0,7312,7355],[0,7357,7360],[0,7376,7379],[0,7380,7419],[0,7424,7674],[0,7675,7958],[0,7960,7966],[0,7968,8006],[0,8008,8014],[0,8016,8024],[0,8025,8026],[0,8027,8028],[0,8029,8030],[0,8031,8062],[0,8064,8117],[0,8118,8125],[0,8126,8127],[0,8130,8133],[0,8134,8141],[0,8144,8148],[0,8150,8156],[0,8160,8173],[0,8178,8181],[0,8182,8189],[0,$U,bj],[0,8255,8257],[0,8276,8277],[0,$8,8306],[0,ad,8320],[0,8336,8349],[0,8400,8413],[0,8417,8418],[0,8421,8433],[0,Rd,8451],[0,J5,8456],[0,8458,B8],[0,o8,8470],[0,$B,8478],[0,Ud,wp],[0,T8,S8],[0,Hp,x8],[0,8490,8506],[0,8508,8512],[0,8517,8522],[0,h8,8527],[0,8544,8585],[0,11264,11311],[0,11312,11359],[0,11360,11493],[0,11499,11508],[0,11520,Q4],[0,W8,11560],[0,$4,11566],[0,11568,11624],[0,Y5,11632],[0,n5,11671],[0,11680,Np],[0,11688,P8],[0,11696,ep],[0,11704,M8],[0,11712,rd],[0,11720,Q5],[0,11728,Wp],[0,11736,11743],[0,11744,11776],[0,12293,12296],[0,12321,W4],[0,12337,12342],[0,12344,12349],[0,12353,12439],[0,12441,H5],[0,12449,Sd],[0,12540,12544],[0,12549,j5],[0,12593,12687],[0,12704,12731],[0,12784,12800],[0,13312,19894],[0,19968,40944],[0,40960,42125],[0,42192,42238],[0,42240,42509],[0,42512,42540],[0,42560,42608],[0,42612,td],[0,42623,42738],[0,42775,42784],[0,42786,42889],[0,42891,42944],[0,42946,42951],[0,Q8,43048],[0,43072,43124],[0,43136,43206],[0,43216,43226],[0,43232,43256],[0,W5,fd],[0,43261,43310],[0,43312,43348],[0,43360,43389],[0,43392,43457],[0,Up,43482],[0,43488,wd],[0,43520,43575],[0,43584,43598],[0,43600,43610],[0,43616,43639],[0,D8,43715],[0,43739,43742],[0,43744,43760],[0,43762,43767],[0,43777,43783],[0,43785,43791],[0,43793,43799],[0,43808,v5],[0,43816,y8],[0,43824,d5],[0,43868,_8],[0,43888,44011],[0,44012,44014],[0,44016,44026],[0,44032,55204],[0,55216,55239],[0,55243,55292],[0,63744,64110],[0,64112,64218],[0,64256,64263],[0,64275,64280],[0,Vp,r5],[0,64298,Td],[0,64312,sd],[0,i5,dp],[0,64320,jp],[0,64323,S5],[0,64326,64434],[0,64467,64830],[0,64848,64912],[0,64914,64968],[0,65008,65020],[0,65024,65040],[0,65056,65072],[0,65075,65077],[0,65101,65104],[0,65136,Dp],[0,65142,65277],[0,65296,65306],[0,65313,65339],[0,65343,K5],[0,65345,65371],[0,65382,65471],[0,65474,65480],[0,65482,65488],[0,65490,65496],[0,65498,65501],[0,il,g8],[0,65549,R8],[0,65576,Sp],[0,65596,A5],[0,65599,65614],[0,65616,65630],[0,65664,65787],[0,65856,65909],[0,66045,66046],[0,66176,66205],[0,66208,66257],[0,66272,66273],[0,66304,66336],[0,66349,66379],[0,66384,66427],[0,66432,66462],[0,66464,66500],[0,66504,w5],[0,66513,66518],[0,66560,66718],[0,66720,66730],[0,66736,66772],[0,66776,66812],[0,66816,66856],[0,66864,66916],[0,67072,67383],[0,67392,67414],[0,67424,67432],[0,67584,67590],[0,_d,E5],[0,67594,b5],[0,67639,67641],[0,cd,67645],[0,67647,67670],[0,67680,67703],[0,67712,67743],[0,67808,Od],[0,67828,67830],[0,67840,67862],[0,67872,67898],[0,67968,68024],[0,68030,68032],[0,Vd,68100],[0,68101,68103],[0,68108,kp],[0,68117,Md],[0,68121,68150],[0,68152,68155],[0,68159,68160],[0,68192,68221],[0,68224,68253],[0,68288,b4],[0,68297,68327],[0,68352,68406],[0,68416,68438],[0,68448,68467],[0,68480,68498],[0,68608,68681],[0,68736,68787],[0,68800,68851],[0,68864,68904],[0,68912,68922],[0,69376,69405],[0,w8,69416],[0,69424,69457],[0,69600,69623],[0,69632,69703],[0,69734,Op],[0,69759,69819],[0,69840,69865],[0,69872,69882],[0,69888,69941],[0,69942,69952],[0,q8,E8],[0,69968,70004],[0,up,70007],[0,70016,70085],[0,70089,70093],[0,70096,rp],[0,Dd,70109],[0,70144,pd],[0,70163,70200],[0,70206,70207],[0,70272,L8],[0,h5,hp],[0,70282,o5],[0,70287,sp],[0,70303,70313],[0,70320,70379],[0,70384,70394],[0,70400,J8],[0,70405,70413],[0,70415,70417],[0,70419,V8],[0,70442,Ap],[0,70450,Ld],[0,70453,70458],[0,70459,70469],[0,70471,70473],[0,70475,70478],[0,jd,70481],[0,70487,70488],[0,70493,70500],[0,70502,70509],[0,70512,70517],[0,70656,70731],[0,70736,70746],[0,xd,70752],[0,70784,L5],[0,N5,70856],[0,70864,70874],[0,71040,71094],[0,71096,71105],[0,71128,71134],[0,71168,71233],[0,t8,71237],[0,71248,71258],[0,71296,71353],[0,71360,71370],[0,71424,71451],[0,71453,71468],[0,71472,71482],[0,71680,71739],[0,71840,71914],[0,71935,71936],[0,72096,72104],[0,72106,72152],[0,72154,U8],[0,V4,72165],[0,dd,72255],[0,72263,72264],[0,k5,72346],[0,m8,72350],[0,72384,72441],[0,72704,l5],[0,72714,72759],[0,72760,72769],[0,72784,72794],[0,72818,72848],[0,72850,72872],[0,72873,72887],[0,72960,np],[0,72968,I5],[0,72971,73015],[0,73018,73019],[0,73020,73022],[0,73023,73032],[0,73040,73050],[0,73056,hd],[0,73063,z8],[0,73066,73103],[0,73104,73106],[0,73107,73113],[0,73120,73130],[0,73440,73463],[0,73728,74650],[0,74752,74863],[0,74880,75076],[0,77824,78895],[0,82944,83527],[0,92160,92729],[0,92736,92767],[0,92768,92778],[0,92880,92910],[0,92912,92917],[0,92928,92983],[0,92992,92996],[0,93008,93018],[0,93027,93048],[0,93053,93072],[0,93760,93824],[0,93952,94027],[0,F8,94088],[0,94095,94112],[0,94176,v8],[0,Zp,94180],[0,94208,100344],[0,100352,101107],[0,110592,110879],[0,110928,110931],[0,110948,110952],[0,110960,111356],[0,113664,113771],[0,113776,113789],[0,113792,113801],[0,113808,113818],[0,113821,113823],[0,119141,119146],[0,119149,119155],[0,119163,119171],[0,119173,119180],[0,119210,119214],[0,119362,119365],[0,119808,Z4],[0,119894,K8],[0,119966,119968],[0,Jd,119971],[0,119973,119975],[0,119977,i8],[0,119982,zp],[0,z5,O5],[0,119997,m5],[0,120005,Xp],[0,120071,120075],[0,120077,f8],[0,120086,T5],[0,120094,d8],[0,120123,Gp],[0,120128,ld],[0,$p,120135],[0,120138,Fp],[0,120146,120486],[0,120488,Ed],[0,120514,I8],[0,120540,a5],[0,120572,q4],[0,120598,fp],[0,120630,md],[0,120656,F5],[0,120688,Bd],[0,120714,c5],[0,120746,Nd],[0,120772,120780],[0,120782,120832],[0,121344,121399],[0,121403,121453],[0,121461,121462],[0,121476,121477],[0,121499,121504],[0,121505,121520],[0,122880,122887],[0,122888,122905],[0,122907,122914],[0,122915,122917],[0,122918,122923],[0,123136,123181],[0,123184,123198],[0,123200,123210],[0,Ip,123215],[0,123584,123642],[0,124928,125125],[0,125136,125143],[0,125184,125260],[0,125264,125274],[0,126464,U5],[0,126469,Pd],[0,126497,q5],[0,qp,126501],[0,cp,P5],[0,126505,vp],[0,126516,r8],[0,z4,u5],[0,e5,126524],[0,Z5,126531],[0,$5,Mp],[0,R5,g5],[0,gd,V5],[0,126541,j8],[0,126545,Pp],[0,gr,126549],[0,C5,Ad],[0,gp,k8],[0,c8,Yd],[0,H4,od],[0,ip,Cd],[0,126561,e8],[0,tp,126565],[0,126567,nd],[0,126572,xp],[0,126580,A8],[0,126585,Bp],[0,yp,Xd],[0,126592,f5],[0,126603,126620],[0,126625,Z8],[0,126629,x5],[0,126635,126652],[0,131072,173783],[0,173824,177973],[0,177984,178206],[0,178208,183970],[0,183984,191457],[0,194560,195102],[0,917760,918e3]],px0=[0,1,0],dx0=[0,0,[0,1,0],[0,1,0]],yx0=kU,mx0="end of input",kx0=wl,hx0="template literal part",_x0=wl,wx0=cU,Tx0=kU,Sx0=wl,Ex0=_a,gx0=wl,Ax0=wv,Px0=wl,Cx0=ja,Nx0="an",Rx0=Nt,Ox0=Mt,Ix0=[0,[11,"token `",[2,0,[12,96,0]]],"token `%s`"],Lx0="{",Mx0=G8,Dx0="{|",jx0="|}",Ux0=KM,Bx0=ZS,Yx0="[",Xx0="]",Jx0=CT,Vx0=HM,zx0=ic,Kx0="=>",Zx0="...",Wx0=Pj,$x0=FM,Qx0=da,Fx0=s8,Hx0=Po,qx0=G3,Gx0=Me,bx0=Be,xr0=lv,rr0=Ue,er0=yd,tr0=pl,nr0=Qp,ur0=Tp,ir0=sl,fr0=ma,cr0=_v,sr0=Os,or0=Cs,vr0=Le,ar0=bp,lr0=t5,pr0=Re,dr0=pv,yr0=ed,mr0=Yp,kr0=N8,hr0=W3,_r0=Bc,wr0=De,Tr0=Kp,Sr0=av,Er0=cl,gr0=Ps,Ar0=Is,Pr0=ll,Cr0=p8,Nr0=D2,Rr0=Oa,Or0=Tv,Ir0=G2,Lr0=u8,Mr0=Sl,Dr0=F3,jr0=V3,Ur0=B2,Br0=Oe,Yr0=el,Xr0=fi,Jr0=Xh,Vr0=Hh,zr0=Co,Kr0=Pv,Zr0="%checks",Wr0=EB,$r0=PD,Qr0=DU,Fr0=uY,Hr0=Uj,qr0=kD,Gr0=JM,br0=pY,x10=lj,r10=wD,e10=wY,t10=AD,n10=qj,u10=aY,i10=eB,f10=X_,c10="?.",s10=hm,o10=rB,v10=Iv,a10=Tj,l10=yY,p10=SY,d10=O8,y10=J4,m10=dD,k10=FD,h10=lD,_10=$D,w10=ID,T10=NU,S10=WT,E10=b3,g10=cD,A10=gD,P10=WM,C10=js,N10=Lt,R10=q2,O10=AB,I10=VD,L10=qD,M10=zD,D10=vB,j10=VB,U10=Lj,B10=hx,Y10=y5,X10=_p,J10=ce,V10=_a,z10=wv,K10=ja,Z10=Is,W10=wx,$10=B5,Q10=X8,F10=vd,H10=Y8,q10=Ea,G10=Jj,b10=ml,x20=ka,r20=jU,e20=sj,t20=J3,n20=J3,u20=dY,i20=J3,f20=J3,c20=G8,s20=G8,o20=dY,v20=q2,a20=q2,l20=xl,p20=D5,d20="T_LCURLY",y20="T_RCURLY",m20="T_LCURLYBAR",k20="T_RCURLYBAR",h20="T_LPAREN",_20="T_RPAREN",w20="T_LBRACKET",T20="T_RBRACKET",S20="T_SEMICOLON",E20="T_COMMA",g20="T_PERIOD",A20="T_ARROW",P20="T_ELLIPSIS",C20="T_AT",N20="T_POUND",R20="T_FUNCTION",O20="T_IF",I20="T_IN",L20="T_INSTANCEOF",M20="T_RETURN",D20="T_SWITCH",j20="T_THIS",U20="T_THROW",B20="T_TRY",Y20="T_VAR",X20="T_WHILE",J20="T_WITH",V20="T_CONST",z20="T_LET",K20="T_NULL",Z20="T_FALSE",W20="T_TRUE",$20="T_BREAK",Q20="T_CASE",F20="T_CATCH",H20="T_CONTINUE",q20="T_DEFAULT",G20="T_DO",b20="T_FINALLY",xe0="T_FOR",re0="T_CLASS",ee0="T_EXTENDS",te0="T_STATIC",ne0="T_ELSE",ue0="T_NEW",ie0="T_DELETE",fe0="T_TYPEOF",ce0="T_VOID",se0="T_ENUM",oe0="T_EXPORT",ve0="T_IMPORT",ae0="T_SUPER",le0="T_IMPLEMENTS",pe0="T_INTERFACE",de0="T_PACKAGE",ye0="T_PRIVATE",me0="T_PROTECTED",ke0="T_PUBLIC",he0="T_YIELD",_e0="T_DEBUGGER",we0="T_DECLARE",Te0="T_TYPE",Se0="T_OPAQUE",Ee0="T_OF",ge0="T_ASYNC",Ae0="T_AWAIT",Pe0="T_CHECKS",Ce0="T_RSHIFT3_ASSIGN",Ne0="T_RSHIFT_ASSIGN",Re0="T_LSHIFT_ASSIGN",Oe0="T_BIT_XOR_ASSIGN",Ie0="T_BIT_OR_ASSIGN",Le0="T_BIT_AND_ASSIGN",Me0="T_MOD_ASSIGN",De0="T_DIV_ASSIGN",je0="T_MULT_ASSIGN",Ue0="T_EXP_ASSIGN",Be0="T_MINUS_ASSIGN",Ye0="T_PLUS_ASSIGN",Xe0="T_NULLISH_ASSIGN",Je0="T_AND_ASSIGN",Ve0="T_OR_ASSIGN",ze0="T_ASSIGN",Ke0="T_PLING_PERIOD",Ze0="T_PLING_PLING",We0="T_PLING",$e0="T_COLON",Qe0="T_OR",Fe0="T_AND",He0="T_BIT_OR",qe0="T_BIT_XOR",Ge0="T_BIT_AND",be0="T_EQUAL",xt0="T_NOT_EQUAL",rt0="T_STRICT_EQUAL",et0="T_STRICT_NOT_EQUAL",tt0="T_LESS_THAN_EQUAL",nt0="T_GREATER_THAN_EQUAL",ut0="T_LESS_THAN",it0="T_GREATER_THAN",ft0="T_LSHIFT",ct0="T_RSHIFT",st0="T_RSHIFT3",ot0="T_PLUS",vt0="T_MINUS",at0="T_DIV",lt0="T_MULT",pt0="T_EXP",dt0="T_MOD",yt0="T_NOT",mt0="T_BIT_NOT",kt0="T_INCR",ht0="T_DECR",_t0="T_EOF",wt0="T_ANY_TYPE",Tt0="T_MIXED_TYPE",St0="T_EMPTY_TYPE",Et0="T_NUMBER_TYPE",gt0="T_BIGINT_TYPE",At0="T_STRING_TYPE",Pt0="T_VOID_TYPE",Ct0="T_SYMBOL_TYPE",Nt0="T_UNKNOWN_TYPE",Rt0="T_NEVER_TYPE",Ot0="T_UNDEFINED_TYPE",It0="T_KEYOF",Lt0="T_READONLY",Mt0="T_INFER",Dt0="T_IS",jt0="T_ASSERTS",Ut0=bD,Bt0=bD,Yt0="T_NUMBER",Xt0="T_BIGINT",Jt0="T_STRING",Vt0="T_TEMPLATE_PART",zt0="T_IDENTIFIER",Kt0="T_REGEXP",Zt0="T_INTERPRETER",Wt0="T_ERROR",$t0="T_JSX_IDENTIFIER",Qt0=vY,Ft0=vY,Ht0="T_BOOLEAN_TYPE",qt0="T_NUMBER_SINGLETON_TYPE",Gt0="T_BIGINT_SINGLETON_TYPE",bt0=[0,uU,US,9],xn0=[0,uU,GT,9],rn0=hj,en0="*/",tn0=hj,nn0="unreachable line_comment",un0="unreachable string_quote",in0="\\",fn0="unreachable template_part",cn0=`\r +`,sn0=hT,on0="unreachable regexp_class",vn0=DB,an0="unreachable regexp_body",ln0=hx,pn0=hx,dn0=hx,yn0=hx,mn0=gB,kn0="{'>'}",hn0=b3,_n0="{'}'}",wn0=G8,Tn0=So,Sn0=CT,En0=J4,gn0=gB,An0=So,Pn0=CT,Cn0=J4,Nn0="unreachable type_token wholenumber",Rn0="unreachable type_token wholebigint",On0="unreachable type_token floatbigint",In0="unreachable type_token scinumber",Ln0="unreachable type_token scibigint",Mn0="unreachable type_token hexnumber",Dn0="unreachable type_token hexbigint",jn0="unreachable type_token legacyoctnumber",Un0="unreachable type_token octnumber",Bn0="unreachable type_token octbigint",Yn0="unreachable type_token binnumber",Xn0="unreachable type_token bigbigint",Jn0="unreachable type_token",Vn0=LB,zn0=[11,1],Kn0=[11,0],Zn0="unreachable template_tail",Wn0=hx,$n0=hx,Qn0="unreachable jsx_child",Fn0="unreachable jsx_tag",Hn0=[0,TD],qn0=[0,913],Gn0=[0,ha],bn0=[0,gh],x70=[0,QD],r70=[0,fY],e70=[0,8747],t70=[0,TB],n70=[0,916],u70=[0,8225],i70=[0,935],f70=[0,hU],c70=[0,914],s70=[0,YU],o70=[0,WD],v70=[0,QB],a70=[0,915],l70=[0,tY],p70=[0,919],d70=[0,917],y70=[0,OR],m70=[0,dB],k70=[0,MD],h70=[0,924],_70=[0,923],w70=[0,922],T70=[0,mY],S70=[0,921],E70=[0,ej],g70=[0,GT],A70=[0,qM],P70=[0,bC],C70=[0,927],N70=[0,937],R70=[0,sY],O70=[0,aE],I70=[0,GD],L70=[0,338],M70=[0,352],D70=[0,929],j70=[0,936],U70=[0,8243],B70=[0,928],Y70=[0,934],X70=[0,cB],J70=[0,ZM],V70=[0,933],z70=[0,JU],K70=[0,aB],Z70=[0,FB],W70=[0,920],$70=[0,932],Q70=[0,eD],F70=[0,Gj],H70=[0,Zj],q70=[0,IU],G70=[0,918],b70=[0,376],xu0=[0,tU],ru0=[0,926],eu0=[0,MU],tu0=[0,WB],nu0=[0,925],uu0=[0,39],iu0=[0,8736],fu0=[0,8743],cu0=[0,38],su0=[0,945],ou0=[0,8501],vu0=[0,Aa],au0=[0,8226],lu0=[0,Vj],pu0=[0,946],du0=[0,8222],yu0=[0,LU],mu0=[0,oY],ku0=[0,8776],hu0=[0,PB],_u0=[0,8773],wu0=[0,9827],Tu0=[0,xj],Su0=[0,967],Eu0=[0,Hj],gu0=[0,id],Au0=[0,lU],Pu0=[0,gT],Cu0=[0,8595],Nu0=[0,8224],Ru0=[0,8659],Ou0=[0,Cj],Iu0=[0,8746],Lu0=[0,8629],Mu0=[0,p5],Du0=[0,8745],ju0=[0,8195],Uu0=[0,8709],Bu0=[0,hY],Yu0=[0,TY],Xu0=[0,Oj],Ju0=[0,b8],Vu0=[0,9830],zu0=[0,8707],Ku0=[0,8364],Zu0=[0,XB],Wu0=[0,wa],$u0=[0,951],Qu0=[0,8801],Fu0=[0,949],Hu0=[0,8194],qu0=[0,8805],Gu0=[0,947],bu0=[0,8260],xi0=[0,CD],ri0=[0,gU],ei0=[0,US],ti0=[0,8704],ni0=[0,TT],ui0=[0,KU],ii0=[0,8230],fi0=[0,9829],ci0=[0,8596],si0=[0,8660],oi0=[0,62],vi0=[0,402],ai0=[0,948],li0=[0,Yj],pi0=[0,H8],di0=[0,8712],yi0=[0,aU],mi0=[0,953],ki0=[0,8734],hi0=[0,8465],_i0=[0,bB],wi0=[0,8220],Ti0=[0,8968],Si0=[0,8592],Ei0=[0,Yk],gi0=[0,10216],Ai0=[0,955],Pi0=[0,8656],Ci0=[0,954],Ni0=[0,60],Ri0=[0,8216],Oi0=[0,8249],Ii0=[0,bj],Li0=[0,9674],Mi0=[0,8727],Di0=[0,8970],ji0=[0,rU],Ui0=[0,8711],Bi0=[0,956],Yi0=[0,8722],Xi0=[0,yN],Ji0=[0,MR],Vi0=[0,8212],zi0=[0,aD],Ki0=[0,8804],Zi0=[0,957],Wi0=[0,zM],$i0=[0,8836],Qi0=[0,8713],Fi0=[0,Kj],Hi0=[0,8715],qi0=[0,8800],Gi0=[0,8853],bi0=[0,959],xf0=[0,969],rf0=[0,8254],ef0=[0,SB],tf0=[0,339],nf0=[0,MC],uf0=[0,HU],if0=[0,uh],ff0=[0,rl],cf0=[0,8855],sf0=[0,SS],of0=[0,Gr],vf0=[0,Lp],af0=[0,G4],lf0=[0,zB],pf0=[0,ND],df0=[0,982],yf0=[0,960],mf0=[0,966],kf0=[0,8869],hf0=[0,8240],_f0=[0,8706],wf0=[0,8744],Tf0=[0,8211],Sf0=[0,10217],Ef0=[0,8730],gf0=[0,8658],Af0=[0,34],Pf0=[0,968],Cf0=[0,8733],Nf0=[0,8719],Rf0=[0,961],Of0=[0,8971],If0=[0,lY],Lf0=[0,8476],Mf0=[0,8221],Df0=[0,8969],jf0=[0,8594],Uf0=[0,ig],Bf0=[0,XU],Yf0=[0,fB],Xf0=[0,8901],Jf0=[0,353],Vf0=[0,8218],zf0=[0,8217],Kf0=[0,8250],Zf0=[0,8835],Wf0=[0,8721],$f0=[0,8838],Qf0=[0,8834],Ff0=[0,9824],Hf0=[0,8764],qf0=[0,962],Gf0=[0,963],bf0=[0,8207],xc0=[0,952],rc0=[0,8756],ec0=[0,964],tc0=[0,l8],nc0=[0,8839],uc0=[0,$M],ic0=[0,pB],fc0=[0,Ba],cc0=[0,8657],sc0=[0,8482],oc0=[0,MT],vc0=[0,732],ac0=[0,Ia],lc0=[0,8201],pc0=[0,977],dc0=[0,$B],yc0=[0,Av],mc0=[0,965],kc0=[0,978],hc0=[0,BT],_c0=[0,pk],wc0=[0,Ug],Tc0=[0,$U],Sc0=[0,8205],Ec0=[0,950],gc0=[0,$3],Ac0=[0,dN],Pc0=[0,og],Cc0=[0,958],Nc0=[0,8593],Rc0=[0,vj],Oc0=[0,8242],Ic0=[0,dE],Lc0="unreachable regexp",Mc0="unreachable token wholenumber",Dc0="unreachable token wholebigint",jc0="unreachable token floatbigint",Uc0="unreachable token scinumber",Bc0="unreachable token scibigint",Yc0="unreachable token hexnumber",Xc0="unreachable token hexbigint",Jc0="unreachable token legacyoctnumber",Vc0="unreachable token legacynonoctnumber",zc0="unreachable token octnumber",Kc0="unreachable token octbigint",Zc0="unreachable token bignumber",Wc0="unreachable token bigint",$c0="unreachable token",Qc0=LB,Fc0=[7,"#!"],Hc0="expected ?",qc0="unreachable string_escape",Gc0=xe,bc0=K3,xs0=K3,rs0=xe,es0=bE,ts0=tB,ns0="n",us0="r",is0="t",fs0=ZD,cs0=K3,ss0=So,os0=So,vs0="unreachable id_char",as0=So,ls0=So,ps0=K3,ds0=jD,ys0=Bj,ms0=uS,ks0=[24,"token ILLEGAL"],hs0=[0,[11,"the identifier `",[2,0,[12,96,0]]],"the identifier `%s`"],_s0=[0,1],ws0=[0,1],Ts0=kj,Ss0=kj,Es0=[0,[11,"an identifier. When exporting a ",[2,0,[11," as a named export, you must specify a ",[2,0,[11," name. Did you mean `export default ",[2,0,[11," ...`?",0]]]]]]],"an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `export default %s ...`?"],gs0=mp,As0="Peeking current location when not available",Ps0=[0,"src/parser/parser_env.ml",351,9],Cs0="Internal Error: Tried to add_declared_private with outside of class scope.",Ns0="Internal Error: `exit_class` called before a matching `enter_class`",Rs0=hx,Os0=[0,0,0],Is0=[0,0,0],Ls0="Parser_env.Try.Rollback",Ms0=hx,Ds0=hx,js0=[0,B2,si,_f,pj,Ij,Vf,U2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Oi,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Ue,Rf,Ii,jc,Sf,Xf,xu,Iu,Be,ff,E7,qi,Fi,Ic,M7,qu,Sc,Me,k7,D7,xf,Tu,Uu,du,Ec,je,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Oc,wc,z7,Lu,Yc,yn,If,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ir,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,G2,I7,$f,yu,hf,p7,Ku,ou,Ei,D2,P7,s7,g7,Nt,Ou,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,H1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,ce,Mi,Rc,Of,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Re,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,dU,di,oB,uj,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,O7,Le,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],Us0=[0,B2,si,_f,Vf,U2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Oi,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Ue,Rf,Ii,jc,Sf,Xf,xu,Iu,Be,ff,E7,qi,Fi,Ic,M7,qu,Sc,Me,k7,D7,xf,Tu,Uu,du,Ec,je,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Oc,wc,z7,Lu,Yc,yn,If,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ir,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,G2,I7,$f,yu,hf,p7,Ku,ou,Ei,D2,P7,s7,g7,Nt,Ou,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,H1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,ce,Mi,Rc,Of,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Re,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,O7,Le,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],Bs0=[0,Ic,Vn,ei,Ou,Kn,O7,Uc,qf,li,r7,$u,Jc,sc,Be,nu,Qf,df,pf,lc,a7,I7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Nt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Iu,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,If,Cf,$c,d7,_i,su,zf,uu,F7,oi,je,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,U2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,ce,G7,wi,B2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Oc,ec,qc,ir,D2,Me,C7,Oi,ff,H7,Ue,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,Of,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,H1,Lu,nc,xi,Qi,zn,eu,Fi,Re,$n,Gu,fu,af,ac,Ii,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Le,Mf,G2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],Ys0=[0,Ic,Vn,ei,Ou,Kn,O7,Uc,qf,li,r7,$u,Jc,sc,Be,nu,Qf,df,pf,lc,a7,I7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Nt,Vf,Ij,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Iu,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,If,Cf,$c,d7,oB,_i,su,zf,uu,F7,oi,je,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,U2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,ce,G7,wi,B2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Oc,ec,qc,ir,D2,Me,C7,Oi,ff,H7,Ue,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,uj,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,dU,Df,Hc,Rc,N7,zc,pj,Of,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,H1,Lu,nc,xi,Qi,zn,eu,Fi,Re,$n,Gu,fu,af,ac,Ii,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Le,Mf,G2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],Xs0=da,Js0=s8,Vs0=Po,zs0=G3,Ks0=Me,Zs0=Be,Ws0=lv,$s0=Ue,Qs0=yd,Fs0=pl,Hs0=Qp,qs0=Tp,Gs0=sl,bs0=ma,xo0=_v,ro0=Os,eo0=Cs,to0=Le,no0=bp,uo0=t5,io0=Re,fo0=pv,co0=ed,so0=Yp,oo0=N8,vo0=W3,ao0=Bc,lo0=De,po0=Kp,do0=av,yo0=cl,mo0=Ps,ko0=Is,ho0=ll,_o0=p8,wo0=D2,To0=Oa,So0=Tv,Eo0=G2,go0=u8,Ao0=Sl,Po0=F3,Co0=V3,No0=B2,Ro0=Oe,Oo0=el,Io0=fi,Lo0=Xh,Mo0=Hh,Do0=Co,jo0=Pv,Uo0=y5,Bo0=_p,Yo0=ce,Xo0=_a,Jo0=wv,Vo0=ja,zo0=Is,Ko0=wx,Zo0=B5,Wo0=X8,$o0=vd,Qo0=Y8,Fo0=Ea,Ho0=ml,qo0=ka,Go0=xl,bo0=D5,xv0=[0,mp],rv0=hx,ev0=[0,1],tv0=[0,Ta,1416,6],nv0=[0,Ta,1419,6],uv0=[0,Ta,1522,8],iv0=[0,1],fv0=[0,Ta,1539,8],cv0="Can not have both `static` and `proto`",sv0=De,ov0=YN,vv0=[0,0,0,0],av0=[0,0],lv0=[0,[0,0,0,0,0]],pv0="You should only call render_type after making sure the next token is a renders variant",dv0=ml,yv0=ka,mv0=[0,"a number literal type"],kv0=[0,0],hv0=_o,_v0=[0,0],wv0=[0,"a type"],Tv0=[0,0],Sv0=[0,0],Ev0=[17,1],gv0=[17,0],Av0=[0,Ta,SS,15],Pv0=[0,Ta,aE,15],Cv0=Lt,Nv0=Lt,Rv0=X5,Ov0=kl,Iv0=[0,[11,"Failure while looking up ",[2,0,[11,". Index: ",[4,0,0,0,[11,". Length: ",[4,0,0,0,[12,46,0]]]]]]],"Failure while looking up %s. Index: %d. Length: %d."],Lv0=[0,0,0,0],Mv0="Offset_utils.Offset_lookup_failed",Dv0=y1,jv0=Xj,Uv0=kl,Bv0=X5,Yv0=OU,Xv0=kl,Jv0=X5,Vv0=Lm,zv0=Ig,Kv0="normal",Zv0=fi,Wv0="jsxTag",$v0="jsxChild",Qv0="template",Fv0=cU,Hv0="context",qv0=fi,Gv0=[6,0],bv0=[0,0],xa0=[0,1],ra0=[0,4],ea0=[0,2],ta0=[0,3],na0=[0,0],ua0=[0,0,0,0,0,0],ia0=_o,fa0=[0,75],ca0=[0,hx,0],sa0=vn,oa0=[0,75],va0=[0,75],aa0=da,la0=[0,hx,0],pa0=[0,0,0],da0=[0,0,0],ya0=[0,83],ma0=q2,ka0=q2,ha0=[0,"a regular expression"],_a0=hx,wa0=hx,Ta0=hx,Sa0=[0,"src/parser/expression_parser.ml",1388,17],Ea0=[0,"a template literal part"],ga0=[0,[0,hx,hx],1],Aa0=[0,0],Pa0=K3,Ca0=jD,Na0=uS,Ra0=uS,Oa0=Bj,Ia0=[0,75],La0=[0,1],Ma0=[0,1],Da0=[0,1],ja0=[0,1],Ua0=[0,1],Ba0=Ca,Ya0=av,Xa0=[0,"the identifier `target`"],Ja0=[0,0],Va0=D2,za0=hl,Ka0=hl,Za0=Oa,Wa0=[0,"either a call or access of `super`"],$a0=Oa,Qa0=[0,1],Fa0=[0,0],Ha0=[0,1],qa0=[0,0],Ga0=[0,1],ba0=[0,0],x30=[0,2],r30=[0,3],e30=[0,7],t30=[0,6],n30=[0,4],u30=[0,5],i30=[0,6],f30=[0,[0,17,[0,2]]],c30=[0,[0,18,[0,3]]],s30=[0,[0,19,[0,4]]],o30=[0,[0,0,[0,5]]],v30=[0,[0,1,[0,5]]],a30=[0,[0,2,[0,5]]],l30=[0,[0,3,[0,5]]],p30=[0,[0,5,[0,6]]],d30=[0,[0,7,[0,6]]],y30=[0,[0,4,[0,6]]],m30=[0,[0,6,[0,6]]],k30=[0,[0,8,[0,7]]],h30=[0,[0,9,[0,7]]],_30=[0,[0,10,[0,7]]],w30=[0,[0,11,[0,8]]],T30=[0,[0,12,[0,8]]],S30=[0,[0,15,[0,9]]],E30=[0,[0,13,[0,9]]],g30=[0,[0,14,[1,10]]],A30=[0,[0,16,[0,9]]],P30=[0,[0,21,[0,6]]],C30=[0,[0,20,[0,6]]],N30=[20,hm],R30=[0,[0,8]],O30=[0,[0,7]],I30=[0,[0,6]],L30=[0,[0,10]],M30=[0,[0,9]],D30=[0,[0,11]],j30=[0,[0,5]],U30=[0,[0,4]],B30=[0,[0,2]],Y30=[0,[0,3]],X30=[0,[0,1]],J30=[0,[0,0]],V30=[0,[0,12]],z30=[0,[0,13]],K30=[0,[0,14]],Z30=[0,0],W30=W3,$30=[0,hx,0],Q30="unexpected PrivateName in Property, expected a PrivateField",F30=[0,0,0],H30=Ao,q30="Must be one of the above",G30=[0,1],b30=[0,1],xl0=[0,1],rl0=Ao,el0=Ao,tl0=X_,nl0="Internal Error: private name found in object props",ul0=[0,1],il0=[0,Hk,1854,21],fl0=[0,"a declaration, statement or export specifiers"],cl0=[0,86],sl0=vl,ol0=[0,hx,hx,0],vl0=[0,fD],al0="exports",ll0=[0,1],pl0=[0,1],dl0=[0,0],yl0=yB,ml0=[0,86],kl0=_o,hl0=[0,75],_l0=[0,0],wl0=[0,1],Tl0=[0,"the keyword `as`"],Sl0=[0,34],El0=[0,34],gl0=[0,0],Al0=[0,1],Pl0=[0,fD],Cl0=[0,"the keyword `from`"],Nl0=[0,hx,hx,0],Rl0=[0,bU],Ol0="Label",Il0=[0,bU],Ll0=[0,0,0],Ml0=[0,44],Dl0=[0,Hk,429,22],jl0=[0,43],Ul0=[0,Hk,448,22],Bl0=[0,0],Yl0="the token `;`",Xl0=[0,0],Jl0=[0,0],Vl0=BD,zl0=[0,mp],Kl0=BD,Zl0=[24,Nt],Wl0=Iv,$l0=ic,Ql0=[13,"JSX fragment"],Fl0=[0,un],Hl0=[1,un],ql0=[0,hx,hx,0],Gl0=[0,mp],bl0=hx,x60=[0,Qj],r60=[18,[0,0]],e60=[0,Qj],t60=[0,0,0,0],n60=hT,u60="Nooo: ",i60=pv,f60="Parser error: No such thing as an expression pattern!",c60=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],s60=[0,"src/parser/parser_flow.ml",p5,28],o60=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],v60=Xj,a60=Ig,l60=wj,p60=WU,d60=WU,y60=wj,m60=fi,k60=xD,h60=B1,_60=y1,w60="InterpreterDirective",T60="interpreter",S60="Program",E60=Tl,g60="BreakStatement",A60=Tl,P60="ContinueStatement",C60="DebuggerStatement",N60=Lv,R60="DeclareExportAllDeclaration",O60=Lv,I60=Pw,L60=HC,M60=pv,D60="DeclareExportDeclaration",j60=go,U60=B1,B60=br,Y60="DeclareModule",X60=F1,J60="DeclareModuleExports",V60=Sa,z60=B1,K60="DoWhileStatement",Z60="EmptyStatement",W60=Kh,$60=HC,Q60="ExportDefaultDeclaration",F60=Kh,H60=OT,q60=Lv,G60="ExportAllDeclaration",b60=Kh,x40=Lv,r40=Pw,e40=HC,t40="ExportNamedDeclaration",n40="directive",u40=H1,i40="ExpressionStatement",f40=B1,c40="update",s40=Sa,o40=hu,v40="ForStatement",a40="each",l40=B1,p40=pn,d40=Ns,y40="ForInStatement",m40=Pv,k40=B1,h40=pn,_40=Ns,w40="ForOfStatement",T40=mB,S40=oC,E40=Sa,g40="IfStatement",A40=fi,P40=Ps,C40=y1,N40=OD,R40=Lv,O40=Pw,I40="ImportDeclaration",L40=B1,M40=Tl,D40="LabeledStatement",j40=H2,U40="ReturnStatement",B40="cases",Y40="discriminant",X40="SwitchStatement",J40=H2,V40="ThrowStatement",z40="finalizer",K40="handler",Z40=cn,W40="TryStatement",$40=B1,Q40=Sa,F40="WhileStatement",H40=B1,q40=eT,G40="WithStatement",b40=Dj,xp0="ArrayExpression",rp0=j2,ep0=M5,tp0=H1,np0=je,up0=QE,ip0=Co,fp0=B1,cp0=an,sp0=br,op0="ArrowFunctionExpression",vp0=F1,ap0=H1,lp0="AsExpression",pp0=X_,dp0=pn,yp0=Ns,mp0=Ra,kp0="AssignmentExpression",hp0=pn,_p0=Ns,wp0=Ra,Tp0="BinaryExpression",Sp0="CallExpression",Ep0=mB,gp0=oC,Ap0=Sa,Pp0="ConditionalExpression",Cp0=Lv,Np0="ImportExpression",Rp0=Tj,Op0=yY,Ip0=hm,Lp0=pn,Mp0=Ns,Dp0=Ra,jp0="LogicalExpression",Up0="MemberExpression",Bp0=KP,Yp0=hl,Xp0="MetaProperty",Jp0=gP,Vp0=Rp,zp0=HB,Kp0="NewExpression",Zp0=Tm,Wp0="ObjectExpression",$p0=it,Qp0="OptionalCallExpression",Fp0=it,Hp0="OptionalMemberExpression",qp0=BB,Gp0="SequenceExpression",bp0="Super",x80="ThisExpression",r80=F1,e80=H1,t80="TypeCastExpression",n80=F1,u80=H1,i80="SatisfiesExpression",f80=H1,c80="AsConstExpression",s80=H2,o80="AwaitExpression",v80=Lt,a80=js,l80=zD,p80=vB,d80=Ps,y80=Is,m80=cl,k80="matched above",h80=H2,_80=sD,w80=Ra,T80="UnaryExpression",S80=Lj,E80=VB,g80=sD,A80=H2,P80=Ra,C80="UpdateExpression",N80="delegate",R80=H2,O80="YieldExpression",I80="Unexpected FunctionDeclaration with BodyExpression",L80=j2,M80=M5,D80=H1,j80=je,U80=QE,B80=Co,Y80=B1,X80=an,J80=br,V80="FunctionDeclaration",z80="Unexpected FunctionExpression with BodyExpression",K80=j2,Z80=M5,W80=H1,$80=je,Q80=QE,F80=Co,H80=B1,q80=an,G80=br,b80="FunctionExpression",x50=it,r50=F1,e50=Ie,t50=Og,n50=it,u50=F1,i50=Ie,f50="PrivateIdentifier",c50=it,s50=F1,o50=Ie,v50=Og,a50=oC,l50=Sa,p50="SwitchCase",d50=B1,y50="param",m50="CatchClause",k50=B1,h50="BlockStatement",_50=go,w50=br,T50="DeclareVariable",S50=je,E50=br,g50="DeclareFunction",A50=Sj,P50=Tv,C50=Bc,N50=B1,R50=j2,O50=br,I50="DeclareClass",L50=j2,M50=F_,D50=an,j50=kw,U50=an,B50=br,Y50="DeclareComponent",X50=j2,J50=F_,V50=kw,z50=an,K50="ComponentTypeAnnotation",Z50=it,W50=F1,$50=Ie,Q50="ComponentTypeParameter",F50=B1,H50=br,q50="DeclareEnum",G50=Bc,b50=B1,xd0=j2,rd0=br,ed0="DeclareInterface",td0=y1,nd0=fi,ud0=OT,id0="ExportNamespaceSpecifier",fd0=pn,cd0=j2,sd0=br,od0="DeclareTypeAlias",vd0=pn,ad0=j2,ld0=br,pd0="TypeAlias",dd0="DeclareOpaqueType",yd0="OpaqueType",md0="supertype",kd0="impltype",hd0=j2,_d0=br,wd0="ClassDeclaration",Td0="ClassExpression",Sd0=kd,Ed0=Tv,gd0="superTypeParameters",Ad0="superClass",Pd0=j2,Cd0=B1,Nd0=br,Rd0=H1,Od0="Decorator",Id0=j2,Ld0=br,Md0="ClassImplements",Dd0=B1,jd0="ClassBody",Ud0=Ev,Bd0=nl,Yd0=Cv,Xd0=Da,Jd0=kd,Vd0=La,zd0=De,Kd0=go,Zd0=y1,Wd0=mv,$d0="MethodDefinition",Qd0=el,Fd0=kd,Hd0=U2,qd0=De,Gd0=La,bd0=F1,xy0=y1,ry0=mv,ey0=mj,ty0="Internal Error: Private name found in class prop",ny0=el,uy0=kd,iy0=U2,fy0=De,cy0=La,sy0=F1,oy0=y1,vy0=mv,ay0=mj,ly0=j2,py0=F_,dy0=an,yy0=br,my0=B1,ky0="ComponentDeclaration",hy0=H2,_y0=Om,wy0=pn,Ty0=Ns,Sy0=Jp,Ey0=NS,gy0=al,Ay0=Ie,Py0="ComponentParameter",Cy0=hu,Ny0=br,Ry0="EnumBigIntMember",Oy0=br,Iy0=pD,Ly0=hu,My0=br,Dy0="EnumStringMember",jy0=br,Uy0=pD,By0=hu,Yy0=br,Xy0="EnumNumberMember",Jy0=hu,Vy0=br,zy0="EnumBooleanMember",Ky0=q3,Zy0=Id,Wy0=tl,$y0="EnumBooleanBody",Qy0=q3,Fy0=Id,Hy0=tl,qy0="EnumNumberBody",Gy0=q3,by0=Id,x90=tl,r90="EnumStringBody",e90=q3,t90=tl,n90="EnumSymbolBody",u90=q3,i90=Id,f90=tl,c90="EnumBigIntBody",s90=B1,o90=br,v90="EnumDeclaration",a90=Bc,l90=B1,p90=j2,d90=br,y90="InterfaceDeclaration",m90=j2,k90=br,h90="InterfaceExtends",_90=F1,w90=Tm,T90="ObjectPattern",S90=F1,E90=Dj,g90="ArrayPattern",A90=pn,P90=Ns,C90=Jp,N90=F1,R90=Ie,O90=Og,I90=H2,L90=Om,M90=H2,D90=Om,j90=pn,U90=Ns,B90=Jp,Y90=hu,X90=hu,J90=Cv,V90=Da,z90=nB,K90=La,Z90=NS,W90=nl,$90=go,Q90=y1,F90=mv,H90=_U,q90=H2,G90=lB,b90=pn,xm0=Ns,rm0=Jp,em0=La,tm0=NS,nm0=nl,um0=go,im0=y1,fm0=mv,cm0=_U,sm0=H2,om0=lB,vm0=jt,am0=y1,lm0=pa,pm0=jt,dm0=wv,ym0=y1,mm0=pa,km0=jt,hm0=y1,_m0=pa,wm0=Cs,Tm0=Os,Sm0=jt,Em0=y1,gm0=pa,Am0="flags",Pm0=yn,Cm0="regex",Nm0=jt,Rm0=y1,Om0=pa,Im0=jt,Lm0=y1,Mm0=pa,Dm0=BB,jm0="quasis",Um0="TemplateLiteral",Bm0="cooked",Ym0=jt,Xm0="tail",Jm0=y1,Vm0="TemplateElement",zm0="quasi",Km0="tag",Zm0="TaggedTemplateExpression",Wm0=pl,$m0=ma,Qm0=sl,Fm0=go,Hm0="declarations",qm0="VariableDeclaration",Gm0=hu,bm0=br,xk0="VariableDeclarator",rk0="plus",ek0=UD,tk0=Ea,nk0=Po,uk0=A_,ik0="in-out",fk0=go,ck0="Variance",sk0="AnyTypeAnnotation",ok0="MixedTypeAnnotation",vk0="EmptyTypeAnnotation",ak0="VoidTypeAnnotation",lk0="NullLiteralTypeAnnotation",pk0="SymbolTypeAnnotation",dk0="NumberTypeAnnotation",yk0="BigIntTypeAnnotation",mk0="StringTypeAnnotation",kk0="BooleanTypeAnnotation",hk0=F1,_k0="NullableTypeAnnotation",wk0="UnknownTypeAnnotation",Tk0="NeverTypeAnnotation",Sk0="UndefinedTypeAnnotation",Ek0=ka,gk0=F1,Ak0="parameterName",Pk0="TypePredicate",Ck0=j2,Nk0=kw,Rk0=M5,Ok0=lv,Ik0=an,Lk0="FunctionTypeAnnotation",Mk0=it,Dk0=F1,jk0=Ie,Uk0=XD,Bk0=it,Yk0=F1,Xk0=Ie,Jk0=XD,Vk0=[0,0,0,0,0],zk0="internalSlots",Kk0="callProperties",Zk0="indexers",Wk0=Tm,$k0="exact",Qk0="inexact",Fk0="ObjectTypeAnnotation",Hk0=nB,qk0="There should not be computed object type property keys",Gk0=hu,bk0=Cv,xh0=Da,rh0=go,eh0=U2,th0=YN,nh0=De,uh0=it,ih0=nl,fh0=y1,ch0=mv,sh0="ObjectTypeProperty",oh0=H2,vh0="ObjectTypeSpreadProperty",ah0=U2,lh0=De,ph0=y1,dh0=mv,yh0=br,mh0="ObjectTypeIndexer",kh0=De,hh0=y1,_h0="ObjectTypeCallProperty",wh0=it,Th0=U2,Sh0="sourceType",Eh0="propType",gh0="keyTparam",Ah0="ObjectTypeMappedTypeProperty",Ph0=y1,Ch0=nl,Nh0=De,Rh0=it,Oh0=br,Ih0="ObjectTypeInternalSlot",Lh0=B1,Mh0=Bc,Dh0="InterfaceTypeAnnotation",jh0=Fj,Uh0="ArrayTypeAnnotation",Bh0="falseType",Yh0="trueType",Xh0="extendsType",Jh0="checkType",Vh0="ConditionalTypeAnnotation",zh0="typeParameter",Kh0="InferTypeAnnotation",Zh0=br,Wh0=KB,$h0="QualifiedTypeIdentifier",Qh0=j2,Fh0=br,Hh0="GenericTypeAnnotation",qh0="indexType",Gh0="objectType",bh0="IndexedAccessType",x_0=it,r_0="OptionalIndexedAccessType",e_0=dg,t_0="UnionTypeAnnotation",n_0=dg,u_0="IntersectionTypeAnnotation",i_0=Rp,f_0=H2,c_0="TypeofTypeAnnotation",s_0=br,o_0=KB,v_0="QualifiedTypeofIdentifier",a_0=H2,l_0="KeyofTypeAnnotation",p_0=rr,d_0=jU,y_0=sj,m_0=F1,k_0=Ra,h_0="TypeOperator",__0=H2,w_0="ReadOnlyTypeAnnotation",T_0="elementTypes",S_0="TupleTypeAnnotation",E_0=it,g_0=U2,A_0=Fj,P_0=Tl,C_0="TupleTypeLabeledElement",N_0=F1,R_0=Tl,O_0="TupleTypeSpreadElement",I_0=jt,L_0=y1,M_0="StringLiteralTypeAnnotation",D_0=jt,j_0=y1,U_0="NumberLiteralTypeAnnotation",B_0=jt,Y_0=y1,X_0="BigIntLiteralTypeAnnotation",J_0=Cs,V_0=Os,z_0=jt,K_0=y1,Z_0="BooleanLiteralTypeAnnotation",W_0="ExistsTypeAnnotation",$_0=F1,Q_0=SD,F_0=F1,H_0=SD,q_0=an,G_0="TypeParameterDeclaration",b_0="usesExtendsBound",xw0=pv,rw0=U2,ew0="bound",tw0=Ie,nw0="TypeParameter",uw0=an,iw0=_D,fw0=an,cw0=_D,sw0=Ca,ow0=sB,vw0="closingElement",aw0="openingElement",lw0="JSXElement",pw0="closingFragment",dw0=sB,yw0="openingFragment",mw0="JSXFragment",kw0=Rp,hw0="selfClosing",_w0="attributes",ww0=Ie,Tw0="JSXOpeningElement",Sw0="JSXOpeningFragment",Ew0=Ie,gw0="JSXClosingElement",Aw0="JSXClosingFragment",Pw0=y1,Cw0=Ie,Nw0="JSXAttribute",Rw0=H2,Ow0="JSXSpreadAttribute",Iw0="JSXEmptyExpression",Lw0=H1,Mw0="JSXExpressionContainer",Dw0=H1,jw0="JSXSpreadChild",Uw0=jt,Bw0=y1,Yw0="JSXText",Xw0=KP,Jw0=eT,Vw0="JSXMemberExpression",zw0=Ie,Kw0="namespace",Zw0="JSXNamespacedName",Ww0=Ie,$w0="JSXIdentifier",Qw0=OT,Fw0=al,Hw0="ExportSpecifier",qw0=al,Gw0="ImportDefaultSpecifier",bw0=al,xT0="ImportNamespaceSpecifier",rT0=OD,eT0=al,tT0="imported",nT0="ImportSpecifier",uT0="Line",iT0="Block",fT0=y1,cT0=y1,sT0="DeclaredPredicate",oT0="InferredPredicate",vT0=gP,aT0=Rp,lT0=HB,pT0=La,dT0=KP,yT0=eT,mT0="message",kT0=Ig,hT0=OU,_T0=Lm,wT0=Lv,TT0=kl,ST0=X5,ET0=[0,Cf,Df,ai,_7,Mf,b7,Ui,Su,dc,Y7,$i,jf,cn,$u,hc,Le,O7,tu,vf,Gf,N7,yi,Gc,Nc,n7,df,K7,Au,Wi,tf,Fc,F7,Ru,Si,sf,Ci,di,nc,Gi,au,d7,qc,W7,Gu,cf,Pc,hi,lf,xc,Hn,yc,_c,ef,Re,Oe,zu,Tf,Ac,Ki,T7,Bf,Zu,cc,kf,ac,Of,Rc,Mi,ce,Xi,t7,yf,nf,Cu,c7,ju,Vi,of,Cc,kc,Mu,Vu,af,w7,bn,Nf,m7,Qf,Z7,H1,Ti,xi,Gn,$7,y7,Yf,gf,G7,cu,Yi,Yu,Nu,pu,bu,oc,eu,zn,pc,S7,$n,B7,ti,ei,Uf,ii,wf,Kn,Ai,Wc,Hi,wu,gi,ku,Ou,Nt,g7,s7,P7,D2,Ei,ou,Ku,p7,hf,yu,$f,I7,G2,ni,r7,Kf,Zi,lu,bc,iu,_u,Vn,zi,Qu,Lc,lc,i7,Ef,Eu,ci,Kc,li,U7,o7,uu,qn,ec,rc,rf,fc,X7,Xu,Qn,ji,j7,Zn,vu,uf,ir,v7,pi,Bu,gc,ri,a7,Xc,Uc,Wu,Dc,Q7,Af,L7,Bi,Jf,qf,su,bi,Zc,pf,Vc,f7,vi,Pf,oi,sc,mi,nu,uc,u7,Fu,If,yn,Yc,Lu,z7,wc,Oc,R7,H7,Ju,l7,h7,Ji,Du,mc,tc,fu,Wf,$c,gu,zf,Tc,mu,je,Ec,du,Uu,Tu,xf,D7,k7,Me,Sc,qu,M7,Ic,Fi,qi,E7,ff,Be,Iu,xu,Xf,Sf,jc,Ii,Rf,Ue,Qc,mf,Qi,Pu,vc,Fn,x7,Pi,Ff,wi,Jc,A7,zc,_i,Wn,V7,Oi,bf,Hf,ru,C7,J7,ki,Hu,Mc,e7,q7,ui,Hc,Li,U2,Vf,_f,si,B2],gT0=[0,B2,si,_f,Vf,U2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Oi,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Ue,Rf,Ii,jc,Sf,Xf,xu,Iu,Be,ff,E7,qi,Fi,Ic,M7,qu,Sc,Me,k7,D7,xf,Tu,Uu,du,Ec,je,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Oc,wc,z7,Lu,Yc,yn,If,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ir,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,G2,I7,$f,yu,hf,p7,Ku,ou,Ei,D2,P7,s7,g7,Nt,Ou,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,H1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,ce,Mi,Rc,Of,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Re,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,O7,Le,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],AT0=[0,Ic,Vn,ei,Ou,Kn,O7,Uc,qf,li,r7,$u,Jc,sc,Be,nu,Qf,df,pf,lc,a7,I7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Nt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Iu,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,If,Cf,$c,d7,_i,su,zf,uu,F7,oi,je,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,U2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,ce,G7,wi,B2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Oc,ec,qc,ir,D2,Me,C7,Oi,ff,H7,Ue,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,Of,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,H1,Lu,nc,xi,Qi,zn,eu,Fi,Re,$n,Gu,fu,af,ac,Ii,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Le,Mf,G2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],PT0="Jsoo_runtime.Error.Exn",CT0=[0,0],NT0="use_strict",RT0=dg,OT0="esproposal_decorators",IT0="enums",LT0="components",MT0="Internal error: ";function L1(x){if(typeof x=="number")return 0;switch(x[0]){case 0:return[0,L1(x[1])];case 1:return[1,L1(x[1])];case 2:return[2,L1(x[1])];case 3:return[3,L1(x[1])];case 4:return[4,L1(x[1])];case 5:return[5,L1(x[1])];case 6:return[6,L1(x[1])];case 7:return[7,L1(x[1])];case 8:var r=x[1];return[8,r,L1(x[2])];case 9:var e=x[1];return[9,e,e,L1(x[3])];case 10:return[10,L1(x[1])];case 11:return[11,L1(x[1])];case 12:return[12,L1(x[1])];case 13:return[13,L1(x[1])];default:return[14,L1(x[1])]}}function ee(x,r){if(typeof x=="number")return r;switch(x[0]){case 0:return[0,ee(x[1],r)];case 1:return[1,ee(x[1],r)];case 2:return[2,ee(x[1],r)];case 3:return[3,ee(x[1],r)];case 4:return[4,ee(x[1],r)];case 5:return[5,ee(x[1],r)];case 6:return[6,ee(x[1],r)];case 7:return[7,ee(x[1],r)];case 8:var e=x[1];return[8,e,ee(x[2],r)];case 9:var t=x[2],u=x[1];return[9,u,t,ee(x[3],r)];case 10:return[10,ee(x[1],r)];case 11:return[11,ee(x[1],r)];case 12:return[12,ee(x[1],r)];case 13:return[13,ee(x[1],r)];default:return[14,ee(x[1],r)]}}function E1(x,r){if(typeof x=="number")return r;switch(x[0]){case 0:return[0,E1(x[1],r)];case 1:return[1,E1(x[1],r)];case 2:var e=x[1];return[2,e,E1(x[2],r)];case 3:var t=x[1];return[3,t,E1(x[2],r)];case 4:var u=x[3],i=x[2],f=x[1];return[4,f,i,u,E1(x[4],r)];case 5:var o=x[3],a=x[2],d=x[1];return[5,d,a,o,E1(x[4],r)];case 6:var k=x[3],T=x[2],g=x[1];return[6,g,T,k,E1(x[4],r)];case 7:var A=x[3],N=x[2],R=x[1];return[7,R,N,A,E1(x[4],r)];case 8:var O=x[3],M=x[2],L=x[1];return[8,L,M,O,E1(x[4],r)];case 9:var z=x[1];return[9,z,E1(x[2],r)];case 10:return[10,E1(x[1],r)];case 11:var V=x[1];return[11,V,E1(x[2],r)];case 12:var Z=x[1];return[12,Z,E1(x[2],r)];case 13:var $=x[2],i0=x[1];return[13,i0,$,E1(x[3],r)];case 14:var U=x[2],J=x[1];return[14,J,U,E1(x[3],r)];case 15:return[15,E1(x[1],r)];case 16:return[16,E1(x[1],r)];case 17:var Y=x[1];return[17,Y,E1(x[2],r)];case 18:var F=x[1];return[18,F,E1(x[2],r)];case 19:return[19,E1(x[1],r)];case 20:var n0=x[2],Q=x[1];return[20,Q,n0,E1(x[3],r)];case 21:var f0=x[1];return[21,f0,E1(x[2],r)];case 22:return[22,E1(x[1],r)];case 23:var s0=x[1];return[23,s0,E1(x[2],r)];default:var v0=x[2],o0=x[1];return[24,o0,v0,E1(x[3],r)]}}function cO(x,r,e){return x[1]===r?(x[1]=e,1):0}function Nx(x){throw q0([0,kn,x],1)}function y2(x){throw q0([0,iO,x],1)}function ny(x){return 0<=x?x:-x|0}var DT0=tD;function Qx(x,r){var e=Xx(x),t=Xx(r),u=S1(e+t|0);return rs(x,0,u,0,e),rs(r,0,u,e,t),g2(u)}function jT0(x){return x?gW:AW}function Fx(x,r){if(!x)return r;var e=x[1];return[0,e,Fx(x[2],r)]}fW(0);var UT0=qY(1),ts=qY(2);function BT0(x){for(var r=cW(0);;){if(!r)return 0;var e=r[2],t=r[1];try{es(t)}catch(f){var u=I1(f);if(u[1]!==rX)throw q0(u,0)}var r=e}}function jl(x,r){return rO(x,r,0,Xx(r))}function iX(x){return jl(ts,x),GY(ts,10),es(ts)}var sO=[0,BT0];function oO(x){return l(sO[1],0)}tO(ij,oO);var fX=yW(0)[1],Ul=(4*pW(0)|0)-1|0,YT0=[Gr,PW,Js(0)];function XT0(x){throw q0(YT0,1)}function uy(x,r){return r?[0,l(x,r[1])]:0}function cX(x){return 25>>0?x:x+GM|0}function ns(x){for(var r=0,e=x;;){if(!e)return r;var r=r+1|0,e=e[2]}}function Bl(x){return x?x[1]:Nx(jW)}function sX(x){return x?x[2]:Nx(DW)}function us(x,r){for(var e=x,t=r;;){if(!e)return t;var u=[0,e[1],t],e=e[2],t=u}}function Ax(x){return us(x,0)}function Yl(x){if(!x)return 0;var r=x[1];return Fx(r,Yl(x[2]))}function _n(x,r){if(!r)return 0;var e=r[2],t=l(x,r[1]);return[0,t,_n(x,e)]}function iy(x,r){for(var e=0,t=r;;){if(!t)return e;var u=t[2],e=[0,l(x,t[1]),e],t=u}}function P2(x,r){for(var e=r;;){if(!e)return 0;var t=e[2];l(x,e[1]);var e=t}}function x2(x,r,e){for(var t=r,u=e;;){if(!u)return t;var i=u[2],t=p(x,t,u[1]),u=i}}function vO(x,r,e){if(!r)return e;var t=r[1];return p(x,t,vO(x,r[2],e))}function oX(x,r,e){for(var t=r,u=e;;){if(t){if(u){var i=u[2],f=t[2];p(x,t[1],u[1]);var t=f,u=i;continue}}else if(!u)return 0;return y2(MW)}}function aO(x,r){for(var e=r;;){if(!e)return 0;var t=e[2],u=l(x,e[1]);if(u)return u;var e=t}}function lO(x,r){for(var e=r;;){if(!e)return 0;var t=e[2],u=JY(e[1],x)===0?1:0;if(u)return u;var e=t}}function Xl(x){var r=0;return function(e){for(var t=r,u=e;;){if(!u)return Ax(t);var i=u[2],f=u[1];if(l(x,f)){var t=[0,f,t],u=i;continue}var u=i}}}function jv(x,r){var e=S1(x);return JZ(e,0,x,r),e}function vX(x){var r=vt(x),e=S1(r);return Us(x,0,e,0,r),e}function aX(x,r,e){if(0<=r&&0<=e&&(vt(x)-e|0)>=r){var t=S1(e);return Us(x,r,t,0,e),t}return y2(YW)}function Za(x,r,e){return g2(aX(x,r,e))}function lX(x,r,e,t,u){return 0<=u&&0<=r&&(vt(x)-u|0)>=r&&0<=t&&(vt(e)-u|0)>=t?Us(x,r,e,t,u):y2(BW)}function Zs(x,r,e,t,u){return 0<=u&&0<=r&&(Xx(x)-u|0)>=r&&0<=t&&(vt(e)-u|0)>=t?rs(x,r,e,t,u):y2(UW)}function fy(x,r){return g2(jv(x,r))}function m2(x,r,e){return g2(aX(xs(x),r,e))}function pX(x){var r=xs(x);if(vt(r)===0)var e=r;else{var t=vX(r);Zr(t,0,cX(se(r,0)));var e=t}return g2(e)}function dX(x,r){var e=Xx(x),t=e<=Xx(r)?1:0;if(!t)return t;for(var u=0;;){if(u===e)return 1;if(fx(r,u)!==fx(x,u))return 0;var u=u+1|0}}var JT0=Tx;function yX(x,r){var e=r.length-1-1|0,t=0;if(e>=0)for(var u=t;;){l(x,r[1+u]);var i=u+1|0;if(e!==u){var u=i;continue}break}return 0}function cy(x,r){var e=r.length-1;if(e===0)return[0];var t=Va(e,l(x,r[1])),u=e-1|0,i=1;if(u>=1)for(var f=i;;){t[1+f]=l(x,r[1+f]);var o=f+1|0;if(u!==f){var f=o;continue}break}return t}function Jl(x){if(!x)return[0];for(var r=0,e=x,t=x[2],u=x[1];;){if(e){var r=r+1|0,e=e[2];continue}for(var i=Va(r,u),f=1,o=t;;){if(!o)return i;var a=o[2];i[1+f]=o[1];var f=f+1|0,o=a}}}function mX(x){try{var r=[0,Nl(x)];return r}catch(t){var e=I1(t);if(e[1]===kn)return 0;throw q0(e,0)}}function pO(x){function r(H){return H?H[5]:0}function e(H,b,B,a0){var m0=r(H),P0=r(a0),D=P0<=m0?m0+1|0:P0+1|0;return[0,H,b,B,a0,D]}function t(H,b){return[0,0,H,b,0,1]}function u(H,b,B,a0){var m0=H?H[5]:0,P0=a0?a0[5]:0;if((P0+2|0)=P0){var X=P0<=m0?m0+1|0:P0+1|0;return[0,H,b,B,a0,X]}if(!a0)return y2(HW);var W0=a0[4],sx=a0[3],tx=a0[2],j0=a0[1],Px=r(j0);if(Px<=r(W0))return e(e(H,b,B,j0),tx,sx,W0);if(!j0)return y2(FW);var Ex=j0[3],Ix=j0[2],qx=j0[1],B0=e(j0[4],tx,sx,W0);return e(e(H,b,B,qx),Ix,Ex,B0)}var i=0;function f(H){return H?0:1}function o(H,b,B){if(!B)return[0,0,H,b,0,1];var a0=B[4],m0=B[3],P0=B[2],D=B[1],N0=B[5],X0=p(x[1],H,P0);if(X0===0)return m0===b?B:[0,D,H,b,a0,N0];if(0<=X0){var D0=o(H,b,a0);return a0===D0?B:u(D,P0,m0,D0)}var ox=o(H,b,D);return D===ox?B:u(ox,P0,m0,a0)}function a(H,b){for(var B=b;;){if(!B)throw q0(A2,1);var a0=B[4],m0=B[3],P0=B[1],D=p(x[1],H,B[2]);if(D===0)return m0;var N0=0<=D?a0:P0,B=N0}}function d(H,b){for(var B=b;;){if(!B)throw q0(A2,1);var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=m0;continue}for(var N0=a0,X0=P0,D0=D;;){if(!D0)return[0,N0,X0];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=V0;continue}var D0=b0}}}function k(H,b){for(var B=b;;){if(!B)return 0;var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=m0;continue}for(var N0=a0,X0=P0,D0=D;;){if(!D0)return[0,[0,N0,X0]];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=V0;continue}var D0=b0}}}function T(H,b){for(var B=b;;){if(!B)throw q0(A2,1);var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=D;continue}for(var N0=a0,X0=P0,D0=m0;;){if(!D0)return[0,N0,X0];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=b0;continue}var D0=V0}}}function g(H,b){for(var B=b;;){if(!B)return 0;var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=D;continue}for(var N0=a0,X0=P0,D0=m0;;){if(!D0)return[0,[0,N0,X0]];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=b0;continue}var D0=V0}}}function A(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[3],P0=B[1],D=p(x[1],H,B[2]);if(D===0)return[0,m0];var N0=0<=D?a0:P0,B=N0}}function N(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[1],P0=p(x[1],H,B[2]),D=P0===0?1:0;if(D)return D;var N0=0<=P0?a0:m0,B=N0}}function R(H){for(var b=H;;){if(!b)throw q0(A2,1);var B=b[1];if(!B)return[0,b[2],b[3]];var b=B}}function O(H){for(var b=H;;){if(!b)return 0;var B=b[1];if(!B)return[0,[0,b[2],b[3]]];var b=B}}function M(H){for(var b=H;;){if(!b)throw q0(A2,1);if(!b[4])return[0,b[2],b[3]];var b=b[4]}}function L(H){for(var b=H;;){if(!b)return 0;if(!b[4])return[0,[0,b[2],b[3]]];var b=b[4]}}function z(H){if(!H)return y2(zW);var b=H[1];if(!b)return H[4];var B=H[4],a0=H[3],m0=H[2];return u(z(b),m0,a0,B)}function V(H,b){if(!H)return b;if(!b)return H;var B=R(b),a0=B[2],m0=B[1];return u(H,m0,a0,z(b))}function Z(H,b){if(!b)return 0;var B=b[4],a0=b[3],m0=b[2],P0=b[1],D=p(x[1],H,m0);if(D===0)return V(P0,B);if(0<=D){var N0=Z(H,B);return B===N0?b:u(P0,m0,a0,N0)}var X0=Z(H,P0);return P0===X0?b:u(X0,m0,a0,B)}function $(H,b,B){if(!B){var a0=l(b,0);return a0?[0,0,H,a0[1],0,1]:0}var m0=B[4],P0=B[3],D=B[2],N0=B[1],X0=B[5],D0=p(x[1],H,D);if(D0===0){var ox=l(b,[0,P0]);if(!ox)return V(N0,m0);var b0=ox[1];return P0===b0?B:[0,N0,H,b0,m0,X0]}if(0<=D0){var kx=$(H,b,m0);return m0===kx?B:u(N0,D,P0,kx)}var V0=$(H,b,N0);return N0===V0?B:u(V0,D,P0,m0)}function i0(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[3],P0=B[2];i0(H,B[1]),p(H,P0,m0);var B=a0}}function U(H,b){if(!b)return 0;var B=b[5],a0=b[4],m0=b[3],P0=b[2],D=U(H,b[1]),N0=l(H,m0);return[0,D,P0,N0,U(H,a0),B]}function J(H,b){if(!b)return 0;var B=b[2],a0=b[5],m0=b[4],P0=b[3],D=J(H,b[1]),N0=p(H,B,P0);return[0,D,B,N0,J(H,m0),a0]}function Y(H,b,B){for(var a0=b,m0=B;;){if(!a0)return m0;var P0=a0[4],D=a0[3],N0=a0[2],X0=G0(H,N0,D,Y(H,a0[1],m0)),a0=P0,m0=X0}}function F(H,b){for(var B=b;;){if(!B)return 1;var a0=B[4],m0=B[1],P0=p(H,B[2],B[3]);if(P0){var D=F(H,m0);if(D){var B=a0;continue}var N0=D}else var N0=P0;return N0}}function n0(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[1],P0=p(H,B[2],B[3]);if(P0)var D=P0;else{var N0=n0(H,m0);if(!N0){var B=a0;continue}var D=N0}return D}}function Q(H,b,B){if(!B)return t(H,b);var a0=B[4],m0=B[3],P0=B[2];return u(Q(H,b,B[1]),P0,m0,a0)}function f0(H,b,B){if(!B)return t(H,b);var a0=B[3],m0=B[2],P0=B[1];return u(P0,m0,a0,f0(H,b,B[4]))}function s0(H,b,B,a0){if(!H)return Q(b,B,a0);if(!a0)return f0(b,B,H);var m0=a0[5],P0=H[5],D=a0[4],N0=a0[3],X0=a0[2],D0=a0[1],ox=H[4],b0=H[3],kx=H[2],V0=H[1];return(m0+2|0)x[3])throw q0([0,wr,x$],1);if((e+r|0)<=x[3])return 0;throw q0([0,wr,r$],1)}}function at(x,r){var e=x[2];return x[3]<=e&&mO(x,1),Zr(x[1],e,r),x[2]=e+1|0,0}function hX(x,r,e,t){var u=e<0?1:0;if(u)var f=u;else var i=t<0?1:0,f=i||((Xx(r)-t|0)=u+G5>>>0&&(i=1):65<=u&&(i=1);else{var f=0;if(u===32)f=1;else if(43<=u)switch(u+Xm|0){case 5:if(t<(e+2|0)&&1>>0?33>>0&&(i=1):u===2&&(i=1),!i){var r=r+1|0;continue}var f=xs(x),o=[0,0],a=vt(f)-1|0,d=0;if(a>=0)for(var k=d;;){var T=se(f,k),g=0;if(32<=T){var A=T-34|0,N=0;if(58>>0?93>A&&(N=1):56>>0?g=1:N=1,N){var R=1;g=2}}else 11<=T?T===13&&(g=1):8<=T&&(g=1);switch(g){case 0:var R=4;break;case 1:var R=2;break}o[1]=o[1]+R|0;var O=k+1|0;if(a!==k){var k=O;continue}break}if(o[1]===vt(f))var M=vX(f);else{var L=S1(o[1]);o[1]=0;var z=vt(f)-1|0,V=0;if(z>=0)for(var Z=V;;){var $=se(f,Z),i0=0;if(35<=$)$===92?i0=2:Jr<=$?i0=1:i0=3;else if(32<=$)34<=$?i0=2:i0=3;else if(14<=$)i0=1;else switch($){case 8:Zr(L,o[1],92),o[1]++,Zr(L,o[1],98);break;case 9:Zr(L,o[1],92),o[1]++,Zr(L,o[1],Ri);break;case 10:Zr(L,o[1],92),o[1]++,Zr(L,o[1],U1);break;case 13:Zr(L,o[1],92),o[1]++,Zr(L,o[1],ct);break;default:i0=1}switch(i0){case 1:Zr(L,o[1],92),o[1]++,Zr(L,o[1],48+($/st|0)|0),o[1]++,Zr(L,o[1],48+(($/10|0)%10|0)|0),o[1]++,Zr(L,o[1],48+($%10|0)|0);break;case 2:Zr(L,o[1],92),o[1]++,Zr(L,o[1],$);break;case 3:Zr(L,o[1],$);break}o[1]++;var U=Z+1|0;if(z!==Z){var Z=U;continue}break}var M=L}var t=g2(M)}var J=Xx(t),Y=jv(J+2|0,34);return rs(t,0,Y,1,J),g2(Y)}}function EX(x,r){var e=ny(r),t=G$[1];switch(x[2]){case 0:var u=Zf;break;case 1:var u=Rt;break;case 2:var u=69;break;case 3:var u=nn;break;case 4:var u=71;break;case 5:var u=t;break;case 6:var u=Dt;break;case 7:var u=72;break;default:var u=70}var i=_X(16);switch(Qa(i,37),x[1]){case 0:break;case 1:Qa(i,43);break;default:Qa(i,32)}return 8<=x[2]&&Qa(i,35),Qa(i,46),C2(i,hx+e),Qa(i,u),TX(i)}function oy(x,r){if(13>x)return r;var e=[0,0],t=Xx(r)-1|0,u=0;if(t>=0)for(var i=u;;){9>=fx(r,i)+K1>>>0&&e[1]++;var f=i+1|0;if(t!==i){var i=f;continue}break}var o=e[1],a=S1(Xx(r)+((o-1|0)/3|0)|0),d=[0,0];function k(M){return Xa(a,d[1],M),d[1]++,0}var T=[0,((o-1|0)%3|0)+1|0],g=Xx(r)-1|0,A=0;if(g>=0)for(var N=A;;){var R=fx(r,N);9>>0||(T[1]===0&&(k(95),T[1]=3),T[1]+=-1),k(R);var O=N+1|0;if(g!==N){var N=O;continue}break}return g2(a)}function KT0(x,r){switch(x){case 1:var e=BQ;break;case 2:var e=YQ;break;case 4:var e=XQ;break;case 5:var e=JQ;break;case 6:var e=VQ;break;case 7:var e=zQ;break;case 8:var e=KQ;break;case 9:var e=ZQ;break;case 10:var e=WQ;break;case 11:var e=$Q;break;case 0:case 13:var e=QQ;break;case 3:case 14:var e=FQ;break;default:var e=HQ}return oy(x,Fd(e,r))}function ZT0(x,r){switch(x){case 1:var e=aQ;break;case 2:var e=lQ;break;case 4:var e=pQ;break;case 5:var e=dQ;break;case 6:var e=yQ;break;case 7:var e=mQ;break;case 8:var e=kQ;break;case 9:var e=hQ;break;case 10:var e=_Q;break;case 11:var e=wQ;break;case 0:case 13:var e=TQ;break;case 3:case 14:var e=SQ;break;default:var e=EQ}return oy(x,Fd(e,r))}function WT0(x,r){switch(x){case 1:var e=b$;break;case 2:var e=xQ;break;case 4:var e=rQ;break;case 5:var e=eQ;break;case 6:var e=tQ;break;case 7:var e=nQ;break;case 8:var e=uQ;break;case 9:var e=iQ;break;case 10:var e=fQ;break;case 11:var e=cQ;break;case 0:case 13:var e=sQ;break;case 3:case 14:var e=oQ;break;default:var e=vQ}return oy(x,Fd(e,r))}function $T0(x,r){switch(x){case 1:var e=gQ;break;case 2:var e=AQ;break;case 4:var e=PQ;break;case 5:var e=CQ;break;case 6:var e=NQ;break;case 7:var e=RQ;break;case 8:var e=OQ;break;case 9:var e=IQ;break;case 10:var e=LQ;break;case 11:var e=MQ;break;case 0:case 13:var e=DQ;break;case 3:case 14:var e=jQ;break;default:var e=UQ}return oy(x,$Z(e,r))}function Ws(x,r,e){function t(V){switch(x[1]){case 0:var Z=45;break;case 1:var Z=43;break;default:var Z=32}return zZ(e,r,Z)}function u(V){var Z=gZ(e);return Z===3?e<0?F$:H$:4<=Z?Q$:V}switch(x[2]){case 5:for(var i=HR(EX(x,r),e),f=0,o=Xx(i);;){if(f===o)var a=0;else{var d=O1(i,f)+Ov|0,k=0;if(23>>0?d===55&&(k=1):21>>0&&(k=1),!k){var f=f+1|0;continue}var a=1}var T=a?i:Qx(i,q$);return u(T)}case 6:return t(0);case 7:var g=xs(t(0)),A=vt(g);if(A===0)var N=g;else{var R=S1(A),O=A-1|0,M=0;if(O>=0)for(var L=M;;){Zr(R,L,cX(se(g,L)));var z=L+1|0;if(O!==L){var L=z;continue}break}var N=R}return g2(N);case 8:return u(t(0));default:return HR(EX(x,r),e)}}function vy(x,r,e,t,u,i,f){if(typeof t=="number"){if(typeof u=="number")return u?function(A,N){return Br(x,[4,r,Fa(A,p(i,f,N))],e)}:function(A){return Br(x,[4,r,p(i,f,A)],e)};var o=u[1];return function(A){return Br(x,[4,r,Fa(o,p(i,f,A))],e)}}if(t[0]===0){var a=t[2],d=t[1];if(typeof u=="number")return u?function(A,N){return Br(x,[4,r,Je(d,a,Fa(A,p(i,f,N)))],e)}:function(A){return Br(x,[4,r,Je(d,a,p(i,f,A))],e)};var k=u[1];return function(A){return Br(x,[4,r,Je(d,a,Fa(k,p(i,f,A)))],e)}}var T=t[1];if(typeof u=="number")return u?function(A,N,R){return Br(x,[4,r,Je(T,A,Fa(N,p(i,f,R)))],e)}:function(A,N){return Br(x,[4,r,Je(T,A,p(i,f,N))],e)};var g=u[1];return function(A,N){return Br(x,[4,r,Je(T,A,Fa(g,p(i,f,N)))],e)}}function wO(x,r,e,t,u){if(typeof t=="number")return function(a){return Br(x,[4,r,l(u,a)],e)};if(t[0]===0){var i=t[2],f=t[1];return function(a){return Br(x,[4,r,Je(f,i,l(u,a))],e)}}var o=t[1];return function(a,d){return Br(x,[4,r,Je(o,a,l(u,d))],e)}}function Zl(x,r,e,t){for(var u=r,i=e,f=t;;){if(typeof f=="number")return l(u,i);switch(f[0]){case 0:var o=f[1];return function(C0){return Br(u,[5,i,C0],o)};case 1:var a=f[1];return function(C0){var A0=0;if(40<=C0)if(C0===92)var U0=CW;else Jr<=C0?A0=1:A0=2;else if(32<=C0)if(39<=C0)var U0=NW;else A0=2;else if(14<=C0)A0=1;else switch(C0){case 8:var U0=RW;break;case 9:var U0=OW;break;case 10:var U0=IW;break;case 13:var U0=LW;break;default:A0=1}switch(A0){case 1:var Q0=S1(4);Zr(Q0,0,92),Zr(Q0,1,48+(C0/st|0)|0),Zr(Q0,2,48+((C0/10|0)%10|0)|0),Zr(Q0,3,48+(C0%10|0)|0);var U0=g2(Q0);break;case 2:var H=S1(1);Zr(H,0,C0);var U0=g2(H);break}var b=Xx(U0),B=jv(b+2|0,39);return rs(U0,0,B,1,b),Br(u,[4,i,g2(B)],a)};case 2:var d=f[2],k=f[1];return wO(u,i,d,k,function(C0){return C0});case 3:return wO(u,i,f[2],f[1],zT0);case 4:return vy(u,i,f[4],f[2],f[3],KT0,f[1]);case 5:return vy(u,i,f[4],f[2],f[3],ZT0,f[1]);case 6:return vy(u,i,f[4],f[2],f[3],WT0,f[1]);case 7:return vy(u,i,f[4],f[2],f[3],$T0,f[1]);case 8:var T=f[4],g=f[3],A=f[2],N=f[1];if(typeof A=="number"){if(typeof g=="number")return g?function(C0,A0){return Br(u,[4,i,Ws(N,C0,A0)],T)}:function(C0){return Br(u,[4,i,Ws(N,hO(N),C0)],T)};var R=g[1];return function(C0){return Br(u,[4,i,Ws(N,R,C0)],T)}}if(A[0]===0){var O=A[2],M=A[1];if(typeof g=="number")return g?function(C0,A0){return Br(u,[4,i,Je(M,O,Ws(N,C0,A0))],T)}:function(C0){return Br(u,[4,i,Je(M,O,Ws(N,hO(N),C0))],T)};var L=g[1];return function(C0){return Br(u,[4,i,Je(M,O,Ws(N,L,C0))],T)}}var z=A[1];if(typeof g=="number")return g?function(C0,A0,U0){return Br(u,[4,i,Je(z,C0,Ws(N,A0,U0))],T)}:function(C0,A0){return Br(u,[4,i,Je(z,C0,Ws(N,hO(N),A0))],T)};var V=g[1];return function(C0,A0){return Br(u,[4,i,Je(z,C0,Ws(N,V,A0))],T)};case 9:return wO(u,i,f[2],f[1],jT0);case 10:var i=[7,i],f=f[1];continue;case 11:var i=[2,i,f[1]],f=f[2];continue;case 12:var i=[3,i,f[1]],f=f[2];continue;case 13:var Z=f[3],$=f[2],i0=_X(16);_O(i0,$);var U=TX(i0);return function(C0){return Br(u,[4,i,U],Z)};case 14:var J=f[3],Y=f[2];return function(C0){var A0=C0[1],U0=o1(A0,L1(r2(Y)));if(typeof U0[2]=="number")return Br(u,i,E1(U0[1],J));throw q0(k2,1)};case 15:var F=f[1];return function(C0,A0){return Br(u,[6,i,function(U0){return p(C0,U0,A0)}],F)};case 16:var n0=f[1];return function(C0){return Br(u,[6,i,C0],n0)};case 17:var i=[0,i,f[1]],f=f[2];continue;case 18:var Q=f[1];if(Q[0]===0){var f0=f[2],s0=Q[1][1],v0=0,u=function(Q0,H,b){return function(B){return Br(H,[1,Q0,[0,B]],b)}}(i,u,f0),i=v0,f=s0;continue}var o0=f[2],c0=Q[1][1],T0=0,u=function(C0,A0,U0){return function(Q0){return Br(A0,[1,C0,[1,Q0]],U0)}}(i,u,o0),i=T0,f=c0;continue;case 19:throw q0([0,wr,j$],1);case 20:var E0=f[3],M0=[8,i,U$];return function(C0){return Br(u,M0,E0)};case 21:var Y0=f[2];return function(C0){return Br(u,[4,i,Fd(vU,C0)],Y0)};case 22:var rx=f[1];return function(C0){return Br(u,[5,i,C0],rx)};case 23:var g0=f[2],H0=f[1];if(typeof H0=="number")switch(H0){case 0:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 1:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 2:throw q0([0,wr,B$],1);default:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0])}switch(H0[0]){case 0:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 1:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 2:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 3:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 4:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 5:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 6:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 7:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 8:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 9:var t0=H0[2];return x<50?TO(x+1|0,u,i,t0,g0):d2(TO,[0,u,i,t0,g0]);case 10:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);default:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0])}default:var ex=f[3],xx=f[1],ax=l(f[2],0);return x<50?SO(x+1|0,u,i,ex,xx,ax):d2(SO,[0,u,i,ex,xx,ax])}}}function TO(x,r,e,t,u){if(typeof t=="number")return x<50?t1(x+1|0,r,e,u):d2(t1,[0,r,e,u]);switch(t[0]){case 0:var i=t[1];return function(V){return lt(r,e,i,u)};case 1:var f=t[1];return function(V){return lt(r,e,f,u)};case 2:var o=t[1];return function(V){return lt(r,e,o,u)};case 3:var a=t[1];return function(V){return lt(r,e,a,u)};case 4:var d=t[1];return function(V){return lt(r,e,d,u)};case 5:var k=t[1];return function(V){return lt(r,e,k,u)};case 6:var T=t[1];return function(V){return lt(r,e,T,u)};case 7:var g=t[1];return function(V){return lt(r,e,g,u)};case 8:var A=t[2];return function(V){return lt(r,e,A,u)};case 9:var N=t[3],R=t[2],O=o2(r2(t[1]),R);return function(V){return lt(r,e,ee(O,N),u)};case 10:var M=t[1];return function(V,Z){return lt(r,e,M,u)};case 11:var L=t[1];return function(V){return lt(r,e,L,u)};case 12:var z=t[1];return function(V){return lt(r,e,z,u)};case 13:throw q0([0,wr,Y$],1);default:throw q0([0,wr,X$],1)}}function t1(x,r,e,t){var u=[8,e,J$];return x<50?Zl(x+1|0,r,u,t):d2(Zl,[0,r,u,t])}function SO(x,r,e,t,u,i){if(u){var f=u[1];return function(a){return QT0(r,e,t,f,l(i,a))}}var o=[4,e,i];return x<50?Zl(x+1|0,r,o,t):d2(Zl,[0,r,o,t])}function Br(x,r,e){return nO(Zl(0,x,r,e))}function lt(x,r,e,t){return nO(TO(0,x,r,e,t))}function QT0(x,r,e,t,u){return nO(SO(0,x,r,e,t,u))}function $s(x,r){for(var e=r;;){if(typeof e=="number")return 0;switch(e[0]){case 0:var t=e[1],u=SX(e[2]);return $s(x,t),jl(x,u);case 1:var i=e[2],f=e[1];if(i[0]===0){var o=i[1];$s(x,f),jl(x,V$);var e=o;continue}var a=i[1];$s(x,f),jl(x,z$);var e=a;continue;case 6:var d=e[2];return $s(x,e[1]),l(d,x);case 7:return $s(x,e[1]),es(x);case 8:var k=e[2];return $s(x,e[1]),y2(k);case 2:case 4:var T=e[2];return $s(x,e[1]),jl(x,T);default:var g=e[2];return $s(x,e[1]),GY(x,g)}}}function Qs(x,r){for(var e=r;;){if(typeof e=="number")return 0;switch(e[0]){case 0:var t=e[1],u=SX(e[2]);return Qs(x,t),vr(x,u);case 1:var i=e[2],f=e[1];if(i[0]===0){var o=i[1];Qs(x,f),vr(x,K$);var e=o;continue}var a=i[1];Qs(x,f),vr(x,Z$);var e=a;continue;case 6:var d=e[2];return Qs(x,e[1]),vr(x,l(d,0));case 7:var e=e[1];continue;case 8:var k=e[2];return Qs(x,e[1]),y2(k);case 2:case 4:var T=e[2];return Qs(x,e[1]),vr(x,T);default:var g=e[2];return Qs(x,e[1]),at(x,g)}}}function gX(x,r){var e=r[1],t=0;return Br(function(u){return $s(x,u),0},t,e)}function EO(x){return gX(ts,x)}function Tr(x){var r=x[1];return Br(function(e){var t=Fr(64);return Qs(t,e),Y1(t)},0,r)}var gO=[0,0];function AO(x,r){var e=x[1+r];if(!(1-(typeof e=="number"?1:0)))return l(Tr(RF),e);if(Dv(e)===Av)return l(Tr(OF),e);if(Dv(e)!==og)return IF;for(var t=HR("%.12g",e),u=0,i=Xx(t);;){if(i<=u)return Qx(t,EW);var f=O1(t,u),o=0;if(48<=f?58>f&&(o=1):f===45&&(o=1),!o)return t;var u=u+1|0}}function AX(x,r){if(x.length-1<=r)return iF;var e=AX(x,r+1|0),t=AO(x,r);return p(Tr(fF),t,e)}function ay(x){for(var r=gO[1];;){if(r){var e=0,t=r[2],u=r[1];try{var i=l(u,x)}catch{e=1}var f=0;if(e||!i)f=1;else var o=[0,i[1]];if(f){var r=t;continue}}else var o=0;if(o)return o[1];if(x===uO)return wF;if(x===tX)return TF;if(x[1]===eX){var a=x[2],d=a[3],k=a[2],T=a[1];return Ye(Tr(fO),T,k,d,d+5|0,SF)}if(x[1]===wr){var g=x[2],A=g[3],N=g[2],R=g[1];return Ye(Tr(fO),R,N,A,A+6|0,EF)}if(x[1]===Ml){var O=x[2],M=O[3],L=O[2],z=O[1];return Ye(Tr(fO),z,L,M,M+6|0,gF)}if(Dv(x)!==0)return x[1];var V=x.length-1,Z=x[1][1];if(2>>0)var $=AX(x,2),i0=AO(x,1),U=p(Tr(AF),i0,$);else switch(V){case 0:var U=PF;break;case 1:var U=CF;break;default:var J=AO(x,1),U=l(Tr(NF),J)}return Qx(Z,U)}}function PO(x,r){var e=XZ(r),t=e.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var f=Z1(e,i)[1+i],o=function(z){return function(V){return V?z===0?lF:pF:z===0?dF:yF}}(i);if(f[0]===0)var a=f[5],d=f[4],k=f[3],T=f[6]?mF:kF,g=f[2],A=f[7],N=o(f[1]),O=[0,wW(Tr(hF),N,A,g,T,k,d,a)];else if(f[1])var O=0;else var R=o(0),O=[0,l(Tr(_F),R)];if(O){var M=O[1];l(gX(x,aF),M)}var L=i+1|0;if(t!==i){var i=L;continue}break}return 0}function PX(x){for(;;){var r=gO[1],e=1-cO(gO,r,[0,x,r]);if(!e)return e}}var FT0=LF.slice(),HT0=[0];tO(yD,function(x,r){try{try{var e=r?HT0:zY(0);try{oO(0)}catch{}try{var t=ay(x);l(EO(vF),t),PO(ts,e);var u=rW(0);if(u<0){var i=ny(u);iX(Z1(FT0,i)[1+i])}var f=es(ts),o=f}catch(A){var a=I1(A),d=ay(x);l(EO(cF),d),PO(ts,e);var k=ay(a);l(EO(sF),k),PO(ts,zY(0));var o=es(ts)}var T=o}catch(A){var g=I1(A);if(g!==uO)throw q0(g,0);var T=iX(oF)}return T}catch{return 0}});var CO=[Gr,bF,Js(0)],ly=0,CX=-1;function Wl(x,r){return x[13]=x[13]+r[3]|0,yO(r,x[28])}var NX=1000000010;function NO(x,r){return G0(x[17],r,0,Xx(r))}function py(x){return l(x[19],0)}function RX(x,r,e){return x[9]=x[9]-r|0,NO(x,e),x[11]=0,0}function dy(x,r){var e=P(r,hx);return e&&RX(x,Xx(r),r)}function Bv(x,r,e){var t=r[3],u=r[2];dy(x,r[1]),py(x),x[11]=1;var i=(x[6]-e|0)+u|0,f=x[8],o=f<=i?f:i;return x[10]=o,x[9]=x[6]-x[10]|0,l(x[21],x[10]),dy(x,t)}function OX(x,r){return Bv(x,GF,r)}function Ha(x,r){var e=r[2],t=r[3];return dy(x,r[1]),x[9]=x[9]-e|0,l(x[20],e),dy(x,t)}function qT0(x,r,e){if(typeof e=="number")switch(e){case 0:var t=$a(x[3]);if(!t)return 0;var u=t[1][1],i=function(ax,dx){if(!dx)return[0,ax,0];var mx=dx[1],L0=dx[2];return xW(ax,mx)?[0,ax,dx]:[0,mx,i(ax,L0)]};return u[1]=i(x[6]-x[9]|0,u[1]),0;case 1:return Wa(x[2]),0;case 2:return Wa(x[3]),0;case 3:var f=$a(x[2]);return f?OX(x,f[1][2]):py(x);case 4:var o=x[10]!==(x[6]-x[9]|0)?1:0;if(!o)return o;var a=x[28],d=a[2];if(d){var k=d[1];if(d[2]){var T=d[2];a[1]=a[1]-1|0,a[2]=T;var g=[0,k]}else{dO(a);var g=[0,k]}}else var g=0;if(!g)return 0;var A=g[1],N=A[1];return x[12]=x[12]-A[3]|0,x[9]=x[9]+N|0,0;default:var R=Wa(x[5]);return R?NO(x,l(x[25],R[1])):0}switch(e[0]){case 0:return RX(x,r,e[1]);case 1:var O=e[2],M=e[1],L=O[1],z=O[2],V=$a(x[2]);if(!V)return 0;var Z=V[1],$=Z[2];switch(Z[1]){case 0:return Ha(x,M);case 1:return Bv(x,O,$);case 2:return Bv(x,O,$);case 3:return x[9]<(r+Xx(L)|0)?Bv(x,O,$):Ha(x,M);case 4:return x[11]?Ha(x,M):x[9]<(r+Xx(L)|0)||((x[6]-$|0)+z|0)s0){var Q=v0;continue}var o0=s0}else var o0=f0;var c0=o0;break}else var c0=i0;var T0=c0-i0|0;return 0<=T0?Ha(x,[0,FF,T0+J|0,QF]):Bv(x,[0,qF,c0+U|0,HF],x[6]);case 3:var E0=e[2],M0=e[1];if(x[8]<(x[6]-x[9]|0)){var Y0=$a(x[2]);if(Y0){var rx=Y0[1],g0=rx[2],H0=rx[1];x[9]=H0-1>>>0&&OX(x,g0)}else py(x)}var t0=x[9]-M0|0,ex=E0===1?1:x[9]=e)return G0(x[17],XX,0,e);G0(x[17],XX,0,80);var e=e+fj|0}}function GT0(x){return x[1]===CO?Qx(XF,Qx(x[2],YF)):JF}function bT0(x){return x[1]===CO?Qx(UF,Qx(x[2],jF)):BF}function xS0(x){return 0}function rS0(x){return 0}function VX(x,r){function e(g){return 0}function t(g){return 0}function u(g){return 0}var i=kX(0),f=[0,CX,MF,0];yO(f,i);var o=Vl(0);RO(o),Uv([0,1,f],o);var a=Vl(0),d=Vl(0),k=Vl(0),T=[0,o,Vl(0),k,d,a,78,10,68,78,0,1,1,1,1,DT0,DF,x,r,u,t,e,0,0,GT0,bT0,xS0,rS0,i];return T[19]=function(g){return G0(T[17],VF,0,1)},T[20]=function(g){return JX(T,g)},T[21]=function(g){return JX(T,g)},T}function zX(x){function r(e){return es(x)}return VX(function(e,t,u){return 0<=t&&0<=u&&(Xx(e)-u|0)>=t?rO(x,e,t,u):y2(SW)},r)}function MO(x){function r(e){return 0}return VX(function(e,t,u){return hX(x,e,t,u)},r)}var eS0=hw;function KX(x){return Fr(eS0)}var tS0=KX(0),nS0=zX(UT0),uS0=zX(ts);MO(tS0);function ZX(x,r){var e=Fr(16),t=MO(e);p(x,t,r),Ql(t,0);var u=e[2];if(2>u)return Y1(e);var i=u-2|0,f=1;return 0<=i&&(e[2]-i|0)>=1?Za(e[1],f,i):y2(e$)}function Ve(x,r){var e=0;if(typeof r=="number")return 0;switch(r[0]){case 0:var t=r[2];if(Ve(x,r[1]),typeof t=="number")switch(t){case 0:return UX(x,0);case 1:return BX(x,0);case 2:return Ql(x,0);case 3:var u=x[14]=O1(L,U)+G5>>>0){var U=U+1|0;continue}for(var J=m2(L,i0,U-i0|0),Y=$(U),F=Y;;){if(F!==V){var n0=O1(L,F),Q=0;if(48<=n0?58>n0&&(Q=1):n0===45&&(Q=1),Q){var F=F+1|0;continue}}if(Y===F)var f0=0;else try{var s0=ot(m2(L,Y,F-Y|0)),f0=s0}catch(b0){var v0=I1(b0);if(v0[1]!==kn)throw q0(v0,0);var f0=Z(0)}$(F)!==V&&Z(0);var o0=0;if(P(J,hx)&&P(J,bE))var c0=P(J,"h")?P(J,"hov")?P(J,"hv")?P(J,ZD)?Z(0):1:2:3:0;else o0=1;if(o0)var c0=4;var z=[0,f0,c0];break}break}return jX(x,z[1],z[2]);case 2:var T0=r[1],E0=0;if(typeof T0=="number"||T0[0]!==0)E0=1;else{var M0=T0[2],Y0=0;if(typeof M0=="number"||M0[0]!==1)Y0=1;else var rx=r[2],g0=M0[2],H0=T0[1];Y0&&(E0=1)}if(E0){var t0=r[2],ex=T0;e=2}break;case 3:var xx=r[1],ax=0;if(typeof xx=="number"||xx[0]!==0)ax=1;else{var dx=xx[2],mx=0;if(typeof dx=="number"||dx[0]!==1)mx=1;else{var L0=r[2],C0=dx[2],A0=xx[1];e=1}mx&&(ax=1)}if(ax){var U0=r[2],Q0=xx;e=3}break;case 4:var H=r[1],b=0;if(typeof H=="number"||H[0]!==0)b=1;else{var B=H[2],a0=0;if(typeof B=="number"||B[0]!==1)a0=1;else var rx=r[2],g0=B[2],H0=H[1];a0&&(b=1)}if(b){var t0=r[2],ex=H;e=2}break;case 5:var m0=r[1],P0=0;if(typeof m0=="number"||m0[0]!==0)P0=1;else{var D=m0[2],N0=0;if(typeof D=="number"||D[0]!==1)N0=1;else{var L0=r[2],C0=D[2],A0=m0[1];e=1}N0&&(P0=1)}if(P0){var U0=r[2],Q0=m0;e=3}break;case 6:var X0=r[2];return Ve(x,r[1]),l(X0,x);case 7:return Ve(x,r[1]),Ql(x,0);default:var D0=r[2];return Ve(x,r[1]),y2(D0)}switch(e){case 0:return Ve(x,H0),LO(x,g0,rx);case 1:return Ve(x,A0),LO(x,C0,fy(1,L0));case 2:return Ve(x,ex),yy(x,t0);default:return Ve(x,Q0),$l(x,U0)}}function Yr(x){return function(r){var e=r[1],t=0;return Br(function(u){return Ve(x,u),0},t,e)}}for(;;){var WX=sO[1],iS0=[0,1];if(!(1-cO(sO,WX,function(x,r){return function(e){return cO(x,1,0)&&(Ql(nS0,0),Ql(uS0,0)),l(r,0)}}(iS0,WX)))){var fS0=2,cS0=function(x){var r=[0,0],e=Xx(x)-1|0,t=0;if(e>=0)for(var u=t;;){var i=O1(x,u);r[1]=(l8*r[1]|0)+i|0;var f=u+1|0;if(e!==u){var u=f;continue}break}r[1]=r[1]&tD;var o=1073741823=0)for(var f=i;;){var o=(f*2|0)+3|0,a=Z1(x,f)[1+f];Z1(e,o)[1+o]=a;var d=f+1|0;if(u!==f){var f=d;continue}break}return[0,fS0,e,Yv[1],Oo[1],0,0,Fs[1],0]},DO=function(x,r){var e=x[2].length-1,t=e=0&&(u.length-1-e|0)>=0&&(hZ(i,0,u,0,e),f=1),f||y2(JW),x[2]=u;var o=0}else var o=t;return o},HX=[0,0],oS0=[0,0],jO=function(x){var r=x[2].length-1;return DO(x,r+1|0),r},Fl=function(x,r){try{var e=p(Yv[28],r,x[3]);return e}catch(i){var t=I1(i);if(t!==A2)throw q0(t,0);var u=jO(x);return x[3]=G0(Yv[4],r,u,x[3]),x[4]=G0(Oo[4],u,1,x[4]),u}},UO=function(x,r){return cy(function(e){return Fl(x,e)},r)},qX=function(x,r,e){return oS0[1]++,p(Oo[28],r,x[4])?(DO(x,r+1|0),Z1(x[2],r)[1+r]=e,0):(x[6]=[0,[0,r,e],x[6]],0)},BO=function(x){if(x===0)return 0;for(var r=x.length-1-1|0,e=0;;){if(0>r)return e;var t=[0,x[1+r],e],r=r-1|0,e=t}},YO=function(x,r){try{var e=p(Fs[28],r,x[7]);return e}catch(i){var t=I1(i);if(t!==A2)throw q0(t,0);var u=x[1];return x[1]=u+1|0,P(r,hx)&&(x[7]=G0(Fs[4],r,u,x[7])),u}},XO=function(x){return Cl(x,0)?[0]:x},JO=function(x,r,e,t,u,i){var f=u[2],o=u[4],a=BO(r),d=BO(e),k=BO(t),T=_n(function(o0){return Fl(x,o0)},d),g=_n(function(o0){return Fl(x,o0)},k);x[5]=[0,[0,x[3],x[4],x[6],x[7],T,a],x[5]];var A=Fs[1],N=x[7];function R(o0,c0,T0){return lO(o0,a)?G0(Fs[4],o0,c0,T0):T0}x[7]=G0(Fs[13],R,N,A);var O=[0,Yv[1]],M=[0,Oo[1]];oX(function(o0,c0){O[1]=G0(Yv[4],o0,c0,O[1]);var T0=M[1];try{var E0=p(Oo[28],c0,x[4]),M0=E0}catch(rx){var Y0=I1(rx);if(Y0!==A2)throw q0(Y0,0);var M0=1}return M[1]=G0(Oo[4],c0,M0,T0),0},k,g),oX(function(o0,c0){return O[1]=G0(Yv[4],o0,c0,O[1]),M[1]=G0(Oo[4],c0,0,M[1]),0},d,T),x[3]=O[1],x[4]=M[1];var L=0,z=x[6];x[6]=vO(function(o0,c0){return lO(o0[1],T)?c0:[0,o0,c0]},z,L);var V=i?p(f,x,o):l(f,x),Z=Bl(x[5]),$=Z[6],i0=Z[5],U=Z[4],J=Z[3],Y=Z[2],F=Z[1];x[5]=sX(x[5]),x[7]=x2(function(o0,c0){var T0=p(Fs[28],c0,x[7]);return G0(Fs[4],c0,T0,o0)},U,$),x[3]=F,x[4]=Y;var n0=x[6];x[6]=vO(function(o0,c0){return lO(o0[1],i0)?c0:[0,o0,c0]},n0,J);var Q=0,f0=XO(t),s0=[0,cy(function(o0){var c0=Fl(x,o0);try{for(var T0=x[6];;){if(!T0)throw q0(A2,1);var E0=T0[1],M0=T0[2],Y0=E0[2];if(JY(E0[1],c0)===0)return Y0;var T0=M0}}catch(g0){var rx=I1(g0);if(rx===A2)return Z1(x[2],c0)[1+c0];throw q0(rx,0)}},f0),Q],v0=XO(r);return _Z([0,[0,V],[0,cy(function(o0){try{var c0=p(Fs[28],o0,x[7]);return c0}catch(E0){var T0=I1(E0);throw T0===A2?q0([0,wr,xH],1):q0(T0,0)}},v0),s0]])},my=function(x,r){if(x===0)var e=FX([0]);else{var t=FX(cy(cS0,x)),u=x.length-1-1|0,i=0;if(u>=0)for(var f=i;;){var o=(f*2|0)+2|0;t[3]=G0(Yv[4],x[1+f],o,t[3]),t[4]=G0(Oo[4],o,1,t[4]);var a=f+1|0;if(u!==f){var f=a;continue}break}var e=t}var d=l(r,e);return HX[1]=(HX[1]+e[1]|0)-1|0,e[8]=Ax(e[8]),DO(e,3+((Z1(e[2],1)[2]*16|0)/32|0)|0),[0,l(d,0),r,d,0]},ky=function(x,r){if(x)return x;var e=eO(Gr,r[1]);return e[1]=r[2],aW(e)},VO=function(x,r,e){if(x)return r;var t=e[8];if(t!==0)for(var u=t;;){if(u){var i=u[2];l(u[1],r);var u=i;continue}break}return r},hy=function(x){var r=jO(x),e=0;if(r%2|0&&(2+((Z1(x[2],1)[2]*16|0)/32|0)|0)>=r){var t=jO(x);e=1}if(!e)var t=r;return Z1(x[2],t)[1+t]=0,t},zO=function(x,r){for(var e=[0,0],t=r.length-1;;){if(e[1]>=t)return 0;var u=e[1],i=Z1(r,u)[1+u],f=function(kx){e[1]++;var V0=e[1];return Z1(r,V0)[1+V0]},o=f(0);if(typeof o=="number")switch(o){case 0:var a=f(0),b0=function(V0){return function(h){return V0}}(a);break;case 1:var d=f(0),b0=function(V0){return function(h){return h[1+V0]}}(d);break;case 2:var k=f(0),T=f(0),b0=function(V0,h){return function(X){return X[1+V0][1+h]}}(k,T);break;case 3:var g=f(0),b0=function(V0){return function(h){return l(h[1][1+V0],h)}}(g);break;case 4:var A=f(0),b0=function(V0){return function(h,X){return h[1+V0]=X,0}}(A);break;case 5:var N=f(0),R=f(0),b0=function(V0,h){return function(X){return l(V0,h)}}(N,R);break;case 6:var O=f(0),M=f(0),b0=function(V0,h){return function(X){return l(V0,X[1+h])}}(O,M);break;case 7:var L=f(0),z=f(0),V=f(0),b0=function(V0,h,X){return function(W0){return l(V0,W0[1+h][1+X])}}(L,z,V);break;case 8:var Z=f(0),$=f(0),b0=function(V0,h){return function(X){return l(V0,l(X[1][1+h],X))}}(Z,$);break;case 9:var i0=f(0),U=f(0),J=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,X)}}(i0,U,J);break;case 10:var Y=f(0),F=f(0),n0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,W0[1+X])}}(Y,F,n0);break;case 11:var Q=f(0),f0=f(0),s0=f(0),v0=f(0),b0=function(V0,h,X,W0){return function(sx){return p(V0,h,sx[1+X][1+W0])}}(Q,f0,s0,v0);break;case 12:var o0=f(0),c0=f(0),T0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,l(W0[1][1+X],W0))}}(o0,c0,T0);break;case 13:var E0=f(0),M0=f(0),Y0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,W0[1+h],X)}}(E0,M0,Y0);break;case 14:var rx=f(0),g0=f(0),H0=f(0),t0=f(0),b0=function(V0,h,X,W0){return function(sx){return p(V0,sx[1+h][1+X],W0)}}(rx,g0,H0,t0);break;case 15:var ex=f(0),xx=f(0),ax=f(0),b0=function(V0,h,X){return function(W0){return p(V0,l(W0[1][1+h],W0),X)}}(ex,xx,ax);break;case 16:var dx=f(0),mx=f(0),b0=function(V0,h){return function(X){return p(X[1][1+V0],X,h)}}(dx,mx);break;case 17:var L0=f(0),C0=f(0),b0=function(V0,h){return function(X){return p(X[1][1+V0],X,X[1+h])}}(L0,C0);break;case 18:var A0=f(0),U0=f(0),Q0=f(0),b0=function(V0,h,X){return function(W0){return p(W0[1][1+V0],W0,W0[1+h][1+X])}}(A0,U0,Q0);break;case 19:var H=f(0),b=f(0),b0=function(V0,h){return function(X){var W0=l(X[1][1+h],X);return p(X[1][1+V0],X,W0)}}(H,b);break;case 20:var B=f(0),a0=f(0);hy(x);var b0=function(V0,h){return function(X){return l(bx(h,V0,0),h)}}(B,a0);break;case 21:var m0=f(0),P0=f(0);hy(x);var b0=function(V0,h){return function(X){var W0=X[1+h];return l(bx(W0,V0,0),W0)}}(m0,P0);break;case 22:var D=f(0),N0=f(0),X0=f(0);hy(x);var b0=function(V0,h,X){return function(W0){var sx=W0[1+h][1+X];return l(bx(sx,V0,0),sx)}}(D,N0,X0);break;default:var D0=f(0),ox=f(0);hy(x);var b0=function(V0,h){return function(X){var W0=l(X[1][1+h],X);return l(bx(W0,V0,0),W0)}}(D0,ox)}else var b0=o;qX(x,i,b0),e[1]++}},GX=function(x,r){var e=r.length-1,t=eO(0,e),u=e-1|0,i=0;if(u>=0)for(var f=i;;){var o=Z1(r,f)[1+f];if(typeof o=="number")switch(o){case 0:var k=function(A){function N(R){var O=t[1+A];if(N===O)throw q0([0,Ml,x],1);return l(O,R)}return N}(f);break;case 1:var a=[];O0(a,[rl,function(A,N){return function(R){var O=t[1+N];if(A===O)throw q0([0,Ml,x],1);var M=Dv(O);if(Ba===M)return O[1];if(rl!==M)return O;var L=O[1];O[1]=XT0;try{var z=l(L,0);return oW(O,z),z}catch(Z){var V=I1(Z);throw O[1]=function($){throw q0(V,0)},q0(V,0)}}}(a,f)]);var k=a;break;default:var d=function(A){throw q0([0,Ml,x],1)},k=[0,d,d,d,0]}else var k=o[0]===0?GX(x,o[1]):o[1];t[1+f]=k;var T=f+1|0;if(u!==f){var f=T;continue}break}return t},bX=function(x,r,e){if(Dv(e)===0&&x.length-1<=e.length-1){var t=x.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var f=e[1+i],o=Z1(x,i)[1+i];if(typeof o=="number")if(o===2){var a=0;if(Dv(f)===0&&f.length-1===4)for(var d=0,k=r[1+i];;){k[1+d]=f[1+d];var T=d+1|0;if(d!==3){var d=T;continue}break}else a=1;if(a)throw q0([0,wr,rH],1)}else r[1+i]=f;else o[0]===0&&bX(o[1],r[1+i],f);var g=i+1|0;if(t!==i){var i=g;continue}break}return 0}throw q0([0,wr,eH],1)};try{bY("TMPDIR")}catch(x){var xJ=I1(x);if(xJ!==A2)throw q0(xJ,0)}try{bY("TEMP")}catch(x){var rJ=I1(x);if(rJ!==A2)throw q0(rJ,0)}P(fX,jB)&&P(fX,"Win32");var is=function(x,r){function e(t){return at(x,t)}return il<=r?(e(wa|r>>>18|0),e(h1|(r>>>12|0)&63),e(h1|(r>>>6|0)&63),e(h1|r&63)):hN<=r?(e(Aa|r>>>12|0),e(h1|(r>>>6|0)&63),e(h1|r&63)):h1<=r?(e(ha|r>>>6|0),e(h1|r&63)):e(r)},Io=[Gr,uH,Js(0)],eJ=0,tJ=0,nJ=0,uJ=0,iJ=0,fJ=0,cJ=0,sJ=0,oJ=0,vJ=0,m=function(x){if(x[3]===x[2])return-1;var r=x[1][1+x[3]];return x[3]=x[3]+1|0,r===10&&(x[5]!==0&&(x[5]=x[5]+1|0),x[4]=x[3]),r},r0=function(x,r){return x[9]=x[3],x[10]=x[4],x[11]=x[5],x[12]=r,0},yr=function(x){return x[6]=x[3],x[7]=x[4],x[8]=x[5],r0(x,-1)},_=function(x){return x[3]=x[9],x[4]=x[10],x[5]=x[11],x[12]},qa=function(x){return x[3]=x[6],x[4]=x[7],x[5]=x[8],0},KO=function(x,r){return x[6]=r,0},_y=function(x){return x[3]-x[6]|0},n1=function(x){var r=x[3]-x[6]|0,e=x[6],t=x[1];return 0<=e&&0<=r&&(t.length-1-r|0)>=e?wZ(t,e,r):y2(VW)},aJ=function(x){var r=x[6];return Z1(x[1],r)[1+r]},Hl=function(x,r,e,t){for(var u=[0,r],i=[0,e],f=[0,0];;){if(0>=i[1])return f[1];var o=x[1+u[1]];if(0>o)throw q0(Io,1);if(Jr>>18|0),Zr(t,f[1]+1|0,h1|(o>>>12|0)&63),Zr(t,f[1]+2|0,h1|(o>>>6|0)&63),Zr(t,f[1]+3|0,h1|o&63),f[1]=f[1]+4|0}else Zr(t,f[1],Aa|o>>>12|0),Zr(t,f[1]+1|0,h1|(o>>>6|0)&63),Zr(t,f[1]+2|0,h1|o&63),f[1]=f[1]+3|0;else Zr(t,f[1],ha|o>>>6|0),Zr(t,f[1]+1|0,h1|o&63),f[1]=f[1]+2|0;else Zr(t,f[1],o),f[1]++;u[1]++,i[1]+=-1}},lJ=function(x){for(var r=Xx(x),e=Va(r,0),t=[0,0],u=[0,0];;){if(t[1]>=r)return[0,e,u[1],vJ,oJ,sJ,cJ,fJ,iJ,uJ,nJ,tJ,eJ];var i=fx(x,t[1]),f=0;if(ha<=i)if(wa<=i)if(Gr<=i)f=1;else{var o=fx(x,t[1]+1|0),a=fx(x,t[1]+2|0),d=fx(x,t[1]+3|0),k=(o>>>6|0)!==2?1:0;if(k)var g=k;else var T=(a>>>6|0)!==2?1:0,g=T||((d>>>6|0)!==2?1:0);if(g)throw q0(Io,1);var A=(i&7)<<18|(o&63)<<12|(a&63)<<6|d&63;if(_5>>6|0)!==2?1:0,L=M||((R>>>6|0)!==2?1:0);if(L)var V=L;else var z=55296<=O?1:0,V=z&&(O<=57343?1:0);if(V)throw q0(Io,1);e[1+u[1]]=O,t[1]=t[1]+3|0}else{var Z=fx(x,t[1]+1|0);if((Z>>>6|0)!==2)throw q0(Io,1);e[1+u[1]]=(i&31)<<6|Z&63,t[1]=t[1]+2|0}else h1<=i?f=1:(e[1+u[1]]=i,t[1]++);if(f)throw q0(Io,1);u[1]++}},ql=function(x,r,e){var t=x[6]+r|0,u=S1(e*4|0),i=x[1];if((t+e|0)<=i.length-1)return Za(u,0,Hl(i,t,e,u));throw q0([0,wr,nH],1)},Jx=function(x){var r=x[6],e=x[3]-r|0,t=S1(e*4|0);return Za(t,0,Hl(x[1],r,e,t))},wy=function(x,r){var e=x[6],t=x[3]-e|0,u=S1(t*4|0);return kO(r,u,0,Hl(x[1],e,t,u))},Gl=function(x){var r=x.length-1,e=S1(r*4|0);return Za(e,0,Hl(x,0,r,e))},pJ=function(x,r){return x[3]=x[3]-r|0,0},fs=function(x){return typeof x=="number"?0:x[0]===0?1:x[1]},Xv=function(x,r,e,t){var u=fs(x),i=fs(t),f=i<=u?u+1|0:i+1|0;return f===1?[0,r,e]:[1,f,r,e,x,t]},Ty=function(x,r,e,t){var u=fs(x),i=fs(t),f=i<=u?u+1|0:i+1|0;return[1,f,r,e,x,t]},dJ=function(x,r,e,t){var u=fs(x),i=fs(t);if((i+2|0)=i)return Xv(x,r,e,t);var R=t[5],O=t[4],M=t[3],L=t[2],z=fs(O);if(z<=fs(R))return Ty(Xv(x,r,e,O),L,M,R);var V=O[4],Z=O[3],$=O[2],i0=Xv(O[5],L,M,R);return Ty(Xv(x,r,e,V),$,Z,i0)},vS0=0,Ga=function(x,r){for(var e=x,t=r;;){if(typeof e=="number")return t;if(e[0]===0)return[0,e[1],0,t];var u=[0,e[2],e[4],t],e=e[3],t=u}},yJ=function(x,r){if(!x)return 0;var e=x[1],t=Ga(x[2],x[3]);return[0,e,function(u){return yJ(t,u)}]},aS0=function(x){var r=Ga(x,0);return function(e){return yJ(r,e)}},Hs=function(x){return typeof x=="number"?0:x[0]===0?1:x[1]},lS0=function(x){return[0,x]},ze=function(x,r,e){var t=0;if(typeof x=="number"){if(typeof e=="number")return[0,r];e[0]===1&&(t=1)}else if(x[0]===0)typeof e!="number"&&e[0]===1&&(t=1);else{var u=x[1];if(typeof e!="number"&&e[0]===1){var i=e[1],f=i<=u?u+1|0:i+1|0;return[1,f,r,x,e]}var o=u;t=2}switch(t){case 1:var o=e[1];break;case 0:return[1,2,r,x,e]}return[1,o+1|0,r,x,e]},Lo=function(x,r,e){var t=Hs(x),u=Hs(e),i=u<=t?t+1|0:u+1|0;return[1,i,r,x,e]},Sy=function(x,r){if(r===0)return 0;if(r===1)return[0,l(x,0)];var e=r>>>1|0,t=Sy(x,e),u=l(x,0),i=Sy(x,(r-e|0)-1|0);return[1,Hs(t)+1|0,u,t,i]},pS0=function(x){var r=[0,0],e=x.length-1;return Sy(function(t){var u=r[1],i=Z1(x,u)[1+u];return r[1]++,i},e)},Xt=function(x,r,e){var t=Hs(x),u=Hs(e);if((u+2|0)=u)return ze(x,r,e);var g=e[4],A=e[3],N=e[2],R=Hs(A);if(R<=Hs(g))return Lo(ze(x,r,A),N,g);var O=A[3],M=A[2],L=ze(A[4],N,g);return Lo(ze(x,r,O),M,L)},mJ=function(x,r){if(typeof r=="number")return[0,x];if(r[0]===0)return ze([0,x],r[1],0);var e=r[4],t=r[2];return Xt(mJ(x,r[3]),t,e)},kJ=function(x,r){if(typeof r=="number")return[0,x];if(r[0]===0)return ze(0,r[1],[0,x]);var e=r[3],t=r[2];return Xt(e,t,kJ(x,r[4]))},J2=function(x,r,e){if(typeof x=="number")return mJ(r,e);if(x[0]===0){if(typeof e!="number"){if(e[0]===0)return ze(x,r,e);var t=e[4],u=e[3],i=e[2];return 3>1,h=T0(V0,H0),X=h[1],W0=T0(g0-V0|0,h[2]),sx=X,tx=W0[1],j0=0,Px=W0[2];;){if(sx){if(tx){var Ex=tx[2],Ix=tx[1],qx=sx[2],B0=sx[1],tr=p(o0,B0,Ix);if(tr===0){var sx=qx,tx=Ex,j0=[0,B0,j0];continue}if(0>1,h=c0(V0,H0),X=h[1],W0=c0(g0-V0|0,h[2]),sx=X,tx=W0[1],j0=0,Px=W0[2];;){if(sx){if(tx){var Ex=tx[2],Ix=tx[1],qx=sx[2],B0=sx[1],tr=p(o0,B0,Ix);if(tr===0){var sx=qx,tx=Ex,j0=[0,B0,j0];continue}if(0<=tr){var tx=Ex,j0=[0,Ix,j0];continue}var sx=qx,j0=[0,B0,j0];continue}var Ux=us(sx,j0)}else var Ux=us(tx,j0);return[0,Ux,Px]}},E0=ns(U),M0=2<=E0?c0(E0,U)[1]:U,Y0=function(g0,H0){if(3>=g0>>>0)switch(g0){case 0:return[0,0,H0];case 1:if(H0)return[0,[0,H0[1]],H0[2]];break;case 2:if(H0){var t0=H0[2];if(t0)return[0,[1,2,t0[1],[0,H0[1]],0],t0[2]]}break;default:if(H0){var ex=H0[2];if(ex){var xx=ex[2];if(xx)return[0,[1,2,ex[1],[0,H0[1]],[0,xx[1]]],xx[2]]}}}var ax=g0/2|0,dx=Y0(ax,H0),mx=dx[2],L0=dx[1];if(!mx)throw q0([0,wr,aH],1);var C0=mx[1],A0=Y0((g0-ax|0)-1|0,mx[2]),U0=A0[2];return[0,Lo(L0,C0,A0[1]),U0]};return Y0(ns(M0),M0)[1]}var rx=s0[1];return r(rx,r(v0,r(f0,r(n0,[0,Y]))))}function i0(U,J,Y){l(Yr(J),cH);var F=TJ(Y);F&&l(Yr(J),sH);var n0=0;return x2(function(Q,f0){return Q&&l(Yr(J),fH),p(U,J,f0),1},n0,F),F&&l(Yr(J),oH),l(Yr(J),vH)}return[0,u1,$O,t,r,lS0,u,i,f,a,d,k,T,g,A,Z,N,R,O,M,L,WO,TJ,bl,hJ,_J,dS0,bl,hJ,z,V,aS0,$,i0,Sy,pS0,function(U,J){for(var Y=J;;){if(typeof Y=="number")return 0;if(Y[0]===0){var F=Y[1];return l(U,F)?[0,F]:0}var n0=Y[2],Q=Y[4],f0=Y[3];if(!l(U,n0)){var Y=Q;continue}for(var s0=n0,v0=f0;;){if(typeof v0=="number")return[0,s0];if(v0[0]===0){var o0=v0[1];return l(U,o0)?[0,o0]:[0,s0]}var c0=v0[2],T0=v0[4],E0=v0[3];if(l(U,c0)){var s0=c0,v0=E0;continue}var v0=T0}}}]},EJ=function(x){switch(x[0]){case 0:return 1;case 1:return 2;case 2:return 2;default:return 3}},Vx=function(x,r){if(!r)return r;var e=r[1],t=l(x,e);return e===t?r:[0,t]},cx=function(x,r,e,t,u){var i=p(x,r,e);return e===i?t:l(u,i)},$0=function(x,r,e,t){var u=l(x,r);return r===u?e:l(t,u)},e2=function(x,r){var e=r[1],t=r[2];return cx(x,e,t,r,function(u){return[0,e,u]})},gJ=function(x,r){return Vx(function(e){var t=e[1],u=e[2];return cx(x,t,u,e,function(i){return[0,t,i]})},r)},Sr=function(x,r){var e=x2(function(u,i){var f=u[2],o=u[1],a=l(x,i),d=f||(a!==i?1:0);return[0,[0,a,o],d]},VH,r),t=e[1];return e[2]?Ax(t):r},QO=my(KH,function(x){var r=UO(x,zH),e=r[1],t=r[2],u=r[3],i=r[4],f=r[5],o=r[6],a=r[7],d=r[8],k=r[9],T=r[10],g=r[11],A=r[12],N=r[13],R=r[14],O=r[15],M=r[16],L=r[17],z=r[18],V=r[19],Z=r[20],$=r[21],i0=r[22],U=r[23],J=r[24],Y=r[25],F=r[26],n0=r[27],Q=r[28],f0=r[29],s0=r[30],v0=r[31],o0=r[32],c0=r[33],T0=r[34],E0=r[35],M0=r[36],Y0=r[37],rx=r[38],g0=r[39],H0=r[40],t0=r[41],ex=r[42],xx=r[43],ax=r[44],dx=r[45],mx=r[46],L0=r[47],C0=r[48],A0=r[49],U0=r[50],Q0=r[51],H=r[52],b=r[53],B=r[54],a0=r[55],m0=r[56],P0=r[57],D=r[59],N0=r[60],X0=r[61],D0=r[62],ox=r[63],b0=r[64],kx=r[65],V0=r[66],h=r[67],X=r[68],W0=r[69],sx=r[70],tx=r[71],j0=r[72],Px=r[73],Ex=r[74],Ix=r[75],qx=r[76],B0=r[77],tr=r[78],Ux=r[79],K0=r[80],ur=r[81],z0=r[82],or=r[83],Ur=r[84],lx=r[85],a1=r[86],z1=r[87],w1=r[88],Cr=r[89],n2=r[90],w=r[91],x0=r[92],e0=r[93],S0=r[94],G=r[95],k0=r[96],J0=r[97],I0=r[98],ix=r[99],Wx=r[st],Bx=r[Rt],Hx=r[Zf],$x=r[nn],nr=r[Dt],Zx=r[ft],Lr=r[f2],Yx=r[b2],ue=r[sn],Qt=r[To],S2=r[U1],Ze=r[Ot],fo=r[M2],gn=r[Nr],ds=r[ct],ye=r[Eo],An=r[Ri],Ft=r[dv],We=r[ya],Ht=r[Pa],dr=r[Lf],yt=r[ul],Qo=r[x1],me=r[It],Pn=r[Ma],co=r[Di],Fo=r[K4],so=r[Jr],oo=r[h1],a2=r[_l],ys=r[ud],ke=r[Ep],Cn=r[rN],Ho=r[uD],bv=r[BU],xa=r[kY],vo=r[Wj],ms=r[JD],mt=r[Uw],qo=r[Nj],Go=r[wB],ao=r[xU],ra=r[yj],ea=r[zU],ks=r[IB],ta=r[rj],lo=r[146],bo=r[147],xv=r[148],Nn=r[RU],rv=r[iU],$9=r[151],m3=r[152],Q9=r[153],j6=r[154],U6=r[155],B6=r[156],Y6=r[157],k3=r[158],F9=r[159],H9=r[rU],na=r[dE],h3=r[Hj],q9=r[zB],G9=r[Cj],D1=r[dN],ev=r[Vj],po=r[fB],ua=r[BT],q=r[p5],C=r[G4],j=r[Yk],h0=r[Kj],R0=r[XU],nx=r[lY],Sx=r[aD],Dx=r[gT],jx=r[ND],xr=r[pB],hr=r[$M],cr=r[Gj],lr=r[MR],kr=r[uh],sr=r[yN],Er=r[id],$r=r[vj],zr=r[Lp],r1=r[ig],Or=r[gU],e1=r[US],l1=r[CD],T1=r[aU],p1=r[ha],i1=r[QD],f1=r[gh],d1=r[WD],P1=r[YU],$1=r[TD],l2=r[fY],qr=r[hU],Kx=r[OR],Xr=r[qM],Mr=r[dB],Dr=r[tY],Qr=r[ej],R1=r[QB],$e=r[GT],Qe=r[mY],Kr=r[TB],u2=r[MD],qt=r[sY],Fe=r[GD],j1=r[aE],Q1=r[ZM],Z2=r[cB],he=r[MT],Gt=r[bC],_e=r[JU],we=r[FB],kt=r[aB],Te=r[MU],W2=r[tU],Se=r[eD],$2=r[l8],Ee=r[Aa],ht=r[IU],_t=r[Zj],E2=r[oY],I2=r[LU],Q2=r[PB],Rn=r[Yj],On=r[lU],bt=r[hY],wt=r[Oj],xn=r[TY],In=r[XB],ge=r[bB],He=r[KU],L2=r[TT],Ln=r[H8],Tt=r[wa],St=r[zM],Et=r[SB],hs=r[HU],Mn=r[MC],F2=r[SS],qe=r[rl],Dn=r[b8],jn=r[Gr],_s=r[pk],tv=r[Ba],ia=r[Ug],_3=r[Av],yo=r[og],mo=r[Ia],w3=r[$3],T3=r[H3],S3=r[tj],ko=r[_g],nv=r[HD],fa=r[260],E3=r[VM],Un=r[262],g3=r[263],Bn=r[264],A3=r[265],P3=r[uB],ca=r[eY],uv=r[268],C3=r[269],N3=r[270],iv=r[Gx],gt=r[272],ws=r[X4],sa=r[274],oa=r[275],R3=r[276],rn=r[mU],Ae=r[278],Ts=r[279],Yn=r[nY],en=r[nD],Pe=r[NB],ho=r[EU],O3=r[284],I3=r[285],L3=r[AU],M3=r[287],ie=r[GB],fv=r[RB],D3=r[58];function b9(n,s,c){var v=c[2],y=c[1],S=c[4],E=c[3],I=Vx(l(n[1][1+Kx],n),y),W=p(n[1][1+t0],n,v);return v===W&&y===I?c:[0,I,W,E,S]}function XL(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+Ae],n,E),W=Vx(l(n[1][1+L],n),S),p0=p(n[1][1+Q],n,y),w0=p(n[1][1+t0],n,v);return E===I&&y===p0&&S===W&&v===w0?c:[0,I,W,p0,w0]}function JL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function VL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+N0],n,S),I=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function zL(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],I=G0(n[1][1+o],n,s,S),W=Vx(l(n[1][1+Kx],n),y);return S===I&&y===W?c:[0,E,[0,I,W]]}function KL(n,s,c){var v=c[3],y=c[2],S=c[1],E=Sr(p(n[1][1+a],n,y),S),I=p(n[1][1+t0],n,v);return S===E&&v===I?c:[0,E,y,I]}function ZL(n,s,c){var v=c[4],y=c[2],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],S,c[3],E]}function WL(n,s,c){var v=c[3],y=c[2],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],S,E]}function $L(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S);if(y)var I=y[1],W=p(n[1][1+Q],n,I),p0=I===W?y:[0,W],w0=p0;else var w0=y;var F0=p(n[1][1+t0],n,v);return E===S&&F0===v?c:[0,E,w0,F0]}function QL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=p(n[1][1+F],n,y),W=p(n[1][1+t0],n,v);return E===S&&I===y&&W===v?c:[0,E,I,W]}function FL(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=e2(l(n[1][1+rn],n),E);if(S)var W=S[1],p0=W[1],w0=W[2],F0=function(k1){return[0,[0,p0,k1]]},vx=cx(l(n[1][1+C3],n),p0,w0,S,F0);else var vx=S;if(y)var Lx=y[1],_x=Lx[1],_r=Lx[2],c1=function(k1){return[0,[0,_x,k1]]},s1=cx(l(n[1][1+rn],n),_x,_r,y,c1);else var s1=y;var m1=p(n[1][1+t0],n,v);return E===I&&S===vx&&y===s1&&v===m1?c:[0,I,vx,s1,m1]}function HL(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function qL(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function GL(n,s){return s}function bL(n,s,c){var v=c[3],y=c[2],S=c[1],E=Sr(l(n[1][1+rx],n),S),I=Sr(l(n[1][1+Kx],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function j3(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=e2(l(n[1][1+g0],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function xm(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],I=Vx(l(n[1][1+Kx],n),S),W=p(n[1][1+L0],n,y),p0=p(n[1][1+t0],n,v);return S===I&&y===W&&v===p0?s:[0,E,[0,I,W,p0]]}function xM(n,s,c){var v=c[3],y=c[2],S=c[1],E=c[4],I=p(n[1][1+Kx],n,S),W=Sr(l(n[1][1+xx],n),y),p0=p(n[1][1+t0],n,v);return S===I&&y===W&&v===p0?c:[0,I,W,p0,E]}function rM(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function eM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function rm(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function em(n,s){return[0,p(n[1][1+A0],n,s),0]}function tM(n,s){var c=l(n[1][1+C0],n),v=x2(function(S,E){var I=S[2],W=S[1],p0=l(c,E);if(!p0)return[0,W,1];if(p0[2])return[0,us(p0,W),1];var w0=p0[1],F0=I||(E!==w0?1:0);return[0,[0,w0,W],F0]},JH,s),y=v[1];return v[2]?Ax(y):s}function va(n,s){return p(n[1][1+L0],n,s)}function tm(n,s,c){var v=c[2],y=c[1],S=Sr(l(n[1][1+Kx],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function nm(n,s,c){var v=c[2],y=c[1],S=c[3],E=Vx(l(n[1][1+Kx],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?c:[0,E,I,S]}function nM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+xr],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function uM(n,s){var c=s[2],v=c[3],y=c[2],S=y[2],E=y[1],I=c[1],W=s[1],p0=p(n[1][1+D1],n,E),w0=Vx(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return p0===E&&w0===S&&F0===v?s:[0,W,[0,I,[0,p0,w0],F0]]}function iM(n,s){var c=s[2],v=s[1],y=p(n[1][1+i0],n,c);return Cl(y,c)?s:[0,v,y]}function X6(n,s){return p(n[1][1+Kx],n,s)}function fM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1];if(y)var E=y[1],I=function(w0){return[0,w0]},W=$0(l(n[1][1+Kx],n),E,y,I);else var W=y;var p0=p(n[1][1+t0],n,v);return y===W&&v===p0?s:[0,S,[0,W,p0]]}function um(n,s){return p(n[1][1+Kx],n,s)}function cM(n,s,c){return G0(n[1][1+or],n,s,c)}function im(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],I=G0(n[1][1+tr],n,s,S),W=p(n[1][1+t0],n,y);return I===S&&y===W?c:[0,E,[0,I,W]]}function J6(n,s,c){return G0(n[1][1+or],n,s,c)}function fm(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],I=G0(n[1][1+K0],n,s,S),W=p(n[1][1+$2],n,y);return S===I&&y===W?c:[0,E,[0,I,W]]}function sM(n,s,c){switch(c[0]){case 0:var v=c[1],y=function(I){return[0,I]};return $0(p(n[1][1+ur],n,s),v,c,y);case 1:var S=c[1],E=function(I){return[1,I]};return $0(p(n[1][1+Ux],n,s),S,c,E);default:return c}}function cm(n,s,c){return G0(n[1][1+or],n,s,c)}function V6(n,s,c){return G0(n[1][1+or],n,s,c)}function oM(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],I=G0(n[1][1+ox],n,s,S),W=p(n[1][1+t0],n,y);return I===S&&y===W?c:[0,E,[0,I,W]]}function z6(n,s,c){return p(n[1][1+Ln],n,c)}function vM(n,s,c){return G0(n[1][1+Ix],n,s,c)}function aM(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+B0],n,s),v,y,c,S)}function lM(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+Ex],n,s),v,y,c,S)}function sm(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+D0],n,s),v,y,c,S)}function pM(n,s,c){switch(c[0]){case 0:var v=c[1],y=function(Lx){return[0,Lx]};return $0(p(n[1][1+kx],n,s),v,c,y);case 1:var S=c[1],E=function(Lx){return[1,Lx]};return $0(p(n[1][1+h],n,s),S,c,E);case 2:var I=c[1],W=function(Lx){return[2,Lx]};return $0(p(n[1][1+tx],n,s),I,c,W);case 3:var p0=c[1],w0=function(Lx){return[3,Lx]};return $0(p(n[1][1+W0],n,s),p0,c,w0);default:var F0=c[1],vx=function(Lx){return[4,Lx]};return $0(p(n[1][1+sx],n,s),F0,c,vx)}}function K6(n,s,c){var v=c[2],y=v[4],S=v[3],E=v[2],I=v[1],W=c[1],p0=G0(n[1][1+X],n,s,I),w0=G0(n[1][1+V0],n,s,E),F0=p(n[1][1+$2],n,S);if(y){var vx=0;if(p0[0]===3){var Lx=w0[2];if(Lx[0]===2)var _r=Ar(p0[1][2][1],Lx[1][1][2][1]);else vx=1}else vx=1;if(vx)var _x=I===p0?1:0,_r=_x&&(E===w0?1:0)}else var _r=y;return p0===I&&w0===E&&F0===S&&y===_r?c:[0,W,[0,p0,w0,F0,_r]]}function dM(n,s,c){if(c[0]===0){var v=c[1],y=function(I){return[0,I]};return $0(p(n[1][1+j0],n,s),v,c,y)}var S=c[1];function E(I){return[1,I]}return $0(p(n[1][1+b0],n,s),S,c,E)}function yM(n,s,c,v){return G0(n[1][1+en],n,c,v)}function mM(n,s,c,v){return G0(n[1][1+Yx],n,c,v)}function om(n,s,c,v){return G0(n[1][1+mx],n,c,v)}function kM(n,s,c){return p(n[1][1+D1],n,c)}function U3(n,s,c){var v=c[2],y=c[1];switch(v[0]){case 0:var S=v[1],E=S[3],I=S[2],W=S[1],p0=Sr(p(n[1][1+Px],n,s),W),w0=p(n[1][1+Y],n,I),F0=p(n[1][1+t0],n,E),vx=0;if(p0===W&&w0===I&&F0===E){var Lx=v;vx=1}if(!vx)var Lx=[0,[0,p0,w0,F0]];var ut=Lx;break;case 1:var _x=v[1],_r=_x[3],c1=_x[2],s1=_x[1],m1=Sr(p(n[1][1+z0],n,s),s1),k1=p(n[1][1+Y],n,c1),Ge=p(n[1][1+t0],n,_r),be=0;if(_r===Ge&&m1===s1&&k1===c1){var xt=v;be=1}if(!be)var xt=[1,[0,m1,k1,Ge]];var ut=xt;break;case 2:var Ce=v[1],rt=Ce[2],et=Ce[1],At=Ce[3],tt=G0(n[1][1+Ix],n,s,et),nt=p(n[1][1+Y],n,rt),Xn=0;if(et===tt&&rt===nt){var Jn=v;Xn=1}if(!Xn)var Jn=[2,[0,tt,nt,At]];var ut=Jn;break;default:var Ss=v[1],Es=function(gs){return[3,gs]},ut=$0(l(n[1][1+qx],n),Ss,v,Es)}return v===ut?c:[0,y,ut]}function hM(n,s){return G0(n[1][1+or],n,0,s)}function _M(n,s,c){var v=s?s[1]:0;return G0(n[1][1+or],n,[0,v],c)}function wM(n,s){return p(n[1][1+Pe],n,s)}function TM(n,s){return p(n[1][1+Pe],n,s)}function SM(n,s){return G0(n[1][1+Ts],n,XH,s)}function Z6(n,s,c){return G0(n[1][1+Ts],n,[0,s],c)}function EM(n,s){return G0(n[1][1+Ts],n,YH,s)}function gM(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=p(n[1][1+Ae],n,I),p0=Vx(l(n[1][1+L],n),E),w0=Vx(l(n[1][1+Q],n),S),F0=Vx(l(n[1][1+Q],n),y),vx=p(n[1][1+t0],n,v);return I===W&&S===w0&&E===p0&&S===w0&&y===F0&&v===vx?c:[0,W,p0,w0,F0,vx]}function AM(n,s){return p(n[1][1+Ln],n,s)}function W6(n,s){return p(n[1][1+D1],n,s)}function PM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+en],n),c,v,s,y)}function CM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+Yx],n),c,v,s,y)}function NM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+mx],n),c,v,s,y)}function $6(n,s){switch(s[0]){case 0:var c=s[1],v=function(_x){return[0,_x]};return $0(l(n[1][1+J0],n),c,s,v);case 1:var y=s[1],S=function(_x){return[1,_x]};return $0(l(n[1][1+I0],n),y,s,S);case 2:var E=s[1],I=function(_x){return[2,_x]};return $0(l(n[1][1+Bx],n),E,s,I);case 3:var W=s[1],p0=function(_x){return[3,_x]};return $0(l(n[1][1+ix],n),W,s,p0);case 4:var w0=s[1],F0=function(_x){return[4,_x]};return $0(l(n[1][1+D],n),w0,s,F0);default:var vx=s[1],Lx=function(_x){return[5,_x]};return $0(l(n[1][1+Wx],n),vx,s,Lx)}}function Q6(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[3],S=c[2],E=c[1],I=p(n[1][1+Hx],n,E),W=p(n[1][1+Kx],n,S);if(y){var p0=0;if(I[0]===3){var w0=W[2];if(w0[0]===9)var vx=Ar(I[1][2][1],w0[1][2][1]);else p0=1}else p0=1;if(p0)var F0=E===I?1:0,vx=F0&&(S===W?1:0)}else var vx=y;return E===I&&S===W&&y===vx?s:[0,v,[0,I,W,vx]];case 1:var Lx=c[2],_x=c[1],_r=p(n[1][1+Hx],n,_x),c1=e2(l(n[1][1+lr],n),Lx);return _x===_r&&Lx===c1?s:[0,v,[1,_r,c1]];case 2:var s1=c[3],m1=c[2],k1=c[1],Ge=p(n[1][1+Hx],n,k1),be=e2(l(n[1][1+lr],n),m1),xt=p(n[1][1+t0],n,s1);return k1===Ge&&m1===be&&s1===xt?s:[0,v,[2,Ge,be,xt]];default:var Ce=c[3],rt=c[2],et=c[1],At=p(n[1][1+Hx],n,et),tt=e2(l(n[1][1+lr],n),rt),nt=p(n[1][1+t0],n,Ce);return et===At&&rt===tt&&Ce===nt?s:[0,v,[3,At,tt,nt]]}}function B3(n,s,c){var v=c[2],y=c[1],S=Sr(function(I){if(I[0]===0){var W=I[1],p0=p(n[1][1+G],n,W);return W===p0?I:[0,p0]}var w0=I[1],F0=p(n[1][1+U0],n,w0);return w0===F0?I:[1,F0]},y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Y3(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+Kx],n,E),W=Vx(l(n[1][1+iv],n),S),p0=Vx(l(n[1][1+fv],n),y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function vm(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+D1],n,S),I=p(n[1][1+D1],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function RM(n,s){return p(n[1][1+Kx],n,s)}function OM(n,s){return p(n[1][1+D],n,s)}function am(n,s){return p(n[1][1+D1],n,s)}function IM(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+ds],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+Ft],n),y,s,S);default:var E=s[1],I=function(W){return[2,W]};return $0(l(n[1][1+ye],n),E,s,I)}}function F6(n,s,c){var v=c[1],y=G0(n[1][1+We],n,s,v);return v===y?c:[0,y,c[2],c[3]]}function lm(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=p(n[1][1+An],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function pm(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Kx],n,S),I=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,c[1],E,I,W]}function LM(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+yt],n,S),I=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function eg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function tg0(n,s){return p(n[1][1+vo],n,s)}function ng0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+a2],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+ys],n),y,s,S)}function ug0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+oo],n,y),I=p(n[1][1+ke],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function ig0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+ke],n,y),I=p(n[1][1+ke],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function fg0(n,s){return p(n[1][1+ys],n,s)}function cg0(n,s){return p(n[1][1+so],n,s)}function sg0(n,s){return p(n[1][1+ke],n,s)}function og0(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+vo],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+bv],n),y,s,S);default:var E=s[1],I=function(W){return[2,W]};return $0(l(n[1][1+xa],n),E,s,I)}}function vg0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Kx],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function ag0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+t0],n,v);if(!y)return v===S?c:[0,0,S];var E=y[1],I=p(n[1][1+Kx],n,E);return E===I&&v===S?c:[0,[0,I],S]}function lg0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(vx){return[0,v,[0,vx]]};return cx(l(n[1][1+mt],n),v,y,s,S);case 1:var E=c[1],I=function(vx){return[0,v,[1,vx]]};return cx(l(n[1][1+Cn],n),v,E,s,I);case 2:var W=c[1],p0=function(vx){return[0,v,[2,vx]]};return cx(l(n[1][1+Ho],n),v,W,s,p0);case 3:var w0=c[1],F0=function(vx){return[0,v,[3,vx]]};return $0(l(n[1][1+me],n),w0,s,F0);default:return s}}function pg0(n,s){var c=s[2],v=s[1],y=Sr(l(n[1][1+ao],n),c);return c===y?s:[0,v,y]}function dg0(n,s,c){return G0(n[1][1+mx],n,s,c)}function yg0(n,s,c){return G0(n[1][1+Ho],n,s,c)}function mg0(n,s){if(s[0]===0){var c=s[1],v=c[1],y=c[2],S=function(w0){return[0,[0,v,w0]]};return cx(l(n[1][1+ra],n),v,y,s,S)}var E=s[1],I=E[1],W=E[2];function p0(w0){return[1,[0,I,w0]]}return cx(l(n[1][1+ea],n),I,W,s,p0)}function kg0(n,s){return p(n[1][1+so],n,s)}function hg0(n,s){return p(n[1][1+ke],n,s)}function _g0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+lo],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+ta],n),y,s,S)}function wg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+bo],n,y),I=Vx(l(n[1][1+ks],n),v);return y===E&&v===I?s:[0,S,[0,E,I]]}function Tg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Sg0(n,s){if(s[0]===0){var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+xv],n),c,s,v)}var y=s[1],S=y[1],E=y[2];function I(W){return[1,[0,S,W]]}return cx(l(n[1][1+Pn],n),S,E,s,I)}function Eg0(n,s){var c=s[2][1],v=s[1],y=p(n[1][1+ms],n,c);return c===y?s:[0,v,[0,y]]}function gg0(n,s){var c=s[2],v=c[4],y=c[2],S=c[1],E=c[3],I=s[1],W=p(n[1][1+ms],n,S),p0=Vx(l(n[1][1+iv],n),y),w0=Sr(l(n[1][1+Fo],n),v);return S===W&&y===p0&&v===w0?s:[0,I,[0,W,p0,E,w0]]}function Ag0(n,s,c){var v=c[4],y=c[3],S=p(n[1][1+Go],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],c[2],S,E]}function Pg0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+co],n,E),W=Vx(l(n[1][1+qo],n),S),p0=p(n[1][1+Go],n,y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function Cg0(n,s,c,v){var y=2<=s?p(n[1][1+Ix],n,BH):l(n[1][1+Ae],n);return l(y,v)}function Ng0(n,s,c){var v=2<=s?p(n[1][1+Ix],n,UH):l(n[1][1+Ae],n);return l(v,c)}function Rg0(n,s,c){var v=c[3],y=c[2],S=c[1],E=0,I=c[4];if(s){var W=0;if(S)switch(S[1]){case 0:E=1;break;case 1:W=2;break;default:W=1}else W=1;var p0=0;switch(W){case 0:break;case 1:if(2<=s)var w0=0,F0=0;else p0=1;break;default:p0=1}if(p0)var w0=1,F0=0}else E=1;if(E)var w0=1,F0=1;var vx=y?p(n[1][1+a0],n,v):F0?p(n[1][1+Ae],n,v):G0(n[1][1+Ix],n,DH,v);if(y)var Lx=y[1],_x=w0?l(n[1][1+Ae],n):p(n[1][1+Ix],n,jH),_r=$0(_x,Lx,y,function(c1){return[0,c1]});else var _r=0;return y===_r&&v===vx?c:[0,S,_r,vx,I]}function Og0(n,s){return p(n[1][1+D1],n,s)}function Ig0(n,s,c){if(c[0]===0){var v=c[1],y=Sr(p(n[1][1+k3],n,s),v);return v===y?c:[0,y]}var S=c[1],E=S[1],I=S[2];function W(p0){return[1,[0,E,p0]]}return cx(p(n[1][1+Y6],n,s),E,I,c,W)}function Lg0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function Mg0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=e2(l(n[1][1+B6],n),E),p0=Vx(p(n[1][1+U6],n,I),y),w0=Vx(function(vx){var Lx=vx[1],_x=vx[2],_r=G0(n[1][1+F9],n,I,Lx);return _r===Lx?vx:[0,_r,_x]},S),F0=p(n[1][1+t0],n,v);return E===W&&y===p0&&S===w0&&v===F0?c:[0,I,W,w0,p0,F0]}function Dg0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+N0],n,E),W=G0(n[1][1+q9],n,y!==0?1:0,S),p0=l(n[1][1+G9],n),w0=Vx(function(vx){return e2(p0,vx)},y),F0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===w0&&v===F0?c:[0,I,W,w0,F0]}function jg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+A0],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Ug0(n,s,c){return p(n[1][1+A0],n,c)}function Bg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Yg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function Xg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function Jg0(n,s,c){return G0(n[1][1+m3],n,s,c)}function Vg0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=p(n[1][1+Ae],n,I),p0=Vx(l(n[1][1+L],n),E),w0=l(n[1][1+ev],n),F0=Sr(function(_x){return e2(w0,_x)},S),vx=e2(l(n[1][1+w],n),y),Lx=p(n[1][1+t0],n,v);return W===I&&p0===E&&F0===S&&vx===y&&Lx===v?c:[0,W,p0,F0,vx,Lx]}function zg0(n,s){return p(n[1][1+Z],n,s)}function Kg0(n,s){return p(n[1][1+Z],n,s)}function Zg0(n,s){return p(n[1][1+D1],n,s)}function Wg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function $g0(n,s){return G0(n[1][1+Ix],n,MH,s)}function Qg0(n,s){return p(n[1][1+Kx],n,s)}function Fg0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+rn],n),c,v,s,y)}function Hg0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+$r],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+R3],n),y,s,S)}function qg0(n,s){switch(s[0]){case 0:return s;case 1:var c=s[1],v=function(E){return[1,E]};return $0(l(n[1][1+F],n),c,s,v);default:var y=s[1],S=function(E){return[2,E]};return $0(l(n[1][1+$],n),y,s,S)}}function Gg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+xr],n,y),I=p(n[1][1+$2],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function bg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+F],n,y),I=p(n[1][1+t0],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function xA0(n,s){var c=s[2],v=c[4],y=c[3],S=c[2],E=c[1],I=s[1],W=Sr(l(n[1][1+hr],n),S),p0=Vx(l(n[1][1+Sx],n),y),w0=Vx(l(n[1][1+h0],n),E),F0=p(n[1][1+t0],n,v);return S===W&&y===p0&&v===F0&&E===w0?s:[0,I,[0,w0,W,p0,F0]]}function rA0(n,s,c){var v=c[9],y=c[8],S=c[7],E=c[6],I=c[3],W=c[2],p0=c[1],w0=c[10],F0=c[5],vx=c[4],Lx=Vx(l(n[1][1+cr],n),p0),_x=Vx(l(n[1][1+L],n),y),_r=p(n[1][1+Dx],n,W),c1=p(n[1][1+R0],n,S),s1=p(n[1][1+Er],n,I),m1=Vx(l(n[1][1+X0],n),E),k1=p(n[1][1+t0],n,v);return p0===Lx&&W===_r&&I===s1&&E===m1&&S===c1&&y===_x&&v===k1?c:[0,Lx,_r,s1,vx,F0,m1,c1,_x,k1,w0]}function eA0(n,s,c){return G0(n[1][1+zr],n,s,c)}function tA0(n,s,c){return G0(n[1][1+lr],n,s,c)}function nA0(n,s,c){return G0(n[1][1+zr],n,s,c)}function uA0(n,s){if(s[0]===0)return s;var c=s[2],v=s[1],y=p(n[1][1+B],n,c);return y===c?s:[1,v,y]}function iA0(n,s){if(s[0]===0)return s;var c=s[1];function v(y){return[1,y]}return $0(l(n[1][1+F],n),c,s,v)}function fA0(n,s){var c=s[2],v=s[1];function y(S){return[0,v,S]}return $0(l(n[1][1+Q],n),c,s,y)}function cA0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Rx){return[0,v,[0,Rx]]};return $0(l(n[1][1+t0],n),y,s,S);case 1:var E=c[1],I=function(Rx){return[0,v,[1,Rx]]};return $0(l(n[1][1+t0],n),E,s,I);case 2:var W=c[1],p0=function(Rx){return[0,v,[2,Rx]]};return $0(l(n[1][1+t0],n),W,s,p0);case 3:var w0=c[1],F0=function(Rx){return[0,v,[3,Rx]]};return $0(l(n[1][1+t0],n),w0,s,F0);case 4:var vx=c[1],Lx=function(Rx){return[0,v,[4,Rx]]};return $0(l(n[1][1+t0],n),vx,s,Lx);case 5:var _x=c[1],_r=function(Rx){return[0,v,[5,Rx]]};return $0(l(n[1][1+t0],n),_x,s,_r);case 6:var c1=c[1],s1=function(Rx){return[0,v,[6,Rx]]};return $0(l(n[1][1+t0],n),c1,s,s1);case 7:var m1=c[1],k1=function(Rx){return[0,v,[7,Rx]]};return $0(l(n[1][1+t0],n),m1,s,k1);case 8:var Ge=c[2],be=c[1],xt=function(Rx){return[0,v,[8,be,Rx]]};return $0(l(n[1][1+t0],n),Ge,s,xt);case 9:var Ce=c[1],rt=function(Rx){return[0,v,[9,Rx]]};return $0(l(n[1][1+t0],n),Ce,s,rt);case 10:var et=c[1],At=function(Rx){return[0,v,[10,Rx]]};return $0(l(n[1][1+t0],n),et,s,At);case 11:var tt=c[1],nt=function(Rx){return[0,v,[11,Rx]]};return $0(l(n[1][1+ue],n),tt,s,nt);case 12:var Xn=c[1],Jn=function(Rx){return[0,v,[12,Rx]]};return cx(l(n[1][1+C],n),v,Xn,s,Jn);case 13:var Ss=c[1],Es=function(Rx){return[0,v,[13,Rx]]};return cx(l(n[1][1+hs],n),v,Ss,s,Es);case 14:var ut=c[1],gs=function(Rx){return[0,v,[14,Rx]]};return cx(l(n[1][1+w],n),v,ut,s,gs);case 15:var cv=c[1],H6=function(Rx){return[0,v,[15,Rx]]};return cx(l(n[1][1+rv],n),v,cv,s,H6);case 16:var q6=c[1],G6=function(Rx){return[0,v,[16,Rx]]};return $0(l(n[1][1+L3],n),q6,s,G6);case 17:var b6=c[1],x4=function(Rx){return[0,v,[17,Rx]]};return $0(l(n[1][1+He],n),b6,s,x4);case 18:var r4=c[1],e4=function(Rx){return[0,v,[18,Rx]]};return $0(l(n[1][1+Q9],n),r4,s,e4);case 19:var t4=c[1],n4=function(Rx){return[0,v,[19,Rx]]};return cx(l(n[1][1+ev],n),v,t4,s,n4);case 20:var u4=c[1],i4=function(Rx){return[0,v,[20,Rx]]};return cx(l(n[1][1+j6],n),v,u4,s,i4);case 21:var f4=c[1],c4=function(Rx){return[0,v,[21,Rx]]};return cx(l(n[1][1+lx],n),v,f4,s,c4);case 22:var s4=c[1],o4=function(Rx){return[0,v,[22,Rx]]};return cx(l(n[1][1+T],n),v,s4,s,o4);case 23:var v4=c[1],a4=function(Rx){return[0,v,[23,Rx]]};return cx(l(n[1][1+Nn],n),v,v4,s,a4);case 24:var l4=c[1],p4=function(Rx){return[0,v,[24,Rx]]};return $0(l(n[1][1+A],n),l4,s,p4);case 25:var d4=c[1],y4=function(Rx){return[0,v,[25,Rx]]};return $0(l(n[1][1+Qo],n),d4,s,y4);case 26:var m4=c[1],k4=function(Rx){return[0,v,[26,Rx]]};return $0(l(n[1][1+B],n),m4,s,k4);case 27:var h4=c[1],_4=function(Rx){return[0,v,[27,Rx]]};return $0(l(n[1][1+P0],n),h4,s,_4);case 28:var w4=c[1],T4=function(Rx){return[0,v,[28,Rx]]};return $0(l(n[1][1+f0],n),w4,s,T4);case 29:var S4=c[1],E4=function(Rx){return[0,v,[29,Rx]]};return cx(l(n[1][1+mx],n),v,S4,s,E4);case 30:var g4=c[1],A4=function(Rx){return[0,v,[30,Rx]]};return cx(l(n[1][1+Yx],n),v,g4,s,A4);case 31:var P4=c[1],C4=function(Rx){return[0,v,[31,Rx]]};return cx(l(n[1][1+en],n),v,P4,s,C4);case 32:var N4=c[1],R4=function(Rx){return[0,v,[32,Rx]]};return cx(l(n[1][1+oa],n),v,N4,s,R4);case 33:var O4=c[1],I4=function(Rx){return[0,v,[33,Rx]]};return $0(l(n[1][1+t0],n),O4,s,I4);case 34:var L4=c[1],M4=function(Rx){return[0,v,[34,Rx]]};return $0(l(n[1][1+t0],n),L4,s,M4);default:var D4=c[1],j4=function(Rx){return[0,v,[35,Rx]]};return $0(l(n[1][1+t0],n),D4,s,j4)}}function sA0(n,s,c){var v=c[2],y=c[1],S=y[3],E=y[2],I=y[1],W=p(n[1][1+Q],n,I),p0=p(n[1][1+Q],n,E),w0=Sr(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return W===I&&p0===E&&w0===S&&F0===v?c:[0,[0,W,p0,w0],F0]}function oA0(n,s,c){var v=c[2],y=c[1],S=y[3],E=y[2],I=y[1],W=p(n[1][1+Q],n,I),p0=p(n[1][1+Q],n,E),w0=Sr(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return W===I&&p0===E&&w0===S&&F0===v?c:[0,[0,W,p0,w0],F0]}function vA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function aA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,c);return y===c?s:[0,v,y]}function lA0(n,s){var c=s[3],v=s[2],y=s[4],S=s[1],E=p(n[1][1+Q],n,v),I=p(n[1][1+i],n,c);return E===v&&I===c?s:[0,S,E,I,y]}function pA0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(w0){return[0,v,[0,w0]]};return $0(l(n[1][1+Q],n),y,s,S);case 1:var E=c[1],I=function(w0){return[0,v,[1,w0]]};return $0(l(n[1][1+v0],n),E,s,I);default:var W=c[1],p0=function(w0){return[0,v,[2,w0]]};return $0(l(n[1][1+s0],n),W,s,p0)}}function dA0(n,s){var c=s[2],v=s[1],y=Sr(l(n[1][1+o0],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function yA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function mA0(n,s){var c=s[3],v=s[2],y=s[4],S=s[1],E=p(n[1][1+Q],n,v),I=p(n[1][1+t0],n,c);return v===E&&c===I?s:[0,S,E,I,y]}function kA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function hA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+M],n,y),I=p(n[1][1+R],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function _A0(n,s){return p(n[1][1+D1],n,s)}function wA0(n,s){return p(n[1][1+D1],n,s)}function TA0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+O],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+N],n),y,s,S)}function SA0(n,s){var c=s[3],v=s[2],y=s[1],S=p(n[1][1+M],n,y),E=Vx(l(n[1][1+J],n),v),I=p(n[1][1+t0],n,c);return y===S&&Cl(v,E)&&c===I?s:[0,S,E,I]}function EA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+z],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function gA0(n,s){var c=s[5],v=s[4],y=s[3],S=s[2],E=s[1],I=p(n[1][1+Q],n,E),W=p(n[1][1+Q],n,S),p0=p(n[1][1+Q],n,y),w0=p(n[1][1+Q],n,v),F0=p(n[1][1+t0],n,c);return E===I&&S===W&&y===p0&&v===w0&&c===F0?s:[0,I,W,p0,w0,F0]}function AA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function PA0(n,s,c){var v=c[6],y=c[5],S=c[4],E=c[3],I=c[2],W=c[1];return v===p(n[1][1+t0],n,v)?c:[0,W,I,E,S,y,v]}function CA0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+t0],n,v);return v===I?c:[0,E,S,y,I]}function NA0(n,s,c){return p(n[1][1+t0],n,c)}function RA0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+t0],n,v);return v===S?c:[0,y,S]}function OA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function IA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function LA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function MA0(n,s,c){var v=c[1],y=c[2],S=G0(n[1][1+j6],n,s,v);return S===v?c:[0,S,y]}function DA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Q],n,S),I=p(n[1][1+Q],n,y),W=p(n[1][1+t0],n,v);return E===S&&I===y&&W===v?c:[0,E,I,W]}function jA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+ua],n,S),I=Vx(l(n[1][1+J],n),y),W=p(n[1][1+t0],n,v);return E===S&&I===y&&W===v?c:[0,E,I,W]}function UA0(n,s){var c=s[2],v=c[5],y=c[4],S=c[2],E=c[1],I=c[3],W=s[1],p0=p(n[1][1+Y],n,S),w0=p(n[1][1+i],n,y),F0=Vx(l(n[1][1+Q],n),v),vx=p(n[1][1+Ae],n,E);return vx===E&&p0===S&&w0===y&&F0===v?s:[0,W,[0,vx,p0,I,w0,F0]]}function BA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+z],n),y),I=p(n[1][1+t0],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function YA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+Q],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function XA0(n,s){return Vx(l(n[1][1+f],n),s)}function JA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function VA0(n,s){return p(n[1][1+D1],n,s)}function zA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+ua],n,y),I=p(n[1][1+gn],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function KA0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+V],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+po],n),y,s,S)}function ZA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=l(n[1][1+ev],n),I=Sr(function(w0){return e2(E,w0)},y),W=e2(l(n[1][1+w],n),S),p0=p(n[1][1+t0],n,v);return I===y&&W===S&&v===p0?c:[0,W,I,p0]}function WA0(n,s){switch(s[0]){case 0:var c=s[1],v=function(_x){return[0,_x]};return $0(l(n[1][1+S0],n),c,s,v);case 1:var y=s[1],S=function(_x){return[1,_x]};return $0(l(n[1][1+x0],n),y,s,S);case 2:var E=s[1],I=function(_x){return[2,_x]};return $0(l(n[1][1+nr],n),E,s,I);case 3:var W=s[1],p0=function(_x){return[3,_x]};return $0(l(n[1][1+Zx],n),W,s,p0);case 4:var w0=s[1],F0=function(_x){return[4,_x]};return $0(l(n[1][1+$x],n),w0,s,F0);default:var vx=s[1],Lx=function(_x){return[5,_x]};return $0(l(n[1][1+k0],n),vx,s,Lx)}}function $A0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=Sr(l(n[1][1+n2],n),y),W=p(n[1][1+t0],n,v);return I===y&&v===W?c:[0,E,S,I,W]}function QA0(n,s){var c=s[2],v=c[6],y=c[4],S=c[3],E=c[2],I=c[1],W=c[5],p0=s[1],w0=p(n[1][1+z],n,I),F0=p(n[1][1+Q],n,E),vx=p(n[1][1+Q],n,S),Lx=p(n[1][1+i],n,y),_x=p(n[1][1+t0],n,v);return w0===I&&F0===E&&vx===S&&Lx===y&&_x===v?s:[0,p0,[0,w0,F0,vx,Lx,W,_x]]}function FA0(n,s){var c=s[2],v=c[3],y=c[1],S=y[2],E=y[1],I=c[2],W=s[1],p0=G0(n[1][1+C],n,E,S),w0=p(n[1][1+t0],n,v);return S===p0&&v===w0?s:[0,W,[0,[0,E,p0],I,w0]]}function HA0(n,s){var c=s[2],v=c[6],y=c[2],S=c[1],E=c[5],I=c[4],W=c[3],p0=s[1],w0=p(n[1][1+D1],n,S),F0=p(n[1][1+Q],n,y),vx=p(n[1][1+t0],n,v);return S===w0&&y===F0&&v===vx?s:[0,p0,[0,w0,F0,W,I,E,vx]]}function qA0(n,s){var c=s[2],v=c[6],y=c[5],S=c[3],E=c[2],I=c[4],W=c[1],p0=s[1],w0=p(n[1][1+Q],n,E),F0=p(n[1][1+Q],n,S),vx=p(n[1][1+i],n,y),Lx=p(n[1][1+t0],n,v);return w0===E&&F0===S&&vx===y&&Lx===v?s:[0,p0,[0,W,w0,F0,I,vx,Lx]]}function GA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Q],n,y),I=p(n[1][1+t0],n,v);return E===y&&v===I?s:[0,S,[0,E,I]]}function bA0(n,s){var c=s[2],v=c[8],y=c[7],S=c[2],E=c[1],I=c[6],W=c[5],p0=c[4],w0=c[3],F0=s[1],vx=p(n[1][1+Hx],n,E),Lx=p(n[1][1+e0],n,S),_x=p(n[1][1+i],n,y),_r=p(n[1][1+t0],n,v);return vx===E&&Lx===S&&_x===y&&_r===v?s:[0,F0,[0,vx,Lx,w0,p0,W,I,_x,_r]]}function xP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+C],n),c,v,s,y)}function rP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+C],n),c,v,s,y)}function eP0(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+Q],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+Cr],n),y,s,S);default:var E=s[1],I=function(W){return[2,W]};return $0(l(n[1][1+w1],n),E,s,I)}}function tP0(n,s){return p(n[1][1+D1],n,s)}function nP0(n,s,c){var v=c[4],y=c[3],S=c[2],E=S[2],I=E[4],W=E[3],p0=E[2],w0=E[1],F0=c[1],vx=S[1],Lx=Vx(l(n[1][1+L],n),F0),_x=Vx(l(n[1][1+j],n),w0),_r=Sr(l(n[1][1+jx],n),p0),c1=Vx(l(n[1][1+nx],n),W),s1=p(n[1][1+q],n,y),m1=p(n[1][1+t0],n,v),k1=p(n[1][1+t0],n,I);return _r===p0&&c1===W&&s1===y&&Lx===F0&&m1===v&&k1===I&&_x===w0?c:[0,Lx,[0,vx,[0,_x,_r,c1,k1]],s1,m1]}function uP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Q],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+i0],n),y,s,S)}function iP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+F],n,y),I=p(n[1][1+t0],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function fP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+jx],n,y),I=p(n[1][1+t0],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function cP0(n,s){var c=s[2],v=c[2],y=c[1],S=c[3],E=s[1],I=p(n[1][1+Q],n,v),W=Vx(l(n[1][1+D1],n),y);return I===v&&W===y?s:[0,E,[0,W,I,S]]}function sP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function oP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+i1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Kx],n),y,s,S)}function vP0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=Vx(l(n[1][1+r1],n),I),p0=Vx(l(n[1][1+N0],n),E),w0=Vx(l(n[1][1+Kx],n),S),F0=p(n[1][1+A0],n,y),vx=p(n[1][1+t0],n,v);return I===W&&E===p0&&S===w0&&y===F0&&v===vx?c:[0,W,p0,w0,F0,vx]}function aP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function lP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+T1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+p1],n),y,s,S)}function pP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],I=c[4],W=p(n[1][1+e1],n,E),p0=p(n[1][1+Kx],n,S),w0=p(n[1][1+A0],n,y),F0=p(n[1][1+t0],n,v);return E===W&&S===p0&&y===w0&&v===F0?c:[0,W,p0,w0,I,F0]}function dP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function yP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+P1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+$1],n),y,s,S)}function mP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],I=c[4],W=p(n[1][1+f1],n,E),p0=p(n[1][1+Kx],n,S),w0=p(n[1][1+A0],n,y),F0=p(n[1][1+t0],n,v);return E===W&&S===p0&&y===w0&&v===F0?c:[0,W,p0,w0,I,F0]}function kP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Kx],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Q0],n),y,s,S)}function hP0(n,s,c){var v=c[3],y=c[1],S=c[2],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?c:[0,E,S,I]}function _P0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function wP0(n,s){if(s[0]===0){var c=s[1],v=Sr(l(n[1][1+Dr],n),c);return c===v?s:[0,v]}var y=s[1],S=p(n[1][1+Qe],n,y);return y===S?s:[1,S]}function TP0(n,s){var c=s[2],v=s[1],y=Vx(l(n[1][1+D1],n),c);return c===y?s:[0,v,y]}function SP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+D1],n,y),I=Vx(l(n[1][1+D1],n),v);return y===E&&v===I?s:[0,S,[0,E,I]]}function EP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],I=c[4],W=gJ(l(n[1][1+Xr],n),y),p0=Vx(l(n[1][1+Mr],n),S),w0=Vx(l(n[1][1+A0],n),E),F0=p(n[1][1+t0],n,v);return y===W&&S===p0&&E===w0&&v===F0?c:[0,w0,p0,W,I,F0]}function gP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+A0],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Kx],n),y,s,S)}function AP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+R1],n,y),I=p(n[1][1+t0],n,v);return E===y&&I===v?c:[0,S,E,I]}function PP0(n,s){return p(n[1][1+D1],n,s)}function CP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+Q1],n,v);return v===E?s:[0,S,[0,E,y]]}function NP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+Q1],n,v);return v===E?s:[0,S,[0,E,y]]}function RP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+Q1],n,v);return v===E?s:[0,S,[0,E,y]]}function OP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+Q1],n,v);return v===E?s:[0,S,[0,E,y]]}function IP0(n,s){var c=s[2][1],v=s[1],y=p(n[1][1+Q1],n,c);return c===y?s:[0,v,[0,y]]}function LP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+kt],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function MP0(n,s){var c=s[3],v=s[1],y=Sr(l(n[1][1+Z2],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],S]}function DP0(n,s){var c=s[4],v=s[1];if(v[0]===0)var y=v[1],S=function(vx){return[0,vx]},E=l(n[1][1+Z2],n),w0=$0(function(vx){return Sr(E,vx)},y,v,S);else var I=v[1],W=function(vx){return[1,vx]},p0=l(n[1][1+u2],n),w0=$0(function(vx){return Sr(p0,vx)},I,v,W);var F0=p(n[1][1+t0],n,c);return v===w0&&c===F0?s:[0,w0,s[2],s[3],F0]}function jP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+Fe],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function UP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+Gt],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function BP0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(_x){return[0,v,[0,_x]]};return $0(l(n[1][1+_e],n),y,s,S);case 1:var E=c[1],I=function(_x){return[0,v,[1,_x]]};return $0(l(n[1][1+j1],n),E,s,I);case 2:var W=c[1],p0=function(_x){return[0,v,[2,_x]]};return $0(l(n[1][1+qt],n),W,s,p0);case 3:var w0=c[1],F0=function(_x){return[0,v,[3,_x]]};return $0(l(n[1][1+Kr],n),w0,s,F0);default:var vx=c[1],Lx=function(_x){return[0,v,[4,_x]]};return $0(l(n[1][1+Te],n),vx,s,Lx)}}function YP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=G0(n[1][1+Ix],n,LH,S),I=p(n[1][1+we],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function XP0(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function JP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+A0],n,S),I=p(n[1][1+N0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function VP0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=G0(n[1][1+Ix],n,[0,y],E),W=p(n[1][1+F],n,S),p0=p(n[1][1+t0],n,v);return I===E&&W===S&&p0===v?c:[0,I,W,y,p0]}function zP0(n,s,c){return G0(n[1][1+n0],n,s,c)}function KP0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+F],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function ZP0(n,s,c){var v=c[4],y=c[2],S=c[3],E=c[1],I=e2(l(n[1][1+rn],n),y),W=p(n[1][1+t0],n,v);return I===y&&v===W?c:[0,E,I,S,W]}function WP0(n,s,c){return G0(n[1][1+m3],n,s,c)}function $P0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+cr],n,E),W=p(n[1][1+F],n,S),p0=Vx(l(n[1][1+X0],n),y),w0=p(n[1][1+t0],n,v);return I===E&&W===S&&p0===y&&w0===v?c:[0,I,W,p0,w0]}function QP0(n,s){switch(s[0]){case 0:var c=s[1],v=c[2],y=c[1],S=G0(n[1][1+Ee],n,y,v);return S===v?s:[0,[0,y,S]];case 1:var E=s[1],I=E[2],W=E[1],p0=G0(n[1][1+Q2],n,W,I);return p0===I?s:[1,[0,W,p0]];case 2:var w0=s[1],F0=w0[2],vx=w0[1],Lx=G0(n[1][1+xn],n,vx,F0);return Lx===F0?s:[2,[0,vx,Lx]];case 3:var _x=s[1],_r=_x[2],c1=_x[1],s1=G0(n[1][1+wt],n,c1,_r);return s1===_r?s:[3,[0,c1,s1]];case 4:var m1=s[1],k1=p(n[1][1+Q],n,m1);return k1===m1?s:[4,k1];case 5:var Ge=s[1],be=Ge[2],xt=Ge[1],Ce=G0(n[1][1+n0],n,xt,be);return Ce===be?s:[5,[0,xt,Ce]];case 6:var rt=s[1],et=rt[2],At=rt[1],tt=G0(n[1][1+z1],n,At,et);return tt===et?s:[6,[0,At,tt]];case 7:var nt=s[1],Xn=nt[2],Jn=nt[1],Ss=G0(n[1][1+m3],n,Jn,Xn);return Ss===Xn?s:[7,[0,Jn,Ss]];default:var Es=s[1],ut=Es[2],gs=Es[1],cv=G0(n[1][1+he],n,gs,ut);return cv===ut?s:[8,[0,gs,cv]]}}function FP0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=gJ(l(n[1][1+Xr],n),y),p0=Vx(l(n[1][1+Mr],n),S),w0=Vx(l(n[1][1+Rn],n),E),F0=p(n[1][1+t0],n,v);return y===W&&S===p0&&E===w0&&v===F0?c:[0,I,w0,p0,W,F0]}function HP0(n,s,c){return G0(n[1][1+he],n,s,c)}function qP0(n,s){var c=s[2],v=c[4],y=c[2],S=c[1],E=c[3],I=s[1],W=Vx(l(n[1][1+D1],n),S),p0=p(n[1][1+Q],n,y),w0=p(n[1][1+t0],n,v);return S===W&&y===p0&&v===w0?s:[0,I,[0,W,p0,E,w0]]}function GP0(n,s){var c=s[2],v=c[2],y=c[1],S=c[3],E=s[1],I=p(n[1][1+jn],n,y),W=p(n[1][1+F],n,v);return y===I&&v===W?s:[0,E,[0,I,W,S]]}function bP0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],I=Sr(l(n[1][1+Et],n),S),W=Vx(l(n[1][1+Tt],n),y),p0=p(n[1][1+t0],n,v);return S===I&&y===W&&v===p0?s:[0,E,[0,I,W,p0]]}function xC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=Vx(l(n[1][1+L],n),E),W=p(n[1][1+St],n,S),p0=p(n[1][1+F2],n,y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function rC0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=p(n[1][1+tv],n,I),p0=Vx(l(n[1][1+L],n),E),w0=p(n[1][1+St],n,S),F0=p(n[1][1+F2],n,y),vx=p(n[1][1+t0],n,v);return I===W&&E===p0&&S===w0&&y===F0&&v===vx?c:[0,W,p0,w0,F0,vx]}function eC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[4],I=c[3],W=c[2],p0=c[1],w0=p(n[1][1+fa],n,p0),F0=Vx(l(n[1][1+L],n),W),vx=e2(l(n[1][1+w],n),I),Lx=l(n[1][1+ev],n),_x=Vx(function(k1){return e2(Lx,k1)},E),_r=l(n[1][1+ev],n),c1=Sr(function(k1){return e2(_r,k1)},S),s1=Vx(l(n[1][1+nv],n),y),m1=p(n[1][1+t0],n,v);return w0===p0&&F0===W&&vx===I&&_x===E&&c1===S&&s1===y&&m1===v?c:[0,w0,F0,vx,_x,c1,s1,m1]}function tC0(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function nC0(n,s,c){var v=c[2],y=c[1],S=Vx(l(n[1][1+yt],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function uC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+N0],n,E),W=p(n[1][1+Kx],n,S),p0=p(n[1][1+Kx],n,y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function iC0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+rn],n),c,v,s,y)}function fC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Dn],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function cC0(n,s){return G0(n[1][1+Ts],n,IH,s)}function sC0(n,s){if(s[0]===0)return[0,p(n[1][1+D1],n,s[1])];var c=s[1],v=c[1];return[1,[0,v,G0(n[1][1+mx],n,v,c[2])]]}function oC0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=c[4],I=s[1],W=p(n[1][1+jn],n,S),p0=p(n[1][1+Dn],n,y),w0=p(n[1][1+$2],n,v);return S===W&&y===p0&&v===w0?s:[0,I,[0,W,p0,w0,E]]}function vC0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],I=Sr(l(n[1][1+_s],n),S),W=Vx(l(n[1][1+Mn],n),y),p0=p(n[1][1+t0],n,v);return S===I&&y===W&&v===p0?s:[0,E,[0,I,W,p0]]}function aC0(n,s){return G0(n[1][1+Ix],n,OH,s)}function lC0(n,s,c){var v=c[6],y=c[5],S=c[4],E=c[3],I=c[2],W=c[1],p0=c[7],w0=p(n[1][1+tv],n,W),F0=Vx(l(n[1][1+L],n),I),vx=p(n[1][1+qe],n,E),Lx=p(n[1][1+_3],n,y),_x=p(n[1][1+F2],n,S),_r=p(n[1][1+t0],n,v);return W===w0&&I===F0&&E===vx&&y===Lx&&S===_x&&v===_r?c:[0,w0,F0,vx,_x,Lx,_r,p0]}function pC0(n,s){return Vx(l(n[1][1+Kx],n),s)}function dC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[3],I=c[2],W=c[1],p0=p(n[1][1+D],n,W),w0=p(n[1][1+mo],n,I),F0=p(n[1][1+Y],n,E),vx=p(n[1][1+i],n,S),Lx=Sr(l(n[1][1+Bn],n),y),_x=p(n[1][1+t0],n,v);return W===p0&&I===w0&&F0===E&&vx===S&&Lx===y&&_x===v?c:[0,p0,w0,F0,c[4],vx,Lx,_x]}function yC0(n,s){if(typeof s=="number")return s;var c=s[1],v=p(n[1][1+Kx],n,c);return c===v?s:[0,v]}function mC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[3],I=c[2],W=c[1],p0=p(n[1][1+Hx],n,W),w0=p(n[1][1+mo],n,I),F0=p(n[1][1+Y],n,E),vx=p(n[1][1+i],n,S),Lx=Sr(l(n[1][1+Bn],n),y),_x=p(n[1][1+t0],n,v);return W===p0&&I===w0&&F0===E&&vx===S&&Lx===y&&_x===v?c:[0,p0,w0,F0,c[4],vx,Lx,_x]}function kC0(n,s,c){var v=c[6],y=c[5],S=c[3],E=c[2],I=p(n[1][1+Hx],n,E),W=e2(l(n[1][1+lr],n),S),p0=Sr(l(n[1][1+Bn],n),y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,c[1],I,W,c[4],p0,w0]}function hC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+V],n,y),I=Vx(l(n[1][1+J],n),v);return y===E&&v===I?s:[0,S,[0,E,I]]}function _C0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+ko],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function wC0(n,s){switch(s[0]){case 0:var c=s[1],v=c[1],y=c[2],S=function(_x){return[0,[0,v,_x]]};return cx(l(n[1][1+S3],n),v,y,s,S);case 1:var E=s[1],I=E[1],W=E[2],p0=function(_x){return[1,[0,I,_x]]};return cx(l(n[1][1+w3],n),I,W,s,p0);default:var w0=s[1],F0=w0[1],vx=w0[2],Lx=function(_x){return[2,[0,F0,_x]]};return cx(l(n[1][1+T3],n),F0,vx,s,Lx)}}function TC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function SC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+g3],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function EC0(n,s){return G0(n[1][1+Ix],n,RH,s)}function gC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=Vx(l(n[1][1+J],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function AC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[4],I=c[3],W=c[2],p0=c[1],w0=Vx(l(n[1][1+fa],n),p0),F0=Vx(l(n[1][1+L],n),I),vx=p(n[1][1+P3],n,W),Lx=l(n[1][1+E3],n),_x=Vx(function(m1){return e2(Lx,m1)},E),_r=Vx(l(n[1][1+nv],n),S),c1=Sr(l(n[1][1+Bn],n),y),s1=p(n[1][1+t0],n,v);return p0===w0&&W===vx&&E===_x&&S===_r&&y===c1&&v===s1&&I===F0?c:[0,w0,vx,F0,_x,_r,c1,s1]}function PC0(n,s,c){return G0(n[1][1+ca],n,s,c)}function CC0(n,s,c){return G0(n[1][1+ca],n,s,c)}function NC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=Vx(l(n[1][1+uv],n),S),I=p(n[1][1+N3],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function RC0(n,s){return e2(l(n[1][1+rn],n),s)}function OC0(n,s){if(s[0]===0){var c=s[1],v=p(n[1][1+Q],n,c);return v===c?s:[0,v]}var y=s[1],S=y[2][1],E=y[1],I=p(n[1][1+t0],n,S);return S===I?s:[1,[0,E,[0,I]]]}function IC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+gt],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function LC0(n,s,c){var v=c[1],y=G0(n[1][1+ws],n,s,v);return v===y?c:[0,y,c[2],c[3]]}function MC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+qr],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function DC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+Kx],n,E),W=Vx(l(n[1][1+iv],n),S),p0=p(n[1][1+fv],n,y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function jC0(n,s,c){var v=c[2],y=c[1],S=Vx(l(n[1][1+yt],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function UC0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+L0],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function BC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Kx],n,S),I=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,c[1],E,I,W]}function YC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Pe],n,S),I=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,c[1],E,I,W]}function XC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=p(n[1][1+F],n,y),W=p(n[1][1+t0],n,v);return E===S&&I===y&&W===v?c:[0,E,I,W]}function JC0(n,s,c){return G0(n[1][1+zr],n,s,c)}function VC0(n,s){switch(s[0]){case 0:var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Kx],n),c,s,v);case 1:var y=s[1],S=function(E){return[1,E]};return $0(l(n[1][1+Q0],n),y,s,S);default:return s}}function zC0(n,s,c){var v=c[2],y=c[1],S=Sr(l(n[1][1+M3],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function KC0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Ox){return[0,v,[0,Ox]]};return cx(l(n[1][1+ie],n),v,y,s,S);case 1:var E=c[1],I=function(Ox){return[0,v,[1,Ox]]};return cx(l(n[1][1+I3],n),v,E,s,I);case 2:var W=c[1],p0=function(Ox){return[0,v,[2,Ox]]};return cx(l(n[1][1+O3],n),v,W,s,p0);case 3:var w0=c[1],F0=function(Ox){return[0,v,[3,Ox]]};return cx(l(n[1][1+ho],n),v,w0,s,F0);case 4:var vx=c[1],Lx=function(Ox){return[0,v,[4,Ox]]};return cx(l(n[1][1+Yn],n),v,vx,s,Lx);case 5:var _x=c[1],_r=function(Ox){return[0,v,[5,Ox]]};return cx(l(n[1][1+ws],n),v,_x,s,_r);case 6:var c1=c[1],s1=function(Ox){return[0,v,[6,Ox]]};return cx(l(n[1][1+Un],n),v,c1,s,s1);case 7:var m1=c[1],k1=function(Ox){return[0,v,[7,Ox]]};return cx(l(n[1][1+L2],n),v,m1,s,k1);case 8:var Ge=c[1],be=function(Ox){return[0,v,[8,Ox]]};return cx(l(n[1][1+kr],n),v,Ge,s,be);case 9:var xt=c[1],Ce=function(Ox){return[0,v,[9,Ox]]};return $0(l(n[1][1+D1],n),xt,s,Ce);case 10:var rt=c[1],et=function(Ox){return[0,v,[10,Ox]]};return $0(p(n[1][1+na],n,v),rt,s,et);case 11:var At=c[1],tt=function(Ox){return[0,v,[11,Ox]]};return cx(l(n[1][1+mt],n),v,At,s,tt);case 12:var nt=c[1],Xn=function(Ox){return[0,v,[12,Ox]]};return cx(l(n[1][1+Cn],n),v,nt,s,Xn);case 13:var Jn=c[1],Ss=function(Ox){return[0,v,[13,Ox]]};return cx(l(n[1][1+mx],n),v,Jn,s,Ss);case 14:var Es=c[1],ut=function(Ox){return[0,v,[14,Ox]]};return cx(l(n[1][1+oa],n),v,Es,s,ut);case 15:var gs=c[1],cv=function(Ox){return[0,v,[15,Ox]]};return cx(l(n[1][1+Qt],n),v,gs,s,cv);case 16:var H6=c[1],q6=function(Ox){return[0,v,[16,Ox]]};return cx(l(n[1][1+Yx],n),v,H6,s,q6);case 17:var G6=c[1],b6=function(Ox){return[0,v,[17,Ox]]};return cx(l(n[1][1+en],n),v,G6,s,b6);case 18:var x4=c[1],r4=function(Ox){return[0,v,[18,Ox]]};return cx(l(n[1][1+m0],n),v,x4,s,r4);case 19:var e4=c[1],t4=function(Ox){return[0,v,[19,Ox]]};return cx(l(n[1][1+Ze],n),v,e4,s,t4);case 20:var n4=c[1],u4=function(Ox){return[0,v,[20,Ox]]};return cx(l(n[1][1+Ht],n),v,n4,s,u4);case 21:var i4=c[1],f4=function(Ox){return[0,v,[21,Ox]]};return cx(l(n[1][1+We],n),v,i4,s,f4);case 22:var c4=c[1],s4=function(Ox){return[0,v,[22,Ox]]};return cx(l(n[1][1+fo],n),v,c4,s,s4);case 23:var o4=c[1],v4=function(Ox){return[0,v,[23,Ox]]};return cx(l(n[1][1+S2],n),v,o4,s,v4);case 24:var a4=c[1],l4=function(Ox){return[0,v,[24,Ox]]};return cx(l(n[1][1+Lr],n),v,a4,s,l4);case 25:var p4=c[1],d4=function(Ox){return[0,v,[25,Ox]]};return $0(p(n[1][1+a1],n,v),p4,s,d4);case 26:var y4=c[1],m4=function(Ox){return[0,v,[26,Ox]]};return cx(l(n[1][1+Ur],n),v,y4,s,m4);case 27:var k4=c[1],h4=function(Ox){return[0,v,[27,Ox]]};return cx(l(n[1][1+H],n),v,k4,s,h4);case 28:var _4=c[1],w4=function(Ox){return[0,v,[28,Ox]]};return cx(l(n[1][1+dx],n),v,_4,s,w4);case 29:var T4=c[1],S4=function(Ox){return[0,v,[29,Ox]]};return cx(l(n[1][1+H0],n),v,T4,s,S4);case 30:var E4=c[1],g4=function(Ox){return[0,v,[30,Ox]]};return cx(l(n[1][1+g0],n),v,E4,s,g4);case 31:var A4=c[1],P4=function(Ox){return[0,v,[31,Ox]]};return cx(l(n[1][1+Y0],n),v,A4,s,P4);case 32:var C4=c[1],N4=function(Ox){return[0,v,[32,Ox]]};return cx(l(n[1][1+U],n),v,C4,s,N4);case 33:var R4=c[1],O4=function(Ox){return[0,v,[33,Ox]]};return cx(l(n[1][1+c0],n),v,R4,s,O4);case 34:var I4=c[1],L4=function(Ox){return[0,v,[34,Ox]]};return cx(l(n[1][1+g],n),v,I4,s,L4);case 35:var M4=c[1],D4=function(Ox){return[0,v,[35,Ox]]};return cx(l(n[1][1+k],n),v,M4,s,D4);default:var j4=c[1],Rx=function(Ox){return[0,v,[36,Ox]]};return cx(l(n[1][1+e],n),v,j4,s,Rx)}}function ZC0(n,s){var c=s[2],v=s[1],y=s[3],S=Sr(l(n[1][1+yo],n),v),E=Sr(l(n[1][1+yo],n),c);return v===S&&c===E?s:[0,S,E,y]}function WC0(n){var s=l(n[1][1+ex],n);return function(c){return Vx(s,c)}}function $C0(n,s){return s}function QC0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Cx){return[0,v,[0,Cx]]};return cx(l(n[1][1+rn],n),v,y,s,S);case 1:var E=c[1],I=function(Cx){return[0,v,[1,Cx]]};return cx(l(n[1][1+sa],n),v,E,s,I);case 2:var W=c[1],p0=function(Cx){return[0,v,[2,Cx]]};return cx(l(n[1][1+A3],n),v,W,s,p0);case 3:var w0=c[1],F0=function(Cx){return[0,v,[3,Cx]]};return cx(l(n[1][1+ia],n),v,w0,s,F0);case 4:var vx=c[1],Lx=function(Cx){return[0,v,[4,Cx]]};return cx(l(n[1][1+ge],n),v,vx,s,Lx);case 5:var _x=c[1],_r=function(Cx){return[0,v,[5,Cx]]};return cx(l(n[1][1+In],n),v,_x,s,_r);case 6:var c1=c[1],s1=function(Cx){return[0,v,[6,Cx]]};return cx(l(n[1][1+xn],n),v,c1,s,s1);case 7:var m1=c[1],k1=function(Cx){return[0,v,[7,Cx]]};return cx(l(n[1][1+wt],n),v,m1,s,k1);case 8:var Ge=c[1],be=function(Cx){return[0,v,[8,Cx]]};return cx(l(n[1][1+bt],n),v,Ge,s,be);case 9:var xt=c[1],Ce=function(Cx){return[0,v,[9,Cx]]};return cx(l(n[1][1+On],n),v,xt,s,Ce);case 10:var rt=c[1],et=function(Cx){return[0,v,[10,Cx]]};return cx(l(n[1][1+Q2],n),v,rt,s,et);case 11:var At=c[1],tt=function(Cx){return[0,v,[11,Cx]]};return cx(l(n[1][1+I2],n),v,At,s,tt);case 12:var nt=c[1],Xn=function(Cx){return[0,v,[12,Cx]]};return cx(l(n[1][1+E2],n),v,nt,s,Xn);case 13:var Jn=c[1],Ss=function(Cx){return[0,v,[13,Cx]]};return cx(l(n[1][1+_t],n),v,Jn,s,Ss);case 14:var Es=c[1],ut=function(Cx){return[0,v,[14,Cx]]};return cx(l(n[1][1+ht],n),v,Es,s,ut);case 15:var gs=c[1],cv=function(Cx){return[0,v,[15,Cx]]};return cx(l(n[1][1+z1],n),v,gs,s,cv);case 16:var H6=c[1],q6=function(Cx){return[0,v,[16,Cx]]};return cx(l(n[1][1+Ee],n),v,H6,s,q6);case 17:var G6=c[1],b6=function(Cx){return[0,v,[17,Cx]]};return cx(l(n[1][1+Se],n),v,G6,s,b6);case 18:var x4=c[1],r4=function(Cx){return[0,v,[18,Cx]]};return cx(l(n[1][1+W2],n),v,x4,s,r4);case 19:var e4=c[1],t4=function(Cx){return[0,v,[19,Cx]]};return cx(l(n[1][1+he],n),v,e4,s,t4);case 20:var n4=c[1],u4=function(Cx){return[0,v,[20,Cx]]};return cx(l(n[1][1+$e],n),v,n4,s,u4);case 21:var i4=c[1],f4=function(Cx){return[0,v,[21,Cx]]};return cx(l(n[1][1+Qr],n),v,i4,s,f4);case 22:var c4=c[1],s4=function(Cx){return[0,v,[22,Cx]]};return cx(l(n[1][1+l2],n),v,c4,s,s4);case 23:var o4=c[1],v4=function(Cx){return[0,v,[23,Cx]]};return cx(l(n[1][1+Or],n),v,o4,s,v4);case 24:var a4=c[1],l4=function(Cx){return[0,v,[24,Cx]]};return cx(l(n[1][1+d1],n),v,a4,s,l4);case 25:var p4=c[1],d4=function(Cx){return[0,v,[25,Cx]]};return cx(l(n[1][1+l1],n),v,p4,s,d4);case 26:var y4=c[1],m4=function(Cx){return[0,v,[26,Cx]]};return cx(l(n[1][1+sr],n),v,y4,s,m4);case 27:var k4=c[1],h4=function(Cx){return[0,v,[27,Cx]]};return cx(l(n[1][1+h3],n),v,k4,s,h4);case 28:var _4=c[1],w4=function(Cx){return[0,v,[28,Cx]]};return cx(l(n[1][1+H9],n),v,_4,s,w4);case 29:var T4=c[1],S4=function(Cx){return[0,v,[29,Cx]]};return cx(l(n[1][1+$9],n),v,T4,s,S4);case 30:var E4=c[1],g4=function(Cx){return[0,v,[30,Cx]]};return cx(l(n[1][1+dr],n),v,E4,s,g4);case 31:var A4=c[1],P4=function(Cx){return[0,v,[31,Cx]]};return cx(l(n[1][1+b],n),v,A4,s,P4);case 32:var C4=c[1],N4=function(Cx){return[0,v,[32,Cx]]};return cx(l(n[1][1+ax],n),v,C4,s,N4);case 33:var R4=c[1],O4=function(Cx){return[0,v,[33,Cx]]};return cx(l(n[1][1+M0],n),v,R4,s,O4);case 34:var I4=c[1],L4=function(Cx){return[0,v,[34,Cx]]};return cx(l(n[1][1+T0],n),v,I4,s,L4);case 35:var M4=c[1],D4=function(Cx){return[0,v,[35,Cx]]};return cx(l(n[1][1+n0],n),v,M4,s,D4);case 36:var j4=c[1],Rx=function(Cx){return[0,v,[36,Cx]]};return cx(l(n[1][1+z1],n),v,j4,s,Rx);case 37:var Ox=c[1],FC0=function(Cx){return[0,v,[37,Cx]]};return cx(l(n[1][1+d],n),v,Ox,s,FC0);case 38:var HC0=c[1],qC0=function(Cx){return[0,v,[38,Cx]]};return cx(l(n[1][1+u],n),v,HC0,s,qC0);default:var GC0=c[1],bC0=function(Cx){return[0,v,[39,Cx]]};return cx(l(n[1][1+t],n),v,GC0,s,bC0)}}return zO(x,[0,D3,function(n,s){var c=s[2],v=c[4],y=c[3],S=c[1],E=c[2],I=s[1],W=p(n[1][1+E0],n,S),p0=p(n[1][1+t0],n,y),w0=Sr(l(n[1][1+yo],n),v);return S===W&&y===p0&&v===w0?s:[0,I,[0,W,E,p0,w0]]},A0,QC0,yo,$C0,t0,WC0,ex,ZC0,Kx,KC0,ie,zC0,M3,VC0,I3,JC0,O3,XC0,ho,YC0,Yn,BC0,rn,UC0,sa,jC0,ws,DC0,fv,MC0,a1,LC0,iv,IC0,gt,OC0,N3,RC0,C3,NC0,A3,CC0,Un,PC0,ca,AC0,E3,gC0,fa,EC0,P3,SC0,Bn,TC0,g3,wC0,nv,_C0,ko,hC0,S3,kC0,w3,mC0,mo,yC0,T3,dC0,$2,pC0,ia,lC0,tv,aC0,qe,vC0,_s,oC0,jn,sC0,Dn,cC0,Mn,fC0,_3,iC0,L2,uC0,ge,nC0,In,tC0,xn,eC0,wt,rC0,hs,xC0,St,bP0,Et,GP0,Tt,qP0,bt,HP0,On,FP0,Rn,QP0,Q2,$P0,I2,WP0,E2,ZP0,_t,KP0,ht,zP0,Ee,VP0,Se,JP0,W2,XP0,he,YP0,we,BP0,_e,UP0,j1,jP0,qt,DP0,Kr,MP0,Te,LP0,Z2,IP0,Gt,OP0,Fe,RP0,u2,NP0,kt,CP0,Q1,PP0,$e,AP0,R1,gP0,Qr,EP0,Dr,SP0,Qe,TP0,Mr,wP0,Xr,_P0,l2,hP0,qr,kP0,d1,mP0,f1,yP0,P1,dP0,l1,pP0,e1,lP0,T1,aP0,Or,vP0,r1,oP0,i1,sP0,jx,cP0,nx,fP0,j,iP0,q,uP0,C,nP0,yt,tP0,e0,eP0,Cr,rP0,w1,xP0,S0,bA0,x0,GA0,nr,qA0,$x,HA0,Zx,FA0,k0,QA0,w,$A0,n2,WA0,rv,ZA0,ua,KA0,po,zA0,gn,VA0,f,JA0,i,XA0,J,YA0,L,BA0,z,UA0,ev,jA0,j6,DA0,lx,MA0,mx,LA0,Yx,IA0,en,OA0,oa,RA0,Qt,NA0,m0,CA0,Ze,PA0,ue,AA0,He,gA0,Q9,EA0,A,SA0,M,TA0,O,wA0,R,_A0,N,hA0,Qo,kA0,B,mA0,P0,yA0,f0,dA0,o0,pA0,v0,lA0,s0,aA0,L3,vA0,T,oA0,Nn,sA0,Q,cA0,F,fA0,Y,iA0,F2,uA0,sr,nA0,kr,tA0,lr,eA0,zr,rA0,Dx,xA0,h0,bg0,hr,Gg0,R0,qg0,Er,Hg0,$r,Fg0,R3,Qg0,cr,$g0,D1,Wg0,Z,Zg0,V,Kg0,Ae,zg0,m3,Vg0,$9,Jg0,D,Xg0,Ln,Yg0,na,Bg0,q9,Ug0,G9,jg0,h3,Dg0,H9,Mg0,B6,Lg0,U6,Ig0,a0,Og0,k3,Rg0,F9,Ng0,Y6,Cg0,mt,Pg0,Cn,Ag0,co,gg0,qo,Eg0,Fo,Sg0,Pn,Tg0,xv,wg0,bo,_g0,lo,hg0,ta,kg0,ks,mg0,ea,yg0,ra,dg0,Go,pg0,ao,lg0,Ho,ag0,me,vg0,ms,og0,vo,sg0,bv,cg0,xa,fg0,so,ig0,ys,ug0,oo,ng0,a2,tg0,ke,eg0,dr,LM,Ht,pm,We,lm,Ur,F6,An,IM,ds,am,Ft,OM,ye,RM,fo,vm,S2,Y3,Lr,B3,G,Q6,Hx,$6,J0,NM,I0,CM,Bx,PM,ix,W6,Wx,AM,z1,gM,xr,EM,o,Z6,uv,SM,$1,TM,p1,wM,Ts,_M,Pe,hM,or,U3,Ix,kM,D0,om,Ex,mM,B0,yM,Px,dM,j0,K6,X,pM,kx,sm,h,lM,tx,aM,W0,vM,sx,z6,b0,oM,V0,V6,ox,cm,z0,sM,ur,fm,K0,J6,Ux,im,tr,cM,qx,um,X0,fM,N0,X6,$,iM,i0,uM,Sx,nM,b,nm,H,tm,E0,va,L0,tM,C0,em,Q0,rm,U0,eM,dx,rM,ax,xM,xx,xm,H0,j3,g0,bL,rx,GL,Y0,qL,M0,HL,T0,FL,U,QL,c0,$L,g,WL,k,ZL,d,KL,a,zL,u,VL,t,JL,n0,XL,e,b9]),function(n,s){return ky(s,x)}}),FO=function x(r,e,t){return x.fun(r,e,t)};O0(FO,function(x,r,e){var t=e[2];switch(t[0]){case 0:var u=t[1][1];return x2(function(f){return function(o){var a=o[0]===0?o[1][2][2]:o[1][2][1];return G0(FO,x,f,a)}},r,u);case 1:var i=t[1][1];return x2(function(f){return function(o){return o[0]===2?f:G0(FO,x,f,o[1][2][1])}},r,i);case 2:return p(x,r,t[1][1]);default:return r}});var HO=function x(r){return x.fun(r)},yS0=function(x){var r=x[0]===0?x[1][2][2]:x[1][2][1];return l(HO,r)},mS0=function(x){return x[0]===2?0:l(HO,x[1][2][1])};O0(HO,function(x){var r=x[2];switch(r[0]){case 0:return aO(yS0,r[1][1]);case 1:return aO(mS0,r[1][1]);case 2:return 1;default:return 0}});var wn=function(x,r){return[0,r[1],[0,r[2],x]]},AJ=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0;return[0,t,u,e]},y0=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0;return!t&&!u?0:[0,AJ([0,t],[0,u],0)]},X1=function(x,r,e,t){var u=x?x[1]:0,i=r?r[1]:0;return!u&&!i&&!e?0:[0,AJ([0,u],[0,i],e)]},R2=function(x,r){if(x){if(r){var e=r[1],t=x[1],u=[0,Fx(t[2],e[2])];return y0([0,Fx(e[1],t[1])],u,0)}var i=x}else var i=r;return i},qO=function(x,r){if(!r)return x;if(x){var e=r[1],t=x[1],u=e[1],i=t[3],f=t[1],o=[0,Fx(t[2],e[2])];return X1([0,Fx(u,f)],o,i,0)}var a=r[1];return X1([0,a[1]],[0,a[2]],0,0)},PJ=function(x,r){l(Yr(x),Cq),p(Yr(x),Rq,Nq);var e=r[1];l(l(Yr(x),Oq),e),l(Yr(x),Iq),l(Yr(x),Lq),p(Yr(x),Dq,Mq);var t=r[2];return l(l(Yr(x),jq),t),l(Yr(x),Uq),l(Yr(x),Bq)},CJ=function x(r,e){return x.fun(r,e)},kS0=function x(r){return x.fun(r)};O0(CJ,function(x,r){l(Yr(x),zq),p(Yr(x),Zq,Kq);var e=r[1];if(e){var t=e[1];switch(yy(x,Xq),t[0]){case 0:var u=t[1];l(Yr(x),kH),l(l(Yr(x),hH),u),l(Yr(x),_H);break;case 1:var i=t[1];l(Yr(x),wH),l(l(Yr(x),TH),i),l(Yr(x),SH);break;case 2:var f=t[1];l(Yr(x),EH),l(l(Yr(x),gH),f),l(Yr(x),AH);break;default:var o=t[1];l(Yr(x),PH),l(l(Yr(x),CH),o),l(Yr(x),NH)}yy(x,Jq)}else yy(x,Vq);return l(Yr(x),Wq),l(Yr(x),$q),p(Yr(x),Fq,Qq),PJ(x,r[2]),l(Yr(x),Hq),l(Yr(x),qq),p(Yr(x),bq,Gq),PJ(x,r[3]),l(Yr(x),xG),l(Yr(x),rG)}),O0(kS0,function(x){var r=Yq[1],e=KX(0),t=MO(e);return p(Br(function(u){Ve(t,u),IO(t,0);var i=Y1(e);return e[2]=0,e[1]=e[4],e[3]=vt(e[1]),i},0,r),CJ,x)});var Hr=function(x,r){return[0,x[1],x[2],r[3]]},qs=function(x,r){var e=x[1]-r[1]|0;return e===0?x[2]-r[2]|0:e},NJ=function(x,r){var e=r[1],t=x[1];if(t){var u=t[1];if(e)var i=e[1],f=EJ(i),o=EJ(u)-f|0,a=o===0?Tx(u[1],i[1]):o;else var a=-1}else var a=e?1:0;if(a!==0)return a;var d=qs(x[2],r[2]);return d===0?qs(x[3],r[3]):d},Mo=function(x,r){return NJ(x,r)===0?1:0},RJ=function x(r,e){return x.fun(r,e)};O0(RJ,function(x,r){if(typeof x=="number"){var e=x;if(59<=e)switch(e){case 59:if(typeof r=="number"&&r===59)return 0;break;case 60:if(typeof r=="number"&&r===60)return 0;break;case 61:if(typeof r=="number"&&r===61)return 0;break;case 62:if(typeof r=="number"&&r===62)return 0;break;case 63:if(typeof r=="number"&&r===63)return 0;break;case 64:if(typeof r=="number"&&r===64)return 0;break;case 65:if(typeof r=="number"&&r===65)return 0;break;case 66:if(typeof r=="number"&&r===66)return 0;break;case 67:if(typeof r=="number"&&r===67)return 0;break;case 68:if(typeof r=="number"&&r===68)return 0;break;case 69:if(typeof r=="number"&&r===69)return 0;break;case 70:if(typeof r=="number"&&r===70)return 0;break;case 71:if(typeof r=="number"&&r===71)return 0;break;case 72:if(typeof r=="number"&&r===72)return 0;break;case 73:if(typeof r=="number"&&r===73)return 0;break;case 74:if(typeof r=="number"&&r===74)return 0;break;case 75:if(typeof r=="number"&&r===75)return 0;break;case 76:if(typeof r=="number"&&r===76)return 0;break;case 77:if(typeof r=="number"&&r===77)return 0;break;case 78:if(typeof r=="number"&&r===78)return 0;break;case 79:if(typeof r=="number"&&r===79)return 0;break;case 80:if(typeof r=="number"&&r===80)return 0;break;case 81:if(typeof r=="number"&&r===81)return 0;break;case 82:if(typeof r=="number"&&r===82)return 0;break;case 83:if(typeof r=="number"&&r===83)return 0;break;case 84:if(typeof r=="number"&&r===84)return 0;break;case 85:if(typeof r=="number"&&r===85)return 0;break;case 86:if(typeof r=="number"&&r===86)return 0;break;case 87:if(typeof r=="number"&&r===87)return 0;break;case 88:if(typeof r=="number"&&r===88)return 0;break;case 89:if(typeof r=="number"&&r===89)return 0;break;case 90:if(typeof r=="number"&&r===90)return 0;break;case 91:if(typeof r=="number"&&r===91)return 0;break;case 92:if(typeof r=="number"&&r===92)return 0;break;case 93:if(typeof r=="number"&&r===93)return 0;break;case 94:if(typeof r=="number"&&r===94)return 0;break;case 95:if(typeof r=="number"&&r===95)return 0;break;case 96:if(typeof r=="number"&&r===96)return 0;break;case 97:if(typeof r=="number"&&r===97)return 0;break;case 98:if(typeof r=="number"&&r===98)return 0;break;case 99:if(typeof r=="number"&&r===99)return 0;break;case 100:if(typeof r=="number"&&st===r)return 0;break;case 101:if(typeof r=="number"&&Rt===r)return 0;break;case 102:if(typeof r=="number"&&Zf===r)return 0;break;case 103:if(typeof r=="number"&&nn===r)return 0;break;case 104:if(typeof r=="number"&&Dt===r)return 0;break;case 105:if(typeof r=="number"&&ft===r)return 0;break;case 106:if(typeof r=="number"&&f2===r)return 0;break;case 107:if(typeof r=="number"&&b2===r)return 0;break;case 108:if(typeof r=="number"&&sn===r)return 0;break;case 109:if(typeof r=="number"&&To===r)return 0;break;case 110:if(typeof r=="number"&&U1===r)return 0;break;case 111:if(typeof r=="number"&&Ot===r)return 0;break;case 112:if(typeof r=="number"&&M2===r)return 0;break;case 113:if(typeof r=="number"&&Nr===r)return 0;break;case 114:if(typeof r=="number"&&ct===r)return 0;break;case 115:if(typeof r=="number"&&Eo===r)return 0;break;case 116:if(typeof r=="number"&&Ri===r)return 0;break;default:if(typeof r=="number"&&dv<=r)return 0}else switch(e){case 0:if(typeof r=="number"&&!r)return 0;break;case 1:if(typeof r=="number"&&r===1)return 0;break;case 2:if(typeof r=="number"&&r===2)return 0;break;case 3:if(typeof r=="number"&&r===3)return 0;break;case 4:if(typeof r=="number"&&r===4)return 0;break;case 5:if(typeof r=="number"&&r===5)return 0;break;case 6:if(typeof r=="number"&&r===6)return 0;break;case 7:if(typeof r=="number"&&r===7)return 0;break;case 8:if(typeof r=="number"&&r===8)return 0;break;case 9:if(typeof r=="number"&&r===9)return 0;break;case 10:if(typeof r=="number"&&r===10)return 0;break;case 11:if(typeof r=="number"&&r===11)return 0;break;case 12:if(typeof r=="number"&&r===12)return 0;break;case 13:if(typeof r=="number"&&r===13)return 0;break;case 14:if(typeof r=="number"&&r===14)return 0;break;case 15:if(typeof r=="number"&&r===15)return 0;break;case 16:if(typeof r=="number"&&r===16)return 0;break;case 17:if(typeof r=="number"&&r===17)return 0;break;case 18:if(typeof r=="number"&&r===18)return 0;break;case 19:if(typeof r=="number"&&r===19)return 0;break;case 20:if(typeof r=="number"&&r===20)return 0;break;case 21:if(typeof r=="number"&&r===21)return 0;break;case 22:if(typeof r=="number"&&r===22)return 0;break;case 23:if(typeof r=="number"&&r===23)return 0;break;case 24:if(typeof r=="number"&&r===24)return 0;break;case 25:if(typeof r=="number"&&r===25)return 0;break;case 26:if(typeof r=="number"&&r===26)return 0;break;case 27:if(typeof r=="number"&&r===27)return 0;break;case 28:if(typeof r=="number"&&r===28)return 0;break;case 29:if(typeof r=="number"&&r===29)return 0;break;case 30:if(typeof r=="number"&&r===30)return 0;break;case 31:if(typeof r=="number"&&r===31)return 0;break;case 32:if(typeof r=="number"&&r===32)return 0;break;case 33:if(typeof r=="number"&&r===33)return 0;break;case 34:if(typeof r=="number"&&r===34)return 0;break;case 35:if(typeof r=="number"&&r===35)return 0;break;case 36:if(typeof r=="number"&&r===36)return 0;break;case 37:if(typeof r=="number"&&r===37)return 0;break;case 38:if(typeof r=="number"&&r===38)return 0;break;case 39:if(typeof r=="number"&&r===39)return 0;break;case 40:if(typeof r=="number"&&r===40)return 0;break;case 41:if(typeof r=="number"&&r===41)return 0;break;case 42:if(typeof r=="number"&&r===42)return 0;break;case 43:if(typeof r=="number"&&r===43)return 0;break;case 44:if(typeof r=="number"&&r===44)return 0;break;case 45:if(typeof r=="number"&&r===45)return 0;break;case 46:if(typeof r=="number"&&r===46)return 0;break;case 47:if(typeof r=="number"&&r===47)return 0;break;case 48:if(typeof r=="number"&&r===48)return 0;break;case 49:if(typeof r=="number"&&r===49)return 0;break;case 50:if(typeof r=="number"&&r===50)return 0;break;case 51:if(typeof r=="number"&&r===51)return 0;break;case 52:if(typeof r=="number"&&r===52)return 0;break;case 53:if(typeof r=="number"&&r===53)return 0;break;case 54:if(typeof r=="number"&&r===54)return 0;break;case 55:if(typeof r=="number"&&r===55)return 0;break;case 56:if(typeof r=="number"&&r===56)return 0;break;case 57:if(typeof r=="number"&&r===57)return 0;break;default:if(typeof r=="number"&&r===58)return 0}}else switch(x[0]){case 0:if(typeof r!="number"&&r[0]===0)return Tx(x[1],r[1]);break;case 1:if(typeof r!="number"&&r[0]===1)return Tx(x[1],r[1]);break;case 2:if(typeof r!="number"&&r[0]===2){var t=Tx(x[1],r[1]),u=r[2],i=x[2];return t===0?Tx(i,u):t}break;case 3:if(typeof r!="number"&&r[0]===3){var f=Tx(x[1],r[1]),o=r[2],a=x[2];return f===0?Tx(a,o):f}break;case 4:if(typeof r!="number"&&r[0]===4){var d=Tx(x[1],r[1]),k=r[2],T=x[2];return d===0?Tx(T,k):d}break;case 5:if(typeof r!="number"&&r[0]===5)return Tx(x[1],r[1]);break;case 6:if(typeof r!="number"&&r[0]===6)return Ut(x[1],r[1]);break;case 7:if(typeof r!="number"&&r[0]===7){var g=r[2],A=x[2],N=Tx(x[1],r[1]);if(N!==0)return N;if(!A)return g?-1:0;var R=A[1];return g?Tx(R,g[1]):1}break;case 8:if(typeof r!="number"&&r[0]===8)return Tx(x[1],r[1]);break;case 9:if(typeof r!="number"&&r[0]===9){var O=r[2],M=x[2],L=Tx(x[1],r[1]),z=r[3],V=x[3];if(L!==0)return L;if(M){var Z=M[1];if(O){var $=O[1],i0=0;switch(Z){case 0:if($)i0=1;else var Y=0;break;case 1:if($===1)var Y=0;else i0=1;break;case 2:if($===2)var Y=0;else i0=1;break;case 3:if($===3)var Y=0;else i0=1;break;default:if(4<=$)var Y=0;else i0=1}if(i0)var U=function(ox){switch(ox){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;default:return 4}},J=U($),Y=Ut(U(Z),J);var F=Y}else var F=1}else var F=O?-1:0;return F===0?Tx(V,z):F}break;case 10:if(typeof r!="number"&&r[0]===10){var n0=Tx(x[1],r[1]),Q=r[2],f0=x[2];return n0===0?Tx(f0,Q):n0}break;case 11:if(typeof r!="number"&&r[0]===11){var s0=Tx(x[1],r[1]),v0=r[2],o0=x[2];return s0===0?Tx(o0,v0):s0}break;case 12:if(typeof r!="number"&&r[0]===12)return Tx(x[1],r[1]);break;case 13:if(typeof r!="number"&&r[0]===13)return Tx(x[1],r[1]);break;case 14:if(typeof r!="number"&&r[0]===14)return Ut(x[1],r[1]);break;case 15:if(typeof r!="number"&&r[0]===15){var c0=Tx(x[1],r[1]),T0=r[4],E0=r[3],M0=r[2],Y0=x[4],rx=x[3],g0=x[2];if(c0!==0)return c0;var H0=Ut(g0,M0);if(H0!==0)return H0;var t0=Ut(rx,E0);return t0===0?Ut(Y0,T0):t0}break;case 16:if(typeof r!="number"&&r[0]===16){var ex=Ut(x[1],r[1]),xx=r[2],ax=x[2];return ex===0?Tx(ax,xx):ex}break;case 17:if(typeof r!="number"&&r[0]===17)return Ut(x[1],r[1]);break;case 18:if(typeof r!="number"&&r[0]===18)return Tx(x[1],r[1]);break;case 19:if(typeof r!="number"&&r[0]===19)return Tx(x[1],r[1]);break;case 20:if(typeof r!="number"&&r[0]===20)return Tx(x[1],r[1]);break;case 21:if(typeof r!="number"&&r[0]===21){var dx=Tx(x[1],r[1]),mx=r[2],L0=x[2];return dx===0?Tx(L0,mx):dx}break;case 22:if(typeof r!="number"&&r[0]===22){var C0=r[1],A0=x[1];if(dl===A0){if(dl===C0)return 0}else if(fl<=A0){if(fl===C0)return 0}else if(cY===C0)return 0;var U0=function(X0){return dl===X0?0:fl<=X0?2:1},Q0=U0(C0);return Ut(U0(A0),Q0)}break;case 23:if(typeof r!="number"&&r[0]===23)return Tx(x[1],r[1]);break;case 24:if(typeof r!="number"&&r[0]===24)return Tx(x[1],r[1]);break;case 25:if(typeof r!="number"&&r[0]===25){var H=Tx(x[1],r[1]),b=r[2],B=x[2];return H===0?Tx(B,b):H}break;case 26:if(typeof r!="number"&&r[0]===26){var a0=Tx(x[1],r[1]),m0=r[2],P0=x[2];return a0===0?Tx(P0,m0):a0}break;default:if(typeof r!="number"&&r[0]===27)return Tx(x[1],r[1])}function D(X0){if(typeof X0!="number")switch(X0[0]){case 0:return 20;case 1:return 21;case 2:return 23;case 3:return 24;case 4:return 25;case 5:return 26;case 6:return 27;case 7:return 28;case 8:return 30;case 9:return 31;case 10:return 32;case 11:return 34;case 12:return 35;case 13:return 37;case 14:return 40;case 15:return 52;case 16:return 55;case 17:return 57;case 18:return 66;case 19:return 75;case 20:return 84;case 21:return 91;case 22:return Ot;case 23:return Pa;case 24:return Lf;case 25:return Ep;case 26:return Nj;default:return wB}var D0=X0;if(59<=D0)switch(D0){case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 82;case 63:return 83;case 64:return 85;case 65:return 86;case 66:return 87;case 67:return 88;case 68:return 89;case 69:return 90;case 70:return 92;case 71:return 93;case 72:return 94;case 73:return 95;case 74:return 96;case 75:return 97;case 76:return 98;case 77:return 99;case 78:return st;case 79:return Rt;case 80:return Zf;case 81:return nn;case 82:return Dt;case 83:return ft;case 84:return f2;case 85:return b2;case 86:return sn;case 87:return To;case 88:return U1;case 89:return M2;case 90:return Nr;case 91:return ct;case 92:return Eo;case 93:return Ri;case 94:return dv;case 95:return ya;case 96:return ul;case 97:return x1;case 98:return It;case 99:return Ma;case 100:return Di;case 101:return K4;case 102:return Jr;case 103:return h1;case 104:return _l;case 105:return ud;case 106:return rN;case 107:return uD;case 108:return BU;case 109:return kY;case 110:return Wj;case 111:return JD;case 112:return Uw;case 113:return xU;case 114:return yj;case 115:return zU;case 116:return IB;default:return rj}switch(D0){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 6;case 7:return 7;case 8:return 8;case 9:return 9;case 10:return 10;case 11:return 11;case 12:return 12;case 13:return 13;case 14:return 14;case 15:return 15;case 16:return 16;case 17:return 17;case 18:return 18;case 19:return 19;case 20:return 22;case 21:return 29;case 22:return 33;case 23:return 36;case 24:return 38;case 25:return 39;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 53;case 38:return 54;case 39:return 56;case 40:return 58;case 41:return 59;case 42:return 60;case 43:return 61;case 44:return 62;case 45:return 63;case 46:return 64;case 47:return 65;case 48:return 67;case 49:return 68;case 50:return 69;case 51:return 70;case 52:return 71;case 53:return 72;case 54:return 73;case 55:return 74;case 56:return 76;case 57:return 77;default:return 78}}var N0=D(r);return Ut(D(x),N0)});var hS0=[Gr,ax0,Js(0)],_S0=function(x){if(typeof x=="number"){var r=x;if(59<=r)switch(r){case 59:return ob;case 60:return vb;case 61:return ab;case 62:return lb;case 63:return pb;case 64:return db;case 65:return yb;case 66:return mb;case 67:return kb;case 68:return hb;case 69:return _b;case 70:return wb;case 71:return Tb;case 72:return Sb;case 73:return Eb;case 74:return gb;case 75:return Ab;case 76:return Pb;case 77:return Cb;case 78:return Nb;case 79:return Rb;case 80:return Ob;case 81:return Ib;case 82:return Lb;case 83:return Mb;case 84:return Db;case 85:return jb;case 86:return Ub;case 87:return Bb;case 88:return Yb;case 89:return Xb;case 90:return Jb;case 91:return Vb;case 92:return zb;case 93:return Kb;case 94:return Zb;case 95:return Wb;case 96:return $b;case 97:return Qb;case 98:return Fb;case 99:return Hb;case 100:return qb;case 101:return Gb;case 102:return bb;case 103:return x00;case 104:return r00;case 105:return e00;case 106:return t00;case 107:return n00;case 108:return u00;case 109:return i00;case 110:return f00;case 111:return c00;case 112:return s00;case 113:return o00;case 114:return v00;case 115:return a00;case 116:return l00;default:return p00}switch(r){case 0:return eG;case 1:return tG;case 2:return nG;case 3:return Qx(iG,uG);case 4:return fG;case 5:return cG;case 6:return sG;case 7:return oG;case 8:return vG;case 9:return aG;case 10:return lG;case 11:return pG;case 12:return Qx(yG,dG);case 13:return mG;case 14:return kG;case 15:return hG;case 16:return _G;case 17:return wG;case 18:return TG;case 19:return SG;case 20:return EG;case 21:return gG;case 22:return AG;case 23:return PG;case 24:return CG;case 25:return NG;case 26:return RG;case 27:return OG;case 28:return IG;case 29:return LG;case 30:return MG;case 31:return DG;case 32:return jG;case 33:return UG;case 34:return Qx(YG,BG);case 35:return XG;case 36:return JG;case 37:return VG;case 38:return zG;case 39:return KG;case 40:return ZG;case 41:return WG;case 42:return $G;case 43:return QG;case 44:return FG;case 45:return HG;case 46:return qG;case 47:return GG;case 48:return bG;case 49:return xb;case 50:return rb;case 51:return eb;case 52:return tb;case 53:return nb;case 54:return ub;case 55:return ib;case 56:return fb;case 57:return cb;default:return sb}}switch(x[0]){case 0:var e=x[1];return l(Tr(d00),e);case 1:var t=x[1];return l(Tr(y00),t);case 2:var u=x[2],i=x[1];return p(Tr(m00),u,i);case 3:var f=x[2],o=x[1];return G0(Tr(k00),f,f,o);case 4:var a=x[2],d=x[1];return p(Tr(h00),a,d);case 5:var k=x[1];return l(Tr(_00),k);case 6:return x[1]?w00:T00;case 7:var T=x[2],g=x[1],A=l(Tr(S00),g);if(!T)return l(Tr(g00),A);var N=T[1];return p(Tr(E00),N,A);case 8:var R=x[1];return p(Tr(A00),R,R);case 9:var O=x[3],M=x[2],L=x[1];if(!M)return p(Tr(N00),O,L);var z=M[1];if(z===3)return p(Tr(C00),O,L);switch(z){case 0:var V=lH;break;case 1:var V=pH;break;case 2:var V=dH;break;case 3:var V=yH;break;default:var V=mH}return oe(Tr(P00),L,V,O,V);case 10:var Z=x[2],$=x[1],i0=pX(Z);return G0(Tr(R00),Z,i0,$);case 11:var U=x[2],J=x[1];return p(Tr(O00),U,J);case 12:var Y=x[1];return l(Tr(I00),Y);case 13:var F=x[1];return l(Tr(L00),F);case 14:return x[1]?Qx(D00,M00):Qx(U00,j00);case 15:var n0=x[1],Q=x[4],f0=x[3],s0=x[2]?B00:Y00,v0=f0?X00:J00,o0=Q?Qx(V00,n0):n0;return G0(Tr(z00),s0,v0,o0);case 16:var c0=x[2],T0=[0,0],E0=[0,Xx(c0)],M0=Xx(c0)-1|0,Y0=x[1];if(M0>=0)for(var rx=M0;;){if(fx(c0,rx)===45){var g0=T0[1];T0[1]=[0,m2(c0,rx+1|0,(E0[1]-rx|0)-1|0),g0],E0[1]=rx}var H0=rx-1|0;if(rx!==0){var rx=H0;continue}break}var t0=T0[1],ex=m2(c0,0,E0[1]);if(t0)for(var xx=[0,ex,_n(pX,t0)],ax=0,dx=xx,mx=0;;){if(dx){var L0=dx[1];if(dx[2]){var C0=(Xx(L0)|0)+ax|0,A0=dx[2],U0=ax<=C0?C0:y2(XW),ax=U0,dx=A0;continue}var Q0=Xx(L0)+ax|0}else var Q0=ax;for(var H=S1(Q0),b=mx,B=xx;;){if(B){var a0=B[1];if(B[2]){var m0=B[2];rs(a0,0,H,b,Xx(a0)),rs(hx,0,H,b+Xx(a0)|0,0);var b=b+Xx(a0)|0|0,B=m0;continue}rs(a0,0,H,b,Xx(a0))}var P0=g2(H);break}break}else var P0=ex;var D=Y0?K00:Z00;return G0(Tr(W00),c0,P0,D);case 17:var N0=x[1]?$00:Q00;return l(Tr(F00),N0);case 18:var X0=x[1];return l(Tr(H00),X0);case 19:var D0=x[1];return l(Tr(q00),D0);case 20:var ox=x[1];return l(Tr(G00),ox);case 21:var b0=x[2],kx=x[1];return p(Tr(b00),kx,b0);case 22:var V0=x[1];if(dl===V0)var h=nx0,X=ux0;else if(fl<=V0)var h=xx0,X=rx0;else var h=ex0,X=tx0;return p(Tr(ix0),X,h);case 23:var W0=x[1];return l(Tr(fx0),W0);case 24:var sx=x[1];return l(Tr(cx0),sx);case 25:var tx=x[2],j0=x[1];return p(Tr(sx0),j0,tx);case 26:var Px=x[2],Ex=x[1];return p(Tr(ox0),Ex,Px);default:var Ix=x[1];return l(Tr(vx0),Ix)}},OJ=lx0.slice(),GO=function(x){for(var r=0,e=OJ.length-1-1|0;;){if(ex)return 1;var r=t+1|0}},IJ=0,LJ=function(x){var r=x[2];return[0,x[1],[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12]],x[3],x[4],x[5],x[6],x[7]]},MJ=function(x){return x[3][1]},Ey=function(x,r){return x!==r[4]?[0,r[1],r[2],r[3],x,r[5],r[6],r[7]]:r},bO=function x(r,e){return x.fun(r,e)},DJ=function x(r,e){return x.fun(r,e)},xI=function x(r,e){return x.fun(r,e)},rI=function x(r,e){return x.fun(r,e)};O0(bO,function(x,r){if(typeof x=="number"){var e=x;if(66<=e)if(99<=e)switch(e){case 99:if(typeof r=="number"&&r===99)return 1;break;case 100:if(typeof r=="number"&&st===r)return 1;break;case 101:if(typeof r=="number"&&Rt===r)return 1;break;case 102:if(typeof r=="number"&&Zf===r)return 1;break;case 103:if(typeof r=="number"&&nn===r)return 1;break;case 104:if(typeof r=="number"&&Dt===r)return 1;break;case 105:if(typeof r=="number"&&ft===r)return 1;break;case 106:if(typeof r=="number"&&f2===r)return 1;break;case 107:if(typeof r=="number"&&b2===r)return 1;break;case 108:if(typeof r=="number"&&sn===r)return 1;break;case 109:if(typeof r=="number"&&To===r)return 1;break;case 110:if(typeof r=="number"&&U1===r)return 1;break;case 111:if(typeof r=="number"&&Ot===r)return 1;break;case 112:if(typeof r=="number"&&M2===r)return 1;break;case 113:if(typeof r=="number"&&Nr===r)return 1;break;case 114:if(typeof r=="number"&&ct===r)return 1;break;case 115:if(typeof r=="number"&&Eo===r)return 1;break;case 116:if(typeof r=="number"&&Ri===r)return 1;break;case 117:if(typeof r=="number"&&dv===r)return 1;break;case 118:if(typeof r=="number"&&ya===r)return 1;break;case 119:if(typeof r=="number"&&Pa===r)return 1;break;case 120:if(typeof r=="number"&&Lf===r)return 1;break;case 121:if(typeof r=="number"&&ul===r)return 1;break;case 122:if(typeof r=="number"&&x1===r)return 1;break;case 123:if(typeof r=="number"&&It===r)return 1;break;case 124:if(typeof r=="number"&&Ma===r)return 1;break;case 125:if(typeof r=="number"&&Di===r)return 1;break;case 126:if(typeof r=="number"&&K4===r)return 1;break;case 127:if(typeof r=="number"&&Jr===r)return 1;break;case 128:if(typeof r=="number"&&h1===r)return 1;break;case 129:if(typeof r=="number"&&_l===r)return 1;break;case 130:if(typeof r=="number"&&ud===r)return 1;break;default:if(typeof r=="number"&&Ep<=r)return 1}else switch(e){case 66:if(typeof r=="number"&&r===66)return 1;break;case 67:if(typeof r=="number"&&r===67)return 1;break;case 68:if(typeof r=="number"&&r===68)return 1;break;case 69:if(typeof r=="number"&&r===69)return 1;break;case 70:if(typeof r=="number"&&r===70)return 1;break;case 71:if(typeof r=="number"&&r===71)return 1;break;case 72:if(typeof r=="number"&&r===72)return 1;break;case 73:if(typeof r=="number"&&r===73)return 1;break;case 74:if(typeof r=="number"&&r===74)return 1;break;case 75:if(typeof r=="number"&&r===75)return 1;break;case 76:if(typeof r=="number"&&r===76)return 1;break;case 77:if(typeof r=="number"&&r===77)return 1;break;case 78:if(typeof r=="number"&&r===78)return 1;break;case 79:if(typeof r=="number"&&r===79)return 1;break;case 80:if(typeof r=="number"&&r===80)return 1;break;case 81:if(typeof r=="number"&&r===81)return 1;break;case 82:if(typeof r=="number"&&r===82)return 1;break;case 83:if(typeof r=="number"&&r===83)return 1;break;case 84:if(typeof r=="number"&&r===84)return 1;break;case 85:if(typeof r=="number"&&r===85)return 1;break;case 86:if(typeof r=="number"&&r===86)return 1;break;case 87:if(typeof r=="number"&&r===87)return 1;break;case 88:if(typeof r=="number"&&r===88)return 1;break;case 89:if(typeof r=="number"&&r===89)return 1;break;case 90:if(typeof r=="number"&&r===90)return 1;break;case 91:if(typeof r=="number"&&r===91)return 1;break;case 92:if(typeof r=="number"&&r===92)return 1;break;case 93:if(typeof r=="number"&&r===93)return 1;break;case 94:if(typeof r=="number"&&r===94)return 1;break;case 95:if(typeof r=="number"&&r===95)return 1;break;case 96:if(typeof r=="number"&&r===96)return 1;break;case 97:if(typeof r=="number"&&r===97)return 1;break;default:if(typeof r=="number"&&r===98)return 1}else if(33<=e)switch(e){case 33:if(typeof r=="number"&&r===33)return 1;break;case 34:if(typeof r=="number"&&r===34)return 1;break;case 35:if(typeof r=="number"&&r===35)return 1;break;case 36:if(typeof r=="number"&&r===36)return 1;break;case 37:if(typeof r=="number"&&r===37)return 1;break;case 38:if(typeof r=="number"&&r===38)return 1;break;case 39:if(typeof r=="number"&&r===39)return 1;break;case 40:if(typeof r=="number"&&r===40)return 1;break;case 41:if(typeof r=="number"&&r===41)return 1;break;case 42:if(typeof r=="number"&&r===42)return 1;break;case 43:if(typeof r=="number"&&r===43)return 1;break;case 44:if(typeof r=="number"&&r===44)return 1;break;case 45:if(typeof r=="number"&&r===45)return 1;break;case 46:if(typeof r=="number"&&r===46)return 1;break;case 47:if(typeof r=="number"&&r===47)return 1;break;case 48:if(typeof r=="number"&&r===48)return 1;break;case 49:if(typeof r=="number"&&r===49)return 1;break;case 50:if(typeof r=="number"&&r===50)return 1;break;case 51:if(typeof r=="number"&&r===51)return 1;break;case 52:if(typeof r=="number"&&r===52)return 1;break;case 53:if(typeof r=="number"&&r===53)return 1;break;case 54:if(typeof r=="number"&&r===54)return 1;break;case 55:if(typeof r=="number"&&r===55)return 1;break;case 56:if(typeof r=="number"&&r===56)return 1;break;case 57:if(typeof r=="number"&&r===57)return 1;break;case 58:if(typeof r=="number"&&r===58)return 1;break;case 59:if(typeof r=="number"&&r===59)return 1;break;case 60:if(typeof r=="number"&&r===60)return 1;break;case 61:if(typeof r=="number"&&r===61)return 1;break;case 62:if(typeof r=="number"&&r===62)return 1;break;case 63:if(typeof r=="number"&&r===63)return 1;break;case 64:if(typeof r=="number"&&r===64)return 1;break;default:if(typeof r=="number"&&r===65)return 1}else switch(e){case 0:if(typeof r=="number"&&!r)return 1;break;case 1:if(typeof r=="number"&&r===1)return 1;break;case 2:if(typeof r=="number"&&r===2)return 1;break;case 3:if(typeof r=="number"&&r===3)return 1;break;case 4:if(typeof r=="number"&&r===4)return 1;break;case 5:if(typeof r=="number"&&r===5)return 1;break;case 6:if(typeof r=="number"&&r===6)return 1;break;case 7:if(typeof r=="number"&&r===7)return 1;break;case 8:if(typeof r=="number"&&r===8)return 1;break;case 9:if(typeof r=="number"&&r===9)return 1;break;case 10:if(typeof r=="number"&&r===10)return 1;break;case 11:if(typeof r=="number"&&r===11)return 1;break;case 12:if(typeof r=="number"&&r===12)return 1;break;case 13:if(typeof r=="number"&&r===13)return 1;break;case 14:if(typeof r=="number"&&r===14)return 1;break;case 15:if(typeof r=="number"&&r===15)return 1;break;case 16:if(typeof r=="number"&&r===16)return 1;break;case 17:if(typeof r=="number"&&r===17)return 1;break;case 18:if(typeof r=="number"&&r===18)return 1;break;case 19:if(typeof r=="number"&&r===19)return 1;break;case 20:if(typeof r=="number"&&r===20)return 1;break;case 21:if(typeof r=="number"&&r===21)return 1;break;case 22:if(typeof r=="number"&&r===22)return 1;break;case 23:if(typeof r=="number"&&r===23)return 1;break;case 24:if(typeof r=="number"&&r===24)return 1;break;case 25:if(typeof r=="number"&&r===25)return 1;break;case 26:if(typeof r=="number"&&r===26)return 1;break;case 27:if(typeof r=="number"&&r===27)return 1;break;case 28:if(typeof r=="number"&&r===28)return 1;break;case 29:if(typeof r=="number"&&r===29)return 1;break;case 30:if(typeof r=="number"&&r===30)return 1;break;case 31:if(typeof r=="number"&&r===31)return 1;break;default:if(typeof r=="number"&&r===32)return 1}}else switch(x[0]){case 0:if(typeof r!="number"&&r[0]===0){var t=r[2],u=r[1],i=x[2],f=l(l(xI,x[1]),u);return f&&Ar(i,t)}break;case 1:if(typeof r!="number"&&r[0]===1){var o=r[2],a=r[1],d=x[2],k=l(l(rI,x[1]),a);return k&&Ar(d,o)}break;case 2:if(typeof r!="number"&&r[0]===2){var T=r[1],g=x[1],A=T[4],N=T[3],R=T[2],O=g[4],M=g[3],L=g[2],z=Mo(g[1],T[1]),V=z&&Ar(L,R),Z=V&&Ar(M,N);return Z&&(O===A?1:0)}break;case 3:if(typeof r!="number"&&r[0]===3){var $=r[1],i0=x[1],U=$[5],J=$[4],Y=$[3],F=$[2],n0=i0[5],Q=i0[4],f0=i0[3],s0=i0[2],v0=Mo(i0[1],$[1]),o0=v0&&Ar(s0,F),c0=o0&&Ar(f0,Y),T0=c0&&(Q===J?1:0);return T0&&(n0===U?1:0)}break;case 4:if(typeof r!="number"&&r[0]===4){var E0=r[3],M0=r[2],Y0=x[3],rx=x[2],g0=Mo(x[1],r[1]),H0=g0&&Ar(rx,M0);return H0&&Ar(Y0,E0)}break;case 5:if(typeof r!="number"&&r[0]===5){var t0=r[3],ex=r[2],xx=x[3],ax=x[2],dx=Mo(x[1],r[1]),mx=dx&&Ar(ax,ex);return mx&&Ar(xx,t0)}break;case 6:if(typeof r!="number"&&r[0]===6){var L0=r[2],C0=x[2],A0=Mo(x[1],r[1]);return A0&&Ar(C0,L0)}break;case 7:if(typeof r!="number"&&r[0]===7)return Ar(x[1],r[1]);break;case 8:if(typeof r!="number"&&r[0]===8){var U0=Ar(x[1],r[1]),Q0=r[2],H=x[2];return U0&&Mo(H,Q0)}break;case 9:if(typeof r!="number"&&r[0]===9){var b=r[3],B=r[2],a0=x[3],m0=x[2],P0=Mo(x[1],r[1]),D=P0&&Ar(m0,B);return D&&Ar(a0,b)}break;case 10:if(typeof r!="number"&&r[0]===10){var N0=r[3],X0=r[2],D0=x[3],ox=x[2],b0=Mo(x[1],r[1]),kx=b0&&Ar(ox,X0);return kx&&Ar(D0,N0)}break;case 11:if(typeof r!="number"&&r[0]===11){var V0=r[1];return l(l(DJ,x[1]),V0)}break;case 12:if(typeof r!="number"&&r[0]===12){var h=r[3],X=r[2],W0=r[1],sx=x[3],tx=x[2],j0=l(l(xI,x[1]),W0),Px=j0&&(tx==X?1:0);return Px&&Ar(sx,h)}break;default:if(typeof r!="number"&&r[0]===13){var Ex=r[2],Ix=x[2],qx=r[3],B0=r[1],tr=x[3],Ux=l(l(rI,x[1]),B0);if(Ux){var K0=0;if(Ix)if(Ex)var ur=Cl(Ix[1],Ex[1]);else K0=1;else if(Ex)K0=1;else var ur=1;if(K0)var ur=0;var z0=ur}else var z0=Ux;return z0&&Ar(tr,qx)}}return 0}),O0(DJ,function(x,r){if(x){if(r)return 1}else if(!r)return 1;return 0}),O0(xI,function(x,r){switch(x){case 0:if(!r)return 1;break;case 1:if(r===1)return 1;break;case 2:if(r===2)return 1;break;case 3:if(r===3)return 1;break;default:if(4<=r)return 1}return 0}),O0(rI,function(x,r){switch(x){case 0:if(!r)return 1;break;case 1:if(r===1)return 1;break;default:if(2<=r)return 1}return 0});var jJ=function(x){if(typeof x!="number")switch(x[0]){case 0:return Yt0;case 1:return Xt0;case 2:return Jt0;case 3:return Vt0;case 4:return zt0;case 5:return Kt0;case 6:return Zt0;case 7:return Wt0;case 8:return $t0;case 9:return Qt0;case 10:return Ft0;case 11:return Ht0;case 12:return qt0;default:return Gt0}var r=x;if(66<=r){if(99<=r)switch(r){case 99:return it0;case 100:return ft0;case 101:return ct0;case 102:return st0;case 103:return ot0;case 104:return vt0;case 105:return at0;case 106:return lt0;case 107:return pt0;case 108:return dt0;case 109:return yt0;case 110:return mt0;case 111:return kt0;case 112:return ht0;case 113:return _t0;case 114:return wt0;case 115:return Tt0;case 116:return St0;case 117:return Et0;case 118:return gt0;case 119:return At0;case 120:return Pt0;case 121:return Ct0;case 122:return Nt0;case 123:return Rt0;case 124:return Ot0;case 125:return It0;case 126:return Lt0;case 127:return Mt0;case 128:return Dt0;case 129:return jt0;case 130:return Ut0;default:return Bt0}switch(r){case 66:return Pe0;case 67:return Ce0;case 68:return Ne0;case 69:return Re0;case 70:return Oe0;case 71:return Ie0;case 72:return Le0;case 73:return Me0;case 74:return De0;case 75:return je0;case 76:return Ue0;case 77:return Be0;case 78:return Ye0;case 79:return Xe0;case 80:return Je0;case 81:return Ve0;case 82:return ze0;case 83:return Ke0;case 84:return Ze0;case 85:return We0;case 86:return $e0;case 87:return Qe0;case 88:return Fe0;case 89:return He0;case 90:return qe0;case 91:return Ge0;case 92:return be0;case 93:return xt0;case 94:return rt0;case 95:return et0;case 96:return tt0;case 97:return nt0;default:return ut0}}if(33<=r)switch(r){case 33:return Q20;case 34:return F20;case 35:return H20;case 36:return q20;case 37:return G20;case 38:return b20;case 39:return xe0;case 40:return re0;case 41:return ee0;case 42:return te0;case 43:return ne0;case 44:return ue0;case 45:return ie0;case 46:return fe0;case 47:return ce0;case 48:return se0;case 49:return oe0;case 50:return ve0;case 51:return ae0;case 52:return le0;case 53:return pe0;case 54:return de0;case 55:return ye0;case 56:return me0;case 57:return ke0;case 58:return he0;case 59:return _e0;case 60:return we0;case 61:return Te0;case 62:return Se0;case 63:return Ee0;case 64:return ge0;default:return Ae0}switch(r){case 0:return d20;case 1:return y20;case 2:return m20;case 3:return k20;case 4:return h20;case 5:return _20;case 6:return w20;case 7:return T20;case 8:return S20;case 9:return E20;case 10:return g20;case 11:return A20;case 12:return P20;case 13:return C20;case 14:return N20;case 15:return R20;case 16:return O20;case 17:return I20;case 18:return L20;case 19:return M20;case 20:return D20;case 21:return j20;case 22:return U20;case 23:return B20;case 24:return Y20;case 25:return X20;case 26:return J20;case 27:return V20;case 28:return z20;case 29:return K20;case 30:return Z20;case 31:return W20;default:return $20}},eI=function(x){if(typeof x!="number")switch(x[0]){case 0:return x[2];case 1:return x[2];case 2:return x[1][3];case 3:var r=x[1],e=r[5],t=r[4],u=r[3];return t&&e?Qx(n20,Qx(u,t20)):t?Qx(i20,Qx(u,u20)):e?Qx(c20,Qx(u,f20)):Qx(o20,Qx(u,s20));case 4:return x[3];case 5:var i=x[2];return Qx(a20,Qx(i,Qx(v20,x[3])));case 6:return x[2];case 7:return x[1];case 8:return x[1];case 9:return x[3];case 10:return x[3];case 11:return x[1]?l20:p20;case 12:return x[3];default:return x[3]}var f=x;if(66<=f){if(99<=f)switch(f){case 99:return E10;case 100:return g10;case 101:return A10;case 102:return P10;case 103:return C10;case 104:return N10;case 105:return R10;case 106:return O10;case 107:return I10;case 108:return L10;case 109:return M10;case 110:return D10;case 111:return j10;case 112:return U10;case 113:return B10;case 114:return Y10;case 115:return X10;case 116:return J10;case 117:return V10;case 118:return z10;case 119:return K10;case 120:return Z10;case 121:return W10;case 122:return $10;case 123:return Q10;case 124:return F10;case 125:return H10;case 126:return q10;case 127:return G10;case 128:return b10;case 129:return x20;case 130:return r20;default:return e20}switch(f){case 66:return Zr0;case 67:return Wr0;case 68:return $r0;case 69:return Qr0;case 70:return Fr0;case 71:return Hr0;case 72:return qr0;case 73:return Gr0;case 74:return br0;case 75:return x10;case 76:return r10;case 77:return e10;case 78:return t10;case 79:return n10;case 80:return u10;case 81:return i10;case 82:return f10;case 83:return c10;case 84:return s10;case 85:return o10;case 86:return v10;case 87:return a10;case 88:return l10;case 89:return p10;case 90:return d10;case 91:return y10;case 92:return m10;case 93:return k10;case 94:return h10;case 95:return _10;case 96:return w10;case 97:return T10;default:return S10}}if(33<=f)switch(f){case 33:return ar0;case 34:return lr0;case 35:return pr0;case 36:return dr0;case 37:return yr0;case 38:return mr0;case 39:return kr0;case 40:return hr0;case 41:return _r0;case 42:return wr0;case 43:return Tr0;case 44:return Sr0;case 45:return Er0;case 46:return gr0;case 47:return Ar0;case 48:return Pr0;case 49:return Cr0;case 50:return Nr0;case 51:return Rr0;case 52:return Or0;case 53:return Ir0;case 54:return Lr0;case 55:return Mr0;case 56:return Dr0;case 57:return jr0;case 58:return Ur0;case 59:return Br0;case 60:return Yr0;case 61:return Xr0;case 62:return Jr0;case 63:return Vr0;case 64:return zr0;default:return Kr0}switch(f){case 0:return Lx0;case 1:return Mx0;case 2:return Dx0;case 3:return jx0;case 4:return Ux0;case 5:return Bx0;case 6:return Yx0;case 7:return Xx0;case 8:return Jx0;case 9:return Vx0;case 10:return zx0;case 11:return Kx0;case 12:return Zx0;case 13:return Wx0;case 14:return $x0;case 15:return Qx0;case 16:return Fx0;case 17:return Hx0;case 18:return qx0;case 19:return Gx0;case 20:return bx0;case 21:return xr0;case 22:return rr0;case 23:return er0;case 24:return tr0;case 25:return nr0;case 26:return ur0;case 27:return ir0;case 28:return fr0;case 29:return cr0;case 30:return sr0;case 31:return or0;default:return vr0}},gy=function(x){return l(Tr(Ix0),x)},tI=function(x,r){var e=x?x[1]:0,t=0;if(typeof r=="number")if(Nr===r)var u=yx0,i=mx0;else t=1;else switch(r[0]){case 3:var u=kx0,i=hx0;break;case 5:var u=_x0,i=wx0;break;case 0:case 12:var u=Sx0,i=Ex0;break;case 1:case 13:var u=gx0,i=Ax0;break;case 4:case 8:var u=Nx0,i=Rx0;break;case 6:case 7:case 11:t=1;break;default:var u=Px0,i=Cx0}if(t)var u=Tx0,i=gy(eI(r));return e?Qx(u,Qx(Ox0,i)):i},wS0=function(x){return Rv>>0)var t=_(x);else switch(e){case 0:var t=1;break;case 1:var t=2;break;case 2:var t=0;break;default:if(r0(x,2),Xo(m(x))===0){var u=Vv(m(x));if(u===0)var t=Pr(m(x))===0&&Pr(m(x))===0&&Pr(m(x))===0?0:_(x);else if(u===1&&Pr(m(x))===0)for(;;){var i=Jv(m(x));if(i!==0){var t=i===1?0:_(x);break}}else var t=_(x)}else var t=_(x)}if(2>>0)throw q0([0,wr,bt0],1);switch(t){case 0:continue;case 1:return 1;default:if(GO(aJ(x)))continue;return pJ(x,1),0}}},Hy=function(x,r){var e=r-x[3][2]|0;return[0,MJ(x),e]},t6=function(x,r,e){var t=Hy(x,e),u=Hy(x,r);return[0,x[1],u,t]},h2=function(x,r){return Hy(x,r[6])},pe=function(x,r){return Hy(x,r[3])},Vr=function(x,r){return t6(x,r[6],r[3])},iV=function(x,r){var e=0;if(typeof r=="number")e=1;else switch(r[0]){case 2:var t=r[1][1];break;case 3:return r[1][1];case 4:var t=r[1];break;case 5:return r[1];case 8:var t=r[2];break;case 9:return r[1];case 10:return r[1];default:e=1}return e?Vr(x,x[2]):t},_2=function(x,r,e){return[0,x[1],x[2],x[3],x[4],x[5],[0,[0,r,e],x[6]],x[7]]},fV=function(x,r,e){return _2(x,r,[24,gy(e)])},sI=function(x,r,e,t){return _2(x,r,[25,e,t])},pt=function(x,r){return _2(x,r,ks0)},z2=function(x,r){var e=r[3],t=[0,MJ(x)+1|0,e];return[0,x[1],x[2],t,x[4],x[5],x[6],x[7]]},zt=function(x,r,e,t,u){var i=[0,x[1],r,e],f=Y1(t),o=u?0:1;return[0,i,[0,o,f,x[7][3][1]>>0)var a=_(t);else switch(o){case 0:var a=2;break;case 1:for(;;){r0(t,3);var d=m(t),k=-1>>0)return Nx(vs0);switch(a){case 0:var A=sV(i,e,t,2,0),N=A[1],R=ot(Qx(as0,A[2])),O=0<=R?1:0,M=O&&(R<=55295?1:0);if(M)var z=M;else var L=57344<=R?1:0,z=L&&(R<=_5?1:0);var V=z?cV(i,N,R):_2(i,N,32);is(u,R);var i=V;continue;case 1:var Z=sV(i,e,t,3,1),$=Z[1],i0=ot(Qx(ls0,Z[2])),U=cV(i,$,i0);is(u,i0);var i=U;continue;case 2:return[0,i,Y1(u)];default:wy(t,u);continue}}},C1=function(x,r,e){var t=pt(x,Vr(x,r));return qa(r),p(e,t,r)},Kv=function(x,r,e){for(var t=x;;){yr(e);var u=m(e),i=-1>>0)var f=_(e);else switch(i){case 0:for(;;){r0(e,3);var o=m(e),a=-1>>0){var T=pt(t,Vr(t,e));return[0,T,pe(T,e)]}switch(f){case 0:var g=z2(t,e);wy(e,r);var t=g;continue;case 1:var A=t[4]?sI(t,Vr(t,e),en0,rn0):t;return[0,A,pe(A,e)];case 2:if(t[4])return[0,t,pe(t,e)];vr(r,tn0);continue;default:wy(e,r);continue}}},e3=function(x,r,e){for(;;){yr(e);var t=m(e),u=13>>0)var i=_(e);else switch(u){case 0:var i=0;break;case 1:for(;;){r0(e,2);var f=m(e),o=-1>>0)return Nx(nn0);switch(i){case 0:return[0,x,pe(x,e)];case 1:var a=pe(x,e),d=a[2],k=a[1],T=z2(x,e);return[0,T,[0,k,d-_y(e)|0]];default:wy(e,r);continue}}},vV=function(x,r){function e($){return r0($,3),V2(m($))===0?2:_($)}yr(r);var t=m(r),u=Lf>>0)var i=_(r);else switch(u){case 0:var i=0;break;case 1:var i=16;break;case 2:var i=15;break;case 3:r0(r,15);var i=le(m(r))===0?15:_(r);break;case 4:r0(r,4);var i=V2(m(r))===0?e(r):_(r);break;case 5:r0(r,11);var i=V2(m(r))===0?e(r):_(r);break;case 6:var i=0;break;case 7:var i=5;break;case 8:var i=6;break;case 9:var i=7;break;case 10:var i=8;break;case 11:var i=9;break;case 12:r0(r,14);var f=Vv(m(r));if(f===0)var i=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?12:_(r);else if(f===1&&Pr(m(r))===0)for(;;){var o=Jv(m(r));if(o!==0){var i=o===1?13:_(r);break}}else var i=_(r);break;case 13:var i=10;break;default:r0(r,14);var i=Pr(m(r))===0&&Pr(m(r))===0?1:_(r)}if(16>>0)return Nx(qc0);switch(i){case 0:var a=Jx(r);return[0,x,a,n1(r),0];case 1:var d=Jx(r);return[0,x,d,[0,ot(Qx(Gc0,d))],0];case 2:var k=Jx(r),T=ot(Qx(bc0,k));return H3<=T?[0,x,k,[0,T>>>3|0,48+(T&7)|0],1]:[0,x,k,[0,T],1];case 3:var g=Jx(r);return[0,x,g,[0,ot(Qx(xs0,g))],1];case 4:return[0,x,rs0,[0,0],0];case 5:return[0,x,es0,[0,8],0];case 6:return[0,x,ts0,[0,12],0];case 7:return[0,x,ns0,[0,10],0];case 8:return[0,x,us0,[0,13],0];case 9:return[0,x,is0,[0,9],0];case 10:return[0,x,fs0,[0,11],0];case 11:var A=Jx(r);return[0,x,A,[0,ot(Qx(cs0,A))],1];case 12:var N=Jx(r);return[0,x,N,[0,ot(Qx(ss0,m2(N,1,Xx(N)-1|0)))],0];case 13:var R=Jx(r),O=ot(Qx(os0,m2(R,2,Xx(R)-3|0))),M=_5>>0)var k=_(i);else switch(d){case 0:var k=3;break;case 1:for(;;){r0(i,4);var T=m(i),g=-1>>0)return Nx(un0);switch(k){case 0:var A=Jx(i);if(vr(t,A),Ar(r,A))return[0,f,pe(f,i),o];vr(e,A);continue;case 1:vr(t,in0);var N=vV(f,i),R=N[4],O=N[3],M=N[2],L=N[1],z=R||o;vr(t,M),yX(function(f0){return is(e,f0)},O);var f=L,o=z;continue;case 2:var V=Jx(i);vr(t,V);var Z=z2(pt(f,Vr(f,i)),i);return vr(e,V),[0,Z,pe(Z,i),o];case 3:var $=Jx(i);vr(t,$);var i0=pt(f,Vr(f,i));return vr(e,$),[0,i0,pe(i0,i),o];default:var U=i[6],J=i[3]-U|0,Y=S1(J*4|0),F=Hl(i[1],U,J,Y);kO(t,Y,0,F),kO(e,Y,0,F);continue}}},lV=function(x,r,e,t){for(var u=x;;){yr(t);var i=m(t),f=96>>0)var o=_(t);else switch(f){case 0:var o=0;break;case 1:for(;;){r0(t,6);var a=m(t),d=-1>>0)return Nx(fn0);switch(o){case 0:return[0,pt(u,Vr(u,t)),1];case 1:return[0,u,1];case 2:return[0,u,0];case 3:at(e,92);var g=vV(u,t),A=g[3],N=g[1];vr(e,g[2]),yX(function(M){return is(r,M)},A);var u=N;continue;case 4:vr(e,cn0),vr(r,sn0);var u=z2(u,t);continue;case 5:vr(e,Jx(t)),at(r,10);var u=z2(u,t);continue;default:var R=Jx(t);vr(e,R),vr(r,R);continue}}},ES0=function(x,r){function e(w){for(;;)if(r0(w,33),ar(m(w))!==0)return _(w)}function t(w){r0(w,32);var x0=M1(m(w));if(x0!==0)return x0===1?e(w):_(w);for(;;)if(r0(w,30),ar(m(w))!==0)return _(w)}function u(w){r0(w,31);var x0=M1(m(w));if(x0!==0)return x0===1?e(w):_(w);for(;;)if(r0(w,29),ar(m(w))!==0)return _(w)}function i(w){r0(w,34);var x0=ba(m(w));if(2>>0)return _(w);switch(x0){case 0:return e(w);case 1:for(;;){r0(w,34);var e0=os(m(w));if(3>>0)return _(w);switch(e0){case 0:return e(w);case 1:continue;case 2:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var S0=os(m(w));if(3>>0)return _(w);switch(S0){case 0:return e(w);case 1:continue;case 2:continue x;default:return u(w)}}}default:return u(w)}}default:return u(w)}}function f(w){x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var x0=HJ(m(w));if(4>>0)return _(w);switch(x0){case 0:return e(w);case 1:return i(w);case 2:continue;case 3:continue x;default:return t(w)}}}}function o(w){for(;;)if(r0(w,23),ar(m(w))!==0)return _(w)}function a(w){for(;;)if(r0(w,23),ar(m(w))!==0)return _(w)}function d(w){for(;;)if(r0(w,15),ar(m(w))!==0)return _(w)}function k(w){for(;;)if(r0(w,15),ar(m(w))!==0)return _(w)}function T(w){for(;;)if(r0(w,11),ar(m(w))!==0)return _(w)}function g(w){for(;;)if(r0(w,11),ar(m(w))!==0)return _(w)}function A(w){for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}function N(w){for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}function R(w){for(;;)if(r0(w,19),ar(m(w))!==0)return _(w)}function O(w){for(;;)if(r0(w,27),ar(m(w))!==0)return _(w)}function M(w){r0(w,26);var x0=M1(m(w));if(x0!==0)return x0===1?O(w):_(w);for(;;)if(r0(w,25),ar(m(w))!==0)return _(w)}function L(w){for(;;)if(r0(w,27),ar(m(w))!==0)return _(w)}function z(w){r0(w,26);var x0=M1(m(w));if(x0!==0)return x0===1?L(w):_(w);for(;;)if(r0(w,25),ar(m(w))!==0)return _(w)}function V(w){x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,28);var x0=os(m(w));if(3>>0)return _(w);switch(x0){case 0:return L(w);case 1:continue;case 2:continue x;default:return z(w)}}}}function Z(w){r0(w,33);var x0=GJ(m(w));if(3>>0)return _(w);switch(x0){case 0:return e(w);case 1:var e0=jo(m(w));if(e0===0)for(;;){r0(w,28);var S0=ba(m(w));if(2>>0)return _(w);switch(S0){case 0:return L(w);case 1:continue;default:return z(w)}}if(e0!==1)return _(w);for(;;){r0(w,28);var G=os(m(w));if(3>>0)return _(w);switch(G){case 0:return L(w);case 1:continue;case 2:return V(w);default:return z(w)}}case 2:for(;;){r0(w,28);var k0=ba(m(w));if(2>>0)return _(w);switch(k0){case 0:return O(w);case 1:continue;default:return M(w)}}default:for(;;){r0(w,28);var J0=os(m(w));if(3>>0)return _(w);switch(J0){case 0:return O(w);case 1:continue;case 2:return V(w);default:return M(w)}}}}function $(w){r0(w,34);var x0=VJ(m(w));if(3>>0)return _(w);switch(x0){case 0:return e(w);case 1:for(;;){r0(w,34);var e0=Uo(m(w));if(4>>0)return _(w);switch(e0){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var S0=Uo(m(w));if(4>>0)return _(w);switch(S0){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:continue x;default:return u(w)}}}default:return u(w)}}case 2:return Z(w);default:return u(w)}}function i0(w){return zy(m(w))===0&&Yy(m(w))===0&&xV(m(w))===0&&KJ(m(w))===0&&ZJ(m(w))===0&&By(m(w))===0&&r6(m(w))===0&&zy(m(w))===0&&Xo(m(w))===0&&cI(m(w))===0&&zv(m(w))===0?3:_(w)}function U(w){return r0(w,3),tV(m(w))===0?3:_(w)}function J(w){var x0=wS0(m(w));if(36>>0)return _(w);switch(x0){case 0:return 98;case 1:return 99;case 2:if(r0(w,1),cs(m(w))!==0)return _(w);for(;;)if(r0(w,1),cs(m(w))!==0)return _(w);case 3:return 0;case 4:return r0(w,0),le(m(w))===0?0:_(w);case 5:return r0(w,88),Tn(m(w))===0?(r0(w,58),Tn(m(w))===0?54:_(w)):_(w);case 6:return 7;case 7:r0(w,95);var e0=m(w),S0=32>>0)return _(w);switch(J0){case 0:return r0(w,83),Tn(m(w))===0?70:_(w);case 1:return 4;default:return 69}case 14:r0(w,80);var I0=m(w),ix=42>>0)return _(w);switch($x){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var nr=Uo(m(w));if(4>>0)return _(w);switch(nr){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:continue x;default:return u(w)}}}default:return u(w)}}case 18:r0(w,93);var Zx=zJ(m(w));if(2>>0)return _(w);switch(Zx){case 0:r0(w,2);var Lr=Iy(m(w));if(2>>0)return _(w);switch(Lr){case 0:for(;;){var Yx=Iy(m(w));if(2>>0)return _(w);switch(Yx){case 0:continue;case 1:return U(w);default:return i0(w)}}case 1:return U(w);default:return i0(w)}case 1:return 5;default:return 92}case 19:r0(w,34);var ue=$J(m(w));if(8>>0)return _(w);switch(ue){case 0:return e(w);case 1:return $(w);case 2:for(;;){r0(w,20);var Qt=bJ(m(w));if(4>>0)return _(w);switch(Qt){case 0:return R(w);case 1:return i(w);case 2:continue;case 3:for(;;){r0(w,18);var S2=Oy(m(w));if(3>>0)return _(w);switch(S2){case 0:return N(w);case 1:return i(w);case 2:continue;default:r0(w,17);var Ze=M1(m(w));if(Ze!==0)return Ze===1?N(w):_(w);for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}}default:r0(w,19);var fo=M1(m(w));if(fo!==0)return fo===1?R(w):_(w);for(;;)if(r0(w,19),ar(m(w))!==0)return _(w)}}case 3:for(;;){r0(w,18);var gn=Oy(m(w));if(3>>0)return _(w);switch(gn){case 0:return A(w);case 1:return i(w);case 2:continue;default:r0(w,17);var ds=M1(m(w));if(ds!==0)return ds===1?A(w):_(w);for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}}case 4:r0(w,33);var ye=WJ(m(w));if(ye===0)return e(w);if(ye!==1)return _(w);for(;;){r0(w,12);var An=$y(m(w));if(3>>0)return _(w);switch(An){case 0:return g(w);case 1:continue;case 2:x:for(;;){if(ss(m(w))!==0)return _(w);for(;;){r0(w,12);var Ft=$y(m(w));if(3>>0)return _(w);switch(Ft){case 0:return T(w);case 1:continue;case 2:continue x;default:r0(w,10);var We=M1(m(w));if(We!==0)return We===1?T(w):_(w);for(;;)if(r0(w,9),ar(m(w))!==0)return _(w)}}}default:r0(w,10);var Ht=M1(m(w));if(Ht!==0)return Ht===1?g(w):_(w);for(;;)if(r0(w,9),ar(m(w))!==0)return _(w)}}case 5:return Z(w);case 6:r0(w,33);var dr=QJ(m(w));if(dr===0)return e(w);if(dr!==1)return _(w);for(;;){r0(w,16);var yt=Zy(m(w));if(3>>0)return _(w);switch(yt){case 0:return k(w);case 1:continue;case 2:x:for(;;){if(V2(m(w))!==0)return _(w);for(;;){r0(w,16);var Qo=Zy(m(w));if(3>>0)return _(w);switch(Qo){case 0:return d(w);case 1:continue;case 2:continue x;default:r0(w,14);var me=M1(m(w));if(me!==0)return me===1?d(w):_(w);for(;;)if(r0(w,13),ar(m(w))!==0)return _(w)}}}default:r0(w,14);var Pn=M1(m(w));if(Pn!==0)return Pn===1?k(w):_(w);for(;;)if(r0(w,13),ar(m(w))!==0)return _(w)}}case 7:r0(w,33);var co=YJ(m(w));if(co===0)return e(w);if(co!==1)return _(w);for(;;){r0(w,24);var Fo=Qy(m(w));if(3>>0)return _(w);switch(Fo){case 0:return a(w);case 1:continue;case 2:x:for(;;){if(Pr(m(w))!==0)return _(w);for(;;){r0(w,24);var so=Qy(m(w));if(3>>0)return _(w);switch(so){case 0:return o(w);case 1:continue;case 2:continue x;default:r0(w,22);var oo=M1(m(w));if(oo!==0)return oo===1?o(w):_(w);for(;;)if(r0(w,21),ar(m(w))!==0)return _(w)}}}default:r0(w,22);var a2=M1(m(w));if(a2!==0)return a2===1?a(w):_(w);for(;;)if(r0(w,21),ar(m(w))!==0)return _(w)}}default:return t(w)}case 20:r0(w,34);var ys=My(m(w));if(5>>0)return _(w);switch(ys){case 0:return e(w);case 1:return $(w);case 2:for(;;){r0(w,34);var ke=My(m(w));if(5>>0)return _(w);switch(ke){case 0:return e(w);case 1:return $(w);case 2:continue;case 3:return Z(w);case 4:return f(w);default:return t(w)}}case 3:return Z(w);case 4:return f(w);default:return t(w)}case 21:return 46;case 22:return 44;case 23:r0(w,78);var Cn=m(w),Ho=59>>0)return Nx($c0);var F=Y;if(50>F)switch(F){case 0:return[2,z2(x,r)];case 1:return[2,x];case 2:var n0=h2(x,r),Q=Fr(Jr),f0=Kv(x,Q,r),s0=f0[1];return[1,s0,zt(s0,n0,f0[2],Q,1)];case 3:var v0=Jx(r);if(!x[5]){var o0=h2(x,r),c0=Fr(Jr);vr(c0,m2(v0,2,Xx(v0)-2|0));var T0=Kv(x,c0,r),E0=T0[1];return[1,E0,zt(E0,o0,T0[2],c0,1)]}var M0=x[4]?fV(x,Vr(x,r),v0):x,Y0=Ey(1,M0),rx=_y(r);return Ar(ql(r,rx-1|0,1),Iv)&&P(ql(r,rx-2|0,1),Iv)?[0,Y0,86]:[2,Y0];case 4:if(x[4])return[2,Ey(0,x)];qa(r),yr(r);var g0=JJ(m(r))===0?0:_(r);return g0===0?[0,x,f2]:Nx(Qc0);case 5:var H0=h2(x,r),t0=Fr(Jr),ex=e3(x,t0,r),xx=ex[1];return[1,xx,zt(xx,H0,ex[2],t0,0)];case 6:if(r[6]!==0)return[0,x,Fc0];var ax=h2(x,r),dx=Fr(Jr),mx=e3(x,dx,r),L0=mx[1],C0=[0,L0[1],ax,mx[2]];return[0,L0,[6,C0,Y1(dx)]];case 7:var A0=Jx(r),U0=h2(x,r),Q0=Fr(Jr),H=Fr(Jr);vr(H,A0);var b=aV(x,A0,Q0,H,0,r),B=b[1],a0=b[3],m0=[0,B[1],U0,b[2]],P0=Y1(H);return[0,B,[2,[0,m0,Y1(Q0),P0,a0]]];case 8:var D=Fr(Jr),N0=Fr(Jr),X0=h2(x,r),D0=lV(x,D,N0,r),ox=D0[1],b0=D0[2],kx=pe(ox,r),V0=[0,ox[1],X0,kx],h=Y1(N0);return[0,ox,[3,[0,V0,Y1(D),h,1,b0]]];case 9:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&jy(m(x0))===0&&ss(m(x0))===0)for(;;){var e0=Ny(m(x0));if(2>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(ss(m(x0))===0)for(;;){var S0=Ny(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,0,Jx(x0)]]:Nx(Wc0)});case 10:return[0,x,[1,0,Jx(r)]];case 11:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&jy(m(x0))===0&&ss(m(x0))===0)for(;;){r0(x0,0);var e0=Cy(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(ss(m(x0))===0)for(;;){r0(x0,0);var S0=Cy(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,0,Jx(x0)]]:Nx(Zc0)});case 12:return[0,x,[0,0,Jx(r)]];case 13:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&Jy(m(x0))===0&&V2(m(x0))===0)for(;;){var e0=Dy(m(x0));if(2>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(V2(m(x0))===0)for(;;){var S0=Dy(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,1,Jx(x0)]]:Nx(Kc0)});case 14:return[0,x,[1,1,Jx(r)]];case 15:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&Jy(m(x0))===0&&V2(m(x0))===0)for(;;){r0(x0,0);var e0=Ly(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(V2(m(x0))===0)for(;;){r0(x0,0);var S0=Ly(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,3,Jx(x0)]]:Nx(zc0)});case 16:return[0,x,[0,3,Jx(r)]];case 17:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0)for(;;){var e0=m(x0),S0=47>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(Pr(m(x0))===0)for(;;){var S0=Ry(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,2,Jx(x0)]]:Nx(Xc0)});case 22:return[0,x,[1,2,Jx(r)]];case 23:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&Ay(m(x0))===0&&Pr(m(x0))===0)for(;;){r0(x0,0);var e0=Ky(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(Pr(m(x0))===0)for(;;){r0(x0,0);var S0=Ky(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,4,Jx(x0)]]:Nx(Yc0)});case 24:return[0,x,[0,4,Jx(r)]];case 25:return C1(x,r,function(w,x0){function e0(Zx){for(;;){var Lr=Jt(m(Zx));if(2>>0)return _(Zx);switch(Lr){case 0:continue;case 1:x:for(;;){if(mr(m(Zx))!==0)return _(Zx);for(;;){var Yx=Jt(m(Zx));if(2>>0)return _(Zx);switch(Yx){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function S0(Zx){for(;;){var Lr=x3(m(Zx));if(Lr!==0)return Lr===1?0:_(Zx)}}function G(Zx){var Lr=Fy(m(Zx));if(2>>0)return _(Zx);switch(Lr){case 0:var Yx=jo(m(Zx));return Yx===0?S0(Zx):Yx===1?e0(Zx):_(Zx);case 1:return S0(Zx);default:return e0(Zx)}}function k0(Zx){var Lr=Vy(m(Zx));if(Lr!==0)return Lr===1?G(Zx):_(Zx);for(;;){var Yx=te(m(Zx));if(2>>0)return _(Zx);switch(Yx){case 0:continue;case 1:return G(Zx);default:x:for(;;){if(mr(m(Zx))!==0)return _(Zx);for(;;){var ue=te(m(Zx));if(2>>0)return _(Zx);switch(ue){case 0:continue;case 1:return G(Zx);default:continue x}}}}}}yr(x0);var J0=Do(m(x0));if(2>>0)var I0=_(x0);else switch(J0){case 0:if(mr(m(x0))===0)for(;;){var ix=te(m(x0));if(2>>0)var I0=_(x0);else switch(ix){case 0:continue;case 1:var I0=G(x0);break;default:x:for(;;){if(mr(m(x0))===0)for(;;){var Wx=te(m(x0));if(2>>0)var Bx=_(x0);else switch(Wx){case 0:continue;case 1:var Bx=G(x0);break;default:continue x}break}else var Bx=_(x0);var I0=Bx;break}}break}else var I0=_(x0);break;case 1:var Hx=Py(m(x0)),I0=Hx===0?k0(x0):Hx===1?G(x0):_(x0);break;default:for(;;){var $x=Xy(m(x0));if(2<$x>>>0)var I0=_(x0);else switch($x){case 0:var I0=k0(x0);break;case 1:continue;default:var I0=G(x0)}break}}if(I0!==0)return Nx(Bc0);var nr=_2(w,Vr(w,x0),48);return[0,nr,[1,2,Jx(x0)]]});case 26:var X=_2(x,Vr(x,r),48);return[0,X,[1,2,Jx(r)]];case 27:return C1(x,r,function(w,x0){function e0(nr){for(;;){r0(nr,0);var Zx=Bo(m(nr));if(Zx!==0){if(Zx!==1)return _(nr);x:for(;;){if(mr(m(nr))!==0)return _(nr);for(;;){r0(nr,0);var Lr=Bo(m(nr));if(Lr!==0){if(Lr===1)continue x;return _(nr)}}}}}}function S0(nr){for(;;)if(r0(nr,0),mr(m(nr))!==0)return _(nr)}function G(nr){var Zx=Fy(m(nr));if(2>>0)return _(nr);switch(Zx){case 0:var Lr=jo(m(nr));return Lr===0?S0(nr):Lr===1?e0(nr):_(nr);case 1:return S0(nr);default:return e0(nr)}}function k0(nr){var Zx=Vy(m(nr));if(Zx!==0)return Zx===1?G(nr):_(nr);for(;;){var Lr=te(m(nr));if(2>>0)return _(nr);switch(Lr){case 0:continue;case 1:return G(nr);default:x:for(;;){if(mr(m(nr))!==0)return _(nr);for(;;){var Yx=te(m(nr));if(2>>0)return _(nr);switch(Yx){case 0:continue;case 1:return G(nr);default:continue x}}}}}}yr(x0);var J0=Do(m(x0));if(2>>0)var I0=_(x0);else switch(J0){case 0:if(mr(m(x0))===0)for(;;){var ix=te(m(x0));if(2>>0)var I0=_(x0);else switch(ix){case 0:continue;case 1:var I0=G(x0);break;default:x:for(;;){if(mr(m(x0))===0)for(;;){var Wx=te(m(x0));if(2>>0)var Bx=_(x0);else switch(Wx){case 0:continue;case 1:var Bx=G(x0);break;default:continue x}break}else var Bx=_(x0);var I0=Bx;break}}break}else var I0=_(x0);break;case 1:var Hx=Py(m(x0)),I0=Hx===0?k0(x0):Hx===1?G(x0):_(x0);break;default:for(;;){var $x=Xy(m(x0));if(2<$x>>>0)var I0=_(x0);else switch($x){case 0:var I0=k0(x0);break;case 1:continue;default:var I0=G(x0)}break}}return I0===0?[0,w,[0,4,Jx(x0)]]:Nx(Uc0)});case 28:return[0,x,[0,4,Jx(r)]];case 29:return C1(x,r,function(w,x0){function e0(Hx){for(;;){var $x=Jt(m(Hx));if(2<$x>>>0)return _(Hx);switch($x){case 0:continue;case 1:x:for(;;){if(mr(m(Hx))!==0)return _(Hx);for(;;){var nr=Jt(m(Hx));if(2>>0)return _(Hx);switch(nr){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function S0(Hx){var $x=x3(m(Hx));return $x===0?e0(Hx):$x===1?0:_(Hx)}yr(x0);var G=Do(m(x0));if(2>>0)var k0=_(x0);else switch(G){case 0:var k0=mr(m(x0))===0?e0(x0):_(x0);break;case 1:for(;;){var J0=r3(m(x0));if(J0===0)var k0=S0(x0);else{if(J0===1)continue;var k0=_(x0)}break}break;default:for(;;){var I0=Yo(m(x0));if(2>>0)var k0=_(x0);else switch(I0){case 0:var k0=S0(x0);break;case 1:continue;default:x:for(;;){if(mr(m(x0))===0)for(;;){var ix=Yo(m(x0));if(2>>0)var Wx=_(x0);else switch(ix){case 0:var Wx=S0(x0);break;case 1:continue;default:continue x}break}else var Wx=_(x0);var k0=Wx;break}}break}}if(k0!==0)return Nx(jc0);var Bx=_2(w,Vr(w,x0),39);return[0,Bx,[1,2,Jx(x0)]]});case 30:return C1(x,r,function(w,x0){yr(x0);var e0=jo(m(x0));if(e0===0)for(;;){var S0=x3(m(x0));if(S0!==0){var I0=S0===1?0:_(x0);break}}else if(e0===1)for(;;){var G=Jt(m(x0));if(2>>0)var I0=_(x0);else switch(G){case 0:continue;case 1:x:for(;;){if(mr(m(x0))===0)for(;;){var k0=Jt(m(x0));if(2>>0)var J0=_(x0);else switch(k0){case 0:continue;case 1:continue x;default:var J0=0}break}else var J0=_(x0);var I0=J0;break}break;default:var I0=0}break}else var I0=_(x0);return I0===0?[0,w,[1,2,Jx(x0)]]:Nx(Dc0)});case 31:var W0=_2(x,Vr(x,r),39);return[0,W0,[1,2,Jx(r)]];case 32:return[0,x,[1,2,Jx(r)]];case 33:return C1(x,r,function(w,x0){function e0(Bx){for(;;){r0(Bx,0);var Hx=Bo(m(Bx));if(Hx!==0){if(Hx!==1)return _(Bx);x:for(;;){if(mr(m(Bx))!==0)return _(Bx);for(;;){r0(Bx,0);var $x=Bo(m(Bx));if($x!==0){if($x===1)continue x;return _(Bx)}}}}}}function S0(Bx){return r0(Bx,0),mr(m(Bx))===0?e0(Bx):_(Bx)}yr(x0);var G=Do(m(x0));if(2>>0)var k0=_(x0);else switch(G){case 0:var k0=mr(m(x0))===0?e0(x0):_(x0);break;case 1:for(;;){r0(x0,0);var J0=r3(m(x0));if(J0===0)var k0=S0(x0);else{if(J0===1)continue;var k0=_(x0)}break}break;default:for(;;){r0(x0,0);var I0=Yo(m(x0));if(2>>0)var k0=_(x0);else switch(I0){case 0:var k0=S0(x0);break;case 1:continue;default:x:for(;;){if(mr(m(x0))===0)for(;;){r0(x0,0);var ix=Yo(m(x0));if(2>>0)var Wx=_(x0);else switch(ix){case 0:var Wx=S0(x0);break;case 1:continue;default:continue x}break}else var Wx=_(x0);var k0=Wx;break}}break}}return k0===0?[0,w,[0,4,Jx(x0)]]:Nx(Mc0)});case 34:return[0,x,[0,4,Jx(r)]];case 35:var sx=Vr(x,r),tx=Jx(r);return[0,x,[4,sx,tx,tx]];case 36:return[0,x,0];case 37:return[0,x,1];case 38:return[0,x,4];case 39:return[0,x,5];case 40:return[0,x,6];case 41:return[0,x,7];case 42:return[0,x,12];case 43:return[0,x,10];case 44:return[0,x,8];case 45:return[0,x,9];case 46:return[0,x,86];case 47:qa(r),yr(r);var j0=m(r),Px=62=tr)return[0,x,18];var Ux=Tx(B0,Oa);if(0<=Ux){if(0>=Ux)return[0,x,51];var K0=Tx(B0,Ps);if(0<=K0){if(0>=K0)return[0,x,46];if(!P(B0,pl))return[0,x,24];if(!P(B0,Is))return[0,x,47];if(!P(B0,Qp))return[0,x,25];if(!P(B0,Tp))return[0,x,26];if(!P(B0,B2))return[0,x,58]}else{if(!P(B0,Be))return[0,x,20];if(!P(B0,lv))return[0,x,21];if(!P(B0,Ue))return[0,x,22];if(!P(B0,Cs))return[0,x,31];if(!P(B0,yd))return[0,x,23];if(!P(B0,fi))return[0,x,61]}}else{var ur=Tx(B0,u8);if(0<=ur){if(0>=ur)return[0,x,54];if(!P(B0,Sl))return[0,x,55];if(!P(B0,F3))return[0,x,56];if(!P(B0,V3))return[0,x,57];if(!P(B0,Me))return[0,x,19];if(!P(B0,De))return[0,x,42]}else{if(!P(B0,G2))return[0,x,53];if(!P(B0,ma))return[0,x,28];if(!P(B0,av))return[0,x,44];if(!P(B0,_v))return[0,x,29];if(!P(B0,Hh))return[0,x,63];if(!P(B0,Xh))return[0,x,62]}}}else{var z0=Tx(B0,ed);if(0<=z0){if(0>=z0)return[0,x,37];var or=Tx(B0,N8);if(0<=or){if(0>=or)return[0,x,39];if(!P(B0,da))return[0,x,15];if(!P(B0,s8))return[0,x,16];if(!P(B0,Tv))return[0,x,52];if(!P(B0,D2))return[0,x,50];if(!P(B0,Po))return[0,x,17]}else{if(!P(B0,Kp))return[0,x,43];if(!P(B0,ll))return[0,x,48];if(!P(B0,p8))return[0,x,49];if(!P(B0,Bc))return[0,x,41];if(!P(B0,Os))return[0,x,30];if(!P(B0,Yp))return[0,x,38]}}else{var Ur=Tx(B0,sl);if(0<=Ur){if(0>=Ur)return[0,x,27];if(!P(B0,Re))return[0,x,35];if(!P(B0,Oe))return[0,x,59];if(!P(B0,el))return[0,x,60];if(!P(B0,pv))return[0,x,36];if(!P(B0,cl))return[0,x,45]}else{if(!P(B0,Co))return[0,x,64];if(!P(B0,Pv))return[0,x,65];if(!P(B0,Le))return[0,x,32];if(!P(B0,bp))return[0,x,33];if(!P(B0,t5))return[0,x,34];if(!P(B0,W3))return[0,x,40]}}}var lx=n1(r),a1=oV(x,lx),z1=a1[2],w1=a1[1];return[0,w1,[4,qx,z1,Gl(lx)]];case 98:var Cr=x[4]?_2(x,Vr(x,r),96):x;return[0,Cr,Nr];default:var n2=pt(x,Vr(x,r));return[0,n2,[7,Jx(r)]]}},gS0=function(x,r,e){var t=x;x:for(;;){yr(e);var u=m(e),i=92>>0)var f=_(e);else switch(i){case 0:var f=0;break;case 1:for(;;){r0(e,7);var o=m(e),a=-1>>0)var f=_(e);else switch(k){case 0:var f=2;break;case 1:var f=1;break;default:r0(e,1);var f=le(m(e))===0?1:_(e)}}if(7>>0)return Nx(an0);switch(f){case 0:return[0,_2(t,Vr(t,e),ct),ln0];case 1:return[0,z2(_2(t,Vr(t,e),ct),e),pn0];case 2:vr(r,Jx(e));continue;case 3:var T=Jx(e);return[0,t,m2(T,1,Xx(T)-1|0)];case 4:return[0,t,dn0];case 5:for(at(r,91);;){yr(e);var g=m(e),A=93>>0)var N=_(e);else switch(A){case 0:var N=0;break;case 1:for(;;){r0(e,5);var R=m(e),O=-1>>0)var z=Nx(on0);else switch(N){case 0:var z=t;break;case 1:vr(r,vn0);continue;case 2:at(r,92),at(r,93);continue;case 3:at(r,93);var z=t;break;case 4:var z=z2(_2(t,Vr(t,e),ct),e);break;default:vr(r,Jx(e));continue}var t=z;continue x}case 6:return[0,z2(_2(t,Vr(t,e),ct),e),yn0];default:vr(r,Jx(e));continue}}},AS0=function(x,r){yr(r);var e=m(r),t=Rv>>0)var u=_(r);else switch(t){case 0:var u=0;break;case 1:var u=6;break;case 2:if(r0(r,2),cs(m(r))===0){for(;;)if(r0(r,2),cs(m(r))!==0){var u=_(r);break}}else var u=_(r);break;case 3:var u=1;break;case 4:r0(r,1);var u=le(m(r))===0?1:_(r);break;default:r0(r,5);var i=Wy(m(r)),u=i===0?4:i===1?3:_(r)}if(6>>0)return Nx(Lc0);switch(u){case 0:return[0,x,Nr];case 1:return[2,z2(x,r)];case 2:return[2,x];case 3:var f=h2(x,r),o=Fr(Jr),a=e3(x,o,r),d=a[1];return[1,d,zt(d,f,a[2],o,0)];case 4:var k=h2(x,r),T=Fr(Jr),g=Kv(x,T,r),A=g[1];return[1,A,zt(A,k,g[2],T,1)];case 5:var N=h2(x,r),R=Fr(Jr),O=gS0(x,R,r),M=O[1],L=O[2],z=pe(M,r),V=[0,M[1],N,z];return[0,M,[5,V,Y1(R),L]];default:var Z=pt(x,Vr(x,r));return[0,Z,[7,Jx(r)]]}},pV=function(x){var r=Tx(x,"iexcl");if(0<=r){if(0>=r)return Ic0;var e=Tx(x,"prime");if(0<=e){if(0>=e)return Oc0;var t=Tx(x,"sup1");if(0<=t){if(0>=t)return Rc0;var u=Tx(x,"uarr");if(0<=u){if(0>=u)return Nc0;var i=Tx(x,"xi");if(0<=i){if(0>=i)return Cc0;if(!P(x,"yacute"))return Pc0;if(!P(x,"yen"))return Ac0;if(!P(x,"yuml"))return gc0;if(!P(x,"zeta"))return Ec0;if(!P(x,"zwj"))return Sc0;if(!P(x,"zwnj"))return Tc0}else{if(!P(x,"ucirc"))return wc0;if(!P(x,"ugrave"))return _c0;if(!P(x,"uml"))return hc0;if(!P(x,"upsih"))return kc0;if(!P(x,"upsilon"))return mc0;if(!P(x,"uuml"))return yc0;if(!P(x,"weierp"))return dc0}}else{var f=Tx(x,"thetasym");if(0<=f){if(0>=f)return pc0;if(!P(x,"thinsp"))return lc0;if(!P(x,"thorn"))return ac0;if(!P(x,"tilde"))return vc0;if(!P(x,"times"))return oc0;if(!P(x,"trade"))return sc0;if(!P(x,"uArr"))return cc0;if(!P(x,"uacute"))return fc0}else{if(!P(x,"sup2"))return ic0;if(!P(x,"sup3"))return uc0;if(!P(x,"supe"))return nc0;if(!P(x,"szlig"))return tc0;if(!P(x,"tau"))return ec0;if(!P(x,"there4"))return rc0;if(!P(x,"theta"))return xc0}}}else{var o=Tx(x,"rlm");if(0<=o){if(0>=o)return bf0;var a=Tx(x,"sigma");if(0<=a){if(0>=a)return Gf0;if(!P(x,"sigmaf"))return qf0;if(!P(x,"sim"))return Hf0;if(!P(x,"spades"))return Ff0;if(!P(x,"sub"))return Qf0;if(!P(x,"sube"))return $f0;if(!P(x,"sum"))return Wf0;if(!P(x,"sup"))return Zf0}else{if(!P(x,"rsaquo"))return Kf0;if(!P(x,"rsquo"))return zf0;if(!P(x,"sbquo"))return Vf0;if(!P(x,"scaron"))return Jf0;if(!P(x,"sdot"))return Xf0;if(!P(x,"sect"))return Yf0;if(!P(x,"shy"))return Bf0}}else{var d=Tx(x,"raquo");if(0<=d){if(0>=d)return Uf0;if(!P(x,"rarr"))return jf0;if(!P(x,"rceil"))return Df0;if(!P(x,"rdquo"))return Mf0;if(!P(x,"real"))return Lf0;if(!P(x,"reg"))return If0;if(!P(x,"rfloor"))return Of0;if(!P(x,"rho"))return Rf0}else{if(!P(x,"prod"))return Nf0;if(!P(x,"prop"))return Cf0;if(!P(x,"psi"))return Pf0;if(!P(x,"quot"))return Af0;if(!P(x,"rArr"))return gf0;if(!P(x,"radic"))return Ef0;if(!P(x,"rang"))return Sf0}}}}else{var k=Tx(x,"ndash");if(0<=k){if(0>=k)return Tf0;var T=Tx(x,"or");if(0<=T){if(0>=T)return wf0;var g=Tx(x,"part");if(0<=g){if(0>=g)return _f0;if(!P(x,"permil"))return hf0;if(!P(x,"perp"))return kf0;if(!P(x,"phi"))return mf0;if(!P(x,"pi"))return yf0;if(!P(x,"piv"))return df0;if(!P(x,"plusmn"))return pf0;if(!P(x,"pound"))return lf0}else{if(!P(x,"ordf"))return af0;if(!P(x,"ordm"))return vf0;if(!P(x,"oslash"))return of0;if(!P(x,"otilde"))return sf0;if(!P(x,"otimes"))return cf0;if(!P(x,"ouml"))return ff0;if(!P(x,"para"))return if0}}else{var A=Tx(x,"oacute");if(0<=A){if(0>=A)return uf0;if(!P(x,"ocirc"))return nf0;if(!P(x,"oelig"))return tf0;if(!P(x,"ograve"))return ef0;if(!P(x,"oline"))return rf0;if(!P(x,"omega"))return xf0;if(!P(x,"omicron"))return bi0;if(!P(x,"oplus"))return Gi0}else{if(!P(x,"ne"))return qi0;if(!P(x,"ni"))return Hi0;if(!P(x,"not"))return Fi0;if(!P(x,"notin"))return Qi0;if(!P(x,"nsub"))return $i0;if(!P(x,"ntilde"))return Wi0;if(!P(x,"nu"))return Zi0}}}else{var N=Tx(x,"le");if(0<=N){if(0>=N)return Ki0;var R=Tx(x,"macr");if(0<=R){if(0>=R)return zi0;if(!P(x,"mdash"))return Vi0;if(!P(x,"micro"))return Ji0;if(!P(x,"middot"))return Xi0;if(!P(x,UD))return Yi0;if(!P(x,"mu"))return Bi0;if(!P(x,"nabla"))return Ui0;if(!P(x,"nbsp"))return ji0}else{if(!P(x,"lfloor"))return Di0;if(!P(x,"lowast"))return Mi0;if(!P(x,"loz"))return Li0;if(!P(x,"lrm"))return Ii0;if(!P(x,"lsaquo"))return Oi0;if(!P(x,"lsquo"))return Ri0;if(!P(x,"lt"))return Ni0}}else{var O=Tx(x,"kappa");if(0<=O){if(0>=O)return Ci0;if(!P(x,"lArr"))return Pi0;if(!P(x,"lambda"))return Ai0;if(!P(x,"lang"))return gi0;if(!P(x,"laquo"))return Ei0;if(!P(x,"larr"))return Si0;if(!P(x,"lceil"))return Ti0;if(!P(x,"ldquo"))return wi0}else{if(!P(x,"igrave"))return _i0;if(!P(x,"image"))return hi0;if(!P(x,"infin"))return ki0;if(!P(x,"iota"))return mi0;if(!P(x,"iquest"))return yi0;if(!P(x,"isin"))return di0;if(!P(x,"iuml"))return pi0}}}}}else{var M=Tx(x,"aelig");if(0<=M){if(0>=M)return li0;var L=Tx(x,"delta");if(0<=L){if(0>=L)return ai0;var z=Tx(x,"fnof");if(0<=z){if(0>=z)return vi0;var V=Tx(x,"gt");if(0<=V){if(0>=V)return oi0;if(!P(x,"hArr"))return si0;if(!P(x,"harr"))return ci0;if(!P(x,"hearts"))return fi0;if(!P(x,"hellip"))return ii0;if(!P(x,"iacute"))return ui0;if(!P(x,"icirc"))return ni0}else{if(!P(x,"forall"))return ti0;if(!P(x,"frac12"))return ei0;if(!P(x,"frac14"))return ri0;if(!P(x,"frac34"))return xi0;if(!P(x,"frasl"))return bu0;if(!P(x,"gamma"))return Gu0;if(!P(x,"ge"))return qu0}}else{var Z=Tx(x,"ensp");if(0<=Z){if(0>=Z)return Hu0;if(!P(x,"epsilon"))return Fu0;if(!P(x,"equiv"))return Qu0;if(!P(x,"eta"))return $u0;if(!P(x,"eth"))return Wu0;if(!P(x,"euml"))return Zu0;if(!P(x,"euro"))return Ku0;if(!P(x,"exist"))return zu0}else{if(!P(x,"diams"))return Vu0;if(!P(x,"divide"))return Ju0;if(!P(x,"eacute"))return Xu0;if(!P(x,"ecirc"))return Yu0;if(!P(x,"egrave"))return Bu0;if(!P(x,ce))return Uu0;if(!P(x,"emsp"))return ju0}}}else{var $=Tx(x,"cap");if(0<=$){if(0>=$)return Du0;var i0=Tx(x,"copy");if(0<=i0){if(0>=i0)return Mu0;if(!P(x,"crarr"))return Lu0;if(!P(x,"cup"))return Iu0;if(!P(x,"curren"))return Ou0;if(!P(x,"dArr"))return Ru0;if(!P(x,"dagger"))return Nu0;if(!P(x,"darr"))return Cu0;if(!P(x,"deg"))return Pu0}else{if(!P(x,"ccedil"))return Au0;if(!P(x,"cedil"))return gu0;if(!P(x,"cent"))return Eu0;if(!P(x,"chi"))return Su0;if(!P(x,"circ"))return Tu0;if(!P(x,"clubs"))return wu0;if(!P(x,"cong"))return _u0}}else{var U=Tx(x,"aring");if(0<=U){if(0>=U)return hu0;if(!P(x,"asymp"))return ku0;if(!P(x,"atilde"))return mu0;if(!P(x,"auml"))return yu0;if(!P(x,"bdquo"))return du0;if(!P(x,"beta"))return pu0;if(!P(x,"brvbar"))return lu0;if(!P(x,"bull"))return au0}else{if(!P(x,"agrave"))return vu0;if(!P(x,"alefsym"))return ou0;if(!P(x,"alpha"))return su0;if(!P(x,"amp"))return cu0;if(!P(x,"and"))return fu0;if(!P(x,"ang"))return iu0;if(!P(x,"apos"))return uu0}}}}else{var J=Tx(x,"Nu");if(0<=J){if(0>=J)return nu0;var Y=Tx(x,"Sigma");if(0<=Y){if(0>=Y)return tu0;var F=Tx(x,"Uuml");if(0<=F){if(0>=F)return eu0;if(!P(x,"Xi"))return ru0;if(!P(x,"Yacute"))return xu0;if(!P(x,"Yuml"))return b70;if(!P(x,"Zeta"))return G70;if(!P(x,"aacute"))return q70;if(!P(x,"acirc"))return H70;if(!P(x,"acute"))return F70}else{if(!P(x,"THORN"))return Q70;if(!P(x,"Tau"))return $70;if(!P(x,"Theta"))return W70;if(!P(x,"Uacute"))return Z70;if(!P(x,"Ucirc"))return K70;if(!P(x,"Ugrave"))return z70;if(!P(x,"Upsilon"))return V70}}else{var n0=Tx(x,"Otilde");if(0<=n0){if(0>=n0)return J70;if(!P(x,"Ouml"))return X70;if(!P(x,"Phi"))return Y70;if(!P(x,"Pi"))return B70;if(!P(x,"Prime"))return U70;if(!P(x,"Psi"))return j70;if(!P(x,"Rho"))return D70;if(!P(x,"Scaron"))return M70}else{if(!P(x,"OElig"))return L70;if(!P(x,"Oacute"))return I70;if(!P(x,"Ocirc"))return O70;if(!P(x,"Ograve"))return R70;if(!P(x,"Omega"))return N70;if(!P(x,"Omicron"))return C70;if(!P(x,"Oslash"))return P70}}}else{var Q=Tx(x,"Eacute");if(0<=Q){if(0>=Q)return A70;var f0=Tx(x,"Icirc");if(0<=f0){if(0>=f0)return g70;if(!P(x,"Igrave"))return E70;if(!P(x,"Iota"))return S70;if(!P(x,"Iuml"))return T70;if(!P(x,"Kappa"))return w70;if(!P(x,"Lambda"))return _70;if(!P(x,"Mu"))return h70;if(!P(x,"Ntilde"))return k70}else{if(!P(x,"Ecirc"))return m70;if(!P(x,"Egrave"))return y70;if(!P(x,"Epsilon"))return d70;if(!P(x,"Eta"))return p70;if(!P(x,"Euml"))return l70;if(!P(x,"Gamma"))return a70;if(!P(x,"Iacute"))return v70}}else{var s0=Tx(x,"Atilde");if(0<=s0){if(0>=s0)return o70;if(!P(x,"Auml"))return s70;if(!P(x,"Beta"))return c70;if(!P(x,"Ccedil"))return f70;if(!P(x,"Chi"))return i70;if(!P(x,"Dagger"))return u70;if(!P(x,"Delta"))return n70;if(!P(x,"ETH"))return t70}else{if(!P(x,"'int'"))return e70;if(!P(x,"AElig"))return r70;if(!P(x,"Aacute"))return x70;if(!P(x,"Acirc"))return bn0;if(!P(x,"Agrave"))return Gn0;if(!P(x,"Alpha"))return qn0;if(!P(x,"Aring"))return Hn0}}}}}return 0},dV=function(x,r,e,t){for(var u=x;;){var i=function(n0){for(;;)if(r0(n0,8),uI(m(n0))!==0)return _(n0)};yr(t);var f=m(t),o=Di>>0)var a=_(t);else switch(o){case 0:var a=3;break;case 1:var a=i(t);break;case 2:var a=4;break;case 3:r0(t,4);var a=le(m(t))===0?4:_(t);break;case 4:r0(t,8);var d=nV(m(t));if(d===0){var k=UJ(m(t));if(k===0)for(;;){var T=BJ(m(t));if(T!==0){var a=T===1?6:_(t);break}}else if(k===1&&Pr(m(t))===0)for(;;){var g=rV(m(t));if(g!==0){var a=g===1?5:_(t);break}}else var a=_(t)}else if(d===1&&ar(m(t))===0){var A=Vt(m(t));if(A===0){var N=Vt(m(t));if(N===0){var R=Vt(m(t));if(R===0){var O=Vt(m(t));if(O===0){var M=Vt(m(t));if(M===0)var L=Vt(m(t)),a=L===0?qJ(m(t))===0?7:_(t):L===1?7:_(t);else var a=M===1?7:_(t)}else var a=O===1?7:_(t)}else var a=R===1?7:_(t)}else var a=N===1?7:_(t)}else var a=A===1?7:_(t)}else var a=_(t);break;case 5:var a=0;break;case 6:r0(t,1);var a=uI(m(t))===0?i(t):_(t);break;default:r0(t,2);var a=uI(m(t))===0?i(t):_(t)}if(8>>0)return Nx(mn0);switch(a){case 0:return qa(t),u;case 1:return sI(u,Vr(u,t),hn0,kn0);case 2:return sI(u,Vr(u,t),wn0,_n0);case 3:return pt(u,Vr(u,t));case 4:var z=Jx(t);vr(e,z),vr(r,z);var u=z2(u,t);continue;case 5:var V=Jx(t),Z=m2(V,3,Xx(V)-4|0);vr(e,V),is(r,ot(Qx(Tn0,Z)));continue;case 6:var $=Jx(t),i0=m2($,2,Xx($)-3|0);vr(e,$),is(r,ot(i0));continue;case 7:var U=Jx(t),J=m2(U,1,Xx(U)-2|0);vr(e,U);var Y=pV(J);Y?is(r,Y[1]):vr(r,Qx(En0,Qx(J,Sn0)));continue;default:var F=Jx(t);vr(e,F),vr(r,F);continue}}},PS0=function(x,r){yr(r);var e=SS0(m(r));if(14>>0)var t=_(r);else switch(e){case 0:var t=0;break;case 1:var t=14;break;case 2:if(r0(r,2),cs(m(r))===0){for(;;)if(r0(r,2),cs(m(r))!==0){var t=_(r);break}}else var t=_(r);break;case 3:var t=1;break;case 4:r0(r,1);var t=le(m(r))===0?1:_(r);break;case 5:var t=12;break;case 6:var t=13;break;case 7:var t=10;break;case 8:r0(r,6);var u=Wy(m(r)),t=u===0?4:u===1?3:_(r);break;case 9:var t=9;break;case 10:var t=5;break;case 11:var t=11;break;case 12:var t=7;break;case 13:if(r0(r,14),Xo(m(r))===0){var i=Vv(m(r));if(i===0)var t=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?13:_(r);else if(i===1&&Pr(m(r))===0)for(;;){var f=Jv(m(r));if(f!==0){var t=f===1?13:_(r);break}}else var t=_(r)}else var t=_(r);break;default:var t=8}if(14>>0)return Nx(Fn0);switch(t){case 0:return[0,x,Nr];case 1:return[2,z2(x,r)];case 2:return[2,x];case 3:var o=h2(x,r),a=Fr(Jr),d=e3(x,a,r),k=d[1];return[1,k,zt(k,o,d[2],a,0)];case 4:var T=h2(x,r),g=Fr(Jr),A=Kv(x,g,r),N=A[1];return[1,N,zt(N,T,A[2],g,1)];case 5:return[0,x,98];case 6:return[0,x,ft];case 7:return[0,x,99];case 8:return[0,x,0];case 9:return[0,x,86];case 10:return[0,x,10];case 11:return[0,x,82];case 12:var R=Jx(r),O=h2(x,r),M=Fr(Jr),L=Fr(Jr);vr(L,R);for(var z=Ar(R,"'"),V=x;;){yr(r);var Z=m(r),$=39>>0)var i0=_(r);else switch($){case 0:var i0=2;break;case 1:for(;;){r0(r,7);var U=m(r),J=-1>>0)var E0=Nx(gn0);else switch(i0){case 0:if(!z){at(L,39),at(M,39);continue}var E0=V;break;case 1:if(z){at(L,34),at(M,34);continue}var E0=V;break;case 2:var E0=pt(V,Vr(V,r));break;case 3:var M0=Jx(r);vr(L,M0),vr(M,M0);var V=z2(V,r);continue;case 4:var Y0=Jx(r),rx=m2(Y0,3,Xx(Y0)-4|0);vr(L,Y0),is(M,ot(Qx(An0,rx)));continue;case 5:var g0=Jx(r),H0=m2(g0,2,Xx(g0)-3|0);vr(L,g0),is(M,ot(H0));continue;case 6:var t0=Jx(r),ex=m2(t0,1,Xx(t0)-2|0);vr(L,t0);var xx=pV(ex);xx?is(M,xx[1]):vr(M,Qx(Cn0,Qx(ex,Pn0)));continue;default:var ax=Jx(r);vr(L,ax),vr(M,ax);continue}var dx=pe(E0,r);vr(L,R);var mx=Y1(M),L0=Y1(L);return[0,E0,[10,[0,E0[1],O,dx],mx,L0]]}case 13:for(var C0=r[6];;){yr(r);var A0=m(r),U0=x1>>0)var Q0=_(r);else switch(U0){case 0:var Q0=1;break;case 1:var Q0=2;break;case 2:var Q0=0;break;default:if(r0(r,2),Xo(m(r))===0){var H=Vv(m(r));if(H===0)var Q0=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?0:_(r);else if(H===1&&Pr(m(r))===0)for(;;){var b=Jv(m(r));if(b!==0){var Q0=b===1?0:_(r);break}}else var Q0=_(r)}else var Q0=_(r)}if(2>>0)throw q0([0,wr,xn0],1);switch(Q0){case 0:continue;case 1:break;default:if(GO(aJ(r)))continue;pJ(r,1)}var B=r[3];KO(r,C0);var a0=n1(r),m0=t6(x,C0,B);return[0,x,[8,Gl(a0),m0]]}default:return[0,x,[7,Jx(r)]]}},CS0=function(x,r){yr(r);var e=m(r),t=-1>>0)var u=_(r);else switch(t){case 0:var u=5;break;case 1:if(r0(r,1),cs(m(r))===0){for(;;)if(r0(r,1),cs(m(r))!==0){var u=_(r);break}}else var u=_(r);break;case 2:var u=0;break;case 3:r0(r,0);var u=le(m(r))===0?0:_(r);break;case 4:r0(r,5);var i=Wy(m(r)),u=i===0?3:i===1?2:_(r);break;default:var u=4}if(5>>0)return Nx(Zn0);switch(u){case 0:return[2,z2(x,r)];case 1:return[2,x];case 2:var f=h2(x,r),o=Fr(Jr),a=e3(x,o,r),d=a[1];return[1,d,zt(d,f,a[2],o,0)];case 3:var k=h2(x,r),T=Fr(Jr),g=Kv(x,T,r),A=g[1];return[1,A,zt(A,k,g[2],T,1)];case 4:var N=h2(x,r),R=Fr(Jr),O=Fr(Jr),M=lV(x,R,O,r),L=M[1],z=M[2],V=pe(L,r),Z=[0,L[1],N,V],$=Y1(O);return[0,L,[3,[0,Z,Y1(R),$,0,z]]];default:var i0=pt(x,Vr(x,r));return[0,i0,[3,[0,Vr(i0,r),$n0,Wn0,0,1]]]}},NS0=function(x,r){function e(h){for(;;)if(r0(h,29),ar(m(h))!==0)return _(h)}function t(h){r0(h,28);var X=M1(m(h));if(X!==0)return X===1?e(h):_(h);for(;;)if(r0(h,26),ar(m(h))!==0)return _(h)}function u(h){r0(h,27);var X=M1(m(h));if(X!==0)return X===1?e(h):_(h);for(;;)if(r0(h,25),ar(m(h))!==0)return _(h)}function i(h){r0(h,30);var X=ba(m(h));if(2>>0)return _(h);switch(X){case 0:return e(h);case 1:for(;;){r0(h,30);var W0=os(m(h));if(3>>0)return _(h);switch(W0){case 0:return e(h);case 1:continue;case 2:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var sx=os(m(h));if(3>>0)return _(h);switch(sx){case 0:return e(h);case 1:continue;case 2:continue x;default:return u(h)}}}default:return u(h)}}default:return u(h)}}function f(h){x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var X=HJ(m(h));if(4>>0)return _(h);switch(X){case 0:return e(h);case 1:return i(h);case 2:continue;case 3:continue x;default:return t(h)}}}}function o(h){for(;;)if(r0(h,19),ar(m(h))!==0)return _(h)}function a(h){for(;;)if(r0(h,19),ar(m(h))!==0)return _(h)}function d(h){for(;;)if(r0(h,13),ar(m(h))!==0)return _(h)}function k(h){for(;;)if(r0(h,13),ar(m(h))!==0)return _(h)}function T(h){for(;;)if(r0(h,9),ar(m(h))!==0)return _(h)}function g(h){for(;;)if(r0(h,9),ar(m(h))!==0)return _(h)}function A(h){for(;;)if(r0(h,15),ar(m(h))!==0)return _(h)}function N(h){r0(h,15);var X=M1(m(h));if(X!==0)return X===1?A(h):_(h);for(;;)if(r0(h,15),ar(m(h))!==0)return _(h)}function R(h){for(;;)if(r0(h,23),ar(m(h))!==0)return _(h)}function O(h){r0(h,22);var X=M1(m(h));if(X!==0)return X===1?R(h):_(h);for(;;)if(r0(h,21),ar(m(h))!==0)return _(h)}function M(h){for(;;)if(r0(h,23),ar(m(h))!==0)return _(h)}function L(h){r0(h,22);var X=M1(m(h));if(X!==0)return X===1?M(h):_(h);for(;;)if(r0(h,21),ar(m(h))!==0)return _(h)}function z(h){x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,24);var X=os(m(h));if(3>>0)return _(h);switch(X){case 0:return M(h);case 1:continue;case 2:continue x;default:return L(h)}}}}function V(h){r0(h,29);var X=GJ(m(h));if(3>>0)return _(h);switch(X){case 0:return e(h);case 1:var W0=jo(m(h));if(W0===0)for(;;){r0(h,24);var sx=ba(m(h));if(2>>0)return _(h);switch(sx){case 0:return M(h);case 1:continue;default:return L(h)}}if(W0!==1)return _(h);for(;;){r0(h,24);var tx=os(m(h));if(3>>0)return _(h);switch(tx){case 0:return M(h);case 1:continue;case 2:return z(h);default:return L(h)}}case 2:for(;;){r0(h,24);var j0=ba(m(h));if(2>>0)return _(h);switch(j0){case 0:return R(h);case 1:continue;default:return O(h)}}default:for(;;){r0(h,24);var Px=os(m(h));if(3>>0)return _(h);switch(Px){case 0:return R(h);case 1:continue;case 2:return z(h);default:return O(h)}}}}function Z(h){r0(h,30);var X=VJ(m(h));if(3>>0)return _(h);switch(X){case 0:return e(h);case 1:for(;;){r0(h,30);var W0=Uo(m(h));if(4>>0)return _(h);switch(W0){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var sx=Uo(m(h));if(4>>0)return _(h);switch(sx){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:continue x;default:return u(h)}}}default:return u(h)}}case 2:return V(h);default:return u(h)}}function $(h){return zy(m(h))===0&&Yy(m(h))===0&&xV(m(h))===0&&KJ(m(h))===0&&ZJ(m(h))===0&&By(m(h))===0&&r6(m(h))===0&&zy(m(h))===0&&Xo(m(h))===0&&cI(m(h))===0&&zv(m(h))===0?3:_(h)}function i0(h){return r0(h,3),tV(m(h))===0?3:_(h)}function U(h){var X=TS0(m(h));if(31>>0)return _(h);switch(X){case 0:return 66;case 1:return 67;case 2:if(r0(h,1),cs(m(h))!==0)return _(h);for(;;)if(r0(h,1),cs(m(h))!==0)return _(h);case 3:return 0;case 4:return r0(h,0),le(m(h))===0?0:_(h);case 5:return 6;case 6:return 65;case 7:if(r0(h,67),r6(m(h))!==0)return _(h);var W0=m(h),sx=nn>>0)return _(h);switch(qx){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var B0=Uo(m(h));if(4>>0)return _(h);switch(B0){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:continue x;default:return u(h)}}}default:return u(h)}}case 16:r0(h,67);var tr=Wy(m(h));if(tr!==0)return tr===1?5:_(h);r0(h,2);var Ux=Iy(m(h));if(2>>0)return _(h);switch(Ux){case 0:for(;;){var K0=Iy(m(h));if(2>>0)return _(h);switch(K0){case 0:continue;case 1:return i0(h);default:return $(h)}}case 1:return i0(h);default:return $(h)}case 17:r0(h,30);var ur=$J(m(h));if(8>>0)return _(h);switch(ur){case 0:return e(h);case 1:return Z(h);case 2:for(;;){r0(h,16);var z0=bJ(m(h));if(4>>0)return _(h);switch(z0){case 0:return A(h);case 1:return i(h);case 2:continue;case 3:for(;;){r0(h,15);var or=Oy(m(h));if(3>>0)return _(h);switch(or){case 0:return A(h);case 1:return i(h);case 2:continue;default:return N(h)}}default:return N(h)}}case 3:for(;;){r0(h,30);var Ur=Oy(m(h));if(3>>0)return _(h);switch(Ur){case 0:return e(h);case 1:return i(h);case 2:continue;default:return t(h)}}case 4:r0(h,29);var lx=WJ(m(h));if(lx===0)return e(h);if(lx!==1)return _(h);for(;;){r0(h,10);var a1=$y(m(h));if(3>>0)return _(h);switch(a1){case 0:return g(h);case 1:continue;case 2:x:for(;;){if(ss(m(h))!==0)return _(h);for(;;){r0(h,10);var z1=$y(m(h));if(3>>0)return _(h);switch(z1){case 0:return T(h);case 1:continue;case 2:continue x;default:r0(h,8);var w1=M1(m(h));if(w1!==0)return w1===1?T(h):_(h);for(;;)if(r0(h,7),ar(m(h))!==0)return _(h)}}}default:r0(h,8);var Cr=M1(m(h));if(Cr!==0)return Cr===1?g(h):_(h);for(;;)if(r0(h,7),ar(m(h))!==0)return _(h)}}case 5:return V(h);case 6:r0(h,29);var n2=QJ(m(h));if(n2===0)return e(h);if(n2!==1)return _(h);for(;;){r0(h,14);var w=Zy(m(h));if(3>>0)return _(h);switch(w){case 0:return k(h);case 1:continue;case 2:x:for(;;){if(V2(m(h))!==0)return _(h);for(;;){r0(h,14);var x0=Zy(m(h));if(3>>0)return _(h);switch(x0){case 0:return d(h);case 1:continue;case 2:continue x;default:r0(h,12);var e0=M1(m(h));if(e0!==0)return e0===1?d(h):_(h);for(;;)if(r0(h,11),ar(m(h))!==0)return _(h)}}}default:r0(h,12);var S0=M1(m(h));if(S0!==0)return S0===1?k(h):_(h);for(;;)if(r0(h,11),ar(m(h))!==0)return _(h)}}case 7:r0(h,29);var G=YJ(m(h));if(G===0)return e(h);if(G!==1)return _(h);for(;;){r0(h,20);var k0=Qy(m(h));if(3>>0)return _(h);switch(k0){case 0:return a(h);case 1:continue;case 2:x:for(;;){if(Pr(m(h))!==0)return _(h);for(;;){r0(h,20);var J0=Qy(m(h));if(3>>0)return _(h);switch(J0){case 0:return o(h);case 1:continue;case 2:continue x;default:r0(h,18);var I0=M1(m(h));if(I0!==0)return I0===1?o(h):_(h);for(;;)if(r0(h,17),ar(m(h))!==0)return _(h)}}}default:r0(h,18);var ix=M1(m(h));if(ix!==0)return ix===1?a(h):_(h);for(;;)if(r0(h,17),ar(m(h))!==0)return _(h)}}default:return t(h)}case 18:r0(h,30);var Wx=My(m(h));if(5>>0)return _(h);switch(Wx){case 0:return e(h);case 1:return Z(h);case 2:for(;;){r0(h,30);var Bx=My(m(h));if(5>>0)return _(h);switch(Bx){case 0:return e(h);case 1:return Z(h);case 2:continue;case 3:return V(h);case 4:return f(h);default:return t(h)}}case 3:return V(h);case 4:return f(h);default:return t(h)}case 19:return 44;case 20:return 42;case 21:return 49;case 22:r0(h,51);var Hx=m(h),$x=61>>0)return Nx(Jn0);var Y=J;if(34>Y)switch(Y){case 0:return[2,z2(x,r)];case 1:return[2,x];case 2:var F=h2(x,r),n0=Fr(Jr),Q=Kv(x,n0,r),f0=Q[1];return[1,f0,zt(f0,F,Q[2],n0,1)];case 3:var s0=Jx(r);if(!x[5]){var v0=h2(x,r),o0=Fr(Jr);vr(o0,s0);var c0=Kv(x,o0,r),T0=c0[1];return[1,T0,zt(T0,v0,c0[2],o0,1)]}var E0=x[4]?fV(x,Vr(x,r),s0):x,M0=Ey(1,E0),Y0=_y(r);return Ar(ql(r,Y0-1|0,1),Iv)&&P(ql(r,Y0-2|0,1),Iv)?[0,M0,86]:[2,M0];case 4:if(x[4])return[2,Ey(0,x)];qa(r),yr(r);var rx=JJ(m(r))===0?0:_(r);return rx===0?[0,x,f2]:Nx(Vn0);case 5:var g0=h2(x,r),H0=Fr(Jr),t0=e3(x,H0,r),ex=t0[1];return[1,ex,zt(ex,g0,t0[2],H0,0)];case 6:var xx=Jx(r),ax=h2(x,r),dx=Fr(Jr),mx=Fr(Jr);vr(mx,xx);var L0=aV(x,xx,dx,mx,0,r),C0=L0[1],A0=L0[3],U0=[0,C0[1],ax,L0[2]],Q0=Y1(mx);return[0,C0,[2,[0,U0,Y1(dx),Q0,A0]]];case 7:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&jy(m(X))===0&&ss(m(X))===0)for(;;){var W0=Ny(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(ss(m(X))===0)for(;;){var sx=Ny(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Zt(0,n1(X))]:Nx(Xn0)});case 8:return[0,x,Zt(0,n1(r))];case 9:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&jy(m(X))===0&&ss(m(X))===0)for(;;){r0(X,0);var W0=Cy(m(X));if(W0!==0){if(W0===1)x:for(;;){if(ss(m(X))===0)for(;;){r0(X,0);var sx=Cy(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Kt(0,n1(X))]:Nx(Yn0)});case 10:return[0,x,Kt(0,n1(r))];case 11:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&Jy(m(X))===0&&V2(m(X))===0)for(;;){var W0=Dy(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(V2(m(X))===0)for(;;){var sx=Dy(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Zt(1,n1(X))]:Nx(Bn0)});case 12:return[0,x,Zt(1,n1(r))];case 13:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&Jy(m(X))===0&&V2(m(X))===0)for(;;){r0(X,0);var W0=Ly(m(X));if(W0!==0){if(W0===1)x:for(;;){if(V2(m(X))===0)for(;;){r0(X,0);var sx=Ly(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Kt(3,n1(X))]:Nx(Un0)});case 14:return[0,x,Kt(3,n1(r))];case 15:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&V2(m(X))===0){for(;;)if(r0(X,0),V2(m(X))!==0){var W0=_(X);break}}else var W0=_(X);return W0===0?[0,h,Kt(1,n1(X))]:Nx(jn0)});case 16:return[0,x,Kt(1,n1(r))];case 17:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&Ay(m(X))===0&&Pr(m(X))===0)for(;;){var W0=Ry(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(Pr(m(X))===0)for(;;){var sx=Ry(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Zt(2,n1(X))]:Nx(Dn0)});case 18:return[0,x,Zt(2,n1(r))];case 19:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&Ay(m(X))===0&&Pr(m(X))===0)for(;;){r0(X,0);var W0=Ky(m(X));if(W0!==0){if(W0===1)x:for(;;){if(Pr(m(X))===0)for(;;){r0(X,0);var sx=Ky(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Kt(4,n1(X))]:Nx(Mn0)});case 20:return[0,x,Kt(4,n1(r))];case 21:return C1(x,r,function(h,X){function W0(z0){for(;;){var or=Jt(m(z0));if(2>>0)return _(z0);switch(or){case 0:continue;case 1:x:for(;;){if(mr(m(z0))!==0)return _(z0);for(;;){var Ur=Jt(m(z0));if(2>>0)return _(z0);switch(Ur){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function sx(z0){for(;;){var or=x3(m(z0));if(or!==0)return or===1?0:_(z0)}}function tx(z0){var or=Fy(m(z0));if(2>>0)return _(z0);switch(or){case 0:var Ur=jo(m(z0));return Ur===0?sx(z0):Ur===1?W0(z0):_(z0);case 1:return sx(z0);default:return W0(z0)}}function j0(z0){var or=Vy(m(z0));if(or!==0)return or===1?tx(z0):_(z0);for(;;){var Ur=te(m(z0));if(2>>0)return _(z0);switch(Ur){case 0:continue;case 1:return tx(z0);default:x:for(;;){if(mr(m(z0))!==0)return _(z0);for(;;){var lx=te(m(z0));if(2>>0)return _(z0);switch(lx){case 0:continue;case 1:return tx(z0);default:continue x}}}}}}yr(X);var Px=Do(m(X));if(2>>0)var Ex=_(X);else switch(Px){case 0:if(mr(m(X))===0)for(;;){var Ix=te(m(X));if(2>>0)var Ex=_(X);else switch(Ix){case 0:continue;case 1:var Ex=tx(X);break;default:x:for(;;){if(mr(m(X))===0)for(;;){var qx=te(m(X));if(2>>0)var B0=_(X);else switch(qx){case 0:continue;case 1:var B0=tx(X);break;default:continue x}break}else var B0=_(X);var Ex=B0;break}}break}else var Ex=_(X);break;case 1:var tr=Py(m(X)),Ex=tr===0?j0(X):tr===1?tx(X):_(X);break;default:for(;;){var Ux=Xy(m(X));if(2>>0)var Ex=_(X);else switch(Ux){case 0:var Ex=j0(X);break;case 1:continue;default:var Ex=tx(X)}break}}if(Ex!==0)return Nx(Ln0);var K0=n1(X),ur=_2(h,Vr(h,X),48);return[0,ur,Zt(2,K0)]});case 22:var H=n1(r),b=_2(x,Vr(x,r),48);return[0,b,Zt(2,H)];case 23:return C1(x,r,function(h,X){function W0(K0){for(;;){r0(K0,0);var ur=Bo(m(K0));if(ur!==0){if(ur!==1)return _(K0);x:for(;;){if(mr(m(K0))!==0)return _(K0);for(;;){r0(K0,0);var z0=Bo(m(K0));if(z0!==0){if(z0===1)continue x;return _(K0)}}}}}}function sx(K0){for(;;)if(r0(K0,0),mr(m(K0))!==0)return _(K0)}function tx(K0){var ur=Fy(m(K0));if(2>>0)return _(K0);switch(ur){case 0:var z0=jo(m(K0));return z0===0?sx(K0):z0===1?W0(K0):_(K0);case 1:return sx(K0);default:return W0(K0)}}function j0(K0){var ur=Vy(m(K0));if(ur!==0)return ur===1?tx(K0):_(K0);for(;;){var z0=te(m(K0));if(2>>0)return _(K0);switch(z0){case 0:continue;case 1:return tx(K0);default:x:for(;;){if(mr(m(K0))!==0)return _(K0);for(;;){var or=te(m(K0));if(2>>0)return _(K0);switch(or){case 0:continue;case 1:return tx(K0);default:continue x}}}}}}yr(X);var Px=Do(m(X));if(2>>0)var Ex=_(X);else switch(Px){case 0:if(mr(m(X))===0)for(;;){var Ix=te(m(X));if(2>>0)var Ex=_(X);else switch(Ix){case 0:continue;case 1:var Ex=tx(X);break;default:x:for(;;){if(mr(m(X))===0)for(;;){var qx=te(m(X));if(2>>0)var B0=_(X);else switch(qx){case 0:continue;case 1:var B0=tx(X);break;default:continue x}break}else var B0=_(X);var Ex=B0;break}}break}else var Ex=_(X);break;case 1:var tr=Py(m(X)),Ex=tr===0?j0(X):tr===1?tx(X):_(X);break;default:for(;;){var Ux=Xy(m(X));if(2>>0)var Ex=_(X);else switch(Ux){case 0:var Ex=j0(X);break;case 1:continue;default:var Ex=tx(X)}break}}return Ex===0?[0,h,Kt(4,n1(X))]:Nx(In0)});case 24:return[0,x,Kt(4,n1(r))];case 25:return C1(x,r,function(h,X){function W0(Ux){for(;;){var K0=Jt(m(Ux));if(2>>0)return _(Ux);switch(K0){case 0:continue;case 1:x:for(;;){if(mr(m(Ux))!==0)return _(Ux);for(;;){var ur=Jt(m(Ux));if(2>>0)return _(Ux);switch(ur){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function sx(Ux){var K0=x3(m(Ux));return K0===0?W0(Ux):K0===1?0:_(Ux)}yr(X);var tx=Do(m(X));if(2>>0)var j0=_(X);else switch(tx){case 0:var j0=mr(m(X))===0?W0(X):_(X);break;case 1:for(;;){var Px=r3(m(X));if(Px===0)var j0=sx(X);else{if(Px===1)continue;var j0=_(X)}break}break;default:for(;;){var Ex=Yo(m(X));if(2>>0)var j0=_(X);else switch(Ex){case 0:var j0=sx(X);break;case 1:continue;default:x:for(;;){if(mr(m(X))===0)for(;;){var Ix=Yo(m(X));if(2>>0)var qx=_(X);else switch(Ix){case 0:var qx=sx(X);break;case 1:continue;default:continue x}break}else var qx=_(X);var j0=qx;break}}break}}if(j0!==0)return Nx(On0);var B0=n1(X),tr=_2(h,Vr(h,X),39);return[0,tr,Zt(2,B0)]});case 26:return C1(x,r,function(h,X){yr(X);var W0=jo(m(X));if(W0===0)for(;;){var sx=x3(m(X));if(sx!==0){var Ex=sx===1?0:_(X);break}}else if(W0===1)for(;;){var tx=Jt(m(X));if(2>>0)var Ex=_(X);else switch(tx){case 0:continue;case 1:x:for(;;){if(mr(m(X))===0)for(;;){var j0=Jt(m(X));if(2>>0)var Px=_(X);else switch(j0){case 0:continue;case 1:continue x;default:var Px=0}break}else var Px=_(X);var Ex=Px;break}break;default:var Ex=0}break}else var Ex=_(X);return Ex===0?[0,h,Zt(2,n1(X))]:Nx(Rn0)});case 27:var B=n1(r),a0=_2(x,Vr(x,r),39);return[0,a0,Zt(2,B)];case 28:return[0,x,Zt(2,n1(r))];case 29:return C1(x,r,function(h,X){function W0(B0){for(;;){r0(B0,0);var tr=Bo(m(B0));if(tr!==0){if(tr!==1)return _(B0);x:for(;;){if(mr(m(B0))!==0)return _(B0);for(;;){r0(B0,0);var Ux=Bo(m(B0));if(Ux!==0){if(Ux===1)continue x;return _(B0)}}}}}}function sx(B0){return r0(B0,0),mr(m(B0))===0?W0(B0):_(B0)}yr(X);var tx=Do(m(X));if(2>>0)var j0=_(X);else switch(tx){case 0:var j0=mr(m(X))===0?W0(X):_(X);break;case 1:for(;;){r0(X,0);var Px=r3(m(X));if(Px===0)var j0=sx(X);else{if(Px===1)continue;var j0=_(X)}break}break;default:for(;;){r0(X,0);var Ex=Yo(m(X));if(2>>0)var j0=_(X);else switch(Ex){case 0:var j0=sx(X);break;case 1:continue;default:x:for(;;){if(mr(m(X))===0)for(;;){r0(X,0);var Ix=Yo(m(X));if(2>>0)var qx=_(X);else switch(Ix){case 0:var qx=sx(X);break;case 1:continue;default:continue x}break}else var qx=_(X);var j0=qx;break}}break}}return j0===0?[0,h,Kt(4,n1(X))]:Nx(Nn0)});case 30:return[0,x,Kt(4,n1(r))];case 31:return[0,x,66];case 32:return[0,x,6];default:return[0,x,7]}switch(Y){case 34:return[0,x,0];case 35:return[0,x,1];case 36:return[0,x,2];case 37:return[0,x,3];case 38:return[0,x,4];case 39:return[0,x,5];case 40:return[0,x,12];case 41:return[0,x,10];case 42:return[0,x,8];case 43:return[0,x,9];case 44:return[0,x,86];case 45:return[0,x,83];case 46:return[0,x,85];case 47:return[0,x,6];case 48:return[0,x,7];case 49:return[0,x,98];case 50:return[0,x,99];case 51:return[0,x,82];case 52:return[0,x,85];case 53:return[0,x,f2];case 54:return[0,x,86];case 55:return[0,x,88];case 56:return[0,x,87];case 57:return[0,x,89];case 58:return[0,x,91];case 59:return[0,x,11];case 60:return[0,x,82];case 61:return[0,x,nn];case 62:return[0,x,Dt];case 63:return[0,x,ud];case 64:return[0,x,Ep];case 65:var m0=r[6];uV(r);var P0=t6(x,m0,r[3]);KO(r,m0);var D=n1(r),N0=oV(x,D),X0=N0[2],D0=N0[1],ox=Tx(X0,_p);if(0<=ox){if(0>=ox)return[0,D0,Eo];var b0=Tx(X0,wx);if(0<=b0){if(0>=b0)return[0,D0,ul];if(!P(X0,Cs))return[0,D0,31];if(!P(X0,Ps))return[0,D0,46];if(!P(X0,vd))return[0,D0,Ma];if(!P(X0,B5))return[0,D0,x1];if(!P(X0,Is))return[0,D0,Lf]}else{if(!P(X0,X8))return[0,D0,It];if(!P(X0,_v))return[0,D0,29];if(!P(X0,_a))return[0,D0,dv];if(!P(X0,Ea))return[0,D0,K4];if(!P(X0,De))return[0,D0,42];if(!P(X0,ja))return[0,D0,Pa]}}else{var kx=Tx(X0,Bc);if(0<=kx){if(0>=kx)return[0,D0,41];if(!P(X0,Os))return[0,D0,30];if(!P(X0,Jj))return[0,D0,Jr];if(!P(X0,G2))return[0,D0,53];if(!P(X0,ml))return[0,D0,h1];if(!P(X0,Y8))return[0,D0,Di]}else{if(!P(X0,y5))return[0,D0,ct];if(!P(X0,ka))return[0,D0,_l];if(!P(X0,wv))return[0,D0,ya];if(!P(X0,D5))return[0,D0,Kn0];if(!P(X0,xl))return[0,D0,zn0];if(!P(X0,ce))return[0,D0,Ri]}}return[0,D0,[4,P0,X0,Gl(D)]];case 66:var V0=x[4]?_2(x,Vr(x,r),96):x;return[0,V0,Nr];default:return[0,x,[7,Jx(r)]]}},n6=function(x){return function(r){for(var e=0,t=r;;){var u=p(x,t,t[2]);switch(u[0]){case 0:var i=u[2],f=u[1],o=iV(f,i),a=e===0?0:Ax(e),d=f[6];if(d===0)return[0,[0,f[1],f[2],f[3],f[4],f[5],f[6],o],[0,i,o,0,a]];var k=[0,i,o,Ax(d),a];return[0,[0,f[1],f[2],f[3],f[4],f[5],IJ,o],k];case 1:var T=u[2],g=u[1],e=[0,T,e],t=[0,g[1],g[2],g[3],g[4],g[5],g[6],T[1]];continue;default:var t=u[1];continue}}}},RS0=n6(AS0),OS0=n6(PS0),IS0=n6(CS0),LS0=n6(NS0),MS0=n6(ES0),w2=SJ([0,JT0]),u6=function(x,r){return[0,0,0,r,LJ(x)]},qy=function(x){var r=x[4];switch(x[3]){case 0:var J=l(MS0,r);break;case 1:var J=l(LS0,r);break;case 2:var J=l(OS0,r);break;case 3:var e=pe(r,r[2]),t=Fr(Jr),u=Fr(Jr),i=r[2];yr(i);var f=m(i),o=It>>0)var a=_(i);else switch(o){case 0:var a=1;break;case 1:var a=4;break;case 2:var a=0;break;case 3:r0(i,0);var a=le(m(i))===0?0:_(i);break;case 4:var a=2;break;default:var a=3}if(4>>0)var d=Nx(Qn0);else switch(a){case 0:var k=Jx(i);vr(u,k),vr(t,k);var T=dV(z2(r,i),t,u,i),g=pe(T,i),A=Y1(t),N=Y1(u),d=[0,T,[9,[0,T[1],e,g],A,N]];break;case 1:var d=[0,r,Nr];break;case 2:var d=[0,r,98];break;case 3:var d=[0,r,0];break;default:qa(i);var R=dV(r,t,u,i),O=pe(R,i),M=Y1(t),L=Y1(u),d=[0,R,[9,[0,R[1],e,O],M,L]]}var z=d[2],V=d[1],Z=iV(V,z),$=V[6];if($===0)var U=[0,V,[0,z,Z,0,0]];else var i0=[0,z,Z,Ax($),0],U=[0,[0,V[1],V[2],V[3],V[4],V[5],0,V[7]],i0];var J=U;break;case 4:var J=l(IS0,r);break;default:var J=l(RS0,r)}var Y=J[1],F=J[2],n0=[0,LJ(Y),F];return x[4]=Y,x[1]?x[2]=[0,n0]:x[1]=[0,n0],n0},yV=function(x){var r=x[1];return r?r[1][2]:qy(x)[2]},t3=function(x){return Bl(x[24][1])},_1=function(x){return x[28][4]},ux=function(x,r){var e=r[2];x[1][1]=[0,[0,r[1],e],x[1][1]];var t=x[23];return t?p(t[1],x,e):0},i6=function(x,r){return x[31][1]=r,0},Jo=function(x,r){if(x===0)return yV(r[26][1]);if(x!==1)throw q0([0,wr,Ps0],1);var e=r[26][1];e[1]||qy(e);var t=e[2];return t?t[1][2]:qy(e)[2]},Gs=function(x,r){return x===r[5]?r:[0,r[1],r[2],r[3],r[4],x,r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},mV=function(x,r){return x===r[10]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],x,r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},oI=function(x,r){return x===r[18]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],x,r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},vI=function(x,r){return x===r[19]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],x,r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},kV=function(x,r){return x===r[20]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],x,r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Zv=function(x,r){return x===r[22]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],x,r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},aI=function(x,r){return x===r[14]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],x,r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},f6=function(x,r){return x===r[8]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],x,r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},c6=function(x,r){return x===r[12]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],x,r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Wv=function(x,r){return x===r[15]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],x,r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},lI=function(x,r){return x===r[16]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],x,r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},hV=function(x,r){return x===r[6]?r:[0,r[1],r[2],r[3],r[4],r[5],x,r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},_V=function(x,r){return x===r[7]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],x,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},pI=function(x,r){return x===r[13]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],x,r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Gy=function(x,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],[0,x],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},dI=function(x){function r(e){return ux(x,e)}return function(e){return P2(r,e)}},n3=function(x){var r=x[4][1];return r?[0,r[1][2]]:0},wV=function(x){var r=x[4][1];return r?[0,r[1][1]]:0},TV=function(x){return[0,x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15],x[16],x[17],x[18],x[19],x[20],x[21],x[22],0,x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]]},SV=function(x,r,e,t){return[0,x[1],x[2],w2[1],x[4],x[5],0,0,0,0,0,1,x[12],x[13],x[14],x[15],x[16],x[17],e,r,x[20],t,x[22],x[23],x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]]},u3=function(x){return P(x,Tv)&&P(x,G2)&&P(x,ma)&&P(x,u8)&&P(x,Sl)&&P(x,F3)&&P(x,V3)&&P(x,De)&&P(x,B2)?0:1},$v=function(x){return P(x,gP)&&P(x,"eval")?0:1},by=function(x){var r=Tx(x,s8),e=0;if(0<=r){if(0>>0){if(M2>=t+1>>>0)return 1}else if(t===6)return 0}return o6(x,r)},i3=function(x){return AV(0,x)},Vo=function(x,r){var e=pr(x,r),t=0;if(typeof e=="number")switch(e){case 28:case 42:case 52:case 53:case 54:case 55:case 56:case 57:case 58:var u=1;break;default:t=1}else if(e[0]===4)var u=u3(e[2]);else t=1;if(t)var u=0;if(u)return 1;var i=0;if(typeof e=="number")switch(e){case 14:case 48:case 60:case 61:case 62:case 63:case 64:case 65:case 126:i=1;break}else e[0]===4&&(i=1);return i?1:0},x9=function(x,r){return EV(r,pr(x,r))},PV=function(x,r){var e=Vo(x,r);return e||x9(x,r)},vs=function(x){return Vo(0,x)},zo=function(x){var r=K(x)===15?1:0;if(r)var e=r;else{var t=K(x)===64?1:0;if(t){var u=pr(1,x)===15?1:0;if(u)var i=s6(1,x)[2][1],e=gx(x)[3][1]===i?1:0;else var e=u}else var e=t}return e},v6=function(x){var r=K(x);if(typeof r=="number")switch(r){case 13:case 40:return 1}else if(r[0]===4&&!P(r[3],x_)&&pr(1,x)===40)return 1;return 0},kI=function(x){var r=x[28][1];if(r){var e=K(x);if(typeof e!="number"&&e[0]===4&&!P(e[3],_o)&&Vo(1,x))return 1;var t=0}else var t=r;return t},hI=function(x){var r=K(x);return typeof r!="number"&&r[0]===4&&!P(r[3],rr)?1:0},zx=function(x,r){return ux(x,[0,gx(x),r])},CV=function(x,r){var e=tI(0,r);return x?[26,e,x[1]]:[24,e]},g1=function(x,r){var e=mI(r);return l(dI(r),e),zx(r,CV(x,K(r)))},r9=function(x){function r(e){return ux(x,[0,e[1],Nr])}return function(e){return P2(r,e)}},NV=function(x,r){var e=x[6]?G0(Tr(Es0),r,r,r):gs0;return g1([0,e],x)},Wt=function(x,r){var e=x[5];return e&&zx(x,r)},dt=function(x,r){var e=x[5],t=r[2],u=r[1];return e&&ux(x,[0,u,t])},Qv=function(x,r){return ux(x,[0,r,[14,x[5]]])},Z0=function(x){var r=x[27][1];if(r){var e=r[1],t=t3(x),u=K(x);l(e,[0,gx(x),u,t])}var i=x[26][1],f=i[1],o=f?f[1][1]:qy(i)[1];x[25][1]=o;var a=mI(x);l(dI(x),a);var d=x[2][1],k=us(Jo(0,x)[4],d);x[2][1]=k;var T=[0,Jo(0,x)];x[4][1]=T;var g=x[26][1];return g[2]?(g[1]=g[2],g[2]=0,0):(yV(g),g[1]=0,0)},v1=function(x,r){var e=p(bO,K(x),r);return e&&Z0(x),e},J1=function(x,r){x[24][1]=[0,r,x[24][1]];var e=t3(x),t=u6(x[25][1],e);return x[26][1]=t,0},W1=function(x){var r=x[24][1],e=r?r[2]:Nx(Ss0);x[24][1]=e;var t=t3(x),u=u6(x[25][1],t);return x[26][1]=u,0},yx=function(x){var r=gx(x);if(K(x)===9&&o6(1,x)){var e=_0(x),t=Jo(1,x)[4],u=Fx(e,l(Xl(function(f){return f[1][2][1]<=r[3][1]?1:0}),t));return i6(x,[0,r[3][1]+1|0,0]),u}var i=_0(x);return i6(x,r[3]),i},Ko=function(x){var r=x[4][1];if(!r)return 0;var e=r[1][2],t=_0(x),u=l(Xl(function(i){return i[1][2][1]<=e[3][1]?1:0}),t);return i6(x,[0,e[3][1]+1|0,0]),u},xo=function(x,r){return g1([0,tI(_s0,r)],x)},u0=function(x,r){return 1-p(bO,K(x),r)&&xo(x,r),Z0(x)},RV=function(x,r){var e=v1(x,r);return 1-e&&xo(x,r),e},e9=function(x,r){return RV(x,r),0},ro=function(x,r){var e=K(x),t=0;return typeof e!="number"&&e[0]===4&&Ar(e[3],r)&&(t=1),t||g1([0,l(Tr(hs0),r)],x),Z0(x)},as=[Gr,Ls0,Js(0)],OV=function(x,r,e){if(!e)return 0;var t=e[1],u=t[1],i=t[2];if(r[27][1]=[0,u],!x)return x;for(var f=i[2];;){if(!f)return 0;var o=f[2];l(u,f[1]);var f=o}},_I=function(x,r){var e=x[27][1];if(e){var t=e[1],u=kX(0),i=[0,function(z){return yO(z,u)}];x[27][1]=i;var f=[0,[0,t,u]]}else var f=0;var o=x[31][1],a=x[25][1],d=x[24][1],k=x[4][1],T=x[2][1],g=x[1][1];try{var A=l(r,x);OV(1,x,f);var N=[0,A];return N}catch(L){var R=I1(L);if(R!==as)throw q0(R,0);OV(0,x,f),x[1][1]=g,x[2][1]=T,x[4][1]=k,x[24][1]=d,x[25][1]=a,x[31][1]=o;var O=t3(x),M=u6(x[25][1],O);return x[26][1]=M,0}},t9=function(x,r,e){var t=_I(x,e);return t?t[1]:r},a6=function(x,r){var e=Ax(r);if(!e)return r;var t=e[1],u=e[2],i=l(x,t);return t===i?r:Ax([0,i,u])},IV=my(Bs0,function(x){var r=YO(x,Ds0),e=UO(x,Us0),t=e[24],u=e[28],i=e[41],f=e[91],o=e[dN],a=e[OR],d=e[_g],k=e[uB],T=e[Gx],g=e[RB],A=e[6],N=e[7],R=e[10],O=e[17],M=e[23],L=e[29],z=e[39],V=e[42],Z=e[52],$=e[61],i0=e[f2],U=e[U1],J=e[Ri],Y=e[ya],F=e[Pa],n0=e[rN],Q=e[Uw],f0=e[RU],s0=e[iU],v0=e[dE],o0=e[BT],c0=e[p5],T0=e[G4],E0=e[gT],M0=e[id],Y0=e[Lp],rx=e[TT],g0=e[H8],H0=e[rl],t0=e[Ug],ex=e[Av],xx=e[HD],ax=e[VM],dx=e[eY],mx=e[X4],L0=e[mU],C0=e[nY],A0=e[EU],U0=e[AU],Q0=e[GB],H=JO(x,0,0,uX,QO,1)[1];function b(e0,S0,G){var k0=G[2],J0=k0[2],I0=k0[1],ix=G[1];if(J0){var Wx=J0[1],Bx=function($x){return[0,ix,[0,I0,[0,$x]]]};return $0(l(e0[1][1+a],e0),Wx,G,Bx)}function Hx($x){return[0,ix,[0,$x,J0]]}return $0(p(e0[1][1+A],e0,S0),I0,G,Hx)}function B(e0,S0,G){var k0=G[2],J0=G[1],I0=J0[3],ix=J0[2],Wx=J0[1];if(I0)var Bx=a6(l(e0[1][1+u],e0),I0),Hx=ix;else var Bx=0,Hx=p(e0[1][1+u],e0,ix);var $x=p(e0[1][1+i],e0,k0);return ix===Hx&&I0===Bx&&k0===$x?G:[0,[0,Wx,Hx,Bx],$x]}function a0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function m0(e0,S0,G){var k0=G[3];function J0(I0){return[0,G[1],G[2],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function P0(e0,S0){var G=S0[2];function k0(J0){return[0,S0[1],J0]}return $0(l(e0[1][1+i],e0),G,S0,k0)}function D(e0,S0,G){var k0=G[3];function J0(I0){return[0,G[1],G[2],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function N0(e0,S0,G){var k0=G[2],J0=G[1],I0=a6(l(e0[1][1+a],e0),J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,I0,ix]}function X0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function D0(e0,S0,G){var k0=G[4];function J0(I0){return[0,G[1],G[2],G[3],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function ox(e0,S0,G){var k0=G[2];function J0(I0){return[0,G[1],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function b0(e0,S0,G){var k0=G[3],J0=G[2],I0=p(e0[1][1+J],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],I0,ix]}function kx(e0,S0,G){var k0=G[4],J0=G[3],I0=G[2],ix=G[1],Wx=p(e0[1][1+i],e0,k0);if(J0){var Bx=Vx(l(e0[1][1+g],e0),J0);return J0===Bx&&k0===Wx?G:[0,G[1],G[2],Bx,Wx]}if(I0){var Hx=Vx(l(e0[1][1+T],e0),I0);return I0===Hx&&k0===Wx?G:[0,G[1],Hx,G[3],Wx]}var $x=p(e0[1][1+a],e0,ix);return ix===$x&&k0===Wx?G:[0,$x,G[2],G[3],Wx]}function V0(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function h(e0,S0,G){var k0=G[4];function J0(I0){return[0,G[1],G[2],G[3],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function X(e0,S0,G){var k0=G[4];function J0(I0){return[0,G[1],G[2],G[3],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function W0(e0,S0,G){var k0=G[2],J0=G[1],I0=J0[3],ix=J0[2],Wx=J0[1];if(I0)var Bx=a6(l(e0[1][1+u],e0),I0),Hx=ix;else var Bx=0,Hx=p(e0[1][1+u],e0,ix);var $x=p(e0[1][1+i],e0,k0);return ix===Hx&&I0===Bx&&k0===$x?G:[0,[0,Wx,Hx,Bx],$x]}function sx(e0,S0,G){var k0=G[3],J0=G[1],I0=e2(l(e0[1][1+f],e0),J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,I0,G[2],ix]}function tx(e0,S0,G){var k0=G[2];function J0(I0){return[0,G[1],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function j0(e0,S0){if(S0[0]===0){var G=S0[1],k0=function(Hx){return[0,Hx]};return $0(l(e0[1][1+o],e0),G,S0,k0)}var J0=S0[1],I0=J0[2],ix=I0[2],Wx=J0[1],Bx=p(e0[1][1+o],e0,ix);return ix===Bx?S0:[1,[0,Wx,[0,I0[1],Bx]]]}function Px(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+c0],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function Ex(e0,S0){var G=S0[2],k0=S0[1],J0=G[4];function I0(ix){return[0,k0,[0,G[1],G[2],G[3],ix]]}return $0(l(e0[1][1+i],e0),J0,[0,k0,G],I0)}function Ix(e0,S0,G){var k0=G[9],J0=G[3],I0=p(e0[1][1+M0],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,G[4],G[5],G[6],G[7],G[8],ix,G[10]]}function qx(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function B0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function tr(e0,S0){var G=S0[2],k0=S0[1],J0=G[3];function I0(ix){return[0,k0,[0,G[1],G[2],ix]]}return $0(l(e0[1][1+i],e0),J0,[0,k0,G],I0)}function Ux(e0,S0,G){var k0=G[6],J0=G[5],I0=p(e0[1][1+ex],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],G[3],G[4],I0,ix,G[7]]}function K0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];if(k0===0){var ix=function(Hx){return[0,I0,[0,Hx,k0]]};return $0(l(e0[1][1+o],e0),J0,S0,ix)}function Wx(Hx){return[0,I0,[0,J0,Hx]]}var Bx=l(e0[1][1+t],e0);return $0(function(Hx){return Vx(Bx,Hx)},k0,S0,Wx)}function ur(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Bx){return[0,I0,[0,Bx,k0]]}var Wx=l(e0[1][1+d],e0);return $0(function(Bx){return a6(Wx,Bx)},J0,S0,ix)}function z0(e0,S0,G){var k0=G[2],J0=G[1];if(k0===0){var I0=function(Bx){return[0,Bx,G[2],G[3]]};return $0(l(e0[1][1+a],e0),J0,G,I0)}function ix(Bx){return[0,G[1],Bx,G[3]]}var Wx=l(e0[1][1+t],e0);return $0(function(Bx){return Vx(Wx,Bx)},k0,G,ix)}function or(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function Ur(e0,S0,G){var k0=G[7],J0=G[2],I0=p(e0[1][1+k],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],I0,G[3],G[4],G[5],G[6],ix]}function lx(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function a1(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function z1(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+g],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function w1(e0,S0,G){var k0=G[2];function J0(I0){return[0,G[1],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function Cr(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function n2(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function w(e0,S0){var G=S0[2];function k0(J0){return[0,S0[1],J0]}return $0(l(e0[1][1+i],e0),G,S0,k0)}function x0(e0,S0,G){var k0=G[2];function J0(I0){return[0,G[1],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}return zO(x,[0,V,function(e0,S0){var G=S0[2],k0=l(Xl(function(I0){return qs(I0[1][2],e0[1+r])<0?1:0}),G),J0=ns(k0);return ns(G)===J0?S0:[0,S0[1],k0,S0[3]]},Q0,x0,U0,w,A0,n2,C0,Cr,L0,w1,mx,z1,g,a1,T,lx,dx,Ur,k,or,ax,z0,xx,ur,d,K0,t0,Ux,H0,tr,g0,B0,rx,qx,Y0,Ix,E0,Ex,T0,Px,o0,j0,v0,tx,s0,sx,f0,W0,Q,X,n0,h,F,V0,U,kx,Y,b0,i0,ox,f,D0,$,X0,Z,N0,z,D,L,P0,M,m0,O,a0,R,B,N,b]),function(e0,S0,G){var k0=ky(S0,x);return k0[1+r]=G,l(H,k0),VO(S0,k0,x)}}),n9=function(x){var r=n3(x);if(r)var e=r[1],t=gV(x)?(i6(x,e[3]),[0,p(IV[1],0,e[3])]):0,u=t;else var u=0;return[0,0,function(i,f){return u?p(f,u[1],i):i}]},l6=function(x){var r=n3(x);if(r){var e=r[1];if(gV(x)){i6(x,e[3]);var t=Ko(x),u=[0,p(IV[1],0,[0,e[3][1]+1|0,0])],i=t}else var u=0,i=Ko(x)}else var u=0,i=0;return[0,i,function(f,o){return u?p(o,u[1],f):f}]},N1=function(x){return K2(x)?l6(x):n9(x)},Sn=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,Na,2),t,u)})},ne=function(x,r){if(!r)return 0;var e=r[1],t=N1(x)[2];return[0,p(t,e,function(u,i){return p(bx(u,GN,5),u,i)})]},wI=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,LD,8),t,u)})},f3=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,-1045824777,9),t,u)})},p6=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,-455772979,10),t,u)})},LV=function(x,r){if(!r)return 0;var e=r[1],t=N1(x)[2];return[0,p(t,e,function(u,i){return p(bx(u,nU,13),u,i)})]},En=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,oD,14),t,u)})},MV=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){var i=l(bx(t,GU,16),t);return a6(function(f){return e2(i,f)},u)})},DV=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,-21476009,17),t,u)})},DS0=function(x,r){var e=x[2],t=x[1];function u(a1){return R2(a1,r)}switch(e[0]){case 0:var i=e[1],f=qO(i[2],r),lx=[0,[0,i[1],f]];break;case 1:var o=e[1],a=u(o[2]),lx=[1,[0,o[1],a]];break;case 2:var d=e[1],k=u(d[7]),lx=[2,[0,d[1],d[2],d[3],d[4],d[5],d[6],k]];break;case 3:var T=e[1],g=T[7],A=u(T[6]),lx=[3,[0,T[1],T[2],T[3],T[4],T[5],A,g]];break;case 4:var N=e[1],R=u(N[2]),lx=[4,[0,N[1],R]];break;case 5:var lx=[5,[0,u(e[1][1])]];break;case 6:var O=e[1],M=u(O[7]),lx=[6,[0,O[1],O[2],O[3],O[4],O[5],O[6],M]];break;case 7:var L=e[1],z=u(L[5]),lx=[7,[0,L[1],L[2],L[3],L[4],z]];break;case 8:var V=e[1],Z=u(V[3]),lx=[8,[0,V[1],V[2],Z]];break;case 9:var $=e[1],i0=u($[5]),lx=[9,[0,$[1],$[2],$[3],$[4],i0]];break;case 10:var U=e[1],J=u(U[4]),lx=[10,[0,U[1],U[2],U[3],J]];break;case 11:var Y=e[1],F=u(Y[5]),lx=[11,[0,Y[1],Y[2],Y[3],Y[4],F]];break;case 12:var n0=e[1],Q=u(n0[4]),lx=[12,[0,n0[1],n0[2],n0[3],Q]];break;case 13:var f0=e[1],s0=u(f0[2]),lx=[13,[0,f0[1],s0]];break;case 14:var v0=e[1],o0=u(v0[4]),lx=[14,[0,v0[1],v0[2],v0[3],o0]];break;case 15:var c0=e[1],T0=u(c0[5]),lx=[15,[0,c0[1],c0[2],c0[3],c0[4],T0]];break;case 16:var E0=e[1],M0=u(E0[4]),lx=[16,[0,E0[1],E0[2],E0[3],M0]];break;case 17:var Y0=e[1],rx=u(Y0[3]),lx=[17,[0,Y0[1],Y0[2],rx]];break;case 18:var lx=[18,[0,u(e[1][1])]];break;case 19:var g0=e[1],H0=u(g0[3]),lx=[19,[0,g0[1],g0[2],H0]];break;case 20:var t0=e[1],ex=u(t0[3]),lx=[20,[0,t0[1],t0[2],ex]];break;case 21:var xx=e[1],ax=u(xx[5]),lx=[21,[0,xx[1],xx[2],xx[3],xx[4],ax]];break;case 22:var dx=e[1],mx=u(dx[3]),lx=[22,[0,dx[1],dx[2],mx]];break;case 23:var L0=e[1],C0=u(L0[5]),lx=[23,[0,L0[1],L0[2],L0[3],L0[4],C0]];break;case 24:var A0=e[1],U0=u(A0[5]),lx=[24,[0,A0[1],A0[2],A0[3],A0[4],U0]];break;case 25:var Q0=e[1],H=u(Q0[5]),lx=[25,[0,Q0[1],Q0[2],Q0[3],Q0[4],H]];break;case 26:var b=e[1],B=b[10],a0=u(b[9]),lx=[26,[0,b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],a0,B]];break;case 27:var m0=e[1],P0=u(m0[4]),lx=[27,[0,m0[1],m0[2],m0[3],P0]];break;case 28:var D=e[1],N0=u(D[5]),lx=[28,[0,D[1],D[2],D[3],D[4],N0]];break;case 29:var X0=e[1],D0=u(X0[5]),lx=[29,[0,X0[1],X0[2],X0[3],X0[4],D0]];break;case 30:var ox=e[1],b0=u(ox[3]),lx=[30,[0,ox[1],ox[2],b0]];break;case 31:var kx=e[1],V0=kx[3],h=u(kx[2]),lx=[31,[0,kx[1],h,V0]];break;case 32:var X=e[1],W0=X[4],sx=u(X[3]),lx=[32,[0,X[1],X[2],sx,W0]];break;case 33:var tx=e[1],j0=u(tx[2]),lx=[33,[0,tx[1],j0]];break;case 34:var Px=e[1],Ex=u(Px[4]),lx=[34,[0,Px[1],Px[2],Px[3],Ex]];break;case 35:var Ix=e[1],qx=u(Ix[4]),lx=[35,[0,Ix[1],Ix[2],Ix[3],qx]];break;case 36:var B0=e[1],tr=u(B0[5]),lx=[36,[0,B0[1],B0[2],B0[3],B0[4],tr]];break;case 37:var Ux=e[1],K0=u(Ux[3]),lx=[37,[0,Ux[1],Ux[2],K0]];break;case 38:var ur=e[1],z0=u(ur[3]),lx=[38,[0,ur[1],ur[2],z0]];break;default:var or=e[1],Ur=u(or[3]),lx=[39,[0,or[1],or[2],Ur]]}return[0,t,lx]};my(Ys0,function(x){var r=YO(x,Ms0),e=XO(js0),t=e.length-1,u=nX.length-1,i=Va(t+u|0,0),f=t-1|0,o=0;if(f>=0)for(var a=o;;){var d=Fl(x,Z1(e,a)[1+a]);Z1(i,a)[1+a]=d;var k=a+1|0;if(f!==a){var a=k;continue}break}var T=u-1|0,g=0;if(T>=0)for(var A=g;;){var N=A+t|0,R=YO(x,Z1(nX,A)[1+A]);Z1(i,N)[1+N]=R;var O=A+1|0;if(T!==A){var A=O;continue}break}var M=i[4],L=i[5],z=i[tj],V=i[_g],Z=i[295],$=i[296],i0=i[44],U=i[$3],J=i[NB],Y=JO(x,0,0,uX,QO,1)[1];function F(o0,c0,T0){return p(o0[1][1+z],o0,T0[2]),T0}function n0(o0,c0){return p(o0[1][1+V],o0,c0),c0}function Q(o0,c0){var T0=c0[1],E0=o0[1+$];if(E0){var M0=qs(E0[1][1][2],T0[2])<0?1:0,Y0=M0&&(o0[1+$]=[0,c0],0);return Y0}var rx=0<=qs(T0[2],o0[1+r][3])?1:0,g0=rx&&(o0[1+$]=[0,c0],0);return g0}function f0(o0,c0){var T0=c0[1],E0=o0[1+Z];if(E0){var M0=qs(T0[2],E0[1][1][2])<0?1:0,Y0=M0&&(o0[1+Z]=[0,c0],0);return Y0}var rx=qs(T0[2],o0[1+r][2])<0?1:0,g0=rx&&(o0[1+Z]=[0,c0],0);return g0}function s0(o0,c0){return c0?p(o0[1][1+V],o0,c0[1]):0}function v0(o0,c0){var T0=c0[2],E0=c0[1];return P2(l(o0[1][1+L],o0),E0),P2(l(o0[1][1+M],o0),T0)}return zO(x,[0,U,function(o0){return[0,o0[1+Z],o0[1+$]]},V,v0,z,s0,L,f0,M,Q,i0,n0,J,F]),function(o0,c0,T0){var E0=ky(c0,x);return E0[1+r]=T0,l(Y,E0),E0[1+Z]=0,E0[1+$]=0,VO(c0,E0,x)}});var jV=function(x){var r=K(x),e=0;if(typeof r=="number"){var t=r;if(49<=t)switch(t){case 49:var u=_o0;break;case 50:var u=wo0;break;case 51:var u=To0;break;case 52:var u=So0;break;case 53:var u=Eo0;break;case 54:var u=go0;break;case 55:var u=Ao0;break;case 56:var u=Po0;break;case 57:var u=Co0;break;case 58:var u=No0;break;case 59:var u=Ro0;break;case 60:var u=Oo0;break;case 61:var u=Io0;break;case 62:var u=Lo0;break;case 63:var u=Mo0;break;case 64:var u=Do0;break;case 65:var u=jo0;break;case 114:var u=Uo0;break;case 115:var u=Bo0;break;case 116:var u=Yo0;break;case 117:var u=Xo0;break;case 118:var u=Jo0;break;case 119:var u=Vo0;break;case 120:var u=zo0;break;case 121:var u=Ko0;break;case 122:var u=Zo0;break;case 123:var u=Wo0;break;case 124:var u=$o0;break;case 125:var u=Qo0;break;case 126:var u=Fo0;break;case 128:var u=Ho0;break;case 129:var u=qo0;break;default:e=1}else switch(t){case 15:var u=Xs0;break;case 16:var u=Js0;break;case 17:var u=Vs0;break;case 18:var u=zs0;break;case 19:var u=Ks0;break;case 20:var u=Zs0;break;case 21:var u=Ws0;break;case 22:var u=$s0;break;case 23:var u=Qs0;break;case 24:var u=Fs0;break;case 25:var u=Hs0;break;case 26:var u=qs0;break;case 27:var u=Gs0;break;case 28:var u=bs0;break;case 29:var u=xo0;break;case 30:var u=ro0;break;case 31:var u=eo0;break;case 32:var u=to0;break;case 33:var u=no0;break;case 34:var u=uo0;break;case 35:var u=io0;break;case 36:var u=fo0;break;case 37:var u=co0;break;case 38:var u=so0;break;case 39:var u=oo0;break;case 40:var u=vo0;break;case 41:var u=ao0;break;case 42:var u=lo0;break;case 43:var u=po0;break;case 44:var u=do0;break;case 45:var u=yo0;break;case 46:var u=mo0;break;case 47:var u=ko0;break;case 48:var u=ho0;break;default:e=1}}else switch(r[0]){case 4:var u=r[2];break;case 11:var i=r[1]?Go0:bo0,u=i;break;default:e=1}if(e){g1(xv0,x);var u=rv0}return Z0(x),u},T2=function(x){var r=gx(x),e=_0(x),t=jV(x);return[0,r,[0,t,y0([0,e],[0,yx(x)],0)]]},UV=function(x){var r=gx(x),e=_0(x);u0(x,14);var t=gx(x),u=jV(x),i=y0([0,e],[0,yx(x)],0),f=Hr(r,t),o=t[2],a=r[3],d=a[1]===o[1]?1:0,k=d&&(a[2]===o[2]?1:0);return 1-k&&ux(x,[0,f,Eo]),[0,f,[0,u,i]]},Fv=function(x){var r=x[2],e=r[3]===0?1:0,t=r[2];if(!e)return e;for(var u=t;;){if(!u)return 1;var i=u[1][2],f=0,o=u[2];if(i[1][2][0]===2&&!i[2]){var a=1;f=1}if(!f)var a=0;if(!a)return a;var u=o}},d6=function(x){for(var r=x;;){var e=r[2];if(e[0]!==30)return 0;var t=e[1][2];if(t[2][0]===26)return 1;var r=t}},u9=function(x,r,e){var t=e[2][1],u=e[1];if(!P(t,Pv)){var i=r[19];return i&&ux(r,[0,u,6])}if(P(t,ma)){if(!P(t,B2))return r[18]?ux(r,[0,u,st]):dt(r,[0,u,85])}else if(r[14])return ux(r,[0,u,[24,gy(t)]]);if(u3(t))return dt(r,[0,u,85]);if(by(t))return ux(r,[0,u,st]);if(x){var f=x[1];if($v(t))return dt(r,[0,u,f])}return 0},l0=function(x,r,e){var t=x?x[1]:gx(e),u=l(r,e),i=n3(e),f=i?Hr(t,i[1]):t;return[0,f,u]},i9=function(x,r,e){var t=l0(x,r,e),u=t[2];return[0,[0,t[1],u[1]],u[2]]},f9=function(x){J1(x,0);var r=K(x);W1(x);var e=pr(1,x),t=0;if(typeof r=="number")r===21&&(t=1);else if(r[0]===4)if(P(r[3],ka))t=1;else{var u=0;typeof e=="number"?e===21&&(u=1):e[0]===4&&(u=1),t=u?2:1}var i=0;switch(t){case 1:typeof e=="number"?h1===e&&(i=1):e[0]===4&&!P(e[3],ml)&&(i=1);break;case 0:break;default:i=1}return i?1:0},BV=function(x){switch(x){case 3:return 2;case 4:return 1;case 5:return 1;case 6:return 1;case 7:return 1;default:return 1}},TI=function(x,r,e){if(e){var t=e[1],u=0;if(t===8232||q1===t)u=1;else var i=t===10?6:t===13?5:il<=t?3:hN<=t?2:h1<=t?1:0;if(u)var i=7;var f=i}else var f=4;return[0,f,x]},jS0=[Gr,Mv0,Js(0)],YV=function(x,r,e,t){try{var u=Z1(x,r)[1+r];return u}catch(f){var i=I1(f);throw i[1]===iO?q0([0,jS0,e,G0(Tr(Iv0),t,r,x.length-1)],1):q0(i,0)}},c9=function(x,r){if(r[1]===0&&r[2]===0)return 0;var e=YV(x,r[1]-1|0,r,Rv0);return YV(e,r[2],r,Ov0)},XV=function(x){var r=[0,ua0,w2[1],0,0];function e(o){var a=K(o);if(typeof a=="number"){var d=0;if(8<=a?10>a&&(d=1):a===1&&(d=1),d)return 1}return 0}function t(o){var a=gx(o),d=_0(o),k=K(o);if(typeof k=="number")switch(k){case 30:case 31:Z0(o);var T=yx(o);return e(o)?[1,a,[0,k===31?1:0,y0([0,d],[0,T],0)]]:[0,a]}else switch(k[0]){case 0:var g=k[2],A=G0(x[24],o,k[1],g),N=yx(o);return e(o)?[2,a,[0,A,g,y0([0,d],[0,N],0)]]:[0,a];case 1:var R=k[2],O=G0(x[26],o,k[1],R),M=yx(o);return e(o)?[4,a,[0,O,R,y0([0,d],[0,M],0)]]:[0,a];case 2:var L=k[1],z=L[1],V=L[3],Z=L[2];L[4]&&Wt(o,81),Z0(o);var $=yx(o);return e(o)?[3,z,[0,Z,V,y0([0,d],[0,$],0)]]:[0,z]}return Z0(o),[0,a]}function u(o){var a=T2(o),d=K(o),k=0;if(typeof d=="number")if(d===82){u0(o,82);var T=t(o)}else if(d===86){zx(o,[8,a[2][1]]),u0(o,86);var T=t(o)}else k=1;else k=1;if(k)var T=0;return[0,a,T]}var i=0;function f(o,a,d,k,T,g,A){var N=ns(T),R=ns(g);function O(L){return[2,[0,[0,g],d,k,A]]}function M(L){return[2,[0,[1,T],d,k,A]]}return N===0?O(0):R===0?M(0):N>>0){if(M2>=i0+1>>>0){var U=Z[3],J=Z[4],Y=Ax(Z[1][5]),F=Ax(Z[1][4]),n0=Ax(Z[1][3]),Q=Ax(Z[1][2]),f0=Ax(Z[1][1]),s0=Fx(J,_0(R));u0(R,1);var v0=K(R),o0=0;if(typeof v0=="number"){var c0=0;if(v0===1||Nr===v0?c0=1:o0=1,c0)var T0=yx(R)}else o0=1;if(o0)var T0=K2(R)?Ko(R):0;var E0=X1([0,V],[0,T0],s0,0);if(z){switch(z[1]){case 0:var M0=[0,[0,f0,1,U,E0]];break;case 1:var M0=[1,[0,Q,1,U,E0]];break;case 2:var M0=f(R,g,1,U,n0,Y,E0);break;case 3:var M0=[3,[0,Y,U,E0]];break;default:var M0=[4,[0,F,1,U,E0]]}var Y0=M0}else{var rx=ns(f0),g0=ns(Q),H0=ns(n0),t0=ns(Y),ex=function(x0){return[2,[0,bv0,0,U,E0]]},xx=0;if(rx===0&&g0===0){var ax=0;if(H0===0&&t0===0)var dx=ex(0);else ax=1;if(ax)var dx=f(R,g,0,U,n0,Y,E0)}else xx=1;if(xx){var mx=0;if(g0===0&&H0===0&&t0<=rx){P2(function(e0){return ux(R,[0,e0[1],[3,g,e0[2][1][2][1]]])},Y);var dx=[0,[0,f0,0,U,E0]];mx=1}if(!mx){var L0=0;if(rx===0&&H0===0&&t0<=g0){P2(function(e0){return ux(R,[0,e0[1],[11,g,e0[2][1][2][1]]])},Y);var dx=[1,[0,Q,0,U,E0]];L0=1}if(!L0){ux(R,[0,A,[5,g]]);var dx=ex(0)}}}var Y0=dx}return Y0}}else if(i0===10){var C0=gx(R),A0=_0(R);Z0(R);var U0=K(R),Q0=0;if(typeof U0=="number"){var H=U0-2|0,b=0;if(U1>>0)M2>=H+1>>>0&&(b=1);else if(H===7){u0(R,9);var B=K(R),a0=0;if(typeof B=="number"){var m0=0;if((B===1||Nr===B)&&(m0=1),m0){var P0=1;a0=1}}if(!a0)var P0=0;ux(R,[0,C0,[6,P0]]),b=1}b&&(Q0=1)}Q0||ux(R,[0,C0,Gv0]);var Z=[0,Z[1],Z[2],1,A0];continue}}var D=Z[2],N0=Z[1],X0=l0(i,u,R),D0=X0[2],ox=D0[2],b0=D0[1],kx=X0[1],V0=b0[2][1],h=b0[1];if(Ar(V0,hx))var X=Z;else{var W0=O1(V0,0),sx=97<=W0?1:0,tx=sx&&(W0<=x1?1:0);tx&&ux(R,[0,h,[10,g,V0]]),p(w2[3],V0,D)&&ux(R,[0,h,[4,g,V0]]);var j0=Z[4],Px=Z[3],Ex=p(w2[4],V0,D),Ix=[0,Z[1],Ex,Px,j0],qx=function(w){return function(x0,e0){return z&&z[1]!==x0?ux(R,[0,e0,[9,g,z,w]]):0}}(V0);if(typeof ox=="number"){var B0=0;if(z)switch(z[1]){case 0:ux(R,[0,kx,[3,g,V0]]);var X=Ix;break;case 1:ux(R,[0,kx,[11,g,V0]]);var X=Ix;break;case 4:ux(R,[0,kx,[2,g,V0]]);var X=Ix;break;default:B0=1}else B0=1;if(B0)var X=[0,[0,N0[1],N0[2],N0[3],N0[4],[0,[0,kx,[0,b0]],N0[5]]],Ex,Px,j0]}else switch(ox[0]){case 0:ux(R,[0,ox[1],[9,g,z,V0]]);var X=Ix;break;case 1:var tr=ox[1],Ux=ox[2];qx(0,tr);var X=[0,[0,[0,[0,kx,[0,b0,[0,tr,Ux]]],N0[1]],N0[2],N0[3],N0[4],N0[5]],Ex,Px,j0];break;case 2:var K0=ox[1],ur=ox[2];qx(1,K0);var X=[0,[0,N0[1],[0,[0,kx,[0,b0,[0,K0,ur]]],N0[2]],N0[3],N0[4],N0[5]],Ex,Px,j0];break;case 3:var z0=ox[1],or=ox[2];qx(2,z0);var X=[0,[0,N0[1],N0[2],[0,[0,kx,[0,b0,[0,z0,or]]],N0[3]],N0[4],N0[5]],Ex,Px,j0];break;default:var Ur=ox[1],lx=ox[2];qx(4,Ur);var X=[0,[0,N0[1],N0[2],N0[3],[0,[0,kx,[0,b0,[0,Ur,lx]]],N0[4]],N0[5]],Ex,Px,j0]}}var a1=K(R),z1=0;if(typeof a1=="number"){var w1=a1-2|0,Cr=0;U1>>0?M2>=w1+1>>>0&&(Cr=1):w1===6&&(zx(R,22),u0(R,8),Cr=1),Cr&&(z1=1)}z1||u0(R,9);var Z=X}},a);return[0,T,N,y0([0,k],0,0)]}]},s9=function(x,r,e){if(typeof e=="number")return[0,x,r];if(e[0]===0){var t=e[1],u=Tx(x,t),i=e[2];return u===0?i===r?e:[0,t,r]:0<=u?[1,2,x,r,e,0]:[1,2,x,r,0,e]}var f=e[5],o=e[4],a=e[3],d=e[2],k=Tx(x,d),T=e[1];if(k===0)return a===r?e:[1,T,x,r,o,f];if(0<=k){var g=s9(x,r,f);return f===g?e:dJ(o,d,a,g)}var A=s9(x,r,o);return o===A?e:dJ(A,d,a,f)},c3=function(x){return[0,bs(x)]},SI=SJ([0,function(x,r){var e=r[2],t=x[2],u=NJ(x[1],r[1]);return u===0?p(RJ,t,e):u}]),y6=function(x,r,e){var t=e[2][1],u=e[1];return Ar(t,hx)?r:p(w2[3],t,r)?(ux(x,[0,u,[0,t]]),r):p(w2[4],t,r)},EI=function(x){return function(r){var e=r[2];switch(e[0]){case 0:var t=e[1][1];return x2(function(i,f){var o=f[0]===0?f[1][2][2]:f[1][2][1];return l(EI(i),o)},x,t);case 1:var u=e[1][1];return x2(function(i,f){if(f[0]===2)return i;var o=f[1][2][1];return l(EI(i),o)},x,u);case 2:return[0,e[1][1],x];default:return Nx(f60)}}},px=GX(s60,c60[1]),o9=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0,i=gx(e),f=K(e);if(typeof f=="number")switch(f){case 103:var o=_0(e);return Z0(e),[0,[0,i,[0,0,y0([0,o],0,0)]]];case 104:var a=_0(e);return Z0(e),[0,[0,i,[0,1,y0([0,a],0,0)]]];case 126:if(t){var d=_0(e);return Z0(e),[0,[0,i,[0,2,y0([0,d],0,0)]]]}break}else if(f[0]===4){var k=f[3];if(P(k,Po)){if(!P(k,A_)&&u&&x9(1,e)){var T=_0(e);return Z0(e),[0,[0,i,[0,4,y0([0,T],0,0)]]]}}else if(u&&x9(1,e)){var g=_0(e);Z0(e);var A=K(e),N=0;if(typeof A!="number"&&A[0]===4&&!P(A[3],A_)){var R=gx(e);Z0(e);var O=Hr(i,R),M=5;N=1}if(!N)var O=i,M=3;return[0,[0,O,[0,M,y0([0,g],0,0)]]]}}return 0},JV=function(x,r,e,t,u){r===1&&Wt(u,81);var i=_0(u);Z0(u);var f=yx(u);if(x)var o=y0([0,Fx(x[1],i)],[0,f],0),a=o,d=Qx(Nv0,t),k=-e;else var a=y0([0,i],[0,f],0),d=t,k=e;return[30,[0,k,d,a]]},VV=function(x,r,e,t){var u=_0(t);Z0(t);var i=yx(t);if(x)var f=y0([0,Fx(x[1],u)],[0,i],0),o=Qx(Cv0,e),a=f,d=o,k=uy(qR,r);else var a=y0([0,u],[0,i],0),d=e,k=r;return[31,[0,k,d,a]]},Wr=function x(r){return x.fun(r)},s3=function x(r){return x.fun(r)},zV=function x(r){return x.fun(r)},KV=function x(r){return x.fun(r)},gI=function x(r,e,t){return x.fun(r,e,t)},v9=function x(r){return x.fun(r)},AI=function x(r,e,t,u){return x.fun(r,e,t,u)},PI=function x(r){return x.fun(r)},CI=function x(r,e,t,u){return x.fun(r,e,t,u)},NI=function x(r){return x.fun(r)},RI=function x(r,e){return x.fun(r,e)},a9=function x(r){return x.fun(r)},ZV=function x(r){return x.fun(r)},l9=function x(r,e,t,u){return x.fun(r,e,t,u)},p9=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},WV=function x(r){return x.fun(r)},$V=function x(r,e){return x.fun(r,e)},OI=function x(r){return x.fun(r)},QV=function x(r){return x.fun(r)},FV=function x(r){return x.fun(r)},HV=function x(r){return x.fun(r)},qV=function x(r){return x.fun(r)},II=function x(r,e){return x.fun(r,e)},GV=function x(r){return x.fun(r)},bV=function x(r){return x.fun(r)},LI=function x(r){return x.fun(r)},m6=function x(r,e){return x.fun(r,e)},xz=function x(r){return x.fun(r)},eo=function x(r){return x.fun(r)},d9=function x(r){return x.fun(r)},rz=function x(r,e){return x.fun(r,e)},MI=function x(r){return x.fun(r)},ez=function x(r){return x.fun(r)},tz=function x(r){return x.fun(r)},nz=function x(r){return x.fun(r)},uz=function x(r){return x.fun(r)},y9=function x(r,e,t,u){return x.fun(r,e,t,u)},DI=function x(r){return x.fun(r)},m9=function x(r){return x.fun(r)},jI=function x(r,e){return x.fun(r,e)},k9=function x(r,e,t,u){return x.fun(r,e,t,u)},UI=function x(r){return x.fun(r)},Zo=function x(r){return x.fun(r)},iz=function x(r){return x.fun(r)},Hv=function x(r){return x.fun(r)},h9=function x(r){return x.fun(r)},_9=function x(r){return x.fun(r)},BI=function x(r,e){return x.fun(r,e)},fz=function x(r,e){return x.fun(r,e)},cz=function x(r){return x.fun(r)},sz=function x(r){return x.fun(r)},w9=function x(r){return x.fun(r)},oz=function x(r,e,t){return x.fun(r,e,t)};O0(Wr,function(x){return l(KV,x)}),O0(s3,function(x){return 1-_1(x)&&zx(x,b2),l0(0,function(r){return u0(r,86),l(Wr,r)},x)}),O0(zV,function(x){1-_1(x)&&zx(x,b2);var r=gx(x);return u0(x,86),f9(x)?[2,p(jI,x,r)]:[1,l0([0,r],Wr,x)]}),O0(KV,function(x){var r=gx(x),e=lI(0,x);return G0(gI,e,r,l(v9,e))}),O0(gI,function(x,r,e){var t=K(x);return typeof t=="number"&&t===41?l0([0,r],function(u){u0(u,41);var i=l(v9,lI(1,u));e9(u,85);var f=l(Wr,u);e9(u,86);var o=l(Wr,u);return[17,[0,e,i,f,o,y0(0,[0,yx(u)],0)]]},x):e}),O0(v9,function(x){var r=gx(x);if(K(x)===89){var e=_0(x);Z0(x);var t=e}else var t=0;return oe(AI,x,[0,t],r,l(PI,x))}),O0(AI,function(x,r,e,t){var u=r?r[1]:0;if(K(x)!==89)return t;var i=[0,t,0];return l0([0,e],function(f){for(var o=i;;){if(v1(f,89)){var o=[0,l(PI,f),o];continue}var a=Ax(o);if(a){var d=a[2];if(d){var k=d[2],T=d[1],g=a[1];return[22,[0,[0,g,T,k],y0([0,u],0,0)]]}}throw q0([0,wr,Pv0],1)}},x)}),O0(PI,function(x){var r=gx(x);if(K(x)===91){var e=_0(x);Z0(x);var t=e}else var t=0;return oe(CI,x,[0,t],r,l(NI,x))}),O0(CI,function(x,r,e,t){var u=r?r[1]:0;if(K(x)!==91)return t;var i=[0,t,0];return l0([0,e],function(f){for(var o=i;;){if(v1(f,91)){var o=[0,l(NI,f),o];continue}var a=Ax(o);if(a){var d=a[2];if(d){var k=d[2],T=d[1],g=a[1];return[23,[0,[0,g,T,k],y0([0,u],0,0)]]}}throw q0([0,wr,Av0],1)}},x)}),O0(NI,function(x){return p(RI,x,l(a9,x))}),O0(RI,function(x,r){var e=K(x);if(typeof e=="number"&&e===11&&!x[15]){var t=p(m6,x,r);return oe(y9,x,t[1],0,[0,t[1],[0,0,[0,t,0],0,0]])}return r}),O0(a9,function(x){var r=K(x);return typeof r=="number"&&r===85?l0(0,function(e){var t=_0(e);u0(e,85);var u=y0([0,t],0,0);return[11,[0,l(a9,e),u]]},x):l(ZV,x)}),O0(ZV,function(x){var r=gx(x);return oe(l9,0,x,r,l(FV,x))}),O0(l9,function(x,r,e,t){var u=x?x[1]:0;if(K2(r))return t;var i=K(r);if(typeof i=="number"){if(i===6)return Z0(r),Ye(p9,u,0,r,e,t);if(i===10){var f=pr(1,r);return typeof f=="number"&&f===6?(zx(r,Ev0),u0(r,10),u0(r,6),Ye(p9,u,0,r,e,t)):(zx(r,gv0),t)}if(i===83)return Z0(r),K(r)!==6&&zx(r,46),u0(r,6),Ye(p9,1,1,r,e,t)}return t}),O0(p9,function(x,r,e,t,u){return oe(l9,[0,x],e,t,l0([0,t],function(i){if(!r&&v1(i,7))return[16,[0,u,y0(0,[0,yx(i)],0)]];var f=l(Wr,i);u0(i,7);var o=[0,u,f,y0(0,[0,yx(i)],0)];return x?[21,[0,o,r]]:[20,o]},e))}),O0(WV,function(x){return p($V,x,p(px[13],0,x))}),O0($V,function(x,r){for(var e=[0,r[1],[0,r]];;){var t=e[2],u=e[1];if(K(x)===10&&PV(1,x)){var i=l0([0,u],function(a){return function(d){return u0(d,10),[0,a,T2(d)]}}(t),x),f=i[1],e=[0,f,[1,[0,f,i[2]]]];continue}return t}}),O0(OI,function(x){if(J1(x,0),K(x)===4){Z0(x);var r=l(OI,x);u0(x,5);var e=r}else var e=vs(x)?[0,l(WV,x)]:(zx(x,51),0);return W1(x),e}),O0(QV,function(x){return l0(0,function(r){var e=_0(r);u0(r,46);var t=l(OI,r);if(!t)return Sv0;var u=t[1],i=K2(r)?0:l(h9,r);return[24,[0,u,i,y0([0,e],0,0)]]},x)}),O0(FV,function(x){var r=gx(x),e=K(x),t=0;if(typeof e=="number")switch(e){case 4:return l(nz,x);case 6:return l(bV,x);case 46:return l(QV,x);case 53:return l0(0,function($){var i0=_0($);Z0($);var U=l(UI,$),J=U[2],Y=U[1];return[15,[0,J,Y,y0([0,i0],0,0)]]},x);case 98:return l(uz,x);case 104:return l0(0,HV,x);case 106:var u=_0(x);return Z0(x),[0,r,[10,y0([0,u],[0,yx(x)],0)]];case 125:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l(Wr,$);return[25,[0,J,y0([0,i0],[0,U],0)]]},x);case 126:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l(Wr,$);return[27,[0,J,y0([0,i0],[0,U],0)]]},x);case 127:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l0(0,function(Y){var F=l(Zo,Y);function n0(Q){if(1-v1(Q,41))throw q0(as,1);var f0=l(v9,Q);if(!Q[16]&&K(Q)===85)throw q0(as,1);return[1,[0,f0[1],f0]]}return[0,F,t9(Y,[0,gx(Y)],n0),1,0,0]},$);return[18,[0,J,y0([0,i0],[0,U],0)]]},x);case 0:case 2:var i=oe(k9,0,1,1,x);return[0,i[1],[14,i[2]]];case 130:case 131:t=2;break;case 41:case 42:t=1;break;case 30:case 31:var f=_0(x);return Z0(x),[0,r,[32,[0,e===31?1:0,y0([0,f],[0,yx(x)],0)]]]}else switch(e[0]){case 2:var o=e[1],a=o[3],d=o[2],k=o[1];o[4]&&Wt(x,81);var T=_0(x);return Z0(x),[0,k,[29,[0,d,a,y0([0,T],[0,yx(x)],0)]]];case 4:var g=e[3];if(P(g,_o))P(g,rr)?t=1:t=2;else{if(x[28][1])return l0(0,function($){var i0=_0($);ro($,hv0);var U=ne($,l(Hv,$)),J=l(MI,$);if(hI($))var n0=wI($,l(w9,$)),Q=J;else var Y=l(w9,$),F=N1($)[2],n0=Y,Q=p(F,J,function(f0,s0){return p(bx(f0,420776873,12),f0,s0)});return[13,[0,U,Q,n0,y0([0,i0],0,0)]]},x);t=1}break;case 7:if(!P(e[1],J3))return zx(x,89),[0,r,_v0];break;case 12:var A=e[3],N=e[2],R=e[1],O=0;return l0(0,function($){return JV(O,R,N,A,$)},x);case 13:var M=e[3],L=e[2],z=0;return l0(0,function($){return VV(z,L,M,$)},x)}switch(t){case 0:var V=l(GV,x);return V?[0,r,V[1]]:(g1(wv0,x),[0,r,Tv0]);case 2:return l0(0,function($){return[26,l(LI,$)]},x);default:var Z=l(_9,x);return[0,Z[1],[19,Z[2]]]}}),O0(HV,function(x){var r=_0(x);Z0(x);var e=K(x);if(typeof e!="number")switch(e[0]){case 12:return JV([0,r],e[1],e[2],e[3],x);case 13:return VV([0,r],e[2],e[3],x)}return g1(mv0,x),kv0}),O0(qV,function(x){var r=0;if(typeof x=="number")switch(x){case 29:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:case 123:case 124:r=1;break}else x[0]===11&&(r=1);return r?1:0}),O0(II,function(x,r){var e=_0(x),t=l0(0,Z0,x)[1],u=y0([0,e],[0,yx(x)],0);return[0,[19,[0,[0,wn(0,[0,t,r])],0,u]]]}),O0(GV,function(x){var r=_0(x),e=K(x);if(typeof e=="number")switch(e){case 29:return Z0(x),[0,[4,y0([0,r],[0,yx(x)],0)]];case 114:return Z0(x),[0,[0,y0([0,r],[0,yx(x)],0)]];case 115:return Z0(x),[0,[1,y0([0,r],[0,yx(x)],0)]];case 116:return Z0(x),[0,[2,y0([0,r],[0,yx(x)],0)]];case 117:return Z0(x),[0,[5,y0([0,r],[0,yx(x)],0)]];case 118:return Z0(x),[0,[6,y0([0,r],[0,yx(x)],0)]];case 119:return Z0(x),[0,[7,y0([0,r],[0,yx(x)],0)]];case 120:return Z0(x),[0,[3,y0([0,r],[0,yx(x)],0)]];case 121:return Z0(x),[0,[9,y0([0,r],[0,yx(x)],0)]];case 122:return Z0(x),[0,[33,y0([0,r],[0,yx(x)],0)]];case 123:return Z0(x),[0,[34,y0([0,r],[0,yx(x)],0)]];case 124:return Z0(x),[0,[35,y0([0,r],[0,yx(x)],0)]];case 128:return p(II,x,dv0);case 129:return p(II,x,yv0)}else if(e[0]===11){var t=e[1];Z0(x);var u=yx(x),i=t?-883944824:737456202;return[0,[8,i,y0([0,r],[0,u],0)]]}return 0}),O0(bV,function(x){return l0(0,function(r){var e=_0(r);u0(r,6);for(var t=Wv(0,r),u=0;;){var i=K(t);if(typeof i=="number"){var f=0;if(i!==7&&Nr!==i&&(f=1),!f){var o=Ax(u);return u0(r,7),[28,[0,o,y0([0,e],[0,yx(r)],0)]]}}var a=[0,l0(0,function(k){if(!v1(k,12)){var T=K(k),g=0;if(typeof T=="number"&&(nn===T||Dt===T&&Vo(1,k))){var A=o9(0,0,k);g=1}if(!g)var A=0;var N=vs(k),R=pr(1,k);if(N&&typeof R=="number"&&1>=R+Ms>>>0){var O=T2(k),M=v1(k,85);return u0(k,86),[1,[0,O,l(Wr,k),A,M]]}var L=A?1:0;return L&&zx(k,50),[0,l(Wr,k)]}var z=vs(k),V=pr(1,k),Z=0;if(z&&typeof V=="number"&&1>=V+Ms>>>0){var $=T2(k);K(k)===85&&(zx(k,49),Z0(k)),u0(k,86);var i0=[0,$];Z=1}if(!Z)var i0=0;return[2,[0,i0,l(Wr,k)]]},t),u];K(t)!==7&&u0(t,9);var u=a}},x)}),O0(LI,function(x){var r=_0(x),e=K(x),t=0;if(typeof e=="number")switch(e){case 130:var u=1;break;case 131:var u=2;break;default:t=1}else if(e[0]===4&&!P(e[3],rr))var u=0;else t=1;if(t)var u=Nx(pv0);var i=gx(x);Z0(x);var f=yx(x),o=l(a9,x);return[0,i,o,y0([0,r],[0,f],0),u]}),O0(m6,function(x,r){return[0,r[1],[0,0,r,0]]}),O0(xz,function(x){return l0(0,function(r){J1(r,0);var e=p(px[13],0,r);W1(r),1-_1(r)&&zx(r,b2);var t=v1(r,85);return u0(r,86),[0,[0,e],l(Wr,r),t]},x)});var vz=function(x){var r=pr(1,x);return typeof r=="number"&&1>=r+Ms>>>0?l(xz,x):p(m6,x,l(Wr,x))};O0(eo,function(x){var r=0;return function(e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number")switch(i){case 5:case 12:case 113:var f=i===12?[0,l0(0,function(A){var N=_0(A);u0(A,12);var R=y0([0,N],0,0);return[0,vz(A),R]},x)]:0;return[0,t,Ax(u),f,0]}else if(i[0]===4&&!P(i[3],lv)){var o=0;if(pr(1,x)!==86&&pr(1,x)!==85&&(o=1),!o){var a=t!==0?1:0,d=a||(u!==0?1:0);d&&zx(x,94);var k=l0(0,function(N){var R=_0(N);Z0(N),K(N)===85&&zx(N,93);var O=y0([0,R],0,0);return[0,l(s3,N),O]},x);K(x)!==5&&u0(x,9);var t=[0,k];continue}}var T=[0,vz(x),u];K(x)!==5&&u0(x,9);var u=T}}}),O0(d9,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);var t=p(eo,r,0),u=_0(r);u0(r,5);var i=X1([0,e],[0,yx(r)],u,0);return[0,t[1],t[2],t[3],i]},x)}),O0(rz,function(x,r){for(var e=r;;){var t=K(x);if(typeof t=="number"){var u=t-5|0,i=0;if(7>>0?sn===u&&(i=1):5>>0&&(i=1),i){var f=t===12?[0,l0(0,function(d){var k=_0(d);u0(d,12);var T=pr(1,d),g=0;if(typeof T=="number")if(T===85){J1(d,0);var A=p(px[13],0,d);W1(d),u0(d,85),u0(d,86);var R=1,O=[0,A]}else if(T===86){J1(d,0);var N=p(px[13],0,d);W1(d),u0(d,86);var R=0,O=[0,N]}else g=1;else g=1;if(g)var R=0,O=0;var M=l(Wr,d);return[0,O,M,R,y0([0,k],0,0)]},x)]:0;return[0,Ax(e),f,0]}}var o=[0,l0(0,function(d){var k=K(d),T=0;if(typeof k!="number"&&k[0]===2){var g=k[1],A=g[4],N=g[3],R=g[2],O=g[1];A&&Wt(d,81),u0(d,[2,[0,O,R,N,A]]);var M=[1,[0,O,[0,R,N,y0(0,[0,yx(d)],0)]]];T=1}if(!T){J1(d,0);var L=p(px[13],0,d);W1(d);var M=[0,L]}var z=v1(d,85);return[0,M,l(s3,d),z]},x),e];K(x)!==5&&u0(x,9);var e=o}}),O0(MI,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);var t=p(rz,r,0),u=_0(r);u0(r,5);var i=X1([0,e],[0,yx(r)],u,0);return[0,t[1],t[2],i]},x)}),O0(ez,function(x){var r=_0(x);u0(x,4);var e=Wv(0,x),t=K(e),u=0;if(typeof t=="number")switch(t){case 5:var a=lv0;break;case 130:var i=pr(1,e),f=0;if(typeof i=="number"&&i===86){var o=[0,p(eo,e,0)];f=1}if(!f)var o=[1,l(Wr,e)];var a=o;break;case 42:u=2;break;case 12:case 113:var a=[0,p(eo,e,0)];break;default:u=1}else if(t[0]===4)if(P(t[3],rr))u=2;else{var d=pr(1,e),k=0;if(typeof d=="number"&&1>=d+Ms>>>0){var T=[0,p(eo,e,0)];k=1}if(!k)var T=[1,l(Wr,e)];var a=T}else u=1;switch(u){case 1:if(l(qV,t)){var g=pr(1,e),A=0;if(typeof g=="number"&&1>=g+Ms>>>0){var N=[0,p(eo,e,0)];A=1}if(!A)var N=[1,l(Wr,e)];var a=N}else var a=[1,l(Wr,e)];break;case 2:var a=l(tz,e);break}if(a[0]===0)var R=a;else{var O=a[1];if(x[15])var M=a;else{var L=K(x),z=0;if(typeof L=="number")if(L===5)var V=pr(1,x)===11?[0,p(eo,x,[0,p(m6,x,O),0])]:[1,O];else if(L===9){u0(x,9);var V=[0,p(eo,x,[0,p(m6,x,O),0])]}else z=1;else z=1;if(z)var V=a;var M=V}var R=M}var Z=_0(x);u0(x,5);var $=yx(x);if(R[0]===0)var i0=R[1],U=X1([0,r],[0,$],Z,0),J=[0,[0,i0[1],i0[2],i0[3],U]];else var J=[1,G0(oz,R[1],r,$)];return J}),O0(tz,function(x){var r=pr(1,x);if(typeof r=="number"&&1>=r+Ms>>>0)return[0,p(eo,x,0)];var e=gx(x),t=p(fz,x,l(Zo,x)),u=l(G0(l9,0,x,e),t),i=l(l(RI,x),u),f=l(p(l(CI,x),0,e),i),o=l(p(l(AI,x),0,e),f);return[1,l(p(gI,lI(0,x),e),o)]}),O0(nz,function(x){var r=gx(x),e=l0(0,ez,x),t=e[2],u=e[1];return t[0]===0?oe(y9,x,r,0,[0,u,t[1]]):t[1]}),O0(uz,function(x){var r=gx(x),e=ne(x,l(Hv,x));return oe(y9,x,r,e,l(d9,x))}),O0(y9,function(x,r,e,t){return l0([0,r],function(u){return u0(u,11),[12,[0,e,t,l(DI,u),0]]},x)}),O0(DI,function(x){return f9(x)?[1,l(m9,x)]:[0,l(Wr,x)]}),O0(m9,function(x){return l0(0,function(r){var e=_0(r),t=v1(r,_l);J1(r,0);var u=T2(r);W1(r);var i=K(r),f=0;if(typeof i=="number"&&h1===i){var o=_0(r);u0(r,h1);var a=Fx(o,_0(r)),d=a,k=[0,l(Wr,r)];f=1}if(!f)var d=0,k=0;return[0,t,[0,u,k],X1([0,e],0,d,0)]},x)}),O0(jI,function(x,r){return l0([0,r],m9,x)});var T9=function(x,r,e){return l0([0,r],function(t){var u=l(d9,t);return u0(t,86),[0,e,u,l(DI,t),0]},x)},az=function(x,r,e,t,u){var i=En(x,t),f=T9(x,r,ne(x,l(Hv,x))),o=[0,f[1],[12,f[2]]],a=[0,i,[0,o],0,e!==0?1:0,0,1,0,y0([0,u],0,0)];return[0,[0,o[1],a]]},S9=function(x,r,e,t,u,i,f){var o=f[2],a=f[1];return 1-_1(x)&&zx(x,b2),[0,l0([0,r],function(d){var k=v1(d,85),T=RV(d,86)?l(Wr,d):[0,a,av0];return[0,o,[0,T],k,t!==0?1:0,u!==0?1:0,0,e,y0([0,i],0,0)]},x)]},k6=function(x,r){var e=K(r);if(typeof e=="number"&&10>e)switch(e){case 1:if(!x)return 0;break;case 3:if(x)return 0;break;case 8:case 9:return Z0(r)}return xo(r,9)},h6=function(x,r){return r?ux(x,[0,r[1][1],M2]):0},_6=function(x,r){return r?ux(x,[0,r[1],99]):0},US0=function(x,r,e,t,u,i,f,o,a){for(var d=e,k=t,T=u,g=i,A=f,N=o;;){var R=K(x);if(typeof R=="number")switch(R){case 6:_6(x,A);var O=pr(1,x);if(typeof O=="number"&&O===6)return h6(x,T),[4,l0([0,a],function(L0){var C0=Fx(N,_0(L0));u0(L0,6),u0(L0,6);var A0=T2(L0);u0(L0,7),u0(L0,7);var U0=K(L0),Q0=0;if(typeof U0=="number"){var H=0;if((U0===4||U0===98)&&(H=1),H){var b=T9(L0,a,ne(L0,l(Hv,L0))),B=0,a0=[0,b[1],[12,b[2]]],m0=1,P0=0;Q0=1}}if(!Q0){var D=v1(L0,85),N0=yx(L0);u0(L0,86);var B=N0,a0=l(Wr,L0),m0=0,P0=D}return[0,A0,a0,P0,g!==0?1:0,m0,y0([0,C0],[0,B],0)]},x)];var M=Fx(N,_0(x));u0(x,6);var L=pr(1,x);return typeof L!="number"&&L[0]===4&&!P(L[3],Po)&&g===0?[5,l0([0,a],function(L0){var C0=l(Zo,L0),A0=C0[1];Z0(L0);var U0=l(Wr,L0);u0(L0,7);var Q0=K(L0),H=0,b=[0,C0,[0,A0],0,0,0];if(typeof Q0=="number"){var B=Q0+JP|0,a0=0;if(1>>0)if(B===-18){Z0(L0);var m0=2}else a0=1;else var m0=B?(Z0(L0),u0(L0,85),1):(Z0(L0),u0(L0,85),0);if(!a0){var P0=m0;H=1}}if(!H)var P0=3;u0(L0,86);var D=l(Wr,L0);return[0,[0,A0,b],D,U0,T,P0,y0([0,M],[0,yx(L0)],0)]},x)]:[2,l0([0,a],function(L0){if(pr(1,L0)===86){var C0=T2(L0);u0(L0,86);var A0=[0,C0]}else var A0=0;var U0=l(Wr,L0);u0(L0,7);var Q0=yx(L0);u0(L0,86);var H=l(Wr,L0);return[0,A0,U0,H,g!==0?1:0,T,y0([0,M],[0,Q0],0)]},x)];case 42:if(d){if(T!==0)throw q0([0,wr,uv0],1);var z=[0,gx(x)],V=Fx(N,_0(x));Z0(x);var d=0,k=0,g=z,N=V;continue}break;case 126:if(T===0){var Z=0;if((Vo(1,x)||pr(1,x)===6)&&(Z=1),Z){var d=0,k=0,T=o9(iv0,0,x);continue}}break;case 103:case 104:if(T===0){var d=0,k=0,T=o9(0,0,x);continue}break;case 4:case 98:return _6(x,A),h6(x,T),[3,l0([0,a],function(L0){var C0=gx(L0),A0=T9(L0,C0,ne(L0,l(Hv,L0)));return[0,A0,g!==0?1:0,y0([0,N],0,0)]},x)]}else if(R[0]===4&&!P(R[3],YN)&&k){if(T!==0)throw q0([0,wr,fv0],1);var $=[0,gx(x)],i0=Fx(N,_0(x));Z0(x);var d=0,k=0,A=$,N=i0;continue}if(g){var U=g[1];if(A)return Nx(cv0);if(typeof R=="number"&&1>=R+Ms>>>0)return S9(x,a,T,0,A,0,[0,U,[3,wn(y0([0,N],0,0),[0,U,sv0])]])}else if(A){var J=A[1];if(typeof R=="number"&&1>=R+Ms>>>0)return S9(x,a,T,g,0,0,[0,J,[3,wn(y0([0,N],0,0),[0,J,ov0])]])}var Y=function(L0){J1(L0,0);var C0=p(px[20],0,L0);return W1(L0),C0},F=_0(x),n0=Y(x),Q=n0[1],f0=n0[2];if(f0[0]===3){var s0=f0[1][2][1],v0=0;if(P(s0,Cv)&&P(s0,Da)&&(v0=1),!v0){var o0=K(x);if(typeof o0=="number"){var c0=o0-5|0;if(92>>0){if(94>=c0+1>>>0)return _6(x,A),h6(x,T),az(x,a,g,f0,N)}else if(1>=c0+fj>>>0)return S9(x,a,T,g,A,N,[0,Q,f0])}En(x,f0);var T0=Y(x),E0=Ar(s0,Cv),M0=Fx(N,F);return _6(x,A),h6(x,T),[0,l0([0,a],function(L0){var C0=T0[1],A0=En(L0,T0[2]),U0=T9(L0,a,0),Q0=U0[2][2];if(E0){var H=Q0[2],b=0;if(H[1])ux(L0,[0,C0,28]),b=1;else{var B=0;H[2]||H[3]?B=1:b=1,B&&ux(L0,[0,C0,27])}}else{var a0=Q0[2],m0=0;if(a0[1])ux(L0,[0,C0,71]);else{var P0=a0[2],D=0;if(a0[3])ux(L0,[0,C0,70]),D=1;else{var N0=0;P0&&!P0[2]?D=1:N0=1,N0&&(ux(L0,[0,C0,70]),m0=1)}}}var X0=y0([0,M0],0,0),D0=0,ox=0,b0=0,kx=g!==0?1:0,V0=0,h=E0?[1,U0]:[2,U0];return[0,A0,h,V0,kx,b0,ox,D0,X0]},x)]}}var Y0=n0[2],rx=K(x);if(typeof rx=="number"){var g0=0;if(rx!==4&&rx!==98&&(g0=1),!g0)return _6(x,A),h6(x,T),az(x,a,g,Y0,N)}var H0=g!==0?1:0,t0=0;if(Y0[0]===3){var ex=Y0[1],xx=ex[2][1],ax=0,dx=ex[1];if(r){var mx=0;(Ar(Ev,xx)||H0&&Ar(Ao,xx))&&(mx=1),mx&&(ux(x,[0,dx,[15,xx,H0,0,0]]),t0=1,ax=1)}}return S9(x,a,T,g,A,N,[0,Q,Y0])}};O0(k9,function(x,r,e,t){var u=r&&(K(t)===2?1:0),i=r&&1-u;return l0(0,function(f){var o=_0(f),a=u?2:0;u0(f,a);for(var d=Wv(0,f),k=vv0;;){var T=k[3],g=k[2],A=k[1];if(x&&e)throw q0([0,wr,tv0],1);if(i&&!e)throw q0([0,wr,nv0],1);var N=gx(d),R=K(d);if(typeof R=="number"){var O=0;if(13<=R){if(Nr===R){var M=[0,Ax(A),g,T];O=1}}else if(R)switch(R-1|0){case 0:if(!u){var M=[0,Ax(A),g,T];O=1}break;case 2:if(u){var M=[0,Ax(A),g,T];O=1}break;case 11:if(!e){Z0(d);var L=K(d);if(typeof L=="number"&&10>L)switch(L){case 1:case 3:case 8:case 9:ux(d,[0,N,36]),k6(u,d);continue}var z=mI(d);l(dI(d),z),ux(d,[0,N,Zf]),Z0(d),k6(u,d);continue}var V=_0(d);Z0(d);var Z=K(d),$=0;if(typeof Z=="number"&&10>Z)switch(Z){case 1:case 3:case 8:case 9:k6(u,d);var i0=K(d),U=0;if(typeof i0=="number"){var J=i0-1|0;if(2>=J>>>0)switch(J){case 0:if(i){var M=[0,Ax(A),1,V];O=1,$=1,U=1}break;case 1:break;default:ux(d,[0,N,35]);var M=[0,Ax(A),g,T];O=1,$=1,U=1}}if(!U){ux(d,[0,N,97]);continue}break}if(!$){var Y=[1,l0([0,N],function(T0){return function(E0){var M0=y0([0,T0],0,0);return[0,l(Wr,E0),M0]}}(V),d)];k6(u,d);var k=[0,[0,Y,A],g,T];continue}break}if(O){var F=M[3],n0=M[2],Q=M[1],f0=Fx(F,_0(f)),s0=u?3:1;return u0(f,s0),[0,u,n0,Q,X1([0,o],[0,yx(f)],f0,0)]}}var v0=US0(d,x,x,x,0,0,0,0,N);k6(u,d);var k=[0,[0,v0,A],g,T]}},t)}),O0(UI,function(x){if(v1(x,41))for(var r=0;;){var e=[0,l(_9,x),r],t=K(x);if(typeof t=="number"&&t===9){u0(x,9);var r=e;continue}var u=MV(x,Ax(e));break}else var u=0;return[0,u,oe(k9,0,0,0,x)]}),O0(Zo,function(x){var r=T2(x),e=r[2],t=e[1],u=r[1],i=e[2];return yI(t)&&ux(x,[0,u,Rt]),[0,u,[0,t,i]]}),O0(iz,function(x){return l0(0,function(r){var e=l(Zo,r),t=K(r),u=0;if(typeof t=="number")if(t===41)var i=1,f=i,o=[1,l0(0,function(a){return Z0(a),l(Wr,a)},r)];else if(t===86)var f=0,o=[1,l(s3,r)];else u=1;else u=1;if(u)var f=0,o=[0,bs(r)];return[0,e,o,f]},x)});var lz=function(x,r){var e=EV(x,r);if(e)var t=e;else{var u=0;if(typeof r=="number"&&1>=r+JP>>>0){var i=1;u=1}if(!u)var i=0;if(!i){var f=0;if(typeof r=="number")switch(r){case 15:case 29:case 30:case 31:case 41:case 42:case 46:case 53:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:case 123:case 124:case 125:case 126:f=1;break}else switch(r[0]){case 4:if(yI(r[3]))return 1;break;case 11:f=1;break}return f?1:0}var t=i}return t};O0(Hv,function(x){if(K(x)!==98)return 0;1-_1(x)&&zx(x,b2);var r=l0(0,function(t){var u=_0(t);u0(t,98);for(var i=0,f=0;;){if(lz(t,K(t)))var o=i9(0,function(Z){return function($){var i0=o9(0,ev0,$),U=l(iz,$),J=U[2],Y=J[3],F=J[2],n0=J[1],Q=U[1],f0=K($),s0=0;if(typeof f0=="number"&&f0===82){Z0($);var v0=1,o0=[0,l(Wr,$)];s0=1}if(!s0){Z&&ux($,[0,Q,57]);var v0=Z,o0=0}return[0,[0,n0,F,Y,i0,o0],v0]}}(i),t),a=o[2],d=[0,o[1],f];else var a=i,d=f;var k=K(t),T=0;if(typeof k=="number"){var g=k+OB|0;if(14>>0){if(g===-90){Z0(t);var i=a,f=d;continue}}else if(12>>0){var A=Ax(d);T=1}}if(!T){var N=0;if(typeof k=="number")switch(k){case 4:case 82:N=2;break}else if(k[0]===4){var R=k[3],O=0;if(by(R))O=1;else{var M=0;if(P(R,Pv)&&P(R,B2)){var L=0;M=1}if(!M)var L=1;if(L)O=1;else if(P(R,ll))(!P(R,Tv)||!P(R,fi))&&(N=2);else if(t[28][2]){var z=1;N=1}}if(O){var z=1;N=1}}switch(N){case 0:var z=0;break;case 2:var z=1;break}if(!z){if(lz(t,k)){xo(t,9);var i=a,f=d;continue}u0(t,9);var i=a,f=d;continue}xo(t,99);var A=Ax(d)}var V=_0(t);return e9(t,99),[0,A,X1([0,u],[0,yx(t)],V,0)]}},x),e=r[1];return r[2][1]||ux(x,[0,e,56]),[0,r]}),O0(h9,function(x){return K(x)===98?[0,l0(0,function(r){var e=_0(r);u0(r,98);for(var t=Wv(0,r),u=0;;){var i=K(t);if(typeof i=="number"){var f=0;if(i!==99&&Nr!==i&&(f=1),!f){var o=Ax(u),a=_0(t);return u0(t,99),[0,o,X1([0,e],[0,yx(t)],a,0)]}}var d=[0,l(Wr,t),u];K(t)!==99&&u0(t,9);var u=d}},x)]:0}),O0(_9,function(x){return p(BI,x,l(Zo,x))}),O0(BI,function(x,r){function e(t){for(var u=[0,r[1],[0,r]];;){var i=u[2],f=u[1];if(K(t)===10&&x9(1,t)){var o=l0([0,f],function(g){return function(A){return u0(A,10),[0,g,l(Zo,A)]}}(i),t),a=o[1],u=[0,a,[1,[0,a,o[2]]]];continue}if(K(t)===98)var d=N1(t)[2],k=p(d,i,function(T,g){return p(bx(T,-860373976,61),T,g)});else var k=i;return[0,k,l(h9,t),0]}}return l0([0,r[1]],e,x)}),O0(fz,function(x,r){var e=p(BI,x,r);return[0,e[1],[19,e[2]]]}),O0(cz,function(x){var r=K(x);return typeof r=="number"&&r===86?l(zV,x):[0,bs(x)]}),O0(sz,function(x){var r=K(x);return typeof r=="number"&&r===86?[1,l(s3,x)]:[0,bs(x)]}),O0(w9,function(x){var r=K(x),e=0;if(typeof r=="number")switch(r){case 86:var t=gx(x);1-_1(x)&&zx(x,b2),zx(x,38),Z0(x);var u=l0(0,Wr,x);return[1,u[1],[0,t,u[2],0,0]];case 130:case 131:e=1;break}else r[0]===4&&!P(r[3],rr)&&(e=1);if(!e)return[0,bs(x)];1-_1(x)&&zx(x,b2);var i=l0([0,gx(x)],LI,x);return[1,i[1],i[2]]}),O0(oz,function(x,r,e){var t=x[2],u=x[1];function i(a0){return R2(a0,y0([0,r],[0,e],0))}switch(t[0]){case 0:var B=[0,i(t[1])];break;case 1:var B=[1,i(t[1])];break;case 2:var B=[2,i(t[1])];break;case 3:var B=[3,i(t[1])];break;case 4:var B=[4,i(t[1])];break;case 5:var B=[5,i(t[1])];break;case 6:var B=[6,i(t[1])];break;case 7:var B=[7,i(t[1])];break;case 8:var f=i(t[2]),B=[8,t[1],f];break;case 9:var B=[9,i(t[1])];break;case 10:var B=[10,i(t[1])];break;case 11:var o=t[1],a=i(o[2]),B=[11,[0,o[1],a]];break;case 12:var d=t[1],k=i(d[4]),B=[12,[0,d[1],d[2],d[3],k]];break;case 13:var T=t[1],g=i(T[4]),B=[13,[0,T[1],T[2],T[3],g]];break;case 14:var A=t[1],N=A[4],R=qO(N,y0([0,r],[0,e],0)),B=[14,[0,A[1],A[2],A[3],R]];break;case 15:var O=t[1],M=i(O[3]),B=[15,[0,O[1],O[2],M]];break;case 16:var L=t[1],z=i(L[2]),B=[16,[0,L[1],z]];break;case 17:var V=t[1],Z=i(V[5]),B=[17,[0,V[1],V[2],V[3],V[4],Z]];break;case 18:var $=t[1],i0=i($[2]),B=[18,[0,$[1],i0]];break;case 19:var U=t[1],J=i(U[3]),B=[19,[0,U[1],U[2],J]];break;case 20:var Y=t[1],F=i(Y[3]),B=[20,[0,Y[1],Y[2],F]];break;case 21:var n0=t[1],Q=n0[1],f0=n0[2],s0=i(Q[3]),B=[21,[0,[0,Q[1],Q[2],s0],f0]];break;case 22:var v0=t[1],o0=i(v0[2]),B=[22,[0,v0[1],o0]];break;case 23:var c0=t[1],T0=i(c0[2]),B=[23,[0,c0[1],T0]];break;case 24:var E0=t[1],M0=i(E0[3]),B=[24,[0,E0[1],E0[2],M0]];break;case 25:var Y0=t[1],rx=i(Y0[2]),B=[25,[0,Y0[1],rx]];break;case 26:var g0=t[1],H0=g0[4],t0=i(g0[3]),B=[26,[0,g0[1],g0[2],t0,H0]];break;case 27:var ex=t[1],xx=i(ex[2]),B=[27,[0,ex[1],xx]];break;case 28:var ax=t[1],dx=i(ax[2]),B=[28,[0,ax[1],dx]];break;case 29:var mx=t[1],L0=i(mx[3]),B=[29,[0,mx[1],mx[2],L0]];break;case 30:var C0=t[1],A0=i(C0[3]),B=[30,[0,C0[1],C0[2],A0]];break;case 31:var U0=t[1],Q0=i(U0[3]),B=[31,[0,U0[1],U0[2],Q0]];break;case 32:var H=t[1],b=i(H[2]),B=[32,[0,H[1],b]];break;case 33:var B=[33,i(t[1])];break;case 34:var B=[34,i(t[1])];break;default:var B=[35,i(t[1])]}return[0,u,B]});var pz=function(x,r){if(K(x)!==4)return[0,0,y0([0,r],[0,yx(x)],0)];var e=Fx(r,_0(x));u0(x,4),J1(x,0);var t=l(px[9],x);return W1(x),u0(x,5),[0,[0,t],y0([0,e],[0,yx(x)],0)]},BS0=function(x){var r=_0(x);return u0(x,66),pz(x,r)},YS0=0,dz=function(x){var r=Wv(0,x),e=K(r);return typeof e=="number"&&e===66?[0,l0(YS0,BS0,r)]:0},XS0=function(x){var r=K(x);if(typeof r=="number"&&r===86){1-_1(x)&&zx(x,b2);var e=bs(x),t=gx(x);u0(x,86);var u=K(x);if(typeof u=="number"&&u===66){var i=Wv(0,x);return[0,[0,e],[0,l0([0,t],function(a){var d=_0(a);return u0(a,66),pz(a,d)},i)]]}if(f9(x))return[0,[2,p(jI,x,t)],0];var f=[1,l0([0,t],Wr,x)],o=K(x)===66?f3(x,f):f;return[0,o,dz(x)]}return[0,[0,bs(x)],0]},de=function(x,r){var e=Gs(1,r);J1(e,1);var t=l(x,e);return W1(e),t},to=function(x){return de(Wr,x)},ls=function(x){return de(Zo,x)},Ke=function(x){return de(Hv,x)},yz=function(x){return de(h9,x)},qv=function(x){return de(s3,x)},YI=function(x){return de(sz,x)},XI=function(x){return de(cz,x)},JI=function(x){return de(XS0,x)},mz=function(x){return de(_9,x)},VI=function(x){return de(w9,x)},JS0=XV(px),Wo=function(x,r){var e=r[2],t=r[1],u=x[1];switch(e[0]){case 0:return x2(VS0,x,e[1][1]);case 1:return x2(zS0,x,e[1][1]);case 2:var i=e[1][1],f=i[2][1],o=x[2],a=x[1],d=i[1];p(w2[3],f,o)&&ux(a,[0,d,82]);var k=i[2][1],T=i[1];return $v(k)&&dt(a,[0,T,83]),u3(k)&&dt(a,[0,T,85]),[0,a,p(w2[4],f,o)];default:return ux(u,[0,t,24]),x}},VS0=function(x){return function(r){return r[0]===0?Wo(x,r[1][2][2]):Wo(x,r[1][2][1])}},zS0=function(x){return function(r){switch(r[0]){case 0:return Wo(x,r[1][2][1]);case 1:return Wo(x,r[1][2][1]);default:return x}}},kz=function(x,r){var e=r[2],t=e[3],u=e[2],i=[0,x,w2[1]],f=x2(function(o,a){return Wo(o,a[2][1])},i,u);return t&&Wo(f,t[1][2][1]),0},hz=function(x,r,e,t){var u=x[5],i=t[0]===0?Fv(t[1]):0,f=Gs(u?0:r,x),o=r||u||1-i;if(!o)return o;if(e){var a=e[1],d=a[2][1],k=a[1];$v(d)&&dt(f,[0,k,75]),u3(d)&&dt(f,[0,k,85])}if(t[0]===0)return kz(f,t[1]);var T=t[1][2],g=T[2],A=T[1],N=[0,Ka,[0,[0,_n(function(O){var M=O[2],L=M[1],z=M[4],V=M[3],Z=M[2],$=L[0]===0?[3,L[1]]:[0,[0,Ka,L[1][2]]];return[0,[0,Ka,[0,$,Z,V,z]]]},A),[0,Ka],0]]],R=Wo([0,f,w2[1]],N);return g&&Wo(R,g[1][2][1]),0},o3=function(x,r,e,t){return hz(x,r,e,[0,t])},_z=function(x,r){if(r!==12)return 0;var e=_0(x),t=l0(0,function(f){return u0(f,12),p(px[18],f,83)},x),u=t[2],i=t[1];return[0,[0,i,u,y0([0,e],0,0)]]},zI=function x(r,e){return x.fun(r,e)},KS0=function(x){K(x)===21&&zx(x,94);var r=p(px[18],x,83),e=K(x)===82?(u0(x,82),[0,l(px[10],x)]):0;return[0,r,e]},ZS0=0;O0(zI,function(x,r){var e=K(x);if(typeof e=="number"){var t=e-5|0,u=0;if(7>>0?sn===t&&(u=1):5>>0&&(u=1),u){var i=_z(x,e),f=uy(function(a){return[0,a[1],[0,a[2],a[3]]]},i);return K(x)!==5&&zx(x,66),[0,Ax(r),f]}}var o=l0(ZS0,KS0,x);return K(x)!==5&&u0(x,9),p(zI,x,[0,o,r])});var v3=function(x,r){function e(u){var i=mV(1,oI(r,vI(x,u))),f=_0(i);u0(i,4);var o=0;if(_1(i)&&K(i)===21){var a=_0(i),d=l0(0,function(z){return u0(z,21),K(z)===86?[0,qv(z)]:(zx(z,90),0)},i),k=d[2],T=d[1];if(k){var g=k[1];K(i)===9&&Z0(i);var A=[0,[0,T,[0,g,y0([0,a],0,0)]]]}else var A=0}else o=1;if(o)var A=0;var N=p(zI,i,0),R=N[2],O=N[1],M=_0(i);return u0(i,5),[0,A,O,R,X1([0,f],[0,yx(i)],M,0)]}var t=0;return function(u){return l0(t,e,u)}},wz=function(x,r,e,t,u){var i=SV(x,r,e,u);return p(px[16],t,i)},w6=function(x,r,e,t,u){var i=wz(x,r,e,t,u);return[0,[0,i[1]],i[2]]},a3=function(x){if(f2!==K(x))return da0;var r=_0(x);return Z0(x),[0,1,r]},E9=function(x){if(K(x)===64&&!o6(1,x)){var r=_0(x);return Z0(x),[0,1,r]}return pa0},WS0=function(x){var r=E9(x),e=r[1],t=r[2],u=l0(0,function(O){var M=_0(O);u0(O,15);var L=a3(O),z=L[1],V=Yl([0,t,[0,M,[0,L[2],0]]]),Z=O[7],$=K(O),i0=0;if(Z&&typeof $=="number"){if($===4){var F=0,n0=0;i0=1}else if($===98){var U=ne(O,Ke(O)),J=K(O)===4?0:[0,Sn(O,p(px[13],oa0,O))],F=J,n0=U;i0=1}}if(!i0)var Y=vs(O)?Sn(O,p(px[13],va0,O)):(NV(O,aa0),[0,gx(O),la0]),F=[0,Y],n0=ne(O,Ke(O));var Q=l(v3(e,z),O),f0=K(O)===86?Q:p6(O,Q),s0=JI(O),v0=s0[2],o0=s0[1];if(v0)var c0=LV(O,v0),T0=o0;else var c0=v0,T0=f3(O,o0);return[0,z,n0,F,f0,T0,c0,V]},x),i=u[2],f=i[4],o=i[3],a=i[1],d=i[7],k=i[6],T=i[5],g=i[2],A=u[1],N=w6(x,e,a,0,Fv(f)),R=N[1];return o3(x,N[2],o,f),[26,[0,o,f,R,e,a,k,T,g,y0([0,d],0,0),A]]},$S0=0,T6=function(x){return l0($S0,WS0,x)},KI=function(x,r){var e=_0(r);u0(r,x);var t=r[28][2];if(t)var u=x===27?1:0,i=u&&(K(r)===48?1:0);else var i=t;i&&zx(r,23);for(var f=0,o=0;;){var a=l0(0,function(N){var R=p(px[18],N,86);if(v1(N,82))var O=0,M=[0,l(px[10],N)];else{var L=R[1];if(R[2][0]===2)var O=0,M=0;else var O=[0,[0,L,63]],M=0}return[0,[0,R,M],O]},r),d=a[2],k=d[2],T=[0,[0,a[1],d[1]],f],g=k?[0,k[1],o]:o;if(v1(r,9)){var f=T,o=g;continue}var A=Ax(g);return[0,Ax(T),e,A]}},QS0=24,Tz=function(x){return KI(QS0,x)},Sz=function(x){var r=KI(27,aI(1,x)),e=r[1],t=r[3],u=r[2];return[0,e,u,Ax(x2(function(i,f){return f[2][2]?i:[0,[0,f[1],62],i]},t,e))]},Ez=function(x){return KI(28,aI(1,x))},gz=function(x){function r(t){return[19,p(JS0[1],x,t)]}var e=0;return function(t){return l0(e,r,t)}},ZI=function x(r,e){return x.fun(r,e)},FS0=function(x){var r=_0(x),e=K(x),t=pr(1,x),u=0;if(typeof e!="number"&&e[0]===2){var i=e[1],f=i[4],o=i[3],a=i[2],d=i[1],k=0;if(typeof t=="number")switch(t){case 85:case 86:k=2;break;default:k=1}else t[0]===4?P(t[3],vn)||(k=2):k=1;switch(k){case 0:break;case 1:break;default:f&&Wt(x,81),u0(x,[2,[0,d,a,o,f]]);var T=[1,[0,d,[0,a,o,y0([0,r],[0,yx(x)],0)]]],g=0;if(typeof t=="number"&&!(1>>0)){var A=t===85?1:0;zx(x,[16,A,a]),A&&Z0(x);var N=gx(x),R=0,O=[0,N,[2,[0,[0,N,ca0],YI(x),A]]],M=T;u=1}else g=1;if(g){Z0(x);var R=0,O=p(px[18],x,83),M=T;u=1}}}if(!u){var L=0;if(typeof t!="number"&&t[0]===4&&!P(t[3],vn)){var z=[0,T2(x)];ro(x,sa0);var R=0,O=p(px[18],x,83),M=z;L=1}if(!L)var V=G0(px[14],x,0,83),Z=V[2],R=1,O=[0,V[1],[2,Z]],M=[0,Z[1]]}var $=K(x)===82?(u0(x,82),[0,l(px[10],x)]):0;return[0,M,O,$,R]},HS0=0;O0(ZI,function(x,r){var e=K(x);if(typeof e=="number"){var t=e-5|0,u=0;if(7>>0?sn===t&&(u=1):5>>0&&(u=1),u){var i=_z(x,e),f=uy(function(a){return[0,a[1],[0,a[2],a[3]]]},i);return K(x)!==5&&zx(x,66),[0,Ax(r),f]}}var o=l0(HS0,FS0,x);return K(x)!==5&&u0(x,9),p(ZI,x,[0,o,r])});var qS0=function(x){var r=mV(1,x),e=_0(r);u0(r,4);var t=p(ZI,r,0),u=t[2],i=t[1],f=_0(r);return u0(r,5),[0,i,u,X1([0,e],[0,yx(r)],f,0)]},GS0=0,bS0=function(x){var r=l0(0,function(T){var g=_0(T);ro(T,ia0);var A=Sn(T,p(px[13],fa0,T)),N=ne(T,Ke(T)),R=l0(GS0,qS0,T);if(hI(T))var M=R;else var O=N1(T)[2],M=p(O,R,function(L,z){return p(bx(L,842685896,11),L,z)});return[0,N,A,M,wI(T,VI(T)),g]},x),e=r[2],t=e[3],u=e[2],i=e[5],f=e[4],o=e[1],a=r[1],d=wz(x,0,0,0,0),k=d[1];return hz(x,d[2],[0,u],[1,t]),[3,[0,u,o,t,f,k,y0([0,i],0,0),a]]},xE0=0,WI=function(x){return l0(xE0,bS0,x)},v2=function(x,r){if(r[0]===0)return r[1];var e=r[2][1],t=r[1];return P2(function(u){return ux(x,u)},e),t},$I=function(x,r,e){var t=x?x[1]:41;if(e[0]===0)var u=e[1];else{var i=e[2][2],f=e[1];P2(function(T){return ux(r,T)},i);var u=f}1-l(px[23],u)&&ux(r,[0,u[1],t]);var o=u[2],a=0;if(o[0]===9){var d=u[1];$v(o[1][2][1])&&(dt(r,[0,d,76]),a=1)}return p(px[19],r,u)},QI=function(x,r){var e=us(x[2],r[2]);return[0,us(x[1],r[1]),e]},Az=function(x){var r=Ax(x[2]);return[0,Ax(x[1]),r]},Pz=function(x,r){var e=x[0]===0?x[1]:x[1]-1|0,t=(r[0]===0,r[1]);return t<=e?1:0},l3=function x(r){return x.fun(r)},$t=function x(r){return x.fun(r)},Cz=function x(r){return x.fun(r)},FI=function x(r){return x.fun(r)},Nz=function x(r){return x.fun(r)},HI=function x(r){return x.fun(r)},Rz=function x(r){return x.fun(r)},Oz=function x(r){return x.fun(r)},S6=function x(r){return x.fun(r)},qI=function x(r){return x.fun(r)},GI=function x(r){return x.fun(r)},bI=function x(r){return x.fun(r)},Iz=function x(r){return x.fun(r)},xL=function x(r){return x.fun(r)},g9=function x(r){return x.fun(r)},rL=function x(r){return x.fun(r)},Lz=function x(r){return x.fun(r)},Gv=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},eL=function x(r,e,t,u){return x.fun(r,e,t,u)},tL=function x(r){return x.fun(r)},A9=function x(r){return x.fun(r)},nL=function x(r){return x.fun(r)},uL=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},Mz=function x(r,e,t,u){return x.fun(r,e,t,u)},iL=function x(r){return x.fun(r)},P9=function x(r,e,t){return x.fun(r,e,t)},Dz=function x(r){return x.fun(r)},C9=function x(r,e,t){return x.fun(r,e,t)},fL=function x(r){return x.fun(r)},jz=function x(r){return x.fun(r)},cL=function x(r,e){return x.fun(r,e)},sL=function x(r,e,t,u){return x.fun(r,e,t,u)},Uz=function x(r){return x.fun(r)},oL=function x(r,e,t){return x.fun(r,e,t)},Bz=function x(r){return x.fun(r)},Yz=function x(r){return x.fun(r)},vL=function x(r){return x.fun(r)},N9=function x(r,e,t){return x.fun(r,e,t)},rE0=function(x){var r=x[2];switch(r[0]){case 22:var e=r[1],t=e[1][2][1];if(P(t,D2)){if(!P(t,av)&&!P(e[2][2][1],jS))return 0}else if(!P(e[2][2][1],hl))return 0;break;case 0:case 9:case 21:case 24:break;default:return 0}return 1},aL=function(x){var r=gx(x),e=l(HI,x),t=l(Nz,x);if(!t)return e;var u=t[1];return[0,l0([0,r],function(i){var f=$I(0,i,e);return[3,[0,u,f,l($t,i),0]]},x)]},eE0=function(x,r){if(typeof r=="number"&&r===85)return 0;throw q0(as,1)},Xz=function(x){var r=Gy(eE0,x),e=aL(r),t=K(r);if(typeof t=="number"){if(t===11)throw q0(as,1);if(t===86){var u=wV(r),i=0;if(u){var f=u[1];if(typeof f=="number"&&f===5){var o=1;i=1}}if(!i)var o=0;if(o)throw q0(as,1)}}if(!vs(r))return e;if(e[0]===0){var a=e[1][2];if(a[0]===9&&!P(a[1][2][1],Co)&&!K2(r))throw q0(as,1)}return e};O0(l3,function(x){var r=vs(x);if(r){var e=K(x),t=0;if(typeof e=="number"){if(e===58){if(x[18]){var u=0;t=1}}else if(e===65&&x[19]){var u=0;t=1}}if(!t)var u=1;var i=u}else var i=r;var f=K(x),o=0;if(typeof f=="number"){var a=0;if(22<=f)if(f===58){if(x[18])return[0,l(Cz,x)];a=1}else f!==98&&(a=1);else f!==4&&21>f&&(a=1);a||(o=1)}if(!o&&!i)return aL(x);var d=0;if(f===64&&_1(x)&&pr(1,x)===98){var k=Xz,T=vL;d=1}if(!d)var k=vL,T=Xz;var g=_I(x,T);if(g)return g[1];var A=_I(x,k);return A?A[1]:aL(x)}),O0($t,function(x){return v2(x,l(l3,x))}),O0(Cz,function(x){return l0(0,function(r){r[10]&&zx(r,dv);var e=_0(r),t=gx(r);u0(r,58);var u=gx(r);if(i3(r))var i=0,f=0;else{var o=v1(r,f2),a=K(r),d=0;if(typeof a=="number"){var k=0;if(a===86)k=1;else if(10>a)switch(a){case 0:case 2:case 3:case 4:case 6:break;default:k=1}if(k){var T=0;d=1}}if(!d)var T=1;var g=0;if(!o&&!T){var A=0;g=1}if(!g)var A=[0,l($t,r)];var i=o,f=A}var N=f?0:yx(r),R=Hr(t,u);return[36,[0,f,y0([0,e],[0,N],0),i,R]]},x)}),O0(FI,function(x){var r=x[2];switch(r[0]){case 22:var e=r[1],t=e[1][2][1];if(P(t,D2)){if(!P(t,av)&&!P(e[2][2][1],jS))return 0}else if(!P(e[2][2][1],hl))return 0;break;case 9:case 21:break;default:return 0}return 1}),O0(Nz,function(x){var r=K(x),e=0;if(typeof r=="number"){var t=r+nj|0;if(15>=t>>>0){switch(t){case 0:var u=R30;break;case 1:var u=O30;break;case 2:var u=I30;break;case 3:var u=L30;break;case 4:var u=M30;break;case 5:var u=D30;break;case 6:var u=j30;break;case 7:var u=U30;break;case 8:var u=B30;break;case 9:var u=Y30;break;case 10:var u=X30;break;case 11:var u=J30;break;case 12:var u=V30;break;case 13:var u=z30;break;case 14:var u=K30;break;default:var u=Z30}var i=u;e=1}}if(!e)var i=0;return i!==0&&Z0(x),i}),O0(HI,function(x){var r=gx(x),e=l(Oz,x);if(K(x)!==85)return e;Z0(x);var t=l($t,c6(0,x));u0(x,86);var u=l0([0,r],$t,x),i=u[2],f=u[1];return[0,[0,f,[7,[0,v2(x,e),t,i,0]]]]}),O0(Rz,function(x){return v2(x,l(HI,x))});var lL=function(x,r,e,t,u){var i=v2(x,r);return[0,[0,u,[20,[0,t,i,v2(x,e),0]]]]},pL=function(x,r,e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number"&&i===88){Z0(x);var f=l0(0,S6,x),o=f[2],a=Hr(u,f[1]),d=dL(0,x,lL(x,t,o,1,a),a),t=d[2],u=d[1];continue}return[0,u,t]}},Jz=function(x,r,e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number"&&i===87){Z0(x);var f=l0(0,S6,x),o=pL(x,f[2],f[1]),a=o[2],d=Hr(u,o[1]),k=dL(0,x,lL(x,t,a,0,d),d),t=k[2],u=k[1];continue}return[0,u,t]}},dL=function(x,r,e,t){for(var u=x,i=e,f=t;;){var o=K(r);if(typeof o=="number"&&o===84){1-u&&zx(r,N30),u0(r,84);var a=l0(0,S6,r),d=a[2],k=a[1],T=K(r),g=0;if(typeof T=="number"&&1>=T-87>>>0){zx(r,[20,eI(T)]);var A=pL(r,d,k),N=Jz(r,A[2],A[1]),R=N[2],O=N[1];g=1}if(!g)var R=d,O=k;var M=Hr(f,O),u=1,i=lL(r,i,R,2,M),f=M;continue}return[0,f,i]}};O0(Oz,function(x){var r=l0(0,S6,x),e=r[2],t=r[1],u=K(x),i=0;if(typeof u=="number"&&u===84){var o=dL(1,x,e,t);i=1}if(!i)var f=pL(x,e,t),o=Jz(x,f[2],f[1]);return o[2]});var yL=function(x,r,e,t){return[0,t,[4,[0,e,x,r,0]]]};O0(S6,function(x){var r=0;x:for(;;){var e=l0(0,function(xx){var ax=l(qI,xx)!==0?1:0;return[0,ax,l(GI,c6(0,xx))]},x),t=e[2],u=t[2],i=t[1],f=e[1];if(K(x)===98){var o=0;u[0]===0&&u[1][2][0]===11&&(zx(x,2),o=1)}var a=function(xx){return function(ax,dx){for(var mx=ax,L0=dx;;){var C0=K(x);if(typeof C0!="number"&&C0[0]===4){var A0=C0[3],U0=0;if(P(A0,vn)&&P(A0,eU)&&(U0=1),!U0&&_1(x)){Z0(x);var Q0=v2(x,L0),H=0;if(mx){var b=mx[1],B=b[2],a0=mx[2],m0=b[3],P0=B[1],D=b[1];if(Pz(B[2],i30)){var N0=yL(D,Q0,P0,Hr(m0,xx)),X0=a0;H=1}}if(!H)var N0=Q0,X0=mx;var D0=N0[1];if(Ar(A0,eU))var ox=to(x),h=[0,[0,Hr(D0,ox[1]),[33,[0,N0,[0,ox],0]]]];else if(K(x)===27){var b0=Hr(D0,gx(x));Z0(x);var h=[0,[0,b0,[33,[0,N0,0,0]]]]}else var kx=to(x),V0=kx[1],h=[0,[0,Hr(D0,V0),[2,[0,N0,[0,V0,kx],0]]]];var mx=X0,L0=h;continue}}return[0,mx,L0]}}}(f)(r,u),d=a[2],k=a[1],T=K(x),g=0;if(typeof T=="number"){var A=T-17|0,N=0;if(1>>0)if(72<=A){var R=0;switch(A-72|0){case 0:var O=f30;break;case 1:var O=c30;break;case 2:var O=s30;break;case 3:var O=o30;break;case 4:var O=v30;break;case 5:var O=a30;break;case 6:var O=l30;break;case 7:var O=p30;break;case 8:var O=d30;break;case 9:var O=y30;break;case 10:var O=m30;break;case 11:var O=k30;break;case 12:var O=h30;break;case 13:var O=_30;break;case 14:var O=w30;break;case 15:var O=T30;break;case 16:var O=S30;break;case 17:var O=E30;break;case 18:var O=g30;break;case 19:var O=A30;break;default:N=1,R=1}if(!R)var M=O}else N=1;else var M=A?P30:x[12]?0:C30;if(!N){var L=M;g=1}}if(!g)var L=0;if(L!==0&&Z0(x),!k&&!L)return d;if(!L)for(var z=v2(x,d),V=f,Z=k;;){if(!Z)return[0,z];var $=Z[1],i0=Z[2],U=$[2][1],J=$[1],Y=Hr($[3],V),z=yL(J,z,U,Y),V=Y,Z=i0}var F=L[1],n0=F[1],Q=F[2],f0=i&&(n0===14?1:0);f0&&ux(x,[0,f,42]);for(var s0=v2(x,d),v0=[0,n0,Q],o0=f,c0=k;;){var T0=v0[2],E0=v0[1];if(c0){var M0=c0[1],Y0=M0[2],rx=c0[2],g0=M0[3],H0=Y0[1],t0=M0[1];if(Pz(Y0[2],T0)){var ex=Hr(g0,o0),s0=yL(t0,s0,H0,ex),v0=[0,E0,T0],o0=ex,c0=rx;continue}}var r=[0,[0,s0,[0,E0,T0],o0],c0];continue x}}}),O0(qI,function(x){var r=K(x);if(typeof r=="number"){if(48<=r){if(nn<=r){if(Ot>r)switch(r+JP|0){case 0:return Ga0;case 1:return ba0;case 6:return x30;case 7:return r30}}else if(r===65&&x[19])return x[10]&&zx(x,7),e30}else if(45<=r)switch(r+wE|0){case 0:return t30;case 1:return n30;default:return u30}}return 0}),O0(GI,function(x){var r=gx(x),e=_0(x),t=l(qI,x);if(t){var u=t[1];Z0(x);var i=l0([0,r],bI,x),f=i[2],o=i[1],a=0;if(u===6){var d=f[2],k=0;switch(d[0]){case 9:dt(x,[0,o,73]),k=1;break;case 21:d[1][2][0]===1&&ux(x,[0,o,67]),k=1;break}k&&(a=1)}return[0,[0,o,[34,[0,u,f,y0([0,e],0,0)]]]]}var T=K(x),g=0;if(typeof T=="number")if(Ot===T)var A=qa0;else if(M2===T)var A=Ha0;else g=1;else g=1;if(g)var A=0;if(!A)return l(Iz,x);var N=A[1];Z0(x);var R=l0([0,r],bI,x),O=R[2],M=R[1];1-l(FI,O)&&ux(x,[0,O[1],41]);var L=O[2],z=0;return L[0]===9&&$v(L[1][2][1])&&(Wt(x,78),z=1),[0,[0,M,[35,[0,N,O,1,y0([0,e],0,0)]]]]}),O0(bI,function(x){return v2(x,l(GI,x))}),O0(Iz,function(x){var r=l(xL,x);if(K2(x))return r;var e=K(x),t=0;if(typeof e=="number")if(Ot===e)var u=Fa0;else if(M2===e)var u=Qa0;else t=1;else t=1;if(t)var u=0;if(!u)return r;var i=u[1],f=v2(x,r);1-l(FI,f)&&ux(x,[0,f[1],41]);var o=f[2],a=0;o[0]===9&&$v(o[1][2][1])&&(Wt(x,77),a=1);var d=gx(x);Z0(x);var k=yx(x),T=Hr(f[1],d);return[0,[0,T,[35,[0,i,f,0,y0(0,[0,k],0)]]]]}),O0(xL,function(x){var r=gx(x),e=1-x[17],t=0,u=x[17]===0?x:[0,x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15],x[16],t,x[18],x[19],x[20],x[21],x[22],x[23],x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]],i=K(u),f=0;if(typeof i=="number"){var o=i-44|0;if(7>=o>>>0){var a=0;switch(o){case 0:if(e)var d=[0,l(tL,u)];else a=1;break;case 6:var d=[0,l(Lz,u)];break;case 7:var d=[0,l(rL,u)];break;default:a=1}if(!a){var k=d;f=1}}}if(!f)var k=zo(u)?[0,l(iL,u)]:l(fL,u);return Ye(Gv,0,0,u,r,k)}),O0(g9,function(x){return v2(x,l(xL,x))}),O0(rL,function(x){switch(x[22]){case 0:var r=0,e=0;break;case 1:var r=0,e=1;break;default:var r=1,e=1}var t=gx(x),u=_0(x);u0(x,51);var i=[0,t,[28,[0,y0([0,u],[0,yx(x)],0)]]],f=K(x);if(typeof f=="number"&&11>f)switch(f){case 4:var o=r?i:(ux(x,[0,t,ft]),[0,t,[9,wn(0,[0,t,Za0])]]);return oe(eL,0,x,t,o);case 6:case 10:var a=e?i:(ux(x,[0,t,Dt]),[0,t,[9,wn(0,[0,t,$a0])]]);return oe(eL,0,x,t,a)}return e?g1(Wa0,x):ux(x,[0,t,Dt]),i}),O0(Lz,function(x){return l0(0,function(r){var e=_0(r),t=gx(r);if(u0(r,50),v1(r,10)){var u=wn(0,[0,t,Va0]),i=gx(r);ro(r,za0);var f=wn(0,[0,i,Ka0]);return[22,[0,u,f,y0([0,e],[0,yx(r)],0)]]}var o=_0(r);u0(r,4);var a=G0(oL,[0,o],0,l($t,c6(0,r)));return u0(r,5),[10,[0,a,y0([0,e],[0,yx(r)],0)]]},x)}),O0(Gv,function(x,r,e,t,u){var i=x?x[1]:1,f=r?r[1]:0,o=Ye(uL,[0,i],[0,f],e,t,u),a=wV(e),d=0;if(a){var k=a[1];if(typeof k=="number"&&k===83){var T=1;d=1}}if(!d)var T=0;function g(M){var L=N1(M)[2];function z(V,Z){return p(bx(V,dn,62),V,Z)}return p(L,v2(M,o),z)}function A(M,L,z){var V=l(nL,L),Z=V[1],$=V[2],i0=Hr(t,Z),U=[0,z,M,[0,Z,$],0],J=0;if(!T&&!f){var Y=[5,U];J=1}if(!J)var Y=[25,[0,U,i0,T]];var F=f||T;return Ye(Gv,[0,i],[0,F],L,t,[0,[0,i0,Y]])}if(e[13])return o;var N=K(e);if(typeof N=="number"){var R=N-98|0;if(2>>0){if(R===-94)return A(0,e,g(e))}else if(R!==1&&_1(e)){var O=Gy(function(M,L){throw q0(as,1)},e);return t9(O,o,function(M){var L=g(M);return A(l(A9,M),M,L)})}}return o}),O0(eL,function(x,r,e,t){var u=x?x[1]:1;return v2(r,Ye(Gv,[0,u],0,r,e,[0,t]))}),O0(tL,function(x){return l0(0,function(r){var e=gx(r),t=_0(r);if(u0(r,44),r[11]&&K(r)===10){var u=yx(r);Z0(r);var i=wn(y0([0,t],[0,u],0),[0,e,Ya0]),f=K(r);return typeof f!="number"&&f[0]===4&&!P(f[3],jS)?[22,[0,i,p(px[13],0,r),0]]:(g1(Xa0,r),Z0(r),[9,i])}var o=gx(r),a=K(r),d=0;if(typeof a=="number")if(a===44)var k=l(tL,r);else if(a===51)var k=l(rL,pI(1,r));else d=1;else d=1;if(d)var k=zo(r)?l(iL,r):l(jz,r);var T=oe(Mz,Ja0,pI(1,r),o,k),g=K(r),A=0;if(typeof g!="number"&&g[0]===3){var N=oe(sL,r,o,T,g[1]);A=1}if(!A)var N=T;var R=0;if(K(r)!==4){var O=0;if((!_1(r)||K(r)!==98)&&(O=1),O){var L=N;R=1}}if(!R)var M=N1(r)[2],L=p(M,N,function(i0,U){return p(bx(i0,dn,63),i0,U)});var z=_1(r)?t9(Gy(function(i0,U){throw q0(as,1)},r),0,A9):0,V=K(r),Z=0;if(typeof V=="number"&&V===4){var $=[0,l(nL,r)];Z=1}if(!Z)var $=0;return[23,[0,L,z,$,y0([0,t],0,0)]]},x)});var tE0=function(x){var r=_0(x);u0(x,98);for(var e=0;;){var t=K(x);if(typeof t=="number"){var u=0;if(t!==99&&Nr!==t&&(u=1),!u){var i=Ax(e),f=_0(x);u0(x,99);var o=K(x)===4?N1(x)[1]:yx(x);return[0,i,X1([0,r],[0,o],f,0)]}}var a=K(x),d=0;if(typeof a!="number"&&a[0]===4&&!P(a[2],Ca)){var k=gx(x),T=_0(x);ro(x,Ba0);var g=[1,[0,k,[0,y0([0,T],[0,yx(x)],0)]]];d=1}if(!d)var g=[0,to(x)];var A=[0,g,e];K(x)!==99&&u0(x,9);var e=A}};O0(A9,function(x){J1(x,1);var r=K(x)===98?[0,l0(0,tE0,x)]:0;return W1(x),r});var nE0=function(x){var r=_0(x);u0(x,12);var e=l($t,x);return[0,e,y0([0,r],0,0)]};O0(nL,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);for(var t=0;;){var u=K(r);if(typeof u=="number"){var i=0;if(u!==5&&Nr!==u&&(i=1),!i){var f=Ax(t),o=_0(r);return u0(r,5),[0,f,X1([0,e],[0,yx(r)],o,0)]}}var a=K(r),d=0;if(typeof a=="number"&&a===12){var k=[1,l0(0,nE0,r)];d=1}if(!d)var k=[0,l($t,r)];var T=[0,k,t];K(r)!==5&&u0(r,9);var t=T}},x)});var Vz=function(x,r,e,t,u,i){var f=x?x[1]:1,o=r?r[1]:0,a=e?e[1]:0,d=pI(0,t),k=l(px[7],d),T=gx(t);u0(t,7);var g=yx(t),A=Hr(u,T),N=y0(0,[0,g],0),R=[0,v2(t,i),[2,k],N],O=o?[26,[0,R,A,a]]:[21,R];return Ye(Gv,[0,f],[0,o],t,u,[0,[0,A,O]])},zz=function(x,r,e,t,u,i){var f=x?x[1]:1,o=r?r[1]:0,a=e?e[1]:0,d=K(t),k=0;if(typeof d=="number"&&d===14){var T=UV(t),g=T[1],A=t[30][1],N=T[2][1];if(A){var R=A[1];t[30][1]=[0,[0,R[1],[0,[0,N,g],R[2]]],A[2]]}else ux(t,[0,g,68]);var M=[1,T],L=g;k=1}if(!k)var O=T2(t),M=[0,O],L=O[1];var z=Hr(u,L),V=0;i[0]===0&&i[1][2][0]===28&&M[0]===1&&(ux(t,[0,z,87]),V=1);var Z=[0,v2(t,i),M,0],$=o?[26,[0,Z,z,a]]:[21,Z];return Ye(Gv,[0,f],[0,o],t,u,[0,[0,z,$]])};O0(uL,function(x,r,e,t,u){var i=x?x[1]:1,f=r?r[1]:0,o=K(e);if(typeof o=="number")switch(o){case 6:return Z0(e),Vz([0,i],[0,f],0,e,t,u);case 10:return Z0(e),zz([0,i],[0,f],0,e,t,u);case 83:1-i&&zx(e,64),u0(e,83);var a=K(e);if(typeof a=="number")switch(a){case 4:return u;case 6:return Z0(e),Vz([0,i],Ma0,La0,e,t,u);case 98:if(_1(e))return u;break}else if(a[0]===3)return zx(e,65),u;return zz([0,i],ja0,Da0,e,t,u)}else if(o[0]===3){var d=o[1];return f&&zx(e,65),Ye(Gv,Ua0,0,e,t,[0,oe(sL,e,t,v2(e,u),d)])}return u}),O0(Mz,function(x,r,e,t){var u=x?x[1]:1;return v2(r,Ye(uL,[0,u],0,r,e,[0,t]))}),O0(iL,function(x){return l0(0,function(r){var e=E9(r),t=e[1],u=e[2],i=l0(0,function(M){var L=_0(M);u0(M,15);var z=a3(M),V=z[1],Z=Yl([0,u,[0,L,[0,z[2],0]]]);if(K(M)===4)var $=0,i0=0;else{var U=K(M),J=0;if(typeof U=="number"&&U===98){var F=0;J=1}if(!J)var Y=oI(V,vI(t,M)),F=[0,Sn(Y,p(px[13],Ia0,Y))];var $=ne(M,Ke(M)),i0=F}var n0=Zv(0,M),Q=t||n0[19],f0=l(v3(Q,V),n0),s0=K(n0)===86?f0:p6(n0,f0),v0=JI(n0),o0=v0[2],c0=v0[1];if(o0)var T0=LV(n0,o0),E0=c0;else var T0=o0,E0=f3(n0,c0);return[0,i0,s0,V,T0,E0,$,Z]},r),f=i[2],o=f[3],a=f[2],d=f[1],k=f[7],T=f[6],g=f[5],A=f[4],N=i[1],R=w6(r,t,o,1,Fv(a)),O=R[1];return o3(r,R[2],d,a),[8,[0,d,a,O,t,o,A,g,T,y0([0,k],0,0),N]]},x)}),O0(P9,function(x,r,e){switch(r){case 1:Wt(x,81);try{var t=bd(Nl(Qx(Pa0,e))),u=t}catch(g){var i=I1(g);if(i[1]!==kn)throw q0(i,0);var u=Nx(Qx(Ca0,e))}break;case 2:Wt(x,80);try{var f=$R(e),u=f}catch(g){var o=I1(g);if(o[1]!==kn)throw q0(o,0);var u=Nx(Qx(Na0,e))}break;case 4:try{var a=$R(e),u=a}catch(g){var d=I1(g);if(d[1]!==kn)throw q0(d,0);var u=Nx(Qx(Ra0,e))}break;default:try{var k=bd(Nl(e)),u=k}catch(g){var T=I1(g);if(T[1]!==kn)throw q0(T,0);var u=Nx(Qx(Oa0,e))}}return u0(x,[0,r,e]),u}),O0(Dz,function(x){var r=Xx(x),e=0;if(r!==0&&U1===O1(x,r-1|0)){var t=m2(x,0,r-1|0);e=1}if(!e)var t=x;return t}),O0(C9,function(x,r,e){var t=mX(l(Dz,e));return u0(x,[1,r,e]),t}),O0(fL,function(x){var r=gx(x),e=_0(x),t=K(x);if(typeof t=="number")switch(t){case 0:var u=l(px[12],x);return[1,[0,u[1],[24,u[2]]],u[3]];case 4:return[0,l(Uz,x)];case 6:var i=l0(0,Bz,x),f=i[2];return[1,[0,i[1],[0,f[1]]],f[2]];case 21:return Z0(x),[0,[0,r,[31,[0,y0([0,e],[0,yx(x)],0)]]]];case 29:return Z0(x),[0,[0,r,[15,y0([0,e],[0,yx(x)],0)]]];case 40:return[0,l(px[22],x)];case 98:var o=l(px[17],x),a=o[2],d=o[1],k=un<=a[1]?[12,a[2]]:[11,a[2]];return[0,[0,d,k]];case 30:case 31:return Z0(x),[0,[0,r,[14,[0,t===31?1:0,y0([0,e],[0,yx(x)],0)]]]];case 74:case 105:return[0,l(Yz,x)]}else switch(t[0]){case 0:var T=t[2],g=G0(P9,x,t[1],T);return[0,[0,r,[16,[0,g,T,y0([0,e],[0,yx(x)],0)]]]];case 1:var A=t[2],N=G0(C9,x,t[1],A);return[0,[0,r,[17,[0,N,A,y0([0,e],[0,yx(x)],0)]]]];case 2:var R=t[1],O=R[3],M=R[2],L=R[1];R[4]&&Wt(x,81),Z0(x);var z=y0([0,e],[0,yx(x)],0),V=x[28],Z=V[6],$=V[7],i0=0;if(Z){var U=Z[1];if(dX(U,M))var J=[19,[0,M,L,Xx(U),0,O,z]];else i0=1}else i0=1;if(i0){var Y=0;if($){var F=$[1];if(dX(F,M)){var J=[19,[0,M,L,Xx(F),1,O,z]];Y=1}}if(!Y)var J=[13,[0,M,O,z]]}return[0,[0,L,J]];case 3:var n0=p(cL,x,t[1]);return[0,[0,n0[1],[30,n0[2]]]];case 4:if(!P(t[3],x_)&&pr(1,x)===40)return[0,l(px[22],x)];break}if(vs(x)){var Q=p(px[13],0,x);return[0,[0,Q[1],[9,Q]]]}g1(0,x);var f0=0;return typeof t!="number"&&t[0]===7&&(Z0(x),f0=1),[0,[0,r,[15,y0([0,e],Aa0,0)]]]}),O0(jz,function(x){return v2(x,l(fL,x))}),O0(cL,function(x,r){var e=r[5],t=r[1],u=r[3],i=r[2],f=_0(x);u0(x,[3,r]);var o=[0,t,[0,[0,u,i],e]];if(e)var a=0,d=[0,o,0],k=t;else for(var T=[0,o,0],g=0;;){var A=l(px[7],x),N=[0,A,g],R=K(x),O=0;if(typeof R=="number"&&R===1){J1(x,4);var M=K(x),L=0;if(typeof M=="number"||M[0]!==3)L=1;else{var z=M[1],V=z[5],Z=z[1],$=z[3],i0=z[2];Z0(x),W1(x);var U=[0,[0,Z,[0,[0,$,i0],V]],T];if(!V){var T=U,g=N;continue}var J=Ax(N),Y=[0,Z,Ax(U),J];O=1}if(L)throw q0([0,wr,Sa0],1)}if(!O){g1(Ea0,x);var F=[0,A[1],ga0],n0=Ax(N),Q=Ax([0,F,T]),Y=[0,A[1],Q,n0]}var a=Y[3],d=Y[2],k=Y[1];break}var f0=yx(x),s0=Hr(t,k);return[0,s0,[0,d,a,y0([0,f],[0,f0],0)]]}),O0(sL,function(x,r,e,t){var u=N1(x)[2],i=p(u,e,function(o,a){return p(bx(o,dn,3),o,a)}),f=p(cL,x,t);return[0,Hr(r,f[1]),[29,[0,i,f,0]]]}),O0(Uz,function(x){var r=_0(x),e=l0(0,function(o){u0(o,4);var a=gx(o),d=l($t,o),k=K(o),T=0;if(typeof k=="number")if(k===9)var g=[0,G0(N9,o,a,[0,d,0])];else if(k===86)var g=[1,[0,d,qv(o),0]];else T=1;else T=1;if(T)var g=[0,d];return u0(o,5),g},x),t=e[2],u=e[1],i=yx(x),f=t[0]===0?t[1]:[0,u,[32,t[1]]];return G0(oL,[0,r],[0,i],f)}),O0(oL,function(x,r,e){var t=e[2],u=e[1],i=x?x[1]:0,f=r?r[1]:0;function o(a1){return R2(a1,y0([0,i],[0,f],0))}function a(a1){return qO(a1,y0([0,i],[0,f],0))}switch(t[0]){case 0:var d=t[1],k=a(d[2]),lx=[0,[0,d[1],k]];break;case 1:var T=t[1],g=T[10],A=o(T[9]),lx=[1,[0,T[1],T[2],T[3],T[4],T[5],T[6],T[7],T[8],A,g]];break;case 3:var N=t[1],R=o(N[4]),lx=[3,[0,N[1],N[2],N[3],R]];break;case 4:var O=t[1],M=o(O[4]),lx=[4,[0,O[1],O[2],O[3],M]];break;case 5:var L=t[1],z=o(L[4]),lx=[5,[0,L[1],L[2],L[3],z]];break;case 6:var V=t[1],Z=o(V[7]),lx=[6,[0,V[1],V[2],V[3],V[4],V[5],V[6],Z]];break;case 7:var $=t[1],i0=o($[4]),lx=[7,[0,$[1],$[2],$[3],i0]];break;case 8:var U=t[1],J=U[10],Y=o(U[9]),lx=[8,[0,U[1],U[2],U[3],U[4],U[5],U[6],U[7],U[8],Y,J]];break;case 9:var F=t[1],n0=F[2],Q=F[1],f0=o(n0[2]),lx=[9,[0,Q,[0,n0[1],f0]]];break;case 10:var s0=t[1],v0=o(s0[2]),lx=[10,[0,s0[1],v0]];break;case 11:var o0=t[1],c0=o(o0[4]),lx=[11,[0,o0[1],o0[2],o0[3],c0]];break;case 12:var T0=t[1],E0=o(T0[4]),lx=[12,[0,T0[1],T0[2],T0[3],E0]];break;case 13:var M0=t[1],Y0=o(M0[3]),lx=[13,[0,M0[1],M0[2],Y0]];break;case 14:var rx=t[1],g0=o(rx[2]),lx=[14,[0,rx[1],g0]];break;case 15:var lx=[15,o(t[1])];break;case 16:var H0=t[1],t0=o(H0[3]),lx=[16,[0,H0[1],H0[2],t0]];break;case 17:var ex=t[1],xx=o(ex[3]),lx=[17,[0,ex[1],ex[2],xx]];break;case 18:var ax=t[1],dx=o(ax[4]),lx=[18,[0,ax[1],ax[2],ax[3],dx]];break;case 19:var mx=t[1],L0=o(mx[6]),lx=[19,[0,mx[1],mx[2],mx[3],mx[4],mx[5],L0]];break;case 20:var C0=t[1],A0=o(C0[4]),lx=[20,[0,C0[1],C0[2],C0[3],A0]];break;case 21:var U0=t[1],Q0=o(U0[3]),lx=[21,[0,U0[1],U0[2],Q0]];break;case 22:var H=t[1],b=o(H[3]),lx=[22,[0,H[1],H[2],b]];break;case 23:var B=t[1],a0=o(B[4]),lx=[23,[0,B[1],B[2],B[3],a0]];break;case 24:var m0=t[1],P0=a(m0[2]),lx=[24,[0,m0[1],P0]];break;case 25:var D=t[1],N0=D[1],X0=D[3],D0=D[2],ox=o(N0[4]),lx=[25,[0,[0,N0[1],N0[2],N0[3],ox],D0,X0]];break;case 26:var b0=t[1],kx=b0[1],V0=b0[3],h=b0[2],X=o(kx[3]),lx=[26,[0,[0,kx[1],kx[2],X],h,V0]];break;case 27:var W0=t[1],sx=o(W0[2]),lx=[27,[0,W0[1],sx]];break;case 28:var lx=[28,[0,o(t[1][1])]];break;case 29:var tx=t[1],j0=o(tx[3]),lx=[29,[0,tx[1],tx[2],j0]];break;case 30:var Px=t[1],Ex=o(Px[3]),lx=[30,[0,Px[1],Px[2],Ex]];break;case 31:var lx=[31,[0,o(t[1][1])]];break;case 32:var Ix=t[1],qx=o(Ix[3]),lx=[32,[0,Ix[1],Ix[2],qx]];break;case 34:var B0=t[1],tr=o(B0[3]),lx=[34,[0,B0[1],B0[2],tr]];break;case 35:var Ux=t[1],K0=o(Ux[4]),lx=[35,[0,Ux[1],Ux[2],Ux[3],K0]];break;case 36:var ur=t[1],z0=ur[4],or=ur[3],Ur=o(ur[2]),lx=[36,[0,ur[1],Ur,or,z0]];break;default:var lx=t}return[0,u,lx]}),O0(Bz,function(x){var r=_0(x);u0(x,6);for(var e=[0,0,hn];;){var t=e[2],u=e[1],i=K(x);if(typeof i=="number"){var f=0;if(13<=i)Nr===i&&(f=1);else if(7<=i)switch(i-7|0){case 0:f=1;break;case 2:var o=gx(x);Z0(x);var e=[0,[0,[2,o],u],t];continue;case 5:var a=_0(x),d=l0(0,function(Y){Z0(Y);var F=l(l3,Y);return F[0]===0?[0,F[1],hn]:[0,F[1],F[2]]},x),k=d[2],T=k[2],g=d[1],A=k[1],N=[1,[0,g,[0,A,y0([0,a],0,0)]]],R=K(x)===7?1:0,O=0;if(!R&&pr(1,x)===7){var M=[0,T[1],[0,[0,g,20],T[2]]];O=1}if(!O)var M=T;1-R&&u0(x,9);var e=[0,[0,N,u],QI(M,t)];continue}if(f){var L=Az(t),z=Ax(u),V=_0(x);return u0(x,7),[0,[0,z,X1([0,r],[0,yx(x)],V,0)],L]}}var Z=l(l3,x);if(Z[0]===0)var $=hn,i0=Z[1];else var $=Z[2],i0=Z[1];K(x)!==7&&u0(x,9);var e=[0,[0,[0,i0],u],QI($,t)]}}),O0(Yz,function(x){J1(x,5);var r=gx(x),e=_0(x),t=K(x),u=0;if(typeof t!="number"&&t[0]===5){var i=t[3],f=t[2];Z0(x);var o=yx(x),a=o,d=i,k=f,T=Qx(ka0,Qx(f,Qx(ma0,i)));u=1}if(!u){g1(ha0,x);var a=0,d=_a0,k=wa0,T=Ta0}W1(x);var g=Fr(Xx(d)),A=Xx(d)-1|0,N=0;if(A>=0)for(var R=N;;){var O=fx(d,R),M=O-100|0,L=0;if(21>=M>>>0)switch(M){case 0:case 3:case 5:case 9:case 15:case 17:case 21:at(g,O),L=1;break}var z=R+1|0;if(A!==R){var R=z;continue}break}var V=Y1(g);return P(V,d)&&zx(x,[18,d]),[0,r,[18,[0,k,V,T,y0([0,e],[0,a],0)]]]});var uE0=function(x){return function(r){if(typeof r=="number"){var e=0;if(66<=r){var t=r+nj|0;if(49>>0)e=1;else{var u=t-15|0;if(9>=u>>>0)switch(u){case 0:case 1:case 3:case 9:e=1;break}}}else 8<=r?r===60&&(e=1):6<=r&&(e=1);if(e)return 0}throw q0(as,1)}},iE0=function(x){var r=K(x);if(typeof r=="number"&&!r){var e=p(px[16],1,x);return[0,[0,e[1]],e[2]]}return[0,[1,l(px[10],x)],0]};O0(vL,function(x){var r=Gy(uE0,x),e=gx(r);if(pr(1,r)===11)var u=0,i=0;else var t=E9(r),u=t[2],i=t[1];var f=i||r[19],o=vI(f,r),a=o[18],d=l0(0,function(c0){var T0=ne(c0,Ke(c0));if(vs(c0)&&T0===0){var E0=p(px[13],ya0,c0),M0=E0[1],Y0=[0,M0,[0,[0,M0,[2,[0,E0,[0,bs(c0)],0]]],0]];return[0,T0,[0,M0,[0,0,[0,Y0,0],0,0]],[0,[0,M0[1],M0[3],M0[3]]],0]}var rx=l(v3(f,a),c0);kz(c0,rx);var g0=JI(Wv(1,c0));return[0,T0,rx,g0[1],g0[2]]},o),k=d[2],T=k[2],g=T[2],A=0,N=k[4],R=k[3],O=k[1],M=d[1];if(!g[1]){var L=0,z=g[2];if((g[3]||!z)&&(L=1),L){var V=TV(o);A=1}}if(!A)var V=o;var Z=T[2],$=Z[1];if($){var i0=T[1];ux(V,[0,$[1][1],91]);var U=[0,i0,[0,0,Z[2],Z[3],Z[4]]]}else var U=T;var J=Fv(U),Y=K2(V),F=Y&&(K(V)===11?1:0);F&&zx(V,60),u0(V,11);var n0=SV(TV(V),i,0,J),Q=l0(0,iE0,n0),f0=Q[2],s0=f0[1],v0=Q[1];o3(n0,f0[2],0,U);var o0=Hr(e,v0);return[0,[0,o0,[1,[0,0,U,s0,i,0,N,R,O,y0([0,u],0,0),M]]]]}),O0(N9,function(x,r,e){return l0([0,r],function(t){for(var u=e;;){var i=K(t);if(typeof i=="number"&&i===9){Z0(t);var u=[0,l($t,t),u];continue}return[27,[0,Ax(u),0]]}},x)});var fE0=function(x){var r=_0(x);Z0(x);var e=y0([0,r],0,0),t=l(g9,x),u=K2(x)?l6(x):n9(x),i=u[2];return[0,p(i,t,function(f,o){return p(bx(f,dn,64),f,o)}),e]},mL=function(x){if(!x[28][3])return 0;for(var r=0;;){var e=K(x);if(typeof e=="number"&&e===13){var r=[0,l0(0,fE0,x),r];continue}return Ax(r)}},$o=function(x,r){var e=x?x[1]:0,t=_0(r),u=K(r);if(typeof u=="number")switch(u){case 6:var i=l0(0,function(v0){var o0=_0(v0);u0(v0,6);var c0=c6(0,v0),T0=l(px[10],c0);return u0(v0,7),[0,T0,y0([0,o0],[0,yx(v0)],0)]},r),f=i[1];return[0,f,[5,[0,f,i[2]]]];case 14:if(!e){var o=l0(0,function(v0){return Z0(v0),[3,T2(v0)]},r),a=o[1],d=o[2];return ux(r,[0,a,68]),[0,a,d]}var k=UV(r),T=r[30][1],g=k[2][1],A=k[1];if(T){var N=T[1],R=T[2],O=N[2],M=[0,[0,p(w2[4],g,N[1]),O],R];r[30][1]=M}else Nx(Cs0);return[0,A,[4,k]]}else switch(u[0]){case 0:var L=u[2],z=u[1],V=gx(r),Z=G0(P9,r,z,L);return[0,V,[1,[0,V,[0,Z,L,y0([0,t],[0,yx(r)],0)]]]];case 1:var $=u[2],i0=u[1],U=gx(r),J=G0(C9,r,i0,$);return[0,U,[2,[0,U,[0,J,$,y0([0,t],[0,yx(r)],0)]]]];case 2:var Y=u[1],F=Y[4],n0=Y[3],Q=Y[2],f0=Y[1];return F&&Wt(r,81),u0(r,[2,[0,f0,Q,n0,F]]),[0,f0,[0,[0,f0,[0,Q,n0,y0([0,t],[0,yx(r)],0)]]]]}var s0=T2(r);return[0,s0[1],[3,s0]]},R9=function(x,r,e){var t=a3(x),u=t[1],i=t[2],f=$o([0,r],x),o=f[1],a=0,d=En(x,f[2]);return[0,d,l0(0,function(k){var T=Zv(1,k),g=l0(0,function(V){var Z=l(v3(0,0),V),$=0,i0=K(V)===86?Z:p6(V,Z);if(e){var U=i0[2],J=0;if(U[1])ux(V,[0,o,28]),J=1;else{var Y=0;U[2]||U[3]?Y=1:J=1,Y&&ux(V,[0,o,27])}}else{var F=i0[2];if(F[1])ux(V,[0,o,71]);else{var n0=F[2],Q=0;n0&&!n0[2]&&!F[3]&&(Q=1),Q||(F[3]?ux(V,[0,o,70]):ux(V,[0,o,70]))}}return[0,$,i0,f3(V,XI(V))]},T),A=g[2],N=A[2],R=A[3],O=A[1],M=g[1],L=w6(T,a,u,0,Fv(N)),z=L[1];return o3(T,L[2],0,N),[0,0,N,z,a,u,0,R,O,y0([0,i],0,0),M]},x)]},Kz=function(x){var r=l(l3,x);return r[0]===0?[0,r[1],hn]:[0,r[1],r[2]]},Zz=function(x,r){switch(r[0]){case 0:var e=r[1],t=e[1],u=e[2];return ux(x,[0,t,53]),[0,t,[13,u]];case 1:var i=r[1],f=i[1],o=i[2];return ux(x,[0,f,53]),[0,f,[16,o]];case 2:var a=r[1],d=a[1],k=a[2];return ux(x,[0,d,53]),[0,d,[17,k]];case 3:var T=r[1],g=T[2][1],A=T[1];return by(g)?ux(x,[0,A,st]):u3(g)&&dt(x,[0,A,85]),[0,A,[9,T]];case 4:return Nx(nl0);default:var N=r[1][2][1];return ux(x,[0,N[1],8]),N}},Wz=function(x,r,e){function t(i){var f=Zv(1,i),o=l0(0,function(R){var O=ne(R,Ke(R)),M=l(v3(x,r),R),L=K(R)===86?M:p6(R,M);return[0,O,L,f3(R,XI(R))]},f),a=o[2],d=a[2],k=a[3],T=a[1],g=o[1],A=w6(f,x,r,0,Fv(d)),N=A[1];return o3(f,A[2],0,d),[0,0,d,N,x,r,0,k,T,y0([0,e],0,0),g]}var u=0;return function(i){return l0(u,t,i)}},$z=function(x){return u0(x,86),Kz(x)},kL=function(x,r,e,t,u,i){var f=l0([0,r],function(a){if(!t&&!u){var d=K(a);if(typeof d=="number"){var k=0;if(86<=d){if(d===98)k=1;else if(87>d){var T=$z(a);return[0,[0,e,T[1],0],T[2]]}}else{if(d===82){if(e[0]===3)var g=e[1],A=gx(a),N=function(z){var V=_0(z);u0(z,82);var Z=yx(z),$=p(px[19],z,[0,g[1],[9,g]]),i0=l(px[10],z);return[3,[0,0,$,i0,y0([0,V],[0,Z],0)]]},R=l0([0,g[1]],N,a),O=[0,R,[0,[0,[0,A,[24,gy(tl0)]],0],0]];else var O=$z(a);return[0,[0,e,O[1],1],O[2]]}if(10>d)switch(d){case 4:k=1;break;case 1:case 9:return[0,[0,e,Zz(a,e),1],hn]}}if(k){var M=En(a,e);return[0,[1,M,l(Wz(t,u,i),a)],hn]}}return[0,[0,e,Zz(a,e),1],hn]}var L=En(a,e);return[0,[1,L,l(Wz(t,u,i),a)],hn]},x),o=f[2];return[0,[0,[0,f[1],o[1]]],o[2]]},cE0=function(x){if(K(x)===12){var r=_0(x),e=l0(0,function(M0){return u0(M0,12),Kz(M0)},x),t=e[2],u=t[2],i=t[1],f=e[1];return[0,[1,[0,f,[0,i,y0([0,r],0,0)]]],u]}var o=gx(x),a=pr(1,x),d=0;if(typeof a=="number"){var k=0;if(86<=a)a!==98&&87<=a&&(k=1);else if(a!==82)if(10<=a)k=1;else switch(a){case 1:case 4:case 9:break;default:k=1}if(!k){var g=0,A=0;d=1}}if(!d)var T=E9(x),g=T[2],A=T[1];var N=a3(x),R=N[1],O=Fx(g,N[2]),M=K(x);if(!A&&!R&&typeof M!="number"&&M[0]===4){var L=M[3];if(!P(L,Cv)){var z=_0(x),V=$o(0,x)[2],Z=K(x);if(typeof Z=="number"){var $=0;if(86<=Z)Z!==98&&87<=Z&&($=1);else if(Z!==82)if(10<=Z)$=1;else switch(Z){case 1:case 4:case 9:break;default:$=1}if(!$)return kL(x,o,V,0,0,0)}En(x,V);var i0=l0([0,o],function(M0){return R9(M0,0,1)},x),U=i0[2],J=U[2],Y=U[1],F=i0[1];return[0,[0,[0,F,[2,Y,J,y0([0,z],0,0)]]],hn]}if(!P(L,Da)){var n0=_0(x),Q=$o(0,x)[2],f0=K(x);if(typeof f0=="number"){var s0=0;if(86<=f0)f0!==98&&87<=f0&&(s0=1);else if(f0!==82)if(10<=f0)s0=1;else switch(f0){case 1:case 4:case 9:break;default:s0=1}if(!s0)return kL(x,o,Q,0,0,0)}En(x,Q);var v0=l0([0,o],function(M0){return R9(M0,0,0)},x),o0=v0[2],c0=o0[2],T0=o0[1],E0=v0[1];return[0,[0,[0,E0,[3,T0,c0,y0([0,n0],0,0)]]],hn]}}return kL(x,o,$o(0,x)[2],A,R,O)},sE0=function(x){var r=l0(0,function(t){var u=_0(t);u0(t,0);for(var i=0,f=[0,0,hn];;){var o=f[2],a=f[1],d=K(t);if(typeof d=="number"){var k=0;if(d!==1&&Nr!==d&&(k=1),!k){var T=i?[0,o[1],[0,[0,i[1],95],o[2]]]:o,g=Az(T),A=Ax(a),N=_0(t);return u0(t,1),[0,[0,A,X1([0,u],[0,yx(t)],N,0)],g]}}var R=cE0(t),O=R[1],M=0,L=R[2];if(O[0]===1&&K(t)===9){var z=[0,gx(t)];M=1}if(!M)var z=0;var V=QI(L,o),Z=K(t),$=0;if(typeof Z=="number"){var i0=Z-2|0,U=0;if(U1>>0?M2>=i0+1>>>0&&(U=1):i0===7&&(Z0(t),U=1),U){var J=V;$=1}}if(!$){var Y=tI(ws0,9),F=CV([0,Y],K(t)),n0=[0,gx(t),F];v1(t,8);var J=[0,[0,n0,V[1]],[0,n0,V[2]]]}var i=z,f=[0,[0,O,a],J]}},x),e=r[2];return[0,r[1],e[1],e[2]]},O9=function(x,r,e,t){var u=e[2][1],i=e[1];if(Ar(u,Ev))return ux(x,[0,i,[15,u,0,QU===t?1:0,1]]),r;for(var f=r;;){if(typeof f=="number")var a=0;else if(f[0]===0)var o=f[2],a=Tx(u,f[1])===0?[0,o]:0;else{var d=Tx(u,f[2]),k=f[5],T=f[4],g=f[3];if(d!==0){var A=0<=d?k:T,f=A;continue}var a=[0,g]}if(!a)return s9(u,t,r);var N=a[1],R=0;return MP===t?FN===N&&(R=1):FN===t&&MP===N&&(R=1),R||ux(x,[0,i,[1,u]]),s9(u,$j,r)}},Qz=function(x,r){return l0(0,function(e){var t=r?_0(e):0;u0(e,52);for(var u=0;;){var i=[0,l0(0,function(a){var d=ls(a);if(K(a)===98)var k=N1(a)[2],T=p(k,d,function(g,A){return p(bx(g,Na,65),g,A)});else var T=d;return[0,T,yz(a)]},e),u],f=K(e);if(typeof f=="number"&&f===9){u0(e,9);var u=i;continue}var o=Ax(i);return[0,o,y0([0,t],0,0)]}},x)},hL=function(x){switch(x[0]){case 0:case 3:var r=x[1];return[0,[0,r[1],r[2][1]]];default:return 0}},_L=function(x,r){return r?ux(x,[0,r[1][1],M2]):0},wL=function(x,r){return r?ux(x,[0,r[1],13]):0},Fz=function(x,r,e,t,u,i,f,o){var a=l0([0,r],function(R){var O=YI(R),M=K(R);if(i){var L=0;if(typeof M=="number"&&M===82){zx(R,14),Z0(R);var z=0}else L=1;if(L)var z=0}else{var V=0;if(typeof M=="number"&&M===82){Z0(R);var Z=Zv(1,R),z=[0,l(px[7],Z)];V=1}if(!V)var z=1}var $=K(R),i0=0;if(typeof $=="number"&&9>$)switch($){case 8:Z0(R);var U=K(R),J=0;if(typeof U=="number"){var Y=0;if(U===1||Nr===U?Y=1:J=1,Y)var F=yx(R)}else J=1;if(J)var F=K2(R)?Ko(R):0;var n0=[0,t,O,z,F];i0=1;break;case 4:case 6:g1(0,R);var n0=[0,t,O,z,0];i0=1;break}if(!i0){var Q=K(R),f0=0;if(typeof Q=="number"){var s0=0;if(Q===1||Nr===Q?s0=1:f0=1,s0)var v0=[0,0,function(dx,mx){return dx}]}else f0=1;if(f0)var v0=K2(R)?l6(R):n9(R);if(typeof z=="number")if(O[0]===0)var o0=function(ax,dx){return p(bx(ax,oD,68),ax,dx)},Y0=z,rx=O,g0=p(v0[2],t,o0);else var c0=O[1],T0=function(ax,dx){return p(bx(ax,$N,69),ax,dx)},Y0=z,rx=[1,p(v0[2],c0,T0)],g0=t;else var E0=z[1],M0=function(ax,dx){return p(bx(ax,dn,70),ax,dx)},Y0=[0,p(v0[2],E0,M0)],rx=O,g0=t;var n0=[0,g0,rx,Y0,0]}var H0=n0[3],t0=n0[2],ex=n0[1];return[0,ex,t0,H0,y0([0,o],[0,n0[4]],0)]},x),d=a[2],k=d[4],T=d[3],g=d[2],A=d[1],N=a[1];return A[0]===4?[2,[0,N,[0,A[1],T,g,u,f,e,k]]]:[1,[0,N,[0,A,T,g,u,f,e,k]]]},TL=function(x,r,e,t,u,i,f,o,a,d){for(;;){var k=K(x);if(typeof k=="number"){var T=k-1|0,g=0;if(7>>0){var A=T-81|0;if(4>=A>>>0)switch(A){case 3:g1(0,x),Z0(x);continue;case 0:case 4:g=1;break}}else 5>>0&&(g=1);if(g&&!u&&!i)return Fz(x,r,e,t,f,o,a,d)}var N=K(x),R=0;if(typeof N=="number"&&(N===4||N===98))var O=0;else R=1;if(R)var O=i3(x)?1:0;if(O)return Fz(x,r,e,t,f,o,a,d);wL(x,o),_L(x,a);var M=hL(t),L=0;if(f){if(M){var z=M[1],V=z[1];if(!P(z[2],Ao)){ux(x,[0,V,[15,H30,f,1,0]]);var i0=Zv(1,x),U=1;L=1}}}else if(M){var Z=M[1],$=Z[1];if(!P(Z[2],Ev)){u&&ux(x,[0,$,10]),i&&ux(x,[0,$,11]);var i0=Zv(2,x),U=0;L=1}}if(!L)var i0=Zv(1,x),U=1;var J=En(i0,t),Y=l0(0,function(n0){var Q=l0(0,function(M0){var Y0=ne(M0,Ke(M0)),rx=l(v3(u,i),M0),g0=K(M0)===86?rx:p6(M0,rx),H0=g0[2],t0=H0[1],ex=0;if(t0){var xx=t0[1][1],ax=g0[1];if(U===0){ux(M0,[0,xx,92]);var dx=[0,ax,[0,0,H0[2],H0[3],H0[4]]];ex=1}}if(!ex)var dx=g0;return[0,Y0,dx,f3(M0,XI(M0))]},n0),f0=Q[2],s0=f0[2],v0=f0[3],o0=f0[1],c0=Q[1],T0=w6(n0,u,i,0,Fv(s0)),E0=T0[1];return o3(n0,T0[2],0,s0),[0,0,s0,E0,u,i,0,v0,o0,0,c0]},i0),F=[0,U,J,Y,f,e,y0([0,d],0,0)];return[0,[0,Hr(r,Y[1]),F]]}},SL=function(x,r){var e=pr(x,r);if(typeof e=="number"){var t=0;if(86<=e)e!==98&&87<=e&&(t=1);else if(e!==82)if(9<=e)t=1;else switch(e){case 1:case 4:case 8:break;default:t=1}if(!t)return 1}return 0},oE0=0,Hz=function(x){return SL(oE0,x)},vE0=function(x){var r=gx(x),e=mL(x),t=K(x),u=0;if(typeof t=="number"&&t===60&&!SL(1,x)){var i=[0,gx(x)],f=_0(x);Z0(x);var o=f,a=i;u=1}if(!u)var o=0,a=0;var d=K(x),k=0;if(typeof d=="number"&&2>=d+yU>>>0&&Vo(1,x)){var T=0;if(typeof d=="number"){var g=d+yU|0;if(2>=g>>>0){switch(g){case 0:var A=cY;break;case 1:var A=fl;break;default:var A=dl}var N=A;T=1}}if(!T)var N=Nx(q30);zx(x,[22,N]),Z0(x),k=1}var R=K(x)===42?1:0;if(R){var O=pr(1,x),M=0;if(typeof O=="number"){var L=0;if(87<=O)O!==98&&Nr!==O&&(L=1);else{var z=O-9|0;if(76>>0){if(77>z)switch(z+9|0){case 1:case 4:case 8:break;default:L=1}}else z!==73&&(L=1)}if(!L){var V=0;M=1}}if(!M)var V=1;var Z=V}else var Z=R;if(Z){var $=_0(x);Z0(x);var i0=$}else var i0=0;var U=K(x)===64?1:0;if(U)var J=1-SL(1,x),Y=J&&1-o6(1,x);else var Y=U;if(Y){var F=_0(x);Z0(x);var n0=F}else var n0=0;var Q=a3(x),f0=Q[1],s0=Q[2],v0=Vo(1,x),o0=v0||(pr(1,x)===6?1:0),c0=gx(x),T0=K(x),E0=0;if(typeof T0=="number")switch(T0){case 103:var M0=_0(x);Z0(x);var g0=[0,[0,c0,[0,0,y0([0,M0],0,0)]]];E0=1;break;case 104:var Y0=_0(x);Z0(x);var g0=[0,[0,c0,[0,1,y0([0,Y0],0,0)]]];E0=1;break}else if(T0[0]===4&&!P(T0[3],Ea)&&o0){var rx=_0(x);Z0(x);var g0=[0,[0,c0,[0,2,y0([0,rx],0,0)]]];E0=1}if(!E0)var g0=0;var H0=0;if(g0){var t0=0,ex=g0[1][1];if((Y||f0)&&(t0=1),t0){ux(x,[0,ex,M2]);var xx=0;H0=1}}if(!H0)var xx=g0;var ax=0;if(!f0&&xx){var dx=a3(x),mx=dx[2],L0=dx[1];ax=1}if(!ax)var mx=s0,L0=f0;var C0=Yl([0,o,[0,i0,[0,n0,[0,mx,0]]]]),A0=K(x);if(!Y&&!L0&&typeof A0!="number"&&A0[0]===4){var U0=A0[3];if(!P(U0,Cv)){var Q0=_0(x),H=$o(b30,x)[2];if(Hz(x))return TL(x,r,e,H,Y,L0,Z,a,xx,C0);wL(x,a),_L(x,xx),En(x,H);var b=Fx(C0,Q0),B=l0([0,r],function(K0){return R9(K0,1,1)},x),a0=B[2],m0=a0[1],P0=a0[2],D=B[1],N0=hL(m0),X0=0;if(Z){if(N0){var D0=N0[1],ox=D0[1];P(D0[2],Ao)||(ux(x,[0,ox,[15,el0,Z,0,0]]),X0=1)}}else if(N0){var b0=N0[1],kx=b0[1];P(b0[2],Ev)||(ux(x,[0,kx,9]),X0=1)}return[0,[0,D,[0,2,m0,P0,Z,e,y0([0,b],0,0)]]]}if(!P(U0,Da)){var V0=_0(x),h=$o(G30,x)[2];if(Hz(x))return TL(x,r,e,h,Y,L0,Z,a,xx,C0);wL(x,a),_L(x,xx),En(x,h);var X=Fx(C0,V0),W0=l0([0,r],function(K0){return R9(K0,1,0)},x),sx=W0[2],tx=sx[1],j0=sx[2],Px=W0[1],Ex=hL(tx),Ix=0;if(Z){if(Ex){var qx=Ex[1],B0=qx[1];P(qx[2],Ao)||(ux(x,[0,B0,[15,rl0,Z,0,0]]),Ix=1)}}else if(Ex){var tr=Ex[1],Ux=tr[1];P(tr[2],Ev)||(ux(x,[0,Ux,9]),Ix=1)}return[0,[0,Px,[0,3,tx,j0,Z,e,y0([0,X],0,0)]]]}}return TL(x,r,e,$o(xl0,x)[2],Y,L0,Z,a,xx,C0)},qz=function(x,r,e,t){var u=x?x[1]:0,i=Gs(1,r),f=Fx(u,mL(i)),o=_0(i),a=K(i),d=0;typeof a!="number"&&a[0]===4&&!P(a[3],x_)&&(zx(i,88),Z0(i),d=1),u0(i,40);var k=aI(1,i),T=K(k),g=0;if(e&&typeof T=="number"){var A=0;if(52<=T?T!==98&&53<=T&&(A=1):T!==41&&T&&(A=1),!A){var O=0;g=1}}if(!g)if(vs(i))var N=p(px[13],0,k),R=N1(i)[2],O=[0,p(R,N,function(Q,f0){return p(bx(Q,Na,72),Q,f0)})];else{NV(i,W30);var O=[0,[0,gx(i),$30]]}var M=Ke(i);if(M)var L=M[1],z=N1(i)[2],V=[0,p(z,L,function(Q,f0){return p(bx(Q,GN,71),Q,f0)})];else var V=0;var Z=_0(i);if(v1(i,41))var $=l0(0,function(Q){var f0=l(g9,oI(0,Q));if(K(Q)===98)var s0=N1(Q)[2],v0=p(s0,f0,function(c0,T0){return p(bx(c0,dn,66),c0,T0)});else var v0=f0;var o0=yz(Q);return[0,v0,o0,y0([0,Z],0,0)]},i),i0=$[1],U=$[2],J=N1(i)[2],Y=[0,[0,i0,p(J,U,function(Q,f0){return G0(bx(Q,-663447790,67),Q,i0,f0)})]];else var Y=0;if(K(i)===52){1-_1(i)&&zx(i,Ot);var F=[0,DV(i,Qz(i,1))]}else var F=0;var n0=l0(0,function(Q){var f0=_0(Q);if(!v1(Q,0))return xo(Q,0),F30;Q[30][1]=[0,[0,w2[1],0],Q[30][1]];for(var s0=0,v0=vS0,o0=0;;){var c0=K(Q);if(typeof c0=="number"){var T0=c0-2|0;if(U1>>0){if(M2>=T0+1>>>0){var E0=Ax(o0),M0=function(B0,tr){return l(Xl(function(Ux){return 1-p(w2[3],Ux[1],B0)}),tr)},Y0=Q[30][1];if(Y0){var rx=Y0[1],g0=rx[1];if(Y0[2]){var H0=Y0[2],t0=M0(g0,rx[2]),ex=Bl(H0),xx=ex[2],ax=ex[1],dx=sX(H0),mx=[0,[0,ax,Fx(xx,t0)],dx];Q[30][1]=mx}else{var L0=M0(g0,rx[2]);P2(function(B0){return ux(Q,[0,B0[2],[23,B0[1]]])},L0),Q[30][1]=0}}else Nx(Ns0);u0(Q,1);var C0=K(Q),A0=0;if(!t){var U0=0;if((typeof C0!="number"||C0!==1&&Nr!==C0)&&(U0=1),U0)if(K2(Q)){var Q0=Ko(Q);A0=1}else{var Q0=0;A0=1}}if(!A0)var Q0=yx(Q);return[0,E0,y0([0,f0],[0,Q0],0)]}}else if(T0===6){u0(Q,8);continue}}var H=vE0(Q);switch(H[0]){case 0:var b=H[1],B=b[2],a0=b[1];switch(B[1]){case 0:if(B[4])var j0=v0,Px=s0;else{s0&&ux(Q,[0,a0,18]);var j0=v0,Px=1}break;case 1:var m0=B[2],P0=m0[0]===4?O9(Q,v0,m0[1],QU):v0,j0=P0,Px=s0;break;case 2:var D=B[2],N0=D[0]===4?O9(Q,v0,D[1],MP):v0,j0=N0,Px=s0;break;default:var X0=B[2],D0=X0[0]===4?O9(Q,v0,X0[1],FN):v0,j0=D0,Px=s0}break;case 1:var ox=H[1][2],b0=ox[4],kx=ox[1];switch(kx[0]){case 4:Nx(Q30);break;case 0:case 3:var V0=kx[1],h=V0[2][1],X=Ar(h,Ev),W0=V0[1];if(X)var tx=X;else var sx=Ar(h,Ao),tx=sx&&b0;tx&&ux(Q,[0,W0,[15,h,b0,0,0]]);break}var j0=v0,Px=s0;break;default:var j0=O9(Q,v0,H[1][2][1],$j),Px=s0}var s0=Px,v0=j0,o0=[0,H,o0]}},i);return[0,O,n0,V,Y,F,f,y0([0,o],0,0)]},I9=function(x,r){return l0(0,function(e){return[2,qz([0,r],e,e[7],0)]},x)},aE0=function(x){return[6,qz(0,x,1,1)]},lE0=0,pE0=function(x){return l0(lE0,aE0,x)},Gz=XV(px),bz=function(x){var r=T6(x);if(x[5])Qv(x,r[1]);else{var e=r[2],t=0;if(e[0]===26){var u=e[1],i=r[1],f=0;u[4]?(ux(x,[0,i,5]),f=1):u[5]&&(ux(x,[0,i,26]),f=1),f&&(t=1)}}return r},L9=function(x,r){var e=r[4],t=r[3],u=r[2],i=r[1];e&&Wt(x,81);var f=_0(x);return u0(x,[2,[0,i,u,t,e]]),[0,i,[0,u,t,y0([0,f],[0,yx(x)],0)]]},t2=function(x,r,e){var t=x?x[1]:Yl0,u=r?r[1]:1,i=K(e);if(typeof i=="number"){var f=i-2|0;if(U1>>0){if(M2>=f+1>>>0){var o=function(k,T){return k};return[1,[0,yx(e),o]]}}else if(f===6){Z0(e);var a=K(e);if(typeof a=="number"){var d=0;if(a!==1&&Nr!==a&&(d=1),!d)return[0,yx(e)]}return K2(e)?[0,Ko(e)]:Xl0}}return K2(e)?[1,l6(e)]:(u&&g1([0,t],e),Jl0)},no=function(x){var r=K(x);if(typeof r=="number"){var e=0;if(r!==1&&Nr!==r&&(e=1),!e){var t=function(u,i){return u};return[0,yx(x),t]}}return K2(x)?l6(x):n9(x)},EL=function(x,r,e){var t=t2(0,0,r);if(t[0]===0)return[0,t[1],e];var u=t[1][2],i=Ax(e);if(i)var f=i[2],o=i[1],a=Ax([0,p(u,o,function(d,k){return G0(bx(d,634872468,73),d,x,k)}),f]);else var a=0;return[0,0,a]},xK=function x(r){return x.fun(r)},rK=function x(r){return x.fun(r)},eK=function x(r){return x.fun(r)},tK=function x(r){return x.fun(r)},nK=function x(r){return x.fun(r)},E6=function x(r,e){return x.fun(r,e)},uK=function x(r){return x.fun(r)},iK=function x(r){return x.fun(r)},g6=function x(r,e,t){return x.fun(r,e,t)},fK=function x(r){return x.fun(r)},cK=function x(r){return x.fun(r)},A6=function x(r,e){return x.fun(r,e)},sK=function x(r){return x.fun(r)},oK=function x(r){return x.fun(r)},M9=function x(r,e){return x.fun(r,e)},vK=function x(r){return x.fun(r)},D9=function x(r,e){return x.fun(r,e)},aK=function x(r){return x.fun(r)},lK=function x(r){return x.fun(r)},j9=function x(r,e){return x.fun(r,e)},pK=function x(r){return x.fun(r)},P6=function x(r,e,t){return x.fun(r,e,t)},C6=function x(r,e){return x.fun(r,e)},dK=function x(r,e){return x.fun(r,e)},yK=function x(r,e){return x.fun(r,e)},gL=function x(r,e){return x.fun(r,e)},mK=function x(r){return x.fun(r)},p3=function x(r){return x.fun(r)},U9=function x(r,e,t){return x.fun(r,e,t)},AL=function x(r,e){return x.fun(r,e)},kK=function x(r,e){return x.fun(r,e)},PL=function x(r){return x.fun(r)},dE0=function(x){var r=_0(x);u0(x,59);var e=K(x)===8?yx(x):0,t=t2(0,0,x),u=t[0]===0?t[1]:t[1][1];return[5,[0,y0([0,r],[0,Fx(e,u)],0)]]},yE0=0,mE0=function(x){var r=_0(x);u0(x,37);var e=f6(1,x),t=l(px[2],e),u=1-x[5],i=u&&d6(t);i&&Qv(x,t[1]);var f=yx(x);u0(x,25);var o=yx(x);u0(x,4);var a=l(px[7],x);u0(x,5);var d=K(x)===8?yx(x):0,k=t2(0,Bl0,x),T=k[0]===0?Fx(d,k[1]):k[1][1];return[17,[0,t,a,y0([0,r],[0,Fx(f,Fx(o,T))],0)]]},kE0=0,hK=function(x,r,e){var t=e[2][1],u=e[1];return t&&!t[1][2][2]&&!t[2]?0:ux(x,[0,u,r])},CL=function(x,r){return!x[5]&&d6(r)?Qv(x,r[1]):0},hE0=function(x){var r=_0(x);u0(x,39);var e=x[19],t=e&&v1(x,65),u=Fx(r,_0(x));u0(x,4);var i=y0([0,u],0,0),f=K(x),o=0;if(typeof f=="number"&&f===64){var a=1;o=1}if(!o)var a=0;var d=c6(1,x),k=K(d),T=0;if(typeof k=="number"){if(24<=k){if(29>k)switch(k+ST|0){case 0:var g=l0(0,Tz,d),A=g[2],N=A[3],R=A[1],O=g[1],F=N,n0=[0,[1,[0,O,[0,R,0,y0([0,A[2]],0,0)]]]];T=1;break;case 3:var M=l0(0,Sz,d),L=M[2],z=L[3],V=L[1],Z=M[1],F=z,n0=[0,[1,[0,Z,[0,V,2,y0([0,L[2]],0,0)]]]];T=1;break;case 4:if(pr(1,d)!==17){var $=l0(0,Ez,d),i0=$[2],U=i0[3],J=i0[1],Y=$[1],F=U,n0=[0,[1,[0,Y,[0,J,1,y0([0,i0[2]],0,0)]]]];T=1}break}}else if(k===8){var F=0,n0=0;T=1}}if(!T)var F=0,n0=[0,[0,l(px[8],d)]];var Q=K(x);if(typeof Q=="number"){if(Q===17){if(!n0)throw q0([0,wr,Ul0],1);var f0=n0[1];if(f0[0]===0)var s0=[1,$I(jl0,x,f0[1])];else{var v0=f0[1];hK(x,43,v0);var s0=[0,v0]}t?u0(x,63):u0(x,17);var o0=l(px[7],x);u0(x,5);var c0=f6(1,x),T0=l(px[2],c0);return CL(x,T0),[24,[0,s0,o0,T0,0,i]]}if(Q===63){if(!n0)throw q0([0,wr,Dl0],1);var E0=n0[1];if(E0[0]===0){var M0=$I(Ml0,x,E0[1]),Y0=1-t,rx=Y0&&a,g0=0;if(rx){var H0=M0[2];if(H0[0]===2){var t0=H0[1][1],ex=t0[1];P(t0[2][1],Co)||(ux(x,[0,ex,44]),g0=1)}}var xx=[1,M0]}else{var ax=E0[1];hK(x,44,ax);var xx=[0,ax]}u0(x,63);var dx=l(px[10],x);u0(x,5);var mx=f6(1,x),L0=l(px[2],mx);return CL(x,L0),[25,[0,xx,dx,L0,t,i]]}}if(P2(function(N0){return ux(x,N0)},F),t?u0(x,63):u0(x,8),n0)var C0=n0[1],A0=C0[0]===0?[0,[1,v2(x,C0[1])]]:[0,[0,C0[1]]],U0=A0;else var U0=0;var Q0=K(x),H=0;if(typeof Q0=="number"&&Q0===8){var b=0;H=1}if(!H)var b=[0,l(px[7],x)];u0(x,8);var B=K(x),a0=0;if(typeof B=="number"&&B===5){var m0=0;a0=1}if(!a0)var m0=[0,l(px[7],x)];u0(x,5);var P0=f6(1,x),D=l(px[2],P0);return CL(x,D),[23,[0,U0,b,m0,D,i]]},_E0=0,_K=function(x){var r=zo(x)?bz(x):l(px[2],x),e=1-x[5],t=e&&d6(r);return t&&Qv(x,r[1]),r},wE0=function(x){var r=_0(x);u0(x,43);var e=_K(x);return[0,e,y0([0,r],0,0)]},TE0=function(x){var r=_0(x);u0(x,16);var e=Fx(r,_0(x));u0(x,4);var t=l(px[7],x);u0(x,5);var u=_K(x),i=K(x)===43?[0,l0(0,wE0,x)]:0;return[27,[0,t,u,i,y0([0,e],0,0)]]},SE0=0,wK=function(x){return l0(SE0,TE0,x)},EE0=function(x){1-x[11]&&zx(x,31);var r=_0(x),e=gx(x);u0(x,19);var t=K(x)===8?yx(x):0,u=0;if(K(x)!==8&&!i3(x)){var i=[0,l(px[7],x)];u=1}if(!u)var i=0;var f=Hr(e,gx(x)),o=t2(0,0,x),a=0;if(o[0]===0)var d=o[1];else{var k=o[1],T=k[1];if(i){var g=i[1],A=k[2],N=[0,p(A,g,function(z,V){return p(bx(z,dn,74),z,V)})],R=t;a=1}else var d=T}if(!a)var N=i,R=Fx(t,d);return[31,[0,N,y0([0,r],[0,R],0),f]]},gE0=0,AE0=function(x){var r=_0(x);u0(x,20),u0(x,4);var e=l(px[7],x);u0(x,5),u0(x,0);for(var t=Ll0;;){var u=t[2],i=t[1],f=K(x);if(typeof f=="number"){var o=0;if(f!==1&&Nr!==f&&(o=1),!o){var a=Ax(u);u0(x,1);var d=no(x)[1],k=e[1];return[32,[0,e,a,y0([0,r],[0,d],0),k]]}}var T=i9(0,function(A){return function(N){var R=_0(N),O=K(N),M=0;if(typeof O=="number"&&O===36){A&&zx(N,58),u0(N,36);var L=yx(N),z=0;M=1}if(!M){u0(N,33);var L=0,z=[0,l(px[7],N)]}var V=A||(z===0?1:0);u0(N,86);var Z=Fx(L,no(N)[1]);function $(Y){if(typeof Y=="number"){var F=Y-1|0,n0=0;if(32>>0?F===35&&(n0=1):30>>0&&(n0=1),n0)return 1}return 0}var i0=1,U=N[9]===1?N:[0,N[1],N[2],N[3],N[4],N[5],N[6],N[7],N[8],i0,N[10],N[11],N[12],N[13],N[14],N[15],N[16],N[17],N[18],N[19],N[20],N[21],N[22],N[23],N[24],N[25],N[26],N[27],N[28],N[29],N[30],N[31]],J=p(px[4],$,U);return[0,[0,z,J,y0([0,R],[0,Z],0)],V]}}(i),x),t=[0,T[2],[0,T[1],u]]}},PE0=0,CE0=function(x){var r=_0(x),e=gx(x);u0(x,22),K2(x)&&ux(x,[0,e,59]);var t=l(px[7],x),u=t2(0,0,x);if(u[0]===0)var o=t,a=u[1];else var i=u[1][2],f=0,o=p(i,t,function(d,k){return p(bx(d,dn,75),d,k)}),a=f;return[33,[0,o,y0([0,r],[0,a],0)]]},NE0=0,RE0=function(x){var r=_0(x);u0(x,23);var e=l(px[15],x);if(K(x)===34)var t=N1(x)[2],u=p(t,e,function(M,L){var z=L[1];return[0,z,G0(bx(M,n8,4),M,z,L[2])]});else var u=e;var i=K(x),f=0;if(typeof i=="number"&&i===34){var o=[0,l0(0,function(L){var z=_0(L);u0(L,34);var V=yx(L);if(K(L)===4){u0(L,4);var Z=[0,p(px[18],L,72)];u0(L,5);var $=Z}else var $=0;var i0=l(px[15],L);if(K(L)===38)var J=i0;else var U=no(L)[2],J=p(U,i0,function(Y,F){var n0=F[1];return[0,n0,G0(bx(Y,n8,76),Y,n0,F[2])]});return[0,$,J,y0([0,z],[0,V],0)]},x)];f=1}if(!f)var o=0;var a=K(x),d=0;if(typeof a=="number"&&a===38){u0(x,38);var k=l(px[15],x),T=k[1],g=k[2],A=no(x)[2],N=[0,[0,T,p(A,g,function(L,z){return G0(bx(L,n8,77),L,T,z)})]];d=1}if(!d)var N=0;var R=o===0?1:0,O=R&&(N===0?1:0);return O&&ux(x,[0,u[1],61]),[34,[0,u,o,N,y0([0,r],0,0)]]},OE0=0,IE0=function(x){var r=Tz(x),e=r[3],t=r[2],u=EL(0,x,r[1]),i=0,f=u[2],o=u[1];return P2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},LE0=0,ME0=function(x){var r=Sz(x),e=r[3],t=r[2],u=EL(2,x,r[1]),i=2,f=u[2],o=u[1];return P2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},DE0=0,jE0=function(x){var r=Ez(x),e=r[3],t=r[2],u=EL(1,x,r[1]),i=1,f=u[2],o=u[1];return P2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},UE0=0,BE0=function(x){var r=_0(x);u0(x,25);var e=Fx(r,_0(x));u0(x,4);var t=l(px[7],x);u0(x,5);var u=f6(1,x),i=l(px[2],u),f=1-x[5],o=f&&d6(i);return o&&Qv(x,i[1]),[38,[0,t,i,y0([0,e],0,0)]]},YE0=0,XE0=function(x){var r=_0(x),e=l(px[7],x),t=K(x),u=e[2];if(u[0]===9&&typeof t=="number"&&t===86){var i=u[1],f=i[2][1],o=e[1];u0(x,86),p(w2[3],f,x[3])&&ux(x,[0,o,[21,Ol0,f]]);var a=x[31],d=x[30],k=x[29],T=x[28],g=x[27],A=x[26],N=x[25],R=x[24],O=x[23],M=x[22],L=x[21],z=x[20],V=x[19],Z=x[18],$=x[17],i0=x[16],U=x[15],J=x[14],Y=x[13],F=x[12],n0=x[11],Q=x[10],f0=x[9],s0=x[8],v0=x[7],o0=x[6],c0=x[5],T0=x[4],E0=p(w2[4],f,x[3]),M0=[0,x[1],x[2],E0,T0,c0,o0,v0,s0,f0,Q,n0,F,Y,J,U,i0,$,Z,V,z,L,M,O,R,N,A,g,T,k,d,a],Y0=zo(M0)?bz(M0):l(px[2],M0);return[30,[0,i,Y0,y0([0,r],0,0)]]}var rx=t2(Il0,0,x);if(rx[0]===0)var t0=e,ex=rx[1];else var g0=rx[1][2],H0=0,t0=p(g0,e,function(xx,ax){return p(bx(xx,dn,78),xx,ax)}),ex=H0;return[22,[0,t0,0,y0(0,[0,ex],0)]]},JE0=0,VE0=function(x){var r=l(px[7],x),e=t2(Rl0,0,x);if(e[0]===0)var i=r,f=e[1];else var t=e[1][2],u=0,i=p(t,r,function(N,R){return p(bx(N,dn,79),N,R)}),f=u;if(x[20]){var o=i[2];if(o[0]===13){var a=o[1][2],d=0;if(1i)switch(i-53|0){case 0:return l0([0,u],function(a){1-_1(a)&&zx(a,To);var d=l0(0,l(A6,0),a),k=[0,d[1],[29,d[2]]];return[21,[0,[0,k],0,0,0,y0([0,t],0,0)]]},e);case 8:if(pr(1,e)!==0)return l0([0,u],function(a){1-_1(a)&&zx(a,To);var d=pr(1,a);if(typeof d=="number"){if(d===48)return zx(a,21),u0(a,61),[21,[0,0,0,0,0,y0([0,t],0,0)]];if(f2===d){u0(a,61);var k=gx(a);u0(a,f2);var T=l(p3,a),g=T[1];return[21,[0,0,[0,[1,[0,k,0]]],[0,g],0,y0([0,t],[0,T[2]],0)]]}}var A=l0(0,l(E6,0),a),N=[0,A[1],[35,A[2]]];return[21,[0,[0,N],0,0,0,y0([0,t],0,0)]]},e);break;case 9:return l0([0,u],function(a){var d=l0(0,function(T){return l(p(g6,0,0),T)},a),k=[0,d[1],[36,d[2]]];return[21,[0,[0,k],0,0,0,y0([0,t],0,0)]]},e)}}else if(i===36)return l0([0,u],function(a){var d=Fx(t,_0(a)),k=l0(0,function(V){return u0(V,36)},a)[1],T=_V(1,a);if(zo(T))var g=0,A=[0,T6(T)];else if(v6(T))var g=0,A=[0,I9(T,x)];else if(K(T)===48)var g=0,A=[0,l(gz(0),T)];else if(kI(T))var g=0,A=[0,WI(T)];else{var N=l(px[10],T),R=t2(0,0,T);if(R[0]===0)var L=R[1],z=N;else var O=R[1][2],M=0,L=M,z=p(O,N,function($,i0){return p(bx($,dn,97),$,i0)});var g=L,A=[1,z]}return[20,[0,k,A,y0([0,d],[0,g],0)]]},e)}if(v6(e))return l0([0,u],function(a){var d=I9(a,x);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(zo(e))return l0([0,u],function(a){l(r9(a),x);var d=T6(a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(typeof i=="number"){var f=i+ST|0;if(4>>0){if(f===24&&e[28][2])return l0([0,u],function(a){var d=p(px[3],[0,x],a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e)}else if(1>>0)return l0([0,u],function(a){var d=p(px[3],[0,x],a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e)}if(kI(e))return l0([0,u],function(a){var d=WI(a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(typeof i=="number"&&f2===i)return l0([0,u],function(a){var d=gx(a);u0(a,f2);var k=K(a),T=0;if(typeof k!="number"&&k[0]===4&&!P(k[3],vn)){Z0(a);var g=[0,T2(a)];T=1}if(!T)var g=0;var A=l(p3,a),N=A[1];return[21,[0,0,[0,[1,[0,d,g]]],[0,N],1,y0([0,t],[0,A[2]],0)]]},e);var o=v1(e,61)?0:1;return v1(e,0)?l0([0,u],function(a){var d=G0(U9,0,a,0);u0(a,1);var k=K(a),T=0;if(typeof k!="number"&&k[0]===4&&!P(k[3],vl)){var g=l(p3,a),A=g[2],N=[0,g[1]];T=1}if(!T){p(AL,a,d);var R=t2(0,0,a),O=R[0]===0?R[1]:R[1][1],A=O,N=0}return[21,[0,0,[0,[0,d]],N,o,y0([0,t],[0,A],0)]]},e):(g1(fl0,e),p(px[3],[0,x],e))}),O0(PL,function(x){var r=x?x[1]:0;function e(u){1-_1(u)&&zx(u,sn);var i=_0(u);u0(u,60);var f=hV(1,Gs(1,u)),o=Fx(i,_0(f));u0(f,49);var a=K(f);if(typeof a=="number")switch(a){case 36:var d=Fx(o,_0(f)),k=l0(0,function(A0){return u0(A0,36)},f)[1],T=_V(1,f),g=K(T),A=0;if(typeof g=="number")switch(g){case 15:var N=0,R=N,O=[0,[1,l0(0,function(A0){return p(j9,0,A0)},T)]];A=1;break;case 40:var R=0,O=[0,[2,l0(0,l(M9,0),T)]];A=1;break}else if(g[0]===4&&!P(g[3],_o)&&T[28][1]){var R=0,O=[0,[3,l0(0,l(D9,0),T)]];A=1}if(!A){var M=to(T),L=t2(0,0,T);if(L[0]===0)var Z=L[1],$=M;else var z=L[1][2],V=0,Z=V,$=p(z,M,function(Q0,H){return p(bx(Q0,ga,98),Q0,H)});var R=Z,O=[0,[4,$]]}return[9,[0,[0,k],O,0,0,y0([0,d],[0,R],0)]];case 48:if(f[28][2]){var i0=Gz[1],U=l0(0,function(A0){return p(i0,0,A0)},f);return[9,[0,0,[0,[8,U]],0,0,y0([0,o],0,0)]]}break;case 53:if(r){var J=l0(0,l(A6,0),f);return[9,[0,0,[0,[7,J]],0,0,y0([0,o],0,0)]]}break;case 61:if(r){var Y=l0(0,l(E6,0),f);return[9,[0,0,[0,[5,Y]],0,0,y0([0,o],0,0)]]}break;case 62:var F=l0(0,p(g6,ul0,0),f);return[9,[0,0,[0,[6,F]],0,0,y0([0,o],0,0)]];case 106:var n0=gx(f);u0(f,f2);var Q=K(f),f0=0;if(typeof Q!="number"&&Q[0]===4&&!P(Q[3],vn)){Z0(f);var s0=[0,p(px[13],0,f)];f0=1}if(!f0)var s0=0;var v0=l(p3,f),o0=v0[1];return[9,[0,0,0,[0,[1,[0,n0,s0]]],[0,o0],y0([0,o],[0,v0[2]],0)]];case 15:case 24:case 27:case 28:case 40:var c0=K(f);if(typeof c0=="number"){var T0=0;if(24<=c0){if(41>c0){var E0=0;switch(c0+ST|0){case 0:var M0=[0,[0,l0(0,function(A0){return G0(P6,0,A0,0)},f)]];break;case 3:var M0=[0,[0,l0(0,function(A0){return G0(P6,2,A0,0)},f)]];break;case 4:var M0=[0,[0,l0(0,function(A0){return G0(P6,1,A0,0)},f)]];break;case 16:var M0=[0,[2,l0(0,l(M9,0),f)]];break;default:E0=1}if(!E0){var Y0=M0;T0=1}}}else if(c0===15){var Y0=[0,[1,l0(0,function(U0){return p(j9,0,U0)},f)]];T0=1}if(T0)return[9,[0,0,Y0,0,0,y0([0,o],0,0)]]}throw q0([0,wr,il0],1)}else if(a[0]===4&&!P(a[3],_o)&&f[28][1]){var rx=[0,[3,l0(0,l(D9,0),f)]];return[9,[0,0,rx,0,0,y0([0,o],0,0)]]}var g0=K(f),H0=0;typeof g0=="number"?g0===53?zx(f,15):g0===61?zx(f,16):H0=1:H0=1,u0(f,0);var t0=G0(U9,0,f,0);u0(f,1);var ex=K(f),xx=0;if(typeof ex!="number"&&ex[0]===4&&!P(ex[3],vl)){var ax=l(p3,f),dx=ax[2],mx=[0,ax[1]];xx=1}if(!xx){p(AL,f,t0);var L0=t2(0,0,f),C0=L0[0]===0?L0[1]:L0[1][1],dx=C0,mx=0}return[9,[0,0,0,[0,[0,t0]],mx,y0([0,o],[0,dx],0)]]}var t=0;return function(u){return l0(t,e,u)}});var gK=function x(r,e){return x.fun(r,e)},AK=function x(r,e){return x.fun(r,e)},O6=function x(r,e){return x.fun(r,e)},X9=function(x,r){return function(e){if(!e)return Ax(r);var t=e[1];if(t[0]!==0){var u=t[1],i=u[1];if(e[2]){var f=e[2];return ux(x,[0,i,69]),l(X9(x,r),f)}var o=u[2],a=o[2];return l(X9(x,[0,[1,[0,i,[0,p(O6,x,o[1]),a]]],r]),0)}var d=t[1],k=d[2],T=e[2],g=d[1];switch(k[0]){case 0:var A=k[2],N=k[1],R=k[3];switch(N[0]){case 0:var O=[0,N[1]];break;case 1:var O=[1,N[1]];break;case 2:var O=[2,N[1]];break;case 3:var O=[3,N[1]];break;case 4:var O=Nx(Kl0);break;default:var O=[4,N[1]]}var M=A[2],L=0;if(M[0]===3){var z=M[1];if(!z[1]){var V=[0,z[3]],Z=z[2];L=1}}if(!L)var V=0,Z=p(O6,x,A);var $=[0,[0,[0,g,[0,O,Z,V,R]]],r];break;case 1:ux(x,[0,k[2][1],55]);var $=r;break;default:ux(x,[0,k[2][1],Zl0]);var $=r}return l(X9(x,$),T)}};O0(gK,function(x,r){var e=r[2],t=e[2],u=e[1],i=r[1],f=c3(x);return[0,i,[0,[0,l(X9(x,0),u),f,t]]]});var PK=function(x,r){var e=r[1];return l(px[23],r)?[0,p(O6,x,r)]:(ux(x,[0,e,41]),0)},d3=function(x,r){return function(e){if(!e)return Ax(r);var t=e[1];switch(t[0]){case 0:var u=t[1],i=u[2];if(i[0]===3){var f=i[1];if(!f[1]){var o=e[2];return l(d3(x,[0,[0,[0,u[1],[0,f[2],[0,f[3]]]]],r]),o)}}var a=e[2],d=PK(x,u);if(d)var k=d[1],T=[0,[0,[0,k[1],[0,k,0]]],r];else var T=r;return l(d3(x,T),a);case 1:var g=t[1],A=g[1];if(e[2]){var N=e[2];return ux(x,[0,A,20]),l(d3(x,r),N)}var R=g[2],O=R[2],M=PK(x,R[1]),L=M?[0,[1,[0,A,[0,M[1],O]]],r]:r;return l(d3(x,L),0);default:var z=e[2];return l(d3(x,[0,[2,t[1]],r]),z)}}};O0(AK,function(x,r){var e=r[2],t=e[2],u=e[1],i=r[1],f=c3(x);return[0,i,[1,[0,l(d3(x,0),u),f,t]]]}),O0(O6,function(x,r){var e=r[2],t=r[1];switch(e[0]){case 0:return p(AK,x,[0,t,e[1]]);case 9:var u=e[1],i=u[2][1],f=u[1],o=0;if(x[5]&&$v(i)?ux(x,[0,f,76]):o=1,o&&1-x[5]){var a=0;if(x[18]&&Ar(i,B2)?ux(x,[0,f,Ri]):a=1,a){var d=x[19],k=d&&Ar(i,Pv);k&&ux(x,[0,f,6])}}return[0,t,[2,[0,u,c3(x),0]]];case 24:return p(gK,x,[0,t,e[1]]);default:return[0,t,[3,[0,t,e]]]}});var I6=function(x,r){var e=K(x);if(typeof e=="number"){if(e===6)return l0(0,function(i){var f=_0(i);u0(i,6);for(var o=0;;){var a=K(i);if(typeof a=="number"){var d=0;if(13<=a)Nr===a&&(d=1);else if(7<=a)switch(a-7|0){case 0:d=1;break;case 2:var k=gx(i);u0(i,9);var o=[0,[2,k],o];continue;case 5:var T=_0(i),g=l0(0,function(U){return u0(U,12),I6(U,r)},i),A=g[1],N=g[2],R=[1,[0,A,[0,N,y0([0,T],0,0)]]];K(i)!==7&&(ux(i,[0,A,20]),K(i)===9&&Z0(i));var o=[0,R,o];continue}if(d){var O=Ax(o),M=_0(i);u0(i,7);var L=K(i)===86?[1,qv(i)]:c3(i);return[1,[0,O,L,X1([0,f],[0,yx(i)],M,0)]]}}var z=l0(0,function(i0){var U=I6(i0,r),J=K(i0),Y=0;if(typeof J=="number"&&J===82){u0(i0,82);var F=[0,l(px[10],i0)];Y=1}if(!Y)var F=0;return[0,U,F]},i),V=z[2],Z=[0,[0,z[1],[0,V[1],V[2]]]];K(i)!==7&&u0(i,9);var o=[0,Z,o]}},x);if(!e){var t=function(i){var f=K(i);return typeof f=="number"&&f===82?(u0(i,82),[0,l(px[10],i)]):0};return l0(0,function(i){var f=_0(i);u0(i,0);for(var o=0,a=0,d=0;;){var k=K(i);if(typeof k=="number"){var T=0;if(k!==1&&Nr!==k&&(T=1),!T){a&&ux(i,[0,a[1],95]);var g=Ax(d),A=_0(i);u0(i,1);var N=yx(i),R=K(i)===86?[1,qv(i)]:c3(i);return[0,[0,g,R,X1([0,f],[0,N],A,0)]]}}if(K(i)===12)var O=_0(i),M=l0(0,function(mx){return u0(mx,12),I6(mx,r)},i),L=M[2],z=M[1],V=[0,[1,[0,z,[0,L,y0([0,O],0,0)]]]];else{var Z=gx(i),$=p(px[20],0,i),i0=K(i),U=0;if(typeof i0=="number"&&i0===86){u0(i,86);var J=l0([0,Z],function(L0){var C0=I6(L0,r);return[0,C0,t(L0)]},i),Y=J[2],F=$[2],n0=Y[2],Q=Y[1],f0=J[1];switch(F[0]){case 0:var s0=[0,F[1]];break;case 1:var s0=[1,F[1]];break;case 2:var s0=[2,F[1]];break;case 3:var s0=[3,F[1]];break;case 4:var s0=Nx(Vl0);break;default:var s0=[4,F[1]]}var V=[0,[0,[0,f0,[0,s0,Q,n0,0]]]]}else U=1;if(U){var v0=$[2];if(v0[0]===3){var o0=v0[1],c0=o0[2][1],T0=o0[1];by(c0)?ux(i,[0,T0,st]):u3(c0)&&dt(i,[0,T0,85]);var E0=l0([0,Z],function(L0,C0){return function(A0){var U0=[0,C0,[2,[0,L0,c3(A0),0]]];return[0,U0,t(A0)]}}(o0,T0),i),M0=E0[2],V=[0,[0,[0,E0[1],[0,[3,o0],M0[1],M0[2],1]]]]}else{g1(zl0,i);var V=0}}}if(V){var Y0=V[1],rx=Y0[1][1],g0=o?(ux(i,[0,rx,69]),0):a;if(Y0[0]===0)var t0=g0,ex=o;else var H0=K(i)===9?[0,gx(i)]:0,t0=H0,ex=1;K(i)!==1&&u0(i,9);var o=ex,a=t0,d=[0,Y0,d]}}},x)}}var u=G0(px[14],x,0,r);return[0,u[1],[2,u[2]]]},J9=function(x){var r=K(x);if(typeof r=="number"){var e=r+OB|0,t=0;if(6>>0?e===14&&(t=1):4>>0&&(t=1),t)return yx(x)}return K2(x)?Ko(x):0},CK=function(x){return K(x)===1?0:[0,l(px[7],x)]},uo=function(x){var r=gx(x),e=K(x),t=0;if(typeof e!="number"&&e[0]===8){var u=e[1];t=1}if(!t){g1(Gl0,x);var u=bl0}var i=_0(x);Z0(x);var f=K(x),o=0;if(typeof f=="number"){var a=f+YD|0,d=0;if(72>>0?a===76&&(d=1):70>>0&&(d=1),d){var k=yx(x);o=1}}if(!o)var k=J9(x);return[0,r,[0,u,y0([0,i],[0,k],0)]]},NK=function(x){var r=pr(1,x);if(typeof r=="number"){if(r===10)for(var e=l0(0,function(i){var f=[0,uo(i)];return u0(i,10),[0,f,uo(i)]},x);;){var t=K(x);if(typeof t=="number"&&t===10){var u=e[1],e=l0([0,u],function(f){return function(o){return u0(o,10),[0,[1,f],uo(o)]}}(e),x);continue}return[2,e]}if(r===86)return[1,l0(0,function(i){var f=uo(i);return u0(i,86),[0,f,uo(i)]},x)]}return[0,uo(x)]},L6=function(x,r){return Ar(x[2][1],r[2][1])},RK=function(x,r){var e=x[2],t=e[1],u=r[2],i=u[1],f=0,o=e[2],a=u[2];if(t[0]===0){var d=t[1];if(i[0]===0)var T=L6(d,i[1]);else f=1}else{var k=t[1];if(i[0]===0)f=1;else var T=RK(k,i[1])}if(f)var T=0;return T&&L6(o,a)},V9=function(x,r){switch(x[0]){case 0:var e=x[1];if(r[0]===0)return L6(e,r[1]);break;case 1:var t=x[1];if(r[0]===1){var u=t[2],i=r[1][2],f=u[2],o=i[2],a=L6(u[1],i[1]);return a&&L6(f,o)}break;default:var d=x[1];if(r[0]===2)return RK(d,r[1])}return 0},OL=function(x){switch(x[0]){case 0:return x[1][1];case 1:return x[1][1];default:return x[1][1]}},OK=function x(r,e){return x.fun(r,e)},IL=function x(r,e){return x.fun(r,e)},LL=function x(r,e){return x.fun(r,e)};O0(OK,function(x,r){var e=K(r);if(typeof e=="number"){if(e===0){J1(r,0);var t=l0(0,function(g){u0(g,0);var A=K(g),N=0;if(typeof A=="number"&&A===12){var R=_0(g);u0(g,12);var O=l(px[10],g),z=[3,[0,O,y0([0,R],0,0)]];N=1}if(!N)var M=CK(g),L=M?0:_0(g),z=[2,[0,M,X1(0,0,L,0)]];return u0(g,1),z},r),u=t[2],i=t[1];return W1(r),[0,i,u]}}else if(e[0]===9){var f=e[3],o=e[2],a=e[1];return u0(r,e),[0,a,[4,[0,o,f]]]}var d=p(LL,x,r),k=d[2],T=d[1];return un<=k[1]?[0,T,[1,k[2]]]:[0,T,[0,k[2]]]});var z9=function(x){switch(x[0]){case 0:return x[1][2][1];case 1:var r=x[1][2],e=r[1],t=Qx(Wl0,r[2][2][1]);return Qx(e[2][1],t);default:var u=x[1][2],i=u[1],f=u[2],o=i[0]===0?i[1][2][1]:z9([2,i[1]]);return Qx(o,Qx($l0,f[2][1]))}};O0(IL,function(x,r){var e=_0(r),t=l0(0,function(Cr){u0(Cr,98);var n2=K(Cr);if(typeof n2=="number"){if(n2===99)return Z0(Cr),Fl0}else if(n2[0]===8){var w=NK(Cr),x0=0;if(_1(Cr)&&K(Cr)===98&&ft!==pr(1,Cr)){var e0=t9(Cr,0,A9);x0=1}if(!x0)var e0=0;for(var S0=0;;){var G=K(Cr);if(typeof G=="number"){if(G===0){var k0=_0(Cr);J1(Cr,0);var J0=l0(0,function($x){u0($x,0),u0($x,12);var nr=l(px[10],$x);return u0($x,1),nr},Cr),I0=J0[2],ix=J0[1];W1(Cr);var S0=[0,[1,[0,ix,[0,I0,y0([0,k0],[0,J9(Cr)],0)]]],S0];continue}}else if(G[0]===8){var S0=[0,[0,l0(0,function($x){var nr=pr(1,$x),Zx=0;if(typeof nr=="number"&&nr===86){var Lr=[1,l0(0,function(me){var Pn=uo(me);return u0(me,86),[0,Pn,uo(me)]},$x)];Zx=1}if(!Zx)var Lr=[0,uo($x)];var Yx=K($x),ue=0;if(typeof Yx=="number"&&Yx===82){u0($x,82);var Qt=_0($x),S2=K($x),Ze=0;if(typeof S2=="number")if(S2===0){var fo=_0($x);J1($x,0);var gn=l0(0,function(me){u0(me,0);var Pn=CK(me);return u0(me,1),Pn},$x),ds=gn[1],ye=gn[2];W1($x);var An=[0,ye,X1([0,fo],[0,J9($x)],0,0)];An[1]||ux($x,[0,ds,52]);var Ft=[0,[1,[0,ds,An]]]}else Ze=1;else if(S2[0]===10){var We=S2[3],Ht=S2[2],dr=S2[1];u0($x,S2);var Ft=[0,[0,[0,dr,[0,Ht,We,y0([0,Qt],[0,J9($x)],0)]]]]}else Ze=1;if(Ze){zx($x,40);var Ft=[0,[0,[0,gx($x),ql0]]]}var yt=Ft;ue=1}if(!ue)var yt=0;return[0,Lr,yt]},Cr)],S0];continue}var Wx=Ax(S0),Bx=[0,wo,[0,w,e0,v1(Cr,ft),Wx]];return v1(Cr,99)?[0,Bx]:(xo(Cr,99),[1,Bx])}}return xo(Cr,99),Hl0},r);W1(r);var u=t[2];if(u[0]===0)var i=u[1],f=typeof i=="number"?0:i[2][3];else var f=1;if(f)var o=YA,a=o,d=l0(0,function(Cr){return 0},r);else{J1(r,3);for(var k=t[2][1],T=typeof k=="number"?0:[0,k[2][1]],g=gx(r),A=0;;){var N=n3(r),R=0;if(A&&T){var O=A[1],M=O[2],L=0,z=T[1],V=A[2];if(M[0]===0){var Z=M[1],$=Z[2];if($)var i0=$[1][2][1],U=1-V9(Z[1][2][1],i0),J=U&&V9(z,i0);else L=1}else L=1;if(L)var J=0;if(J){var Y=O[2],F=0;if(Y[0]===0){var n0=Y[1],Q=n0[2];if(Q){var f0=Q[1],s0=Hr(O[1],n0[3][1]),v0=[0,wo,f0],o0=[0,s0,[0,[0,n0[1],0,n0[3],n0[4]]]];F=1}}if(!F)var v0=YA,o0=O;W1(r);var c0=[0,Ax([0,o0,V]),N,v0];R=1}}if(!R){var T0=K(r),E0=0;if(typeof T0=="number"){if(T0===98){J1(r,2);var M0=K(r),Y0=pr(1,r),rx=0;if(typeof M0=="number"&&M0===98&&typeof Y0=="number"){var g0=0;if((ft===Y0||Nr===Y0)&&(g0=1),g0){var H0=l0(0,function(x0){u0(x0,98),u0(x0,ft);var e0=K(x0);if(typeof e0=="number"){if(e0===99)return Z0(x0),un}else if(e0[0]===8){var S0=NK(x0);return e9(x0,99),[0,wo,[0,S0]]}return xo(x0,99),un},r),t0=H0[2],ex=H0[1],xx=typeof t0=="number"?[0,un,ex]:[0,wo,[0,ex,t0[2]]],ax=r[24][1],dx=0;if(ax){var mx=ax[2];if(mx){var L0=mx[2];dx=1}}if(!dx)var L0=Nx(Ts0);r[24][1]=L0;var C0=t3(r),A0=u6(r[25][1],C0);r[26][1]=A0;var c0=[0,Ax(A),N,xx];E0=1,rx=1}}if(!rx){var U0=p(IL,T,r),Q0=U0[2],H=U0[1],b=un<=Q0[1]?[0,H,[1,Q0[2]]]:[0,H,[0,Q0[2]]],A=[0,b,A];continue}}else if(Nr===T0){g1(0,r);var c0=[0,Ax(A),N,YA];E0=1}}if(!E0){var A=[0,p(OK,T,r),A];continue}}var B=c0[3],a0=c0[1],m0=N?N[1]:g,a=B,d=[0,Hr(g,m0),a0];break}}var P0=yx(r),D=0;if(typeof a!="number"){var N0=a[1],X0=0;if(wo===N0){var D0=a[2],ox=D0[2][1],b0=t[2],kx=D0[1];if(b0[0]===0){var V0=b0[1];if(typeof V0=="number")ux(r,[0,OL(ox),Ql0]);else{var h=V0[2][1];if(1-V9(ox,h)){var X=0;if(x&&V9(x[1],ox)){var W0=[19,z9(h)];ux(r,[0,OL(h),W0]),X=1}if(!X){var sx=[13,z9(h)];ux(r,[0,OL(ox),sx])}}}}var tx=kx;X0=1}else if(un===N0){var j0=a[2],Px=t[2];if(Px[0]===0){var Ex=Px[1];typeof Ex!="number"&&ux(r,[0,j0,[13,z9(Ex[2][1])]])}var tx=j0;X0=1}if(X0){var Ix=tx;D=1}}if(!D)var Ix=t[1];var qx=t[2][1],B0=t[1];if(typeof qx=="number"){var tr=0,Ux=y0([0,e],[0,P0],0);if(typeof a!="number"){var K0=a[1],ur=0;if(wo===K0){var z0=a[2][1];ur=1}else if(un===K0){var z0=a[2];ur=1}if(ur){var or=z0;tr=1}}if(!tr)var or=Ix;var Ur=[0,un,[0,B0,or,d,Ux]]}else{var lx=qx[2],a1=0,z1=y0([0,e],[0,P0],0);if(typeof a!="number"&&wo===a[1]){var w1=[0,a[2]];a1=1}if(!a1)var w1=0;var Ur=[0,wo,[0,[0,B0,lx],w1,d,z1]]}return[0,Hr(t[1],Ix),Ur]}),O0(LL,function(x,r){return J1(r,2),p(IL,x,r)});var IK=function(x,r){var e=T2(r);return u9(x,r,e),e},LK=function x(r){return x.fun(r)},ML=function x(r,e,t){return x.fun(r,e,t)},DL=function x(r){return x.fun(r)},MK=function x(r,e){return x.fun(r,e)},jL=function x(r,e){return x.fun(r,e)},UL=function x(r,e){return x.fun(r,e)},K9=function x(r,e){return x.fun(r,e)},M6=function x(r,e){return x.fun(r,e)},Z9=function x(r){return x.fun(r)},DK=function x(r){return x.fun(r)},jK=function x(r){return x.fun(r)},UK=function x(r,e,t){return x.fun(r,e,t)},BK=function x(r){return x.fun(r)},YK=function x(r){return x.fun(r)},$E0=l(LL,0);O0(LK,function(x){var r=K(x),e=0;if(typeof r!="number"&&r[0]===6){var t=r[2],u=r[1];Z0(x);var i=[0,[0,u,t]];e=1}if(!e)var i=0;var f=_0(x),o=Ax(f),a=5;x:for(;;){if(o)for(var d=o[2],k=o[1],T=k[2],g=k[1],A=T[2],N=0,R=Xx(A);;){if(R<(N+5|0))var O=0;else{var M=Ar(m2(A,N,a),"@flow");if(!M){var N=N+1|0;continue}var O=M}if(!O){var o=d;continue x}x[31][1]=g[3];var L=Ax([0,[0,g,T],d]);break}else var L=0;if(L===0){var z=0;if(f){var V=f[1],Z=V[2];if(!Z[1]){var $=Z[2],i0=0,U=V[1];if(1<=Xx($)&&O1($,0)===42){x[31][1]=U[3];var J=[0,V,0];z=1}else i0=1}}if(!z)var J=0}else var J=L;var Y=p(MK,x,function(v0){return 0}),F=gx(x);u0(x,Nr);var n0=w2[1];if(x2(function(v0,o0){var c0=o0[2];switch(c0[0]){case 20:return y6(x,v0,wn(0,[0,c0[1][1],i60]));case 21:var T0=c0[1],E0=T0[1];if(E0){if(!T0[2]){var M0=E0[1],Y0=M0[2],rx=0,g0=M0[1];switch(Y0[0]){case 37:var H0=Y0[1][1],t0=0,ex=x2(function(C0,A0){return x2(EI,C0,[0,A0[2][1],0])},t0,H0);return x2(function(C0,A0){return y6(x,C0,A0)},v0,ex);case 2:case 26:var xx=Y0[1][1];if(xx)var ax=xx[1];else rx=1;break;case 3:case 19:case 29:case 35:case 36:var ax=Y0[1][1];break;default:rx=1}return rx?v0:y6(x,v0,wn(0,[0,g0,ax[2][1]]))}}else{var dx=T0[2];if(dx){var mx=dx[1];if(mx[0]!==0)return v0;var L0=mx[1];return x2(function(C0,A0){var U0=A0[2],Q0=U0[2],H=U0[1];return Q0?y6(x,C0,Q0[1]):y6(x,C0,H)},v0,L0)}}return v0;default:return v0}},n0,Y),Y)var Q=Bl(Ax(Y))[1],f0=Hr(Bl(Y)[1],Q);else var f0=F;var s0=Ax(x[2][1]);return[0,f0,[0,Y,i,y0([0,J],0,0),s0]]}});var QE0=function(x,r,e,t){for(var u=x,i=t;;){var f=i[3],o=i[2],a=i[1],d=K(u);if(typeof d=="number"&&Nr===d)return[0,u,a,o,f];if(l(r,d))return[0,u,a,o,f];if(typeof d!="number"&&d[0]===2){var k=l(e,u),T=[0,k,o],g=k[2];if(g[0]===22){var A=g[1][2];if(A){var N=Ar(A[1],"use strict"),R=k[1],O=N&&1-u[21];O&&ux(u,[0,R,84]);var M=N?Gs(1,u):u,L=[0,d,a],z=f||N,u=M,i=[0,L,T,z];continue}}return[0,u,a,T,f]}return[0,u,a,o,f]}};O0(ML,function(x,r,e){var t=QE0(kV(1,x),r,e,t60),u=t[4],i=t[3],f=t[2],o=kV(0,t[1]),a=Ax(f);return P2(function(d){if(typeof d!="number"&&d[0]===2){var k=d[1],T=k[4],g=k[1];return T&&dt(o,[0,g,81])}return Nx(Qx(u60,Qx(jJ(d),n60)))},a),[0,o,i,u]}),O0(DL,function(x){var r=mL(x),e=K(x);if(typeof e=="number"){var t=e-49|0;if(11>=t>>>0)switch(t){case 0:return p(kK,r,x);case 1:l(r9(x),r);var u=pr(1,x),i=0;if(typeof u=="number"){var f=0;if((u===4||u===10)&&(f=1),f){var o=N6(x);i=1}}if(!i)var o=RL(x);return o;case 11:if(pr(1,x)===49)return l(r9(x),r),p(PL,0,x);break}}return p(M6,[0,r],x)}),O0(MK,function(x,r){var e=G0(ML,x,r,DL),t=e[2],u=p(jL,r,e[1]);return x2(function(i,f){return[0,f,i]},u,t)}),O0(jL,function(x,r){for(var e=0;;){var t=K(r);if(typeof t=="number"&&Nr===t||l(x,t))return Ax(e);var e=[0,l(DL,r),e]}}),O0(UL,function(x,r){var e=G0(ML,r,x,function(f){return p(M6,0,f)}),t=e[3],u=e[2],i=p(K9,x,e[1]);return[0,x2(function(f,o){return[0,o,f]},i,u),t]}),O0(K9,function(x,r){for(var e=0;;){var t=K(r);if(typeof t=="number"&&Nr===t||l(x,t))return Ax(e);var e=[0,p(M6,0,r),e]}}),O0(M6,function(x,r){var e=x?x[1]:0;1-v6(r)&&l(r9(r),e);var t=K(r);if(typeof t=="number"){if(t===27)return l0(DE0,ME0,r);if(t===28)return l0(UE0,jE0,r)}if(zo(r))return T6(r);if(v6(r))return I9(r,e);if(typeof t=="number"){var u=t+K1|0;if(14>=u>>>0)switch(u){case 0:if(r[28][2])return l(gz(0),r);break;case 5:return l(oK,r);case 12:return p(gL,0,r);case 13:return l(iK,r);case 14:return l(cK,r)}}return kI(r)?WI(r):l(Z9,r)}),O0(Z9,function(x){var r=K(x);if(typeof r=="number"&&ct>r)switch(r){case 0:return l(nK,x);case 8:return l(xK,x);case 16:return wK(x);case 19:return l0(gE0,EE0,x);case 20:return l0(PE0,AE0,x);case 22:return l0(NE0,CE0,x);case 23:return l0(OE0,RE0,x);case 24:return l0(LE0,IE0,x);case 25:return l0(YE0,BE0,x);case 26:return l(tK,x);case 32:return l(rK,x);case 35:return l(eK,x);case 37:return l0(kE0,mE0,x);case 39:return l0(_E0,hE0,x);case 43:return wK(x);case 59:return l0(yE0,dE0,x);case 113:return g1(x60,x),[0,gx(x),r60];case 1:case 5:case 7:case 9:case 10:case 11:case 12:case 17:case 18:case 33:case 34:case 36:case 38:case 41:case 42:case 49:case 83:case 86:return g1(e60,x),Z0(x),l(Z9,x)}if(zo(x)){var e=T6(x);return Qv(x,e[1]),e}if(typeof r=="number"&&r===28&&pr(1,x)===6){var t=s6(1,x);return ux(x,[0,Hr(gx(x),t),4]),N6(x)}return vs(x)?l0(JE0,XE0,x):(v6(x)&&(g1(0,x),Z0(x)),N6(x))}),O0(DK,function(x){var r=gx(x),e=l($t,x),t=K(x);return typeof t=="number"&&t===9?G0(N9,x,r,[0,e,0]):e}),O0(jK,function(x){var r=gx(x),e=l(l3,x),t=K(x);return typeof t=="number"&&t===9?[0,G0(N9,x,r,[0,v2(x,e),0])]:e}),O0(UK,function(x,r,e){var t=r?r[1]:0;return l0(0,function(u){var i=1-t,f=IK([0,e],u),o=i&&(K(u)===85?1:0);return o&&(1-_1(u)&&zx(u,b2),u0(u,85)),[0,f,YI(u),o]},x)}),O0(BK,function(x){var r=gx(x),e=_0(x);u0(x,0);var t=p(K9,function(o){return o===1?1:0},x),u=gx(x),i=t===0?_0(x):0;u0(x,1);var f=[0,t,X1([0,e],[0,yx(x)],i,0)];return[0,Hr(r,u),f]}),O0(YK,function(x){function r(t){var u=_0(t);u0(t,0);var i=p(UL,function(A){return A===1?1:0},t),f=i[1],o=i[2],a=f===0?_0(t):0;u0(t,1);var d=K(t),k=0;if(!x){var T=0;if((typeof d!="number"||d!==1&&Nr!==d)&&(T=1),T)if(K2(t)){var g=Ko(t);k=1}else{var g=0;k=1}}if(!k)var g=yx(t);return[0,[0,f,X1([0,u],[0,g],a,0)],o]}var e=0;return function(t){return i9(e,r,t)}}),bX(o60[1],px,[0,LK,Z9,M6,K9,UL,jL,DK,jK,Rz,$t,g9,sE0,IK,UK,BK,YK,$E0,I6,O6,$o,I9,pE0,rE0,P9,qv,C9]);var BL=[Gr,PT0,Js(0)],YL=[0,BL,[0]],FE0=my(AT0,function(x){var r=UO(x,gT0)[41],e=JO(x,0,0,ET0,QO,1)[1];return qX(x,r,function(t,u){return 0}),function(t,u){var i=ky(u,x);return l(e,i),VO(u,i,x)}}),HE0=Dv(YL)===Gr?YL:YL[1];tO(YE,HE0);var io=d0,O2=null,XK=void 0,qE0=function(x){throw x},W9=function(x){return x!==XK?1:0};io.String,io.RegExp,io.Object,io.Date,io.Math;var GE0=io.Array,bE0=io.Error,JK=function(x){return l(qE0,x)};io.JSON,PX(function(x){return x[1]===BL?[0,Bt(x[2].toString())]:0}),PX(function(x){return x instanceof GE0?0:[0,Bt(x.toString())]});var VK=[0,0],xg0=er,ps=function(x){return qZ(Jl(x))},V1=function(x){return HZ(Jl(x))},Rr=function(x,r){return V1(Ax(iy(x,r)))},Mx=function(x,r){return r?l(x,r[1]):O2},y3=function(x,r){return r[0]===0?O2:l(x,r[1])},zK=function(x){return ps([0,[0,ST0,x[1]],[0,[0,TT0,x[2]],0]])},KK=function(x){var r=x[1],e=r?er(r[1][1]):O2,t=[0,[0,hT0,zK(x[3])],0];return ps([0,[0,wT0,e],[0,[0,_T0,zK(x[2])],t]])},A1=function(x){if(!x)return 0;var r=x[1],e=r[1];return y0([0,e],[0,Fx(r[3],r[2])],0)},D6=function(x,r,e){var t=r[e];return W9(t)?t|0:x},rg0=function(x,r){var e=Cl(r,XK)?{}:r,t=Bt(x),u=D6(Dl[5],e,NT0),i=D6(Dl[4],e,RT0),f=D6(Dl[3],e,OT0),o=D6(Dl[2],e,IT0),a=[0,D6(Dl[1],e,LT0),o,f,i,u,0,0],d=e[ED],k=W9(d),T=k&&d|0,g=e[xD],A=W9(g)?g|0:1,N=e.all_comments,R=W9(N)?N|0:1,O=[0,0],M=T?[0,function(po){return O[1]=[0,po,O[1]],0}]:0,L=CT0[1],z=0;try{var V=0,Z=lJ(t),$=V,i0=Z}catch(po){var U=I1(po);if(U!==Io)throw q0(U,0);var J=[0,[0,[0,z,Ka[2],Ka[3]],54],0],$=J,i0=lJ(Rs0)}var Y=[0,z,i0,px0,0,a[4],IJ,dx0],F=[0,u6(Y,0)],n0=[0,[0,$],[0,0],w2[1],[0,0],a[5],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,[0,Is0],[0,Y],F,[0,M],a,z,[0,0],[0,Os0]],Q=l(px[1],n0),f0=Ax(n0[1][1]),s0=[0,SI[1],0],v0=Ax(x2(function(po,ua){var q=po[2],C=po[1];return p(SI[3],ua,C)?[0,C,q]:[0,p(SI[4],ua,C),[0,ua,q]]},s0,f0)[2]);if(v0){var o0=v0[2],c0=v0[1];if(L)throw q0([0,hS0,c0,o0],1)}VK[1]=0;for(var T0=Xx(t)-0|0,E0=xs(t),M0=0,Y0=0;;){if(Y0===T0)var rx=M0;else{var g0=se(E0,Y0),H0=0;if(0<=g0&&!(Jr=g0){var t0=4;ax=1}if(!ax)var t0=0}}}if(t0===0){var M0=TI(M0,Y0,0),Y0=Y0+1|0;continue}if((T0-Y0|0)>=t0){var dx=t0-1|0,mx=Y0+t0|0;if(3>>0)throw q0([0,wr,tH],1);switch(dx){case 0:var L0=se(E0,Y0);break;case 1:var L0=(se(E0,Y0)&31)<<6|se(E0,Y0+1|0)&63;break;case 2:var L0=(se(E0,Y0)&15)<<12|(se(E0,Y0+1|0)&63)<<6|se(E0,Y0+2|0)&63;break;default:var L0=(se(E0,Y0)&7)<<18|(se(E0,Y0+1|0)&63)<<12|(se(E0,Y0+2|0)&63)<<6|se(E0,Y0+3|0)&63}var M0=TI(M0,Y0,[0,L0]),Y0=mx;continue}var rx=TI(M0,Y0,0)}for(var C0=Lv0,A0=Ax([0,6,rx]);;){var U0=C0[3],Q0=C0[2],H=C0[1];if(!A0){var b=Jl(Ax(U0));if(A)var a0=Q;else var B=l(FE0[1],0),a0=p(bx(B,-201766268,99),B,Q);if(R)var P0=a0;else var m0=a0[2],P0=[0,a0[1],[0,m0[1],m0[2],m0[3],0]];var D=function(q,C,j,h0){var R0=[0,c9(b,C[3]),0],nx=[0,[0,v60,V1([0,c9(b,C[2]),R0])],0],Sx=Fx(nx,[0,[0,a60,KK(C)],0]);if(j){var Dx=j[1],jx=Dx[1];if(jx){var xr=Dx[2];if(xr)var hr=[0,[0,l60,ks(xr)],0],cr=[0,[0,p60,ks(jx)],hr];else var cr=[0,[0,d60,ks(jx)],0];var sr=cr}else var lr=Dx[2],kr=lr?[0,[0,y60,ks(lr)],0]:0,sr=kr;var Er=sr}else var Er=0;return ps(us(Fx(Sx,Fx(Er,[0,[0,m60,er(q)],0])),h0))},N0=function(q){return Rr(j0,q)},X0=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,Fm0,er(gn(C[2]))],0];return D(qm0,R0,j,[0,[0,Hm0,Rr(ds,h0)],nx])},D0=function(q){var C=q[2],j=C[5],h0=C[4],R0=C[2],nx=C[1],Sx=q[1],Dx=[0,[0,a90,Rr(I0,C[3])],0],jx=[0,[0,l90,We(0,h0)],Dx],xr=[0,[0,p90,Mx(a2,R0)],jx];return D(y90,Sx,j,[0,[0,d90,K0(nx)],xr])},ox=function(q,C){var j=C[2],h0=j[7],R0=j[5],nx=j[4],Sx=j[2],Dx=j[6],jx=j[3],xr=j[1],hr=C[1];if(nx)var cr=nx[1][2],lr=cr[2],kr=cr[1],sr=R2(cr[3],h0),Er=lr,$r=[0,kr];else var sr=h0,Er=0,$r=0;if(R0)var zr=R0[1][2],r1=zr[1],Or=R2(zr[2],sr),e1=Or,l1=Rr(S0,r1);else var e1=sr,l1=V1(0);var T1=[0,[0,Ed0,l1],[0,[0,Sd0,Rr(e0,Dx)],0]],p1=[0,[0,gd0,Mx(ke,Er)],T1],i1=[0,[0,Ad0,Mx(z0,$r)],p1],f1=[0,[0,Pd0,Mx(a2,jx)],i1],d1=Sx[2],P1=d1[2],$1=Sx[1],l2=[0,[0,Cd0,D(jd0,$1,P1,[0,[0,Dd0,Rr(G,d1[1])],0])],f1];return D(q,hr,e1,[0,[0,Nd0,Mx(K0,xr)],l2])},b0=function(q,C){var j=C[2],h0=j[5],R0=j[4],nx=j[3],Sx=j[2],Dx=j[1],jx=C[1],xr=q?dd0:yd0,hr=[0,[0,md0,Mx(dr,R0)],0],cr=[0,[0,kd0,Mx(dr,nx)],hr],lr=[0,[0,hd0,Mx(a2,Sx)],cr];return D(xr,jx,h0,[0,[0,_d0,K0(Dx)],lr])},kx=function(q){var C=q[2],j=C[4],h0=C[2],R0=C[1],nx=q[1],Sx=[0,[0,vd0,dr(C[3])],0],Dx=[0,[0,ad0,Mx(a2,h0)],Sx];return D(pd0,nx,j,[0,[0,ld0,K0(R0)],Dx])},V0=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,F50,J0(C[2])],0];return D(q50,R0,j,[0,[0,H50,K0(h0)],nx])},h=function(q){var C=q[2],j=C[3],h0=q[1],R0=C[5],nx=C[4],Sx=C[2],Dx=C[1],jx=R2(A1(j[2][3]),R0),xr=j[2],hr=xr[1],cr=xr[2],lr=[0,[0,L50,Mx(a2,Sx)],0],kr=[0,[0,M50,oo(nx)],lr],sr=[0,[0,D50,w1(hr)],kr],Er=[0,[0,j50,Mx(n2,cr)],sr],$r=[0,[0,U50,w1(hr)],Er];return D(Y50,h0,jx,[0,[0,B50,K0(Dx)],$r])},X=function(q){var C=q[2],j=C[6],h0=C[4],R0=C[7],nx=C[5],Sx=C[3],Dx=C[2],jx=C[1],xr=q[1],hr=V1(h0?[0,I0(h0[1]),0]:0),cr=j?Rr(S0,j[1][2][1]):V1(0),lr=[0,[0,C50,hr],[0,[0,P50,cr],[0,[0,A50,Rr(I0,nx)],0]]],kr=[0,[0,N50,We(0,Sx)],lr],sr=[0,[0,R50,Mx(a2,Dx)],kr];return D(I50,xr,R0,[0,[0,O50,K0(jx)],sr])},W0=function(q){var C=q[2],j=C[2],h0=C[1],R0=C[4],nx=C[3],Sx=q[1],Dx=Hr(h0[1],j[1]),jx=[0,[0,S50,Mx(lo,nx)],0];return D(g50,Sx,R0,[0,[0,E50,Ur(Dx,[0,h0,[1,j],0])],jx])},sx=function(q){var C=q[2],j=C[2],h0=C[1],R0=C[4],nx=C[3],Sx=q[1],Dx=Hr(h0[1],j[1]),jx=[0,[0,_50,er(gn(nx))],0];return D(T50,Sx,R0,[0,[0,w50,Ur(Dx,[0,h0,[1,j],0])],jx])},tx=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,k50,N0(C[1])],0];return D(h50,h0,A1(j),R0)},j0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return tx([0,j,C[1]]);case 1:var h0=C[1],R0=h0[2];return D(g60,j,R0,[0,[0,E60,Mx(K0,h0[1])],0]);case 2:return ox(wd0,[0,j,C[1]]);case 3:var nx=C[1],Sx=nx[3],Dx=nx[6],jx=nx[5],xr=nx[4],hr=nx[2],cr=nx[1],lr=R2(A1(Sx[2][3]),Dx),kr=[0,[0,ly0,Mx(a2,hr)],0],sr=[0,[0,py0,oo(xr)],kr],Er=Sx[2],$r=Er[2],zr=Er[1];if($r)var r1=$r[1],Or=r1[2],e1=Or[2],l1=r1[1],T1=D(_y0,l1,e1,[0,[0,hy0,ix(Or[1])],0]),p1=V1(Ax([0,T1,iy(k0,zr)]));else var p1=V1(_n(k0,zr));var i1=[0,[0,yy0,K0(cr)],[0,[0,dy0,p1],sr]];return D(ky0,j,lr,[0,[0,my0,tx(jx)],i1]);case 4:var f1=C[1],d1=f1[2];return D(P60,j,d1,[0,[0,A60,Mx(K0,f1[1])],0]);case 5:return D(C60,j,C[1][1],0);case 6:return X([0,j,C[1]]);case 7:return h([0,j,C[1]]);case 8:return V0([0,j,C[1]]);case 9:var P1=C[1],$1=P1[5],l2=P1[4],qr=P1[3],Kx=P1[2],Xr=P1[1];if(qr){var Mr=qr[1];if(Mr[0]!==0&&!Mr[1][2])return D(R60,j,$1,[0,[0,N60,Mx(B0,l2)],0])}if(Kx){var Dr=Kx[1];switch(Dr[0]){case 0:var Qr=sx(Dr[1]);break;case 1:var Qr=W0(Dr[1]);break;case 2:var Qr=X(Dr[1]);break;case 3:var Qr=h(Dr[1]);break;case 4:var Qr=dr(Dr[1]);break;case 5:var Qr=kx(Dr[1]);break;case 6:var Qr=b0(1,Dr[1]);break;case 7:var Qr=D0(Dr[1]);break;default:var Qr=V0(Dr[1])}var R1=Qr}else var R1=O2;var $e=[0,[0,O60,Mx(B0,l2)],0],Qe=[0,[0,L60,R1],[0,[0,I60,x0(qr)],$e]],Kr=Xr?1:0;return D(D60,j,$1,[0,[0,M60,!!Kr],Qe]);case 10:return W0([0,j,C[1]]);case 11:var u2=C[1],qt=u2[5],Fe=u2[4],j1=u2[2],Q1=u2[1],Z2=[0,[0,G50,Rr(I0,u2[3])],0],he=[0,[0,b50,We(0,Fe)],Z2],Gt=[0,[0,xd0,Mx(a2,j1)],he];return D(ed0,j,qt,[0,[0,rd0,K0(Q1)],Gt]);case 12:var _e=C[1],we=_e[1],kt=_e[4],Te=_e[3],W2=_e[2],Se=we[0]===0?K0(we[1]):B0(we[1]),$2=0,Ee=Te?"ES":"CommonJS";return D(Y60,j,kt,[0,[0,B60,Se],[0,[0,U60,tx(W2)],[0,[0,j60,Ee],$2]]]);case 13:var ht=C[1],_t=ht[2];return D(J60,j,_t,[0,[0,X60,Zx(ht[1])],0]);case 14:var E2=C[1],I2=E2[4],Q2=E2[2],Rn=E2[1],On=[0,[0,fd0,dr(E2[3])],0],bt=[0,[0,cd0,Mx(a2,Q2)],On];return D(od0,j,I2,[0,[0,sd0,K0(Rn)],bt]);case 15:return b0(1,[0,j,C[1]]);case 16:return sx([0,j,C[1]]);case 17:var wt=C[1],xn=wt[3],In=wt[1],ge=[0,[0,V60,z0(wt[2])],0];return D(K60,j,xn,[0,[0,z60,j0(In)],ge]);case 18:return D(Z60,j,C[1][1],0);case 19:var He=C[1],L2=He[3],Ln=He[1],Tt=[0,[0,s90,J0(He[2])],0];return D(v90,j,L2,[0,[0,o90,K0(Ln)],Tt]);case 20:var St=C[1],Et=St[2],hs=St[3],Mn=Et[0]===0?j0(Et[1]):z0(Et[1]);return D(Q60,j,hs,[0,[0,$60,Mn],[0,[0,W60,er(w(1))],0]]);case 21:var F2=C[1],qe=F2[5],Dn=F2[4],jn=F2[3],_s=F2[2],tv=F2[1];if(_s){var ia=_s[1];if(ia[0]!==0){var _3=ia[1][2],yo=[0,[0,F60,er(w(Dn))],0],mo=[0,[0,H60,Mx(K0,_3)],yo];return D(G60,j,qe,[0,[0,q60,Mx(B0,jn)],mo])}}var w3=[0,[0,b60,er(w(Dn))],0],T3=[0,[0,x40,Mx(B0,jn)],w3],S3=[0,[0,r40,x0(_s)],T3];return D(t40,j,qe,[0,[0,e40,Mx(j0,tv)],S3]);case 22:var ko=C[1],nv=ko[3],fa=ko[1],E3=[0,[0,n40,Mx(xg0,ko[2])],0];return D(i40,j,nv,[0,[0,u40,z0(fa)],E3]);case 23:var Un=C[1],g3=Un[5],Bn=Un[4],A3=Un[3],P3=Un[2],ca=Un[1],uv=function($6){return $6[0]===0?X0($6[1]):z0($6[1])},C3=[0,[0,f40,j0(Bn)],0],N3=[0,[0,c40,Mx(z0,A3)],C3],iv=[0,[0,s40,Mx(z0,P3)],N3];return D(v40,j,g3,[0,[0,o40,Mx(uv,ca)],iv]);case 24:var gt=C[1],ws=gt[1],sa=gt[5],oa=gt[4],R3=gt[3],rn=gt[2],Ae=ws[0]===0?X0(ws[1]):ix(ws[1]),Ts=[0,[0,l40,j0(R3)],[0,[0,a40,!!oa],0]];return D(y40,j,sa,[0,[0,d40,Ae],[0,[0,p40,z0(rn)],Ts]]);case 25:var Yn=C[1],en=Yn[1],Pe=Yn[5],ho=Yn[4],O3=Yn[3],I3=Yn[2],L3=en[0]===0?X0(en[1]):ix(en[1]),M3=[0,[0,k40,j0(O3)],[0,[0,m40,!!ho],0]];return D(w40,j,Pe,[0,[0,_40,L3],[0,[0,h40,z0(I3)],M3]]);case 26:var ie=C[1],fv=ie[3],D3=ie[2],b9=ie[9],XL=ie[8],JL=ie[7],VL=ie[6],zL=ie[5],KL=ie[4],ZL=D3[2][4],WL=ie[1],$L=fv[0]===0?fv[1]:Nx(I80),QL=R2(A1(ZL),b9),FL=[0,[0,L80,Mx(a2,XL)],0],HL=[0,[0,D80,!1],[0,[0,M80,Lr(JL)],FL]],qL=[0,[0,B80,!!KL],[0,[0,U80,!!zL],[0,[0,j80,Mx(lo,VL)],HL]]],GL=[0,[0,Y80,tx($L)],qL],bL=[0,[0,X80,Hx(D3)],GL];return D(V80,j,QL,[0,[0,J80,Mx(K0,WL)],bL]);case 27:var j3=C[1],xm=j3[3],xM=j3[4],rM=j3[2],eM=j3[1];if(xm)var rm=xm[1][2],em=j0(DS0(rm[1],rm[2]));else var em=O2;var tM=[0,[0,S40,j0(rM)],[0,[0,T40,em],0]];return D(g40,j,xM,[0,[0,E40,z0(eM)],tM]);case 28:var va=C[1],tm=va[4],nm=va[3],nM=va[5],uM=va[2],iM=va[1];if(tm){var X6=tm[1];if(X6[0]===0)var fM=X6[1],im=_n(function(Q6){var B3=Q6[3],Y3=Q6[2],vm=Q6[1],RM=Y3?Hr(B3[1],Y3[1][1]):B3[1],OM=Y3?Y3[1]:B3,am=0,IM=0;if(vm){var F6=0;switch(vm[1]){case 0:var lm=fi;F6=1;break;case 1:var lm=Ps;F6=1;break}if(F6){var pm=lm;am=1}}if(!am)var pm=O2;var LM=[0,[0,eT0,K0(OM)],[0,[0,rT0,pm],IM]];return D(nT0,RM,0,[0,[0,tT0,K0(B3)],LM])},fM);else var um=X6[1],cM=um[1],im=[0,D(xT0,cM,0,[0,[0,bw0,K0(um[2])],0]),0];var J6=im}else var J6=0;if(nm)var fm=nm[1][1],sM=[0,[0,qw0,K0(fm)],0],cm=[0,D(Gw0,fm[1],0,sM),J6];else var cm=J6;switch(iM){case 0:var V6=A40;break;case 1:var V6=P40;break;default:var V6=C40}var oM=[0,[0,R40,B0(uM)],[0,[0,N40,er(V6)],0]];return D(I40,j,nM,[0,[0,O40,V1(cm)],oM]);case 29:return D0([0,j,C[1]]);case 30:var z6=C[1],vM=z6[3],aM=z6[1],lM=[0,[0,L40,j0(z6[2])],0];return D(D40,j,vM,[0,[0,M40,K0(aM)],lM]);case 31:var sm=C[1],pM=sm[2];return D(U40,j,pM,[0,[0,j40,Mx(z0,sm[1])],0]);case 32:var K6=C[1],dM=K6[3],yM=K6[1],mM=[0,[0,B40,Rr(a1,K6[2])],0];return D(X40,j,dM,[0,[0,Y40,z0(yM)],mM]);case 33:var om=C[1],kM=om[2];return D(V40,j,kM,[0,[0,J40,z0(om[1])],0]);case 34:var U3=C[1],hM=U3[4],_M=U3[2],wM=U3[1],TM=[0,[0,z40,Mx(tx,U3[3])],0],SM=[0,[0,K40,Mx(z1,_M)],TM];return D(W40,j,hM,[0,[0,Z40,tx(wM)],SM]);case 35:return kx([0,j,C[1]]);case 36:return b0(0,[0,j,C[1]]);case 37:return X0([0,j,C[1]]);case 38:var Z6=C[1],EM=Z6[3],gM=Z6[1],AM=[0,[0,$40,j0(Z6[2])],0];return D(F40,j,EM,[0,[0,Q40,z0(gM)],AM]);default:var W6=C[1],PM=W6[3],CM=W6[1],NM=[0,[0,H40,j0(W6[2])],0];return D(G40,j,PM,[0,[0,q40,z0(CM)],NM])}},Px=function(q){var C=q[2],j=C[4],h0=C[3][2],R0=C[1],nx=q[1],Sx=[0,[0,pw0,D(Aw0,C[2],0,0)],0],Dx=[0,[0,dw0,Rr(ms,h0)],Sx];return D(mw0,nx,j,[0,[0,yw0,D(Sw0,R0,0,0)],Dx])},Ex=function(q){var C=q[2],j=C[1],h0=C[4],R0=C[2],nx=q[1],Sx=[0,[0,ow0,Rr(ms,C[3][2])],0],Dx=[0,[0,vw0,Mx(xa,R0)],Sx],jx=j[2],xr=jx[2],hr=jx[4],cr=jx[3],lr=jx[1],kr=j[1],sr=xr?[0,[0,kw0,Cn(xr[1])],0]:0,Er=[0,[0,_w0,Rr(bv,hr)],[0,[0,hw0,!!cr],0]];return D(lw0,nx,h0,[0,[0,aw0,D(Tw0,kr,0,Fx([0,[0,ww0,ao(lr)],Er],sr))],Dx])},Ix=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,Dm0,Rr(z0,C[2])],0];return D(Um0,R0,j,[0,[0,jm0,Rr(fo,h0)],nx])},qx=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j?wm0:Tm0;return D(gm0,R0,h0,[0,[0,Em0,!!j],[0,[0,Sm0,er(nx)],0]])},B0=function(q){var C=q[2];return D(_m0,q[1],C[3],[0,[0,hm0,er(C[1])],[0,[0,km0,er(C[2])],0]])},tr=function(q){var C=q[2],j=C[2],h0=C[3],R0=q[1];return D(mm0,R0,h0,[0,[0,ym0,O2],[0,[0,dm0,er(m2(j,0,Xx(j)-1|0))],[0,[0,pm0,er(j)],0]]])},Ux=function(q){var C=q[2];return D(lm0,q[1],C[3],[0,[0,am0,C[1]],[0,[0,vm0,er(C[2])],0]])},K0=function(q){var C=q[2];return D(t50,q[1],C[2],[0,[0,e50,er(C[1])],[0,[0,r50,O2],[0,[0,x50,!1],0]]])},ur=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[9],nx=C[8],Sx=C[7],Dx=C[6],jx=C[5],xr=C[4],hr=h0[2][4],cr=C[1],lr=q[1],kr=j[0]===0?j[1]:Nx(z80),sr=R2(A1(hr),R0),Er=[0,[0,K80,Mx(a2,nx)],0],$r=[0,[0,W80,!1],[0,[0,Z80,Lr(Sx)],Er]],zr=[0,[0,F80,!!xr],[0,[0,Q80,!!jx],[0,[0,$80,Mx(lo,Dx)],$r]]],r1=[0,[0,H80,tx(kr)],zr],Or=[0,[0,q80,Hx(h0)],r1];return D(b80,lr,sr,[0,[0,G80,Mx(K0,cr)],Or])},z0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[2],nx=[0,[0,b40,Rr(Ze,h0[1])],0];return D(xp0,j,A1(R0),nx);case 1:var Sx=C[1],Dx=Sx[3],jx=Sx[2],xr=Sx[9],hr=Sx[8],cr=Sx[7],lr=Sx[6],kr=Sx[4],sr=jx[2][4];if(Dx[0]===0)var Er=0,$r=tx(Dx[1]);else var Er=1,$r=z0(Dx[1]);var zr=R2(A1(sr),xr),r1=[0,[0,rp0,Mx(a2,hr)],0],Or=[0,[0,tp0,!!Er],[0,[0,ep0,Lr(cr)],r1]],e1=[0,[0,fp0,$r],[0,[0,ip0,!!kr],[0,[0,up0,!1],[0,[0,np0,Mx(lo,lr)],Or]]]];return D(op0,j,zr,[0,[0,sp0,O2],[0,[0,cp0,Hx(jx)],e1]]);case 2:var l1=C[1],T1=l1[3],p1=l1[1],i1=[0,[0,vp0,dr(l1[2][2])],0];return D(lp0,j,T1,[0,[0,ap0,z0(p1)],i1]);case 3:var f1=C[1],d1=f1[1],P1=f1[4],$1=f1[3],l2=f1[2];if(d1){switch(d1[1]){case 0:var qr=lq;break;case 1:var qr=pq;break;case 2:var qr=dq;break;case 3:var qr=yq;break;case 4:var qr=mq;break;case 5:var qr=kq;break;case 6:var qr=hq;break;case 7:var qr=_q;break;case 8:var qr=wq;break;case 9:var qr=Tq;break;case 10:var qr=Sq;break;case 11:var qr=Eq;break;case 12:var qr=gq;break;case 13:var qr=Aq;break;default:var qr=Pq}var Kx=qr}else var Kx=pp0;var Xr=[0,[0,dp0,z0($1)],0];return D(kp0,j,P1,[0,[0,mp0,er(Kx)],[0,[0,yp0,ix(l2)],Xr]]);case 4:var Mr=C[1],Dr=Mr[4],Qr=Mr[2],R1=Mr[1],$e=[0,[0,hp0,z0(Mr[3])],0],Qe=[0,[0,_p0,z0(Qr)],$e];switch(R1){case 0:var Kr=ZH;break;case 1:var Kr=WH;break;case 2:var Kr=$H;break;case 3:var Kr=QH;break;case 4:var Kr=FH;break;case 5:var Kr=HH;break;case 6:var Kr=qH;break;case 7:var Kr=GH;break;case 8:var Kr=bH;break;case 9:var Kr=xq;break;case 10:var Kr=rq;break;case 11:var Kr=eq;break;case 12:var Kr=tq;break;case 13:var Kr=nq;break;case 14:var Kr=uq;break;case 15:var Kr=iq;break;case 16:var Kr=fq;break;case 17:var Kr=cq;break;case 18:var Kr=sq;break;case 19:var Kr=oq;break;case 20:var Kr=vq;break;default:var Kr=aq}return D(Tp0,j,Dr,[0,[0,wp0,er(Kr)],Qe]);case 5:var u2=C[1],qt=u2[4],Fe=R2(A1(u2[3][2][2]),qt);return D(Sp0,j,Fe,bo(u2));case 6:return ox(Td0,[0,j,C[1]]);case 7:var j1=C[1],Q1=j1[4],Z2=j1[2],he=j1[1],Gt=[0,[0,Ep0,z0(j1[3])],0],_e=[0,[0,gp0,z0(Z2)],Gt];return D(Pp0,j,Q1,[0,[0,Ap0,z0(he)],_e]);case 8:return ur([0,j,C[1]]);case 9:return K0(C[1]);case 10:var we=C[1],kt=we[2];return D(Np0,j,kt,[0,[0,Cp0,z0(we[1])],0]);case 11:return Ex([0,j,C[1]]);case 12:return Px([0,j,C[1]]);case 13:return B0([0,j,C[1]]);case 14:return qx([0,j,C[1]]);case 15:return D(Mm0,j,C[1],[0,[0,Lm0,O2],[0,[0,Im0,_v],0]]);case 16:return Ux([0,j,C[1]]);case 17:return tr([0,j,C[1]]);case 18:var Te=C[1],W2=Te[2],Se=Te[1],$2=Te[4],Ee=Te[3];try{var ht=new RegExp(er(Se),er(W2)),_t=ht}catch{var _t=O2}return D(Om0,j,$2,[0,[0,Rm0,_t],[0,[0,Nm0,er(Ee)],[0,[0,Cm0,ps([0,[0,Pm0,er(Se)],[0,[0,Am0,er(W2)],0]])],0]]]);case 19:var E2=C[1];return B0([0,j,[0,E2[1],E2[5],E2[6]]]);case 20:var I2=C[1],Q2=I2[4],Rn=I2[3],On=I2[2];switch(I2[1]){case 0:var bt=Rp0;break;case 1:var bt=Op0;break;default:var bt=Ip0}var wt=[0,[0,Lp0,z0(Rn)],0];return D(jp0,j,Q2,[0,[0,Dp0,er(bt)],[0,[0,Mp0,z0(On)],wt]]);case 21:var xn=C[1],In=xn[3];return D(Up0,j,In,xv(xn));case 22:var ge=C[1],He=ge[3],L2=ge[1],Ln=[0,[0,Bp0,K0(ge[2])],0];return D(Xp0,j,He,[0,[0,Yp0,K0(L2)],Ln]);case 23:var Tt=C[1],St=Tt[4],Et=Tt[3],hs=Tt[2],Mn=Tt[1];if(Et)var F2=Et[1],qe=R2(A1(F2[2][2]),St),Dn=qe,jn=lx(F2);else var Dn=St,jn=V1(0);var _s=[0,[0,Vp0,Mx(Cn,hs)],[0,[0,Jp0,jn],0]];return D(Kp0,j,Dn,[0,[0,zp0,z0(Mn)],_s]);case 24:var tv=C[1],ia=tv[2],_3=[0,[0,Zp0,Rr(Yx,tv[1])],0];return D(Wp0,j,A1(ia),_3);case 25:var yo=C[1],mo=yo[1],w3=yo[3],T3=mo[4],S3=R2(A1(mo[3][2][2]),T3);return D(Qp0,j,S3,Fx(bo(mo),[0,[0,$p0,!!w3],0]));case 26:var ko=C[1],nv=ko[1],fa=nv[3],E3=[0,[0,Fp0,!!ko[3]],0];return D(Hp0,j,fa,Fx(xv(nv),E3));case 27:var Un=C[1],g3=Un[2];return D(Gp0,j,g3,[0,[0,qp0,Rr(z0,Un[1])],0]);case 28:return D(bp0,j,C[1][1],0);case 29:var Bn=C[1],A3=Bn[3],P3=Bn[1],ca=[0,[0,zm0,Ix(Bn[2])],0];return D(Zm0,j,A3,[0,[0,Km0,z0(P3)],ca]);case 30:return Ix([0,j,C[1]]);case 31:return D(x80,j,C[1][1],0);case 32:var uv=C[1],C3=uv[3],N3=uv[1],iv=[0,[0,r80,Zx(uv[2])],0];return D(t80,j,C3,[0,[0,e80,z0(N3)],iv]);case 33:var gt=C[1],ws=gt[2],sa=gt[1];if(ws){var oa=gt[3],R3=[0,[0,n80,dr(ws[1])],0];return D(i80,j,oa,[0,[0,u80,z0(sa)],R3])}var rn=gt[3];return D(c80,j,rn,[0,[0,f80,z0(sa)],0]);case 34:var Ae=C[1],Ts=Ae[3],Yn=Ae[2],en=Ae[1];if(7<=en)return D(o80,j,Ts,[0,[0,s80,z0(Yn)],0]);switch(en){case 0:var Pe=v80;break;case 1:var Pe=a80;break;case 2:var Pe=l80;break;case 3:var Pe=p80;break;case 4:var Pe=d80;break;case 5:var Pe=y80;break;case 6:var Pe=m80;break;default:var Pe=Nx(k80)}return D(T80,j,Ts,[0,[0,w80,er(Pe)],[0,[0,_80,!0],[0,[0,h80,z0(Yn)],0]]]);case 35:var ho=C[1],O3=ho[4],I3=ho[3],L3=ho[2],M3=ho[1]?S80:E80;return D(C80,j,O3,[0,[0,P80,er(M3)],[0,[0,A80,z0(L3)],[0,[0,g80,!!I3],0]]]);default:var ie=C[1],fv=ie[2],D3=[0,[0,N80,!!ie[3]],0];return D(O80,j,fv,[0,[0,R80,Mx(z0,ie[1])],D3])}},or=function(q){var C=q[2];return D(f50,q[1],C[2],[0,[0,i50,er(C[1])],[0,[0,u50,O2],[0,[0,n50,!1],0]]])},Ur=function(q,C){var j=C[1][2],h0=j[2],R0=j[1],nx=[0,[0,c50,!!C[3]],0];return D(v50,q,h0,[0,[0,o50,er(R0)],[0,[0,s50,y3(Zx,C[2])],nx]])},lx=function(q){return Rr(S2,q[2][1])},a1=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,a50,Rr(j0,C[2])],0];return D(p50,R0,j,[0,[0,l50,Mx(z0,h0)],nx])},z1=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,d50,tx(C[2])],0];return D(m50,R0,j,[0,[0,y50,Mx(ix,h0)],nx])},w1=function(q){return V1(_n(function(C){var j=C[2];return Cr(0,j[3],C[1],[0,j[1]],j[2][2])},q))},Cr=function(q,C,j,h0,R0){if(h0)var nx=h0[1],Sx=nx[0]===0?Mx(K0,[0,nx[1]]):Mx(B0,[0,nx[1]]),Dx=Sx;else var Dx=Mx(K0,0);return D(Q50,j,q,[0,[0,$50,Dx],[0,[0,W50,dr(R0)],[0,[0,Z50,!!C],0]]])},n2=function(q){var C=q[2],j=C[4],h0=C[3],R0=C[2],nx=C[1],Sx=q[1];return Cr(j,h0,Sx,uy(function(Dx){return[0,Dx]},nx),R0)},w=function(q){return q?td0:nd0},x0=function(q){if(!q)return V1(0);var C=q[1];if(C[0]===0)return Rr(ea,C[1]);var j=C[1],h0=j[2],R0=j[1];return V1(h0?[0,D(id0,R0,0,[0,[0,ud0,K0(h0[1])],0]),0]:0)},e0=function(q){var C=q[2],j=C[2],h0=q[1];return D(Od0,h0,j,[0,[0,Rd0,z0(C[1])],0])},S0=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,Id0,Mx(ke,C[2])],0];return D(Md0,h0,0,[0,[0,Ld0,K0(j)],R0])},G=function(q){switch(q[0]){case 0:var C=q[1],j=C[2],h0=j[6],R0=j[2],nx=j[5],Sx=j[4],Dx=j[3],jx=j[1],xr=C[1];switch(R0[0]){case 0:var kr=h0,sr=0,Er=B0(R0[1]);break;case 1:var kr=h0,sr=0,Er=Ux(R0[1]);break;case 2:var kr=h0,sr=0,Er=tr(R0[1]);break;case 3:var kr=h0,sr=0,Er=K0(R0[1]);break;case 4:var kr=h0,sr=0,Er=or(R0[1]);break;default:var hr=R0[1][2],cr=hr[1],lr=R2(hr[2],h0),kr=lr,sr=1,Er=z0(cr)}switch(jx){case 0:var $r=Ud0;break;case 1:var $r=Bd0;break;case 2:var $r=Yd0;break;default:var $r=Xd0}var zr=[0,[0,Kd0,er($r)],[0,[0,zd0,!!Sx],[0,[0,Vd0,!!sr],[0,[0,Jd0,Rr(e0,nx)],0]]]];return D($d0,xr,kr,[0,[0,Wd0,Er],[0,[0,Zd0,ur(Dx)],zr]]);case 1:var r1=q[1],Or=r1[2],e1=Or[7],l1=Or[6],T1=Or[2],p1=Or[1],i1=Or[5],f1=Or[4],d1=Or[3],P1=r1[1];switch(p1[0]){case 0:var Xr=e1,Mr=0,Dr=B0(p1[1]);break;case 1:var Xr=e1,Mr=0,Dr=Ux(p1[1]);break;case 2:var Xr=e1,Mr=0,Dr=tr(p1[1]);break;case 3:var Xr=e1,Mr=0,Dr=K0(p1[1]);break;case 4:var $1=Nx(ty0),Xr=$1[3],Mr=$1[2],Dr=$1[1];break;default:var l2=p1[1][2],qr=l2[1],Kx=R2(l2[2],e1),Xr=Kx,Mr=1,Dr=z0(qr)}if(typeof T1=="number")if(T1)var Qr=0,R1=0;else var Qr=1,R1=0;else var Qr=0,R1=[0,T1[1]];var $e=Qr?[0,[0,ny0,!!Qr],0]:0,Qe=l1===0?0:[0,[0,uy0,Rr(e0,l1)],0],Kr=Fx(Qe,$e),u2=[0,[0,cy0,!!Mr],[0,[0,fy0,!!f1],[0,[0,iy0,Mx(ye,i1)],0]]],qt=[0,[0,sy0,y3(Zx,d1)],u2];return D(ay0,P1,Xr,Fx([0,[0,vy0,Dr],[0,[0,oy0,Mx(z0,R1)],qt]],Kr));default:var Fe=q[1],j1=Fe[2],Q1=j1[6],Z2=j1[2],he=j1[7],Gt=j1[5],_e=j1[4],we=j1[3],kt=j1[1],Te=Fe[1];if(typeof Z2=="number")if(Z2)var W2=0,Se=0;else var W2=1,Se=0;else var W2=0,Se=[0,Z2[1]];var $2=W2?[0,[0,Qd0,!!W2],0]:0,Ee=Q1===0?0:[0,[0,Fd0,Rr(e0,Q1)],0],ht=Fx(Ee,$2),_t=[0,[0,Gd0,!1],[0,[0,qd0,!!_e],[0,[0,Hd0,Mx(ye,Gt)],0]]],E2=[0,[0,bd0,y3(Zx,we)],_t],I2=[0,[0,xy0,Mx(z0,Se)],E2];return D(ey0,Te,he,Fx([0,[0,ry0,or(kt)],I2],ht))}},k0=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[1],nx=q[1],Sx=C[4],Dx=R0[0]===0?K0(R0[1]):B0(R0[1]);if(j)var jx=[0,[0,wy0,z0(j[1])],0],xr=D(Sy0,nx,0,[0,[0,Ty0,ix(h0)],jx]);else var xr=ix(h0);return D(Py0,nx,0,[0,[0,Ay0,Dx],[0,[0,gy0,xr],[0,[0,Ey0,!!Sx],0]]])},J0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[4],nx=h0[1],Sx=[0,[0,Zy0,!!h0[2]],[0,[0,Ky0,!!h0[3]],0]],Dx=[0,[0,Wy0,Rr(function(Xr){var Mr=Xr[2],Dr=Mr[1],Qr=Xr[1],R1=[0,[0,Jy0,qx(Mr[2])],0];return D(zy0,Qr,0,[0,[0,Vy0,K0(Dr)],R1])},nx)],Sx];return D($y0,j,A1(R0),Dx);case 1:var jx=C[1],xr=jx[4],hr=jx[1],cr=[0,[0,Fy0,!!jx[2]],[0,[0,Qy0,!!jx[3]],0]],lr=[0,[0,Hy0,Rr(function(Xr){var Mr=Xr[2],Dr=Mr[1],Qr=Xr[1],R1=[0,[0,By0,Ux(Mr[2])],0];return D(Xy0,Qr,0,[0,[0,Yy0,K0(Dr)],R1])},hr)],cr];return D(qy0,j,A1(xr),lr);case 2:var kr=C[1],sr=kr[1],Er=kr[4],$r=kr[3],zr=kr[2];if(sr[0]===0)var r1=sr[1],e1=_n(function(Xr){var Mr=Xr[1];return D(Uy0,Mr,0,[0,[0,jy0,K0(Xr[2][1])],0])},r1);else var Or=sr[1],e1=_n(function(Xr){var Mr=Xr[2],Dr=Mr[1],Qr=Xr[1],R1=[0,[0,Ly0,B0(Mr[2])],0];return D(Dy0,Qr,0,[0,[0,My0,K0(Dr)],R1])},Or);var l1=[0,[0,x90,V1(e1)],[0,[0,by0,!!zr],[0,[0,Gy0,!!$r],0]]];return D(r90,j,A1(Er),l1);case 3:var T1=C[1],p1=T1[3],i1=T1[1],f1=[0,[0,e90,!!T1[2]],0],d1=[0,[0,t90,Rr(function(Xr){var Mr=Xr[1];return D(Iy0,Mr,0,[0,[0,Oy0,K0(Xr[2][1])],0])},i1)],f1];return D(n90,j,A1(p1),d1);default:var P1=C[1],$1=P1[4],l2=P1[1],qr=[0,[0,i90,!!P1[2]],[0,[0,u90,!!P1[3]],0]],Kx=[0,[0,f90,Rr(function(Xr){var Mr=Xr[2],Dr=Mr[1],Qr=Xr[1],R1=[0,[0,Cy0,tr(Mr[2])],0];return D(Ry0,Qr,0,[0,[0,Ny0,K0(Dr)],R1])},l2)],qr];return D(c90,j,A1($1),Kx)}},I0=function(q){var C=q[2],j=C[1],h0=C[3],R0=C[2],nx=q[1],Sx=j[0]===0?K0(j[1]):co(j[1]);return D(h90,nx,h0,[0,[0,k90,Sx],[0,[0,m90,Mx(ke,R0)],0]])},ix=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[3],nx=h0[1],Sx=[0,[0,_90,y3(Zx,h0[2])],0],Dx=[0,[0,w90,Rr(ue,nx)],Sx];return D(T90,j,A1(R0),Dx);case 1:var jx=C[1],xr=jx[3],hr=jx[1],cr=[0,[0,S90,y3(Zx,jx[2])],0],lr=[0,[0,E90,Rr(nr,hr)],cr];return D(g90,j,A1(xr),lr);case 2:return Ur(j,C[1]);default:return z0(C[1])}},Wx=function(q){var C=q[2],j=C[2],h0=C[1],R0=q[1];if(!j)return ix(h0);var nx=[0,[0,A90,z0(j[1])],0];return D(C90,R0,0,[0,[0,P90,ix(h0)],nx])},Bx=function(q){var C=q[2],j=C[2],h0=q[1];return D(O90,h0,j,[0,[0,R90,lv],[0,[0,N90,Zx(C[1])],0]])},Hx=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[1];if(j){var nx=j[1],Sx=nx[2],Dx=Sx[2],jx=nx[1],xr=D(L90,jx,Dx,[0,[0,I90,ix(Sx[1])],0]),hr=Ax([0,xr,iy(Wx,h0)]),cr=R0?[0,Bx(R0[1]),hr]:hr;return V1(cr)}var lr=_n(Wx,h0),kr=R0?[0,Bx(R0[1]),lr]:lr;return V1(kr)},$x=function(q,C){var j=C[2];return D(D90,q,j,[0,[0,M90,ix(C[1])],0])},nr=function(q){switch(q[0]){case 0:var C=q[1],j=C[2],h0=j[2],R0=j[1],nx=C[1];if(!h0)return ix(R0);var Sx=[0,[0,j90,z0(h0[1])],0];return D(B90,nx,0,[0,[0,U90,ix(R0)],Sx]);case 1:var Dx=q[1];return $x(Dx[1],Dx[2]);default:return O2}},Zx=function(q){var C=q[1];return D(Q_0,C,0,[0,[0,$_0,dr(q[2])],0])},Lr=function(q){switch(q[0]){case 0:return O2;case 1:return Zx(q[1]);default:var C=q[1],j=C[2],h0=C[1];return D(H_0,h0,0,[0,[0,F_0,yt([0,j[1],j[2]])],0])}},Yx=function(q){if(q[0]===0){var C=q[1],j=C[2],h0=C[1];switch(j[0]){case 0:var R0=j[3],nx=j[1],sr=0,Er=R0,$r=0,zr=Y90,r1=z0(j[2]),Or=nx;break;case 1:var Sx=j[2],Dx=j[1],sr=0,Er=0,$r=1,zr=X90,r1=ur([0,Sx[1],Sx[2]]),Or=Dx;break;case 2:var jx=j[2],xr=j[3],hr=j[1],sr=xr,Er=0,$r=0,zr=J90,r1=ur([0,jx[1],jx[2]]),Or=hr;break;default:var cr=j[2],lr=j[3],kr=j[1],sr=lr,Er=0,$r=0,zr=V90,r1=ur([0,cr[1],cr[2]]),Or=kr}switch(Or[0]){case 0:var i1=sr,f1=0,d1=B0(Or[1]);break;case 1:var i1=sr,f1=0,d1=Ux(Or[1]);break;case 2:var i1=sr,f1=0,d1=tr(Or[1]);break;case 3:var i1=sr,f1=0,d1=K0(Or[1]);break;case 4:var e1=Nx(z90),i1=e1[3],f1=e1[2],d1=e1[1];break;default:var l1=Or[1][2],T1=l1[1],p1=R2(l1[2],sr),i1=p1,f1=1,d1=z0(T1)}return D(H90,h0,i1,[0,[0,F90,d1],[0,[0,Q90,r1],[0,[0,$90,er(zr)],[0,[0,W90,!!$r],[0,[0,Z90,!!Er],[0,[0,K90,!!f1],0]]]]]])}var P1=q[1],$1=P1[2],l2=$1[2],qr=P1[1];return D(G90,qr,l2,[0,[0,q90,z0($1[1])],0])},ue=function(q){if(q[0]!==0){var C=q[1];return $x(C[1],C[2])}var j=q[1],h0=j[2],R0=h0[3],nx=h0[2],Sx=h0[1],Dx=h0[4],jx=j[1];switch(Sx[0]){case 0:var cr=0,lr=0,kr=B0(Sx[1]);break;case 1:var cr=0,lr=0,kr=Ux(Sx[1]);break;case 2:var cr=0,lr=0,kr=tr(Sx[1]);break;case 3:var cr=0,lr=0,kr=K0(Sx[1]);break;default:var xr=Sx[1][2],hr=xr[2],cr=hr,lr=1,kr=z0(xr[1])}if(R0)var sr=R0[1],Er=Hr(nx[1],sr[1]),$r=[0,[0,b90,z0(sr)],0],zr=D(rm0,Er,0,[0,[0,xm0,ix(nx)],$r]);else var zr=ix(nx);return D(cm0,jx,cr,[0,[0,fm0,kr],[0,[0,im0,zr],[0,[0,um0,hu],[0,[0,nm0,!1],[0,[0,tm0,!!Dx],[0,[0,em0,!!lr],0]]]]]])},Qt=function(q){var C=q[2],j=C[2],h0=q[1];return D(om0,h0,j,[0,[0,sm0,z0(C[1])],0])},S2=function(q){return q[0]===0?z0(q[1]):Qt(q[1])},Ze=function(q){switch(q[0]){case 0:return z0(q[1]);case 1:return Qt(q[1]);default:return O2}},fo=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1];return D(Vm0,R0,0,[0,[0,Jm0,ps([0,[0,Ym0,er(j[1])],[0,[0,Bm0,er(j[2])],0]])],[0,[0,Xm0,!!h0],0]])},gn=function(q){switch(q){case 0:return Wm0;case 1:return $m0;default:return Qm0}},ds=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,Gm0,Mx(z0,C[2])],0];return D(xk0,h0,0,[0,[0,bm0,ix(j)],R0])},ye=function(q){var C=q[2],j=C[2],h0=q[1];switch(C[1]){case 0:var R0=rk0;break;case 1:var R0=ek0;break;case 2:var R0=tk0;break;case 3:var R0=nk0;break;case 4:var R0=uk0;break;default:var R0=ik0}return D(ck0,h0,j,[0,[0,fk0,er(R0)],0])},An=function(q,C){var j=C[3],h0=C[2];switch(C[4]){case 0:var R0=p_0;break;case 1:var R0=d_0;break;default:var R0=y_0}return D(h_0,q,j,[0,[0,k_0,er(R0)],[0,[0,m_0,dr(h0)],0]])},Ft=function(q){var C=q[2],j=C[1],h0=C[3],R0=C[2],nx=q[1],Sx=j[0]===0?K0(j[1]):co(j[1]);return D(Hh0,nx,h0,[0,[0,Fh0,Sx],[0,[0,Qh0,Mx(ke,R0)],0]])},We=function(q,C){var j=C[2],h0=j[4],R0=j[3],nx=j[2],Sx=j[1],Dx=C[1],jx=x2(function(zr,r1){var Or=zr[4],e1=zr[3],l1=zr[2],T1=zr[1];switch(r1[0]){case 0:var p1=r1[1],i1=p1[2],f1=i1[2],d1=i1[1],P1=i1[8],$1=i1[7],l2=i1[6],qr=i1[5],Kx=i1[4],Xr=i1[3],Mr=p1[1];switch(d1[0]){case 0:var Dr=B0(d1[1]);break;case 1:var Dr=Ux(d1[1]);break;case 2:var Dr=tr(d1[1]);break;case 3:var Dr=K0(d1[1]);break;case 4:var Dr=Nx(Hk0);break;default:var Dr=Nx(qk0)}switch(f1[0]){case 0:var $e=Gk0,Qe=dr(f1[1]);break;case 1:var Qr=f1[1],$e=bk0,Qe=Ht([0,Qr[1],Qr[2]]);break;default:var R1=f1[1],$e=xh0,Qe=Ht([0,R1[1],R1[2]])}return[0,[0,D(sh0,Mr,P1,[0,[0,ch0,Dr],[0,[0,fh0,Qe],[0,[0,ih0,!!l2],[0,[0,uh0,!!Xr],[0,[0,nh0,!!Kx],[0,[0,th0,!!qr],[0,[0,eh0,Mx(ye,$1)],[0,[0,rh0,er($e)],0]]]]]]]]),T1],l1,e1,Or];case 1:var Kr=r1[1],u2=Kr[2],qt=u2[2],Fe=Kr[1];return[0,[0,D(vh0,Fe,qt,[0,[0,oh0,dr(u2[1])],0]),T1],l1,e1,Or];case 2:var j1=r1[1],Q1=j1[2],Z2=Q1[6],he=Q1[4],Gt=Q1[3],_e=Q1[2],we=Q1[1],kt=j1[1],Te=[0,[0,lh0,!!he],[0,[0,ah0,Mx(ye,Q1[5])],0]],W2=[0,[0,ph0,dr(Gt)],Te],Se=[0,[0,dh0,dr(_e)],W2];return[0,T1,[0,D(mh0,kt,Z2,[0,[0,yh0,Mx(K0,we)],Se]),l1],e1,Or];case 3:var $2=r1[1],Ee=$2[2],ht=Ee[3],_t=$2[1],E2=[0,[0,kh0,!!Ee[2]],0];return[0,T1,l1,[0,D(_h0,_t,ht,[0,[0,hh0,Ht(Ee[1])],E2]),e1],Or];case 4:var I2=r1[1],Q2=I2[2],Rn=Q2[6],On=Q2[5],bt=Q2[4],wt=Q2[3],xn=Q2[1],In=I2[1],ge=[0,[0,Rh0,!!wt],[0,[0,Nh0,!!bt],[0,[0,Ch0,!!On],[0,[0,Ph0,dr(Q2[2])],0]]]];return[0,T1,l1,e1,[0,D(Ih0,In,Rn,[0,[0,Oh0,K0(xn)],ge]),Or]];default:var He=r1[1],L2=He[2],Ln=L2[6],Tt=L2[4],St=L2[3],Et=L2[2],hs=L2[1],Mn=He[1],F2=0;switch(L2[5]){case 0:var qe="PlusOptional";break;case 1:var qe="MinusOptional";break;case 2:var qe="Optional";break;default:var qe=O2}var Dn=[0,[0,Th0,Mx(ye,Tt)],[0,[0,wh0,qe],F2]],jn=[0,[0,Sh0,dr(St)],Dn],_s=[0,[0,Eh0,dr(Et)],jn];return[0,[0,D(Ah0,Mn,Ln,[0,[0,gh0,ys(hs)],_s]),T1],l1,e1,Or]}},Vk0,R0),xr=jx[3],hr=jx[2],cr=jx[1],lr=[0,[0,zk0,V1(Ax(jx[4]))],0],kr=[0,[0,Kk0,V1(Ax(xr))],lr],sr=[0,[0,Zk0,V1(Ax(hr))],kr],Er=[0,[0,$k0,!!Sx],[0,[0,Wk0,V1(Ax(cr))],sr]],$r=q?[0,[0,Qk0,!!nx],Er]:Er;return D(Fk0,Dx,A1(h0),$r)},Ht=function(q){var C=q[2],j=C[3],h0=C[2][2],R0=C[4],nx=h0[3],Sx=h0[2],Dx=h0[1],jx=C[1],xr=q[1],hr=R2(A1(h0[4]),R0),cr=[0,[0,Ck0,Mx(a2,jx)],0],lr=[0,[0,Nk0,Mx(me,nx)],cr],kr=j[0]===0?dr(j[1]):yt(j[1]),sr=[0,[0,Ok0,Mx(Pn,Dx)],[0,[0,Rk0,kr],lr]];return D(Lk0,xr,hr,[0,[0,Ik0,Rr(function(Er){return Qo(0,Er)},Sx)],sr])},dr=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return D(sk0,j,C[1],0);case 1:return D(ok0,j,C[1],0);case 2:return D(vk0,j,C[1],0);case 3:return D(ak0,j,C[1],0);case 4:return D(lk0,j,C[1],0);case 5:return D(dk0,j,C[1],0);case 6:return D(yk0,j,C[1],0);case 7:return D(mk0,j,C[1],0);case 8:return D(kk0,j,C[2],0);case 9:return D(pk0,j,C[1],0);case 10:return D(W_0,j,C[1],0);case 11:var h0=C[1],R0=h0[2];return D(_k0,j,R0,[0,[0,hk0,dr(h0[1])],0]);case 12:return Ht([0,j,C[1]]);case 13:var nx=C[1],Sx=nx[2],Dx=nx[4],jx=nx[3],xr=nx[1],hr=R2(A1(Sx[2][3]),Dx),cr=Sx[2],lr=cr[2],kr=cr[1],sr=[0,[0,X50,Mx(a2,xr)],0],Er=[0,[0,J50,oo(jx)],sr],$r=[0,[0,V50,Mx(n2,lr)],Er];return D(K50,j,hr,[0,[0,z50,w1(kr)],$r]);case 14:return We(1,[0,j,C[1]]);case 15:var zr=C[1],r1=zr[3],Or=zr[2],e1=[0,[0,Lh0,We(0,zr[1])],0];return D(Dh0,j,r1,[0,[0,Mh0,Rr(I0,Or)],e1]);case 16:var l1=C[1],T1=l1[2];return D(Uh0,j,T1,[0,[0,jh0,dr(l1[1])],0]);case 17:var p1=C[1],i1=p1[5],f1=p1[3],d1=p1[2],P1=p1[1],$1=[0,[0,Bh0,dr(p1[4])],0],l2=[0,[0,Yh0,dr(f1)],$1],qr=[0,[0,Xh0,dr(d1)],l2];return D(Vh0,j,i1,[0,[0,Jh0,dr(P1)],qr]);case 18:var Kx=C[1],Xr=Kx[2];return D(Kh0,j,Xr,[0,[0,zh0,ys(Kx[1])],0]);case 19:return Ft([0,j,C[1]]);case 20:var Mr=C[1],Dr=Mr[3];return D(bh0,j,Dr,Fo(Mr));case 21:var Qr=C[1],R1=Qr[1],$e=R1[3],Qe=[0,[0,x_0,!!Qr[2]],0];return D(r_0,j,$e,Fx(Fo(R1),Qe));case 22:var Kr=C[1],u2=Kr[1],qt=Kr[2];return D(t_0,j,qt,[0,[0,e_0,Rr(dr,[0,u2[1],[0,u2[2],u2[3]]])],0]);case 23:var Fe=C[1],j1=Fe[1],Q1=Fe[2];return D(u_0,j,Q1,[0,[0,n_0,Rr(dr,[0,j1[1],[0,j1[2],j1[3]]])],0]);case 24:var Z2=C[1],he=Z2[2],Gt=Z2[3],_e=Z2[1],we=he?[0,[0,i_0,ke(he[1])],0]:0;return D(c_0,j,Gt,[0,[0,f_0,so(_e)],we]);case 25:var kt=C[1],Te=kt[2];return D(l_0,j,Te,[0,[0,a_0,dr(kt[1])],0]);case 26:return An(j,C[1]);case 27:var W2=C[1],Se=W2[2];return D(w_0,j,Se,[0,[0,__0,dr(W2[1])],0]);case 28:var $2=C[1],Ee=$2[2],ht=$2[1],_t=0;return D(S_0,j,Ee,[0,[0,T_0,Rr(function(In){var ge=In[2],He=In[1];switch(ge[0]){case 0:return dr(ge[1]);case 1:var L2=ge[1],Ln=L2[2],Tt=L2[1],St=[0,[0,E_0,!!L2[4]],0],Et=[0,[0,g_0,Mx(ye,L2[3])],St],hs=[0,[0,A_0,dr(Ln)],Et];return D(C_0,He,0,[0,[0,P_0,K0(Tt)],hs]);default:var Mn=ge[1],F2=Mn[1],qe=[0,[0,N_0,dr(Mn[2])],0];return D(O_0,He,0,[0,[0,R_0,Mx(K0,F2)],qe])}},ht)],_t]);case 29:var E2=C[1];return D(M_0,j,E2[3],[0,[0,L_0,er(E2[1])],[0,[0,I_0,er(E2[2])],0]]);case 30:var I2=C[1];return D(U_0,j,I2[3],[0,[0,j_0,I2[1]],[0,[0,D_0,er(I2[2])],0]]);case 31:var Q2=C[1];return D(X_0,j,Q2[3],[0,[0,Y_0,O2],[0,[0,B_0,er(Q2[2])],0]]);case 32:var Rn=C[1],On=Rn[1],bt=Rn[2],wt=0,xn=On?J_0:V_0;return D(Z_0,j,bt,[0,[0,K_0,!!On],[0,[0,z_0,er(xn)],wt]]);case 33:return D(wk0,j,C[1],0);case 34:return D(Tk0,j,C[1],0);default:return D(Sk0,j,C[1],0)}},yt=function(q){var C=q[2],j=C[2],h0=C[3],R0=j[1],nx=q[1],Sx=[0,[0,Ek0,!!C[1]],0],Dx=[0,[0,gk0,Mx(dr,j[2])],Sx],jx=[0,[0,Ak0,K0(R0)],Dx];return D(Pk0,nx,A1(h0),jx)},Qo=function(q,C){var j=C[2],h0=j[1],R0=C[1],nx=[0,[0,Mk0,!!j[3]],0],Sx=[0,[0,Dk0,dr(j[2])],nx];return D(Uk0,R0,q,[0,[0,jk0,Mx(K0,h0)],Sx])},me=function(q){var C=q[2];return Qo(C[2],C[1])},Pn=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,Yk0,dr(C[1][2])],[0,[0,Bk0,!1],0]];return D(Jk0,h0,j,[0,[0,Xk0,Mx(K0,0)],R0])},co=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j[0]===0?K0(j[1]):co(j[1]);return D($h0,R0,0,[0,[0,Wh0,nx],[0,[0,Zh0,K0(h0)],0]])},Fo=function(q){var C=q[1],j=[0,[0,qh0,dr(q[2])],0];return[0,[0,Gh0,dr(C)],j]},so=function(q){if(q[0]===0)return K0(q[1]);var C=q[1],j=C[2],h0=j[2],R0=C[1],nx=so(j[1]);return D(v_0,R0,0,[0,[0,o_0,nx],[0,[0,s_0,K0(h0)],0]])},oo=function(q){return q[0]===0?O2:An(q[1],q[2])},a2=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,q_0,Rr(ys,C[1])],0];return D(G_0,h0,A1(j),R0)},ys=function(q){var C=q[2],j=C[1][2],h0=C[5],R0=C[4],nx=C[2],Sx=j[2],Dx=j[1],jx=q[1],xr=C[3]?[0,[0,b_0,!0],0]:0,hr=[0,[0,xw0,Mx(dr,h0)],0],cr=[0,[0,rw0,Mx(ye,R0)],hr];return D(nw0,jx,Sx,Fx([0,[0,tw0,er(Dx)],[0,[0,ew0,y3(Zx,nx)],cr]],xr))},ke=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,uw0,Rr(dr,C[1])],0];return D(iw0,h0,A1(j),R0)},Cn=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,fw0,Rr(Ho,C[1])],0];return D(cw0,h0,A1(j),R0)},Ho=function(q){if(q[0]===0)return dr(q[1]);var C=q[1],j=C[1],h0=C[2][1];return Ft([0,j,[0,[0,wn(0,[0,j,sw0])],0,h0]])},bv=function(q){if(q[0]===0){var C=q[1],j=C[2],h0=j[1],R0=j[2],nx=C[1],Sx=h0[0]===0?mt(h0[1]):qo(h0[1]);return D(Nw0,nx,0,[0,[0,Cw0,Sx],[0,[0,Pw0,Mx(ra,R0)],0]])}var Dx=q[1],jx=Dx[2],xr=jx[2],hr=Dx[1];return D(Ow0,hr,xr,[0,[0,Rw0,z0(jx[1])],0])},xa=function(q){var C=q[1];return D(gw0,C,0,[0,[0,Ew0,ao(q[2][1])],0])},vo=function(q){var C=q[2],j=C[1],h0=q[1],R0=C[2],nx=j?z0(j[1]):D(Iw0,[0,h0[1],[0,h0[2][1],h0[2][2]+1|0],[0,h0[3][1],h0[3][2]-1|0]],0,0);return D(Mw0,h0,A1(R0),[0,[0,Lw0,nx],0])},ms=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return Ex([0,j,C[1]]);case 1:return Px([0,j,C[1]]);case 2:return vo([0,j,C[1]]);case 3:var h0=C[1],R0=h0[2];return D(jw0,j,R0,[0,[0,Dw0,z0(h0[1])],0]);default:var nx=C[1];return D(Yw0,j,0,[0,[0,Bw0,er(nx[1])],[0,[0,Uw0,er(nx[2])],0]])}},mt=function(q){var C=q[2];return D($w0,q[1],C[2],[0,[0,Ww0,er(C[1])],0])},qo=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,zw0,mt(C[2])],0];return D(Zw0,h0,0,[0,[0,Kw0,mt(j)],R0])},Go=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j[0]===0?mt(j[1]):Go(j[1]);return D(Vw0,R0,0,[0,[0,Jw0,nx],[0,[0,Xw0,mt(h0)],0]])},ao=function(q){switch(q[0]){case 0:return mt(q[1]);case 1:return qo(q[1]);default:return Go(q[1])}},ra=function(q){if(q[0]===0){var C=q[1];return B0([0,C[1],C[2]])}var j=q[1];return vo([0,j[1],j[2]])},ea=function(q){var C=q[2],j=C[2],h0=C[1],R0=q[1],nx=K0(j?j[1]:h0);return D(Hw0,R0,0,[0,[0,Fw0,K0(h0)],[0,[0,Qw0,nx],0]])},ks=function(q){return Rr(ta,q)},ta=function(q){var C=q[2],j=q[1];if(C[1])var h0=C[2],R0=uT0;else var h0=C[2],R0=iT0;return D(R0,j,0,[0,[0,fT0,er(h0)],0])},lo=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1];if(j)var nx=[0,[0,cT0,z0(j[1])],0],Sx=sT0;else var nx=0,Sx=oT0;return D(Sx,R0,h0,nx)},bo=function(q){var C=q[2],j=q[1],h0=[0,[0,vT0,lx(q[3])],0],R0=[0,[0,aT0,Mx(Cn,C)],h0];return[0,[0,lT0,z0(j)],R0]},xv=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=0,R0=K0(C[1]);break;case 1:var h0=0,R0=or(C[1]);break;default:var h0=1,R0=z0(C[1])}return[0,[0,yT0,z0(j)],[0,[0,dT0,R0],[0,[0,pT0,!!h0],0]]]},Nn=P0[2],rv=Nn[2],$9=Nn[4],m3=Nn[3],Q9=P0[1],j6=N0(Nn[1]),U6=[0,[0,h60,j6],[0,[0,k60,ks($9)],0]];if(rv)var B6=rv[1],Y6=Fx(U6,[0,[0,T60,D(w60,B6[1],0,[0,[0,_60,er(B6[2])],0])],0]);else var Y6=U6;var k3=D(S60,Q9,m3,Y6),F9=Fx(v0,VK[1]);if(k3.errors=Rr(function(q){var C=q[1],j=[0,[0,mT0,er(_S0(q[2]))],0];return ps([0,[0,kT0,KK(C)],j])},F9),T){var H9=O[1];k3[ED]=V1(iy(function(q){var C=q[2],j=q[1],h0=q[3],R0=[0,[0,Dv0,er(eI(C))],0],nx=[0,c9(b,j[3]),0],Sx=[0,[0,jv0,V1([0,c9(b,j[2]),nx])],R0],Dx=[0,[0,Yv0,ps([0,[0,Bv0,j[3][1]],[0,[0,Uv0,j[3][2]],0]])],0],jx=[0,[0,zv0,ps([0,[0,Vv0,ps([0,[0,Jv0,j[2][1]],[0,[0,Xv0,j[2][2]],0]])],Dx])],Sx];switch(h0){case 0:var xr=Kv0;break;case 1:var xr=Zv0;break;case 2:var xr=Wv0;break;case 3:var xr=$v0;break;case 4:var xr=Qv0;break;default:var xr=Fv0}return ps([0,[0,qv0,er(jJ(C))],[0,[0,Hv0,er(xr)],jx]])},H9))}return k3}var na=A0[1];if(na===5){var h3=A0[2];if(h3&&h3[1]===6){var q9=h3[2],C0=[0,H+2|0,0,[0,Jl(Ax([0,H,Q0])),U0]],A0=q9;continue}}else if(6>na){var G9=A0[2],C0=[0,H+BV(na)|0,[0,H,Q0],U0],A0=G9;continue}var D1=A0[2],ev=[0,Jl(Ax([0,H,Q0])),U0],C0=[0,H+BV(na)|0,0,ev],A0=D1}}};if(typeof MM<"u")var ZK=MM;else{var WK={};io.flow=WK;var ZK=WK}ZK.parse=bZ(function(x,r){try{var e=rg0(x,r);return e}catch(u){var t=I1(u);return t[1]===BL?JK(t[2]):JK(new bE0(er(Qx(MT0,ay(t)))))}}),oO(0);return}}})(globalThis)});var lZ=$K(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.extract=TN0;aa.parse=EN0;aa.parseWithComments=aZ;aa.print=gN0;aa.strip=SN0;var mN0=/\*\/$/,kN0=/^\/\*\*?/,oZ=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,hN0=/(^|\s+)\/\/([^\r\n]*)/g,fZ=/^(\r?\n)+/,_N0=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,cZ=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,wN0=/(\r?\n|^) *\* ?/g,vZ=[];function TN0(d0){let wx=d0.match(oZ);return wx?wx[0].trimLeft():""}function SN0(d0){let wx=d0.match(oZ);return wx&&wx[0]?d0.substring(wx[0].length):d0}function EN0(d0){return aZ(d0).pragmas}function aZ(d0){let wx=` +`;d0=d0.replace(kN0,"").replace(mN0,"").replace(wN0,"$1");let Gx="";for(;Gx!==d0;)Gx=d0,d0=d0.replace(_N0,`${wx}$1 $2${wx}`);d0=d0.replace(fZ,"").trimRight();let gr=Object.create(null),rr=d0.replace(cZ,"").replace(fZ,"").trimRight(),jr;for(;jr=cZ.exec(d0);){let ir=jr[2].replace(hN0,"");typeof gr[jr[1]]=="string"||Array.isArray(gr[jr[1]])?gr[jr[1]]=vZ.concat(gr[jr[1]],ir):gr[jr[1]]=ir}return{comments:rr,pragmas:gr}}function gN0({comments:d0="",pragmas:wx={}}){let Gx=` +`,gr="/**",rr=" *",jr=" */",ir=Object.keys(wx),tn=ir.flatMap(Ct=>sZ(Ct,wx[Ct])).map(Ct=>`${rr} ${Ct}${Gx}`).join("");if(!d0){if(ir.length===0)return"";if(ir.length===1&&!Array.isArray(wx[ir[0]])){let Ct=wx[ir[0]];return`${gr} ${sZ(ir[0],Ct)[0]}${jr}`}}let X4=d0.split(Gx).map(Ct=>`${rr} ${Ct}`).join(Gx)+Gx;return gr+Gx+(d0?X4:"")+(d0&&ir.length?rr+Gx:"")+tn+jr}function sZ(d0,wx){return vZ.concat(wx).map(Gx=>`@${d0} ${Gx}`.trim())}});var MN0={};QK(MN0,{parsers:()=>XM});var XM={};QK(XM,{flow:()=>LN0});var kZ=HK(qK(),1);function iN0(d0,wx){let Gx=new SyntaxError(d0+" ("+wx.loc.start.line+":"+wx.loc.start.column+")");return Object.assign(Gx,wx)}var GK=iN0;var fN0=(d0,wx,Gx)=>{if(!(d0&&wx==null))return Array.isArray(wx)||typeof wx=="string"?wx[Gx<0?wx.length+Gx:Gx]:wx.at(Gx)},DM=fN0;function cN0(d0){return Array.isArray(d0)&&d0.length>0}var bK=cN0;function Pt(d0){var gr,rr,jr;let wx=((gr=d0.range)==null?void 0:gr[0])??d0.start,Gx=(jr=((rr=d0.declaration)==null?void 0:rr.decorators)??d0.decorators)==null?void 0:jr[0];return Gx?Math.min(Pt(Gx),wx):wx}function As(d0){var wx;return((wx=d0.range)==null?void 0:wx[1])??d0.end}function sN0(d0){let wx=new Set(d0);return Gx=>wx.has(Gx==null?void 0:Gx.type)}var xZ=sN0;var oN0=xZ(["Block","CommentBlock","MultiLine"]),U4=oN0;function vN0(d0){let wx=`*${d0.value}*`.split(` +`);return wx.length>1&&wx.every(Gx=>Gx.trimStart()[0]==="*")}var jM=vN0;function aN0(d0){return U4(d0)&&d0.value[0]==="*"&&/@(?:type|satisfies)\b/.test(d0.value)}var rZ=aN0;var B4=null;function Y4(d0){if(B4!==null&&typeof B4.property){let wx=B4;return B4=Y4.prototype=null,wx}return B4=Y4.prototype=d0??Object.create(null),new Y4}var lN0=10;for(let d0=0;d0<=lN0;d0++)Y4();function UM(d0){return Y4(d0)}function pN0(d0,wx="type"){UM(d0);function Gx(gr){let rr=gr[wx],jr=d0[rr];if(!Array.isArray(jr))throw Object.assign(new Error(`Missing visitor keys for '${rr}'.`),{node:gr});return jr}return Gx}var eZ=pN0;var tZ={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var dN0=eZ(tZ),nZ=dN0;function BM(d0,wx){if(!(d0!==null&&typeof d0=="object"))return d0;if(Array.isArray(d0)){for(let gr=0;gr{var ir;(ir=jr.leadingComments)!=null&&ir.some(rZ)&&rr.add(Pt(jr))}),d0=ym(d0,jr=>{if(jr.type==="ParenthesizedExpression"){let{expression:ir}=jr;if(ir.type==="TypeCastExpression")return ir.range=[...jr.range],ir;let tn=Pt(jr);if(!rr.has(tn))return ir.extra={...ir.extra,parenthesized:!0},ir}})}if(d0=ym(d0,rr=>{var jr;switch(rr.type){case"LogicalExpression":if(uZ(rr))return YM(rr);break;case"VariableDeclaration":{let ir=DM(!1,rr.declarations,-1);ir!=null&&ir.init&&gr[As(ir)]!==";"&&(rr.range=[Pt(rr),As(ir)]);break}case"TSParenthesizedType":return rr.typeAnnotation;case"TSTypeParameter":if(typeof rr.name=="string"){let ir=Pt(rr);rr.name={type:"Identifier",name:rr.name,range:[ir,ir+rr.name.length]}}break;case"TopicReference":d0.extra={...d0.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(Gx==="meriyah"&&((jr=rr.exported)==null?void 0:jr.type)==="Identifier"){let{exported:ir}=rr,tn=gr.slice(Pt(ir),As(ir));(tn.startsWith('"')||tn.startsWith("'"))&&(rr.exported={...rr.exported,type:"Literal",value:rr.exported.name,raw:tn})}break;case"TSUnionType":case"TSIntersectionType":if(rr.types.length===1)return rr.types[0];break}}),bK(d0.comments)){let rr=DM(!1,d0.comments,-1);for(let jr=d0.comments.length-2;jr>=0;jr--){let ir=d0.comments[jr];As(ir)===Pt(rr)&&U4(ir)&&U4(rr)&&jM(ir)&&jM(rr)&&(d0.comments.splice(jr+1,1),ir.value+="*//*"+rr.value,ir.range=[Pt(ir),As(rr)]),rr=ir}}return d0.type==="Program"&&(d0.range=[0,gr.length]),d0}function uZ(d0){return d0.type==="LogicalExpression"&&d0.right.type==="LogicalExpression"&&d0.operator===d0.right.operator}function YM(d0){return uZ(d0)?YM({type:"LogicalExpression",operator:d0.operator,left:YM({type:"LogicalExpression",operator:d0.operator,left:d0.left,right:d0.right.left,range:[Pt(d0.left),As(d0.right.left)]}),right:d0.right.right,range:[Pt(d0),As(d0)]}):d0}var iZ=yN0;var X3=HK(lZ(),1);function AN0(d0){if(!d0.startsWith("#!"))return"";let wx=d0.indexOf(` +`);return wx===-1?d0:d0.slice(0,wx)}var pZ=AN0;function PN0(d0){let wx=pZ(d0);wx&&(d0=d0.slice(wx.length+1));let Gx=(0,X3.extract)(d0),{pragmas:gr,comments:rr}=(0,X3.parseWithComments)(Gx);return{shebang:wx,text:d0,pragmas:gr,comments:rr}}function dZ(d0){let{pragmas:wx}=PN0(d0);return Object.prototype.hasOwnProperty.call(wx,"prettier")||Object.prototype.hasOwnProperty.call(wx,"format")}function CN0(d0){return d0=typeof d0=="function"?{parse:d0}:d0,{astFormat:"estree",hasPragma:dZ,locStart:Pt,locEnd:As,...d0}}var yZ=CN0;function NN0(d0){return d0.charAt(0)==="#"&&d0.charAt(1)==="!"?"//"+d0.slice(2):d0}var mZ=NN0;var RN0={comments:!1,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!0};function ON0(d0){let{message:wx,loc:{start:Gx,end:gr}}=d0;return GK(wx,{loc:{start:{line:Gx.line,column:Gx.column+1},end:{line:gr.line,column:gr.column+1}},cause:d0})}function IN0(d0){let wx=kZ.default.parse(mZ(d0),RN0),[Gx]=wx.errors;if(Gx)throw ON0(Gx);return iZ(wx,{text:d0})}var LN0=yZ(IN0);return uN0(MN0);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/flow.mjs b/node_modules/prettier/plugins/flow.mjs index dbb504c..3154aa3 100644 --- a/node_modules/prettier/plugins/flow.mjs +++ b/node_modules/prettier/plugins/flow.mjs @@ -1,21 +1,21 @@ -var xN0=Object.create;var MM=Object.defineProperty;var rN0=Object.getOwnPropertyDescriptor;var eN0=Object.getOwnPropertyNames;var tN0=Object.getPrototypeOf,nN0=Object.prototype.hasOwnProperty;var FK=(p0,wx)=>()=>(wx||p0((wx={exports:{}}).exports,wx),wx.exports),HK=(p0,wx)=>{for(var tr in wx)MM(p0,tr,{get:wx[tr],enumerable:!0})},uN0=(p0,wx,tr,gr)=>{if(wx&&typeof wx=="object"||typeof wx=="function")for(let C1 of eN0(wx))!nN0.call(p0,C1)&&C1!==tr&&MM(p0,C1,{get:()=>wx[C1],enumerable:!(gr=rN0(wx,C1))||gr.enumerable});return p0};var qK=(p0,wx,tr)=>(tr=p0!=null?xN0(tN0(p0)):{},uN0(wx||!p0||!p0.__esModule?MM(tr,"default",{value:p0,enumerable:!0}):tr,p0));var GK=FK(DM=>{(function(p0){typeof globalThis!="object"&&(this?wx():(p0.defineProperty(p0.prototype,"_T_",{configurable:!0,get:wx}),_T_));function wx(){var tr=this||self;tr.globalThis=tr,delete p0.prototype._T_}})(Object);(function(p0){"use strict";var wx="symbol",tr=271,gr=126548,C1="renders",ir=71127,ur="member_property",k1=65007,la=273,Nt=66517,Vn="jsx_attribute_value_expression",mm=119980,zn="function_declaration",Re="<2>",km=68466,zM="%=",hm="??",_m=70080,J4="&",Rt="identifier",V4=72163,wm=71723,Tm="properties",Sm=183969,Em=68223,Kn="function_return_annotation",gm=124903,KM=261,Am=70106,ZM=241,WM="(",$M=213,Pm=120074,Cm=70708,Nm=71679,Zn="logical",f2="camlinternalFormat.ml",Wn="type_guard_annotation",Rm=92975,QM=">>>",Im="RestElement",Om=67897,FM=179,Lm="start",Mm=113775,z4=126521,HM="%i",V3="`",qM="#",Dm=43702,K4=126,jm=110947,$n="function_identifier",Z4=119893,Um=70366,Bm=65547,Ym=43743,Xm=-43,sv=8238,GM=",",ov=8286,Qn="keyof_type",Jm=66717,W4=12336,bM=201,Vm=71338,$4=11565,zm=69289,Km=55291,Zm=73030,Wm=70479,$m=69572,Qm=11623,Fn="tuple_spread_element",Hn="component_type_rest_param",vv=8239,Fm=64310,pa="@]",Hm=42993,Q4=11558,F4="Map.bal",z3="public",xD=-32,da="Literal",qn="jsx_member_expression_identifier",Gn="for_in_assignment_pattern",qm=71450,H4=126557,nn=103,Gm=12292,bm=110579,q4=120597,xk=13311,rk=12348,bn="export_default_declaration_decl",x7="tuple_type",ek=113663,G4=170,tk=67413,rD="Assert_failure",eD="comments",K3="%S",un=127343600,nk=12341,uk=67646,tD="ENOTEMPTY",ik=72160,fk=70187,nD=222,ck=12343,uD=2147483647,sk=126624,ok=43442,vk=70312,iD=281,r7="interface_type",av="new",ak=66256,b4=68296,lk=124908,xp=126579,rp=70107,pk=249,dk=71167,e7="union_type",qr=248,yk=126546,t7="enum_bigint_member",fD=133,mk=67871,kk=66955,cD=1027,n7="class_declaration",u7="optional_call",sD="a string",ep=11703,oD="<<",tp=126564,i7="jsx_element",f7="object_property_type",hk=94207,c7="enum_declaration",_k=68023,wk=67669,Tk=8318,vD="prefix",lv="this",Sk=126578,s7="if_consequent_statement",aD=-696510241,Ek=66963,pv="default",np=72967,It=101,lD="buffer.ml",gk=74649,fn=65535,Ak=43709,pD=175,_o="component",dD="===",dv=117,o7="jsx_identifier",yD="EnumDefaultedMember",up=70006,Pk=70161,Ck=126633,Nk=66965,v7="member_property_expression",Rk=101589,Ik=64274,ya="function",Ok=66303,Lk=42954,Mk=126529,Dk=72191,a7="new_",jk=64433,ip=126559,Uk=72144,mD="==",wo=-744106340,Bk=43359,Yk=171,kD="Printexc.handle_uncaught_exception",Xk=66735,Jk=126534,Vk=74879,zk=42785,fp=120629,Z3="0o",hD="End_of_file",Kk=66175,_D="&=",Zk="nan",cp=126503,l7="pattern_number_literal",Wk=43470,p7="import_namespace_specifier",$k=77711,sp=70302,d7="component_param",op="@])",vp=126515,ma=118,Ie="continue",Qk=43798,ap=";@ ",Fk=74751,Hk="src/parser/statement_parser.ml",qk="rmdir",Gk=94177,y7="for_in_statement",wD=12520,TD="TypeParameterInstantiation",hx="",SD="**=",bk=120126,ED=197,xh=67829,lp="_bigarr02",m7="export_named_declaration_specifier",pp=": No such file or directory",k7="render_type",dp=64319,rh=69926,h7="pattern_object_p",gD="TypeAnnotation",_7="array_type",W3="@[%s =@ ",eh=72847,w7="export_default_declaration",yp=126590,th=42774,nh=": Not a directory",ka="let",yv=12288,q2="argument",G2="/",mp="an identifier",Ps="typeof",kp=68116,uh=182,T7="declare_export_declaration_decl",ih=67589,fh=66771,$3="class",AD="tokens",hp=70281,Q3=255,ch=43638,mv="key",sh=69955,PD=">>",S7="function_expression_or_method",oh=43587,cn="block",vh=100351,_p="mixed",ah=66503,lh="ENOTDIR",ph=65135,E7="string_literal",ce="@ ",dh=43334,g7="if_alternate_statement",yh=70448,wp=8485,A7="type_args",mh=69864,P7="if_statement",CD="+=",C7="typeof_identifier",Tp="with",Sp=65595,kh=64286,hh=71086,Cs="true",_h=69423,N7="catch_clause",wh="e",ha="asserts",ND=">>=",Ep=131,Th=43388,Sh=43887,Z1=-48,Eh=120779,RD=190,gh=194,R7="pattern_bigint_literal",Ah=71351,Ph=65629,I7="call",Ch=-42,gp=126553,Nh=43695,ID=177,Rh=42124,Ih=12703,Oh=12442,Lh=11718,Ap=70449,Pp=126547,Mh=67462,Ns="left",O7="infer_type",Dh=11742,jh=65597,Cp="Unix.Unix_error",Uh=122623,Bh=124911,Yh=72959,Xh="opaque",L7="object_internal_slot_property_type",OD="Enum `",kv=65279,Jh=71983,Vh=12329,B1=110,M7="spread_property",LD="importKind",F3=" =",D7="remote_identifier",j7="labeled_statement",U7="jsx_fragment",zh=120770,B7="function_param",D2=112,Kh="exportKind",Y7="binary",Rs="`.",Zh=42511,MD="<=",X7="jsx_spread_attribute",j2="import",J7="typeof_member_identifier",Wh=69414,$h=19967,Np=11687,Qh=93823,DD=67714067,jD=209,Fh=71903,Hh="of",qh=72e3,Rp="typeArguments",V7="type_identifier",z7="pattern_array_element_pattern",Ip=69744,_a=192,K7="class_element",Z7="export_source",W7="component_param_pattern",Gh=42508,bh=125124,UD="Unexpected token `",$7="for_in_left_declaration",Q7="object_call_property_type",x_="abstract",r_=8584,e_=68786,t_=71999,Op=123214,n_=123565,Lp=186,F7="class_implements_interface",Mp=126536,u_=69749,BD="Invalid legacy octal ",i_=71295,f_=66927,H7="pattern_expression",c_=11679,s_=-61,Dp=65141,o_=11694,q7="update_expression",YD="minus",Oe="debugger",v_=71352,a_=65470,wa="number",l_=123627,jp=64322,Up=43471,G7="for_of_assignment_pattern",Bp=126589,p_=43784,XD="Internal Error: Found object private prop",d_=183983,Gr="id",y_=123190,Yp="finally",Xp=120070,m_=72095,b7="as_expression",xu="syntax",k_=110591,Is="false",JD=-10,Jp="AssignmentPattern",ru="typeof_expression",h_=43764,VD="FunctionTypeParam",eu="function_body_any",__=126627,w_=71998,T_=126543,tu="call_type_arg",S_=64316,Vp=64285,E_=8454,zD=137,KD="**",nu="object_type_property_setter",g_=68607,sn=108,A_="out",P_=68799,hv=65278,uu="jsx_member_expression",C_=92728,_v="null",N_=66431,R_=72249,on=128,zp=119994,I_=66207,O_=43583,Kp="else",Zp=94179,Wp=11735,L_=64911,iu="jsx_attribute_name_namespaced",ZD="!",M_=42539,D_=72250,j_=71215,U_=69746,B_=65487,fu="pattern_object_property_key",WD=", ",Y_=8505,X_="=",J_=64111,V_=8507,$p=120134,Qp="while",z_=120596,K_=43002,H3="protected",Z_=68479,W_=43395,$_=68252,$D="v",Q_=70278,F_="rendersType",H_=70853,Fp=120145,q_=69297,G_=73112,Hp=8488,b_=68351,xw=42655,cu="for_of_left_declaration",rw=44031,ew="Failure",tw=92159,su="object_key_identifier",QD=195,wv="bigint",ou="import_default_specifier",q3=256,vu="member",FD="!==",au="component_identifier",nw=73008,uw=72283,qp=126500,Gp=120127,lu="jsx_attribute_name",pu="for_statement_init",iw=67711,du="private_name",bp="case",x8=8489,yu="import_specifier",fw=64279,cw=94098,sw=119974,mu="pattern_string_literal",ow=72969,HD=193,qD="!=",r8=126520,vw=71944,GD=259,aw=42191,ku="generic_qualified_identifier_type",Tv="implements",lw=194559,bD="%",G3="hasUnknownMembers",pw=71039,xj=211,dw=83526,hu="init",_u="jsx_attribute_value",yw=70271,Ta=240,wu="function_type_return_annotation",mw=70018,kw="rest",Tu="readonly_type",hw=512,_w=68095,ww=120003,e8=126563,t8=71236,Tw=69375,Sw=68850,Ew=70105,gw=43866,rj="T_RENDERS_QUESTION",n8=888960333,Aw=43013,Su="assignment_pattern",Pw="specifiers",ej=710,tj=145,vn="as",Cw=120570,Nw=11507,nj=204,Eu="jsx_element_name_identifier",gu="pattern_object_property_string_literal_key",Au="class_expression",uj=257,Rw=44002,Iw=82943,Sa="src/parser/type_parser.ml",Ea="test",ij=-67,Ow=64217,u8="package",fj="collect_comments",cj="Pervasives.do_at_exit",Lw=125183,Mw=42606,Pu="tuple_element",Cu="enum_boolean_member",Dw=65312,i8=119981,jw=65495,f8=120085,sj=-80,Uw=138,c8=126555,Bw=65276,h1=128,oj="{ ",Nu="for_statement",Ru="class_method",s8="if",Iu="generic_type",Nr=113,Yw=43071,Xw=72001,Jw=71131,Vw=70002,vj="renders*",zw=42888,o8=8469,b3="instanceof",Kw=11502,v8=94178,Zw=64321,Ww=64913,aj="Division_by_zero",$w=92879,Qw=71945,lj=185,Fw=66938,a8=65535,Hw=113800,pj=": file descriptor already closed",l8=223,dj="*=",qw=68899,Ou="switch_case",Lu="pattern_array_element",Mu="enum_string_member",Du="pattern_object_property_bigint_literal_key",yj="visit_trailing_comment",p8="export",d8=120122,y8=43823,Gw=43792,bw=42527,xT=70726,ju="enum_defaulted_member",rT=68497,m8=72349,Uu="program",Bu="member_type_identifier",eT="object",Yu="for_of_statement_lhs",tT=113791,nT=67391,Xu="jsx_spread_child",k8=126554,h8=8526,_8=43880,w8=69415,uT=43822,Ju="pattern_identifier",iT=93052,ga="readonly",Le="name",fT=68119,cT=71494,sT=120121,T8=8486,mj=2047,Vu="enum_symbol_body",kj=142,hj="PropertyDefinition",oT=177976,zu="declare_class",vT=65489,aT=72367,lT=70440,Ku="import_named_specifier",_j="Popping lex mode from empty stack",pT=68111,dT=66463,wj="*-/",yT=43187,S8=8487,mT=11567,kT=67861,hT=` -`,_T=66383,Zu="declare_interface",wT=-24976191,TT=238,ST=-24,Tj="@ }@]",ET=43645,gT=176,AT=119976,E8=69959,PT=126519,CT=";",Sj="trailingComments",g8=65548,Wu="number_literal",Aa=449540197,NT=43704,A8=126584,RT=8467,Ej="||",P8=11695,IT="exported",OT=120712,Os="void",gj="mixins",LT=92783,MT=215,$u="body_expression",Aj="%ni",xl=">",Qu="jsx_child",DT=8516,Fu="optional_indexed_access_type",Hu="typeof_type",qu="spread_element",jT=42963,Pj="@[",Gu="component_params",UT=43042,C8="",bu="function_",N8="for",R8=65575,an="params",BT=168,Cj="win32",Sv=8202,Nj="@",I8="^",Rj=164,ft="optional",YT=65574,rl="boolean",Ij=139,XT=12548,O8=120539,Oj="Not_found",el=246,xi="expression_statement",JT="EBADF",VT=66815,ri="module_ref_literal",zT=55203,ei="function_param_type",KT=73064,L8=70279,ZT=110580,Lj=233,WT="<",Mj="visit_leading_comment",$T=66855,QT=66966,FT=66499,HT=111355,qT=68680,GT=206,Dj="--",bT=65497,M8=11711,ti="function_param_pattern",Ev="constructor",xS=5760,jj="infinity",D8=43642,MN0="fs",rS=92991,j8=126544,eS=101640,U8=72162,tS=67583,B8=8468,U2="typeParameters",Uj="elements",nS=71423,Bj="Sys_blocked_io",ni="interface_declaration",ui="variable_declaration",ii="function_rest_param",fi="type",uS="Invalid number ",iS=" : flags Open_rdonly and Open_wronly are not compatible",fS=69404,ci="jsx_element_name_member_expression",Y8="keyof",X8="never",si="with_",ln=32768,Yj="|=",J8=70404,V8=70441,cS=42969,tl="declare",sS=73061,oi="object_type",vi="object_property_value_type",oS=69687,Xj="Invalid binary/octal ",Jj=230,vS=64324,Vj="range",zj="infer",aS=120744,ai="array_element",lS=70730,pS=43641,Kj=166,dS=70461,yS=69890,mS=69487,kS=74862,hS=68149,z8=73065,Zj="%a",_S=72348,Wj=172,li="jsx_expression",wS=65663,TS=126495,SS=245,ES=124907,pi="member_property_identifier",$j=226,gS=43615,di="comment",K8=119965,yi="catch_clause_pattern",mi="object_type_property_getter",Qj=136,AS=43019,PS=67455,Z8=126628,Fj=331416730,Hj="the start of a statement",CS=122654,NS="shorthand",RS=43595,IS=11710,ki="typeof_qualified_identifier",OS=72750,qj="elementType",H1="typeAnnotation",LS=124895,Gj=162,W8=11559,MS=67382,bj="??=",DS=72329,jS="target",hi="component_type",xU=180,US=189,rU=8206,BS=43513,YS=173823,XS=126467,_i="type_guard",JS=43700,VS=12783,$8=8305,wi="type_annotation",eU=141,Me="break",Q8=42999,zS=65019,tU=160,KS=70460,Ti="expression_or_spread",ZS=")",Si="class_private_field",WS=55215,$S=65338,QS=40981,nl="members",Ei="import_declaration",FS=69634,F8=94031,HS="ENOENT",qS=8457,nU="satisfies",gi="generic_identifier_type",Ai="function_this_param",GS=66993,Pi="type_",bS=67423,xE=11557,rE=12799,H8=239,eE=93026,tE=66377,nE=123180,uU=221,iU=-594953737,uE=67967,iE=43586,ct=105,fU="src/parser/flow_lexer.ml",fE=66559,Ci="class_property_value",cU=150,cE=67637,sU="closedir",sE=43010,oE=8521,q8=69956,vE=42959,aE=212,lE=92735,G8="}",ul="method",pE=11498,b8=247,se="empty",Ni=16777215,dE=161,yE=42887,Ri=116,Ii="type_identifier_reference",x5=126634,mE=68029,oU="regexp",kE=70414,il=121,Oi="template_literal_element",hE=8449,_E=126562,gv=12287,wE=-45,r5=64297,e5=126523,TE=43301,Ot=111,SE=126498,EE=43776,vU="EEXIST",gE=119892,AE=43807,aU=4096,Av=252,Ls=255,PE=68295,Li="variable_declarator_pattern",Mi="do_while",t5="catch",CE=66962,NE=120654,Di=125,ji="label_identifier",RE=11263,IE=8525,Ui="assignment",OE=191456,LE=43273,lU="%u",ME=65381,DE=110927,jE=65479,UE=120538,Pv="await",BE=71487,YE="jsError",XE=110588,JE=120084,VE=42890,Pa=224,Bi="object_key",zE=43696,KE=73647,ZE=43761,WE=12295,$E=64967,n5=11647,pU=191,Lt=123,QE="generator",FE=123583,Yi="for_of_statement",Xi="enum_bigint_body",HE=110959,qE=92995,GE=120686,bE="b",xg=119969,u5=126522,i5=64318,rg=71839,f5=126602,eg=65908,fl=65536,dU=231,yU=-602162310,mU="comment_bounds",Mt="-",kU=-55,Ji="pattern_object_property",tg=43493,ng=69505,ug=8471,hU=277,ig=187,c5=120745,Vi="enum_member_identifier",fg=71959,cg=66863,sg=65594,og=253,s5='"',o5=70286,zi="jsx_attribute_value_literal",vg=68447,_U="the",ag="index out of bounds",Ki="declare_export_declaration",Zi="jsx_attribute",Wi="class_extends",br=122,c2=106,$i="binding_pattern",Qi="ts_type_cast",lg=113807,pg=93951,Ca=119,dg="types",yg=8335,Fi="statement_fork_point",Na="_",mg=65500,Hi="function_type",kg=68220,qi="statement_list",Ra=-835925911,hg=123535,_g=258,v5=43815,wU=199,a5=120571,wg=67514,TU="Property",l5=72713,SU="Unexpected ",p5=169,EU=", characters ",d5=43867,Tg=42537,Gi="component_declaration",gU=" : is a directory",bi="object_key_number_literal",Xr=127,s2=-36,cl=912068366,sl="delete",st=114,Sg=120076,xf="regexp_literal",Eg=65370,gg=65481,d1="value",Ag=68405,Ia="operator",ol="const",AU=283,To=109,y5="any",Pg=69958,Cg=70831,Ng=73111,Rg=72767,Ig="Identifier",rf="jsx_opening_attribute",ef="conditional_type",Og="loc",Lg=67071,m5=120004,Mg=43492,Dg=70005,PU=188,k5=72272,jg=11389,Ug=251,Bg=73055,h5=70280,CU=286,_5=1114111,Yg=66421,NU="Stack_overflow",Xg=70301,Jg=19903,So="0x",Vg=69967,zg=12447,w5=66512,RU=`Fatal error: exception %s -`,vl=1e3,Kg=69295,T5=120093,IU=">=",OU=149,S5=64325,tf="class_identifier",Zg=119967,Wg=68415,LU="end",nf="enum_boolean_body",uf="member_private_name",ff="super_expression",$g=71955,Qg=126514,E5=67593,Fg=66939,Hg=12591,g5=126538,qg=110590,cf="component_renders_annotation",Gg=72703,bg=72105,A5=65598,xA=73727,P5=126504,C5=126551,rA=70143,al="from",sf="class_property",of="enum_number_body",eA=42559,tA=93759,nA=66994,pn="right",MU=225,uA=67702,iA=65473,fA=43697,N5=70855,cA=119993,sA=72103,oA=178205,vf="call_type_args",vA=66511,af="export_batch_specifier",lf="component_type_param",dn=782176664,Cv="get",ll="local",DU=228,pf="object_mapped_type_property",df="class_decorator",jU=220,yf="enum_body",UU="<<=",aA=71956,lA=69839,Oa="super",pA=173791,dA=71942,q1="expression",yA=72440,La=254,mA=70412,BU="renders?",mf="try_catch",YU=32752,kf="declare_module_exports",kA=12320,XU=134,hA=94175,pl="enum",JU=196,hf="import_source",_A=43814,wA=120069,_f="while_",R5=126537,TA=43262,wf="function_rest_param_type",SA=66378,I5=119996,Tf="declare_component",EA=73097,gA=70783,AA=43503,PA=131071,CA=11492,NA=92766,VU=173,RA=113770,IA=73029,OA=66978,Sf="tagged_template",Ef="jsx_element_name",gf="for_init_declaration",LA=123213,Af="object_indexer_property_type",Pf="object_spread_property_type",O5=72970,L5=70854,MA=110930,dl="var",zU=217,DA=119972,jA=69622,UA=63743,BA=42237,YA=870530776,M5="returnType",KU=56320,ZU=143,Ma="computed",XA=42735,Cf="arg_list",JA=67461,Nf="export_named_declaration",VA=72817,zA=73439,KA=43782,ZA=66775,WA=70655,D5="bool",$A=65140,QA=75075,FA=126651,HA=71947,qA=42961,GA=12735,bA=78894,xP=64262,WU=237,b2="interface",$U="Match_failure",rP=42962,eP=69748,QU="leadingComments",Rf="this_expression",yl=461894857,j5=12592,FU=8204,tP=119807,nP=66348,If="declare_variable",uP=8348,Of="optional_member",Lf=120,Mf="arrow_function",iP=72768,fP=70851,Df="array",cP=43249,U5=126468,sP=177983,oP="compare: functional value",vP=126550,aP=64847,jf="binding_type_identifier",lP=120132,Uf="function_params",pP=93071,ml=1024,dP=42783,HU=1039100673,qU="@{",yP=12352,mP=42653,kP=120628,Bf="declare_function",Yf="for_in_statement_lhs",hP=72271,_P=69807,wP=67826,Xf="syntax_opt",Jf="object_key_bigint_literal",GU=243,TP=94032,bU="Undefined_recursive_module",xB=-1053382366,SP=72242,Vf="variance_opt",EP=101631,gP="arguments",AP=72161,PP=8511,B5="unknown",CP=43560,rB="the end of an expression statement (`;`)",eB=1026,NP=12543,RP=11670,tB="?",IP=69247,Y5=11631,X5="line",OP=72202,zf="pattern_object_rest_property",Dt=" ",LP=43487,Eo=115,MP=-673950933,Kf="intersection_type",DP=120144,kl="is",jP=178207,UP=100343,nB="||=",uB="f",J5=8455,Zf=102,Wf="pattern_object_property_number_literal_key",BP=70418,YP=8543,iB="Internal Error: Found private field in object props",V5=126540,z5=119995,Nv=8287,$f="indexed_access_type",Qf="export_named_specifier",fB=266,cB=224,XP=124926,JP=-103,sB=167,K5=65344,Z5=126530,VP=113788,zP=67505,KP="property",ZP=43014,De="return",Ms=-85,WP=126601,oB=214,vB="children",Ff="type_alias",W5=43259,$P=126583,QP=71958,FP=65613,HP=67431,$5=126535,qP=69599,Hf="type_params",qf="object_key_computed",GP=124910,B2="variance",Q5=11727,bP=66954,xC=126463,Gf="catch_body",rC=69445,bf="type_param",xc="component_type_params",eC=124902,F5=120687,aB="collect_comments_opt",tC=15,nC=120485,uC=70416,iC=125259,rc="jsx_namespaced_name",fC=43712,cC=72712,lB="~",H5=12448,ec="jsx_member_expression_object",q5=126499,G5=-97,tc="pattern_object_property_identifier_key",pB=219,nc="component_body",uc="opaque_type",ic=".",sC=43009,oC="consequent",dB="SpreadElement",Y1="body",yB=178,mB=202,fc="jsx_opening_element",cc="declare_module",b5=67638,vC=8477,sc="object_type_property",aC=110882,oc="function_body",lC=94111,kB="module",hB="alternate",pC=67839,Rv=8191,dC=43881,_B=": closedir failed",go="kind",vc="tuple_labeled_element",Iv=-46,yC=67640,ac="declare_type_alias",xd=70750,mC=77808,hl="column",lc="jsx_closing_element",kC=66977,hC="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",_C=65786,pc="function_expression",jt=104,rd=11719,wC=11505,TC="mkdir",SC=70319,wB="Invalid_argument",EC=43738,gC=113817,dc="bigint_literal",AC=70084,PC=126566,ed="do",td=42622,yc="computed_key",mc="pattern_object_property_computed_key",TB="fd ",nd=126571,CC=126619,SB=140,Ao="prototype",EB=208,NC=67004,ud=130,gB=242,AB=">>>=",RC=68863,IC=11726,Ut="raw",OC=64466,xe=107,LC=67679,kc="enum_string_body",MC=244,PB="unreachable jsxtext",CB="*",DC=66335,jC=126570,NB=229,UC=" : file already exists",id=184,BC=67807,YC=70753,hc="boolean_literal",XC=65437,JC=70451,VC=67002,Da=124,_c="conditional",fd=43260,RB="Sys_error",zC=123135,_l="meta",KC=64109,wc="pattern_array_rest_element",ZC=43255,cd=67644,Tc="pattern_object_rest_property_pattern",Sc="sequence",WC=65855,$C=110951,QC=67643,Ec="predicate_expression",je="static",FC=120512,HC="declaration",sd=64317,qC=68437,od=126558,gc="meta_property",GC=11564,Ac="declare_enum",yn="pattern",bC=216,IB=282,OB=289,xN=68191,vd="undefined",ad=8319,ld=120133,rN=132,eN=42239,LB=-99,tN=124927,nN=120092,uN=43137,Pc="component_rest_param",MB=144,DB="expected *",iN=125251,jB="%li",fN=55242,cN=12294,Cc="enum_number_member",Po="in",UB="\\\\",Ov=":",sN=68115,BB="Cygwin",oN=77823,vN=65615,pd=70162,YB="/static/",aN=11519,lN=72966,pN=12686,dN=165,yN=183,wl=129,dd=72192,mN=42964,yd="try",md=120655,kN=11702,XB="expressions",hN=2048,Nc="class_body",_N=55238,JB=240,wN=66915,TN=43311,SN=43018,VB=235,EN=73648,zB="([^/]+)",gN=125258,AN=64829,PN=68735,KB="++",ZB=163,WB="qualification",$B=57343,QB=931,Rc="default_opt",CN=71235,FB=8472,NN=71934,HB=205,qB=218,GB="callee",RN=43711,IN=64284,ON=43754,LN=43790,bB="%Li",Ic="pattern_array_rest_element_pattern",kd="decorators",MN=8304,Oc="statement",hd=73062,Lc="jsx_children",DN=70492,jN=64255,UN=11630,BN=1255,_d=67592,wd=43519,Td=64311,Sd=12539,YN="proto",Ed=120513,XN=68031,Lv="source",Tl="a",JN=93047,VN=92927,zN=126588,KN=73458,ZN=67742,WN=43714,xY=288,rY=236,$N=-253313196,Sl="label",eY="@[<2>{ ",gd=126539,Ad=126552,QN=120487,tY="Out_of_memory",FN=605857695,HN=94026,nY=267,Pd=126496,Co="async",uY=203,Cd=126560,qN=68287,Mc="unary_expression",GN=-26065557,bN=110587,iY=280,Nd=120771,xR=69762,rR=126502,ja="set",Dc="object_",jc="template_literal",eR=43258,Uc="nullable_type",Ds="int_of_string",fY="^=",Ue="predicate",Ua="string",Rd=8450,cY="camlinternalMod.ml",tR=70285,js="+",nR=110575,sY=198,Bc="extends",oY=-692038429,Id=67827,vY=210,aY=227,Od="explicitType",Ld=70452,uR=70497,Ba=63,El="private",iR=64296,fR=67591,cR=92909,lY="T_JSX_TEXT",sR="Fatal error: exception ",oR=120137,Md=68120,Yc="pattern_array_e",vR=119964,aR=92862,lR=66461,pY="&&=",dY=174,o2=8231,Xc="null_literal",yY="/=",pR=66811,Dd=70108,dR=67504,yR=11686,mR=67001,kR=" : flags Open_text and Open_binary are not compatible",hR=43741,_R=66204,G1=8233,Jc="type_annotation_hint",wR=123197,Vc="object_property",mY="${",jd=70480,kY="&&",zc="type_cast",gl="%d",Ud=8484,hY=207,TR=70066,SR=68324,Bd=120713,_Y=135,Yd=126556,re="0",Y2="yield",Xd=126591,ot=100,ER=69551,Kc="jsx_element_name_namespaced",wY=232,Zc="object_key_string_literal",Wc="function_this_param_type",$c="pattern_object_property_pattern",Be="throw",Ye="switch",TY=2048,Jd=119970,Qc="toplevel_statement_list",Ya=250,gR=12438,Fc="class_implements",Hc="variable_declarator",AR=43713,Vd=68096,PR=70457,CR=12538,NR=11734,SY="-=",EY=234,qc="component_param_name",RR=43123,Gc="class_",gY="|",IR=200,OR=43518,LR=8483,bc="jsx_attribute_name_identifier",MR=181;function hZ(x,r,e,t,u){if(t<=r)for(var i=1;i<=u;i++)e[t+i]=x[r+i];else for(var i=u;i>=1;i--)e[t+i]=x[r+i];return 0}function _Z(x){for(var r=[0];x!==0;){for(var e=x[1],t=1;t=e.l||e.t==2&&u>=e.c.length))e.c=x.t==4?zd(x.c,r,u):r==0&&x.c.length==u?x.c:x.c.substr(r,u),e.t=e.c.length==e.l?0:2;else if(e.t==2&&t==e.c.length)e.c+=x.t==4?zd(x.c,r,u):r==0&&x.c.length==u?x.c:x.c.substr(r,u),e.t=e.c.length==e.l?0:2;else{e.t!=4&&Kd(e);var i=x.c,f=e.c;if(x.t==4)if(t<=r)for(var o=0;o=0;o--)f[t+o]=i[r+o];else{for(var a=Math.min(u,i.length-r),o=0;o>=1,x==0)return e;r+=r,t++,t==9&&r.slice(0,1)}}function Zd(x){x.t==2?x.c+=Xa(x.l-x.c.length,"\0"):x.c=zd(x.c,0,x.c.length),x.t=0}function DR(x){if(x.length<24){for(var r=0;rXr)return!1;return!0}else return!/[^\x00-\x7f]/.test(x)}function AY(x){for(var r=hx,e=hx,t,u,i,f,o=0,a=x.length;ohw?(e.substr(0,1),r+=e,e=hx,r+=x.slice(o,d)):e+=x.slice(o,d),d==a)break;o=d}f=1,++o=55295&&f<57344)&&(f=2)):(f=3,++o1114111)&&(f=3)))))),f<4?(o-=f,e+="\uFFFD"):f>fn?e+=String.fromCharCode(55232+(f>>10),KU+(f&1023)):e+=String.fromCharCode(f),e.length>ml&&(e.substr(0,1),r+=e,e=hx)}return r+e}function Bs(x,r,e){this.t=x,this.c=r,this.l=e}Bs.prototype.toString=function(){switch(this.t){case 9:return this.c;default:Zd(this);case 0:if(DR(this.c))return this.t=9,this.c;this.t=8;case 8:return this.c}},Bs.prototype.toUtf16=function(){var x=this.toString();return this.t==9?x:AY(x)},Bs.prototype.slice=function(){var x=this.t==4?this.c.slice():this.c;return new Bs(this.t,x,this.l)};function PY(x){return new Bs(0,x,x.length)}function DN0(x){return x}function xs(x){return PY(x)}function rs(x,r,e,t,u){return Us(xs(x),r,e,t,u),0}function CY(x){var r=p0.process;if(r&&r.env&&r.env[x]!=null)return r.env[x];if(p0.jsoo_static_env&&p0.jsoo_static_env[x])return p0.jsoo_static_env[x]}var jR=0;(function(){var x=CY("OCAMLRUNPARAM");if(x!==void 0)for(var r=x.split(GM),e=0;e>>0>=x.l&&EZ(),Kr(x,r,e)}function oe(x,r){switch(x.t&6){default:if(r>=x.c.length)return 0;case 0:return x.c.charCodeAt(r);case 4:return x.c[r]}}function Ys(x,r){var e=x.l>=0?x.l:x.l=x.length,t=r.length,u=e-t;if(u==0)return x.apply(null,r);if(u<0){var i=x.apply(null,r.slice(0,e));return typeof i!="function"?i:Ys(i,r.slice(e))}else{switch(u){case 1:{var i=function(a){for(var d=new Array(t+1),k=0;k>>0>=x.length-1&&Al(),x}function gZ(x){return isFinite(x)?Math.abs(x)>=22250738585072014e-324?0:x!=0?1:2:isNaN(x)?4:3}function AZ(x){return 0}var PZ=Math.log2&&Math.log2(11235582092889474e291)==1020;function CZ(x){if(PZ)return Math.floor(Math.log2(x));var r=0;if(x==0)return-1/0;if(x>=1)for(;x>=2;)x/=2,r++;else for(;x<1;)x*=2,r--;return r}function BR(x){var r=new Float32Array(1);r[0]=x;var e=new Int32Array(r.buffer);return e[0]|0}var NY=Math.pow(2,-24);function RY(x){throw x}function IY(){RY(X2.Division_by_zero)}function fr(x,r,e){this.lo=x&Ni,this.mi=r&Ni,this.hi=e&fn}fr.prototype.caml_custom="_j",fr.prototype.copy=function(){return new fr(this.lo,this.mi,this.hi)},fr.prototype.ucompare=function(x){return this.hi>x.hi?1:this.hix.mi?1:this.mix.lo?1:this.loe?1:rx.mi?1:this.mix.lo?1:this.lo>24),e=-this.hi+(r>>24);return new fr(x,r,e)},fr.prototype.add=function(x){var r=this.lo+x.lo,e=this.mi+x.mi+(r>>24),t=this.hi+x.hi+(e>>24);return new fr(r,e,t)},fr.prototype.sub=function(x){var r=this.lo-x.lo,e=this.mi-x.mi+(r>>24),t=this.hi-x.hi+(e>>24);return new fr(r,e,t)},fr.prototype.mul=function(x){var r=this.lo*x.lo,e=(r*NY|0)+this.mi*x.lo+this.lo*x.mi,t=(e*NY|0)+this.hi*x.lo+this.mi*x.mi+this.lo*x.hi;return new fr(r,e,t)},fr.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0},fr.prototype.isNeg=function(){return this.hi<<16<0},fr.prototype.and=function(x){return new fr(this.lo&x.lo,this.mi&x.mi,this.hi&x.hi)},fr.prototype.or=function(x){return new fr(this.lo|x.lo,this.mi|x.mi,this.hi|x.hi)},fr.prototype.xor=function(x){return new fr(this.lo^x.lo,this.mi^x.mi,this.hi^x.hi)},fr.prototype.shift_left=function(x){return x=x&63,x==0?this:x<24?new fr(this.lo<>24-x,this.hi<>24-x):x<48?new fr(0,this.lo<>48-x):new fr(0,0,this.lo<>x|this.mi<<24-x,this.mi>>x|this.hi<<24-x,this.hi>>x):x<48?new fr(this.mi>>x-24|this.hi<<48-x,this.hi>>x-24,0):new fr(this.hi>>x-48,0,0)},fr.prototype.shift_right=function(x){if(x=x&63,x==0)return this;var r=this.hi<<16>>16;if(x<24)return new fr(this.lo>>x|this.mi<<24-x,this.mi>>x|r<<24-x,this.hi<<16>>x>>>16);var e=this.hi<<16>>31;return x<48?new fr(this.mi>>x-24|this.hi<<48-x,this.hi<<16>>x-24>>16,e&fn):new fr(this.hi<<16>>x-32,e,e)},fr.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23,this.mi=(this.mi<<1|this.lo>>23)&Ni,this.lo=this.lo<<1&Ni},fr.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&Ni,this.mi=(this.mi>>>1|this.hi<<23)&Ni,this.hi=this.hi>>>1},fr.prototype.udivmod=function(x){for(var r=0,e=this.copy(),t=x.copy(),u=new fr(0,0,0);e.ucompare(t)>0;)r++,t.lsl1();for(;r>=0;)r--,u.lsl1(),e.ucompare(t)>=0&&(u.lo++,e=e.sub(t)),t.lsr1();return{quotient:u,modulus:e}},fr.prototype.div=function(x){var r=this;x.isZero()&&IY();var e=r.hi^x.hi;r.hi&ln&&(r=r.neg()),x.hi&ln&&(x=x.neg());var t=r.udivmod(x).quotient;return e&ln&&(t=t.neg()),t},fr.prototype.mod=function(x){var r=this;x.isZero()&&IY();var e=r.hi;r.hi&ln&&(r=r.neg()),x.hi&ln&&(x=x.neg());var t=r.udivmod(x).modulus;return e&ln&&(t=t.neg()),t},fr.prototype.toInt=function(){return this.lo|this.mi<<24},fr.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo},fr.prototype.toArray=function(){return[this.hi>>8,this.hi&Ls,this.mi>>16,this.mi>>8&Ls,this.mi&Ls,this.lo>>16,this.lo>>8&Ls,this.lo&Ls]},fr.prototype.lo32=function(){return this.lo|(this.mi&Ls)<<24},fr.prototype.hi32=function(){return this.mi>>>8&fn|this.hi<<16};function Wd(x,r,e){return new fr(x,r,e)}function $d(x){if(!isFinite(x))return isNaN(x)?Wd(1,0,YU):x>0?Wd(0,0,YU):Wd(0,0,65520);var r=x==0&&1/x==-1/0?ln:x>=0?0:ln;r&&(x=-x);var e=CZ(x)+1023;e<=0?(e=0,x/=Math.pow(2,-eB)):(x/=Math.pow(2,e-cD),x<16&&(x*=2,e-=1),e==0&&(x/=2));var t=Math.pow(2,24),u=x|0;x=(x-u)*t;var i=x|0;x=(x-i)*t;var f=x|0;return u=u&tC|r|e<<4,Wd(f,i,u)}function Pl(x){return x.toArray()}function OY(x,r,e){if(x.write(32,r.dims.length),x.write(32,r.kind|r.layout<<8),r.caml_custom==lp)for(var t=0;t>4;if(u==mj)return r|e|t&tC?NaN:t&ln?-1/0:1/0;var i=Math.pow(2,-24),f=(r*i+e)*i+(t&tC);return u>0?(f+=16,f*=Math.pow(2,u-cD)):f*=Math.pow(2,-eB),t&ln&&(f=-f),f}function JR(x){for(var r=x.length,e=1,t=0;t>>24&Ls|(r&fn)<<8,r>>>16&fn)}function VR(x){return x.hi32()}function zR(x){return x.lo32()}var IZ=lp;function No(x,r,e,t){this.kind=x,this.layout=r,this.dims=e,this.data=t}No.prototype.caml_custom=IZ,No.prototype.offset=function(x){var r=0;if(typeof x=="number"&&(x=[x]),x instanceof Array||b1("bigarray.js: invalid offset"),this.dims.length!=x.length&&b1("Bigarray.get/set: bad number of dimensions"),this.layout==0)for(var e=0;e=this.dims[e])&&Al(),r=r*this.dims[e]+x[e];else for(var e=this.dims.length-1;e>=0;e--)(x[e]<1||x[e]>this.dims[e])&&Al(),r=r*this.dims[e]+(x[e]-1);return r},No.prototype.get=function(x){switch(this.kind){case 7:var r=this.data[x*2+0],e=this.data[x*2+1];return RZ(r,e);case 10:case 11:var t=this.data[x*2+0],u=this.data[x*2+1];return[La,t,u];default:return this.data[x]}},No.prototype.set=function(x,r){switch(this.kind){case 7:this.data[x*2+0]=zR(r),this.data[x*2+1]=VR(r);break;case 10:case 11:this.data[x*2+0]=r[1],this.data[x*2+1]=r[2];break;default:this.data[x]=r;break}return 0},No.prototype.fill=function(x){switch(this.kind){case 7:var r=zR(x),e=VR(x);if(r==e)this.data.fill(r);else for(var t=0;tf)return 1;if(i!=f){if(!r)return NaN;if(i==i)return 1;if(f==f)return-1}}break;case 7:for(var u=0;ux.data[u+1])return 1;if(this.data[u]>>>0>>0)return-1;if(this.data[u]>>>0>x.data[u]>>>0)return 1}break;case 2:case 3:case 4:case 5:case 6:case 8:case 9:case 12:for(var u=0;ux.data[u])return 1}break}return 0};function Va(x,r,e,t){this.kind=x,this.layout=r,this.dims=e,this.data=t}Va.prototype=new No,Va.prototype.offset=function(x){return typeof x!="number"&&(x instanceof Array&&x.length==1?x=x[0]:b1("Ml_Bigarray_c_1_1.offset")),(x<0||x>=this.dims[0])&&Al(),x},Va.prototype.get=function(x){return this.data[x]},Va.prototype.set=function(x,r){return this.data[x]=r,0},Va.prototype.fill=function(x){return this.data.fill(x),0};function MY(x,r,e,t){var u=LY(x);return JR(e)*u!=t.length&&b1("length doesn't match dims"),r==0&&e.length==1&&u==1?new Va(x,r,e,t):new No(x,r,e,t)}function J2(x){X2.Failure||(X2.Failure=[qr,ew,-3]),UR(X2.Failure,x)}function DY(x,r,e){var t=x.read32s();(t<0||t>16)&&J2("input_value: wrong number of bigarray dimensions");var u=x.read32s(),i=u&Ls,f=u>>8&1,o=[];if(e==lp)for(var a=0;a>>32-15,r=UY(r,461845907),x^=r,x=x<<13|x>>>32-13,(x+(x<<2)|0)+-430675100|0}function OZ(x,r){return x=Xs(x,zR(r)),x=Xs(x,VR(r)),x}function BY(x,r){return OZ(x,$d(r))}function YY(x){var r=JR(x.dims),e=0;switch(x.kind){case 2:case 3:case 12:r>q3&&(r=q3);var t=0,u=0;for(u=0;u+4<=x.data.length;u+=4)t=x.data[u+0]|x.data[u+1]<<8|x.data[u+2]<<16|x.data[u+3]<<24,e=Xs(e,t);switch(t=0,r&3){case 3:t=x.data[u+2]<<16;case 2:t|=x.data[u+1]<<8;case 1:t|=x.data[u+0],e=Xs(e,t)}break;case 4:case 5:r>h1&&(r=h1);var t=0,u=0;for(u=0;u+2<=x.data.length;u+=2)t=x.data[u+0]|x.data[u+1]<<16,e=Xs(e,t);r&1&&(e=Xs(e,x.data[u]));break;case 6:r>64&&(r=64);for(var u=0;u64&&(r=64);for(var u=0;u32&&(r=32),r*=2;for(var u=0;u64&&(r=64);for(var u=0;u32&&(r=32);for(var u=0;u0?u(r,x,t):u(x,r,t);if(t&&i!=i)return e;if(+i!=+i)return+i;if(i|0)return i|0}return e}function ZR(x){return typeof x=="string"&&!/[^\x00-\xff]/.test(x)}function WR(x){return x instanceof Bs}function VY(x){if(typeof x=="number")return vl;if(WR(x))return Av;if(ZR(x))return 1252;if(x instanceof Array&&x[0]===x[0]>>>0&&x[0]<=Q3){var r=x[0]|0;return r==La?0:r}else{if(x instanceof String)return wD;if(typeof x=="string")return wD;if(x instanceof Number)return vl;if(x&&x.caml_custom)return BN;if(x&&x.compare)return 1256;if(typeof x=="function")return 1247;if(typeof x=="symbol")return 1251}return 1001}function Bt(x,r){return xr?1:0}function YZ(x,r){return x.t&6&&Zd(x),r.t&6&&Zd(r),x.cr.c?1:0}function Qd(x,r,e){for(var t=[];;){if(!(e&&x===r)){var u=VY(x);if(u==Ya){x=x[1];continue}var i=VY(r);if(i==Ya){r=r[1];continue}if(u!==i)return u==vl?i==BN?JY(x,r,-1,e):-1:i==vl?u==BN?JY(r,x,1,e):1:ur)return 1;if(x!=r){if(!e)return NaN;if(x==x)return 1;if(r==r)return-1}break;case 1001:if(xr)return 1;if(x!=r){if(!e)return NaN;if(x==x)return 1;if(r==r)return-1}break;case 1251:if(x!==r)return e?1:NaN;break;case 1252:var x=x,r=r;if(x!==r){if(xr)return 1}break;case 12520:var x=x.toString(),r=r.toString();if(x!==r){if(xr)return 1}break;case 246:case 254:default:if(AZ(u)){b1("compare: continuation value");break}if(x.length!=r.length)return x.length1&&t.push(x,r,1);break}}if(t.length==0)return 0;var a=t.pop();r=t.pop(),x=t.pop(),a+10)if(r==0&&(e>=x.l||x.t==2&&e>=x.c.length))t==0?(x.c=hx,x.t=2):(x.c=Xa(e,String.fromCharCode(t)),x.t=e==x.l?0:2);else for(x.t!=4&&Kd(x),e+=r;r0&&r===r||(x=x.replace(/_/g,hx),r=+x,x.length>0&&r===r||/^[+-]?nan$/i.test(x)))return r;var e=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)(p([+-]?[0-9]+))?/i.exec(x);if(e){var t=e[3].replace(/0+$/,hx),u=parseInt(e[1]+e[2]+t,16),i=(e[5]|0)-4*t.length;return r=u*Math.pow(2,i),r}if(/^\+?inf(inity)?$/i.test(x))return 1/0;if(/^-inf(inity)?$/i.test(x))return-1/0;J2("float_of_string")}function QR(x){x=x;var r=x.length;r>31&&b1("format_int: format too long");for(var e={justify:js,signstyle:Mt,filler:Dt,alternate:!1,base:0,signedconv:!1,width:0,uppercase:!1,sign:1,prec:-1,conv:uB},t=0;t=0&&u<=9;)e.width=e.width*10+u,t++;t--;break;case".":for(e.prec=0,t++;u=x.charCodeAt(t)-48,u>=0&&u<=9;)e.prec=e.prec*10+u,t++;t--;case"d":case"i":e.signedconv=!0;case"u":e.base=10;break;case"x":e.base=16;break;case"X":e.base=16,e.uppercase=!0;break;case"o":e.base=8;break;case"e":case"f":case"g":e.signedconv=!0,e.conv=u;break;case"E":case"F":case"G":e.signedconv=!0,e.uppercase=!0,e.conv=u.toLowerCase();break}}return e}function FR(x,r){x.uppercase&&(r=r.toUpperCase());var e=r.length;x.signedconv&&(x.sign<0||x.signstyle!=Mt)&&e++,x.alternate&&(x.base==8&&(e+=1),x.base==16&&(e+=2));var t=hx;if(x.justify==js&&x.filler==Dt)for(var u=e;u20?(g-=20,k/=Math.pow(10,g),k+=new Array(g+1).join(re),T>0&&(k=k+ic+new Array(T+1).join(re)),k):k.toFixed(T)}var t,u=QR(x),i=u.prec<0?6:u.prec;if((r<0||r==0&&1/r==-1/0)&&(u.sign=-1,r=-r),isNaN(r))t=Zk,u.filler=Dt;else if(!isFinite(r))t="inf",u.filler=Dt;else switch(u.conv){case"e":var t=r.toExponential(i),f=t.length;t.charAt(f-3)==wh&&(t=t.slice(0,f-1)+re+t.slice(f-1));break;case"f":t=e(r,i);break;case"g":i=i||1,t=r.toExponential(i-1);var o=t.indexOf(wh),a=+t.slice(o+1);if(a<-4||r>=1e21||r.toFixed(0).length>i){for(var f=o-1;t.charAt(f)==re;)f--;t.charAt(f)==ic&&f--,t=t.slice(0,f+1)+t.slice(o),f=t.length,t.charAt(f-3)==wh&&(t=t.slice(0,f-1)+re+t.slice(f-1));break}else{var d=i;if(a<0)d-=a+1,t=r.toFixed(d);else for(;t=r.toFixed(d),t.length>i+1;)d--;if(d){for(var f=t.length-1;t.charAt(f)==re;)f--;t.charAt(f)==ic&&f--,t=t.slice(0,f+1)}}break}return FR(u,t)}function Fd(x,r){if(x==gl)return hx+r;var e=QR(x);r<0&&(e.signedconv?(e.sign=-1,r=-r):r>>>=0);var t=r.toString(e.base);if(e.prec>=0){e.filler=Dt;var u=e.prec-t.length;u>0&&(t=Xa(u,re)+t)}return FR(e,t)}var KY=0;function Js(){return KY++}function ZY(){return[0]}var Hd=[];function Gx(x,r,e){var t=x[1],u=Hd[e];if(u===void 0)for(var i=Hd.length;i>1|1,rhw?(e.substr(0,1),r+=e,e=hx,r+=x.slice(i,o)):e+=x.slice(i,o),o==f)break;i=o}t>6),e+=String.fromCharCode(on|t&Ba)):t<55296||t>=$B?e+=String.fromCharCode(cB|t>>12,on|t>>6&Ba,on|t&Ba):t>=56319||i+1==f||(u=x.charCodeAt(i+1))$B?e+="\xEF\xBF\xBD":(i++,t=(t<<10)+u-56613888,e+=String.fromCharCode(JB|t>>18,on|t>>12&Ba,on|t>>6&Ba,on|t&Ba)),e.length>ml&&(e.substr(0,1),r+=e,e=hx)}return r+e}function Yt(x){return DR(x)?x:VZ(x)}function zZ(x,r,e){if(!isFinite(x))return isNaN(x)?Yt(Zk):Yt(x>0?jj:"-infinity");var t=x==0&&1/x==-1/0?1:x>=0?0:1;t&&(x=-x);var u=0;if(x!=0)if(x<1)for(;x<1&&u>-1022;)x*=2,u--;else for(;x>=2;)x/=2,u++;var i=u<0?hx:js,f=hx;if(t)f=Mt;else switch(e){case 43:f=js;break;case 32:f=Dt;break;default:break}if(r>=0&&r<13){var o=Math.pow(2,r*4);x=Math.round(x*o)/o}var a=x.toString(16);if(r>=0){var d=a.indexOf(ic);if(d<0)a+=ic+Xa(r,re);else{var k=d+1+r;a.length>24&Ni,x>>31&fn)}function ZZ(x){return x.toInt()}function WZ(x){return+x.isNeg()}function qR(x){return x.neg()}function $Z(x,r){var e=QR(x);e.signedconv&&WZ(r)&&(e.sign=-1,r=qR(r));var t=hx,u=qd(e.base),i="0123456789abcdef";do{var f=r.udivmod(u);r=f.quotient,t=i.charAt(ZZ(f.modulus))+t}while(!KZ(r));if(e.prec>=0){e.filler=Dt;var o=e.prec-t.length;o>0&&(t=Xa(o,re)+t)}return FR(e,t)}function Xx(x){return x.length}function fx(x,r){return x.charCodeAt(r)}function QZ(x,r){return x.add(r)}function FZ(x,r){return x.mul(r)}function GR(x,r){return x.ucompare(r)<0}function WY(x){var r=0,e=Xx(x),t=10,u=1;if(e>0)switch(fx(x,r)){case 45:r++,u=-1;break;case 43:r++,u=1;break}if(r+1=48&&x<=57?x-48:x>=65&&x<=90?x-55:x>=97&&x<=br?x-87:-1}function Rl(x){var r=WY(x),e=r[0],t=r[1],u=r[2],i=qd(u),f=new fr(Ni,268435455,fn).udivmod(i).quotient,o=fx(x,e),a=Gd(o);(a<0||a>=u)&&J2(Ds);for(var d=qd(a);;)if(e++,o=fx(x,e),o!=95){if(a=Gd(o),a<0||a>=u)break;GR(f,d)&&J2(Ds),a=qd(a),d=QZ(FZ(i,d),a),GR(d,a)&&J2(Ds)}return e!=Xx(x)&&J2(Ds),u==10&&GR(new fr(0,0,ln),d)&&J2(Ds),t<0&&(d=qR(d)),d}function bd(x){return x.toFloat()}function vt(x){var r=WY(x),e=r[0],t=r[1],u=r[2],i=Xx(x),f=-1>>>0,o=e=u)&&J2(Ds);var d=a;for(e++;e=u)break;d=u*d+a,d>f&&J2(Ds)}return e!=i&&J2(Ds),d=t*d,u==10&&(d|0)!=d&&J2(Ds),d|0}function HZ(x){return x.slice(1)}function xr(x){return DR(x)?x:AY(x)}function qZ(x){for(var r={},e=1;e=0?x.l:x.l=x.length}function bZ(x){return function(){for(var r=GZ(x),e=new Array(r),t=0;t1&&t.pop();break;case".":break;case"":break;default:t.push(e[u]);break}return t.unshift(r[0]),t.orig=x,t}var uW=["E2BIG","EACCES","EAGAIN",JT,"EBUSY","ECHILD","EDEADLK","EDOM",vU,"EFAULT","EFBIG","EINTR","EINVAL","EIO","EISDIR","EMFILE","EMLINK","ENAMETOOLONG","ENFILE","ENODEV",HS,"ENOEXEC","ENOLCK","ENOMEM","ENOSPC","ENOSYS",lh,tD,"ENOTTY","ENXIO","EPERM","EPIPE","ERANGE","EROFS","ESPIPE","ESRCH","EXDEV","EWOULDBLOCK","EINPROGRESS","EALREADY","ENOTSOCK","EDESTADDRREQ","EMSGSIZE","EPROTOTYPE","ENOPROTOOPT","EPROTONOSUPPORT","ESOCKTNOSUPPORT","EOPNOTSUPP","EPFNOSUPPORT","EAFNOSUPPORT","EADDRINUSE","EADDRNOTAVAIL","ENETDOWN","ENETUNREACH","ENETRESET","ECONNABORTED","ECONNRESET","ENOBUFS","EISCONN","ENOTCONN","ESHUTDOWN","ETOOMANYREFS","ETIMEDOUT","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","ELOOP","EOVERFLOW"];function zs(x,r,e,t){var u=uW.indexOf(x);u<0&&(t==null&&(t=-9999),u=[0,t]);var i=[u,Yt(r||hx),Yt(e||hx)];return i}var HY={};function Ro(x){return HY[x]}function Ks(x,r){throw q0([0,x].concat(r))}function xI(x){return x instanceof Uint8Array||(x=new Uint8Array(x)),new Bs(4,x,x.length)}function qY(x){Or(x+pp)}function ee(x){this.data=x}ee.prototype=new $Y,ee.prototype.constructor=ee,ee.prototype.truncate=function(x){var r=this.data;this.data=S1(x|0),Us(r,0,this.data,0,x)},ee.prototype.length=function(){return at(this.data)},ee.prototype.write=function(x,r,e,t){var u=this.length();if(x+t>=u){var i=S1(x+t),f=this.data;this.data=i,Us(f,0,this.data,0,u)}return Us(xI(r),e,this.data,x,t),0},ee.prototype.read=function(x,r,e,t){var u=this.length();if(x+t>=u&&(t=u-x),t){var i=S1(t|0);Us(this.data,x,i,0,t),r.set(QY(i),e)}return t};function Mv(x,r,e){this.file=r,this.name=x,this.flags=e}Mv.prototype.err_closed=function(){Or(this.name+pj)},Mv.prototype.length=function(){if(this.file)return this.file.length();this.err_closed()},Mv.prototype.write=function(x,r,e,t){if(this.file)return this.file.write(x,r,e,t);this.err_closed()},Mv.prototype.read=function(x,r,e,t){if(this.file)return this.file.read(x,r,e,t);this.err_closed()},Mv.prototype.close=function(){this.file=void 0};function d2(x,r){this.content={},this.root=x,this.lookupFun=r}d2.prototype.nm=function(x){return this.root+x},d2.prototype.create_dir_if_needed=function(x){for(var r=x.split(G2),e=hx,t=0;t0&&e>=0&&e+t<=r.length&&r[e+t-1]==10&&t--;var u=S1(t);return Us(xI(r),e,u,0,t),this.log(u.toUtf16()),0}Or(this.fd+pj)},Ll.prototype.read=function(x,r,e,t){Or(this.fd+": file descriptor is write only")},Ll.prototype.close=function(){this.log=void 0};function ty(x,r){return r==null&&(r=ry.length),ry[r]=x,r|0}function BN0(x,r,e){for(var t={};r;){switch(r[1]){case 0:t.rdonly=1;break;case 1:t.wronly=1;break;case 2:t.append=1;break;case 3:t.create=1;break;case 4:t.truncate=1;break;case 5:t.excl=1;break;case 6:t.binary=1;break;case 7:t.text=1;break;case 8:t.nonblock=1;break}r=r[2]}t.rdonly&&t.wronly&&Or(x+iS),t.text&&t.binary&&Or(x+kR);var u=iW(x),i=u.device.open(u.rest,t);return ty(i,void 0)}(function(){function x(r,e){return Il()?eW(r,e):new Ll(r,e)}ty(x(0,{rdonly:1,altname:"/dev/stdin",isCharacterDevice:!0}),0),ty(x(1,{buffered:2,wronly:1,isCharacterDevice:!0}),1),ty(x(2,{buffered:2,wronly:1,isCharacterDevice:!0}),2)})();function fW(x){var r=ry[x];r.flags.wronly&&Or(TB+x+" is writeonly");var e=null,t={file:r,offset:r.flags.append?r.length():0,fd:x,opened:!0,out:!1,buffer_curr:0,buffer_max:0,buffer:new Uint8Array(fl),refill:e};return Vs[t.fd]=t,t.fd}function bY(x){var r=ry[x];r.flags.rdonly&&Or(TB+x+" is readonly");var e=r.flags.buffered!==void 0?r.flags.buffered:1,t={file:r,offset:r.flags.append?r.length():0,fd:x,opened:!0,out:!0,buffer_curr:0,buffer:new Uint8Array(fl),buffered:e};return Vs[t.fd]=t,t.fd}function cW(){for(var x=0,r=0;ru.buffer.length){var f=new Uint8Array(u.buffer_curr+i.length);f.set(u.buffer),u.buffer=f}switch(u.buffered){case 0:u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,es(x);break;case 1:u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,u.buffer_curr>=u.buffer.length&&es(x);break;case 2:var o=i.lastIndexOf(10);o<0?(u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,u.buffer_curr>=u.buffer.length&&es(x)):(u.buffer.set(i.subarray(0,o+1),u.buffer_curr),u.buffer_curr+=o+1,es(x),u.buffer.set(i.subarray(o+1),u.buffer_curr),u.buffer_curr+=i.length-o-1);break}return 0}function rI(x,r,e,t){return sW(x,xs(r),e,t)}function xX(x,r){var e=String.fromCharCode(r);return rI(x,e,0,1),0}function Ml(x,r){return+(Qd(x,r,!1)!=0)}function eI(x,r){var e=new Array(r+1);e[0]=x;for(var t=1;t<=r;t++)e[t]=0;return e}function oW(x,r){return x[0]=Ya,x[1]=r,0}function Dv(x){return x instanceof Array&&x[0]==x[0]>>>0?x[0]:WR(x)||ZR(x)?Av:x instanceof Function||typeof x=="function"?b8:x&&x.caml_custom?Q3:vl}function vW(x){for(var r;x;)if(xr(x[1][1])=="SYJS"){r=x[1][2];break}else x=x[2];var e={};if(r)for(var t=1;t=0?x=u:J2("caml_register_global: cannot locate "+t)}}X2[x+1]=r,e&&(X2[e]=r)}function tI(x,r){return HY[x]=r,0}function aW(x){return x[2]=KY++,x}function Ar(x,r){return x===r?1:0}function lW(){b1(ag)}function O1(x,r){return r>>>0>=Xx(x)&&lW(),fx(x,r)}function P(x,r){return 1-Ar(x,r)}function pW(){return 2147483647/4|0}var dW=p0.process&&p0.process.platform&&p0.process.platform==Cj?BB:"Unix";function yW(){return[0,dW,32,0]}function mW(){RY(X2.Not_found)}function rX(x){var r=CY(xr(x));return r===void 0&&mW(),Yt(r)}function nI(x){for(var r=1;x&&x.joo_tramp;)x=x.joo_tramp.apply(null,x.joo_args),r++;return x}function y2(x,r){return{joo_tramp:x,joo_args:r}}function I0(x,r){if(typeof r=="function")return x.fun=r,0;if(r.fun)return x.fun=r.fun,0;for(var e=r.length;e--;)x[e]=r[e];return 0}function L1(x){{if(x instanceof Array)return x;var r;return p0.RangeError&&x instanceof p0.RangeError&&x.message&&x.message.match(/maximum call stack/i)||p0.InternalError&&x instanceof p0.InternalError&&x.message&&x.message.match(/too much recursion/i)?r=X2.Stack_overflow:x instanceof p0.Error&&Ro(YE)?r=[0,Ro(YE),x]:r=[0,X2.Failure,Yt(String(x))],x instanceof p0.Error&&(r.js_error=x),r}}function kW(x){switch(x[2]){case-8:case-11:case-12:return 1;default:return 0}}function hW(x){var r=hx;if(x[0]==0){if(r+=x[1][1],x.length==3&&x[2][0]==0&&kW(x[1]))var t=x[2],e=1;else var e=2,t=x;r+=WM;for(var u=e;ue&&(r+=WD);var i=t[u];typeof i=="number"?r+=i.toString():i instanceof Bs||typeof i=="string"?r+=s5+i.toString()+s5:r+=Na}r+=ZS}else x[0]==qr&&(r+=x[1]);return r}function eX(x){if(x instanceof Array&&(x[0]==0||x[0]==qr)){var r=Ro(kD);if(r)xy(r,[x,!1]);else{var e=hW(x),t=Ro(cj);if(t&&xy(t,[0]),console.error(sR+e+` -`),x.js_error)throw x.js_error}}else throw x}function _W(){var x=p0.process;x&&x.on?x.on("uncaughtException",function(r,e){eX(r),x.exit(2)}):p0.addEventListener&&p0.addEventListener("error",function(r){r.error&&eX(r.error)})}_W();function l(x,r){return(x.l>=0?x.l:x.l=x.length)==1?x(r):Ys(x,[r])}function p(x,r,e){return(x.l>=0?x.l:x.l=x.length)==2?x(r,e):Ys(x,[r,e])}function G0(x,r,e,t){return(x.l>=0?x.l:x.l=x.length)==3?x(r,e,t):Ys(x,[r,e,t])}function ve(x,r,e,t,u){return(x.l>=0?x.l:x.l=x.length)==4?x(r,e,t,u):Ys(x,[r,e,t,u])}function Xe(x,r,e,t,u,i){return(x.l>=0?x.l:x.l=x.length)==5?x(r,e,t,u,i):Ys(x,[r,e,t,u,i])}function wW(x,r,e,t,u,i,f,o){return(x.l>=0?x.l:x.l=x.length)==7?x(r,e,t,u,i,f,o):Ys(x,[r,e,t,u,i,f,o])}var uI=[qr,tY,-1],tX=[qr,RB,-2],kn=[qr,ew,-3],iI=[qr,wB,-4],P2=[qr,Oj,-7],nX=[qr,$U,-8],uX=[qr,NU,-9],wr=[qr,rD,-11],Dl=[qr,bU,-12],TW=[4,0,0,0,[12,45,[4,0,0,0,0]]],fI=[0,[11,'File "',[2,0,[11,'", line ',[4,0,0,0,[11,EU,[4,0,0,0,[12,45,[4,0,0,0,[11,": ",[2,0,0]]]]]]]]]],'File "%s", line %d, characters %d-%d: %s'],Za=[0,0,[0,0,0],[0,0,0]],jl=[0,0,0,0,1,0,0,0],iX=[0,"first_leading","last_trailing"],fX=[0,Cf,Df,ai,_7,Mf,b7,Ui,Su,dc,Y7,$i,jf,cn,$u,hc,Me,I7,tu,vf,Gf,N7,yi,Gc,Nc,n7,df,K7,Au,Wi,tf,Fc,F7,Ru,Si,sf,Ci,di,nc,Gi,au,d7,qc,W7,Gu,cf,Pc,hi,lf,xc,Hn,yc,_c,ef,Ie,Oe,zu,Tf,Ac,Ki,T7,Bf,Zu,cc,kf,ac,If,Rc,Mi,se,Xi,t7,yf,nf,Cu,c7,ju,Vi,of,Cc,kc,Mu,Vu,af,w7,bn,Nf,m7,Qf,Z7,q1,Ti,xi,Gn,$7,y7,Yf,gf,G7,cu,Yi,Yu,Nu,pu,bu,oc,eu,zn,pc,S7,$n,B7,ti,ei,Uf,ii,wf,Kn,Ai,Wc,Hi,wu,gi,ku,Iu,Rt,g7,s7,P7,j2,Ei,ou,Ku,p7,hf,yu,$f,O7,b2,ni,r7,Kf,Zi,lu,bc,iu,_u,Vn,zi,Qu,Lc,lc,i7,Ef,Eu,ci,Kc,li,U7,o7,uu,qn,ec,rc,rf,fc,X7,Xu,Qn,ji,j7,Zn,vu,uf,ur,v7,pi,Bu,gc,ri,a7,Xc,Uc,Wu,Dc,Q7,Af,L7,Bi,Jf,qf,su,bi,Zc,pf,Vc,f7,vi,Pf,oi,sc,mi,nu,uc,u7,Fu,Of,yn,Yc,Lu,z7,wc,Ic,R7,H7,Ju,l7,h7,Ji,Du,mc,tc,fu,Wf,$c,gu,zf,Tc,mu,Ue,Ec,du,Uu,Tu,xf,D7,k7,De,Sc,qu,M7,Oc,Fi,qi,E7,ff,Ye,Ou,xu,Xf,Sf,jc,Oi,Rf,Be,Qc,mf,Qi,Pu,vc,Fn,x7,Pi,Ff,wi,Jc,A7,zc,_i,Wn,V7,Ii,bf,Hf,ru,C7,J7,ki,Hu,Mc,e7,q7,ui,Hc,Li,B2,Vf,_f,si,Y2],hn=[0,0,0];Xt(11,Dl,bU),Xt(10,wr,rD),Xt(9,[qr,Bj,JD],Bj),Xt(8,uX,NU),Xt(7,nX,$U),Xt(6,P2,Oj),Xt(5,[qr,aj,-6],aj),Xt(4,[qr,hD,-5],hD),Xt(3,iI,wB),Xt(2,kn,ew),Xt(1,tX,RB),Xt(0,uI,tY);var SW="output_substring",EW=ic,gW=Cs,AW=Is,PW="CamlinternalLazy.Undefined",CW=UB,NW="\\'",RW="\\b",IW="\\t",OW="\\n",LW="\\r",MW="List.iter2",DW="tl",jW="hd",UW="String.blit / Bytes.blit_string",BW="Bytes.blit",YW="String.sub / Bytes.sub",XW="String.concat",JW="Array.blit",VW="Array.sub",zW="Map.remove_min_elt",KW=[0,0,0,0],ZW=[0,"map.ml",400,10],WW=[0,0,0],$W=F4,QW=F4,FW=F4,HW=F4,qW="Stdlib.Queue.Empty",GW="Buffer.add_substring/add_subbytes",bW="Buffer.add: cannot grow buffer",x$=[0,lD,93,2],r$=[0,lD,94,2],e$="Buffer.sub",t$="%c",n$="%s",u$=HM,i$=jB,f$=Aj,c$=bB,s$="%f",o$="%B",v$="%{",a$="%}",l$="%(",p$="%)",d$=Zj,y$="%t",m$="%?",k$="%r",h$="%_r",_$=[0,f2,850,23],w$=[0,f2,814,21],T$=[0,f2,815,21],S$=[0,f2,818,21],E$=[0,f2,819,21],g$=[0,f2,822,19],A$=[0,f2,823,19],P$=[0,f2,826,22],C$=[0,f2,827,22],N$=[0,f2,831,30],R$=[0,f2,832,30],I$=[0,f2,836,26],O$=[0,f2,837,26],L$=[0,f2,846,28],M$=[0,f2,847,28],D$=[0,f2,851,23],j$=[0,f2,1558,4],U$="Printf: bad conversion %[",B$=[0,f2,1626,39],Y$=[0,f2,1649,31],X$=[0,f2,1650,31],J$="Printf: bad conversion %_",V$=qU,z$=Pj,K$=qU,Z$=Pj,W$=[0,[11,"invalid box description ",[3,0,0]],"invalid box description %S"],$$=[0,0,4],Q$=Zk,F$="neg_infinity",H$=jj,q$=ic,G$=[0,nn],b$="%+nd",xQ="% nd",rQ="%+ni",eQ="% ni",tQ="%nx",nQ="%#nx",uQ="%nX",iQ="%#nX",fQ="%no",cQ="%#no",sQ="%nd",oQ=Aj,vQ="%nu",aQ="%+ld",lQ="% ld",pQ="%+li",dQ="% li",yQ="%lx",mQ="%#lx",kQ="%lX",hQ="%#lX",_Q="%lo",wQ="%#lo",TQ="%ld",SQ=jB,EQ="%lu",gQ="%+Ld",AQ="% Ld",PQ="%+Li",CQ="% Li",NQ="%Lx",RQ="%#Lx",IQ="%LX",OQ="%#LX",LQ="%Lo",MQ="%#Lo",DQ="%Ld",jQ=bB,UQ="%Lu",BQ="%+d",YQ="% d",XQ="%+i",JQ="% i",VQ="%x",zQ="%#x",KQ="%X",ZQ="%#X",WQ="%o",$Q="%#o",QQ=gl,FQ=HM,HQ=lU,qQ=pa,GQ="@}",bQ="@?",xF=`@ -`,rF="@.",eF="@@",tF="@%",nF=Nj,uF="CamlinternalFormat.Type_mismatch",iF=hx,fF=[0,[11,WD,[2,0,[2,0,0]]],", %s%s"],cF=[0,[11,sR,[2,0,[12,10,0]]],RU],sF=[0,[11,"Fatal error in uncaught exception handler: exception ",[2,0,[12,10,0]]],`Fatal error in uncaught exception handler: exception %s -`],oF="Fatal error: out of memory in uncaught exception handler",vF=[0,[11,sR,[2,0,[12,10,0]]],RU],aF=[0,[2,0,[12,10,0]],`%s -`],lF="Raised at",pF="Re-raised at",dF="Raised by primitive operation at",yF="Called from",mF=" (inlined)",kF=hx,hF=[0,[2,0,[12,32,[2,0,[11,' in file "',[2,0,[12,34,[2,0,[11,", line ",[4,0,0,0,[11,EU,TW]]]]]]]]]],'%s %s in file "%s"%s, line %d, characters %d-%d'],_F=[0,[2,0,[11," unknown location",0]],"%s unknown location"],wF="Out of memory",TF="Stack overflow",SF="Pattern matching failed",EF="Assertion failed",gF="Undefined recursive module",AF=[0,[12,40,[2,0,[2,0,[12,41,0]]]],"(%s%s)"],PF=hx,CF=hx,NF=[0,[12,40,[2,0,[12,41,0]]],"(%s)"],RF=[0,[4,0,0,0,0],gl],IF=[0,[3,0,0],K3],OF=Na,LF=[0,hx,`(Cannot print locations: +var xN0=Object.create;var LM=Object.defineProperty;var rN0=Object.getOwnPropertyDescriptor;var eN0=Object.getOwnPropertyNames;var tN0=Object.getPrototypeOf,nN0=Object.prototype.hasOwnProperty;var QK=(d0,wx)=>()=>(wx||d0((wx={exports:{}}).exports,wx),wx.exports),FK=(d0,wx)=>{for(var Gx in wx)LM(d0,Gx,{get:wx[Gx],enumerable:!0})},uN0=(d0,wx,Gx,gr)=>{if(wx&&typeof wx=="object"||typeof wx=="function")for(let rr of eN0(wx))!nN0.call(d0,rr)&&rr!==Gx&&LM(d0,rr,{get:()=>wx[rr],enumerable:!(gr=rN0(wx,rr))||gr.enumerable});return d0};var HK=(d0,wx,Gx)=>(Gx=d0!=null?xN0(tN0(d0)):{},uN0(wx||!d0||!d0.__esModule?LM(Gx,"default",{value:d0,enumerable:!0}):Gx,d0));var qK=QK(MM=>{(function(d0){typeof globalThis!="object"&&(this?wx():(d0.defineProperty(d0.prototype,"_T_",{configurable:!0,get:wx}),_T_));function wx(){var Gx=this||self;Gx.globalThis=Gx,delete d0.prototype._T_}})(Object);(function(d0){"use strict";var wx="symbol",Gx=271,gr=126548,rr="renders",jr=71127,ir="member_property",tn=65007,X4=273,Ct=66517,Vn="jsx_attribute_value_expression",ym=119980,zn="function_declaration",Ne="<2>",mm=68466,VM="%=",km="??",hm=70080,J4="&",Nt="identifier",V4=72163,_m=71723,wm="properties",Tm=183969,Sm=68223,Kn="function_return_annotation",Em=124903,zM=261,gm=70106,KM=241,ZM="(",WM=213,Am=120074,Pm=70708,Cm=71679,Zn="logical",i2="camlinternalFormat.ml",Wn="type_guard_annotation",Nm=92975,$M=">>>",Rm="RestElement",Om=67897,QM=179,Im="start",Lm=113775,z4=126521,FM="%i",J3="`",HM="#",Mm=43702,K4=126,Dm=110947,$n="function_identifier",Z4=119893,jm=70366,Um=65547,Bm=43743,Ym=-43,sv=8238,qM=",",ov=8286,Qn="keyof_type",Xm=66717,W4=12336,GM=201,Jm=71338,$4=11565,Vm=69289,zm=55291,Km=73030,Zm=70479,Wm=69572,$m=11623,Fn="tuple_spread_element",Hn="component_type_rest_param",vv=8239,Qm=64310,la="@]",Fm=42993,Q4=11558,F4="Map.bal",V3="public",bM=-32,pa="Literal",qn="jsx_member_expression_identifier",Gn="for_in_assignment_pattern",Hm=71450,H4=126557,nn=103,qm=12292,Gm=110579,q4=120597,bm=13311,xk=12348,bn="export_default_declaration_decl",x7="tuple_type",rk=113663,G4=170,ek=67413,xD="Assert_failure",rD="comments",z3="%S",un=127343600,tk=12341,nk=67646,eD="ENOTEMPTY",uk=72160,ik=70187,tD=222,fk=12343,nD=2147483647,ck=126624,sk=43442,ok=70312,uD=281,r7="interface_type",av="new",vk=66256,b4=68296,ak=124908,xp=126579,rp=70107,lk=249,pk=71167,e7="union_type",Gr=248,dk=126546,t7="enum_bigint_member",iD=133,yk=67871,mk=66955,fD=1027,n7="class_declaration",u7="optional_call",cD="a string",ep=11703,sD="<<",tp=126564,i7="jsx_element",f7="object_property_type",kk=94207,c7="enum_declaration",hk=68023,_k=67669,wk=8318,oD="prefix",lv="this",Tk=126578,s7="if_consequent_statement",vD=-696510241,Sk=66963,pv="default",np=72967,Rt=101,aD="buffer.ml",Ek=74649,fn=65535,gk=43709,lD=175,_o="component",pD="===",dv=117,o7="jsx_identifier",dD="EnumDefaultedMember",up=70006,Ak=70161,Pk=126633,Ck=66965,v7="member_property_expression",Nk=101589,Rk=64274,da="function",Ok=66303,Ik=42954,Lk=126529,Mk=72191,a7="new_",Dk=64433,ip=126559,jk=72144,yD="==",wo=-744106340,Uk=43359,Bk=171,mD="Printexc.handle_uncaught_exception",Yk=66735,Xk=126534,Jk=74879,Vk=42785,fp=120629,K3="0o",kD="End_of_file",zk=66175,hD="&=",Kk="nan",cp=126503,l7="pattern_number_literal",Zk=43470,p7="import_namespace_specifier",Wk=77711,sp=70302,d7="component_param",op="@])",vp=126515,ya=118,Re="continue",$k=43798,ap=";@ ",Qk=74751,Fk="src/parser/statement_parser.ml",Hk="rmdir",qk=94177,y7="for_in_statement",_D=12520,wD="TypeParameterInstantiation",hx="",TD="**=",Gk=120126,SD=197,bk=67829,lp="_bigarr02",m7="export_named_declaration_specifier",pp=": No such file or directory",k7="render_type",dp=64319,xh=69926,h7="pattern_object_p",ED="TypeAnnotation",_7="array_type",Z3="@[%s =@ ",rh=72847,w7="export_default_declaration",yp=126590,eh=42774,th=": Not a directory",ma="let",yv=12288,H2="argument",q2="/",mp="an identifier",Ps="typeof",kp=68116,nh=182,T7="declare_export_declaration_decl",uh=67589,ih=66771,W3="class",gD="tokens",hp=70281,$3=255,fh=43638,mv="key",ch=69955,AD=">>",S7="function_expression_or_method",sh=43587,cn="block",oh=100351,_p="mixed",vh=66503,ah="ENOTDIR",lh=65135,E7="string_literal",fe="@ ",ph=43334,g7="if_alternate_statement",dh=70448,wp=8485,A7="type_args",yh=69864,P7="if_statement",PD="+=",C7="typeof_identifier",Tp="with",Sp=65595,mh=64286,kh=71086,Cs="true",hh=69423,N7="catch_clause",_h="e",ka="asserts",CD=">>=",Ep=131,wh=43388,Th=43887,K1=-48,Sh=120779,ND=190,Eh=194,R7="pattern_bigint_literal",gh=71351,Ah=65629,O7="call",Ph=-42,gp=126553,Ch=43695,RD=177,Nh=42124,Rh=12703,Oh=12442,Ih=11718,Ap=70449,Pp=126547,Lh=67462,Ns="left",I7="infer_type",Mh=11742,Dh=65597,Cp="Unix.Unix_error",jh=122623,Uh=124911,Bh=72959,Yh="opaque",L7="object_internal_slot_property_type",OD="Enum `",kv=65279,Xh=71983,Jh=12329,U1=110,M7="spread_property",ID="importKind",Q3=" =",D7="remote_identifier",j7="labeled_statement",U7="jsx_fragment",Vh=120770,B7="function_param",M2=112,zh="exportKind",Y7="binary",Rs="`.",Kh=42511,LD="<=",X7="jsx_spread_attribute",D2="import",J7="typeof_member_identifier",Zh=69414,Wh=19967,Np=11687,$h=93823,MD=67714067,DD=209,Qh=71903,Fh="of",Hh=72e3,Rp="typeArguments",V7="type_identifier",z7="pattern_array_element_pattern",Op=69744,ha=192,K7="class_element",Z7="export_source",W7="component_param_pattern",qh=42508,Gh=125124,jD="Unexpected token `",$7="for_in_left_declaration",Q7="object_call_property_type",bh="abstract",x_=8584,r_=68786,e_=71999,Ip=123214,t_=123565,Lp=186,F7="class_implements_interface",Mp=126536,n_=69749,UD="Invalid legacy octal ",u_=71295,i_=66927,H7="pattern_expression",f_=11679,c_=-61,Dp=65141,s_=11694,q7="update_expression",BD="minus",Oe="debugger",o_=71352,v_=65470,_a="number",a_=123627,jp=64322,Up=43471,G7="for_of_assignment_pattern",Bp=126589,l_=43784,YD="Internal Error: Found object private prop",p_=183983,br="id",d_=123190,Yp="finally",Xp=120070,y_=72095,b7="as_expression",xu="syntax",m_=110591,Os="false",XD=-10,Jp="AssignmentPattern",ru="typeof_expression",k_=43764,JD="FunctionTypeParam",eu="function_body_any",h_=126627,__=71998,w_=126543,tu="call_type_arg",T_=64316,Vp=64285,S_=8454,VD=137,zD="**",nu="object_type_property_setter",E_=68607,sn=108,g_="out",A_=68799,hv=65278,uu="jsx_member_expression",P_=92728,_v="null",C_=66431,N_=72249,on=128,zp=119994,R_=66207,O_=43583,Kp="else",Zp=94179,Wp=11735,I_=64911,iu="jsx_attribute_name_namespaced",KD="!",L_=42539,M_=72250,D_=71215,j_=69746,U_=65487,fu="pattern_object_property_key",ZD=", ",B_=8505,Y_="=",X_=64111,J_=8507,$p=120134,Qp="while",V_=120596,z_=43002,F3="protected",K_=68479,Z_=43395,W_=68252,WD="v",$_=70278,Q_="rendersType",F_=70853,Fp=120145,H_=69297,q_=73112,Hp=8488,G_=68351,b_=42655,cu="for_of_left_declaration",xw=44031,rw="Failure",ew=92159,su="object_key_identifier",$D=195,wv="bigint",ou="import_default_specifier",H3=256,vu="member",QD="!==",au="component_identifier",tw=73008,nw=72283,qp=126500,Gp=120127,lu="jsx_attribute_name",pu="for_statement_init",uw=67711,du="private_name",bp="case",x8=8489,yu="import_specifier",iw=64279,fw=94098,cw=119974,mu="pattern_string_literal",sw=72969,FD=193,HD="!=",r8=126520,ow=71944,qD=259,vw=42191,ku="generic_qualified_identifier_type",Tv="implements",aw=194559,GD="%",q3="hasUnknownMembers",lw=71039,bD=211,pw=83526,hu="init",_u="jsx_attribute_value",dw=70271,wa=240,wu="function_type_return_annotation",yw=70018,mw="rest",Tu="readonly_type",kw=512,hw=68095,_w=120003,e8=126563,t8=71236,ww=69375,Tw=68850,Sw=70105,Ew=43866,xj="T_RENDERS_QUESTION",n8=888960333,gw=43013,Su="assignment_pattern",Aw="specifiers",rj=710,ej=145,vn="as",Pw=120570,Cw=11507,tj=204,Eu="jsx_element_name_identifier",gu="pattern_object_property_string_literal_key",Au="class_expression",nj=257,Nw=44002,Rw=82943,Ta="src/parser/type_parser.ml",Sa="test",uj=-67,Ow=64217,u8="package",ij="collect_comments",fj="Pervasives.do_at_exit",Iw=125183,Lw=42606,Pu="tuple_element",Cu="enum_boolean_member",Mw=65312,i8=119981,Dw=65495,f8=120085,cj=-80,jw=138,c8=126555,Uw=65276,h1=128,sj="{ ",Nu="for_statement",Ru="class_method",s8="if",Ou="generic_type",Nr=113,Bw=43071,Yw=72001,Xw=71131,Jw=70002,oj="renders*",Vw=42888,o8=8469,G3="instanceof",zw=11502,v8=94178,Kw=64321,Zw=64913,vj="Division_by_zero",Ww=92879,$w=71945,aj=185,Qw=66938,a8=65535,Fw=113800,lj=": file descriptor already closed",l8=223,pj="*=",Hw=68899,Iu="switch_case",Lu="pattern_array_element",Mu="enum_string_member",Du="pattern_object_property_bigint_literal_key",dj="visit_trailing_comment",p8="export",d8=120122,y8=43823,qw=43792,Gw=42527,bw=70726,ju="enum_defaulted_member",xT=68497,m8=72349,Uu="program",Bu="member_type_identifier",rT="object",Yu="for_of_statement_lhs",eT=113791,tT=67391,Xu="jsx_spread_child",k8=126554,h8=8526,_8=43880,w8=69415,nT=43822,Ju="pattern_identifier",uT=93052,Ea="readonly",Ie="name",iT=68119,fT=71494,cT=120121,T8=8486,yj=2047,Vu="enum_symbol_body",mj=142,kj="PropertyDefinition",sT=177976,zu="declare_class",oT=65489,vT=72367,aT=70440,Ku="import_named_specifier",hj="Popping lex mode from empty stack",lT=68111,pT=66463,_j="*-/",dT=43187,S8=8487,yT=11567,mT=67861,kT=` +`,hT=66383,Zu="declare_interface",_T=-24976191,wT=238,TT=-24,wj="@ }@]",ST=43645,ET=176,gT=119976,E8=69959,AT=126519,PT=";",Tj="trailingComments",g8=65548,Wu="number_literal",ga=449540197,CT=43704,A8=126584,NT=8467,Sj="||",P8=11695,RT="exported",OT=120712,Is="void",Ej="mixins",IT=92783,LT=215,$u="body_expression",gj="%ni",b3=">",Qu="jsx_child",MT=8516,Fu="optional_indexed_access_type",Hu="typeof_type",qu="spread_element",DT=42963,Aj="@[",Gu="component_params",jT=43042,C8="",bu="function_",N8="for",R8=65575,an="params",UT=168,Pj="win32",Sv=8202,Cj="@",O8="^",Nj=164,it="optional",BT=65574,xl="boolean",Rj=139,YT=12548,I8=120539,Oj="Not_found",rl=246,xi="expression_statement",XT="EBADF",JT=66815,ri="module_ref_literal",VT=55203,ei="function_param_type",zT=73064,L8=70279,KT=110580,Ij=233,ZT="<",Lj="visit_leading_comment",WT=66855,$T=66966,QT=66499,FT=111355,HT=68680,qT=206,Mj="--",GT=65497,M8=11711,ti="function_param_pattern",Ev="constructor",bT=5760,Dj="infinity",D8=43642,MN0="fs",xS=92991,j8=126544,rS=101640,U8=72162,eS=67583,B8=8468,j2="typeParameters",jj="elements",tS=71423,Uj="Sys_blocked_io",ni="interface_declaration",ui="variable_declaration",ii="function_rest_param",fi="type",nS="Invalid number ",uS=" : flags Open_rdonly and Open_wronly are not compatible",iS=69404,ci="jsx_element_name_member_expression",Y8="keyof",X8="never",si="with_",ln=32768,Bj="|=",J8=70404,V8=70441,fS=42969,el="declare",cS=73061,oi="object_type",vi="object_property_value_type",sS=69687,Yj="Invalid binary/octal ",Xj=230,oS=64324,Jj="range",Vj="infer",vS=120744,ai="array_element",aS=70730,lS=43641,zj=166,pS=70461,dS=69890,yS=69487,mS=74862,kS=68149,z8=73065,Kj="%a",hS=72348,Zj=172,li="jsx_expression",_S=65663,wS=126495,TS=245,SS=124907,pi="member_property_identifier",Wj=226,ES=43615,di="comment",K8=119965,yi="catch_clause_pattern",mi="object_type_property_getter",$j=136,gS=43019,AS=67455,Z8=126628,Qj=331416730,Fj="the start of a statement",PS=122654,CS="shorthand",NS=43595,RS=11710,ki="typeof_qualified_identifier",OS=72750,Hj="elementType",F1="typeAnnotation",IS=124895,qj=162,W8=11559,LS=67382,Gj="??=",MS=72329,DS="target",hi="component_type",bj=180,jS=189,xU=8206,US=43513,BS=173823,YS=126467,_i="type_guard",XS=43700,JS=12783,$8=8305,wi="type_annotation",rU=141,Le="break",Q8=42999,VS=65019,eU=160,zS=70460,Ti="expression_or_spread",KS=")",Si="class_private_field",ZS=55215,WS=65338,$S=40981,tl="members",Ei="import_declaration",QS=69634,F8=94031,FS="ENOENT",HS=8457,tU="satisfies",gi="generic_identifier_type",Ai="function_this_param",qS=66993,Pi="type_",GS=67423,bS=11557,xE=12799,H8=239,rE=93026,eE=66377,tE=123180,nU=221,uU=-594953737,nE=67967,uE=43586,ft=105,iU="src/parser/flow_lexer.ml",iE=66559,Ci="class_property_value",fU=150,fE=67637,cU="closedir",cE=43010,sE=8521,q8=69956,oE=42959,vE=212,aE=92735,G8="}",nl="method",lE=11498,b8=247,ce="empty",Ni=16777215,pE=161,dE=42887,Ri=116,Oi="type_identifier_reference",x5=126634,yE=68029,sU="regexp",mE=70414,ul=121,Ii="template_literal_element",kE=8449,hE=126562,gv=12287,_E=-45,r5=64297,e5=126523,wE=43301,Ot=111,TE=126498,SE=43776,oU="EEXIST",EE=119892,gE=43807,vU=4096,Av=252,Ls=255,AE=68295,Li="variable_declarator_pattern",Mi="do_while",t5="catch",PE=66962,CE=120654,Di=125,ji="label_identifier",NE=11263,RE=8525,Ui="assignment",OE=191456,IE=43273,aU="%u",LE=65381,ME=110927,DE=65479,jE=120538,Pv="await",UE=71487,BE="jsError",YE=110588,XE=120084,JE=42890,Aa=224,Bi="object_key",VE=43696,zE=73647,KE=43761,ZE=12295,WE=64967,n5=11647,lU=191,It=123,$E="generator",QE=123583,Yi="for_of_statement",Xi="enum_bigint_body",FE=110959,HE=92995,qE=120686,GE="b",bE=119969,u5=126522,i5=64318,xg=71839,f5=126602,rg=65908,il=65536,pU=231,dU=-602162310,yU="comment_bounds",Lt="-",mU=-55,Ji="pattern_object_property",eg=43493,tg=69505,ng=8471,kU=277,ug=187,c5=120745,Vi="enum_member_identifier",ig=71959,fg=66863,cg=65594,sg=253,s5='"',o5=70286,zi="jsx_attribute_value_literal",og=68447,hU="the",vg="index out of bounds",Ki="declare_export_declaration",Zi="jsx_attribute",Wi="class_extends",x1=122,f2=106,$i="binding_pattern",Qi="ts_type_cast",ag=113807,lg=93951,Pa=119,pg="types",dg=8335,Fi="statement_fork_point",Ca="_",yg=65500,Hi="function_type",mg=68220,qi="statement_list",Na=-835925911,kg=123535,hg=258,v5=43815,_U=199,a5=120571,_g=67514,wU="Property",l5=72713,TU="Unexpected ",p5=169,SU=", characters ",d5=43867,wg=42537,Gi="component_declaration",EU=" : is a directory",bi="object_key_number_literal",Jr=127,c2=-36,fl=912068366,cl="delete",ct=114,Tg=120076,xf="regexp_literal",Sg=65370,Eg=65481,y1="value",gg=68405,Ra="operator",sl="const",gU=283,To=109,y5="any",Ag=69958,Pg=70831,Cg=73111,Ng=72767,Rg="Identifier",rf="jsx_opening_attribute",ef="conditional_type",Og="loc",Ig=67071,m5=120004,Lg=43492,Mg=70005,AU=188,k5=72272,Dg=11389,jg=251,Ug=73055,h5=70280,PU=286,_5=1114111,Bg=66421,CU="Stack_overflow",Yg=70301,Xg=19903,So="0x",Jg=69967,Vg=12447,w5=66512,NU=`Fatal error: exception %s +`,ol=1e3,zg=69295,T5=120093,RU=">=",OU=149,S5=64325,tf="class_identifier",Kg=119967,Zg=68415,IU="end",nf="enum_boolean_body",uf="member_private_name",ff="super_expression",Wg=71955,$g=126514,E5=67593,Qg=66939,Fg=12591,g5=126538,Hg=110590,cf="component_renders_annotation",qg=72703,Gg=72105,A5=65598,bg=73727,P5=126504,C5=126551,xA=70143,vl="from",sf="class_property",of="enum_number_body",rA=42559,eA=93759,tA=66994,pn="right",LU=225,nA=67702,uA=65473,iA=43697,N5=70855,fA=119993,cA=72103,sA=178205,vf="call_type_args",oA=66511,af="export_batch_specifier",lf="component_type_param",dn=782176664,Cv="get",al="local",MU=228,pf="object_mapped_type_property",df="class_decorator",DU=220,yf="enum_body",jU="<<=",vA=71956,aA=69839,Oa="super",lA=173791,pA=71942,H1="expression",dA=72440,Ia=254,yA=70412,UU="renders?",mf="try_catch",BU=32752,kf="declare_module_exports",mA=12320,YU=134,kA=94175,ll="enum",XU=196,hf="import_source",hA=43814,_A=120069,_f="while_",R5=126537,wA=43262,wf="function_rest_param_type",TA=66378,O5=119996,Tf="declare_component",SA=73097,EA=70783,gA=43503,AA=131071,PA=11492,CA=92766,JU=173,NA=113770,RA=73029,OA=66978,Sf="tagged_template",Ef="jsx_element_name",gf="for_init_declaration",IA=123213,Af="object_indexer_property_type",Pf="object_spread_property_type",I5=72970,L5=70854,LA=110930,pl="var",VU=217,MA=119972,DA=69622,jA=63743,UA=42237,BA=870530776,M5="returnType",zU=56320,KU=143,La="computed",YA=42735,Cf="arg_list",XA=67461,Nf="export_named_declaration",JA=72817,VA=73439,zA=43782,KA=66775,ZA=70655,D5="bool",WA=65140,$A=75075,QA=126651,FA=71947,HA=42961,qA=12735,GA=78894,bA=64262,ZU=237,G2="interface",WU="Match_failure",xP=42962,rP=69748,$U="leadingComments",Rf="this_expression",dl=461894857,j5=12592,QU=8204,eP=119807,tP=66348,Of="declare_variable",nP=8348,If="optional_member",Lf=120,Mf="arrow_function",uP=72768,iP=70851,Df="array",fP=43249,U5=126468,cP=177983,sP="compare: functional value",oP=126550,vP=64847,jf="binding_type_identifier",aP=120132,Uf="function_params",lP=93071,yl=1024,pP=42783,FU=1039100673,HU="@{",dP=12352,yP=42653,mP=120628,Bf="declare_function",Yf="for_in_statement_lhs",kP=72271,hP=69807,_P=67826,Xf="syntax_opt",Jf="object_key_bigint_literal",qU=243,wP=94032,GU="Undefined_recursive_module",bU=-1053382366,TP=72242,Vf="variance_opt",SP=101631,EP="arguments",gP=72161,AP=8511,B5="unknown",PP=43560,xB="the end of an expression statement (`;`)",rB=1026,CP=12543,NP=11670,eB="?",RP=69247,Y5=11631,X5="line",OP=72202,zf="pattern_object_rest_property",Mt=" ",IP=43487,Eo=115,LP=-673950933,Kf="intersection_type",MP=120144,ml="is",DP=178207,jP=100343,tB="||=",nB="f",J5=8455,Zf=102,Wf="pattern_object_property_number_literal_key",UP=70418,BP=8543,uB="Internal Error: Found private field in object props",V5=126540,z5=119995,Nv=8287,$f="indexed_access_type",Qf="export_named_specifier",iB=266,fB=224,YP=124926,XP=-103,cB=167,K5=65344,Z5=126530,JP=113788,VP=67505,zP="property",KP=43014,Me="return",Ms=-85,ZP=126601,sB=214,oB="children",Ff="type_alias",W5=43259,WP=126583,$P=71958,QP=65613,FP=67431,$5=126535,HP=69599,Hf="type_params",qf="object_key_computed",qP=124910,U2="variance",Q5=11727,GP=66954,bP=126463,Gf="catch_body",xC=69445,bf="type_param",xc="component_type_params",rC=124902,F5=120687,vB="collect_comments_opt",eC=15,tC=120485,nC=70416,uC=125259,rc="jsx_namespaced_name",iC=43712,fC=72712,aB="~",H5=12448,ec="jsx_member_expression_object",q5=126499,G5=-97,tc="pattern_object_property_identifier_key",lB=219,nc="component_body",uc="opaque_type",ic=".",cC=43009,sC="consequent",pB="SpreadElement",B1="body",dB=178,yB=202,fc="jsx_opening_element",cc="declare_module",b5=67638,oC=8477,sc="object_type_property",vC=110882,oc="function_body",aC=94111,mB="module",kB="alternate",lC=67839,Rv=8191,pC=43881,hB=": closedir failed",go="kind",vc="tuple_labeled_element",Ov=-46,dC=67640,ac="declare_type_alias",xd=70750,yC=77808,kl="column",lc="jsx_closing_element",mC=66977,kC="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",hC=65786,pc="function_expression",Dt=104,rd=11719,_C=11505,wC="mkdir",TC=70319,_B="Invalid_argument",SC=43738,EC=113817,dc="bigint_literal",gC=70084,AC=126566,ed="do",td=42622,yc="computed_key",mc="pattern_object_property_computed_key",wB="fd ",nd=126571,PC=126619,TB=140,Ao="prototype",SB=208,CC=67004,ud=130,EB=242,gB=">>>=",NC=68863,RC=11726,jt="raw",OC=64466,b2=107,IC=67679,kc="enum_string_body",LC=244,AB="unreachable jsxtext",PB="*",MC=66335,DC=126570,CB=229,jC=" : file already exists",id=184,UC=67807,BC=70753,hc="boolean_literal",YC=65437,XC=70451,JC=67002,Ma=124,_c="conditional",fd=43260,NB="Sys_error",VC=123135,hl="meta",zC=64109,wc="pattern_array_rest_element",KC=43255,cd=67644,Tc="pattern_object_rest_property_pattern",Sc="sequence",ZC=65855,WC=110951,$C=67643,Ec="predicate_expression",De="static",QC=120512,FC="declaration",sd=64317,HC=68437,od=126558,gc="meta_property",qC=11564,Ac="declare_enum",yn="pattern",GC=216,RB=282,OB=289,bC=68191,vd="undefined",ad=8319,ld=120133,xN=132,rN=42239,IB=-99,eN=124927,tN=120092,nN=43137,Pc="component_rest_param",LB=144,MB="expected *",uN=125251,DB="%li",iN=55242,fN=12294,Cc="enum_number_member",Po="in",jB="\\\\",Iv=":",cN=68115,UB="Cygwin",sN=77823,oN=65615,pd=70162,BB="/static/",vN=11519,aN=72966,lN=12686,pN=165,dN=183,_l=129,dd=72192,yN=42964,yd="try",md=120655,mN=11702,YB="expressions",kN=2048,Nc="class_body",hN=55238,XB=240,_N=66915,wN=43311,TN=43018,JB=235,SN=73648,VB="([^/]+)",EN=125258,gN=64829,AN=68735,zB="++",KB=163,ZB="qualification",WB=57343,$B=931,Rc="default_opt",PN=71235,QB=8472,CN=71934,FB=205,HB=218,qB="callee",NN=43711,RN=64284,ON=43754,IN=43790,GB="%Li",Oc="pattern_array_rest_element_pattern",kd="decorators",LN=8304,Ic="statement",hd=73062,Lc="jsx_children",MN=70492,DN=64255,jN=11630,UN=1255,_d=67592,wd=43519,Td=64311,Sd=12539,BN="proto",Ed=120513,YN=68031,Lv="source",wl="a",XN=93047,JN=92927,VN=126588,zN=73458,KN=67742,ZN=43714,bB=288,xY=236,WN=-253313196,Tl="label",rY="@[<2>{ ",gd=126539,Ad=126552,$N=120487,eY="Out_of_memory",QN=605857695,FN=94026,tY=267,Pd=126496,Co="async",nY=203,Cd=126560,HN=68287,Mc="unary_expression",qN=-26065557,GN=110587,uY=280,Nd=120771,bN=69762,xR=126502,Da="set",Dc="object_",jc="template_literal",rR=43258,Uc="nullable_type",Ds="int_of_string",iY="^=",je="predicate",ja="string",Rd=8450,fY="camlinternalMod.ml",eR=70285,js="+",tR=110575,cY=198,Bc="extends",sY=-692038429,Od=67827,oY=210,vY=227,Id="explicitType",Ld=70452,nR=70497,Ua=63,Sl="private",uR=64296,iR=67591,fR=92909,aY="T_JSX_TEXT",cR="Fatal error: exception ",sR=120137,Md=68120,Yc="pattern_array_e",oR=119964,vR=92862,aR=66461,lY="&&=",pY=174,s2=8231,Xc="null_literal",dY="/=",lR=66811,Dd=70108,pR=67504,dR=11686,yR=67001,mR=" : flags Open_text and Open_binary are not compatible",kR=43741,hR=66204,q1=8233,Jc="type_annotation_hint",_R=123197,Vc="object_property",yY="${",jd=70480,mY="&&",zc="type_cast",El="%d",Ud=8484,kY=207,wR=70066,TR=68324,Bd=120713,hY=135,Yd=126556,xe="0",B2="yield",Xd=126591,st=100,SR=69551,Kc="jsx_element_name_namespaced",_Y=232,Zc="object_key_string_literal",Wc="function_this_param_type",$c="pattern_object_property_pattern",Ue="throw",Be="switch",wY=2048,Jd=119970,Qc="toplevel_statement_list",Ba=250,ER=12438,Fc="class_implements",Hc="variable_declarator",gR=43713,Vd=68096,AR=70457,PR=12538,CR=11734,TY="-=",SY=234,qc="component_param_name",NR=43123,Gc="class_",EY="|",RR=200,OR=43518,IR=8483,bc="jsx_attribute_name_identifier",LR=181;function hZ(x,r,e,t,u){if(t<=r)for(var i=1;i<=u;i++)e[t+i]=x[r+i];else for(var i=u;i>=1;i--)e[t+i]=x[r+i];return 0}function _Z(x){for(var r=[0];x!==0;){for(var e=x[1],t=1;t=e.l||e.t==2&&u>=e.c.length))e.c=x.t==4?zd(x.c,r,u):r==0&&x.c.length==u?x.c:x.c.substr(r,u),e.t=e.c.length==e.l?0:2;else if(e.t==2&&t==e.c.length)e.c+=x.t==4?zd(x.c,r,u):r==0&&x.c.length==u?x.c:x.c.substr(r,u),e.t=e.c.length==e.l?0:2;else{e.t!=4&&Kd(e);var i=x.c,f=e.c;if(x.t==4)if(t<=r)for(var o=0;o=0;o--)f[t+o]=i[r+o];else{for(var a=Math.min(u,i.length-r),o=0;o>=1,x==0)return e;r+=r,t++,t==9&&r.slice(0,1)}}function Zd(x){x.t==2?x.c+=Ya(x.l-x.c.length,"\0"):x.c=zd(x.c,0,x.c.length),x.t=0}function MR(x){if(x.length<24){for(var r=0;rJr)return!1;return!0}else return!/[^\x00-\x7f]/.test(x)}function gY(x){for(var r=hx,e=hx,t,u,i,f,o=0,a=x.length;okw?(e.substr(0,1),r+=e,e=hx,r+=x.slice(o,d)):e+=x.slice(o,d),d==a)break;o=d}f=1,++o=55295&&f<57344)&&(f=2)):(f=3,++o1114111)&&(f=3)))))),f<4?(o-=f,e+="\uFFFD"):f>fn?e+=String.fromCharCode(55232+(f>>10),zU+(f&1023)):e+=String.fromCharCode(f),e.length>yl&&(e.substr(0,1),r+=e,e=hx)}return r+e}function Bs(x,r,e){this.t=x,this.c=r,this.l=e}Bs.prototype.toString=function(){switch(this.t){case 9:return this.c;default:Zd(this);case 0:if(MR(this.c))return this.t=9,this.c;this.t=8;case 8:return this.c}},Bs.prototype.toUtf16=function(){var x=this.toString();return this.t==9?x:gY(x)},Bs.prototype.slice=function(){var x=this.t==4?this.c.slice():this.c;return new Bs(this.t,x,this.l)};function AY(x){return new Bs(0,x,x.length)}function DN0(x){return x}function xs(x){return AY(x)}function rs(x,r,e,t,u){return Us(xs(x),r,e,t,u),0}function PY(x){var r=d0.process;if(r&&r.env&&r.env[x]!=null)return r.env[x];if(d0.jsoo_static_env&&d0.jsoo_static_env[x])return d0.jsoo_static_env[x]}var DR=0;(function(){var x=PY("OCAMLRUNPARAM");if(x!==void 0)for(var r=x.split(qM),e=0;e>>0>=x.l&&EZ(),Zr(x,r,e)}function se(x,r){switch(x.t&6){default:if(r>=x.c.length)return 0;case 0:return x.c.charCodeAt(r);case 4:return x.c[r]}}function Ys(x,r){var e=x.l>=0?x.l:x.l=x.length,t=r.length,u=e-t;if(u==0)return x.apply(null,r);if(u<0){var i=x.apply(null,r.slice(0,e));return typeof i!="function"?i:Ys(i,r.slice(e))}else{switch(u){case 1:{var i=function(a){for(var d=new Array(t+1),k=0;k>>0>=x.length-1&&gl(),x}function gZ(x){return isFinite(x)?Math.abs(x)>=22250738585072014e-324?0:x!=0?1:2:isNaN(x)?4:3}function AZ(x){return 0}var PZ=Math.log2&&Math.log2(11235582092889474e291)==1020;function CZ(x){if(PZ)return Math.floor(Math.log2(x));var r=0;if(x==0)return-1/0;if(x>=1)for(;x>=2;)x/=2,r++;else for(;x<1;)x*=2,r--;return r}function UR(x){var r=new Float32Array(1);r[0]=x;var e=new Int32Array(r.buffer);return e[0]|0}var CY=Math.pow(2,-24);function NY(x){throw x}function RY(){NY(Y2.Division_by_zero)}function fr(x,r,e){this.lo=x&Ni,this.mi=r&Ni,this.hi=e&fn}fr.prototype.caml_custom="_j",fr.prototype.copy=function(){return new fr(this.lo,this.mi,this.hi)},fr.prototype.ucompare=function(x){return this.hi>x.hi?1:this.hix.mi?1:this.mix.lo?1:this.loe?1:rx.mi?1:this.mix.lo?1:this.lo>24),e=-this.hi+(r>>24);return new fr(x,r,e)},fr.prototype.add=function(x){var r=this.lo+x.lo,e=this.mi+x.mi+(r>>24),t=this.hi+x.hi+(e>>24);return new fr(r,e,t)},fr.prototype.sub=function(x){var r=this.lo-x.lo,e=this.mi-x.mi+(r>>24),t=this.hi-x.hi+(e>>24);return new fr(r,e,t)},fr.prototype.mul=function(x){var r=this.lo*x.lo,e=(r*CY|0)+this.mi*x.lo+this.lo*x.mi,t=(e*CY|0)+this.hi*x.lo+this.mi*x.mi+this.lo*x.hi;return new fr(r,e,t)},fr.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0},fr.prototype.isNeg=function(){return this.hi<<16<0},fr.prototype.and=function(x){return new fr(this.lo&x.lo,this.mi&x.mi,this.hi&x.hi)},fr.prototype.or=function(x){return new fr(this.lo|x.lo,this.mi|x.mi,this.hi|x.hi)},fr.prototype.xor=function(x){return new fr(this.lo^x.lo,this.mi^x.mi,this.hi^x.hi)},fr.prototype.shift_left=function(x){return x=x&63,x==0?this:x<24?new fr(this.lo<>24-x,this.hi<>24-x):x<48?new fr(0,this.lo<>48-x):new fr(0,0,this.lo<>x|this.mi<<24-x,this.mi>>x|this.hi<<24-x,this.hi>>x):x<48?new fr(this.mi>>x-24|this.hi<<48-x,this.hi>>x-24,0):new fr(this.hi>>x-48,0,0)},fr.prototype.shift_right=function(x){if(x=x&63,x==0)return this;var r=this.hi<<16>>16;if(x<24)return new fr(this.lo>>x|this.mi<<24-x,this.mi>>x|r<<24-x,this.hi<<16>>x>>>16);var e=this.hi<<16>>31;return x<48?new fr(this.mi>>x-24|this.hi<<48-x,this.hi<<16>>x-24>>16,e&fn):new fr(this.hi<<16>>x-32,e,e)},fr.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23,this.mi=(this.mi<<1|this.lo>>23)&Ni,this.lo=this.lo<<1&Ni},fr.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&Ni,this.mi=(this.mi>>>1|this.hi<<23)&Ni,this.hi=this.hi>>>1},fr.prototype.udivmod=function(x){for(var r=0,e=this.copy(),t=x.copy(),u=new fr(0,0,0);e.ucompare(t)>0;)r++,t.lsl1();for(;r>=0;)r--,u.lsl1(),e.ucompare(t)>=0&&(u.lo++,e=e.sub(t)),t.lsr1();return{quotient:u,modulus:e}},fr.prototype.div=function(x){var r=this;x.isZero()&&RY();var e=r.hi^x.hi;r.hi&ln&&(r=r.neg()),x.hi&ln&&(x=x.neg());var t=r.udivmod(x).quotient;return e&ln&&(t=t.neg()),t},fr.prototype.mod=function(x){var r=this;x.isZero()&&RY();var e=r.hi;r.hi&ln&&(r=r.neg()),x.hi&ln&&(x=x.neg());var t=r.udivmod(x).modulus;return e&ln&&(t=t.neg()),t},fr.prototype.toInt=function(){return this.lo|this.mi<<24},fr.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo},fr.prototype.toArray=function(){return[this.hi>>8,this.hi&Ls,this.mi>>16,this.mi>>8&Ls,this.mi&Ls,this.lo>>16,this.lo>>8&Ls,this.lo&Ls]},fr.prototype.lo32=function(){return this.lo|(this.mi&Ls)<<24},fr.prototype.hi32=function(){return this.mi>>>8&fn|this.hi<<16};function Wd(x,r,e){return new fr(x,r,e)}function $d(x){if(!isFinite(x))return isNaN(x)?Wd(1,0,BU):x>0?Wd(0,0,BU):Wd(0,0,65520);var r=x==0&&1/x==-1/0?ln:x>=0?0:ln;r&&(x=-x);var e=CZ(x)+1023;e<=0?(e=0,x/=Math.pow(2,-rB)):(x/=Math.pow(2,e-fD),x<16&&(x*=2,e-=1),e==0&&(x/=2));var t=Math.pow(2,24),u=x|0;x=(x-u)*t;var i=x|0;x=(x-i)*t;var f=x|0;return u=u&eC|r|e<<4,Wd(f,i,u)}function Al(x){return x.toArray()}function OY(x,r,e){if(x.write(32,r.dims.length),x.write(32,r.kind|r.layout<<8),r.caml_custom==lp)for(var t=0;t>4;if(u==yj)return r|e|t&eC?NaN:t&ln?-1/0:1/0;var i=Math.pow(2,-24),f=(r*i+e)*i+(t&eC);return u>0?(f+=16,f*=Math.pow(2,u-fD)):f*=Math.pow(2,-rB),t&ln&&(f=-f),f}function XR(x){for(var r=x.length,e=1,t=0;t>>24&Ls|(r&fn)<<8,r>>>16&fn)}function JR(x){return x.hi32()}function VR(x){return x.lo32()}var OZ=lp;function No(x,r,e,t){this.kind=x,this.layout=r,this.dims=e,this.data=t}No.prototype.caml_custom=OZ,No.prototype.offset=function(x){var r=0;if(typeof x=="number"&&(x=[x]),x instanceof Array||G1("bigarray.js: invalid offset"),this.dims.length!=x.length&&G1("Bigarray.get/set: bad number of dimensions"),this.layout==0)for(var e=0;e=this.dims[e])&&gl(),r=r*this.dims[e]+x[e];else for(var e=this.dims.length-1;e>=0;e--)(x[e]<1||x[e]>this.dims[e])&&gl(),r=r*this.dims[e]+(x[e]-1);return r},No.prototype.get=function(x){switch(this.kind){case 7:var r=this.data[x*2+0],e=this.data[x*2+1];return RZ(r,e);case 10:case 11:var t=this.data[x*2+0],u=this.data[x*2+1];return[Ia,t,u];default:return this.data[x]}},No.prototype.set=function(x,r){switch(this.kind){case 7:this.data[x*2+0]=VR(r),this.data[x*2+1]=JR(r);break;case 10:case 11:this.data[x*2+0]=r[1],this.data[x*2+1]=r[2];break;default:this.data[x]=r;break}return 0},No.prototype.fill=function(x){switch(this.kind){case 7:var r=VR(x),e=JR(x);if(r==e)this.data.fill(r);else for(var t=0;tf)return 1;if(i!=f){if(!r)return NaN;if(i==i)return 1;if(f==f)return-1}}break;case 7:for(var u=0;ux.data[u+1])return 1;if(this.data[u]>>>0>>0)return-1;if(this.data[u]>>>0>x.data[u]>>>0)return 1}break;case 2:case 3:case 4:case 5:case 6:case 8:case 9:case 12:for(var u=0;ux.data[u])return 1}break}return 0};function Ja(x,r,e,t){this.kind=x,this.layout=r,this.dims=e,this.data=t}Ja.prototype=new No,Ja.prototype.offset=function(x){return typeof x!="number"&&(x instanceof Array&&x.length==1?x=x[0]:G1("Ml_Bigarray_c_1_1.offset")),(x<0||x>=this.dims[0])&&gl(),x},Ja.prototype.get=function(x){return this.data[x]},Ja.prototype.set=function(x,r){return this.data[x]=r,0},Ja.prototype.fill=function(x){return this.data.fill(x),0};function LY(x,r,e,t){var u=IY(x);return XR(e)*u!=t.length&&G1("length doesn't match dims"),r==0&&e.length==1&&u==1?new Ja(x,r,e,t):new No(x,r,e,t)}function X2(x){Y2.Failure||(Y2.Failure=[Gr,rw,-3]),jR(Y2.Failure,x)}function MY(x,r,e){var t=x.read32s();(t<0||t>16)&&X2("input_value: wrong number of bigarray dimensions");var u=x.read32s(),i=u&Ls,f=u>>8&1,o=[];if(e==lp)for(var a=0;a>>17,r=jY(r,461845907),x^=r,x=x<<13|x>>>19,(x+(x<<2)|0)+-430675100|0}function IZ(x,r){return x=Xs(x,VR(r)),x=Xs(x,JR(r)),x}function UY(x,r){return IZ(x,$d(r))}function BY(x){var r=XR(x.dims),e=0;switch(x.kind){case 2:case 3:case 12:r>H3&&(r=H3);var t=0,u=0;for(u=0;u+4<=x.data.length;u+=4)t=x.data[u+0]|x.data[u+1]<<8|x.data[u+2]<<16|x.data[u+3]<<24,e=Xs(e,t);switch(t=0,r&3){case 3:t=x.data[u+2]<<16;case 2:t|=x.data[u+1]<<8;case 1:t|=x.data[u+0],e=Xs(e,t)}break;case 4:case 5:r>h1&&(r=h1);var t=0,u=0;for(u=0;u+2<=x.data.length;u+=2)t=x.data[u+0]|x.data[u+1]<<16,e=Xs(e,t);r&1&&(e=Xs(e,x.data[u]));break;case 6:r>64&&(r=64);for(var u=0;u64&&(r=64);for(var u=0;u32&&(r=32),r*=2;for(var u=0;u64&&(r=64);for(var u=0;u32&&(r=32);for(var u=0;u0?u(r,x,t):u(x,r,t);if(t&&i!=i)return e;if(+i!=+i)return+i;if(i|0)return i|0}return e}function KR(x){return typeof x=="string"&&!/[^\x00-\xff]/.test(x)}function ZR(x){return x instanceof Bs}function JY(x){if(typeof x=="number")return ol;if(ZR(x))return Av;if(KR(x))return 1252;if(x instanceof Array&&x[0]===x[0]>>>0&&x[0]<=$3){var r=x[0]|0;return r==Ia?0:r}else{if(x instanceof String)return _D;if(typeof x=="string")return _D;if(x instanceof Number)return ol;if(x&&x.caml_custom)return UN;if(x&&x.compare)return 1256;if(typeof x=="function")return 1247;if(typeof x=="symbol")return 1251}return 1001}function Ut(x,r){return xr?1:0}function YZ(x,r){return x.t&6&&Zd(x),r.t&6&&Zd(r),x.cr.c?1:0}function Qd(x,r,e){for(var t=[];;){if(!(e&&x===r)){var u=JY(x);if(u==Ba){x=x[1];continue}var i=JY(r);if(i==Ba){r=r[1];continue}if(u!==i)return u==ol?i==UN?XY(x,r,-1,e):-1:i==ol?u==UN?XY(r,x,1,e):1:ur)return 1;if(x!=r){if(!e)return NaN;if(x==x)return 1;if(r==r)return-1}break;case 1001:if(xr)return 1;if(x!=r){if(!e)return NaN;if(x==x)return 1;if(r==r)return-1}break;case 1251:if(x!==r)return e?1:NaN;break;case 1252:var x=x,r=r;if(x!==r){if(xr)return 1}break;case 12520:var x=x.toString(),r=r.toString();if(x!==r){if(xr)return 1}break;case 246:case 254:default:if(AZ(u)){G1("compare: continuation value");break}if(x.length!=r.length)return x.length1&&t.push(x,r,1);break}}if(t.length==0)return 0;var a=t.pop();r=t.pop(),x=t.pop(),a+10)if(r==0&&(e>=x.l||x.t==2&&e>=x.c.length))t==0?(x.c=hx,x.t=2):(x.c=Ya(e,String.fromCharCode(t)),x.t=e==x.l?0:2);else for(x.t!=4&&Kd(x),e+=r;r0&&r===r||(x=x.replace(/_/g,hx),r=+x,x.length>0&&r===r||/^[+-]?nan$/i.test(x)))return r;var e=/^ *([+-]?)0x([0-9a-f]+)\.?([0-9a-f]*)(p([+-]?[0-9]+))?/i.exec(x);if(e){var t=e[3].replace(/0+$/,hx),u=parseInt(e[1]+e[2]+t,16),i=(e[5]|0)-4*t.length;return r=u*Math.pow(2,i),r}if(/^\+?inf(inity)?$/i.test(x))return 1/0;if(/^-inf(inity)?$/i.test(x))return-1/0;X2("float_of_string")}function $R(x){x=x;var r=x.length;r>31&&G1("format_int: format too long");for(var e={justify:js,signstyle:Lt,filler:Mt,alternate:!1,base:0,signedconv:!1,width:0,uppercase:!1,sign:1,prec:-1,conv:nB},t=0;t=0&&u<=9;)e.width=e.width*10+u,t++;t--;break;case".":for(e.prec=0,t++;u=x.charCodeAt(t)-48,u>=0&&u<=9;)e.prec=e.prec*10+u,t++;t--;case"d":case"i":e.signedconv=!0;case"u":e.base=10;break;case"x":e.base=16;break;case"X":e.base=16,e.uppercase=!0;break;case"o":e.base=8;break;case"e":case"f":case"g":e.signedconv=!0,e.conv=u;break;case"E":case"F":case"G":e.signedconv=!0,e.uppercase=!0,e.conv=u.toLowerCase();break}}return e}function QR(x,r){x.uppercase&&(r=r.toUpperCase());var e=r.length;x.signedconv&&(x.sign<0||x.signstyle!=Lt)&&e++,x.alternate&&(x.base==8&&(e+=1),x.base==16&&(e+=2));var t=hx;if(x.justify==js&&x.filler==Mt)for(var u=e;u20?(g-=20,k/=Math.pow(10,g),k+=new Array(g+1).join(xe),T>0&&(k=k+ic+new Array(T+1).join(xe)),k):k.toFixed(T)}var t,u=$R(x),i=u.prec<0?6:u.prec;if((r<0||r==0&&1/r==-1/0)&&(u.sign=-1,r=-r),isNaN(r))t=Kk,u.filler=Mt;else if(!isFinite(r))t="inf",u.filler=Mt;else switch(u.conv){case"e":var t=r.toExponential(i),f=t.length;t.charAt(f-3)==_h&&(t=t.slice(0,f-1)+xe+t.slice(f-1));break;case"f":t=e(r,i);break;case"g":i=i||1,t=r.toExponential(i-1);var o=t.indexOf(_h),a=+t.slice(o+1);if(a<-4||r>=1e21||r.toFixed(0).length>i){for(var f=o-1;t.charAt(f)==xe;)f--;t.charAt(f)==ic&&f--,t=t.slice(0,f+1)+t.slice(o),f=t.length,t.charAt(f-3)==_h&&(t=t.slice(0,f-1)+xe+t.slice(f-1));break}else{var d=i;if(a<0)d-=a+1,t=r.toFixed(d);else for(;t=r.toFixed(d),t.length>i+1;)d--;if(d){for(var f=t.length-1;t.charAt(f)==xe;)f--;t.charAt(f)==ic&&f--,t=t.slice(0,f+1)}}break}return QR(u,t)}function Fd(x,r){if(x==El)return hx+r;var e=$R(x);r<0&&(e.signedconv?(e.sign=-1,r=-r):r>>>=0);var t=r.toString(e.base);if(e.prec>=0){e.filler=Mt;var u=e.prec-t.length;u>0&&(t=Ya(u,xe)+t)}return QR(e,t)}var zY=0;function Js(){return zY++}function KY(){return[0]}var Hd=[];function bx(x,r,e){var t=x[1],u=Hd[e];if(u===void 0)for(var i=Hd.length;i>1|1,rkw?(e.substr(0,1),r+=e,e=hx,r+=x.slice(i,o)):e+=x.slice(i,o),o==f)break;i=o}t>6),e+=String.fromCharCode(on|t&Ua)):t<55296||t>=WB?e+=String.fromCharCode(fB|t>>12,on|t>>6&Ua,on|t&Ua):t>=56319||i+1==f||(u=x.charCodeAt(i+1))WB?e+="\xEF\xBF\xBD":(i++,t=(t<<10)+u-56613888,e+=String.fromCharCode(XB|t>>18,on|t>>12&Ua,on|t>>6&Ua,on|t&Ua)),e.length>yl&&(e.substr(0,1),r+=e,e=hx)}return r+e}function Bt(x){return MR(x)?x:VZ(x)}function zZ(x,r,e){if(!isFinite(x))return isNaN(x)?Bt(Kk):Bt(x>0?Dj:"-infinity");var t=x==0&&1/x==-1/0?1:x>=0?0:1;t&&(x=-x);var u=0;if(x!=0)if(x<1)for(;x<1&&u>-1022;)x*=2,u--;else for(;x>=2;)x/=2,u++;var i=u<0?hx:js,f=hx;if(t)f=Lt;else switch(e){case 43:f=js;break;case 32:f=Mt;break;default:break}if(r>=0&&r<13){var o=Math.pow(2,r*4);x=Math.round(x*o)/o}var a=x.toString(16);if(r>=0){var d=a.indexOf(ic);if(d<0)a+=ic+Ya(r,xe);else{var k=d+1+r;a.length>24&Ni,x>>31&fn)}function ZZ(x){return x.toInt()}function WZ(x){return+x.isNeg()}function HR(x){return x.neg()}function $Z(x,r){var e=$R(x);e.signedconv&&WZ(r)&&(e.sign=-1,r=HR(r));var t=hx,u=qd(e.base),i="0123456789abcdef";do{var f=r.udivmod(u);r=f.quotient,t=i.charAt(ZZ(f.modulus))+t}while(!KZ(r));if(e.prec>=0){e.filler=Mt;var o=e.prec-t.length;o>0&&(t=Ya(o,xe)+t)}return QR(e,t)}function Xx(x){return x.length}function fx(x,r){return x.charCodeAt(r)}function QZ(x,r){return x.add(r)}function FZ(x,r){return x.mul(r)}function qR(x,r){return x.ucompare(r)<0}function ZY(x){var r=0,e=Xx(x),t=10,u=1;if(e>0)switch(fx(x,r)){case 45:r++,u=-1;break;case 43:r++,u=1;break}if(r+1=48&&x<=57?x-48:x>=65&&x<=90?x-55:x>=97&&x<=x1?x-87:-1}function Nl(x){var r=ZY(x),e=r[0],t=r[1],u=r[2],i=qd(u),f=new fr(Ni,268435455,fn).udivmod(i).quotient,o=fx(x,e),a=Gd(o);(a<0||a>=u)&&X2(Ds);for(var d=qd(a);;)if(e++,o=fx(x,e),o!=95){if(a=Gd(o),a<0||a>=u)break;qR(f,d)&&X2(Ds),a=qd(a),d=QZ(FZ(i,d),a),qR(d,a)&&X2(Ds)}return e!=Xx(x)&&X2(Ds),u==10&&qR(new fr(0,0,ln),d)&&X2(Ds),t<0&&(d=HR(d)),d}function bd(x){return x.toFloat()}function ot(x){var r=ZY(x),e=r[0],t=r[1],u=r[2],i=Xx(x),f=-1>>>0,o=e=u)&&X2(Ds);var d=a;for(e++;e=u)break;d=u*d+a,d>f&&X2(Ds)}return e!=i&&X2(Ds),d=t*d,u==10&&(d|0)!=d&&X2(Ds),d|0}function HZ(x){return x.slice(1)}function er(x){return MR(x)?x:gY(x)}function qZ(x){for(var r={},e=1;e=0?x.l:x.l=x.length}function bZ(x){return function(){for(var r=GZ(x),e=new Array(r),t=0;t1&&t.pop();break;case".":break;case"":break;default:t.push(e[u]);break}return t.unshift(r[0]),t.orig=x,t}var uW=["E2BIG","EACCES","EAGAIN",XT,"EBUSY","ECHILD","EDEADLK","EDOM",oU,"EFAULT","EFBIG","EINTR","EINVAL","EIO","EISDIR","EMFILE","EMLINK","ENAMETOOLONG","ENFILE","ENODEV",FS,"ENOEXEC","ENOLCK","ENOMEM","ENOSPC","ENOSYS",ah,eD,"ENOTTY","ENXIO","EPERM","EPIPE","ERANGE","EROFS","ESPIPE","ESRCH","EXDEV","EWOULDBLOCK","EINPROGRESS","EALREADY","ENOTSOCK","EDESTADDRREQ","EMSGSIZE","EPROTOTYPE","ENOPROTOOPT","EPROTONOSUPPORT","ESOCKTNOSUPPORT","EOPNOTSUPP","EPFNOSUPPORT","EAFNOSUPPORT","EADDRINUSE","EADDRNOTAVAIL","ENETDOWN","ENETUNREACH","ENETRESET","ECONNABORTED","ECONNRESET","ENOBUFS","EISCONN","ENOTCONN","ESHUTDOWN","ETOOMANYREFS","ETIMEDOUT","ECONNREFUSED","EHOSTDOWN","EHOSTUNREACH","ELOOP","EOVERFLOW"];function zs(x,r,e,t){var u=uW.indexOf(x);u<0&&(t==null&&(t=-9999),u=[0,t]);var i=[u,Bt(r||hx),Bt(e||hx)];return i}var FY={};function Ro(x){return FY[x]}function Ks(x,r){throw q0([0,x].concat(r))}function bR(x){return x instanceof Uint8Array||(x=new Uint8Array(x)),new Bs(4,x,x.length)}function HY(x){Ir(x+pp)}function re(x){this.data=x}re.prototype=new WY,re.prototype.constructor=re,re.prototype.truncate=function(x){var r=this.data;this.data=S1(x|0),Us(r,0,this.data,0,x)},re.prototype.length=function(){return vt(this.data)},re.prototype.write=function(x,r,e,t){var u=this.length();if(x+t>=u){var i=S1(x+t),f=this.data;this.data=i,Us(f,0,this.data,0,u)}return Us(bR(r),e,this.data,x,t),0},re.prototype.read=function(x,r,e,t){var u=this.length();if(x+t>=u&&(t=u-x),t){var i=S1(t|0);Us(this.data,x,i,0,t),r.set($Y(i),e)}return t};function Mv(x,r,e){this.file=r,this.name=x,this.flags=e}Mv.prototype.err_closed=function(){Ir(this.name+lj)},Mv.prototype.length=function(){if(this.file)return this.file.length();this.err_closed()},Mv.prototype.write=function(x,r,e,t){if(this.file)return this.file.write(x,r,e,t);this.err_closed()},Mv.prototype.read=function(x,r,e,t){if(this.file)return this.file.read(x,r,e,t);this.err_closed()},Mv.prototype.close=function(){this.file=void 0};function p2(x,r){this.content={},this.root=x,this.lookupFun=r}p2.prototype.nm=function(x){return this.root+x},p2.prototype.create_dir_if_needed=function(x){for(var r=x.split(q2),e=hx,t=0;t0&&e>=0&&e+t<=r.length&&r[e+t-1]==10&&t--;var u=S1(t);return Us(bR(r),e,u,0,t),this.log(u.toUtf16()),0}Ir(this.fd+lj)},Il.prototype.read=function(x,r,e,t){Ir(this.fd+": file descriptor is write only")},Il.prototype.close=function(){this.log=void 0};function ty(x,r){return r==null&&(r=ry.length),ry[r]=x,r|0}function BN0(x,r,e){for(var t={};r;){switch(r[1]){case 0:t.rdonly=1;break;case 1:t.wronly=1;break;case 2:t.append=1;break;case 3:t.create=1;break;case 4:t.truncate=1;break;case 5:t.excl=1;break;case 6:t.binary=1;break;case 7:t.text=1;break;case 8:t.nonblock=1;break}r=r[2]}t.rdonly&&t.wronly&&Ir(x+uS),t.text&&t.binary&&Ir(x+mR);var u=iW(x),i=u.device.open(u.rest,t);return ty(i,void 0)}(function(){function x(r,e){return Rl()?eW(r,e):new Il(r,e)}ty(x(0,{rdonly:1,altname:"/dev/stdin",isCharacterDevice:!0}),0),ty(x(1,{buffered:2,wronly:1,isCharacterDevice:!0}),1),ty(x(2,{buffered:2,wronly:1,isCharacterDevice:!0}),2)})();function fW(x){var r=ry[x];r.flags.wronly&&Ir(wB+x+" is writeonly");var e=null,t={file:r,offset:r.flags.append?r.length():0,fd:x,opened:!0,out:!1,buffer_curr:0,buffer_max:0,buffer:new Uint8Array(il),refill:e};return Vs[t.fd]=t,t.fd}function GY(x){var r=ry[x];r.flags.rdonly&&Ir(wB+x+" is readonly");var e=r.flags.buffered!==void 0?r.flags.buffered:1,t={file:r,offset:r.flags.append?r.length():0,fd:x,opened:!0,out:!0,buffer_curr:0,buffer:new Uint8Array(il),buffered:e};return Vs[t.fd]=t,t.fd}function cW(){for(var x=0,r=0;ru.buffer.length){var f=new Uint8Array(u.buffer_curr+i.length);f.set(u.buffer),u.buffer=f}switch(u.buffered){case 0:u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,es(x);break;case 1:u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,u.buffer_curr>=u.buffer.length&&es(x);break;case 2:var o=i.lastIndexOf(10);o<0?(u.buffer.set(i,u.buffer_curr),u.buffer_curr+=i.length,u.buffer_curr>=u.buffer.length&&es(x)):(u.buffer.set(i.subarray(0,o+1),u.buffer_curr),u.buffer_curr+=o+1,es(x),u.buffer.set(i.subarray(o+1),u.buffer_curr),u.buffer_curr+=i.length-o-1);break}return 0}function xO(x,r,e,t){return sW(x,xs(r),e,t)}function bY(x,r){var e=String.fromCharCode(r);return xO(x,e,0,1),0}function Ll(x,r){return+(Qd(x,r,!1)!=0)}function rO(x,r){var e=new Array(r+1);e[0]=x;for(var t=1;t<=r;t++)e[t]=0;return e}function oW(x,r){return x[0]=Ba,x[1]=r,0}function Dv(x){return x instanceof Array&&x[0]==x[0]>>>0?x[0]:ZR(x)||KR(x)?Av:x instanceof Function||typeof x=="function"?b8:x&&x.caml_custom?$3:ol}function vW(x){for(var r;x;)if(er(x[1][1])=="SYJS"){r=x[1][2];break}else x=x[2];var e={};if(r)for(var t=1;t=0?x=u:X2("caml_register_global: cannot locate "+t)}}Y2[x+1]=r,e&&(Y2[e]=r)}function eO(x,r){return FY[x]=r,0}function aW(x){return x[2]=zY++,x}function Ar(x,r){return x===r?1:0}function lW(){G1(vg)}function O1(x,r){return r>>>0>=Xx(x)&&lW(),fx(x,r)}function P(x,r){return 1-Ar(x,r)}function pW(){return 2147483647/4|0}var dW=d0.process&&d0.process.platform&&d0.process.platform==Pj?UB:"Unix";function yW(){return[0,dW,32,0]}function mW(){NY(Y2.Not_found)}function xX(x){var r=PY(er(x));return r===void 0&&mW(),Bt(r)}function tO(x){for(var r=1;x&&x.joo_tramp;)x=x.joo_tramp.apply(null,x.joo_args),r++;return x}function d2(x,r){return{joo_tramp:x,joo_args:r}}function O0(x,r){if(typeof r=="function")return x.fun=r,0;if(r.fun)return x.fun=r.fun,0;for(var e=r.length;e--;)x[e]=r[e];return 0}function I1(x){{if(x instanceof Array)return x;var r;return d0.RangeError&&x instanceof d0.RangeError&&x.message&&x.message.match(/maximum call stack/i)||d0.InternalError&&x instanceof d0.InternalError&&x.message&&x.message.match(/too much recursion/i)?r=Y2.Stack_overflow:x instanceof d0.Error&&Ro(BE)?r=[0,Ro(BE),x]:r=[0,Y2.Failure,Bt(String(x))],x instanceof d0.Error&&(r.js_error=x),r}}function kW(x){switch(x[2]){case-8:case-11:case-12:return 1;default:return 0}}function hW(x){var r=hx;if(x[0]==0){if(r+=x[1][1],x.length==3&&x[2][0]==0&&kW(x[1]))var t=x[2],e=1;else var e=2,t=x;r+=ZM;for(var u=e;ue&&(r+=ZD);var i=t[u];typeof i=="number"?r+=i.toString():i instanceof Bs||typeof i=="string"?r+=s5+i.toString()+s5:r+=Ca}r+=KS}else x[0]==Gr&&(r+=x[1]);return r}function rX(x){if(x instanceof Array&&(x[0]==0||x[0]==Gr)){var r=Ro(mD);if(r)xy(r,[x,!1]);else{var e=hW(x),t=Ro(fj);if(t&&xy(t,[0]),console.error(cR+e+` +`),x.js_error)throw x.js_error}}else throw x}function _W(){var x=d0.process;x&&x.on?x.on("uncaughtException",function(r,e){rX(r),x.exit(2)}):d0.addEventListener&&d0.addEventListener("error",function(r){r.error&&rX(r.error)})}_W();function l(x,r){return(x.l>=0?x.l:x.l=x.length)==1?x(r):Ys(x,[r])}function p(x,r,e){return(x.l>=0?x.l:x.l=x.length)==2?x(r,e):Ys(x,[r,e])}function G0(x,r,e,t){return(x.l>=0?x.l:x.l=x.length)==3?x(r,e,t):Ys(x,[r,e,t])}function oe(x,r,e,t,u){return(x.l>=0?x.l:x.l=x.length)==4?x(r,e,t,u):Ys(x,[r,e,t,u])}function Ye(x,r,e,t,u,i){return(x.l>=0?x.l:x.l=x.length)==5?x(r,e,t,u,i):Ys(x,[r,e,t,u,i])}function wW(x,r,e,t,u,i,f,o){return(x.l>=0?x.l:x.l=x.length)==7?x(r,e,t,u,i,f,o):Ys(x,[r,e,t,u,i,f,o])}var nO=[Gr,eY,-1],eX=[Gr,NB,-2],kn=[Gr,rw,-3],uO=[Gr,_B,-4],A2=[Gr,Oj,-7],tX=[Gr,WU,-8],nX=[Gr,CU,-9],wr=[Gr,xD,-11],Ml=[Gr,GU,-12],TW=[4,0,0,0,[12,45,[4,0,0,0,0]]],iO=[0,[11,'File "',[2,0,[11,'", line ',[4,0,0,0,[11,SU,[4,0,0,0,[12,45,[4,0,0,0,[11,": ",[2,0,0]]]]]]]]]],'File "%s", line %d, characters %d-%d: %s'],Ka=[0,0,[0,0,0],[0,0,0]],Dl=[0,0,0,0,1,0,0,0],uX=[0,"first_leading","last_trailing"],iX=[0,Cf,Df,ai,_7,Mf,b7,Ui,Su,dc,Y7,$i,jf,cn,$u,hc,Le,O7,tu,vf,Gf,N7,yi,Gc,Nc,n7,df,K7,Au,Wi,tf,Fc,F7,Ru,Si,sf,Ci,di,nc,Gi,au,d7,qc,W7,Gu,cf,Pc,hi,lf,xc,Hn,yc,_c,ef,Re,Oe,zu,Tf,Ac,Ki,T7,Bf,Zu,cc,kf,ac,Of,Rc,Mi,ce,Xi,t7,yf,nf,Cu,c7,ju,Vi,of,Cc,kc,Mu,Vu,af,w7,bn,Nf,m7,Qf,Z7,H1,Ti,xi,Gn,$7,y7,Yf,gf,G7,cu,Yi,Yu,Nu,pu,bu,oc,eu,zn,pc,S7,$n,B7,ti,ei,Uf,ii,wf,Kn,Ai,Wc,Hi,wu,gi,ku,Ou,Nt,g7,s7,P7,D2,Ei,ou,Ku,p7,hf,yu,$f,I7,G2,ni,r7,Kf,Zi,lu,bc,iu,_u,Vn,zi,Qu,Lc,lc,i7,Ef,Eu,ci,Kc,li,U7,o7,uu,qn,ec,rc,rf,fc,X7,Xu,Qn,ji,j7,Zn,vu,uf,ir,v7,pi,Bu,gc,ri,a7,Xc,Uc,Wu,Dc,Q7,Af,L7,Bi,Jf,qf,su,bi,Zc,pf,Vc,f7,vi,Pf,oi,sc,mi,nu,uc,u7,Fu,If,yn,Yc,Lu,z7,wc,Oc,R7,H7,Ju,l7,h7,Ji,Du,mc,tc,fu,Wf,$c,gu,zf,Tc,mu,je,Ec,du,Uu,Tu,xf,D7,k7,Me,Sc,qu,M7,Ic,Fi,qi,E7,ff,Be,Iu,xu,Xf,Sf,jc,Ii,Rf,Ue,Qc,mf,Qi,Pu,vc,Fn,x7,Pi,Ff,wi,Jc,A7,zc,_i,Wn,V7,Oi,bf,Hf,ru,C7,J7,ki,Hu,Mc,e7,q7,ui,Hc,Li,U2,Vf,_f,si,B2],hn=[0,0,0];Yt(11,Ml,GU),Yt(10,wr,xD),Yt(9,[Gr,Uj,XD],Uj),Yt(8,nX,CU),Yt(7,tX,WU),Yt(6,A2,Oj),Yt(5,[Gr,vj,-6],vj),Yt(4,[Gr,kD,-5],kD),Yt(3,uO,_B),Yt(2,kn,rw),Yt(1,eX,NB),Yt(0,nO,eY);var SW="output_substring",EW=ic,gW=Cs,AW=Os,PW="CamlinternalLazy.Undefined",CW=jB,NW="\\'",RW="\\b",OW="\\t",IW="\\n",LW="\\r",MW="List.iter2",DW="tl",jW="hd",UW="String.blit / Bytes.blit_string",BW="Bytes.blit",YW="String.sub / Bytes.sub",XW="String.concat",JW="Array.blit",VW="Array.sub",zW="Map.remove_min_elt",KW=[0,0,0,0],ZW=[0,"map.ml",400,10],WW=[0,0,0],$W=F4,QW=F4,FW=F4,HW=F4,qW="Stdlib.Queue.Empty",GW="Buffer.add_substring/add_subbytes",bW="Buffer.add: cannot grow buffer",x$=[0,aD,93,2],r$=[0,aD,94,2],e$="Buffer.sub",t$="%c",n$="%s",u$=FM,i$=DB,f$=gj,c$=GB,s$="%f",o$="%B",v$="%{",a$="%}",l$="%(",p$="%)",d$=Kj,y$="%t",m$="%?",k$="%r",h$="%_r",_$=[0,i2,850,23],w$=[0,i2,814,21],T$=[0,i2,815,21],S$=[0,i2,818,21],E$=[0,i2,819,21],g$=[0,i2,822,19],A$=[0,i2,823,19],P$=[0,i2,826,22],C$=[0,i2,827,22],N$=[0,i2,831,30],R$=[0,i2,832,30],O$=[0,i2,836,26],I$=[0,i2,837,26],L$=[0,i2,846,28],M$=[0,i2,847,28],D$=[0,i2,851,23],j$=[0,i2,1558,4],U$="Printf: bad conversion %[",B$=[0,i2,1626,39],Y$=[0,i2,1649,31],X$=[0,i2,1650,31],J$="Printf: bad conversion %_",V$=HU,z$=Aj,K$=HU,Z$=Aj,W$=[0,[11,"invalid box description ",[3,0,0]],"invalid box description %S"],$$=[0,0,4],Q$=Kk,F$="neg_infinity",H$=Dj,q$=ic,G$=[0,nn],b$="%+nd",xQ="% nd",rQ="%+ni",eQ="% ni",tQ="%nx",nQ="%#nx",uQ="%nX",iQ="%#nX",fQ="%no",cQ="%#no",sQ="%nd",oQ=gj,vQ="%nu",aQ="%+ld",lQ="% ld",pQ="%+li",dQ="% li",yQ="%lx",mQ="%#lx",kQ="%lX",hQ="%#lX",_Q="%lo",wQ="%#lo",TQ="%ld",SQ=DB,EQ="%lu",gQ="%+Ld",AQ="% Ld",PQ="%+Li",CQ="% Li",NQ="%Lx",RQ="%#Lx",OQ="%LX",IQ="%#LX",LQ="%Lo",MQ="%#Lo",DQ="%Ld",jQ=GB,UQ="%Lu",BQ="%+d",YQ="% d",XQ="%+i",JQ="% i",VQ="%x",zQ="%#x",KQ="%X",ZQ="%#X",WQ="%o",$Q="%#o",QQ=El,FQ=FM,HQ=aU,qQ=la,GQ="@}",bQ="@?",xF=`@ +`,rF="@.",eF="@@",tF="@%",nF=Cj,uF="CamlinternalFormat.Type_mismatch",iF=hx,fF=[0,[11,ZD,[2,0,[2,0,0]]],", %s%s"],cF=[0,[11,cR,[2,0,[12,10,0]]],NU],sF=[0,[11,"Fatal error in uncaught exception handler: exception ",[2,0,[12,10,0]]],`Fatal error in uncaught exception handler: exception %s +`],oF="Fatal error: out of memory in uncaught exception handler",vF=[0,[11,cR,[2,0,[12,10,0]]],NU],aF=[0,[2,0,[12,10,0]],`%s +`],lF="Raised at",pF="Re-raised at",dF="Raised by primitive operation at",yF="Called from",mF=" (inlined)",kF=hx,hF=[0,[2,0,[12,32,[2,0,[11,' in file "',[2,0,[12,34,[2,0,[11,", line ",[4,0,0,0,[11,SU,TW]]]]]]]]]],'%s %s in file "%s"%s, line %d, characters %d-%d'],_F=[0,[2,0,[11," unknown location",0]],"%s unknown location"],wF="Out of memory",TF="Stack overflow",SF="Pattern matching failed",EF="Assertion failed",gF="Undefined recursive module",AF=[0,[12,40,[2,0,[2,0,[12,41,0]]]],"(%s%s)"],PF=hx,CF=hx,NF=[0,[12,40,[2,0,[12,41,0]]],"(%s)"],RF=[0,[4,0,0,0,0],El],OF=[0,[3,0,0],z3],IF=Ca,LF=[0,hx,`(Cannot print locations: bytecode executable program file not found)`,`(Cannot print locations: bytecode executable program file appears to be corrupt)`,`(Cannot print locations: bytecode executable program file has wrong magic number)`,`(Cannot print locations: bytecode executable program file cannot be opened; - -- too many open files. Try running with OCAMLRUNPARAM=b=2)`],MF=[3,0,3],DF=ic,jF=xl,UF="{"],sH=[0,[12,32,0],Dt],oH=[0,[12,32,0],Dt],vH=[0,[17,[0,"@,",0,0],[12,Di,[17,0,0]]],"@,}@]"],aH=[0,"src/hack_forked/utils/collections/third-party/flow_set.ml",379,14],lH=rl,pH=wa,dH=Ua,yH=wx,mH=wv,kH=[0,[12,40,[18,[1,[0,[11,Re,0],Re]],[11,"File_key.LibFile",[17,[0,ce,1,0],0]]]],"(@[<2>File_key.LibFile@ "],hH=[0,[3,0,0],K3],_H=[0,[17,0,[12,41,0]],op],wH=[0,[12,40,[18,[1,[0,[11,Re,0],Re]],[11,"File_key.SourceFile",[17,[0,ce,1,0],0]]]],"(@[<2>File_key.SourceFile@ "],TH=[0,[3,0,0],K3],SH=[0,[17,0,[12,41,0]],op],EH=[0,[12,40,[18,[1,[0,[11,Re,0],Re]],[11,"File_key.JsonFile",[17,[0,ce,1,0],0]]]],"(@[<2>File_key.JsonFile@ "],gH=[0,[3,0,0],K3],AH=[0,[17,0,[12,41,0]],op],PH=[0,[12,40,[18,[1,[0,[11,Re,0],Re]],[11,"File_key.ResourceFile",[17,[0,ce,1,0],0]]]],"(@[<2>File_key.ResourceFile@ "],CH=[0,[3,0,0],K3],NH=[0,[17,0,[12,41,0]],op],RH=[0,1],IH=[0,0],OH=[0,1],LH=[0,2],MH=[0,0],DH=[0,1],jH=[0,1],UH=[0,1],BH=[0,1],YH=[0,1],XH=[0,1],JH=[0,0,0],VH=[0,0,0],zH=[0,Y2,si,_f,Vf,B2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Ii,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Be,Rf,Oi,jc,Sf,Xf,xu,Ou,Ye,ff,E7,qi,Fi,Oc,M7,qu,Sc,De,k7,D7,xf,Tu,Uu,du,Ec,Ue,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Ic,wc,z7,Lu,Yc,yn,Of,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ur,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,b2,O7,$f,yu,hf,p7,Ku,ou,Ei,j2,P7,s7,g7,Rt,Iu,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,q1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,se,Mi,Rc,If,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Ie,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,I7,Me,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],KH=[0,Oc,Vn,ei,Iu,Kn,I7,Uc,qf,li,r7,$u,Jc,sc,Ye,nu,Qf,df,pf,lc,a7,O7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Rt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Ou,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,Of,Cf,$c,d7,_i,su,zf,uu,F7,oi,Ue,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,B2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,se,G7,wi,Y2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Ic,ec,qc,ur,j2,De,C7,Ii,ff,H7,Be,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,If,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,q1,Lu,nc,xi,Qi,zn,eu,Fi,Ie,$n,Gu,fu,af,ac,Oi,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Me,Mf,b2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],ZH=mD,WH=qD,$H=dD,QH=FD,FH=WT,HH=MD,qH=xl,GH=IU,bH=oD,xq=PD,rq=QM,eq=js,tq=Mt,nq=CB,uq=KD,iq=G2,fq=bD,cq=gY,sq=I8,oq=J4,vq=Po,aq=b3,lq=CD,pq=SY,dq=dj,yq=SD,mq=yY,kq=zM,hq=UU,_q=ND,wq=AB,Tq=Yj,Sq=fY,Eq=_D,gq=bj,Aq=pY,Pq=nB,Cq=[0,[18,[1,[0,[11,Re,0],Re]],[11,oj,0]],eY],Nq="Loc.line",Rq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],Iq=[0,[4,0,0,0,0],gl],Oq=[0,[17,0,0],pa],Lq=[0,[12,59,[17,[0,ce,1,0],0]],ap],Mq=hl,Dq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],jq=[0,[4,0,0,0,0],gl],Uq=[0,[17,0,0],pa],Bq=[0,[17,[0,ce,1,0],[12,Di,[17,0,0]]],Tj],Yq=[0,[15,0],Zj],Xq="(Some ",Jq=ZS,Vq="None",zq=[0,[18,[1,[0,[11,Re,0],Re]],[11,oj,0]],eY],Kq="Loc.source",Zq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],Wq=[0,[17,0,0],pa],$q=[0,[12,59,[17,[0,ce,1,0],0]],ap],Qq=Lm,Fq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],Hq=[0,[17,0,0],pa],qq=[0,[12,59,[17,[0,ce,1,0],0]],ap],Gq="_end",bq=[0,[18,[1,[0,0,hx]],[2,0,[11,F3,[17,[0,ce,1,0],0]]]],W3],xG=[0,[17,0,0],pa],rG=[0,[17,[0,ce,1,0],[12,Di,[17,0,0]]],Tj],eG="Object literal may not have data and accessor property with the same name",tG="Object literal may not have multiple get/set accessors with the same name",nG="Unexpected token <. Remember, adjacent JSX elements must be wrapped in an enclosing parent tag",uG="Modules can only have 1 since they are either an ES module xor they are a CommonJS module.",iG="Found both `declare module.exports` and `declare export` in the same module. ",fG="`let [` is ambiguous in this position because it is either a `let` binding pattern, or a member expression.",cG="Async functions can only be declared at top level or immediately within another function.",sG="`await` is an invalid identifier in async functions",oG="`await` is not allowed in async function parameters.",vG="Computed properties must have a value.",aG="Constructor can't be an accessor.",lG="Constructor can't be an async function.",pG="Constructor can't be a generator.",dG="It is sufficient for your declare function to just have a Promise return type.",yG="async is an implementation detail and isn't necessary for your declare function statement. ",mG="`declare` modifier can only appear on class fields.",kG="Unexpected token `=`. Initializers are not allowed in a `declare`.",hG="`declare export interface` is not supported. Use `export interface` instead.",_G="`declare export type` is not supported. Use `export type` instead.",wG="Unexpected token `=`. Initializers are not allowed in a `declare opaque type`.",TG="Classes may only have one constructor",SG="Duplicate `declare module.exports` statement!",EG="Rest element must be final element of an array pattern",gG="Cannot export an enum with `export type`, try `export enum E {}` or `module.exports = E;` instead.",AG="Enum members are separated with `,`. Replace `;` with `,`.",PG="`const` enums are not supported. Flow Enums are designed to allow for inlining, however the inlining itself needs to be part of the build system (whatever you use) rather than Flow itself.",CG="Expected an object pattern, array pattern, or an identifier but found an expression instead",NG="Missing comma between export specifiers",RG="Generators can only be declared at top level or immediately within another function.",IG="Getter should have zero parameters",OG="A getter cannot have a `this` parameter.",LG="Illegal break statement",MG="Illegal continue statement",DG="Illegal return statement",jG="Illegal Unicode escape",UG="Missing comma between import specifiers",BG="It cannot be used with `import type` or `import typeof` statements",YG="The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. ",XG="Explicit inexact syntax cannot appear inside an explicit exact object type",JG="Explicit inexact syntax can only appear inside an object type",VG="Component params must be an identifier. If you'd like to destructure, you should use `name as {destructure}`",zG="Components use `renders` instead of `:` to annotate the render type of a component.",KG="A bigint literal must be an integer",ZG="JSX value should be either an expression or a quoted JSX text",WG="Invalid left-hand side in assignment",$G="Invalid left-hand side in exponentiation expression",QG="Invalid left-hand side in for-in",FG="Invalid left-hand side in for-of",HG="Imports within a `declare module` body must always be `import type` or `import typeof`!",qG="Invalid optional indexed access. Indexed access uses bracket notation. Use the format `T?.[K]`.",GG="Invalid regular expression",bG="A bigint literal cannot use exponential notation",xb="Tuple spread elements cannot be optional.",rb="Tuple variance annotations can only be used with labeled tuple elements, e.g. `[+foo: number]`",eb="`typeof` can only be used to get the type of variables.",tb="JSX attributes must only be assigned a non-empty expression",nb="Literals cannot be used as shorthand properties.",ub="Malformed unicode",ib="Object pattern can't contain methods",fb="Expected at least one type parameter.",cb="Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",sb="More than one default clause in switch statement",ob="Illegal newline after throw",vb="Illegal newline before arrow",ab="Missing catch or finally after try",lb="Const must be initialized",pb="Destructuring assignment must be initialized",db="An optional chain may not be used in a `new` expression.",yb="Template literals may not be used in an optional chain.",mb="Rest parameter must be final parameter of an argument list",kb="Private fields may not be deleted.",hb="Private fields can only be referenced from within a class.",_b="Rest property must be final property of an object pattern",wb="Setter should have exactly one parameter",Tb="A setter cannot have a `this` parameter.",Sb="Catch variable may not be eval or arguments in strict mode",Eb="Delete of an unqualified identifier in strict mode.",gb="Duplicate data property in object literal not allowed in strict mode",Ab="Function name may not be eval or arguments in strict mode",Pb="Assignment to eval or arguments is not allowed in strict mode",Cb="Postfix increment/decrement may not have eval or arguments operand in strict mode",Nb="Prefix increment/decrement may not have eval or arguments operand in strict mode",Rb="Strict mode code may not include a with statement",Ib="Number literals with leading zeros are not allowed in strict mode.",Ob="Octal literals are not allowed in strict mode.",Lb="Strict mode function may not have duplicate parameter names",Mb="Parameter name eval or arguments is not allowed in strict mode",Db='Illegal "use strict" directive in function with non-simple parameter list',jb="Use of reserved word in strict mode",Ub="Variable name may not be eval or arguments in strict mode",Bb="You may not access a private field through the `super` keyword.",Yb="Flow does not support abstract classes.",Xb="Flow does not support template literal types.",Jb="A type annotation is required for the `this` parameter.",Vb="Arrow functions cannot have a `this` parameter; arrow functions automatically bind `this` when declared.",zb="Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",Kb="The `this` parameter cannot be optional.",Zb="The `this` parameter must be the first function parameter.",Wb="A trailing comma is not permitted after the rest element",$b="Unexpected end of input",Qb="Explicit inexact syntax must come at the end of an object type",Fb="Opaque type aliases are not allowed in untyped mode",Hb="Unexpected proto modifier",qb="Unexpected reserved word",Gb="Unexpected reserved type",bb="Spreading a type is only allowed inside an object type",x00="Unexpected static modifier",r00="Unexpected `super` outside of a class method",e00="`super()` is only valid in a class constructor",t00="Type aliases are not allowed in untyped mode",n00="Type annotations are not allowed in untyped mode",u00="Type declarations are not allowed in untyped mode",i00="Type exports are not allowed in untyped mode",f00="Type imports are not allowed in untyped mode",c00="Interfaces are not allowed in untyped mode",s00="Unexpected variance sigil",o00="Found a decorator in an unsupported position.",v00="Invalid regular expression: missing /",a00="Unexpected whitespace between `#` and identifier",l00="`yield` is an invalid identifier in generators",p00="Yield expression not allowed in formal parameter",d00=[0,[11,"Duplicate export for `",[2,0,[12,96,0]]],"Duplicate export for `%s`"],y00=[0,[11,"Private fields may only be declared once. `#",[2,0,[11,"` is declared more than once.",0]]],"Private fields may only be declared once. `#%s` is declared more than once."],m00=[0,[11,"bigint enum members need to be initialized, e.g. `",[2,0,[11," = 1n,` in enum `",[2,0,[11,Rs,0]]]]],"bigint enum members need to be initialized, e.g. `%s = 1n,` in enum `%s`."],k00=[0,[11,"Boolean enum members need to be initialized. Use either `",[2,0,[11," = true,` or `",[2,0,[11," = false,` in enum `",[2,0,[11,Rs,0]]]]]]],"Boolean enum members need to be initialized. Use either `%s = true,` or `%s = false,` in enum `%s`."],h00=[0,[11,"Enum member names need to be unique, but the name `",[2,0,[11,"` has already been used before in enum `",[2,0,[11,Rs,0]]]]],"Enum member names need to be unique, but the name `%s` has already been used before in enum `%s`."],_00=[0,[11,OD,[2,0,[11,"` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",0]]],"Enum `%s` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers."],w00="The `...` must come at the end of the enum body. Remove the trailing comma.",T00="The `...` must come after all enum members. Move it to the end of the enum body.",S00=[0,[11,"Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `",[2,0,[11,Rs,0]]],"Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `%s`."],E00=[0,[11,"Enum type `",[2,0,[11,"` is not valid. ",[2,0,0]]]],"Enum type `%s` is not valid. %s"],g00=[0,[11,"Supplied enum type is not valid. ",[2,0,0]],"Supplied enum type is not valid. %s"],A00=[0,[11,"Enum member names and initializers are separated with `=`. Replace `",[2,0,[11,":` with `",[2,0,[11," =`.",0]]]]],"Enum member names and initializers are separated with `=`. Replace `%s:` with `%s =`."],P00=[0,[11,OD,[2,0,[11,"` has type `",[2,0,[11,"`, so the initializer of `",[2,0,[11,"` needs to be a ",[2,0,[11," literal.",0]]]]]]]]],"Enum `%s` has type `%s`, so the initializer of `%s` needs to be a %s literal."],C00=[0,[11,"Symbol enum members cannot be initialized. Use `",[2,0,[11,",` in enum `",[2,0,[11,Rs,0]]]]],"Symbol enum members cannot be initialized. Use `%s,` in enum `%s`."],N00=[0,[11,"The enum member initializer for `",[2,0,[11,"` needs to be a literal (either a boolean, number, or string) in enum `",[2,0,[11,Rs,0]]]]],"The enum member initializer for `%s` needs to be a literal (either a boolean, number, or string) in enum `%s`."],R00=[0,[11,"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `",[2,0,[11,"`, consider using `",[2,0,[11,"`, in enum `",[2,0,[11,Rs,0]]]]]]],"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%s`, consider using `%s`, in enum `%s`."],I00=[0,[11,"Number enum members need to be initialized, e.g. `",[2,0,[11," = 1,` in enum `",[2,0,[11,Rs,0]]]]],"Number enum members need to be initialized, e.g. `%s = 1,` in enum `%s`."],O00=[0,[11,"String enum members need to consistently either all use initializers, or use no initializers, in enum ",[2,0,[12,46,0]]],"String enum members need to consistently either all use initializers, or use no initializers, in enum %s."],L00=[0,[11,"Expected corresponding JSX closing tag for ",[2,0,0]],"Expected corresponding JSX closing tag for %s"],M00="immediately within another function.",D00="In strict mode code, functions can only be declared at top level or ",j00="inside a block, or as the body of an if statement.",U00="In non-strict mode code, functions can only be declared at top level, ",B00="static ",Y00=hx,X00="methods",J00="fields",V00=qM,z00=[0,[11,"Classes may not have ",[2,0,[2,0,[11," named `",[2,0,[11,Rs,0]]]]]],"Classes may not have %s%s named `%s`."],K00=tB,Z00=hx,W00=[0,[11,"String params require local bindings using `as` renaming. You can use `'",[2,0,[11,"' as ",[2,0,[2,0,[11,": ` ",0]]]]]],"String params require local bindings using `as` renaming. You can use `'%s' as %s%s: ` "],$00="Remove the period.",Q00="Indexed access uses bracket notation.",F00=[0,[11,"Invalid indexed access. ",[2,0,[11," Use the format `T[K]`.",0]]],"Invalid indexed access. %s Use the format `T[K]`."],H00=[0,[11,"Invalid flags supplied to RegExp constructor '",[2,0,[12,39,0]]],"Invalid flags supplied to RegExp constructor '%s'"],q00=[0,[11,"JSX element ",[2,0,[11," has no corresponding closing tag.",0]]],"JSX element %s has no corresponding closing tag."],G00=[0,[11,UD,[2,0,[11,"`. Parentheses are required to combine `??` with `&&` or `||` expressions.",0]]],"Unexpected token `%s`. Parentheses are required to combine `??` with `&&` or `||` expressions."],b00=[0,[2,0,[11," '",[2,0,[11,"' has already been declared",0]]]],"%s '%s' has already been declared"],xx0=hx,rx0=H3,ex0=" You can try using JavaScript private fields by prepending `#` to the field name.",tx0=El,nx0=" Fields and methods are public by default. You can simply omit the `public` keyword.",ux0=z3,ix0=[0,[11,"Flow does not support using `",[2,0,[11,"` in classes.",[2,0,0]]]],"Flow does not support using `%s` in classes.%s"],fx0=[0,[11,"Private fields must be declared before they can be referenced. `#",[2,0,[11,"` has not been declared.",0]]],"Private fields must be declared before they can be referenced. `#%s` has not been declared."],cx0=[0,[11,SU,[2,0,0]],"Unexpected %s"],sx0=[0,[11,UD,[2,0,[11,"`. Did you mean `",[2,0,[11,"`?",0]]]]],"Unexpected token `%s`. Did you mean `%s`?"],ox0=[0,[11,SU,[2,0,[11,", expected ",[2,0,0]]]],"Unexpected %s, expected %s"],vx0=[0,[11,"Undefined label '",[2,0,[12,39,0]]],"Undefined label '%s'"],ax0="Parse_error.Error",lx0=[0,[0,36,37],[0,48,58],[0,65,91],[0,95,96],[0,97,Lt],[0,G4,Yk],[0,MR,uh],[0,yN,id],[0,Lp,ig],[0,_a,MT],[0,bC,b8],[0,qr,706],[0,ej,722],[0,736,741],[0,748,749],[0,750,751],[0,768,885],[0,886,888],[0,890,894],[0,895,896],[0,902,907],[0,908,909],[0,910,930],[0,QB,1014],[0,1015,1154],[0,1155,1160],[0,1162,1328],[0,1329,1367],[0,1369,1370],[0,1376,1417],[0,1425,1470],[0,1471,1472],[0,1473,1475],[0,1476,1478],[0,1479,1480],[0,1488,1515],[0,1519,1523],[0,1552,1563],[0,1568,1642],[0,1646,1748],[0,1749,1757],[0,1759,1769],[0,1770,1789],[0,1791,1792],[0,1808,1867],[0,1869,1970],[0,1984,2038],[0,2042,2043],[0,2045,2046],[0,hN,2094],[0,2112,2140],[0,2144,2155],[0,2208,2229],[0,2230,2238],[0,2259,2274],[0,2275,2404],[0,2406,2416],[0,2417,2436],[0,2437,2445],[0,2447,2449],[0,2451,2473],[0,2474,2481],[0,2482,2483],[0,2486,2490],[0,2492,2501],[0,2503,2505],[0,2507,2511],[0,2519,2520],[0,2524,2526],[0,2527,2532],[0,2534,2546],[0,2556,2557],[0,2558,2559],[0,2561,2564],[0,2565,2571],[0,2575,2577],[0,2579,2601],[0,2602,2609],[0,2610,2612],[0,2613,2615],[0,2616,2618],[0,2620,2621],[0,2622,2627],[0,2631,2633],[0,2635,2638],[0,2641,2642],[0,2649,2653],[0,2654,2655],[0,2662,2678],[0,2689,2692],[0,2693,2702],[0,2703,2706],[0,2707,2729],[0,2730,2737],[0,2738,2740],[0,2741,2746],[0,2748,2758],[0,2759,2762],[0,2763,2766],[0,2768,2769],[0,2784,2788],[0,2790,2800],[0,2809,2816],[0,2817,2820],[0,2821,2829],[0,2831,2833],[0,2835,2857],[0,2858,2865],[0,2866,2868],[0,2869,2874],[0,2876,2885],[0,2887,2889],[0,2891,2894],[0,2902,2904],[0,2908,2910],[0,2911,2916],[0,2918,2928],[0,2929,2930],[0,2946,2948],[0,2949,2955],[0,2958,2961],[0,2962,2966],[0,2969,2971],[0,2972,2973],[0,2974,2976],[0,2979,2981],[0,2984,2987],[0,2990,3002],[0,3006,3011],[0,3014,3017],[0,3018,3022],[0,3024,3025],[0,3031,3032],[0,3046,3056],[0,3072,3085],[0,3086,3089],[0,3090,3113],[0,3114,3130],[0,3133,3141],[0,3142,3145],[0,3146,3150],[0,3157,3159],[0,3160,3163],[0,3168,3172],[0,3174,3184],[0,3200,3204],[0,3205,3213],[0,3214,3217],[0,3218,3241],[0,3242,3252],[0,3253,3258],[0,3260,3269],[0,3270,3273],[0,3274,3278],[0,3285,3287],[0,3294,3295],[0,3296,3300],[0,3302,3312],[0,3313,3315],[0,3328,3332],[0,3333,3341],[0,3342,3345],[0,3346,3397],[0,3398,3401],[0,3402,3407],[0,3412,3416],[0,3423,3428],[0,3430,3440],[0,3450,3456],[0,3458,3460],[0,3461,3479],[0,3482,3506],[0,3507,3516],[0,3517,3518],[0,3520,3527],[0,3530,3531],[0,3535,3541],[0,3542,3543],[0,3544,3552],[0,3558,3568],[0,3570,3572],[0,3585,3643],[0,3648,3663],[0,3664,3674],[0,3713,3715],[0,3716,3717],[0,3718,3723],[0,3724,3748],[0,3749,3750],[0,3751,3774],[0,3776,3781],[0,3782,3783],[0,3784,3790],[0,3792,3802],[0,3804,3808],[0,3840,3841],[0,3864,3866],[0,3872,3882],[0,3893,3894],[0,3895,3896],[0,3897,3898],[0,3902,3912],[0,3913,3949],[0,3953,3973],[0,3974,3992],[0,3993,4029],[0,4038,4039],[0,aU,4170],[0,4176,4254],[0,4256,4294],[0,4295,4296],[0,4301,4302],[0,4304,4347],[0,4348,4681],[0,4682,4686],[0,4688,4695],[0,4696,4697],[0,4698,4702],[0,4704,4745],[0,4746,4750],[0,4752,4785],[0,4786,4790],[0,4792,4799],[0,4800,4801],[0,4802,4806],[0,4808,4823],[0,4824,4881],[0,4882,4886],[0,4888,4955],[0,4957,4960],[0,4969,4978],[0,4992,5008],[0,5024,5110],[0,5112,5118],[0,5121,5741],[0,5743,xS],[0,5761,5787],[0,5792,5867],[0,5870,5881],[0,5888,5901],[0,5902,5909],[0,5920,5941],[0,5952,5972],[0,5984,5997],[0,5998,6001],[0,6002,6004],[0,6016,6100],[0,6103,6104],[0,6108,6110],[0,6112,6122],[0,6155,6158],[0,6160,6170],[0,6176,6265],[0,6272,6315],[0,6320,6390],[0,6400,6431],[0,6432,6444],[0,6448,6460],[0,6470,6510],[0,6512,6517],[0,6528,6572],[0,6576,6602],[0,6608,6619],[0,6656,6684],[0,6688,6751],[0,6752,6781],[0,6783,6794],[0,6800,6810],[0,6823,6824],[0,6832,6846],[0,6912,6988],[0,6992,7002],[0,7019,7028],[0,7040,7156],[0,7168,7224],[0,7232,7242],[0,7245,7294],[0,7296,7305],[0,7312,7355],[0,7357,7360],[0,7376,7379],[0,7380,7419],[0,7424,7674],[0,7675,7958],[0,7960,7966],[0,7968,8006],[0,8008,8014],[0,8016,8024],[0,8025,8026],[0,8027,8028],[0,8029,8030],[0,8031,8062],[0,8064,8117],[0,8118,8125],[0,8126,8127],[0,8130,8133],[0,8134,8141],[0,8144,8148],[0,8150,8156],[0,8160,8173],[0,8178,8181],[0,8182,8189],[0,FU,rU],[0,8255,8257],[0,8276,8277],[0,$8,8306],[0,ad,8320],[0,8336,8349],[0,8400,8413],[0,8417,8418],[0,8421,8433],[0,Rd,8451],[0,J5,8456],[0,8458,B8],[0,o8,8470],[0,FB,8478],[0,Ud,wp],[0,T8,S8],[0,Hp,x8],[0,8490,8506],[0,8508,8512],[0,8517,8522],[0,h8,8527],[0,8544,8585],[0,11264,11311],[0,11312,11359],[0,11360,11493],[0,11499,11508],[0,11520,Q4],[0,W8,11560],[0,$4,11566],[0,11568,11624],[0,Y5,11632],[0,n5,11671],[0,11680,Np],[0,11688,P8],[0,11696,ep],[0,11704,M8],[0,11712,rd],[0,11720,Q5],[0,11728,Wp],[0,11736,11743],[0,11744,11776],[0,12293,12296],[0,12321,W4],[0,12337,12342],[0,12344,12349],[0,12353,12439],[0,12441,H5],[0,12449,Sd],[0,12540,12544],[0,12549,j5],[0,12593,12687],[0,12704,12731],[0,12784,12800],[0,13312,19894],[0,19968,40944],[0,40960,42125],[0,42192,42238],[0,42240,42509],[0,42512,42540],[0,42560,42608],[0,42612,td],[0,42623,42738],[0,42775,42784],[0,42786,42889],[0,42891,42944],[0,42946,42951],[0,Q8,43048],[0,43072,43124],[0,43136,43206],[0,43216,43226],[0,43232,43256],[0,W5,fd],[0,43261,43310],[0,43312,43348],[0,43360,43389],[0,43392,43457],[0,Up,43482],[0,43488,wd],[0,43520,43575],[0,43584,43598],[0,43600,43610],[0,43616,43639],[0,D8,43715],[0,43739,43742],[0,43744,43760],[0,43762,43767],[0,43777,43783],[0,43785,43791],[0,43793,43799],[0,43808,v5],[0,43816,y8],[0,43824,d5],[0,43868,_8],[0,43888,44011],[0,44012,44014],[0,44016,44026],[0,44032,55204],[0,55216,55239],[0,55243,55292],[0,63744,64110],[0,64112,64218],[0,64256,64263],[0,64275,64280],[0,Vp,r5],[0,64298,Td],[0,64312,sd],[0,i5,dp],[0,64320,jp],[0,64323,S5],[0,64326,64434],[0,64467,64830],[0,64848,64912],[0,64914,64968],[0,65008,65020],[0,65024,65040],[0,65056,65072],[0,65075,65077],[0,65101,65104],[0,65136,Dp],[0,65142,65277],[0,65296,65306],[0,65313,65339],[0,65343,K5],[0,65345,65371],[0,65382,65471],[0,65474,65480],[0,65482,65488],[0,65490,65496],[0,65498,65501],[0,fl,g8],[0,65549,R8],[0,65576,Sp],[0,65596,A5],[0,65599,65614],[0,65616,65630],[0,65664,65787],[0,65856,65909],[0,66045,66046],[0,66176,66205],[0,66208,66257],[0,66272,66273],[0,66304,66336],[0,66349,66379],[0,66384,66427],[0,66432,66462],[0,66464,66500],[0,66504,w5],[0,66513,66518],[0,66560,66718],[0,66720,66730],[0,66736,66772],[0,66776,66812],[0,66816,66856],[0,66864,66916],[0,67072,67383],[0,67392,67414],[0,67424,67432],[0,67584,67590],[0,_d,E5],[0,67594,b5],[0,67639,67641],[0,cd,67645],[0,67647,67670],[0,67680,67703],[0,67712,67743],[0,67808,Id],[0,67828,67830],[0,67840,67862],[0,67872,67898],[0,67968,68024],[0,68030,68032],[0,Vd,68100],[0,68101,68103],[0,68108,kp],[0,68117,Md],[0,68121,68150],[0,68152,68155],[0,68159,68160],[0,68192,68221],[0,68224,68253],[0,68288,b4],[0,68297,68327],[0,68352,68406],[0,68416,68438],[0,68448,68467],[0,68480,68498],[0,68608,68681],[0,68736,68787],[0,68800,68851],[0,68864,68904],[0,68912,68922],[0,69376,69405],[0,w8,69416],[0,69424,69457],[0,69600,69623],[0,69632,69703],[0,69734,Ip],[0,69759,69819],[0,69840,69865],[0,69872,69882],[0,69888,69941],[0,69942,69952],[0,q8,E8],[0,69968,70004],[0,up,70007],[0,70016,70085],[0,70089,70093],[0,70096,rp],[0,Dd,70109],[0,70144,pd],[0,70163,70200],[0,70206,70207],[0,70272,L8],[0,h5,hp],[0,70282,o5],[0,70287,sp],[0,70303,70313],[0,70320,70379],[0,70384,70394],[0,70400,J8],[0,70405,70413],[0,70415,70417],[0,70419,V8],[0,70442,Ap],[0,70450,Ld],[0,70453,70458],[0,70459,70469],[0,70471,70473],[0,70475,70478],[0,jd,70481],[0,70487,70488],[0,70493,70500],[0,70502,70509],[0,70512,70517],[0,70656,70731],[0,70736,70746],[0,xd,70752],[0,70784,L5],[0,N5,70856],[0,70864,70874],[0,71040,71094],[0,71096,71105],[0,71128,71134],[0,71168,71233],[0,t8,71237],[0,71248,71258],[0,71296,71353],[0,71360,71370],[0,71424,71451],[0,71453,71468],[0,71472,71482],[0,71680,71739],[0,71840,71914],[0,71935,71936],[0,72096,72104],[0,72106,72152],[0,72154,U8],[0,V4,72165],[0,dd,72255],[0,72263,72264],[0,k5,72346],[0,m8,72350],[0,72384,72441],[0,72704,l5],[0,72714,72759],[0,72760,72769],[0,72784,72794],[0,72818,72848],[0,72850,72872],[0,72873,72887],[0,72960,np],[0,72968,O5],[0,72971,73015],[0,73018,73019],[0,73020,73022],[0,73023,73032],[0,73040,73050],[0,73056,hd],[0,73063,z8],[0,73066,73103],[0,73104,73106],[0,73107,73113],[0,73120,73130],[0,73440,73463],[0,73728,74650],[0,74752,74863],[0,74880,75076],[0,77824,78895],[0,82944,83527],[0,92160,92729],[0,92736,92767],[0,92768,92778],[0,92880,92910],[0,92912,92917],[0,92928,92983],[0,92992,92996],[0,93008,93018],[0,93027,93048],[0,93053,93072],[0,93760,93824],[0,93952,94027],[0,F8,94088],[0,94095,94112],[0,94176,v8],[0,Zp,94180],[0,94208,100344],[0,100352,101107],[0,110592,110879],[0,110928,110931],[0,110948,110952],[0,110960,111356],[0,113664,113771],[0,113776,113789],[0,113792,113801],[0,113808,113818],[0,113821,113823],[0,119141,119146],[0,119149,119155],[0,119163,119171],[0,119173,119180],[0,119210,119214],[0,119362,119365],[0,119808,Z4],[0,119894,K8],[0,119966,119968],[0,Jd,119971],[0,119973,119975],[0,119977,i8],[0,119982,zp],[0,z5,I5],[0,119997,m5],[0,120005,Xp],[0,120071,120075],[0,120077,f8],[0,120086,T5],[0,120094,d8],[0,120123,Gp],[0,120128,ld],[0,$p,120135],[0,120138,Fp],[0,120146,120486],[0,120488,Ed],[0,120514,O8],[0,120540,a5],[0,120572,q4],[0,120598,fp],[0,120630,md],[0,120656,F5],[0,120688,Bd],[0,120714,c5],[0,120746,Nd],[0,120772,120780],[0,120782,120832],[0,121344,121399],[0,121403,121453],[0,121461,121462],[0,121476,121477],[0,121499,121504],[0,121505,121520],[0,122880,122887],[0,122888,122905],[0,122907,122914],[0,122915,122917],[0,122918,122923],[0,123136,123181],[0,123184,123198],[0,123200,123210],[0,Op,123215],[0,123584,123642],[0,124928,125125],[0,125136,125143],[0,125184,125260],[0,125264,125274],[0,126464,U5],[0,126469,Pd],[0,126497,q5],[0,qp,126501],[0,cp,P5],[0,126505,vp],[0,126516,r8],[0,z4,u5],[0,e5,126524],[0,Z5,126531],[0,$5,Mp],[0,R5,g5],[0,gd,V5],[0,126541,j8],[0,126545,Pp],[0,gr,126549],[0,C5,Ad],[0,gp,k8],[0,c8,Yd],[0,H4,od],[0,ip,Cd],[0,126561,e8],[0,tp,126565],[0,126567,nd],[0,126572,xp],[0,126580,A8],[0,126585,Bp],[0,yp,Xd],[0,126592,f5],[0,126603,126620],[0,126625,Z8],[0,126629,x5],[0,126635,126652],[0,131072,173783],[0,173824,177973],[0,177984,178206],[0,178208,183970],[0,183984,191457],[0,194560,195102],[0,917760,918e3]],px0=[0,1,0],dx0=[0,0,[0,1,0],[0,1,0]],yx0=_U,mx0="end of input",kx0=Tl,hx0="template literal part",_x0=Tl,wx0=oU,Tx0=_U,Sx0=Tl,Ex0=wa,gx0=Tl,Ax0=wv,Px0=Tl,Cx0=Ua,Nx0="an",Rx0=Rt,Ix0=Dt,Ox0=[0,[11,"token `",[2,0,[12,96,0]]],"token `%s`"],Lx0="{",Mx0=G8,Dx0="{|",jx0="|}",Ux0=WM,Bx0=ZS,Yx0="[",Xx0="]",Jx0=CT,Vx0=GM,zx0=ic,Kx0="=>",Zx0="...",Wx0=Nj,$x0=qM,Qx0=ya,Fx0=s8,Hx0=Po,qx0=b3,Gx0=De,bx0=Ye,xr0=lv,rr0=Be,er0=yd,tr0=dl,nr0=Qp,ur0=Tp,ir0=ol,fr0=ka,cr0=_v,sr0=Is,or0=Cs,vr0=Me,ar0=bp,lr0=t5,pr0=Ie,dr0=pv,yr0=ed,mr0=Yp,kr0=N8,hr0=$3,_r0=Bc,wr0=je,Tr0=Kp,Sr0=av,Er0=sl,gr0=Ps,Ar0=Os,Pr0=pl,Cr0=p8,Nr0=j2,Rr0=Oa,Ir0=Tv,Or0=b2,Lr0=u8,Mr0=El,Dr0=H3,jr0=z3,Ur0=Y2,Br0=Oe,Yr0=tl,Xr0=fi,Jr0=Xh,Vr0=Hh,zr0=Co,Kr0=Pv,Zr0="%checks",Wr0=AB,$r0=ND,Qr0=UU,Fr0=fY,Hr0=Yj,qr0=_D,Gr0=zM,br0=yY,x10=dj,r10=SD,e10=SY,t10=CD,n10=bj,u10=pY,i10=nB,f10=X_,c10="?.",s10=hm,o10=tB,v10=Ov,a10=Ej,l10=kY,p10=gY,d10=I8,y10=J4,m10=mD,k10=qD,h10=dD,_10=FD,w10=MD,T10=IU,S10=WT,E10=xl,g10=oD,A10=PD,P10=QM,C10=js,N10=Mt,R10=G2,I10=CB,O10=KD,L10=bD,M10=ZD,D10=lB,j10=KB,U10=Dj,B10=hx,Y10=y5,X10=_p,J10=se,V10=wa,z10=wv,K10=Ua,Z10=Os,W10=wx,$10=B5,Q10=X8,F10=vd,H10=Y8,q10=ga,G10=zj,b10=kl,x20=ha,r20=BU,e20=vj,t20=V3,n20=V3,u20=mY,i20=V3,f20=V3,c20=G8,s20=G8,o20=mY,v20=G2,a20=G2,l20=rl,p20=D5,d20="T_LCURLY",y20="T_RCURLY",m20="T_LCURLYBAR",k20="T_RCURLYBAR",h20="T_LPAREN",_20="T_RPAREN",w20="T_LBRACKET",T20="T_RBRACKET",S20="T_SEMICOLON",E20="T_COMMA",g20="T_PERIOD",A20="T_ARROW",P20="T_ELLIPSIS",C20="T_AT",N20="T_POUND",R20="T_FUNCTION",I20="T_IF",O20="T_IN",L20="T_INSTANCEOF",M20="T_RETURN",D20="T_SWITCH",j20="T_THIS",U20="T_THROW",B20="T_TRY",Y20="T_VAR",X20="T_WHILE",J20="T_WITH",V20="T_CONST",z20="T_LET",K20="T_NULL",Z20="T_FALSE",W20="T_TRUE",$20="T_BREAK",Q20="T_CASE",F20="T_CATCH",H20="T_CONTINUE",q20="T_DEFAULT",G20="T_DO",b20="T_FINALLY",xe0="T_FOR",re0="T_CLASS",ee0="T_EXTENDS",te0="T_STATIC",ne0="T_ELSE",ue0="T_NEW",ie0="T_DELETE",fe0="T_TYPEOF",ce0="T_VOID",se0="T_ENUM",oe0="T_EXPORT",ve0="T_IMPORT",ae0="T_SUPER",le0="T_IMPLEMENTS",pe0="T_INTERFACE",de0="T_PACKAGE",ye0="T_PRIVATE",me0="T_PROTECTED",ke0="T_PUBLIC",he0="T_YIELD",_e0="T_DEBUGGER",we0="T_DECLARE",Te0="T_TYPE",Se0="T_OPAQUE",Ee0="T_OF",ge0="T_ASYNC",Ae0="T_AWAIT",Pe0="T_CHECKS",Ce0="T_RSHIFT3_ASSIGN",Ne0="T_RSHIFT_ASSIGN",Re0="T_LSHIFT_ASSIGN",Ie0="T_BIT_XOR_ASSIGN",Oe0="T_BIT_OR_ASSIGN",Le0="T_BIT_AND_ASSIGN",Me0="T_MOD_ASSIGN",De0="T_DIV_ASSIGN",je0="T_MULT_ASSIGN",Ue0="T_EXP_ASSIGN",Be0="T_MINUS_ASSIGN",Ye0="T_PLUS_ASSIGN",Xe0="T_NULLISH_ASSIGN",Je0="T_AND_ASSIGN",Ve0="T_OR_ASSIGN",ze0="T_ASSIGN",Ke0="T_PLING_PERIOD",Ze0="T_PLING_PLING",We0="T_PLING",$e0="T_COLON",Qe0="T_OR",Fe0="T_AND",He0="T_BIT_OR",qe0="T_BIT_XOR",Ge0="T_BIT_AND",be0="T_EQUAL",xt0="T_NOT_EQUAL",rt0="T_STRICT_EQUAL",et0="T_STRICT_NOT_EQUAL",tt0="T_LESS_THAN_EQUAL",nt0="T_GREATER_THAN_EQUAL",ut0="T_LESS_THAN",it0="T_GREATER_THAN",ft0="T_LSHIFT",ct0="T_RSHIFT",st0="T_RSHIFT3",ot0="T_PLUS",vt0="T_MINUS",at0="T_DIV",lt0="T_MULT",pt0="T_EXP",dt0="T_MOD",yt0="T_NOT",mt0="T_BIT_NOT",kt0="T_INCR",ht0="T_DECR",_t0="T_EOF",wt0="T_ANY_TYPE",Tt0="T_MIXED_TYPE",St0="T_EMPTY_TYPE",Et0="T_NUMBER_TYPE",gt0="T_BIGINT_TYPE",At0="T_STRING_TYPE",Pt0="T_VOID_TYPE",Ct0="T_SYMBOL_TYPE",Nt0="T_UNKNOWN_TYPE",Rt0="T_NEVER_TYPE",It0="T_UNDEFINED_TYPE",Ot0="T_KEYOF",Lt0="T_READONLY",Mt0="T_INFER",Dt0="T_IS",jt0="T_ASSERTS",Ut0=rj,Bt0=rj,Yt0="T_NUMBER",Xt0="T_BIGINT",Jt0="T_STRING",Vt0="T_TEMPLATE_PART",zt0="T_IDENTIFIER",Kt0="T_REGEXP",Zt0="T_INTERPRETER",Wt0="T_ERROR",$t0="T_JSX_IDENTIFIER",Qt0=lY,Ft0=lY,Ht0="T_BOOLEAN_TYPE",qt0="T_NUMBER_SINGLETON_TYPE",Gt0="T_BIGINT_SINGLETON_TYPE",bt0=[0,fU,US,9],xn0=[0,fU,GT,9],rn0=wj,en0="*/",tn0=wj,nn0="unreachable line_comment",un0="unreachable string_quote",in0="\\",fn0="unreachable template_part",cn0=`\r -`,sn0=hT,on0="unreachable regexp_class",vn0=UB,an0="unreachable regexp_body",ln0=hx,pn0=hx,dn0=hx,yn0=hx,mn0=PB,kn0="{'>'}",hn0=xl,_n0="{'}'}",wn0=G8,Tn0=So,Sn0=CT,En0=J4,gn0=PB,An0=So,Pn0=CT,Cn0=J4,Nn0="unreachable type_token wholenumber",Rn0="unreachable type_token wholebigint",In0="unreachable type_token floatbigint",On0="unreachable type_token scinumber",Ln0="unreachable type_token scibigint",Mn0="unreachable type_token hexnumber",Dn0="unreachable type_token hexbigint",jn0="unreachable type_token legacyoctnumber",Un0="unreachable type_token octnumber",Bn0="unreachable type_token octbigint",Yn0="unreachable type_token binnumber",Xn0="unreachable type_token bigbigint",Jn0="unreachable type_token",Vn0=DB,zn0=[11,1],Kn0=[11,0],Zn0="unreachable template_tail",Wn0=hx,$n0=hx,Qn0="unreachable jsx_child",Fn0="unreachable jsx_tag",Hn0=[0,ED],qn0=[0,913],Gn0=[0,_a],bn0=[0,gh],x70=[0,HD],r70=[0,sY],e70=[0,8747],t70=[0,EB],n70=[0,916],u70=[0,8225],i70=[0,935],f70=[0,wU],c70=[0,914],s70=[0,JU],o70=[0,QD],v70=[0,HB],a70=[0,915],l70=[0,uY],p70=[0,919],d70=[0,917],y70=[0,IR],m70=[0,mB],k70=[0,jD],h70=[0,924],_70=[0,923],w70=[0,922],T70=[0,hY],S70=[0,921],E70=[0,nj],g70=[0,GT],A70=[0,bM],P70=[0,bC],C70=[0,927],N70=[0,937],R70=[0,vY],I70=[0,aE],O70=[0,xj],L70=[0,338],M70=[0,352],D70=[0,929],j70=[0,936],U70=[0,8243],B70=[0,928],Y70=[0,934],X70=[0,oB],J70=[0,$M],V70=[0,933],z70=[0,zU],K70=[0,pB],Z70=[0,qB],W70=[0,920],$70=[0,932],Q70=[0,nD],F70=[0,xU],H70=[0,$j],q70=[0,MU],G70=[0,918],b70=[0,376],xu0=[0,uU],ru0=[0,926],eu0=[0,jU],tu0=[0,QB],nu0=[0,925],uu0=[0,39],iu0=[0,8736],fu0=[0,8743],cu0=[0,38],su0=[0,945],ou0=[0,8501],vu0=[0,Pa],au0=[0,8226],lu0=[0,Kj],pu0=[0,946],du0=[0,8222],yu0=[0,DU],mu0=[0,aY],ku0=[0,8776],hu0=[0,NB],_u0=[0,8773],wu0=[0,9827],Tu0=[0,ej],Su0=[0,967],Eu0=[0,Gj],gu0=[0,id],Au0=[0,dU],Pu0=[0,gT],Cu0=[0,8595],Nu0=[0,8224],Ru0=[0,8659],Iu0=[0,Rj],Ou0=[0,8746],Lu0=[0,8629],Mu0=[0,p5],Du0=[0,8745],ju0=[0,8195],Uu0=[0,8709],Bu0=[0,wY],Yu0=[0,EY],Xu0=[0,Lj],Ju0=[0,b8],Vu0=[0,9830],zu0=[0,8707],Ku0=[0,8364],Zu0=[0,VB],Wu0=[0,Ta],$u0=[0,951],Qu0=[0,8801],Fu0=[0,949],Hu0=[0,8194],qu0=[0,8805],Gu0=[0,947],bu0=[0,8260],xi0=[0,RD],ri0=[0,PU],ei0=[0,US],ti0=[0,8704],ni0=[0,TT],ui0=[0,WU],ii0=[0,8230],fi0=[0,9829],ci0=[0,8596],si0=[0,8660],oi0=[0,62],vi0=[0,402],ai0=[0,948],li0=[0,Jj],pi0=[0,H8],di0=[0,8712],yi0=[0,pU],mi0=[0,953],ki0=[0,8734],hi0=[0,8465],_i0=[0,rY],wi0=[0,8220],Ti0=[0,8968],Si0=[0,8592],Ei0=[0,Yk],gi0=[0,10216],Ai0=[0,955],Pi0=[0,8656],Ci0=[0,954],Ni0=[0,60],Ri0=[0,8216],Ii0=[0,8249],Oi0=[0,rU],Li0=[0,9674],Mi0=[0,8727],Di0=[0,8970],ji0=[0,tU],Ui0=[0,8711],Bi0=[0,956],Yi0=[0,8722],Xi0=[0,yN],Ji0=[0,MR],Vi0=[0,8212],zi0=[0,pD],Ki0=[0,8804],Zi0=[0,957],Wi0=[0,ZM],$i0=[0,8836],Qi0=[0,8713],Fi0=[0,Wj],Hi0=[0,8715],qi0=[0,8800],Gi0=[0,8853],bi0=[0,959],xf0=[0,969],rf0=[0,8254],ef0=[0,gB],tf0=[0,339],nf0=[0,MC],uf0=[0,GU],if0=[0,uh],ff0=[0,el],cf0=[0,8855],sf0=[0,SS],of0=[0,qr],vf0=[0,Lp],af0=[0,G4],lf0=[0,ZB],pf0=[0,ID],df0=[0,982],yf0=[0,960],mf0=[0,966],kf0=[0,8869],hf0=[0,8240],_f0=[0,8706],wf0=[0,8744],Tf0=[0,8211],Sf0=[0,10217],Ef0=[0,8730],gf0=[0,8658],Af0=[0,34],Pf0=[0,968],Cf0=[0,8733],Nf0=[0,8719],Rf0=[0,961],If0=[0,8971],Of0=[0,dY],Lf0=[0,8476],Mf0=[0,8221],Df0=[0,8969],jf0=[0,8594],Uf0=[0,ig],Bf0=[0,VU],Yf0=[0,sB],Xf0=[0,8901],Jf0=[0,353],Vf0=[0,8218],zf0=[0,8217],Kf0=[0,8250],Zf0=[0,8835],Wf0=[0,8721],$f0=[0,8838],Qf0=[0,8834],Ff0=[0,9824],Hf0=[0,8764],qf0=[0,962],Gf0=[0,963],bf0=[0,8207],xc0=[0,952],rc0=[0,8756],ec0=[0,964],tc0=[0,l8],nc0=[0,8839],uc0=[0,FM],ic0=[0,yB],fc0=[0,Ya],cc0=[0,8657],sc0=[0,8482],oc0=[0,MT],vc0=[0,732],ac0=[0,La],lc0=[0,8201],pc0=[0,977],dc0=[0,FB],yc0=[0,Av],mc0=[0,965],kc0=[0,978],hc0=[0,BT],_c0=[0,pk],wc0=[0,Ug],Tc0=[0,FU],Sc0=[0,8205],Ec0=[0,950],gc0=[0,Q3],Ac0=[0,dN],Pc0=[0,og],Cc0=[0,958],Nc0=[0,8593],Rc0=[0,lj],Ic0=[0,8242],Oc0=[0,dE],Lc0="unreachable regexp",Mc0="unreachable token wholenumber",Dc0="unreachable token wholebigint",jc0="unreachable token floatbigint",Uc0="unreachable token scinumber",Bc0="unreachable token scibigint",Yc0="unreachable token hexnumber",Xc0="unreachable token hexbigint",Jc0="unreachable token legacyoctnumber",Vc0="unreachable token legacynonoctnumber",zc0="unreachable token octnumber",Kc0="unreachable token octbigint",Zc0="unreachable token bignumber",Wc0="unreachable token bigint",$c0="unreachable token",Qc0=DB,Fc0=[7,"#!"],Hc0="expected ?",qc0="unreachable string_escape",Gc0=re,bc0=Z3,xs0=Z3,rs0=re,es0=bE,ts0=uB,ns0="n",us0="r",is0="t",fs0=$D,cs0=Z3,ss0=So,os0=So,vs0="unreachable id_char",as0=So,ls0=So,ps0=Z3,ds0=BD,ys0=Xj,ms0=uS,ks0=[24,"token ILLEGAL"],hs0=[0,[11,"the identifier `",[2,0,[12,96,0]]],"the identifier `%s`"],_s0=[0,1],ws0=[0,1],Ts0=_j,Ss0=_j,Es0=[0,[11,"an identifier. When exporting a ",[2,0,[11," as a named export, you must specify a ",[2,0,[11," name. Did you mean `export default ",[2,0,[11," ...`?",0]]]]]]],"an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `export default %s ...`?"],gs0=mp,As0="Peeking current location when not available",Ps0=[0,"src/parser/parser_env.ml",351,9],Cs0="Internal Error: Tried to add_declared_private with outside of class scope.",Ns0="Internal Error: `exit_class` called before a matching `enter_class`",Rs0=hx,Is0=[0,0,0],Os0=[0,0,0],Ls0="Parser_env.Try.Rollback",Ms0=hx,Ds0=hx,js0=[0,Y2,si,_f,yj,Mj,Vf,B2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Ii,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Be,Rf,Oi,jc,Sf,Xf,xu,Ou,Ye,ff,E7,qi,Fi,Oc,M7,qu,Sc,De,k7,D7,xf,Tu,Uu,du,Ec,Ue,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Ic,wc,z7,Lu,Yc,yn,Of,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ur,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,b2,O7,$f,yu,hf,p7,Ku,ou,Ei,j2,P7,s7,g7,Rt,Iu,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,q1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,se,Mi,Rc,If,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Ie,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,mU,di,aB,fj,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,I7,Me,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],Us0=[0,Y2,si,_f,Vf,B2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Ii,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Be,Rf,Oi,jc,Sf,Xf,xu,Ou,Ye,ff,E7,qi,Fi,Oc,M7,qu,Sc,De,k7,D7,xf,Tu,Uu,du,Ec,Ue,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Ic,wc,z7,Lu,Yc,yn,Of,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ur,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,b2,O7,$f,yu,hf,p7,Ku,ou,Ei,j2,P7,s7,g7,Rt,Iu,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,q1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,se,Mi,Rc,If,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Ie,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,I7,Me,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],Bs0=[0,Oc,Vn,ei,Iu,Kn,I7,Uc,qf,li,r7,$u,Jc,sc,Ye,nu,Qf,df,pf,lc,a7,O7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Rt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Ou,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,Of,Cf,$c,d7,_i,su,zf,uu,F7,oi,Ue,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,B2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,se,G7,wi,Y2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Ic,ec,qc,ur,j2,De,C7,Ii,ff,H7,Be,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,If,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,q1,Lu,nc,xi,Qi,zn,eu,Fi,Ie,$n,Gu,fu,af,ac,Oi,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Me,Mf,b2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],Ys0=[0,Oc,Vn,ei,Iu,Kn,I7,Uc,qf,li,r7,$u,Jc,sc,Ye,nu,Qf,df,pf,lc,a7,O7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Rt,Vf,Mj,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Ou,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,Of,Cf,$c,d7,aB,_i,su,zf,uu,F7,oi,Ue,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,B2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,se,G7,wi,Y2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Ic,ec,qc,ur,j2,De,C7,Ii,ff,H7,Be,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,fj,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,mU,Df,Hc,Rc,N7,zc,yj,If,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,q1,Lu,nc,xi,Qi,zn,eu,Fi,Ie,$n,Gu,fu,af,ac,Oi,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Me,Mf,b2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],Xs0=ya,Js0=s8,Vs0=Po,zs0=b3,Ks0=De,Zs0=Ye,Ws0=lv,$s0=Be,Qs0=yd,Fs0=dl,Hs0=Qp,qs0=Tp,Gs0=ol,bs0=ka,xo0=_v,ro0=Is,eo0=Cs,to0=Me,no0=bp,uo0=t5,io0=Ie,fo0=pv,co0=ed,so0=Yp,oo0=N8,vo0=$3,ao0=Bc,lo0=je,po0=Kp,do0=av,yo0=sl,mo0=Ps,ko0=Os,ho0=pl,_o0=p8,wo0=j2,To0=Oa,So0=Tv,Eo0=b2,go0=u8,Ao0=El,Po0=H3,Co0=z3,No0=Y2,Ro0=Oe,Io0=tl,Oo0=fi,Lo0=Xh,Mo0=Hh,Do0=Co,jo0=Pv,Uo0=y5,Bo0=_p,Yo0=se,Xo0=wa,Jo0=wv,Vo0=Ua,zo0=Os,Ko0=wx,Zo0=B5,Wo0=X8,$o0=vd,Qo0=Y8,Fo0=ga,Ho0=kl,qo0=ha,Go0=rl,bo0=D5,xv0=[0,mp],rv0=hx,ev0=[0,1],tv0=[0,Sa,1416,6],nv0=[0,Sa,1419,6],uv0=[0,Sa,1522,8],iv0=[0,1],fv0=[0,Sa,1539,8],cv0="Can not have both `static` and `proto`",sv0=je,ov0=YN,vv0=[0,0,0,0],av0=[0,0],lv0=[0,[0,0,0,0,0]],pv0="You should only call render_type after making sure the next token is a renders variant",dv0=kl,yv0=ha,mv0=[0,"a number literal type"],kv0=[0,0],hv0=_o,_v0=[0,0],wv0=[0,"a type"],Tv0=[0,0],Sv0=[0,0],Ev0=[17,1],gv0=[17,0],Av0=[0,Sa,SS,15],Pv0=[0,Sa,aE,15],Cv0=Mt,Nv0=Mt,Rv0=X5,Iv0=hl,Ov0=[0,[11,"Failure while looking up ",[2,0,[11,". Index: ",[4,0,0,0,[11,". Length: ",[4,0,0,0,[12,46,0]]]]]]],"Failure while looking up %s. Index: %d. Length: %d."],Lv0=[0,0,0,0],Mv0="Offset_utils.Offset_lookup_failed",Dv0=d1,jv0=Vj,Uv0=hl,Bv0=X5,Yv0=LU,Xv0=hl,Jv0=X5,Vv0=Lm,zv0=Og,Kv0="normal",Zv0=fi,Wv0="jsxTag",$v0="jsxChild",Qv0="template",Fv0=oU,Hv0="context",qv0=fi,Gv0=[6,0],bv0=[0,0],xa0=[0,1],ra0=[0,4],ea0=[0,2],ta0=[0,3],na0=[0,0],ua0=[0,0,0,0,0,0],ia0=_o,fa0=[0,75],ca0=[0,hx,0],sa0=vn,oa0=[0,75],va0=[0,75],aa0=ya,la0=[0,hx,0],pa0=[0,0,0],da0=[0,0,0],ya0=[0,83],ma0=G2,ka0=G2,ha0=[0,"a regular expression"],_a0=hx,wa0=hx,Ta0=hx,Sa0=[0,"src/parser/expression_parser.ml",1388,17],Ea0=[0,"a template literal part"],ga0=[0,[0,hx,hx],1],Aa0=[0,0],Pa0=Z3,Ca0=BD,Na0=uS,Ra0=uS,Ia0=Xj,Oa0=[0,75],La0=[0,1],Ma0=[0,1],Da0=[0,1],ja0=[0,1],Ua0=[0,1],Ba0=Na,Ya0=av,Xa0=[0,"the identifier `target`"],Ja0=[0,0],Va0=j2,za0=_l,Ka0=_l,Za0=Oa,Wa0=[0,"either a call or access of `super`"],$a0=Oa,Qa0=[0,1],Fa0=[0,0],Ha0=[0,1],qa0=[0,0],Ga0=[0,1],ba0=[0,0],x30=[0,2],r30=[0,3],e30=[0,7],t30=[0,6],n30=[0,4],u30=[0,5],i30=[0,6],f30=[0,[0,17,[0,2]]],c30=[0,[0,18,[0,3]]],s30=[0,[0,19,[0,4]]],o30=[0,[0,0,[0,5]]],v30=[0,[0,1,[0,5]]],a30=[0,[0,2,[0,5]]],l30=[0,[0,3,[0,5]]],p30=[0,[0,5,[0,6]]],d30=[0,[0,7,[0,6]]],y30=[0,[0,4,[0,6]]],m30=[0,[0,6,[0,6]]],k30=[0,[0,8,[0,7]]],h30=[0,[0,9,[0,7]]],_30=[0,[0,10,[0,7]]],w30=[0,[0,11,[0,8]]],T30=[0,[0,12,[0,8]]],S30=[0,[0,15,[0,9]]],E30=[0,[0,13,[0,9]]],g30=[0,[0,14,[1,10]]],A30=[0,[0,16,[0,9]]],P30=[0,[0,21,[0,6]]],C30=[0,[0,20,[0,6]]],N30=[20,hm],R30=[0,[0,8]],I30=[0,[0,7]],O30=[0,[0,6]],L30=[0,[0,10]],M30=[0,[0,9]],D30=[0,[0,11]],j30=[0,[0,5]],U30=[0,[0,4]],B30=[0,[0,2]],Y30=[0,[0,3]],X30=[0,[0,1]],J30=[0,[0,0]],V30=[0,[0,12]],z30=[0,[0,13]],K30=[0,[0,14]],Z30=[0,0],W30=$3,$30=[0,hx,0],Q30="unexpected PrivateName in Property, expected a PrivateField",F30=[0,0,0],H30=Ao,q30="Must be one of the above",G30=[0,1],b30=[0,1],xl0=[0,1],rl0=Ao,el0=Ao,tl0=X_,nl0="Internal Error: private name found in object props",ul0=[0,1],il0=[0,Hk,1854,21],fl0=[0,"a declaration, statement or export specifiers"],cl0=[0,86],sl0=al,ol0=[0,hx,hx,0],vl0=[0,sD],al0="exports",ll0=[0,1],pl0=[0,1],dl0=[0,0],yl0=kB,ml0=[0,86],kl0=_o,hl0=[0,75],_l0=[0,0],wl0=[0,1],Tl0=[0,"the keyword `as`"],Sl0=[0,34],El0=[0,34],gl0=[0,0],Al0=[0,1],Pl0=[0,sD],Cl0=[0,"the keyword `from`"],Nl0=[0,hx,hx,0],Rl0=[0,rB],Il0="Label",Ol0=[0,rB],Ll0=[0,0,0],Ml0=[0,44],Dl0=[0,Hk,429,22],jl0=[0,43],Ul0=[0,Hk,448,22],Bl0=[0,0],Yl0="the token `;`",Xl0=[0,0],Jl0=[0,0],Vl0=XD,zl0=[0,mp],Kl0=XD,Zl0=[24,Rt],Wl0=Ov,$l0=ic,Ql0=[13,"JSX fragment"],Fl0=[0,un],Hl0=[1,un],ql0=[0,hx,hx,0],Gl0=[0,mp],bl0=hx,x60=[0,Hj],r60=[18,[0,0]],e60=[0,Hj],t60=[0,0,0,0],n60=hT,u60="Nooo: ",i60=pv,f60="Parser error: No such thing as an expression pattern!",c60=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],s60=[0,"src/parser/parser_flow.ml",p5,28],o60=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],v60=Vj,a60=Og,l60=Sj,p60=QU,d60=QU,y60=Sj,m60=fi,k60=eD,h60=Y1,_60=d1,w60="InterpreterDirective",T60="interpreter",S60="Program",E60=Sl,g60="BreakStatement",A60=Sl,P60="ContinueStatement",C60="DebuggerStatement",N60=Lv,R60="DeclareExportAllDeclaration",I60=Lv,O60=Pw,L60=HC,M60=pv,D60="DeclareExportDeclaration",j60=go,U60=Y1,B60=Gr,Y60="DeclareModule",X60=H1,J60="DeclareModuleExports",V60=Ea,z60=Y1,K60="DoWhileStatement",Z60="EmptyStatement",W60=Kh,$60=HC,Q60="ExportDefaultDeclaration",F60=Kh,H60=IT,q60=Lv,G60="ExportAllDeclaration",b60=Kh,x40=Lv,r40=Pw,e40=HC,t40="ExportNamedDeclaration",n40="directive",u40=q1,i40="ExpressionStatement",f40=Y1,c40="update",s40=Ea,o40=hu,v40="ForStatement",a40="each",l40=Y1,p40=pn,d40=Ns,y40="ForInStatement",m40=Pv,k40=Y1,h40=pn,_40=Ns,w40="ForOfStatement",T40=hB,S40=oC,E40=Ea,g40="IfStatement",A40=fi,P40=Ps,C40=d1,N40=LD,R40=Lv,I40=Pw,O40="ImportDeclaration",L40=Y1,M40=Sl,D40="LabeledStatement",j40=q2,U40="ReturnStatement",B40="cases",Y40="discriminant",X40="SwitchStatement",J40=q2,V40="ThrowStatement",z40="finalizer",K40="handler",Z40=cn,W40="TryStatement",$40=Y1,Q40=Ea,F40="WhileStatement",H40=Y1,q40=eT,G40="WithStatement",b40=Uj,xp0="ArrayExpression",rp0=U2,ep0=M5,tp0=q1,np0=Ue,up0=QE,ip0=Co,fp0=Y1,cp0=an,sp0=Gr,op0="ArrowFunctionExpression",vp0=H1,ap0=q1,lp0="AsExpression",pp0=X_,dp0=pn,yp0=Ns,mp0=Ia,kp0="AssignmentExpression",hp0=pn,_p0=Ns,wp0=Ia,Tp0="BinaryExpression",Sp0="CallExpression",Ep0=hB,gp0=oC,Ap0=Ea,Pp0="ConditionalExpression",Cp0=Lv,Np0="ImportExpression",Rp0=Ej,Ip0=kY,Op0=hm,Lp0=pn,Mp0=Ns,Dp0=Ia,jp0="LogicalExpression",Up0="MemberExpression",Bp0=KP,Yp0=_l,Xp0="MetaProperty",Jp0=gP,Vp0=Rp,zp0=GB,Kp0="NewExpression",Zp0=Tm,Wp0="ObjectExpression",$p0=ft,Qp0="OptionalCallExpression",Fp0=ft,Hp0="OptionalMemberExpression",qp0=XB,Gp0="SequenceExpression",bp0="Super",x80="ThisExpression",r80=H1,e80=q1,t80="TypeCastExpression",n80=H1,u80=q1,i80="SatisfiesExpression",f80=q1,c80="AsConstExpression",s80=q2,o80="AwaitExpression",v80=Mt,a80=js,l80=ZD,p80=lB,d80=Ps,y80=Os,m80=sl,k80="matched above",h80=q2,_80=vD,w80=Ia,T80="UnaryExpression",S80=Dj,E80=KB,g80=vD,A80=q2,P80=Ia,C80="UpdateExpression",N80="delegate",R80=q2,I80="YieldExpression",O80="Unexpected FunctionDeclaration with BodyExpression",L80=U2,M80=M5,D80=q1,j80=Ue,U80=QE,B80=Co,Y80=Y1,X80=an,J80=Gr,V80="FunctionDeclaration",z80="Unexpected FunctionExpression with BodyExpression",K80=U2,Z80=M5,W80=q1,$80=Ue,Q80=QE,F80=Co,H80=Y1,q80=an,G80=Gr,b80="FunctionExpression",x50=ft,r50=H1,e50=Le,t50=Ig,n50=ft,u50=H1,i50=Le,f50="PrivateIdentifier",c50=ft,s50=H1,o50=Le,v50=Ig,a50=oC,l50=Ea,p50="SwitchCase",d50=Y1,y50="param",m50="CatchClause",k50=Y1,h50="BlockStatement",_50=go,w50=Gr,T50="DeclareVariable",S50=Ue,E50=Gr,g50="DeclareFunction",A50=gj,P50=Tv,C50=Bc,N50=Y1,R50=U2,I50=Gr,O50="DeclareClass",L50=U2,M50=F_,D50=an,j50=kw,U50=an,B50=Gr,Y50="DeclareComponent",X50=U2,J50=F_,V50=kw,z50=an,K50="ComponentTypeAnnotation",Z50=ft,W50=H1,$50=Le,Q50="ComponentTypeParameter",F50=Y1,H50=Gr,q50="DeclareEnum",G50=Bc,b50=Y1,xd0=U2,rd0=Gr,ed0="DeclareInterface",td0=d1,nd0=fi,ud0=IT,id0="ExportNamespaceSpecifier",fd0=pn,cd0=U2,sd0=Gr,od0="DeclareTypeAlias",vd0=pn,ad0=U2,ld0=Gr,pd0="TypeAlias",dd0="DeclareOpaqueType",yd0="OpaqueType",md0="supertype",kd0="impltype",hd0=U2,_d0=Gr,wd0="ClassDeclaration",Td0="ClassExpression",Sd0=kd,Ed0=Tv,gd0="superTypeParameters",Ad0="superClass",Pd0=U2,Cd0=Y1,Nd0=Gr,Rd0=q1,Id0="Decorator",Od0=U2,Ld0=Gr,Md0="ClassImplements",Dd0=Y1,jd0="ClassBody",Ud0=Ev,Bd0=ul,Yd0=Cv,Xd0=ja,Jd0=kd,Vd0=Ma,zd0=je,Kd0=go,Zd0=d1,Wd0=mv,$d0="MethodDefinition",Qd0=tl,Fd0=kd,Hd0=B2,qd0=je,Gd0=Ma,bd0=H1,xy0=d1,ry0=mv,ey0=hj,ty0="Internal Error: Private name found in class prop",ny0=tl,uy0=kd,iy0=B2,fy0=je,cy0=Ma,sy0=H1,oy0=d1,vy0=mv,ay0=hj,ly0=U2,py0=F_,dy0=an,yy0=Gr,my0=Y1,ky0="ComponentDeclaration",hy0=q2,_y0=Im,wy0=pn,Ty0=Ns,Sy0=Jp,Ey0=NS,gy0=ll,Ay0=Le,Py0="ComponentParameter",Cy0=hu,Ny0=Gr,Ry0="EnumBigIntMember",Iy0=Gr,Oy0=yD,Ly0=hu,My0=Gr,Dy0="EnumStringMember",jy0=Gr,Uy0=yD,By0=hu,Yy0=Gr,Xy0="EnumNumberMember",Jy0=hu,Vy0=Gr,zy0="EnumBooleanMember",Ky0=G3,Zy0=Od,Wy0=nl,$y0="EnumBooleanBody",Qy0=G3,Fy0=Od,Hy0=nl,qy0="EnumNumberBody",Gy0=G3,by0=Od,x90=nl,r90="EnumStringBody",e90=G3,t90=nl,n90="EnumSymbolBody",u90=G3,i90=Od,f90=nl,c90="EnumBigIntBody",s90=Y1,o90=Gr,v90="EnumDeclaration",a90=Bc,l90=Y1,p90=U2,d90=Gr,y90="InterfaceDeclaration",m90=U2,k90=Gr,h90="InterfaceExtends",_90=H1,w90=Tm,T90="ObjectPattern",S90=H1,E90=Uj,g90="ArrayPattern",A90=pn,P90=Ns,C90=Jp,N90=H1,R90=Le,I90=Ig,O90=q2,L90=Im,M90=q2,D90=Im,j90=pn,U90=Ns,B90=Jp,Y90=hu,X90=hu,J90=Cv,V90=ja,z90=iB,K90=Ma,Z90=NS,W90=ul,$90=go,Q90=d1,F90=mv,H90=TU,q90=q2,G90=dB,b90=pn,xm0=Ns,rm0=Jp,em0=Ma,tm0=NS,nm0=ul,um0=go,im0=d1,fm0=mv,cm0=TU,sm0=q2,om0=dB,vm0=Ut,am0=d1,lm0=da,pm0=Ut,dm0=wv,ym0=d1,mm0=da,km0=Ut,hm0=d1,_m0=da,wm0=Cs,Tm0=Is,Sm0=Ut,Em0=d1,gm0=da,Am0="flags",Pm0=yn,Cm0="regex",Nm0=Ut,Rm0=d1,Im0=da,Om0=Ut,Lm0=d1,Mm0=da,Dm0=XB,jm0="quasis",Um0="TemplateLiteral",Bm0="cooked",Ym0=Ut,Xm0="tail",Jm0=d1,Vm0="TemplateElement",zm0="quasi",Km0="tag",Zm0="TaggedTemplateExpression",Wm0=dl,$m0=ka,Qm0=ol,Fm0=go,Hm0="declarations",qm0="VariableDeclaration",Gm0=hu,bm0=Gr,xk0="VariableDeclarator",rk0="plus",ek0=YD,tk0=ga,nk0=Po,uk0=A_,ik0="in-out",fk0=go,ck0="Variance",sk0="AnyTypeAnnotation",ok0="MixedTypeAnnotation",vk0="EmptyTypeAnnotation",ak0="VoidTypeAnnotation",lk0="NullLiteralTypeAnnotation",pk0="SymbolTypeAnnotation",dk0="NumberTypeAnnotation",yk0="BigIntTypeAnnotation",mk0="StringTypeAnnotation",kk0="BooleanTypeAnnotation",hk0=H1,_k0="NullableTypeAnnotation",wk0="UnknownTypeAnnotation",Tk0="NeverTypeAnnotation",Sk0="UndefinedTypeAnnotation",Ek0=ha,gk0=H1,Ak0="parameterName",Pk0="TypePredicate",Ck0=U2,Nk0=kw,Rk0=M5,Ik0=lv,Ok0=an,Lk0="FunctionTypeAnnotation",Mk0=ft,Dk0=H1,jk0=Le,Uk0=VD,Bk0=ft,Yk0=H1,Xk0=Le,Jk0=VD,Vk0=[0,0,0,0,0],zk0="internalSlots",Kk0="callProperties",Zk0="indexers",Wk0=Tm,$k0="exact",Qk0="inexact",Fk0="ObjectTypeAnnotation",Hk0=iB,qk0="There should not be computed object type property keys",Gk0=hu,bk0=Cv,xh0=ja,rh0=go,eh0=B2,th0=YN,nh0=je,uh0=ft,ih0=ul,fh0=d1,ch0=mv,sh0="ObjectTypeProperty",oh0=q2,vh0="ObjectTypeSpreadProperty",ah0=B2,lh0=je,ph0=d1,dh0=mv,yh0=Gr,mh0="ObjectTypeIndexer",kh0=je,hh0=d1,_h0="ObjectTypeCallProperty",wh0=ft,Th0=B2,Sh0="sourceType",Eh0="propType",gh0="keyTparam",Ah0="ObjectTypeMappedTypeProperty",Ph0=d1,Ch0=ul,Nh0=je,Rh0=ft,Ih0=Gr,Oh0="ObjectTypeInternalSlot",Lh0=Y1,Mh0=Bc,Dh0="InterfaceTypeAnnotation",jh0=qj,Uh0="ArrayTypeAnnotation",Bh0="falseType",Yh0="trueType",Xh0="extendsType",Jh0="checkType",Vh0="ConditionalTypeAnnotation",zh0="typeParameter",Kh0="InferTypeAnnotation",Zh0=Gr,Wh0=WB,$h0="QualifiedTypeIdentifier",Qh0=U2,Fh0=Gr,Hh0="GenericTypeAnnotation",qh0="indexType",Gh0="objectType",bh0="IndexedAccessType",x_0=ft,r_0="OptionalIndexedAccessType",e_0=dg,t_0="UnionTypeAnnotation",n_0=dg,u_0="IntersectionTypeAnnotation",i_0=Rp,f_0=q2,c_0="TypeofTypeAnnotation",s_0=Gr,o_0=WB,v_0="QualifiedTypeofIdentifier",a_0=q2,l_0="KeyofTypeAnnotation",p_0=C1,d_0=BU,y_0=vj,m_0=H1,k_0=Ia,h_0="TypeOperator",__0=q2,w_0="ReadOnlyTypeAnnotation",T_0="elementTypes",S_0="TupleTypeAnnotation",E_0=ft,g_0=B2,A_0=qj,P_0=Sl,C_0="TupleTypeLabeledElement",N_0=H1,R_0=Sl,I_0="TupleTypeSpreadElement",O_0=Ut,L_0=d1,M_0="StringLiteralTypeAnnotation",D_0=Ut,j_0=d1,U_0="NumberLiteralTypeAnnotation",B_0=Ut,Y_0=d1,X_0="BigIntLiteralTypeAnnotation",J_0=Cs,V_0=Is,z_0=Ut,K_0=d1,Z_0="BooleanLiteralTypeAnnotation",W_0="ExistsTypeAnnotation",$_0=H1,Q_0=gD,F_0=H1,H_0=gD,q_0=an,G_0="TypeParameterDeclaration",b_0="usesExtendsBound",xw0=pv,rw0=B2,ew0="bound",tw0=Le,nw0="TypeParameter",uw0=an,iw0=TD,fw0=an,cw0=TD,sw0=Na,ow0=vB,vw0="closingElement",aw0="openingElement",lw0="JSXElement",pw0="closingFragment",dw0=vB,yw0="openingFragment",mw0="JSXFragment",kw0=Rp,hw0="selfClosing",_w0="attributes",ww0=Le,Tw0="JSXOpeningElement",Sw0="JSXOpeningFragment",Ew0=Le,gw0="JSXClosingElement",Aw0="JSXClosingFragment",Pw0=d1,Cw0=Le,Nw0="JSXAttribute",Rw0=q2,Iw0="JSXSpreadAttribute",Ow0="JSXEmptyExpression",Lw0=q1,Mw0="JSXExpressionContainer",Dw0=q1,jw0="JSXSpreadChild",Uw0=Ut,Bw0=d1,Yw0="JSXText",Xw0=KP,Jw0=eT,Vw0="JSXMemberExpression",zw0=Le,Kw0="namespace",Zw0="JSXNamespacedName",Ww0=Le,$w0="JSXIdentifier",Qw0=IT,Fw0=ll,Hw0="ExportSpecifier",qw0=ll,Gw0="ImportDefaultSpecifier",bw0=ll,xT0="ImportNamespaceSpecifier",rT0=LD,eT0=ll,tT0="imported",nT0="ImportSpecifier",uT0="Line",iT0="Block",fT0=d1,cT0=d1,sT0="DeclaredPredicate",oT0="InferredPredicate",vT0=gP,aT0=Rp,lT0=GB,pT0=Ma,dT0=KP,yT0=eT,mT0="message",kT0=Og,hT0=LU,_T0=Lm,wT0=Lv,TT0=hl,ST0=X5,ET0=[0,Cf,Df,ai,_7,Mf,b7,Ui,Su,dc,Y7,$i,jf,cn,$u,hc,Me,I7,tu,vf,Gf,N7,yi,Gc,Nc,n7,df,K7,Au,Wi,tf,Fc,F7,Ru,Si,sf,Ci,di,nc,Gi,au,d7,qc,W7,Gu,cf,Pc,hi,lf,xc,Hn,yc,_c,ef,Ie,Oe,zu,Tf,Ac,Ki,T7,Bf,Zu,cc,kf,ac,If,Rc,Mi,se,Xi,t7,yf,nf,Cu,c7,ju,Vi,of,Cc,kc,Mu,Vu,af,w7,bn,Nf,m7,Qf,Z7,q1,Ti,xi,Gn,$7,y7,Yf,gf,G7,cu,Yi,Yu,Nu,pu,bu,oc,eu,zn,pc,S7,$n,B7,ti,ei,Uf,ii,wf,Kn,Ai,Wc,Hi,wu,gi,ku,Iu,Rt,g7,s7,P7,j2,Ei,ou,Ku,p7,hf,yu,$f,O7,b2,ni,r7,Kf,Zi,lu,bc,iu,_u,Vn,zi,Qu,Lc,lc,i7,Ef,Eu,ci,Kc,li,U7,o7,uu,qn,ec,rc,rf,fc,X7,Xu,Qn,ji,j7,Zn,vu,uf,ur,v7,pi,Bu,gc,ri,a7,Xc,Uc,Wu,Dc,Q7,Af,L7,Bi,Jf,qf,su,bi,Zc,pf,Vc,f7,vi,Pf,oi,sc,mi,nu,uc,u7,Fu,Of,yn,Yc,Lu,z7,wc,Ic,R7,H7,Ju,l7,h7,Ji,Du,mc,tc,fu,Wf,$c,gu,zf,Tc,mu,Ue,Ec,du,Uu,Tu,xf,D7,k7,De,Sc,qu,M7,Oc,Fi,qi,E7,ff,Ye,Ou,xu,Xf,Sf,jc,Oi,Rf,Be,Qc,mf,Qi,Pu,vc,Fn,x7,Pi,Ff,wi,Jc,A7,zc,_i,Wn,V7,Ii,bf,Hf,ru,C7,J7,ki,Hu,Mc,e7,q7,ui,Hc,Li,B2,Vf,_f,si,Y2],gT0=[0,Y2,si,_f,Vf,B2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Ii,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Be,Rf,Oi,jc,Sf,Xf,xu,Ou,Ye,ff,E7,qi,Fi,Oc,M7,qu,Sc,De,k7,D7,xf,Tu,Uu,du,Ec,Ue,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Ic,wc,z7,Lu,Yc,yn,Of,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ur,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,b2,O7,$f,yu,hf,p7,Ku,ou,Ei,j2,P7,s7,g7,Rt,Iu,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,q1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,se,Mi,Rc,If,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Ie,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,I7,Me,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],AT0=[0,Oc,Vn,ei,Iu,Kn,I7,Uc,qf,li,r7,$u,Jc,sc,Ye,nu,Qf,df,pf,lc,a7,O7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Rt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Ou,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,Of,Cf,$c,d7,_i,su,zf,uu,F7,oi,Ue,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,B2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,se,G7,wi,Y2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Ic,ec,qc,ur,j2,De,C7,Ii,ff,H7,Be,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,If,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,q1,Lu,nc,xi,Qi,zn,eu,Fi,Ie,$n,Gu,fu,af,ac,Oi,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Me,Mf,b2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],PT0="Jsoo_runtime.Error.Exn",CT0=[0,0],NT0="use_strict",RT0=dg,IT0="esproposal_decorators",OT0="enums",LT0="components",MT0="Internal error: ";function M1(x){if(typeof x=="number")return 0;switch(x[0]){case 0:return[0,M1(x[1])];case 1:return[1,M1(x[1])];case 2:return[2,M1(x[1])];case 3:return[3,M1(x[1])];case 4:return[4,M1(x[1])];case 5:return[5,M1(x[1])];case 6:return[6,M1(x[1])];case 7:return[7,M1(x[1])];case 8:var r=x[1];return[8,r,M1(x[2])];case 9:var e=x[1];return[9,e,e,M1(x[3])];case 10:return[10,M1(x[1])];case 11:return[11,M1(x[1])];case 12:return[12,M1(x[1])];case 13:return[13,M1(x[1])];default:return[14,M1(x[1])]}}function te(x,r){if(typeof x=="number")return r;switch(x[0]){case 0:return[0,te(x[1],r)];case 1:return[1,te(x[1],r)];case 2:return[2,te(x[1],r)];case 3:return[3,te(x[1],r)];case 4:return[4,te(x[1],r)];case 5:return[5,te(x[1],r)];case 6:return[6,te(x[1],r)];case 7:return[7,te(x[1],r)];case 8:var e=x[1];return[8,e,te(x[2],r)];case 9:var t=x[2],u=x[1];return[9,u,t,te(x[3],r)];case 10:return[10,te(x[1],r)];case 11:return[11,te(x[1],r)];case 12:return[12,te(x[1],r)];case 13:return[13,te(x[1],r)];default:return[14,te(x[1],r)]}}function E1(x,r){if(typeof x=="number")return r;switch(x[0]){case 0:return[0,E1(x[1],r)];case 1:return[1,E1(x[1],r)];case 2:var e=x[1];return[2,e,E1(x[2],r)];case 3:var t=x[1];return[3,t,E1(x[2],r)];case 4:var u=x[3],i=x[2],f=x[1];return[4,f,i,u,E1(x[4],r)];case 5:var o=x[3],a=x[2],d=x[1];return[5,d,a,o,E1(x[4],r)];case 6:var k=x[3],T=x[2],g=x[1];return[6,g,T,k,E1(x[4],r)];case 7:var A=x[3],N=x[2],R=x[1];return[7,R,N,A,E1(x[4],r)];case 8:var I=x[3],M=x[2],L=x[1];return[8,L,M,I,E1(x[4],r)];case 9:var z=x[1];return[9,z,E1(x[2],r)];case 10:return[10,E1(x[1],r)];case 11:var V=x[1];return[11,V,E1(x[2],r)];case 12:var Z=x[1];return[12,Z,E1(x[2],r)];case 13:var $=x[2],i0=x[1];return[13,i0,$,E1(x[3],r)];case 14:var U=x[2],J=x[1];return[14,J,U,E1(x[3],r)];case 15:return[15,E1(x[1],r)];case 16:return[16,E1(x[1],r)];case 17:var Y=x[1];return[17,Y,E1(x[2],r)];case 18:var F=x[1];return[18,F,E1(x[2],r)];case 19:return[19,E1(x[1],r)];case 20:var n0=x[2],Q=x[1];return[20,Q,n0,E1(x[3],r)];case 21:var f0=x[1];return[21,f0,E1(x[2],r)];case 22:return[22,E1(x[1],r)];case 23:var s0=x[1];return[23,s0,E1(x[2],r)];default:var v0=x[2],o0=x[1];return[24,o0,v0,E1(x[3],r)]}}function cI(x,r,e){return x[1]===r?(x[1]=e,1):0}function Nx(x){throw q0([0,kn,x],1)}function m2(x){throw q0([0,iI,x],1)}function ny(x){return 0<=x?x:-x|0}var DT0=uD;function Qx(x,r){var e=Xx(x),t=Xx(r),u=S1(e+t|0);return rs(x,0,u,0,e),rs(r,0,u,e,t),A2(u)}function jT0(x){return x?gW:AW}function Fx(x,r){if(!x)return r;var e=x[1];return[0,e,Fx(x[2],r)]}fW(0);var UT0=bY(1),ts=bY(2);function BT0(x){for(var r=cW(0);;){if(!r)return 0;var e=r[2],t=r[1];try{es(t)}catch(f){var u=L1(f);if(u[1]!==tX)throw q0(u,0)}var r=e}}function Ul(x,r){return rI(x,r,0,Xx(r))}function cX(x){return Ul(ts,x),xX(ts,10),es(ts)}var sI=[0,BT0];function oI(x){return l(sI[1],0)}tI(cj,oI);var sX=yW(0)[1],Bl=(4*pW(0)|0)-1|0,YT0=[qr,PW,Js(0)];function XT0(x){throw q0(YT0,1)}function uy(x,r){return r?[0,l(x,r[1])]:0}function oX(x){return 25>>0?x:x+xD|0}function ns(x){for(var r=0,e=x;;){if(!e)return r;var r=r+1|0,e=e[2]}}function Yl(x){return x?x[1]:Nx(jW)}function vX(x){return x?x[2]:Nx(DW)}function us(x,r){for(var e=x,t=r;;){if(!e)return t;var u=[0,e[1],t],e=e[2],t=u}}function Ax(x){return us(x,0)}function Xl(x){if(!x)return 0;var r=x[1];return Fx(r,Xl(x[2]))}function _n(x,r){if(!r)return 0;var e=r[2],t=l(x,r[1]);return[0,t,_n(x,e)]}function iy(x,r){for(var e=0,t=r;;){if(!t)return e;var u=t[2],e=[0,l(x,t[1]),e],t=u}}function C2(x,r){for(var e=r;;){if(!e)return 0;var t=e[2];l(x,e[1]);var e=t}}function r2(x,r,e){for(var t=r,u=e;;){if(!u)return t;var i=u[2],t=p(x,t,u[1]),u=i}}function vI(x,r,e){if(!r)return e;var t=r[1];return p(x,t,vI(x,r[2],e))}function aX(x,r,e){for(var t=r,u=e;;){if(t){if(u){var i=u[2],f=t[2];p(x,t[1],u[1]);var t=f,u=i;continue}}else if(!u)return 0;return m2(MW)}}function aI(x,r){for(var e=r;;){if(!e)return 0;var t=e[2],u=l(x,e[1]);if(u)return u;var e=t}}function lI(x,r){for(var e=r;;){if(!e)return 0;var t=e[2],u=zY(e[1],x)===0?1:0;if(u)return u;var e=t}}function Jl(x){var r=0;return function(e){for(var t=r,u=e;;){if(!u)return Ax(t);var i=u[2],f=u[1];if(l(x,f)){var t=[0,f,t],u=i;continue}var u=i}}}function jv(x,r){var e=S1(x);return JZ(e,0,x,r),e}function lX(x){var r=at(x),e=S1(r);return Us(x,0,e,0,r),e}function pX(x,r,e){if(0<=r&&0<=e&&(at(x)-e|0)>=r){var t=S1(e);return Us(x,r,t,0,e),t}return m2(YW)}function Wa(x,r,e){return A2(pX(x,r,e))}function dX(x,r,e,t,u){return 0<=u&&0<=r&&(at(x)-u|0)>=r&&0<=t&&(at(e)-u|0)>=t?Us(x,r,e,t,u):m2(BW)}function Zs(x,r,e,t,u){return 0<=u&&0<=r&&(Xx(x)-u|0)>=r&&0<=t&&(at(e)-u|0)>=t?rs(x,r,e,t,u):m2(UW)}function fy(x,r){return A2(jv(x,r))}function k2(x,r,e){return A2(pX(xs(x),r,e))}function yX(x){var r=xs(x);if(at(r)===0)var e=r;else{var t=lX(r);Kr(t,0,oX(oe(r,0)));var e=t}return A2(e)}function mX(x,r){var e=Xx(x),t=e<=Xx(r)?1:0;if(!t)return t;for(var u=0;;){if(u===e)return 1;if(fx(r,u)!==fx(x,u))return 0;var u=u+1|0}}var JT0=Tx;function kX(x,r){var e=r.length-1-1|0,t=0;if(e>=0)for(var u=t;;){l(x,r[1+u]);var i=u+1|0;if(e!==u){var u=i;continue}break}return 0}function cy(x,r){var e=r.length-1;if(e===0)return[0];var t=za(e,l(x,r[1])),u=e-1|0,i=1;if(u>=1)for(var f=i;;){t[1+f]=l(x,r[1+f]);var o=f+1|0;if(u!==f){var f=o;continue}break}return t}function Vl(x){if(!x)return[0];for(var r=0,e=x,t=x[2],u=x[1];;){if(e){var r=r+1|0,e=e[2];continue}for(var i=za(r,u),f=1,o=t;;){if(!o)return i;var a=o[2];i[1+f]=o[1];var f=f+1|0,o=a}}}function hX(x){try{var r=[0,Rl(x)];return r}catch(t){var e=L1(t);if(e[1]===kn)return 0;throw q0(e,0)}}function pI(x){function r(H){return H?H[5]:0}function e(H,b,B,a0){var m0=r(H),P0=r(a0),D=P0<=m0?m0+1|0:P0+1|0;return[0,H,b,B,a0,D]}function t(H,b){return[0,0,H,b,0,1]}function u(H,b,B,a0){var m0=H?H[5]:0,P0=a0?a0[5]:0;if((P0+2|0)=P0){var X=P0<=m0?m0+1|0:P0+1|0;return[0,H,b,B,a0,X]}if(!a0)return m2(HW);var W0=a0[4],sx=a0[3],tx=a0[2],j0=a0[1],Px=r(j0);if(Px<=r(W0))return e(e(H,b,B,j0),tx,sx,W0);if(!j0)return m2(FW);var Ex=j0[3],Ox=j0[2],qx=j0[1],B0=e(j0[4],tx,sx,W0);return e(e(H,b,B,qx),Ox,Ex,B0)}var i=0;function f(H){return H?0:1}function o(H,b,B){if(!B)return[0,0,H,b,0,1];var a0=B[4],m0=B[3],P0=B[2],D=B[1],N0=B[5],X0=p(x[1],H,P0);if(X0===0)return m0===b?B:[0,D,H,b,a0,N0];if(0<=X0){var D0=o(H,b,a0);return a0===D0?B:u(D,P0,m0,D0)}var ox=o(H,b,D);return D===ox?B:u(ox,P0,m0,a0)}function a(H,b){for(var B=b;;){if(!B)throw q0(P2,1);var a0=B[4],m0=B[3],P0=B[1],D=p(x[1],H,B[2]);if(D===0)return m0;var N0=0<=D?a0:P0,B=N0}}function d(H,b){for(var B=b;;){if(!B)throw q0(P2,1);var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=m0;continue}for(var N0=a0,X0=P0,D0=D;;){if(!D0)return[0,N0,X0];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=V0;continue}var D0=b0}}}function k(H,b){for(var B=b;;){if(!B)return 0;var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=m0;continue}for(var N0=a0,X0=P0,D0=D;;){if(!D0)return[0,[0,N0,X0]];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=V0;continue}var D0=b0}}}function T(H,b){for(var B=b;;){if(!B)throw q0(P2,1);var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=D;continue}for(var N0=a0,X0=P0,D0=m0;;){if(!D0)return[0,N0,X0];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=b0;continue}var D0=V0}}}function g(H,b){for(var B=b;;){if(!B)return 0;var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=D;continue}for(var N0=a0,X0=P0,D0=m0;;){if(!D0)return[0,[0,N0,X0]];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=b0;continue}var D0=V0}}}function A(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[3],P0=B[1],D=p(x[1],H,B[2]);if(D===0)return[0,m0];var N0=0<=D?a0:P0,B=N0}}function N(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[1],P0=p(x[1],H,B[2]),D=P0===0?1:0;if(D)return D;var N0=0<=P0?a0:m0,B=N0}}function R(H){for(var b=H;;){if(!b)throw q0(P2,1);var B=b[1];if(!B)return[0,b[2],b[3]];var b=B}}function I(H){for(var b=H;;){if(!b)return 0;var B=b[1];if(!B)return[0,[0,b[2],b[3]]];var b=B}}function M(H){for(var b=H;;){if(!b)throw q0(P2,1);if(!b[4])return[0,b[2],b[3]];var b=b[4]}}function L(H){for(var b=H;;){if(!b)return 0;if(!b[4])return[0,[0,b[2],b[3]]];var b=b[4]}}function z(H){if(!H)return m2(zW);var b=H[1];if(!b)return H[4];var B=H[4],a0=H[3],m0=H[2];return u(z(b),m0,a0,B)}function V(H,b){if(!H)return b;if(!b)return H;var B=R(b),a0=B[2],m0=B[1];return u(H,m0,a0,z(b))}function Z(H,b){if(!b)return 0;var B=b[4],a0=b[3],m0=b[2],P0=b[1],D=p(x[1],H,m0);if(D===0)return V(P0,B);if(0<=D){var N0=Z(H,B);return B===N0?b:u(P0,m0,a0,N0)}var X0=Z(H,P0);return P0===X0?b:u(X0,m0,a0,B)}function $(H,b,B){if(!B){var a0=l(b,0);return a0?[0,0,H,a0[1],0,1]:0}var m0=B[4],P0=B[3],D=B[2],N0=B[1],X0=B[5],D0=p(x[1],H,D);if(D0===0){var ox=l(b,[0,P0]);if(!ox)return V(N0,m0);var b0=ox[1];return P0===b0?B:[0,N0,H,b0,m0,X0]}if(0<=D0){var kx=$(H,b,m0);return m0===kx?B:u(N0,D,P0,kx)}var V0=$(H,b,N0);return N0===V0?B:u(V0,D,P0,m0)}function i0(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[3],P0=B[2];i0(H,B[1]),p(H,P0,m0);var B=a0}}function U(H,b){if(!b)return 0;var B=b[5],a0=b[4],m0=b[3],P0=b[2],D=U(H,b[1]),N0=l(H,m0);return[0,D,P0,N0,U(H,a0),B]}function J(H,b){if(!b)return 0;var B=b[2],a0=b[5],m0=b[4],P0=b[3],D=J(H,b[1]),N0=p(H,B,P0);return[0,D,B,N0,J(H,m0),a0]}function Y(H,b,B){for(var a0=b,m0=B;;){if(!a0)return m0;var P0=a0[4],D=a0[3],N0=a0[2],X0=G0(H,N0,D,Y(H,a0[1],m0)),a0=P0,m0=X0}}function F(H,b){for(var B=b;;){if(!B)return 1;var a0=B[4],m0=B[1],P0=p(H,B[2],B[3]);if(P0){var D=F(H,m0);if(D){var B=a0;continue}var N0=D}else var N0=P0;return N0}}function n0(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[1],P0=p(H,B[2],B[3]);if(P0)var D=P0;else{var N0=n0(H,m0);if(!N0){var B=a0;continue}var D=N0}return D}}function Q(H,b,B){if(!B)return t(H,b);var a0=B[4],m0=B[3],P0=B[2];return u(Q(H,b,B[1]),P0,m0,a0)}function f0(H,b,B){if(!B)return t(H,b);var a0=B[3],m0=B[2],P0=B[1];return u(P0,m0,a0,f0(H,b,B[4]))}function s0(H,b,B,a0){if(!H)return Q(b,B,a0);if(!a0)return f0(b,B,H);var m0=a0[5],P0=H[5],D=a0[4],N0=a0[3],X0=a0[2],D0=a0[1],ox=H[4],b0=H[3],kx=H[2],V0=H[1];return(m0+2|0)x[3])throw q0([0,wr,x$],1);if((e+r|0)<=x[3])return 0;throw q0([0,wr,r$],1)}}function lt(x,r){var e=x[2];return x[3]<=e&&mI(x,1),Kr(x[1],e,r),x[2]=e+1|0,0}function wX(x,r,e,t){var u=e<0?1:0;if(u)var f=u;else var i=t<0?1:0,f=i||((Xx(r)-t|0)=u+G5>>>0&&(i=1):65<=u&&(i=1);else{var f=0;if(u===32)f=1;else if(43<=u)switch(u+Xm|0){case 5:if(t<(e+2|0)&&1>>0?33>>0&&(i=1):u===2&&(i=1),!i){var r=r+1|0;continue}var f=xs(x),o=[0,0],a=at(f)-1|0,d=0;if(a>=0)for(var k=d;;){var T=oe(f,k),g=0;if(32<=T){var A=T-34|0,N=0;if(58>>0?93>A&&(N=1):56>>0?g=1:N=1,N){var R=1;g=2}}else 11<=T?T===13&&(g=1):8<=T&&(g=1);switch(g){case 0:var R=4;break;case 1:var R=2;break}o[1]=o[1]+R|0;var I=k+1|0;if(a!==k){var k=I;continue}break}if(o[1]===at(f))var M=lX(f);else{var L=S1(o[1]);o[1]=0;var z=at(f)-1|0,V=0;if(z>=0)for(var Z=V;;){var $=oe(f,Z),i0=0;if(35<=$)$===92?i0=2:Xr<=$?i0=1:i0=3;else if(32<=$)34<=$?i0=2:i0=3;else if(14<=$)i0=1;else switch($){case 8:Kr(L,o[1],92),o[1]++,Kr(L,o[1],98);break;case 9:Kr(L,o[1],92),o[1]++,Kr(L,o[1],Ri);break;case 10:Kr(L,o[1],92),o[1]++,Kr(L,o[1],B1);break;case 13:Kr(L,o[1],92),o[1]++,Kr(L,o[1],st);break;default:i0=1}switch(i0){case 1:Kr(L,o[1],92),o[1]++,Kr(L,o[1],48+($/ot|0)|0),o[1]++,Kr(L,o[1],48+(($/10|0)%10|0)|0),o[1]++,Kr(L,o[1],48+($%10|0)|0);break;case 2:Kr(L,o[1],92),o[1]++,Kr(L,o[1],$);break;case 3:Kr(L,o[1],$);break}o[1]++;var U=Z+1|0;if(z!==Z){var Z=U;continue}break}var M=L}var t=A2(M)}var J=Xx(t),Y=jv(J+2|0,34);return rs(t,0,Y,1,J),A2(Y)}}function AX(x,r){var e=ny(r),t=G$[1];switch(x[2]){case 0:var u=Zf;break;case 1:var u=It;break;case 2:var u=69;break;case 3:var u=nn;break;case 4:var u=71;break;case 5:var u=t;break;case 6:var u=jt;break;case 7:var u=72;break;default:var u=70}var i=TX(16);switch(Fa(i,37),x[1]){case 0:break;case 1:Fa(i,43);break;default:Fa(i,32)}return 8<=x[2]&&Fa(i,35),Fa(i,46),N2(i,hx+e),Fa(i,u),EX(i)}function oy(x,r){if(13>x)return r;var e=[0,0],t=Xx(r)-1|0,u=0;if(t>=0)for(var i=u;;){9>=fx(r,i)+Z1>>>0&&e[1]++;var f=i+1|0;if(t!==i){var i=f;continue}break}var o=e[1],a=S1(Xx(r)+((o-1|0)/3|0)|0),d=[0,0];function k(M){return Ja(a,d[1],M),d[1]++,0}var T=[0,((o-1|0)%3|0)+1|0],g=Xx(r)-1|0,A=0;if(g>=0)for(var N=A;;){var R=fx(r,N);9>>0||(T[1]===0&&(k(95),T[1]=3),T[1]+=-1),k(R);var I=N+1|0;if(g!==N){var N=I;continue}break}return A2(a)}function KT0(x,r){switch(x){case 1:var e=BQ;break;case 2:var e=YQ;break;case 4:var e=XQ;break;case 5:var e=JQ;break;case 6:var e=VQ;break;case 7:var e=zQ;break;case 8:var e=KQ;break;case 9:var e=ZQ;break;case 10:var e=WQ;break;case 11:var e=$Q;break;case 0:case 13:var e=QQ;break;case 3:case 14:var e=FQ;break;default:var e=HQ}return oy(x,Fd(e,r))}function ZT0(x,r){switch(x){case 1:var e=aQ;break;case 2:var e=lQ;break;case 4:var e=pQ;break;case 5:var e=dQ;break;case 6:var e=yQ;break;case 7:var e=mQ;break;case 8:var e=kQ;break;case 9:var e=hQ;break;case 10:var e=_Q;break;case 11:var e=wQ;break;case 0:case 13:var e=TQ;break;case 3:case 14:var e=SQ;break;default:var e=EQ}return oy(x,Fd(e,r))}function WT0(x,r){switch(x){case 1:var e=b$;break;case 2:var e=xQ;break;case 4:var e=rQ;break;case 5:var e=eQ;break;case 6:var e=tQ;break;case 7:var e=nQ;break;case 8:var e=uQ;break;case 9:var e=iQ;break;case 10:var e=fQ;break;case 11:var e=cQ;break;case 0:case 13:var e=sQ;break;case 3:case 14:var e=oQ;break;default:var e=vQ}return oy(x,Fd(e,r))}function $T0(x,r){switch(x){case 1:var e=gQ;break;case 2:var e=AQ;break;case 4:var e=PQ;break;case 5:var e=CQ;break;case 6:var e=NQ;break;case 7:var e=RQ;break;case 8:var e=IQ;break;case 9:var e=OQ;break;case 10:var e=LQ;break;case 11:var e=MQ;break;case 0:case 13:var e=DQ;break;case 3:case 14:var e=jQ;break;default:var e=UQ}return oy(x,$Z(e,r))}function Ws(x,r,e){function t(V){switch(x[1]){case 0:var Z=45;break;case 1:var Z=43;break;default:var Z=32}return zZ(e,r,Z)}function u(V){var Z=gZ(e);return Z===3?e<0?F$:H$:4<=Z?Q$:V}switch(x[2]){case 5:for(var i=HR(AX(x,r),e),f=0,o=Xx(i);;){if(f===o)var a=0;else{var d=O1(i,f)+Iv|0,k=0;if(23>>0?d===55&&(k=1):21>>0&&(k=1),!k){var f=f+1|0;continue}var a=1}var T=a?i:Qx(i,q$);return u(T)}case 6:return t(0);case 7:var g=xs(t(0)),A=at(g);if(A===0)var N=g;else{var R=S1(A),I=A-1|0,M=0;if(I>=0)for(var L=M;;){Kr(R,L,oX(oe(g,L)));var z=L+1|0;if(I!==L){var L=z;continue}break}var N=R}return A2(N);case 8:return u(t(0));default:return HR(AX(x,r),e)}}function vy(x,r,e,t,u,i,f){if(typeof t=="number"){if(typeof u=="number")return u?function(A,N){return Ur(x,[4,r,Ha(A,p(i,f,N))],e)}:function(A){return Ur(x,[4,r,p(i,f,A)],e)};var o=u[1];return function(A){return Ur(x,[4,r,Ha(o,p(i,f,A))],e)}}if(t[0]===0){var a=t[2],d=t[1];if(typeof u=="number")return u?function(A,N){return Ur(x,[4,r,Ve(d,a,Ha(A,p(i,f,N)))],e)}:function(A){return Ur(x,[4,r,Ve(d,a,p(i,f,A))],e)};var k=u[1];return function(A){return Ur(x,[4,r,Ve(d,a,Ha(k,p(i,f,A)))],e)}}var T=t[1];if(typeof u=="number")return u?function(A,N,R){return Ur(x,[4,r,Ve(T,A,Ha(N,p(i,f,R)))],e)}:function(A,N){return Ur(x,[4,r,Ve(T,A,p(i,f,N))],e)};var g=u[1];return function(A,N){return Ur(x,[4,r,Ve(T,A,Ha(g,p(i,f,N)))],e)}}function wI(x,r,e,t,u){if(typeof t=="number")return function(a){return Ur(x,[4,r,l(u,a)],e)};if(t[0]===0){var i=t[2],f=t[1];return function(a){return Ur(x,[4,r,Ve(f,i,l(u,a))],e)}}var o=t[1];return function(a,d){return Ur(x,[4,r,Ve(o,a,l(u,d))],e)}}function Wl(x,r,e,t){for(var u=r,i=e,f=t;;){if(typeof f=="number")return l(u,i);switch(f[0]){case 0:var o=f[1];return function(C0){return Ur(u,[5,i,C0],o)};case 1:var a=f[1];return function(C0){var A0=0;if(40<=C0)if(C0===92)var U0=CW;else Xr<=C0?A0=1:A0=2;else if(32<=C0)if(39<=C0)var U0=NW;else A0=2;else if(14<=C0)A0=1;else switch(C0){case 8:var U0=RW;break;case 9:var U0=IW;break;case 10:var U0=OW;break;case 13:var U0=LW;break;default:A0=1}switch(A0){case 1:var Q0=S1(4);Kr(Q0,0,92),Kr(Q0,1,48+(C0/ot|0)|0),Kr(Q0,2,48+((C0/10|0)%10|0)|0),Kr(Q0,3,48+(C0%10|0)|0);var U0=A2(Q0);break;case 2:var H=S1(1);Kr(H,0,C0);var U0=A2(H);break}var b=Xx(U0),B=jv(b+2|0,39);return rs(U0,0,B,1,b),Ur(u,[4,i,A2(B)],a)};case 2:var d=f[2],k=f[1];return wI(u,i,d,k,function(C0){return C0});case 3:return wI(u,i,f[2],f[1],zT0);case 4:return vy(u,i,f[4],f[2],f[3],KT0,f[1]);case 5:return vy(u,i,f[4],f[2],f[3],ZT0,f[1]);case 6:return vy(u,i,f[4],f[2],f[3],WT0,f[1]);case 7:return vy(u,i,f[4],f[2],f[3],$T0,f[1]);case 8:var T=f[4],g=f[3],A=f[2],N=f[1];if(typeof A=="number"){if(typeof g=="number")return g?function(C0,A0){return Ur(u,[4,i,Ws(N,C0,A0)],T)}:function(C0){return Ur(u,[4,i,Ws(N,hI(N),C0)],T)};var R=g[1];return function(C0){return Ur(u,[4,i,Ws(N,R,C0)],T)}}if(A[0]===0){var I=A[2],M=A[1];if(typeof g=="number")return g?function(C0,A0){return Ur(u,[4,i,Ve(M,I,Ws(N,C0,A0))],T)}:function(C0){return Ur(u,[4,i,Ve(M,I,Ws(N,hI(N),C0))],T)};var L=g[1];return function(C0){return Ur(u,[4,i,Ve(M,I,Ws(N,L,C0))],T)}}var z=A[1];if(typeof g=="number")return g?function(C0,A0,U0){return Ur(u,[4,i,Ve(z,C0,Ws(N,A0,U0))],T)}:function(C0,A0){return Ur(u,[4,i,Ve(z,C0,Ws(N,hI(N),A0))],T)};var V=g[1];return function(C0,A0){return Ur(u,[4,i,Ve(z,C0,Ws(N,V,A0))],T)};case 9:return wI(u,i,f[2],f[1],jT0);case 10:var i=[7,i],f=f[1];continue;case 11:var i=[2,i,f[1]],f=f[2];continue;case 12:var i=[3,i,f[1]],f=f[2];continue;case 13:var Z=f[3],$=f[2],i0=TX(16);_I(i0,$);var U=EX(i0);return function(C0){return Ur(u,[4,i,U],Z)};case 14:var J=f[3],Y=f[2];return function(C0){var A0=C0[1],U0=s1(A0,M1(e2(Y)));if(typeof U0[2]=="number")return Ur(u,i,E1(U0[1],J));throw q0(h2,1)};case 15:var F=f[1];return function(C0,A0){return Ur(u,[6,i,function(U0){return p(C0,U0,A0)}],F)};case 16:var n0=f[1];return function(C0){return Ur(u,[6,i,C0],n0)};case 17:var i=[0,i,f[1]],f=f[2];continue;case 18:var Q=f[1];if(Q[0]===0){var f0=f[2],s0=Q[1][1],v0=0,u=function(Q0,H,b){return function(B){return Ur(H,[1,Q0,[0,B]],b)}}(i,u,f0),i=v0,f=s0;continue}var o0=f[2],c0=Q[1][1],T0=0,u=function(C0,A0,U0){return function(Q0){return Ur(A0,[1,C0,[1,Q0]],U0)}}(i,u,o0),i=T0,f=c0;continue;case 19:throw q0([0,wr,j$],1);case 20:var E0=f[3],M0=[8,i,U$];return function(C0){return Ur(u,M0,E0)};case 21:var Y0=f[2];return function(C0){return Ur(u,[4,i,Fd(lU,C0)],Y0)};case 22:var rx=f[1];return function(C0){return Ur(u,[5,i,C0],rx)};case 23:var g0=f[2],H0=f[1];if(typeof H0=="number")switch(H0){case 0:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 1:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 2:throw q0([0,wr,B$],1);default:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0])}switch(H0[0]){case 0:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 1:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 2:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 3:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 4:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 5:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 6:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 7:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 8:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);case 9:var t0=H0[2];return x<50?TI(x+1|0,u,i,t0,g0):y2(TI,[0,u,i,t0,g0]);case 10:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0]);default:return x<50?e1(x+1|0,u,i,g0):y2(e1,[0,u,i,g0])}default:var ex=f[3],xx=f[1],ax=l(f[2],0);return x<50?SI(x+1|0,u,i,ex,xx,ax):y2(SI,[0,u,i,ex,xx,ax])}}}function TI(x,r,e,t,u){if(typeof t=="number")return x<50?e1(x+1|0,r,e,u):y2(e1,[0,r,e,u]);switch(t[0]){case 0:var i=t[1];return function(V){return pt(r,e,i,u)};case 1:var f=t[1];return function(V){return pt(r,e,f,u)};case 2:var o=t[1];return function(V){return pt(r,e,o,u)};case 3:var a=t[1];return function(V){return pt(r,e,a,u)};case 4:var d=t[1];return function(V){return pt(r,e,d,u)};case 5:var k=t[1];return function(V){return pt(r,e,k,u)};case 6:var T=t[1];return function(V){return pt(r,e,T,u)};case 7:var g=t[1];return function(V){return pt(r,e,g,u)};case 8:var A=t[2];return function(V){return pt(r,e,A,u)};case 9:var N=t[3],R=t[2],I=v2(e2(t[1]),R);return function(V){return pt(r,e,te(I,N),u)};case 10:var M=t[1];return function(V,Z){return pt(r,e,M,u)};case 11:var L=t[1];return function(V){return pt(r,e,L,u)};case 12:var z=t[1];return function(V){return pt(r,e,z,u)};case 13:throw q0([0,wr,Y$],1);default:throw q0([0,wr,X$],1)}}function e1(x,r,e,t){var u=[8,e,J$];return x<50?Wl(x+1|0,r,u,t):y2(Wl,[0,r,u,t])}function SI(x,r,e,t,u,i){if(u){var f=u[1];return function(a){return QT0(r,e,t,f,l(i,a))}}var o=[4,e,i];return x<50?Wl(x+1|0,r,o,t):y2(Wl,[0,r,o,t])}function Ur(x,r,e){return nI(Wl(0,x,r,e))}function pt(x,r,e,t){return nI(TI(0,x,r,e,t))}function QT0(x,r,e,t,u){return nI(SI(0,x,r,e,t,u))}function $s(x,r){for(var e=r;;){if(typeof e=="number")return 0;switch(e[0]){case 0:var t=e[1],u=gX(e[2]);return $s(x,t),Ul(x,u);case 1:var i=e[2],f=e[1];if(i[0]===0){var o=i[1];$s(x,f),Ul(x,V$);var e=o;continue}var a=i[1];$s(x,f),Ul(x,z$);var e=a;continue;case 6:var d=e[2];return $s(x,e[1]),l(d,x);case 7:return $s(x,e[1]),es(x);case 8:var k=e[2];return $s(x,e[1]),m2(k);case 2:case 4:var T=e[2];return $s(x,e[1]),Ul(x,T);default:var g=e[2];return $s(x,e[1]),xX(x,g)}}}function Qs(x,r){for(var e=r;;){if(typeof e=="number")return 0;switch(e[0]){case 0:var t=e[1],u=gX(e[2]);return Qs(x,t),vr(x,u);case 1:var i=e[2],f=e[1];if(i[0]===0){var o=i[1];Qs(x,f),vr(x,K$);var e=o;continue}var a=i[1];Qs(x,f),vr(x,Z$);var e=a;continue;case 6:var d=e[2];return Qs(x,e[1]),vr(x,l(d,0));case 7:var e=e[1];continue;case 8:var k=e[2];return Qs(x,e[1]),m2(k);case 2:case 4:var T=e[2];return Qs(x,e[1]),vr(x,T);default:var g=e[2];return Qs(x,e[1]),lt(x,g)}}}function PX(x,r){var e=r[1],t=0;return Ur(function(u){return $s(x,u),0},t,e)}function EI(x){return PX(ts,x)}function Tr(x){var r=x[1];return Ur(function(e){var t=Qr(64);return Qs(t,e),X1(t)},0,r)}var gI=[0,0];function AI(x,r){var e=x[1+r];if(!(1-(typeof e=="number"?1:0)))return l(Tr(RF),e);if(Dv(e)===Av)return l(Tr(IF),e);if(Dv(e)!==og)return OF;for(var t=HR("%.12g",e),u=0,i=Xx(t);;){if(i<=u)return Qx(t,EW);var f=O1(t,u),o=0;if(48<=f?58>f&&(o=1):f===45&&(o=1),!o)return t;var u=u+1|0}}function CX(x,r){if(x.length-1<=r)return iF;var e=CX(x,r+1|0),t=AI(x,r);return p(Tr(fF),t,e)}function ay(x){for(var r=gI[1];;){if(r){var e=0,t=r[2],u=r[1];try{var i=l(u,x)}catch{e=1}var f=0;if(e||!i)f=1;else var o=[0,i[1]];if(f){var r=t;continue}}else var o=0;if(o)return o[1];if(x===uI)return wF;if(x===uX)return TF;if(x[1]===nX){var a=x[2],d=a[3],k=a[2],T=a[1];return Xe(Tr(fI),T,k,d,d+5|0,SF)}if(x[1]===wr){var g=x[2],A=g[3],N=g[2],R=g[1];return Xe(Tr(fI),R,N,A,A+6|0,EF)}if(x[1]===Dl){var I=x[2],M=I[3],L=I[2],z=I[1];return Xe(Tr(fI),z,L,M,M+6|0,gF)}if(Dv(x)!==0)return x[1];var V=x.length-1,Z=x[1][1];if(2>>0)var $=CX(x,2),i0=AI(x,1),U=p(Tr(AF),i0,$);else switch(V){case 0:var U=PF;break;case 1:var U=CF;break;default:var J=AI(x,1),U=l(Tr(NF),J)}return Qx(Z,U)}}function PI(x,r){var e=XZ(r),t=e.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var f=W1(e,i)[1+i],o=function(z){return function(V){return V?z===0?lF:pF:z===0?dF:yF}}(i);if(f[0]===0)var a=f[5],d=f[4],k=f[3],T=f[6]?mF:kF,g=f[2],A=f[7],N=o(f[1]),I=[0,wW(Tr(hF),N,A,g,T,k,d,a)];else if(f[1])var I=0;else var R=o(0),I=[0,l(Tr(_F),R)];if(I){var M=I[1];l(PX(x,aF),M)}var L=i+1|0;if(t!==i){var i=L;continue}break}return 0}function NX(x){for(;;){var r=gI[1],e=1-cI(gI,r,[0,x,r]);if(!e)return e}}var FT0=LF.slice(),HT0=[0];tI(kD,function(x,r){try{try{var e=r?HT0:ZY(0);try{oI(0)}catch{}try{var t=ay(x);l(EI(vF),t),PI(ts,e);var u=rW(0);if(u<0){var i=ny(u);cX(W1(FT0,i)[1+i])}var f=es(ts),o=f}catch(A){var a=L1(A),d=ay(x);l(EI(cF),d),PI(ts,e);var k=ay(a);l(EI(sF),k),PI(ts,ZY(0));var o=es(ts)}var T=o}catch(A){var g=L1(A);if(g!==uI)throw q0(g,0);var T=cX(oF)}return T}catch{return 0}});var CI=[qr,bF,Js(0)],ly=0,RX=-1;function $l(x,r){return x[13]=x[13]+r[3]|0,yI(r,x[28])}var IX=1000000010;function NI(x,r){return G0(x[17],r,0,Xx(r))}function py(x){return l(x[19],0)}function OX(x,r,e){return x[9]=x[9]-r|0,NI(x,e),x[11]=0,0}function dy(x,r){var e=P(r,hx);return e&&OX(x,Xx(r),r)}function Bv(x,r,e){var t=r[3],u=r[2];dy(x,r[1]),py(x),x[11]=1;var i=(x[6]-e|0)+u|0,f=x[8],o=f<=i?f:i;return x[10]=o,x[9]=x[6]-x[10]|0,l(x[21],x[10]),dy(x,t)}function LX(x,r){return Bv(x,GF,r)}function qa(x,r){var e=r[2],t=r[3];return dy(x,r[1]),x[9]=x[9]-e|0,l(x[20],e),dy(x,t)}function qT0(x,r,e){if(typeof e=="number")switch(e){case 0:var t=Qa(x[3]);if(!t)return 0;var u=t[1][1],i=function(ax,dx){if(!dx)return[0,ax,0];var mx=dx[1],L0=dx[2];return xW(ax,mx)?[0,ax,dx]:[0,mx,i(ax,L0)]};return u[1]=i(x[6]-x[9]|0,u[1]),0;case 1:return $a(x[2]),0;case 2:return $a(x[3]),0;case 3:var f=Qa(x[2]);return f?LX(x,f[1][2]):py(x);case 4:var o=x[10]!==(x[6]-x[9]|0)?1:0;if(!o)return o;var a=x[28],d=a[2];if(d){var k=d[1];if(d[2]){var T=d[2];a[1]=a[1]-1|0,a[2]=T;var g=[0,k]}else{dI(a);var g=[0,k]}}else var g=0;if(!g)return 0;var A=g[1],N=A[1];return x[12]=x[12]-A[3]|0,x[9]=x[9]+N|0,0;default:var R=$a(x[5]);return R?NI(x,l(x[25],R[1])):0}switch(e[0]){case 0:return OX(x,r,e[1]);case 1:var I=e[2],M=e[1],L=I[1],z=I[2],V=Qa(x[2]);if(!V)return 0;var Z=V[1],$=Z[2];switch(Z[1]){case 0:return qa(x,M);case 1:return Bv(x,I,$);case 2:return Bv(x,I,$);case 3:return x[9]<(r+Xx(L)|0)?Bv(x,I,$):qa(x,M);case 4:return x[11]?qa(x,M):x[9]<(r+Xx(L)|0)||((x[6]-$|0)+z|0)s0){var Q=v0;continue}var o0=s0}else var o0=f0;var c0=o0;break}else var c0=i0;var T0=c0-i0|0;return 0<=T0?qa(x,[0,FF,T0+J|0,QF]):Bv(x,[0,qF,c0+U|0,HF],x[6]);case 3:var E0=e[2],M0=e[1];if(x[8]<(x[6]-x[9]|0)){var Y0=Qa(x[2]);if(Y0){var rx=Y0[1],g0=rx[2],H0=rx[1];x[9]=H0-1>>>0&&LX(x,g0)}else py(x)}var t0=x[9]-M0|0,ex=E0===1?1:x[9]=e)return G0(x[17],VX,0,e);G0(x[17],VX,0,80);var e=e+sj|0}}function GT0(x){return x[1]===CI?Qx(XF,Qx(x[2],YF)):JF}function bT0(x){return x[1]===CI?Qx(UF,Qx(x[2],jF)):BF}function xS0(x){return 0}function rS0(x){return 0}function KX(x,r){function e(g){return 0}function t(g){return 0}function u(g){return 0}var i=_X(0),f=[0,RX,MF,0];yI(f,i);var o=zl(0);RI(o),Uv([0,1,f],o);var a=zl(0),d=zl(0),k=zl(0),T=[0,o,zl(0),k,d,a,78,10,68,78,0,1,1,1,1,DT0,DF,x,r,u,t,e,0,0,GT0,bT0,xS0,rS0,i];return T[19]=function(g){return G0(T[17],VF,0,1)},T[20]=function(g){return zX(T,g)},T[21]=function(g){return zX(T,g)},T}function ZX(x){function r(e){return es(x)}return KX(function(e,t,u){return 0<=t&&0<=u&&(Xx(e)-u|0)>=t?rI(x,e,t,u):m2(SW)},r)}function MI(x){function r(e){return 0}return KX(function(e,t,u){return wX(x,e,t,u)},r)}var eS0=hw;function WX(x){return Qr(eS0)}var tS0=WX(0),nS0=ZX(UT0),uS0=ZX(ts);MI(tS0);function $X(x,r){var e=Qr(16),t=MI(e);p(x,t,r),Fl(t,0);var u=e[2];if(2>u)return X1(e);var i=u-2|0,f=1;return 0<=i&&(e[2]-i|0)>=1?Wa(e[1],f,i):m2(e$)}function ze(x,r){var e=0;if(typeof r=="number")return 0;switch(r[0]){case 0:var t=r[2];if(ze(x,r[1]),typeof t=="number")switch(t){case 0:return YX(x,0);case 1:return XX(x,0);case 2:return Fl(x,0);case 3:var u=x[14]=O1(L,U)+G5>>>0){var U=U+1|0;continue}for(var J=k2(L,i0,U-i0|0),Y=$(U),F=Y;;){if(F!==V){var n0=O1(L,F),Q=0;if(48<=n0?58>n0&&(Q=1):n0===45&&(Q=1),Q){var F=F+1|0;continue}}if(Y===F)var f0=0;else try{var s0=vt(k2(L,Y,F-Y|0)),f0=s0}catch(b0){var v0=L1(b0);if(v0[1]!==kn)throw q0(v0,0);var f0=Z(0)}$(F)!==V&&Z(0);var o0=0;if(P(J,hx)&&P(J,bE))var c0=P(J,"h")?P(J,"hov")?P(J,"hv")?P(J,$D)?Z(0):1:2:3:0;else o0=1;if(o0)var c0=4;var z=[0,f0,c0];break}break}return BX(x,z[1],z[2]);case 2:var T0=r[1],E0=0;if(typeof T0=="number"||T0[0]!==0)E0=1;else{var M0=T0[2],Y0=0;if(typeof M0=="number"||M0[0]!==1)Y0=1;else var rx=r[2],g0=M0[2],H0=T0[1];Y0&&(E0=1)}if(E0){var t0=r[2],ex=T0;e=2}break;case 3:var xx=r[1],ax=0;if(typeof xx=="number"||xx[0]!==0)ax=1;else{var dx=xx[2],mx=0;if(typeof dx=="number"||dx[0]!==1)mx=1;else{var L0=r[2],C0=dx[2],A0=xx[1];e=1}mx&&(ax=1)}if(ax){var U0=r[2],Q0=xx;e=3}break;case 4:var H=r[1],b=0;if(typeof H=="number"||H[0]!==0)b=1;else{var B=H[2],a0=0;if(typeof B=="number"||B[0]!==1)a0=1;else var rx=r[2],g0=B[2],H0=H[1];a0&&(b=1)}if(b){var t0=r[2],ex=H;e=2}break;case 5:var m0=r[1],P0=0;if(typeof m0=="number"||m0[0]!==0)P0=1;else{var D=m0[2],N0=0;if(typeof D=="number"||D[0]!==1)N0=1;else{var L0=r[2],C0=D[2],A0=m0[1];e=1}N0&&(P0=1)}if(P0){var U0=r[2],Q0=m0;e=3}break;case 6:var X0=r[2];return ze(x,r[1]),l(X0,x);case 7:return ze(x,r[1]),Fl(x,0);default:var D0=r[2];return ze(x,r[1]),m2(D0)}switch(e){case 0:return ze(x,H0),LI(x,g0,rx);case 1:return ze(x,A0),LI(x,C0,fy(1,L0));case 2:return ze(x,ex),yy(x,t0);default:return ze(x,Q0),Ql(x,U0)}}function Br(x){return function(r){var e=r[1],t=0;return Ur(function(u){return ze(x,u),0},t,e)}}for(;;){var QX=sI[1],iS0=[0,1];if(!(1-cI(sI,QX,function(x,r){return function(e){return cI(x,1,0)&&(Fl(nS0,0),Fl(uS0,0)),l(r,0)}}(iS0,QX)))){var fS0=2,cS0=function(x){var r=[0,0],e=Xx(x)-1|0,t=0;if(e>=0)for(var u=t;;){var i=O1(x,u);r[1]=(l8*r[1]|0)+i|0;var f=u+1|0;if(e!==u){var u=f;continue}break}r[1]=r[1]&uD;var o=1073741823=0)for(var f=i;;){var o=(f*2|0)+3|0,a=W1(x,f)[1+f];W1(e,o)[1+o]=a;var d=f+1|0;if(u!==f){var f=d;continue}break}return[0,fS0,e,Yv[1],Io[1],0,0,Fs[1],0]},DI=function(x,r){var e=x[2].length-1,t=e=0&&(u.length-1-e|0)>=0&&(hZ(i,0,u,0,e),f=1),f||m2(JW),x[2]=u;var o=0}else var o=t;return o},GX=[0,0],oS0=[0,0],jI=function(x){var r=x[2].length-1;return DI(x,r+1|0),r},Hl=function(x,r){try{var e=p(Yv[28],r,x[3]);return e}catch(i){var t=L1(i);if(t!==P2)throw q0(t,0);var u=jI(x);return x[3]=G0(Yv[4],r,u,x[3]),x[4]=G0(Io[4],u,1,x[4]),u}},UI=function(x,r){return cy(function(e){return Hl(x,e)},r)},bX=function(x,r,e){return oS0[1]++,p(Io[28],r,x[4])?(DI(x,r+1|0),W1(x[2],r)[1+r]=e,0):(x[6]=[0,[0,r,e],x[6]],0)},BI=function(x){if(x===0)return 0;for(var r=x.length-1-1|0,e=0;;){if(0>r)return e;var t=[0,x[1+r],e],r=r-1|0,e=t}},YI=function(x,r){try{var e=p(Fs[28],r,x[7]);return e}catch(i){var t=L1(i);if(t!==P2)throw q0(t,0);var u=x[1];return x[1]=u+1|0,P(r,hx)&&(x[7]=G0(Fs[4],r,u,x[7])),u}},XI=function(x){return Nl(x,0)?[0]:x},JI=function(x,r,e,t,u,i){var f=u[2],o=u[4],a=BI(r),d=BI(e),k=BI(t),T=_n(function(o0){return Hl(x,o0)},d),g=_n(function(o0){return Hl(x,o0)},k);x[5]=[0,[0,x[3],x[4],x[6],x[7],T,a],x[5]];var A=Fs[1],N=x[7];function R(o0,c0,T0){return lI(o0,a)?G0(Fs[4],o0,c0,T0):T0}x[7]=G0(Fs[13],R,N,A);var I=[0,Yv[1]],M=[0,Io[1]];aX(function(o0,c0){I[1]=G0(Yv[4],o0,c0,I[1]);var T0=M[1];try{var E0=p(Io[28],c0,x[4]),M0=E0}catch(rx){var Y0=L1(rx);if(Y0!==P2)throw q0(Y0,0);var M0=1}return M[1]=G0(Io[4],c0,M0,T0),0},k,g),aX(function(o0,c0){return I[1]=G0(Yv[4],o0,c0,I[1]),M[1]=G0(Io[4],c0,0,M[1]),0},d,T),x[3]=I[1],x[4]=M[1];var L=0,z=x[6];x[6]=vI(function(o0,c0){return lI(o0[1],T)?c0:[0,o0,c0]},z,L);var V=i?p(f,x,o):l(f,x),Z=Yl(x[5]),$=Z[6],i0=Z[5],U=Z[4],J=Z[3],Y=Z[2],F=Z[1];x[5]=vX(x[5]),x[7]=r2(function(o0,c0){var T0=p(Fs[28],c0,x[7]);return G0(Fs[4],c0,T0,o0)},U,$),x[3]=F,x[4]=Y;var n0=x[6];x[6]=vI(function(o0,c0){return lI(o0[1],i0)?c0:[0,o0,c0]},n0,J);var Q=0,f0=XI(t),s0=[0,cy(function(o0){var c0=Hl(x,o0);try{for(var T0=x[6];;){if(!T0)throw q0(P2,1);var E0=T0[1],M0=T0[2],Y0=E0[2];if(zY(E0[1],c0)===0)return Y0;var T0=M0}}catch(g0){var rx=L1(g0);if(rx===P2)return W1(x[2],c0)[1+c0];throw q0(rx,0)}},f0),Q],v0=XI(r);return _Z([0,[0,V],[0,cy(function(o0){try{var c0=p(Fs[28],o0,x[7]);return c0}catch(E0){var T0=L1(E0);throw T0===P2?q0([0,wr,xH],1):q0(T0,0)}},v0),s0]])},my=function(x,r){if(x===0)var e=qX([0]);else{var t=qX(cy(cS0,x)),u=x.length-1-1|0,i=0;if(u>=0)for(var f=i;;){var o=(f*2|0)+2|0;t[3]=G0(Yv[4],x[1+f],o,t[3]),t[4]=G0(Io[4],o,1,t[4]);var a=f+1|0;if(u!==f){var f=a;continue}break}var e=t}var d=l(r,e);return GX[1]=(GX[1]+e[1]|0)-1|0,e[8]=Ax(e[8]),DI(e,3+((W1(e[2],1)[2]*16|0)/32|0)|0),[0,l(d,0),r,d,0]},ky=function(x,r){if(x)return x;var e=eI(qr,r[1]);return e[1]=r[2],aW(e)},VI=function(x,r,e){if(x)return r;var t=e[8];if(t!==0)for(var u=t;;){if(u){var i=u[2];l(u[1],r);var u=i;continue}break}return r},hy=function(x){var r=jI(x),e=0;if(r%2|0&&(2+((W1(x[2],1)[2]*16|0)/32|0)|0)>=r){var t=jI(x);e=1}if(!e)var t=r;return W1(x[2],t)[1+t]=0,t},zI=function(x,r){for(var e=[0,0],t=r.length-1;;){if(e[1]>=t)return 0;var u=e[1],i=W1(r,u)[1+u],f=function(kx){e[1]++;var V0=e[1];return W1(r,V0)[1+V0]},o=f(0);if(typeof o=="number")switch(o){case 0:var a=f(0),b0=function(V0){return function(h){return V0}}(a);break;case 1:var d=f(0),b0=function(V0){return function(h){return h[1+V0]}}(d);break;case 2:var k=f(0),T=f(0),b0=function(V0,h){return function(X){return X[1+V0][1+h]}}(k,T);break;case 3:var g=f(0),b0=function(V0){return function(h){return l(h[1][1+V0],h)}}(g);break;case 4:var A=f(0),b0=function(V0){return function(h,X){return h[1+V0]=X,0}}(A);break;case 5:var N=f(0),R=f(0),b0=function(V0,h){return function(X){return l(V0,h)}}(N,R);break;case 6:var I=f(0),M=f(0),b0=function(V0,h){return function(X){return l(V0,X[1+h])}}(I,M);break;case 7:var L=f(0),z=f(0),V=f(0),b0=function(V0,h,X){return function(W0){return l(V0,W0[1+h][1+X])}}(L,z,V);break;case 8:var Z=f(0),$=f(0),b0=function(V0,h){return function(X){return l(V0,l(X[1][1+h],X))}}(Z,$);break;case 9:var i0=f(0),U=f(0),J=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,X)}}(i0,U,J);break;case 10:var Y=f(0),F=f(0),n0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,W0[1+X])}}(Y,F,n0);break;case 11:var Q=f(0),f0=f(0),s0=f(0),v0=f(0),b0=function(V0,h,X,W0){return function(sx){return p(V0,h,sx[1+X][1+W0])}}(Q,f0,s0,v0);break;case 12:var o0=f(0),c0=f(0),T0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,l(W0[1][1+X],W0))}}(o0,c0,T0);break;case 13:var E0=f(0),M0=f(0),Y0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,W0[1+h],X)}}(E0,M0,Y0);break;case 14:var rx=f(0),g0=f(0),H0=f(0),t0=f(0),b0=function(V0,h,X,W0){return function(sx){return p(V0,sx[1+h][1+X],W0)}}(rx,g0,H0,t0);break;case 15:var ex=f(0),xx=f(0),ax=f(0),b0=function(V0,h,X){return function(W0){return p(V0,l(W0[1][1+h],W0),X)}}(ex,xx,ax);break;case 16:var dx=f(0),mx=f(0),b0=function(V0,h){return function(X){return p(X[1][1+V0],X,h)}}(dx,mx);break;case 17:var L0=f(0),C0=f(0),b0=function(V0,h){return function(X){return p(X[1][1+V0],X,X[1+h])}}(L0,C0);break;case 18:var A0=f(0),U0=f(0),Q0=f(0),b0=function(V0,h,X){return function(W0){return p(W0[1][1+V0],W0,W0[1+h][1+X])}}(A0,U0,Q0);break;case 19:var H=f(0),b=f(0),b0=function(V0,h){return function(X){var W0=l(X[1][1+h],X);return p(X[1][1+V0],X,W0)}}(H,b);break;case 20:var B=f(0),a0=f(0);hy(x);var b0=function(V0,h){return function(X){return l(Gx(h,V0,0),h)}}(B,a0);break;case 21:var m0=f(0),P0=f(0);hy(x);var b0=function(V0,h){return function(X){var W0=X[1+h];return l(Gx(W0,V0,0),W0)}}(m0,P0);break;case 22:var D=f(0),N0=f(0),X0=f(0);hy(x);var b0=function(V0,h,X){return function(W0){var sx=W0[1+h][1+X];return l(Gx(sx,V0,0),sx)}}(D,N0,X0);break;default:var D0=f(0),ox=f(0);hy(x);var b0=function(V0,h){return function(X){var W0=l(X[1][1+h],X);return l(Gx(W0,V0,0),W0)}}(D0,ox)}else var b0=o;bX(x,i,b0),e[1]++}},xJ=function(x,r){var e=r.length-1,t=eI(0,e),u=e-1|0,i=0;if(u>=0)for(var f=i;;){var o=W1(r,f)[1+f];if(typeof o=="number")switch(o){case 0:var k=function(A){function N(R){var I=t[1+A];if(N===I)throw q0([0,Dl,x],1);return l(I,R)}return N}(f);break;case 1:var a=[];I0(a,[el,function(A,N){return function(R){var I=t[1+N];if(A===I)throw q0([0,Dl,x],1);var M=Dv(I);if(Ya===M)return I[1];if(el!==M)return I;var L=I[1];I[1]=XT0;try{var z=l(L,0);return oW(I,z),z}catch(Z){var V=L1(Z);throw I[1]=function($){throw q0(V,0)},q0(V,0)}}}(a,f)]);var k=a;break;default:var d=function(A){throw q0([0,Dl,x],1)},k=[0,d,d,d,0]}else var k=o[0]===0?xJ(x,o[1]):o[1];t[1+f]=k;var T=f+1|0;if(u!==f){var f=T;continue}break}return t},rJ=function(x,r,e){if(Dv(e)===0&&x.length-1<=e.length-1){var t=x.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var f=e[1+i],o=W1(x,i)[1+i];if(typeof o=="number")if(o===2){var a=0;if(Dv(f)===0&&f.length-1===4)for(var d=0,k=r[1+i];;){k[1+d]=f[1+d];var T=d+1|0;if(d!==3){var d=T;continue}break}else a=1;if(a)throw q0([0,wr,rH],1)}else r[1+i]=f;else o[0]===0&&rJ(o[1],r[1+i],f);var g=i+1|0;if(t!==i){var i=g;continue}break}return 0}throw q0([0,wr,eH],1)};try{rX("TMPDIR")}catch(x){var eJ=L1(x);if(eJ!==P2)throw q0(eJ,0)}try{rX("TEMP")}catch(x){var tJ=L1(x);if(tJ!==P2)throw q0(tJ,0)}P(sX,BB)&&P(sX,"Win32");var is=function(x,r){function e(t){return lt(x,t)}return fl<=r?(e(Ta|r>>>18|0),e(h1|(r>>>12|0)&63),e(h1|(r>>>6|0)&63),e(h1|r&63)):hN<=r?(e(Pa|r>>>12|0),e(h1|(r>>>6|0)&63),e(h1|r&63)):h1<=r?(e(_a|r>>>6|0),e(h1|r&63)):e(r)},Oo=[qr,uH,Js(0)],nJ=0,uJ=0,iJ=0,fJ=0,cJ=0,sJ=0,oJ=0,vJ=0,aJ=0,lJ=0,m=function(x){if(x[3]===x[2])return-1;var r=x[1][1+x[3]];return x[3]=x[3]+1|0,r===10&&(x[5]!==0&&(x[5]=x[5]+1|0),x[4]=x[3]),r},r0=function(x,r){return x[9]=x[3],x[10]=x[4],x[11]=x[5],x[12]=r,0},yr=function(x){return x[6]=x[3],x[7]=x[4],x[8]=x[5],r0(x,-1)},_=function(x){return x[3]=x[9],x[4]=x[10],x[5]=x[11],x[12]},Ga=function(x){return x[3]=x[6],x[4]=x[7],x[5]=x[8],0},KI=function(x,r){return x[6]=r,0},_y=function(x){return x[3]-x[6]|0},t1=function(x){var r=x[3]-x[6]|0,e=x[6],t=x[1];return 0<=e&&0<=r&&(t.length-1-r|0)>=e?wZ(t,e,r):m2(VW)},pJ=function(x){var r=x[6];return W1(x[1],r)[1+r]},ql=function(x,r,e,t){for(var u=[0,r],i=[0,e],f=[0,0];;){if(0>=i[1])return f[1];var o=x[1+u[1]];if(0>o)throw q0(Oo,1);if(Xr>>18|0),Kr(t,f[1]+1|0,h1|(o>>>12|0)&63),Kr(t,f[1]+2|0,h1|(o>>>6|0)&63),Kr(t,f[1]+3|0,h1|o&63),f[1]=f[1]+4|0}else Kr(t,f[1],Pa|o>>>12|0),Kr(t,f[1]+1|0,h1|(o>>>6|0)&63),Kr(t,f[1]+2|0,h1|o&63),f[1]=f[1]+3|0;else Kr(t,f[1],_a|o>>>6|0),Kr(t,f[1]+1|0,h1|o&63),f[1]=f[1]+2|0;else Kr(t,f[1],o),f[1]++;u[1]++,i[1]+=-1}},dJ=function(x){for(var r=Xx(x),e=za(r,0),t=[0,0],u=[0,0];;){if(t[1]>=r)return[0,e,u[1],lJ,aJ,vJ,oJ,sJ,cJ,fJ,iJ,uJ,nJ];var i=fx(x,t[1]),f=0;if(_a<=i)if(Ta<=i)if(qr<=i)f=1;else{var o=fx(x,t[1]+1|0),a=fx(x,t[1]+2|0),d=fx(x,t[1]+3|0),k=(o>>>6|0)!==2?1:0;if(k)var g=k;else var T=(a>>>6|0)!==2?1:0,g=T||((d>>>6|0)!==2?1:0);if(g)throw q0(Oo,1);var A=(i&7)<<18|(o&63)<<12|(a&63)<<6|d&63;if(_5>>6|0)!==2?1:0,L=M||((R>>>6|0)!==2?1:0);if(L)var V=L;else var z=55296<=I?1:0,V=z&&(I<=57343?1:0);if(V)throw q0(Oo,1);e[1+u[1]]=I,t[1]=t[1]+3|0}else{var Z=fx(x,t[1]+1|0);if((Z>>>6|0)!==2)throw q0(Oo,1);e[1+u[1]]=(i&31)<<6|Z&63,t[1]=t[1]+2|0}else h1<=i?f=1:(e[1+u[1]]=i,t[1]++);if(f)throw q0(Oo,1);u[1]++}},Gl=function(x,r,e){var t=x[6]+r|0,u=S1(e*4|0),i=x[1];if((t+e|0)<=i.length-1)return Wa(u,0,ql(i,t,e,u));throw q0([0,wr,nH],1)},Jx=function(x){var r=x[6],e=x[3]-r|0,t=S1(e*4|0);return Wa(t,0,ql(x[1],r,e,t))},wy=function(x,r){var e=x[6],t=x[3]-e|0,u=S1(t*4|0);return kI(r,u,0,ql(x[1],e,t,u))},bl=function(x){var r=x.length-1,e=S1(r*4|0);return Wa(e,0,ql(x,0,r,e))},yJ=function(x,r){return x[3]=x[3]-r|0,0},fs=function(x){return typeof x=="number"?0:x[0]===0?1:x[1]},Xv=function(x,r,e,t){var u=fs(x),i=fs(t),f=i<=u?u+1|0:i+1|0;return f===1?[0,r,e]:[1,f,r,e,x,t]},Ty=function(x,r,e,t){var u=fs(x),i=fs(t),f=i<=u?u+1|0:i+1|0;return[1,f,r,e,x,t]},mJ=function(x,r,e,t){var u=fs(x),i=fs(t);if((i+2|0)=i)return Xv(x,r,e,t);var R=t[5],I=t[4],M=t[3],L=t[2],z=fs(I);if(z<=fs(R))return Ty(Xv(x,r,e,I),L,M,R);var V=I[4],Z=I[3],$=I[2],i0=Xv(I[5],L,M,R);return Ty(Xv(x,r,e,V),$,Z,i0)},vS0=0,ba=function(x,r){for(var e=x,t=r;;){if(typeof e=="number")return t;if(e[0]===0)return[0,e[1],0,t];var u=[0,e[2],e[4],t],e=e[3],t=u}},kJ=function(x,r){if(!x)return 0;var e=x[1],t=ba(x[2],x[3]);return[0,e,function(u){return kJ(t,u)}]},aS0=function(x){var r=ba(x,0);return function(e){return kJ(r,e)}},Hs=function(x){return typeof x=="number"?0:x[0]===0?1:x[1]},lS0=function(x){return[0,x]},Ke=function(x,r,e){var t=0;if(typeof x=="number"){if(typeof e=="number")return[0,r];e[0]===1&&(t=1)}else if(x[0]===0)typeof e!="number"&&e[0]===1&&(t=1);else{var u=x[1];if(typeof e!="number"&&e[0]===1){var i=e[1],f=i<=u?u+1|0:i+1|0;return[1,f,r,x,e]}var o=u;t=2}switch(t){case 1:var o=e[1];break;case 0:return[1,2,r,x,e]}return[1,o+1|0,r,x,e]},Lo=function(x,r,e){var t=Hs(x),u=Hs(e),i=u<=t?t+1|0:u+1|0;return[1,i,r,x,e]},Sy=function(x,r){if(r===0)return 0;if(r===1)return[0,l(x,0)];var e=r>>>1|0,t=Sy(x,e),u=l(x,0),i=Sy(x,(r-e|0)-1|0);return[1,Hs(t)+1|0,u,t,i]},pS0=function(x){var r=[0,0],e=x.length-1;return Sy(function(t){var u=r[1],i=W1(x,u)[1+u];return r[1]++,i},e)},Jt=function(x,r,e){var t=Hs(x),u=Hs(e);if((u+2|0)=u)return Ke(x,r,e);var g=e[4],A=e[3],N=e[2],R=Hs(A);if(R<=Hs(g))return Lo(Ke(x,r,A),N,g);var I=A[3],M=A[2],L=Ke(A[4],N,g);return Lo(Ke(x,r,I),M,L)},hJ=function(x,r){if(typeof r=="number")return[0,x];if(r[0]===0)return Ke([0,x],r[1],0);var e=r[4],t=r[2];return Jt(hJ(x,r[3]),t,e)},_J=function(x,r){if(typeof r=="number")return[0,x];if(r[0]===0)return Ke(0,r[1],[0,x]);var e=r[3],t=r[2];return Jt(e,t,_J(x,r[4]))},V2=function(x,r,e){if(typeof x=="number")return hJ(r,e);if(x[0]===0){if(typeof e!="number"){if(e[0]===0)return Ke(x,r,e);var t=e[4],u=e[3],i=e[2];return 3>1,h=T0(V0,H0),X=h[1],W0=T0(g0-V0|0,h[2]),sx=X,tx=W0[1],j0=0,Px=W0[2];;){if(sx){if(tx){var Ex=tx[2],Ox=tx[1],qx=sx[2],B0=sx[1],rr=p(o0,B0,Ox);if(rr===0){var sx=qx,tx=Ex,j0=[0,B0,j0];continue}if(0>1,h=c0(V0,H0),X=h[1],W0=c0(g0-V0|0,h[2]),sx=X,tx=W0[1],j0=0,Px=W0[2];;){if(sx){if(tx){var Ex=tx[2],Ox=tx[1],qx=sx[2],B0=sx[1],rr=p(o0,B0,Ox);if(rr===0){var sx=qx,tx=Ex,j0=[0,B0,j0];continue}if(0<=rr){var tx=Ex,j0=[0,Ox,j0];continue}var sx=qx,j0=[0,B0,j0];continue}var Ux=us(sx,j0)}else var Ux=us(tx,j0);return[0,Ux,Px]}},E0=ns(U),M0=2<=E0?c0(E0,U)[1]:U,Y0=function(g0,H0){if(3>=g0>>>0)switch(g0){case 0:return[0,0,H0];case 1:if(H0)return[0,[0,H0[1]],H0[2]];break;case 2:if(H0){var t0=H0[2];if(t0)return[0,[1,2,t0[1],[0,H0[1]],0],t0[2]]}break;default:if(H0){var ex=H0[2];if(ex){var xx=ex[2];if(xx)return[0,[1,2,ex[1],[0,H0[1]],[0,xx[1]]],xx[2]]}}}var ax=g0/2|0,dx=Y0(ax,H0),mx=dx[2],L0=dx[1];if(!mx)throw q0([0,wr,aH],1);var C0=mx[1],A0=Y0((g0-ax|0)-1|0,mx[2]),U0=A0[2];return[0,Lo(L0,C0,A0[1]),U0]};return Y0(ns(M0),M0)[1]}var rx=s0[1];return r(rx,r(v0,r(f0,r(n0,[0,Y]))))}function i0(U,J,Y){l(Br(J),cH);var F=EJ(Y);F&&l(Br(J),sH);var n0=0;return r2(function(Q,f0){return Q&&l(Br(J),fH),p(U,J,f0),1},n0,F),F&&l(Br(J),oH),l(Br(J),vH)}return[0,n1,$I,t,r,lS0,u,i,f,a,d,k,T,g,A,Z,N,R,I,M,L,WI,EJ,x6,wJ,TJ,dS0,x6,wJ,z,V,aS0,$,i0,Sy,pS0,function(U,J){for(var Y=J;;){if(typeof Y=="number")return 0;if(Y[0]===0){var F=Y[1];return l(U,F)?[0,F]:0}var n0=Y[2],Q=Y[4],f0=Y[3];if(!l(U,n0)){var Y=Q;continue}for(var s0=n0,v0=f0;;){if(typeof v0=="number")return[0,s0];if(v0[0]===0){var o0=v0[1];return l(U,o0)?[0,o0]:[0,s0]}var c0=v0[2],T0=v0[4],E0=v0[3];if(l(U,c0)){var s0=c0,v0=E0;continue}var v0=T0}}}]},AJ=function(x){switch(x[0]){case 0:return 1;case 1:return 2;case 2:return 2;default:return 3}},Vx=function(x,r){if(!r)return r;var e=r[1],t=l(x,e);return e===t?r:[0,t]},cx=function(x,r,e,t,u){var i=p(x,r,e);return e===i?t:l(u,i)},$0=function(x,r,e,t){var u=l(x,r);return r===u?e:l(t,u)},t2=function(x,r){var e=r[1],t=r[2];return cx(x,e,t,r,function(u){return[0,e,u]})},PJ=function(x,r){return Vx(function(e){var t=e[1],u=e[2];return cx(x,t,u,e,function(i){return[0,t,i]})},r)},Sr=function(x,r){var e=r2(function(u,i){var f=u[2],o=u[1],a=l(x,i),d=f||(a!==i?1:0);return[0,[0,a,o],d]},VH,r),t=e[1];return e[2]?Ax(t):r},QI=my(KH,function(x){var r=UI(x,zH),e=r[1],t=r[2],u=r[3],i=r[4],f=r[5],o=r[6],a=r[7],d=r[8],k=r[9],T=r[10],g=r[11],A=r[12],N=r[13],R=r[14],I=r[15],M=r[16],L=r[17],z=r[18],V=r[19],Z=r[20],$=r[21],i0=r[22],U=r[23],J=r[24],Y=r[25],F=r[26],n0=r[27],Q=r[28],f0=r[29],s0=r[30],v0=r[31],o0=r[32],c0=r[33],T0=r[34],E0=r[35],M0=r[36],Y0=r[37],rx=r[38],g0=r[39],H0=r[40],t0=r[41],ex=r[42],xx=r[43],ax=r[44],dx=r[45],mx=r[46],L0=r[47],C0=r[48],A0=r[49],U0=r[50],Q0=r[51],H=r[52],b=r[53],B=r[54],a0=r[55],m0=r[56],P0=r[57],D=r[59],N0=r[60],X0=r[61],D0=r[62],ox=r[63],b0=r[64],kx=r[65],V0=r[66],h=r[67],X=r[68],W0=r[69],sx=r[70],tx=r[71],j0=r[72],Px=r[73],Ex=r[74],Ox=r[75],qx=r[76],B0=r[77],rr=r[78],Ux=r[79],K0=r[80],nr=r[81],z0=r[82],or=r[83],jr=r[84],lx=r[85],v1=r[86],K1=r[87],w1=r[88],Cr=r[89],u2=r[90],w=r[91],x0=r[92],e0=r[93],S0=r[94],G=r[95],k0=r[96],J0=r[97],O0=r[98],ix=r[99],Wx=r[ot],Bx=r[It],Hx=r[Zf],$x=r[nn],er=r[jt],Zx=r[ct],Lr=r[c2],Yx=r[xe],ie=r[sn],Ft=r[To],E2=r[B1],We=r[Ot],fo=r[D2],gn=r[Nr],ds=r[st],me=r[Eo],An=r[Ri],Ht=r[dv],$e=r[ma],qt=r[Ca],dr=r[Lf],mt=r[il],Qo=r[br],ke=r[Lt],Pn=r[Da],co=r[Di],Fo=r[K4],so=r[Xr],oo=r[h1],l2=r[wl],ys=r[ud],he=r[Ep],Cn=r[rN],Ho=r[fD],bv=r[XU],xa=r[_Y],vo=r[Qj],ms=r[zD],kt=r[Uw],qo=r[Ij],Go=r[SB],ao=r[eU],ra=r[kj],ea=r[ZU],ks=r[MB],ta=r[tj],lo=r[146],bo=r[147],xv=r[148],Nn=r[OU],rv=r[cU],$9=r[151],k3=r[152],Q9=r[153],U6=r[154],B6=r[155],Y6=r[156],X6=r[157],h3=r[158],F9=r[159],H9=r[tU],na=r[dE],_3=r[Gj],q9=r[ZB],G9=r[Rj],j1=r[dN],ev=r[Kj],po=r[sB],ua=r[BT],q=r[p5],C=r[G4],j=r[Yk],h0=r[Wj],R0=r[VU],nx=r[dY],Sx=r[pD],Dx=r[gT],jx=r[ID],bx=r[yB],hr=r[FM],cr=r[xU],lr=r[MR],kr=r[uh],sr=r[yN],Er=r[id],Wr=r[lj],Vr=r[Lp],x1=r[ig],Ir=r[PU],r1=r[US],a1=r[RD],T1=r[pU],l1=r[_a],u1=r[HD],i1=r[gh],p1=r[QD],P1=r[JU],Q1=r[ED],p2=r[sY],Hr=r[wU],Kx=r[IR],Yr=r[bM],Mr=r[mB],Dr=r[uY],$r=r[nj],I1=r[HB],Qe=r[GT],Fe=r[hY],zr=r[EB],i2=r[jD],Gt=r[vY],He=r[xj],U1=r[aE],F1=r[$M],W2=r[oB],_e=r[MT],bt=r[bC],we=r[zU],Te=r[qB],ht=r[pB],Se=r[jU],$2=r[uU],Ee=r[nD],Q2=r[l8],ge=r[Pa],_t=r[MU],wt=r[$j],g2=r[aY],L2=r[DU],F2=r[NB],Rn=r[Jj],In=r[dU],xn=r[wY],Tt=r[Lj],rn=r[EY],On=r[VB],Ae=r[rY],qe=r[WU],M2=r[TT],Ln=r[H8],St=r[Ta],Et=r[ZM],gt=r[gB],hs=r[GU],Mn=r[MC],H2=r[SS],Ge=r[el],Dn=r[b8],jn=r[qr],_s=r[pk],tv=r[Ya],ia=r[Ug],w3=r[Av],yo=r[og],mo=r[La],T3=r[Q3],S3=r[q3],E3=r[uj],ko=r[_g],nv=r[GD],fa=r[260],g3=r[KM],Un=r[262],A3=r[263],Bn=r[264],P3=r[265],C3=r[fB],ca=r[nY],uv=r[268],N3=r[269],R3=r[270],iv=r[tr],At=r[272],ws=r[la],sa=r[274],oa=r[275],I3=r[276],en=r[hU],Pe=r[278],Ts=r[279],Yn=r[iY],tn=r[iD],Ce=r[IB],ho=r[AU],O3=r[284],L3=r[285],M3=r[CU],D3=r[287],fe=r[xY],fv=r[OB],j3=r[58];function b9(n,s,c){var v=c[2],y=c[1],S=c[4],E=c[3],O=Vx(l(n[1][1+Kx],n),y),W=p(n[1][1+t0],n,v);return v===W&&y===O?c:[0,O,W,E,S]}function XL(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+Pe],n,E),W=Vx(l(n[1][1+L],n),S),d0=p(n[1][1+Q],n,y),w0=p(n[1][1+t0],n,v);return E===O&&y===d0&&S===W&&v===w0?c:[0,O,W,d0,w0]}function JL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function VL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+N0],n,S),O=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function zL(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],O=G0(n[1][1+o],n,s,S),W=Vx(l(n[1][1+Kx],n),y);return S===O&&y===W?c:[0,E,[0,O,W]]}function KL(n,s,c){var v=c[3],y=c[2],S=c[1],E=Sr(p(n[1][1+a],n,y),S),O=p(n[1][1+t0],n,v);return S===E&&v===O?c:[0,E,y,O]}function ZL(n,s,c){var v=c[4],y=c[2],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],S,c[3],E]}function WL(n,s,c){var v=c[3],y=c[2],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],S,E]}function $L(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S);if(y)var O=y[1],W=p(n[1][1+Q],n,O),d0=O===W?y:[0,W],w0=d0;else var w0=y;var F0=p(n[1][1+t0],n,v);return E===S&&F0===v?c:[0,E,w0,F0]}function QL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=p(n[1][1+F],n,y),W=p(n[1][1+t0],n,v);return E===S&&O===y&&W===v?c:[0,E,O,W]}function FL(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=t2(l(n[1][1+en],n),E);if(S)var W=S[1],d0=W[1],w0=W[2],F0=function(m1){return[0,[0,d0,m1]]},vx=cx(l(n[1][1+N3],n),d0,w0,S,F0);else var vx=S;if(y)var Lx=y[1],_x=Lx[1],_r=Lx[2],f1=function(m1){return[0,[0,_x,m1]]},c1=cx(l(n[1][1+en],n),_x,_r,y,f1);else var c1=y;var y1=p(n[1][1+t0],n,v);return E===O&&S===vx&&y===c1&&v===y1?c:[0,O,vx,c1,y1]}function HL(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function qL(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function GL(n,s){return s}function bL(n,s,c){var v=c[3],y=c[2],S=c[1],E=Sr(l(n[1][1+rx],n),S),O=Sr(l(n[1][1+Kx],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function U3(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=t2(l(n[1][1+g0],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function xm(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],O=Vx(l(n[1][1+Kx],n),S),W=p(n[1][1+L0],n,y),d0=p(n[1][1+t0],n,v);return S===O&&y===W&&v===d0?s:[0,E,[0,O,W,d0]]}function xM(n,s,c){var v=c[3],y=c[2],S=c[1],E=c[4],O=p(n[1][1+Kx],n,S),W=Sr(l(n[1][1+xx],n),y),d0=p(n[1][1+t0],n,v);return S===O&&y===W&&v===d0?c:[0,O,W,d0,E]}function rM(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function eM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function rm(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function em(n,s){return[0,p(n[1][1+A0],n,s),0]}function tM(n,s){var c=l(n[1][1+C0],n),v=r2(function(S,E){var O=S[2],W=S[1],d0=l(c,E);if(!d0)return[0,W,1];if(d0[2])return[0,us(d0,W),1];var w0=d0[1],F0=O||(E!==w0?1:0);return[0,[0,w0,W],F0]},JH,s),y=v[1];return v[2]?Ax(y):s}function va(n,s){return p(n[1][1+L0],n,s)}function tm(n,s,c){var v=c[2],y=c[1],S=Sr(l(n[1][1+Kx],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function nm(n,s,c){var v=c[2],y=c[1],S=c[3],E=Vx(l(n[1][1+Kx],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?c:[0,E,O,S]}function nM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+bx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function uM(n,s){var c=s[2],v=c[3],y=c[2],S=y[2],E=y[1],O=c[1],W=s[1],d0=p(n[1][1+j1],n,E),w0=Vx(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return d0===E&&w0===S&&F0===v?s:[0,W,[0,O,[0,d0,w0],F0]]}function iM(n,s){var c=s[2],v=s[1],y=p(n[1][1+i0],n,c);return Nl(y,c)?s:[0,v,y]}function J6(n,s){return p(n[1][1+Kx],n,s)}function fM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1];if(y)var E=y[1],O=function(w0){return[0,w0]},W=$0(l(n[1][1+Kx],n),E,y,O);else var W=y;var d0=p(n[1][1+t0],n,v);return y===W&&v===d0?s:[0,S,[0,W,d0]]}function um(n,s){return p(n[1][1+Kx],n,s)}function cM(n,s,c){return G0(n[1][1+or],n,s,c)}function im(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],O=G0(n[1][1+rr],n,s,S),W=p(n[1][1+t0],n,y);return O===S&&y===W?c:[0,E,[0,O,W]]}function V6(n,s,c){return G0(n[1][1+or],n,s,c)}function fm(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],O=G0(n[1][1+K0],n,s,S),W=p(n[1][1+Q2],n,y);return S===O&&y===W?c:[0,E,[0,O,W]]}function sM(n,s,c){switch(c[0]){case 0:var v=c[1],y=function(O){return[0,O]};return $0(p(n[1][1+nr],n,s),v,c,y);case 1:var S=c[1],E=function(O){return[1,O]};return $0(p(n[1][1+Ux],n,s),S,c,E);default:return c}}function cm(n,s,c){return G0(n[1][1+or],n,s,c)}function z6(n,s,c){return G0(n[1][1+or],n,s,c)}function oM(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],O=G0(n[1][1+ox],n,s,S),W=p(n[1][1+t0],n,y);return O===S&&y===W?c:[0,E,[0,O,W]]}function K6(n,s,c){return p(n[1][1+Ln],n,c)}function vM(n,s,c){return G0(n[1][1+Ox],n,s,c)}function aM(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+B0],n,s),v,y,c,S)}function lM(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+Ex],n,s),v,y,c,S)}function sm(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+D0],n,s),v,y,c,S)}function pM(n,s,c){switch(c[0]){case 0:var v=c[1],y=function(Lx){return[0,Lx]};return $0(p(n[1][1+kx],n,s),v,c,y);case 1:var S=c[1],E=function(Lx){return[1,Lx]};return $0(p(n[1][1+h],n,s),S,c,E);case 2:var O=c[1],W=function(Lx){return[2,Lx]};return $0(p(n[1][1+tx],n,s),O,c,W);case 3:var d0=c[1],w0=function(Lx){return[3,Lx]};return $0(p(n[1][1+W0],n,s),d0,c,w0);default:var F0=c[1],vx=function(Lx){return[4,Lx]};return $0(p(n[1][1+sx],n,s),F0,c,vx)}}function Z6(n,s,c){var v=c[2],y=v[4],S=v[3],E=v[2],O=v[1],W=c[1],d0=G0(n[1][1+X],n,s,O),w0=G0(n[1][1+V0],n,s,E),F0=p(n[1][1+Q2],n,S);if(y){var vx=0;if(d0[0]===3){var Lx=w0[2];if(Lx[0]===2)var _r=Ar(d0[1][2][1],Lx[1][1][2][1]);else vx=1}else vx=1;if(vx)var _x=O===d0?1:0,_r=_x&&(E===w0?1:0)}else var _r=y;return d0===O&&w0===E&&F0===S&&y===_r?c:[0,W,[0,d0,w0,F0,_r]]}function dM(n,s,c){if(c[0]===0){var v=c[1],y=function(O){return[0,O]};return $0(p(n[1][1+j0],n,s),v,c,y)}var S=c[1];function E(O){return[1,O]}return $0(p(n[1][1+b0],n,s),S,c,E)}function yM(n,s,c,v){return G0(n[1][1+tn],n,c,v)}function mM(n,s,c,v){return G0(n[1][1+Yx],n,c,v)}function om(n,s,c,v){return G0(n[1][1+mx],n,c,v)}function kM(n,s,c){return p(n[1][1+j1],n,c)}function B3(n,s,c){var v=c[2],y=c[1];switch(v[0]){case 0:var S=v[1],E=S[3],O=S[2],W=S[1],d0=Sr(p(n[1][1+Px],n,s),W),w0=p(n[1][1+Y],n,O),F0=p(n[1][1+t0],n,E),vx=0;if(d0===W&&w0===O&&F0===E){var Lx=v;vx=1}if(!vx)var Lx=[0,[0,d0,w0,F0]];var it=Lx;break;case 1:var _x=v[1],_r=_x[3],f1=_x[2],c1=_x[1],y1=Sr(p(n[1][1+z0],n,s),c1),m1=p(n[1][1+Y],n,f1),be=p(n[1][1+t0],n,_r),xt=0;if(_r===be&&y1===c1&&m1===f1){var rt=v;xt=1}if(!xt)var rt=[1,[0,y1,m1,be]];var it=rt;break;case 2:var Ne=v[1],et=Ne[2],tt=Ne[1],Pt=Ne[3],nt=G0(n[1][1+Ox],n,s,tt),ut=p(n[1][1+Y],n,et),Xn=0;if(tt===nt&&et===ut){var Jn=v;Xn=1}if(!Xn)var Jn=[2,[0,nt,ut,Pt]];var it=Jn;break;default:var Ss=v[1],Es=function(gs){return[3,gs]},it=$0(l(n[1][1+qx],n),Ss,v,Es)}return v===it?c:[0,y,it]}function hM(n,s){return G0(n[1][1+or],n,0,s)}function _M(n,s,c){var v=s?s[1]:0;return G0(n[1][1+or],n,[0,v],c)}function wM(n,s){return p(n[1][1+Ce],n,s)}function TM(n,s){return p(n[1][1+Ce],n,s)}function SM(n,s){return G0(n[1][1+Ts],n,XH,s)}function W6(n,s,c){return G0(n[1][1+Ts],n,[0,s],c)}function EM(n,s){return G0(n[1][1+Ts],n,YH,s)}function gM(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=p(n[1][1+Pe],n,O),d0=Vx(l(n[1][1+L],n),E),w0=Vx(l(n[1][1+Q],n),S),F0=Vx(l(n[1][1+Q],n),y),vx=p(n[1][1+t0],n,v);return O===W&&S===w0&&E===d0&&S===w0&&y===F0&&v===vx?c:[0,W,d0,w0,F0,vx]}function AM(n,s){return p(n[1][1+Ln],n,s)}function $6(n,s){return p(n[1][1+j1],n,s)}function PM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+tn],n),c,v,s,y)}function CM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+Yx],n),c,v,s,y)}function NM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+mx],n),c,v,s,y)}function Q6(n,s){switch(s[0]){case 0:var c=s[1],v=function(_x){return[0,_x]};return $0(l(n[1][1+J0],n),c,s,v);case 1:var y=s[1],S=function(_x){return[1,_x]};return $0(l(n[1][1+O0],n),y,s,S);case 2:var E=s[1],O=function(_x){return[2,_x]};return $0(l(n[1][1+Bx],n),E,s,O);case 3:var W=s[1],d0=function(_x){return[3,_x]};return $0(l(n[1][1+ix],n),W,s,d0);case 4:var w0=s[1],F0=function(_x){return[4,_x]};return $0(l(n[1][1+D],n),w0,s,F0);default:var vx=s[1],Lx=function(_x){return[5,_x]};return $0(l(n[1][1+Wx],n),vx,s,Lx)}}function F6(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[3],S=c[2],E=c[1],O=p(n[1][1+Hx],n,E),W=p(n[1][1+Kx],n,S);if(y){var d0=0;if(O[0]===3){var w0=W[2];if(w0[0]===9)var vx=Ar(O[1][2][1],w0[1][2][1]);else d0=1}else d0=1;if(d0)var F0=E===O?1:0,vx=F0&&(S===W?1:0)}else var vx=y;return E===O&&S===W&&y===vx?s:[0,v,[0,O,W,vx]];case 1:var Lx=c[2],_x=c[1],_r=p(n[1][1+Hx],n,_x),f1=t2(l(n[1][1+lr],n),Lx);return _x===_r&&Lx===f1?s:[0,v,[1,_r,f1]];case 2:var c1=c[3],y1=c[2],m1=c[1],be=p(n[1][1+Hx],n,m1),xt=t2(l(n[1][1+lr],n),y1),rt=p(n[1][1+t0],n,c1);return m1===be&&y1===xt&&c1===rt?s:[0,v,[2,be,xt,rt]];default:var Ne=c[3],et=c[2],tt=c[1],Pt=p(n[1][1+Hx],n,tt),nt=t2(l(n[1][1+lr],n),et),ut=p(n[1][1+t0],n,Ne);return tt===Pt&&et===nt&&Ne===ut?s:[0,v,[3,Pt,nt,ut]]}}function Y3(n,s,c){var v=c[2],y=c[1],S=Sr(function(O){if(O[0]===0){var W=O[1],d0=p(n[1][1+G],n,W);return W===d0?O:[0,d0]}var w0=O[1],F0=p(n[1][1+U0],n,w0);return w0===F0?O:[1,F0]},y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function X3(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+Kx],n,E),W=Vx(l(n[1][1+iv],n),S),d0=Vx(l(n[1][1+fv],n),y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function vm(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+j1],n,S),O=p(n[1][1+j1],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function RM(n,s){return p(n[1][1+Kx],n,s)}function IM(n,s){return p(n[1][1+D],n,s)}function am(n,s){return p(n[1][1+j1],n,s)}function OM(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+ds],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+Ht],n),y,s,S);default:var E=s[1],O=function(W){return[2,W]};return $0(l(n[1][1+me],n),E,s,O)}}function H6(n,s,c){var v=c[1],y=G0(n[1][1+$e],n,s,v);return v===y?c:[0,y,c[2],c[3]]}function lm(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=p(n[1][1+An],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function pm(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Kx],n,S),O=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,c[1],E,O,W]}function LM(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+mt],n,S),O=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function eg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function tg0(n,s){return p(n[1][1+vo],n,s)}function ng0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+l2],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+ys],n),y,s,S)}function ug0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+oo],n,y),O=p(n[1][1+he],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function ig0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+he],n,y),O=p(n[1][1+he],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function fg0(n,s){return p(n[1][1+ys],n,s)}function cg0(n,s){return p(n[1][1+so],n,s)}function sg0(n,s){return p(n[1][1+he],n,s)}function og0(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+vo],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+bv],n),y,s,S);default:var E=s[1],O=function(W){return[2,W]};return $0(l(n[1][1+xa],n),E,s,O)}}function vg0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Kx],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function ag0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+t0],n,v);if(!y)return v===S?c:[0,0,S];var E=y[1],O=p(n[1][1+Kx],n,E);return E===O&&v===S?c:[0,[0,O],S]}function lg0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(vx){return[0,v,[0,vx]]};return cx(l(n[1][1+kt],n),v,y,s,S);case 1:var E=c[1],O=function(vx){return[0,v,[1,vx]]};return cx(l(n[1][1+Cn],n),v,E,s,O);case 2:var W=c[1],d0=function(vx){return[0,v,[2,vx]]};return cx(l(n[1][1+Ho],n),v,W,s,d0);case 3:var w0=c[1],F0=function(vx){return[0,v,[3,vx]]};return $0(l(n[1][1+ke],n),w0,s,F0);default:return s}}function pg0(n,s){var c=s[2],v=s[1],y=Sr(l(n[1][1+ao],n),c);return c===y?s:[0,v,y]}function dg0(n,s,c){return G0(n[1][1+mx],n,s,c)}function yg0(n,s,c){return G0(n[1][1+Ho],n,s,c)}function mg0(n,s){if(s[0]===0){var c=s[1],v=c[1],y=c[2],S=function(w0){return[0,[0,v,w0]]};return cx(l(n[1][1+ra],n),v,y,s,S)}var E=s[1],O=E[1],W=E[2];function d0(w0){return[1,[0,O,w0]]}return cx(l(n[1][1+ea],n),O,W,s,d0)}function kg0(n,s){return p(n[1][1+so],n,s)}function hg0(n,s){return p(n[1][1+he],n,s)}function _g0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+lo],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+ta],n),y,s,S)}function wg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+bo],n,y),O=Vx(l(n[1][1+ks],n),v);return y===E&&v===O?s:[0,S,[0,E,O]]}function Tg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Sg0(n,s){if(s[0]===0){var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+xv],n),c,s,v)}var y=s[1],S=y[1],E=y[2];function O(W){return[1,[0,S,W]]}return cx(l(n[1][1+Pn],n),S,E,s,O)}function Eg0(n,s){var c=s[2][1],v=s[1],y=p(n[1][1+ms],n,c);return c===y?s:[0,v,[0,y]]}function gg0(n,s){var c=s[2],v=c[4],y=c[2],S=c[1],E=c[3],O=s[1],W=p(n[1][1+ms],n,S),d0=Vx(l(n[1][1+iv],n),y),w0=Sr(l(n[1][1+Fo],n),v);return S===W&&y===d0&&v===w0?s:[0,O,[0,W,d0,E,w0]]}function Ag0(n,s,c){var v=c[4],y=c[3],S=p(n[1][1+Go],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],c[2],S,E]}function Pg0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+co],n,E),W=Vx(l(n[1][1+qo],n),S),d0=p(n[1][1+Go],n,y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function Cg0(n,s,c,v){var y=2<=s?p(n[1][1+Ox],n,BH):l(n[1][1+Pe],n);return l(y,v)}function Ng0(n,s,c){var v=2<=s?p(n[1][1+Ox],n,UH):l(n[1][1+Pe],n);return l(v,c)}function Rg0(n,s,c){var v=c[3],y=c[2],S=c[1],E=0,O=c[4];if(s){var W=0;if(S)switch(S[1]){case 0:E=1;break;case 1:W=2;break;default:W=1}else W=1;var d0=0;switch(W){case 0:break;case 1:if(2<=s)var w0=0,F0=0;else d0=1;break;default:d0=1}if(d0)var w0=1,F0=0}else E=1;if(E)var w0=1,F0=1;var vx=y?p(n[1][1+a0],n,v):F0?p(n[1][1+Pe],n,v):G0(n[1][1+Ox],n,DH,v);if(y)var Lx=y[1],_x=w0?l(n[1][1+Pe],n):p(n[1][1+Ox],n,jH),_r=$0(_x,Lx,y,function(f1){return[0,f1]});else var _r=0;return y===_r&&v===vx?c:[0,S,_r,vx,O]}function Ig0(n,s){return p(n[1][1+j1],n,s)}function Og0(n,s,c){if(c[0]===0){var v=c[1],y=Sr(p(n[1][1+h3],n,s),v);return v===y?c:[0,y]}var S=c[1],E=S[1],O=S[2];function W(d0){return[1,[0,E,d0]]}return cx(p(n[1][1+X6],n,s),E,O,c,W)}function Lg0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function Mg0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=t2(l(n[1][1+Y6],n),E),d0=Vx(p(n[1][1+B6],n,O),y),w0=Vx(function(vx){var Lx=vx[1],_x=vx[2],_r=G0(n[1][1+F9],n,O,Lx);return _r===Lx?vx:[0,_r,_x]},S),F0=p(n[1][1+t0],n,v);return E===W&&y===d0&&S===w0&&v===F0?c:[0,O,W,w0,d0,F0]}function Dg0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+N0],n,E),W=G0(n[1][1+q9],n,y!==0?1:0,S),d0=l(n[1][1+G9],n),w0=Vx(function(vx){return t2(d0,vx)},y),F0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===w0&&v===F0?c:[0,O,W,w0,F0]}function jg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+A0],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Ug0(n,s,c){return p(n[1][1+A0],n,c)}function Bg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Yg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function Xg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function Jg0(n,s,c){return G0(n[1][1+k3],n,s,c)}function Vg0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=p(n[1][1+Pe],n,O),d0=Vx(l(n[1][1+L],n),E),w0=l(n[1][1+ev],n),F0=Sr(function(_x){return t2(w0,_x)},S),vx=t2(l(n[1][1+w],n),y),Lx=p(n[1][1+t0],n,v);return W===O&&d0===E&&F0===S&&vx===y&&Lx===v?c:[0,W,d0,F0,vx,Lx]}function zg0(n,s){return p(n[1][1+Z],n,s)}function Kg0(n,s){return p(n[1][1+Z],n,s)}function Zg0(n,s){return p(n[1][1+j1],n,s)}function Wg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function $g0(n,s){return G0(n[1][1+Ox],n,MH,s)}function Qg0(n,s){return p(n[1][1+Kx],n,s)}function Fg0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+en],n),c,v,s,y)}function Hg0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Wr],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+I3],n),y,s,S)}function qg0(n,s){switch(s[0]){case 0:return s;case 1:var c=s[1],v=function(E){return[1,E]};return $0(l(n[1][1+F],n),c,s,v);default:var y=s[1],S=function(E){return[2,E]};return $0(l(n[1][1+$],n),y,s,S)}}function Gg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+bx],n,y),O=p(n[1][1+Q2],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function bg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+F],n,y),O=p(n[1][1+t0],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function xA0(n,s){var c=s[2],v=c[4],y=c[3],S=c[2],E=c[1],O=s[1],W=Sr(l(n[1][1+hr],n),S),d0=Vx(l(n[1][1+Sx],n),y),w0=Vx(l(n[1][1+h0],n),E),F0=p(n[1][1+t0],n,v);return S===W&&y===d0&&v===F0&&E===w0?s:[0,O,[0,w0,W,d0,F0]]}function rA0(n,s,c){var v=c[9],y=c[8],S=c[7],E=c[6],O=c[3],W=c[2],d0=c[1],w0=c[10],F0=c[5],vx=c[4],Lx=Vx(l(n[1][1+cr],n),d0),_x=Vx(l(n[1][1+L],n),y),_r=p(n[1][1+Dx],n,W),f1=p(n[1][1+R0],n,S),c1=p(n[1][1+Er],n,O),y1=Vx(l(n[1][1+X0],n),E),m1=p(n[1][1+t0],n,v);return d0===Lx&&W===_r&&O===c1&&E===y1&&S===f1&&y===_x&&v===m1?c:[0,Lx,_r,c1,vx,F0,y1,f1,_x,m1,w0]}function eA0(n,s,c){return G0(n[1][1+Vr],n,s,c)}function tA0(n,s,c){return G0(n[1][1+lr],n,s,c)}function nA0(n,s,c){return G0(n[1][1+Vr],n,s,c)}function uA0(n,s){if(s[0]===0)return s;var c=s[2],v=s[1],y=p(n[1][1+B],n,c);return y===c?s:[1,v,y]}function iA0(n,s){if(s[0]===0)return s;var c=s[1];function v(y){return[1,y]}return $0(l(n[1][1+F],n),c,s,v)}function fA0(n,s){var c=s[2],v=s[1];function y(S){return[0,v,S]}return $0(l(n[1][1+Q],n),c,s,y)}function cA0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Rx){return[0,v,[0,Rx]]};return $0(l(n[1][1+t0],n),y,s,S);case 1:var E=c[1],O=function(Rx){return[0,v,[1,Rx]]};return $0(l(n[1][1+t0],n),E,s,O);case 2:var W=c[1],d0=function(Rx){return[0,v,[2,Rx]]};return $0(l(n[1][1+t0],n),W,s,d0);case 3:var w0=c[1],F0=function(Rx){return[0,v,[3,Rx]]};return $0(l(n[1][1+t0],n),w0,s,F0);case 4:var vx=c[1],Lx=function(Rx){return[0,v,[4,Rx]]};return $0(l(n[1][1+t0],n),vx,s,Lx);case 5:var _x=c[1],_r=function(Rx){return[0,v,[5,Rx]]};return $0(l(n[1][1+t0],n),_x,s,_r);case 6:var f1=c[1],c1=function(Rx){return[0,v,[6,Rx]]};return $0(l(n[1][1+t0],n),f1,s,c1);case 7:var y1=c[1],m1=function(Rx){return[0,v,[7,Rx]]};return $0(l(n[1][1+t0],n),y1,s,m1);case 8:var be=c[2],xt=c[1],rt=function(Rx){return[0,v,[8,xt,Rx]]};return $0(l(n[1][1+t0],n),be,s,rt);case 9:var Ne=c[1],et=function(Rx){return[0,v,[9,Rx]]};return $0(l(n[1][1+t0],n),Ne,s,et);case 10:var tt=c[1],Pt=function(Rx){return[0,v,[10,Rx]]};return $0(l(n[1][1+t0],n),tt,s,Pt);case 11:var nt=c[1],ut=function(Rx){return[0,v,[11,Rx]]};return $0(l(n[1][1+ie],n),nt,s,ut);case 12:var Xn=c[1],Jn=function(Rx){return[0,v,[12,Rx]]};return cx(l(n[1][1+C],n),v,Xn,s,Jn);case 13:var Ss=c[1],Es=function(Rx){return[0,v,[13,Rx]]};return cx(l(n[1][1+hs],n),v,Ss,s,Es);case 14:var it=c[1],gs=function(Rx){return[0,v,[14,Rx]]};return cx(l(n[1][1+w],n),v,it,s,gs);case 15:var cv=c[1],q6=function(Rx){return[0,v,[15,Rx]]};return cx(l(n[1][1+rv],n),v,cv,s,q6);case 16:var G6=c[1],b6=function(Rx){return[0,v,[16,Rx]]};return $0(l(n[1][1+M3],n),G6,s,b6);case 17:var x4=c[1],r4=function(Rx){return[0,v,[17,Rx]]};return $0(l(n[1][1+qe],n),x4,s,r4);case 18:var e4=c[1],t4=function(Rx){return[0,v,[18,Rx]]};return $0(l(n[1][1+Q9],n),e4,s,t4);case 19:var n4=c[1],u4=function(Rx){return[0,v,[19,Rx]]};return cx(l(n[1][1+ev],n),v,n4,s,u4);case 20:var i4=c[1],f4=function(Rx){return[0,v,[20,Rx]]};return cx(l(n[1][1+U6],n),v,i4,s,f4);case 21:var c4=c[1],s4=function(Rx){return[0,v,[21,Rx]]};return cx(l(n[1][1+lx],n),v,c4,s,s4);case 22:var o4=c[1],v4=function(Rx){return[0,v,[22,Rx]]};return cx(l(n[1][1+T],n),v,o4,s,v4);case 23:var a4=c[1],l4=function(Rx){return[0,v,[23,Rx]]};return cx(l(n[1][1+Nn],n),v,a4,s,l4);case 24:var p4=c[1],d4=function(Rx){return[0,v,[24,Rx]]};return $0(l(n[1][1+A],n),p4,s,d4);case 25:var y4=c[1],m4=function(Rx){return[0,v,[25,Rx]]};return $0(l(n[1][1+Qo],n),y4,s,m4);case 26:var k4=c[1],h4=function(Rx){return[0,v,[26,Rx]]};return $0(l(n[1][1+B],n),k4,s,h4);case 27:var _4=c[1],w4=function(Rx){return[0,v,[27,Rx]]};return $0(l(n[1][1+P0],n),_4,s,w4);case 28:var T4=c[1],S4=function(Rx){return[0,v,[28,Rx]]};return $0(l(n[1][1+f0],n),T4,s,S4);case 29:var E4=c[1],g4=function(Rx){return[0,v,[29,Rx]]};return cx(l(n[1][1+mx],n),v,E4,s,g4);case 30:var A4=c[1],P4=function(Rx){return[0,v,[30,Rx]]};return cx(l(n[1][1+Yx],n),v,A4,s,P4);case 31:var C4=c[1],N4=function(Rx){return[0,v,[31,Rx]]};return cx(l(n[1][1+tn],n),v,C4,s,N4);case 32:var R4=c[1],I4=function(Rx){return[0,v,[32,Rx]]};return cx(l(n[1][1+oa],n),v,R4,s,I4);case 33:var O4=c[1],L4=function(Rx){return[0,v,[33,Rx]]};return $0(l(n[1][1+t0],n),O4,s,L4);case 34:var M4=c[1],D4=function(Rx){return[0,v,[34,Rx]]};return $0(l(n[1][1+t0],n),M4,s,D4);default:var j4=c[1],U4=function(Rx){return[0,v,[35,Rx]]};return $0(l(n[1][1+t0],n),j4,s,U4)}}function sA0(n,s,c){var v=c[2],y=c[1],S=y[3],E=y[2],O=y[1],W=p(n[1][1+Q],n,O),d0=p(n[1][1+Q],n,E),w0=Sr(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return W===O&&d0===E&&w0===S&&F0===v?c:[0,[0,W,d0,w0],F0]}function oA0(n,s,c){var v=c[2],y=c[1],S=y[3],E=y[2],O=y[1],W=p(n[1][1+Q],n,O),d0=p(n[1][1+Q],n,E),w0=Sr(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return W===O&&d0===E&&w0===S&&F0===v?c:[0,[0,W,d0,w0],F0]}function vA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function aA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,c);return y===c?s:[0,v,y]}function lA0(n,s){var c=s[3],v=s[2],y=s[4],S=s[1],E=p(n[1][1+Q],n,v),O=p(n[1][1+i],n,c);return E===v&&O===c?s:[0,S,E,O,y]}function pA0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(w0){return[0,v,[0,w0]]};return $0(l(n[1][1+Q],n),y,s,S);case 1:var E=c[1],O=function(w0){return[0,v,[1,w0]]};return $0(l(n[1][1+v0],n),E,s,O);default:var W=c[1],d0=function(w0){return[0,v,[2,w0]]};return $0(l(n[1][1+s0],n),W,s,d0)}}function dA0(n,s){var c=s[2],v=s[1],y=Sr(l(n[1][1+o0],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function yA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function mA0(n,s){var c=s[3],v=s[2],y=s[4],S=s[1],E=p(n[1][1+Q],n,v),O=p(n[1][1+t0],n,c);return v===E&&c===O?s:[0,S,E,O,y]}function kA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function hA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+M],n,y),O=p(n[1][1+R],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function _A0(n,s){return p(n[1][1+j1],n,s)}function wA0(n,s){return p(n[1][1+j1],n,s)}function TA0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+I],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+N],n),y,s,S)}function SA0(n,s){var c=s[3],v=s[2],y=s[1],S=p(n[1][1+M],n,y),E=Vx(l(n[1][1+J],n),v),O=p(n[1][1+t0],n,c);return y===S&&Nl(v,E)&&c===O?s:[0,S,E,O]}function EA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+z],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function gA0(n,s){var c=s[5],v=s[4],y=s[3],S=s[2],E=s[1],O=p(n[1][1+Q],n,E),W=p(n[1][1+Q],n,S),d0=p(n[1][1+Q],n,y),w0=p(n[1][1+Q],n,v),F0=p(n[1][1+t0],n,c);return E===O&&S===W&&y===d0&&v===w0&&c===F0?s:[0,O,W,d0,w0,F0]}function AA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function PA0(n,s,c){var v=c[6],y=c[5],S=c[4],E=c[3],O=c[2],W=c[1];return v===p(n[1][1+t0],n,v)?c:[0,W,O,E,S,y,v]}function CA0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+t0],n,v);return v===O?c:[0,E,S,y,O]}function NA0(n,s,c){return p(n[1][1+t0],n,c)}function RA0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+t0],n,v);return v===S?c:[0,y,S]}function IA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function OA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function LA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function MA0(n,s,c){var v=c[1],y=c[2],S=G0(n[1][1+U6],n,s,v);return S===v?c:[0,S,y]}function DA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Q],n,S),O=p(n[1][1+Q],n,y),W=p(n[1][1+t0],n,v);return E===S&&O===y&&W===v?c:[0,E,O,W]}function jA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+ua],n,S),O=Vx(l(n[1][1+J],n),y),W=p(n[1][1+t0],n,v);return E===S&&O===y&&W===v?c:[0,E,O,W]}function UA0(n,s){var c=s[2],v=c[5],y=c[4],S=c[2],E=c[1],O=c[3],W=s[1],d0=p(n[1][1+Y],n,S),w0=p(n[1][1+i],n,y),F0=Vx(l(n[1][1+Q],n),v),vx=p(n[1][1+Pe],n,E);return vx===E&&d0===S&&w0===y&&F0===v?s:[0,W,[0,vx,d0,O,w0,F0]]}function BA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+z],n),y),O=p(n[1][1+t0],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function YA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+Q],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function XA0(n,s){return Vx(l(n[1][1+f],n),s)}function JA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function VA0(n,s){return p(n[1][1+j1],n,s)}function zA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+ua],n,y),O=p(n[1][1+gn],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function KA0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+V],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+po],n),y,s,S)}function ZA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=l(n[1][1+ev],n),O=Sr(function(w0){return t2(E,w0)},y),W=t2(l(n[1][1+w],n),S),d0=p(n[1][1+t0],n,v);return O===y&&W===S&&v===d0?c:[0,W,O,d0]}function WA0(n,s){switch(s[0]){case 0:var c=s[1],v=function(_x){return[0,_x]};return $0(l(n[1][1+S0],n),c,s,v);case 1:var y=s[1],S=function(_x){return[1,_x]};return $0(l(n[1][1+x0],n),y,s,S);case 2:var E=s[1],O=function(_x){return[2,_x]};return $0(l(n[1][1+er],n),E,s,O);case 3:var W=s[1],d0=function(_x){return[3,_x]};return $0(l(n[1][1+Zx],n),W,s,d0);case 4:var w0=s[1],F0=function(_x){return[4,_x]};return $0(l(n[1][1+$x],n),w0,s,F0);default:var vx=s[1],Lx=function(_x){return[5,_x]};return $0(l(n[1][1+k0],n),vx,s,Lx)}}function $A0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=Sr(l(n[1][1+u2],n),y),W=p(n[1][1+t0],n,v);return O===y&&v===W?c:[0,E,S,O,W]}function QA0(n,s){var c=s[2],v=c[6],y=c[4],S=c[3],E=c[2],O=c[1],W=c[5],d0=s[1],w0=p(n[1][1+z],n,O),F0=p(n[1][1+Q],n,E),vx=p(n[1][1+Q],n,S),Lx=p(n[1][1+i],n,y),_x=p(n[1][1+t0],n,v);return w0===O&&F0===E&&vx===S&&Lx===y&&_x===v?s:[0,d0,[0,w0,F0,vx,Lx,W,_x]]}function FA0(n,s){var c=s[2],v=c[3],y=c[1],S=y[2],E=y[1],O=c[2],W=s[1],d0=G0(n[1][1+C],n,E,S),w0=p(n[1][1+t0],n,v);return S===d0&&v===w0?s:[0,W,[0,[0,E,d0],O,w0]]}function HA0(n,s){var c=s[2],v=c[6],y=c[2],S=c[1],E=c[5],O=c[4],W=c[3],d0=s[1],w0=p(n[1][1+j1],n,S),F0=p(n[1][1+Q],n,y),vx=p(n[1][1+t0],n,v);return S===w0&&y===F0&&v===vx?s:[0,d0,[0,w0,F0,W,O,E,vx]]}function qA0(n,s){var c=s[2],v=c[6],y=c[5],S=c[3],E=c[2],O=c[4],W=c[1],d0=s[1],w0=p(n[1][1+Q],n,E),F0=p(n[1][1+Q],n,S),vx=p(n[1][1+i],n,y),Lx=p(n[1][1+t0],n,v);return w0===E&&F0===S&&vx===y&&Lx===v?s:[0,d0,[0,W,w0,F0,O,vx,Lx]]}function GA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Q],n,y),O=p(n[1][1+t0],n,v);return E===y&&v===O?s:[0,S,[0,E,O]]}function bA0(n,s){var c=s[2],v=c[8],y=c[7],S=c[2],E=c[1],O=c[6],W=c[5],d0=c[4],w0=c[3],F0=s[1],vx=p(n[1][1+Hx],n,E),Lx=p(n[1][1+e0],n,S),_x=p(n[1][1+i],n,y),_r=p(n[1][1+t0],n,v);return vx===E&&Lx===S&&_x===y&&_r===v?s:[0,F0,[0,vx,Lx,w0,d0,W,O,_x,_r]]}function xP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+C],n),c,v,s,y)}function rP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+C],n),c,v,s,y)}function eP0(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+Q],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+Cr],n),y,s,S);default:var E=s[1],O=function(W){return[2,W]};return $0(l(n[1][1+w1],n),E,s,O)}}function tP0(n,s){return p(n[1][1+j1],n,s)}function nP0(n,s,c){var v=c[4],y=c[3],S=c[2],E=S[2],O=E[4],W=E[3],d0=E[2],w0=E[1],F0=c[1],vx=S[1],Lx=Vx(l(n[1][1+L],n),F0),_x=Vx(l(n[1][1+j],n),w0),_r=Sr(l(n[1][1+jx],n),d0),f1=Vx(l(n[1][1+nx],n),W),c1=p(n[1][1+q],n,y),y1=p(n[1][1+t0],n,v),m1=p(n[1][1+t0],n,O);return _r===d0&&f1===W&&c1===y&&Lx===F0&&y1===v&&m1===O&&_x===w0?c:[0,Lx,[0,vx,[0,_x,_r,f1,m1]],c1,y1]}function uP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Q],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+i0],n),y,s,S)}function iP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+F],n,y),O=p(n[1][1+t0],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function fP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+jx],n,y),O=p(n[1][1+t0],n,v);return E===y&&O===v?s:[0,S,[0,E,O]]}function cP0(n,s){var c=s[2],v=c[2],y=c[1],S=c[3],E=s[1],O=p(n[1][1+Q],n,v),W=Vx(l(n[1][1+j1],n),y);return O===v&&W===y?s:[0,E,[0,W,O,S]]}function sP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function oP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+u1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Kx],n),y,s,S)}function vP0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=Vx(l(n[1][1+x1],n),O),d0=Vx(l(n[1][1+N0],n),E),w0=Vx(l(n[1][1+Kx],n),S),F0=p(n[1][1+A0],n,y),vx=p(n[1][1+t0],n,v);return O===W&&E===d0&&S===w0&&y===F0&&v===vx?c:[0,W,d0,w0,F0,vx]}function aP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function lP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+T1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+l1],n),y,s,S)}function pP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],O=c[4],W=p(n[1][1+r1],n,E),d0=p(n[1][1+Kx],n,S),w0=p(n[1][1+A0],n,y),F0=p(n[1][1+t0],n,v);return E===W&&S===d0&&y===w0&&v===F0?c:[0,W,d0,w0,O,F0]}function dP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function yP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+P1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Q1],n),y,s,S)}function mP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],O=c[4],W=p(n[1][1+i1],n,E),d0=p(n[1][1+Kx],n,S),w0=p(n[1][1+A0],n,y),F0=p(n[1][1+t0],n,v);return E===W&&S===d0&&y===w0&&v===F0?c:[0,W,d0,w0,O,F0]}function kP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Kx],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Q0],n),y,s,S)}function hP0(n,s,c){var v=c[3],y=c[1],S=c[2],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?c:[0,E,S,O]}function _P0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function wP0(n,s){if(s[0]===0){var c=s[1],v=Sr(l(n[1][1+Dr],n),c);return c===v?s:[0,v]}var y=s[1],S=p(n[1][1+Fe],n,y);return y===S?s:[1,S]}function TP0(n,s){var c=s[2],v=s[1],y=Vx(l(n[1][1+j1],n),c);return c===y?s:[0,v,y]}function SP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+j1],n,y),O=Vx(l(n[1][1+j1],n),v);return y===E&&v===O?s:[0,S,[0,E,O]]}function EP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],O=c[4],W=PJ(l(n[1][1+Yr],n),y),d0=Vx(l(n[1][1+Mr],n),S),w0=Vx(l(n[1][1+A0],n),E),F0=p(n[1][1+t0],n,v);return y===W&&S===d0&&E===w0&&v===F0?c:[0,w0,d0,W,O,F0]}function gP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+A0],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Kx],n),y,s,S)}function AP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+I1],n,y),O=p(n[1][1+t0],n,v);return E===y&&O===v?c:[0,S,E,O]}function PP0(n,s){return p(n[1][1+j1],n,s)}function CP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+F1],n,v);return v===E?s:[0,S,[0,E,y]]}function NP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+F1],n,v);return v===E?s:[0,S,[0,E,y]]}function RP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+F1],n,v);return v===E?s:[0,S,[0,E,y]]}function IP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+F1],n,v);return v===E?s:[0,S,[0,E,y]]}function OP0(n,s){var c=s[2][1],v=s[1],y=p(n[1][1+F1],n,c);return c===y?s:[0,v,[0,y]]}function LP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+ht],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function MP0(n,s){var c=s[3],v=s[1],y=Sr(l(n[1][1+W2],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],S]}function DP0(n,s){var c=s[4],v=s[1];if(v[0]===0)var y=v[1],S=function(vx){return[0,vx]},E=l(n[1][1+W2],n),w0=$0(function(vx){return Sr(E,vx)},y,v,S);else var O=v[1],W=function(vx){return[1,vx]},d0=l(n[1][1+i2],n),w0=$0(function(vx){return Sr(d0,vx)},O,v,W);var F0=p(n[1][1+t0],n,c);return v===w0&&c===F0?s:[0,w0,s[2],s[3],F0]}function jP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+He],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function UP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+bt],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function BP0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(_x){return[0,v,[0,_x]]};return $0(l(n[1][1+we],n),y,s,S);case 1:var E=c[1],O=function(_x){return[0,v,[1,_x]]};return $0(l(n[1][1+U1],n),E,s,O);case 2:var W=c[1],d0=function(_x){return[0,v,[2,_x]]};return $0(l(n[1][1+Gt],n),W,s,d0);case 3:var w0=c[1],F0=function(_x){return[0,v,[3,_x]]};return $0(l(n[1][1+zr],n),w0,s,F0);default:var vx=c[1],Lx=function(_x){return[0,v,[4,_x]]};return $0(l(n[1][1+Se],n),vx,s,Lx)}}function YP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=G0(n[1][1+Ox],n,LH,S),O=p(n[1][1+Te],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function XP0(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function JP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+A0],n,S),O=p(n[1][1+N0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function VP0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=G0(n[1][1+Ox],n,[0,y],E),W=p(n[1][1+F],n,S),d0=p(n[1][1+t0],n,v);return O===E&&W===S&&d0===v?c:[0,O,W,y,d0]}function zP0(n,s,c){return G0(n[1][1+n0],n,s,c)}function KP0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+F],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function ZP0(n,s,c){var v=c[4],y=c[2],S=c[3],E=c[1],O=t2(l(n[1][1+en],n),y),W=p(n[1][1+t0],n,v);return O===y&&v===W?c:[0,E,O,S,W]}function WP0(n,s,c){return G0(n[1][1+k3],n,s,c)}function $P0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+cr],n,E),W=p(n[1][1+F],n,S),d0=Vx(l(n[1][1+X0],n),y),w0=p(n[1][1+t0],n,v);return O===E&&W===S&&d0===y&&w0===v?c:[0,O,W,d0,w0]}function QP0(n,s){switch(s[0]){case 0:var c=s[1],v=c[2],y=c[1],S=G0(n[1][1+ge],n,y,v);return S===v?s:[0,[0,y,S]];case 1:var E=s[1],O=E[2],W=E[1],d0=G0(n[1][1+F2],n,W,O);return d0===O?s:[1,[0,W,d0]];case 2:var w0=s[1],F0=w0[2],vx=w0[1],Lx=G0(n[1][1+rn],n,vx,F0);return Lx===F0?s:[2,[0,vx,Lx]];case 3:var _x=s[1],_r=_x[2],f1=_x[1],c1=G0(n[1][1+Tt],n,f1,_r);return c1===_r?s:[3,[0,f1,c1]];case 4:var y1=s[1],m1=p(n[1][1+Q],n,y1);return m1===y1?s:[4,m1];case 5:var be=s[1],xt=be[2],rt=be[1],Ne=G0(n[1][1+n0],n,rt,xt);return Ne===xt?s:[5,[0,rt,Ne]];case 6:var et=s[1],tt=et[2],Pt=et[1],nt=G0(n[1][1+K1],n,Pt,tt);return nt===tt?s:[6,[0,Pt,nt]];case 7:var ut=s[1],Xn=ut[2],Jn=ut[1],Ss=G0(n[1][1+k3],n,Jn,Xn);return Ss===Xn?s:[7,[0,Jn,Ss]];default:var Es=s[1],it=Es[2],gs=Es[1],cv=G0(n[1][1+_e],n,gs,it);return cv===it?s:[8,[0,gs,cv]]}}function FP0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=PJ(l(n[1][1+Yr],n),y),d0=Vx(l(n[1][1+Mr],n),S),w0=Vx(l(n[1][1+Rn],n),E),F0=p(n[1][1+t0],n,v);return y===W&&S===d0&&E===w0&&v===F0?c:[0,O,w0,d0,W,F0]}function HP0(n,s,c){return G0(n[1][1+_e],n,s,c)}function qP0(n,s){var c=s[2],v=c[4],y=c[2],S=c[1],E=c[3],O=s[1],W=Vx(l(n[1][1+j1],n),S),d0=p(n[1][1+Q],n,y),w0=p(n[1][1+t0],n,v);return S===W&&y===d0&&v===w0?s:[0,O,[0,W,d0,E,w0]]}function GP0(n,s){var c=s[2],v=c[2],y=c[1],S=c[3],E=s[1],O=p(n[1][1+jn],n,y),W=p(n[1][1+F],n,v);return y===O&&v===W?s:[0,E,[0,O,W,S]]}function bP0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],O=Sr(l(n[1][1+gt],n),S),W=Vx(l(n[1][1+St],n),y),d0=p(n[1][1+t0],n,v);return S===O&&y===W&&v===d0?s:[0,E,[0,O,W,d0]]}function xC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=Vx(l(n[1][1+L],n),E),W=p(n[1][1+Et],n,S),d0=p(n[1][1+H2],n,y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function rC0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],O=c[1],W=p(n[1][1+tv],n,O),d0=Vx(l(n[1][1+L],n),E),w0=p(n[1][1+Et],n,S),F0=p(n[1][1+H2],n,y),vx=p(n[1][1+t0],n,v);return O===W&&E===d0&&S===w0&&y===F0&&v===vx?c:[0,W,d0,w0,F0,vx]}function eC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[4],O=c[3],W=c[2],d0=c[1],w0=p(n[1][1+fa],n,d0),F0=Vx(l(n[1][1+L],n),W),vx=t2(l(n[1][1+w],n),O),Lx=l(n[1][1+ev],n),_x=Vx(function(m1){return t2(Lx,m1)},E),_r=l(n[1][1+ev],n),f1=Sr(function(m1){return t2(_r,m1)},S),c1=Vx(l(n[1][1+nv],n),y),y1=p(n[1][1+t0],n,v);return w0===d0&&F0===W&&vx===O&&_x===E&&f1===S&&c1===y&&y1===v?c:[0,w0,F0,vx,_x,f1,c1,y1]}function tC0(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function nC0(n,s,c){var v=c[2],y=c[1],S=Vx(l(n[1][1+mt],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function uC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+N0],n,E),W=p(n[1][1+Kx],n,S),d0=p(n[1][1+Kx],n,y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function iC0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+en],n),c,v,s,y)}function fC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Dn],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function cC0(n,s){return G0(n[1][1+Ts],n,OH,s)}function sC0(n,s){if(s[0]===0)return[0,p(n[1][1+j1],n,s[1])];var c=s[1],v=c[1];return[1,[0,v,G0(n[1][1+mx],n,v,c[2])]]}function oC0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=c[4],O=s[1],W=p(n[1][1+jn],n,S),d0=p(n[1][1+Dn],n,y),w0=p(n[1][1+Q2],n,v);return S===W&&y===d0&&v===w0?s:[0,O,[0,W,d0,w0,E]]}function vC0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],O=Sr(l(n[1][1+_s],n),S),W=Vx(l(n[1][1+Mn],n),y),d0=p(n[1][1+t0],n,v);return S===O&&y===W&&v===d0?s:[0,E,[0,O,W,d0]]}function aC0(n,s){return G0(n[1][1+Ox],n,IH,s)}function lC0(n,s,c){var v=c[6],y=c[5],S=c[4],E=c[3],O=c[2],W=c[1],d0=c[7],w0=p(n[1][1+tv],n,W),F0=Vx(l(n[1][1+L],n),O),vx=p(n[1][1+Ge],n,E),Lx=p(n[1][1+w3],n,y),_x=p(n[1][1+H2],n,S),_r=p(n[1][1+t0],n,v);return W===w0&&O===F0&&E===vx&&y===Lx&&S===_x&&v===_r?c:[0,w0,F0,vx,_x,Lx,_r,d0]}function pC0(n,s){return Vx(l(n[1][1+Kx],n),s)}function dC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[3],O=c[2],W=c[1],d0=p(n[1][1+D],n,W),w0=p(n[1][1+mo],n,O),F0=p(n[1][1+Y],n,E),vx=p(n[1][1+i],n,S),Lx=Sr(l(n[1][1+Bn],n),y),_x=p(n[1][1+t0],n,v);return W===d0&&O===w0&&F0===E&&vx===S&&Lx===y&&_x===v?c:[0,d0,w0,F0,c[4],vx,Lx,_x]}function yC0(n,s){if(typeof s=="number")return s;var c=s[1],v=p(n[1][1+Kx],n,c);return c===v?s:[0,v]}function mC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[3],O=c[2],W=c[1],d0=p(n[1][1+Hx],n,W),w0=p(n[1][1+mo],n,O),F0=p(n[1][1+Y],n,E),vx=p(n[1][1+i],n,S),Lx=Sr(l(n[1][1+Bn],n),y),_x=p(n[1][1+t0],n,v);return W===d0&&O===w0&&F0===E&&vx===S&&Lx===y&&_x===v?c:[0,d0,w0,F0,c[4],vx,Lx,_x]}function kC0(n,s,c){var v=c[6],y=c[5],S=c[3],E=c[2],O=p(n[1][1+Hx],n,E),W=t2(l(n[1][1+lr],n),S),d0=Sr(l(n[1][1+Bn],n),y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,c[1],O,W,c[4],d0,w0]}function hC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+V],n,y),O=Vx(l(n[1][1+J],n),v);return y===E&&v===O?s:[0,S,[0,E,O]]}function _C0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+ko],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function wC0(n,s){switch(s[0]){case 0:var c=s[1],v=c[1],y=c[2],S=function(_x){return[0,[0,v,_x]]};return cx(l(n[1][1+E3],n),v,y,s,S);case 1:var E=s[1],O=E[1],W=E[2],d0=function(_x){return[1,[0,O,_x]]};return cx(l(n[1][1+T3],n),O,W,s,d0);default:var w0=s[1],F0=w0[1],vx=w0[2],Lx=function(_x){return[2,[0,F0,_x]]};return cx(l(n[1][1+S3],n),F0,vx,s,Lx)}}function TC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function SC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+A3],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function EC0(n,s){return G0(n[1][1+Ox],n,RH,s)}function gC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=Vx(l(n[1][1+J],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function AC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[4],O=c[3],W=c[2],d0=c[1],w0=Vx(l(n[1][1+fa],n),d0),F0=Vx(l(n[1][1+L],n),O),vx=p(n[1][1+C3],n,W),Lx=l(n[1][1+g3],n),_x=Vx(function(y1){return t2(Lx,y1)},E),_r=Vx(l(n[1][1+nv],n),S),f1=Sr(l(n[1][1+Bn],n),y),c1=p(n[1][1+t0],n,v);return d0===w0&&W===vx&&E===_x&&S===_r&&y===f1&&v===c1&&O===F0?c:[0,w0,vx,F0,_x,_r,f1,c1]}function PC0(n,s,c){return G0(n[1][1+ca],n,s,c)}function CC0(n,s,c){return G0(n[1][1+ca],n,s,c)}function NC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=Vx(l(n[1][1+uv],n),S),O=p(n[1][1+R3],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,E,O,W]}function RC0(n,s){return t2(l(n[1][1+en],n),s)}function IC0(n,s){if(s[0]===0){var c=s[1],v=p(n[1][1+Q],n,c);return v===c?s:[0,v]}var y=s[1],S=y[2][1],E=y[1],O=p(n[1][1+t0],n,S);return S===O?s:[1,[0,E,[0,O]]]}function OC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+At],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function LC0(n,s,c){var v=c[1],y=G0(n[1][1+ws],n,s,v);return v===y?c:[0,y,c[2],c[3]]}function MC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+Hr],n),y),O=p(n[1][1+t0],n,v);return y===E&&v===O?s:[0,S,[0,E,O]]}function DC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],O=p(n[1][1+Kx],n,E),W=Vx(l(n[1][1+iv],n),S),d0=p(n[1][1+fv],n,y),w0=p(n[1][1+t0],n,v);return E===O&&S===W&&y===d0&&v===w0?c:[0,O,W,d0,w0]}function jC0(n,s,c){var v=c[2],y=c[1],S=Vx(l(n[1][1+mt],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function UC0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+L0],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function BC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Kx],n,S),O=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,c[1],E,O,W]}function YC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Ce],n,S),O=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===O&&v===W?c:[0,c[1],E,O,W]}function XC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),O=p(n[1][1+F],n,y),W=p(n[1][1+t0],n,v);return E===S&&O===y&&W===v?c:[0,E,O,W]}function JC0(n,s,c){return G0(n[1][1+Vr],n,s,c)}function VC0(n,s){switch(s[0]){case 0:var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Kx],n),c,s,v);case 1:var y=s[1],S=function(E){return[1,E]};return $0(l(n[1][1+Q0],n),y,s,S);default:return s}}function zC0(n,s,c){var v=c[2],y=c[1],S=Sr(l(n[1][1+D3],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function KC0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Ix){return[0,v,[0,Ix]]};return cx(l(n[1][1+fe],n),v,y,s,S);case 1:var E=c[1],O=function(Ix){return[0,v,[1,Ix]]};return cx(l(n[1][1+L3],n),v,E,s,O);case 2:var W=c[1],d0=function(Ix){return[0,v,[2,Ix]]};return cx(l(n[1][1+O3],n),v,W,s,d0);case 3:var w0=c[1],F0=function(Ix){return[0,v,[3,Ix]]};return cx(l(n[1][1+ho],n),v,w0,s,F0);case 4:var vx=c[1],Lx=function(Ix){return[0,v,[4,Ix]]};return cx(l(n[1][1+Yn],n),v,vx,s,Lx);case 5:var _x=c[1],_r=function(Ix){return[0,v,[5,Ix]]};return cx(l(n[1][1+ws],n),v,_x,s,_r);case 6:var f1=c[1],c1=function(Ix){return[0,v,[6,Ix]]};return cx(l(n[1][1+Un],n),v,f1,s,c1);case 7:var y1=c[1],m1=function(Ix){return[0,v,[7,Ix]]};return cx(l(n[1][1+M2],n),v,y1,s,m1);case 8:var be=c[1],xt=function(Ix){return[0,v,[8,Ix]]};return cx(l(n[1][1+kr],n),v,be,s,xt);case 9:var rt=c[1],Ne=function(Ix){return[0,v,[9,Ix]]};return $0(l(n[1][1+j1],n),rt,s,Ne);case 10:var et=c[1],tt=function(Ix){return[0,v,[10,Ix]]};return $0(p(n[1][1+na],n,v),et,s,tt);case 11:var Pt=c[1],nt=function(Ix){return[0,v,[11,Ix]]};return cx(l(n[1][1+kt],n),v,Pt,s,nt);case 12:var ut=c[1],Xn=function(Ix){return[0,v,[12,Ix]]};return cx(l(n[1][1+Cn],n),v,ut,s,Xn);case 13:var Jn=c[1],Ss=function(Ix){return[0,v,[13,Ix]]};return cx(l(n[1][1+mx],n),v,Jn,s,Ss);case 14:var Es=c[1],it=function(Ix){return[0,v,[14,Ix]]};return cx(l(n[1][1+oa],n),v,Es,s,it);case 15:var gs=c[1],cv=function(Ix){return[0,v,[15,Ix]]};return cx(l(n[1][1+Ft],n),v,gs,s,cv);case 16:var q6=c[1],G6=function(Ix){return[0,v,[16,Ix]]};return cx(l(n[1][1+Yx],n),v,q6,s,G6);case 17:var b6=c[1],x4=function(Ix){return[0,v,[17,Ix]]};return cx(l(n[1][1+tn],n),v,b6,s,x4);case 18:var r4=c[1],e4=function(Ix){return[0,v,[18,Ix]]};return cx(l(n[1][1+m0],n),v,r4,s,e4);case 19:var t4=c[1],n4=function(Ix){return[0,v,[19,Ix]]};return cx(l(n[1][1+We],n),v,t4,s,n4);case 20:var u4=c[1],i4=function(Ix){return[0,v,[20,Ix]]};return cx(l(n[1][1+qt],n),v,u4,s,i4);case 21:var f4=c[1],c4=function(Ix){return[0,v,[21,Ix]]};return cx(l(n[1][1+$e],n),v,f4,s,c4);case 22:var s4=c[1],o4=function(Ix){return[0,v,[22,Ix]]};return cx(l(n[1][1+fo],n),v,s4,s,o4);case 23:var v4=c[1],a4=function(Ix){return[0,v,[23,Ix]]};return cx(l(n[1][1+E2],n),v,v4,s,a4);case 24:var l4=c[1],p4=function(Ix){return[0,v,[24,Ix]]};return cx(l(n[1][1+Lr],n),v,l4,s,p4);case 25:var d4=c[1],y4=function(Ix){return[0,v,[25,Ix]]};return $0(p(n[1][1+v1],n,v),d4,s,y4);case 26:var m4=c[1],k4=function(Ix){return[0,v,[26,Ix]]};return cx(l(n[1][1+jr],n),v,m4,s,k4);case 27:var h4=c[1],_4=function(Ix){return[0,v,[27,Ix]]};return cx(l(n[1][1+H],n),v,h4,s,_4);case 28:var w4=c[1],T4=function(Ix){return[0,v,[28,Ix]]};return cx(l(n[1][1+dx],n),v,w4,s,T4);case 29:var S4=c[1],E4=function(Ix){return[0,v,[29,Ix]]};return cx(l(n[1][1+H0],n),v,S4,s,E4);case 30:var g4=c[1],A4=function(Ix){return[0,v,[30,Ix]]};return cx(l(n[1][1+g0],n),v,g4,s,A4);case 31:var P4=c[1],C4=function(Ix){return[0,v,[31,Ix]]};return cx(l(n[1][1+Y0],n),v,P4,s,C4);case 32:var N4=c[1],R4=function(Ix){return[0,v,[32,Ix]]};return cx(l(n[1][1+U],n),v,N4,s,R4);case 33:var I4=c[1],O4=function(Ix){return[0,v,[33,Ix]]};return cx(l(n[1][1+c0],n),v,I4,s,O4);case 34:var L4=c[1],M4=function(Ix){return[0,v,[34,Ix]]};return cx(l(n[1][1+g],n),v,L4,s,M4);case 35:var D4=c[1],j4=function(Ix){return[0,v,[35,Ix]]};return cx(l(n[1][1+k],n),v,D4,s,j4);default:var U4=c[1],Rx=function(Ix){return[0,v,[36,Ix]]};return cx(l(n[1][1+e],n),v,U4,s,Rx)}}function ZC0(n,s){var c=s[2],v=s[1],y=s[3],S=Sr(l(n[1][1+yo],n),v),E=Sr(l(n[1][1+yo],n),c);return v===S&&c===E?s:[0,S,E,y]}function WC0(n){var s=l(n[1][1+ex],n);return function(c){return Vx(s,c)}}function $C0(n,s){return s}function QC0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Cx){return[0,v,[0,Cx]]};return cx(l(n[1][1+en],n),v,y,s,S);case 1:var E=c[1],O=function(Cx){return[0,v,[1,Cx]]};return cx(l(n[1][1+sa],n),v,E,s,O);case 2:var W=c[1],d0=function(Cx){return[0,v,[2,Cx]]};return cx(l(n[1][1+P3],n),v,W,s,d0);case 3:var w0=c[1],F0=function(Cx){return[0,v,[3,Cx]]};return cx(l(n[1][1+ia],n),v,w0,s,F0);case 4:var vx=c[1],Lx=function(Cx){return[0,v,[4,Cx]]};return cx(l(n[1][1+Ae],n),v,vx,s,Lx);case 5:var _x=c[1],_r=function(Cx){return[0,v,[5,Cx]]};return cx(l(n[1][1+On],n),v,_x,s,_r);case 6:var f1=c[1],c1=function(Cx){return[0,v,[6,Cx]]};return cx(l(n[1][1+rn],n),v,f1,s,c1);case 7:var y1=c[1],m1=function(Cx){return[0,v,[7,Cx]]};return cx(l(n[1][1+Tt],n),v,y1,s,m1);case 8:var be=c[1],xt=function(Cx){return[0,v,[8,Cx]]};return cx(l(n[1][1+xn],n),v,be,s,xt);case 9:var rt=c[1],Ne=function(Cx){return[0,v,[9,Cx]]};return cx(l(n[1][1+In],n),v,rt,s,Ne);case 10:var et=c[1],tt=function(Cx){return[0,v,[10,Cx]]};return cx(l(n[1][1+F2],n),v,et,s,tt);case 11:var Pt=c[1],nt=function(Cx){return[0,v,[11,Cx]]};return cx(l(n[1][1+L2],n),v,Pt,s,nt);case 12:var ut=c[1],Xn=function(Cx){return[0,v,[12,Cx]]};return cx(l(n[1][1+g2],n),v,ut,s,Xn);case 13:var Jn=c[1],Ss=function(Cx){return[0,v,[13,Cx]]};return cx(l(n[1][1+wt],n),v,Jn,s,Ss);case 14:var Es=c[1],it=function(Cx){return[0,v,[14,Cx]]};return cx(l(n[1][1+_t],n),v,Es,s,it);case 15:var gs=c[1],cv=function(Cx){return[0,v,[15,Cx]]};return cx(l(n[1][1+K1],n),v,gs,s,cv);case 16:var q6=c[1],G6=function(Cx){return[0,v,[16,Cx]]};return cx(l(n[1][1+ge],n),v,q6,s,G6);case 17:var b6=c[1],x4=function(Cx){return[0,v,[17,Cx]]};return cx(l(n[1][1+Ee],n),v,b6,s,x4);case 18:var r4=c[1],e4=function(Cx){return[0,v,[18,Cx]]};return cx(l(n[1][1+$2],n),v,r4,s,e4);case 19:var t4=c[1],n4=function(Cx){return[0,v,[19,Cx]]};return cx(l(n[1][1+_e],n),v,t4,s,n4);case 20:var u4=c[1],i4=function(Cx){return[0,v,[20,Cx]]};return cx(l(n[1][1+Qe],n),v,u4,s,i4);case 21:var f4=c[1],c4=function(Cx){return[0,v,[21,Cx]]};return cx(l(n[1][1+$r],n),v,f4,s,c4);case 22:var s4=c[1],o4=function(Cx){return[0,v,[22,Cx]]};return cx(l(n[1][1+p2],n),v,s4,s,o4);case 23:var v4=c[1],a4=function(Cx){return[0,v,[23,Cx]]};return cx(l(n[1][1+Ir],n),v,v4,s,a4);case 24:var l4=c[1],p4=function(Cx){return[0,v,[24,Cx]]};return cx(l(n[1][1+p1],n),v,l4,s,p4);case 25:var d4=c[1],y4=function(Cx){return[0,v,[25,Cx]]};return cx(l(n[1][1+a1],n),v,d4,s,y4);case 26:var m4=c[1],k4=function(Cx){return[0,v,[26,Cx]]};return cx(l(n[1][1+sr],n),v,m4,s,k4);case 27:var h4=c[1],_4=function(Cx){return[0,v,[27,Cx]]};return cx(l(n[1][1+_3],n),v,h4,s,_4);case 28:var w4=c[1],T4=function(Cx){return[0,v,[28,Cx]]};return cx(l(n[1][1+H9],n),v,w4,s,T4);case 29:var S4=c[1],E4=function(Cx){return[0,v,[29,Cx]]};return cx(l(n[1][1+$9],n),v,S4,s,E4);case 30:var g4=c[1],A4=function(Cx){return[0,v,[30,Cx]]};return cx(l(n[1][1+dr],n),v,g4,s,A4);case 31:var P4=c[1],C4=function(Cx){return[0,v,[31,Cx]]};return cx(l(n[1][1+b],n),v,P4,s,C4);case 32:var N4=c[1],R4=function(Cx){return[0,v,[32,Cx]]};return cx(l(n[1][1+ax],n),v,N4,s,R4);case 33:var I4=c[1],O4=function(Cx){return[0,v,[33,Cx]]};return cx(l(n[1][1+M0],n),v,I4,s,O4);case 34:var L4=c[1],M4=function(Cx){return[0,v,[34,Cx]]};return cx(l(n[1][1+T0],n),v,L4,s,M4);case 35:var D4=c[1],j4=function(Cx){return[0,v,[35,Cx]]};return cx(l(n[1][1+n0],n),v,D4,s,j4);case 36:var U4=c[1],Rx=function(Cx){return[0,v,[36,Cx]]};return cx(l(n[1][1+K1],n),v,U4,s,Rx);case 37:var Ix=c[1],FC0=function(Cx){return[0,v,[37,Cx]]};return cx(l(n[1][1+d],n),v,Ix,s,FC0);case 38:var HC0=c[1],qC0=function(Cx){return[0,v,[38,Cx]]};return cx(l(n[1][1+u],n),v,HC0,s,qC0);default:var GC0=c[1],bC0=function(Cx){return[0,v,[39,Cx]]};return cx(l(n[1][1+t],n),v,GC0,s,bC0)}}return zI(x,[0,j3,function(n,s){var c=s[2],v=c[4],y=c[3],S=c[1],E=c[2],O=s[1],W=p(n[1][1+E0],n,S),d0=p(n[1][1+t0],n,y),w0=Sr(l(n[1][1+yo],n),v);return S===W&&y===d0&&v===w0?s:[0,O,[0,W,E,d0,w0]]},A0,QC0,yo,$C0,t0,WC0,ex,ZC0,Kx,KC0,fe,zC0,D3,VC0,L3,JC0,O3,XC0,ho,YC0,Yn,BC0,en,UC0,sa,jC0,ws,DC0,fv,MC0,v1,LC0,iv,OC0,At,IC0,R3,RC0,N3,NC0,P3,CC0,Un,PC0,ca,AC0,g3,gC0,fa,EC0,C3,SC0,Bn,TC0,A3,wC0,nv,_C0,ko,hC0,E3,kC0,T3,mC0,mo,yC0,S3,dC0,Q2,pC0,ia,lC0,tv,aC0,Ge,vC0,_s,oC0,jn,sC0,Dn,cC0,Mn,fC0,w3,iC0,M2,uC0,Ae,nC0,On,tC0,rn,eC0,Tt,rC0,hs,xC0,Et,bP0,gt,GP0,St,qP0,xn,HP0,In,FP0,Rn,QP0,F2,$P0,L2,WP0,g2,ZP0,wt,KP0,_t,zP0,ge,VP0,Ee,JP0,$2,XP0,_e,YP0,Te,BP0,we,UP0,U1,jP0,Gt,DP0,zr,MP0,Se,LP0,W2,OP0,bt,IP0,He,RP0,i2,NP0,ht,CP0,F1,PP0,Qe,AP0,I1,gP0,$r,EP0,Dr,SP0,Fe,TP0,Mr,wP0,Yr,_P0,p2,hP0,Hr,kP0,p1,mP0,i1,yP0,P1,dP0,a1,pP0,r1,lP0,T1,aP0,Ir,vP0,x1,oP0,u1,sP0,jx,cP0,nx,fP0,j,iP0,q,uP0,C,nP0,mt,tP0,e0,eP0,Cr,rP0,w1,xP0,S0,bA0,x0,GA0,er,qA0,$x,HA0,Zx,FA0,k0,QA0,w,$A0,u2,WA0,rv,ZA0,ua,KA0,po,zA0,gn,VA0,f,JA0,i,XA0,J,YA0,L,BA0,z,UA0,ev,jA0,U6,DA0,lx,MA0,mx,LA0,Yx,OA0,tn,IA0,oa,RA0,Ft,NA0,m0,CA0,We,PA0,ie,AA0,qe,gA0,Q9,EA0,A,SA0,M,TA0,I,wA0,R,_A0,N,hA0,Qo,kA0,B,mA0,P0,yA0,f0,dA0,o0,pA0,v0,lA0,s0,aA0,M3,vA0,T,oA0,Nn,sA0,Q,cA0,F,fA0,Y,iA0,H2,uA0,sr,nA0,kr,tA0,lr,eA0,Vr,rA0,Dx,xA0,h0,bg0,hr,Gg0,R0,qg0,Er,Hg0,Wr,Fg0,I3,Qg0,cr,$g0,j1,Wg0,Z,Zg0,V,Kg0,Pe,zg0,k3,Vg0,$9,Jg0,D,Xg0,Ln,Yg0,na,Bg0,q9,Ug0,G9,jg0,_3,Dg0,H9,Mg0,Y6,Lg0,B6,Og0,a0,Ig0,h3,Rg0,F9,Ng0,X6,Cg0,kt,Pg0,Cn,Ag0,co,gg0,qo,Eg0,Fo,Sg0,Pn,Tg0,xv,wg0,bo,_g0,lo,hg0,ta,kg0,ks,mg0,ea,yg0,ra,dg0,Go,pg0,ao,lg0,Ho,ag0,ke,vg0,ms,og0,vo,sg0,bv,cg0,xa,fg0,so,ig0,ys,ug0,oo,ng0,l2,tg0,he,eg0,dr,LM,qt,pm,$e,lm,jr,H6,An,OM,ds,am,Ht,IM,me,RM,fo,vm,E2,X3,Lr,Y3,G,F6,Hx,Q6,J0,NM,O0,CM,Bx,PM,ix,$6,Wx,AM,K1,gM,bx,EM,o,W6,uv,SM,Q1,TM,l1,wM,Ts,_M,Ce,hM,or,B3,Ox,kM,D0,om,Ex,mM,B0,yM,Px,dM,j0,Z6,X,pM,kx,sm,h,lM,tx,aM,W0,vM,sx,K6,b0,oM,V0,z6,ox,cm,z0,sM,nr,fm,K0,V6,Ux,im,rr,cM,qx,um,X0,fM,N0,J6,$,iM,i0,uM,Sx,nM,b,nm,H,tm,E0,va,L0,tM,C0,em,Q0,rm,U0,eM,dx,rM,ax,xM,xx,xm,H0,U3,g0,bL,rx,GL,Y0,qL,M0,HL,T0,FL,U,QL,c0,$L,g,WL,k,ZL,d,KL,a,zL,u,VL,t,JL,n0,XL,e,b9]),function(n,s){return ky(s,x)}}),FI=function x(r,e,t){return x.fun(r,e,t)};I0(FI,function(x,r,e){var t=e[2];switch(t[0]){case 0:var u=t[1][1];return r2(function(f){return function(o){var a=o[0]===0?o[1][2][2]:o[1][2][1];return G0(FI,x,f,a)}},r,u);case 1:var i=t[1][1];return r2(function(f){return function(o){return o[0]===2?f:G0(FI,x,f,o[1][2][1])}},r,i);case 2:return p(x,r,t[1][1]);default:return r}});var HI=function x(r){return x.fun(r)},yS0=function(x){var r=x[0]===0?x[1][2][2]:x[1][2][1];return l(HI,r)},mS0=function(x){return x[0]===2?0:l(HI,x[1][2][1])};I0(HI,function(x){var r=x[2];switch(r[0]){case 0:return aI(yS0,r[1][1]);case 1:return aI(mS0,r[1][1]);case 2:return 1;default:return 0}});var wn=function(x,r){return[0,r[1],[0,r[2],x]]},CJ=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0;return[0,t,u,e]},y0=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0;return!t&&!u?0:[0,CJ([0,t],[0,u],0)]},J1=function(x,r,e,t){var u=x?x[1]:0,i=r?r[1]:0;return!u&&!i&&!e?0:[0,CJ([0,u],[0,i],e)]},I2=function(x,r){if(x){if(r){var e=r[1],t=x[1],u=[0,Fx(t[2],e[2])];return y0([0,Fx(e[1],t[1])],u,0)}var i=x}else var i=r;return i},qI=function(x,r){if(!r)return x;if(x){var e=r[1],t=x[1],u=e[1],i=t[3],f=t[1],o=[0,Fx(t[2],e[2])];return J1([0,Fx(u,f)],o,i,0)}var a=r[1];return J1([0,a[1]],[0,a[2]],0,0)},NJ=function(x,r){l(Br(x),Cq),p(Br(x),Rq,Nq);var e=r[1];l(l(Br(x),Iq),e),l(Br(x),Oq),l(Br(x),Lq),p(Br(x),Dq,Mq);var t=r[2];return l(l(Br(x),jq),t),l(Br(x),Uq),l(Br(x),Bq)},RJ=function x(r,e){return x.fun(r,e)},kS0=function x(r){return x.fun(r)};I0(RJ,function(x,r){l(Br(x),zq),p(Br(x),Zq,Kq);var e=r[1];if(e){var t=e[1];switch(yy(x,Xq),t[0]){case 0:var u=t[1];l(Br(x),kH),l(l(Br(x),hH),u),l(Br(x),_H);break;case 1:var i=t[1];l(Br(x),wH),l(l(Br(x),TH),i),l(Br(x),SH);break;case 2:var f=t[1];l(Br(x),EH),l(l(Br(x),gH),f),l(Br(x),AH);break;default:var o=t[1];l(Br(x),PH),l(l(Br(x),CH),o),l(Br(x),NH)}yy(x,Jq)}else yy(x,Vq);return l(Br(x),Wq),l(Br(x),$q),p(Br(x),Fq,Qq),NJ(x,r[2]),l(Br(x),Hq),l(Br(x),qq),p(Br(x),bq,Gq),NJ(x,r[3]),l(Br(x),xG),l(Br(x),rG)}),I0(kS0,function(x){var r=Yq[1],e=WX(0),t=MI(e);return p(Ur(function(u){ze(t,u),OI(t,0);var i=X1(e);return e[2]=0,e[1]=e[4],e[3]=at(e[1]),i},0,r),RJ,x)});var Fr=function(x,r){return[0,x[1],x[2],r[3]]},qs=function(x,r){var e=x[1]-r[1]|0;return e===0?x[2]-r[2]|0:e},IJ=function(x,r){var e=r[1],t=x[1];if(t){var u=t[1];if(e)var i=e[1],f=AJ(i),o=AJ(u)-f|0,a=o===0?Tx(u[1],i[1]):o;else var a=-1}else var a=e?1:0;if(a!==0)return a;var d=qs(x[2],r[2]);return d===0?qs(x[3],r[3]):d},Mo=function(x,r){return IJ(x,r)===0?1:0},OJ=function x(r,e){return x.fun(r,e)};I0(OJ,function(x,r){if(typeof x=="number"){var e=x;if(59<=e)switch(e){case 59:if(typeof r=="number"&&r===59)return 0;break;case 60:if(typeof r=="number"&&r===60)return 0;break;case 61:if(typeof r=="number"&&r===61)return 0;break;case 62:if(typeof r=="number"&&r===62)return 0;break;case 63:if(typeof r=="number"&&r===63)return 0;break;case 64:if(typeof r=="number"&&r===64)return 0;break;case 65:if(typeof r=="number"&&r===65)return 0;break;case 66:if(typeof r=="number"&&r===66)return 0;break;case 67:if(typeof r=="number"&&r===67)return 0;break;case 68:if(typeof r=="number"&&r===68)return 0;break;case 69:if(typeof r=="number"&&r===69)return 0;break;case 70:if(typeof r=="number"&&r===70)return 0;break;case 71:if(typeof r=="number"&&r===71)return 0;break;case 72:if(typeof r=="number"&&r===72)return 0;break;case 73:if(typeof r=="number"&&r===73)return 0;break;case 74:if(typeof r=="number"&&r===74)return 0;break;case 75:if(typeof r=="number"&&r===75)return 0;break;case 76:if(typeof r=="number"&&r===76)return 0;break;case 77:if(typeof r=="number"&&r===77)return 0;break;case 78:if(typeof r=="number"&&r===78)return 0;break;case 79:if(typeof r=="number"&&r===79)return 0;break;case 80:if(typeof r=="number"&&r===80)return 0;break;case 81:if(typeof r=="number"&&r===81)return 0;break;case 82:if(typeof r=="number"&&r===82)return 0;break;case 83:if(typeof r=="number"&&r===83)return 0;break;case 84:if(typeof r=="number"&&r===84)return 0;break;case 85:if(typeof r=="number"&&r===85)return 0;break;case 86:if(typeof r=="number"&&r===86)return 0;break;case 87:if(typeof r=="number"&&r===87)return 0;break;case 88:if(typeof r=="number"&&r===88)return 0;break;case 89:if(typeof r=="number"&&r===89)return 0;break;case 90:if(typeof r=="number"&&r===90)return 0;break;case 91:if(typeof r=="number"&&r===91)return 0;break;case 92:if(typeof r=="number"&&r===92)return 0;break;case 93:if(typeof r=="number"&&r===93)return 0;break;case 94:if(typeof r=="number"&&r===94)return 0;break;case 95:if(typeof r=="number"&&r===95)return 0;break;case 96:if(typeof r=="number"&&r===96)return 0;break;case 97:if(typeof r=="number"&&r===97)return 0;break;case 98:if(typeof r=="number"&&r===98)return 0;break;case 99:if(typeof r=="number"&&r===99)return 0;break;case 100:if(typeof r=="number"&&ot===r)return 0;break;case 101:if(typeof r=="number"&&It===r)return 0;break;case 102:if(typeof r=="number"&&Zf===r)return 0;break;case 103:if(typeof r=="number"&&nn===r)return 0;break;case 104:if(typeof r=="number"&&jt===r)return 0;break;case 105:if(typeof r=="number"&&ct===r)return 0;break;case 106:if(typeof r=="number"&&c2===r)return 0;break;case 107:if(typeof r=="number"&&xe===r)return 0;break;case 108:if(typeof r=="number"&&sn===r)return 0;break;case 109:if(typeof r=="number"&&To===r)return 0;break;case 110:if(typeof r=="number"&&B1===r)return 0;break;case 111:if(typeof r=="number"&&Ot===r)return 0;break;case 112:if(typeof r=="number"&&D2===r)return 0;break;case 113:if(typeof r=="number"&&Nr===r)return 0;break;case 114:if(typeof r=="number"&&st===r)return 0;break;case 115:if(typeof r=="number"&&Eo===r)return 0;break;case 116:if(typeof r=="number"&&Ri===r)return 0;break;default:if(typeof r=="number"&&dv<=r)return 0}else switch(e){case 0:if(typeof r=="number"&&!r)return 0;break;case 1:if(typeof r=="number"&&r===1)return 0;break;case 2:if(typeof r=="number"&&r===2)return 0;break;case 3:if(typeof r=="number"&&r===3)return 0;break;case 4:if(typeof r=="number"&&r===4)return 0;break;case 5:if(typeof r=="number"&&r===5)return 0;break;case 6:if(typeof r=="number"&&r===6)return 0;break;case 7:if(typeof r=="number"&&r===7)return 0;break;case 8:if(typeof r=="number"&&r===8)return 0;break;case 9:if(typeof r=="number"&&r===9)return 0;break;case 10:if(typeof r=="number"&&r===10)return 0;break;case 11:if(typeof r=="number"&&r===11)return 0;break;case 12:if(typeof r=="number"&&r===12)return 0;break;case 13:if(typeof r=="number"&&r===13)return 0;break;case 14:if(typeof r=="number"&&r===14)return 0;break;case 15:if(typeof r=="number"&&r===15)return 0;break;case 16:if(typeof r=="number"&&r===16)return 0;break;case 17:if(typeof r=="number"&&r===17)return 0;break;case 18:if(typeof r=="number"&&r===18)return 0;break;case 19:if(typeof r=="number"&&r===19)return 0;break;case 20:if(typeof r=="number"&&r===20)return 0;break;case 21:if(typeof r=="number"&&r===21)return 0;break;case 22:if(typeof r=="number"&&r===22)return 0;break;case 23:if(typeof r=="number"&&r===23)return 0;break;case 24:if(typeof r=="number"&&r===24)return 0;break;case 25:if(typeof r=="number"&&r===25)return 0;break;case 26:if(typeof r=="number"&&r===26)return 0;break;case 27:if(typeof r=="number"&&r===27)return 0;break;case 28:if(typeof r=="number"&&r===28)return 0;break;case 29:if(typeof r=="number"&&r===29)return 0;break;case 30:if(typeof r=="number"&&r===30)return 0;break;case 31:if(typeof r=="number"&&r===31)return 0;break;case 32:if(typeof r=="number"&&r===32)return 0;break;case 33:if(typeof r=="number"&&r===33)return 0;break;case 34:if(typeof r=="number"&&r===34)return 0;break;case 35:if(typeof r=="number"&&r===35)return 0;break;case 36:if(typeof r=="number"&&r===36)return 0;break;case 37:if(typeof r=="number"&&r===37)return 0;break;case 38:if(typeof r=="number"&&r===38)return 0;break;case 39:if(typeof r=="number"&&r===39)return 0;break;case 40:if(typeof r=="number"&&r===40)return 0;break;case 41:if(typeof r=="number"&&r===41)return 0;break;case 42:if(typeof r=="number"&&r===42)return 0;break;case 43:if(typeof r=="number"&&r===43)return 0;break;case 44:if(typeof r=="number"&&r===44)return 0;break;case 45:if(typeof r=="number"&&r===45)return 0;break;case 46:if(typeof r=="number"&&r===46)return 0;break;case 47:if(typeof r=="number"&&r===47)return 0;break;case 48:if(typeof r=="number"&&r===48)return 0;break;case 49:if(typeof r=="number"&&r===49)return 0;break;case 50:if(typeof r=="number"&&r===50)return 0;break;case 51:if(typeof r=="number"&&r===51)return 0;break;case 52:if(typeof r=="number"&&r===52)return 0;break;case 53:if(typeof r=="number"&&r===53)return 0;break;case 54:if(typeof r=="number"&&r===54)return 0;break;case 55:if(typeof r=="number"&&r===55)return 0;break;case 56:if(typeof r=="number"&&r===56)return 0;break;case 57:if(typeof r=="number"&&r===57)return 0;break;default:if(typeof r=="number"&&r===58)return 0}}else switch(x[0]){case 0:if(typeof r!="number"&&r[0]===0)return Tx(x[1],r[1]);break;case 1:if(typeof r!="number"&&r[0]===1)return Tx(x[1],r[1]);break;case 2:if(typeof r!="number"&&r[0]===2){var t=Tx(x[1],r[1]),u=r[2],i=x[2];return t===0?Tx(i,u):t}break;case 3:if(typeof r!="number"&&r[0]===3){var f=Tx(x[1],r[1]),o=r[2],a=x[2];return f===0?Tx(a,o):f}break;case 4:if(typeof r!="number"&&r[0]===4){var d=Tx(x[1],r[1]),k=r[2],T=x[2];return d===0?Tx(T,k):d}break;case 5:if(typeof r!="number"&&r[0]===5)return Tx(x[1],r[1]);break;case 6:if(typeof r!="number"&&r[0]===6)return Bt(x[1],r[1]);break;case 7:if(typeof r!="number"&&r[0]===7){var g=r[2],A=x[2],N=Tx(x[1],r[1]);if(N!==0)return N;if(!A)return g?-1:0;var R=A[1];return g?Tx(R,g[1]):1}break;case 8:if(typeof r!="number"&&r[0]===8)return Tx(x[1],r[1]);break;case 9:if(typeof r!="number"&&r[0]===9){var I=r[2],M=x[2],L=Tx(x[1],r[1]),z=r[3],V=x[3];if(L!==0)return L;if(M){var Z=M[1];if(I){var $=I[1],i0=0;switch(Z){case 0:if($)i0=1;else var Y=0;break;case 1:if($===1)var Y=0;else i0=1;break;case 2:if($===2)var Y=0;else i0=1;break;case 3:if($===3)var Y=0;else i0=1;break;default:if(4<=$)var Y=0;else i0=1}if(i0)var U=function(ox){switch(ox){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;default:return 4}},J=U($),Y=Bt(U(Z),J);var F=Y}else var F=1}else var F=I?-1:0;return F===0?Tx(V,z):F}break;case 10:if(typeof r!="number"&&r[0]===10){var n0=Tx(x[1],r[1]),Q=r[2],f0=x[2];return n0===0?Tx(f0,Q):n0}break;case 11:if(typeof r!="number"&&r[0]===11){var s0=Tx(x[1],r[1]),v0=r[2],o0=x[2];return s0===0?Tx(o0,v0):s0}break;case 12:if(typeof r!="number"&&r[0]===12)return Tx(x[1],r[1]);break;case 13:if(typeof r!="number"&&r[0]===13)return Tx(x[1],r[1]);break;case 14:if(typeof r!="number"&&r[0]===14)return Bt(x[1],r[1]);break;case 15:if(typeof r!="number"&&r[0]===15){var c0=Tx(x[1],r[1]),T0=r[4],E0=r[3],M0=r[2],Y0=x[4],rx=x[3],g0=x[2];if(c0!==0)return c0;var H0=Bt(g0,M0);if(H0!==0)return H0;var t0=Bt(rx,E0);return t0===0?Bt(Y0,T0):t0}break;case 16:if(typeof r!="number"&&r[0]===16){var ex=Bt(x[1],r[1]),xx=r[2],ax=x[2];return ex===0?Tx(ax,xx):ex}break;case 17:if(typeof r!="number"&&r[0]===17)return Bt(x[1],r[1]);break;case 18:if(typeof r!="number"&&r[0]===18)return Tx(x[1],r[1]);break;case 19:if(typeof r!="number"&&r[0]===19)return Tx(x[1],r[1]);break;case 20:if(typeof r!="number"&&r[0]===20)return Tx(x[1],r[1]);break;case 21:if(typeof r!="number"&&r[0]===21){var dx=Tx(x[1],r[1]),mx=r[2],L0=x[2];return dx===0?Tx(L0,mx):dx}break;case 22:if(typeof r!="number"&&r[0]===22){var C0=r[1],A0=x[1];if(yl===A0){if(yl===C0)return 0}else if(cl<=A0){if(cl===C0)return 0}else if(oY===C0)return 0;var U0=function(X0){return yl===X0?0:cl<=X0?2:1},Q0=U0(C0);return Bt(U0(A0),Q0)}break;case 23:if(typeof r!="number"&&r[0]===23)return Tx(x[1],r[1]);break;case 24:if(typeof r!="number"&&r[0]===24)return Tx(x[1],r[1]);break;case 25:if(typeof r!="number"&&r[0]===25){var H=Tx(x[1],r[1]),b=r[2],B=x[2];return H===0?Tx(B,b):H}break;case 26:if(typeof r!="number"&&r[0]===26){var a0=Tx(x[1],r[1]),m0=r[2],P0=x[2];return a0===0?Tx(P0,m0):a0}break;default:if(typeof r!="number"&&r[0]===27)return Tx(x[1],r[1])}function D(X0){if(typeof X0!="number")switch(X0[0]){case 0:return 20;case 1:return 21;case 2:return 23;case 3:return 24;case 4:return 25;case 5:return 26;case 6:return 27;case 7:return 28;case 8:return 30;case 9:return 31;case 10:return 32;case 11:return 34;case 12:return 35;case 13:return 37;case 14:return 40;case 15:return 52;case 16:return 55;case 17:return 57;case 18:return 66;case 19:return 75;case 20:return 84;case 21:return 91;case 22:return Ot;case 23:return Ca;case 24:return Lf;case 25:return Ep;case 26:return Ij;default:return SB}var D0=X0;if(59<=D0)switch(D0){case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 82;case 63:return 83;case 64:return 85;case 65:return 86;case 66:return 87;case 67:return 88;case 68:return 89;case 69:return 90;case 70:return 92;case 71:return 93;case 72:return 94;case 73:return 95;case 74:return 96;case 75:return 97;case 76:return 98;case 77:return 99;case 78:return ot;case 79:return It;case 80:return Zf;case 81:return nn;case 82:return jt;case 83:return ct;case 84:return c2;case 85:return xe;case 86:return sn;case 87:return To;case 88:return B1;case 89:return D2;case 90:return Nr;case 91:return st;case 92:return Eo;case 93:return Ri;case 94:return dv;case 95:return ma;case 96:return il;case 97:return br;case 98:return Lt;case 99:return Da;case 100:return Di;case 101:return K4;case 102:return Xr;case 103:return h1;case 104:return wl;case 105:return ud;case 106:return rN;case 107:return fD;case 108:return XU;case 109:return _Y;case 110:return Qj;case 111:return zD;case 112:return Uw;case 113:return eU;case 114:return kj;case 115:return ZU;case 116:return MB;default:return tj}switch(D0){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 6;case 7:return 7;case 8:return 8;case 9:return 9;case 10:return 10;case 11:return 11;case 12:return 12;case 13:return 13;case 14:return 14;case 15:return 15;case 16:return 16;case 17:return 17;case 18:return 18;case 19:return 19;case 20:return 22;case 21:return 29;case 22:return 33;case 23:return 36;case 24:return 38;case 25:return 39;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 53;case 38:return 54;case 39:return 56;case 40:return 58;case 41:return 59;case 42:return 60;case 43:return 61;case 44:return 62;case 45:return 63;case 46:return 64;case 47:return 65;case 48:return 67;case 49:return 68;case 50:return 69;case 51:return 70;case 52:return 71;case 53:return 72;case 54:return 73;case 55:return 74;case 56:return 76;case 57:return 77;default:return 78}}var N0=D(r);return Bt(D(x),N0)});var hS0=[qr,ax0,Js(0)],_S0=function(x){if(typeof x=="number"){var r=x;if(59<=r)switch(r){case 59:return ob;case 60:return vb;case 61:return ab;case 62:return lb;case 63:return pb;case 64:return db;case 65:return yb;case 66:return mb;case 67:return kb;case 68:return hb;case 69:return _b;case 70:return wb;case 71:return Tb;case 72:return Sb;case 73:return Eb;case 74:return gb;case 75:return Ab;case 76:return Pb;case 77:return Cb;case 78:return Nb;case 79:return Rb;case 80:return Ib;case 81:return Ob;case 82:return Lb;case 83:return Mb;case 84:return Db;case 85:return jb;case 86:return Ub;case 87:return Bb;case 88:return Yb;case 89:return Xb;case 90:return Jb;case 91:return Vb;case 92:return zb;case 93:return Kb;case 94:return Zb;case 95:return Wb;case 96:return $b;case 97:return Qb;case 98:return Fb;case 99:return Hb;case 100:return qb;case 101:return Gb;case 102:return bb;case 103:return x00;case 104:return r00;case 105:return e00;case 106:return t00;case 107:return n00;case 108:return u00;case 109:return i00;case 110:return f00;case 111:return c00;case 112:return s00;case 113:return o00;case 114:return v00;case 115:return a00;case 116:return l00;default:return p00}switch(r){case 0:return eG;case 1:return tG;case 2:return nG;case 3:return Qx(iG,uG);case 4:return fG;case 5:return cG;case 6:return sG;case 7:return oG;case 8:return vG;case 9:return aG;case 10:return lG;case 11:return pG;case 12:return Qx(yG,dG);case 13:return mG;case 14:return kG;case 15:return hG;case 16:return _G;case 17:return wG;case 18:return TG;case 19:return SG;case 20:return EG;case 21:return gG;case 22:return AG;case 23:return PG;case 24:return CG;case 25:return NG;case 26:return RG;case 27:return IG;case 28:return OG;case 29:return LG;case 30:return MG;case 31:return DG;case 32:return jG;case 33:return UG;case 34:return Qx(YG,BG);case 35:return XG;case 36:return JG;case 37:return VG;case 38:return zG;case 39:return KG;case 40:return ZG;case 41:return WG;case 42:return $G;case 43:return QG;case 44:return FG;case 45:return HG;case 46:return qG;case 47:return GG;case 48:return bG;case 49:return xb;case 50:return rb;case 51:return eb;case 52:return tb;case 53:return nb;case 54:return ub;case 55:return ib;case 56:return fb;case 57:return cb;default:return sb}}switch(x[0]){case 0:var e=x[1];return l(Tr(d00),e);case 1:var t=x[1];return l(Tr(y00),t);case 2:var u=x[2],i=x[1];return p(Tr(m00),u,i);case 3:var f=x[2],o=x[1];return G0(Tr(k00),f,f,o);case 4:var a=x[2],d=x[1];return p(Tr(h00),a,d);case 5:var k=x[1];return l(Tr(_00),k);case 6:return x[1]?w00:T00;case 7:var T=x[2],g=x[1],A=l(Tr(S00),g);if(!T)return l(Tr(g00),A);var N=T[1];return p(Tr(E00),N,A);case 8:var R=x[1];return p(Tr(A00),R,R);case 9:var I=x[3],M=x[2],L=x[1];if(!M)return p(Tr(N00),I,L);var z=M[1];if(z===3)return p(Tr(C00),I,L);switch(z){case 0:var V=lH;break;case 1:var V=pH;break;case 2:var V=dH;break;case 3:var V=yH;break;default:var V=mH}return ve(Tr(P00),L,V,I,V);case 10:var Z=x[2],$=x[1],i0=yX(Z);return G0(Tr(R00),Z,i0,$);case 11:var U=x[2],J=x[1];return p(Tr(I00),U,J);case 12:var Y=x[1];return l(Tr(O00),Y);case 13:var F=x[1];return l(Tr(L00),F);case 14:return x[1]?Qx(D00,M00):Qx(U00,j00);case 15:var n0=x[1],Q=x[4],f0=x[3],s0=x[2]?B00:Y00,v0=f0?X00:J00,o0=Q?Qx(V00,n0):n0;return G0(Tr(z00),s0,v0,o0);case 16:var c0=x[2],T0=[0,0],E0=[0,Xx(c0)],M0=Xx(c0)-1|0,Y0=x[1];if(M0>=0)for(var rx=M0;;){if(fx(c0,rx)===45){var g0=T0[1];T0[1]=[0,k2(c0,rx+1|0,(E0[1]-rx|0)-1|0),g0],E0[1]=rx}var H0=rx-1|0;if(rx!==0){var rx=H0;continue}break}var t0=T0[1],ex=k2(c0,0,E0[1]);if(t0)for(var xx=[0,ex,_n(yX,t0)],ax=0,dx=xx,mx=0;;){if(dx){var L0=dx[1];if(dx[2]){var C0=(Xx(L0)|0)+ax|0,A0=dx[2],U0=ax<=C0?C0:m2(XW),ax=U0,dx=A0;continue}var Q0=Xx(L0)+ax|0}else var Q0=ax;for(var H=S1(Q0),b=mx,B=xx;;){if(B){var a0=B[1];if(B[2]){var m0=B[2];rs(a0,0,H,b,Xx(a0)),rs(hx,0,H,b+Xx(a0)|0,0);var b=b+Xx(a0)|0|0,B=m0;continue}rs(a0,0,H,b,Xx(a0))}var P0=A2(H);break}break}else var P0=ex;var D=Y0?K00:Z00;return G0(Tr(W00),c0,P0,D);case 17:var N0=x[1]?$00:Q00;return l(Tr(F00),N0);case 18:var X0=x[1];return l(Tr(H00),X0);case 19:var D0=x[1];return l(Tr(q00),D0);case 20:var ox=x[1];return l(Tr(G00),ox);case 21:var b0=x[2],kx=x[1];return p(Tr(b00),kx,b0);case 22:var V0=x[1];if(yl===V0)var h=nx0,X=ux0;else if(cl<=V0)var h=xx0,X=rx0;else var h=ex0,X=tx0;return p(Tr(ix0),X,h);case 23:var W0=x[1];return l(Tr(fx0),W0);case 24:var sx=x[1];return l(Tr(cx0),sx);case 25:var tx=x[2],j0=x[1];return p(Tr(sx0),j0,tx);case 26:var Px=x[2],Ex=x[1];return p(Tr(ox0),Ex,Px);default:var Ox=x[1];return l(Tr(vx0),Ox)}},LJ=lx0.slice(),GI=function(x){for(var r=0,e=LJ.length-1-1|0;;){if(ex)return 1;var r=t+1|0}},MJ=0,DJ=function(x){var r=x[2];return[0,x[1],[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12]],x[3],x[4],x[5],x[6],x[7]]},jJ=function(x){return x[3][1]},Ey=function(x,r){return x!==r[4]?[0,r[1],r[2],r[3],x,r[5],r[6],r[7]]:r},bI=function x(r,e){return x.fun(r,e)},UJ=function x(r,e){return x.fun(r,e)},xO=function x(r,e){return x.fun(r,e)},rO=function x(r,e){return x.fun(r,e)};I0(bI,function(x,r){if(typeof x=="number"){var e=x;if(66<=e)if(99<=e)switch(e){case 99:if(typeof r=="number"&&r===99)return 1;break;case 100:if(typeof r=="number"&&ot===r)return 1;break;case 101:if(typeof r=="number"&&It===r)return 1;break;case 102:if(typeof r=="number"&&Zf===r)return 1;break;case 103:if(typeof r=="number"&&nn===r)return 1;break;case 104:if(typeof r=="number"&&jt===r)return 1;break;case 105:if(typeof r=="number"&&ct===r)return 1;break;case 106:if(typeof r=="number"&&c2===r)return 1;break;case 107:if(typeof r=="number"&&xe===r)return 1;break;case 108:if(typeof r=="number"&&sn===r)return 1;break;case 109:if(typeof r=="number"&&To===r)return 1;break;case 110:if(typeof r=="number"&&B1===r)return 1;break;case 111:if(typeof r=="number"&&Ot===r)return 1;break;case 112:if(typeof r=="number"&&D2===r)return 1;break;case 113:if(typeof r=="number"&&Nr===r)return 1;break;case 114:if(typeof r=="number"&&st===r)return 1;break;case 115:if(typeof r=="number"&&Eo===r)return 1;break;case 116:if(typeof r=="number"&&Ri===r)return 1;break;case 117:if(typeof r=="number"&&dv===r)return 1;break;case 118:if(typeof r=="number"&&ma===r)return 1;break;case 119:if(typeof r=="number"&&Ca===r)return 1;break;case 120:if(typeof r=="number"&&Lf===r)return 1;break;case 121:if(typeof r=="number"&&il===r)return 1;break;case 122:if(typeof r=="number"&&br===r)return 1;break;case 123:if(typeof r=="number"&&Lt===r)return 1;break;case 124:if(typeof r=="number"&&Da===r)return 1;break;case 125:if(typeof r=="number"&&Di===r)return 1;break;case 126:if(typeof r=="number"&&K4===r)return 1;break;case 127:if(typeof r=="number"&&Xr===r)return 1;break;case 128:if(typeof r=="number"&&h1===r)return 1;break;case 129:if(typeof r=="number"&&wl===r)return 1;break;case 130:if(typeof r=="number"&&ud===r)return 1;break;default:if(typeof r=="number"&&Ep<=r)return 1}else switch(e){case 66:if(typeof r=="number"&&r===66)return 1;break;case 67:if(typeof r=="number"&&r===67)return 1;break;case 68:if(typeof r=="number"&&r===68)return 1;break;case 69:if(typeof r=="number"&&r===69)return 1;break;case 70:if(typeof r=="number"&&r===70)return 1;break;case 71:if(typeof r=="number"&&r===71)return 1;break;case 72:if(typeof r=="number"&&r===72)return 1;break;case 73:if(typeof r=="number"&&r===73)return 1;break;case 74:if(typeof r=="number"&&r===74)return 1;break;case 75:if(typeof r=="number"&&r===75)return 1;break;case 76:if(typeof r=="number"&&r===76)return 1;break;case 77:if(typeof r=="number"&&r===77)return 1;break;case 78:if(typeof r=="number"&&r===78)return 1;break;case 79:if(typeof r=="number"&&r===79)return 1;break;case 80:if(typeof r=="number"&&r===80)return 1;break;case 81:if(typeof r=="number"&&r===81)return 1;break;case 82:if(typeof r=="number"&&r===82)return 1;break;case 83:if(typeof r=="number"&&r===83)return 1;break;case 84:if(typeof r=="number"&&r===84)return 1;break;case 85:if(typeof r=="number"&&r===85)return 1;break;case 86:if(typeof r=="number"&&r===86)return 1;break;case 87:if(typeof r=="number"&&r===87)return 1;break;case 88:if(typeof r=="number"&&r===88)return 1;break;case 89:if(typeof r=="number"&&r===89)return 1;break;case 90:if(typeof r=="number"&&r===90)return 1;break;case 91:if(typeof r=="number"&&r===91)return 1;break;case 92:if(typeof r=="number"&&r===92)return 1;break;case 93:if(typeof r=="number"&&r===93)return 1;break;case 94:if(typeof r=="number"&&r===94)return 1;break;case 95:if(typeof r=="number"&&r===95)return 1;break;case 96:if(typeof r=="number"&&r===96)return 1;break;case 97:if(typeof r=="number"&&r===97)return 1;break;default:if(typeof r=="number"&&r===98)return 1}else if(33<=e)switch(e){case 33:if(typeof r=="number"&&r===33)return 1;break;case 34:if(typeof r=="number"&&r===34)return 1;break;case 35:if(typeof r=="number"&&r===35)return 1;break;case 36:if(typeof r=="number"&&r===36)return 1;break;case 37:if(typeof r=="number"&&r===37)return 1;break;case 38:if(typeof r=="number"&&r===38)return 1;break;case 39:if(typeof r=="number"&&r===39)return 1;break;case 40:if(typeof r=="number"&&r===40)return 1;break;case 41:if(typeof r=="number"&&r===41)return 1;break;case 42:if(typeof r=="number"&&r===42)return 1;break;case 43:if(typeof r=="number"&&r===43)return 1;break;case 44:if(typeof r=="number"&&r===44)return 1;break;case 45:if(typeof r=="number"&&r===45)return 1;break;case 46:if(typeof r=="number"&&r===46)return 1;break;case 47:if(typeof r=="number"&&r===47)return 1;break;case 48:if(typeof r=="number"&&r===48)return 1;break;case 49:if(typeof r=="number"&&r===49)return 1;break;case 50:if(typeof r=="number"&&r===50)return 1;break;case 51:if(typeof r=="number"&&r===51)return 1;break;case 52:if(typeof r=="number"&&r===52)return 1;break;case 53:if(typeof r=="number"&&r===53)return 1;break;case 54:if(typeof r=="number"&&r===54)return 1;break;case 55:if(typeof r=="number"&&r===55)return 1;break;case 56:if(typeof r=="number"&&r===56)return 1;break;case 57:if(typeof r=="number"&&r===57)return 1;break;case 58:if(typeof r=="number"&&r===58)return 1;break;case 59:if(typeof r=="number"&&r===59)return 1;break;case 60:if(typeof r=="number"&&r===60)return 1;break;case 61:if(typeof r=="number"&&r===61)return 1;break;case 62:if(typeof r=="number"&&r===62)return 1;break;case 63:if(typeof r=="number"&&r===63)return 1;break;case 64:if(typeof r=="number"&&r===64)return 1;break;default:if(typeof r=="number"&&r===65)return 1}else switch(e){case 0:if(typeof r=="number"&&!r)return 1;break;case 1:if(typeof r=="number"&&r===1)return 1;break;case 2:if(typeof r=="number"&&r===2)return 1;break;case 3:if(typeof r=="number"&&r===3)return 1;break;case 4:if(typeof r=="number"&&r===4)return 1;break;case 5:if(typeof r=="number"&&r===5)return 1;break;case 6:if(typeof r=="number"&&r===6)return 1;break;case 7:if(typeof r=="number"&&r===7)return 1;break;case 8:if(typeof r=="number"&&r===8)return 1;break;case 9:if(typeof r=="number"&&r===9)return 1;break;case 10:if(typeof r=="number"&&r===10)return 1;break;case 11:if(typeof r=="number"&&r===11)return 1;break;case 12:if(typeof r=="number"&&r===12)return 1;break;case 13:if(typeof r=="number"&&r===13)return 1;break;case 14:if(typeof r=="number"&&r===14)return 1;break;case 15:if(typeof r=="number"&&r===15)return 1;break;case 16:if(typeof r=="number"&&r===16)return 1;break;case 17:if(typeof r=="number"&&r===17)return 1;break;case 18:if(typeof r=="number"&&r===18)return 1;break;case 19:if(typeof r=="number"&&r===19)return 1;break;case 20:if(typeof r=="number"&&r===20)return 1;break;case 21:if(typeof r=="number"&&r===21)return 1;break;case 22:if(typeof r=="number"&&r===22)return 1;break;case 23:if(typeof r=="number"&&r===23)return 1;break;case 24:if(typeof r=="number"&&r===24)return 1;break;case 25:if(typeof r=="number"&&r===25)return 1;break;case 26:if(typeof r=="number"&&r===26)return 1;break;case 27:if(typeof r=="number"&&r===27)return 1;break;case 28:if(typeof r=="number"&&r===28)return 1;break;case 29:if(typeof r=="number"&&r===29)return 1;break;case 30:if(typeof r=="number"&&r===30)return 1;break;case 31:if(typeof r=="number"&&r===31)return 1;break;default:if(typeof r=="number"&&r===32)return 1}}else switch(x[0]){case 0:if(typeof r!="number"&&r[0]===0){var t=r[2],u=r[1],i=x[2],f=l(l(xO,x[1]),u);return f&&Ar(i,t)}break;case 1:if(typeof r!="number"&&r[0]===1){var o=r[2],a=r[1],d=x[2],k=l(l(rO,x[1]),a);return k&&Ar(d,o)}break;case 2:if(typeof r!="number"&&r[0]===2){var T=r[1],g=x[1],A=T[4],N=T[3],R=T[2],I=g[4],M=g[3],L=g[2],z=Mo(g[1],T[1]),V=z&&Ar(L,R),Z=V&&Ar(M,N);return Z&&(I===A?1:0)}break;case 3:if(typeof r!="number"&&r[0]===3){var $=r[1],i0=x[1],U=$[5],J=$[4],Y=$[3],F=$[2],n0=i0[5],Q=i0[4],f0=i0[3],s0=i0[2],v0=Mo(i0[1],$[1]),o0=v0&&Ar(s0,F),c0=o0&&Ar(f0,Y),T0=c0&&(Q===J?1:0);return T0&&(n0===U?1:0)}break;case 4:if(typeof r!="number"&&r[0]===4){var E0=r[3],M0=r[2],Y0=x[3],rx=x[2],g0=Mo(x[1],r[1]),H0=g0&&Ar(rx,M0);return H0&&Ar(Y0,E0)}break;case 5:if(typeof r!="number"&&r[0]===5){var t0=r[3],ex=r[2],xx=x[3],ax=x[2],dx=Mo(x[1],r[1]),mx=dx&&Ar(ax,ex);return mx&&Ar(xx,t0)}break;case 6:if(typeof r!="number"&&r[0]===6){var L0=r[2],C0=x[2],A0=Mo(x[1],r[1]);return A0&&Ar(C0,L0)}break;case 7:if(typeof r!="number"&&r[0]===7)return Ar(x[1],r[1]);break;case 8:if(typeof r!="number"&&r[0]===8){var U0=Ar(x[1],r[1]),Q0=r[2],H=x[2];return U0&&Mo(H,Q0)}break;case 9:if(typeof r!="number"&&r[0]===9){var b=r[3],B=r[2],a0=x[3],m0=x[2],P0=Mo(x[1],r[1]),D=P0&&Ar(m0,B);return D&&Ar(a0,b)}break;case 10:if(typeof r!="number"&&r[0]===10){var N0=r[3],X0=r[2],D0=x[3],ox=x[2],b0=Mo(x[1],r[1]),kx=b0&&Ar(ox,X0);return kx&&Ar(D0,N0)}break;case 11:if(typeof r!="number"&&r[0]===11){var V0=r[1];return l(l(UJ,x[1]),V0)}break;case 12:if(typeof r!="number"&&r[0]===12){var h=r[3],X=r[2],W0=r[1],sx=x[3],tx=x[2],j0=l(l(xO,x[1]),W0),Px=j0&&(tx==X?1:0);return Px&&Ar(sx,h)}break;default:if(typeof r!="number"&&r[0]===13){var Ex=r[2],Ox=x[2],qx=r[3],B0=r[1],rr=x[3],Ux=l(l(rO,x[1]),B0);if(Ux){var K0=0;if(Ox)if(Ex)var nr=Nl(Ox[1],Ex[1]);else K0=1;else if(Ex)K0=1;else var nr=1;if(K0)var nr=0;var z0=nr}else var z0=Ux;return z0&&Ar(rr,qx)}}return 0}),I0(UJ,function(x,r){if(x){if(r)return 1}else if(!r)return 1;return 0}),I0(xO,function(x,r){switch(x){case 0:if(!r)return 1;break;case 1:if(r===1)return 1;break;case 2:if(r===2)return 1;break;case 3:if(r===3)return 1;break;default:if(4<=r)return 1}return 0}),I0(rO,function(x,r){switch(x){case 0:if(!r)return 1;break;case 1:if(r===1)return 1;break;default:if(2<=r)return 1}return 0});var BJ=function(x){if(typeof x!="number")switch(x[0]){case 0:return Yt0;case 1:return Xt0;case 2:return Jt0;case 3:return Vt0;case 4:return zt0;case 5:return Kt0;case 6:return Zt0;case 7:return Wt0;case 8:return $t0;case 9:return Qt0;case 10:return Ft0;case 11:return Ht0;case 12:return qt0;default:return Gt0}var r=x;if(66<=r){if(99<=r)switch(r){case 99:return it0;case 100:return ft0;case 101:return ct0;case 102:return st0;case 103:return ot0;case 104:return vt0;case 105:return at0;case 106:return lt0;case 107:return pt0;case 108:return dt0;case 109:return yt0;case 110:return mt0;case 111:return kt0;case 112:return ht0;case 113:return _t0;case 114:return wt0;case 115:return Tt0;case 116:return St0;case 117:return Et0;case 118:return gt0;case 119:return At0;case 120:return Pt0;case 121:return Ct0;case 122:return Nt0;case 123:return Rt0;case 124:return It0;case 125:return Ot0;case 126:return Lt0;case 127:return Mt0;case 128:return Dt0;case 129:return jt0;case 130:return Ut0;default:return Bt0}switch(r){case 66:return Pe0;case 67:return Ce0;case 68:return Ne0;case 69:return Re0;case 70:return Ie0;case 71:return Oe0;case 72:return Le0;case 73:return Me0;case 74:return De0;case 75:return je0;case 76:return Ue0;case 77:return Be0;case 78:return Ye0;case 79:return Xe0;case 80:return Je0;case 81:return Ve0;case 82:return ze0;case 83:return Ke0;case 84:return Ze0;case 85:return We0;case 86:return $e0;case 87:return Qe0;case 88:return Fe0;case 89:return He0;case 90:return qe0;case 91:return Ge0;case 92:return be0;case 93:return xt0;case 94:return rt0;case 95:return et0;case 96:return tt0;case 97:return nt0;default:return ut0}}if(33<=r)switch(r){case 33:return Q20;case 34:return F20;case 35:return H20;case 36:return q20;case 37:return G20;case 38:return b20;case 39:return xe0;case 40:return re0;case 41:return ee0;case 42:return te0;case 43:return ne0;case 44:return ue0;case 45:return ie0;case 46:return fe0;case 47:return ce0;case 48:return se0;case 49:return oe0;case 50:return ve0;case 51:return ae0;case 52:return le0;case 53:return pe0;case 54:return de0;case 55:return ye0;case 56:return me0;case 57:return ke0;case 58:return he0;case 59:return _e0;case 60:return we0;case 61:return Te0;case 62:return Se0;case 63:return Ee0;case 64:return ge0;default:return Ae0}switch(r){case 0:return d20;case 1:return y20;case 2:return m20;case 3:return k20;case 4:return h20;case 5:return _20;case 6:return w20;case 7:return T20;case 8:return S20;case 9:return E20;case 10:return g20;case 11:return A20;case 12:return P20;case 13:return C20;case 14:return N20;case 15:return R20;case 16:return I20;case 17:return O20;case 18:return L20;case 19:return M20;case 20:return D20;case 21:return j20;case 22:return U20;case 23:return B20;case 24:return Y20;case 25:return X20;case 26:return J20;case 27:return V20;case 28:return z20;case 29:return K20;case 30:return Z20;case 31:return W20;default:return $20}},eO=function(x){if(typeof x!="number")switch(x[0]){case 0:return x[2];case 1:return x[2];case 2:return x[1][3];case 3:var r=x[1],e=r[5],t=r[4],u=r[3];return t&&e?Qx(n20,Qx(u,t20)):t?Qx(i20,Qx(u,u20)):e?Qx(c20,Qx(u,f20)):Qx(o20,Qx(u,s20));case 4:return x[3];case 5:var i=x[2];return Qx(a20,Qx(i,Qx(v20,x[3])));case 6:return x[2];case 7:return x[1];case 8:return x[1];case 9:return x[3];case 10:return x[3];case 11:return x[1]?l20:p20;case 12:return x[3];default:return x[3]}var f=x;if(66<=f){if(99<=f)switch(f){case 99:return E10;case 100:return g10;case 101:return A10;case 102:return P10;case 103:return C10;case 104:return N10;case 105:return R10;case 106:return I10;case 107:return O10;case 108:return L10;case 109:return M10;case 110:return D10;case 111:return j10;case 112:return U10;case 113:return B10;case 114:return Y10;case 115:return X10;case 116:return J10;case 117:return V10;case 118:return z10;case 119:return K10;case 120:return Z10;case 121:return W10;case 122:return $10;case 123:return Q10;case 124:return F10;case 125:return H10;case 126:return q10;case 127:return G10;case 128:return b10;case 129:return x20;case 130:return r20;default:return e20}switch(f){case 66:return Zr0;case 67:return Wr0;case 68:return $r0;case 69:return Qr0;case 70:return Fr0;case 71:return Hr0;case 72:return qr0;case 73:return Gr0;case 74:return br0;case 75:return x10;case 76:return r10;case 77:return e10;case 78:return t10;case 79:return n10;case 80:return u10;case 81:return i10;case 82:return f10;case 83:return c10;case 84:return s10;case 85:return o10;case 86:return v10;case 87:return a10;case 88:return l10;case 89:return p10;case 90:return d10;case 91:return y10;case 92:return m10;case 93:return k10;case 94:return h10;case 95:return _10;case 96:return w10;case 97:return T10;default:return S10}}if(33<=f)switch(f){case 33:return ar0;case 34:return lr0;case 35:return pr0;case 36:return dr0;case 37:return yr0;case 38:return mr0;case 39:return kr0;case 40:return hr0;case 41:return _r0;case 42:return wr0;case 43:return Tr0;case 44:return Sr0;case 45:return Er0;case 46:return gr0;case 47:return Ar0;case 48:return Pr0;case 49:return Cr0;case 50:return Nr0;case 51:return Rr0;case 52:return Ir0;case 53:return Or0;case 54:return Lr0;case 55:return Mr0;case 56:return Dr0;case 57:return jr0;case 58:return Ur0;case 59:return Br0;case 60:return Yr0;case 61:return Xr0;case 62:return Jr0;case 63:return Vr0;case 64:return zr0;default:return Kr0}switch(f){case 0:return Lx0;case 1:return Mx0;case 2:return Dx0;case 3:return jx0;case 4:return Ux0;case 5:return Bx0;case 6:return Yx0;case 7:return Xx0;case 8:return Jx0;case 9:return Vx0;case 10:return zx0;case 11:return Kx0;case 12:return Zx0;case 13:return Wx0;case 14:return $x0;case 15:return Qx0;case 16:return Fx0;case 17:return Hx0;case 18:return qx0;case 19:return Gx0;case 20:return bx0;case 21:return xr0;case 22:return rr0;case 23:return er0;case 24:return tr0;case 25:return nr0;case 26:return ur0;case 27:return ir0;case 28:return fr0;case 29:return cr0;case 30:return sr0;case 31:return or0;default:return vr0}},gy=function(x){return l(Tr(Ox0),x)},tO=function(x,r){var e=x?x[1]:0,t=0;if(typeof r=="number")if(Nr===r)var u=yx0,i=mx0;else t=1;else switch(r[0]){case 3:var u=kx0,i=hx0;break;case 5:var u=_x0,i=wx0;break;case 0:case 12:var u=Sx0,i=Ex0;break;case 1:case 13:var u=gx0,i=Ax0;break;case 4:case 8:var u=Nx0,i=Rx0;break;case 6:case 7:case 11:t=1;break;default:var u=Px0,i=Cx0}if(t)var u=Tx0,i=gy(eO(r));return e?Qx(u,Qx(Ix0,i)):i},wS0=function(x){return Rv>>0)var t=_(x);else switch(e){case 0:var t=1;break;case 1:var t=2;break;case 2:var t=0;break;default:if(r0(x,2),Xo(m(x))===0){var u=Vv(m(x));if(u===0)var t=Pr(m(x))===0&&Pr(m(x))===0&&Pr(m(x))===0?0:_(x);else if(u===1&&Pr(m(x))===0)for(;;){var i=Jv(m(x));if(i!==0){var t=i===1?0:_(x);break}}else var t=_(x)}else var t=_(x)}if(2>>0)throw q0([0,wr,bt0],1);switch(t){case 0:continue;case 1:return 1;default:if(GI(pJ(x)))continue;return yJ(x,1),0}}},Hy=function(x,r){var e=r-x[3][2]|0;return[0,jJ(x),e]},n6=function(x,r,e){var t=Hy(x,e),u=Hy(x,r);return[0,x[1],u,t]},_2=function(x,r){return Hy(x,r[6])},de=function(x,r){return Hy(x,r[3])},Jr=function(x,r){return n6(x,r[6],r[3])},cV=function(x,r){var e=0;if(typeof r=="number")e=1;else switch(r[0]){case 2:var t=r[1][1];break;case 3:return r[1][1];case 4:var t=r[1];break;case 5:return r[1];case 8:var t=r[2];break;case 9:return r[1];case 10:return r[1];default:e=1}return e?Jr(x,x[2]):t},w2=function(x,r,e){return[0,x[1],x[2],x[3],x[4],x[5],[0,[0,r,e],x[6]],x[7]]},sV=function(x,r,e){return w2(x,r,[24,gy(e)])},sO=function(x,r,e,t){return w2(x,r,[25,e,t])},dt=function(x,r){return w2(x,r,ks0)},K2=function(x,r){var e=r[3],t=[0,jJ(x)+1|0,e];return[0,x[1],x[2],t,x[4],x[5],x[6],x[7]]},Kt=function(x,r,e,t,u){var i=[0,x[1],r,e],f=X1(t),o=u?0:1;return[0,i,[0,o,f,x[7][3][1]>>0)var a=_(t);else switch(o){case 0:var a=2;break;case 1:for(;;){r0(t,3);var d=m(t),k=-1>>0)return Nx(vs0);switch(a){case 0:var A=vV(i,e,t,2,0),N=A[1],R=vt(Qx(as0,A[2])),I=0<=R?1:0,M=I&&(R<=55295?1:0);if(M)var z=M;else var L=57344<=R?1:0,z=L&&(R<=_5?1:0);var V=z?oV(i,N,R):w2(i,N,32);is(u,R);var i=V;continue;case 1:var Z=vV(i,e,t,3,1),$=Z[1],i0=vt(Qx(ls0,Z[2])),U=oV(i,$,i0);is(u,i0);var i=U;continue;case 2:return[0,i,X1(u)];default:wy(t,u);continue}}},N1=function(x,r,e){var t=dt(x,Jr(x,r));return Ga(r),p(e,t,r)},Kv=function(x,r,e){for(var t=x;;){yr(e);var u=m(e),i=-1>>0)var f=_(e);else switch(i){case 0:for(;;){r0(e,3);var o=m(e),a=-1>>0){var T=dt(t,Jr(t,e));return[0,T,de(T,e)]}switch(f){case 0:var g=K2(t,e);wy(e,r);var t=g;continue;case 1:var A=t[4]?sO(t,Jr(t,e),en0,rn0):t;return[0,A,de(A,e)];case 2:if(t[4])return[0,t,de(t,e)];vr(r,tn0);continue;default:wy(e,r);continue}}},t3=function(x,r,e){for(;;){yr(e);var t=m(e),u=13>>0)var i=_(e);else switch(u){case 0:var i=0;break;case 1:for(;;){r0(e,2);var f=m(e),o=-1>>0)return Nx(nn0);switch(i){case 0:return[0,x,de(x,e)];case 1:var a=de(x,e),d=a[2],k=a[1],T=K2(x,e);return[0,T,[0,k,d-_y(e)|0]];default:wy(e,r);continue}}},lV=function(x,r){function e($){return r0($,3),z2(m($))===0?2:_($)}yr(r);var t=m(r),u=Lf>>0)var i=_(r);else switch(u){case 0:var i=0;break;case 1:var i=16;break;case 2:var i=15;break;case 3:r0(r,15);var i=pe(m(r))===0?15:_(r);break;case 4:r0(r,4);var i=z2(m(r))===0?e(r):_(r);break;case 5:r0(r,11);var i=z2(m(r))===0?e(r):_(r);break;case 6:var i=0;break;case 7:var i=5;break;case 8:var i=6;break;case 9:var i=7;break;case 10:var i=8;break;case 11:var i=9;break;case 12:r0(r,14);var f=Vv(m(r));if(f===0)var i=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?12:_(r);else if(f===1&&Pr(m(r))===0)for(;;){var o=Jv(m(r));if(o!==0){var i=o===1?13:_(r);break}}else var i=_(r);break;case 13:var i=10;break;default:r0(r,14);var i=Pr(m(r))===0&&Pr(m(r))===0?1:_(r)}if(16>>0)return Nx(qc0);switch(i){case 0:var a=Jx(r);return[0,x,a,t1(r),0];case 1:var d=Jx(r);return[0,x,d,[0,vt(Qx(Gc0,d))],0];case 2:var k=Jx(r),T=vt(Qx(bc0,k));return q3<=T?[0,x,k,[0,T>>>3|0,48+(T&7)|0],1]:[0,x,k,[0,T],1];case 3:var g=Jx(r);return[0,x,g,[0,vt(Qx(xs0,g))],1];case 4:return[0,x,rs0,[0,0],0];case 5:return[0,x,es0,[0,8],0];case 6:return[0,x,ts0,[0,12],0];case 7:return[0,x,ns0,[0,10],0];case 8:return[0,x,us0,[0,13],0];case 9:return[0,x,is0,[0,9],0];case 10:return[0,x,fs0,[0,11],0];case 11:var A=Jx(r);return[0,x,A,[0,vt(Qx(cs0,A))],1];case 12:var N=Jx(r);return[0,x,N,[0,vt(Qx(ss0,k2(N,1,Xx(N)-1|0)))],0];case 13:var R=Jx(r),I=vt(Qx(os0,k2(R,2,Xx(R)-3|0))),M=_5>>0)var k=_(i);else switch(d){case 0:var k=3;break;case 1:for(;;){r0(i,4);var T=m(i),g=-1>>0)return Nx(un0);switch(k){case 0:var A=Jx(i);if(vr(t,A),Ar(r,A))return[0,f,de(f,i),o];vr(e,A);continue;case 1:vr(t,in0);var N=lV(f,i),R=N[4],I=N[3],M=N[2],L=N[1],z=R||o;vr(t,M),kX(function(f0){return is(e,f0)},I);var f=L,o=z;continue;case 2:var V=Jx(i);vr(t,V);var Z=K2(dt(f,Jr(f,i)),i);return vr(e,V),[0,Z,de(Z,i),o];case 3:var $=Jx(i);vr(t,$);var i0=dt(f,Jr(f,i));return vr(e,$),[0,i0,de(i0,i),o];default:var U=i[6],J=i[3]-U|0,Y=S1(J*4|0),F=ql(i[1],U,J,Y);kI(t,Y,0,F),kI(e,Y,0,F);continue}}},dV=function(x,r,e,t){for(var u=x;;){yr(t);var i=m(t),f=96>>0)var o=_(t);else switch(f){case 0:var o=0;break;case 1:for(;;){r0(t,6);var a=m(t),d=-1>>0)return Nx(fn0);switch(o){case 0:return[0,dt(u,Jr(u,t)),1];case 1:return[0,u,1];case 2:return[0,u,0];case 3:lt(e,92);var g=lV(u,t),A=g[3],N=g[1];vr(e,g[2]),kX(function(M){return is(r,M)},A);var u=N;continue;case 4:vr(e,cn0),vr(r,sn0);var u=K2(u,t);continue;case 5:vr(e,Jx(t)),lt(r,10);var u=K2(u,t);continue;default:var R=Jx(t);vr(e,R),vr(r,R);continue}}},ES0=function(x,r){function e(w){for(;;)if(r0(w,33),ar(m(w))!==0)return _(w)}function t(w){r0(w,32);var x0=D1(m(w));if(x0!==0)return x0===1?e(w):_(w);for(;;)if(r0(w,30),ar(m(w))!==0)return _(w)}function u(w){r0(w,31);var x0=D1(m(w));if(x0!==0)return x0===1?e(w):_(w);for(;;)if(r0(w,29),ar(m(w))!==0)return _(w)}function i(w){r0(w,34);var x0=x3(m(w));if(2>>0)return _(w);switch(x0){case 0:return e(w);case 1:for(;;){r0(w,34);var e0=os(m(w));if(3>>0)return _(w);switch(e0){case 0:return e(w);case 1:continue;case 2:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var S0=os(m(w));if(3>>0)return _(w);switch(S0){case 0:return e(w);case 1:continue;case 2:continue x;default:return u(w)}}}default:return u(w)}}default:return u(w)}}function f(w){x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var x0=GJ(m(w));if(4>>0)return _(w);switch(x0){case 0:return e(w);case 1:return i(w);case 2:continue;case 3:continue x;default:return t(w)}}}}function o(w){for(;;)if(r0(w,23),ar(m(w))!==0)return _(w)}function a(w){for(;;)if(r0(w,23),ar(m(w))!==0)return _(w)}function d(w){for(;;)if(r0(w,15),ar(m(w))!==0)return _(w)}function k(w){for(;;)if(r0(w,15),ar(m(w))!==0)return _(w)}function T(w){for(;;)if(r0(w,11),ar(m(w))!==0)return _(w)}function g(w){for(;;)if(r0(w,11),ar(m(w))!==0)return _(w)}function A(w){for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}function N(w){for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}function R(w){for(;;)if(r0(w,19),ar(m(w))!==0)return _(w)}function I(w){for(;;)if(r0(w,27),ar(m(w))!==0)return _(w)}function M(w){r0(w,26);var x0=D1(m(w));if(x0!==0)return x0===1?I(w):_(w);for(;;)if(r0(w,25),ar(m(w))!==0)return _(w)}function L(w){for(;;)if(r0(w,27),ar(m(w))!==0)return _(w)}function z(w){r0(w,26);var x0=D1(m(w));if(x0!==0)return x0===1?L(w):_(w);for(;;)if(r0(w,25),ar(m(w))!==0)return _(w)}function V(w){x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,28);var x0=os(m(w));if(3>>0)return _(w);switch(x0){case 0:return L(w);case 1:continue;case 2:continue x;default:return z(w)}}}}function Z(w){r0(w,33);var x0=xV(m(w));if(3>>0)return _(w);switch(x0){case 0:return e(w);case 1:var e0=jo(m(w));if(e0===0)for(;;){r0(w,28);var S0=x3(m(w));if(2>>0)return _(w);switch(S0){case 0:return L(w);case 1:continue;default:return z(w)}}if(e0!==1)return _(w);for(;;){r0(w,28);var G=os(m(w));if(3>>0)return _(w);switch(G){case 0:return L(w);case 1:continue;case 2:return V(w);default:return z(w)}}case 2:for(;;){r0(w,28);var k0=x3(m(w));if(2>>0)return _(w);switch(k0){case 0:return I(w);case 1:continue;default:return M(w)}}default:for(;;){r0(w,28);var J0=os(m(w));if(3>>0)return _(w);switch(J0){case 0:return I(w);case 1:continue;case 2:return V(w);default:return M(w)}}}}function $(w){r0(w,34);var x0=KJ(m(w));if(3>>0)return _(w);switch(x0){case 0:return e(w);case 1:for(;;){r0(w,34);var e0=Uo(m(w));if(4>>0)return _(w);switch(e0){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var S0=Uo(m(w));if(4>>0)return _(w);switch(S0){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:continue x;default:return u(w)}}}default:return u(w)}}case 2:return Z(w);default:return u(w)}}function i0(w){return zy(m(w))===0&&Yy(m(w))===0&&eV(m(w))===0&&WJ(m(w))===0&&$J(m(w))===0&&By(m(w))===0&&e6(m(w))===0&&zy(m(w))===0&&Xo(m(w))===0&&cO(m(w))===0&&zv(m(w))===0?3:_(w)}function U(w){return r0(w,3),uV(m(w))===0?3:_(w)}function J(w){var x0=wS0(m(w));if(36>>0)return _(w);switch(x0){case 0:return 98;case 1:return 99;case 2:if(r0(w,1),cs(m(w))!==0)return _(w);for(;;)if(r0(w,1),cs(m(w))!==0)return _(w);case 3:return 0;case 4:return r0(w,0),pe(m(w))===0?0:_(w);case 5:return r0(w,88),Tn(m(w))===0?(r0(w,58),Tn(m(w))===0?54:_(w)):_(w);case 6:return 7;case 7:r0(w,95);var e0=m(w),S0=32>>0)return _(w);switch(J0){case 0:return r0(w,83),Tn(m(w))===0?70:_(w);case 1:return 4;default:return 69}case 14:r0(w,80);var O0=m(w),ix=42>>0)return _(w);switch($x){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var er=Uo(m(w));if(4>>0)return _(w);switch(er){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:continue x;default:return u(w)}}}default:return u(w)}}case 18:r0(w,93);var Zx=ZJ(m(w));if(2>>0)return _(w);switch(Zx){case 0:r0(w,2);var Lr=Oy(m(w));if(2>>0)return _(w);switch(Lr){case 0:for(;;){var Yx=Oy(m(w));if(2>>0)return _(w);switch(Yx){case 0:continue;case 1:return U(w);default:return i0(w)}}case 1:return U(w);default:return i0(w)}case 1:return 5;default:return 92}case 19:r0(w,34);var ie=FJ(m(w));if(8>>0)return _(w);switch(ie){case 0:return e(w);case 1:return $(w);case 2:for(;;){r0(w,20);var Ft=rV(m(w));if(4>>0)return _(w);switch(Ft){case 0:return R(w);case 1:return i(w);case 2:continue;case 3:for(;;){r0(w,18);var E2=Iy(m(w));if(3>>0)return _(w);switch(E2){case 0:return N(w);case 1:return i(w);case 2:continue;default:r0(w,17);var We=D1(m(w));if(We!==0)return We===1?N(w):_(w);for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}}default:r0(w,19);var fo=D1(m(w));if(fo!==0)return fo===1?R(w):_(w);for(;;)if(r0(w,19),ar(m(w))!==0)return _(w)}}case 3:for(;;){r0(w,18);var gn=Iy(m(w));if(3>>0)return _(w);switch(gn){case 0:return A(w);case 1:return i(w);case 2:continue;default:r0(w,17);var ds=D1(m(w));if(ds!==0)return ds===1?A(w):_(w);for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}}case 4:r0(w,33);var me=QJ(m(w));if(me===0)return e(w);if(me!==1)return _(w);for(;;){r0(w,12);var An=$y(m(w));if(3>>0)return _(w);switch(An){case 0:return g(w);case 1:continue;case 2:x:for(;;){if(ss(m(w))!==0)return _(w);for(;;){r0(w,12);var Ht=$y(m(w));if(3>>0)return _(w);switch(Ht){case 0:return T(w);case 1:continue;case 2:continue x;default:r0(w,10);var $e=D1(m(w));if($e!==0)return $e===1?T(w):_(w);for(;;)if(r0(w,9),ar(m(w))!==0)return _(w)}}}default:r0(w,10);var qt=D1(m(w));if(qt!==0)return qt===1?g(w):_(w);for(;;)if(r0(w,9),ar(m(w))!==0)return _(w)}}case 5:return Z(w);case 6:r0(w,33);var dr=HJ(m(w));if(dr===0)return e(w);if(dr!==1)return _(w);for(;;){r0(w,16);var mt=Zy(m(w));if(3>>0)return _(w);switch(mt){case 0:return k(w);case 1:continue;case 2:x:for(;;){if(z2(m(w))!==0)return _(w);for(;;){r0(w,16);var Qo=Zy(m(w));if(3>>0)return _(w);switch(Qo){case 0:return d(w);case 1:continue;case 2:continue x;default:r0(w,14);var ke=D1(m(w));if(ke!==0)return ke===1?d(w):_(w);for(;;)if(r0(w,13),ar(m(w))!==0)return _(w)}}}default:r0(w,14);var Pn=D1(m(w));if(Pn!==0)return Pn===1?k(w):_(w);for(;;)if(r0(w,13),ar(m(w))!==0)return _(w)}}case 7:r0(w,33);var co=JJ(m(w));if(co===0)return e(w);if(co!==1)return _(w);for(;;){r0(w,24);var Fo=Qy(m(w));if(3>>0)return _(w);switch(Fo){case 0:return a(w);case 1:continue;case 2:x:for(;;){if(Pr(m(w))!==0)return _(w);for(;;){r0(w,24);var so=Qy(m(w));if(3>>0)return _(w);switch(so){case 0:return o(w);case 1:continue;case 2:continue x;default:r0(w,22);var oo=D1(m(w));if(oo!==0)return oo===1?o(w):_(w);for(;;)if(r0(w,21),ar(m(w))!==0)return _(w)}}}default:r0(w,22);var l2=D1(m(w));if(l2!==0)return l2===1?a(w):_(w);for(;;)if(r0(w,21),ar(m(w))!==0)return _(w)}}default:return t(w)}case 20:r0(w,34);var ys=My(m(w));if(5>>0)return _(w);switch(ys){case 0:return e(w);case 1:return $(w);case 2:for(;;){r0(w,34);var he=My(m(w));if(5>>0)return _(w);switch(he){case 0:return e(w);case 1:return $(w);case 2:continue;case 3:return Z(w);case 4:return f(w);default:return t(w)}}case 3:return Z(w);case 4:return f(w);default:return t(w)}case 21:return 46;case 22:return 44;case 23:r0(w,78);var Cn=m(w),Ho=59>>0)return Nx($c0);var F=Y;if(50>F)switch(F){case 0:return[2,K2(x,r)];case 1:return[2,x];case 2:var n0=_2(x,r),Q=Qr(Xr),f0=Kv(x,Q,r),s0=f0[1];return[1,s0,Kt(s0,n0,f0[2],Q,1)];case 3:var v0=Jx(r);if(!x[5]){var o0=_2(x,r),c0=Qr(Xr);vr(c0,k2(v0,2,Xx(v0)-2|0));var T0=Kv(x,c0,r),E0=T0[1];return[1,E0,Kt(E0,o0,T0[2],c0,1)]}var M0=x[4]?sV(x,Jr(x,r),v0):x,Y0=Ey(1,M0),rx=_y(r);return Ar(Gl(r,rx-1|0,1),Ov)&&P(Gl(r,rx-2|0,1),Ov)?[0,Y0,86]:[2,Y0];case 4:if(x[4])return[2,Ey(0,x)];Ga(r),yr(r);var g0=zJ(m(r))===0?0:_(r);return g0===0?[0,x,c2]:Nx(Qc0);case 5:var H0=_2(x,r),t0=Qr(Xr),ex=t3(x,t0,r),xx=ex[1];return[1,xx,Kt(xx,H0,ex[2],t0,0)];case 6:if(r[6]!==0)return[0,x,Fc0];var ax=_2(x,r),dx=Qr(Xr),mx=t3(x,dx,r),L0=mx[1],C0=[0,L0[1],ax,mx[2]];return[0,L0,[6,C0,X1(dx)]];case 7:var A0=Jx(r),U0=_2(x,r),Q0=Qr(Xr),H=Qr(Xr);vr(H,A0);var b=pV(x,A0,Q0,H,0,r),B=b[1],a0=b[3],m0=[0,B[1],U0,b[2]],P0=X1(H);return[0,B,[2,[0,m0,X1(Q0),P0,a0]]];case 8:var D=Qr(Xr),N0=Qr(Xr),X0=_2(x,r),D0=dV(x,D,N0,r),ox=D0[1],b0=D0[2],kx=de(ox,r),V0=[0,ox[1],X0,kx],h=X1(N0);return[0,ox,[3,[0,V0,X1(D),h,1,b0]]];case 9:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&jy(m(x0))===0&&ss(m(x0))===0)for(;;){var e0=Ny(m(x0));if(2>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(ss(m(x0))===0)for(;;){var S0=Ny(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,0,Jx(x0)]]:Nx(Wc0)});case 10:return[0,x,[1,0,Jx(r)]];case 11:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&jy(m(x0))===0&&ss(m(x0))===0)for(;;){r0(x0,0);var e0=Cy(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(ss(m(x0))===0)for(;;){r0(x0,0);var S0=Cy(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,0,Jx(x0)]]:Nx(Zc0)});case 12:return[0,x,[0,0,Jx(r)]];case 13:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&Jy(m(x0))===0&&z2(m(x0))===0)for(;;){var e0=Dy(m(x0));if(2>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(z2(m(x0))===0)for(;;){var S0=Dy(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,1,Jx(x0)]]:Nx(Kc0)});case 14:return[0,x,[1,1,Jx(r)]];case 15:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&Jy(m(x0))===0&&z2(m(x0))===0)for(;;){r0(x0,0);var e0=Ly(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(z2(m(x0))===0)for(;;){r0(x0,0);var S0=Ly(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,3,Jx(x0)]]:Nx(zc0)});case 16:return[0,x,[0,3,Jx(r)]];case 17:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0)for(;;){var e0=m(x0),S0=47>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(Pr(m(x0))===0)for(;;){var S0=Ry(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,2,Jx(x0)]]:Nx(Xc0)});case 22:return[0,x,[1,2,Jx(r)]];case 23:return N1(x,r,function(w,x0){if(yr(x0),le(m(x0))===0&&Ay(m(x0))===0&&Pr(m(x0))===0)for(;;){r0(x0,0);var e0=Ky(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(Pr(m(x0))===0)for(;;){r0(x0,0);var S0=Ky(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,4,Jx(x0)]]:Nx(Yc0)});case 24:return[0,x,[0,4,Jx(r)]];case 25:return N1(x,r,function(w,x0){function e0(Zx){for(;;){var Lr=Vt(m(Zx));if(2>>0)return _(Zx);switch(Lr){case 0:continue;case 1:x:for(;;){if(mr(m(Zx))!==0)return _(Zx);for(;;){var Yx=Vt(m(Zx));if(2>>0)return _(Zx);switch(Yx){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function S0(Zx){for(;;){var Lr=r3(m(Zx));if(Lr!==0)return Lr===1?0:_(Zx)}}function G(Zx){var Lr=Fy(m(Zx));if(2>>0)return _(Zx);switch(Lr){case 0:var Yx=jo(m(Zx));return Yx===0?S0(Zx):Yx===1?e0(Zx):_(Zx);case 1:return S0(Zx);default:return e0(Zx)}}function k0(Zx){var Lr=Vy(m(Zx));if(Lr!==0)return Lr===1?G(Zx):_(Zx);for(;;){var Yx=ne(m(Zx));if(2>>0)return _(Zx);switch(Yx){case 0:continue;case 1:return G(Zx);default:x:for(;;){if(mr(m(Zx))!==0)return _(Zx);for(;;){var ie=ne(m(Zx));if(2>>0)return _(Zx);switch(ie){case 0:continue;case 1:return G(Zx);default:continue x}}}}}}yr(x0);var J0=Do(m(x0));if(2>>0)var O0=_(x0);else switch(J0){case 0:if(mr(m(x0))===0)for(;;){var ix=ne(m(x0));if(2>>0)var O0=_(x0);else switch(ix){case 0:continue;case 1:var O0=G(x0);break;default:x:for(;;){if(mr(m(x0))===0)for(;;){var Wx=ne(m(x0));if(2>>0)var Bx=_(x0);else switch(Wx){case 0:continue;case 1:var Bx=G(x0);break;default:continue x}break}else var Bx=_(x0);var O0=Bx;break}}break}else var O0=_(x0);break;case 1:var Hx=Py(m(x0)),O0=Hx===0?k0(x0):Hx===1?G(x0):_(x0);break;default:for(;;){var $x=Xy(m(x0));if(2<$x>>>0)var O0=_(x0);else switch($x){case 0:var O0=k0(x0);break;case 1:continue;default:var O0=G(x0)}break}}if(O0!==0)return Nx(Bc0);var er=w2(w,Jr(w,x0),48);return[0,er,[1,2,Jx(x0)]]});case 26:var X=w2(x,Jr(x,r),48);return[0,X,[1,2,Jx(r)]];case 27:return N1(x,r,function(w,x0){function e0(er){for(;;){r0(er,0);var Zx=Bo(m(er));if(Zx!==0){if(Zx!==1)return _(er);x:for(;;){if(mr(m(er))!==0)return _(er);for(;;){r0(er,0);var Lr=Bo(m(er));if(Lr!==0){if(Lr===1)continue x;return _(er)}}}}}}function S0(er){for(;;)if(r0(er,0),mr(m(er))!==0)return _(er)}function G(er){var Zx=Fy(m(er));if(2>>0)return _(er);switch(Zx){case 0:var Lr=jo(m(er));return Lr===0?S0(er):Lr===1?e0(er):_(er);case 1:return S0(er);default:return e0(er)}}function k0(er){var Zx=Vy(m(er));if(Zx!==0)return Zx===1?G(er):_(er);for(;;){var Lr=ne(m(er));if(2>>0)return _(er);switch(Lr){case 0:continue;case 1:return G(er);default:x:for(;;){if(mr(m(er))!==0)return _(er);for(;;){var Yx=ne(m(er));if(2>>0)return _(er);switch(Yx){case 0:continue;case 1:return G(er);default:continue x}}}}}}yr(x0);var J0=Do(m(x0));if(2>>0)var O0=_(x0);else switch(J0){case 0:if(mr(m(x0))===0)for(;;){var ix=ne(m(x0));if(2>>0)var O0=_(x0);else switch(ix){case 0:continue;case 1:var O0=G(x0);break;default:x:for(;;){if(mr(m(x0))===0)for(;;){var Wx=ne(m(x0));if(2>>0)var Bx=_(x0);else switch(Wx){case 0:continue;case 1:var Bx=G(x0);break;default:continue x}break}else var Bx=_(x0);var O0=Bx;break}}break}else var O0=_(x0);break;case 1:var Hx=Py(m(x0)),O0=Hx===0?k0(x0):Hx===1?G(x0):_(x0);break;default:for(;;){var $x=Xy(m(x0));if(2<$x>>>0)var O0=_(x0);else switch($x){case 0:var O0=k0(x0);break;case 1:continue;default:var O0=G(x0)}break}}return O0===0?[0,w,[0,4,Jx(x0)]]:Nx(Uc0)});case 28:return[0,x,[0,4,Jx(r)]];case 29:return N1(x,r,function(w,x0){function e0(Hx){for(;;){var $x=Vt(m(Hx));if(2<$x>>>0)return _(Hx);switch($x){case 0:continue;case 1:x:for(;;){if(mr(m(Hx))!==0)return _(Hx);for(;;){var er=Vt(m(Hx));if(2>>0)return _(Hx);switch(er){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function S0(Hx){var $x=r3(m(Hx));return $x===0?e0(Hx):$x===1?0:_(Hx)}yr(x0);var G=Do(m(x0));if(2>>0)var k0=_(x0);else switch(G){case 0:var k0=mr(m(x0))===0?e0(x0):_(x0);break;case 1:for(;;){var J0=e3(m(x0));if(J0===0)var k0=S0(x0);else{if(J0===1)continue;var k0=_(x0)}break}break;default:for(;;){var O0=Yo(m(x0));if(2>>0)var k0=_(x0);else switch(O0){case 0:var k0=S0(x0);break;case 1:continue;default:x:for(;;){if(mr(m(x0))===0)for(;;){var ix=Yo(m(x0));if(2>>0)var Wx=_(x0);else switch(ix){case 0:var Wx=S0(x0);break;case 1:continue;default:continue x}break}else var Wx=_(x0);var k0=Wx;break}}break}}if(k0!==0)return Nx(jc0);var Bx=w2(w,Jr(w,x0),39);return[0,Bx,[1,2,Jx(x0)]]});case 30:return N1(x,r,function(w,x0){yr(x0);var e0=jo(m(x0));if(e0===0)for(;;){var S0=r3(m(x0));if(S0!==0){var O0=S0===1?0:_(x0);break}}else if(e0===1)for(;;){var G=Vt(m(x0));if(2>>0)var O0=_(x0);else switch(G){case 0:continue;case 1:x:for(;;){if(mr(m(x0))===0)for(;;){var k0=Vt(m(x0));if(2>>0)var J0=_(x0);else switch(k0){case 0:continue;case 1:continue x;default:var J0=0}break}else var J0=_(x0);var O0=J0;break}break;default:var O0=0}break}else var O0=_(x0);return O0===0?[0,w,[1,2,Jx(x0)]]:Nx(Dc0)});case 31:var W0=w2(x,Jr(x,r),39);return[0,W0,[1,2,Jx(r)]];case 32:return[0,x,[1,2,Jx(r)]];case 33:return N1(x,r,function(w,x0){function e0(Bx){for(;;){r0(Bx,0);var Hx=Bo(m(Bx));if(Hx!==0){if(Hx!==1)return _(Bx);x:for(;;){if(mr(m(Bx))!==0)return _(Bx);for(;;){r0(Bx,0);var $x=Bo(m(Bx));if($x!==0){if($x===1)continue x;return _(Bx)}}}}}}function S0(Bx){return r0(Bx,0),mr(m(Bx))===0?e0(Bx):_(Bx)}yr(x0);var G=Do(m(x0));if(2>>0)var k0=_(x0);else switch(G){case 0:var k0=mr(m(x0))===0?e0(x0):_(x0);break;case 1:for(;;){r0(x0,0);var J0=e3(m(x0));if(J0===0)var k0=S0(x0);else{if(J0===1)continue;var k0=_(x0)}break}break;default:for(;;){r0(x0,0);var O0=Yo(m(x0));if(2>>0)var k0=_(x0);else switch(O0){case 0:var k0=S0(x0);break;case 1:continue;default:x:for(;;){if(mr(m(x0))===0)for(;;){r0(x0,0);var ix=Yo(m(x0));if(2>>0)var Wx=_(x0);else switch(ix){case 0:var Wx=S0(x0);break;case 1:continue;default:continue x}break}else var Wx=_(x0);var k0=Wx;break}}break}}return k0===0?[0,w,[0,4,Jx(x0)]]:Nx(Mc0)});case 34:return[0,x,[0,4,Jx(r)]];case 35:var sx=Jr(x,r),tx=Jx(r);return[0,x,[4,sx,tx,tx]];case 36:return[0,x,0];case 37:return[0,x,1];case 38:return[0,x,4];case 39:return[0,x,5];case 40:return[0,x,6];case 41:return[0,x,7];case 42:return[0,x,12];case 43:return[0,x,10];case 44:return[0,x,8];case 45:return[0,x,9];case 46:return[0,x,86];case 47:Ga(r),yr(r);var j0=m(r),Px=62=rr)return[0,x,18];var Ux=Tx(B0,Oa);if(0<=Ux){if(0>=Ux)return[0,x,51];var K0=Tx(B0,Ps);if(0<=K0){if(0>=K0)return[0,x,46];if(!P(B0,dl))return[0,x,24];if(!P(B0,Os))return[0,x,47];if(!P(B0,Qp))return[0,x,25];if(!P(B0,Tp))return[0,x,26];if(!P(B0,Y2))return[0,x,58]}else{if(!P(B0,Ye))return[0,x,20];if(!P(B0,lv))return[0,x,21];if(!P(B0,Be))return[0,x,22];if(!P(B0,Cs))return[0,x,31];if(!P(B0,yd))return[0,x,23];if(!P(B0,fi))return[0,x,61]}}else{var nr=Tx(B0,u8);if(0<=nr){if(0>=nr)return[0,x,54];if(!P(B0,El))return[0,x,55];if(!P(B0,H3))return[0,x,56];if(!P(B0,z3))return[0,x,57];if(!P(B0,De))return[0,x,19];if(!P(B0,je))return[0,x,42]}else{if(!P(B0,b2))return[0,x,53];if(!P(B0,ka))return[0,x,28];if(!P(B0,av))return[0,x,44];if(!P(B0,_v))return[0,x,29];if(!P(B0,Hh))return[0,x,63];if(!P(B0,Xh))return[0,x,62]}}}else{var z0=Tx(B0,ed);if(0<=z0){if(0>=z0)return[0,x,37];var or=Tx(B0,N8);if(0<=or){if(0>=or)return[0,x,39];if(!P(B0,ya))return[0,x,15];if(!P(B0,s8))return[0,x,16];if(!P(B0,Tv))return[0,x,52];if(!P(B0,j2))return[0,x,50];if(!P(B0,Po))return[0,x,17]}else{if(!P(B0,Kp))return[0,x,43];if(!P(B0,pl))return[0,x,48];if(!P(B0,p8))return[0,x,49];if(!P(B0,Bc))return[0,x,41];if(!P(B0,Is))return[0,x,30];if(!P(B0,Yp))return[0,x,38]}}else{var jr=Tx(B0,ol);if(0<=jr){if(0>=jr)return[0,x,27];if(!P(B0,Ie))return[0,x,35];if(!P(B0,Oe))return[0,x,59];if(!P(B0,tl))return[0,x,60];if(!P(B0,pv))return[0,x,36];if(!P(B0,sl))return[0,x,45]}else{if(!P(B0,Co))return[0,x,64];if(!P(B0,Pv))return[0,x,65];if(!P(B0,Me))return[0,x,32];if(!P(B0,bp))return[0,x,33];if(!P(B0,t5))return[0,x,34];if(!P(B0,$3))return[0,x,40]}}}var lx=t1(r),v1=aV(x,lx),K1=v1[2],w1=v1[1];return[0,w1,[4,qx,K1,bl(lx)]];case 98:var Cr=x[4]?w2(x,Jr(x,r),96):x;return[0,Cr,Nr];default:var u2=dt(x,Jr(x,r));return[0,u2,[7,Jx(r)]]}},gS0=function(x,r,e){var t=x;x:for(;;){yr(e);var u=m(e),i=92>>0)var f=_(e);else switch(i){case 0:var f=0;break;case 1:for(;;){r0(e,7);var o=m(e),a=-1>>0)var f=_(e);else switch(k){case 0:var f=2;break;case 1:var f=1;break;default:r0(e,1);var f=pe(m(e))===0?1:_(e)}}if(7>>0)return Nx(an0);switch(f){case 0:return[0,w2(t,Jr(t,e),st),ln0];case 1:return[0,K2(w2(t,Jr(t,e),st),e),pn0];case 2:vr(r,Jx(e));continue;case 3:var T=Jx(e);return[0,t,k2(T,1,Xx(T)-1|0)];case 4:return[0,t,dn0];case 5:for(lt(r,91);;){yr(e);var g=m(e),A=93>>0)var N=_(e);else switch(A){case 0:var N=0;break;case 1:for(;;){r0(e,5);var R=m(e),I=-1>>0)var z=Nx(on0);else switch(N){case 0:var z=t;break;case 1:vr(r,vn0);continue;case 2:lt(r,92),lt(r,93);continue;case 3:lt(r,93);var z=t;break;case 4:var z=K2(w2(t,Jr(t,e),st),e);break;default:vr(r,Jx(e));continue}var t=z;continue x}case 6:return[0,K2(w2(t,Jr(t,e),st),e),yn0];default:vr(r,Jx(e));continue}}},AS0=function(x,r){yr(r);var e=m(r),t=Rv>>0)var u=_(r);else switch(t){case 0:var u=0;break;case 1:var u=6;break;case 2:if(r0(r,2),cs(m(r))===0){for(;;)if(r0(r,2),cs(m(r))!==0){var u=_(r);break}}else var u=_(r);break;case 3:var u=1;break;case 4:r0(r,1);var u=pe(m(r))===0?1:_(r);break;default:r0(r,5);var i=Wy(m(r)),u=i===0?4:i===1?3:_(r)}if(6>>0)return Nx(Lc0);switch(u){case 0:return[0,x,Nr];case 1:return[2,K2(x,r)];case 2:return[2,x];case 3:var f=_2(x,r),o=Qr(Xr),a=t3(x,o,r),d=a[1];return[1,d,Kt(d,f,a[2],o,0)];case 4:var k=_2(x,r),T=Qr(Xr),g=Kv(x,T,r),A=g[1];return[1,A,Kt(A,k,g[2],T,1)];case 5:var N=_2(x,r),R=Qr(Xr),I=gS0(x,R,r),M=I[1],L=I[2],z=de(M,r),V=[0,M[1],N,z];return[0,M,[5,V,X1(R),L]];default:var Z=dt(x,Jr(x,r));return[0,Z,[7,Jx(r)]]}},yV=function(x){var r=Tx(x,"iexcl");if(0<=r){if(0>=r)return Oc0;var e=Tx(x,"prime");if(0<=e){if(0>=e)return Ic0;var t=Tx(x,"sup1");if(0<=t){if(0>=t)return Rc0;var u=Tx(x,"uarr");if(0<=u){if(0>=u)return Nc0;var i=Tx(x,"xi");if(0<=i){if(0>=i)return Cc0;if(!P(x,"yacute"))return Pc0;if(!P(x,"yen"))return Ac0;if(!P(x,"yuml"))return gc0;if(!P(x,"zeta"))return Ec0;if(!P(x,"zwj"))return Sc0;if(!P(x,"zwnj"))return Tc0}else{if(!P(x,"ucirc"))return wc0;if(!P(x,"ugrave"))return _c0;if(!P(x,"uml"))return hc0;if(!P(x,"upsih"))return kc0;if(!P(x,"upsilon"))return mc0;if(!P(x,"uuml"))return yc0;if(!P(x,"weierp"))return dc0}}else{var f=Tx(x,"thetasym");if(0<=f){if(0>=f)return pc0;if(!P(x,"thinsp"))return lc0;if(!P(x,"thorn"))return ac0;if(!P(x,"tilde"))return vc0;if(!P(x,"times"))return oc0;if(!P(x,"trade"))return sc0;if(!P(x,"uArr"))return cc0;if(!P(x,"uacute"))return fc0}else{if(!P(x,"sup2"))return ic0;if(!P(x,"sup3"))return uc0;if(!P(x,"supe"))return nc0;if(!P(x,"szlig"))return tc0;if(!P(x,"tau"))return ec0;if(!P(x,"there4"))return rc0;if(!P(x,"theta"))return xc0}}}else{var o=Tx(x,"rlm");if(0<=o){if(0>=o)return bf0;var a=Tx(x,"sigma");if(0<=a){if(0>=a)return Gf0;if(!P(x,"sigmaf"))return qf0;if(!P(x,"sim"))return Hf0;if(!P(x,"spades"))return Ff0;if(!P(x,"sub"))return Qf0;if(!P(x,"sube"))return $f0;if(!P(x,"sum"))return Wf0;if(!P(x,"sup"))return Zf0}else{if(!P(x,"rsaquo"))return Kf0;if(!P(x,"rsquo"))return zf0;if(!P(x,"sbquo"))return Vf0;if(!P(x,"scaron"))return Jf0;if(!P(x,"sdot"))return Xf0;if(!P(x,"sect"))return Yf0;if(!P(x,"shy"))return Bf0}}else{var d=Tx(x,"raquo");if(0<=d){if(0>=d)return Uf0;if(!P(x,"rarr"))return jf0;if(!P(x,"rceil"))return Df0;if(!P(x,"rdquo"))return Mf0;if(!P(x,"real"))return Lf0;if(!P(x,"reg"))return Of0;if(!P(x,"rfloor"))return If0;if(!P(x,"rho"))return Rf0}else{if(!P(x,"prod"))return Nf0;if(!P(x,"prop"))return Cf0;if(!P(x,"psi"))return Pf0;if(!P(x,"quot"))return Af0;if(!P(x,"rArr"))return gf0;if(!P(x,"radic"))return Ef0;if(!P(x,"rang"))return Sf0}}}}else{var k=Tx(x,"ndash");if(0<=k){if(0>=k)return Tf0;var T=Tx(x,"or");if(0<=T){if(0>=T)return wf0;var g=Tx(x,"part");if(0<=g){if(0>=g)return _f0;if(!P(x,"permil"))return hf0;if(!P(x,"perp"))return kf0;if(!P(x,"phi"))return mf0;if(!P(x,"pi"))return yf0;if(!P(x,"piv"))return df0;if(!P(x,"plusmn"))return pf0;if(!P(x,"pound"))return lf0}else{if(!P(x,"ordf"))return af0;if(!P(x,"ordm"))return vf0;if(!P(x,"oslash"))return of0;if(!P(x,"otilde"))return sf0;if(!P(x,"otimes"))return cf0;if(!P(x,"ouml"))return ff0;if(!P(x,"para"))return if0}}else{var A=Tx(x,"oacute");if(0<=A){if(0>=A)return uf0;if(!P(x,"ocirc"))return nf0;if(!P(x,"oelig"))return tf0;if(!P(x,"ograve"))return ef0;if(!P(x,"oline"))return rf0;if(!P(x,"omega"))return xf0;if(!P(x,"omicron"))return bi0;if(!P(x,"oplus"))return Gi0}else{if(!P(x,"ne"))return qi0;if(!P(x,"ni"))return Hi0;if(!P(x,"not"))return Fi0;if(!P(x,"notin"))return Qi0;if(!P(x,"nsub"))return $i0;if(!P(x,"ntilde"))return Wi0;if(!P(x,"nu"))return Zi0}}}else{var N=Tx(x,"le");if(0<=N){if(0>=N)return Ki0;var R=Tx(x,"macr");if(0<=R){if(0>=R)return zi0;if(!P(x,"mdash"))return Vi0;if(!P(x,"micro"))return Ji0;if(!P(x,"middot"))return Xi0;if(!P(x,YD))return Yi0;if(!P(x,"mu"))return Bi0;if(!P(x,"nabla"))return Ui0;if(!P(x,"nbsp"))return ji0}else{if(!P(x,"lfloor"))return Di0;if(!P(x,"lowast"))return Mi0;if(!P(x,"loz"))return Li0;if(!P(x,"lrm"))return Oi0;if(!P(x,"lsaquo"))return Ii0;if(!P(x,"lsquo"))return Ri0;if(!P(x,"lt"))return Ni0}}else{var I=Tx(x,"kappa");if(0<=I){if(0>=I)return Ci0;if(!P(x,"lArr"))return Pi0;if(!P(x,"lambda"))return Ai0;if(!P(x,"lang"))return gi0;if(!P(x,"laquo"))return Ei0;if(!P(x,"larr"))return Si0;if(!P(x,"lceil"))return Ti0;if(!P(x,"ldquo"))return wi0}else{if(!P(x,"igrave"))return _i0;if(!P(x,"image"))return hi0;if(!P(x,"infin"))return ki0;if(!P(x,"iota"))return mi0;if(!P(x,"iquest"))return yi0;if(!P(x,"isin"))return di0;if(!P(x,"iuml"))return pi0}}}}}else{var M=Tx(x,"aelig");if(0<=M){if(0>=M)return li0;var L=Tx(x,"delta");if(0<=L){if(0>=L)return ai0;var z=Tx(x,"fnof");if(0<=z){if(0>=z)return vi0;var V=Tx(x,"gt");if(0<=V){if(0>=V)return oi0;if(!P(x,"hArr"))return si0;if(!P(x,"harr"))return ci0;if(!P(x,"hearts"))return fi0;if(!P(x,"hellip"))return ii0;if(!P(x,"iacute"))return ui0;if(!P(x,"icirc"))return ni0}else{if(!P(x,"forall"))return ti0;if(!P(x,"frac12"))return ei0;if(!P(x,"frac14"))return ri0;if(!P(x,"frac34"))return xi0;if(!P(x,"frasl"))return bu0;if(!P(x,"gamma"))return Gu0;if(!P(x,"ge"))return qu0}}else{var Z=Tx(x,"ensp");if(0<=Z){if(0>=Z)return Hu0;if(!P(x,"epsilon"))return Fu0;if(!P(x,"equiv"))return Qu0;if(!P(x,"eta"))return $u0;if(!P(x,"eth"))return Wu0;if(!P(x,"euml"))return Zu0;if(!P(x,"euro"))return Ku0;if(!P(x,"exist"))return zu0}else{if(!P(x,"diams"))return Vu0;if(!P(x,"divide"))return Ju0;if(!P(x,"eacute"))return Xu0;if(!P(x,"ecirc"))return Yu0;if(!P(x,"egrave"))return Bu0;if(!P(x,se))return Uu0;if(!P(x,"emsp"))return ju0}}}else{var $=Tx(x,"cap");if(0<=$){if(0>=$)return Du0;var i0=Tx(x,"copy");if(0<=i0){if(0>=i0)return Mu0;if(!P(x,"crarr"))return Lu0;if(!P(x,"cup"))return Ou0;if(!P(x,"curren"))return Iu0;if(!P(x,"dArr"))return Ru0;if(!P(x,"dagger"))return Nu0;if(!P(x,"darr"))return Cu0;if(!P(x,"deg"))return Pu0}else{if(!P(x,"ccedil"))return Au0;if(!P(x,"cedil"))return gu0;if(!P(x,"cent"))return Eu0;if(!P(x,"chi"))return Su0;if(!P(x,"circ"))return Tu0;if(!P(x,"clubs"))return wu0;if(!P(x,"cong"))return _u0}}else{var U=Tx(x,"aring");if(0<=U){if(0>=U)return hu0;if(!P(x,"asymp"))return ku0;if(!P(x,"atilde"))return mu0;if(!P(x,"auml"))return yu0;if(!P(x,"bdquo"))return du0;if(!P(x,"beta"))return pu0;if(!P(x,"brvbar"))return lu0;if(!P(x,"bull"))return au0}else{if(!P(x,"agrave"))return vu0;if(!P(x,"alefsym"))return ou0;if(!P(x,"alpha"))return su0;if(!P(x,"amp"))return cu0;if(!P(x,"and"))return fu0;if(!P(x,"ang"))return iu0;if(!P(x,"apos"))return uu0}}}}else{var J=Tx(x,"Nu");if(0<=J){if(0>=J)return nu0;var Y=Tx(x,"Sigma");if(0<=Y){if(0>=Y)return tu0;var F=Tx(x,"Uuml");if(0<=F){if(0>=F)return eu0;if(!P(x,"Xi"))return ru0;if(!P(x,"Yacute"))return xu0;if(!P(x,"Yuml"))return b70;if(!P(x,"Zeta"))return G70;if(!P(x,"aacute"))return q70;if(!P(x,"acirc"))return H70;if(!P(x,"acute"))return F70}else{if(!P(x,"THORN"))return Q70;if(!P(x,"Tau"))return $70;if(!P(x,"Theta"))return W70;if(!P(x,"Uacute"))return Z70;if(!P(x,"Ucirc"))return K70;if(!P(x,"Ugrave"))return z70;if(!P(x,"Upsilon"))return V70}}else{var n0=Tx(x,"Otilde");if(0<=n0){if(0>=n0)return J70;if(!P(x,"Ouml"))return X70;if(!P(x,"Phi"))return Y70;if(!P(x,"Pi"))return B70;if(!P(x,"Prime"))return U70;if(!P(x,"Psi"))return j70;if(!P(x,"Rho"))return D70;if(!P(x,"Scaron"))return M70}else{if(!P(x,"OElig"))return L70;if(!P(x,"Oacute"))return O70;if(!P(x,"Ocirc"))return I70;if(!P(x,"Ograve"))return R70;if(!P(x,"Omega"))return N70;if(!P(x,"Omicron"))return C70;if(!P(x,"Oslash"))return P70}}}else{var Q=Tx(x,"Eacute");if(0<=Q){if(0>=Q)return A70;var f0=Tx(x,"Icirc");if(0<=f0){if(0>=f0)return g70;if(!P(x,"Igrave"))return E70;if(!P(x,"Iota"))return S70;if(!P(x,"Iuml"))return T70;if(!P(x,"Kappa"))return w70;if(!P(x,"Lambda"))return _70;if(!P(x,"Mu"))return h70;if(!P(x,"Ntilde"))return k70}else{if(!P(x,"Ecirc"))return m70;if(!P(x,"Egrave"))return y70;if(!P(x,"Epsilon"))return d70;if(!P(x,"Eta"))return p70;if(!P(x,"Euml"))return l70;if(!P(x,"Gamma"))return a70;if(!P(x,"Iacute"))return v70}}else{var s0=Tx(x,"Atilde");if(0<=s0){if(0>=s0)return o70;if(!P(x,"Auml"))return s70;if(!P(x,"Beta"))return c70;if(!P(x,"Ccedil"))return f70;if(!P(x,"Chi"))return i70;if(!P(x,"Dagger"))return u70;if(!P(x,"Delta"))return n70;if(!P(x,"ETH"))return t70}else{if(!P(x,"'int'"))return e70;if(!P(x,"AElig"))return r70;if(!P(x,"Aacute"))return x70;if(!P(x,"Acirc"))return bn0;if(!P(x,"Agrave"))return Gn0;if(!P(x,"Alpha"))return qn0;if(!P(x,"Aring"))return Hn0}}}}}return 0},mV=function(x,r,e,t){for(var u=x;;){var i=function(n0){for(;;)if(r0(n0,8),uO(m(n0))!==0)return _(n0)};yr(t);var f=m(t),o=Di>>0)var a=_(t);else switch(o){case 0:var a=3;break;case 1:var a=i(t);break;case 2:var a=4;break;case 3:r0(t,4);var a=pe(m(t))===0?4:_(t);break;case 4:r0(t,8);var d=iV(m(t));if(d===0){var k=YJ(m(t));if(k===0)for(;;){var T=XJ(m(t));if(T!==0){var a=T===1?6:_(t);break}}else if(k===1&&Pr(m(t))===0)for(;;){var g=tV(m(t));if(g!==0){var a=g===1?5:_(t);break}}else var a=_(t)}else if(d===1&&ar(m(t))===0){var A=zt(m(t));if(A===0){var N=zt(m(t));if(N===0){var R=zt(m(t));if(R===0){var I=zt(m(t));if(I===0){var M=zt(m(t));if(M===0)var L=zt(m(t)),a=L===0?bJ(m(t))===0?7:_(t):L===1?7:_(t);else var a=M===1?7:_(t)}else var a=I===1?7:_(t)}else var a=R===1?7:_(t)}else var a=N===1?7:_(t)}else var a=A===1?7:_(t)}else var a=_(t);break;case 5:var a=0;break;case 6:r0(t,1);var a=uO(m(t))===0?i(t):_(t);break;default:r0(t,2);var a=uO(m(t))===0?i(t):_(t)}if(8>>0)return Nx(mn0);switch(a){case 0:return Ga(t),u;case 1:return sO(u,Jr(u,t),hn0,kn0);case 2:return sO(u,Jr(u,t),wn0,_n0);case 3:return dt(u,Jr(u,t));case 4:var z=Jx(t);vr(e,z),vr(r,z);var u=K2(u,t);continue;case 5:var V=Jx(t),Z=k2(V,3,Xx(V)-4|0);vr(e,V),is(r,vt(Qx(Tn0,Z)));continue;case 6:var $=Jx(t),i0=k2($,2,Xx($)-3|0);vr(e,$),is(r,vt(i0));continue;case 7:var U=Jx(t),J=k2(U,1,Xx(U)-2|0);vr(e,U);var Y=yV(J);Y?is(r,Y[1]):vr(r,Qx(En0,Qx(J,Sn0)));continue;default:var F=Jx(t);vr(e,F),vr(r,F);continue}}},PS0=function(x,r){yr(r);var e=SS0(m(r));if(14>>0)var t=_(r);else switch(e){case 0:var t=0;break;case 1:var t=14;break;case 2:if(r0(r,2),cs(m(r))===0){for(;;)if(r0(r,2),cs(m(r))!==0){var t=_(r);break}}else var t=_(r);break;case 3:var t=1;break;case 4:r0(r,1);var t=pe(m(r))===0?1:_(r);break;case 5:var t=12;break;case 6:var t=13;break;case 7:var t=10;break;case 8:r0(r,6);var u=Wy(m(r)),t=u===0?4:u===1?3:_(r);break;case 9:var t=9;break;case 10:var t=5;break;case 11:var t=11;break;case 12:var t=7;break;case 13:if(r0(r,14),Xo(m(r))===0){var i=Vv(m(r));if(i===0)var t=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?13:_(r);else if(i===1&&Pr(m(r))===0)for(;;){var f=Jv(m(r));if(f!==0){var t=f===1?13:_(r);break}}else var t=_(r)}else var t=_(r);break;default:var t=8}if(14>>0)return Nx(Fn0);switch(t){case 0:return[0,x,Nr];case 1:return[2,K2(x,r)];case 2:return[2,x];case 3:var o=_2(x,r),a=Qr(Xr),d=t3(x,a,r),k=d[1];return[1,k,Kt(k,o,d[2],a,0)];case 4:var T=_2(x,r),g=Qr(Xr),A=Kv(x,g,r),N=A[1];return[1,N,Kt(N,T,A[2],g,1)];case 5:return[0,x,98];case 6:return[0,x,ct];case 7:return[0,x,99];case 8:return[0,x,0];case 9:return[0,x,86];case 10:return[0,x,10];case 11:return[0,x,82];case 12:var R=Jx(r),I=_2(x,r),M=Qr(Xr),L=Qr(Xr);vr(L,R);for(var z=Ar(R,"'"),V=x;;){yr(r);var Z=m(r),$=39>>0)var i0=_(r);else switch($){case 0:var i0=2;break;case 1:for(;;){r0(r,7);var U=m(r),J=-1>>0)var E0=Nx(gn0);else switch(i0){case 0:if(!z){lt(L,39),lt(M,39);continue}var E0=V;break;case 1:if(z){lt(L,34),lt(M,34);continue}var E0=V;break;case 2:var E0=dt(V,Jr(V,r));break;case 3:var M0=Jx(r);vr(L,M0),vr(M,M0);var V=K2(V,r);continue;case 4:var Y0=Jx(r),rx=k2(Y0,3,Xx(Y0)-4|0);vr(L,Y0),is(M,vt(Qx(An0,rx)));continue;case 5:var g0=Jx(r),H0=k2(g0,2,Xx(g0)-3|0);vr(L,g0),is(M,vt(H0));continue;case 6:var t0=Jx(r),ex=k2(t0,1,Xx(t0)-2|0);vr(L,t0);var xx=yV(ex);xx?is(M,xx[1]):vr(M,Qx(Cn0,Qx(ex,Pn0)));continue;default:var ax=Jx(r);vr(L,ax),vr(M,ax);continue}var dx=de(E0,r);vr(L,R);var mx=X1(M),L0=X1(L);return[0,E0,[10,[0,E0[1],I,dx],mx,L0]]}case 13:for(var C0=r[6];;){yr(r);var A0=m(r),U0=br>>0)var Q0=_(r);else switch(U0){case 0:var Q0=1;break;case 1:var Q0=2;break;case 2:var Q0=0;break;default:if(r0(r,2),Xo(m(r))===0){var H=Vv(m(r));if(H===0)var Q0=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?0:_(r);else if(H===1&&Pr(m(r))===0)for(;;){var b=Jv(m(r));if(b!==0){var Q0=b===1?0:_(r);break}}else var Q0=_(r)}else var Q0=_(r)}if(2>>0)throw q0([0,wr,xn0],1);switch(Q0){case 0:continue;case 1:break;default:if(GI(pJ(r)))continue;yJ(r,1)}var B=r[3];KI(r,C0);var a0=t1(r),m0=n6(x,C0,B);return[0,x,[8,bl(a0),m0]]}default:return[0,x,[7,Jx(r)]]}},CS0=function(x,r){yr(r);var e=m(r),t=-1>>0)var u=_(r);else switch(t){case 0:var u=5;break;case 1:if(r0(r,1),cs(m(r))===0){for(;;)if(r0(r,1),cs(m(r))!==0){var u=_(r);break}}else var u=_(r);break;case 2:var u=0;break;case 3:r0(r,0);var u=pe(m(r))===0?0:_(r);break;case 4:r0(r,5);var i=Wy(m(r)),u=i===0?3:i===1?2:_(r);break;default:var u=4}if(5>>0)return Nx(Zn0);switch(u){case 0:return[2,K2(x,r)];case 1:return[2,x];case 2:var f=_2(x,r),o=Qr(Xr),a=t3(x,o,r),d=a[1];return[1,d,Kt(d,f,a[2],o,0)];case 3:var k=_2(x,r),T=Qr(Xr),g=Kv(x,T,r),A=g[1];return[1,A,Kt(A,k,g[2],T,1)];case 4:var N=_2(x,r),R=Qr(Xr),I=Qr(Xr),M=dV(x,R,I,r),L=M[1],z=M[2],V=de(L,r),Z=[0,L[1],N,V],$=X1(I);return[0,L,[3,[0,Z,X1(R),$,0,z]]];default:var i0=dt(x,Jr(x,r));return[0,i0,[3,[0,Jr(i0,r),$n0,Wn0,0,1]]]}},NS0=function(x,r){function e(h){for(;;)if(r0(h,29),ar(m(h))!==0)return _(h)}function t(h){r0(h,28);var X=D1(m(h));if(X!==0)return X===1?e(h):_(h);for(;;)if(r0(h,26),ar(m(h))!==0)return _(h)}function u(h){r0(h,27);var X=D1(m(h));if(X!==0)return X===1?e(h):_(h);for(;;)if(r0(h,25),ar(m(h))!==0)return _(h)}function i(h){r0(h,30);var X=x3(m(h));if(2>>0)return _(h);switch(X){case 0:return e(h);case 1:for(;;){r0(h,30);var W0=os(m(h));if(3>>0)return _(h);switch(W0){case 0:return e(h);case 1:continue;case 2:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var sx=os(m(h));if(3>>0)return _(h);switch(sx){case 0:return e(h);case 1:continue;case 2:continue x;default:return u(h)}}}default:return u(h)}}default:return u(h)}}function f(h){x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var X=GJ(m(h));if(4>>0)return _(h);switch(X){case 0:return e(h);case 1:return i(h);case 2:continue;case 3:continue x;default:return t(h)}}}}function o(h){for(;;)if(r0(h,19),ar(m(h))!==0)return _(h)}function a(h){for(;;)if(r0(h,19),ar(m(h))!==0)return _(h)}function d(h){for(;;)if(r0(h,13),ar(m(h))!==0)return _(h)}function k(h){for(;;)if(r0(h,13),ar(m(h))!==0)return _(h)}function T(h){for(;;)if(r0(h,9),ar(m(h))!==0)return _(h)}function g(h){for(;;)if(r0(h,9),ar(m(h))!==0)return _(h)}function A(h){for(;;)if(r0(h,15),ar(m(h))!==0)return _(h)}function N(h){r0(h,15);var X=D1(m(h));if(X!==0)return X===1?A(h):_(h);for(;;)if(r0(h,15),ar(m(h))!==0)return _(h)}function R(h){for(;;)if(r0(h,23),ar(m(h))!==0)return _(h)}function I(h){r0(h,22);var X=D1(m(h));if(X!==0)return X===1?R(h):_(h);for(;;)if(r0(h,21),ar(m(h))!==0)return _(h)}function M(h){for(;;)if(r0(h,23),ar(m(h))!==0)return _(h)}function L(h){r0(h,22);var X=D1(m(h));if(X!==0)return X===1?M(h):_(h);for(;;)if(r0(h,21),ar(m(h))!==0)return _(h)}function z(h){x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,24);var X=os(m(h));if(3>>0)return _(h);switch(X){case 0:return M(h);case 1:continue;case 2:continue x;default:return L(h)}}}}function V(h){r0(h,29);var X=xV(m(h));if(3>>0)return _(h);switch(X){case 0:return e(h);case 1:var W0=jo(m(h));if(W0===0)for(;;){r0(h,24);var sx=x3(m(h));if(2>>0)return _(h);switch(sx){case 0:return M(h);case 1:continue;default:return L(h)}}if(W0!==1)return _(h);for(;;){r0(h,24);var tx=os(m(h));if(3>>0)return _(h);switch(tx){case 0:return M(h);case 1:continue;case 2:return z(h);default:return L(h)}}case 2:for(;;){r0(h,24);var j0=x3(m(h));if(2>>0)return _(h);switch(j0){case 0:return R(h);case 1:continue;default:return I(h)}}default:for(;;){r0(h,24);var Px=os(m(h));if(3>>0)return _(h);switch(Px){case 0:return R(h);case 1:continue;case 2:return z(h);default:return I(h)}}}}function Z(h){r0(h,30);var X=KJ(m(h));if(3>>0)return _(h);switch(X){case 0:return e(h);case 1:for(;;){r0(h,30);var W0=Uo(m(h));if(4>>0)return _(h);switch(W0){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var sx=Uo(m(h));if(4>>0)return _(h);switch(sx){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:continue x;default:return u(h)}}}default:return u(h)}}case 2:return V(h);default:return u(h)}}function $(h){return zy(m(h))===0&&Yy(m(h))===0&&eV(m(h))===0&&WJ(m(h))===0&&$J(m(h))===0&&By(m(h))===0&&e6(m(h))===0&&zy(m(h))===0&&Xo(m(h))===0&&cO(m(h))===0&&zv(m(h))===0?3:_(h)}function i0(h){return r0(h,3),uV(m(h))===0?3:_(h)}function U(h){var X=TS0(m(h));if(31>>0)return _(h);switch(X){case 0:return 66;case 1:return 67;case 2:if(r0(h,1),cs(m(h))!==0)return _(h);for(;;)if(r0(h,1),cs(m(h))!==0)return _(h);case 3:return 0;case 4:return r0(h,0),pe(m(h))===0?0:_(h);case 5:return 6;case 6:return 65;case 7:if(r0(h,67),e6(m(h))!==0)return _(h);var W0=m(h),sx=nn>>0)return _(h);switch(qx){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var B0=Uo(m(h));if(4>>0)return _(h);switch(B0){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:continue x;default:return u(h)}}}default:return u(h)}}case 16:r0(h,67);var rr=Wy(m(h));if(rr!==0)return rr===1?5:_(h);r0(h,2);var Ux=Oy(m(h));if(2>>0)return _(h);switch(Ux){case 0:for(;;){var K0=Oy(m(h));if(2>>0)return _(h);switch(K0){case 0:continue;case 1:return i0(h);default:return $(h)}}case 1:return i0(h);default:return $(h)}case 17:r0(h,30);var nr=FJ(m(h));if(8>>0)return _(h);switch(nr){case 0:return e(h);case 1:return Z(h);case 2:for(;;){r0(h,16);var z0=rV(m(h));if(4>>0)return _(h);switch(z0){case 0:return A(h);case 1:return i(h);case 2:continue;case 3:for(;;){r0(h,15);var or=Iy(m(h));if(3>>0)return _(h);switch(or){case 0:return A(h);case 1:return i(h);case 2:continue;default:return N(h)}}default:return N(h)}}case 3:for(;;){r0(h,30);var jr=Iy(m(h));if(3>>0)return _(h);switch(jr){case 0:return e(h);case 1:return i(h);case 2:continue;default:return t(h)}}case 4:r0(h,29);var lx=QJ(m(h));if(lx===0)return e(h);if(lx!==1)return _(h);for(;;){r0(h,10);var v1=$y(m(h));if(3>>0)return _(h);switch(v1){case 0:return g(h);case 1:continue;case 2:x:for(;;){if(ss(m(h))!==0)return _(h);for(;;){r0(h,10);var K1=$y(m(h));if(3>>0)return _(h);switch(K1){case 0:return T(h);case 1:continue;case 2:continue x;default:r0(h,8);var w1=D1(m(h));if(w1!==0)return w1===1?T(h):_(h);for(;;)if(r0(h,7),ar(m(h))!==0)return _(h)}}}default:r0(h,8);var Cr=D1(m(h));if(Cr!==0)return Cr===1?g(h):_(h);for(;;)if(r0(h,7),ar(m(h))!==0)return _(h)}}case 5:return V(h);case 6:r0(h,29);var u2=HJ(m(h));if(u2===0)return e(h);if(u2!==1)return _(h);for(;;){r0(h,14);var w=Zy(m(h));if(3>>0)return _(h);switch(w){case 0:return k(h);case 1:continue;case 2:x:for(;;){if(z2(m(h))!==0)return _(h);for(;;){r0(h,14);var x0=Zy(m(h));if(3>>0)return _(h);switch(x0){case 0:return d(h);case 1:continue;case 2:continue x;default:r0(h,12);var e0=D1(m(h));if(e0!==0)return e0===1?d(h):_(h);for(;;)if(r0(h,11),ar(m(h))!==0)return _(h)}}}default:r0(h,12);var S0=D1(m(h));if(S0!==0)return S0===1?k(h):_(h);for(;;)if(r0(h,11),ar(m(h))!==0)return _(h)}}case 7:r0(h,29);var G=JJ(m(h));if(G===0)return e(h);if(G!==1)return _(h);for(;;){r0(h,20);var k0=Qy(m(h));if(3>>0)return _(h);switch(k0){case 0:return a(h);case 1:continue;case 2:x:for(;;){if(Pr(m(h))!==0)return _(h);for(;;){r0(h,20);var J0=Qy(m(h));if(3>>0)return _(h);switch(J0){case 0:return o(h);case 1:continue;case 2:continue x;default:r0(h,18);var O0=D1(m(h));if(O0!==0)return O0===1?o(h):_(h);for(;;)if(r0(h,17),ar(m(h))!==0)return _(h)}}}default:r0(h,18);var ix=D1(m(h));if(ix!==0)return ix===1?a(h):_(h);for(;;)if(r0(h,17),ar(m(h))!==0)return _(h)}}default:return t(h)}case 18:r0(h,30);var Wx=My(m(h));if(5>>0)return _(h);switch(Wx){case 0:return e(h);case 1:return Z(h);case 2:for(;;){r0(h,30);var Bx=My(m(h));if(5>>0)return _(h);switch(Bx){case 0:return e(h);case 1:return Z(h);case 2:continue;case 3:return V(h);case 4:return f(h);default:return t(h)}}case 3:return V(h);case 4:return f(h);default:return t(h)}case 19:return 44;case 20:return 42;case 21:return 49;case 22:r0(h,51);var Hx=m(h),$x=61>>0)return Nx(Jn0);var Y=J;if(34>Y)switch(Y){case 0:return[2,K2(x,r)];case 1:return[2,x];case 2:var F=_2(x,r),n0=Qr(Xr),Q=Kv(x,n0,r),f0=Q[1];return[1,f0,Kt(f0,F,Q[2],n0,1)];case 3:var s0=Jx(r);if(!x[5]){var v0=_2(x,r),o0=Qr(Xr);vr(o0,s0);var c0=Kv(x,o0,r),T0=c0[1];return[1,T0,Kt(T0,v0,c0[2],o0,1)]}var E0=x[4]?sV(x,Jr(x,r),s0):x,M0=Ey(1,E0),Y0=_y(r);return Ar(Gl(r,Y0-1|0,1),Ov)&&P(Gl(r,Y0-2|0,1),Ov)?[0,M0,86]:[2,M0];case 4:if(x[4])return[2,Ey(0,x)];Ga(r),yr(r);var rx=zJ(m(r))===0?0:_(r);return rx===0?[0,x,c2]:Nx(Vn0);case 5:var g0=_2(x,r),H0=Qr(Xr),t0=t3(x,H0,r),ex=t0[1];return[1,ex,Kt(ex,g0,t0[2],H0,0)];case 6:var xx=Jx(r),ax=_2(x,r),dx=Qr(Xr),mx=Qr(Xr);vr(mx,xx);var L0=pV(x,xx,dx,mx,0,r),C0=L0[1],A0=L0[3],U0=[0,C0[1],ax,L0[2]],Q0=X1(mx);return[0,C0,[2,[0,U0,X1(dx),Q0,A0]]];case 7:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&jy(m(X))===0&&ss(m(X))===0)for(;;){var W0=Ny(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(ss(m(X))===0)for(;;){var sx=Ny(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Wt(0,t1(X))]:Nx(Xn0)});case 8:return[0,x,Wt(0,t1(r))];case 9:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&jy(m(X))===0&&ss(m(X))===0)for(;;){r0(X,0);var W0=Cy(m(X));if(W0!==0){if(W0===1)x:for(;;){if(ss(m(X))===0)for(;;){r0(X,0);var sx=Cy(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Zt(0,t1(X))]:Nx(Yn0)});case 10:return[0,x,Zt(0,t1(r))];case 11:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&Jy(m(X))===0&&z2(m(X))===0)for(;;){var W0=Dy(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(z2(m(X))===0)for(;;){var sx=Dy(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Wt(1,t1(X))]:Nx(Bn0)});case 12:return[0,x,Wt(1,t1(r))];case 13:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&Jy(m(X))===0&&z2(m(X))===0)for(;;){r0(X,0);var W0=Ly(m(X));if(W0!==0){if(W0===1)x:for(;;){if(z2(m(X))===0)for(;;){r0(X,0);var sx=Ly(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Zt(3,t1(X))]:Nx(Un0)});case 14:return[0,x,Zt(3,t1(r))];case 15:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&z2(m(X))===0){for(;;)if(r0(X,0),z2(m(X))!==0){var W0=_(X);break}}else var W0=_(X);return W0===0?[0,h,Zt(1,t1(X))]:Nx(jn0)});case 16:return[0,x,Zt(1,t1(r))];case 17:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&Ay(m(X))===0&&Pr(m(X))===0)for(;;){var W0=Ry(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(Pr(m(X))===0)for(;;){var sx=Ry(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Wt(2,t1(X))]:Nx(Dn0)});case 18:return[0,x,Wt(2,t1(r))];case 19:return N1(x,r,function(h,X){if(yr(X),le(m(X))===0&&Ay(m(X))===0&&Pr(m(X))===0)for(;;){r0(X,0);var W0=Ky(m(X));if(W0!==0){if(W0===1)x:for(;;){if(Pr(m(X))===0)for(;;){r0(X,0);var sx=Ky(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Zt(4,t1(X))]:Nx(Mn0)});case 20:return[0,x,Zt(4,t1(r))];case 21:return N1(x,r,function(h,X){function W0(z0){for(;;){var or=Vt(m(z0));if(2>>0)return _(z0);switch(or){case 0:continue;case 1:x:for(;;){if(mr(m(z0))!==0)return _(z0);for(;;){var jr=Vt(m(z0));if(2>>0)return _(z0);switch(jr){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function sx(z0){for(;;){var or=r3(m(z0));if(or!==0)return or===1?0:_(z0)}}function tx(z0){var or=Fy(m(z0));if(2>>0)return _(z0);switch(or){case 0:var jr=jo(m(z0));return jr===0?sx(z0):jr===1?W0(z0):_(z0);case 1:return sx(z0);default:return W0(z0)}}function j0(z0){var or=Vy(m(z0));if(or!==0)return or===1?tx(z0):_(z0);for(;;){var jr=ne(m(z0));if(2>>0)return _(z0);switch(jr){case 0:continue;case 1:return tx(z0);default:x:for(;;){if(mr(m(z0))!==0)return _(z0);for(;;){var lx=ne(m(z0));if(2>>0)return _(z0);switch(lx){case 0:continue;case 1:return tx(z0);default:continue x}}}}}}yr(X);var Px=Do(m(X));if(2>>0)var Ex=_(X);else switch(Px){case 0:if(mr(m(X))===0)for(;;){var Ox=ne(m(X));if(2>>0)var Ex=_(X);else switch(Ox){case 0:continue;case 1:var Ex=tx(X);break;default:x:for(;;){if(mr(m(X))===0)for(;;){var qx=ne(m(X));if(2>>0)var B0=_(X);else switch(qx){case 0:continue;case 1:var B0=tx(X);break;default:continue x}break}else var B0=_(X);var Ex=B0;break}}break}else var Ex=_(X);break;case 1:var rr=Py(m(X)),Ex=rr===0?j0(X):rr===1?tx(X):_(X);break;default:for(;;){var Ux=Xy(m(X));if(2>>0)var Ex=_(X);else switch(Ux){case 0:var Ex=j0(X);break;case 1:continue;default:var Ex=tx(X)}break}}if(Ex!==0)return Nx(Ln0);var K0=t1(X),nr=w2(h,Jr(h,X),48);return[0,nr,Wt(2,K0)]});case 22:var H=t1(r),b=w2(x,Jr(x,r),48);return[0,b,Wt(2,H)];case 23:return N1(x,r,function(h,X){function W0(K0){for(;;){r0(K0,0);var nr=Bo(m(K0));if(nr!==0){if(nr!==1)return _(K0);x:for(;;){if(mr(m(K0))!==0)return _(K0);for(;;){r0(K0,0);var z0=Bo(m(K0));if(z0!==0){if(z0===1)continue x;return _(K0)}}}}}}function sx(K0){for(;;)if(r0(K0,0),mr(m(K0))!==0)return _(K0)}function tx(K0){var nr=Fy(m(K0));if(2>>0)return _(K0);switch(nr){case 0:var z0=jo(m(K0));return z0===0?sx(K0):z0===1?W0(K0):_(K0);case 1:return sx(K0);default:return W0(K0)}}function j0(K0){var nr=Vy(m(K0));if(nr!==0)return nr===1?tx(K0):_(K0);for(;;){var z0=ne(m(K0));if(2>>0)return _(K0);switch(z0){case 0:continue;case 1:return tx(K0);default:x:for(;;){if(mr(m(K0))!==0)return _(K0);for(;;){var or=ne(m(K0));if(2>>0)return _(K0);switch(or){case 0:continue;case 1:return tx(K0);default:continue x}}}}}}yr(X);var Px=Do(m(X));if(2>>0)var Ex=_(X);else switch(Px){case 0:if(mr(m(X))===0)for(;;){var Ox=ne(m(X));if(2>>0)var Ex=_(X);else switch(Ox){case 0:continue;case 1:var Ex=tx(X);break;default:x:for(;;){if(mr(m(X))===0)for(;;){var qx=ne(m(X));if(2>>0)var B0=_(X);else switch(qx){case 0:continue;case 1:var B0=tx(X);break;default:continue x}break}else var B0=_(X);var Ex=B0;break}}break}else var Ex=_(X);break;case 1:var rr=Py(m(X)),Ex=rr===0?j0(X):rr===1?tx(X):_(X);break;default:for(;;){var Ux=Xy(m(X));if(2>>0)var Ex=_(X);else switch(Ux){case 0:var Ex=j0(X);break;case 1:continue;default:var Ex=tx(X)}break}}return Ex===0?[0,h,Zt(4,t1(X))]:Nx(On0)});case 24:return[0,x,Zt(4,t1(r))];case 25:return N1(x,r,function(h,X){function W0(Ux){for(;;){var K0=Vt(m(Ux));if(2>>0)return _(Ux);switch(K0){case 0:continue;case 1:x:for(;;){if(mr(m(Ux))!==0)return _(Ux);for(;;){var nr=Vt(m(Ux));if(2>>0)return _(Ux);switch(nr){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function sx(Ux){var K0=r3(m(Ux));return K0===0?W0(Ux):K0===1?0:_(Ux)}yr(X);var tx=Do(m(X));if(2>>0)var j0=_(X);else switch(tx){case 0:var j0=mr(m(X))===0?W0(X):_(X);break;case 1:for(;;){var Px=e3(m(X));if(Px===0)var j0=sx(X);else{if(Px===1)continue;var j0=_(X)}break}break;default:for(;;){var Ex=Yo(m(X));if(2>>0)var j0=_(X);else switch(Ex){case 0:var j0=sx(X);break;case 1:continue;default:x:for(;;){if(mr(m(X))===0)for(;;){var Ox=Yo(m(X));if(2>>0)var qx=_(X);else switch(Ox){case 0:var qx=sx(X);break;case 1:continue;default:continue x}break}else var qx=_(X);var j0=qx;break}}break}}if(j0!==0)return Nx(In0);var B0=t1(X),rr=w2(h,Jr(h,X),39);return[0,rr,Wt(2,B0)]});case 26:return N1(x,r,function(h,X){yr(X);var W0=jo(m(X));if(W0===0)for(;;){var sx=r3(m(X));if(sx!==0){var Ex=sx===1?0:_(X);break}}else if(W0===1)for(;;){var tx=Vt(m(X));if(2>>0)var Ex=_(X);else switch(tx){case 0:continue;case 1:x:for(;;){if(mr(m(X))===0)for(;;){var j0=Vt(m(X));if(2>>0)var Px=_(X);else switch(j0){case 0:continue;case 1:continue x;default:var Px=0}break}else var Px=_(X);var Ex=Px;break}break;default:var Ex=0}break}else var Ex=_(X);return Ex===0?[0,h,Wt(2,t1(X))]:Nx(Rn0)});case 27:var B=t1(r),a0=w2(x,Jr(x,r),39);return[0,a0,Wt(2,B)];case 28:return[0,x,Wt(2,t1(r))];case 29:return N1(x,r,function(h,X){function W0(B0){for(;;){r0(B0,0);var rr=Bo(m(B0));if(rr!==0){if(rr!==1)return _(B0);x:for(;;){if(mr(m(B0))!==0)return _(B0);for(;;){r0(B0,0);var Ux=Bo(m(B0));if(Ux!==0){if(Ux===1)continue x;return _(B0)}}}}}}function sx(B0){return r0(B0,0),mr(m(B0))===0?W0(B0):_(B0)}yr(X);var tx=Do(m(X));if(2>>0)var j0=_(X);else switch(tx){case 0:var j0=mr(m(X))===0?W0(X):_(X);break;case 1:for(;;){r0(X,0);var Px=e3(m(X));if(Px===0)var j0=sx(X);else{if(Px===1)continue;var j0=_(X)}break}break;default:for(;;){r0(X,0);var Ex=Yo(m(X));if(2>>0)var j0=_(X);else switch(Ex){case 0:var j0=sx(X);break;case 1:continue;default:x:for(;;){if(mr(m(X))===0)for(;;){r0(X,0);var Ox=Yo(m(X));if(2>>0)var qx=_(X);else switch(Ox){case 0:var qx=sx(X);break;case 1:continue;default:continue x}break}else var qx=_(X);var j0=qx;break}}break}}return j0===0?[0,h,Zt(4,t1(X))]:Nx(Nn0)});case 30:return[0,x,Zt(4,t1(r))];case 31:return[0,x,66];case 32:return[0,x,6];default:return[0,x,7]}switch(Y){case 34:return[0,x,0];case 35:return[0,x,1];case 36:return[0,x,2];case 37:return[0,x,3];case 38:return[0,x,4];case 39:return[0,x,5];case 40:return[0,x,12];case 41:return[0,x,10];case 42:return[0,x,8];case 43:return[0,x,9];case 44:return[0,x,86];case 45:return[0,x,83];case 46:return[0,x,85];case 47:return[0,x,6];case 48:return[0,x,7];case 49:return[0,x,98];case 50:return[0,x,99];case 51:return[0,x,82];case 52:return[0,x,85];case 53:return[0,x,c2];case 54:return[0,x,86];case 55:return[0,x,88];case 56:return[0,x,87];case 57:return[0,x,89];case 58:return[0,x,91];case 59:return[0,x,11];case 60:return[0,x,82];case 61:return[0,x,nn];case 62:return[0,x,jt];case 63:return[0,x,ud];case 64:return[0,x,Ep];case 65:var m0=r[6];fV(r);var P0=n6(x,m0,r[3]);KI(r,m0);var D=t1(r),N0=aV(x,D),X0=N0[2],D0=N0[1],ox=Tx(X0,_p);if(0<=ox){if(0>=ox)return[0,D0,Eo];var b0=Tx(X0,wx);if(0<=b0){if(0>=b0)return[0,D0,il];if(!P(X0,Cs))return[0,D0,31];if(!P(X0,Ps))return[0,D0,46];if(!P(X0,vd))return[0,D0,Da];if(!P(X0,B5))return[0,D0,br];if(!P(X0,Os))return[0,D0,Lf]}else{if(!P(X0,X8))return[0,D0,Lt];if(!P(X0,_v))return[0,D0,29];if(!P(X0,wa))return[0,D0,dv];if(!P(X0,ga))return[0,D0,K4];if(!P(X0,je))return[0,D0,42];if(!P(X0,Ua))return[0,D0,Ca]}}else{var kx=Tx(X0,Bc);if(0<=kx){if(0>=kx)return[0,D0,41];if(!P(X0,Is))return[0,D0,30];if(!P(X0,zj))return[0,D0,Xr];if(!P(X0,b2))return[0,D0,53];if(!P(X0,kl))return[0,D0,h1];if(!P(X0,Y8))return[0,D0,Di]}else{if(!P(X0,y5))return[0,D0,st];if(!P(X0,ha))return[0,D0,wl];if(!P(X0,wv))return[0,D0,ma];if(!P(X0,D5))return[0,D0,Kn0];if(!P(X0,rl))return[0,D0,zn0];if(!P(X0,se))return[0,D0,Ri]}}return[0,D0,[4,P0,X0,bl(D)]];case 66:var V0=x[4]?w2(x,Jr(x,r),96):x;return[0,V0,Nr];default:return[0,x,[7,Jx(r)]]}},u6=function(x){return function(r){for(var e=0,t=r;;){var u=p(x,t,t[2]);switch(u[0]){case 0:var i=u[2],f=u[1],o=cV(f,i),a=e===0?0:Ax(e),d=f[6];if(d===0)return[0,[0,f[1],f[2],f[3],f[4],f[5],f[6],o],[0,i,o,0,a]];var k=[0,i,o,Ax(d),a];return[0,[0,f[1],f[2],f[3],f[4],f[5],MJ,o],k];case 1:var T=u[2],g=u[1],e=[0,T,e],t=[0,g[1],g[2],g[3],g[4],g[5],g[6],T[1]];continue;default:var t=u[1];continue}}}},RS0=u6(AS0),IS0=u6(PS0),OS0=u6(CS0),LS0=u6(NS0),MS0=u6(ES0),T2=gJ([0,JT0]),i6=function(x,r){return[0,0,0,r,DJ(x)]},qy=function(x){var r=x[4];switch(x[3]){case 0:var J=l(MS0,r);break;case 1:var J=l(LS0,r);break;case 2:var J=l(IS0,r);break;case 3:var e=de(r,r[2]),t=Qr(Xr),u=Qr(Xr),i=r[2];yr(i);var f=m(i),o=Lt>>0)var a=_(i);else switch(o){case 0:var a=1;break;case 1:var a=4;break;case 2:var a=0;break;case 3:r0(i,0);var a=pe(m(i))===0?0:_(i);break;case 4:var a=2;break;default:var a=3}if(4>>0)var d=Nx(Qn0);else switch(a){case 0:var k=Jx(i);vr(u,k),vr(t,k);var T=mV(K2(r,i),t,u,i),g=de(T,i),A=X1(t),N=X1(u),d=[0,T,[9,[0,T[1],e,g],A,N]];break;case 1:var d=[0,r,Nr];break;case 2:var d=[0,r,98];break;case 3:var d=[0,r,0];break;default:Ga(i);var R=mV(r,t,u,i),I=de(R,i),M=X1(t),L=X1(u),d=[0,R,[9,[0,R[1],e,I],M,L]]}var z=d[2],V=d[1],Z=cV(V,z),$=V[6];if($===0)var U=[0,V,[0,z,Z,0,0]];else var i0=[0,z,Z,Ax($),0],U=[0,[0,V[1],V[2],V[3],V[4],V[5],0,V[7]],i0];var J=U;break;case 4:var J=l(OS0,r);break;default:var J=l(RS0,r)}var Y=J[1],F=J[2],n0=[0,DJ(Y),F];return x[4]=Y,x[1]?x[2]=[0,n0]:x[1]=[0,n0],n0},kV=function(x){var r=x[1];return r?r[1][2]:qy(x)[2]},n3=function(x){return Yl(x[24][1])},_1=function(x){return x[28][4]},ux=function(x,r){var e=r[2];x[1][1]=[0,[0,r[1],e],x[1][1]];var t=x[23];return t?p(t[1],x,e):0},f6=function(x,r){return x[31][1]=r,0},Jo=function(x,r){if(x===0)return kV(r[26][1]);if(x!==1)throw q0([0,wr,Ps0],1);var e=r[26][1];e[1]||qy(e);var t=e[2];return t?t[1][2]:qy(e)[2]},Gs=function(x,r){return x===r[5]?r:[0,r[1],r[2],r[3],r[4],x,r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},hV=function(x,r){return x===r[10]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],x,r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},oO=function(x,r){return x===r[18]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],x,r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},vO=function(x,r){return x===r[19]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],x,r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},_V=function(x,r){return x===r[20]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],x,r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Zv=function(x,r){return x===r[22]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],x,r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},aO=function(x,r){return x===r[14]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],x,r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},c6=function(x,r){return x===r[8]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],x,r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},s6=function(x,r){return x===r[12]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],x,r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Wv=function(x,r){return x===r[15]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],x,r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},lO=function(x,r){return x===r[16]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],x,r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},wV=function(x,r){return x===r[6]?r:[0,r[1],r[2],r[3],r[4],r[5],x,r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},TV=function(x,r){return x===r[7]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],x,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},pO=function(x,r){return x===r[13]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],x,r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Gy=function(x,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],[0,x],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},dO=function(x){function r(e){return ux(x,e)}return function(e){return C2(r,e)}},u3=function(x){var r=x[4][1];return r?[0,r[1][2]]:0},SV=function(x){var r=x[4][1];return r?[0,r[1][1]]:0},EV=function(x){return[0,x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15],x[16],x[17],x[18],x[19],x[20],x[21],x[22],0,x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]]},gV=function(x,r,e,t){return[0,x[1],x[2],T2[1],x[4],x[5],0,0,0,0,0,1,x[12],x[13],x[14],x[15],x[16],x[17],e,r,x[20],t,x[22],x[23],x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]]},i3=function(x){return P(x,Tv)&&P(x,b2)&&P(x,ka)&&P(x,u8)&&P(x,El)&&P(x,H3)&&P(x,z3)&&P(x,je)&&P(x,Y2)?0:1},$v=function(x){return P(x,gP)&&P(x,"eval")?0:1},by=function(x){var r=Tx(x,s8),e=0;if(0<=r){if(0>>0){if(D2>=t+1>>>0)return 1}else if(t===6)return 0}return v6(x,r)},f3=function(x){return CV(0,x)},Vo=function(x,r){var e=pr(x,r),t=0;if(typeof e=="number")switch(e){case 28:case 42:case 52:case 53:case 54:case 55:case 56:case 57:case 58:var u=1;break;default:t=1}else if(e[0]===4)var u=i3(e[2]);else t=1;if(t)var u=0;if(u)return 1;var i=0;if(typeof e=="number")switch(e){case 14:case 48:case 60:case 61:case 62:case 63:case 64:case 65:case 126:i=1;break}else e[0]===4&&(i=1);return i?1:0},x9=function(x,r){return AV(r,pr(x,r))},NV=function(x,r){var e=Vo(x,r);return e||x9(x,r)},vs=function(x){return Vo(0,x)},zo=function(x){var r=K(x)===15?1:0;if(r)var e=r;else{var t=K(x)===64?1:0;if(t){var u=pr(1,x)===15?1:0;if(u)var i=o6(1,x)[2][1],e=gx(x)[3][1]===i?1:0;else var e=u}else var e=t}return e},a6=function(x){var r=K(x);if(typeof r=="number")switch(r){case 13:case 40:return 1}else if(r[0]===4&&!P(r[3],x_)&&pr(1,x)===40)return 1;return 0},kO=function(x){var r=x[28][1];if(r){var e=K(x);if(typeof e!="number"&&e[0]===4&&!P(e[3],_o)&&Vo(1,x))return 1;var t=0}else var t=r;return t},hO=function(x){var r=K(x);return typeof r!="number"&&r[0]===4&&!P(r[3],C1)?1:0},zx=function(x,r){return ux(x,[0,gx(x),r])},RV=function(x,r){var e=tO(0,r);return x?[26,e,x[1]]:[24,e]},g1=function(x,r){var e=mO(r);return l(dO(r),e),zx(r,RV(x,K(r)))},r9=function(x){function r(e){return ux(x,[0,e[1],Nr])}return function(e){return C2(r,e)}},IV=function(x,r){var e=x[6]?G0(Tr(Es0),r,r,r):gs0;return g1([0,e],x)},$t=function(x,r){var e=x[5];return e&&zx(x,r)},yt=function(x,r){var e=x[5],t=r[2],u=r[1];return e&&ux(x,[0,u,t])},Qv=function(x,r){return ux(x,[0,r,[14,x[5]]])},Z0=function(x){var r=x[27][1];if(r){var e=r[1],t=n3(x),u=K(x);l(e,[0,gx(x),u,t])}var i=x[26][1],f=i[1],o=f?f[1][1]:qy(i)[1];x[25][1]=o;var a=mO(x);l(dO(x),a);var d=x[2][1],k=us(Jo(0,x)[4],d);x[2][1]=k;var T=[0,Jo(0,x)];x[4][1]=T;var g=x[26][1];return g[2]?(g[1]=g[2],g[2]=0,0):(kV(g),g[1]=0,0)},o1=function(x,r){var e=p(bI,K(x),r);return e&&Z0(x),e},V1=function(x,r){x[24][1]=[0,r,x[24][1]];var e=n3(x),t=i6(x[25][1],e);return x[26][1]=t,0},$1=function(x){var r=x[24][1],e=r?r[2]:Nx(Ss0);x[24][1]=e;var t=n3(x),u=i6(x[25][1],t);return x[26][1]=u,0},yx=function(x){var r=gx(x);if(K(x)===9&&v6(1,x)){var e=_0(x),t=Jo(1,x)[4],u=Fx(e,l(Jl(function(f){return f[1][2][1]<=r[3][1]?1:0}),t));return f6(x,[0,r[3][1]+1|0,0]),u}var i=_0(x);return f6(x,r[3]),i},Ko=function(x){var r=x[4][1];if(!r)return 0;var e=r[1][2],t=_0(x),u=l(Jl(function(i){return i[1][2][1]<=e[3][1]?1:0}),t);return f6(x,[0,e[3][1]+1|0,0]),u},xo=function(x,r){return g1([0,tO(_s0,r)],x)},u0=function(x,r){return 1-p(bI,K(x),r)&&xo(x,r),Z0(x)},OV=function(x,r){var e=o1(x,r);return 1-e&&xo(x,r),e},e9=function(x,r){return OV(x,r),0},ro=function(x,r){var e=K(x),t=0;return typeof e!="number"&&e[0]===4&&Ar(e[3],r)&&(t=1),t||g1([0,l(Tr(hs0),r)],x),Z0(x)},as=[qr,Ls0,Js(0)],LV=function(x,r,e){if(!e)return 0;var t=e[1],u=t[1],i=t[2];if(r[27][1]=[0,u],!x)return x;for(var f=i[2];;){if(!f)return 0;var o=f[2];l(u,f[1]);var f=o}},_O=function(x,r){var e=x[27][1];if(e){var t=e[1],u=_X(0),i=[0,function(z){return yI(z,u)}];x[27][1]=i;var f=[0,[0,t,u]]}else var f=0;var o=x[31][1],a=x[25][1],d=x[24][1],k=x[4][1],T=x[2][1],g=x[1][1];try{var A=l(r,x);LV(1,x,f);var N=[0,A];return N}catch(L){var R=L1(L);if(R!==as)throw q0(R,0);LV(0,x,f),x[1][1]=g,x[2][1]=T,x[4][1]=k,x[24][1]=d,x[25][1]=a,x[31][1]=o;var I=n3(x),M=i6(x[25][1],I);return x[26][1]=M,0}},t9=function(x,r,e){var t=_O(x,e);return t?t[1]:r},l6=function(x,r){var e=Ax(r);if(!e)return r;var t=e[1],u=e[2],i=l(x,t);return t===i?r:Ax([0,i,u])},MV=my(Bs0,function(x){var r=YI(x,Ds0),e=UI(x,Us0),t=e[24],u=e[28],i=e[41],f=e[91],o=e[dN],a=e[IR],d=e[_g],k=e[fB],T=e[tr],g=e[OB],A=e[6],N=e[7],R=e[10],I=e[17],M=e[23],L=e[29],z=e[39],V=e[42],Z=e[52],$=e[61],i0=e[c2],U=e[B1],J=e[Ri],Y=e[ma],F=e[Ca],n0=e[rN],Q=e[Uw],f0=e[OU],s0=e[cU],v0=e[dE],o0=e[BT],c0=e[p5],T0=e[G4],E0=e[gT],M0=e[id],Y0=e[Lp],rx=e[TT],g0=e[H8],H0=e[el],t0=e[Ug],ex=e[Av],xx=e[GD],ax=e[KM],dx=e[nY],mx=e[la],L0=e[hU],C0=e[iY],A0=e[AU],U0=e[CU],Q0=e[xY],H=JI(x,0,0,fX,QI,1)[1];function b(e0,S0,G){var k0=G[2],J0=k0[2],O0=k0[1],ix=G[1];if(J0){var Wx=J0[1],Bx=function($x){return[0,ix,[0,O0,[0,$x]]]};return $0(l(e0[1][1+a],e0),Wx,G,Bx)}function Hx($x){return[0,ix,[0,$x,J0]]}return $0(p(e0[1][1+A],e0,S0),O0,G,Hx)}function B(e0,S0,G){var k0=G[2],J0=G[1],O0=J0[3],ix=J0[2],Wx=J0[1];if(O0)var Bx=l6(l(e0[1][1+u],e0),O0),Hx=ix;else var Bx=0,Hx=p(e0[1][1+u],e0,ix);var $x=p(e0[1][1+i],e0,k0);return ix===Hx&&O0===Bx&&k0===$x?G:[0,[0,Wx,Hx,Bx],$x]}function a0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function m0(e0,S0,G){var k0=G[3];function J0(O0){return[0,G[1],G[2],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function P0(e0,S0){var G=S0[2];function k0(J0){return[0,S0[1],J0]}return $0(l(e0[1][1+i],e0),G,S0,k0)}function D(e0,S0,G){var k0=G[3];function J0(O0){return[0,G[1],G[2],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function N0(e0,S0,G){var k0=G[2],J0=G[1],O0=l6(l(e0[1][1+a],e0),J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,O0,ix]}function X0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function D0(e0,S0,G){var k0=G[4];function J0(O0){return[0,G[1],G[2],G[3],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function ox(e0,S0,G){var k0=G[2];function J0(O0){return[0,G[1],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function b0(e0,S0,G){var k0=G[3],J0=G[2],O0=p(e0[1][1+J],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],O0,ix]}function kx(e0,S0,G){var k0=G[4],J0=G[3],O0=G[2],ix=G[1],Wx=p(e0[1][1+i],e0,k0);if(J0){var Bx=Vx(l(e0[1][1+g],e0),J0);return J0===Bx&&k0===Wx?G:[0,G[1],G[2],Bx,Wx]}if(O0){var Hx=Vx(l(e0[1][1+T],e0),O0);return O0===Hx&&k0===Wx?G:[0,G[1],Hx,G[3],Wx]}var $x=p(e0[1][1+a],e0,ix);return ix===$x&&k0===Wx?G:[0,$x,G[2],G[3],Wx]}function V0(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function h(e0,S0,G){var k0=G[4];function J0(O0){return[0,G[1],G[2],G[3],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function X(e0,S0,G){var k0=G[4];function J0(O0){return[0,G[1],G[2],G[3],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function W0(e0,S0,G){var k0=G[2],J0=G[1],O0=J0[3],ix=J0[2],Wx=J0[1];if(O0)var Bx=l6(l(e0[1][1+u],e0),O0),Hx=ix;else var Bx=0,Hx=p(e0[1][1+u],e0,ix);var $x=p(e0[1][1+i],e0,k0);return ix===Hx&&O0===Bx&&k0===$x?G:[0,[0,Wx,Hx,Bx],$x]}function sx(e0,S0,G){var k0=G[3],J0=G[1],O0=t2(l(e0[1][1+f],e0),J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,O0,G[2],ix]}function tx(e0,S0,G){var k0=G[2];function J0(O0){return[0,G[1],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function j0(e0,S0){if(S0[0]===0){var G=S0[1],k0=function(Hx){return[0,Hx]};return $0(l(e0[1][1+o],e0),G,S0,k0)}var J0=S0[1],O0=J0[2],ix=O0[2],Wx=J0[1],Bx=p(e0[1][1+o],e0,ix);return ix===Bx?S0:[1,[0,Wx,[0,O0[1],Bx]]]}function Px(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+c0],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function Ex(e0,S0){var G=S0[2],k0=S0[1],J0=G[4];function O0(ix){return[0,k0,[0,G[1],G[2],G[3],ix]]}return $0(l(e0[1][1+i],e0),J0,[0,k0,G],O0)}function Ox(e0,S0,G){var k0=G[9],J0=G[3],O0=p(e0[1][1+M0],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,G[4],G[5],G[6],G[7],G[8],ix,G[10]]}function qx(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function B0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function rr(e0,S0){var G=S0[2],k0=S0[1],J0=G[3];function O0(ix){return[0,k0,[0,G[1],G[2],ix]]}return $0(l(e0[1][1+i],e0),J0,[0,k0,G],O0)}function Ux(e0,S0,G){var k0=G[6],J0=G[5],O0=p(e0[1][1+ex],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],G[3],G[4],O0,ix,G[7]]}function K0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];if(k0===0){var ix=function(Hx){return[0,O0,[0,Hx,k0]]};return $0(l(e0[1][1+o],e0),J0,S0,ix)}function Wx(Hx){return[0,O0,[0,J0,Hx]]}var Bx=l(e0[1][1+t],e0);return $0(function(Hx){return Vx(Bx,Hx)},k0,S0,Wx)}function nr(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Bx){return[0,O0,[0,Bx,k0]]}var Wx=l(e0[1][1+d],e0);return $0(function(Bx){return l6(Wx,Bx)},J0,S0,ix)}function z0(e0,S0,G){var k0=G[2],J0=G[1];if(k0===0){var O0=function(Bx){return[0,Bx,G[2],G[3]]};return $0(l(e0[1][1+a],e0),J0,G,O0)}function ix(Bx){return[0,G[1],Bx,G[3]]}var Wx=l(e0[1][1+t],e0);return $0(function(Bx){return Vx(Wx,Bx)},k0,G,ix)}function or(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function jr(e0,S0,G){var k0=G[7],J0=G[2],O0=p(e0[1][1+k],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],O0,G[3],G[4],G[5],G[6],ix]}function lx(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function v1(e0,S0){var G=S0[2],k0=G[2],J0=G[1],O0=S0[1];function ix(Wx){return[0,O0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function K1(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+g],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function w1(e0,S0,G){var k0=G[2];function J0(O0){return[0,G[1],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function Cr(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function u2(e0,S0,G){var k0=G[4],J0=G[3],O0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===O0&&k0===ix?G:[0,G[1],G[2],O0,ix]}function w(e0,S0){var G=S0[2];function k0(J0){return[0,S0[1],J0]}return $0(l(e0[1][1+i],e0),G,S0,k0)}function x0(e0,S0,G){var k0=G[2];function J0(O0){return[0,G[1],O0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}return zI(x,[0,V,function(e0,S0){var G=S0[2],k0=l(Jl(function(O0){return qs(O0[1][2],e0[1+r])<0?1:0}),G),J0=ns(k0);return ns(G)===J0?S0:[0,S0[1],k0,S0[3]]},Q0,x0,U0,w,A0,u2,C0,Cr,L0,w1,mx,K1,g,v1,T,lx,dx,jr,k,or,ax,z0,xx,nr,d,K0,t0,Ux,H0,rr,g0,B0,rx,qx,Y0,Ox,E0,Ex,T0,Px,o0,j0,v0,tx,s0,sx,f0,W0,Q,X,n0,h,F,V0,U,kx,Y,b0,i0,ox,f,D0,$,X0,Z,N0,z,D,L,P0,M,m0,I,a0,R,B,N,b]),function(e0,S0,G){var k0=ky(S0,x);return k0[1+r]=G,l(H,k0),VI(S0,k0,x)}}),n9=function(x){var r=u3(x);if(r)var e=r[1],t=PV(x)?(f6(x,e[3]),[0,p(MV[1],0,e[3])]):0,u=t;else var u=0;return[0,0,function(i,f){return u?p(f,u[1],i):i}]},p6=function(x){var r=u3(x);if(r){var e=r[1];if(PV(x)){f6(x,e[3]);var t=Ko(x),u=[0,p(MV[1],0,[0,e[3][1]+1|0,0])],i=t}else var u=0,i=Ko(x)}else var u=0,i=0;return[0,i,function(f,o){return u?p(o,u[1],f):f}]},R1=function(x){return Z2(x)?p6(x):n9(x)},Sn=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,Ra,2),t,u)})},ue=function(x,r){if(!r)return 0;var e=r[1],t=R1(x)[2];return[0,p(t,e,function(u,i){return p(Gx(u,GN,5),u,i)})]},wO=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,DD,8),t,u)})},c3=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,-1045824777,9),t,u)})},d6=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,-455772979,10),t,u)})},DV=function(x,r){if(!r)return 0;var e=r[1],t=R1(x)[2];return[0,p(t,e,function(u,i){return p(Gx(u,iU,13),u,i)})]},En=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,aD,14),t,u)})},jV=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){var i=l(Gx(t,xB,16),t);return l6(function(f){return t2(i,f)},u)})},UV=function(x,r){var e=R1(x)[2];return p(e,r,function(t,u){return p(Gx(t,-21476009,17),t,u)})},DS0=function(x,r){var e=x[2],t=x[1];function u(v1){return I2(v1,r)}switch(e[0]){case 0:var i=e[1],f=qI(i[2],r),lx=[0,[0,i[1],f]];break;case 1:var o=e[1],a=u(o[2]),lx=[1,[0,o[1],a]];break;case 2:var d=e[1],k=u(d[7]),lx=[2,[0,d[1],d[2],d[3],d[4],d[5],d[6],k]];break;case 3:var T=e[1],g=T[7],A=u(T[6]),lx=[3,[0,T[1],T[2],T[3],T[4],T[5],A,g]];break;case 4:var N=e[1],R=u(N[2]),lx=[4,[0,N[1],R]];break;case 5:var lx=[5,[0,u(e[1][1])]];break;case 6:var I=e[1],M=u(I[7]),lx=[6,[0,I[1],I[2],I[3],I[4],I[5],I[6],M]];break;case 7:var L=e[1],z=u(L[5]),lx=[7,[0,L[1],L[2],L[3],L[4],z]];break;case 8:var V=e[1],Z=u(V[3]),lx=[8,[0,V[1],V[2],Z]];break;case 9:var $=e[1],i0=u($[5]),lx=[9,[0,$[1],$[2],$[3],$[4],i0]];break;case 10:var U=e[1],J=u(U[4]),lx=[10,[0,U[1],U[2],U[3],J]];break;case 11:var Y=e[1],F=u(Y[5]),lx=[11,[0,Y[1],Y[2],Y[3],Y[4],F]];break;case 12:var n0=e[1],Q=u(n0[4]),lx=[12,[0,n0[1],n0[2],n0[3],Q]];break;case 13:var f0=e[1],s0=u(f0[2]),lx=[13,[0,f0[1],s0]];break;case 14:var v0=e[1],o0=u(v0[4]),lx=[14,[0,v0[1],v0[2],v0[3],o0]];break;case 15:var c0=e[1],T0=u(c0[5]),lx=[15,[0,c0[1],c0[2],c0[3],c0[4],T0]];break;case 16:var E0=e[1],M0=u(E0[4]),lx=[16,[0,E0[1],E0[2],E0[3],M0]];break;case 17:var Y0=e[1],rx=u(Y0[3]),lx=[17,[0,Y0[1],Y0[2],rx]];break;case 18:var lx=[18,[0,u(e[1][1])]];break;case 19:var g0=e[1],H0=u(g0[3]),lx=[19,[0,g0[1],g0[2],H0]];break;case 20:var t0=e[1],ex=u(t0[3]),lx=[20,[0,t0[1],t0[2],ex]];break;case 21:var xx=e[1],ax=u(xx[5]),lx=[21,[0,xx[1],xx[2],xx[3],xx[4],ax]];break;case 22:var dx=e[1],mx=u(dx[3]),lx=[22,[0,dx[1],dx[2],mx]];break;case 23:var L0=e[1],C0=u(L0[5]),lx=[23,[0,L0[1],L0[2],L0[3],L0[4],C0]];break;case 24:var A0=e[1],U0=u(A0[5]),lx=[24,[0,A0[1],A0[2],A0[3],A0[4],U0]];break;case 25:var Q0=e[1],H=u(Q0[5]),lx=[25,[0,Q0[1],Q0[2],Q0[3],Q0[4],H]];break;case 26:var b=e[1],B=b[10],a0=u(b[9]),lx=[26,[0,b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],a0,B]];break;case 27:var m0=e[1],P0=u(m0[4]),lx=[27,[0,m0[1],m0[2],m0[3],P0]];break;case 28:var D=e[1],N0=u(D[5]),lx=[28,[0,D[1],D[2],D[3],D[4],N0]];break;case 29:var X0=e[1],D0=u(X0[5]),lx=[29,[0,X0[1],X0[2],X0[3],X0[4],D0]];break;case 30:var ox=e[1],b0=u(ox[3]),lx=[30,[0,ox[1],ox[2],b0]];break;case 31:var kx=e[1],V0=kx[3],h=u(kx[2]),lx=[31,[0,kx[1],h,V0]];break;case 32:var X=e[1],W0=X[4],sx=u(X[3]),lx=[32,[0,X[1],X[2],sx,W0]];break;case 33:var tx=e[1],j0=u(tx[2]),lx=[33,[0,tx[1],j0]];break;case 34:var Px=e[1],Ex=u(Px[4]),lx=[34,[0,Px[1],Px[2],Px[3],Ex]];break;case 35:var Ox=e[1],qx=u(Ox[4]),lx=[35,[0,Ox[1],Ox[2],Ox[3],qx]];break;case 36:var B0=e[1],rr=u(B0[5]),lx=[36,[0,B0[1],B0[2],B0[3],B0[4],rr]];break;case 37:var Ux=e[1],K0=u(Ux[3]),lx=[37,[0,Ux[1],Ux[2],K0]];break;case 38:var nr=e[1],z0=u(nr[3]),lx=[38,[0,nr[1],nr[2],z0]];break;default:var or=e[1],jr=u(or[3]),lx=[39,[0,or[1],or[2],jr]]}return[0,t,lx]};my(Ys0,function(x){var r=YI(x,Ms0),e=XI(js0),t=e.length-1,u=iX.length-1,i=za(t+u|0,0),f=t-1|0,o=0;if(f>=0)for(var a=o;;){var d=Hl(x,W1(e,a)[1+a]);W1(i,a)[1+a]=d;var k=a+1|0;if(f!==a){var a=k;continue}break}var T=u-1|0,g=0;if(T>=0)for(var A=g;;){var N=A+t|0,R=YI(x,W1(iX,A)[1+A]);W1(i,N)[1+N]=R;var I=A+1|0;if(T!==A){var A=I;continue}break}var M=i[4],L=i[5],z=i[uj],V=i[_g],Z=i[295],$=i[296],i0=i[44],U=i[Q3],J=i[IB],Y=JI(x,0,0,fX,QI,1)[1];function F(o0,c0,T0){return p(o0[1][1+z],o0,T0[2]),T0}function n0(o0,c0){return p(o0[1][1+V],o0,c0),c0}function Q(o0,c0){var T0=c0[1],E0=o0[1+$];if(E0){var M0=qs(E0[1][1][2],T0[2])<0?1:0,Y0=M0&&(o0[1+$]=[0,c0],0);return Y0}var rx=0<=qs(T0[2],o0[1+r][3])?1:0,g0=rx&&(o0[1+$]=[0,c0],0);return g0}function f0(o0,c0){var T0=c0[1],E0=o0[1+Z];if(E0){var M0=qs(T0[2],E0[1][1][2])<0?1:0,Y0=M0&&(o0[1+Z]=[0,c0],0);return Y0}var rx=qs(T0[2],o0[1+r][2])<0?1:0,g0=rx&&(o0[1+Z]=[0,c0],0);return g0}function s0(o0,c0){return c0?p(o0[1][1+V],o0,c0[1]):0}function v0(o0,c0){var T0=c0[2],E0=c0[1];return C2(l(o0[1][1+L],o0),E0),C2(l(o0[1][1+M],o0),T0)}return zI(x,[0,U,function(o0){return[0,o0[1+Z],o0[1+$]]},V,v0,z,s0,L,f0,M,Q,i0,n0,J,F]),function(o0,c0,T0){var E0=ky(c0,x);return E0[1+r]=T0,l(Y,E0),E0[1+Z]=0,E0[1+$]=0,VI(c0,E0,x)}});var BV=function(x){var r=K(x),e=0;if(typeof r=="number"){var t=r;if(49<=t)switch(t){case 49:var u=_o0;break;case 50:var u=wo0;break;case 51:var u=To0;break;case 52:var u=So0;break;case 53:var u=Eo0;break;case 54:var u=go0;break;case 55:var u=Ao0;break;case 56:var u=Po0;break;case 57:var u=Co0;break;case 58:var u=No0;break;case 59:var u=Ro0;break;case 60:var u=Io0;break;case 61:var u=Oo0;break;case 62:var u=Lo0;break;case 63:var u=Mo0;break;case 64:var u=Do0;break;case 65:var u=jo0;break;case 114:var u=Uo0;break;case 115:var u=Bo0;break;case 116:var u=Yo0;break;case 117:var u=Xo0;break;case 118:var u=Jo0;break;case 119:var u=Vo0;break;case 120:var u=zo0;break;case 121:var u=Ko0;break;case 122:var u=Zo0;break;case 123:var u=Wo0;break;case 124:var u=$o0;break;case 125:var u=Qo0;break;case 126:var u=Fo0;break;case 128:var u=Ho0;break;case 129:var u=qo0;break;default:e=1}else switch(t){case 15:var u=Xs0;break;case 16:var u=Js0;break;case 17:var u=Vs0;break;case 18:var u=zs0;break;case 19:var u=Ks0;break;case 20:var u=Zs0;break;case 21:var u=Ws0;break;case 22:var u=$s0;break;case 23:var u=Qs0;break;case 24:var u=Fs0;break;case 25:var u=Hs0;break;case 26:var u=qs0;break;case 27:var u=Gs0;break;case 28:var u=bs0;break;case 29:var u=xo0;break;case 30:var u=ro0;break;case 31:var u=eo0;break;case 32:var u=to0;break;case 33:var u=no0;break;case 34:var u=uo0;break;case 35:var u=io0;break;case 36:var u=fo0;break;case 37:var u=co0;break;case 38:var u=so0;break;case 39:var u=oo0;break;case 40:var u=vo0;break;case 41:var u=ao0;break;case 42:var u=lo0;break;case 43:var u=po0;break;case 44:var u=do0;break;case 45:var u=yo0;break;case 46:var u=mo0;break;case 47:var u=ko0;break;case 48:var u=ho0;break;default:e=1}}else switch(r[0]){case 4:var u=r[2];break;case 11:var i=r[1]?Go0:bo0,u=i;break;default:e=1}if(e){g1(xv0,x);var u=rv0}return Z0(x),u},S2=function(x){var r=gx(x),e=_0(x),t=BV(x);return[0,r,[0,t,y0([0,e],[0,yx(x)],0)]]},YV=function(x){var r=gx(x),e=_0(x);u0(x,14);var t=gx(x),u=BV(x),i=y0([0,e],[0,yx(x)],0),f=Fr(r,t),o=t[2],a=r[3],d=a[1]===o[1]?1:0,k=d&&(a[2]===o[2]?1:0);return 1-k&&ux(x,[0,f,Eo]),[0,f,[0,u,i]]},Fv=function(x){var r=x[2],e=r[3]===0?1:0,t=r[2];if(!e)return e;for(var u=t;;){if(!u)return 1;var i=u[1][2],f=0,o=u[2];if(i[1][2][0]===2&&!i[2]){var a=1;f=1}if(!f)var a=0;if(!a)return a;var u=o}},y6=function(x){for(var r=x;;){var e=r[2];if(e[0]!==30)return 0;var t=e[1][2];if(t[2][0]===26)return 1;var r=t}},u9=function(x,r,e){var t=e[2][1],u=e[1];if(!P(t,Pv)){var i=r[19];return i&&ux(r,[0,u,6])}if(P(t,ka)){if(!P(t,Y2))return r[18]?ux(r,[0,u,ot]):yt(r,[0,u,85])}else if(r[14])return ux(r,[0,u,[24,gy(t)]]);if(i3(t))return yt(r,[0,u,85]);if(by(t))return ux(r,[0,u,ot]);if(x){var f=x[1];if($v(t))return yt(r,[0,u,f])}return 0},l0=function(x,r,e){var t=x?x[1]:gx(e),u=l(r,e),i=u3(e),f=i?Fr(t,i[1]):t;return[0,f,u]},i9=function(x,r,e){var t=l0(x,r,e),u=t[2];return[0,[0,t[1],u[1]],u[2]]},f9=function(x){V1(x,0);var r=K(x);$1(x);var e=pr(1,x),t=0;if(typeof r=="number")r===21&&(t=1);else if(r[0]===4)if(P(r[3],ha))t=1;else{var u=0;typeof e=="number"?e===21&&(u=1):e[0]===4&&(u=1),t=u?2:1}var i=0;switch(t){case 1:typeof e=="number"?h1===e&&(i=1):e[0]===4&&!P(e[3],kl)&&(i=1);break;case 0:break;default:i=1}return i?1:0},XV=function(x){switch(x){case 3:return 2;case 4:return 1;case 5:return 1;case 6:return 1;case 7:return 1;default:return 1}},TO=function(x,r,e){if(e){var t=e[1],u=0;if(t===8232||G1===t)u=1;else var i=t===10?6:t===13?5:fl<=t?3:hN<=t?2:h1<=t?1:0;if(u)var i=7;var f=i}else var f=4;return[0,f,x]},jS0=[qr,Mv0,Js(0)],JV=function(x,r,e,t){try{var u=W1(x,r)[1+r];return u}catch(f){var i=L1(f);throw i[1]===iI?q0([0,jS0,e,G0(Tr(Ov0),t,r,x.length-1)],1):q0(i,0)}},c9=function(x,r){if(r[1]===0&&r[2]===0)return 0;var e=JV(x,r[1]-1|0,r,Rv0);return JV(e,r[2],r,Iv0)},VV=function(x){var r=[0,ua0,T2[1],0,0];function e(o){var a=K(o);if(typeof a=="number"){var d=0;if(8<=a?10>a&&(d=1):a===1&&(d=1),d)return 1}return 0}function t(o){var a=gx(o),d=_0(o),k=K(o);if(typeof k=="number")switch(k){case 30:case 31:Z0(o);var T=yx(o);return e(o)?[1,a,[0,k===31?1:0,y0([0,d],[0,T],0)]]:[0,a]}else switch(k[0]){case 0:var g=k[2],A=G0(x[24],o,k[1],g),N=yx(o);return e(o)?[2,a,[0,A,g,y0([0,d],[0,N],0)]]:[0,a];case 1:var R=k[2],I=G0(x[26],o,k[1],R),M=yx(o);return e(o)?[4,a,[0,I,R,y0([0,d],[0,M],0)]]:[0,a];case 2:var L=k[1],z=L[1],V=L[3],Z=L[2];L[4]&&$t(o,81),Z0(o);var $=yx(o);return e(o)?[3,z,[0,Z,V,y0([0,d],[0,$],0)]]:[0,z]}return Z0(o),[0,a]}function u(o){var a=S2(o),d=K(o),k=0;if(typeof d=="number")if(d===82){u0(o,82);var T=t(o)}else if(d===86){zx(o,[8,a[2][1]]),u0(o,86);var T=t(o)}else k=1;else k=1;if(k)var T=0;return[0,a,T]}var i=0;function f(o,a,d,k,T,g,A){var N=ns(T),R=ns(g);function I(L){return[2,[0,[0,g],d,k,A]]}function M(L){return[2,[0,[1,T],d,k,A]]}return N===0?I(0):R===0?M(0):N>>0){if(D2>=i0+1>>>0){var U=Z[3],J=Z[4],Y=Ax(Z[1][5]),F=Ax(Z[1][4]),n0=Ax(Z[1][3]),Q=Ax(Z[1][2]),f0=Ax(Z[1][1]),s0=Fx(J,_0(R));u0(R,1);var v0=K(R),o0=0;if(typeof v0=="number"){var c0=0;if(v0===1||Nr===v0?c0=1:o0=1,c0)var T0=yx(R)}else o0=1;if(o0)var T0=Z2(R)?Ko(R):0;var E0=J1([0,V],[0,T0],s0,0);if(z){switch(z[1]){case 0:var M0=[0,[0,f0,1,U,E0]];break;case 1:var M0=[1,[0,Q,1,U,E0]];break;case 2:var M0=f(R,g,1,U,n0,Y,E0);break;case 3:var M0=[3,[0,Y,U,E0]];break;default:var M0=[4,[0,F,1,U,E0]]}var Y0=M0}else{var rx=ns(f0),g0=ns(Q),H0=ns(n0),t0=ns(Y),ex=function(x0){return[2,[0,bv0,0,U,E0]]},xx=0;if(rx===0&&g0===0){var ax=0;if(H0===0&&t0===0)var dx=ex(0);else ax=1;if(ax)var dx=f(R,g,0,U,n0,Y,E0)}else xx=1;if(xx){var mx=0;if(g0===0&&H0===0&&t0<=rx){C2(function(e0){return ux(R,[0,e0[1],[3,g,e0[2][1][2][1]]])},Y);var dx=[0,[0,f0,0,U,E0]];mx=1}if(!mx){var L0=0;if(rx===0&&H0===0&&t0<=g0){C2(function(e0){return ux(R,[0,e0[1],[11,g,e0[2][1][2][1]]])},Y);var dx=[1,[0,Q,0,U,E0]];L0=1}if(!L0){ux(R,[0,A,[5,g]]);var dx=ex(0)}}}var Y0=dx}return Y0}}else if(i0===10){var C0=gx(R),A0=_0(R);Z0(R);var U0=K(R),Q0=0;if(typeof U0=="number"){var H=U0-2|0,b=0;if(B1>>0)D2>=H+1>>>0&&(b=1);else if(H===7){u0(R,9);var B=K(R),a0=0;if(typeof B=="number"){var m0=0;if((B===1||Nr===B)&&(m0=1),m0){var P0=1;a0=1}}if(!a0)var P0=0;ux(R,[0,C0,[6,P0]]),b=1}b&&(Q0=1)}Q0||ux(R,[0,C0,Gv0]);var Z=[0,Z[1],Z[2],1,A0];continue}}var D=Z[2],N0=Z[1],X0=l0(i,u,R),D0=X0[2],ox=D0[2],b0=D0[1],kx=X0[1],V0=b0[2][1],h=b0[1];if(Ar(V0,hx))var X=Z;else{var W0=O1(V0,0),sx=97<=W0?1:0,tx=sx&&(W0<=br?1:0);tx&&ux(R,[0,h,[10,g,V0]]),p(T2[3],V0,D)&&ux(R,[0,h,[4,g,V0]]);var j0=Z[4],Px=Z[3],Ex=p(T2[4],V0,D),Ox=[0,Z[1],Ex,Px,j0],qx=function(w){return function(x0,e0){return z&&z[1]!==x0?ux(R,[0,e0,[9,g,z,w]]):0}}(V0);if(typeof ox=="number"){var B0=0;if(z)switch(z[1]){case 0:ux(R,[0,kx,[3,g,V0]]);var X=Ox;break;case 1:ux(R,[0,kx,[11,g,V0]]);var X=Ox;break;case 4:ux(R,[0,kx,[2,g,V0]]);var X=Ox;break;default:B0=1}else B0=1;if(B0)var X=[0,[0,N0[1],N0[2],N0[3],N0[4],[0,[0,kx,[0,b0]],N0[5]]],Ex,Px,j0]}else switch(ox[0]){case 0:ux(R,[0,ox[1],[9,g,z,V0]]);var X=Ox;break;case 1:var rr=ox[1],Ux=ox[2];qx(0,rr);var X=[0,[0,[0,[0,kx,[0,b0,[0,rr,Ux]]],N0[1]],N0[2],N0[3],N0[4],N0[5]],Ex,Px,j0];break;case 2:var K0=ox[1],nr=ox[2];qx(1,K0);var X=[0,[0,N0[1],[0,[0,kx,[0,b0,[0,K0,nr]]],N0[2]],N0[3],N0[4],N0[5]],Ex,Px,j0];break;case 3:var z0=ox[1],or=ox[2];qx(2,z0);var X=[0,[0,N0[1],N0[2],[0,[0,kx,[0,b0,[0,z0,or]]],N0[3]],N0[4],N0[5]],Ex,Px,j0];break;default:var jr=ox[1],lx=ox[2];qx(4,jr);var X=[0,[0,N0[1],N0[2],N0[3],[0,[0,kx,[0,b0,[0,jr,lx]]],N0[4]],N0[5]],Ex,Px,j0]}}var v1=K(R),K1=0;if(typeof v1=="number"){var w1=v1-2|0,Cr=0;B1>>0?D2>=w1+1>>>0&&(Cr=1):w1===6&&(zx(R,22),u0(R,8),Cr=1),Cr&&(K1=1)}K1||u0(R,9);var Z=X}},a);return[0,T,N,y0([0,k],0,0)]}]},s9=function(x,r,e){if(typeof e=="number")return[0,x,r];if(e[0]===0){var t=e[1],u=Tx(x,t),i=e[2];return u===0?i===r?e:[0,t,r]:0<=u?[1,2,x,r,e,0]:[1,2,x,r,0,e]}var f=e[5],o=e[4],a=e[3],d=e[2],k=Tx(x,d),T=e[1];if(k===0)return a===r?e:[1,T,x,r,o,f];if(0<=k){var g=s9(x,r,f);return f===g?e:mJ(o,d,a,g)}var A=s9(x,r,o);return o===A?e:mJ(A,d,a,f)},s3=function(x){return[0,bs(x)]},SO=gJ([0,function(x,r){var e=r[2],t=x[2],u=IJ(x[1],r[1]);return u===0?p(OJ,t,e):u}]),m6=function(x,r,e){var t=e[2][1],u=e[1];return Ar(t,hx)?r:p(T2[3],t,r)?(ux(x,[0,u,[0,t]]),r):p(T2[4],t,r)},EO=function(x){return function(r){var e=r[2];switch(e[0]){case 0:var t=e[1][1];return r2(function(i,f){var o=f[0]===0?f[1][2][2]:f[1][2][1];return l(EO(i),o)},x,t);case 1:var u=e[1][1];return r2(function(i,f){if(f[0]===2)return i;var o=f[1][2][1];return l(EO(i),o)},x,u);case 2:return[0,e[1][1],x];default:return Nx(f60)}}},px=xJ(s60,c60[1]),o9=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0,i=gx(e),f=K(e);if(typeof f=="number")switch(f){case 103:var o=_0(e);return Z0(e),[0,[0,i,[0,0,y0([0,o],0,0)]]];case 104:var a=_0(e);return Z0(e),[0,[0,i,[0,1,y0([0,a],0,0)]]];case 126:if(t){var d=_0(e);return Z0(e),[0,[0,i,[0,2,y0([0,d],0,0)]]]}break}else if(f[0]===4){var k=f[3];if(P(k,Po)){if(!P(k,A_)&&u&&x9(1,e)){var T=_0(e);return Z0(e),[0,[0,i,[0,4,y0([0,T],0,0)]]]}}else if(u&&x9(1,e)){var g=_0(e);Z0(e);var A=K(e),N=0;if(typeof A!="number"&&A[0]===4&&!P(A[3],A_)){var R=gx(e);Z0(e);var I=Fr(i,R),M=5;N=1}if(!N)var I=i,M=3;return[0,[0,I,[0,M,y0([0,g],0,0)]]]}}return 0},zV=function(x,r,e,t,u){r===1&&$t(u,81);var i=_0(u);Z0(u);var f=yx(u);if(x)var o=y0([0,Fx(x[1],i)],[0,f],0),a=o,d=Qx(Nv0,t),k=-e;else var a=y0([0,i],[0,f],0),d=t,k=e;return[30,[0,k,d,a]]},KV=function(x,r,e,t){var u=_0(t);Z0(t);var i=yx(t);if(x)var f=y0([0,Fx(x[1],u)],[0,i],0),o=Qx(Cv0,e),a=f,d=o,k=uy(qR,r);else var a=y0([0,u],[0,i],0),d=e,k=r;return[31,[0,k,d,a]]},Zr=function x(r){return x.fun(r)},o3=function x(r){return x.fun(r)},ZV=function x(r){return x.fun(r)},WV=function x(r){return x.fun(r)},gO=function x(r,e,t){return x.fun(r,e,t)},v9=function x(r){return x.fun(r)},AO=function x(r,e,t,u){return x.fun(r,e,t,u)},PO=function x(r){return x.fun(r)},CO=function x(r,e,t,u){return x.fun(r,e,t,u)},NO=function x(r){return x.fun(r)},RO=function x(r,e){return x.fun(r,e)},a9=function x(r){return x.fun(r)},$V=function x(r){return x.fun(r)},l9=function x(r,e,t,u){return x.fun(r,e,t,u)},p9=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},QV=function x(r){return x.fun(r)},FV=function x(r,e){return x.fun(r,e)},IO=function x(r){return x.fun(r)},HV=function x(r){return x.fun(r)},qV=function x(r){return x.fun(r)},GV=function x(r){return x.fun(r)},bV=function x(r){return x.fun(r)},OO=function x(r,e){return x.fun(r,e)},xz=function x(r){return x.fun(r)},rz=function x(r){return x.fun(r)},LO=function x(r){return x.fun(r)},k6=function x(r,e){return x.fun(r,e)},ez=function x(r){return x.fun(r)},eo=function x(r){return x.fun(r)},d9=function x(r){return x.fun(r)},tz=function x(r,e){return x.fun(r,e)},MO=function x(r){return x.fun(r)},nz=function x(r){return x.fun(r)},uz=function x(r){return x.fun(r)},iz=function x(r){return x.fun(r)},fz=function x(r){return x.fun(r)},y9=function x(r,e,t,u){return x.fun(r,e,t,u)},DO=function x(r){return x.fun(r)},m9=function x(r){return x.fun(r)},jO=function x(r,e){return x.fun(r,e)},k9=function x(r,e,t,u){return x.fun(r,e,t,u)},UO=function x(r){return x.fun(r)},Zo=function x(r){return x.fun(r)},cz=function x(r){return x.fun(r)},Hv=function x(r){return x.fun(r)},h9=function x(r){return x.fun(r)},_9=function x(r){return x.fun(r)},BO=function x(r,e){return x.fun(r,e)},sz=function x(r,e){return x.fun(r,e)},oz=function x(r){return x.fun(r)},vz=function x(r){return x.fun(r)},w9=function x(r){return x.fun(r)},az=function x(r,e,t){return x.fun(r,e,t)};I0(Zr,function(x){return l(WV,x)}),I0(o3,function(x){return 1-_1(x)&&zx(x,xe),l0(0,function(r){return u0(r,86),l(Zr,r)},x)}),I0(ZV,function(x){1-_1(x)&&zx(x,xe);var r=gx(x);return u0(x,86),f9(x)?[2,p(jO,x,r)]:[1,l0([0,r],Zr,x)]}),I0(WV,function(x){var r=gx(x),e=lO(0,x);return G0(gO,e,r,l(v9,e))}),I0(gO,function(x,r,e){var t=K(x);return typeof t=="number"&&t===41?l0([0,r],function(u){u0(u,41);var i=l(v9,lO(1,u));e9(u,85);var f=l(Zr,u);e9(u,86);var o=l(Zr,u);return[17,[0,e,i,f,o,y0(0,[0,yx(u)],0)]]},x):e}),I0(v9,function(x){var r=gx(x);if(K(x)===89){var e=_0(x);Z0(x);var t=e}else var t=0;return ve(AO,x,[0,t],r,l(PO,x))}),I0(AO,function(x,r,e,t){var u=r?r[1]:0;if(K(x)!==89)return t;var i=[0,t,0];return l0([0,e],function(f){for(var o=i;;){if(o1(f,89)){var o=[0,l(PO,f),o];continue}var a=Ax(o);if(a){var d=a[2];if(d){var k=d[2],T=d[1],g=a[1];return[22,[0,[0,g,T,k],y0([0,u],0,0)]]}}throw q0([0,wr,Pv0],1)}},x)}),I0(PO,function(x){var r=gx(x);if(K(x)===91){var e=_0(x);Z0(x);var t=e}else var t=0;return ve(CO,x,[0,t],r,l(NO,x))}),I0(CO,function(x,r,e,t){var u=r?r[1]:0;if(K(x)!==91)return t;var i=[0,t,0];return l0([0,e],function(f){for(var o=i;;){if(o1(f,91)){var o=[0,l(NO,f),o];continue}var a=Ax(o);if(a){var d=a[2];if(d){var k=d[2],T=d[1],g=a[1];return[23,[0,[0,g,T,k],y0([0,u],0,0)]]}}throw q0([0,wr,Av0],1)}},x)}),I0(NO,function(x){return p(RO,x,l(a9,x))}),I0(RO,function(x,r){var e=K(x);if(typeof e=="number"&&e===11&&!x[15]){var t=p(k6,x,r);return ve(y9,x,t[1],0,[0,t[1],[0,0,[0,t,0],0,0]])}return r}),I0(a9,function(x){var r=K(x);return typeof r=="number"&&r===85?l0(0,function(e){var t=_0(e);u0(e,85);var u=y0([0,t],0,0);return[11,[0,l(a9,e),u]]},x):l($V,x)}),I0($V,function(x){var r=gx(x);return ve(l9,0,x,r,l(qV,x))}),I0(l9,function(x,r,e,t){var u=x?x[1]:0;if(Z2(r))return t;var i=K(r);if(typeof i=="number"){if(i===6)return Z0(r),Xe(p9,u,0,r,e,t);if(i===10){var f=pr(1,r);return typeof f=="number"&&f===6?(zx(r,Ev0),u0(r,10),u0(r,6),Xe(p9,u,0,r,e,t)):(zx(r,gv0),t)}if(i===83)return Z0(r),K(r)!==6&&zx(r,46),u0(r,6),Xe(p9,1,1,r,e,t)}return t}),I0(p9,function(x,r,e,t,u){return ve(l9,[0,x],e,t,l0([0,t],function(i){if(!r&&o1(i,7))return[16,[0,u,y0(0,[0,yx(i)],0)]];var f=l(Zr,i);u0(i,7);var o=[0,u,f,y0(0,[0,yx(i)],0)];return x?[21,[0,o,r]]:[20,o]},e))}),I0(QV,function(x){return p(FV,x,p(px[13],0,x))}),I0(FV,function(x,r){for(var e=[0,r[1],[0,r]];;){var t=e[2],u=e[1];if(K(x)===10&&NV(1,x)){var i=l0([0,u],function(a){return function(d){return u0(d,10),[0,a,S2(d)]}}(t),x),f=i[1],e=[0,f,[1,[0,f,i[2]]]];continue}return t}}),I0(IO,function(x){if(V1(x,0),K(x)===4){Z0(x);var r=l(IO,x);u0(x,5);var e=r}else var e=vs(x)?[0,l(QV,x)]:(zx(x,51),0);return $1(x),e}),I0(HV,function(x){return l0(0,function(r){var e=_0(r);u0(r,46);var t=l(IO,r);if(!t)return Sv0;var u=t[1],i=Z2(r)?0:l(h9,r);return[24,[0,u,i,y0([0,e],0,0)]]},x)}),I0(qV,function(x){var r=gx(x),e=K(x),t=0;if(typeof e=="number")switch(e){case 4:return l(iz,x);case 6:return l(rz,x);case 46:return l(HV,x);case 53:return l0(0,function($){var i0=_0($);Z0($);var U=l(UO,$),J=U[2],Y=U[1];return[15,[0,J,Y,y0([0,i0],0,0)]]},x);case 98:return l(fz,x);case 104:return l0(0,GV,x);case 106:var u=_0(x);return Z0(x),[0,r,[10,y0([0,u],[0,yx(x)],0)]];case 125:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l(Zr,$);return[25,[0,J,y0([0,i0],[0,U],0)]]},x);case 126:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l(Zr,$);return[27,[0,J,y0([0,i0],[0,U],0)]]},x);case 127:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l0(0,function(Y){var F=l(Zo,Y);function n0(Q){if(1-o1(Q,41))throw q0(as,1);var f0=l(v9,Q);if(!Q[16]&&K(Q)===85)throw q0(as,1);return[1,[0,f0[1],f0]]}return[0,F,t9(Y,[0,gx(Y)],n0),1,0,0]},$);return[18,[0,J,y0([0,i0],[0,U],0)]]},x);case 0:case 2:var i=ve(k9,0,1,1,x);return[0,i[1],[14,i[2]]];case 130:case 131:t=2;break;case 41:case 42:t=1;break;case 30:case 31:var f=_0(x);return Z0(x),[0,r,[32,[0,e===31?1:0,y0([0,f],[0,yx(x)],0)]]]}else switch(e[0]){case 2:var o=e[1],a=o[3],d=o[2],k=o[1];o[4]&&$t(x,81);var T=_0(x);return Z0(x),[0,k,[29,[0,d,a,y0([0,T],[0,yx(x)],0)]]];case 4:var g=e[3];if(P(g,_o))P(g,C1)?t=1:t=2;else{if(x[28][1])return l0(0,function($){var i0=_0($);ro($,hv0);var U=ue($,l(Hv,$)),J=l(MO,$);if(hO($))var n0=wO($,l(w9,$)),Q=J;else var Y=l(w9,$),F=R1($)[2],n0=Y,Q=p(F,J,function(f0,s0){return p(Gx(f0,420776873,12),f0,s0)});return[13,[0,U,Q,n0,y0([0,i0],0,0)]]},x);t=1}break;case 7:if(!P(e[1],V3))return zx(x,89),[0,r,_v0];break;case 12:var A=e[3],N=e[2],R=e[1],I=0;return l0(0,function($){return zV(I,R,N,A,$)},x);case 13:var M=e[3],L=e[2],z=0;return l0(0,function($){return KV(z,L,M,$)},x)}switch(t){case 0:var V=l(xz,x);return V?[0,r,V[1]]:(g1(wv0,x),[0,r,Tv0]);case 2:return l0(0,function($){return[26,l(LO,$)]},x);default:var Z=l(_9,x);return[0,Z[1],[19,Z[2]]]}}),I0(GV,function(x){var r=_0(x);Z0(x);var e=K(x);if(typeof e!="number")switch(e[0]){case 12:return zV([0,r],e[1],e[2],e[3],x);case 13:return KV([0,r],e[2],e[3],x)}return g1(mv0,x),kv0}),I0(bV,function(x){var r=0;if(typeof x=="number")switch(x){case 29:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:case 123:case 124:r=1;break}else x[0]===11&&(r=1);return r?1:0}),I0(OO,function(x,r){var e=_0(x),t=l0(0,Z0,x)[1],u=y0([0,e],[0,yx(x)],0);return[0,[19,[0,[0,wn(0,[0,t,r])],0,u]]]}),I0(xz,function(x){var r=_0(x),e=K(x);if(typeof e=="number")switch(e){case 29:return Z0(x),[0,[4,y0([0,r],[0,yx(x)],0)]];case 114:return Z0(x),[0,[0,y0([0,r],[0,yx(x)],0)]];case 115:return Z0(x),[0,[1,y0([0,r],[0,yx(x)],0)]];case 116:return Z0(x),[0,[2,y0([0,r],[0,yx(x)],0)]];case 117:return Z0(x),[0,[5,y0([0,r],[0,yx(x)],0)]];case 118:return Z0(x),[0,[6,y0([0,r],[0,yx(x)],0)]];case 119:return Z0(x),[0,[7,y0([0,r],[0,yx(x)],0)]];case 120:return Z0(x),[0,[3,y0([0,r],[0,yx(x)],0)]];case 121:return Z0(x),[0,[9,y0([0,r],[0,yx(x)],0)]];case 122:return Z0(x),[0,[33,y0([0,r],[0,yx(x)],0)]];case 123:return Z0(x),[0,[34,y0([0,r],[0,yx(x)],0)]];case 124:return Z0(x),[0,[35,y0([0,r],[0,yx(x)],0)]];case 128:return p(OO,x,dv0);case 129:return p(OO,x,yv0)}else if(e[0]===11){var t=e[1];Z0(x);var u=yx(x),i=t?-883944824:737456202;return[0,[8,i,y0([0,r],[0,u],0)]]}return 0}),I0(rz,function(x){return l0(0,function(r){var e=_0(r);u0(r,6);for(var t=Wv(0,r),u=0;;){var i=K(t);if(typeof i=="number"){var f=0;if(i!==7&&Nr!==i&&(f=1),!f){var o=Ax(u);return u0(r,7),[28,[0,o,y0([0,e],[0,yx(r)],0)]]}}var a=[0,l0(0,function(k){if(!o1(k,12)){var T=K(k),g=0;if(typeof T=="number"&&(nn===T||jt===T&&Vo(1,k))){var A=o9(0,0,k);g=1}if(!g)var A=0;var N=vs(k),R=pr(1,k);if(N&&typeof R=="number"&&1>=R+Ms>>>0){var I=S2(k),M=o1(k,85);return u0(k,86),[1,[0,I,l(Zr,k),A,M]]}var L=A?1:0;return L&&zx(k,50),[0,l(Zr,k)]}var z=vs(k),V=pr(1,k),Z=0;if(z&&typeof V=="number"&&1>=V+Ms>>>0){var $=S2(k);K(k)===85&&(zx(k,49),Z0(k)),u0(k,86);var i0=[0,$];Z=1}if(!Z)var i0=0;return[2,[0,i0,l(Zr,k)]]},t),u];K(t)!==7&&u0(t,9);var u=a}},x)}),I0(LO,function(x){var r=_0(x),e=K(x),t=0;if(typeof e=="number")switch(e){case 130:var u=1;break;case 131:var u=2;break;default:t=1}else if(e[0]===4&&!P(e[3],C1))var u=0;else t=1;if(t)var u=Nx(pv0);var i=gx(x);Z0(x);var f=yx(x),o=l(a9,x);return[0,i,o,y0([0,r],[0,f],0),u]}),I0(k6,function(x,r){return[0,r[1],[0,0,r,0]]}),I0(ez,function(x){return l0(0,function(r){V1(r,0);var e=p(px[13],0,r);$1(r),1-_1(r)&&zx(r,xe);var t=o1(r,85);return u0(r,86),[0,[0,e],l(Zr,r),t]},x)});var lz=function(x){var r=pr(1,x);return typeof r=="number"&&1>=r+Ms>>>0?l(ez,x):p(k6,x,l(Zr,x))};I0(eo,function(x){var r=0;return function(e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number")switch(i){case 5:case 12:case 113:var f=i===12?[0,l0(0,function(A){var N=_0(A);u0(A,12);var R=y0([0,N],0,0);return[0,lz(A),R]},x)]:0;return[0,t,Ax(u),f,0]}else if(i[0]===4&&!P(i[3],lv)){var o=0;if(pr(1,x)!==86&&pr(1,x)!==85&&(o=1),!o){var a=t!==0?1:0,d=a||(u!==0?1:0);d&&zx(x,94);var k=l0(0,function(N){var R=_0(N);Z0(N),K(N)===85&&zx(N,93);var I=y0([0,R],0,0);return[0,l(o3,N),I]},x);K(x)!==5&&u0(x,9);var t=[0,k];continue}}var T=[0,lz(x),u];K(x)!==5&&u0(x,9);var u=T}}}),I0(d9,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);var t=p(eo,r,0),u=_0(r);u0(r,5);var i=J1([0,e],[0,yx(r)],u,0);return[0,t[1],t[2],t[3],i]},x)}),I0(tz,function(x,r){for(var e=r;;){var t=K(x);if(typeof t=="number"){var u=t-5|0,i=0;if(7>>0?sn===u&&(i=1):5>>0&&(i=1),i){var f=t===12?[0,l0(0,function(d){var k=_0(d);u0(d,12);var T=pr(1,d),g=0;if(typeof T=="number")if(T===85){V1(d,0);var A=p(px[13],0,d);$1(d),u0(d,85),u0(d,86);var R=1,I=[0,A]}else if(T===86){V1(d,0);var N=p(px[13],0,d);$1(d),u0(d,86);var R=0,I=[0,N]}else g=1;else g=1;if(g)var R=0,I=0;var M=l(Zr,d);return[0,I,M,R,y0([0,k],0,0)]},x)]:0;return[0,Ax(e),f,0]}}var o=[0,l0(0,function(d){var k=K(d),T=0;if(typeof k!="number"&&k[0]===2){var g=k[1],A=g[4],N=g[3],R=g[2],I=g[1];A&&$t(d,81),u0(d,[2,[0,I,R,N,A]]);var M=[1,[0,I,[0,R,N,y0(0,[0,yx(d)],0)]]];T=1}if(!T){V1(d,0);var L=p(px[13],0,d);$1(d);var M=[0,L]}var z=o1(d,85);return[0,M,l(o3,d),z]},x),e];K(x)!==5&&u0(x,9);var e=o}}),I0(MO,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);var t=p(tz,r,0),u=_0(r);u0(r,5);var i=J1([0,e],[0,yx(r)],u,0);return[0,t[1],t[2],i]},x)}),I0(nz,function(x){var r=_0(x);u0(x,4);var e=Wv(0,x),t=K(e),u=0;if(typeof t=="number")switch(t){case 5:var a=lv0;break;case 130:var i=pr(1,e),f=0;if(typeof i=="number"&&i===86){var o=[0,p(eo,e,0)];f=1}if(!f)var o=[1,l(Zr,e)];var a=o;break;case 42:u=2;break;case 12:case 113:var a=[0,p(eo,e,0)];break;default:u=1}else if(t[0]===4)if(P(t[3],C1))u=2;else{var d=pr(1,e),k=0;if(typeof d=="number"&&1>=d+Ms>>>0){var T=[0,p(eo,e,0)];k=1}if(!k)var T=[1,l(Zr,e)];var a=T}else u=1;switch(u){case 1:if(l(bV,t)){var g=pr(1,e),A=0;if(typeof g=="number"&&1>=g+Ms>>>0){var N=[0,p(eo,e,0)];A=1}if(!A)var N=[1,l(Zr,e)];var a=N}else var a=[1,l(Zr,e)];break;case 2:var a=l(uz,e);break}if(a[0]===0)var R=a;else{var I=a[1];if(x[15])var M=a;else{var L=K(x),z=0;if(typeof L=="number")if(L===5)var V=pr(1,x)===11?[0,p(eo,x,[0,p(k6,x,I),0])]:[1,I];else if(L===9){u0(x,9);var V=[0,p(eo,x,[0,p(k6,x,I),0])]}else z=1;else z=1;if(z)var V=a;var M=V}var R=M}var Z=_0(x);u0(x,5);var $=yx(x);if(R[0]===0)var i0=R[1],U=J1([0,r],[0,$],Z,0),J=[0,[0,i0[1],i0[2],i0[3],U]];else var J=[1,G0(az,R[1],r,$)];return J}),I0(uz,function(x){var r=pr(1,x);if(typeof r=="number"&&1>=r+Ms>>>0)return[0,p(eo,x,0)];var e=gx(x),t=p(sz,x,l(Zo,x)),u=l(G0(l9,0,x,e),t),i=l(l(RO,x),u),f=l(p(l(CO,x),0,e),i),o=l(p(l(AO,x),0,e),f);return[1,l(p(gO,lO(0,x),e),o)]}),I0(iz,function(x){var r=gx(x),e=l0(0,nz,x),t=e[2],u=e[1];return t[0]===0?ve(y9,x,r,0,[0,u,t[1]]):t[1]}),I0(fz,function(x){var r=gx(x),e=ue(x,l(Hv,x));return ve(y9,x,r,e,l(d9,x))}),I0(y9,function(x,r,e,t){return l0([0,r],function(u){return u0(u,11),[12,[0,e,t,l(DO,u),0]]},x)}),I0(DO,function(x){return f9(x)?[1,l(m9,x)]:[0,l(Zr,x)]}),I0(m9,function(x){return l0(0,function(r){var e=_0(r),t=o1(r,wl);V1(r,0);var u=S2(r);$1(r);var i=K(r),f=0;if(typeof i=="number"&&h1===i){var o=_0(r);u0(r,h1);var a=Fx(o,_0(r)),d=a,k=[0,l(Zr,r)];f=1}if(!f)var d=0,k=0;return[0,t,[0,u,k],J1([0,e],0,d,0)]},x)}),I0(jO,function(x,r){return l0([0,r],m9,x)});var T9=function(x,r,e){return l0([0,r],function(t){var u=l(d9,t);return u0(t,86),[0,e,u,l(DO,t),0]},x)},pz=function(x,r,e,t,u){var i=En(x,t),f=T9(x,r,ue(x,l(Hv,x))),o=[0,f[1],[12,f[2]]],a=[0,i,[0,o],0,e!==0?1:0,0,1,0,y0([0,u],0,0)];return[0,[0,o[1],a]]},S9=function(x,r,e,t,u,i,f){var o=f[2],a=f[1];return 1-_1(x)&&zx(x,xe),[0,l0([0,r],function(d){var k=o1(d,85),T=OV(d,86)?l(Zr,d):[0,a,av0];return[0,o,[0,T],k,t!==0?1:0,u!==0?1:0,0,e,y0([0,i],0,0)]},x)]},h6=function(x,r){var e=K(r);if(typeof e=="number"&&10>e)switch(e){case 1:if(!x)return 0;break;case 3:if(x)return 0;break;case 8:case 9:return Z0(r)}return xo(r,9)},_6=function(x,r){return r?ux(x,[0,r[1][1],D2]):0},w6=function(x,r){return r?ux(x,[0,r[1],99]):0},US0=function(x,r,e,t,u,i,f,o,a){for(var d=e,k=t,T=u,g=i,A=f,N=o;;){var R=K(x);if(typeof R=="number")switch(R){case 6:w6(x,A);var I=pr(1,x);if(typeof I=="number"&&I===6)return _6(x,T),[4,l0([0,a],function(L0){var C0=Fx(N,_0(L0));u0(L0,6),u0(L0,6);var A0=S2(L0);u0(L0,7),u0(L0,7);var U0=K(L0),Q0=0;if(typeof U0=="number"){var H=0;if((U0===4||U0===98)&&(H=1),H){var b=T9(L0,a,ue(L0,l(Hv,L0))),B=0,a0=[0,b[1],[12,b[2]]],m0=1,P0=0;Q0=1}}if(!Q0){var D=o1(L0,85),N0=yx(L0);u0(L0,86);var B=N0,a0=l(Zr,L0),m0=0,P0=D}return[0,A0,a0,P0,g!==0?1:0,m0,y0([0,C0],[0,B],0)]},x)];var M=Fx(N,_0(x));u0(x,6);var L=pr(1,x);return typeof L!="number"&&L[0]===4&&!P(L[3],Po)&&g===0?[5,l0([0,a],function(L0){var C0=l(Zo,L0),A0=C0[1];Z0(L0);var U0=l(Zr,L0);u0(L0,7);var Q0=K(L0),H=0,b=[0,C0,[0,A0],0,0,0];if(typeof Q0=="number"){var B=Q0+JP|0,a0=0;if(1>>0)if(B===-18){Z0(L0);var m0=2}else a0=1;else var m0=B?(Z0(L0),u0(L0,85),1):(Z0(L0),u0(L0,85),0);if(!a0){var P0=m0;H=1}}if(!H)var P0=3;u0(L0,86);var D=l(Zr,L0);return[0,[0,A0,b],D,U0,T,P0,y0([0,M],[0,yx(L0)],0)]},x)]:[2,l0([0,a],function(L0){if(pr(1,L0)===86){var C0=S2(L0);u0(L0,86);var A0=[0,C0]}else var A0=0;var U0=l(Zr,L0);u0(L0,7);var Q0=yx(L0);u0(L0,86);var H=l(Zr,L0);return[0,A0,U0,H,g!==0?1:0,T,y0([0,M],[0,Q0],0)]},x)];case 42:if(d){if(T!==0)throw q0([0,wr,uv0],1);var z=[0,gx(x)],V=Fx(N,_0(x));Z0(x);var d=0,k=0,g=z,N=V;continue}break;case 126:if(T===0){var Z=0;if((Vo(1,x)||pr(1,x)===6)&&(Z=1),Z){var d=0,k=0,T=o9(iv0,0,x);continue}}break;case 103:case 104:if(T===0){var d=0,k=0,T=o9(0,0,x);continue}break;case 4:case 98:return w6(x,A),_6(x,T),[3,l0([0,a],function(L0){var C0=gx(L0),A0=T9(L0,C0,ue(L0,l(Hv,L0)));return[0,A0,g!==0?1:0,y0([0,N],0,0)]},x)]}else if(R[0]===4&&!P(R[3],YN)&&k){if(T!==0)throw q0([0,wr,fv0],1);var $=[0,gx(x)],i0=Fx(N,_0(x));Z0(x);var d=0,k=0,A=$,N=i0;continue}if(g){var U=g[1];if(A)return Nx(cv0);if(typeof R=="number"&&1>=R+Ms>>>0)return S9(x,a,T,0,A,0,[0,U,[3,wn(y0([0,N],0,0),[0,U,sv0])]])}else if(A){var J=A[1];if(typeof R=="number"&&1>=R+Ms>>>0)return S9(x,a,T,g,0,0,[0,J,[3,wn(y0([0,N],0,0),[0,J,ov0])]])}var Y=function(L0){V1(L0,0);var C0=p(px[20],0,L0);return $1(L0),C0},F=_0(x),n0=Y(x),Q=n0[1],f0=n0[2];if(f0[0]===3){var s0=f0[1][2][1],v0=0;if(P(s0,Cv)&&P(s0,ja)&&(v0=1),!v0){var o0=K(x);if(typeof o0=="number"){var c0=o0-5|0;if(92>>0){if(94>=c0+1>>>0)return w6(x,A),_6(x,T),pz(x,a,g,f0,N)}else if(1>=c0+sj>>>0)return S9(x,a,T,g,A,N,[0,Q,f0])}En(x,f0);var T0=Y(x),E0=Ar(s0,Cv),M0=Fx(N,F);return w6(x,A),_6(x,T),[0,l0([0,a],function(L0){var C0=T0[1],A0=En(L0,T0[2]),U0=T9(L0,a,0),Q0=U0[2][2];if(E0){var H=Q0[2],b=0;if(H[1])ux(L0,[0,C0,28]),b=1;else{var B=0;H[2]||H[3]?B=1:b=1,B&&ux(L0,[0,C0,27])}}else{var a0=Q0[2],m0=0;if(a0[1])ux(L0,[0,C0,71]);else{var P0=a0[2],D=0;if(a0[3])ux(L0,[0,C0,70]),D=1;else{var N0=0;P0&&!P0[2]?D=1:N0=1,N0&&(ux(L0,[0,C0,70]),m0=1)}}}var X0=y0([0,M0],0,0),D0=0,ox=0,b0=0,kx=g!==0?1:0,V0=0,h=E0?[1,U0]:[2,U0];return[0,A0,h,V0,kx,b0,ox,D0,X0]},x)]}}var Y0=n0[2],rx=K(x);if(typeof rx=="number"){var g0=0;if(rx!==4&&rx!==98&&(g0=1),!g0)return w6(x,A),_6(x,T),pz(x,a,g,Y0,N)}var H0=g!==0?1:0,t0=0;if(Y0[0]===3){var ex=Y0[1],xx=ex[2][1],ax=0,dx=ex[1];if(r){var mx=0;(Ar(Ev,xx)||H0&&Ar(Ao,xx))&&(mx=1),mx&&(ux(x,[0,dx,[15,xx,H0,0,0]]),t0=1,ax=1)}}return S9(x,a,T,g,A,N,[0,Q,Y0])}};I0(k9,function(x,r,e,t){var u=r&&(K(t)===2?1:0),i=r&&1-u;return l0(0,function(f){var o=_0(f),a=u?2:0;u0(f,a);for(var d=Wv(0,f),k=vv0;;){var T=k[3],g=k[2],A=k[1];if(x&&e)throw q0([0,wr,tv0],1);if(i&&!e)throw q0([0,wr,nv0],1);var N=gx(d),R=K(d);if(typeof R=="number"){var I=0;if(13<=R){if(Nr===R){var M=[0,Ax(A),g,T];I=1}}else if(R)switch(R-1|0){case 0:if(!u){var M=[0,Ax(A),g,T];I=1}break;case 2:if(u){var M=[0,Ax(A),g,T];I=1}break;case 11:if(!e){Z0(d);var L=K(d);if(typeof L=="number"&&10>L)switch(L){case 1:case 3:case 8:case 9:ux(d,[0,N,36]),h6(u,d);continue}var z=mO(d);l(dO(d),z),ux(d,[0,N,Zf]),Z0(d),h6(u,d);continue}var V=_0(d);Z0(d);var Z=K(d),$=0;if(typeof Z=="number"&&10>Z)switch(Z){case 1:case 3:case 8:case 9:h6(u,d);var i0=K(d),U=0;if(typeof i0=="number"){var J=i0-1|0;if(2>=J>>>0)switch(J){case 0:if(i){var M=[0,Ax(A),1,V];I=1,$=1,U=1}break;case 1:break;default:ux(d,[0,N,35]);var M=[0,Ax(A),g,T];I=1,$=1,U=1}}if(!U){ux(d,[0,N,97]);continue}break}if(!$){var Y=[1,l0([0,N],function(T0){return function(E0){var M0=y0([0,T0],0,0);return[0,l(Zr,E0),M0]}}(V),d)];h6(u,d);var k=[0,[0,Y,A],g,T];continue}break}if(I){var F=M[3],n0=M[2],Q=M[1],f0=Fx(F,_0(f)),s0=u?3:1;return u0(f,s0),[0,u,n0,Q,J1([0,o],[0,yx(f)],f0,0)]}}var v0=US0(d,x,x,x,0,0,0,0,N);h6(u,d);var k=[0,[0,v0,A],g,T]}},t)}),I0(UO,function(x){if(o1(x,41))for(var r=0;;){var e=[0,l(_9,x),r],t=K(x);if(typeof t=="number"&&t===9){u0(x,9);var r=e;continue}var u=jV(x,Ax(e));break}else var u=0;return[0,u,ve(k9,0,0,0,x)]}),I0(Zo,function(x){var r=S2(x),e=r[2],t=e[1],u=r[1],i=e[2];return yO(t)&&ux(x,[0,u,It]),[0,u,[0,t,i]]}),I0(cz,function(x){return l0(0,function(r){var e=l(Zo,r),t=K(r),u=0;if(typeof t=="number")if(t===41)var i=1,f=i,o=[1,l0(0,function(a){return Z0(a),l(Zr,a)},r)];else if(t===86)var f=0,o=[1,l(o3,r)];else u=1;else u=1;if(u)var f=0,o=[0,bs(r)];return[0,e,o,f]},x)});var dz=function(x,r){var e=AV(x,r);if(e)var t=e;else{var u=0;if(typeof r=="number"&&1>=r+JP>>>0){var i=1;u=1}if(!u)var i=0;if(!i){var f=0;if(typeof r=="number")switch(r){case 15:case 29:case 30:case 31:case 41:case 42:case 46:case 53:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:case 123:case 124:case 125:case 126:f=1;break}else switch(r[0]){case 4:if(yO(r[3]))return 1;break;case 11:f=1;break}return f?1:0}var t=i}return t};I0(Hv,function(x){if(K(x)!==98)return 0;1-_1(x)&&zx(x,xe);var r=l0(0,function(t){var u=_0(t);u0(t,98);for(var i=0,f=0;;){if(dz(t,K(t)))var o=i9(0,function(Z){return function($){var i0=o9(0,ev0,$),U=l(cz,$),J=U[2],Y=J[3],F=J[2],n0=J[1],Q=U[1],f0=K($),s0=0;if(typeof f0=="number"&&f0===82){Z0($);var v0=1,o0=[0,l(Zr,$)];s0=1}if(!s0){Z&&ux($,[0,Q,57]);var v0=Z,o0=0}return[0,[0,n0,F,Y,i0,o0],v0]}}(i),t),a=o[2],d=[0,o[1],f];else var a=i,d=f;var k=K(t),T=0;if(typeof k=="number"){var g=k+LB|0;if(14>>0){if(g===-90){Z0(t);var i=a,f=d;continue}}else if(12>>0){var A=Ax(d);T=1}}if(!T){var N=0;if(typeof k=="number")switch(k){case 4:case 82:N=2;break}else if(k[0]===4){var R=k[3],I=0;if(by(R))I=1;else{var M=0;if(P(R,Pv)&&P(R,Y2)){var L=0;M=1}if(!M)var L=1;if(L)I=1;else if(P(R,pl))(!P(R,Tv)||!P(R,fi))&&(N=2);else if(t[28][2]){var z=1;N=1}}if(I){var z=1;N=1}}switch(N){case 0:var z=0;break;case 2:var z=1;break}if(!z){if(dz(t,k)){xo(t,9);var i=a,f=d;continue}u0(t,9);var i=a,f=d;continue}xo(t,99);var A=Ax(d)}var V=_0(t);return e9(t,99),[0,A,J1([0,u],[0,yx(t)],V,0)]}},x),e=r[1];return r[2][1]||ux(x,[0,e,56]),[0,r]}),I0(h9,function(x){return K(x)===98?[0,l0(0,function(r){var e=_0(r);u0(r,98);for(var t=Wv(0,r),u=0;;){var i=K(t);if(typeof i=="number"){var f=0;if(i!==99&&Nr!==i&&(f=1),!f){var o=Ax(u),a=_0(t);return u0(t,99),[0,o,J1([0,e],[0,yx(t)],a,0)]}}var d=[0,l(Zr,t),u];K(t)!==99&&u0(t,9);var u=d}},x)]:0}),I0(_9,function(x){return p(BO,x,l(Zo,x))}),I0(BO,function(x,r){function e(t){for(var u=[0,r[1],[0,r]];;){var i=u[2],f=u[1];if(K(t)===10&&x9(1,t)){var o=l0([0,f],function(g){return function(A){return u0(A,10),[0,g,l(Zo,A)]}}(i),t),a=o[1],u=[0,a,[1,[0,a,o[2]]]];continue}if(K(t)===98)var d=R1(t)[2],k=p(d,i,function(T,g){return p(Gx(T,-860373976,61),T,g)});else var k=i;return[0,k,l(h9,t),0]}}return l0([0,r[1]],e,x)}),I0(sz,function(x,r){var e=p(BO,x,r);return[0,e[1],[19,e[2]]]}),I0(oz,function(x){var r=K(x);return typeof r=="number"&&r===86?l(ZV,x):[0,bs(x)]}),I0(vz,function(x){var r=K(x);return typeof r=="number"&&r===86?[1,l(o3,x)]:[0,bs(x)]}),I0(w9,function(x){var r=K(x),e=0;if(typeof r=="number")switch(r){case 86:var t=gx(x);1-_1(x)&&zx(x,xe),zx(x,38),Z0(x);var u=l0(0,Zr,x);return[1,u[1],[0,t,u[2],0,0]];case 130:case 131:e=1;break}else r[0]===4&&!P(r[3],C1)&&(e=1);if(!e)return[0,bs(x)];1-_1(x)&&zx(x,xe);var i=l0([0,gx(x)],LO,x);return[1,i[1],i[2]]}),I0(az,function(x,r,e){var t=x[2],u=x[1];function i(a0){return I2(a0,y0([0,r],[0,e],0))}switch(t[0]){case 0:var B=[0,i(t[1])];break;case 1:var B=[1,i(t[1])];break;case 2:var B=[2,i(t[1])];break;case 3:var B=[3,i(t[1])];break;case 4:var B=[4,i(t[1])];break;case 5:var B=[5,i(t[1])];break;case 6:var B=[6,i(t[1])];break;case 7:var B=[7,i(t[1])];break;case 8:var f=i(t[2]),B=[8,t[1],f];break;case 9:var B=[9,i(t[1])];break;case 10:var B=[10,i(t[1])];break;case 11:var o=t[1],a=i(o[2]),B=[11,[0,o[1],a]];break;case 12:var d=t[1],k=i(d[4]),B=[12,[0,d[1],d[2],d[3],k]];break;case 13:var T=t[1],g=i(T[4]),B=[13,[0,T[1],T[2],T[3],g]];break;case 14:var A=t[1],N=A[4],R=qI(N,y0([0,r],[0,e],0)),B=[14,[0,A[1],A[2],A[3],R]];break;case 15:var I=t[1],M=i(I[3]),B=[15,[0,I[1],I[2],M]];break;case 16:var L=t[1],z=i(L[2]),B=[16,[0,L[1],z]];break;case 17:var V=t[1],Z=i(V[5]),B=[17,[0,V[1],V[2],V[3],V[4],Z]];break;case 18:var $=t[1],i0=i($[2]),B=[18,[0,$[1],i0]];break;case 19:var U=t[1],J=i(U[3]),B=[19,[0,U[1],U[2],J]];break;case 20:var Y=t[1],F=i(Y[3]),B=[20,[0,Y[1],Y[2],F]];break;case 21:var n0=t[1],Q=n0[1],f0=n0[2],s0=i(Q[3]),B=[21,[0,[0,Q[1],Q[2],s0],f0]];break;case 22:var v0=t[1],o0=i(v0[2]),B=[22,[0,v0[1],o0]];break;case 23:var c0=t[1],T0=i(c0[2]),B=[23,[0,c0[1],T0]];break;case 24:var E0=t[1],M0=i(E0[3]),B=[24,[0,E0[1],E0[2],M0]];break;case 25:var Y0=t[1],rx=i(Y0[2]),B=[25,[0,Y0[1],rx]];break;case 26:var g0=t[1],H0=g0[4],t0=i(g0[3]),B=[26,[0,g0[1],g0[2],t0,H0]];break;case 27:var ex=t[1],xx=i(ex[2]),B=[27,[0,ex[1],xx]];break;case 28:var ax=t[1],dx=i(ax[2]),B=[28,[0,ax[1],dx]];break;case 29:var mx=t[1],L0=i(mx[3]),B=[29,[0,mx[1],mx[2],L0]];break;case 30:var C0=t[1],A0=i(C0[3]),B=[30,[0,C0[1],C0[2],A0]];break;case 31:var U0=t[1],Q0=i(U0[3]),B=[31,[0,U0[1],U0[2],Q0]];break;case 32:var H=t[1],b=i(H[2]),B=[32,[0,H[1],b]];break;case 33:var B=[33,i(t[1])];break;case 34:var B=[34,i(t[1])];break;default:var B=[35,i(t[1])]}return[0,u,B]});var yz=function(x,r){if(K(x)!==4)return[0,0,y0([0,r],[0,yx(x)],0)];var e=Fx(r,_0(x));u0(x,4),V1(x,0);var t=l(px[9],x);return $1(x),u0(x,5),[0,[0,t],y0([0,e],[0,yx(x)],0)]},BS0=function(x){var r=_0(x);return u0(x,66),yz(x,r)},YS0=0,mz=function(x){var r=Wv(0,x),e=K(r);return typeof e=="number"&&e===66?[0,l0(YS0,BS0,r)]:0},XS0=function(x){var r=K(x);if(typeof r=="number"&&r===86){1-_1(x)&&zx(x,xe);var e=bs(x),t=gx(x);u0(x,86);var u=K(x);if(typeof u=="number"&&u===66){var i=Wv(0,x);return[0,[0,e],[0,l0([0,t],function(a){var d=_0(a);return u0(a,66),yz(a,d)},i)]]}if(f9(x))return[0,[2,p(jO,x,t)],0];var f=[1,l0([0,t],Zr,x)],o=K(x)===66?c3(x,f):f;return[0,o,mz(x)]}return[0,[0,bs(x)],0]},ye=function(x,r){var e=Gs(1,r);V1(e,1);var t=l(x,e);return $1(e),t},to=function(x){return ye(Zr,x)},ls=function(x){return ye(Zo,x)},Ze=function(x){return ye(Hv,x)},kz=function(x){return ye(h9,x)},qv=function(x){return ye(o3,x)},YO=function(x){return ye(vz,x)},XO=function(x){return ye(oz,x)},JO=function(x){return ye(XS0,x)},hz=function(x){return ye(_9,x)},VO=function(x){return ye(w9,x)},JS0=VV(px),Wo=function(x,r){var e=r[2],t=r[1],u=x[1];switch(e[0]){case 0:return r2(VS0,x,e[1][1]);case 1:return r2(zS0,x,e[1][1]);case 2:var i=e[1][1],f=i[2][1],o=x[2],a=x[1],d=i[1];p(T2[3],f,o)&&ux(a,[0,d,82]);var k=i[2][1],T=i[1];return $v(k)&&yt(a,[0,T,83]),i3(k)&&yt(a,[0,T,85]),[0,a,p(T2[4],f,o)];default:return ux(u,[0,t,24]),x}},VS0=function(x){return function(r){return r[0]===0?Wo(x,r[1][2][2]):Wo(x,r[1][2][1])}},zS0=function(x){return function(r){switch(r[0]){case 0:return Wo(x,r[1][2][1]);case 1:return Wo(x,r[1][2][1]);default:return x}}},_z=function(x,r){var e=r[2],t=e[3],u=e[2],i=[0,x,T2[1]],f=r2(function(o,a){return Wo(o,a[2][1])},i,u);return t&&Wo(f,t[1][2][1]),0},wz=function(x,r,e,t){var u=x[5],i=t[0]===0?Fv(t[1]):0,f=Gs(u?0:r,x),o=r||u||1-i;if(!o)return o;if(e){var a=e[1],d=a[2][1],k=a[1];$v(d)&&yt(f,[0,k,75]),i3(d)&&yt(f,[0,k,85])}if(t[0]===0)return _z(f,t[1]);var T=t[1][2],g=T[2],A=T[1],N=[0,Za,[0,[0,_n(function(I){var M=I[2],L=M[1],z=M[4],V=M[3],Z=M[2],$=L[0]===0?[3,L[1]]:[0,[0,Za,L[1][2]]];return[0,[0,Za,[0,$,Z,V,z]]]},A),[0,Za],0]]],R=Wo([0,f,T2[1]],N);return g&&Wo(R,g[1][2][1]),0},v3=function(x,r,e,t){return wz(x,r,e,[0,t])},Tz=function(x,r){if(r!==12)return 0;var e=_0(x),t=l0(0,function(f){return u0(f,12),p(px[18],f,83)},x),u=t[2],i=t[1];return[0,[0,i,u,y0([0,e],0,0)]]},zO=function x(r,e){return x.fun(r,e)},KS0=function(x){K(x)===21&&zx(x,94);var r=p(px[18],x,83),e=K(x)===82?(u0(x,82),[0,l(px[10],x)]):0;return[0,r,e]},ZS0=0;I0(zO,function(x,r){var e=K(x);if(typeof e=="number"){var t=e-5|0,u=0;if(7>>0?sn===t&&(u=1):5>>0&&(u=1),u){var i=Tz(x,e),f=uy(function(a){return[0,a[1],[0,a[2],a[3]]]},i);return K(x)!==5&&zx(x,66),[0,Ax(r),f]}}var o=l0(ZS0,KS0,x);return K(x)!==5&&u0(x,9),p(zO,x,[0,o,r])});var a3=function(x,r){function e(u){var i=hV(1,oO(r,vO(x,u))),f=_0(i);u0(i,4);var o=0;if(_1(i)&&K(i)===21){var a=_0(i),d=l0(0,function(z){return u0(z,21),K(z)===86?[0,qv(z)]:(zx(z,90),0)},i),k=d[2],T=d[1];if(k){var g=k[1];K(i)===9&&Z0(i);var A=[0,[0,T,[0,g,y0([0,a],0,0)]]]}else var A=0}else o=1;if(o)var A=0;var N=p(zO,i,0),R=N[2],I=N[1],M=_0(i);return u0(i,5),[0,A,I,R,J1([0,f],[0,yx(i)],M,0)]}var t=0;return function(u){return l0(t,e,u)}},Sz=function(x,r,e,t,u){var i=gV(x,r,e,u);return p(px[16],t,i)},T6=function(x,r,e,t,u){var i=Sz(x,r,e,t,u);return[0,[0,i[1]],i[2]]},l3=function(x){if(c2!==K(x))return da0;var r=_0(x);return Z0(x),[0,1,r]},E9=function(x){if(K(x)===64&&!v6(1,x)){var r=_0(x);return Z0(x),[0,1,r]}return pa0},WS0=function(x){var r=E9(x),e=r[1],t=r[2],u=l0(0,function(I){var M=_0(I);u0(I,15);var L=l3(I),z=L[1],V=Xl([0,t,[0,M,[0,L[2],0]]]),Z=I[7],$=K(I),i0=0;if(Z&&typeof $=="number"){if($===4){var F=0,n0=0;i0=1}else if($===98){var U=ue(I,Ze(I)),J=K(I)===4?0:[0,Sn(I,p(px[13],oa0,I))],F=J,n0=U;i0=1}}if(!i0)var Y=vs(I)?Sn(I,p(px[13],va0,I)):(IV(I,aa0),[0,gx(I),la0]),F=[0,Y],n0=ue(I,Ze(I));var Q=l(a3(e,z),I),f0=K(I)===86?Q:d6(I,Q),s0=JO(I),v0=s0[2],o0=s0[1];if(v0)var c0=DV(I,v0),T0=o0;else var c0=v0,T0=c3(I,o0);return[0,z,n0,F,f0,T0,c0,V]},x),i=u[2],f=i[4],o=i[3],a=i[1],d=i[7],k=i[6],T=i[5],g=i[2],A=u[1],N=T6(x,e,a,0,Fv(f)),R=N[1];return v3(x,N[2],o,f),[26,[0,o,f,R,e,a,k,T,g,y0([0,d],0,0),A]]},$S0=0,S6=function(x){return l0($S0,WS0,x)},KO=function(x,r){var e=_0(r);u0(r,x);var t=r[28][2];if(t)var u=x===27?1:0,i=u&&(K(r)===48?1:0);else var i=t;i&&zx(r,23);for(var f=0,o=0;;){var a=l0(0,function(N){var R=p(px[18],N,86);if(o1(N,82))var I=0,M=[0,l(px[10],N)];else{var L=R[1];if(R[2][0]===2)var I=0,M=0;else var I=[0,[0,L,63]],M=0}return[0,[0,R,M],I]},r),d=a[2],k=d[2],T=[0,[0,a[1],d[1]],f],g=k?[0,k[1],o]:o;if(o1(r,9)){var f=T,o=g;continue}var A=Ax(g);return[0,Ax(T),e,A]}},QS0=24,Ez=function(x){return KO(QS0,x)},gz=function(x){var r=KO(27,aO(1,x)),e=r[1],t=r[3],u=r[2];return[0,e,u,Ax(r2(function(i,f){return f[2][2]?i:[0,[0,f[1],62],i]},t,e))]},Az=function(x){return KO(28,aO(1,x))},Pz=function(x){function r(t){return[19,p(JS0[1],x,t)]}var e=0;return function(t){return l0(e,r,t)}},ZO=function x(r,e){return x.fun(r,e)},FS0=function(x){var r=_0(x),e=K(x),t=pr(1,x),u=0;if(typeof e!="number"&&e[0]===2){var i=e[1],f=i[4],o=i[3],a=i[2],d=i[1],k=0;if(typeof t=="number")switch(t){case 85:case 86:k=2;break;default:k=1}else t[0]===4?P(t[3],vn)||(k=2):k=1;switch(k){case 0:break;case 1:break;default:f&&$t(x,81),u0(x,[2,[0,d,a,o,f]]);var T=[1,[0,d,[0,a,o,y0([0,r],[0,yx(x)],0)]]],g=0;if(typeof t=="number"&&!(1>>0)){var A=t===85?1:0;zx(x,[16,A,a]),A&&Z0(x);var N=gx(x),R=0,I=[0,N,[2,[0,[0,N,ca0],YO(x),A]]],M=T;u=1}else g=1;if(g){Z0(x);var R=0,I=p(px[18],x,83),M=T;u=1}}}if(!u){var L=0;if(typeof t!="number"&&t[0]===4&&!P(t[3],vn)){var z=[0,S2(x)];ro(x,sa0);var R=0,I=p(px[18],x,83),M=z;L=1}if(!L)var V=G0(px[14],x,0,83),Z=V[2],R=1,I=[0,V[1],[2,Z]],M=[0,Z[1]]}var $=K(x)===82?(u0(x,82),[0,l(px[10],x)]):0;return[0,M,I,$,R]},HS0=0;I0(ZO,function(x,r){var e=K(x);if(typeof e=="number"){var t=e-5|0,u=0;if(7>>0?sn===t&&(u=1):5>>0&&(u=1),u){var i=Tz(x,e),f=uy(function(a){return[0,a[1],[0,a[2],a[3]]]},i);return K(x)!==5&&zx(x,66),[0,Ax(r),f]}}var o=l0(HS0,FS0,x);return K(x)!==5&&u0(x,9),p(ZO,x,[0,o,r])});var qS0=function(x){var r=hV(1,x),e=_0(r);u0(r,4);var t=p(ZO,r,0),u=t[2],i=t[1],f=_0(r);return u0(r,5),[0,i,u,J1([0,e],[0,yx(r)],f,0)]},GS0=0,bS0=function(x){var r=l0(0,function(T){var g=_0(T);ro(T,ia0);var A=Sn(T,p(px[13],fa0,T)),N=ue(T,Ze(T)),R=l0(GS0,qS0,T);if(hO(T))var M=R;else var I=R1(T)[2],M=p(I,R,function(L,z){return p(Gx(L,842685896,11),L,z)});return[0,N,A,M,wO(T,VO(T)),g]},x),e=r[2],t=e[3],u=e[2],i=e[5],f=e[4],o=e[1],a=r[1],d=Sz(x,0,0,0,0),k=d[1];return wz(x,d[2],[0,u],[1,t]),[3,[0,u,o,t,f,k,y0([0,i],0,0),a]]},xE0=0,WO=function(x){return l0(xE0,bS0,x)},a2=function(x,r){if(r[0]===0)return r[1];var e=r[2][1],t=r[1];return C2(function(u){return ux(x,u)},e),t},$O=function(x,r,e){var t=x?x[1]:41;if(e[0]===0)var u=e[1];else{var i=e[2][2],f=e[1];C2(function(T){return ux(r,T)},i);var u=f}1-l(px[23],u)&&ux(r,[0,u[1],t]);var o=u[2],a=0;if(o[0]===9){var d=u[1];$v(o[1][2][1])&&(yt(r,[0,d,76]),a=1)}return p(px[19],r,u)},QO=function(x,r){var e=us(x[2],r[2]);return[0,us(x[1],r[1]),e]},Cz=function(x){var r=Ax(x[2]);return[0,Ax(x[1]),r]},Nz=function(x,r){var e=x[0]===0?x[1]:x[1]-1|0,t=(r[0]===0,r[1]);return t<=e?1:0},p3=function x(r){return x.fun(r)},Qt=function x(r){return x.fun(r)},Rz=function x(r){return x.fun(r)},FO=function x(r){return x.fun(r)},Iz=function x(r){return x.fun(r)},HO=function x(r){return x.fun(r)},Oz=function x(r){return x.fun(r)},Lz=function x(r){return x.fun(r)},E6=function x(r){return x.fun(r)},qO=function x(r){return x.fun(r)},GO=function x(r){return x.fun(r)},bO=function x(r){return x.fun(r)},Mz=function x(r){return x.fun(r)},xL=function x(r){return x.fun(r)},g9=function x(r){return x.fun(r)},rL=function x(r){return x.fun(r)},Dz=function x(r){return x.fun(r)},Gv=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},eL=function x(r,e,t,u){return x.fun(r,e,t,u)},tL=function x(r){return x.fun(r)},A9=function x(r){return x.fun(r)},nL=function x(r){return x.fun(r)},uL=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},jz=function x(r,e,t,u){return x.fun(r,e,t,u)},iL=function x(r){return x.fun(r)},P9=function x(r,e,t){return x.fun(r,e,t)},Uz=function x(r){return x.fun(r)},C9=function x(r,e,t){return x.fun(r,e,t)},fL=function x(r){return x.fun(r)},Bz=function x(r){return x.fun(r)},cL=function x(r,e){return x.fun(r,e)},sL=function x(r,e,t,u){return x.fun(r,e,t,u)},Yz=function x(r){return x.fun(r)},oL=function x(r,e,t){return x.fun(r,e,t)},Xz=function x(r){return x.fun(r)},Jz=function x(r){return x.fun(r)},vL=function x(r){return x.fun(r)},N9=function x(r,e,t){return x.fun(r,e,t)},rE0=function(x){var r=x[2];switch(r[0]){case 22:var e=r[1],t=e[1][2][1];if(P(t,j2)){if(!P(t,av)&&!P(e[2][2][1],jS))return 0}else if(!P(e[2][2][1],_l))return 0;break;case 0:case 9:case 21:case 24:break;default:return 0}return 1},aL=function(x){var r=gx(x),e=l(HO,x),t=l(Iz,x);if(!t)return e;var u=t[1];return[0,l0([0,r],function(i){var f=$O(0,i,e);return[3,[0,u,f,l(Qt,i),0]]},x)]},eE0=function(x,r){if(typeof r=="number"&&r===85)return 0;throw q0(as,1)},Vz=function(x){var r=Gy(eE0,x),e=aL(r),t=K(r);if(typeof t=="number"){if(t===11)throw q0(as,1);if(t===86){var u=SV(r),i=0;if(u){var f=u[1];if(typeof f=="number"&&f===5){var o=1;i=1}}if(!i)var o=0;if(o)throw q0(as,1)}}if(!vs(r))return e;if(e[0]===0){var a=e[1][2];if(a[0]===9&&!P(a[1][2][1],Co)&&!Z2(r))throw q0(as,1)}return e};I0(p3,function(x){var r=vs(x);if(r){var e=K(x),t=0;if(typeof e=="number"){if(e===58){if(x[18]){var u=0;t=1}}else if(e===65&&x[19]){var u=0;t=1}}if(!t)var u=1;var i=u}else var i=r;var f=K(x),o=0;if(typeof f=="number"){var a=0;if(22<=f)if(f===58){if(x[18])return[0,l(Rz,x)];a=1}else f!==98&&(a=1);else f!==4&&21>f&&(a=1);a||(o=1)}if(!o&&!i)return aL(x);var d=0;if(f===64&&_1(x)&&pr(1,x)===98){var k=Vz,T=vL;d=1}if(!d)var k=vL,T=Vz;var g=_O(x,T);if(g)return g[1];var A=_O(x,k);return A?A[1]:aL(x)}),I0(Qt,function(x){return a2(x,l(p3,x))}),I0(Rz,function(x){return l0(0,function(r){r[10]&&zx(r,dv);var e=_0(r),t=gx(r);u0(r,58);var u=gx(r);if(f3(r))var i=0,f=0;else{var o=o1(r,c2),a=K(r),d=0;if(typeof a=="number"){var k=0;if(a===86)k=1;else if(10>a)switch(a){case 0:case 2:case 3:case 4:case 6:break;default:k=1}if(k){var T=0;d=1}}if(!d)var T=1;var g=0;if(!o&&!T){var A=0;g=1}if(!g)var A=[0,l(Qt,r)];var i=o,f=A}var N=f?0:yx(r),R=Fr(t,u);return[36,[0,f,y0([0,e],[0,N],0),i,R]]},x)}),I0(FO,function(x){var r=x[2];switch(r[0]){case 22:var e=r[1],t=e[1][2][1];if(P(t,j2)){if(!P(t,av)&&!P(e[2][2][1],jS))return 0}else if(!P(e[2][2][1],_l))return 0;break;case 9:case 21:break;default:return 0}return 1}),I0(Iz,function(x){var r=K(x),e=0;if(typeof r=="number"){var t=r+ij|0;if(15>=t>>>0){switch(t){case 0:var u=R30;break;case 1:var u=I30;break;case 2:var u=O30;break;case 3:var u=L30;break;case 4:var u=M30;break;case 5:var u=D30;break;case 6:var u=j30;break;case 7:var u=U30;break;case 8:var u=B30;break;case 9:var u=Y30;break;case 10:var u=X30;break;case 11:var u=J30;break;case 12:var u=V30;break;case 13:var u=z30;break;case 14:var u=K30;break;default:var u=Z30}var i=u;e=1}}if(!e)var i=0;return i!==0&&Z0(x),i}),I0(HO,function(x){var r=gx(x),e=l(Lz,x);if(K(x)!==85)return e;Z0(x);var t=l(Qt,s6(0,x));u0(x,86);var u=l0([0,r],Qt,x),i=u[2],f=u[1];return[0,[0,f,[7,[0,a2(x,e),t,i,0]]]]}),I0(Oz,function(x){return a2(x,l(HO,x))});var lL=function(x,r,e,t,u){var i=a2(x,r);return[0,[0,u,[20,[0,t,i,a2(x,e),0]]]]},pL=function(x,r,e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number"&&i===88){Z0(x);var f=l0(0,E6,x),o=f[2],a=Fr(u,f[1]),d=dL(0,x,lL(x,t,o,1,a),a),t=d[2],u=d[1];continue}return[0,u,t]}},zz=function(x,r,e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number"&&i===87){Z0(x);var f=l0(0,E6,x),o=pL(x,f[2],f[1]),a=o[2],d=Fr(u,o[1]),k=dL(0,x,lL(x,t,a,0,d),d),t=k[2],u=k[1];continue}return[0,u,t]}},dL=function(x,r,e,t){for(var u=x,i=e,f=t;;){var o=K(r);if(typeof o=="number"&&o===84){1-u&&zx(r,N30),u0(r,84);var a=l0(0,E6,r),d=a[2],k=a[1],T=K(r),g=0;if(typeof T=="number"&&1>=T-87>>>0){zx(r,[20,eO(T)]);var A=pL(r,d,k),N=zz(r,A[2],A[1]),R=N[2],I=N[1];g=1}if(!g)var R=d,I=k;var M=Fr(f,I),u=1,i=lL(r,i,R,2,M),f=M;continue}return[0,f,i]}};I0(Lz,function(x){var r=l0(0,E6,x),e=r[2],t=r[1],u=K(x),i=0;if(typeof u=="number"&&u===84){var o=dL(1,x,e,t);i=1}if(!i)var f=pL(x,e,t),o=zz(x,f[2],f[1]);return o[2]});var yL=function(x,r,e,t){return[0,t,[4,[0,e,x,r,0]]]};I0(E6,function(x){var r=0;x:for(;;){var e=l0(0,function(xx){var ax=l(qO,xx)!==0?1:0;return[0,ax,l(GO,s6(0,xx))]},x),t=e[2],u=t[2],i=t[1],f=e[1];if(K(x)===98){var o=0;u[0]===0&&u[1][2][0]===11&&(zx(x,2),o=1)}var a=function(xx){return function(ax,dx){for(var mx=ax,L0=dx;;){var C0=K(x);if(typeof C0!="number"&&C0[0]===4){var A0=C0[3],U0=0;if(P(A0,vn)&&P(A0,nU)&&(U0=1),!U0&&_1(x)){Z0(x);var Q0=a2(x,L0),H=0;if(mx){var b=mx[1],B=b[2],a0=mx[2],m0=b[3],P0=B[1],D=b[1];if(Nz(B[2],i30)){var N0=yL(D,Q0,P0,Fr(m0,xx)),X0=a0;H=1}}if(!H)var N0=Q0,X0=mx;var D0=N0[1];if(Ar(A0,nU))var ox=to(x),h=[0,[0,Fr(D0,ox[1]),[33,[0,N0,[0,ox],0]]]];else if(K(x)===27){var b0=Fr(D0,gx(x));Z0(x);var h=[0,[0,b0,[33,[0,N0,0,0]]]]}else var kx=to(x),V0=kx[1],h=[0,[0,Fr(D0,V0),[2,[0,N0,[0,V0,kx],0]]]];var mx=X0,L0=h;continue}}return[0,mx,L0]}}}(f)(r,u),d=a[2],k=a[1],T=K(x),g=0;if(typeof T=="number"){var A=T-17|0,N=0;if(1>>0)if(72<=A){var R=0;switch(A-72|0){case 0:var I=f30;break;case 1:var I=c30;break;case 2:var I=s30;break;case 3:var I=o30;break;case 4:var I=v30;break;case 5:var I=a30;break;case 6:var I=l30;break;case 7:var I=p30;break;case 8:var I=d30;break;case 9:var I=y30;break;case 10:var I=m30;break;case 11:var I=k30;break;case 12:var I=h30;break;case 13:var I=_30;break;case 14:var I=w30;break;case 15:var I=T30;break;case 16:var I=S30;break;case 17:var I=E30;break;case 18:var I=g30;break;case 19:var I=A30;break;default:N=1,R=1}if(!R)var M=I}else N=1;else var M=A?P30:x[12]?0:C30;if(!N){var L=M;g=1}}if(!g)var L=0;if(L!==0&&Z0(x),!k&&!L)return d;if(!L)for(var z=a2(x,d),V=f,Z=k;;){if(!Z)return[0,z];var $=Z[1],i0=Z[2],U=$[2][1],J=$[1],Y=Fr($[3],V),z=yL(J,z,U,Y),V=Y,Z=i0}var F=L[1],n0=F[1],Q=F[2],f0=i&&(n0===14?1:0);f0&&ux(x,[0,f,42]);for(var s0=a2(x,d),v0=[0,n0,Q],o0=f,c0=k;;){var T0=v0[2],E0=v0[1];if(c0){var M0=c0[1],Y0=M0[2],rx=c0[2],g0=M0[3],H0=Y0[1],t0=M0[1];if(Nz(Y0[2],T0)){var ex=Fr(g0,o0),s0=yL(t0,s0,H0,ex),v0=[0,E0,T0],o0=ex,c0=rx;continue}}var r=[0,[0,s0,[0,E0,T0],o0],c0];continue x}}}),I0(qO,function(x){var r=K(x);if(typeof r=="number"){if(48<=r){if(nn<=r){if(Ot>r)switch(r+JP|0){case 0:return Ga0;case 1:return ba0;case 6:return x30;case 7:return r30}}else if(r===65&&x[19])return x[10]&&zx(x,7),e30}else if(45<=r)switch(r+wE|0){case 0:return t30;case 1:return n30;default:return u30}}return 0}),I0(GO,function(x){var r=gx(x),e=_0(x),t=l(qO,x);if(t){var u=t[1];Z0(x);var i=l0([0,r],bO,x),f=i[2],o=i[1],a=0;if(u===6){var d=f[2],k=0;switch(d[0]){case 9:yt(x,[0,o,73]),k=1;break;case 21:d[1][2][0]===1&&ux(x,[0,o,67]),k=1;break}k&&(a=1)}return[0,[0,o,[34,[0,u,f,y0([0,e],0,0)]]]]}var T=K(x),g=0;if(typeof T=="number")if(Ot===T)var A=qa0;else if(D2===T)var A=Ha0;else g=1;else g=1;if(g)var A=0;if(!A)return l(Mz,x);var N=A[1];Z0(x);var R=l0([0,r],bO,x),I=R[2],M=R[1];1-l(FO,I)&&ux(x,[0,I[1],41]);var L=I[2],z=0;return L[0]===9&&$v(L[1][2][1])&&($t(x,78),z=1),[0,[0,M,[35,[0,N,I,1,y0([0,e],0,0)]]]]}),I0(bO,function(x){return a2(x,l(GO,x))}),I0(Mz,function(x){var r=l(xL,x);if(Z2(x))return r;var e=K(x),t=0;if(typeof e=="number")if(Ot===e)var u=Fa0;else if(D2===e)var u=Qa0;else t=1;else t=1;if(t)var u=0;if(!u)return r;var i=u[1],f=a2(x,r);1-l(FO,f)&&ux(x,[0,f[1],41]);var o=f[2],a=0;o[0]===9&&$v(o[1][2][1])&&($t(x,77),a=1);var d=gx(x);Z0(x);var k=yx(x),T=Fr(f[1],d);return[0,[0,T,[35,[0,i,f,0,y0(0,[0,k],0)]]]]}),I0(xL,function(x){var r=gx(x),e=1-x[17],t=0,u=x[17]===0?x:[0,x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15],x[16],t,x[18],x[19],x[20],x[21],x[22],x[23],x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]],i=K(u),f=0;if(typeof i=="number"){var o=i-44|0;if(7>=o>>>0){var a=0;switch(o){case 0:if(e)var d=[0,l(tL,u)];else a=1;break;case 6:var d=[0,l(Dz,u)];break;case 7:var d=[0,l(rL,u)];break;default:a=1}if(!a){var k=d;f=1}}}if(!f)var k=zo(u)?[0,l(iL,u)]:l(fL,u);return Xe(Gv,0,0,u,r,k)}),I0(g9,function(x){return a2(x,l(xL,x))}),I0(rL,function(x){switch(x[22]){case 0:var r=0,e=0;break;case 1:var r=0,e=1;break;default:var r=1,e=1}var t=gx(x),u=_0(x);u0(x,51);var i=[0,t,[28,[0,y0([0,u],[0,yx(x)],0)]]],f=K(x);if(typeof f=="number"&&11>f)switch(f){case 4:var o=r?i:(ux(x,[0,t,ct]),[0,t,[9,wn(0,[0,t,Za0])]]);return ve(eL,0,x,t,o);case 6:case 10:var a=e?i:(ux(x,[0,t,jt]),[0,t,[9,wn(0,[0,t,$a0])]]);return ve(eL,0,x,t,a)}return e?g1(Wa0,x):ux(x,[0,t,jt]),i}),I0(Dz,function(x){return l0(0,function(r){var e=_0(r),t=gx(r);if(u0(r,50),o1(r,10)){var u=wn(0,[0,t,Va0]),i=gx(r);ro(r,za0);var f=wn(0,[0,i,Ka0]);return[22,[0,u,f,y0([0,e],[0,yx(r)],0)]]}var o=_0(r);u0(r,4);var a=G0(oL,[0,o],0,l(Qt,s6(0,r)));return u0(r,5),[10,[0,a,y0([0,e],[0,yx(r)],0)]]},x)}),I0(Gv,function(x,r,e,t,u){var i=x?x[1]:1,f=r?r[1]:0,o=Xe(uL,[0,i],[0,f],e,t,u),a=SV(e),d=0;if(a){var k=a[1];if(typeof k=="number"&&k===83){var T=1;d=1}}if(!d)var T=0;function g(M){var L=R1(M)[2];function z(V,Z){return p(Gx(V,dn,62),V,Z)}return p(L,a2(M,o),z)}function A(M,L,z){var V=l(nL,L),Z=V[1],$=V[2],i0=Fr(t,Z),U=[0,z,M,[0,Z,$],0],J=0;if(!T&&!f){var Y=[5,U];J=1}if(!J)var Y=[25,[0,U,i0,T]];var F=f||T;return Xe(Gv,[0,i],[0,F],L,t,[0,[0,i0,Y]])}if(e[13])return o;var N=K(e);if(typeof N=="number"){var R=N-98|0;if(2>>0){if(R===-94)return A(0,e,g(e))}else if(R!==1&&_1(e)){var I=Gy(function(M,L){throw q0(as,1)},e);return t9(I,o,function(M){var L=g(M);return A(l(A9,M),M,L)})}}return o}),I0(eL,function(x,r,e,t){var u=x?x[1]:1;return a2(r,Xe(Gv,[0,u],0,r,e,[0,t]))}),I0(tL,function(x){return l0(0,function(r){var e=gx(r),t=_0(r);if(u0(r,44),r[11]&&K(r)===10){var u=yx(r);Z0(r);var i=wn(y0([0,t],[0,u],0),[0,e,Ya0]),f=K(r);return typeof f!="number"&&f[0]===4&&!P(f[3],jS)?[22,[0,i,p(px[13],0,r),0]]:(g1(Xa0,r),Z0(r),[9,i])}var o=gx(r),a=K(r),d=0;if(typeof a=="number")if(a===44)var k=l(tL,r);else if(a===51)var k=l(rL,pO(1,r));else d=1;else d=1;if(d)var k=zo(r)?l(iL,r):l(Bz,r);var T=ve(jz,Ja0,pO(1,r),o,k),g=K(r),A=0;if(typeof g!="number"&&g[0]===3){var N=ve(sL,r,o,T,g[1]);A=1}if(!A)var N=T;var R=0;if(K(r)!==4){var I=0;if((!_1(r)||K(r)!==98)&&(I=1),I){var L=N;R=1}}if(!R)var M=R1(r)[2],L=p(M,N,function(i0,U){return p(Gx(i0,dn,63),i0,U)});var z=_1(r)?t9(Gy(function(i0,U){throw q0(as,1)},r),0,A9):0,V=K(r),Z=0;if(typeof V=="number"&&V===4){var $=[0,l(nL,r)];Z=1}if(!Z)var $=0;return[23,[0,L,z,$,y0([0,t],0,0)]]},x)});var tE0=function(x){var r=_0(x);u0(x,98);for(var e=0;;){var t=K(x);if(typeof t=="number"){var u=0;if(t!==99&&Nr!==t&&(u=1),!u){var i=Ax(e),f=_0(x);u0(x,99);var o=K(x)===4?R1(x)[1]:yx(x);return[0,i,J1([0,r],[0,o],f,0)]}}var a=K(x),d=0;if(typeof a!="number"&&a[0]===4&&!P(a[2],Na)){var k=gx(x),T=_0(x);ro(x,Ba0);var g=[1,[0,k,[0,y0([0,T],[0,yx(x)],0)]]];d=1}if(!d)var g=[0,to(x)];var A=[0,g,e];K(x)!==99&&u0(x,9);var e=A}};I0(A9,function(x){V1(x,1);var r=K(x)===98?[0,l0(0,tE0,x)]:0;return $1(x),r});var nE0=function(x){var r=_0(x);u0(x,12);var e=l(Qt,x);return[0,e,y0([0,r],0,0)]};I0(nL,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);for(var t=0;;){var u=K(r);if(typeof u=="number"){var i=0;if(u!==5&&Nr!==u&&(i=1),!i){var f=Ax(t),o=_0(r);return u0(r,5),[0,f,J1([0,e],[0,yx(r)],o,0)]}}var a=K(r),d=0;if(typeof a=="number"&&a===12){var k=[1,l0(0,nE0,r)];d=1}if(!d)var k=[0,l(Qt,r)];var T=[0,k,t];K(r)!==5&&u0(r,9);var t=T}},x)});var Kz=function(x,r,e,t,u,i){var f=x?x[1]:1,o=r?r[1]:0,a=e?e[1]:0,d=pO(0,t),k=l(px[7],d),T=gx(t);u0(t,7);var g=yx(t),A=Fr(u,T),N=y0(0,[0,g],0),R=[0,a2(t,i),[2,k],N],I=o?[26,[0,R,A,a]]:[21,R];return Xe(Gv,[0,f],[0,o],t,u,[0,[0,A,I]])},Zz=function(x,r,e,t,u,i){var f=x?x[1]:1,o=r?r[1]:0,a=e?e[1]:0,d=K(t),k=0;if(typeof d=="number"&&d===14){var T=YV(t),g=T[1],A=t[30][1],N=T[2][1];if(A){var R=A[1];t[30][1]=[0,[0,R[1],[0,[0,N,g],R[2]]],A[2]]}else ux(t,[0,g,68]);var M=[1,T],L=g;k=1}if(!k)var I=S2(t),M=[0,I],L=I[1];var z=Fr(u,L),V=0;i[0]===0&&i[1][2][0]===28&&M[0]===1&&(ux(t,[0,z,87]),V=1);var Z=[0,a2(t,i),M,0],$=o?[26,[0,Z,z,a]]:[21,Z];return Xe(Gv,[0,f],[0,o],t,u,[0,[0,z,$]])};I0(uL,function(x,r,e,t,u){var i=x?x[1]:1,f=r?r[1]:0,o=K(e);if(typeof o=="number")switch(o){case 6:return Z0(e),Kz([0,i],[0,f],0,e,t,u);case 10:return Z0(e),Zz([0,i],[0,f],0,e,t,u);case 83:1-i&&zx(e,64),u0(e,83);var a=K(e);if(typeof a=="number")switch(a){case 4:return u;case 6:return Z0(e),Kz([0,i],Ma0,La0,e,t,u);case 98:if(_1(e))return u;break}else if(a[0]===3)return zx(e,65),u;return Zz([0,i],ja0,Da0,e,t,u)}else if(o[0]===3){var d=o[1];return f&&zx(e,65),Xe(Gv,Ua0,0,e,t,[0,ve(sL,e,t,a2(e,u),d)])}return u}),I0(jz,function(x,r,e,t){var u=x?x[1]:1;return a2(r,Xe(uL,[0,u],0,r,e,[0,t]))}),I0(iL,function(x){return l0(0,function(r){var e=E9(r),t=e[1],u=e[2],i=l0(0,function(M){var L=_0(M);u0(M,15);var z=l3(M),V=z[1],Z=Xl([0,u,[0,L,[0,z[2],0]]]);if(K(M)===4)var $=0,i0=0;else{var U=K(M),J=0;if(typeof U=="number"&&U===98){var F=0;J=1}if(!J)var Y=oO(V,vO(t,M)),F=[0,Sn(Y,p(px[13],Oa0,Y))];var $=ue(M,Ze(M)),i0=F}var n0=Zv(0,M),Q=t||n0[19],f0=l(a3(Q,V),n0),s0=K(n0)===86?f0:d6(n0,f0),v0=JO(n0),o0=v0[2],c0=v0[1];if(o0)var T0=DV(n0,o0),E0=c0;else var T0=o0,E0=c3(n0,c0);return[0,i0,s0,V,T0,E0,$,Z]},r),f=i[2],o=f[3],a=f[2],d=f[1],k=f[7],T=f[6],g=f[5],A=f[4],N=i[1],R=T6(r,t,o,1,Fv(a)),I=R[1];return v3(r,R[2],d,a),[8,[0,d,a,I,t,o,A,g,T,y0([0,k],0,0),N]]},x)}),I0(P9,function(x,r,e){switch(r){case 1:$t(x,81);try{var t=bd(Rl(Qx(Pa0,e))),u=t}catch(g){var i=L1(g);if(i[1]!==kn)throw q0(i,0);var u=Nx(Qx(Ca0,e))}break;case 2:$t(x,80);try{var f=$R(e),u=f}catch(g){var o=L1(g);if(o[1]!==kn)throw q0(o,0);var u=Nx(Qx(Na0,e))}break;case 4:try{var a=$R(e),u=a}catch(g){var d=L1(g);if(d[1]!==kn)throw q0(d,0);var u=Nx(Qx(Ra0,e))}break;default:try{var k=bd(Rl(e)),u=k}catch(g){var T=L1(g);if(T[1]!==kn)throw q0(T,0);var u=Nx(Qx(Ia0,e))}}return u0(x,[0,r,e]),u}),I0(Uz,function(x){var r=Xx(x),e=0;if(r!==0&&B1===O1(x,r-1|0)){var t=k2(x,0,r-1|0);e=1}if(!e)var t=x;return t}),I0(C9,function(x,r,e){var t=hX(l(Uz,e));return u0(x,[1,r,e]),t}),I0(fL,function(x){var r=gx(x),e=_0(x),t=K(x);if(typeof t=="number")switch(t){case 0:var u=l(px[12],x);return[1,[0,u[1],[24,u[2]]],u[3]];case 4:return[0,l(Yz,x)];case 6:var i=l0(0,Xz,x),f=i[2];return[1,[0,i[1],[0,f[1]]],f[2]];case 21:return Z0(x),[0,[0,r,[31,[0,y0([0,e],[0,yx(x)],0)]]]];case 29:return Z0(x),[0,[0,r,[15,y0([0,e],[0,yx(x)],0)]]];case 40:return[0,l(px[22],x)];case 98:var o=l(px[17],x),a=o[2],d=o[1],k=un<=a[1]?[12,a[2]]:[11,a[2]];return[0,[0,d,k]];case 30:case 31:return Z0(x),[0,[0,r,[14,[0,t===31?1:0,y0([0,e],[0,yx(x)],0)]]]];case 74:case 105:return[0,l(Jz,x)]}else switch(t[0]){case 0:var T=t[2],g=G0(P9,x,t[1],T);return[0,[0,r,[16,[0,g,T,y0([0,e],[0,yx(x)],0)]]]];case 1:var A=t[2],N=G0(C9,x,t[1],A);return[0,[0,r,[17,[0,N,A,y0([0,e],[0,yx(x)],0)]]]];case 2:var R=t[1],I=R[3],M=R[2],L=R[1];R[4]&&$t(x,81),Z0(x);var z=y0([0,e],[0,yx(x)],0),V=x[28],Z=V[6],$=V[7],i0=0;if(Z){var U=Z[1];if(mX(U,M))var J=[19,[0,M,L,Xx(U),0,I,z]];else i0=1}else i0=1;if(i0){var Y=0;if($){var F=$[1];if(mX(F,M)){var J=[19,[0,M,L,Xx(F),1,I,z]];Y=1}}if(!Y)var J=[13,[0,M,I,z]]}return[0,[0,L,J]];case 3:var n0=p(cL,x,t[1]);return[0,[0,n0[1],[30,n0[2]]]];case 4:if(!P(t[3],x_)&&pr(1,x)===40)return[0,l(px[22],x)];break}if(vs(x)){var Q=p(px[13],0,x);return[0,[0,Q[1],[9,Q]]]}g1(0,x);var f0=0;return typeof t!="number"&&t[0]===7&&(Z0(x),f0=1),[0,[0,r,[15,y0([0,e],Aa0,0)]]]}),I0(Bz,function(x){return a2(x,l(fL,x))}),I0(cL,function(x,r){var e=r[5],t=r[1],u=r[3],i=r[2],f=_0(x);u0(x,[3,r]);var o=[0,t,[0,[0,u,i],e]];if(e)var a=0,d=[0,o,0],k=t;else for(var T=[0,o,0],g=0;;){var A=l(px[7],x),N=[0,A,g],R=K(x),I=0;if(typeof R=="number"&&R===1){V1(x,4);var M=K(x),L=0;if(typeof M=="number"||M[0]!==3)L=1;else{var z=M[1],V=z[5],Z=z[1],$=z[3],i0=z[2];Z0(x),$1(x);var U=[0,[0,Z,[0,[0,$,i0],V]],T];if(!V){var T=U,g=N;continue}var J=Ax(N),Y=[0,Z,Ax(U),J];I=1}if(L)throw q0([0,wr,Sa0],1)}if(!I){g1(Ea0,x);var F=[0,A[1],ga0],n0=Ax(N),Q=Ax([0,F,T]),Y=[0,A[1],Q,n0]}var a=Y[3],d=Y[2],k=Y[1];break}var f0=yx(x),s0=Fr(t,k);return[0,s0,[0,d,a,y0([0,f],[0,f0],0)]]}),I0(sL,function(x,r,e,t){var u=R1(x)[2],i=p(u,e,function(o,a){return p(Gx(o,dn,3),o,a)}),f=p(cL,x,t);return[0,Fr(r,f[1]),[29,[0,i,f,0]]]}),I0(Yz,function(x){var r=_0(x),e=l0(0,function(o){u0(o,4);var a=gx(o),d=l(Qt,o),k=K(o),T=0;if(typeof k=="number")if(k===9)var g=[0,G0(N9,o,a,[0,d,0])];else if(k===86)var g=[1,[0,d,qv(o),0]];else T=1;else T=1;if(T)var g=[0,d];return u0(o,5),g},x),t=e[2],u=e[1],i=yx(x),f=t[0]===0?t[1]:[0,u,[32,t[1]]];return G0(oL,[0,r],[0,i],f)}),I0(oL,function(x,r,e){var t=e[2],u=e[1],i=x?x[1]:0,f=r?r[1]:0;function o(v1){return I2(v1,y0([0,i],[0,f],0))}function a(v1){return qI(v1,y0([0,i],[0,f],0))}switch(t[0]){case 0:var d=t[1],k=a(d[2]),lx=[0,[0,d[1],k]];break;case 1:var T=t[1],g=T[10],A=o(T[9]),lx=[1,[0,T[1],T[2],T[3],T[4],T[5],T[6],T[7],T[8],A,g]];break;case 3:var N=t[1],R=o(N[4]),lx=[3,[0,N[1],N[2],N[3],R]];break;case 4:var I=t[1],M=o(I[4]),lx=[4,[0,I[1],I[2],I[3],M]];break;case 5:var L=t[1],z=o(L[4]),lx=[5,[0,L[1],L[2],L[3],z]];break;case 6:var V=t[1],Z=o(V[7]),lx=[6,[0,V[1],V[2],V[3],V[4],V[5],V[6],Z]];break;case 7:var $=t[1],i0=o($[4]),lx=[7,[0,$[1],$[2],$[3],i0]];break;case 8:var U=t[1],J=U[10],Y=o(U[9]),lx=[8,[0,U[1],U[2],U[3],U[4],U[5],U[6],U[7],U[8],Y,J]];break;case 9:var F=t[1],n0=F[2],Q=F[1],f0=o(n0[2]),lx=[9,[0,Q,[0,n0[1],f0]]];break;case 10:var s0=t[1],v0=o(s0[2]),lx=[10,[0,s0[1],v0]];break;case 11:var o0=t[1],c0=o(o0[4]),lx=[11,[0,o0[1],o0[2],o0[3],c0]];break;case 12:var T0=t[1],E0=o(T0[4]),lx=[12,[0,T0[1],T0[2],T0[3],E0]];break;case 13:var M0=t[1],Y0=o(M0[3]),lx=[13,[0,M0[1],M0[2],Y0]];break;case 14:var rx=t[1],g0=o(rx[2]),lx=[14,[0,rx[1],g0]];break;case 15:var lx=[15,o(t[1])];break;case 16:var H0=t[1],t0=o(H0[3]),lx=[16,[0,H0[1],H0[2],t0]];break;case 17:var ex=t[1],xx=o(ex[3]),lx=[17,[0,ex[1],ex[2],xx]];break;case 18:var ax=t[1],dx=o(ax[4]),lx=[18,[0,ax[1],ax[2],ax[3],dx]];break;case 19:var mx=t[1],L0=o(mx[6]),lx=[19,[0,mx[1],mx[2],mx[3],mx[4],mx[5],L0]];break;case 20:var C0=t[1],A0=o(C0[4]),lx=[20,[0,C0[1],C0[2],C0[3],A0]];break;case 21:var U0=t[1],Q0=o(U0[3]),lx=[21,[0,U0[1],U0[2],Q0]];break;case 22:var H=t[1],b=o(H[3]),lx=[22,[0,H[1],H[2],b]];break;case 23:var B=t[1],a0=o(B[4]),lx=[23,[0,B[1],B[2],B[3],a0]];break;case 24:var m0=t[1],P0=a(m0[2]),lx=[24,[0,m0[1],P0]];break;case 25:var D=t[1],N0=D[1],X0=D[3],D0=D[2],ox=o(N0[4]),lx=[25,[0,[0,N0[1],N0[2],N0[3],ox],D0,X0]];break;case 26:var b0=t[1],kx=b0[1],V0=b0[3],h=b0[2],X=o(kx[3]),lx=[26,[0,[0,kx[1],kx[2],X],h,V0]];break;case 27:var W0=t[1],sx=o(W0[2]),lx=[27,[0,W0[1],sx]];break;case 28:var lx=[28,[0,o(t[1][1])]];break;case 29:var tx=t[1],j0=o(tx[3]),lx=[29,[0,tx[1],tx[2],j0]];break;case 30:var Px=t[1],Ex=o(Px[3]),lx=[30,[0,Px[1],Px[2],Ex]];break;case 31:var lx=[31,[0,o(t[1][1])]];break;case 32:var Ox=t[1],qx=o(Ox[3]),lx=[32,[0,Ox[1],Ox[2],qx]];break;case 34:var B0=t[1],rr=o(B0[3]),lx=[34,[0,B0[1],B0[2],rr]];break;case 35:var Ux=t[1],K0=o(Ux[4]),lx=[35,[0,Ux[1],Ux[2],Ux[3],K0]];break;case 36:var nr=t[1],z0=nr[4],or=nr[3],jr=o(nr[2]),lx=[36,[0,nr[1],jr,or,z0]];break;default:var lx=t}return[0,u,lx]}),I0(Xz,function(x){var r=_0(x);u0(x,6);for(var e=[0,0,hn];;){var t=e[2],u=e[1],i=K(x);if(typeof i=="number"){var f=0;if(13<=i)Nr===i&&(f=1);else if(7<=i)switch(i-7|0){case 0:f=1;break;case 2:var o=gx(x);Z0(x);var e=[0,[0,[2,o],u],t];continue;case 5:var a=_0(x),d=l0(0,function(Y){Z0(Y);var F=l(p3,Y);return F[0]===0?[0,F[1],hn]:[0,F[1],F[2]]},x),k=d[2],T=k[2],g=d[1],A=k[1],N=[1,[0,g,[0,A,y0([0,a],0,0)]]],R=K(x)===7?1:0,I=0;if(!R&&pr(1,x)===7){var M=[0,T[1],[0,[0,g,20],T[2]]];I=1}if(!I)var M=T;1-R&&u0(x,9);var e=[0,[0,N,u],QO(M,t)];continue}if(f){var L=Cz(t),z=Ax(u),V=_0(x);return u0(x,7),[0,[0,z,J1([0,r],[0,yx(x)],V,0)],L]}}var Z=l(p3,x);if(Z[0]===0)var $=hn,i0=Z[1];else var $=Z[2],i0=Z[1];K(x)!==7&&u0(x,9);var e=[0,[0,[0,i0],u],QO($,t)]}}),I0(Jz,function(x){V1(x,5);var r=gx(x),e=_0(x),t=K(x),u=0;if(typeof t!="number"&&t[0]===5){var i=t[3],f=t[2];Z0(x);var o=yx(x),a=o,d=i,k=f,T=Qx(ka0,Qx(f,Qx(ma0,i)));u=1}if(!u){g1(ha0,x);var a=0,d=_a0,k=wa0,T=Ta0}$1(x);var g=Qr(Xx(d)),A=Xx(d)-1|0,N=0;if(A>=0)for(var R=N;;){var I=fx(d,R),M=I-100|0,L=0;if(21>=M>>>0)switch(M){case 0:case 3:case 5:case 9:case 15:case 17:case 21:lt(g,I),L=1;break}var z=R+1|0;if(A!==R){var R=z;continue}break}var V=X1(g);return P(V,d)&&zx(x,[18,d]),[0,r,[18,[0,k,V,T,y0([0,e],[0,a],0)]]]});var uE0=function(x){return function(r){if(typeof r=="number"){var e=0;if(66<=r){var t=r+ij|0;if(49>>0)e=1;else{var u=t-15|0;if(9>=u>>>0)switch(u){case 0:case 1:case 3:case 9:e=1;break}}}else 8<=r?r===60&&(e=1):6<=r&&(e=1);if(e)return 0}throw q0(as,1)}},iE0=function(x){var r=K(x);if(typeof r=="number"&&!r){var e=p(px[16],1,x);return[0,[0,e[1]],e[2]]}return[0,[1,l(px[10],x)],0]};I0(vL,function(x){var r=Gy(uE0,x),e=gx(r);if(pr(1,r)===11)var u=0,i=0;else var t=E9(r),u=t[2],i=t[1];var f=i||r[19],o=vO(f,r),a=o[18],d=l0(0,function(c0){var T0=ue(c0,Ze(c0));if(vs(c0)&&T0===0){var E0=p(px[13],ya0,c0),M0=E0[1],Y0=[0,M0,[0,[0,M0,[2,[0,E0,[0,bs(c0)],0]]],0]];return[0,T0,[0,M0,[0,0,[0,Y0,0],0,0]],[0,[0,M0[1],M0[3],M0[3]]],0]}var rx=l(a3(f,a),c0);_z(c0,rx);var g0=JO(Wv(1,c0));return[0,T0,rx,g0[1],g0[2]]},o),k=d[2],T=k[2],g=T[2],A=0,N=k[4],R=k[3],I=k[1],M=d[1];if(!g[1]){var L=0,z=g[2];if((g[3]||!z)&&(L=1),L){var V=EV(o);A=1}}if(!A)var V=o;var Z=T[2],$=Z[1];if($){var i0=T[1];ux(V,[0,$[1][1],91]);var U=[0,i0,[0,0,Z[2],Z[3],Z[4]]]}else var U=T;var J=Fv(U),Y=Z2(V),F=Y&&(K(V)===11?1:0);F&&zx(V,60),u0(V,11);var n0=gV(EV(V),i,0,J),Q=l0(0,iE0,n0),f0=Q[2],s0=f0[1],v0=Q[1];v3(n0,f0[2],0,U);var o0=Fr(e,v0);return[0,[0,o0,[1,[0,0,U,s0,i,0,N,R,I,y0([0,u],0,0),M]]]]}),I0(N9,function(x,r,e){return l0([0,r],function(t){for(var u=e;;){var i=K(t);if(typeof i=="number"&&i===9){Z0(t);var u=[0,l(Qt,t),u];continue}return[27,[0,Ax(u),0]]}},x)});var fE0=function(x){var r=_0(x);Z0(x);var e=y0([0,r],0,0),t=l(g9,x),u=Z2(x)?p6(x):n9(x),i=u[2];return[0,p(i,t,function(f,o){return p(Gx(f,dn,64),f,o)}),e]},mL=function(x){if(!x[28][3])return 0;for(var r=0;;){var e=K(x);if(typeof e=="number"&&e===13){var r=[0,l0(0,fE0,x),r];continue}return Ax(r)}},$o=function(x,r){var e=x?x[1]:0,t=_0(r),u=K(r);if(typeof u=="number")switch(u){case 6:var i=l0(0,function(v0){var o0=_0(v0);u0(v0,6);var c0=s6(0,v0),T0=l(px[10],c0);return u0(v0,7),[0,T0,y0([0,o0],[0,yx(v0)],0)]},r),f=i[1];return[0,f,[5,[0,f,i[2]]]];case 14:if(!e){var o=l0(0,function(v0){return Z0(v0),[3,S2(v0)]},r),a=o[1],d=o[2];return ux(r,[0,a,68]),[0,a,d]}var k=YV(r),T=r[30][1],g=k[2][1],A=k[1];if(T){var N=T[1],R=T[2],I=N[2],M=[0,[0,p(T2[4],g,N[1]),I],R];r[30][1]=M}else Nx(Cs0);return[0,A,[4,k]]}else switch(u[0]){case 0:var L=u[2],z=u[1],V=gx(r),Z=G0(P9,r,z,L);return[0,V,[1,[0,V,[0,Z,L,y0([0,t],[0,yx(r)],0)]]]];case 1:var $=u[2],i0=u[1],U=gx(r),J=G0(C9,r,i0,$);return[0,U,[2,[0,U,[0,J,$,y0([0,t],[0,yx(r)],0)]]]];case 2:var Y=u[1],F=Y[4],n0=Y[3],Q=Y[2],f0=Y[1];return F&&$t(r,81),u0(r,[2,[0,f0,Q,n0,F]]),[0,f0,[0,[0,f0,[0,Q,n0,y0([0,t],[0,yx(r)],0)]]]]}var s0=S2(r);return[0,s0[1],[3,s0]]},R9=function(x,r,e){var t=l3(x),u=t[1],i=t[2],f=$o([0,r],x),o=f[1],a=0,d=En(x,f[2]);return[0,d,l0(0,function(k){var T=Zv(1,k),g=l0(0,function(V){var Z=l(a3(0,0),V),$=0,i0=K(V)===86?Z:d6(V,Z);if(e){var U=i0[2],J=0;if(U[1])ux(V,[0,o,28]),J=1;else{var Y=0;U[2]||U[3]?Y=1:J=1,Y&&ux(V,[0,o,27])}}else{var F=i0[2];if(F[1])ux(V,[0,o,71]);else{var n0=F[2],Q=0;n0&&!n0[2]&&!F[3]&&(Q=1),Q||(F[3]?ux(V,[0,o,70]):ux(V,[0,o,70]))}}return[0,$,i0,c3(V,XO(V))]},T),A=g[2],N=A[2],R=A[3],I=A[1],M=g[1],L=T6(T,a,u,0,Fv(N)),z=L[1];return v3(T,L[2],0,N),[0,0,N,z,a,u,0,R,I,y0([0,i],0,0),M]},x)]},Wz=function(x){var r=l(p3,x);return r[0]===0?[0,r[1],hn]:[0,r[1],r[2]]},$z=function(x,r){switch(r[0]){case 0:var e=r[1],t=e[1],u=e[2];return ux(x,[0,t,53]),[0,t,[13,u]];case 1:var i=r[1],f=i[1],o=i[2];return ux(x,[0,f,53]),[0,f,[16,o]];case 2:var a=r[1],d=a[1],k=a[2];return ux(x,[0,d,53]),[0,d,[17,k]];case 3:var T=r[1],g=T[2][1],A=T[1];return by(g)?ux(x,[0,A,ot]):i3(g)&&yt(x,[0,A,85]),[0,A,[9,T]];case 4:return Nx(nl0);default:var N=r[1][2][1];return ux(x,[0,N[1],8]),N}},Qz=function(x,r,e){function t(i){var f=Zv(1,i),o=l0(0,function(R){var I=ue(R,Ze(R)),M=l(a3(x,r),R),L=K(R)===86?M:d6(R,M);return[0,I,L,c3(R,XO(R))]},f),a=o[2],d=a[2],k=a[3],T=a[1],g=o[1],A=T6(f,x,r,0,Fv(d)),N=A[1];return v3(f,A[2],0,d),[0,0,d,N,x,r,0,k,T,y0([0,e],0,0),g]}var u=0;return function(i){return l0(u,t,i)}},Fz=function(x){return u0(x,86),Wz(x)},kL=function(x,r,e,t,u,i){var f=l0([0,r],function(a){if(!t&&!u){var d=K(a);if(typeof d=="number"){var k=0;if(86<=d){if(d===98)k=1;else if(87>d){var T=Fz(a);return[0,[0,e,T[1],0],T[2]]}}else{if(d===82){if(e[0]===3)var g=e[1],A=gx(a),N=function(z){var V=_0(z);u0(z,82);var Z=yx(z),$=p(px[19],z,[0,g[1],[9,g]]),i0=l(px[10],z);return[3,[0,0,$,i0,y0([0,V],[0,Z],0)]]},R=l0([0,g[1]],N,a),I=[0,R,[0,[0,[0,A,[24,gy(tl0)]],0],0]];else var I=Fz(a);return[0,[0,e,I[1],1],I[2]]}if(10>d)switch(d){case 4:k=1;break;case 1:case 9:return[0,[0,e,$z(a,e),1],hn]}}if(k){var M=En(a,e);return[0,[1,M,l(Qz(t,u,i),a)],hn]}}return[0,[0,e,$z(a,e),1],hn]}var L=En(a,e);return[0,[1,L,l(Qz(t,u,i),a)],hn]},x),o=f[2];return[0,[0,[0,f[1],o[1]]],o[2]]},cE0=function(x){if(K(x)===12){var r=_0(x),e=l0(0,function(M0){return u0(M0,12),Wz(M0)},x),t=e[2],u=t[2],i=t[1],f=e[1];return[0,[1,[0,f,[0,i,y0([0,r],0,0)]]],u]}var o=gx(x),a=pr(1,x),d=0;if(typeof a=="number"){var k=0;if(86<=a)a!==98&&87<=a&&(k=1);else if(a!==82)if(10<=a)k=1;else switch(a){case 1:case 4:case 9:break;default:k=1}if(!k){var g=0,A=0;d=1}}if(!d)var T=E9(x),g=T[2],A=T[1];var N=l3(x),R=N[1],I=Fx(g,N[2]),M=K(x);if(!A&&!R&&typeof M!="number"&&M[0]===4){var L=M[3];if(!P(L,Cv)){var z=_0(x),V=$o(0,x)[2],Z=K(x);if(typeof Z=="number"){var $=0;if(86<=Z)Z!==98&&87<=Z&&($=1);else if(Z!==82)if(10<=Z)$=1;else switch(Z){case 1:case 4:case 9:break;default:$=1}if(!$)return kL(x,o,V,0,0,0)}En(x,V);var i0=l0([0,o],function(M0){return R9(M0,0,1)},x),U=i0[2],J=U[2],Y=U[1],F=i0[1];return[0,[0,[0,F,[2,Y,J,y0([0,z],0,0)]]],hn]}if(!P(L,ja)){var n0=_0(x),Q=$o(0,x)[2],f0=K(x);if(typeof f0=="number"){var s0=0;if(86<=f0)f0!==98&&87<=f0&&(s0=1);else if(f0!==82)if(10<=f0)s0=1;else switch(f0){case 1:case 4:case 9:break;default:s0=1}if(!s0)return kL(x,o,Q,0,0,0)}En(x,Q);var v0=l0([0,o],function(M0){return R9(M0,0,0)},x),o0=v0[2],c0=o0[2],T0=o0[1],E0=v0[1];return[0,[0,[0,E0,[3,T0,c0,y0([0,n0],0,0)]]],hn]}}return kL(x,o,$o(0,x)[2],A,R,I)},sE0=function(x){var r=l0(0,function(t){var u=_0(t);u0(t,0);for(var i=0,f=[0,0,hn];;){var o=f[2],a=f[1],d=K(t);if(typeof d=="number"){var k=0;if(d!==1&&Nr!==d&&(k=1),!k){var T=i?[0,o[1],[0,[0,i[1],95],o[2]]]:o,g=Cz(T),A=Ax(a),N=_0(t);return u0(t,1),[0,[0,A,J1([0,u],[0,yx(t)],N,0)],g]}}var R=cE0(t),I=R[1],M=0,L=R[2];if(I[0]===1&&K(t)===9){var z=[0,gx(t)];M=1}if(!M)var z=0;var V=QO(L,o),Z=K(t),$=0;if(typeof Z=="number"){var i0=Z-2|0,U=0;if(B1>>0?D2>=i0+1>>>0&&(U=1):i0===7&&(Z0(t),U=1),U){var J=V;$=1}}if(!$){var Y=tO(ws0,9),F=RV([0,Y],K(t)),n0=[0,gx(t),F];o1(t,8);var J=[0,[0,n0,V[1]],[0,n0,V[2]]]}var i=z,f=[0,[0,I,a],J]}},x),e=r[2];return[0,r[1],e[1],e[2]]},I9=function(x,r,e,t){var u=e[2][1],i=e[1];if(Ar(u,Ev))return ux(x,[0,i,[15,u,0,HU===t?1:0,1]]),r;for(var f=r;;){if(typeof f=="number")var a=0;else if(f[0]===0)var o=f[2],a=Tx(u,f[1])===0?[0,o]:0;else{var d=Tx(u,f[2]),k=f[5],T=f[4],g=f[3];if(d!==0){var A=0<=d?k:T,f=A;continue}var a=[0,g]}if(!a)return s9(u,t,r);var N=a[1],R=0;return MP===t?FN===N&&(R=1):FN===t&&MP===N&&(R=1),R||ux(x,[0,i,[1,u]]),s9(u,Fj,r)}},Hz=function(x,r){return l0(0,function(e){var t=r?_0(e):0;u0(e,52);for(var u=0;;){var i=[0,l0(0,function(a){var d=ls(a);if(K(a)===98)var k=R1(a)[2],T=p(k,d,function(g,A){return p(Gx(g,Ra,65),g,A)});else var T=d;return[0,T,kz(a)]},e),u],f=K(e);if(typeof f=="number"&&f===9){u0(e,9);var u=i;continue}var o=Ax(i);return[0,o,y0([0,t],0,0)]}},x)},hL=function(x){switch(x[0]){case 0:case 3:var r=x[1];return[0,[0,r[1],r[2][1]]];default:return 0}},_L=function(x,r){return r?ux(x,[0,r[1][1],D2]):0},wL=function(x,r){return r?ux(x,[0,r[1],13]):0},qz=function(x,r,e,t,u,i,f,o){var a=l0([0,r],function(R){var I=YO(R),M=K(R);if(i){var L=0;if(typeof M=="number"&&M===82){zx(R,14),Z0(R);var z=0}else L=1;if(L)var z=0}else{var V=0;if(typeof M=="number"&&M===82){Z0(R);var Z=Zv(1,R),z=[0,l(px[7],Z)];V=1}if(!V)var z=1}var $=K(R),i0=0;if(typeof $=="number"&&9>$)switch($){case 8:Z0(R);var U=K(R),J=0;if(typeof U=="number"){var Y=0;if(U===1||Nr===U?Y=1:J=1,Y)var F=yx(R)}else J=1;if(J)var F=Z2(R)?Ko(R):0;var n0=[0,t,I,z,F];i0=1;break;case 4:case 6:g1(0,R);var n0=[0,t,I,z,0];i0=1;break}if(!i0){var Q=K(R),f0=0;if(typeof Q=="number"){var s0=0;if(Q===1||Nr===Q?s0=1:f0=1,s0)var v0=[0,0,function(dx,mx){return dx}]}else f0=1;if(f0)var v0=Z2(R)?p6(R):n9(R);if(typeof z=="number")if(I[0]===0)var o0=function(ax,dx){return p(Gx(ax,aD,68),ax,dx)},Y0=z,rx=I,g0=p(v0[2],t,o0);else var c0=I[1],T0=function(ax,dx){return p(Gx(ax,$N,69),ax,dx)},Y0=z,rx=[1,p(v0[2],c0,T0)],g0=t;else var E0=z[1],M0=function(ax,dx){return p(Gx(ax,dn,70),ax,dx)},Y0=[0,p(v0[2],E0,M0)],rx=I,g0=t;var n0=[0,g0,rx,Y0,0]}var H0=n0[3],t0=n0[2],ex=n0[1];return[0,ex,t0,H0,y0([0,o],[0,n0[4]],0)]},x),d=a[2],k=d[4],T=d[3],g=d[2],A=d[1],N=a[1];return A[0]===4?[2,[0,N,[0,A[1],T,g,u,f,e,k]]]:[1,[0,N,[0,A,T,g,u,f,e,k]]]},TL=function(x,r,e,t,u,i,f,o,a,d){for(;;){var k=K(x);if(typeof k=="number"){var T=k-1|0,g=0;if(7>>0){var A=T-81|0;if(4>=A>>>0)switch(A){case 3:g1(0,x),Z0(x);continue;case 0:case 4:g=1;break}}else 5>>0&&(g=1);if(g&&!u&&!i)return qz(x,r,e,t,f,o,a,d)}var N=K(x),R=0;if(typeof N=="number"&&(N===4||N===98))var I=0;else R=1;if(R)var I=f3(x)?1:0;if(I)return qz(x,r,e,t,f,o,a,d);wL(x,o),_L(x,a);var M=hL(t),L=0;if(f){if(M){var z=M[1],V=z[1];if(!P(z[2],Ao)){ux(x,[0,V,[15,H30,f,1,0]]);var i0=Zv(1,x),U=1;L=1}}}else if(M){var Z=M[1],$=Z[1];if(!P(Z[2],Ev)){u&&ux(x,[0,$,10]),i&&ux(x,[0,$,11]);var i0=Zv(2,x),U=0;L=1}}if(!L)var i0=Zv(1,x),U=1;var J=En(i0,t),Y=l0(0,function(n0){var Q=l0(0,function(M0){var Y0=ue(M0,Ze(M0)),rx=l(a3(u,i),M0),g0=K(M0)===86?rx:d6(M0,rx),H0=g0[2],t0=H0[1],ex=0;if(t0){var xx=t0[1][1],ax=g0[1];if(U===0){ux(M0,[0,xx,92]);var dx=[0,ax,[0,0,H0[2],H0[3],H0[4]]];ex=1}}if(!ex)var dx=g0;return[0,Y0,dx,c3(M0,XO(M0))]},n0),f0=Q[2],s0=f0[2],v0=f0[3],o0=f0[1],c0=Q[1],T0=T6(n0,u,i,0,Fv(s0)),E0=T0[1];return v3(n0,T0[2],0,s0),[0,0,s0,E0,u,i,0,v0,o0,0,c0]},i0),F=[0,U,J,Y,f,e,y0([0,d],0,0)];return[0,[0,Fr(r,Y[1]),F]]}},SL=function(x,r){var e=pr(x,r);if(typeof e=="number"){var t=0;if(86<=e)e!==98&&87<=e&&(t=1);else if(e!==82)if(9<=e)t=1;else switch(e){case 1:case 4:case 8:break;default:t=1}if(!t)return 1}return 0},oE0=0,Gz=function(x){return SL(oE0,x)},vE0=function(x){var r=gx(x),e=mL(x),t=K(x),u=0;if(typeof t=="number"&&t===60&&!SL(1,x)){var i=[0,gx(x)],f=_0(x);Z0(x);var o=f,a=i;u=1}if(!u)var o=0,a=0;var d=K(x),k=0;if(typeof d=="number"&&2>=d+kU>>>0&&Vo(1,x)){var T=0;if(typeof d=="number"){var g=d+kU|0;if(2>=g>>>0){switch(g){case 0:var A=oY;break;case 1:var A=cl;break;default:var A=yl}var N=A;T=1}}if(!T)var N=Nx(q30);zx(x,[22,N]),Z0(x),k=1}var R=K(x)===42?1:0;if(R){var I=pr(1,x),M=0;if(typeof I=="number"){var L=0;if(87<=I)I!==98&&Nr!==I&&(L=1);else{var z=I-9|0;if(76>>0){if(77>z)switch(z+9|0){case 1:case 4:case 8:break;default:L=1}}else z!==73&&(L=1)}if(!L){var V=0;M=1}}if(!M)var V=1;var Z=V}else var Z=R;if(Z){var $=_0(x);Z0(x);var i0=$}else var i0=0;var U=K(x)===64?1:0;if(U)var J=1-SL(1,x),Y=J&&1-v6(1,x);else var Y=U;if(Y){var F=_0(x);Z0(x);var n0=F}else var n0=0;var Q=l3(x),f0=Q[1],s0=Q[2],v0=Vo(1,x),o0=v0||(pr(1,x)===6?1:0),c0=gx(x),T0=K(x),E0=0;if(typeof T0=="number")switch(T0){case 103:var M0=_0(x);Z0(x);var g0=[0,[0,c0,[0,0,y0([0,M0],0,0)]]];E0=1;break;case 104:var Y0=_0(x);Z0(x);var g0=[0,[0,c0,[0,1,y0([0,Y0],0,0)]]];E0=1;break}else if(T0[0]===4&&!P(T0[3],ga)&&o0){var rx=_0(x);Z0(x);var g0=[0,[0,c0,[0,2,y0([0,rx],0,0)]]];E0=1}if(!E0)var g0=0;var H0=0;if(g0){var t0=0,ex=g0[1][1];if((Y||f0)&&(t0=1),t0){ux(x,[0,ex,D2]);var xx=0;H0=1}}if(!H0)var xx=g0;var ax=0;if(!f0&&xx){var dx=l3(x),mx=dx[2],L0=dx[1];ax=1}if(!ax)var mx=s0,L0=f0;var C0=Xl([0,o,[0,i0,[0,n0,[0,mx,0]]]]),A0=K(x);if(!Y&&!L0&&typeof A0!="number"&&A0[0]===4){var U0=A0[3];if(!P(U0,Cv)){var Q0=_0(x),H=$o(b30,x)[2];if(Gz(x))return TL(x,r,e,H,Y,L0,Z,a,xx,C0);wL(x,a),_L(x,xx),En(x,H);var b=Fx(C0,Q0),B=l0([0,r],function(K0){return R9(K0,1,1)},x),a0=B[2],m0=a0[1],P0=a0[2],D=B[1],N0=hL(m0),X0=0;if(Z){if(N0){var D0=N0[1],ox=D0[1];P(D0[2],Ao)||(ux(x,[0,ox,[15,el0,Z,0,0]]),X0=1)}}else if(N0){var b0=N0[1],kx=b0[1];P(b0[2],Ev)||(ux(x,[0,kx,9]),X0=1)}return[0,[0,D,[0,2,m0,P0,Z,e,y0([0,b],0,0)]]]}if(!P(U0,ja)){var V0=_0(x),h=$o(G30,x)[2];if(Gz(x))return TL(x,r,e,h,Y,L0,Z,a,xx,C0);wL(x,a),_L(x,xx),En(x,h);var X=Fx(C0,V0),W0=l0([0,r],function(K0){return R9(K0,1,0)},x),sx=W0[2],tx=sx[1],j0=sx[2],Px=W0[1],Ex=hL(tx),Ox=0;if(Z){if(Ex){var qx=Ex[1],B0=qx[1];P(qx[2],Ao)||(ux(x,[0,B0,[15,rl0,Z,0,0]]),Ox=1)}}else if(Ex){var rr=Ex[1],Ux=rr[1];P(rr[2],Ev)||(ux(x,[0,Ux,9]),Ox=1)}return[0,[0,Px,[0,3,tx,j0,Z,e,y0([0,X],0,0)]]]}}return TL(x,r,e,$o(xl0,x)[2],Y,L0,Z,a,xx,C0)},bz=function(x,r,e,t){var u=x?x[1]:0,i=Gs(1,r),f=Fx(u,mL(i)),o=_0(i),a=K(i),d=0;typeof a!="number"&&a[0]===4&&!P(a[3],x_)&&(zx(i,88),Z0(i),d=1),u0(i,40);var k=aO(1,i),T=K(k),g=0;if(e&&typeof T=="number"){var A=0;if(52<=T?T!==98&&53<=T&&(A=1):T!==41&&T&&(A=1),!A){var I=0;g=1}}if(!g)if(vs(i))var N=p(px[13],0,k),R=R1(i)[2],I=[0,p(R,N,function(Q,f0){return p(Gx(Q,Ra,72),Q,f0)})];else{IV(i,W30);var I=[0,[0,gx(i),$30]]}var M=Ze(i);if(M)var L=M[1],z=R1(i)[2],V=[0,p(z,L,function(Q,f0){return p(Gx(Q,GN,71),Q,f0)})];else var V=0;var Z=_0(i);if(o1(i,41))var $=l0(0,function(Q){var f0=l(g9,oO(0,Q));if(K(Q)===98)var s0=R1(Q)[2],v0=p(s0,f0,function(c0,T0){return p(Gx(c0,dn,66),c0,T0)});else var v0=f0;var o0=kz(Q);return[0,v0,o0,y0([0,Z],0,0)]},i),i0=$[1],U=$[2],J=R1(i)[2],Y=[0,[0,i0,p(J,U,function(Q,f0){return G0(Gx(Q,-663447790,67),Q,i0,f0)})]];else var Y=0;if(K(i)===52){1-_1(i)&&zx(i,Ot);var F=[0,UV(i,Hz(i,1))]}else var F=0;var n0=l0(0,function(Q){var f0=_0(Q);if(!o1(Q,0))return xo(Q,0),F30;Q[30][1]=[0,[0,T2[1],0],Q[30][1]];for(var s0=0,v0=vS0,o0=0;;){var c0=K(Q);if(typeof c0=="number"){var T0=c0-2|0;if(B1>>0){if(D2>=T0+1>>>0){var E0=Ax(o0),M0=function(B0,rr){return l(Jl(function(Ux){return 1-p(T2[3],Ux[1],B0)}),rr)},Y0=Q[30][1];if(Y0){var rx=Y0[1],g0=rx[1];if(Y0[2]){var H0=Y0[2],t0=M0(g0,rx[2]),ex=Yl(H0),xx=ex[2],ax=ex[1],dx=vX(H0),mx=[0,[0,ax,Fx(xx,t0)],dx];Q[30][1]=mx}else{var L0=M0(g0,rx[2]);C2(function(B0){return ux(Q,[0,B0[2],[23,B0[1]]])},L0),Q[30][1]=0}}else Nx(Ns0);u0(Q,1);var C0=K(Q),A0=0;if(!t){var U0=0;if((typeof C0!="number"||C0!==1&&Nr!==C0)&&(U0=1),U0)if(Z2(Q)){var Q0=Ko(Q);A0=1}else{var Q0=0;A0=1}}if(!A0)var Q0=yx(Q);return[0,E0,y0([0,f0],[0,Q0],0)]}}else if(T0===6){u0(Q,8);continue}}var H=vE0(Q);switch(H[0]){case 0:var b=H[1],B=b[2],a0=b[1];switch(B[1]){case 0:if(B[4])var j0=v0,Px=s0;else{s0&&ux(Q,[0,a0,18]);var j0=v0,Px=1}break;case 1:var m0=B[2],P0=m0[0]===4?I9(Q,v0,m0[1],HU):v0,j0=P0,Px=s0;break;case 2:var D=B[2],N0=D[0]===4?I9(Q,v0,D[1],MP):v0,j0=N0,Px=s0;break;default:var X0=B[2],D0=X0[0]===4?I9(Q,v0,X0[1],FN):v0,j0=D0,Px=s0}break;case 1:var ox=H[1][2],b0=ox[4],kx=ox[1];switch(kx[0]){case 4:Nx(Q30);break;case 0:case 3:var V0=kx[1],h=V0[2][1],X=Ar(h,Ev),W0=V0[1];if(X)var tx=X;else var sx=Ar(h,Ao),tx=sx&&b0;tx&&ux(Q,[0,W0,[15,h,b0,0,0]]);break}var j0=v0,Px=s0;break;default:var j0=I9(Q,v0,H[1][2][1],Fj),Px=s0}var s0=Px,v0=j0,o0=[0,H,o0]}},i);return[0,I,n0,V,Y,F,f,y0([0,o],0,0)]},O9=function(x,r){return l0(0,function(e){return[2,bz([0,r],e,e[7],0)]},x)},aE0=function(x){return[6,bz(0,x,1,1)]},lE0=0,pE0=function(x){return l0(lE0,aE0,x)},xK=VV(px),rK=function(x){var r=S6(x);if(x[5])Qv(x,r[1]);else{var e=r[2],t=0;if(e[0]===26){var u=e[1],i=r[1],f=0;u[4]?(ux(x,[0,i,5]),f=1):u[5]&&(ux(x,[0,i,26]),f=1),f&&(t=1)}}return r},L9=function(x,r){var e=r[4],t=r[3],u=r[2],i=r[1];e&&$t(x,81);var f=_0(x);return u0(x,[2,[0,i,u,t,e]]),[0,i,[0,u,t,y0([0,f],[0,yx(x)],0)]]},n2=function(x,r,e){var t=x?x[1]:Yl0,u=r?r[1]:1,i=K(e);if(typeof i=="number"){var f=i-2|0;if(B1>>0){if(D2>=f+1>>>0){var o=function(k,T){return k};return[1,[0,yx(e),o]]}}else if(f===6){Z0(e);var a=K(e);if(typeof a=="number"){var d=0;if(a!==1&&Nr!==a&&(d=1),!d)return[0,yx(e)]}return Z2(e)?[0,Ko(e)]:Xl0}}return Z2(e)?[1,p6(e)]:(u&&g1([0,t],e),Jl0)},no=function(x){var r=K(x);if(typeof r=="number"){var e=0;if(r!==1&&Nr!==r&&(e=1),!e){var t=function(u,i){return u};return[0,yx(x),t]}}return Z2(x)?p6(x):n9(x)},EL=function(x,r,e){var t=n2(0,0,r);if(t[0]===0)return[0,t[1],e];var u=t[1][2],i=Ax(e);if(i)var f=i[2],o=i[1],a=Ax([0,p(u,o,function(d,k){return G0(Gx(d,634872468,73),d,x,k)}),f]);else var a=0;return[0,0,a]},eK=function x(r){return x.fun(r)},tK=function x(r){return x.fun(r)},nK=function x(r){return x.fun(r)},uK=function x(r){return x.fun(r)},iK=function x(r){return x.fun(r)},g6=function x(r,e){return x.fun(r,e)},fK=function x(r){return x.fun(r)},cK=function x(r){return x.fun(r)},A6=function x(r,e,t){return x.fun(r,e,t)},sK=function x(r){return x.fun(r)},oK=function x(r){return x.fun(r)},P6=function x(r,e){return x.fun(r,e)},vK=function x(r){return x.fun(r)},aK=function x(r){return x.fun(r)},M9=function x(r,e){return x.fun(r,e)},lK=function x(r){return x.fun(r)},D9=function x(r,e){return x.fun(r,e)},pK=function x(r){return x.fun(r)},dK=function x(r){return x.fun(r)},j9=function x(r,e){return x.fun(r,e)},yK=function x(r){return x.fun(r)},C6=function x(r,e,t){return x.fun(r,e,t)},N6=function x(r,e){return x.fun(r,e)},mK=function x(r,e){return x.fun(r,e)},kK=function x(r,e){return x.fun(r,e)},gL=function x(r,e){return x.fun(r,e)},hK=function x(r){return x.fun(r)},d3=function x(r){return x.fun(r)},U9=function x(r,e,t){return x.fun(r,e,t)},AL=function x(r,e){return x.fun(r,e)},_K=function x(r,e){return x.fun(r,e)},PL=function x(r){return x.fun(r)},dE0=function(x){var r=_0(x);u0(x,59);var e=K(x)===8?yx(x):0,t=n2(0,0,x),u=t[0]===0?t[1]:t[1][1];return[5,[0,y0([0,r],[0,Fx(e,u)],0)]]},yE0=0,mE0=function(x){var r=_0(x);u0(x,37);var e=c6(1,x),t=l(px[2],e),u=1-x[5],i=u&&y6(t);i&&Qv(x,t[1]);var f=yx(x);u0(x,25);var o=yx(x);u0(x,4);var a=l(px[7],x);u0(x,5);var d=K(x)===8?yx(x):0,k=n2(0,Bl0,x),T=k[0]===0?Fx(d,k[1]):k[1][1];return[17,[0,t,a,y0([0,r],[0,Fx(f,Fx(o,T))],0)]]},kE0=0,wK=function(x,r,e){var t=e[2][1],u=e[1];return t&&!t[1][2][2]&&!t[2]?0:ux(x,[0,u,r])},CL=function(x,r){return!x[5]&&y6(r)?Qv(x,r[1]):0},hE0=function(x){var r=_0(x);u0(x,39);var e=x[19],t=e&&o1(x,65),u=Fx(r,_0(x));u0(x,4);var i=y0([0,u],0,0),f=K(x),o=0;if(typeof f=="number"&&f===64){var a=1;o=1}if(!o)var a=0;var d=s6(1,x),k=K(d),T=0;if(typeof k=="number"){if(24<=k){if(29>k)switch(k+ST|0){case 0:var g=l0(0,Ez,d),A=g[2],N=A[3],R=A[1],I=g[1],F=N,n0=[0,[1,[0,I,[0,R,0,y0([0,A[2]],0,0)]]]];T=1;break;case 3:var M=l0(0,gz,d),L=M[2],z=L[3],V=L[1],Z=M[1],F=z,n0=[0,[1,[0,Z,[0,V,2,y0([0,L[2]],0,0)]]]];T=1;break;case 4:if(pr(1,d)!==17){var $=l0(0,Az,d),i0=$[2],U=i0[3],J=i0[1],Y=$[1],F=U,n0=[0,[1,[0,Y,[0,J,1,y0([0,i0[2]],0,0)]]]];T=1}break}}else if(k===8){var F=0,n0=0;T=1}}if(!T)var F=0,n0=[0,[0,l(px[8],d)]];var Q=K(x);if(typeof Q=="number"){if(Q===17){if(!n0)throw q0([0,wr,Ul0],1);var f0=n0[1];if(f0[0]===0)var s0=[1,$O(jl0,x,f0[1])];else{var v0=f0[1];wK(x,43,v0);var s0=[0,v0]}t?u0(x,63):u0(x,17);var o0=l(px[7],x);u0(x,5);var c0=c6(1,x),T0=l(px[2],c0);return CL(x,T0),[24,[0,s0,o0,T0,0,i]]}if(Q===63){if(!n0)throw q0([0,wr,Dl0],1);var E0=n0[1];if(E0[0]===0){var M0=$O(Ml0,x,E0[1]),Y0=1-t,rx=Y0&&a,g0=0;if(rx){var H0=M0[2];if(H0[0]===2){var t0=H0[1][1],ex=t0[1];P(t0[2][1],Co)||(ux(x,[0,ex,44]),g0=1)}}var xx=[1,M0]}else{var ax=E0[1];wK(x,44,ax);var xx=[0,ax]}u0(x,63);var dx=l(px[10],x);u0(x,5);var mx=c6(1,x),L0=l(px[2],mx);return CL(x,L0),[25,[0,xx,dx,L0,t,i]]}}if(C2(function(N0){return ux(x,N0)},F),t?u0(x,63):u0(x,8),n0)var C0=n0[1],A0=C0[0]===0?[0,[1,a2(x,C0[1])]]:[0,[0,C0[1]]],U0=A0;else var U0=0;var Q0=K(x),H=0;if(typeof Q0=="number"&&Q0===8){var b=0;H=1}if(!H)var b=[0,l(px[7],x)];u0(x,8);var B=K(x),a0=0;if(typeof B=="number"&&B===5){var m0=0;a0=1}if(!a0)var m0=[0,l(px[7],x)];u0(x,5);var P0=c6(1,x),D=l(px[2],P0);return CL(x,D),[23,[0,U0,b,m0,D,i]]},_E0=0,TK=function(x){var r=zo(x)?rK(x):l(px[2],x),e=1-x[5],t=e&&y6(r);return t&&Qv(x,r[1]),r},wE0=function(x){var r=_0(x);u0(x,43);var e=TK(x);return[0,e,y0([0,r],0,0)]},TE0=function(x){var r=_0(x);u0(x,16);var e=Fx(r,_0(x));u0(x,4);var t=l(px[7],x);u0(x,5);var u=TK(x),i=K(x)===43?[0,l0(0,wE0,x)]:0;return[27,[0,t,u,i,y0([0,e],0,0)]]},SE0=0,SK=function(x){return l0(SE0,TE0,x)},EE0=function(x){1-x[11]&&zx(x,31);var r=_0(x),e=gx(x);u0(x,19);var t=K(x)===8?yx(x):0,u=0;if(K(x)!==8&&!f3(x)){var i=[0,l(px[7],x)];u=1}if(!u)var i=0;var f=Fr(e,gx(x)),o=n2(0,0,x),a=0;if(o[0]===0)var d=o[1];else{var k=o[1],T=k[1];if(i){var g=i[1],A=k[2],N=[0,p(A,g,function(z,V){return p(Gx(z,dn,74),z,V)})],R=t;a=1}else var d=T}if(!a)var N=i,R=Fx(t,d);return[31,[0,N,y0([0,r],[0,R],0),f]]},gE0=0,AE0=function(x){var r=_0(x);u0(x,20),u0(x,4);var e=l(px[7],x);u0(x,5),u0(x,0);for(var t=Ll0;;){var u=t[2],i=t[1],f=K(x);if(typeof f=="number"){var o=0;if(f!==1&&Nr!==f&&(o=1),!o){var a=Ax(u);u0(x,1);var d=no(x)[1],k=e[1];return[32,[0,e,a,y0([0,r],[0,d],0),k]]}}var T=i9(0,function(A){return function(N){var R=_0(N),I=K(N),M=0;if(typeof I=="number"&&I===36){A&&zx(N,58),u0(N,36);var L=yx(N),z=0;M=1}if(!M){u0(N,33);var L=0,z=[0,l(px[7],N)]}var V=A||(z===0?1:0);u0(N,86);var Z=Fx(L,no(N)[1]);function $(Y){if(typeof Y=="number"){var F=Y-1|0,n0=0;if(32>>0?F===35&&(n0=1):30>>0&&(n0=1),n0)return 1}return 0}var i0=1,U=N[9]===1?N:[0,N[1],N[2],N[3],N[4],N[5],N[6],N[7],N[8],i0,N[10],N[11],N[12],N[13],N[14],N[15],N[16],N[17],N[18],N[19],N[20],N[21],N[22],N[23],N[24],N[25],N[26],N[27],N[28],N[29],N[30],N[31]],J=p(px[4],$,U);return[0,[0,z,J,y0([0,R],[0,Z],0)],V]}}(i),x),t=[0,T[2],[0,T[1],u]]}},PE0=0,CE0=function(x){var r=_0(x),e=gx(x);u0(x,22),Z2(x)&&ux(x,[0,e,59]);var t=l(px[7],x),u=n2(0,0,x);if(u[0]===0)var o=t,a=u[1];else var i=u[1][2],f=0,o=p(i,t,function(d,k){return p(Gx(d,dn,75),d,k)}),a=f;return[33,[0,o,y0([0,r],[0,a],0)]]},NE0=0,RE0=function(x){var r=_0(x);u0(x,23);var e=l(px[15],x);if(K(x)===34)var t=R1(x)[2],u=p(t,e,function(M,L){var z=L[1];return[0,z,G0(Gx(M,n8,4),M,z,L[2])]});else var u=e;var i=K(x),f=0;if(typeof i=="number"&&i===34){var o=[0,l0(0,function(L){var z=_0(L);u0(L,34);var V=yx(L);if(K(L)===4){u0(L,4);var Z=[0,p(px[18],L,72)];u0(L,5);var $=Z}else var $=0;var i0=l(px[15],L);if(K(L)===38)var J=i0;else var U=no(L)[2],J=p(U,i0,function(Y,F){var n0=F[1];return[0,n0,G0(Gx(Y,n8,76),Y,n0,F[2])]});return[0,$,J,y0([0,z],[0,V],0)]},x)];f=1}if(!f)var o=0;var a=K(x),d=0;if(typeof a=="number"&&a===38){u0(x,38);var k=l(px[15],x),T=k[1],g=k[2],A=no(x)[2],N=[0,[0,T,p(A,g,function(L,z){return G0(Gx(L,n8,77),L,T,z)})]];d=1}if(!d)var N=0;var R=o===0?1:0,I=R&&(N===0?1:0);return I&&ux(x,[0,u[1],61]),[34,[0,u,o,N,y0([0,r],0,0)]]},IE0=0,OE0=function(x){var r=Ez(x),e=r[3],t=r[2],u=EL(0,x,r[1]),i=0,f=u[2],o=u[1];return C2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},LE0=0,ME0=function(x){var r=gz(x),e=r[3],t=r[2],u=EL(2,x,r[1]),i=2,f=u[2],o=u[1];return C2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},DE0=0,jE0=function(x){var r=Az(x),e=r[3],t=r[2],u=EL(1,x,r[1]),i=1,f=u[2],o=u[1];return C2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},UE0=0,BE0=function(x){var r=_0(x);u0(x,25);var e=Fx(r,_0(x));u0(x,4);var t=l(px[7],x);u0(x,5);var u=c6(1,x),i=l(px[2],u),f=1-x[5],o=f&&y6(i);return o&&Qv(x,i[1]),[38,[0,t,i,y0([0,e],0,0)]]},YE0=0,XE0=function(x){var r=_0(x),e=l(px[7],x),t=K(x),u=e[2];if(u[0]===9&&typeof t=="number"&&t===86){var i=u[1],f=i[2][1],o=e[1];u0(x,86),p(T2[3],f,x[3])&&ux(x,[0,o,[21,Il0,f]]);var a=x[31],d=x[30],k=x[29],T=x[28],g=x[27],A=x[26],N=x[25],R=x[24],I=x[23],M=x[22],L=x[21],z=x[20],V=x[19],Z=x[18],$=x[17],i0=x[16],U=x[15],J=x[14],Y=x[13],F=x[12],n0=x[11],Q=x[10],f0=x[9],s0=x[8],v0=x[7],o0=x[6],c0=x[5],T0=x[4],E0=p(T2[4],f,x[3]),M0=[0,x[1],x[2],E0,T0,c0,o0,v0,s0,f0,Q,n0,F,Y,J,U,i0,$,Z,V,z,L,M,I,R,N,A,g,T,k,d,a],Y0=zo(M0)?rK(M0):l(px[2],M0);return[30,[0,i,Y0,y0([0,r],0,0)]]}var rx=n2(Ol0,0,x);if(rx[0]===0)var t0=e,ex=rx[1];else var g0=rx[1][2],H0=0,t0=p(g0,e,function(xx,ax){return p(Gx(xx,dn,78),xx,ax)}),ex=H0;return[22,[0,t0,0,y0(0,[0,ex],0)]]},JE0=0,VE0=function(x){var r=l(px[7],x),e=n2(Rl0,0,x);if(e[0]===0)var i=r,f=e[1];else var t=e[1][2],u=0,i=p(t,r,function(N,R){return p(Gx(N,dn,79),N,R)}),f=u;if(x[20]){var o=i[2];if(o[0]===13){var a=o[1][2],d=0;if(1i)switch(i-53|0){case 0:return l0([0,u],function(a){1-_1(a)&&zx(a,To);var d=l0(0,l(P6,0),a),k=[0,d[1],[29,d[2]]];return[21,[0,[0,k],0,0,0,y0([0,t],0,0)]]},e);case 8:if(pr(1,e)!==0)return l0([0,u],function(a){1-_1(a)&&zx(a,To);var d=pr(1,a);if(typeof d=="number"){if(d===48)return zx(a,21),u0(a,61),[21,[0,0,0,0,0,y0([0,t],0,0)]];if(c2===d){u0(a,61);var k=gx(a);u0(a,c2);var T=l(d3,a),g=T[1];return[21,[0,0,[0,[1,[0,k,0]]],[0,g],0,y0([0,t],[0,T[2]],0)]]}}var A=l0(0,l(g6,0),a),N=[0,A[1],[35,A[2]]];return[21,[0,[0,N],0,0,0,y0([0,t],0,0)]]},e);break;case 9:return l0([0,u],function(a){var d=l0(0,function(T){return l(p(A6,0,0),T)},a),k=[0,d[1],[36,d[2]]];return[21,[0,[0,k],0,0,0,y0([0,t],0,0)]]},e)}}else if(i===36)return l0([0,u],function(a){var d=Fx(t,_0(a)),k=l0(0,function(V){return u0(V,36)},a)[1],T=TV(1,a);if(zo(T))var g=0,A=[0,S6(T)];else if(a6(T))var g=0,A=[0,O9(T,x)];else if(K(T)===48)var g=0,A=[0,l(Pz(0),T)];else if(kO(T))var g=0,A=[0,WO(T)];else{var N=l(px[10],T),R=n2(0,0,T);if(R[0]===0)var L=R[1],z=N;else var I=R[1][2],M=0,L=M,z=p(I,N,function($,i0){return p(Gx($,dn,97),$,i0)});var g=L,A=[1,z]}return[20,[0,k,A,y0([0,d],[0,g],0)]]},e)}if(a6(e))return l0([0,u],function(a){var d=O9(a,x);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(zo(e))return l0([0,u],function(a){l(r9(a),x);var d=S6(a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(typeof i=="number"){var f=i+ST|0;if(4>>0){if(f===24&&e[28][2])return l0([0,u],function(a){var d=p(px[3],[0,x],a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e)}else if(1>>0)return l0([0,u],function(a){var d=p(px[3],[0,x],a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e)}if(kO(e))return l0([0,u],function(a){var d=WO(a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(typeof i=="number"&&c2===i)return l0([0,u],function(a){var d=gx(a);u0(a,c2);var k=K(a),T=0;if(typeof k!="number"&&k[0]===4&&!P(k[3],vn)){Z0(a);var g=[0,S2(a)];T=1}if(!T)var g=0;var A=l(d3,a),N=A[1];return[21,[0,0,[0,[1,[0,d,g]]],[0,N],1,y0([0,t],[0,A[2]],0)]]},e);var o=o1(e,61)?0:1;return o1(e,0)?l0([0,u],function(a){var d=G0(U9,0,a,0);u0(a,1);var k=K(a),T=0;if(typeof k!="number"&&k[0]===4&&!P(k[3],al)){var g=l(d3,a),A=g[2],N=[0,g[1]];T=1}if(!T){p(AL,a,d);var R=n2(0,0,a),I=R[0]===0?R[1]:R[1][1],A=I,N=0}return[21,[0,0,[0,[0,d]],N,o,y0([0,t],[0,A],0)]]},e):(g1(fl0,e),p(px[3],[0,x],e))}),I0(PL,function(x){var r=x?x[1]:0;function e(u){1-_1(u)&&zx(u,sn);var i=_0(u);u0(u,60);var f=wV(1,Gs(1,u)),o=Fx(i,_0(f));u0(f,49);var a=K(f);if(typeof a=="number")switch(a){case 36:var d=Fx(o,_0(f)),k=l0(0,function(A0){return u0(A0,36)},f)[1],T=TV(1,f),g=K(T),A=0;if(typeof g=="number")switch(g){case 15:var N=0,R=N,I=[0,[1,l0(0,function(A0){return p(j9,0,A0)},T)]];A=1;break;case 40:var R=0,I=[0,[2,l0(0,l(M9,0),T)]];A=1;break}else if(g[0]===4&&!P(g[3],_o)&&T[28][1]){var R=0,I=[0,[3,l0(0,l(D9,0),T)]];A=1}if(!A){var M=to(T),L=n2(0,0,T);if(L[0]===0)var Z=L[1],$=M;else var z=L[1][2],V=0,Z=V,$=p(z,M,function(Q0,H){return p(Gx(Q0,Aa,98),Q0,H)});var R=Z,I=[0,[4,$]]}return[9,[0,[0,k],I,0,0,y0([0,d],[0,R],0)]];case 48:if(f[28][2]){var i0=xK[1],U=l0(0,function(A0){return p(i0,0,A0)},f);return[9,[0,0,[0,[8,U]],0,0,y0([0,o],0,0)]]}break;case 53:if(r){var J=l0(0,l(P6,0),f);return[9,[0,0,[0,[7,J]],0,0,y0([0,o],0,0)]]}break;case 61:if(r){var Y=l0(0,l(g6,0),f);return[9,[0,0,[0,[5,Y]],0,0,y0([0,o],0,0)]]}break;case 62:var F=l0(0,p(A6,ul0,0),f);return[9,[0,0,[0,[6,F]],0,0,y0([0,o],0,0)]];case 106:var n0=gx(f);u0(f,c2);var Q=K(f),f0=0;if(typeof Q!="number"&&Q[0]===4&&!P(Q[3],vn)){Z0(f);var s0=[0,p(px[13],0,f)];f0=1}if(!f0)var s0=0;var v0=l(d3,f),o0=v0[1];return[9,[0,0,0,[0,[1,[0,n0,s0]]],[0,o0],y0([0,o],[0,v0[2]],0)]];case 15:case 24:case 27:case 28:case 40:var c0=K(f);if(typeof c0=="number"){var T0=0;if(24<=c0){if(41>c0){var E0=0;switch(c0+ST|0){case 0:var M0=[0,[0,l0(0,function(A0){return G0(C6,0,A0,0)},f)]];break;case 3:var M0=[0,[0,l0(0,function(A0){return G0(C6,2,A0,0)},f)]];break;case 4:var M0=[0,[0,l0(0,function(A0){return G0(C6,1,A0,0)},f)]];break;case 16:var M0=[0,[2,l0(0,l(M9,0),f)]];break;default:E0=1}if(!E0){var Y0=M0;T0=1}}}else if(c0===15){var Y0=[0,[1,l0(0,function(U0){return p(j9,0,U0)},f)]];T0=1}if(T0)return[9,[0,0,Y0,0,0,y0([0,o],0,0)]]}throw q0([0,wr,il0],1)}else if(a[0]===4&&!P(a[3],_o)&&f[28][1]){var rx=[0,[3,l0(0,l(D9,0),f)]];return[9,[0,0,rx,0,0,y0([0,o],0,0)]]}var g0=K(f),H0=0;typeof g0=="number"?g0===53?zx(f,15):g0===61?zx(f,16):H0=1:H0=1,u0(f,0);var t0=G0(U9,0,f,0);u0(f,1);var ex=K(f),xx=0;if(typeof ex!="number"&&ex[0]===4&&!P(ex[3],al)){var ax=l(d3,f),dx=ax[2],mx=[0,ax[1]];xx=1}if(!xx){p(AL,f,t0);var L0=n2(0,0,f),C0=L0[0]===0?L0[1]:L0[1][1],dx=C0,mx=0}return[9,[0,0,0,[0,[0,t0]],mx,y0([0,o],[0,dx],0)]]}var t=0;return function(u){return l0(t,e,u)}});var PK=function x(r,e){return x.fun(r,e)},CK=function x(r,e){return x.fun(r,e)},O6=function x(r,e){return x.fun(r,e)},X9=function(x,r){return function(e){if(!e)return Ax(r);var t=e[1];if(t[0]!==0){var u=t[1],i=u[1];if(e[2]){var f=e[2];return ux(x,[0,i,69]),l(X9(x,r),f)}var o=u[2],a=o[2];return l(X9(x,[0,[1,[0,i,[0,p(O6,x,o[1]),a]]],r]),0)}var d=t[1],k=d[2],T=e[2],g=d[1];switch(k[0]){case 0:var A=k[2],N=k[1],R=k[3];switch(N[0]){case 0:var I=[0,N[1]];break;case 1:var I=[1,N[1]];break;case 2:var I=[2,N[1]];break;case 3:var I=[3,N[1]];break;case 4:var I=Nx(Kl0);break;default:var I=[4,N[1]]}var M=A[2],L=0;if(M[0]===3){var z=M[1];if(!z[1]){var V=[0,z[3]],Z=z[2];L=1}}if(!L)var V=0,Z=p(O6,x,A);var $=[0,[0,[0,g,[0,I,Z,V,R]]],r];break;case 1:ux(x,[0,k[2][1],55]);var $=r;break;default:ux(x,[0,k[2][1],Zl0]);var $=r}return l(X9(x,$),T)}};I0(PK,function(x,r){var e=r[2],t=e[2],u=e[1],i=r[1],f=s3(x);return[0,i,[0,[0,l(X9(x,0),u),f,t]]]});var NK=function(x,r){var e=r[1];return l(px[23],r)?[0,p(O6,x,r)]:(ux(x,[0,e,41]),0)},y3=function(x,r){return function(e){if(!e)return Ax(r);var t=e[1];switch(t[0]){case 0:var u=t[1],i=u[2];if(i[0]===3){var f=i[1];if(!f[1]){var o=e[2];return l(y3(x,[0,[0,[0,u[1],[0,f[2],[0,f[3]]]]],r]),o)}}var a=e[2],d=NK(x,u);if(d)var k=d[1],T=[0,[0,[0,k[1],[0,k,0]]],r];else var T=r;return l(y3(x,T),a);case 1:var g=t[1],A=g[1];if(e[2]){var N=e[2];return ux(x,[0,A,20]),l(y3(x,r),N)}var R=g[2],I=R[2],M=NK(x,R[1]),L=M?[0,[1,[0,A,[0,M[1],I]]],r]:r;return l(y3(x,L),0);default:var z=e[2];return l(y3(x,[0,[2,t[1]],r]),z)}}};I0(CK,function(x,r){var e=r[2],t=e[2],u=e[1],i=r[1],f=s3(x);return[0,i,[1,[0,l(y3(x,0),u),f,t]]]}),I0(O6,function(x,r){var e=r[2],t=r[1];switch(e[0]){case 0:return p(CK,x,[0,t,e[1]]);case 9:var u=e[1],i=u[2][1],f=u[1],o=0;if(x[5]&&$v(i)?ux(x,[0,f,76]):o=1,o&&1-x[5]){var a=0;if(x[18]&&Ar(i,Y2)?ux(x,[0,f,Ri]):a=1,a){var d=x[19],k=d&&Ar(i,Pv);k&&ux(x,[0,f,6])}}return[0,t,[2,[0,u,s3(x),0]]];case 24:return p(PK,x,[0,t,e[1]]);default:return[0,t,[3,[0,t,e]]]}});var L6=function(x,r){var e=K(x);if(typeof e=="number"){if(e===6)return l0(0,function(i){var f=_0(i);u0(i,6);for(var o=0;;){var a=K(i);if(typeof a=="number"){var d=0;if(13<=a)Nr===a&&(d=1);else if(7<=a)switch(a-7|0){case 0:d=1;break;case 2:var k=gx(i);u0(i,9);var o=[0,[2,k],o];continue;case 5:var T=_0(i),g=l0(0,function(U){return u0(U,12),L6(U,r)},i),A=g[1],N=g[2],R=[1,[0,A,[0,N,y0([0,T],0,0)]]];K(i)!==7&&(ux(i,[0,A,20]),K(i)===9&&Z0(i));var o=[0,R,o];continue}if(d){var I=Ax(o),M=_0(i);u0(i,7);var L=K(i)===86?[1,qv(i)]:s3(i);return[1,[0,I,L,J1([0,f],[0,yx(i)],M,0)]]}}var z=l0(0,function(i0){var U=L6(i0,r),J=K(i0),Y=0;if(typeof J=="number"&&J===82){u0(i0,82);var F=[0,l(px[10],i0)];Y=1}if(!Y)var F=0;return[0,U,F]},i),V=z[2],Z=[0,[0,z[1],[0,V[1],V[2]]]];K(i)!==7&&u0(i,9);var o=[0,Z,o]}},x);if(!e){var t=function(i){var f=K(i);return typeof f=="number"&&f===82?(u0(i,82),[0,l(px[10],i)]):0};return l0(0,function(i){var f=_0(i);u0(i,0);for(var o=0,a=0,d=0;;){var k=K(i);if(typeof k=="number"){var T=0;if(k!==1&&Nr!==k&&(T=1),!T){a&&ux(i,[0,a[1],95]);var g=Ax(d),A=_0(i);u0(i,1);var N=yx(i),R=K(i)===86?[1,qv(i)]:s3(i);return[0,[0,g,R,J1([0,f],[0,N],A,0)]]}}if(K(i)===12)var I=_0(i),M=l0(0,function(mx){return u0(mx,12),L6(mx,r)},i),L=M[2],z=M[1],V=[0,[1,[0,z,[0,L,y0([0,I],0,0)]]]];else{var Z=gx(i),$=p(px[20],0,i),i0=K(i),U=0;if(typeof i0=="number"&&i0===86){u0(i,86);var J=l0([0,Z],function(L0){var C0=L6(L0,r);return[0,C0,t(L0)]},i),Y=J[2],F=$[2],n0=Y[2],Q=Y[1],f0=J[1];switch(F[0]){case 0:var s0=[0,F[1]];break;case 1:var s0=[1,F[1]];break;case 2:var s0=[2,F[1]];break;case 3:var s0=[3,F[1]];break;case 4:var s0=Nx(Vl0);break;default:var s0=[4,F[1]]}var V=[0,[0,[0,f0,[0,s0,Q,n0,0]]]]}else U=1;if(U){var v0=$[2];if(v0[0]===3){var o0=v0[1],c0=o0[2][1],T0=o0[1];by(c0)?ux(i,[0,T0,ot]):i3(c0)&&yt(i,[0,T0,85]);var E0=l0([0,Z],function(L0,C0){return function(A0){var U0=[0,C0,[2,[0,L0,s3(A0),0]]];return[0,U0,t(A0)]}}(o0,T0),i),M0=E0[2],V=[0,[0,[0,E0[1],[0,[3,o0],M0[1],M0[2],1]]]]}else{g1(zl0,i);var V=0}}}if(V){var Y0=V[1],rx=Y0[1][1],g0=o?(ux(i,[0,rx,69]),0):a;if(Y0[0]===0)var t0=g0,ex=o;else var H0=K(i)===9?[0,gx(i)]:0,t0=H0,ex=1;K(i)!==1&&u0(i,9);var o=ex,a=t0,d=[0,Y0,d]}}},x)}}var u=G0(px[14],x,0,r);return[0,u[1],[2,u[2]]]},J9=function(x){var r=K(x);if(typeof r=="number"){var e=r+LB|0,t=0;if(6>>0?e===14&&(t=1):4>>0&&(t=1),t)return yx(x)}return Z2(x)?Ko(x):0},RK=function(x){return K(x)===1?0:[0,l(px[7],x)]},uo=function(x){var r=gx(x),e=K(x),t=0;if(typeof e!="number"&&e[0]===8){var u=e[1];t=1}if(!t){g1(Gl0,x);var u=bl0}var i=_0(x);Z0(x);var f=K(x),o=0;if(typeof f=="number"){var a=f+JD|0,d=0;if(72>>0?a===76&&(d=1):70>>0&&(d=1),d){var k=yx(x);o=1}}if(!o)var k=J9(x);return[0,r,[0,u,y0([0,i],[0,k],0)]]},IK=function(x){var r=pr(1,x);if(typeof r=="number"){if(r===10)for(var e=l0(0,function(i){var f=[0,uo(i)];return u0(i,10),[0,f,uo(i)]},x);;){var t=K(x);if(typeof t=="number"&&t===10){var u=e[1],e=l0([0,u],function(f){return function(o){return u0(o,10),[0,[1,f],uo(o)]}}(e),x);continue}return[2,e]}if(r===86)return[1,l0(0,function(i){var f=uo(i);return u0(i,86),[0,f,uo(i)]},x)]}return[0,uo(x)]},M6=function(x,r){return Ar(x[2][1],r[2][1])},OK=function(x,r){var e=x[2],t=e[1],u=r[2],i=u[1],f=0,o=e[2],a=u[2];if(t[0]===0){var d=t[1];if(i[0]===0)var T=M6(d,i[1]);else f=1}else{var k=t[1];if(i[0]===0)f=1;else var T=OK(k,i[1])}if(f)var T=0;return T&&M6(o,a)},V9=function(x,r){switch(x[0]){case 0:var e=x[1];if(r[0]===0)return M6(e,r[1]);break;case 1:var t=x[1];if(r[0]===1){var u=t[2],i=r[1][2],f=u[2],o=i[2],a=M6(u[1],i[1]);return a&&M6(f,o)}break;default:var d=x[1];if(r[0]===2)return OK(d,r[1])}return 0},IL=function(x){switch(x[0]){case 0:return x[1][1];case 1:return x[1][1];default:return x[1][1]}},LK=function x(r,e){return x.fun(r,e)},OL=function x(r,e){return x.fun(r,e)},LL=function x(r,e){return x.fun(r,e)};I0(LK,function(x,r){var e=K(r);if(typeof e=="number"){if(e===0){V1(r,0);var t=l0(0,function(g){u0(g,0);var A=K(g),N=0;if(typeof A=="number"&&A===12){var R=_0(g);u0(g,12);var I=l(px[10],g),z=[3,[0,I,y0([0,R],0,0)]];N=1}if(!N)var M=RK(g),L=M?0:_0(g),z=[2,[0,M,J1(0,0,L,0)]];return u0(g,1),z},r),u=t[2],i=t[1];return $1(r),[0,i,u]}}else if(e[0]===9){var f=e[3],o=e[2],a=e[1];return u0(r,e),[0,a,[4,[0,o,f]]]}var d=p(LL,x,r),k=d[2],T=d[1];return un<=k[1]?[0,T,[1,k[2]]]:[0,T,[0,k[2]]]});var z9=function(x){switch(x[0]){case 0:return x[1][2][1];case 1:var r=x[1][2],e=r[1],t=Qx(Wl0,r[2][2][1]);return Qx(e[2][1],t);default:var u=x[1][2],i=u[1],f=u[2],o=i[0]===0?i[1][2][1]:z9([2,i[1]]);return Qx(o,Qx($l0,f[2][1]))}};I0(OL,function(x,r){var e=_0(r),t=l0(0,function(Cr){u0(Cr,98);var u2=K(Cr);if(typeof u2=="number"){if(u2===99)return Z0(Cr),Fl0}else if(u2[0]===8){var w=IK(Cr),x0=0;if(_1(Cr)&&K(Cr)===98&&ct!==pr(1,Cr)){var e0=t9(Cr,0,A9);x0=1}if(!x0)var e0=0;for(var S0=0;;){var G=K(Cr);if(typeof G=="number"){if(G===0){var k0=_0(Cr);V1(Cr,0);var J0=l0(0,function($x){u0($x,0),u0($x,12);var er=l(px[10],$x);return u0($x,1),er},Cr),O0=J0[2],ix=J0[1];$1(Cr);var S0=[0,[1,[0,ix,[0,O0,y0([0,k0],[0,J9(Cr)],0)]]],S0];continue}}else if(G[0]===8){var S0=[0,[0,l0(0,function($x){var er=pr(1,$x),Zx=0;if(typeof er=="number"&&er===86){var Lr=[1,l0(0,function(ke){var Pn=uo(ke);return u0(ke,86),[0,Pn,uo(ke)]},$x)];Zx=1}if(!Zx)var Lr=[0,uo($x)];var Yx=K($x),ie=0;if(typeof Yx=="number"&&Yx===82){u0($x,82);var Ft=_0($x),E2=K($x),We=0;if(typeof E2=="number")if(E2===0){var fo=_0($x);V1($x,0);var gn=l0(0,function(ke){u0(ke,0);var Pn=RK(ke);return u0(ke,1),Pn},$x),ds=gn[1],me=gn[2];$1($x);var An=[0,me,J1([0,fo],[0,J9($x)],0,0)];An[1]||ux($x,[0,ds,52]);var Ht=[0,[1,[0,ds,An]]]}else We=1;else if(E2[0]===10){var $e=E2[3],qt=E2[2],dr=E2[1];u0($x,E2);var Ht=[0,[0,[0,dr,[0,qt,$e,y0([0,Ft],[0,J9($x)],0)]]]]}else We=1;if(We){zx($x,40);var Ht=[0,[0,[0,gx($x),ql0]]]}var mt=Ht;ie=1}if(!ie)var mt=0;return[0,Lr,mt]},Cr)],S0];continue}var Wx=Ax(S0),Bx=[0,wo,[0,w,e0,o1(Cr,ct),Wx]];return o1(Cr,99)?[0,Bx]:(xo(Cr,99),[1,Bx])}}return xo(Cr,99),Hl0},r);$1(r);var u=t[2];if(u[0]===0)var i=u[1],f=typeof i=="number"?0:i[2][3];else var f=1;if(f)var o=YA,a=o,d=l0(0,function(Cr){return 0},r);else{V1(r,3);for(var k=t[2][1],T=typeof k=="number"?0:[0,k[2][1]],g=gx(r),A=0;;){var N=u3(r),R=0;if(A&&T){var I=A[1],M=I[2],L=0,z=T[1],V=A[2];if(M[0]===0){var Z=M[1],$=Z[2];if($)var i0=$[1][2][1],U=1-V9(Z[1][2][1],i0),J=U&&V9(z,i0);else L=1}else L=1;if(L)var J=0;if(J){var Y=I[2],F=0;if(Y[0]===0){var n0=Y[1],Q=n0[2];if(Q){var f0=Q[1],s0=Fr(I[1],n0[3][1]),v0=[0,wo,f0],o0=[0,s0,[0,[0,n0[1],0,n0[3],n0[4]]]];F=1}}if(!F)var v0=YA,o0=I;$1(r);var c0=[0,Ax([0,o0,V]),N,v0];R=1}}if(!R){var T0=K(r),E0=0;if(typeof T0=="number"){if(T0===98){V1(r,2);var M0=K(r),Y0=pr(1,r),rx=0;if(typeof M0=="number"&&M0===98&&typeof Y0=="number"){var g0=0;if((ct===Y0||Nr===Y0)&&(g0=1),g0){var H0=l0(0,function(x0){u0(x0,98),u0(x0,ct);var e0=K(x0);if(typeof e0=="number"){if(e0===99)return Z0(x0),un}else if(e0[0]===8){var S0=IK(x0);return e9(x0,99),[0,wo,[0,S0]]}return xo(x0,99),un},r),t0=H0[2],ex=H0[1],xx=typeof t0=="number"?[0,un,ex]:[0,wo,[0,ex,t0[2]]],ax=r[24][1],dx=0;if(ax){var mx=ax[2];if(mx){var L0=mx[2];dx=1}}if(!dx)var L0=Nx(Ts0);r[24][1]=L0;var C0=n3(r),A0=i6(r[25][1],C0);r[26][1]=A0;var c0=[0,Ax(A),N,xx];E0=1,rx=1}}if(!rx){var U0=p(OL,T,r),Q0=U0[2],H=U0[1],b=un<=Q0[1]?[0,H,[1,Q0[2]]]:[0,H,[0,Q0[2]]],A=[0,b,A];continue}}else if(Nr===T0){g1(0,r);var c0=[0,Ax(A),N,YA];E0=1}}if(!E0){var A=[0,p(LK,T,r),A];continue}}var B=c0[3],a0=c0[1],m0=N?N[1]:g,a=B,d=[0,Fr(g,m0),a0];break}}var P0=yx(r),D=0;if(typeof a!="number"){var N0=a[1],X0=0;if(wo===N0){var D0=a[2],ox=D0[2][1],b0=t[2],kx=D0[1];if(b0[0]===0){var V0=b0[1];if(typeof V0=="number")ux(r,[0,IL(ox),Ql0]);else{var h=V0[2][1];if(1-V9(ox,h)){var X=0;if(x&&V9(x[1],ox)){var W0=[19,z9(h)];ux(r,[0,IL(h),W0]),X=1}if(!X){var sx=[13,z9(h)];ux(r,[0,IL(ox),sx])}}}}var tx=kx;X0=1}else if(un===N0){var j0=a[2],Px=t[2];if(Px[0]===0){var Ex=Px[1];typeof Ex!="number"&&ux(r,[0,j0,[13,z9(Ex[2][1])]])}var tx=j0;X0=1}if(X0){var Ox=tx;D=1}}if(!D)var Ox=t[1];var qx=t[2][1],B0=t[1];if(typeof qx=="number"){var rr=0,Ux=y0([0,e],[0,P0],0);if(typeof a!="number"){var K0=a[1],nr=0;if(wo===K0){var z0=a[2][1];nr=1}else if(un===K0){var z0=a[2];nr=1}if(nr){var or=z0;rr=1}}if(!rr)var or=Ox;var jr=[0,un,[0,B0,or,d,Ux]]}else{var lx=qx[2],v1=0,K1=y0([0,e],[0,P0],0);if(typeof a!="number"&&wo===a[1]){var w1=[0,a[2]];v1=1}if(!v1)var w1=0;var jr=[0,wo,[0,[0,B0,lx],w1,d,K1]]}return[0,Fr(t[1],Ox),jr]}),I0(LL,function(x,r){return V1(r,2),p(OL,x,r)});var MK=function(x,r){var e=S2(r);return u9(x,r,e),e},DK=function x(r){return x.fun(r)},ML=function x(r,e,t){return x.fun(r,e,t)},DL=function x(r){return x.fun(r)},jK=function x(r,e){return x.fun(r,e)},jL=function x(r,e){return x.fun(r,e)},UL=function x(r,e){return x.fun(r,e)},K9=function x(r,e){return x.fun(r,e)},D6=function x(r,e){return x.fun(r,e)},Z9=function x(r){return x.fun(r)},UK=function x(r){return x.fun(r)},BK=function x(r){return x.fun(r)},YK=function x(r,e,t){return x.fun(r,e,t)},XK=function x(r){return x.fun(r)},JK=function x(r){return x.fun(r)},$E0=l(LL,0);I0(DK,function(x){var r=K(x),e=0;if(typeof r!="number"&&r[0]===6){var t=r[2],u=r[1];Z0(x);var i=[0,[0,u,t]];e=1}if(!e)var i=0;var f=_0(x),o=Ax(f),a=5;x:for(;;){if(o)for(var d=o[2],k=o[1],T=k[2],g=k[1],A=T[2],N=0,R=Xx(A);;){if(R<(N+5|0))var I=0;else{var M=Ar(k2(A,N,a),"@flow");if(!M){var N=N+1|0;continue}var I=M}if(!I){var o=d;continue x}x[31][1]=g[3];var L=Ax([0,[0,g,T],d]);break}else var L=0;if(L===0){var z=0;if(f){var V=f[1],Z=V[2];if(!Z[1]){var $=Z[2],i0=0,U=V[1];if(1<=Xx($)&&O1($,0)===42){x[31][1]=U[3];var J=[0,V,0];z=1}else i0=1}}if(!z)var J=0}else var J=L;var Y=p(jK,x,function(v0){return 0}),F=gx(x);u0(x,Nr);var n0=T2[1];if(r2(function(v0,o0){var c0=o0[2];switch(c0[0]){case 20:return m6(x,v0,wn(0,[0,c0[1][1],i60]));case 21:var T0=c0[1],E0=T0[1];if(E0){if(!T0[2]){var M0=E0[1],Y0=M0[2],rx=0,g0=M0[1];switch(Y0[0]){case 37:var H0=Y0[1][1],t0=0,ex=r2(function(C0,A0){return r2(EO,C0,[0,A0[2][1],0])},t0,H0);return r2(function(C0,A0){return m6(x,C0,A0)},v0,ex);case 2:case 26:var xx=Y0[1][1];if(xx)var ax=xx[1];else rx=1;break;case 3:case 19:case 29:case 35:case 36:var ax=Y0[1][1];break;default:rx=1}return rx?v0:m6(x,v0,wn(0,[0,g0,ax[2][1]]))}}else{var dx=T0[2];if(dx){var mx=dx[1];if(mx[0]!==0)return v0;var L0=mx[1];return r2(function(C0,A0){var U0=A0[2],Q0=U0[2],H=U0[1];return Q0?m6(x,C0,Q0[1]):m6(x,C0,H)},v0,L0)}}return v0;default:return v0}},n0,Y),Y)var Q=Yl(Ax(Y))[1],f0=Fr(Yl(Y)[1],Q);else var f0=F;var s0=Ax(x[2][1]);return[0,f0,[0,Y,i,y0([0,J],0,0),s0]]}});var QE0=function(x,r,e,t){for(var u=x,i=t;;){var f=i[3],o=i[2],a=i[1],d=K(u);if(typeof d=="number"&&Nr===d)return[0,u,a,o,f];if(l(r,d))return[0,u,a,o,f];if(typeof d!="number"&&d[0]===2){var k=l(e,u),T=[0,k,o],g=k[2];if(g[0]===22){var A=g[1][2];if(A){var N=Ar(A[1],"use strict"),R=k[1],I=N&&1-u[21];I&&ux(u,[0,R,84]);var M=N?Gs(1,u):u,L=[0,d,a],z=f||N,u=M,i=[0,L,T,z];continue}}return[0,u,a,T,f]}return[0,u,a,o,f]}};I0(ML,function(x,r,e){var t=QE0(_V(1,x),r,e,t60),u=t[4],i=t[3],f=t[2],o=_V(0,t[1]),a=Ax(f);return C2(function(d){if(typeof d!="number"&&d[0]===2){var k=d[1],T=k[4],g=k[1];return T&&yt(o,[0,g,81])}return Nx(Qx(u60,Qx(BJ(d),n60)))},a),[0,o,i,u]}),I0(DL,function(x){var r=mL(x),e=K(x);if(typeof e=="number"){var t=e-49|0;if(11>=t>>>0)switch(t){case 0:return p(_K,r,x);case 1:l(r9(x),r);var u=pr(1,x),i=0;if(typeof u=="number"){var f=0;if((u===4||u===10)&&(f=1),f){var o=R6(x);i=1}}if(!i)var o=RL(x);return o;case 11:if(pr(1,x)===49)return l(r9(x),r),p(PL,0,x);break}}return p(D6,[0,r],x)}),I0(jK,function(x,r){var e=G0(ML,x,r,DL),t=e[2],u=p(jL,r,e[1]);return r2(function(i,f){return[0,f,i]},u,t)}),I0(jL,function(x,r){for(var e=0;;){var t=K(r);if(typeof t=="number"&&Nr===t||l(x,t))return Ax(e);var e=[0,l(DL,r),e]}}),I0(UL,function(x,r){var e=G0(ML,r,x,function(f){return p(D6,0,f)}),t=e[3],u=e[2],i=p(K9,x,e[1]);return[0,r2(function(f,o){return[0,o,f]},i,u),t]}),I0(K9,function(x,r){for(var e=0;;){var t=K(r);if(typeof t=="number"&&Nr===t||l(x,t))return Ax(e);var e=[0,p(D6,0,r),e]}}),I0(D6,function(x,r){var e=x?x[1]:0;1-a6(r)&&l(r9(r),e);var t=K(r);if(typeof t=="number"){if(t===27)return l0(DE0,ME0,r);if(t===28)return l0(UE0,jE0,r)}if(zo(r))return S6(r);if(a6(r))return O9(r,e);if(typeof t=="number"){var u=t+Z1|0;if(14>=u>>>0)switch(u){case 0:if(r[28][2])return l(Pz(0),r);break;case 5:return l(aK,r);case 12:return p(gL,0,r);case 13:return l(cK,r);case 14:return l(oK,r)}}return kO(r)?WO(r):l(Z9,r)}),I0(Z9,function(x){var r=K(x);if(typeof r=="number"&&st>r)switch(r){case 0:return l(iK,x);case 8:return l(eK,x);case 16:return SK(x);case 19:return l0(gE0,EE0,x);case 20:return l0(PE0,AE0,x);case 22:return l0(NE0,CE0,x);case 23:return l0(IE0,RE0,x);case 24:return l0(LE0,OE0,x);case 25:return l0(YE0,BE0,x);case 26:return l(uK,x);case 32:return l(tK,x);case 35:return l(nK,x);case 37:return l0(kE0,mE0,x);case 39:return l0(_E0,hE0,x);case 43:return SK(x);case 59:return l0(yE0,dE0,x);case 113:return g1(x60,x),[0,gx(x),r60];case 1:case 5:case 7:case 9:case 10:case 11:case 12:case 17:case 18:case 33:case 34:case 36:case 38:case 41:case 42:case 49:case 83:case 86:return g1(e60,x),Z0(x),l(Z9,x)}if(zo(x)){var e=S6(x);return Qv(x,e[1]),e}if(typeof r=="number"&&r===28&&pr(1,x)===6){var t=o6(1,x);return ux(x,[0,Fr(gx(x),t),4]),R6(x)}return vs(x)?l0(JE0,XE0,x):(a6(x)&&(g1(0,x),Z0(x)),R6(x))}),I0(UK,function(x){var r=gx(x),e=l(Qt,x),t=K(x);return typeof t=="number"&&t===9?G0(N9,x,r,[0,e,0]):e}),I0(BK,function(x){var r=gx(x),e=l(p3,x),t=K(x);return typeof t=="number"&&t===9?[0,G0(N9,x,r,[0,a2(x,e),0])]:e}),I0(YK,function(x,r,e){var t=r?r[1]:0;return l0(0,function(u){var i=1-t,f=MK([0,e],u),o=i&&(K(u)===85?1:0);return o&&(1-_1(u)&&zx(u,xe),u0(u,85)),[0,f,YO(u),o]},x)}),I0(XK,function(x){var r=gx(x),e=_0(x);u0(x,0);var t=p(K9,function(o){return o===1?1:0},x),u=gx(x),i=t===0?_0(x):0;u0(x,1);var f=[0,t,J1([0,e],[0,yx(x)],i,0)];return[0,Fr(r,u),f]}),I0(JK,function(x){function r(t){var u=_0(t);u0(t,0);var i=p(UL,function(A){return A===1?1:0},t),f=i[1],o=i[2],a=f===0?_0(t):0;u0(t,1);var d=K(t),k=0;if(!x){var T=0;if((typeof d!="number"||d!==1&&Nr!==d)&&(T=1),T)if(Z2(t)){var g=Ko(t);k=1}else{var g=0;k=1}}if(!k)var g=yx(t);return[0,[0,f,J1([0,u],[0,g],a,0)],o]}var e=0;return function(t){return i9(e,r,t)}}),rJ(o60[1],px,[0,DK,Z9,D6,K9,UL,jL,UK,BK,Oz,Qt,g9,sE0,MK,YK,XK,JK,$E0,L6,O6,$o,O9,pE0,rE0,P9,qv,C9]);var BL=[qr,PT0,Js(0)],YL=[0,BL,[0]],FE0=my(AT0,function(x){var r=UI(x,gT0)[41],e=JI(x,0,0,ET0,QI,1)[1];return bX(x,r,function(t,u){return 0}),function(t,u){var i=ky(u,x);return l(e,i),VI(u,i,x)}}),HE0=Dv(YL)===qr?YL:YL[1];tI(YE,HE0);var io=p0,O2=null,VK=void 0,qE0=function(x){throw x},W9=function(x){return x!==VK?1:0};io.String,io.RegExp,io.Object,io.Date,io.Math;var GE0=io.Array,bE0=io.Error,zK=function(x){return l(qE0,x)};io.JSON,NX(function(x){return x[1]===BL?[0,Yt(x[2].toString())]:0}),NX(function(x){return x instanceof GE0?0:[0,Yt(x.toString())]});var KK=[0,0],xg0=xr,ps=function(x){return qZ(Vl(x))},z1=function(x){return HZ(Vl(x))},Rr=function(x,r){return z1(Ax(iy(x,r)))},Mx=function(x,r){return r?l(x,r[1]):O2},m3=function(x,r){return r[0]===0?O2:l(x,r[1])},ZK=function(x){return ps([0,[0,ST0,x[1]],[0,[0,TT0,x[2]],0]])},WK=function(x){var r=x[1],e=r?xr(r[1][1]):O2,t=[0,[0,hT0,ZK(x[3])],0];return ps([0,[0,wT0,e],[0,[0,_T0,ZK(x[2])],t]])},A1=function(x){if(!x)return 0;var r=x[1],e=r[1];return y0([0,e],[0,Fx(r[3],r[2])],0)},j6=function(x,r,e){var t=r[e];return W9(t)?t|0:x},rg0=function(x,r){var e=Nl(r,VK)?{}:r,t=Yt(x),u=j6(jl[5],e,NT0),i=j6(jl[4],e,RT0),f=j6(jl[3],e,IT0),o=j6(jl[2],e,OT0),a=[0,j6(jl[1],e,LT0),o,f,i,u,0,0],d=e[AD],k=W9(d),T=k&&d|0,g=e[eD],A=W9(g)?g|0:1,N=e.all_comments,R=W9(N)?N|0:1,I=[0,0],M=T?[0,function(po){return I[1]=[0,po,I[1]],0}]:0,L=CT0[1],z=0;try{var V=0,Z=dJ(t),$=V,i0=Z}catch(po){var U=L1(po);if(U!==Oo)throw q0(U,0);var J=[0,[0,[0,z,Za[2],Za[3]],54],0],$=J,i0=dJ(Rs0)}var Y=[0,z,i0,px0,0,a[4],MJ,dx0],F=[0,i6(Y,0)],n0=[0,[0,$],[0,0],T2[1],[0,0],a[5],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,[0,Os0],[0,Y],F,[0,M],a,z,[0,0],[0,Is0]],Q=l(px[1],n0),f0=Ax(n0[1][1]),s0=[0,SO[1],0],v0=Ax(r2(function(po,ua){var q=po[2],C=po[1];return p(SO[3],ua,C)?[0,C,q]:[0,p(SO[4],ua,C),[0,ua,q]]},s0,f0)[2]);if(v0){var o0=v0[2],c0=v0[1];if(L)throw q0([0,hS0,c0,o0],1)}KK[1]=0;for(var T0=Xx(t)-0|0,E0=xs(t),M0=0,Y0=0;;){if(Y0===T0)var rx=M0;else{var g0=oe(E0,Y0),H0=0;if(0<=g0&&!(Xr=g0){var t0=4;ax=1}if(!ax)var t0=0}}}if(t0===0){var M0=TO(M0,Y0,0),Y0=Y0+1|0;continue}if((T0-Y0|0)>=t0){var dx=t0-1|0,mx=Y0+t0|0;if(3>>0)throw q0([0,wr,tH],1);switch(dx){case 0:var L0=oe(E0,Y0);break;case 1:var L0=(oe(E0,Y0)&31)<<6|oe(E0,Y0+1|0)&63;break;case 2:var L0=(oe(E0,Y0)&15)<<12|(oe(E0,Y0+1|0)&63)<<6|oe(E0,Y0+2|0)&63;break;default:var L0=(oe(E0,Y0)&7)<<18|(oe(E0,Y0+1|0)&63)<<12|(oe(E0,Y0+2|0)&63)<<6|oe(E0,Y0+3|0)&63}var M0=TO(M0,Y0,[0,L0]),Y0=mx;continue}var rx=TO(M0,Y0,0)}for(var C0=Lv0,A0=Ax([0,6,rx]);;){var U0=C0[3],Q0=C0[2],H=C0[1];if(!A0){var b=Vl(Ax(U0));if(A)var a0=Q;else var B=l(FE0[1],0),a0=p(Gx(B,-201766268,99),B,Q);if(R)var P0=a0;else var m0=a0[2],P0=[0,a0[1],[0,m0[1],m0[2],m0[3],0]];var D=function(q,C,j,h0){var R0=[0,c9(b,C[3]),0],nx=[0,[0,v60,z1([0,c9(b,C[2]),R0])],0],Sx=Fx(nx,[0,[0,a60,WK(C)],0]);if(j){var Dx=j[1],jx=Dx[1];if(jx){var bx=Dx[2];if(bx)var hr=[0,[0,l60,ks(bx)],0],cr=[0,[0,p60,ks(jx)],hr];else var cr=[0,[0,d60,ks(jx)],0];var sr=cr}else var lr=Dx[2],kr=lr?[0,[0,y60,ks(lr)],0]:0,sr=kr;var Er=sr}else var Er=0;return ps(us(Fx(Sx,Fx(Er,[0,[0,m60,xr(q)],0])),h0))},N0=function(q){return Rr(j0,q)},X0=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,Fm0,xr(gn(C[2]))],0];return D(qm0,R0,j,[0,[0,Hm0,Rr(ds,h0)],nx])},D0=function(q){var C=q[2],j=C[5],h0=C[4],R0=C[2],nx=C[1],Sx=q[1],Dx=[0,[0,a90,Rr(O0,C[3])],0],jx=[0,[0,l90,$e(0,h0)],Dx],bx=[0,[0,p90,Mx(l2,R0)],jx];return D(y90,Sx,j,[0,[0,d90,K0(nx)],bx])},ox=function(q,C){var j=C[2],h0=j[7],R0=j[5],nx=j[4],Sx=j[2],Dx=j[6],jx=j[3],bx=j[1],hr=C[1];if(nx)var cr=nx[1][2],lr=cr[2],kr=cr[1],sr=I2(cr[3],h0),Er=lr,Wr=[0,kr];else var sr=h0,Er=0,Wr=0;if(R0)var Vr=R0[1][2],x1=Vr[1],Ir=I2(Vr[2],sr),r1=Ir,a1=Rr(S0,x1);else var r1=sr,a1=z1(0);var T1=[0,[0,Ed0,a1],[0,[0,Sd0,Rr(e0,Dx)],0]],l1=[0,[0,gd0,Mx(he,Er)],T1],u1=[0,[0,Ad0,Mx(z0,Wr)],l1],i1=[0,[0,Pd0,Mx(l2,jx)],u1],p1=Sx[2],P1=p1[2],Q1=Sx[1],p2=[0,[0,Cd0,D(jd0,Q1,P1,[0,[0,Dd0,Rr(G,p1[1])],0])],i1];return D(q,hr,r1,[0,[0,Nd0,Mx(K0,bx)],p2])},b0=function(q,C){var j=C[2],h0=j[5],R0=j[4],nx=j[3],Sx=j[2],Dx=j[1],jx=C[1],bx=q?dd0:yd0,hr=[0,[0,md0,Mx(dr,R0)],0],cr=[0,[0,kd0,Mx(dr,nx)],hr],lr=[0,[0,hd0,Mx(l2,Sx)],cr];return D(bx,jx,h0,[0,[0,_d0,K0(Dx)],lr])},kx=function(q){var C=q[2],j=C[4],h0=C[2],R0=C[1],nx=q[1],Sx=[0,[0,vd0,dr(C[3])],0],Dx=[0,[0,ad0,Mx(l2,h0)],Sx];return D(pd0,nx,j,[0,[0,ld0,K0(R0)],Dx])},V0=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,F50,J0(C[2])],0];return D(q50,R0,j,[0,[0,H50,K0(h0)],nx])},h=function(q){var C=q[2],j=C[3],h0=q[1],R0=C[5],nx=C[4],Sx=C[2],Dx=C[1],jx=I2(A1(j[2][3]),R0),bx=j[2],hr=bx[1],cr=bx[2],lr=[0,[0,L50,Mx(l2,Sx)],0],kr=[0,[0,M50,oo(nx)],lr],sr=[0,[0,D50,w1(hr)],kr],Er=[0,[0,j50,Mx(u2,cr)],sr],Wr=[0,[0,U50,w1(hr)],Er];return D(Y50,h0,jx,[0,[0,B50,K0(Dx)],Wr])},X=function(q){var C=q[2],j=C[6],h0=C[4],R0=C[7],nx=C[5],Sx=C[3],Dx=C[2],jx=C[1],bx=q[1],hr=z1(h0?[0,O0(h0[1]),0]:0),cr=j?Rr(S0,j[1][2][1]):z1(0),lr=[0,[0,C50,hr],[0,[0,P50,cr],[0,[0,A50,Rr(O0,nx)],0]]],kr=[0,[0,N50,$e(0,Sx)],lr],sr=[0,[0,R50,Mx(l2,Dx)],kr];return D(O50,bx,R0,[0,[0,I50,K0(jx)],sr])},W0=function(q){var C=q[2],j=C[2],h0=C[1],R0=C[4],nx=C[3],Sx=q[1],Dx=Fr(h0[1],j[1]),jx=[0,[0,S50,Mx(lo,nx)],0];return D(g50,Sx,R0,[0,[0,E50,jr(Dx,[0,h0,[1,j],0])],jx])},sx=function(q){var C=q[2],j=C[2],h0=C[1],R0=C[4],nx=C[3],Sx=q[1],Dx=Fr(h0[1],j[1]),jx=[0,[0,_50,xr(gn(nx))],0];return D(T50,Sx,R0,[0,[0,w50,jr(Dx,[0,h0,[1,j],0])],jx])},tx=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,k50,N0(C[1])],0];return D(h50,h0,A1(j),R0)},j0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return tx([0,j,C[1]]);case 1:var h0=C[1],R0=h0[2];return D(g60,j,R0,[0,[0,E60,Mx(K0,h0[1])],0]);case 2:return ox(wd0,[0,j,C[1]]);case 3:var nx=C[1],Sx=nx[3],Dx=nx[6],jx=nx[5],bx=nx[4],hr=nx[2],cr=nx[1],lr=I2(A1(Sx[2][3]),Dx),kr=[0,[0,ly0,Mx(l2,hr)],0],sr=[0,[0,py0,oo(bx)],kr],Er=Sx[2],Wr=Er[2],Vr=Er[1];if(Wr)var x1=Wr[1],Ir=x1[2],r1=Ir[2],a1=x1[1],T1=D(_y0,a1,r1,[0,[0,hy0,ix(Ir[1])],0]),l1=z1(Ax([0,T1,iy(k0,Vr)]));else var l1=z1(_n(k0,Vr));var u1=[0,[0,yy0,K0(cr)],[0,[0,dy0,l1],sr]];return D(ky0,j,lr,[0,[0,my0,tx(jx)],u1]);case 4:var i1=C[1],p1=i1[2];return D(P60,j,p1,[0,[0,A60,Mx(K0,i1[1])],0]);case 5:return D(C60,j,C[1][1],0);case 6:return X([0,j,C[1]]);case 7:return h([0,j,C[1]]);case 8:return V0([0,j,C[1]]);case 9:var P1=C[1],Q1=P1[5],p2=P1[4],Hr=P1[3],Kx=P1[2],Yr=P1[1];if(Hr){var Mr=Hr[1];if(Mr[0]!==0&&!Mr[1][2])return D(R60,j,Q1,[0,[0,N60,Mx(B0,p2)],0])}if(Kx){var Dr=Kx[1];switch(Dr[0]){case 0:var $r=sx(Dr[1]);break;case 1:var $r=W0(Dr[1]);break;case 2:var $r=X(Dr[1]);break;case 3:var $r=h(Dr[1]);break;case 4:var $r=dr(Dr[1]);break;case 5:var $r=kx(Dr[1]);break;case 6:var $r=b0(1,Dr[1]);break;case 7:var $r=D0(Dr[1]);break;default:var $r=V0(Dr[1])}var I1=$r}else var I1=O2;var Qe=[0,[0,I60,Mx(B0,p2)],0],Fe=[0,[0,L60,I1],[0,[0,O60,x0(Hr)],Qe]],zr=Yr?1:0;return D(D60,j,Q1,[0,[0,M60,!!zr],Fe]);case 10:return W0([0,j,C[1]]);case 11:var i2=C[1],Gt=i2[5],He=i2[4],U1=i2[2],F1=i2[1],W2=[0,[0,G50,Rr(O0,i2[3])],0],_e=[0,[0,b50,$e(0,He)],W2],bt=[0,[0,xd0,Mx(l2,U1)],_e];return D(ed0,j,Gt,[0,[0,rd0,K0(F1)],bt]);case 12:var we=C[1],Te=we[1],ht=we[4],Se=we[3],$2=we[2],Ee=Te[0]===0?K0(Te[1]):B0(Te[1]),Q2=0,ge=Se?"ES":"CommonJS";return D(Y60,j,ht,[0,[0,B60,Ee],[0,[0,U60,tx($2)],[0,[0,j60,ge],Q2]]]);case 13:var _t=C[1],wt=_t[2];return D(J60,j,wt,[0,[0,X60,Zx(_t[1])],0]);case 14:var g2=C[1],L2=g2[4],F2=g2[2],Rn=g2[1],In=[0,[0,fd0,dr(g2[3])],0],xn=[0,[0,cd0,Mx(l2,F2)],In];return D(od0,j,L2,[0,[0,sd0,K0(Rn)],xn]);case 15:return b0(1,[0,j,C[1]]);case 16:return sx([0,j,C[1]]);case 17:var Tt=C[1],rn=Tt[3],On=Tt[1],Ae=[0,[0,V60,z0(Tt[2])],0];return D(K60,j,rn,[0,[0,z60,j0(On)],Ae]);case 18:return D(Z60,j,C[1][1],0);case 19:var qe=C[1],M2=qe[3],Ln=qe[1],St=[0,[0,s90,J0(qe[2])],0];return D(v90,j,M2,[0,[0,o90,K0(Ln)],St]);case 20:var Et=C[1],gt=Et[2],hs=Et[3],Mn=gt[0]===0?j0(gt[1]):z0(gt[1]);return D(Q60,j,hs,[0,[0,$60,Mn],[0,[0,W60,xr(w(1))],0]]);case 21:var H2=C[1],Ge=H2[5],Dn=H2[4],jn=H2[3],_s=H2[2],tv=H2[1];if(_s){var ia=_s[1];if(ia[0]!==0){var w3=ia[1][2],yo=[0,[0,F60,xr(w(Dn))],0],mo=[0,[0,H60,Mx(K0,w3)],yo];return D(G60,j,Ge,[0,[0,q60,Mx(B0,jn)],mo])}}var T3=[0,[0,b60,xr(w(Dn))],0],S3=[0,[0,x40,Mx(B0,jn)],T3],E3=[0,[0,r40,x0(_s)],S3];return D(t40,j,Ge,[0,[0,e40,Mx(j0,tv)],E3]);case 22:var ko=C[1],nv=ko[3],fa=ko[1],g3=[0,[0,n40,Mx(xg0,ko[2])],0];return D(i40,j,nv,[0,[0,u40,z0(fa)],g3]);case 23:var Un=C[1],A3=Un[5],Bn=Un[4],P3=Un[3],C3=Un[2],ca=Un[1],uv=function(Q6){return Q6[0]===0?X0(Q6[1]):z0(Q6[1])},N3=[0,[0,f40,j0(Bn)],0],R3=[0,[0,c40,Mx(z0,P3)],N3],iv=[0,[0,s40,Mx(z0,C3)],R3];return D(v40,j,A3,[0,[0,o40,Mx(uv,ca)],iv]);case 24:var At=C[1],ws=At[1],sa=At[5],oa=At[4],I3=At[3],en=At[2],Pe=ws[0]===0?X0(ws[1]):ix(ws[1]),Ts=[0,[0,l40,j0(I3)],[0,[0,a40,!!oa],0]];return D(y40,j,sa,[0,[0,d40,Pe],[0,[0,p40,z0(en)],Ts]]);case 25:var Yn=C[1],tn=Yn[1],Ce=Yn[5],ho=Yn[4],O3=Yn[3],L3=Yn[2],M3=tn[0]===0?X0(tn[1]):ix(tn[1]),D3=[0,[0,k40,j0(O3)],[0,[0,m40,!!ho],0]];return D(w40,j,Ce,[0,[0,_40,M3],[0,[0,h40,z0(L3)],D3]]);case 26:var fe=C[1],fv=fe[3],j3=fe[2],b9=fe[9],XL=fe[8],JL=fe[7],VL=fe[6],zL=fe[5],KL=fe[4],ZL=j3[2][4],WL=fe[1],$L=fv[0]===0?fv[1]:Nx(O80),QL=I2(A1(ZL),b9),FL=[0,[0,L80,Mx(l2,XL)],0],HL=[0,[0,D80,!1],[0,[0,M80,Lr(JL)],FL]],qL=[0,[0,B80,!!KL],[0,[0,U80,!!zL],[0,[0,j80,Mx(lo,VL)],HL]]],GL=[0,[0,Y80,tx($L)],qL],bL=[0,[0,X80,Hx(j3)],GL];return D(V80,j,QL,[0,[0,J80,Mx(K0,WL)],bL]);case 27:var U3=C[1],xm=U3[3],xM=U3[4],rM=U3[2],eM=U3[1];if(xm)var rm=xm[1][2],em=j0(DS0(rm[1],rm[2]));else var em=O2;var tM=[0,[0,S40,j0(rM)],[0,[0,T40,em],0]];return D(g40,j,xM,[0,[0,E40,z0(eM)],tM]);case 28:var va=C[1],tm=va[4],nm=va[3],nM=va[5],uM=va[2],iM=va[1];if(tm){var J6=tm[1];if(J6[0]===0)var fM=J6[1],im=_n(function(F6){var Y3=F6[3],X3=F6[2],vm=F6[1],RM=X3?Fr(Y3[1],X3[1][1]):Y3[1],IM=X3?X3[1]:Y3,am=0,OM=0;if(vm){var H6=0;switch(vm[1]){case 0:var lm=fi;H6=1;break;case 1:var lm=Ps;H6=1;break}if(H6){var pm=lm;am=1}}if(!am)var pm=O2;var LM=[0,[0,eT0,K0(IM)],[0,[0,rT0,pm],OM]];return D(nT0,RM,0,[0,[0,tT0,K0(Y3)],LM])},fM);else var um=J6[1],cM=um[1],im=[0,D(xT0,cM,0,[0,[0,bw0,K0(um[2])],0]),0];var V6=im}else var V6=0;if(nm)var fm=nm[1][1],sM=[0,[0,qw0,K0(fm)],0],cm=[0,D(Gw0,fm[1],0,sM),V6];else var cm=V6;switch(iM){case 0:var z6=A40;break;case 1:var z6=P40;break;default:var z6=C40}var oM=[0,[0,R40,B0(uM)],[0,[0,N40,xr(z6)],0]];return D(O40,j,nM,[0,[0,I40,z1(cm)],oM]);case 29:return D0([0,j,C[1]]);case 30:var K6=C[1],vM=K6[3],aM=K6[1],lM=[0,[0,L40,j0(K6[2])],0];return D(D40,j,vM,[0,[0,M40,K0(aM)],lM]);case 31:var sm=C[1],pM=sm[2];return D(U40,j,pM,[0,[0,j40,Mx(z0,sm[1])],0]);case 32:var Z6=C[1],dM=Z6[3],yM=Z6[1],mM=[0,[0,B40,Rr(v1,Z6[2])],0];return D(X40,j,dM,[0,[0,Y40,z0(yM)],mM]);case 33:var om=C[1],kM=om[2];return D(V40,j,kM,[0,[0,J40,z0(om[1])],0]);case 34:var B3=C[1],hM=B3[4],_M=B3[2],wM=B3[1],TM=[0,[0,z40,Mx(tx,B3[3])],0],SM=[0,[0,K40,Mx(K1,_M)],TM];return D(W40,j,hM,[0,[0,Z40,tx(wM)],SM]);case 35:return kx([0,j,C[1]]);case 36:return b0(0,[0,j,C[1]]);case 37:return X0([0,j,C[1]]);case 38:var W6=C[1],EM=W6[3],gM=W6[1],AM=[0,[0,$40,j0(W6[2])],0];return D(F40,j,EM,[0,[0,Q40,z0(gM)],AM]);default:var $6=C[1],PM=$6[3],CM=$6[1],NM=[0,[0,H40,j0($6[2])],0];return D(G40,j,PM,[0,[0,q40,z0(CM)],NM])}},Px=function(q){var C=q[2],j=C[4],h0=C[3][2],R0=C[1],nx=q[1],Sx=[0,[0,pw0,D(Aw0,C[2],0,0)],0],Dx=[0,[0,dw0,Rr(ms,h0)],Sx];return D(mw0,nx,j,[0,[0,yw0,D(Sw0,R0,0,0)],Dx])},Ex=function(q){var C=q[2],j=C[1],h0=C[4],R0=C[2],nx=q[1],Sx=[0,[0,ow0,Rr(ms,C[3][2])],0],Dx=[0,[0,vw0,Mx(xa,R0)],Sx],jx=j[2],bx=jx[2],hr=jx[4],cr=jx[3],lr=jx[1],kr=j[1],sr=bx?[0,[0,kw0,Cn(bx[1])],0]:0,Er=[0,[0,_w0,Rr(bv,hr)],[0,[0,hw0,!!cr],0]];return D(lw0,nx,h0,[0,[0,aw0,D(Tw0,kr,0,Fx([0,[0,ww0,ao(lr)],Er],sr))],Dx])},Ox=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,Dm0,Rr(z0,C[2])],0];return D(Um0,R0,j,[0,[0,jm0,Rr(fo,h0)],nx])},qx=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j?wm0:Tm0;return D(gm0,R0,h0,[0,[0,Em0,!!j],[0,[0,Sm0,xr(nx)],0]])},B0=function(q){var C=q[2];return D(_m0,q[1],C[3],[0,[0,hm0,xr(C[1])],[0,[0,km0,xr(C[2])],0]])},rr=function(q){var C=q[2],j=C[2],h0=C[3],R0=q[1];return D(mm0,R0,h0,[0,[0,ym0,O2],[0,[0,dm0,xr(k2(j,0,Xx(j)-1|0))],[0,[0,pm0,xr(j)],0]]])},Ux=function(q){var C=q[2];return D(lm0,q[1],C[3],[0,[0,am0,C[1]],[0,[0,vm0,xr(C[2])],0]])},K0=function(q){var C=q[2];return D(t50,q[1],C[2],[0,[0,e50,xr(C[1])],[0,[0,r50,O2],[0,[0,x50,!1],0]]])},nr=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[9],nx=C[8],Sx=C[7],Dx=C[6],jx=C[5],bx=C[4],hr=h0[2][4],cr=C[1],lr=q[1],kr=j[0]===0?j[1]:Nx(z80),sr=I2(A1(hr),R0),Er=[0,[0,K80,Mx(l2,nx)],0],Wr=[0,[0,W80,!1],[0,[0,Z80,Lr(Sx)],Er]],Vr=[0,[0,F80,!!bx],[0,[0,Q80,!!jx],[0,[0,$80,Mx(lo,Dx)],Wr]]],x1=[0,[0,H80,tx(kr)],Vr],Ir=[0,[0,q80,Hx(h0)],x1];return D(b80,lr,sr,[0,[0,G80,Mx(K0,cr)],Ir])},z0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[2],nx=[0,[0,b40,Rr(We,h0[1])],0];return D(xp0,j,A1(R0),nx);case 1:var Sx=C[1],Dx=Sx[3],jx=Sx[2],bx=Sx[9],hr=Sx[8],cr=Sx[7],lr=Sx[6],kr=Sx[4],sr=jx[2][4];if(Dx[0]===0)var Er=0,Wr=tx(Dx[1]);else var Er=1,Wr=z0(Dx[1]);var Vr=I2(A1(sr),bx),x1=[0,[0,rp0,Mx(l2,hr)],0],Ir=[0,[0,tp0,!!Er],[0,[0,ep0,Lr(cr)],x1]],r1=[0,[0,fp0,Wr],[0,[0,ip0,!!kr],[0,[0,up0,!1],[0,[0,np0,Mx(lo,lr)],Ir]]]];return D(op0,j,Vr,[0,[0,sp0,O2],[0,[0,cp0,Hx(jx)],r1]]);case 2:var a1=C[1],T1=a1[3],l1=a1[1],u1=[0,[0,vp0,dr(a1[2][2])],0];return D(lp0,j,T1,[0,[0,ap0,z0(l1)],u1]);case 3:var i1=C[1],p1=i1[1],P1=i1[4],Q1=i1[3],p2=i1[2];if(p1){switch(p1[1]){case 0:var Hr=lq;break;case 1:var Hr=pq;break;case 2:var Hr=dq;break;case 3:var Hr=yq;break;case 4:var Hr=mq;break;case 5:var Hr=kq;break;case 6:var Hr=hq;break;case 7:var Hr=_q;break;case 8:var Hr=wq;break;case 9:var Hr=Tq;break;case 10:var Hr=Sq;break;case 11:var Hr=Eq;break;case 12:var Hr=gq;break;case 13:var Hr=Aq;break;default:var Hr=Pq}var Kx=Hr}else var Kx=pp0;var Yr=[0,[0,dp0,z0(Q1)],0];return D(kp0,j,P1,[0,[0,mp0,xr(Kx)],[0,[0,yp0,ix(p2)],Yr]]);case 4:var Mr=C[1],Dr=Mr[4],$r=Mr[2],I1=Mr[1],Qe=[0,[0,hp0,z0(Mr[3])],0],Fe=[0,[0,_p0,z0($r)],Qe];switch(I1){case 0:var zr=ZH;break;case 1:var zr=WH;break;case 2:var zr=$H;break;case 3:var zr=QH;break;case 4:var zr=FH;break;case 5:var zr=HH;break;case 6:var zr=qH;break;case 7:var zr=GH;break;case 8:var zr=bH;break;case 9:var zr=xq;break;case 10:var zr=rq;break;case 11:var zr=eq;break;case 12:var zr=tq;break;case 13:var zr=nq;break;case 14:var zr=uq;break;case 15:var zr=iq;break;case 16:var zr=fq;break;case 17:var zr=cq;break;case 18:var zr=sq;break;case 19:var zr=oq;break;case 20:var zr=vq;break;default:var zr=aq}return D(Tp0,j,Dr,[0,[0,wp0,xr(zr)],Fe]);case 5:var i2=C[1],Gt=i2[4],He=I2(A1(i2[3][2][2]),Gt);return D(Sp0,j,He,bo(i2));case 6:return ox(Td0,[0,j,C[1]]);case 7:var U1=C[1],F1=U1[4],W2=U1[2],_e=U1[1],bt=[0,[0,Ep0,z0(U1[3])],0],we=[0,[0,gp0,z0(W2)],bt];return D(Pp0,j,F1,[0,[0,Ap0,z0(_e)],we]);case 8:return nr([0,j,C[1]]);case 9:return K0(C[1]);case 10:var Te=C[1],ht=Te[2];return D(Np0,j,ht,[0,[0,Cp0,z0(Te[1])],0]);case 11:return Ex([0,j,C[1]]);case 12:return Px([0,j,C[1]]);case 13:return B0([0,j,C[1]]);case 14:return qx([0,j,C[1]]);case 15:return D(Mm0,j,C[1],[0,[0,Lm0,O2],[0,[0,Om0,_v],0]]);case 16:return Ux([0,j,C[1]]);case 17:return rr([0,j,C[1]]);case 18:var Se=C[1],$2=Se[2],Ee=Se[1],Q2=Se[4],ge=Se[3];try{var _t=new RegExp(xr(Ee),xr($2)),wt=_t}catch{var wt=O2}return D(Im0,j,Q2,[0,[0,Rm0,wt],[0,[0,Nm0,xr(ge)],[0,[0,Cm0,ps([0,[0,Pm0,xr(Ee)],[0,[0,Am0,xr($2)],0]])],0]]]);case 19:var g2=C[1];return B0([0,j,[0,g2[1],g2[5],g2[6]]]);case 20:var L2=C[1],F2=L2[4],Rn=L2[3],In=L2[2];switch(L2[1]){case 0:var xn=Rp0;break;case 1:var xn=Ip0;break;default:var xn=Op0}var Tt=[0,[0,Lp0,z0(Rn)],0];return D(jp0,j,F2,[0,[0,Dp0,xr(xn)],[0,[0,Mp0,z0(In)],Tt]]);case 21:var rn=C[1],On=rn[3];return D(Up0,j,On,xv(rn));case 22:var Ae=C[1],qe=Ae[3],M2=Ae[1],Ln=[0,[0,Bp0,K0(Ae[2])],0];return D(Xp0,j,qe,[0,[0,Yp0,K0(M2)],Ln]);case 23:var St=C[1],Et=St[4],gt=St[3],hs=St[2],Mn=St[1];if(gt)var H2=gt[1],Ge=I2(A1(H2[2][2]),Et),Dn=Ge,jn=lx(H2);else var Dn=Et,jn=z1(0);var _s=[0,[0,Vp0,Mx(Cn,hs)],[0,[0,Jp0,jn],0]];return D(Kp0,j,Dn,[0,[0,zp0,z0(Mn)],_s]);case 24:var tv=C[1],ia=tv[2],w3=[0,[0,Zp0,Rr(Yx,tv[1])],0];return D(Wp0,j,A1(ia),w3);case 25:var yo=C[1],mo=yo[1],T3=yo[3],S3=mo[4],E3=I2(A1(mo[3][2][2]),S3);return D(Qp0,j,E3,Fx(bo(mo),[0,[0,$p0,!!T3],0]));case 26:var ko=C[1],nv=ko[1],fa=nv[3],g3=[0,[0,Fp0,!!ko[3]],0];return D(Hp0,j,fa,Fx(xv(nv),g3));case 27:var Un=C[1],A3=Un[2];return D(Gp0,j,A3,[0,[0,qp0,Rr(z0,Un[1])],0]);case 28:return D(bp0,j,C[1][1],0);case 29:var Bn=C[1],P3=Bn[3],C3=Bn[1],ca=[0,[0,zm0,Ox(Bn[2])],0];return D(Zm0,j,P3,[0,[0,Km0,z0(C3)],ca]);case 30:return Ox([0,j,C[1]]);case 31:return D(x80,j,C[1][1],0);case 32:var uv=C[1],N3=uv[3],R3=uv[1],iv=[0,[0,r80,Zx(uv[2])],0];return D(t80,j,N3,[0,[0,e80,z0(R3)],iv]);case 33:var At=C[1],ws=At[2],sa=At[1];if(ws){var oa=At[3],I3=[0,[0,n80,dr(ws[1])],0];return D(i80,j,oa,[0,[0,u80,z0(sa)],I3])}var en=At[3];return D(c80,j,en,[0,[0,f80,z0(sa)],0]);case 34:var Pe=C[1],Ts=Pe[3],Yn=Pe[2],tn=Pe[1];if(7<=tn)return D(o80,j,Ts,[0,[0,s80,z0(Yn)],0]);switch(tn){case 0:var Ce=v80;break;case 1:var Ce=a80;break;case 2:var Ce=l80;break;case 3:var Ce=p80;break;case 4:var Ce=d80;break;case 5:var Ce=y80;break;case 6:var Ce=m80;break;default:var Ce=Nx(k80)}return D(T80,j,Ts,[0,[0,w80,xr(Ce)],[0,[0,_80,!0],[0,[0,h80,z0(Yn)],0]]]);case 35:var ho=C[1],O3=ho[4],L3=ho[3],M3=ho[2],D3=ho[1]?S80:E80;return D(C80,j,O3,[0,[0,P80,xr(D3)],[0,[0,A80,z0(M3)],[0,[0,g80,!!L3],0]]]);default:var fe=C[1],fv=fe[2],j3=[0,[0,N80,!!fe[3]],0];return D(I80,j,fv,[0,[0,R80,Mx(z0,fe[1])],j3])}},or=function(q){var C=q[2];return D(f50,q[1],C[2],[0,[0,i50,xr(C[1])],[0,[0,u50,O2],[0,[0,n50,!1],0]]])},jr=function(q,C){var j=C[1][2],h0=j[2],R0=j[1],nx=[0,[0,c50,!!C[3]],0];return D(v50,q,h0,[0,[0,o50,xr(R0)],[0,[0,s50,m3(Zx,C[2])],nx]])},lx=function(q){return Rr(E2,q[2][1])},v1=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,a50,Rr(j0,C[2])],0];return D(p50,R0,j,[0,[0,l50,Mx(z0,h0)],nx])},K1=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,d50,tx(C[2])],0];return D(m50,R0,j,[0,[0,y50,Mx(ix,h0)],nx])},w1=function(q){return z1(_n(function(C){var j=C[2];return Cr(0,j[3],C[1],[0,j[1]],j[2][2])},q))},Cr=function(q,C,j,h0,R0){if(h0)var nx=h0[1],Sx=nx[0]===0?Mx(K0,[0,nx[1]]):Mx(B0,[0,nx[1]]),Dx=Sx;else var Dx=Mx(K0,0);return D(Q50,j,q,[0,[0,$50,Dx],[0,[0,W50,dr(R0)],[0,[0,Z50,!!C],0]]])},u2=function(q){var C=q[2],j=C[4],h0=C[3],R0=C[2],nx=C[1],Sx=q[1];return Cr(j,h0,Sx,uy(function(Dx){return[0,Dx]},nx),R0)},w=function(q){return q?td0:nd0},x0=function(q){if(!q)return z1(0);var C=q[1];if(C[0]===0)return Rr(ea,C[1]);var j=C[1],h0=j[2],R0=j[1];return z1(h0?[0,D(id0,R0,0,[0,[0,ud0,K0(h0[1])],0]),0]:0)},e0=function(q){var C=q[2],j=C[2],h0=q[1];return D(Id0,h0,j,[0,[0,Rd0,z0(C[1])],0])},S0=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,Od0,Mx(he,C[2])],0];return D(Md0,h0,0,[0,[0,Ld0,K0(j)],R0])},G=function(q){switch(q[0]){case 0:var C=q[1],j=C[2],h0=j[6],R0=j[2],nx=j[5],Sx=j[4],Dx=j[3],jx=j[1],bx=C[1];switch(R0[0]){case 0:var kr=h0,sr=0,Er=B0(R0[1]);break;case 1:var kr=h0,sr=0,Er=Ux(R0[1]);break;case 2:var kr=h0,sr=0,Er=rr(R0[1]);break;case 3:var kr=h0,sr=0,Er=K0(R0[1]);break;case 4:var kr=h0,sr=0,Er=or(R0[1]);break;default:var hr=R0[1][2],cr=hr[1],lr=I2(hr[2],h0),kr=lr,sr=1,Er=z0(cr)}switch(jx){case 0:var Wr=Ud0;break;case 1:var Wr=Bd0;break;case 2:var Wr=Yd0;break;default:var Wr=Xd0}var Vr=[0,[0,Kd0,xr(Wr)],[0,[0,zd0,!!Sx],[0,[0,Vd0,!!sr],[0,[0,Jd0,Rr(e0,nx)],0]]]];return D($d0,bx,kr,[0,[0,Wd0,Er],[0,[0,Zd0,nr(Dx)],Vr]]);case 1:var x1=q[1],Ir=x1[2],r1=Ir[7],a1=Ir[6],T1=Ir[2],l1=Ir[1],u1=Ir[5],i1=Ir[4],p1=Ir[3],P1=x1[1];switch(l1[0]){case 0:var Yr=r1,Mr=0,Dr=B0(l1[1]);break;case 1:var Yr=r1,Mr=0,Dr=Ux(l1[1]);break;case 2:var Yr=r1,Mr=0,Dr=rr(l1[1]);break;case 3:var Yr=r1,Mr=0,Dr=K0(l1[1]);break;case 4:var Q1=Nx(ty0),Yr=Q1[3],Mr=Q1[2],Dr=Q1[1];break;default:var p2=l1[1][2],Hr=p2[1],Kx=I2(p2[2],r1),Yr=Kx,Mr=1,Dr=z0(Hr)}if(typeof T1=="number")if(T1)var $r=0,I1=0;else var $r=1,I1=0;else var $r=0,I1=[0,T1[1]];var Qe=$r?[0,[0,ny0,!!$r],0]:0,Fe=a1===0?0:[0,[0,uy0,Rr(e0,a1)],0],zr=Fx(Fe,Qe),i2=[0,[0,cy0,!!Mr],[0,[0,fy0,!!i1],[0,[0,iy0,Mx(me,u1)],0]]],Gt=[0,[0,sy0,m3(Zx,p1)],i2];return D(ay0,P1,Yr,Fx([0,[0,vy0,Dr],[0,[0,oy0,Mx(z0,I1)],Gt]],zr));default:var He=q[1],U1=He[2],F1=U1[6],W2=U1[2],_e=U1[7],bt=U1[5],we=U1[4],Te=U1[3],ht=U1[1],Se=He[1];if(typeof W2=="number")if(W2)var $2=0,Ee=0;else var $2=1,Ee=0;else var $2=0,Ee=[0,W2[1]];var Q2=$2?[0,[0,Qd0,!!$2],0]:0,ge=F1===0?0:[0,[0,Fd0,Rr(e0,F1)],0],_t=Fx(ge,Q2),wt=[0,[0,Gd0,!1],[0,[0,qd0,!!we],[0,[0,Hd0,Mx(me,bt)],0]]],g2=[0,[0,bd0,m3(Zx,Te)],wt],L2=[0,[0,xy0,Mx(z0,Ee)],g2];return D(ey0,Se,_e,Fx([0,[0,ry0,or(ht)],L2],_t))}},k0=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[1],nx=q[1],Sx=C[4],Dx=R0[0]===0?K0(R0[1]):B0(R0[1]);if(j)var jx=[0,[0,wy0,z0(j[1])],0],bx=D(Sy0,nx,0,[0,[0,Ty0,ix(h0)],jx]);else var bx=ix(h0);return D(Py0,nx,0,[0,[0,Ay0,Dx],[0,[0,gy0,bx],[0,[0,Ey0,!!Sx],0]]])},J0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[4],nx=h0[1],Sx=[0,[0,Zy0,!!h0[2]],[0,[0,Ky0,!!h0[3]],0]],Dx=[0,[0,Wy0,Rr(function(Yr){var Mr=Yr[2],Dr=Mr[1],$r=Yr[1],I1=[0,[0,Jy0,qx(Mr[2])],0];return D(zy0,$r,0,[0,[0,Vy0,K0(Dr)],I1])},nx)],Sx];return D($y0,j,A1(R0),Dx);case 1:var jx=C[1],bx=jx[4],hr=jx[1],cr=[0,[0,Fy0,!!jx[2]],[0,[0,Qy0,!!jx[3]],0]],lr=[0,[0,Hy0,Rr(function(Yr){var Mr=Yr[2],Dr=Mr[1],$r=Yr[1],I1=[0,[0,By0,Ux(Mr[2])],0];return D(Xy0,$r,0,[0,[0,Yy0,K0(Dr)],I1])},hr)],cr];return D(qy0,j,A1(bx),lr);case 2:var kr=C[1],sr=kr[1],Er=kr[4],Wr=kr[3],Vr=kr[2];if(sr[0]===0)var x1=sr[1],r1=_n(function(Yr){var Mr=Yr[1];return D(Uy0,Mr,0,[0,[0,jy0,K0(Yr[2][1])],0])},x1);else var Ir=sr[1],r1=_n(function(Yr){var Mr=Yr[2],Dr=Mr[1],$r=Yr[1],I1=[0,[0,Ly0,B0(Mr[2])],0];return D(Dy0,$r,0,[0,[0,My0,K0(Dr)],I1])},Ir);var a1=[0,[0,x90,z1(r1)],[0,[0,by0,!!Vr],[0,[0,Gy0,!!Wr],0]]];return D(r90,j,A1(Er),a1);case 3:var T1=C[1],l1=T1[3],u1=T1[1],i1=[0,[0,e90,!!T1[2]],0],p1=[0,[0,t90,Rr(function(Yr){var Mr=Yr[1];return D(Oy0,Mr,0,[0,[0,Iy0,K0(Yr[2][1])],0])},u1)],i1];return D(n90,j,A1(l1),p1);default:var P1=C[1],Q1=P1[4],p2=P1[1],Hr=[0,[0,i90,!!P1[2]],[0,[0,u90,!!P1[3]],0]],Kx=[0,[0,f90,Rr(function(Yr){var Mr=Yr[2],Dr=Mr[1],$r=Yr[1],I1=[0,[0,Cy0,rr(Mr[2])],0];return D(Ry0,$r,0,[0,[0,Ny0,K0(Dr)],I1])},p2)],Hr];return D(c90,j,A1(Q1),Kx)}},O0=function(q){var C=q[2],j=C[1],h0=C[3],R0=C[2],nx=q[1],Sx=j[0]===0?K0(j[1]):co(j[1]);return D(h90,nx,h0,[0,[0,k90,Sx],[0,[0,m90,Mx(he,R0)],0]])},ix=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[3],nx=h0[1],Sx=[0,[0,_90,m3(Zx,h0[2])],0],Dx=[0,[0,w90,Rr(ie,nx)],Sx];return D(T90,j,A1(R0),Dx);case 1:var jx=C[1],bx=jx[3],hr=jx[1],cr=[0,[0,S90,m3(Zx,jx[2])],0],lr=[0,[0,E90,Rr(er,hr)],cr];return D(g90,j,A1(bx),lr);case 2:return jr(j,C[1]);default:return z0(C[1])}},Wx=function(q){var C=q[2],j=C[2],h0=C[1],R0=q[1];if(!j)return ix(h0);var nx=[0,[0,A90,z0(j[1])],0];return D(C90,R0,0,[0,[0,P90,ix(h0)],nx])},Bx=function(q){var C=q[2],j=C[2],h0=q[1];return D(I90,h0,j,[0,[0,R90,lv],[0,[0,N90,Zx(C[1])],0]])},Hx=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[1];if(j){var nx=j[1],Sx=nx[2],Dx=Sx[2],jx=nx[1],bx=D(L90,jx,Dx,[0,[0,O90,ix(Sx[1])],0]),hr=Ax([0,bx,iy(Wx,h0)]),cr=R0?[0,Bx(R0[1]),hr]:hr;return z1(cr)}var lr=_n(Wx,h0),kr=R0?[0,Bx(R0[1]),lr]:lr;return z1(kr)},$x=function(q,C){var j=C[2];return D(D90,q,j,[0,[0,M90,ix(C[1])],0])},er=function(q){switch(q[0]){case 0:var C=q[1],j=C[2],h0=j[2],R0=j[1],nx=C[1];if(!h0)return ix(R0);var Sx=[0,[0,j90,z0(h0[1])],0];return D(B90,nx,0,[0,[0,U90,ix(R0)],Sx]);case 1:var Dx=q[1];return $x(Dx[1],Dx[2]);default:return O2}},Zx=function(q){var C=q[1];return D(Q_0,C,0,[0,[0,$_0,dr(q[2])],0])},Lr=function(q){switch(q[0]){case 0:return O2;case 1:return Zx(q[1]);default:var C=q[1],j=C[2],h0=C[1];return D(H_0,h0,0,[0,[0,F_0,mt([0,j[1],j[2]])],0])}},Yx=function(q){if(q[0]===0){var C=q[1],j=C[2],h0=C[1];switch(j[0]){case 0:var R0=j[3],nx=j[1],sr=0,Er=R0,Wr=0,Vr=Y90,x1=z0(j[2]),Ir=nx;break;case 1:var Sx=j[2],Dx=j[1],sr=0,Er=0,Wr=1,Vr=X90,x1=nr([0,Sx[1],Sx[2]]),Ir=Dx;break;case 2:var jx=j[2],bx=j[3],hr=j[1],sr=bx,Er=0,Wr=0,Vr=J90,x1=nr([0,jx[1],jx[2]]),Ir=hr;break;default:var cr=j[2],lr=j[3],kr=j[1],sr=lr,Er=0,Wr=0,Vr=V90,x1=nr([0,cr[1],cr[2]]),Ir=kr}switch(Ir[0]){case 0:var u1=sr,i1=0,p1=B0(Ir[1]);break;case 1:var u1=sr,i1=0,p1=Ux(Ir[1]);break;case 2:var u1=sr,i1=0,p1=rr(Ir[1]);break;case 3:var u1=sr,i1=0,p1=K0(Ir[1]);break;case 4:var r1=Nx(z90),u1=r1[3],i1=r1[2],p1=r1[1];break;default:var a1=Ir[1][2],T1=a1[1],l1=I2(a1[2],sr),u1=l1,i1=1,p1=z0(T1)}return D(H90,h0,u1,[0,[0,F90,p1],[0,[0,Q90,x1],[0,[0,$90,xr(Vr)],[0,[0,W90,!!Wr],[0,[0,Z90,!!Er],[0,[0,K90,!!i1],0]]]]]])}var P1=q[1],Q1=P1[2],p2=Q1[2],Hr=P1[1];return D(G90,Hr,p2,[0,[0,q90,z0(Q1[1])],0])},ie=function(q){if(q[0]!==0){var C=q[1];return $x(C[1],C[2])}var j=q[1],h0=j[2],R0=h0[3],nx=h0[2],Sx=h0[1],Dx=h0[4],jx=j[1];switch(Sx[0]){case 0:var cr=0,lr=0,kr=B0(Sx[1]);break;case 1:var cr=0,lr=0,kr=Ux(Sx[1]);break;case 2:var cr=0,lr=0,kr=rr(Sx[1]);break;case 3:var cr=0,lr=0,kr=K0(Sx[1]);break;default:var bx=Sx[1][2],hr=bx[2],cr=hr,lr=1,kr=z0(bx[1])}if(R0)var sr=R0[1],Er=Fr(nx[1],sr[1]),Wr=[0,[0,b90,z0(sr)],0],Vr=D(rm0,Er,0,[0,[0,xm0,ix(nx)],Wr]);else var Vr=ix(nx);return D(cm0,jx,cr,[0,[0,fm0,kr],[0,[0,im0,Vr],[0,[0,um0,hu],[0,[0,nm0,!1],[0,[0,tm0,!!Dx],[0,[0,em0,!!lr],0]]]]]])},Ft=function(q){var C=q[2],j=C[2],h0=q[1];return D(om0,h0,j,[0,[0,sm0,z0(C[1])],0])},E2=function(q){return q[0]===0?z0(q[1]):Ft(q[1])},We=function(q){switch(q[0]){case 0:return z0(q[1]);case 1:return Ft(q[1]);default:return O2}},fo=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1];return D(Vm0,R0,0,[0,[0,Jm0,ps([0,[0,Ym0,xr(j[1])],[0,[0,Bm0,xr(j[2])],0]])],[0,[0,Xm0,!!h0],0]])},gn=function(q){switch(q){case 0:return Wm0;case 1:return $m0;default:return Qm0}},ds=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,Gm0,Mx(z0,C[2])],0];return D(xk0,h0,0,[0,[0,bm0,ix(j)],R0])},me=function(q){var C=q[2],j=C[2],h0=q[1];switch(C[1]){case 0:var R0=rk0;break;case 1:var R0=ek0;break;case 2:var R0=tk0;break;case 3:var R0=nk0;break;case 4:var R0=uk0;break;default:var R0=ik0}return D(ck0,h0,j,[0,[0,fk0,xr(R0)],0])},An=function(q,C){var j=C[3],h0=C[2];switch(C[4]){case 0:var R0=p_0;break;case 1:var R0=d_0;break;default:var R0=y_0}return D(h_0,q,j,[0,[0,k_0,xr(R0)],[0,[0,m_0,dr(h0)],0]])},Ht=function(q){var C=q[2],j=C[1],h0=C[3],R0=C[2],nx=q[1],Sx=j[0]===0?K0(j[1]):co(j[1]);return D(Hh0,nx,h0,[0,[0,Fh0,Sx],[0,[0,Qh0,Mx(he,R0)],0]])},$e=function(q,C){var j=C[2],h0=j[4],R0=j[3],nx=j[2],Sx=j[1],Dx=C[1],jx=r2(function(Vr,x1){var Ir=Vr[4],r1=Vr[3],a1=Vr[2],T1=Vr[1];switch(x1[0]){case 0:var l1=x1[1],u1=l1[2],i1=u1[2],p1=u1[1],P1=u1[8],Q1=u1[7],p2=u1[6],Hr=u1[5],Kx=u1[4],Yr=u1[3],Mr=l1[1];switch(p1[0]){case 0:var Dr=B0(p1[1]);break;case 1:var Dr=Ux(p1[1]);break;case 2:var Dr=rr(p1[1]);break;case 3:var Dr=K0(p1[1]);break;case 4:var Dr=Nx(Hk0);break;default:var Dr=Nx(qk0)}switch(i1[0]){case 0:var Qe=Gk0,Fe=dr(i1[1]);break;case 1:var $r=i1[1],Qe=bk0,Fe=qt([0,$r[1],$r[2]]);break;default:var I1=i1[1],Qe=xh0,Fe=qt([0,I1[1],I1[2]])}return[0,[0,D(sh0,Mr,P1,[0,[0,ch0,Dr],[0,[0,fh0,Fe],[0,[0,ih0,!!p2],[0,[0,uh0,!!Yr],[0,[0,nh0,!!Kx],[0,[0,th0,!!Hr],[0,[0,eh0,Mx(me,Q1)],[0,[0,rh0,xr(Qe)],0]]]]]]]]),T1],a1,r1,Ir];case 1:var zr=x1[1],i2=zr[2],Gt=i2[2],He=zr[1];return[0,[0,D(vh0,He,Gt,[0,[0,oh0,dr(i2[1])],0]),T1],a1,r1,Ir];case 2:var U1=x1[1],F1=U1[2],W2=F1[6],_e=F1[4],bt=F1[3],we=F1[2],Te=F1[1],ht=U1[1],Se=[0,[0,lh0,!!_e],[0,[0,ah0,Mx(me,F1[5])],0]],$2=[0,[0,ph0,dr(bt)],Se],Ee=[0,[0,dh0,dr(we)],$2];return[0,T1,[0,D(mh0,ht,W2,[0,[0,yh0,Mx(K0,Te)],Ee]),a1],r1,Ir];case 3:var Q2=x1[1],ge=Q2[2],_t=ge[3],wt=Q2[1],g2=[0,[0,kh0,!!ge[2]],0];return[0,T1,a1,[0,D(_h0,wt,_t,[0,[0,hh0,qt(ge[1])],g2]),r1],Ir];case 4:var L2=x1[1],F2=L2[2],Rn=F2[6],In=F2[5],xn=F2[4],Tt=F2[3],rn=F2[1],On=L2[1],Ae=[0,[0,Rh0,!!Tt],[0,[0,Nh0,!!xn],[0,[0,Ch0,!!In],[0,[0,Ph0,dr(F2[2])],0]]]];return[0,T1,a1,r1,[0,D(Oh0,On,Rn,[0,[0,Ih0,K0(rn)],Ae]),Ir]];default:var qe=x1[1],M2=qe[2],Ln=M2[6],St=M2[4],Et=M2[3],gt=M2[2],hs=M2[1],Mn=qe[1],H2=0;switch(M2[5]){case 0:var Ge="PlusOptional";break;case 1:var Ge="MinusOptional";break;case 2:var Ge="Optional";break;default:var Ge=O2}var Dn=[0,[0,Th0,Mx(me,St)],[0,[0,wh0,Ge],H2]],jn=[0,[0,Sh0,dr(Et)],Dn],_s=[0,[0,Eh0,dr(gt)],jn];return[0,[0,D(Ah0,Mn,Ln,[0,[0,gh0,ys(hs)],_s]),T1],a1,r1,Ir]}},Vk0,R0),bx=jx[3],hr=jx[2],cr=jx[1],lr=[0,[0,zk0,z1(Ax(jx[4]))],0],kr=[0,[0,Kk0,z1(Ax(bx))],lr],sr=[0,[0,Zk0,z1(Ax(hr))],kr],Er=[0,[0,$k0,!!Sx],[0,[0,Wk0,z1(Ax(cr))],sr]],Wr=q?[0,[0,Qk0,!!nx],Er]:Er;return D(Fk0,Dx,A1(h0),Wr)},qt=function(q){var C=q[2],j=C[3],h0=C[2][2],R0=C[4],nx=h0[3],Sx=h0[2],Dx=h0[1],jx=C[1],bx=q[1],hr=I2(A1(h0[4]),R0),cr=[0,[0,Ck0,Mx(l2,jx)],0],lr=[0,[0,Nk0,Mx(ke,nx)],cr],kr=j[0]===0?dr(j[1]):mt(j[1]),sr=[0,[0,Ik0,Mx(Pn,Dx)],[0,[0,Rk0,kr],lr]];return D(Lk0,bx,hr,[0,[0,Ok0,Rr(function(Er){return Qo(0,Er)},Sx)],sr])},dr=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return D(sk0,j,C[1],0);case 1:return D(ok0,j,C[1],0);case 2:return D(vk0,j,C[1],0);case 3:return D(ak0,j,C[1],0);case 4:return D(lk0,j,C[1],0);case 5:return D(dk0,j,C[1],0);case 6:return D(yk0,j,C[1],0);case 7:return D(mk0,j,C[1],0);case 8:return D(kk0,j,C[2],0);case 9:return D(pk0,j,C[1],0);case 10:return D(W_0,j,C[1],0);case 11:var h0=C[1],R0=h0[2];return D(_k0,j,R0,[0,[0,hk0,dr(h0[1])],0]);case 12:return qt([0,j,C[1]]);case 13:var nx=C[1],Sx=nx[2],Dx=nx[4],jx=nx[3],bx=nx[1],hr=I2(A1(Sx[2][3]),Dx),cr=Sx[2],lr=cr[2],kr=cr[1],sr=[0,[0,X50,Mx(l2,bx)],0],Er=[0,[0,J50,oo(jx)],sr],Wr=[0,[0,V50,Mx(u2,lr)],Er];return D(K50,j,hr,[0,[0,z50,w1(kr)],Wr]);case 14:return $e(1,[0,j,C[1]]);case 15:var Vr=C[1],x1=Vr[3],Ir=Vr[2],r1=[0,[0,Lh0,$e(0,Vr[1])],0];return D(Dh0,j,x1,[0,[0,Mh0,Rr(O0,Ir)],r1]);case 16:var a1=C[1],T1=a1[2];return D(Uh0,j,T1,[0,[0,jh0,dr(a1[1])],0]);case 17:var l1=C[1],u1=l1[5],i1=l1[3],p1=l1[2],P1=l1[1],Q1=[0,[0,Bh0,dr(l1[4])],0],p2=[0,[0,Yh0,dr(i1)],Q1],Hr=[0,[0,Xh0,dr(p1)],p2];return D(Vh0,j,u1,[0,[0,Jh0,dr(P1)],Hr]);case 18:var Kx=C[1],Yr=Kx[2];return D(Kh0,j,Yr,[0,[0,zh0,ys(Kx[1])],0]);case 19:return Ht([0,j,C[1]]);case 20:var Mr=C[1],Dr=Mr[3];return D(bh0,j,Dr,Fo(Mr));case 21:var $r=C[1],I1=$r[1],Qe=I1[3],Fe=[0,[0,x_0,!!$r[2]],0];return D(r_0,j,Qe,Fx(Fo(I1),Fe));case 22:var zr=C[1],i2=zr[1],Gt=zr[2];return D(t_0,j,Gt,[0,[0,e_0,Rr(dr,[0,i2[1],[0,i2[2],i2[3]]])],0]);case 23:var He=C[1],U1=He[1],F1=He[2];return D(u_0,j,F1,[0,[0,n_0,Rr(dr,[0,U1[1],[0,U1[2],U1[3]]])],0]);case 24:var W2=C[1],_e=W2[2],bt=W2[3],we=W2[1],Te=_e?[0,[0,i_0,he(_e[1])],0]:0;return D(c_0,j,bt,[0,[0,f_0,so(we)],Te]);case 25:var ht=C[1],Se=ht[2];return D(l_0,j,Se,[0,[0,a_0,dr(ht[1])],0]);case 26:return An(j,C[1]);case 27:var $2=C[1],Ee=$2[2];return D(w_0,j,Ee,[0,[0,__0,dr($2[1])],0]);case 28:var Q2=C[1],ge=Q2[2],_t=Q2[1],wt=0;return D(S_0,j,ge,[0,[0,T_0,Rr(function(On){var Ae=On[2],qe=On[1];switch(Ae[0]){case 0:return dr(Ae[1]);case 1:var M2=Ae[1],Ln=M2[2],St=M2[1],Et=[0,[0,E_0,!!M2[4]],0],gt=[0,[0,g_0,Mx(me,M2[3])],Et],hs=[0,[0,A_0,dr(Ln)],gt];return D(C_0,qe,0,[0,[0,P_0,K0(St)],hs]);default:var Mn=Ae[1],H2=Mn[1],Ge=[0,[0,N_0,dr(Mn[2])],0];return D(I_0,qe,0,[0,[0,R_0,Mx(K0,H2)],Ge])}},_t)],wt]);case 29:var g2=C[1];return D(M_0,j,g2[3],[0,[0,L_0,xr(g2[1])],[0,[0,O_0,xr(g2[2])],0]]);case 30:var L2=C[1];return D(U_0,j,L2[3],[0,[0,j_0,L2[1]],[0,[0,D_0,xr(L2[2])],0]]);case 31:var F2=C[1];return D(X_0,j,F2[3],[0,[0,Y_0,O2],[0,[0,B_0,xr(F2[2])],0]]);case 32:var Rn=C[1],In=Rn[1],xn=Rn[2],Tt=0,rn=In?J_0:V_0;return D(Z_0,j,xn,[0,[0,K_0,!!In],[0,[0,z_0,xr(rn)],Tt]]);case 33:return D(wk0,j,C[1],0);case 34:return D(Tk0,j,C[1],0);default:return D(Sk0,j,C[1],0)}},mt=function(q){var C=q[2],j=C[2],h0=C[3],R0=j[1],nx=q[1],Sx=[0,[0,Ek0,!!C[1]],0],Dx=[0,[0,gk0,Mx(dr,j[2])],Sx],jx=[0,[0,Ak0,K0(R0)],Dx];return D(Pk0,nx,A1(h0),jx)},Qo=function(q,C){var j=C[2],h0=j[1],R0=C[1],nx=[0,[0,Mk0,!!j[3]],0],Sx=[0,[0,Dk0,dr(j[2])],nx];return D(Uk0,R0,q,[0,[0,jk0,Mx(K0,h0)],Sx])},ke=function(q){var C=q[2];return Qo(C[2],C[1])},Pn=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,Yk0,dr(C[1][2])],[0,[0,Bk0,!1],0]];return D(Jk0,h0,j,[0,[0,Xk0,Mx(K0,0)],R0])},co=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j[0]===0?K0(j[1]):co(j[1]);return D($h0,R0,0,[0,[0,Wh0,nx],[0,[0,Zh0,K0(h0)],0]])},Fo=function(q){var C=q[1],j=[0,[0,qh0,dr(q[2])],0];return[0,[0,Gh0,dr(C)],j]},so=function(q){if(q[0]===0)return K0(q[1]);var C=q[1],j=C[2],h0=j[2],R0=C[1],nx=so(j[1]);return D(v_0,R0,0,[0,[0,o_0,nx],[0,[0,s_0,K0(h0)],0]])},oo=function(q){return q[0]===0?O2:An(q[1],q[2])},l2=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,q_0,Rr(ys,C[1])],0];return D(G_0,h0,A1(j),R0)},ys=function(q){var C=q[2],j=C[1][2],h0=C[5],R0=C[4],nx=C[2],Sx=j[2],Dx=j[1],jx=q[1],bx=C[3]?[0,[0,b_0,!0],0]:0,hr=[0,[0,xw0,Mx(dr,h0)],0],cr=[0,[0,rw0,Mx(me,R0)],hr];return D(nw0,jx,Sx,Fx([0,[0,tw0,xr(Dx)],[0,[0,ew0,m3(Zx,nx)],cr]],bx))},he=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,uw0,Rr(dr,C[1])],0];return D(iw0,h0,A1(j),R0)},Cn=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,fw0,Rr(Ho,C[1])],0];return D(cw0,h0,A1(j),R0)},Ho=function(q){if(q[0]===0)return dr(q[1]);var C=q[1],j=C[1],h0=C[2][1];return Ht([0,j,[0,[0,wn(0,[0,j,sw0])],0,h0]])},bv=function(q){if(q[0]===0){var C=q[1],j=C[2],h0=j[1],R0=j[2],nx=C[1],Sx=h0[0]===0?kt(h0[1]):qo(h0[1]);return D(Nw0,nx,0,[0,[0,Cw0,Sx],[0,[0,Pw0,Mx(ra,R0)],0]])}var Dx=q[1],jx=Dx[2],bx=jx[2],hr=Dx[1];return D(Iw0,hr,bx,[0,[0,Rw0,z0(jx[1])],0])},xa=function(q){var C=q[1];return D(gw0,C,0,[0,[0,Ew0,ao(q[2][1])],0])},vo=function(q){var C=q[2],j=C[1],h0=q[1],R0=C[2],nx=j?z0(j[1]):D(Ow0,[0,h0[1],[0,h0[2][1],h0[2][2]+1|0],[0,h0[3][1],h0[3][2]-1|0]],0,0);return D(Mw0,h0,A1(R0),[0,[0,Lw0,nx],0])},ms=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return Ex([0,j,C[1]]);case 1:return Px([0,j,C[1]]);case 2:return vo([0,j,C[1]]);case 3:var h0=C[1],R0=h0[2];return D(jw0,j,R0,[0,[0,Dw0,z0(h0[1])],0]);default:var nx=C[1];return D(Yw0,j,0,[0,[0,Bw0,xr(nx[1])],[0,[0,Uw0,xr(nx[2])],0]])}},kt=function(q){var C=q[2];return D($w0,q[1],C[2],[0,[0,Ww0,xr(C[1])],0])},qo=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,zw0,kt(C[2])],0];return D(Zw0,h0,0,[0,[0,Kw0,kt(j)],R0])},Go=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j[0]===0?kt(j[1]):Go(j[1]);return D(Vw0,R0,0,[0,[0,Jw0,nx],[0,[0,Xw0,kt(h0)],0]])},ao=function(q){switch(q[0]){case 0:return kt(q[1]);case 1:return qo(q[1]);default:return Go(q[1])}},ra=function(q){if(q[0]===0){var C=q[1];return B0([0,C[1],C[2]])}var j=q[1];return vo([0,j[1],j[2]])},ea=function(q){var C=q[2],j=C[2],h0=C[1],R0=q[1],nx=K0(j?j[1]:h0);return D(Hw0,R0,0,[0,[0,Fw0,K0(h0)],[0,[0,Qw0,nx],0]])},ks=function(q){return Rr(ta,q)},ta=function(q){var C=q[2],j=q[1];if(C[1])var h0=C[2],R0=uT0;else var h0=C[2],R0=iT0;return D(R0,j,0,[0,[0,fT0,xr(h0)],0])},lo=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1];if(j)var nx=[0,[0,cT0,z0(j[1])],0],Sx=sT0;else var nx=0,Sx=oT0;return D(Sx,R0,h0,nx)},bo=function(q){var C=q[2],j=q[1],h0=[0,[0,vT0,lx(q[3])],0],R0=[0,[0,aT0,Mx(Cn,C)],h0];return[0,[0,lT0,z0(j)],R0]},xv=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=0,R0=K0(C[1]);break;case 1:var h0=0,R0=or(C[1]);break;default:var h0=1,R0=z0(C[1])}return[0,[0,yT0,z0(j)],[0,[0,dT0,R0],[0,[0,pT0,!!h0],0]]]},Nn=P0[2],rv=Nn[2],$9=Nn[4],k3=Nn[3],Q9=P0[1],U6=N0(Nn[1]),B6=[0,[0,h60,U6],[0,[0,k60,ks($9)],0]];if(rv)var Y6=rv[1],X6=Fx(B6,[0,[0,T60,D(w60,Y6[1],0,[0,[0,_60,xr(Y6[2])],0])],0]);else var X6=B6;var h3=D(S60,Q9,k3,X6),F9=Fx(v0,KK[1]);if(h3.errors=Rr(function(q){var C=q[1],j=[0,[0,mT0,xr(_S0(q[2]))],0];return ps([0,[0,kT0,WK(C)],j])},F9),T){var H9=I[1];h3[AD]=z1(iy(function(q){var C=q[2],j=q[1],h0=q[3],R0=[0,[0,Dv0,xr(eO(C))],0],nx=[0,c9(b,j[3]),0],Sx=[0,[0,jv0,z1([0,c9(b,j[2]),nx])],R0],Dx=[0,[0,Yv0,ps([0,[0,Bv0,j[3][1]],[0,[0,Uv0,j[3][2]],0]])],0],jx=[0,[0,zv0,ps([0,[0,Vv0,ps([0,[0,Jv0,j[2][1]],[0,[0,Xv0,j[2][2]],0]])],Dx])],Sx];switch(h0){case 0:var bx=Kv0;break;case 1:var bx=Zv0;break;case 2:var bx=Wv0;break;case 3:var bx=$v0;break;case 4:var bx=Qv0;break;default:var bx=Fv0}return ps([0,[0,qv0,xr(BJ(C))],[0,[0,Hv0,xr(bx)],jx]])},H9))}return h3}var na=A0[1];if(na===5){var _3=A0[2];if(_3&&_3[1]===6){var q9=_3[2],C0=[0,H+2|0,0,[0,Vl(Ax([0,H,Q0])),U0]],A0=q9;continue}}else if(6>na){var G9=A0[2],C0=[0,H+XV(na)|0,[0,H,Q0],U0],A0=G9;continue}var j1=A0[2],ev=[0,Vl(Ax([0,H,Q0])),U0],C0=[0,H+XV(na)|0,0,ev],A0=j1}}};if(typeof DM<"u")var $K=DM;else{var QK={};io.flow=QK;var $K=QK}$K.parse=bZ(function(x,r){try{var e=rg0(x,r);return e}catch(u){var t=L1(u);return t[1]===BL?zK(t[2]):zK(new bE0(xr(Qx(MT0,ay(t)))))}}),oI(0);return}}})(globalThis)});var iZ=FK(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.extract=aN0;aa.parse=pN0;aa.parseWithComments=uZ;aa.print=dN0;aa.strip=lN0;var fN0=/\*\/$/,cN0=/^\/\*\*?/,tZ=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,sN0=/(^|\s+)\/\/([^\r\n]*)/g,xZ=/^(\r?\n)+/,oN0=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,rZ=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,vN0=/(\r?\n|^) *\* ?/g,nZ=[];function aN0(p0){let wx=p0.match(tZ);return wx?wx[0].trimLeft():""}function lN0(p0){let wx=p0.match(tZ);return wx&&wx[0]?p0.substring(wx[0].length):p0}function pN0(p0){return uZ(p0).pragmas}function uZ(p0){let wx=` -`;p0=p0.replace(cN0,"").replace(fN0,"").replace(vN0,"$1");let tr="";for(;tr!==p0;)tr=p0,p0=p0.replace(oN0,`${wx}$1 $2${wx}`);p0=p0.replace(xZ,"").trimRight();let gr=Object.create(null),C1=p0.replace(rZ,"").replace(xZ,"").trimRight(),ir;for(;ir=rZ.exec(p0);){let ur=ir[2].replace(sN0,"");typeof gr[ir[1]]=="string"||Array.isArray(gr[ir[1]])?gr[ir[1]]=nZ.concat(gr[ir[1]],ur):gr[ir[1]]=ur}return{comments:C1,pragmas:gr}}function dN0({comments:p0="",pragmas:wx={}}){let tr=` -`,gr="/**",C1=" *",ir=" */",ur=Object.keys(wx),k1=ur.flatMap(Nt=>eZ(Nt,wx[Nt])).map(Nt=>`${C1} ${Nt}${tr}`).join("");if(!p0){if(ur.length===0)return"";if(ur.length===1&&!Array.isArray(wx[ur[0]])){let Nt=wx[ur[0]];return`${gr} ${eZ(ur[0],Nt)[0]}${ir}`}}let la=p0.split(tr).map(Nt=>`${C1} ${Nt}`).join(tr)+tr;return gr+tr+(p0?la:"")+(p0&&ur.length?C1+tr:"")+k1+ir}function eZ(p0,wx){return nZ.concat(wx).map(tr=>`@${p0} ${tr}`.trim())}});var VM={};HK(VM,{parsers:()=>JM});var JM={};HK(JM,{flow:()=>LN0});var kZ=qK(GK(),1);function iN0(p0,wx){let tr=new SyntaxError(p0+" ("+wx.loc.start.line+":"+wx.loc.start.column+")");return Object.assign(tr,wx)}var bK=iN0;var J3=qK(iZ(),1);function yN0(p0){if(!p0.startsWith("#!"))return"";let wx=p0.indexOf(` -`);return wx===-1?p0:p0.slice(0,wx)}var fZ=yN0;function mN0(p0){let wx=fZ(p0);wx&&(p0=p0.slice(wx.length+1));let tr=(0,J3.extract)(p0),{pragmas:gr,comments:C1}=(0,J3.parseWithComments)(tr);return{shebang:wx,text:p0,pragmas:gr,comments:C1}}function cZ(p0){let{pragmas:wx}=mN0(p0);return Object.prototype.hasOwnProperty.call(wx,"prettier")||Object.prototype.hasOwnProperty.call(wx,"format")}function kN0(p0){return Array.isArray(p0)&&p0.length>0}var dm=kN0;function Ct(p0){var gr;let wx=p0.range?p0.range[0]:p0.start,tr=((gr=p0.declaration)==null?void 0:gr.decorators)??p0.decorators;return dm(tr)?Math.min(Ct(tr[0]),wx):wx}function As(p0){return p0.range?p0.range[1]:p0.end}function hN0(p0){return p0=typeof p0=="function"?{parse:p0}:p0,{astFormat:"estree",hasPragma:cZ,locStart:Ct,locEnd:As,...p0}}var sZ=hN0;function _N0(p0){return p0.charAt(0)==="#"&&p0.charAt(1)==="!"?"//"+p0.slice(2):p0}var oZ=_N0;var wN0=(p0,wx,tr)=>{if(!(p0&&wx==null))return Array.isArray(wx)||typeof wx=="string"?wx[tr<0?wx.length+tr:tr]:wx.at(tr)},jM=wN0;function TN0(p0){return p0=new Set(p0),wx=>p0.has(wx==null?void 0:wx.type)}var vZ=TN0;var SN0=vZ(["Block","CommentBlock","MultiLine"]),B4=SN0;function EN0(p0){return B4(p0)&&p0.value[0]==="*"&&/@(?:type|satisfies)\b/.test(p0.value)}var aZ=EN0;function gN0(p0){let wx=`*${p0.value}*`.split(` -`);return wx.length>1&&wx.every(tr=>tr.trimStart()[0]==="*")}var UM=gN0;var Y4=null;function X4(p0){if(Y4!==null&&typeof Y4.property){let wx=Y4;return Y4=X4.prototype=null,wx}return Y4=X4.prototype=p0??Object.create(null),new X4}var AN0=10;for(let p0=0;p0<=AN0;p0++)X4();function BM(p0){return X4(p0)}function PN0(p0,wx="type"){BM(p0);function tr(gr){let C1=gr[wx],ir=p0[C1];if(!Array.isArray(ir))throw Object.assign(new Error(`Missing visitor keys for '${C1}'.`),{node:gr});return ir}return tr}var lZ=PN0;var pZ={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var CN0=lZ(pZ),dZ=CN0;function YM(p0,wx){if(!(p0!==null&&typeof p0=="object"))return p0;if(Array.isArray(p0)){for(let gr=0;gr{var k1;(k1=ur.leadingComments)!=null&&k1.some(aZ)&&ir.add(Ct(ur))}),p0=ym(p0,ur=>{if(ur.type==="ParenthesizedExpression"){let{expression:k1}=ur;if(k1.type==="TypeCastExpression")return k1.range=ur.range,k1;let la=Ct(ur);if(!ir.has(la))return k1.extra={...k1.extra,parenthesized:!0},k1}})}if(p0=ym(p0,ir=>{switch(ir.type){case"LogicalExpression":if(yZ(ir))return XM(ir);break;case"VariableDeclaration":{let ur=jM(!1,ir.declarations,-1);ur!=null&&ur.init&&C1(ir,ur);break}case"TSParenthesizedType":return ir.typeAnnotation;case"TSTypeParameter":if(typeof ir.name=="string"){let ur=Ct(ir);ir.name={type:"Identifier",name:ir.name,range:[ur,ur+ir.name.length]}}break;case"TopicReference":p0.extra={...p0.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:ur}=ir;if(tr==="meriyah"&&(ur==null?void 0:ur.type)==="Identifier"){let k1=gr.slice(Ct(ur),As(ur));(k1.startsWith('"')||k1.startsWith("'"))&&(ir.exported={...ir.exported,type:"Literal",value:ir.exported.name,raw:k1})}break}case"TSUnionType":case"TSIntersectionType":if(ir.types.length===1)return ir.types[0];break}}),dm(p0.comments)){let ir=jM(!1,p0.comments,-1);for(let ur=p0.comments.length-2;ur>=0;ur--){let k1=p0.comments[ur];As(k1)===Ct(ir)&&B4(k1)&&B4(ir)&&UM(k1)&&UM(ir)&&(p0.comments.splice(ur+1,1),k1.value+="*//*"+ir.value,k1.range=[Ct(k1),As(ir)]),ir=k1}}return p0.type==="Program"&&(p0.range=[0,gr.length]),p0;function C1(ir,ur){gr[As(ur)]!==";"&&(ir.range=[Ct(ir),As(ur)])}}function yZ(p0){return p0.type==="LogicalExpression"&&p0.right.type==="LogicalExpression"&&p0.operator===p0.right.operator}function XM(p0){return yZ(p0)?XM({type:"LogicalExpression",operator:p0.operator,left:XM({type:"LogicalExpression",operator:p0.operator,left:p0.left,right:p0.right.left,range:[Ct(p0.left),As(p0.right.left)]}),right:p0.right.right,range:[Ct(p0),As(p0)]}):p0}var mZ=NN0;var RN0={comments:!1,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!0};function IN0(p0){let{message:wx,loc:{start:tr,end:gr}}=p0;return bK(wx,{loc:{start:{line:tr.line,column:tr.column+1},end:{line:gr.line,column:gr.column+1}},cause:p0})}function ON0(p0){let wx=kZ.default.parse(oZ(p0),RN0),[tr]=wx.errors;if(tr)throw IN0(tr);return mZ(wx,{text:p0})}var LN0=sZ(ON0);var LR0=VM;export{LR0 as default,JM as parsers}; + -- too many open files. Try running with OCAMLRUNPARAM=b=2)`],MF=[3,0,3],DF=ic,jF=b3,UF="{"],sH=[0,[12,32,0],Mt],oH=[0,[12,32,0],Mt],vH=[0,[17,[0,"@,",0,0],[12,Di,[17,0,0]]],"@,}@]"],aH=[0,"src/hack_forked/utils/collections/third-party/flow_set.ml",379,14],lH=xl,pH=_a,dH=ja,yH=wx,mH=wv,kH=[0,[12,40,[18,[1,[0,[11,Ne,0],Ne]],[11,"File_key.LibFile",[17,[0,fe,1,0],0]]]],"(@[<2>File_key.LibFile@ "],hH=[0,[3,0,0],z3],_H=[0,[17,0,[12,41,0]],op],wH=[0,[12,40,[18,[1,[0,[11,Ne,0],Ne]],[11,"File_key.SourceFile",[17,[0,fe,1,0],0]]]],"(@[<2>File_key.SourceFile@ "],TH=[0,[3,0,0],z3],SH=[0,[17,0,[12,41,0]],op],EH=[0,[12,40,[18,[1,[0,[11,Ne,0],Ne]],[11,"File_key.JsonFile",[17,[0,fe,1,0],0]]]],"(@[<2>File_key.JsonFile@ "],gH=[0,[3,0,0],z3],AH=[0,[17,0,[12,41,0]],op],PH=[0,[12,40,[18,[1,[0,[11,Ne,0],Ne]],[11,"File_key.ResourceFile",[17,[0,fe,1,0],0]]]],"(@[<2>File_key.ResourceFile@ "],CH=[0,[3,0,0],z3],NH=[0,[17,0,[12,41,0]],op],RH=[0,1],OH=[0,0],IH=[0,1],LH=[0,2],MH=[0,0],DH=[0,1],jH=[0,1],UH=[0,1],BH=[0,1],YH=[0,1],XH=[0,1],JH=[0,0,0],VH=[0,0,0],zH=[0,B2,si,_f,Vf,U2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Oi,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Ue,Rf,Ii,jc,Sf,Xf,xu,Iu,Be,ff,E7,qi,Fi,Ic,M7,qu,Sc,Me,k7,D7,xf,Tu,Uu,du,Ec,je,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Oc,wc,z7,Lu,Yc,yn,If,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ir,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,G2,I7,$f,yu,hf,p7,Ku,ou,Ei,D2,P7,s7,g7,Nt,Ou,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,H1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,ce,Mi,Rc,Of,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Re,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,O7,Le,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],KH=[0,Ic,Vn,ei,Ou,Kn,O7,Uc,qf,li,r7,$u,Jc,sc,Be,nu,Qf,df,pf,lc,a7,I7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Nt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Iu,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,If,Cf,$c,d7,_i,su,zf,uu,F7,oi,je,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,U2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,ce,G7,wi,B2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Oc,ec,qc,ir,D2,Me,C7,Oi,ff,H7,Ue,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,Of,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,H1,Lu,nc,xi,Qi,zn,eu,Fi,Re,$n,Gu,fu,af,ac,Ii,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Le,Mf,G2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],ZH=yD,WH=HD,$H=pD,QH=QD,FH=ZT,HH=LD,qH=b3,GH=RU,bH=sD,xq=AD,rq=$M,eq=js,tq=Lt,nq=PB,uq=zD,iq=q2,fq=GD,cq=EY,sq=O8,oq=J4,vq=Po,aq=G3,lq=PD,pq=TY,dq=pj,yq=TD,mq=dY,kq=VM,hq=jU,_q=CD,wq=gB,Tq=Bj,Sq=iY,Eq=hD,gq=Gj,Aq=lY,Pq=tB,Cq=[0,[18,[1,[0,[11,Ne,0],Ne]],[11,sj,0]],rY],Nq="Loc.line",Rq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],Oq=[0,[4,0,0,0,0],El],Iq=[0,[17,0,0],la],Lq=[0,[12,59,[17,[0,fe,1,0],0]],ap],Mq=kl,Dq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],jq=[0,[4,0,0,0,0],El],Uq=[0,[17,0,0],la],Bq=[0,[17,[0,fe,1,0],[12,Di,[17,0,0]]],wj],Yq=[0,[15,0],Kj],Xq="(Some ",Jq=KS,Vq="None",zq=[0,[18,[1,[0,[11,Ne,0],Ne]],[11,sj,0]],rY],Kq="Loc.source",Zq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],Wq=[0,[17,0,0],la],$q=[0,[12,59,[17,[0,fe,1,0],0]],ap],Qq=Im,Fq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],Hq=[0,[17,0,0],la],qq=[0,[12,59,[17,[0,fe,1,0],0]],ap],Gq="_end",bq=[0,[18,[1,[0,0,hx]],[2,0,[11,Q3,[17,[0,fe,1,0],0]]]],Z3],xG=[0,[17,0,0],la],rG=[0,[17,[0,fe,1,0],[12,Di,[17,0,0]]],wj],eG="Object literal may not have data and accessor property with the same name",tG="Object literal may not have multiple get/set accessors with the same name",nG="Unexpected token <. Remember, adjacent JSX elements must be wrapped in an enclosing parent tag",uG="Modules can only have 1 since they are either an ES module xor they are a CommonJS module.",iG="Found both `declare module.exports` and `declare export` in the same module. ",fG="`let [` is ambiguous in this position because it is either a `let` binding pattern, or a member expression.",cG="Async functions can only be declared at top level or immediately within another function.",sG="`await` is an invalid identifier in async functions",oG="`await` is not allowed in async function parameters.",vG="Computed properties must have a value.",aG="Constructor can't be an accessor.",lG="Constructor can't be an async function.",pG="Constructor can't be a generator.",dG="It is sufficient for your declare function to just have a Promise return type.",yG="async is an implementation detail and isn't necessary for your declare function statement. ",mG="`declare` modifier can only appear on class fields.",kG="Unexpected token `=`. Initializers are not allowed in a `declare`.",hG="`declare export interface` is not supported. Use `export interface` instead.",_G="`declare export type` is not supported. Use `export type` instead.",wG="Unexpected token `=`. Initializers are not allowed in a `declare opaque type`.",TG="Classes may only have one constructor",SG="Duplicate `declare module.exports` statement!",EG="Rest element must be final element of an array pattern",gG="Cannot export an enum with `export type`, try `export enum E {}` or `module.exports = E;` instead.",AG="Enum members are separated with `,`. Replace `;` with `,`.",PG="`const` enums are not supported. Flow Enums are designed to allow for inlining, however the inlining itself needs to be part of the build system (whatever you use) rather than Flow itself.",CG="Expected an object pattern, array pattern, or an identifier but found an expression instead",NG="Missing comma between export specifiers",RG="Generators can only be declared at top level or immediately within another function.",OG="Getter should have zero parameters",IG="A getter cannot have a `this` parameter.",LG="Illegal break statement",MG="Illegal continue statement",DG="Illegal return statement",jG="Illegal Unicode escape",UG="Missing comma between import specifiers",BG="It cannot be used with `import type` or `import typeof` statements",YG="The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. ",XG="Explicit inexact syntax cannot appear inside an explicit exact object type",JG="Explicit inexact syntax can only appear inside an object type",VG="Component params must be an identifier. If you'd like to destructure, you should use `name as {destructure}`",zG="Components use `renders` instead of `:` to annotate the render type of a component.",KG="A bigint literal must be an integer",ZG="JSX value should be either an expression or a quoted JSX text",WG="Invalid left-hand side in assignment",$G="Invalid left-hand side in exponentiation expression",QG="Invalid left-hand side in for-in",FG="Invalid left-hand side in for-of",HG="Imports within a `declare module` body must always be `import type` or `import typeof`!",qG="Invalid optional indexed access. Indexed access uses bracket notation. Use the format `T?.[K]`.",GG="Invalid regular expression",bG="A bigint literal cannot use exponential notation",xb="Tuple spread elements cannot be optional.",rb="Tuple variance annotations can only be used with labeled tuple elements, e.g. `[+foo: number]`",eb="`typeof` can only be used to get the type of variables.",tb="JSX attributes must only be assigned a non-empty expression",nb="Literals cannot be used as shorthand properties.",ub="Malformed unicode",ib="Object pattern can't contain methods",fb="Expected at least one type parameter.",cb="Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",sb="More than one default clause in switch statement",ob="Illegal newline after throw",vb="Illegal newline before arrow",ab="Missing catch or finally after try",lb="Const must be initialized",pb="Destructuring assignment must be initialized",db="An optional chain may not be used in a `new` expression.",yb="Template literals may not be used in an optional chain.",mb="Rest parameter must be final parameter of an argument list",kb="Private fields may not be deleted.",hb="Private fields can only be referenced from within a class.",_b="Rest property must be final property of an object pattern",wb="Setter should have exactly one parameter",Tb="A setter cannot have a `this` parameter.",Sb="Catch variable may not be eval or arguments in strict mode",Eb="Delete of an unqualified identifier in strict mode.",gb="Duplicate data property in object literal not allowed in strict mode",Ab="Function name may not be eval or arguments in strict mode",Pb="Assignment to eval or arguments is not allowed in strict mode",Cb="Postfix increment/decrement may not have eval or arguments operand in strict mode",Nb="Prefix increment/decrement may not have eval or arguments operand in strict mode",Rb="Strict mode code may not include a with statement",Ob="Number literals with leading zeros are not allowed in strict mode.",Ib="Octal literals are not allowed in strict mode.",Lb="Strict mode function may not have duplicate parameter names",Mb="Parameter name eval or arguments is not allowed in strict mode",Db='Illegal "use strict" directive in function with non-simple parameter list',jb="Use of reserved word in strict mode",Ub="Variable name may not be eval or arguments in strict mode",Bb="You may not access a private field through the `super` keyword.",Yb="Flow does not support abstract classes.",Xb="Flow does not support template literal types.",Jb="A type annotation is required for the `this` parameter.",Vb="Arrow functions cannot have a `this` parameter; arrow functions automatically bind `this` when declared.",zb="Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",Kb="The `this` parameter cannot be optional.",Zb="The `this` parameter must be the first function parameter.",Wb="A trailing comma is not permitted after the rest element",$b="Unexpected end of input",Qb="Explicit inexact syntax must come at the end of an object type",Fb="Opaque type aliases are not allowed in untyped mode",Hb="Unexpected proto modifier",qb="Unexpected reserved word",Gb="Unexpected reserved type",bb="Spreading a type is only allowed inside an object type",x00="Unexpected static modifier",r00="Unexpected `super` outside of a class method",e00="`super()` is only valid in a class constructor",t00="Type aliases are not allowed in untyped mode",n00="Type annotations are not allowed in untyped mode",u00="Type declarations are not allowed in untyped mode",i00="Type exports are not allowed in untyped mode",f00="Type imports are not allowed in untyped mode",c00="Interfaces are not allowed in untyped mode",s00="Unexpected variance sigil",o00="Found a decorator in an unsupported position.",v00="Invalid regular expression: missing /",a00="Unexpected whitespace between `#` and identifier",l00="`yield` is an invalid identifier in generators",p00="Yield expression not allowed in formal parameter",d00=[0,[11,"Duplicate export for `",[2,0,[12,96,0]]],"Duplicate export for `%s`"],y00=[0,[11,"Private fields may only be declared once. `#",[2,0,[11,"` is declared more than once.",0]]],"Private fields may only be declared once. `#%s` is declared more than once."],m00=[0,[11,"bigint enum members need to be initialized, e.g. `",[2,0,[11," = 1n,` in enum `",[2,0,[11,Rs,0]]]]],"bigint enum members need to be initialized, e.g. `%s = 1n,` in enum `%s`."],k00=[0,[11,"Boolean enum members need to be initialized. Use either `",[2,0,[11," = true,` or `",[2,0,[11," = false,` in enum `",[2,0,[11,Rs,0]]]]]]],"Boolean enum members need to be initialized. Use either `%s = true,` or `%s = false,` in enum `%s`."],h00=[0,[11,"Enum member names need to be unique, but the name `",[2,0,[11,"` has already been used before in enum `",[2,0,[11,Rs,0]]]]],"Enum member names need to be unique, but the name `%s` has already been used before in enum `%s`."],_00=[0,[11,OD,[2,0,[11,"` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",0]]],"Enum `%s` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers."],w00="The `...` must come at the end of the enum body. Remove the trailing comma.",T00="The `...` must come after all enum members. Move it to the end of the enum body.",S00=[0,[11,"Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `",[2,0,[11,Rs,0]]],"Use one of `boolean`, `number`, `string`, `symbol`, or `bigint` in enum `%s`."],E00=[0,[11,"Enum type `",[2,0,[11,"` is not valid. ",[2,0,0]]]],"Enum type `%s` is not valid. %s"],g00=[0,[11,"Supplied enum type is not valid. ",[2,0,0]],"Supplied enum type is not valid. %s"],A00=[0,[11,"Enum member names and initializers are separated with `=`. Replace `",[2,0,[11,":` with `",[2,0,[11," =`.",0]]]]],"Enum member names and initializers are separated with `=`. Replace `%s:` with `%s =`."],P00=[0,[11,OD,[2,0,[11,"` has type `",[2,0,[11,"`, so the initializer of `",[2,0,[11,"` needs to be a ",[2,0,[11," literal.",0]]]]]]]]],"Enum `%s` has type `%s`, so the initializer of `%s` needs to be a %s literal."],C00=[0,[11,"Symbol enum members cannot be initialized. Use `",[2,0,[11,",` in enum `",[2,0,[11,Rs,0]]]]],"Symbol enum members cannot be initialized. Use `%s,` in enum `%s`."],N00=[0,[11,"The enum member initializer for `",[2,0,[11,"` needs to be a literal (either a boolean, number, or string) in enum `",[2,0,[11,Rs,0]]]]],"The enum member initializer for `%s` needs to be a literal (either a boolean, number, or string) in enum `%s`."],R00=[0,[11,"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `",[2,0,[11,"`, consider using `",[2,0,[11,"`, in enum `",[2,0,[11,Rs,0]]]]]]],"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%s`, consider using `%s`, in enum `%s`."],O00=[0,[11,"Number enum members need to be initialized, e.g. `",[2,0,[11," = 1,` in enum `",[2,0,[11,Rs,0]]]]],"Number enum members need to be initialized, e.g. `%s = 1,` in enum `%s`."],I00=[0,[11,"String enum members need to consistently either all use initializers, or use no initializers, in enum ",[2,0,[12,46,0]]],"String enum members need to consistently either all use initializers, or use no initializers, in enum %s."],L00=[0,[11,"Expected corresponding JSX closing tag for ",[2,0,0]],"Expected corresponding JSX closing tag for %s"],M00="immediately within another function.",D00="In strict mode code, functions can only be declared at top level or ",j00="inside a block, or as the body of an if statement.",U00="In non-strict mode code, functions can only be declared at top level, ",B00="static ",Y00=hx,X00="methods",J00="fields",V00=HM,z00=[0,[11,"Classes may not have ",[2,0,[2,0,[11," named `",[2,0,[11,Rs,0]]]]]],"Classes may not have %s%s named `%s`."],K00=eB,Z00=hx,W00=[0,[11,"String params require local bindings using `as` renaming. You can use `'",[2,0,[11,"' as ",[2,0,[2,0,[11,": ` ",0]]]]]],"String params require local bindings using `as` renaming. You can use `'%s' as %s%s: ` "],$00="Remove the period.",Q00="Indexed access uses bracket notation.",F00=[0,[11,"Invalid indexed access. ",[2,0,[11," Use the format `T[K]`.",0]]],"Invalid indexed access. %s Use the format `T[K]`."],H00=[0,[11,"Invalid flags supplied to RegExp constructor '",[2,0,[12,39,0]]],"Invalid flags supplied to RegExp constructor '%s'"],q00=[0,[11,"JSX element ",[2,0,[11," has no corresponding closing tag.",0]]],"JSX element %s has no corresponding closing tag."],G00=[0,[11,jD,[2,0,[11,"`. Parentheses are required to combine `??` with `&&` or `||` expressions.",0]]],"Unexpected token `%s`. Parentheses are required to combine `??` with `&&` or `||` expressions."],b00=[0,[2,0,[11," '",[2,0,[11,"' has already been declared",0]]]],"%s '%s' has already been declared"],xx0=hx,rx0=F3,ex0=" You can try using JavaScript private fields by prepending `#` to the field name.",tx0=Sl,nx0=" Fields and methods are public by default. You can simply omit the `public` keyword.",ux0=V3,ix0=[0,[11,"Flow does not support using `",[2,0,[11,"` in classes.",[2,0,0]]]],"Flow does not support using `%s` in classes.%s"],fx0=[0,[11,"Private fields must be declared before they can be referenced. `#",[2,0,[11,"` has not been declared.",0]]],"Private fields must be declared before they can be referenced. `#%s` has not been declared."],cx0=[0,[11,TU,[2,0,0]],"Unexpected %s"],sx0=[0,[11,jD,[2,0,[11,"`. Did you mean `",[2,0,[11,"`?",0]]]]],"Unexpected token `%s`. Did you mean `%s`?"],ox0=[0,[11,TU,[2,0,[11,", expected ",[2,0,0]]]],"Unexpected %s, expected %s"],vx0=[0,[11,"Undefined label '",[2,0,[12,39,0]]],"Undefined label '%s'"],ax0="Parse_error.Error",lx0=[0,[0,36,37],[0,48,58],[0,65,91],[0,95,96],[0,97,It],[0,G4,Bk],[0,LR,nh],[0,dN,id],[0,Lp,ug],[0,ha,LT],[0,GC,b8],[0,Gr,706],[0,rj,722],[0,736,741],[0,748,749],[0,750,751],[0,768,885],[0,886,888],[0,890,894],[0,895,896],[0,902,907],[0,908,909],[0,910,930],[0,$B,1014],[0,1015,1154],[0,1155,1160],[0,1162,1328],[0,1329,1367],[0,1369,1370],[0,1376,1417],[0,1425,1470],[0,1471,1472],[0,1473,1475],[0,1476,1478],[0,1479,1480],[0,1488,1515],[0,1519,1523],[0,1552,1563],[0,1568,1642],[0,1646,1748],[0,1749,1757],[0,1759,1769],[0,1770,1789],[0,1791,1792],[0,1808,1867],[0,1869,1970],[0,1984,2038],[0,2042,2043],[0,2045,2046],[0,kN,2094],[0,2112,2140],[0,2144,2155],[0,2208,2229],[0,2230,2238],[0,2259,2274],[0,2275,2404],[0,2406,2416],[0,2417,2436],[0,2437,2445],[0,2447,2449],[0,2451,2473],[0,2474,2481],[0,2482,2483],[0,2486,2490],[0,2492,2501],[0,2503,2505],[0,2507,2511],[0,2519,2520],[0,2524,2526],[0,2527,2532],[0,2534,2546],[0,2556,2557],[0,2558,2559],[0,2561,2564],[0,2565,2571],[0,2575,2577],[0,2579,2601],[0,2602,2609],[0,2610,2612],[0,2613,2615],[0,2616,2618],[0,2620,2621],[0,2622,2627],[0,2631,2633],[0,2635,2638],[0,2641,2642],[0,2649,2653],[0,2654,2655],[0,2662,2678],[0,2689,2692],[0,2693,2702],[0,2703,2706],[0,2707,2729],[0,2730,2737],[0,2738,2740],[0,2741,2746],[0,2748,2758],[0,2759,2762],[0,2763,2766],[0,2768,2769],[0,2784,2788],[0,2790,2800],[0,2809,2816],[0,2817,2820],[0,2821,2829],[0,2831,2833],[0,2835,2857],[0,2858,2865],[0,2866,2868],[0,2869,2874],[0,2876,2885],[0,2887,2889],[0,2891,2894],[0,2902,2904],[0,2908,2910],[0,2911,2916],[0,2918,2928],[0,2929,2930],[0,2946,2948],[0,2949,2955],[0,2958,2961],[0,2962,2966],[0,2969,2971],[0,2972,2973],[0,2974,2976],[0,2979,2981],[0,2984,2987],[0,2990,3002],[0,3006,3011],[0,3014,3017],[0,3018,3022],[0,3024,3025],[0,3031,3032],[0,3046,3056],[0,3072,3085],[0,3086,3089],[0,3090,3113],[0,3114,3130],[0,3133,3141],[0,3142,3145],[0,3146,3150],[0,3157,3159],[0,3160,3163],[0,3168,3172],[0,3174,3184],[0,3200,3204],[0,3205,3213],[0,3214,3217],[0,3218,3241],[0,3242,3252],[0,3253,3258],[0,3260,3269],[0,3270,3273],[0,3274,3278],[0,3285,3287],[0,3294,3295],[0,3296,3300],[0,3302,3312],[0,3313,3315],[0,3328,3332],[0,3333,3341],[0,3342,3345],[0,3346,3397],[0,3398,3401],[0,3402,3407],[0,3412,3416],[0,3423,3428],[0,3430,3440],[0,3450,3456],[0,3458,3460],[0,3461,3479],[0,3482,3506],[0,3507,3516],[0,3517,3518],[0,3520,3527],[0,3530,3531],[0,3535,3541],[0,3542,3543],[0,3544,3552],[0,3558,3568],[0,3570,3572],[0,3585,3643],[0,3648,3663],[0,3664,3674],[0,3713,3715],[0,3716,3717],[0,3718,3723],[0,3724,3748],[0,3749,3750],[0,3751,3774],[0,3776,3781],[0,3782,3783],[0,3784,3790],[0,3792,3802],[0,3804,3808],[0,3840,3841],[0,3864,3866],[0,3872,3882],[0,3893,3894],[0,3895,3896],[0,3897,3898],[0,3902,3912],[0,3913,3949],[0,3953,3973],[0,3974,3992],[0,3993,4029],[0,4038,4039],[0,vU,4170],[0,4176,4254],[0,4256,4294],[0,4295,4296],[0,4301,4302],[0,4304,4347],[0,4348,4681],[0,4682,4686],[0,4688,4695],[0,4696,4697],[0,4698,4702],[0,4704,4745],[0,4746,4750],[0,4752,4785],[0,4786,4790],[0,4792,4799],[0,4800,4801],[0,4802,4806],[0,4808,4823],[0,4824,4881],[0,4882,4886],[0,4888,4955],[0,4957,4960],[0,4969,4978],[0,4992,5008],[0,5024,5110],[0,5112,5118],[0,5121,5741],[0,5743,bT],[0,5761,5787],[0,5792,5867],[0,5870,5881],[0,5888,5901],[0,5902,5909],[0,5920,5941],[0,5952,5972],[0,5984,5997],[0,5998,6001],[0,6002,6004],[0,6016,6100],[0,6103,6104],[0,6108,6110],[0,6112,6122],[0,6155,6158],[0,6160,6170],[0,6176,6265],[0,6272,6315],[0,6320,6390],[0,6400,6431],[0,6432,6444],[0,6448,6460],[0,6470,6510],[0,6512,6517],[0,6528,6572],[0,6576,6602],[0,6608,6619],[0,6656,6684],[0,6688,6751],[0,6752,6781],[0,6783,6794],[0,6800,6810],[0,6823,6824],[0,6832,6846],[0,6912,6988],[0,6992,7002],[0,7019,7028],[0,7040,7156],[0,7168,7224],[0,7232,7242],[0,7245,7294],[0,7296,7305],[0,7312,7355],[0,7357,7360],[0,7376,7379],[0,7380,7419],[0,7424,7674],[0,7675,7958],[0,7960,7966],[0,7968,8006],[0,8008,8014],[0,8016,8024],[0,8025,8026],[0,8027,8028],[0,8029,8030],[0,8031,8062],[0,8064,8117],[0,8118,8125],[0,8126,8127],[0,8130,8133],[0,8134,8141],[0,8144,8148],[0,8150,8156],[0,8160,8173],[0,8178,8181],[0,8182,8189],[0,QU,xU],[0,8255,8257],[0,8276,8277],[0,$8,8306],[0,ad,8320],[0,8336,8349],[0,8400,8413],[0,8417,8418],[0,8421,8433],[0,Rd,8451],[0,J5,8456],[0,8458,B8],[0,o8,8470],[0,QB,8478],[0,Ud,wp],[0,T8,S8],[0,Hp,x8],[0,8490,8506],[0,8508,8512],[0,8517,8522],[0,h8,8527],[0,8544,8585],[0,11264,11311],[0,11312,11359],[0,11360,11493],[0,11499,11508],[0,11520,Q4],[0,W8,11560],[0,$4,11566],[0,11568,11624],[0,Y5,11632],[0,n5,11671],[0,11680,Np],[0,11688,P8],[0,11696,ep],[0,11704,M8],[0,11712,rd],[0,11720,Q5],[0,11728,Wp],[0,11736,11743],[0,11744,11776],[0,12293,12296],[0,12321,W4],[0,12337,12342],[0,12344,12349],[0,12353,12439],[0,12441,H5],[0,12449,Sd],[0,12540,12544],[0,12549,j5],[0,12593,12687],[0,12704,12731],[0,12784,12800],[0,13312,19894],[0,19968,40944],[0,40960,42125],[0,42192,42238],[0,42240,42509],[0,42512,42540],[0,42560,42608],[0,42612,td],[0,42623,42738],[0,42775,42784],[0,42786,42889],[0,42891,42944],[0,42946,42951],[0,Q8,43048],[0,43072,43124],[0,43136,43206],[0,43216,43226],[0,43232,43256],[0,W5,fd],[0,43261,43310],[0,43312,43348],[0,43360,43389],[0,43392,43457],[0,Up,43482],[0,43488,wd],[0,43520,43575],[0,43584,43598],[0,43600,43610],[0,43616,43639],[0,D8,43715],[0,43739,43742],[0,43744,43760],[0,43762,43767],[0,43777,43783],[0,43785,43791],[0,43793,43799],[0,43808,v5],[0,43816,y8],[0,43824,d5],[0,43868,_8],[0,43888,44011],[0,44012,44014],[0,44016,44026],[0,44032,55204],[0,55216,55239],[0,55243,55292],[0,63744,64110],[0,64112,64218],[0,64256,64263],[0,64275,64280],[0,Vp,r5],[0,64298,Td],[0,64312,sd],[0,i5,dp],[0,64320,jp],[0,64323,S5],[0,64326,64434],[0,64467,64830],[0,64848,64912],[0,64914,64968],[0,65008,65020],[0,65024,65040],[0,65056,65072],[0,65075,65077],[0,65101,65104],[0,65136,Dp],[0,65142,65277],[0,65296,65306],[0,65313,65339],[0,65343,K5],[0,65345,65371],[0,65382,65471],[0,65474,65480],[0,65482,65488],[0,65490,65496],[0,65498,65501],[0,il,g8],[0,65549,R8],[0,65576,Sp],[0,65596,A5],[0,65599,65614],[0,65616,65630],[0,65664,65787],[0,65856,65909],[0,66045,66046],[0,66176,66205],[0,66208,66257],[0,66272,66273],[0,66304,66336],[0,66349,66379],[0,66384,66427],[0,66432,66462],[0,66464,66500],[0,66504,w5],[0,66513,66518],[0,66560,66718],[0,66720,66730],[0,66736,66772],[0,66776,66812],[0,66816,66856],[0,66864,66916],[0,67072,67383],[0,67392,67414],[0,67424,67432],[0,67584,67590],[0,_d,E5],[0,67594,b5],[0,67639,67641],[0,cd,67645],[0,67647,67670],[0,67680,67703],[0,67712,67743],[0,67808,Od],[0,67828,67830],[0,67840,67862],[0,67872,67898],[0,67968,68024],[0,68030,68032],[0,Vd,68100],[0,68101,68103],[0,68108,kp],[0,68117,Md],[0,68121,68150],[0,68152,68155],[0,68159,68160],[0,68192,68221],[0,68224,68253],[0,68288,b4],[0,68297,68327],[0,68352,68406],[0,68416,68438],[0,68448,68467],[0,68480,68498],[0,68608,68681],[0,68736,68787],[0,68800,68851],[0,68864,68904],[0,68912,68922],[0,69376,69405],[0,w8,69416],[0,69424,69457],[0,69600,69623],[0,69632,69703],[0,69734,Op],[0,69759,69819],[0,69840,69865],[0,69872,69882],[0,69888,69941],[0,69942,69952],[0,q8,E8],[0,69968,70004],[0,up,70007],[0,70016,70085],[0,70089,70093],[0,70096,rp],[0,Dd,70109],[0,70144,pd],[0,70163,70200],[0,70206,70207],[0,70272,L8],[0,h5,hp],[0,70282,o5],[0,70287,sp],[0,70303,70313],[0,70320,70379],[0,70384,70394],[0,70400,J8],[0,70405,70413],[0,70415,70417],[0,70419,V8],[0,70442,Ap],[0,70450,Ld],[0,70453,70458],[0,70459,70469],[0,70471,70473],[0,70475,70478],[0,jd,70481],[0,70487,70488],[0,70493,70500],[0,70502,70509],[0,70512,70517],[0,70656,70731],[0,70736,70746],[0,xd,70752],[0,70784,L5],[0,N5,70856],[0,70864,70874],[0,71040,71094],[0,71096,71105],[0,71128,71134],[0,71168,71233],[0,t8,71237],[0,71248,71258],[0,71296,71353],[0,71360,71370],[0,71424,71451],[0,71453,71468],[0,71472,71482],[0,71680,71739],[0,71840,71914],[0,71935,71936],[0,72096,72104],[0,72106,72152],[0,72154,U8],[0,V4,72165],[0,dd,72255],[0,72263,72264],[0,k5,72346],[0,m8,72350],[0,72384,72441],[0,72704,l5],[0,72714,72759],[0,72760,72769],[0,72784,72794],[0,72818,72848],[0,72850,72872],[0,72873,72887],[0,72960,np],[0,72968,I5],[0,72971,73015],[0,73018,73019],[0,73020,73022],[0,73023,73032],[0,73040,73050],[0,73056,hd],[0,73063,z8],[0,73066,73103],[0,73104,73106],[0,73107,73113],[0,73120,73130],[0,73440,73463],[0,73728,74650],[0,74752,74863],[0,74880,75076],[0,77824,78895],[0,82944,83527],[0,92160,92729],[0,92736,92767],[0,92768,92778],[0,92880,92910],[0,92912,92917],[0,92928,92983],[0,92992,92996],[0,93008,93018],[0,93027,93048],[0,93053,93072],[0,93760,93824],[0,93952,94027],[0,F8,94088],[0,94095,94112],[0,94176,v8],[0,Zp,94180],[0,94208,100344],[0,100352,101107],[0,110592,110879],[0,110928,110931],[0,110948,110952],[0,110960,111356],[0,113664,113771],[0,113776,113789],[0,113792,113801],[0,113808,113818],[0,113821,113823],[0,119141,119146],[0,119149,119155],[0,119163,119171],[0,119173,119180],[0,119210,119214],[0,119362,119365],[0,119808,Z4],[0,119894,K8],[0,119966,119968],[0,Jd,119971],[0,119973,119975],[0,119977,i8],[0,119982,zp],[0,z5,O5],[0,119997,m5],[0,120005,Xp],[0,120071,120075],[0,120077,f8],[0,120086,T5],[0,120094,d8],[0,120123,Gp],[0,120128,ld],[0,$p,120135],[0,120138,Fp],[0,120146,120486],[0,120488,Ed],[0,120514,I8],[0,120540,a5],[0,120572,q4],[0,120598,fp],[0,120630,md],[0,120656,F5],[0,120688,Bd],[0,120714,c5],[0,120746,Nd],[0,120772,120780],[0,120782,120832],[0,121344,121399],[0,121403,121453],[0,121461,121462],[0,121476,121477],[0,121499,121504],[0,121505,121520],[0,122880,122887],[0,122888,122905],[0,122907,122914],[0,122915,122917],[0,122918,122923],[0,123136,123181],[0,123184,123198],[0,123200,123210],[0,Ip,123215],[0,123584,123642],[0,124928,125125],[0,125136,125143],[0,125184,125260],[0,125264,125274],[0,126464,U5],[0,126469,Pd],[0,126497,q5],[0,qp,126501],[0,cp,P5],[0,126505,vp],[0,126516,r8],[0,z4,u5],[0,e5,126524],[0,Z5,126531],[0,$5,Mp],[0,R5,g5],[0,gd,V5],[0,126541,j8],[0,126545,Pp],[0,gr,126549],[0,C5,Ad],[0,gp,k8],[0,c8,Yd],[0,H4,od],[0,ip,Cd],[0,126561,e8],[0,tp,126565],[0,126567,nd],[0,126572,xp],[0,126580,A8],[0,126585,Bp],[0,yp,Xd],[0,126592,f5],[0,126603,126620],[0,126625,Z8],[0,126629,x5],[0,126635,126652],[0,131072,173783],[0,173824,177973],[0,177984,178206],[0,178208,183970],[0,183984,191457],[0,194560,195102],[0,917760,918e3]],px0=[0,1,0],dx0=[0,0,[0,1,0],[0,1,0]],yx0=hU,mx0="end of input",kx0=wl,hx0="template literal part",_x0=wl,wx0=sU,Tx0=hU,Sx0=wl,Ex0=_a,gx0=wl,Ax0=wv,Px0=wl,Cx0=ja,Nx0="an",Rx0=Nt,Ox0=Mt,Ix0=[0,[11,"token `",[2,0,[12,96,0]]],"token `%s`"],Lx0="{",Mx0=G8,Dx0="{|",jx0="|}",Ux0=ZM,Bx0=KS,Yx0="[",Xx0="]",Jx0=PT,Vx0=qM,zx0=ic,Kx0="=>",Zx0="...",Wx0=Cj,$x0=HM,Qx0=da,Fx0=s8,Hx0=Po,qx0=G3,Gx0=Me,bx0=Be,xr0=lv,rr0=Ue,er0=yd,tr0=pl,nr0=Qp,ur0=Tp,ir0=sl,fr0=ma,cr0=_v,sr0=Os,or0=Cs,vr0=Le,ar0=bp,lr0=t5,pr0=Re,dr0=pv,yr0=ed,mr0=Yp,kr0=N8,hr0=W3,_r0=Bc,wr0=De,Tr0=Kp,Sr0=av,Er0=cl,gr0=Ps,Ar0=Is,Pr0=ll,Cr0=p8,Nr0=D2,Rr0=Oa,Or0=Tv,Ir0=G2,Lr0=u8,Mr0=Sl,Dr0=F3,jr0=V3,Ur0=B2,Br0=Oe,Yr0=el,Xr0=fi,Jr0=Yh,Vr0=Fh,zr0=Co,Kr0=Pv,Zr0="%checks",Wr0=gB,$r0=CD,Qr0=jU,Fr0=iY,Hr0=Bj,qr0=hD,Gr0=VM,br0=dY,x10=pj,r10=TD,e10=TY,t10=PD,n10=Gj,u10=lY,i10=tB,f10=Y_,c10="?.",s10=km,o10=eB,v10=Iv,a10=Sj,l10=mY,p10=EY,d10=O8,y10=J4,m10=yD,k10=HD,h10=pD,_10=QD,w10=LD,T10=RU,S10=ZT,E10=b3,g10=sD,A10=AD,P10=$M,C10=js,N10=Lt,R10=q2,O10=PB,I10=zD,L10=GD,M10=KD,D10=aB,j10=zB,U10=Mj,B10=hx,Y10=y5,X10=_p,J10=ce,V10=_a,z10=wv,K10=ja,Z10=Is,W10=wx,$10=B5,Q10=X8,F10=vd,H10=Y8,q10=Ea,G10=Vj,b10=ml,x20=ka,r20=UU,e20=oj,t20=J3,n20=J3,u20=yY,i20=J3,f20=J3,c20=G8,s20=G8,o20=yY,v20=q2,a20=q2,l20=xl,p20=D5,d20="T_LCURLY",y20="T_RCURLY",m20="T_LCURLYBAR",k20="T_RCURLYBAR",h20="T_LPAREN",_20="T_RPAREN",w20="T_LBRACKET",T20="T_RBRACKET",S20="T_SEMICOLON",E20="T_COMMA",g20="T_PERIOD",A20="T_ARROW",P20="T_ELLIPSIS",C20="T_AT",N20="T_POUND",R20="T_FUNCTION",O20="T_IF",I20="T_IN",L20="T_INSTANCEOF",M20="T_RETURN",D20="T_SWITCH",j20="T_THIS",U20="T_THROW",B20="T_TRY",Y20="T_VAR",X20="T_WHILE",J20="T_WITH",V20="T_CONST",z20="T_LET",K20="T_NULL",Z20="T_FALSE",W20="T_TRUE",$20="T_BREAK",Q20="T_CASE",F20="T_CATCH",H20="T_CONTINUE",q20="T_DEFAULT",G20="T_DO",b20="T_FINALLY",xe0="T_FOR",re0="T_CLASS",ee0="T_EXTENDS",te0="T_STATIC",ne0="T_ELSE",ue0="T_NEW",ie0="T_DELETE",fe0="T_TYPEOF",ce0="T_VOID",se0="T_ENUM",oe0="T_EXPORT",ve0="T_IMPORT",ae0="T_SUPER",le0="T_IMPLEMENTS",pe0="T_INTERFACE",de0="T_PACKAGE",ye0="T_PRIVATE",me0="T_PROTECTED",ke0="T_PUBLIC",he0="T_YIELD",_e0="T_DEBUGGER",we0="T_DECLARE",Te0="T_TYPE",Se0="T_OPAQUE",Ee0="T_OF",ge0="T_ASYNC",Ae0="T_AWAIT",Pe0="T_CHECKS",Ce0="T_RSHIFT3_ASSIGN",Ne0="T_RSHIFT_ASSIGN",Re0="T_LSHIFT_ASSIGN",Oe0="T_BIT_XOR_ASSIGN",Ie0="T_BIT_OR_ASSIGN",Le0="T_BIT_AND_ASSIGN",Me0="T_MOD_ASSIGN",De0="T_DIV_ASSIGN",je0="T_MULT_ASSIGN",Ue0="T_EXP_ASSIGN",Be0="T_MINUS_ASSIGN",Ye0="T_PLUS_ASSIGN",Xe0="T_NULLISH_ASSIGN",Je0="T_AND_ASSIGN",Ve0="T_OR_ASSIGN",ze0="T_ASSIGN",Ke0="T_PLING_PERIOD",Ze0="T_PLING_PLING",We0="T_PLING",$e0="T_COLON",Qe0="T_OR",Fe0="T_AND",He0="T_BIT_OR",qe0="T_BIT_XOR",Ge0="T_BIT_AND",be0="T_EQUAL",xt0="T_NOT_EQUAL",rt0="T_STRICT_EQUAL",et0="T_STRICT_NOT_EQUAL",tt0="T_LESS_THAN_EQUAL",nt0="T_GREATER_THAN_EQUAL",ut0="T_LESS_THAN",it0="T_GREATER_THAN",ft0="T_LSHIFT",ct0="T_RSHIFT",st0="T_RSHIFT3",ot0="T_PLUS",vt0="T_MINUS",at0="T_DIV",lt0="T_MULT",pt0="T_EXP",dt0="T_MOD",yt0="T_NOT",mt0="T_BIT_NOT",kt0="T_INCR",ht0="T_DECR",_t0="T_EOF",wt0="T_ANY_TYPE",Tt0="T_MIXED_TYPE",St0="T_EMPTY_TYPE",Et0="T_NUMBER_TYPE",gt0="T_BIGINT_TYPE",At0="T_STRING_TYPE",Pt0="T_VOID_TYPE",Ct0="T_SYMBOL_TYPE",Nt0="T_UNKNOWN_TYPE",Rt0="T_NEVER_TYPE",Ot0="T_UNDEFINED_TYPE",It0="T_KEYOF",Lt0="T_READONLY",Mt0="T_INFER",Dt0="T_IS",jt0="T_ASSERTS",Ut0=xj,Bt0=xj,Yt0="T_NUMBER",Xt0="T_BIGINT",Jt0="T_STRING",Vt0="T_TEMPLATE_PART",zt0="T_IDENTIFIER",Kt0="T_REGEXP",Zt0="T_INTERPRETER",Wt0="T_ERROR",$t0="T_JSX_IDENTIFIER",Qt0=aY,Ft0=aY,Ht0="T_BOOLEAN_TYPE",qt0="T_NUMBER_SINGLETON_TYPE",Gt0="T_BIGINT_SINGLETON_TYPE",bt0=[0,iU,jS,9],xn0=[0,iU,qT,9],rn0=_j,en0="*/",tn0=_j,nn0="unreachable line_comment",un0="unreachable string_quote",in0="\\",fn0="unreachable template_part",cn0=`\r +`,sn0=kT,on0="unreachable regexp_class",vn0=jB,an0="unreachable regexp_body",ln0=hx,pn0=hx,dn0=hx,yn0=hx,mn0=AB,kn0="{'>'}",hn0=b3,_n0="{'}'}",wn0=G8,Tn0=So,Sn0=PT,En0=J4,gn0=AB,An0=So,Pn0=PT,Cn0=J4,Nn0="unreachable type_token wholenumber",Rn0="unreachable type_token wholebigint",On0="unreachable type_token floatbigint",In0="unreachable type_token scinumber",Ln0="unreachable type_token scibigint",Mn0="unreachable type_token hexnumber",Dn0="unreachable type_token hexbigint",jn0="unreachable type_token legacyoctnumber",Un0="unreachable type_token octnumber",Bn0="unreachable type_token octbigint",Yn0="unreachable type_token binnumber",Xn0="unreachable type_token bigbigint",Jn0="unreachable type_token",Vn0=MB,zn0=[11,1],Kn0=[11,0],Zn0="unreachable template_tail",Wn0=hx,$n0=hx,Qn0="unreachable jsx_child",Fn0="unreachable jsx_tag",Hn0=[0,SD],qn0=[0,913],Gn0=[0,ha],bn0=[0,Eh],x70=[0,FD],r70=[0,cY],e70=[0,8747],t70=[0,SB],n70=[0,916],u70=[0,8225],i70=[0,935],f70=[0,_U],c70=[0,914],s70=[0,XU],o70=[0,$D],v70=[0,FB],a70=[0,915],l70=[0,nY],p70=[0,919],d70=[0,917],y70=[0,RR],m70=[0,yB],k70=[0,DD],h70=[0,924],_70=[0,923],w70=[0,922],T70=[0,kY],S70=[0,921],E70=[0,tj],g70=[0,qT],A70=[0,GM],P70=[0,GC],C70=[0,927],N70=[0,937],R70=[0,oY],O70=[0,vE],I70=[0,bD],L70=[0,338],M70=[0,352],D70=[0,929],j70=[0,936],U70=[0,8243],B70=[0,928],Y70=[0,934],X70=[0,sB],J70=[0,WM],V70=[0,933],z70=[0,VU],K70=[0,lB],Z70=[0,HB],W70=[0,920],$70=[0,932],Q70=[0,tD],F70=[0,bj],H70=[0,Wj],q70=[0,LU],G70=[0,918],b70=[0,376],xu0=[0,nU],ru0=[0,926],eu0=[0,DU],tu0=[0,$B],nu0=[0,925],uu0=[0,39],iu0=[0,8736],fu0=[0,8743],cu0=[0,38],su0=[0,945],ou0=[0,8501],vu0=[0,Aa],au0=[0,8226],lu0=[0,zj],pu0=[0,946],du0=[0,8222],yu0=[0,MU],mu0=[0,vY],ku0=[0,8776],hu0=[0,CB],_u0=[0,8773],wu0=[0,9827],Tu0=[0,rj],Su0=[0,967],Eu0=[0,qj],gu0=[0,id],Au0=[0,pU],Pu0=[0,ET],Cu0=[0,8595],Nu0=[0,8224],Ru0=[0,8659],Ou0=[0,Nj],Iu0=[0,8746],Lu0=[0,8629],Mu0=[0,p5],Du0=[0,8745],ju0=[0,8195],Uu0=[0,8709],Bu0=[0,_Y],Yu0=[0,SY],Xu0=[0,Ij],Ju0=[0,b8],Vu0=[0,9830],zu0=[0,8707],Ku0=[0,8364],Zu0=[0,JB],Wu0=[0,wa],$u0=[0,951],Qu0=[0,8801],Fu0=[0,949],Hu0=[0,8194],qu0=[0,8805],Gu0=[0,947],bu0=[0,8260],xi0=[0,ND],ri0=[0,AU],ei0=[0,jS],ti0=[0,8704],ni0=[0,wT],ui0=[0,ZU],ii0=[0,8230],fi0=[0,9829],ci0=[0,8596],si0=[0,8660],oi0=[0,62],vi0=[0,402],ai0=[0,948],li0=[0,Xj],pi0=[0,H8],di0=[0,8712],yi0=[0,lU],mi0=[0,953],ki0=[0,8734],hi0=[0,8465],_i0=[0,xY],wi0=[0,8220],Ti0=[0,8968],Si0=[0,8592],Ei0=[0,Bk],gi0=[0,10216],Ai0=[0,955],Pi0=[0,8656],Ci0=[0,954],Ni0=[0,60],Ri0=[0,8216],Oi0=[0,8249],Ii0=[0,xU],Li0=[0,9674],Mi0=[0,8727],Di0=[0,8970],ji0=[0,eU],Ui0=[0,8711],Bi0=[0,956],Yi0=[0,8722],Xi0=[0,dN],Ji0=[0,LR],Vi0=[0,8212],zi0=[0,lD],Ki0=[0,8804],Zi0=[0,957],Wi0=[0,KM],$i0=[0,8836],Qi0=[0,8713],Fi0=[0,Zj],Hi0=[0,8715],qi0=[0,8800],Gi0=[0,8853],bi0=[0,959],xf0=[0,969],rf0=[0,8254],ef0=[0,EB],tf0=[0,339],nf0=[0,LC],uf0=[0,qU],if0=[0,nh],ff0=[0,rl],cf0=[0,8855],sf0=[0,TS],of0=[0,Gr],vf0=[0,Lp],af0=[0,G4],lf0=[0,KB],pf0=[0,RD],df0=[0,982],yf0=[0,960],mf0=[0,966],kf0=[0,8869],hf0=[0,8240],_f0=[0,8706],wf0=[0,8744],Tf0=[0,8211],Sf0=[0,10217],Ef0=[0,8730],gf0=[0,8658],Af0=[0,34],Pf0=[0,968],Cf0=[0,8733],Nf0=[0,8719],Rf0=[0,961],Of0=[0,8971],If0=[0,pY],Lf0=[0,8476],Mf0=[0,8221],Df0=[0,8969],jf0=[0,8594],Uf0=[0,ug],Bf0=[0,JU],Yf0=[0,cB],Xf0=[0,8901],Jf0=[0,353],Vf0=[0,8218],zf0=[0,8217],Kf0=[0,8250],Zf0=[0,8835],Wf0=[0,8721],$f0=[0,8838],Qf0=[0,8834],Ff0=[0,9824],Hf0=[0,8764],qf0=[0,962],Gf0=[0,963],bf0=[0,8207],xc0=[0,952],rc0=[0,8756],ec0=[0,964],tc0=[0,l8],nc0=[0,8839],uc0=[0,QM],ic0=[0,dB],fc0=[0,Ba],cc0=[0,8657],sc0=[0,8482],oc0=[0,LT],vc0=[0,732],ac0=[0,Ia],lc0=[0,8201],pc0=[0,977],dc0=[0,QB],yc0=[0,Av],mc0=[0,965],kc0=[0,978],hc0=[0,UT],_c0=[0,lk],wc0=[0,jg],Tc0=[0,QU],Sc0=[0,8205],Ec0=[0,950],gc0=[0,$3],Ac0=[0,pN],Pc0=[0,sg],Cc0=[0,958],Nc0=[0,8593],Rc0=[0,aj],Oc0=[0,8242],Ic0=[0,pE],Lc0="unreachable regexp",Mc0="unreachable token wholenumber",Dc0="unreachable token wholebigint",jc0="unreachable token floatbigint",Uc0="unreachable token scinumber",Bc0="unreachable token scibigint",Yc0="unreachable token hexnumber",Xc0="unreachable token hexbigint",Jc0="unreachable token legacyoctnumber",Vc0="unreachable token legacynonoctnumber",zc0="unreachable token octnumber",Kc0="unreachable token octbigint",Zc0="unreachable token bignumber",Wc0="unreachable token bigint",$c0="unreachable token",Qc0=MB,Fc0=[7,"#!"],Hc0="expected ?",qc0="unreachable string_escape",Gc0=xe,bc0=K3,xs0=K3,rs0=xe,es0=GE,ts0=nB,ns0="n",us0="r",is0="t",fs0=WD,cs0=K3,ss0=So,os0=So,vs0="unreachable id_char",as0=So,ls0=So,ps0=K3,ds0=UD,ys0=Yj,ms0=nS,ks0=[24,"token ILLEGAL"],hs0=[0,[11,"the identifier `",[2,0,[12,96,0]]],"the identifier `%s`"],_s0=[0,1],ws0=[0,1],Ts0=hj,Ss0=hj,Es0=[0,[11,"an identifier. When exporting a ",[2,0,[11," as a named export, you must specify a ",[2,0,[11," name. Did you mean `export default ",[2,0,[11," ...`?",0]]]]]]],"an identifier. When exporting a %s as a named export, you must specify a %s name. Did you mean `export default %s ...`?"],gs0=mp,As0="Peeking current location when not available",Ps0=[0,"src/parser/parser_env.ml",351,9],Cs0="Internal Error: Tried to add_declared_private with outside of class scope.",Ns0="Internal Error: `exit_class` called before a matching `enter_class`",Rs0=hx,Os0=[0,0,0],Is0=[0,0,0],Ls0="Parser_env.Try.Rollback",Ms0=hx,Ds0=hx,js0=[0,B2,si,_f,dj,Lj,Vf,U2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Oi,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Ue,Rf,Ii,jc,Sf,Xf,xu,Iu,Be,ff,E7,qi,Fi,Ic,M7,qu,Sc,Me,k7,D7,xf,Tu,Uu,du,Ec,je,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Oc,wc,z7,Lu,Yc,yn,If,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ir,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,G2,I7,$f,yu,hf,p7,Ku,ou,Ei,D2,P7,s7,g7,Nt,Ou,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,H1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,ce,Mi,Rc,Of,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Re,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,yU,di,vB,ij,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,O7,Le,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],Us0=[0,B2,si,_f,Vf,U2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Oi,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Ue,Rf,Ii,jc,Sf,Xf,xu,Iu,Be,ff,E7,qi,Fi,Ic,M7,qu,Sc,Me,k7,D7,xf,Tu,Uu,du,Ec,je,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Oc,wc,z7,Lu,Yc,yn,If,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ir,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,G2,I7,$f,yu,hf,p7,Ku,ou,Ei,D2,P7,s7,g7,Nt,Ou,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,H1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,ce,Mi,Rc,Of,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Re,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,O7,Le,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],Bs0=[0,Ic,Vn,ei,Ou,Kn,O7,Uc,qf,li,r7,$u,Jc,sc,Be,nu,Qf,df,pf,lc,a7,I7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Nt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Iu,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,If,Cf,$c,d7,_i,su,zf,uu,F7,oi,je,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,U2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,ce,G7,wi,B2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Oc,ec,qc,ir,D2,Me,C7,Oi,ff,H7,Ue,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,Of,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,H1,Lu,nc,xi,Qi,zn,eu,Fi,Re,$n,Gu,fu,af,ac,Ii,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Le,Mf,G2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],Ys0=[0,Ic,Vn,ei,Ou,Kn,O7,Uc,qf,li,r7,$u,Jc,sc,Be,nu,Qf,df,pf,lc,a7,I7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Nt,Vf,Lj,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Iu,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,If,Cf,$c,d7,vB,_i,su,zf,uu,F7,oi,je,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,U2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,ce,G7,wi,B2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Oc,ec,qc,ir,D2,Me,C7,Oi,ff,H7,Ue,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,ij,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,yU,Df,Hc,Rc,N7,zc,dj,Of,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,H1,Lu,nc,xi,Qi,zn,eu,Fi,Re,$n,Gu,fu,af,ac,Ii,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Le,Mf,G2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],Xs0=da,Js0=s8,Vs0=Po,zs0=G3,Ks0=Me,Zs0=Be,Ws0=lv,$s0=Ue,Qs0=yd,Fs0=pl,Hs0=Qp,qs0=Tp,Gs0=sl,bs0=ma,xo0=_v,ro0=Os,eo0=Cs,to0=Le,no0=bp,uo0=t5,io0=Re,fo0=pv,co0=ed,so0=Yp,oo0=N8,vo0=W3,ao0=Bc,lo0=De,po0=Kp,do0=av,yo0=cl,mo0=Ps,ko0=Is,ho0=ll,_o0=p8,wo0=D2,To0=Oa,So0=Tv,Eo0=G2,go0=u8,Ao0=Sl,Po0=F3,Co0=V3,No0=B2,Ro0=Oe,Oo0=el,Io0=fi,Lo0=Yh,Mo0=Fh,Do0=Co,jo0=Pv,Uo0=y5,Bo0=_p,Yo0=ce,Xo0=_a,Jo0=wv,Vo0=ja,zo0=Is,Ko0=wx,Zo0=B5,Wo0=X8,$o0=vd,Qo0=Y8,Fo0=Ea,Ho0=ml,qo0=ka,Go0=xl,bo0=D5,xv0=[0,mp],rv0=hx,ev0=[0,1],tv0=[0,Ta,1416,6],nv0=[0,Ta,1419,6],uv0=[0,Ta,1522,8],iv0=[0,1],fv0=[0,Ta,1539,8],cv0="Can not have both `static` and `proto`",sv0=De,ov0=BN,vv0=[0,0,0,0],av0=[0,0],lv0=[0,[0,0,0,0,0]],pv0="You should only call render_type after making sure the next token is a renders variant",dv0=ml,yv0=ka,mv0=[0,"a number literal type"],kv0=[0,0],hv0=_o,_v0=[0,0],wv0=[0,"a type"],Tv0=[0,0],Sv0=[0,0],Ev0=[17,1],gv0=[17,0],Av0=[0,Ta,TS,15],Pv0=[0,Ta,vE,15],Cv0=Lt,Nv0=Lt,Rv0=X5,Ov0=kl,Iv0=[0,[11,"Failure while looking up ",[2,0,[11,". Index: ",[4,0,0,0,[11,". Length: ",[4,0,0,0,[12,46,0]]]]]]],"Failure while looking up %s. Index: %d. Length: %d."],Lv0=[0,0,0,0],Mv0="Offset_utils.Offset_lookup_failed",Dv0=y1,jv0=Jj,Uv0=kl,Bv0=X5,Yv0=IU,Xv0=kl,Jv0=X5,Vv0=Im,zv0=Og,Kv0="normal",Zv0=fi,Wv0="jsxTag",$v0="jsxChild",Qv0="template",Fv0=sU,Hv0="context",qv0=fi,Gv0=[6,0],bv0=[0,0],xa0=[0,1],ra0=[0,4],ea0=[0,2],ta0=[0,3],na0=[0,0],ua0=[0,0,0,0,0,0],ia0=_o,fa0=[0,75],ca0=[0,hx,0],sa0=vn,oa0=[0,75],va0=[0,75],aa0=da,la0=[0,hx,0],pa0=[0,0,0],da0=[0,0,0],ya0=[0,83],ma0=q2,ka0=q2,ha0=[0,"a regular expression"],_a0=hx,wa0=hx,Ta0=hx,Sa0=[0,"src/parser/expression_parser.ml",1388,17],Ea0=[0,"a template literal part"],ga0=[0,[0,hx,hx],1],Aa0=[0,0],Pa0=K3,Ca0=UD,Na0=nS,Ra0=nS,Oa0=Yj,Ia0=[0,75],La0=[0,1],Ma0=[0,1],Da0=[0,1],ja0=[0,1],Ua0=[0,1],Ba0=Ca,Ya0=av,Xa0=[0,"the identifier `target`"],Ja0=[0,0],Va0=D2,za0=hl,Ka0=hl,Za0=Oa,Wa0=[0,"either a call or access of `super`"],$a0=Oa,Qa0=[0,1],Fa0=[0,0],Ha0=[0,1],qa0=[0,0],Ga0=[0,1],ba0=[0,0],x30=[0,2],r30=[0,3],e30=[0,7],t30=[0,6],n30=[0,4],u30=[0,5],i30=[0,6],f30=[0,[0,17,[0,2]]],c30=[0,[0,18,[0,3]]],s30=[0,[0,19,[0,4]]],o30=[0,[0,0,[0,5]]],v30=[0,[0,1,[0,5]]],a30=[0,[0,2,[0,5]]],l30=[0,[0,3,[0,5]]],p30=[0,[0,5,[0,6]]],d30=[0,[0,7,[0,6]]],y30=[0,[0,4,[0,6]]],m30=[0,[0,6,[0,6]]],k30=[0,[0,8,[0,7]]],h30=[0,[0,9,[0,7]]],_30=[0,[0,10,[0,7]]],w30=[0,[0,11,[0,8]]],T30=[0,[0,12,[0,8]]],S30=[0,[0,15,[0,9]]],E30=[0,[0,13,[0,9]]],g30=[0,[0,14,[1,10]]],A30=[0,[0,16,[0,9]]],P30=[0,[0,21,[0,6]]],C30=[0,[0,20,[0,6]]],N30=[20,km],R30=[0,[0,8]],O30=[0,[0,7]],I30=[0,[0,6]],L30=[0,[0,10]],M30=[0,[0,9]],D30=[0,[0,11]],j30=[0,[0,5]],U30=[0,[0,4]],B30=[0,[0,2]],Y30=[0,[0,3]],X30=[0,[0,1]],J30=[0,[0,0]],V30=[0,[0,12]],z30=[0,[0,13]],K30=[0,[0,14]],Z30=[0,0],W30=W3,$30=[0,hx,0],Q30="unexpected PrivateName in Property, expected a PrivateField",F30=[0,0,0],H30=Ao,q30="Must be one of the above",G30=[0,1],b30=[0,1],xl0=[0,1],rl0=Ao,el0=Ao,tl0=Y_,nl0="Internal Error: private name found in object props",ul0=[0,1],il0=[0,Fk,1854,21],fl0=[0,"a declaration, statement or export specifiers"],cl0=[0,86],sl0=vl,ol0=[0,hx,hx,0],vl0=[0,cD],al0="exports",ll0=[0,1],pl0=[0,1],dl0=[0,0],yl0=mB,ml0=[0,86],kl0=_o,hl0=[0,75],_l0=[0,0],wl0=[0,1],Tl0=[0,"the keyword `as`"],Sl0=[0,34],El0=[0,34],gl0=[0,0],Al0=[0,1],Pl0=[0,cD],Cl0=[0,"the keyword `from`"],Nl0=[0,hx,hx,0],Rl0=[0,xB],Ol0="Label",Il0=[0,xB],Ll0=[0,0,0],Ml0=[0,44],Dl0=[0,Fk,429,22],jl0=[0,43],Ul0=[0,Fk,448,22],Bl0=[0,0],Yl0="the token `;`",Xl0=[0,0],Jl0=[0,0],Vl0=YD,zl0=[0,mp],Kl0=YD,Zl0=[24,Nt],Wl0=Iv,$l0=ic,Ql0=[13,"JSX fragment"],Fl0=[0,un],Hl0=[1,un],ql0=[0,hx,hx,0],Gl0=[0,mp],bl0=hx,x60=[0,Fj],r60=[18,[0,0]],e60=[0,Fj],t60=[0,0,0,0],n60=kT,u60="Nooo: ",i60=pv,f60="Parser error: No such thing as an expression pattern!",c60=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],s60=[0,"src/parser/parser_flow.ml",p5,28],o60=[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],v60=Jj,a60=Og,l60=Tj,p60=$U,d60=$U,y60=Tj,m60=fi,k60=rD,h60=B1,_60=y1,w60="InterpreterDirective",T60="interpreter",S60="Program",E60=Tl,g60="BreakStatement",A60=Tl,P60="ContinueStatement",C60="DebuggerStatement",N60=Lv,R60="DeclareExportAllDeclaration",O60=Lv,I60=Aw,L60=FC,M60=pv,D60="DeclareExportDeclaration",j60=go,U60=B1,B60=br,Y60="DeclareModule",X60=F1,J60="DeclareModuleExports",V60=Sa,z60=B1,K60="DoWhileStatement",Z60="EmptyStatement",W60=zh,$60=FC,Q60="ExportDefaultDeclaration",F60=zh,H60=RT,q60=Lv,G60="ExportAllDeclaration",b60=zh,x40=Lv,r40=Aw,e40=FC,t40="ExportNamedDeclaration",n40="directive",u40=H1,i40="ExpressionStatement",f40=B1,c40="update",s40=Sa,o40=hu,v40="ForStatement",a40="each",l40=B1,p40=pn,d40=Ns,y40="ForInStatement",m40=Pv,k40=B1,h40=pn,_40=Ns,w40="ForOfStatement",T40=kB,S40=sC,E40=Sa,g40="IfStatement",A40=fi,P40=Ps,C40=y1,N40=ID,R40=Lv,O40=Aw,I40="ImportDeclaration",L40=B1,M40=Tl,D40="LabeledStatement",j40=H2,U40="ReturnStatement",B40="cases",Y40="discriminant",X40="SwitchStatement",J40=H2,V40="ThrowStatement",z40="finalizer",K40="handler",Z40=cn,W40="TryStatement",$40=B1,Q40=Sa,F40="WhileStatement",H40=B1,q40=rT,G40="WithStatement",b40=jj,xp0="ArrayExpression",rp0=j2,ep0=M5,tp0=H1,np0=je,up0=$E,ip0=Co,fp0=B1,cp0=an,sp0=br,op0="ArrowFunctionExpression",vp0=F1,ap0=H1,lp0="AsExpression",pp0=Y_,dp0=pn,yp0=Ns,mp0=Ra,kp0="AssignmentExpression",hp0=pn,_p0=Ns,wp0=Ra,Tp0="BinaryExpression",Sp0="CallExpression",Ep0=kB,gp0=sC,Ap0=Sa,Pp0="ConditionalExpression",Cp0=Lv,Np0="ImportExpression",Rp0=Sj,Op0=mY,Ip0=km,Lp0=pn,Mp0=Ns,Dp0=Ra,jp0="LogicalExpression",Up0="MemberExpression",Bp0=zP,Yp0=hl,Xp0="MetaProperty",Jp0=EP,Vp0=Rp,zp0=qB,Kp0="NewExpression",Zp0=wm,Wp0="ObjectExpression",$p0=it,Qp0="OptionalCallExpression",Fp0=it,Hp0="OptionalMemberExpression",qp0=YB,Gp0="SequenceExpression",bp0="Super",x80="ThisExpression",r80=F1,e80=H1,t80="TypeCastExpression",n80=F1,u80=H1,i80="SatisfiesExpression",f80=H1,c80="AsConstExpression",s80=H2,o80="AwaitExpression",v80=Lt,a80=js,l80=KD,p80=aB,d80=Ps,y80=Is,m80=cl,k80="matched above",h80=H2,_80=oD,w80=Ra,T80="UnaryExpression",S80=Mj,E80=zB,g80=oD,A80=H2,P80=Ra,C80="UpdateExpression",N80="delegate",R80=H2,O80="YieldExpression",I80="Unexpected FunctionDeclaration with BodyExpression",L80=j2,M80=M5,D80=H1,j80=je,U80=$E,B80=Co,Y80=B1,X80=an,J80=br,V80="FunctionDeclaration",z80="Unexpected FunctionExpression with BodyExpression",K80=j2,Z80=M5,W80=H1,$80=je,Q80=$E,F80=Co,H80=B1,q80=an,G80=br,b80="FunctionExpression",x50=it,r50=F1,e50=Ie,t50=Rg,n50=it,u50=F1,i50=Ie,f50="PrivateIdentifier",c50=it,s50=F1,o50=Ie,v50=Rg,a50=sC,l50=Sa,p50="SwitchCase",d50=B1,y50="param",m50="CatchClause",k50=B1,h50="BlockStatement",_50=go,w50=br,T50="DeclareVariable",S50=je,E50=br,g50="DeclareFunction",A50=Ej,P50=Tv,C50=Bc,N50=B1,R50=j2,O50=br,I50="DeclareClass",L50=j2,M50=Q_,D50=an,j50=mw,U50=an,B50=br,Y50="DeclareComponent",X50=j2,J50=Q_,V50=mw,z50=an,K50="ComponentTypeAnnotation",Z50=it,W50=F1,$50=Ie,Q50="ComponentTypeParameter",F50=B1,H50=br,q50="DeclareEnum",G50=Bc,b50=B1,xd0=j2,rd0=br,ed0="DeclareInterface",td0=y1,nd0=fi,ud0=RT,id0="ExportNamespaceSpecifier",fd0=pn,cd0=j2,sd0=br,od0="DeclareTypeAlias",vd0=pn,ad0=j2,ld0=br,pd0="TypeAlias",dd0="DeclareOpaqueType",yd0="OpaqueType",md0="supertype",kd0="impltype",hd0=j2,_d0=br,wd0="ClassDeclaration",Td0="ClassExpression",Sd0=kd,Ed0=Tv,gd0="superTypeParameters",Ad0="superClass",Pd0=j2,Cd0=B1,Nd0=br,Rd0=H1,Od0="Decorator",Id0=j2,Ld0=br,Md0="ClassImplements",Dd0=B1,jd0="ClassBody",Ud0=Ev,Bd0=nl,Yd0=Cv,Xd0=Da,Jd0=kd,Vd0=La,zd0=De,Kd0=go,Zd0=y1,Wd0=mv,$d0="MethodDefinition",Qd0=el,Fd0=kd,Hd0=U2,qd0=De,Gd0=La,bd0=F1,xy0=y1,ry0=mv,ey0=kj,ty0="Internal Error: Private name found in class prop",ny0=el,uy0=kd,iy0=U2,fy0=De,cy0=La,sy0=F1,oy0=y1,vy0=mv,ay0=kj,ly0=j2,py0=Q_,dy0=an,yy0=br,my0=B1,ky0="ComponentDeclaration",hy0=H2,_y0=Rm,wy0=pn,Ty0=Ns,Sy0=Jp,Ey0=CS,gy0=al,Ay0=Ie,Py0="ComponentParameter",Cy0=hu,Ny0=br,Ry0="EnumBigIntMember",Oy0=br,Iy0=dD,Ly0=hu,My0=br,Dy0="EnumStringMember",jy0=br,Uy0=dD,By0=hu,Yy0=br,Xy0="EnumNumberMember",Jy0=hu,Vy0=br,zy0="EnumBooleanMember",Ky0=q3,Zy0=Id,Wy0=tl,$y0="EnumBooleanBody",Qy0=q3,Fy0=Id,Hy0=tl,qy0="EnumNumberBody",Gy0=q3,by0=Id,x90=tl,r90="EnumStringBody",e90=q3,t90=tl,n90="EnumSymbolBody",u90=q3,i90=Id,f90=tl,c90="EnumBigIntBody",s90=B1,o90=br,v90="EnumDeclaration",a90=Bc,l90=B1,p90=j2,d90=br,y90="InterfaceDeclaration",m90=j2,k90=br,h90="InterfaceExtends",_90=F1,w90=wm,T90="ObjectPattern",S90=F1,E90=jj,g90="ArrayPattern",A90=pn,P90=Ns,C90=Jp,N90=F1,R90=Ie,O90=Rg,I90=H2,L90=Rm,M90=H2,D90=Rm,j90=pn,U90=Ns,B90=Jp,Y90=hu,X90=hu,J90=Cv,V90=Da,z90=uB,K90=La,Z90=CS,W90=nl,$90=go,Q90=y1,F90=mv,H90=wU,q90=H2,G90=pB,b90=pn,xm0=Ns,rm0=Jp,em0=La,tm0=CS,nm0=nl,um0=go,im0=y1,fm0=mv,cm0=wU,sm0=H2,om0=pB,vm0=jt,am0=y1,lm0=pa,pm0=jt,dm0=wv,ym0=y1,mm0=pa,km0=jt,hm0=y1,_m0=pa,wm0=Cs,Tm0=Os,Sm0=jt,Em0=y1,gm0=pa,Am0="flags",Pm0=yn,Cm0="regex",Nm0=jt,Rm0=y1,Om0=pa,Im0=jt,Lm0=y1,Mm0=pa,Dm0=YB,jm0="quasis",Um0="TemplateLiteral",Bm0="cooked",Ym0=jt,Xm0="tail",Jm0=y1,Vm0="TemplateElement",zm0="quasi",Km0="tag",Zm0="TaggedTemplateExpression",Wm0=pl,$m0=ma,Qm0=sl,Fm0=go,Hm0="declarations",qm0="VariableDeclaration",Gm0=hu,bm0=br,xk0="VariableDeclarator",rk0="plus",ek0=BD,tk0=Ea,nk0=Po,uk0=g_,ik0="in-out",fk0=go,ck0="Variance",sk0="AnyTypeAnnotation",ok0="MixedTypeAnnotation",vk0="EmptyTypeAnnotation",ak0="VoidTypeAnnotation",lk0="NullLiteralTypeAnnotation",pk0="SymbolTypeAnnotation",dk0="NumberTypeAnnotation",yk0="BigIntTypeAnnotation",mk0="StringTypeAnnotation",kk0="BooleanTypeAnnotation",hk0=F1,_k0="NullableTypeAnnotation",wk0="UnknownTypeAnnotation",Tk0="NeverTypeAnnotation",Sk0="UndefinedTypeAnnotation",Ek0=ka,gk0=F1,Ak0="parameterName",Pk0="TypePredicate",Ck0=j2,Nk0=mw,Rk0=M5,Ok0=lv,Ik0=an,Lk0="FunctionTypeAnnotation",Mk0=it,Dk0=F1,jk0=Ie,Uk0=JD,Bk0=it,Yk0=F1,Xk0=Ie,Jk0=JD,Vk0=[0,0,0,0,0],zk0="internalSlots",Kk0="callProperties",Zk0="indexers",Wk0=wm,$k0="exact",Qk0="inexact",Fk0="ObjectTypeAnnotation",Hk0=uB,qk0="There should not be computed object type property keys",Gk0=hu,bk0=Cv,xh0=Da,rh0=go,eh0=U2,th0=BN,nh0=De,uh0=it,ih0=nl,fh0=y1,ch0=mv,sh0="ObjectTypeProperty",oh0=H2,vh0="ObjectTypeSpreadProperty",ah0=U2,lh0=De,ph0=y1,dh0=mv,yh0=br,mh0="ObjectTypeIndexer",kh0=De,hh0=y1,_h0="ObjectTypeCallProperty",wh0=it,Th0=U2,Sh0="sourceType",Eh0="propType",gh0="keyTparam",Ah0="ObjectTypeMappedTypeProperty",Ph0=y1,Ch0=nl,Nh0=De,Rh0=it,Oh0=br,Ih0="ObjectTypeInternalSlot",Lh0=B1,Mh0=Bc,Dh0="InterfaceTypeAnnotation",jh0=Hj,Uh0="ArrayTypeAnnotation",Bh0="falseType",Yh0="trueType",Xh0="extendsType",Jh0="checkType",Vh0="ConditionalTypeAnnotation",zh0="typeParameter",Kh0="InferTypeAnnotation",Zh0=br,Wh0=ZB,$h0="QualifiedTypeIdentifier",Qh0=j2,Fh0=br,Hh0="GenericTypeAnnotation",qh0="indexType",Gh0="objectType",bh0="IndexedAccessType",x_0=it,r_0="OptionalIndexedAccessType",e_0=pg,t_0="UnionTypeAnnotation",n_0=pg,u_0="IntersectionTypeAnnotation",i_0=Rp,f_0=H2,c_0="TypeofTypeAnnotation",s_0=br,o_0=ZB,v_0="QualifiedTypeofIdentifier",a_0=H2,l_0="KeyofTypeAnnotation",p_0=rr,d_0=UU,y_0=oj,m_0=F1,k_0=Ra,h_0="TypeOperator",__0=H2,w_0="ReadOnlyTypeAnnotation",T_0="elementTypes",S_0="TupleTypeAnnotation",E_0=it,g_0=U2,A_0=Hj,P_0=Tl,C_0="TupleTypeLabeledElement",N_0=F1,R_0=Tl,O_0="TupleTypeSpreadElement",I_0=jt,L_0=y1,M_0="StringLiteralTypeAnnotation",D_0=jt,j_0=y1,U_0="NumberLiteralTypeAnnotation",B_0=jt,Y_0=y1,X_0="BigIntLiteralTypeAnnotation",J_0=Cs,V_0=Os,z_0=jt,K_0=y1,Z_0="BooleanLiteralTypeAnnotation",W_0="ExistsTypeAnnotation",$_0=F1,Q_0=ED,F_0=F1,H_0=ED,q_0=an,G_0="TypeParameterDeclaration",b_0="usesExtendsBound",xw0=pv,rw0=U2,ew0="bound",tw0=Ie,nw0="TypeParameter",uw0=an,iw0=wD,fw0=an,cw0=wD,sw0=Ca,ow0=oB,vw0="closingElement",aw0="openingElement",lw0="JSXElement",pw0="closingFragment",dw0=oB,yw0="openingFragment",mw0="JSXFragment",kw0=Rp,hw0="selfClosing",_w0="attributes",ww0=Ie,Tw0="JSXOpeningElement",Sw0="JSXOpeningFragment",Ew0=Ie,gw0="JSXClosingElement",Aw0="JSXClosingFragment",Pw0=y1,Cw0=Ie,Nw0="JSXAttribute",Rw0=H2,Ow0="JSXSpreadAttribute",Iw0="JSXEmptyExpression",Lw0=H1,Mw0="JSXExpressionContainer",Dw0=H1,jw0="JSXSpreadChild",Uw0=jt,Bw0=y1,Yw0="JSXText",Xw0=zP,Jw0=rT,Vw0="JSXMemberExpression",zw0=Ie,Kw0="namespace",Zw0="JSXNamespacedName",Ww0=Ie,$w0="JSXIdentifier",Qw0=RT,Fw0=al,Hw0="ExportSpecifier",qw0=al,Gw0="ImportDefaultSpecifier",bw0=al,xT0="ImportNamespaceSpecifier",rT0=ID,eT0=al,tT0="imported",nT0="ImportSpecifier",uT0="Line",iT0="Block",fT0=y1,cT0=y1,sT0="DeclaredPredicate",oT0="InferredPredicate",vT0=EP,aT0=Rp,lT0=qB,pT0=La,dT0=zP,yT0=rT,mT0="message",kT0=Og,hT0=IU,_T0=Im,wT0=Lv,TT0=kl,ST0=X5,ET0=[0,Cf,Df,ai,_7,Mf,b7,Ui,Su,dc,Y7,$i,jf,cn,$u,hc,Le,O7,tu,vf,Gf,N7,yi,Gc,Nc,n7,df,K7,Au,Wi,tf,Fc,F7,Ru,Si,sf,Ci,di,nc,Gi,au,d7,qc,W7,Gu,cf,Pc,hi,lf,xc,Hn,yc,_c,ef,Re,Oe,zu,Tf,Ac,Ki,T7,Bf,Zu,cc,kf,ac,Of,Rc,Mi,ce,Xi,t7,yf,nf,Cu,c7,ju,Vi,of,Cc,kc,Mu,Vu,af,w7,bn,Nf,m7,Qf,Z7,H1,Ti,xi,Gn,$7,y7,Yf,gf,G7,cu,Yi,Yu,Nu,pu,bu,oc,eu,zn,pc,S7,$n,B7,ti,ei,Uf,ii,wf,Kn,Ai,Wc,Hi,wu,gi,ku,Ou,Nt,g7,s7,P7,D2,Ei,ou,Ku,p7,hf,yu,$f,I7,G2,ni,r7,Kf,Zi,lu,bc,iu,_u,Vn,zi,Qu,Lc,lc,i7,Ef,Eu,ci,Kc,li,U7,o7,uu,qn,ec,rc,rf,fc,X7,Xu,Qn,ji,j7,Zn,vu,uf,ir,v7,pi,Bu,gc,ri,a7,Xc,Uc,Wu,Dc,Q7,Af,L7,Bi,Jf,qf,su,bi,Zc,pf,Vc,f7,vi,Pf,oi,sc,mi,nu,uc,u7,Fu,If,yn,Yc,Lu,z7,wc,Oc,R7,H7,Ju,l7,h7,Ji,Du,mc,tc,fu,Wf,$c,gu,zf,Tc,mu,je,Ec,du,Uu,Tu,xf,D7,k7,Me,Sc,qu,M7,Ic,Fi,qi,E7,ff,Be,Iu,xu,Xf,Sf,jc,Ii,Rf,Ue,Qc,mf,Qi,Pu,vc,Fn,x7,Pi,Ff,wi,Jc,A7,zc,_i,Wn,V7,Oi,bf,Hf,ru,C7,J7,ki,Hu,Mc,e7,q7,ui,Hc,Li,U2,Vf,_f,si,B2],gT0=[0,B2,si,_f,Vf,U2,Li,Hc,ui,q7,e7,Mc,Hu,ki,J7,C7,ru,Hf,bf,Oi,V7,Wn,_i,zc,A7,Jc,wi,Ff,Pi,x7,Fn,vc,Pu,Qi,mf,Qc,Ue,Rf,Ii,jc,Sf,Xf,xu,Iu,Be,ff,E7,qi,Fi,Ic,M7,qu,Sc,Me,k7,D7,xf,Tu,Uu,du,Ec,je,mu,Tc,zf,gu,$c,Wf,fu,tc,mc,Du,Ji,h7,l7,Ju,H7,R7,Oc,wc,z7,Lu,Yc,yn,If,Fu,u7,uc,nu,mi,sc,oi,Pf,vi,f7,Vc,pf,Zc,bi,su,qf,Jf,Bi,L7,Af,Q7,Dc,Wu,Uc,Xc,a7,ri,gc,Bu,pi,v7,ir,uf,vu,Zn,j7,ji,Qn,Xu,X7,fc,rf,rc,ec,qn,uu,o7,U7,li,Kc,ci,Eu,Ef,i7,lc,Lc,Qu,zi,Vn,_u,iu,bc,lu,Zi,Kf,r7,ni,G2,I7,$f,yu,hf,p7,Ku,ou,Ei,D2,P7,s7,g7,Nt,Ou,ku,gi,wu,Hi,Wc,Ai,Kn,wf,ii,Uf,ei,ti,B7,$n,S7,pc,zn,eu,oc,bu,pu,Nu,Yu,Yi,cu,G7,gf,Yf,y7,$7,Gn,xi,Ti,H1,Z7,Qf,m7,Nf,bn,w7,af,Vu,Mu,kc,Cc,of,Vi,ju,c7,Cu,nf,yf,t7,Xi,ce,Mi,Rc,Of,ac,kf,cc,Zu,Bf,T7,Ki,Ac,Tf,zu,Oe,Re,ef,_c,yc,Hn,xc,lf,hi,Pc,cf,Gu,W7,qc,d7,au,Gi,nc,di,Ci,sf,Si,Ru,F7,Fc,tf,Wi,Au,K7,df,n7,Nc,Gc,yi,N7,Gf,vf,tu,O7,Le,hc,$u,cn,jf,$i,Y7,dc,Su,Ui,b7,Mf,_7,ai,Df,Cf],AT0=[0,Ic,Vn,ei,Ou,Kn,O7,Uc,qf,li,r7,$u,Jc,sc,Be,nu,Qf,df,pf,lc,a7,I7,Qu,nf,Vi,si,R7,wu,Nu,l7,fc,Pc,gi,Cu,Bu,Nt,Vf,Yf,mc,Bf,vf,ti,Gf,Ef,Vu,mu,Wc,Yu,Iu,Bi,s7,qi,hf,yf,X7,gc,Wi,sf,If,Cf,$c,d7,_i,su,zf,uu,F7,oi,je,Vc,wf,Fu,pi,Kc,i7,ku,j7,_c,Ff,Cc,o7,ji,Uf,tc,_7,cc,w7,uf,Tu,Yc,ai,Xi,tu,Sc,U2,Tc,Ac,ru,D7,P7,Y7,pu,Qc,bc,K7,Q7,xu,ce,G7,wi,B2,Qn,mf,Ki,Wf,Hu,z7,Tf,Uu,dc,Mc,Ci,T7,Wu,ui,Lc,b7,Fn,Kf,ju,Gn,mi,m7,Xu,wc,y7,bf,x7,au,Li,vc,M7,Hf,E7,e7,Fc,$f,Yi,Si,Zn,ii,Gi,q7,di,Dc,rc,cf,Su,vu,Gc,Au,W7,Oc,ec,qc,ir,D2,Me,C7,Oi,ff,H7,Ue,Oe,Xc,g7,uc,Ti,zi,yn,hc,pc,c7,yu,Ru,Z7,B7,_u,Ai,J7,of,Ec,oc,ou,kc,bn,xc,Af,qu,Jf,p7,vi,Ji,Pi,bi,gu,f7,V7,kf,yi,Zu,jf,lu,Xf,t7,Pu,Hi,du,Ei,Zc,Nc,L7,Eu,tf,ni,Mi,A7,Df,Hc,Rc,N7,zc,Of,ci,iu,yc,rf,h7,ri,Zi,$7,qn,Wn,jc,Ui,lf,Ju,$i,H1,Lu,nc,xi,Qi,zn,eu,Fi,Re,$n,Gu,fu,af,ac,Ii,Sf,bu,Nf,ki,cu,u7,cn,Ku,n7,U7,Pf,S7,zu,k7,Mu,Le,Mf,G2,ef,_f,hi,xf,gf,Hn,Du,Rf,v7],PT0="Jsoo_runtime.Error.Exn",CT0=[0,0],NT0="use_strict",RT0=pg,OT0="esproposal_decorators",IT0="enums",LT0="components",MT0="Internal error: ";function L1(x){if(typeof x=="number")return 0;switch(x[0]){case 0:return[0,L1(x[1])];case 1:return[1,L1(x[1])];case 2:return[2,L1(x[1])];case 3:return[3,L1(x[1])];case 4:return[4,L1(x[1])];case 5:return[5,L1(x[1])];case 6:return[6,L1(x[1])];case 7:return[7,L1(x[1])];case 8:var r=x[1];return[8,r,L1(x[2])];case 9:var e=x[1];return[9,e,e,L1(x[3])];case 10:return[10,L1(x[1])];case 11:return[11,L1(x[1])];case 12:return[12,L1(x[1])];case 13:return[13,L1(x[1])];default:return[14,L1(x[1])]}}function ee(x,r){if(typeof x=="number")return r;switch(x[0]){case 0:return[0,ee(x[1],r)];case 1:return[1,ee(x[1],r)];case 2:return[2,ee(x[1],r)];case 3:return[3,ee(x[1],r)];case 4:return[4,ee(x[1],r)];case 5:return[5,ee(x[1],r)];case 6:return[6,ee(x[1],r)];case 7:return[7,ee(x[1],r)];case 8:var e=x[1];return[8,e,ee(x[2],r)];case 9:var t=x[2],u=x[1];return[9,u,t,ee(x[3],r)];case 10:return[10,ee(x[1],r)];case 11:return[11,ee(x[1],r)];case 12:return[12,ee(x[1],r)];case 13:return[13,ee(x[1],r)];default:return[14,ee(x[1],r)]}}function E1(x,r){if(typeof x=="number")return r;switch(x[0]){case 0:return[0,E1(x[1],r)];case 1:return[1,E1(x[1],r)];case 2:var e=x[1];return[2,e,E1(x[2],r)];case 3:var t=x[1];return[3,t,E1(x[2],r)];case 4:var u=x[3],i=x[2],f=x[1];return[4,f,i,u,E1(x[4],r)];case 5:var o=x[3],a=x[2],d=x[1];return[5,d,a,o,E1(x[4],r)];case 6:var k=x[3],T=x[2],g=x[1];return[6,g,T,k,E1(x[4],r)];case 7:var A=x[3],N=x[2],R=x[1];return[7,R,N,A,E1(x[4],r)];case 8:var O=x[3],M=x[2],L=x[1];return[8,L,M,O,E1(x[4],r)];case 9:var z=x[1];return[9,z,E1(x[2],r)];case 10:return[10,E1(x[1],r)];case 11:var V=x[1];return[11,V,E1(x[2],r)];case 12:var Z=x[1];return[12,Z,E1(x[2],r)];case 13:var $=x[2],i0=x[1];return[13,i0,$,E1(x[3],r)];case 14:var U=x[2],J=x[1];return[14,J,U,E1(x[3],r)];case 15:return[15,E1(x[1],r)];case 16:return[16,E1(x[1],r)];case 17:var Y=x[1];return[17,Y,E1(x[2],r)];case 18:var F=x[1];return[18,F,E1(x[2],r)];case 19:return[19,E1(x[1],r)];case 20:var n0=x[2],Q=x[1];return[20,Q,n0,E1(x[3],r)];case 21:var f0=x[1];return[21,f0,E1(x[2],r)];case 22:return[22,E1(x[1],r)];case 23:var s0=x[1];return[23,s0,E1(x[2],r)];default:var v0=x[2],o0=x[1];return[24,o0,v0,E1(x[3],r)]}}function fO(x,r,e){return x[1]===r?(x[1]=e,1):0}function Nx(x){throw q0([0,kn,x],1)}function y2(x){throw q0([0,uO,x],1)}function ny(x){return 0<=x?x:-x|0}var DT0=nD;function Qx(x,r){var e=Xx(x),t=Xx(r),u=S1(e+t|0);return rs(x,0,u,0,e),rs(r,0,u,e,t),g2(u)}function jT0(x){return x?gW:AW}function Fx(x,r){if(!x)return r;var e=x[1];return[0,e,Fx(x[2],r)]}fW(0);var UT0=GY(1),ts=GY(2);function BT0(x){for(var r=cW(0);;){if(!r)return 0;var e=r[2],t=r[1];try{es(t)}catch(f){var u=I1(f);if(u[1]!==eX)throw q0(u,0)}var r=e}}function jl(x,r){return xO(x,r,0,Xx(r))}function fX(x){return jl(ts,x),bY(ts,10),es(ts)}var cO=[0,BT0];function sO(x){return l(cO[1],0)}eO(fj,sO);var cX=yW(0)[1],Ul=(4*pW(0)|0)-1|0,YT0=[Gr,PW,Js(0)];function XT0(x){throw q0(YT0,1)}function uy(x,r){return r?[0,l(x,r[1])]:0}function sX(x){return 25>>0?x:x+bM|0}function ns(x){for(var r=0,e=x;;){if(!e)return r;var r=r+1|0,e=e[2]}}function Bl(x){return x?x[1]:Nx(jW)}function oX(x){return x?x[2]:Nx(DW)}function us(x,r){for(var e=x,t=r;;){if(!e)return t;var u=[0,e[1],t],e=e[2],t=u}}function Ax(x){return us(x,0)}function Yl(x){if(!x)return 0;var r=x[1];return Fx(r,Yl(x[2]))}function _n(x,r){if(!r)return 0;var e=r[2],t=l(x,r[1]);return[0,t,_n(x,e)]}function iy(x,r){for(var e=0,t=r;;){if(!t)return e;var u=t[2],e=[0,l(x,t[1]),e],t=u}}function P2(x,r){for(var e=r;;){if(!e)return 0;var t=e[2];l(x,e[1]);var e=t}}function x2(x,r,e){for(var t=r,u=e;;){if(!u)return t;var i=u[2],t=p(x,t,u[1]),u=i}}function oO(x,r,e){if(!r)return e;var t=r[1];return p(x,t,oO(x,r[2],e))}function vX(x,r,e){for(var t=r,u=e;;){if(t){if(u){var i=u[2],f=t[2];p(x,t[1],u[1]);var t=f,u=i;continue}}else if(!u)return 0;return y2(MW)}}function vO(x,r){for(var e=r;;){if(!e)return 0;var t=e[2],u=l(x,e[1]);if(u)return u;var e=t}}function aO(x,r){for(var e=r;;){if(!e)return 0;var t=e[2],u=VY(e[1],x)===0?1:0;if(u)return u;var e=t}}function Xl(x){var r=0;return function(e){for(var t=r,u=e;;){if(!u)return Ax(t);var i=u[2],f=u[1];if(l(x,f)){var t=[0,f,t],u=i;continue}var u=i}}}function jv(x,r){var e=S1(x);return JZ(e,0,x,r),e}function aX(x){var r=vt(x),e=S1(r);return Us(x,0,e,0,r),e}function lX(x,r,e){if(0<=r&&0<=e&&(vt(x)-e|0)>=r){var t=S1(e);return Us(x,r,t,0,e),t}return y2(YW)}function Za(x,r,e){return g2(lX(x,r,e))}function pX(x,r,e,t,u){return 0<=u&&0<=r&&(vt(x)-u|0)>=r&&0<=t&&(vt(e)-u|0)>=t?Us(x,r,e,t,u):y2(BW)}function Zs(x,r,e,t,u){return 0<=u&&0<=r&&(Xx(x)-u|0)>=r&&0<=t&&(vt(e)-u|0)>=t?rs(x,r,e,t,u):y2(UW)}function fy(x,r){return g2(jv(x,r))}function m2(x,r,e){return g2(lX(xs(x),r,e))}function dX(x){var r=xs(x);if(vt(r)===0)var e=r;else{var t=aX(r);Zr(t,0,sX(se(r,0)));var e=t}return g2(e)}function yX(x,r){var e=Xx(x),t=e<=Xx(r)?1:0;if(!t)return t;for(var u=0;;){if(u===e)return 1;if(fx(r,u)!==fx(x,u))return 0;var u=u+1|0}}var JT0=Tx;function mX(x,r){var e=r.length-1-1|0,t=0;if(e>=0)for(var u=t;;){l(x,r[1+u]);var i=u+1|0;if(e!==u){var u=i;continue}break}return 0}function cy(x,r){var e=r.length-1;if(e===0)return[0];var t=Va(e,l(x,r[1])),u=e-1|0,i=1;if(u>=1)for(var f=i;;){t[1+f]=l(x,r[1+f]);var o=f+1|0;if(u!==f){var f=o;continue}break}return t}function Jl(x){if(!x)return[0];for(var r=0,e=x,t=x[2],u=x[1];;){if(e){var r=r+1|0,e=e[2];continue}for(var i=Va(r,u),f=1,o=t;;){if(!o)return i;var a=o[2];i[1+f]=o[1];var f=f+1|0,o=a}}}function kX(x){try{var r=[0,Nl(x)];return r}catch(t){var e=I1(t);if(e[1]===kn)return 0;throw q0(e,0)}}function lO(x){function r(H){return H?H[5]:0}function e(H,b,B,a0){var m0=r(H),P0=r(a0),D=P0<=m0?m0+1|0:P0+1|0;return[0,H,b,B,a0,D]}function t(H,b){return[0,0,H,b,0,1]}function u(H,b,B,a0){var m0=H?H[5]:0,P0=a0?a0[5]:0;if((P0+2|0)=P0){var X=P0<=m0?m0+1|0:P0+1|0;return[0,H,b,B,a0,X]}if(!a0)return y2(HW);var W0=a0[4],sx=a0[3],tx=a0[2],j0=a0[1],Px=r(j0);if(Px<=r(W0))return e(e(H,b,B,j0),tx,sx,W0);if(!j0)return y2(FW);var Ex=j0[3],Ix=j0[2],qx=j0[1],B0=e(j0[4],tx,sx,W0);return e(e(H,b,B,qx),Ix,Ex,B0)}var i=0;function f(H){return H?0:1}function o(H,b,B){if(!B)return[0,0,H,b,0,1];var a0=B[4],m0=B[3],P0=B[2],D=B[1],N0=B[5],X0=p(x[1],H,P0);if(X0===0)return m0===b?B:[0,D,H,b,a0,N0];if(0<=X0){var D0=o(H,b,a0);return a0===D0?B:u(D,P0,m0,D0)}var ox=o(H,b,D);return D===ox?B:u(ox,P0,m0,a0)}function a(H,b){for(var B=b;;){if(!B)throw q0(A2,1);var a0=B[4],m0=B[3],P0=B[1],D=p(x[1],H,B[2]);if(D===0)return m0;var N0=0<=D?a0:P0,B=N0}}function d(H,b){for(var B=b;;){if(!B)throw q0(A2,1);var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=m0;continue}for(var N0=a0,X0=P0,D0=D;;){if(!D0)return[0,N0,X0];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=V0;continue}var D0=b0}}}function k(H,b){for(var B=b;;){if(!B)return 0;var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=m0;continue}for(var N0=a0,X0=P0,D0=D;;){if(!D0)return[0,[0,N0,X0]];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=V0;continue}var D0=b0}}}function T(H,b){for(var B=b;;){if(!B)throw q0(A2,1);var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=D;continue}for(var N0=a0,X0=P0,D0=m0;;){if(!D0)return[0,N0,X0];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=b0;continue}var D0=V0}}}function g(H,b){for(var B=b;;){if(!B)return 0;var a0=B[2],m0=B[4],P0=B[3],D=B[1];if(!l(H,a0)){var B=D;continue}for(var N0=a0,X0=P0,D0=m0;;){if(!D0)return[0,[0,N0,X0]];var ox=D0[2],b0=D0[4],kx=D0[3],V0=D0[1];if(l(H,ox)){var N0=ox,X0=kx,D0=b0;continue}var D0=V0}}}function A(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[3],P0=B[1],D=p(x[1],H,B[2]);if(D===0)return[0,m0];var N0=0<=D?a0:P0,B=N0}}function N(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[1],P0=p(x[1],H,B[2]),D=P0===0?1:0;if(D)return D;var N0=0<=P0?a0:m0,B=N0}}function R(H){for(var b=H;;){if(!b)throw q0(A2,1);var B=b[1];if(!B)return[0,b[2],b[3]];var b=B}}function O(H){for(var b=H;;){if(!b)return 0;var B=b[1];if(!B)return[0,[0,b[2],b[3]]];var b=B}}function M(H){for(var b=H;;){if(!b)throw q0(A2,1);if(!b[4])return[0,b[2],b[3]];var b=b[4]}}function L(H){for(var b=H;;){if(!b)return 0;if(!b[4])return[0,[0,b[2],b[3]]];var b=b[4]}}function z(H){if(!H)return y2(zW);var b=H[1];if(!b)return H[4];var B=H[4],a0=H[3],m0=H[2];return u(z(b),m0,a0,B)}function V(H,b){if(!H)return b;if(!b)return H;var B=R(b),a0=B[2],m0=B[1];return u(H,m0,a0,z(b))}function Z(H,b){if(!b)return 0;var B=b[4],a0=b[3],m0=b[2],P0=b[1],D=p(x[1],H,m0);if(D===0)return V(P0,B);if(0<=D){var N0=Z(H,B);return B===N0?b:u(P0,m0,a0,N0)}var X0=Z(H,P0);return P0===X0?b:u(X0,m0,a0,B)}function $(H,b,B){if(!B){var a0=l(b,0);return a0?[0,0,H,a0[1],0,1]:0}var m0=B[4],P0=B[3],D=B[2],N0=B[1],X0=B[5],D0=p(x[1],H,D);if(D0===0){var ox=l(b,[0,P0]);if(!ox)return V(N0,m0);var b0=ox[1];return P0===b0?B:[0,N0,H,b0,m0,X0]}if(0<=D0){var kx=$(H,b,m0);return m0===kx?B:u(N0,D,P0,kx)}var V0=$(H,b,N0);return N0===V0?B:u(V0,D,P0,m0)}function i0(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[3],P0=B[2];i0(H,B[1]),p(H,P0,m0);var B=a0}}function U(H,b){if(!b)return 0;var B=b[5],a0=b[4],m0=b[3],P0=b[2],D=U(H,b[1]),N0=l(H,m0);return[0,D,P0,N0,U(H,a0),B]}function J(H,b){if(!b)return 0;var B=b[2],a0=b[5],m0=b[4],P0=b[3],D=J(H,b[1]),N0=p(H,B,P0);return[0,D,B,N0,J(H,m0),a0]}function Y(H,b,B){for(var a0=b,m0=B;;){if(!a0)return m0;var P0=a0[4],D=a0[3],N0=a0[2],X0=G0(H,N0,D,Y(H,a0[1],m0)),a0=P0,m0=X0}}function F(H,b){for(var B=b;;){if(!B)return 1;var a0=B[4],m0=B[1],P0=p(H,B[2],B[3]);if(P0){var D=F(H,m0);if(D){var B=a0;continue}var N0=D}else var N0=P0;return N0}}function n0(H,b){for(var B=b;;){if(!B)return 0;var a0=B[4],m0=B[1],P0=p(H,B[2],B[3]);if(P0)var D=P0;else{var N0=n0(H,m0);if(!N0){var B=a0;continue}var D=N0}return D}}function Q(H,b,B){if(!B)return t(H,b);var a0=B[4],m0=B[3],P0=B[2];return u(Q(H,b,B[1]),P0,m0,a0)}function f0(H,b,B){if(!B)return t(H,b);var a0=B[3],m0=B[2],P0=B[1];return u(P0,m0,a0,f0(H,b,B[4]))}function s0(H,b,B,a0){if(!H)return Q(b,B,a0);if(!a0)return f0(b,B,H);var m0=a0[5],P0=H[5],D=a0[4],N0=a0[3],X0=a0[2],D0=a0[1],ox=H[4],b0=H[3],kx=H[2],V0=H[1];return(m0+2|0)x[3])throw q0([0,wr,x$],1);if((e+r|0)<=x[3])return 0;throw q0([0,wr,r$],1)}}function at(x,r){var e=x[2];return x[3]<=e&&yO(x,1),Zr(x[1],e,r),x[2]=e+1|0,0}function _X(x,r,e,t){var u=e<0?1:0;if(u)var f=u;else var i=t<0?1:0,f=i||((Xx(r)-t|0)=u+G5>>>0&&(i=1):65<=u&&(i=1);else{var f=0;if(u===32)f=1;else if(43<=u)switch(u+Ym|0){case 5:if(t<(e+2|0)&&1>>0?33>>0&&(i=1):u===2&&(i=1),!i){var r=r+1|0;continue}var f=xs(x),o=[0,0],a=vt(f)-1|0,d=0;if(a>=0)for(var k=d;;){var T=se(f,k),g=0;if(32<=T){var A=T-34|0,N=0;if(58>>0?93>A&&(N=1):56>>0?g=1:N=1,N){var R=1;g=2}}else 11<=T?T===13&&(g=1):8<=T&&(g=1);switch(g){case 0:var R=4;break;case 1:var R=2;break}o[1]=o[1]+R|0;var O=k+1|0;if(a!==k){var k=O;continue}break}if(o[1]===vt(f))var M=aX(f);else{var L=S1(o[1]);o[1]=0;var z=vt(f)-1|0,V=0;if(z>=0)for(var Z=V;;){var $=se(f,Z),i0=0;if(35<=$)$===92?i0=2:Jr<=$?i0=1:i0=3;else if(32<=$)34<=$?i0=2:i0=3;else if(14<=$)i0=1;else switch($){case 8:Zr(L,o[1],92),o[1]++,Zr(L,o[1],98);break;case 9:Zr(L,o[1],92),o[1]++,Zr(L,o[1],Ri);break;case 10:Zr(L,o[1],92),o[1]++,Zr(L,o[1],U1);break;case 13:Zr(L,o[1],92),o[1]++,Zr(L,o[1],ct);break;default:i0=1}switch(i0){case 1:Zr(L,o[1],92),o[1]++,Zr(L,o[1],48+($/st|0)|0),o[1]++,Zr(L,o[1],48+(($/10|0)%10|0)|0),o[1]++,Zr(L,o[1],48+($%10|0)|0);break;case 2:Zr(L,o[1],92),o[1]++,Zr(L,o[1],$);break;case 3:Zr(L,o[1],$);break}o[1]++;var U=Z+1|0;if(z!==Z){var Z=U;continue}break}var M=L}var t=g2(M)}var J=Xx(t),Y=jv(J+2|0,34);return rs(t,0,Y,1,J),g2(Y)}}function gX(x,r){var e=ny(r),t=G$[1];switch(x[2]){case 0:var u=Zf;break;case 1:var u=Rt;break;case 2:var u=69;break;case 3:var u=nn;break;case 4:var u=71;break;case 5:var u=t;break;case 6:var u=Dt;break;case 7:var u=72;break;default:var u=70}var i=wX(16);switch(Qa(i,37),x[1]){case 0:break;case 1:Qa(i,43);break;default:Qa(i,32)}return 8<=x[2]&&Qa(i,35),Qa(i,46),C2(i,hx+e),Qa(i,u),SX(i)}function oy(x,r){if(13>x)return r;var e=[0,0],t=Xx(r)-1|0,u=0;if(t>=0)for(var i=u;;){9>=fx(r,i)+K1>>>0&&e[1]++;var f=i+1|0;if(t!==i){var i=f;continue}break}var o=e[1],a=S1(Xx(r)+((o-1|0)/3|0)|0),d=[0,0];function k(M){return Xa(a,d[1],M),d[1]++,0}var T=[0,((o-1|0)%3|0)+1|0],g=Xx(r)-1|0,A=0;if(g>=0)for(var N=A;;){var R=fx(r,N);9>>0||(T[1]===0&&(k(95),T[1]=3),T[1]+=-1),k(R);var O=N+1|0;if(g!==N){var N=O;continue}break}return g2(a)}function KT0(x,r){switch(x){case 1:var e=BQ;break;case 2:var e=YQ;break;case 4:var e=XQ;break;case 5:var e=JQ;break;case 6:var e=VQ;break;case 7:var e=zQ;break;case 8:var e=KQ;break;case 9:var e=ZQ;break;case 10:var e=WQ;break;case 11:var e=$Q;break;case 0:case 13:var e=QQ;break;case 3:case 14:var e=FQ;break;default:var e=HQ}return oy(x,Fd(e,r))}function ZT0(x,r){switch(x){case 1:var e=aQ;break;case 2:var e=lQ;break;case 4:var e=pQ;break;case 5:var e=dQ;break;case 6:var e=yQ;break;case 7:var e=mQ;break;case 8:var e=kQ;break;case 9:var e=hQ;break;case 10:var e=_Q;break;case 11:var e=wQ;break;case 0:case 13:var e=TQ;break;case 3:case 14:var e=SQ;break;default:var e=EQ}return oy(x,Fd(e,r))}function WT0(x,r){switch(x){case 1:var e=b$;break;case 2:var e=xQ;break;case 4:var e=rQ;break;case 5:var e=eQ;break;case 6:var e=tQ;break;case 7:var e=nQ;break;case 8:var e=uQ;break;case 9:var e=iQ;break;case 10:var e=fQ;break;case 11:var e=cQ;break;case 0:case 13:var e=sQ;break;case 3:case 14:var e=oQ;break;default:var e=vQ}return oy(x,Fd(e,r))}function $T0(x,r){switch(x){case 1:var e=gQ;break;case 2:var e=AQ;break;case 4:var e=PQ;break;case 5:var e=CQ;break;case 6:var e=NQ;break;case 7:var e=RQ;break;case 8:var e=OQ;break;case 9:var e=IQ;break;case 10:var e=LQ;break;case 11:var e=MQ;break;case 0:case 13:var e=DQ;break;case 3:case 14:var e=jQ;break;default:var e=UQ}return oy(x,$Z(e,r))}function Ws(x,r,e){function t(V){switch(x[1]){case 0:var Z=45;break;case 1:var Z=43;break;default:var Z=32}return zZ(e,r,Z)}function u(V){var Z=gZ(e);return Z===3?e<0?F$:H$:4<=Z?Q$:V}switch(x[2]){case 5:for(var i=FR(gX(x,r),e),f=0,o=Xx(i);;){if(f===o)var a=0;else{var d=O1(i,f)+Ov|0,k=0;if(23>>0?d===55&&(k=1):21>>0&&(k=1),!k){var f=f+1|0;continue}var a=1}var T=a?i:Qx(i,q$);return u(T)}case 6:return t(0);case 7:var g=xs(t(0)),A=vt(g);if(A===0)var N=g;else{var R=S1(A),O=A-1|0,M=0;if(O>=0)for(var L=M;;){Zr(R,L,sX(se(g,L)));var z=L+1|0;if(O!==L){var L=z;continue}break}var N=R}return g2(N);case 8:return u(t(0));default:return FR(gX(x,r),e)}}function vy(x,r,e,t,u,i,f){if(typeof t=="number"){if(typeof u=="number")return u?function(A,N){return Br(x,[4,r,Fa(A,p(i,f,N))],e)}:function(A){return Br(x,[4,r,p(i,f,A)],e)};var o=u[1];return function(A){return Br(x,[4,r,Fa(o,p(i,f,A))],e)}}if(t[0]===0){var a=t[2],d=t[1];if(typeof u=="number")return u?function(A,N){return Br(x,[4,r,Je(d,a,Fa(A,p(i,f,N)))],e)}:function(A){return Br(x,[4,r,Je(d,a,p(i,f,A))],e)};var k=u[1];return function(A){return Br(x,[4,r,Je(d,a,Fa(k,p(i,f,A)))],e)}}var T=t[1];if(typeof u=="number")return u?function(A,N,R){return Br(x,[4,r,Je(T,A,Fa(N,p(i,f,R)))],e)}:function(A,N){return Br(x,[4,r,Je(T,A,p(i,f,N))],e)};var g=u[1];return function(A,N){return Br(x,[4,r,Je(T,A,Fa(g,p(i,f,N)))],e)}}function _O(x,r,e,t,u){if(typeof t=="number")return function(a){return Br(x,[4,r,l(u,a)],e)};if(t[0]===0){var i=t[2],f=t[1];return function(a){return Br(x,[4,r,Je(f,i,l(u,a))],e)}}var o=t[1];return function(a,d){return Br(x,[4,r,Je(o,a,l(u,d))],e)}}function Zl(x,r,e,t){for(var u=r,i=e,f=t;;){if(typeof f=="number")return l(u,i);switch(f[0]){case 0:var o=f[1];return function(C0){return Br(u,[5,i,C0],o)};case 1:var a=f[1];return function(C0){var A0=0;if(40<=C0)if(C0===92)var U0=CW;else Jr<=C0?A0=1:A0=2;else if(32<=C0)if(39<=C0)var U0=NW;else A0=2;else if(14<=C0)A0=1;else switch(C0){case 8:var U0=RW;break;case 9:var U0=OW;break;case 10:var U0=IW;break;case 13:var U0=LW;break;default:A0=1}switch(A0){case 1:var Q0=S1(4);Zr(Q0,0,92),Zr(Q0,1,48+(C0/st|0)|0),Zr(Q0,2,48+((C0/10|0)%10|0)|0),Zr(Q0,3,48+(C0%10|0)|0);var U0=g2(Q0);break;case 2:var H=S1(1);Zr(H,0,C0);var U0=g2(H);break}var b=Xx(U0),B=jv(b+2|0,39);return rs(U0,0,B,1,b),Br(u,[4,i,g2(B)],a)};case 2:var d=f[2],k=f[1];return _O(u,i,d,k,function(C0){return C0});case 3:return _O(u,i,f[2],f[1],zT0);case 4:return vy(u,i,f[4],f[2],f[3],KT0,f[1]);case 5:return vy(u,i,f[4],f[2],f[3],ZT0,f[1]);case 6:return vy(u,i,f[4],f[2],f[3],WT0,f[1]);case 7:return vy(u,i,f[4],f[2],f[3],$T0,f[1]);case 8:var T=f[4],g=f[3],A=f[2],N=f[1];if(typeof A=="number"){if(typeof g=="number")return g?function(C0,A0){return Br(u,[4,i,Ws(N,C0,A0)],T)}:function(C0){return Br(u,[4,i,Ws(N,kO(N),C0)],T)};var R=g[1];return function(C0){return Br(u,[4,i,Ws(N,R,C0)],T)}}if(A[0]===0){var O=A[2],M=A[1];if(typeof g=="number")return g?function(C0,A0){return Br(u,[4,i,Je(M,O,Ws(N,C0,A0))],T)}:function(C0){return Br(u,[4,i,Je(M,O,Ws(N,kO(N),C0))],T)};var L=g[1];return function(C0){return Br(u,[4,i,Je(M,O,Ws(N,L,C0))],T)}}var z=A[1];if(typeof g=="number")return g?function(C0,A0,U0){return Br(u,[4,i,Je(z,C0,Ws(N,A0,U0))],T)}:function(C0,A0){return Br(u,[4,i,Je(z,C0,Ws(N,kO(N),A0))],T)};var V=g[1];return function(C0,A0){return Br(u,[4,i,Je(z,C0,Ws(N,V,A0))],T)};case 9:return _O(u,i,f[2],f[1],jT0);case 10:var i=[7,i],f=f[1];continue;case 11:var i=[2,i,f[1]],f=f[2];continue;case 12:var i=[3,i,f[1]],f=f[2];continue;case 13:var Z=f[3],$=f[2],i0=wX(16);hO(i0,$);var U=SX(i0);return function(C0){return Br(u,[4,i,U],Z)};case 14:var J=f[3],Y=f[2];return function(C0){var A0=C0[1],U0=o1(A0,L1(r2(Y)));if(typeof U0[2]=="number")return Br(u,i,E1(U0[1],J));throw q0(k2,1)};case 15:var F=f[1];return function(C0,A0){return Br(u,[6,i,function(U0){return p(C0,U0,A0)}],F)};case 16:var n0=f[1];return function(C0){return Br(u,[6,i,C0],n0)};case 17:var i=[0,i,f[1]],f=f[2];continue;case 18:var Q=f[1];if(Q[0]===0){var f0=f[2],s0=Q[1][1],v0=0,u=function(Q0,H,b){return function(B){return Br(H,[1,Q0,[0,B]],b)}}(i,u,f0),i=v0,f=s0;continue}var o0=f[2],c0=Q[1][1],T0=0,u=function(C0,A0,U0){return function(Q0){return Br(A0,[1,C0,[1,Q0]],U0)}}(i,u,o0),i=T0,f=c0;continue;case 19:throw q0([0,wr,j$],1);case 20:var E0=f[3],M0=[8,i,U$];return function(C0){return Br(u,M0,E0)};case 21:var Y0=f[2];return function(C0){return Br(u,[4,i,Fd(aU,C0)],Y0)};case 22:var rx=f[1];return function(C0){return Br(u,[5,i,C0],rx)};case 23:var g0=f[2],H0=f[1];if(typeof H0=="number")switch(H0){case 0:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 1:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 2:throw q0([0,wr,B$],1);default:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0])}switch(H0[0]){case 0:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 1:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 2:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 3:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 4:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 5:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 6:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 7:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 8:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);case 9:var t0=H0[2];return x<50?wO(x+1|0,u,i,t0,g0):d2(wO,[0,u,i,t0,g0]);case 10:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0]);default:return x<50?t1(x+1|0,u,i,g0):d2(t1,[0,u,i,g0])}default:var ex=f[3],xx=f[1],ax=l(f[2],0);return x<50?TO(x+1|0,u,i,ex,xx,ax):d2(TO,[0,u,i,ex,xx,ax])}}}function wO(x,r,e,t,u){if(typeof t=="number")return x<50?t1(x+1|0,r,e,u):d2(t1,[0,r,e,u]);switch(t[0]){case 0:var i=t[1];return function(V){return lt(r,e,i,u)};case 1:var f=t[1];return function(V){return lt(r,e,f,u)};case 2:var o=t[1];return function(V){return lt(r,e,o,u)};case 3:var a=t[1];return function(V){return lt(r,e,a,u)};case 4:var d=t[1];return function(V){return lt(r,e,d,u)};case 5:var k=t[1];return function(V){return lt(r,e,k,u)};case 6:var T=t[1];return function(V){return lt(r,e,T,u)};case 7:var g=t[1];return function(V){return lt(r,e,g,u)};case 8:var A=t[2];return function(V){return lt(r,e,A,u)};case 9:var N=t[3],R=t[2],O=o2(r2(t[1]),R);return function(V){return lt(r,e,ee(O,N),u)};case 10:var M=t[1];return function(V,Z){return lt(r,e,M,u)};case 11:var L=t[1];return function(V){return lt(r,e,L,u)};case 12:var z=t[1];return function(V){return lt(r,e,z,u)};case 13:throw q0([0,wr,Y$],1);default:throw q0([0,wr,X$],1)}}function t1(x,r,e,t){var u=[8,e,J$];return x<50?Zl(x+1|0,r,u,t):d2(Zl,[0,r,u,t])}function TO(x,r,e,t,u,i){if(u){var f=u[1];return function(a){return QT0(r,e,t,f,l(i,a))}}var o=[4,e,i];return x<50?Zl(x+1|0,r,o,t):d2(Zl,[0,r,o,t])}function Br(x,r,e){return tO(Zl(0,x,r,e))}function lt(x,r,e,t){return tO(wO(0,x,r,e,t))}function QT0(x,r,e,t,u){return tO(TO(0,x,r,e,t,u))}function $s(x,r){for(var e=r;;){if(typeof e=="number")return 0;switch(e[0]){case 0:var t=e[1],u=EX(e[2]);return $s(x,t),jl(x,u);case 1:var i=e[2],f=e[1];if(i[0]===0){var o=i[1];$s(x,f),jl(x,V$);var e=o;continue}var a=i[1];$s(x,f),jl(x,z$);var e=a;continue;case 6:var d=e[2];return $s(x,e[1]),l(d,x);case 7:return $s(x,e[1]),es(x);case 8:var k=e[2];return $s(x,e[1]),y2(k);case 2:case 4:var T=e[2];return $s(x,e[1]),jl(x,T);default:var g=e[2];return $s(x,e[1]),bY(x,g)}}}function Qs(x,r){for(var e=r;;){if(typeof e=="number")return 0;switch(e[0]){case 0:var t=e[1],u=EX(e[2]);return Qs(x,t),vr(x,u);case 1:var i=e[2],f=e[1];if(i[0]===0){var o=i[1];Qs(x,f),vr(x,K$);var e=o;continue}var a=i[1];Qs(x,f),vr(x,Z$);var e=a;continue;case 6:var d=e[2];return Qs(x,e[1]),vr(x,l(d,0));case 7:var e=e[1];continue;case 8:var k=e[2];return Qs(x,e[1]),y2(k);case 2:case 4:var T=e[2];return Qs(x,e[1]),vr(x,T);default:var g=e[2];return Qs(x,e[1]),at(x,g)}}}function AX(x,r){var e=r[1],t=0;return Br(function(u){return $s(x,u),0},t,e)}function SO(x){return AX(ts,x)}function Tr(x){var r=x[1];return Br(function(e){var t=Fr(64);return Qs(t,e),Y1(t)},0,r)}var EO=[0,0];function gO(x,r){var e=x[1+r];if(!(1-(typeof e=="number"?1:0)))return l(Tr(RF),e);if(Dv(e)===Av)return l(Tr(OF),e);if(Dv(e)!==sg)return IF;for(var t=FR("%.12g",e),u=0,i=Xx(t);;){if(i<=u)return Qx(t,EW);var f=O1(t,u),o=0;if(48<=f?58>f&&(o=1):f===45&&(o=1),!o)return t;var u=u+1|0}}function PX(x,r){if(x.length-1<=r)return iF;var e=PX(x,r+1|0),t=gO(x,r);return p(Tr(fF),t,e)}function ay(x){for(var r=EO[1];;){if(r){var e=0,t=r[2],u=r[1];try{var i=l(u,x)}catch{e=1}var f=0;if(e||!i)f=1;else var o=[0,i[1]];if(f){var r=t;continue}}else var o=0;if(o)return o[1];if(x===nO)return wF;if(x===nX)return TF;if(x[1]===tX){var a=x[2],d=a[3],k=a[2],T=a[1];return Ye(Tr(iO),T,k,d,d+5|0,SF)}if(x[1]===wr){var g=x[2],A=g[3],N=g[2],R=g[1];return Ye(Tr(iO),R,N,A,A+6|0,EF)}if(x[1]===Ml){var O=x[2],M=O[3],L=O[2],z=O[1];return Ye(Tr(iO),z,L,M,M+6|0,gF)}if(Dv(x)!==0)return x[1];var V=x.length-1,Z=x[1][1];if(2>>0)var $=PX(x,2),i0=gO(x,1),U=p(Tr(AF),i0,$);else switch(V){case 0:var U=PF;break;case 1:var U=CF;break;default:var J=gO(x,1),U=l(Tr(NF),J)}return Qx(Z,U)}}function AO(x,r){var e=XZ(r),t=e.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var f=Z1(e,i)[1+i],o=function(z){return function(V){return V?z===0?lF:pF:z===0?dF:yF}}(i);if(f[0]===0)var a=f[5],d=f[4],k=f[3],T=f[6]?mF:kF,g=f[2],A=f[7],N=o(f[1]),O=[0,wW(Tr(hF),N,A,g,T,k,d,a)];else if(f[1])var O=0;else var R=o(0),O=[0,l(Tr(_F),R)];if(O){var M=O[1];l(AX(x,aF),M)}var L=i+1|0;if(t!==i){var i=L;continue}break}return 0}function CX(x){for(;;){var r=EO[1],e=1-fO(EO,r,[0,x,r]);if(!e)return e}}var FT0=LF.slice(),HT0=[0];eO(mD,function(x,r){try{try{var e=r?HT0:KY(0);try{sO(0)}catch{}try{var t=ay(x);l(SO(vF),t),AO(ts,e);var u=rW(0);if(u<0){var i=ny(u);fX(Z1(FT0,i)[1+i])}var f=es(ts),o=f}catch(A){var a=I1(A),d=ay(x);l(SO(cF),d),AO(ts,e);var k=ay(a);l(SO(sF),k),AO(ts,KY(0));var o=es(ts)}var T=o}catch(A){var g=I1(A);if(g!==nO)throw q0(g,0);var T=fX(oF)}return T}catch{return 0}});var PO=[Gr,bF,Js(0)],ly=0,NX=-1;function Wl(x,r){return x[13]=x[13]+r[3]|0,dO(r,x[28])}var RX=1000000010;function CO(x,r){return G0(x[17],r,0,Xx(r))}function py(x){return l(x[19],0)}function OX(x,r,e){return x[9]=x[9]-r|0,CO(x,e),x[11]=0,0}function dy(x,r){var e=P(r,hx);return e&&OX(x,Xx(r),r)}function Bv(x,r,e){var t=r[3],u=r[2];dy(x,r[1]),py(x),x[11]=1;var i=(x[6]-e|0)+u|0,f=x[8],o=f<=i?f:i;return x[10]=o,x[9]=x[6]-x[10]|0,l(x[21],x[10]),dy(x,t)}function IX(x,r){return Bv(x,GF,r)}function Ha(x,r){var e=r[2],t=r[3];return dy(x,r[1]),x[9]=x[9]-e|0,l(x[20],e),dy(x,t)}function qT0(x,r,e){if(typeof e=="number")switch(e){case 0:var t=$a(x[3]);if(!t)return 0;var u=t[1][1],i=function(ax,dx){if(!dx)return[0,ax,0];var mx=dx[1],L0=dx[2];return xW(ax,mx)?[0,ax,dx]:[0,mx,i(ax,L0)]};return u[1]=i(x[6]-x[9]|0,u[1]),0;case 1:return Wa(x[2]),0;case 2:return Wa(x[3]),0;case 3:var f=$a(x[2]);return f?IX(x,f[1][2]):py(x);case 4:var o=x[10]!==(x[6]-x[9]|0)?1:0;if(!o)return o;var a=x[28],d=a[2];if(d){var k=d[1];if(d[2]){var T=d[2];a[1]=a[1]-1|0,a[2]=T;var g=[0,k]}else{pO(a);var g=[0,k]}}else var g=0;if(!g)return 0;var A=g[1],N=A[1];return x[12]=x[12]-A[3]|0,x[9]=x[9]+N|0,0;default:var R=Wa(x[5]);return R?CO(x,l(x[25],R[1])):0}switch(e[0]){case 0:return OX(x,r,e[1]);case 1:var O=e[2],M=e[1],L=O[1],z=O[2],V=$a(x[2]);if(!V)return 0;var Z=V[1],$=Z[2];switch(Z[1]){case 0:return Ha(x,M);case 1:return Bv(x,O,$);case 2:return Bv(x,O,$);case 3:return x[9]<(r+Xx(L)|0)?Bv(x,O,$):Ha(x,M);case 4:return x[11]?Ha(x,M):x[9]<(r+Xx(L)|0)||((x[6]-$|0)+z|0)s0){var Q=v0;continue}var o0=s0}else var o0=f0;var c0=o0;break}else var c0=i0;var T0=c0-i0|0;return 0<=T0?Ha(x,[0,FF,T0+J|0,QF]):Bv(x,[0,qF,c0+U|0,HF],x[6]);case 3:var E0=e[2],M0=e[1];if(x[8]<(x[6]-x[9]|0)){var Y0=$a(x[2]);if(Y0){var rx=Y0[1],g0=rx[2],H0=rx[1];x[9]=H0-1>>>0&&IX(x,g0)}else py(x)}var t0=x[9]-M0|0,ex=E0===1?1:x[9]=e)return G0(x[17],JX,0,e);G0(x[17],JX,0,80);var e=e+cj|0}}function GT0(x){return x[1]===PO?Qx(XF,Qx(x[2],YF)):JF}function bT0(x){return x[1]===PO?Qx(UF,Qx(x[2],jF)):BF}function xS0(x){return 0}function rS0(x){return 0}function zX(x,r){function e(g){return 0}function t(g){return 0}function u(g){return 0}var i=hX(0),f=[0,NX,MF,0];dO(f,i);var o=Vl(0);NO(o),Uv([0,1,f],o);var a=Vl(0),d=Vl(0),k=Vl(0),T=[0,o,Vl(0),k,d,a,78,10,68,78,0,1,1,1,1,DT0,DF,x,r,u,t,e,0,0,GT0,bT0,xS0,rS0,i];return T[19]=function(g){return G0(T[17],VF,0,1)},T[20]=function(g){return VX(T,g)},T[21]=function(g){return VX(T,g)},T}function KX(x){function r(e){return es(x)}return zX(function(e,t,u){return 0<=t&&0<=u&&(Xx(e)-u|0)>=t?xO(x,e,t,u):y2(SW)},r)}function LO(x){function r(e){return 0}return zX(function(e,t,u){return _X(x,e,t,u)},r)}var eS0=kw;function ZX(x){return Fr(eS0)}var tS0=ZX(0),nS0=KX(UT0),uS0=KX(ts);LO(tS0);function WX(x,r){var e=Fr(16),t=LO(e);p(x,t,r),Ql(t,0);var u=e[2];if(2>u)return Y1(e);var i=u-2|0,f=1;return 0<=i&&(e[2]-i|0)>=1?Za(e[1],f,i):y2(e$)}function Ve(x,r){var e=0;if(typeof r=="number")return 0;switch(r[0]){case 0:var t=r[2];if(Ve(x,r[1]),typeof t=="number")switch(t){case 0:return BX(x,0);case 1:return YX(x,0);case 2:return Ql(x,0);case 3:var u=x[14]=O1(L,U)+G5>>>0){var U=U+1|0;continue}for(var J=m2(L,i0,U-i0|0),Y=$(U),F=Y;;){if(F!==V){var n0=O1(L,F),Q=0;if(48<=n0?58>n0&&(Q=1):n0===45&&(Q=1),Q){var F=F+1|0;continue}}if(Y===F)var f0=0;else try{var s0=ot(m2(L,Y,F-Y|0)),f0=s0}catch(b0){var v0=I1(b0);if(v0[1]!==kn)throw q0(v0,0);var f0=Z(0)}$(F)!==V&&Z(0);var o0=0;if(P(J,hx)&&P(J,GE))var c0=P(J,"h")?P(J,"hov")?P(J,"hv")?P(J,WD)?Z(0):1:2:3:0;else o0=1;if(o0)var c0=4;var z=[0,f0,c0];break}break}return UX(x,z[1],z[2]);case 2:var T0=r[1],E0=0;if(typeof T0=="number"||T0[0]!==0)E0=1;else{var M0=T0[2],Y0=0;if(typeof M0=="number"||M0[0]!==1)Y0=1;else var rx=r[2],g0=M0[2],H0=T0[1];Y0&&(E0=1)}if(E0){var t0=r[2],ex=T0;e=2}break;case 3:var xx=r[1],ax=0;if(typeof xx=="number"||xx[0]!==0)ax=1;else{var dx=xx[2],mx=0;if(typeof dx=="number"||dx[0]!==1)mx=1;else{var L0=r[2],C0=dx[2],A0=xx[1];e=1}mx&&(ax=1)}if(ax){var U0=r[2],Q0=xx;e=3}break;case 4:var H=r[1],b=0;if(typeof H=="number"||H[0]!==0)b=1;else{var B=H[2],a0=0;if(typeof B=="number"||B[0]!==1)a0=1;else var rx=r[2],g0=B[2],H0=H[1];a0&&(b=1)}if(b){var t0=r[2],ex=H;e=2}break;case 5:var m0=r[1],P0=0;if(typeof m0=="number"||m0[0]!==0)P0=1;else{var D=m0[2],N0=0;if(typeof D=="number"||D[0]!==1)N0=1;else{var L0=r[2],C0=D[2],A0=m0[1];e=1}N0&&(P0=1)}if(P0){var U0=r[2],Q0=m0;e=3}break;case 6:var X0=r[2];return Ve(x,r[1]),l(X0,x);case 7:return Ve(x,r[1]),Ql(x,0);default:var D0=r[2];return Ve(x,r[1]),y2(D0)}switch(e){case 0:return Ve(x,H0),IO(x,g0,rx);case 1:return Ve(x,A0),IO(x,C0,fy(1,L0));case 2:return Ve(x,ex),yy(x,t0);default:return Ve(x,Q0),$l(x,U0)}}function Yr(x){return function(r){var e=r[1],t=0;return Br(function(u){return Ve(x,u),0},t,e)}}for(;;){var $X=cO[1],iS0=[0,1];if(!(1-fO(cO,$X,function(x,r){return function(e){return fO(x,1,0)&&(Ql(nS0,0),Ql(uS0,0)),l(r,0)}}(iS0,$X)))){var fS0=2,cS0=function(x){var r=[0,0],e=Xx(x)-1|0,t=0;if(e>=0)for(var u=t;;){var i=O1(x,u);r[1]=(l8*r[1]|0)+i|0;var f=u+1|0;if(e!==u){var u=f;continue}break}r[1]=r[1]&nD;var o=1073741823=0)for(var f=i;;){var o=(f*2|0)+3|0,a=Z1(x,f)[1+f];Z1(e,o)[1+o]=a;var d=f+1|0;if(u!==f){var f=d;continue}break}return[0,fS0,e,Yv[1],Oo[1],0,0,Fs[1],0]},MO=function(x,r){var e=x[2].length-1,t=e=0&&(u.length-1-e|0)>=0&&(hZ(i,0,u,0,e),f=1),f||y2(JW),x[2]=u;var o=0}else var o=t;return o},qX=[0,0],oS0=[0,0],DO=function(x){var r=x[2].length-1;return MO(x,r+1|0),r},Fl=function(x,r){try{var e=p(Yv[28],r,x[3]);return e}catch(i){var t=I1(i);if(t!==A2)throw q0(t,0);var u=DO(x);return x[3]=G0(Yv[4],r,u,x[3]),x[4]=G0(Oo[4],u,1,x[4]),u}},jO=function(x,r){return cy(function(e){return Fl(x,e)},r)},GX=function(x,r,e){return oS0[1]++,p(Oo[28],r,x[4])?(MO(x,r+1|0),Z1(x[2],r)[1+r]=e,0):(x[6]=[0,[0,r,e],x[6]],0)},UO=function(x){if(x===0)return 0;for(var r=x.length-1-1|0,e=0;;){if(0>r)return e;var t=[0,x[1+r],e],r=r-1|0,e=t}},BO=function(x,r){try{var e=p(Fs[28],r,x[7]);return e}catch(i){var t=I1(i);if(t!==A2)throw q0(t,0);var u=x[1];return x[1]=u+1|0,P(r,hx)&&(x[7]=G0(Fs[4],r,u,x[7])),u}},YO=function(x){return Cl(x,0)?[0]:x},XO=function(x,r,e,t,u,i){var f=u[2],o=u[4],a=UO(r),d=UO(e),k=UO(t),T=_n(function(o0){return Fl(x,o0)},d),g=_n(function(o0){return Fl(x,o0)},k);x[5]=[0,[0,x[3],x[4],x[6],x[7],T,a],x[5]];var A=Fs[1],N=x[7];function R(o0,c0,T0){return aO(o0,a)?G0(Fs[4],o0,c0,T0):T0}x[7]=G0(Fs[13],R,N,A);var O=[0,Yv[1]],M=[0,Oo[1]];vX(function(o0,c0){O[1]=G0(Yv[4],o0,c0,O[1]);var T0=M[1];try{var E0=p(Oo[28],c0,x[4]),M0=E0}catch(rx){var Y0=I1(rx);if(Y0!==A2)throw q0(Y0,0);var M0=1}return M[1]=G0(Oo[4],c0,M0,T0),0},k,g),vX(function(o0,c0){return O[1]=G0(Yv[4],o0,c0,O[1]),M[1]=G0(Oo[4],c0,0,M[1]),0},d,T),x[3]=O[1],x[4]=M[1];var L=0,z=x[6];x[6]=oO(function(o0,c0){return aO(o0[1],T)?c0:[0,o0,c0]},z,L);var V=i?p(f,x,o):l(f,x),Z=Bl(x[5]),$=Z[6],i0=Z[5],U=Z[4],J=Z[3],Y=Z[2],F=Z[1];x[5]=oX(x[5]),x[7]=x2(function(o0,c0){var T0=p(Fs[28],c0,x[7]);return G0(Fs[4],c0,T0,o0)},U,$),x[3]=F,x[4]=Y;var n0=x[6];x[6]=oO(function(o0,c0){return aO(o0[1],i0)?c0:[0,o0,c0]},n0,J);var Q=0,f0=YO(t),s0=[0,cy(function(o0){var c0=Fl(x,o0);try{for(var T0=x[6];;){if(!T0)throw q0(A2,1);var E0=T0[1],M0=T0[2],Y0=E0[2];if(VY(E0[1],c0)===0)return Y0;var T0=M0}}catch(g0){var rx=I1(g0);if(rx===A2)return Z1(x[2],c0)[1+c0];throw q0(rx,0)}},f0),Q],v0=YO(r);return _Z([0,[0,V],[0,cy(function(o0){try{var c0=p(Fs[28],o0,x[7]);return c0}catch(E0){var T0=I1(E0);throw T0===A2?q0([0,wr,xH],1):q0(T0,0)}},v0),s0]])},my=function(x,r){if(x===0)var e=HX([0]);else{var t=HX(cy(cS0,x)),u=x.length-1-1|0,i=0;if(u>=0)for(var f=i;;){var o=(f*2|0)+2|0;t[3]=G0(Yv[4],x[1+f],o,t[3]),t[4]=G0(Oo[4],o,1,t[4]);var a=f+1|0;if(u!==f){var f=a;continue}break}var e=t}var d=l(r,e);return qX[1]=(qX[1]+e[1]|0)-1|0,e[8]=Ax(e[8]),MO(e,3+((Z1(e[2],1)[2]*16|0)/32|0)|0),[0,l(d,0),r,d,0]},ky=function(x,r){if(x)return x;var e=rO(Gr,r[1]);return e[1]=r[2],aW(e)},JO=function(x,r,e){if(x)return r;var t=e[8];if(t!==0)for(var u=t;;){if(u){var i=u[2];l(u[1],r);var u=i;continue}break}return r},hy=function(x){var r=DO(x),e=0;if(r%2|0&&(2+((Z1(x[2],1)[2]*16|0)/32|0)|0)>=r){var t=DO(x);e=1}if(!e)var t=r;return Z1(x[2],t)[1+t]=0,t},VO=function(x,r){for(var e=[0,0],t=r.length-1;;){if(e[1]>=t)return 0;var u=e[1],i=Z1(r,u)[1+u],f=function(kx){e[1]++;var V0=e[1];return Z1(r,V0)[1+V0]},o=f(0);if(typeof o=="number")switch(o){case 0:var a=f(0),b0=function(V0){return function(h){return V0}}(a);break;case 1:var d=f(0),b0=function(V0){return function(h){return h[1+V0]}}(d);break;case 2:var k=f(0),T=f(0),b0=function(V0,h){return function(X){return X[1+V0][1+h]}}(k,T);break;case 3:var g=f(0),b0=function(V0){return function(h){return l(h[1][1+V0],h)}}(g);break;case 4:var A=f(0),b0=function(V0){return function(h,X){return h[1+V0]=X,0}}(A);break;case 5:var N=f(0),R=f(0),b0=function(V0,h){return function(X){return l(V0,h)}}(N,R);break;case 6:var O=f(0),M=f(0),b0=function(V0,h){return function(X){return l(V0,X[1+h])}}(O,M);break;case 7:var L=f(0),z=f(0),V=f(0),b0=function(V0,h,X){return function(W0){return l(V0,W0[1+h][1+X])}}(L,z,V);break;case 8:var Z=f(0),$=f(0),b0=function(V0,h){return function(X){return l(V0,l(X[1][1+h],X))}}(Z,$);break;case 9:var i0=f(0),U=f(0),J=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,X)}}(i0,U,J);break;case 10:var Y=f(0),F=f(0),n0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,W0[1+X])}}(Y,F,n0);break;case 11:var Q=f(0),f0=f(0),s0=f(0),v0=f(0),b0=function(V0,h,X,W0){return function(sx){return p(V0,h,sx[1+X][1+W0])}}(Q,f0,s0,v0);break;case 12:var o0=f(0),c0=f(0),T0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,h,l(W0[1][1+X],W0))}}(o0,c0,T0);break;case 13:var E0=f(0),M0=f(0),Y0=f(0),b0=function(V0,h,X){return function(W0){return p(V0,W0[1+h],X)}}(E0,M0,Y0);break;case 14:var rx=f(0),g0=f(0),H0=f(0),t0=f(0),b0=function(V0,h,X,W0){return function(sx){return p(V0,sx[1+h][1+X],W0)}}(rx,g0,H0,t0);break;case 15:var ex=f(0),xx=f(0),ax=f(0),b0=function(V0,h,X){return function(W0){return p(V0,l(W0[1][1+h],W0),X)}}(ex,xx,ax);break;case 16:var dx=f(0),mx=f(0),b0=function(V0,h){return function(X){return p(X[1][1+V0],X,h)}}(dx,mx);break;case 17:var L0=f(0),C0=f(0),b0=function(V0,h){return function(X){return p(X[1][1+V0],X,X[1+h])}}(L0,C0);break;case 18:var A0=f(0),U0=f(0),Q0=f(0),b0=function(V0,h,X){return function(W0){return p(W0[1][1+V0],W0,W0[1+h][1+X])}}(A0,U0,Q0);break;case 19:var H=f(0),b=f(0),b0=function(V0,h){return function(X){var W0=l(X[1][1+h],X);return p(X[1][1+V0],X,W0)}}(H,b);break;case 20:var B=f(0),a0=f(0);hy(x);var b0=function(V0,h){return function(X){return l(bx(h,V0,0),h)}}(B,a0);break;case 21:var m0=f(0),P0=f(0);hy(x);var b0=function(V0,h){return function(X){var W0=X[1+h];return l(bx(W0,V0,0),W0)}}(m0,P0);break;case 22:var D=f(0),N0=f(0),X0=f(0);hy(x);var b0=function(V0,h,X){return function(W0){var sx=W0[1+h][1+X];return l(bx(sx,V0,0),sx)}}(D,N0,X0);break;default:var D0=f(0),ox=f(0);hy(x);var b0=function(V0,h){return function(X){var W0=l(X[1][1+h],X);return l(bx(W0,V0,0),W0)}}(D0,ox)}else var b0=o;GX(x,i,b0),e[1]++}},bX=function(x,r){var e=r.length-1,t=rO(0,e),u=e-1|0,i=0;if(u>=0)for(var f=i;;){var o=Z1(r,f)[1+f];if(typeof o=="number")switch(o){case 0:var k=function(A){function N(R){var O=t[1+A];if(N===O)throw q0([0,Ml,x],1);return l(O,R)}return N}(f);break;case 1:var a=[];O0(a,[rl,function(A,N){return function(R){var O=t[1+N];if(A===O)throw q0([0,Ml,x],1);var M=Dv(O);if(Ba===M)return O[1];if(rl!==M)return O;var L=O[1];O[1]=XT0;try{var z=l(L,0);return oW(O,z),z}catch(Z){var V=I1(Z);throw O[1]=function($){throw q0(V,0)},q0(V,0)}}}(a,f)]);var k=a;break;default:var d=function(A){throw q0([0,Ml,x],1)},k=[0,d,d,d,0]}else var k=o[0]===0?bX(x,o[1]):o[1];t[1+f]=k;var T=f+1|0;if(u!==f){var f=T;continue}break}return t},xJ=function(x,r,e){if(Dv(e)===0&&x.length-1<=e.length-1){var t=x.length-1-1|0,u=0;if(t>=0)for(var i=u;;){var f=e[1+i],o=Z1(x,i)[1+i];if(typeof o=="number")if(o===2){var a=0;if(Dv(f)===0&&f.length-1===4)for(var d=0,k=r[1+i];;){k[1+d]=f[1+d];var T=d+1|0;if(d!==3){var d=T;continue}break}else a=1;if(a)throw q0([0,wr,rH],1)}else r[1+i]=f;else o[0]===0&&xJ(o[1],r[1+i],f);var g=i+1|0;if(t!==i){var i=g;continue}break}return 0}throw q0([0,wr,eH],1)};try{xX("TMPDIR")}catch(x){var rJ=I1(x);if(rJ!==A2)throw q0(rJ,0)}try{xX("TEMP")}catch(x){var eJ=I1(x);if(eJ!==A2)throw q0(eJ,0)}P(cX,UB)&&P(cX,"Win32");var is=function(x,r){function e(t){return at(x,t)}return il<=r?(e(wa|r>>>18|0),e(h1|(r>>>12|0)&63),e(h1|(r>>>6|0)&63),e(h1|r&63)):kN<=r?(e(Aa|r>>>12|0),e(h1|(r>>>6|0)&63),e(h1|r&63)):h1<=r?(e(ha|r>>>6|0),e(h1|r&63)):e(r)},Io=[Gr,uH,Js(0)],tJ=0,nJ=0,uJ=0,iJ=0,fJ=0,cJ=0,sJ=0,oJ=0,vJ=0,aJ=0,m=function(x){if(x[3]===x[2])return-1;var r=x[1][1+x[3]];return x[3]=x[3]+1|0,r===10&&(x[5]!==0&&(x[5]=x[5]+1|0),x[4]=x[3]),r},r0=function(x,r){return x[9]=x[3],x[10]=x[4],x[11]=x[5],x[12]=r,0},yr=function(x){return x[6]=x[3],x[7]=x[4],x[8]=x[5],r0(x,-1)},_=function(x){return x[3]=x[9],x[4]=x[10],x[5]=x[11],x[12]},qa=function(x){return x[3]=x[6],x[4]=x[7],x[5]=x[8],0},zO=function(x,r){return x[6]=r,0},_y=function(x){return x[3]-x[6]|0},n1=function(x){var r=x[3]-x[6]|0,e=x[6],t=x[1];return 0<=e&&0<=r&&(t.length-1-r|0)>=e?wZ(t,e,r):y2(VW)},lJ=function(x){var r=x[6];return Z1(x[1],r)[1+r]},Hl=function(x,r,e,t){for(var u=[0,r],i=[0,e],f=[0,0];;){if(0>=i[1])return f[1];var o=x[1+u[1]];if(0>o)throw q0(Io,1);if(Jr>>18|0),Zr(t,f[1]+1|0,h1|(o>>>12|0)&63),Zr(t,f[1]+2|0,h1|(o>>>6|0)&63),Zr(t,f[1]+3|0,h1|o&63),f[1]=f[1]+4|0}else Zr(t,f[1],Aa|o>>>12|0),Zr(t,f[1]+1|0,h1|(o>>>6|0)&63),Zr(t,f[1]+2|0,h1|o&63),f[1]=f[1]+3|0;else Zr(t,f[1],ha|o>>>6|0),Zr(t,f[1]+1|0,h1|o&63),f[1]=f[1]+2|0;else Zr(t,f[1],o),f[1]++;u[1]++,i[1]+=-1}},pJ=function(x){for(var r=Xx(x),e=Va(r,0),t=[0,0],u=[0,0];;){if(t[1]>=r)return[0,e,u[1],aJ,vJ,oJ,sJ,cJ,fJ,iJ,uJ,nJ,tJ];var i=fx(x,t[1]),f=0;if(ha<=i)if(wa<=i)if(Gr<=i)f=1;else{var o=fx(x,t[1]+1|0),a=fx(x,t[1]+2|0),d=fx(x,t[1]+3|0),k=(o>>>6|0)!==2?1:0;if(k)var g=k;else var T=(a>>>6|0)!==2?1:0,g=T||((d>>>6|0)!==2?1:0);if(g)throw q0(Io,1);var A=(i&7)<<18|(o&63)<<12|(a&63)<<6|d&63;if(_5>>6|0)!==2?1:0,L=M||((R>>>6|0)!==2?1:0);if(L)var V=L;else var z=55296<=O?1:0,V=z&&(O<=57343?1:0);if(V)throw q0(Io,1);e[1+u[1]]=O,t[1]=t[1]+3|0}else{var Z=fx(x,t[1]+1|0);if((Z>>>6|0)!==2)throw q0(Io,1);e[1+u[1]]=(i&31)<<6|Z&63,t[1]=t[1]+2|0}else h1<=i?f=1:(e[1+u[1]]=i,t[1]++);if(f)throw q0(Io,1);u[1]++}},ql=function(x,r,e){var t=x[6]+r|0,u=S1(e*4|0),i=x[1];if((t+e|0)<=i.length-1)return Za(u,0,Hl(i,t,e,u));throw q0([0,wr,nH],1)},Jx=function(x){var r=x[6],e=x[3]-r|0,t=S1(e*4|0);return Za(t,0,Hl(x[1],r,e,t))},wy=function(x,r){var e=x[6],t=x[3]-e|0,u=S1(t*4|0);return mO(r,u,0,Hl(x[1],e,t,u))},Gl=function(x){var r=x.length-1,e=S1(r*4|0);return Za(e,0,Hl(x,0,r,e))},dJ=function(x,r){return x[3]=x[3]-r|0,0},fs=function(x){return typeof x=="number"?0:x[0]===0?1:x[1]},Xv=function(x,r,e,t){var u=fs(x),i=fs(t),f=i<=u?u+1|0:i+1|0;return f===1?[0,r,e]:[1,f,r,e,x,t]},Ty=function(x,r,e,t){var u=fs(x),i=fs(t),f=i<=u?u+1|0:i+1|0;return[1,f,r,e,x,t]},yJ=function(x,r,e,t){var u=fs(x),i=fs(t);if((i+2|0)=i)return Xv(x,r,e,t);var R=t[5],O=t[4],M=t[3],L=t[2],z=fs(O);if(z<=fs(R))return Ty(Xv(x,r,e,O),L,M,R);var V=O[4],Z=O[3],$=O[2],i0=Xv(O[5],L,M,R);return Ty(Xv(x,r,e,V),$,Z,i0)},vS0=0,Ga=function(x,r){for(var e=x,t=r;;){if(typeof e=="number")return t;if(e[0]===0)return[0,e[1],0,t];var u=[0,e[2],e[4],t],e=e[3],t=u}},mJ=function(x,r){if(!x)return 0;var e=x[1],t=Ga(x[2],x[3]);return[0,e,function(u){return mJ(t,u)}]},aS0=function(x){var r=Ga(x,0);return function(e){return mJ(r,e)}},Hs=function(x){return typeof x=="number"?0:x[0]===0?1:x[1]},lS0=function(x){return[0,x]},ze=function(x,r,e){var t=0;if(typeof x=="number"){if(typeof e=="number")return[0,r];e[0]===1&&(t=1)}else if(x[0]===0)typeof e!="number"&&e[0]===1&&(t=1);else{var u=x[1];if(typeof e!="number"&&e[0]===1){var i=e[1],f=i<=u?u+1|0:i+1|0;return[1,f,r,x,e]}var o=u;t=2}switch(t){case 1:var o=e[1];break;case 0:return[1,2,r,x,e]}return[1,o+1|0,r,x,e]},Lo=function(x,r,e){var t=Hs(x),u=Hs(e),i=u<=t?t+1|0:u+1|0;return[1,i,r,x,e]},Sy=function(x,r){if(r===0)return 0;if(r===1)return[0,l(x,0)];var e=r>>>1|0,t=Sy(x,e),u=l(x,0),i=Sy(x,(r-e|0)-1|0);return[1,Hs(t)+1|0,u,t,i]},pS0=function(x){var r=[0,0],e=x.length-1;return Sy(function(t){var u=r[1],i=Z1(x,u)[1+u];return r[1]++,i},e)},Xt=function(x,r,e){var t=Hs(x),u=Hs(e);if((u+2|0)=u)return ze(x,r,e);var g=e[4],A=e[3],N=e[2],R=Hs(A);if(R<=Hs(g))return Lo(ze(x,r,A),N,g);var O=A[3],M=A[2],L=ze(A[4],N,g);return Lo(ze(x,r,O),M,L)},kJ=function(x,r){if(typeof r=="number")return[0,x];if(r[0]===0)return ze([0,x],r[1],0);var e=r[4],t=r[2];return Xt(kJ(x,r[3]),t,e)},hJ=function(x,r){if(typeof r=="number")return[0,x];if(r[0]===0)return ze(0,r[1],[0,x]);var e=r[3],t=r[2];return Xt(e,t,hJ(x,r[4]))},J2=function(x,r,e){if(typeof x=="number")return kJ(r,e);if(x[0]===0){if(typeof e!="number"){if(e[0]===0)return ze(x,r,e);var t=e[4],u=e[3],i=e[2];return 3>1,h=T0(V0,H0),X=h[1],W0=T0(g0-V0|0,h[2]),sx=X,tx=W0[1],j0=0,Px=W0[2];;){if(sx){if(tx){var Ex=tx[2],Ix=tx[1],qx=sx[2],B0=sx[1],tr=p(o0,B0,Ix);if(tr===0){var sx=qx,tx=Ex,j0=[0,B0,j0];continue}if(0>1,h=c0(V0,H0),X=h[1],W0=c0(g0-V0|0,h[2]),sx=X,tx=W0[1],j0=0,Px=W0[2];;){if(sx){if(tx){var Ex=tx[2],Ix=tx[1],qx=sx[2],B0=sx[1],tr=p(o0,B0,Ix);if(tr===0){var sx=qx,tx=Ex,j0=[0,B0,j0];continue}if(0<=tr){var tx=Ex,j0=[0,Ix,j0];continue}var sx=qx,j0=[0,B0,j0];continue}var Ux=us(sx,j0)}else var Ux=us(tx,j0);return[0,Ux,Px]}},E0=ns(U),M0=2<=E0?c0(E0,U)[1]:U,Y0=function(g0,H0){if(3>=g0>>>0)switch(g0){case 0:return[0,0,H0];case 1:if(H0)return[0,[0,H0[1]],H0[2]];break;case 2:if(H0){var t0=H0[2];if(t0)return[0,[1,2,t0[1],[0,H0[1]],0],t0[2]]}break;default:if(H0){var ex=H0[2];if(ex){var xx=ex[2];if(xx)return[0,[1,2,ex[1],[0,H0[1]],[0,xx[1]]],xx[2]]}}}var ax=g0/2|0,dx=Y0(ax,H0),mx=dx[2],L0=dx[1];if(!mx)throw q0([0,wr,aH],1);var C0=mx[1],A0=Y0((g0-ax|0)-1|0,mx[2]),U0=A0[2];return[0,Lo(L0,C0,A0[1]),U0]};return Y0(ns(M0),M0)[1]}var rx=s0[1];return r(rx,r(v0,r(f0,r(n0,[0,Y]))))}function i0(U,J,Y){l(Yr(J),cH);var F=SJ(Y);F&&l(Yr(J),sH);var n0=0;return x2(function(Q,f0){return Q&&l(Yr(J),fH),p(U,J,f0),1},n0,F),F&&l(Yr(J),oH),l(Yr(J),vH)}return[0,u1,WO,t,r,lS0,u,i,f,a,d,k,T,g,A,Z,N,R,O,M,L,ZO,SJ,bl,_J,wJ,dS0,bl,_J,z,V,aS0,$,i0,Sy,pS0,function(U,J){for(var Y=J;;){if(typeof Y=="number")return 0;if(Y[0]===0){var F=Y[1];return l(U,F)?[0,F]:0}var n0=Y[2],Q=Y[4],f0=Y[3];if(!l(U,n0)){var Y=Q;continue}for(var s0=n0,v0=f0;;){if(typeof v0=="number")return[0,s0];if(v0[0]===0){var o0=v0[1];return l(U,o0)?[0,o0]:[0,s0]}var c0=v0[2],T0=v0[4],E0=v0[3];if(l(U,c0)){var s0=c0,v0=E0;continue}var v0=T0}}}]},gJ=function(x){switch(x[0]){case 0:return 1;case 1:return 2;case 2:return 2;default:return 3}},Vx=function(x,r){if(!r)return r;var e=r[1],t=l(x,e);return e===t?r:[0,t]},cx=function(x,r,e,t,u){var i=p(x,r,e);return e===i?t:l(u,i)},$0=function(x,r,e,t){var u=l(x,r);return r===u?e:l(t,u)},e2=function(x,r){var e=r[1],t=r[2];return cx(x,e,t,r,function(u){return[0,e,u]})},AJ=function(x,r){return Vx(function(e){var t=e[1],u=e[2];return cx(x,t,u,e,function(i){return[0,t,i]})},r)},Sr=function(x,r){var e=x2(function(u,i){var f=u[2],o=u[1],a=l(x,i),d=f||(a!==i?1:0);return[0,[0,a,o],d]},VH,r),t=e[1];return e[2]?Ax(t):r},$O=my(KH,function(x){var r=jO(x,zH),e=r[1],t=r[2],u=r[3],i=r[4],f=r[5],o=r[6],a=r[7],d=r[8],k=r[9],T=r[10],g=r[11],A=r[12],N=r[13],R=r[14],O=r[15],M=r[16],L=r[17],z=r[18],V=r[19],Z=r[20],$=r[21],i0=r[22],U=r[23],J=r[24],Y=r[25],F=r[26],n0=r[27],Q=r[28],f0=r[29],s0=r[30],v0=r[31],o0=r[32],c0=r[33],T0=r[34],E0=r[35],M0=r[36],Y0=r[37],rx=r[38],g0=r[39],H0=r[40],t0=r[41],ex=r[42],xx=r[43],ax=r[44],dx=r[45],mx=r[46],L0=r[47],C0=r[48],A0=r[49],U0=r[50],Q0=r[51],H=r[52],b=r[53],B=r[54],a0=r[55],m0=r[56],P0=r[57],D=r[59],N0=r[60],X0=r[61],D0=r[62],ox=r[63],b0=r[64],kx=r[65],V0=r[66],h=r[67],X=r[68],W0=r[69],sx=r[70],tx=r[71],j0=r[72],Px=r[73],Ex=r[74],Ix=r[75],qx=r[76],B0=r[77],tr=r[78],Ux=r[79],K0=r[80],ur=r[81],z0=r[82],or=r[83],Ur=r[84],lx=r[85],a1=r[86],z1=r[87],w1=r[88],Cr=r[89],n2=r[90],w=r[91],x0=r[92],e0=r[93],S0=r[94],G=r[95],k0=r[96],J0=r[97],I0=r[98],ix=r[99],Wx=r[st],Bx=r[Rt],Hx=r[Zf],$x=r[nn],nr=r[Dt],Zx=r[ft],Lr=r[f2],Yx=r[b2],ue=r[sn],Qt=r[To],S2=r[U1],Ze=r[Ot],fo=r[M2],gn=r[Nr],ds=r[ct],ye=r[Eo],An=r[Ri],Ft=r[dv],We=r[ya],Ht=r[Pa],dr=r[Lf],yt=r[ul],Qo=r[x1],me=r[It],Pn=r[Ma],co=r[Di],Fo=r[K4],so=r[Jr],oo=r[h1],a2=r[_l],ys=r[ud],ke=r[Ep],Cn=r[xN],Ho=r[iD],bv=r[YU],xa=r[hY],vo=r[$j],ms=r[VD],mt=r[jw],qo=r[Rj],Go=r[TB],ao=r[rU],ra=r[mj],ea=r[KU],ks=r[LB],ta=r[ej],lo=r[146],bo=r[147],xv=r[148],Nn=r[OU],rv=r[fU],$9=r[151],m3=r[152],Q9=r[153],j6=r[154],U6=r[155],B6=r[156],Y6=r[157],k3=r[158],F9=r[159],H9=r[eU],na=r[pE],h3=r[qj],q9=r[KB],G9=r[Nj],D1=r[pN],ev=r[zj],po=r[cB],ua=r[UT],q=r[p5],C=r[G4],j=r[Bk],h0=r[Zj],R0=r[JU],nx=r[pY],Sx=r[lD],Dx=r[ET],jx=r[RD],xr=r[dB],hr=r[QM],cr=r[bj],lr=r[LR],kr=r[nh],sr=r[dN],Er=r[id],$r=r[aj],zr=r[Lp],r1=r[ug],Or=r[AU],e1=r[jS],l1=r[ND],T1=r[lU],p1=r[ha],i1=r[FD],f1=r[Eh],d1=r[$D],P1=r[XU],$1=r[SD],l2=r[cY],qr=r[_U],Kx=r[RR],Xr=r[GM],Mr=r[yB],Dr=r[nY],Qr=r[tj],R1=r[FB],$e=r[qT],Qe=r[kY],Kr=r[SB],u2=r[DD],qt=r[oY],Fe=r[bD],j1=r[vE],Q1=r[WM],Z2=r[sB],he=r[LT],Gt=r[GC],_e=r[VU],we=r[HB],kt=r[lB],Te=r[DU],W2=r[nU],Se=r[tD],$2=r[l8],Ee=r[Aa],ht=r[LU],_t=r[Wj],E2=r[vY],I2=r[MU],Q2=r[CB],Rn=r[Xj],On=r[pU],bt=r[_Y],wt=r[Ij],xn=r[SY],In=r[JB],ge=r[xY],He=r[ZU],L2=r[wT],Ln=r[H8],Tt=r[wa],St=r[KM],Et=r[EB],hs=r[qU],Mn=r[LC],F2=r[TS],qe=r[rl],Dn=r[b8],jn=r[Gr],_s=r[lk],tv=r[Ba],ia=r[jg],_3=r[Av],yo=r[sg],mo=r[Ia],w3=r[$3],T3=r[H3],S3=r[nj],ko=r[hg],nv=r[qD],fa=r[260],E3=r[zM],Un=r[262],g3=r[263],Bn=r[264],A3=r[265],P3=r[iB],ca=r[tY],uv=r[268],C3=r[269],N3=r[270],iv=r[Gx],gt=r[272],ws=r[X4],sa=r[274],oa=r[275],R3=r[276],rn=r[kU],Ae=r[278],Ts=r[279],Yn=r[uY],en=r[uD],Pe=r[RB],ho=r[gU],O3=r[284],I3=r[285],L3=r[PU],M3=r[287],ie=r[bB],fv=r[OB],D3=r[58];function b9(n,s,c){var v=c[2],y=c[1],S=c[4],E=c[3],I=Vx(l(n[1][1+Kx],n),y),W=p(n[1][1+t0],n,v);return v===W&&y===I?c:[0,I,W,E,S]}function YL(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+Ae],n,E),W=Vx(l(n[1][1+L],n),S),p0=p(n[1][1+Q],n,y),w0=p(n[1][1+t0],n,v);return E===I&&y===p0&&S===W&&v===w0?c:[0,I,W,p0,w0]}function XL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function JL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+N0],n,S),I=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function VL(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],I=G0(n[1][1+o],n,s,S),W=Vx(l(n[1][1+Kx],n),y);return S===I&&y===W?c:[0,E,[0,I,W]]}function zL(n,s,c){var v=c[3],y=c[2],S=c[1],E=Sr(p(n[1][1+a],n,y),S),I=p(n[1][1+t0],n,v);return S===E&&v===I?c:[0,E,y,I]}function KL(n,s,c){var v=c[4],y=c[2],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],S,c[3],E]}function ZL(n,s,c){var v=c[3],y=c[2],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],S,E]}function WL(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S);if(y)var I=y[1],W=p(n[1][1+Q],n,I),p0=I===W?y:[0,W],w0=p0;else var w0=y;var F0=p(n[1][1+t0],n,v);return E===S&&F0===v?c:[0,E,w0,F0]}function $L(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=p(n[1][1+F],n,y),W=p(n[1][1+t0],n,v);return E===S&&I===y&&W===v?c:[0,E,I,W]}function QL(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=e2(l(n[1][1+rn],n),E);if(S)var W=S[1],p0=W[1],w0=W[2],F0=function(k1){return[0,[0,p0,k1]]},vx=cx(l(n[1][1+C3],n),p0,w0,S,F0);else var vx=S;if(y)var Lx=y[1],_x=Lx[1],_r=Lx[2],c1=function(k1){return[0,[0,_x,k1]]},s1=cx(l(n[1][1+rn],n),_x,_r,y,c1);else var s1=y;var m1=p(n[1][1+t0],n,v);return E===I&&S===vx&&y===s1&&v===m1?c:[0,I,vx,s1,m1]}function FL(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function HL(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function qL(n,s){return s}function GL(n,s,c){var v=c[3],y=c[2],S=c[1],E=Sr(l(n[1][1+rx],n),S),I=Sr(l(n[1][1+Kx],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function j3(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=e2(l(n[1][1+g0],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function xm(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],I=Vx(l(n[1][1+Kx],n),S),W=p(n[1][1+L0],n,y),p0=p(n[1][1+t0],n,v);return S===I&&y===W&&v===p0?s:[0,E,[0,I,W,p0]]}function bL(n,s,c){var v=c[3],y=c[2],S=c[1],E=c[4],I=p(n[1][1+Kx],n,S),W=Sr(l(n[1][1+xx],n),y),p0=p(n[1][1+t0],n,v);return S===I&&y===W&&v===p0?c:[0,I,W,p0,E]}function xM(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function rM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function rm(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function em(n,s){return[0,p(n[1][1+A0],n,s),0]}function eM(n,s){var c=l(n[1][1+C0],n),v=x2(function(S,E){var I=S[2],W=S[1],p0=l(c,E);if(!p0)return[0,W,1];if(p0[2])return[0,us(p0,W),1];var w0=p0[1],F0=I||(E!==w0?1:0);return[0,[0,w0,W],F0]},JH,s),y=v[1];return v[2]?Ax(y):s}function va(n,s){return p(n[1][1+L0],n,s)}function tm(n,s,c){var v=c[2],y=c[1],S=Sr(l(n[1][1+Kx],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function nm(n,s,c){var v=c[2],y=c[1],S=c[3],E=Vx(l(n[1][1+Kx],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?c:[0,E,I,S]}function tM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+xr],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function nM(n,s){var c=s[2],v=c[3],y=c[2],S=y[2],E=y[1],I=c[1],W=s[1],p0=p(n[1][1+D1],n,E),w0=Vx(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return p0===E&&w0===S&&F0===v?s:[0,W,[0,I,[0,p0,w0],F0]]}function uM(n,s){var c=s[2],v=s[1],y=p(n[1][1+i0],n,c);return Cl(y,c)?s:[0,v,y]}function X6(n,s){return p(n[1][1+Kx],n,s)}function iM(n,s){var c=s[2],v=c[2],y=c[1],S=s[1];if(y)var E=y[1],I=function(w0){return[0,w0]},W=$0(l(n[1][1+Kx],n),E,y,I);else var W=y;var p0=p(n[1][1+t0],n,v);return y===W&&v===p0?s:[0,S,[0,W,p0]]}function um(n,s){return p(n[1][1+Kx],n,s)}function fM(n,s,c){return G0(n[1][1+or],n,s,c)}function im(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],I=G0(n[1][1+tr],n,s,S),W=p(n[1][1+t0],n,y);return I===S&&y===W?c:[0,E,[0,I,W]]}function J6(n,s,c){return G0(n[1][1+or],n,s,c)}function fm(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],I=G0(n[1][1+K0],n,s,S),W=p(n[1][1+$2],n,y);return S===I&&y===W?c:[0,E,[0,I,W]]}function cM(n,s,c){switch(c[0]){case 0:var v=c[1],y=function(I){return[0,I]};return $0(p(n[1][1+ur],n,s),v,c,y);case 1:var S=c[1],E=function(I){return[1,I]};return $0(p(n[1][1+Ux],n,s),S,c,E);default:return c}}function cm(n,s,c){return G0(n[1][1+or],n,s,c)}function V6(n,s,c){return G0(n[1][1+or],n,s,c)}function sM(n,s,c){var v=c[2],y=v[2],S=v[1],E=c[1],I=G0(n[1][1+ox],n,s,S),W=p(n[1][1+t0],n,y);return I===S&&y===W?c:[0,E,[0,I,W]]}function z6(n,s,c){return p(n[1][1+Ln],n,c)}function oM(n,s,c){return G0(n[1][1+Ix],n,s,c)}function vM(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+B0],n,s),v,y,c,S)}function aM(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+Ex],n,s),v,y,c,S)}function sm(n,s,c){var v=c[1],y=c[2];function S(E){return[0,v,E]}return cx(p(n[1][1+D0],n,s),v,y,c,S)}function lM(n,s,c){switch(c[0]){case 0:var v=c[1],y=function(Lx){return[0,Lx]};return $0(p(n[1][1+kx],n,s),v,c,y);case 1:var S=c[1],E=function(Lx){return[1,Lx]};return $0(p(n[1][1+h],n,s),S,c,E);case 2:var I=c[1],W=function(Lx){return[2,Lx]};return $0(p(n[1][1+tx],n,s),I,c,W);case 3:var p0=c[1],w0=function(Lx){return[3,Lx]};return $0(p(n[1][1+W0],n,s),p0,c,w0);default:var F0=c[1],vx=function(Lx){return[4,Lx]};return $0(p(n[1][1+sx],n,s),F0,c,vx)}}function K6(n,s,c){var v=c[2],y=v[4],S=v[3],E=v[2],I=v[1],W=c[1],p0=G0(n[1][1+X],n,s,I),w0=G0(n[1][1+V0],n,s,E),F0=p(n[1][1+$2],n,S);if(y){var vx=0;if(p0[0]===3){var Lx=w0[2];if(Lx[0]===2)var _r=Ar(p0[1][2][1],Lx[1][1][2][1]);else vx=1}else vx=1;if(vx)var _x=I===p0?1:0,_r=_x&&(E===w0?1:0)}else var _r=y;return p0===I&&w0===E&&F0===S&&y===_r?c:[0,W,[0,p0,w0,F0,_r]]}function pM(n,s,c){if(c[0]===0){var v=c[1],y=function(I){return[0,I]};return $0(p(n[1][1+j0],n,s),v,c,y)}var S=c[1];function E(I){return[1,I]}return $0(p(n[1][1+b0],n,s),S,c,E)}function dM(n,s,c,v){return G0(n[1][1+en],n,c,v)}function yM(n,s,c,v){return G0(n[1][1+Yx],n,c,v)}function om(n,s,c,v){return G0(n[1][1+mx],n,c,v)}function mM(n,s,c){return p(n[1][1+D1],n,c)}function U3(n,s,c){var v=c[2],y=c[1];switch(v[0]){case 0:var S=v[1],E=S[3],I=S[2],W=S[1],p0=Sr(p(n[1][1+Px],n,s),W),w0=p(n[1][1+Y],n,I),F0=p(n[1][1+t0],n,E),vx=0;if(p0===W&&w0===I&&F0===E){var Lx=v;vx=1}if(!vx)var Lx=[0,[0,p0,w0,F0]];var ut=Lx;break;case 1:var _x=v[1],_r=_x[3],c1=_x[2],s1=_x[1],m1=Sr(p(n[1][1+z0],n,s),s1),k1=p(n[1][1+Y],n,c1),Ge=p(n[1][1+t0],n,_r),be=0;if(_r===Ge&&m1===s1&&k1===c1){var xt=v;be=1}if(!be)var xt=[1,[0,m1,k1,Ge]];var ut=xt;break;case 2:var Ce=v[1],rt=Ce[2],et=Ce[1],At=Ce[3],tt=G0(n[1][1+Ix],n,s,et),nt=p(n[1][1+Y],n,rt),Xn=0;if(et===tt&&rt===nt){var Jn=v;Xn=1}if(!Xn)var Jn=[2,[0,tt,nt,At]];var ut=Jn;break;default:var Ss=v[1],Es=function(gs){return[3,gs]},ut=$0(l(n[1][1+qx],n),Ss,v,Es)}return v===ut?c:[0,y,ut]}function kM(n,s){return G0(n[1][1+or],n,0,s)}function hM(n,s,c){var v=s?s[1]:0;return G0(n[1][1+or],n,[0,v],c)}function _M(n,s){return p(n[1][1+Pe],n,s)}function wM(n,s){return p(n[1][1+Pe],n,s)}function TM(n,s){return G0(n[1][1+Ts],n,XH,s)}function Z6(n,s,c){return G0(n[1][1+Ts],n,[0,s],c)}function SM(n,s){return G0(n[1][1+Ts],n,YH,s)}function EM(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=p(n[1][1+Ae],n,I),p0=Vx(l(n[1][1+L],n),E),w0=Vx(l(n[1][1+Q],n),S),F0=Vx(l(n[1][1+Q],n),y),vx=p(n[1][1+t0],n,v);return I===W&&S===w0&&E===p0&&S===w0&&y===F0&&v===vx?c:[0,W,p0,w0,F0,vx]}function gM(n,s){return p(n[1][1+Ln],n,s)}function W6(n,s){return p(n[1][1+D1],n,s)}function AM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+en],n),c,v,s,y)}function PM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+Yx],n),c,v,s,y)}function CM(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+mx],n),c,v,s,y)}function $6(n,s){switch(s[0]){case 0:var c=s[1],v=function(_x){return[0,_x]};return $0(l(n[1][1+J0],n),c,s,v);case 1:var y=s[1],S=function(_x){return[1,_x]};return $0(l(n[1][1+I0],n),y,s,S);case 2:var E=s[1],I=function(_x){return[2,_x]};return $0(l(n[1][1+Bx],n),E,s,I);case 3:var W=s[1],p0=function(_x){return[3,_x]};return $0(l(n[1][1+ix],n),W,s,p0);case 4:var w0=s[1],F0=function(_x){return[4,_x]};return $0(l(n[1][1+D],n),w0,s,F0);default:var vx=s[1],Lx=function(_x){return[5,_x]};return $0(l(n[1][1+Wx],n),vx,s,Lx)}}function Q6(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[3],S=c[2],E=c[1],I=p(n[1][1+Hx],n,E),W=p(n[1][1+Kx],n,S);if(y){var p0=0;if(I[0]===3){var w0=W[2];if(w0[0]===9)var vx=Ar(I[1][2][1],w0[1][2][1]);else p0=1}else p0=1;if(p0)var F0=E===I?1:0,vx=F0&&(S===W?1:0)}else var vx=y;return E===I&&S===W&&y===vx?s:[0,v,[0,I,W,vx]];case 1:var Lx=c[2],_x=c[1],_r=p(n[1][1+Hx],n,_x),c1=e2(l(n[1][1+lr],n),Lx);return _x===_r&&Lx===c1?s:[0,v,[1,_r,c1]];case 2:var s1=c[3],m1=c[2],k1=c[1],Ge=p(n[1][1+Hx],n,k1),be=e2(l(n[1][1+lr],n),m1),xt=p(n[1][1+t0],n,s1);return k1===Ge&&m1===be&&s1===xt?s:[0,v,[2,Ge,be,xt]];default:var Ce=c[3],rt=c[2],et=c[1],At=p(n[1][1+Hx],n,et),tt=e2(l(n[1][1+lr],n),rt),nt=p(n[1][1+t0],n,Ce);return et===At&&rt===tt&&Ce===nt?s:[0,v,[3,At,tt,nt]]}}function B3(n,s,c){var v=c[2],y=c[1],S=Sr(function(I){if(I[0]===0){var W=I[1],p0=p(n[1][1+G],n,W);return W===p0?I:[0,p0]}var w0=I[1],F0=p(n[1][1+U0],n,w0);return w0===F0?I:[1,F0]},y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Y3(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+Kx],n,E),W=Vx(l(n[1][1+iv],n),S),p0=Vx(l(n[1][1+fv],n),y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function vm(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+D1],n,S),I=p(n[1][1+D1],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function NM(n,s){return p(n[1][1+Kx],n,s)}function RM(n,s){return p(n[1][1+D],n,s)}function am(n,s){return p(n[1][1+D1],n,s)}function OM(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+ds],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+Ft],n),y,s,S);default:var E=s[1],I=function(W){return[2,W]};return $0(l(n[1][1+ye],n),E,s,I)}}function F6(n,s,c){var v=c[1],y=G0(n[1][1+We],n,s,v);return v===y?c:[0,y,c[2],c[3]]}function lm(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=p(n[1][1+An],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function pm(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Kx],n,S),I=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,c[1],E,I,W]}function IM(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+yt],n,S),I=p(n[1][1+A0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function eg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function tg0(n,s){return p(n[1][1+vo],n,s)}function ng0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+a2],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+ys],n),y,s,S)}function ug0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+oo],n,y),I=p(n[1][1+ke],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function ig0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+ke],n,y),I=p(n[1][1+ke],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function fg0(n,s){return p(n[1][1+ys],n,s)}function cg0(n,s){return p(n[1][1+so],n,s)}function sg0(n,s){return p(n[1][1+ke],n,s)}function og0(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+vo],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+bv],n),y,s,S);default:var E=s[1],I=function(W){return[2,W]};return $0(l(n[1][1+xa],n),E,s,I)}}function vg0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Kx],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function ag0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+t0],n,v);if(!y)return v===S?c:[0,0,S];var E=y[1],I=p(n[1][1+Kx],n,E);return E===I&&v===S?c:[0,[0,I],S]}function lg0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(vx){return[0,v,[0,vx]]};return cx(l(n[1][1+mt],n),v,y,s,S);case 1:var E=c[1],I=function(vx){return[0,v,[1,vx]]};return cx(l(n[1][1+Cn],n),v,E,s,I);case 2:var W=c[1],p0=function(vx){return[0,v,[2,vx]]};return cx(l(n[1][1+Ho],n),v,W,s,p0);case 3:var w0=c[1],F0=function(vx){return[0,v,[3,vx]]};return $0(l(n[1][1+me],n),w0,s,F0);default:return s}}function pg0(n,s){var c=s[2],v=s[1],y=Sr(l(n[1][1+ao],n),c);return c===y?s:[0,v,y]}function dg0(n,s,c){return G0(n[1][1+mx],n,s,c)}function yg0(n,s,c){return G0(n[1][1+Ho],n,s,c)}function mg0(n,s){if(s[0]===0){var c=s[1],v=c[1],y=c[2],S=function(w0){return[0,[0,v,w0]]};return cx(l(n[1][1+ra],n),v,y,s,S)}var E=s[1],I=E[1],W=E[2];function p0(w0){return[1,[0,I,w0]]}return cx(l(n[1][1+ea],n),I,W,s,p0)}function kg0(n,s){return p(n[1][1+so],n,s)}function hg0(n,s){return p(n[1][1+ke],n,s)}function _g0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+lo],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+ta],n),y,s,S)}function wg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+bo],n,y),I=Vx(l(n[1][1+ks],n),v);return y===E&&v===I?s:[0,S,[0,E,I]]}function Tg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Sg0(n,s){if(s[0]===0){var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+xv],n),c,s,v)}var y=s[1],S=y[1],E=y[2];function I(W){return[1,[0,S,W]]}return cx(l(n[1][1+Pn],n),S,E,s,I)}function Eg0(n,s){var c=s[2][1],v=s[1],y=p(n[1][1+ms],n,c);return c===y?s:[0,v,[0,y]]}function gg0(n,s){var c=s[2],v=c[4],y=c[2],S=c[1],E=c[3],I=s[1],W=p(n[1][1+ms],n,S),p0=Vx(l(n[1][1+iv],n),y),w0=Sr(l(n[1][1+Fo],n),v);return S===W&&y===p0&&v===w0?s:[0,I,[0,W,p0,E,w0]]}function Ag0(n,s,c){var v=c[4],y=c[3],S=p(n[1][1+Go],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,c[1],c[2],S,E]}function Pg0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+co],n,E),W=Vx(l(n[1][1+qo],n),S),p0=p(n[1][1+Go],n,y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function Cg0(n,s,c,v){var y=2<=s?p(n[1][1+Ix],n,BH):l(n[1][1+Ae],n);return l(y,v)}function Ng0(n,s,c){var v=2<=s?p(n[1][1+Ix],n,UH):l(n[1][1+Ae],n);return l(v,c)}function Rg0(n,s,c){var v=c[3],y=c[2],S=c[1],E=0,I=c[4];if(s){var W=0;if(S)switch(S[1]){case 0:E=1;break;case 1:W=2;break;default:W=1}else W=1;var p0=0;switch(W){case 0:break;case 1:if(2<=s)var w0=0,F0=0;else p0=1;break;default:p0=1}if(p0)var w0=1,F0=0}else E=1;if(E)var w0=1,F0=1;var vx=y?p(n[1][1+a0],n,v):F0?p(n[1][1+Ae],n,v):G0(n[1][1+Ix],n,DH,v);if(y)var Lx=y[1],_x=w0?l(n[1][1+Ae],n):p(n[1][1+Ix],n,jH),_r=$0(_x,Lx,y,function(c1){return[0,c1]});else var _r=0;return y===_r&&v===vx?c:[0,S,_r,vx,I]}function Og0(n,s){return p(n[1][1+D1],n,s)}function Ig0(n,s,c){if(c[0]===0){var v=c[1],y=Sr(p(n[1][1+k3],n,s),v);return v===y?c:[0,y]}var S=c[1],E=S[1],I=S[2];function W(p0){return[1,[0,E,p0]]}return cx(p(n[1][1+Y6],n,s),E,I,c,W)}function Lg0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function Mg0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=e2(l(n[1][1+B6],n),E),p0=Vx(p(n[1][1+U6],n,I),y),w0=Vx(function(vx){var Lx=vx[1],_x=vx[2],_r=G0(n[1][1+F9],n,I,Lx);return _r===Lx?vx:[0,_r,_x]},S),F0=p(n[1][1+t0],n,v);return E===W&&y===p0&&S===w0&&v===F0?c:[0,I,W,w0,p0,F0]}function Dg0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+N0],n,E),W=G0(n[1][1+q9],n,y!==0?1:0,S),p0=l(n[1][1+G9],n),w0=Vx(function(vx){return e2(p0,vx)},y),F0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===w0&&v===F0?c:[0,I,W,w0,F0]}function jg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+A0],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Ug0(n,s,c){return p(n[1][1+A0],n,c)}function Bg0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+Kx],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function Yg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function Xg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function Jg0(n,s,c){return G0(n[1][1+m3],n,s,c)}function Vg0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=p(n[1][1+Ae],n,I),p0=Vx(l(n[1][1+L],n),E),w0=l(n[1][1+ev],n),F0=Sr(function(_x){return e2(w0,_x)},S),vx=e2(l(n[1][1+w],n),y),Lx=p(n[1][1+t0],n,v);return W===I&&p0===E&&F0===S&&vx===y&&Lx===v?c:[0,W,p0,F0,vx,Lx]}function zg0(n,s){return p(n[1][1+Z],n,s)}function Kg0(n,s){return p(n[1][1+Z],n,s)}function Zg0(n,s){return p(n[1][1+D1],n,s)}function Wg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function $g0(n,s){return G0(n[1][1+Ix],n,MH,s)}function Qg0(n,s){return p(n[1][1+Kx],n,s)}function Fg0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+rn],n),c,v,s,y)}function Hg0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+$r],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+R3],n),y,s,S)}function qg0(n,s){switch(s[0]){case 0:return s;case 1:var c=s[1],v=function(E){return[1,E]};return $0(l(n[1][1+F],n),c,s,v);default:var y=s[1],S=function(E){return[2,E]};return $0(l(n[1][1+$],n),y,s,S)}}function Gg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+xr],n,y),I=p(n[1][1+$2],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function bg0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+F],n,y),I=p(n[1][1+t0],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function xA0(n,s){var c=s[2],v=c[4],y=c[3],S=c[2],E=c[1],I=s[1],W=Sr(l(n[1][1+hr],n),S),p0=Vx(l(n[1][1+Sx],n),y),w0=Vx(l(n[1][1+h0],n),E),F0=p(n[1][1+t0],n,v);return S===W&&y===p0&&v===F0&&E===w0?s:[0,I,[0,w0,W,p0,F0]]}function rA0(n,s,c){var v=c[9],y=c[8],S=c[7],E=c[6],I=c[3],W=c[2],p0=c[1],w0=c[10],F0=c[5],vx=c[4],Lx=Vx(l(n[1][1+cr],n),p0),_x=Vx(l(n[1][1+L],n),y),_r=p(n[1][1+Dx],n,W),c1=p(n[1][1+R0],n,S),s1=p(n[1][1+Er],n,I),m1=Vx(l(n[1][1+X0],n),E),k1=p(n[1][1+t0],n,v);return p0===Lx&&W===_r&&I===s1&&E===m1&&S===c1&&y===_x&&v===k1?c:[0,Lx,_r,s1,vx,F0,m1,c1,_x,k1,w0]}function eA0(n,s,c){return G0(n[1][1+zr],n,s,c)}function tA0(n,s,c){return G0(n[1][1+lr],n,s,c)}function nA0(n,s,c){return G0(n[1][1+zr],n,s,c)}function uA0(n,s){if(s[0]===0)return s;var c=s[2],v=s[1],y=p(n[1][1+B],n,c);return y===c?s:[1,v,y]}function iA0(n,s){if(s[0]===0)return s;var c=s[1];function v(y){return[1,y]}return $0(l(n[1][1+F],n),c,s,v)}function fA0(n,s){var c=s[2],v=s[1];function y(S){return[0,v,S]}return $0(l(n[1][1+Q],n),c,s,y)}function cA0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Rx){return[0,v,[0,Rx]]};return $0(l(n[1][1+t0],n),y,s,S);case 1:var E=c[1],I=function(Rx){return[0,v,[1,Rx]]};return $0(l(n[1][1+t0],n),E,s,I);case 2:var W=c[1],p0=function(Rx){return[0,v,[2,Rx]]};return $0(l(n[1][1+t0],n),W,s,p0);case 3:var w0=c[1],F0=function(Rx){return[0,v,[3,Rx]]};return $0(l(n[1][1+t0],n),w0,s,F0);case 4:var vx=c[1],Lx=function(Rx){return[0,v,[4,Rx]]};return $0(l(n[1][1+t0],n),vx,s,Lx);case 5:var _x=c[1],_r=function(Rx){return[0,v,[5,Rx]]};return $0(l(n[1][1+t0],n),_x,s,_r);case 6:var c1=c[1],s1=function(Rx){return[0,v,[6,Rx]]};return $0(l(n[1][1+t0],n),c1,s,s1);case 7:var m1=c[1],k1=function(Rx){return[0,v,[7,Rx]]};return $0(l(n[1][1+t0],n),m1,s,k1);case 8:var Ge=c[2],be=c[1],xt=function(Rx){return[0,v,[8,be,Rx]]};return $0(l(n[1][1+t0],n),Ge,s,xt);case 9:var Ce=c[1],rt=function(Rx){return[0,v,[9,Rx]]};return $0(l(n[1][1+t0],n),Ce,s,rt);case 10:var et=c[1],At=function(Rx){return[0,v,[10,Rx]]};return $0(l(n[1][1+t0],n),et,s,At);case 11:var tt=c[1],nt=function(Rx){return[0,v,[11,Rx]]};return $0(l(n[1][1+ue],n),tt,s,nt);case 12:var Xn=c[1],Jn=function(Rx){return[0,v,[12,Rx]]};return cx(l(n[1][1+C],n),v,Xn,s,Jn);case 13:var Ss=c[1],Es=function(Rx){return[0,v,[13,Rx]]};return cx(l(n[1][1+hs],n),v,Ss,s,Es);case 14:var ut=c[1],gs=function(Rx){return[0,v,[14,Rx]]};return cx(l(n[1][1+w],n),v,ut,s,gs);case 15:var cv=c[1],H6=function(Rx){return[0,v,[15,Rx]]};return cx(l(n[1][1+rv],n),v,cv,s,H6);case 16:var q6=c[1],G6=function(Rx){return[0,v,[16,Rx]]};return $0(l(n[1][1+L3],n),q6,s,G6);case 17:var b6=c[1],x4=function(Rx){return[0,v,[17,Rx]]};return $0(l(n[1][1+He],n),b6,s,x4);case 18:var r4=c[1],e4=function(Rx){return[0,v,[18,Rx]]};return $0(l(n[1][1+Q9],n),r4,s,e4);case 19:var t4=c[1],n4=function(Rx){return[0,v,[19,Rx]]};return cx(l(n[1][1+ev],n),v,t4,s,n4);case 20:var u4=c[1],i4=function(Rx){return[0,v,[20,Rx]]};return cx(l(n[1][1+j6],n),v,u4,s,i4);case 21:var f4=c[1],c4=function(Rx){return[0,v,[21,Rx]]};return cx(l(n[1][1+lx],n),v,f4,s,c4);case 22:var s4=c[1],o4=function(Rx){return[0,v,[22,Rx]]};return cx(l(n[1][1+T],n),v,s4,s,o4);case 23:var v4=c[1],a4=function(Rx){return[0,v,[23,Rx]]};return cx(l(n[1][1+Nn],n),v,v4,s,a4);case 24:var l4=c[1],p4=function(Rx){return[0,v,[24,Rx]]};return $0(l(n[1][1+A],n),l4,s,p4);case 25:var d4=c[1],y4=function(Rx){return[0,v,[25,Rx]]};return $0(l(n[1][1+Qo],n),d4,s,y4);case 26:var m4=c[1],k4=function(Rx){return[0,v,[26,Rx]]};return $0(l(n[1][1+B],n),m4,s,k4);case 27:var h4=c[1],_4=function(Rx){return[0,v,[27,Rx]]};return $0(l(n[1][1+P0],n),h4,s,_4);case 28:var w4=c[1],T4=function(Rx){return[0,v,[28,Rx]]};return $0(l(n[1][1+f0],n),w4,s,T4);case 29:var S4=c[1],E4=function(Rx){return[0,v,[29,Rx]]};return cx(l(n[1][1+mx],n),v,S4,s,E4);case 30:var g4=c[1],A4=function(Rx){return[0,v,[30,Rx]]};return cx(l(n[1][1+Yx],n),v,g4,s,A4);case 31:var P4=c[1],C4=function(Rx){return[0,v,[31,Rx]]};return cx(l(n[1][1+en],n),v,P4,s,C4);case 32:var N4=c[1],R4=function(Rx){return[0,v,[32,Rx]]};return cx(l(n[1][1+oa],n),v,N4,s,R4);case 33:var O4=c[1],I4=function(Rx){return[0,v,[33,Rx]]};return $0(l(n[1][1+t0],n),O4,s,I4);case 34:var L4=c[1],M4=function(Rx){return[0,v,[34,Rx]]};return $0(l(n[1][1+t0],n),L4,s,M4);default:var D4=c[1],j4=function(Rx){return[0,v,[35,Rx]]};return $0(l(n[1][1+t0],n),D4,s,j4)}}function sA0(n,s,c){var v=c[2],y=c[1],S=y[3],E=y[2],I=y[1],W=p(n[1][1+Q],n,I),p0=p(n[1][1+Q],n,E),w0=Sr(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return W===I&&p0===E&&w0===S&&F0===v?c:[0,[0,W,p0,w0],F0]}function oA0(n,s,c){var v=c[2],y=c[1],S=y[3],E=y[2],I=y[1],W=p(n[1][1+Q],n,I),p0=p(n[1][1+Q],n,E),w0=Sr(l(n[1][1+Q],n),S),F0=p(n[1][1+t0],n,v);return W===I&&p0===E&&w0===S&&F0===v?c:[0,[0,W,p0,w0],F0]}function vA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function aA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,c);return y===c?s:[0,v,y]}function lA0(n,s){var c=s[3],v=s[2],y=s[4],S=s[1],E=p(n[1][1+Q],n,v),I=p(n[1][1+i],n,c);return E===v&&I===c?s:[0,S,E,I,y]}function pA0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(w0){return[0,v,[0,w0]]};return $0(l(n[1][1+Q],n),y,s,S);case 1:var E=c[1],I=function(w0){return[0,v,[1,w0]]};return $0(l(n[1][1+v0],n),E,s,I);default:var W=c[1],p0=function(w0){return[0,v,[2,w0]]};return $0(l(n[1][1+s0],n),W,s,p0)}}function dA0(n,s){var c=s[2],v=s[1],y=Sr(l(n[1][1+o0],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function yA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function mA0(n,s){var c=s[3],v=s[2],y=s[4],S=s[1],E=p(n[1][1+Q],n,v),I=p(n[1][1+t0],n,c);return v===E&&c===I?s:[0,S,E,I,y]}function kA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function hA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+M],n,y),I=p(n[1][1+R],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function _A0(n,s){return p(n[1][1+D1],n,s)}function wA0(n,s){return p(n[1][1+D1],n,s)}function TA0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+O],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+N],n),y,s,S)}function SA0(n,s){var c=s[3],v=s[2],y=s[1],S=p(n[1][1+M],n,y),E=Vx(l(n[1][1+J],n),v),I=p(n[1][1+t0],n,c);return y===S&&Cl(v,E)&&c===I?s:[0,S,E,I]}function EA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+z],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function gA0(n,s){var c=s[5],v=s[4],y=s[3],S=s[2],E=s[1],I=p(n[1][1+Q],n,E),W=p(n[1][1+Q],n,S),p0=p(n[1][1+Q],n,y),w0=p(n[1][1+Q],n,v),F0=p(n[1][1+t0],n,c);return E===I&&S===W&&y===p0&&v===w0&&c===F0?s:[0,I,W,p0,w0,F0]}function AA0(n,s){var c=s[2],v=s[1],y=p(n[1][1+Q],n,v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,S]}function PA0(n,s,c){var v=c[6],y=c[5],S=c[4],E=c[3],I=c[2],W=c[1];return v===p(n[1][1+t0],n,v)?c:[0,W,I,E,S,y,v]}function CA0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+t0],n,v);return v===I?c:[0,E,S,y,I]}function NA0(n,s,c){return p(n[1][1+t0],n,c)}function RA0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+t0],n,v);return v===S?c:[0,y,S]}function OA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function IA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function LA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function MA0(n,s,c){var v=c[1],y=c[2],S=G0(n[1][1+j6],n,s,v);return S===v?c:[0,S,y]}function DA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Q],n,S),I=p(n[1][1+Q],n,y),W=p(n[1][1+t0],n,v);return E===S&&I===y&&W===v?c:[0,E,I,W]}function jA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+ua],n,S),I=Vx(l(n[1][1+J],n),y),W=p(n[1][1+t0],n,v);return E===S&&I===y&&W===v?c:[0,E,I,W]}function UA0(n,s){var c=s[2],v=c[5],y=c[4],S=c[2],E=c[1],I=c[3],W=s[1],p0=p(n[1][1+Y],n,S),w0=p(n[1][1+i],n,y),F0=Vx(l(n[1][1+Q],n),v),vx=p(n[1][1+Ae],n,E);return vx===E&&p0===S&&w0===y&&F0===v?s:[0,W,[0,vx,p0,I,w0,F0]]}function BA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+z],n),y),I=p(n[1][1+t0],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function YA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+Q],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function XA0(n,s){return Vx(l(n[1][1+f],n),s)}function JA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+t0],n,v);return v===E?s:[0,S,[0,y,E]]}function VA0(n,s){return p(n[1][1+D1],n,s)}function zA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+ua],n,y),I=p(n[1][1+gn],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function KA0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+V],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+po],n),y,s,S)}function ZA0(n,s,c){var v=c[3],y=c[2],S=c[1],E=l(n[1][1+ev],n),I=Sr(function(w0){return e2(E,w0)},y),W=e2(l(n[1][1+w],n),S),p0=p(n[1][1+t0],n,v);return I===y&&W===S&&v===p0?c:[0,W,I,p0]}function WA0(n,s){switch(s[0]){case 0:var c=s[1],v=function(_x){return[0,_x]};return $0(l(n[1][1+S0],n),c,s,v);case 1:var y=s[1],S=function(_x){return[1,_x]};return $0(l(n[1][1+x0],n),y,s,S);case 2:var E=s[1],I=function(_x){return[2,_x]};return $0(l(n[1][1+nr],n),E,s,I);case 3:var W=s[1],p0=function(_x){return[3,_x]};return $0(l(n[1][1+Zx],n),W,s,p0);case 4:var w0=s[1],F0=function(_x){return[4,_x]};return $0(l(n[1][1+$x],n),w0,s,F0);default:var vx=s[1],Lx=function(_x){return[5,_x]};return $0(l(n[1][1+k0],n),vx,s,Lx)}}function $A0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=Sr(l(n[1][1+n2],n),y),W=p(n[1][1+t0],n,v);return I===y&&v===W?c:[0,E,S,I,W]}function QA0(n,s){var c=s[2],v=c[6],y=c[4],S=c[3],E=c[2],I=c[1],W=c[5],p0=s[1],w0=p(n[1][1+z],n,I),F0=p(n[1][1+Q],n,E),vx=p(n[1][1+Q],n,S),Lx=p(n[1][1+i],n,y),_x=p(n[1][1+t0],n,v);return w0===I&&F0===E&&vx===S&&Lx===y&&_x===v?s:[0,p0,[0,w0,F0,vx,Lx,W,_x]]}function FA0(n,s){var c=s[2],v=c[3],y=c[1],S=y[2],E=y[1],I=c[2],W=s[1],p0=G0(n[1][1+C],n,E,S),w0=p(n[1][1+t0],n,v);return S===p0&&v===w0?s:[0,W,[0,[0,E,p0],I,w0]]}function HA0(n,s){var c=s[2],v=c[6],y=c[2],S=c[1],E=c[5],I=c[4],W=c[3],p0=s[1],w0=p(n[1][1+D1],n,S),F0=p(n[1][1+Q],n,y),vx=p(n[1][1+t0],n,v);return S===w0&&y===F0&&v===vx?s:[0,p0,[0,w0,F0,W,I,E,vx]]}function qA0(n,s){var c=s[2],v=c[6],y=c[5],S=c[3],E=c[2],I=c[4],W=c[1],p0=s[1],w0=p(n[1][1+Q],n,E),F0=p(n[1][1+Q],n,S),vx=p(n[1][1+i],n,y),Lx=p(n[1][1+t0],n,v);return w0===E&&F0===S&&vx===y&&Lx===v?s:[0,p0,[0,W,w0,F0,I,vx,Lx]]}function GA0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Q],n,y),I=p(n[1][1+t0],n,v);return E===y&&v===I?s:[0,S,[0,E,I]]}function bA0(n,s){var c=s[2],v=c[8],y=c[7],S=c[2],E=c[1],I=c[6],W=c[5],p0=c[4],w0=c[3],F0=s[1],vx=p(n[1][1+Hx],n,E),Lx=p(n[1][1+e0],n,S),_x=p(n[1][1+i],n,y),_r=p(n[1][1+t0],n,v);return vx===E&&Lx===S&&_x===y&&_r===v?s:[0,F0,[0,vx,Lx,w0,p0,W,I,_x,_r]]}function xP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+C],n),c,v,s,y)}function rP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+C],n),c,v,s,y)}function eP0(n,s){switch(s[0]){case 0:var c=s[1],v=function(W){return[0,W]};return $0(l(n[1][1+Q],n),c,s,v);case 1:var y=s[1],S=function(W){return[1,W]};return $0(l(n[1][1+Cr],n),y,s,S);default:var E=s[1],I=function(W){return[2,W]};return $0(l(n[1][1+w1],n),E,s,I)}}function tP0(n,s){return p(n[1][1+D1],n,s)}function nP0(n,s,c){var v=c[4],y=c[3],S=c[2],E=S[2],I=E[4],W=E[3],p0=E[2],w0=E[1],F0=c[1],vx=S[1],Lx=Vx(l(n[1][1+L],n),F0),_x=Vx(l(n[1][1+j],n),w0),_r=Sr(l(n[1][1+jx],n),p0),c1=Vx(l(n[1][1+nx],n),W),s1=p(n[1][1+q],n,y),m1=p(n[1][1+t0],n,v),k1=p(n[1][1+t0],n,I);return _r===p0&&c1===W&&s1===y&&Lx===F0&&m1===v&&k1===I&&_x===w0?c:[0,Lx,[0,vx,[0,_x,_r,c1,k1]],s1,m1]}function uP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Q],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+i0],n),y,s,S)}function iP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+F],n,y),I=p(n[1][1+t0],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function fP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+jx],n,y),I=p(n[1][1+t0],n,v);return E===y&&I===v?s:[0,S,[0,E,I]]}function cP0(n,s){var c=s[2],v=c[2],y=c[1],S=c[3],E=s[1],I=p(n[1][1+Q],n,v),W=Vx(l(n[1][1+D1],n),y);return I===v&&W===y?s:[0,E,[0,W,I,S]]}function sP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function oP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+i1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Kx],n),y,s,S)}function vP0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=Vx(l(n[1][1+r1],n),I),p0=Vx(l(n[1][1+N0],n),E),w0=Vx(l(n[1][1+Kx],n),S),F0=p(n[1][1+A0],n,y),vx=p(n[1][1+t0],n,v);return I===W&&E===p0&&S===w0&&y===F0&&v===vx?c:[0,W,p0,w0,F0,vx]}function aP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function lP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+T1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+p1],n),y,s,S)}function pP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],I=c[4],W=p(n[1][1+e1],n,E),p0=p(n[1][1+Kx],n,S),w0=p(n[1][1+A0],n,y),F0=p(n[1][1+t0],n,v);return E===W&&S===p0&&y===w0&&v===F0?c:[0,W,p0,w0,I,F0]}function dP0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+d],n),c,v,s,y)}function yP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+P1],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+$1],n),y,s,S)}function mP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],I=c[4],W=p(n[1][1+f1],n,E),p0=p(n[1][1+Kx],n,S),w0=p(n[1][1+A0],n,y),F0=p(n[1][1+t0],n,v);return E===W&&S===p0&&y===w0&&v===F0?c:[0,W,p0,w0,I,F0]}function kP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Kx],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Q0],n),y,s,S)}function hP0(n,s,c){var v=c[3],y=c[1],S=c[2],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?c:[0,E,S,I]}function _P0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+t0],n,v);return v===E?c:[0,S,y,E]}function wP0(n,s){if(s[0]===0){var c=s[1],v=Sr(l(n[1][1+Dr],n),c);return c===v?s:[0,v]}var y=s[1],S=p(n[1][1+Qe],n,y);return y===S?s:[1,S]}function TP0(n,s){var c=s[2],v=s[1],y=Vx(l(n[1][1+D1],n),c);return c===y?s:[0,v,y]}function SP0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+D1],n,y),I=Vx(l(n[1][1+D1],n),v);return y===E&&v===I?s:[0,S,[0,E,I]]}function EP0(n,s,c){var v=c[5],y=c[3],S=c[2],E=c[1],I=c[4],W=AJ(l(n[1][1+Xr],n),y),p0=Vx(l(n[1][1+Mr],n),S),w0=Vx(l(n[1][1+A0],n),E),F0=p(n[1][1+t0],n,v);return y===W&&S===p0&&E===w0&&v===F0?c:[0,w0,p0,W,I,F0]}function gP0(n,s){if(s[0]===0){var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+A0],n),c,s,v)}var y=s[1];function S(E){return[1,E]}return $0(l(n[1][1+Kx],n),y,s,S)}function AP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+R1],n,y),I=p(n[1][1+t0],n,v);return E===y&&I===v?c:[0,S,E,I]}function PP0(n,s){return p(n[1][1+D1],n,s)}function CP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+Q1],n,v);return v===E?s:[0,S,[0,E,y]]}function NP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+Q1],n,v);return v===E?s:[0,S,[0,E,y]]}function RP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+Q1],n,v);return v===E?s:[0,S,[0,E,y]]}function OP0(n,s){var c=s[2],v=c[1],y=c[2],S=s[1],E=p(n[1][1+Q1],n,v);return v===E?s:[0,S,[0,E,y]]}function IP0(n,s){var c=s[2][1],v=s[1],y=p(n[1][1+Q1],n,c);return c===y?s:[0,v,[0,y]]}function LP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+kt],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function MP0(n,s){var c=s[3],v=s[1],y=Sr(l(n[1][1+Z2],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],S]}function DP0(n,s){var c=s[4],v=s[1];if(v[0]===0)var y=v[1],S=function(vx){return[0,vx]},E=l(n[1][1+Z2],n),w0=$0(function(vx){return Sr(E,vx)},y,v,S);else var I=v[1],W=function(vx){return[1,vx]},p0=l(n[1][1+u2],n),w0=$0(function(vx){return Sr(p0,vx)},I,v,W);var F0=p(n[1][1+t0],n,c);return v===w0&&c===F0?s:[0,w0,s[2],s[3],F0]}function jP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+Fe],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function UP0(n,s){var c=s[4],v=s[1],y=Sr(l(n[1][1+Gt],n),v),S=p(n[1][1+t0],n,c);return v===y&&c===S?s:[0,y,s[2],s[3],S]}function BP0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(_x){return[0,v,[0,_x]]};return $0(l(n[1][1+_e],n),y,s,S);case 1:var E=c[1],I=function(_x){return[0,v,[1,_x]]};return $0(l(n[1][1+j1],n),E,s,I);case 2:var W=c[1],p0=function(_x){return[0,v,[2,_x]]};return $0(l(n[1][1+qt],n),W,s,p0);case 3:var w0=c[1],F0=function(_x){return[0,v,[3,_x]]};return $0(l(n[1][1+Kr],n),w0,s,F0);default:var vx=c[1],Lx=function(_x){return[0,v,[4,_x]]};return $0(l(n[1][1+Te],n),vx,s,Lx)}}function YP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=G0(n[1][1+Ix],n,LH,S),I=p(n[1][1+we],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function XP0(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function JP0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+A0],n,S),I=p(n[1][1+N0],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function VP0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=G0(n[1][1+Ix],n,[0,y],E),W=p(n[1][1+F],n,S),p0=p(n[1][1+t0],n,v);return I===E&&W===S&&p0===v?c:[0,I,W,y,p0]}function zP0(n,s,c){return G0(n[1][1+n0],n,s,c)}function KP0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+F],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function ZP0(n,s,c){var v=c[4],y=c[2],S=c[3],E=c[1],I=e2(l(n[1][1+rn],n),y),W=p(n[1][1+t0],n,v);return I===y&&v===W?c:[0,E,I,S,W]}function WP0(n,s,c){return G0(n[1][1+m3],n,s,c)}function $P0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+cr],n,E),W=p(n[1][1+F],n,S),p0=Vx(l(n[1][1+X0],n),y),w0=p(n[1][1+t0],n,v);return I===E&&W===S&&p0===y&&w0===v?c:[0,I,W,p0,w0]}function QP0(n,s){switch(s[0]){case 0:var c=s[1],v=c[2],y=c[1],S=G0(n[1][1+Ee],n,y,v);return S===v?s:[0,[0,y,S]];case 1:var E=s[1],I=E[2],W=E[1],p0=G0(n[1][1+Q2],n,W,I);return p0===I?s:[1,[0,W,p0]];case 2:var w0=s[1],F0=w0[2],vx=w0[1],Lx=G0(n[1][1+xn],n,vx,F0);return Lx===F0?s:[2,[0,vx,Lx]];case 3:var _x=s[1],_r=_x[2],c1=_x[1],s1=G0(n[1][1+wt],n,c1,_r);return s1===_r?s:[3,[0,c1,s1]];case 4:var m1=s[1],k1=p(n[1][1+Q],n,m1);return k1===m1?s:[4,k1];case 5:var Ge=s[1],be=Ge[2],xt=Ge[1],Ce=G0(n[1][1+n0],n,xt,be);return Ce===be?s:[5,[0,xt,Ce]];case 6:var rt=s[1],et=rt[2],At=rt[1],tt=G0(n[1][1+z1],n,At,et);return tt===et?s:[6,[0,At,tt]];case 7:var nt=s[1],Xn=nt[2],Jn=nt[1],Ss=G0(n[1][1+m3],n,Jn,Xn);return Ss===Xn?s:[7,[0,Jn,Ss]];default:var Es=s[1],ut=Es[2],gs=Es[1],cv=G0(n[1][1+he],n,gs,ut);return cv===ut?s:[8,[0,gs,cv]]}}function FP0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=AJ(l(n[1][1+Xr],n),y),p0=Vx(l(n[1][1+Mr],n),S),w0=Vx(l(n[1][1+Rn],n),E),F0=p(n[1][1+t0],n,v);return y===W&&S===p0&&E===w0&&v===F0?c:[0,I,w0,p0,W,F0]}function HP0(n,s,c){return G0(n[1][1+he],n,s,c)}function qP0(n,s){var c=s[2],v=c[4],y=c[2],S=c[1],E=c[3],I=s[1],W=Vx(l(n[1][1+D1],n),S),p0=p(n[1][1+Q],n,y),w0=p(n[1][1+t0],n,v);return S===W&&y===p0&&v===w0?s:[0,I,[0,W,p0,E,w0]]}function GP0(n,s){var c=s[2],v=c[2],y=c[1],S=c[3],E=s[1],I=p(n[1][1+jn],n,y),W=p(n[1][1+F],n,v);return y===I&&v===W?s:[0,E,[0,I,W,S]]}function bP0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],I=Sr(l(n[1][1+Et],n),S),W=Vx(l(n[1][1+Tt],n),y),p0=p(n[1][1+t0],n,v);return S===I&&y===W&&v===p0?s:[0,E,[0,I,W,p0]]}function xC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=Vx(l(n[1][1+L],n),E),W=p(n[1][1+St],n,S),p0=p(n[1][1+F2],n,y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function rC0(n,s,c){var v=c[5],y=c[4],S=c[3],E=c[2],I=c[1],W=p(n[1][1+tv],n,I),p0=Vx(l(n[1][1+L],n),E),w0=p(n[1][1+St],n,S),F0=p(n[1][1+F2],n,y),vx=p(n[1][1+t0],n,v);return I===W&&E===p0&&S===w0&&y===F0&&v===vx?c:[0,W,p0,w0,F0,vx]}function eC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[4],I=c[3],W=c[2],p0=c[1],w0=p(n[1][1+fa],n,p0),F0=Vx(l(n[1][1+L],n),W),vx=e2(l(n[1][1+w],n),I),Lx=l(n[1][1+ev],n),_x=Vx(function(k1){return e2(Lx,k1)},E),_r=l(n[1][1+ev],n),c1=Sr(function(k1){return e2(_r,k1)},S),s1=Vx(l(n[1][1+nv],n),y),m1=p(n[1][1+t0],n,v);return w0===p0&&F0===W&&vx===I&&_x===E&&c1===S&&s1===y&&m1===v?c:[0,w0,F0,vx,_x,c1,s1,m1]}function tC0(n,s,c){var v=c[1],y=p(n[1][1+t0],n,v);return v===y?c:[0,y]}function nC0(n,s,c){var v=c[2],y=c[1],S=Vx(l(n[1][1+yt],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function uC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+N0],n,E),W=p(n[1][1+Kx],n,S),p0=p(n[1][1+Kx],n,y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function iC0(n,s){var c=s[1],v=s[2];function y(S){return[0,c,S]}return cx(l(n[1][1+rn],n),c,v,s,y)}function fC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Dn],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function cC0(n,s){return G0(n[1][1+Ts],n,IH,s)}function sC0(n,s){if(s[0]===0)return[0,p(n[1][1+D1],n,s[1])];var c=s[1],v=c[1];return[1,[0,v,G0(n[1][1+mx],n,v,c[2])]]}function oC0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=c[4],I=s[1],W=p(n[1][1+jn],n,S),p0=p(n[1][1+Dn],n,y),w0=p(n[1][1+$2],n,v);return S===W&&y===p0&&v===w0?s:[0,I,[0,W,p0,w0,E]]}function vC0(n,s){var c=s[2],v=c[3],y=c[2],S=c[1],E=s[1],I=Sr(l(n[1][1+_s],n),S),W=Vx(l(n[1][1+Mn],n),y),p0=p(n[1][1+t0],n,v);return S===I&&y===W&&v===p0?s:[0,E,[0,I,W,p0]]}function aC0(n,s){return G0(n[1][1+Ix],n,OH,s)}function lC0(n,s,c){var v=c[6],y=c[5],S=c[4],E=c[3],I=c[2],W=c[1],p0=c[7],w0=p(n[1][1+tv],n,W),F0=Vx(l(n[1][1+L],n),I),vx=p(n[1][1+qe],n,E),Lx=p(n[1][1+_3],n,y),_x=p(n[1][1+F2],n,S),_r=p(n[1][1+t0],n,v);return W===w0&&I===F0&&E===vx&&y===Lx&&S===_x&&v===_r?c:[0,w0,F0,vx,_x,Lx,_r,p0]}function pC0(n,s){return Vx(l(n[1][1+Kx],n),s)}function dC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[3],I=c[2],W=c[1],p0=p(n[1][1+D],n,W),w0=p(n[1][1+mo],n,I),F0=p(n[1][1+Y],n,E),vx=p(n[1][1+i],n,S),Lx=Sr(l(n[1][1+Bn],n),y),_x=p(n[1][1+t0],n,v);return W===p0&&I===w0&&F0===E&&vx===S&&Lx===y&&_x===v?c:[0,p0,w0,F0,c[4],vx,Lx,_x]}function yC0(n,s){if(typeof s=="number")return s;var c=s[1],v=p(n[1][1+Kx],n,c);return c===v?s:[0,v]}function mC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[3],I=c[2],W=c[1],p0=p(n[1][1+Hx],n,W),w0=p(n[1][1+mo],n,I),F0=p(n[1][1+Y],n,E),vx=p(n[1][1+i],n,S),Lx=Sr(l(n[1][1+Bn],n),y),_x=p(n[1][1+t0],n,v);return W===p0&&I===w0&&F0===E&&vx===S&&Lx===y&&_x===v?c:[0,p0,w0,F0,c[4],vx,Lx,_x]}function kC0(n,s,c){var v=c[6],y=c[5],S=c[3],E=c[2],I=p(n[1][1+Hx],n,E),W=e2(l(n[1][1+lr],n),S),p0=Sr(l(n[1][1+Bn],n),y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,c[1],I,W,c[4],p0,w0]}function hC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+V],n,y),I=Vx(l(n[1][1+J],n),v);return y===E&&v===I?s:[0,S,[0,E,I]]}function _C0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+ko],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function wC0(n,s){switch(s[0]){case 0:var c=s[1],v=c[1],y=c[2],S=function(_x){return[0,[0,v,_x]]};return cx(l(n[1][1+S3],n),v,y,s,S);case 1:var E=s[1],I=E[1],W=E[2],p0=function(_x){return[1,[0,I,_x]]};return cx(l(n[1][1+w3],n),I,W,s,p0);default:var w0=s[1],F0=w0[1],vx=w0[2],Lx=function(_x){return[2,[0,F0,_x]]};return cx(l(n[1][1+T3],n),F0,vx,s,Lx)}}function TC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=p(n[1][1+Kx],n,y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function SC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+g3],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function EC0(n,s){return G0(n[1][1+Ix],n,RH,s)}function gC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=Vx(l(n[1][1+J],n),y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function AC0(n,s,c){var v=c[7],y=c[6],S=c[5],E=c[4],I=c[3],W=c[2],p0=c[1],w0=Vx(l(n[1][1+fa],n),p0),F0=Vx(l(n[1][1+L],n),I),vx=p(n[1][1+P3],n,W),Lx=l(n[1][1+E3],n),_x=Vx(function(m1){return e2(Lx,m1)},E),_r=Vx(l(n[1][1+nv],n),S),c1=Sr(l(n[1][1+Bn],n),y),s1=p(n[1][1+t0],n,v);return p0===w0&&W===vx&&E===_x&&S===_r&&y===c1&&v===s1&&I===F0?c:[0,w0,vx,F0,_x,_r,c1,s1]}function PC0(n,s,c){return G0(n[1][1+ca],n,s,c)}function CC0(n,s,c){return G0(n[1][1+ca],n,s,c)}function NC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=Vx(l(n[1][1+uv],n),S),I=p(n[1][1+N3],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,E,I,W]}function RC0(n,s){return e2(l(n[1][1+rn],n),s)}function OC0(n,s){if(s[0]===0){var c=s[1],v=p(n[1][1+Q],n,c);return v===c?s:[0,v]}var y=s[1],S=y[2][1],E=y[1],I=p(n[1][1+t0],n,S);return S===I?s:[1,[0,E,[0,I]]]}function IC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+gt],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function LC0(n,s,c){var v=c[1],y=G0(n[1][1+ws],n,s,v);return v===y?c:[0,y,c[2],c[3]]}function MC0(n,s){var c=s[2],v=c[2],y=c[1],S=s[1],E=Sr(l(n[1][1+qr],n),y),I=p(n[1][1+t0],n,v);return y===E&&v===I?s:[0,S,[0,E,I]]}function DC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=c[1],I=p(n[1][1+Kx],n,E),W=Vx(l(n[1][1+iv],n),S),p0=p(n[1][1+fv],n,y),w0=p(n[1][1+t0],n,v);return E===I&&S===W&&y===p0&&v===w0?c:[0,I,W,p0,w0]}function jC0(n,s,c){var v=c[2],y=c[1],S=Vx(l(n[1][1+yt],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function UC0(n,s,c){var v=c[2],y=c[1],S=p(n[1][1+L0],n,y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function BC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Kx],n,S),I=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,c[1],E,I,W]}function YC0(n,s,c){var v=c[4],y=c[3],S=c[2],E=p(n[1][1+Pe],n,S),I=p(n[1][1+Kx],n,y),W=p(n[1][1+t0],n,v);return S===E&&y===I&&v===W?c:[0,c[1],E,I,W]}function XC0(n,s,c){var v=c[3],y=c[2],S=c[1],E=p(n[1][1+Kx],n,S),I=p(n[1][1+F],n,y),W=p(n[1][1+t0],n,v);return E===S&&I===y&&W===v?c:[0,E,I,W]}function JC0(n,s,c){return G0(n[1][1+zr],n,s,c)}function VC0(n,s){switch(s[0]){case 0:var c=s[1],v=function(E){return[0,E]};return $0(l(n[1][1+Kx],n),c,s,v);case 1:var y=s[1],S=function(E){return[1,E]};return $0(l(n[1][1+Q0],n),y,s,S);default:return s}}function zC0(n,s,c){var v=c[2],y=c[1],S=Sr(l(n[1][1+M3],n),y),E=p(n[1][1+t0],n,v);return y===S&&v===E?c:[0,S,E]}function KC0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Ox){return[0,v,[0,Ox]]};return cx(l(n[1][1+ie],n),v,y,s,S);case 1:var E=c[1],I=function(Ox){return[0,v,[1,Ox]]};return cx(l(n[1][1+I3],n),v,E,s,I);case 2:var W=c[1],p0=function(Ox){return[0,v,[2,Ox]]};return cx(l(n[1][1+O3],n),v,W,s,p0);case 3:var w0=c[1],F0=function(Ox){return[0,v,[3,Ox]]};return cx(l(n[1][1+ho],n),v,w0,s,F0);case 4:var vx=c[1],Lx=function(Ox){return[0,v,[4,Ox]]};return cx(l(n[1][1+Yn],n),v,vx,s,Lx);case 5:var _x=c[1],_r=function(Ox){return[0,v,[5,Ox]]};return cx(l(n[1][1+ws],n),v,_x,s,_r);case 6:var c1=c[1],s1=function(Ox){return[0,v,[6,Ox]]};return cx(l(n[1][1+Un],n),v,c1,s,s1);case 7:var m1=c[1],k1=function(Ox){return[0,v,[7,Ox]]};return cx(l(n[1][1+L2],n),v,m1,s,k1);case 8:var Ge=c[1],be=function(Ox){return[0,v,[8,Ox]]};return cx(l(n[1][1+kr],n),v,Ge,s,be);case 9:var xt=c[1],Ce=function(Ox){return[0,v,[9,Ox]]};return $0(l(n[1][1+D1],n),xt,s,Ce);case 10:var rt=c[1],et=function(Ox){return[0,v,[10,Ox]]};return $0(p(n[1][1+na],n,v),rt,s,et);case 11:var At=c[1],tt=function(Ox){return[0,v,[11,Ox]]};return cx(l(n[1][1+mt],n),v,At,s,tt);case 12:var nt=c[1],Xn=function(Ox){return[0,v,[12,Ox]]};return cx(l(n[1][1+Cn],n),v,nt,s,Xn);case 13:var Jn=c[1],Ss=function(Ox){return[0,v,[13,Ox]]};return cx(l(n[1][1+mx],n),v,Jn,s,Ss);case 14:var Es=c[1],ut=function(Ox){return[0,v,[14,Ox]]};return cx(l(n[1][1+oa],n),v,Es,s,ut);case 15:var gs=c[1],cv=function(Ox){return[0,v,[15,Ox]]};return cx(l(n[1][1+Qt],n),v,gs,s,cv);case 16:var H6=c[1],q6=function(Ox){return[0,v,[16,Ox]]};return cx(l(n[1][1+Yx],n),v,H6,s,q6);case 17:var G6=c[1],b6=function(Ox){return[0,v,[17,Ox]]};return cx(l(n[1][1+en],n),v,G6,s,b6);case 18:var x4=c[1],r4=function(Ox){return[0,v,[18,Ox]]};return cx(l(n[1][1+m0],n),v,x4,s,r4);case 19:var e4=c[1],t4=function(Ox){return[0,v,[19,Ox]]};return cx(l(n[1][1+Ze],n),v,e4,s,t4);case 20:var n4=c[1],u4=function(Ox){return[0,v,[20,Ox]]};return cx(l(n[1][1+Ht],n),v,n4,s,u4);case 21:var i4=c[1],f4=function(Ox){return[0,v,[21,Ox]]};return cx(l(n[1][1+We],n),v,i4,s,f4);case 22:var c4=c[1],s4=function(Ox){return[0,v,[22,Ox]]};return cx(l(n[1][1+fo],n),v,c4,s,s4);case 23:var o4=c[1],v4=function(Ox){return[0,v,[23,Ox]]};return cx(l(n[1][1+S2],n),v,o4,s,v4);case 24:var a4=c[1],l4=function(Ox){return[0,v,[24,Ox]]};return cx(l(n[1][1+Lr],n),v,a4,s,l4);case 25:var p4=c[1],d4=function(Ox){return[0,v,[25,Ox]]};return $0(p(n[1][1+a1],n,v),p4,s,d4);case 26:var y4=c[1],m4=function(Ox){return[0,v,[26,Ox]]};return cx(l(n[1][1+Ur],n),v,y4,s,m4);case 27:var k4=c[1],h4=function(Ox){return[0,v,[27,Ox]]};return cx(l(n[1][1+H],n),v,k4,s,h4);case 28:var _4=c[1],w4=function(Ox){return[0,v,[28,Ox]]};return cx(l(n[1][1+dx],n),v,_4,s,w4);case 29:var T4=c[1],S4=function(Ox){return[0,v,[29,Ox]]};return cx(l(n[1][1+H0],n),v,T4,s,S4);case 30:var E4=c[1],g4=function(Ox){return[0,v,[30,Ox]]};return cx(l(n[1][1+g0],n),v,E4,s,g4);case 31:var A4=c[1],P4=function(Ox){return[0,v,[31,Ox]]};return cx(l(n[1][1+Y0],n),v,A4,s,P4);case 32:var C4=c[1],N4=function(Ox){return[0,v,[32,Ox]]};return cx(l(n[1][1+U],n),v,C4,s,N4);case 33:var R4=c[1],O4=function(Ox){return[0,v,[33,Ox]]};return cx(l(n[1][1+c0],n),v,R4,s,O4);case 34:var I4=c[1],L4=function(Ox){return[0,v,[34,Ox]]};return cx(l(n[1][1+g],n),v,I4,s,L4);case 35:var M4=c[1],D4=function(Ox){return[0,v,[35,Ox]]};return cx(l(n[1][1+k],n),v,M4,s,D4);default:var j4=c[1],Rx=function(Ox){return[0,v,[36,Ox]]};return cx(l(n[1][1+e],n),v,j4,s,Rx)}}function ZC0(n,s){var c=s[2],v=s[1],y=s[3],S=Sr(l(n[1][1+yo],n),v),E=Sr(l(n[1][1+yo],n),c);return v===S&&c===E?s:[0,S,E,y]}function WC0(n){var s=l(n[1][1+ex],n);return function(c){return Vx(s,c)}}function $C0(n,s){return s}function QC0(n,s){var c=s[2],v=s[1];switch(c[0]){case 0:var y=c[1],S=function(Cx){return[0,v,[0,Cx]]};return cx(l(n[1][1+rn],n),v,y,s,S);case 1:var E=c[1],I=function(Cx){return[0,v,[1,Cx]]};return cx(l(n[1][1+sa],n),v,E,s,I);case 2:var W=c[1],p0=function(Cx){return[0,v,[2,Cx]]};return cx(l(n[1][1+A3],n),v,W,s,p0);case 3:var w0=c[1],F0=function(Cx){return[0,v,[3,Cx]]};return cx(l(n[1][1+ia],n),v,w0,s,F0);case 4:var vx=c[1],Lx=function(Cx){return[0,v,[4,Cx]]};return cx(l(n[1][1+ge],n),v,vx,s,Lx);case 5:var _x=c[1],_r=function(Cx){return[0,v,[5,Cx]]};return cx(l(n[1][1+In],n),v,_x,s,_r);case 6:var c1=c[1],s1=function(Cx){return[0,v,[6,Cx]]};return cx(l(n[1][1+xn],n),v,c1,s,s1);case 7:var m1=c[1],k1=function(Cx){return[0,v,[7,Cx]]};return cx(l(n[1][1+wt],n),v,m1,s,k1);case 8:var Ge=c[1],be=function(Cx){return[0,v,[8,Cx]]};return cx(l(n[1][1+bt],n),v,Ge,s,be);case 9:var xt=c[1],Ce=function(Cx){return[0,v,[9,Cx]]};return cx(l(n[1][1+On],n),v,xt,s,Ce);case 10:var rt=c[1],et=function(Cx){return[0,v,[10,Cx]]};return cx(l(n[1][1+Q2],n),v,rt,s,et);case 11:var At=c[1],tt=function(Cx){return[0,v,[11,Cx]]};return cx(l(n[1][1+I2],n),v,At,s,tt);case 12:var nt=c[1],Xn=function(Cx){return[0,v,[12,Cx]]};return cx(l(n[1][1+E2],n),v,nt,s,Xn);case 13:var Jn=c[1],Ss=function(Cx){return[0,v,[13,Cx]]};return cx(l(n[1][1+_t],n),v,Jn,s,Ss);case 14:var Es=c[1],ut=function(Cx){return[0,v,[14,Cx]]};return cx(l(n[1][1+ht],n),v,Es,s,ut);case 15:var gs=c[1],cv=function(Cx){return[0,v,[15,Cx]]};return cx(l(n[1][1+z1],n),v,gs,s,cv);case 16:var H6=c[1],q6=function(Cx){return[0,v,[16,Cx]]};return cx(l(n[1][1+Ee],n),v,H6,s,q6);case 17:var G6=c[1],b6=function(Cx){return[0,v,[17,Cx]]};return cx(l(n[1][1+Se],n),v,G6,s,b6);case 18:var x4=c[1],r4=function(Cx){return[0,v,[18,Cx]]};return cx(l(n[1][1+W2],n),v,x4,s,r4);case 19:var e4=c[1],t4=function(Cx){return[0,v,[19,Cx]]};return cx(l(n[1][1+he],n),v,e4,s,t4);case 20:var n4=c[1],u4=function(Cx){return[0,v,[20,Cx]]};return cx(l(n[1][1+$e],n),v,n4,s,u4);case 21:var i4=c[1],f4=function(Cx){return[0,v,[21,Cx]]};return cx(l(n[1][1+Qr],n),v,i4,s,f4);case 22:var c4=c[1],s4=function(Cx){return[0,v,[22,Cx]]};return cx(l(n[1][1+l2],n),v,c4,s,s4);case 23:var o4=c[1],v4=function(Cx){return[0,v,[23,Cx]]};return cx(l(n[1][1+Or],n),v,o4,s,v4);case 24:var a4=c[1],l4=function(Cx){return[0,v,[24,Cx]]};return cx(l(n[1][1+d1],n),v,a4,s,l4);case 25:var p4=c[1],d4=function(Cx){return[0,v,[25,Cx]]};return cx(l(n[1][1+l1],n),v,p4,s,d4);case 26:var y4=c[1],m4=function(Cx){return[0,v,[26,Cx]]};return cx(l(n[1][1+sr],n),v,y4,s,m4);case 27:var k4=c[1],h4=function(Cx){return[0,v,[27,Cx]]};return cx(l(n[1][1+h3],n),v,k4,s,h4);case 28:var _4=c[1],w4=function(Cx){return[0,v,[28,Cx]]};return cx(l(n[1][1+H9],n),v,_4,s,w4);case 29:var T4=c[1],S4=function(Cx){return[0,v,[29,Cx]]};return cx(l(n[1][1+$9],n),v,T4,s,S4);case 30:var E4=c[1],g4=function(Cx){return[0,v,[30,Cx]]};return cx(l(n[1][1+dr],n),v,E4,s,g4);case 31:var A4=c[1],P4=function(Cx){return[0,v,[31,Cx]]};return cx(l(n[1][1+b],n),v,A4,s,P4);case 32:var C4=c[1],N4=function(Cx){return[0,v,[32,Cx]]};return cx(l(n[1][1+ax],n),v,C4,s,N4);case 33:var R4=c[1],O4=function(Cx){return[0,v,[33,Cx]]};return cx(l(n[1][1+M0],n),v,R4,s,O4);case 34:var I4=c[1],L4=function(Cx){return[0,v,[34,Cx]]};return cx(l(n[1][1+T0],n),v,I4,s,L4);case 35:var M4=c[1],D4=function(Cx){return[0,v,[35,Cx]]};return cx(l(n[1][1+n0],n),v,M4,s,D4);case 36:var j4=c[1],Rx=function(Cx){return[0,v,[36,Cx]]};return cx(l(n[1][1+z1],n),v,j4,s,Rx);case 37:var Ox=c[1],FC0=function(Cx){return[0,v,[37,Cx]]};return cx(l(n[1][1+d],n),v,Ox,s,FC0);case 38:var HC0=c[1],qC0=function(Cx){return[0,v,[38,Cx]]};return cx(l(n[1][1+u],n),v,HC0,s,qC0);default:var GC0=c[1],bC0=function(Cx){return[0,v,[39,Cx]]};return cx(l(n[1][1+t],n),v,GC0,s,bC0)}}return VO(x,[0,D3,function(n,s){var c=s[2],v=c[4],y=c[3],S=c[1],E=c[2],I=s[1],W=p(n[1][1+E0],n,S),p0=p(n[1][1+t0],n,y),w0=Sr(l(n[1][1+yo],n),v);return S===W&&y===p0&&v===w0?s:[0,I,[0,W,E,p0,w0]]},A0,QC0,yo,$C0,t0,WC0,ex,ZC0,Kx,KC0,ie,zC0,M3,VC0,I3,JC0,O3,XC0,ho,YC0,Yn,BC0,rn,UC0,sa,jC0,ws,DC0,fv,MC0,a1,LC0,iv,IC0,gt,OC0,N3,RC0,C3,NC0,A3,CC0,Un,PC0,ca,AC0,E3,gC0,fa,EC0,P3,SC0,Bn,TC0,g3,wC0,nv,_C0,ko,hC0,S3,kC0,w3,mC0,mo,yC0,T3,dC0,$2,pC0,ia,lC0,tv,aC0,qe,vC0,_s,oC0,jn,sC0,Dn,cC0,Mn,fC0,_3,iC0,L2,uC0,ge,nC0,In,tC0,xn,eC0,wt,rC0,hs,xC0,St,bP0,Et,GP0,Tt,qP0,bt,HP0,On,FP0,Rn,QP0,Q2,$P0,I2,WP0,E2,ZP0,_t,KP0,ht,zP0,Ee,VP0,Se,JP0,W2,XP0,he,YP0,we,BP0,_e,UP0,j1,jP0,qt,DP0,Kr,MP0,Te,LP0,Z2,IP0,Gt,OP0,Fe,RP0,u2,NP0,kt,CP0,Q1,PP0,$e,AP0,R1,gP0,Qr,EP0,Dr,SP0,Qe,TP0,Mr,wP0,Xr,_P0,l2,hP0,qr,kP0,d1,mP0,f1,yP0,P1,dP0,l1,pP0,e1,lP0,T1,aP0,Or,vP0,r1,oP0,i1,sP0,jx,cP0,nx,fP0,j,iP0,q,uP0,C,nP0,yt,tP0,e0,eP0,Cr,rP0,w1,xP0,S0,bA0,x0,GA0,nr,qA0,$x,HA0,Zx,FA0,k0,QA0,w,$A0,n2,WA0,rv,ZA0,ua,KA0,po,zA0,gn,VA0,f,JA0,i,XA0,J,YA0,L,BA0,z,UA0,ev,jA0,j6,DA0,lx,MA0,mx,LA0,Yx,IA0,en,OA0,oa,RA0,Qt,NA0,m0,CA0,Ze,PA0,ue,AA0,He,gA0,Q9,EA0,A,SA0,M,TA0,O,wA0,R,_A0,N,hA0,Qo,kA0,B,mA0,P0,yA0,f0,dA0,o0,pA0,v0,lA0,s0,aA0,L3,vA0,T,oA0,Nn,sA0,Q,cA0,F,fA0,Y,iA0,F2,uA0,sr,nA0,kr,tA0,lr,eA0,zr,rA0,Dx,xA0,h0,bg0,hr,Gg0,R0,qg0,Er,Hg0,$r,Fg0,R3,Qg0,cr,$g0,D1,Wg0,Z,Zg0,V,Kg0,Ae,zg0,m3,Vg0,$9,Jg0,D,Xg0,Ln,Yg0,na,Bg0,q9,Ug0,G9,jg0,h3,Dg0,H9,Mg0,B6,Lg0,U6,Ig0,a0,Og0,k3,Rg0,F9,Ng0,Y6,Cg0,mt,Pg0,Cn,Ag0,co,gg0,qo,Eg0,Fo,Sg0,Pn,Tg0,xv,wg0,bo,_g0,lo,hg0,ta,kg0,ks,mg0,ea,yg0,ra,dg0,Go,pg0,ao,lg0,Ho,ag0,me,vg0,ms,og0,vo,sg0,bv,cg0,xa,fg0,so,ig0,ys,ug0,oo,ng0,a2,tg0,ke,eg0,dr,IM,Ht,pm,We,lm,Ur,F6,An,OM,ds,am,Ft,RM,ye,NM,fo,vm,S2,Y3,Lr,B3,G,Q6,Hx,$6,J0,CM,I0,PM,Bx,AM,ix,W6,Wx,gM,z1,EM,xr,SM,o,Z6,uv,TM,$1,wM,p1,_M,Ts,hM,Pe,kM,or,U3,Ix,mM,D0,om,Ex,yM,B0,dM,Px,pM,j0,K6,X,lM,kx,sm,h,aM,tx,vM,W0,oM,sx,z6,b0,sM,V0,V6,ox,cm,z0,cM,ur,fm,K0,J6,Ux,im,tr,fM,qx,um,X0,iM,N0,X6,$,uM,i0,nM,Sx,tM,b,nm,H,tm,E0,va,L0,eM,C0,em,Q0,rm,U0,rM,dx,xM,ax,bL,xx,xm,H0,j3,g0,GL,rx,qL,Y0,HL,M0,FL,T0,QL,U,$L,c0,WL,g,ZL,k,KL,d,zL,a,VL,u,JL,t,XL,n0,YL,e,b9]),function(n,s){return ky(s,x)}}),QO=function x(r,e,t){return x.fun(r,e,t)};O0(QO,function(x,r,e){var t=e[2];switch(t[0]){case 0:var u=t[1][1];return x2(function(f){return function(o){var a=o[0]===0?o[1][2][2]:o[1][2][1];return G0(QO,x,f,a)}},r,u);case 1:var i=t[1][1];return x2(function(f){return function(o){return o[0]===2?f:G0(QO,x,f,o[1][2][1])}},r,i);case 2:return p(x,r,t[1][1]);default:return r}});var FO=function x(r){return x.fun(r)},yS0=function(x){var r=x[0]===0?x[1][2][2]:x[1][2][1];return l(FO,r)},mS0=function(x){return x[0]===2?0:l(FO,x[1][2][1])};O0(FO,function(x){var r=x[2];switch(r[0]){case 0:return vO(yS0,r[1][1]);case 1:return vO(mS0,r[1][1]);case 2:return 1;default:return 0}});var wn=function(x,r){return[0,r[1],[0,r[2],x]]},PJ=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0;return[0,t,u,e]},y0=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0;return!t&&!u?0:[0,PJ([0,t],[0,u],0)]},X1=function(x,r,e,t){var u=x?x[1]:0,i=r?r[1]:0;return!u&&!i&&!e?0:[0,PJ([0,u],[0,i],e)]},R2=function(x,r){if(x){if(r){var e=r[1],t=x[1],u=[0,Fx(t[2],e[2])];return y0([0,Fx(e[1],t[1])],u,0)}var i=x}else var i=r;return i},HO=function(x,r){if(!r)return x;if(x){var e=r[1],t=x[1],u=e[1],i=t[3],f=t[1],o=[0,Fx(t[2],e[2])];return X1([0,Fx(u,f)],o,i,0)}var a=r[1];return X1([0,a[1]],[0,a[2]],0,0)},CJ=function(x,r){l(Yr(x),Cq),p(Yr(x),Rq,Nq);var e=r[1];l(l(Yr(x),Oq),e),l(Yr(x),Iq),l(Yr(x),Lq),p(Yr(x),Dq,Mq);var t=r[2];return l(l(Yr(x),jq),t),l(Yr(x),Uq),l(Yr(x),Bq)},NJ=function x(r,e){return x.fun(r,e)},kS0=function x(r){return x.fun(r)};O0(NJ,function(x,r){l(Yr(x),zq),p(Yr(x),Zq,Kq);var e=r[1];if(e){var t=e[1];switch(yy(x,Xq),t[0]){case 0:var u=t[1];l(Yr(x),kH),l(l(Yr(x),hH),u),l(Yr(x),_H);break;case 1:var i=t[1];l(Yr(x),wH),l(l(Yr(x),TH),i),l(Yr(x),SH);break;case 2:var f=t[1];l(Yr(x),EH),l(l(Yr(x),gH),f),l(Yr(x),AH);break;default:var o=t[1];l(Yr(x),PH),l(l(Yr(x),CH),o),l(Yr(x),NH)}yy(x,Jq)}else yy(x,Vq);return l(Yr(x),Wq),l(Yr(x),$q),p(Yr(x),Fq,Qq),CJ(x,r[2]),l(Yr(x),Hq),l(Yr(x),qq),p(Yr(x),bq,Gq),CJ(x,r[3]),l(Yr(x),xG),l(Yr(x),rG)}),O0(kS0,function(x){var r=Yq[1],e=ZX(0),t=LO(e);return p(Br(function(u){Ve(t,u),OO(t,0);var i=Y1(e);return e[2]=0,e[1]=e[4],e[3]=vt(e[1]),i},0,r),NJ,x)});var Hr=function(x,r){return[0,x[1],x[2],r[3]]},qs=function(x,r){var e=x[1]-r[1]|0;return e===0?x[2]-r[2]|0:e},RJ=function(x,r){var e=r[1],t=x[1];if(t){var u=t[1];if(e)var i=e[1],f=gJ(i),o=gJ(u)-f|0,a=o===0?Tx(u[1],i[1]):o;else var a=-1}else var a=e?1:0;if(a!==0)return a;var d=qs(x[2],r[2]);return d===0?qs(x[3],r[3]):d},Mo=function(x,r){return RJ(x,r)===0?1:0},OJ=function x(r,e){return x.fun(r,e)};O0(OJ,function(x,r){if(typeof x=="number"){var e=x;if(59<=e)switch(e){case 59:if(typeof r=="number"&&r===59)return 0;break;case 60:if(typeof r=="number"&&r===60)return 0;break;case 61:if(typeof r=="number"&&r===61)return 0;break;case 62:if(typeof r=="number"&&r===62)return 0;break;case 63:if(typeof r=="number"&&r===63)return 0;break;case 64:if(typeof r=="number"&&r===64)return 0;break;case 65:if(typeof r=="number"&&r===65)return 0;break;case 66:if(typeof r=="number"&&r===66)return 0;break;case 67:if(typeof r=="number"&&r===67)return 0;break;case 68:if(typeof r=="number"&&r===68)return 0;break;case 69:if(typeof r=="number"&&r===69)return 0;break;case 70:if(typeof r=="number"&&r===70)return 0;break;case 71:if(typeof r=="number"&&r===71)return 0;break;case 72:if(typeof r=="number"&&r===72)return 0;break;case 73:if(typeof r=="number"&&r===73)return 0;break;case 74:if(typeof r=="number"&&r===74)return 0;break;case 75:if(typeof r=="number"&&r===75)return 0;break;case 76:if(typeof r=="number"&&r===76)return 0;break;case 77:if(typeof r=="number"&&r===77)return 0;break;case 78:if(typeof r=="number"&&r===78)return 0;break;case 79:if(typeof r=="number"&&r===79)return 0;break;case 80:if(typeof r=="number"&&r===80)return 0;break;case 81:if(typeof r=="number"&&r===81)return 0;break;case 82:if(typeof r=="number"&&r===82)return 0;break;case 83:if(typeof r=="number"&&r===83)return 0;break;case 84:if(typeof r=="number"&&r===84)return 0;break;case 85:if(typeof r=="number"&&r===85)return 0;break;case 86:if(typeof r=="number"&&r===86)return 0;break;case 87:if(typeof r=="number"&&r===87)return 0;break;case 88:if(typeof r=="number"&&r===88)return 0;break;case 89:if(typeof r=="number"&&r===89)return 0;break;case 90:if(typeof r=="number"&&r===90)return 0;break;case 91:if(typeof r=="number"&&r===91)return 0;break;case 92:if(typeof r=="number"&&r===92)return 0;break;case 93:if(typeof r=="number"&&r===93)return 0;break;case 94:if(typeof r=="number"&&r===94)return 0;break;case 95:if(typeof r=="number"&&r===95)return 0;break;case 96:if(typeof r=="number"&&r===96)return 0;break;case 97:if(typeof r=="number"&&r===97)return 0;break;case 98:if(typeof r=="number"&&r===98)return 0;break;case 99:if(typeof r=="number"&&r===99)return 0;break;case 100:if(typeof r=="number"&&st===r)return 0;break;case 101:if(typeof r=="number"&&Rt===r)return 0;break;case 102:if(typeof r=="number"&&Zf===r)return 0;break;case 103:if(typeof r=="number"&&nn===r)return 0;break;case 104:if(typeof r=="number"&&Dt===r)return 0;break;case 105:if(typeof r=="number"&&ft===r)return 0;break;case 106:if(typeof r=="number"&&f2===r)return 0;break;case 107:if(typeof r=="number"&&b2===r)return 0;break;case 108:if(typeof r=="number"&&sn===r)return 0;break;case 109:if(typeof r=="number"&&To===r)return 0;break;case 110:if(typeof r=="number"&&U1===r)return 0;break;case 111:if(typeof r=="number"&&Ot===r)return 0;break;case 112:if(typeof r=="number"&&M2===r)return 0;break;case 113:if(typeof r=="number"&&Nr===r)return 0;break;case 114:if(typeof r=="number"&&ct===r)return 0;break;case 115:if(typeof r=="number"&&Eo===r)return 0;break;case 116:if(typeof r=="number"&&Ri===r)return 0;break;default:if(typeof r=="number"&&dv<=r)return 0}else switch(e){case 0:if(typeof r=="number"&&!r)return 0;break;case 1:if(typeof r=="number"&&r===1)return 0;break;case 2:if(typeof r=="number"&&r===2)return 0;break;case 3:if(typeof r=="number"&&r===3)return 0;break;case 4:if(typeof r=="number"&&r===4)return 0;break;case 5:if(typeof r=="number"&&r===5)return 0;break;case 6:if(typeof r=="number"&&r===6)return 0;break;case 7:if(typeof r=="number"&&r===7)return 0;break;case 8:if(typeof r=="number"&&r===8)return 0;break;case 9:if(typeof r=="number"&&r===9)return 0;break;case 10:if(typeof r=="number"&&r===10)return 0;break;case 11:if(typeof r=="number"&&r===11)return 0;break;case 12:if(typeof r=="number"&&r===12)return 0;break;case 13:if(typeof r=="number"&&r===13)return 0;break;case 14:if(typeof r=="number"&&r===14)return 0;break;case 15:if(typeof r=="number"&&r===15)return 0;break;case 16:if(typeof r=="number"&&r===16)return 0;break;case 17:if(typeof r=="number"&&r===17)return 0;break;case 18:if(typeof r=="number"&&r===18)return 0;break;case 19:if(typeof r=="number"&&r===19)return 0;break;case 20:if(typeof r=="number"&&r===20)return 0;break;case 21:if(typeof r=="number"&&r===21)return 0;break;case 22:if(typeof r=="number"&&r===22)return 0;break;case 23:if(typeof r=="number"&&r===23)return 0;break;case 24:if(typeof r=="number"&&r===24)return 0;break;case 25:if(typeof r=="number"&&r===25)return 0;break;case 26:if(typeof r=="number"&&r===26)return 0;break;case 27:if(typeof r=="number"&&r===27)return 0;break;case 28:if(typeof r=="number"&&r===28)return 0;break;case 29:if(typeof r=="number"&&r===29)return 0;break;case 30:if(typeof r=="number"&&r===30)return 0;break;case 31:if(typeof r=="number"&&r===31)return 0;break;case 32:if(typeof r=="number"&&r===32)return 0;break;case 33:if(typeof r=="number"&&r===33)return 0;break;case 34:if(typeof r=="number"&&r===34)return 0;break;case 35:if(typeof r=="number"&&r===35)return 0;break;case 36:if(typeof r=="number"&&r===36)return 0;break;case 37:if(typeof r=="number"&&r===37)return 0;break;case 38:if(typeof r=="number"&&r===38)return 0;break;case 39:if(typeof r=="number"&&r===39)return 0;break;case 40:if(typeof r=="number"&&r===40)return 0;break;case 41:if(typeof r=="number"&&r===41)return 0;break;case 42:if(typeof r=="number"&&r===42)return 0;break;case 43:if(typeof r=="number"&&r===43)return 0;break;case 44:if(typeof r=="number"&&r===44)return 0;break;case 45:if(typeof r=="number"&&r===45)return 0;break;case 46:if(typeof r=="number"&&r===46)return 0;break;case 47:if(typeof r=="number"&&r===47)return 0;break;case 48:if(typeof r=="number"&&r===48)return 0;break;case 49:if(typeof r=="number"&&r===49)return 0;break;case 50:if(typeof r=="number"&&r===50)return 0;break;case 51:if(typeof r=="number"&&r===51)return 0;break;case 52:if(typeof r=="number"&&r===52)return 0;break;case 53:if(typeof r=="number"&&r===53)return 0;break;case 54:if(typeof r=="number"&&r===54)return 0;break;case 55:if(typeof r=="number"&&r===55)return 0;break;case 56:if(typeof r=="number"&&r===56)return 0;break;case 57:if(typeof r=="number"&&r===57)return 0;break;default:if(typeof r=="number"&&r===58)return 0}}else switch(x[0]){case 0:if(typeof r!="number"&&r[0]===0)return Tx(x[1],r[1]);break;case 1:if(typeof r!="number"&&r[0]===1)return Tx(x[1],r[1]);break;case 2:if(typeof r!="number"&&r[0]===2){var t=Tx(x[1],r[1]),u=r[2],i=x[2];return t===0?Tx(i,u):t}break;case 3:if(typeof r!="number"&&r[0]===3){var f=Tx(x[1],r[1]),o=r[2],a=x[2];return f===0?Tx(a,o):f}break;case 4:if(typeof r!="number"&&r[0]===4){var d=Tx(x[1],r[1]),k=r[2],T=x[2];return d===0?Tx(T,k):d}break;case 5:if(typeof r!="number"&&r[0]===5)return Tx(x[1],r[1]);break;case 6:if(typeof r!="number"&&r[0]===6)return Ut(x[1],r[1]);break;case 7:if(typeof r!="number"&&r[0]===7){var g=r[2],A=x[2],N=Tx(x[1],r[1]);if(N!==0)return N;if(!A)return g?-1:0;var R=A[1];return g?Tx(R,g[1]):1}break;case 8:if(typeof r!="number"&&r[0]===8)return Tx(x[1],r[1]);break;case 9:if(typeof r!="number"&&r[0]===9){var O=r[2],M=x[2],L=Tx(x[1],r[1]),z=r[3],V=x[3];if(L!==0)return L;if(M){var Z=M[1];if(O){var $=O[1],i0=0;switch(Z){case 0:if($)i0=1;else var Y=0;break;case 1:if($===1)var Y=0;else i0=1;break;case 2:if($===2)var Y=0;else i0=1;break;case 3:if($===3)var Y=0;else i0=1;break;default:if(4<=$)var Y=0;else i0=1}if(i0)var U=function(ox){switch(ox){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;default:return 4}},J=U($),Y=Ut(U(Z),J);var F=Y}else var F=1}else var F=O?-1:0;return F===0?Tx(V,z):F}break;case 10:if(typeof r!="number"&&r[0]===10){var n0=Tx(x[1],r[1]),Q=r[2],f0=x[2];return n0===0?Tx(f0,Q):n0}break;case 11:if(typeof r!="number"&&r[0]===11){var s0=Tx(x[1],r[1]),v0=r[2],o0=x[2];return s0===0?Tx(o0,v0):s0}break;case 12:if(typeof r!="number"&&r[0]===12)return Tx(x[1],r[1]);break;case 13:if(typeof r!="number"&&r[0]===13)return Tx(x[1],r[1]);break;case 14:if(typeof r!="number"&&r[0]===14)return Ut(x[1],r[1]);break;case 15:if(typeof r!="number"&&r[0]===15){var c0=Tx(x[1],r[1]),T0=r[4],E0=r[3],M0=r[2],Y0=x[4],rx=x[3],g0=x[2];if(c0!==0)return c0;var H0=Ut(g0,M0);if(H0!==0)return H0;var t0=Ut(rx,E0);return t0===0?Ut(Y0,T0):t0}break;case 16:if(typeof r!="number"&&r[0]===16){var ex=Ut(x[1],r[1]),xx=r[2],ax=x[2];return ex===0?Tx(ax,xx):ex}break;case 17:if(typeof r!="number"&&r[0]===17)return Ut(x[1],r[1]);break;case 18:if(typeof r!="number"&&r[0]===18)return Tx(x[1],r[1]);break;case 19:if(typeof r!="number"&&r[0]===19)return Tx(x[1],r[1]);break;case 20:if(typeof r!="number"&&r[0]===20)return Tx(x[1],r[1]);break;case 21:if(typeof r!="number"&&r[0]===21){var dx=Tx(x[1],r[1]),mx=r[2],L0=x[2];return dx===0?Tx(L0,mx):dx}break;case 22:if(typeof r!="number"&&r[0]===22){var C0=r[1],A0=x[1];if(dl===A0){if(dl===C0)return 0}else if(fl<=A0){if(fl===C0)return 0}else if(sY===C0)return 0;var U0=function(X0){return dl===X0?0:fl<=X0?2:1},Q0=U0(C0);return Ut(U0(A0),Q0)}break;case 23:if(typeof r!="number"&&r[0]===23)return Tx(x[1],r[1]);break;case 24:if(typeof r!="number"&&r[0]===24)return Tx(x[1],r[1]);break;case 25:if(typeof r!="number"&&r[0]===25){var H=Tx(x[1],r[1]),b=r[2],B=x[2];return H===0?Tx(B,b):H}break;case 26:if(typeof r!="number"&&r[0]===26){var a0=Tx(x[1],r[1]),m0=r[2],P0=x[2];return a0===0?Tx(P0,m0):a0}break;default:if(typeof r!="number"&&r[0]===27)return Tx(x[1],r[1])}function D(X0){if(typeof X0!="number")switch(X0[0]){case 0:return 20;case 1:return 21;case 2:return 23;case 3:return 24;case 4:return 25;case 5:return 26;case 6:return 27;case 7:return 28;case 8:return 30;case 9:return 31;case 10:return 32;case 11:return 34;case 12:return 35;case 13:return 37;case 14:return 40;case 15:return 52;case 16:return 55;case 17:return 57;case 18:return 66;case 19:return 75;case 20:return 84;case 21:return 91;case 22:return Ot;case 23:return Pa;case 24:return Lf;case 25:return Ep;case 26:return Rj;default:return TB}var D0=X0;if(59<=D0)switch(D0){case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 82;case 63:return 83;case 64:return 85;case 65:return 86;case 66:return 87;case 67:return 88;case 68:return 89;case 69:return 90;case 70:return 92;case 71:return 93;case 72:return 94;case 73:return 95;case 74:return 96;case 75:return 97;case 76:return 98;case 77:return 99;case 78:return st;case 79:return Rt;case 80:return Zf;case 81:return nn;case 82:return Dt;case 83:return ft;case 84:return f2;case 85:return b2;case 86:return sn;case 87:return To;case 88:return U1;case 89:return M2;case 90:return Nr;case 91:return ct;case 92:return Eo;case 93:return Ri;case 94:return dv;case 95:return ya;case 96:return ul;case 97:return x1;case 98:return It;case 99:return Ma;case 100:return Di;case 101:return K4;case 102:return Jr;case 103:return h1;case 104:return _l;case 105:return ud;case 106:return xN;case 107:return iD;case 108:return YU;case 109:return hY;case 110:return $j;case 111:return VD;case 112:return jw;case 113:return rU;case 114:return mj;case 115:return KU;case 116:return LB;default:return ej}switch(D0){case 0:return 0;case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 6;case 7:return 7;case 8:return 8;case 9:return 9;case 10:return 10;case 11:return 11;case 12:return 12;case 13:return 13;case 14:return 14;case 15:return 15;case 16:return 16;case 17:return 17;case 18:return 18;case 19:return 19;case 20:return 22;case 21:return 29;case 22:return 33;case 23:return 36;case 24:return 38;case 25:return 39;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 53;case 38:return 54;case 39:return 56;case 40:return 58;case 41:return 59;case 42:return 60;case 43:return 61;case 44:return 62;case 45:return 63;case 46:return 64;case 47:return 65;case 48:return 67;case 49:return 68;case 50:return 69;case 51:return 70;case 52:return 71;case 53:return 72;case 54:return 73;case 55:return 74;case 56:return 76;case 57:return 77;default:return 78}}var N0=D(r);return Ut(D(x),N0)});var hS0=[Gr,ax0,Js(0)],_S0=function(x){if(typeof x=="number"){var r=x;if(59<=r)switch(r){case 59:return ob;case 60:return vb;case 61:return ab;case 62:return lb;case 63:return pb;case 64:return db;case 65:return yb;case 66:return mb;case 67:return kb;case 68:return hb;case 69:return _b;case 70:return wb;case 71:return Tb;case 72:return Sb;case 73:return Eb;case 74:return gb;case 75:return Ab;case 76:return Pb;case 77:return Cb;case 78:return Nb;case 79:return Rb;case 80:return Ob;case 81:return Ib;case 82:return Lb;case 83:return Mb;case 84:return Db;case 85:return jb;case 86:return Ub;case 87:return Bb;case 88:return Yb;case 89:return Xb;case 90:return Jb;case 91:return Vb;case 92:return zb;case 93:return Kb;case 94:return Zb;case 95:return Wb;case 96:return $b;case 97:return Qb;case 98:return Fb;case 99:return Hb;case 100:return qb;case 101:return Gb;case 102:return bb;case 103:return x00;case 104:return r00;case 105:return e00;case 106:return t00;case 107:return n00;case 108:return u00;case 109:return i00;case 110:return f00;case 111:return c00;case 112:return s00;case 113:return o00;case 114:return v00;case 115:return a00;case 116:return l00;default:return p00}switch(r){case 0:return eG;case 1:return tG;case 2:return nG;case 3:return Qx(iG,uG);case 4:return fG;case 5:return cG;case 6:return sG;case 7:return oG;case 8:return vG;case 9:return aG;case 10:return lG;case 11:return pG;case 12:return Qx(yG,dG);case 13:return mG;case 14:return kG;case 15:return hG;case 16:return _G;case 17:return wG;case 18:return TG;case 19:return SG;case 20:return EG;case 21:return gG;case 22:return AG;case 23:return PG;case 24:return CG;case 25:return NG;case 26:return RG;case 27:return OG;case 28:return IG;case 29:return LG;case 30:return MG;case 31:return DG;case 32:return jG;case 33:return UG;case 34:return Qx(YG,BG);case 35:return XG;case 36:return JG;case 37:return VG;case 38:return zG;case 39:return KG;case 40:return ZG;case 41:return WG;case 42:return $G;case 43:return QG;case 44:return FG;case 45:return HG;case 46:return qG;case 47:return GG;case 48:return bG;case 49:return xb;case 50:return rb;case 51:return eb;case 52:return tb;case 53:return nb;case 54:return ub;case 55:return ib;case 56:return fb;case 57:return cb;default:return sb}}switch(x[0]){case 0:var e=x[1];return l(Tr(d00),e);case 1:var t=x[1];return l(Tr(y00),t);case 2:var u=x[2],i=x[1];return p(Tr(m00),u,i);case 3:var f=x[2],o=x[1];return G0(Tr(k00),f,f,o);case 4:var a=x[2],d=x[1];return p(Tr(h00),a,d);case 5:var k=x[1];return l(Tr(_00),k);case 6:return x[1]?w00:T00;case 7:var T=x[2],g=x[1],A=l(Tr(S00),g);if(!T)return l(Tr(g00),A);var N=T[1];return p(Tr(E00),N,A);case 8:var R=x[1];return p(Tr(A00),R,R);case 9:var O=x[3],M=x[2],L=x[1];if(!M)return p(Tr(N00),O,L);var z=M[1];if(z===3)return p(Tr(C00),O,L);switch(z){case 0:var V=lH;break;case 1:var V=pH;break;case 2:var V=dH;break;case 3:var V=yH;break;default:var V=mH}return oe(Tr(P00),L,V,O,V);case 10:var Z=x[2],$=x[1],i0=dX(Z);return G0(Tr(R00),Z,i0,$);case 11:var U=x[2],J=x[1];return p(Tr(O00),U,J);case 12:var Y=x[1];return l(Tr(I00),Y);case 13:var F=x[1];return l(Tr(L00),F);case 14:return x[1]?Qx(D00,M00):Qx(U00,j00);case 15:var n0=x[1],Q=x[4],f0=x[3],s0=x[2]?B00:Y00,v0=f0?X00:J00,o0=Q?Qx(V00,n0):n0;return G0(Tr(z00),s0,v0,o0);case 16:var c0=x[2],T0=[0,0],E0=[0,Xx(c0)],M0=Xx(c0)-1|0,Y0=x[1];if(M0>=0)for(var rx=M0;;){if(fx(c0,rx)===45){var g0=T0[1];T0[1]=[0,m2(c0,rx+1|0,(E0[1]-rx|0)-1|0),g0],E0[1]=rx}var H0=rx-1|0;if(rx!==0){var rx=H0;continue}break}var t0=T0[1],ex=m2(c0,0,E0[1]);if(t0)for(var xx=[0,ex,_n(dX,t0)],ax=0,dx=xx,mx=0;;){if(dx){var L0=dx[1];if(dx[2]){var C0=(Xx(L0)|0)+ax|0,A0=dx[2],U0=ax<=C0?C0:y2(XW),ax=U0,dx=A0;continue}var Q0=Xx(L0)+ax|0}else var Q0=ax;for(var H=S1(Q0),b=mx,B=xx;;){if(B){var a0=B[1];if(B[2]){var m0=B[2];rs(a0,0,H,b,Xx(a0)),rs(hx,0,H,b+Xx(a0)|0,0);var b=b+Xx(a0)|0|0,B=m0;continue}rs(a0,0,H,b,Xx(a0))}var P0=g2(H);break}break}else var P0=ex;var D=Y0?K00:Z00;return G0(Tr(W00),c0,P0,D);case 17:var N0=x[1]?$00:Q00;return l(Tr(F00),N0);case 18:var X0=x[1];return l(Tr(H00),X0);case 19:var D0=x[1];return l(Tr(q00),D0);case 20:var ox=x[1];return l(Tr(G00),ox);case 21:var b0=x[2],kx=x[1];return p(Tr(b00),kx,b0);case 22:var V0=x[1];if(dl===V0)var h=nx0,X=ux0;else if(fl<=V0)var h=xx0,X=rx0;else var h=ex0,X=tx0;return p(Tr(ix0),X,h);case 23:var W0=x[1];return l(Tr(fx0),W0);case 24:var sx=x[1];return l(Tr(cx0),sx);case 25:var tx=x[2],j0=x[1];return p(Tr(sx0),j0,tx);case 26:var Px=x[2],Ex=x[1];return p(Tr(ox0),Ex,Px);default:var Ix=x[1];return l(Tr(vx0),Ix)}},IJ=lx0.slice(),qO=function(x){for(var r=0,e=IJ.length-1-1|0;;){if(ex)return 1;var r=t+1|0}},LJ=0,MJ=function(x){var r=x[2];return[0,x[1],[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12]],x[3],x[4],x[5],x[6],x[7]]},DJ=function(x){return x[3][1]},Ey=function(x,r){return x!==r[4]?[0,r[1],r[2],r[3],x,r[5],r[6],r[7]]:r},GO=function x(r,e){return x.fun(r,e)},jJ=function x(r,e){return x.fun(r,e)},bO=function x(r,e){return x.fun(r,e)},xI=function x(r,e){return x.fun(r,e)};O0(GO,function(x,r){if(typeof x=="number"){var e=x;if(66<=e)if(99<=e)switch(e){case 99:if(typeof r=="number"&&r===99)return 1;break;case 100:if(typeof r=="number"&&st===r)return 1;break;case 101:if(typeof r=="number"&&Rt===r)return 1;break;case 102:if(typeof r=="number"&&Zf===r)return 1;break;case 103:if(typeof r=="number"&&nn===r)return 1;break;case 104:if(typeof r=="number"&&Dt===r)return 1;break;case 105:if(typeof r=="number"&&ft===r)return 1;break;case 106:if(typeof r=="number"&&f2===r)return 1;break;case 107:if(typeof r=="number"&&b2===r)return 1;break;case 108:if(typeof r=="number"&&sn===r)return 1;break;case 109:if(typeof r=="number"&&To===r)return 1;break;case 110:if(typeof r=="number"&&U1===r)return 1;break;case 111:if(typeof r=="number"&&Ot===r)return 1;break;case 112:if(typeof r=="number"&&M2===r)return 1;break;case 113:if(typeof r=="number"&&Nr===r)return 1;break;case 114:if(typeof r=="number"&&ct===r)return 1;break;case 115:if(typeof r=="number"&&Eo===r)return 1;break;case 116:if(typeof r=="number"&&Ri===r)return 1;break;case 117:if(typeof r=="number"&&dv===r)return 1;break;case 118:if(typeof r=="number"&&ya===r)return 1;break;case 119:if(typeof r=="number"&&Pa===r)return 1;break;case 120:if(typeof r=="number"&&Lf===r)return 1;break;case 121:if(typeof r=="number"&&ul===r)return 1;break;case 122:if(typeof r=="number"&&x1===r)return 1;break;case 123:if(typeof r=="number"&&It===r)return 1;break;case 124:if(typeof r=="number"&&Ma===r)return 1;break;case 125:if(typeof r=="number"&&Di===r)return 1;break;case 126:if(typeof r=="number"&&K4===r)return 1;break;case 127:if(typeof r=="number"&&Jr===r)return 1;break;case 128:if(typeof r=="number"&&h1===r)return 1;break;case 129:if(typeof r=="number"&&_l===r)return 1;break;case 130:if(typeof r=="number"&&ud===r)return 1;break;default:if(typeof r=="number"&&Ep<=r)return 1}else switch(e){case 66:if(typeof r=="number"&&r===66)return 1;break;case 67:if(typeof r=="number"&&r===67)return 1;break;case 68:if(typeof r=="number"&&r===68)return 1;break;case 69:if(typeof r=="number"&&r===69)return 1;break;case 70:if(typeof r=="number"&&r===70)return 1;break;case 71:if(typeof r=="number"&&r===71)return 1;break;case 72:if(typeof r=="number"&&r===72)return 1;break;case 73:if(typeof r=="number"&&r===73)return 1;break;case 74:if(typeof r=="number"&&r===74)return 1;break;case 75:if(typeof r=="number"&&r===75)return 1;break;case 76:if(typeof r=="number"&&r===76)return 1;break;case 77:if(typeof r=="number"&&r===77)return 1;break;case 78:if(typeof r=="number"&&r===78)return 1;break;case 79:if(typeof r=="number"&&r===79)return 1;break;case 80:if(typeof r=="number"&&r===80)return 1;break;case 81:if(typeof r=="number"&&r===81)return 1;break;case 82:if(typeof r=="number"&&r===82)return 1;break;case 83:if(typeof r=="number"&&r===83)return 1;break;case 84:if(typeof r=="number"&&r===84)return 1;break;case 85:if(typeof r=="number"&&r===85)return 1;break;case 86:if(typeof r=="number"&&r===86)return 1;break;case 87:if(typeof r=="number"&&r===87)return 1;break;case 88:if(typeof r=="number"&&r===88)return 1;break;case 89:if(typeof r=="number"&&r===89)return 1;break;case 90:if(typeof r=="number"&&r===90)return 1;break;case 91:if(typeof r=="number"&&r===91)return 1;break;case 92:if(typeof r=="number"&&r===92)return 1;break;case 93:if(typeof r=="number"&&r===93)return 1;break;case 94:if(typeof r=="number"&&r===94)return 1;break;case 95:if(typeof r=="number"&&r===95)return 1;break;case 96:if(typeof r=="number"&&r===96)return 1;break;case 97:if(typeof r=="number"&&r===97)return 1;break;default:if(typeof r=="number"&&r===98)return 1}else if(33<=e)switch(e){case 33:if(typeof r=="number"&&r===33)return 1;break;case 34:if(typeof r=="number"&&r===34)return 1;break;case 35:if(typeof r=="number"&&r===35)return 1;break;case 36:if(typeof r=="number"&&r===36)return 1;break;case 37:if(typeof r=="number"&&r===37)return 1;break;case 38:if(typeof r=="number"&&r===38)return 1;break;case 39:if(typeof r=="number"&&r===39)return 1;break;case 40:if(typeof r=="number"&&r===40)return 1;break;case 41:if(typeof r=="number"&&r===41)return 1;break;case 42:if(typeof r=="number"&&r===42)return 1;break;case 43:if(typeof r=="number"&&r===43)return 1;break;case 44:if(typeof r=="number"&&r===44)return 1;break;case 45:if(typeof r=="number"&&r===45)return 1;break;case 46:if(typeof r=="number"&&r===46)return 1;break;case 47:if(typeof r=="number"&&r===47)return 1;break;case 48:if(typeof r=="number"&&r===48)return 1;break;case 49:if(typeof r=="number"&&r===49)return 1;break;case 50:if(typeof r=="number"&&r===50)return 1;break;case 51:if(typeof r=="number"&&r===51)return 1;break;case 52:if(typeof r=="number"&&r===52)return 1;break;case 53:if(typeof r=="number"&&r===53)return 1;break;case 54:if(typeof r=="number"&&r===54)return 1;break;case 55:if(typeof r=="number"&&r===55)return 1;break;case 56:if(typeof r=="number"&&r===56)return 1;break;case 57:if(typeof r=="number"&&r===57)return 1;break;case 58:if(typeof r=="number"&&r===58)return 1;break;case 59:if(typeof r=="number"&&r===59)return 1;break;case 60:if(typeof r=="number"&&r===60)return 1;break;case 61:if(typeof r=="number"&&r===61)return 1;break;case 62:if(typeof r=="number"&&r===62)return 1;break;case 63:if(typeof r=="number"&&r===63)return 1;break;case 64:if(typeof r=="number"&&r===64)return 1;break;default:if(typeof r=="number"&&r===65)return 1}else switch(e){case 0:if(typeof r=="number"&&!r)return 1;break;case 1:if(typeof r=="number"&&r===1)return 1;break;case 2:if(typeof r=="number"&&r===2)return 1;break;case 3:if(typeof r=="number"&&r===3)return 1;break;case 4:if(typeof r=="number"&&r===4)return 1;break;case 5:if(typeof r=="number"&&r===5)return 1;break;case 6:if(typeof r=="number"&&r===6)return 1;break;case 7:if(typeof r=="number"&&r===7)return 1;break;case 8:if(typeof r=="number"&&r===8)return 1;break;case 9:if(typeof r=="number"&&r===9)return 1;break;case 10:if(typeof r=="number"&&r===10)return 1;break;case 11:if(typeof r=="number"&&r===11)return 1;break;case 12:if(typeof r=="number"&&r===12)return 1;break;case 13:if(typeof r=="number"&&r===13)return 1;break;case 14:if(typeof r=="number"&&r===14)return 1;break;case 15:if(typeof r=="number"&&r===15)return 1;break;case 16:if(typeof r=="number"&&r===16)return 1;break;case 17:if(typeof r=="number"&&r===17)return 1;break;case 18:if(typeof r=="number"&&r===18)return 1;break;case 19:if(typeof r=="number"&&r===19)return 1;break;case 20:if(typeof r=="number"&&r===20)return 1;break;case 21:if(typeof r=="number"&&r===21)return 1;break;case 22:if(typeof r=="number"&&r===22)return 1;break;case 23:if(typeof r=="number"&&r===23)return 1;break;case 24:if(typeof r=="number"&&r===24)return 1;break;case 25:if(typeof r=="number"&&r===25)return 1;break;case 26:if(typeof r=="number"&&r===26)return 1;break;case 27:if(typeof r=="number"&&r===27)return 1;break;case 28:if(typeof r=="number"&&r===28)return 1;break;case 29:if(typeof r=="number"&&r===29)return 1;break;case 30:if(typeof r=="number"&&r===30)return 1;break;case 31:if(typeof r=="number"&&r===31)return 1;break;default:if(typeof r=="number"&&r===32)return 1}}else switch(x[0]){case 0:if(typeof r!="number"&&r[0]===0){var t=r[2],u=r[1],i=x[2],f=l(l(bO,x[1]),u);return f&&Ar(i,t)}break;case 1:if(typeof r!="number"&&r[0]===1){var o=r[2],a=r[1],d=x[2],k=l(l(xI,x[1]),a);return k&&Ar(d,o)}break;case 2:if(typeof r!="number"&&r[0]===2){var T=r[1],g=x[1],A=T[4],N=T[3],R=T[2],O=g[4],M=g[3],L=g[2],z=Mo(g[1],T[1]),V=z&&Ar(L,R),Z=V&&Ar(M,N);return Z&&(O===A?1:0)}break;case 3:if(typeof r!="number"&&r[0]===3){var $=r[1],i0=x[1],U=$[5],J=$[4],Y=$[3],F=$[2],n0=i0[5],Q=i0[4],f0=i0[3],s0=i0[2],v0=Mo(i0[1],$[1]),o0=v0&&Ar(s0,F),c0=o0&&Ar(f0,Y),T0=c0&&(Q===J?1:0);return T0&&(n0===U?1:0)}break;case 4:if(typeof r!="number"&&r[0]===4){var E0=r[3],M0=r[2],Y0=x[3],rx=x[2],g0=Mo(x[1],r[1]),H0=g0&&Ar(rx,M0);return H0&&Ar(Y0,E0)}break;case 5:if(typeof r!="number"&&r[0]===5){var t0=r[3],ex=r[2],xx=x[3],ax=x[2],dx=Mo(x[1],r[1]),mx=dx&&Ar(ax,ex);return mx&&Ar(xx,t0)}break;case 6:if(typeof r!="number"&&r[0]===6){var L0=r[2],C0=x[2],A0=Mo(x[1],r[1]);return A0&&Ar(C0,L0)}break;case 7:if(typeof r!="number"&&r[0]===7)return Ar(x[1],r[1]);break;case 8:if(typeof r!="number"&&r[0]===8){var U0=Ar(x[1],r[1]),Q0=r[2],H=x[2];return U0&&Mo(H,Q0)}break;case 9:if(typeof r!="number"&&r[0]===9){var b=r[3],B=r[2],a0=x[3],m0=x[2],P0=Mo(x[1],r[1]),D=P0&&Ar(m0,B);return D&&Ar(a0,b)}break;case 10:if(typeof r!="number"&&r[0]===10){var N0=r[3],X0=r[2],D0=x[3],ox=x[2],b0=Mo(x[1],r[1]),kx=b0&&Ar(ox,X0);return kx&&Ar(D0,N0)}break;case 11:if(typeof r!="number"&&r[0]===11){var V0=r[1];return l(l(jJ,x[1]),V0)}break;case 12:if(typeof r!="number"&&r[0]===12){var h=r[3],X=r[2],W0=r[1],sx=x[3],tx=x[2],j0=l(l(bO,x[1]),W0),Px=j0&&(tx==X?1:0);return Px&&Ar(sx,h)}break;default:if(typeof r!="number"&&r[0]===13){var Ex=r[2],Ix=x[2],qx=r[3],B0=r[1],tr=x[3],Ux=l(l(xI,x[1]),B0);if(Ux){var K0=0;if(Ix)if(Ex)var ur=Cl(Ix[1],Ex[1]);else K0=1;else if(Ex)K0=1;else var ur=1;if(K0)var ur=0;var z0=ur}else var z0=Ux;return z0&&Ar(tr,qx)}}return 0}),O0(jJ,function(x,r){if(x){if(r)return 1}else if(!r)return 1;return 0}),O0(bO,function(x,r){switch(x){case 0:if(!r)return 1;break;case 1:if(r===1)return 1;break;case 2:if(r===2)return 1;break;case 3:if(r===3)return 1;break;default:if(4<=r)return 1}return 0}),O0(xI,function(x,r){switch(x){case 0:if(!r)return 1;break;case 1:if(r===1)return 1;break;default:if(2<=r)return 1}return 0});var UJ=function(x){if(typeof x!="number")switch(x[0]){case 0:return Yt0;case 1:return Xt0;case 2:return Jt0;case 3:return Vt0;case 4:return zt0;case 5:return Kt0;case 6:return Zt0;case 7:return Wt0;case 8:return $t0;case 9:return Qt0;case 10:return Ft0;case 11:return Ht0;case 12:return qt0;default:return Gt0}var r=x;if(66<=r){if(99<=r)switch(r){case 99:return it0;case 100:return ft0;case 101:return ct0;case 102:return st0;case 103:return ot0;case 104:return vt0;case 105:return at0;case 106:return lt0;case 107:return pt0;case 108:return dt0;case 109:return yt0;case 110:return mt0;case 111:return kt0;case 112:return ht0;case 113:return _t0;case 114:return wt0;case 115:return Tt0;case 116:return St0;case 117:return Et0;case 118:return gt0;case 119:return At0;case 120:return Pt0;case 121:return Ct0;case 122:return Nt0;case 123:return Rt0;case 124:return Ot0;case 125:return It0;case 126:return Lt0;case 127:return Mt0;case 128:return Dt0;case 129:return jt0;case 130:return Ut0;default:return Bt0}switch(r){case 66:return Pe0;case 67:return Ce0;case 68:return Ne0;case 69:return Re0;case 70:return Oe0;case 71:return Ie0;case 72:return Le0;case 73:return Me0;case 74:return De0;case 75:return je0;case 76:return Ue0;case 77:return Be0;case 78:return Ye0;case 79:return Xe0;case 80:return Je0;case 81:return Ve0;case 82:return ze0;case 83:return Ke0;case 84:return Ze0;case 85:return We0;case 86:return $e0;case 87:return Qe0;case 88:return Fe0;case 89:return He0;case 90:return qe0;case 91:return Ge0;case 92:return be0;case 93:return xt0;case 94:return rt0;case 95:return et0;case 96:return tt0;case 97:return nt0;default:return ut0}}if(33<=r)switch(r){case 33:return Q20;case 34:return F20;case 35:return H20;case 36:return q20;case 37:return G20;case 38:return b20;case 39:return xe0;case 40:return re0;case 41:return ee0;case 42:return te0;case 43:return ne0;case 44:return ue0;case 45:return ie0;case 46:return fe0;case 47:return ce0;case 48:return se0;case 49:return oe0;case 50:return ve0;case 51:return ae0;case 52:return le0;case 53:return pe0;case 54:return de0;case 55:return ye0;case 56:return me0;case 57:return ke0;case 58:return he0;case 59:return _e0;case 60:return we0;case 61:return Te0;case 62:return Se0;case 63:return Ee0;case 64:return ge0;default:return Ae0}switch(r){case 0:return d20;case 1:return y20;case 2:return m20;case 3:return k20;case 4:return h20;case 5:return _20;case 6:return w20;case 7:return T20;case 8:return S20;case 9:return E20;case 10:return g20;case 11:return A20;case 12:return P20;case 13:return C20;case 14:return N20;case 15:return R20;case 16:return O20;case 17:return I20;case 18:return L20;case 19:return M20;case 20:return D20;case 21:return j20;case 22:return U20;case 23:return B20;case 24:return Y20;case 25:return X20;case 26:return J20;case 27:return V20;case 28:return z20;case 29:return K20;case 30:return Z20;case 31:return W20;default:return $20}},rI=function(x){if(typeof x!="number")switch(x[0]){case 0:return x[2];case 1:return x[2];case 2:return x[1][3];case 3:var r=x[1],e=r[5],t=r[4],u=r[3];return t&&e?Qx(n20,Qx(u,t20)):t?Qx(i20,Qx(u,u20)):e?Qx(c20,Qx(u,f20)):Qx(o20,Qx(u,s20));case 4:return x[3];case 5:var i=x[2];return Qx(a20,Qx(i,Qx(v20,x[3])));case 6:return x[2];case 7:return x[1];case 8:return x[1];case 9:return x[3];case 10:return x[3];case 11:return x[1]?l20:p20;case 12:return x[3];default:return x[3]}var f=x;if(66<=f){if(99<=f)switch(f){case 99:return E10;case 100:return g10;case 101:return A10;case 102:return P10;case 103:return C10;case 104:return N10;case 105:return R10;case 106:return O10;case 107:return I10;case 108:return L10;case 109:return M10;case 110:return D10;case 111:return j10;case 112:return U10;case 113:return B10;case 114:return Y10;case 115:return X10;case 116:return J10;case 117:return V10;case 118:return z10;case 119:return K10;case 120:return Z10;case 121:return W10;case 122:return $10;case 123:return Q10;case 124:return F10;case 125:return H10;case 126:return q10;case 127:return G10;case 128:return b10;case 129:return x20;case 130:return r20;default:return e20}switch(f){case 66:return Zr0;case 67:return Wr0;case 68:return $r0;case 69:return Qr0;case 70:return Fr0;case 71:return Hr0;case 72:return qr0;case 73:return Gr0;case 74:return br0;case 75:return x10;case 76:return r10;case 77:return e10;case 78:return t10;case 79:return n10;case 80:return u10;case 81:return i10;case 82:return f10;case 83:return c10;case 84:return s10;case 85:return o10;case 86:return v10;case 87:return a10;case 88:return l10;case 89:return p10;case 90:return d10;case 91:return y10;case 92:return m10;case 93:return k10;case 94:return h10;case 95:return _10;case 96:return w10;case 97:return T10;default:return S10}}if(33<=f)switch(f){case 33:return ar0;case 34:return lr0;case 35:return pr0;case 36:return dr0;case 37:return yr0;case 38:return mr0;case 39:return kr0;case 40:return hr0;case 41:return _r0;case 42:return wr0;case 43:return Tr0;case 44:return Sr0;case 45:return Er0;case 46:return gr0;case 47:return Ar0;case 48:return Pr0;case 49:return Cr0;case 50:return Nr0;case 51:return Rr0;case 52:return Or0;case 53:return Ir0;case 54:return Lr0;case 55:return Mr0;case 56:return Dr0;case 57:return jr0;case 58:return Ur0;case 59:return Br0;case 60:return Yr0;case 61:return Xr0;case 62:return Jr0;case 63:return Vr0;case 64:return zr0;default:return Kr0}switch(f){case 0:return Lx0;case 1:return Mx0;case 2:return Dx0;case 3:return jx0;case 4:return Ux0;case 5:return Bx0;case 6:return Yx0;case 7:return Xx0;case 8:return Jx0;case 9:return Vx0;case 10:return zx0;case 11:return Kx0;case 12:return Zx0;case 13:return Wx0;case 14:return $x0;case 15:return Qx0;case 16:return Fx0;case 17:return Hx0;case 18:return qx0;case 19:return Gx0;case 20:return bx0;case 21:return xr0;case 22:return rr0;case 23:return er0;case 24:return tr0;case 25:return nr0;case 26:return ur0;case 27:return ir0;case 28:return fr0;case 29:return cr0;case 30:return sr0;case 31:return or0;default:return vr0}},gy=function(x){return l(Tr(Ix0),x)},eI=function(x,r){var e=x?x[1]:0,t=0;if(typeof r=="number")if(Nr===r)var u=yx0,i=mx0;else t=1;else switch(r[0]){case 3:var u=kx0,i=hx0;break;case 5:var u=_x0,i=wx0;break;case 0:case 12:var u=Sx0,i=Ex0;break;case 1:case 13:var u=gx0,i=Ax0;break;case 4:case 8:var u=Nx0,i=Rx0;break;case 6:case 7:case 11:t=1;break;default:var u=Px0,i=Cx0}if(t)var u=Tx0,i=gy(rI(r));return e?Qx(u,Qx(Ox0,i)):i},wS0=function(x){return Rv>>0)var t=_(x);else switch(e){case 0:var t=1;break;case 1:var t=2;break;case 2:var t=0;break;default:if(r0(x,2),Xo(m(x))===0){var u=Vv(m(x));if(u===0)var t=Pr(m(x))===0&&Pr(m(x))===0&&Pr(m(x))===0?0:_(x);else if(u===1&&Pr(m(x))===0)for(;;){var i=Jv(m(x));if(i!==0){var t=i===1?0:_(x);break}}else var t=_(x)}else var t=_(x)}if(2>>0)throw q0([0,wr,bt0],1);switch(t){case 0:continue;case 1:return 1;default:if(qO(lJ(x)))continue;return dJ(x,1),0}}},Hy=function(x,r){var e=r-x[3][2]|0;return[0,DJ(x),e]},t6=function(x,r,e){var t=Hy(x,e),u=Hy(x,r);return[0,x[1],u,t]},h2=function(x,r){return Hy(x,r[6])},pe=function(x,r){return Hy(x,r[3])},Vr=function(x,r){return t6(x,r[6],r[3])},fV=function(x,r){var e=0;if(typeof r=="number")e=1;else switch(r[0]){case 2:var t=r[1][1];break;case 3:return r[1][1];case 4:var t=r[1];break;case 5:return r[1];case 8:var t=r[2];break;case 9:return r[1];case 10:return r[1];default:e=1}return e?Vr(x,x[2]):t},_2=function(x,r,e){return[0,x[1],x[2],x[3],x[4],x[5],[0,[0,r,e],x[6]],x[7]]},cV=function(x,r,e){return _2(x,r,[24,gy(e)])},cI=function(x,r,e,t){return _2(x,r,[25,e,t])},pt=function(x,r){return _2(x,r,ks0)},z2=function(x,r){var e=r[3],t=[0,DJ(x)+1|0,e];return[0,x[1],x[2],t,x[4],x[5],x[6],x[7]]},zt=function(x,r,e,t,u){var i=[0,x[1],r,e],f=Y1(t),o=u?0:1;return[0,i,[0,o,f,x[7][3][1]>>0)var a=_(t);else switch(o){case 0:var a=2;break;case 1:for(;;){r0(t,3);var d=m(t),k=-1>>0)return Nx(vs0);switch(a){case 0:var A=oV(i,e,t,2,0),N=A[1],R=ot(Qx(as0,A[2])),O=0<=R?1:0,M=O&&(R<=55295?1:0);if(M)var z=M;else var L=57344<=R?1:0,z=L&&(R<=_5?1:0);var V=z?sV(i,N,R):_2(i,N,32);is(u,R);var i=V;continue;case 1:var Z=oV(i,e,t,3,1),$=Z[1],i0=ot(Qx(ls0,Z[2])),U=sV(i,$,i0);is(u,i0);var i=U;continue;case 2:return[0,i,Y1(u)];default:wy(t,u);continue}}},C1=function(x,r,e){var t=pt(x,Vr(x,r));return qa(r),p(e,t,r)},Kv=function(x,r,e){for(var t=x;;){yr(e);var u=m(e),i=-1>>0)var f=_(e);else switch(i){case 0:for(;;){r0(e,3);var o=m(e),a=-1>>0){var T=pt(t,Vr(t,e));return[0,T,pe(T,e)]}switch(f){case 0:var g=z2(t,e);wy(e,r);var t=g;continue;case 1:var A=t[4]?cI(t,Vr(t,e),en0,rn0):t;return[0,A,pe(A,e)];case 2:if(t[4])return[0,t,pe(t,e)];vr(r,tn0);continue;default:wy(e,r);continue}}},e3=function(x,r,e){for(;;){yr(e);var t=m(e),u=13>>0)var i=_(e);else switch(u){case 0:var i=0;break;case 1:for(;;){r0(e,2);var f=m(e),o=-1>>0)return Nx(nn0);switch(i){case 0:return[0,x,pe(x,e)];case 1:var a=pe(x,e),d=a[2],k=a[1],T=z2(x,e);return[0,T,[0,k,d-_y(e)|0]];default:wy(e,r);continue}}},aV=function(x,r){function e($){return r0($,3),V2(m($))===0?2:_($)}yr(r);var t=m(r),u=Lf>>0)var i=_(r);else switch(u){case 0:var i=0;break;case 1:var i=16;break;case 2:var i=15;break;case 3:r0(r,15);var i=le(m(r))===0?15:_(r);break;case 4:r0(r,4);var i=V2(m(r))===0?e(r):_(r);break;case 5:r0(r,11);var i=V2(m(r))===0?e(r):_(r);break;case 6:var i=0;break;case 7:var i=5;break;case 8:var i=6;break;case 9:var i=7;break;case 10:var i=8;break;case 11:var i=9;break;case 12:r0(r,14);var f=Vv(m(r));if(f===0)var i=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?12:_(r);else if(f===1&&Pr(m(r))===0)for(;;){var o=Jv(m(r));if(o!==0){var i=o===1?13:_(r);break}}else var i=_(r);break;case 13:var i=10;break;default:r0(r,14);var i=Pr(m(r))===0&&Pr(m(r))===0?1:_(r)}if(16>>0)return Nx(qc0);switch(i){case 0:var a=Jx(r);return[0,x,a,n1(r),0];case 1:var d=Jx(r);return[0,x,d,[0,ot(Qx(Gc0,d))],0];case 2:var k=Jx(r),T=ot(Qx(bc0,k));return H3<=T?[0,x,k,[0,T>>>3|0,48+(T&7)|0],1]:[0,x,k,[0,T],1];case 3:var g=Jx(r);return[0,x,g,[0,ot(Qx(xs0,g))],1];case 4:return[0,x,rs0,[0,0],0];case 5:return[0,x,es0,[0,8],0];case 6:return[0,x,ts0,[0,12],0];case 7:return[0,x,ns0,[0,10],0];case 8:return[0,x,us0,[0,13],0];case 9:return[0,x,is0,[0,9],0];case 10:return[0,x,fs0,[0,11],0];case 11:var A=Jx(r);return[0,x,A,[0,ot(Qx(cs0,A))],1];case 12:var N=Jx(r);return[0,x,N,[0,ot(Qx(ss0,m2(N,1,Xx(N)-1|0)))],0];case 13:var R=Jx(r),O=ot(Qx(os0,m2(R,2,Xx(R)-3|0))),M=_5>>0)var k=_(i);else switch(d){case 0:var k=3;break;case 1:for(;;){r0(i,4);var T=m(i),g=-1>>0)return Nx(un0);switch(k){case 0:var A=Jx(i);if(vr(t,A),Ar(r,A))return[0,f,pe(f,i),o];vr(e,A);continue;case 1:vr(t,in0);var N=aV(f,i),R=N[4],O=N[3],M=N[2],L=N[1],z=R||o;vr(t,M),mX(function(f0){return is(e,f0)},O);var f=L,o=z;continue;case 2:var V=Jx(i);vr(t,V);var Z=z2(pt(f,Vr(f,i)),i);return vr(e,V),[0,Z,pe(Z,i),o];case 3:var $=Jx(i);vr(t,$);var i0=pt(f,Vr(f,i));return vr(e,$),[0,i0,pe(i0,i),o];default:var U=i[6],J=i[3]-U|0,Y=S1(J*4|0),F=Hl(i[1],U,J,Y);mO(t,Y,0,F),mO(e,Y,0,F);continue}}},pV=function(x,r,e,t){for(var u=x;;){yr(t);var i=m(t),f=96>>0)var o=_(t);else switch(f){case 0:var o=0;break;case 1:for(;;){r0(t,6);var a=m(t),d=-1>>0)return Nx(fn0);switch(o){case 0:return[0,pt(u,Vr(u,t)),1];case 1:return[0,u,1];case 2:return[0,u,0];case 3:at(e,92);var g=aV(u,t),A=g[3],N=g[1];vr(e,g[2]),mX(function(M){return is(r,M)},A);var u=N;continue;case 4:vr(e,cn0),vr(r,sn0);var u=z2(u,t);continue;case 5:vr(e,Jx(t)),at(r,10);var u=z2(u,t);continue;default:var R=Jx(t);vr(e,R),vr(r,R);continue}}},ES0=function(x,r){function e(w){for(;;)if(r0(w,33),ar(m(w))!==0)return _(w)}function t(w){r0(w,32);var x0=M1(m(w));if(x0!==0)return x0===1?e(w):_(w);for(;;)if(r0(w,30),ar(m(w))!==0)return _(w)}function u(w){r0(w,31);var x0=M1(m(w));if(x0!==0)return x0===1?e(w):_(w);for(;;)if(r0(w,29),ar(m(w))!==0)return _(w)}function i(w){r0(w,34);var x0=ba(m(w));if(2>>0)return _(w);switch(x0){case 0:return e(w);case 1:for(;;){r0(w,34);var e0=os(m(w));if(3>>0)return _(w);switch(e0){case 0:return e(w);case 1:continue;case 2:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var S0=os(m(w));if(3>>0)return _(w);switch(S0){case 0:return e(w);case 1:continue;case 2:continue x;default:return u(w)}}}default:return u(w)}}default:return u(w)}}function f(w){x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var x0=qJ(m(w));if(4>>0)return _(w);switch(x0){case 0:return e(w);case 1:return i(w);case 2:continue;case 3:continue x;default:return t(w)}}}}function o(w){for(;;)if(r0(w,23),ar(m(w))!==0)return _(w)}function a(w){for(;;)if(r0(w,23),ar(m(w))!==0)return _(w)}function d(w){for(;;)if(r0(w,15),ar(m(w))!==0)return _(w)}function k(w){for(;;)if(r0(w,15),ar(m(w))!==0)return _(w)}function T(w){for(;;)if(r0(w,11),ar(m(w))!==0)return _(w)}function g(w){for(;;)if(r0(w,11),ar(m(w))!==0)return _(w)}function A(w){for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}function N(w){for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}function R(w){for(;;)if(r0(w,19),ar(m(w))!==0)return _(w)}function O(w){for(;;)if(r0(w,27),ar(m(w))!==0)return _(w)}function M(w){r0(w,26);var x0=M1(m(w));if(x0!==0)return x0===1?O(w):_(w);for(;;)if(r0(w,25),ar(m(w))!==0)return _(w)}function L(w){for(;;)if(r0(w,27),ar(m(w))!==0)return _(w)}function z(w){r0(w,26);var x0=M1(m(w));if(x0!==0)return x0===1?L(w):_(w);for(;;)if(r0(w,25),ar(m(w))!==0)return _(w)}function V(w){x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,28);var x0=os(m(w));if(3>>0)return _(w);switch(x0){case 0:return L(w);case 1:continue;case 2:continue x;default:return z(w)}}}}function Z(w){r0(w,33);var x0=bJ(m(w));if(3>>0)return _(w);switch(x0){case 0:return e(w);case 1:var e0=jo(m(w));if(e0===0)for(;;){r0(w,28);var S0=ba(m(w));if(2>>0)return _(w);switch(S0){case 0:return L(w);case 1:continue;default:return z(w)}}if(e0!==1)return _(w);for(;;){r0(w,28);var G=os(m(w));if(3>>0)return _(w);switch(G){case 0:return L(w);case 1:continue;case 2:return V(w);default:return z(w)}}case 2:for(;;){r0(w,28);var k0=ba(m(w));if(2>>0)return _(w);switch(k0){case 0:return O(w);case 1:continue;default:return M(w)}}default:for(;;){r0(w,28);var J0=os(m(w));if(3>>0)return _(w);switch(J0){case 0:return O(w);case 1:continue;case 2:return V(w);default:return M(w)}}}}function $(w){r0(w,34);var x0=zJ(m(w));if(3>>0)return _(w);switch(x0){case 0:return e(w);case 1:for(;;){r0(w,34);var e0=Uo(m(w));if(4>>0)return _(w);switch(e0){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var S0=Uo(m(w));if(4>>0)return _(w);switch(S0){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:continue x;default:return u(w)}}}default:return u(w)}}case 2:return Z(w);default:return u(w)}}function i0(w){return zy(m(w))===0&&Yy(m(w))===0&&rV(m(w))===0&&ZJ(m(w))===0&&WJ(m(w))===0&&By(m(w))===0&&r6(m(w))===0&&zy(m(w))===0&&Xo(m(w))===0&&fI(m(w))===0&&zv(m(w))===0?3:_(w)}function U(w){return r0(w,3),nV(m(w))===0?3:_(w)}function J(w){var x0=wS0(m(w));if(36>>0)return _(w);switch(x0){case 0:return 98;case 1:return 99;case 2:if(r0(w,1),cs(m(w))!==0)return _(w);for(;;)if(r0(w,1),cs(m(w))!==0)return _(w);case 3:return 0;case 4:return r0(w,0),le(m(w))===0?0:_(w);case 5:return r0(w,88),Tn(m(w))===0?(r0(w,58),Tn(m(w))===0?54:_(w)):_(w);case 6:return 7;case 7:r0(w,95);var e0=m(w),S0=32>>0)return _(w);switch(J0){case 0:return r0(w,83),Tn(m(w))===0?70:_(w);case 1:return 4;default:return 69}case 14:r0(w,80);var I0=m(w),ix=42>>0)return _(w);switch($x){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:x:for(;;){if(mr(m(w))!==0)return _(w);for(;;){r0(w,34);var nr=Uo(m(w));if(4>>0)return _(w);switch(nr){case 0:return e(w);case 1:continue;case 2:return Z(w);case 3:continue x;default:return u(w)}}}default:return u(w)}}case 18:r0(w,93);var Zx=KJ(m(w));if(2>>0)return _(w);switch(Zx){case 0:r0(w,2);var Lr=Iy(m(w));if(2>>0)return _(w);switch(Lr){case 0:for(;;){var Yx=Iy(m(w));if(2>>0)return _(w);switch(Yx){case 0:continue;case 1:return U(w);default:return i0(w)}}case 1:return U(w);default:return i0(w)}case 1:return 5;default:return 92}case 19:r0(w,34);var ue=QJ(m(w));if(8>>0)return _(w);switch(ue){case 0:return e(w);case 1:return $(w);case 2:for(;;){r0(w,20);var Qt=xV(m(w));if(4>>0)return _(w);switch(Qt){case 0:return R(w);case 1:return i(w);case 2:continue;case 3:for(;;){r0(w,18);var S2=Oy(m(w));if(3>>0)return _(w);switch(S2){case 0:return N(w);case 1:return i(w);case 2:continue;default:r0(w,17);var Ze=M1(m(w));if(Ze!==0)return Ze===1?N(w):_(w);for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}}default:r0(w,19);var fo=M1(m(w));if(fo!==0)return fo===1?R(w):_(w);for(;;)if(r0(w,19),ar(m(w))!==0)return _(w)}}case 3:for(;;){r0(w,18);var gn=Oy(m(w));if(3>>0)return _(w);switch(gn){case 0:return A(w);case 1:return i(w);case 2:continue;default:r0(w,17);var ds=M1(m(w));if(ds!==0)return ds===1?A(w):_(w);for(;;)if(r0(w,17),ar(m(w))!==0)return _(w)}}case 4:r0(w,33);var ye=$J(m(w));if(ye===0)return e(w);if(ye!==1)return _(w);for(;;){r0(w,12);var An=$y(m(w));if(3>>0)return _(w);switch(An){case 0:return g(w);case 1:continue;case 2:x:for(;;){if(ss(m(w))!==0)return _(w);for(;;){r0(w,12);var Ft=$y(m(w));if(3>>0)return _(w);switch(Ft){case 0:return T(w);case 1:continue;case 2:continue x;default:r0(w,10);var We=M1(m(w));if(We!==0)return We===1?T(w):_(w);for(;;)if(r0(w,9),ar(m(w))!==0)return _(w)}}}default:r0(w,10);var Ht=M1(m(w));if(Ht!==0)return Ht===1?g(w):_(w);for(;;)if(r0(w,9),ar(m(w))!==0)return _(w)}}case 5:return Z(w);case 6:r0(w,33);var dr=FJ(m(w));if(dr===0)return e(w);if(dr!==1)return _(w);for(;;){r0(w,16);var yt=Zy(m(w));if(3>>0)return _(w);switch(yt){case 0:return k(w);case 1:continue;case 2:x:for(;;){if(V2(m(w))!==0)return _(w);for(;;){r0(w,16);var Qo=Zy(m(w));if(3>>0)return _(w);switch(Qo){case 0:return d(w);case 1:continue;case 2:continue x;default:r0(w,14);var me=M1(m(w));if(me!==0)return me===1?d(w):_(w);for(;;)if(r0(w,13),ar(m(w))!==0)return _(w)}}}default:r0(w,14);var Pn=M1(m(w));if(Pn!==0)return Pn===1?k(w):_(w);for(;;)if(r0(w,13),ar(m(w))!==0)return _(w)}}case 7:r0(w,33);var co=XJ(m(w));if(co===0)return e(w);if(co!==1)return _(w);for(;;){r0(w,24);var Fo=Qy(m(w));if(3>>0)return _(w);switch(Fo){case 0:return a(w);case 1:continue;case 2:x:for(;;){if(Pr(m(w))!==0)return _(w);for(;;){r0(w,24);var so=Qy(m(w));if(3>>0)return _(w);switch(so){case 0:return o(w);case 1:continue;case 2:continue x;default:r0(w,22);var oo=M1(m(w));if(oo!==0)return oo===1?o(w):_(w);for(;;)if(r0(w,21),ar(m(w))!==0)return _(w)}}}default:r0(w,22);var a2=M1(m(w));if(a2!==0)return a2===1?a(w):_(w);for(;;)if(r0(w,21),ar(m(w))!==0)return _(w)}}default:return t(w)}case 20:r0(w,34);var ys=My(m(w));if(5>>0)return _(w);switch(ys){case 0:return e(w);case 1:return $(w);case 2:for(;;){r0(w,34);var ke=My(m(w));if(5>>0)return _(w);switch(ke){case 0:return e(w);case 1:return $(w);case 2:continue;case 3:return Z(w);case 4:return f(w);default:return t(w)}}case 3:return Z(w);case 4:return f(w);default:return t(w)}case 21:return 46;case 22:return 44;case 23:r0(w,78);var Cn=m(w),Ho=59>>0)return Nx($c0);var F=Y;if(50>F)switch(F){case 0:return[2,z2(x,r)];case 1:return[2,x];case 2:var n0=h2(x,r),Q=Fr(Jr),f0=Kv(x,Q,r),s0=f0[1];return[1,s0,zt(s0,n0,f0[2],Q,1)];case 3:var v0=Jx(r);if(!x[5]){var o0=h2(x,r),c0=Fr(Jr);vr(c0,m2(v0,2,Xx(v0)-2|0));var T0=Kv(x,c0,r),E0=T0[1];return[1,E0,zt(E0,o0,T0[2],c0,1)]}var M0=x[4]?cV(x,Vr(x,r),v0):x,Y0=Ey(1,M0),rx=_y(r);return Ar(ql(r,rx-1|0,1),Iv)&&P(ql(r,rx-2|0,1),Iv)?[0,Y0,86]:[2,Y0];case 4:if(x[4])return[2,Ey(0,x)];qa(r),yr(r);var g0=VJ(m(r))===0?0:_(r);return g0===0?[0,x,f2]:Nx(Qc0);case 5:var H0=h2(x,r),t0=Fr(Jr),ex=e3(x,t0,r),xx=ex[1];return[1,xx,zt(xx,H0,ex[2],t0,0)];case 6:if(r[6]!==0)return[0,x,Fc0];var ax=h2(x,r),dx=Fr(Jr),mx=e3(x,dx,r),L0=mx[1],C0=[0,L0[1],ax,mx[2]];return[0,L0,[6,C0,Y1(dx)]];case 7:var A0=Jx(r),U0=h2(x,r),Q0=Fr(Jr),H=Fr(Jr);vr(H,A0);var b=lV(x,A0,Q0,H,0,r),B=b[1],a0=b[3],m0=[0,B[1],U0,b[2]],P0=Y1(H);return[0,B,[2,[0,m0,Y1(Q0),P0,a0]]];case 8:var D=Fr(Jr),N0=Fr(Jr),X0=h2(x,r),D0=pV(x,D,N0,r),ox=D0[1],b0=D0[2],kx=pe(ox,r),V0=[0,ox[1],X0,kx],h=Y1(N0);return[0,ox,[3,[0,V0,Y1(D),h,1,b0]]];case 9:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&jy(m(x0))===0&&ss(m(x0))===0)for(;;){var e0=Ny(m(x0));if(2>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(ss(m(x0))===0)for(;;){var S0=Ny(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,0,Jx(x0)]]:Nx(Wc0)});case 10:return[0,x,[1,0,Jx(r)]];case 11:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&jy(m(x0))===0&&ss(m(x0))===0)for(;;){r0(x0,0);var e0=Cy(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(ss(m(x0))===0)for(;;){r0(x0,0);var S0=Cy(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,0,Jx(x0)]]:Nx(Zc0)});case 12:return[0,x,[0,0,Jx(r)]];case 13:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&Jy(m(x0))===0&&V2(m(x0))===0)for(;;){var e0=Dy(m(x0));if(2>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(V2(m(x0))===0)for(;;){var S0=Dy(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,1,Jx(x0)]]:Nx(Kc0)});case 14:return[0,x,[1,1,Jx(r)]];case 15:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&Jy(m(x0))===0&&V2(m(x0))===0)for(;;){r0(x0,0);var e0=Ly(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(V2(m(x0))===0)for(;;){r0(x0,0);var S0=Ly(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,3,Jx(x0)]]:Nx(zc0)});case 16:return[0,x,[0,3,Jx(r)]];case 17:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0)for(;;){var e0=m(x0),S0=47>>0)var k0=_(x0);else switch(e0){case 0:continue;case 1:x:for(;;){if(Pr(m(x0))===0)for(;;){var S0=Ry(m(x0));if(2>>0)var G=_(x0);else switch(S0){case 0:continue;case 1:continue x;default:var G=0}break}else var G=_(x0);var k0=G;break}break;default:var k0=0}break}else var k0=_(x0);return k0===0?[0,w,[1,2,Jx(x0)]]:Nx(Xc0)});case 22:return[0,x,[1,2,Jx(r)]];case 23:return C1(x,r,function(w,x0){if(yr(x0),ae(m(x0))===0&&Ay(m(x0))===0&&Pr(m(x0))===0)for(;;){r0(x0,0);var e0=Ky(m(x0));if(e0!==0){if(e0===1)x:for(;;){if(Pr(m(x0))===0)for(;;){r0(x0,0);var S0=Ky(m(x0));if(S0!==0){if(S0===1)continue x;var G=_(x0);break}}else var G=_(x0);var k0=G;break}else var k0=_(x0);break}}else var k0=_(x0);return k0===0?[0,w,[0,4,Jx(x0)]]:Nx(Yc0)});case 24:return[0,x,[0,4,Jx(r)]];case 25:return C1(x,r,function(w,x0){function e0(Zx){for(;;){var Lr=Jt(m(Zx));if(2>>0)return _(Zx);switch(Lr){case 0:continue;case 1:x:for(;;){if(mr(m(Zx))!==0)return _(Zx);for(;;){var Yx=Jt(m(Zx));if(2>>0)return _(Zx);switch(Yx){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function S0(Zx){for(;;){var Lr=x3(m(Zx));if(Lr!==0)return Lr===1?0:_(Zx)}}function G(Zx){var Lr=Fy(m(Zx));if(2>>0)return _(Zx);switch(Lr){case 0:var Yx=jo(m(Zx));return Yx===0?S0(Zx):Yx===1?e0(Zx):_(Zx);case 1:return S0(Zx);default:return e0(Zx)}}function k0(Zx){var Lr=Vy(m(Zx));if(Lr!==0)return Lr===1?G(Zx):_(Zx);for(;;){var Yx=te(m(Zx));if(2>>0)return _(Zx);switch(Yx){case 0:continue;case 1:return G(Zx);default:x:for(;;){if(mr(m(Zx))!==0)return _(Zx);for(;;){var ue=te(m(Zx));if(2>>0)return _(Zx);switch(ue){case 0:continue;case 1:return G(Zx);default:continue x}}}}}}yr(x0);var J0=Do(m(x0));if(2>>0)var I0=_(x0);else switch(J0){case 0:if(mr(m(x0))===0)for(;;){var ix=te(m(x0));if(2>>0)var I0=_(x0);else switch(ix){case 0:continue;case 1:var I0=G(x0);break;default:x:for(;;){if(mr(m(x0))===0)for(;;){var Wx=te(m(x0));if(2>>0)var Bx=_(x0);else switch(Wx){case 0:continue;case 1:var Bx=G(x0);break;default:continue x}break}else var Bx=_(x0);var I0=Bx;break}}break}else var I0=_(x0);break;case 1:var Hx=Py(m(x0)),I0=Hx===0?k0(x0):Hx===1?G(x0):_(x0);break;default:for(;;){var $x=Xy(m(x0));if(2<$x>>>0)var I0=_(x0);else switch($x){case 0:var I0=k0(x0);break;case 1:continue;default:var I0=G(x0)}break}}if(I0!==0)return Nx(Bc0);var nr=_2(w,Vr(w,x0),48);return[0,nr,[1,2,Jx(x0)]]});case 26:var X=_2(x,Vr(x,r),48);return[0,X,[1,2,Jx(r)]];case 27:return C1(x,r,function(w,x0){function e0(nr){for(;;){r0(nr,0);var Zx=Bo(m(nr));if(Zx!==0){if(Zx!==1)return _(nr);x:for(;;){if(mr(m(nr))!==0)return _(nr);for(;;){r0(nr,0);var Lr=Bo(m(nr));if(Lr!==0){if(Lr===1)continue x;return _(nr)}}}}}}function S0(nr){for(;;)if(r0(nr,0),mr(m(nr))!==0)return _(nr)}function G(nr){var Zx=Fy(m(nr));if(2>>0)return _(nr);switch(Zx){case 0:var Lr=jo(m(nr));return Lr===0?S0(nr):Lr===1?e0(nr):_(nr);case 1:return S0(nr);default:return e0(nr)}}function k0(nr){var Zx=Vy(m(nr));if(Zx!==0)return Zx===1?G(nr):_(nr);for(;;){var Lr=te(m(nr));if(2>>0)return _(nr);switch(Lr){case 0:continue;case 1:return G(nr);default:x:for(;;){if(mr(m(nr))!==0)return _(nr);for(;;){var Yx=te(m(nr));if(2>>0)return _(nr);switch(Yx){case 0:continue;case 1:return G(nr);default:continue x}}}}}}yr(x0);var J0=Do(m(x0));if(2>>0)var I0=_(x0);else switch(J0){case 0:if(mr(m(x0))===0)for(;;){var ix=te(m(x0));if(2>>0)var I0=_(x0);else switch(ix){case 0:continue;case 1:var I0=G(x0);break;default:x:for(;;){if(mr(m(x0))===0)for(;;){var Wx=te(m(x0));if(2>>0)var Bx=_(x0);else switch(Wx){case 0:continue;case 1:var Bx=G(x0);break;default:continue x}break}else var Bx=_(x0);var I0=Bx;break}}break}else var I0=_(x0);break;case 1:var Hx=Py(m(x0)),I0=Hx===0?k0(x0):Hx===1?G(x0):_(x0);break;default:for(;;){var $x=Xy(m(x0));if(2<$x>>>0)var I0=_(x0);else switch($x){case 0:var I0=k0(x0);break;case 1:continue;default:var I0=G(x0)}break}}return I0===0?[0,w,[0,4,Jx(x0)]]:Nx(Uc0)});case 28:return[0,x,[0,4,Jx(r)]];case 29:return C1(x,r,function(w,x0){function e0(Hx){for(;;){var $x=Jt(m(Hx));if(2<$x>>>0)return _(Hx);switch($x){case 0:continue;case 1:x:for(;;){if(mr(m(Hx))!==0)return _(Hx);for(;;){var nr=Jt(m(Hx));if(2>>0)return _(Hx);switch(nr){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function S0(Hx){var $x=x3(m(Hx));return $x===0?e0(Hx):$x===1?0:_(Hx)}yr(x0);var G=Do(m(x0));if(2>>0)var k0=_(x0);else switch(G){case 0:var k0=mr(m(x0))===0?e0(x0):_(x0);break;case 1:for(;;){var J0=r3(m(x0));if(J0===0)var k0=S0(x0);else{if(J0===1)continue;var k0=_(x0)}break}break;default:for(;;){var I0=Yo(m(x0));if(2>>0)var k0=_(x0);else switch(I0){case 0:var k0=S0(x0);break;case 1:continue;default:x:for(;;){if(mr(m(x0))===0)for(;;){var ix=Yo(m(x0));if(2>>0)var Wx=_(x0);else switch(ix){case 0:var Wx=S0(x0);break;case 1:continue;default:continue x}break}else var Wx=_(x0);var k0=Wx;break}}break}}if(k0!==0)return Nx(jc0);var Bx=_2(w,Vr(w,x0),39);return[0,Bx,[1,2,Jx(x0)]]});case 30:return C1(x,r,function(w,x0){yr(x0);var e0=jo(m(x0));if(e0===0)for(;;){var S0=x3(m(x0));if(S0!==0){var I0=S0===1?0:_(x0);break}}else if(e0===1)for(;;){var G=Jt(m(x0));if(2>>0)var I0=_(x0);else switch(G){case 0:continue;case 1:x:for(;;){if(mr(m(x0))===0)for(;;){var k0=Jt(m(x0));if(2>>0)var J0=_(x0);else switch(k0){case 0:continue;case 1:continue x;default:var J0=0}break}else var J0=_(x0);var I0=J0;break}break;default:var I0=0}break}else var I0=_(x0);return I0===0?[0,w,[1,2,Jx(x0)]]:Nx(Dc0)});case 31:var W0=_2(x,Vr(x,r),39);return[0,W0,[1,2,Jx(r)]];case 32:return[0,x,[1,2,Jx(r)]];case 33:return C1(x,r,function(w,x0){function e0(Bx){for(;;){r0(Bx,0);var Hx=Bo(m(Bx));if(Hx!==0){if(Hx!==1)return _(Bx);x:for(;;){if(mr(m(Bx))!==0)return _(Bx);for(;;){r0(Bx,0);var $x=Bo(m(Bx));if($x!==0){if($x===1)continue x;return _(Bx)}}}}}}function S0(Bx){return r0(Bx,0),mr(m(Bx))===0?e0(Bx):_(Bx)}yr(x0);var G=Do(m(x0));if(2>>0)var k0=_(x0);else switch(G){case 0:var k0=mr(m(x0))===0?e0(x0):_(x0);break;case 1:for(;;){r0(x0,0);var J0=r3(m(x0));if(J0===0)var k0=S0(x0);else{if(J0===1)continue;var k0=_(x0)}break}break;default:for(;;){r0(x0,0);var I0=Yo(m(x0));if(2>>0)var k0=_(x0);else switch(I0){case 0:var k0=S0(x0);break;case 1:continue;default:x:for(;;){if(mr(m(x0))===0)for(;;){r0(x0,0);var ix=Yo(m(x0));if(2>>0)var Wx=_(x0);else switch(ix){case 0:var Wx=S0(x0);break;case 1:continue;default:continue x}break}else var Wx=_(x0);var k0=Wx;break}}break}}return k0===0?[0,w,[0,4,Jx(x0)]]:Nx(Mc0)});case 34:return[0,x,[0,4,Jx(r)]];case 35:var sx=Vr(x,r),tx=Jx(r);return[0,x,[4,sx,tx,tx]];case 36:return[0,x,0];case 37:return[0,x,1];case 38:return[0,x,4];case 39:return[0,x,5];case 40:return[0,x,6];case 41:return[0,x,7];case 42:return[0,x,12];case 43:return[0,x,10];case 44:return[0,x,8];case 45:return[0,x,9];case 46:return[0,x,86];case 47:qa(r),yr(r);var j0=m(r),Px=62=tr)return[0,x,18];var Ux=Tx(B0,Oa);if(0<=Ux){if(0>=Ux)return[0,x,51];var K0=Tx(B0,Ps);if(0<=K0){if(0>=K0)return[0,x,46];if(!P(B0,pl))return[0,x,24];if(!P(B0,Is))return[0,x,47];if(!P(B0,Qp))return[0,x,25];if(!P(B0,Tp))return[0,x,26];if(!P(B0,B2))return[0,x,58]}else{if(!P(B0,Be))return[0,x,20];if(!P(B0,lv))return[0,x,21];if(!P(B0,Ue))return[0,x,22];if(!P(B0,Cs))return[0,x,31];if(!P(B0,yd))return[0,x,23];if(!P(B0,fi))return[0,x,61]}}else{var ur=Tx(B0,u8);if(0<=ur){if(0>=ur)return[0,x,54];if(!P(B0,Sl))return[0,x,55];if(!P(B0,F3))return[0,x,56];if(!P(B0,V3))return[0,x,57];if(!P(B0,Me))return[0,x,19];if(!P(B0,De))return[0,x,42]}else{if(!P(B0,G2))return[0,x,53];if(!P(B0,ma))return[0,x,28];if(!P(B0,av))return[0,x,44];if(!P(B0,_v))return[0,x,29];if(!P(B0,Fh))return[0,x,63];if(!P(B0,Yh))return[0,x,62]}}}else{var z0=Tx(B0,ed);if(0<=z0){if(0>=z0)return[0,x,37];var or=Tx(B0,N8);if(0<=or){if(0>=or)return[0,x,39];if(!P(B0,da))return[0,x,15];if(!P(B0,s8))return[0,x,16];if(!P(B0,Tv))return[0,x,52];if(!P(B0,D2))return[0,x,50];if(!P(B0,Po))return[0,x,17]}else{if(!P(B0,Kp))return[0,x,43];if(!P(B0,ll))return[0,x,48];if(!P(B0,p8))return[0,x,49];if(!P(B0,Bc))return[0,x,41];if(!P(B0,Os))return[0,x,30];if(!P(B0,Yp))return[0,x,38]}}else{var Ur=Tx(B0,sl);if(0<=Ur){if(0>=Ur)return[0,x,27];if(!P(B0,Re))return[0,x,35];if(!P(B0,Oe))return[0,x,59];if(!P(B0,el))return[0,x,60];if(!P(B0,pv))return[0,x,36];if(!P(B0,cl))return[0,x,45]}else{if(!P(B0,Co))return[0,x,64];if(!P(B0,Pv))return[0,x,65];if(!P(B0,Le))return[0,x,32];if(!P(B0,bp))return[0,x,33];if(!P(B0,t5))return[0,x,34];if(!P(B0,W3))return[0,x,40]}}}var lx=n1(r),a1=vV(x,lx),z1=a1[2],w1=a1[1];return[0,w1,[4,qx,z1,Gl(lx)]];case 98:var Cr=x[4]?_2(x,Vr(x,r),96):x;return[0,Cr,Nr];default:var n2=pt(x,Vr(x,r));return[0,n2,[7,Jx(r)]]}},gS0=function(x,r,e){var t=x;x:for(;;){yr(e);var u=m(e),i=92>>0)var f=_(e);else switch(i){case 0:var f=0;break;case 1:for(;;){r0(e,7);var o=m(e),a=-1>>0)var f=_(e);else switch(k){case 0:var f=2;break;case 1:var f=1;break;default:r0(e,1);var f=le(m(e))===0?1:_(e)}}if(7>>0)return Nx(an0);switch(f){case 0:return[0,_2(t,Vr(t,e),ct),ln0];case 1:return[0,z2(_2(t,Vr(t,e),ct),e),pn0];case 2:vr(r,Jx(e));continue;case 3:var T=Jx(e);return[0,t,m2(T,1,Xx(T)-1|0)];case 4:return[0,t,dn0];case 5:for(at(r,91);;){yr(e);var g=m(e),A=93>>0)var N=_(e);else switch(A){case 0:var N=0;break;case 1:for(;;){r0(e,5);var R=m(e),O=-1>>0)var z=Nx(on0);else switch(N){case 0:var z=t;break;case 1:vr(r,vn0);continue;case 2:at(r,92),at(r,93);continue;case 3:at(r,93);var z=t;break;case 4:var z=z2(_2(t,Vr(t,e),ct),e);break;default:vr(r,Jx(e));continue}var t=z;continue x}case 6:return[0,z2(_2(t,Vr(t,e),ct),e),yn0];default:vr(r,Jx(e));continue}}},AS0=function(x,r){yr(r);var e=m(r),t=Rv>>0)var u=_(r);else switch(t){case 0:var u=0;break;case 1:var u=6;break;case 2:if(r0(r,2),cs(m(r))===0){for(;;)if(r0(r,2),cs(m(r))!==0){var u=_(r);break}}else var u=_(r);break;case 3:var u=1;break;case 4:r0(r,1);var u=le(m(r))===0?1:_(r);break;default:r0(r,5);var i=Wy(m(r)),u=i===0?4:i===1?3:_(r)}if(6>>0)return Nx(Lc0);switch(u){case 0:return[0,x,Nr];case 1:return[2,z2(x,r)];case 2:return[2,x];case 3:var f=h2(x,r),o=Fr(Jr),a=e3(x,o,r),d=a[1];return[1,d,zt(d,f,a[2],o,0)];case 4:var k=h2(x,r),T=Fr(Jr),g=Kv(x,T,r),A=g[1];return[1,A,zt(A,k,g[2],T,1)];case 5:var N=h2(x,r),R=Fr(Jr),O=gS0(x,R,r),M=O[1],L=O[2],z=pe(M,r),V=[0,M[1],N,z];return[0,M,[5,V,Y1(R),L]];default:var Z=pt(x,Vr(x,r));return[0,Z,[7,Jx(r)]]}},dV=function(x){var r=Tx(x,"iexcl");if(0<=r){if(0>=r)return Ic0;var e=Tx(x,"prime");if(0<=e){if(0>=e)return Oc0;var t=Tx(x,"sup1");if(0<=t){if(0>=t)return Rc0;var u=Tx(x,"uarr");if(0<=u){if(0>=u)return Nc0;var i=Tx(x,"xi");if(0<=i){if(0>=i)return Cc0;if(!P(x,"yacute"))return Pc0;if(!P(x,"yen"))return Ac0;if(!P(x,"yuml"))return gc0;if(!P(x,"zeta"))return Ec0;if(!P(x,"zwj"))return Sc0;if(!P(x,"zwnj"))return Tc0}else{if(!P(x,"ucirc"))return wc0;if(!P(x,"ugrave"))return _c0;if(!P(x,"uml"))return hc0;if(!P(x,"upsih"))return kc0;if(!P(x,"upsilon"))return mc0;if(!P(x,"uuml"))return yc0;if(!P(x,"weierp"))return dc0}}else{var f=Tx(x,"thetasym");if(0<=f){if(0>=f)return pc0;if(!P(x,"thinsp"))return lc0;if(!P(x,"thorn"))return ac0;if(!P(x,"tilde"))return vc0;if(!P(x,"times"))return oc0;if(!P(x,"trade"))return sc0;if(!P(x,"uArr"))return cc0;if(!P(x,"uacute"))return fc0}else{if(!P(x,"sup2"))return ic0;if(!P(x,"sup3"))return uc0;if(!P(x,"supe"))return nc0;if(!P(x,"szlig"))return tc0;if(!P(x,"tau"))return ec0;if(!P(x,"there4"))return rc0;if(!P(x,"theta"))return xc0}}}else{var o=Tx(x,"rlm");if(0<=o){if(0>=o)return bf0;var a=Tx(x,"sigma");if(0<=a){if(0>=a)return Gf0;if(!P(x,"sigmaf"))return qf0;if(!P(x,"sim"))return Hf0;if(!P(x,"spades"))return Ff0;if(!P(x,"sub"))return Qf0;if(!P(x,"sube"))return $f0;if(!P(x,"sum"))return Wf0;if(!P(x,"sup"))return Zf0}else{if(!P(x,"rsaquo"))return Kf0;if(!P(x,"rsquo"))return zf0;if(!P(x,"sbquo"))return Vf0;if(!P(x,"scaron"))return Jf0;if(!P(x,"sdot"))return Xf0;if(!P(x,"sect"))return Yf0;if(!P(x,"shy"))return Bf0}}else{var d=Tx(x,"raquo");if(0<=d){if(0>=d)return Uf0;if(!P(x,"rarr"))return jf0;if(!P(x,"rceil"))return Df0;if(!P(x,"rdquo"))return Mf0;if(!P(x,"real"))return Lf0;if(!P(x,"reg"))return If0;if(!P(x,"rfloor"))return Of0;if(!P(x,"rho"))return Rf0}else{if(!P(x,"prod"))return Nf0;if(!P(x,"prop"))return Cf0;if(!P(x,"psi"))return Pf0;if(!P(x,"quot"))return Af0;if(!P(x,"rArr"))return gf0;if(!P(x,"radic"))return Ef0;if(!P(x,"rang"))return Sf0}}}}else{var k=Tx(x,"ndash");if(0<=k){if(0>=k)return Tf0;var T=Tx(x,"or");if(0<=T){if(0>=T)return wf0;var g=Tx(x,"part");if(0<=g){if(0>=g)return _f0;if(!P(x,"permil"))return hf0;if(!P(x,"perp"))return kf0;if(!P(x,"phi"))return mf0;if(!P(x,"pi"))return yf0;if(!P(x,"piv"))return df0;if(!P(x,"plusmn"))return pf0;if(!P(x,"pound"))return lf0}else{if(!P(x,"ordf"))return af0;if(!P(x,"ordm"))return vf0;if(!P(x,"oslash"))return of0;if(!P(x,"otilde"))return sf0;if(!P(x,"otimes"))return cf0;if(!P(x,"ouml"))return ff0;if(!P(x,"para"))return if0}}else{var A=Tx(x,"oacute");if(0<=A){if(0>=A)return uf0;if(!P(x,"ocirc"))return nf0;if(!P(x,"oelig"))return tf0;if(!P(x,"ograve"))return ef0;if(!P(x,"oline"))return rf0;if(!P(x,"omega"))return xf0;if(!P(x,"omicron"))return bi0;if(!P(x,"oplus"))return Gi0}else{if(!P(x,"ne"))return qi0;if(!P(x,"ni"))return Hi0;if(!P(x,"not"))return Fi0;if(!P(x,"notin"))return Qi0;if(!P(x,"nsub"))return $i0;if(!P(x,"ntilde"))return Wi0;if(!P(x,"nu"))return Zi0}}}else{var N=Tx(x,"le");if(0<=N){if(0>=N)return Ki0;var R=Tx(x,"macr");if(0<=R){if(0>=R)return zi0;if(!P(x,"mdash"))return Vi0;if(!P(x,"micro"))return Ji0;if(!P(x,"middot"))return Xi0;if(!P(x,BD))return Yi0;if(!P(x,"mu"))return Bi0;if(!P(x,"nabla"))return Ui0;if(!P(x,"nbsp"))return ji0}else{if(!P(x,"lfloor"))return Di0;if(!P(x,"lowast"))return Mi0;if(!P(x,"loz"))return Li0;if(!P(x,"lrm"))return Ii0;if(!P(x,"lsaquo"))return Oi0;if(!P(x,"lsquo"))return Ri0;if(!P(x,"lt"))return Ni0}}else{var O=Tx(x,"kappa");if(0<=O){if(0>=O)return Ci0;if(!P(x,"lArr"))return Pi0;if(!P(x,"lambda"))return Ai0;if(!P(x,"lang"))return gi0;if(!P(x,"laquo"))return Ei0;if(!P(x,"larr"))return Si0;if(!P(x,"lceil"))return Ti0;if(!P(x,"ldquo"))return wi0}else{if(!P(x,"igrave"))return _i0;if(!P(x,"image"))return hi0;if(!P(x,"infin"))return ki0;if(!P(x,"iota"))return mi0;if(!P(x,"iquest"))return yi0;if(!P(x,"isin"))return di0;if(!P(x,"iuml"))return pi0}}}}}else{var M=Tx(x,"aelig");if(0<=M){if(0>=M)return li0;var L=Tx(x,"delta");if(0<=L){if(0>=L)return ai0;var z=Tx(x,"fnof");if(0<=z){if(0>=z)return vi0;var V=Tx(x,"gt");if(0<=V){if(0>=V)return oi0;if(!P(x,"hArr"))return si0;if(!P(x,"harr"))return ci0;if(!P(x,"hearts"))return fi0;if(!P(x,"hellip"))return ii0;if(!P(x,"iacute"))return ui0;if(!P(x,"icirc"))return ni0}else{if(!P(x,"forall"))return ti0;if(!P(x,"frac12"))return ei0;if(!P(x,"frac14"))return ri0;if(!P(x,"frac34"))return xi0;if(!P(x,"frasl"))return bu0;if(!P(x,"gamma"))return Gu0;if(!P(x,"ge"))return qu0}}else{var Z=Tx(x,"ensp");if(0<=Z){if(0>=Z)return Hu0;if(!P(x,"epsilon"))return Fu0;if(!P(x,"equiv"))return Qu0;if(!P(x,"eta"))return $u0;if(!P(x,"eth"))return Wu0;if(!P(x,"euml"))return Zu0;if(!P(x,"euro"))return Ku0;if(!P(x,"exist"))return zu0}else{if(!P(x,"diams"))return Vu0;if(!P(x,"divide"))return Ju0;if(!P(x,"eacute"))return Xu0;if(!P(x,"ecirc"))return Yu0;if(!P(x,"egrave"))return Bu0;if(!P(x,ce))return Uu0;if(!P(x,"emsp"))return ju0}}}else{var $=Tx(x,"cap");if(0<=$){if(0>=$)return Du0;var i0=Tx(x,"copy");if(0<=i0){if(0>=i0)return Mu0;if(!P(x,"crarr"))return Lu0;if(!P(x,"cup"))return Iu0;if(!P(x,"curren"))return Ou0;if(!P(x,"dArr"))return Ru0;if(!P(x,"dagger"))return Nu0;if(!P(x,"darr"))return Cu0;if(!P(x,"deg"))return Pu0}else{if(!P(x,"ccedil"))return Au0;if(!P(x,"cedil"))return gu0;if(!P(x,"cent"))return Eu0;if(!P(x,"chi"))return Su0;if(!P(x,"circ"))return Tu0;if(!P(x,"clubs"))return wu0;if(!P(x,"cong"))return _u0}}else{var U=Tx(x,"aring");if(0<=U){if(0>=U)return hu0;if(!P(x,"asymp"))return ku0;if(!P(x,"atilde"))return mu0;if(!P(x,"auml"))return yu0;if(!P(x,"bdquo"))return du0;if(!P(x,"beta"))return pu0;if(!P(x,"brvbar"))return lu0;if(!P(x,"bull"))return au0}else{if(!P(x,"agrave"))return vu0;if(!P(x,"alefsym"))return ou0;if(!P(x,"alpha"))return su0;if(!P(x,"amp"))return cu0;if(!P(x,"and"))return fu0;if(!P(x,"ang"))return iu0;if(!P(x,"apos"))return uu0}}}}else{var J=Tx(x,"Nu");if(0<=J){if(0>=J)return nu0;var Y=Tx(x,"Sigma");if(0<=Y){if(0>=Y)return tu0;var F=Tx(x,"Uuml");if(0<=F){if(0>=F)return eu0;if(!P(x,"Xi"))return ru0;if(!P(x,"Yacute"))return xu0;if(!P(x,"Yuml"))return b70;if(!P(x,"Zeta"))return G70;if(!P(x,"aacute"))return q70;if(!P(x,"acirc"))return H70;if(!P(x,"acute"))return F70}else{if(!P(x,"THORN"))return Q70;if(!P(x,"Tau"))return $70;if(!P(x,"Theta"))return W70;if(!P(x,"Uacute"))return Z70;if(!P(x,"Ucirc"))return K70;if(!P(x,"Ugrave"))return z70;if(!P(x,"Upsilon"))return V70}}else{var n0=Tx(x,"Otilde");if(0<=n0){if(0>=n0)return J70;if(!P(x,"Ouml"))return X70;if(!P(x,"Phi"))return Y70;if(!P(x,"Pi"))return B70;if(!P(x,"Prime"))return U70;if(!P(x,"Psi"))return j70;if(!P(x,"Rho"))return D70;if(!P(x,"Scaron"))return M70}else{if(!P(x,"OElig"))return L70;if(!P(x,"Oacute"))return I70;if(!P(x,"Ocirc"))return O70;if(!P(x,"Ograve"))return R70;if(!P(x,"Omega"))return N70;if(!P(x,"Omicron"))return C70;if(!P(x,"Oslash"))return P70}}}else{var Q=Tx(x,"Eacute");if(0<=Q){if(0>=Q)return A70;var f0=Tx(x,"Icirc");if(0<=f0){if(0>=f0)return g70;if(!P(x,"Igrave"))return E70;if(!P(x,"Iota"))return S70;if(!P(x,"Iuml"))return T70;if(!P(x,"Kappa"))return w70;if(!P(x,"Lambda"))return _70;if(!P(x,"Mu"))return h70;if(!P(x,"Ntilde"))return k70}else{if(!P(x,"Ecirc"))return m70;if(!P(x,"Egrave"))return y70;if(!P(x,"Epsilon"))return d70;if(!P(x,"Eta"))return p70;if(!P(x,"Euml"))return l70;if(!P(x,"Gamma"))return a70;if(!P(x,"Iacute"))return v70}}else{var s0=Tx(x,"Atilde");if(0<=s0){if(0>=s0)return o70;if(!P(x,"Auml"))return s70;if(!P(x,"Beta"))return c70;if(!P(x,"Ccedil"))return f70;if(!P(x,"Chi"))return i70;if(!P(x,"Dagger"))return u70;if(!P(x,"Delta"))return n70;if(!P(x,"ETH"))return t70}else{if(!P(x,"'int'"))return e70;if(!P(x,"AElig"))return r70;if(!P(x,"Aacute"))return x70;if(!P(x,"Acirc"))return bn0;if(!P(x,"Agrave"))return Gn0;if(!P(x,"Alpha"))return qn0;if(!P(x,"Aring"))return Hn0}}}}}return 0},yV=function(x,r,e,t){for(var u=x;;){var i=function(n0){for(;;)if(r0(n0,8),nI(m(n0))!==0)return _(n0)};yr(t);var f=m(t),o=Di>>0)var a=_(t);else switch(o){case 0:var a=3;break;case 1:var a=i(t);break;case 2:var a=4;break;case 3:r0(t,4);var a=le(m(t))===0?4:_(t);break;case 4:r0(t,8);var d=uV(m(t));if(d===0){var k=BJ(m(t));if(k===0)for(;;){var T=YJ(m(t));if(T!==0){var a=T===1?6:_(t);break}}else if(k===1&&Pr(m(t))===0)for(;;){var g=eV(m(t));if(g!==0){var a=g===1?5:_(t);break}}else var a=_(t)}else if(d===1&&ar(m(t))===0){var A=Vt(m(t));if(A===0){var N=Vt(m(t));if(N===0){var R=Vt(m(t));if(R===0){var O=Vt(m(t));if(O===0){var M=Vt(m(t));if(M===0)var L=Vt(m(t)),a=L===0?GJ(m(t))===0?7:_(t):L===1?7:_(t);else var a=M===1?7:_(t)}else var a=O===1?7:_(t)}else var a=R===1?7:_(t)}else var a=N===1?7:_(t)}else var a=A===1?7:_(t)}else var a=_(t);break;case 5:var a=0;break;case 6:r0(t,1);var a=nI(m(t))===0?i(t):_(t);break;default:r0(t,2);var a=nI(m(t))===0?i(t):_(t)}if(8>>0)return Nx(mn0);switch(a){case 0:return qa(t),u;case 1:return cI(u,Vr(u,t),hn0,kn0);case 2:return cI(u,Vr(u,t),wn0,_n0);case 3:return pt(u,Vr(u,t));case 4:var z=Jx(t);vr(e,z),vr(r,z);var u=z2(u,t);continue;case 5:var V=Jx(t),Z=m2(V,3,Xx(V)-4|0);vr(e,V),is(r,ot(Qx(Tn0,Z)));continue;case 6:var $=Jx(t),i0=m2($,2,Xx($)-3|0);vr(e,$),is(r,ot(i0));continue;case 7:var U=Jx(t),J=m2(U,1,Xx(U)-2|0);vr(e,U);var Y=dV(J);Y?is(r,Y[1]):vr(r,Qx(En0,Qx(J,Sn0)));continue;default:var F=Jx(t);vr(e,F),vr(r,F);continue}}},PS0=function(x,r){yr(r);var e=SS0(m(r));if(14>>0)var t=_(r);else switch(e){case 0:var t=0;break;case 1:var t=14;break;case 2:if(r0(r,2),cs(m(r))===0){for(;;)if(r0(r,2),cs(m(r))!==0){var t=_(r);break}}else var t=_(r);break;case 3:var t=1;break;case 4:r0(r,1);var t=le(m(r))===0?1:_(r);break;case 5:var t=12;break;case 6:var t=13;break;case 7:var t=10;break;case 8:r0(r,6);var u=Wy(m(r)),t=u===0?4:u===1?3:_(r);break;case 9:var t=9;break;case 10:var t=5;break;case 11:var t=11;break;case 12:var t=7;break;case 13:if(r0(r,14),Xo(m(r))===0){var i=Vv(m(r));if(i===0)var t=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?13:_(r);else if(i===1&&Pr(m(r))===0)for(;;){var f=Jv(m(r));if(f!==0){var t=f===1?13:_(r);break}}else var t=_(r)}else var t=_(r);break;default:var t=8}if(14>>0)return Nx(Fn0);switch(t){case 0:return[0,x,Nr];case 1:return[2,z2(x,r)];case 2:return[2,x];case 3:var o=h2(x,r),a=Fr(Jr),d=e3(x,a,r),k=d[1];return[1,k,zt(k,o,d[2],a,0)];case 4:var T=h2(x,r),g=Fr(Jr),A=Kv(x,g,r),N=A[1];return[1,N,zt(N,T,A[2],g,1)];case 5:return[0,x,98];case 6:return[0,x,ft];case 7:return[0,x,99];case 8:return[0,x,0];case 9:return[0,x,86];case 10:return[0,x,10];case 11:return[0,x,82];case 12:var R=Jx(r),O=h2(x,r),M=Fr(Jr),L=Fr(Jr);vr(L,R);for(var z=Ar(R,"'"),V=x;;){yr(r);var Z=m(r),$=39>>0)var i0=_(r);else switch($){case 0:var i0=2;break;case 1:for(;;){r0(r,7);var U=m(r),J=-1>>0)var E0=Nx(gn0);else switch(i0){case 0:if(!z){at(L,39),at(M,39);continue}var E0=V;break;case 1:if(z){at(L,34),at(M,34);continue}var E0=V;break;case 2:var E0=pt(V,Vr(V,r));break;case 3:var M0=Jx(r);vr(L,M0),vr(M,M0);var V=z2(V,r);continue;case 4:var Y0=Jx(r),rx=m2(Y0,3,Xx(Y0)-4|0);vr(L,Y0),is(M,ot(Qx(An0,rx)));continue;case 5:var g0=Jx(r),H0=m2(g0,2,Xx(g0)-3|0);vr(L,g0),is(M,ot(H0));continue;case 6:var t0=Jx(r),ex=m2(t0,1,Xx(t0)-2|0);vr(L,t0);var xx=dV(ex);xx?is(M,xx[1]):vr(M,Qx(Cn0,Qx(ex,Pn0)));continue;default:var ax=Jx(r);vr(L,ax),vr(M,ax);continue}var dx=pe(E0,r);vr(L,R);var mx=Y1(M),L0=Y1(L);return[0,E0,[10,[0,E0[1],O,dx],mx,L0]]}case 13:for(var C0=r[6];;){yr(r);var A0=m(r),U0=x1>>0)var Q0=_(r);else switch(U0){case 0:var Q0=1;break;case 1:var Q0=2;break;case 2:var Q0=0;break;default:if(r0(r,2),Xo(m(r))===0){var H=Vv(m(r));if(H===0)var Q0=Pr(m(r))===0&&Pr(m(r))===0&&Pr(m(r))===0?0:_(r);else if(H===1&&Pr(m(r))===0)for(;;){var b=Jv(m(r));if(b!==0){var Q0=b===1?0:_(r);break}}else var Q0=_(r)}else var Q0=_(r)}if(2>>0)throw q0([0,wr,xn0],1);switch(Q0){case 0:continue;case 1:break;default:if(qO(lJ(r)))continue;dJ(r,1)}var B=r[3];zO(r,C0);var a0=n1(r),m0=t6(x,C0,B);return[0,x,[8,Gl(a0),m0]]}default:return[0,x,[7,Jx(r)]]}},CS0=function(x,r){yr(r);var e=m(r),t=-1>>0)var u=_(r);else switch(t){case 0:var u=5;break;case 1:if(r0(r,1),cs(m(r))===0){for(;;)if(r0(r,1),cs(m(r))!==0){var u=_(r);break}}else var u=_(r);break;case 2:var u=0;break;case 3:r0(r,0);var u=le(m(r))===0?0:_(r);break;case 4:r0(r,5);var i=Wy(m(r)),u=i===0?3:i===1?2:_(r);break;default:var u=4}if(5>>0)return Nx(Zn0);switch(u){case 0:return[2,z2(x,r)];case 1:return[2,x];case 2:var f=h2(x,r),o=Fr(Jr),a=e3(x,o,r),d=a[1];return[1,d,zt(d,f,a[2],o,0)];case 3:var k=h2(x,r),T=Fr(Jr),g=Kv(x,T,r),A=g[1];return[1,A,zt(A,k,g[2],T,1)];case 4:var N=h2(x,r),R=Fr(Jr),O=Fr(Jr),M=pV(x,R,O,r),L=M[1],z=M[2],V=pe(L,r),Z=[0,L[1],N,V],$=Y1(O);return[0,L,[3,[0,Z,Y1(R),$,0,z]]];default:var i0=pt(x,Vr(x,r));return[0,i0,[3,[0,Vr(i0,r),$n0,Wn0,0,1]]]}},NS0=function(x,r){function e(h){for(;;)if(r0(h,29),ar(m(h))!==0)return _(h)}function t(h){r0(h,28);var X=M1(m(h));if(X!==0)return X===1?e(h):_(h);for(;;)if(r0(h,26),ar(m(h))!==0)return _(h)}function u(h){r0(h,27);var X=M1(m(h));if(X!==0)return X===1?e(h):_(h);for(;;)if(r0(h,25),ar(m(h))!==0)return _(h)}function i(h){r0(h,30);var X=ba(m(h));if(2>>0)return _(h);switch(X){case 0:return e(h);case 1:for(;;){r0(h,30);var W0=os(m(h));if(3>>0)return _(h);switch(W0){case 0:return e(h);case 1:continue;case 2:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var sx=os(m(h));if(3>>0)return _(h);switch(sx){case 0:return e(h);case 1:continue;case 2:continue x;default:return u(h)}}}default:return u(h)}}default:return u(h)}}function f(h){x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var X=qJ(m(h));if(4>>0)return _(h);switch(X){case 0:return e(h);case 1:return i(h);case 2:continue;case 3:continue x;default:return t(h)}}}}function o(h){for(;;)if(r0(h,19),ar(m(h))!==0)return _(h)}function a(h){for(;;)if(r0(h,19),ar(m(h))!==0)return _(h)}function d(h){for(;;)if(r0(h,13),ar(m(h))!==0)return _(h)}function k(h){for(;;)if(r0(h,13),ar(m(h))!==0)return _(h)}function T(h){for(;;)if(r0(h,9),ar(m(h))!==0)return _(h)}function g(h){for(;;)if(r0(h,9),ar(m(h))!==0)return _(h)}function A(h){for(;;)if(r0(h,15),ar(m(h))!==0)return _(h)}function N(h){r0(h,15);var X=M1(m(h));if(X!==0)return X===1?A(h):_(h);for(;;)if(r0(h,15),ar(m(h))!==0)return _(h)}function R(h){for(;;)if(r0(h,23),ar(m(h))!==0)return _(h)}function O(h){r0(h,22);var X=M1(m(h));if(X!==0)return X===1?R(h):_(h);for(;;)if(r0(h,21),ar(m(h))!==0)return _(h)}function M(h){for(;;)if(r0(h,23),ar(m(h))!==0)return _(h)}function L(h){r0(h,22);var X=M1(m(h));if(X!==0)return X===1?M(h):_(h);for(;;)if(r0(h,21),ar(m(h))!==0)return _(h)}function z(h){x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,24);var X=os(m(h));if(3>>0)return _(h);switch(X){case 0:return M(h);case 1:continue;case 2:continue x;default:return L(h)}}}}function V(h){r0(h,29);var X=bJ(m(h));if(3>>0)return _(h);switch(X){case 0:return e(h);case 1:var W0=jo(m(h));if(W0===0)for(;;){r0(h,24);var sx=ba(m(h));if(2>>0)return _(h);switch(sx){case 0:return M(h);case 1:continue;default:return L(h)}}if(W0!==1)return _(h);for(;;){r0(h,24);var tx=os(m(h));if(3>>0)return _(h);switch(tx){case 0:return M(h);case 1:continue;case 2:return z(h);default:return L(h)}}case 2:for(;;){r0(h,24);var j0=ba(m(h));if(2>>0)return _(h);switch(j0){case 0:return R(h);case 1:continue;default:return O(h)}}default:for(;;){r0(h,24);var Px=os(m(h));if(3>>0)return _(h);switch(Px){case 0:return R(h);case 1:continue;case 2:return z(h);default:return O(h)}}}}function Z(h){r0(h,30);var X=zJ(m(h));if(3>>0)return _(h);switch(X){case 0:return e(h);case 1:for(;;){r0(h,30);var W0=Uo(m(h));if(4>>0)return _(h);switch(W0){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var sx=Uo(m(h));if(4>>0)return _(h);switch(sx){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:continue x;default:return u(h)}}}default:return u(h)}}case 2:return V(h);default:return u(h)}}function $(h){return zy(m(h))===0&&Yy(m(h))===0&&rV(m(h))===0&&ZJ(m(h))===0&&WJ(m(h))===0&&By(m(h))===0&&r6(m(h))===0&&zy(m(h))===0&&Xo(m(h))===0&&fI(m(h))===0&&zv(m(h))===0?3:_(h)}function i0(h){return r0(h,3),nV(m(h))===0?3:_(h)}function U(h){var X=TS0(m(h));if(31>>0)return _(h);switch(X){case 0:return 66;case 1:return 67;case 2:if(r0(h,1),cs(m(h))!==0)return _(h);for(;;)if(r0(h,1),cs(m(h))!==0)return _(h);case 3:return 0;case 4:return r0(h,0),le(m(h))===0?0:_(h);case 5:return 6;case 6:return 65;case 7:if(r0(h,67),r6(m(h))!==0)return _(h);var W0=m(h),sx=nn>>0)return _(h);switch(qx){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:x:for(;;){if(mr(m(h))!==0)return _(h);for(;;){r0(h,30);var B0=Uo(m(h));if(4>>0)return _(h);switch(B0){case 0:return e(h);case 1:continue;case 2:return V(h);case 3:continue x;default:return u(h)}}}default:return u(h)}}case 16:r0(h,67);var tr=Wy(m(h));if(tr!==0)return tr===1?5:_(h);r0(h,2);var Ux=Iy(m(h));if(2>>0)return _(h);switch(Ux){case 0:for(;;){var K0=Iy(m(h));if(2>>0)return _(h);switch(K0){case 0:continue;case 1:return i0(h);default:return $(h)}}case 1:return i0(h);default:return $(h)}case 17:r0(h,30);var ur=QJ(m(h));if(8>>0)return _(h);switch(ur){case 0:return e(h);case 1:return Z(h);case 2:for(;;){r0(h,16);var z0=xV(m(h));if(4>>0)return _(h);switch(z0){case 0:return A(h);case 1:return i(h);case 2:continue;case 3:for(;;){r0(h,15);var or=Oy(m(h));if(3>>0)return _(h);switch(or){case 0:return A(h);case 1:return i(h);case 2:continue;default:return N(h)}}default:return N(h)}}case 3:for(;;){r0(h,30);var Ur=Oy(m(h));if(3>>0)return _(h);switch(Ur){case 0:return e(h);case 1:return i(h);case 2:continue;default:return t(h)}}case 4:r0(h,29);var lx=$J(m(h));if(lx===0)return e(h);if(lx!==1)return _(h);for(;;){r0(h,10);var a1=$y(m(h));if(3>>0)return _(h);switch(a1){case 0:return g(h);case 1:continue;case 2:x:for(;;){if(ss(m(h))!==0)return _(h);for(;;){r0(h,10);var z1=$y(m(h));if(3>>0)return _(h);switch(z1){case 0:return T(h);case 1:continue;case 2:continue x;default:r0(h,8);var w1=M1(m(h));if(w1!==0)return w1===1?T(h):_(h);for(;;)if(r0(h,7),ar(m(h))!==0)return _(h)}}}default:r0(h,8);var Cr=M1(m(h));if(Cr!==0)return Cr===1?g(h):_(h);for(;;)if(r0(h,7),ar(m(h))!==0)return _(h)}}case 5:return V(h);case 6:r0(h,29);var n2=FJ(m(h));if(n2===0)return e(h);if(n2!==1)return _(h);for(;;){r0(h,14);var w=Zy(m(h));if(3>>0)return _(h);switch(w){case 0:return k(h);case 1:continue;case 2:x:for(;;){if(V2(m(h))!==0)return _(h);for(;;){r0(h,14);var x0=Zy(m(h));if(3>>0)return _(h);switch(x0){case 0:return d(h);case 1:continue;case 2:continue x;default:r0(h,12);var e0=M1(m(h));if(e0!==0)return e0===1?d(h):_(h);for(;;)if(r0(h,11),ar(m(h))!==0)return _(h)}}}default:r0(h,12);var S0=M1(m(h));if(S0!==0)return S0===1?k(h):_(h);for(;;)if(r0(h,11),ar(m(h))!==0)return _(h)}}case 7:r0(h,29);var G=XJ(m(h));if(G===0)return e(h);if(G!==1)return _(h);for(;;){r0(h,20);var k0=Qy(m(h));if(3>>0)return _(h);switch(k0){case 0:return a(h);case 1:continue;case 2:x:for(;;){if(Pr(m(h))!==0)return _(h);for(;;){r0(h,20);var J0=Qy(m(h));if(3>>0)return _(h);switch(J0){case 0:return o(h);case 1:continue;case 2:continue x;default:r0(h,18);var I0=M1(m(h));if(I0!==0)return I0===1?o(h):_(h);for(;;)if(r0(h,17),ar(m(h))!==0)return _(h)}}}default:r0(h,18);var ix=M1(m(h));if(ix!==0)return ix===1?a(h):_(h);for(;;)if(r0(h,17),ar(m(h))!==0)return _(h)}}default:return t(h)}case 18:r0(h,30);var Wx=My(m(h));if(5>>0)return _(h);switch(Wx){case 0:return e(h);case 1:return Z(h);case 2:for(;;){r0(h,30);var Bx=My(m(h));if(5>>0)return _(h);switch(Bx){case 0:return e(h);case 1:return Z(h);case 2:continue;case 3:return V(h);case 4:return f(h);default:return t(h)}}case 3:return V(h);case 4:return f(h);default:return t(h)}case 19:return 44;case 20:return 42;case 21:return 49;case 22:r0(h,51);var Hx=m(h),$x=61>>0)return Nx(Jn0);var Y=J;if(34>Y)switch(Y){case 0:return[2,z2(x,r)];case 1:return[2,x];case 2:var F=h2(x,r),n0=Fr(Jr),Q=Kv(x,n0,r),f0=Q[1];return[1,f0,zt(f0,F,Q[2],n0,1)];case 3:var s0=Jx(r);if(!x[5]){var v0=h2(x,r),o0=Fr(Jr);vr(o0,s0);var c0=Kv(x,o0,r),T0=c0[1];return[1,T0,zt(T0,v0,c0[2],o0,1)]}var E0=x[4]?cV(x,Vr(x,r),s0):x,M0=Ey(1,E0),Y0=_y(r);return Ar(ql(r,Y0-1|0,1),Iv)&&P(ql(r,Y0-2|0,1),Iv)?[0,M0,86]:[2,M0];case 4:if(x[4])return[2,Ey(0,x)];qa(r),yr(r);var rx=VJ(m(r))===0?0:_(r);return rx===0?[0,x,f2]:Nx(Vn0);case 5:var g0=h2(x,r),H0=Fr(Jr),t0=e3(x,H0,r),ex=t0[1];return[1,ex,zt(ex,g0,t0[2],H0,0)];case 6:var xx=Jx(r),ax=h2(x,r),dx=Fr(Jr),mx=Fr(Jr);vr(mx,xx);var L0=lV(x,xx,dx,mx,0,r),C0=L0[1],A0=L0[3],U0=[0,C0[1],ax,L0[2]],Q0=Y1(mx);return[0,C0,[2,[0,U0,Y1(dx),Q0,A0]]];case 7:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&jy(m(X))===0&&ss(m(X))===0)for(;;){var W0=Ny(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(ss(m(X))===0)for(;;){var sx=Ny(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Zt(0,n1(X))]:Nx(Xn0)});case 8:return[0,x,Zt(0,n1(r))];case 9:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&jy(m(X))===0&&ss(m(X))===0)for(;;){r0(X,0);var W0=Cy(m(X));if(W0!==0){if(W0===1)x:for(;;){if(ss(m(X))===0)for(;;){r0(X,0);var sx=Cy(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Kt(0,n1(X))]:Nx(Yn0)});case 10:return[0,x,Kt(0,n1(r))];case 11:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&Jy(m(X))===0&&V2(m(X))===0)for(;;){var W0=Dy(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(V2(m(X))===0)for(;;){var sx=Dy(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Zt(1,n1(X))]:Nx(Bn0)});case 12:return[0,x,Zt(1,n1(r))];case 13:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&Jy(m(X))===0&&V2(m(X))===0)for(;;){r0(X,0);var W0=Ly(m(X));if(W0!==0){if(W0===1)x:for(;;){if(V2(m(X))===0)for(;;){r0(X,0);var sx=Ly(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Kt(3,n1(X))]:Nx(Un0)});case 14:return[0,x,Kt(3,n1(r))];case 15:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&V2(m(X))===0){for(;;)if(r0(X,0),V2(m(X))!==0){var W0=_(X);break}}else var W0=_(X);return W0===0?[0,h,Kt(1,n1(X))]:Nx(jn0)});case 16:return[0,x,Kt(1,n1(r))];case 17:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&Ay(m(X))===0&&Pr(m(X))===0)for(;;){var W0=Ry(m(X));if(2>>0)var j0=_(X);else switch(W0){case 0:continue;case 1:x:for(;;){if(Pr(m(X))===0)for(;;){var sx=Ry(m(X));if(2>>0)var tx=_(X);else switch(sx){case 0:continue;case 1:continue x;default:var tx=0}break}else var tx=_(X);var j0=tx;break}break;default:var j0=0}break}else var j0=_(X);return j0===0?[0,h,Zt(2,n1(X))]:Nx(Dn0)});case 18:return[0,x,Zt(2,n1(r))];case 19:return C1(x,r,function(h,X){if(yr(X),ae(m(X))===0&&Ay(m(X))===0&&Pr(m(X))===0)for(;;){r0(X,0);var W0=Ky(m(X));if(W0!==0){if(W0===1)x:for(;;){if(Pr(m(X))===0)for(;;){r0(X,0);var sx=Ky(m(X));if(sx!==0){if(sx===1)continue x;var tx=_(X);break}}else var tx=_(X);var j0=tx;break}else var j0=_(X);break}}else var j0=_(X);return j0===0?[0,h,Kt(4,n1(X))]:Nx(Mn0)});case 20:return[0,x,Kt(4,n1(r))];case 21:return C1(x,r,function(h,X){function W0(z0){for(;;){var or=Jt(m(z0));if(2>>0)return _(z0);switch(or){case 0:continue;case 1:x:for(;;){if(mr(m(z0))!==0)return _(z0);for(;;){var Ur=Jt(m(z0));if(2>>0)return _(z0);switch(Ur){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function sx(z0){for(;;){var or=x3(m(z0));if(or!==0)return or===1?0:_(z0)}}function tx(z0){var or=Fy(m(z0));if(2>>0)return _(z0);switch(or){case 0:var Ur=jo(m(z0));return Ur===0?sx(z0):Ur===1?W0(z0):_(z0);case 1:return sx(z0);default:return W0(z0)}}function j0(z0){var or=Vy(m(z0));if(or!==0)return or===1?tx(z0):_(z0);for(;;){var Ur=te(m(z0));if(2>>0)return _(z0);switch(Ur){case 0:continue;case 1:return tx(z0);default:x:for(;;){if(mr(m(z0))!==0)return _(z0);for(;;){var lx=te(m(z0));if(2>>0)return _(z0);switch(lx){case 0:continue;case 1:return tx(z0);default:continue x}}}}}}yr(X);var Px=Do(m(X));if(2>>0)var Ex=_(X);else switch(Px){case 0:if(mr(m(X))===0)for(;;){var Ix=te(m(X));if(2>>0)var Ex=_(X);else switch(Ix){case 0:continue;case 1:var Ex=tx(X);break;default:x:for(;;){if(mr(m(X))===0)for(;;){var qx=te(m(X));if(2>>0)var B0=_(X);else switch(qx){case 0:continue;case 1:var B0=tx(X);break;default:continue x}break}else var B0=_(X);var Ex=B0;break}}break}else var Ex=_(X);break;case 1:var tr=Py(m(X)),Ex=tr===0?j0(X):tr===1?tx(X):_(X);break;default:for(;;){var Ux=Xy(m(X));if(2>>0)var Ex=_(X);else switch(Ux){case 0:var Ex=j0(X);break;case 1:continue;default:var Ex=tx(X)}break}}if(Ex!==0)return Nx(Ln0);var K0=n1(X),ur=_2(h,Vr(h,X),48);return[0,ur,Zt(2,K0)]});case 22:var H=n1(r),b=_2(x,Vr(x,r),48);return[0,b,Zt(2,H)];case 23:return C1(x,r,function(h,X){function W0(K0){for(;;){r0(K0,0);var ur=Bo(m(K0));if(ur!==0){if(ur!==1)return _(K0);x:for(;;){if(mr(m(K0))!==0)return _(K0);for(;;){r0(K0,0);var z0=Bo(m(K0));if(z0!==0){if(z0===1)continue x;return _(K0)}}}}}}function sx(K0){for(;;)if(r0(K0,0),mr(m(K0))!==0)return _(K0)}function tx(K0){var ur=Fy(m(K0));if(2>>0)return _(K0);switch(ur){case 0:var z0=jo(m(K0));return z0===0?sx(K0):z0===1?W0(K0):_(K0);case 1:return sx(K0);default:return W0(K0)}}function j0(K0){var ur=Vy(m(K0));if(ur!==0)return ur===1?tx(K0):_(K0);for(;;){var z0=te(m(K0));if(2>>0)return _(K0);switch(z0){case 0:continue;case 1:return tx(K0);default:x:for(;;){if(mr(m(K0))!==0)return _(K0);for(;;){var or=te(m(K0));if(2>>0)return _(K0);switch(or){case 0:continue;case 1:return tx(K0);default:continue x}}}}}}yr(X);var Px=Do(m(X));if(2>>0)var Ex=_(X);else switch(Px){case 0:if(mr(m(X))===0)for(;;){var Ix=te(m(X));if(2>>0)var Ex=_(X);else switch(Ix){case 0:continue;case 1:var Ex=tx(X);break;default:x:for(;;){if(mr(m(X))===0)for(;;){var qx=te(m(X));if(2>>0)var B0=_(X);else switch(qx){case 0:continue;case 1:var B0=tx(X);break;default:continue x}break}else var B0=_(X);var Ex=B0;break}}break}else var Ex=_(X);break;case 1:var tr=Py(m(X)),Ex=tr===0?j0(X):tr===1?tx(X):_(X);break;default:for(;;){var Ux=Xy(m(X));if(2>>0)var Ex=_(X);else switch(Ux){case 0:var Ex=j0(X);break;case 1:continue;default:var Ex=tx(X)}break}}return Ex===0?[0,h,Kt(4,n1(X))]:Nx(In0)});case 24:return[0,x,Kt(4,n1(r))];case 25:return C1(x,r,function(h,X){function W0(Ux){for(;;){var K0=Jt(m(Ux));if(2>>0)return _(Ux);switch(K0){case 0:continue;case 1:x:for(;;){if(mr(m(Ux))!==0)return _(Ux);for(;;){var ur=Jt(m(Ux));if(2>>0)return _(Ux);switch(ur){case 0:continue;case 1:continue x;default:return 0}}}default:return 0}}}function sx(Ux){var K0=x3(m(Ux));return K0===0?W0(Ux):K0===1?0:_(Ux)}yr(X);var tx=Do(m(X));if(2>>0)var j0=_(X);else switch(tx){case 0:var j0=mr(m(X))===0?W0(X):_(X);break;case 1:for(;;){var Px=r3(m(X));if(Px===0)var j0=sx(X);else{if(Px===1)continue;var j0=_(X)}break}break;default:for(;;){var Ex=Yo(m(X));if(2>>0)var j0=_(X);else switch(Ex){case 0:var j0=sx(X);break;case 1:continue;default:x:for(;;){if(mr(m(X))===0)for(;;){var Ix=Yo(m(X));if(2>>0)var qx=_(X);else switch(Ix){case 0:var qx=sx(X);break;case 1:continue;default:continue x}break}else var qx=_(X);var j0=qx;break}}break}}if(j0!==0)return Nx(On0);var B0=n1(X),tr=_2(h,Vr(h,X),39);return[0,tr,Zt(2,B0)]});case 26:return C1(x,r,function(h,X){yr(X);var W0=jo(m(X));if(W0===0)for(;;){var sx=x3(m(X));if(sx!==0){var Ex=sx===1?0:_(X);break}}else if(W0===1)for(;;){var tx=Jt(m(X));if(2>>0)var Ex=_(X);else switch(tx){case 0:continue;case 1:x:for(;;){if(mr(m(X))===0)for(;;){var j0=Jt(m(X));if(2>>0)var Px=_(X);else switch(j0){case 0:continue;case 1:continue x;default:var Px=0}break}else var Px=_(X);var Ex=Px;break}break;default:var Ex=0}break}else var Ex=_(X);return Ex===0?[0,h,Zt(2,n1(X))]:Nx(Rn0)});case 27:var B=n1(r),a0=_2(x,Vr(x,r),39);return[0,a0,Zt(2,B)];case 28:return[0,x,Zt(2,n1(r))];case 29:return C1(x,r,function(h,X){function W0(B0){for(;;){r0(B0,0);var tr=Bo(m(B0));if(tr!==0){if(tr!==1)return _(B0);x:for(;;){if(mr(m(B0))!==0)return _(B0);for(;;){r0(B0,0);var Ux=Bo(m(B0));if(Ux!==0){if(Ux===1)continue x;return _(B0)}}}}}}function sx(B0){return r0(B0,0),mr(m(B0))===0?W0(B0):_(B0)}yr(X);var tx=Do(m(X));if(2>>0)var j0=_(X);else switch(tx){case 0:var j0=mr(m(X))===0?W0(X):_(X);break;case 1:for(;;){r0(X,0);var Px=r3(m(X));if(Px===0)var j0=sx(X);else{if(Px===1)continue;var j0=_(X)}break}break;default:for(;;){r0(X,0);var Ex=Yo(m(X));if(2>>0)var j0=_(X);else switch(Ex){case 0:var j0=sx(X);break;case 1:continue;default:x:for(;;){if(mr(m(X))===0)for(;;){r0(X,0);var Ix=Yo(m(X));if(2>>0)var qx=_(X);else switch(Ix){case 0:var qx=sx(X);break;case 1:continue;default:continue x}break}else var qx=_(X);var j0=qx;break}}break}}return j0===0?[0,h,Kt(4,n1(X))]:Nx(Nn0)});case 30:return[0,x,Kt(4,n1(r))];case 31:return[0,x,66];case 32:return[0,x,6];default:return[0,x,7]}switch(Y){case 34:return[0,x,0];case 35:return[0,x,1];case 36:return[0,x,2];case 37:return[0,x,3];case 38:return[0,x,4];case 39:return[0,x,5];case 40:return[0,x,12];case 41:return[0,x,10];case 42:return[0,x,8];case 43:return[0,x,9];case 44:return[0,x,86];case 45:return[0,x,83];case 46:return[0,x,85];case 47:return[0,x,6];case 48:return[0,x,7];case 49:return[0,x,98];case 50:return[0,x,99];case 51:return[0,x,82];case 52:return[0,x,85];case 53:return[0,x,f2];case 54:return[0,x,86];case 55:return[0,x,88];case 56:return[0,x,87];case 57:return[0,x,89];case 58:return[0,x,91];case 59:return[0,x,11];case 60:return[0,x,82];case 61:return[0,x,nn];case 62:return[0,x,Dt];case 63:return[0,x,ud];case 64:return[0,x,Ep];case 65:var m0=r[6];iV(r);var P0=t6(x,m0,r[3]);zO(r,m0);var D=n1(r),N0=vV(x,D),X0=N0[2],D0=N0[1],ox=Tx(X0,_p);if(0<=ox){if(0>=ox)return[0,D0,Eo];var b0=Tx(X0,wx);if(0<=b0){if(0>=b0)return[0,D0,ul];if(!P(X0,Cs))return[0,D0,31];if(!P(X0,Ps))return[0,D0,46];if(!P(X0,vd))return[0,D0,Ma];if(!P(X0,B5))return[0,D0,x1];if(!P(X0,Is))return[0,D0,Lf]}else{if(!P(X0,X8))return[0,D0,It];if(!P(X0,_v))return[0,D0,29];if(!P(X0,_a))return[0,D0,dv];if(!P(X0,Ea))return[0,D0,K4];if(!P(X0,De))return[0,D0,42];if(!P(X0,ja))return[0,D0,Pa]}}else{var kx=Tx(X0,Bc);if(0<=kx){if(0>=kx)return[0,D0,41];if(!P(X0,Os))return[0,D0,30];if(!P(X0,Vj))return[0,D0,Jr];if(!P(X0,G2))return[0,D0,53];if(!P(X0,ml))return[0,D0,h1];if(!P(X0,Y8))return[0,D0,Di]}else{if(!P(X0,y5))return[0,D0,ct];if(!P(X0,ka))return[0,D0,_l];if(!P(X0,wv))return[0,D0,ya];if(!P(X0,D5))return[0,D0,Kn0];if(!P(X0,xl))return[0,D0,zn0];if(!P(X0,ce))return[0,D0,Ri]}}return[0,D0,[4,P0,X0,Gl(D)]];case 66:var V0=x[4]?_2(x,Vr(x,r),96):x;return[0,V0,Nr];default:return[0,x,[7,Jx(r)]]}},n6=function(x){return function(r){for(var e=0,t=r;;){var u=p(x,t,t[2]);switch(u[0]){case 0:var i=u[2],f=u[1],o=fV(f,i),a=e===0?0:Ax(e),d=f[6];if(d===0)return[0,[0,f[1],f[2],f[3],f[4],f[5],f[6],o],[0,i,o,0,a]];var k=[0,i,o,Ax(d),a];return[0,[0,f[1],f[2],f[3],f[4],f[5],LJ,o],k];case 1:var T=u[2],g=u[1],e=[0,T,e],t=[0,g[1],g[2],g[3],g[4],g[5],g[6],T[1]];continue;default:var t=u[1];continue}}}},RS0=n6(AS0),OS0=n6(PS0),IS0=n6(CS0),LS0=n6(NS0),MS0=n6(ES0),w2=EJ([0,JT0]),u6=function(x,r){return[0,0,0,r,MJ(x)]},qy=function(x){var r=x[4];switch(x[3]){case 0:var J=l(MS0,r);break;case 1:var J=l(LS0,r);break;case 2:var J=l(OS0,r);break;case 3:var e=pe(r,r[2]),t=Fr(Jr),u=Fr(Jr),i=r[2];yr(i);var f=m(i),o=It>>0)var a=_(i);else switch(o){case 0:var a=1;break;case 1:var a=4;break;case 2:var a=0;break;case 3:r0(i,0);var a=le(m(i))===0?0:_(i);break;case 4:var a=2;break;default:var a=3}if(4>>0)var d=Nx(Qn0);else switch(a){case 0:var k=Jx(i);vr(u,k),vr(t,k);var T=yV(z2(r,i),t,u,i),g=pe(T,i),A=Y1(t),N=Y1(u),d=[0,T,[9,[0,T[1],e,g],A,N]];break;case 1:var d=[0,r,Nr];break;case 2:var d=[0,r,98];break;case 3:var d=[0,r,0];break;default:qa(i);var R=yV(r,t,u,i),O=pe(R,i),M=Y1(t),L=Y1(u),d=[0,R,[9,[0,R[1],e,O],M,L]]}var z=d[2],V=d[1],Z=fV(V,z),$=V[6];if($===0)var U=[0,V,[0,z,Z,0,0]];else var i0=[0,z,Z,Ax($),0],U=[0,[0,V[1],V[2],V[3],V[4],V[5],0,V[7]],i0];var J=U;break;case 4:var J=l(IS0,r);break;default:var J=l(RS0,r)}var Y=J[1],F=J[2],n0=[0,MJ(Y),F];return x[4]=Y,x[1]?x[2]=[0,n0]:x[1]=[0,n0],n0},mV=function(x){var r=x[1];return r?r[1][2]:qy(x)[2]},t3=function(x){return Bl(x[24][1])},_1=function(x){return x[28][4]},ux=function(x,r){var e=r[2];x[1][1]=[0,[0,r[1],e],x[1][1]];var t=x[23];return t?p(t[1],x,e):0},i6=function(x,r){return x[31][1]=r,0},Jo=function(x,r){if(x===0)return mV(r[26][1]);if(x!==1)throw q0([0,wr,Ps0],1);var e=r[26][1];e[1]||qy(e);var t=e[2];return t?t[1][2]:qy(e)[2]},Gs=function(x,r){return x===r[5]?r:[0,r[1],r[2],r[3],r[4],x,r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},kV=function(x,r){return x===r[10]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],x,r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},sI=function(x,r){return x===r[18]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],x,r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},oI=function(x,r){return x===r[19]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],x,r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},hV=function(x,r){return x===r[20]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],x,r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Zv=function(x,r){return x===r[22]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],x,r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},vI=function(x,r){return x===r[14]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],x,r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},f6=function(x,r){return x===r[8]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],x,r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},c6=function(x,r){return x===r[12]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],x,r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Wv=function(x,r){return x===r[15]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],x,r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},aI=function(x,r){return x===r[16]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],x,r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},_V=function(x,r){return x===r[6]?r:[0,r[1],r[2],r[3],r[4],r[5],x,r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},wV=function(x,r){return x===r[7]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],x,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},lI=function(x,r){return x===r[13]?r:[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],x,r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],r[23],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},Gy=function(x,r){return[0,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16],r[17],r[18],r[19],r[20],r[21],r[22],[0,x],r[24],r[25],r[26],r[27],r[28],r[29],r[30],r[31]]},pI=function(x){function r(e){return ux(x,e)}return function(e){return P2(r,e)}},n3=function(x){var r=x[4][1];return r?[0,r[1][2]]:0},TV=function(x){var r=x[4][1];return r?[0,r[1][1]]:0},SV=function(x){return[0,x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15],x[16],x[17],x[18],x[19],x[20],x[21],x[22],0,x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]]},EV=function(x,r,e,t){return[0,x[1],x[2],w2[1],x[4],x[5],0,0,0,0,0,1,x[12],x[13],x[14],x[15],x[16],x[17],e,r,x[20],t,x[22],x[23],x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]]},u3=function(x){return P(x,Tv)&&P(x,G2)&&P(x,ma)&&P(x,u8)&&P(x,Sl)&&P(x,F3)&&P(x,V3)&&P(x,De)&&P(x,B2)?0:1},$v=function(x){return P(x,EP)&&P(x,"eval")?0:1},by=function(x){var r=Tx(x,s8),e=0;if(0<=r){if(0>>0){if(M2>=t+1>>>0)return 1}else if(t===6)return 0}return o6(x,r)},i3=function(x){return PV(0,x)},Vo=function(x,r){var e=pr(x,r),t=0;if(typeof e=="number")switch(e){case 28:case 42:case 52:case 53:case 54:case 55:case 56:case 57:case 58:var u=1;break;default:t=1}else if(e[0]===4)var u=u3(e[2]);else t=1;if(t)var u=0;if(u)return 1;var i=0;if(typeof e=="number")switch(e){case 14:case 48:case 60:case 61:case 62:case 63:case 64:case 65:case 126:i=1;break}else e[0]===4&&(i=1);return i?1:0},x9=function(x,r){return gV(r,pr(x,r))},CV=function(x,r){var e=Vo(x,r);return e||x9(x,r)},vs=function(x){return Vo(0,x)},zo=function(x){var r=K(x)===15?1:0;if(r)var e=r;else{var t=K(x)===64?1:0;if(t){var u=pr(1,x)===15?1:0;if(u)var i=s6(1,x)[2][1],e=gx(x)[3][1]===i?1:0;else var e=u}else var e=t}return e},v6=function(x){var r=K(x);if(typeof r=="number")switch(r){case 13:case 40:return 1}else if(r[0]===4&&!P(r[3],bh)&&pr(1,x)===40)return 1;return 0},mI=function(x){var r=x[28][1];if(r){var e=K(x);if(typeof e!="number"&&e[0]===4&&!P(e[3],_o)&&Vo(1,x))return 1;var t=0}else var t=r;return t},kI=function(x){var r=K(x);return typeof r!="number"&&r[0]===4&&!P(r[3],rr)?1:0},zx=function(x,r){return ux(x,[0,gx(x),r])},NV=function(x,r){var e=eI(0,r);return x?[26,e,x[1]]:[24,e]},g1=function(x,r){var e=yI(r);return l(pI(r),e),zx(r,NV(x,K(r)))},r9=function(x){function r(e){return ux(x,[0,e[1],Nr])}return function(e){return P2(r,e)}},RV=function(x,r){var e=x[6]?G0(Tr(Es0),r,r,r):gs0;return g1([0,e],x)},Wt=function(x,r){var e=x[5];return e&&zx(x,r)},dt=function(x,r){var e=x[5],t=r[2],u=r[1];return e&&ux(x,[0,u,t])},Qv=function(x,r){return ux(x,[0,r,[14,x[5]]])},Z0=function(x){var r=x[27][1];if(r){var e=r[1],t=t3(x),u=K(x);l(e,[0,gx(x),u,t])}var i=x[26][1],f=i[1],o=f?f[1][1]:qy(i)[1];x[25][1]=o;var a=yI(x);l(pI(x),a);var d=x[2][1],k=us(Jo(0,x)[4],d);x[2][1]=k;var T=[0,Jo(0,x)];x[4][1]=T;var g=x[26][1];return g[2]?(g[1]=g[2],g[2]=0,0):(mV(g),g[1]=0,0)},v1=function(x,r){var e=p(GO,K(x),r);return e&&Z0(x),e},J1=function(x,r){x[24][1]=[0,r,x[24][1]];var e=t3(x),t=u6(x[25][1],e);return x[26][1]=t,0},W1=function(x){var r=x[24][1],e=r?r[2]:Nx(Ss0);x[24][1]=e;var t=t3(x),u=u6(x[25][1],t);return x[26][1]=u,0},yx=function(x){var r=gx(x);if(K(x)===9&&o6(1,x)){var e=_0(x),t=Jo(1,x)[4],u=Fx(e,l(Xl(function(f){return f[1][2][1]<=r[3][1]?1:0}),t));return i6(x,[0,r[3][1]+1|0,0]),u}var i=_0(x);return i6(x,r[3]),i},Ko=function(x){var r=x[4][1];if(!r)return 0;var e=r[1][2],t=_0(x),u=l(Xl(function(i){return i[1][2][1]<=e[3][1]?1:0}),t);return i6(x,[0,e[3][1]+1|0,0]),u},xo=function(x,r){return g1([0,eI(_s0,r)],x)},u0=function(x,r){return 1-p(GO,K(x),r)&&xo(x,r),Z0(x)},OV=function(x,r){var e=v1(x,r);return 1-e&&xo(x,r),e},e9=function(x,r){return OV(x,r),0},ro=function(x,r){var e=K(x),t=0;return typeof e!="number"&&e[0]===4&&Ar(e[3],r)&&(t=1),t||g1([0,l(Tr(hs0),r)],x),Z0(x)},as=[Gr,Ls0,Js(0)],IV=function(x,r,e){if(!e)return 0;var t=e[1],u=t[1],i=t[2];if(r[27][1]=[0,u],!x)return x;for(var f=i[2];;){if(!f)return 0;var o=f[2];l(u,f[1]);var f=o}},hI=function(x,r){var e=x[27][1];if(e){var t=e[1],u=hX(0),i=[0,function(z){return dO(z,u)}];x[27][1]=i;var f=[0,[0,t,u]]}else var f=0;var o=x[31][1],a=x[25][1],d=x[24][1],k=x[4][1],T=x[2][1],g=x[1][1];try{var A=l(r,x);IV(1,x,f);var N=[0,A];return N}catch(L){var R=I1(L);if(R!==as)throw q0(R,0);IV(0,x,f),x[1][1]=g,x[2][1]=T,x[4][1]=k,x[24][1]=d,x[25][1]=a,x[31][1]=o;var O=t3(x),M=u6(x[25][1],O);return x[26][1]=M,0}},t9=function(x,r,e){var t=hI(x,e);return t?t[1]:r},a6=function(x,r){var e=Ax(r);if(!e)return r;var t=e[1],u=e[2],i=l(x,t);return t===i?r:Ax([0,i,u])},LV=my(Bs0,function(x){var r=BO(x,Ds0),e=jO(x,Us0),t=e[24],u=e[28],i=e[41],f=e[91],o=e[pN],a=e[RR],d=e[hg],k=e[iB],T=e[Gx],g=e[OB],A=e[6],N=e[7],R=e[10],O=e[17],M=e[23],L=e[29],z=e[39],V=e[42],Z=e[52],$=e[61],i0=e[f2],U=e[U1],J=e[Ri],Y=e[ya],F=e[Pa],n0=e[xN],Q=e[jw],f0=e[OU],s0=e[fU],v0=e[pE],o0=e[UT],c0=e[p5],T0=e[G4],E0=e[ET],M0=e[id],Y0=e[Lp],rx=e[wT],g0=e[H8],H0=e[rl],t0=e[jg],ex=e[Av],xx=e[qD],ax=e[zM],dx=e[tY],mx=e[X4],L0=e[kU],C0=e[uY],A0=e[gU],U0=e[PU],Q0=e[bB],H=XO(x,0,0,iX,$O,1)[1];function b(e0,S0,G){var k0=G[2],J0=k0[2],I0=k0[1],ix=G[1];if(J0){var Wx=J0[1],Bx=function($x){return[0,ix,[0,I0,[0,$x]]]};return $0(l(e0[1][1+a],e0),Wx,G,Bx)}function Hx($x){return[0,ix,[0,$x,J0]]}return $0(p(e0[1][1+A],e0,S0),I0,G,Hx)}function B(e0,S0,G){var k0=G[2],J0=G[1],I0=J0[3],ix=J0[2],Wx=J0[1];if(I0)var Bx=a6(l(e0[1][1+u],e0),I0),Hx=ix;else var Bx=0,Hx=p(e0[1][1+u],e0,ix);var $x=p(e0[1][1+i],e0,k0);return ix===Hx&&I0===Bx&&k0===$x?G:[0,[0,Wx,Hx,Bx],$x]}function a0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function m0(e0,S0,G){var k0=G[3];function J0(I0){return[0,G[1],G[2],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function P0(e0,S0){var G=S0[2];function k0(J0){return[0,S0[1],J0]}return $0(l(e0[1][1+i],e0),G,S0,k0)}function D(e0,S0,G){var k0=G[3];function J0(I0){return[0,G[1],G[2],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function N0(e0,S0,G){var k0=G[2],J0=G[1],I0=a6(l(e0[1][1+a],e0),J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,I0,ix]}function X0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function D0(e0,S0,G){var k0=G[4];function J0(I0){return[0,G[1],G[2],G[3],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function ox(e0,S0,G){var k0=G[2];function J0(I0){return[0,G[1],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function b0(e0,S0,G){var k0=G[3],J0=G[2],I0=p(e0[1][1+J],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],I0,ix]}function kx(e0,S0,G){var k0=G[4],J0=G[3],I0=G[2],ix=G[1],Wx=p(e0[1][1+i],e0,k0);if(J0){var Bx=Vx(l(e0[1][1+g],e0),J0);return J0===Bx&&k0===Wx?G:[0,G[1],G[2],Bx,Wx]}if(I0){var Hx=Vx(l(e0[1][1+T],e0),I0);return I0===Hx&&k0===Wx?G:[0,G[1],Hx,G[3],Wx]}var $x=p(e0[1][1+a],e0,ix);return ix===$x&&k0===Wx?G:[0,$x,G[2],G[3],Wx]}function V0(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function h(e0,S0,G){var k0=G[4];function J0(I0){return[0,G[1],G[2],G[3],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function X(e0,S0,G){var k0=G[4];function J0(I0){return[0,G[1],G[2],G[3],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function W0(e0,S0,G){var k0=G[2],J0=G[1],I0=J0[3],ix=J0[2],Wx=J0[1];if(I0)var Bx=a6(l(e0[1][1+u],e0),I0),Hx=ix;else var Bx=0,Hx=p(e0[1][1+u],e0,ix);var $x=p(e0[1][1+i],e0,k0);return ix===Hx&&I0===Bx&&k0===$x?G:[0,[0,Wx,Hx,Bx],$x]}function sx(e0,S0,G){var k0=G[3],J0=G[1],I0=e2(l(e0[1][1+f],e0),J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,I0,G[2],ix]}function tx(e0,S0,G){var k0=G[2];function J0(I0){return[0,G[1],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function j0(e0,S0){if(S0[0]===0){var G=S0[1],k0=function(Hx){return[0,Hx]};return $0(l(e0[1][1+o],e0),G,S0,k0)}var J0=S0[1],I0=J0[2],ix=I0[2],Wx=J0[1],Bx=p(e0[1][1+o],e0,ix);return ix===Bx?S0:[1,[0,Wx,[0,I0[1],Bx]]]}function Px(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+c0],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function Ex(e0,S0){var G=S0[2],k0=S0[1],J0=G[4];function I0(ix){return[0,k0,[0,G[1],G[2],G[3],ix]]}return $0(l(e0[1][1+i],e0),J0,[0,k0,G],I0)}function Ix(e0,S0,G){var k0=G[9],J0=G[3],I0=p(e0[1][1+M0],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,G[4],G[5],G[6],G[7],G[8],ix,G[10]]}function qx(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function B0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function tr(e0,S0){var G=S0[2],k0=S0[1],J0=G[3];function I0(ix){return[0,k0,[0,G[1],G[2],ix]]}return $0(l(e0[1][1+i],e0),J0,[0,k0,G],I0)}function Ux(e0,S0,G){var k0=G[6],J0=G[5],I0=p(e0[1][1+ex],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],G[3],G[4],I0,ix,G[7]]}function K0(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];if(k0===0){var ix=function(Hx){return[0,I0,[0,Hx,k0]]};return $0(l(e0[1][1+o],e0),J0,S0,ix)}function Wx(Hx){return[0,I0,[0,J0,Hx]]}var Bx=l(e0[1][1+t],e0);return $0(function(Hx){return Vx(Bx,Hx)},k0,S0,Wx)}function ur(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Bx){return[0,I0,[0,Bx,k0]]}var Wx=l(e0[1][1+d],e0);return $0(function(Bx){return a6(Wx,Bx)},J0,S0,ix)}function z0(e0,S0,G){var k0=G[2],J0=G[1];if(k0===0){var I0=function(Bx){return[0,Bx,G[2],G[3]]};return $0(l(e0[1][1+a],e0),J0,G,I0)}function ix(Bx){return[0,G[1],Bx,G[3]]}var Wx=l(e0[1][1+t],e0);return $0(function(Bx){return Vx(Wx,Bx)},k0,G,ix)}function or(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function Ur(e0,S0,G){var k0=G[7],J0=G[2],I0=p(e0[1][1+k],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],I0,G[3],G[4],G[5],G[6],ix]}function lx(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function a1(e0,S0){var G=S0[2],k0=G[2],J0=G[1],I0=S0[1];function ix(Wx){return[0,I0,[0,J0,Wx]]}return $0(l(e0[1][1+i],e0),k0,S0,ix)}function z1(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+g],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function w1(e0,S0,G){var k0=G[2];function J0(I0){return[0,G[1],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}function Cr(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function n2(e0,S0,G){var k0=G[4],J0=G[3],I0=p(e0[1][1+a],e0,J0),ix=p(e0[1][1+i],e0,k0);return J0===I0&&k0===ix?G:[0,G[1],G[2],I0,ix]}function w(e0,S0){var G=S0[2];function k0(J0){return[0,S0[1],J0]}return $0(l(e0[1][1+i],e0),G,S0,k0)}function x0(e0,S0,G){var k0=G[2];function J0(I0){return[0,G[1],I0]}return $0(l(e0[1][1+i],e0),k0,G,J0)}return VO(x,[0,V,function(e0,S0){var G=S0[2],k0=l(Xl(function(I0){return qs(I0[1][2],e0[1+r])<0?1:0}),G),J0=ns(k0);return ns(G)===J0?S0:[0,S0[1],k0,S0[3]]},Q0,x0,U0,w,A0,n2,C0,Cr,L0,w1,mx,z1,g,a1,T,lx,dx,Ur,k,or,ax,z0,xx,ur,d,K0,t0,Ux,H0,tr,g0,B0,rx,qx,Y0,Ix,E0,Ex,T0,Px,o0,j0,v0,tx,s0,sx,f0,W0,Q,X,n0,h,F,V0,U,kx,Y,b0,i0,ox,f,D0,$,X0,Z,N0,z,D,L,P0,M,m0,O,a0,R,B,N,b]),function(e0,S0,G){var k0=ky(S0,x);return k0[1+r]=G,l(H,k0),JO(S0,k0,x)}}),n9=function(x){var r=n3(x);if(r)var e=r[1],t=AV(x)?(i6(x,e[3]),[0,p(LV[1],0,e[3])]):0,u=t;else var u=0;return[0,0,function(i,f){return u?p(f,u[1],i):i}]},l6=function(x){var r=n3(x);if(r){var e=r[1];if(AV(x)){i6(x,e[3]);var t=Ko(x),u=[0,p(LV[1],0,[0,e[3][1]+1|0,0])],i=t}else var u=0,i=Ko(x)}else var u=0,i=0;return[0,i,function(f,o){return u?p(o,u[1],f):f}]},N1=function(x){return K2(x)?l6(x):n9(x)},Sn=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,Na,2),t,u)})},ne=function(x,r){if(!r)return 0;var e=r[1],t=N1(x)[2];return[0,p(t,e,function(u,i){return p(bx(u,qN,5),u,i)})]},_I=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,MD,8),t,u)})},f3=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,-1045824777,9),t,u)})},p6=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,-455772979,10),t,u)})},MV=function(x,r){if(!r)return 0;var e=r[1],t=N1(x)[2];return[0,p(t,e,function(u,i){return p(bx(u,uU,13),u,i)})]},En=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,vD,14),t,u)})},DV=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){var i=l(bx(t,bU,16),t);return a6(function(f){return e2(i,f)},u)})},jV=function(x,r){var e=N1(x)[2];return p(e,r,function(t,u){return p(bx(t,-21476009,17),t,u)})},DS0=function(x,r){var e=x[2],t=x[1];function u(a1){return R2(a1,r)}switch(e[0]){case 0:var i=e[1],f=HO(i[2],r),lx=[0,[0,i[1],f]];break;case 1:var o=e[1],a=u(o[2]),lx=[1,[0,o[1],a]];break;case 2:var d=e[1],k=u(d[7]),lx=[2,[0,d[1],d[2],d[3],d[4],d[5],d[6],k]];break;case 3:var T=e[1],g=T[7],A=u(T[6]),lx=[3,[0,T[1],T[2],T[3],T[4],T[5],A,g]];break;case 4:var N=e[1],R=u(N[2]),lx=[4,[0,N[1],R]];break;case 5:var lx=[5,[0,u(e[1][1])]];break;case 6:var O=e[1],M=u(O[7]),lx=[6,[0,O[1],O[2],O[3],O[4],O[5],O[6],M]];break;case 7:var L=e[1],z=u(L[5]),lx=[7,[0,L[1],L[2],L[3],L[4],z]];break;case 8:var V=e[1],Z=u(V[3]),lx=[8,[0,V[1],V[2],Z]];break;case 9:var $=e[1],i0=u($[5]),lx=[9,[0,$[1],$[2],$[3],$[4],i0]];break;case 10:var U=e[1],J=u(U[4]),lx=[10,[0,U[1],U[2],U[3],J]];break;case 11:var Y=e[1],F=u(Y[5]),lx=[11,[0,Y[1],Y[2],Y[3],Y[4],F]];break;case 12:var n0=e[1],Q=u(n0[4]),lx=[12,[0,n0[1],n0[2],n0[3],Q]];break;case 13:var f0=e[1],s0=u(f0[2]),lx=[13,[0,f0[1],s0]];break;case 14:var v0=e[1],o0=u(v0[4]),lx=[14,[0,v0[1],v0[2],v0[3],o0]];break;case 15:var c0=e[1],T0=u(c0[5]),lx=[15,[0,c0[1],c0[2],c0[3],c0[4],T0]];break;case 16:var E0=e[1],M0=u(E0[4]),lx=[16,[0,E0[1],E0[2],E0[3],M0]];break;case 17:var Y0=e[1],rx=u(Y0[3]),lx=[17,[0,Y0[1],Y0[2],rx]];break;case 18:var lx=[18,[0,u(e[1][1])]];break;case 19:var g0=e[1],H0=u(g0[3]),lx=[19,[0,g0[1],g0[2],H0]];break;case 20:var t0=e[1],ex=u(t0[3]),lx=[20,[0,t0[1],t0[2],ex]];break;case 21:var xx=e[1],ax=u(xx[5]),lx=[21,[0,xx[1],xx[2],xx[3],xx[4],ax]];break;case 22:var dx=e[1],mx=u(dx[3]),lx=[22,[0,dx[1],dx[2],mx]];break;case 23:var L0=e[1],C0=u(L0[5]),lx=[23,[0,L0[1],L0[2],L0[3],L0[4],C0]];break;case 24:var A0=e[1],U0=u(A0[5]),lx=[24,[0,A0[1],A0[2],A0[3],A0[4],U0]];break;case 25:var Q0=e[1],H=u(Q0[5]),lx=[25,[0,Q0[1],Q0[2],Q0[3],Q0[4],H]];break;case 26:var b=e[1],B=b[10],a0=u(b[9]),lx=[26,[0,b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],a0,B]];break;case 27:var m0=e[1],P0=u(m0[4]),lx=[27,[0,m0[1],m0[2],m0[3],P0]];break;case 28:var D=e[1],N0=u(D[5]),lx=[28,[0,D[1],D[2],D[3],D[4],N0]];break;case 29:var X0=e[1],D0=u(X0[5]),lx=[29,[0,X0[1],X0[2],X0[3],X0[4],D0]];break;case 30:var ox=e[1],b0=u(ox[3]),lx=[30,[0,ox[1],ox[2],b0]];break;case 31:var kx=e[1],V0=kx[3],h=u(kx[2]),lx=[31,[0,kx[1],h,V0]];break;case 32:var X=e[1],W0=X[4],sx=u(X[3]),lx=[32,[0,X[1],X[2],sx,W0]];break;case 33:var tx=e[1],j0=u(tx[2]),lx=[33,[0,tx[1],j0]];break;case 34:var Px=e[1],Ex=u(Px[4]),lx=[34,[0,Px[1],Px[2],Px[3],Ex]];break;case 35:var Ix=e[1],qx=u(Ix[4]),lx=[35,[0,Ix[1],Ix[2],Ix[3],qx]];break;case 36:var B0=e[1],tr=u(B0[5]),lx=[36,[0,B0[1],B0[2],B0[3],B0[4],tr]];break;case 37:var Ux=e[1],K0=u(Ux[3]),lx=[37,[0,Ux[1],Ux[2],K0]];break;case 38:var ur=e[1],z0=u(ur[3]),lx=[38,[0,ur[1],ur[2],z0]];break;default:var or=e[1],Ur=u(or[3]),lx=[39,[0,or[1],or[2],Ur]]}return[0,t,lx]};my(Ys0,function(x){var r=BO(x,Ms0),e=YO(js0),t=e.length-1,u=uX.length-1,i=Va(t+u|0,0),f=t-1|0,o=0;if(f>=0)for(var a=o;;){var d=Fl(x,Z1(e,a)[1+a]);Z1(i,a)[1+a]=d;var k=a+1|0;if(f!==a){var a=k;continue}break}var T=u-1|0,g=0;if(T>=0)for(var A=g;;){var N=A+t|0,R=BO(x,Z1(uX,A)[1+A]);Z1(i,N)[1+N]=R;var O=A+1|0;if(T!==A){var A=O;continue}break}var M=i[4],L=i[5],z=i[nj],V=i[hg],Z=i[295],$=i[296],i0=i[44],U=i[$3],J=i[RB],Y=XO(x,0,0,iX,$O,1)[1];function F(o0,c0,T0){return p(o0[1][1+z],o0,T0[2]),T0}function n0(o0,c0){return p(o0[1][1+V],o0,c0),c0}function Q(o0,c0){var T0=c0[1],E0=o0[1+$];if(E0){var M0=qs(E0[1][1][2],T0[2])<0?1:0,Y0=M0&&(o0[1+$]=[0,c0],0);return Y0}var rx=0<=qs(T0[2],o0[1+r][3])?1:0,g0=rx&&(o0[1+$]=[0,c0],0);return g0}function f0(o0,c0){var T0=c0[1],E0=o0[1+Z];if(E0){var M0=qs(T0[2],E0[1][1][2])<0?1:0,Y0=M0&&(o0[1+Z]=[0,c0],0);return Y0}var rx=qs(T0[2],o0[1+r][2])<0?1:0,g0=rx&&(o0[1+Z]=[0,c0],0);return g0}function s0(o0,c0){return c0?p(o0[1][1+V],o0,c0[1]):0}function v0(o0,c0){var T0=c0[2],E0=c0[1];return P2(l(o0[1][1+L],o0),E0),P2(l(o0[1][1+M],o0),T0)}return VO(x,[0,U,function(o0){return[0,o0[1+Z],o0[1+$]]},V,v0,z,s0,L,f0,M,Q,i0,n0,J,F]),function(o0,c0,T0){var E0=ky(c0,x);return E0[1+r]=T0,l(Y,E0),E0[1+Z]=0,E0[1+$]=0,JO(c0,E0,x)}});var UV=function(x){var r=K(x),e=0;if(typeof r=="number"){var t=r;if(49<=t)switch(t){case 49:var u=_o0;break;case 50:var u=wo0;break;case 51:var u=To0;break;case 52:var u=So0;break;case 53:var u=Eo0;break;case 54:var u=go0;break;case 55:var u=Ao0;break;case 56:var u=Po0;break;case 57:var u=Co0;break;case 58:var u=No0;break;case 59:var u=Ro0;break;case 60:var u=Oo0;break;case 61:var u=Io0;break;case 62:var u=Lo0;break;case 63:var u=Mo0;break;case 64:var u=Do0;break;case 65:var u=jo0;break;case 114:var u=Uo0;break;case 115:var u=Bo0;break;case 116:var u=Yo0;break;case 117:var u=Xo0;break;case 118:var u=Jo0;break;case 119:var u=Vo0;break;case 120:var u=zo0;break;case 121:var u=Ko0;break;case 122:var u=Zo0;break;case 123:var u=Wo0;break;case 124:var u=$o0;break;case 125:var u=Qo0;break;case 126:var u=Fo0;break;case 128:var u=Ho0;break;case 129:var u=qo0;break;default:e=1}else switch(t){case 15:var u=Xs0;break;case 16:var u=Js0;break;case 17:var u=Vs0;break;case 18:var u=zs0;break;case 19:var u=Ks0;break;case 20:var u=Zs0;break;case 21:var u=Ws0;break;case 22:var u=$s0;break;case 23:var u=Qs0;break;case 24:var u=Fs0;break;case 25:var u=Hs0;break;case 26:var u=qs0;break;case 27:var u=Gs0;break;case 28:var u=bs0;break;case 29:var u=xo0;break;case 30:var u=ro0;break;case 31:var u=eo0;break;case 32:var u=to0;break;case 33:var u=no0;break;case 34:var u=uo0;break;case 35:var u=io0;break;case 36:var u=fo0;break;case 37:var u=co0;break;case 38:var u=so0;break;case 39:var u=oo0;break;case 40:var u=vo0;break;case 41:var u=ao0;break;case 42:var u=lo0;break;case 43:var u=po0;break;case 44:var u=do0;break;case 45:var u=yo0;break;case 46:var u=mo0;break;case 47:var u=ko0;break;case 48:var u=ho0;break;default:e=1}}else switch(r[0]){case 4:var u=r[2];break;case 11:var i=r[1]?Go0:bo0,u=i;break;default:e=1}if(e){g1(xv0,x);var u=rv0}return Z0(x),u},T2=function(x){var r=gx(x),e=_0(x),t=UV(x);return[0,r,[0,t,y0([0,e],[0,yx(x)],0)]]},BV=function(x){var r=gx(x),e=_0(x);u0(x,14);var t=gx(x),u=UV(x),i=y0([0,e],[0,yx(x)],0),f=Hr(r,t),o=t[2],a=r[3],d=a[1]===o[1]?1:0,k=d&&(a[2]===o[2]?1:0);return 1-k&&ux(x,[0,f,Eo]),[0,f,[0,u,i]]},Fv=function(x){var r=x[2],e=r[3]===0?1:0,t=r[2];if(!e)return e;for(var u=t;;){if(!u)return 1;var i=u[1][2],f=0,o=u[2];if(i[1][2][0]===2&&!i[2]){var a=1;f=1}if(!f)var a=0;if(!a)return a;var u=o}},d6=function(x){for(var r=x;;){var e=r[2];if(e[0]!==30)return 0;var t=e[1][2];if(t[2][0]===26)return 1;var r=t}},u9=function(x,r,e){var t=e[2][1],u=e[1];if(!P(t,Pv)){var i=r[19];return i&&ux(r,[0,u,6])}if(P(t,ma)){if(!P(t,B2))return r[18]?ux(r,[0,u,st]):dt(r,[0,u,85])}else if(r[14])return ux(r,[0,u,[24,gy(t)]]);if(u3(t))return dt(r,[0,u,85]);if(by(t))return ux(r,[0,u,st]);if(x){var f=x[1];if($v(t))return dt(r,[0,u,f])}return 0},l0=function(x,r,e){var t=x?x[1]:gx(e),u=l(r,e),i=n3(e),f=i?Hr(t,i[1]):t;return[0,f,u]},i9=function(x,r,e){var t=l0(x,r,e),u=t[2];return[0,[0,t[1],u[1]],u[2]]},f9=function(x){J1(x,0);var r=K(x);W1(x);var e=pr(1,x),t=0;if(typeof r=="number")r===21&&(t=1);else if(r[0]===4)if(P(r[3],ka))t=1;else{var u=0;typeof e=="number"?e===21&&(u=1):e[0]===4&&(u=1),t=u?2:1}var i=0;switch(t){case 1:typeof e=="number"?h1===e&&(i=1):e[0]===4&&!P(e[3],ml)&&(i=1);break;case 0:break;default:i=1}return i?1:0},YV=function(x){switch(x){case 3:return 2;case 4:return 1;case 5:return 1;case 6:return 1;case 7:return 1;default:return 1}},wI=function(x,r,e){if(e){var t=e[1],u=0;if(t===8232||q1===t)u=1;else var i=t===10?6:t===13?5:il<=t?3:kN<=t?2:h1<=t?1:0;if(u)var i=7;var f=i}else var f=4;return[0,f,x]},jS0=[Gr,Mv0,Js(0)],XV=function(x,r,e,t){try{var u=Z1(x,r)[1+r];return u}catch(f){var i=I1(f);throw i[1]===uO?q0([0,jS0,e,G0(Tr(Iv0),t,r,x.length-1)],1):q0(i,0)}},c9=function(x,r){if(r[1]===0&&r[2]===0)return 0;var e=XV(x,r[1]-1|0,r,Rv0);return XV(e,r[2],r,Ov0)},JV=function(x){var r=[0,ua0,w2[1],0,0];function e(o){var a=K(o);if(typeof a=="number"){var d=0;if(8<=a?10>a&&(d=1):a===1&&(d=1),d)return 1}return 0}function t(o){var a=gx(o),d=_0(o),k=K(o);if(typeof k=="number")switch(k){case 30:case 31:Z0(o);var T=yx(o);return e(o)?[1,a,[0,k===31?1:0,y0([0,d],[0,T],0)]]:[0,a]}else switch(k[0]){case 0:var g=k[2],A=G0(x[24],o,k[1],g),N=yx(o);return e(o)?[2,a,[0,A,g,y0([0,d],[0,N],0)]]:[0,a];case 1:var R=k[2],O=G0(x[26],o,k[1],R),M=yx(o);return e(o)?[4,a,[0,O,R,y0([0,d],[0,M],0)]]:[0,a];case 2:var L=k[1],z=L[1],V=L[3],Z=L[2];L[4]&&Wt(o,81),Z0(o);var $=yx(o);return e(o)?[3,z,[0,Z,V,y0([0,d],[0,$],0)]]:[0,z]}return Z0(o),[0,a]}function u(o){var a=T2(o),d=K(o),k=0;if(typeof d=="number")if(d===82){u0(o,82);var T=t(o)}else if(d===86){zx(o,[8,a[2][1]]),u0(o,86);var T=t(o)}else k=1;else k=1;if(k)var T=0;return[0,a,T]}var i=0;function f(o,a,d,k,T,g,A){var N=ns(T),R=ns(g);function O(L){return[2,[0,[0,g],d,k,A]]}function M(L){return[2,[0,[1,T],d,k,A]]}return N===0?O(0):R===0?M(0):N>>0){if(M2>=i0+1>>>0){var U=Z[3],J=Z[4],Y=Ax(Z[1][5]),F=Ax(Z[1][4]),n0=Ax(Z[1][3]),Q=Ax(Z[1][2]),f0=Ax(Z[1][1]),s0=Fx(J,_0(R));u0(R,1);var v0=K(R),o0=0;if(typeof v0=="number"){var c0=0;if(v0===1||Nr===v0?c0=1:o0=1,c0)var T0=yx(R)}else o0=1;if(o0)var T0=K2(R)?Ko(R):0;var E0=X1([0,V],[0,T0],s0,0);if(z){switch(z[1]){case 0:var M0=[0,[0,f0,1,U,E0]];break;case 1:var M0=[1,[0,Q,1,U,E0]];break;case 2:var M0=f(R,g,1,U,n0,Y,E0);break;case 3:var M0=[3,[0,Y,U,E0]];break;default:var M0=[4,[0,F,1,U,E0]]}var Y0=M0}else{var rx=ns(f0),g0=ns(Q),H0=ns(n0),t0=ns(Y),ex=function(x0){return[2,[0,bv0,0,U,E0]]},xx=0;if(rx===0&&g0===0){var ax=0;if(H0===0&&t0===0)var dx=ex(0);else ax=1;if(ax)var dx=f(R,g,0,U,n0,Y,E0)}else xx=1;if(xx){var mx=0;if(g0===0&&H0===0&&t0<=rx){P2(function(e0){return ux(R,[0,e0[1],[3,g,e0[2][1][2][1]]])},Y);var dx=[0,[0,f0,0,U,E0]];mx=1}if(!mx){var L0=0;if(rx===0&&H0===0&&t0<=g0){P2(function(e0){return ux(R,[0,e0[1],[11,g,e0[2][1][2][1]]])},Y);var dx=[1,[0,Q,0,U,E0]];L0=1}if(!L0){ux(R,[0,A,[5,g]]);var dx=ex(0)}}}var Y0=dx}return Y0}}else if(i0===10){var C0=gx(R),A0=_0(R);Z0(R);var U0=K(R),Q0=0;if(typeof U0=="number"){var H=U0-2|0,b=0;if(U1>>0)M2>=H+1>>>0&&(b=1);else if(H===7){u0(R,9);var B=K(R),a0=0;if(typeof B=="number"){var m0=0;if((B===1||Nr===B)&&(m0=1),m0){var P0=1;a0=1}}if(!a0)var P0=0;ux(R,[0,C0,[6,P0]]),b=1}b&&(Q0=1)}Q0||ux(R,[0,C0,Gv0]);var Z=[0,Z[1],Z[2],1,A0];continue}}var D=Z[2],N0=Z[1],X0=l0(i,u,R),D0=X0[2],ox=D0[2],b0=D0[1],kx=X0[1],V0=b0[2][1],h=b0[1];if(Ar(V0,hx))var X=Z;else{var W0=O1(V0,0),sx=97<=W0?1:0,tx=sx&&(W0<=x1?1:0);tx&&ux(R,[0,h,[10,g,V0]]),p(w2[3],V0,D)&&ux(R,[0,h,[4,g,V0]]);var j0=Z[4],Px=Z[3],Ex=p(w2[4],V0,D),Ix=[0,Z[1],Ex,Px,j0],qx=function(w){return function(x0,e0){return z&&z[1]!==x0?ux(R,[0,e0,[9,g,z,w]]):0}}(V0);if(typeof ox=="number"){var B0=0;if(z)switch(z[1]){case 0:ux(R,[0,kx,[3,g,V0]]);var X=Ix;break;case 1:ux(R,[0,kx,[11,g,V0]]);var X=Ix;break;case 4:ux(R,[0,kx,[2,g,V0]]);var X=Ix;break;default:B0=1}else B0=1;if(B0)var X=[0,[0,N0[1],N0[2],N0[3],N0[4],[0,[0,kx,[0,b0]],N0[5]]],Ex,Px,j0]}else switch(ox[0]){case 0:ux(R,[0,ox[1],[9,g,z,V0]]);var X=Ix;break;case 1:var tr=ox[1],Ux=ox[2];qx(0,tr);var X=[0,[0,[0,[0,kx,[0,b0,[0,tr,Ux]]],N0[1]],N0[2],N0[3],N0[4],N0[5]],Ex,Px,j0];break;case 2:var K0=ox[1],ur=ox[2];qx(1,K0);var X=[0,[0,N0[1],[0,[0,kx,[0,b0,[0,K0,ur]]],N0[2]],N0[3],N0[4],N0[5]],Ex,Px,j0];break;case 3:var z0=ox[1],or=ox[2];qx(2,z0);var X=[0,[0,N0[1],N0[2],[0,[0,kx,[0,b0,[0,z0,or]]],N0[3]],N0[4],N0[5]],Ex,Px,j0];break;default:var Ur=ox[1],lx=ox[2];qx(4,Ur);var X=[0,[0,N0[1],N0[2],N0[3],[0,[0,kx,[0,b0,[0,Ur,lx]]],N0[4]],N0[5]],Ex,Px,j0]}}var a1=K(R),z1=0;if(typeof a1=="number"){var w1=a1-2|0,Cr=0;U1>>0?M2>=w1+1>>>0&&(Cr=1):w1===6&&(zx(R,22),u0(R,8),Cr=1),Cr&&(z1=1)}z1||u0(R,9);var Z=X}},a);return[0,T,N,y0([0,k],0,0)]}]},s9=function(x,r,e){if(typeof e=="number")return[0,x,r];if(e[0]===0){var t=e[1],u=Tx(x,t),i=e[2];return u===0?i===r?e:[0,t,r]:0<=u?[1,2,x,r,e,0]:[1,2,x,r,0,e]}var f=e[5],o=e[4],a=e[3],d=e[2],k=Tx(x,d),T=e[1];if(k===0)return a===r?e:[1,T,x,r,o,f];if(0<=k){var g=s9(x,r,f);return f===g?e:yJ(o,d,a,g)}var A=s9(x,r,o);return o===A?e:yJ(A,d,a,f)},c3=function(x){return[0,bs(x)]},TI=EJ([0,function(x,r){var e=r[2],t=x[2],u=RJ(x[1],r[1]);return u===0?p(OJ,t,e):u}]),y6=function(x,r,e){var t=e[2][1],u=e[1];return Ar(t,hx)?r:p(w2[3],t,r)?(ux(x,[0,u,[0,t]]),r):p(w2[4],t,r)},SI=function(x){return function(r){var e=r[2];switch(e[0]){case 0:var t=e[1][1];return x2(function(i,f){var o=f[0]===0?f[1][2][2]:f[1][2][1];return l(SI(i),o)},x,t);case 1:var u=e[1][1];return x2(function(i,f){if(f[0]===2)return i;var o=f[1][2][1];return l(SI(i),o)},x,u);case 2:return[0,e[1][1],x];default:return Nx(f60)}}},px=bX(s60,c60[1]),o9=function(x,r,e){var t=x?x[1]:0,u=r?r[1]:0,i=gx(e),f=K(e);if(typeof f=="number")switch(f){case 103:var o=_0(e);return Z0(e),[0,[0,i,[0,0,y0([0,o],0,0)]]];case 104:var a=_0(e);return Z0(e),[0,[0,i,[0,1,y0([0,a],0,0)]]];case 126:if(t){var d=_0(e);return Z0(e),[0,[0,i,[0,2,y0([0,d],0,0)]]]}break}else if(f[0]===4){var k=f[3];if(P(k,Po)){if(!P(k,g_)&&u&&x9(1,e)){var T=_0(e);return Z0(e),[0,[0,i,[0,4,y0([0,T],0,0)]]]}}else if(u&&x9(1,e)){var g=_0(e);Z0(e);var A=K(e),N=0;if(typeof A!="number"&&A[0]===4&&!P(A[3],g_)){var R=gx(e);Z0(e);var O=Hr(i,R),M=5;N=1}if(!N)var O=i,M=3;return[0,[0,O,[0,M,y0([0,g],0,0)]]]}}return 0},VV=function(x,r,e,t,u){r===1&&Wt(u,81);var i=_0(u);Z0(u);var f=yx(u);if(x)var o=y0([0,Fx(x[1],i)],[0,f],0),a=o,d=Qx(Nv0,t),k=-e;else var a=y0([0,i],[0,f],0),d=t,k=e;return[30,[0,k,d,a]]},zV=function(x,r,e,t){var u=_0(t);Z0(t);var i=yx(t);if(x)var f=y0([0,Fx(x[1],u)],[0,i],0),o=Qx(Cv0,e),a=f,d=o,k=uy(HR,r);else var a=y0([0,u],[0,i],0),d=e,k=r;return[31,[0,k,d,a]]},Wr=function x(r){return x.fun(r)},s3=function x(r){return x.fun(r)},KV=function x(r){return x.fun(r)},ZV=function x(r){return x.fun(r)},EI=function x(r,e,t){return x.fun(r,e,t)},v9=function x(r){return x.fun(r)},gI=function x(r,e,t,u){return x.fun(r,e,t,u)},AI=function x(r){return x.fun(r)},PI=function x(r,e,t,u){return x.fun(r,e,t,u)},CI=function x(r){return x.fun(r)},NI=function x(r,e){return x.fun(r,e)},a9=function x(r){return x.fun(r)},WV=function x(r){return x.fun(r)},l9=function x(r,e,t,u){return x.fun(r,e,t,u)},p9=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},$V=function x(r){return x.fun(r)},QV=function x(r,e){return x.fun(r,e)},RI=function x(r){return x.fun(r)},FV=function x(r){return x.fun(r)},HV=function x(r){return x.fun(r)},qV=function x(r){return x.fun(r)},GV=function x(r){return x.fun(r)},OI=function x(r,e){return x.fun(r,e)},bV=function x(r){return x.fun(r)},xz=function x(r){return x.fun(r)},II=function x(r){return x.fun(r)},m6=function x(r,e){return x.fun(r,e)},rz=function x(r){return x.fun(r)},eo=function x(r){return x.fun(r)},d9=function x(r){return x.fun(r)},ez=function x(r,e){return x.fun(r,e)},LI=function x(r){return x.fun(r)},tz=function x(r){return x.fun(r)},nz=function x(r){return x.fun(r)},uz=function x(r){return x.fun(r)},iz=function x(r){return x.fun(r)},y9=function x(r,e,t,u){return x.fun(r,e,t,u)},MI=function x(r){return x.fun(r)},m9=function x(r){return x.fun(r)},DI=function x(r,e){return x.fun(r,e)},k9=function x(r,e,t,u){return x.fun(r,e,t,u)},jI=function x(r){return x.fun(r)},Zo=function x(r){return x.fun(r)},fz=function x(r){return x.fun(r)},Hv=function x(r){return x.fun(r)},h9=function x(r){return x.fun(r)},_9=function x(r){return x.fun(r)},UI=function x(r,e){return x.fun(r,e)},cz=function x(r,e){return x.fun(r,e)},sz=function x(r){return x.fun(r)},oz=function x(r){return x.fun(r)},w9=function x(r){return x.fun(r)},vz=function x(r,e,t){return x.fun(r,e,t)};O0(Wr,function(x){return l(ZV,x)}),O0(s3,function(x){return 1-_1(x)&&zx(x,b2),l0(0,function(r){return u0(r,86),l(Wr,r)},x)}),O0(KV,function(x){1-_1(x)&&zx(x,b2);var r=gx(x);return u0(x,86),f9(x)?[2,p(DI,x,r)]:[1,l0([0,r],Wr,x)]}),O0(ZV,function(x){var r=gx(x),e=aI(0,x);return G0(EI,e,r,l(v9,e))}),O0(EI,function(x,r,e){var t=K(x);return typeof t=="number"&&t===41?l0([0,r],function(u){u0(u,41);var i=l(v9,aI(1,u));e9(u,85);var f=l(Wr,u);e9(u,86);var o=l(Wr,u);return[17,[0,e,i,f,o,y0(0,[0,yx(u)],0)]]},x):e}),O0(v9,function(x){var r=gx(x);if(K(x)===89){var e=_0(x);Z0(x);var t=e}else var t=0;return oe(gI,x,[0,t],r,l(AI,x))}),O0(gI,function(x,r,e,t){var u=r?r[1]:0;if(K(x)!==89)return t;var i=[0,t,0];return l0([0,e],function(f){for(var o=i;;){if(v1(f,89)){var o=[0,l(AI,f),o];continue}var a=Ax(o);if(a){var d=a[2];if(d){var k=d[2],T=d[1],g=a[1];return[22,[0,[0,g,T,k],y0([0,u],0,0)]]}}throw q0([0,wr,Pv0],1)}},x)}),O0(AI,function(x){var r=gx(x);if(K(x)===91){var e=_0(x);Z0(x);var t=e}else var t=0;return oe(PI,x,[0,t],r,l(CI,x))}),O0(PI,function(x,r,e,t){var u=r?r[1]:0;if(K(x)!==91)return t;var i=[0,t,0];return l0([0,e],function(f){for(var o=i;;){if(v1(f,91)){var o=[0,l(CI,f),o];continue}var a=Ax(o);if(a){var d=a[2];if(d){var k=d[2],T=d[1],g=a[1];return[23,[0,[0,g,T,k],y0([0,u],0,0)]]}}throw q0([0,wr,Av0],1)}},x)}),O0(CI,function(x){return p(NI,x,l(a9,x))}),O0(NI,function(x,r){var e=K(x);if(typeof e=="number"&&e===11&&!x[15]){var t=p(m6,x,r);return oe(y9,x,t[1],0,[0,t[1],[0,0,[0,t,0],0,0]])}return r}),O0(a9,function(x){var r=K(x);return typeof r=="number"&&r===85?l0(0,function(e){var t=_0(e);u0(e,85);var u=y0([0,t],0,0);return[11,[0,l(a9,e),u]]},x):l(WV,x)}),O0(WV,function(x){var r=gx(x);return oe(l9,0,x,r,l(HV,x))}),O0(l9,function(x,r,e,t){var u=x?x[1]:0;if(K2(r))return t;var i=K(r);if(typeof i=="number"){if(i===6)return Z0(r),Ye(p9,u,0,r,e,t);if(i===10){var f=pr(1,r);return typeof f=="number"&&f===6?(zx(r,Ev0),u0(r,10),u0(r,6),Ye(p9,u,0,r,e,t)):(zx(r,gv0),t)}if(i===83)return Z0(r),K(r)!==6&&zx(r,46),u0(r,6),Ye(p9,1,1,r,e,t)}return t}),O0(p9,function(x,r,e,t,u){return oe(l9,[0,x],e,t,l0([0,t],function(i){if(!r&&v1(i,7))return[16,[0,u,y0(0,[0,yx(i)],0)]];var f=l(Wr,i);u0(i,7);var o=[0,u,f,y0(0,[0,yx(i)],0)];return x?[21,[0,o,r]]:[20,o]},e))}),O0($V,function(x){return p(QV,x,p(px[13],0,x))}),O0(QV,function(x,r){for(var e=[0,r[1],[0,r]];;){var t=e[2],u=e[1];if(K(x)===10&&CV(1,x)){var i=l0([0,u],function(a){return function(d){return u0(d,10),[0,a,T2(d)]}}(t),x),f=i[1],e=[0,f,[1,[0,f,i[2]]]];continue}return t}}),O0(RI,function(x){if(J1(x,0),K(x)===4){Z0(x);var r=l(RI,x);u0(x,5);var e=r}else var e=vs(x)?[0,l($V,x)]:(zx(x,51),0);return W1(x),e}),O0(FV,function(x){return l0(0,function(r){var e=_0(r);u0(r,46);var t=l(RI,r);if(!t)return Sv0;var u=t[1],i=K2(r)?0:l(h9,r);return[24,[0,u,i,y0([0,e],0,0)]]},x)}),O0(HV,function(x){var r=gx(x),e=K(x),t=0;if(typeof e=="number")switch(e){case 4:return l(uz,x);case 6:return l(xz,x);case 46:return l(FV,x);case 53:return l0(0,function($){var i0=_0($);Z0($);var U=l(jI,$),J=U[2],Y=U[1];return[15,[0,J,Y,y0([0,i0],0,0)]]},x);case 98:return l(iz,x);case 104:return l0(0,qV,x);case 106:var u=_0(x);return Z0(x),[0,r,[10,y0([0,u],[0,yx(x)],0)]];case 125:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l(Wr,$);return[25,[0,J,y0([0,i0],[0,U],0)]]},x);case 126:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l(Wr,$);return[27,[0,J,y0([0,i0],[0,U],0)]]},x);case 127:return l0(0,function($){var i0=_0($);Z0($);var U=yx($),J=l0(0,function(Y){var F=l(Zo,Y);function n0(Q){if(1-v1(Q,41))throw q0(as,1);var f0=l(v9,Q);if(!Q[16]&&K(Q)===85)throw q0(as,1);return[1,[0,f0[1],f0]]}return[0,F,t9(Y,[0,gx(Y)],n0),1,0,0]},$);return[18,[0,J,y0([0,i0],[0,U],0)]]},x);case 0:case 2:var i=oe(k9,0,1,1,x);return[0,i[1],[14,i[2]]];case 130:case 131:t=2;break;case 41:case 42:t=1;break;case 30:case 31:var f=_0(x);return Z0(x),[0,r,[32,[0,e===31?1:0,y0([0,f],[0,yx(x)],0)]]]}else switch(e[0]){case 2:var o=e[1],a=o[3],d=o[2],k=o[1];o[4]&&Wt(x,81);var T=_0(x);return Z0(x),[0,k,[29,[0,d,a,y0([0,T],[0,yx(x)],0)]]];case 4:var g=e[3];if(P(g,_o))P(g,rr)?t=1:t=2;else{if(x[28][1])return l0(0,function($){var i0=_0($);ro($,hv0);var U=ne($,l(Hv,$)),J=l(LI,$);if(kI($))var n0=_I($,l(w9,$)),Q=J;else var Y=l(w9,$),F=N1($)[2],n0=Y,Q=p(F,J,function(f0,s0){return p(bx(f0,420776873,12),f0,s0)});return[13,[0,U,Q,n0,y0([0,i0],0,0)]]},x);t=1}break;case 7:if(!P(e[1],J3))return zx(x,89),[0,r,_v0];break;case 12:var A=e[3],N=e[2],R=e[1],O=0;return l0(0,function($){return VV(O,R,N,A,$)},x);case 13:var M=e[3],L=e[2],z=0;return l0(0,function($){return zV(z,L,M,$)},x)}switch(t){case 0:var V=l(bV,x);return V?[0,r,V[1]]:(g1(wv0,x),[0,r,Tv0]);case 2:return l0(0,function($){return[26,l(II,$)]},x);default:var Z=l(_9,x);return[0,Z[1],[19,Z[2]]]}}),O0(qV,function(x){var r=_0(x);Z0(x);var e=K(x);if(typeof e!="number")switch(e[0]){case 12:return VV([0,r],e[1],e[2],e[3],x);case 13:return zV([0,r],e[2],e[3],x)}return g1(mv0,x),kv0}),O0(GV,function(x){var r=0;if(typeof x=="number")switch(x){case 29:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:case 123:case 124:r=1;break}else x[0]===11&&(r=1);return r?1:0}),O0(OI,function(x,r){var e=_0(x),t=l0(0,Z0,x)[1],u=y0([0,e],[0,yx(x)],0);return[0,[19,[0,[0,wn(0,[0,t,r])],0,u]]]}),O0(bV,function(x){var r=_0(x),e=K(x);if(typeof e=="number")switch(e){case 29:return Z0(x),[0,[4,y0([0,r],[0,yx(x)],0)]];case 114:return Z0(x),[0,[0,y0([0,r],[0,yx(x)],0)]];case 115:return Z0(x),[0,[1,y0([0,r],[0,yx(x)],0)]];case 116:return Z0(x),[0,[2,y0([0,r],[0,yx(x)],0)]];case 117:return Z0(x),[0,[5,y0([0,r],[0,yx(x)],0)]];case 118:return Z0(x),[0,[6,y0([0,r],[0,yx(x)],0)]];case 119:return Z0(x),[0,[7,y0([0,r],[0,yx(x)],0)]];case 120:return Z0(x),[0,[3,y0([0,r],[0,yx(x)],0)]];case 121:return Z0(x),[0,[9,y0([0,r],[0,yx(x)],0)]];case 122:return Z0(x),[0,[33,y0([0,r],[0,yx(x)],0)]];case 123:return Z0(x),[0,[34,y0([0,r],[0,yx(x)],0)]];case 124:return Z0(x),[0,[35,y0([0,r],[0,yx(x)],0)]];case 128:return p(OI,x,dv0);case 129:return p(OI,x,yv0)}else if(e[0]===11){var t=e[1];Z0(x);var u=yx(x),i=t?-883944824:737456202;return[0,[8,i,y0([0,r],[0,u],0)]]}return 0}),O0(xz,function(x){return l0(0,function(r){var e=_0(r);u0(r,6);for(var t=Wv(0,r),u=0;;){var i=K(t);if(typeof i=="number"){var f=0;if(i!==7&&Nr!==i&&(f=1),!f){var o=Ax(u);return u0(r,7),[28,[0,o,y0([0,e],[0,yx(r)],0)]]}}var a=[0,l0(0,function(k){if(!v1(k,12)){var T=K(k),g=0;if(typeof T=="number"&&(nn===T||Dt===T&&Vo(1,k))){var A=o9(0,0,k);g=1}if(!g)var A=0;var N=vs(k),R=pr(1,k);if(N&&typeof R=="number"&&1>=R+Ms>>>0){var O=T2(k),M=v1(k,85);return u0(k,86),[1,[0,O,l(Wr,k),A,M]]}var L=A?1:0;return L&&zx(k,50),[0,l(Wr,k)]}var z=vs(k),V=pr(1,k),Z=0;if(z&&typeof V=="number"&&1>=V+Ms>>>0){var $=T2(k);K(k)===85&&(zx(k,49),Z0(k)),u0(k,86);var i0=[0,$];Z=1}if(!Z)var i0=0;return[2,[0,i0,l(Wr,k)]]},t),u];K(t)!==7&&u0(t,9);var u=a}},x)}),O0(II,function(x){var r=_0(x),e=K(x),t=0;if(typeof e=="number")switch(e){case 130:var u=1;break;case 131:var u=2;break;default:t=1}else if(e[0]===4&&!P(e[3],rr))var u=0;else t=1;if(t)var u=Nx(pv0);var i=gx(x);Z0(x);var f=yx(x),o=l(a9,x);return[0,i,o,y0([0,r],[0,f],0),u]}),O0(m6,function(x,r){return[0,r[1],[0,0,r,0]]}),O0(rz,function(x){return l0(0,function(r){J1(r,0);var e=p(px[13],0,r);W1(r),1-_1(r)&&zx(r,b2);var t=v1(r,85);return u0(r,86),[0,[0,e],l(Wr,r),t]},x)});var az=function(x){var r=pr(1,x);return typeof r=="number"&&1>=r+Ms>>>0?l(rz,x):p(m6,x,l(Wr,x))};O0(eo,function(x){var r=0;return function(e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number")switch(i){case 5:case 12:case 113:var f=i===12?[0,l0(0,function(A){var N=_0(A);u0(A,12);var R=y0([0,N],0,0);return[0,az(A),R]},x)]:0;return[0,t,Ax(u),f,0]}else if(i[0]===4&&!P(i[3],lv)){var o=0;if(pr(1,x)!==86&&pr(1,x)!==85&&(o=1),!o){var a=t!==0?1:0,d=a||(u!==0?1:0);d&&zx(x,94);var k=l0(0,function(N){var R=_0(N);Z0(N),K(N)===85&&zx(N,93);var O=y0([0,R],0,0);return[0,l(s3,N),O]},x);K(x)!==5&&u0(x,9);var t=[0,k];continue}}var T=[0,az(x),u];K(x)!==5&&u0(x,9);var u=T}}}),O0(d9,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);var t=p(eo,r,0),u=_0(r);u0(r,5);var i=X1([0,e],[0,yx(r)],u,0);return[0,t[1],t[2],t[3],i]},x)}),O0(ez,function(x,r){for(var e=r;;){var t=K(x);if(typeof t=="number"){var u=t-5|0,i=0;if(7>>0?sn===u&&(i=1):5>>0&&(i=1),i){var f=t===12?[0,l0(0,function(d){var k=_0(d);u0(d,12);var T=pr(1,d),g=0;if(typeof T=="number")if(T===85){J1(d,0);var A=p(px[13],0,d);W1(d),u0(d,85),u0(d,86);var R=1,O=[0,A]}else if(T===86){J1(d,0);var N=p(px[13],0,d);W1(d),u0(d,86);var R=0,O=[0,N]}else g=1;else g=1;if(g)var R=0,O=0;var M=l(Wr,d);return[0,O,M,R,y0([0,k],0,0)]},x)]:0;return[0,Ax(e),f,0]}}var o=[0,l0(0,function(d){var k=K(d),T=0;if(typeof k!="number"&&k[0]===2){var g=k[1],A=g[4],N=g[3],R=g[2],O=g[1];A&&Wt(d,81),u0(d,[2,[0,O,R,N,A]]);var M=[1,[0,O,[0,R,N,y0(0,[0,yx(d)],0)]]];T=1}if(!T){J1(d,0);var L=p(px[13],0,d);W1(d);var M=[0,L]}var z=v1(d,85);return[0,M,l(s3,d),z]},x),e];K(x)!==5&&u0(x,9);var e=o}}),O0(LI,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);var t=p(ez,r,0),u=_0(r);u0(r,5);var i=X1([0,e],[0,yx(r)],u,0);return[0,t[1],t[2],i]},x)}),O0(tz,function(x){var r=_0(x);u0(x,4);var e=Wv(0,x),t=K(e),u=0;if(typeof t=="number")switch(t){case 5:var a=lv0;break;case 130:var i=pr(1,e),f=0;if(typeof i=="number"&&i===86){var o=[0,p(eo,e,0)];f=1}if(!f)var o=[1,l(Wr,e)];var a=o;break;case 42:u=2;break;case 12:case 113:var a=[0,p(eo,e,0)];break;default:u=1}else if(t[0]===4)if(P(t[3],rr))u=2;else{var d=pr(1,e),k=0;if(typeof d=="number"&&1>=d+Ms>>>0){var T=[0,p(eo,e,0)];k=1}if(!k)var T=[1,l(Wr,e)];var a=T}else u=1;switch(u){case 1:if(l(GV,t)){var g=pr(1,e),A=0;if(typeof g=="number"&&1>=g+Ms>>>0){var N=[0,p(eo,e,0)];A=1}if(!A)var N=[1,l(Wr,e)];var a=N}else var a=[1,l(Wr,e)];break;case 2:var a=l(nz,e);break}if(a[0]===0)var R=a;else{var O=a[1];if(x[15])var M=a;else{var L=K(x),z=0;if(typeof L=="number")if(L===5)var V=pr(1,x)===11?[0,p(eo,x,[0,p(m6,x,O),0])]:[1,O];else if(L===9){u0(x,9);var V=[0,p(eo,x,[0,p(m6,x,O),0])]}else z=1;else z=1;if(z)var V=a;var M=V}var R=M}var Z=_0(x);u0(x,5);var $=yx(x);if(R[0]===0)var i0=R[1],U=X1([0,r],[0,$],Z,0),J=[0,[0,i0[1],i0[2],i0[3],U]];else var J=[1,G0(vz,R[1],r,$)];return J}),O0(nz,function(x){var r=pr(1,x);if(typeof r=="number"&&1>=r+Ms>>>0)return[0,p(eo,x,0)];var e=gx(x),t=p(cz,x,l(Zo,x)),u=l(G0(l9,0,x,e),t),i=l(l(NI,x),u),f=l(p(l(PI,x),0,e),i),o=l(p(l(gI,x),0,e),f);return[1,l(p(EI,aI(0,x),e),o)]}),O0(uz,function(x){var r=gx(x),e=l0(0,tz,x),t=e[2],u=e[1];return t[0]===0?oe(y9,x,r,0,[0,u,t[1]]):t[1]}),O0(iz,function(x){var r=gx(x),e=ne(x,l(Hv,x));return oe(y9,x,r,e,l(d9,x))}),O0(y9,function(x,r,e,t){return l0([0,r],function(u){return u0(u,11),[12,[0,e,t,l(MI,u),0]]},x)}),O0(MI,function(x){return f9(x)?[1,l(m9,x)]:[0,l(Wr,x)]}),O0(m9,function(x){return l0(0,function(r){var e=_0(r),t=v1(r,_l);J1(r,0);var u=T2(r);W1(r);var i=K(r),f=0;if(typeof i=="number"&&h1===i){var o=_0(r);u0(r,h1);var a=Fx(o,_0(r)),d=a,k=[0,l(Wr,r)];f=1}if(!f)var d=0,k=0;return[0,t,[0,u,k],X1([0,e],0,d,0)]},x)}),O0(DI,function(x,r){return l0([0,r],m9,x)});var T9=function(x,r,e){return l0([0,r],function(t){var u=l(d9,t);return u0(t,86),[0,e,u,l(MI,t),0]},x)},lz=function(x,r,e,t,u){var i=En(x,t),f=T9(x,r,ne(x,l(Hv,x))),o=[0,f[1],[12,f[2]]],a=[0,i,[0,o],0,e!==0?1:0,0,1,0,y0([0,u],0,0)];return[0,[0,o[1],a]]},S9=function(x,r,e,t,u,i,f){var o=f[2],a=f[1];return 1-_1(x)&&zx(x,b2),[0,l0([0,r],function(d){var k=v1(d,85),T=OV(d,86)?l(Wr,d):[0,a,av0];return[0,o,[0,T],k,t!==0?1:0,u!==0?1:0,0,e,y0([0,i],0,0)]},x)]},k6=function(x,r){var e=K(r);if(typeof e=="number"&&10>e)switch(e){case 1:if(!x)return 0;break;case 3:if(x)return 0;break;case 8:case 9:return Z0(r)}return xo(r,9)},h6=function(x,r){return r?ux(x,[0,r[1][1],M2]):0},_6=function(x,r){return r?ux(x,[0,r[1],99]):0},US0=function(x,r,e,t,u,i,f,o,a){for(var d=e,k=t,T=u,g=i,A=f,N=o;;){var R=K(x);if(typeof R=="number")switch(R){case 6:_6(x,A);var O=pr(1,x);if(typeof O=="number"&&O===6)return h6(x,T),[4,l0([0,a],function(L0){var C0=Fx(N,_0(L0));u0(L0,6),u0(L0,6);var A0=T2(L0);u0(L0,7),u0(L0,7);var U0=K(L0),Q0=0;if(typeof U0=="number"){var H=0;if((U0===4||U0===98)&&(H=1),H){var b=T9(L0,a,ne(L0,l(Hv,L0))),B=0,a0=[0,b[1],[12,b[2]]],m0=1,P0=0;Q0=1}}if(!Q0){var D=v1(L0,85),N0=yx(L0);u0(L0,86);var B=N0,a0=l(Wr,L0),m0=0,P0=D}return[0,A0,a0,P0,g!==0?1:0,m0,y0([0,C0],[0,B],0)]},x)];var M=Fx(N,_0(x));u0(x,6);var L=pr(1,x);return typeof L!="number"&&L[0]===4&&!P(L[3],Po)&&g===0?[5,l0([0,a],function(L0){var C0=l(Zo,L0),A0=C0[1];Z0(L0);var U0=l(Wr,L0);u0(L0,7);var Q0=K(L0),H=0,b=[0,C0,[0,A0],0,0,0];if(typeof Q0=="number"){var B=Q0+XP|0,a0=0;if(1>>0)if(B===-18){Z0(L0);var m0=2}else a0=1;else var m0=B?(Z0(L0),u0(L0,85),1):(Z0(L0),u0(L0,85),0);if(!a0){var P0=m0;H=1}}if(!H)var P0=3;u0(L0,86);var D=l(Wr,L0);return[0,[0,A0,b],D,U0,T,P0,y0([0,M],[0,yx(L0)],0)]},x)]:[2,l0([0,a],function(L0){if(pr(1,L0)===86){var C0=T2(L0);u0(L0,86);var A0=[0,C0]}else var A0=0;var U0=l(Wr,L0);u0(L0,7);var Q0=yx(L0);u0(L0,86);var H=l(Wr,L0);return[0,A0,U0,H,g!==0?1:0,T,y0([0,M],[0,Q0],0)]},x)];case 42:if(d){if(T!==0)throw q0([0,wr,uv0],1);var z=[0,gx(x)],V=Fx(N,_0(x));Z0(x);var d=0,k=0,g=z,N=V;continue}break;case 126:if(T===0){var Z=0;if((Vo(1,x)||pr(1,x)===6)&&(Z=1),Z){var d=0,k=0,T=o9(iv0,0,x);continue}}break;case 103:case 104:if(T===0){var d=0,k=0,T=o9(0,0,x);continue}break;case 4:case 98:return _6(x,A),h6(x,T),[3,l0([0,a],function(L0){var C0=gx(L0),A0=T9(L0,C0,ne(L0,l(Hv,L0)));return[0,A0,g!==0?1:0,y0([0,N],0,0)]},x)]}else if(R[0]===4&&!P(R[3],BN)&&k){if(T!==0)throw q0([0,wr,fv0],1);var $=[0,gx(x)],i0=Fx(N,_0(x));Z0(x);var d=0,k=0,A=$,N=i0;continue}if(g){var U=g[1];if(A)return Nx(cv0);if(typeof R=="number"&&1>=R+Ms>>>0)return S9(x,a,T,0,A,0,[0,U,[3,wn(y0([0,N],0,0),[0,U,sv0])]])}else if(A){var J=A[1];if(typeof R=="number"&&1>=R+Ms>>>0)return S9(x,a,T,g,0,0,[0,J,[3,wn(y0([0,N],0,0),[0,J,ov0])]])}var Y=function(L0){J1(L0,0);var C0=p(px[20],0,L0);return W1(L0),C0},F=_0(x),n0=Y(x),Q=n0[1],f0=n0[2];if(f0[0]===3){var s0=f0[1][2][1],v0=0;if(P(s0,Cv)&&P(s0,Da)&&(v0=1),!v0){var o0=K(x);if(typeof o0=="number"){var c0=o0-5|0;if(92>>0){if(94>=c0+1>>>0)return _6(x,A),h6(x,T),lz(x,a,g,f0,N)}else if(1>=c0+cj>>>0)return S9(x,a,T,g,A,N,[0,Q,f0])}En(x,f0);var T0=Y(x),E0=Ar(s0,Cv),M0=Fx(N,F);return _6(x,A),h6(x,T),[0,l0([0,a],function(L0){var C0=T0[1],A0=En(L0,T0[2]),U0=T9(L0,a,0),Q0=U0[2][2];if(E0){var H=Q0[2],b=0;if(H[1])ux(L0,[0,C0,28]),b=1;else{var B=0;H[2]||H[3]?B=1:b=1,B&&ux(L0,[0,C0,27])}}else{var a0=Q0[2],m0=0;if(a0[1])ux(L0,[0,C0,71]);else{var P0=a0[2],D=0;if(a0[3])ux(L0,[0,C0,70]),D=1;else{var N0=0;P0&&!P0[2]?D=1:N0=1,N0&&(ux(L0,[0,C0,70]),m0=1)}}}var X0=y0([0,M0],0,0),D0=0,ox=0,b0=0,kx=g!==0?1:0,V0=0,h=E0?[1,U0]:[2,U0];return[0,A0,h,V0,kx,b0,ox,D0,X0]},x)]}}var Y0=n0[2],rx=K(x);if(typeof rx=="number"){var g0=0;if(rx!==4&&rx!==98&&(g0=1),!g0)return _6(x,A),h6(x,T),lz(x,a,g,Y0,N)}var H0=g!==0?1:0,t0=0;if(Y0[0]===3){var ex=Y0[1],xx=ex[2][1],ax=0,dx=ex[1];if(r){var mx=0;(Ar(Ev,xx)||H0&&Ar(Ao,xx))&&(mx=1),mx&&(ux(x,[0,dx,[15,xx,H0,0,0]]),t0=1,ax=1)}}return S9(x,a,T,g,A,N,[0,Q,Y0])}};O0(k9,function(x,r,e,t){var u=r&&(K(t)===2?1:0),i=r&&1-u;return l0(0,function(f){var o=_0(f),a=u?2:0;u0(f,a);for(var d=Wv(0,f),k=vv0;;){var T=k[3],g=k[2],A=k[1];if(x&&e)throw q0([0,wr,tv0],1);if(i&&!e)throw q0([0,wr,nv0],1);var N=gx(d),R=K(d);if(typeof R=="number"){var O=0;if(13<=R){if(Nr===R){var M=[0,Ax(A),g,T];O=1}}else if(R)switch(R-1|0){case 0:if(!u){var M=[0,Ax(A),g,T];O=1}break;case 2:if(u){var M=[0,Ax(A),g,T];O=1}break;case 11:if(!e){Z0(d);var L=K(d);if(typeof L=="number"&&10>L)switch(L){case 1:case 3:case 8:case 9:ux(d,[0,N,36]),k6(u,d);continue}var z=yI(d);l(pI(d),z),ux(d,[0,N,Zf]),Z0(d),k6(u,d);continue}var V=_0(d);Z0(d);var Z=K(d),$=0;if(typeof Z=="number"&&10>Z)switch(Z){case 1:case 3:case 8:case 9:k6(u,d);var i0=K(d),U=0;if(typeof i0=="number"){var J=i0-1|0;if(2>=J>>>0)switch(J){case 0:if(i){var M=[0,Ax(A),1,V];O=1,$=1,U=1}break;case 1:break;default:ux(d,[0,N,35]);var M=[0,Ax(A),g,T];O=1,$=1,U=1}}if(!U){ux(d,[0,N,97]);continue}break}if(!$){var Y=[1,l0([0,N],function(T0){return function(E0){var M0=y0([0,T0],0,0);return[0,l(Wr,E0),M0]}}(V),d)];k6(u,d);var k=[0,[0,Y,A],g,T];continue}break}if(O){var F=M[3],n0=M[2],Q=M[1],f0=Fx(F,_0(f)),s0=u?3:1;return u0(f,s0),[0,u,n0,Q,X1([0,o],[0,yx(f)],f0,0)]}}var v0=US0(d,x,x,x,0,0,0,0,N);k6(u,d);var k=[0,[0,v0,A],g,T]}},t)}),O0(jI,function(x){if(v1(x,41))for(var r=0;;){var e=[0,l(_9,x),r],t=K(x);if(typeof t=="number"&&t===9){u0(x,9);var r=e;continue}var u=DV(x,Ax(e));break}else var u=0;return[0,u,oe(k9,0,0,0,x)]}),O0(Zo,function(x){var r=T2(x),e=r[2],t=e[1],u=r[1],i=e[2];return dI(t)&&ux(x,[0,u,Rt]),[0,u,[0,t,i]]}),O0(fz,function(x){return l0(0,function(r){var e=l(Zo,r),t=K(r),u=0;if(typeof t=="number")if(t===41)var i=1,f=i,o=[1,l0(0,function(a){return Z0(a),l(Wr,a)},r)];else if(t===86)var f=0,o=[1,l(s3,r)];else u=1;else u=1;if(u)var f=0,o=[0,bs(r)];return[0,e,o,f]},x)});var pz=function(x,r){var e=gV(x,r);if(e)var t=e;else{var u=0;if(typeof r=="number"&&1>=r+XP>>>0){var i=1;u=1}if(!u)var i=0;if(!i){var f=0;if(typeof r=="number")switch(r){case 15:case 29:case 30:case 31:case 41:case 42:case 46:case 53:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:case 123:case 124:case 125:case 126:f=1;break}else switch(r[0]){case 4:if(dI(r[3]))return 1;break;case 11:f=1;break}return f?1:0}var t=i}return t};O0(Hv,function(x){if(K(x)!==98)return 0;1-_1(x)&&zx(x,b2);var r=l0(0,function(t){var u=_0(t);u0(t,98);for(var i=0,f=0;;){if(pz(t,K(t)))var o=i9(0,function(Z){return function($){var i0=o9(0,ev0,$),U=l(fz,$),J=U[2],Y=J[3],F=J[2],n0=J[1],Q=U[1],f0=K($),s0=0;if(typeof f0=="number"&&f0===82){Z0($);var v0=1,o0=[0,l(Wr,$)];s0=1}if(!s0){Z&&ux($,[0,Q,57]);var v0=Z,o0=0}return[0,[0,n0,F,Y,i0,o0],v0]}}(i),t),a=o[2],d=[0,o[1],f];else var a=i,d=f;var k=K(t),T=0;if(typeof k=="number"){var g=k+IB|0;if(14>>0){if(g===-90){Z0(t);var i=a,f=d;continue}}else if(12>>0){var A=Ax(d);T=1}}if(!T){var N=0;if(typeof k=="number")switch(k){case 4:case 82:N=2;break}else if(k[0]===4){var R=k[3],O=0;if(by(R))O=1;else{var M=0;if(P(R,Pv)&&P(R,B2)){var L=0;M=1}if(!M)var L=1;if(L)O=1;else if(P(R,ll))(!P(R,Tv)||!P(R,fi))&&(N=2);else if(t[28][2]){var z=1;N=1}}if(O){var z=1;N=1}}switch(N){case 0:var z=0;break;case 2:var z=1;break}if(!z){if(pz(t,k)){xo(t,9);var i=a,f=d;continue}u0(t,9);var i=a,f=d;continue}xo(t,99);var A=Ax(d)}var V=_0(t);return e9(t,99),[0,A,X1([0,u],[0,yx(t)],V,0)]}},x),e=r[1];return r[2][1]||ux(x,[0,e,56]),[0,r]}),O0(h9,function(x){return K(x)===98?[0,l0(0,function(r){var e=_0(r);u0(r,98);for(var t=Wv(0,r),u=0;;){var i=K(t);if(typeof i=="number"){var f=0;if(i!==99&&Nr!==i&&(f=1),!f){var o=Ax(u),a=_0(t);return u0(t,99),[0,o,X1([0,e],[0,yx(t)],a,0)]}}var d=[0,l(Wr,t),u];K(t)!==99&&u0(t,9);var u=d}},x)]:0}),O0(_9,function(x){return p(UI,x,l(Zo,x))}),O0(UI,function(x,r){function e(t){for(var u=[0,r[1],[0,r]];;){var i=u[2],f=u[1];if(K(t)===10&&x9(1,t)){var o=l0([0,f],function(g){return function(A){return u0(A,10),[0,g,l(Zo,A)]}}(i),t),a=o[1],u=[0,a,[1,[0,a,o[2]]]];continue}if(K(t)===98)var d=N1(t)[2],k=p(d,i,function(T,g){return p(bx(T,-860373976,61),T,g)});else var k=i;return[0,k,l(h9,t),0]}}return l0([0,r[1]],e,x)}),O0(cz,function(x,r){var e=p(UI,x,r);return[0,e[1],[19,e[2]]]}),O0(sz,function(x){var r=K(x);return typeof r=="number"&&r===86?l(KV,x):[0,bs(x)]}),O0(oz,function(x){var r=K(x);return typeof r=="number"&&r===86?[1,l(s3,x)]:[0,bs(x)]}),O0(w9,function(x){var r=K(x),e=0;if(typeof r=="number")switch(r){case 86:var t=gx(x);1-_1(x)&&zx(x,b2),zx(x,38),Z0(x);var u=l0(0,Wr,x);return[1,u[1],[0,t,u[2],0,0]];case 130:case 131:e=1;break}else r[0]===4&&!P(r[3],rr)&&(e=1);if(!e)return[0,bs(x)];1-_1(x)&&zx(x,b2);var i=l0([0,gx(x)],II,x);return[1,i[1],i[2]]}),O0(vz,function(x,r,e){var t=x[2],u=x[1];function i(a0){return R2(a0,y0([0,r],[0,e],0))}switch(t[0]){case 0:var B=[0,i(t[1])];break;case 1:var B=[1,i(t[1])];break;case 2:var B=[2,i(t[1])];break;case 3:var B=[3,i(t[1])];break;case 4:var B=[4,i(t[1])];break;case 5:var B=[5,i(t[1])];break;case 6:var B=[6,i(t[1])];break;case 7:var B=[7,i(t[1])];break;case 8:var f=i(t[2]),B=[8,t[1],f];break;case 9:var B=[9,i(t[1])];break;case 10:var B=[10,i(t[1])];break;case 11:var o=t[1],a=i(o[2]),B=[11,[0,o[1],a]];break;case 12:var d=t[1],k=i(d[4]),B=[12,[0,d[1],d[2],d[3],k]];break;case 13:var T=t[1],g=i(T[4]),B=[13,[0,T[1],T[2],T[3],g]];break;case 14:var A=t[1],N=A[4],R=HO(N,y0([0,r],[0,e],0)),B=[14,[0,A[1],A[2],A[3],R]];break;case 15:var O=t[1],M=i(O[3]),B=[15,[0,O[1],O[2],M]];break;case 16:var L=t[1],z=i(L[2]),B=[16,[0,L[1],z]];break;case 17:var V=t[1],Z=i(V[5]),B=[17,[0,V[1],V[2],V[3],V[4],Z]];break;case 18:var $=t[1],i0=i($[2]),B=[18,[0,$[1],i0]];break;case 19:var U=t[1],J=i(U[3]),B=[19,[0,U[1],U[2],J]];break;case 20:var Y=t[1],F=i(Y[3]),B=[20,[0,Y[1],Y[2],F]];break;case 21:var n0=t[1],Q=n0[1],f0=n0[2],s0=i(Q[3]),B=[21,[0,[0,Q[1],Q[2],s0],f0]];break;case 22:var v0=t[1],o0=i(v0[2]),B=[22,[0,v0[1],o0]];break;case 23:var c0=t[1],T0=i(c0[2]),B=[23,[0,c0[1],T0]];break;case 24:var E0=t[1],M0=i(E0[3]),B=[24,[0,E0[1],E0[2],M0]];break;case 25:var Y0=t[1],rx=i(Y0[2]),B=[25,[0,Y0[1],rx]];break;case 26:var g0=t[1],H0=g0[4],t0=i(g0[3]),B=[26,[0,g0[1],g0[2],t0,H0]];break;case 27:var ex=t[1],xx=i(ex[2]),B=[27,[0,ex[1],xx]];break;case 28:var ax=t[1],dx=i(ax[2]),B=[28,[0,ax[1],dx]];break;case 29:var mx=t[1],L0=i(mx[3]),B=[29,[0,mx[1],mx[2],L0]];break;case 30:var C0=t[1],A0=i(C0[3]),B=[30,[0,C0[1],C0[2],A0]];break;case 31:var U0=t[1],Q0=i(U0[3]),B=[31,[0,U0[1],U0[2],Q0]];break;case 32:var H=t[1],b=i(H[2]),B=[32,[0,H[1],b]];break;case 33:var B=[33,i(t[1])];break;case 34:var B=[34,i(t[1])];break;default:var B=[35,i(t[1])]}return[0,u,B]});var dz=function(x,r){if(K(x)!==4)return[0,0,y0([0,r],[0,yx(x)],0)];var e=Fx(r,_0(x));u0(x,4),J1(x,0);var t=l(px[9],x);return W1(x),u0(x,5),[0,[0,t],y0([0,e],[0,yx(x)],0)]},BS0=function(x){var r=_0(x);return u0(x,66),dz(x,r)},YS0=0,yz=function(x){var r=Wv(0,x),e=K(r);return typeof e=="number"&&e===66?[0,l0(YS0,BS0,r)]:0},XS0=function(x){var r=K(x);if(typeof r=="number"&&r===86){1-_1(x)&&zx(x,b2);var e=bs(x),t=gx(x);u0(x,86);var u=K(x);if(typeof u=="number"&&u===66){var i=Wv(0,x);return[0,[0,e],[0,l0([0,t],function(a){var d=_0(a);return u0(a,66),dz(a,d)},i)]]}if(f9(x))return[0,[2,p(DI,x,t)],0];var f=[1,l0([0,t],Wr,x)],o=K(x)===66?f3(x,f):f;return[0,o,yz(x)]}return[0,[0,bs(x)],0]},de=function(x,r){var e=Gs(1,r);J1(e,1);var t=l(x,e);return W1(e),t},to=function(x){return de(Wr,x)},ls=function(x){return de(Zo,x)},Ke=function(x){return de(Hv,x)},mz=function(x){return de(h9,x)},qv=function(x){return de(s3,x)},BI=function(x){return de(oz,x)},YI=function(x){return de(sz,x)},XI=function(x){return de(XS0,x)},kz=function(x){return de(_9,x)},JI=function(x){return de(w9,x)},JS0=JV(px),Wo=function(x,r){var e=r[2],t=r[1],u=x[1];switch(e[0]){case 0:return x2(VS0,x,e[1][1]);case 1:return x2(zS0,x,e[1][1]);case 2:var i=e[1][1],f=i[2][1],o=x[2],a=x[1],d=i[1];p(w2[3],f,o)&&ux(a,[0,d,82]);var k=i[2][1],T=i[1];return $v(k)&&dt(a,[0,T,83]),u3(k)&&dt(a,[0,T,85]),[0,a,p(w2[4],f,o)];default:return ux(u,[0,t,24]),x}},VS0=function(x){return function(r){return r[0]===0?Wo(x,r[1][2][2]):Wo(x,r[1][2][1])}},zS0=function(x){return function(r){switch(r[0]){case 0:return Wo(x,r[1][2][1]);case 1:return Wo(x,r[1][2][1]);default:return x}}},hz=function(x,r){var e=r[2],t=e[3],u=e[2],i=[0,x,w2[1]],f=x2(function(o,a){return Wo(o,a[2][1])},i,u);return t&&Wo(f,t[1][2][1]),0},_z=function(x,r,e,t){var u=x[5],i=t[0]===0?Fv(t[1]):0,f=Gs(u?0:r,x),o=r||u||1-i;if(!o)return o;if(e){var a=e[1],d=a[2][1],k=a[1];$v(d)&&dt(f,[0,k,75]),u3(d)&&dt(f,[0,k,85])}if(t[0]===0)return hz(f,t[1]);var T=t[1][2],g=T[2],A=T[1],N=[0,Ka,[0,[0,_n(function(O){var M=O[2],L=M[1],z=M[4],V=M[3],Z=M[2],$=L[0]===0?[3,L[1]]:[0,[0,Ka,L[1][2]]];return[0,[0,Ka,[0,$,Z,V,z]]]},A),[0,Ka],0]]],R=Wo([0,f,w2[1]],N);return g&&Wo(R,g[1][2][1]),0},o3=function(x,r,e,t){return _z(x,r,e,[0,t])},wz=function(x,r){if(r!==12)return 0;var e=_0(x),t=l0(0,function(f){return u0(f,12),p(px[18],f,83)},x),u=t[2],i=t[1];return[0,[0,i,u,y0([0,e],0,0)]]},VI=function x(r,e){return x.fun(r,e)},KS0=function(x){K(x)===21&&zx(x,94);var r=p(px[18],x,83),e=K(x)===82?(u0(x,82),[0,l(px[10],x)]):0;return[0,r,e]},ZS0=0;O0(VI,function(x,r){var e=K(x);if(typeof e=="number"){var t=e-5|0,u=0;if(7>>0?sn===t&&(u=1):5>>0&&(u=1),u){var i=wz(x,e),f=uy(function(a){return[0,a[1],[0,a[2],a[3]]]},i);return K(x)!==5&&zx(x,66),[0,Ax(r),f]}}var o=l0(ZS0,KS0,x);return K(x)!==5&&u0(x,9),p(VI,x,[0,o,r])});var v3=function(x,r){function e(u){var i=kV(1,sI(r,oI(x,u))),f=_0(i);u0(i,4);var o=0;if(_1(i)&&K(i)===21){var a=_0(i),d=l0(0,function(z){return u0(z,21),K(z)===86?[0,qv(z)]:(zx(z,90),0)},i),k=d[2],T=d[1];if(k){var g=k[1];K(i)===9&&Z0(i);var A=[0,[0,T,[0,g,y0([0,a],0,0)]]]}else var A=0}else o=1;if(o)var A=0;var N=p(VI,i,0),R=N[2],O=N[1],M=_0(i);return u0(i,5),[0,A,O,R,X1([0,f],[0,yx(i)],M,0)]}var t=0;return function(u){return l0(t,e,u)}},Tz=function(x,r,e,t,u){var i=EV(x,r,e,u);return p(px[16],t,i)},w6=function(x,r,e,t,u){var i=Tz(x,r,e,t,u);return[0,[0,i[1]],i[2]]},a3=function(x){if(f2!==K(x))return da0;var r=_0(x);return Z0(x),[0,1,r]},E9=function(x){if(K(x)===64&&!o6(1,x)){var r=_0(x);return Z0(x),[0,1,r]}return pa0},WS0=function(x){var r=E9(x),e=r[1],t=r[2],u=l0(0,function(O){var M=_0(O);u0(O,15);var L=a3(O),z=L[1],V=Yl([0,t,[0,M,[0,L[2],0]]]),Z=O[7],$=K(O),i0=0;if(Z&&typeof $=="number"){if($===4){var F=0,n0=0;i0=1}else if($===98){var U=ne(O,Ke(O)),J=K(O)===4?0:[0,Sn(O,p(px[13],oa0,O))],F=J,n0=U;i0=1}}if(!i0)var Y=vs(O)?Sn(O,p(px[13],va0,O)):(RV(O,aa0),[0,gx(O),la0]),F=[0,Y],n0=ne(O,Ke(O));var Q=l(v3(e,z),O),f0=K(O)===86?Q:p6(O,Q),s0=XI(O),v0=s0[2],o0=s0[1];if(v0)var c0=MV(O,v0),T0=o0;else var c0=v0,T0=f3(O,o0);return[0,z,n0,F,f0,T0,c0,V]},x),i=u[2],f=i[4],o=i[3],a=i[1],d=i[7],k=i[6],T=i[5],g=i[2],A=u[1],N=w6(x,e,a,0,Fv(f)),R=N[1];return o3(x,N[2],o,f),[26,[0,o,f,R,e,a,k,T,g,y0([0,d],0,0),A]]},$S0=0,T6=function(x){return l0($S0,WS0,x)},zI=function(x,r){var e=_0(r);u0(r,x);var t=r[28][2];if(t)var u=x===27?1:0,i=u&&(K(r)===48?1:0);else var i=t;i&&zx(r,23);for(var f=0,o=0;;){var a=l0(0,function(N){var R=p(px[18],N,86);if(v1(N,82))var O=0,M=[0,l(px[10],N)];else{var L=R[1];if(R[2][0]===2)var O=0,M=0;else var O=[0,[0,L,63]],M=0}return[0,[0,R,M],O]},r),d=a[2],k=d[2],T=[0,[0,a[1],d[1]],f],g=k?[0,k[1],o]:o;if(v1(r,9)){var f=T,o=g;continue}var A=Ax(g);return[0,Ax(T),e,A]}},QS0=24,Sz=function(x){return zI(QS0,x)},Ez=function(x){var r=zI(27,vI(1,x)),e=r[1],t=r[3],u=r[2];return[0,e,u,Ax(x2(function(i,f){return f[2][2]?i:[0,[0,f[1],62],i]},t,e))]},gz=function(x){return zI(28,vI(1,x))},Az=function(x){function r(t){return[19,p(JS0[1],x,t)]}var e=0;return function(t){return l0(e,r,t)}},KI=function x(r,e){return x.fun(r,e)},FS0=function(x){var r=_0(x),e=K(x),t=pr(1,x),u=0;if(typeof e!="number"&&e[0]===2){var i=e[1],f=i[4],o=i[3],a=i[2],d=i[1],k=0;if(typeof t=="number")switch(t){case 85:case 86:k=2;break;default:k=1}else t[0]===4?P(t[3],vn)||(k=2):k=1;switch(k){case 0:break;case 1:break;default:f&&Wt(x,81),u0(x,[2,[0,d,a,o,f]]);var T=[1,[0,d,[0,a,o,y0([0,r],[0,yx(x)],0)]]],g=0;if(typeof t=="number"&&!(1>>0)){var A=t===85?1:0;zx(x,[16,A,a]),A&&Z0(x);var N=gx(x),R=0,O=[0,N,[2,[0,[0,N,ca0],BI(x),A]]],M=T;u=1}else g=1;if(g){Z0(x);var R=0,O=p(px[18],x,83),M=T;u=1}}}if(!u){var L=0;if(typeof t!="number"&&t[0]===4&&!P(t[3],vn)){var z=[0,T2(x)];ro(x,sa0);var R=0,O=p(px[18],x,83),M=z;L=1}if(!L)var V=G0(px[14],x,0,83),Z=V[2],R=1,O=[0,V[1],[2,Z]],M=[0,Z[1]]}var $=K(x)===82?(u0(x,82),[0,l(px[10],x)]):0;return[0,M,O,$,R]},HS0=0;O0(KI,function(x,r){var e=K(x);if(typeof e=="number"){var t=e-5|0,u=0;if(7>>0?sn===t&&(u=1):5>>0&&(u=1),u){var i=wz(x,e),f=uy(function(a){return[0,a[1],[0,a[2],a[3]]]},i);return K(x)!==5&&zx(x,66),[0,Ax(r),f]}}var o=l0(HS0,FS0,x);return K(x)!==5&&u0(x,9),p(KI,x,[0,o,r])});var qS0=function(x){var r=kV(1,x),e=_0(r);u0(r,4);var t=p(KI,r,0),u=t[2],i=t[1],f=_0(r);return u0(r,5),[0,i,u,X1([0,e],[0,yx(r)],f,0)]},GS0=0,bS0=function(x){var r=l0(0,function(T){var g=_0(T);ro(T,ia0);var A=Sn(T,p(px[13],fa0,T)),N=ne(T,Ke(T)),R=l0(GS0,qS0,T);if(kI(T))var M=R;else var O=N1(T)[2],M=p(O,R,function(L,z){return p(bx(L,842685896,11),L,z)});return[0,N,A,M,_I(T,JI(T)),g]},x),e=r[2],t=e[3],u=e[2],i=e[5],f=e[4],o=e[1],a=r[1],d=Tz(x,0,0,0,0),k=d[1];return _z(x,d[2],[0,u],[1,t]),[3,[0,u,o,t,f,k,y0([0,i],0,0),a]]},xE0=0,ZI=function(x){return l0(xE0,bS0,x)},v2=function(x,r){if(r[0]===0)return r[1];var e=r[2][1],t=r[1];return P2(function(u){return ux(x,u)},e),t},WI=function(x,r,e){var t=x?x[1]:41;if(e[0]===0)var u=e[1];else{var i=e[2][2],f=e[1];P2(function(T){return ux(r,T)},i);var u=f}1-l(px[23],u)&&ux(r,[0,u[1],t]);var o=u[2],a=0;if(o[0]===9){var d=u[1];$v(o[1][2][1])&&(dt(r,[0,d,76]),a=1)}return p(px[19],r,u)},$I=function(x,r){var e=us(x[2],r[2]);return[0,us(x[1],r[1]),e]},Pz=function(x){var r=Ax(x[2]);return[0,Ax(x[1]),r]},Cz=function(x,r){var e=x[0]===0?x[1]:x[1]-1|0,t=(r[0]===0,r[1]);return t<=e?1:0},l3=function x(r){return x.fun(r)},$t=function x(r){return x.fun(r)},Nz=function x(r){return x.fun(r)},QI=function x(r){return x.fun(r)},Rz=function x(r){return x.fun(r)},FI=function x(r){return x.fun(r)},Oz=function x(r){return x.fun(r)},Iz=function x(r){return x.fun(r)},S6=function x(r){return x.fun(r)},HI=function x(r){return x.fun(r)},qI=function x(r){return x.fun(r)},GI=function x(r){return x.fun(r)},Lz=function x(r){return x.fun(r)},bI=function x(r){return x.fun(r)},g9=function x(r){return x.fun(r)},xL=function x(r){return x.fun(r)},Mz=function x(r){return x.fun(r)},Gv=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},rL=function x(r,e,t,u){return x.fun(r,e,t,u)},eL=function x(r){return x.fun(r)},A9=function x(r){return x.fun(r)},tL=function x(r){return x.fun(r)},nL=function x(r,e,t,u,i){return x.fun(r,e,t,u,i)},Dz=function x(r,e,t,u){return x.fun(r,e,t,u)},uL=function x(r){return x.fun(r)},P9=function x(r,e,t){return x.fun(r,e,t)},jz=function x(r){return x.fun(r)},C9=function x(r,e,t){return x.fun(r,e,t)},iL=function x(r){return x.fun(r)},Uz=function x(r){return x.fun(r)},fL=function x(r,e){return x.fun(r,e)},cL=function x(r,e,t,u){return x.fun(r,e,t,u)},Bz=function x(r){return x.fun(r)},sL=function x(r,e,t){return x.fun(r,e,t)},Yz=function x(r){return x.fun(r)},Xz=function x(r){return x.fun(r)},oL=function x(r){return x.fun(r)},N9=function x(r,e,t){return x.fun(r,e,t)},rE0=function(x){var r=x[2];switch(r[0]){case 22:var e=r[1],t=e[1][2][1];if(P(t,D2)){if(!P(t,av)&&!P(e[2][2][1],DS))return 0}else if(!P(e[2][2][1],hl))return 0;break;case 0:case 9:case 21:case 24:break;default:return 0}return 1},vL=function(x){var r=gx(x),e=l(FI,x),t=l(Rz,x);if(!t)return e;var u=t[1];return[0,l0([0,r],function(i){var f=WI(0,i,e);return[3,[0,u,f,l($t,i),0]]},x)]},eE0=function(x,r){if(typeof r=="number"&&r===85)return 0;throw q0(as,1)},Jz=function(x){var r=Gy(eE0,x),e=vL(r),t=K(r);if(typeof t=="number"){if(t===11)throw q0(as,1);if(t===86){var u=TV(r),i=0;if(u){var f=u[1];if(typeof f=="number"&&f===5){var o=1;i=1}}if(!i)var o=0;if(o)throw q0(as,1)}}if(!vs(r))return e;if(e[0]===0){var a=e[1][2];if(a[0]===9&&!P(a[1][2][1],Co)&&!K2(r))throw q0(as,1)}return e};O0(l3,function(x){var r=vs(x);if(r){var e=K(x),t=0;if(typeof e=="number"){if(e===58){if(x[18]){var u=0;t=1}}else if(e===65&&x[19]){var u=0;t=1}}if(!t)var u=1;var i=u}else var i=r;var f=K(x),o=0;if(typeof f=="number"){var a=0;if(22<=f)if(f===58){if(x[18])return[0,l(Nz,x)];a=1}else f!==98&&(a=1);else f!==4&&21>f&&(a=1);a||(o=1)}if(!o&&!i)return vL(x);var d=0;if(f===64&&_1(x)&&pr(1,x)===98){var k=Jz,T=oL;d=1}if(!d)var k=oL,T=Jz;var g=hI(x,T);if(g)return g[1];var A=hI(x,k);return A?A[1]:vL(x)}),O0($t,function(x){return v2(x,l(l3,x))}),O0(Nz,function(x){return l0(0,function(r){r[10]&&zx(r,dv);var e=_0(r),t=gx(r);u0(r,58);var u=gx(r);if(i3(r))var i=0,f=0;else{var o=v1(r,f2),a=K(r),d=0;if(typeof a=="number"){var k=0;if(a===86)k=1;else if(10>a)switch(a){case 0:case 2:case 3:case 4:case 6:break;default:k=1}if(k){var T=0;d=1}}if(!d)var T=1;var g=0;if(!o&&!T){var A=0;g=1}if(!g)var A=[0,l($t,r)];var i=o,f=A}var N=f?0:yx(r),R=Hr(t,u);return[36,[0,f,y0([0,e],[0,N],0),i,R]]},x)}),O0(QI,function(x){var r=x[2];switch(r[0]){case 22:var e=r[1],t=e[1][2][1];if(P(t,D2)){if(!P(t,av)&&!P(e[2][2][1],DS))return 0}else if(!P(e[2][2][1],hl))return 0;break;case 9:case 21:break;default:return 0}return 1}),O0(Rz,function(x){var r=K(x),e=0;if(typeof r=="number"){var t=r+uj|0;if(15>=t>>>0){switch(t){case 0:var u=R30;break;case 1:var u=O30;break;case 2:var u=I30;break;case 3:var u=L30;break;case 4:var u=M30;break;case 5:var u=D30;break;case 6:var u=j30;break;case 7:var u=U30;break;case 8:var u=B30;break;case 9:var u=Y30;break;case 10:var u=X30;break;case 11:var u=J30;break;case 12:var u=V30;break;case 13:var u=z30;break;case 14:var u=K30;break;default:var u=Z30}var i=u;e=1}}if(!e)var i=0;return i!==0&&Z0(x),i}),O0(FI,function(x){var r=gx(x),e=l(Iz,x);if(K(x)!==85)return e;Z0(x);var t=l($t,c6(0,x));u0(x,86);var u=l0([0,r],$t,x),i=u[2],f=u[1];return[0,[0,f,[7,[0,v2(x,e),t,i,0]]]]}),O0(Oz,function(x){return v2(x,l(FI,x))});var aL=function(x,r,e,t,u){var i=v2(x,r);return[0,[0,u,[20,[0,t,i,v2(x,e),0]]]]},lL=function(x,r,e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number"&&i===88){Z0(x);var f=l0(0,S6,x),o=f[2],a=Hr(u,f[1]),d=pL(0,x,aL(x,t,o,1,a),a),t=d[2],u=d[1];continue}return[0,u,t]}},Vz=function(x,r,e){for(var t=r,u=e;;){var i=K(x);if(typeof i=="number"&&i===87){Z0(x);var f=l0(0,S6,x),o=lL(x,f[2],f[1]),a=o[2],d=Hr(u,o[1]),k=pL(0,x,aL(x,t,a,0,d),d),t=k[2],u=k[1];continue}return[0,u,t]}},pL=function(x,r,e,t){for(var u=x,i=e,f=t;;){var o=K(r);if(typeof o=="number"&&o===84){1-u&&zx(r,N30),u0(r,84);var a=l0(0,S6,r),d=a[2],k=a[1],T=K(r),g=0;if(typeof T=="number"&&1>=T-87>>>0){zx(r,[20,rI(T)]);var A=lL(r,d,k),N=Vz(r,A[2],A[1]),R=N[2],O=N[1];g=1}if(!g)var R=d,O=k;var M=Hr(f,O),u=1,i=aL(r,i,R,2,M),f=M;continue}return[0,f,i]}};O0(Iz,function(x){var r=l0(0,S6,x),e=r[2],t=r[1],u=K(x),i=0;if(typeof u=="number"&&u===84){var o=pL(1,x,e,t);i=1}if(!i)var f=lL(x,e,t),o=Vz(x,f[2],f[1]);return o[2]});var dL=function(x,r,e,t){return[0,t,[4,[0,e,x,r,0]]]};O0(S6,function(x){var r=0;x:for(;;){var e=l0(0,function(xx){var ax=l(HI,xx)!==0?1:0;return[0,ax,l(qI,c6(0,xx))]},x),t=e[2],u=t[2],i=t[1],f=e[1];if(K(x)===98){var o=0;u[0]===0&&u[1][2][0]===11&&(zx(x,2),o=1)}var a=function(xx){return function(ax,dx){for(var mx=ax,L0=dx;;){var C0=K(x);if(typeof C0!="number"&&C0[0]===4){var A0=C0[3],U0=0;if(P(A0,vn)&&P(A0,tU)&&(U0=1),!U0&&_1(x)){Z0(x);var Q0=v2(x,L0),H=0;if(mx){var b=mx[1],B=b[2],a0=mx[2],m0=b[3],P0=B[1],D=b[1];if(Cz(B[2],i30)){var N0=dL(D,Q0,P0,Hr(m0,xx)),X0=a0;H=1}}if(!H)var N0=Q0,X0=mx;var D0=N0[1];if(Ar(A0,tU))var ox=to(x),h=[0,[0,Hr(D0,ox[1]),[33,[0,N0,[0,ox],0]]]];else if(K(x)===27){var b0=Hr(D0,gx(x));Z0(x);var h=[0,[0,b0,[33,[0,N0,0,0]]]]}else var kx=to(x),V0=kx[1],h=[0,[0,Hr(D0,V0),[2,[0,N0,[0,V0,kx],0]]]];var mx=X0,L0=h;continue}}return[0,mx,L0]}}}(f)(r,u),d=a[2],k=a[1],T=K(x),g=0;if(typeof T=="number"){var A=T-17|0,N=0;if(1>>0)if(72<=A){var R=0;switch(A-72|0){case 0:var O=f30;break;case 1:var O=c30;break;case 2:var O=s30;break;case 3:var O=o30;break;case 4:var O=v30;break;case 5:var O=a30;break;case 6:var O=l30;break;case 7:var O=p30;break;case 8:var O=d30;break;case 9:var O=y30;break;case 10:var O=m30;break;case 11:var O=k30;break;case 12:var O=h30;break;case 13:var O=_30;break;case 14:var O=w30;break;case 15:var O=T30;break;case 16:var O=S30;break;case 17:var O=E30;break;case 18:var O=g30;break;case 19:var O=A30;break;default:N=1,R=1}if(!R)var M=O}else N=1;else var M=A?P30:x[12]?0:C30;if(!N){var L=M;g=1}}if(!g)var L=0;if(L!==0&&Z0(x),!k&&!L)return d;if(!L)for(var z=v2(x,d),V=f,Z=k;;){if(!Z)return[0,z];var $=Z[1],i0=Z[2],U=$[2][1],J=$[1],Y=Hr($[3],V),z=dL(J,z,U,Y),V=Y,Z=i0}var F=L[1],n0=F[1],Q=F[2],f0=i&&(n0===14?1:0);f0&&ux(x,[0,f,42]);for(var s0=v2(x,d),v0=[0,n0,Q],o0=f,c0=k;;){var T0=v0[2],E0=v0[1];if(c0){var M0=c0[1],Y0=M0[2],rx=c0[2],g0=M0[3],H0=Y0[1],t0=M0[1];if(Cz(Y0[2],T0)){var ex=Hr(g0,o0),s0=dL(t0,s0,H0,ex),v0=[0,E0,T0],o0=ex,c0=rx;continue}}var r=[0,[0,s0,[0,E0,T0],o0],c0];continue x}}}),O0(HI,function(x){var r=K(x);if(typeof r=="number"){if(48<=r){if(nn<=r){if(Ot>r)switch(r+XP|0){case 0:return Ga0;case 1:return ba0;case 6:return x30;case 7:return r30}}else if(r===65&&x[19])return x[10]&&zx(x,7),e30}else if(45<=r)switch(r+_E|0){case 0:return t30;case 1:return n30;default:return u30}}return 0}),O0(qI,function(x){var r=gx(x),e=_0(x),t=l(HI,x);if(t){var u=t[1];Z0(x);var i=l0([0,r],GI,x),f=i[2],o=i[1],a=0;if(u===6){var d=f[2],k=0;switch(d[0]){case 9:dt(x,[0,o,73]),k=1;break;case 21:d[1][2][0]===1&&ux(x,[0,o,67]),k=1;break}k&&(a=1)}return[0,[0,o,[34,[0,u,f,y0([0,e],0,0)]]]]}var T=K(x),g=0;if(typeof T=="number")if(Ot===T)var A=qa0;else if(M2===T)var A=Ha0;else g=1;else g=1;if(g)var A=0;if(!A)return l(Lz,x);var N=A[1];Z0(x);var R=l0([0,r],GI,x),O=R[2],M=R[1];1-l(QI,O)&&ux(x,[0,O[1],41]);var L=O[2],z=0;return L[0]===9&&$v(L[1][2][1])&&(Wt(x,78),z=1),[0,[0,M,[35,[0,N,O,1,y0([0,e],0,0)]]]]}),O0(GI,function(x){return v2(x,l(qI,x))}),O0(Lz,function(x){var r=l(bI,x);if(K2(x))return r;var e=K(x),t=0;if(typeof e=="number")if(Ot===e)var u=Fa0;else if(M2===e)var u=Qa0;else t=1;else t=1;if(t)var u=0;if(!u)return r;var i=u[1],f=v2(x,r);1-l(QI,f)&&ux(x,[0,f[1],41]);var o=f[2],a=0;o[0]===9&&$v(o[1][2][1])&&(Wt(x,77),a=1);var d=gx(x);Z0(x);var k=yx(x),T=Hr(f[1],d);return[0,[0,T,[35,[0,i,f,0,y0(0,[0,k],0)]]]]}),O0(bI,function(x){var r=gx(x),e=1-x[17],t=0,u=x[17]===0?x:[0,x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15],x[16],t,x[18],x[19],x[20],x[21],x[22],x[23],x[24],x[25],x[26],x[27],x[28],x[29],x[30],x[31]],i=K(u),f=0;if(typeof i=="number"){var o=i-44|0;if(7>=o>>>0){var a=0;switch(o){case 0:if(e)var d=[0,l(eL,u)];else a=1;break;case 6:var d=[0,l(Mz,u)];break;case 7:var d=[0,l(xL,u)];break;default:a=1}if(!a){var k=d;f=1}}}if(!f)var k=zo(u)?[0,l(uL,u)]:l(iL,u);return Ye(Gv,0,0,u,r,k)}),O0(g9,function(x){return v2(x,l(bI,x))}),O0(xL,function(x){switch(x[22]){case 0:var r=0,e=0;break;case 1:var r=0,e=1;break;default:var r=1,e=1}var t=gx(x),u=_0(x);u0(x,51);var i=[0,t,[28,[0,y0([0,u],[0,yx(x)],0)]]],f=K(x);if(typeof f=="number"&&11>f)switch(f){case 4:var o=r?i:(ux(x,[0,t,ft]),[0,t,[9,wn(0,[0,t,Za0])]]);return oe(rL,0,x,t,o);case 6:case 10:var a=e?i:(ux(x,[0,t,Dt]),[0,t,[9,wn(0,[0,t,$a0])]]);return oe(rL,0,x,t,a)}return e?g1(Wa0,x):ux(x,[0,t,Dt]),i}),O0(Mz,function(x){return l0(0,function(r){var e=_0(r),t=gx(r);if(u0(r,50),v1(r,10)){var u=wn(0,[0,t,Va0]),i=gx(r);ro(r,za0);var f=wn(0,[0,i,Ka0]);return[22,[0,u,f,y0([0,e],[0,yx(r)],0)]]}var o=_0(r);u0(r,4);var a=G0(sL,[0,o],0,l($t,c6(0,r)));return u0(r,5),[10,[0,a,y0([0,e],[0,yx(r)],0)]]},x)}),O0(Gv,function(x,r,e,t,u){var i=x?x[1]:1,f=r?r[1]:0,o=Ye(nL,[0,i],[0,f],e,t,u),a=TV(e),d=0;if(a){var k=a[1];if(typeof k=="number"&&k===83){var T=1;d=1}}if(!d)var T=0;function g(M){var L=N1(M)[2];function z(V,Z){return p(bx(V,dn,62),V,Z)}return p(L,v2(M,o),z)}function A(M,L,z){var V=l(tL,L),Z=V[1],$=V[2],i0=Hr(t,Z),U=[0,z,M,[0,Z,$],0],J=0;if(!T&&!f){var Y=[5,U];J=1}if(!J)var Y=[25,[0,U,i0,T]];var F=f||T;return Ye(Gv,[0,i],[0,F],L,t,[0,[0,i0,Y]])}if(e[13])return o;var N=K(e);if(typeof N=="number"){var R=N-98|0;if(2>>0){if(R===-94)return A(0,e,g(e))}else if(R!==1&&_1(e)){var O=Gy(function(M,L){throw q0(as,1)},e);return t9(O,o,function(M){var L=g(M);return A(l(A9,M),M,L)})}}return o}),O0(rL,function(x,r,e,t){var u=x?x[1]:1;return v2(r,Ye(Gv,[0,u],0,r,e,[0,t]))}),O0(eL,function(x){return l0(0,function(r){var e=gx(r),t=_0(r);if(u0(r,44),r[11]&&K(r)===10){var u=yx(r);Z0(r);var i=wn(y0([0,t],[0,u],0),[0,e,Ya0]),f=K(r);return typeof f!="number"&&f[0]===4&&!P(f[3],DS)?[22,[0,i,p(px[13],0,r),0]]:(g1(Xa0,r),Z0(r),[9,i])}var o=gx(r),a=K(r),d=0;if(typeof a=="number")if(a===44)var k=l(eL,r);else if(a===51)var k=l(xL,lI(1,r));else d=1;else d=1;if(d)var k=zo(r)?l(uL,r):l(Uz,r);var T=oe(Dz,Ja0,lI(1,r),o,k),g=K(r),A=0;if(typeof g!="number"&&g[0]===3){var N=oe(cL,r,o,T,g[1]);A=1}if(!A)var N=T;var R=0;if(K(r)!==4){var O=0;if((!_1(r)||K(r)!==98)&&(O=1),O){var L=N;R=1}}if(!R)var M=N1(r)[2],L=p(M,N,function(i0,U){return p(bx(i0,dn,63),i0,U)});var z=_1(r)?t9(Gy(function(i0,U){throw q0(as,1)},r),0,A9):0,V=K(r),Z=0;if(typeof V=="number"&&V===4){var $=[0,l(tL,r)];Z=1}if(!Z)var $=0;return[23,[0,L,z,$,y0([0,t],0,0)]]},x)});var tE0=function(x){var r=_0(x);u0(x,98);for(var e=0;;){var t=K(x);if(typeof t=="number"){var u=0;if(t!==99&&Nr!==t&&(u=1),!u){var i=Ax(e),f=_0(x);u0(x,99);var o=K(x)===4?N1(x)[1]:yx(x);return[0,i,X1([0,r],[0,o],f,0)]}}var a=K(x),d=0;if(typeof a!="number"&&a[0]===4&&!P(a[2],Ca)){var k=gx(x),T=_0(x);ro(x,Ba0);var g=[1,[0,k,[0,y0([0,T],[0,yx(x)],0)]]];d=1}if(!d)var g=[0,to(x)];var A=[0,g,e];K(x)!==99&&u0(x,9);var e=A}};O0(A9,function(x){J1(x,1);var r=K(x)===98?[0,l0(0,tE0,x)]:0;return W1(x),r});var nE0=function(x){var r=_0(x);u0(x,12);var e=l($t,x);return[0,e,y0([0,r],0,0)]};O0(tL,function(x){return l0(0,function(r){var e=_0(r);u0(r,4);for(var t=0;;){var u=K(r);if(typeof u=="number"){var i=0;if(u!==5&&Nr!==u&&(i=1),!i){var f=Ax(t),o=_0(r);return u0(r,5),[0,f,X1([0,e],[0,yx(r)],o,0)]}}var a=K(r),d=0;if(typeof a=="number"&&a===12){var k=[1,l0(0,nE0,r)];d=1}if(!d)var k=[0,l($t,r)];var T=[0,k,t];K(r)!==5&&u0(r,9);var t=T}},x)});var zz=function(x,r,e,t,u,i){var f=x?x[1]:1,o=r?r[1]:0,a=e?e[1]:0,d=lI(0,t),k=l(px[7],d),T=gx(t);u0(t,7);var g=yx(t),A=Hr(u,T),N=y0(0,[0,g],0),R=[0,v2(t,i),[2,k],N],O=o?[26,[0,R,A,a]]:[21,R];return Ye(Gv,[0,f],[0,o],t,u,[0,[0,A,O]])},Kz=function(x,r,e,t,u,i){var f=x?x[1]:1,o=r?r[1]:0,a=e?e[1]:0,d=K(t),k=0;if(typeof d=="number"&&d===14){var T=BV(t),g=T[1],A=t[30][1],N=T[2][1];if(A){var R=A[1];t[30][1]=[0,[0,R[1],[0,[0,N,g],R[2]]],A[2]]}else ux(t,[0,g,68]);var M=[1,T],L=g;k=1}if(!k)var O=T2(t),M=[0,O],L=O[1];var z=Hr(u,L),V=0;i[0]===0&&i[1][2][0]===28&&M[0]===1&&(ux(t,[0,z,87]),V=1);var Z=[0,v2(t,i),M,0],$=o?[26,[0,Z,z,a]]:[21,Z];return Ye(Gv,[0,f],[0,o],t,u,[0,[0,z,$]])};O0(nL,function(x,r,e,t,u){var i=x?x[1]:1,f=r?r[1]:0,o=K(e);if(typeof o=="number")switch(o){case 6:return Z0(e),zz([0,i],[0,f],0,e,t,u);case 10:return Z0(e),Kz([0,i],[0,f],0,e,t,u);case 83:1-i&&zx(e,64),u0(e,83);var a=K(e);if(typeof a=="number")switch(a){case 4:return u;case 6:return Z0(e),zz([0,i],Ma0,La0,e,t,u);case 98:if(_1(e))return u;break}else if(a[0]===3)return zx(e,65),u;return Kz([0,i],ja0,Da0,e,t,u)}else if(o[0]===3){var d=o[1];return f&&zx(e,65),Ye(Gv,Ua0,0,e,t,[0,oe(cL,e,t,v2(e,u),d)])}return u}),O0(Dz,function(x,r,e,t){var u=x?x[1]:1;return v2(r,Ye(nL,[0,u],0,r,e,[0,t]))}),O0(uL,function(x){return l0(0,function(r){var e=E9(r),t=e[1],u=e[2],i=l0(0,function(M){var L=_0(M);u0(M,15);var z=a3(M),V=z[1],Z=Yl([0,u,[0,L,[0,z[2],0]]]);if(K(M)===4)var $=0,i0=0;else{var U=K(M),J=0;if(typeof U=="number"&&U===98){var F=0;J=1}if(!J)var Y=sI(V,oI(t,M)),F=[0,Sn(Y,p(px[13],Ia0,Y))];var $=ne(M,Ke(M)),i0=F}var n0=Zv(0,M),Q=t||n0[19],f0=l(v3(Q,V),n0),s0=K(n0)===86?f0:p6(n0,f0),v0=XI(n0),o0=v0[2],c0=v0[1];if(o0)var T0=MV(n0,o0),E0=c0;else var T0=o0,E0=f3(n0,c0);return[0,i0,s0,V,T0,E0,$,Z]},r),f=i[2],o=f[3],a=f[2],d=f[1],k=f[7],T=f[6],g=f[5],A=f[4],N=i[1],R=w6(r,t,o,1,Fv(a)),O=R[1];return o3(r,R[2],d,a),[8,[0,d,a,O,t,o,A,g,T,y0([0,k],0,0),N]]},x)}),O0(P9,function(x,r,e){switch(r){case 1:Wt(x,81);try{var t=bd(Nl(Qx(Pa0,e))),u=t}catch(g){var i=I1(g);if(i[1]!==kn)throw q0(i,0);var u=Nx(Qx(Ca0,e))}break;case 2:Wt(x,80);try{var f=WR(e),u=f}catch(g){var o=I1(g);if(o[1]!==kn)throw q0(o,0);var u=Nx(Qx(Na0,e))}break;case 4:try{var a=WR(e),u=a}catch(g){var d=I1(g);if(d[1]!==kn)throw q0(d,0);var u=Nx(Qx(Ra0,e))}break;default:try{var k=bd(Nl(e)),u=k}catch(g){var T=I1(g);if(T[1]!==kn)throw q0(T,0);var u=Nx(Qx(Oa0,e))}}return u0(x,[0,r,e]),u}),O0(jz,function(x){var r=Xx(x),e=0;if(r!==0&&U1===O1(x,r-1|0)){var t=m2(x,0,r-1|0);e=1}if(!e)var t=x;return t}),O0(C9,function(x,r,e){var t=kX(l(jz,e));return u0(x,[1,r,e]),t}),O0(iL,function(x){var r=gx(x),e=_0(x),t=K(x);if(typeof t=="number")switch(t){case 0:var u=l(px[12],x);return[1,[0,u[1],[24,u[2]]],u[3]];case 4:return[0,l(Bz,x)];case 6:var i=l0(0,Yz,x),f=i[2];return[1,[0,i[1],[0,f[1]]],f[2]];case 21:return Z0(x),[0,[0,r,[31,[0,y0([0,e],[0,yx(x)],0)]]]];case 29:return Z0(x),[0,[0,r,[15,y0([0,e],[0,yx(x)],0)]]];case 40:return[0,l(px[22],x)];case 98:var o=l(px[17],x),a=o[2],d=o[1],k=un<=a[1]?[12,a[2]]:[11,a[2]];return[0,[0,d,k]];case 30:case 31:return Z0(x),[0,[0,r,[14,[0,t===31?1:0,y0([0,e],[0,yx(x)],0)]]]];case 74:case 105:return[0,l(Xz,x)]}else switch(t[0]){case 0:var T=t[2],g=G0(P9,x,t[1],T);return[0,[0,r,[16,[0,g,T,y0([0,e],[0,yx(x)],0)]]]];case 1:var A=t[2],N=G0(C9,x,t[1],A);return[0,[0,r,[17,[0,N,A,y0([0,e],[0,yx(x)],0)]]]];case 2:var R=t[1],O=R[3],M=R[2],L=R[1];R[4]&&Wt(x,81),Z0(x);var z=y0([0,e],[0,yx(x)],0),V=x[28],Z=V[6],$=V[7],i0=0;if(Z){var U=Z[1];if(yX(U,M))var J=[19,[0,M,L,Xx(U),0,O,z]];else i0=1}else i0=1;if(i0){var Y=0;if($){var F=$[1];if(yX(F,M)){var J=[19,[0,M,L,Xx(F),1,O,z]];Y=1}}if(!Y)var J=[13,[0,M,O,z]]}return[0,[0,L,J]];case 3:var n0=p(fL,x,t[1]);return[0,[0,n0[1],[30,n0[2]]]];case 4:if(!P(t[3],bh)&&pr(1,x)===40)return[0,l(px[22],x)];break}if(vs(x)){var Q=p(px[13],0,x);return[0,[0,Q[1],[9,Q]]]}g1(0,x);var f0=0;return typeof t!="number"&&t[0]===7&&(Z0(x),f0=1),[0,[0,r,[15,y0([0,e],Aa0,0)]]]}),O0(Uz,function(x){return v2(x,l(iL,x))}),O0(fL,function(x,r){var e=r[5],t=r[1],u=r[3],i=r[2],f=_0(x);u0(x,[3,r]);var o=[0,t,[0,[0,u,i],e]];if(e)var a=0,d=[0,o,0],k=t;else for(var T=[0,o,0],g=0;;){var A=l(px[7],x),N=[0,A,g],R=K(x),O=0;if(typeof R=="number"&&R===1){J1(x,4);var M=K(x),L=0;if(typeof M=="number"||M[0]!==3)L=1;else{var z=M[1],V=z[5],Z=z[1],$=z[3],i0=z[2];Z0(x),W1(x);var U=[0,[0,Z,[0,[0,$,i0],V]],T];if(!V){var T=U,g=N;continue}var J=Ax(N),Y=[0,Z,Ax(U),J];O=1}if(L)throw q0([0,wr,Sa0],1)}if(!O){g1(Ea0,x);var F=[0,A[1],ga0],n0=Ax(N),Q=Ax([0,F,T]),Y=[0,A[1],Q,n0]}var a=Y[3],d=Y[2],k=Y[1];break}var f0=yx(x),s0=Hr(t,k);return[0,s0,[0,d,a,y0([0,f],[0,f0],0)]]}),O0(cL,function(x,r,e,t){var u=N1(x)[2],i=p(u,e,function(o,a){return p(bx(o,dn,3),o,a)}),f=p(fL,x,t);return[0,Hr(r,f[1]),[29,[0,i,f,0]]]}),O0(Bz,function(x){var r=_0(x),e=l0(0,function(o){u0(o,4);var a=gx(o),d=l($t,o),k=K(o),T=0;if(typeof k=="number")if(k===9)var g=[0,G0(N9,o,a,[0,d,0])];else if(k===86)var g=[1,[0,d,qv(o),0]];else T=1;else T=1;if(T)var g=[0,d];return u0(o,5),g},x),t=e[2],u=e[1],i=yx(x),f=t[0]===0?t[1]:[0,u,[32,t[1]]];return G0(sL,[0,r],[0,i],f)}),O0(sL,function(x,r,e){var t=e[2],u=e[1],i=x?x[1]:0,f=r?r[1]:0;function o(a1){return R2(a1,y0([0,i],[0,f],0))}function a(a1){return HO(a1,y0([0,i],[0,f],0))}switch(t[0]){case 0:var d=t[1],k=a(d[2]),lx=[0,[0,d[1],k]];break;case 1:var T=t[1],g=T[10],A=o(T[9]),lx=[1,[0,T[1],T[2],T[3],T[4],T[5],T[6],T[7],T[8],A,g]];break;case 3:var N=t[1],R=o(N[4]),lx=[3,[0,N[1],N[2],N[3],R]];break;case 4:var O=t[1],M=o(O[4]),lx=[4,[0,O[1],O[2],O[3],M]];break;case 5:var L=t[1],z=o(L[4]),lx=[5,[0,L[1],L[2],L[3],z]];break;case 6:var V=t[1],Z=o(V[7]),lx=[6,[0,V[1],V[2],V[3],V[4],V[5],V[6],Z]];break;case 7:var $=t[1],i0=o($[4]),lx=[7,[0,$[1],$[2],$[3],i0]];break;case 8:var U=t[1],J=U[10],Y=o(U[9]),lx=[8,[0,U[1],U[2],U[3],U[4],U[5],U[6],U[7],U[8],Y,J]];break;case 9:var F=t[1],n0=F[2],Q=F[1],f0=o(n0[2]),lx=[9,[0,Q,[0,n0[1],f0]]];break;case 10:var s0=t[1],v0=o(s0[2]),lx=[10,[0,s0[1],v0]];break;case 11:var o0=t[1],c0=o(o0[4]),lx=[11,[0,o0[1],o0[2],o0[3],c0]];break;case 12:var T0=t[1],E0=o(T0[4]),lx=[12,[0,T0[1],T0[2],T0[3],E0]];break;case 13:var M0=t[1],Y0=o(M0[3]),lx=[13,[0,M0[1],M0[2],Y0]];break;case 14:var rx=t[1],g0=o(rx[2]),lx=[14,[0,rx[1],g0]];break;case 15:var lx=[15,o(t[1])];break;case 16:var H0=t[1],t0=o(H0[3]),lx=[16,[0,H0[1],H0[2],t0]];break;case 17:var ex=t[1],xx=o(ex[3]),lx=[17,[0,ex[1],ex[2],xx]];break;case 18:var ax=t[1],dx=o(ax[4]),lx=[18,[0,ax[1],ax[2],ax[3],dx]];break;case 19:var mx=t[1],L0=o(mx[6]),lx=[19,[0,mx[1],mx[2],mx[3],mx[4],mx[5],L0]];break;case 20:var C0=t[1],A0=o(C0[4]),lx=[20,[0,C0[1],C0[2],C0[3],A0]];break;case 21:var U0=t[1],Q0=o(U0[3]),lx=[21,[0,U0[1],U0[2],Q0]];break;case 22:var H=t[1],b=o(H[3]),lx=[22,[0,H[1],H[2],b]];break;case 23:var B=t[1],a0=o(B[4]),lx=[23,[0,B[1],B[2],B[3],a0]];break;case 24:var m0=t[1],P0=a(m0[2]),lx=[24,[0,m0[1],P0]];break;case 25:var D=t[1],N0=D[1],X0=D[3],D0=D[2],ox=o(N0[4]),lx=[25,[0,[0,N0[1],N0[2],N0[3],ox],D0,X0]];break;case 26:var b0=t[1],kx=b0[1],V0=b0[3],h=b0[2],X=o(kx[3]),lx=[26,[0,[0,kx[1],kx[2],X],h,V0]];break;case 27:var W0=t[1],sx=o(W0[2]),lx=[27,[0,W0[1],sx]];break;case 28:var lx=[28,[0,o(t[1][1])]];break;case 29:var tx=t[1],j0=o(tx[3]),lx=[29,[0,tx[1],tx[2],j0]];break;case 30:var Px=t[1],Ex=o(Px[3]),lx=[30,[0,Px[1],Px[2],Ex]];break;case 31:var lx=[31,[0,o(t[1][1])]];break;case 32:var Ix=t[1],qx=o(Ix[3]),lx=[32,[0,Ix[1],Ix[2],qx]];break;case 34:var B0=t[1],tr=o(B0[3]),lx=[34,[0,B0[1],B0[2],tr]];break;case 35:var Ux=t[1],K0=o(Ux[4]),lx=[35,[0,Ux[1],Ux[2],Ux[3],K0]];break;case 36:var ur=t[1],z0=ur[4],or=ur[3],Ur=o(ur[2]),lx=[36,[0,ur[1],Ur,or,z0]];break;default:var lx=t}return[0,u,lx]}),O0(Yz,function(x){var r=_0(x);u0(x,6);for(var e=[0,0,hn];;){var t=e[2],u=e[1],i=K(x);if(typeof i=="number"){var f=0;if(13<=i)Nr===i&&(f=1);else if(7<=i)switch(i-7|0){case 0:f=1;break;case 2:var o=gx(x);Z0(x);var e=[0,[0,[2,o],u],t];continue;case 5:var a=_0(x),d=l0(0,function(Y){Z0(Y);var F=l(l3,Y);return F[0]===0?[0,F[1],hn]:[0,F[1],F[2]]},x),k=d[2],T=k[2],g=d[1],A=k[1],N=[1,[0,g,[0,A,y0([0,a],0,0)]]],R=K(x)===7?1:0,O=0;if(!R&&pr(1,x)===7){var M=[0,T[1],[0,[0,g,20],T[2]]];O=1}if(!O)var M=T;1-R&&u0(x,9);var e=[0,[0,N,u],$I(M,t)];continue}if(f){var L=Pz(t),z=Ax(u),V=_0(x);return u0(x,7),[0,[0,z,X1([0,r],[0,yx(x)],V,0)],L]}}var Z=l(l3,x);if(Z[0]===0)var $=hn,i0=Z[1];else var $=Z[2],i0=Z[1];K(x)!==7&&u0(x,9);var e=[0,[0,[0,i0],u],$I($,t)]}}),O0(Xz,function(x){J1(x,5);var r=gx(x),e=_0(x),t=K(x),u=0;if(typeof t!="number"&&t[0]===5){var i=t[3],f=t[2];Z0(x);var o=yx(x),a=o,d=i,k=f,T=Qx(ka0,Qx(f,Qx(ma0,i)));u=1}if(!u){g1(ha0,x);var a=0,d=_a0,k=wa0,T=Ta0}W1(x);var g=Fr(Xx(d)),A=Xx(d)-1|0,N=0;if(A>=0)for(var R=N;;){var O=fx(d,R),M=O-100|0,L=0;if(21>=M>>>0)switch(M){case 0:case 3:case 5:case 9:case 15:case 17:case 21:at(g,O),L=1;break}var z=R+1|0;if(A!==R){var R=z;continue}break}var V=Y1(g);return P(V,d)&&zx(x,[18,d]),[0,r,[18,[0,k,V,T,y0([0,e],[0,a],0)]]]});var uE0=function(x){return function(r){if(typeof r=="number"){var e=0;if(66<=r){var t=r+uj|0;if(49>>0)e=1;else{var u=t-15|0;if(9>=u>>>0)switch(u){case 0:case 1:case 3:case 9:e=1;break}}}else 8<=r?r===60&&(e=1):6<=r&&(e=1);if(e)return 0}throw q0(as,1)}},iE0=function(x){var r=K(x);if(typeof r=="number"&&!r){var e=p(px[16],1,x);return[0,[0,e[1]],e[2]]}return[0,[1,l(px[10],x)],0]};O0(oL,function(x){var r=Gy(uE0,x),e=gx(r);if(pr(1,r)===11)var u=0,i=0;else var t=E9(r),u=t[2],i=t[1];var f=i||r[19],o=oI(f,r),a=o[18],d=l0(0,function(c0){var T0=ne(c0,Ke(c0));if(vs(c0)&&T0===0){var E0=p(px[13],ya0,c0),M0=E0[1],Y0=[0,M0,[0,[0,M0,[2,[0,E0,[0,bs(c0)],0]]],0]];return[0,T0,[0,M0,[0,0,[0,Y0,0],0,0]],[0,[0,M0[1],M0[3],M0[3]]],0]}var rx=l(v3(f,a),c0);hz(c0,rx);var g0=XI(Wv(1,c0));return[0,T0,rx,g0[1],g0[2]]},o),k=d[2],T=k[2],g=T[2],A=0,N=k[4],R=k[3],O=k[1],M=d[1];if(!g[1]){var L=0,z=g[2];if((g[3]||!z)&&(L=1),L){var V=SV(o);A=1}}if(!A)var V=o;var Z=T[2],$=Z[1];if($){var i0=T[1];ux(V,[0,$[1][1],91]);var U=[0,i0,[0,0,Z[2],Z[3],Z[4]]]}else var U=T;var J=Fv(U),Y=K2(V),F=Y&&(K(V)===11?1:0);F&&zx(V,60),u0(V,11);var n0=EV(SV(V),i,0,J),Q=l0(0,iE0,n0),f0=Q[2],s0=f0[1],v0=Q[1];o3(n0,f0[2],0,U);var o0=Hr(e,v0);return[0,[0,o0,[1,[0,0,U,s0,i,0,N,R,O,y0([0,u],0,0),M]]]]}),O0(N9,function(x,r,e){return l0([0,r],function(t){for(var u=e;;){var i=K(t);if(typeof i=="number"&&i===9){Z0(t);var u=[0,l($t,t),u];continue}return[27,[0,Ax(u),0]]}},x)});var fE0=function(x){var r=_0(x);Z0(x);var e=y0([0,r],0,0),t=l(g9,x),u=K2(x)?l6(x):n9(x),i=u[2];return[0,p(i,t,function(f,o){return p(bx(f,dn,64),f,o)}),e]},yL=function(x){if(!x[28][3])return 0;for(var r=0;;){var e=K(x);if(typeof e=="number"&&e===13){var r=[0,l0(0,fE0,x),r];continue}return Ax(r)}},$o=function(x,r){var e=x?x[1]:0,t=_0(r),u=K(r);if(typeof u=="number")switch(u){case 6:var i=l0(0,function(v0){var o0=_0(v0);u0(v0,6);var c0=c6(0,v0),T0=l(px[10],c0);return u0(v0,7),[0,T0,y0([0,o0],[0,yx(v0)],0)]},r),f=i[1];return[0,f,[5,[0,f,i[2]]]];case 14:if(!e){var o=l0(0,function(v0){return Z0(v0),[3,T2(v0)]},r),a=o[1],d=o[2];return ux(r,[0,a,68]),[0,a,d]}var k=BV(r),T=r[30][1],g=k[2][1],A=k[1];if(T){var N=T[1],R=T[2],O=N[2],M=[0,[0,p(w2[4],g,N[1]),O],R];r[30][1]=M}else Nx(Cs0);return[0,A,[4,k]]}else switch(u[0]){case 0:var L=u[2],z=u[1],V=gx(r),Z=G0(P9,r,z,L);return[0,V,[1,[0,V,[0,Z,L,y0([0,t],[0,yx(r)],0)]]]];case 1:var $=u[2],i0=u[1],U=gx(r),J=G0(C9,r,i0,$);return[0,U,[2,[0,U,[0,J,$,y0([0,t],[0,yx(r)],0)]]]];case 2:var Y=u[1],F=Y[4],n0=Y[3],Q=Y[2],f0=Y[1];return F&&Wt(r,81),u0(r,[2,[0,f0,Q,n0,F]]),[0,f0,[0,[0,f0,[0,Q,n0,y0([0,t],[0,yx(r)],0)]]]]}var s0=T2(r);return[0,s0[1],[3,s0]]},R9=function(x,r,e){var t=a3(x),u=t[1],i=t[2],f=$o([0,r],x),o=f[1],a=0,d=En(x,f[2]);return[0,d,l0(0,function(k){var T=Zv(1,k),g=l0(0,function(V){var Z=l(v3(0,0),V),$=0,i0=K(V)===86?Z:p6(V,Z);if(e){var U=i0[2],J=0;if(U[1])ux(V,[0,o,28]),J=1;else{var Y=0;U[2]||U[3]?Y=1:J=1,Y&&ux(V,[0,o,27])}}else{var F=i0[2];if(F[1])ux(V,[0,o,71]);else{var n0=F[2],Q=0;n0&&!n0[2]&&!F[3]&&(Q=1),Q||(F[3]?ux(V,[0,o,70]):ux(V,[0,o,70]))}}return[0,$,i0,f3(V,YI(V))]},T),A=g[2],N=A[2],R=A[3],O=A[1],M=g[1],L=w6(T,a,u,0,Fv(N)),z=L[1];return o3(T,L[2],0,N),[0,0,N,z,a,u,0,R,O,y0([0,i],0,0),M]},x)]},Zz=function(x){var r=l(l3,x);return r[0]===0?[0,r[1],hn]:[0,r[1],r[2]]},Wz=function(x,r){switch(r[0]){case 0:var e=r[1],t=e[1],u=e[2];return ux(x,[0,t,53]),[0,t,[13,u]];case 1:var i=r[1],f=i[1],o=i[2];return ux(x,[0,f,53]),[0,f,[16,o]];case 2:var a=r[1],d=a[1],k=a[2];return ux(x,[0,d,53]),[0,d,[17,k]];case 3:var T=r[1],g=T[2][1],A=T[1];return by(g)?ux(x,[0,A,st]):u3(g)&&dt(x,[0,A,85]),[0,A,[9,T]];case 4:return Nx(nl0);default:var N=r[1][2][1];return ux(x,[0,N[1],8]),N}},$z=function(x,r,e){function t(i){var f=Zv(1,i),o=l0(0,function(R){var O=ne(R,Ke(R)),M=l(v3(x,r),R),L=K(R)===86?M:p6(R,M);return[0,O,L,f3(R,YI(R))]},f),a=o[2],d=a[2],k=a[3],T=a[1],g=o[1],A=w6(f,x,r,0,Fv(d)),N=A[1];return o3(f,A[2],0,d),[0,0,d,N,x,r,0,k,T,y0([0,e],0,0),g]}var u=0;return function(i){return l0(u,t,i)}},Qz=function(x){return u0(x,86),Zz(x)},mL=function(x,r,e,t,u,i){var f=l0([0,r],function(a){if(!t&&!u){var d=K(a);if(typeof d=="number"){var k=0;if(86<=d){if(d===98)k=1;else if(87>d){var T=Qz(a);return[0,[0,e,T[1],0],T[2]]}}else{if(d===82){if(e[0]===3)var g=e[1],A=gx(a),N=function(z){var V=_0(z);u0(z,82);var Z=yx(z),$=p(px[19],z,[0,g[1],[9,g]]),i0=l(px[10],z);return[3,[0,0,$,i0,y0([0,V],[0,Z],0)]]},R=l0([0,g[1]],N,a),O=[0,R,[0,[0,[0,A,[24,gy(tl0)]],0],0]];else var O=Qz(a);return[0,[0,e,O[1],1],O[2]]}if(10>d)switch(d){case 4:k=1;break;case 1:case 9:return[0,[0,e,Wz(a,e),1],hn]}}if(k){var M=En(a,e);return[0,[1,M,l($z(t,u,i),a)],hn]}}return[0,[0,e,Wz(a,e),1],hn]}var L=En(a,e);return[0,[1,L,l($z(t,u,i),a)],hn]},x),o=f[2];return[0,[0,[0,f[1],o[1]]],o[2]]},cE0=function(x){if(K(x)===12){var r=_0(x),e=l0(0,function(M0){return u0(M0,12),Zz(M0)},x),t=e[2],u=t[2],i=t[1],f=e[1];return[0,[1,[0,f,[0,i,y0([0,r],0,0)]]],u]}var o=gx(x),a=pr(1,x),d=0;if(typeof a=="number"){var k=0;if(86<=a)a!==98&&87<=a&&(k=1);else if(a!==82)if(10<=a)k=1;else switch(a){case 1:case 4:case 9:break;default:k=1}if(!k){var g=0,A=0;d=1}}if(!d)var T=E9(x),g=T[2],A=T[1];var N=a3(x),R=N[1],O=Fx(g,N[2]),M=K(x);if(!A&&!R&&typeof M!="number"&&M[0]===4){var L=M[3];if(!P(L,Cv)){var z=_0(x),V=$o(0,x)[2],Z=K(x);if(typeof Z=="number"){var $=0;if(86<=Z)Z!==98&&87<=Z&&($=1);else if(Z!==82)if(10<=Z)$=1;else switch(Z){case 1:case 4:case 9:break;default:$=1}if(!$)return mL(x,o,V,0,0,0)}En(x,V);var i0=l0([0,o],function(M0){return R9(M0,0,1)},x),U=i0[2],J=U[2],Y=U[1],F=i0[1];return[0,[0,[0,F,[2,Y,J,y0([0,z],0,0)]]],hn]}if(!P(L,Da)){var n0=_0(x),Q=$o(0,x)[2],f0=K(x);if(typeof f0=="number"){var s0=0;if(86<=f0)f0!==98&&87<=f0&&(s0=1);else if(f0!==82)if(10<=f0)s0=1;else switch(f0){case 1:case 4:case 9:break;default:s0=1}if(!s0)return mL(x,o,Q,0,0,0)}En(x,Q);var v0=l0([0,o],function(M0){return R9(M0,0,0)},x),o0=v0[2],c0=o0[2],T0=o0[1],E0=v0[1];return[0,[0,[0,E0,[3,T0,c0,y0([0,n0],0,0)]]],hn]}}return mL(x,o,$o(0,x)[2],A,R,O)},sE0=function(x){var r=l0(0,function(t){var u=_0(t);u0(t,0);for(var i=0,f=[0,0,hn];;){var o=f[2],a=f[1],d=K(t);if(typeof d=="number"){var k=0;if(d!==1&&Nr!==d&&(k=1),!k){var T=i?[0,o[1],[0,[0,i[1],95],o[2]]]:o,g=Pz(T),A=Ax(a),N=_0(t);return u0(t,1),[0,[0,A,X1([0,u],[0,yx(t)],N,0)],g]}}var R=cE0(t),O=R[1],M=0,L=R[2];if(O[0]===1&&K(t)===9){var z=[0,gx(t)];M=1}if(!M)var z=0;var V=$I(L,o),Z=K(t),$=0;if(typeof Z=="number"){var i0=Z-2|0,U=0;if(U1>>0?M2>=i0+1>>>0&&(U=1):i0===7&&(Z0(t),U=1),U){var J=V;$=1}}if(!$){var Y=eI(ws0,9),F=NV([0,Y],K(t)),n0=[0,gx(t),F];v1(t,8);var J=[0,[0,n0,V[1]],[0,n0,V[2]]]}var i=z,f=[0,[0,O,a],J]}},x),e=r[2];return[0,r[1],e[1],e[2]]},O9=function(x,r,e,t){var u=e[2][1],i=e[1];if(Ar(u,Ev))return ux(x,[0,i,[15,u,0,FU===t?1:0,1]]),r;for(var f=r;;){if(typeof f=="number")var a=0;else if(f[0]===0)var o=f[2],a=Tx(u,f[1])===0?[0,o]:0;else{var d=Tx(u,f[2]),k=f[5],T=f[4],g=f[3];if(d!==0){var A=0<=d?k:T,f=A;continue}var a=[0,g]}if(!a)return s9(u,t,r);var N=a[1],R=0;return LP===t?QN===N&&(R=1):QN===t&&LP===N&&(R=1),R||ux(x,[0,i,[1,u]]),s9(u,Qj,r)}},Fz=function(x,r){return l0(0,function(e){var t=r?_0(e):0;u0(e,52);for(var u=0;;){var i=[0,l0(0,function(a){var d=ls(a);if(K(a)===98)var k=N1(a)[2],T=p(k,d,function(g,A){return p(bx(g,Na,65),g,A)});else var T=d;return[0,T,mz(a)]},e),u],f=K(e);if(typeof f=="number"&&f===9){u0(e,9);var u=i;continue}var o=Ax(i);return[0,o,y0([0,t],0,0)]}},x)},kL=function(x){switch(x[0]){case 0:case 3:var r=x[1];return[0,[0,r[1],r[2][1]]];default:return 0}},hL=function(x,r){return r?ux(x,[0,r[1][1],M2]):0},_L=function(x,r){return r?ux(x,[0,r[1],13]):0},Hz=function(x,r,e,t,u,i,f,o){var a=l0([0,r],function(R){var O=BI(R),M=K(R);if(i){var L=0;if(typeof M=="number"&&M===82){zx(R,14),Z0(R);var z=0}else L=1;if(L)var z=0}else{var V=0;if(typeof M=="number"&&M===82){Z0(R);var Z=Zv(1,R),z=[0,l(px[7],Z)];V=1}if(!V)var z=1}var $=K(R),i0=0;if(typeof $=="number"&&9>$)switch($){case 8:Z0(R);var U=K(R),J=0;if(typeof U=="number"){var Y=0;if(U===1||Nr===U?Y=1:J=1,Y)var F=yx(R)}else J=1;if(J)var F=K2(R)?Ko(R):0;var n0=[0,t,O,z,F];i0=1;break;case 4:case 6:g1(0,R);var n0=[0,t,O,z,0];i0=1;break}if(!i0){var Q=K(R),f0=0;if(typeof Q=="number"){var s0=0;if(Q===1||Nr===Q?s0=1:f0=1,s0)var v0=[0,0,function(dx,mx){return dx}]}else f0=1;if(f0)var v0=K2(R)?l6(R):n9(R);if(typeof z=="number")if(O[0]===0)var o0=function(ax,dx){return p(bx(ax,vD,68),ax,dx)},Y0=z,rx=O,g0=p(v0[2],t,o0);else var c0=O[1],T0=function(ax,dx){return p(bx(ax,WN,69),ax,dx)},Y0=z,rx=[1,p(v0[2],c0,T0)],g0=t;else var E0=z[1],M0=function(ax,dx){return p(bx(ax,dn,70),ax,dx)},Y0=[0,p(v0[2],E0,M0)],rx=O,g0=t;var n0=[0,g0,rx,Y0,0]}var H0=n0[3],t0=n0[2],ex=n0[1];return[0,ex,t0,H0,y0([0,o],[0,n0[4]],0)]},x),d=a[2],k=d[4],T=d[3],g=d[2],A=d[1],N=a[1];return A[0]===4?[2,[0,N,[0,A[1],T,g,u,f,e,k]]]:[1,[0,N,[0,A,T,g,u,f,e,k]]]},wL=function(x,r,e,t,u,i,f,o,a,d){for(;;){var k=K(x);if(typeof k=="number"){var T=k-1|0,g=0;if(7>>0){var A=T-81|0;if(4>=A>>>0)switch(A){case 3:g1(0,x),Z0(x);continue;case 0:case 4:g=1;break}}else 5>>0&&(g=1);if(g&&!u&&!i)return Hz(x,r,e,t,f,o,a,d)}var N=K(x),R=0;if(typeof N=="number"&&(N===4||N===98))var O=0;else R=1;if(R)var O=i3(x)?1:0;if(O)return Hz(x,r,e,t,f,o,a,d);_L(x,o),hL(x,a);var M=kL(t),L=0;if(f){if(M){var z=M[1],V=z[1];if(!P(z[2],Ao)){ux(x,[0,V,[15,H30,f,1,0]]);var i0=Zv(1,x),U=1;L=1}}}else if(M){var Z=M[1],$=Z[1];if(!P(Z[2],Ev)){u&&ux(x,[0,$,10]),i&&ux(x,[0,$,11]);var i0=Zv(2,x),U=0;L=1}}if(!L)var i0=Zv(1,x),U=1;var J=En(i0,t),Y=l0(0,function(n0){var Q=l0(0,function(M0){var Y0=ne(M0,Ke(M0)),rx=l(v3(u,i),M0),g0=K(M0)===86?rx:p6(M0,rx),H0=g0[2],t0=H0[1],ex=0;if(t0){var xx=t0[1][1],ax=g0[1];if(U===0){ux(M0,[0,xx,92]);var dx=[0,ax,[0,0,H0[2],H0[3],H0[4]]];ex=1}}if(!ex)var dx=g0;return[0,Y0,dx,f3(M0,YI(M0))]},n0),f0=Q[2],s0=f0[2],v0=f0[3],o0=f0[1],c0=Q[1],T0=w6(n0,u,i,0,Fv(s0)),E0=T0[1];return o3(n0,T0[2],0,s0),[0,0,s0,E0,u,i,0,v0,o0,0,c0]},i0),F=[0,U,J,Y,f,e,y0([0,d],0,0)];return[0,[0,Hr(r,Y[1]),F]]}},TL=function(x,r){var e=pr(x,r);if(typeof e=="number"){var t=0;if(86<=e)e!==98&&87<=e&&(t=1);else if(e!==82)if(9<=e)t=1;else switch(e){case 1:case 4:case 8:break;default:t=1}if(!t)return 1}return 0},oE0=0,qz=function(x){return TL(oE0,x)},vE0=function(x){var r=gx(x),e=yL(x),t=K(x),u=0;if(typeof t=="number"&&t===60&&!TL(1,x)){var i=[0,gx(x)],f=_0(x);Z0(x);var o=f,a=i;u=1}if(!u)var o=0,a=0;var d=K(x),k=0;if(typeof d=="number"&&2>=d+mU>>>0&&Vo(1,x)){var T=0;if(typeof d=="number"){var g=d+mU|0;if(2>=g>>>0){switch(g){case 0:var A=sY;break;case 1:var A=fl;break;default:var A=dl}var N=A;T=1}}if(!T)var N=Nx(q30);zx(x,[22,N]),Z0(x),k=1}var R=K(x)===42?1:0;if(R){var O=pr(1,x),M=0;if(typeof O=="number"){var L=0;if(87<=O)O!==98&&Nr!==O&&(L=1);else{var z=O-9|0;if(76>>0){if(77>z)switch(z+9|0){case 1:case 4:case 8:break;default:L=1}}else z!==73&&(L=1)}if(!L){var V=0;M=1}}if(!M)var V=1;var Z=V}else var Z=R;if(Z){var $=_0(x);Z0(x);var i0=$}else var i0=0;var U=K(x)===64?1:0;if(U)var J=1-TL(1,x),Y=J&&1-o6(1,x);else var Y=U;if(Y){var F=_0(x);Z0(x);var n0=F}else var n0=0;var Q=a3(x),f0=Q[1],s0=Q[2],v0=Vo(1,x),o0=v0||(pr(1,x)===6?1:0),c0=gx(x),T0=K(x),E0=0;if(typeof T0=="number")switch(T0){case 103:var M0=_0(x);Z0(x);var g0=[0,[0,c0,[0,0,y0([0,M0],0,0)]]];E0=1;break;case 104:var Y0=_0(x);Z0(x);var g0=[0,[0,c0,[0,1,y0([0,Y0],0,0)]]];E0=1;break}else if(T0[0]===4&&!P(T0[3],Ea)&&o0){var rx=_0(x);Z0(x);var g0=[0,[0,c0,[0,2,y0([0,rx],0,0)]]];E0=1}if(!E0)var g0=0;var H0=0;if(g0){var t0=0,ex=g0[1][1];if((Y||f0)&&(t0=1),t0){ux(x,[0,ex,M2]);var xx=0;H0=1}}if(!H0)var xx=g0;var ax=0;if(!f0&&xx){var dx=a3(x),mx=dx[2],L0=dx[1];ax=1}if(!ax)var mx=s0,L0=f0;var C0=Yl([0,o,[0,i0,[0,n0,[0,mx,0]]]]),A0=K(x);if(!Y&&!L0&&typeof A0!="number"&&A0[0]===4){var U0=A0[3];if(!P(U0,Cv)){var Q0=_0(x),H=$o(b30,x)[2];if(qz(x))return wL(x,r,e,H,Y,L0,Z,a,xx,C0);_L(x,a),hL(x,xx),En(x,H);var b=Fx(C0,Q0),B=l0([0,r],function(K0){return R9(K0,1,1)},x),a0=B[2],m0=a0[1],P0=a0[2],D=B[1],N0=kL(m0),X0=0;if(Z){if(N0){var D0=N0[1],ox=D0[1];P(D0[2],Ao)||(ux(x,[0,ox,[15,el0,Z,0,0]]),X0=1)}}else if(N0){var b0=N0[1],kx=b0[1];P(b0[2],Ev)||(ux(x,[0,kx,9]),X0=1)}return[0,[0,D,[0,2,m0,P0,Z,e,y0([0,b],0,0)]]]}if(!P(U0,Da)){var V0=_0(x),h=$o(G30,x)[2];if(qz(x))return wL(x,r,e,h,Y,L0,Z,a,xx,C0);_L(x,a),hL(x,xx),En(x,h);var X=Fx(C0,V0),W0=l0([0,r],function(K0){return R9(K0,1,0)},x),sx=W0[2],tx=sx[1],j0=sx[2],Px=W0[1],Ex=kL(tx),Ix=0;if(Z){if(Ex){var qx=Ex[1],B0=qx[1];P(qx[2],Ao)||(ux(x,[0,B0,[15,rl0,Z,0,0]]),Ix=1)}}else if(Ex){var tr=Ex[1],Ux=tr[1];P(tr[2],Ev)||(ux(x,[0,Ux,9]),Ix=1)}return[0,[0,Px,[0,3,tx,j0,Z,e,y0([0,X],0,0)]]]}}return wL(x,r,e,$o(xl0,x)[2],Y,L0,Z,a,xx,C0)},Gz=function(x,r,e,t){var u=x?x[1]:0,i=Gs(1,r),f=Fx(u,yL(i)),o=_0(i),a=K(i),d=0;typeof a!="number"&&a[0]===4&&!P(a[3],bh)&&(zx(i,88),Z0(i),d=1),u0(i,40);var k=vI(1,i),T=K(k),g=0;if(e&&typeof T=="number"){var A=0;if(52<=T?T!==98&&53<=T&&(A=1):T!==41&&T&&(A=1),!A){var O=0;g=1}}if(!g)if(vs(i))var N=p(px[13],0,k),R=N1(i)[2],O=[0,p(R,N,function(Q,f0){return p(bx(Q,Na,72),Q,f0)})];else{RV(i,W30);var O=[0,[0,gx(i),$30]]}var M=Ke(i);if(M)var L=M[1],z=N1(i)[2],V=[0,p(z,L,function(Q,f0){return p(bx(Q,qN,71),Q,f0)})];else var V=0;var Z=_0(i);if(v1(i,41))var $=l0(0,function(Q){var f0=l(g9,sI(0,Q));if(K(Q)===98)var s0=N1(Q)[2],v0=p(s0,f0,function(c0,T0){return p(bx(c0,dn,66),c0,T0)});else var v0=f0;var o0=mz(Q);return[0,v0,o0,y0([0,Z],0,0)]},i),i0=$[1],U=$[2],J=N1(i)[2],Y=[0,[0,i0,p(J,U,function(Q,f0){return G0(bx(Q,-663447790,67),Q,i0,f0)})]];else var Y=0;if(K(i)===52){1-_1(i)&&zx(i,Ot);var F=[0,jV(i,Fz(i,1))]}else var F=0;var n0=l0(0,function(Q){var f0=_0(Q);if(!v1(Q,0))return xo(Q,0),F30;Q[30][1]=[0,[0,w2[1],0],Q[30][1]];for(var s0=0,v0=vS0,o0=0;;){var c0=K(Q);if(typeof c0=="number"){var T0=c0-2|0;if(U1>>0){if(M2>=T0+1>>>0){var E0=Ax(o0),M0=function(B0,tr){return l(Xl(function(Ux){return 1-p(w2[3],Ux[1],B0)}),tr)},Y0=Q[30][1];if(Y0){var rx=Y0[1],g0=rx[1];if(Y0[2]){var H0=Y0[2],t0=M0(g0,rx[2]),ex=Bl(H0),xx=ex[2],ax=ex[1],dx=oX(H0),mx=[0,[0,ax,Fx(xx,t0)],dx];Q[30][1]=mx}else{var L0=M0(g0,rx[2]);P2(function(B0){return ux(Q,[0,B0[2],[23,B0[1]]])},L0),Q[30][1]=0}}else Nx(Ns0);u0(Q,1);var C0=K(Q),A0=0;if(!t){var U0=0;if((typeof C0!="number"||C0!==1&&Nr!==C0)&&(U0=1),U0)if(K2(Q)){var Q0=Ko(Q);A0=1}else{var Q0=0;A0=1}}if(!A0)var Q0=yx(Q);return[0,E0,y0([0,f0],[0,Q0],0)]}}else if(T0===6){u0(Q,8);continue}}var H=vE0(Q);switch(H[0]){case 0:var b=H[1],B=b[2],a0=b[1];switch(B[1]){case 0:if(B[4])var j0=v0,Px=s0;else{s0&&ux(Q,[0,a0,18]);var j0=v0,Px=1}break;case 1:var m0=B[2],P0=m0[0]===4?O9(Q,v0,m0[1],FU):v0,j0=P0,Px=s0;break;case 2:var D=B[2],N0=D[0]===4?O9(Q,v0,D[1],LP):v0,j0=N0,Px=s0;break;default:var X0=B[2],D0=X0[0]===4?O9(Q,v0,X0[1],QN):v0,j0=D0,Px=s0}break;case 1:var ox=H[1][2],b0=ox[4],kx=ox[1];switch(kx[0]){case 4:Nx(Q30);break;case 0:case 3:var V0=kx[1],h=V0[2][1],X=Ar(h,Ev),W0=V0[1];if(X)var tx=X;else var sx=Ar(h,Ao),tx=sx&&b0;tx&&ux(Q,[0,W0,[15,h,b0,0,0]]);break}var j0=v0,Px=s0;break;default:var j0=O9(Q,v0,H[1][2][1],Qj),Px=s0}var s0=Px,v0=j0,o0=[0,H,o0]}},i);return[0,O,n0,V,Y,F,f,y0([0,o],0,0)]},I9=function(x,r){return l0(0,function(e){return[2,Gz([0,r],e,e[7],0)]},x)},aE0=function(x){return[6,Gz(0,x,1,1)]},lE0=0,pE0=function(x){return l0(lE0,aE0,x)},bz=JV(px),xK=function(x){var r=T6(x);if(x[5])Qv(x,r[1]);else{var e=r[2],t=0;if(e[0]===26){var u=e[1],i=r[1],f=0;u[4]?(ux(x,[0,i,5]),f=1):u[5]&&(ux(x,[0,i,26]),f=1),f&&(t=1)}}return r},L9=function(x,r){var e=r[4],t=r[3],u=r[2],i=r[1];e&&Wt(x,81);var f=_0(x);return u0(x,[2,[0,i,u,t,e]]),[0,i,[0,u,t,y0([0,f],[0,yx(x)],0)]]},t2=function(x,r,e){var t=x?x[1]:Yl0,u=r?r[1]:1,i=K(e);if(typeof i=="number"){var f=i-2|0;if(U1>>0){if(M2>=f+1>>>0){var o=function(k,T){return k};return[1,[0,yx(e),o]]}}else if(f===6){Z0(e);var a=K(e);if(typeof a=="number"){var d=0;if(a!==1&&Nr!==a&&(d=1),!d)return[0,yx(e)]}return K2(e)?[0,Ko(e)]:Xl0}}return K2(e)?[1,l6(e)]:(u&&g1([0,t],e),Jl0)},no=function(x){var r=K(x);if(typeof r=="number"){var e=0;if(r!==1&&Nr!==r&&(e=1),!e){var t=function(u,i){return u};return[0,yx(x),t]}}return K2(x)?l6(x):n9(x)},SL=function(x,r,e){var t=t2(0,0,r);if(t[0]===0)return[0,t[1],e];var u=t[1][2],i=Ax(e);if(i)var f=i[2],o=i[1],a=Ax([0,p(u,o,function(d,k){return G0(bx(d,634872468,73),d,x,k)}),f]);else var a=0;return[0,0,a]},rK=function x(r){return x.fun(r)},eK=function x(r){return x.fun(r)},tK=function x(r){return x.fun(r)},nK=function x(r){return x.fun(r)},uK=function x(r){return x.fun(r)},E6=function x(r,e){return x.fun(r,e)},iK=function x(r){return x.fun(r)},fK=function x(r){return x.fun(r)},g6=function x(r,e,t){return x.fun(r,e,t)},cK=function x(r){return x.fun(r)},sK=function x(r){return x.fun(r)},A6=function x(r,e){return x.fun(r,e)},oK=function x(r){return x.fun(r)},vK=function x(r){return x.fun(r)},M9=function x(r,e){return x.fun(r,e)},aK=function x(r){return x.fun(r)},D9=function x(r,e){return x.fun(r,e)},lK=function x(r){return x.fun(r)},pK=function x(r){return x.fun(r)},j9=function x(r,e){return x.fun(r,e)},dK=function x(r){return x.fun(r)},P6=function x(r,e,t){return x.fun(r,e,t)},C6=function x(r,e){return x.fun(r,e)},yK=function x(r,e){return x.fun(r,e)},mK=function x(r,e){return x.fun(r,e)},EL=function x(r,e){return x.fun(r,e)},kK=function x(r){return x.fun(r)},p3=function x(r){return x.fun(r)},U9=function x(r,e,t){return x.fun(r,e,t)},gL=function x(r,e){return x.fun(r,e)},hK=function x(r,e){return x.fun(r,e)},AL=function x(r){return x.fun(r)},dE0=function(x){var r=_0(x);u0(x,59);var e=K(x)===8?yx(x):0,t=t2(0,0,x),u=t[0]===0?t[1]:t[1][1];return[5,[0,y0([0,r],[0,Fx(e,u)],0)]]},yE0=0,mE0=function(x){var r=_0(x);u0(x,37);var e=f6(1,x),t=l(px[2],e),u=1-x[5],i=u&&d6(t);i&&Qv(x,t[1]);var f=yx(x);u0(x,25);var o=yx(x);u0(x,4);var a=l(px[7],x);u0(x,5);var d=K(x)===8?yx(x):0,k=t2(0,Bl0,x),T=k[0]===0?Fx(d,k[1]):k[1][1];return[17,[0,t,a,y0([0,r],[0,Fx(f,Fx(o,T))],0)]]},kE0=0,_K=function(x,r,e){var t=e[2][1],u=e[1];return t&&!t[1][2][2]&&!t[2]?0:ux(x,[0,u,r])},PL=function(x,r){return!x[5]&&d6(r)?Qv(x,r[1]):0},hE0=function(x){var r=_0(x);u0(x,39);var e=x[19],t=e&&v1(x,65),u=Fx(r,_0(x));u0(x,4);var i=y0([0,u],0,0),f=K(x),o=0;if(typeof f=="number"&&f===64){var a=1;o=1}if(!o)var a=0;var d=c6(1,x),k=K(d),T=0;if(typeof k=="number"){if(24<=k){if(29>k)switch(k+TT|0){case 0:var g=l0(0,Sz,d),A=g[2],N=A[3],R=A[1],O=g[1],F=N,n0=[0,[1,[0,O,[0,R,0,y0([0,A[2]],0,0)]]]];T=1;break;case 3:var M=l0(0,Ez,d),L=M[2],z=L[3],V=L[1],Z=M[1],F=z,n0=[0,[1,[0,Z,[0,V,2,y0([0,L[2]],0,0)]]]];T=1;break;case 4:if(pr(1,d)!==17){var $=l0(0,gz,d),i0=$[2],U=i0[3],J=i0[1],Y=$[1],F=U,n0=[0,[1,[0,Y,[0,J,1,y0([0,i0[2]],0,0)]]]];T=1}break}}else if(k===8){var F=0,n0=0;T=1}}if(!T)var F=0,n0=[0,[0,l(px[8],d)]];var Q=K(x);if(typeof Q=="number"){if(Q===17){if(!n0)throw q0([0,wr,Ul0],1);var f0=n0[1];if(f0[0]===0)var s0=[1,WI(jl0,x,f0[1])];else{var v0=f0[1];_K(x,43,v0);var s0=[0,v0]}t?u0(x,63):u0(x,17);var o0=l(px[7],x);u0(x,5);var c0=f6(1,x),T0=l(px[2],c0);return PL(x,T0),[24,[0,s0,o0,T0,0,i]]}if(Q===63){if(!n0)throw q0([0,wr,Dl0],1);var E0=n0[1];if(E0[0]===0){var M0=WI(Ml0,x,E0[1]),Y0=1-t,rx=Y0&&a,g0=0;if(rx){var H0=M0[2];if(H0[0]===2){var t0=H0[1][1],ex=t0[1];P(t0[2][1],Co)||(ux(x,[0,ex,44]),g0=1)}}var xx=[1,M0]}else{var ax=E0[1];_K(x,44,ax);var xx=[0,ax]}u0(x,63);var dx=l(px[10],x);u0(x,5);var mx=f6(1,x),L0=l(px[2],mx);return PL(x,L0),[25,[0,xx,dx,L0,t,i]]}}if(P2(function(N0){return ux(x,N0)},F),t?u0(x,63):u0(x,8),n0)var C0=n0[1],A0=C0[0]===0?[0,[1,v2(x,C0[1])]]:[0,[0,C0[1]]],U0=A0;else var U0=0;var Q0=K(x),H=0;if(typeof Q0=="number"&&Q0===8){var b=0;H=1}if(!H)var b=[0,l(px[7],x)];u0(x,8);var B=K(x),a0=0;if(typeof B=="number"&&B===5){var m0=0;a0=1}if(!a0)var m0=[0,l(px[7],x)];u0(x,5);var P0=f6(1,x),D=l(px[2],P0);return PL(x,D),[23,[0,U0,b,m0,D,i]]},_E0=0,wK=function(x){var r=zo(x)?xK(x):l(px[2],x),e=1-x[5],t=e&&d6(r);return t&&Qv(x,r[1]),r},wE0=function(x){var r=_0(x);u0(x,43);var e=wK(x);return[0,e,y0([0,r],0,0)]},TE0=function(x){var r=_0(x);u0(x,16);var e=Fx(r,_0(x));u0(x,4);var t=l(px[7],x);u0(x,5);var u=wK(x),i=K(x)===43?[0,l0(0,wE0,x)]:0;return[27,[0,t,u,i,y0([0,e],0,0)]]},SE0=0,TK=function(x){return l0(SE0,TE0,x)},EE0=function(x){1-x[11]&&zx(x,31);var r=_0(x),e=gx(x);u0(x,19);var t=K(x)===8?yx(x):0,u=0;if(K(x)!==8&&!i3(x)){var i=[0,l(px[7],x)];u=1}if(!u)var i=0;var f=Hr(e,gx(x)),o=t2(0,0,x),a=0;if(o[0]===0)var d=o[1];else{var k=o[1],T=k[1];if(i){var g=i[1],A=k[2],N=[0,p(A,g,function(z,V){return p(bx(z,dn,74),z,V)})],R=t;a=1}else var d=T}if(!a)var N=i,R=Fx(t,d);return[31,[0,N,y0([0,r],[0,R],0),f]]},gE0=0,AE0=function(x){var r=_0(x);u0(x,20),u0(x,4);var e=l(px[7],x);u0(x,5),u0(x,0);for(var t=Ll0;;){var u=t[2],i=t[1],f=K(x);if(typeof f=="number"){var o=0;if(f!==1&&Nr!==f&&(o=1),!o){var a=Ax(u);u0(x,1);var d=no(x)[1],k=e[1];return[32,[0,e,a,y0([0,r],[0,d],0),k]]}}var T=i9(0,function(A){return function(N){var R=_0(N),O=K(N),M=0;if(typeof O=="number"&&O===36){A&&zx(N,58),u0(N,36);var L=yx(N),z=0;M=1}if(!M){u0(N,33);var L=0,z=[0,l(px[7],N)]}var V=A||(z===0?1:0);u0(N,86);var Z=Fx(L,no(N)[1]);function $(Y){if(typeof Y=="number"){var F=Y-1|0,n0=0;if(32>>0?F===35&&(n0=1):30>>0&&(n0=1),n0)return 1}return 0}var i0=1,U=N[9]===1?N:[0,N[1],N[2],N[3],N[4],N[5],N[6],N[7],N[8],i0,N[10],N[11],N[12],N[13],N[14],N[15],N[16],N[17],N[18],N[19],N[20],N[21],N[22],N[23],N[24],N[25],N[26],N[27],N[28],N[29],N[30],N[31]],J=p(px[4],$,U);return[0,[0,z,J,y0([0,R],[0,Z],0)],V]}}(i),x),t=[0,T[2],[0,T[1],u]]}},PE0=0,CE0=function(x){var r=_0(x),e=gx(x);u0(x,22),K2(x)&&ux(x,[0,e,59]);var t=l(px[7],x),u=t2(0,0,x);if(u[0]===0)var o=t,a=u[1];else var i=u[1][2],f=0,o=p(i,t,function(d,k){return p(bx(d,dn,75),d,k)}),a=f;return[33,[0,o,y0([0,r],[0,a],0)]]},NE0=0,RE0=function(x){var r=_0(x);u0(x,23);var e=l(px[15],x);if(K(x)===34)var t=N1(x)[2],u=p(t,e,function(M,L){var z=L[1];return[0,z,G0(bx(M,n8,4),M,z,L[2])]});else var u=e;var i=K(x),f=0;if(typeof i=="number"&&i===34){var o=[0,l0(0,function(L){var z=_0(L);u0(L,34);var V=yx(L);if(K(L)===4){u0(L,4);var Z=[0,p(px[18],L,72)];u0(L,5);var $=Z}else var $=0;var i0=l(px[15],L);if(K(L)===38)var J=i0;else var U=no(L)[2],J=p(U,i0,function(Y,F){var n0=F[1];return[0,n0,G0(bx(Y,n8,76),Y,n0,F[2])]});return[0,$,J,y0([0,z],[0,V],0)]},x)];f=1}if(!f)var o=0;var a=K(x),d=0;if(typeof a=="number"&&a===38){u0(x,38);var k=l(px[15],x),T=k[1],g=k[2],A=no(x)[2],N=[0,[0,T,p(A,g,function(L,z){return G0(bx(L,n8,77),L,T,z)})]];d=1}if(!d)var N=0;var R=o===0?1:0,O=R&&(N===0?1:0);return O&&ux(x,[0,u[1],61]),[34,[0,u,o,N,y0([0,r],0,0)]]},OE0=0,IE0=function(x){var r=Sz(x),e=r[3],t=r[2],u=SL(0,x,r[1]),i=0,f=u[2],o=u[1];return P2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},LE0=0,ME0=function(x){var r=Ez(x),e=r[3],t=r[2],u=SL(2,x,r[1]),i=2,f=u[2],o=u[1];return P2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},DE0=0,jE0=function(x){var r=gz(x),e=r[3],t=r[2],u=SL(1,x,r[1]),i=1,f=u[2],o=u[1];return P2(function(a){return ux(x,a)},e),[37,[0,f,i,y0([0,t],[0,o],0)]]},UE0=0,BE0=function(x){var r=_0(x);u0(x,25);var e=Fx(r,_0(x));u0(x,4);var t=l(px[7],x);u0(x,5);var u=f6(1,x),i=l(px[2],u),f=1-x[5],o=f&&d6(i);return o&&Qv(x,i[1]),[38,[0,t,i,y0([0,e],0,0)]]},YE0=0,XE0=function(x){var r=_0(x),e=l(px[7],x),t=K(x),u=e[2];if(u[0]===9&&typeof t=="number"&&t===86){var i=u[1],f=i[2][1],o=e[1];u0(x,86),p(w2[3],f,x[3])&&ux(x,[0,o,[21,Ol0,f]]);var a=x[31],d=x[30],k=x[29],T=x[28],g=x[27],A=x[26],N=x[25],R=x[24],O=x[23],M=x[22],L=x[21],z=x[20],V=x[19],Z=x[18],$=x[17],i0=x[16],U=x[15],J=x[14],Y=x[13],F=x[12],n0=x[11],Q=x[10],f0=x[9],s0=x[8],v0=x[7],o0=x[6],c0=x[5],T0=x[4],E0=p(w2[4],f,x[3]),M0=[0,x[1],x[2],E0,T0,c0,o0,v0,s0,f0,Q,n0,F,Y,J,U,i0,$,Z,V,z,L,M,O,R,N,A,g,T,k,d,a],Y0=zo(M0)?xK(M0):l(px[2],M0);return[30,[0,i,Y0,y0([0,r],0,0)]]}var rx=t2(Il0,0,x);if(rx[0]===0)var t0=e,ex=rx[1];else var g0=rx[1][2],H0=0,t0=p(g0,e,function(xx,ax){return p(bx(xx,dn,78),xx,ax)}),ex=H0;return[22,[0,t0,0,y0(0,[0,ex],0)]]},JE0=0,VE0=function(x){var r=l(px[7],x),e=t2(Rl0,0,x);if(e[0]===0)var i=r,f=e[1];else var t=e[1][2],u=0,i=p(t,r,function(N,R){return p(bx(N,dn,79),N,R)}),f=u;if(x[20]){var o=i[2];if(o[0]===13){var a=o[1][2],d=0;if(1i)switch(i-53|0){case 0:return l0([0,u],function(a){1-_1(a)&&zx(a,To);var d=l0(0,l(A6,0),a),k=[0,d[1],[29,d[2]]];return[21,[0,[0,k],0,0,0,y0([0,t],0,0)]]},e);case 8:if(pr(1,e)!==0)return l0([0,u],function(a){1-_1(a)&&zx(a,To);var d=pr(1,a);if(typeof d=="number"){if(d===48)return zx(a,21),u0(a,61),[21,[0,0,0,0,0,y0([0,t],0,0)]];if(f2===d){u0(a,61);var k=gx(a);u0(a,f2);var T=l(p3,a),g=T[1];return[21,[0,0,[0,[1,[0,k,0]]],[0,g],0,y0([0,t],[0,T[2]],0)]]}}var A=l0(0,l(E6,0),a),N=[0,A[1],[35,A[2]]];return[21,[0,[0,N],0,0,0,y0([0,t],0,0)]]},e);break;case 9:return l0([0,u],function(a){var d=l0(0,function(T){return l(p(g6,0,0),T)},a),k=[0,d[1],[36,d[2]]];return[21,[0,[0,k],0,0,0,y0([0,t],0,0)]]},e)}}else if(i===36)return l0([0,u],function(a){var d=Fx(t,_0(a)),k=l0(0,function(V){return u0(V,36)},a)[1],T=wV(1,a);if(zo(T))var g=0,A=[0,T6(T)];else if(v6(T))var g=0,A=[0,I9(T,x)];else if(K(T)===48)var g=0,A=[0,l(Az(0),T)];else if(mI(T))var g=0,A=[0,ZI(T)];else{var N=l(px[10],T),R=t2(0,0,T);if(R[0]===0)var L=R[1],z=N;else var O=R[1][2],M=0,L=M,z=p(O,N,function($,i0){return p(bx($,dn,97),$,i0)});var g=L,A=[1,z]}return[20,[0,k,A,y0([0,d],[0,g],0)]]},e)}if(v6(e))return l0([0,u],function(a){var d=I9(a,x);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(zo(e))return l0([0,u],function(a){l(r9(a),x);var d=T6(a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(typeof i=="number"){var f=i+TT|0;if(4>>0){if(f===24&&e[28][2])return l0([0,u],function(a){var d=p(px[3],[0,x],a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e)}else if(1>>0)return l0([0,u],function(a){var d=p(px[3],[0,x],a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e)}if(mI(e))return l0([0,u],function(a){var d=ZI(a);return[21,[0,[0,d],0,0,1,y0([0,t],0,0)]]},e);if(typeof i=="number"&&f2===i)return l0([0,u],function(a){var d=gx(a);u0(a,f2);var k=K(a),T=0;if(typeof k!="number"&&k[0]===4&&!P(k[3],vn)){Z0(a);var g=[0,T2(a)];T=1}if(!T)var g=0;var A=l(p3,a),N=A[1];return[21,[0,0,[0,[1,[0,d,g]]],[0,N],1,y0([0,t],[0,A[2]],0)]]},e);var o=v1(e,61)?0:1;return v1(e,0)?l0([0,u],function(a){var d=G0(U9,0,a,0);u0(a,1);var k=K(a),T=0;if(typeof k!="number"&&k[0]===4&&!P(k[3],vl)){var g=l(p3,a),A=g[2],N=[0,g[1]];T=1}if(!T){p(gL,a,d);var R=t2(0,0,a),O=R[0]===0?R[1]:R[1][1],A=O,N=0}return[21,[0,0,[0,[0,d]],N,o,y0([0,t],[0,A],0)]]},e):(g1(fl0,e),p(px[3],[0,x],e))}),O0(AL,function(x){var r=x?x[1]:0;function e(u){1-_1(u)&&zx(u,sn);var i=_0(u);u0(u,60);var f=_V(1,Gs(1,u)),o=Fx(i,_0(f));u0(f,49);var a=K(f);if(typeof a=="number")switch(a){case 36:var d=Fx(o,_0(f)),k=l0(0,function(A0){return u0(A0,36)},f)[1],T=wV(1,f),g=K(T),A=0;if(typeof g=="number")switch(g){case 15:var N=0,R=N,O=[0,[1,l0(0,function(A0){return p(j9,0,A0)},T)]];A=1;break;case 40:var R=0,O=[0,[2,l0(0,l(M9,0),T)]];A=1;break}else if(g[0]===4&&!P(g[3],_o)&&T[28][1]){var R=0,O=[0,[3,l0(0,l(D9,0),T)]];A=1}if(!A){var M=to(T),L=t2(0,0,T);if(L[0]===0)var Z=L[1],$=M;else var z=L[1][2],V=0,Z=V,$=p(z,M,function(Q0,H){return p(bx(Q0,ga,98),Q0,H)});var R=Z,O=[0,[4,$]]}return[9,[0,[0,k],O,0,0,y0([0,d],[0,R],0)]];case 48:if(f[28][2]){var i0=bz[1],U=l0(0,function(A0){return p(i0,0,A0)},f);return[9,[0,0,[0,[8,U]],0,0,y0([0,o],0,0)]]}break;case 53:if(r){var J=l0(0,l(A6,0),f);return[9,[0,0,[0,[7,J]],0,0,y0([0,o],0,0)]]}break;case 61:if(r){var Y=l0(0,l(E6,0),f);return[9,[0,0,[0,[5,Y]],0,0,y0([0,o],0,0)]]}break;case 62:var F=l0(0,p(g6,ul0,0),f);return[9,[0,0,[0,[6,F]],0,0,y0([0,o],0,0)]];case 106:var n0=gx(f);u0(f,f2);var Q=K(f),f0=0;if(typeof Q!="number"&&Q[0]===4&&!P(Q[3],vn)){Z0(f);var s0=[0,p(px[13],0,f)];f0=1}if(!f0)var s0=0;var v0=l(p3,f),o0=v0[1];return[9,[0,0,0,[0,[1,[0,n0,s0]]],[0,o0],y0([0,o],[0,v0[2]],0)]];case 15:case 24:case 27:case 28:case 40:var c0=K(f);if(typeof c0=="number"){var T0=0;if(24<=c0){if(41>c0){var E0=0;switch(c0+TT|0){case 0:var M0=[0,[0,l0(0,function(A0){return G0(P6,0,A0,0)},f)]];break;case 3:var M0=[0,[0,l0(0,function(A0){return G0(P6,2,A0,0)},f)]];break;case 4:var M0=[0,[0,l0(0,function(A0){return G0(P6,1,A0,0)},f)]];break;case 16:var M0=[0,[2,l0(0,l(M9,0),f)]];break;default:E0=1}if(!E0){var Y0=M0;T0=1}}}else if(c0===15){var Y0=[0,[1,l0(0,function(U0){return p(j9,0,U0)},f)]];T0=1}if(T0)return[9,[0,0,Y0,0,0,y0([0,o],0,0)]]}throw q0([0,wr,il0],1)}else if(a[0]===4&&!P(a[3],_o)&&f[28][1]){var rx=[0,[3,l0(0,l(D9,0),f)]];return[9,[0,0,rx,0,0,y0([0,o],0,0)]]}var g0=K(f),H0=0;typeof g0=="number"?g0===53?zx(f,15):g0===61?zx(f,16):H0=1:H0=1,u0(f,0);var t0=G0(U9,0,f,0);u0(f,1);var ex=K(f),xx=0;if(typeof ex!="number"&&ex[0]===4&&!P(ex[3],vl)){var ax=l(p3,f),dx=ax[2],mx=[0,ax[1]];xx=1}if(!xx){p(gL,f,t0);var L0=t2(0,0,f),C0=L0[0]===0?L0[1]:L0[1][1],dx=C0,mx=0}return[9,[0,0,0,[0,[0,t0]],mx,y0([0,o],[0,dx],0)]]}var t=0;return function(u){return l0(t,e,u)}});var AK=function x(r,e){return x.fun(r,e)},PK=function x(r,e){return x.fun(r,e)},O6=function x(r,e){return x.fun(r,e)},X9=function(x,r){return function(e){if(!e)return Ax(r);var t=e[1];if(t[0]!==0){var u=t[1],i=u[1];if(e[2]){var f=e[2];return ux(x,[0,i,69]),l(X9(x,r),f)}var o=u[2],a=o[2];return l(X9(x,[0,[1,[0,i,[0,p(O6,x,o[1]),a]]],r]),0)}var d=t[1],k=d[2],T=e[2],g=d[1];switch(k[0]){case 0:var A=k[2],N=k[1],R=k[3];switch(N[0]){case 0:var O=[0,N[1]];break;case 1:var O=[1,N[1]];break;case 2:var O=[2,N[1]];break;case 3:var O=[3,N[1]];break;case 4:var O=Nx(Kl0);break;default:var O=[4,N[1]]}var M=A[2],L=0;if(M[0]===3){var z=M[1];if(!z[1]){var V=[0,z[3]],Z=z[2];L=1}}if(!L)var V=0,Z=p(O6,x,A);var $=[0,[0,[0,g,[0,O,Z,V,R]]],r];break;case 1:ux(x,[0,k[2][1],55]);var $=r;break;default:ux(x,[0,k[2][1],Zl0]);var $=r}return l(X9(x,$),T)}};O0(AK,function(x,r){var e=r[2],t=e[2],u=e[1],i=r[1],f=c3(x);return[0,i,[0,[0,l(X9(x,0),u),f,t]]]});var CK=function(x,r){var e=r[1];return l(px[23],r)?[0,p(O6,x,r)]:(ux(x,[0,e,41]),0)},d3=function(x,r){return function(e){if(!e)return Ax(r);var t=e[1];switch(t[0]){case 0:var u=t[1],i=u[2];if(i[0]===3){var f=i[1];if(!f[1]){var o=e[2];return l(d3(x,[0,[0,[0,u[1],[0,f[2],[0,f[3]]]]],r]),o)}}var a=e[2],d=CK(x,u);if(d)var k=d[1],T=[0,[0,[0,k[1],[0,k,0]]],r];else var T=r;return l(d3(x,T),a);case 1:var g=t[1],A=g[1];if(e[2]){var N=e[2];return ux(x,[0,A,20]),l(d3(x,r),N)}var R=g[2],O=R[2],M=CK(x,R[1]),L=M?[0,[1,[0,A,[0,M[1],O]]],r]:r;return l(d3(x,L),0);default:var z=e[2];return l(d3(x,[0,[2,t[1]],r]),z)}}};O0(PK,function(x,r){var e=r[2],t=e[2],u=e[1],i=r[1],f=c3(x);return[0,i,[1,[0,l(d3(x,0),u),f,t]]]}),O0(O6,function(x,r){var e=r[2],t=r[1];switch(e[0]){case 0:return p(PK,x,[0,t,e[1]]);case 9:var u=e[1],i=u[2][1],f=u[1],o=0;if(x[5]&&$v(i)?ux(x,[0,f,76]):o=1,o&&1-x[5]){var a=0;if(x[18]&&Ar(i,B2)?ux(x,[0,f,Ri]):a=1,a){var d=x[19],k=d&&Ar(i,Pv);k&&ux(x,[0,f,6])}}return[0,t,[2,[0,u,c3(x),0]]];case 24:return p(AK,x,[0,t,e[1]]);default:return[0,t,[3,[0,t,e]]]}});var I6=function(x,r){var e=K(x);if(typeof e=="number"){if(e===6)return l0(0,function(i){var f=_0(i);u0(i,6);for(var o=0;;){var a=K(i);if(typeof a=="number"){var d=0;if(13<=a)Nr===a&&(d=1);else if(7<=a)switch(a-7|0){case 0:d=1;break;case 2:var k=gx(i);u0(i,9);var o=[0,[2,k],o];continue;case 5:var T=_0(i),g=l0(0,function(U){return u0(U,12),I6(U,r)},i),A=g[1],N=g[2],R=[1,[0,A,[0,N,y0([0,T],0,0)]]];K(i)!==7&&(ux(i,[0,A,20]),K(i)===9&&Z0(i));var o=[0,R,o];continue}if(d){var O=Ax(o),M=_0(i);u0(i,7);var L=K(i)===86?[1,qv(i)]:c3(i);return[1,[0,O,L,X1([0,f],[0,yx(i)],M,0)]]}}var z=l0(0,function(i0){var U=I6(i0,r),J=K(i0),Y=0;if(typeof J=="number"&&J===82){u0(i0,82);var F=[0,l(px[10],i0)];Y=1}if(!Y)var F=0;return[0,U,F]},i),V=z[2],Z=[0,[0,z[1],[0,V[1],V[2]]]];K(i)!==7&&u0(i,9);var o=[0,Z,o]}},x);if(!e){var t=function(i){var f=K(i);return typeof f=="number"&&f===82?(u0(i,82),[0,l(px[10],i)]):0};return l0(0,function(i){var f=_0(i);u0(i,0);for(var o=0,a=0,d=0;;){var k=K(i);if(typeof k=="number"){var T=0;if(k!==1&&Nr!==k&&(T=1),!T){a&&ux(i,[0,a[1],95]);var g=Ax(d),A=_0(i);u0(i,1);var N=yx(i),R=K(i)===86?[1,qv(i)]:c3(i);return[0,[0,g,R,X1([0,f],[0,N],A,0)]]}}if(K(i)===12)var O=_0(i),M=l0(0,function(mx){return u0(mx,12),I6(mx,r)},i),L=M[2],z=M[1],V=[0,[1,[0,z,[0,L,y0([0,O],0,0)]]]];else{var Z=gx(i),$=p(px[20],0,i),i0=K(i),U=0;if(typeof i0=="number"&&i0===86){u0(i,86);var J=l0([0,Z],function(L0){var C0=I6(L0,r);return[0,C0,t(L0)]},i),Y=J[2],F=$[2],n0=Y[2],Q=Y[1],f0=J[1];switch(F[0]){case 0:var s0=[0,F[1]];break;case 1:var s0=[1,F[1]];break;case 2:var s0=[2,F[1]];break;case 3:var s0=[3,F[1]];break;case 4:var s0=Nx(Vl0);break;default:var s0=[4,F[1]]}var V=[0,[0,[0,f0,[0,s0,Q,n0,0]]]]}else U=1;if(U){var v0=$[2];if(v0[0]===3){var o0=v0[1],c0=o0[2][1],T0=o0[1];by(c0)?ux(i,[0,T0,st]):u3(c0)&&dt(i,[0,T0,85]);var E0=l0([0,Z],function(L0,C0){return function(A0){var U0=[0,C0,[2,[0,L0,c3(A0),0]]];return[0,U0,t(A0)]}}(o0,T0),i),M0=E0[2],V=[0,[0,[0,E0[1],[0,[3,o0],M0[1],M0[2],1]]]]}else{g1(zl0,i);var V=0}}}if(V){var Y0=V[1],rx=Y0[1][1],g0=o?(ux(i,[0,rx,69]),0):a;if(Y0[0]===0)var t0=g0,ex=o;else var H0=K(i)===9?[0,gx(i)]:0,t0=H0,ex=1;K(i)!==1&&u0(i,9);var o=ex,a=t0,d=[0,Y0,d]}}},x)}}var u=G0(px[14],x,0,r);return[0,u[1],[2,u[2]]]},J9=function(x){var r=K(x);if(typeof r=="number"){var e=r+IB|0,t=0;if(6>>0?e===14&&(t=1):4>>0&&(t=1),t)return yx(x)}return K2(x)?Ko(x):0},NK=function(x){return K(x)===1?0:[0,l(px[7],x)]},uo=function(x){var r=gx(x),e=K(x),t=0;if(typeof e!="number"&&e[0]===8){var u=e[1];t=1}if(!t){g1(Gl0,x);var u=bl0}var i=_0(x);Z0(x);var f=K(x),o=0;if(typeof f=="number"){var a=f+XD|0,d=0;if(72>>0?a===76&&(d=1):70>>0&&(d=1),d){var k=yx(x);o=1}}if(!o)var k=J9(x);return[0,r,[0,u,y0([0,i],[0,k],0)]]},RK=function(x){var r=pr(1,x);if(typeof r=="number"){if(r===10)for(var e=l0(0,function(i){var f=[0,uo(i)];return u0(i,10),[0,f,uo(i)]},x);;){var t=K(x);if(typeof t=="number"&&t===10){var u=e[1],e=l0([0,u],function(f){return function(o){return u0(o,10),[0,[1,f],uo(o)]}}(e),x);continue}return[2,e]}if(r===86)return[1,l0(0,function(i){var f=uo(i);return u0(i,86),[0,f,uo(i)]},x)]}return[0,uo(x)]},L6=function(x,r){return Ar(x[2][1],r[2][1])},OK=function(x,r){var e=x[2],t=e[1],u=r[2],i=u[1],f=0,o=e[2],a=u[2];if(t[0]===0){var d=t[1];if(i[0]===0)var T=L6(d,i[1]);else f=1}else{var k=t[1];if(i[0]===0)f=1;else var T=OK(k,i[1])}if(f)var T=0;return T&&L6(o,a)},V9=function(x,r){switch(x[0]){case 0:var e=x[1];if(r[0]===0)return L6(e,r[1]);break;case 1:var t=x[1];if(r[0]===1){var u=t[2],i=r[1][2],f=u[2],o=i[2],a=L6(u[1],i[1]);return a&&L6(f,o)}break;default:var d=x[1];if(r[0]===2)return OK(d,r[1])}return 0},RL=function(x){switch(x[0]){case 0:return x[1][1];case 1:return x[1][1];default:return x[1][1]}},IK=function x(r,e){return x.fun(r,e)},OL=function x(r,e){return x.fun(r,e)},IL=function x(r,e){return x.fun(r,e)};O0(IK,function(x,r){var e=K(r);if(typeof e=="number"){if(e===0){J1(r,0);var t=l0(0,function(g){u0(g,0);var A=K(g),N=0;if(typeof A=="number"&&A===12){var R=_0(g);u0(g,12);var O=l(px[10],g),z=[3,[0,O,y0([0,R],0,0)]];N=1}if(!N)var M=NK(g),L=M?0:_0(g),z=[2,[0,M,X1(0,0,L,0)]];return u0(g,1),z},r),u=t[2],i=t[1];return W1(r),[0,i,u]}}else if(e[0]===9){var f=e[3],o=e[2],a=e[1];return u0(r,e),[0,a,[4,[0,o,f]]]}var d=p(IL,x,r),k=d[2],T=d[1];return un<=k[1]?[0,T,[1,k[2]]]:[0,T,[0,k[2]]]});var z9=function(x){switch(x[0]){case 0:return x[1][2][1];case 1:var r=x[1][2],e=r[1],t=Qx(Wl0,r[2][2][1]);return Qx(e[2][1],t);default:var u=x[1][2],i=u[1],f=u[2],o=i[0]===0?i[1][2][1]:z9([2,i[1]]);return Qx(o,Qx($l0,f[2][1]))}};O0(OL,function(x,r){var e=_0(r),t=l0(0,function(Cr){u0(Cr,98);var n2=K(Cr);if(typeof n2=="number"){if(n2===99)return Z0(Cr),Fl0}else if(n2[0]===8){var w=RK(Cr),x0=0;if(_1(Cr)&&K(Cr)===98&&ft!==pr(1,Cr)){var e0=t9(Cr,0,A9);x0=1}if(!x0)var e0=0;for(var S0=0;;){var G=K(Cr);if(typeof G=="number"){if(G===0){var k0=_0(Cr);J1(Cr,0);var J0=l0(0,function($x){u0($x,0),u0($x,12);var nr=l(px[10],$x);return u0($x,1),nr},Cr),I0=J0[2],ix=J0[1];W1(Cr);var S0=[0,[1,[0,ix,[0,I0,y0([0,k0],[0,J9(Cr)],0)]]],S0];continue}}else if(G[0]===8){var S0=[0,[0,l0(0,function($x){var nr=pr(1,$x),Zx=0;if(typeof nr=="number"&&nr===86){var Lr=[1,l0(0,function(me){var Pn=uo(me);return u0(me,86),[0,Pn,uo(me)]},$x)];Zx=1}if(!Zx)var Lr=[0,uo($x)];var Yx=K($x),ue=0;if(typeof Yx=="number"&&Yx===82){u0($x,82);var Qt=_0($x),S2=K($x),Ze=0;if(typeof S2=="number")if(S2===0){var fo=_0($x);J1($x,0);var gn=l0(0,function(me){u0(me,0);var Pn=NK(me);return u0(me,1),Pn},$x),ds=gn[1],ye=gn[2];W1($x);var An=[0,ye,X1([0,fo],[0,J9($x)],0,0)];An[1]||ux($x,[0,ds,52]);var Ft=[0,[1,[0,ds,An]]]}else Ze=1;else if(S2[0]===10){var We=S2[3],Ht=S2[2],dr=S2[1];u0($x,S2);var Ft=[0,[0,[0,dr,[0,Ht,We,y0([0,Qt],[0,J9($x)],0)]]]]}else Ze=1;if(Ze){zx($x,40);var Ft=[0,[0,[0,gx($x),ql0]]]}var yt=Ft;ue=1}if(!ue)var yt=0;return[0,Lr,yt]},Cr)],S0];continue}var Wx=Ax(S0),Bx=[0,wo,[0,w,e0,v1(Cr,ft),Wx]];return v1(Cr,99)?[0,Bx]:(xo(Cr,99),[1,Bx])}}return xo(Cr,99),Hl0},r);W1(r);var u=t[2];if(u[0]===0)var i=u[1],f=typeof i=="number"?0:i[2][3];else var f=1;if(f)var o=BA,a=o,d=l0(0,function(Cr){return 0},r);else{J1(r,3);for(var k=t[2][1],T=typeof k=="number"?0:[0,k[2][1]],g=gx(r),A=0;;){var N=n3(r),R=0;if(A&&T){var O=A[1],M=O[2],L=0,z=T[1],V=A[2];if(M[0]===0){var Z=M[1],$=Z[2];if($)var i0=$[1][2][1],U=1-V9(Z[1][2][1],i0),J=U&&V9(z,i0);else L=1}else L=1;if(L)var J=0;if(J){var Y=O[2],F=0;if(Y[0]===0){var n0=Y[1],Q=n0[2];if(Q){var f0=Q[1],s0=Hr(O[1],n0[3][1]),v0=[0,wo,f0],o0=[0,s0,[0,[0,n0[1],0,n0[3],n0[4]]]];F=1}}if(!F)var v0=BA,o0=O;W1(r);var c0=[0,Ax([0,o0,V]),N,v0];R=1}}if(!R){var T0=K(r),E0=0;if(typeof T0=="number"){if(T0===98){J1(r,2);var M0=K(r),Y0=pr(1,r),rx=0;if(typeof M0=="number"&&M0===98&&typeof Y0=="number"){var g0=0;if((ft===Y0||Nr===Y0)&&(g0=1),g0){var H0=l0(0,function(x0){u0(x0,98),u0(x0,ft);var e0=K(x0);if(typeof e0=="number"){if(e0===99)return Z0(x0),un}else if(e0[0]===8){var S0=RK(x0);return e9(x0,99),[0,wo,[0,S0]]}return xo(x0,99),un},r),t0=H0[2],ex=H0[1],xx=typeof t0=="number"?[0,un,ex]:[0,wo,[0,ex,t0[2]]],ax=r[24][1],dx=0;if(ax){var mx=ax[2];if(mx){var L0=mx[2];dx=1}}if(!dx)var L0=Nx(Ts0);r[24][1]=L0;var C0=t3(r),A0=u6(r[25][1],C0);r[26][1]=A0;var c0=[0,Ax(A),N,xx];E0=1,rx=1}}if(!rx){var U0=p(OL,T,r),Q0=U0[2],H=U0[1],b=un<=Q0[1]?[0,H,[1,Q0[2]]]:[0,H,[0,Q0[2]]],A=[0,b,A];continue}}else if(Nr===T0){g1(0,r);var c0=[0,Ax(A),N,BA];E0=1}}if(!E0){var A=[0,p(IK,T,r),A];continue}}var B=c0[3],a0=c0[1],m0=N?N[1]:g,a=B,d=[0,Hr(g,m0),a0];break}}var P0=yx(r),D=0;if(typeof a!="number"){var N0=a[1],X0=0;if(wo===N0){var D0=a[2],ox=D0[2][1],b0=t[2],kx=D0[1];if(b0[0]===0){var V0=b0[1];if(typeof V0=="number")ux(r,[0,RL(ox),Ql0]);else{var h=V0[2][1];if(1-V9(ox,h)){var X=0;if(x&&V9(x[1],ox)){var W0=[19,z9(h)];ux(r,[0,RL(h),W0]),X=1}if(!X){var sx=[13,z9(h)];ux(r,[0,RL(ox),sx])}}}}var tx=kx;X0=1}else if(un===N0){var j0=a[2],Px=t[2];if(Px[0]===0){var Ex=Px[1];typeof Ex!="number"&&ux(r,[0,j0,[13,z9(Ex[2][1])]])}var tx=j0;X0=1}if(X0){var Ix=tx;D=1}}if(!D)var Ix=t[1];var qx=t[2][1],B0=t[1];if(typeof qx=="number"){var tr=0,Ux=y0([0,e],[0,P0],0);if(typeof a!="number"){var K0=a[1],ur=0;if(wo===K0){var z0=a[2][1];ur=1}else if(un===K0){var z0=a[2];ur=1}if(ur){var or=z0;tr=1}}if(!tr)var or=Ix;var Ur=[0,un,[0,B0,or,d,Ux]]}else{var lx=qx[2],a1=0,z1=y0([0,e],[0,P0],0);if(typeof a!="number"&&wo===a[1]){var w1=[0,a[2]];a1=1}if(!a1)var w1=0;var Ur=[0,wo,[0,[0,B0,lx],w1,d,z1]]}return[0,Hr(t[1],Ix),Ur]}),O0(IL,function(x,r){return J1(r,2),p(OL,x,r)});var LK=function(x,r){var e=T2(r);return u9(x,r,e),e},MK=function x(r){return x.fun(r)},LL=function x(r,e,t){return x.fun(r,e,t)},ML=function x(r){return x.fun(r)},DK=function x(r,e){return x.fun(r,e)},DL=function x(r,e){return x.fun(r,e)},jL=function x(r,e){return x.fun(r,e)},K9=function x(r,e){return x.fun(r,e)},M6=function x(r,e){return x.fun(r,e)},Z9=function x(r){return x.fun(r)},jK=function x(r){return x.fun(r)},UK=function x(r){return x.fun(r)},BK=function x(r,e,t){return x.fun(r,e,t)},YK=function x(r){return x.fun(r)},XK=function x(r){return x.fun(r)},$E0=l(IL,0);O0(MK,function(x){var r=K(x),e=0;if(typeof r!="number"&&r[0]===6){var t=r[2],u=r[1];Z0(x);var i=[0,[0,u,t]];e=1}if(!e)var i=0;var f=_0(x),o=Ax(f),a=5;x:for(;;){if(o)for(var d=o[2],k=o[1],T=k[2],g=k[1],A=T[2],N=0,R=Xx(A);;){if(R<(N+5|0))var O=0;else{var M=Ar(m2(A,N,a),"@flow");if(!M){var N=N+1|0;continue}var O=M}if(!O){var o=d;continue x}x[31][1]=g[3];var L=Ax([0,[0,g,T],d]);break}else var L=0;if(L===0){var z=0;if(f){var V=f[1],Z=V[2];if(!Z[1]){var $=Z[2],i0=0,U=V[1];if(1<=Xx($)&&O1($,0)===42){x[31][1]=U[3];var J=[0,V,0];z=1}else i0=1}}if(!z)var J=0}else var J=L;var Y=p(DK,x,function(v0){return 0}),F=gx(x);u0(x,Nr);var n0=w2[1];if(x2(function(v0,o0){var c0=o0[2];switch(c0[0]){case 20:return y6(x,v0,wn(0,[0,c0[1][1],i60]));case 21:var T0=c0[1],E0=T0[1];if(E0){if(!T0[2]){var M0=E0[1],Y0=M0[2],rx=0,g0=M0[1];switch(Y0[0]){case 37:var H0=Y0[1][1],t0=0,ex=x2(function(C0,A0){return x2(SI,C0,[0,A0[2][1],0])},t0,H0);return x2(function(C0,A0){return y6(x,C0,A0)},v0,ex);case 2:case 26:var xx=Y0[1][1];if(xx)var ax=xx[1];else rx=1;break;case 3:case 19:case 29:case 35:case 36:var ax=Y0[1][1];break;default:rx=1}return rx?v0:y6(x,v0,wn(0,[0,g0,ax[2][1]]))}}else{var dx=T0[2];if(dx){var mx=dx[1];if(mx[0]!==0)return v0;var L0=mx[1];return x2(function(C0,A0){var U0=A0[2],Q0=U0[2],H=U0[1];return Q0?y6(x,C0,Q0[1]):y6(x,C0,H)},v0,L0)}}return v0;default:return v0}},n0,Y),Y)var Q=Bl(Ax(Y))[1],f0=Hr(Bl(Y)[1],Q);else var f0=F;var s0=Ax(x[2][1]);return[0,f0,[0,Y,i,y0([0,J],0,0),s0]]}});var QE0=function(x,r,e,t){for(var u=x,i=t;;){var f=i[3],o=i[2],a=i[1],d=K(u);if(typeof d=="number"&&Nr===d)return[0,u,a,o,f];if(l(r,d))return[0,u,a,o,f];if(typeof d!="number"&&d[0]===2){var k=l(e,u),T=[0,k,o],g=k[2];if(g[0]===22){var A=g[1][2];if(A){var N=Ar(A[1],"use strict"),R=k[1],O=N&&1-u[21];O&&ux(u,[0,R,84]);var M=N?Gs(1,u):u,L=[0,d,a],z=f||N,u=M,i=[0,L,T,z];continue}}return[0,u,a,T,f]}return[0,u,a,o,f]}};O0(LL,function(x,r,e){var t=QE0(hV(1,x),r,e,t60),u=t[4],i=t[3],f=t[2],o=hV(0,t[1]),a=Ax(f);return P2(function(d){if(typeof d!="number"&&d[0]===2){var k=d[1],T=k[4],g=k[1];return T&&dt(o,[0,g,81])}return Nx(Qx(u60,Qx(UJ(d),n60)))},a),[0,o,i,u]}),O0(ML,function(x){var r=yL(x),e=K(x);if(typeof e=="number"){var t=e-49|0;if(11>=t>>>0)switch(t){case 0:return p(hK,r,x);case 1:l(r9(x),r);var u=pr(1,x),i=0;if(typeof u=="number"){var f=0;if((u===4||u===10)&&(f=1),f){var o=N6(x);i=1}}if(!i)var o=NL(x);return o;case 11:if(pr(1,x)===49)return l(r9(x),r),p(AL,0,x);break}}return p(M6,[0,r],x)}),O0(DK,function(x,r){var e=G0(LL,x,r,ML),t=e[2],u=p(DL,r,e[1]);return x2(function(i,f){return[0,f,i]},u,t)}),O0(DL,function(x,r){for(var e=0;;){var t=K(r);if(typeof t=="number"&&Nr===t||l(x,t))return Ax(e);var e=[0,l(ML,r),e]}}),O0(jL,function(x,r){var e=G0(LL,r,x,function(f){return p(M6,0,f)}),t=e[3],u=e[2],i=p(K9,x,e[1]);return[0,x2(function(f,o){return[0,o,f]},i,u),t]}),O0(K9,function(x,r){for(var e=0;;){var t=K(r);if(typeof t=="number"&&Nr===t||l(x,t))return Ax(e);var e=[0,p(M6,0,r),e]}}),O0(M6,function(x,r){var e=x?x[1]:0;1-v6(r)&&l(r9(r),e);var t=K(r);if(typeof t=="number"){if(t===27)return l0(DE0,ME0,r);if(t===28)return l0(UE0,jE0,r)}if(zo(r))return T6(r);if(v6(r))return I9(r,e);if(typeof t=="number"){var u=t+K1|0;if(14>=u>>>0)switch(u){case 0:if(r[28][2])return l(Az(0),r);break;case 5:return l(vK,r);case 12:return p(EL,0,r);case 13:return l(fK,r);case 14:return l(sK,r)}}return mI(r)?ZI(r):l(Z9,r)}),O0(Z9,function(x){var r=K(x);if(typeof r=="number"&&ct>r)switch(r){case 0:return l(uK,x);case 8:return l(rK,x);case 16:return TK(x);case 19:return l0(gE0,EE0,x);case 20:return l0(PE0,AE0,x);case 22:return l0(NE0,CE0,x);case 23:return l0(OE0,RE0,x);case 24:return l0(LE0,IE0,x);case 25:return l0(YE0,BE0,x);case 26:return l(nK,x);case 32:return l(eK,x);case 35:return l(tK,x);case 37:return l0(kE0,mE0,x);case 39:return l0(_E0,hE0,x);case 43:return TK(x);case 59:return l0(yE0,dE0,x);case 113:return g1(x60,x),[0,gx(x),r60];case 1:case 5:case 7:case 9:case 10:case 11:case 12:case 17:case 18:case 33:case 34:case 36:case 38:case 41:case 42:case 49:case 83:case 86:return g1(e60,x),Z0(x),l(Z9,x)}if(zo(x)){var e=T6(x);return Qv(x,e[1]),e}if(typeof r=="number"&&r===28&&pr(1,x)===6){var t=s6(1,x);return ux(x,[0,Hr(gx(x),t),4]),N6(x)}return vs(x)?l0(JE0,XE0,x):(v6(x)&&(g1(0,x),Z0(x)),N6(x))}),O0(jK,function(x){var r=gx(x),e=l($t,x),t=K(x);return typeof t=="number"&&t===9?G0(N9,x,r,[0,e,0]):e}),O0(UK,function(x){var r=gx(x),e=l(l3,x),t=K(x);return typeof t=="number"&&t===9?[0,G0(N9,x,r,[0,v2(x,e),0])]:e}),O0(BK,function(x,r,e){var t=r?r[1]:0;return l0(0,function(u){var i=1-t,f=LK([0,e],u),o=i&&(K(u)===85?1:0);return o&&(1-_1(u)&&zx(u,b2),u0(u,85)),[0,f,BI(u),o]},x)}),O0(YK,function(x){var r=gx(x),e=_0(x);u0(x,0);var t=p(K9,function(o){return o===1?1:0},x),u=gx(x),i=t===0?_0(x):0;u0(x,1);var f=[0,t,X1([0,e],[0,yx(x)],i,0)];return[0,Hr(r,u),f]}),O0(XK,function(x){function r(t){var u=_0(t);u0(t,0);var i=p(jL,function(A){return A===1?1:0},t),f=i[1],o=i[2],a=f===0?_0(t):0;u0(t,1);var d=K(t),k=0;if(!x){var T=0;if((typeof d!="number"||d!==1&&Nr!==d)&&(T=1),T)if(K2(t)){var g=Ko(t);k=1}else{var g=0;k=1}}if(!k)var g=yx(t);return[0,[0,f,X1([0,u],[0,g],a,0)],o]}var e=0;return function(t){return i9(e,r,t)}}),xJ(o60[1],px,[0,MK,Z9,M6,K9,jL,DL,jK,UK,Oz,$t,g9,sE0,LK,BK,YK,XK,$E0,I6,O6,$o,I9,pE0,rE0,P9,qv,C9]);var UL=[Gr,PT0,Js(0)],BL=[0,UL,[0]],FE0=my(AT0,function(x){var r=jO(x,gT0)[41],e=XO(x,0,0,ET0,$O,1)[1];return GX(x,r,function(t,u){return 0}),function(t,u){var i=ky(u,x);return l(e,i),JO(u,i,x)}}),HE0=Dv(BL)===Gr?BL:BL[1];eO(BE,HE0);var io=d0,O2=null,JK=void 0,qE0=function(x){throw x},W9=function(x){return x!==JK?1:0};io.String,io.RegExp,io.Object,io.Date,io.Math;var GE0=io.Array,bE0=io.Error,VK=function(x){return l(qE0,x)};io.JSON,CX(function(x){return x[1]===UL?[0,Bt(x[2].toString())]:0}),CX(function(x){return x instanceof GE0?0:[0,Bt(x.toString())]});var zK=[0,0],xg0=er,ps=function(x){return qZ(Jl(x))},V1=function(x){return HZ(Jl(x))},Rr=function(x,r){return V1(Ax(iy(x,r)))},Mx=function(x,r){return r?l(x,r[1]):O2},y3=function(x,r){return r[0]===0?O2:l(x,r[1])},KK=function(x){return ps([0,[0,ST0,x[1]],[0,[0,TT0,x[2]],0]])},ZK=function(x){var r=x[1],e=r?er(r[1][1]):O2,t=[0,[0,hT0,KK(x[3])],0];return ps([0,[0,wT0,e],[0,[0,_T0,KK(x[2])],t]])},A1=function(x){if(!x)return 0;var r=x[1],e=r[1];return y0([0,e],[0,Fx(r[3],r[2])],0)},D6=function(x,r,e){var t=r[e];return W9(t)?t|0:x},rg0=function(x,r){var e=Cl(r,JK)?{}:r,t=Bt(x),u=D6(Dl[5],e,NT0),i=D6(Dl[4],e,RT0),f=D6(Dl[3],e,OT0),o=D6(Dl[2],e,IT0),a=[0,D6(Dl[1],e,LT0),o,f,i,u,0,0],d=e[gD],k=W9(d),T=k&&d|0,g=e[rD],A=W9(g)?g|0:1,N=e.all_comments,R=W9(N)?N|0:1,O=[0,0],M=T?[0,function(po){return O[1]=[0,po,O[1]],0}]:0,L=CT0[1],z=0;try{var V=0,Z=pJ(t),$=V,i0=Z}catch(po){var U=I1(po);if(U!==Io)throw q0(U,0);var J=[0,[0,[0,z,Ka[2],Ka[3]],54],0],$=J,i0=pJ(Rs0)}var Y=[0,z,i0,px0,0,a[4],LJ,dx0],F=[0,u6(Y,0)],n0=[0,[0,$],[0,0],w2[1],[0,0],a[5],0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,[0,Is0],[0,Y],F,[0,M],a,z,[0,0],[0,Os0]],Q=l(px[1],n0),f0=Ax(n0[1][1]),s0=[0,TI[1],0],v0=Ax(x2(function(po,ua){var q=po[2],C=po[1];return p(TI[3],ua,C)?[0,C,q]:[0,p(TI[4],ua,C),[0,ua,q]]},s0,f0)[2]);if(v0){var o0=v0[2],c0=v0[1];if(L)throw q0([0,hS0,c0,o0],1)}zK[1]=0;for(var T0=Xx(t)-0|0,E0=xs(t),M0=0,Y0=0;;){if(Y0===T0)var rx=M0;else{var g0=se(E0,Y0),H0=0;if(0<=g0&&!(Jr=g0){var t0=4;ax=1}if(!ax)var t0=0}}}if(t0===0){var M0=wI(M0,Y0,0),Y0=Y0+1|0;continue}if((T0-Y0|0)>=t0){var dx=t0-1|0,mx=Y0+t0|0;if(3>>0)throw q0([0,wr,tH],1);switch(dx){case 0:var L0=se(E0,Y0);break;case 1:var L0=(se(E0,Y0)&31)<<6|se(E0,Y0+1|0)&63;break;case 2:var L0=(se(E0,Y0)&15)<<12|(se(E0,Y0+1|0)&63)<<6|se(E0,Y0+2|0)&63;break;default:var L0=(se(E0,Y0)&7)<<18|(se(E0,Y0+1|0)&63)<<12|(se(E0,Y0+2|0)&63)<<6|se(E0,Y0+3|0)&63}var M0=wI(M0,Y0,[0,L0]),Y0=mx;continue}var rx=wI(M0,Y0,0)}for(var C0=Lv0,A0=Ax([0,6,rx]);;){var U0=C0[3],Q0=C0[2],H=C0[1];if(!A0){var b=Jl(Ax(U0));if(A)var a0=Q;else var B=l(FE0[1],0),a0=p(bx(B,-201766268,99),B,Q);if(R)var P0=a0;else var m0=a0[2],P0=[0,a0[1],[0,m0[1],m0[2],m0[3],0]];var D=function(q,C,j,h0){var R0=[0,c9(b,C[3]),0],nx=[0,[0,v60,V1([0,c9(b,C[2]),R0])],0],Sx=Fx(nx,[0,[0,a60,ZK(C)],0]);if(j){var Dx=j[1],jx=Dx[1];if(jx){var xr=Dx[2];if(xr)var hr=[0,[0,l60,ks(xr)],0],cr=[0,[0,p60,ks(jx)],hr];else var cr=[0,[0,d60,ks(jx)],0];var sr=cr}else var lr=Dx[2],kr=lr?[0,[0,y60,ks(lr)],0]:0,sr=kr;var Er=sr}else var Er=0;return ps(us(Fx(Sx,Fx(Er,[0,[0,m60,er(q)],0])),h0))},N0=function(q){return Rr(j0,q)},X0=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,Fm0,er(gn(C[2]))],0];return D(qm0,R0,j,[0,[0,Hm0,Rr(ds,h0)],nx])},D0=function(q){var C=q[2],j=C[5],h0=C[4],R0=C[2],nx=C[1],Sx=q[1],Dx=[0,[0,a90,Rr(I0,C[3])],0],jx=[0,[0,l90,We(0,h0)],Dx],xr=[0,[0,p90,Mx(a2,R0)],jx];return D(y90,Sx,j,[0,[0,d90,K0(nx)],xr])},ox=function(q,C){var j=C[2],h0=j[7],R0=j[5],nx=j[4],Sx=j[2],Dx=j[6],jx=j[3],xr=j[1],hr=C[1];if(nx)var cr=nx[1][2],lr=cr[2],kr=cr[1],sr=R2(cr[3],h0),Er=lr,$r=[0,kr];else var sr=h0,Er=0,$r=0;if(R0)var zr=R0[1][2],r1=zr[1],Or=R2(zr[2],sr),e1=Or,l1=Rr(S0,r1);else var e1=sr,l1=V1(0);var T1=[0,[0,Ed0,l1],[0,[0,Sd0,Rr(e0,Dx)],0]],p1=[0,[0,gd0,Mx(ke,Er)],T1],i1=[0,[0,Ad0,Mx(z0,$r)],p1],f1=[0,[0,Pd0,Mx(a2,jx)],i1],d1=Sx[2],P1=d1[2],$1=Sx[1],l2=[0,[0,Cd0,D(jd0,$1,P1,[0,[0,Dd0,Rr(G,d1[1])],0])],f1];return D(q,hr,e1,[0,[0,Nd0,Mx(K0,xr)],l2])},b0=function(q,C){var j=C[2],h0=j[5],R0=j[4],nx=j[3],Sx=j[2],Dx=j[1],jx=C[1],xr=q?dd0:yd0,hr=[0,[0,md0,Mx(dr,R0)],0],cr=[0,[0,kd0,Mx(dr,nx)],hr],lr=[0,[0,hd0,Mx(a2,Sx)],cr];return D(xr,jx,h0,[0,[0,_d0,K0(Dx)],lr])},kx=function(q){var C=q[2],j=C[4],h0=C[2],R0=C[1],nx=q[1],Sx=[0,[0,vd0,dr(C[3])],0],Dx=[0,[0,ad0,Mx(a2,h0)],Sx];return D(pd0,nx,j,[0,[0,ld0,K0(R0)],Dx])},V0=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,F50,J0(C[2])],0];return D(q50,R0,j,[0,[0,H50,K0(h0)],nx])},h=function(q){var C=q[2],j=C[3],h0=q[1],R0=C[5],nx=C[4],Sx=C[2],Dx=C[1],jx=R2(A1(j[2][3]),R0),xr=j[2],hr=xr[1],cr=xr[2],lr=[0,[0,L50,Mx(a2,Sx)],0],kr=[0,[0,M50,oo(nx)],lr],sr=[0,[0,D50,w1(hr)],kr],Er=[0,[0,j50,Mx(n2,cr)],sr],$r=[0,[0,U50,w1(hr)],Er];return D(Y50,h0,jx,[0,[0,B50,K0(Dx)],$r])},X=function(q){var C=q[2],j=C[6],h0=C[4],R0=C[7],nx=C[5],Sx=C[3],Dx=C[2],jx=C[1],xr=q[1],hr=V1(h0?[0,I0(h0[1]),0]:0),cr=j?Rr(S0,j[1][2][1]):V1(0),lr=[0,[0,C50,hr],[0,[0,P50,cr],[0,[0,A50,Rr(I0,nx)],0]]],kr=[0,[0,N50,We(0,Sx)],lr],sr=[0,[0,R50,Mx(a2,Dx)],kr];return D(I50,xr,R0,[0,[0,O50,K0(jx)],sr])},W0=function(q){var C=q[2],j=C[2],h0=C[1],R0=C[4],nx=C[3],Sx=q[1],Dx=Hr(h0[1],j[1]),jx=[0,[0,S50,Mx(lo,nx)],0];return D(g50,Sx,R0,[0,[0,E50,Ur(Dx,[0,h0,[1,j],0])],jx])},sx=function(q){var C=q[2],j=C[2],h0=C[1],R0=C[4],nx=C[3],Sx=q[1],Dx=Hr(h0[1],j[1]),jx=[0,[0,_50,er(gn(nx))],0];return D(T50,Sx,R0,[0,[0,w50,Ur(Dx,[0,h0,[1,j],0])],jx])},tx=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,k50,N0(C[1])],0];return D(h50,h0,A1(j),R0)},j0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return tx([0,j,C[1]]);case 1:var h0=C[1],R0=h0[2];return D(g60,j,R0,[0,[0,E60,Mx(K0,h0[1])],0]);case 2:return ox(wd0,[0,j,C[1]]);case 3:var nx=C[1],Sx=nx[3],Dx=nx[6],jx=nx[5],xr=nx[4],hr=nx[2],cr=nx[1],lr=R2(A1(Sx[2][3]),Dx),kr=[0,[0,ly0,Mx(a2,hr)],0],sr=[0,[0,py0,oo(xr)],kr],Er=Sx[2],$r=Er[2],zr=Er[1];if($r)var r1=$r[1],Or=r1[2],e1=Or[2],l1=r1[1],T1=D(_y0,l1,e1,[0,[0,hy0,ix(Or[1])],0]),p1=V1(Ax([0,T1,iy(k0,zr)]));else var p1=V1(_n(k0,zr));var i1=[0,[0,yy0,K0(cr)],[0,[0,dy0,p1],sr]];return D(ky0,j,lr,[0,[0,my0,tx(jx)],i1]);case 4:var f1=C[1],d1=f1[2];return D(P60,j,d1,[0,[0,A60,Mx(K0,f1[1])],0]);case 5:return D(C60,j,C[1][1],0);case 6:return X([0,j,C[1]]);case 7:return h([0,j,C[1]]);case 8:return V0([0,j,C[1]]);case 9:var P1=C[1],$1=P1[5],l2=P1[4],qr=P1[3],Kx=P1[2],Xr=P1[1];if(qr){var Mr=qr[1];if(Mr[0]!==0&&!Mr[1][2])return D(R60,j,$1,[0,[0,N60,Mx(B0,l2)],0])}if(Kx){var Dr=Kx[1];switch(Dr[0]){case 0:var Qr=sx(Dr[1]);break;case 1:var Qr=W0(Dr[1]);break;case 2:var Qr=X(Dr[1]);break;case 3:var Qr=h(Dr[1]);break;case 4:var Qr=dr(Dr[1]);break;case 5:var Qr=kx(Dr[1]);break;case 6:var Qr=b0(1,Dr[1]);break;case 7:var Qr=D0(Dr[1]);break;default:var Qr=V0(Dr[1])}var R1=Qr}else var R1=O2;var $e=[0,[0,O60,Mx(B0,l2)],0],Qe=[0,[0,L60,R1],[0,[0,I60,x0(qr)],$e]],Kr=Xr?1:0;return D(D60,j,$1,[0,[0,M60,!!Kr],Qe]);case 10:return W0([0,j,C[1]]);case 11:var u2=C[1],qt=u2[5],Fe=u2[4],j1=u2[2],Q1=u2[1],Z2=[0,[0,G50,Rr(I0,u2[3])],0],he=[0,[0,b50,We(0,Fe)],Z2],Gt=[0,[0,xd0,Mx(a2,j1)],he];return D(ed0,j,qt,[0,[0,rd0,K0(Q1)],Gt]);case 12:var _e=C[1],we=_e[1],kt=_e[4],Te=_e[3],W2=_e[2],Se=we[0]===0?K0(we[1]):B0(we[1]),$2=0,Ee=Te?"ES":"CommonJS";return D(Y60,j,kt,[0,[0,B60,Se],[0,[0,U60,tx(W2)],[0,[0,j60,Ee],$2]]]);case 13:var ht=C[1],_t=ht[2];return D(J60,j,_t,[0,[0,X60,Zx(ht[1])],0]);case 14:var E2=C[1],I2=E2[4],Q2=E2[2],Rn=E2[1],On=[0,[0,fd0,dr(E2[3])],0],bt=[0,[0,cd0,Mx(a2,Q2)],On];return D(od0,j,I2,[0,[0,sd0,K0(Rn)],bt]);case 15:return b0(1,[0,j,C[1]]);case 16:return sx([0,j,C[1]]);case 17:var wt=C[1],xn=wt[3],In=wt[1],ge=[0,[0,V60,z0(wt[2])],0];return D(K60,j,xn,[0,[0,z60,j0(In)],ge]);case 18:return D(Z60,j,C[1][1],0);case 19:var He=C[1],L2=He[3],Ln=He[1],Tt=[0,[0,s90,J0(He[2])],0];return D(v90,j,L2,[0,[0,o90,K0(Ln)],Tt]);case 20:var St=C[1],Et=St[2],hs=St[3],Mn=Et[0]===0?j0(Et[1]):z0(Et[1]);return D(Q60,j,hs,[0,[0,$60,Mn],[0,[0,W60,er(w(1))],0]]);case 21:var F2=C[1],qe=F2[5],Dn=F2[4],jn=F2[3],_s=F2[2],tv=F2[1];if(_s){var ia=_s[1];if(ia[0]!==0){var _3=ia[1][2],yo=[0,[0,F60,er(w(Dn))],0],mo=[0,[0,H60,Mx(K0,_3)],yo];return D(G60,j,qe,[0,[0,q60,Mx(B0,jn)],mo])}}var w3=[0,[0,b60,er(w(Dn))],0],T3=[0,[0,x40,Mx(B0,jn)],w3],S3=[0,[0,r40,x0(_s)],T3];return D(t40,j,qe,[0,[0,e40,Mx(j0,tv)],S3]);case 22:var ko=C[1],nv=ko[3],fa=ko[1],E3=[0,[0,n40,Mx(xg0,ko[2])],0];return D(i40,j,nv,[0,[0,u40,z0(fa)],E3]);case 23:var Un=C[1],g3=Un[5],Bn=Un[4],A3=Un[3],P3=Un[2],ca=Un[1],uv=function($6){return $6[0]===0?X0($6[1]):z0($6[1])},C3=[0,[0,f40,j0(Bn)],0],N3=[0,[0,c40,Mx(z0,A3)],C3],iv=[0,[0,s40,Mx(z0,P3)],N3];return D(v40,j,g3,[0,[0,o40,Mx(uv,ca)],iv]);case 24:var gt=C[1],ws=gt[1],sa=gt[5],oa=gt[4],R3=gt[3],rn=gt[2],Ae=ws[0]===0?X0(ws[1]):ix(ws[1]),Ts=[0,[0,l40,j0(R3)],[0,[0,a40,!!oa],0]];return D(y40,j,sa,[0,[0,d40,Ae],[0,[0,p40,z0(rn)],Ts]]);case 25:var Yn=C[1],en=Yn[1],Pe=Yn[5],ho=Yn[4],O3=Yn[3],I3=Yn[2],L3=en[0]===0?X0(en[1]):ix(en[1]),M3=[0,[0,k40,j0(O3)],[0,[0,m40,!!ho],0]];return D(w40,j,Pe,[0,[0,_40,L3],[0,[0,h40,z0(I3)],M3]]);case 26:var ie=C[1],fv=ie[3],D3=ie[2],b9=ie[9],YL=ie[8],XL=ie[7],JL=ie[6],VL=ie[5],zL=ie[4],KL=D3[2][4],ZL=ie[1],WL=fv[0]===0?fv[1]:Nx(I80),$L=R2(A1(KL),b9),QL=[0,[0,L80,Mx(a2,YL)],0],FL=[0,[0,D80,!1],[0,[0,M80,Lr(XL)],QL]],HL=[0,[0,B80,!!zL],[0,[0,U80,!!VL],[0,[0,j80,Mx(lo,JL)],FL]]],qL=[0,[0,Y80,tx(WL)],HL],GL=[0,[0,X80,Hx(D3)],qL];return D(V80,j,$L,[0,[0,J80,Mx(K0,ZL)],GL]);case 27:var j3=C[1],xm=j3[3],bL=j3[4],xM=j3[2],rM=j3[1];if(xm)var rm=xm[1][2],em=j0(DS0(rm[1],rm[2]));else var em=O2;var eM=[0,[0,S40,j0(xM)],[0,[0,T40,em],0]];return D(g40,j,bL,[0,[0,E40,z0(rM)],eM]);case 28:var va=C[1],tm=va[4],nm=va[3],tM=va[5],nM=va[2],uM=va[1];if(tm){var X6=tm[1];if(X6[0]===0)var iM=X6[1],im=_n(function(Q6){var B3=Q6[3],Y3=Q6[2],vm=Q6[1],NM=Y3?Hr(B3[1],Y3[1][1]):B3[1],RM=Y3?Y3[1]:B3,am=0,OM=0;if(vm){var F6=0;switch(vm[1]){case 0:var lm=fi;F6=1;break;case 1:var lm=Ps;F6=1;break}if(F6){var pm=lm;am=1}}if(!am)var pm=O2;var IM=[0,[0,eT0,K0(RM)],[0,[0,rT0,pm],OM]];return D(nT0,NM,0,[0,[0,tT0,K0(B3)],IM])},iM);else var um=X6[1],fM=um[1],im=[0,D(xT0,fM,0,[0,[0,bw0,K0(um[2])],0]),0];var J6=im}else var J6=0;if(nm)var fm=nm[1][1],cM=[0,[0,qw0,K0(fm)],0],cm=[0,D(Gw0,fm[1],0,cM),J6];else var cm=J6;switch(uM){case 0:var V6=A40;break;case 1:var V6=P40;break;default:var V6=C40}var sM=[0,[0,R40,B0(nM)],[0,[0,N40,er(V6)],0]];return D(I40,j,tM,[0,[0,O40,V1(cm)],sM]);case 29:return D0([0,j,C[1]]);case 30:var z6=C[1],oM=z6[3],vM=z6[1],aM=[0,[0,L40,j0(z6[2])],0];return D(D40,j,oM,[0,[0,M40,K0(vM)],aM]);case 31:var sm=C[1],lM=sm[2];return D(U40,j,lM,[0,[0,j40,Mx(z0,sm[1])],0]);case 32:var K6=C[1],pM=K6[3],dM=K6[1],yM=[0,[0,B40,Rr(a1,K6[2])],0];return D(X40,j,pM,[0,[0,Y40,z0(dM)],yM]);case 33:var om=C[1],mM=om[2];return D(V40,j,mM,[0,[0,J40,z0(om[1])],0]);case 34:var U3=C[1],kM=U3[4],hM=U3[2],_M=U3[1],wM=[0,[0,z40,Mx(tx,U3[3])],0],TM=[0,[0,K40,Mx(z1,hM)],wM];return D(W40,j,kM,[0,[0,Z40,tx(_M)],TM]);case 35:return kx([0,j,C[1]]);case 36:return b0(0,[0,j,C[1]]);case 37:return X0([0,j,C[1]]);case 38:var Z6=C[1],SM=Z6[3],EM=Z6[1],gM=[0,[0,$40,j0(Z6[2])],0];return D(F40,j,SM,[0,[0,Q40,z0(EM)],gM]);default:var W6=C[1],AM=W6[3],PM=W6[1],CM=[0,[0,H40,j0(W6[2])],0];return D(G40,j,AM,[0,[0,q40,z0(PM)],CM])}},Px=function(q){var C=q[2],j=C[4],h0=C[3][2],R0=C[1],nx=q[1],Sx=[0,[0,pw0,D(Aw0,C[2],0,0)],0],Dx=[0,[0,dw0,Rr(ms,h0)],Sx];return D(mw0,nx,j,[0,[0,yw0,D(Sw0,R0,0,0)],Dx])},Ex=function(q){var C=q[2],j=C[1],h0=C[4],R0=C[2],nx=q[1],Sx=[0,[0,ow0,Rr(ms,C[3][2])],0],Dx=[0,[0,vw0,Mx(xa,R0)],Sx],jx=j[2],xr=jx[2],hr=jx[4],cr=jx[3],lr=jx[1],kr=j[1],sr=xr?[0,[0,kw0,Cn(xr[1])],0]:0,Er=[0,[0,_w0,Rr(bv,hr)],[0,[0,hw0,!!cr],0]];return D(lw0,nx,h0,[0,[0,aw0,D(Tw0,kr,0,Fx([0,[0,ww0,ao(lr)],Er],sr))],Dx])},Ix=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,Dm0,Rr(z0,C[2])],0];return D(Um0,R0,j,[0,[0,jm0,Rr(fo,h0)],nx])},qx=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j?wm0:Tm0;return D(gm0,R0,h0,[0,[0,Em0,!!j],[0,[0,Sm0,er(nx)],0]])},B0=function(q){var C=q[2];return D(_m0,q[1],C[3],[0,[0,hm0,er(C[1])],[0,[0,km0,er(C[2])],0]])},tr=function(q){var C=q[2],j=C[2],h0=C[3],R0=q[1];return D(mm0,R0,h0,[0,[0,ym0,O2],[0,[0,dm0,er(m2(j,0,Xx(j)-1|0))],[0,[0,pm0,er(j)],0]]])},Ux=function(q){var C=q[2];return D(lm0,q[1],C[3],[0,[0,am0,C[1]],[0,[0,vm0,er(C[2])],0]])},K0=function(q){var C=q[2];return D(t50,q[1],C[2],[0,[0,e50,er(C[1])],[0,[0,r50,O2],[0,[0,x50,!1],0]]])},ur=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[9],nx=C[8],Sx=C[7],Dx=C[6],jx=C[5],xr=C[4],hr=h0[2][4],cr=C[1],lr=q[1],kr=j[0]===0?j[1]:Nx(z80),sr=R2(A1(hr),R0),Er=[0,[0,K80,Mx(a2,nx)],0],$r=[0,[0,W80,!1],[0,[0,Z80,Lr(Sx)],Er]],zr=[0,[0,F80,!!xr],[0,[0,Q80,!!jx],[0,[0,$80,Mx(lo,Dx)],$r]]],r1=[0,[0,H80,tx(kr)],zr],Or=[0,[0,q80,Hx(h0)],r1];return D(b80,lr,sr,[0,[0,G80,Mx(K0,cr)],Or])},z0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[2],nx=[0,[0,b40,Rr(Ze,h0[1])],0];return D(xp0,j,A1(R0),nx);case 1:var Sx=C[1],Dx=Sx[3],jx=Sx[2],xr=Sx[9],hr=Sx[8],cr=Sx[7],lr=Sx[6],kr=Sx[4],sr=jx[2][4];if(Dx[0]===0)var Er=0,$r=tx(Dx[1]);else var Er=1,$r=z0(Dx[1]);var zr=R2(A1(sr),xr),r1=[0,[0,rp0,Mx(a2,hr)],0],Or=[0,[0,tp0,!!Er],[0,[0,ep0,Lr(cr)],r1]],e1=[0,[0,fp0,$r],[0,[0,ip0,!!kr],[0,[0,up0,!1],[0,[0,np0,Mx(lo,lr)],Or]]]];return D(op0,j,zr,[0,[0,sp0,O2],[0,[0,cp0,Hx(jx)],e1]]);case 2:var l1=C[1],T1=l1[3],p1=l1[1],i1=[0,[0,vp0,dr(l1[2][2])],0];return D(lp0,j,T1,[0,[0,ap0,z0(p1)],i1]);case 3:var f1=C[1],d1=f1[1],P1=f1[4],$1=f1[3],l2=f1[2];if(d1){switch(d1[1]){case 0:var qr=lq;break;case 1:var qr=pq;break;case 2:var qr=dq;break;case 3:var qr=yq;break;case 4:var qr=mq;break;case 5:var qr=kq;break;case 6:var qr=hq;break;case 7:var qr=_q;break;case 8:var qr=wq;break;case 9:var qr=Tq;break;case 10:var qr=Sq;break;case 11:var qr=Eq;break;case 12:var qr=gq;break;case 13:var qr=Aq;break;default:var qr=Pq}var Kx=qr}else var Kx=pp0;var Xr=[0,[0,dp0,z0($1)],0];return D(kp0,j,P1,[0,[0,mp0,er(Kx)],[0,[0,yp0,ix(l2)],Xr]]);case 4:var Mr=C[1],Dr=Mr[4],Qr=Mr[2],R1=Mr[1],$e=[0,[0,hp0,z0(Mr[3])],0],Qe=[0,[0,_p0,z0(Qr)],$e];switch(R1){case 0:var Kr=ZH;break;case 1:var Kr=WH;break;case 2:var Kr=$H;break;case 3:var Kr=QH;break;case 4:var Kr=FH;break;case 5:var Kr=HH;break;case 6:var Kr=qH;break;case 7:var Kr=GH;break;case 8:var Kr=bH;break;case 9:var Kr=xq;break;case 10:var Kr=rq;break;case 11:var Kr=eq;break;case 12:var Kr=tq;break;case 13:var Kr=nq;break;case 14:var Kr=uq;break;case 15:var Kr=iq;break;case 16:var Kr=fq;break;case 17:var Kr=cq;break;case 18:var Kr=sq;break;case 19:var Kr=oq;break;case 20:var Kr=vq;break;default:var Kr=aq}return D(Tp0,j,Dr,[0,[0,wp0,er(Kr)],Qe]);case 5:var u2=C[1],qt=u2[4],Fe=R2(A1(u2[3][2][2]),qt);return D(Sp0,j,Fe,bo(u2));case 6:return ox(Td0,[0,j,C[1]]);case 7:var j1=C[1],Q1=j1[4],Z2=j1[2],he=j1[1],Gt=[0,[0,Ep0,z0(j1[3])],0],_e=[0,[0,gp0,z0(Z2)],Gt];return D(Pp0,j,Q1,[0,[0,Ap0,z0(he)],_e]);case 8:return ur([0,j,C[1]]);case 9:return K0(C[1]);case 10:var we=C[1],kt=we[2];return D(Np0,j,kt,[0,[0,Cp0,z0(we[1])],0]);case 11:return Ex([0,j,C[1]]);case 12:return Px([0,j,C[1]]);case 13:return B0([0,j,C[1]]);case 14:return qx([0,j,C[1]]);case 15:return D(Mm0,j,C[1],[0,[0,Lm0,O2],[0,[0,Im0,_v],0]]);case 16:return Ux([0,j,C[1]]);case 17:return tr([0,j,C[1]]);case 18:var Te=C[1],W2=Te[2],Se=Te[1],$2=Te[4],Ee=Te[3];try{var ht=new RegExp(er(Se),er(W2)),_t=ht}catch{var _t=O2}return D(Om0,j,$2,[0,[0,Rm0,_t],[0,[0,Nm0,er(Ee)],[0,[0,Cm0,ps([0,[0,Pm0,er(Se)],[0,[0,Am0,er(W2)],0]])],0]]]);case 19:var E2=C[1];return B0([0,j,[0,E2[1],E2[5],E2[6]]]);case 20:var I2=C[1],Q2=I2[4],Rn=I2[3],On=I2[2];switch(I2[1]){case 0:var bt=Rp0;break;case 1:var bt=Op0;break;default:var bt=Ip0}var wt=[0,[0,Lp0,z0(Rn)],0];return D(jp0,j,Q2,[0,[0,Dp0,er(bt)],[0,[0,Mp0,z0(On)],wt]]);case 21:var xn=C[1],In=xn[3];return D(Up0,j,In,xv(xn));case 22:var ge=C[1],He=ge[3],L2=ge[1],Ln=[0,[0,Bp0,K0(ge[2])],0];return D(Xp0,j,He,[0,[0,Yp0,K0(L2)],Ln]);case 23:var Tt=C[1],St=Tt[4],Et=Tt[3],hs=Tt[2],Mn=Tt[1];if(Et)var F2=Et[1],qe=R2(A1(F2[2][2]),St),Dn=qe,jn=lx(F2);else var Dn=St,jn=V1(0);var _s=[0,[0,Vp0,Mx(Cn,hs)],[0,[0,Jp0,jn],0]];return D(Kp0,j,Dn,[0,[0,zp0,z0(Mn)],_s]);case 24:var tv=C[1],ia=tv[2],_3=[0,[0,Zp0,Rr(Yx,tv[1])],0];return D(Wp0,j,A1(ia),_3);case 25:var yo=C[1],mo=yo[1],w3=yo[3],T3=mo[4],S3=R2(A1(mo[3][2][2]),T3);return D(Qp0,j,S3,Fx(bo(mo),[0,[0,$p0,!!w3],0]));case 26:var ko=C[1],nv=ko[1],fa=nv[3],E3=[0,[0,Fp0,!!ko[3]],0];return D(Hp0,j,fa,Fx(xv(nv),E3));case 27:var Un=C[1],g3=Un[2];return D(Gp0,j,g3,[0,[0,qp0,Rr(z0,Un[1])],0]);case 28:return D(bp0,j,C[1][1],0);case 29:var Bn=C[1],A3=Bn[3],P3=Bn[1],ca=[0,[0,zm0,Ix(Bn[2])],0];return D(Zm0,j,A3,[0,[0,Km0,z0(P3)],ca]);case 30:return Ix([0,j,C[1]]);case 31:return D(x80,j,C[1][1],0);case 32:var uv=C[1],C3=uv[3],N3=uv[1],iv=[0,[0,r80,Zx(uv[2])],0];return D(t80,j,C3,[0,[0,e80,z0(N3)],iv]);case 33:var gt=C[1],ws=gt[2],sa=gt[1];if(ws){var oa=gt[3],R3=[0,[0,n80,dr(ws[1])],0];return D(i80,j,oa,[0,[0,u80,z0(sa)],R3])}var rn=gt[3];return D(c80,j,rn,[0,[0,f80,z0(sa)],0]);case 34:var Ae=C[1],Ts=Ae[3],Yn=Ae[2],en=Ae[1];if(7<=en)return D(o80,j,Ts,[0,[0,s80,z0(Yn)],0]);switch(en){case 0:var Pe=v80;break;case 1:var Pe=a80;break;case 2:var Pe=l80;break;case 3:var Pe=p80;break;case 4:var Pe=d80;break;case 5:var Pe=y80;break;case 6:var Pe=m80;break;default:var Pe=Nx(k80)}return D(T80,j,Ts,[0,[0,w80,er(Pe)],[0,[0,_80,!0],[0,[0,h80,z0(Yn)],0]]]);case 35:var ho=C[1],O3=ho[4],I3=ho[3],L3=ho[2],M3=ho[1]?S80:E80;return D(C80,j,O3,[0,[0,P80,er(M3)],[0,[0,A80,z0(L3)],[0,[0,g80,!!I3],0]]]);default:var ie=C[1],fv=ie[2],D3=[0,[0,N80,!!ie[3]],0];return D(O80,j,fv,[0,[0,R80,Mx(z0,ie[1])],D3])}},or=function(q){var C=q[2];return D(f50,q[1],C[2],[0,[0,i50,er(C[1])],[0,[0,u50,O2],[0,[0,n50,!1],0]]])},Ur=function(q,C){var j=C[1][2],h0=j[2],R0=j[1],nx=[0,[0,c50,!!C[3]],0];return D(v50,q,h0,[0,[0,o50,er(R0)],[0,[0,s50,y3(Zx,C[2])],nx]])},lx=function(q){return Rr(S2,q[2][1])},a1=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,a50,Rr(j0,C[2])],0];return D(p50,R0,j,[0,[0,l50,Mx(z0,h0)],nx])},z1=function(q){var C=q[2],j=C[3],h0=C[1],R0=q[1],nx=[0,[0,d50,tx(C[2])],0];return D(m50,R0,j,[0,[0,y50,Mx(ix,h0)],nx])},w1=function(q){return V1(_n(function(C){var j=C[2];return Cr(0,j[3],C[1],[0,j[1]],j[2][2])},q))},Cr=function(q,C,j,h0,R0){if(h0)var nx=h0[1],Sx=nx[0]===0?Mx(K0,[0,nx[1]]):Mx(B0,[0,nx[1]]),Dx=Sx;else var Dx=Mx(K0,0);return D(Q50,j,q,[0,[0,$50,Dx],[0,[0,W50,dr(R0)],[0,[0,Z50,!!C],0]]])},n2=function(q){var C=q[2],j=C[4],h0=C[3],R0=C[2],nx=C[1],Sx=q[1];return Cr(j,h0,Sx,uy(function(Dx){return[0,Dx]},nx),R0)},w=function(q){return q?td0:nd0},x0=function(q){if(!q)return V1(0);var C=q[1];if(C[0]===0)return Rr(ea,C[1]);var j=C[1],h0=j[2],R0=j[1];return V1(h0?[0,D(id0,R0,0,[0,[0,ud0,K0(h0[1])],0]),0]:0)},e0=function(q){var C=q[2],j=C[2],h0=q[1];return D(Od0,h0,j,[0,[0,Rd0,z0(C[1])],0])},S0=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,Id0,Mx(ke,C[2])],0];return D(Md0,h0,0,[0,[0,Ld0,K0(j)],R0])},G=function(q){switch(q[0]){case 0:var C=q[1],j=C[2],h0=j[6],R0=j[2],nx=j[5],Sx=j[4],Dx=j[3],jx=j[1],xr=C[1];switch(R0[0]){case 0:var kr=h0,sr=0,Er=B0(R0[1]);break;case 1:var kr=h0,sr=0,Er=Ux(R0[1]);break;case 2:var kr=h0,sr=0,Er=tr(R0[1]);break;case 3:var kr=h0,sr=0,Er=K0(R0[1]);break;case 4:var kr=h0,sr=0,Er=or(R0[1]);break;default:var hr=R0[1][2],cr=hr[1],lr=R2(hr[2],h0),kr=lr,sr=1,Er=z0(cr)}switch(jx){case 0:var $r=Ud0;break;case 1:var $r=Bd0;break;case 2:var $r=Yd0;break;default:var $r=Xd0}var zr=[0,[0,Kd0,er($r)],[0,[0,zd0,!!Sx],[0,[0,Vd0,!!sr],[0,[0,Jd0,Rr(e0,nx)],0]]]];return D($d0,xr,kr,[0,[0,Wd0,Er],[0,[0,Zd0,ur(Dx)],zr]]);case 1:var r1=q[1],Or=r1[2],e1=Or[7],l1=Or[6],T1=Or[2],p1=Or[1],i1=Or[5],f1=Or[4],d1=Or[3],P1=r1[1];switch(p1[0]){case 0:var Xr=e1,Mr=0,Dr=B0(p1[1]);break;case 1:var Xr=e1,Mr=0,Dr=Ux(p1[1]);break;case 2:var Xr=e1,Mr=0,Dr=tr(p1[1]);break;case 3:var Xr=e1,Mr=0,Dr=K0(p1[1]);break;case 4:var $1=Nx(ty0),Xr=$1[3],Mr=$1[2],Dr=$1[1];break;default:var l2=p1[1][2],qr=l2[1],Kx=R2(l2[2],e1),Xr=Kx,Mr=1,Dr=z0(qr)}if(typeof T1=="number")if(T1)var Qr=0,R1=0;else var Qr=1,R1=0;else var Qr=0,R1=[0,T1[1]];var $e=Qr?[0,[0,ny0,!!Qr],0]:0,Qe=l1===0?0:[0,[0,uy0,Rr(e0,l1)],0],Kr=Fx(Qe,$e),u2=[0,[0,cy0,!!Mr],[0,[0,fy0,!!f1],[0,[0,iy0,Mx(ye,i1)],0]]],qt=[0,[0,sy0,y3(Zx,d1)],u2];return D(ay0,P1,Xr,Fx([0,[0,vy0,Dr],[0,[0,oy0,Mx(z0,R1)],qt]],Kr));default:var Fe=q[1],j1=Fe[2],Q1=j1[6],Z2=j1[2],he=j1[7],Gt=j1[5],_e=j1[4],we=j1[3],kt=j1[1],Te=Fe[1];if(typeof Z2=="number")if(Z2)var W2=0,Se=0;else var W2=1,Se=0;else var W2=0,Se=[0,Z2[1]];var $2=W2?[0,[0,Qd0,!!W2],0]:0,Ee=Q1===0?0:[0,[0,Fd0,Rr(e0,Q1)],0],ht=Fx(Ee,$2),_t=[0,[0,Gd0,!1],[0,[0,qd0,!!_e],[0,[0,Hd0,Mx(ye,Gt)],0]]],E2=[0,[0,bd0,y3(Zx,we)],_t],I2=[0,[0,xy0,Mx(z0,Se)],E2];return D(ey0,Te,he,Fx([0,[0,ry0,or(kt)],I2],ht))}},k0=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[1],nx=q[1],Sx=C[4],Dx=R0[0]===0?K0(R0[1]):B0(R0[1]);if(j)var jx=[0,[0,wy0,z0(j[1])],0],xr=D(Sy0,nx,0,[0,[0,Ty0,ix(h0)],jx]);else var xr=ix(h0);return D(Py0,nx,0,[0,[0,Ay0,Dx],[0,[0,gy0,xr],[0,[0,Ey0,!!Sx],0]]])},J0=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[4],nx=h0[1],Sx=[0,[0,Zy0,!!h0[2]],[0,[0,Ky0,!!h0[3]],0]],Dx=[0,[0,Wy0,Rr(function(Xr){var Mr=Xr[2],Dr=Mr[1],Qr=Xr[1],R1=[0,[0,Jy0,qx(Mr[2])],0];return D(zy0,Qr,0,[0,[0,Vy0,K0(Dr)],R1])},nx)],Sx];return D($y0,j,A1(R0),Dx);case 1:var jx=C[1],xr=jx[4],hr=jx[1],cr=[0,[0,Fy0,!!jx[2]],[0,[0,Qy0,!!jx[3]],0]],lr=[0,[0,Hy0,Rr(function(Xr){var Mr=Xr[2],Dr=Mr[1],Qr=Xr[1],R1=[0,[0,By0,Ux(Mr[2])],0];return D(Xy0,Qr,0,[0,[0,Yy0,K0(Dr)],R1])},hr)],cr];return D(qy0,j,A1(xr),lr);case 2:var kr=C[1],sr=kr[1],Er=kr[4],$r=kr[3],zr=kr[2];if(sr[0]===0)var r1=sr[1],e1=_n(function(Xr){var Mr=Xr[1];return D(Uy0,Mr,0,[0,[0,jy0,K0(Xr[2][1])],0])},r1);else var Or=sr[1],e1=_n(function(Xr){var Mr=Xr[2],Dr=Mr[1],Qr=Xr[1],R1=[0,[0,Ly0,B0(Mr[2])],0];return D(Dy0,Qr,0,[0,[0,My0,K0(Dr)],R1])},Or);var l1=[0,[0,x90,V1(e1)],[0,[0,by0,!!zr],[0,[0,Gy0,!!$r],0]]];return D(r90,j,A1(Er),l1);case 3:var T1=C[1],p1=T1[3],i1=T1[1],f1=[0,[0,e90,!!T1[2]],0],d1=[0,[0,t90,Rr(function(Xr){var Mr=Xr[1];return D(Iy0,Mr,0,[0,[0,Oy0,K0(Xr[2][1])],0])},i1)],f1];return D(n90,j,A1(p1),d1);default:var P1=C[1],$1=P1[4],l2=P1[1],qr=[0,[0,i90,!!P1[2]],[0,[0,u90,!!P1[3]],0]],Kx=[0,[0,f90,Rr(function(Xr){var Mr=Xr[2],Dr=Mr[1],Qr=Xr[1],R1=[0,[0,Cy0,tr(Mr[2])],0];return D(Ry0,Qr,0,[0,[0,Ny0,K0(Dr)],R1])},l2)],qr];return D(c90,j,A1($1),Kx)}},I0=function(q){var C=q[2],j=C[1],h0=C[3],R0=C[2],nx=q[1],Sx=j[0]===0?K0(j[1]):co(j[1]);return D(h90,nx,h0,[0,[0,k90,Sx],[0,[0,m90,Mx(ke,R0)],0]])},ix=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=C[1],R0=h0[3],nx=h0[1],Sx=[0,[0,_90,y3(Zx,h0[2])],0],Dx=[0,[0,w90,Rr(ue,nx)],Sx];return D(T90,j,A1(R0),Dx);case 1:var jx=C[1],xr=jx[3],hr=jx[1],cr=[0,[0,S90,y3(Zx,jx[2])],0],lr=[0,[0,E90,Rr(nr,hr)],cr];return D(g90,j,A1(xr),lr);case 2:return Ur(j,C[1]);default:return z0(C[1])}},Wx=function(q){var C=q[2],j=C[2],h0=C[1],R0=q[1];if(!j)return ix(h0);var nx=[0,[0,A90,z0(j[1])],0];return D(C90,R0,0,[0,[0,P90,ix(h0)],nx])},Bx=function(q){var C=q[2],j=C[2],h0=q[1];return D(O90,h0,j,[0,[0,R90,lv],[0,[0,N90,Zx(C[1])],0]])},Hx=function(q){var C=q[2],j=C[3],h0=C[2],R0=C[1];if(j){var nx=j[1],Sx=nx[2],Dx=Sx[2],jx=nx[1],xr=D(L90,jx,Dx,[0,[0,I90,ix(Sx[1])],0]),hr=Ax([0,xr,iy(Wx,h0)]),cr=R0?[0,Bx(R0[1]),hr]:hr;return V1(cr)}var lr=_n(Wx,h0),kr=R0?[0,Bx(R0[1]),lr]:lr;return V1(kr)},$x=function(q,C){var j=C[2];return D(D90,q,j,[0,[0,M90,ix(C[1])],0])},nr=function(q){switch(q[0]){case 0:var C=q[1],j=C[2],h0=j[2],R0=j[1],nx=C[1];if(!h0)return ix(R0);var Sx=[0,[0,j90,z0(h0[1])],0];return D(B90,nx,0,[0,[0,U90,ix(R0)],Sx]);case 1:var Dx=q[1];return $x(Dx[1],Dx[2]);default:return O2}},Zx=function(q){var C=q[1];return D(Q_0,C,0,[0,[0,$_0,dr(q[2])],0])},Lr=function(q){switch(q[0]){case 0:return O2;case 1:return Zx(q[1]);default:var C=q[1],j=C[2],h0=C[1];return D(H_0,h0,0,[0,[0,F_0,yt([0,j[1],j[2]])],0])}},Yx=function(q){if(q[0]===0){var C=q[1],j=C[2],h0=C[1];switch(j[0]){case 0:var R0=j[3],nx=j[1],sr=0,Er=R0,$r=0,zr=Y90,r1=z0(j[2]),Or=nx;break;case 1:var Sx=j[2],Dx=j[1],sr=0,Er=0,$r=1,zr=X90,r1=ur([0,Sx[1],Sx[2]]),Or=Dx;break;case 2:var jx=j[2],xr=j[3],hr=j[1],sr=xr,Er=0,$r=0,zr=J90,r1=ur([0,jx[1],jx[2]]),Or=hr;break;default:var cr=j[2],lr=j[3],kr=j[1],sr=lr,Er=0,$r=0,zr=V90,r1=ur([0,cr[1],cr[2]]),Or=kr}switch(Or[0]){case 0:var i1=sr,f1=0,d1=B0(Or[1]);break;case 1:var i1=sr,f1=0,d1=Ux(Or[1]);break;case 2:var i1=sr,f1=0,d1=tr(Or[1]);break;case 3:var i1=sr,f1=0,d1=K0(Or[1]);break;case 4:var e1=Nx(z90),i1=e1[3],f1=e1[2],d1=e1[1];break;default:var l1=Or[1][2],T1=l1[1],p1=R2(l1[2],sr),i1=p1,f1=1,d1=z0(T1)}return D(H90,h0,i1,[0,[0,F90,d1],[0,[0,Q90,r1],[0,[0,$90,er(zr)],[0,[0,W90,!!$r],[0,[0,Z90,!!Er],[0,[0,K90,!!f1],0]]]]]])}var P1=q[1],$1=P1[2],l2=$1[2],qr=P1[1];return D(G90,qr,l2,[0,[0,q90,z0($1[1])],0])},ue=function(q){if(q[0]!==0){var C=q[1];return $x(C[1],C[2])}var j=q[1],h0=j[2],R0=h0[3],nx=h0[2],Sx=h0[1],Dx=h0[4],jx=j[1];switch(Sx[0]){case 0:var cr=0,lr=0,kr=B0(Sx[1]);break;case 1:var cr=0,lr=0,kr=Ux(Sx[1]);break;case 2:var cr=0,lr=0,kr=tr(Sx[1]);break;case 3:var cr=0,lr=0,kr=K0(Sx[1]);break;default:var xr=Sx[1][2],hr=xr[2],cr=hr,lr=1,kr=z0(xr[1])}if(R0)var sr=R0[1],Er=Hr(nx[1],sr[1]),$r=[0,[0,b90,z0(sr)],0],zr=D(rm0,Er,0,[0,[0,xm0,ix(nx)],$r]);else var zr=ix(nx);return D(cm0,jx,cr,[0,[0,fm0,kr],[0,[0,im0,zr],[0,[0,um0,hu],[0,[0,nm0,!1],[0,[0,tm0,!!Dx],[0,[0,em0,!!lr],0]]]]]])},Qt=function(q){var C=q[2],j=C[2],h0=q[1];return D(om0,h0,j,[0,[0,sm0,z0(C[1])],0])},S2=function(q){return q[0]===0?z0(q[1]):Qt(q[1])},Ze=function(q){switch(q[0]){case 0:return z0(q[1]);case 1:return Qt(q[1]);default:return O2}},fo=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1];return D(Vm0,R0,0,[0,[0,Jm0,ps([0,[0,Ym0,er(j[1])],[0,[0,Bm0,er(j[2])],0]])],[0,[0,Xm0,!!h0],0]])},gn=function(q){switch(q){case 0:return Wm0;case 1:return $m0;default:return Qm0}},ds=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,Gm0,Mx(z0,C[2])],0];return D(xk0,h0,0,[0,[0,bm0,ix(j)],R0])},ye=function(q){var C=q[2],j=C[2],h0=q[1];switch(C[1]){case 0:var R0=rk0;break;case 1:var R0=ek0;break;case 2:var R0=tk0;break;case 3:var R0=nk0;break;case 4:var R0=uk0;break;default:var R0=ik0}return D(ck0,h0,j,[0,[0,fk0,er(R0)],0])},An=function(q,C){var j=C[3],h0=C[2];switch(C[4]){case 0:var R0=p_0;break;case 1:var R0=d_0;break;default:var R0=y_0}return D(h_0,q,j,[0,[0,k_0,er(R0)],[0,[0,m_0,dr(h0)],0]])},Ft=function(q){var C=q[2],j=C[1],h0=C[3],R0=C[2],nx=q[1],Sx=j[0]===0?K0(j[1]):co(j[1]);return D(Hh0,nx,h0,[0,[0,Fh0,Sx],[0,[0,Qh0,Mx(ke,R0)],0]])},We=function(q,C){var j=C[2],h0=j[4],R0=j[3],nx=j[2],Sx=j[1],Dx=C[1],jx=x2(function(zr,r1){var Or=zr[4],e1=zr[3],l1=zr[2],T1=zr[1];switch(r1[0]){case 0:var p1=r1[1],i1=p1[2],f1=i1[2],d1=i1[1],P1=i1[8],$1=i1[7],l2=i1[6],qr=i1[5],Kx=i1[4],Xr=i1[3],Mr=p1[1];switch(d1[0]){case 0:var Dr=B0(d1[1]);break;case 1:var Dr=Ux(d1[1]);break;case 2:var Dr=tr(d1[1]);break;case 3:var Dr=K0(d1[1]);break;case 4:var Dr=Nx(Hk0);break;default:var Dr=Nx(qk0)}switch(f1[0]){case 0:var $e=Gk0,Qe=dr(f1[1]);break;case 1:var Qr=f1[1],$e=bk0,Qe=Ht([0,Qr[1],Qr[2]]);break;default:var R1=f1[1],$e=xh0,Qe=Ht([0,R1[1],R1[2]])}return[0,[0,D(sh0,Mr,P1,[0,[0,ch0,Dr],[0,[0,fh0,Qe],[0,[0,ih0,!!l2],[0,[0,uh0,!!Xr],[0,[0,nh0,!!Kx],[0,[0,th0,!!qr],[0,[0,eh0,Mx(ye,$1)],[0,[0,rh0,er($e)],0]]]]]]]]),T1],l1,e1,Or];case 1:var Kr=r1[1],u2=Kr[2],qt=u2[2],Fe=Kr[1];return[0,[0,D(vh0,Fe,qt,[0,[0,oh0,dr(u2[1])],0]),T1],l1,e1,Or];case 2:var j1=r1[1],Q1=j1[2],Z2=Q1[6],he=Q1[4],Gt=Q1[3],_e=Q1[2],we=Q1[1],kt=j1[1],Te=[0,[0,lh0,!!he],[0,[0,ah0,Mx(ye,Q1[5])],0]],W2=[0,[0,ph0,dr(Gt)],Te],Se=[0,[0,dh0,dr(_e)],W2];return[0,T1,[0,D(mh0,kt,Z2,[0,[0,yh0,Mx(K0,we)],Se]),l1],e1,Or];case 3:var $2=r1[1],Ee=$2[2],ht=Ee[3],_t=$2[1],E2=[0,[0,kh0,!!Ee[2]],0];return[0,T1,l1,[0,D(_h0,_t,ht,[0,[0,hh0,Ht(Ee[1])],E2]),e1],Or];case 4:var I2=r1[1],Q2=I2[2],Rn=Q2[6],On=Q2[5],bt=Q2[4],wt=Q2[3],xn=Q2[1],In=I2[1],ge=[0,[0,Rh0,!!wt],[0,[0,Nh0,!!bt],[0,[0,Ch0,!!On],[0,[0,Ph0,dr(Q2[2])],0]]]];return[0,T1,l1,e1,[0,D(Ih0,In,Rn,[0,[0,Oh0,K0(xn)],ge]),Or]];default:var He=r1[1],L2=He[2],Ln=L2[6],Tt=L2[4],St=L2[3],Et=L2[2],hs=L2[1],Mn=He[1],F2=0;switch(L2[5]){case 0:var qe="PlusOptional";break;case 1:var qe="MinusOptional";break;case 2:var qe="Optional";break;default:var qe=O2}var Dn=[0,[0,Th0,Mx(ye,Tt)],[0,[0,wh0,qe],F2]],jn=[0,[0,Sh0,dr(St)],Dn],_s=[0,[0,Eh0,dr(Et)],jn];return[0,[0,D(Ah0,Mn,Ln,[0,[0,gh0,ys(hs)],_s]),T1],l1,e1,Or]}},Vk0,R0),xr=jx[3],hr=jx[2],cr=jx[1],lr=[0,[0,zk0,V1(Ax(jx[4]))],0],kr=[0,[0,Kk0,V1(Ax(xr))],lr],sr=[0,[0,Zk0,V1(Ax(hr))],kr],Er=[0,[0,$k0,!!Sx],[0,[0,Wk0,V1(Ax(cr))],sr]],$r=q?[0,[0,Qk0,!!nx],Er]:Er;return D(Fk0,Dx,A1(h0),$r)},Ht=function(q){var C=q[2],j=C[3],h0=C[2][2],R0=C[4],nx=h0[3],Sx=h0[2],Dx=h0[1],jx=C[1],xr=q[1],hr=R2(A1(h0[4]),R0),cr=[0,[0,Ck0,Mx(a2,jx)],0],lr=[0,[0,Nk0,Mx(me,nx)],cr],kr=j[0]===0?dr(j[1]):yt(j[1]),sr=[0,[0,Ok0,Mx(Pn,Dx)],[0,[0,Rk0,kr],lr]];return D(Lk0,xr,hr,[0,[0,Ik0,Rr(function(Er){return Qo(0,Er)},Sx)],sr])},dr=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return D(sk0,j,C[1],0);case 1:return D(ok0,j,C[1],0);case 2:return D(vk0,j,C[1],0);case 3:return D(ak0,j,C[1],0);case 4:return D(lk0,j,C[1],0);case 5:return D(dk0,j,C[1],0);case 6:return D(yk0,j,C[1],0);case 7:return D(mk0,j,C[1],0);case 8:return D(kk0,j,C[2],0);case 9:return D(pk0,j,C[1],0);case 10:return D(W_0,j,C[1],0);case 11:var h0=C[1],R0=h0[2];return D(_k0,j,R0,[0,[0,hk0,dr(h0[1])],0]);case 12:return Ht([0,j,C[1]]);case 13:var nx=C[1],Sx=nx[2],Dx=nx[4],jx=nx[3],xr=nx[1],hr=R2(A1(Sx[2][3]),Dx),cr=Sx[2],lr=cr[2],kr=cr[1],sr=[0,[0,X50,Mx(a2,xr)],0],Er=[0,[0,J50,oo(jx)],sr],$r=[0,[0,V50,Mx(n2,lr)],Er];return D(K50,j,hr,[0,[0,z50,w1(kr)],$r]);case 14:return We(1,[0,j,C[1]]);case 15:var zr=C[1],r1=zr[3],Or=zr[2],e1=[0,[0,Lh0,We(0,zr[1])],0];return D(Dh0,j,r1,[0,[0,Mh0,Rr(I0,Or)],e1]);case 16:var l1=C[1],T1=l1[2];return D(Uh0,j,T1,[0,[0,jh0,dr(l1[1])],0]);case 17:var p1=C[1],i1=p1[5],f1=p1[3],d1=p1[2],P1=p1[1],$1=[0,[0,Bh0,dr(p1[4])],0],l2=[0,[0,Yh0,dr(f1)],$1],qr=[0,[0,Xh0,dr(d1)],l2];return D(Vh0,j,i1,[0,[0,Jh0,dr(P1)],qr]);case 18:var Kx=C[1],Xr=Kx[2];return D(Kh0,j,Xr,[0,[0,zh0,ys(Kx[1])],0]);case 19:return Ft([0,j,C[1]]);case 20:var Mr=C[1],Dr=Mr[3];return D(bh0,j,Dr,Fo(Mr));case 21:var Qr=C[1],R1=Qr[1],$e=R1[3],Qe=[0,[0,x_0,!!Qr[2]],0];return D(r_0,j,$e,Fx(Fo(R1),Qe));case 22:var Kr=C[1],u2=Kr[1],qt=Kr[2];return D(t_0,j,qt,[0,[0,e_0,Rr(dr,[0,u2[1],[0,u2[2],u2[3]]])],0]);case 23:var Fe=C[1],j1=Fe[1],Q1=Fe[2];return D(u_0,j,Q1,[0,[0,n_0,Rr(dr,[0,j1[1],[0,j1[2],j1[3]]])],0]);case 24:var Z2=C[1],he=Z2[2],Gt=Z2[3],_e=Z2[1],we=he?[0,[0,i_0,ke(he[1])],0]:0;return D(c_0,j,Gt,[0,[0,f_0,so(_e)],we]);case 25:var kt=C[1],Te=kt[2];return D(l_0,j,Te,[0,[0,a_0,dr(kt[1])],0]);case 26:return An(j,C[1]);case 27:var W2=C[1],Se=W2[2];return D(w_0,j,Se,[0,[0,__0,dr(W2[1])],0]);case 28:var $2=C[1],Ee=$2[2],ht=$2[1],_t=0;return D(S_0,j,Ee,[0,[0,T_0,Rr(function(In){var ge=In[2],He=In[1];switch(ge[0]){case 0:return dr(ge[1]);case 1:var L2=ge[1],Ln=L2[2],Tt=L2[1],St=[0,[0,E_0,!!L2[4]],0],Et=[0,[0,g_0,Mx(ye,L2[3])],St],hs=[0,[0,A_0,dr(Ln)],Et];return D(C_0,He,0,[0,[0,P_0,K0(Tt)],hs]);default:var Mn=ge[1],F2=Mn[1],qe=[0,[0,N_0,dr(Mn[2])],0];return D(O_0,He,0,[0,[0,R_0,Mx(K0,F2)],qe])}},ht)],_t]);case 29:var E2=C[1];return D(M_0,j,E2[3],[0,[0,L_0,er(E2[1])],[0,[0,I_0,er(E2[2])],0]]);case 30:var I2=C[1];return D(U_0,j,I2[3],[0,[0,j_0,I2[1]],[0,[0,D_0,er(I2[2])],0]]);case 31:var Q2=C[1];return D(X_0,j,Q2[3],[0,[0,Y_0,O2],[0,[0,B_0,er(Q2[2])],0]]);case 32:var Rn=C[1],On=Rn[1],bt=Rn[2],wt=0,xn=On?J_0:V_0;return D(Z_0,j,bt,[0,[0,K_0,!!On],[0,[0,z_0,er(xn)],wt]]);case 33:return D(wk0,j,C[1],0);case 34:return D(Tk0,j,C[1],0);default:return D(Sk0,j,C[1],0)}},yt=function(q){var C=q[2],j=C[2],h0=C[3],R0=j[1],nx=q[1],Sx=[0,[0,Ek0,!!C[1]],0],Dx=[0,[0,gk0,Mx(dr,j[2])],Sx],jx=[0,[0,Ak0,K0(R0)],Dx];return D(Pk0,nx,A1(h0),jx)},Qo=function(q,C){var j=C[2],h0=j[1],R0=C[1],nx=[0,[0,Mk0,!!j[3]],0],Sx=[0,[0,Dk0,dr(j[2])],nx];return D(Uk0,R0,q,[0,[0,jk0,Mx(K0,h0)],Sx])},me=function(q){var C=q[2];return Qo(C[2],C[1])},Pn=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,Yk0,dr(C[1][2])],[0,[0,Bk0,!1],0]];return D(Jk0,h0,j,[0,[0,Xk0,Mx(K0,0)],R0])},co=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j[0]===0?K0(j[1]):co(j[1]);return D($h0,R0,0,[0,[0,Wh0,nx],[0,[0,Zh0,K0(h0)],0]])},Fo=function(q){var C=q[1],j=[0,[0,qh0,dr(q[2])],0];return[0,[0,Gh0,dr(C)],j]},so=function(q){if(q[0]===0)return K0(q[1]);var C=q[1],j=C[2],h0=j[2],R0=C[1],nx=so(j[1]);return D(v_0,R0,0,[0,[0,o_0,nx],[0,[0,s_0,K0(h0)],0]])},oo=function(q){return q[0]===0?O2:An(q[1],q[2])},a2=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,q_0,Rr(ys,C[1])],0];return D(G_0,h0,A1(j),R0)},ys=function(q){var C=q[2],j=C[1][2],h0=C[5],R0=C[4],nx=C[2],Sx=j[2],Dx=j[1],jx=q[1],xr=C[3]?[0,[0,b_0,!0],0]:0,hr=[0,[0,xw0,Mx(dr,h0)],0],cr=[0,[0,rw0,Mx(ye,R0)],hr];return D(nw0,jx,Sx,Fx([0,[0,tw0,er(Dx)],[0,[0,ew0,y3(Zx,nx)],cr]],xr))},ke=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,uw0,Rr(dr,C[1])],0];return D(iw0,h0,A1(j),R0)},Cn=function(q){var C=q[2],j=C[2],h0=q[1],R0=[0,[0,fw0,Rr(Ho,C[1])],0];return D(cw0,h0,A1(j),R0)},Ho=function(q){if(q[0]===0)return dr(q[1]);var C=q[1],j=C[1],h0=C[2][1];return Ft([0,j,[0,[0,wn(0,[0,j,sw0])],0,h0]])},bv=function(q){if(q[0]===0){var C=q[1],j=C[2],h0=j[1],R0=j[2],nx=C[1],Sx=h0[0]===0?mt(h0[1]):qo(h0[1]);return D(Nw0,nx,0,[0,[0,Cw0,Sx],[0,[0,Pw0,Mx(ra,R0)],0]])}var Dx=q[1],jx=Dx[2],xr=jx[2],hr=Dx[1];return D(Ow0,hr,xr,[0,[0,Rw0,z0(jx[1])],0])},xa=function(q){var C=q[1];return D(gw0,C,0,[0,[0,Ew0,ao(q[2][1])],0])},vo=function(q){var C=q[2],j=C[1],h0=q[1],R0=C[2],nx=j?z0(j[1]):D(Iw0,[0,h0[1],[0,h0[2][1],h0[2][2]+1|0],[0,h0[3][1],h0[3][2]-1|0]],0,0);return D(Mw0,h0,A1(R0),[0,[0,Lw0,nx],0])},ms=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:return Ex([0,j,C[1]]);case 1:return Px([0,j,C[1]]);case 2:return vo([0,j,C[1]]);case 3:var h0=C[1],R0=h0[2];return D(jw0,j,R0,[0,[0,Dw0,z0(h0[1])],0]);default:var nx=C[1];return D(Yw0,j,0,[0,[0,Bw0,er(nx[1])],[0,[0,Uw0,er(nx[2])],0]])}},mt=function(q){var C=q[2];return D($w0,q[1],C[2],[0,[0,Ww0,er(C[1])],0])},qo=function(q){var C=q[2],j=C[1],h0=q[1],R0=[0,[0,zw0,mt(C[2])],0];return D(Zw0,h0,0,[0,[0,Kw0,mt(j)],R0])},Go=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1],nx=j[0]===0?mt(j[1]):Go(j[1]);return D(Vw0,R0,0,[0,[0,Jw0,nx],[0,[0,Xw0,mt(h0)],0]])},ao=function(q){switch(q[0]){case 0:return mt(q[1]);case 1:return qo(q[1]);default:return Go(q[1])}},ra=function(q){if(q[0]===0){var C=q[1];return B0([0,C[1],C[2]])}var j=q[1];return vo([0,j[1],j[2]])},ea=function(q){var C=q[2],j=C[2],h0=C[1],R0=q[1],nx=K0(j?j[1]:h0);return D(Hw0,R0,0,[0,[0,Fw0,K0(h0)],[0,[0,Qw0,nx],0]])},ks=function(q){return Rr(ta,q)},ta=function(q){var C=q[2],j=q[1];if(C[1])var h0=C[2],R0=uT0;else var h0=C[2],R0=iT0;return D(R0,j,0,[0,[0,fT0,er(h0)],0])},lo=function(q){var C=q[2],j=C[1],h0=C[2],R0=q[1];if(j)var nx=[0,[0,cT0,z0(j[1])],0],Sx=sT0;else var nx=0,Sx=oT0;return D(Sx,R0,h0,nx)},bo=function(q){var C=q[2],j=q[1],h0=[0,[0,vT0,lx(q[3])],0],R0=[0,[0,aT0,Mx(Cn,C)],h0];return[0,[0,lT0,z0(j)],R0]},xv=function(q){var C=q[2],j=q[1];switch(C[0]){case 0:var h0=0,R0=K0(C[1]);break;case 1:var h0=0,R0=or(C[1]);break;default:var h0=1,R0=z0(C[1])}return[0,[0,yT0,z0(j)],[0,[0,dT0,R0],[0,[0,pT0,!!h0],0]]]},Nn=P0[2],rv=Nn[2],$9=Nn[4],m3=Nn[3],Q9=P0[1],j6=N0(Nn[1]),U6=[0,[0,h60,j6],[0,[0,k60,ks($9)],0]];if(rv)var B6=rv[1],Y6=Fx(U6,[0,[0,T60,D(w60,B6[1],0,[0,[0,_60,er(B6[2])],0])],0]);else var Y6=U6;var k3=D(S60,Q9,m3,Y6),F9=Fx(v0,zK[1]);if(k3.errors=Rr(function(q){var C=q[1],j=[0,[0,mT0,er(_S0(q[2]))],0];return ps([0,[0,kT0,ZK(C)],j])},F9),T){var H9=O[1];k3[gD]=V1(iy(function(q){var C=q[2],j=q[1],h0=q[3],R0=[0,[0,Dv0,er(rI(C))],0],nx=[0,c9(b,j[3]),0],Sx=[0,[0,jv0,V1([0,c9(b,j[2]),nx])],R0],Dx=[0,[0,Yv0,ps([0,[0,Bv0,j[3][1]],[0,[0,Uv0,j[3][2]],0]])],0],jx=[0,[0,zv0,ps([0,[0,Vv0,ps([0,[0,Jv0,j[2][1]],[0,[0,Xv0,j[2][2]],0]])],Dx])],Sx];switch(h0){case 0:var xr=Kv0;break;case 1:var xr=Zv0;break;case 2:var xr=Wv0;break;case 3:var xr=$v0;break;case 4:var xr=Qv0;break;default:var xr=Fv0}return ps([0,[0,qv0,er(UJ(C))],[0,[0,Hv0,er(xr)],jx]])},H9))}return k3}var na=A0[1];if(na===5){var h3=A0[2];if(h3&&h3[1]===6){var q9=h3[2],C0=[0,H+2|0,0,[0,Jl(Ax([0,H,Q0])),U0]],A0=q9;continue}}else if(6>na){var G9=A0[2],C0=[0,H+YV(na)|0,[0,H,Q0],U0],A0=G9;continue}var D1=A0[2],ev=[0,Jl(Ax([0,H,Q0])),U0],C0=[0,H+YV(na)|0,0,ev],A0=D1}}};if(typeof MM<"u")var WK=MM;else{var $K={};io.flow=$K;var WK=$K}WK.parse=bZ(function(x,r){try{var e=rg0(x,r);return e}catch(u){var t=I1(u);return t[1]===UL?VK(t[2]):VK(new bE0(er(Qx(MT0,ay(t)))))}}),sO(0);return}}})(globalThis)});var lZ=QK(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.extract=TN0;aa.parse=EN0;aa.parseWithComments=aZ;aa.print=gN0;aa.strip=SN0;var mN0=/\*\/$/,kN0=/^\/\*\*?/,oZ=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,hN0=/(^|\s+)\/\/([^\r\n]*)/g,fZ=/^(\r?\n)+/,_N0=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,cZ=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,wN0=/(\r?\n|^) *\* ?/g,vZ=[];function TN0(d0){let wx=d0.match(oZ);return wx?wx[0].trimLeft():""}function SN0(d0){let wx=d0.match(oZ);return wx&&wx[0]?d0.substring(wx[0].length):d0}function EN0(d0){return aZ(d0).pragmas}function aZ(d0){let wx=` +`;d0=d0.replace(kN0,"").replace(mN0,"").replace(wN0,"$1");let Gx="";for(;Gx!==d0;)Gx=d0,d0=d0.replace(_N0,`${wx}$1 $2${wx}`);d0=d0.replace(fZ,"").trimRight();let gr=Object.create(null),rr=d0.replace(cZ,"").replace(fZ,"").trimRight(),jr;for(;jr=cZ.exec(d0);){let ir=jr[2].replace(hN0,"");typeof gr[jr[1]]=="string"||Array.isArray(gr[jr[1]])?gr[jr[1]]=vZ.concat(gr[jr[1]],ir):gr[jr[1]]=ir}return{comments:rr,pragmas:gr}}function gN0({comments:d0="",pragmas:wx={}}){let Gx=` +`,gr="/**",rr=" *",jr=" */",ir=Object.keys(wx),tn=ir.flatMap(Ct=>sZ(Ct,wx[Ct])).map(Ct=>`${rr} ${Ct}${Gx}`).join("");if(!d0){if(ir.length===0)return"";if(ir.length===1&&!Array.isArray(wx[ir[0]])){let Ct=wx[ir[0]];return`${gr} ${sZ(ir[0],Ct)[0]}${jr}`}}let X4=d0.split(Gx).map(Ct=>`${rr} ${Ct}`).join(Gx)+Gx;return gr+Gx+(d0?X4:"")+(d0&&ir.length?rr+Gx:"")+tn+jr}function sZ(d0,wx){return vZ.concat(wx).map(Gx=>`@${d0} ${Gx}`.trim())}});var JM={};FK(JM,{parsers:()=>XM});var XM={};FK(XM,{flow:()=>LN0});var kZ=HK(qK(),1);function iN0(d0,wx){let Gx=new SyntaxError(d0+" ("+wx.loc.start.line+":"+wx.loc.start.column+")");return Object.assign(Gx,wx)}var GK=iN0;var fN0=(d0,wx,Gx)=>{if(!(d0&&wx==null))return Array.isArray(wx)||typeof wx=="string"?wx[Gx<0?wx.length+Gx:Gx]:wx.at(Gx)},DM=fN0;function cN0(d0){return Array.isArray(d0)&&d0.length>0}var bK=cN0;function Pt(d0){var gr,rr,jr;let wx=((gr=d0.range)==null?void 0:gr[0])??d0.start,Gx=(jr=((rr=d0.declaration)==null?void 0:rr.decorators)??d0.decorators)==null?void 0:jr[0];return Gx?Math.min(Pt(Gx),wx):wx}function As(d0){var wx;return((wx=d0.range)==null?void 0:wx[1])??d0.end}function sN0(d0){let wx=new Set(d0);return Gx=>wx.has(Gx==null?void 0:Gx.type)}var xZ=sN0;var oN0=xZ(["Block","CommentBlock","MultiLine"]),U4=oN0;function vN0(d0){let wx=`*${d0.value}*`.split(` +`);return wx.length>1&&wx.every(Gx=>Gx.trimStart()[0]==="*")}var jM=vN0;function aN0(d0){return U4(d0)&&d0.value[0]==="*"&&/@(?:type|satisfies)\b/.test(d0.value)}var rZ=aN0;var B4=null;function Y4(d0){if(B4!==null&&typeof B4.property){let wx=B4;return B4=Y4.prototype=null,wx}return B4=Y4.prototype=d0??Object.create(null),new Y4}var lN0=10;for(let d0=0;d0<=lN0;d0++)Y4();function UM(d0){return Y4(d0)}function pN0(d0,wx="type"){UM(d0);function Gx(gr){let rr=gr[wx],jr=d0[rr];if(!Array.isArray(jr))throw Object.assign(new Error(`Missing visitor keys for '${rr}'.`),{node:gr});return jr}return Gx}var eZ=pN0;var tZ={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var dN0=eZ(tZ),nZ=dN0;function BM(d0,wx){if(!(d0!==null&&typeof d0=="object"))return d0;if(Array.isArray(d0)){for(let gr=0;gr{var ir;(ir=jr.leadingComments)!=null&&ir.some(rZ)&&rr.add(Pt(jr))}),d0=dm(d0,jr=>{if(jr.type==="ParenthesizedExpression"){let{expression:ir}=jr;if(ir.type==="TypeCastExpression")return ir.range=[...jr.range],ir;let tn=Pt(jr);if(!rr.has(tn))return ir.extra={...ir.extra,parenthesized:!0},ir}})}if(d0=dm(d0,rr=>{var jr;switch(rr.type){case"LogicalExpression":if(uZ(rr))return YM(rr);break;case"VariableDeclaration":{let ir=DM(!1,rr.declarations,-1);ir!=null&&ir.init&&gr[As(ir)]!==";"&&(rr.range=[Pt(rr),As(ir)]);break}case"TSParenthesizedType":return rr.typeAnnotation;case"TSTypeParameter":if(typeof rr.name=="string"){let ir=Pt(rr);rr.name={type:"Identifier",name:rr.name,range:[ir,ir+rr.name.length]}}break;case"TopicReference":d0.extra={...d0.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(Gx==="meriyah"&&((jr=rr.exported)==null?void 0:jr.type)==="Identifier"){let{exported:ir}=rr,tn=gr.slice(Pt(ir),As(ir));(tn.startsWith('"')||tn.startsWith("'"))&&(rr.exported={...rr.exported,type:"Literal",value:rr.exported.name,raw:tn})}break;case"TSUnionType":case"TSIntersectionType":if(rr.types.length===1)return rr.types[0];break}}),bK(d0.comments)){let rr=DM(!1,d0.comments,-1);for(let jr=d0.comments.length-2;jr>=0;jr--){let ir=d0.comments[jr];As(ir)===Pt(rr)&&U4(ir)&&U4(rr)&&jM(ir)&&jM(rr)&&(d0.comments.splice(jr+1,1),ir.value+="*//*"+rr.value,ir.range=[Pt(ir),As(rr)]),rr=ir}}return d0.type==="Program"&&(d0.range=[0,gr.length]),d0}function uZ(d0){return d0.type==="LogicalExpression"&&d0.right.type==="LogicalExpression"&&d0.operator===d0.right.operator}function YM(d0){return uZ(d0)?YM({type:"LogicalExpression",operator:d0.operator,left:YM({type:"LogicalExpression",operator:d0.operator,left:d0.left,right:d0.right.left,range:[Pt(d0.left),As(d0.right.left)]}),right:d0.right.right,range:[Pt(d0),As(d0)]}):d0}var iZ=yN0;var X3=HK(lZ(),1);function AN0(d0){if(!d0.startsWith("#!"))return"";let wx=d0.indexOf(` +`);return wx===-1?d0:d0.slice(0,wx)}var pZ=AN0;function PN0(d0){let wx=pZ(d0);wx&&(d0=d0.slice(wx.length+1));let Gx=(0,X3.extract)(d0),{pragmas:gr,comments:rr}=(0,X3.parseWithComments)(Gx);return{shebang:wx,text:d0,pragmas:gr,comments:rr}}function dZ(d0){let{pragmas:wx}=PN0(d0);return Object.prototype.hasOwnProperty.call(wx,"prettier")||Object.prototype.hasOwnProperty.call(wx,"format")}function CN0(d0){return d0=typeof d0=="function"?{parse:d0}:d0,{astFormat:"estree",hasPragma:dZ,locStart:Pt,locEnd:As,...d0}}var yZ=CN0;function NN0(d0){return d0.charAt(0)==="#"&&d0.charAt(1)==="!"?"//"+d0.slice(2):d0}var mZ=NN0;var RN0={comments:!1,enums:!0,esproposal_decorators:!0,esproposal_export_star_as:!0,tokens:!0};function ON0(d0){let{message:wx,loc:{start:Gx,end:gr}}=d0;return GK(wx,{loc:{start:{line:Gx.line,column:Gx.column+1},end:{line:gr.line,column:gr.column+1}},cause:d0})}function IN0(d0){let wx=kZ.default.parse(mZ(d0),RN0),[Gx]=wx.errors;if(Gx)throw ON0(Gx);return iZ(wx,{text:d0})}var LN0=yZ(IN0);var IR0=JM;export{IR0 as default,XM as parsers}; diff --git a/node_modules/prettier/plugins/glimmer.js b/node_modules/prettier/plugins/glimmer.js index d1c6026..6c91991 100644 --- a/node_modules/prettier/plugins/glimmer.js +++ b/node_modules/prettier/plugins/glimmer.js @@ -1,20 +1,20 @@ -(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e()}})(function(){"use strict";var $t=Object.defineProperty;var ns=Object.getOwnPropertyDescriptor;var ss=Object.getOwnPropertyNames;var is=Object.prototype.hasOwnProperty;var Qt=(t,e)=>{for(var r in e)$t(t,r,{get:e[r],enumerable:!0})},as=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ss(e))!is.call(t,s)&&s!==r&&$t(t,s,{get:()=>e[s],enumerable:!(n=ns(e,s))||n.enumerable});return t};var os=t=>as($t({},"__esModule",{value:!0}),t);var Yr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var W=(t,e,r)=>(Yr(t,e,"read from private field"),r?r.call(t):e.get(t)),Xt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Jt=(t,e,r,n)=>(Yr(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var ka={};Qt(ka,{languages:()=>Xn,parsers:()=>Vr,printers:()=>Sa});var ls=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},Zt=ls;var Ye="string",ze="array",We="cursor",De="indent",Oe="align",Ke="trim",Be="group",Ie="fill",Re="if-break",je="indent-if-break",$e="line-suffix",Qe="line-suffix-boundary",Z="line",Xe="label",He="break-parent",gt=new Set([We,De,Oe,Ke,Be,Ie,Re,je,$e,Qe,Z,Xe,He]);function cs(t){if(typeof t=="string")return Ye;if(Array.isArray(t))return ze;if(!t)return;let{type:e}=t;if(gt.has(e))return e}var Je=cs;var us=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function hs(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', -Expected it to be 'string' or 'object'.`;if(Je(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=us([...gt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. -Expected it to be ${n}.`}var er=class extends Error{name="InvalidDocError";constructor(e){super(hs(e)),this.doc=e}},tr=er;var zr=()=>{},be=zr,bt=zr;function O(t){return be(t),{type:De,contents:t}}function ps(t,e){return be(e),{type:Oe,contents:e,n:t}}function B(t,e={}){return be(t),bt(e.expandedStates,!0),{type:Be,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function rr(t){return ps(-1,t)}function nr(t){return bt(t),{type:Ie,parts:t}}function sr(t,e="",r={}){return be(t),e!==""&&be(e),{type:Re,breakContents:t,flatContents:e,groupId:r.groupId}}var Wr={type:He};var fs={type:Z,hard:!0},ds={type:Z,hard:!0,literal:!0},x={type:Z},G={type:Z,soft:!0},ye=[fs,Wr],Kr=[ds,Wr];function Ee(t,e){be(t),bt(e);let r=[];for(let n=0;n{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},le=ms;function gs(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Je(i)){case ze:return e(i.map(n));case Ie:return e({...i,parts:i.parts.map(n)});case Re:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Be:{let{expandedStates:a,contents:l}=i;return a?(a=a.map(n),l=a[0]):l=n(l),e({...i,contents:l,expandedStates:a})}case Oe:case De:case je:case Xe:case $e:return e({...i,contents:n(i.contents)});case Ye:case We:case Ke:case Qe:case Z:case He:return e(i);default:throw new tr(i)}}}function jr(t,e=Kr){return gs(t,r=>typeof r=="string"?Ee(e,r.split(` -`)):r)}var yt="'",$r='"';function bs(t,e){let r=e===!0||e===yt?yt:$r,n=r===yt?$r:yt,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var Et=bs;function ys(t){return Array.isArray(t)&&t.length>0}var Ze=ys;var ir=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},Qr=ir;function ar(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var F,or=class{constructor(e){Xt(this,F,void 0);Jt(this,F,new Set(e))}getLeadingWhitespaceCount(e){let r=W(this,F),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return W(this,F).has(e.charAt(0))}hasTrailingWhitespace(e){return W(this,F).has(le(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${ar([...W(this,F)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return e.split(s)}hasWhitespaceCharacter(e){let r=W(this,F);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=W(this,F);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=W(this,F);return Array.prototype.every.call(e,n=>r.has(n))}};F=new WeakMap;var Xr=or;var Es=[" ",` -`,"\f","\r"," "],Ss=new Xr(Es),Y=Ss;function Se(t){return t.loc.start.offset}function et(t){return t.loc.end.offset}function Jr(t,e){if(t.type==="TextNode"){let r=t.chars.trim();if(!r)return null;e.chars=Y.split(r).join(" ")}t.type==="AttrNode"&&t.name.toLowerCase()==="class"&&delete e.value}Jr.ignoredProperties=new Set(["loc","selfClosing"]);var Zr=Jr;var en=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function rn(t){return t.toUpperCase()===t}function ks(t){return t.type==="ElementNode"&&typeof t.tag=="string"&&!t.tag.startsWith(":")&&(rn(t.tag[0])||t.tag.includes("."))}function ws(t){return en.has(t.toLowerCase())&&!rn(t[0])}function lr(t){return t.selfClosing===!0||ws(t.tag)||ks(t)&&t.children.every(e=>St(e))}function St(t){return t.type==="TextNode"&&!/\S/.test(t.chars)}function tn(t){return(t==null?void 0:t.type)==="MustacheCommentStatement"&&typeof t.value=="string"&&t.value.trim()==="prettier-ignore"}function nn(t){return tn(t.node)||t.isInArray&&(t.key==="children"||t.key==="body"||t.key==="parts")&&tn(t.siblings[t.index-2])}var tt=null;function rt(t){if(tt!==null&&typeof tt.property){let e=tt;return tt=rt.prototype=null,e}return tt=rt.prototype=t??Object.create(null),new rt}var Ts=10;for(let t=0;t<=Ts;t++)rt();function cr(t){return rt(t)}function Ns(t,e="type"){cr(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var sn=Ns;var an={Program:["body"],Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],PartialStatement:["name","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],PathHead:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"],NamedBlock:["attributes","modifiers","children","comments"],SimpleElement:["attributes","modifiers","children","comments"],Component:["head","attributes","modifiers","children","comments"]};var vs=sn(an),on=vs;var mn=2;function As(t,e,r){var s,i,a,l,c,h,g,E,M;let{node:n}=t;switch(n.type){case"Block":case"Program":case"Template":return B(t.map(r,"body"));case"ElementNode":{let b=B(Cs(t,r)),A=e.htmlWhitespaceSensitivity==="ignore"&&((s=t.next)==null?void 0:s.type)==="ElementNode"?G:"";if(lr(n))return[b,A];let L=[""];return n.children.length===0?[b,O(L),A]:e.htmlWhitespaceSensitivity==="ignore"?[b,O(ln(t,e,r)),ye,O(L),A]:[b,O(B(ln(t,e,r))),O(L),A]}case"BlockStatement":return Bs(t)?[Is(t,r),hn(t,r,e),pn(t,r,e)]:[Ds(t,r),B([hn(t,r,e),pn(t,r,e),Rs(t,r,e)])];case"ElementModifierStatement":return B(["{{",dn(t,r),"}}"]);case"MustacheStatement":return B([kt(n),dn(t,r),wt(n)]);case"SubExpression":return B(["(",Gs(t,r),G,")"]);case"AttrNode":{let{name:b,value:A}=n,L=A.type==="TextNode";if(L&&A.chars===""&&Se(A)===et(A))return b;let N=L?Et(A.chars,e.singleQuote):A.type==="ConcatStatement"?Et(A.parts.map(H=>H.type==="TextNode"?H.chars:"").join(""),e.singleQuote):"",re=r("value");return[b,"=",N,b==="class"&&N?B(O(re)):re,N]}case"ConcatStatement":return t.map(r,"parts");case"Hash":return Ee(x,t.map(r,"pairs"));case"HashPair":return[n.key,"=",r("value")];case"TextNode":{let b=Zt(!1,n.chars,"{{","\\{{"),A=qs(t);if(A){if(A==="class"){let X=b.trim().split(/\s+/).join(" "),ne=!1,q=!1;return t.parent.type==="ConcatStatement"&&(((i=t.previous)==null?void 0:i.type)==="MustacheStatement"&&/^\s/.test(b)&&(ne=!0),((a=t.next)==null?void 0:a.type)==="MustacheStatement"&&/\s$/.test(b)&&X!==""&&(q=!0)),[ne?x:"",X,q?x:""]}return jr(b)}let L=Y.isWhitespaceOnly(b),{isFirst:R,isLast:N}=t;if(e.htmlWhitespaceSensitivity!=="ignore"){let X=N&&t.parent.type==="Template",ne=R&&t.parent.type==="Template";if(L){if(ne||X)return"";let C=[x],ie=qe(b);return ie&&(C=nt(ie)),N&&(C=C.map(ft=>rr(ft))),C}let q=Y.getLeadingWhitespace(b),xe=[];if(q){xe=[x];let C=qe(q);C&&(xe=nt(C)),b=b.slice(q.length)}let V=Y.getTrailingWhitespace(b),se=[];if(V){if(!X){se=[x];let C=qe(V);C&&(se=nt(C)),N&&(se=se.map(ie=>rr(ie)))}b=b.slice(0,-V.length)}return[...xe,nr(fn(b)),...se]}let re=qe(b),H=Vs(b),Q=Us(b);if((R||N)&&L&&(t.parent.type==="Block"||t.parent.type==="ElementNode"||t.parent.type==="Template"))return"";L&&re?(H=Math.min(re,mn),Q=0):((((l=t.next)==null?void 0:l.type)==="BlockStatement"||((c=t.next)==null?void 0:c.type)==="ElementNode")&&(Q=Math.max(Q,1)),(((h=t.previous)==null?void 0:h.type)==="BlockStatement"||((g=t.previous)==null?void 0:g.type)==="ElementNode")&&(H=Math.max(H,1)));let Pe="",Ce="";return Q===0&&((E=t.next)==null?void 0:E.type)==="MustacheStatement"&&(Ce=" "),H===0&&((M=t.previous)==null?void 0:M.type)==="MustacheStatement"&&(Pe=" "),R&&(H=0,Pe=""),N&&(Q=0,Ce=""),Y.hasLeadingWhitespace(b)&&(b=Pe+Y.trimStart(b)),Y.hasTrailingWhitespace(b)&&(b=Y.trimEnd(b)+Ce),[...nt(H),nr(fn(b)),...nt(Q)]}case"MustacheCommentStatement":{let b=Se(n),A=et(n),L=e.originalText.charAt(b+2)==="~",R=e.originalText.charAt(A-3)==="~",N=n.value.includes("}}")?"--":"";return["{{",L?"~":"","!",N,n.value,N,R?"~":"","}}"]}case"PathExpression":return n.original;case"BooleanLiteral":return String(n.value);case"CommentStatement":return[""];case"StringLiteral":return Fs(t,e);case"NumberLiteral":return String(n.value);case"UndefinedLiteral":return"undefined";case"NullLiteral":return"null";default:throw new Qr(n,"Handlebars")}}function Ps(t,e){return Se(t)-Se(e)}function Cs(t,e){let{node:r}=t,n=["attributes","modifiers","comments"].filter(i=>Ze(r[i])),s=n.flatMap(i=>r[i]).sort(Ps);for(let i of n)t.each(({node:a})=>{let l=s.indexOf(a);s.splice(l,1,[x,e()])},i);return Ze(r.blockParams)&&s.push(x,hr(r)),["<",r.tag,O(s),xs(r)]}function ln(t,e,r){let{node:n}=t,s=n.children.every(i=>St(i));return e.htmlWhitespaceSensitivity==="ignore"&&s?"":t.map(({isFirst:i})=>{let a=r();return i&&e.htmlWhitespaceSensitivity==="ignore"?[G,a]:a},"children")}function xs(t){return lr(t)?sr([G,"/>"],[" />",G]):sr([G,">"],">")}function kt(t){var n;let e=t.escaped===!1?"{{{":"{{",r=(n=t.strip)!=null&&n.open?"~":"";return[e,r]}function wt(t){var n;let e=t.escaped===!1?"}}}":"}}";return[(n=t.strip)!=null&&n.close?"~":"",e]}function Ls(t){let e=kt(t),r=t.openStrip.open?"~":"";return[e,r,"#"]}function _s(t){let e=wt(t);return[t.openStrip.close?"~":"",e]}function cn(t){let e=kt(t),r=t.closeStrip.open?"~":"";return[e,r,"/"]}function un(t){let e=wt(t);return[t.closeStrip.close?"~":"",e]}function gn(t){let e=kt(t),r=t.inverseStrip.open?"~":"";return[e,r]}function bn(t){let e=wt(t);return[t.inverseStrip.close?"~":"",e]}function Ds(t,e){let{node:r}=t,n=[],s=Tt(t,e);return s&&n.push(B(s)),Ze(r.program.blockParams)&&n.push(hr(r.program)),B([Ls(r),ur(t,e),n.length>0?O([x,Ee(x,n)]):"",G,_s(r)])}function Os(t,e){return[e.htmlWhitespaceSensitivity==="ignore"?ye:"",gn(t),"else",bn(t)]}function Bs(t){var n;let{grandparent:e,node:r}=t;return((n=e==null?void 0:e.inverse)==null?void 0:n.body.length)===1&&e.inverse.body[0]===r&&e.inverse.body[0].path.parts[0]===e.path.parts[0]}function Is(t,e){let{node:r,grandparent:n}=t;return B([gn(n),["else"," ",n.inverse.body[0].path.parts[0]],O([x,B(Tt(t,e)),...Ze(r.program.blockParams)?[x,hr(r.program)]:[]]),G,bn(n)])}function Rs(t,e,r){let{node:n}=t;return r.htmlWhitespaceSensitivity==="ignore"?[yn(n)?G:ye,cn(n),e("path"),un(n)]:[cn(n),e("path"),un(n)]}function yn(t){return t.type==="BlockStatement"&&t.program.body.every(e=>St(e))}function Hs(t){return En(t)&&t.inverse.body.length===1&&t.inverse.body[0].type==="BlockStatement"&&t.inverse.body[0].path.parts[0]===t.path.parts[0]}function En(t){return t.type==="BlockStatement"&&t.inverse}function hn(t,e,r){let{node:n}=t;if(yn(n))return"";let s=e("program");return r.htmlWhitespaceSensitivity==="ignore"?O([ye,s]):O(s)}function pn(t,e,r){let{node:n}=t,s=e("inverse"),i=r.htmlWhitespaceSensitivity==="ignore"?[ye,s]:s;return Hs(n)?i:En(n)?[Os(n,r),O(i)]:""}function fn(t){return Ee(x,Y.split(t))}function qs(t){for(let e=0;e<2;e++){let r=t.getParentNode(e);if((r==null?void 0:r.type)==="AttrNode")return r.name.toLowerCase()}}function qe(t){return t=typeof t=="string"?t:"",t.split(` -`).length-1}function Vs(t){t=typeof t=="string"?t:"";let e=(t.match(/^([^\S\n\r]*[\n\r])+/g)||[])[0]||"";return qe(e)}function Us(t){t=typeof t=="string"?t:"";let e=(t.match(/([\n\r][^\S\n\r]*)+$/g)||[])[0]||"";return qe(e)}function nt(t=0){return Array.from({length:Math.min(t,mn)}).fill(ye)}function Fs(t,e){let{node:{value:r}}=t,n=Et(r,Ms(t)?!e.singleQuote:e.singleQuote);return[n,Zt(!1,r,n,`\\${n}`),n]}function Ms(t){let{ancestors:e}=t,r=e.findIndex(n=>n.type!=="SubExpression");return r!==-1&&e[r+1].type==="ConcatStatement"&&e[r+2].type==="AttrNode"}function Gs(t,e){let r=ur(t,e),n=Tt(t,e);return n?O([r,x,B(n)]):r}function dn(t,e){let r=ur(t,e),n=Tt(t,e);return n?[O([r,x,n]),G]:r}function ur(t,e){return e("path")}function Tt(t,e){var s;let{node:r}=t,n=[];return r.params.length>0&&n.push(...t.map(e,"params")),((s=r.hash)==null?void 0:s.pairs.length)>0&&n.push(e("hash")),n.length===0?"":Ee(x,n)}function hr(t){return["as |",t.blockParams.join(" "),"|"]}var Ys={print:As,massageAstNode:Zr,hasPrettierIgnore:nn,getVisitorKeys:on},Sn=Ys;var Vr={};Qt(Vr,{glimmer:()=>Ea});var zs=Object.freeze([]);function wn(){return zs}var Io=wn(),Ro=wn();function T(t,e){if(!t)throw new Error(e||"assertion failure")}function Nt(t){ii.warn(`DEPRECATION: ${t}`)}function ee(t){if(t==null)throw new Error("Expected value to be present");return t}function vt(t,e){if(t==null)throw new Error(e);return t}function ke(t){return t.length>0}function it(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unexpected empty list";if(!ke(t))throw new Error(e)}function At(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unexpected empty list";return it(t,e),t}function Pt(t){return t.length===0?void 0:t[t.length-1]}function Ct(t){return t.length===0?void 0:t[0]}var we=!1&&(()=>!(typeof window<"u"&&window.location&&/[&?]disable_local_debug/u.test(window.location.search)))(),Ws,Ks,js,$s;if(we){let t=null;Ws=()=>{T(t===null,"attempted to start steps, but it already began"),t={}},Ks=()=>{T(t,"attempted to end steps, but they were not started"),t=null},$s=(e,r)=>{if(t===null)return;let n=t[e];n||(n=t[e]=[]),n.push(r)},js=(e,r,n)=>{let s=vt(t,"attempetd to verify steps, but steps were not started"),i=s[e]||[];s[e]=[],Array.isArray(r)?QUnit.config.current.assert.deepEqual(i,r,n):r(i)}}var Qs;if(!1){let t=n=>{let s=n.name;if(s===void 0){let i=/function (\w+)\s*\(/u.exec(String(n));s=i&&i[1]||""}return s.replace(/^bound /u,"")},e=n=>{let s,i;return n.constructor&&typeof n.constructor=="function"&&(i=t(n.constructor)),"toString"in n&&n.toString!==Object.prototype.toString&&n.toString!==Function.prototype.toString&&(s=n.toString()),s&&/<.*:ember\d+>/u.test(s)&&i&&i[0]!=="_"&&i.length>2&&i!=="Class"?s.replace(/<.*:/u,`<${i}:`):s||i},r=n=>String(n);Qs=n=>typeof n=="function"?t(n)||"(unknown function)":typeof n=="object"&&n!==null?e(n)||"(unknown object)":r(n)}var K=function(t){return t[t.MAX_SMI=1073741823]="MAX_SMI",t[t.MIN_SMI=-1073741824]="MIN_SMI",t[t.SIGN_BIT=-536870913]="SIGN_BIT",t[t.MAX_INT=536870911]="MAX_INT",t[t.MIN_INT=-536870912]="MIN_INT",t[t.FALSE_HANDLE=0]="FALSE_HANDLE",t[t.TRUE_HANDLE=1]="TRUE_HANDLE",t[t.NULL_HANDLE=2]="NULL_HANDLE",t[t.UNDEFINED_HANDLE=3]="UNDEFINED_HANDLE",t[t.ENCODED_FALSE_HANDLE=0]="ENCODED_FALSE_HANDLE",t[t.ENCODED_TRUE_HANDLE=1]="ENCODED_TRUE_HANDLE",t[t.ENCODED_NULL_HANDLE=2]="ENCODED_NULL_HANDLE",t[t.ENCODED_UNDEFINED_HANDLE=3]="ENCODED_UNDEFINED_HANDLE",t}({});function Xs(t){return we&&T(t%1===0&&t>=K.MIN_INT&&t<0,`Could not encode negative: ${t}`),t&K.SIGN_BIT}function Js(t){return we&&T(t%1===0&&t<~K.MAX_INT&&t>=K.MIN_SMI,`Could not decode negative: ${t}`),t|~K.SIGN_BIT}function Zs(t){return we&&T(t%1===0&&t>=0&&t<=K.MAX_INT,`Could not encode positive: ${t}`),~t}function ei(t){return we&&T(t%1===0&&t<=0&&t>=~K.MAX_INT,`Could not decode positive: ${t}`),~t}function ti(t){return we&&T(t%1===0&&t>=0&&t<=K.MAX_SMI,`Could not encode handle: ${t}`),t}function ri(t){return we&&T(t%1===0&&t<=K.MAX_SMI&&t>=0,`Could not decode handle: ${t}`),t}function ni(t){return t|=0,t<0?Xs(t):Zs(t)}function si(t){return t|=0,t>K.SIGN_BIT?ei(t):Js(t)}[1,2,3].forEach(t=>ri(ti(t)));[1,-1].forEach(t=>si(ni(t)));var at=Object.assign;var ii=console,kn=console;function Tn(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unexpected unreachable branch";throw kn.log("unreachable",t),kn.log(`${e} :: ${JSON.stringify(t)} (${t})`),new Error("code reached unreachable")}var ai=function(){var t=function(ae,p,m,f){for(m=m||{},f=ae.length;f--;m[ae[f]]=p);return m},e=[2,44],r=[1,20],n=[5,14,15,19,29,34,39,44,47,48,52,56,60],s=[1,35],i=[1,38],a=[1,30],l=[1,31],c=[1,32],h=[1,33],g=[1,34],E=[1,37],M=[14,15,19,29,34,39,44,47,48,52,56,60],b=[14,15,19,29,34,44,47,48,52,56,60],A=[15,18],L=[14,15,19,29,34,47,48,52,56,60],R=[33,64,71,79,80,81,82,83,84],N=[23,33,55,64,67,71,74,79,80,81,82,83,84],re=[1,51],H=[23,33,55,64,67,71,74,79,80,81,82,83,84,86],Q=[2,43],Pe=[55,64,71,79,80,81,82,83,84],Ce=[1,58],X=[1,59],ne=[1,66],q=[33,64,71,74,79,80,81,82,83,84],xe=[23,64,71,79,80,81,82,83,84],V=[1,76],se=[64,67,71,79,80,81,82,83,84],C=[33,74],ie=[23,33,55,67,71,74],ft=[1,106],Ft=[1,118],Ur=[71,76],Mt={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,expr:49,mustache_repetition0:50,mustache_option0:51,OPEN_UNESCAPED:52,mustache_repetition1:53,mustache_option1:54,CLOSE_UNESCAPED:55,OPEN_PARTIAL:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,sexpr:63,OPEN_SEXPR:64,sexpr_repetition0:65,sexpr_option0:66,CLOSE_SEXPR:67,hash:68,hash_repetition_plus0:69,hashSegment:70,ID:71,EQUALS:72,blockParams:73,OPEN_BLOCK_PARAMS:74,blockParams_repetition_plus0:75,CLOSE_BLOCK_PARAMS:76,path:77,dataName:78,STRING:79,NUMBER:80,BOOLEAN:81,UNDEFINED:82,NULL:83,DATA:84,pathSegments:85,SEP:86,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",52:"OPEN_UNESCAPED",55:"CLOSE_UNESCAPED",56:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",64:"OPEN_SEXPR",67:"CLOSE_SEXPR",71:"ID",72:"EQUALS",74:"OPEN_BLOCK_PARAMS",76:"CLOSE_BLOCK_PARAMS",79:"STRING",80:"NUMBER",81:"BOOLEAN",82:"UNDEFINED",83:"NULL",84:"DATA",86:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[49,1],[49,1],[63,5],[68,1],[70,3],[73,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[78,2],[77,1],[85,3],[85,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[50,0],[50,2],[51,0],[51,1],[53,0],[53,2],[54,0],[54,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[65,0],[65,2],[66,0],[66,1],[69,1],[69,2],[75,1],[75,2]],performAction:function(p,m,f,d,w,o,Le){var u=o.length-1;switch(w){case 1:return o[u-1];case 2:this.$=d.prepareProgram(o[u]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 27:case 28:case 33:case 34:this.$=o[u];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(o[u]),strip:d.stripFlags(o[u],o[u]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:o[u],value:o[u],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(o[u-2],o[u-1],o[u],this._$);break;case 12:this.$={path:o[u-3],params:o[u-2],hash:o[u-1]};break;case 13:this.$=d.prepareBlock(o[u-3],o[u-2],o[u-1],o[u],!1,this._$);break;case 14:this.$=d.prepareBlock(o[u-3],o[u-2],o[u-1],o[u],!0,this._$);break;case 15:this.$={open:o[u-5],path:o[u-4],params:o[u-3],hash:o[u-2],blockParams:o[u-1],strip:d.stripFlags(o[u-5],o[u])};break;case 16:case 17:this.$={path:o[u-4],params:o[u-3],hash:o[u-2],blockParams:o[u-1],strip:d.stripFlags(o[u-5],o[u])};break;case 18:this.$={strip:d.stripFlags(o[u-1],o[u-1]),program:o[u]};break;case 19:var oe=d.prepareBlock(o[u-2],o[u-1],o[u],o[u],!1,this._$),Ge=d.prepareProgram([oe],o[u-1].loc);Ge.chained=!0,this.$={strip:o[u-2].strip,program:Ge,chain:!0};break;case 21:this.$={path:o[u-1],strip:d.stripFlags(o[u-2],o[u])};break;case 22:case 23:this.$=d.prepareMustache(o[u-3],o[u-2],o[u-1],o[u-4],d.stripFlags(o[u-4],o[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:o[u-3],params:o[u-2],hash:o[u-1],indent:"",strip:d.stripFlags(o[u-4],o[u]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(o[u-2],o[u-1],o[u],this._$);break;case 26:this.$={path:o[u-3],params:o[u-2],hash:o[u-1],strip:d.stripFlags(o[u-4],o[u])};break;case 29:this.$={type:"SubExpression",path:o[u-3],params:o[u-2],hash:o[u-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:o[u],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(o[u-2]),value:o[u],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(o[u-1]);break;case 35:this.$={type:"StringLiteral",value:o[u],original:o[u],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(o[u]),original:Number(o[u]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:o[u]==="true",original:o[u]==="true",loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=d.preparePath(!0,o[u],this._$);break;case 41:this.$=d.preparePath(!1,o[u],this._$);break;case 42:o[u-2].push({part:d.id(o[u]),original:o[u],separator:o[u-1]}),this.$=o[u-2];break;case 43:this.$=[{part:d.id(o[u]),original:o[u]}];break;case 44:case 46:case 48:case 56:case 62:case 68:case 76:case 80:case 84:case 88:case 92:this.$=[];break;case 45:case 47:case 49:case 57:case 63:case 69:case 77:case 81:case 85:case 89:case 93:case 97:case 99:o[u-1].push(o[u]);break;case 96:case 98:this.$=[o[u]];break}},table:[t([5,14,15,19,29,34,48,52,56,60],e,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,59:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],52:[1,14],56:[1,18],60:[1,24]}),{1:[2,1]},t(n,[2,45]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),t(n,[2,9]),{20:26,49:25,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:26,49:39,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(M,e,{6:3,4:40}),t(b,e,{6:3,4:41}),t(A,[2,46],{17:42}),{20:26,49:43,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(L,e,{6:3,4:44}),t([5,14,15,18,19,29,34,39,44,47,48,52,56,60],[2,10]),{20:45,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:46,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:47,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:26,49:48,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(R,[2,76],{50:49}),t(N,[2,27]),t(N,[2,28]),t(N,[2,33]),t(N,[2,34]),t(N,[2,35]),t(N,[2,36]),t(N,[2,37]),t(N,[2,38]),t(N,[2,39]),{20:26,49:50,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(N,[2,41],{86:re}),{71:i,85:52},t(H,Q),t(Pe,[2,80],{53:53}),{25:54,38:56,39:Ce,43:57,44:X,45:55,47:[2,52]},{28:60,43:61,44:X,47:[2,54]},{13:63,15:r,18:[1,62]},t(R,[2,84],{57:64}),{26:65,47:ne},t(q,[2,56],{30:67}),t(q,[2,62],{35:68}),t(xe,[2,48],{21:69}),t(R,[2,88],{61:70}),{20:26,33:[2,78],49:72,51:71,63:27,64:s,68:73,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(se,[2,92],{65:77}),{71:[1,78]},t(N,[2,40],{86:re}),{20:26,49:80,54:79,55:[2,82],63:27,64:s,68:81,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{26:82,47:ne},{47:[2,53]},t(M,e,{6:3,4:83}),{47:[2,20]},{20:84,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(L,e,{6:3,4:85}),{26:86,47:ne},{47:[2,55]},t(n,[2,11]),t(A,[2,47]),{20:26,33:[2,86],49:88,58:87,63:27,64:s,68:89,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(n,[2,25]),{20:90,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(C,[2,58],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,31:91,49:92,68:93,64:s,71:V,79:a,80:l,81:c,82:h,83:g,84:E}),t(C,[2,64],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,36:94,49:95,68:96,64:s,71:V,79:a,80:l,81:c,82:h,83:g,84:E}),{20:26,22:97,23:[2,50],49:98,63:27,64:s,68:99,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:26,33:[2,90],49:101,62:100,63:27,64:s,68:102,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{33:[1,103]},t(R,[2,77]),{33:[2,79]},t([23,33,55,67,74],[2,30],{70:104,71:[1,105]}),t(ie,[2,96]),t(H,Q,{72:ft}),{20:26,49:108,63:27,64:s,66:107,67:[2,94],68:109,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(H,[2,42]),{55:[1,110]},t(Pe,[2,81]),{55:[2,83]},t(n,[2,13]),{38:56,39:Ce,43:57,44:X,45:112,46:111,47:[2,74]},t(q,[2,68],{40:113}),{47:[2,18]},t(n,[2,14]),{33:[1,114]},t(R,[2,85]),{33:[2,87]},{33:[1,115]},{32:116,33:[2,60],73:117,74:Ft},t(q,[2,57]),t(C,[2,59]),{33:[2,66],37:119,73:120,74:Ft},t(q,[2,63]),t(C,[2,65]),{23:[1,121]},t(xe,[2,49]),{23:[2,51]},{33:[1,122]},t(R,[2,89]),{33:[2,91]},t(n,[2,22]),t(ie,[2,97]),{72:ft},{20:26,49:123,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{67:[1,124]},t(se,[2,93]),{67:[2,95]},t(n,[2,23]),{47:[2,19]},{47:[2,75]},t(C,[2,70],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,41:125,49:126,68:127,64:s,71:V,79:a,80:l,81:c,82:h,83:g,84:E}),t(n,[2,24]),t(n,[2,21]),{33:[1,128]},{33:[2,61]},{71:[1,130],75:129},{33:[1,131]},{33:[2,67]},t(A,[2,12]),t(L,[2,26]),t(ie,[2,31]),t(N,[2,29]),{33:[2,72],42:132,73:133,74:Ft},t(q,[2,69]),t(C,[2,71]),t(M,[2,15]),{71:[1,135],76:[1,134]},t(Ur,[2,98]),t(b,[2,16]),{33:[1,136]},{33:[2,73]},{33:[2,32]},t(Ur,[2,99]),t(M,[2,17])],defaultActions:{4:[2,1],55:[2,53],57:[2,20],61:[2,55],73:[2,79],81:[2,83],85:[2,18],89:[2,87],99:[2,51],102:[2,91],109:[2,95],111:[2,19],112:[2,75],117:[2,61],120:[2,67],133:[2,73],134:[2,32]},parseError:function(p,m){if(m.recoverable)this.trace(p);else{var f=new Error(p);throw f.hash=m,f}},parse:function(p){var m=this,f=[0],d=[],w=[null],o=[],Le=this.table,u="",oe=0,Ge=0,Fr=0,Zn=2,Mr=1,es=o.slice.call(arguments,1),P=Object.create(this.lexer),me={yy:{}};for(var Yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Yt)&&(me.yy[Yt]=this.yy[Yt]);P.setInput(p,me.yy),me.yy.lexer=P,me.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var zt=P.yylloc;o.push(zt);var ts=P.options&&P.options.ranges;typeof me.yy.parseError=="function"?this.parseError=me.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function wa(z){f.length=f.length-2*z,w.length=w.length-z,o.length=o.length-z}for(var rs=function(){var z;return z=P.lex()||Mr,typeof z!="number"&&(z=m.symbols_[z]||z),z},D,Wt,ge,U,Ta,Kt,_e={},dt,J,Gr,mt;;){if(ge=f[f.length-1],this.defaultActions[ge]?U=this.defaultActions[ge]:((D===null||typeof D>"u")&&(D=rs()),U=Le[ge]&&Le[ge][D]),typeof U>"u"||!U.length||!U[0]){var jt="";mt=[];for(dt in Le[ge])this.terminals_[dt]&&dt>Zn&&mt.push("'"+this.terminals_[dt]+"'");P.showPosition?jt="Parse error on line "+(oe+1)+`: -`+P.showPosition()+` -Expecting `+mt.join(", ")+", got '"+(this.terminals_[D]||D)+"'":jt="Parse error on line "+(oe+1)+": Unexpected "+(D==Mr?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(jt,{text:P.match,token:this.terminals_[D]||D,line:P.yylineno,loc:zt,expected:mt})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ge+", token: "+D);switch(U[0]){case 1:f.push(D),w.push(P.yytext),o.push(P.yylloc),f.push(U[1]),D=null,Wt?(D=Wt,Wt=null):(Ge=P.yyleng,u=P.yytext,oe=P.yylineno,zt=P.yylloc,Fr>0&&Fr--);break;case 2:if(J=this.productions_[U[1]][1],_e.$=w[w.length-J],_e._$={first_line:o[o.length-(J||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(J||1)].first_column,last_column:o[o.length-1].last_column},ts&&(_e._$.range=[o[o.length-(J||1)].range[0],o[o.length-1].range[1]]),Kt=this.performAction.apply(_e,[u,Ge,oe,me.yy,U[1],w,o].concat(es)),typeof Kt<"u")return Kt;J&&(f=f.slice(0,-1*J*2),w=w.slice(0,-1*J),o=o.slice(0,-1*J)),f.push(this.productions_[U[1]][0]),w.push(_e.$),o.push(_e._$),Gr=Le[f[f.length-2]][f[f.length-1]],f.push(Gr);break;case 3:return!0}}return!0}},Jn=function(){var ae={EOF:1,parseError:function(m,f){if(this.yy.parser)this.yy.parser.parseError(m,f);else throw new Error(m)},setInput:function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},unput:function(p){var m=p.length,f=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===d.length?this.yylloc.first_column:0)+d[d.length-f.length].length-f[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e()}})(function(){"use strict";var Yt=Object.defineProperty;var es=Object.getOwnPropertyDescriptor;var ts=Object.getOwnPropertyNames;var rs=Object.prototype.hasOwnProperty;var zt=(t,e)=>{for(var r in e)Yt(t,r,{get:e[r],enumerable:!0})},ns=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ts(e))!rs.call(t,s)&&s!==r&&Yt(t,s,{get:()=>e[s],enumerable:!(n=es(e,s))||n.enumerable});return t};var ss=t=>ns(Yt({},"__esModule",{value:!0}),t);var Ur=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var W=(t,e,r)=>(Ur(t,e,"read from private field"),r?r.call(t):e.get(t)),Wt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Kt=(t,e,r,n)=>(Ur(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var ba={};zt(ba,{languages:()=>yn,parsers:()=>Rr,printers:()=>ga});var is=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},jt=is;var Me="string",Ge="array",Ye="cursor",Le="indent",_e="align",ze="trim",De="group",Oe="fill",Be="if-break",We="indent-if-break",Ke="line-suffix",je="line-suffix-boundary",J="line",$e="label",Ie="break-parent",ft=new Set([Ye,Le,_e,ze,De,Oe,Be,We,Ke,je,J,$e,Ie]);function as(t){if(typeof t=="string")return Me;if(Array.isArray(t))return Ge;if(!t)return;let{type:e}=t;if(ft.has(e))return e}var Qe=as;var os=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function ls(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(Qe(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=os([...ft].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${n}.`}var $t=class extends Error{name="InvalidDocError";constructor(e){super(ls(e)),this.doc=e}},Qt=$t;var Mr=()=>{},ge=Mr,dt=Mr;function O(t){return ge(t),{type:Le,contents:t}}function cs(t,e){return ge(e),{type:_e,contents:e,n:t}}function B(t,e={}){return ge(t),dt(e.expandedStates,!0),{type:De,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Xt(t){return cs(-1,t)}function Jt(t){return dt(t),{type:Oe,parts:t}}function Zt(t,e="",r={}){return ge(t),e!==""&&ge(e),{type:Be,breakContents:t,flatContents:e,groupId:r.groupId}}var Gr={type:Ie};var us={type:J,hard:!0},hs={type:J,hard:!0,literal:!0},C={type:J},G={type:J,soft:!0},be=[us,Gr],Yr=[hs,Gr];function ye(t,e){ge(t),dt(e);let r=[];for(let n=0;n{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},oe=ps;function fs(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Qe(i)){case Ge:return e(i.map(n));case Oe:return e({...i,parts:i.parts.map(n)});case Be:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case De:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case _e:case Le:case We:case $e:case Ke:return e({...i,contents:n(i.contents)});case Me:case Ye:case ze:case je:case J:case Ie:return e(i);default:throw new Qt(i)}}}function zr(t,e=Yr){return fs(t,r=>typeof r=="string"?ye(e,r.split(` +`)):r)}var mt="'",Wr='"';function ds(t,e){let r=e===!0||e===mt?mt:Wr,n=r===mt?Wr:mt,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var gt=ds;function er(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var U,tr=class{constructor(e){Wt(this,U,void 0);Kt(this,U,new Set(e))}getLeadingWhitespaceCount(e){let r=W(this,U),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return W(this,U).has(e.charAt(0))}hasTrailingWhitespace(e){return W(this,U).has(oe(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${er([...W(this,U)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return e.split(s)}hasWhitespaceCharacter(e){let r=W(this,U);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=W(this,U);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=W(this,U);return Array.prototype.every.call(e,n=>r.has(n))}};U=new WeakMap;var Kr=tr;var ms=[" ",` +`,"\f","\r"," "],gs=new Kr(ms),Y=gs;function bs(t){return Array.isArray(t)&&t.length>0}var Xe=bs;var rr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},jr=rr;function $r(t,e){if(t.type==="TextNode"){let r=t.chars.trim();if(!r)return null;e.chars=Y.split(r).join(" ")}t.type==="ElementNode"&&(delete e.startTag,delete e.parts,delete e.endTag,delete e.nameNode),(t.type==="Block"||t.type==="ElementNode")&&delete e.blockParamNodes,t.type==="AttrNode"&&t.name.toLowerCase()==="class"&&delete e.value}$r.ignoredProperties=new Set(["loc","selfClosing"]);var Qr=$r;var Je=null;function Ze(t){if(Je!==null&&typeof Je.property){let e=Je;return Je=Ze.prototype=null,e}return Je=Ze.prototype=t??Object.create(null),new Ze}var ys=10;for(let t=0;t<=ys;t++)Ze();function nr(t){return Ze(t)}function Es(t,e="type"){nr(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var Xr=Es;var Jr={Program:["body"],Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],PartialStatement:["name","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],PathHead:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"],NamedBlock:["attributes","modifiers","children","comments"],SimpleElement:["attributes","modifiers","children","comments"],Component:["head","attributes","modifiers","children","comments"]};var Ss=Xr(Jr),Zr=Ss;function Ee(t){return t.loc.start.offset}function et(t){return t.loc.end.offset}var en=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function rn(t){return t.toUpperCase()===t}function ks(t){return t.type==="ElementNode"&&typeof t.tag=="string"&&!t.tag.startsWith(":")&&(rn(t.tag[0])||t.tag.includes("."))}function ws(t){return en.has(t.toLowerCase())&&!rn(t[0])}function sr(t){return t.selfClosing===!0||ws(t.tag)||ks(t)&&t.children.every(e=>bt(e))}function bt(t){return t.type==="TextNode"&&!/\S/.test(t.chars)}function tn(t){return(t==null?void 0:t.type)==="MustacheCommentStatement"&&typeof t.value=="string"&&t.value.trim()==="prettier-ignore"}function nn(t){return tn(t.node)||t.isInArray&&(t.key==="children"||t.key==="body"||t.key==="parts")&&tn(t.siblings[t.index-2])}var pn=2;function Ts(t,e,r){var s,i,a,o,c,h,g,E,M;let{node:n}=t;switch(n.type){case"Block":case"Program":case"Template":return B(t.map(r,"body"));case"ElementNode":{let b=B(vs(t,r)),v=e.htmlWhitespaceSensitivity==="ignore"&&((s=t.next)==null?void 0:s.type)==="ElementNode"?G:"";if(sr(n))return[b,v];let L=[""];return n.children.length===0?[b,O(L),v]:e.htmlWhitespaceSensitivity==="ignore"?[b,O(sn(t,e,r)),be,O(L),v]:[b,O(B(sn(t,e,r))),O(L),v]}case"BlockStatement":return _s(t)?[Ds(t,r),ln(t,r,e),cn(t,r,e)]:[Cs(t,r),B([ln(t,r,e),cn(t,r,e),Os(t,r,e)])];case"ElementModifierStatement":return B(["{{",hn(t,r),"}}"]);case"MustacheStatement":return B([yt(n),hn(t,r),Et(n)]);case"SubExpression":return B(["(",Fs(t,r),G,")"]);case"AttrNode":{let{name:b,value:v}=n,L=v.type==="TextNode";if(L&&v.chars===""&&Ee(v)===et(v))return b;let T=L?gt(v.chars,e.singleQuote):v.type==="ConcatStatement"?gt(v.parts.map(H=>H.type==="TextNode"?H.chars:"").join(""),e.singleQuote):"",te=r("value");return[b,"=",T,b==="class"&&T?B(O(te)):te,T]}case"ConcatStatement":return t.map(r,"parts");case"Hash":return ye(C,t.map(r,"pairs"));case"HashPair":return[n.key,"=",r("value")];case"TextNode":{let b=jt(!1,n.chars,"{{","\\{{"),v=Is(t);if(v){if(v==="class"){let Q=b.trim().split(/\s+/).join(" "),re=!1,q=!1;return t.parent.type==="ConcatStatement"&&(((i=t.previous)==null?void 0:i.type)==="MustacheStatement"&&/^\s/.test(b)&&(re=!0),((a=t.next)==null?void 0:a.type)==="MustacheStatement"&&/\s$/.test(b)&&Q!==""&&(q=!0)),[re?C:"",Q,q?C:""]}return zr(b)}let L=Y.isWhitespaceOnly(b),{isFirst:R,isLast:T}=t;if(e.htmlWhitespaceSensitivity!=="ignore"){let Q=T&&t.parent.type==="Template",re=R&&t.parent.type==="Template";if(L){if(re||Q)return"";let x=[C],se=Re(b);return se&&(x=tt(se)),T&&(x=x.map(ut=>Xt(ut))),x}let q=Y.getLeadingWhitespace(b),Pe=[];if(q){Pe=[C];let x=Re(q);x&&(Pe=tt(x)),b=b.slice(q.length)}let V=Y.getTrailingWhitespace(b),ne=[];if(V){if(!Q){ne=[C];let x=Re(V);x&&(ne=tt(x)),T&&(ne=ne.map(se=>Xt(se)))}b=b.slice(0,-V.length)}return[...Pe,Jt(un(b)),...ne]}let te=Re(b),H=Rs(b),$=Hs(b);if((R||T)&&L&&(t.parent.type==="Block"||t.parent.type==="ElementNode"||t.parent.type==="Template"))return"";L&&te?(H=Math.min(te,pn),$=0):((((o=t.next)==null?void 0:o.type)==="BlockStatement"||((c=t.next)==null?void 0:c.type)==="ElementNode")&&($=Math.max($,1)),(((h=t.previous)==null?void 0:h.type)==="BlockStatement"||((g=t.previous)==null?void 0:g.type)==="ElementNode")&&(H=Math.max(H,1)));let ve="",Ae="";return $===0&&((E=t.next)==null?void 0:E.type)==="MustacheStatement"&&(Ae=" "),H===0&&((M=t.previous)==null?void 0:M.type)==="MustacheStatement"&&(ve=" "),R&&(H=0,ve=""),T&&($=0,Ae=""),Y.hasLeadingWhitespace(b)&&(b=ve+Y.trimStart(b)),Y.hasTrailingWhitespace(b)&&(b=Y.trimEnd(b)+Ae),[...tt(H),Jt(un(b)),...tt($)]}case"MustacheCommentStatement":{let b=Ee(n),v=et(n),L=e.originalText.charAt(b+2)==="~",R=e.originalText.charAt(v-3)==="~",T=n.value.includes("}}")?"--":"";return["{{",L?"~":"","!",T,n.value,T,R?"~":"","}}"]}case"PathExpression":return Ys(n);case"BooleanLiteral":return String(n.value);case"CommentStatement":return[""];case"StringLiteral":return qs(t,e);case"NumberLiteral":return String(n.value);case"UndefinedLiteral":return"undefined";case"NullLiteral":return"null";default:throw new jr(n,"Handlebars")}}function Ns(t,e){return Ee(t)-Ee(e)}function vs(t,e){let{node:r}=t,n=["attributes","modifiers","comments"].filter(i=>Xe(r[i])),s=n.flatMap(i=>r[i]).sort(Ns);for(let i of n)t.each(({node:a})=>{let o=s.indexOf(a);s.splice(o,1,[C,e()])},i);return Xe(r.blockParams)&&s.push(C,ar(r)),["<",r.tag,O(s),As(r)]}function sn(t,e,r){let{node:n}=t,s=n.children.every(i=>bt(i));return e.htmlWhitespaceSensitivity==="ignore"&&s?"":t.map(({isFirst:i})=>{let a=r();return i&&e.htmlWhitespaceSensitivity==="ignore"?[G,a]:a},"children")}function As(t){return sr(t)?Zt([G,"/>"],[" />",G]):Zt([G,">"],">")}function yt(t){var n;let e=t.escaped===!1?"{{{":"{{",r=(n=t.strip)!=null&&n.open?"~":"";return[e,r]}function Et(t){var n;let e=t.escaped===!1?"}}}":"}}";return[(n=t.strip)!=null&&n.close?"~":"",e]}function Ps(t){let e=yt(t),r=t.openStrip.open?"~":"";return[e,r,"#"]}function xs(t){let e=Et(t);return[t.openStrip.close?"~":"",e]}function an(t){let e=yt(t),r=t.closeStrip.open?"~":"";return[e,r,"/"]}function on(t){let e=Et(t);return[t.closeStrip.close?"~":"",e]}function fn(t){let e=yt(t),r=t.inverseStrip.open?"~":"";return[e,r]}function dn(t){let e=Et(t);return[t.inverseStrip.close?"~":"",e]}function Cs(t,e){let{node:r}=t,n=[],s=St(t,e);return s&&n.push(B(s)),Xe(r.program.blockParams)&&n.push(ar(r.program)),B([Ps(r),ir(t,e),n.length>0?O([C,ye(C,n)]):"",G,xs(r)])}function Ls(t,e){return[e.htmlWhitespaceSensitivity==="ignore"?be:"",fn(t),"else",dn(t)]}function _s(t){var n;let{grandparent:e,node:r}=t;return((n=e==null?void 0:e.inverse)==null?void 0:n.body.length)===1&&e.inverse.body[0]===r&&e.inverse.body[0].path.parts[0]===e.path.parts[0]}function Ds(t,e){let{node:r,grandparent:n}=t;return B([fn(n),["else"," ",n.inverse.body[0].path.parts[0]],O([C,B(St(t,e)),...Xe(r.program.blockParams)?[C,ar(r.program)]:[]]),G,dn(n)])}function Os(t,e,r){let{node:n}=t;return r.htmlWhitespaceSensitivity==="ignore"?[mn(n)?G:be,an(n),e("path"),on(n)]:[an(n),e("path"),on(n)]}function mn(t){return t.type==="BlockStatement"&&t.program.body.every(e=>bt(e))}function Bs(t){return gn(t)&&t.inverse.body.length===1&&t.inverse.body[0].type==="BlockStatement"&&t.inverse.body[0].path.parts[0]===t.path.parts[0]}function gn(t){return t.type==="BlockStatement"&&t.inverse}function ln(t,e,r){let{node:n}=t;if(mn(n))return"";let s=e("program");return r.htmlWhitespaceSensitivity==="ignore"?O([be,s]):O(s)}function cn(t,e,r){let{node:n}=t,s=e("inverse"),i=r.htmlWhitespaceSensitivity==="ignore"?[be,s]:s;return Bs(n)?i:gn(n)?[Ls(n,r),O(i)]:""}function un(t){return ye(C,Y.split(t))}function Is(t){for(let e=0;e<2;e++){let r=t.getParentNode(e);if((r==null?void 0:r.type)==="AttrNode")return r.name.toLowerCase()}}function Re(t){return t=typeof t=="string"?t:"",t.split(` +`).length-1}function Rs(t){t=typeof t=="string"?t:"";let e=(t.match(/^([^\S\n\r]*[\n\r])+/g)||[])[0]||"";return Re(e)}function Hs(t){t=typeof t=="string"?t:"";let e=(t.match(/([\n\r][^\S\n\r]*)+$/g)||[])[0]||"";return Re(e)}function tt(t=0){return Array.from({length:Math.min(t,pn)}).fill(be)}function qs(t,e){let{node:{value:r}}=t,n=gt(r,Vs(t)?!e.singleQuote:e.singleQuote);return[n,jt(!1,r,n,`\\${n}`),n]}function Vs(t){let{ancestors:e}=t,r=e.findIndex(n=>n.type!=="SubExpression");return r!==-1&&e[r+1].type==="ConcatStatement"&&e[r+2].type==="AttrNode"}function Fs(t,e){let r=ir(t,e),n=St(t,e);return n?O([r,C,B(n)]):r}function hn(t,e){let r=ir(t,e),n=St(t,e);return n?[O([r,C,n]),G]:r}function ir(t,e){return e("path")}function St(t,e){var s;let{node:r}=t,n=[];return r.params.length>0&&n.push(...t.map(e,"params")),((s=r.hash)==null?void 0:s.pairs.length)>0&&n.push(e("hash")),n.length===0?"":ye(C,n)}function ar(t){return["as |",t.blockParams.join(" "),"|"]}var Us=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),Ms=new Set(["true","false","null","undefined"]),Gs=(t,e)=>e!==0&&Ms.has(t)||/\s/.test(t)||/^\d/.test(t)||Array.prototype.some.call(t,r=>Us.has(r));function Ys(t){if(t.data||t.parts.length===1&&t.original.includes("/"))return t.original;let{parts:e}=t;return t.this&&(e=["this",...e]),e.map((r,n)=>Gs(r,n)?`[${r}]`:r).join(".")}var zs={print:Ts,massageAstNode:Qr,hasPrettierIgnore:nn,getVisitorKeys:Zr},bn=zs;var yn=[{linguistLanguageId:155,name:"Handlebars",type:"markup",color:"#f7931e",aliases:["hbs","htmlbars"],extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",parsers:["glimmer"],vscodeLanguageIds:["handlebars"]}];var Rr={};zt(Rr,{glimmer:()=>ma});var Ws=Object.freeze([]);function Sn(){return Ws}var Do=Sn(),Oo=Sn();function P(t,e){if(!t)throw new Error(e||"assertion failure")}function Z(t){if(t==null)throw new Error("Expected value to be present");return t}function or(t,e){if(t==null)throw new Error(e);return t}function Se(t){return t.length>0}function rt(t,e="unexpected empty list"){if(!Se(t))throw new Error(e)}function wt(t,e="unexpected empty list"){return rt(t,e),t}function Tt(t){return t.length===0?void 0:t[t.length-1]}function Nt(t){return t.length===0?void 0:t[0]}var Ks;if(!1){let t=n=>{let s=n.name;if(s===void 0){let i=/function (\w+)\s*\(/u.exec(String(n));s=i&&i[1]||""}return s.replace(/^bound /u,"")},e=n=>{let s,i;return n.constructor&&typeof n.constructor=="function"&&(i=t(n.constructor)),"toString"in n&&n.toString!==Object.prototype.toString&&n.toString!==Function.prototype.toString&&(s=n.toString()),s&&/<.*:ember\d+>/u.test(s)&&i&&i[0]!=="_"&&i.length>2&&i!=="Class"?s.replace(/<.*:/u,`<${i}:`):s||i},r=n=>String(n);Ks=n=>typeof n=="function"?t(n)||"(unknown function)":typeof n=="object"&&n!==null?e(n)||"(unknown object)":r(n)}var lr=function(t){return t[t.MAX_SMI=1073741823]="MAX_SMI",t[t.MIN_SMI=-1073741824]="MIN_SMI",t[t.SIGN_BIT=-536870913]="SIGN_BIT",t[t.MAX_INT=536870911]="MAX_INT",t[t.MIN_INT=-536870912]="MIN_INT",t[t.FALSE_HANDLE=0]="FALSE_HANDLE",t[t.TRUE_HANDLE=1]="TRUE_HANDLE",t[t.NULL_HANDLE=2]="NULL_HANDLE",t[t.UNDEFINED_HANDLE=3]="UNDEFINED_HANDLE",t[t.ENCODED_FALSE_HANDLE=0]="ENCODED_FALSE_HANDLE",t[t.ENCODED_TRUE_HANDLE=1]="ENCODED_TRUE_HANDLE",t[t.ENCODED_NULL_HANDLE=2]="ENCODED_NULL_HANDLE",t[t.ENCODED_UNDEFINED_HANDLE=3]="ENCODED_UNDEFINED_HANDLE",t}({});function js(t){return t&lr.SIGN_BIT}function $s(t){return t|~lr.SIGN_BIT}function Qs(t){return~t}function Xs(t){return~t}function Js(t){return t|=0,t<0?js(t):Qs(t)}function Zs(t){return t|=0,t>lr.SIGN_BIT?Xs(t):$s(t)}[1,-1].forEach(t=>Zs(Js(t)));var nt=Object.assign;var En=console;function kn(t,e="unexpected unreachable branch"){throw En.log("unreachable",t),En.log(`${e} :: ${JSON.stringify(t)} (${t})`),new Error("code reached unreachable")}var ei=function(){var t=function(ie,p,m,f){for(m=m||{},f=ie.length;f--;m[ie[f]]=p);return m},e=[2,44],r=[1,20],n=[5,14,15,19,29,34,39,44,47,48,52,56,60],s=[1,35],i=[1,38],a=[1,30],o=[1,31],c=[1,32],h=[1,33],g=[1,34],E=[1,37],M=[14,15,19,29,34,39,44,47,48,52,56,60],b=[14,15,19,29,34,44,47,48,52,56,60],v=[15,18],L=[14,15,19,29,34,47,48,52,56,60],R=[33,64,71,79,80,81,82,83,84],T=[23,33,55,64,67,71,74,79,80,81,82,83,84],te=[1,51],H=[23,33,55,64,67,71,74,79,80,81,82,83,84,86],$=[2,43],ve=[55,64,71,79,80,81,82,83,84],Ae=[1,58],Q=[1,59],re=[1,66],q=[33,64,71,74,79,80,81,82,83,84],Pe=[23,64,71,79,80,81,82,83,84],V=[1,76],ne=[64,67,71,79,80,81,82,83,84],x=[33,74],se=[23,33,55,67,71,74],ut=[1,106],Rt=[1,118],Hr=[71,76],Ht={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,expr:49,mustache_repetition0:50,mustache_option0:51,OPEN_UNESCAPED:52,mustache_repetition1:53,mustache_option1:54,CLOSE_UNESCAPED:55,OPEN_PARTIAL:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,sexpr:63,OPEN_SEXPR:64,sexpr_repetition0:65,sexpr_option0:66,CLOSE_SEXPR:67,hash:68,hash_repetition_plus0:69,hashSegment:70,ID:71,EQUALS:72,blockParams:73,OPEN_BLOCK_PARAMS:74,blockParams_repetition_plus0:75,CLOSE_BLOCK_PARAMS:76,path:77,dataName:78,STRING:79,NUMBER:80,BOOLEAN:81,UNDEFINED:82,NULL:83,DATA:84,pathSegments:85,SEP:86,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",52:"OPEN_UNESCAPED",55:"CLOSE_UNESCAPED",56:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",64:"OPEN_SEXPR",67:"CLOSE_SEXPR",71:"ID",72:"EQUALS",74:"OPEN_BLOCK_PARAMS",76:"CLOSE_BLOCK_PARAMS",79:"STRING",80:"NUMBER",81:"BOOLEAN",82:"UNDEFINED",83:"NULL",84:"DATA",86:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[49,1],[49,1],[63,5],[68,1],[70,3],[73,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[78,2],[77,1],[85,3],[85,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[50,0],[50,2],[51,0],[51,1],[53,0],[53,2],[54,0],[54,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[65,0],[65,2],[66,0],[66,1],[69,1],[69,2],[75,1],[75,2]],performAction:function(p,m,f,d,w,l,xe){var u=l.length-1;switch(w){case 1:return l[u-1];case 2:this.$=d.prepareProgram(l[u]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 27:case 28:case 33:case 34:this.$=l[u];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(l[u]),strip:d.stripFlags(l[u],l[u]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[u],value:l[u],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(l[u-2],l[u-1],l[u],this._$);break;case 12:this.$={path:l[u-3],params:l[u-2],hash:l[u-1]};break;case 13:this.$=d.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!1,this._$);break;case 14:this.$=d.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!0,this._$);break;case 15:this.$={open:l[u-5],path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:d.stripFlags(l[u-5],l[u])};break;case 16:case 17:this.$={path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:d.stripFlags(l[u-5],l[u])};break;case 18:this.$={strip:d.stripFlags(l[u-1],l[u-1]),program:l[u]};break;case 19:var ae=d.prepareBlock(l[u-2],l[u-1],l[u],l[u],!1,this._$),Ue=d.prepareProgram([ae],l[u-1].loc);Ue.chained=!0,this.$={strip:l[u-2].strip,program:Ue,chain:!0};break;case 21:this.$={path:l[u-1],strip:d.stripFlags(l[u-2],l[u])};break;case 22:case 23:this.$=d.prepareMustache(l[u-3],l[u-2],l[u-1],l[u-4],d.stripFlags(l[u-4],l[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[u-3],params:l[u-2],hash:l[u-1],indent:"",strip:d.stripFlags(l[u-4],l[u]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(l[u-2],l[u-1],l[u],this._$);break;case 26:this.$={path:l[u-3],params:l[u-2],hash:l[u-1],strip:d.stripFlags(l[u-4],l[u])};break;case 29:this.$={type:"SubExpression",path:l[u-3],params:l[u-2],hash:l[u-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[u],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(l[u-2]),value:l[u],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(l[u-1]);break;case 35:this.$={type:"StringLiteral",value:l[u],original:l[u],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[u]),original:Number(l[u]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[u]==="true",original:l[u]==="true",loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=d.preparePath(!0,l[u],this._$);break;case 41:this.$=d.preparePath(!1,l[u],this._$);break;case 42:l[u-2].push({part:d.id(l[u]),original:l[u],separator:l[u-1]}),this.$=l[u-2];break;case 43:this.$=[{part:d.id(l[u]),original:l[u]}];break;case 44:case 46:case 48:case 56:case 62:case 68:case 76:case 80:case 84:case 88:case 92:this.$=[];break;case 45:case 47:case 49:case 57:case 63:case 69:case 77:case 81:case 85:case 89:case 93:case 97:case 99:l[u-1].push(l[u]);break;case 96:case 98:this.$=[l[u]];break}},table:[t([5,14,15,19,29,34,48,52,56,60],e,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,59:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],52:[1,14],56:[1,18],60:[1,24]}),{1:[2,1]},t(n,[2,45]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),t(n,[2,9]),{20:26,49:25,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:26,49:39,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(M,e,{6:3,4:40}),t(b,e,{6:3,4:41}),t(v,[2,46],{17:42}),{20:26,49:43,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(L,e,{6:3,4:44}),t([5,14,15,18,19,29,34,39,44,47,48,52,56,60],[2,10]),{20:45,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:46,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:47,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:26,49:48,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(R,[2,76],{50:49}),t(T,[2,27]),t(T,[2,28]),t(T,[2,33]),t(T,[2,34]),t(T,[2,35]),t(T,[2,36]),t(T,[2,37]),t(T,[2,38]),t(T,[2,39]),{20:26,49:50,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(T,[2,41],{86:te}),{71:i,85:52},t(H,$),t(ve,[2,80],{53:53}),{25:54,38:56,39:Ae,43:57,44:Q,45:55,47:[2,52]},{28:60,43:61,44:Q,47:[2,54]},{13:63,15:r,18:[1,62]},t(R,[2,84],{57:64}),{26:65,47:re},t(q,[2,56],{30:67}),t(q,[2,62],{35:68}),t(Pe,[2,48],{21:69}),t(R,[2,88],{61:70}),{20:26,33:[2,78],49:72,51:71,63:27,64:s,68:73,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(ne,[2,92],{65:77}),{71:[1,78]},t(T,[2,40],{86:te}),{20:26,49:80,54:79,55:[2,82],63:27,64:s,68:81,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{26:82,47:re},{47:[2,53]},t(M,e,{6:3,4:83}),{47:[2,20]},{20:84,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(L,e,{6:3,4:85}),{26:86,47:re},{47:[2,55]},t(n,[2,11]),t(v,[2,47]),{20:26,33:[2,86],49:88,58:87,63:27,64:s,68:89,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(n,[2,25]),{20:90,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(x,[2,58],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,31:91,49:92,68:93,64:s,71:V,79:a,80:o,81:c,82:h,83:g,84:E}),t(x,[2,64],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,36:94,49:95,68:96,64:s,71:V,79:a,80:o,81:c,82:h,83:g,84:E}),{20:26,22:97,23:[2,50],49:98,63:27,64:s,68:99,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:26,33:[2,90],49:101,62:100,63:27,64:s,68:102,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{33:[1,103]},t(R,[2,77]),{33:[2,79]},t([23,33,55,67,74],[2,30],{70:104,71:[1,105]}),t(se,[2,96]),t(H,$,{72:ut}),{20:26,49:108,63:27,64:s,66:107,67:[2,94],68:109,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(H,[2,42]),{55:[1,110]},t(ve,[2,81]),{55:[2,83]},t(n,[2,13]),{38:56,39:Ae,43:57,44:Q,45:112,46:111,47:[2,74]},t(q,[2,68],{40:113}),{47:[2,18]},t(n,[2,14]),{33:[1,114]},t(R,[2,85]),{33:[2,87]},{33:[1,115]},{32:116,33:[2,60],73:117,74:Rt},t(q,[2,57]),t(x,[2,59]),{33:[2,66],37:119,73:120,74:Rt},t(q,[2,63]),t(x,[2,65]),{23:[1,121]},t(Pe,[2,49]),{23:[2,51]},{33:[1,122]},t(R,[2,89]),{33:[2,91]},t(n,[2,22]),t(se,[2,97]),{72:ut},{20:26,49:123,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{67:[1,124]},t(ne,[2,93]),{67:[2,95]},t(n,[2,23]),{47:[2,19]},{47:[2,75]},t(x,[2,70],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,41:125,49:126,68:127,64:s,71:V,79:a,80:o,81:c,82:h,83:g,84:E}),t(n,[2,24]),t(n,[2,21]),{33:[1,128]},{33:[2,61]},{71:[1,130],75:129},{33:[1,131]},{33:[2,67]},t(v,[2,12]),t(L,[2,26]),t(se,[2,31]),t(T,[2,29]),{33:[2,72],42:132,73:133,74:Rt},t(q,[2,69]),t(x,[2,71]),t(M,[2,15]),{71:[1,135],76:[1,134]},t(Hr,[2,98]),t(b,[2,16]),{33:[1,136]},{33:[2,73]},{33:[2,32]},t(Hr,[2,99]),t(M,[2,17])],defaultActions:{4:[2,1],55:[2,53],57:[2,20],61:[2,55],73:[2,79],81:[2,83],85:[2,18],89:[2,87],99:[2,51],102:[2,91],109:[2,95],111:[2,19],112:[2,75],117:[2,61],120:[2,67],133:[2,73],134:[2,32]},parseError:function(p,m){if(m.recoverable)this.trace(p);else{var f=new Error(p);throw f.hash=m,f}},parse:function(p){var m=this,f=[0],d=[],w=[null],l=[],xe=this.table,u="",ae=0,Ue=0,qr=0,Qn=2,Vr=1,Xn=l.slice.call(arguments,1),A=Object.create(this.lexer),de={yy:{}};for(var Vt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Vt)&&(de.yy[Vt]=this.yy[Vt]);A.setInput(p,de.yy),de.yy.lexer=A,de.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Ft=A.yylloc;l.push(Ft);var Jn=A.options&&A.options.ranges;typeof de.yy.parseError=="function"?this.parseError=de.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ya(z){f.length=f.length-2*z,w.length=w.length-z,l.length=l.length-z}for(var Zn=function(){var z;return z=A.lex()||Vr,typeof z!="number"&&(z=m.symbols_[z]||z),z},D,Ut,me,F,Ea,Mt,Ce={},ht,X,Fr,pt;;){if(me=f[f.length-1],this.defaultActions[me]?F=this.defaultActions[me]:((D===null||typeof D>"u")&&(D=Zn()),F=xe[me]&&xe[me][D]),typeof F>"u"||!F.length||!F[0]){var Gt="";pt=[];for(ht in xe[me])this.terminals_[ht]&&ht>Qn&&pt.push("'"+this.terminals_[ht]+"'");A.showPosition?Gt="Parse error on line "+(ae+1)+`: +`+A.showPosition()+` +Expecting `+pt.join(", ")+", got '"+(this.terminals_[D]||D)+"'":Gt="Parse error on line "+(ae+1)+": Unexpected "+(D==Vr?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(Gt,{text:A.match,token:this.terminals_[D]||D,line:A.yylineno,loc:Ft,expected:pt})}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+me+", token: "+D);switch(F[0]){case 1:f.push(D),w.push(A.yytext),l.push(A.yylloc),f.push(F[1]),D=null,Ut?(D=Ut,Ut=null):(Ue=A.yyleng,u=A.yytext,ae=A.yylineno,Ft=A.yylloc,qr>0&&qr--);break;case 2:if(X=this.productions_[F[1]][1],Ce.$=w[w.length-X],Ce._$={first_line:l[l.length-(X||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(X||1)].first_column,last_column:l[l.length-1].last_column},Jn&&(Ce._$.range=[l[l.length-(X||1)].range[0],l[l.length-1].range[1]]),Mt=this.performAction.apply(Ce,[u,Ue,ae,de.yy,F[1],w,l].concat(Xn)),typeof Mt<"u")return Mt;X&&(f=f.slice(0,-1*X*2),w=w.slice(0,-1*X),l=l.slice(0,-1*X)),f.push(this.productions_[F[1]][0]),w.push(Ce.$),l.push(Ce._$),Fr=xe[f[f.length-2]][f[f.length-1]],f.push(Fr);break;case 3:return!0}}return!0}},$n=function(){var ie={EOF:1,parseError:function(m,f){if(this.yy.parser)this.yy.parser.parseError(m,f);else throw new Error(m)},setInput:function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},unput:function(p){var m=p.length,f=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===d.length?this.yylloc.first_column:0)+d[d.length-f.length].length-f[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(p){this.unput(this.match.slice(p))},pastInput:function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+` -`+m+"^"},test_match:function(p,m){var f,d,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),d=p[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],f=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var o in w)this[o]=w[o];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,f,d;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),o=0;om[0].length)){if(m=f,d=o,this.options.backtrack_lexer){if(p=this.test_match(f,w[o]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,w[d]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var m=this.next();return m||this.lex()},begin:function(m){this.conditionStack.push(m)},popState:function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},pushState:function(m){this.begin(m)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(m,f,d,w){function o(u,oe){return f.yytext=f.yytext.substring(u,f.yyleng-oe+u)}var Le=w;switch(d){case 0:if(f.yytext.slice(-2)==="\\\\"?(o(0,1),this.begin("mu")):f.yytext.slice(-1)==="\\"?(o(0,1),this.begin("emu")):this.begin("mu"),f.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(o(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 64;case 8:return 67;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 56;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 52;case 20:return 48;case 21:this.unput(f.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 72;case 25:return 71;case 26:return 71;case 27:return 86;case 28:break;case 29:return this.popState(),55;break;case 30:return this.popState(),33;break;case 31:return f.yytext=o(1,2).replace(/\\"/g,'"'),79;break;case 32:return f.yytext=o(1,2).replace(/\\'/g,"'"),79;break;case 33:return 84;case 34:return 81;case 35:return 81;case 36:return 82;case 37:return 83;case 38:return 80;case 39:return 74;case 40:return 76;case 41:return 71;case 42:return f.yytext=f.yytext.replace(/\\([\\\]])/g,"$1"),71;break;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return ae}();Mt.lexer=Jn;function Gt(){this.yy={}}return Gt.prototype=Mt,Mt.Parser=Gt,new Gt}(),xt=ai;var pr=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function fr(t,e){var r=e&&e.loc,n,s,i,a;r&&(n=r.start.line,s=r.end.line,i=r.start.column,a=r.end.column,t+=" - "+n+":"+i);for(var l=Error.prototype.constructor.call(this,t),c=0;cbr,id:()=>oi,prepareBlock:()=>fi,prepareMustache:()=>hi,preparePartialBlock:()=>mi,preparePath:()=>ui,prepareProgram:()=>di,prepareRawBlock:()=>pi,stripComment:()=>ci,stripFlags:()=>li});function gr(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new ce(t.path.original+" doesn't match "+e,r)}}function br(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function oi(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function li(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function ci(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function ui(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",s=[],i=0,a=0,l=e.length;a0)throw new ce("Invalid path: "+n,{loc:r});c===".."&&i++}else s.push(c)}return{type:"PathExpression",data:t,depth:i,parts:s,original:n,loc:r}}function hi(t,e,r,n,s,i){var a=n.charAt(3)||n.charAt(2),l=a!=="{"&&a!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:l,strip:s,loc:this.locInfo(i)}}function pi(t,e,r,n){gr(t,r),n=this.locInfo(n);var s={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:s,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function fi(t,e,r,n,s,i){n&&n.path&&gr(t,n);var a=/\*/.test(t.open);e.blockParams=t.blockParams;var l,c;if(r){if(a)throw new ce("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,l=r.program}return s&&(s=l,l=e,e=s),{type:a?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:l,openStrip:t.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(i)}}function di(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function mi(t,e,r,n){return gr(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}var Cn={};for(Dt in ot)Object.prototype.hasOwnProperty.call(ot,Dt)&&(Cn[Dt]=ot[Dt]);var Dt;function Ot(t,e){if(t.type==="Program")return t;xt.yy=Cn,xt.yy.locInfo=function(n){return new br(e&&e.srcName,n)};var r=xt.parse(t);return r}function yr(t,e){var r=Ot(t,e),n=new Pn(e);return n.accept(r)}var Ln={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",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:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsolb:"\u29C5",bsol:"\\",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",cap:"\u2229",Cap:"\u22D2",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25CB",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cup:"\u222A",Cup:"\u22D3",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21A1",dArr:"\u21D3",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21CA",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",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",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21D3",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21BD",DownRightTeeVector:"\u295F",DownRightVectorBar:"\u2957",DownRightVector:"\u21C1",DownTeeArrow:"\u21A7",DownTee:"\u22A4",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",Ecirc:"\xCA",ecirc:"\xEA",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",gescc:"\u2AA9",ges:"\u2A7E",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2AA5",gl:"\u2277",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gt:">",GT:">",Gt:"\u226B",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",harrcir:"\u2948",harr:"\u2194",hArr:"\u21D4",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",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:"\u{1D526}",Ifr:"\u2111",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",incare:"\u2105",in:"\u2208",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",intcal:"\u22BA",int:"\u222B",Int:"\u222C",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:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",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:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larrb:"\u21E4",larrbfs:"\u291F",larr:"\u2190",Larr:"\u219E",lArr:"\u21D0",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",latail:"\u2919",lAtail:"\u291B",lat:"\u2AAB",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",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:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",LeftArrowBar:"\u21E4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21D0",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21C3",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTeeArrow:"\u21A4",LeftTee:"\u22A3",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangleBar:"\u29CF",LeftTriangle:"\u22B2",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21BF",LeftVectorBar:"\u2952",LeftVector:"\u21BC",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",lescc:"\u2AA8",les:"\u2A7D",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:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21C7",ll:"\u226A",Ll:"\u22D8",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoustache:"\u23B0",lmoust:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftrightarrow:"\u27F7",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longmapsto:"\u27FC",longrightarrow:"\u27F6",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",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:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",lt:"<",LT:"<",Lt:"\u226A",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:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midast:"*",midcir:"\u2AF0",mid:"\u2223",middot:"\xB7",minusb:"\u229F",minus:"\u2212",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",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",natural:"\u266E",naturals:"\u2115",natur:"\u266E",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",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` -`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",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:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",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:"\u{1D55F}",Nopf:"\u2115",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",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",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",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",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",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",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:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",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:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",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:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",para:"\xB6",parallel:"\u2225",par:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plus:"+",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",prap:"\u2AB7",Pr:"\u2ABB",pr:"\u227A",prcue:"\u227C",precapprox:"\u2AB7",prec:"\u227A",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",pre:"\u2AAF",prE:"\u2AB3",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportional:"\u221D",Proportion:"\u2237",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21A0",rArr:"\u21D2",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",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",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",Re:"\u211C",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrowBar:"\u21E5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21D2",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVectorBar:"\u2955",RightDownVector:"\u21C2",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTeeArrow:"\u21A6",RightTee:"\u22A2",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangleBar:"\u29D0",RightTriangle:"\u22B3",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVectorBar:"\u2954",RightUpVector:"\u21BE",RightVectorBar:"\u2953",RightVector:"\u21C0",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoustache:"\u23B1",rmoust:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",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",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2ABC",sc:"\u227B",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdotb:"\u22A1",sdot:"\u22C5",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",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",solbar:"\u233F",solb:"\u29C4",sol:"/",Sopf:"\u{1D54A}",sopf:"\u{1D564}",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",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squ:"\u25A1",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succapprox:"\u2AB8",succ:"\u227B",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",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",Sup:"\u22D1",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:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",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:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2A31",timesb:"\u22A0",times:"\xD7",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",topbot:"\u2336",topcir:"\u2AF1",top:"\u22A4",Topf:"\u{1D54B}",topf:"\u{1D565}",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:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",uarr:"\u2191",Uarr:"\u219F",uArr:"\u21D1",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:"\u{1D518}",ufr:"\u{1D532}",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:"\u{1D54C}",uopf:"\u{1D566}",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21D1",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21D5",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTeeArrow:"\u21A5",UpTee:"\u22A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",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:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",veebar:"\u22BB",vee:"\u2228",Vee:"\u22C1",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xharr:"\u27F7",xhArr:"\u27FA",Xi:"\u039E",xi:"\u03BE",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",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:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",yuml:"\xFF",Yuml:"\u0178",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:"\u{1D537}",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},gi=/^#[xX]([A-Fa-f0-9]+)$/,bi=/^#([0-9]+)$/,yi=/^([A-Za-z0-9]+)$/,Er=function(){function t(e){this.named=e}return t.prototype.parse=function(e){if(e){var r=e.match(gi);if(r)return String.fromCharCode(parseInt(r[1],16));if(r=e.match(bi),r)return String.fromCharCode(parseInt(r[1],10));if(r=e.match(yi),r)return this.named[r[1]]}},t}(),Ei=/[\t\n\f ]/,Si=/[A-Za-z]/,ki=/\r\n?/g;function _(t){return Ei.test(t)}function xn(t){return Si.test(t)}function wi(t){return t.replace(ki,` -`)}var Sr=function(){function t(e,r,n){n===void 0&&(n="precompile"),this.delegate=e,this.entityParser=r,this.mode=n,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var s=this.peek();if(s==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&s===` -`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var s=this.peek(),i=this.tagNameBuffer;s==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):s==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(s))},tagOpen:function(){var s=this.consume();s==="!"?this.transitionTo("markupDeclarationOpen"):s==="/"?this.transitionTo("endTagOpen"):(s==="@"||s===":"||xn(s))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(s))},markupDeclarationOpen:function(){var s=this.consume();if(s==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=s.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var s=this.consume();_(s)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var s=this.consume();_(s)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(s.toLowerCase()))},doctypeName:function(){var s=this.consume();_(s)?this.transitionTo("afterDoctypeName"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(s.toLowerCase())},afterDoctypeName:function(){var s=this.consume();if(!_(s))if(s===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=s.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",l=i.toUpperCase()==="SYSTEM";(a||l)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):l&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var s=this.peek();_(s)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):s==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):s==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):s===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var s=this.consume();s==='"'?this.transitionTo("afterDoctypePublicIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(s)},doctypePublicIdentifierSingleQuoted:function(){var s=this.consume();s==="'"?this.transitionTo("afterDoctypePublicIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(s)},afterDoctypePublicIdentifier:function(){var s=this.consume();_(s)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):s==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):s==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var s=this.consume();_(s)||(s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):s==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):s==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var s=this.consume();s==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(s)},doctypeSystemIdentifierSingleQuoted:function(){var s=this.consume();s==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(s)},afterDoctypeSystemIdentifier:function(){var s=this.consume();_(s)||s===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var s=this.consume();s==="-"?this.transitionTo("commentStartDash"):s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(s),this.transitionTo("comment"))},commentStartDash:function(){var s=this.consume();s==="-"?this.transitionTo("commentEnd"):s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var s=this.consume();s==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(s)},commentEndDash:function(){var s=this.consume();s==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+s),this.transitionTo("comment"))},commentEnd:function(){var s=this.consume();s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+s),this.transitionTo("comment"))},tagName:function(){var s=this.consume();_(s)?this.transitionTo("beforeAttributeName"):s==="/"?this.transitionTo("selfClosingStartTag"):s===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(s)},endTagName:function(){var s=this.consume();_(s)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):s==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):s===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(s)},beforeAttributeName:function(){var s=this.peek();if(_(s)){this.consume();return}else s==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):s===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):s==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(s)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var s=this.peek();_(s)?(this.transitionTo("afterAttributeName"),this.consume()):s==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):s==='"'||s==="'"||s==="<"?(this.delegate.reportSyntaxError(s+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(s)):(this.consume(),this.delegate.appendToAttributeName(s))},afterAttributeName:function(){var s=this.peek();if(_(s)){this.consume();return}else s==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(s))},beforeAttributeValue:function(){var s=this.peek();_(s)?this.consume():s==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):s==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(s))},attributeValueDoubleQuoted:function(){var s=this.consume();s==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):s==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(s)},attributeValueSingleQuoted:function(){var s=this.consume();s==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):s==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(s)},attributeValueUnquoted:function(){var s=this.peek();_(s)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):s==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):s===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(s))},afterAttributeValueQuoted:function(){var s=this.peek();_(s)?(this.consume(),this.transitionTo("beforeAttributeName")):s==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):s===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var s=this.peek();s===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var s=this.consume();(s==="@"||s===":"||xn(s))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(s))}},this.reset()}return t.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},t.prototype.transitionTo=function(e){this.state=e},t.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},t.prototype.tokenizePart=function(e){for(this.input+=wi(e);this.index"||e==="style"&&this.input.substring(this.index,this.index+8)!==""||e==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},t}(),jo=function(){function t(e,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Sr(this,e,r.mode),this._currentAttribute=void 0}return t.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},t.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},t.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},t.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},t.prototype.current=function(){var e=this.token;if(e===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return e;for(var r=0;r\xA0]/u,ll=new RegExp(Ni.source,"gu");var Dn=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);var pe=Object.freeze({line:1,column:0}),vi=Object.freeze({source:"(synthetic)",start:pe,end:pe}),Rt=Object.freeze({source:"(nonexistent)",start:pe,end:pe}),he=Object.freeze({source:"(broken)",start:pe,end:pe}),y=function(t){return t.CharPosition="CharPosition",t.HbsPosition="HbsPosition",t.InternalsSynthetic="InternalsSynthetic",t.NonExistent="NonExistent",t.Broken="Broken",t}({}),lt="MATCH_ANY",Pr="IS_INVISIBLE",Cr=class{_whens;constructor(e){this._whens=e}first(e){for(let r of this._whens){let n=r.match(e);if(ke(n))return n[0]}return null}},Ht=class{_map=new Map;get(e,r){let n=this._map.get(e);return n||(n=r(),this._map.set(e,n),n)}add(e,r){this._map.set(e,r)}match(e){let r=Ai(e),n=[],s=this._map.get(r),i=this._map.get(lt);return s&&n.push(s),i&&n.push(i),n}};function qn(t){return t(new xr).check()}var xr=class{_whens=new Ht;check(){return(e,r)=>this.matchFor(e.kind,r.kind)(e,r)}matchFor(e,r){let n=this._whens.match(e);T(ke(n),`no match defined for (${e}, ${r}) and no AnyMatch defined either`);let s=new Cr(n).first(r);return T(s!==null,`no match defined for (${e}, ${r}) and no AnyMatch defined either`),s}when(e,r,n){return this._whens.get(e,()=>new Ht).add(r,n),this}};function Ai(t){switch(t){case y.Broken:case y.InternalsSynthetic:case y.NonExistent:return Pr;default:return t}}var qt=!1,Lr=class t{static synthetic(e){let r=I.synthetic(e);return new t({loc:r,chars:e})}static load(e,r){return new t({loc:I.load(e,r[1]),chars:r[0]})}chars;loc;constructor(e){this.loc=e.loc,this.chars=e.chars}getString(){return this.chars}serialize(){return[this.chars,this.loc.serialize()]}},I=class t{static get NON_EXISTENT(){return new te(y.NonExistent,Rt).wrap()}static load(e,r){if(typeof r=="number")return t.forCharPositions(e,r,r);if(typeof r=="string")return t.synthetic(r);if(Array.isArray(r))return t.forCharPositions(e,r[0],r[1]);if(r===y.NonExistent)return t.NON_EXISTENT;if(r===y.Broken)return t.broken(he);Tn(r)}static forHbsLoc(e,r){let n=new de(e,r.start),s=new de(e,r.end);return new ut(e,{start:n,end:s},r).wrap()}static forCharPositions(e,r,n){let s=new ve(e,r),i=new ve(e,n);return new ct(e,{start:s,end:i}).wrap()}static synthetic(e){return new te(y.InternalsSynthetic,Rt,e).wrap()}static broken(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:he;return new te(y.Broken,e).wrap()}isInvisible;constructor(e){this.data=e,this.isInvisible=e.kind!==y.CharPosition&&e.kind!==y.HbsPosition}getStart(){return this.data.getStart().wrap()}getEnd(){return this.data.getEnd().wrap()}get loc(){let e=this.data.toHbsSpan();return e===null?he:e.toHbsLoc()}get module(){return this.data.getModule()}get startPosition(){return this.loc.start}get endPosition(){return this.loc.end}toJSON(){return this.loc}withStart(e){return $(e.data,this.data.getEnd())}withEnd(e){return $(this.data.getStart(),e.data)}asString(){return this.data.asString()}toSlice(e){let r=this.data.asString();return!1&&e!==void 0&&r!==e&&console.warn(`unexpectedly found ${JSON.stringify(r)} when slicing source, but expected ${JSON.stringify(e)}`),new Lr({loc:this,chars:e||r})}get start(){return this.loc.start}set start(e){this.data.locDidUpdate({start:e})}get end(){return this.loc.end}set end(e){this.data.locDidUpdate({end:e})}get source(){return this.module}collapse(e){switch(e){case"start":return this.getStart().collapsed();case"end":return this.getEnd().collapsed()}}extend(e){return $(this.data.getStart(),e.data.getEnd())}serialize(){return this.data.serialize()}slice(e){let{skipStart:r=0,skipEnd:n=0}=e;return $(this.getStart().move(r).data,this.getEnd().move(-n).data)}sliceStartChars(e){let{skipStart:r=0,chars:n}=e;return $(this.getStart().move(r).data,this.getStart().move(r+n).data)}sliceEndChars(e){let{skipEnd:r=0,chars:n}=e;return $(this.getEnd().move(r-n).data,this.getStart().move(-r).data)}},ct=class{kind=y.CharPosition;_locPosSpan=null;constructor(e,r){this.source=e,this.charPositions=r}wrap(){return new I(this)}asString(){return this.source.slice(this.charPositions.start.charPos,this.charPositions.end.charPos)}getModule(){return this.source.module}getStart(){return this.charPositions.start}getEnd(){return this.charPositions.end}locDidUpdate(){qt&&console.warn("updating a location that came from a CharPosition span doesn't work reliably. Don't try to update locations after the plugin phase")}toHbsSpan(){let e=this._locPosSpan;if(e===null){let r=this.charPositions.start.toHbsPos(),n=this.charPositions.end.toHbsPos();r===null||n===null?e=this._locPosSpan=fe:e=this._locPosSpan=new ut(this.source,{start:r,end:n})}return e===fe?null:e}serialize(){let{start:{charPos:e},end:{charPos:r}}=this.charPositions;return e===r?e:[e,r]}toCharPosSpan(){return this}},ut=class{kind=y.HbsPosition;_charPosSpan=null;_providedHbsLoc;constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.source=e,this.hbsPositions=r,this._providedHbsLoc=n}serialize(){let e=this.toCharPosSpan();return e===null?y.Broken:e.wrap().serialize()}wrap(){return new I(this)}updateProvided(e,r){this._providedHbsLoc&&(this._providedHbsLoc[r]=e),this._charPosSpan=null,this._providedHbsLoc={start:e,end:e}}locDidUpdate(e){let{start:r,end:n}=e;r!==void 0&&(this.updateProvided(r,"start"),this.hbsPositions.start=new de(this.source,r,null)),n!==void 0&&(this.updateProvided(n,"end"),this.hbsPositions.end=new de(this.source,n,null))}asString(){let e=this.toCharPosSpan();return e===null?"":e.asString()}getModule(){return this.source.module}getStart(){return this.hbsPositions.start}getEnd(){return this.hbsPositions.end}toHbsLoc(){return{start:this.hbsPositions.start.hbsPos,end:this.hbsPositions.end.hbsPos}}toHbsSpan(){return this}toCharPosSpan(){let e=this._charPosSpan;if(e===null){let r=this.hbsPositions.start.toCharPos(),n=this.hbsPositions.end.toCharPos();if(r&&n)e=this._charPosSpan=new ct(this.source,{start:r,end:n});else return e=this._charPosSpan=fe,null}return e===fe?null:e}},te=class{constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.kind=e,this.loc=r,this.string=n}serialize(){switch(this.kind){case y.Broken:case y.NonExistent:return this.kind;case y.InternalsSynthetic:return this.string||""}}wrap(){return new I(this)}asString(){return this.string||""}locDidUpdate(e){let{start:r,end:n}=e;r!==void 0&&(this.loc.start=r),n!==void 0&&(this.loc.end=n)}getModule(){return"an unknown module"}getStart(){return new ht(this.kind,this.loc.start)}getEnd(){return new ht(this.kind,this.loc.end)}toCharPosSpan(){return this}toHbsSpan(){return null}toHbsLoc(){return he}},$=qn(t=>t.when(y.HbsPosition,y.HbsPosition,(e,r)=>new ut(e.source,{start:e,end:r}).wrap()).when(y.CharPosition,y.CharPosition,(e,r)=>new ct(e.source,{start:e,end:r}).wrap()).when(y.CharPosition,y.HbsPosition,(e,r)=>{let n=r.toCharPos();return n===null?new te(y.Broken,he).wrap():$(e,n)}).when(y.HbsPosition,y.CharPosition,(e,r)=>{let n=e.toCharPos();return n===null?new te(y.Broken,he).wrap():$(n,r)}).when(Pr,lt,e=>new te(e.kind,he).wrap()).when(lt,Pr,(e,r)=>new te(r.kind,he).wrap())),fe="BROKEN",Ue=class t{static forHbsPos(e,r){return new de(e,r,null).wrap()}static broken(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pe;return new ht(y.Broken,e).wrap()}constructor(e){this.data=e}get offset(){let e=this.data.toCharPos();return e===null?null:e.offset}eql(e){return Pi(this.data,e.data)}until(e){return $(this.data,e.data)}move(e){let r=this.data.toCharPos();if(r===null)return t.broken();{let n=r.offset+e;return r.source.check(n)?new ve(r.source,n).wrap():t.broken()}}collapsed(){return $(this.data,this.data)}toJSON(){return this.data.toJSON()}},ve=class{kind=y.CharPosition;_locPos=null;constructor(e,r){this.source=e,this.charPos=r}toCharPos(){return this}toJSON(){let e=this.toHbsPos();return e===null?pe:e.toJSON()}wrap(){return new Ue(this)}get offset(){return this.charPos}toHbsPos(){let e=this._locPos;if(e===null){let r=this.source.hbsPosFor(this.charPos);r===null?this._locPos=e=fe:this._locPos=e=new de(this.source,r,this.charPos)}return e===fe?null:e}},de=class{kind=y.HbsPosition;_charPos;constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.source=e,this.hbsPos=r,this._charPos=n===null?null:new ve(e,n)}toCharPos(){let e=this._charPos;if(e===null){let r=this.source.charPosFor(this.hbsPos);r===null?this._charPos=e=fe:this._charPos=e=new ve(this.source,r)}return e===fe?null:e}toJSON(){return this.hbsPos}wrap(){return new Ue(this)}toHbsPos(){return this}},ht=class{constructor(e,r){this.kind=e,this.pos=r}toCharPos(){return null}toJSON(){return this.pos}wrap(){return new Ue(this)}get offset(){return null}},Pi=qn(t=>t.when(y.HbsPosition,y.HbsPosition,(e,r)=>{let{hbsPos:n}=e,{hbsPos:s}=r;return n.column===s.column&&n.line===s.line}).when(y.CharPosition,y.CharPosition,(e,r)=>{let{charPos:n}=e,{charPos:s}=r;return n===s}).when(y.CharPosition,y.HbsPosition,(e,r)=>{var s;let{offset:n}=e;return n===((s=r.toCharPos())==null?void 0:s.offset)}).when(y.HbsPosition,y.CharPosition,(e,r)=>{var s;let{offset:n}=r;return((s=e.toCharPos())==null?void 0:s.offset)===n}).when(lt,lt,()=>!1)),Ne=class t{static from(e){var n;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new t(e,(n=r.meta)==null?void 0:n.moduleName)}constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"an unknown module";this.source=e,this.module=r}check(e){return e>=0&&e<=this.source.length}slice(e,r){return this.source.slice(e,r)}offsetFor(e,r){return Ue.forHbsPos(this,{line:e,column:r})}spanFor(e){let{start:r,end:n}=e;return I.forHbsLoc(this,{start:{line:r.line,column:r.column},end:{line:n.line,column:n.column}})}hbsPosFor(e){let r=0,n=0;if(e>this.source.length)return null;for(;;){let s=this.source.indexOf(` -`,n);if(e<=s||s===-1)return{line:r+1,column:e-n};r+=1,n=s+1}}charPosFor(e){let{line:r,column:n}=e,i=this.source.length,a=0,l=0;for(;lc)return c;if(!1){let h=this.hbsPosFor(l+n);T(h!==null,"the returned offset failed to round-trip"),T(h.line===r,"the round-tripped line didn't match the original line"),T(h.column===n,"the round-tripped column didn't match the original column")}return l+n}else{if(c===-1)return 0;a+=1,l=c+1}}return i}};function S(t,e){let{module:r,loc:n}=e,{line:s,column:i}=n.start,a=e.asString(),l=a?` +`+m+"^"},test_match:function(p,m){var f,d,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),d=p[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],f=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,f,d;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;lm[0].length)){if(m=f,d=l,this.options.backtrack_lexer){if(p=this.test_match(f,w[l]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,w[d]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var m=this.next();return m||this.lex()},begin:function(m){this.conditionStack.push(m)},popState:function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},pushState:function(m){this.begin(m)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(m,f,d,w){function l(u,ae){return f.yytext=f.yytext.substring(u,f.yyleng-ae+u)}var xe=w;switch(d){case 0:if(f.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):f.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),f.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 64;case 8:return 67;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 56;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 52;case 20:return 48;case 21:this.unput(f.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 72;case 25:return 71;case 26:return 71;case 27:return 86;case 28:break;case 29:return this.popState(),55;break;case 30:return this.popState(),33;break;case 31:return f.yytext=l(1,2).replace(/\\"/g,'"'),79;break;case 32:return f.yytext=l(1,2).replace(/\\'/g,"'"),79;break;case 33:return 84;case 34:return 81;case 35:return 81;case 36:return 82;case 37:return 83;case 38:return 80;case 39:return 74;case 40:return 76;case 41:return 71;case 42:return f.yytext=f.yytext.replace(/\\([\\\]])/g,"$1"),71;break;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return ie}();Ht.lexer=$n;function qt(){this.yy={}}return qt.prototype=Ht,Ht.Parser=qt,new qt}(),vt=ei;var cr=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function ur(t,e){var r=e&&e.loc,n,s,i,a;r&&(n=r.start.line,s=r.end.line,i=r.start.column,a=r.end.column,t+=" - "+n+":"+i);for(var o=Error.prototype.constructor.call(this,t),c=0;cdr,id:()=>ti,prepareBlock:()=>oi,prepareMustache:()=>ii,preparePartialBlock:()=>ci,preparePath:()=>si,prepareProgram:()=>li,prepareRawBlock:()=>ai,stripComment:()=>ni,stripFlags:()=>ri});function fr(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new le(t.path.original+" doesn't match "+e,r)}}function dr(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function ti(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function ri(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function ni(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function si(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",s=[],i=0,a=0,o=e.length;a0)throw new le("Invalid path: "+n,{loc:r});c===".."&&i++}else s.push(c)}return{type:"PathExpression",data:t,depth:i,parts:s,original:n,loc:r}}function ii(t,e,r,n,s,i){var a=n.charAt(3)||n.charAt(2),o=a!=="{"&&a!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:o,strip:s,loc:this.locInfo(i)}}function ai(t,e,r,n){fr(t,r),n=this.locInfo(n);var s={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:s,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function oi(t,e,r,n,s,i){n&&n.path&&fr(t,n);var a=/\*/.test(t.open);e.blockParams=t.blockParams;var o,c;if(r){if(a)throw new le("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,o=r.program}return s&&(s=o,o=e,e=s),{type:a?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:o,openStrip:t.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(i)}}function li(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function ci(t,e,r,n){return fr(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}var An={};for(xt in st)Object.prototype.hasOwnProperty.call(st,xt)&&(An[xt]=st[xt]);var xt;function Ct(t,e){if(t.type==="Program")return t;vt.yy=An,vt.yy.locInfo=function(n){return new dr(e&&e.srcName,n)};var r=vt.parse(t);return r}function mr(t,e){var r=Ct(t,e),n=new vn(e);return n.accept(r)}var xn={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",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:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsolb:"\u29C5",bsol:"\\",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",cap:"\u2229",Cap:"\u22D2",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25CB",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cup:"\u222A",Cup:"\u22D3",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21A1",dArr:"\u21D3",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21CA",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",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",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21D3",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21BD",DownRightTeeVector:"\u295F",DownRightVectorBar:"\u2957",DownRightVector:"\u21C1",DownTeeArrow:"\u21A7",DownTee:"\u22A4",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",Ecirc:"\xCA",ecirc:"\xEA",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",gescc:"\u2AA9",ges:"\u2A7E",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2AA5",gl:"\u2277",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gt:">",GT:">",Gt:"\u226B",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",harrcir:"\u2948",harr:"\u2194",hArr:"\u21D4",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",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:"\u{1D526}",Ifr:"\u2111",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",incare:"\u2105",in:"\u2208",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",intcal:"\u22BA",int:"\u222B",Int:"\u222C",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:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",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:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larrb:"\u21E4",larrbfs:"\u291F",larr:"\u2190",Larr:"\u219E",lArr:"\u21D0",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",latail:"\u2919",lAtail:"\u291B",lat:"\u2AAB",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",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:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",LeftArrowBar:"\u21E4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21D0",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21C3",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTeeArrow:"\u21A4",LeftTee:"\u22A3",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangleBar:"\u29CF",LeftTriangle:"\u22B2",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21BF",LeftVectorBar:"\u2952",LeftVector:"\u21BC",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",lescc:"\u2AA8",les:"\u2A7D",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:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21C7",ll:"\u226A",Ll:"\u22D8",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoustache:"\u23B0",lmoust:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftrightarrow:"\u27F7",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longmapsto:"\u27FC",longrightarrow:"\u27F6",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",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:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",lt:"<",LT:"<",Lt:"\u226A",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:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midast:"*",midcir:"\u2AF0",mid:"\u2223",middot:"\xB7",minusb:"\u229F",minus:"\u2212",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",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",natural:"\u266E",naturals:"\u2115",natur:"\u266E",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",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` +`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",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:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",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:"\u{1D55F}",Nopf:"\u2115",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",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",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",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",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",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",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:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",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:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",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:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",para:"\xB6",parallel:"\u2225",par:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plus:"+",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",prap:"\u2AB7",Pr:"\u2ABB",pr:"\u227A",prcue:"\u227C",precapprox:"\u2AB7",prec:"\u227A",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",pre:"\u2AAF",prE:"\u2AB3",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportional:"\u221D",Proportion:"\u2237",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21A0",rArr:"\u21D2",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",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",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",Re:"\u211C",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrowBar:"\u21E5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21D2",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVectorBar:"\u2955",RightDownVector:"\u21C2",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTeeArrow:"\u21A6",RightTee:"\u22A2",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangleBar:"\u29D0",RightTriangle:"\u22B3",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVectorBar:"\u2954",RightUpVector:"\u21BE",RightVectorBar:"\u2953",RightVector:"\u21C0",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoustache:"\u23B1",rmoust:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",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",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2ABC",sc:"\u227B",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdotb:"\u22A1",sdot:"\u22C5",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",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",solbar:"\u233F",solb:"\u29C4",sol:"/",Sopf:"\u{1D54A}",sopf:"\u{1D564}",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",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squ:"\u25A1",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succapprox:"\u2AB8",succ:"\u227B",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",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",Sup:"\u22D1",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:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",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:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2A31",timesb:"\u22A0",times:"\xD7",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",topbot:"\u2336",topcir:"\u2AF1",top:"\u22A4",Topf:"\u{1D54B}",topf:"\u{1D565}",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:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",uarr:"\u2191",Uarr:"\u219F",uArr:"\u21D1",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:"\u{1D518}",ufr:"\u{1D532}",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:"\u{1D54C}",uopf:"\u{1D566}",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21D1",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21D5",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTeeArrow:"\u21A5",UpTee:"\u22A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",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:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",veebar:"\u22BB",vee:"\u2228",Vee:"\u22C1",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xharr:"\u27F7",xhArr:"\u27FA",Xi:"\u039E",xi:"\u03BE",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",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:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",yuml:"\xFF",Yuml:"\u0178",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:"\u{1D537}",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},ui=/^#[xX]([A-Fa-f0-9]+)$/,hi=/^#([0-9]+)$/,pi=/^([A-Za-z0-9]+)$/,gr=function(){function t(e){this.named=e}return t.prototype.parse=function(e){if(e){var r=e.match(ui);if(r)return String.fromCharCode(parseInt(r[1],16));if(r=e.match(hi),r)return String.fromCharCode(parseInt(r[1],10));if(r=e.match(pi),r)return this.named[r[1]]}},t}(),fi=/[\t\n\f ]/,di=/[A-Za-z]/,mi=/\r\n?/g;function _(t){return fi.test(t)}function Pn(t){return di.test(t)}function gi(t){return t.replace(mi,` +`)}var br=function(){function t(e,r,n){n===void 0&&(n="precompile"),this.delegate=e,this.entityParser=r,this.mode=n,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var s=this.peek();if(s==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&s===` +`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var s=this.peek(),i=this.tagNameBuffer;s==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):s==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(s))},tagOpen:function(){var s=this.consume();s==="!"?this.transitionTo("markupDeclarationOpen"):s==="/"?this.transitionTo("endTagOpen"):(s==="@"||s===":"||Pn(s))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(s))},markupDeclarationOpen:function(){var s=this.consume();if(s==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=s.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var s=this.consume();_(s)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var s=this.consume();_(s)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(s.toLowerCase()))},doctypeName:function(){var s=this.consume();_(s)?this.transitionTo("afterDoctypeName"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(s.toLowerCase())},afterDoctypeName:function(){var s=this.consume();if(!_(s))if(s===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=s.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var s=this.peek();_(s)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):s==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):s==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):s===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var s=this.consume();s==='"'?this.transitionTo("afterDoctypePublicIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(s)},doctypePublicIdentifierSingleQuoted:function(){var s=this.consume();s==="'"?this.transitionTo("afterDoctypePublicIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(s)},afterDoctypePublicIdentifier:function(){var s=this.consume();_(s)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):s==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):s==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var s=this.consume();_(s)||(s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):s==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):s==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var s=this.consume();s==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(s)},doctypeSystemIdentifierSingleQuoted:function(){var s=this.consume();s==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(s)},afterDoctypeSystemIdentifier:function(){var s=this.consume();_(s)||s===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var s=this.consume();s==="-"?this.transitionTo("commentStartDash"):s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(s),this.transitionTo("comment"))},commentStartDash:function(){var s=this.consume();s==="-"?this.transitionTo("commentEnd"):s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var s=this.consume();s==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(s)},commentEndDash:function(){var s=this.consume();s==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+s),this.transitionTo("comment"))},commentEnd:function(){var s=this.consume();s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+s),this.transitionTo("comment"))},tagName:function(){var s=this.consume();_(s)?this.transitionTo("beforeAttributeName"):s==="/"?this.transitionTo("selfClosingStartTag"):s===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(s)},endTagName:function(){var s=this.consume();_(s)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):s==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):s===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(s)},beforeAttributeName:function(){var s=this.peek();if(_(s)){this.consume();return}else s==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):s===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):s==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(s)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var s=this.peek();_(s)?(this.transitionTo("afterAttributeName"),this.consume()):s==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):s==='"'||s==="'"||s==="<"?(this.delegate.reportSyntaxError(s+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(s)):(this.consume(),this.delegate.appendToAttributeName(s))},afterAttributeName:function(){var s=this.peek();if(_(s)){this.consume();return}else s==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(s))},beforeAttributeValue:function(){var s=this.peek();_(s)?this.consume():s==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):s==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(s))},attributeValueDoubleQuoted:function(){var s=this.consume();s==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):s==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(s)},attributeValueSingleQuoted:function(){var s=this.consume();s==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):s==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(s)},attributeValueUnquoted:function(){var s=this.peek();_(s)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):s==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):s===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(s))},afterAttributeValueQuoted:function(){var s=this.peek();_(s)?(this.consume(),this.transitionTo("beforeAttributeName")):s==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):s===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var s=this.peek();s===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var s=this.consume();(s==="@"||s===":"||Pn(s))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(s))}},this.reset()}return t.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},t.prototype.transitionTo=function(e){this.state=e},t.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},t.prototype.tokenizePart=function(e){for(this.input+=gi(e);this.index"||e==="style"&&this.input.substring(this.index,this.index+8)!==""||e==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},t}(),zo=function(){function t(e,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new br(this,e,r.mode),this._currentAttribute=void 0}return t.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},t.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},t.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},t.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},t.prototype.current=function(){var e=this.token;if(e===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return e;for(var r=0;r\xA0]/u,il=new RegExp(yi.source,"gu");var Ln=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);var he=Object.freeze({line:1,column:0}),Ei=Object.freeze({source:"(synthetic)",start:he,end:he}),Dt=Object.freeze({source:"(nonexistent)",start:he,end:he}),ue=Object.freeze({source:"(broken)",start:he,end:he}),y=function(t){return t.CharPosition="CharPosition",t.HbsPosition="HbsPosition",t.InternalsSynthetic="InternalsSynthetic",t.NonExistent="NonExistent",t.Broken="Broken",t}({}),it="MATCH_ANY",Nr="IS_INVISIBLE",vr=class{_whens;constructor(e){this._whens=e}first(e){for(let r of this._whens){let n=r.match(e);if(Se(n))return n[0]}return null}},Ot=class{_map=new Map;get(e,r){let n=this._map.get(e);return n||(n=r(),this._map.set(e,n),n)}add(e,r){this._map.set(e,r)}match(e){let r=Si(e),n=[],s=this._map.get(r),i=this._map.get(it);return s&&n.push(s),i&&n.push(i),n}};function Rn(t){return t(new Ar).check()}var Ar=class{_whens=new Ot;check(){return(e,r)=>this.matchFor(e.kind,r.kind)(e,r)}matchFor(e,r){let n=this._whens.match(e);P(Se(n),`no match defined for (${e}, ${r}) and no AnyMatch defined either`);let s=new vr(n).first(r);return P(s!==null,`no match defined for (${e}, ${r}) and no AnyMatch defined either`),s}when(e,r,n){return this._whens.get(e,()=>new Ot).add(r,n),this}};function Si(t){switch(t){case y.Broken:case y.InternalsSynthetic:case y.NonExistent:return Nr;default:return t}}var Pr=class t{static synthetic(e){let r=I.synthetic(e);return new t({loc:r,chars:e})}static load(e,r){return new t({loc:I.load(e,r[1]),chars:r[0]})}chars;loc;constructor(e){this.loc=e.loc,this.chars=e.chars}getString(){return this.chars}serialize(){return[this.chars,this.loc.serialize()]}},I=class t{static get NON_EXISTENT(){return new ee(y.NonExistent,Dt).wrap()}static load(e,r){if(typeof r=="number")return t.forCharPositions(e,r,r);if(typeof r=="string")return t.synthetic(r);if(Array.isArray(r))return t.forCharPositions(e,r[0],r[1]);if(r===y.NonExistent)return t.NON_EXISTENT;if(r===y.Broken)return t.broken(ue);kn(r)}static forHbsLoc(e,r){let n=new fe(e,r.start),s=new fe(e,r.end);return new ot(e,{start:n,end:s},r).wrap()}static forCharPositions(e,r,n){let s=new Te(e,r),i=new Te(e,n);return new at(e,{start:s,end:i}).wrap()}static synthetic(e){return new ee(y.InternalsSynthetic,Dt,e).wrap()}static broken(e=ue){return new ee(y.Broken,e).wrap()}isInvisible;constructor(e){this.data=e,this.isInvisible=e.kind!==y.CharPosition&&e.kind!==y.HbsPosition}getStart(){return this.data.getStart().wrap()}getEnd(){return this.data.getEnd().wrap()}get loc(){let e=this.data.toHbsSpan();return e===null?ue:e.toHbsLoc()}get module(){return this.data.getModule()}get startPosition(){return this.loc.start}get endPosition(){return this.loc.end}toJSON(){return this.loc}withStart(e){return j(e.data,this.data.getEnd())}withEnd(e){return j(this.data.getStart(),e.data)}asString(){return this.data.asString()}toSlice(e){let r=this.data.asString();return!1&&e!==void 0&&r!==e&&console.warn(`unexpectedly found ${JSON.stringify(r)} when slicing source, but expected ${JSON.stringify(e)}`),new Pr({loc:this,chars:e||r})}get start(){return this.loc.start}set start(e){this.data.locDidUpdate({start:e})}get end(){return this.loc.end}set end(e){this.data.locDidUpdate({end:e})}get source(){return this.module}collapse(e){switch(e){case"start":return this.getStart().collapsed();case"end":return this.getEnd().collapsed()}}extend(e){return j(this.data.getStart(),e.data.getEnd())}serialize(){return this.data.serialize()}slice({skipStart:e=0,skipEnd:r=0}){return j(this.getStart().move(e).data,this.getEnd().move(-r).data)}sliceStartChars({skipStart:e=0,chars:r}){return j(this.getStart().move(e).data,this.getStart().move(e+r).data)}sliceEndChars({skipEnd:e=0,chars:r}){return j(this.getEnd().move(e-r).data,this.getStart().move(-e).data)}},at=class{kind=y.CharPosition;_locPosSpan=null;constructor(e,r){this.source=e,this.charPositions=r}wrap(){return new I(this)}asString(){return this.source.slice(this.charPositions.start.charPos,this.charPositions.end.charPos)}getModule(){return this.source.module}getStart(){return this.charPositions.start}getEnd(){return this.charPositions.end}locDidUpdate(){}toHbsSpan(){let e=this._locPosSpan;if(e===null){let r=this.charPositions.start.toHbsPos(),n=this.charPositions.end.toHbsPos();r===null||n===null?e=this._locPosSpan=pe:e=this._locPosSpan=new ot(this.source,{start:r,end:n})}return e===pe?null:e}serialize(){let{start:{charPos:e},end:{charPos:r}}=this.charPositions;return e===r?e:[e,r]}toCharPosSpan(){return this}},ot=class{kind=y.HbsPosition;_charPosSpan=null;_providedHbsLoc;constructor(e,r,n=null){this.source=e,this.hbsPositions=r,this._providedHbsLoc=n}serialize(){let e=this.toCharPosSpan();return e===null?y.Broken:e.wrap().serialize()}wrap(){return new I(this)}updateProvided(e,r){this._providedHbsLoc&&(this._providedHbsLoc[r]=e),this._charPosSpan=null,this._providedHbsLoc={start:e,end:e}}locDidUpdate({start:e,end:r}){e!==void 0&&(this.updateProvided(e,"start"),this.hbsPositions.start=new fe(this.source,e,null)),r!==void 0&&(this.updateProvided(r,"end"),this.hbsPositions.end=new fe(this.source,r,null))}asString(){let e=this.toCharPosSpan();return e===null?"":e.asString()}getModule(){return this.source.module}getStart(){return this.hbsPositions.start}getEnd(){return this.hbsPositions.end}toHbsLoc(){return{start:this.hbsPositions.start.hbsPos,end:this.hbsPositions.end.hbsPos}}toHbsSpan(){return this}toCharPosSpan(){let e=this._charPosSpan;if(e===null){let r=this.hbsPositions.start.toCharPos(),n=this.hbsPositions.end.toCharPos();if(r&&n)e=this._charPosSpan=new at(this.source,{start:r,end:n});else return e=this._charPosSpan=pe,null}return e===pe?null:e}},ee=class{constructor(e,r,n=null){this.kind=e,this.loc=r,this.string=n}serialize(){switch(this.kind){case y.Broken:case y.NonExistent:return this.kind;case y.InternalsSynthetic:return this.string||""}}wrap(){return new I(this)}asString(){return this.string||""}locDidUpdate({start:e,end:r}){e!==void 0&&(this.loc.start=e),r!==void 0&&(this.loc.end=r)}getModule(){return"an unknown module"}getStart(){return new lt(this.kind,this.loc.start)}getEnd(){return new lt(this.kind,this.loc.end)}toCharPosSpan(){return this}toHbsSpan(){return null}toHbsLoc(){return ue}},j=Rn(t=>t.when(y.HbsPosition,y.HbsPosition,(e,r)=>new ot(e.source,{start:e,end:r}).wrap()).when(y.CharPosition,y.CharPosition,(e,r)=>new at(e.source,{start:e,end:r}).wrap()).when(y.CharPosition,y.HbsPosition,(e,r)=>{let n=r.toCharPos();return n===null?new ee(y.Broken,ue).wrap():j(e,n)}).when(y.HbsPosition,y.CharPosition,(e,r)=>{let n=e.toCharPos();return n===null?new ee(y.Broken,ue).wrap():j(n,r)}).when(Nr,it,e=>new ee(e.kind,ue).wrap()).when(it,Nr,(e,r)=>new ee(r.kind,ue).wrap())),pe="BROKEN",qe=class t{static forHbsPos(e,r){return new fe(e,r,null).wrap()}static broken(e=he){return new lt(y.Broken,e).wrap()}constructor(e){this.data=e}get offset(){let e=this.data.toCharPos();return e===null?null:e.offset}eql(e){return ki(this.data,e.data)}until(e){return j(this.data,e.data)}move(e){let r=this.data.toCharPos();if(r===null)return t.broken();{let n=r.offset+e;return r.source.check(n)?new Te(r.source,n).wrap():t.broken()}}collapsed(){return j(this.data,this.data)}toJSON(){return this.data.toJSON()}},Te=class{kind=y.CharPosition;_locPos=null;constructor(e,r){this.source=e,this.charPos=r}toCharPos(){return this}toJSON(){let e=this.toHbsPos();return e===null?he:e.toJSON()}wrap(){return new qe(this)}get offset(){return this.charPos}toHbsPos(){let e=this._locPos;if(e===null){let r=this.source.hbsPosFor(this.charPos);r===null?this._locPos=e=pe:this._locPos=e=new fe(this.source,r,this.charPos)}return e===pe?null:e}},fe=class{kind=y.HbsPosition;_charPos;constructor(e,r,n=null){this.source=e,this.hbsPos=r,this._charPos=n===null?null:new Te(e,n)}toCharPos(){let e=this._charPos;if(e===null){let r=this.source.charPosFor(this.hbsPos);r===null?this._charPos=e=pe:this._charPos=e=new Te(this.source,r)}return e===pe?null:e}toJSON(){return this.hbsPos}wrap(){return new qe(this)}toHbsPos(){return this}},lt=class{constructor(e,r){this.kind=e,this.pos=r}toCharPos(){return null}toJSON(){return this.pos}wrap(){return new qe(this)}get offset(){return null}},ki=Rn(t=>t.when(y.HbsPosition,y.HbsPosition,({hbsPos:e},{hbsPos:r})=>e.column===r.column&&e.line===r.line).when(y.CharPosition,y.CharPosition,({charPos:e},{charPos:r})=>e===r).when(y.CharPosition,y.HbsPosition,({offset:e},r)=>{var n;return e===((n=r.toCharPos())==null?void 0:n.offset)}).when(y.HbsPosition,y.CharPosition,(e,{offset:r})=>{var n;return((n=e.toCharPos())==null?void 0:n.offset)===r}).when(it,it,()=>!1)),we=class t{static from(e,r={}){var n;return new t(e,(n=r.meta)==null?void 0:n.moduleName)}constructor(e,r="an unknown module"){this.source=e,this.module=r}check(e){return e>=0&&e<=this.source.length}slice(e,r){return this.source.slice(e,r)}offsetFor(e,r){return qe.forHbsPos(this,{line:e,column:r})}spanFor({start:e,end:r}){return I.forHbsLoc(this,{start:{line:e.line,column:e.column},end:{line:r.line,column:r.column}})}hbsPosFor(e){let r=0,n=0;if(e>this.source.length)return null;for(;;){let s=this.source.indexOf(` +`,n);if(e<=s||s===-1)return{line:r+1,column:e-n};r+=1,n=s+1}}charPosFor(e){let{line:r,column:n}=e,i=this.source.length,a=0,o=0;for(;oc)return c;if(!1){let h=this.hbsPosFor(o+n);P(h!==null,"the returned offset failed to round-trip"),P(h.line===r,"the round-tripped line didn't match the original line"),P(h.column===n,"the round-tripped column didn't match the original column")}return o+n}else{if(c===-1)return 0;a+=1,o=c+1}}return i}};function S(t,e){let{module:r,loc:n}=e,{line:s,column:i}=n.start,a=e.asString(),o=a?` | | ${a.split(` @@ -22,9 +22,9 @@ Expecting `+mt.join(", ")+", got '"+(this.terminals_[D]||D)+"'":jt="Parse error | `)} | -`:"",c=new Error(`${t}: ${l}(error occurred in '${r}' @ line ${s} : column ${i})`);return c.name="SyntaxError",c.location=e,c.code=a,c}var Ci={Program:["body"],Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],PartialStatement:["name","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],PathHead:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"],NamedBlock:["attributes","modifiers","children","comments"],SimpleElement:["attributes","modifiers","children","comments"],Component:["head","attributes","modifiers","children","comments"]},Hr=function(){t.prototype=Object.create(Error.prototype),t.prototype.constructor=t;function t(e,r,n,s){let i=Error.call(this,e);this.key=s,this.message=e,this.node=r,this.parent=n,i.stack&&(this.stack=i.stack)}return t}();function On(t,e,r){return new Hr("Cannot remove a node unless it is part of an array",t,e,r)}function xi(t,e,r){return new Hr("Cannot replace a node with multiple nodes unless it is part of an array",t,e,r)}function Bn(t,e){return new Hr("Replacing and removing in key handlers is not yet supported.",t,null,e)}var Fe=class{node;parent;parentKey;constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.node=e,this.parent=r,this.parentKey=n}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new _r(this)}}},_r=class{path;constructor(e){this.path=e}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function Vn(t){return typeof t=="function"?t:t.enter}function Un(t){if(typeof t!="function")return t.exit}function Li(t,e){let r=typeof t!="function"?t.keys:void 0;if(r===void 0)return;let n=r[e];return n!==void 0?n:r.All}function _i(t,e){if((e==="Template"||e==="Block")&&t.Program)return qt&&Nt(`The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was '${e}') `),t.Program;let r=t[e];return r!==void 0?r:t.All}function Vt(t,e){let{node:r,parent:n,parentKey:s}=e,i=_i(t,r.type),a,l;i!==void 0&&(a=Vn(i),l=Un(i));let c;if(a!==void 0&&(c=a(r,e)),c!=null)if(JSON.stringify(r)===JSON.stringify(c))c=void 0;else{if(Array.isArray(c))return Fn(t,c,n,s),c;{let h=new Fe(c,n,s);return Vt(t,h)||c}}if(c===void 0){let h=Ci[r.type];for(let g=0;g@[\\\]^`{|}~]/u;function qi(t){let e=Vi(t);e&&(t.blockParams=e)}function Vi(t){let e=t.attributes.length,r=[];for(let s=0;s0&&ee(r[r.length-1]).charAt(0)==="|")throw S("Block parameters must be preceded by the `as` keyword, detected block parameters without `as`",t.loc);if(n!==-1&&e>n&&ee(r[n+1]).charAt(0)==="|"){let s=r.slice(n).join(" ");if(s.charAt(s.length-1)!=="|"||vt(s.match(/\|/gu),"block params must exist here").length!==2)throw S("Invalid block parameters syntax, '"+s+"'",t.loc);let i=[];for(let a=n+1;a1&&arguments[1]!==void 0?arguments[1]:{},{attrs:r,blockParams:n,modifiers:s,comments:i,children:a,loc:l}=e,c,h=!1;return typeof t=="object"?(h=t.selfClosing,c=t.name):t.slice(-1)==="/"?(c=t.slice(0,-1),h=!0):c=t,{type:"ElementNode",tag:c,selfClosing:h,attributes:r||[],blockParams:n||[],modifiers:s||[],comments:i||[],children:a||[],loc:k(l||null)}}function Qi(t,e,r){return{type:"AttrNode",name:t,value:e,loc:k(r||null)}}function Xi(t,e){return{type:"TextNode",chars:t||"",loc:k(e||null)}}function Ji(t,e,r,n){return{type:"SubExpression",path:pt(t),params:e||[],hash:r||Me([]),loc:k(n||null)}}function Gn(t){switch(t.type){case"AtHead":return{original:t.name,parts:[t.name]};case"ThisHead":return{original:"this",parts:[]};case"VarHead":return{original:t.name,parts:[t.name]}}}function Rn(t,e){let[r,...n]=At(t.split(".")),s;return r==="this"?s={type:"ThisHead",loc:k(e||null)}:r[0]==="@"?s={type:"AtHead",name:r,loc:k(e||null)}:s={type:"VarHead",name:r,loc:k(e||null)},{head:s,tail:n}}function Yn(t){return{type:"ThisHead",loc:k(t||null)}}function zn(t,e){return T(t[0]==="@","call builders.at() with a string that starts with '@'"),{type:"AtHead",name:t,loc:k(e||null)}}function Wn(t,e){return T(t!=="this","You called builders.var() with 'this'. Call builders.this instead"),T(t[0]!=="@",`You called builders.var() with '${t}'. Call builders.at('${t}') instead`),{type:"VarHead",name:t,loc:k(e||null)}}function Zi(t,e){return t[0]==="@"?zn(t,e):t==="this"?Yn(e):Wn(t,e)}function ea(t,e){return{type:"NamedBlockName",name:t,loc:k(e||null)}}function ta(t,e,r){let{original:n,parts:s}=Gn(t),i=[...s,...e],a=[...n,...i].join(".");return new Ae(a,t,e,k(r||null))}function pt(t,e){if(typeof t!="string"){if("type"in t)return t;{let{head:s,tail:i}=Rn(t.head,I.broken());T(i.length===0,"builder.path({ head, tail }) should not be called with a head with dots in it");let{original:a}=Gn(s);return new Ae([a,...i].join("."),s,i,k(e||null))}}let{head:r,tail:n}=Rn(t,I.broken());return new Ae(t,r,n,k(e||null))}function It(t,e,r){return{type:t,value:e,original:e,loc:k(r||null)}}function Me(t,e){return{type:"Hash",pairs:t||[],loc:k(e||null)}}function ra(t,e,r){return{type:"HashPair",key:t,value:e,loc:k(r||null)}}function na(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:k(r||null)}}function sa(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3?arguments[3]:void 0;return{type:"Block",body:t||[],blockParams:e||[],chained:r,loc:k(n||null)}}function ia(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:k(r||null)}}function aa(t,e){return{line:t,column:e}}function k(){for(var t=arguments.length,e=new Array(t),r=0;r1&&arguments[1]!==void 0?arguments[1]:new Er(Ln),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"precompile";this.source=e,this.lines=e.source.split(/\r\n?|\n/u),this.tokenizer=new Sr(this,r,n)}offset(){let{line:e,column:r}=this.tokenizer;return this.source.offsetFor(e,r)}pos(e){let{line:r,column:n}=e;return this.source.offsetFor(r,n)}finish(e){return at({},e,{loc:e.loc.until(this.offset())})}get currentAttr(){return vt(this.currentAttribute,"expected attribute")}get currentTag(){let e=this.currentNode;return T(e&&(e.type==="StartTag"||e.type==="EndTag"),"expected tag"),e}get currentStartTag(){let e=this.currentNode;return T(e&&e.type==="StartTag","expected start tag"),e}get currentEndTag(){let e=this.currentNode;return T(e&&e.type==="EndTag","expected end tag"),e}get currentComment(){let e=this.currentNode;return T(e&&e.type==="CommentStatement","expected a comment"),e}get currentData(){let e=this.currentNode;return T(e&&e.type==="TextNode","expected a text node"),e}acceptTemplate(e){return this[e.type](e)}acceptNode(e){return this[e.type](e)}currentElement(){return Pt(At(this.elementStack))}sourceForNode(e,r){let n=e.loc.start.line-1,s=n-1,i=e.loc.start.column,a=[],l,c,h;for(r?(c=r.loc.end.line-1,h=r.loc.end.column):(c=e.loc.end.line-1,h=e.loc.end.column);sv.pair({key:n.key,value:this.acceptNode(n.value),loc:this.source.spanFor(n.loc)}));return v.hash(r,this.source.spanFor(e.loc))}StringLiteral(e){return v.literal({type:"StringLiteral",value:e.value,loc:e.loc})}BooleanLiteral(e){return v.literal({type:"BooleanLiteral",value:e.value,loc:e.loc})}NumberLiteral(e){return v.literal({type:"NumberLiteral",value:e.value,loc:e.loc})}UndefinedLiteral(e){return v.literal({type:"UndefinedLiteral",value:void 0,loc:e.loc})}NullLiteral(e){return v.literal({type:"NullLiteral",value:null,loc:e.loc})}};function ua(t,e){if(e==="")return{lines:t.split(` -`).length-1,columns:0};let[r]=t.split(e),n=r.split(/\n/u),s=n.length-1;return{lines:s,columns:ee(n[s]).length}}function ha(t,e){let r=e.loc.start.line,n=e.loc.start.column,s=ua(e.original,e.value);r=r+s.lines,s.lines?n=s.columns:n=n+s.columns,t.line=r,t.column=n}function vr(t,e){if(e.path.type.endsWith("Literal")){let a=e.path,l="";throw a.type==="BooleanLiteral"?l=a.original.toString():a.type==="StringLiteral"?l=`"${a.original}"`:a.type==="NullLiteral"?l="null":a.type==="NumberLiteral"?l=a.value.toString():l="undefined",S(`${a.type} "${a.type==="StringLiteral"?a.original:l}" cannot be called as a sub-expression, replace (${l}) with ${l}`,t.source.spanFor(a.loc))}let r=e.path.type==="PathExpression"?t.PathExpression(e.path):t.SubExpression(e.path),n=e.params?e.params.map(a=>t.acceptNode(a)):[],s=ke(n)?Pt(n).loc:r.loc,i=e.hash?t.Hash(e.hash):{type:"Hash",pairs:[],loc:t.source.spanFor(s).collapse("end")};return{path:r,params:n,hash:i}}function Ar(t,e){let{path:r,params:n,hash:s,loc:i}=e;if(Mn(r)){let l=`{{${Fi(r)}}}`,c=`<${t.name} ... ${l} ...`;throw S(`In ${c}, ${l} is not a valid modifier`,e.loc)}let a=v.elementModifier({path:r,params:n,hash:s,loc:i});t.modifiers.push(a)}var Ir=class extends Br{tagOpenLine=0;tagOpenColumn=0;reset(){this.currentNode=null}beginComment(){this.currentNode=v.comment("",this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn))}appendToCommentData(e){this.currentComment.value+=e}finishComment(){Ve(this.currentElement(),this.finish(this.currentComment))}beginData(){this.currentNode=v.text({chars:"",loc:this.offset().collapsed()})}appendToData(e){this.currentData.chars+=e}finishData(){this.currentData.loc=this.currentData.loc.withEnd(this.offset()),Ve(this.currentElement(),this.currentData)}tagOpen(){this.tagOpenLine=this.tokenizer.line,this.tagOpenColumn=this.tokenizer.column}beginStartTag(){this.currentNode={type:"StartTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}beginEndTag(){this.currentNode={type:"EndTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}finishTag(){let e=this.finish(this.currentTag);if(e.type==="StartTag"){if(this.finishStartTag(),e.name===":")throw S("Invalid named block named detected, you may have created a named block without a name, or you may have began your name with a number. Named blocks must have names that are at least one character long, and begin with a lower case letter",this.source.spanFor({start:this.currentTag.loc.toJSON(),end:this.offset().toJSON()}));(Dn.has(e.name)||e.selfClosing)&&this.finishEndTag(!0)}else e.type==="EndTag"&&this.finishEndTag(!1)}finishStartTag(){let{name:e,attributes:r,modifiers:n,comments:s,selfClosing:i,loc:a}=this.finish(this.currentStartTag),l=v.element({tag:e,selfClosing:i,attrs:r,modifiers:n,comments:s,children:[],blockParams:[],loc:a});this.elementStack.push(l)}finishEndTag(e){let r=this.finish(this.currentTag),n=this.elementStack.pop();this.validateEndTag(r,n,e);let s=this.currentElement();n.loc=n.loc.withEnd(this.offset()),qi(n),Ve(s,n)}markTagAsSelfClosing(){this.currentTag.selfClosing=!0}appendToTagName(e){this.currentTag.name+=e}beginAttribute(){let e=this.offset();this.currentAttribute={name:"",parts:[],currentPart:null,isQuoted:!1,isDynamic:!1,start:e,valueSpan:e.collapsed()}}appendToAttributeName(e){this.currentAttr.name+=e}beginAttributeValue(e){this.currentAttr.isQuoted=e,this.startTextPart(),this.currentAttr.valueSpan=this.offset().collapsed()}appendToAttributeValue(e){let r=this.currentAttr.parts,n=r[r.length-1],s=this.currentAttr.currentPart;if(s)s.chars+=e,s.loc=s.loc.withEnd(this.offset());else{let i=this.offset();e===` -`?i=n?n.loc.getEnd():this.currentAttr.valueSpan.getStart():i=i.move(-1),this.currentAttr.currentPart=v.text({chars:e,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let e=this.currentTag,r=this.offset();if(e.type==="EndTag")throw S("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:e.loc.toJSON(),end:r.toJSON()}));let{name:n,parts:s,start:i,isQuoted:a,isDynamic:l,valueSpan:c}=this.currentAttr,h=this.assembleAttributeValue(s,a,l,i.until(r));h.loc=c.withEnd(r);let g=v.attr({name:n,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(g)}reportSyntaxError(e){throw S(e,this.offset().collapsed())}assembleConcatenatedValue(e){for(let s of e)if(s.type!=="MustacheStatement"&&s.type!=="TextNode")throw S(`Unsupported node in quoted attribute value: ${s.type}`,s.loc);it(e,"the concatenation parts of an element should not be empty");let r=Ct(e),n=Pt(e);return v.concat(e,this.source.spanFor(r.loc).extend(this.source.spanFor(n.loc)))}validateEndTag(e,r,n){if(Dn.has(e.name)&&!n)throw S(`<${e.name}> elements do not need end tags. You should remove it`,e.loc);if(r.tag===void 0)throw S(`Closing tag without an open tag`,e.loc);if(r.tag!==e.name)throw S(`Closing tag did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,e.loc)}assembleAttributeValue(e,r,n,s){if(n){if(r)return this.assembleConcatenatedValue(e);{it(e);let[i,a]=e;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw S("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",s)}}else return ke(e)?e[0]:v.text({chars:"",loc:s})}},pa={},Rr=class extends Er{constructor(){super({})}parse(){}};function Kn(t){var c,h;let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.mode||"precompile",n,s;typeof t=="string"?(n=new Ne(t,(c=e.meta)==null?void 0:c.moduleName),r==="codemod"?s=Ot(t,e.parseOptions):s=yr(t,e.parseOptions)):t instanceof Ne?(n=t,r==="codemod"?s=Ot(t.source,e.parseOptions):s=yr(t.source,e.parseOptions)):(n=new Ne("",(h=e.meta)==null?void 0:h.moduleName),s=t);let i;r==="codemod"&&(i=new Rr);let a=I.forCharPositions(n,0,n.source.length);s.loc={source:"(program)",start:a.startPosition,end:a.endPosition};let l=new Ir(n,i,r).acceptTemplate(s);if(e.strictMode&&(l.blockParams=e.locals??[]),e&&e.plugins&&e.plugins.ast)for(let g of e.plugins.ast){let E=at({},e,{syntax:pa},{plugins:void 0}),M=g(E);Ri(l,M.visitor)}return l}var qr=function(t){return t.Helper="Helper",t.Modifier="Modifier",t.Component="Component",t}({}),cl=qr.Helper,ul=qr.Modifier,hl=qr.Component;var Ut=` -`,jn="\r",$n=function(){function t(e){this.length=e.length;for(var r=[0],n=0;nthis.length)return null;for(var r=0,n=this.offsets;n[r+1]<=e;)r++;var s=e-n[r];return{line:r,column:s}},t.prototype.indexForLocation=function(e){var r=e.line,n=e.column;return r<0||r>=this.offsets.length||n<0||n>this.lengthOfLine(r)?null:this.offsets[r]+n},t.prototype.lengthOfLine=function(e){var r=this.offsets[e],n=e===this.offsets.length-1?this.length:this.offsets[e+1];return n-r},t}();function fa(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var Qn=fa;function da(t){let e=t.children??t.body;if(e)for(let r=0;re.indexForLocation({line:s-1,column:i}),n=s=>{let{start:i,end:a}=s.loc;i.offset=r(i),a.offset=r(a)};return()=>({name:"prettierParsePlugin",visitor:{All(s){n(s),da(s)}}})}function ga(t){let e;try{e=Kn(t,{mode:"codemod",plugins:{ast:[ma(t)]}})}catch(r){let n=ya(r);if(n){let s=ba(r);throw Qn(s,{loc:n,cause:r})}throw r}return e}function ba(t){let{message:e}=t,r=e.split(` -`);return r.length>=4&&/^Parse error on line \d+:$/.test(r[0])&&/^-*\^$/.test(le(!1,r,-2))?le(!1,r,-1):r.length>=4&&/:\s?$/.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/.test(le(!1,r,-1))&&r[1]===""&&le(!1,r,-2)===""&&r.slice(2,-2).every(n=>n.startsWith("|"))?r[0].trim().slice(0,-1):e}function ya(t){let{location:e,hash:r}=t;if(e){let{start:n,end:s}=e;return typeof s.line!="number"?{start:n}:e}if(r){let{loc:{last_line:n,last_column:s}}=r;return{start:{line:n,column:s+1}}}}var Ea={parse:ga,astFormat:"glimmer",locStart:Se,locEnd:et};var Xn=[{linguistLanguageId:155,name:"Handlebars",type:"markup",color:"#f7931e",aliases:["hbs","htmlbars"],extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",parsers:["glimmer"],vscodeLanguageIds:["handlebars"]}];var Sa={glimmer:Sn};return os(ka);}); \ No newline at end of file +`:"",c=new Error(`${t}: ${o}(error occurred in '${r}' @ line ${s} : column ${i})`);return c.name="SyntaxError",c.location=e,c.code=a,c}var wi={Program:["body"],Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],PartialStatement:["name","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],ElementStartNode:[],ElementPartNode:[],ElementEndNode:[],ElementNameNode:[],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],PathHead:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"],BlockParam:[],NamedBlock:["attributes","modifiers","children","comments"],SimpleElement:["attributes","modifiers","children","comments"],Component:["head","attributes","modifiers","children","comments"]},Br=function(){t.prototype=Object.create(Error.prototype),t.prototype.constructor=t;function t(e,r,n,s){let i=Error.call(this,e);this.key=s,this.message=e,this.node=r,this.parent=n,i.stack&&(this.stack=i.stack)}return t}();function _n(t,e,r){return new Br("Cannot remove a node unless it is part of an array",t,e,r)}function Ti(t,e,r){return new Br("Cannot replace a node with multiple nodes unless it is part of an array",t,e,r)}function Dn(t,e){return new Br("Replacing and removing in key handlers is not yet supported.",t,null,e)}var Ve=class{node;parent;parentKey;constructor(e,r=null,n=null){this.node=e,this.parent=r,this.parentKey=n}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new xr(this)}}},xr=class{path;constructor(e){this.path=e}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function Hn(t){return typeof t=="function"?t:t.enter}function qn(t){if(typeof t!="function")return t.exit}function Ni(t,e){let r=typeof t!="function"?t.keys:void 0;if(r===void 0)return;let n=r[e];return n!==void 0?n:r.All}function vi(t,e){if((e==="Template"||e==="Block")&&t.Program)return t.Program;let r=t[e];return r!==void 0?r:t.All}function Bt(t,e){let{node:r,parent:n,parentKey:s}=e,i=vi(t,r.type),a,o;i!==void 0&&(a=Hn(i),o=qn(i));let c;if(a!==void 0&&(c=a(r,e)),c!=null)if(JSON.stringify(r)===JSON.stringify(c))c=void 0;else{if(Array.isArray(c))return Vn(t,c,n,s),c;{let h=new Ve(c,n,s);return Bt(t,h)||c}}if(c===void 0){let h=wi[r.type];for(let g=0;g@[\\\]^`{|}~]/u;function Di(t){let e=Ii(t);e&&(t.blockParamNodes=e,t.blockParams=e.map(r=>r.value))}function Oi(t,e){let r=[e.loc.getStart().offset,e.loc.getEnd().offset],n=t.slice(...r),s=r[0],i=n.indexOf("|")+1;s+=i,n=n.slice(i,-1),i=n.indexOf("|"),n=n.slice(0,i);for(let a of e.program.blockParamNodes){let c=new RegExp(`\\b${a.value}\\b`).exec(n),h=[s+c.index,0];h[1]=h[0]+a.value.length,a.loc=t.spanFor({start:t.hbsPosFor(h[0]),end:t.hbsPosFor(h[1])})}}function Bi(t,e){let r=[e.loc.getStart().offset,e.loc.getEnd().offset],n=r[0],s=t.slice(...r);for(let i of e.parts){let a=s.indexOf(i.value),o=[n+a,0];o[1]=o[0]+i.value.length,s=t.slice(o[1],r[1]),n=o[1],i.loc=t.spanFor({start:t.hbsPosFor(o[0]),end:t.hbsPosFor(o[1])})}}function Ii(t){let e=t.attributes.length,r=[];for(let s=0;s0&&Z(r[r.length-1]).charAt(0)==="|")throw S("Block parameters must be preceded by the `as` keyword, detected block parameters without `as`",t.loc);if(n!==-1&&e>n&&Z(r[n+1]).charAt(0)==="|"){let s=r.slice(n).join(" ");if(s.charAt(s.length-1)!=="|"||or(s.match(/\|/gu),"block params must exist here").length!==2)throw S("Invalid block parameters syntax, '"+s+"'",t.loc);let i=[];for(let a=n+1;ao.length&&(c=c.slice({skipEnd:c.endPosition.column-c.startPosition.column-o.length})),i.push({type:"BlockParam",value:o,loc:c})}}if(i.length===0)throw S("Cannot use zero block parameters",t.loc);return t.attributes=t.attributes.slice(0,n),i}return null}function Ri(t){switch(t.type){case"Block":case"Template":return t.body;case"ElementNode":return t.children}}function He(t,e){Ri(t).push(e)}function Fn(t){return t.type==="StringLiteral"||t.type==="BooleanLiteral"||t.type==="NumberLiteral"||t.type==="NullLiteral"||t.type==="UndefinedLiteral"}function Hi(t){return t.type==="UndefinedLiteral"?"undefined":JSON.stringify(t.value)}var Er;function Sr(){return Er||(Er=new we("","(synthetic)")),Er}function qi(t,e,r,n,s,i){return typeof t=="string"&&(t=ct(t)),{type:"MustacheStatement",path:t,params:e||[],hash:r||Fe([]),escaped:!n,trusting:!!n,loc:k(s||null),strip:i||{open:!1,close:!1}}}function Vi(t,e,r,n,s,i,a,o,c){let h,g;return n.type==="Template"?h=nt({},n,{type:"Block"}):h=n,s!=null&&s.type==="Template"?g=nt({},s,{type:"Block"}):g=s,{type:"BlockStatement",path:ct(t),params:e||[],hash:r||Fe([]),program:h||null,inverse:g||null,loc:k(i||null),openStrip:a||{open:!1,close:!1},inverseStrip:o||{open:!1,close:!1},closeStrip:c||{open:!1,close:!1}}}function Fi(t,e,r,n){return{type:"ElementModifierStatement",path:ct(t),params:e||[],hash:r||Fe([]),loc:k(n||null)}}function Ui(t,e,r,n,s){return{type:"PartialStatement",name:t,params:e||[],hash:r||Fe([]),indent:n||"",strip:{open:!1,close:!1},loc:k(s||null)}}function Mi(t,e){return{type:"CommentStatement",value:t,loc:k(e||null)}}function Gi(t,e){return{type:"MustacheCommentStatement",value:t,loc:k(e||null)}}function Yi(t,e){if(!Se(t))throw new Error("b.concat requires at least one part");return{type:"ConcatStatement",parts:t||[],loc:k(e||null)}}function zi(t,e={}){let{attrs:r,blockParams:n,modifiers:s,comments:i,children:a,loc:o}=e,c,h=!1;return typeof t=="object"?(h=t.selfClosing,c=t.name):t.slice(-1)==="/"?(c=t.slice(0,-1),h=!0):c=t,{type:"ElementNode",tag:c,nameNode:{type:"ElementNameNode",value:t},startTag:{type:"ElementStartNode",value:t},endTag:{type:"ElementEndNode",value:h?"":t},parts:c.split(".").map(g=>({type:"ElementPartNode",value:g})),selfClosing:h,attributes:r||[],blockParams:n||[],blockParamNodes:(n==null?void 0:n.map(g=>({type:"BlockParam",value:g})))||[],modifiers:s||[],comments:i||[],children:a||[],loc:k(o||null)}}function Wi(t,e,r){return{type:"AttrNode",name:t,value:e,loc:k(r||null)}}function Ki(t,e){return{type:"TextNode",chars:t||"",loc:k(e||null)}}function ji(t,e,r,n){return{type:"SubExpression",path:ct(t),params:e||[],hash:r||Fe([]),loc:k(n||null)}}function Un(t){switch(t.type){case"AtHead":return{original:t.name,parts:[t.name]};case"ThisHead":return{original:"this",parts:[]};case"VarHead":return{original:t.name,parts:[t.name]}}}function Bn(t,e){let[r,...n]=wt(t.split(".")),s;return r==="this"?s={type:"ThisHead",loc:k(e||null)}:r[0]==="@"?s={type:"AtHead",name:r,loc:k(e||null)}:s={type:"VarHead",name:r,loc:k(e||null)},{head:s,tail:n}}function Mn(t){return{type:"ThisHead",loc:k(t||null)}}function Gn(t,e){return P(t[0]==="@","call builders.at() with a string that starts with '@'"),{type:"AtHead",name:t,loc:k(e||null)}}function Yn(t,e){return P(t!=="this","You called builders.var() with 'this'. Call builders.this instead"),P(t[0]!=="@",`You called builders.var() with '${t}'. Call builders.at('${t}') instead`),{type:"VarHead",name:t,loc:k(e||null)}}function $i(t,e){return t[0]==="@"?Gn(t,e):t==="this"?Mn(e):Yn(t,e)}function Qi(t,e){return{type:"NamedBlockName",name:t,loc:k(e||null)}}function Xi(t,e,r){let{original:n,parts:s}=Un(t),i=[...s,...e],a=[...n,...i].join(".");return new Ne(a,t,e,k(r||null))}function ct(t,e){if(typeof t!="string"){if("type"in t)return t;{let{head:s,tail:i}=Bn(t.head,I.broken());P(i.length===0,"builder.path({ head, tail }) should not be called with a head with dots in it");let{original:a}=Un(s);return new Ne([a,...i].join("."),s,i,k(e||null))}}let{head:r,tail:n}=Bn(t,I.broken());return new Ne(t,r,n,k(e||null))}function _t(t,e,r){return{type:t,value:e,original:e,loc:k(r||null)}}function Fe(t,e){return{type:"Hash",pairs:t||[],loc:k(e||null)}}function Ji(t,e,r){return{type:"HashPair",key:t,value:e,loc:k(r||null)}}function Zi(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:k(r||null)}}function ea(t,e,r=!1,n){return{type:"Block",body:t||[],blockParams:e||[],blockParamNodes:(e==null?void 0:e.map(s=>({type:"BlockParam",value:s})))||[],chained:r,loc:k(n||null)}}function ta(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:k(r||null)}}function ra(t,e){return{line:t,column:e}}function k(...t){if(t.length===1){let e=t[0];return e&&typeof e=="object"?I.forHbsLoc(Sr(),e):I.forHbsLoc(Sr(),Ei)}else{let[e,r,n,s,i]=t,a=i?new we("",i):Sr();return I.forHbsLoc(a,{start:{line:e,column:r},end:{line:n,column:s}})}}var na={mustache:qi,block:Vi,partial:Ui,comment:Mi,mustacheComment:Gi,element:zi,elementModifier:Fi,attr:Wi,text:Ki,sexpr:ji,concat:Yi,hash:Fe,pair:Ji,literal:_t,program:Zi,blockItself:ea,template:ta,loc:k,pos:ra,path:ct,fullPath:Xi,head:$i,at:Gn,var:Yn,this:Mn,blockName:Qi,string:kr("StringLiteral"),boolean:kr("BooleanLiteral"),number:kr("NumberLiteral"),undefined(){return _t("UndefinedLiteral",void 0)},null(){return _t("NullLiteral",null)}};function kr(t){return function(e,r){return _t(t,e,r)}}var Ne=class{type="PathExpression";parts;this=!1;data=!1;constructor(e,r,n,s){this.original=e,this.loc=s;let i=n.slice();r.type==="ThisHead"?this.this=!0:r.type==="AtHead"?(this.data=!0,i.unshift(r.name.slice(1))):i.unshift(r.name),this.parts=i}_head=void 0;get head(){if(this._head)return this._head;let e;this.this?e="this":this.data?e=`@${Nt(wt(this.parts))}`:(rt(this.parts),e=Nt(this.parts));let r=this.loc.collapse("start").sliceStartChars({chars:e.length}).loc;return this._head=na.head(e,r)}get tail(){return this.this?this.parts:this.parts.slice(1)}},Lt={close:!1,open:!1},Cr=class{pos(e,r){return{line:e,column:r}}blockItself({body:e=[],blockParams:r=[],chained:n=!1,loc:s}){return{type:"Block",body:e,blockParams:r,blockParamNodes:r==null?void 0:r.map(i=>({type:"BlockParam",value:i})),chained:n,loc:s}}template({body:e,blockParams:r,loc:n}){return{type:"Template",body:e||[],blockParams:r||[],loc:n}}mustache({path:e,params:r,hash:n,trusting:s,loc:i,strip:a=Lt}){return{type:"MustacheStatement",path:e,params:r,hash:n,escaped:!s,trusting:s,loc:i,strip:a||{open:!1,close:!1}}}block({path:e,params:r,hash:n,defaultBlock:s,elseBlock:i=null,loc:a,openStrip:o=Lt,inverseStrip:c=Lt,closeStrip:h=Lt}){return{type:"BlockStatement",path:e,params:r,hash:n,program:s,inverse:i,loc:a,openStrip:o,inverseStrip:c,closeStrip:h}}comment(e,r){return{type:"CommentStatement",value:e,loc:r}}mustacheComment(e,r){return{type:"MustacheCommentStatement",value:e,loc:r}}concat(e,r){return{type:"ConcatStatement",parts:e,loc:r}}element({tag:e,selfClosing:r,attrs:n,blockParams:s,modifiers:i,comments:a,children:o,loc:c}){return{type:"ElementNode",tag:e,nameNode:{type:"ElementNameNode",value:e},startTag:{type:"ElementStartNode",value:e},endTag:{type:"ElementEndNode",value:r?"":e},parts:e.split(".").map(h=>({type:"ElementPartNode",value:h})),selfClosing:r,attributes:n||[],blockParams:s,blockParamNodes:s.map(h=>({type:"BlockParam",value:h}))||[],modifiers:i||[],comments:a||[],children:o||[],loc:c}}elementModifier({path:e,params:r,hash:n,loc:s}){return{type:"ElementModifierStatement",path:e,params:r,hash:n,loc:s}}attr({name:e,value:r,loc:n}){return{type:"AttrNode",name:e,value:r,loc:n}}text({chars:e,loc:r}){return{type:"TextNode",chars:e,loc:r}}sexpr({path:e,params:r,hash:n,loc:s}){return{type:"SubExpression",path:e,params:r,hash:n,loc:s}}path({head:e,tail:r,loc:n}){let{original:s}=sa(e),i=[...s,...r].join(".");return new Ne(i,e,r,n)}head(e,r){return e[0]==="@"?this.atName(e,r):e==="this"?this.this(r):this.var(e,r)}this(e){return{type:"ThisHead",loc:e}}atName(e,r){return P(e[0]==="@","call builders.at() with a string that starts with '@'"),{type:"AtHead",name:e,loc:r}}var(e,r){return P(e!=="this","You called builders.var() with 'this'. Call builders.this instead"),P(e[0]!=="@",`You called builders.var() with '${e}'. Call builders.at('${e}') instead`),{type:"VarHead",name:e,loc:r}}hash(e,r){return{type:"Hash",pairs:e||[],loc:r}}pair({key:e,value:r,loc:n}){return{type:"HashPair",key:e,value:r,loc:n}}literal({type:e,value:r,loc:n}){return{type:e,value:r,original:r,loc:n}}undefined(){return this.literal({type:"UndefinedLiteral",value:void 0})}null(){return this.literal({type:"NullLiteral",value:null})}string(e,r){return this.literal({type:"StringLiteral",value:e,loc:r})}boolean(e,r){return this.literal({type:"BooleanLiteral",value:e,loc:r})}number(e,r){return this.literal({type:"NumberLiteral",value:e,loc:r})}};function sa(t){switch(t.type){case"AtHead":return{original:t.name,parts:[t.name]};case"ThisHead":return{original:"this",parts:[]};case"VarHead":return{original:t.name,parts:[t.name]}}}var N=new Cr,Lr=class{elementStack=[];lines;source;currentAttribute=null;currentNode=null;tokenizer;constructor(e,r=new gr(xn),n="precompile"){this.source=e,this.lines=e.source.split(/\r\n?|\n/u),this.tokenizer=new br(this,r,n)}offset(){let{line:e,column:r}=this.tokenizer;return this.source.offsetFor(e,r)}pos({line:e,column:r}){return this.source.offsetFor(e,r)}finish(e){return nt({},e,{loc:e.loc.until(this.offset())})}get currentAttr(){return or(this.currentAttribute,"expected attribute")}get currentTag(){let e=this.currentNode;return P(e&&(e.type==="StartTag"||e.type==="EndTag"),"expected tag"),e}get currentStartTag(){let e=this.currentNode;return P(e&&e.type==="StartTag","expected start tag"),e}get currentEndTag(){let e=this.currentNode;return P(e&&e.type==="EndTag","expected end tag"),e}get currentComment(){let e=this.currentNode;return P(e&&e.type==="CommentStatement","expected a comment"),e}get currentData(){let e=this.currentNode;return P(e&&e.type==="TextNode","expected a text node"),e}acceptTemplate(e){return this[e.type](e)}acceptNode(e){return this[e.type](e)}currentElement(){return Tt(wt(this.elementStack))}sourceForNode(e,r){let n=e.loc.start.line-1,s=n-1,i=e.loc.start.column,a=[],o,c,h;for(r?(c=r.loc.end.line-1,h=r.loc.end.column):(c=e.loc.end.line-1,h=e.loc.end.column);sN.pair({key:n.key,value:this.acceptNode(n.value),loc:this.source.spanFor(n.loc)}));return N.hash(r,this.source.spanFor(e.loc))}StringLiteral(e){return N.literal({type:"StringLiteral",value:e.value,loc:e.loc})}BooleanLiteral(e){return N.literal({type:"BooleanLiteral",value:e.value,loc:e.loc})}NumberLiteral(e){return N.literal({type:"NumberLiteral",value:e.value,loc:e.loc})}UndefinedLiteral(e){return N.literal({type:"UndefinedLiteral",value:void 0,loc:e.loc})}NullLiteral(e){return N.literal({type:"NullLiteral",value:null,loc:e.loc})}};function aa(t,e){if(e==="")return{lines:t.split(` +`).length-1,columns:0};let[r]=t.split(e),n=r.split(/\n/u),s=n.length-1;return{lines:s,columns:Z(n[s]).length}}function oa(t,e){let r=e.loc.start.line,n=e.loc.start.column,s=aa(e.original,e.value);r=r+s.lines,s.lines?n=s.columns:n=n+s.columns,t.line=r,t.column=n}function wr(t,e){if(e.path.type.endsWith("Literal")){let a=e.path,o="";throw a.type==="BooleanLiteral"?o=a.original.toString():a.type==="StringLiteral"?o=`"${a.original}"`:a.type==="NullLiteral"?o="null":a.type==="NumberLiteral"?o=a.value.toString():o="undefined",S(`${a.type} "${a.type==="StringLiteral"?a.original:o}" cannot be called as a sub-expression, replace (${o}) with ${o}`,t.source.spanFor(a.loc))}let r=e.path.type==="PathExpression"?t.PathExpression(e.path):t.SubExpression(e.path),n=e.params?e.params.map(a=>t.acceptNode(a)):[],s=Se(n)?Tt(n).loc:r.loc,i=e.hash?t.Hash(e.hash):{type:"Hash",pairs:[],loc:t.source.spanFor(s).collapse("end")};return{path:r,params:n,hash:i}}function Tr(t,e){let{path:r,params:n,hash:s,loc:i}=e;if(Fn(r)){let o=`{{${Hi(r)}}}`,c=`<${t.name} ... ${o} ...`;throw S(`In ${c}, ${o} is not a valid modifier`,e.loc)}let a=N.elementModifier({path:r,params:n,hash:s,loc:i});t.modifiers.push(a)}var Dr=class extends _r{tagOpenLine=0;tagOpenColumn=0;reset(){this.currentNode=null}beginComment(){this.currentNode=N.comment("",this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn))}appendToCommentData(e){this.currentComment.value+=e}finishComment(){He(this.currentElement(),this.finish(this.currentComment))}beginData(){this.currentNode=N.text({chars:"",loc:this.offset().collapsed()})}appendToData(e){this.currentData.chars+=e}finishData(){this.currentData.loc=this.currentData.loc.withEnd(this.offset()),He(this.currentElement(),this.currentData)}tagOpen(){this.tagOpenLine=this.tokenizer.line,this.tagOpenColumn=this.tokenizer.column}beginStartTag(){this.currentNode={type:"StartTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}beginEndTag(){this.currentNode={type:"EndTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}finishTag(){let e=this.finish(this.currentTag);if(e.type==="StartTag"){if(this.finishStartTag(),e.name===":")throw S("Invalid named block named detected, you may have created a named block without a name, or you may have began your name with a number. Named blocks must have names that are at least one character long, and begin with a lower case letter",this.source.spanFor({start:this.currentTag.loc.toJSON(),end:this.offset().toJSON()}));(Ln.has(e.name)||e.selfClosing)&&this.finishEndTag(!0)}else e.type==="EndTag"&&this.finishEndTag(!1)}finishStartTag(){let{name:e,attributes:r,modifiers:n,comments:s,selfClosing:i,loc:a}=this.finish(this.currentStartTag),o=N.element({tag:e,selfClosing:i,attrs:r,modifiers:n,comments:s,children:[],blockParams:[],loc:a});o.startTag={type:"ElementStartNode",value:e,loc:a},o.nameNode={type:"ElementNameNode",value:e,loc:a.withStart(this.source.offsetFor(a.startPosition.line,a.startPosition.column+1)).withEnd(this.source.offsetFor(a.startPosition.line,a.startPosition.column+1+e.length))},Bi(this.source,o),this.elementStack.push(o)}finishEndTag(e){let r=this.finish(this.currentTag),n=this.elementStack.pop();n.endTag={type:"ElementEndNode",loc:r.loc,value:n.selfClosing?"":r.name},this.validateEndTag(r,n,e);let s=this.currentElement();n.loc=n.loc.withEnd(this.offset()),Di(n),He(s,n)}markTagAsSelfClosing(){this.currentTag.selfClosing=!0}appendToTagName(e){this.currentTag.name+=e}beginAttribute(){let e=this.offset();this.currentAttribute={name:"",parts:[],currentPart:null,isQuoted:!1,isDynamic:!1,start:e,valueSpan:e.collapsed()}}appendToAttributeName(e){this.currentAttr.name+=e}beginAttributeValue(e){this.currentAttr.isQuoted=e,this.startTextPart(),this.currentAttr.valueSpan=this.offset().collapsed()}appendToAttributeValue(e){let r=this.currentAttr.parts,n=r[r.length-1],s=this.currentAttr.currentPart;if(s)s.chars+=e,s.loc=s.loc.withEnd(this.offset());else{let i=this.offset();e===` +`?i=n?n.loc.getEnd():this.currentAttr.valueSpan.getStart():i=i.move(-1),this.currentAttr.currentPart=N.text({chars:e,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let e=this.currentTag,r=this.offset();if(e.type==="EndTag")throw S("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:e.loc.toJSON(),end:r.toJSON()}));let{name:n,parts:s,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr,h=this.assembleAttributeValue(s,a,o,i.until(r));h.loc=c.withEnd(r);let g=N.attr({name:n,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(g)}reportSyntaxError(e){throw S(e,this.offset().collapsed())}assembleConcatenatedValue(e){for(let s of e)if(s.type!=="MustacheStatement"&&s.type!=="TextNode")throw S(`Unsupported node in quoted attribute value: ${s.type}`,s.loc);rt(e,"the concatenation parts of an element should not be empty");let r=Nt(e),n=Tt(e);return N.concat(e,this.source.spanFor(r.loc).extend(this.source.spanFor(n.loc)))}validateEndTag(e,r,n){if(Ln.has(e.name)&&!n)throw S(`<${e.name}> elements do not need end tags. You should remove it`,e.loc);if(r.tag===void 0)throw S(`Closing tag without an open tag`,e.loc);if(r.tag!==e.name)throw S(`Closing tag did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,e.loc)}assembleAttributeValue(e,r,n,s){if(n){if(r)return this.assembleConcatenatedValue(e);{rt(e);let[i,a]=e;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw S("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",s)}}else return Se(e)?e[0]:N.text({chars:"",loc:s})}},la={},Or=class extends gr{constructor(){super({})}parse(){}};function zn(t,e={}){var c,h;let r=e.mode||"precompile",n,s;typeof t=="string"?(n=new we(t,(c=e.meta)==null?void 0:c.moduleName),r==="codemod"?s=Ct(t,e.parseOptions):s=mr(t,e.parseOptions)):t instanceof we?(n=t,r==="codemod"?s=Ct(t.source,e.parseOptions):s=mr(t.source,e.parseOptions)):(n=new we("",(h=e.meta)==null?void 0:h.moduleName),s=t);let i;r==="codemod"&&(i=new Or);let a=I.forCharPositions(n,0,n.source.length);s.loc={source:"(program)",start:a.startPosition,end:a.endPosition};let o=new Dr(n,i,r).acceptTemplate(s);if(e.strictMode&&(o.blockParams=e.locals??[]),e&&e.plugins&&e.plugins.ast)for(let g of e.plugins.ast){let E=nt({},e,{syntax:la},{plugins:void 0}),M=g(E);Li(o,M.visitor)}return o}var Ir=function(t){return t.Helper="Helper",t.Modifier="Modifier",t.Component="Component",t}({}),al=Ir.Helper,ol=Ir.Modifier,ll=Ir.Component;var It=` +`,Wn="\r",Kn=function(){function t(e){this.length=e.length;for(var r=[0],n=0;nthis.length)return null;for(var r=0,n=this.offsets;n[r+1]<=e;)r++;var s=e-n[r];return{line:r,column:s}},t.prototype.indexForLocation=function(e){var r=e.line,n=e.column;return r<0||r>=this.offsets.length||n<0||n>this.lengthOfLine(r)?null:this.offsets[r]+n},t.prototype.lengthOfLine=function(e){var r=this.offsets[e],n=e===this.offsets.length-1?this.length:this.offsets[e+1];return n-r},t}();function ca(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var jn=ca;function ua(t){let e=t.children??t.body;if(e)for(let r=0;re.indexForLocation({line:s-1,column:i}),n=s=>{let{start:i,end:a}=s.loc;i.offset=r(i),a.offset=r(a)};return()=>({name:"prettierParsePlugin",visitor:{All(s){n(s),ua(s)}}})}function pa(t){let e;try{e=zn(t,{mode:"codemod",plugins:{ast:[ha(t)]}})}catch(r){let n=da(r);if(n){let s=fa(r);throw jn(s,{loc:n,cause:r})}throw r}return e}function fa(t){let{message:e}=t,r=e.split(` +`);return r.length>=4&&/^Parse error on line \d+:$/.test(r[0])&&/^-*\^$/.test(oe(!1,r,-2))?oe(!1,r,-1):r.length>=4&&/:\s?$/.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/.test(oe(!1,r,-1))&&r[1]===""&&oe(!1,r,-2)===""&&r.slice(2,-2).every(n=>n.startsWith("|"))?r[0].trim().slice(0,-1):e}function da(t){let{location:e,hash:r}=t;if(e){let{start:n,end:s}=e;return typeof s.line!="number"?{start:n}:e}if(r){let{loc:{last_line:n,last_column:s}}=r;return{start:{line:n,column:s+1}}}}var ma={parse:pa,astFormat:"glimmer",locStart:Ee,locEnd:et};var ga={glimmer:bn};return ss(ba);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/glimmer.mjs b/node_modules/prettier/plugins/glimmer.mjs index dc4f7e4..9f43883 100644 --- a/node_modules/prettier/plugins/glimmer.mjs +++ b/node_modules/prettier/plugins/glimmer.mjs @@ -1,20 +1,20 @@ -var ns=Object.defineProperty;var $t=(t,e)=>{for(var r in e)ns(t,r,{get:e[r],enumerable:!0})};var Yr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var W=(t,e,r)=>(Yr(t,e,"read from private field"),r?r.call(t):e.get(t)),Qt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Xt=(t,e,r,n)=>(Yr(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Vr={};$t(Vr,{languages:()=>Xn,parsers:()=>qr,printers:()=>ga});var ss=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},Jt=ss;var Ye="string",ze="array",We="cursor",De="indent",Oe="align",Ke="trim",Be="group",Ie="fill",Re="if-break",je="indent-if-break",$e="line-suffix",Qe="line-suffix-boundary",Z="line",Xe="label",He="break-parent",gt=new Set([We,De,Oe,Ke,Be,Ie,Re,je,$e,Qe,Z,Xe,He]);function is(t){if(typeof t=="string")return Ye;if(Array.isArray(t))return ze;if(!t)return;let{type:e}=t;if(gt.has(e))return e}var Je=is;var as=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function os(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', -Expected it to be 'string' or 'object'.`;if(Je(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=as([...gt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. -Expected it to be ${n}.`}var Zt=class extends Error{name="InvalidDocError";constructor(e){super(os(e)),this.doc=e}},er=Zt;var zr=()=>{},be=zr,bt=zr;function O(t){return be(t),{type:De,contents:t}}function ls(t,e){return be(e),{type:Oe,contents:e,n:t}}function B(t,e={}){return be(t),bt(e.expandedStates,!0),{type:Be,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function tr(t){return ls(-1,t)}function rr(t){return bt(t),{type:Ie,parts:t}}function nr(t,e="",r={}){return be(t),e!==""&&be(e),{type:Re,breakContents:t,flatContents:e,groupId:r.groupId}}var Wr={type:He};var cs={type:Z,hard:!0},us={type:Z,hard:!0,literal:!0},x={type:Z},G={type:Z,soft:!0},ye=[cs,Wr],Kr=[us,Wr];function Ee(t,e){be(t),bt(e);let r=[];for(let n=0;n{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},le=hs;function ps(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Je(i)){case ze:return e(i.map(n));case Ie:return e({...i,parts:i.parts.map(n)});case Re:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Be:{let{expandedStates:a,contents:l}=i;return a?(a=a.map(n),l=a[0]):l=n(l),e({...i,contents:l,expandedStates:a})}case Oe:case De:case je:case Xe:case $e:return e({...i,contents:n(i.contents)});case Ye:case We:case Ke:case Qe:case Z:case He:return e(i);default:throw new er(i)}}}function jr(t,e=Kr){return ps(t,r=>typeof r=="string"?Ee(e,r.split(` -`)):r)}var yt="'",$r='"';function fs(t,e){let r=e===!0||e===yt?yt:$r,n=r===yt?$r:yt,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var Et=fs;function ds(t){return Array.isArray(t)&&t.length>0}var Ze=ds;var sr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},Qr=sr;function ir(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var F,ar=class{constructor(e){Qt(this,F,void 0);Xt(this,F,new Set(e))}getLeadingWhitespaceCount(e){let r=W(this,F),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return W(this,F).has(e.charAt(0))}hasTrailingWhitespace(e){return W(this,F).has(le(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${ir([...W(this,F)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return e.split(s)}hasWhitespaceCharacter(e){let r=W(this,F);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=W(this,F);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=W(this,F);return Array.prototype.every.call(e,n=>r.has(n))}};F=new WeakMap;var Xr=ar;var ms=[" ",` -`,"\f","\r"," "],gs=new Xr(ms),Y=gs;function Se(t){return t.loc.start.offset}function et(t){return t.loc.end.offset}function Jr(t,e){if(t.type==="TextNode"){let r=t.chars.trim();if(!r)return null;e.chars=Y.split(r).join(" ")}t.type==="AttrNode"&&t.name.toLowerCase()==="class"&&delete e.value}Jr.ignoredProperties=new Set(["loc","selfClosing"]);var Zr=Jr;var en=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function rn(t){return t.toUpperCase()===t}function bs(t){return t.type==="ElementNode"&&typeof t.tag=="string"&&!t.tag.startsWith(":")&&(rn(t.tag[0])||t.tag.includes("."))}function ys(t){return en.has(t.toLowerCase())&&!rn(t[0])}function or(t){return t.selfClosing===!0||ys(t.tag)||bs(t)&&t.children.every(e=>St(e))}function St(t){return t.type==="TextNode"&&!/\S/.test(t.chars)}function tn(t){return(t==null?void 0:t.type)==="MustacheCommentStatement"&&typeof t.value=="string"&&t.value.trim()==="prettier-ignore"}function nn(t){return tn(t.node)||t.isInArray&&(t.key==="children"||t.key==="body"||t.key==="parts")&&tn(t.siblings[t.index-2])}var tt=null;function rt(t){if(tt!==null&&typeof tt.property){let e=tt;return tt=rt.prototype=null,e}return tt=rt.prototype=t??Object.create(null),new rt}var Es=10;for(let t=0;t<=Es;t++)rt();function lr(t){return rt(t)}function Ss(t,e="type"){lr(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var sn=Ss;var an={Program:["body"],Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],PartialStatement:["name","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],PathHead:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"],NamedBlock:["attributes","modifiers","children","comments"],SimpleElement:["attributes","modifiers","children","comments"],Component:["head","attributes","modifiers","children","comments"]};var ks=sn(an),on=ks;var mn=2;function ws(t,e,r){var s,i,a,l,c,h,g,E,M;let{node:n}=t;switch(n.type){case"Block":case"Program":case"Template":return B(t.map(r,"body"));case"ElementNode":{let b=B(Ns(t,r)),A=e.htmlWhitespaceSensitivity==="ignore"&&((s=t.next)==null?void 0:s.type)==="ElementNode"?G:"";if(or(n))return[b,A];let L=[""];return n.children.length===0?[b,O(L),A]:e.htmlWhitespaceSensitivity==="ignore"?[b,O(ln(t,e,r)),ye,O(L),A]:[b,O(B(ln(t,e,r))),O(L),A]}case"BlockStatement":return Ls(t)?[_s(t,r),hn(t,r,e),pn(t,r,e)]:[Cs(t,r),B([hn(t,r,e),pn(t,r,e),Ds(t,r,e)])];case"ElementModifierStatement":return B(["{{",dn(t,r),"}}"]);case"MustacheStatement":return B([kt(n),dn(t,r),wt(n)]);case"SubExpression":return B(["(",Vs(t,r),G,")"]);case"AttrNode":{let{name:b,value:A}=n,L=A.type==="TextNode";if(L&&A.chars===""&&Se(A)===et(A))return b;let N=L?Et(A.chars,e.singleQuote):A.type==="ConcatStatement"?Et(A.parts.map(H=>H.type==="TextNode"?H.chars:"").join(""),e.singleQuote):"",re=r("value");return[b,"=",N,b==="class"&&N?B(O(re)):re,N]}case"ConcatStatement":return t.map(r,"parts");case"Hash":return Ee(x,t.map(r,"pairs"));case"HashPair":return[n.key,"=",r("value")];case"TextNode":{let b=Jt(!1,n.chars,"{{","\\{{"),A=Bs(t);if(A){if(A==="class"){let X=b.trim().split(/\s+/).join(" "),ne=!1,q=!1;return t.parent.type==="ConcatStatement"&&(((i=t.previous)==null?void 0:i.type)==="MustacheStatement"&&/^\s/.test(b)&&(ne=!0),((a=t.next)==null?void 0:a.type)==="MustacheStatement"&&/\s$/.test(b)&&X!==""&&(q=!0)),[ne?x:"",X,q?x:""]}return jr(b)}let L=Y.isWhitespaceOnly(b),{isFirst:R,isLast:N}=t;if(e.htmlWhitespaceSensitivity!=="ignore"){let X=N&&t.parent.type==="Template",ne=R&&t.parent.type==="Template";if(L){if(ne||X)return"";let C=[x],ie=qe(b);return ie&&(C=nt(ie)),N&&(C=C.map(ft=>tr(ft))),C}let q=Y.getLeadingWhitespace(b),xe=[];if(q){xe=[x];let C=qe(q);C&&(xe=nt(C)),b=b.slice(q.length)}let V=Y.getTrailingWhitespace(b),se=[];if(V){if(!X){se=[x];let C=qe(V);C&&(se=nt(C)),N&&(se=se.map(ie=>tr(ie)))}b=b.slice(0,-V.length)}return[...xe,rr(fn(b)),...se]}let re=qe(b),H=Is(b),Q=Rs(b);if((R||N)&&L&&(t.parent.type==="Block"||t.parent.type==="ElementNode"||t.parent.type==="Template"))return"";L&&re?(H=Math.min(re,mn),Q=0):((((l=t.next)==null?void 0:l.type)==="BlockStatement"||((c=t.next)==null?void 0:c.type)==="ElementNode")&&(Q=Math.max(Q,1)),(((h=t.previous)==null?void 0:h.type)==="BlockStatement"||((g=t.previous)==null?void 0:g.type)==="ElementNode")&&(H=Math.max(H,1)));let Pe="",Ce="";return Q===0&&((E=t.next)==null?void 0:E.type)==="MustacheStatement"&&(Ce=" "),H===0&&((M=t.previous)==null?void 0:M.type)==="MustacheStatement"&&(Pe=" "),R&&(H=0,Pe=""),N&&(Q=0,Ce=""),Y.hasLeadingWhitespace(b)&&(b=Pe+Y.trimStart(b)),Y.hasTrailingWhitespace(b)&&(b=Y.trimEnd(b)+Ce),[...nt(H),rr(fn(b)),...nt(Q)]}case"MustacheCommentStatement":{let b=Se(n),A=et(n),L=e.originalText.charAt(b+2)==="~",R=e.originalText.charAt(A-3)==="~",N=n.value.includes("}}")?"--":"";return["{{",L?"~":"","!",N,n.value,N,R?"~":"","}}"]}case"PathExpression":return n.original;case"BooleanLiteral":return String(n.value);case"CommentStatement":return[""];case"StringLiteral":return Hs(t,e);case"NumberLiteral":return String(n.value);case"UndefinedLiteral":return"undefined";case"NullLiteral":return"null";default:throw new Qr(n,"Handlebars")}}function Ts(t,e){return Se(t)-Se(e)}function Ns(t,e){let{node:r}=t,n=["attributes","modifiers","comments"].filter(i=>Ze(r[i])),s=n.flatMap(i=>r[i]).sort(Ts);for(let i of n)t.each(({node:a})=>{let l=s.indexOf(a);s.splice(l,1,[x,e()])},i);return Ze(r.blockParams)&&s.push(x,ur(r)),["<",r.tag,O(s),vs(r)]}function ln(t,e,r){let{node:n}=t,s=n.children.every(i=>St(i));return e.htmlWhitespaceSensitivity==="ignore"&&s?"":t.map(({isFirst:i})=>{let a=r();return i&&e.htmlWhitespaceSensitivity==="ignore"?[G,a]:a},"children")}function vs(t){return or(t)?nr([G,"/>"],[" />",G]):nr([G,">"],">")}function kt(t){var n;let e=t.escaped===!1?"{{{":"{{",r=(n=t.strip)!=null&&n.open?"~":"";return[e,r]}function wt(t){var n;let e=t.escaped===!1?"}}}":"}}";return[(n=t.strip)!=null&&n.close?"~":"",e]}function As(t){let e=kt(t),r=t.openStrip.open?"~":"";return[e,r,"#"]}function Ps(t){let e=wt(t);return[t.openStrip.close?"~":"",e]}function cn(t){let e=kt(t),r=t.closeStrip.open?"~":"";return[e,r,"/"]}function un(t){let e=wt(t);return[t.closeStrip.close?"~":"",e]}function gn(t){let e=kt(t),r=t.inverseStrip.open?"~":"";return[e,r]}function bn(t){let e=wt(t);return[t.inverseStrip.close?"~":"",e]}function Cs(t,e){let{node:r}=t,n=[],s=Tt(t,e);return s&&n.push(B(s)),Ze(r.program.blockParams)&&n.push(ur(r.program)),B([As(r),cr(t,e),n.length>0?O([x,Ee(x,n)]):"",G,Ps(r)])}function xs(t,e){return[e.htmlWhitespaceSensitivity==="ignore"?ye:"",gn(t),"else",bn(t)]}function Ls(t){var n;let{grandparent:e,node:r}=t;return((n=e==null?void 0:e.inverse)==null?void 0:n.body.length)===1&&e.inverse.body[0]===r&&e.inverse.body[0].path.parts[0]===e.path.parts[0]}function _s(t,e){let{node:r,grandparent:n}=t;return B([gn(n),["else"," ",n.inverse.body[0].path.parts[0]],O([x,B(Tt(t,e)),...Ze(r.program.blockParams)?[x,ur(r.program)]:[]]),G,bn(n)])}function Ds(t,e,r){let{node:n}=t;return r.htmlWhitespaceSensitivity==="ignore"?[yn(n)?G:ye,cn(n),e("path"),un(n)]:[cn(n),e("path"),un(n)]}function yn(t){return t.type==="BlockStatement"&&t.program.body.every(e=>St(e))}function Os(t){return En(t)&&t.inverse.body.length===1&&t.inverse.body[0].type==="BlockStatement"&&t.inverse.body[0].path.parts[0]===t.path.parts[0]}function En(t){return t.type==="BlockStatement"&&t.inverse}function hn(t,e,r){let{node:n}=t;if(yn(n))return"";let s=e("program");return r.htmlWhitespaceSensitivity==="ignore"?O([ye,s]):O(s)}function pn(t,e,r){let{node:n}=t,s=e("inverse"),i=r.htmlWhitespaceSensitivity==="ignore"?[ye,s]:s;return Os(n)?i:En(n)?[xs(n,r),O(i)]:""}function fn(t){return Ee(x,Y.split(t))}function Bs(t){for(let e=0;e<2;e++){let r=t.getParentNode(e);if((r==null?void 0:r.type)==="AttrNode")return r.name.toLowerCase()}}function qe(t){return t=typeof t=="string"?t:"",t.split(` -`).length-1}function Is(t){t=typeof t=="string"?t:"";let e=(t.match(/^([^\S\n\r]*[\n\r])+/g)||[])[0]||"";return qe(e)}function Rs(t){t=typeof t=="string"?t:"";let e=(t.match(/([\n\r][^\S\n\r]*)+$/g)||[])[0]||"";return qe(e)}function nt(t=0){return Array.from({length:Math.min(t,mn)}).fill(ye)}function Hs(t,e){let{node:{value:r}}=t,n=Et(r,qs(t)?!e.singleQuote:e.singleQuote);return[n,Jt(!1,r,n,`\\${n}`),n]}function qs(t){let{ancestors:e}=t,r=e.findIndex(n=>n.type!=="SubExpression");return r!==-1&&e[r+1].type==="ConcatStatement"&&e[r+2].type==="AttrNode"}function Vs(t,e){let r=cr(t,e),n=Tt(t,e);return n?O([r,x,B(n)]):r}function dn(t,e){let r=cr(t,e),n=Tt(t,e);return n?[O([r,x,n]),G]:r}function cr(t,e){return e("path")}function Tt(t,e){var s;let{node:r}=t,n=[];return r.params.length>0&&n.push(...t.map(e,"params")),((s=r.hash)==null?void 0:s.pairs.length)>0&&n.push(e("hash")),n.length===0?"":Ee(x,n)}function ur(t){return["as |",t.blockParams.join(" "),"|"]}var Us={print:ws,massageAstNode:Zr,hasPrettierIgnore:nn,getVisitorKeys:on},Sn=Us;var qr={};$t(qr,{glimmer:()=>ma});var Fs=Object.freeze([]);function wn(){return Fs}var Lo=wn(),_o=wn();function T(t,e){if(!t)throw new Error(e||"assertion failure")}function Nt(t){ti.warn(`DEPRECATION: ${t}`)}function ee(t){if(t==null)throw new Error("Expected value to be present");return t}function vt(t,e){if(t==null)throw new Error(e);return t}function ke(t){return t.length>0}function it(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unexpected empty list";if(!ke(t))throw new Error(e)}function At(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unexpected empty list";return it(t,e),t}function Pt(t){return t.length===0?void 0:t[t.length-1]}function Ct(t){return t.length===0?void 0:t[0]}var we=!1&&(()=>!(typeof window<"u"&&window.location&&/[&?]disable_local_debug/u.test(window.location.search)))(),Ms,Gs,Ys,zs;if(we){let t=null;Ms=()=>{T(t===null,"attempted to start steps, but it already began"),t={}},Gs=()=>{T(t,"attempted to end steps, but they were not started"),t=null},zs=(e,r)=>{if(t===null)return;let n=t[e];n||(n=t[e]=[]),n.push(r)},Ys=(e,r,n)=>{let s=vt(t,"attempetd to verify steps, but steps were not started"),i=s[e]||[];s[e]=[],Array.isArray(r)?QUnit.config.current.assert.deepEqual(i,r,n):r(i)}}var Ws;if(!1){let t=n=>{let s=n.name;if(s===void 0){let i=/function (\w+)\s*\(/u.exec(String(n));s=i&&i[1]||""}return s.replace(/^bound /u,"")},e=n=>{let s,i;return n.constructor&&typeof n.constructor=="function"&&(i=t(n.constructor)),"toString"in n&&n.toString!==Object.prototype.toString&&n.toString!==Function.prototype.toString&&(s=n.toString()),s&&/<.*:ember\d+>/u.test(s)&&i&&i[0]!=="_"&&i.length>2&&i!=="Class"?s.replace(/<.*:/u,`<${i}:`):s||i},r=n=>String(n);Ws=n=>typeof n=="function"?t(n)||"(unknown function)":typeof n=="object"&&n!==null?e(n)||"(unknown object)":r(n)}var K=function(t){return t[t.MAX_SMI=1073741823]="MAX_SMI",t[t.MIN_SMI=-1073741824]="MIN_SMI",t[t.SIGN_BIT=-536870913]="SIGN_BIT",t[t.MAX_INT=536870911]="MAX_INT",t[t.MIN_INT=-536870912]="MIN_INT",t[t.FALSE_HANDLE=0]="FALSE_HANDLE",t[t.TRUE_HANDLE=1]="TRUE_HANDLE",t[t.NULL_HANDLE=2]="NULL_HANDLE",t[t.UNDEFINED_HANDLE=3]="UNDEFINED_HANDLE",t[t.ENCODED_FALSE_HANDLE=0]="ENCODED_FALSE_HANDLE",t[t.ENCODED_TRUE_HANDLE=1]="ENCODED_TRUE_HANDLE",t[t.ENCODED_NULL_HANDLE=2]="ENCODED_NULL_HANDLE",t[t.ENCODED_UNDEFINED_HANDLE=3]="ENCODED_UNDEFINED_HANDLE",t}({});function Ks(t){return we&&T(t%1===0&&t>=K.MIN_INT&&t<0,`Could not encode negative: ${t}`),t&K.SIGN_BIT}function js(t){return we&&T(t%1===0&&t<~K.MAX_INT&&t>=K.MIN_SMI,`Could not decode negative: ${t}`),t|~K.SIGN_BIT}function $s(t){return we&&T(t%1===0&&t>=0&&t<=K.MAX_INT,`Could not encode positive: ${t}`),~t}function Qs(t){return we&&T(t%1===0&&t<=0&&t>=~K.MAX_INT,`Could not decode positive: ${t}`),~t}function Xs(t){return we&&T(t%1===0&&t>=0&&t<=K.MAX_SMI,`Could not encode handle: ${t}`),t}function Js(t){return we&&T(t%1===0&&t<=K.MAX_SMI&&t>=0,`Could not decode handle: ${t}`),t}function Zs(t){return t|=0,t<0?Ks(t):$s(t)}function ei(t){return t|=0,t>K.SIGN_BIT?Qs(t):js(t)}[1,2,3].forEach(t=>Js(Xs(t)));[1,-1].forEach(t=>ei(Zs(t)));var at=Object.assign;var ti=console,kn=console;function Tn(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unexpected unreachable branch";throw kn.log("unreachable",t),kn.log(`${e} :: ${JSON.stringify(t)} (${t})`),new Error("code reached unreachable")}var ri=function(){var t=function(ae,p,m,f){for(m=m||{},f=ae.length;f--;m[ae[f]]=p);return m},e=[2,44],r=[1,20],n=[5,14,15,19,29,34,39,44,47,48,52,56,60],s=[1,35],i=[1,38],a=[1,30],l=[1,31],c=[1,32],h=[1,33],g=[1,34],E=[1,37],M=[14,15,19,29,34,39,44,47,48,52,56,60],b=[14,15,19,29,34,44,47,48,52,56,60],A=[15,18],L=[14,15,19,29,34,47,48,52,56,60],R=[33,64,71,79,80,81,82,83,84],N=[23,33,55,64,67,71,74,79,80,81,82,83,84],re=[1,51],H=[23,33,55,64,67,71,74,79,80,81,82,83,84,86],Q=[2,43],Pe=[55,64,71,79,80,81,82,83,84],Ce=[1,58],X=[1,59],ne=[1,66],q=[33,64,71,74,79,80,81,82,83,84],xe=[23,64,71,79,80,81,82,83,84],V=[1,76],se=[64,67,71,79,80,81,82,83,84],C=[33,74],ie=[23,33,55,67,71,74],ft=[1,106],Ft=[1,118],Ur=[71,76],Mt={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,expr:49,mustache_repetition0:50,mustache_option0:51,OPEN_UNESCAPED:52,mustache_repetition1:53,mustache_option1:54,CLOSE_UNESCAPED:55,OPEN_PARTIAL:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,sexpr:63,OPEN_SEXPR:64,sexpr_repetition0:65,sexpr_option0:66,CLOSE_SEXPR:67,hash:68,hash_repetition_plus0:69,hashSegment:70,ID:71,EQUALS:72,blockParams:73,OPEN_BLOCK_PARAMS:74,blockParams_repetition_plus0:75,CLOSE_BLOCK_PARAMS:76,path:77,dataName:78,STRING:79,NUMBER:80,BOOLEAN:81,UNDEFINED:82,NULL:83,DATA:84,pathSegments:85,SEP:86,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",52:"OPEN_UNESCAPED",55:"CLOSE_UNESCAPED",56:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",64:"OPEN_SEXPR",67:"CLOSE_SEXPR",71:"ID",72:"EQUALS",74:"OPEN_BLOCK_PARAMS",76:"CLOSE_BLOCK_PARAMS",79:"STRING",80:"NUMBER",81:"BOOLEAN",82:"UNDEFINED",83:"NULL",84:"DATA",86:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[49,1],[49,1],[63,5],[68,1],[70,3],[73,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[78,2],[77,1],[85,3],[85,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[50,0],[50,2],[51,0],[51,1],[53,0],[53,2],[54,0],[54,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[65,0],[65,2],[66,0],[66,1],[69,1],[69,2],[75,1],[75,2]],performAction:function(p,m,f,d,w,o,Le){var u=o.length-1;switch(w){case 1:return o[u-1];case 2:this.$=d.prepareProgram(o[u]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 27:case 28:case 33:case 34:this.$=o[u];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(o[u]),strip:d.stripFlags(o[u],o[u]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:o[u],value:o[u],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(o[u-2],o[u-1],o[u],this._$);break;case 12:this.$={path:o[u-3],params:o[u-2],hash:o[u-1]};break;case 13:this.$=d.prepareBlock(o[u-3],o[u-2],o[u-1],o[u],!1,this._$);break;case 14:this.$=d.prepareBlock(o[u-3],o[u-2],o[u-1],o[u],!0,this._$);break;case 15:this.$={open:o[u-5],path:o[u-4],params:o[u-3],hash:o[u-2],blockParams:o[u-1],strip:d.stripFlags(o[u-5],o[u])};break;case 16:case 17:this.$={path:o[u-4],params:o[u-3],hash:o[u-2],blockParams:o[u-1],strip:d.stripFlags(o[u-5],o[u])};break;case 18:this.$={strip:d.stripFlags(o[u-1],o[u-1]),program:o[u]};break;case 19:var oe=d.prepareBlock(o[u-2],o[u-1],o[u],o[u],!1,this._$),Ge=d.prepareProgram([oe],o[u-1].loc);Ge.chained=!0,this.$={strip:o[u-2].strip,program:Ge,chain:!0};break;case 21:this.$={path:o[u-1],strip:d.stripFlags(o[u-2],o[u])};break;case 22:case 23:this.$=d.prepareMustache(o[u-3],o[u-2],o[u-1],o[u-4],d.stripFlags(o[u-4],o[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:o[u-3],params:o[u-2],hash:o[u-1],indent:"",strip:d.stripFlags(o[u-4],o[u]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(o[u-2],o[u-1],o[u],this._$);break;case 26:this.$={path:o[u-3],params:o[u-2],hash:o[u-1],strip:d.stripFlags(o[u-4],o[u])};break;case 29:this.$={type:"SubExpression",path:o[u-3],params:o[u-2],hash:o[u-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:o[u],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(o[u-2]),value:o[u],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(o[u-1]);break;case 35:this.$={type:"StringLiteral",value:o[u],original:o[u],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(o[u]),original:Number(o[u]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:o[u]==="true",original:o[u]==="true",loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=d.preparePath(!0,o[u],this._$);break;case 41:this.$=d.preparePath(!1,o[u],this._$);break;case 42:o[u-2].push({part:d.id(o[u]),original:o[u],separator:o[u-1]}),this.$=o[u-2];break;case 43:this.$=[{part:d.id(o[u]),original:o[u]}];break;case 44:case 46:case 48:case 56:case 62:case 68:case 76:case 80:case 84:case 88:case 92:this.$=[];break;case 45:case 47:case 49:case 57:case 63:case 69:case 77:case 81:case 85:case 89:case 93:case 97:case 99:o[u-1].push(o[u]);break;case 96:case 98:this.$=[o[u]];break}},table:[t([5,14,15,19,29,34,48,52,56,60],e,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,59:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],52:[1,14],56:[1,18],60:[1,24]}),{1:[2,1]},t(n,[2,45]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),t(n,[2,9]),{20:26,49:25,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:26,49:39,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(M,e,{6:3,4:40}),t(b,e,{6:3,4:41}),t(A,[2,46],{17:42}),{20:26,49:43,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(L,e,{6:3,4:44}),t([5,14,15,18,19,29,34,39,44,47,48,52,56,60],[2,10]),{20:45,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:46,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:47,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:26,49:48,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(R,[2,76],{50:49}),t(N,[2,27]),t(N,[2,28]),t(N,[2,33]),t(N,[2,34]),t(N,[2,35]),t(N,[2,36]),t(N,[2,37]),t(N,[2,38]),t(N,[2,39]),{20:26,49:50,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(N,[2,41],{86:re}),{71:i,85:52},t(H,Q),t(Pe,[2,80],{53:53}),{25:54,38:56,39:Ce,43:57,44:X,45:55,47:[2,52]},{28:60,43:61,44:X,47:[2,54]},{13:63,15:r,18:[1,62]},t(R,[2,84],{57:64}),{26:65,47:ne},t(q,[2,56],{30:67}),t(q,[2,62],{35:68}),t(xe,[2,48],{21:69}),t(R,[2,88],{61:70}),{20:26,33:[2,78],49:72,51:71,63:27,64:s,68:73,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(se,[2,92],{65:77}),{71:[1,78]},t(N,[2,40],{86:re}),{20:26,49:80,54:79,55:[2,82],63:27,64:s,68:81,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{26:82,47:ne},{47:[2,53]},t(M,e,{6:3,4:83}),{47:[2,20]},{20:84,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(L,e,{6:3,4:85}),{26:86,47:ne},{47:[2,55]},t(n,[2,11]),t(A,[2,47]),{20:26,33:[2,86],49:88,58:87,63:27,64:s,68:89,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(n,[2,25]),{20:90,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(C,[2,58],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,31:91,49:92,68:93,64:s,71:V,79:a,80:l,81:c,82:h,83:g,84:E}),t(C,[2,64],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,36:94,49:95,68:96,64:s,71:V,79:a,80:l,81:c,82:h,83:g,84:E}),{20:26,22:97,23:[2,50],49:98,63:27,64:s,68:99,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{20:26,33:[2,90],49:101,62:100,63:27,64:s,68:102,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{33:[1,103]},t(R,[2,77]),{33:[2,79]},t([23,33,55,67,74],[2,30],{70:104,71:[1,105]}),t(ie,[2,96]),t(H,Q,{72:ft}),{20:26,49:108,63:27,64:s,66:107,67:[2,94],68:109,69:74,70:75,71:V,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},t(H,[2,42]),{55:[1,110]},t(Pe,[2,81]),{55:[2,83]},t(n,[2,13]),{38:56,39:Ce,43:57,44:X,45:112,46:111,47:[2,74]},t(q,[2,68],{40:113}),{47:[2,18]},t(n,[2,14]),{33:[1,114]},t(R,[2,85]),{33:[2,87]},{33:[1,115]},{32:116,33:[2,60],73:117,74:Ft},t(q,[2,57]),t(C,[2,59]),{33:[2,66],37:119,73:120,74:Ft},t(q,[2,63]),t(C,[2,65]),{23:[1,121]},t(xe,[2,49]),{23:[2,51]},{33:[1,122]},t(R,[2,89]),{33:[2,91]},t(n,[2,22]),t(ie,[2,97]),{72:ft},{20:26,49:123,63:27,64:s,71:i,77:28,78:29,79:a,80:l,81:c,82:h,83:g,84:E,85:36},{67:[1,124]},t(se,[2,93]),{67:[2,95]},t(n,[2,23]),{47:[2,19]},{47:[2,75]},t(C,[2,70],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,41:125,49:126,68:127,64:s,71:V,79:a,80:l,81:c,82:h,83:g,84:E}),t(n,[2,24]),t(n,[2,21]),{33:[1,128]},{33:[2,61]},{71:[1,130],75:129},{33:[1,131]},{33:[2,67]},t(A,[2,12]),t(L,[2,26]),t(ie,[2,31]),t(N,[2,29]),{33:[2,72],42:132,73:133,74:Ft},t(q,[2,69]),t(C,[2,71]),t(M,[2,15]),{71:[1,135],76:[1,134]},t(Ur,[2,98]),t(b,[2,16]),{33:[1,136]},{33:[2,73]},{33:[2,32]},t(Ur,[2,99]),t(M,[2,17])],defaultActions:{4:[2,1],55:[2,53],57:[2,20],61:[2,55],73:[2,79],81:[2,83],85:[2,18],89:[2,87],99:[2,51],102:[2,91],109:[2,95],111:[2,19],112:[2,75],117:[2,61],120:[2,67],133:[2,73],134:[2,32]},parseError:function(p,m){if(m.recoverable)this.trace(p);else{var f=new Error(p);throw f.hash=m,f}},parse:function(p){var m=this,f=[0],d=[],w=[null],o=[],Le=this.table,u="",oe=0,Ge=0,Fr=0,Zn=2,Mr=1,es=o.slice.call(arguments,1),P=Object.create(this.lexer),me={yy:{}};for(var Yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Yt)&&(me.yy[Yt]=this.yy[Yt]);P.setInput(p,me.yy),me.yy.lexer=P,me.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var zt=P.yylloc;o.push(zt);var ts=P.options&&P.options.ranges;typeof me.yy.parseError=="function"?this.parseError=me.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ba(z){f.length=f.length-2*z,w.length=w.length-z,o.length=o.length-z}for(var rs=function(){var z;return z=P.lex()||Mr,typeof z!="number"&&(z=m.symbols_[z]||z),z},D,Wt,ge,U,ya,Kt,_e={},dt,J,Gr,mt;;){if(ge=f[f.length-1],this.defaultActions[ge]?U=this.defaultActions[ge]:((D===null||typeof D>"u")&&(D=rs()),U=Le[ge]&&Le[ge][D]),typeof U>"u"||!U.length||!U[0]){var jt="";mt=[];for(dt in Le[ge])this.terminals_[dt]&&dt>Zn&&mt.push("'"+this.terminals_[dt]+"'");P.showPosition?jt="Parse error on line "+(oe+1)+`: -`+P.showPosition()+` -Expecting `+mt.join(", ")+", got '"+(this.terminals_[D]||D)+"'":jt="Parse error on line "+(oe+1)+": Unexpected "+(D==Mr?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(jt,{text:P.match,token:this.terminals_[D]||D,line:P.yylineno,loc:zt,expected:mt})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ge+", token: "+D);switch(U[0]){case 1:f.push(D),w.push(P.yytext),o.push(P.yylloc),f.push(U[1]),D=null,Wt?(D=Wt,Wt=null):(Ge=P.yyleng,u=P.yytext,oe=P.yylineno,zt=P.yylloc,Fr>0&&Fr--);break;case 2:if(J=this.productions_[U[1]][1],_e.$=w[w.length-J],_e._$={first_line:o[o.length-(J||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(J||1)].first_column,last_column:o[o.length-1].last_column},ts&&(_e._$.range=[o[o.length-(J||1)].range[0],o[o.length-1].range[1]]),Kt=this.performAction.apply(_e,[u,Ge,oe,me.yy,U[1],w,o].concat(es)),typeof Kt<"u")return Kt;J&&(f=f.slice(0,-1*J*2),w=w.slice(0,-1*J),o=o.slice(0,-1*J)),f.push(this.productions_[U[1]][0]),w.push(_e.$),o.push(_e._$),Gr=Le[f[f.length-2]][f[f.length-1]],f.push(Gr);break;case 3:return!0}}return!0}},Jn=function(){var ae={EOF:1,parseError:function(m,f){if(this.yy.parser)this.yy.parser.parseError(m,f);else throw new Error(m)},setInput:function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},unput:function(p){var m=p.length,f=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===d.length?this.yylloc.first_column:0)+d[d.length-f.length].length-f[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +var es=Object.defineProperty;var Yt=(t,e)=>{for(var r in e)es(t,r,{get:e[r],enumerable:!0})};var Ur=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var W=(t,e,r)=>(Ur(t,e,"read from private field"),r?r.call(t):e.get(t)),zt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Wt=(t,e,r,n)=>(Ur(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Rr={};Yt(Rr,{languages:()=>yn,parsers:()=>Ir,printers:()=>pa});var ts=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},Kt=ts;var Me="string",Ge="array",Ye="cursor",Le="indent",_e="align",ze="trim",De="group",Oe="fill",Be="if-break",We="indent-if-break",Ke="line-suffix",je="line-suffix-boundary",J="line",$e="label",Ie="break-parent",ft=new Set([Ye,Le,_e,ze,De,Oe,Be,We,Ke,je,J,$e,Ie]);function rs(t){if(typeof t=="string")return Me;if(Array.isArray(t))return Ge;if(!t)return;let{type:e}=t;if(ft.has(e))return e}var Qe=rs;var ns=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function ss(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(Qe(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ns([...ft].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${n}.`}var jt=class extends Error{name="InvalidDocError";constructor(e){super(ss(e)),this.doc=e}},$t=jt;var Mr=()=>{},ge=Mr,dt=Mr;function O(t){return ge(t),{type:Le,contents:t}}function is(t,e){return ge(e),{type:_e,contents:e,n:t}}function B(t,e={}){return ge(t),dt(e.expandedStates,!0),{type:De,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Qt(t){return is(-1,t)}function Xt(t){return dt(t),{type:Oe,parts:t}}function Jt(t,e="",r={}){return ge(t),e!==""&&ge(e),{type:Be,breakContents:t,flatContents:e,groupId:r.groupId}}var Gr={type:Ie};var as={type:J,hard:!0},os={type:J,hard:!0,literal:!0},C={type:J},G={type:J,soft:!0},be=[as,Gr],Yr=[os,Gr];function ye(t,e){ge(t),dt(e);let r=[];for(let n=0;n{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},oe=ls;function cs(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Qe(i)){case Ge:return e(i.map(n));case Oe:return e({...i,parts:i.parts.map(n)});case Be:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case De:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case _e:case Le:case We:case $e:case Ke:return e({...i,contents:n(i.contents)});case Me:case Ye:case ze:case je:case J:case Ie:return e(i);default:throw new $t(i)}}}function zr(t,e=Yr){return cs(t,r=>typeof r=="string"?ye(e,r.split(` +`)):r)}var mt="'",Wr='"';function us(t,e){let r=e===!0||e===mt?mt:Wr,n=r===mt?Wr:mt,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var gt=us;function Zt(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var U,er=class{constructor(e){zt(this,U,void 0);Wt(this,U,new Set(e))}getLeadingWhitespaceCount(e){let r=W(this,U),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return W(this,U).has(e.charAt(0))}hasTrailingWhitespace(e){return W(this,U).has(oe(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${Zt([...W(this,U)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return e.split(s)}hasWhitespaceCharacter(e){let r=W(this,U);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=W(this,U);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=W(this,U);return Array.prototype.every.call(e,n=>r.has(n))}};U=new WeakMap;var Kr=er;var hs=[" ",` +`,"\f","\r"," "],ps=new Kr(hs),Y=ps;function fs(t){return Array.isArray(t)&&t.length>0}var Xe=fs;var tr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},jr=tr;function $r(t,e){if(t.type==="TextNode"){let r=t.chars.trim();if(!r)return null;e.chars=Y.split(r).join(" ")}t.type==="ElementNode"&&(delete e.startTag,delete e.parts,delete e.endTag,delete e.nameNode),(t.type==="Block"||t.type==="ElementNode")&&delete e.blockParamNodes,t.type==="AttrNode"&&t.name.toLowerCase()==="class"&&delete e.value}$r.ignoredProperties=new Set(["loc","selfClosing"]);var Qr=$r;var Je=null;function Ze(t){if(Je!==null&&typeof Je.property){let e=Je;return Je=Ze.prototype=null,e}return Je=Ze.prototype=t??Object.create(null),new Ze}var ds=10;for(let t=0;t<=ds;t++)Ze();function rr(t){return Ze(t)}function ms(t,e="type"){rr(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var Xr=ms;var Jr={Program:["body"],Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],PartialStatement:["name","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],PathHead:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"],NamedBlock:["attributes","modifiers","children","comments"],SimpleElement:["attributes","modifiers","children","comments"],Component:["head","attributes","modifiers","children","comments"]};var gs=Xr(Jr),Zr=gs;function Ee(t){return t.loc.start.offset}function et(t){return t.loc.end.offset}var en=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function rn(t){return t.toUpperCase()===t}function bs(t){return t.type==="ElementNode"&&typeof t.tag=="string"&&!t.tag.startsWith(":")&&(rn(t.tag[0])||t.tag.includes("."))}function ys(t){return en.has(t.toLowerCase())&&!rn(t[0])}function nr(t){return t.selfClosing===!0||ys(t.tag)||bs(t)&&t.children.every(e=>bt(e))}function bt(t){return t.type==="TextNode"&&!/\S/.test(t.chars)}function tn(t){return(t==null?void 0:t.type)==="MustacheCommentStatement"&&typeof t.value=="string"&&t.value.trim()==="prettier-ignore"}function nn(t){return tn(t.node)||t.isInArray&&(t.key==="children"||t.key==="body"||t.key==="parts")&&tn(t.siblings[t.index-2])}var pn=2;function Es(t,e,r){var s,i,a,o,c,h,g,E,M;let{node:n}=t;switch(n.type){case"Block":case"Program":case"Template":return B(t.map(r,"body"));case"ElementNode":{let b=B(ks(t,r)),v=e.htmlWhitespaceSensitivity==="ignore"&&((s=t.next)==null?void 0:s.type)==="ElementNode"?G:"";if(nr(n))return[b,v];let L=[""];return n.children.length===0?[b,O(L),v]:e.htmlWhitespaceSensitivity==="ignore"?[b,O(sn(t,e,r)),be,O(L),v]:[b,O(B(sn(t,e,r))),O(L),v]}case"BlockStatement":return Ps(t)?[xs(t,r),ln(t,r,e),cn(t,r,e)]:[vs(t,r),B([ln(t,r,e),cn(t,r,e),Cs(t,r,e)])];case"ElementModifierStatement":return B(["{{",hn(t,r),"}}"]);case"MustacheStatement":return B([yt(n),hn(t,r),Et(n)]);case"SubExpression":return B(["(",Rs(t,r),G,")"]);case"AttrNode":{let{name:b,value:v}=n,L=v.type==="TextNode";if(L&&v.chars===""&&Ee(v)===et(v))return b;let T=L?gt(v.chars,e.singleQuote):v.type==="ConcatStatement"?gt(v.parts.map(H=>H.type==="TextNode"?H.chars:"").join(""),e.singleQuote):"",te=r("value");return[b,"=",T,b==="class"&&T?B(O(te)):te,T]}case"ConcatStatement":return t.map(r,"parts");case"Hash":return ye(C,t.map(r,"pairs"));case"HashPair":return[n.key,"=",r("value")];case"TextNode":{let b=Kt(!1,n.chars,"{{","\\{{"),v=_s(t);if(v){if(v==="class"){let Q=b.trim().split(/\s+/).join(" "),re=!1,q=!1;return t.parent.type==="ConcatStatement"&&(((i=t.previous)==null?void 0:i.type)==="MustacheStatement"&&/^\s/.test(b)&&(re=!0),((a=t.next)==null?void 0:a.type)==="MustacheStatement"&&/\s$/.test(b)&&Q!==""&&(q=!0)),[re?C:"",Q,q?C:""]}return zr(b)}let L=Y.isWhitespaceOnly(b),{isFirst:R,isLast:T}=t;if(e.htmlWhitespaceSensitivity!=="ignore"){let Q=T&&t.parent.type==="Template",re=R&&t.parent.type==="Template";if(L){if(re||Q)return"";let x=[C],se=Re(b);return se&&(x=tt(se)),T&&(x=x.map(ut=>Qt(ut))),x}let q=Y.getLeadingWhitespace(b),Pe=[];if(q){Pe=[C];let x=Re(q);x&&(Pe=tt(x)),b=b.slice(q.length)}let V=Y.getTrailingWhitespace(b),ne=[];if(V){if(!Q){ne=[C];let x=Re(V);x&&(ne=tt(x)),T&&(ne=ne.map(se=>Qt(se)))}b=b.slice(0,-V.length)}return[...Pe,Xt(un(b)),...ne]}let te=Re(b),H=Ds(b),$=Os(b);if((R||T)&&L&&(t.parent.type==="Block"||t.parent.type==="ElementNode"||t.parent.type==="Template"))return"";L&&te?(H=Math.min(te,pn),$=0):((((o=t.next)==null?void 0:o.type)==="BlockStatement"||((c=t.next)==null?void 0:c.type)==="ElementNode")&&($=Math.max($,1)),(((h=t.previous)==null?void 0:h.type)==="BlockStatement"||((g=t.previous)==null?void 0:g.type)==="ElementNode")&&(H=Math.max(H,1)));let ve="",Ae="";return $===0&&((E=t.next)==null?void 0:E.type)==="MustacheStatement"&&(Ae=" "),H===0&&((M=t.previous)==null?void 0:M.type)==="MustacheStatement"&&(ve=" "),R&&(H=0,ve=""),T&&($=0,Ae=""),Y.hasLeadingWhitespace(b)&&(b=ve+Y.trimStart(b)),Y.hasTrailingWhitespace(b)&&(b=Y.trimEnd(b)+Ae),[...tt(H),Xt(un(b)),...tt($)]}case"MustacheCommentStatement":{let b=Ee(n),v=et(n),L=e.originalText.charAt(b+2)==="~",R=e.originalText.charAt(v-3)==="~",T=n.value.includes("}}")?"--":"";return["{{",L?"~":"","!",T,n.value,T,R?"~":"","}}"]}case"PathExpression":return Fs(n);case"BooleanLiteral":return String(n.value);case"CommentStatement":return[""];case"StringLiteral":return Bs(t,e);case"NumberLiteral":return String(n.value);case"UndefinedLiteral":return"undefined";case"NullLiteral":return"null";default:throw new jr(n,"Handlebars")}}function Ss(t,e){return Ee(t)-Ee(e)}function ks(t,e){let{node:r}=t,n=["attributes","modifiers","comments"].filter(i=>Xe(r[i])),s=n.flatMap(i=>r[i]).sort(Ss);for(let i of n)t.each(({node:a})=>{let o=s.indexOf(a);s.splice(o,1,[C,e()])},i);return Xe(r.blockParams)&&s.push(C,ir(r)),["<",r.tag,O(s),ws(r)]}function sn(t,e,r){let{node:n}=t,s=n.children.every(i=>bt(i));return e.htmlWhitespaceSensitivity==="ignore"&&s?"":t.map(({isFirst:i})=>{let a=r();return i&&e.htmlWhitespaceSensitivity==="ignore"?[G,a]:a},"children")}function ws(t){return nr(t)?Jt([G,"/>"],[" />",G]):Jt([G,">"],">")}function yt(t){var n;let e=t.escaped===!1?"{{{":"{{",r=(n=t.strip)!=null&&n.open?"~":"";return[e,r]}function Et(t){var n;let e=t.escaped===!1?"}}}":"}}";return[(n=t.strip)!=null&&n.close?"~":"",e]}function Ts(t){let e=yt(t),r=t.openStrip.open?"~":"";return[e,r,"#"]}function Ns(t){let e=Et(t);return[t.openStrip.close?"~":"",e]}function an(t){let e=yt(t),r=t.closeStrip.open?"~":"";return[e,r,"/"]}function on(t){let e=Et(t);return[t.closeStrip.close?"~":"",e]}function fn(t){let e=yt(t),r=t.inverseStrip.open?"~":"";return[e,r]}function dn(t){let e=Et(t);return[t.inverseStrip.close?"~":"",e]}function vs(t,e){let{node:r}=t,n=[],s=St(t,e);return s&&n.push(B(s)),Xe(r.program.blockParams)&&n.push(ir(r.program)),B([Ts(r),sr(t,e),n.length>0?O([C,ye(C,n)]):"",G,Ns(r)])}function As(t,e){return[e.htmlWhitespaceSensitivity==="ignore"?be:"",fn(t),"else",dn(t)]}function Ps(t){var n;let{grandparent:e,node:r}=t;return((n=e==null?void 0:e.inverse)==null?void 0:n.body.length)===1&&e.inverse.body[0]===r&&e.inverse.body[0].path.parts[0]===e.path.parts[0]}function xs(t,e){let{node:r,grandparent:n}=t;return B([fn(n),["else"," ",n.inverse.body[0].path.parts[0]],O([C,B(St(t,e)),...Xe(r.program.blockParams)?[C,ir(r.program)]:[]]),G,dn(n)])}function Cs(t,e,r){let{node:n}=t;return r.htmlWhitespaceSensitivity==="ignore"?[mn(n)?G:be,an(n),e("path"),on(n)]:[an(n),e("path"),on(n)]}function mn(t){return t.type==="BlockStatement"&&t.program.body.every(e=>bt(e))}function Ls(t){return gn(t)&&t.inverse.body.length===1&&t.inverse.body[0].type==="BlockStatement"&&t.inverse.body[0].path.parts[0]===t.path.parts[0]}function gn(t){return t.type==="BlockStatement"&&t.inverse}function ln(t,e,r){let{node:n}=t;if(mn(n))return"";let s=e("program");return r.htmlWhitespaceSensitivity==="ignore"?O([be,s]):O(s)}function cn(t,e,r){let{node:n}=t,s=e("inverse"),i=r.htmlWhitespaceSensitivity==="ignore"?[be,s]:s;return Ls(n)?i:gn(n)?[As(n,r),O(i)]:""}function un(t){return ye(C,Y.split(t))}function _s(t){for(let e=0;e<2;e++){let r=t.getParentNode(e);if((r==null?void 0:r.type)==="AttrNode")return r.name.toLowerCase()}}function Re(t){return t=typeof t=="string"?t:"",t.split(` +`).length-1}function Ds(t){t=typeof t=="string"?t:"";let e=(t.match(/^([^\S\n\r]*[\n\r])+/g)||[])[0]||"";return Re(e)}function Os(t){t=typeof t=="string"?t:"";let e=(t.match(/([\n\r][^\S\n\r]*)+$/g)||[])[0]||"";return Re(e)}function tt(t=0){return Array.from({length:Math.min(t,pn)}).fill(be)}function Bs(t,e){let{node:{value:r}}=t,n=gt(r,Is(t)?!e.singleQuote:e.singleQuote);return[n,Kt(!1,r,n,`\\${n}`),n]}function Is(t){let{ancestors:e}=t,r=e.findIndex(n=>n.type!=="SubExpression");return r!==-1&&e[r+1].type==="ConcatStatement"&&e[r+2].type==="AttrNode"}function Rs(t,e){let r=sr(t,e),n=St(t,e);return n?O([r,C,B(n)]):r}function hn(t,e){let r=sr(t,e),n=St(t,e);return n?[O([r,C,n]),G]:r}function sr(t,e){return e("path")}function St(t,e){var s;let{node:r}=t,n=[];return r.params.length>0&&n.push(...t.map(e,"params")),((s=r.hash)==null?void 0:s.pairs.length)>0&&n.push(e("hash")),n.length===0?"":ye(C,n)}function ir(t){return["as |",t.blockParams.join(" "),"|"]}var Hs=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),qs=new Set(["true","false","null","undefined"]),Vs=(t,e)=>e!==0&&qs.has(t)||/\s/.test(t)||/^\d/.test(t)||Array.prototype.some.call(t,r=>Hs.has(r));function Fs(t){if(t.data||t.parts.length===1&&t.original.includes("/"))return t.original;let{parts:e}=t;return t.this&&(e=["this",...e]),e.map((r,n)=>Vs(r,n)?`[${r}]`:r).join(".")}var Us={print:Es,massageAstNode:Qr,hasPrettierIgnore:nn,getVisitorKeys:Zr},bn=Us;var yn=[{linguistLanguageId:155,name:"Handlebars",type:"markup",color:"#f7931e",aliases:["hbs","htmlbars"],extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",parsers:["glimmer"],vscodeLanguageIds:["handlebars"]}];var Ir={};Yt(Ir,{glimmer:()=>ha});var Ms=Object.freeze([]);function Sn(){return Ms}var Po=Sn(),xo=Sn();function P(t,e){if(!t)throw new Error(e||"assertion failure")}function Z(t){if(t==null)throw new Error("Expected value to be present");return t}function ar(t,e){if(t==null)throw new Error(e);return t}function Se(t){return t.length>0}function rt(t,e="unexpected empty list"){if(!Se(t))throw new Error(e)}function wt(t,e="unexpected empty list"){return rt(t,e),t}function Tt(t){return t.length===0?void 0:t[t.length-1]}function Nt(t){return t.length===0?void 0:t[0]}var Gs;if(!1){let t=n=>{let s=n.name;if(s===void 0){let i=/function (\w+)\s*\(/u.exec(String(n));s=i&&i[1]||""}return s.replace(/^bound /u,"")},e=n=>{let s,i;return n.constructor&&typeof n.constructor=="function"&&(i=t(n.constructor)),"toString"in n&&n.toString!==Object.prototype.toString&&n.toString!==Function.prototype.toString&&(s=n.toString()),s&&/<.*:ember\d+>/u.test(s)&&i&&i[0]!=="_"&&i.length>2&&i!=="Class"?s.replace(/<.*:/u,`<${i}:`):s||i},r=n=>String(n);Gs=n=>typeof n=="function"?t(n)||"(unknown function)":typeof n=="object"&&n!==null?e(n)||"(unknown object)":r(n)}var or=function(t){return t[t.MAX_SMI=1073741823]="MAX_SMI",t[t.MIN_SMI=-1073741824]="MIN_SMI",t[t.SIGN_BIT=-536870913]="SIGN_BIT",t[t.MAX_INT=536870911]="MAX_INT",t[t.MIN_INT=-536870912]="MIN_INT",t[t.FALSE_HANDLE=0]="FALSE_HANDLE",t[t.TRUE_HANDLE=1]="TRUE_HANDLE",t[t.NULL_HANDLE=2]="NULL_HANDLE",t[t.UNDEFINED_HANDLE=3]="UNDEFINED_HANDLE",t[t.ENCODED_FALSE_HANDLE=0]="ENCODED_FALSE_HANDLE",t[t.ENCODED_TRUE_HANDLE=1]="ENCODED_TRUE_HANDLE",t[t.ENCODED_NULL_HANDLE=2]="ENCODED_NULL_HANDLE",t[t.ENCODED_UNDEFINED_HANDLE=3]="ENCODED_UNDEFINED_HANDLE",t}({});function Ys(t){return t&or.SIGN_BIT}function zs(t){return t|~or.SIGN_BIT}function Ws(t){return~t}function Ks(t){return~t}function js(t){return t|=0,t<0?Ys(t):Ws(t)}function $s(t){return t|=0,t>or.SIGN_BIT?Ks(t):zs(t)}[1,-1].forEach(t=>$s(js(t)));var nt=Object.assign;var En=console;function kn(t,e="unexpected unreachable branch"){throw En.log("unreachable",t),En.log(`${e} :: ${JSON.stringify(t)} (${t})`),new Error("code reached unreachable")}var Qs=function(){var t=function(ie,p,m,f){for(m=m||{},f=ie.length;f--;m[ie[f]]=p);return m},e=[2,44],r=[1,20],n=[5,14,15,19,29,34,39,44,47,48,52,56,60],s=[1,35],i=[1,38],a=[1,30],o=[1,31],c=[1,32],h=[1,33],g=[1,34],E=[1,37],M=[14,15,19,29,34,39,44,47,48,52,56,60],b=[14,15,19,29,34,44,47,48,52,56,60],v=[15,18],L=[14,15,19,29,34,47,48,52,56,60],R=[33,64,71,79,80,81,82,83,84],T=[23,33,55,64,67,71,74,79,80,81,82,83,84],te=[1,51],H=[23,33,55,64,67,71,74,79,80,81,82,83,84,86],$=[2,43],ve=[55,64,71,79,80,81,82,83,84],Ae=[1,58],Q=[1,59],re=[1,66],q=[33,64,71,74,79,80,81,82,83,84],Pe=[23,64,71,79,80,81,82,83,84],V=[1,76],ne=[64,67,71,79,80,81,82,83,84],x=[33,74],se=[23,33,55,67,71,74],ut=[1,106],Rt=[1,118],Hr=[71,76],Ht={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,expr:49,mustache_repetition0:50,mustache_option0:51,OPEN_UNESCAPED:52,mustache_repetition1:53,mustache_option1:54,CLOSE_UNESCAPED:55,OPEN_PARTIAL:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,sexpr:63,OPEN_SEXPR:64,sexpr_repetition0:65,sexpr_option0:66,CLOSE_SEXPR:67,hash:68,hash_repetition_plus0:69,hashSegment:70,ID:71,EQUALS:72,blockParams:73,OPEN_BLOCK_PARAMS:74,blockParams_repetition_plus0:75,CLOSE_BLOCK_PARAMS:76,path:77,dataName:78,STRING:79,NUMBER:80,BOOLEAN:81,UNDEFINED:82,NULL:83,DATA:84,pathSegments:85,SEP:86,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",52:"OPEN_UNESCAPED",55:"CLOSE_UNESCAPED",56:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",64:"OPEN_SEXPR",67:"CLOSE_SEXPR",71:"ID",72:"EQUALS",74:"OPEN_BLOCK_PARAMS",76:"CLOSE_BLOCK_PARAMS",79:"STRING",80:"NUMBER",81:"BOOLEAN",82:"UNDEFINED",83:"NULL",84:"DATA",86:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[49,1],[49,1],[63,5],[68,1],[70,3],[73,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[78,2],[77,1],[85,3],[85,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[50,0],[50,2],[51,0],[51,1],[53,0],[53,2],[54,0],[54,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[65,0],[65,2],[66,0],[66,1],[69,1],[69,2],[75,1],[75,2]],performAction:function(p,m,f,d,w,l,xe){var u=l.length-1;switch(w){case 1:return l[u-1];case 2:this.$=d.prepareProgram(l[u]);break;case 3:case 4:case 5:case 6:case 7:case 8:case 20:case 27:case 28:case 33:case 34:this.$=l[u];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(l[u]),strip:d.stripFlags(l[u],l[u]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[u],value:l[u],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(l[u-2],l[u-1],l[u],this._$);break;case 12:this.$={path:l[u-3],params:l[u-2],hash:l[u-1]};break;case 13:this.$=d.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!1,this._$);break;case 14:this.$=d.prepareBlock(l[u-3],l[u-2],l[u-1],l[u],!0,this._$);break;case 15:this.$={open:l[u-5],path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:d.stripFlags(l[u-5],l[u])};break;case 16:case 17:this.$={path:l[u-4],params:l[u-3],hash:l[u-2],blockParams:l[u-1],strip:d.stripFlags(l[u-5],l[u])};break;case 18:this.$={strip:d.stripFlags(l[u-1],l[u-1]),program:l[u]};break;case 19:var ae=d.prepareBlock(l[u-2],l[u-1],l[u],l[u],!1,this._$),Ue=d.prepareProgram([ae],l[u-1].loc);Ue.chained=!0,this.$={strip:l[u-2].strip,program:Ue,chain:!0};break;case 21:this.$={path:l[u-1],strip:d.stripFlags(l[u-2],l[u])};break;case 22:case 23:this.$=d.prepareMustache(l[u-3],l[u-2],l[u-1],l[u-4],d.stripFlags(l[u-4],l[u]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[u-3],params:l[u-2],hash:l[u-1],indent:"",strip:d.stripFlags(l[u-4],l[u]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(l[u-2],l[u-1],l[u],this._$);break;case 26:this.$={path:l[u-3],params:l[u-2],hash:l[u-1],strip:d.stripFlags(l[u-4],l[u])};break;case 29:this.$={type:"SubExpression",path:l[u-3],params:l[u-2],hash:l[u-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[u],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(l[u-2]),value:l[u],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(l[u-1]);break;case 35:this.$={type:"StringLiteral",value:l[u],original:l[u],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[u]),original:Number(l[u]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[u]==="true",original:l[u]==="true",loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=d.preparePath(!0,l[u],this._$);break;case 41:this.$=d.preparePath(!1,l[u],this._$);break;case 42:l[u-2].push({part:d.id(l[u]),original:l[u],separator:l[u-1]}),this.$=l[u-2];break;case 43:this.$=[{part:d.id(l[u]),original:l[u]}];break;case 44:case 46:case 48:case 56:case 62:case 68:case 76:case 80:case 84:case 88:case 92:this.$=[];break;case 45:case 47:case 49:case 57:case 63:case 69:case 77:case 81:case 85:case 89:case 93:case 97:case 99:l[u-1].push(l[u]);break;case 96:case 98:this.$=[l[u]];break}},table:[t([5,14,15,19,29,34,48,52,56,60],e,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([5,39,44,47],[2,2],{7:5,8:6,9:7,10:8,11:9,12:10,13:11,24:15,27:16,16:17,59:19,14:[1,12],15:r,19:[1,23],29:[1,21],34:[1,22],48:[1,13],52:[1,14],56:[1,18],60:[1,24]}),{1:[2,1]},t(n,[2,45]),t(n,[2,3]),t(n,[2,4]),t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),t(n,[2,9]),{20:26,49:25,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:26,49:39,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(M,e,{6:3,4:40}),t(b,e,{6:3,4:41}),t(v,[2,46],{17:42}),{20:26,49:43,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(L,e,{6:3,4:44}),t([5,14,15,18,19,29,34,39,44,47,48,52,56,60],[2,10]),{20:45,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:46,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:47,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:26,49:48,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(R,[2,76],{50:49}),t(T,[2,27]),t(T,[2,28]),t(T,[2,33]),t(T,[2,34]),t(T,[2,35]),t(T,[2,36]),t(T,[2,37]),t(T,[2,38]),t(T,[2,39]),{20:26,49:50,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(T,[2,41],{86:te}),{71:i,85:52},t(H,$),t(ve,[2,80],{53:53}),{25:54,38:56,39:Ae,43:57,44:Q,45:55,47:[2,52]},{28:60,43:61,44:Q,47:[2,54]},{13:63,15:r,18:[1,62]},t(R,[2,84],{57:64}),{26:65,47:re},t(q,[2,56],{30:67}),t(q,[2,62],{35:68}),t(Pe,[2,48],{21:69}),t(R,[2,88],{61:70}),{20:26,33:[2,78],49:72,51:71,63:27,64:s,68:73,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(ne,[2,92],{65:77}),{71:[1,78]},t(T,[2,40],{86:te}),{20:26,49:80,54:79,55:[2,82],63:27,64:s,68:81,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{26:82,47:re},{47:[2,53]},t(M,e,{6:3,4:83}),{47:[2,20]},{20:84,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(L,e,{6:3,4:85}),{26:86,47:re},{47:[2,55]},t(n,[2,11]),t(v,[2,47]),{20:26,33:[2,86],49:88,58:87,63:27,64:s,68:89,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(n,[2,25]),{20:90,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(x,[2,58],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,31:91,49:92,68:93,64:s,71:V,79:a,80:o,81:c,82:h,83:g,84:E}),t(x,[2,64],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,36:94,49:95,68:96,64:s,71:V,79:a,80:o,81:c,82:h,83:g,84:E}),{20:26,22:97,23:[2,50],49:98,63:27,64:s,68:99,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{20:26,33:[2,90],49:101,62:100,63:27,64:s,68:102,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{33:[1,103]},t(R,[2,77]),{33:[2,79]},t([23,33,55,67,74],[2,30],{70:104,71:[1,105]}),t(se,[2,96]),t(H,$,{72:ut}),{20:26,49:108,63:27,64:s,66:107,67:[2,94],68:109,69:74,70:75,71:V,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},t(H,[2,42]),{55:[1,110]},t(ve,[2,81]),{55:[2,83]},t(n,[2,13]),{38:56,39:Ae,43:57,44:Q,45:112,46:111,47:[2,74]},t(q,[2,68],{40:113}),{47:[2,18]},t(n,[2,14]),{33:[1,114]},t(R,[2,85]),{33:[2,87]},{33:[1,115]},{32:116,33:[2,60],73:117,74:Rt},t(q,[2,57]),t(x,[2,59]),{33:[2,66],37:119,73:120,74:Rt},t(q,[2,63]),t(x,[2,65]),{23:[1,121]},t(Pe,[2,49]),{23:[2,51]},{33:[1,122]},t(R,[2,89]),{33:[2,91]},t(n,[2,22]),t(se,[2,97]),{72:ut},{20:26,49:123,63:27,64:s,71:i,77:28,78:29,79:a,80:o,81:c,82:h,83:g,84:E,85:36},{67:[1,124]},t(ne,[2,93]),{67:[2,95]},t(n,[2,23]),{47:[2,19]},{47:[2,75]},t(x,[2,70],{20:26,63:27,77:28,78:29,85:36,69:74,70:75,41:125,49:126,68:127,64:s,71:V,79:a,80:o,81:c,82:h,83:g,84:E}),t(n,[2,24]),t(n,[2,21]),{33:[1,128]},{33:[2,61]},{71:[1,130],75:129},{33:[1,131]},{33:[2,67]},t(v,[2,12]),t(L,[2,26]),t(se,[2,31]),t(T,[2,29]),{33:[2,72],42:132,73:133,74:Rt},t(q,[2,69]),t(x,[2,71]),t(M,[2,15]),{71:[1,135],76:[1,134]},t(Hr,[2,98]),t(b,[2,16]),{33:[1,136]},{33:[2,73]},{33:[2,32]},t(Hr,[2,99]),t(M,[2,17])],defaultActions:{4:[2,1],55:[2,53],57:[2,20],61:[2,55],73:[2,79],81:[2,83],85:[2,18],89:[2,87],99:[2,51],102:[2,91],109:[2,95],111:[2,19],112:[2,75],117:[2,61],120:[2,67],133:[2,73],134:[2,32]},parseError:function(p,m){if(m.recoverable)this.trace(p);else{var f=new Error(p);throw f.hash=m,f}},parse:function(p){var m=this,f=[0],d=[],w=[null],l=[],xe=this.table,u="",ae=0,Ue=0,qr=0,Qn=2,Vr=1,Xn=l.slice.call(arguments,1),A=Object.create(this.lexer),de={yy:{}};for(var Vt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Vt)&&(de.yy[Vt]=this.yy[Vt]);A.setInput(p,de.yy),de.yy.lexer=A,de.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var Ft=A.yylloc;l.push(Ft);var Jn=A.options&&A.options.ranges;typeof de.yy.parseError=="function"?this.parseError=de.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fa(z){f.length=f.length-2*z,w.length=w.length-z,l.length=l.length-z}for(var Zn=function(){var z;return z=A.lex()||Vr,typeof z!="number"&&(z=m.symbols_[z]||z),z},D,Ut,me,F,da,Mt,Ce={},ht,X,Fr,pt;;){if(me=f[f.length-1],this.defaultActions[me]?F=this.defaultActions[me]:((D===null||typeof D>"u")&&(D=Zn()),F=xe[me]&&xe[me][D]),typeof F>"u"||!F.length||!F[0]){var Gt="";pt=[];for(ht in xe[me])this.terminals_[ht]&&ht>Qn&&pt.push("'"+this.terminals_[ht]+"'");A.showPosition?Gt="Parse error on line "+(ae+1)+`: +`+A.showPosition()+` +Expecting `+pt.join(", ")+", got '"+(this.terminals_[D]||D)+"'":Gt="Parse error on line "+(ae+1)+": Unexpected "+(D==Vr?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(Gt,{text:A.match,token:this.terminals_[D]||D,line:A.yylineno,loc:Ft,expected:pt})}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+me+", token: "+D);switch(F[0]){case 1:f.push(D),w.push(A.yytext),l.push(A.yylloc),f.push(F[1]),D=null,Ut?(D=Ut,Ut=null):(Ue=A.yyleng,u=A.yytext,ae=A.yylineno,Ft=A.yylloc,qr>0&&qr--);break;case 2:if(X=this.productions_[F[1]][1],Ce.$=w[w.length-X],Ce._$={first_line:l[l.length-(X||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(X||1)].first_column,last_column:l[l.length-1].last_column},Jn&&(Ce._$.range=[l[l.length-(X||1)].range[0],l[l.length-1].range[1]]),Mt=this.performAction.apply(Ce,[u,Ue,ae,de.yy,F[1],w,l].concat(Xn)),typeof Mt<"u")return Mt;X&&(f=f.slice(0,-1*X*2),w=w.slice(0,-1*X),l=l.slice(0,-1*X)),f.push(this.productions_[F[1]][0]),w.push(Ce.$),l.push(Ce._$),Fr=xe[f[f.length-2]][f[f.length-1]],f.push(Fr);break;case 3:return!0}}return!0}},$n=function(){var ie={EOF:1,parseError:function(m,f){if(this.yy.parser)this.yy.parser.parseError(m,f);else throw new Error(m)},setInput:function(p,m){return this.yy=m||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},unput:function(p){var m=p.length,f=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===d.length?this.yylloc.first_column:0)+d[d.length-f.length].length-f[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(p){this.unput(this.match.slice(p))},pastInput:function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+` -`+m+"^"},test_match:function(p,m){var f,d,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),d=p[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],f=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var o in w)this[o]=w[o];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,f,d;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),o=0;om[0].length)){if(m=f,d=o,this.options.backtrack_lexer){if(p=this.test_match(f,w[o]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,w[d]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var m=this.next();return m||this.lex()},begin:function(m){this.conditionStack.push(m)},popState:function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},pushState:function(m){this.begin(m)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(m,f,d,w){function o(u,oe){return f.yytext=f.yytext.substring(u,f.yyleng-oe+u)}var Le=w;switch(d){case 0:if(f.yytext.slice(-2)==="\\\\"?(o(0,1),this.begin("mu")):f.yytext.slice(-1)==="\\"?(o(0,1),this.begin("emu")):this.begin("mu"),f.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(o(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 64;case 8:return 67;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 56;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 52;case 20:return 48;case 21:this.unput(f.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 72;case 25:return 71;case 26:return 71;case 27:return 86;case 28:break;case 29:return this.popState(),55;break;case 30:return this.popState(),33;break;case 31:return f.yytext=o(1,2).replace(/\\"/g,'"'),79;break;case 32:return f.yytext=o(1,2).replace(/\\'/g,"'"),79;break;case 33:return 84;case 34:return 81;case 35:return 81;case 36:return 82;case 37:return 83;case 38:return 80;case 39:return 74;case 40:return 76;case 41:return 71;case 42:return f.yytext=f.yytext.replace(/\\([\\\]])/g,"$1"),71;break;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return ae}();Mt.lexer=Jn;function Gt(){this.yy={}}return Gt.prototype=Mt,Mt.Parser=Gt,new Gt}(),xt=ri;var hr=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function pr(t,e){var r=e&&e.loc,n,s,i,a;r&&(n=r.start.line,s=r.end.line,i=r.start.column,a=r.end.column,t+=" - "+n+":"+i);for(var l=Error.prototype.constructor.call(this,t),c=0;cgr,id:()=>ni,prepareBlock:()=>ci,prepareMustache:()=>oi,preparePartialBlock:()=>hi,preparePath:()=>ai,prepareProgram:()=>ui,prepareRawBlock:()=>li,stripComment:()=>ii,stripFlags:()=>si});function mr(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new ce(t.path.original+" doesn't match "+e,r)}}function gr(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function ni(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function si(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function ii(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function ai(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",s=[],i=0,a=0,l=e.length;a0)throw new ce("Invalid path: "+n,{loc:r});c===".."&&i++}else s.push(c)}return{type:"PathExpression",data:t,depth:i,parts:s,original:n,loc:r}}function oi(t,e,r,n,s,i){var a=n.charAt(3)||n.charAt(2),l=a!=="{"&&a!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:l,strip:s,loc:this.locInfo(i)}}function li(t,e,r,n){mr(t,r),n=this.locInfo(n);var s={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:s,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function ci(t,e,r,n,s,i){n&&n.path&&mr(t,n);var a=/\*/.test(t.open);e.blockParams=t.blockParams;var l,c;if(r){if(a)throw new ce("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,l=r.program}return s&&(s=l,l=e,e=s),{type:a?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:l,openStrip:t.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(i)}}function ui(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function hi(t,e,r,n){return mr(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}var Cn={};for(Dt in ot)Object.prototype.hasOwnProperty.call(ot,Dt)&&(Cn[Dt]=ot[Dt]);var Dt;function Ot(t,e){if(t.type==="Program")return t;xt.yy=Cn,xt.yy.locInfo=function(n){return new gr(e&&e.srcName,n)};var r=xt.parse(t);return r}function br(t,e){var r=Ot(t,e),n=new Pn(e);return n.accept(r)}var Ln={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",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:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsolb:"\u29C5",bsol:"\\",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",cap:"\u2229",Cap:"\u22D2",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25CB",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cup:"\u222A",Cup:"\u22D3",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21A1",dArr:"\u21D3",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21CA",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",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",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21D3",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21BD",DownRightTeeVector:"\u295F",DownRightVectorBar:"\u2957",DownRightVector:"\u21C1",DownTeeArrow:"\u21A7",DownTee:"\u22A4",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",Ecirc:"\xCA",ecirc:"\xEA",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",gescc:"\u2AA9",ges:"\u2A7E",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2AA5",gl:"\u2277",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gt:">",GT:">",Gt:"\u226B",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",harrcir:"\u2948",harr:"\u2194",hArr:"\u21D4",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",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:"\u{1D526}",Ifr:"\u2111",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",incare:"\u2105",in:"\u2208",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",intcal:"\u22BA",int:"\u222B",Int:"\u222C",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:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",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:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larrb:"\u21E4",larrbfs:"\u291F",larr:"\u2190",Larr:"\u219E",lArr:"\u21D0",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",latail:"\u2919",lAtail:"\u291B",lat:"\u2AAB",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",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:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",LeftArrowBar:"\u21E4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21D0",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21C3",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTeeArrow:"\u21A4",LeftTee:"\u22A3",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangleBar:"\u29CF",LeftTriangle:"\u22B2",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21BF",LeftVectorBar:"\u2952",LeftVector:"\u21BC",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",lescc:"\u2AA8",les:"\u2A7D",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:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21C7",ll:"\u226A",Ll:"\u22D8",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoustache:"\u23B0",lmoust:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftrightarrow:"\u27F7",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longmapsto:"\u27FC",longrightarrow:"\u27F6",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",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:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",lt:"<",LT:"<",Lt:"\u226A",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:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midast:"*",midcir:"\u2AF0",mid:"\u2223",middot:"\xB7",minusb:"\u229F",minus:"\u2212",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",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",natural:"\u266E",naturals:"\u2115",natur:"\u266E",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",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` -`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",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:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",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:"\u{1D55F}",Nopf:"\u2115",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",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",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",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",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",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",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:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",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:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",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:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",para:"\xB6",parallel:"\u2225",par:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plus:"+",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",prap:"\u2AB7",Pr:"\u2ABB",pr:"\u227A",prcue:"\u227C",precapprox:"\u2AB7",prec:"\u227A",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",pre:"\u2AAF",prE:"\u2AB3",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportional:"\u221D",Proportion:"\u2237",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21A0",rArr:"\u21D2",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",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",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",Re:"\u211C",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrowBar:"\u21E5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21D2",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVectorBar:"\u2955",RightDownVector:"\u21C2",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTeeArrow:"\u21A6",RightTee:"\u22A2",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangleBar:"\u29D0",RightTriangle:"\u22B3",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVectorBar:"\u2954",RightUpVector:"\u21BE",RightVectorBar:"\u2953",RightVector:"\u21C0",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoustache:"\u23B1",rmoust:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",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",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2ABC",sc:"\u227B",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdotb:"\u22A1",sdot:"\u22C5",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",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",solbar:"\u233F",solb:"\u29C4",sol:"/",Sopf:"\u{1D54A}",sopf:"\u{1D564}",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",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squ:"\u25A1",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succapprox:"\u2AB8",succ:"\u227B",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",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",Sup:"\u22D1",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:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",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:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2A31",timesb:"\u22A0",times:"\xD7",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",topbot:"\u2336",topcir:"\u2AF1",top:"\u22A4",Topf:"\u{1D54B}",topf:"\u{1D565}",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:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",uarr:"\u2191",Uarr:"\u219F",uArr:"\u21D1",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:"\u{1D518}",ufr:"\u{1D532}",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:"\u{1D54C}",uopf:"\u{1D566}",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21D1",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21D5",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTeeArrow:"\u21A5",UpTee:"\u22A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",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:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",veebar:"\u22BB",vee:"\u2228",Vee:"\u22C1",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xharr:"\u27F7",xhArr:"\u27FA",Xi:"\u039E",xi:"\u03BE",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",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:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",yuml:"\xFF",Yuml:"\u0178",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:"\u{1D537}",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},pi=/^#[xX]([A-Fa-f0-9]+)$/,fi=/^#([0-9]+)$/,di=/^([A-Za-z0-9]+)$/,yr=function(){function t(e){this.named=e}return t.prototype.parse=function(e){if(e){var r=e.match(pi);if(r)return String.fromCharCode(parseInt(r[1],16));if(r=e.match(fi),r)return String.fromCharCode(parseInt(r[1],10));if(r=e.match(di),r)return this.named[r[1]]}},t}(),mi=/[\t\n\f ]/,gi=/[A-Za-z]/,bi=/\r\n?/g;function _(t){return mi.test(t)}function xn(t){return gi.test(t)}function yi(t){return t.replace(bi,` -`)}var Er=function(){function t(e,r,n){n===void 0&&(n="precompile"),this.delegate=e,this.entityParser=r,this.mode=n,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var s=this.peek();if(s==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&s===` -`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var s=this.peek(),i=this.tagNameBuffer;s==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):s==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(s))},tagOpen:function(){var s=this.consume();s==="!"?this.transitionTo("markupDeclarationOpen"):s==="/"?this.transitionTo("endTagOpen"):(s==="@"||s===":"||xn(s))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(s))},markupDeclarationOpen:function(){var s=this.consume();if(s==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=s.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var s=this.consume();_(s)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var s=this.consume();_(s)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(s.toLowerCase()))},doctypeName:function(){var s=this.consume();_(s)?this.transitionTo("afterDoctypeName"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(s.toLowerCase())},afterDoctypeName:function(){var s=this.consume();if(!_(s))if(s===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=s.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",l=i.toUpperCase()==="SYSTEM";(a||l)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):l&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var s=this.peek();_(s)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):s==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):s==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):s===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var s=this.consume();s==='"'?this.transitionTo("afterDoctypePublicIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(s)},doctypePublicIdentifierSingleQuoted:function(){var s=this.consume();s==="'"?this.transitionTo("afterDoctypePublicIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(s)},afterDoctypePublicIdentifier:function(){var s=this.consume();_(s)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):s==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):s==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var s=this.consume();_(s)||(s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):s==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):s==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var s=this.consume();s==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(s)},doctypeSystemIdentifierSingleQuoted:function(){var s=this.consume();s==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(s)},afterDoctypeSystemIdentifier:function(){var s=this.consume();_(s)||s===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var s=this.consume();s==="-"?this.transitionTo("commentStartDash"):s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(s),this.transitionTo("comment"))},commentStartDash:function(){var s=this.consume();s==="-"?this.transitionTo("commentEnd"):s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var s=this.consume();s==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(s)},commentEndDash:function(){var s=this.consume();s==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+s),this.transitionTo("comment"))},commentEnd:function(){var s=this.consume();s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+s),this.transitionTo("comment"))},tagName:function(){var s=this.consume();_(s)?this.transitionTo("beforeAttributeName"):s==="/"?this.transitionTo("selfClosingStartTag"):s===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(s)},endTagName:function(){var s=this.consume();_(s)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):s==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):s===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(s)},beforeAttributeName:function(){var s=this.peek();if(_(s)){this.consume();return}else s==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):s===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):s==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(s)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var s=this.peek();_(s)?(this.transitionTo("afterAttributeName"),this.consume()):s==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):s==='"'||s==="'"||s==="<"?(this.delegate.reportSyntaxError(s+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(s)):(this.consume(),this.delegate.appendToAttributeName(s))},afterAttributeName:function(){var s=this.peek();if(_(s)){this.consume();return}else s==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(s))},beforeAttributeValue:function(){var s=this.peek();_(s)?this.consume():s==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):s==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(s))},attributeValueDoubleQuoted:function(){var s=this.consume();s==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):s==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(s)},attributeValueSingleQuoted:function(){var s=this.consume();s==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):s==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(s)},attributeValueUnquoted:function(){var s=this.peek();_(s)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):s==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):s===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(s))},afterAttributeValueQuoted:function(){var s=this.peek();_(s)?(this.consume(),this.transitionTo("beforeAttributeName")):s==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):s===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var s=this.peek();s===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var s=this.consume();(s==="@"||s===":"||xn(s))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(s))}},this.reset()}return t.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},t.prototype.transitionTo=function(e){this.state=e},t.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},t.prototype.tokenizePart=function(e){for(this.input+=yi(e);this.index"||e==="style"&&this.input.substring(this.index,this.index+8)!==""||e==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},t}(),Go=function(){function t(e,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Er(this,e,r.mode),this._currentAttribute=void 0}return t.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},t.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},t.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},t.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},t.prototype.current=function(){var e=this.token;if(e===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return e;for(var r=0;r\xA0]/u,nl=new RegExp(Si.source,"gu");var Dn=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);var pe=Object.freeze({line:1,column:0}),ki=Object.freeze({source:"(synthetic)",start:pe,end:pe}),Rt=Object.freeze({source:"(nonexistent)",start:pe,end:pe}),he=Object.freeze({source:"(broken)",start:pe,end:pe}),y=function(t){return t.CharPosition="CharPosition",t.HbsPosition="HbsPosition",t.InternalsSynthetic="InternalsSynthetic",t.NonExistent="NonExistent",t.Broken="Broken",t}({}),lt="MATCH_ANY",Ar="IS_INVISIBLE",Pr=class{_whens;constructor(e){this._whens=e}first(e){for(let r of this._whens){let n=r.match(e);if(ke(n))return n[0]}return null}},Ht=class{_map=new Map;get(e,r){let n=this._map.get(e);return n||(n=r(),this._map.set(e,n),n)}add(e,r){this._map.set(e,r)}match(e){let r=wi(e),n=[],s=this._map.get(r),i=this._map.get(lt);return s&&n.push(s),i&&n.push(i),n}};function qn(t){return t(new Cr).check()}var Cr=class{_whens=new Ht;check(){return(e,r)=>this.matchFor(e.kind,r.kind)(e,r)}matchFor(e,r){let n=this._whens.match(e);T(ke(n),`no match defined for (${e}, ${r}) and no AnyMatch defined either`);let s=new Pr(n).first(r);return T(s!==null,`no match defined for (${e}, ${r}) and no AnyMatch defined either`),s}when(e,r,n){return this._whens.get(e,()=>new Ht).add(r,n),this}};function wi(t){switch(t){case y.Broken:case y.InternalsSynthetic:case y.NonExistent:return Ar;default:return t}}var qt=!1,xr=class t{static synthetic(e){let r=I.synthetic(e);return new t({loc:r,chars:e})}static load(e,r){return new t({loc:I.load(e,r[1]),chars:r[0]})}chars;loc;constructor(e){this.loc=e.loc,this.chars=e.chars}getString(){return this.chars}serialize(){return[this.chars,this.loc.serialize()]}},I=class t{static get NON_EXISTENT(){return new te(y.NonExistent,Rt).wrap()}static load(e,r){if(typeof r=="number")return t.forCharPositions(e,r,r);if(typeof r=="string")return t.synthetic(r);if(Array.isArray(r))return t.forCharPositions(e,r[0],r[1]);if(r===y.NonExistent)return t.NON_EXISTENT;if(r===y.Broken)return t.broken(he);Tn(r)}static forHbsLoc(e,r){let n=new de(e,r.start),s=new de(e,r.end);return new ut(e,{start:n,end:s},r).wrap()}static forCharPositions(e,r,n){let s=new ve(e,r),i=new ve(e,n);return new ct(e,{start:s,end:i}).wrap()}static synthetic(e){return new te(y.InternalsSynthetic,Rt,e).wrap()}static broken(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:he;return new te(y.Broken,e).wrap()}isInvisible;constructor(e){this.data=e,this.isInvisible=e.kind!==y.CharPosition&&e.kind!==y.HbsPosition}getStart(){return this.data.getStart().wrap()}getEnd(){return this.data.getEnd().wrap()}get loc(){let e=this.data.toHbsSpan();return e===null?he:e.toHbsLoc()}get module(){return this.data.getModule()}get startPosition(){return this.loc.start}get endPosition(){return this.loc.end}toJSON(){return this.loc}withStart(e){return $(e.data,this.data.getEnd())}withEnd(e){return $(this.data.getStart(),e.data)}asString(){return this.data.asString()}toSlice(e){let r=this.data.asString();return!1&&e!==void 0&&r!==e&&console.warn(`unexpectedly found ${JSON.stringify(r)} when slicing source, but expected ${JSON.stringify(e)}`),new xr({loc:this,chars:e||r})}get start(){return this.loc.start}set start(e){this.data.locDidUpdate({start:e})}get end(){return this.loc.end}set end(e){this.data.locDidUpdate({end:e})}get source(){return this.module}collapse(e){switch(e){case"start":return this.getStart().collapsed();case"end":return this.getEnd().collapsed()}}extend(e){return $(this.data.getStart(),e.data.getEnd())}serialize(){return this.data.serialize()}slice(e){let{skipStart:r=0,skipEnd:n=0}=e;return $(this.getStart().move(r).data,this.getEnd().move(-n).data)}sliceStartChars(e){let{skipStart:r=0,chars:n}=e;return $(this.getStart().move(r).data,this.getStart().move(r+n).data)}sliceEndChars(e){let{skipEnd:r=0,chars:n}=e;return $(this.getEnd().move(r-n).data,this.getStart().move(-r).data)}},ct=class{kind=y.CharPosition;_locPosSpan=null;constructor(e,r){this.source=e,this.charPositions=r}wrap(){return new I(this)}asString(){return this.source.slice(this.charPositions.start.charPos,this.charPositions.end.charPos)}getModule(){return this.source.module}getStart(){return this.charPositions.start}getEnd(){return this.charPositions.end}locDidUpdate(){qt&&console.warn("updating a location that came from a CharPosition span doesn't work reliably. Don't try to update locations after the plugin phase")}toHbsSpan(){let e=this._locPosSpan;if(e===null){let r=this.charPositions.start.toHbsPos(),n=this.charPositions.end.toHbsPos();r===null||n===null?e=this._locPosSpan=fe:e=this._locPosSpan=new ut(this.source,{start:r,end:n})}return e===fe?null:e}serialize(){let{start:{charPos:e},end:{charPos:r}}=this.charPositions;return e===r?e:[e,r]}toCharPosSpan(){return this}},ut=class{kind=y.HbsPosition;_charPosSpan=null;_providedHbsLoc;constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.source=e,this.hbsPositions=r,this._providedHbsLoc=n}serialize(){let e=this.toCharPosSpan();return e===null?y.Broken:e.wrap().serialize()}wrap(){return new I(this)}updateProvided(e,r){this._providedHbsLoc&&(this._providedHbsLoc[r]=e),this._charPosSpan=null,this._providedHbsLoc={start:e,end:e}}locDidUpdate(e){let{start:r,end:n}=e;r!==void 0&&(this.updateProvided(r,"start"),this.hbsPositions.start=new de(this.source,r,null)),n!==void 0&&(this.updateProvided(n,"end"),this.hbsPositions.end=new de(this.source,n,null))}asString(){let e=this.toCharPosSpan();return e===null?"":e.asString()}getModule(){return this.source.module}getStart(){return this.hbsPositions.start}getEnd(){return this.hbsPositions.end}toHbsLoc(){return{start:this.hbsPositions.start.hbsPos,end:this.hbsPositions.end.hbsPos}}toHbsSpan(){return this}toCharPosSpan(){let e=this._charPosSpan;if(e===null){let r=this.hbsPositions.start.toCharPos(),n=this.hbsPositions.end.toCharPos();if(r&&n)e=this._charPosSpan=new ct(this.source,{start:r,end:n});else return e=this._charPosSpan=fe,null}return e===fe?null:e}},te=class{constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.kind=e,this.loc=r,this.string=n}serialize(){switch(this.kind){case y.Broken:case y.NonExistent:return this.kind;case y.InternalsSynthetic:return this.string||""}}wrap(){return new I(this)}asString(){return this.string||""}locDidUpdate(e){let{start:r,end:n}=e;r!==void 0&&(this.loc.start=r),n!==void 0&&(this.loc.end=n)}getModule(){return"an unknown module"}getStart(){return new ht(this.kind,this.loc.start)}getEnd(){return new ht(this.kind,this.loc.end)}toCharPosSpan(){return this}toHbsSpan(){return null}toHbsLoc(){return he}},$=qn(t=>t.when(y.HbsPosition,y.HbsPosition,(e,r)=>new ut(e.source,{start:e,end:r}).wrap()).when(y.CharPosition,y.CharPosition,(e,r)=>new ct(e.source,{start:e,end:r}).wrap()).when(y.CharPosition,y.HbsPosition,(e,r)=>{let n=r.toCharPos();return n===null?new te(y.Broken,he).wrap():$(e,n)}).when(y.HbsPosition,y.CharPosition,(e,r)=>{let n=e.toCharPos();return n===null?new te(y.Broken,he).wrap():$(n,r)}).when(Ar,lt,e=>new te(e.kind,he).wrap()).when(lt,Ar,(e,r)=>new te(r.kind,he).wrap())),fe="BROKEN",Ue=class t{static forHbsPos(e,r){return new de(e,r,null).wrap()}static broken(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pe;return new ht(y.Broken,e).wrap()}constructor(e){this.data=e}get offset(){let e=this.data.toCharPos();return e===null?null:e.offset}eql(e){return Ti(this.data,e.data)}until(e){return $(this.data,e.data)}move(e){let r=this.data.toCharPos();if(r===null)return t.broken();{let n=r.offset+e;return r.source.check(n)?new ve(r.source,n).wrap():t.broken()}}collapsed(){return $(this.data,this.data)}toJSON(){return this.data.toJSON()}},ve=class{kind=y.CharPosition;_locPos=null;constructor(e,r){this.source=e,this.charPos=r}toCharPos(){return this}toJSON(){let e=this.toHbsPos();return e===null?pe:e.toJSON()}wrap(){return new Ue(this)}get offset(){return this.charPos}toHbsPos(){let e=this._locPos;if(e===null){let r=this.source.hbsPosFor(this.charPos);r===null?this._locPos=e=fe:this._locPos=e=new de(this.source,r,this.charPos)}return e===fe?null:e}},de=class{kind=y.HbsPosition;_charPos;constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.source=e,this.hbsPos=r,this._charPos=n===null?null:new ve(e,n)}toCharPos(){let e=this._charPos;if(e===null){let r=this.source.charPosFor(this.hbsPos);r===null?this._charPos=e=fe:this._charPos=e=new ve(this.source,r)}return e===fe?null:e}toJSON(){return this.hbsPos}wrap(){return new Ue(this)}toHbsPos(){return this}},ht=class{constructor(e,r){this.kind=e,this.pos=r}toCharPos(){return null}toJSON(){return this.pos}wrap(){return new Ue(this)}get offset(){return null}},Ti=qn(t=>t.when(y.HbsPosition,y.HbsPosition,(e,r)=>{let{hbsPos:n}=e,{hbsPos:s}=r;return n.column===s.column&&n.line===s.line}).when(y.CharPosition,y.CharPosition,(e,r)=>{let{charPos:n}=e,{charPos:s}=r;return n===s}).when(y.CharPosition,y.HbsPosition,(e,r)=>{var s;let{offset:n}=e;return n===((s=r.toCharPos())==null?void 0:s.offset)}).when(y.HbsPosition,y.CharPosition,(e,r)=>{var s;let{offset:n}=r;return((s=e.toCharPos())==null?void 0:s.offset)===n}).when(lt,lt,()=>!1)),Ne=class t{static from(e){var n;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new t(e,(n=r.meta)==null?void 0:n.moduleName)}constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"an unknown module";this.source=e,this.module=r}check(e){return e>=0&&e<=this.source.length}slice(e,r){return this.source.slice(e,r)}offsetFor(e,r){return Ue.forHbsPos(this,{line:e,column:r})}spanFor(e){let{start:r,end:n}=e;return I.forHbsLoc(this,{start:{line:r.line,column:r.column},end:{line:n.line,column:n.column}})}hbsPosFor(e){let r=0,n=0;if(e>this.source.length)return null;for(;;){let s=this.source.indexOf(` -`,n);if(e<=s||s===-1)return{line:r+1,column:e-n};r+=1,n=s+1}}charPosFor(e){let{line:r,column:n}=e,i=this.source.length,a=0,l=0;for(;lc)return c;if(!1){let h=this.hbsPosFor(l+n);T(h!==null,"the returned offset failed to round-trip"),T(h.line===r,"the round-tripped line didn't match the original line"),T(h.column===n,"the round-tripped column didn't match the original column")}return l+n}else{if(c===-1)return 0;a+=1,l=c+1}}return i}};function S(t,e){let{module:r,loc:n}=e,{line:s,column:i}=n.start,a=e.asString(),l=a?` +`+m+"^"},test_match:function(p,m){var f,d,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),d=p[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],f=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,f,d;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;lm[0].length)){if(m=f,d=l,this.options.backtrack_lexer){if(p=this.test_match(f,w[l]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,w[d]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var m=this.next();return m||this.lex()},begin:function(m){this.conditionStack.push(m)},popState:function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},pushState:function(m){this.begin(m)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(m,f,d,w){function l(u,ae){return f.yytext=f.yytext.substring(u,f.yyleng-ae+u)}var xe=w;switch(d){case 0:if(f.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):f.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),f.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 64;case 8:return 67;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 56;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 52;case 20:return 48;case 21:this.unput(f.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 72;case 25:return 71;case 26:return 71;case 27:return 86;case 28:break;case 29:return this.popState(),55;break;case 30:return this.popState(),33;break;case 31:return f.yytext=l(1,2).replace(/\\"/g,'"'),79;break;case 32:return f.yytext=l(1,2).replace(/\\'/g,"'"),79;break;case 33:return 84;case 34:return 81;case 35:return 81;case 36:return 82;case 37:return 83;case 38:return 80;case 39:return 74;case 40:return 76;case 41:return 71;case 42:return f.yytext=f.yytext.replace(/\\([\\\]])/g,"$1"),71;break;case 43:return"INVALID";case 44:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}}};return ie}();Ht.lexer=$n;function qt(){this.yy={}}return qt.prototype=Ht,Ht.Parser=qt,new qt}(),vt=Qs;var lr=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function cr(t,e){var r=e&&e.loc,n,s,i,a;r&&(n=r.start.line,s=r.end.line,i=r.start.column,a=r.end.column,t+=" - "+n+":"+i);for(var o=Error.prototype.constructor.call(this,t),c=0;cfr,id:()=>Xs,prepareBlock:()=>ni,prepareMustache:()=>ti,preparePartialBlock:()=>ii,preparePath:()=>ei,prepareProgram:()=>si,prepareRawBlock:()=>ri,stripComment:()=>Zs,stripFlags:()=>Js});function pr(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new le(t.path.original+" doesn't match "+e,r)}}function fr(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function Xs(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function Js(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function Zs(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function ei(t,e,r){r=this.locInfo(r);for(var n=t?"@":"",s=[],i=0,a=0,o=e.length;a0)throw new le("Invalid path: "+n,{loc:r});c===".."&&i++}else s.push(c)}return{type:"PathExpression",data:t,depth:i,parts:s,original:n,loc:r}}function ti(t,e,r,n,s,i){var a=n.charAt(3)||n.charAt(2),o=a!=="{"&&a!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:o,strip:s,loc:this.locInfo(i)}}function ri(t,e,r,n){pr(t,r),n=this.locInfo(n);var s={type:"Program",body:e,strip:{},loc:n};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:s,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function ni(t,e,r,n,s,i){n&&n.path&&pr(t,n);var a=/\*/.test(t.open);e.blockParams=t.blockParams;var o,c;if(r){if(a)throw new le("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,o=r.program}return s&&(s=o,o=e,e=s),{type:a?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:o,openStrip:t.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(i)}}function si(t,e){if(!e&&t.length){var r=t[0].loc,n=t[t.length-1].loc;r&&n&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function ii(t,e,r,n){return pr(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}var An={};for(xt in st)Object.prototype.hasOwnProperty.call(st,xt)&&(An[xt]=st[xt]);var xt;function Ct(t,e){if(t.type==="Program")return t;vt.yy=An,vt.yy.locInfo=function(n){return new fr(e&&e.srcName,n)};var r=vt.parse(t);return r}function dr(t,e){var r=Ct(t,e),n=new vn(e);return n.accept(r)}var xn={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",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:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsolb:"\u29C5",bsol:"\\",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",cap:"\u2229",Cap:"\u22D2",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25CB",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cup:"\u222A",Cup:"\u22D3",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21A1",dArr:"\u21D3",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21CA",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",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",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21D3",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21BD",DownRightTeeVector:"\u295F",DownRightVectorBar:"\u2957",DownRightVector:"\u21C1",DownTeeArrow:"\u21A7",DownTee:"\u22A4",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",Ecirc:"\xCA",ecirc:"\xEA",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",gescc:"\u2AA9",ges:"\u2A7E",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2AA5",gl:"\u2277",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gt:">",GT:">",Gt:"\u226B",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",harrcir:"\u2948",harr:"\u2194",hArr:"\u21D4",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",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:"\u{1D526}",Ifr:"\u2111",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",incare:"\u2105",in:"\u2208",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",intcal:"\u22BA",int:"\u222B",Int:"\u222C",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:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",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:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larrb:"\u21E4",larrbfs:"\u291F",larr:"\u2190",Larr:"\u219E",lArr:"\u21D0",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",latail:"\u2919",lAtail:"\u291B",lat:"\u2AAB",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",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:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",LeftArrowBar:"\u21E4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21D0",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21C3",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTeeArrow:"\u21A4",LeftTee:"\u22A3",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangleBar:"\u29CF",LeftTriangle:"\u22B2",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21BF",LeftVectorBar:"\u2952",LeftVector:"\u21BC",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",lescc:"\u2AA8",les:"\u2A7D",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:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21C7",ll:"\u226A",Ll:"\u22D8",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoustache:"\u23B0",lmoust:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftrightarrow:"\u27F7",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longmapsto:"\u27FC",longrightarrow:"\u27F6",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",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:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",lt:"<",LT:"<",Lt:"\u226A",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:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midast:"*",midcir:"\u2AF0",mid:"\u2223",middot:"\xB7",minusb:"\u229F",minus:"\u2212",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",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",natural:"\u266E",naturals:"\u2115",natur:"\u266E",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",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` +`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",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:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",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:"\u{1D55F}",Nopf:"\u2115",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",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",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",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",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",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",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:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",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:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",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:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",para:"\xB6",parallel:"\u2225",par:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plus:"+",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",prap:"\u2AB7",Pr:"\u2ABB",pr:"\u227A",prcue:"\u227C",precapprox:"\u2AB7",prec:"\u227A",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",pre:"\u2AAF",prE:"\u2AB3",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportional:"\u221D",Proportion:"\u2237",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21A0",rArr:"\u21D2",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",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",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",Re:"\u211C",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrowBar:"\u21E5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21D2",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVectorBar:"\u2955",RightDownVector:"\u21C2",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTeeArrow:"\u21A6",RightTee:"\u22A2",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangleBar:"\u29D0",RightTriangle:"\u22B3",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVectorBar:"\u2954",RightUpVector:"\u21BE",RightVectorBar:"\u2953",RightVector:"\u21C0",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoustache:"\u23B1",rmoust:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",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",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2ABC",sc:"\u227B",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdotb:"\u22A1",sdot:"\u22C5",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",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",solbar:"\u233F",solb:"\u29C4",sol:"/",Sopf:"\u{1D54A}",sopf:"\u{1D564}",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",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squ:"\u25A1",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succapprox:"\u2AB8",succ:"\u227B",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",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",Sup:"\u22D1",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:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",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:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2A31",timesb:"\u22A0",times:"\xD7",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",topbot:"\u2336",topcir:"\u2AF1",top:"\u22A4",Topf:"\u{1D54B}",topf:"\u{1D565}",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:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",uarr:"\u2191",Uarr:"\u219F",uArr:"\u21D1",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:"\u{1D518}",ufr:"\u{1D532}",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:"\u{1D54C}",uopf:"\u{1D566}",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21D1",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21D5",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTeeArrow:"\u21A5",UpTee:"\u22A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",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:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",veebar:"\u22BB",vee:"\u2228",Vee:"\u22C1",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xharr:"\u27F7",xhArr:"\u27FA",Xi:"\u039E",xi:"\u03BE",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",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:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",yuml:"\xFF",Yuml:"\u0178",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:"\u{1D537}",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},ai=/^#[xX]([A-Fa-f0-9]+)$/,oi=/^#([0-9]+)$/,li=/^([A-Za-z0-9]+)$/,mr=function(){function t(e){this.named=e}return t.prototype.parse=function(e){if(e){var r=e.match(ai);if(r)return String.fromCharCode(parseInt(r[1],16));if(r=e.match(oi),r)return String.fromCharCode(parseInt(r[1],10));if(r=e.match(li),r)return this.named[r[1]]}},t}(),ci=/[\t\n\f ]/,ui=/[A-Za-z]/,hi=/\r\n?/g;function _(t){return ci.test(t)}function Pn(t){return ui.test(t)}function pi(t){return t.replace(hi,` +`)}var gr=function(){function t(e,r,n){n===void 0&&(n="precompile"),this.delegate=e,this.entityParser=r,this.mode=n,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var s=this.peek();if(s==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&s===` +`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var s=this.peek(),i=this.tagNameBuffer;s==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):s==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(s))},tagOpen:function(){var s=this.consume();s==="!"?this.transitionTo("markupDeclarationOpen"):s==="/"?this.transitionTo("endTagOpen"):(s==="@"||s===":"||Pn(s))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(s))},markupDeclarationOpen:function(){var s=this.consume();if(s==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=s.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var s=this.consume();_(s)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var s=this.consume();_(s)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(s.toLowerCase()))},doctypeName:function(){var s=this.consume();_(s)?this.transitionTo("afterDoctypeName"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(s.toLowerCase())},afterDoctypeName:function(){var s=this.consume();if(!_(s))if(s===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=s.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var s=this.peek();_(s)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):s==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):s==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):s===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var s=this.consume();s==='"'?this.transitionTo("afterDoctypePublicIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(s)},doctypePublicIdentifierSingleQuoted:function(){var s=this.consume();s==="'"?this.transitionTo("afterDoctypePublicIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(s)},afterDoctypePublicIdentifier:function(){var s=this.consume();_(s)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):s==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):s==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var s=this.consume();_(s)||(s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):s==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):s==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var s=this.consume();s==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(s)},doctypeSystemIdentifierSingleQuoted:function(){var s=this.consume();s==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):s===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(s)},afterDoctypeSystemIdentifier:function(){var s=this.consume();_(s)||s===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var s=this.consume();s==="-"?this.transitionTo("commentStartDash"):s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(s),this.transitionTo("comment"))},commentStartDash:function(){var s=this.consume();s==="-"?this.transitionTo("commentEnd"):s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("-"),this.transitionTo("comment"))},comment:function(){var s=this.consume();s==="-"?this.transitionTo("commentEndDash"):this.delegate.appendToCommentData(s)},commentEndDash:function(){var s=this.consume();s==="-"?this.transitionTo("commentEnd"):(this.delegate.appendToCommentData("-"+s),this.transitionTo("comment"))},commentEnd:function(){var s=this.consume();s===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData("--"+s),this.transitionTo("comment"))},tagName:function(){var s=this.consume();_(s)?this.transitionTo("beforeAttributeName"):s==="/"?this.transitionTo("selfClosingStartTag"):s===">"?(this.delegate.finishTag(),this.transitionTo("beforeData")):this.appendToTagName(s)},endTagName:function(){var s=this.consume();_(s)?(this.transitionTo("beforeAttributeName"),this.tagNameBuffer=""):s==="/"?(this.transitionTo("selfClosingStartTag"),this.tagNameBuffer=""):s===">"?(this.delegate.finishTag(),this.transitionTo("beforeData"),this.tagNameBuffer=""):this.appendToTagName(s)},beforeAttributeName:function(){var s=this.peek();if(_(s)){this.consume();return}else s==="/"?(this.transitionTo("selfClosingStartTag"),this.consume()):s===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):s==="="?(this.delegate.reportSyntaxError("attribute name cannot start with equals sign"),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(s)):(this.transitionTo("attributeName"),this.delegate.beginAttribute())},attributeName:function(){var s=this.peek();_(s)?(this.transitionTo("afterAttributeName"),this.consume()):s==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="="?(this.transitionTo("beforeAttributeValue"),this.consume()):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):s==='"'||s==="'"||s==="<"?(this.delegate.reportSyntaxError(s+" is not a valid character within attribute names"),this.consume(),this.delegate.appendToAttributeName(s)):(this.consume(),this.delegate.appendToAttributeName(s))},afterAttributeName:function(){var s=this.peek();if(_(s)){this.consume();return}else s==="/"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="="?(this.consume(),this.transitionTo("beforeAttributeValue")):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.transitionTo("attributeName"),this.delegate.beginAttribute(),this.consume(),this.delegate.appendToAttributeName(s))},beforeAttributeValue:function(){var s=this.peek();_(s)?this.consume():s==='"'?(this.transitionTo("attributeValueDoubleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):s==="'"?(this.transitionTo("attributeValueSingleQuoted"),this.delegate.beginAttributeValue(!0),this.consume()):s===">"?(this.delegate.beginAttributeValue(!1),this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.transitionTo("attributeValueUnquoted"),this.delegate.beginAttributeValue(!1),this.consume(),this.delegate.appendToAttributeValue(s))},attributeValueDoubleQuoted:function(){var s=this.consume();s==='"'?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):s==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(s)},attributeValueSingleQuoted:function(){var s=this.consume();s==="'"?(this.delegate.finishAttributeValue(),this.transitionTo("afterAttributeValueQuoted")):s==="&"?this.delegate.appendToAttributeValue(this.consumeCharRef()||"&"):this.delegate.appendToAttributeValue(s)},attributeValueUnquoted:function(){var s=this.peek();_(s)?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("beforeAttributeName")):s==="/"?(this.delegate.finishAttributeValue(),this.consume(),this.transitionTo("selfClosingStartTag")):s==="&"?(this.consume(),this.delegate.appendToAttributeValue(this.consumeCharRef()||"&")):s===">"?(this.delegate.finishAttributeValue(),this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):(this.consume(),this.delegate.appendToAttributeValue(s))},afterAttributeValueQuoted:function(){var s=this.peek();_(s)?(this.consume(),this.transitionTo("beforeAttributeName")):s==="/"?(this.consume(),this.transitionTo("selfClosingStartTag")):s===">"?(this.consume(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},selfClosingStartTag:function(){var s=this.peek();s===">"?(this.consume(),this.delegate.markTagAsSelfClosing(),this.delegate.finishTag(),this.transitionTo("beforeData")):this.transitionTo("beforeAttributeName")},endTagOpen:function(){var s=this.consume();(s==="@"||s===":"||Pn(s))&&(this.transitionTo("endTagName"),this.tagNameBuffer="",this.delegate.beginEndTag(),this.appendToTagName(s))}},this.reset()}return t.prototype.reset=function(){this.transitionTo("beforeData"),this.input="",this.tagNameBuffer="",this.index=0,this.line=1,this.column=0,this.delegate.reset()},t.prototype.transitionTo=function(e){this.state=e},t.prototype.tokenize=function(e){this.reset(),this.tokenizePart(e),this.tokenizeEOF()},t.prototype.tokenizePart=function(e){for(this.input+=pi(e);this.index"||e==="style"&&this.input.substring(this.index,this.index+8)!==""||e==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},t}(),Fo=function(){function t(e,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new gr(this,e,r.mode),this._currentAttribute=void 0}return t.prototype.tokenize=function(e){return this.tokens=[],this.tokenizer.tokenize(e),this.tokens},t.prototype.tokenizePart=function(e){return this.tokens=[],this.tokenizer.tokenizePart(e),this.tokens},t.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},t.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},t.prototype.current=function(){var e=this.token;if(e===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return e;for(var r=0;r\xA0]/u,el=new RegExp(di.source,"gu");var Ln=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);var he=Object.freeze({line:1,column:0}),mi=Object.freeze({source:"(synthetic)",start:he,end:he}),Dt=Object.freeze({source:"(nonexistent)",start:he,end:he}),ue=Object.freeze({source:"(broken)",start:he,end:he}),y=function(t){return t.CharPosition="CharPosition",t.HbsPosition="HbsPosition",t.InternalsSynthetic="InternalsSynthetic",t.NonExistent="NonExistent",t.Broken="Broken",t}({}),it="MATCH_ANY",Tr="IS_INVISIBLE",Nr=class{_whens;constructor(e){this._whens=e}first(e){for(let r of this._whens){let n=r.match(e);if(Se(n))return n[0]}return null}},Ot=class{_map=new Map;get(e,r){let n=this._map.get(e);return n||(n=r(),this._map.set(e,n),n)}add(e,r){this._map.set(e,r)}match(e){let r=gi(e),n=[],s=this._map.get(r),i=this._map.get(it);return s&&n.push(s),i&&n.push(i),n}};function Rn(t){return t(new vr).check()}var vr=class{_whens=new Ot;check(){return(e,r)=>this.matchFor(e.kind,r.kind)(e,r)}matchFor(e,r){let n=this._whens.match(e);P(Se(n),`no match defined for (${e}, ${r}) and no AnyMatch defined either`);let s=new Nr(n).first(r);return P(s!==null,`no match defined for (${e}, ${r}) and no AnyMatch defined either`),s}when(e,r,n){return this._whens.get(e,()=>new Ot).add(r,n),this}};function gi(t){switch(t){case y.Broken:case y.InternalsSynthetic:case y.NonExistent:return Tr;default:return t}}var Ar=class t{static synthetic(e){let r=I.synthetic(e);return new t({loc:r,chars:e})}static load(e,r){return new t({loc:I.load(e,r[1]),chars:r[0]})}chars;loc;constructor(e){this.loc=e.loc,this.chars=e.chars}getString(){return this.chars}serialize(){return[this.chars,this.loc.serialize()]}},I=class t{static get NON_EXISTENT(){return new ee(y.NonExistent,Dt).wrap()}static load(e,r){if(typeof r=="number")return t.forCharPositions(e,r,r);if(typeof r=="string")return t.synthetic(r);if(Array.isArray(r))return t.forCharPositions(e,r[0],r[1]);if(r===y.NonExistent)return t.NON_EXISTENT;if(r===y.Broken)return t.broken(ue);kn(r)}static forHbsLoc(e,r){let n=new fe(e,r.start),s=new fe(e,r.end);return new ot(e,{start:n,end:s},r).wrap()}static forCharPositions(e,r,n){let s=new Te(e,r),i=new Te(e,n);return new at(e,{start:s,end:i}).wrap()}static synthetic(e){return new ee(y.InternalsSynthetic,Dt,e).wrap()}static broken(e=ue){return new ee(y.Broken,e).wrap()}isInvisible;constructor(e){this.data=e,this.isInvisible=e.kind!==y.CharPosition&&e.kind!==y.HbsPosition}getStart(){return this.data.getStart().wrap()}getEnd(){return this.data.getEnd().wrap()}get loc(){let e=this.data.toHbsSpan();return e===null?ue:e.toHbsLoc()}get module(){return this.data.getModule()}get startPosition(){return this.loc.start}get endPosition(){return this.loc.end}toJSON(){return this.loc}withStart(e){return j(e.data,this.data.getEnd())}withEnd(e){return j(this.data.getStart(),e.data)}asString(){return this.data.asString()}toSlice(e){let r=this.data.asString();return!1&&e!==void 0&&r!==e&&console.warn(`unexpectedly found ${JSON.stringify(r)} when slicing source, but expected ${JSON.stringify(e)}`),new Ar({loc:this,chars:e||r})}get start(){return this.loc.start}set start(e){this.data.locDidUpdate({start:e})}get end(){return this.loc.end}set end(e){this.data.locDidUpdate({end:e})}get source(){return this.module}collapse(e){switch(e){case"start":return this.getStart().collapsed();case"end":return this.getEnd().collapsed()}}extend(e){return j(this.data.getStart(),e.data.getEnd())}serialize(){return this.data.serialize()}slice({skipStart:e=0,skipEnd:r=0}){return j(this.getStart().move(e).data,this.getEnd().move(-r).data)}sliceStartChars({skipStart:e=0,chars:r}){return j(this.getStart().move(e).data,this.getStart().move(e+r).data)}sliceEndChars({skipEnd:e=0,chars:r}){return j(this.getEnd().move(e-r).data,this.getStart().move(-e).data)}},at=class{kind=y.CharPosition;_locPosSpan=null;constructor(e,r){this.source=e,this.charPositions=r}wrap(){return new I(this)}asString(){return this.source.slice(this.charPositions.start.charPos,this.charPositions.end.charPos)}getModule(){return this.source.module}getStart(){return this.charPositions.start}getEnd(){return this.charPositions.end}locDidUpdate(){}toHbsSpan(){let e=this._locPosSpan;if(e===null){let r=this.charPositions.start.toHbsPos(),n=this.charPositions.end.toHbsPos();r===null||n===null?e=this._locPosSpan=pe:e=this._locPosSpan=new ot(this.source,{start:r,end:n})}return e===pe?null:e}serialize(){let{start:{charPos:e},end:{charPos:r}}=this.charPositions;return e===r?e:[e,r]}toCharPosSpan(){return this}},ot=class{kind=y.HbsPosition;_charPosSpan=null;_providedHbsLoc;constructor(e,r,n=null){this.source=e,this.hbsPositions=r,this._providedHbsLoc=n}serialize(){let e=this.toCharPosSpan();return e===null?y.Broken:e.wrap().serialize()}wrap(){return new I(this)}updateProvided(e,r){this._providedHbsLoc&&(this._providedHbsLoc[r]=e),this._charPosSpan=null,this._providedHbsLoc={start:e,end:e}}locDidUpdate({start:e,end:r}){e!==void 0&&(this.updateProvided(e,"start"),this.hbsPositions.start=new fe(this.source,e,null)),r!==void 0&&(this.updateProvided(r,"end"),this.hbsPositions.end=new fe(this.source,r,null))}asString(){let e=this.toCharPosSpan();return e===null?"":e.asString()}getModule(){return this.source.module}getStart(){return this.hbsPositions.start}getEnd(){return this.hbsPositions.end}toHbsLoc(){return{start:this.hbsPositions.start.hbsPos,end:this.hbsPositions.end.hbsPos}}toHbsSpan(){return this}toCharPosSpan(){let e=this._charPosSpan;if(e===null){let r=this.hbsPositions.start.toCharPos(),n=this.hbsPositions.end.toCharPos();if(r&&n)e=this._charPosSpan=new at(this.source,{start:r,end:n});else return e=this._charPosSpan=pe,null}return e===pe?null:e}},ee=class{constructor(e,r,n=null){this.kind=e,this.loc=r,this.string=n}serialize(){switch(this.kind){case y.Broken:case y.NonExistent:return this.kind;case y.InternalsSynthetic:return this.string||""}}wrap(){return new I(this)}asString(){return this.string||""}locDidUpdate({start:e,end:r}){e!==void 0&&(this.loc.start=e),r!==void 0&&(this.loc.end=r)}getModule(){return"an unknown module"}getStart(){return new lt(this.kind,this.loc.start)}getEnd(){return new lt(this.kind,this.loc.end)}toCharPosSpan(){return this}toHbsSpan(){return null}toHbsLoc(){return ue}},j=Rn(t=>t.when(y.HbsPosition,y.HbsPosition,(e,r)=>new ot(e.source,{start:e,end:r}).wrap()).when(y.CharPosition,y.CharPosition,(e,r)=>new at(e.source,{start:e,end:r}).wrap()).when(y.CharPosition,y.HbsPosition,(e,r)=>{let n=r.toCharPos();return n===null?new ee(y.Broken,ue).wrap():j(e,n)}).when(y.HbsPosition,y.CharPosition,(e,r)=>{let n=e.toCharPos();return n===null?new ee(y.Broken,ue).wrap():j(n,r)}).when(Tr,it,e=>new ee(e.kind,ue).wrap()).when(it,Tr,(e,r)=>new ee(r.kind,ue).wrap())),pe="BROKEN",qe=class t{static forHbsPos(e,r){return new fe(e,r,null).wrap()}static broken(e=he){return new lt(y.Broken,e).wrap()}constructor(e){this.data=e}get offset(){let e=this.data.toCharPos();return e===null?null:e.offset}eql(e){return bi(this.data,e.data)}until(e){return j(this.data,e.data)}move(e){let r=this.data.toCharPos();if(r===null)return t.broken();{let n=r.offset+e;return r.source.check(n)?new Te(r.source,n).wrap():t.broken()}}collapsed(){return j(this.data,this.data)}toJSON(){return this.data.toJSON()}},Te=class{kind=y.CharPosition;_locPos=null;constructor(e,r){this.source=e,this.charPos=r}toCharPos(){return this}toJSON(){let e=this.toHbsPos();return e===null?he:e.toJSON()}wrap(){return new qe(this)}get offset(){return this.charPos}toHbsPos(){let e=this._locPos;if(e===null){let r=this.source.hbsPosFor(this.charPos);r===null?this._locPos=e=pe:this._locPos=e=new fe(this.source,r,this.charPos)}return e===pe?null:e}},fe=class{kind=y.HbsPosition;_charPos;constructor(e,r,n=null){this.source=e,this.hbsPos=r,this._charPos=n===null?null:new Te(e,n)}toCharPos(){let e=this._charPos;if(e===null){let r=this.source.charPosFor(this.hbsPos);r===null?this._charPos=e=pe:this._charPos=e=new Te(this.source,r)}return e===pe?null:e}toJSON(){return this.hbsPos}wrap(){return new qe(this)}toHbsPos(){return this}},lt=class{constructor(e,r){this.kind=e,this.pos=r}toCharPos(){return null}toJSON(){return this.pos}wrap(){return new qe(this)}get offset(){return null}},bi=Rn(t=>t.when(y.HbsPosition,y.HbsPosition,({hbsPos:e},{hbsPos:r})=>e.column===r.column&&e.line===r.line).when(y.CharPosition,y.CharPosition,({charPos:e},{charPos:r})=>e===r).when(y.CharPosition,y.HbsPosition,({offset:e},r)=>{var n;return e===((n=r.toCharPos())==null?void 0:n.offset)}).when(y.HbsPosition,y.CharPosition,(e,{offset:r})=>{var n;return((n=e.toCharPos())==null?void 0:n.offset)===r}).when(it,it,()=>!1)),we=class t{static from(e,r={}){var n;return new t(e,(n=r.meta)==null?void 0:n.moduleName)}constructor(e,r="an unknown module"){this.source=e,this.module=r}check(e){return e>=0&&e<=this.source.length}slice(e,r){return this.source.slice(e,r)}offsetFor(e,r){return qe.forHbsPos(this,{line:e,column:r})}spanFor({start:e,end:r}){return I.forHbsLoc(this,{start:{line:e.line,column:e.column},end:{line:r.line,column:r.column}})}hbsPosFor(e){let r=0,n=0;if(e>this.source.length)return null;for(;;){let s=this.source.indexOf(` +`,n);if(e<=s||s===-1)return{line:r+1,column:e-n};r+=1,n=s+1}}charPosFor(e){let{line:r,column:n}=e,i=this.source.length,a=0,o=0;for(;oc)return c;if(!1){let h=this.hbsPosFor(o+n);P(h!==null,"the returned offset failed to round-trip"),P(h.line===r,"the round-tripped line didn't match the original line"),P(h.column===n,"the round-tripped column didn't match the original column")}return o+n}else{if(c===-1)return 0;a+=1,o=c+1}}return i}};function S(t,e){let{module:r,loc:n}=e,{line:s,column:i}=n.start,a=e.asString(),o=a?` | | ${a.split(` @@ -22,9 +22,9 @@ Expecting `+mt.join(", ")+", got '"+(this.terminals_[D]||D)+"'":jt="Parse error | `)} | -`:"",c=new Error(`${t}: ${l}(error occurred in '${r}' @ line ${s} : column ${i})`);return c.name="SyntaxError",c.location=e,c.code=a,c}var Ni={Program:["body"],Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],PartialStatement:["name","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],PathHead:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"],NamedBlock:["attributes","modifiers","children","comments"],SimpleElement:["attributes","modifiers","children","comments"],Component:["head","attributes","modifiers","children","comments"]},Rr=function(){t.prototype=Object.create(Error.prototype),t.prototype.constructor=t;function t(e,r,n,s){let i=Error.call(this,e);this.key=s,this.message=e,this.node=r,this.parent=n,i.stack&&(this.stack=i.stack)}return t}();function On(t,e,r){return new Rr("Cannot remove a node unless it is part of an array",t,e,r)}function vi(t,e,r){return new Rr("Cannot replace a node with multiple nodes unless it is part of an array",t,e,r)}function Bn(t,e){return new Rr("Replacing and removing in key handlers is not yet supported.",t,null,e)}var Fe=class{node;parent;parentKey;constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.node=e,this.parent=r,this.parentKey=n}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new Lr(this)}}},Lr=class{path;constructor(e){this.path=e}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function Vn(t){return typeof t=="function"?t:t.enter}function Un(t){if(typeof t!="function")return t.exit}function Ai(t,e){let r=typeof t!="function"?t.keys:void 0;if(r===void 0)return;let n=r[e];return n!==void 0?n:r.All}function Pi(t,e){if((e==="Template"||e==="Block")&&t.Program)return qt&&Nt(`The 'Program' visitor node is deprecated. Use 'Template' or 'Block' instead (node was '${e}') `),t.Program;let r=t[e];return r!==void 0?r:t.All}function Vt(t,e){let{node:r,parent:n,parentKey:s}=e,i=Pi(t,r.type),a,l;i!==void 0&&(a=Vn(i),l=Un(i));let c;if(a!==void 0&&(c=a(r,e)),c!=null)if(JSON.stringify(r)===JSON.stringify(c))c=void 0;else{if(Array.isArray(c))return Fn(t,c,n,s),c;{let h=new Fe(c,n,s);return Vt(t,h)||c}}if(c===void 0){let h=Ni[r.type];for(let g=0;g@[\\\]^`{|}~]/u;function Bi(t){let e=Ii(t);e&&(t.blockParams=e)}function Ii(t){let e=t.attributes.length,r=[];for(let s=0;s0&&ee(r[r.length-1]).charAt(0)==="|")throw S("Block parameters must be preceded by the `as` keyword, detected block parameters without `as`",t.loc);if(n!==-1&&e>n&&ee(r[n+1]).charAt(0)==="|"){let s=r.slice(n).join(" ");if(s.charAt(s.length-1)!=="|"||vt(s.match(/\|/gu),"block params must exist here").length!==2)throw S("Invalid block parameters syntax, '"+s+"'",t.loc);let i=[];for(let a=n+1;a1&&arguments[1]!==void 0?arguments[1]:{},{attrs:r,blockParams:n,modifiers:s,comments:i,children:a,loc:l}=e,c,h=!1;return typeof t=="object"?(h=t.selfClosing,c=t.name):t.slice(-1)==="/"?(c=t.slice(0,-1),h=!0):c=t,{type:"ElementNode",tag:c,selfClosing:h,attributes:r||[],blockParams:n||[],modifiers:s||[],comments:i||[],children:a||[],loc:k(l||null)}}function Wi(t,e,r){return{type:"AttrNode",name:t,value:e,loc:k(r||null)}}function Ki(t,e){return{type:"TextNode",chars:t||"",loc:k(e||null)}}function ji(t,e,r,n){return{type:"SubExpression",path:pt(t),params:e||[],hash:r||Me([]),loc:k(n||null)}}function Gn(t){switch(t.type){case"AtHead":return{original:t.name,parts:[t.name]};case"ThisHead":return{original:"this",parts:[]};case"VarHead":return{original:t.name,parts:[t.name]}}}function Rn(t,e){let[r,...n]=At(t.split(".")),s;return r==="this"?s={type:"ThisHead",loc:k(e||null)}:r[0]==="@"?s={type:"AtHead",name:r,loc:k(e||null)}:s={type:"VarHead",name:r,loc:k(e||null)},{head:s,tail:n}}function Yn(t){return{type:"ThisHead",loc:k(t||null)}}function zn(t,e){return T(t[0]==="@","call builders.at() with a string that starts with '@'"),{type:"AtHead",name:t,loc:k(e||null)}}function Wn(t,e){return T(t!=="this","You called builders.var() with 'this'. Call builders.this instead"),T(t[0]!=="@",`You called builders.var() with '${t}'. Call builders.at('${t}') instead`),{type:"VarHead",name:t,loc:k(e||null)}}function $i(t,e){return t[0]==="@"?zn(t,e):t==="this"?Yn(e):Wn(t,e)}function Qi(t,e){return{type:"NamedBlockName",name:t,loc:k(e||null)}}function Xi(t,e,r){let{original:n,parts:s}=Gn(t),i=[...s,...e],a=[...n,...i].join(".");return new Ae(a,t,e,k(r||null))}function pt(t,e){if(typeof t!="string"){if("type"in t)return t;{let{head:s,tail:i}=Rn(t.head,I.broken());T(i.length===0,"builder.path({ head, tail }) should not be called with a head with dots in it");let{original:a}=Gn(s);return new Ae([a,...i].join("."),s,i,k(e||null))}}let{head:r,tail:n}=Rn(t,I.broken());return new Ae(t,r,n,k(e||null))}function It(t,e,r){return{type:t,value:e,original:e,loc:k(r||null)}}function Me(t,e){return{type:"Hash",pairs:t||[],loc:k(e||null)}}function Ji(t,e,r){return{type:"HashPair",key:t,value:e,loc:k(r||null)}}function Zi(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:k(r||null)}}function ea(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3?arguments[3]:void 0;return{type:"Block",body:t||[],blockParams:e||[],chained:r,loc:k(n||null)}}function ta(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:k(r||null)}}function ra(t,e){return{line:t,column:e}}function k(){for(var t=arguments.length,e=new Array(t),r=0;r1&&arguments[1]!==void 0?arguments[1]:new yr(Ln),n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"precompile";this.source=e,this.lines=e.source.split(/\r\n?|\n/u),this.tokenizer=new Er(this,r,n)}offset(){let{line:e,column:r}=this.tokenizer;return this.source.offsetFor(e,r)}pos(e){let{line:r,column:n}=e;return this.source.offsetFor(r,n)}finish(e){return at({},e,{loc:e.loc.until(this.offset())})}get currentAttr(){return vt(this.currentAttribute,"expected attribute")}get currentTag(){let e=this.currentNode;return T(e&&(e.type==="StartTag"||e.type==="EndTag"),"expected tag"),e}get currentStartTag(){let e=this.currentNode;return T(e&&e.type==="StartTag","expected start tag"),e}get currentEndTag(){let e=this.currentNode;return T(e&&e.type==="EndTag","expected end tag"),e}get currentComment(){let e=this.currentNode;return T(e&&e.type==="CommentStatement","expected a comment"),e}get currentData(){let e=this.currentNode;return T(e&&e.type==="TextNode","expected a text node"),e}acceptTemplate(e){return this[e.type](e)}acceptNode(e){return this[e.type](e)}currentElement(){return Pt(At(this.elementStack))}sourceForNode(e,r){let n=e.loc.start.line-1,s=n-1,i=e.loc.start.column,a=[],l,c,h;for(r?(c=r.loc.end.line-1,h=r.loc.end.column):(c=e.loc.end.line-1,h=e.loc.end.column);sv.pair({key:n.key,value:this.acceptNode(n.value),loc:this.source.spanFor(n.loc)}));return v.hash(r,this.source.spanFor(e.loc))}StringLiteral(e){return v.literal({type:"StringLiteral",value:e.value,loc:e.loc})}BooleanLiteral(e){return v.literal({type:"BooleanLiteral",value:e.value,loc:e.loc})}NumberLiteral(e){return v.literal({type:"NumberLiteral",value:e.value,loc:e.loc})}UndefinedLiteral(e){return v.literal({type:"UndefinedLiteral",value:void 0,loc:e.loc})}NullLiteral(e){return v.literal({type:"NullLiteral",value:null,loc:e.loc})}};function aa(t,e){if(e==="")return{lines:t.split(` -`).length-1,columns:0};let[r]=t.split(e),n=r.split(/\n/u),s=n.length-1;return{lines:s,columns:ee(n[s]).length}}function oa(t,e){let r=e.loc.start.line,n=e.loc.start.column,s=aa(e.original,e.value);r=r+s.lines,s.lines?n=s.columns:n=n+s.columns,t.line=r,t.column=n}function Nr(t,e){if(e.path.type.endsWith("Literal")){let a=e.path,l="";throw a.type==="BooleanLiteral"?l=a.original.toString():a.type==="StringLiteral"?l=`"${a.original}"`:a.type==="NullLiteral"?l="null":a.type==="NumberLiteral"?l=a.value.toString():l="undefined",S(`${a.type} "${a.type==="StringLiteral"?a.original:l}" cannot be called as a sub-expression, replace (${l}) with ${l}`,t.source.spanFor(a.loc))}let r=e.path.type==="PathExpression"?t.PathExpression(e.path):t.SubExpression(e.path),n=e.params?e.params.map(a=>t.acceptNode(a)):[],s=ke(n)?Pt(n).loc:r.loc,i=e.hash?t.Hash(e.hash):{type:"Hash",pairs:[],loc:t.source.spanFor(s).collapse("end")};return{path:r,params:n,hash:i}}function vr(t,e){let{path:r,params:n,hash:s,loc:i}=e;if(Mn(r)){let l=`{{${Hi(r)}}}`,c=`<${t.name} ... ${l} ...`;throw S(`In ${c}, ${l} is not a valid modifier`,e.loc)}let a=v.elementModifier({path:r,params:n,hash:s,loc:i});t.modifiers.push(a)}var Br=class extends Or{tagOpenLine=0;tagOpenColumn=0;reset(){this.currentNode=null}beginComment(){this.currentNode=v.comment("",this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn))}appendToCommentData(e){this.currentComment.value+=e}finishComment(){Ve(this.currentElement(),this.finish(this.currentComment))}beginData(){this.currentNode=v.text({chars:"",loc:this.offset().collapsed()})}appendToData(e){this.currentData.chars+=e}finishData(){this.currentData.loc=this.currentData.loc.withEnd(this.offset()),Ve(this.currentElement(),this.currentData)}tagOpen(){this.tagOpenLine=this.tokenizer.line,this.tagOpenColumn=this.tokenizer.column}beginStartTag(){this.currentNode={type:"StartTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}beginEndTag(){this.currentNode={type:"EndTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}finishTag(){let e=this.finish(this.currentTag);if(e.type==="StartTag"){if(this.finishStartTag(),e.name===":")throw S("Invalid named block named detected, you may have created a named block without a name, or you may have began your name with a number. Named blocks must have names that are at least one character long, and begin with a lower case letter",this.source.spanFor({start:this.currentTag.loc.toJSON(),end:this.offset().toJSON()}));(Dn.has(e.name)||e.selfClosing)&&this.finishEndTag(!0)}else e.type==="EndTag"&&this.finishEndTag(!1)}finishStartTag(){let{name:e,attributes:r,modifiers:n,comments:s,selfClosing:i,loc:a}=this.finish(this.currentStartTag),l=v.element({tag:e,selfClosing:i,attrs:r,modifiers:n,comments:s,children:[],blockParams:[],loc:a});this.elementStack.push(l)}finishEndTag(e){let r=this.finish(this.currentTag),n=this.elementStack.pop();this.validateEndTag(r,n,e);let s=this.currentElement();n.loc=n.loc.withEnd(this.offset()),Bi(n),Ve(s,n)}markTagAsSelfClosing(){this.currentTag.selfClosing=!0}appendToTagName(e){this.currentTag.name+=e}beginAttribute(){let e=this.offset();this.currentAttribute={name:"",parts:[],currentPart:null,isQuoted:!1,isDynamic:!1,start:e,valueSpan:e.collapsed()}}appendToAttributeName(e){this.currentAttr.name+=e}beginAttributeValue(e){this.currentAttr.isQuoted=e,this.startTextPart(),this.currentAttr.valueSpan=this.offset().collapsed()}appendToAttributeValue(e){let r=this.currentAttr.parts,n=r[r.length-1],s=this.currentAttr.currentPart;if(s)s.chars+=e,s.loc=s.loc.withEnd(this.offset());else{let i=this.offset();e===` -`?i=n?n.loc.getEnd():this.currentAttr.valueSpan.getStart():i=i.move(-1),this.currentAttr.currentPart=v.text({chars:e,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let e=this.currentTag,r=this.offset();if(e.type==="EndTag")throw S("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:e.loc.toJSON(),end:r.toJSON()}));let{name:n,parts:s,start:i,isQuoted:a,isDynamic:l,valueSpan:c}=this.currentAttr,h=this.assembleAttributeValue(s,a,l,i.until(r));h.loc=c.withEnd(r);let g=v.attr({name:n,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(g)}reportSyntaxError(e){throw S(e,this.offset().collapsed())}assembleConcatenatedValue(e){for(let s of e)if(s.type!=="MustacheStatement"&&s.type!=="TextNode")throw S(`Unsupported node in quoted attribute value: ${s.type}`,s.loc);it(e,"the concatenation parts of an element should not be empty");let r=Ct(e),n=Pt(e);return v.concat(e,this.source.spanFor(r.loc).extend(this.source.spanFor(n.loc)))}validateEndTag(e,r,n){if(Dn.has(e.name)&&!n)throw S(`<${e.name}> elements do not need end tags. You should remove it`,e.loc);if(r.tag===void 0)throw S(`Closing tag without an open tag`,e.loc);if(r.tag!==e.name)throw S(`Closing tag did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,e.loc)}assembleAttributeValue(e,r,n,s){if(n){if(r)return this.assembleConcatenatedValue(e);{it(e);let[i,a]=e;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw S("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",s)}}else return ke(e)?e[0]:v.text({chars:"",loc:s})}},la={},Ir=class extends yr{constructor(){super({})}parse(){}};function Kn(t){var c,h;let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.mode||"precompile",n,s;typeof t=="string"?(n=new Ne(t,(c=e.meta)==null?void 0:c.moduleName),r==="codemod"?s=Ot(t,e.parseOptions):s=br(t,e.parseOptions)):t instanceof Ne?(n=t,r==="codemod"?s=Ot(t.source,e.parseOptions):s=br(t.source,e.parseOptions)):(n=new Ne("",(h=e.meta)==null?void 0:h.moduleName),s=t);let i;r==="codemod"&&(i=new Ir);let a=I.forCharPositions(n,0,n.source.length);s.loc={source:"(program)",start:a.startPosition,end:a.endPosition};let l=new Br(n,i,r).acceptTemplate(s);if(e.strictMode&&(l.blockParams=e.locals??[]),e&&e.plugins&&e.plugins.ast)for(let g of e.plugins.ast){let E=at({},e,{syntax:la},{plugins:void 0}),M=g(E);Di(l,M.visitor)}return l}var Hr=function(t){return t.Helper="Helper",t.Modifier="Modifier",t.Component="Component",t}({}),sl=Hr.Helper,il=Hr.Modifier,al=Hr.Component;var Ut=` -`,jn="\r",$n=function(){function t(e){this.length=e.length;for(var r=[0],n=0;nthis.length)return null;for(var r=0,n=this.offsets;n[r+1]<=e;)r++;var s=e-n[r];return{line:r,column:s}},t.prototype.indexForLocation=function(e){var r=e.line,n=e.column;return r<0||r>=this.offsets.length||n<0||n>this.lengthOfLine(r)?null:this.offsets[r]+n},t.prototype.lengthOfLine=function(e){var r=this.offsets[e],n=e===this.offsets.length-1?this.length:this.offsets[e+1];return n-r},t}();function ca(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var Qn=ca;function ua(t){let e=t.children??t.body;if(e)for(let r=0;re.indexForLocation({line:s-1,column:i}),n=s=>{let{start:i,end:a}=s.loc;i.offset=r(i),a.offset=r(a)};return()=>({name:"prettierParsePlugin",visitor:{All(s){n(s),ua(s)}}})}function pa(t){let e;try{e=Kn(t,{mode:"codemod",plugins:{ast:[ha(t)]}})}catch(r){let n=da(r);if(n){let s=fa(r);throw Qn(s,{loc:n,cause:r})}throw r}return e}function fa(t){let{message:e}=t,r=e.split(` -`);return r.length>=4&&/^Parse error on line \d+:$/.test(r[0])&&/^-*\^$/.test(le(!1,r,-2))?le(!1,r,-1):r.length>=4&&/:\s?$/.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/.test(le(!1,r,-1))&&r[1]===""&&le(!1,r,-2)===""&&r.slice(2,-2).every(n=>n.startsWith("|"))?r[0].trim().slice(0,-1):e}function da(t){let{location:e,hash:r}=t;if(e){let{start:n,end:s}=e;return typeof s.line!="number"?{start:n}:e}if(r){let{loc:{last_line:n,last_column:s}}=r;return{start:{line:n,column:s+1}}}}var ma={parse:pa,astFormat:"glimmer",locStart:Se,locEnd:et};var Xn=[{linguistLanguageId:155,name:"Handlebars",type:"markup",color:"#f7931e",aliases:["hbs","htmlbars"],extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aceMode:"handlebars",parsers:["glimmer"],vscodeLanguageIds:["handlebars"]}];var ga={glimmer:Sn};var kl=Vr;export{kl as default,Xn as languages,qr as parsers,ga as printers}; +`:"",c=new Error(`${t}: ${o}(error occurred in '${r}' @ line ${s} : column ${i})`);return c.name="SyntaxError",c.location=e,c.code=a,c}var yi={Program:["body"],Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],PartialStatement:["name","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],ElementStartNode:[],ElementPartNode:[],ElementEndNode:[],ElementNameNode:[],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],PathHead:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"],BlockParam:[],NamedBlock:["attributes","modifiers","children","comments"],SimpleElement:["attributes","modifiers","children","comments"],Component:["head","attributes","modifiers","children","comments"]},Or=function(){t.prototype=Object.create(Error.prototype),t.prototype.constructor=t;function t(e,r,n,s){let i=Error.call(this,e);this.key=s,this.message=e,this.node=r,this.parent=n,i.stack&&(this.stack=i.stack)}return t}();function _n(t,e,r){return new Or("Cannot remove a node unless it is part of an array",t,e,r)}function Ei(t,e,r){return new Or("Cannot replace a node with multiple nodes unless it is part of an array",t,e,r)}function Dn(t,e){return new Or("Replacing and removing in key handlers is not yet supported.",t,null,e)}var Ve=class{node;parent;parentKey;constructor(e,r=null,n=null){this.node=e,this.parent=r,this.parentKey=n}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new Pr(this)}}},Pr=class{path;constructor(e){this.path=e}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function Hn(t){return typeof t=="function"?t:t.enter}function qn(t){if(typeof t!="function")return t.exit}function Si(t,e){let r=typeof t!="function"?t.keys:void 0;if(r===void 0)return;let n=r[e];return n!==void 0?n:r.All}function ki(t,e){if((e==="Template"||e==="Block")&&t.Program)return t.Program;let r=t[e];return r!==void 0?r:t.All}function Bt(t,e){let{node:r,parent:n,parentKey:s}=e,i=ki(t,r.type),a,o;i!==void 0&&(a=Hn(i),o=qn(i));let c;if(a!==void 0&&(c=a(r,e)),c!=null)if(JSON.stringify(r)===JSON.stringify(c))c=void 0;else{if(Array.isArray(c))return Vn(t,c,n,s),c;{let h=new Ve(c,n,s);return Bt(t,h)||c}}if(c===void 0){let h=yi[r.type];for(let g=0;g@[\\\]^`{|}~]/u;function xi(t){let e=_i(t);e&&(t.blockParamNodes=e,t.blockParams=e.map(r=>r.value))}function Ci(t,e){let r=[e.loc.getStart().offset,e.loc.getEnd().offset],n=t.slice(...r),s=r[0],i=n.indexOf("|")+1;s+=i,n=n.slice(i,-1),i=n.indexOf("|"),n=n.slice(0,i);for(let a of e.program.blockParamNodes){let c=new RegExp(`\\b${a.value}\\b`).exec(n),h=[s+c.index,0];h[1]=h[0]+a.value.length,a.loc=t.spanFor({start:t.hbsPosFor(h[0]),end:t.hbsPosFor(h[1])})}}function Li(t,e){let r=[e.loc.getStart().offset,e.loc.getEnd().offset],n=r[0],s=t.slice(...r);for(let i of e.parts){let a=s.indexOf(i.value),o=[n+a,0];o[1]=o[0]+i.value.length,s=t.slice(o[1],r[1]),n=o[1],i.loc=t.spanFor({start:t.hbsPosFor(o[0]),end:t.hbsPosFor(o[1])})}}function _i(t){let e=t.attributes.length,r=[];for(let s=0;s0&&Z(r[r.length-1]).charAt(0)==="|")throw S("Block parameters must be preceded by the `as` keyword, detected block parameters without `as`",t.loc);if(n!==-1&&e>n&&Z(r[n+1]).charAt(0)==="|"){let s=r.slice(n).join(" ");if(s.charAt(s.length-1)!=="|"||ar(s.match(/\|/gu),"block params must exist here").length!==2)throw S("Invalid block parameters syntax, '"+s+"'",t.loc);let i=[];for(let a=n+1;ao.length&&(c=c.slice({skipEnd:c.endPosition.column-c.startPosition.column-o.length})),i.push({type:"BlockParam",value:o,loc:c})}}if(i.length===0)throw S("Cannot use zero block parameters",t.loc);return t.attributes=t.attributes.slice(0,n),i}return null}function Di(t){switch(t.type){case"Block":case"Template":return t.body;case"ElementNode":return t.children}}function He(t,e){Di(t).push(e)}function Fn(t){return t.type==="StringLiteral"||t.type==="BooleanLiteral"||t.type==="NumberLiteral"||t.type==="NullLiteral"||t.type==="UndefinedLiteral"}function Oi(t){return t.type==="UndefinedLiteral"?"undefined":JSON.stringify(t.value)}var yr;function Er(){return yr||(yr=new we("","(synthetic)")),yr}function Bi(t,e,r,n,s,i){return typeof t=="string"&&(t=ct(t)),{type:"MustacheStatement",path:t,params:e||[],hash:r||Fe([]),escaped:!n,trusting:!!n,loc:k(s||null),strip:i||{open:!1,close:!1}}}function Ii(t,e,r,n,s,i,a,o,c){let h,g;return n.type==="Template"?h=nt({},n,{type:"Block"}):h=n,s!=null&&s.type==="Template"?g=nt({},s,{type:"Block"}):g=s,{type:"BlockStatement",path:ct(t),params:e||[],hash:r||Fe([]),program:h||null,inverse:g||null,loc:k(i||null),openStrip:a||{open:!1,close:!1},inverseStrip:o||{open:!1,close:!1},closeStrip:c||{open:!1,close:!1}}}function Ri(t,e,r,n){return{type:"ElementModifierStatement",path:ct(t),params:e||[],hash:r||Fe([]),loc:k(n||null)}}function Hi(t,e,r,n,s){return{type:"PartialStatement",name:t,params:e||[],hash:r||Fe([]),indent:n||"",strip:{open:!1,close:!1},loc:k(s||null)}}function qi(t,e){return{type:"CommentStatement",value:t,loc:k(e||null)}}function Vi(t,e){return{type:"MustacheCommentStatement",value:t,loc:k(e||null)}}function Fi(t,e){if(!Se(t))throw new Error("b.concat requires at least one part");return{type:"ConcatStatement",parts:t||[],loc:k(e||null)}}function Ui(t,e={}){let{attrs:r,blockParams:n,modifiers:s,comments:i,children:a,loc:o}=e,c,h=!1;return typeof t=="object"?(h=t.selfClosing,c=t.name):t.slice(-1)==="/"?(c=t.slice(0,-1),h=!0):c=t,{type:"ElementNode",tag:c,nameNode:{type:"ElementNameNode",value:t},startTag:{type:"ElementStartNode",value:t},endTag:{type:"ElementEndNode",value:h?"":t},parts:c.split(".").map(g=>({type:"ElementPartNode",value:g})),selfClosing:h,attributes:r||[],blockParams:n||[],blockParamNodes:(n==null?void 0:n.map(g=>({type:"BlockParam",value:g})))||[],modifiers:s||[],comments:i||[],children:a||[],loc:k(o||null)}}function Mi(t,e,r){return{type:"AttrNode",name:t,value:e,loc:k(r||null)}}function Gi(t,e){return{type:"TextNode",chars:t||"",loc:k(e||null)}}function Yi(t,e,r,n){return{type:"SubExpression",path:ct(t),params:e||[],hash:r||Fe([]),loc:k(n||null)}}function Un(t){switch(t.type){case"AtHead":return{original:t.name,parts:[t.name]};case"ThisHead":return{original:"this",parts:[]};case"VarHead":return{original:t.name,parts:[t.name]}}}function Bn(t,e){let[r,...n]=wt(t.split(".")),s;return r==="this"?s={type:"ThisHead",loc:k(e||null)}:r[0]==="@"?s={type:"AtHead",name:r,loc:k(e||null)}:s={type:"VarHead",name:r,loc:k(e||null)},{head:s,tail:n}}function Mn(t){return{type:"ThisHead",loc:k(t||null)}}function Gn(t,e){return P(t[0]==="@","call builders.at() with a string that starts with '@'"),{type:"AtHead",name:t,loc:k(e||null)}}function Yn(t,e){return P(t!=="this","You called builders.var() with 'this'. Call builders.this instead"),P(t[0]!=="@",`You called builders.var() with '${t}'. Call builders.at('${t}') instead`),{type:"VarHead",name:t,loc:k(e||null)}}function zi(t,e){return t[0]==="@"?Gn(t,e):t==="this"?Mn(e):Yn(t,e)}function Wi(t,e){return{type:"NamedBlockName",name:t,loc:k(e||null)}}function Ki(t,e,r){let{original:n,parts:s}=Un(t),i=[...s,...e],a=[...n,...i].join(".");return new Ne(a,t,e,k(r||null))}function ct(t,e){if(typeof t!="string"){if("type"in t)return t;{let{head:s,tail:i}=Bn(t.head,I.broken());P(i.length===0,"builder.path({ head, tail }) should not be called with a head with dots in it");let{original:a}=Un(s);return new Ne([a,...i].join("."),s,i,k(e||null))}}let{head:r,tail:n}=Bn(t,I.broken());return new Ne(t,r,n,k(e||null))}function _t(t,e,r){return{type:t,value:e,original:e,loc:k(r||null)}}function Fe(t,e){return{type:"Hash",pairs:t||[],loc:k(e||null)}}function ji(t,e,r){return{type:"HashPair",key:t,value:e,loc:k(r||null)}}function $i(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:k(r||null)}}function Qi(t,e,r=!1,n){return{type:"Block",body:t||[],blockParams:e||[],blockParamNodes:(e==null?void 0:e.map(s=>({type:"BlockParam",value:s})))||[],chained:r,loc:k(n||null)}}function Xi(t,e,r){return{type:"Template",body:t||[],blockParams:e||[],loc:k(r||null)}}function Ji(t,e){return{line:t,column:e}}function k(...t){if(t.length===1){let e=t[0];return e&&typeof e=="object"?I.forHbsLoc(Er(),e):I.forHbsLoc(Er(),mi)}else{let[e,r,n,s,i]=t,a=i?new we("",i):Er();return I.forHbsLoc(a,{start:{line:e,column:r},end:{line:n,column:s}})}}var Zi={mustache:Bi,block:Ii,partial:Hi,comment:qi,mustacheComment:Vi,element:Ui,elementModifier:Ri,attr:Mi,text:Gi,sexpr:Yi,concat:Fi,hash:Fe,pair:ji,literal:_t,program:$i,blockItself:Qi,template:Xi,loc:k,pos:Ji,path:ct,fullPath:Ki,head:zi,at:Gn,var:Yn,this:Mn,blockName:Wi,string:Sr("StringLiteral"),boolean:Sr("BooleanLiteral"),number:Sr("NumberLiteral"),undefined(){return _t("UndefinedLiteral",void 0)},null(){return _t("NullLiteral",null)}};function Sr(t){return function(e,r){return _t(t,e,r)}}var Ne=class{type="PathExpression";parts;this=!1;data=!1;constructor(e,r,n,s){this.original=e,this.loc=s;let i=n.slice();r.type==="ThisHead"?this.this=!0:r.type==="AtHead"?(this.data=!0,i.unshift(r.name.slice(1))):i.unshift(r.name),this.parts=i}_head=void 0;get head(){if(this._head)return this._head;let e;this.this?e="this":this.data?e=`@${Nt(wt(this.parts))}`:(rt(this.parts),e=Nt(this.parts));let r=this.loc.collapse("start").sliceStartChars({chars:e.length}).loc;return this._head=Zi.head(e,r)}get tail(){return this.this?this.parts:this.parts.slice(1)}},Lt={close:!1,open:!1},xr=class{pos(e,r){return{line:e,column:r}}blockItself({body:e=[],blockParams:r=[],chained:n=!1,loc:s}){return{type:"Block",body:e,blockParams:r,blockParamNodes:r==null?void 0:r.map(i=>({type:"BlockParam",value:i})),chained:n,loc:s}}template({body:e,blockParams:r,loc:n}){return{type:"Template",body:e||[],blockParams:r||[],loc:n}}mustache({path:e,params:r,hash:n,trusting:s,loc:i,strip:a=Lt}){return{type:"MustacheStatement",path:e,params:r,hash:n,escaped:!s,trusting:s,loc:i,strip:a||{open:!1,close:!1}}}block({path:e,params:r,hash:n,defaultBlock:s,elseBlock:i=null,loc:a,openStrip:o=Lt,inverseStrip:c=Lt,closeStrip:h=Lt}){return{type:"BlockStatement",path:e,params:r,hash:n,program:s,inverse:i,loc:a,openStrip:o,inverseStrip:c,closeStrip:h}}comment(e,r){return{type:"CommentStatement",value:e,loc:r}}mustacheComment(e,r){return{type:"MustacheCommentStatement",value:e,loc:r}}concat(e,r){return{type:"ConcatStatement",parts:e,loc:r}}element({tag:e,selfClosing:r,attrs:n,blockParams:s,modifiers:i,comments:a,children:o,loc:c}){return{type:"ElementNode",tag:e,nameNode:{type:"ElementNameNode",value:e},startTag:{type:"ElementStartNode",value:e},endTag:{type:"ElementEndNode",value:r?"":e},parts:e.split(".").map(h=>({type:"ElementPartNode",value:h})),selfClosing:r,attributes:n||[],blockParams:s,blockParamNodes:s.map(h=>({type:"BlockParam",value:h}))||[],modifiers:i||[],comments:a||[],children:o||[],loc:c}}elementModifier({path:e,params:r,hash:n,loc:s}){return{type:"ElementModifierStatement",path:e,params:r,hash:n,loc:s}}attr({name:e,value:r,loc:n}){return{type:"AttrNode",name:e,value:r,loc:n}}text({chars:e,loc:r}){return{type:"TextNode",chars:e,loc:r}}sexpr({path:e,params:r,hash:n,loc:s}){return{type:"SubExpression",path:e,params:r,hash:n,loc:s}}path({head:e,tail:r,loc:n}){let{original:s}=ea(e),i=[...s,...r].join(".");return new Ne(i,e,r,n)}head(e,r){return e[0]==="@"?this.atName(e,r):e==="this"?this.this(r):this.var(e,r)}this(e){return{type:"ThisHead",loc:e}}atName(e,r){return P(e[0]==="@","call builders.at() with a string that starts with '@'"),{type:"AtHead",name:e,loc:r}}var(e,r){return P(e!=="this","You called builders.var() with 'this'. Call builders.this instead"),P(e[0]!=="@",`You called builders.var() with '${e}'. Call builders.at('${e}') instead`),{type:"VarHead",name:e,loc:r}}hash(e,r){return{type:"Hash",pairs:e||[],loc:r}}pair({key:e,value:r,loc:n}){return{type:"HashPair",key:e,value:r,loc:n}}literal({type:e,value:r,loc:n}){return{type:e,value:r,original:r,loc:n}}undefined(){return this.literal({type:"UndefinedLiteral",value:void 0})}null(){return this.literal({type:"NullLiteral",value:null})}string(e,r){return this.literal({type:"StringLiteral",value:e,loc:r})}boolean(e,r){return this.literal({type:"BooleanLiteral",value:e,loc:r})}number(e,r){return this.literal({type:"NumberLiteral",value:e,loc:r})}};function ea(t){switch(t.type){case"AtHead":return{original:t.name,parts:[t.name]};case"ThisHead":return{original:"this",parts:[]};case"VarHead":return{original:t.name,parts:[t.name]}}}var N=new xr,Cr=class{elementStack=[];lines;source;currentAttribute=null;currentNode=null;tokenizer;constructor(e,r=new mr(xn),n="precompile"){this.source=e,this.lines=e.source.split(/\r\n?|\n/u),this.tokenizer=new gr(this,r,n)}offset(){let{line:e,column:r}=this.tokenizer;return this.source.offsetFor(e,r)}pos({line:e,column:r}){return this.source.offsetFor(e,r)}finish(e){return nt({},e,{loc:e.loc.until(this.offset())})}get currentAttr(){return ar(this.currentAttribute,"expected attribute")}get currentTag(){let e=this.currentNode;return P(e&&(e.type==="StartTag"||e.type==="EndTag"),"expected tag"),e}get currentStartTag(){let e=this.currentNode;return P(e&&e.type==="StartTag","expected start tag"),e}get currentEndTag(){let e=this.currentNode;return P(e&&e.type==="EndTag","expected end tag"),e}get currentComment(){let e=this.currentNode;return P(e&&e.type==="CommentStatement","expected a comment"),e}get currentData(){let e=this.currentNode;return P(e&&e.type==="TextNode","expected a text node"),e}acceptTemplate(e){return this[e.type](e)}acceptNode(e){return this[e.type](e)}currentElement(){return Tt(wt(this.elementStack))}sourceForNode(e,r){let n=e.loc.start.line-1,s=n-1,i=e.loc.start.column,a=[],o,c,h;for(r?(c=r.loc.end.line-1,h=r.loc.end.column):(c=e.loc.end.line-1,h=e.loc.end.column);sN.pair({key:n.key,value:this.acceptNode(n.value),loc:this.source.spanFor(n.loc)}));return N.hash(r,this.source.spanFor(e.loc))}StringLiteral(e){return N.literal({type:"StringLiteral",value:e.value,loc:e.loc})}BooleanLiteral(e){return N.literal({type:"BooleanLiteral",value:e.value,loc:e.loc})}NumberLiteral(e){return N.literal({type:"NumberLiteral",value:e.value,loc:e.loc})}UndefinedLiteral(e){return N.literal({type:"UndefinedLiteral",value:void 0,loc:e.loc})}NullLiteral(e){return N.literal({type:"NullLiteral",value:null,loc:e.loc})}};function ra(t,e){if(e==="")return{lines:t.split(` +`).length-1,columns:0};let[r]=t.split(e),n=r.split(/\n/u),s=n.length-1;return{lines:s,columns:Z(n[s]).length}}function na(t,e){let r=e.loc.start.line,n=e.loc.start.column,s=ra(e.original,e.value);r=r+s.lines,s.lines?n=s.columns:n=n+s.columns,t.line=r,t.column=n}function kr(t,e){if(e.path.type.endsWith("Literal")){let a=e.path,o="";throw a.type==="BooleanLiteral"?o=a.original.toString():a.type==="StringLiteral"?o=`"${a.original}"`:a.type==="NullLiteral"?o="null":a.type==="NumberLiteral"?o=a.value.toString():o="undefined",S(`${a.type} "${a.type==="StringLiteral"?a.original:o}" cannot be called as a sub-expression, replace (${o}) with ${o}`,t.source.spanFor(a.loc))}let r=e.path.type==="PathExpression"?t.PathExpression(e.path):t.SubExpression(e.path),n=e.params?e.params.map(a=>t.acceptNode(a)):[],s=Se(n)?Tt(n).loc:r.loc,i=e.hash?t.Hash(e.hash):{type:"Hash",pairs:[],loc:t.source.spanFor(s).collapse("end")};return{path:r,params:n,hash:i}}function wr(t,e){let{path:r,params:n,hash:s,loc:i}=e;if(Fn(r)){let o=`{{${Oi(r)}}}`,c=`<${t.name} ... ${o} ...`;throw S(`In ${c}, ${o} is not a valid modifier`,e.loc)}let a=N.elementModifier({path:r,params:n,hash:s,loc:i});t.modifiers.push(a)}var _r=class extends Lr{tagOpenLine=0;tagOpenColumn=0;reset(){this.currentNode=null}beginComment(){this.currentNode=N.comment("",this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn))}appendToCommentData(e){this.currentComment.value+=e}finishComment(){He(this.currentElement(),this.finish(this.currentComment))}beginData(){this.currentNode=N.text({chars:"",loc:this.offset().collapsed()})}appendToData(e){this.currentData.chars+=e}finishData(){this.currentData.loc=this.currentData.loc.withEnd(this.offset()),He(this.currentElement(),this.currentData)}tagOpen(){this.tagOpenLine=this.tokenizer.line,this.tagOpenColumn=this.tokenizer.column}beginStartTag(){this.currentNode={type:"StartTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}beginEndTag(){this.currentNode={type:"EndTag",name:"",attributes:[],modifiers:[],comments:[],selfClosing:!1,loc:this.source.offsetFor(this.tagOpenLine,this.tagOpenColumn)}}finishTag(){let e=this.finish(this.currentTag);if(e.type==="StartTag"){if(this.finishStartTag(),e.name===":")throw S("Invalid named block named detected, you may have created a named block without a name, or you may have began your name with a number. Named blocks must have names that are at least one character long, and begin with a lower case letter",this.source.spanFor({start:this.currentTag.loc.toJSON(),end:this.offset().toJSON()}));(Ln.has(e.name)||e.selfClosing)&&this.finishEndTag(!0)}else e.type==="EndTag"&&this.finishEndTag(!1)}finishStartTag(){let{name:e,attributes:r,modifiers:n,comments:s,selfClosing:i,loc:a}=this.finish(this.currentStartTag),o=N.element({tag:e,selfClosing:i,attrs:r,modifiers:n,comments:s,children:[],blockParams:[],loc:a});o.startTag={type:"ElementStartNode",value:e,loc:a},o.nameNode={type:"ElementNameNode",value:e,loc:a.withStart(this.source.offsetFor(a.startPosition.line,a.startPosition.column+1)).withEnd(this.source.offsetFor(a.startPosition.line,a.startPosition.column+1+e.length))},Li(this.source,o),this.elementStack.push(o)}finishEndTag(e){let r=this.finish(this.currentTag),n=this.elementStack.pop();n.endTag={type:"ElementEndNode",loc:r.loc,value:n.selfClosing?"":r.name},this.validateEndTag(r,n,e);let s=this.currentElement();n.loc=n.loc.withEnd(this.offset()),xi(n),He(s,n)}markTagAsSelfClosing(){this.currentTag.selfClosing=!0}appendToTagName(e){this.currentTag.name+=e}beginAttribute(){let e=this.offset();this.currentAttribute={name:"",parts:[],currentPart:null,isQuoted:!1,isDynamic:!1,start:e,valueSpan:e.collapsed()}}appendToAttributeName(e){this.currentAttr.name+=e}beginAttributeValue(e){this.currentAttr.isQuoted=e,this.startTextPart(),this.currentAttr.valueSpan=this.offset().collapsed()}appendToAttributeValue(e){let r=this.currentAttr.parts,n=r[r.length-1],s=this.currentAttr.currentPart;if(s)s.chars+=e,s.loc=s.loc.withEnd(this.offset());else{let i=this.offset();e===` +`?i=n?n.loc.getEnd():this.currentAttr.valueSpan.getStart():i=i.move(-1),this.currentAttr.currentPart=N.text({chars:e,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let e=this.currentTag,r=this.offset();if(e.type==="EndTag")throw S("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:e.loc.toJSON(),end:r.toJSON()}));let{name:n,parts:s,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr,h=this.assembleAttributeValue(s,a,o,i.until(r));h.loc=c.withEnd(r);let g=N.attr({name:n,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(g)}reportSyntaxError(e){throw S(e,this.offset().collapsed())}assembleConcatenatedValue(e){for(let s of e)if(s.type!=="MustacheStatement"&&s.type!=="TextNode")throw S(`Unsupported node in quoted attribute value: ${s.type}`,s.loc);rt(e,"the concatenation parts of an element should not be empty");let r=Nt(e),n=Tt(e);return N.concat(e,this.source.spanFor(r.loc).extend(this.source.spanFor(n.loc)))}validateEndTag(e,r,n){if(Ln.has(e.name)&&!n)throw S(`<${e.name}> elements do not need end tags. You should remove it`,e.loc);if(r.tag===void 0)throw S(`Closing tag without an open tag`,e.loc);if(r.tag!==e.name)throw S(`Closing tag did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,e.loc)}assembleAttributeValue(e,r,n,s){if(n){if(r)return this.assembleConcatenatedValue(e);{rt(e);let[i,a]=e;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw S("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",s)}}else return Se(e)?e[0]:N.text({chars:"",loc:s})}},sa={},Dr=class extends mr{constructor(){super({})}parse(){}};function zn(t,e={}){var c,h;let r=e.mode||"precompile",n,s;typeof t=="string"?(n=new we(t,(c=e.meta)==null?void 0:c.moduleName),r==="codemod"?s=Ct(t,e.parseOptions):s=dr(t,e.parseOptions)):t instanceof we?(n=t,r==="codemod"?s=Ct(t.source,e.parseOptions):s=dr(t.source,e.parseOptions)):(n=new we("",(h=e.meta)==null?void 0:h.moduleName),s=t);let i;r==="codemod"&&(i=new Dr);let a=I.forCharPositions(n,0,n.source.length);s.loc={source:"(program)",start:a.startPosition,end:a.endPosition};let o=new _r(n,i,r).acceptTemplate(s);if(e.strictMode&&(o.blockParams=e.locals??[]),e&&e.plugins&&e.plugins.ast)for(let g of e.plugins.ast){let E=nt({},e,{syntax:sa},{plugins:void 0}),M=g(E);Ai(o,M.visitor)}return o}var Br=function(t){return t.Helper="Helper",t.Modifier="Modifier",t.Component="Component",t}({}),tl=Br.Helper,rl=Br.Modifier,nl=Br.Component;var It=` +`,Wn="\r",Kn=function(){function t(e){this.length=e.length;for(var r=[0],n=0;nthis.length)return null;for(var r=0,n=this.offsets;n[r+1]<=e;)r++;var s=e-n[r];return{line:r,column:s}},t.prototype.indexForLocation=function(e){var r=e.line,n=e.column;return r<0||r>=this.offsets.length||n<0||n>this.lengthOfLine(r)?null:this.offsets[r]+n},t.prototype.lengthOfLine=function(e){var r=this.offsets[e],n=e===this.offsets.length-1?this.length:this.offsets[e+1];return n-r},t}();function ia(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var jn=ia;function aa(t){let e=t.children??t.body;if(e)for(let r=0;re.indexForLocation({line:s-1,column:i}),n=s=>{let{start:i,end:a}=s.loc;i.offset=r(i),a.offset=r(a)};return()=>({name:"prettierParsePlugin",visitor:{All(s){n(s),aa(s)}}})}function la(t){let e;try{e=zn(t,{mode:"codemod",plugins:{ast:[oa(t)]}})}catch(r){let n=ua(r);if(n){let s=ca(r);throw jn(s,{loc:n,cause:r})}throw r}return e}function ca(t){let{message:e}=t,r=e.split(` +`);return r.length>=4&&/^Parse error on line \d+:$/.test(r[0])&&/^-*\^$/.test(oe(!1,r,-2))?oe(!1,r,-1):r.length>=4&&/:\s?$/.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/.test(oe(!1,r,-1))&&r[1]===""&&oe(!1,r,-2)===""&&r.slice(2,-2).every(n=>n.startsWith("|"))?r[0].trim().slice(0,-1):e}function ua(t){let{location:e,hash:r}=t;if(e){let{start:n,end:s}=e;return typeof s.line!="number"?{start:n}:e}if(r){let{loc:{last_line:n,last_column:s}}=r;return{start:{line:n,column:s+1}}}}var ha={parse:la,astFormat:"glimmer",locStart:Ee,locEnd:et};var pa={glimmer:bn};var bl=Rr;export{bl as default,yn as languages,Ir as parsers,pa as printers}; diff --git a/node_modules/prettier/plugins/graphql.js b/node_modules/prettier/plugins/graphql.js index fcc1757..97655fb 100644 --- a/node_modules/prettier/plugins/graphql.js +++ b/node_modules/prettier/plugins/graphql.js @@ -1,21 +1,21 @@ -(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var re=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var it=Object.prototype.hasOwnProperty;var Ne=(e,t)=>{for(var n in t)re(e,n,{get:t[n],enumerable:!0})},rt=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nt(t))!it.call(e,i)&&i!==n&&re(e,i,{get:()=>t[i],enumerable:!(r=tt(t,i))||r.enumerable});return e};var st=e=>rt(re({},"__esModule",{value:!0}),e);var un={};Ne(un,{languages:()=>Ke,options:()=>et,parsers:()=>Te,printers:()=>cn});var ot=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},Y=ot;var se="indent";var oe="group";var ae="if-break";var P="line";var ce="break-parent";var xe=()=>{},b=xe,ue=xe;function x(e){return b(e),{type:se,contents:e}}function y(e,t={}){return b(e),ue(t.expandedStates,!0),{type:oe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function O(e,t="",n={}){return b(e),t!==""&&b(t),{type:ae,breakContents:e,flatContents:t,groupId:n.groupId}}var xt={type:ce};var _t={type:P,hard:!0};var k={type:P},p={type:P,soft:!0},f=[_t,xt];function E(e,t){b(e),ue(t);let n=[];for(let r=0;r{for(var n in t)re(e,n,{get:t[n],enumerable:!0})},rt=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nt(t))!it.call(e,i)&&i!==n&&re(e,i,{get:()=>t[i],enumerable:!(r=tt(t,i))||r.enumerable});return e};var st=e=>rt(re({},"__esModule",{value:!0}),e);var un={};Ne(un,{languages:()=>Pe,options:()=>we,parsers:()=>Te,printers:()=>cn});var ot=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},Y=ot;var se="indent";var oe="group";var ae="if-break";var P="line";var ce="break-parent";var xe=()=>{},b=xe,ue=xe;function x(e){return b(e),{type:se,contents:e}}function y(e,t={}){return b(e),ue(t.expandedStates,!0),{type:oe,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function O(e,t="",n={}){return b(e),t!==""&&b(t),{type:ae,breakContents:e,flatContents:t,groupId:n.groupId}}var xt={type:ce};var _t={type:P,hard:!0};var k={type:P},p={type:P,soft:!0},f=[_t,xt];function E(e,t){b(e),ue(t);let n=[];for(let r=0;r{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a0}var le=At;var pe=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Ae=pe;function ke(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function Ce(e){return`# @format +`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var $=yt;function It(e,t,n={}){let r=G(e,n.backwards?t-1:t,n),i=$(e,r,n);return r!==i}var Ie=It;function Ot(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n0}var le=At;var pe=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Ae=pe;var F=null;function w(e){if(F!==null&&typeof F.property){let t=F;return F=w.prototype=null,t}return F=w.prototype=e??Object.create(null),new w}var kt=10;for(let e=0;e<=kt;e++)w();function fe(e){return w(e)}function St(e,t="type"){fe(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var ke=St;var J=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},X={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Wn=new Set(Object.keys(X));var S;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(S||(S={}));var Ct=ke(X,"kind"),Se=Ct;function q(e){return e.loc.start}function Q(e){return e.loc.end}function Ce(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function ve(e){return`# @format -`+e}function J(e){return e.kind==="Comment"?e.start:e.loc.start}function X(e){return e.kind==="Comment"?e.end:e.loc.end}var F=null;function w(e){if(F!==null&&typeof F.property){let t=F;return F=w.prototype=null,t}return F=w.prototype=e??Object.create(null),new w}var kt=10;for(let e=0;e<=kt;e++)w();function fe(e){return w(e)}function Ct(e,t="type"){fe(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var Se=Ct;var q=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Q={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},zn=new Set(Object.keys(Q));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var St=Se(Q,"kind"),ve=St;function vt(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(k):i.push(f),i}var g=vt;function bt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...E(f,A(e,t,n,"definitions")),f];case"OperationDefinition":{let i=t.originalText[J(r)]!=="{",s=!!r.name;return[i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&le(r.variableDefinitions)?" ":"",be(e,n),_(e,n,r),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),be(e,n)," on ",n("typeCondition"),_(e,n,r)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,A(e,t,n,"selections"))]),f,"}"];case"Field":return y([r.alias?[n("alias"),": "]:"",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",_(e,n,r),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=Y(!1,r.value,'"""','\\"""').split(` +`+e}function vt(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(k):i.push(f),i}var g=vt;function bt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...E(f,A(e,t,n,"definitions")),f];case"OperationDefinition":{let i=t.originalText[q(r)]!=="{",s=!!r.name;return[i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&le(r.variableDefinitions)?" ":"",be(e,n),_(e,n,r),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),be(e,n)," on ",n("typeCondition"),_(e,n,r)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,A(e,t,n,"selections"))]),f,"}"];case"Field":return y([r.alias?[n("alias"),": "]:"",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",_(e,n,r),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=Y(!1,r.value,'"""','\\"""').split(` `);return i.length===1&&(i[0]=i[0].trim()),i.every(s=>s==="")&&(i.length=0),E(f,['"""',...i,'"""'])}return['"',Y(!1,Y(!1,r.value,/["\\]/g,"\\$&"),` -`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([p,E([O("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let i=t.bracketSpacing&&r.fields.length>0?" ":"";return y(["{",i,x([p,E([O("",", "),p],e.map(n,"fields"))]),p,O("",i),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(g(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&r.interfaces.length>0&&s.push(" implements ",...Pt(e,t,n)),s.push(_(e,n,r)),r.fields.length>0&&s.push([" {",x([f,E(f,A(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[g(e,t,n),n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),_(e,n,r)];case"DirectiveDefinition":return[g(e,t,n),"directive ","@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",r.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[g(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,r),r.values.length>0?[" {",x([f,E(f,A(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[g(e,t,n),n("name"),_(e,n,r)];case"InputValueDefinition":return[g(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"SchemaExtension":return["extend schema",_(e,n,r),...r.operationTypes.length>0?[" {",x([f,E(f,A(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[g(e,t,n),"schema",_(e,n,r)," {",r.operationTypes.length>0?x([f,E(f,A(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,r)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([g(e,t,n),y([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,r),r.types.length>0?[" =",O(""," "),x([O([k," "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[g(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,r)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Ae(r,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let r=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,r]):[" ",y(x([p,r]))]}function A(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&ge(t.originalText,X(s))?[a,f]:a},r)}function Lt(e){return e.kind!=="Comment"}function Rt(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function Pt(e,t,n){let{node:r}=e,i=[],{interfaces:s}=r,a=e.map(n,"interfaces");for(let u=0;ur.value.trim()==="prettier-ignore")}var wt={print:bt,massageAstNode:Le,hasPrettierIgnore:Ft,insertPragma:Ce,printComment:Rt,canAttachComment:Lt,getVisitorKeys:ve},Re=wt;var Te={};Ne(Te,{graphql:()=>on});function Pe(e){return typeof e=="object"&&e!==null}function Fe(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Vt=/\r\n|[\n\r]/g;function B(e,t){let n=0,r=1;for(let i of e.body.matchAll(Vt)){if(typeof i.index=="number"||Fe(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Ve(e){return he(e.source,B(e.source,e.start))}function he(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l} -`,h=r.split(/\r\n|[\n\r]/g),D=h[i];if(D.length>120){let I=Math.floor(l/80),ie=l%80,N=[];for(let v=0;v["|",v]),["|","^".padStart(ie)],["|",N[I+1]]])}return T+we([[`${a-1} |`,h[i-1]],[`${a} |`,D],["|","^".padStart(l)],[`${a+1} |`,h[i+1]]])}function we(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` -`)}function Bt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var W=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:D}=Bt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=Be(Array.isArray(a)?a:a?[a]:void 0);let I=Be((r=this.nodes)===null||r===void 0?void 0:r.map(N=>N.loc).filter(N=>N!=null));this.source=u??(I==null||(i=I[0])===null||i===void 0?void 0:i.source),this.positions=l??(I==null?void 0:I.map(N=>N.start)),this.locations=l&&u?l.map(N=>B(u,N)):I==null?void 0:I.map(N=>B(N.source,N.start));let ie=Pe(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=D??ie)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` +`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([p,E([O("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let i=t.bracketSpacing&&r.fields.length>0?" ":"";return y(["{",i,x([p,E([O("",", "),p],e.map(n,"fields"))]),p,O("",i),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(g(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&r.interfaces.length>0&&s.push(" implements ",...Pt(e,t,n)),s.push(_(e,n,r)),r.fields.length>0&&s.push([" {",x([f,E(f,A(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[g(e,t,n),n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),_(e,n,r)];case"DirectiveDefinition":return[g(e,t,n),"directive ","@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",r.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[g(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,r),r.values.length>0?[" {",x([f,E(f,A(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[g(e,t,n),n("name"),_(e,n,r)];case"InputValueDefinition":return[g(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"SchemaExtension":return["extend schema",_(e,n,r),...r.operationTypes.length>0?[" {",x([f,E(f,A(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[g(e,t,n),"schema",_(e,n,r)," {",r.operationTypes.length>0?x([f,E(f,A(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,r)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([g(e,t,n),y([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,r),r.types.length>0?[" =",O(""," "),x([O([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[g(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,r)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Ae(r,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let r=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,r]):[" ",y(x([p,r]))]}function A(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&ge(t.originalText,Q(s))?[a,f]:a},r)}function Lt(e){return e.kind!=="Comment"}function Rt(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function Pt(e,t,n){let{node:r}=e,i=[],{interfaces:s}=r,a=e.map(n,"interfaces");for(let u=0;ur.value.trim()==="prettier-ignore")}var wt={print:bt,massageAstNode:Le,hasPrettierIgnore:Ft,insertPragma:ve,printComment:Rt,canAttachComment:Lt,getVisitorKeys:Se},Re=wt;var Pe=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var Fe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Vt={bracketSpacing:Fe.bracketSpacing},we=Vt;var Te={};Ne(Te,{graphql:()=>an});function Ve(e){return typeof e=="object"&&e!==null}function Be(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Bt=/\r\n|[\n\r]/g;function B(e,t){let n=0,r=1;for(let i of e.body.matchAll(Bt)){if(typeof i.index=="number"||Be(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Me(e){return he(e.source,B(e.source,e.start))}function he(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l} +`,h=r.split(/\r\n|[\n\r]/g),D=h[i];if(D.length>120){let I=Math.floor(l/80),ie=l%80,N=[];for(let v=0;v["|",v]),["|","^".padStart(ie)],["|",N[I+1]]])}return T+Ue([[`${a-1} |`,h[i-1]],[`${a} |`,D],["|","^".padStart(l)],[`${a+1} |`,h[i+1]]])}function Ue(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` +`)}function Ut(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var W=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:D}=Ut(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=Ye(Array.isArray(a)?a:a?[a]:void 0);let I=Ye((r=this.nodes)===null||r===void 0?void 0:r.map(N=>N.loc).filter(N=>N!=null));this.source=u??(I==null||(i=I[0])===null||i===void 0?void 0:i.source),this.positions=l??(I==null?void 0:I.map(N=>N.start)),this.locations=l&&u?l.map(N=>B(u,N)):I==null?void 0:I.map(N=>B(N.source,N.start));let ie=Ve(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=D??ie)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` -`+Ve(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` +`+Me(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` -`+he(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Be(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new W(`Syntax Error: ${n}`,{source:e,positions:[t]})}var H;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(H||(H={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function Ue(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function Me(e){return e>=97&&e<=122||e>=65&&e<=90}function de(e){return Me(e)||e===95}function Ye(e){return Me(e)||L(e)||e===95}function je(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;au===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Ut(e){let t=0;for(;t=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return Je(e.charCodeAt(t))&&Xe(e.charCodeAt(t+1))}function Je(e){return e>=55296&&e<=56319}function Xe(e){return e>=56320&&e<=57343}function S(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,r,i){let s=e.line,a=1+n-e.lineStart;return new V(t,n,r,s,a,i)}function Mt(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Xt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function qt(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,u="",l=[];for(;s2?"["+Zt(e)+"]":"{ "+n.map(([i,s])=>i+": "+te(s,t)).join(", ")+" }"}function Kt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Zt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var qe=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let a=ee(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm. +`+he(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Ye(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new W(`Syntax Error: ${n}`,{source:e,positions:[t]})}var H;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(H||(H={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function je(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function Ge(e){return e>=97&&e<=122||e>=65&&e<=90}function de(e){return Ge(e)||e===95}function $e(e){return Ge(e)||L(e)||e===95}function Je(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;au===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Mt(e){let t=0;for(;t=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return Qe(e.charCodeAt(t))&&We(e.charCodeAt(t+1))}function Qe(e){return e>=55296&&e<=56319}function We(e){return e>=56320&&e<=57343}function C(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,r,i){let s=e.line,a=1+n-e.lineStart;return new V(t,n,r,s,a,i)}function Yt(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function qt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Qt(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,u="",l=[];for(;s2?"["+en(e)+"]":"{ "+n.map(([i,s])=>i+": "+te(s,t)).join(", ")+" }"}function Zt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function en(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var He=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let a=ee(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other @@ -26,4 +26,4 @@ https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and -spurious results.`)}}return!1};var M=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function Qe(e){return qe(e,M)}function We(e,t){return new Ee(e,t).parseDocument()}var Ee=class{constructor(t,n={}){let r=Qe(t)?t:new M(t);this._lexer=new z(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.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()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let r=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let r=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.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(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(H,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new q(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${He(t)}, found ${ne(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${ne(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${ne(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==o.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ne(e){let t=e.value;return He(e.kind)+(t!=null?` "${t}"`:"")}function He(e){return $e(e)?`"${e}"`:e}function en(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var ze=en;function tn(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push(i);return t}var nn={allowLegacyFragmentVariables:!0};function rn(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return ze(t,{loc:{start:n},cause:e})}return e}function sn(e){let t;try{t=We(e,nn)}catch(n){throw rn(n)}return t.comments=tn(t),t}var on={parse:sn,astFormat:"graphql",hasPragma:ke,locStart:J,locEnd:X};var Ke=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var Ze={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var an={bracketSpacing:Ze.bracketSpacing},et=an;var cn={graphql:Re};return st(un);}); \ No newline at end of file +spurious results.`)}}return!1};var M=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ze(e){return He(e,M)}function Ke(e,t){return new Ee(e,t).parseDocument()}var Ee=class{constructor(t,n={}){let r=ze(t)?t:new M(t);this._lexer=new z(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.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()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:S.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return S.QUERY;case"mutation":return S.MUTATION;case"subscription":return S.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let r=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let r=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.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(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(H,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new J(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${Ze(t)}, found ${ne(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${ne(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${ne(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==o.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ne(e){let t=e.value;return Ze(e.kind)+(t!=null?` "${t}"`:"")}function Ze(e){return qe(e)?`"${e}"`:e}function tn(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var et=tn;function nn(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push({...i,loc:{start:i.start,end:i.end}});return t}var rn={allowLegacyFragmentVariables:!0};function sn(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return et(t,{loc:{start:n},cause:e})}return e}function on(e){let t;try{t=Ke(e,rn)}catch(n){throw sn(n)}return t.comments=nn(t),t}var an={parse:on,astFormat:"graphql",hasPragma:Ce,locStart:q,locEnd:Q};var cn={graphql:Re};return st(un);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/graphql.mjs b/node_modules/prettier/plugins/graphql.mjs index 5122ef5..2f56768 100644 --- a/node_modules/prettier/plugins/graphql.mjs +++ b/node_modules/prettier/plugins/graphql.mjs @@ -1,21 +1,21 @@ -var tt=Object.defineProperty;var Ne=(e,t)=>{for(var n in t)tt(e,n,{get:t[n],enumerable:!0})};var Te={};Ne(Te,{languages:()=>Ke,options:()=>et,parsers:()=>Ee,printers:()=>rn});var nt=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},Y=nt;var re="indent";var se="group";var oe="if-break";var P="line";var ae="break-parent";var xe=()=>{},b=xe,ce=xe;function x(e){return b(e),{type:re,contents:e}}function y(e,t={}){return b(e),ce(t.expandedStates,!0),{type:se,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function O(e,t="",n={}){return b(e),t!==""&&b(t),{type:oe,breakContents:e,flatContents:t,groupId:n.groupId}}var mt={type:ae};var Et={type:P,hard:!0};var k={type:P},p={type:P,soft:!0},f=[Et,mt];function E(e,t){b(e),ce(t);let n=[];for(let r=0;r{for(var n in t)tt(e,n,{get:t[n],enumerable:!0})};var Te={};Ne(Te,{languages:()=>Pe,options:()=>we,parsers:()=>Ee,printers:()=>rn});var nt=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},Y=nt;var re="indent";var se="group";var oe="if-break";var P="line";var ae="break-parent";var xe=()=>{},b=xe,ce=xe;function x(e){return b(e),{type:re,contents:e}}function y(e,t={}){return b(e),ce(t.expandedStates,!0),{type:se,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function O(e,t="",n={}){return b(e),t!==""&&b(t),{type:oe,breakContents:e,flatContents:t,groupId:n.groupId}}var mt={type:ae};var Et={type:P,hard:!0};var k={type:P},p={type:P,soft:!0},f=[Et,mt];function E(e,t){b(e),ce(t);let n=[];for(let r=0;r{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a0}var ue=It;var le=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Ae=le;function ke(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function Ce(e){return`# @format +`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var $=Tt;function Nt(e,t,n={}){let r=G(e,n.backwards?t-1:t,n),i=$(e,r,n);return r!==i}var Ie=Nt;function xt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n0}var ue=It;var le=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Ae=le;var F=null;function w(e){if(F!==null&&typeof F.property){let t=F;return F=w.prototype=null,t}return F=w.prototype=e??Object.create(null),new w}var Ot=10;for(let e=0;e<=Ot;e++)w();function pe(e){return w(e)}function Dt(e,t="type"){pe(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var ke=Dt;var J=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},X={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},$n=new Set(Object.keys(X));var S;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(S||(S={}));var gt=ke(X,"kind"),Se=gt;function q(e){return e.loc.start}function Q(e){return e.loc.end}function Ce(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function ve(e){return`# @format -`+e}function J(e){return e.kind==="Comment"?e.start:e.loc.start}function X(e){return e.kind==="Comment"?e.end:e.loc.end}var F=null;function w(e){if(F!==null&&typeof F.property){let t=F;return F=w.prototype=null,t}return F=w.prototype=e??Object.create(null),new w}var Ot=10;for(let e=0;e<=Ot;e++)w();function pe(e){return w(e)}function Dt(e,t="type"){pe(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var Se=Dt;var q=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},Q={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Xn=new Set(Object.keys(Q));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var gt=Se(Q,"kind"),ve=gt;function At(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(k):i.push(f),i}var g=At;function kt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...E(f,A(e,t,n,"definitions")),f];case"OperationDefinition":{let i=t.originalText[J(r)]!=="{",s=!!r.name;return[i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&ue(r.variableDefinitions)?" ":"",be(e,n),_(e,n,r),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),be(e,n)," on ",n("typeCondition"),_(e,n,r)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,A(e,t,n,"selections"))]),f,"}"];case"Field":return y([r.alias?[n("alias"),": "]:"",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",_(e,n,r),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=Y(!1,r.value,'"""','\\"""').split(` +`+e}function At(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(k):i.push(f),i}var g=At;function kt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...E(f,A(e,t,n,"definitions")),f];case"OperationDefinition":{let i=t.originalText[q(r)]!=="{",s=!!r.name;return[i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&ue(r.variableDefinitions)?" ":"",be(e,n),_(e,n,r),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),be(e,n)," on ",n("typeCondition"),_(e,n,r)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,A(e,t,n,"selections"))]),f,"}"];case"Field":return y([r.alias?[n("alias"),": "]:"",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",_(e,n,r),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=Y(!1,r.value,'"""','\\"""').split(` `);return i.length===1&&(i[0]=i[0].trim()),i.every(s=>s==="")&&(i.length=0),E(f,['"""',...i,'"""'])}return['"',Y(!1,Y(!1,r.value,/["\\]/g,"\\$&"),` -`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([p,E([O("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let i=t.bracketSpacing&&r.fields.length>0?" ":"";return y(["{",i,x([p,E([O("",", "),p],e.map(n,"fields"))]),p,O("",i),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(g(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&r.interfaces.length>0&&s.push(" implements ",...vt(e,t,n)),s.push(_(e,n,r)),r.fields.length>0&&s.push([" {",x([f,E(f,A(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[g(e,t,n),n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),_(e,n,r)];case"DirectiveDefinition":return[g(e,t,n),"directive ","@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",r.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[g(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,r),r.values.length>0?[" {",x([f,E(f,A(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[g(e,t,n),n("name"),_(e,n,r)];case"InputValueDefinition":return[g(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"SchemaExtension":return["extend schema",_(e,n,r),...r.operationTypes.length>0?[" {",x([f,E(f,A(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[g(e,t,n),"schema",_(e,n,r)," {",r.operationTypes.length>0?x([f,E(f,A(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,r)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([g(e,t,n),y([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,r),r.types.length>0?[" =",O(""," "),x([O([k," "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[g(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,r)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Ae(r,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let r=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,r]):[" ",y(x([p,r]))]}function A(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&ge(t.originalText,X(s))?[a,f]:a},r)}function Ct(e){return e.kind!=="Comment"}function St(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function vt(e,t,n){let{node:r}=e,i=[],{interfaces:s}=r,a=e.map(n,"interfaces");for(let u=0;ur.value.trim()==="prettier-ignore")}var Lt={print:kt,massageAstNode:Le,hasPrettierIgnore:bt,insertPragma:Ce,printComment:St,canAttachComment:Ct,getVisitorKeys:ve},Re=Lt;var Ee={};Ne(Ee,{graphql:()=>tn});function Pe(e){return typeof e=="object"&&e!==null}function Fe(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Rt=/\r\n|[\n\r]/g;function B(e,t){let n=0,r=1;for(let i of e.body.matchAll(Rt)){if(typeof i.index=="number"||Fe(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Ve(e){return fe(e.source,B(e.source,e.start))}function fe(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l} -`,h=r.split(/\r\n|[\n\r]/g),D=h[i];if(D.length>120){let I=Math.floor(l/80),ie=l%80,N=[];for(let v=0;v["|",v]),["|","^".padStart(ie)],["|",N[I+1]]])}return T+we([[`${a-1} |`,h[i-1]],[`${a} |`,D],["|","^".padStart(l)],[`${a+1} |`,h[i+1]]])}function we(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` -`)}function Pt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var W=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:D}=Pt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=Be(Array.isArray(a)?a:a?[a]:void 0);let I=Be((r=this.nodes)===null||r===void 0?void 0:r.map(N=>N.loc).filter(N=>N!=null));this.source=u??(I==null||(i=I[0])===null||i===void 0?void 0:i.source),this.positions=l??(I==null?void 0:I.map(N=>N.start)),this.locations=l&&u?l.map(N=>B(u,N)):I==null?void 0:I.map(N=>B(N.source,N.start));let ie=Pe(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=D??ie)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` +`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([p,E([O("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let i=t.bracketSpacing&&r.fields.length>0?" ":"";return y(["{",i,x([p,E([O("",", "),p],e.map(n,"fields"))]),p,O("",i),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(g(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&r.interfaces.length>0&&s.push(" implements ",...vt(e,t,n)),s.push(_(e,n,r)),r.fields.length>0&&s.push([" {",x([f,E(f,A(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[g(e,t,n),n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),_(e,n,r)];case"DirectiveDefinition":return[g(e,t,n),"directive ","@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],A(e,t,n,"arguments"))]),p,")"]):"",r.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[g(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,r),r.values.length>0?[" {",x([f,E(f,A(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[g(e,t,n),n("name"),_(e,n,r)];case"InputValueDefinition":return[g(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"SchemaExtension":return["extend schema",_(e,n,r),...r.operationTypes.length>0?[" {",x([f,E(f,A(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[g(e,t,n),"schema",_(e,n,r)," {",r.operationTypes.length>0?x([f,E(f,A(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,r)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([g(e,t,n),y([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,r),r.types.length>0?[" =",O(""," "),x([O([k,"| "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[g(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,r)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Ae(r,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let r=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,r]):[" ",y(x([p,r]))]}function A(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&ge(t.originalText,Q(s))?[a,f]:a},r)}function St(e){return e.kind!=="Comment"}function Ct(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function vt(e,t,n){let{node:r}=e,i=[],{interfaces:s}=r,a=e.map(n,"interfaces");for(let u=0;ur.value.trim()==="prettier-ignore")}var Lt={print:kt,massageAstNode:Le,hasPrettierIgnore:bt,insertPragma:ve,printComment:Ct,canAttachComment:St,getVisitorKeys:Se},Re=Lt;var Pe=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var Fe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Rt={bracketSpacing:Fe.bracketSpacing},we=Rt;var Ee={};Ne(Ee,{graphql:()=>nn});function Ve(e){return typeof e=="object"&&e!==null}function Be(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Pt=/\r\n|[\n\r]/g;function B(e,t){let n=0,r=1;for(let i of e.body.matchAll(Pt)){if(typeof i.index=="number"||Be(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Me(e){return fe(e.source,B(e.source,e.start))}function fe(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l} +`,h=r.split(/\r\n|[\n\r]/g),D=h[i];if(D.length>120){let I=Math.floor(l/80),ie=l%80,N=[];for(let v=0;v["|",v]),["|","^".padStart(ie)],["|",N[I+1]]])}return T+Ue([[`${a-1} |`,h[i-1]],[`${a} |`,D],["|","^".padStart(l)],[`${a+1} |`,h[i+1]]])}function Ue(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` +`)}function Ft(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var W=class e extends Error{constructor(t,...n){var r,i,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:D}=Ft(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=Ye(Array.isArray(a)?a:a?[a]:void 0);let I=Ye((r=this.nodes)===null||r===void 0?void 0:r.map(N=>N.loc).filter(N=>N!=null));this.source=u??(I==null||(i=I[0])===null||i===void 0?void 0:i.source),this.positions=l??(I==null?void 0:I.map(N=>N.start)),this.locations=l&&u?l.map(N=>B(u,N)):I==null?void 0:I.map(N=>B(N.source,N.start));let ie=Ve(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=D??ie)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` -`+Ve(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` +`+Me(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` -`+fe(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Be(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new W(`Syntax Error: ${n}`,{source:e,positions:[t]})}var H;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(H||(H={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function Ue(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function Me(e){return e>=97&&e<=122||e>=65&&e<=90}function he(e){return Me(e)||e===95}function Ye(e){return Me(e)||L(e)||e===95}function je(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;au===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Ft(e){let t=0;for(;t=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return Je(e.charCodeAt(t))&&Xe(e.charCodeAt(t+1))}function Je(e){return e>=55296&&e<=56319}function Xe(e){return e>=56320&&e<=57343}function S(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,r,i){let s=e.line,a=1+n-e.lineStart;return new V(t,n,r,s,a,i)}function wt(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function jt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Gt(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,u="",l=[];for(;s2?"["+Wt(e)+"]":"{ "+n.map(([i,s])=>i+": "+te(s,t)).join(", ")+" }"}function Qt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Wt(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var qe=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let a=ee(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm. +`+fe(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Ye(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new W(`Syntax Error: ${n}`,{source:e,positions:[t]})}var H;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(H||(H={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function je(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function Ge(e){return e>=97&&e<=122||e>=65&&e<=90}function he(e){return Ge(e)||e===95}function $e(e){return Ge(e)||L(e)||e===95}function Je(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;au===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function wt(e){let t=0;for(;t=0&&e<=55295||e>=57344&&e<=1114111}function K(e,t){return Qe(e.charCodeAt(t))&&We(e.charCodeAt(t+1))}function Qe(e){return e>=55296&&e<=56319}function We(e){return e>=56320&&e<=57343}function C(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,r,i){let s=e.line,a=1+n-e.lineStart;return new V(t,n,r,s,a,i)}function Vt(e,t){let n=e.source.body,r=n.length,i=t;for(;i=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Gt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function $t(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,u="",l=[];for(;s2?"["+Ht(e)+"]":"{ "+n.map(([i,s])=>i+": "+te(s,t)).join(", ")+" }"}function Wt(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Ht(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var He=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;let i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){let a=ee(t);throw new Error(`Cannot use ${i} "${a}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other @@ -26,4 +26,4 @@ https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and -spurious results.`)}}return!1};var M=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function Qe(e){return qe(e,M)}function We(e,t){return new me(e,t).parseDocument()}var me=class{constructor(t,n={}){let r=Qe(t)?t:new M(t);this._lexer=new z(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.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()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let r=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let r=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.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(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(H,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new q(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${He(t)}, found ${ne(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${ne(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${ne(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==o.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ne(e){let t=e.value;return He(e.kind)+(t!=null?` "${t}"`:"")}function He(e){return $e(e)?`"${e}"`:e}function Ht(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var ze=Ht;function zt(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push(i);return t}var Kt={allowLegacyFragmentVariables:!0};function Zt(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return ze(t,{loc:{start:n},cause:e})}return e}function en(e){let t;try{t=We(e,Kt)}catch(n){throw Zt(n)}return t.comments=zt(t),t}var tn={parse:en,astFormat:"graphql",hasPragma:ke,locStart:J,locEnd:X};var Ke=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var Ze={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var nn={bracketSpacing:Ze.bracketSpacing},et=nn;var rn={graphql:Re};var pr=Te;export{pr as default,Ke as languages,et as options,Ee as parsers,rn as printers}; +spurious results.`)}}return!1};var M=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${ee(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ze(e){return He(e,M)}function Ke(e,t){return new me(e,t).parseDocument()}var me=class{constructor(t,n={}){let r=ze(t)?t:new M(t);this._lexer=new z(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.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()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:S.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return S.QUERY;case"mutation":return S.MUTATION;case"subscription":return S.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let r=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let r=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.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(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(H,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new J(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${Ze(t)}, found ${ne(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${ne(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${ne(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==o.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ne(e){let t=e.value;return Ze(e.kind)+(t!=null?` "${t}"`:"")}function Ze(e){return qe(e)?`"${e}"`:e}function zt(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var et=zt;function Kt(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push({...i,loc:{start:i.start,end:i.end}});return t}var Zt={allowLegacyFragmentVariables:!0};function en(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return et(t,{loc:{start:n},cause:e})}return e}function tn(e){let t;try{t=Ke(e,Zt)}catch(n){throw en(n)}return t.comments=Kt(t),t}var nn={parse:tn,astFormat:"graphql",hasPragma:Ce,locStart:q,locEnd:Q};var rn={graphql:Re};var pr=Te;export{pr as default,Pe as languages,we as options,Ee as parsers,rn as printers}; diff --git a/node_modules/prettier/plugins/html.js b/node_modules/prettier/plugins/html.js index e8eb4f1..d03ed7d 100644 --- a/node_modules/prettier/plugins/html.js +++ b/node_modules/prettier/plugins/html.js @@ -1,19 +1,19 @@ -(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.html=e()}})(function(){"use strict";var rr=Object.defineProperty;var Ks=Object.getOwnPropertyDescriptor;var Qs=Object.getOwnPropertyNames;var Xs=Object.prototype.hasOwnProperty;var Yr=(t,e)=>{for(var r in e)rr(t,r,{get:e[r],enumerable:!0})},Js=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Qs(e))!Xs.call(t,s)&&s!==r&&rr(t,s,{get:()=>e[s],enumerable:!(n=Ks(e,s))||n.enumerable});return t};var Zs=t=>Js(rr({},"__esModule",{value:!0}),t);var jr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var Q=(t,e,r)=>(jr(t,e,"read from private field"),r?r.call(t):e.get(t)),Kr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Qr=(t,e,r,n)=>(jr(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Fo={};Yr(Fo,{languages:()=>zs,options:()=>Ys,parsers:()=>Vr,printers:()=>Lo});var ei=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},v=ei;var we="string",be="array",Te="cursor",oe="indent",ue="align",xe="trim",ee="group",le="fill",ce="if-break",pe="indent-if-break",ke="line-suffix",Be="line-suffix-boundary",G="line",Le="label",he="break-parent",ft=new Set([Te,oe,ue,xe,ee,le,ce,pe,ke,Be,G,Le,he]);function ti(t){if(typeof t=="string")return we;if(Array.isArray(t))return be;if(!t)return;let{type:e}=t;if(ft.has(e))return e}var Fe=ti;var ri=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function ni(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', -Expected it to be 'string' or 'object'.`;if(Fe(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ri([...ft].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. -Expected it to be ${n}.`}var nr=class extends Error{name="InvalidDocError";constructor(e){super(ni(e)),this.doc=e}},mt=nr;var Xr=()=>{},te=Xr,dt=Xr;function R(t){return te(t),{type:oe,contents:t}}function Jr(t,e){return te(e),{type:ue,contents:e,n:t}}function E(t,e={}){return te(t),dt(e.expandedStates,!0),{type:ee,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Zr(t){return Jr(Number.NEGATIVE_INFINITY,t)}function en(t){return Jr({type:"root"},t)}function gt(t){return dt(t),{type:le,parts:t}}function fe(t,e="",r={}){return te(t),e!==""&&te(e),{type:ce,breakContents:t,flatContents:e,groupId:r.groupId}}function tn(t,e){return te(t),{type:pe,contents:t,groupId:e.groupId,negate:e.negate}}var re={type:he};var si={type:G,hard:!0},ii={type:G,hard:!0,literal:!0},A={type:G},b={type:G,soft:!0},S=[si,re],rn=[ii,re];function Y(t,e){te(t),dt(e);let r=[];for(let n=0;n{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},me=ai;function Ct(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Fe(i)){case be:return e(i.map(n));case le:return e({...i,parts:i.parts.map(n)});case ce:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case ee:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case ue:case oe:case pe:case Le:case ke:return e({...i,contents:n(i.contents)});case we:case Te:case xe:case Be:case G:case he:return e(i);default:throw new mt(i)}}}function oi(t){switch(Fe(t)){case le:if(t.parts.every(e=>e===""))return"";break;case ee:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===ee&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case ue:case oe:case pe:case ke:if(!t.contents)return"";break;case ce:if(!t.flatContents&&!t.breakContents)return"";break;case be:{let e=[];for(let r of t){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof me(!1,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...s)}return e.length===0?"":e.length===1?e[0]:e}case we:case Te:case xe:case Be:case G:case Le:case he:break;default:throw new mt(t)}return t}function nn(t){return Ct(t,e=>oi(e))}function T(t,e=rn){return Ct(t,r=>typeof r=="string"?Y(e,r.split(` -`)):r)}var sr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},sn=sr;var St="'",an='"';function ui(t,e){let r=e===!0||e===St?St:an,n=r===St?an:St,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var on=ui;function ir(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var O,ar=class{constructor(e){Kr(this,O,void 0);Qr(this,O,new Set(e))}getLeadingWhitespaceCount(e){let r=Q(this,O),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return Q(this,O).has(e.charAt(0))}hasTrailingWhitespace(e){return Q(this,O).has(me(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${ir([...Q(this,O)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return e.split(s)}hasWhitespaceCharacter(e){let r=Q(this,O);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=Q(this,O);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=Q(this,O);return Array.prototype.every.call(e,n=>r.has(n))}};O=new WeakMap;var un=ar;var li=[" ",` -`,"\f","\r"," "],ci=new un(li),H=ci;function pi(t){return(t==null?void 0:t.type)==="front-matter"}var Pe=pi;var hi=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens"]),fi=new Set(["if","else if","for","switch","case"]);function ln(t,e){var r;if(t.type==="text"||t.type==="comment"||Pe(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=e.parameters)!=null&&r.children))for(let n of e.parameters.children)fi.has(t.name)?delete n.expression:n.expression=n.expression.trim()}ln.ignoredProperties=hi;var cn=ln;var mi=t=>String(t).split(/[/\\]/).pop();function pn(t,e){if(!e)return;let r=mi(e).toLowerCase();return t.find(n=>{var s,i;return((s=n.extensions)==null?void 0:s.some(a=>r.endsWith(a)))||((i=n.filenames)==null?void 0:i.some(a=>a.toLowerCase()===r))})}function di(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function gi(t,e){let r=t.plugins.flatMap(s=>s.languages??[]),n=di(r,e.language)??pn(r,e.physicalFile)??pn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Ne=gi;var hn="inline",fn={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"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",search:"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",menu:"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",input:"inline-block",button:"inline-block",fieldset:"block",marquee:"inline-block",source:"block",track:"block",details:"block",summary:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},mn="normal",dn={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function Ci(t){return t.type==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var de=Ci;var Si=t=>v(!1,t,/^[\t\f\r ]*\n/g,""),or=t=>Si(H.trimEnd(t)),gn=t=>{let e=t,r=H.getLeadingWhitespace(e);r&&(e=e.slice(r.length));let n=H.getTrailingWhitespace(e);return n&&(e=e.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:e}};function _t(t,e){return!!(t.type==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.type==="ieConditionalComment"&&!t.complete||ge(t)&&t.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||Dt(t,e)&&!V(t)&&t.type!=="interpolation")}function Ge(t){return t.type==="attribute"||!t.parent||!t.prev?!1:_i(t.prev)}function _i(t){return t.type==="comment"&&t.value.trim()==="prettier-ignore"}function N(t){return t.type==="text"||t.type==="comment"}function V(t){return t.type==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||de(t)&&(t.name==="script"||t.name==="style"))}function Cn(t){return t.children&&!V(t)}function Sn(t){return V(t)||t.type==="interpolation"||ur(t)}function ur(t){return kn(t).startsWith("pre")}function _n(t,e){var s,i;let r=n();if(r&&!t.prev&&((i=(s=t.parent)==null?void 0:s.tagDefinition)!=null&&i.ignoreFirstLf))return t.type==="interpolation";return r;function n(){return Pe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.prev&&(t.prev.type==="text"||t.prev.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:ge(t.parent)?!0:!(!t.prev&&(t.parent.type==="root"||ge(t)&&t.parent||V(t.parent)||Ke(t.parent,e)||!wi(t.parent.cssDisplay))||t.prev&&!xi(t.prev.cssDisplay))}}function En(t,e){return Pe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.next&&(t.next.type==="text"||t.next.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:ge(t.parent)?!0:!(!t.next&&(t.parent.type==="root"||ge(t)&&t.parent||V(t.parent)||Ke(t.parent,e)||!bi(t.parent.cssDisplay))||t.next&&!Ti(t.next.cssDisplay))}function An(t){return ki(t.cssDisplay)&&!V(t)}function Ye(t){return Pe(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+10&&(["body","script","style"].includes(t.name)||t.children.some(e=>Ai(e)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.type!=="text"&&yn(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||wn(t.lastChild))}function lr(t){return t.type==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function Et(t){return bn(t)||t.prev&&Ei(t.prev)||vn(t)}function Ei(t){return bn(t)||t.type==="element"&&t.fullName==="br"||vn(t)}function vn(t){return yn(t)&&wn(t)}function yn(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.linet.sourceSpan.end.line:t.parent.type==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function bn(t){switch(t.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function At(t){return t.lastChild?At(t.lastChild):t}function Ai(t){var e;return(e=t.children)==null?void 0:e.some(r=>r.type!=="text")}function Tn(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function Di(t,e){let{name:r,attrMap:n}=t;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:s,lang:i}=t.attrMap;return!i&&!s?"babel":Ne(e,{language:i})??Tn(s)}function vi(t,e){if(!Dt(t,e))return;let{attrMap:r}=t;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:s}=r;return Ne(e,{language:s})??Tn(n)}function yi(t,e){if(t.name!=="style")return;let{lang:r}=t.attrMap;return r?Ne(e,{language:r}):"css"}function cr(t,e){return Di(t,e)??yi(t,e)??vi(t,e)}function je(t){return t==="block"||t==="list-item"||t.startsWith("table")}function wi(t){return!je(t)&&t!=="inline-block"}function bi(t){return!je(t)&&t!=="inline-block"}function Ti(t){return!je(t)}function xi(t){return!je(t)}function ki(t){return!je(t)&&t!=="inline-block"}function ge(t){return kn(t).startsWith("pre")}function Bi(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.parent}return!1}function xn(t,e){var n;if(Ce(t,e))return"block";if(((n=t.prev)==null?void 0:n.type)==="comment"){let s=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(s)return s[1]}let r=!1;if(t.type==="element"&&t.namespace==="svg")if(Bi(t,s=>s.fullName==="svg:foreignObject"))r=!0;else return t.name==="svg"?"inline-block":"block";switch(e.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return t.type==="element"&&(!t.namespace||r||de(t))&&fn[t.name]||hn}}function kn(t){return t.type==="element"&&(!t.namespace||de(t))&&dn[t.name]||mn}function Li(t){let e=Number.POSITIVE_INFINITY;for(let r of t.split(` -`)){if(r.length===0)continue;let n=H.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&n{for(var r in e)rr(t,r,{get:e[r],enumerable:!0})},ti=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Zs(e))!ei.call(t,s)&&s!==r&&rr(t,s,{get:()=>e[s],enumerable:!(n=Js(e,s))||n.enumerable});return t};var ri=t=>ti(rr({},"__esModule",{value:!0}),t);var jr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var Q=(t,e,r)=>(jr(t,e,"read from private field"),r?r.call(t):e.get(t)),Kr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Qr=(t,e,r,n)=>(jr(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Ro={};Yr(Ro,{languages:()=>Cs,options:()=>_s,parsers:()=>Ur,printers:()=>Io});var ni=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},w=ni;var xe="string",ke="array",Be="cursor",ue="indent",le="align",Le="trim",te="group",ce="fill",pe="if-break",he="indent-if-break",Fe="line-suffix",Pe="line-suffix-boundary",Y="line",Ne="label",fe="break-parent",mt=new Set([Be,ue,le,Le,te,ce,pe,he,Fe,Pe,Y,Ne,fe]);function si(t){if(typeof t=="string")return xe;if(Array.isArray(t))return ke;if(!t)return;let{type:e}=t;if(mt.has(e))return e}var Ie=si;var ii=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function ai(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(Ie(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ii([...mt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${n}.`}var nr=class extends Error{name="InvalidDocError";constructor(e){super(ai(e)),this.doc=e}},gt=nr;var Xr=()=>{},re=Xr,dt=Xr;function L(t){return re(t),{type:ue,contents:t}}function Jr(t,e){return re(e),{type:le,contents:e,n:t}}function E(t,e={}){return re(t),dt(e.expandedStates,!0),{type:te,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Zr(t){return Jr(Number.NEGATIVE_INFINITY,t)}function en(t){return Jr({type:"root"},t)}function Ct(t){return dt(t),{type:ce,parts:t}}function me(t,e="",r={}){return re(t),e!==""&&re(e),{type:pe,breakContents:t,flatContents:e,groupId:r.groupId}}function tn(t,e){return re(t),{type:he,contents:t,groupId:e.groupId,negate:e.negate}}var ne={type:fe};var oi={type:Y,hard:!0},ui={type:Y,hard:!0,literal:!0},A={type:Y},v={type:Y,soft:!0},S=[oi,ne],rn=[ui,ne];function M(t,e){re(t),dt(e);let r=[];for(let n=0;n{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},X=li;function St(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Ie(i)){case ke:return e(i.map(n));case ce:return e({...i,parts:i.parts.map(n)});case pe:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case te:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case le:case ue:case he:case Ne:case Fe:return e({...i,contents:n(i.contents)});case xe:case Be:case Le:case Pe:case Y:case fe:return e(i);default:throw new gt(i)}}}function ci(t){switch(Ie(t)){case ce:if(t.parts.every(e=>e===""))return"";break;case te:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===te&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case le:case ue:case he:case Fe:if(!t.contents)return"";break;case pe:if(!t.flatContents&&!t.breakContents)return"";break;case ke:{let e=[];for(let r of t){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof X(!1,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...s)}return e.length===0?"":e.length===1?e[0]:e}case xe:case Be:case Le:case Pe:case Y:case Ne:case fe:break;default:throw new gt(t)}return t}function nn(t){return St(t,e=>ci(e))}function T(t,e=rn){return St(t,r=>typeof r=="string"?M(e,r.split(` +`)):r)}var _t="'",sn='"';function pi(t,e){let r=e===!0||e===_t?_t:sn,n=r===_t?sn:_t,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var an=pi;function sr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var q,ir=class{constructor(e){Kr(this,q,void 0);Qr(this,q,new Set(e))}getLeadingWhitespaceCount(e){let r=Q(this,q),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return Q(this,q).has(e.charAt(0))}hasTrailingWhitespace(e){return Q(this,q).has(X(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${sr([...Q(this,q)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return e.split(s)}hasWhitespaceCharacter(e){let r=Q(this,q);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=Q(this,q);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=Q(this,q);return Array.prototype.every.call(e,n=>r.has(n))}};q=new WeakMap;var on=ir;var hi=[" ",` +`,"\f","\r"," "],fi=new on(hi),F=fi;var ar=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},un=ar;function mi(t){return(t==null?void 0:t.type)==="front-matter"}var Re=mi;var gi=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),di=new Set(["if","else if","for","switch","case"]);function ln(t,e){var r;if(t.type==="text"||t.type==="comment"||Re(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=e.parameters)!=null&&r.children))for(let n of e.parameters.children)di.has(t.name)?delete n.expression:n.expression=n.expression.trim();t.type==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim())}ln.ignoredProperties=gi;var cn=ln;async function Ci(t,e){if(t.lang==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return en([t.startDelimiter,S,n,n?S:"",t.endDelimiter])}}var pn=Ci;function ge(t,e=!0){return[L([v,t]),e?v:""]}function j(t,e){let r=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function x(t,e,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let s=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{s=n(a,o)});let i=await e(t,r,e);return s?E(i):ge(i)}function Si(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/.test(i)?"":x(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1,trailingComma:"none"},j)}var hn=Si;var _i=t=>String(t).split(/[/\\]/).pop();function fn(t,e){if(!e)return;let r=_i(e).toLowerCase();return t.find(({filenames:n})=>n==null?void 0:n.some(s=>s.toLowerCase()===r))??t.find(({extensions:n})=>n==null?void 0:n.some(s=>r.endsWith(s)))}function Ei(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function Ai(t,e){let r=t.plugins.flatMap(s=>s.languages??[]),n=Ei(r,e.language)??fn(r,e.physicalFile)??fn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var $e=Ai;var mn="inline",gn={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"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",search:"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",menu:"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",input:"inline-block",button:"inline-block",fieldset:"block",marquee:"inline-block",source:"block",track:"block",details:"block",summary:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},dn="normal",Cn={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function Di(t){return t.type==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var de=Di;var vi=t=>w(!1,t,/^[\t\f\r ]*\n/g,""),or=t=>vi(F.trimEnd(t)),Sn=t=>{let e=t,r=F.getLeadingWhitespace(e);r&&(e=e.slice(r.length));let n=F.getTrailingWhitespace(e);return n&&(e=e.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:e}};function Et(t,e){return!!(t.type==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.type==="ieConditionalComment"&&!t.complete||Ce(t)&&t.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||vt(t,e)&&!U(t)&&t.type!=="interpolation")}function Se(t){return t.type==="attribute"||!t.parent||!t.prev?!1:yi(t.prev)}function yi(t){return t.type==="comment"&&t.value.trim()==="prettier-ignore"}function R(t){return t.type==="text"||t.type==="comment"}function U(t){return t.type==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||de(t)&&(t.name==="script"||t.name==="style"))}function _n(t){return t.children&&!U(t)}function En(t){return U(t)||t.type==="interpolation"||ur(t)}function ur(t){return Ln(t).startsWith("pre")}function An(t,e){var s,i;let r=n();if(r&&!t.prev&&((i=(s=t.parent)==null?void 0:s.tagDefinition)!=null&&i.ignoreFirstLf))return t.type==="interpolation";return r;function n(){return Re(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.prev&&(t.prev.type==="text"||t.prev.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:Ce(t.parent)?!0:!(!t.prev&&(t.parent.type==="root"||Ce(t)&&t.parent||U(t.parent)||Je(t.parent,e)||!Bi(t.parent.cssDisplay))||t.prev&&!Pi(t.prev.cssDisplay))}}function Dn(t,e){return Re(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.next&&(t.next.type==="text"||t.next.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:Ce(t.parent)?!0:!(!t.next&&(t.parent.type==="root"||Ce(t)&&t.parent||U(t.parent)||Je(t.parent,e)||!Li(t.parent.cssDisplay))||t.next&&!Fi(t.next.cssDisplay))}function vn(t){return Ni(t.cssDisplay)&&!U(t)}function Qe(t){return Re(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+10&&(["body","script","style"].includes(t.name)||t.children.some(e=>bi(e)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.type!=="text"&&bn(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||Tn(t.lastChild))}function lr(t){return t.type==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function At(t){return xn(t)||t.prev&&wi(t.prev)||wn(t)}function wi(t){return xn(t)||t.type==="element"&&t.fullName==="br"||wn(t)}function wn(t){return bn(t)&&Tn(t)}function bn(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.linet.sourceSpan.end.line:t.parent.type==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function xn(t){switch(t.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function Dt(t){return t.lastChild?Dt(t.lastChild):t}function bi(t){var e;return(e=t.children)==null?void 0:e.some(r=>r.type!=="text")}function kn(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function Ti(t,e){let{name:r,attrMap:n}=t;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:s,lang:i}=t.attrMap;return!i&&!s?"babel":$e(e,{language:i})??kn(s)}function xi(t,e){if(!vt(t,e))return;let{attrMap:r}=t;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:s}=r;return $e(e,{language:s})??kn(n)}function ki(t,e){if(t.name!=="style")return;let{lang:r}=t.attrMap;return r?$e(e,{language:r}):"css"}function cr(t,e){return Ti(t,e)??ki(t,e)??xi(t,e)}function Xe(t){return t==="block"||t==="list-item"||t.startsWith("table")}function Bi(t){return!Xe(t)&&t!=="inline-block"}function Li(t){return!Xe(t)&&t!=="inline-block"}function Fi(t){return!Xe(t)}function Pi(t){return!Xe(t)}function Ni(t){return!Xe(t)&&t!=="inline-block"}function Ce(t){return Ln(t).startsWith("pre")}function Ii(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.parent}return!1}function Bn(t,e){var n;if(_e(t,e))return"block";if(((n=t.prev)==null?void 0:n.type)==="comment"){let s=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(s)return s[1]}let r=!1;if(t.type==="element"&&t.namespace==="svg")if(Ii(t,s=>s.fullName==="svg:foreignObject"))r=!0;else return t.name==="svg"?"inline-block":"block";switch(e.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return t.type==="element"&&(!t.namespace||r||de(t))&&gn[t.name]||mn}}function Ln(t){return t.type==="element"&&(!t.namespace||de(t))&&Cn[t.name]||dn}function Ri(t){let e=Number.POSITIVE_INFINITY;for(let r of t.split(` +`)){if(r.length===0)continue;let n=F.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&nr.slice(e)).join(` -`)}function hr(t){return v(!1,v(!1,t,"'","'"),""",'"')}function L(t){return hr(t.value)}var Fi=new Set(["template","style","script"]);function Ke(t,e){return Ce(t,e)&&!Fi.has(t.fullName)}function Ce(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function Dt(t,e){return Ce(t,e)&&(Ke(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Bn(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function Ln(t,e){let r=t.parent;if(!Ce(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function vt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?T(e):T(pr(or(e)),S):Y(A,H.split(e))}function yt(t,e){return Ce(t,e)&&t.name==="script"}function wt(t){return t>=9&&t<=32||t==160}function fr(t){return 48<=t&&t<=57}function bt(t){return t>=97&&t<=122||t>=65&&t<=90}function Fn(t){return t>=97&&t<=102||t>=65&&t<=70||fr(t)}function mr(t){return t===10||t===13}function dr(t){return 48<=t&&t<=55}function gr(t){return t===39||t===34||t===96}var Pi=/-+([a-z0-9])/g;function Nn(t){return t.replace(Pi,(...e)=>e[1].toUpperCase())}var ne=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(;a0&&(s--,a++,!(n[s]==` -`&&++o==r)););for(a=0,o=0;a]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Ni=[Ri,$i,Mi,Hi,Vi,zi,Ui,Wi,Gi,qi];function Ii(t,e){for(let r of Ni)r(t,e);return t}function Ri(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===` -`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function $i(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let s=0;se.type==="cdata",e=>``)}function qi(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!H.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n`+s.firstChild.value+``+a.value,i.sourceSpan=new f(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function Hi(t,e){if(e.parser==="html")return;let r=/{{(.+?)}}/s;t.walk(n=>{if(Cn(n))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new f(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new f(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new f(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function Vi(t){t.walk(e=>{if(!e.children)return;if(e.children.length===0||e.children.length===1&&e.children[0].type==="text"&&H.trim(e.children[0].value).length===0){e.hasDanglingSpaces=e.children.length>0,e.children=[];return}let r=Sn(e),n=ur(e);if(!r)for(let s=0;s{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function Wi(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function zi(t,e){t.walk(r=>{r.cssDisplay=xn(r,e)})}function Gi(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=An(r);return}for(let s of n)s.isLeadingSpaceSensitive=_n(s,e),s.isTrailingSpaceSensitive=En(s,e);for(let s=0;s/.test(t)}function $n(t){return` +`)}function hr(t){return w(!1,w(!1,t,"'","'"),""",'"')}function P(t){return hr(t.value)}var $i=new Set(["template","style","script"]);function Je(t,e){return _e(t,e)&&!$i.has(t.fullName)}function _e(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function vt(t,e){return _e(t,e)&&(Je(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Fn(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function Pn(t,e){let r=t.parent;if(!_e(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function yt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?T(e):T(pr(or(e)),S):M(A,F.split(e))}function wt(t,e){return _e(t,e)&&t.name==="script"}var fr=/{{(.+?)}}/s;async function Nn(t,e){let r=[];for(let[n,s]of t.split(fr).entries())if(n%2===0)r.push(T(s));else try{r.push(E(["{{",L([A,await x(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0,trailingComma:"none"})]),A,"}}"]))}catch{r.push("{{",T(s),"}}")}return r}function mr({parser:t}){return(e,r,n)=>x(P(n.node),e,{parser:t,trailingComma:"none"},j)}var Oi=mr({parser:"__ng_action"}),Mi=mr({parser:"__ng_binding"}),qi=mr({parser:"__ng_directive"});function Hi(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return Oi;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/.test(n)||/^ng-(?:if|show|hide|class|style)$/.test(n))return Mi;if(n.startsWith("*"))return qi;let s=P(r);if(/^i18n(?:-.+)?$/.test(n))return()=>ge(Ct(yt(r,s.trim())),!s.includes("@@"));if(fr.test(s))return i=>Nn(s,i)}var In=Hi;function Vi(t,e){let{node:r}=t,n=P(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/).join(" ")}var Rn=Vi;function $n(t){return t===" "||t===` +`||t==="\f"||t==="\r"||t===" "}var Ui=/^[ \t\n\r\u000c]+/,Wi=/^[, \t\n\r\u000c]+/,zi=/^[^ \t\n\r\u000c]+/,Gi=/[,]+$/,On=/^\d+$/,Yi=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function ji(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let _,D=C.exec(t.substring(o));if(D)return[_]=D,o+=_.length,_}let l=[];for(;;){if(p(Wi),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(zi),n=[],r.slice(-1)===","?(r=r.replace(Gi,""),g()):m()}function m(){for(p(Ui),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if($n(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),g();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),g();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),g();return}else s+=a;else if(i==="after descriptor"&&!$n(a))if(a===""){g();return}else i="in descriptor",o-=1;o+=1}}function g(){let C=!1,_,D,I,B,c={},d,y,O,b,V;for(B=0;BXi(P(t.node))}var qn={width:"w",height:"h",density:"x"},Qi=Object.keys(qn);function Xi(t){let e=Mn(t),r=Qi.filter(l=>e.some(m=>Object.prototype.hasOwnProperty.call(m,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=qn[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let m=l.indexOf(".");return m===-1?l.length:m}),p=Math.max(...u);return ge(M([",",A],i.map((l,m)=>{let g=[l],C=o[m];if(C){let _=a-l.length+1,D=p-u[m],I=" ".repeat(_+D);g.push(me(I," "),C+s)}return g})))}var Hn=Ki;function Vn(t,e){let{node:r}=t,n=P(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>ge(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var gr=new WeakMap;function Ji(t,e){let{root:r}=t;return gr.has(r)||gr.set(r,r.children.some(n=>wt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),gr.get(r)}var Oe=Ji;function Un(t,e,r){let{node:n}=r,s=P(n);return x(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},j)}function Wn(t,e,{parseWithTs:r}){return x(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}function zn(t){let e=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/,r=/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$_a-z][\w$]*])*$/i,n=t.trim();return e.test(n)||r.test(n)}async function Gn(t,e,r,n){let s=P(r.node),{left:i,operator:a,right:o}=Zi(s),u=Oe(r,n);return[E(await x(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await x(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function Zi(t){let e=/(.*?)\s+(in|of)\s+(.*)/s,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/,n=/^\(|\)$/g,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=w(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function ea(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return Gn;if(n==="generic"&&wt(r.parent,e))return Un;let s=P(r),i=Oe(t,e);if(Fn(r)||Pn(r,e))return a=>Wn(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>ta(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith("v-bind:"))return a=>ra(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>Yn(s,a,{parseWithTs:i})}function ta(t,e,{parseWithTs:r}){return zn(t)?Yn(t,e,{parseWithTs:r}):x(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},j)}function ra(t,e,{parseWithTs:r}){return x(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},j)}function Yn(t,e,{parseWithTs:r}){return x(t,e,{parser:r?"__ts_expression":"__js_expression"},j)}var jn=ea;function na(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[Hn,Vn,Rn,jn,In]){let s=n(t,e);if(s)return sa(s)}}}function sa(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=St(i,a=>typeof a=="string"?w(!1,a,'"',"""):a),[n.node.rawName,'="',E(i),'"']}}var Kn=na;var Qn=new Proxy(()=>{},{get:()=>Qn}),dr=Qn;function ia(t){return Array.isArray(t)&&t.length>0}var Me=ia;function se(t){return t.sourceSpan.start.offset}function ie(t){return t.sourceSpan.end.offset}function Ze(t,e){return[t.isSelfClosing?"":aa(t,e),Ee(t,e)]}function aa(t,e){return t.lastChild&&ve(t.lastChild)?"":[oa(t,e),bt(t,e)]}function Ee(t,e){return(t.next?K(t.next):De(t.parent))?"":[Ae(t,e),W(t,e)]}function oa(t,e){return De(t)?Ae(t.lastChild,e):""}function W(t,e){return ve(t)?bt(t.parent,e):et(t)?Tt(t.next):""}function bt(t,e){if(dr(!t.isSelfClosing),Xn(t,e))return"";switch(t.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function Xn(t,e){return!t.isSelfClosing&&!t.endSourceSpan&&(Se(t)||Et(t.parent,e))}function K(t){return t.prev&&t.prev.type!=="docType"&&t.type!=="angularControlFlowBlock"&&!R(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function De(t){var e;return((e=t.lastChild)==null?void 0:e.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!R(Dt(t.lastChild))&&!Ce(t)}function ve(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&R(Dt(t))}function et(t){return t.next&&!R(t.next)&&R(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function ua(t){let e=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);return e?e[1]?e[1].split(/\s+/):!0:!1}function tt(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function la(t,e,r){var m;let{node:n}=t;if(!Me(n.attrs))return n.isSelfClosing?" ":"";let s=((m=n.prev)==null?void 0:m.type)==="comment"&&ua(n.prev.value),i=typeof s=="boolean"?()=>s:Array.isArray(s)?g=>s.includes(g.rawName):()=>!1,a=t.map(({node:g})=>i(g)?T(e.originalText.slice(se(g),ie(g))):r(),"attrs"),o=n.type==="element"&&n.fullName==="script"&&n.attrs.length===1&&n.attrs[0].fullName==="src"&&n.children.length===0,p=e.singleAttributePerLine&&n.attrs.length>1&&!_e(n,e)?S:A,l=[L([o?" ":A,M(p,a)])];return n.firstChild&&tt(n.firstChild)||n.isSelfClosing&&De(n.parent)||o?l.push(n.isSelfClosing?" ":""):l.push(e.bracketSameLine?n.isSelfClosing?" ":"":n.isSelfClosing?A:v),l}function ca(t){return t.firstChild&&tt(t.firstChild)?"":xt(t)}function rt(t,e,r){let{node:n}=t;return[ye(n,e),la(t,e,r),n.isSelfClosing?"":ca(n)]}function ye(t,e){return t.prev&&et(t.prev)?"":[z(t,e),Tt(t)]}function z(t,e){return tt(t)?xt(t.parent):K(t)?Ae(t.prev,e):""}function Tt(t){switch(t.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<${t.rawName}`;default:return`<${t.rawName}`}}function xt(t){switch(dr(!t.isSelfClosing),t.type){case"ieConditionalComment":return"]>";case"element":if(t.condition)return">";default:return">"}}function pa(t,e){if(!t.endSourceSpan)return"";let r=t.startSourceSpan.end.offset;t.firstChild&&tt(t.firstChild)&&(r-=xt(t).length);let n=t.endSourceSpan.start.offset;return t.lastChild&&ve(t.lastChild)?n+=bt(t,e).length:De(t)&&(n-=Ae(t.lastChild,e).length),e.originalText.slice(r,n)}var kt=pa;var ha=new Set(["if","else if","for","switch","case"]);function fa(t,e){let{node:r}=t;switch(r.type){case"element":if(U(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&vt(r,e)){let n=cr(r,e);return n?async(s,i)=>{let a=kt(r,e),o=/^\s*$/.test(a),u="";return o||(u=await s(or(a),{parser:n,__embeddedInHtml:!0}),o=u===""),[z(r,e),E(rt(t,e,i)),o?"":S,u,o?"":S,Ze(r,e),W(r,e)]}:void 0}break;case"text":if(U(r.parent)){let n=cr(r.parent,e);if(n)return async s=>{let i=n==="markdown"?pr(r.value.replace(/^[^\S\n]*\n/,"")):r.value,a={parser:n,__embeddedInHtml:!0};if(e.parser==="html"&&n==="babel"){let o="script",{attrMap:u}=r.parent;u&&(u.type==="module"||u.type==="text/babel"&&u["data-type"]==="module")&&(o="module"),a.__babelSourceType=o}return[ne,z(r,e),await s(i,a),W(r,e)]}}else if(r.parent.type==="interpolation")return async n=>{let s={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return e.parser==="angular"?(s.parser="__ng_interpolation",s.trailingComma="none"):e.parser==="vue"?s.parser=Oe(t,e)?"__vue_ts_expression":"__vue_expression":s.parser="__js_expression",[L([A,await n(r.value,s)]),r.parent.next&&K(r.parent.next)?" ":A]};break;case"attribute":return Kn(t,e);case"front-matter":return n=>pn(r,n);case"angularControlFlowBlockParameters":return ha.has(t.parent.name)?hn:void 0}}var Jn=fa;var nt=null;function st(t){if(nt!==null&&typeof nt.property){let e=nt;return nt=st.prototype=null,e}return nt=st.prototype=t??Object.create(null),new st}var ma=10;for(let t=0;t<=ma;t++)st();function Cr(t){return st(t)}function ga(t,e="type"){Cr(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var Zn=ga;var da={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},es=da;var Ca=Zn(es),ts=Ca;function rs(t){return/^\s*/.test(t)}function ns(t){return` -`+t}function se(t){return t.sourceSpan.start.offset}function ie(t){return t.sourceSpan.end.offset}async function Yi(t,e){if(t.lang==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return en([t.startDelimiter,S,n,n?S:"",t.endDelimiter])}}var On=Yi;var Mn=new Proxy(()=>{},{get:()=>Mn}),Cr=Mn;function ji(t){return Array.isArray(t)&&t.length>0}var xt=ji;function Qe(t,e){return[t.isSelfClosing?"":Ki(t,e),Xe(t,e)]}function Ki(t,e){return t.lastChild&&Ae(t.lastChild)?"":[Qi(t,e),kt(t,e)]}function Xe(t,e){return(t.next?j(t.next):Ee(t.parent))?"":[_e(t,e),U(t,e)]}function Qi(t,e){return Ee(t)?_e(t.lastChild,e):""}function U(t,e){return Ae(t)?kt(t.parent,e):Je(t)?Bt(t.next):""}function kt(t,e){if(Cr(!t.isSelfClosing),qn(t,e))return"";switch(t.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function qn(t,e){return!t.isSelfClosing&&!t.endSourceSpan&&(Ge(t)||_t(t.parent,e))}function j(t){return t.prev&&t.prev.type!=="docType"&&t.type!=="angularControlFlowBlock"&&!N(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function Ee(t){var e;return((e=t.lastChild)==null?void 0:e.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!N(At(t.lastChild))&&!ge(t)}function Ae(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&N(At(t))}function Je(t){return t.next&&!N(t.next)&&N(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function Xi(t){let e=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);return e?e[1]?e[1].split(/\s+/):!0:!1}function Ze(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function Ji(t,e,r){var m;let{node:n}=t;if(!xt(n.attrs))return n.isSelfClosing?" ":"";let s=((m=n.prev)==null?void 0:m.type)==="comment"&&Xi(n.prev.value),i=typeof s=="boolean"?()=>s:Array.isArray(s)?d=>s.includes(d.rawName):()=>!1,a=t.map(({node:d})=>i(d)?T(e.originalText.slice(se(d),ie(d))):r(),"attrs"),o=n.type==="element"&&n.fullName==="script"&&n.attrs.length===1&&n.attrs[0].fullName==="src"&&n.children.length===0,p=e.singleAttributePerLine&&n.attrs.length>1&&!Ce(n,e)?S:A,l=[R([o?" ":A,Y(p,a)])];return n.firstChild&&Ze(n.firstChild)||n.isSelfClosing&&Ee(n.parent)||o?l.push(n.isSelfClosing?" ":""):l.push(e.bracketSameLine?n.isSelfClosing?" ":"":n.isSelfClosing?A:b),l}function Zi(t){return t.firstChild&&Ze(t.firstChild)?"":Lt(t)}function et(t,e,r){let{node:n}=t;return[tt(n,e),Ji(t,e,r),n.isSelfClosing?"":Zi(n)]}function tt(t,e){return t.prev&&Je(t.prev)?"":[W(t,e),Bt(t)]}function W(t,e){return Ze(t)?Lt(t.parent):j(t)?_e(t.prev,e):""}function Bt(t){switch(t.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<${t.rawName}`;default:return`<${t.rawName}`}}function Lt(t){switch(Cr(!t.isSelfClosing),t.type){case"ieConditionalComment":return"]>";case"element":if(t.condition)return">";default:return">"}}var Sr=new WeakMap;function ea(t,e){let{root:r}=t;return Sr.has(r)||Sr.set(r,r.children.some(n=>yt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),Sr.get(r)}var $e=ea;function ta(t,e){if(!t.endSourceSpan)return"";let r=t.startSourceSpan.end.offset;t.firstChild&&Ze(t.firstChild)&&(r-=Lt(t).length);let n=t.endSourceSpan.start.offset;return t.lastChild&&Ae(t.lastChild)?n+=kt(t,e).length:Ee(t)&&(n-=_e(t.lastChild,e).length),e.originalText.slice(r,n)}var Ft=ta;function Hn(t){return t===" "||t===` -`||t==="\f"||t==="\r"||t===" "}var ra=/^[ \t\n\r\u000c]+/,na=/^[, \t\n\r\u000c]+/,sa=/^[^ \t\n\r\u000c]+/,ia=/[,]+$/,Vn=/^\d+$/,aa=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function oa(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let _,D=C.exec(t.substring(o));if(D)return[_]=D,o+=_.length,_}let l=[];for(;;){if(p(na),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(sa),n=[],r.slice(-1)===","?(r=r.replace(ia,""),d()):m()}function m(){for(p(ra),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if(Hn(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),d();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),d();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),d();return}else s+=a;else if(i==="after descriptor"&&!Hn(a))if(a===""){d();return}else i="in descriptor",o-=1;o+=1}}function d(){let C=!1,_,D,P,B,c={},g,y,$,w,q;for(B=0;B{s=n(a,o)});let i=await e(t,r,e);return s?E(i):De(i)}function ua(t){if(t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"))return()=>ca(L(t.node))}var Wn={width:"w",height:"h",density:"x"},la=Object.keys(Wn);function ca(t){let e=Un(t),r=la.filter(l=>e.some(m=>Object.prototype.hasOwnProperty.call(m,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=Wn[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let m=l.indexOf(".");return m===-1?l.length:m}),p=Math.max(...u);return De(Y([",",A],i.map((l,m)=>{let d=[l],C=o[m];if(C){let _=a-l.length+1,D=p-u[m],P=" ".repeat(_+D);d.push(fe(P," "),C+s)}return d})))}var zn=ua;function pa(t,e){let{node:r}=t,n=L(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/).join(" ")}var Gn=pa;function Yn(t,e){let{node:r}=t,n=L(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>De(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}async function jn(t,e,r,n){let s=L(r.node),{left:i,operator:a,right:o}=ha(s),u=$e(r,n);return[E(await x(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await x(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function ha(t){let e=/(.*?)\s+(in|of)\s+(.*)/s,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/,n=/^\(|\)$/g,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=v(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function Kn(t,e,r){let{node:n}=r,s=L(n);return x(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},K)}function Qn(t,e,{parseWithTs:r}){return x(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}function Xn(t){let e=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/,r=/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$_a-z][\w$]*])*$/i,n=t.trim();return e.test(n)||r.test(n)}function fa(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return jn;if(n==="generic"&&yt(r.parent,e))return Kn;let s=L(r),i=$e(t,e);if(Bn(r)||Ln(r,e))return a=>Qn(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>ma(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith("v-bind:"))return a=>da(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>Jn(s,a,{parseWithTs:i})}function ma(t,e,{parseWithTs:r}){return Xn(t)?Jn(t,e,{parseWithTs:r}):x(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},K)}function da(t,e,{parseWithTs:r}){return x(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},K)}function Jn(t,e,{parseWithTs:r}){return x(t,e,{parser:r?"__ts_expression":"__js_expression"},K)}var Zn=fa;var _r=/{{(.+?)}}/s;async function es(t,e){let r=[];for(let[n,s]of t.split(_r).entries())if(n%2===0)r.push(T(s));else try{r.push(E(["{{",R([A,await x(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0,trailingComma:"none"})]),A,"}}"]))}catch{r.push("{{",T(s),"}}")}return r}function Er({parser:t}){return(e,r,n)=>x(L(n.node),e,{parser:t,trailingComma:"none"},K)}var ga=Er({parser:"__ng_action"}),Ca=Er({parser:"__ng_binding"}),Sa=Er({parser:"__ng_directive"});function _a(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return ga;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/.test(n)||/^ng-(?:if|show|hide|class|style)$/.test(n))return Ca;if(n.startsWith("*"))return Sa;let s=L(r);if(/^i18n(?:-.+)?$/.test(n))return()=>De(gt(vt(r,s.trim())),!s.includes("@@"));if(_r.test(s))return i=>es(s,i)}var ts=_a;function Ea(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[zn,Yn,Gn,Zn,ts]){let s=n(t,e);if(s)return Aa(s)}}}function Aa(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=Ct(i,a=>typeof a=="string"?v(!1,a,'"',"""):a),[n.node.rawName,'="',E(i),'"']}}var rs=Ea;function Da(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/.test(i)?"":x(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1,trailingComma:"none"},K)}var ns=Da;var va=new Set(["if","else if","for","switch","case"]);function ya(t,e){let{node:r}=t;switch(r.type){case"element":if(V(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&Dt(r,e)){let n=cr(r,e);return n?async(s,i)=>{let a=Ft(r,e),o=/^\s*$/.test(a),u="";return o||(u=await s(or(a),{parser:n,__embeddedInHtml:!0}),o=u===""),[W(r,e),E(et(t,e,i)),o?"":S,u,o?"":S,Qe(r,e),U(r,e)]}:void 0}break;case"text":if(V(r.parent)){let n=cr(r.parent,e);if(n)return async s=>{let i=n==="markdown"?pr(r.value.replace(/^[^\S\n]*\n/,"")):r.value,a={parser:n,__embeddedInHtml:!0};if(e.parser==="html"&&n==="babel"){let o="script",{attrMap:u}=r.parent;u&&(u.type==="module"||u.type==="text/babel"&&u["data-type"]==="module")&&(o="module"),a.__babelSourceType=o}return[re,W(r,e),await s(i,a,{stripTrailingHardline:!0}),U(r,e)]}}else if(r.parent.type==="interpolation")return async n=>{let s={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return e.parser==="angular"?(s.parser="__ng_interpolation",s.trailingComma="none"):e.parser==="vue"?s.parser=$e(t,e)?"__vue_ts_expression":"__vue_expression":s.parser="__js_expression",[R([A,await n(r.value,s)]),r.parent.next&&j(r.parent.next)?" ":A]};break;case"attribute":return rs(t,e);case"front-matter":return n=>On(r,n);case"angularControlFlowBlockParameters":return va.has(t.parent.name)?ns:void 0}}var ss=ya;function rt(t,e,r){let n=t.node;return Ge(n)?[W(n,e),T(e.originalText.slice(se(n)+(n.prev&&Je(n.prev)?Bt(n).length:0),ie(n)-(n.next&&j(n.next)?_e(n,e).length:0))),U(n,e)]:r()}function Pt(t,e){return N(t)&&N(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?Et(e)?S:A:"":Et(e)?S:b:Je(t)&&(Ge(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&j(e)?"":!e.isLeadingSpaceSensitive||Et(e)||j(e)&&t.lastChild&&Ae(t.lastChild)&&t.lastChild.lastChild&&Ae(t.lastChild.lastChild)?S:e.hasLeadingSpaces?A:b}function Oe(t,e,r){let{node:n}=t;if(lr(n))return[re,...t.map(i=>{let a=i.node,o=a.prev?Pt(a.prev,a):"";return[o?[o,Ye(a.prev)?S:""]:"",rt(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if(N(o)){if(o.prev&&N(o.prev)){let _=Pt(o.prev,o);if(_)return Ye(o.prev)?[S,S,rt(i,e,r)]:[_,rt(i,e,r)]}return rt(i,e,r)}let u=[],p=[],l=[],m=[],d=o.prev?Pt(o.prev,o):"",C=o.next?Pt(o,o.next):"";return d&&(Ye(o.prev)?u.push(S,S):d===S?u.push(S):N(o.prev)?p.push(d):p.push(fe("",b,{groupId:s[a-1]}))),C&&(Ye(o)?N(o.next)&&m.push(S,S):C===S?N(o.next)&&m.push(S):l.push(C)),[...u,E([...p,E([rt(i,e,r),...l],{id:s[a]})]),...m]},"children")}function is(t,e,r){let{node:n}=t;if(_t(n,e))return[W(n,e),E(et(t,e,r)),T(Ft(n,e)),...Qe(n,e),U(n,e)];let s=n.children.length===1&&n.firstChild.type==="interpolation"&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>E([E(et(t,e,r),{id:i}),l,Qe(n,e)]),o=l=>s?tn(l,{groupId:i}):(V(n)||Ke(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:R(l),u=()=>s?fe(b,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?A:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Zr(b):b,p=()=>(n.next?j(n.next):Ee(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?fe(b,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?A:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`).test(n.lastChild.value)?"":b;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?A:""):a([Dn(n)?re:"",o([u(),Oe(t,e,r)]),p()])}var as=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function os(t,e,r){let{node:n}=t,s=[];wa(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=us(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(R([S,Oe(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function us(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=as.get(t.name))!=null&&r.has(t.next.name)))}function wa(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!us(t.previous)}function ls(t,e,r){return[R([b,Y([";",A],t.map(r,"children"))]),b]}var nt=null;function st(t){if(nt!==null&&typeof nt.property){let e=nt;return nt=st.prototype=null,e}return nt=st.prototype=t??Object.create(null),new st}var ba=10;for(let t=0;t<=ba;t++)st();function Ar(t){return st(t)}function Ta(t,e="type"){Ar(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var cs=Ta;var xa={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[]},ps=xa;var ka=cs(ps),hs=ka;function Ba(t,e,r){let{node:n}=t;switch(n.type){case"front-matter":return T(n.raw);case"root":return e.__onHtmlRoot&&e.__onHtmlRoot(n),[E(Oe(t,e,r)),S];case"element":case"ieConditionalComment":return is(t,e,r);case"angularControlFlowBlock":return os(t,e,r);case"angularControlFlowBlockParameters":return ls(t,e,r);case"angularControlFlowBlockParameter":return H.trim(n.expression);case"ieConditionalStartComment":case"ieConditionalEndComment":return[tt(n),Xe(n)];case"interpolation":return[tt(n,e),...t.map(r,"children"),Xe(n,e)];case"text":{if(n.parent.type==="interpolation"){let i=/\n[^\S\n]*$/,a=i.test(n.value),o=a?n.value.replace(i,""):n.value;return[T(o),a?S:""]}let s=nn([W(n,e),...vt(n),U(n,e)]);return Array.isArray(s)?gt(s):s}case"docType":return[E([tt(n,e)," ",v(!1,n.value.replace(/^html\b/i,"html"),/\s+/g," ")]),Xe(n,e)];case"comment":return[W(n,e),T(e.originalText.slice(se(n),ie(n))),U(n,e)];case"attribute":{if(n.value===null)return n.rawName;let s=hr(n.value),i=on(s,'"');return[n.rawName,"=",i,T(i==='"'?v(!1,s,'"',"""):v(!1,s,"'","'")),i]}case"cdata":default:throw new sn(n,"HTML")}}var La={preprocess:In,print:Ba,insertPragma:$n,massageAstNode:cn,embed:ss,getVisitorKeys:hs},fs=La;var Vr={};Yr(Vr,{angular:()=>To,html:()=>bo,lwc:()=>ko,vue:()=>xo});var ep=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var ms;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(ms||(ms={}));var ds;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(ds||(ds={}));var Dr={name:"custom-elements"},vr={name:"no-errors-schema"};var X;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(X||(X={}));var gs;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(gs||(gs={}));var F;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(F||(F={}));function it(t){if(t[0]!=":")return[null,t];let e=t.indexOf(":",1);if(e===-1)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[t.slice(1,e),t.slice(e+1)]}function yr(t){return it(t)[1]==="ng-container"}function wr(t){return it(t)[1]==="ng-content"}function Me(t){return t===null?null:it(t)[0]}function qe(t,e){return t?`:${t}:${e}`:e}var It;function br(){return It||(It={},Nt(X.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),Nt(X.STYLE,["*|style"]),Nt(X.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),Nt(X.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),It}function Nt(t,e){for(let r of e)It[r.toLowerCase()]=t}var Rt=class{};var Fa="boolean",Pa="number",Na="string",Ia="object",Ra=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],Cs=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),$a=Array.from(Cs).reduce((t,[e,r])=>(t.set(e,r),t),new Map),$t=class extends Rt{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,Ra.forEach(e=>{let r=new Map,n=new Set,[s,i]=e.split("|"),a=i.split(","),[o,u]=s.split("^");o.split(",").forEach(l=>{this._schema.set(l.toLowerCase(),r),this._eventSchema.set(l.toLowerCase(),n)});let p=u&&this._schema.get(u.toLowerCase());if(p){for(let[l,m]of p)r.set(l,m);for(let l of this._eventSchema.get(u.toLowerCase()))n.add(l)}a.forEach(l=>{if(l.length>0)switch(l[0]){case"*":n.add(l.substring(1));break;case"!":r.set(l.substring(1),Fa);break;case"#":r.set(l.substring(1),Pa);break;case"%":r.set(l.substring(1),Ia);break;default:r.set(l,Na)}})})}hasProperty(e,r,n){if(n.some(i=>i.name===vr.name))return!0;if(e.indexOf("-")>-1){if(yr(e)||wr(e))return!1;if(n.some(i=>i.name===Dr.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(r)}hasElement(e,r){return r.some(n=>n.name===vr.name)||e.indexOf("-")>-1&&(yr(e)||wr(e)||r.some(n=>n.name===Dr.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,r,n){n&&(r=this.getMappedPropName(r)),e=e.toLowerCase(),r=r.toLowerCase();let s=br()[e+"|"+r];return s||(s=br()["*|"+r],s||X.NONE)}getMappedPropName(e){return Cs.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... -If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>$a.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return Nn(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(Oa(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function Oa(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var h=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=F.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Ss,at;function He(t){return at||(Ss=new h({canSelfClose:!0}),at=Object.assign(Object.create(null),{base:new h({isVoid:!0}),meta:new h({isVoid:!0}),area:new h({isVoid:!0}),embed:new h({isVoid:!0}),link:new h({isVoid:!0}),img:new h({isVoid:!0}),input:new h({isVoid:!0}),param:new h({isVoid:!0}),hr:new h({isVoid:!0}),br:new h({isVoid:!0}),source:new h({isVoid:!0}),track:new h({isVoid:!0}),wbr:new h({isVoid:!0}),p:new h({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 h({closedByChildren:["tbody","tfoot"]}),tbody:new h({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new h({closedByChildren:["tbody"],closedByParent:!0}),tr:new h({closedByChildren:["tr"],closedByParent:!0}),td:new h({closedByChildren:["td","th"],closedByParent:!0}),th:new h({closedByChildren:["td","th"],closedByParent:!0}),col:new h({isVoid:!0}),svg:new h({implicitNamespacePrefix:"svg"}),foreignObject:new h({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new h({implicitNamespacePrefix:"math"}),li:new h({closedByChildren:["li"],closedByParent:!0}),dt:new h({closedByChildren:["dt","dd"]}),dd:new h({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new h({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new h({closedByChildren:["optgroup"],closedByParent:!0}),option:new h({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new h({ignoreFirstLf:!0}),listing:new h({ignoreFirstLf:!0}),style:new h({contentType:F.RAW_TEXT}),script:new h({contentType:F.RAW_TEXT}),title:new h({contentType:{default:F.ESCAPABLE_RAW_TEXT,svg:F.PARSABLE_DATA}}),textarea:new h({contentType:F.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new $t().allKnownElementNames().forEach(e=>{!at[e]&&Me(e)===null&&(at[e]=new h({canSelfClose:!1}))})),at[t]??Ss}var ve=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},Ot=class extends ve{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="text"}visit(e,r){return e.visitText(this,r)}},Mt=class extends ve{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="cdata"}visit(e,r){return e.visitCdata(this,r)}},qt=class extends ve{constructor(e,r,n,s,i,a){super(s,a),this.switchValue=e,this.type=r,this.cases=n,this.switchValueSourceSpan=i}visit(e,r){return e.visitExpansion(this,r)}},Ht=class{constructor(e,r,n,s,i){this.value=e,this.expression=r,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=i}visit(e,r){return e.visitExpansionCase(this,r)}},Vt=class extends ve{constructor(e,r,n,s,i,a,o){super(n,o),this.name=e,this.value=r,this.keySpan=s,this.valueSpan=i,this.valueTokens=a,this.type="attribute"}visit(e,r){return e.visitAttribute(this,r)}get nameSpan(){return this.keySpan}},z=class extends ve{constructor(e,r,n,s,i,a=null,o=null,u){super(s,u),this.name=e,this.attrs=r,this.children=n,this.startSourceSpan=i,this.endSourceSpan=a,this.nameSpan=o,this.type="element"}visit(e,r){return e.visitElement(this,r)}},Ut=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="comment"}visit(e,r){return e.visitComment(this,r)}},Wt=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="docType"}visit(e,r){return e.visitDocType(this,r)}},J=class{constructor(e,r,n,s,i,a=null){this.name=e,this.parameters=r,this.children=n,this.sourceSpan=s,this.startSourceSpan=i,this.endSourceSpan=a,this.type="block"}visit(e,r){return e.visitBlock(this,r)}},ot=class{constructor(e,r){this.expression=e,this.sourceSpan=r,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,r){return e.visitBlockParameter(this,r)}};function zt(t,e,r=null){let n=[],s=t.visit?i=>t.visit(i,r)||i.visit(t,r):i=>i.visit(t,r);return e.forEach(i=>{let a=s(i);a&&n.push(a)}),n}var ut=class{constructor(){}visitElement(e,r){this.visitChildren(r,n=>{n(e.attrs),n(e.children)})}visitAttribute(e,r){}visitText(e,r){}visitCdata(e,r){}visitComment(e,r){}visitDocType(e,r){}visitExpansion(e,r){return this.visitChildren(r,n=>{n(e.cases)})}visitExpansionCase(e,r){}visitBlock(e,r){this.visitChildren(r,n=>{n(e.parameters),n(e.children)})}visitBlockParameter(e,r){}visitChildren(e,r){let n=[],s=this;function i(a){a&&n.push(zt(s,a,e))}return r(i),Array.prototype.concat.apply([],n)}};var Ve={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` -`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\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",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",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",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",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",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},qa="\uE500";Ve.ngsp=qa;var Ha=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function _s(t,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${t}' to be an array, [start, end].`);if(e!=null){let r=e[0],n=e[1];Ha.forEach(s=>{if(s.test(r)||s.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var Tr=class t{static fromArray(e){return e?(_s("interpolation",e),new t(e[0],e[1])):xr}constructor(e,r){this.start=e,this.end=r}},xr=new Tr("{{","}}");var ct=class extends Re{constructor(e,r,n){super(n,e),this.tokenType=r}},Pr=class{constructor(e,r,n){this.tokens=e,this.errors=r,this.nonNormalizedIcuExpressions=n}};function Ps(t,e,r,n={}){let s=new Nr(new Se(t,e),r,n);return s.tokenize(),new Pr(fo(s.tokens),s.errors,s.nonNormalizedIcuExpressions)}var ao=/\r\n?/g;function Ue(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function ws(t){return`Unknown entity "${t}" - use the "&#;" or "&#x;" syntax`}function oo(t,e){return`Unable to parse entity "${e}" - ${t} character reference entities must end with ";"`}var jt;(function(t){t.HEX="hexadecimal",t.DEC="decimal"})(jt||(jt={}));var pt=class{constructor(e){this.error=e}},Nr=class{constructor(e,r,n){this._getTagContentType=r,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||xr,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=n.canSelfClose||!1,this._allowHtmComponentClosingTags=n.allowHtmComponentClosingTags||!1;let s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new Ir(e,s):new Kt(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=n.tokenizeBlocks??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(ao,` -`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(30),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>wt(n)?!e:xs(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(k),this._attemptCharCode(41))this._attemptCharCodeUntilFn(k);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(ks);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&gr(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(ks)}}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(po(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new ct("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new ct("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,r){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new ct(e,this._currentTokenType,r);return this._currentTokenStart=null,this._currentTokenType=null,new pt(n)}handleError(e){if(e instanceof ht&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof pt)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return ho(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let r=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(r))}_attemptStr(e){let r=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),r="";for(;this._cursor.peek()!==58&&!uo(this._cursor.peek());)this._cursor.advance();let n;this._cursor.peek()===58?(r=this._cursor.getChars(e),this._cursor.advance(),n=this._cursor.clone()):n=e,this._requireCharCodeUntilFn(bs,r===""?0:1);let s=this._cursor.getChars(n);return[r,s]}_consumeTagOpen(e){let r,n,s,i=[];try{if(!bt(this._cursor.peek()))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],r=s.parts[1],this._attemptCharCodeUntilFn(k);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,u]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(k),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(k);let p=this._consumeAttributeValue();i.push({prefix:o,name:u,value:p})}else i.push({prefix:o,name:u});this._attemptCharCodeUntilFn(k)}this._consumeTagOpenEnd()}catch(o){if(o instanceof pt){s?s.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let a=this._getTagContentType(r,n,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(n,r),a===F.RAW_TEXT?this._consumeRawTextWithTagClose(n,r,!1):a===F.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,r,!0)}_consumeRawTextWithTagClose(e,r,n){this._consumeRawText(n,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(k),!this._attemptStrCaseInsensitive(e?`${e}:${r}`:r))?!1:(this._attemptCharCodeUntilFn(k),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(s=>s===62,3),this._cursor.advance(),this._endToken([e,r]),this._handleFullNameStackForTagClose(e,r)}_consumeTagOpenStart(e){this._beginToken(0,e);let r=this._consumePrefixAndName();return this._endToken(r)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(Ue(e),this._cursor.getSpan());this._beginToken(14);let r=this._consumePrefixAndName();return this._endToken(r),r}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let r=this._cursor.peek();this._consumeQuote(r);let n=()=>this._cursor.peek()===r;e=this._consumeWithInterpolation(16,17,n,n),this._consumeQuote(r)}else{let r=()=>bs(this._cursor.peek());e=this._consumeWithInterpolation(16,17,r,r)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(k),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(k),this._requireCharCode(62),this._endToken([]);else{let[r,n]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(k),this._requireCharCode(62),this._endToken([r,n]),this._handleFullNameStackForTagClose(r,n)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),r=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([r]);else{let s=this._endToken([e]);r!==e&&this.nonNormalizedIcuExpressions.push(s)}this._requireCharCode(44),this._attemptCharCodeUntilFn(k),this._beginToken(7);let n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(k)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(k),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(k),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(k),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,r,n,s){this._beginToken(e);let i=[];for(;!n();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(r,o,s),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let a=this._processCarriageReturns(i.join(""));return this._endToken([a]),a}_consumeInterpolation(e,r,n){let s=[];this._beginToken(e,r),s.push(this._interpolationConfig.start);let i=this._cursor.clone(),a=null,o=!1;for(;this._cursor.peek()!==0&&(n===null||!n());){let u=this._cursor.clone();if(this._isTagStart()){this._cursor=u,s.push(this._getProcessedChars(i,u)),this._endToken(s);return}if(a===null)if(this._attemptStr(this._interpolationConfig.end)){s.push(this._getProcessedChars(i,u)),s.push(this._interpolationConfig.end),this._endToken(s);return}else this._attemptStr("//")&&(o=!0);let p=this._cursor.peek();this._cursor.advance(),p===92?this._cursor.advance():p===a?a=null:!o&&a===null&&gr(p)&&(a=p)}s.push(this._getProcessedChars(i,this._cursor)),this._endToken(s)}_getProcessedChars(e,r){return this._processCarriageReturns(r.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let r=e.peek();if(97<=r&&r<=122||65<=r&&r<=90||r===47||r===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),xs(e.peek()))return!0}return!1}_readUntil(e){let r=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(r)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),r=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!r}return!0}_handleFullNameStackForTagOpen(e,r){let n=qe(e,r);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===n)&&this._fullNameStack.push(n)}_handleFullNameStackForTagClose(e,r){let n=qe(e,r);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===n&&this._fullNameStack.pop()}};function k(t){return!wt(t)||t===0}function bs(t){return wt(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function uo(t){return(t<97||12257)}function lo(t){return t===59||t===0||!Fn(t)}function co(t){return t===59||t===0||!bt(t)}function po(t){return t!==125}function ho(t,e){return Ts(t)===Ts(e)}function Ts(t){return t>=97&&t<=122?t-97+65:t}function xs(t){return bt(t)||fr(t)||t===95}function ks(t){return t!==59&&k(t)}function fo(t){let e=[],r;for(let n=0;n0&&r.indexOf(e.peek())!==-1;)n===e&&(e=e.clone()),e.advance();let s=this.locationFromCursor(e),i=this.locationFromCursor(this),a=n!==e?this.locationFromCursor(n):s;return new f(s,i,a)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new ht('Unexpected character "EOF"',this);let r=this.charAt(e.offset);r===10?(e.line++,e.column=0):mr(r)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new ne(e.file,e.state.offset,e.state.line,e.state.column)}},Ir=class t extends Kt{constructor(e,r){e instanceof t?(super(e),this.internalState={...e.internalState}):(super(e,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new t(this)}getChars(e){let r=e.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(e()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),e()===110)this.state.peek=10;else if(e()===114)this.state.peek=13;else if(e()===118)this.state.peek=11;else if(e()===116)this.state.peek=9;else if(e()===98)this.state.peek=8;else if(e()===102)this.state.peek=12;else if(e()===117)if(this.advanceState(this.internalState),e()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;e()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(e()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(dr(e())){let r="",n=0,s=this.clone();for(;dr(e())&&n<3;)s=this.clone(),r+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=s.internalState}else mr(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,r){let n=this.input.slice(e.internalState.offset,e.internalState.offset+r),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new ht("Invalid hexadecimal escape sequence",e);return s}},ht=class{constructor(e,r){this.msg=e,this.cursor=r}};var I=class t extends Re{static create(e,r,n){return new t(e,r,n)}constructor(e,r,n){super(r,n),this.elementName=e}},Or=class{constructor(e,r){this.rootNodes=e,this.errors=r}},Qt=class{constructor(e){this.getTagDefinition=e}parse(e,r,n,s=!1,i){let a=D=>(P,...B)=>D(P.toLowerCase(),...B),o=s?this.getTagDefinition:a(this.getTagDefinition),u=D=>o(D).getContentType(),p=s?i:a(i),m=Ps(e,r,i?(D,P,B,c)=>{let g=p(D,P,B,c);return g!==void 0?g:u(D)}:u,n),d=n&&n.canSelfClose||!1,C=n&&n.allowHtmComponentClosingTags||!1,_=new Mr(m.tokens,o,d,C,s);return _.build(),new Or(_.rootNodes,m.errors.concat(_.errors))}},Mr=class t{constructor(e,r,n,s,i){this.tokens=e,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=s,this.isTagNameCaseSensitive=i,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==30;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._advance();for(let e of this._containerStack)e instanceof J&&this.errors.push(I.create(e.name,e.sourceSpan,`Unclosed block "${e.name}"`))}_advance(){let e=this._peek;return this._index0)return this.errors=this.errors.concat(i.errors),null;let a=new f(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),o=new f(r.sourceSpan.start,s.sourceSpan.end,r.sourceSpan.fullStart);return new Ht(e.parts[0],i.rootNodes,a,e.sourceSpan,o)}_collectExpansionExpTokens(e){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(Ns(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push(I.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(Ns(n,20))n.pop();else return this.errors.push(I.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===30)return this.errors.push(I.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(e){let r=e.parts[0];if(r.length>0&&r[0]==` +`+t}var ss=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function is(t){let e=ie(t);return t.type==="element"&&!t.endSourceSpan&&Me(t.children)?Math.max(e,is(X(!1,t.children,-1))):e}function it(t,e,r){let n=t.node;if(Se(n)){let s=is(n);return[z(n,e),T(F.trimEnd(e.originalText.slice(se(n)+(n.prev&&et(n.prev)?Tt(n).length:0),s-(n.next&&K(n.next)?Ae(n,e).length:0)))),W(n,e)]}return r()}function Bt(t,e){return R(t)&&R(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?At(e)?S:A:"":At(e)?S:v:et(t)&&(Se(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&K(e)?"":!e.isLeadingSpaceSensitive||At(e)||K(e)&&t.lastChild&&ve(t.lastChild)&&t.lastChild.lastChild&&ve(t.lastChild.lastChild)?S:e.hasLeadingSpaces?A:v}function qe(t,e,r){let{node:n}=t;if(lr(n))return[ne,...t.map(i=>{let a=i.node,o=a.prev?Bt(a.prev,a):"";return[o?[o,Qe(a.prev)?S:""]:"",it(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if(R(o)){if(o.prev&&R(o.prev)){let _=Bt(o.prev,o);if(_)return Qe(o.prev)?[S,S,it(i,e,r)]:[_,it(i,e,r)]}return it(i,e,r)}let u=[],p=[],l=[],m=[],g=o.prev?Bt(o.prev,o):"",C=o.next?Bt(o,o.next):"";return g&&(Qe(o.prev)?u.push(S,S):g===S?u.push(S):R(o.prev)?p.push(g):p.push(me("",v,{groupId:s[a-1]}))),C&&(Qe(o)?R(o.next)&&m.push(S,S):C===S?R(o.next)&&m.push(S):l.push(C)),[...u,E([...p,E([it(i,e,r),...l],{id:s[a]})]),...m]},"children")}function as(t,e,r){let{node:n}=t,s=[];Sa(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=os(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(L([S,qe(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function os(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=ss.get(t.name))!=null&&r.has(t.next.name)))}function Sa(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!Se(e)&&!os(e)}function us(t,e,r){return[L([v,M([";",A],t.map(r,"children"))]),v]}function ls(t,e,r){let{node:n}=t;return[ye(n,e),E([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",L([A,M(A,t.map(r,"cases"))])]:"",v]),Ee(n,e)]}function cs(t,e,r){let{node:n}=t;return[n.value," {",E([L([v,t.map(({node:s})=>s.type==="text"&&!F.trim(s.value)?"":r(),"expression")]),v]),"}"]}function ps(t,e,r){let{node:n}=t;if(Et(n,e))return[z(n,e),E(rt(t,e,r)),T(kt(n,e)),...Ze(n,e),W(n,e)];let s=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>E([E(rt(t,e,r),{id:i}),l,Ze(n,e)]),o=l=>s?tn(l,{groupId:i}):(U(n)||Je(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:L(l),u=()=>s?me(v,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?A:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Zr(v):v,p=()=>(n.next?K(n.next):De(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?me(v,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?A:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`).test(n.lastChild.value)?"":v;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?A:""):a([yn(n)?ne:"",o([u(),qe(t,e,r)]),p()])}function Lt(t){return t>=9&&t<=32||t==160}function Sr(t){return 48<=t&&t<=57}function Ft(t){return t>=97&&t<=122||t>=65&&t<=90}function hs(t){return t>=97&&t<=102||t>=65&&t<=70||Sr(t)}function _r(t){return t===10||t===13}function Er(t){return 48<=t&&t<=55}function Ar(t){return t===39||t===34||t===96}var _a=/-+([a-z0-9])/g;function ms(t){return t.replace(_a,(...e)=>e[1].toUpperCase())}var ae=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(;a0&&(s--,a++,!(n[s]==` +`&&++o==r)););for(a=0,o=0;a]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Ea=[Da,va,wa,Ta,xa,La,ka,Ba,Fa,ba];function Aa(t,e){for(let r of Ea)r(t,e);return t}function Da(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===` +`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function va(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let s=0;se.type==="cdata",e=>``)}function ba(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!F.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n`+s.firstChild.value+``+a.value,i.sourceSpan=new f(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function Ta(t,e){if(e.parser==="html")return;let r=/{{(.+?)}}/s;t.walk(n=>{if(_n(n))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new f(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new f(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new f(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function xa(t){t.walk(e=>{if(!e.children)return;if(e.children.length===0||e.children.length===1&&e.children[0].type==="text"&&F.trim(e.children[0].value).length===0){e.hasDanglingSpaces=e.children.length>0,e.children=[];return}let r=En(e),n=ur(e);if(!r)for(let s=0;s{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function Ba(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function La(t,e){t.walk(r=>{r.cssDisplay=Bn(r,e)})}function Fa(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=vn(r);return}for(let s of n)s.isLeadingSpaceSensitive=An(s,e),s.isTrailingSpaceSensitive=Dn(s,e);for(let s=0;s of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Ss="HTML",Ia={bracketSameLine:Dr.bracketSameLine,htmlWhitespaceSensitivity:{category:Ss,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."}]},singleAttributePerLine:Dr.singleAttributePerLine,vueIndentScriptAndStyle:{category:Ss,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},_s=Ia;var Ur={};Yr(Ur,{angular:()=>Fo,html:()=>Lo,lwc:()=>No,vue:()=>Po});var Cp=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var Es;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(Es||(Es={}));var As;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(As||(As={}));var vr={name:"custom-elements"},yr={name:"no-errors-schema"};var J;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(J||(J={}));var Ds;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Ds||(Ds={}));var N;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(N||(N={}));function at(t){if(t[0]!=":")return[null,t];let e=t.indexOf(":",1);if(e===-1)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[t.slice(1,e),t.slice(e+1)]}function wr(t){return at(t)[1]==="ng-container"}function br(t){return at(t)[1]==="ng-content"}function Ue(t){return t===null?null:at(t)[0]}function We(t,e){return t?`:${t}:${e}`:e}var It;function Tr(){return It||(It={},Nt(J.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),Nt(J.STYLE,["*|style"]),Nt(J.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),Nt(J.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),It}function Nt(t,e){for(let r of e)It[r.toLowerCase()]=t}var Rt=class{};var Ra="boolean",$a="number",Oa="string",Ma="object",qa=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],vs=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),Ha=Array.from(vs).reduce((t,[e,r])=>(t.set(e,r),t),new Map),$t=class extends Rt{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,qa.forEach(e=>{let r=new Map,n=new Set,[s,i]=e.split("|"),a=i.split(","),[o,u]=s.split("^");o.split(",").forEach(l=>{this._schema.set(l.toLowerCase(),r),this._eventSchema.set(l.toLowerCase(),n)});let p=u&&this._schema.get(u.toLowerCase());if(p){for(let[l,m]of p)r.set(l,m);for(let l of this._eventSchema.get(u.toLowerCase()))n.add(l)}a.forEach(l=>{if(l.length>0)switch(l[0]){case"*":n.add(l.substring(1));break;case"!":r.set(l.substring(1),Ra);break;case"#":r.set(l.substring(1),$a);break;case"%":r.set(l.substring(1),Ma);break;default:r.set(l,Oa)}})})}hasProperty(e,r,n){if(n.some(i=>i.name===yr.name))return!0;if(e.indexOf("-")>-1){if(wr(e)||br(e))return!1;if(n.some(i=>i.name===vr.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(r)}hasElement(e,r){return r.some(n=>n.name===yr.name)||e.indexOf("-")>-1&&(wr(e)||br(e)||r.some(n=>n.name===vr.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,r,n){n&&(r=this.getMappedPropName(r)),e=e.toLowerCase(),r=r.toLowerCase();let s=Tr()[e+"|"+r];return s||(s=Tr()["*|"+r],s||J.NONE)}getMappedPropName(e){return vs.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... +If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>Ha.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return ms(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(Va(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function Va(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var h=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=N.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},ys,ot;function ze(t){return ot||(ys=new h({canSelfClose:!0}),ot=Object.assign(Object.create(null),{base:new h({isVoid:!0}),meta:new h({isVoid:!0}),area:new h({isVoid:!0}),embed:new h({isVoid:!0}),link:new h({isVoid:!0}),img:new h({isVoid:!0}),input:new h({isVoid:!0}),param:new h({isVoid:!0}),hr:new h({isVoid:!0}),br:new h({isVoid:!0}),source:new h({isVoid:!0}),track:new h({isVoid:!0}),wbr:new h({isVoid:!0}),p:new h({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 h({closedByChildren:["tbody","tfoot"]}),tbody:new h({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new h({closedByChildren:["tbody"],closedByParent:!0}),tr:new h({closedByChildren:["tr"],closedByParent:!0}),td:new h({closedByChildren:["td","th"],closedByParent:!0}),th:new h({closedByChildren:["td","th"],closedByParent:!0}),col:new h({isVoid:!0}),svg:new h({implicitNamespacePrefix:"svg"}),foreignObject:new h({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new h({implicitNamespacePrefix:"math"}),li:new h({closedByChildren:["li"],closedByParent:!0}),dt:new h({closedByChildren:["dt","dd"]}),dd:new h({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new h({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new h({closedByChildren:["optgroup"],closedByParent:!0}),option:new h({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new h({ignoreFirstLf:!0}),listing:new h({ignoreFirstLf:!0}),style:new h({contentType:N.RAW_TEXT}),script:new h({contentType:N.RAW_TEXT}),title:new h({contentType:{default:N.ESCAPABLE_RAW_TEXT,svg:N.PARSABLE_DATA}}),textarea:new h({contentType:N.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new $t().allKnownElementNames().forEach(e=>{!ot[e]&&Ue(e)===null&&(ot[e]=new h({canSelfClose:!1}))})),ot[t]??ys}var be=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},Ot=class extends be{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="text"}visit(e,r){return e.visitText(this,r)}},Mt=class extends be{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="cdata"}visit(e,r){return e.visitCdata(this,r)}},qt=class extends be{constructor(e,r,n,s,i,a){super(s,a),this.switchValue=e,this.type=r,this.cases=n,this.switchValueSourceSpan=i}visit(e,r){return e.visitExpansion(this,r)}},Ht=class{constructor(e,r,n,s,i){this.value=e,this.expression=r,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=i,this.type="expansionCase"}visit(e,r){return e.visitExpansionCase(this,r)}},Vt=class extends be{constructor(e,r,n,s,i,a,o){super(n,o),this.name=e,this.value=r,this.keySpan=s,this.valueSpan=i,this.valueTokens=a,this.type="attribute"}visit(e,r){return e.visitAttribute(this,r)}get nameSpan(){return this.keySpan}},G=class extends be{constructor(e,r,n,s,i,a=null,o=null,u){super(s,u),this.name=e,this.attrs=r,this.children=n,this.startSourceSpan=i,this.endSourceSpan=a,this.nameSpan=o,this.type="element"}visit(e,r){return e.visitElement(this,r)}},Ut=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="comment"}visit(e,r){return e.visitComment(this,r)}},Wt=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="docType"}visit(e,r){return e.visitDocType(this,r)}},Z=class{constructor(e,r,n,s,i,a=null){this.name=e,this.parameters=r,this.children=n,this.sourceSpan=s,this.startSourceSpan=i,this.endSourceSpan=a,this.type="block"}visit(e,r){return e.visitBlock(this,r)}},ut=class{constructor(e,r){this.expression=e,this.sourceSpan=r,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,r){return e.visitBlockParameter(this,r)}};function zt(t,e,r=null){let n=[],s=t.visit?i=>t.visit(i,r)||i.visit(t,r):i=>i.visit(t,r);return e.forEach(i=>{let a=s(i);a&&n.push(a)}),n}var lt=class{constructor(){}visitElement(e,r){this.visitChildren(r,n=>{n(e.attrs),n(e.children)})}visitAttribute(e,r){}visitText(e,r){}visitCdata(e,r){}visitComment(e,r){}visitDocType(e,r){}visitExpansion(e,r){return this.visitChildren(r,n=>{n(e.cases)})}visitExpansionCase(e,r){}visitBlock(e,r){this.visitChildren(r,n=>{n(e.parameters),n(e.children)})}visitBlockParameter(e,r){}visitChildren(e,r){let n=[],s=this;function i(a){a&&n.push(zt(s,a,e))}return r(i),Array.prototype.concat.apply([],n)}};var Ge={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` +`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\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",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",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",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",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",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},Wa="\uE500";Ge.ngsp=Wa;var za=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function ws(t,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${t}' to be an array, [start, end].`);if(e!=null){let r=e[0],n=e[1];za.forEach(s=>{if(s.test(r)||s.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var xr=class t{static fromArray(e){return e?(ws("interpolation",e),new t(e[0],e[1])):kr}constructor(e,r){this.start=e,this.end=r}},kr=new xr("{{","}}");var pt=class extends Ve{constructor(e,r,n){super(n,e),this.tokenType=r}},Nr=class{constructor(e,r,n){this.tokens=e,this.errors=r,this.nonNormalizedIcuExpressions=n}};function Ms(t,e,r,n={}){let s=new Ir(new we(t,e),r,n);return s.tokenize(),new Nr(So(s.tokens),s.errors,s.nonNormalizedIcuExpressions)}var co=/\r\n?/g;function Ye(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function Ls(t){return`Unknown entity "${t}" - use the "&#;" or "&#x;" syntax`}function po(t,e){return`Unable to parse entity "${e}" - ${t} character reference entities must end with ";"`}var jt;(function(t){t.HEX="hexadecimal",t.DEC="decimal"})(jt||(jt={}));var ht=class{constructor(e){this.error=e}},Ir=class{constructor(e,r,n){this._getTagContentType=r,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||kr,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=n.canSelfClose||!1,this._allowHtmComponentClosingTags=n.allowHtmComponentClosingTags||!1;let s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new Rr(e,s):new Kt(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=n.tokenizeBlocks??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(co,` +`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(30),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>Lt(n)?!e:Ns(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(k),this._attemptCharCode(41))this._attemptCharCodeUntilFn(k);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Is);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&Ar(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(Is)}}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(go(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new pt("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new pt("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,r){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new pt(e,this._currentTokenType,r);return this._currentTokenStart=null,this._currentTokenType=null,new ht(n)}handleError(e){if(e instanceof ft&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof ht)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return Co(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let r=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Ye(this._cursor.peek()),this._cursor.getSpan(r))}_attemptStr(e){let r=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),r="";for(;this._cursor.peek()!==58&&!ho(this._cursor.peek());)this._cursor.advance();let n;this._cursor.peek()===58?(r=this._cursor.getChars(e),this._cursor.advance(),n=this._cursor.clone()):n=e,this._requireCharCodeUntilFn(Fs,r===""?0:1);let s=this._cursor.getChars(n);return[r,s]}_consumeTagOpen(e){let r,n,s,i=[];try{if(!Ft(this._cursor.peek()))throw this._createError(Ye(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],r=s.parts[1],this._attemptCharCodeUntilFn(k);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,u]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(k),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(k);let p=this._consumeAttributeValue();i.push({prefix:o,name:u,value:p})}else i.push({prefix:o,name:u});this._attemptCharCodeUntilFn(k)}this._consumeTagOpenEnd()}catch(o){if(o instanceof ht){s?s.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let a=this._getTagContentType(r,n,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(n,r),a===N.RAW_TEXT?this._consumeRawTextWithTagClose(n,r,!1):a===N.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,r,!0)}_consumeRawTextWithTagClose(e,r,n){this._consumeRawText(n,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(k),!this._attemptStrCaseInsensitive(e?`${e}:${r}`:r))?!1:(this._attemptCharCodeUntilFn(k),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(s=>s===62,3),this._cursor.advance(),this._endToken([e,r]),this._handleFullNameStackForTagClose(e,r)}_consumeTagOpenStart(e){this._beginToken(0,e);let r=this._consumePrefixAndName();return this._endToken(r)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(Ye(e),this._cursor.getSpan());this._beginToken(14);let r=this._consumePrefixAndName();return this._endToken(r),r}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let r=this._cursor.peek();this._consumeQuote(r);let n=()=>this._cursor.peek()===r;e=this._consumeWithInterpolation(16,17,n,n),this._consumeQuote(r)}else{let r=()=>Fs(this._cursor.peek());e=this._consumeWithInterpolation(16,17,r,r)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(k),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(k),this._requireCharCode(62),this._endToken([]);else{let[r,n]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(k),this._requireCharCode(62),this._endToken([r,n]),this._handleFullNameStackForTagClose(r,n)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),r=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([r]);else{let s=this._endToken([e]);r!==e&&this.nonNormalizedIcuExpressions.push(s)}this._requireCharCode(44),this._attemptCharCodeUntilFn(k),this._beginToken(7);let n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(k)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(k),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(k),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(k),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,r,n,s){this._beginToken(e);let i=[];for(;!n();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(r,o,s),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let a=this._processCarriageReturns(i.join(""));return this._endToken([a]),a}_consumeInterpolation(e,r,n){let s=[];this._beginToken(e,r),s.push(this._interpolationConfig.start);let i=this._cursor.clone(),a=null,o=!1;for(;this._cursor.peek()!==0&&(n===null||!n());){let u=this._cursor.clone();if(this._isTagStart()){this._cursor=u,s.push(this._getProcessedChars(i,u)),this._endToken(s);return}if(a===null)if(this._attemptStr(this._interpolationConfig.end)){s.push(this._getProcessedChars(i,u)),s.push(this._interpolationConfig.end),this._endToken(s);return}else this._attemptStr("//")&&(o=!0);let p=this._cursor.peek();this._cursor.advance(),p===92?this._cursor.advance():p===a?a=null:!o&&a===null&&Ar(p)&&(a=p)}s.push(this._getProcessedChars(i,this._cursor)),this._endToken(s)}_getProcessedChars(e,r){return this._processCarriageReturns(r.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let r=e.peek();if(97<=r&&r<=122||65<=r&&r<=90||r===47||r===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),Ns(e.peek()))return!0}return!1}_readUntil(e){let r=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(r)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),r=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!r}return!0}_handleFullNameStackForTagOpen(e,r){let n=We(e,r);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===n)&&this._fullNameStack.push(n)}_handleFullNameStackForTagClose(e,r){let n=We(e,r);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===n&&this._fullNameStack.pop()}};function k(t){return!Lt(t)||t===0}function Fs(t){return Lt(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function ho(t){return(t<97||12257)}function fo(t){return t===59||t===0||!hs(t)}function mo(t){return t===59||t===0||!Ft(t)}function go(t){return t!==125}function Co(t,e){return Ps(t)===Ps(e)}function Ps(t){return t>=97&&t<=122?t-97+65:t}function Ns(t){return Ft(t)||Sr(t)||t===95}function Is(t){return t!==59&&k(t)}function So(t){let e=[],r;for(let n=0;n0&&r.indexOf(e.peek())!==-1;)n===e&&(e=e.clone()),e.advance();let s=this.locationFromCursor(e),i=this.locationFromCursor(this),a=n!==e?this.locationFromCursor(n):s;return new f(s,i,a)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new ft('Unexpected character "EOF"',this);let r=this.charAt(e.offset);r===10?(e.line++,e.column=0):_r(r)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new ae(e.file,e.state.offset,e.state.line,e.state.column)}},Rr=class t extends Kt{constructor(e,r){e instanceof t?(super(e),this.internalState={...e.internalState}):(super(e,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new t(this)}getChars(e){let r=e.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(e()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),e()===110)this.state.peek=10;else if(e()===114)this.state.peek=13;else if(e()===118)this.state.peek=11;else if(e()===116)this.state.peek=9;else if(e()===98)this.state.peek=8;else if(e()===102)this.state.peek=12;else if(e()===117)if(this.advanceState(this.internalState),e()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;e()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(e()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(Er(e())){let r="",n=0,s=this.clone();for(;Er(e())&&n<3;)s=this.clone(),r+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=s.internalState}else _r(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,r){let n=this.input.slice(e.internalState.offset,e.internalState.offset+r),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new ft("Invalid hexadecimal escape sequence",e);return s}},ft=class{constructor(e,r){this.msg=e,this.cursor=r}};var $=class t extends Ve{static create(e,r,n){return new t(e,r,n)}constructor(e,r,n){super(r,n),this.elementName=e}},Mr=class{constructor(e,r){this.rootNodes=e,this.errors=r}},Qt=class{constructor(e){this.getTagDefinition=e}parse(e,r,n,s=!1,i){let a=D=>(I,...B)=>D(I.toLowerCase(),...B),o=s?this.getTagDefinition:a(this.getTagDefinition),u=D=>o(D).getContentType(),p=s?i:a(i),m=Ms(e,r,i?(D,I,B,c)=>{let d=p(D,I,B,c);return d!==void 0?d:u(D)}:u,n),g=n&&n.canSelfClose||!1,C=n&&n.allowHtmComponentClosingTags||!1,_=new qr(m.tokens,o,g,C,s);return _.build(),new Mr(_.rootNodes,m.errors.concat(_.errors))}},qr=class t{constructor(e,r,n,s,i){this.tokens=e,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=s,this.isTagNameCaseSensitive=i,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==30;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._advance();for(let e of this._containerStack)e instanceof Z&&this.errors.push($.create(e.name,e.sourceSpan,`Unclosed block "${e.name}"`))}_advance(){let e=this._peek;return this._index0)return this.errors=this.errors.concat(i.errors),null;let a=new f(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),o=new f(r.sourceSpan.start,s.sourceSpan.end,r.sourceSpan.fullStart);return new Ht(e.parts[0],i.rootNodes,a,e.sourceSpan,o)}_collectExpansionExpTokens(e){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(qs(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push($.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(qs(n,20))n.pop();else return this.errors.push($.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===30)return this.errors.push($.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(e){let r=e.parts[0];if(r.length>0&&r[0]==` `){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(e){let r=[e],n=e.sourceSpan,s=e.parts[0];if(s.length>0&&s[0]===` -`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,Is):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Ot(s,new f(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof z&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||Me(i)!==null||C.isVoid||this.errors.push(I.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new f(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new f(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new f(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),m=new z(i,s,[],u,p,void 0,l),d=this._getContainer();this._pushContainer(m,d instanceof z&&this.getTagDefinition(d.name).isClosedByChild(m.name)),a?this._popContainer(i,z,u):e.type===4&&(this._popContainer(i,z,null),this.errors.push(I.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(I.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,z,e.sourceSpan)){let n=`Unexpected closing tag "${r}". 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(I.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(Me(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof J||a instanceof z&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=qe(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let m=this._advance();a.push(m),m.type===17?i+=m.parts.join("").replace(/&([^;]+);/g,Is):m.type===9?i+=m.parts[0]:i+=m.parts.join(""),u=n=m.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new f((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new Vt(r,i,new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ot(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new J(e.parts[0],r,[],s,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,J,e.sourceSpan)||this.errors.push(I.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ot(o.parts[0],o.sourceSpan))}let n=this._peek.sourceSpan.fullStart,s=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new J(e.parts[0],r,[],s,i);this._pushContainer(a,!1),this._popContainer(null,J,null),this.errors.push(I.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let e=this._containerStack.length-1;e>-1;e--)if(this._containerStack[e]instanceof z)return this._containerStack[e];return null}_addToParent(e){let r=this._getContainer();r===null?this.rootNodes.push(e):r.children.push(e)}_getElementFullName(e,r,n){if(e===""&&(e=this.getTagDefinition(r).implicitNamespacePrefix||"",e===""&&n!=null)){let s=it(n.name)[1];this.getTagDefinition(s).preventNamespaceInheritance||(e=Me(n.name))}return qe(e,r)}};function Ns(t,e){return t.length>0&&t[t.length-1]===e}function Is(t,e){return Ve[e]!==void 0?Ve[e]||t:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):t}var Xt=class extends Qt{constructor(){super(He)}parse(e,r,n,s=!1,i){return super.parse(e,r,n,s,i)}};var qr=null,mo=()=>(qr||(qr=new Xt),qr);function Hr(t,e={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:s=!1,getTagContentType:i,tokenizeAngularBlocks:a=!1}=e;return mo().parse(t,"angular-html-parser",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:a},s,i)}var go=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function Co(t){let e=t.match(go);if(!e)return{content:t};let{startDelimiter:r,language:n,value:s="",endDelimiter:i}=e.groups,a=n.trim()||"yaml";if(r==="+++"&&(a="toml"),a!=="yaml"&&r!==i)return{content:t};let[o]=e;return{frontMatter:{type:"front-matter",lang:a,value:s,startDelimiter:r,endDelimiter:i,raw:o.replace(/\n$/,"")},content:v(!1,o,/[^\n]/g," ")+t.slice(o.length)}}var Rs=Co;function So(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var $s=So;var Os=new Set(["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","search","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"]);var Jt=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]);var Zt={attrs:!0,children:!0},Ms=new Set(["parent"]),er=class t{constructor(e={}){for(let r of new Set([...Ms,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in Zt&&(r=r.map(n=>this.createChild(n))),!Ms.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in Zt){let s=this[n];if(s){let i=_o(s,a=>a.map(e));r!==s&&(r||(r=new t({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in Zt||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in Zt){let n=this[r];if(n)for(let s=0;s[e.fullName,e.value]))}};function _o(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var Eo=[{regex:/^(\[if([^\]]*)]>)(.*?){try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new f(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:v(!1,s.trim(),/\s+/g," "),sourceSpan:t.sourceSpan,startSourceSpan:new f(t.sourceSpan.start,o),endSourceSpan:new f(u,t.sourceSpan.end)}}function Do(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:v(!1,n.trim(),/\s+/g," "),sourceSpan:t.sourceSpan}}function vo(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}function yo(t){if(t.type==="block"){if(t.name=v(!1,t.name.toLowerCase(),/\s+/g," ").trim(),t.type="angularControlFlowBlock",!xt(t.parameters)){delete t.parameters;return}for(let e of t.parameters)e.type="angularControlFlowBlockParameter";t.parameters={type:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new f(t.parameters[0].sourceSpan.start,me(!1,t.parameters,-1).sourceSpan.end)}}}function Vs(t,e,r){let{name:n,canSelfClose:s=!0,normalizeTagName:i=!1,normalizeAttributeName:a=!1,allowHtmComponentClosingTags:o=!1,isTagNameCaseSensitive:u=!1,shouldParseAsRawText:p}=e,{rootNodes:l,errors:m}=Hr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u,getTagContentType:p?(...c)=>p(...c)?F.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0});if(n==="vue"){if(l.some(w=>w.type==="docType"&&w.value==="html"||w.type==="element"&&w.name.toLowerCase()==="html"))return Vs(t,Ws,r);let g,y=()=>g??(g=Hr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u})),$=w=>y().rootNodes.find(({startSourceSpan:q})=>q&&q.start.offset===w.startSourceSpan.start.offset)??w;for(let[w,q]of l.entries()){let{endSourceSpan:Wr,startSourceSpan:js}=q;if(Wr===null)m=y().errors,l[w]=$(q);else if(wo(q,r)){let zr=y().errors.find(Gr=>Gr.span.start.offset>js.start.offset&&Gr.span.start.offset0&&Hs(m[0]);let d=c=>{let g=c.name.startsWith(":")?c.name.slice(1).split(":")[0]:null,y=c.nameSpan.toString(),$=g!==null&&y.startsWith(`${g}:`),w=$?y.slice(g.length+1):y;c.name=w,c.namespace=g,c.hasExplicitNamespace=$},C=c=>{switch(c.type){case"element":d(c);for(let g of c.attrs)d(g),g.valueSpan?(g.value=g.valueSpan.toString(),/["']/.test(g.value[0])&&(g.value=g.value.slice(1,-1))):g.value=null;break;case"comment":c.value=c.sourceSpan.toString().slice(4,-3);break;case"text":c.value=c.sourceSpan.toString();break}},_=(c,g)=>{let y=c.toLowerCase();return g(y)?y:c},D=c=>{if(c.type==="element"&&(i&&(!c.namespace||c.namespace===c.tagDefinition.implicitNamespacePrefix||de(c))&&(c.name=_(c.name,g=>Os.has(g))),a))for(let g of c.attrs)g.namespace||(g.name=_(g.name,y=>Jt.has(c.name)&&(Jt.get("*").has(y)||Jt.get(c.name).has(y))))},P=c=>{c.sourceSpan&&c.endSourceSpan&&(c.sourceSpan=new f(c.sourceSpan.start,c.endSourceSpan.end))},B=c=>{if(c.type==="element"){let g=He(u?c.name:c.name.toLowerCase());!c.namespace||c.namespace===g.implicitNamespacePrefix||de(c)?c.tagDefinition=g:c.tagDefinition=He("")}};return zt(new class extends ut{visit(c){C(c),B(c),D(c),P(c)}},l),l}function wo(t,e){var n;if(t.type!=="element"||t.name!=="template")return!1;let r=(n=t.attrs.find(s=>s.name==="lang"))==null?void 0:n.value;return!r||Ne(e,{language:r})==="html"}function Hs(t){let{msg:e,span:{start:r,end:n}}=t;throw $s(e,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:t})}function Us(t,e,r={},n=!0){let{frontMatter:s,content:i}=n?Rs(t):{frontMatter:null,content:t},a=new Se(t,r.filepath),o=new ne(a,0,0,0),u=o.moveBy(t.length),p={type:"root",sourceSpan:new f(o,u),children:Vs(i,e,r)};if(s){let d=new ne(a,0,0,0),C=d.moveBy(s.raw.length);s.sourceSpan=new f(d,C),p.children.unshift(s)}let l=new er(p),m=(d,C)=>{let{offset:_}=C,D=v(!1,t.slice(0,_),/[^\n\r]/g," "),B=Us(D+d,e,r,!1);B.sourceSpan=new f(C,me(!1,B.children,-1).sourceSpan.end);let c=B.children[0];return c.length===_?B.children.shift():(c.sourceSpan=new f(c.sourceSpan.start.moveBy(_),c.sourceSpan.end),c.value=c.value.slice(_)),B};return l.walk(d=>{if(d.type==="comment"){let C=qs(d,m);C&&d.parent.replaceChild(d,C)}yo(d)}),l}function tr(t){return{parse:(e,r)=>Us(e,t,r),hasPragma:Rn,astFormat:"html",locStart:se,locEnd:ie}}var Ws={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},bo=tr(Ws),To=tr({name:"angular"}),xo=tr({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,e,r,n){return t.toLowerCase()!=="html"&&!r&&(t!=="template"||n.some(({name:s,value:i})=>s==="lang"&&i!=="html"&&i!==""&&i!==void 0))}}),ko=tr({name:"lwc",canSelfClose:!1});var zs=[{linguistLanguageId:146,name:"Angular",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".component.html"],parsers:["angular"],vscodeLanguageIds:["html"],filenames:[]},{linguistLanguageId:146,name:"HTML",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml",".mjml"],parsers:["html"],vscodeLanguageIds:["html"]},{linguistLanguageId:146,name:"Lightning Web Components",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[],parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[]},{linguistLanguageId:391,name:"Vue",type:"markup",color:"#41b883",extensions:[".vue"],tmScope:"text.html.vue",aceMode:"html",parsers:["vue"],vscodeLanguageIds:["vue"]}];var Ur={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Gs="HTML",Bo={bracketSameLine:Ur.bracketSameLine,htmlWhitespaceSensitivity:{category:Gs,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."}]},singleAttributePerLine:Ur.singleAttributePerLine,vueIndentScriptAndStyle:{category:Gs,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},Ys=Bo;var Lo={html:fs};return Zs(Fo);}); \ No newline at end of file +`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,Hs):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Ot(s,new f(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof G&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||Ue(i)!==null||C.isVoid||this.errors.push($.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new f(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new f(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new f(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),m=new G(i,s,[],u,p,void 0,l),g=this._getContainer();this._pushContainer(m,g instanceof G&&this.getTagDefinition(g.name).isClosedByChild(m.name)),a?this._popContainer(i,G,u):e.type===4&&(this._popContainer(i,G,null),this.errors.push($.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push($.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,G,e.sourceSpan)){let n=`Unexpected closing tag "${r}". 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($.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(Ue(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof Z||a instanceof G&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=We(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let m=this._advance();a.push(m),m.type===17?i+=m.parts.join("").replace(/&([^;]+);/g,Hs):m.type===9?i+=m.parts[0]:i+=m.parts.join(""),u=n=m.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new f((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new Vt(r,i,new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ut(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new Z(e.parts[0],r,[],s,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,Z,e.sourceSpan)||this.errors.push($.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ut(o.parts[0],o.sourceSpan))}let n=this._peek.sourceSpan.fullStart,s=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new Z(e.parts[0],r,[],s,i);this._pushContainer(a,!1),this._popContainer(null,Z,null),this.errors.push($.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let e=this._containerStack.length-1;e>-1;e--)if(this._containerStack[e]instanceof G)return this._containerStack[e];return null}_addToParent(e){let r=this._getContainer();r===null?this.rootNodes.push(e):r.children.push(e)}_getElementFullName(e,r,n){if(e===""&&(e=this.getTagDefinition(r).implicitNamespacePrefix||"",e===""&&n!=null)){let s=at(n.name)[1];this.getTagDefinition(s).preventNamespaceInheritance||(e=Ue(n.name))}return We(e,r)}};function qs(t,e){return t.length>0&&t[t.length-1]===e}function Hs(t,e){return Ge[e]!==void 0?Ge[e]||t:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):t}var Xt=class extends Qt{constructor(){super(ze)}parse(e,r,n,s=!1,i){return super.parse(e,r,n,s,i)}};var Hr=null,_o=()=>(Hr||(Hr=new Xt),Hr);function Vr(t,e={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:s=!1,getTagContentType:i,tokenizeAngularBlocks:a=!1}=e;return _o().parse(t,"angular-html-parser",{tokenizeExpansionForms:a,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:a},s,i)}function Eo(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var Vs=Eo;var Ao=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function Do(t){let e=t.match(Ao);if(!e)return{content:t};let{startDelimiter:r,language:n,value:s="",endDelimiter:i}=e.groups,a=n.trim()||"yaml";if(r==="+++"&&(a="toml"),a!=="yaml"&&r!==i)return{content:t};let[o]=e;return{frontMatter:{type:"front-matter",lang:a,value:s,startDelimiter:r,endDelimiter:i,raw:o.replace(/\n$/,"")},content:w(!1,o,/[^\n]/g," ")+t.slice(o.length)}}var Us=Do;var Jt={attrs:!0,children:!0,cases:!0,expression:!0},Ws=new Set(["parent"]),Zt=class t{constructor(e={}){for(let r of new Set([...Ws,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in Jt&&(r=r.map(n=>this.createChild(n))),!Ws.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in Jt){let s=this[n];if(s){let i=vo(s,a=>a.map(e));r!==s&&(r||(r=new t({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in Jt||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in Jt){let n=this[r];if(n)for(let s=0;s[e.fullName,e.value]))}};function vo(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var yo=[{regex:/^(\[if([^\]]*)]>)(.*?){try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new f(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:w(!1,s.trim(),/\s+/g," "),sourceSpan:t.sourceSpan,startSourceSpan:new f(t.sourceSpan.start,o),endSourceSpan:new f(u,t.sourceSpan.end)}}function bo(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:w(!1,n.trim(),/\s+/g," "),sourceSpan:t.sourceSpan}}function To(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var er=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]);var Gs=new Set(["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","search","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"]);function xo(t){if(t.type==="block"){if(t.name=w(!1,t.name.toLowerCase(),/\s+/g," ").trim(),t.type="angularControlFlowBlock",!Me(t.parameters)){delete t.parameters;return}for(let e of t.parameters)e.type="angularControlFlowBlockParameter";t.parameters={type:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new f(t.parameters[0].sourceSpan.start,X(!1,t.parameters,-1).sourceSpan.end)}}}function ko(t){(t.type==="plural"||t.type==="select")&&(t.clause=t.type,t.type="angularIcuExpression"),t.type==="expansionCase"&&(t.type="angularIcuCase")}function js(t,e,r){let{name:n,canSelfClose:s=!0,normalizeTagName:i=!1,normalizeAttributeName:a=!1,allowHtmComponentClosingTags:o=!1,isTagNameCaseSensitive:u=!1,shouldParseAsRawText:p}=e,{rootNodes:l,errors:m}=Vr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u,getTagContentType:p?(...c)=>p(...c)?N.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0});if(n==="vue"){if(l.some(b=>b.type==="docType"&&b.value==="html"||b.type==="element"&&b.name.toLowerCase()==="html"))return js(t,Qs,r);let d,y=()=>d??(d=Vr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u})),O=b=>y().rootNodes.find(({startSourceSpan:V})=>V&&V.start.offset===b.startSourceSpan.start.offset)??b;for(let[b,V]of l.entries()){let{endSourceSpan:Wr,startSourceSpan:Xs}=V;if(Wr===null)m=y().errors,l[b]=O(V);else if(Bo(V,r)){let zr=y().errors.find(Gr=>Gr.span.start.offset>Xs.start.offset&&Gr.span.start.offset0&&Ys(m[0]);let g=c=>{let d=c.name.startsWith(":")?c.name.slice(1).split(":")[0]:null,y=c.nameSpan.toString(),O=d!==null&&y.startsWith(`${d}:`),b=O?y.slice(d.length+1):y;c.name=b,c.namespace=d,c.hasExplicitNamespace=O},C=c=>{switch(c.type){case"element":g(c);for(let d of c.attrs)g(d),d.valueSpan?(d.value=d.valueSpan.toString(),/["']/.test(d.value[0])&&(d.value=d.value.slice(1,-1))):d.value=null;break;case"comment":c.value=c.sourceSpan.toString().slice(4,-3);break;case"text":c.value=c.sourceSpan.toString();break}},_=(c,d)=>{let y=c.toLowerCase();return d(y)?y:c},D=c=>{if(c.type==="element"&&(i&&(!c.namespace||c.namespace===c.tagDefinition.implicitNamespacePrefix||de(c))&&(c.name=_(c.name,d=>Gs.has(d))),a))for(let d of c.attrs)d.namespace||(d.name=_(d.name,y=>er.has(c.name)&&(er.get("*").has(y)||er.get(c.name).has(y))))},I=c=>{c.sourceSpan&&c.endSourceSpan&&(c.sourceSpan=new f(c.sourceSpan.start,c.endSourceSpan.end))},B=c=>{if(c.type==="element"){let d=ze(u?c.name:c.name.toLowerCase());!c.namespace||c.namespace===d.implicitNamespacePrefix||de(c)?c.tagDefinition=d:c.tagDefinition=ze("")}};return zt(new class extends lt{visitExpansionCase(c,d){n==="angular"&&this.visitChildren(d,y=>{y(c.expression)})}visit(c){C(c),B(c),D(c),I(c)}},l),l}function Bo(t,e){var n;if(t.type!=="element"||t.name!=="template")return!1;let r=(n=t.attrs.find(s=>s.name==="lang"))==null?void 0:n.value;return!r||$e(e,{language:r})==="html"}function Ys(t){let{msg:e,span:{start:r,end:n}}=t;throw Vs(e,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:t})}function Ks(t,e,r={},n=!0){let{frontMatter:s,content:i}=n?Us(t):{frontMatter:null,content:t},a=new we(t,r.filepath),o=new ae(a,0,0,0),u=o.moveBy(t.length),p={type:"root",sourceSpan:new f(o,u),children:js(i,e,r)};if(s){let g=new ae(a,0,0,0),C=g.moveBy(s.raw.length);s.sourceSpan=new f(g,C),p.children.unshift(s)}let l=new Zt(p),m=(g,C)=>{let{offset:_}=C,D=w(!1,t.slice(0,_),/[^\n\r]/g," "),B=Ks(D+g,e,r,!1);B.sourceSpan=new f(C,X(!1,B.children,-1).sourceSpan.end);let c=B.children[0];return c.length===_?B.children.shift():(c.sourceSpan=new f(c.sourceSpan.start.moveBy(_),c.sourceSpan.end),c.value=c.value.slice(_)),B};return l.walk(g=>{if(g.type==="comment"){let C=zs(g,m);C&&g.parent.replaceChild(g,C)}xo(g),ko(g)}),l}function tr(t){return{parse:(e,r)=>Ks(e,t,r),hasPragma:rs,astFormat:"html",locStart:se,locEnd:ie}}var Qs={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},Lo=tr(Qs),Fo=tr({name:"angular"}),Po=tr({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,e,r,n){return t.toLowerCase()!=="html"&&!r&&(t!=="template"||n.some(({name:s,value:i})=>s==="lang"&&i!=="html"&&i!==""&&i!==void 0))}}),No=tr({name:"lwc",canSelfClose:!1});var Io={html:ds};return ri(Ro);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/html.mjs b/node_modules/prettier/plugins/html.mjs index d8adb17..454635b 100644 --- a/node_modules/prettier/plugins/html.mjs +++ b/node_modules/prettier/plugins/html.mjs @@ -1,19 +1,19 @@ -var Ks=Object.defineProperty;var Yr=(t,e)=>{for(var r in e)Ks(t,r,{get:e[r],enumerable:!0})};var jr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var Q=(t,e,r)=>(jr(t,e,"read from private field"),r?r.call(t):e.get(t)),Kr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Qr=(t,e,r,n)=>(jr(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Ur={};Yr(Ur,{languages:()=>zs,options:()=>Ys,parsers:()=>Hr,printers:()=>To});var Qs=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},v=Qs;var we="string",be="array",Te="cursor",oe="indent",ue="align",xe="trim",ee="group",le="fill",ce="if-break",pe="indent-if-break",ke="line-suffix",Be="line-suffix-boundary",G="line",Le="label",he="break-parent",ft=new Set([Te,oe,ue,xe,ee,le,ce,pe,ke,Be,G,Le,he]);function Xs(t){if(typeof t=="string")return we;if(Array.isArray(t))return be;if(!t)return;let{type:e}=t;if(ft.has(e))return e}var Fe=Xs;var Js=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Zs(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', -Expected it to be 'string' or 'object'.`;if(Fe(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Js([...ft].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. -Expected it to be ${n}.`}var rr=class extends Error{name="InvalidDocError";constructor(e){super(Zs(e)),this.doc=e}},mt=rr;var Xr=()=>{},te=Xr,dt=Xr;function R(t){return te(t),{type:oe,contents:t}}function Jr(t,e){return te(e),{type:ue,contents:e,n:t}}function E(t,e={}){return te(t),dt(e.expandedStates,!0),{type:ee,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Zr(t){return Jr(Number.NEGATIVE_INFINITY,t)}function en(t){return Jr({type:"root"},t)}function gt(t){return dt(t),{type:le,parts:t}}function fe(t,e="",r={}){return te(t),e!==""&&te(e),{type:ce,breakContents:t,flatContents:e,groupId:r.groupId}}function tn(t,e){return te(t),{type:pe,contents:t,groupId:e.groupId,negate:e.negate}}var re={type:he};var ei={type:G,hard:!0},ti={type:G,hard:!0,literal:!0},A={type:G},b={type:G,soft:!0},S=[ei,re],rn=[ti,re];function Y(t,e){te(t),dt(e);let r=[];for(let n=0;n{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},me=ri;function Ct(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Fe(i)){case be:return e(i.map(n));case le:return e({...i,parts:i.parts.map(n)});case ce:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case ee:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case ue:case oe:case pe:case Le:case ke:return e({...i,contents:n(i.contents)});case we:case Te:case xe:case Be:case G:case he:return e(i);default:throw new mt(i)}}}function ni(t){switch(Fe(t)){case le:if(t.parts.every(e=>e===""))return"";break;case ee:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===ee&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case ue:case oe:case pe:case ke:if(!t.contents)return"";break;case ce:if(!t.flatContents&&!t.breakContents)return"";break;case be:{let e=[];for(let r of t){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof me(!1,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...s)}return e.length===0?"":e.length===1?e[0]:e}case we:case Te:case xe:case Be:case G:case Le:case he:break;default:throw new mt(t)}return t}function nn(t){return Ct(t,e=>ni(e))}function T(t,e=rn){return Ct(t,r=>typeof r=="string"?Y(e,r.split(` -`)):r)}var nr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},sn=nr;var St="'",an='"';function si(t,e){let r=e===!0||e===St?St:an,n=r===St?an:St,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var on=si;function sr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var O,ir=class{constructor(e){Kr(this,O,void 0);Qr(this,O,new Set(e))}getLeadingWhitespaceCount(e){let r=Q(this,O),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return Q(this,O).has(e.charAt(0))}hasTrailingWhitespace(e){return Q(this,O).has(me(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${sr([...Q(this,O)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return e.split(s)}hasWhitespaceCharacter(e){let r=Q(this,O);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=Q(this,O);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=Q(this,O);return Array.prototype.every.call(e,n=>r.has(n))}};O=new WeakMap;var un=ir;var ii=[" ",` -`,"\f","\r"," "],ai=new un(ii),H=ai;function oi(t){return(t==null?void 0:t.type)==="front-matter"}var Pe=oi;var ui=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens"]),li=new Set(["if","else if","for","switch","case"]);function ln(t,e){var r;if(t.type==="text"||t.type==="comment"||Pe(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=e.parameters)!=null&&r.children))for(let n of e.parameters.children)li.has(t.name)?delete n.expression:n.expression=n.expression.trim()}ln.ignoredProperties=ui;var cn=ln;var ci=t=>String(t).split(/[/\\]/).pop();function pn(t,e){if(!e)return;let r=ci(e).toLowerCase();return t.find(n=>{var s,i;return((s=n.extensions)==null?void 0:s.some(a=>r.endsWith(a)))||((i=n.filenames)==null?void 0:i.some(a=>a.toLowerCase()===r))})}function pi(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function hi(t,e){let r=t.plugins.flatMap(s=>s.languages??[]),n=pi(r,e.language)??pn(r,e.physicalFile)??pn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Ne=hi;var hn="inline",fn={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"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",search:"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",menu:"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",input:"inline-block",button:"inline-block",fieldset:"block",marquee:"inline-block",source:"block",track:"block",details:"block",summary:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},mn="normal",dn={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function fi(t){return t.type==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var de=fi;var mi=t=>v(!1,t,/^[\t\f\r ]*\n/g,""),ar=t=>mi(H.trimEnd(t)),gn=t=>{let e=t,r=H.getLeadingWhitespace(e);r&&(e=e.slice(r.length));let n=H.getTrailingWhitespace(e);return n&&(e=e.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:e}};function _t(t,e){return!!(t.type==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.type==="ieConditionalComment"&&!t.complete||ge(t)&&t.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||Dt(t,e)&&!V(t)&&t.type!=="interpolation")}function Ge(t){return t.type==="attribute"||!t.parent||!t.prev?!1:di(t.prev)}function di(t){return t.type==="comment"&&t.value.trim()==="prettier-ignore"}function N(t){return t.type==="text"||t.type==="comment"}function V(t){return t.type==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||de(t)&&(t.name==="script"||t.name==="style"))}function Cn(t){return t.children&&!V(t)}function Sn(t){return V(t)||t.type==="interpolation"||or(t)}function or(t){return kn(t).startsWith("pre")}function _n(t,e){var s,i;let r=n();if(r&&!t.prev&&((i=(s=t.parent)==null?void 0:s.tagDefinition)!=null&&i.ignoreFirstLf))return t.type==="interpolation";return r;function n(){return Pe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.prev&&(t.prev.type==="text"||t.prev.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:ge(t.parent)?!0:!(!t.prev&&(t.parent.type==="root"||ge(t)&&t.parent||V(t.parent)||Ke(t.parent,e)||!Ai(t.parent.cssDisplay))||t.prev&&!yi(t.prev.cssDisplay))}}function En(t,e){return Pe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.next&&(t.next.type==="text"||t.next.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:ge(t.parent)?!0:!(!t.next&&(t.parent.type==="root"||ge(t)&&t.parent||V(t.parent)||Ke(t.parent,e)||!Di(t.parent.cssDisplay))||t.next&&!vi(t.next.cssDisplay))}function An(t){return wi(t.cssDisplay)&&!V(t)}function Ye(t){return Pe(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+10&&(["body","script","style"].includes(t.name)||t.children.some(e=>Ci(e)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.type!=="text"&&yn(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||wn(t.lastChild))}function ur(t){return t.type==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function Et(t){return bn(t)||t.prev&&gi(t.prev)||vn(t)}function gi(t){return bn(t)||t.type==="element"&&t.fullName==="br"||vn(t)}function vn(t){return yn(t)&&wn(t)}function yn(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.linet.sourceSpan.end.line:t.parent.type==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function bn(t){switch(t.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function At(t){return t.lastChild?At(t.lastChild):t}function Ci(t){var e;return(e=t.children)==null?void 0:e.some(r=>r.type!=="text")}function Tn(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function Si(t,e){let{name:r,attrMap:n}=t;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:s,lang:i}=t.attrMap;return!i&&!s?"babel":Ne(e,{language:i})??Tn(s)}function _i(t,e){if(!Dt(t,e))return;let{attrMap:r}=t;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:s}=r;return Ne(e,{language:s})??Tn(n)}function Ei(t,e){if(t.name!=="style")return;let{lang:r}=t.attrMap;return r?Ne(e,{language:r}):"css"}function lr(t,e){return Si(t,e)??Ei(t,e)??_i(t,e)}function je(t){return t==="block"||t==="list-item"||t.startsWith("table")}function Ai(t){return!je(t)&&t!=="inline-block"}function Di(t){return!je(t)&&t!=="inline-block"}function vi(t){return!je(t)}function yi(t){return!je(t)}function wi(t){return!je(t)&&t!=="inline-block"}function ge(t){return kn(t).startsWith("pre")}function bi(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.parent}return!1}function xn(t,e){var n;if(Ce(t,e))return"block";if(((n=t.prev)==null?void 0:n.type)==="comment"){let s=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(s)return s[1]}let r=!1;if(t.type==="element"&&t.namespace==="svg")if(bi(t,s=>s.fullName==="svg:foreignObject"))r=!0;else return t.name==="svg"?"inline-block":"block";switch(e.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return t.type==="element"&&(!t.namespace||r||de(t))&&fn[t.name]||hn}}function kn(t){return t.type==="element"&&(!t.namespace||de(t))&&dn[t.name]||mn}function Ti(t){let e=Number.POSITIVE_INFINITY;for(let r of t.split(` -`)){if(r.length===0)continue;let n=H.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&n{for(var r in e)Js(t,r,{get:e[r],enumerable:!0})};var jr=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var Q=(t,e,r)=>(jr(t,e,"read from private field"),r?r.call(t):e.get(t)),Kr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Qr=(t,e,r,n)=>(jr(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Ur={};Yr(Ur,{languages:()=>Cs,options:()=>_s,parsers:()=>Vr,printers:()=>Lo});var Zs=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},w=Zs;var xe="string",ke="array",Be="cursor",ue="indent",le="align",Le="trim",te="group",ce="fill",pe="if-break",he="indent-if-break",Fe="line-suffix",Pe="line-suffix-boundary",Y="line",Ne="label",fe="break-parent",mt=new Set([Be,ue,le,Le,te,ce,pe,he,Fe,Pe,Y,Ne,fe]);function ei(t){if(typeof t=="string")return xe;if(Array.isArray(t))return ke;if(!t)return;let{type:e}=t;if(mt.has(e))return e}var Ie=ei;var ti=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function ri(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(Ie(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ti([...mt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${n}.`}var rr=class extends Error{name="InvalidDocError";constructor(e){super(ri(e)),this.doc=e}},gt=rr;var Xr=()=>{},re=Xr,dt=Xr;function L(t){return re(t),{type:ue,contents:t}}function Jr(t,e){return re(e),{type:le,contents:e,n:t}}function E(t,e={}){return re(t),dt(e.expandedStates,!0),{type:te,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Zr(t){return Jr(Number.NEGATIVE_INFINITY,t)}function en(t){return Jr({type:"root"},t)}function Ct(t){return dt(t),{type:ce,parts:t}}function me(t,e="",r={}){return re(t),e!==""&&re(e),{type:pe,breakContents:t,flatContents:e,groupId:r.groupId}}function tn(t,e){return re(t),{type:he,contents:t,groupId:e.groupId,negate:e.negate}}var ne={type:fe};var ni={type:Y,hard:!0},si={type:Y,hard:!0,literal:!0},A={type:Y},v={type:Y,soft:!0},S=[ni,ne],rn=[si,ne];function M(t,e){re(t),dt(e);let r=[];for(let n=0;n{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},X=ii;function St(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Ie(i)){case ke:return e(i.map(n));case ce:return e({...i,parts:i.parts.map(n)});case pe:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case te:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case le:case ue:case he:case Ne:case Fe:return e({...i,contents:n(i.contents)});case xe:case Be:case Le:case Pe:case Y:case fe:return e(i);default:throw new gt(i)}}}function ai(t){switch(Ie(t)){case ce:if(t.parts.every(e=>e===""))return"";break;case te:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===te&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case le:case ue:case he:case Fe:if(!t.contents)return"";break;case pe:if(!t.flatContents&&!t.breakContents)return"";break;case ke:{let e=[];for(let r of t){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof X(!1,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...s)}return e.length===0?"":e.length===1?e[0]:e}case xe:case Be:case Le:case Pe:case Y:case Ne:case fe:break;default:throw new gt(t)}return t}function nn(t){return St(t,e=>ai(e))}function T(t,e=rn){return St(t,r=>typeof r=="string"?M(e,r.split(` +`)):r)}var _t="'",sn='"';function oi(t,e){let r=e===!0||e===_t?_t:sn,n=r===_t?sn:_t,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var an=oi;function nr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var q,sr=class{constructor(e){Kr(this,q,void 0);Qr(this,q,new Set(e))}getLeadingWhitespaceCount(e){let r=Q(this,q),n=0;for(let s=0;s=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return Q(this,q).has(e.charAt(0))}hasTrailingWhitespace(e){return Q(this,q).has(X(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${nr([...Q(this,q)].join(""))}]+`,s=new RegExp(r?`(${n})`:n);return e.split(s)}hasWhitespaceCharacter(e){let r=Q(this,q);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=Q(this,q);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=Q(this,q);return Array.prototype.every.call(e,n=>r.has(n))}};q=new WeakMap;var on=sr;var ui=[" ",` +`,"\f","\r"," "],li=new on(ui),F=li;var ir=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},un=ir;function ci(t){return(t==null?void 0:t.type)==="front-matter"}var Re=ci;var pi=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),hi=new Set(["if","else if","for","switch","case"]);function ln(t,e){var r;if(t.type==="text"||t.type==="comment"||Re(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=e.parameters)!=null&&r.children))for(let n of e.parameters.children)hi.has(t.name)?delete n.expression:n.expression=n.expression.trim();t.type==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim())}ln.ignoredProperties=pi;var cn=ln;async function fi(t,e){if(t.lang==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return en([t.startDelimiter,S,n,n?S:"",t.endDelimiter])}}var pn=fi;function ge(t,e=!0){return[L([v,t]),e?v:""]}function j(t,e){let r=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function x(t,e,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let s=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{s=n(a,o)});let i=await e(t,r,e);return s?E(i):ge(i)}function mi(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/.test(i)?"":x(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1,trailingComma:"none"},j)}var hn=mi;var gi=t=>String(t).split(/[/\\]/).pop();function fn(t,e){if(!e)return;let r=gi(e).toLowerCase();return t.find(({filenames:n})=>n==null?void 0:n.some(s=>s.toLowerCase()===r))??t.find(({extensions:n})=>n==null?void 0:n.some(s=>r.endsWith(s)))}function di(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function Ci(t,e){let r=t.plugins.flatMap(s=>s.languages??[]),n=di(r,e.language)??fn(r,e.physicalFile)??fn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var $e=Ci;var mn="inline",gn={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"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",search:"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",menu:"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",input:"inline-block",button:"inline-block",fieldset:"block",marquee:"inline-block",source:"block",track:"block",details:"block",summary:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},dn="normal",Cn={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function Si(t){return t.type==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var de=Si;var _i=t=>w(!1,t,/^[\t\f\r ]*\n/g,""),ar=t=>_i(F.trimEnd(t)),Sn=t=>{let e=t,r=F.getLeadingWhitespace(e);r&&(e=e.slice(r.length));let n=F.getTrailingWhitespace(e);return n&&(e=e.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:e}};function Et(t,e){return!!(t.type==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.type==="ieConditionalComment"&&!t.complete||Ce(t)&&t.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||vt(t,e)&&!U(t)&&t.type!=="interpolation")}function Se(t){return t.type==="attribute"||!t.parent||!t.prev?!1:Ei(t.prev)}function Ei(t){return t.type==="comment"&&t.value.trim()==="prettier-ignore"}function R(t){return t.type==="text"||t.type==="comment"}function U(t){return t.type==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||de(t)&&(t.name==="script"||t.name==="style"))}function _n(t){return t.children&&!U(t)}function En(t){return U(t)||t.type==="interpolation"||or(t)}function or(t){return Ln(t).startsWith("pre")}function An(t,e){var s,i;let r=n();if(r&&!t.prev&&((i=(s=t.parent)==null?void 0:s.tagDefinition)!=null&&i.ignoreFirstLf))return t.type==="interpolation";return r;function n(){return Re(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.prev&&(t.prev.type==="text"||t.prev.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:Ce(t.parent)?!0:!(!t.prev&&(t.parent.type==="root"||Ce(t)&&t.parent||U(t.parent)||Je(t.parent,e)||!bi(t.parent.cssDisplay))||t.prev&&!ki(t.prev.cssDisplay))}}function Dn(t,e){return Re(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.next&&(t.next.type==="text"||t.next.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:Ce(t.parent)?!0:!(!t.next&&(t.parent.type==="root"||Ce(t)&&t.parent||U(t.parent)||Je(t.parent,e)||!Ti(t.parent.cssDisplay))||t.next&&!xi(t.next.cssDisplay))}function vn(t){return Bi(t.cssDisplay)&&!U(t)}function Qe(t){return Re(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+10&&(["body","script","style"].includes(t.name)||t.children.some(e=>Di(e)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.type!=="text"&&bn(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||Tn(t.lastChild))}function ur(t){return t.type==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function At(t){return xn(t)||t.prev&&Ai(t.prev)||wn(t)}function Ai(t){return xn(t)||t.type==="element"&&t.fullName==="br"||wn(t)}function wn(t){return bn(t)&&Tn(t)}function bn(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.linet.sourceSpan.end.line:t.parent.type==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function xn(t){switch(t.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function Dt(t){return t.lastChild?Dt(t.lastChild):t}function Di(t){var e;return(e=t.children)==null?void 0:e.some(r=>r.type!=="text")}function kn(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function vi(t,e){let{name:r,attrMap:n}=t;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:s,lang:i}=t.attrMap;return!i&&!s?"babel":$e(e,{language:i})??kn(s)}function yi(t,e){if(!vt(t,e))return;let{attrMap:r}=t;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:s}=r;return $e(e,{language:s})??kn(n)}function wi(t,e){if(t.name!=="style")return;let{lang:r}=t.attrMap;return r?$e(e,{language:r}):"css"}function lr(t,e){return vi(t,e)??wi(t,e)??yi(t,e)}function Xe(t){return t==="block"||t==="list-item"||t.startsWith("table")}function bi(t){return!Xe(t)&&t!=="inline-block"}function Ti(t){return!Xe(t)&&t!=="inline-block"}function xi(t){return!Xe(t)}function ki(t){return!Xe(t)}function Bi(t){return!Xe(t)&&t!=="inline-block"}function Ce(t){return Ln(t).startsWith("pre")}function Li(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.parent}return!1}function Bn(t,e){var n;if(_e(t,e))return"block";if(((n=t.prev)==null?void 0:n.type)==="comment"){let s=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/);if(s)return s[1]}let r=!1;if(t.type==="element"&&t.namespace==="svg")if(Li(t,s=>s.fullName==="svg:foreignObject"))r=!0;else return t.name==="svg"?"inline-block":"block";switch(e.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:return t.type==="element"&&(!t.namespace||r||de(t))&&gn[t.name]||mn}}function Ln(t){return t.type==="element"&&(!t.namespace||de(t))&&Cn[t.name]||dn}function Fi(t){let e=Number.POSITIVE_INFINITY;for(let r of t.split(` +`)){if(r.length===0)continue;let n=F.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&nr.slice(e)).join(` -`)}function pr(t){return v(!1,v(!1,t,"'","'"),""",'"')}function L(t){return pr(t.value)}var xi=new Set(["template","style","script"]);function Ke(t,e){return Ce(t,e)&&!xi.has(t.fullName)}function Ce(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function Dt(t,e){return Ce(t,e)&&(Ke(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Bn(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function Ln(t,e){let r=t.parent;if(!Ce(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function vt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?T(e):T(cr(ar(e)),S):Y(A,H.split(e))}function yt(t,e){return Ce(t,e)&&t.name==="script"}function wt(t){return t>=9&&t<=32||t==160}function hr(t){return 48<=t&&t<=57}function bt(t){return t>=97&&t<=122||t>=65&&t<=90}function Fn(t){return t>=97&&t<=102||t>=65&&t<=70||hr(t)}function fr(t){return t===10||t===13}function mr(t){return 48<=t&&t<=55}function dr(t){return t===39||t===34||t===96}var ki=/-+([a-z0-9])/g;function Nn(t){return t.replace(ki,(...e)=>e[1].toUpperCase())}var ne=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(;a0&&(s--,a++,!(n[s]==` -`&&++o==r)););for(a=0,o=0;a]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Bi=[Fi,Pi,Ii,$i,Oi,Hi,Mi,qi,Vi,Ri];function Li(t,e){for(let r of Bi)r(t,e);return t}function Fi(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===` -`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function Pi(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let s=0;se.type==="cdata",e=>``)}function Ri(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!H.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n`+s.firstChild.value+``+a.value,i.sourceSpan=new f(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function $i(t,e){if(e.parser==="html")return;let r=/{{(.+?)}}/s;t.walk(n=>{if(Cn(n))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new f(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new f(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new f(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function Oi(t){t.walk(e=>{if(!e.children)return;if(e.children.length===0||e.children.length===1&&e.children[0].type==="text"&&H.trim(e.children[0].value).length===0){e.hasDanglingSpaces=e.children.length>0,e.children=[];return}let r=Sn(e),n=or(e);if(!r)for(let s=0;s{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function qi(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function Hi(t,e){t.walk(r=>{r.cssDisplay=xn(r,e)})}function Vi(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=An(r);return}for(let s of n)s.isLeadingSpaceSensitive=_n(s,e),s.isTrailingSpaceSensitive=En(s,e);for(let s=0;s/.test(t)}function $n(t){return` +`)}function pr(t){return w(!1,w(!1,t,"'","'"),""",'"')}function P(t){return pr(t.value)}var Pi=new Set(["template","style","script"]);function Je(t,e){return _e(t,e)&&!Pi.has(t.fullName)}function _e(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function vt(t,e){return _e(t,e)&&(Je(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Fn(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function Pn(t,e){let r=t.parent;if(!_e(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function yt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?T(e):T(cr(ar(e)),S):M(A,F.split(e))}function wt(t,e){return _e(t,e)&&t.name==="script"}var hr=/{{(.+?)}}/s;async function Nn(t,e){let r=[];for(let[n,s]of t.split(hr).entries())if(n%2===0)r.push(T(s));else try{r.push(E(["{{",L([A,await x(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0,trailingComma:"none"})]),A,"}}"]))}catch{r.push("{{",T(s),"}}")}return r}function fr({parser:t}){return(e,r,n)=>x(P(n.node),e,{parser:t,trailingComma:"none"},j)}var Ni=fr({parser:"__ng_action"}),Ii=fr({parser:"__ng_binding"}),Ri=fr({parser:"__ng_directive"});function $i(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return Ni;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/.test(n)||/^ng-(?:if|show|hide|class|style)$/.test(n))return Ii;if(n.startsWith("*"))return Ri;let s=P(r);if(/^i18n(?:-.+)?$/.test(n))return()=>ge(Ct(yt(r,s.trim())),!s.includes("@@"));if(hr.test(s))return i=>Nn(s,i)}var In=$i;function Oi(t,e){let{node:r}=t,n=P(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/).join(" ")}var Rn=Oi;function $n(t){return t===" "||t===` +`||t==="\f"||t==="\r"||t===" "}var Mi=/^[ \t\n\r\u000c]+/,qi=/^[, \t\n\r\u000c]+/,Hi=/^[^ \t\n\r\u000c]+/,Vi=/[,]+$/,On=/^\d+$/,Ui=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Wi(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let _,D=C.exec(t.substring(o));if(D)return[_]=D,o+=_.length,_}let l=[];for(;;){if(p(qi),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(Hi),n=[],r.slice(-1)===","?(r=r.replace(Vi,""),g()):m()}function m(){for(p(Mi),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if($n(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),g();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),g();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),g();return}else s+=a;else if(i==="after descriptor"&&!$n(a))if(a===""){g();return}else i="in descriptor",o-=1;o+=1}}function g(){let C=!1,_,D,I,B,c={},d,y,O,b,V;for(B=0;BYi(P(t.node))}var qn={width:"w",height:"h",density:"x"},Gi=Object.keys(qn);function Yi(t){let e=Mn(t),r=Gi.filter(l=>e.some(m=>Object.prototype.hasOwnProperty.call(m,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=qn[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let m=l.indexOf(".");return m===-1?l.length:m}),p=Math.max(...u);return ge(M([",",A],i.map((l,m)=>{let g=[l],C=o[m];if(C){let _=a-l.length+1,D=p-u[m],I=" ".repeat(_+D);g.push(me(I," "),C+s)}return g})))}var Hn=zi;function Vn(t,e){let{node:r}=t,n=P(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>ge(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var mr=new WeakMap;function ji(t,e){let{root:r}=t;return mr.has(r)||mr.set(r,r.children.some(n=>wt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),mr.get(r)}var Oe=ji;function Un(t,e,r){let{node:n}=r,s=P(n);return x(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},j)}function Wn(t,e,{parseWithTs:r}){return x(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}function zn(t){let e=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/,r=/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$_a-z][\w$]*])*$/i,n=t.trim();return e.test(n)||r.test(n)}async function Gn(t,e,r,n){let s=P(r.node),{left:i,operator:a,right:o}=Ki(s),u=Oe(r,n);return[E(await x(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await x(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function Ki(t){let e=/(.*?)\s+(in|of)\s+(.*)/s,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/,n=/^\(|\)$/g,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=w(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function Qi(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return Gn;if(n==="generic"&&wt(r.parent,e))return Un;let s=P(r),i=Oe(t,e);if(Fn(r)||Pn(r,e))return a=>Wn(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>Xi(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith("v-bind:"))return a=>Ji(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>Yn(s,a,{parseWithTs:i})}function Xi(t,e,{parseWithTs:r}){return zn(t)?Yn(t,e,{parseWithTs:r}):x(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},j)}function Ji(t,e,{parseWithTs:r}){return x(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},j)}function Yn(t,e,{parseWithTs:r}){return x(t,e,{parser:r?"__ts_expression":"__js_expression"},j)}var jn=Qi;function Zi(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[Hn,Vn,Rn,jn,In]){let s=n(t,e);if(s)return ea(s)}}}function ea(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=St(i,a=>typeof a=="string"?w(!1,a,'"',"""):a),[n.node.rawName,'="',E(i),'"']}}var Kn=Zi;var Qn=new Proxy(()=>{},{get:()=>Qn}),gr=Qn;function ta(t){return Array.isArray(t)&&t.length>0}var Me=ta;function se(t){return t.sourceSpan.start.offset}function ie(t){return t.sourceSpan.end.offset}function Ze(t,e){return[t.isSelfClosing?"":ra(t,e),Ee(t,e)]}function ra(t,e){return t.lastChild&&ve(t.lastChild)?"":[na(t,e),bt(t,e)]}function Ee(t,e){return(t.next?K(t.next):De(t.parent))?"":[Ae(t,e),W(t,e)]}function na(t,e){return De(t)?Ae(t.lastChild,e):""}function W(t,e){return ve(t)?bt(t.parent,e):et(t)?Tt(t.next):""}function bt(t,e){if(gr(!t.isSelfClosing),Xn(t,e))return"";switch(t.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function Xn(t,e){return!t.isSelfClosing&&!t.endSourceSpan&&(Se(t)||Et(t.parent,e))}function K(t){return t.prev&&t.prev.type!=="docType"&&t.type!=="angularControlFlowBlock"&&!R(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function De(t){var e;return((e=t.lastChild)==null?void 0:e.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!R(Dt(t.lastChild))&&!Ce(t)}function ve(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&R(Dt(t))}function et(t){return t.next&&!R(t.next)&&R(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function sa(t){let e=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);return e?e[1]?e[1].split(/\s+/):!0:!1}function tt(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function ia(t,e,r){var m;let{node:n}=t;if(!Me(n.attrs))return n.isSelfClosing?" ":"";let s=((m=n.prev)==null?void 0:m.type)==="comment"&&sa(n.prev.value),i=typeof s=="boolean"?()=>s:Array.isArray(s)?g=>s.includes(g.rawName):()=>!1,a=t.map(({node:g})=>i(g)?T(e.originalText.slice(se(g),ie(g))):r(),"attrs"),o=n.type==="element"&&n.fullName==="script"&&n.attrs.length===1&&n.attrs[0].fullName==="src"&&n.children.length===0,p=e.singleAttributePerLine&&n.attrs.length>1&&!_e(n,e)?S:A,l=[L([o?" ":A,M(p,a)])];return n.firstChild&&tt(n.firstChild)||n.isSelfClosing&&De(n.parent)||o?l.push(n.isSelfClosing?" ":""):l.push(e.bracketSameLine?n.isSelfClosing?" ":"":n.isSelfClosing?A:v),l}function aa(t){return t.firstChild&&tt(t.firstChild)?"":xt(t)}function rt(t,e,r){let{node:n}=t;return[ye(n,e),ia(t,e,r),n.isSelfClosing?"":aa(n)]}function ye(t,e){return t.prev&&et(t.prev)?"":[z(t,e),Tt(t)]}function z(t,e){return tt(t)?xt(t.parent):K(t)?Ae(t.prev,e):""}function Tt(t){switch(t.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<${t.rawName}`;default:return`<${t.rawName}`}}function xt(t){switch(gr(!t.isSelfClosing),t.type){case"ieConditionalComment":return"]>";case"element":if(t.condition)return">";default:return">"}}function oa(t,e){if(!t.endSourceSpan)return"";let r=t.startSourceSpan.end.offset;t.firstChild&&tt(t.firstChild)&&(r-=xt(t).length);let n=t.endSourceSpan.start.offset;return t.lastChild&&ve(t.lastChild)?n+=bt(t,e).length:De(t)&&(n-=Ae(t.lastChild,e).length),e.originalText.slice(r,n)}var kt=oa;var ua=new Set(["if","else if","for","switch","case"]);function la(t,e){let{node:r}=t;switch(r.type){case"element":if(U(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&vt(r,e)){let n=lr(r,e);return n?async(s,i)=>{let a=kt(r,e),o=/^\s*$/.test(a),u="";return o||(u=await s(ar(a),{parser:n,__embeddedInHtml:!0}),o=u===""),[z(r,e),E(rt(t,e,i)),o?"":S,u,o?"":S,Ze(r,e),W(r,e)]}:void 0}break;case"text":if(U(r.parent)){let n=lr(r.parent,e);if(n)return async s=>{let i=n==="markdown"?cr(r.value.replace(/^[^\S\n]*\n/,"")):r.value,a={parser:n,__embeddedInHtml:!0};if(e.parser==="html"&&n==="babel"){let o="script",{attrMap:u}=r.parent;u&&(u.type==="module"||u.type==="text/babel"&&u["data-type"]==="module")&&(o="module"),a.__babelSourceType=o}return[ne,z(r,e),await s(i,a),W(r,e)]}}else if(r.parent.type==="interpolation")return async n=>{let s={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return e.parser==="angular"?(s.parser="__ng_interpolation",s.trailingComma="none"):e.parser==="vue"?s.parser=Oe(t,e)?"__vue_ts_expression":"__vue_expression":s.parser="__js_expression",[L([A,await n(r.value,s)]),r.parent.next&&K(r.parent.next)?" ":A]};break;case"attribute":return Kn(t,e);case"front-matter":return n=>pn(r,n);case"angularControlFlowBlockParameters":return ua.has(t.parent.name)?hn:void 0}}var Jn=la;var nt=null;function st(t){if(nt!==null&&typeof nt.property){let e=nt;return nt=st.prototype=null,e}return nt=st.prototype=t??Object.create(null),new st}var ca=10;for(let t=0;t<=ca;t++)st();function dr(t){return st(t)}function pa(t,e="type"){dr(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var Zn=pa;var ha={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},es=ha;var fa=Zn(es),ts=fa;function rs(t){return/^\s*/.test(t)}function ns(t){return` -`+t}function se(t){return t.sourceSpan.start.offset}function ie(t){return t.sourceSpan.end.offset}async function Ui(t,e){if(t.lang==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return en([t.startDelimiter,S,n,n?S:"",t.endDelimiter])}}var On=Ui;var Mn=new Proxy(()=>{},{get:()=>Mn}),gr=Mn;function Wi(t){return Array.isArray(t)&&t.length>0}var xt=Wi;function Qe(t,e){return[t.isSelfClosing?"":zi(t,e),Xe(t,e)]}function zi(t,e){return t.lastChild&&Ae(t.lastChild)?"":[Gi(t,e),kt(t,e)]}function Xe(t,e){return(t.next?j(t.next):Ee(t.parent))?"":[_e(t,e),U(t,e)]}function Gi(t,e){return Ee(t)?_e(t.lastChild,e):""}function U(t,e){return Ae(t)?kt(t.parent,e):Je(t)?Bt(t.next):""}function kt(t,e){if(gr(!t.isSelfClosing),qn(t,e))return"";switch(t.type){case"ieConditionalComment":return"";case"ieConditionalStartComment":return"]>";case"interpolation":return"}}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function qn(t,e){return!t.isSelfClosing&&!t.endSourceSpan&&(Ge(t)||_t(t.parent,e))}function j(t){return t.prev&&t.prev.type!=="docType"&&t.type!=="angularControlFlowBlock"&&!N(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function Ee(t){var e;return((e=t.lastChild)==null?void 0:e.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!N(At(t.lastChild))&&!ge(t)}function Ae(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&N(At(t))}function Je(t){return t.next&&!N(t.next)&&N(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function Yi(t){let e=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);return e?e[1]?e[1].split(/\s+/):!0:!1}function Ze(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function ji(t,e,r){var m;let{node:n}=t;if(!xt(n.attrs))return n.isSelfClosing?" ":"";let s=((m=n.prev)==null?void 0:m.type)==="comment"&&Yi(n.prev.value),i=typeof s=="boolean"?()=>s:Array.isArray(s)?d=>s.includes(d.rawName):()=>!1,a=t.map(({node:d})=>i(d)?T(e.originalText.slice(se(d),ie(d))):r(),"attrs"),o=n.type==="element"&&n.fullName==="script"&&n.attrs.length===1&&n.attrs[0].fullName==="src"&&n.children.length===0,p=e.singleAttributePerLine&&n.attrs.length>1&&!Ce(n,e)?S:A,l=[R([o?" ":A,Y(p,a)])];return n.firstChild&&Ze(n.firstChild)||n.isSelfClosing&&Ee(n.parent)||o?l.push(n.isSelfClosing?" ":""):l.push(e.bracketSameLine?n.isSelfClosing?" ":"":n.isSelfClosing?A:b),l}function Ki(t){return t.firstChild&&Ze(t.firstChild)?"":Lt(t)}function et(t,e,r){let{node:n}=t;return[tt(n,e),ji(t,e,r),n.isSelfClosing?"":Ki(n)]}function tt(t,e){return t.prev&&Je(t.prev)?"":[W(t,e),Bt(t)]}function W(t,e){return Ze(t)?Lt(t.parent):j(t)?_e(t.prev,e):""}function Bt(t){switch(t.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<${t.rawName}`;default:return`<${t.rawName}`}}function Lt(t){switch(gr(!t.isSelfClosing),t.type){case"ieConditionalComment":return"]>";case"element":if(t.condition)return">";default:return">"}}var Cr=new WeakMap;function Qi(t,e){let{root:r}=t;return Cr.has(r)||Cr.set(r,r.children.some(n=>yt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),Cr.get(r)}var $e=Qi;function Xi(t,e){if(!t.endSourceSpan)return"";let r=t.startSourceSpan.end.offset;t.firstChild&&Ze(t.firstChild)&&(r-=Lt(t).length);let n=t.endSourceSpan.start.offset;return t.lastChild&&Ae(t.lastChild)?n+=kt(t,e).length:Ee(t)&&(n-=_e(t.lastChild,e).length),e.originalText.slice(r,n)}var Ft=Xi;function Hn(t){return t===" "||t===` -`||t==="\f"||t==="\r"||t===" "}var Ji=/^[ \t\n\r\u000c]+/,Zi=/^[, \t\n\r\u000c]+/,ea=/^[^ \t\n\r\u000c]+/,ta=/[,]+$/,Vn=/^\d+$/,ra=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function na(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let _,D=C.exec(t.substring(o));if(D)return[_]=D,o+=_.length,_}let l=[];for(;;){if(p(Zi),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(ea),n=[],r.slice(-1)===","?(r=r.replace(ta,""),d()):m()}function m(){for(p(Ji),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if(Hn(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),d();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),d();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),d();return}else s+=a;else if(i==="after descriptor"&&!Hn(a))if(a===""){d();return}else i="in descriptor",o-=1;o+=1}}function d(){let C=!1,_,D,P,B,c={},g,y,$,w,q;for(B=0;B{s=n(a,o)});let i=await e(t,r,e);return s?E(i):De(i)}function sa(t){if(t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"))return()=>aa(L(t.node))}var Wn={width:"w",height:"h",density:"x"},ia=Object.keys(Wn);function aa(t){let e=Un(t),r=ia.filter(l=>e.some(m=>Object.prototype.hasOwnProperty.call(m,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=Wn[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let m=l.indexOf(".");return m===-1?l.length:m}),p=Math.max(...u);return De(Y([",",A],i.map((l,m)=>{let d=[l],C=o[m];if(C){let _=a-l.length+1,D=p-u[m],P=" ".repeat(_+D);d.push(fe(P," "),C+s)}return d})))}var zn=sa;function oa(t,e){let{node:r}=t,n=L(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/).join(" ")}var Gn=oa;function Yn(t,e){let{node:r}=t,n=L(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>De(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}async function jn(t,e,r,n){let s=L(r.node),{left:i,operator:a,right:o}=ua(s),u=$e(r,n);return[E(await x(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await x(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function ua(t){let e=/(.*?)\s+(in|of)\s+(.*)/s,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/,n=/^\(|\)$/g,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=v(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function Kn(t,e,r){let{node:n}=r,s=L(n);return x(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},K)}function Qn(t,e,{parseWithTs:r}){return x(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}function Xn(t){let e=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/,r=/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$_a-z][\w$]*])*$/i,n=t.trim();return e.test(n)||r.test(n)}function la(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return jn;if(n==="generic"&&yt(r.parent,e))return Kn;let s=L(r),i=$e(t,e);if(Bn(r)||Ln(r,e))return a=>Qn(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>ca(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith("v-bind:"))return a=>pa(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>Jn(s,a,{parseWithTs:i})}function ca(t,e,{parseWithTs:r}){return Xn(t)?Jn(t,e,{parseWithTs:r}):x(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},K)}function pa(t,e,{parseWithTs:r}){return x(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},K)}function Jn(t,e,{parseWithTs:r}){return x(t,e,{parser:r?"__ts_expression":"__js_expression"},K)}var Zn=la;var Sr=/{{(.+?)}}/s;async function es(t,e){let r=[];for(let[n,s]of t.split(Sr).entries())if(n%2===0)r.push(T(s));else try{r.push(E(["{{",R([A,await x(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0,trailingComma:"none"})]),A,"}}"]))}catch{r.push("{{",T(s),"}}")}return r}function _r({parser:t}){return(e,r,n)=>x(L(n.node),e,{parser:t,trailingComma:"none"},K)}var ha=_r({parser:"__ng_action"}),fa=_r({parser:"__ng_binding"}),ma=_r({parser:"__ng_directive"});function da(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return ha;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/.test(n)||/^ng-(?:if|show|hide|class|style)$/.test(n))return fa;if(n.startsWith("*"))return ma;let s=L(r);if(/^i18n(?:-.+)?$/.test(n))return()=>De(gt(vt(r,s.trim())),!s.includes("@@"));if(Sr.test(s))return i=>es(s,i)}var ts=da;function ga(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[zn,Yn,Gn,Zn,ts]){let s=n(t,e);if(s)return Ca(s)}}}function Ca(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=Ct(i,a=>typeof a=="string"?v(!1,a,'"',"""):a),[n.node.rawName,'="',E(i),'"']}}var rs=ga;function Sa(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/.test(i)?"":x(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1,trailingComma:"none"},K)}var ns=Sa;var _a=new Set(["if","else if","for","switch","case"]);function Ea(t,e){let{node:r}=t;switch(r.type){case"element":if(V(r)||r.type==="interpolation")return;if(!r.isSelfClosing&&Dt(r,e)){let n=lr(r,e);return n?async(s,i)=>{let a=Ft(r,e),o=/^\s*$/.test(a),u="";return o||(u=await s(ar(a),{parser:n,__embeddedInHtml:!0}),o=u===""),[W(r,e),E(et(t,e,i)),o?"":S,u,o?"":S,Qe(r,e),U(r,e)]}:void 0}break;case"text":if(V(r.parent)){let n=lr(r.parent,e);if(n)return async s=>{let i=n==="markdown"?cr(r.value.replace(/^[^\S\n]*\n/,"")):r.value,a={parser:n,__embeddedInHtml:!0};if(e.parser==="html"&&n==="babel"){let o="script",{attrMap:u}=r.parent;u&&(u.type==="module"||u.type==="text/babel"&&u["data-type"]==="module")&&(o="module"),a.__babelSourceType=o}return[re,W(r,e),await s(i,a,{stripTrailingHardline:!0}),U(r,e)]}}else if(r.parent.type==="interpolation")return async n=>{let s={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return e.parser==="angular"?(s.parser="__ng_interpolation",s.trailingComma="none"):e.parser==="vue"?s.parser=$e(t,e)?"__vue_ts_expression":"__vue_expression":s.parser="__js_expression",[R([A,await n(r.value,s)]),r.parent.next&&j(r.parent.next)?" ":A]};break;case"attribute":return rs(t,e);case"front-matter":return n=>On(r,n);case"angularControlFlowBlockParameters":return _a.has(t.parent.name)?ns:void 0}}var ss=Ea;function rt(t,e,r){let n=t.node;return Ge(n)?[W(n,e),T(e.originalText.slice(se(n)+(n.prev&&Je(n.prev)?Bt(n).length:0),ie(n)-(n.next&&j(n.next)?_e(n,e).length:0))),U(n,e)]:r()}function Pt(t,e){return N(t)&&N(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?Et(e)?S:A:"":Et(e)?S:b:Je(t)&&(Ge(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&j(e)?"":!e.isLeadingSpaceSensitive||Et(e)||j(e)&&t.lastChild&&Ae(t.lastChild)&&t.lastChild.lastChild&&Ae(t.lastChild.lastChild)?S:e.hasLeadingSpaces?A:b}function Oe(t,e,r){let{node:n}=t;if(ur(n))return[re,...t.map(i=>{let a=i.node,o=a.prev?Pt(a.prev,a):"";return[o?[o,Ye(a.prev)?S:""]:"",rt(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if(N(o)){if(o.prev&&N(o.prev)){let _=Pt(o.prev,o);if(_)return Ye(o.prev)?[S,S,rt(i,e,r)]:[_,rt(i,e,r)]}return rt(i,e,r)}let u=[],p=[],l=[],m=[],d=o.prev?Pt(o.prev,o):"",C=o.next?Pt(o,o.next):"";return d&&(Ye(o.prev)?u.push(S,S):d===S?u.push(S):N(o.prev)?p.push(d):p.push(fe("",b,{groupId:s[a-1]}))),C&&(Ye(o)?N(o.next)&&m.push(S,S):C===S?N(o.next)&&m.push(S):l.push(C)),[...u,E([...p,E([rt(i,e,r),...l],{id:s[a]})]),...m]},"children")}function is(t,e,r){let{node:n}=t;if(_t(n,e))return[W(n,e),E(et(t,e,r)),T(Ft(n,e)),...Qe(n,e),U(n,e)];let s=n.children.length===1&&n.firstChild.type==="interpolation"&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>E([E(et(t,e,r),{id:i}),l,Qe(n,e)]),o=l=>s?tn(l,{groupId:i}):(V(n)||Ke(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:R(l),u=()=>s?fe(b,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?A:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Zr(b):b,p=()=>(n.next?j(n.next):Ee(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?fe(b,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?A:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`).test(n.lastChild.value)?"":b;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?A:""):a([Dn(n)?re:"",o([u(),Oe(t,e,r)]),p()])}var as=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function os(t,e,r){let{node:n}=t,s=[];Aa(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=us(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(R([S,Oe(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function us(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=as.get(t.name))!=null&&r.has(t.next.name)))}function Aa(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!us(t.previous)}function ls(t,e,r){return[R([b,Y([";",A],t.map(r,"children"))]),b]}var nt=null;function st(t){if(nt!==null&&typeof nt.property){let e=nt;return nt=st.prototype=null,e}return nt=st.prototype=t??Object.create(null),new st}var Da=10;for(let t=0;t<=Da;t++)st();function Er(t){return st(t)}function va(t,e="type"){Er(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var cs=va;var ya={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[]},ps=ya;var wa=cs(ps),hs=wa;function ba(t,e,r){let{node:n}=t;switch(n.type){case"front-matter":return T(n.raw);case"root":return e.__onHtmlRoot&&e.__onHtmlRoot(n),[E(Oe(t,e,r)),S];case"element":case"ieConditionalComment":return is(t,e,r);case"angularControlFlowBlock":return os(t,e,r);case"angularControlFlowBlockParameters":return ls(t,e,r);case"angularControlFlowBlockParameter":return H.trim(n.expression);case"ieConditionalStartComment":case"ieConditionalEndComment":return[tt(n),Xe(n)];case"interpolation":return[tt(n,e),...t.map(r,"children"),Xe(n,e)];case"text":{if(n.parent.type==="interpolation"){let i=/\n[^\S\n]*$/,a=i.test(n.value),o=a?n.value.replace(i,""):n.value;return[T(o),a?S:""]}let s=nn([W(n,e),...vt(n),U(n,e)]);return Array.isArray(s)?gt(s):s}case"docType":return[E([tt(n,e)," ",v(!1,n.value.replace(/^html\b/i,"html"),/\s+/g," ")]),Xe(n,e)];case"comment":return[W(n,e),T(e.originalText.slice(se(n),ie(n))),U(n,e)];case"attribute":{if(n.value===null)return n.rawName;let s=pr(n.value),i=on(s,'"');return[n.rawName,"=",i,T(i==='"'?v(!1,s,'"',"""):v(!1,s,"'","'")),i]}case"cdata":default:throw new sn(n,"HTML")}}var Ta={preprocess:In,print:ba,insertPragma:$n,massageAstNode:cn,embed:ss,getVisitorKeys:hs},fs=Ta;var Hr={};Yr(Hr,{angular:()=>vo,html:()=>Do,lwc:()=>wo,vue:()=>yo});var Kc=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var ms;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(ms||(ms={}));var ds;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(ds||(ds={}));var Ar={name:"custom-elements"},Dr={name:"no-errors-schema"};var X;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(X||(X={}));var gs;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(gs||(gs={}));var F;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(F||(F={}));function it(t){if(t[0]!=":")return[null,t];let e=t.indexOf(":",1);if(e===-1)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[t.slice(1,e),t.slice(e+1)]}function vr(t){return it(t)[1]==="ng-container"}function yr(t){return it(t)[1]==="ng-content"}function Me(t){return t===null?null:it(t)[0]}function qe(t,e){return t?`:${t}:${e}`:e}var It;function wr(){return It||(It={},Nt(X.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),Nt(X.STYLE,["*|style"]),Nt(X.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),Nt(X.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),It}function Nt(t,e){for(let r of e)It[r.toLowerCase()]=t}var Rt=class{};var xa="boolean",ka="number",Ba="string",La="object",Fa=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],Cs=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),Pa=Array.from(Cs).reduce((t,[e,r])=>(t.set(e,r),t),new Map),$t=class extends Rt{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,Fa.forEach(e=>{let r=new Map,n=new Set,[s,i]=e.split("|"),a=i.split(","),[o,u]=s.split("^");o.split(",").forEach(l=>{this._schema.set(l.toLowerCase(),r),this._eventSchema.set(l.toLowerCase(),n)});let p=u&&this._schema.get(u.toLowerCase());if(p){for(let[l,m]of p)r.set(l,m);for(let l of this._eventSchema.get(u.toLowerCase()))n.add(l)}a.forEach(l=>{if(l.length>0)switch(l[0]){case"*":n.add(l.substring(1));break;case"!":r.set(l.substring(1),xa);break;case"#":r.set(l.substring(1),ka);break;case"%":r.set(l.substring(1),La);break;default:r.set(l,Ba)}})})}hasProperty(e,r,n){if(n.some(i=>i.name===Dr.name))return!0;if(e.indexOf("-")>-1){if(vr(e)||yr(e))return!1;if(n.some(i=>i.name===Ar.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(r)}hasElement(e,r){return r.some(n=>n.name===Dr.name)||e.indexOf("-")>-1&&(vr(e)||yr(e)||r.some(n=>n.name===Ar.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,r,n){n&&(r=this.getMappedPropName(r)),e=e.toLowerCase(),r=r.toLowerCase();let s=wr()[e+"|"+r];return s||(s=wr()["*|"+r],s||X.NONE)}getMappedPropName(e){return Cs.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... -If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>Pa.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return Nn(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(Na(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function Na(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var h=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=F.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Ss,at;function He(t){return at||(Ss=new h({canSelfClose:!0}),at=Object.assign(Object.create(null),{base:new h({isVoid:!0}),meta:new h({isVoid:!0}),area:new h({isVoid:!0}),embed:new h({isVoid:!0}),link:new h({isVoid:!0}),img:new h({isVoid:!0}),input:new h({isVoid:!0}),param:new h({isVoid:!0}),hr:new h({isVoid:!0}),br:new h({isVoid:!0}),source:new h({isVoid:!0}),track:new h({isVoid:!0}),wbr:new h({isVoid:!0}),p:new h({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 h({closedByChildren:["tbody","tfoot"]}),tbody:new h({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new h({closedByChildren:["tbody"],closedByParent:!0}),tr:new h({closedByChildren:["tr"],closedByParent:!0}),td:new h({closedByChildren:["td","th"],closedByParent:!0}),th:new h({closedByChildren:["td","th"],closedByParent:!0}),col:new h({isVoid:!0}),svg:new h({implicitNamespacePrefix:"svg"}),foreignObject:new h({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new h({implicitNamespacePrefix:"math"}),li:new h({closedByChildren:["li"],closedByParent:!0}),dt:new h({closedByChildren:["dt","dd"]}),dd:new h({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new h({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new h({closedByChildren:["optgroup"],closedByParent:!0}),option:new h({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new h({ignoreFirstLf:!0}),listing:new h({ignoreFirstLf:!0}),style:new h({contentType:F.RAW_TEXT}),script:new h({contentType:F.RAW_TEXT}),title:new h({contentType:{default:F.ESCAPABLE_RAW_TEXT,svg:F.PARSABLE_DATA}}),textarea:new h({contentType:F.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new $t().allKnownElementNames().forEach(e=>{!at[e]&&Me(e)===null&&(at[e]=new h({canSelfClose:!1}))})),at[t]??Ss}var ve=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},Ot=class extends ve{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="text"}visit(e,r){return e.visitText(this,r)}},Mt=class extends ve{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="cdata"}visit(e,r){return e.visitCdata(this,r)}},qt=class extends ve{constructor(e,r,n,s,i,a){super(s,a),this.switchValue=e,this.type=r,this.cases=n,this.switchValueSourceSpan=i}visit(e,r){return e.visitExpansion(this,r)}},Ht=class{constructor(e,r,n,s,i){this.value=e,this.expression=r,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=i}visit(e,r){return e.visitExpansionCase(this,r)}},Vt=class extends ve{constructor(e,r,n,s,i,a,o){super(n,o),this.name=e,this.value=r,this.keySpan=s,this.valueSpan=i,this.valueTokens=a,this.type="attribute"}visit(e,r){return e.visitAttribute(this,r)}get nameSpan(){return this.keySpan}},z=class extends ve{constructor(e,r,n,s,i,a=null,o=null,u){super(s,u),this.name=e,this.attrs=r,this.children=n,this.startSourceSpan=i,this.endSourceSpan=a,this.nameSpan=o,this.type="element"}visit(e,r){return e.visitElement(this,r)}},Ut=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="comment"}visit(e,r){return e.visitComment(this,r)}},Wt=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="docType"}visit(e,r){return e.visitDocType(this,r)}},J=class{constructor(e,r,n,s,i,a=null){this.name=e,this.parameters=r,this.children=n,this.sourceSpan=s,this.startSourceSpan=i,this.endSourceSpan=a,this.type="block"}visit(e,r){return e.visitBlock(this,r)}},ot=class{constructor(e,r){this.expression=e,this.sourceSpan=r,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,r){return e.visitBlockParameter(this,r)}};function zt(t,e,r=null){let n=[],s=t.visit?i=>t.visit(i,r)||i.visit(t,r):i=>i.visit(t,r);return e.forEach(i=>{let a=s(i);a&&n.push(a)}),n}var ut=class{constructor(){}visitElement(e,r){this.visitChildren(r,n=>{n(e.attrs),n(e.children)})}visitAttribute(e,r){}visitText(e,r){}visitCdata(e,r){}visitComment(e,r){}visitDocType(e,r){}visitExpansion(e,r){return this.visitChildren(r,n=>{n(e.cases)})}visitExpansionCase(e,r){}visitBlock(e,r){this.visitChildren(r,n=>{n(e.parameters),n(e.children)})}visitBlockParameter(e,r){}visitChildren(e,r){let n=[],s=this;function i(a){a&&n.push(zt(s,a,e))}return r(i),Array.prototype.concat.apply([],n)}};var Ve={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` -`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\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",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",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",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",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",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},Ra="\uE500";Ve.ngsp=Ra;var $a=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function _s(t,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${t}' to be an array, [start, end].`);if(e!=null){let r=e[0],n=e[1];$a.forEach(s=>{if(s.test(r)||s.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var br=class t{static fromArray(e){return e?(_s("interpolation",e),new t(e[0],e[1])):Tr}constructor(e,r){this.start=e,this.end=r}},Tr=new br("{{","}}");var ct=class extends Re{constructor(e,r,n){super(n,e),this.tokenType=r}},Fr=class{constructor(e,r,n){this.tokens=e,this.errors=r,this.nonNormalizedIcuExpressions=n}};function Ps(t,e,r,n={}){let s=new Pr(new Se(t,e),r,n);return s.tokenize(),new Fr(lo(s.tokens),s.errors,s.nonNormalizedIcuExpressions)}var ro=/\r\n?/g;function Ue(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function ws(t){return`Unknown entity "${t}" - use the "&#;" or "&#x;" syntax`}function no(t,e){return`Unable to parse entity "${e}" - ${t} character reference entities must end with ";"`}var jt;(function(t){t.HEX="hexadecimal",t.DEC="decimal"})(jt||(jt={}));var pt=class{constructor(e){this.error=e}},Pr=class{constructor(e,r,n){this._getTagContentType=r,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||Tr,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=n.canSelfClose||!1,this._allowHtmComponentClosingTags=n.allowHtmComponentClosingTags||!1;let s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new Nr(e,s):new Kt(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=n.tokenizeBlocks??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(ro,` -`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(30),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>wt(n)?!e:xs(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(k),this._attemptCharCode(41))this._attemptCharCodeUntilFn(k);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(ks);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&dr(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(ks)}}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(oo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new ct("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new ct("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,r){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new ct(e,this._currentTokenType,r);return this._currentTokenStart=null,this._currentTokenType=null,new pt(n)}handleError(e){if(e instanceof ht&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof pt)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return uo(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let r=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(r))}_attemptStr(e){let r=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),r="";for(;this._cursor.peek()!==58&&!so(this._cursor.peek());)this._cursor.advance();let n;this._cursor.peek()===58?(r=this._cursor.getChars(e),this._cursor.advance(),n=this._cursor.clone()):n=e,this._requireCharCodeUntilFn(bs,r===""?0:1);let s=this._cursor.getChars(n);return[r,s]}_consumeTagOpen(e){let r,n,s,i=[];try{if(!bt(this._cursor.peek()))throw this._createError(Ue(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],r=s.parts[1],this._attemptCharCodeUntilFn(k);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,u]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(k),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(k);let p=this._consumeAttributeValue();i.push({prefix:o,name:u,value:p})}else i.push({prefix:o,name:u});this._attemptCharCodeUntilFn(k)}this._consumeTagOpenEnd()}catch(o){if(o instanceof pt){s?s.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let a=this._getTagContentType(r,n,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(n,r),a===F.RAW_TEXT?this._consumeRawTextWithTagClose(n,r,!1):a===F.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,r,!0)}_consumeRawTextWithTagClose(e,r,n){this._consumeRawText(n,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(k),!this._attemptStrCaseInsensitive(e?`${e}:${r}`:r))?!1:(this._attemptCharCodeUntilFn(k),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(s=>s===62,3),this._cursor.advance(),this._endToken([e,r]),this._handleFullNameStackForTagClose(e,r)}_consumeTagOpenStart(e){this._beginToken(0,e);let r=this._consumePrefixAndName();return this._endToken(r)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(Ue(e),this._cursor.getSpan());this._beginToken(14);let r=this._consumePrefixAndName();return this._endToken(r),r}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let r=this._cursor.peek();this._consumeQuote(r);let n=()=>this._cursor.peek()===r;e=this._consumeWithInterpolation(16,17,n,n),this._consumeQuote(r)}else{let r=()=>bs(this._cursor.peek());e=this._consumeWithInterpolation(16,17,r,r)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(k),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(k),this._requireCharCode(62),this._endToken([]);else{let[r,n]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(k),this._requireCharCode(62),this._endToken([r,n]),this._handleFullNameStackForTagClose(r,n)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),r=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([r]);else{let s=this._endToken([e]);r!==e&&this.nonNormalizedIcuExpressions.push(s)}this._requireCharCode(44),this._attemptCharCodeUntilFn(k),this._beginToken(7);let n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(k)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(k),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(k),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(k),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,r,n,s){this._beginToken(e);let i=[];for(;!n();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(r,o,s),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let a=this._processCarriageReturns(i.join(""));return this._endToken([a]),a}_consumeInterpolation(e,r,n){let s=[];this._beginToken(e,r),s.push(this._interpolationConfig.start);let i=this._cursor.clone(),a=null,o=!1;for(;this._cursor.peek()!==0&&(n===null||!n());){let u=this._cursor.clone();if(this._isTagStart()){this._cursor=u,s.push(this._getProcessedChars(i,u)),this._endToken(s);return}if(a===null)if(this._attemptStr(this._interpolationConfig.end)){s.push(this._getProcessedChars(i,u)),s.push(this._interpolationConfig.end),this._endToken(s);return}else this._attemptStr("//")&&(o=!0);let p=this._cursor.peek();this._cursor.advance(),p===92?this._cursor.advance():p===a?a=null:!o&&a===null&&dr(p)&&(a=p)}s.push(this._getProcessedChars(i,this._cursor)),this._endToken(s)}_getProcessedChars(e,r){return this._processCarriageReturns(r.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let r=e.peek();if(97<=r&&r<=122||65<=r&&r<=90||r===47||r===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),xs(e.peek()))return!0}return!1}_readUntil(e){let r=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(r)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),r=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!r}return!0}_handleFullNameStackForTagOpen(e,r){let n=qe(e,r);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===n)&&this._fullNameStack.push(n)}_handleFullNameStackForTagClose(e,r){let n=qe(e,r);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===n&&this._fullNameStack.pop()}};function k(t){return!wt(t)||t===0}function bs(t){return wt(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function so(t){return(t<97||12257)}function io(t){return t===59||t===0||!Fn(t)}function ao(t){return t===59||t===0||!bt(t)}function oo(t){return t!==125}function uo(t,e){return Ts(t)===Ts(e)}function Ts(t){return t>=97&&t<=122?t-97+65:t}function xs(t){return bt(t)||hr(t)||t===95}function ks(t){return t!==59&&k(t)}function lo(t){let e=[],r;for(let n=0;n0&&r.indexOf(e.peek())!==-1;)n===e&&(e=e.clone()),e.advance();let s=this.locationFromCursor(e),i=this.locationFromCursor(this),a=n!==e?this.locationFromCursor(n):s;return new f(s,i,a)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new ht('Unexpected character "EOF"',this);let r=this.charAt(e.offset);r===10?(e.line++,e.column=0):fr(r)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new ne(e.file,e.state.offset,e.state.line,e.state.column)}},Nr=class t extends Kt{constructor(e,r){e instanceof t?(super(e),this.internalState={...e.internalState}):(super(e,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new t(this)}getChars(e){let r=e.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(e()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),e()===110)this.state.peek=10;else if(e()===114)this.state.peek=13;else if(e()===118)this.state.peek=11;else if(e()===116)this.state.peek=9;else if(e()===98)this.state.peek=8;else if(e()===102)this.state.peek=12;else if(e()===117)if(this.advanceState(this.internalState),e()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;e()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(e()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(mr(e())){let r="",n=0,s=this.clone();for(;mr(e())&&n<3;)s=this.clone(),r+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=s.internalState}else fr(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,r){let n=this.input.slice(e.internalState.offset,e.internalState.offset+r),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new ht("Invalid hexadecimal escape sequence",e);return s}},ht=class{constructor(e,r){this.msg=e,this.cursor=r}};var I=class t extends Re{static create(e,r,n){return new t(e,r,n)}constructor(e,r,n){super(r,n),this.elementName=e}},$r=class{constructor(e,r){this.rootNodes=e,this.errors=r}},Qt=class{constructor(e){this.getTagDefinition=e}parse(e,r,n,s=!1,i){let a=D=>(P,...B)=>D(P.toLowerCase(),...B),o=s?this.getTagDefinition:a(this.getTagDefinition),u=D=>o(D).getContentType(),p=s?i:a(i),m=Ps(e,r,i?(D,P,B,c)=>{let g=p(D,P,B,c);return g!==void 0?g:u(D)}:u,n),d=n&&n.canSelfClose||!1,C=n&&n.allowHtmComponentClosingTags||!1,_=new Or(m.tokens,o,d,C,s);return _.build(),new $r(_.rootNodes,m.errors.concat(_.errors))}},Or=class t{constructor(e,r,n,s,i){this.tokens=e,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=s,this.isTagNameCaseSensitive=i,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==30;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._advance();for(let e of this._containerStack)e instanceof J&&this.errors.push(I.create(e.name,e.sourceSpan,`Unclosed block "${e.name}"`))}_advance(){let e=this._peek;return this._index0)return this.errors=this.errors.concat(i.errors),null;let a=new f(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),o=new f(r.sourceSpan.start,s.sourceSpan.end,r.sourceSpan.fullStart);return new Ht(e.parts[0],i.rootNodes,a,e.sourceSpan,o)}_collectExpansionExpTokens(e){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(Ns(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push(I.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(Ns(n,20))n.pop();else return this.errors.push(I.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===30)return this.errors.push(I.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(e){let r=e.parts[0];if(r.length>0&&r[0]==` +`+t}var ss=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function is(t){let e=ie(t);return t.type==="element"&&!t.endSourceSpan&&Me(t.children)?Math.max(e,is(X(!1,t.children,-1))):e}function it(t,e,r){let n=t.node;if(Se(n)){let s=is(n);return[z(n,e),T(F.trimEnd(e.originalText.slice(se(n)+(n.prev&&et(n.prev)?Tt(n).length:0),s-(n.next&&K(n.next)?Ae(n,e).length:0)))),W(n,e)]}return r()}function Bt(t,e){return R(t)&&R(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?At(e)?S:A:"":At(e)?S:v:et(t)&&(Se(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&K(e)?"":!e.isLeadingSpaceSensitive||At(e)||K(e)&&t.lastChild&&ve(t.lastChild)&&t.lastChild.lastChild&&ve(t.lastChild.lastChild)?S:e.hasLeadingSpaces?A:v}function qe(t,e,r){let{node:n}=t;if(ur(n))return[ne,...t.map(i=>{let a=i.node,o=a.prev?Bt(a.prev,a):"";return[o?[o,Qe(a.prev)?S:""]:"",it(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if(R(o)){if(o.prev&&R(o.prev)){let _=Bt(o.prev,o);if(_)return Qe(o.prev)?[S,S,it(i,e,r)]:[_,it(i,e,r)]}return it(i,e,r)}let u=[],p=[],l=[],m=[],g=o.prev?Bt(o.prev,o):"",C=o.next?Bt(o,o.next):"";return g&&(Qe(o.prev)?u.push(S,S):g===S?u.push(S):R(o.prev)?p.push(g):p.push(me("",v,{groupId:s[a-1]}))),C&&(Qe(o)?R(o.next)&&m.push(S,S):C===S?R(o.next)&&m.push(S):l.push(C)),[...u,E([...p,E([it(i,e,r),...l],{id:s[a]})]),...m]},"children")}function as(t,e,r){let{node:n}=t,s=[];ma(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=os(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(L([S,qe(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function os(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=ss.get(t.name))!=null&&r.has(t.next.name)))}function ma(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!Se(e)&&!os(e)}function us(t,e,r){return[L([v,M([";",A],t.map(r,"children"))]),v]}function ls(t,e,r){let{node:n}=t;return[ye(n,e),E([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",L([A,M(A,t.map(r,"cases"))])]:"",v]),Ee(n,e)]}function cs(t,e,r){let{node:n}=t;return[n.value," {",E([L([v,t.map(({node:s})=>s.type==="text"&&!F.trim(s.value)?"":r(),"expression")]),v]),"}"]}function ps(t,e,r){let{node:n}=t;if(Et(n,e))return[z(n,e),E(rt(t,e,r)),T(kt(n,e)),...Ze(n,e),W(n,e)];let s=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>E([E(rt(t,e,r),{id:i}),l,Ze(n,e)]),o=l=>s?tn(l,{groupId:i}):(U(n)||Je(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:L(l),u=()=>s?me(v,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?A:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Zr(v):v,p=()=>(n.next?K(n.next):De(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?me(v,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?A:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`).test(n.lastChild.value)?"":v;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?A:""):a([yn(n)?ne:"",o([u(),qe(t,e,r)]),p()])}function Lt(t){return t>=9&&t<=32||t==160}function Cr(t){return 48<=t&&t<=57}function Ft(t){return t>=97&&t<=122||t>=65&&t<=90}function hs(t){return t>=97&&t<=102||t>=65&&t<=70||Cr(t)}function Sr(t){return t===10||t===13}function _r(t){return 48<=t&&t<=55}function Er(t){return t===39||t===34||t===96}var ga=/-+([a-z0-9])/g;function ms(t){return t.replace(ga,(...e)=>e[1].toUpperCase())}var ae=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(;a0&&(s--,a++,!(n[s]==` +`&&++o==r)););for(a=0,o=0;a]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var da=[Sa,_a,Aa,va,ya,Ta,wa,ba,xa,Da];function Ca(t,e){for(let r of da)r(t,e);return t}function Sa(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===` +`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function _a(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n{if(n.children)for(let s=0;se.type==="cdata",e=>``)}function Da(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!F.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n`+s.firstChild.value+``+a.value,i.sourceSpan=new f(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function va(t,e){if(e.parser==="html")return;let r=/{{(.+?)}}/s;t.walk(n=>{if(_n(n))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new f(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new f(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new f(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function ya(t){t.walk(e=>{if(!e.children)return;if(e.children.length===0||e.children.length===1&&e.children[0].type==="text"&&F.trim(e.children[0].value).length===0){e.hasDanglingSpaces=e.children.length>0,e.children=[];return}let r=En(e),n=or(e);if(!r)for(let s=0;s{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function ba(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function Ta(t,e){t.walk(r=>{r.cssDisplay=Bn(r,e)})}function xa(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=vn(r);return}for(let s of n)s.isLeadingSpaceSensitive=An(s,e),s.isTrailingSpaceSensitive=Dn(s,e);for(let s=0;s of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Ss="HTML",La={bracketSameLine:Ar.bracketSameLine,htmlWhitespaceSensitivity:{category:Ss,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."}]},singleAttributePerLine:Ar.singleAttributePerLine,vueIndentScriptAndStyle:{category:Ss,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},_s=La;var Vr={};Yr(Vr,{angular:()=>xo,html:()=>To,lwc:()=>Bo,vue:()=>ko});var hp=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var Es;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(Es||(Es={}));var As;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(As||(As={}));var Dr={name:"custom-elements"},vr={name:"no-errors-schema"};var J;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(J||(J={}));var Ds;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Ds||(Ds={}));var N;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(N||(N={}));function at(t){if(t[0]!=":")return[null,t];let e=t.indexOf(":",1);if(e===-1)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[t.slice(1,e),t.slice(e+1)]}function yr(t){return at(t)[1]==="ng-container"}function wr(t){return at(t)[1]==="ng-content"}function Ue(t){return t===null?null:at(t)[0]}function We(t,e){return t?`:${t}:${e}`:e}var It;function br(){return It||(It={},Nt(J.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),Nt(J.STYLE,["*|style"]),Nt(J.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),Nt(J.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),It}function Nt(t,e){for(let r of e)It[r.toLowerCase()]=t}var Rt=class{};var Fa="boolean",Pa="number",Na="string",Ia="object",Ra=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|"],vs=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"})),$a=Array.from(vs).reduce((t,[e,r])=>(t.set(e,r),t),new Map),$t=class extends Rt{constructor(){super(),this._schema=new Map,this._eventSchema=new Map,Ra.forEach(e=>{let r=new Map,n=new Set,[s,i]=e.split("|"),a=i.split(","),[o,u]=s.split("^");o.split(",").forEach(l=>{this._schema.set(l.toLowerCase(),r),this._eventSchema.set(l.toLowerCase(),n)});let p=u&&this._schema.get(u.toLowerCase());if(p){for(let[l,m]of p)r.set(l,m);for(let l of this._eventSchema.get(u.toLowerCase()))n.add(l)}a.forEach(l=>{if(l.length>0)switch(l[0]){case"*":n.add(l.substring(1));break;case"!":r.set(l.substring(1),Fa);break;case"#":r.set(l.substring(1),Pa);break;case"%":r.set(l.substring(1),Ia);break;default:r.set(l,Na)}})})}hasProperty(e,r,n){if(n.some(i=>i.name===vr.name))return!0;if(e.indexOf("-")>-1){if(yr(e)||wr(e))return!1;if(n.some(i=>i.name===Dr.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(r)}hasElement(e,r){return r.some(n=>n.name===vr.name)||e.indexOf("-")>-1&&(yr(e)||wr(e)||r.some(n=>n.name===Dr.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,r,n){n&&(r=this.getMappedPropName(r)),e=e.toLowerCase(),r=r.toLowerCase();let s=br()[e+"|"+r];return s||(s=br()["*|"+r],s||J.NONE)}getMappedPropName(e){return vs.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=... +If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>$a.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return ms(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(Oa(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function Oa(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var h=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=N.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},ys,ot;function ze(t){return ot||(ys=new h({canSelfClose:!0}),ot=Object.assign(Object.create(null),{base:new h({isVoid:!0}),meta:new h({isVoid:!0}),area:new h({isVoid:!0}),embed:new h({isVoid:!0}),link:new h({isVoid:!0}),img:new h({isVoid:!0}),input:new h({isVoid:!0}),param:new h({isVoid:!0}),hr:new h({isVoid:!0}),br:new h({isVoid:!0}),source:new h({isVoid:!0}),track:new h({isVoid:!0}),wbr:new h({isVoid:!0}),p:new h({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 h({closedByChildren:["tbody","tfoot"]}),tbody:new h({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new h({closedByChildren:["tbody"],closedByParent:!0}),tr:new h({closedByChildren:["tr"],closedByParent:!0}),td:new h({closedByChildren:["td","th"],closedByParent:!0}),th:new h({closedByChildren:["td","th"],closedByParent:!0}),col:new h({isVoid:!0}),svg:new h({implicitNamespacePrefix:"svg"}),foreignObject:new h({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new h({implicitNamespacePrefix:"math"}),li:new h({closedByChildren:["li"],closedByParent:!0}),dt:new h({closedByChildren:["dt","dd"]}),dd:new h({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new h({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new h({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new h({closedByChildren:["optgroup"],closedByParent:!0}),option:new h({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new h({ignoreFirstLf:!0}),listing:new h({ignoreFirstLf:!0}),style:new h({contentType:N.RAW_TEXT}),script:new h({contentType:N.RAW_TEXT}),title:new h({contentType:{default:N.ESCAPABLE_RAW_TEXT,svg:N.PARSABLE_DATA}}),textarea:new h({contentType:N.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new $t().allKnownElementNames().forEach(e=>{!ot[e]&&Ue(e)===null&&(ot[e]=new h({canSelfClose:!1}))})),ot[t]??ys}var be=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},Ot=class extends be{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="text"}visit(e,r){return e.visitText(this,r)}},Mt=class extends be{constructor(e,r,n,s){super(r,s),this.value=e,this.tokens=n,this.type="cdata"}visit(e,r){return e.visitCdata(this,r)}},qt=class extends be{constructor(e,r,n,s,i,a){super(s,a),this.switchValue=e,this.type=r,this.cases=n,this.switchValueSourceSpan=i}visit(e,r){return e.visitExpansion(this,r)}},Ht=class{constructor(e,r,n,s,i){this.value=e,this.expression=r,this.sourceSpan=n,this.valueSourceSpan=s,this.expSourceSpan=i,this.type="expansionCase"}visit(e,r){return e.visitExpansionCase(this,r)}},Vt=class extends be{constructor(e,r,n,s,i,a,o){super(n,o),this.name=e,this.value=r,this.keySpan=s,this.valueSpan=i,this.valueTokens=a,this.type="attribute"}visit(e,r){return e.visitAttribute(this,r)}get nameSpan(){return this.keySpan}},G=class extends be{constructor(e,r,n,s,i,a=null,o=null,u){super(s,u),this.name=e,this.attrs=r,this.children=n,this.startSourceSpan=i,this.endSourceSpan=a,this.nameSpan=o,this.type="element"}visit(e,r){return e.visitElement(this,r)}},Ut=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="comment"}visit(e,r){return e.visitComment(this,r)}},Wt=class{constructor(e,r){this.value=e,this.sourceSpan=r,this.type="docType"}visit(e,r){return e.visitDocType(this,r)}},Z=class{constructor(e,r,n,s,i,a=null){this.name=e,this.parameters=r,this.children=n,this.sourceSpan=s,this.startSourceSpan=i,this.endSourceSpan=a,this.type="block"}visit(e,r){return e.visitBlock(this,r)}},ut=class{constructor(e,r){this.expression=e,this.sourceSpan=r,this.type="blockParameter",this.startSourceSpan=null,this.endSourceSpan=null}visit(e,r){return e.visitBlockParameter(this,r)}};function zt(t,e,r=null){let n=[],s=t.visit?i=>t.visit(i,r)||i.visit(t,r):i=>i.visit(t,r);return e.forEach(i=>{let a=s(i);a&&n.push(a)}),n}var lt=class{constructor(){}visitElement(e,r){this.visitChildren(r,n=>{n(e.attrs),n(e.children)})}visitAttribute(e,r){}visitText(e,r){}visitCdata(e,r){}visitComment(e,r){}visitDocType(e,r){}visitExpansion(e,r){return this.visitChildren(r,n=>{n(e.cases)})}visitExpansionCase(e,r){}visitBlock(e,r){this.visitChildren(r,n=>{n(e.parameters),n(e.children)})}visitBlockParameter(e,r){}visitChildren(e,r){let n=[],s=this;function i(a){a&&n.push(zt(s,a,e))}return r(i),Array.prototype.concat.apply([],n)}};var Ge={AElig:"\xC6",AMP:"&",amp:"&",Aacute:"\xC1",Abreve:"\u0102",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",af:"\u2061",Aring:"\xC5",angst:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",colone:"\u2254",coloneq:"\u2254",Atilde:"\xC3",Auml:"\xC4",Backslash:"\u2216",setminus:"\u2216",setmn:"\u2216",smallsetminus:"\u2216",ssetmn:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",doublebarwedge:"\u2306",Bcy:"\u0411",Because:"\u2235",becaus:"\u2235",because:"\u2235",Bernoullis:"\u212C",Bscr:"\u212C",bernou:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",breve:"\u02D8",Bumpeq:"\u224E",HumpDownHump:"\u224E",bump:"\u224E",CHcy:"\u0427",COPY:"\xA9",copy:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",DD:"\u2145",Cayleys:"\u212D",Cfr:"\u212D",Ccaron:"\u010C",Ccedil:"\xC7",Ccirc:"\u0108",Cconint:"\u2230",Cdot:"\u010A",Cedilla:"\xB8",cedil:"\xB8",CenterDot:"\xB7",centerdot:"\xB7",middot:"\xB7",Chi:"\u03A7",CircleDot:"\u2299",odot:"\u2299",CircleMinus:"\u2296",ominus:"\u2296",CirclePlus:"\u2295",oplus:"\u2295",CircleTimes:"\u2297",otimes:"\u2297",ClockwiseContourIntegral:"\u2232",cwconint:"\u2232",CloseCurlyDoubleQuote:"\u201D",rdquo:"\u201D",rdquor:"\u201D",CloseCurlyQuote:"\u2019",rsquo:"\u2019",rsquor:"\u2019",Colon:"\u2237",Proportion:"\u2237",Colone:"\u2A74",Congruent:"\u2261",equiv:"\u2261",Conint:"\u222F",DoubleContourIntegral:"\u222F",ContourIntegral:"\u222E",conint:"\u222E",oint:"\u222E",Copf:"\u2102",complexes:"\u2102",Coproduct:"\u2210",coprod:"\u2210",CounterClockwiseContourIntegral:"\u2233",awconint:"\u2233",Cross:"\u2A2F",Cscr:"\u{1D49E}",Cup:"\u22D3",CupCap:"\u224D",asympeq:"\u224D",DDotrahd:"\u2911",DJcy:"\u0402",DScy:"\u0405",DZcy:"\u040F",Dagger:"\u2021",ddagger:"\u2021",Darr:"\u21A1",Dashv:"\u2AE4",DoubleLeftTee:"\u2AE4",Dcaron:"\u010E",Dcy:"\u0414",Del:"\u2207",nabla:"\u2207",Delta:"\u0394",Dfr:"\u{1D507}",DiacriticalAcute:"\xB4",acute:"\xB4",DiacriticalDot:"\u02D9",dot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",dblac:"\u02DD",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"\u02DC",tilde:"\u02DC",Diamond:"\u22C4",diam:"\u22C4",diamond:"\u22C4",DifferentialD:"\u2146",dd:"\u2146",Dopf:"\u{1D53B}",Dot:"\xA8",DoubleDot:"\xA8",die:"\xA8",uml:"\xA8",DotDot:"\u20DC",DotEqual:"\u2250",doteq:"\u2250",esdot:"\u2250",DoubleDownArrow:"\u21D3",Downarrow:"\u21D3",dArr:"\u21D3",DoubleLeftArrow:"\u21D0",Leftarrow:"\u21D0",lArr:"\u21D0",DoubleLeftRightArrow:"\u21D4",Leftrightarrow:"\u21D4",hArr:"\u21D4",iff:"\u21D4",DoubleLongLeftArrow:"\u27F8",Longleftarrow:"\u27F8",xlArr:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",Longleftrightarrow:"\u27FA",xhArr:"\u27FA",DoubleLongRightArrow:"\u27F9",Longrightarrow:"\u27F9",xrArr:"\u27F9",DoubleRightArrow:"\u21D2",Implies:"\u21D2",Rightarrow:"\u21D2",rArr:"\u21D2",DoubleRightTee:"\u22A8",vDash:"\u22A8",DoubleUpArrow:"\u21D1",Uparrow:"\u21D1",uArr:"\u21D1",DoubleUpDownArrow:"\u21D5",Updownarrow:"\u21D5",vArr:"\u21D5",DoubleVerticalBar:"\u2225",par:"\u2225",parallel:"\u2225",shortparallel:"\u2225",spar:"\u2225",DownArrow:"\u2193",ShortDownArrow:"\u2193",darr:"\u2193",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",duarr:"\u21F5",DownBreve:"\u0311",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",leftharpoondown:"\u21BD",lhard:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",rhard:"\u21C1",rightharpoondown:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",top:"\u22A4",DownTeeArrow:"\u21A7",mapstodown:"\u21A7",Dscr:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ETH:"\xD0",Eacute:"\xC9",Ecaron:"\u011A",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrave:"\xC8",Element:"\u2208",in:"\u2208",isin:"\u2208",isinv:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",Epsilon:"\u0395",Equal:"\u2A75",EqualTilde:"\u2242",eqsim:"\u2242",esim:"\u2242",Equilibrium:"\u21CC",rightleftharpoons:"\u21CC",rlhar:"\u21CC",Escr:"\u2130",expectation:"\u2130",Esim:"\u2A73",Eta:"\u0397",Euml:"\xCB",Exists:"\u2203",exist:"\u2203",ExponentialE:"\u2147",ee:"\u2147",exponentiale:"\u2147",Fcy:"\u0424",Ffr:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",blacksquare:"\u25AA",squarf:"\u25AA",squf:"\u25AA",Fopf:"\u{1D53D}",ForAll:"\u2200",forall:"\u2200",Fouriertrf:"\u2131",Fscr:"\u2131",GJcy:"\u0403",GT:">",gt:">",Gamma:"\u0393",Gammad:"\u03DC",Gbreve:"\u011E",Gcedil:"\u0122",Gcirc:"\u011C",Gcy:"\u0413",Gdot:"\u0120",Gfr:"\u{1D50A}",Gg:"\u22D9",ggg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",ge:"\u2265",geq:"\u2265",GreaterEqualLess:"\u22DB",gel:"\u22DB",gtreqless:"\u22DB",GreaterFullEqual:"\u2267",gE:"\u2267",geqq:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",gl:"\u2277",gtrless:"\u2277",GreaterSlantEqual:"\u2A7E",geqslant:"\u2A7E",ges:"\u2A7E",GreaterTilde:"\u2273",gsim:"\u2273",gtrsim:"\u2273",Gscr:"\u{1D4A2}",Gt:"\u226B",NestedGreaterGreater:"\u226B",gg:"\u226B",HARDcy:"\u042A",Hacek:"\u02C7",caron:"\u02C7",Hat:"^",Hcirc:"\u0124",Hfr:"\u210C",Poincareplane:"\u210C",HilbertSpace:"\u210B",Hscr:"\u210B",hamilt:"\u210B",Hopf:"\u210D",quaternions:"\u210D",HorizontalLine:"\u2500",boxh:"\u2500",Hstrok:"\u0126",HumpEqual:"\u224F",bumpe:"\u224F",bumpeq:"\u224F",IEcy:"\u0415",IJlig:"\u0132",IOcy:"\u0401",Iacute:"\xCD",Icirc:"\xCE",Icy:"\u0418",Idot:"\u0130",Ifr:"\u2111",Im:"\u2111",image:"\u2111",imagpart:"\u2111",Igrave:"\xCC",Imacr:"\u012A",ImaginaryI:"\u2148",ii:"\u2148",Int:"\u222C",Integral:"\u222B",int:"\u222B",Intersection:"\u22C2",bigcap:"\u22C2",xcap:"\u22C2",InvisibleComma:"\u2063",ic:"\u2063",InvisibleTimes:"\u2062",it:"\u2062",Iogon:"\u012E",Iopf:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",imagline:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",LJcy:"\u0409",LT:"<",lt:"<",Lacute:"\u0139",Lambda:"\u039B",Lang:"\u27EA",Laplacetrf:"\u2112",Lscr:"\u2112",lagran:"\u2112",Larr:"\u219E",twoheadleftarrow:"\u219E",Lcaron:"\u013D",Lcedil:"\u013B",Lcy:"\u041B",LeftAngleBracket:"\u27E8",lang:"\u27E8",langle:"\u27E8",LeftArrow:"\u2190",ShortLeftArrow:"\u2190",larr:"\u2190",leftarrow:"\u2190",slarr:"\u2190",LeftArrowBar:"\u21E4",larrb:"\u21E4",LeftArrowRightArrow:"\u21C6",leftrightarrows:"\u21C6",lrarr:"\u21C6",LeftCeiling:"\u2308",lceil:"\u2308",LeftDoubleBracket:"\u27E6",lobrk:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",dharl:"\u21C3",downharpoonleft:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",lfloor:"\u230A",LeftRightArrow:"\u2194",harr:"\u2194",leftrightarrow:"\u2194",LeftRightVector:"\u294E",LeftTee:"\u22A3",dashv:"\u22A3",LeftTeeArrow:"\u21A4",mapstoleft:"\u21A4",LeftTeeVector:"\u295A",LeftTriangle:"\u22B2",vartriangleleft:"\u22B2",vltri:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",ltrie:"\u22B4",trianglelefteq:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",uharl:"\u21BF",upharpoonleft:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",leftharpoonup:"\u21BC",lharu:"\u21BC",LeftVectorBar:"\u2952",LessEqualGreater:"\u22DA",leg:"\u22DA",lesseqgtr:"\u22DA",LessFullEqual:"\u2266",lE:"\u2266",leqq:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",lg:"\u2276",LessLess:"\u2AA1",LessSlantEqual:"\u2A7D",leqslant:"\u2A7D",les:"\u2A7D",LessTilde:"\u2272",lesssim:"\u2272",lsim:"\u2272",Lfr:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",lAarr:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",longleftarrow:"\u27F5",xlarr:"\u27F5",LongLeftRightArrow:"\u27F7",longleftrightarrow:"\u27F7",xharr:"\u27F7",LongRightArrow:"\u27F6",longrightarrow:"\u27F6",xrarr:"\u27F6",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",swarr:"\u2199",swarrow:"\u2199",LowerRightArrow:"\u2198",searr:"\u2198",searrow:"\u2198",Lsh:"\u21B0",lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",NestedLessLess:"\u226A",ll:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mscr:"\u2133",phmmat:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",mnplus:"\u2213",mp:"\u2213",Mopf:"\u{1D544}",Mu:"\u039C",NJcy:"\u040A",Nacute:"\u0143",Ncaron:"\u0147",Ncedil:"\u0145",Ncy:"\u041D",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",ZeroWidthSpace:"\u200B",NewLine:` +`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vrtri:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",rtrie:"\u22B5",trianglerighteq:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",uharr:"\u21BE",upharpoonright:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",rharu:"\u21C0",rightharpoonup:"\u21C0",RightVectorBar:"\u2953",Ropf:"\u211D",reals:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",rAarr:"\u21DB",Rscr:"\u211B",realine:"\u211B",Rsh:"\u21B1",rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortUpArrow:"\u2191",UpArrow:"\u2191",uarr:"\u2191",uparrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",compfn:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",radic:"\u221A",Square:"\u25A1",squ:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",sqcap:"\u2293",SquareSubset:"\u228F",sqsub:"\u228F",sqsubset:"\u228F",SquareSubsetEqual:"\u2291",sqsube:"\u2291",sqsubseteq:"\u2291",SquareSuperset:"\u2290",sqsup:"\u2290",sqsupset:"\u2290",SquareSupersetEqual:"\u2292",sqsupe:"\u2292",sqsupseteq:"\u2292",SquareUnion:"\u2294",sqcup:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",sstarf:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",sube:"\u2286",subseteq:"\u2286",Succeeds:"\u227B",sc:"\u227B",succ:"\u227B",SucceedsEqual:"\u2AB0",sce:"\u2AB0",succeq:"\u2AB0",SucceedsSlantEqual:"\u227D",sccue:"\u227D",succcurlyeq:"\u227D",SucceedsTilde:"\u227F",scsim:"\u227F",succsim:"\u227F",Sum:"\u2211",sum:"\u2211",Sup:"\u22D1",Supset:"\u22D1",Superset:"\u2283",sup:"\u2283",supset:"\u2283",SupersetEqual:"\u2287",supe:"\u2287",supseteq:"\u2287",THORN:"\xDE",TRADE:"\u2122",trade:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",there4:"\u2234",therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",Tilde:"\u223C",sim:"\u223C",thicksim:"\u223C",thksim:"\u223C",TildeEqual:"\u2243",sime:"\u2243",simeq:"\u2243",TildeFullEqual:"\u2245",cong:"\u2245",TildeTilde:"\u2248",ap:"\u2248",approx:"\u2248",asymp:"\u2248",thickapprox:"\u2248",thkap:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",tdot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",lowbar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",bbrk:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",bigcup:"\u22C3",xcup:"\u22C3",UnionPlus:"\u228E",uplus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",udarr:"\u21C5",UpDownArrow:"\u2195",updownarrow:"\u2195",varr:"\u2195",UpEquilibrium:"\u296E",udhar:"\u296E",UpTee:"\u22A5",bot:"\u22A5",bottom:"\u22A5",perp:"\u22A5",UpTeeArrow:"\u21A5",mapstoup:"\u21A5",UpperLeftArrow:"\u2196",nwarr:"\u2196",nwarrow:"\u2196",UpperRightArrow:"\u2197",nearr:"\u2197",nearrow:"\u2197",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash:"\u22A9",Vdashl:"\u2AE6",Vee:"\u22C1",bigvee:"\u22C1",xvee:"\u22C1",Verbar:"\u2016",Vert:"\u2016",VerticalBar:"\u2223",mid:"\u2223",shortmid:"\u2223",smid:"\u2223",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",wr:"\u2240",wreath:"\u2240",VeryThinSpace:"\u200A",hairsp:"\u200A",Vfr:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",bigwedge:"\u22C0",xwedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",Zeta:"\u0396",Zfr:"\u2128",zeetrf:"\u2128",Zopf:"\u2124",integers:"\u2124",Zscr:"\u{1D4B5}",aacute:"\xE1",abreve:"\u0103",ac:"\u223E",mstpos:"\u223E",acE:"\u223E\u0333",acd:"\u223F",acirc:"\xE2",acy:"\u0430",aelig:"\xE6",afr:"\u{1D51E}",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",amacr:"\u0101",amalg:"\u2A3F",and:"\u2227",wedge:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",angle:"\u2220",ange:"\u29A4",angmsd:"\u2221",measuredangle:"\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",angzarr:"\u237C",aogon:"\u0105",aopf:"\u{1D552}",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",approxeq:"\u224A",apid:"\u224B",apos:"'",aring:"\xE5",ascr:"\u{1D4B6}",ast:"*",midast:"*",atilde:"\xE3",auml:"\xE4",awint:"\u2A11",bNot:"\u2AED",backcong:"\u224C",bcong:"\u224C",backepsilon:"\u03F6",bepsi:"\u03F6",backprime:"\u2035",bprime:"\u2035",backsim:"\u223D",bsim:"\u223D",backsimeq:"\u22CD",bsime:"\u22CD",barvee:"\u22BD",barwed:"\u2305",barwedge:"\u2305",bbrktbrk:"\u23B6",bcy:"\u0431",bdquo:"\u201E",ldquor:"\u201E",bemptyv:"\u29B0",beta:"\u03B2",beth:"\u2136",between:"\u226C",twixt:"\u226C",bfr:"\u{1D51F}",bigcirc:"\u25EF",xcirc:"\u25EF",bigodot:"\u2A00",xodot:"\u2A00",bigoplus:"\u2A01",xoplus:"\u2A01",bigotimes:"\u2A02",xotime:"\u2A02",bigsqcup:"\u2A06",xsqcup:"\u2A06",bigstar:"\u2605",starf:"\u2605",bigtriangledown:"\u25BD",xdtri:"\u25BD",bigtriangleup:"\u25B3",xutri:"\u25B3",biguplus:"\u2A04",xuplus:"\u2A04",bkarow:"\u290D",rbarr:"\u290D",blacklozenge:"\u29EB",lozf:"\u29EB",blacktriangle:"\u25B4",utrif:"\u25B4",blacktriangledown:"\u25BE",dtrif:"\u25BE",blacktriangleleft:"\u25C2",ltrif:"\u25C2",blacktriangleright:"\u25B8",rtrif:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bopf:"\u{1D553}",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",boxhD:"\u2565",boxhU:"\u2568",boxhd:"\u252C",boxhu:"\u2534",boxminus:"\u229F",minusb:"\u229F",boxplus:"\u229E",plusb:"\u229E",boxtimes:"\u22A0",timesb:"\u22A0",boxuL:"\u255B",boxuR:"\u2558",boxul:"\u2518",boxur:"\u2514",boxv:"\u2502",boxvH:"\u256A",boxvL:"\u2561",boxvR:"\u255E",boxvh:"\u253C",boxvl:"\u2524",boxvr:"\u251C",brvbar:"\xA6",bscr:"\u{1D4B7}",bsemi:"\u204F",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bumpE:"\u2AAE",cacute:"\u0107",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",caps:"\u2229\uFE00",caret:"\u2041",ccaps:"\u2A4D",ccaron:"\u010D",ccedil:"\xE7",ccirc:"\u0109",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",cemptyv:"\u29B2",cent:"\xA2",cfr:"\u{1D520}",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",cir:"\u25CB",cirE:"\u29C3",circ:"\u02C6",circeq:"\u2257",cire:"\u2257",circlearrowleft:"\u21BA",olarr:"\u21BA",circlearrowright:"\u21BB",orarr:"\u21BB",circledS:"\u24C8",oS:"\u24C8",circledast:"\u229B",oast:"\u229B",circledcirc:"\u229A",ocir:"\u229A",circleddash:"\u229D",odash:"\u229D",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",clubs:"\u2663",clubsuit:"\u2663",colon:":",comma:",",commat:"@",comp:"\u2201",complement:"\u2201",congdot:"\u2A6D",copf:"\u{1D554}",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",curlyeqprec:"\u22DE",cuesc:"\u22DF",curlyeqsucc:"\u22DF",cularr:"\u21B6",curvearrowleft:"\u21B6",cularrp:"\u293D",cup:"\u222A",cupbrcap:"\u2A48",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curvearrowright:"\u21B7",curarrm:"\u293C",curlyvee:"\u22CE",cuvee:"\u22CE",curlywedge:"\u22CF",cuwed:"\u22CF",curren:"\xA4",cwint:"\u2231",cylcty:"\u232D",dHar:"\u2965",dagger:"\u2020",daleth:"\u2138",dash:"\u2010",hyphen:"\u2010",dbkarow:"\u290F",rBarr:"\u290F",dcaron:"\u010F",dcy:"\u0434",ddarr:"\u21CA",downdownarrows:"\u21CA",ddotseq:"\u2A77",eDDot:"\u2A77",deg:"\xB0",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",diamondsuit:"\u2666",diams:"\u2666",digamma:"\u03DD",gammad:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",dlcorn:"\u231E",llcorner:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",doteqdot:"\u2251",eDot:"\u2251",dotminus:"\u2238",minusd:"\u2238",dotplus:"\u2214",plusdo:"\u2214",dotsquare:"\u22A1",sdotb:"\u22A1",drcorn:"\u231F",lrcorner:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",dscy:"\u0455",dsol:"\u29F6",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",triangledown:"\u25BF",dwangle:"\u29A6",dzcy:"\u045F",dzigrarr:"\u27FF",eacute:"\xE9",easter:"\u2A6E",ecaron:"\u011B",ecir:"\u2256",eqcirc:"\u2256",ecirc:"\xEA",ecolon:"\u2255",eqcolon:"\u2255",ecy:"\u044D",edot:"\u0117",efDot:"\u2252",fallingdotseq:"\u2252",efr:"\u{1D522}",eg:"\u2A9A",egrave:"\xE8",egs:"\u2A96",eqslantgtr:"\u2A96",egsdot:"\u2A98",el:"\u2A99",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",eqslantless:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",emptyv:"\u2205",varnothing:"\u2205",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",eng:"\u014B",ensp:"\u2002",eogon:"\u0119",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",epsiv:"\u03F5",straightepsilon:"\u03F5",varepsilon:"\u03F5",equals:"=",equest:"\u225F",questeq:"\u225F",equivDD:"\u2A78",eqvparsl:"\u29E5",erDot:"\u2253",risingdotseq:"\u2253",erarr:"\u2971",escr:"\u212F",eta:"\u03B7",eth:"\xF0",euml:"\xEB",euro:"\u20AC",excl:"!",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",fork:"\u22D4",pitchfork:"\u22D4",forkv:"\u2AD9",fpartint:"\u2A0D",frac12:"\xBD",half:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",sfrown:"\u2322",fscr:"\u{1D4BB}",gEl:"\u2A8C",gtreqqless:"\u2A8C",gacute:"\u01F5",gamma:"\u03B3",gap:"\u2A86",gtrapprox:"\u2A86",gbreve:"\u011F",gcirc:"\u011D",gcy:"\u0433",gdot:"\u0121",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",gimel:"\u2137",gjcy:"\u0453",glE:"\u2A92",gla:"\u2AA5",glj:"\u2AA4",gnE:"\u2269",gneqq:"\u2269",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gneq:"\u2A88",gnsim:"\u22E7",gopf:"\u{1D558}",gscr:"\u210A",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtrdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrarr:"\u2978",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",hardcy:"\u044A",harrcir:"\u2948",harrw:"\u21AD",leftrightsquigarrow:"\u21AD",hbar:"\u210F",hslash:"\u210F",planck:"\u210F",plankv:"\u210F",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",mldr:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",hksearow:"\u2925",searhk:"\u2925",hkswarow:"\u2926",swarhk:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",larrhk:"\u21A9",hookrightarrow:"\u21AA",rarrhk:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",hstrok:"\u0127",hybull:"\u2043",iacute:"\xED",icirc:"\xEE",icy:"\u0438",iecy:"\u0435",iexcl:"\xA1",ifr:"\u{1D526}",igrave:"\xEC",iiiint:"\u2A0C",qint:"\u2A0C",iiint:"\u222D",tint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",imacr:"\u012B",imath:"\u0131",inodot:"\u0131",imof:"\u22B7",imped:"\u01B5",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",intcal:"\u22BA",intercal:"\u22BA",intlarhk:"\u2A17",intprod:"\u2A3C",iprod:"\u2A3C",iocy:"\u0451",iogon:"\u012F",iopf:"\u{1D55A}",iota:"\u03B9",iquest:"\xBF",iscr:"\u{1D4BE}",isinE:"\u22F9",isindot:"\u22F5",isins:"\u22F4",isinsv:"\u22F3",itilde:"\u0129",iukcy:"\u0456",iuml:"\xEF",jcirc:"\u0135",jcy:"\u0439",jfr:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",varkappa:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",lAtail:"\u291B",lBarr:"\u290E",lEg:"\u2A8B",lesseqqgtr:"\u2A8B",lHar:"\u2962",lacute:"\u013A",laemptyv:"\u29B4",lambda:"\u03BB",langd:"\u2991",lap:"\u2A85",lessapprox:"\u2A85",laquo:"\xAB",larrbfs:"\u291F",larrfs:"\u291D",larrlp:"\u21AB",looparrowleft:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",leftarrowtail:"\u21A2",lat:"\u2AAB",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",lcedil:"\u013C",lcy:"\u043B",ldca:"\u2936",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",leq:"\u2264",leftleftarrows:"\u21C7",llarr:"\u21C7",leftthreetimes:"\u22CB",lthree:"\u22CB",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessdot:"\u22D6",ltdot:"\u22D6",lfisht:"\u297C",lfr:"\u{1D529}",lgE:"\u2A91",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnE:"\u2268",lneqq:"\u2268",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lneq:"\u2A87",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",longmapsto:"\u27FC",xmap:"\u27FC",looparrowright:"\u21AC",rarrlp:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",loz:"\u25CA",lozenge:"\u25CA",lpar:"(",lparlt:"\u2993",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",lsime:"\u2A8D",lsimg:"\u2A8F",lsquor:"\u201A",sbquo:"\u201A",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltrPar:"\u2996",ltri:"\u25C3",triangleleft:"\u25C3",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",mDDot:"\u223A",macr:"\xAF",strns:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",mdash:"\u2014",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midcir:"\u2AF0",minus:"\u2212",minusdu:"\u2A2A",mlcp:"\u2ADB",models:"\u22A7",mopf:"\u{1D55E}",mscr:"\u{1D4C2}",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nGg:"\u22D9\u0338",nGt:"\u226B\u20D2",nLeftarrow:"\u21CD",nlArr:"\u21CD",nLeftrightarrow:"\u21CE",nhArr:"\u21CE",nLl:"\u22D8\u0338",nLt:"\u226A\u20D2",nRightarrow:"\u21CF",nrArr:"\u21CF",nVDash:"\u22AF",nVdash:"\u22AE",nacute:"\u0144",nang:"\u2220\u20D2",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",natur:"\u266E",natural:"\u266E",ncap:"\u2A43",ncaron:"\u0148",ncedil:"\u0146",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",ndash:"\u2013",neArr:"\u21D7",nearhk:"\u2924",nedot:"\u2250\u0338",nesear:"\u2928",toea:"\u2928",nfr:"\u{1D52B}",nharr:"\u21AE",nleftrightarrow:"\u21AE",nhpar:"\u2AF2",nis:"\u22FC",nisd:"\u22FA",njcy:"\u045A",nlE:"\u2266\u0338",nleqq:"\u2266\u0338",nlarr:"\u219A",nleftarrow:"\u219A",nldr:"\u2025",nopf:"\u{1D55F}",not:"\xAC",notinE:"\u22F9\u0338",notindot:"\u22F5\u0338",notinvb:"\u22F7",notinvc:"\u22F6",notnivb:"\u22FE",notnivc:"\u22FD",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",nrarr:"\u219B",nrightarrow:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nscr:"\u{1D4C3}",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsubseteqq:"\u2AC5\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupseteqq:"\u2AC6\u0338",ntilde:"\xF1",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",nwnear:"\u2927",oacute:"\xF3",ocirc:"\xF4",ocy:"\u043E",odblac:"\u0151",odiv:"\u2A38",odsold:"\u29BC",oelig:"\u0153",ofcir:"\u29BF",ofr:"\u{1D52C}",ogon:"\u02DB",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",olcir:"\u29BE",olcross:"\u29BB",olt:"\u29C0",omacr:"\u014D",omega:"\u03C9",omicron:"\u03BF",omid:"\u29B6",oopf:"\u{1D560}",opar:"\u29B7",operp:"\u29B9",or:"\u2228",vee:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",oscr:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oslash:"\xF8",osol:"\u2298",otilde:"\xF5",otimesas:"\u2A36",ouml:"\xF6",ovbar:"\u233D",para:"\xB6",parsim:"\u2AF3",parsl:"\u2AFD",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",pertenk:"\u2031",pfr:"\u{1D52D}",phi:"\u03C6",phiv:"\u03D5",straightphi:"\u03D5",varphi:"\u03D5",phone:"\u260E",pi:"\u03C0",piv:"\u03D6",varpi:"\u03D6",planckh:"\u210E",plus:"+",plusacir:"\u2A23",pluscir:"\u2A22",plusdu:"\u2A25",pluse:"\u2A72",plussim:"\u2A26",plustwo:"\u2A27",pointint:"\u2A15",popf:"\u{1D561}",pound:"\xA3",prE:"\u2AB3",prap:"\u2AB7",precapprox:"\u2AB7",precnapprox:"\u2AB9",prnap:"\u2AB9",precneqq:"\u2AB5",prnE:"\u2AB5",precnsim:"\u22E8",prnsim:"\u22E8",prime:"\u2032",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prurel:"\u22B0",pscr:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",quatint:"\u2A16",quest:"?",rAtail:"\u291C",rHar:"\u2964",race:"\u223D\u0331",racute:"\u0155",raemptyv:"\u29B3",rangd:"\u2992",range:"\u29A5",raquo:"\xBB",rarrap:"\u2975",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",rightarrowtail:"\u21A3",rarrw:"\u219D",rightsquigarrow:"\u219D",ratail:"\u291A",ratio:"\u2236",rbbrk:"\u2773",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",rcedil:"\u0157",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdsh:"\u21B3",rect:"\u25AD",rfisht:"\u297D",rfr:"\u{1D52F}",rharul:"\u296C",rho:"\u03C1",rhov:"\u03F1",varrho:"\u03F1",rightrightarrows:"\u21C9",rrarr:"\u21C9",rightthreetimes:"\u22CC",rthree:"\u22CC",ring:"\u02DA",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",ropar:"\u2986",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rsaquo:"\u203A",rscr:"\u{1D4C7}",rtimes:"\u22CA",rtri:"\u25B9",triangleright:"\u25B9",rtriltri:"\u29CE",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",scE:"\u2AB4",scap:"\u2AB8",succapprox:"\u2AB8",scaron:"\u0161",scedil:"\u015F",scirc:"\u015D",scnE:"\u2AB6",succneqq:"\u2AB6",scnap:"\u2ABA",succnapprox:"\u2ABA",scnsim:"\u22E9",succnsim:"\u22E9",scpolint:"\u2A13",scy:"\u0441",sdot:"\u22C5",sdote:"\u2A66",seArr:"\u21D8",sect:"\xA7",semi:";",seswar:"\u2929",tosa:"\u2929",sext:"\u2736",sfr:"\u{1D530}",sharp:"\u266F",shchcy:"\u0449",shcy:"\u0448",shy:"\xAD",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",varsigma:"\u03C2",simdot:"\u2A6A",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",smashp:"\u2A33",smeparsl:"\u29E4",smile:"\u2323",ssmile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",sqcaps:"\u2293\uFE00",sqcups:"\u2294\uFE00",sscr:"\u{1D4C8}",star:"\u2606",sub:"\u2282",subset:"\u2282",subE:"\u2AC5",subseteqq:"\u2AC5",subdot:"\u2ABD",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subsetneqq:"\u2ACB",subne:"\u228A",subsetneq:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supE:"\u2AC6",supseteqq:"\u2AC6",supdot:"\u2ABE",supdsub:"\u2AD8",supedot:"\u2AC4",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supsetneqq:"\u2ACC",supne:"\u228B",supsetneq:"\u228B",supplus:"\u2AC0",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swArr:"\u21D9",swnwar:"\u292A",szlig:"\xDF",target:"\u2316",tau:"\u03C4",tcaron:"\u0165",tcedil:"\u0163",tcy:"\u0442",telrec:"\u2315",tfr:"\u{1D531}",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",vartheta:"\u03D1",thorn:"\xFE",times:"\xD7",timesbar:"\u2A31",timesd:"\u2A30",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",topfork:"\u2ADA",tprime:"\u2034",triangle:"\u25B5",utri:"\u25B5",triangleq:"\u225C",trie:"\u225C",tridot:"\u25EC",triminus:"\u2A3A",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",tscy:"\u0446",tshcy:"\u045B",tstrok:"\u0167",uHar:"\u2963",uacute:"\xFA",ubrcy:"\u045E",ubreve:"\u016D",ucirc:"\xFB",ucy:"\u0443",udblac:"\u0171",ufisht:"\u297E",ufr:"\u{1D532}",ugrave:"\xF9",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",uogon:"\u0173",uopf:"\u{1D566}",upsi:"\u03C5",upsilon:"\u03C5",upuparrows:"\u21C8",uuarr:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",urtri:"\u25F9",uscr:"\u{1D4CA}",utdot:"\u22F0",utilde:"\u0169",uuml:"\xFC",uwangle:"\u29A7",vBar:"\u2AE8",vBarv:"\u2AE9",vangrt:"\u299C",varsubsetneq:"\u228A\uFE00",vsubne:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",vsubnE:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",vsupne:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vsupnE:"\u2ACC\uFE00",vcy:"\u0432",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",vfr:"\u{1D533}",vopf:"\u{1D567}",vscr:"\u{1D4CB}",vzigzag:"\u299A",wcirc:"\u0175",wedbar:"\u2A5F",wedgeq:"\u2259",weierp:"\u2118",wp:"\u2118",wfr:"\u{1D534}",wopf:"\u{1D568}",wscr:"\u{1D4CC}",xfr:"\u{1D535}",xi:"\u03BE",xnis:"\u22FB",xopf:"\u{1D569}",xscr:"\u{1D4CD}",yacute:"\xFD",yacy:"\u044F",ycirc:"\u0177",ycy:"\u044B",yen:"\xA5",yfr:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"},qa="\uE500";Ge.ngsp=qa;var Ha=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function ws(t,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${t}' to be an array, [start, end].`);if(e!=null){let r=e[0],n=e[1];Ha.forEach(s=>{if(s.test(r)||s.test(n))throw new Error(`['${r}', '${n}'] contains unusable interpolation symbol.`)})}}var Tr=class t{static fromArray(e){return e?(ws("interpolation",e),new t(e[0],e[1])):xr}constructor(e,r){this.start=e,this.end=r}},xr=new Tr("{{","}}");var pt=class extends Ve{constructor(e,r,n){super(n,e),this.tokenType=r}},Pr=class{constructor(e,r,n){this.tokens=e,this.errors=r,this.nonNormalizedIcuExpressions=n}};function Ms(t,e,r,n={}){let s=new Nr(new we(t,e),r,n);return s.tokenize(),new Pr(fo(s.tokens),s.errors,s.nonNormalizedIcuExpressions)}var ao=/\r\n?/g;function Ye(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function Ls(t){return`Unknown entity "${t}" - use the "&#;" or "&#x;" syntax`}function oo(t,e){return`Unable to parse entity "${e}" - ${t} character reference entities must end with ";"`}var jt;(function(t){t.HEX="hexadecimal",t.DEC="decimal"})(jt||(jt={}));var ht=class{constructor(e){this.error=e}},Nr=class{constructor(e,r,n){this._getTagContentType=r,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this.nonNormalizedIcuExpressions=[],this._tokenizeIcu=n.tokenizeExpansionForms||!1,this._interpolationConfig=n.interpolationConfig||xr,this._leadingTriviaCodePoints=n.leadingTriviaChars&&n.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=n.canSelfClose||!1,this._allowHtmComponentClosingTags=n.allowHtmComponentClosingTags||!1;let s=n.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=n.escapedString?new Ir(e,s):new Kt(e,s),this._preserveLineEndings=n.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=n.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=n.tokenizeBlocks??!0;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(e){return this._preserveLineEndings?e:e.replace(ao,` +`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(30),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>Lt(n)?!e:Ns(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(k),this._attemptCharCode(41))this._attemptCharCodeUntilFn(k);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Is);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&Er(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(Is)}}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(po(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new pt("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new pt("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(n),this._currentTokenStart=null,this._currentTokenType=null,n}_createError(e,r){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let n=new pt(e,this._currentTokenType,r);return this._currentTokenStart=null,this._currentTokenType=null,new ht(n)}handleError(e){if(e instanceof ft&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof ht)this.errors.push(e.error);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return ho(this._cursor.peek(),e)?(this._cursor.advance(),!0):!1}_requireCharCode(e){let r=this._cursor.clone();if(!this._attemptCharCode(e))throw this._createError(Ye(this._cursor.peek()),this._cursor.getSpan(r))}_attemptStr(e){let r=e.length;if(this._cursor.charsLeft()this._attemptStr("-->")),this._beginToken(11),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(e){this._beginToken(10,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(11),this._cursor.advance(),this._endToken([])}_consumeCdata(e){this._beginToken(12,e),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(13),this._requireStr("]]>"),this._endToken([])}_consumeDocType(e){this._beginToken(18,e),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(19),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(){let e=this._cursor.clone(),r="";for(;this._cursor.peek()!==58&&!uo(this._cursor.peek());)this._cursor.advance();let n;this._cursor.peek()===58?(r=this._cursor.getChars(e),this._cursor.advance(),n=this._cursor.clone()):n=e,this._requireCharCodeUntilFn(Fs,r===""?0:1);let s=this._cursor.getChars(n);return[r,s]}_consumeTagOpen(e){let r,n,s,i=[];try{if(!Ft(this._cursor.peek()))throw this._createError(Ye(this._cursor.peek()),this._cursor.getSpan(e));for(s=this._consumeTagOpenStart(e),n=s.parts[0],r=s.parts[1],this._attemptCharCodeUntilFn(k);this._cursor.peek()!==47&&this._cursor.peek()!==62&&this._cursor.peek()!==60&&this._cursor.peek()!==0;){let[o,u]=this._consumeAttributeName();if(this._attemptCharCodeUntilFn(k),this._attemptCharCode(61)){this._attemptCharCodeUntilFn(k);let p=this._consumeAttributeValue();i.push({prefix:o,name:u,value:p})}else i.push({prefix:o,name:u});this._attemptCharCodeUntilFn(k)}this._consumeTagOpenEnd()}catch(o){if(o instanceof ht){s?s.type=4:(this._beginToken(5,e),this._endToken(["<"]));return}throw o}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===2)return;let a=this._getTagContentType(r,n,this._fullNameStack.length>0,i);this._handleFullNameStackForTagOpen(n,r),a===N.RAW_TEXT?this._consumeRawTextWithTagClose(n,r,!1):a===N.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(n,r,!0)}_consumeRawTextWithTagClose(e,r,n){this._consumeRawText(n,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(k),!this._attemptStrCaseInsensitive(e?`${e}:${r}`:r))?!1:(this._attemptCharCodeUntilFn(k),this._attemptCharCode(62))),this._beginToken(3),this._requireCharCodeUntilFn(s=>s===62,3),this._cursor.advance(),this._endToken([e,r]),this._handleFullNameStackForTagClose(e,r)}_consumeTagOpenStart(e){this._beginToken(0,e);let r=this._consumePrefixAndName();return this._endToken(r)}_consumeAttributeName(){let e=this._cursor.peek();if(e===39||e===34)throw this._createError(Ye(e),this._cursor.getSpan());this._beginToken(14);let r=this._consumePrefixAndName();return this._endToken(r),r}_consumeAttributeValue(){let e;if(this._cursor.peek()===39||this._cursor.peek()===34){let r=this._cursor.peek();this._consumeQuote(r);let n=()=>this._cursor.peek()===r;e=this._consumeWithInterpolation(16,17,n,n),this._consumeQuote(r)}else{let r=()=>Fs(this._cursor.peek());e=this._consumeWithInterpolation(16,17,r,r)}return e}_consumeQuote(e){this._beginToken(15),this._requireCharCode(e),this._endToken([String.fromCodePoint(e)])}_consumeTagOpenEnd(){let e=this._attemptCharCode(47)?2:1;this._beginToken(e),this._requireCharCode(62),this._endToken([])}_consumeTagClose(e){if(this._beginToken(3,e),this._attemptCharCodeUntilFn(k),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(k),this._requireCharCode(62),this._endToken([]);else{let[r,n]=this._consumePrefixAndName();this._attemptCharCodeUntilFn(k),this._requireCharCode(62),this._endToken([r,n]),this._handleFullNameStackForTagClose(r,n)}}_consumeExpansionFormStart(){this._beginToken(20),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(20),this._beginToken(7);let e=this._readUntil(44),r=this._processCarriageReturns(e);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([r]);else{let s=this._endToken([e]);r!==e&&this.nonNormalizedIcuExpressions.push(s)}this._requireCharCode(44),this._attemptCharCodeUntilFn(k),this._beginToken(7);let n=this._readUntil(44);this._endToken([n]),this._requireCharCode(44),this._attemptCharCodeUntilFn(k)}_consumeExpansionCaseStart(){this._beginToken(21);let e=this._readUntil(123).trim();this._endToken([e]),this._attemptCharCodeUntilFn(k),this._beginToken(22),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(k),this._expansionCaseStack.push(22)}_consumeExpansionCaseEnd(){this._beginToken(23),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(k),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(24),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(e,r,n,s){this._beginToken(e);let i=[];for(;!n();){let o=this._cursor.clone();this._interpolationConfig&&this._attemptStr(this._interpolationConfig.start)?(this._endToken([this._processCarriageReturns(i.join(""))],o),i.length=0,this._consumeInterpolation(r,o,s),this._beginToken(e)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(e),this._beginToken(e)):i.push(this._readChar())}this._inInterpolation=!1;let a=this._processCarriageReturns(i.join(""));return this._endToken([a]),a}_consumeInterpolation(e,r,n){let s=[];this._beginToken(e,r),s.push(this._interpolationConfig.start);let i=this._cursor.clone(),a=null,o=!1;for(;this._cursor.peek()!==0&&(n===null||!n());){let u=this._cursor.clone();if(this._isTagStart()){this._cursor=u,s.push(this._getProcessedChars(i,u)),this._endToken(s);return}if(a===null)if(this._attemptStr(this._interpolationConfig.end)){s.push(this._getProcessedChars(i,u)),s.push(this._interpolationConfig.end),this._endToken(s);return}else this._attemptStr("//")&&(o=!0);let p=this._cursor.peek();this._cursor.advance(),p===92?this._cursor.advance():p===a?a=null:!o&&a===null&&Er(p)&&(a=p)}s.push(this._getProcessedChars(i,this._cursor)),this._endToken(s)}_getProcessedChars(e,r){return this._processCarriageReturns(r.getChars(e))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let e=this._cursor.clone();e.advance();let r=e.peek();if(97<=r&&r<=122||65<=r&&r<=90||r===47||r===33)return!0}return!1}_isBlockStart(){if(this._tokenizeBlocks&&this._cursor.peek()===64){let e=this._cursor.clone();if(e.advance(),Ns(e.peek()))return!0}return!1}_readUntil(e){let r=this._cursor.clone();return this._attemptUntilChar(e),this._cursor.getChars(r)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===22}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===20}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;if(this._interpolationConfig){let e=this._cursor.clone(),r=this._attemptStr(this._interpolationConfig.start);return this._cursor=e,!r}return!0}_handleFullNameStackForTagOpen(e,r){let n=We(e,r);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===n)&&this._fullNameStack.push(n)}_handleFullNameStackForTagClose(e,r){let n=We(e,r);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===n&&this._fullNameStack.pop()}};function k(t){return!Lt(t)||t===0}function Fs(t){return Lt(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function uo(t){return(t<97||12257)}function lo(t){return t===59||t===0||!hs(t)}function co(t){return t===59||t===0||!Ft(t)}function po(t){return t!==125}function ho(t,e){return Ps(t)===Ps(e)}function Ps(t){return t>=97&&t<=122?t-97+65:t}function Ns(t){return Ft(t)||Cr(t)||t===95}function Is(t){return t!==59&&k(t)}function fo(t){let e=[],r;for(let n=0;n0&&r.indexOf(e.peek())!==-1;)n===e&&(e=e.clone()),e.advance();let s=this.locationFromCursor(e),i=this.locationFromCursor(this),a=n!==e?this.locationFromCursor(n):s;return new f(s,i,a)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new ft('Unexpected character "EOF"',this);let r=this.charAt(e.offset);r===10?(e.line++,e.column=0):Sr(r)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new ae(e.file,e.state.offset,e.state.line,e.state.column)}},Ir=class t extends Kt{constructor(e,r){e instanceof t?(super(e),this.internalState={...e.internalState}):(super(e,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new t(this)}getChars(e){let r=e.clone(),n="";for(;r.internalState.offsetthis.internalState.peek;if(e()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),e()===110)this.state.peek=10;else if(e()===114)this.state.peek=13;else if(e()===118)this.state.peek=11;else if(e()===116)this.state.peek=9;else if(e()===98)this.state.peek=8;else if(e()===102)this.state.peek=12;else if(e()===117)if(this.advanceState(this.internalState),e()===123){this.advanceState(this.internalState);let r=this.clone(),n=0;for(;e()!==125;)this.advanceState(this.internalState),n++;this.state.peek=this.decodeHexDigits(r,n)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(e()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(_r(e())){let r="",n=0,s=this.clone();for(;_r(e())&&n<3;)s=this.clone(),r+=String.fromCodePoint(e()),this.advanceState(this.internalState),n++;this.state.peek=parseInt(r,8),this.internalState=s.internalState}else Sr(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,r){let n=this.input.slice(e.internalState.offset,e.internalState.offset+r),s=parseInt(n,16);if(isNaN(s))throw e.state=e.internalState,new ft("Invalid hexadecimal escape sequence",e);return s}},ft=class{constructor(e,r){this.msg=e,this.cursor=r}};var $=class t extends Ve{static create(e,r,n){return new t(e,r,n)}constructor(e,r,n){super(r,n),this.elementName=e}},Or=class{constructor(e,r){this.rootNodes=e,this.errors=r}},Qt=class{constructor(e){this.getTagDefinition=e}parse(e,r,n,s=!1,i){let a=D=>(I,...B)=>D(I.toLowerCase(),...B),o=s?this.getTagDefinition:a(this.getTagDefinition),u=D=>o(D).getContentType(),p=s?i:a(i),m=Ms(e,r,i?(D,I,B,c)=>{let d=p(D,I,B,c);return d!==void 0?d:u(D)}:u,n),g=n&&n.canSelfClose||!1,C=n&&n.allowHtmComponentClosingTags||!1,_=new Mr(m.tokens,o,g,C,s);return _.build(),new Or(_.rootNodes,m.errors.concat(_.errors))}},Mr=class t{constructor(e,r,n,s,i){this.tokens=e,this.getTagDefinition=r,this.canSelfClose=n,this.allowHtmComponentClosingTags=s,this.isTagNameCaseSensitive=i,this._index=-1,this._containerStack=[],this.rootNodes=[],this.errors=[],this._advance()}build(){for(;this._peek.type!==30;)this._peek.type===0||this._peek.type===4?this._consumeStartTag(this._advance()):this._peek.type===3?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===12?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===10?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===5||this._peek.type===7||this._peek.type===6?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===20?this._consumeExpansion(this._advance()):this._peek.type===25?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===27?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===29?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===18?this._consumeDocType(this._advance()):this._advance();for(let e of this._containerStack)e instanceof Z&&this.errors.push($.create(e.name,e.sourceSpan,`Unclosed block "${e.name}"`))}_advance(){let e=this._peek;return this._index0)return this.errors=this.errors.concat(i.errors),null;let a=new f(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart),o=new f(r.sourceSpan.start,s.sourceSpan.end,r.sourceSpan.fullStart);return new Ht(e.parts[0],i.rootNodes,a,e.sourceSpan,o)}_collectExpansionExpTokens(e){let r=[],n=[22];for(;;){if((this._peek.type===20||this._peek.type===22)&&n.push(this._peek.type),this._peek.type===23)if(qs(n,22)){if(n.pop(),n.length===0)return r}else return this.errors.push($.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===24)if(qs(n,20))n.pop();else return this.errors.push($.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===30)return this.errors.push($.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(e){let r=e.parts[0];if(r.length>0&&r[0]==` `){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(e){let r=[e],n=e.sourceSpan,s=e.parts[0];if(s.length>0&&s[0]===` -`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,Is):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Ot(s,new f(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof z&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||Me(i)!==null||C.isVoid||this.errors.push(I.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new f(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new f(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new f(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),m=new z(i,s,[],u,p,void 0,l),d=this._getContainer();this._pushContainer(m,d instanceof z&&this.getTagDefinition(d.name).isClosedByChild(m.name)),a?this._popContainer(i,z,u):e.type===4&&(this._popContainer(i,z,null),this.errors.push(I.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(I.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,z,e.sourceSpan)){let n=`Unexpected closing tag "${r}". 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(I.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(Me(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof J||a instanceof z&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=qe(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let m=this._advance();a.push(m),m.type===17?i+=m.parts.join("").replace(/&([^;]+);/g,Is):m.type===9?i+=m.parts[0]:i+=m.parts.join(""),u=n=m.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new f((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new Vt(r,i,new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ot(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new J(e.parts[0],r,[],s,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,J,e.sourceSpan)||this.errors.push(I.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ot(o.parts[0],o.sourceSpan))}let n=this._peek.sourceSpan.fullStart,s=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new J(e.parts[0],r,[],s,i);this._pushContainer(a,!1),this._popContainer(null,J,null),this.errors.push(I.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let e=this._containerStack.length-1;e>-1;e--)if(this._containerStack[e]instanceof z)return this._containerStack[e];return null}_addToParent(e){let r=this._getContainer();r===null?this.rootNodes.push(e):r.children.push(e)}_getElementFullName(e,r,n){if(e===""&&(e=this.getTagDefinition(r).implicitNamespacePrefix||"",e===""&&n!=null)){let s=it(n.name)[1];this.getTagDefinition(s).preventNamespaceInheritance||(e=Me(n.name))}return qe(e,r)}};function Ns(t,e){return t.length>0&&t[t.length-1]===e}function Is(t,e){return Ve[e]!==void 0?Ve[e]||t:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):t}var Xt=class extends Qt{constructor(){super(He)}parse(e,r,n,s=!1,i){return super.parse(e,r,n,s,i)}};var Mr=null,co=()=>(Mr||(Mr=new Xt),Mr);function qr(t,e={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:s=!1,getTagContentType:i,tokenizeAngularBlocks:a=!1}=e;return co().parse(t,"angular-html-parser",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:a},s,i)}var po=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function ho(t){let e=t.match(po);if(!e)return{content:t};let{startDelimiter:r,language:n,value:s="",endDelimiter:i}=e.groups,a=n.trim()||"yaml";if(r==="+++"&&(a="toml"),a!=="yaml"&&r!==i)return{content:t};let[o]=e;return{frontMatter:{type:"front-matter",lang:a,value:s,startDelimiter:r,endDelimiter:i,raw:o.replace(/\n$/,"")},content:v(!1,o,/[^\n]/g," ")+t.slice(o.length)}}var Rs=ho;function fo(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var $s=fo;var Os=new Set(["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","search","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"]);var Jt=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]);var Zt={attrs:!0,children:!0},Ms=new Set(["parent"]),er=class t{constructor(e={}){for(let r of new Set([...Ms,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in Zt&&(r=r.map(n=>this.createChild(n))),!Ms.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in Zt){let s=this[n];if(s){let i=mo(s,a=>a.map(e));r!==s&&(r||(r=new t({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in Zt||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in Zt){let n=this[r];if(n)for(let s=0;s[e.fullName,e.value]))}};function mo(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var go=[{regex:/^(\[if([^\]]*)]>)(.*?){try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new f(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:v(!1,s.trim(),/\s+/g," "),sourceSpan:t.sourceSpan,startSourceSpan:new f(t.sourceSpan.start,o),endSourceSpan:new f(u,t.sourceSpan.end)}}function So(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:v(!1,n.trim(),/\s+/g," "),sourceSpan:t.sourceSpan}}function _o(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}function Eo(t){if(t.type==="block"){if(t.name=v(!1,t.name.toLowerCase(),/\s+/g," ").trim(),t.type="angularControlFlowBlock",!xt(t.parameters)){delete t.parameters;return}for(let e of t.parameters)e.type="angularControlFlowBlockParameter";t.parameters={type:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new f(t.parameters[0].sourceSpan.start,me(!1,t.parameters,-1).sourceSpan.end)}}}function Vs(t,e,r){let{name:n,canSelfClose:s=!0,normalizeTagName:i=!1,normalizeAttributeName:a=!1,allowHtmComponentClosingTags:o=!1,isTagNameCaseSensitive:u=!1,shouldParseAsRawText:p}=e,{rootNodes:l,errors:m}=qr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u,getTagContentType:p?(...c)=>p(...c)?F.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0});if(n==="vue"){if(l.some(w=>w.type==="docType"&&w.value==="html"||w.type==="element"&&w.name.toLowerCase()==="html"))return Vs(t,Ws,r);let g,y=()=>g??(g=qr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u})),$=w=>y().rootNodes.find(({startSourceSpan:q})=>q&&q.start.offset===w.startSourceSpan.start.offset)??w;for(let[w,q]of l.entries()){let{endSourceSpan:Wr,startSourceSpan:js}=q;if(Wr===null)m=y().errors,l[w]=$(q);else if(Ao(q,r)){let zr=y().errors.find(Gr=>Gr.span.start.offset>js.start.offset&&Gr.span.start.offset0&&Hs(m[0]);let d=c=>{let g=c.name.startsWith(":")?c.name.slice(1).split(":")[0]:null,y=c.nameSpan.toString(),$=g!==null&&y.startsWith(`${g}:`),w=$?y.slice(g.length+1):y;c.name=w,c.namespace=g,c.hasExplicitNamespace=$},C=c=>{switch(c.type){case"element":d(c);for(let g of c.attrs)d(g),g.valueSpan?(g.value=g.valueSpan.toString(),/["']/.test(g.value[0])&&(g.value=g.value.slice(1,-1))):g.value=null;break;case"comment":c.value=c.sourceSpan.toString().slice(4,-3);break;case"text":c.value=c.sourceSpan.toString();break}},_=(c,g)=>{let y=c.toLowerCase();return g(y)?y:c},D=c=>{if(c.type==="element"&&(i&&(!c.namespace||c.namespace===c.tagDefinition.implicitNamespacePrefix||de(c))&&(c.name=_(c.name,g=>Os.has(g))),a))for(let g of c.attrs)g.namespace||(g.name=_(g.name,y=>Jt.has(c.name)&&(Jt.get("*").has(y)||Jt.get(c.name).has(y))))},P=c=>{c.sourceSpan&&c.endSourceSpan&&(c.sourceSpan=new f(c.sourceSpan.start,c.endSourceSpan.end))},B=c=>{if(c.type==="element"){let g=He(u?c.name:c.name.toLowerCase());!c.namespace||c.namespace===g.implicitNamespacePrefix||de(c)?c.tagDefinition=g:c.tagDefinition=He("")}};return zt(new class extends ut{visit(c){C(c),B(c),D(c),P(c)}},l),l}function Ao(t,e){var n;if(t.type!=="element"||t.name!=="template")return!1;let r=(n=t.attrs.find(s=>s.name==="lang"))==null?void 0:n.value;return!r||Ne(e,{language:r})==="html"}function Hs(t){let{msg:e,span:{start:r,end:n}}=t;throw $s(e,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:t})}function Us(t,e,r={},n=!0){let{frontMatter:s,content:i}=n?Rs(t):{frontMatter:null,content:t},a=new Se(t,r.filepath),o=new ne(a,0,0,0),u=o.moveBy(t.length),p={type:"root",sourceSpan:new f(o,u),children:Vs(i,e,r)};if(s){let d=new ne(a,0,0,0),C=d.moveBy(s.raw.length);s.sourceSpan=new f(d,C),p.children.unshift(s)}let l=new er(p),m=(d,C)=>{let{offset:_}=C,D=v(!1,t.slice(0,_),/[^\n\r]/g," "),B=Us(D+d,e,r,!1);B.sourceSpan=new f(C,me(!1,B.children,-1).sourceSpan.end);let c=B.children[0];return c.length===_?B.children.shift():(c.sourceSpan=new f(c.sourceSpan.start.moveBy(_),c.sourceSpan.end),c.value=c.value.slice(_)),B};return l.walk(d=>{if(d.type==="comment"){let C=qs(d,m);C&&d.parent.replaceChild(d,C)}Eo(d)}),l}function tr(t){return{parse:(e,r)=>Us(e,t,r),hasPragma:Rn,astFormat:"html",locStart:se,locEnd:ie}}var Ws={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},Do=tr(Ws),vo=tr({name:"angular"}),yo=tr({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,e,r,n){return t.toLowerCase()!=="html"&&!r&&(t!=="template"||n.some(({name:s,value:i})=>s==="lang"&&i!=="html"&&i!==""&&i!==void 0))}}),wo=tr({name:"lwc",canSelfClose:!1});var zs=[{linguistLanguageId:146,name:"Angular",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".component.html"],parsers:["angular"],vscodeLanguageIds:["html"],filenames:[]},{linguistLanguageId:146,name:"HTML",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml",".mjml"],parsers:["html"],vscodeLanguageIds:["html"]},{linguistLanguageId:146,name:"Lightning Web Components",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[],parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[]},{linguistLanguageId:391,name:"Vue",type:"markup",color:"#41b883",extensions:[".vue"],tmScope:"text.html.vue",aceMode:"html",parsers:["vue"],vscodeLanguageIds:["vue"]}];var Vr={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Gs="HTML",bo={bracketSameLine:Vr.bracketSameLine,htmlWhitespaceSensitivity:{category:Gs,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."}]},singleAttributePerLine:Vr.singleAttributePerLine,vueIndentScriptAndStyle:{category:Gs,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},Ys=bo;var To={html:fs};var dh=Ur;export{dh as default,zs as languages,Ys as options,Hr as parsers,To as printers}; +`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,Hs):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Ot(s,new f(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof G&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||Ue(i)!==null||C.isVoid||this.errors.push($.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new f(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new f(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new f(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),m=new G(i,s,[],u,p,void 0,l),g=this._getContainer();this._pushContainer(m,g instanceof G&&this.getTagDefinition(g.name).isClosedByChild(m.name)),a?this._popContainer(i,G,u):e.type===4&&(this._popContainer(i,G,null),this.errors.push($.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push($.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,G,e.sourceSpan)){let n=`Unexpected closing tag "${r}". 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($.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(Ue(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof Z||a instanceof G&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=We(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let m=this._advance();a.push(m),m.type===17?i+=m.parts.join("").replace(/&([^;]+);/g,Hs):m.type===9?i+=m.parts[0]:i+=m.parts.join(""),u=n=m.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new f((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new Vt(r,i,new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ut(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new Z(e.parts[0],r,[],s,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,Z,e.sourceSpan)||this.errors.push($.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ut(o.parts[0],o.sourceSpan))}let n=this._peek.sourceSpan.fullStart,s=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new f(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new Z(e.parts[0],r,[],s,i);this._pushContainer(a,!1),this._popContainer(null,Z,null),this.errors.push($.create(e.parts[0],s,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestParentElement(){for(let e=this._containerStack.length-1;e>-1;e--)if(this._containerStack[e]instanceof G)return this._containerStack[e];return null}_addToParent(e){let r=this._getContainer();r===null?this.rootNodes.push(e):r.children.push(e)}_getElementFullName(e,r,n){if(e===""&&(e=this.getTagDefinition(r).implicitNamespacePrefix||"",e===""&&n!=null)){let s=at(n.name)[1];this.getTagDefinition(s).preventNamespaceInheritance||(e=Ue(n.name))}return We(e,r)}};function qs(t,e){return t.length>0&&t[t.length-1]===e}function Hs(t,e){return Ge[e]!==void 0?Ge[e]||t:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):t}var Xt=class extends Qt{constructor(){super(ze)}parse(e,r,n,s=!1,i){return super.parse(e,r,n,s,i)}};var qr=null,mo=()=>(qr||(qr=new Xt),qr);function Hr(t,e={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:s=!1,getTagContentType:i,tokenizeAngularBlocks:a=!1}=e;return mo().parse(t,"angular-html-parser",{tokenizeExpansionForms:a,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:a},s,i)}function go(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var Vs=go;var Co=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function So(t){let e=t.match(Co);if(!e)return{content:t};let{startDelimiter:r,language:n,value:s="",endDelimiter:i}=e.groups,a=n.trim()||"yaml";if(r==="+++"&&(a="toml"),a!=="yaml"&&r!==i)return{content:t};let[o]=e;return{frontMatter:{type:"front-matter",lang:a,value:s,startDelimiter:r,endDelimiter:i,raw:o.replace(/\n$/,"")},content:w(!1,o,/[^\n]/g," ")+t.slice(o.length)}}var Us=So;var Jt={attrs:!0,children:!0,cases:!0,expression:!0},Ws=new Set(["parent"]),Zt=class t{constructor(e={}){for(let r of new Set([...Ws,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in Jt&&(r=r.map(n=>this.createChild(n))),!Ws.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in Jt){let s=this[n];if(s){let i=_o(s,a=>a.map(e));r!==s&&(r||(r=new t({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in Jt||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in Jt){let n=this[r];if(n)for(let s=0;s[e.fullName,e.value]))}};function _o(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var Eo=[{regex:/^(\[if([^\]]*)]>)(.*?){try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new f(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:w(!1,s.trim(),/\s+/g," "),sourceSpan:t.sourceSpan,startSourceSpan:new f(t.sourceSpan.start,o),endSourceSpan:new f(u,t.sourceSpan.end)}}function Do(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:w(!1,n.trim(),/\s+/g," "),sourceSpan:t.sourceSpan}}function vo(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var er=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alt","autocomplete","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootdelegatesfocus","shadowrootmode"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]);var Gs=new Set(["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","search","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"]);function yo(t){if(t.type==="block"){if(t.name=w(!1,t.name.toLowerCase(),/\s+/g," ").trim(),t.type="angularControlFlowBlock",!Me(t.parameters)){delete t.parameters;return}for(let e of t.parameters)e.type="angularControlFlowBlockParameter";t.parameters={type:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new f(t.parameters[0].sourceSpan.start,X(!1,t.parameters,-1).sourceSpan.end)}}}function wo(t){(t.type==="plural"||t.type==="select")&&(t.clause=t.type,t.type="angularIcuExpression"),t.type==="expansionCase"&&(t.type="angularIcuCase")}function js(t,e,r){let{name:n,canSelfClose:s=!0,normalizeTagName:i=!1,normalizeAttributeName:a=!1,allowHtmComponentClosingTags:o=!1,isTagNameCaseSensitive:u=!1,shouldParseAsRawText:p}=e,{rootNodes:l,errors:m}=Hr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u,getTagContentType:p?(...c)=>p(...c)?N.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:n==="angular"?!0:void 0});if(n==="vue"){if(l.some(b=>b.type==="docType"&&b.value==="html"||b.type==="element"&&b.name.toLowerCase()==="html"))return js(t,Qs,r);let d,y=()=>d??(d=Hr(t,{canSelfClose:s,allowHtmComponentClosingTags:o,isTagNameCaseSensitive:u})),O=b=>y().rootNodes.find(({startSourceSpan:V})=>V&&V.start.offset===b.startSourceSpan.start.offset)??b;for(let[b,V]of l.entries()){let{endSourceSpan:Wr,startSourceSpan:Xs}=V;if(Wr===null)m=y().errors,l[b]=O(V);else if(bo(V,r)){let zr=y().errors.find(Gr=>Gr.span.start.offset>Xs.start.offset&&Gr.span.start.offset0&&Ys(m[0]);let g=c=>{let d=c.name.startsWith(":")?c.name.slice(1).split(":")[0]:null,y=c.nameSpan.toString(),O=d!==null&&y.startsWith(`${d}:`),b=O?y.slice(d.length+1):y;c.name=b,c.namespace=d,c.hasExplicitNamespace=O},C=c=>{switch(c.type){case"element":g(c);for(let d of c.attrs)g(d),d.valueSpan?(d.value=d.valueSpan.toString(),/["']/.test(d.value[0])&&(d.value=d.value.slice(1,-1))):d.value=null;break;case"comment":c.value=c.sourceSpan.toString().slice(4,-3);break;case"text":c.value=c.sourceSpan.toString();break}},_=(c,d)=>{let y=c.toLowerCase();return d(y)?y:c},D=c=>{if(c.type==="element"&&(i&&(!c.namespace||c.namespace===c.tagDefinition.implicitNamespacePrefix||de(c))&&(c.name=_(c.name,d=>Gs.has(d))),a))for(let d of c.attrs)d.namespace||(d.name=_(d.name,y=>er.has(c.name)&&(er.get("*").has(y)||er.get(c.name).has(y))))},I=c=>{c.sourceSpan&&c.endSourceSpan&&(c.sourceSpan=new f(c.sourceSpan.start,c.endSourceSpan.end))},B=c=>{if(c.type==="element"){let d=ze(u?c.name:c.name.toLowerCase());!c.namespace||c.namespace===d.implicitNamespacePrefix||de(c)?c.tagDefinition=d:c.tagDefinition=ze("")}};return zt(new class extends lt{visitExpansionCase(c,d){n==="angular"&&this.visitChildren(d,y=>{y(c.expression)})}visit(c){C(c),B(c),D(c),I(c)}},l),l}function bo(t,e){var n;if(t.type!=="element"||t.name!=="template")return!1;let r=(n=t.attrs.find(s=>s.name==="lang"))==null?void 0:n.value;return!r||$e(e,{language:r})==="html"}function Ys(t){let{msg:e,span:{start:r,end:n}}=t;throw Vs(e,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:t})}function Ks(t,e,r={},n=!0){let{frontMatter:s,content:i}=n?Us(t):{frontMatter:null,content:t},a=new we(t,r.filepath),o=new ae(a,0,0,0),u=o.moveBy(t.length),p={type:"root",sourceSpan:new f(o,u),children:js(i,e,r)};if(s){let g=new ae(a,0,0,0),C=g.moveBy(s.raw.length);s.sourceSpan=new f(g,C),p.children.unshift(s)}let l=new Zt(p),m=(g,C)=>{let{offset:_}=C,D=w(!1,t.slice(0,_),/[^\n\r]/g," "),B=Ks(D+g,e,r,!1);B.sourceSpan=new f(C,X(!1,B.children,-1).sourceSpan.end);let c=B.children[0];return c.length===_?B.children.shift():(c.sourceSpan=new f(c.sourceSpan.start.moveBy(_),c.sourceSpan.end),c.value=c.value.slice(_)),B};return l.walk(g=>{if(g.type==="comment"){let C=zs(g,m);C&&g.parent.replaceChild(g,C)}yo(g),wo(g)}),l}function tr(t){return{parse:(e,r)=>Ks(e,t,r),hasPragma:rs,astFormat:"html",locStart:se,locEnd:ie}}var Qs={name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0},To=tr(Qs),xo=tr({name:"angular"}),ko=tr({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,e,r,n){return t.toLowerCase()!=="html"&&!r&&(t!=="template"||n.some(({name:s,value:i})=>s==="lang"&&i!=="html"&&i!==""&&i!==void 0))}}),Bo=tr({name:"lwc",canSelfClose:!1});var Lo={html:ds};var xh=Ur;export{xh as default,Cs as languages,_s as options,Vr as parsers,Lo as printers}; diff --git a/node_modules/prettier/plugins/markdown.js b/node_modules/prettier/plugins/markdown.js index 6d1f7c1..cec1673 100644 --- a/node_modules/prettier/plugins/markdown.js +++ b/node_modules/prettier/plugins/markdown.js @@ -1,59 +1,59 @@ -(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.markdown=e()}})(function(){"use strict";var tl=Object.create;var xr=Object.defineProperty;var nl=Object.getOwnPropertyDescriptor;var ul=Object.getOwnPropertyNames;var il=Object.getPrototypeOf,al=Object.prototype.hasOwnProperty;var C=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),On=(e,r)=>{for(var t in r)xr(e,t,{get:r[t],enumerable:!0})},Pn=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of ul(r))!al.call(e,a)&&a!==t&&xr(e,a,{get:()=>r[a],enumerable:!(n=nl(r,a))||n.enumerable});return e};var Ie=(e,r,t)=>(t=e!=null?tl(il(e)):{},Pn(r||!e||!e.__esModule?xr(t,"default",{value:e,enumerable:!0}):t,e)),ol=e=>Pn(xr({},"__esModule",{value:!0}),e);var kr=C((Om,In)=>{"use strict";In.exports=ll;function ll(e){return String(e).replace(/\s+/g," ")}});var Le=C((Mg,Lu)=>{Lu.exports=Df;var ff=Object.prototype.hasOwnProperty;function Df(){for(var e={},r=0;r{typeof Object.create=="function"?At.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:At.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var Nu=C((Vg,Iu)=>{"use strict";var pf=Le(),Pu=Ou();Iu.exports=df;function df(e){var r,t,n;Pu(u,e),Pu(a,u),r=u.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():pf(n));return u;function a(i){return e.apply(this,i)}function u(){return this instanceof u?e.apply(this,arguments):new a(arguments)}}});var zu=C(($g,Ru)=>{"use strict";Ru.exports=hf;function hf(e,r,t){return n;function n(){var a=t||this,u=a[e];return a[e]=!r,i;function i(){a[e]=u}}}});var Mu=C((jg,Uu)=>{"use strict";Uu.exports=mf;function mf(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:a,toPosition:a,toOffset:u};function a(i){var o=-1;if(i>-1&&ii)return{line:o+1,column:i-(t[o-1]||0)+1,offset:i}}return{}}function u(i){var o=i&&i.line,s=i&&i.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l{"use strict";Yu.exports=Ff;var xt="\\";function Ff(e,r){return t;function t(n){for(var a=0,u=n.indexOf(xt),i=e[r],o=[],s;u!==-1;)o.push(n.slice(a,u)),a=u+1,s=n.charAt(a),(!s||i.indexOf(s)===-1)&&o.push(xt),u=n.indexOf(xt,a+1);return o.push(n.slice(a)),o.join("")}}});var $u=C((Wg,gf)=>{gf.exports={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"}});var ju=C((Hg,vf)=>{vf.exports={"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"}});var Oe=C((Kg,Gu)=>{"use strict";Gu.exports=Ef;function Ef(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var Hu=C((Jg,Wu)=>{"use strict";Wu.exports=Cf;function Cf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var ze=C((Xg,Ku)=>{"use strict";Ku.exports=bf;function bf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var Xu=C((Qg,Ju)=>{"use strict";var yf=ze(),Af=Oe();Ju.exports=xf;function xf(e){return yf(e)||Af(e)}});var Qu=C((Zg,kf)=>{kf.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",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:"\u{1D505}",Bopf:"\u{1D539}",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:"\u{1D49E}",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:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",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:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ET:"\xD0",ETH:"\xD0",Eacut:"\xC9",Eacute:"\xC9",Ecaron:"\u011A",Ecir:"\xCA",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrav:"\xC8",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",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:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",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:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",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:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Ium:"\xCF",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",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:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",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:` -`,Nfr:"\u{1D511}",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:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",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:"\u{1D513}",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:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",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:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",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:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",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:"\u{1D4B0}",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:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacut:"\xDD",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",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:"\u{1D51E}",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:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",arin:"\xE5",aring:"\xE5",ascr:"\u{1D4B6}",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:"\u{1D51F}",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:"\u{1D553}",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:"\u{1D4B7}",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:"\u{1D520}",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:"\u{1D554}",coprod:"\u2210",cop:"\xA9",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",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:"\u{1D521}",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:"\u{1D555}",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:"\u{1D4B9}",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:"\u{1D522}",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:"\u{1D556}",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:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",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:"\u{1D4BB}",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:"\u{1D524}",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:"\u{1D558}",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:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",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:"\u{1D526}",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:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iques:"\xBF",iquest:"\xBF",iscr:"\u{1D4BE}",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:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",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:"\u{1D529}",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:"\u{1D55D}",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:"\u{1D4C1}",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:"\u{1D52A}",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:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",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:"\u{1D52B}",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:"\u{1D55F}",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:"\u{1D4C3}",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:"\u{1D52C}",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:"\u{1D560}",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:"\u{1D52D}",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:"\u{1D561}",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:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",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:"\u{1D52F}",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:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",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:"\u{1D530}",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:"\u{1D564}",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:"\u{1D4C8}",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:"\u{1D531}",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:"\u{1D565}",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:"\u{1D4C9}",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:"\u{1D532}",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:"\u{1D566}",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:"\u{1D4CA}",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:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",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:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",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:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yum:"\xFF",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});var ri=C((ev,ei)=>{"use strict";var Zu=Qu();ei.exports=Bf;var wf={}.hasOwnProperty;function Bf(e){return wf.call(Zu,e)?Zu[e]:!1}});var lr=C((rv,di)=>{"use strict";var ti=$u(),ni=ju(),qf=Oe(),Tf=Hu(),oi=Xu(),Sf=ri();di.exports=$f;var _f={}.hasOwnProperty,Ue=String.fromCharCode,Lf=Function.prototype,ui={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},Of=9,ii=10,Pf=12,If=32,ai=38,Nf=59,Rf=60,zf=61,Uf=35,Mf=88,Yf=120,Vf=65533,Me="named",wt="hexadecimal",Bt="decimal",qt={};qt[wt]=16;qt[Bt]=10;var Rr={};Rr[Me]=oi;Rr[Bt]=qf;Rr[wt]=Tf;var si=1,ci=2,li=3,fi=4,Di=5,kt=6,pi=7,ye={};ye[si]="Named character references must be terminated by a semicolon";ye[ci]="Numeric character references must be terminated by a semicolon";ye[li]="Named character references cannot be empty";ye[fi]="Numeric character references cannot be empty";ye[Di]="Named character references must be known";ye[kt]="Numeric character references cannot be disallowed";ye[pi]="Numeric character references cannot be outside the permissible Unicode range";function $f(e,r){var t={},n,a;r||(r={});for(a in ui)n=r[a],t[a]=n??ui[a];return(t.position.indent||t.position.start)&&(t.indent=t.position.indent||[],t.position=t.position.start),jf(e,t)}function jf(e,r){var t=r.additional,n=r.nonTerminated,a=r.text,u=r.reference,i=r.warning,o=r.textContext,s=r.referenceContext,l=r.warningContext,c=r.position,f=r.indent||[],D=e.length,h=0,p=-1,d=c.column||1,m=c.line||1,F="",y=[],v,B,b,g,A,x,E,k,w,q,T,R,L,_,S,O,ke,$,I;for(typeof t=="string"&&(t=t.charCodeAt(0)),O=J(),k=i?K:Lf,h--,D++;++h65535&&(x-=65536,q+=Ue(x>>>10|55296),x=56320|x&1023),x=q+Ue(x))):_!==Me&&k(fi,$)),x?(me(),O=J(),h=I-1,d+=I-L+1,y.push(x),ke=J(),ke.offset++,u&&u.call(s,x,{start:O,end:ke},e.slice(L-1,I)),O=ke):(g=e.slice(L-1,I),F+=g,d+=g.length,h=I-1)}else A===10&&(m++,p++,d=0),A===A?(F+=Ue(A),d++):me();return y.join("");function J(){return{line:m,column:d,offset:h+(c.offset||0)}}function K(Fe,U){var lt=J();lt.column+=U,lt.offset+=U,i.call(l,ye[Fe],lt,Fe)}function me(){F&&(y.push(F),a&&a.call(o,F,{start:O,end:J()}),F="")}}function Gf(e){return e>=55296&&e<=57343||e>1114111}function Wf(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}});var Fi=C((tv,mi)=>{"use strict";var Hf=Le(),hi=lr();mi.exports=Kf;function Kf(e){return t.raw=n,t;function r(u){for(var i=e.offset,o=u.line,s=[];++o&&o in i;)s.push((i[o]||0)+1);return{start:u,indent:s}}function t(u,i,o){hi(u,{position:r(i),warning:a,text:o,reference:o,textContext:e,referenceContext:e})}function n(u,i,o){return hi(u,Hf(o,{position:r(i),warning:a}))}function a(u,i,o){o!==3&&e.file.message(u,i)}}});var Ei=C((nv,vi)=>{"use strict";vi.exports=Jf;function Jf(e){return r;function r(t,n){var a=this,u=a.offset,i=[],o=a[e+"Methods"],s=a[e+"Tokenizers"],l=n.line,c=n.column,f,D,h,p,d,m;if(!t)return i;for(x.now=v,x.file=a.file,F("");t;){for(f=-1,D=o.length,d=!1;++f{"use strict";bi.exports=zr;var Tt=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],St=Tt.concat(["~","|"]),Ci=St.concat([` -`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);zr.default=Tt;zr.gfm=St;zr.commonmark=Ci;function zr(e){var r=e||{};return r.commonmark?Ci:r.gfm?St:Tt}});var xi=C((iv,Ai)=>{"use strict";Ai.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","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"]});var _t=C((av,ki)=>{"use strict";ki.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:xi()}});var Bi=C((ov,wi)=>{"use strict";var Zf=Le(),eD=yi(),rD=_t();wi.exports=tD;function tD(e){var r=this,t=r.options,n,a;if(e==null)e={};else if(typeof e=="object")e=Zf(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in rD){if(a=e[n],a==null&&(a=t[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return r.options=e,r.escape=eD(e),r}});var Si=C((sv,Ti)=>{"use strict";Ti.exports=qi;function qi(e){if(e==null)return aD;if(typeof e=="string")return iD(e);if(typeof e=="object")return"length"in e?uD(e):nD(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function nD(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function uD(e){for(var r=[],t=-1;++t{_i.exports=oD;function oD(e){return e}});var Ni=C((lv,Ii)=>{"use strict";Ii.exports=Ur;var sD=Si(),cD=Li(),Oi=!0,Pi="skip",Lt=!1;Ur.CONTINUE=Oi;Ur.SKIP=Pi;Ur.EXIT=Lt;function Ur(e,r,t,n){var a,u;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),u=sD(r),a=n?-1:1,i(e,null,[])();function i(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,D.displayName="node ("+cD(c.type+(f?"<"+f+">":""))+")"),D;function D(){var h=l.concat(o),p=[],d,m;if((!r||u(o,s,l[l.length-1]||null))&&(p=lD(t(o,l)),p[0]===Lt))return p;if(o.children&&p[0]!==Pi)for(m=(n?o.children.length:-1)+a;m>-1&&m{"use strict";Ri.exports=Yr;var Mr=Ni(),fD=Mr.CONTINUE,DD=Mr.SKIP,pD=Mr.EXIT;Yr.CONTINUE=fD;Yr.SKIP=DD;Yr.EXIT=pD;function Yr(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),Mr(e,r,a,n);function a(u,i){var o=i[i.length-1],s=o?o.children.indexOf(u):null;return t(u,s,o)}}});var Mi=C((Dv,Ui)=>{"use strict";var dD=zi();Ui.exports=hD;function hD(e,r){return dD(e,r?mD:FD),e}function mD(e){delete e.position}function FD(e){e.position=void 0}});var $i=C((pv,Vi)=>{"use strict";var Yi=Le(),gD=Mi();Vi.exports=CD;var vD=` -`,ED=/\r\n|\r/g;function CD(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=Yi(t),a;return r=r.replace(ED,vD),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||Yi(t)}},e.options.position||gD(a,!0),a}});var Gi=C((dv,ji)=>{"use strict";var bD=/^[ \t]*(\n|$)/;ji.exports=yD;function yD(e,r,t){for(var n,a="",u=0,i=r.length;u{"use strict";var pe="",Ot;Wi.exports=AD;function AD(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Ot!==e||typeof Ot>"u")Ot=e,pe="";else if(pe.length>=t)return pe.substr(0,t);for(;t>pe.length&&r>1;)r&1&&(pe+=e),r>>=1,e+=e;return pe+=e,pe=pe.substr(0,t),pe}});var Pt=C((mv,Hi)=>{"use strict";Hi.exports=xD;function xD(e){return String(e).replace(/\n+$/,"")}});var Xi=C((Fv,Ji)=>{"use strict";var kD=Vr(),wD=Pt();Ji.exports=TD;var It=` -`,Ki=" ",Nt=" ",BD=4,qD=kD(Nt,BD);function TD(e,r,t){for(var n=-1,a=r.length,u="",i="",o="",s="",l,c,f;++n{"use strict";Zi.exports=OD;var $r=` -`,fr=" ",Ye=" ",SD="~",Qi="`",_D=3,LD=4;function OD(e,r,t){var n=this,a=n.options.gfm,u=r.length+1,i=0,o="",s,l,c,f,D,h,p,d,m,F,y,v,B;if(a){for(;i=LD)){for(p="";i{Ve=ra.exports=PD;function PD(e){return e.trim?e.trim():Ve.right(Ve.left(e))}Ve.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};Ve.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var jr=C((vv,ta)=>{"use strict";ta.exports=ID;function ID(e,r,t,n){for(var a=e.length,u=-1,i,o;++u{"use strict";var ND=Pe(),RD=jr();ia.exports=zD;var Rt=` -`,na=" ",zt=" ",ua=">";function zD(e,r,t){for(var n=this,a=n.offset,u=n.blockTokenizers,i=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],D=[],h,p=0,d,m,F,y,v,B,b,g;p{"use strict";sa.exports=MD;var oa=` -`,Dr=" ",pr=" ",dr="#",UD=6;function MD(e,r,t){for(var n=this,a=n.options.pedantic,u=r.length+1,i=-1,o=e.now(),s="",l="",c,f,D;++iUD)&&!(!D||!a&&r.charAt(i+1)===dr)){for(u=r.length+1,f="";++i{"use strict";fa.exports=HD;var YD=" ",VD=` -`,la=" ",$D="*",jD="-",GD="_",WD=3;function HD(e,r,t){for(var n=-1,a=r.length+1,u="",i,o,s,l;++n=WD&&(!i||i===VD)?(u+=l,t?!0:e(u)({type:"thematicBreak"})):void 0}});var Ut=C((yv,da)=>{"use strict";da.exports=QD;var pa=" ",KD=" ",JD=1,XD=4;function QD(e){for(var r=0,t=0,n=e.charAt(r),a={},u,i=0;n===pa||n===KD;){for(u=n===pa?XD:JD,t+=u,u>1&&(t=Math.floor(t/u)*u);i{"use strict";var ZD=Pe(),ep=Vr(),rp=Ut();ma.exports=up;var ha=` -`,tp=" ",np="!";function up(e,r){var t=e.split(ha),n=t.length+1,a=1/0,u=[],i,o,s;for(t.unshift(ep(tp,r)+np);n--;)if(o=rp(t[n]),u[n]=o.stops,ZD(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent{"use strict";var ip=Pe(),ap=Vr(),ga=Oe(),op=Ut(),sp=Fa(),cp=jr();ba.exports=Fp;var Mt="*",lp="_",va="+",Yt="-",Ea=".",de=" ",te=` -`,Gr=" ",Ca=")",fp="x",Ae=4,Dp=/\n\n(?!\s*$)/,pp=/^\[([ X\tx])][ \t]/,dp=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,hp=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,mp=/^( {1,4}|\t)?/gm;function Fp(e,r,t){for(var n=this,a=n.options.commonmark,u=n.options.pedantic,i=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E,k,w,q,T,R=!1,L,_,S,O;s=w.indent&&(O=!0),p=r.charAt(s),v=null,!O){if(p===Mt||p===va||p===Yt)v=p,s++,f++;else{for(D="";s=w.indent||f>Ae),y=!1,s=F;if(b=r.slice(F,m),B=F===s?b:r.slice(s,m),(v===Mt||v===lp||v===Yt)&&i.thematicBreak.call(n,e,b,!0))break;if(g=A,A=!y&&!ip(B).length,O&&w)w.value=w.value.concat(k,b),E=E.concat(k,b),k=[];else if(y)k.length!==0&&(R=!0,w.value.push(""),w.trail=k.concat()),w={value:[b],indent:f,trail:[]},x.push(w),E=E.concat(k,b),k=[];else if(A){if(g&&!a)break;k.push(b)}else{if(g||cp(o,i,n,[e,b,!0]))break;w.value=w.value.concat(k,b),E=E.concat(k,b),k=[]}s=m+1}for(L=e(E.join(te)).reset({type:"list",ordered:h,start:c,spread:R,children:[]}),q=n.enterList(),T=n.enterBlock(),s=-1,l=x.length;++s{"use strict";ka.exports=kp;var Vt=` -`,Cp=" ",Aa=" ",xa="=",bp="-",yp=3,Ap=1,xp=2;function kp(e,r,t){for(var n=this,a=e.now(),u=r.length,i=-1,o="",s,l,c,f,D;++i=yp){i--;break}o+=c}for(s="",l="";++i{"use strict";var wp="[a-zA-Z_:][a-zA-Z0-9:._-]*",Bp="[^\"'=<>`\\u0000-\\u0020]+",qp="'[^']*'",Tp='"[^"]*"',Sp="(?:"+Bp+"|"+qp+"|"+Tp+")",_p="(?:\\s+"+wp+"(?:\\s*=\\s*"+Sp+")?)",Ba="<[A-Za-z][A-Za-z0-9\\-]*"+_p+"*\\s*\\/?>",qa="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Lp="|",Op="<[?].*?[?]>",Pp="]*>",Ip="";$t.openCloseTag=new RegExp("^(?:"+Ba+"|"+qa+")");$t.tag=new RegExp("^(?:"+Ba+"|"+qa+"|"+Lp+"|"+Op+"|"+Pp+"|"+Ip+")")});var La=C((Bv,_a)=>{"use strict";var Np=jt().openCloseTag;_a.exports=Qp;var Rp=" ",zp=" ",Ta=` -`,Up="<",Mp=/^<(script|pre|style)(?=(\s|>|$))/i,Yp=/<\/(script|pre|style)>/i,Vp=/^/,jp=/^<\?/,Gp=/\?>/,Wp=/^/,Kp=/^/,Sa=/^$/,Xp=new RegExp(Np.source+"\\s*$");function Qp(e,r,t){for(var n=this,a=n.options.blocks.join("|"),u=new RegExp("^|$))","i"),i=r.length,o=0,s,l,c,f,D,h,p,d=[[Mp,Yp,!0],[Vp,$p,!0],[jp,Gp,!0],[Wp,Hp,!0],[Kp,Jp,!0],[u,Sa,!0],[Xp,Sa,!1]];o{"use strict";Oa.exports=rd;var Zp=String.fromCharCode,ed=/\s/;function rd(e){return ed.test(typeof e=="number"?Zp(e):e.charAt(0))}});var Gt=C((Tv,Pa)=>{"use strict";var td=kr();Pa.exports=nd;function nd(e){return td(e).toLowerCase()}});var Ya=C((Sv,Ma)=>{"use strict";var ud=ne(),id=Gt();Ma.exports=cd;var Ia='"',Na="'",ad="\\",$e=` -`,Wr=" ",Hr=" ",Ht="[",hr="]",od="(",sd=")",Ra=":",za="<",Ua=">";function cd(e,r,t){for(var n=this,a=n.options.commonmark,u=0,i=r.length,o="",s,l,c,f,D,h,p,d;u{"use strict";var fd=ne();$a.exports=Cd;var Dd=" ",Kr=` -`,pd=" ",dd="-",hd=":",md="\\",Kt="|",Fd=1,gd=2,Va="left",vd="center",Ed="right";function Cd(e,r,t){var n=this,a,u,i,o,s,l,c,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E;if(n.options.gfm){for(a=0,v=0,l=r.length+1,c=[];aA){if(v1&&(D?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),F=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(d,F)},s)),e(f+D),f="",d=""):(f&&(d+=f,f=""),d+=D,D===md&&a!==l-2&&(d+=B.charAt(a+1),a++)),m=!1,a++}y||e(Kr+u)}return g}}}});var Ha=C((Lv,Wa)=>{"use strict";var bd=Pe(),yd=Pt(),Ad=jr();Wa.exports=wd;var xd=" ",mr=` -`,kd=" ",Ga=4;function wd(e,r,t){for(var n=this,a=n.options,u=a.commonmark,i=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(mr),l=r.length,c,f,D,h,p;s=Ga&&D!==mr){s=r.indexOf(mr,s+1);continue}}if(f=r.slice(s+1),Ad(o,i,n,[e,f,!0]))break;if(c=s,s=r.indexOf(mr,s+1),s!==-1&&bd(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(p=e.now(),f=yd(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,p)}))}});var Ja=C((Ov,Ka)=>{"use strict";Ka.exports=Bd;function Bd(e,r){return e.indexOf("\\",r)}});var eo=C((Pv,Za)=>{"use strict";var qd=Ja();Za.exports=Qa;Qa.locator=qd;var Td=` -`,Xa="\\";function Qa(e,r,t){var n=this,a,u;if(r.charAt(0)===Xa&&(a=r.charAt(1),n.escape.indexOf(a)!==-1))return t?!0:(a===Td?u={type:"break"}:u={type:"text",value:a},e(Xa+a)(u))}});var Jt=C((Iv,ro)=>{"use strict";ro.exports=Sd;function Sd(e,r){return e.indexOf("<",r)}});var ao=C((Nv,io)=>{"use strict";var to=ne(),_d=lr(),Ld=Jt();io.exports=en;en.locator=Ld;en.notInLink=!0;var no="<",Xt=">",uo="@",Qt="/",Zt="mailto:",Jr=Zt.length;function en(e,r,t){var n=this,a="",u=r.length,i=0,o="",s=!1,l="",c,f,D,h,p;if(r.charAt(0)===no){for(i++,a=no;i{"use strict";oo.exports=Od;function Od(e,r){var t=String(e),n=0,a;if(typeof r!="string")throw new Error("Expected character");for(a=t.indexOf(r);a!==-1;)n++,a=t.indexOf(r,a+r.length);return n}});var fo=C((zv,lo)=>{"use strict";lo.exports=Pd;var co=["www.","http://","https://"];function Pd(e,r){var t=-1,n,a,u;if(!this.options.gfm)return t;for(a=co.length,n=-1;++n{"use strict";var Do=so(),Id=lr(),Nd=Oe(),rn=ze(),Rd=ne(),zd=fo();mo.exports=nn;nn.locator=zd;nn.notInLink=!0;var Ud=33,Md=38,Yd=41,Vd=42,$d=44,jd=45,tn=46,Gd=58,Wd=59,Hd=63,Kd=60,po=95,Jd=126,Xd="(",ho=")";function nn(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=r.length,o=-1,s=!1,l,c,f,D,h,p,d,m,F,y,v,B,b,g;if(a){if(r.slice(0,4)==="www.")s=!0,D=4;else if(r.slice(0,7).toLowerCase()==="http://")D=7;else if(r.slice(0,8).toLowerCase()==="https://")D=8;else return;for(o=D-1,f=D,l=[];DF;)D=h+p.lastIndexOf(ho),p=r.slice(h,D),y--;if(r.charCodeAt(D-1)===Wd&&(D--,rn(r.charCodeAt(D-1)))){for(m=D-2;rn(r.charCodeAt(m));)m--;r.charCodeAt(m)===Md&&(D=m)}return v=r.slice(0,D),b=Id(v,{nonTerminated:!1}),s&&(b="http://"+b),g=n.enterLink(),n.inlineTokenizers={text:u.text},B=n.tokenizeInline(v,e.now()),n.inlineTokenizers=u,g(),e(v)({type:"link",title:null,url:b,children:B})}}}});var Co=C((Mv,Eo)=>{"use strict";var Qd=Oe(),Zd=ze(),e0=43,r0=45,t0=46,n0=95;Eo.exports=vo;function vo(e,r){var t=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(a=n,a===r||!go(e.charCodeAt(a-1)))return vo.call(t,e,n+1);for(;a>r&&go(e.charCodeAt(a-1));)a--;return a}function go(e){return Qd(e)||Zd(e)||e===e0||e===r0||e===t0||e===n0}});var xo=C((Yv,Ao)=>{"use strict";var u0=lr(),bo=Oe(),yo=ze(),i0=Co();Ao.exports=on;on.locator=i0;on.notInLink=!0;var a0=43,un=45,Xr=46,o0=64,an=95;function on(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=0,o=r.length,s=-1,l,c,f,D;if(a){for(l=r.charCodeAt(i);bo(l)||yo(l)||l===a0||l===un||l===Xr||l===an;)l=r.charCodeAt(++i);if(i!==0&&l===o0){for(i++;i{"use strict";var s0=ze(),c0=Jt(),l0=jt().tag;wo.exports=ko;ko.locator=c0;var f0="<",D0="?",p0="!",d0="/",h0=/^/i;function ko(e,r,t){var n=this,a=r.length,u,i;if(!(r.charAt(0)!==f0||a<3)&&(u=r.charAt(1),!(!s0(u)&&u!==D0&&u!==p0&&u!==d0)&&(i=r.match(l0),!!i)))return t?!0:(i=i[0],!n.inLink&&h0.test(i)?n.inLink=!0:n.inLink&&m0.test(i)&&(n.inLink=!1),e(i)({type:"html",value:i}))}});var sn=C(($v,qo)=>{"use strict";qo.exports=F0;function F0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t{"use strict";var Fr=ne(),g0=sn();Po.exports=Oo;Oo.locator=g0;var v0=` -`,E0="!",To='"',So="'",je="(",gr=")",cn="<",ln=">",_o="[",vr="\\",C0="]",Lo="`";function Oo(e,r,t){var n=this,a="",u=0,i=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E,k,w;if(i===E0&&(F=!0,a=i,i=r.charAt(++u)),i===_o&&!(!F&&n.inLink)){for(a+=i,A="",u++,B=r.length,E=e.now(),g=0,E.column+=u,E.offset+=u;u=D&&(D=0):D=f}else if(i===vr)u++,d+=r.charAt(u);else if((!D||l)&&i===_o)g++;else if((!D||l)&&i===C0)if(g)g--;else{if(r.charAt(u+1)!==je)return;d+=je,c=!0,u++;break}A+=d,d="",u++}if(c){for(y=A,a+=A+d,u++;u{"use strict";var b0=ne(),y0=sn(),A0=Gt();Ro.exports=No;No.locator=y0;var fn="link",x0="image",k0="shortcut",w0="collapsed",Dn="full",B0="!",Qr="[",Zr="\\",et="]";function No(e,r,t){var n=this,a=n.options.commonmark,u=r.charAt(0),i=0,o=r.length,s="",l="",c=fn,f=k0,D,h,p,d,m,F,y,v;if(u===B0&&(c=x0,l=u,u=r.charAt(++i)),u===Qr){for(i++,l+=u,F="",v=0;i{"use strict";Uo.exports=q0;function q0(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n{"use strict";var T0=Pe(),Yo=ne(),S0=Mo();$o.exports=Vo;Vo.locator=S0;var _0="\\",L0="*",O0="_";function Vo(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,D;if(!(u!==L0&&u!==O0||r.charAt(++a)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=r.length,a++,l="",u="",!(o&&Yo(r.charAt(a)))))for(;a{"use strict";Go.exports=N0;var P0=String.fromCharCode,I0=/\w/;function N0(e){return I0.test(typeof e=="number"?P0(e):e.charAt(0))}});var Ko=C((Jv,Ho)=>{"use strict";Ho.exports=R0;function R0(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n{"use strict";var z0=Pe(),U0=Wo(),Jo=ne(),M0=Ko();Zo.exports=Qo;Qo.locator=M0;var Y0="*",Xo="_",V0="\\";function Qo(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,D;if(!(u!==Y0&&u!==Xo)&&(o=n.options.pedantic,c=u,s=u,f=r.length,a++,l="",u="",!(o&&Jo(r.charAt(a)))))for(;a{"use strict";rs.exports=$0;function $0(e,r){return e.indexOf("~~",r)}});var os=C((Zv,as)=>{"use strict";var ns=ne(),j0=ts();as.exports=is;is.locator=j0;var rt="~",us="~~";function is(e,r,t){var n=this,a="",u="",i="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==rt||r.charAt(1)!==rt||ns(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s{"use strict";ss.exports=G0;function G0(e,r){return e.indexOf("`",r)}});var Ds=C((r2,fs)=>{"use strict";var W0=cs();fs.exports=ls;ls.locator=W0;var pn=10,dn=32,hn=96;function ls(e,r,t){for(var n=r.length,a=0,u,i,o,s,l,c;a2&&(s===dn||s===pn)&&(l===dn||l===pn)){for(a++,n--;a{"use strict";ps.exports=H0;function H0(e,r){for(var t=e.indexOf(` -`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var Fs=C((n2,ms)=>{"use strict";var K0=ds();ms.exports=hs;hs.locator=K0;var J0=" ",X0=` -`,Q0=2;function hs(e,r,t){for(var n=r.length,a=-1,u="",i;++a{"use strict";gs.exports=Z0;function Z0(e,r,t){var n=this,a,u,i,o,s,l,c,f,D,h;if(t)return!0;for(a=n.inlineMethods,o=a.length,u=n.inlineTokenizers,i=-1,D=r.length;++i{"use strict";var eh=Le(),tt=zu(),rh=Mu(),th=Vu(),nh=Fi(),mn=Ei();bs.exports=Es;function Es(e,r){this.file=r,this.offset={},this.options=eh(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=rh(r).toOffset,this.unescape=th(this,"escape"),this.decode=nh(this)}var z=Es.prototype;z.setOptions=Bi();z.parse=$i();z.options=_t();z.exitStart=tt("atStart",!0);z.enterList=tt("inList",!1);z.enterLink=tt("inLink",!1);z.enterBlock=tt("inBlock",!1);z.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];z.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];z.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];z.blockTokenizers={blankLine:Gi(),indentedCode:Xi(),fencedCode:ea(),blockquote:aa(),atxHeading:ca(),thematicBreak:Da(),list:ya(),setextHeading:wa(),html:La(),definition:Ya(),table:ja(),paragraph:Ha()};z.inlineTokenizers={escape:eo(),autoLink:ao(),url:Fo(),email:xo(),html:Bo(),link:Io(),reference:zo(),strong:jo(),emphasis:es(),deletion:os(),code:Ds(),break:Fs(),text:vs()};z.blockMethods=Cs(z.blockTokenizers);z.inlineMethods=Cs(z.inlineTokenizers);z.tokenizeBlock=mn("block");z.tokenizeInline=mn("inline");z.tokenizeFactory=mn;function Cs(e){var r=[],t;for(t in e)r.push(t);return r}});var ws=C((a2,ks)=>{"use strict";var uh=Nu(),ih=Le(),As=ys();ks.exports=xs;xs.Parser=As;function xs(e){var r=this.data("settings"),t=uh(As);t.prototype.options=ih(t.prototype.options,r,e),this.Parser=t}});var qs=C((o2,Bs)=>{"use strict";Bs.exports=ah;function ah(e){if(e)throw e}});var Fn=C((s2,Ts)=>{Ts.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var zs=C((c2,Rs)=>{"use strict";var nt=Object.prototype.hasOwnProperty,Ns=Object.prototype.toString,Ss=Object.defineProperty,_s=Object.getOwnPropertyDescriptor,Ls=function(r){return typeof Array.isArray=="function"?Array.isArray(r):Ns.call(r)==="[object Array]"},Os=function(r){if(!r||Ns.call(r)!=="[object Object]")return!1;var t=nt.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&nt.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var a;for(a in r);return typeof a>"u"||nt.call(r,a)},Ps=function(r,t){Ss&&t.name==="__proto__"?Ss(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},Is=function(r,t){if(t==="__proto__")if(nt.call(r,t)){if(_s)return _s(r,t).value}else return;return r[t]};Rs.exports=function e(){var r,t,n,a,u,i,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s{"use strict";Us.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var Vs=C((f2,Ys)=>{"use strict";var oh=[].slice;Ys.exports=sh;function sh(e,r){var t;return n;function n(){var i=oh.call(arguments,0),o=e.length>i.length,s;o&&i.push(a);try{s=e.apply(null,i)}catch(l){if(o&&t)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(u,a):s instanceof Error?a(s):u(s))}function a(){t||(t=!0,r.apply(null,arguments))}function u(i){a(null,i)}}});var Hs=C((D2,Ws)=>{"use strict";var js=Vs();Ws.exports=Gs;Gs.wrap=js;var $s=[].slice;function Gs(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var a=-1,u=$s.call(arguments,0,-1),i=arguments[arguments.length-1];if(typeof i!="function")throw new Error("Expected function as last argument, not "+i);o.apply(null,[null].concat(u));function o(s){var l=e[++a],c=$s.call(arguments,0),f=c.slice(1),D=u.length,h=-1;if(s){i(s);return}for(;++h{"use strict";var Ge={}.hasOwnProperty;Xs.exports=ch;function ch(e){return!e||typeof e!="object"?"":Ge.call(e,"position")||Ge.call(e,"type")?Ks(e.position):Ge.call(e,"start")||Ge.call(e,"end")?Ks(e):Ge.call(e,"line")||Ge.call(e,"column")?gn(e):""}function gn(e){return(!e||typeof e!="object")&&(e={}),Js(e.line)+":"+Js(e.column)}function Ks(e){return(!e||typeof e!="object")&&(e={}),gn(e.start)+"-"+gn(e.end)}function Js(e){return e&&typeof e=="number"?e:1}});var rc=C((d2,ec)=>{"use strict";var lh=Qs();ec.exports=vn;function Zs(){}Zs.prototype=Error.prototype;vn.prototype=new Zs;var xe=vn.prototype;xe.file="";xe.name="";xe.reason="";xe.message="";xe.stack="";xe.fatal=null;xe.column=null;xe.line=null;function vn(e,r,t){var n,a,u;typeof r=="string"&&(t=r,r=null),n=fh(t),a=lh(r)||"1:1",u={start:{line:null,column:null},end:{line:null,column:null}},r&&r.position&&(r=r.position),r&&(r.start?(u=r,r=r.start):u.start=r),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=a,this.reason=e,this.line=r?r.line:null,this.column=r?r.column:null,this.location=u,this.source=n[0],this.ruleId=n[1]}function fh(e){var r=[null,null],t;return typeof e=="string"&&(t=e.indexOf(":"),t===-1?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1))),r}});var tc=C(We=>{"use strict";We.basename=Dh;We.dirname=ph;We.extname=dh;We.join=hh;We.sep="/";function Dh(e,r){var t=0,n=-1,a,u,i,o;if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');if(Er(e),a=e.length,r===void 0||!r.length||r.length>e.length){for(;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else n<0&&(i=!0,n=a+1);return n<0?"":e.slice(t,n)}if(r===e)return"";for(u=-1,o=r.length-1;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else u<0&&(i=!0,u=a+1),o>-1&&(e.charCodeAt(a)===r.charCodeAt(o--)?o<0&&(n=a):(o=-1,n=u));return t===n?n=u:n<0&&(n=e.length),e.slice(t,n)}function ph(e){var r,t,n;if(Er(e),!e.length)return".";for(r=-1,n=e.length;--n;)if(e.charCodeAt(n)===47){if(t){r=n;break}}else t||(t=!0);return r<0?e.charCodeAt(0)===47?"/":".":r===1&&e.charCodeAt(0)===47?"//":e.slice(0,r)}function dh(e){var r=-1,t=0,n=-1,a=0,u,i,o;for(Er(e),o=e.length;o--;){if(i=e.charCodeAt(o),i===47){if(u){t=o+1;break}continue}n<0&&(u=!0,n=o+1),i===46?r<0?r=o:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||n<0||a===0||a===1&&r===n-1&&r===t+1?"":e.slice(r,n)}function hh(){for(var e=-1,r;++e2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",n=0):(t=t.slice(0,s),n=t.length-1-t.lastIndexOf("/")),a=i,u=0;continue}}else if(t.length){t="",n=0,a=i,u=0;continue}}r&&(t=t.length?t+"/..":"..",n=2)}else t.length?t+="/"+e.slice(a+1,i):t=e.slice(a+1,i),n=i-a-1;a=i,u=0}else o===46&&u>-1?u++:u=-1}return t}function Er(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}});var uc=C(nc=>{"use strict";nc.cwd=gh;function gh(){return"/"}});var oc=C((F2,ac)=>{"use strict";var ue=tc(),vh=uc(),Eh=Fn();ac.exports=he;var Ch={}.hasOwnProperty,En=["history","path","basename","stem","extname","dirname"];he.prototype.toString=_h;Object.defineProperty(he.prototype,"path",{get:bh,set:yh});Object.defineProperty(he.prototype,"dirname",{get:Ah,set:xh});Object.defineProperty(he.prototype,"basename",{get:kh,set:wh});Object.defineProperty(he.prototype,"extname",{get:Bh,set:qh});Object.defineProperty(he.prototype,"stem",{get:Th,set:Sh});function he(e){var r,t;if(!e)e={};else if(typeof e=="string"||Eh(e))e={contents:e};else if("message"in e&&"messages"in e)return e;if(!(this instanceof he))return new he(e);for(this.data={},this.messages=[],this.history=[],this.cwd=vh.cwd(),t=-1;++t-1)throw new Error("`extname` cannot contain multiple dots")}this.path=ue.join(this.dirname,this.stem+(e||""))}function Th(){return typeof this.path=="string"?ue.basename(this.path,this.extname):void 0}function Sh(e){bn(e,"stem"),Cn(e,"stem"),this.path=ue.join(this.dirname||"",e+(this.extname||""))}function _h(e){return(this.contents||"").toString(e)}function Cn(e,r){if(e&&e.indexOf(ue.sep)>-1)throw new Error("`"+r+"` cannot be a path: did not expect `"+ue.sep+"`")}function bn(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function ic(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}});var cc=C((g2,sc)=>{"use strict";var Lh=rc(),ut=oc();sc.exports=ut;ut.prototype.message=Oh;ut.prototype.info=Ih;ut.prototype.fail=Ph;function Oh(e,r,t){var n=new Lh(e,r,t);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}function Ph(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}function Ih(){var e=this.message.apply(this,arguments);return e.fatal=null,e}});var fc=C((v2,lc)=>{"use strict";lc.exports=cc()});var Ec=C((E2,vc)=>{"use strict";var Dc=qs(),Nh=Fn(),it=zs(),pc=Ms(),Fc=Hs(),Cr=fc();vc.exports=gc().freeze();var Rh=[].slice,zh={}.hasOwnProperty,Uh=Fc().use(Mh).use(Yh).use(Vh);function Mh(e,r){r.tree=e.parse(r.file)}function Yh(e,r,t){e.run(r.tree,r.file,n);function n(a,u,i){a?t(a):(r.tree=u,r.file=i,t())}}function Vh(e,r){var t=e.stringify(r.tree,r.file);t==null||(typeof t=="string"||Nh(t)?("value"in r.file&&(r.file.value=t),r.file.contents=t):r.file.result=t)}function gc(){var e=[],r=Fc(),t={},n=-1,a;return u.data=o,u.freeze=i,u.attachers=e,u.use=s,u.parse=c,u.stringify=h,u.run=f,u.runSync=D,u.process=p,u.processSync=d,u;function u(){for(var m=gc(),F=-1;++F{kn.isRemarkParser=jh;kn.isRemarkCompiler=Gh;function jh(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Gh(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var wc=C((b2,kc)=>{var Cc=wn();kc.exports=Jh;var bc=9,yc=32,at=36,Wh=48,Hh=57,Ac=92,Kh=["math","math-inline"],xc="math-display";function Jh(e){let r=this.Parser,t=this.Compiler;Cc.isRemarkParser(r)&&Xh(r,e),Cc.isRemarkCompiler(t)&&Qh(t,e)}function Xh(e,r){let t=e.prototype,n=t.inlineMethods;u.locator=a,t.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function a(i,o){return i.indexOf("$",o)}function u(i,o,s){let l=o.length,c=!1,f=!1,D=0,h,p,d,m,F,y,v;if(o.charCodeAt(D)===Ac&&(f=!0,D++),o.charCodeAt(D)===at){if(D++,f)return s?!0:i(o.slice(0,D))({type:"text",value:"$"});if(o.charCodeAt(D)===at&&(c=!0,D++),d=o.charCodeAt(D),!(d===yc||d===bc)){for(m=D;DHh)&&(!c||d===at)){F=D-1,D++,c&&D++,y=D;break}}else p===Ac&&(D++,d=o.charCodeAt(D+1));D++}if(y!==void 0)return s?!0:(v=o.slice(m,F+1),i(o.slice(0,y))({type:"inlineMath",value:v,data:{hName:"span",hProperties:{className:Kh.concat(c&&r.inlineMathDouble?[xc]:[])},hChildren:[{type:"text",value:v}]}}))}}}}function Qh(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(xc)&&(a="$$"),a+n.value+a}}});var _c=C((y2,Sc)=>{var Bc=wn();Sc.exports=tm;var qc=10,br=32,Bn=36,Tc=` -`,Zh="$",em=2,rm=["math","math-display"];function tm(){let e=this.Parser,r=this.Compiler;Bc.isRemarkParser(e)&&nm(e),Bc.isRemarkCompiler(r)&&um(r)}function nm(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,a=r.interruptList,u=r.interruptBlockquote;r.blockTokenizers.math=i,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function i(o,s,l){var c=s.length,f=0;let D,h,p,d,m,F,y,v,B,b,g;for(;fb&&s.charCodeAt(d-1)===br;)d--;for(;d>b&&s.charCodeAt(d-1)===Bn;)B++,d--;for(F<=B&&s.indexOf(Zh,b)===d&&(v=!0,g=d);b<=g&&b-fb&&s.charCodeAt(g-1)===br;)g--;if((!v||b!==g)&&h.push(s.slice(b,g)),v)break;f=p+1,p=s.indexOf(Tc,f+1),p=p===-1?c:p}return h=h.join(` -`),o(s.slice(0,p))({type:"math",value:h,data:{hName:"div",hProperties:{className:rm.concat()},hChildren:[{type:"text",value:h}]}})}}}}function um(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$ -`+n.value+` -$$`}}});var Oc=C((A2,Lc)=>{var im=wc(),am=_c();Lc.exports=om;function om(e){var r=e||{};am.call(this,r),im.call(this,r)}});var Ic=C((x2,Pc)=>{"use strict";Pc.exports=Dm;var yr=9,ot=10,He=32,sm=33,cm=58,Ke=91,lm=92,qn=93,Ar=94,st=96,ct=4,fm=1024;function Dm(e){var r=this.Parser,t=this.Compiler;pm(r)&&hm(r,e),dm(t)&&mm(t)}function pm(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function dm(e){return!!(e&&e.prototype&&e.prototype.visitors)}function hm(e,r){for(var t=r||{},n=e.prototype,a=n.blockTokenizers,u=n.inlineTokenizers,i=n.blockMethods,o=n.inlineMethods,s=a.definition,l=u.reference,c=[],f=-1,D=i.length,h;++fct&&(K=void 0,me=q);else{if(K0&&(U=Fe[w-1],U.contentStart===U.contentEnd);)w--;for(ke=b(g.slice(0,U.contentEnd));++q()=>(r||e((r={exports:{}}).exports,r),r.exports),On=(e,r)=>{for(var t in r)xr(e,t,{get:r[t],enumerable:!0})},Pn=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of nl(r))!il.call(e,a)&&a!==t&&xr(e,a,{get:()=>r[a],enumerable:!(n=tl(r,a))||n.enumerable});return e};var Ne=(e,r,t)=>(t=e!=null?rl(ul(e)):{},Pn(r||!e||!e.__esModule?xr(t,"default",{value:e,enumerable:!0}):t,e)),al=e=>Pn(xr({},"__esModule",{value:!0}),e);var kr=C((Om,Ln)=>{"use strict";Ln.exports=cl;function cl(e){return String(e).replace(/\s+/g," ")}});var Lu=C(($g,Pu)=>{"use strict";Pu.exports=hf;var lr=9,Rr=10,ze=32,ff=33,Df=58,Me=91,pf=92,At=93,fr=94,Ur=96,zr=4,df=1024;function hf(e){var r=this.Parser,t=this.Compiler;mf(r)&&gf(r,e),Ff(t)&&vf(t)}function mf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Ff(e){return!!(e&&e.prototype&&e.prototype.visitors)}function gf(e,r){for(var t=r||{},n=e.prototype,a=n.blockTokenizers,u=n.inlineTokenizers,i=n.blockMethods,o=n.inlineMethods,s=a.definition,l=u.reference,c=[],f=-1,D=i.length,h;++fzr&&(K=void 0,me=q);else{if(K0&&(z=Fe[w-1],z.contentStart===z.contentEnd);)w--;for(ke=b(g.slice(0,z.contentEnd));++qel,options:()=>rl,parsers:()=>_n,printers:()=>qm});var sl=(e,r,t,n)=>{if(!(e&&r==null))return r.replaceAll?r.replaceAll(t,n):t.global?r.replace(t,n):r.split(t).join(n)},N=sl;var cl=(e,r,t)=>{if(!(e&&r==null))return Array.isArray(r)||typeof r=="string"?r[t<0?r.length+t:t]:r.at(t)},M=cl;var Su=Ie(kr(),1);function Je(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function fl(e,r){let t=e.match(new RegExp(`(${Je(r)})+`,"g"));if(t===null)return 0;let n=new Map,a=0;for(let u of t){let i=u.length/r.length;n.set(i,!0),i>a&&(a=i)}for(let u=1;uMath.max(n,a.length/r.length),0)}var wr=Dl;var Rn=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function zn(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Un(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Mn=e=>!(zn(e)||Un(e));var pl=/[^\x20-\x7F]/;function dl(e){if(!e)return 0;if(!pl.test(e))return e.length;e=e.replace(Rn()," ");let r=0;for(let t of e){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(r+=Mn(n)?1:2)}return r}var Xe=dl;var Br="'",Yn='"';function hl(e,r){let t=r===!0||r===Br?Br:Yn,n=t===Br?Yn:Br,a=0,u=0;for(let i of e)i===t?a++:i===n&&u++;return a>u?n:t}var Vn=hl;var ie="string",X="array",ge="cursor",Q="indent",Z="align",ae="trim",G="group",W="fill",H="if-break",oe="indent-if-break",se="line-suffix",ce="line-suffix-boundary",j="line",le="label",ee="break-parent",qr=new Set([ge,Q,Z,ae,G,W,H,oe,se,ce,j,le,ee]);function ml(e){if(typeof e=="string")return ie;if(Array.isArray(e))return X;if(!e)return;let{type:r}=e;if(qr.has(r))return r}var fe=ml;var Fl=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function gl(e){let r=e===null?"null":typeof e;if(r!=="string"&&r!=="object")return`Unexpected doc '${r}', -Expected it to be 'string' or 'object'.`;if(fe(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=Fl([...qr].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var ft=class extends Error{name="InvalidDocError";constructor(r){super(gl(r)),this.doc=r}},we=ft;var $n={};function vl(e,r,t,n){let a=[e];for(;a.length>0;){let u=a.pop();if(u===$n){t(a.pop());continue}t&&a.push(u,$n);let i=fe(u);if(!i)throw new we(u);if((r==null?void 0:r(u))!==!1)switch(i){case X:case W:{let o=i===X?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case H:a.push(u.flatContents,u.breakContents);break;case G:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)a.push(u.expandedStates[s]);else a.push(u.contents);break;case Z:case Q:case oe:case le:case se:a.push(u.contents);break;case ie:case ge:case ae:case ce:case j:case ee:break;default:throw new we(u)}}}var jn=vl;var Gn=()=>{},Be=Gn,Tr=Gn;function Qe(e){return Be(e),{type:Q,contents:e}}function ve(e,r){return Be(r),{type:Z,contents:r,n:e}}function Ze(e,r={}){return Be(e),Tr(r.expandedStates,!0),{type:G,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function qe(e){return ve({type:"root"},e)}function Sr(e){return Tr(e),{type:W,parts:e}}function Wn(e,r="",t={}){return Be(e),r!==""&&Be(r),{type:H,breakContents:e,flatContents:r,groupId:t.groupId}}var er={type:ee};var Ne={type:j,hard:!0},El={type:j,hard:!0,literal:!0},_r={type:j},rr={type:j,soft:!0},P=[Ne,er],tr=[El,er];function nr(e,r){Be(e),Tr(r);let t=[];for(let n=0;n{if(Array.isArray(e))return e;if(e.type!==W)throw new Error(`Expect doc to be 'array' or '${W}'.`);return e.parts};function Xn(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(u){if(t.has(u))return t.get(u);let i=a(u);return t.set(u,i),i}function a(u){switch(fe(u)){case X:return r(u.map(n));case W:return r({...u,parts:u.parts.map(n)});case H:return r({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case G:{let{expandedStates:i,contents:o}=u;return i?(i=i.map(n),o=i[0]):o=n(o),r({...u,contents:o,expandedStates:i})}case Z:case Q:case oe:case le:case se:return r({...u,contents:n(u.contents)});case ie:case ge:case ae:case ce:case j:case ee:return r(u);default:throw new we(u)}}}function Hn(e){if(e.length>0){let r=M(!1,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Qn(e){let r=new Set,t=[];function n(u){if(u.type===ee&&Hn(t),u.type===G){if(t.push(u),r.has(u))return!1;r.add(u)}}function a(u){u.type===G&&t.pop().break&&Hn(t)}jn(e,n,a,!0)}function Kn(e){let r=[],t=e.filter(Boolean);for(;t.length>0;){let n=t.shift();if(n){if(Array.isArray(n)){t.unshift(...n);continue}if(r.length>0&&typeof M(!1,r,-1)=="string"&&typeof n=="string"){r[r.length-1]+=n;continue}r.push(n)}}return r}function Zn(e){return Xn(e,r=>Array.isArray(r)?Kn(r):r.parts?{...r,parts:Kn(r.parts)}:r)}function Ee(e,r=tr){return Xn(e,t=>typeof t=="string"?nr(r,t.split(` -`)):t)}function eu(e){switch(e){case"cr":return"\r";case"crlf":return`\r +`)}}function xt(e,r,t){e.splice(e.indexOf(r),0,t)}function Ef(e,r,t,n){for(var a=e.length,u=-1;++u{kt.isRemarkParser=Cf;kt.isRemarkCompiler=bf;function Cf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function bf(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var Yu=C((Wg,Mu)=>{var Iu=wt();Mu.exports=kf;var Nu=9,Ru=32,Mr=36,yf=48,Af=57,Uu=92,xf=["math","math-inline"],zu="math-display";function kf(e){let r=this.Parser,t=this.Compiler;Iu.isRemarkParser(r)&&wf(r,e),Iu.isRemarkCompiler(t)&&Bf(t,e)}function wf(e,r){let t=e.prototype,n=t.inlineMethods;u.locator=a,t.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function a(i,o){return i.indexOf("$",o)}function u(i,o,s){let l=o.length,c=!1,f=!1,D=0,h,p,d,m,F,y,v;if(o.charCodeAt(D)===Uu&&(f=!0,D++),o.charCodeAt(D)===Mr){if(D++,f)return s?!0:i(o.slice(0,D))({type:"text",value:"$"});if(o.charCodeAt(D)===Mr&&(c=!0,D++),d=o.charCodeAt(D),!(d===Ru||d===Nu)){for(m=D;DAf)&&(!c||d===Mr)){F=D-1,D++,c&&D++,y=D;break}}else p===Uu&&(D++,d=o.charCodeAt(D+1));D++}if(y!==void 0)return s?!0:(v=o.slice(m,F+1),i(o.slice(0,y))({type:"inlineMath",value:v,data:{hName:"span",hProperties:{className:xf.concat(c&&r.inlineMathDouble?[zu]:[])},hChildren:[{type:"text",value:v}]}}))}}}}function Bf(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(zu)&&(a="$$"),a+n.value+a}}});var Wu=C((Hg,ju)=>{var Vu=wt();ju.exports=_f;var Gu=10,Dr=32,Bt=36,$u=` +`,qf="$",Tf=2,Sf=["math","math-display"];function _f(){let e=this.Parser,r=this.Compiler;Vu.isRemarkParser(e)&&Of(e),Vu.isRemarkCompiler(r)&&Pf(r)}function Of(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,a=r.interruptList,u=r.interruptBlockquote;r.blockTokenizers.math=i,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function i(o,s,l){var c=s.length,f=0;let D,h,p,d,m,F,y,v,B,b,g;for(;fb&&s.charCodeAt(d-1)===Dr;)d--;for(;d>b&&s.charCodeAt(d-1)===Bt;)B++,d--;for(F<=B&&s.indexOf(qf,b)===d&&(v=!0,g=d);b<=g&&b-fb&&s.charCodeAt(g-1)===Dr;)g--;if((!v||b!==g)&&h.push(s.slice(b,g)),v)break;f=p+1,p=s.indexOf($u,f+1),p=p===-1?c:p}return h=h.join(` +`),o(s.slice(0,p))({type:"math",value:h,data:{hName:"div",hProperties:{className:Sf.concat()},hChildren:[{type:"text",value:h}]}})}}}}function Pf(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$ +`+n.value+` +$$`}}});var Ku=C((Kg,Hu)=>{var Lf=Yu(),If=Wu();Hu.exports=Nf;function Nf(e){var r=e||{};If.call(this,r),Lf.call(this,r)}});var Pe=C((Xg,Xu)=>{Xu.exports=Uf;var Rf=Object.prototype.hasOwnProperty;function Uf(){for(var e={},r=0;r{typeof Object.create=="function"?qt.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:qt.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var ei=C((Qg,Zu)=>{"use strict";var zf=Pe(),Qu=Ju();Zu.exports=Mf;function Mf(e){var r,t,n;Qu(u,e),Qu(a,u),r=u.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():zf(n));return u;function a(i){return e.apply(this,i)}function u(){return this instanceof u?e.apply(this,arguments):new a(arguments)}}});var ti=C((Zg,ri)=>{"use strict";ri.exports=Yf;function Yf(e,r,t){return n;function n(){var a=t||this,u=a[e];return a[e]=!r,i;function i(){a[e]=u}}}});var ui=C((ev,ni)=>{"use strict";ni.exports=Vf;function Vf(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:a,toPosition:a,toOffset:u};function a(i){var o=-1;if(i>-1&&ii)return{line:o+1,column:i-(t[o-1]||0)+1,offset:i}}return{}}function u(i){var o=i&&i.line,s=i&&i.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l{"use strict";ii.exports=Gf;var Tt="\\";function Gf(e,r){return t;function t(n){for(var a=0,u=n.indexOf(Tt),i=e[r],o=[],s;u!==-1;)o.push(n.slice(a,u)),a=u+1,s=n.charAt(a),(!s||i.indexOf(s)===-1)&&o.push(Tt),u=n.indexOf(Tt,a+1);return o.push(n.slice(a)),o.join("")}}});var oi=C((tv,$f)=>{$f.exports={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"}});var si=C((nv,jf)=>{jf.exports={"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"}});var Le=C((uv,ci)=>{"use strict";ci.exports=Wf;function Wf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var fi=C((iv,li)=>{"use strict";li.exports=Hf;function Hf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var Ye=C((av,Di)=>{"use strict";Di.exports=Kf;function Kf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var di=C((ov,pi)=>{"use strict";var Xf=Ye(),Jf=Le();pi.exports=Qf;function Qf(e){return Xf(e)||Jf(e)}});var hi=C((sv,Zf)=>{Zf.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",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:"\u{1D505}",Bopf:"\u{1D539}",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:"\u{1D49E}",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:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",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:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ET:"\xD0",ETH:"\xD0",Eacut:"\xC9",Eacute:"\xC9",Ecaron:"\u011A",Ecir:"\xCA",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrav:"\xC8",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",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:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",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:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",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:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Ium:"\xCF",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",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:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",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:` +`,Nfr:"\u{1D511}",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:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",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:"\u{1D513}",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:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",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:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",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:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",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:"\u{1D4B0}",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:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacut:"\xDD",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",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:"\u{1D51E}",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:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",arin:"\xE5",aring:"\xE5",ascr:"\u{1D4B6}",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:"\u{1D51F}",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:"\u{1D553}",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:"\u{1D4B7}",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:"\u{1D520}",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:"\u{1D554}",coprod:"\u2210",cop:"\xA9",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",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:"\u{1D521}",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:"\u{1D555}",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:"\u{1D4B9}",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:"\u{1D522}",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:"\u{1D556}",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:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",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:"\u{1D4BB}",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:"\u{1D524}",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:"\u{1D558}",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:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",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:"\u{1D526}",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:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iques:"\xBF",iquest:"\xBF",iscr:"\u{1D4BE}",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:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",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:"\u{1D529}",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:"\u{1D55D}",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:"\u{1D4C1}",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:"\u{1D52A}",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:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",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:"\u{1D52B}",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:"\u{1D55F}",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:"\u{1D4C3}",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:"\u{1D52C}",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:"\u{1D560}",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:"\u{1D52D}",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:"\u{1D561}",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:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",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:"\u{1D52F}",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:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",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:"\u{1D530}",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:"\u{1D564}",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:"\u{1D4C8}",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:"\u{1D531}",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:"\u{1D565}",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:"\u{1D4C9}",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:"\u{1D532}",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:"\u{1D566}",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:"\u{1D4CA}",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:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",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:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",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:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yum:"\xFF",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});var gi=C((cv,Fi)=>{"use strict";var mi=hi();Fi.exports=rD;var eD={}.hasOwnProperty;function rD(e){return eD.call(mi,e)?mi[e]:!1}});var pr=C((lv,Si)=>{"use strict";var vi=oi(),Ei=si(),tD=Le(),nD=fi(),Ai=di(),uD=gi();Si.exports=FD;var iD={}.hasOwnProperty,Ve=String.fromCharCode,aD=Function.prototype,Ci={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},oD=9,bi=10,sD=12,cD=32,yi=38,lD=59,fD=60,DD=61,pD=35,dD=88,hD=120,mD=65533,Ge="named",_t="hexadecimal",Ot="decimal",Pt={};Pt[_t]=16;Pt[Ot]=10;var Yr={};Yr[Ge]=Ai;Yr[Ot]=tD;Yr[_t]=nD;var xi=1,ki=2,wi=3,Bi=4,qi=5,St=6,Ti=7,ye={};ye[xi]="Named character references must be terminated by a semicolon";ye[ki]="Numeric character references must be terminated by a semicolon";ye[wi]="Named character references cannot be empty";ye[Bi]="Numeric character references cannot be empty";ye[qi]="Named character references must be known";ye[St]="Numeric character references cannot be disallowed";ye[Ti]="Numeric character references cannot be outside the permissible Unicode range";function FD(e,r){var t={},n,a;r||(r={});for(a in Ci)n=r[a],t[a]=n??Ci[a];return(t.position.indent||t.position.start)&&(t.indent=t.position.indent||[],t.position=t.position.start),gD(e,t)}function gD(e,r){var t=r.additional,n=r.nonTerminated,a=r.text,u=r.reference,i=r.warning,o=r.textContext,s=r.referenceContext,l=r.warningContext,c=r.position,f=r.indent||[],D=e.length,h=0,p=-1,d=c.column||1,m=c.line||1,F="",y=[],v,B,b,g,A,x,E,k,w,q,T,R,O,_,S,P,ke,G,I;for(typeof t=="string"&&(t=t.charCodeAt(0)),P=X(),k=i?K:aD,h--,D++;++h65535&&(x-=65536,q+=Ve(x>>>10|55296),x=56320|x&1023),x=q+Ve(x))):_!==Ge&&k(Bi,G)),x?(me(),P=X(),h=I-1,d+=I-O+1,y.push(x),ke=X(),ke.offset++,u&&u.call(s,x,{start:P,end:ke},e.slice(O-1,I)),P=ke):(g=e.slice(O-1,I),F+=g,d+=g.length,h=I-1)}else A===10&&(m++,p++,d=0),A===A?(F+=Ve(A),d++):me();return y.join("");function X(){return{line:m,column:d,offset:h+(c.offset||0)}}function K(Fe,z){var lt=X();lt.column+=z,lt.offset+=z,i.call(l,ye[Fe],lt,Fe)}function me(){F&&(y.push(F),a&&a.call(o,F,{start:P,end:X()}),F="")}}function vD(e){return e>=55296&&e<=57343||e>1114111}function ED(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}});var Pi=C((fv,Oi)=>{"use strict";var CD=Pe(),_i=pr();Oi.exports=bD;function bD(e){return t.raw=n,t;function r(u){for(var i=e.offset,o=u.line,s=[];++o&&o in i;)s.push((i[o]||0)+1);return{start:u,indent:s}}function t(u,i,o){_i(u,{position:r(i),warning:a,text:o,reference:o,textContext:e,referenceContext:e})}function n(u,i,o){return _i(u,CD(o,{position:r(i),warning:a}))}function a(u,i,o){o!==3&&e.file.message(u,i)}}});var Ni=C((Dv,Ii)=>{"use strict";Ii.exports=yD;function yD(e){return r;function r(t,n){var a=this,u=a.offset,i=[],o=a[e+"Methods"],s=a[e+"Tokenizers"],l=n.line,c=n.column,f,D,h,p,d,m;if(!t)return i;for(x.now=v,x.file=a.file,F("");t;){for(f=-1,D=o.length,d=!1;++f{"use strict";Ui.exports=Vr;var Lt=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],It=Lt.concat(["~","|"]),Ri=It.concat([` +`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);Vr.default=Lt;Vr.gfm=It;Vr.commonmark=Ri;function Vr(e){var r=e||{};return r.commonmark?Ri:r.gfm?It:Lt}});var Yi=C((dv,Mi)=>{"use strict";Mi.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","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"]});var Nt=C((hv,Vi)=>{"use strict";Vi.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:Yi()}});var $i=C((mv,Gi)=>{"use strict";var kD=Pe(),wD=zi(),BD=Nt();Gi.exports=qD;function qD(e){var r=this,t=r.options,n,a;if(e==null)e={};else if(typeof e=="object")e=kD(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in BD){if(a=e[n],a==null&&(a=t[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return r.options=e,r.escape=wD(e),r}});var Hi=C((Fv,Wi)=>{"use strict";Wi.exports=ji;function ji(e){if(e==null)return OD;if(typeof e=="string")return _D(e);if(typeof e=="object")return"length"in e?SD(e):TD(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function TD(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function SD(e){for(var r=[],t=-1;++t{Ki.exports=PD;function PD(e){return e}});var ea=C((vv,Zi)=>{"use strict";Zi.exports=Gr;var LD=Hi(),ID=Xi(),Ji=!0,Qi="skip",Rt=!1;Gr.CONTINUE=Ji;Gr.SKIP=Qi;Gr.EXIT=Rt;function Gr(e,r,t,n){var a,u;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),u=LD(r),a=n?-1:1,i(e,null,[])();function i(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,D.displayName="node ("+ID(c.type+(f?"<"+f+">":""))+")"),D;function D(){var h=l.concat(o),p=[],d,m;if((!r||u(o,s,l[l.length-1]||null))&&(p=ND(t(o,l)),p[0]===Rt))return p;if(o.children&&p[0]!==Qi)for(m=(n?o.children.length:-1)+a;m>-1&&m{"use strict";ra.exports=jr;var $r=ea(),RD=$r.CONTINUE,UD=$r.SKIP,zD=$r.EXIT;jr.CONTINUE=RD;jr.SKIP=UD;jr.EXIT=zD;function jr(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),$r(e,r,a,n);function a(u,i){var o=i[i.length-1],s=o?o.children.indexOf(u):null;return t(u,s,o)}}});var ua=C((Cv,na)=>{"use strict";var MD=ta();na.exports=YD;function YD(e,r){return MD(e,r?VD:GD),e}function VD(e){delete e.position}function GD(e){e.position=void 0}});var oa=C((bv,aa)=>{"use strict";var ia=Pe(),$D=ua();aa.exports=HD;var jD=` +`,WD=/\r\n|\r/g;function HD(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=ia(t),a;return r=r.replace(WD,jD),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||ia(t)}},e.options.position||$D(a,!0),a}});var ca=C((yv,sa)=>{"use strict";var KD=/^[ \t]*(\n|$)/;sa.exports=XD;function XD(e,r,t){for(var n,a="",u=0,i=r.length;u{"use strict";var pe="",Ut;la.exports=JD;function JD(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Ut!==e||typeof Ut>"u")Ut=e,pe="";else if(pe.length>=t)return pe.substr(0,t);for(;t>pe.length&&r>1;)r&1&&(pe+=e),r>>=1,e+=e;return pe+=e,pe=pe.substr(0,t),pe}});var zt=C((xv,fa)=>{"use strict";fa.exports=QD;function QD(e){return String(e).replace(/\n+$/,"")}});var da=C((kv,pa)=>{"use strict";var ZD=Wr(),ep=zt();pa.exports=np;var Mt=` +`,Da=" ",Yt=" ",rp=4,tp=ZD(Yt,rp);function np(e,r,t){for(var n=-1,a=r.length,u="",i="",o="",s="",l,c,f;++n{"use strict";ma.exports=op;var Hr=` +`,dr=" ",$e=" ",up="~",ha="`",ip=3,ap=4;function op(e,r,t){var n=this,a=n.options.gfm,u=r.length+1,i=0,o="",s,l,c,f,D,h,p,d,m,F,y,v,B;if(a){for(;i=ap)){for(p="";i{je=ga.exports=sp;function sp(e){return e.trim?e.trim():je.right(je.left(e))}je.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};je.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var Kr=C((Bv,va)=>{"use strict";va.exports=cp;function cp(e,r,t,n){for(var a=e.length,u=-1,i,o;++u{"use strict";var lp=Ie(),fp=Kr();ba.exports=Dp;var Vt=` +`,Ea=" ",Gt=" ",Ca=">";function Dp(e,r,t){for(var n=this,a=n.offset,u=n.blockTokenizers,i=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],D=[],h,p=0,d,m,F,y,v,B,b,g;p{"use strict";xa.exports=dp;var Aa=` +`,hr=" ",mr=" ",Fr="#",pp=6;function dp(e,r,t){for(var n=this,a=n.options.pedantic,u=r.length+1,i=-1,o=e.now(),s="",l="",c,f,D;++ipp)&&!(!D||!a&&r.charAt(i+1)===Fr)){for(u=r.length+1,f="";++i{"use strict";Ba.exports=Cp;var hp=" ",mp=` +`,wa=" ",Fp="*",gp="-",vp="_",Ep=3;function Cp(e,r,t){for(var n=-1,a=r.length+1,u="",i,o,s,l;++n=Ep&&(!i||i===mp)?(u+=l,t?!0:e(u)({type:"thematicBreak"})):void 0}});var $t=C((_v,Sa)=>{"use strict";Sa.exports=xp;var Ta=" ",bp=" ",yp=1,Ap=4;function xp(e){for(var r=0,t=0,n=e.charAt(r),a={},u,i=0;n===Ta||n===bp;){for(u=n===Ta?Ap:yp,t+=u,u>1&&(t=Math.floor(t/u)*u);i{"use strict";var kp=Ie(),wp=Wr(),Bp=$t();Oa.exports=Sp;var _a=` +`,qp=" ",Tp="!";function Sp(e,r){var t=e.split(_a),n=t.length+1,a=1/0,u=[],i,o,s;for(t.unshift(wp(qp,r)+Tp);n--;)if(o=Bp(t[n]),u[n]=o.stops,kp(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent{"use strict";var _p=Ie(),Op=Wr(),La=Le(),Pp=$t(),Lp=Pa(),Ip=Kr();Ua.exports=Gp;var jt="*",Np="_",Ia="+",Wt="-",Na=".",de=" ",te=` +`,Xr=" ",Ra=")",Rp="x",Ae=4,Up=/\n\n(?!\s*$)/,zp=/^\[([ X\tx])][ \t]/,Mp=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,Yp=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,Vp=/^( {1,4}|\t)?/gm;function Gp(e,r,t){for(var n=this,a=n.options.commonmark,u=n.options.pedantic,i=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E,k,w,q,T,R=!1,O,_,S,P;s=w.indent&&(P=!0),p=r.charAt(s),v=null,!P){if(p===jt||p===Ia||p===Wt)v=p,s++,f++;else{for(D="";s=w.indent||f>Ae),y=!1,s=F;if(b=r.slice(F,m),B=F===s?b:r.slice(s,m),(v===jt||v===Np||v===Wt)&&i.thematicBreak.call(n,e,b,!0))break;if(g=A,A=!y&&!_p(B).length,P&&w)w.value=w.value.concat(k,b),E=E.concat(k,b),k=[];else if(y)k.length!==0&&(R=!0,w.value.push(""),w.trail=k.concat()),w={value:[b],indent:f,trail:[]},x.push(w),E=E.concat(k,b),k=[];else if(A){if(g&&!a)break;k.push(b)}else{if(g||Ip(o,i,n,[e,b,!0]))break;w.value=w.value.concat(k,b),E=E.concat(k,b),k=[]}s=m+1}for(O=e(E.join(te)).reset({type:"list",ordered:h,start:c,spread:R,children:[]}),q=n.enterList(),T=n.enterBlock(),s=-1,l=x.length;++s{"use strict";Va.exports=Zp;var Ht=` +`,Hp=" ",Ma=" ",Ya="=",Kp="-",Xp=3,Jp=1,Qp=2;function Zp(e,r,t){for(var n=this,a=e.now(),u=r.length,i=-1,o="",s,l,c,f,D;++i=Xp){i--;break}o+=c}for(s="",l="";++i{"use strict";var ed="[a-zA-Z_:][a-zA-Z0-9:._-]*",rd="[^\"'=<>`\\u0000-\\u0020]+",td="'[^']*'",nd='"[^"]*"',ud="(?:"+rd+"|"+td+"|"+nd+")",id="(?:\\s+"+ed+"(?:\\s*=\\s*"+ud+")?)",$a="<[A-Za-z][A-Za-z0-9\\-]*"+id+"*\\s*\\/?>",ja="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ad="|",od="<[?].*?[?]>",sd="]*>",cd="";Kt.openCloseTag=new RegExp("^(?:"+$a+"|"+ja+")");Kt.tag=new RegExp("^(?:"+$a+"|"+ja+"|"+ad+"|"+od+"|"+sd+"|"+cd+")")});var Xa=C((Nv,Ka)=>{"use strict";var ld=Xt().openCloseTag;Ka.exports=xd;var fd=" ",Dd=" ",Wa=` +`,pd="<",dd=/^<(script|pre|style)(?=(\s|>|$))/i,hd=/<\/(script|pre|style)>/i,md=/^/,gd=/^<\?/,vd=/\?>/,Ed=/^/,bd=/^/,Ha=/^$/,Ad=new RegExp(ld.source+"\\s*$");function xd(e,r,t){for(var n=this,a=n.options.blocks.join("|"),u=new RegExp("^|$))","i"),i=r.length,o=0,s,l,c,f,D,h,p,d=[[dd,hd,!0],[md,Fd,!0],[gd,vd,!0],[Ed,Cd,!0],[bd,yd,!0],[u,Ha,!0],[Ad,Ha,!1]];o{"use strict";Ja.exports=Bd;var kd=String.fromCharCode,wd=/\s/;function Bd(e){return wd.test(typeof e=="number"?kd(e):e.charAt(0))}});var Jt=C((Uv,Qa)=>{"use strict";var qd=kr();Qa.exports=Td;function Td(e){return qd(e).toLowerCase()}});var io=C((zv,uo)=>{"use strict";var Sd=ne(),_d=Jt();uo.exports=Id;var Za='"',eo="'",Od="\\",We=` +`,Jr=" ",Qr=" ",Zt="[",gr="]",Pd="(",Ld=")",ro=":",to="<",no=">";function Id(e,r,t){for(var n=this,a=n.options.commonmark,u=0,i=r.length,o="",s,l,c,f,D,h,p,d;u{"use strict";var Rd=ne();oo.exports=Hd;var Ud=" ",Zr=` +`,zd=" ",Md="-",Yd=":",Vd="\\",en="|",Gd=1,$d=2,ao="left",jd="center",Wd="right";function Hd(e,r,t){var n=this,a,u,i,o,s,l,c,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E;if(n.options.gfm){for(a=0,v=0,l=r.length+1,c=[];aA){if(v<$d)return;break}c.push(r.slice(a,A)),v++,a=A+1}for(o=c.join(Zr),u=c.splice(1,1)[0]||[],a=0,l=u.length,v--,i=!1,p=[];a1&&(D?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),F=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(d,F)},s)),e(f+D),f="",d=""):(f&&(d+=f,f=""),d+=D,D===Vd&&a!==l-2&&(d+=B.charAt(a+1),a++)),m=!1,a++}y||e(Zr+u)}return g}}}});var fo=C((Yv,lo)=>{"use strict";var Kd=Ie(),Xd=zt(),Jd=Kr();lo.exports=e0;var Qd=" ",vr=` +`,Zd=" ",co=4;function e0(e,r,t){for(var n=this,a=n.options,u=a.commonmark,i=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(vr),l=r.length,c,f,D,h,p;s=co&&D!==vr){s=r.indexOf(vr,s+1);continue}}if(f=r.slice(s+1),Jd(o,i,n,[e,f,!0]))break;if(c=s,s=r.indexOf(vr,s+1),s!==-1&&Kd(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(p=e.now(),f=Xd(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,p)}))}});var po=C((Vv,Do)=>{"use strict";Do.exports=r0;function r0(e,r){return e.indexOf("\\",r)}});var go=C((Gv,Fo)=>{"use strict";var t0=po();Fo.exports=mo;mo.locator=t0;var n0=` +`,ho="\\";function mo(e,r,t){var n=this,a,u;if(r.charAt(0)===ho&&(a=r.charAt(1),n.escape.indexOf(a)!==-1))return t?!0:(a===n0?u={type:"break"}:u={type:"text",value:a},e(ho+a)(u))}});var rn=C(($v,vo)=>{"use strict";vo.exports=u0;function u0(e,r){return e.indexOf("<",r)}});var Ao=C((jv,yo)=>{"use strict";var Eo=ne(),i0=pr(),a0=rn();yo.exports=an;an.locator=a0;an.notInLink=!0;var Co="<",tn=">",bo="@",nn="/",un="mailto:",et=un.length;function an(e,r,t){var n=this,a="",u=r.length,i=0,o="",s=!1,l="",c,f,D,h,p;if(r.charAt(0)===Co){for(i++,a=Co;i{"use strict";xo.exports=o0;function o0(e,r){var t=String(e),n=0,a;if(typeof r!="string")throw new Error("Expected character");for(a=t.indexOf(r);a!==-1;)n++,a=t.indexOf(r,a+r.length);return n}});var qo=C((Hv,Bo)=>{"use strict";Bo.exports=s0;var wo=["www.","http://","https://"];function s0(e,r){var t=-1,n,a,u;if(!this.options.gfm)return t;for(a=wo.length,n=-1;++n{"use strict";var To=ko(),c0=pr(),l0=Le(),on=Ye(),f0=ne(),D0=qo();Oo.exports=cn;cn.locator=D0;cn.notInLink=!0;var p0=33,d0=38,h0=41,m0=42,F0=44,g0=45,sn=46,v0=58,E0=59,C0=63,b0=60,So=95,y0=126,A0="(",_o=")";function cn(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=r.length,o=-1,s=!1,l,c,f,D,h,p,d,m,F,y,v,B,b,g;if(a){if(r.slice(0,4)==="www.")s=!0,D=4;else if(r.slice(0,7).toLowerCase()==="http://")D=7;else if(r.slice(0,8).toLowerCase()==="https://")D=8;else return;for(o=D-1,f=D,l=[];DF;)D=h+p.lastIndexOf(_o),p=r.slice(h,D),y--;if(r.charCodeAt(D-1)===E0&&(D--,on(r.charCodeAt(D-1)))){for(m=D-2;on(r.charCodeAt(m));)m--;r.charCodeAt(m)===d0&&(D=m)}return v=r.slice(0,D),b=c0(v,{nonTerminated:!1}),s&&(b="http://"+b),g=n.enterLink(),n.inlineTokenizers={text:u.text},B=n.tokenizeInline(v,e.now()),n.inlineTokenizers=u,g(),e(v)({type:"link",title:null,url:b,children:B})}}}});var Ro=C((Xv,No)=>{"use strict";var x0=Le(),k0=Ye(),w0=43,B0=45,q0=46,T0=95;No.exports=Io;function Io(e,r){var t=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(a=n,a===r||!Lo(e.charCodeAt(a-1)))return Io.call(t,e,n+1);for(;a>r&&Lo(e.charCodeAt(a-1));)a--;return a}function Lo(e){return x0(e)||k0(e)||e===w0||e===B0||e===q0||e===T0}});var Yo=C((Jv,Mo)=>{"use strict";var S0=pr(),Uo=Le(),zo=Ye(),_0=Ro();Mo.exports=Dn;Dn.locator=_0;Dn.notInLink=!0;var O0=43,ln=45,rt=46,P0=64,fn=95;function Dn(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=0,o=r.length,s=-1,l,c,f,D;if(a){for(l=r.charCodeAt(i);Uo(l)||zo(l)||l===O0||l===ln||l===rt||l===fn;)l=r.charCodeAt(++i);if(i!==0&&l===P0){for(i++;i{"use strict";var L0=Ye(),I0=rn(),N0=Xt().tag;Go.exports=Vo;Vo.locator=I0;var R0="<",U0="?",z0="!",M0="/",Y0=/^/i;function Vo(e,r,t){var n=this,a=r.length,u,i;if(!(r.charAt(0)!==R0||a<3)&&(u=r.charAt(1),!(!L0(u)&&u!==U0&&u!==z0&&u!==M0)&&(i=r.match(N0),!!i)))return t?!0:(i=i[0],!n.inLink&&Y0.test(i)?n.inLink=!0:n.inLink&&V0.test(i)&&(n.inLink=!1),e(i)({type:"html",value:i}))}});var pn=C((Zv,jo)=>{"use strict";jo.exports=G0;function G0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t{"use strict";var Er=ne(),$0=pn();Qo.exports=Jo;Jo.locator=$0;var j0=` +`,W0="!",Wo='"',Ho="'",He="(",Cr=")",dn="<",hn=">",Ko="[",br="\\",H0="]",Xo="`";function Jo(e,r,t){var n=this,a="",u=0,i=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E,k,w;if(i===W0&&(F=!0,a=i,i=r.charAt(++u)),i===Ko&&!(!F&&n.inLink)){for(a+=i,A="",u++,B=r.length,E=e.now(),g=0,E.column+=u,E.offset+=u;u=D&&(D=0):D=f}else if(i===br)u++,d+=r.charAt(u);else if((!D||l)&&i===Ko)g++;else if((!D||l)&&i===H0)if(g)g--;else{if(r.charAt(u+1)!==He)return;d+=He,c=!0,u++;break}A+=d,d="",u++}if(c){for(y=A,a+=A+d,u++;u{"use strict";var K0=ne(),X0=pn(),J0=Jt();rs.exports=es;es.locator=X0;var mn="link",Q0="image",Z0="shortcut",eh="collapsed",Fn="full",rh="!",tt="[",nt="\\",ut="]";function es(e,r,t){var n=this,a=n.options.commonmark,u=r.charAt(0),i=0,o=r.length,s="",l="",c=mn,f=Z0,D,h,p,d,m,F,y,v;if(u===rh&&(c=Q0,l=u,u=r.charAt(++i)),u===tt){for(i++,l+=u,F="",v=0;i{"use strict";ns.exports=th;function th(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n{"use strict";var nh=Ie(),is=ne(),uh=us();os.exports=as;as.locator=uh;var ih="\\",ah="*",oh="_";function as(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,D;if(!(u!==ah&&u!==oh||r.charAt(++a)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=r.length,a++,l="",u="",!(o&&is(r.charAt(a)))))for(;a{"use strict";cs.exports=lh;var sh=String.fromCharCode,ch=/\w/;function lh(e){return ch.test(typeof e=="number"?sh(e):e.charAt(0))}});var Ds=C((iE,fs)=>{"use strict";fs.exports=fh;function fh(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n{"use strict";var Dh=Ie(),ph=ls(),ps=ne(),dh=Ds();ms.exports=hs;hs.locator=dh;var hh="*",ds="_",mh="\\";function hs(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,D;if(!(u!==hh&&u!==ds)&&(o=n.options.pedantic,c=u,s=u,f=r.length,a++,l="",u="",!(o&&ps(r.charAt(a)))))for(;a{"use strict";gs.exports=Fh;function Fh(e,r){return e.indexOf("~~",r)}});var As=C((sE,ys)=>{"use strict";var Es=ne(),gh=vs();ys.exports=bs;bs.locator=gh;var it="~",Cs="~~";function bs(e,r,t){var n=this,a="",u="",i="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==it||r.charAt(1)!==it||Es(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s{"use strict";xs.exports=vh;function vh(e,r){return e.indexOf("`",r)}});var qs=C((lE,Bs)=>{"use strict";var Eh=ks();Bs.exports=ws;ws.locator=Eh;var gn=10,vn=32,En=96;function ws(e,r,t){for(var n=r.length,a=0,u,i,o,s,l,c;a2&&(s===vn||s===gn)&&(l===vn||l===gn)){for(a++,n--;a{"use strict";Ts.exports=Ch;function Ch(e,r){for(var t=e.indexOf(` +`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var Ps=C((DE,Os)=>{"use strict";var bh=Ss();Os.exports=_s;_s.locator=bh;var yh=" ",Ah=` +`,xh=2;function _s(e,r,t){for(var n=r.length,a=-1,u="",i;++a{"use strict";Ls.exports=kh;function kh(e,r,t){var n=this,a,u,i,o,s,l,c,f,D,h;if(t)return!0;for(a=n.inlineMethods,o=a.length,u=n.inlineTokenizers,i=-1,D=r.length;++i{"use strict";var wh=Pe(),at=ti(),Bh=ui(),qh=ai(),Th=Pi(),Cn=Ni();Us.exports=Ns;function Ns(e,r){this.file=r,this.offset={},this.options=wh(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=Bh(r).toOffset,this.unescape=qh(this,"escape"),this.decode=Th(this)}var U=Ns.prototype;U.setOptions=$i();U.parse=oa();U.options=Nt();U.exitStart=at("atStart",!0);U.enterList=at("inList",!1);U.enterLink=at("inLink",!1);U.enterBlock=at("inBlock",!1);U.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];U.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];U.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];U.blockTokenizers={blankLine:ca(),indentedCode:da(),fencedCode:Fa(),blockquote:ya(),atxHeading:ka(),thematicBreak:qa(),list:za(),setextHeading:Ga(),html:Xa(),definition:io(),table:so(),paragraph:fo()};U.inlineTokenizers={escape:go(),autoLink:Ao(),url:Po(),email:Yo(),html:$o(),link:Zo(),reference:ts(),strong:ss(),emphasis:Fs(),deletion:As(),code:qs(),break:Ps(),text:Is()};U.blockMethods=Rs(U.blockTokenizers);U.inlineMethods=Rs(U.inlineTokenizers);U.tokenizeBlock=Cn("block");U.tokenizeInline=Cn("inline");U.tokenizeFactory=Cn;function Rs(e){var r=[],t;for(t in e)r.push(t);return r}});var Gs=C((hE,Vs)=>{"use strict";var Sh=ei(),_h=Pe(),Ms=zs();Vs.exports=Ys;Ys.Parser=Ms;function Ys(e){var r=this.data("settings"),t=Sh(Ms);t.prototype.options=_h(t.prototype.options,r,e),this.Parser=t}});var js=C((mE,$s)=>{"use strict";$s.exports=Oh;function Oh(e){if(e)throw e}});var bn=C((FE,Ws)=>{Ws.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var tc=C((gE,rc)=>{"use strict";var ot=Object.prototype.hasOwnProperty,ec=Object.prototype.toString,Hs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Xs=function(r){return typeof Array.isArray=="function"?Array.isArray(r):ec.call(r)==="[object Array]"},Js=function(r){if(!r||ec.call(r)!=="[object Object]")return!1;var t=ot.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&ot.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var a;for(a in r);return typeof a>"u"||ot.call(r,a)},Qs=function(r,t){Hs&&t.name==="__proto__"?Hs(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},Zs=function(r,t){if(t==="__proto__")if(ot.call(r,t)){if(Ks)return Ks(r,t).value}else return;return r[t]};rc.exports=function e(){var r,t,n,a,u,i,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s{"use strict";nc.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var ac=C((EE,ic)=>{"use strict";var Ph=[].slice;ic.exports=Lh;function Lh(e,r){var t;return n;function n(){var i=Ph.call(arguments,0),o=e.length>i.length,s;o&&i.push(a);try{s=e.apply(null,i)}catch(l){if(o&&t)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(u,a):s instanceof Error?a(s):u(s))}function a(){t||(t=!0,r.apply(null,arguments))}function u(i){a(null,i)}}});var fc=C((CE,lc)=>{"use strict";var sc=ac();lc.exports=cc;cc.wrap=sc;var oc=[].slice;function cc(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var a=-1,u=oc.call(arguments,0,-1),i=arguments[arguments.length-1];if(typeof i!="function")throw new Error("Expected function as last argument, not "+i);o.apply(null,[null].concat(u));function o(s){var l=e[++a],c=oc.call(arguments,0),f=c.slice(1),D=u.length,h=-1;if(s){i(s);return}for(;++h{"use strict";var Ke={}.hasOwnProperty;dc.exports=Ih;function Ih(e){return!e||typeof e!="object"?"":Ke.call(e,"position")||Ke.call(e,"type")?Dc(e.position):Ke.call(e,"start")||Ke.call(e,"end")?Dc(e):Ke.call(e,"line")||Ke.call(e,"column")?yn(e):""}function yn(e){return(!e||typeof e!="object")&&(e={}),pc(e.line)+":"+pc(e.column)}function Dc(e){return(!e||typeof e!="object")&&(e={}),yn(e.start)+"-"+yn(e.end)}function pc(e){return e&&typeof e=="number"?e:1}});var gc=C((yE,Fc)=>{"use strict";var Nh=hc();Fc.exports=An;function mc(){}mc.prototype=Error.prototype;An.prototype=new mc;var xe=An.prototype;xe.file="";xe.name="";xe.reason="";xe.message="";xe.stack="";xe.fatal=null;xe.column=null;xe.line=null;function An(e,r,t){var n,a,u;typeof r=="string"&&(t=r,r=null),n=Rh(t),a=Nh(r)||"1:1",u={start:{line:null,column:null},end:{line:null,column:null}},r&&r.position&&(r=r.position),r&&(r.start?(u=r,r=r.start):u.start=r),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=a,this.reason=e,this.line=r?r.line:null,this.column=r?r.column:null,this.location=u,this.source=n[0],this.ruleId=n[1]}function Rh(e){var r=[null,null],t;return typeof e=="string"&&(t=e.indexOf(":"),t===-1?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1))),r}});var vc=C(Xe=>{"use strict";Xe.basename=Uh;Xe.dirname=zh;Xe.extname=Mh;Xe.join=Yh;Xe.sep="/";function Uh(e,r){var t=0,n=-1,a,u,i,o;if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');if(yr(e),a=e.length,r===void 0||!r.length||r.length>e.length){for(;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else n<0&&(i=!0,n=a+1);return n<0?"":e.slice(t,n)}if(r===e)return"";for(u=-1,o=r.length-1;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else u<0&&(i=!0,u=a+1),o>-1&&(e.charCodeAt(a)===r.charCodeAt(o--)?o<0&&(n=a):(o=-1,n=u));return t===n?n=u:n<0&&(n=e.length),e.slice(t,n)}function zh(e){var r,t,n;if(yr(e),!e.length)return".";for(r=-1,n=e.length;--n;)if(e.charCodeAt(n)===47){if(t){r=n;break}}else t||(t=!0);return r<0?e.charCodeAt(0)===47?"/":".":r===1&&e.charCodeAt(0)===47?"//":e.slice(0,r)}function Mh(e){var r=-1,t=0,n=-1,a=0,u,i,o;for(yr(e),o=e.length;o--;){if(i=e.charCodeAt(o),i===47){if(u){t=o+1;break}continue}n<0&&(u=!0,n=o+1),i===46?r<0?r=o:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||n<0||a===0||a===1&&r===n-1&&r===t+1?"":e.slice(r,n)}function Yh(){for(var e=-1,r;++e2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",n=0):(t=t.slice(0,s),n=t.length-1-t.lastIndexOf("/")),a=i,u=0;continue}}else if(t.length){t="",n=0,a=i,u=0;continue}}r&&(t=t.length?t+"/..":"..",n=2)}else t.length?t+="/"+e.slice(a+1,i):t=e.slice(a+1,i),n=i-a-1;a=i,u=0}else o===46&&u>-1?u++:u=-1}return t}function yr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}});var Cc=C(Ec=>{"use strict";Ec.cwd=$h;function $h(){return"/"}});var Ac=C((kE,yc)=>{"use strict";var ue=vc(),jh=Cc(),Wh=bn();yc.exports=he;var Hh={}.hasOwnProperty,xn=["history","path","basename","stem","extname","dirname"];he.prototype.toString=im;Object.defineProperty(he.prototype,"path",{get:Kh,set:Xh});Object.defineProperty(he.prototype,"dirname",{get:Jh,set:Qh});Object.defineProperty(he.prototype,"basename",{get:Zh,set:em});Object.defineProperty(he.prototype,"extname",{get:rm,set:tm});Object.defineProperty(he.prototype,"stem",{get:nm,set:um});function he(e){var r,t;if(!e)e={};else if(typeof e=="string"||Wh(e))e={contents:e};else if("message"in e&&"messages"in e)return e;if(!(this instanceof he))return new he(e);for(this.data={},this.messages=[],this.history=[],this.cwd=jh.cwd(),t=-1;++t-1)throw new Error("`extname` cannot contain multiple dots")}this.path=ue.join(this.dirname,this.stem+(e||""))}function nm(){return typeof this.path=="string"?ue.basename(this.path,this.extname):void 0}function um(e){wn(e,"stem"),kn(e,"stem"),this.path=ue.join(this.dirname||"",e+(this.extname||""))}function im(e){return(this.contents||"").toString(e)}function kn(e,r){if(e&&e.indexOf(ue.sep)>-1)throw new Error("`"+r+"` cannot be a path: did not expect `"+ue.sep+"`")}function wn(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function bc(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}});var kc=C((wE,xc)=>{"use strict";var am=gc(),st=Ac();xc.exports=st;st.prototype.message=om;st.prototype.info=cm;st.prototype.fail=sm;function om(e,r,t){var n=new am(e,r,t);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}function sm(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}function cm(){var e=this.message.apply(this,arguments);return e.fatal=null,e}});var Bc=C((BE,wc)=>{"use strict";wc.exports=kc()});var Nc=C((qE,Ic)=>{"use strict";var qc=js(),lm=bn(),ct=tc(),Tc=uc(),Pc=fc(),Ar=Bc();Ic.exports=Lc().freeze();var fm=[].slice,Dm={}.hasOwnProperty,pm=Pc().use(dm).use(hm).use(mm);function dm(e,r){r.tree=e.parse(r.file)}function hm(e,r,t){e.run(r.tree,r.file,n);function n(a,u,i){a?t(a):(r.tree=u,r.file=i,t())}}function mm(e,r){var t=e.stringify(r.tree,r.file);t==null||(typeof t=="string"||lm(t)?("value"in r.file&&(r.file.value=t),r.file.contents=t):r.file.result=t)}function Lc(){var e=[],r=Pc(),t={},n=-1,a;return u.data=o,u.freeze=i,u.attachers=e,u.use=s,u.parse=c,u.stringify=h,u.run=f,u.runSync=D,u.process=p,u.processSync=d,u;function u(){for(var m=Lc(),F=-1;++F_u,options:()=>Ou,parsers:()=>_n,printers:()=>Bm});var ol=(e,r,t,n)=>{if(!(e&&r==null))return r.replaceAll?r.replaceAll(t,n):t.global?r.replace(t,n):r.split(t).join(n)},N=ol;var sl=(e,r,t)=>{if(!(e&&r==null))return Array.isArray(r)||typeof r=="string"?r[t<0?r.length+t:t]:r.at(t)},M=sl;var Tu=Ne(kr(),1);var ie="string",J="array",ge="cursor",Q="indent",Z="align",ae="trim",j="group",W="fill",H="if-break",oe="indent-if-break",se="line-suffix",ce="line-suffix-boundary",$="line",le="label",ee="break-parent",wr=new Set([ge,Q,Z,ae,j,W,H,oe,se,ce,$,le,ee]);function ll(e){if(typeof e=="string")return ie;if(Array.isArray(e))return J;if(!e)return;let{type:r}=e;if(wr.has(r))return r}var fe=ll;var fl=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Dl(e){let r=e===null?"null":typeof e;if(r!=="string"&&r!=="object")return`Unexpected doc '${r}', +Expected it to be 'string' or 'object'.`;if(fe(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=fl([...wr].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var ft=class extends Error{name="InvalidDocError";constructor(r){super(Dl(r)),this.doc=r}},we=ft;var In={};function pl(e,r,t,n){let a=[e];for(;a.length>0;){let u=a.pop();if(u===In){t(a.pop());continue}t&&a.push(u,In);let i=fe(u);if(!i)throw new we(u);if((r==null?void 0:r(u))!==!1)switch(i){case J:case W:{let o=i===J?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case H:a.push(u.flatContents,u.breakContents);break;case j:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)a.push(u.expandedStates[s]);else a.push(u.contents);break;case Z:case Q:case oe:case le:case se:a.push(u.contents);break;case ie:case ge:case ae:case ce:case $:case ee:break;default:throw new we(u)}}}var Nn=pl;var Rn=()=>{},Be=Rn,Br=Rn;function Je(e){return Be(e),{type:Q,contents:e}}function ve(e,r){return Be(r),{type:Z,contents:r,n:e}}function Qe(e,r={}){return Be(e),Br(r.expandedStates,!0),{type:j,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function qe(e){return ve({type:"root"},e)}function qr(e){return Br(e),{type:W,parts:e}}function Un(e,r="",t={}){return Be(e),r!==""&&Be(r),{type:H,breakContents:e,flatContents:r,groupId:t.groupId}}var Ze={type:ee};var Re={type:$,hard:!0},dl={type:$,hard:!0,literal:!0},Tr={type:$},er={type:$,soft:!0},L=[Re,Ze],rr=[dl,Ze];function tr(e,r){Be(e),Br(r);let t=[];for(let n=0;n0&&s(i),h()}function D(){o>0&&l(o),h()}function h(){i=0,o=0}}function pt(e){let r=0,t=0,n=e.length;e:for(;n--;){let a=e[n];if(a===ur){t++;continue}for(let u=a.length-1;u>=0;u--){let i=a[u];if(i===" "||i===" ")r++;else{e[n]=a.slice(0,u+1);break e}}}if(r>0||t>0)for(e.length=n+1;t-- >0;)e.push(ur);return r}function Lr(e,r,t,n,a,u){if(t===Number.POSITIVE_INFINITY)return!0;let i=r.length,o=[e],s=[];for(;t>=0;){if(o.length===0){if(i===0)return!0;o.push(r[--i]);continue}let{mode:l,doc:c}=o.pop();switch(fe(c)){case ie:s.push(c),t-=Xe(c);break;case X:case W:{let f=Jn(c);for(let D=f.length-1;D>=0;D--)o.push({mode:l,doc:f[D]});break}case Q:case Z:case oe:case le:o.push({mode:l,doc:c.contents});break;case ae:t+=pt(s);break;case G:{if(u&&c.break)return!1;let f=c.break?V:l,D=c.expandedStates&&f===V?M(!1,c.expandedStates,-1):c.contents;o.push({mode:f,doc:D});break}case H:{let D=(c.groupId?a[c.groupId]||re:l)===V?c.breakContents:c.flatContents;D&&o.push({mode:l,doc:D});break}case j:if(l===V||c.hard)return!0;c.soft||(s.push(" "),t--);break;case se:n=!0;break;case ce:if(n)return!1;break}}return!1}function tu(e,r){let t={},n=r.printWidth,a=eu(r.endOfLine),u=0,i=[{ind:ru(),mode:V,doc:e}],o=[],s=!1,l=[],c=0;for(Qn(e);i.length>0;){let{ind:D,mode:h,doc:p}=i.pop();switch(fe(p)){case ie:{let d=a!==` +`}}var Mn=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Yn(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Vn(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Gn=e=>!(Yn(e)||Vn(e));var hl=/[^\x20-\x7F]/;function ml(e){if(!e)return 0;if(!hl.test(e))return e.length;e=e.replace(Mn()," ");let r=0;for(let t of e){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(r+=Gn(n)?1:2)}return r}var nr=ml;var Wn=e=>{if(Array.isArray(e))return e;if(e.type!==W)throw new Error(`Expect doc to be 'array' or '${W}'.`);return e.parts};function Hn(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(u){if(t.has(u))return t.get(u);let i=a(u);return t.set(u,i),i}function a(u){switch(fe(u)){case J:return r(u.map(n));case W:return r({...u,parts:u.parts.map(n)});case H:return r({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case j:{let{expandedStates:i,contents:o}=u;return i?(i=i.map(n),o=i[0]):o=n(o),r({...u,contents:o,expandedStates:i})}case Z:case Q:case oe:case le:case se:return r({...u,contents:n(u.contents)});case ie:case ge:case ae:case ce:case $:case ee:return r(u);default:throw new we(u)}}}function $n(e){if(e.length>0){let r=M(!1,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Kn(e){let r=new Set,t=[];function n(u){if(u.type===ee&&$n(t),u.type===j){if(t.push(u),r.has(u))return!1;r.add(u)}}function a(u){u.type===j&&t.pop().break&&$n(t)}Nn(e,n,a,!0)}function jn(e){let r=[],t=e.filter(Boolean);for(;t.length>0;){let n=t.shift();if(n){if(Array.isArray(n)){t.unshift(...n);continue}if(r.length>0&&typeof M(!1,r,-1)=="string"&&typeof n=="string"){r[r.length-1]+=n;continue}r.push(n)}}return r}function Xn(e){return Hn(e,r=>Array.isArray(r)?jn(r):r.parts?{...r,parts:jn(r.parts)}:r)}function Ee(e,r=rr){return Hn(e,t=>typeof t=="string"?tr(r,t.split(` +`)):t)}var V=Symbol("MODE_BREAK"),re=Symbol("MODE_FLAT"),ur=Symbol("cursor");function Jn(){return{value:"",length:0,queue:[]}}function Fl(e,r){return Dt(e,{type:"indent"},r)}function gl(e,r,t){return r===Number.NEGATIVE_INFINITY?e.root||Jn():r<0?Dt(e,{type:"dedent"},t):r?r.type==="root"?{...e,root:e}:Dt(e,{type:typeof r=="string"?"stringAlign":"numberAlign",n:r},t):e}function Dt(e,r,t){let n=r.type==="dedent"?e.queue.slice(0,-1):[...e.queue,r],a="",u=0,i=0,o=0;for(let p of n)switch(p.type){case"indent":c(),t.useTabs?s(1):l(t.tabWidth);break;case"stringAlign":c(),a+=p.n,u+=p.n.length;break;case"numberAlign":i+=1,o+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return D(),{...e,value:a,length:u,queue:n};function s(p){a+=" ".repeat(p),u+=t.tabWidth*p}function l(p){a+=" ".repeat(p),u+=p}function c(){t.useTabs?f():D()}function f(){i>0&&s(i),h()}function D(){o>0&&l(o),h()}function h(){i=0,o=0}}function pt(e){let r=0,t=0,n=e.length;e:for(;n--;){let a=e[n];if(a===ur){t++;continue}for(let u=a.length-1;u>=0;u--){let i=a[u];if(i===" "||i===" ")r++;else{e[n]=a.slice(0,u+1);break e}}}if(r>0||t>0)for(e.length=n+1;t-- >0;)e.push(ur);return r}function Sr(e,r,t,n,a,u){if(t===Number.POSITIVE_INFINITY)return!0;let i=r.length,o=[e],s=[];for(;t>=0;){if(o.length===0){if(i===0)return!0;o.push(r[--i]);continue}let{mode:l,doc:c}=o.pop();switch(fe(c)){case ie:s.push(c),t-=nr(c);break;case J:case W:{let f=Wn(c);for(let D=f.length-1;D>=0;D--)o.push({mode:l,doc:f[D]});break}case Q:case Z:case oe:case le:o.push({mode:l,doc:c.contents});break;case ae:t+=pt(s);break;case j:{if(u&&c.break)return!1;let f=c.break?V:l,D=c.expandedStates&&f===V?M(!1,c.expandedStates,-1):c.contents;o.push({mode:f,doc:D});break}case H:{let D=(c.groupId?a[c.groupId]||re:l)===V?c.breakContents:c.flatContents;D&&o.push({mode:l,doc:D});break}case $:if(l===V||c.hard)return!0;c.soft||(s.push(" "),t--);break;case se:n=!0;break;case ce:if(n)return!1;break}}return!1}function Qn(e,r){let t={},n=r.printWidth,a=zn(r.endOfLine),u=0,i=[{ind:Jn(),mode:V,doc:e}],o=[],s=!1,l=[],c=0;for(Kn(e);i.length>0;){let{ind:D,mode:h,doc:p}=i.pop();switch(fe(p)){case ie:{let d=a!==` `?N(!1,p,` -`,a):p;o.push(d),i.length>0&&(u+=Xe(d));break}case X:for(let d=p.length-1;d>=0;d--)i.push({ind:D,mode:h,doc:p[d]});break;case ge:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(ur),c++;break;case Q:i.push({ind:Cl(D,r),mode:h,doc:p.contents});break;case Z:i.push({ind:bl(D,p.n,r),mode:h,doc:p.contents});break;case ae:u-=pt(o);break;case G:switch(h){case re:if(!s){i.push({ind:D,mode:p.break?V:re,doc:p.contents});break}case V:{s=!1;let d={ind:D,mode:re,doc:p.contents},m=n-u,F=l.length>0;if(!p.break&&Lr(d,i,m,F,t))i.push(d);else if(p.expandedStates){let y=M(!1,p.expandedStates,-1);if(p.break){i.push({ind:D,mode:V,doc:y});break}else for(let v=1;v=p.expandedStates.length){i.push({ind:D,mode:V,doc:y});break}else{let B=p.expandedStates[v],b={ind:D,mode:re,doc:B};if(Lr(b,i,m,F,t)){i.push(b);break}}}else i.push({ind:D,mode:V,doc:p.contents});break}}p.id&&(t[p.id]=M(!1,i,-1).mode);break;case W:{let d=n-u,{parts:m}=p;if(m.length===0)break;let[F,y]=m,v={ind:D,mode:re,doc:F},B={ind:D,mode:V,doc:F},b=Lr(v,[],d,l.length>0,t,!0);if(m.length===1){b?i.push(v):i.push(B);break}let g={ind:D,mode:re,doc:y},A={ind:D,mode:V,doc:y};if(m.length===2){b?i.push(g,v):i.push(A,B);break}m.splice(0,2);let x={ind:D,mode:h,doc:Sr(m)},E=m[0];Lr({ind:D,mode:re,doc:[F,y,E]},[],d,l.length>0,t,!0)?i.push(x,g,v):b?i.push(x,A,v):i.push(x,A,B);break}case H:case oe:{let d=p.groupId?t[p.groupId]:h;if(d===V){let m=p.type===H?p.breakContents:p.negate?p.contents:Qe(p.contents);m&&i.push({ind:D,mode:h,doc:m})}if(d===re){let m=p.type===H?p.flatContents:p.negate?Qe(p.contents):p.contents;m&&i.push({ind:D,mode:h,doc:m})}break}case se:l.push({ind:D,mode:h,doc:p.contents});break;case ce:l.length>0&&i.push({ind:D,mode:h,doc:Ne});break;case j:switch(h){case re:if(p.hard)s=!0;else{p.soft||(o.push(" "),u+=1);break}case V:if(l.length>0){i.push({ind:D,mode:h,doc:p},...l.reverse()),l.length=0;break}p.literal?D.root?(o.push(a,D.root.value),u=D.root.length):(o.push(a),u=0):(u-=pt(o),o.push(a+D.value),u=D.length);break}break;case le:i.push({ind:D,mode:h,doc:p.contents});break;case ee:break;default:throw new we(p)}i.length===0&&l.length>0&&(i.push(...l.reverse()),l.length=0)}let f=o.indexOf(ur);if(f!==-1){let D=o.indexOf(ur,f+1),h=o.slice(0,f).join(""),p=o.slice(f+1,D).join(""),d=o.slice(D+1).join("");return{formatted:h+p+d,cursorNodeStart:h.length,cursorNodeText:p}}return{formatted:o.join("")}}var dt=class extends Error{name="UnexpectedNodeError";constructor(r,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(r[n])}.`),this.node=r}},nu=dt;async function yl(e,r){if(e.lang==="yaml"){let t=e.value.trim(),n=t?await r(t,{parser:"yaml"}):"";return qe([e.startDelimiter,P,n,n?P:"",e.endDelimiter])}}var uu=yl;var Al=e=>String(e).split(/[/\\]/).pop();function iu(e,r){if(!r)return;let t=Al(r).toLowerCase();return e.find(n=>{var a,u;return((a=n.extensions)==null?void 0:a.some(i=>t.endsWith(i)))||((u=n.filenames)==null?void 0:u.some(i=>i.toLowerCase()===t))})}function xl(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t==null?void 0:t.includes(r))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${r}`))}function kl(e,r){let t=e.plugins.flatMap(a=>a.languages??[]),n=xl(t,r.language)??iu(t,r.physicalFile)??iu(t,r.file)??(r.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var au=kl;var wl=new Proxy(()=>{},{get:()=>wl});function Te(e){return e.position.start.offset}function Se(e){return e.position.end.offset}var ou="(?:[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u2ff0-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u3190-\\u4dbf\\u4e00-\\u9fff\\ua700-\\ua707\\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\\ud880-\\ud883\\ud885-\\ud887][\\udc00-\\udfff]|\\ud81b[\\udfe3]|\\ud82b[\\udff0-\\udff3\\udff5-\\udffb\\udffd-\\udffe]|\\ud82c[\\udc00-\\udd22\\udd32\\udd50-\\udd52\\udd55\\udd64-\\udd67]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\udedf\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf39\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d]|\\ud884[\\udc00-\\udf4a\\udf50-\\udfff]|\\ud888[\\udc00-\\udfaf])(?:[\\ufe00-\\ufe0f]|\\udb40[\\udd00-\\uddef])?",su=new RegExp("[\\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]",""),ir="[\\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\\u061d-\\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\\u1b7d-\\u1b7e\\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\\u2e52-\\u2e5d\\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[\\udead\\udf55-\\udf59\\udf86-\\udf89]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc8\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5a-\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udeb9\\udf3c-\\udf3e]|\\ud806[\\udc3b\\udd44-\\udd46\\udde2\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2\\udf00-\\udf09]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71\\udef7-\\udef8\\udf43-\\udf4f\\udfff]|\\ud809[\\udc70-\\udc74]|\\ud80b[\\udff1-\\udff2]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud81b[\\ude97-\\ude9a\\udfe2]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]";var mt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Or=new Set([...mt,"tableCell","paragraph","heading"]),ht=new RegExp(ir),_e="non-cjk",De="cj-letter",Ce="k-letter",ar="cjk-punctuation";function Pr(e){let r=[],t=e.split(/([\t\n ]+)/);for(let[a,u]of t.entries()){if(a%2===1){r.push({type:"whitespace",value:/\n/.test(u)?` -`:" "});continue}if((a===0||a===t.length-1)&&u==="")continue;let i=u.split(new RegExp(`(${ou})`));for(let[o,s]of i.entries())if(!((o===0||o===i.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:_e,hasLeadingPunctuation:ht.test(s[0]),hasTrailingPunctuation:ht.test(M(!1,s,-1))});continue}n(ht.test(s)?{type:"word",value:s,kind:ar,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:s,kind:su.test(s)?Ce:De,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(a){let u=M(!1,r,-1);(u==null?void 0:u.type)==="word"&&!i(_e,ar)&&![u.value,a.value].some(o=>/\u3000/.test(o))&&r.push({type:"whitespace",value:""}),r.push(a);function i(o,s){return u.kind===o&&a.kind===s||u.kind===s&&a.kind===o}}}function Re(e,r){let[,t,n,a]=r.slice(e.position.start.offset,e.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/);return{numberText:t,marker:n,leadingSpaces:a}}function cu(e,r){if(!e.ordered||e.children.length<2)return!1;let t=Number(Re(e.children[0],r.originalText).numberText),n=Number(Re(e.children[1],r.originalText).numberText);if(t===0&&e.children.length>2){let a=Number(Re(e.children[2],r.originalText).numberText);return n===1&&a===1}return n===1}function Ir(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(` -`)&&r.endsWith(` -`)?t.slice(0,-1):t}function be(e,r){return function t(n,a,u){let i={...r(n,a,u)};return i.children&&(i.children=i.children.map((o,s)=>t(o,s,[i,...u]))),i}(e,null,[])}function Ft(e){if((e==null?void 0:e.type)!=="link"||e.children.length!==1)return!1;let[r]=e.children;return Te(e)===Te(r)&&Se(e)===Se(r)}function Bl(e,r){let{node:t}=e;if(t.type==="code"&&t.lang!==null){let n=au(r,{language:t.lang});if(n)return async a=>{let u=r.__inJsTemplate?"~":"`",i=u.repeat(Math.max(3,wr(t.value,u)+1)),o={parser:n};t.lang==="ts"||t.lang==="typescript"?o.filepath="dummy.ts":t.lang==="tsx"&&(o.filepath="dummy.tsx");let s=await a(Ir(t,r.originalText),o);return qe([i,t.lang,t.meta?" "+t.meta:"",P,Ee(s),P,i])}}switch(t.type){case"front-matter":return n=>uu(t,n);case"import":case"export":return n=>n(t.value,{parser:"babel"});case"jsx":return n=>n(`<$>${t.value}`,{parser:"__js_expression",rootMarker:"mdx"})}return null}var lu=Bl;var ql=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function Tl(e){let r=e.match(ql);if(!r)return{content:e};let{startDelimiter:t,language:n,value:a="",endDelimiter:u}=r.groups,i=n.trim()||"yaml";if(t==="+++"&&(i="toml"),i!=="yaml"&&t!==u)return{content:e};let[o]=r;return{frontMatter:{type:"front-matter",lang:i,value:a,startDelimiter:t,endDelimiter:u,raw:o.replace(/\n$/,"")},content:N(!1,o,/[^\n]/g," ")+e.slice(o.length)}}var or=Tl;var fu=["format","prettier"];function gt(e){let r=`@(${fu.join("|")})`,t=new RegExp([``,`{\\s*\\/\\*\\s*${r}\\s*\\*\\/\\s*}`,``,`{\\s*\\/\\*\\s*${r}\\s*\\*\\/\\s*}`,``].join("|"),"m"),n=e.match(t);return(n==null?void 0:n.index)===0}var Du=e=>gt(or(e).content.trimStart()),pu=e=>{let r=or(e),t=``;return r.frontMatter?`${r.frontMatter.raw} +.*-->`].join("|"),"m"),n=e.match(t);return(n==null?void 0:n.index)===0}var iu=e=>ht(ar(e).content.trimStart()),au=e=>{let r=ar(e),t=``;return r.frontMatter?`${r.frontMatter.raw} ${t} ${r.content}`:`${t} -${r.content}`};var Sl=/^.$/su;function _l(e,r){return e=Ll(e,r),e=Pl(e),e=Nl(e,r),e=Rl(e,r),e=Il(e),e}function Ll(e,r){return be(e,t=>t.type!=="text"||t.value==="*"||t.value==="_"||!Sl.test(t.value)||t.position.end.offset-t.position.start.offset===t.value.length?t:{...t,value:r.originalText.slice(t.position.start.offset,t.position.end.offset)})}function Ol(e,r,t){return be(e,n=>{if(!n.children)return n;let a=n.children.reduce((u,i)=>{let o=M(!1,u,-1);return o&&r(o,i)?u.splice(-1,1,t(o,i)):u.push(i),u},[]);return{...n,children:a}})}function Pl(e){return Ol(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function Il(e){return be(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:a}=r;return n.type==="paragraph"&&(t===0&&(a=a.trimStart()),t===n.children.length-1&&(a=a.trimEnd())),{type:"sentence",position:r.position,children:Pr(a)}})}function Nl(e,r){return be(e,(t,n,a)=>{if(t.type==="code"){let u=/^\n?(?: {4,}|\t)/.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=u,u)for(let i=0;i{if(a.type==="list"&&a.children.length>0){for(let o=0;o1)return!0;let s=t(u);if(s===-1)return!1;if(a.children.length===1)return s%r.tabWidth===0;let l=t(i);return s!==l?!1:s%r.tabWidth===0?!0:Re(i,r.originalText).leadingSpaces.length>1}}var du=_l;var mu=Ie(kr(),1);function zl(e){return(e==null?void 0:e.type)==="front-matter"}var hu=zl;var Ul=new Set(["position","raw"]);function Fu(e,r,t){if((e.type==="front-matter"||e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=N(!1,e.value,` -`," ")),e.type==="wikiLink"&&(r.value=N(!1,e.value.trim(),/[\t\n]+/g," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,mu.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=N(!1,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=N(!1,e.title,/\\(?=["')])/g,"")),(t==null?void 0:t.type)==="root"&&t.children.length>0&&(t.children[0]===e||hu(t.children[0])&&t.children[1]===e)&&e.type==="html"&>(e.value))return null}Fu.ignoredProperties=Ul;var gu=Fu;var sr=null;function cr(e){if(sr!==null&&typeof sr.property){let r=sr;return sr=cr.prototype=null,r}return sr=cr.prototype=e??Object.create(null),new cr}var Ml=10;for(let e=0;e<=Ml;e++)cr();function vt(e){return cr(e)}function Yl(e,r="type"){vt(e);function t(n){let a=n[r],u=e[a];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return u}return t}var vu=Yl;var Vl={"front-matter":[],root:["children"],paragraph:["children"],sentence:["children"],word:[],whitespace:[],emphasis:["children"],strong:["children"],delete:["children"],inlineCode:[],wikiLink:[],link:["children"],image:[],blockquote:["children"],heading:["children"],code:[],html:[],list:["children"],thematicBreak:[],linkReference:["children"],imageReference:[],definition:[],footnote:["children"],footnoteReference:[],footnoteDefinition:["children"],table:["children"],tableCell:["children"],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:["children"],listItem:["children"],text:[]},Eu=Vl;var $l=vu(Eu),Cu=$l;var jl=new Set(["heading","tableCell","link","wikiLink"]),Gl=new Set(`$(\xA3\xA5\xB7'"\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFF04\uFF08\uFF3B\uFF5B\uFFE1\uFFE5[{\u2035\uFE34\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE4F\u3018\uFF5F\xAB`),Wl=new Set(`!%),.:;?]}\xA2\xB0\xB7'"\u2020\u2021\u203A\u2103\u2236\u3001\u3002\u3003\u3006\u3015\u3017\u301E\uFE5A\uFE5C\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFF5E\u2013\u2014\u2022\u3009\u300B\u300D\uFE30\uFE31\uFE32\uFE33\uFE50\uFE51\uFE52\uFE53\uFE54\uFE55\uFE56\uFE58\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE57\uFF5C\uFF64\u300F\u3011\u3019\u301F\uFF60\xBB\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\u2010\u30A0\u301C\uFF5E\u203C\u2047\u2048\u2049\u30FB\u3099\u309A`),bu=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function Hl({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;nr[""]}return e.usesCJSpaces}function Kl(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let a=t.kind,u=n.kind;return Au(a)&&Au(u)||a===Ce&&u===De||u===Ce&&a===De?!0:a===ar||u===ar||a===De&&u===De?!1:bu.has(n.value[0])||bu.has(M(!1,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:Hl(e)}function yu(e){return e===_e||e===De||e===Ce}function Au(e){return e===_e||e===Ce}function Jl(e,r,t,n,a){if(t!=="always"||e.hasAncestor(s=>jl.has(s.type)))return!1;if(n)return r!=="";if(r===" ")return!0;let{previous:u,next:i}=e;return!(r===""&&((u==null?void 0:u.kind)===Ce&&yu(i==null?void 0:i.kind)||(i==null?void 0:i.kind)===Ce&&yu(u==null?void 0:u.kind))||!a&&(i&&Wl.has(i.value[0])||u&&Gl.has(M(!1,u.value,-1))))}function Et(e,r,t,n){if(t==="preserve"&&r===` -`)return P;let a=r===" "||r===` -`&&Kl(e,n);return Jl(e,r,t,n,a)?a?_r:rr:a?" ":""}var Xl=new Set(["listItem","definition","footnoteDefinition"]);function Ql(e,r,t){var a,u,i;let{node:n}=e;if(af(e))return Pr(r.originalText.slice(n.position.start.offset,n.position.end.offset)).map(o=>o.type==="word"?o.value:Et(e,o.value,r.proseWrap,!0));switch(n.type){case"front-matter":return r.originalText.slice(n.position.start.offset,n.position.end.offset);case"root":return n.children.length===0?"":[Zn(tf(e,r,t)),P];case"paragraph":return Y(e,r,t,{postprocessor:Sr});case"sentence":return Y(e,r,t);case"word":{let o=N(!1,N(!1,n.value,"*","\\*"),new RegExp([`(^|${ir})(_+)`,`(_+)(${ir}|$)`].join("|"),"g"),(c,f,D,h,p)=>N(!1,D?`${f}${D}`:`${h}${p}`,"_","\\_")),s=(c,f,D)=>c.type==="sentence"&&D===0,l=(c,f,D)=>Ft(c.children[D-1]);return o!==n.value&&(e.match(void 0,s,l)||e.match(void 0,s,(c,f,D)=>c.type==="emphasis"&&D===0,l))&&(o=o.replace(/^(\\?[*_])+/,c=>N(!1,c,"\\",""))),o}case"whitespace":{let{next:o}=e,s=o&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(o.value)?"never":r.proseWrap;return Et(e,n.value,s)}case"emphasis":{let o;if(Ft(n.children[0]))o=r.originalText[n.position.start.offset];else{let{previous:s,next:l}=e;o=(s==null?void 0:s.type)==="sentence"&&((a=M(!1,s.children,-1))==null?void 0:a.type)==="word"&&!M(!1,s.children,-1).hasTrailingPunctuation||(l==null?void 0:l.type)==="sentence"&&((u=l.children[0])==null?void 0:u.type)==="word"&&!l.children[0].hasLeadingPunctuation||e.hasAncestor(f=>f.type==="emphasis")?"*":"_"}return[o,Y(e,r,t),o]}case"strong":return["**",Y(e,r,t),"**"];case"delete":return["~~",Y(e,r,t),"~~"];case"inlineCode":{let o=r.proseWrap==="preserve"?n.value:N(!1,n.value,` -`," "),s=Nn(o,"`"),l="`".repeat(s||1),c=o.startsWith("`")||o.endsWith("`")||/^[\n ]/.test(o)&&/[\n ]$/.test(o)&&/[^\n ]/.test(o)?" ":"";return[l,c,o,c,l]}case"wikiLink":{let o="";return r.proseWrap==="preserve"?o=n.value:o=N(!1,n.value,/[\t\n]+/g," "),["[[",o,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let o="mailto:";return["<",n.url.startsWith(o)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+o.length)!==o?n.url.slice(o.length):n.url,">"]}case"[":return["[",Y(e,r,t),"](",Ct(n.url,")"),Nr(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return["![",n.alt||"","](",Ct(n.url,")"),Nr(n.title,r),")"];case"blockquote":return["> ",ve("> ",Y(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",Y(e,r,t)];case"code":{if(n.isIndented){let l=" ".repeat(4);return ve(l,[l,Ee(n.value,P)])}let o=r.__inJsTemplate?"~":"`",s=o.repeat(Math.max(3,wr(n.value,o)+1));return[s,n.lang||"",n.meta?" "+n.meta:"",P,Ee(Ir(n,r.originalText),P),P,s]}case"html":{let{parent:o,isLast:s}=e,l=o.type==="root"&&s?n.value.trimEnd():n.value,c=/^$/s.test(l);return Ee(l,c?P:qe(tr))}case"list":{let o=ku(n,e.parent),s=cu(n,r);return Y(e,r,t,{processor(l){let c=D(),f=l.node;if(f.children.length===2&&f.children[1].type==="html"&&f.children[0].position.start.column!==f.children[1].position.start.column)return[c,xu(l,r,t,c)];return[c,ve(" ".repeat(c.length),xu(l,r,t,c))];function D(){let h=n.ordered?(l.isFirst?n.start:s?1:n.start+l.index)+(o%2===0?". ":") "):o%2===0?"- ":"* ";return n.isAligned||n.hasIndentedCodeblock?Zl(h,r):h}}})}case"thematicBreak":{let{ancestors:o}=e,s=o.findIndex(c=>c.type==="list");return s===-1?"---":ku(o[s],o[s+1])%2===0?"***":"---"}case"linkReference":return["[",Y(e,r,t),"]",n.referenceType==="full"?bt(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",bt(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let o=r.proseWrap==="always"?_r:" ";return Ze([bt(n),":",Qe([o,Ct(n.url),n.title===null?"":[o,Nr(n.title,r,!1)]])])}case"footnote":return["[^",Y(e,r,t),"]"];case"footnoteReference":return Tu(n);case"footnoteDefinition":{let o=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[Tu(n),": ",o?Y(e,r,t):Ze([ve(" ".repeat(4),Y(e,r,t,{processor:({isFirst:s})=>s?Ze([rr,t()]):t()})),((i=e.next)==null?void 0:i.type)==="footnoteDefinition"?rr:""])]}case"table":return rf(e,r,t);case"tableCell":return Y(e,r,t);case"break":return/\s/.test(r.originalText[n.position.start.offset])?[" ",qe(tr)]:["\\",P];case"liquidNode":return Ee(n.value,P);case"import":case"export":case"jsx":return n.value;case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",P,n.value?[Ee(n.value,P),P]:"","$$"];case"inlineMath":return r.originalText.slice(Te(n),Se(n));case"tableRow":case"listItem":case"text":default:throw new nu(n,"Markdown")}}function xu(e,r,t,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,Y(e,r,t,{processor({node:i,isFirst:o}){if(o&&i.type!=="list")return ve(" ".repeat(u.length),t());let s=" ".repeat(sf(r.tabWidth-n.length,0,3));return[s,ve(s,t())]}})]}function Zl(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let a=e.length%r.tabWidth;return a===0?0:r.tabWidth-a}}function ku(e,r){return ef(e,r,t=>t.ordered===e.ordered)}function ef(e,r,t){let n=-1;for(let a of r.children)if(a.type===e.type&&t(a)?n++:n=-1,a===e)return n}function rf(e,r,t){let{node:n}=e,a=[],u=e.map(()=>e.map(({index:f})=>{let D=tu(t(),r).formatted,h=Xe(D);return a[f]=Math.max(a[f]||3,h),{text:D,width:h}},"children"),"children"),i=s(!1);if(r.proseWrap!=="never")return[er,i];let o=s(!0);return[er,Ze(Wn(o,i))];function s(f){let D=[c(u[0],f),l(f)];return u.length>1&&D.push(nr(Ne,u.slice(1).map(h=>c(h,f)))),nr(Ne,D)}function l(f){return`| ${a.map((h,p)=>{let d=n.align[p],m=d==="center"||d==="left"?":":"-",F=d==="center"||d==="right"?":":"-",y=f?"-":"-".repeat(h-2);return`${m}${y}${F}`}).join(" | ")} |`}function c(f,D){return`| ${f.map(({text:p,width:d},m)=>{if(D)return p;let F=a[m]-d,y=n.align[m],v=0;y==="right"?v=F:y==="center"&&(v=Math.floor(F/2));let B=F-v;return`${" ".repeat(v)}${p}${" ".repeat(B)}`}).join(" | ")} |`}}function tf(e,r,t){let n=[],a=null,{children:u}=e.node;for(let[i,o]of u.entries())switch(yt(o)){case"start":a===null&&(a={index:i,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:i,offset:o.position.start.offset}}),a=null);break;default:break}return Y(e,r,t,{processor({index:i}){if(n.length>0){let o=n[0];if(i===o.start.index)return[wu(u[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),wu(u[o.end.index])];if(o.start.indexo,processor:u=()=>t()}=n,i=[];return e.each(()=>{let o=u(e);o!==!1&&(i.length>0&&nf(e)&&(i.push(P),(uf(e,r)||qu(e))&&i.push(P),qu(e)&&i.push(P)),i.push(o))},"children"),a(i)}function wu(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function yt(e){let r;if(e.type==="html")r=e.value.match(/^$/);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/))}return r?r[1]||"next":!1}function nf({node:e,parent:r}){let t=mt.has(e.type),n=e.type==="html"&&Or.has(r.type);return!t&&!n}function Bu(e,r){return e.type==="listItem"&&(e.spread||r.originalText.charAt(e.position.end.offset-1)===` -`)}function uf({node:e,previous:r,parent:t},n){if(Bu(r,n))return!0;let i=r.type===e.type&&Xl.has(e.type),o=t.type==="listItem"&&!Bu(t,n),s=yt(r)==="next",l=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,c=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(i||o||s||l||c)}function qu({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function af(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var of=(e,r)=>{for(let t of r)e=N(!1,e,t,encodeURIComponent(t));return e};function Ct(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>`\\${n}`).join("|")).test(e)?`<${of(e,"<>")}>`:e}function Nr(e,r,t=!0){if(!e)return"";if(t)return" "+Nr(e,r,!1);if(e=N(!1,e,/\\(?=["')])/g,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=Vn(e,r.singleQuote);return e=N(!1,e,"\\","\\\\"),e=N(!1,e,n,`\\${n}`),`${n}${e}${n}`}function sf(e,r,t){return et?t:e}function cf(e){return e.index>0&&yt(e.previous)==="next"}function bt(e){return`[${(0,Su.default)(e.label)}]`}function Tu(e){return`[^${e.label}]`}var lf={preprocess:du,print:Ql,embed:lu,massageAstNode:gu,hasPrettierIgnore:cf,insertPragma:pu,getVisitorKeys:Cu},_u=lf;var _n={};On(_n,{markdown:()=>km,mdx:()=>wm,remark:()=>km});var Hc=Ie(ws(),1),Kc=Ie(Ec(),1),Jc=Ie(Oc(),1),Xc=Ie(Ic(),1);var gm=/^import\s/,vm=/^export\s/,Nc="[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*|",Rc=/|/,Em=/^{\s*\/\*(.*)\*\/\s*}/,Cm=` +${r.content}`};var xl=new Set(["position","raw"]);function su(e,r,t){if((e.type==="front-matter"||e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=N(!1,e.value,` +`," ")),e.type==="wikiLink"&&(r.value=N(!1,e.value.trim(),/[\t\n]+/g," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,ou.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=N(!1,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=N(!1,e.title,/\\(?=["')])/g,"")),(t==null?void 0:t.type)==="root"&&t.children.length>0&&(t.children[0]===e||nu(t.children[0])&&t.children[1]===e)&&e.type==="html"&&ht(e.value))return null}su.ignoredProperties=xl;var cu=su;var lu=/(?:[\u02ea-\u02eb\u1100-\u11ff\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u303f\u3041-\u3096\u3099-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u3190-\u4dbf\u4e00-\u9fff\ua700-\ua707\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\ud880-\ud883\ud885-\ud887][\udc00-\udfff]|\ud81b[\udfe3]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd-\udffe]|\ud82c[\udc00-\udd22\udd32\udd50-\udd52\udd55\udd64-\udd67]|\ud83c[\ude00\ude50-\ude51]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf39\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a\udf50-\udfff]|\ud888[\udc00-\udfaf])(?:[\ufe00-\ufe0f]|\udb40[\udd00-\uddef])?/,fu=/[\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]/,Te=/[\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\u061d-\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\u1b7d-\u1b7e\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\u2e52-\u2e5d\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[\udead\udf55-\udf59\udf86-\udf89]|\ud804[\udc47-\udc4d\udcbb-\udcbc\udcbe-\udcc1\udd40-\udd43\udd74-\udd75\uddc5-\uddc8\uddcd\udddb\udddd-\udddf\ude38-\ude3d\udea9]|\ud805[\udc4b-\udc4f\udc5a-\udc5b\udc5d\udcc6\uddc1-\uddd7\ude41-\ude43\ude60-\ude6c\udeb9\udf3c-\udf3e]|\ud806[\udc3b\udd44-\udd46\udde2\ude3f-\ude46\ude9a-\ude9c\ude9e-\udea2\udf00-\udf09]|\ud807[\udc41-\udc45\udc70-\udc71\udef7-\udef8\udf43-\udf4f\udfff]|\ud809[\udc70-\udc74]|\ud80b[\udff1-\udff2]|\ud81a[\ude6e-\ude6f\udef5\udf37-\udf3b\udf44]|\ud81b[\ude97-\ude9a\udfe2]|\ud82f[\udc9f]|\ud836[\ude87-\ude8b]|\ud83a[\udd5e-\udd5f]/;async function kl(e,r){if(e.lang==="yaml"){let t=e.value.trim(),n=t?await r(t,{parser:"yaml"}):"";return qe([e.startDelimiter,L,n,n?L:"",e.endDelimiter])}}var Du=kl;var wl=e=>String(e).split(/[/\\]/).pop();function pu(e,r){if(!r)return;let t=wl(r).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(a=>a.toLowerCase()===t))??e.find(({extensions:n})=>n==null?void 0:n.some(a=>t.endsWith(a)))}function Bl(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t==null?void 0:t.includes(r))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${r}`))}function ql(e,r){let t=e.plugins.flatMap(a=>a.languages??[]),n=Bl(t,r.language)??pu(t,r.physicalFile)??pu(t,r.file)??(r.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var du=ql;var Tl=new Proxy(()=>{},{get:()=>Tl});function Se(e){return e.position.start.offset}function _e(e){return e.position.end.offset}var mt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Pr=new Set([...mt,"tableCell","paragraph","heading"]),Oe="non-cjk",De="cj-letter",Ce="k-letter",or="cjk-punctuation";function Lr(e){let r=[],t=e.split(/([\t\n ]+)/);for(let[a,u]of t.entries()){if(a%2===1){r.push({type:"whitespace",value:/\n/.test(u)?` +`:" "});continue}if((a===0||a===t.length-1)&&u==="")continue;let i=u.split(new RegExp(`(${lu.source})`));for(let[o,s]of i.entries())if(!((o===0||o===i.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:Oe,hasLeadingPunctuation:Te.test(s[0]),hasTrailingPunctuation:Te.test(M(!1,s,-1))});continue}n(Te.test(s)?{type:"word",value:s,kind:or,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:s,kind:fu.test(s)?Ce:De,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(a){let u=M(!1,r,-1);(u==null?void 0:u.type)==="word"&&!i(Oe,or)&&![u.value,a.value].some(o=>/\u3000/.test(o))&&r.push({type:"whitespace",value:""}),r.push(a);function i(o,s){return u.kind===o&&a.kind===s||u.kind===s&&a.kind===o}}}function Ue(e,r){let[,t,n,a]=r.slice(e.position.start.offset,e.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/);return{numberText:t,marker:n,leadingSpaces:a}}function hu(e,r){if(!e.ordered||e.children.length<2)return!1;let t=Number(Ue(e.children[0],r.originalText).numberText),n=Number(Ue(e.children[1],r.originalText).numberText);if(t===0&&e.children.length>2){let a=Number(Ue(e.children[2],r.originalText).numberText);return n===1&&a===1}return n===1}function Ir(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(` +`)&&r.endsWith(` +`)?t.slice(0,-1):t}function be(e,r){return function t(n,a,u){let i={...r(n,a,u)};return i.children&&(i.children=i.children.map((o,s)=>t(o,s,[i,...u]))),i}(e,null,[])}function Ft(e){if((e==null?void 0:e.type)!=="link"||e.children.length!==1)return!1;let[r]=e.children;return Se(e)===Se(r)&&_e(e)===_e(r)}function Sl(e,r){let{node:t}=e;if(t.type==="code"&&t.lang!==null){let n=du(r,{language:t.lang});if(n)return async a=>{let u=r.__inJsTemplate?"~":"`",i=u.repeat(Math.max(3,_r(t.value,u)+1)),o={parser:n};t.lang==="ts"||t.lang==="typescript"?o.filepath="dummy.ts":t.lang==="tsx"&&(o.filepath="dummy.tsx");let s=await a(Ir(t,r.originalText),o);return qe([i,t.lang,t.meta?" "+t.meta:"",L,Ee(s),L,i])}}switch(t.type){case"front-matter":return n=>Du(t,n);case"import":case"export":return n=>n(t.value,{parser:"babel"});case"jsx":return n=>n(`<$>${t.value}`,{parser:"__js_expression",rootMarker:"mdx"})}return null}var mu=Sl;var sr=null;function cr(e){if(sr!==null&&typeof sr.property){let r=sr;return sr=cr.prototype=null,r}return sr=cr.prototype=e??Object.create(null),new cr}var _l=10;for(let e=0;e<=_l;e++)cr();function gt(e){return cr(e)}function Ol(e,r="type"){gt(e);function t(n){let a=n[r],u=e[a];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return u}return t}var Fu=Ol;var Pl={"front-matter":[],root:["children"],paragraph:["children"],sentence:["children"],word:[],whitespace:[],emphasis:["children"],strong:["children"],delete:["children"],inlineCode:[],wikiLink:[],link:["children"],image:[],blockquote:["children"],heading:["children"],code:[],html:[],list:["children"],thematicBreak:[],linkReference:["children"],imageReference:[],definition:[],footnote:["children"],footnoteReference:[],footnoteDefinition:["children"],table:["children"],tableCell:["children"],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:["children"],listItem:["children"],text:[]},gu=Pl;var Ll=Fu(gu),vu=Ll;var Il=/^.$/su;function Nl(e,r){return e=Rl(e,r),e=zl(e),e=Yl(e,r),e=Vl(e,r),e=Ml(e),e}function Rl(e,r){return be(e,t=>t.type!=="text"||t.value==="*"||t.value==="_"||!Il.test(t.value)||t.position.end.offset-t.position.start.offset===t.value.length?t:{...t,value:r.originalText.slice(t.position.start.offset,t.position.end.offset)})}function Ul(e,r,t){return be(e,n=>{if(!n.children)return n;let a=n.children.reduce((u,i)=>{let o=M(!1,u,-1);return o&&r(o,i)?u.splice(-1,1,t(o,i)):u.push(i),u},[]);return{...n,children:a}})}function zl(e){return Ul(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function Ml(e){return be(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:a}=r;return n.type==="paragraph"&&(t===0&&(a=a.trimStart()),t===n.children.length-1&&(a=a.trimEnd())),{type:"sentence",position:r.position,children:Lr(a)}})}function Yl(e,r){return be(e,(t,n,a)=>{if(t.type==="code"){let u=/^\n?(?: {4,}|\t)/.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=u,u)for(let i=0;i{if(a.type==="list"&&a.children.length>0){for(let o=0;o1)return!0;let s=t(u);if(s===-1)return!1;if(a.children.length===1)return s%r.tabWidth===0;let l=t(i);return s!==l?!1:s%r.tabWidth===0?!0:Ue(i,r.originalText).leadingSpaces.length>1}}var Eu=Nl;var Gl=new Set(["heading","tableCell","link","wikiLink"]),$l=new Set(`$(\xA3\xA5\xB7'"\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFF04\uFF08\uFF3B\uFF5B\uFFE1\uFFE5[{\u2035\uFE34\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE4F\u3018\uFF5F\xAB`),jl=new Set(`!%),.:;?]}\xA2\xB0\xB7'"\u2020\u2021\u203A\u2103\u2236\u3001\u3002\u3003\u3006\u3015\u3017\u301E\uFE5A\uFE5C\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFF5E\u2013\u2014\u2022\u3009\u300B\u300D\uFE30\uFE31\uFE32\uFE33\uFE50\uFE51\uFE52\uFE53\uFE54\uFE55\uFE56\uFE58\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE57\uFF5C\uFF64\u300F\u3011\u3019\u301F\uFF60\xBB\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\u2010\u30A0\u301C\uFF5E\u203C\u2047\u2048\u2049\u30FB\u3099\u309A`),Cu=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function Wl({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;nr[""]}return e.usesCJSpaces}function Hl(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let a=t.kind,u=n.kind;return yu(a)&&yu(u)||a===Ce&&u===De||u===Ce&&a===De?!0:a===or||u===or||a===De&&u===De?!1:Cu.has(n.value[0])||Cu.has(M(!1,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:Wl(e)}function bu(e){return e===Oe||e===De||e===Ce}function yu(e){return e===Oe||e===Ce}function Kl(e,r,t,n,a){if(t!=="always"||e.hasAncestor(s=>Gl.has(s.type)))return!1;if(n)return r!=="";if(r===" ")return!0;let{previous:u,next:i}=e;return!(r===""&&((u==null?void 0:u.kind)===Ce&&bu(i==null?void 0:i.kind)||(i==null?void 0:i.kind)===Ce&&bu(u==null?void 0:u.kind))||!a&&(i&&jl.has(i.value[0])||u&&$l.has(M(!1,u.value,-1))))}function vt(e,r,t,n){if(t==="preserve"&&r===` +`)return L;let a=r===" "||r===` +`&&Hl(e,n);return Kl(e,r,t,n,a)?a?Tr:er:a?" ":""}var Xl=new Set(["listItem","definition","footnoteDefinition"]);function Jl(e,r,t){var a,u,i;let{node:n}=e;if(uf(e))return Lr(r.originalText.slice(n.position.start.offset,n.position.end.offset)).map(o=>o.type==="word"?o.value:vt(e,o.value,r.proseWrap,!0));switch(n.type){case"front-matter":return r.originalText.slice(n.position.start.offset,n.position.end.offset);case"root":return n.children.length===0?"":[Xn(rf(e,r,t)),L];case"paragraph":return Y(e,r,t,{postprocessor:qr});case"sentence":return Y(e,r,t);case"word":{let o=N(!1,N(!1,n.value,"*","\\*"),new RegExp([`(^|${Te.source})(_+)`,`(_+)(${Te.source}|$)`].join("|"),"g"),(c,f,D,h,p)=>N(!1,D?`${f}${D}`:`${h}${p}`,"_","\\_")),s=(c,f,D)=>c.type==="sentence"&&D===0,l=(c,f,D)=>Ft(c.children[D-1]);return o!==n.value&&(e.match(void 0,s,l)||e.match(void 0,s,(c,f,D)=>c.type==="emphasis"&&D===0,l))&&(o=o.replace(/^(\\?[*_])+/,c=>N(!1,c,"\\",""))),o}case"whitespace":{let{next:o}=e,s=o&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(o.value)?"never":r.proseWrap;return vt(e,n.value,s)}case"emphasis":{let o;if(Ft(n.children[0]))o=r.originalText[n.position.start.offset];else{let{previous:s,next:l}=e;o=(s==null?void 0:s.type)==="sentence"&&((a=M(!1,s.children,-1))==null?void 0:a.type)==="word"&&!M(!1,s.children,-1).hasTrailingPunctuation||(l==null?void 0:l.type)==="sentence"&&((u=l.children[0])==null?void 0:u.type)==="word"&&!l.children[0].hasLeadingPunctuation||e.hasAncestor(f=>f.type==="emphasis")?"*":"_"}return[o,Y(e,r,t),o]}case"strong":return["**",Y(e,r,t),"**"];case"delete":return["~~",Y(e,r,t),"~~"];case"inlineCode":{let o=r.proseWrap==="preserve"?n.value:N(!1,n.value,` +`," "),s=Zn(o,"`"),l="`".repeat(s||1),c=o.startsWith("`")||o.endsWith("`")||/^[\n ]/.test(o)&&/[\n ]$/.test(o)&&/[^\n ]/.test(o)?" ":"";return[l,c,o,c,l]}case"wikiLink":{let o="";return r.proseWrap==="preserve"?o=n.value:o=N(!1,n.value,/[\t\n]+/g," "),["[[",o,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let o="mailto:";return["<",n.url.startsWith(o)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+o.length)!==o?n.url.slice(o.length):n.url,">"]}case"[":return["[",Y(e,r,t),"](",Et(n.url,")"),Nr(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return["![",n.alt||"","](",Et(n.url,")"),Nr(n.title,r),")"];case"blockquote":return["> ",ve("> ",Y(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",Y(e,r,t)];case"code":{if(n.isIndented){let l=" ".repeat(4);return ve(l,[l,Ee(n.value,L)])}let o=r.__inJsTemplate?"~":"`",s=o.repeat(Math.max(3,_r(n.value,o)+1));return[s,n.lang||"",n.meta?" "+n.meta:"",L,Ee(Ir(n,r.originalText),L),L,s]}case"html":{let{parent:o,isLast:s}=e,l=o.type==="root"&&s?n.value.trimEnd():n.value,c=/^$/s.test(l);return Ee(l,c?L:qe(rr))}case"list":{let o=xu(n,e.parent),s=hu(n,r);return Y(e,r,t,{processor(l){let c=D(),f=l.node;if(f.children.length===2&&f.children[1].type==="html"&&f.children[0].position.start.column!==f.children[1].position.start.column)return[c,Au(l,r,t,c)];return[c,ve(" ".repeat(c.length),Au(l,r,t,c))];function D(){let h=n.ordered?(l.isFirst?n.start:s?1:n.start+l.index)+(o%2===0?". ":") "):o%2===0?"- ":"* ";return n.isAligned||n.hasIndentedCodeblock?Ql(h,r):h}}})}case"thematicBreak":{let{ancestors:o}=e,s=o.findIndex(c=>c.type==="list");return s===-1?"---":xu(o[s],o[s+1])%2===0?"***":"---"}case"linkReference":return["[",Y(e,r,t),"]",n.referenceType==="full"?Ct(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",Ct(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let o=r.proseWrap==="always"?Tr:" ";return Qe([Ct(n),":",Je([o,Et(n.url),n.title===null?"":[o,Nr(n.title,r,!1)]])])}case"footnote":return["[^",Y(e,r,t),"]"];case"footnoteReference":return qu(n);case"footnoteDefinition":{let o=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[qu(n),": ",o?Y(e,r,t):Qe([ve(" ".repeat(4),Y(e,r,t,{processor:({isFirst:s})=>s?Qe([er,t()]):t()})),((i=e.next)==null?void 0:i.type)==="footnoteDefinition"?er:""])]}case"table":return ef(e,r,t);case"tableCell":return Y(e,r,t);case"break":return/\s/.test(r.originalText[n.position.start.offset])?[" ",qe(rr)]:["\\",L];case"liquidNode":return Ee(n.value,L);case"import":case"export":case"jsx":return n.value;case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",L,n.value?[Ee(n.value,L),L]:"","$$"];case"inlineMath":return r.originalText.slice(Se(n),_e(n));case"tableRow":case"listItem":case"text":default:throw new tu(n,"Markdown")}}function Au(e,r,t,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,Y(e,r,t,{processor({node:i,isFirst:o}){if(o&&i.type!=="list")return ve(" ".repeat(u.length),t());let s=" ".repeat(of(r.tabWidth-n.length,0,3));return[s,ve(s,t())]}})]}function Ql(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let a=e.length%r.tabWidth;return a===0?0:r.tabWidth-a}}function xu(e,r){return Zl(e,r,t=>t.ordered===e.ordered)}function Zl(e,r,t){let n=-1;for(let a of r.children)if(a.type===e.type&&t(a)?n++:n=-1,a===e)return n}function ef(e,r,t){let{node:n}=e,a=[],u=e.map(()=>e.map(({index:f})=>{let D=Qn(t(),r).formatted,h=nr(D);return a[f]=Math.max(a[f]||3,h),{text:D,width:h}},"children"),"children"),i=s(!1);if(r.proseWrap!=="never")return[Ze,i];let o=s(!0);return[Ze,Qe(Un(o,i))];function s(f){let D=[c(u[0],f),l(f)];return u.length>1&&D.push(tr(Re,u.slice(1).map(h=>c(h,f)))),tr(Re,D)}function l(f){return`| ${a.map((h,p)=>{let d=n.align[p],m=d==="center"||d==="left"?":":"-",F=d==="center"||d==="right"?":":"-",y=f?"-":"-".repeat(h-2);return`${m}${y}${F}`}).join(" | ")} |`}function c(f,D){return`| ${f.map(({text:p,width:d},m)=>{if(D)return p;let F=a[m]-d,y=n.align[m],v=0;y==="right"?v=F:y==="center"&&(v=Math.floor(F/2));let B=F-v;return`${" ".repeat(v)}${p}${" ".repeat(B)}`}).join(" | ")} |`}}function rf(e,r,t){let n=[],a=null,{children:u}=e.node;for(let[i,o]of u.entries())switch(bt(o)){case"start":a===null&&(a={index:i,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:i,offset:o.position.start.offset}}),a=null);break;default:break}return Y(e,r,t,{processor({index:i}){if(n.length>0){let o=n[0];if(i===o.start.index)return[ku(u[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),ku(u[o.end.index])];if(o.start.indexo,processor:u=()=>t()}=n,i=[];return e.each(()=>{let o=u(e);o!==!1&&(i.length>0&&tf(e)&&(i.push(L),(nf(e,r)||Bu(e))&&i.push(L),Bu(e)&&i.push(L)),i.push(o))},"children"),a(i)}function ku(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function bt(e){let r;if(e.type==="html")r=e.value.match(/^$/);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/))}return r?r[1]||"next":!1}function tf({node:e,parent:r}){let t=mt.has(e.type),n=e.type==="html"&&Pr.has(r.type);return!t&&!n}function wu(e,r){return e.type==="listItem"&&(e.spread||r.originalText.charAt(e.position.end.offset-1)===` +`)}function nf({node:e,previous:r,parent:t},n){if(wu(r,n))return!0;let i=r.type===e.type&&Xl.has(e.type),o=t.type==="listItem"&&!wu(t,n),s=bt(r)==="next",l=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,c=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(i||o||s||l||c)}function Bu({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function uf(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var af=(e,r)=>{for(let t of r)e=N(!1,e,t,encodeURIComponent(t));return e};function Et(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>`\\${n}`).join("|")).test(e)?`<${af(e,"<>")}>`:e}function Nr(e,r,t=!0){if(!e)return"";if(t)return" "+Nr(e,r,!1);if(e=N(!1,e,/\\(?=["')])/g,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=ru(e,r.singleQuote);return e=N(!1,e,"\\","\\\\"),e=N(!1,e,n,`\\${n}`),`${n}${e}${n}`}function of(e,r,t){return et?t:e}function sf(e){return e.index>0&&bt(e.previous)==="next"}function Ct(e){return`[${(0,Tu.default)(e.label)}]`}function qu(e){return`[^${e.label}]`}var cf={preprocess:Eu,print:Jl,embed:mu,massageAstNode:cu,hasPrettierIgnore:sf,insertPragma:au,getVisitorKeys:vu},Su=cf;var _u=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}];var yt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var lf={proseWrap:yt.proseWrap,singleQuote:yt.singleQuote},Ou=lf;var _n={};On(_n,{markdown:()=>km,mdx:()=>wm,remark:()=>km});var Kc=Ne(Lu(),1),Xc=Ne(Ku(),1),Jc=Ne(Gs(),1),Qc=Ne(Nc(),1);var gm=/^import\s/,vm=/^export\s/,Rc="[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*|",Uc=/|/,Em=/^{\s*\/\*(.*)\*\/\s*}/,Cm=` -`,zc=e=>gm.test(e),Sn=e=>vm.test(e),Uc=(e,r)=>{let t=r.indexOf(Cm),n=r.slice(0,t);if(Sn(n)||zc(n))return e(n)({type:Sn(n)?"export":"import",value:n})},Mc=(e,r)=>{let t=Em.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};Uc.locator=e=>Sn(e)||zc(e)?-1:1;Mc.locator=(e,r)=>e.indexOf("{",r);var Yc=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:a}=e.prototype;r.esSyntax=Uc,n.esComment=Mc,t.splice(t.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};function bm(){return e=>be(e,(r,t,[n])=>r.type!=="html"||Rc.test(r.value)||Or.has(n.type)?r:{...r,type:"jsx"})}var Vc=bm;var ym=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let a=or(n);if(a.frontMatter)return t(a.frontMatter.raw)(a.frontMatter)}r.onlyAtStart=!0},$c=ym;var Am=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,a){let u=a.match(/^({%.*?%}|{{.*?}})/s);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}t.locator=function(n,a){return n.indexOf("{",a)}},jc=Am;var xm=function(){let e="wikiLink",r=/^\[\[(?.+?)]]/s,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=a;function a(u,i){let o=r.exec(i);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}a.locator=function(u,i){return u.indexOf("[",i)}},Gc=xm;function Qc({isMDX:e}){return r=>{let t=(0,Kc.default)().use(Hc.default,{commonmark:!0,...e&&{blocks:[Nc]}}).use(Xc.default).use($c).use(Jc.default).use(e?Yc:Wc).use(jc).use(e?Vc:Wc).use(Gc);return t.run(t.parse(r))}}function Wc(){}var Zc={astFormat:"mdast",hasPragma:Du,locStart:Te,locEnd:Se},km={...Zc,parse:Qc({isMDX:!1})},wm={...Zc,parse:Qc({isMDX:!0})};var el=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}];var Ln={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Bm={proseWrap:Ln.proseWrap,singleQuote:Ln.singleQuote},rl=Bm;var qm={mdast:_u};return ol(Tm);}); \ No newline at end of file +`,zc=e=>gm.test(e),Sn=e=>vm.test(e),Mc=(e,r)=>{let t=r.indexOf(Cm),n=r.slice(0,t);if(Sn(n)||zc(n))return e(n)({type:Sn(n)?"export":"import",value:n})},Yc=(e,r)=>{let t=Em.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};Mc.locator=e=>Sn(e)||zc(e)?-1:1;Yc.locator=(e,r)=>e.indexOf("{",r);var Vc=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:a}=e.prototype;r.esSyntax=Mc,n.esComment=Yc,t.splice(t.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};var bm=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let a=ar(n);if(a.frontMatter)return t(a.frontMatter.raw)(a.frontMatter)}r.onlyAtStart=!0},Gc=bm;function ym(){return e=>be(e,(r,t,[n])=>r.type!=="html"||Uc.test(r.value)||Pr.has(n.type)?r:{...r,type:"jsx"})}var $c=ym;var Am=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,a){let u=a.match(/^({%.*?%}|{{.*?}})/s);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}t.locator=function(n,a){return n.indexOf("{",a)}},jc=Am;var xm=function(){let e="wikiLink",r=/^\[\[(?.+?)]]/s,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=a;function a(u,i){let o=r.exec(i);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}a.locator=function(u,i){return u.indexOf("[",i)}},Wc=xm;function Zc({isMDX:e}){return r=>{let t=(0,Qc.default)().use(Jc.default,{commonmark:!0,...e&&{blocks:[Rc]}}).use(Kc.default).use(Gc).use(Xc.default).use(e?Vc:Hc).use(jc).use(e?$c:Hc).use(Wc);return t.run(t.parse(r))}}function Hc(){}var el={astFormat:"mdast",hasPragma:iu,locStart:Se,locEnd:_e},km={...el,parse:Zc({isMDX:!1})},wm={...el,parse:Zc({isMDX:!0})};var Bm={mdast:Su};return al(qm);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/markdown.mjs b/node_modules/prettier/plugins/markdown.mjs index c34f957..2a6bfcd 100644 --- a/node_modules/prettier/plugins/markdown.mjs +++ b/node_modules/prettier/plugins/markdown.mjs @@ -1,59 +1,59 @@ -var tl=Object.create;var lt=Object.defineProperty;var nl=Object.getOwnPropertyDescriptor;var ul=Object.getOwnPropertyNames;var il=Object.getPrototypeOf,al=Object.prototype.hasOwnProperty;var C=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Pn=(e,r)=>{for(var t in r)lt(e,t,{get:r[t],enumerable:!0})},ol=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of ul(r))!al.call(e,a)&&a!==t&<(e,a,{get:()=>r[a],enumerable:!(n=nl(r,a))||n.enumerable});return e};var Ie=(e,r,t)=>(t=e!=null?tl(il(e)):{},ol(r||!e||!e.__esModule?lt(t,"default",{value:e,enumerable:!0}):t,e));var xr=C((Lm,In)=>{"use strict";In.exports=ll;function ll(e){return String(e).replace(/\s+/g," ")}});var Le=C((Ug,Lu)=>{Lu.exports=Df;var ff=Object.prototype.hasOwnProperty;function Df(){for(var e={},r=0;r{typeof Object.create=="function"?At.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:At.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var Nu=C((Yg,Iu)=>{"use strict";var pf=Le(),Pu=Ou();Iu.exports=df;function df(e){var r,t,n;Pu(u,e),Pu(a,u),r=u.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():pf(n));return u;function a(i){return e.apply(this,i)}function u(){return this instanceof u?e.apply(this,arguments):new a(arguments)}}});var zu=C((Vg,Ru)=>{"use strict";Ru.exports=hf;function hf(e,r,t){return n;function n(){var a=t||this,u=a[e];return a[e]=!r,i;function i(){a[e]=u}}}});var Mu=C(($g,Uu)=>{"use strict";Uu.exports=mf;function mf(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:a,toPosition:a,toOffset:u};function a(i){var o=-1;if(i>-1&&ii)return{line:o+1,column:i-(t[o-1]||0)+1,offset:i}}return{}}function u(i){var o=i&&i.line,s=i&&i.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l{"use strict";Yu.exports=Ff;var xt="\\";function Ff(e,r){return t;function t(n){for(var a=0,u=n.indexOf(xt),i=e[r],o=[],s;u!==-1;)o.push(n.slice(a,u)),a=u+1,s=n.charAt(a),(!s||i.indexOf(s)===-1)&&o.push(xt),u=n.indexOf(xt,a+1);return o.push(n.slice(a)),o.join("")}}});var $u=C((Gg,gf)=>{gf.exports={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"}});var ju=C((Wg,vf)=>{vf.exports={"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"}});var Oe=C((Hg,Gu)=>{"use strict";Gu.exports=Ef;function Ef(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var Hu=C((Kg,Wu)=>{"use strict";Wu.exports=Cf;function Cf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var ze=C((Jg,Ku)=>{"use strict";Ku.exports=bf;function bf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var Xu=C((Xg,Ju)=>{"use strict";var yf=ze(),Af=Oe();Ju.exports=xf;function xf(e){return yf(e)||Af(e)}});var Qu=C((Qg,kf)=>{kf.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",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:"\u{1D505}",Bopf:"\u{1D539}",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:"\u{1D49E}",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:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",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:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ET:"\xD0",ETH:"\xD0",Eacut:"\xC9",Eacute:"\xC9",Ecaron:"\u011A",Ecir:"\xCA",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrav:"\xC8",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",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:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",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:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",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:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Ium:"\xCF",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",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:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",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:` -`,Nfr:"\u{1D511}",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:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",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:"\u{1D513}",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:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",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:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",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:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",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:"\u{1D4B0}",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:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacut:"\xDD",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",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:"\u{1D51E}",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:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",arin:"\xE5",aring:"\xE5",ascr:"\u{1D4B6}",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:"\u{1D51F}",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:"\u{1D553}",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:"\u{1D4B7}",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:"\u{1D520}",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:"\u{1D554}",coprod:"\u2210",cop:"\xA9",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",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:"\u{1D521}",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:"\u{1D555}",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:"\u{1D4B9}",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:"\u{1D522}",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:"\u{1D556}",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:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",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:"\u{1D4BB}",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:"\u{1D524}",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:"\u{1D558}",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:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",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:"\u{1D526}",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:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iques:"\xBF",iquest:"\xBF",iscr:"\u{1D4BE}",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:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",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:"\u{1D529}",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:"\u{1D55D}",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:"\u{1D4C1}",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:"\u{1D52A}",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:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",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:"\u{1D52B}",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:"\u{1D55F}",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:"\u{1D4C3}",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:"\u{1D52C}",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:"\u{1D560}",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:"\u{1D52D}",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:"\u{1D561}",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:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",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:"\u{1D52F}",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:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",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:"\u{1D530}",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:"\u{1D564}",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:"\u{1D4C8}",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:"\u{1D531}",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:"\u{1D565}",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:"\u{1D4C9}",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:"\u{1D532}",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:"\u{1D566}",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:"\u{1D4CA}",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:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",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:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",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:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yum:"\xFF",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});var ri=C((Zg,ei)=>{"use strict";var Zu=Qu();ei.exports=Bf;var wf={}.hasOwnProperty;function Bf(e){return wf.call(Zu,e)?Zu[e]:!1}});var lr=C((ev,di)=>{"use strict";var ti=$u(),ni=ju(),qf=Oe(),Tf=Hu(),oi=Xu(),Sf=ri();di.exports=$f;var _f={}.hasOwnProperty,Ue=String.fromCharCode,Lf=Function.prototype,ui={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},Of=9,ii=10,Pf=12,If=32,ai=38,Nf=59,Rf=60,zf=61,Uf=35,Mf=88,Yf=120,Vf=65533,Me="named",wt="hexadecimal",Bt="decimal",qt={};qt[wt]=16;qt[Bt]=10;var Nr={};Nr[Me]=oi;Nr[Bt]=qf;Nr[wt]=Tf;var si=1,ci=2,li=3,fi=4,Di=5,kt=6,pi=7,ye={};ye[si]="Named character references must be terminated by a semicolon";ye[ci]="Numeric character references must be terminated by a semicolon";ye[li]="Named character references cannot be empty";ye[fi]="Numeric character references cannot be empty";ye[Di]="Named character references must be known";ye[kt]="Numeric character references cannot be disallowed";ye[pi]="Numeric character references cannot be outside the permissible Unicode range";function $f(e,r){var t={},n,a;r||(r={});for(a in ui)n=r[a],t[a]=n??ui[a];return(t.position.indent||t.position.start)&&(t.indent=t.position.indent||[],t.position=t.position.start),jf(e,t)}function jf(e,r){var t=r.additional,n=r.nonTerminated,a=r.text,u=r.reference,i=r.warning,o=r.textContext,s=r.referenceContext,l=r.warningContext,c=r.position,f=r.indent||[],D=e.length,h=0,p=-1,d=c.column||1,m=c.line||1,F="",y=[],v,B,b,g,A,x,E,k,w,q,T,R,L,_,S,O,ke,$,I;for(typeof t=="string"&&(t=t.charCodeAt(0)),O=J(),k=i?K:Lf,h--,D++;++h65535&&(x-=65536,q+=Ue(x>>>10|55296),x=56320|x&1023),x=q+Ue(x))):_!==Me&&k(fi,$)),x?(me(),O=J(),h=I-1,d+=I-L+1,y.push(x),ke=J(),ke.offset++,u&&u.call(s,x,{start:O,end:ke},e.slice(L-1,I)),O=ke):(g=e.slice(L-1,I),F+=g,d+=g.length,h=I-1)}else A===10&&(m++,p++,d=0),A===A?(F+=Ue(A),d++):me();return y.join("");function J(){return{line:m,column:d,offset:h+(c.offset||0)}}function K(Fe,U){var ct=J();ct.column+=U,ct.offset+=U,i.call(l,ye[Fe],ct,Fe)}function me(){F&&(y.push(F),a&&a.call(o,F,{start:O,end:J()}),F="")}}function Gf(e){return e>=55296&&e<=57343||e>1114111}function Wf(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}});var Fi=C((rv,mi)=>{"use strict";var Hf=Le(),hi=lr();mi.exports=Kf;function Kf(e){return t.raw=n,t;function r(u){for(var i=e.offset,o=u.line,s=[];++o&&o in i;)s.push((i[o]||0)+1);return{start:u,indent:s}}function t(u,i,o){hi(u,{position:r(i),warning:a,text:o,reference:o,textContext:e,referenceContext:e})}function n(u,i,o){return hi(u,Hf(o,{position:r(i),warning:a}))}function a(u,i,o){o!==3&&e.file.message(u,i)}}});var Ei=C((tv,vi)=>{"use strict";vi.exports=Jf;function Jf(e){return r;function r(t,n){var a=this,u=a.offset,i=[],o=a[e+"Methods"],s=a[e+"Tokenizers"],l=n.line,c=n.column,f,D,h,p,d,m;if(!t)return i;for(x.now=v,x.file=a.file,F("");t;){for(f=-1,D=o.length,d=!1;++f{"use strict";bi.exports=Rr;var Tt=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],St=Tt.concat(["~","|"]),Ci=St.concat([` -`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);Rr.default=Tt;Rr.gfm=St;Rr.commonmark=Ci;function Rr(e){var r=e||{};return r.commonmark?Ci:r.gfm?St:Tt}});var xi=C((uv,Ai)=>{"use strict";Ai.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","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"]});var _t=C((iv,ki)=>{"use strict";ki.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:xi()}});var Bi=C((av,wi)=>{"use strict";var Zf=Le(),eD=yi(),rD=_t();wi.exports=tD;function tD(e){var r=this,t=r.options,n,a;if(e==null)e={};else if(typeof e=="object")e=Zf(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in rD){if(a=e[n],a==null&&(a=t[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return r.options=e,r.escape=eD(e),r}});var Si=C((ov,Ti)=>{"use strict";Ti.exports=qi;function qi(e){if(e==null)return aD;if(typeof e=="string")return iD(e);if(typeof e=="object")return"length"in e?uD(e):nD(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function nD(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function uD(e){for(var r=[],t=-1;++t{_i.exports=oD;function oD(e){return e}});var Ni=C((cv,Ii)=>{"use strict";Ii.exports=zr;var sD=Si(),cD=Li(),Oi=!0,Pi="skip",Lt=!1;zr.CONTINUE=Oi;zr.SKIP=Pi;zr.EXIT=Lt;function zr(e,r,t,n){var a,u;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),u=sD(r),a=n?-1:1,i(e,null,[])();function i(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,D.displayName="node ("+cD(c.type+(f?"<"+f+">":""))+")"),D;function D(){var h=l.concat(o),p=[],d,m;if((!r||u(o,s,l[l.length-1]||null))&&(p=lD(t(o,l)),p[0]===Lt))return p;if(o.children&&p[0]!==Pi)for(m=(n?o.children.length:-1)+a;m>-1&&m{"use strict";Ri.exports=Mr;var Ur=Ni(),fD=Ur.CONTINUE,DD=Ur.SKIP,pD=Ur.EXIT;Mr.CONTINUE=fD;Mr.SKIP=DD;Mr.EXIT=pD;function Mr(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),Ur(e,r,a,n);function a(u,i){var o=i[i.length-1],s=o?o.children.indexOf(u):null;return t(u,s,o)}}});var Mi=C((fv,Ui)=>{"use strict";var dD=zi();Ui.exports=hD;function hD(e,r){return dD(e,r?mD:FD),e}function mD(e){delete e.position}function FD(e){e.position=void 0}});var $i=C((Dv,Vi)=>{"use strict";var Yi=Le(),gD=Mi();Vi.exports=CD;var vD=` -`,ED=/\r\n|\r/g;function CD(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=Yi(t),a;return r=r.replace(ED,vD),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||Yi(t)}},e.options.position||gD(a,!0),a}});var Gi=C((pv,ji)=>{"use strict";var bD=/^[ \t]*(\n|$)/;ji.exports=yD;function yD(e,r,t){for(var n,a="",u=0,i=r.length;u{"use strict";var pe="",Ot;Wi.exports=AD;function AD(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Ot!==e||typeof Ot>"u")Ot=e,pe="";else if(pe.length>=t)return pe.substr(0,t);for(;t>pe.length&&r>1;)r&1&&(pe+=e),r>>=1,e+=e;return pe+=e,pe=pe.substr(0,t),pe}});var Pt=C((hv,Hi)=>{"use strict";Hi.exports=xD;function xD(e){return String(e).replace(/\n+$/,"")}});var Xi=C((mv,Ji)=>{"use strict";var kD=Yr(),wD=Pt();Ji.exports=TD;var It=` -`,Ki=" ",Nt=" ",BD=4,qD=kD(Nt,BD);function TD(e,r,t){for(var n=-1,a=r.length,u="",i="",o="",s="",l,c,f;++n{"use strict";Zi.exports=OD;var Vr=` -`,fr=" ",Ye=" ",SD="~",Qi="`",_D=3,LD=4;function OD(e,r,t){var n=this,a=n.options.gfm,u=r.length+1,i=0,o="",s,l,c,f,D,h,p,d,m,F,y,v,B;if(a){for(;i=LD)){for(p="";i{Ve=ra.exports=PD;function PD(e){return e.trim?e.trim():Ve.right(Ve.left(e))}Ve.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};Ve.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var $r=C((gv,ta)=>{"use strict";ta.exports=ID;function ID(e,r,t,n){for(var a=e.length,u=-1,i,o;++u{"use strict";var ND=Pe(),RD=$r();ia.exports=zD;var Rt=` -`,na=" ",zt=" ",ua=">";function zD(e,r,t){for(var n=this,a=n.offset,u=n.blockTokenizers,i=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],D=[],h,p=0,d,m,F,y,v,B,b,g;p{"use strict";sa.exports=MD;var oa=` -`,Dr=" ",pr=" ",dr="#",UD=6;function MD(e,r,t){for(var n=this,a=n.options.pedantic,u=r.length+1,i=-1,o=e.now(),s="",l="",c,f,D;++iUD)&&!(!D||!a&&r.charAt(i+1)===dr)){for(u=r.length+1,f="";++i{"use strict";fa.exports=HD;var YD=" ",VD=` -`,la=" ",$D="*",jD="-",GD="_",WD=3;function HD(e,r,t){for(var n=-1,a=r.length+1,u="",i,o,s,l;++n=WD&&(!i||i===VD)?(u+=l,t?!0:e(u)({type:"thematicBreak"})):void 0}});var Ut=C((bv,da)=>{"use strict";da.exports=QD;var pa=" ",KD=" ",JD=1,XD=4;function QD(e){for(var r=0,t=0,n=e.charAt(r),a={},u,i=0;n===pa||n===KD;){for(u=n===pa?XD:JD,t+=u,u>1&&(t=Math.floor(t/u)*u);i{"use strict";var ZD=Pe(),ep=Yr(),rp=Ut();ma.exports=up;var ha=` -`,tp=" ",np="!";function up(e,r){var t=e.split(ha),n=t.length+1,a=1/0,u=[],i,o,s;for(t.unshift(ep(tp,r)+np);n--;)if(o=rp(t[n]),u[n]=o.stops,ZD(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent{"use strict";var ip=Pe(),ap=Yr(),ga=Oe(),op=Ut(),sp=Fa(),cp=$r();ba.exports=Fp;var Mt="*",lp="_",va="+",Yt="-",Ea=".",de=" ",te=` -`,jr=" ",Ca=")",fp="x",Ae=4,Dp=/\n\n(?!\s*$)/,pp=/^\[([ X\tx])][ \t]/,dp=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,hp=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,mp=/^( {1,4}|\t)?/gm;function Fp(e,r,t){for(var n=this,a=n.options.commonmark,u=n.options.pedantic,i=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E,k,w,q,T,R=!1,L,_,S,O;s=w.indent&&(O=!0),p=r.charAt(s),v=null,!O){if(p===Mt||p===va||p===Yt)v=p,s++,f++;else{for(D="";s=w.indent||f>Ae),y=!1,s=F;if(b=r.slice(F,m),B=F===s?b:r.slice(s,m),(v===Mt||v===lp||v===Yt)&&i.thematicBreak.call(n,e,b,!0))break;if(g=A,A=!y&&!ip(B).length,O&&w)w.value=w.value.concat(k,b),E=E.concat(k,b),k=[];else if(y)k.length!==0&&(R=!0,w.value.push(""),w.trail=k.concat()),w={value:[b],indent:f,trail:[]},x.push(w),E=E.concat(k,b),k=[];else if(A){if(g&&!a)break;k.push(b)}else{if(g||cp(o,i,n,[e,b,!0]))break;w.value=w.value.concat(k,b),E=E.concat(k,b),k=[]}s=m+1}for(L=e(E.join(te)).reset({type:"list",ordered:h,start:c,spread:R,children:[]}),q=n.enterList(),T=n.enterBlock(),s=-1,l=x.length;++s{"use strict";ka.exports=kp;var Vt=` -`,Cp=" ",Aa=" ",xa="=",bp="-",yp=3,Ap=1,xp=2;function kp(e,r,t){for(var n=this,a=e.now(),u=r.length,i=-1,o="",s,l,c,f,D;++i=yp){i--;break}o+=c}for(s="",l="";++i{"use strict";var wp="[a-zA-Z_:][a-zA-Z0-9:._-]*",Bp="[^\"'=<>`\\u0000-\\u0020]+",qp="'[^']*'",Tp='"[^"]*"',Sp="(?:"+Bp+"|"+qp+"|"+Tp+")",_p="(?:\\s+"+wp+"(?:\\s*=\\s*"+Sp+")?)",Ba="<[A-Za-z][A-Za-z0-9\\-]*"+_p+"*\\s*\\/?>",qa="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Lp="|",Op="<[?].*?[?]>",Pp="]*>",Ip="";$t.openCloseTag=new RegExp("^(?:"+Ba+"|"+qa+")");$t.tag=new RegExp("^(?:"+Ba+"|"+qa+"|"+Lp+"|"+Op+"|"+Pp+"|"+Ip+")")});var La=C((wv,_a)=>{"use strict";var Np=jt().openCloseTag;_a.exports=Qp;var Rp=" ",zp=" ",Ta=` -`,Up="<",Mp=/^<(script|pre|style)(?=(\s|>|$))/i,Yp=/<\/(script|pre|style)>/i,Vp=/^/,jp=/^<\?/,Gp=/\?>/,Wp=/^/,Kp=/^/,Sa=/^$/,Xp=new RegExp(Np.source+"\\s*$");function Qp(e,r,t){for(var n=this,a=n.options.blocks.join("|"),u=new RegExp("^|$))","i"),i=r.length,o=0,s,l,c,f,D,h,p,d=[[Mp,Yp,!0],[Vp,$p,!0],[jp,Gp,!0],[Wp,Hp,!0],[Kp,Jp,!0],[u,Sa,!0],[Xp,Sa,!1]];o{"use strict";Oa.exports=rd;var Zp=String.fromCharCode,ed=/\s/;function rd(e){return ed.test(typeof e=="number"?Zp(e):e.charAt(0))}});var Gt=C((qv,Pa)=>{"use strict";var td=xr();Pa.exports=nd;function nd(e){return td(e).toLowerCase()}});var Ya=C((Tv,Ma)=>{"use strict";var ud=ne(),id=Gt();Ma.exports=cd;var Ia='"',Na="'",ad="\\",$e=` -`,Gr=" ",Wr=" ",Ht="[",hr="]",od="(",sd=")",Ra=":",za="<",Ua=">";function cd(e,r,t){for(var n=this,a=n.options.commonmark,u=0,i=r.length,o="",s,l,c,f,D,h,p,d;u{"use strict";var fd=ne();$a.exports=Cd;var Dd=" ",Hr=` -`,pd=" ",dd="-",hd=":",md="\\",Kt="|",Fd=1,gd=2,Va="left",vd="center",Ed="right";function Cd(e,r,t){var n=this,a,u,i,o,s,l,c,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E;if(n.options.gfm){for(a=0,v=0,l=r.length+1,c=[];aA){if(v1&&(D?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),F=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(d,F)},s)),e(f+D),f="",d=""):(f&&(d+=f,f=""),d+=D,D===md&&a!==l-2&&(d+=B.charAt(a+1),a++)),m=!1,a++}y||e(Hr+u)}return g}}}});var Ha=C((_v,Wa)=>{"use strict";var bd=Pe(),yd=Pt(),Ad=$r();Wa.exports=wd;var xd=" ",mr=` -`,kd=" ",Ga=4;function wd(e,r,t){for(var n=this,a=n.options,u=a.commonmark,i=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(mr),l=r.length,c,f,D,h,p;s=Ga&&D!==mr){s=r.indexOf(mr,s+1);continue}}if(f=r.slice(s+1),Ad(o,i,n,[e,f,!0]))break;if(c=s,s=r.indexOf(mr,s+1),s!==-1&&bd(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(p=e.now(),f=yd(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,p)}))}});var Ja=C((Lv,Ka)=>{"use strict";Ka.exports=Bd;function Bd(e,r){return e.indexOf("\\",r)}});var eo=C((Ov,Za)=>{"use strict";var qd=Ja();Za.exports=Qa;Qa.locator=qd;var Td=` -`,Xa="\\";function Qa(e,r,t){var n=this,a,u;if(r.charAt(0)===Xa&&(a=r.charAt(1),n.escape.indexOf(a)!==-1))return t?!0:(a===Td?u={type:"break"}:u={type:"text",value:a},e(Xa+a)(u))}});var Jt=C((Pv,ro)=>{"use strict";ro.exports=Sd;function Sd(e,r){return e.indexOf("<",r)}});var ao=C((Iv,io)=>{"use strict";var to=ne(),_d=lr(),Ld=Jt();io.exports=en;en.locator=Ld;en.notInLink=!0;var no="<",Xt=">",uo="@",Qt="/",Zt="mailto:",Kr=Zt.length;function en(e,r,t){var n=this,a="",u=r.length,i=0,o="",s=!1,l="",c,f,D,h,p;if(r.charAt(0)===no){for(i++,a=no;i{"use strict";oo.exports=Od;function Od(e,r){var t=String(e),n=0,a;if(typeof r!="string")throw new Error("Expected character");for(a=t.indexOf(r);a!==-1;)n++,a=t.indexOf(r,a+r.length);return n}});var fo=C((Rv,lo)=>{"use strict";lo.exports=Pd;var co=["www.","http://","https://"];function Pd(e,r){var t=-1,n,a,u;if(!this.options.gfm)return t;for(a=co.length,n=-1;++n{"use strict";var Do=so(),Id=lr(),Nd=Oe(),rn=ze(),Rd=ne(),zd=fo();mo.exports=nn;nn.locator=zd;nn.notInLink=!0;var Ud=33,Md=38,Yd=41,Vd=42,$d=44,jd=45,tn=46,Gd=58,Wd=59,Hd=63,Kd=60,po=95,Jd=126,Xd="(",ho=")";function nn(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=r.length,o=-1,s=!1,l,c,f,D,h,p,d,m,F,y,v,B,b,g;if(a){if(r.slice(0,4)==="www.")s=!0,D=4;else if(r.slice(0,7).toLowerCase()==="http://")D=7;else if(r.slice(0,8).toLowerCase()==="https://")D=8;else return;for(o=D-1,f=D,l=[];DF;)D=h+p.lastIndexOf(ho),p=r.slice(h,D),y--;if(r.charCodeAt(D-1)===Wd&&(D--,rn(r.charCodeAt(D-1)))){for(m=D-2;rn(r.charCodeAt(m));)m--;r.charCodeAt(m)===Md&&(D=m)}return v=r.slice(0,D),b=Id(v,{nonTerminated:!1}),s&&(b="http://"+b),g=n.enterLink(),n.inlineTokenizers={text:u.text},B=n.tokenizeInline(v,e.now()),n.inlineTokenizers=u,g(),e(v)({type:"link",title:null,url:b,children:B})}}}});var Co=C((Uv,Eo)=>{"use strict";var Qd=Oe(),Zd=ze(),e0=43,r0=45,t0=46,n0=95;Eo.exports=vo;function vo(e,r){var t=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(a=n,a===r||!go(e.charCodeAt(a-1)))return vo.call(t,e,n+1);for(;a>r&&go(e.charCodeAt(a-1));)a--;return a}function go(e){return Qd(e)||Zd(e)||e===e0||e===r0||e===t0||e===n0}});var xo=C((Mv,Ao)=>{"use strict";var u0=lr(),bo=Oe(),yo=ze(),i0=Co();Ao.exports=on;on.locator=i0;on.notInLink=!0;var a0=43,un=45,Jr=46,o0=64,an=95;function on(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=0,o=r.length,s=-1,l,c,f,D;if(a){for(l=r.charCodeAt(i);bo(l)||yo(l)||l===a0||l===un||l===Jr||l===an;)l=r.charCodeAt(++i);if(i!==0&&l===o0){for(i++;i{"use strict";var s0=ze(),c0=Jt(),l0=jt().tag;wo.exports=ko;ko.locator=c0;var f0="<",D0="?",p0="!",d0="/",h0=/^/i;function ko(e,r,t){var n=this,a=r.length,u,i;if(!(r.charAt(0)!==f0||a<3)&&(u=r.charAt(1),!(!s0(u)&&u!==D0&&u!==p0&&u!==d0)&&(i=r.match(l0),!!i)))return t?!0:(i=i[0],!n.inLink&&h0.test(i)?n.inLink=!0:n.inLink&&m0.test(i)&&(n.inLink=!1),e(i)({type:"html",value:i}))}});var sn=C((Vv,qo)=>{"use strict";qo.exports=F0;function F0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t{"use strict";var Fr=ne(),g0=sn();Po.exports=Oo;Oo.locator=g0;var v0=` -`,E0="!",To='"',So="'",je="(",gr=")",cn="<",ln=">",_o="[",vr="\\",C0="]",Lo="`";function Oo(e,r,t){var n=this,a="",u=0,i=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E,k,w;if(i===E0&&(F=!0,a=i,i=r.charAt(++u)),i===_o&&!(!F&&n.inLink)){for(a+=i,A="",u++,B=r.length,E=e.now(),g=0,E.column+=u,E.offset+=u;u=D&&(D=0):D=f}else if(i===vr)u++,d+=r.charAt(u);else if((!D||l)&&i===_o)g++;else if((!D||l)&&i===C0)if(g)g--;else{if(r.charAt(u+1)!==je)return;d+=je,c=!0,u++;break}A+=d,d="",u++}if(c){for(y=A,a+=A+d,u++;u{"use strict";var b0=ne(),y0=sn(),A0=Gt();Ro.exports=No;No.locator=y0;var fn="link",x0="image",k0="shortcut",w0="collapsed",Dn="full",B0="!",Xr="[",Qr="\\",Zr="]";function No(e,r,t){var n=this,a=n.options.commonmark,u=r.charAt(0),i=0,o=r.length,s="",l="",c=fn,f=k0,D,h,p,d,m,F,y,v;if(u===B0&&(c=x0,l=u,u=r.charAt(++i)),u===Xr){for(i++,l+=u,F="",v=0;i{"use strict";Uo.exports=q0;function q0(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n{"use strict";var T0=Pe(),Yo=ne(),S0=Mo();$o.exports=Vo;Vo.locator=S0;var _0="\\",L0="*",O0="_";function Vo(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,D;if(!(u!==L0&&u!==O0||r.charAt(++a)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=r.length,a++,l="",u="",!(o&&Yo(r.charAt(a)))))for(;a{"use strict";Go.exports=N0;var P0=String.fromCharCode,I0=/\w/;function N0(e){return I0.test(typeof e=="number"?P0(e):e.charAt(0))}});var Ko=C((Kv,Ho)=>{"use strict";Ho.exports=R0;function R0(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n{"use strict";var z0=Pe(),U0=Wo(),Jo=ne(),M0=Ko();Zo.exports=Qo;Qo.locator=M0;var Y0="*",Xo="_",V0="\\";function Qo(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,D;if(!(u!==Y0&&u!==Xo)&&(o=n.options.pedantic,c=u,s=u,f=r.length,a++,l="",u="",!(o&&Jo(r.charAt(a)))))for(;a{"use strict";rs.exports=$0;function $0(e,r){return e.indexOf("~~",r)}});var os=C((Qv,as)=>{"use strict";var ns=ne(),j0=ts();as.exports=is;is.locator=j0;var et="~",us="~~";function is(e,r,t){var n=this,a="",u="",i="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==et||r.charAt(1)!==et||ns(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s{"use strict";ss.exports=G0;function G0(e,r){return e.indexOf("`",r)}});var Ds=C((e2,fs)=>{"use strict";var W0=cs();fs.exports=ls;ls.locator=W0;var pn=10,dn=32,hn=96;function ls(e,r,t){for(var n=r.length,a=0,u,i,o,s,l,c;a2&&(s===dn||s===pn)&&(l===dn||l===pn)){for(a++,n--;a{"use strict";ps.exports=H0;function H0(e,r){for(var t=e.indexOf(` -`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var Fs=C((t2,ms)=>{"use strict";var K0=ds();ms.exports=hs;hs.locator=K0;var J0=" ",X0=` -`,Q0=2;function hs(e,r,t){for(var n=r.length,a=-1,u="",i;++a{"use strict";gs.exports=Z0;function Z0(e,r,t){var n=this,a,u,i,o,s,l,c,f,D,h;if(t)return!0;for(a=n.inlineMethods,o=a.length,u=n.inlineTokenizers,i=-1,D=r.length;++i{"use strict";var eh=Le(),rt=zu(),rh=Mu(),th=Vu(),nh=Fi(),mn=Ei();bs.exports=Es;function Es(e,r){this.file=r,this.offset={},this.options=eh(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=rh(r).toOffset,this.unescape=th(this,"escape"),this.decode=nh(this)}var z=Es.prototype;z.setOptions=Bi();z.parse=$i();z.options=_t();z.exitStart=rt("atStart",!0);z.enterList=rt("inList",!1);z.enterLink=rt("inLink",!1);z.enterBlock=rt("inBlock",!1);z.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];z.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];z.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];z.blockTokenizers={blankLine:Gi(),indentedCode:Xi(),fencedCode:ea(),blockquote:aa(),atxHeading:ca(),thematicBreak:Da(),list:ya(),setextHeading:wa(),html:La(),definition:Ya(),table:ja(),paragraph:Ha()};z.inlineTokenizers={escape:eo(),autoLink:ao(),url:Fo(),email:xo(),html:Bo(),link:Io(),reference:zo(),strong:jo(),emphasis:es(),deletion:os(),code:Ds(),break:Fs(),text:vs()};z.blockMethods=Cs(z.blockTokenizers);z.inlineMethods=Cs(z.inlineTokenizers);z.tokenizeBlock=mn("block");z.tokenizeInline=mn("inline");z.tokenizeFactory=mn;function Cs(e){var r=[],t;for(t in e)r.push(t);return r}});var ws=C((i2,ks)=>{"use strict";var uh=Nu(),ih=Le(),As=ys();ks.exports=xs;xs.Parser=As;function xs(e){var r=this.data("settings"),t=uh(As);t.prototype.options=ih(t.prototype.options,r,e),this.Parser=t}});var qs=C((a2,Bs)=>{"use strict";Bs.exports=ah;function ah(e){if(e)throw e}});var Fn=C((o2,Ts)=>{Ts.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var zs=C((s2,Rs)=>{"use strict";var tt=Object.prototype.hasOwnProperty,Ns=Object.prototype.toString,Ss=Object.defineProperty,_s=Object.getOwnPropertyDescriptor,Ls=function(r){return typeof Array.isArray=="function"?Array.isArray(r):Ns.call(r)==="[object Array]"},Os=function(r){if(!r||Ns.call(r)!=="[object Object]")return!1;var t=tt.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&tt.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var a;for(a in r);return typeof a>"u"||tt.call(r,a)},Ps=function(r,t){Ss&&t.name==="__proto__"?Ss(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},Is=function(r,t){if(t==="__proto__")if(tt.call(r,t)){if(_s)return _s(r,t).value}else return;return r[t]};Rs.exports=function e(){var r,t,n,a,u,i,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s{"use strict";Us.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var Vs=C((l2,Ys)=>{"use strict";var oh=[].slice;Ys.exports=sh;function sh(e,r){var t;return n;function n(){var i=oh.call(arguments,0),o=e.length>i.length,s;o&&i.push(a);try{s=e.apply(null,i)}catch(l){if(o&&t)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(u,a):s instanceof Error?a(s):u(s))}function a(){t||(t=!0,r.apply(null,arguments))}function u(i){a(null,i)}}});var Hs=C((f2,Ws)=>{"use strict";var js=Vs();Ws.exports=Gs;Gs.wrap=js;var $s=[].slice;function Gs(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var a=-1,u=$s.call(arguments,0,-1),i=arguments[arguments.length-1];if(typeof i!="function")throw new Error("Expected function as last argument, not "+i);o.apply(null,[null].concat(u));function o(s){var l=e[++a],c=$s.call(arguments,0),f=c.slice(1),D=u.length,h=-1;if(s){i(s);return}for(;++h{"use strict";var Ge={}.hasOwnProperty;Xs.exports=ch;function ch(e){return!e||typeof e!="object"?"":Ge.call(e,"position")||Ge.call(e,"type")?Ks(e.position):Ge.call(e,"start")||Ge.call(e,"end")?Ks(e):Ge.call(e,"line")||Ge.call(e,"column")?gn(e):""}function gn(e){return(!e||typeof e!="object")&&(e={}),Js(e.line)+":"+Js(e.column)}function Ks(e){return(!e||typeof e!="object")&&(e={}),gn(e.start)+"-"+gn(e.end)}function Js(e){return e&&typeof e=="number"?e:1}});var rc=C((p2,ec)=>{"use strict";var lh=Qs();ec.exports=vn;function Zs(){}Zs.prototype=Error.prototype;vn.prototype=new Zs;var xe=vn.prototype;xe.file="";xe.name="";xe.reason="";xe.message="";xe.stack="";xe.fatal=null;xe.column=null;xe.line=null;function vn(e,r,t){var n,a,u;typeof r=="string"&&(t=r,r=null),n=fh(t),a=lh(r)||"1:1",u={start:{line:null,column:null},end:{line:null,column:null}},r&&r.position&&(r=r.position),r&&(r.start?(u=r,r=r.start):u.start=r),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=a,this.reason=e,this.line=r?r.line:null,this.column=r?r.column:null,this.location=u,this.source=n[0],this.ruleId=n[1]}function fh(e){var r=[null,null],t;return typeof e=="string"&&(t=e.indexOf(":"),t===-1?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1))),r}});var tc=C(We=>{"use strict";We.basename=Dh;We.dirname=ph;We.extname=dh;We.join=hh;We.sep="/";function Dh(e,r){var t=0,n=-1,a,u,i,o;if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');if(Er(e),a=e.length,r===void 0||!r.length||r.length>e.length){for(;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else n<0&&(i=!0,n=a+1);return n<0?"":e.slice(t,n)}if(r===e)return"";for(u=-1,o=r.length-1;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else u<0&&(i=!0,u=a+1),o>-1&&(e.charCodeAt(a)===r.charCodeAt(o--)?o<0&&(n=a):(o=-1,n=u));return t===n?n=u:n<0&&(n=e.length),e.slice(t,n)}function ph(e){var r,t,n;if(Er(e),!e.length)return".";for(r=-1,n=e.length;--n;)if(e.charCodeAt(n)===47){if(t){r=n;break}}else t||(t=!0);return r<0?e.charCodeAt(0)===47?"/":".":r===1&&e.charCodeAt(0)===47?"//":e.slice(0,r)}function dh(e){var r=-1,t=0,n=-1,a=0,u,i,o;for(Er(e),o=e.length;o--;){if(i=e.charCodeAt(o),i===47){if(u){t=o+1;break}continue}n<0&&(u=!0,n=o+1),i===46?r<0?r=o:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||n<0||a===0||a===1&&r===n-1&&r===t+1?"":e.slice(r,n)}function hh(){for(var e=-1,r;++e2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",n=0):(t=t.slice(0,s),n=t.length-1-t.lastIndexOf("/")),a=i,u=0;continue}}else if(t.length){t="",n=0,a=i,u=0;continue}}r&&(t=t.length?t+"/..":"..",n=2)}else t.length?t+="/"+e.slice(a+1,i):t=e.slice(a+1,i),n=i-a-1;a=i,u=0}else o===46&&u>-1?u++:u=-1}return t}function Er(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}});var uc=C(nc=>{"use strict";nc.cwd=gh;function gh(){return"/"}});var oc=C((m2,ac)=>{"use strict";var ue=tc(),vh=uc(),Eh=Fn();ac.exports=he;var Ch={}.hasOwnProperty,En=["history","path","basename","stem","extname","dirname"];he.prototype.toString=_h;Object.defineProperty(he.prototype,"path",{get:bh,set:yh});Object.defineProperty(he.prototype,"dirname",{get:Ah,set:xh});Object.defineProperty(he.prototype,"basename",{get:kh,set:wh});Object.defineProperty(he.prototype,"extname",{get:Bh,set:qh});Object.defineProperty(he.prototype,"stem",{get:Th,set:Sh});function he(e){var r,t;if(!e)e={};else if(typeof e=="string"||Eh(e))e={contents:e};else if("message"in e&&"messages"in e)return e;if(!(this instanceof he))return new he(e);for(this.data={},this.messages=[],this.history=[],this.cwd=vh.cwd(),t=-1;++t-1)throw new Error("`extname` cannot contain multiple dots")}this.path=ue.join(this.dirname,this.stem+(e||""))}function Th(){return typeof this.path=="string"?ue.basename(this.path,this.extname):void 0}function Sh(e){bn(e,"stem"),Cn(e,"stem"),this.path=ue.join(this.dirname||"",e+(this.extname||""))}function _h(e){return(this.contents||"").toString(e)}function Cn(e,r){if(e&&e.indexOf(ue.sep)>-1)throw new Error("`"+r+"` cannot be a path: did not expect `"+ue.sep+"`")}function bn(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function ic(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}});var cc=C((F2,sc)=>{"use strict";var Lh=rc(),nt=oc();sc.exports=nt;nt.prototype.message=Oh;nt.prototype.info=Ih;nt.prototype.fail=Ph;function Oh(e,r,t){var n=new Lh(e,r,t);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}function Ph(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}function Ih(){var e=this.message.apply(this,arguments);return e.fatal=null,e}});var fc=C((g2,lc)=>{"use strict";lc.exports=cc()});var Ec=C((v2,vc)=>{"use strict";var Dc=qs(),Nh=Fn(),ut=zs(),pc=Ms(),Fc=Hs(),Cr=fc();vc.exports=gc().freeze();var Rh=[].slice,zh={}.hasOwnProperty,Uh=Fc().use(Mh).use(Yh).use(Vh);function Mh(e,r){r.tree=e.parse(r.file)}function Yh(e,r,t){e.run(r.tree,r.file,n);function n(a,u,i){a?t(a):(r.tree=u,r.file=i,t())}}function Vh(e,r){var t=e.stringify(r.tree,r.file);t==null||(typeof t=="string"||Nh(t)?("value"in r.file&&(r.file.value=t),r.file.contents=t):r.file.result=t)}function gc(){var e=[],r=Fc(),t={},n=-1,a;return u.data=o,u.freeze=i,u.attachers=e,u.use=s,u.parse=c,u.stringify=h,u.run=f,u.runSync=D,u.process=p,u.processSync=d,u;function u(){for(var m=gc(),F=-1;++F{kn.isRemarkParser=jh;kn.isRemarkCompiler=Gh;function jh(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Gh(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var wc=C((C2,kc)=>{var Cc=wn();kc.exports=Jh;var bc=9,yc=32,it=36,Wh=48,Hh=57,Ac=92,Kh=["math","math-inline"],xc="math-display";function Jh(e){let r=this.Parser,t=this.Compiler;Cc.isRemarkParser(r)&&Xh(r,e),Cc.isRemarkCompiler(t)&&Qh(t,e)}function Xh(e,r){let t=e.prototype,n=t.inlineMethods;u.locator=a,t.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function a(i,o){return i.indexOf("$",o)}function u(i,o,s){let l=o.length,c=!1,f=!1,D=0,h,p,d,m,F,y,v;if(o.charCodeAt(D)===Ac&&(f=!0,D++),o.charCodeAt(D)===it){if(D++,f)return s?!0:i(o.slice(0,D))({type:"text",value:"$"});if(o.charCodeAt(D)===it&&(c=!0,D++),d=o.charCodeAt(D),!(d===yc||d===bc)){for(m=D;DHh)&&(!c||d===it)){F=D-1,D++,c&&D++,y=D;break}}else p===Ac&&(D++,d=o.charCodeAt(D+1));D++}if(y!==void 0)return s?!0:(v=o.slice(m,F+1),i(o.slice(0,y))({type:"inlineMath",value:v,data:{hName:"span",hProperties:{className:Kh.concat(c&&r.inlineMathDouble?[xc]:[])},hChildren:[{type:"text",value:v}]}}))}}}}function Qh(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(xc)&&(a="$$"),a+n.value+a}}});var _c=C((b2,Sc)=>{var Bc=wn();Sc.exports=tm;var qc=10,br=32,Bn=36,Tc=` -`,Zh="$",em=2,rm=["math","math-display"];function tm(){let e=this.Parser,r=this.Compiler;Bc.isRemarkParser(e)&&nm(e),Bc.isRemarkCompiler(r)&&um(r)}function nm(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,a=r.interruptList,u=r.interruptBlockquote;r.blockTokenizers.math=i,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function i(o,s,l){var c=s.length,f=0;let D,h,p,d,m,F,y,v,B,b,g;for(;fb&&s.charCodeAt(d-1)===br;)d--;for(;d>b&&s.charCodeAt(d-1)===Bn;)B++,d--;for(F<=B&&s.indexOf(Zh,b)===d&&(v=!0,g=d);b<=g&&b-fb&&s.charCodeAt(g-1)===br;)g--;if((!v||b!==g)&&h.push(s.slice(b,g)),v)break;f=p+1,p=s.indexOf(Tc,f+1),p=p===-1?c:p}return h=h.join(` -`),o(s.slice(0,p))({type:"math",value:h,data:{hName:"div",hProperties:{className:rm.concat()},hChildren:[{type:"text",value:h}]}})}}}}function um(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$ -`+n.value+` -$$`}}});var Oc=C((y2,Lc)=>{var im=wc(),am=_c();Lc.exports=om;function om(e){var r=e||{};am.call(this,r),im.call(this,r)}});var Ic=C((A2,Pc)=>{"use strict";Pc.exports=Dm;var yr=9,at=10,He=32,sm=33,cm=58,Ke=91,lm=92,qn=93,Ar=94,ot=96,st=4,fm=1024;function Dm(e){var r=this.Parser,t=this.Compiler;pm(r)&&hm(r,e),dm(t)&&mm(t)}function pm(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function dm(e){return!!(e&&e.prototype&&e.prototype.visitors)}function hm(e,r){for(var t=r||{},n=e.prototype,a=n.blockTokenizers,u=n.inlineTokenizers,i=n.blockMethods,o=n.inlineMethods,s=a.definition,l=u.reference,c=[],f=-1,D=i.length,h;++fst&&(K=void 0,me=q);else{if(K0&&(U=Fe[w-1],U.contentStart===U.contentEnd);)w--;for(ke=b(g.slice(0,U.contentEnd));++q()=>(r||e((r={exports:{}}).exports,r),r.exports),Pn=(e,r)=>{for(var t in r)lt(e,t,{get:r[t],enumerable:!0})},al=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of nl(r))!il.call(e,a)&&a!==t&<(e,a,{get:()=>r[a],enumerable:!(n=tl(r,a))||n.enumerable});return e};var Ne=(e,r,t)=>(t=e!=null?rl(ul(e)):{},al(r||!e||!e.__esModule?lt(t,"default",{value:e,enumerable:!0}):t,e));var xr=C((_m,Ln)=>{"use strict";Ln.exports=cl;function cl(e){return String(e).replace(/\s+/g," ")}});var Lu=C((Gg,Pu)=>{"use strict";Pu.exports=hf;var lr=9,Nr=10,ze=32,ff=33,Df=58,Me=91,pf=92,At=93,fr=94,Rr=96,Ur=4,df=1024;function hf(e){var r=this.Parser,t=this.Compiler;mf(r)&&gf(r,e),Ff(t)&&vf(t)}function mf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Ff(e){return!!(e&&e.prototype&&e.prototype.visitors)}function gf(e,r){for(var t=r||{},n=e.prototype,a=n.blockTokenizers,u=n.inlineTokenizers,i=n.blockMethods,o=n.inlineMethods,s=a.definition,l=u.reference,c=[],f=-1,D=i.length,h;++fUr&&(K=void 0,me=q);else{if(K0&&(z=Fe[w-1],z.contentStart===z.contentEnd);)w--;for(ke=b(g.slice(0,z.contentEnd));++qel,options:()=>rl,parsers:()=>_n,printers:()=>qm});var sl=(e,r,t,n)=>{if(!(e&&r==null))return r.replaceAll?r.replaceAll(t,n):t.global?r.replace(t,n):r.split(t).join(n)},N=sl;var cl=(e,r,t)=>{if(!(e&&r==null))return Array.isArray(r)||typeof r=="string"?r[t<0?r.length+t:t]:r.at(t)},M=cl;var Su=Ie(xr(),1);function Je(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function fl(e,r){let t=e.match(new RegExp(`(${Je(r)})+`,"g"));if(t===null)return 0;let n=new Map,a=0;for(let u of t){let i=u.length/r.length;n.set(i,!0),i>a&&(a=i)}for(let u=1;uMath.max(n,a.length/r.length),0)}var kr=Dl;var Rn=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function zn(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Un(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Mn=e=>!(zn(e)||Un(e));var pl=/[^\x20-\x7F]/;function dl(e){if(!e)return 0;if(!pl.test(e))return e.length;e=e.replace(Rn()," ");let r=0;for(let t of e){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(r+=Mn(n)?1:2)}return r}var Xe=dl;var wr="'",Yn='"';function hl(e,r){let t=r===!0||r===wr?wr:Yn,n=t===wr?Yn:wr,a=0,u=0;for(let i of e)i===t?a++:i===n&&u++;return a>u?n:t}var Vn=hl;var ie="string",X="array",ge="cursor",Q="indent",Z="align",ae="trim",G="group",W="fill",H="if-break",oe="indent-if-break",se="line-suffix",ce="line-suffix-boundary",j="line",le="label",ee="break-parent",Br=new Set([ge,Q,Z,ae,G,W,H,oe,se,ce,j,le,ee]);function ml(e){if(typeof e=="string")return ie;if(Array.isArray(e))return X;if(!e)return;let{type:r}=e;if(Br.has(r))return r}var fe=ml;var Fl=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function gl(e){let r=e===null?"null":typeof e;if(r!=="string"&&r!=="object")return`Unexpected doc '${r}', -Expected it to be 'string' or 'object'.`;if(fe(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=Fl([...Br].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var ft=class extends Error{name="InvalidDocError";constructor(r){super(gl(r)),this.doc=r}},we=ft;var $n={};function vl(e,r,t,n){let a=[e];for(;a.length>0;){let u=a.pop();if(u===$n){t(a.pop());continue}t&&a.push(u,$n);let i=fe(u);if(!i)throw new we(u);if((r==null?void 0:r(u))!==!1)switch(i){case X:case W:{let o=i===X?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case H:a.push(u.flatContents,u.breakContents);break;case G:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)a.push(u.expandedStates[s]);else a.push(u.contents);break;case Z:case Q:case oe:case le:case se:a.push(u.contents);break;case ie:case ge:case ae:case ce:case j:case ee:break;default:throw new we(u)}}}var jn=vl;var Gn=()=>{},Be=Gn,qr=Gn;function Qe(e){return Be(e),{type:Q,contents:e}}function ve(e,r){return Be(r),{type:Z,contents:r,n:e}}function Ze(e,r={}){return Be(e),qr(r.expandedStates,!0),{type:G,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function qe(e){return ve({type:"root"},e)}function Tr(e){return qr(e),{type:W,parts:e}}function Wn(e,r="",t={}){return Be(e),r!==""&&Be(r),{type:H,breakContents:e,flatContents:r,groupId:t.groupId}}var er={type:ee};var Ne={type:j,hard:!0},El={type:j,hard:!0,literal:!0},Sr={type:j},rr={type:j,soft:!0},P=[Ne,er],tr=[El,er];function nr(e,r){Be(e),qr(r);let t=[];for(let n=0;n{if(Array.isArray(e))return e;if(e.type!==W)throw new Error(`Expect doc to be 'array' or '${W}'.`);return e.parts};function Xn(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(u){if(t.has(u))return t.get(u);let i=a(u);return t.set(u,i),i}function a(u){switch(fe(u)){case X:return r(u.map(n));case W:return r({...u,parts:u.parts.map(n)});case H:return r({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case G:{let{expandedStates:i,contents:o}=u;return i?(i=i.map(n),o=i[0]):o=n(o),r({...u,contents:o,expandedStates:i})}case Z:case Q:case oe:case le:case se:return r({...u,contents:n(u.contents)});case ie:case ge:case ae:case ce:case j:case ee:return r(u);default:throw new we(u)}}}function Hn(e){if(e.length>0){let r=M(!1,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Qn(e){let r=new Set,t=[];function n(u){if(u.type===ee&&Hn(t),u.type===G){if(t.push(u),r.has(u))return!1;r.add(u)}}function a(u){u.type===G&&t.pop().break&&Hn(t)}jn(e,n,a,!0)}function Kn(e){let r=[],t=e.filter(Boolean);for(;t.length>0;){let n=t.shift();if(n){if(Array.isArray(n)){t.unshift(...n);continue}if(r.length>0&&typeof M(!1,r,-1)=="string"&&typeof n=="string"){r[r.length-1]+=n;continue}r.push(n)}}return r}function Zn(e){return Xn(e,r=>Array.isArray(r)?Kn(r):r.parts?{...r,parts:Kn(r.parts)}:r)}function Ee(e,r=tr){return Xn(e,t=>typeof t=="string"?nr(r,t.split(` -`)):t)}function eu(e){switch(e){case"cr":return"\r";case"crlf":return`\r +`)}}function xt(e,r,t){e.splice(e.indexOf(r),0,t)}function Ef(e,r,t,n){for(var a=e.length,u=-1;++u{kt.isRemarkParser=Cf;kt.isRemarkCompiler=bf;function Cf(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function bf(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var Yu=C((jg,Mu)=>{var Iu=wt();Mu.exports=kf;var Nu=9,Ru=32,zr=36,yf=48,Af=57,Uu=92,xf=["math","math-inline"],zu="math-display";function kf(e){let r=this.Parser,t=this.Compiler;Iu.isRemarkParser(r)&&wf(r,e),Iu.isRemarkCompiler(t)&&Bf(t,e)}function wf(e,r){let t=e.prototype,n=t.inlineMethods;u.locator=a,t.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function a(i,o){return i.indexOf("$",o)}function u(i,o,s){let l=o.length,c=!1,f=!1,D=0,h,p,d,m,F,y,v;if(o.charCodeAt(D)===Uu&&(f=!0,D++),o.charCodeAt(D)===zr){if(D++,f)return s?!0:i(o.slice(0,D))({type:"text",value:"$"});if(o.charCodeAt(D)===zr&&(c=!0,D++),d=o.charCodeAt(D),!(d===Ru||d===Nu)){for(m=D;DAf)&&(!c||d===zr)){F=D-1,D++,c&&D++,y=D;break}}else p===Uu&&(D++,d=o.charCodeAt(D+1));D++}if(y!==void 0)return s?!0:(v=o.slice(m,F+1),i(o.slice(0,y))({type:"inlineMath",value:v,data:{hName:"span",hProperties:{className:xf.concat(c&&r.inlineMathDouble?[zu]:[])},hChildren:[{type:"text",value:v}]}}))}}}}function Bf(e){let r=e.prototype;r.visitors.inlineMath=t;function t(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(zu)&&(a="$$"),a+n.value+a}}});var Wu=C((Wg,ju)=>{var Vu=wt();ju.exports=_f;var Gu=10,Dr=32,Bt=36,$u=` +`,qf="$",Tf=2,Sf=["math","math-display"];function _f(){let e=this.Parser,r=this.Compiler;Vu.isRemarkParser(e)&&Of(e),Vu.isRemarkCompiler(r)&&Pf(r)}function Of(e){let r=e.prototype,t=r.blockMethods,n=r.interruptParagraph,a=r.interruptList,u=r.interruptBlockquote;r.blockTokenizers.math=i,t.splice(t.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function i(o,s,l){var c=s.length,f=0;let D,h,p,d,m,F,y,v,B,b,g;for(;fb&&s.charCodeAt(d-1)===Dr;)d--;for(;d>b&&s.charCodeAt(d-1)===Bt;)B++,d--;for(F<=B&&s.indexOf(qf,b)===d&&(v=!0,g=d);b<=g&&b-fb&&s.charCodeAt(g-1)===Dr;)g--;if((!v||b!==g)&&h.push(s.slice(b,g)),v)break;f=p+1,p=s.indexOf($u,f+1),p=p===-1?c:p}return h=h.join(` +`),o(s.slice(0,p))({type:"math",value:h,data:{hName:"div",hProperties:{className:Sf.concat()},hChildren:[{type:"text",value:h}]}})}}}}function Pf(e){let r=e.prototype;r.visitors.math=t;function t(n){return`$$ +`+n.value+` +$$`}}});var Ku=C((Hg,Hu)=>{var Lf=Yu(),If=Wu();Hu.exports=Nf;function Nf(e){var r=e||{};If.call(this,r),Lf.call(this,r)}});var Pe=C((Kg,Xu)=>{Xu.exports=Uf;var Rf=Object.prototype.hasOwnProperty;function Uf(){for(var e={},r=0;r{typeof Object.create=="function"?qt.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:qt.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}});var ei=C((Jg,Zu)=>{"use strict";var zf=Pe(),Qu=Ju();Zu.exports=Mf;function Mf(e){var r,t,n;Qu(u,e),Qu(a,u),r=u.prototype;for(t in r)n=r[t],n&&typeof n=="object"&&(r[t]="concat"in n?n.concat():zf(n));return u;function a(i){return e.apply(this,i)}function u(){return this instanceof u?e.apply(this,arguments):new a(arguments)}}});var ti=C((Qg,ri)=>{"use strict";ri.exports=Yf;function Yf(e,r,t){return n;function n(){var a=t||this,u=a[e];return a[e]=!r,i;function i(){a[e]=u}}}});var ui=C((Zg,ni)=>{"use strict";ni.exports=Vf;function Vf(e){for(var r=String(e),t=[],n=/\r?\n|\r/g;n.exec(r);)t.push(n.lastIndex);return t.push(r.length+1),{toPoint:a,toPosition:a,toOffset:u};function a(i){var o=-1;if(i>-1&&ii)return{line:o+1,column:i-(t[o-1]||0)+1,offset:i}}return{}}function u(i){var o=i&&i.line,s=i&&i.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in t&&(l=(t[o-2]||0)+s-1||0),l>-1&&l{"use strict";ii.exports=Gf;var Tt="\\";function Gf(e,r){return t;function t(n){for(var a=0,u=n.indexOf(Tt),i=e[r],o=[],s;u!==-1;)o.push(n.slice(a,u)),a=u+1,s=n.charAt(a),(!s||i.indexOf(s)===-1)&&o.push(Tt),u=n.indexOf(Tt,a+1);return o.push(n.slice(a)),o.join("")}}});var oi=C((rv,$f)=>{$f.exports={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"}});var si=C((tv,jf)=>{jf.exports={"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"}});var Le=C((nv,ci)=>{"use strict";ci.exports=Wf;function Wf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=48&&r<=57}});var fi=C((uv,li)=>{"use strict";li.exports=Hf;function Hf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=102||r>=65&&r<=70||r>=48&&r<=57}});var Ye=C((iv,Di)=>{"use strict";Di.exports=Kf;function Kf(e){var r=typeof e=="string"?e.charCodeAt(0):e;return r>=97&&r<=122||r>=65&&r<=90}});var di=C((av,pi)=>{"use strict";var Xf=Ye(),Jf=Le();pi.exports=Qf;function Qf(e){return Xf(e)||Jf(e)}});var hi=C((ov,Zf)=>{Zf.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",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:"\u{1D505}",Bopf:"\u{1D539}",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:"\u{1D49E}",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:"\u{1D507}",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",Diamond:"\u22C4",DifferentialD:"\u2146",Dopf:"\u{1D53B}",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:"\u{1D49F}",Dstrok:"\u0110",ENG:"\u014A",ET:"\xD0",ETH:"\xD0",Eacut:"\xC9",Eacute:"\xC9",Ecaron:"\u011A",Ecir:"\xCA",Ecirc:"\xCA",Ecy:"\u042D",Edot:"\u0116",Efr:"\u{1D508}",Egrav:"\xC8",Egrave:"\xC8",Element:"\u2208",Emacr:"\u0112",EmptySmallSquare:"\u25FB",EmptyVerySmallSquare:"\u25AB",Eogon:"\u0118",Eopf:"\u{1D53C}",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:"\u{1D509}",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",Fopf:"\u{1D53D}",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:"\u{1D50A}",Gg:"\u22D9",Gopf:"\u{1D53E}",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",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:"\u{1D540}",Iota:"\u0399",Iscr:"\u2110",Itilde:"\u0128",Iukcy:"\u0406",Ium:"\xCF",Iuml:"\xCF",Jcirc:"\u0134",Jcy:"\u0419",Jfr:"\u{1D50D}",Jopf:"\u{1D541}",Jscr:"\u{1D4A5}",Jsercy:"\u0408",Jukcy:"\u0404",KHcy:"\u0425",KJcy:"\u040C",Kappa:"\u039A",Kcedil:"\u0136",Kcy:"\u041A",Kfr:"\u{1D50E}",Kopf:"\u{1D542}",Kscr:"\u{1D4A6}",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:"\u{1D50F}",Ll:"\u22D8",Lleftarrow:"\u21DA",Lmidot:"\u013F",LongLeftArrow:"\u27F5",LongLeftRightArrow:"\u27F7",LongRightArrow:"\u27F6",Longleftarrow:"\u27F8",Longleftrightarrow:"\u27FA",Longrightarrow:"\u27F9",Lopf:"\u{1D543}",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",Lscr:"\u2112",Lsh:"\u21B0",Lstrok:"\u0141",Lt:"\u226A",Map:"\u2905",Mcy:"\u041C",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",MinusPlus:"\u2213",Mopf:"\u{1D544}",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:` +`,Nfr:"\u{1D511}",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:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",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:"\u{1D513}",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:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",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:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",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:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",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:"\u{1D4B0}",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:"\u{1D519}",Vopf:"\u{1D54D}",Vscr:"\u{1D4B1}",Vvdash:"\u22AA",Wcirc:"\u0174",Wedge:"\u22C0",Wfr:"\u{1D51A}",Wopf:"\u{1D54E}",Wscr:"\u{1D4B2}",Xfr:"\u{1D51B}",Xi:"\u039E",Xopf:"\u{1D54F}",Xscr:"\u{1D4B3}",YAcy:"\u042F",YIcy:"\u0407",YUcy:"\u042E",Yacut:"\xDD",Yacute:"\xDD",Ycirc:"\u0176",Ycy:"\u042B",Yfr:"\u{1D51C}",Yopf:"\u{1D550}",Yscr:"\u{1D4B4}",Yuml:"\u0178",ZHcy:"\u0416",Zacute:"\u0179",Zcaron:"\u017D",Zcy:"\u0417",Zdot:"\u017B",ZeroWidthSpace:"\u200B",Zeta:"\u0396",Zfr:"\u2128",Zopf:"\u2124",Zscr:"\u{1D4B5}",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:"\u{1D51E}",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:"\u{1D552}",ap:"\u2248",apE:"\u2A70",apacir:"\u2A6F",ape:"\u224A",apid:"\u224B",apos:"'",approx:"\u2248",approxeq:"\u224A",arin:"\xE5",aring:"\xE5",ascr:"\u{1D4B6}",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:"\u{1D51F}",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:"\u{1D553}",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:"\u{1D4B7}",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:"\u{1D520}",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:"\u{1D554}",coprod:"\u2210",cop:"\xA9",copy:"\xA9",copysr:"\u2117",crarr:"\u21B5",cross:"\u2717",cscr:"\u{1D4B8}",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:"\u{1D521}",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:"\u{1D555}",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:"\u{1D4B9}",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:"\u{1D522}",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:"\u{1D556}",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:"\u{1D523}",filig:"\uFB01",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",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:"\u{1D4BB}",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:"\u{1D524}",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:"\u{1D558}",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:"\u{1D525}",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",horbar:"\u2015",hscr:"\u{1D4BD}",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:"\u{1D526}",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:"\u{1D55A}",iota:"\u03B9",iprod:"\u2A3C",iques:"\xBF",iquest:"\xBF",iscr:"\u{1D4BE}",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:"\u{1D527}",jmath:"\u0237",jopf:"\u{1D55B}",jscr:"\u{1D4BF}",jsercy:"\u0458",jukcy:"\u0454",kappa:"\u03BA",kappav:"\u03F0",kcedil:"\u0137",kcy:"\u043A",kfr:"\u{1D528}",kgreen:"\u0138",khcy:"\u0445",kjcy:"\u045C",kopf:"\u{1D55C}",kscr:"\u{1D4C0}",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:"\u{1D529}",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:"\u{1D55D}",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:"\u{1D4C1}",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:"\u{1D52A}",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:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",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:"\u{1D52B}",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:"\u{1D55F}",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:"\u{1D4C3}",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:"\u{1D52C}",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:"\u{1D560}",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:"\u{1D52D}",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:"\u{1D561}",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:"\u{1D4C5}",psi:"\u03C8",puncsp:"\u2008",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",qprime:"\u2057",qscr:"\u{1D4C6}",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:"\u{1D52F}",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:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",rsaquo:"\u203A",rscr:"\u{1D4C7}",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:"\u{1D530}",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:"\u{1D564}",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:"\u{1D4C8}",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:"\u{1D531}",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:"\u{1D565}",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:"\u{1D4C9}",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:"\u{1D532}",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:"\u{1D566}",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:"\u{1D4CA}",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:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",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:"\u{1D534}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",xscr:"\u{1D4CD}",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:"\u{1D536}",yicy:"\u0457",yopf:"\u{1D56A}",yscr:"\u{1D4CE}",yucy:"\u044E",yum:"\xFF",yuml:"\xFF",zacute:"\u017A",zcaron:"\u017E",zcy:"\u0437",zdot:"\u017C",zeetrf:"\u2128",zeta:"\u03B6",zfr:"\u{1D537}",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});var gi=C((sv,Fi)=>{"use strict";var mi=hi();Fi.exports=rD;var eD={}.hasOwnProperty;function rD(e){return eD.call(mi,e)?mi[e]:!1}});var pr=C((cv,Si)=>{"use strict";var vi=oi(),Ei=si(),tD=Le(),nD=fi(),Ai=di(),uD=gi();Si.exports=FD;var iD={}.hasOwnProperty,Ve=String.fromCharCode,aD=Function.prototype,Ci={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},oD=9,bi=10,sD=12,cD=32,yi=38,lD=59,fD=60,DD=61,pD=35,dD=88,hD=120,mD=65533,Ge="named",_t="hexadecimal",Ot="decimal",Pt={};Pt[_t]=16;Pt[Ot]=10;var Mr={};Mr[Ge]=Ai;Mr[Ot]=tD;Mr[_t]=nD;var xi=1,ki=2,wi=3,Bi=4,qi=5,St=6,Ti=7,ye={};ye[xi]="Named character references must be terminated by a semicolon";ye[ki]="Numeric character references must be terminated by a semicolon";ye[wi]="Named character references cannot be empty";ye[Bi]="Numeric character references cannot be empty";ye[qi]="Named character references must be known";ye[St]="Numeric character references cannot be disallowed";ye[Ti]="Numeric character references cannot be outside the permissible Unicode range";function FD(e,r){var t={},n,a;r||(r={});for(a in Ci)n=r[a],t[a]=n??Ci[a];return(t.position.indent||t.position.start)&&(t.indent=t.position.indent||[],t.position=t.position.start),gD(e,t)}function gD(e,r){var t=r.additional,n=r.nonTerminated,a=r.text,u=r.reference,i=r.warning,o=r.textContext,s=r.referenceContext,l=r.warningContext,c=r.position,f=r.indent||[],D=e.length,h=0,p=-1,d=c.column||1,m=c.line||1,F="",y=[],v,B,b,g,A,x,E,k,w,q,T,R,O,_,S,P,ke,G,I;for(typeof t=="string"&&(t=t.charCodeAt(0)),P=X(),k=i?K:aD,h--,D++;++h65535&&(x-=65536,q+=Ve(x>>>10|55296),x=56320|x&1023),x=q+Ve(x))):_!==Ge&&k(Bi,G)),x?(me(),P=X(),h=I-1,d+=I-O+1,y.push(x),ke=X(),ke.offset++,u&&u.call(s,x,{start:P,end:ke},e.slice(O-1,I)),P=ke):(g=e.slice(O-1,I),F+=g,d+=g.length,h=I-1)}else A===10&&(m++,p++,d=0),A===A?(F+=Ve(A),d++):me();return y.join("");function X(){return{line:m,column:d,offset:h+(c.offset||0)}}function K(Fe,z){var ct=X();ct.column+=z,ct.offset+=z,i.call(l,ye[Fe],ct,Fe)}function me(){F&&(y.push(F),a&&a.call(o,F,{start:P,end:X()}),F="")}}function vD(e){return e>=55296&&e<=57343||e>1114111}function ED(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}});var Pi=C((lv,Oi)=>{"use strict";var CD=Pe(),_i=pr();Oi.exports=bD;function bD(e){return t.raw=n,t;function r(u){for(var i=e.offset,o=u.line,s=[];++o&&o in i;)s.push((i[o]||0)+1);return{start:u,indent:s}}function t(u,i,o){_i(u,{position:r(i),warning:a,text:o,reference:o,textContext:e,referenceContext:e})}function n(u,i,o){return _i(u,CD(o,{position:r(i),warning:a}))}function a(u,i,o){o!==3&&e.file.message(u,i)}}});var Ni=C((fv,Ii)=>{"use strict";Ii.exports=yD;function yD(e){return r;function r(t,n){var a=this,u=a.offset,i=[],o=a[e+"Methods"],s=a[e+"Tokenizers"],l=n.line,c=n.column,f,D,h,p,d,m;if(!t)return i;for(x.now=v,x.file=a.file,F("");t;){for(f=-1,D=o.length,d=!1;++f{"use strict";Ui.exports=Yr;var Lt=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],It=Lt.concat(["~","|"]),Ri=It.concat([` +`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);Yr.default=Lt;Yr.gfm=It;Yr.commonmark=Ri;function Yr(e){var r=e||{};return r.commonmark?Ri:r.gfm?It:Lt}});var Yi=C((pv,Mi)=>{"use strict";Mi.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","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"]});var Nt=C((dv,Vi)=>{"use strict";Vi.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:Yi()}});var $i=C((hv,Gi)=>{"use strict";var kD=Pe(),wD=zi(),BD=Nt();Gi.exports=qD;function qD(e){var r=this,t=r.options,n,a;if(e==null)e={};else if(typeof e=="object")e=kD(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in BD){if(a=e[n],a==null&&(a=t[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return r.options=e,r.escape=wD(e),r}});var Hi=C((mv,Wi)=>{"use strict";Wi.exports=ji;function ji(e){if(e==null)return OD;if(typeof e=="string")return _D(e);if(typeof e=="object")return"length"in e?SD(e):TD(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function TD(e){return r;function r(t){var n;for(n in e)if(t[n]!==e[n])return!1;return!0}}function SD(e){for(var r=[],t=-1;++t{Ki.exports=PD;function PD(e){return e}});var ea=C((gv,Zi)=>{"use strict";Zi.exports=Vr;var LD=Hi(),ID=Xi(),Ji=!0,Qi="skip",Rt=!1;Vr.CONTINUE=Ji;Vr.SKIP=Qi;Vr.EXIT=Rt;function Vr(e,r,t,n){var a,u;typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),u=LD(r),a=n?-1:1,i(e,null,[])();function i(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,D.displayName="node ("+ID(c.type+(f?"<"+f+">":""))+")"),D;function D(){var h=l.concat(o),p=[],d,m;if((!r||u(o,s,l[l.length-1]||null))&&(p=ND(t(o,l)),p[0]===Rt))return p;if(o.children&&p[0]!==Qi)for(m=(n?o.children.length:-1)+a;m>-1&&m{"use strict";ra.exports=$r;var Gr=ea(),RD=Gr.CONTINUE,UD=Gr.SKIP,zD=Gr.EXIT;$r.CONTINUE=RD;$r.SKIP=UD;$r.EXIT=zD;function $r(e,r,t,n){typeof r=="function"&&typeof t!="function"&&(n=t,t=r,r=null),Gr(e,r,a,n);function a(u,i){var o=i[i.length-1],s=o?o.children.indexOf(u):null;return t(u,s,o)}}});var ua=C((Ev,na)=>{"use strict";var MD=ta();na.exports=YD;function YD(e,r){return MD(e,r?VD:GD),e}function VD(e){delete e.position}function GD(e){e.position=void 0}});var oa=C((Cv,aa)=>{"use strict";var ia=Pe(),$D=ua();aa.exports=HD;var jD=` +`,WD=/\r\n|\r/g;function HD(){var e=this,r=String(e.file),t={line:1,column:1,offset:0},n=ia(t),a;return r=r.replace(WD,jD),r.charCodeAt(0)===65279&&(r=r.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(r,n),position:{start:t,end:e.eof||ia(t)}},e.options.position||$D(a,!0),a}});var ca=C((bv,sa)=>{"use strict";var KD=/^[ \t]*(\n|$)/;sa.exports=XD;function XD(e,r,t){for(var n,a="",u=0,i=r.length;u{"use strict";var pe="",Ut;la.exports=JD;function JD(e,r){if(typeof e!="string")throw new TypeError("expected a string");if(r===1)return e;if(r===2)return e+e;var t=e.length*r;if(Ut!==e||typeof Ut>"u")Ut=e,pe="";else if(pe.length>=t)return pe.substr(0,t);for(;t>pe.length&&r>1;)r&1&&(pe+=e),r>>=1,e+=e;return pe+=e,pe=pe.substr(0,t),pe}});var zt=C((Av,fa)=>{"use strict";fa.exports=QD;function QD(e){return String(e).replace(/\n+$/,"")}});var da=C((xv,pa)=>{"use strict";var ZD=jr(),ep=zt();pa.exports=np;var Mt=` +`,Da=" ",Yt=" ",rp=4,tp=ZD(Yt,rp);function np(e,r,t){for(var n=-1,a=r.length,u="",i="",o="",s="",l,c,f;++n{"use strict";ma.exports=op;var Wr=` +`,dr=" ",$e=" ",up="~",ha="`",ip=3,ap=4;function op(e,r,t){var n=this,a=n.options.gfm,u=r.length+1,i=0,o="",s,l,c,f,D,h,p,d,m,F,y,v,B;if(a){for(;i=ap)){for(p="";i{je=ga.exports=sp;function sp(e){return e.trim?e.trim():je.right(je.left(e))}je.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};je.right=function(e){if(e.trimRight)return e.trimRight();for(var r=/\s/,t=e.length;r.test(e.charAt(--t)););return e.slice(0,t+1)}});var Hr=C((wv,va)=>{"use strict";va.exports=cp;function cp(e,r,t,n){for(var a=e.length,u=-1,i,o;++u{"use strict";var lp=Ie(),fp=Hr();ba.exports=Dp;var Vt=` +`,Ea=" ",Gt=" ",Ca=">";function Dp(e,r,t){for(var n=this,a=n.offset,u=n.blockTokenizers,i=n.interruptBlockquote,o=e.now(),s=o.line,l=r.length,c=[],f=[],D=[],h,p=0,d,m,F,y,v,B,b,g;p{"use strict";xa.exports=dp;var Aa=` +`,hr=" ",mr=" ",Fr="#",pp=6;function dp(e,r,t){for(var n=this,a=n.options.pedantic,u=r.length+1,i=-1,o=e.now(),s="",l="",c,f,D;++ipp)&&!(!D||!a&&r.charAt(i+1)===Fr)){for(u=r.length+1,f="";++i{"use strict";Ba.exports=Cp;var hp=" ",mp=` +`,wa=" ",Fp="*",gp="-",vp="_",Ep=3;function Cp(e,r,t){for(var n=-1,a=r.length+1,u="",i,o,s,l;++n=Ep&&(!i||i===mp)?(u+=l,t?!0:e(u)({type:"thematicBreak"})):void 0}});var $t=C((Sv,Sa)=>{"use strict";Sa.exports=xp;var Ta=" ",bp=" ",yp=1,Ap=4;function xp(e){for(var r=0,t=0,n=e.charAt(r),a={},u,i=0;n===Ta||n===bp;){for(u=n===Ta?Ap:yp,t+=u,u>1&&(t=Math.floor(t/u)*u);i{"use strict";var kp=Ie(),wp=jr(),Bp=$t();Oa.exports=Sp;var _a=` +`,qp=" ",Tp="!";function Sp(e,r){var t=e.split(_a),n=t.length+1,a=1/0,u=[],i,o,s;for(t.unshift(wp(qp,r)+Tp);n--;)if(o=Bp(t[n]),u[n]=o.stops,kp(t[n]).length!==0)if(o.indent)o.indent>0&&o.indent{"use strict";var _p=Ie(),Op=jr(),La=Le(),Pp=$t(),Lp=Pa(),Ip=Hr();Ua.exports=Gp;var jt="*",Np="_",Ia="+",Wt="-",Na=".",de=" ",te=` +`,Kr=" ",Ra=")",Rp="x",Ae=4,Up=/\n\n(?!\s*$)/,zp=/^\[([ X\tx])][ \t]/,Mp=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,Yp=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,Vp=/^( {1,4}|\t)?/gm;function Gp(e,r,t){for(var n=this,a=n.options.commonmark,u=n.options.pedantic,i=n.blockTokenizers,o=n.interruptList,s=0,l=r.length,c=null,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E,k,w,q,T,R=!1,O,_,S,P;s=w.indent&&(P=!0),p=r.charAt(s),v=null,!P){if(p===jt||p===Ia||p===Wt)v=p,s++,f++;else{for(D="";s=w.indent||f>Ae),y=!1,s=F;if(b=r.slice(F,m),B=F===s?b:r.slice(s,m),(v===jt||v===Np||v===Wt)&&i.thematicBreak.call(n,e,b,!0))break;if(g=A,A=!y&&!_p(B).length,P&&w)w.value=w.value.concat(k,b),E=E.concat(k,b),k=[];else if(y)k.length!==0&&(R=!0,w.value.push(""),w.trail=k.concat()),w={value:[b],indent:f,trail:[]},x.push(w),E=E.concat(k,b),k=[];else if(A){if(g&&!a)break;k.push(b)}else{if(g||Ip(o,i,n,[e,b,!0]))break;w.value=w.value.concat(k,b),E=E.concat(k,b),k=[]}s=m+1}for(O=e(E.join(te)).reset({type:"list",ordered:h,start:c,spread:R,children:[]}),q=n.enterList(),T=n.enterBlock(),s=-1,l=x.length;++s{"use strict";Va.exports=Zp;var Ht=` +`,Hp=" ",Ma=" ",Ya="=",Kp="-",Xp=3,Jp=1,Qp=2;function Zp(e,r,t){for(var n=this,a=e.now(),u=r.length,i=-1,o="",s,l,c,f,D;++i=Xp){i--;break}o+=c}for(s="",l="";++i{"use strict";var ed="[a-zA-Z_:][a-zA-Z0-9:._-]*",rd="[^\"'=<>`\\u0000-\\u0020]+",td="'[^']*'",nd='"[^"]*"',ud="(?:"+rd+"|"+td+"|"+nd+")",id="(?:\\s+"+ed+"(?:\\s*=\\s*"+ud+")?)",$a="<[A-Za-z][A-Za-z0-9\\-]*"+id+"*\\s*\\/?>",ja="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ad="|",od="<[?].*?[?]>",sd="]*>",cd="";Kt.openCloseTag=new RegExp("^(?:"+$a+"|"+ja+")");Kt.tag=new RegExp("^(?:"+$a+"|"+ja+"|"+ad+"|"+od+"|"+sd+"|"+cd+")")});var Xa=C((Iv,Ka)=>{"use strict";var ld=Xt().openCloseTag;Ka.exports=xd;var fd=" ",Dd=" ",Wa=` +`,pd="<",dd=/^<(script|pre|style)(?=(\s|>|$))/i,hd=/<\/(script|pre|style)>/i,md=/^/,gd=/^<\?/,vd=/\?>/,Ed=/^/,bd=/^/,Ha=/^$/,Ad=new RegExp(ld.source+"\\s*$");function xd(e,r,t){for(var n=this,a=n.options.blocks.join("|"),u=new RegExp("^|$))","i"),i=r.length,o=0,s,l,c,f,D,h,p,d=[[dd,hd,!0],[md,Fd,!0],[gd,vd,!0],[Ed,Cd,!0],[bd,yd,!0],[u,Ha,!0],[Ad,Ha,!1]];o{"use strict";Ja.exports=Bd;var kd=String.fromCharCode,wd=/\s/;function Bd(e){return wd.test(typeof e=="number"?kd(e):e.charAt(0))}});var Jt=C((Rv,Qa)=>{"use strict";var qd=xr();Qa.exports=Td;function Td(e){return qd(e).toLowerCase()}});var io=C((Uv,uo)=>{"use strict";var Sd=ne(),_d=Jt();uo.exports=Id;var Za='"',eo="'",Od="\\",We=` +`,Xr=" ",Jr=" ",Zt="[",gr="]",Pd="(",Ld=")",ro=":",to="<",no=">";function Id(e,r,t){for(var n=this,a=n.options.commonmark,u=0,i=r.length,o="",s,l,c,f,D,h,p,d;u{"use strict";var Rd=ne();oo.exports=Hd;var Ud=" ",Qr=` +`,zd=" ",Md="-",Yd=":",Vd="\\",en="|",Gd=1,$d=2,ao="left",jd="center",Wd="right";function Hd(e,r,t){var n=this,a,u,i,o,s,l,c,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E;if(n.options.gfm){for(a=0,v=0,l=r.length+1,c=[];aA){if(v<$d)return;break}c.push(r.slice(a,A)),v++,a=A+1}for(o=c.join(Qr),u=c.splice(1,1)[0]||[],a=0,l=u.length,v--,i=!1,p=[];a1&&(D?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),F=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(d,F)},s)),e(f+D),f="",d=""):(f&&(d+=f,f=""),d+=D,D===Vd&&a!==l-2&&(d+=B.charAt(a+1),a++)),m=!1,a++}y||e(Qr+u)}return g}}}});var fo=C((Mv,lo)=>{"use strict";var Kd=Ie(),Xd=zt(),Jd=Hr();lo.exports=e0;var Qd=" ",vr=` +`,Zd=" ",co=4;function e0(e,r,t){for(var n=this,a=n.options,u=a.commonmark,i=n.blockTokenizers,o=n.interruptParagraph,s=r.indexOf(vr),l=r.length,c,f,D,h,p;s=co&&D!==vr){s=r.indexOf(vr,s+1);continue}}if(f=r.slice(s+1),Jd(o,i,n,[e,f,!0]))break;if(c=s,s=r.indexOf(vr,s+1),s!==-1&&Kd(r.slice(c,s))===""){s=c;break}}return f=r.slice(0,s),t?!0:(p=e.now(),f=Xd(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,p)}))}});var po=C((Yv,Do)=>{"use strict";Do.exports=r0;function r0(e,r){return e.indexOf("\\",r)}});var go=C((Vv,Fo)=>{"use strict";var t0=po();Fo.exports=mo;mo.locator=t0;var n0=` +`,ho="\\";function mo(e,r,t){var n=this,a,u;if(r.charAt(0)===ho&&(a=r.charAt(1),n.escape.indexOf(a)!==-1))return t?!0:(a===n0?u={type:"break"}:u={type:"text",value:a},e(ho+a)(u))}});var rn=C((Gv,vo)=>{"use strict";vo.exports=u0;function u0(e,r){return e.indexOf("<",r)}});var Ao=C(($v,yo)=>{"use strict";var Eo=ne(),i0=pr(),a0=rn();yo.exports=an;an.locator=a0;an.notInLink=!0;var Co="<",tn=">",bo="@",nn="/",un="mailto:",Zr=un.length;function an(e,r,t){var n=this,a="",u=r.length,i=0,o="",s=!1,l="",c,f,D,h,p;if(r.charAt(0)===Co){for(i++,a=Co;i{"use strict";xo.exports=o0;function o0(e,r){var t=String(e),n=0,a;if(typeof r!="string")throw new Error("Expected character");for(a=t.indexOf(r);a!==-1;)n++,a=t.indexOf(r,a+r.length);return n}});var qo=C((Wv,Bo)=>{"use strict";Bo.exports=s0;var wo=["www.","http://","https://"];function s0(e,r){var t=-1,n,a,u;if(!this.options.gfm)return t;for(a=wo.length,n=-1;++n{"use strict";var To=ko(),c0=pr(),l0=Le(),on=Ye(),f0=ne(),D0=qo();Oo.exports=cn;cn.locator=D0;cn.notInLink=!0;var p0=33,d0=38,h0=41,m0=42,F0=44,g0=45,sn=46,v0=58,E0=59,C0=63,b0=60,So=95,y0=126,A0="(",_o=")";function cn(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=r.length,o=-1,s=!1,l,c,f,D,h,p,d,m,F,y,v,B,b,g;if(a){if(r.slice(0,4)==="www.")s=!0,D=4;else if(r.slice(0,7).toLowerCase()==="http://")D=7;else if(r.slice(0,8).toLowerCase()==="https://")D=8;else return;for(o=D-1,f=D,l=[];DF;)D=h+p.lastIndexOf(_o),p=r.slice(h,D),y--;if(r.charCodeAt(D-1)===E0&&(D--,on(r.charCodeAt(D-1)))){for(m=D-2;on(r.charCodeAt(m));)m--;r.charCodeAt(m)===d0&&(D=m)}return v=r.slice(0,D),b=c0(v,{nonTerminated:!1}),s&&(b="http://"+b),g=n.enterLink(),n.inlineTokenizers={text:u.text},B=n.tokenizeInline(v,e.now()),n.inlineTokenizers=u,g(),e(v)({type:"link",title:null,url:b,children:B})}}}});var Ro=C((Kv,No)=>{"use strict";var x0=Le(),k0=Ye(),w0=43,B0=45,q0=46,T0=95;No.exports=Io;function Io(e,r){var t=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",r),n===-1))return-1;if(a=n,a===r||!Lo(e.charCodeAt(a-1)))return Io.call(t,e,n+1);for(;a>r&&Lo(e.charCodeAt(a-1));)a--;return a}function Lo(e){return x0(e)||k0(e)||e===w0||e===B0||e===q0||e===T0}});var Yo=C((Xv,Mo)=>{"use strict";var S0=pr(),Uo=Le(),zo=Ye(),_0=Ro();Mo.exports=Dn;Dn.locator=_0;Dn.notInLink=!0;var O0=43,ln=45,et=46,P0=64,fn=95;function Dn(e,r,t){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=0,o=r.length,s=-1,l,c,f,D;if(a){for(l=r.charCodeAt(i);Uo(l)||zo(l)||l===O0||l===ln||l===et||l===fn;)l=r.charCodeAt(++i);if(i!==0&&l===P0){for(i++;i{"use strict";var L0=Ye(),I0=rn(),N0=Xt().tag;Go.exports=Vo;Vo.locator=I0;var R0="<",U0="?",z0="!",M0="/",Y0=/^/i;function Vo(e,r,t){var n=this,a=r.length,u,i;if(!(r.charAt(0)!==R0||a<3)&&(u=r.charAt(1),!(!L0(u)&&u!==U0&&u!==z0&&u!==M0)&&(i=r.match(N0),!!i)))return t?!0:(i=i[0],!n.inLink&&Y0.test(i)?n.inLink=!0:n.inLink&&V0.test(i)&&(n.inLink=!1),e(i)({type:"html",value:i}))}});var pn=C((Qv,jo)=>{"use strict";jo.exports=G0;function G0(e,r){var t=e.indexOf("[",r),n=e.indexOf("![",r);return n===-1||t{"use strict";var Er=ne(),$0=pn();Qo.exports=Jo;Jo.locator=$0;var j0=` +`,W0="!",Wo='"',Ho="'",He="(",Cr=")",dn="<",hn=">",Ko="[",br="\\",H0="]",Xo="`";function Jo(e,r,t){var n=this,a="",u=0,i=r.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,D,h,p,d,m,F,y,v,B,b,g,A,x,E,k,w;if(i===W0&&(F=!0,a=i,i=r.charAt(++u)),i===Ko&&!(!F&&n.inLink)){for(a+=i,A="",u++,B=r.length,E=e.now(),g=0,E.column+=u,E.offset+=u;u=D&&(D=0):D=f}else if(i===br)u++,d+=r.charAt(u);else if((!D||l)&&i===Ko)g++;else if((!D||l)&&i===H0)if(g)g--;else{if(r.charAt(u+1)!==He)return;d+=He,c=!0,u++;break}A+=d,d="",u++}if(c){for(y=A,a+=A+d,u++;u{"use strict";var K0=ne(),X0=pn(),J0=Jt();rs.exports=es;es.locator=X0;var mn="link",Q0="image",Z0="shortcut",eh="collapsed",Fn="full",rh="!",rt="[",tt="\\",nt="]";function es(e,r,t){var n=this,a=n.options.commonmark,u=r.charAt(0),i=0,o=r.length,s="",l="",c=mn,f=Z0,D,h,p,d,m,F,y,v;if(u===rh&&(c=Q0,l=u,u=r.charAt(++i)),u===rt){for(i++,l+=u,F="",v=0;i{"use strict";ns.exports=th;function th(e,r){var t=e.indexOf("**",r),n=e.indexOf("__",r);return n===-1?t:t===-1||n{"use strict";var nh=Ie(),is=ne(),uh=us();os.exports=as;as.locator=uh;var ih="\\",ah="*",oh="_";function as(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,D;if(!(u!==ah&&u!==oh||r.charAt(++a)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=r.length,a++,l="",u="",!(o&&is(r.charAt(a)))))for(;a{"use strict";cs.exports=lh;var sh=String.fromCharCode,ch=/\w/;function lh(e){return ch.test(typeof e=="number"?sh(e):e.charAt(0))}});var Ds=C((uE,fs)=>{"use strict";fs.exports=fh;function fh(e,r){var t=e.indexOf("*",r),n=e.indexOf("_",r);return n===-1?t:t===-1||n{"use strict";var Dh=Ie(),ph=ls(),ps=ne(),dh=Ds();ms.exports=hs;hs.locator=dh;var hh="*",ds="_",mh="\\";function hs(e,r,t){var n=this,a=0,u=r.charAt(a),i,o,s,l,c,f,D;if(!(u!==hh&&u!==ds)&&(o=n.options.pedantic,c=u,s=u,f=r.length,a++,l="",u="",!(o&&ps(r.charAt(a)))))for(;a{"use strict";gs.exports=Fh;function Fh(e,r){return e.indexOf("~~",r)}});var As=C((oE,ys)=>{"use strict";var Es=ne(),gh=vs();ys.exports=bs;bs.locator=gh;var ut="~",Cs="~~";function bs(e,r,t){var n=this,a="",u="",i="",o="",s,l,c;if(!(!n.options.gfm||r.charAt(0)!==ut||r.charAt(1)!==ut||Es(r.charAt(2))))for(s=1,l=r.length,c=e.now(),c.column+=2,c.offset+=2;++s{"use strict";xs.exports=vh;function vh(e,r){return e.indexOf("`",r)}});var qs=C((cE,Bs)=>{"use strict";var Eh=ks();Bs.exports=ws;ws.locator=Eh;var gn=10,vn=32,En=96;function ws(e,r,t){for(var n=r.length,a=0,u,i,o,s,l,c;a2&&(s===vn||s===gn)&&(l===vn||l===gn)){for(a++,n--;a{"use strict";Ts.exports=Ch;function Ch(e,r){for(var t=e.indexOf(` +`,r);t>r&&e.charAt(t-1)===" ";)t--;return t}});var Ps=C((fE,Os)=>{"use strict";var bh=Ss();Os.exports=_s;_s.locator=bh;var yh=" ",Ah=` +`,xh=2;function _s(e,r,t){for(var n=r.length,a=-1,u="",i;++a{"use strict";Ls.exports=kh;function kh(e,r,t){var n=this,a,u,i,o,s,l,c,f,D,h;if(t)return!0;for(a=n.inlineMethods,o=a.length,u=n.inlineTokenizers,i=-1,D=r.length;++i{"use strict";var wh=Pe(),it=ti(),Bh=ui(),qh=ai(),Th=Pi(),Cn=Ni();Us.exports=Ns;function Ns(e,r){this.file=r,this.offset={},this.options=wh(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=Bh(r).toOffset,this.unescape=qh(this,"escape"),this.decode=Th(this)}var U=Ns.prototype;U.setOptions=$i();U.parse=oa();U.options=Nt();U.exitStart=it("atStart",!0);U.enterList=it("inList",!1);U.enterLink=it("inLink",!1);U.enterBlock=it("inBlock",!1);U.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];U.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];U.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];U.blockTokenizers={blankLine:ca(),indentedCode:da(),fencedCode:Fa(),blockquote:ya(),atxHeading:ka(),thematicBreak:qa(),list:za(),setextHeading:Ga(),html:Xa(),definition:io(),table:so(),paragraph:fo()};U.inlineTokenizers={escape:go(),autoLink:Ao(),url:Po(),email:Yo(),html:$o(),link:Zo(),reference:ts(),strong:ss(),emphasis:Fs(),deletion:As(),code:qs(),break:Ps(),text:Is()};U.blockMethods=Rs(U.blockTokenizers);U.inlineMethods=Rs(U.inlineTokenizers);U.tokenizeBlock=Cn("block");U.tokenizeInline=Cn("inline");U.tokenizeFactory=Cn;function Rs(e){var r=[],t;for(t in e)r.push(t);return r}});var Gs=C((dE,Vs)=>{"use strict";var Sh=ei(),_h=Pe(),Ms=zs();Vs.exports=Ys;Ys.Parser=Ms;function Ys(e){var r=this.data("settings"),t=Sh(Ms);t.prototype.options=_h(t.prototype.options,r,e),this.Parser=t}});var js=C((hE,$s)=>{"use strict";$s.exports=Oh;function Oh(e){if(e)throw e}});var bn=C((mE,Ws)=>{Ws.exports=function(r){return r!=null&&r.constructor!=null&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}});var tc=C((FE,rc)=>{"use strict";var at=Object.prototype.hasOwnProperty,ec=Object.prototype.toString,Hs=Object.defineProperty,Ks=Object.getOwnPropertyDescriptor,Xs=function(r){return typeof Array.isArray=="function"?Array.isArray(r):ec.call(r)==="[object Array]"},Js=function(r){if(!r||ec.call(r)!=="[object Object]")return!1;var t=at.call(r,"constructor"),n=r.constructor&&r.constructor.prototype&&at.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!t&&!n)return!1;var a;for(a in r);return typeof a>"u"||at.call(r,a)},Qs=function(r,t){Hs&&t.name==="__proto__"?Hs(r,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):r[t.name]=t.newValue},Zs=function(r,t){if(t==="__proto__")if(at.call(r,t)){if(Ks)return Ks(r,t).value}else return;return r[t]};rc.exports=function e(){var r,t,n,a,u,i,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s{"use strict";nc.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}});var ac=C((vE,ic)=>{"use strict";var Ph=[].slice;ic.exports=Lh;function Lh(e,r){var t;return n;function n(){var i=Ph.call(arguments,0),o=e.length>i.length,s;o&&i.push(a);try{s=e.apply(null,i)}catch(l){if(o&&t)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(u,a):s instanceof Error?a(s):u(s))}function a(){t||(t=!0,r.apply(null,arguments))}function u(i){a(null,i)}}});var fc=C((EE,lc)=>{"use strict";var sc=ac();lc.exports=cc;cc.wrap=sc;var oc=[].slice;function cc(){var e=[],r={};return r.run=t,r.use=n,r;function t(){var a=-1,u=oc.call(arguments,0,-1),i=arguments[arguments.length-1];if(typeof i!="function")throw new Error("Expected function as last argument, not "+i);o.apply(null,[null].concat(u));function o(s){var l=e[++a],c=oc.call(arguments,0),f=c.slice(1),D=u.length,h=-1;if(s){i(s);return}for(;++h{"use strict";var Ke={}.hasOwnProperty;dc.exports=Ih;function Ih(e){return!e||typeof e!="object"?"":Ke.call(e,"position")||Ke.call(e,"type")?Dc(e.position):Ke.call(e,"start")||Ke.call(e,"end")?Dc(e):Ke.call(e,"line")||Ke.call(e,"column")?yn(e):""}function yn(e){return(!e||typeof e!="object")&&(e={}),pc(e.line)+":"+pc(e.column)}function Dc(e){return(!e||typeof e!="object")&&(e={}),yn(e.start)+"-"+yn(e.end)}function pc(e){return e&&typeof e=="number"?e:1}});var gc=C((bE,Fc)=>{"use strict";var Nh=hc();Fc.exports=An;function mc(){}mc.prototype=Error.prototype;An.prototype=new mc;var xe=An.prototype;xe.file="";xe.name="";xe.reason="";xe.message="";xe.stack="";xe.fatal=null;xe.column=null;xe.line=null;function An(e,r,t){var n,a,u;typeof r=="string"&&(t=r,r=null),n=Rh(t),a=Nh(r)||"1:1",u={start:{line:null,column:null},end:{line:null,column:null}},r&&r.position&&(r=r.position),r&&(r.start?(u=r,r=r.start):u.start=r),e.stack&&(this.stack=e.stack,e=e.message),this.message=e,this.name=a,this.reason=e,this.line=r?r.line:null,this.column=r?r.column:null,this.location=u,this.source=n[0],this.ruleId=n[1]}function Rh(e){var r=[null,null],t;return typeof e=="string"&&(t=e.indexOf(":"),t===-1?r[1]=e:(r[0]=e.slice(0,t),r[1]=e.slice(t+1))),r}});var vc=C(Xe=>{"use strict";Xe.basename=Uh;Xe.dirname=zh;Xe.extname=Mh;Xe.join=Yh;Xe.sep="/";function Uh(e,r){var t=0,n=-1,a,u,i,o;if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');if(yr(e),a=e.length,r===void 0||!r.length||r.length>e.length){for(;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else n<0&&(i=!0,n=a+1);return n<0?"":e.slice(t,n)}if(r===e)return"";for(u=-1,o=r.length-1;a--;)if(e.charCodeAt(a)===47){if(i){t=a+1;break}}else u<0&&(i=!0,u=a+1),o>-1&&(e.charCodeAt(a)===r.charCodeAt(o--)?o<0&&(n=a):(o=-1,n=u));return t===n?n=u:n<0&&(n=e.length),e.slice(t,n)}function zh(e){var r,t,n;if(yr(e),!e.length)return".";for(r=-1,n=e.length;--n;)if(e.charCodeAt(n)===47){if(t){r=n;break}}else t||(t=!0);return r<0?e.charCodeAt(0)===47?"/":".":r===1&&e.charCodeAt(0)===47?"//":e.slice(0,r)}function Mh(e){var r=-1,t=0,n=-1,a=0,u,i,o;for(yr(e),o=e.length;o--;){if(i=e.charCodeAt(o),i===47){if(u){t=o+1;break}continue}n<0&&(u=!0,n=o+1),i===46?r<0?r=o:a!==1&&(a=1):r>-1&&(a=-1)}return r<0||n<0||a===0||a===1&&r===n-1&&r===t+1?"":e.slice(r,n)}function Yh(){for(var e=-1,r;++e2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",n=0):(t=t.slice(0,s),n=t.length-1-t.lastIndexOf("/")),a=i,u=0;continue}}else if(t.length){t="",n=0,a=i,u=0;continue}}r&&(t=t.length?t+"/..":"..",n=2)}else t.length?t+="/"+e.slice(a+1,i):t=e.slice(a+1,i),n=i-a-1;a=i,u=0}else o===46&&u>-1?u++:u=-1}return t}function yr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}});var Cc=C(Ec=>{"use strict";Ec.cwd=$h;function $h(){return"/"}});var Ac=C((xE,yc)=>{"use strict";var ue=vc(),jh=Cc(),Wh=bn();yc.exports=he;var Hh={}.hasOwnProperty,xn=["history","path","basename","stem","extname","dirname"];he.prototype.toString=im;Object.defineProperty(he.prototype,"path",{get:Kh,set:Xh});Object.defineProperty(he.prototype,"dirname",{get:Jh,set:Qh});Object.defineProperty(he.prototype,"basename",{get:Zh,set:em});Object.defineProperty(he.prototype,"extname",{get:rm,set:tm});Object.defineProperty(he.prototype,"stem",{get:nm,set:um});function he(e){var r,t;if(!e)e={};else if(typeof e=="string"||Wh(e))e={contents:e};else if("message"in e&&"messages"in e)return e;if(!(this instanceof he))return new he(e);for(this.data={},this.messages=[],this.history=[],this.cwd=jh.cwd(),t=-1;++t-1)throw new Error("`extname` cannot contain multiple dots")}this.path=ue.join(this.dirname,this.stem+(e||""))}function nm(){return typeof this.path=="string"?ue.basename(this.path,this.extname):void 0}function um(e){wn(e,"stem"),kn(e,"stem"),this.path=ue.join(this.dirname||"",e+(this.extname||""))}function im(e){return(this.contents||"").toString(e)}function kn(e,r){if(e&&e.indexOf(ue.sep)>-1)throw new Error("`"+r+"` cannot be a path: did not expect `"+ue.sep+"`")}function wn(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function bc(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}});var kc=C((kE,xc)=>{"use strict";var am=gc(),ot=Ac();xc.exports=ot;ot.prototype.message=om;ot.prototype.info=cm;ot.prototype.fail=sm;function om(e,r,t){var n=new am(e,r,t);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}function sm(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}function cm(){var e=this.message.apply(this,arguments);return e.fatal=null,e}});var Bc=C((wE,wc)=>{"use strict";wc.exports=kc()});var Nc=C((BE,Ic)=>{"use strict";var qc=js(),lm=bn(),st=tc(),Tc=uc(),Pc=fc(),Ar=Bc();Ic.exports=Lc().freeze();var fm=[].slice,Dm={}.hasOwnProperty,pm=Pc().use(dm).use(hm).use(mm);function dm(e,r){r.tree=e.parse(r.file)}function hm(e,r,t){e.run(r.tree,r.file,n);function n(a,u,i){a?t(a):(r.tree=u,r.file=i,t())}}function mm(e,r){var t=e.stringify(r.tree,r.file);t==null||(typeof t=="string"||lm(t)?("value"in r.file&&(r.file.value=t),r.file.contents=t):r.file.result=t)}function Lc(){var e=[],r=Pc(),t={},n=-1,a;return u.data=o,u.freeze=i,u.attachers=e,u.use=s,u.parse=c,u.stringify=h,u.run=f,u.runSync=D,u.process=p,u.processSync=d,u;function u(){for(var m=Lc(),F=-1;++F_u,options:()=>Ou,parsers:()=>_n,printers:()=>Bm});var ol=(e,r,t,n)=>{if(!(e&&r==null))return r.replaceAll?r.replaceAll(t,n):t.global?r.replace(t,n):r.split(t).join(n)},N=ol;var sl=(e,r,t)=>{if(!(e&&r==null))return Array.isArray(r)||typeof r=="string"?r[t<0?r.length+t:t]:r.at(t)},M=sl;var Tu=Ne(xr(),1);var ie="string",J="array",ge="cursor",Q="indent",Z="align",ae="trim",j="group",W="fill",H="if-break",oe="indent-if-break",se="line-suffix",ce="line-suffix-boundary",$="line",le="label",ee="break-parent",kr=new Set([ge,Q,Z,ae,j,W,H,oe,se,ce,$,le,ee]);function ll(e){if(typeof e=="string")return ie;if(Array.isArray(e))return J;if(!e)return;let{type:r}=e;if(kr.has(r))return r}var fe=ll;var fl=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Dl(e){let r=e===null?"null":typeof e;if(r!=="string"&&r!=="object")return`Unexpected doc '${r}', +Expected it to be 'string' or 'object'.`;if(fe(e))throw new Error("doc is valid.");let t=Object.prototype.toString.call(e);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let n=fl([...kr].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var ft=class extends Error{name="InvalidDocError";constructor(r){super(Dl(r)),this.doc=r}},we=ft;var In={};function pl(e,r,t,n){let a=[e];for(;a.length>0;){let u=a.pop();if(u===In){t(a.pop());continue}t&&a.push(u,In);let i=fe(u);if(!i)throw new we(u);if((r==null?void 0:r(u))!==!1)switch(i){case J:case W:{let o=i===J?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case H:a.push(u.flatContents,u.breakContents);break;case j:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)a.push(u.expandedStates[s]);else a.push(u.contents);break;case Z:case Q:case oe:case le:case se:a.push(u.contents);break;case ie:case ge:case ae:case ce:case $:case ee:break;default:throw new we(u)}}}var Nn=pl;var Rn=()=>{},Be=Rn,wr=Rn;function Je(e){return Be(e),{type:Q,contents:e}}function ve(e,r){return Be(r),{type:Z,contents:r,n:e}}function Qe(e,r={}){return Be(e),wr(r.expandedStates,!0),{type:j,id:r.id,contents:e,break:!!r.shouldBreak,expandedStates:r.expandedStates}}function qe(e){return ve({type:"root"},e)}function Br(e){return wr(e),{type:W,parts:e}}function Un(e,r="",t={}){return Be(e),r!==""&&Be(r),{type:H,breakContents:e,flatContents:r,groupId:t.groupId}}var Ze={type:ee};var Re={type:$,hard:!0},dl={type:$,hard:!0,literal:!0},qr={type:$},er={type:$,soft:!0},L=[Re,Ze],rr=[dl,Ze];function tr(e,r){Be(e),wr(r);let t=[];for(let n=0;n0&&s(i),h()}function D(){o>0&&l(o),h()}function h(){i=0,o=0}}function pt(e){let r=0,t=0,n=e.length;e:for(;n--;){let a=e[n];if(a===ur){t++;continue}for(let u=a.length-1;u>=0;u--){let i=a[u];if(i===" "||i===" ")r++;else{e[n]=a.slice(0,u+1);break e}}}if(r>0||t>0)for(e.length=n+1;t-- >0;)e.push(ur);return r}function _r(e,r,t,n,a,u){if(t===Number.POSITIVE_INFINITY)return!0;let i=r.length,o=[e],s=[];for(;t>=0;){if(o.length===0){if(i===0)return!0;o.push(r[--i]);continue}let{mode:l,doc:c}=o.pop();switch(fe(c)){case ie:s.push(c),t-=Xe(c);break;case X:case W:{let f=Jn(c);for(let D=f.length-1;D>=0;D--)o.push({mode:l,doc:f[D]});break}case Q:case Z:case oe:case le:o.push({mode:l,doc:c.contents});break;case ae:t+=pt(s);break;case G:{if(u&&c.break)return!1;let f=c.break?V:l,D=c.expandedStates&&f===V?M(!1,c.expandedStates,-1):c.contents;o.push({mode:f,doc:D});break}case H:{let D=(c.groupId?a[c.groupId]||re:l)===V?c.breakContents:c.flatContents;D&&o.push({mode:l,doc:D});break}case j:if(l===V||c.hard)return!0;c.soft||(s.push(" "),t--);break;case se:n=!0;break;case ce:if(n)return!1;break}}return!1}function tu(e,r){let t={},n=r.printWidth,a=eu(r.endOfLine),u=0,i=[{ind:ru(),mode:V,doc:e}],o=[],s=!1,l=[],c=0;for(Qn(e);i.length>0;){let{ind:D,mode:h,doc:p}=i.pop();switch(fe(p)){case ie:{let d=a!==` +`}}var Mn=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Yn(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Vn(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var Gn=e=>!(Yn(e)||Vn(e));var hl=/[^\x20-\x7F]/;function ml(e){if(!e)return 0;if(!hl.test(e))return e.length;e=e.replace(Mn()," ");let r=0;for(let t of e){let n=t.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(r+=Gn(n)?1:2)}return r}var nr=ml;var Wn=e=>{if(Array.isArray(e))return e;if(e.type!==W)throw new Error(`Expect doc to be 'array' or '${W}'.`);return e.parts};function Hn(e,r){if(typeof e=="string")return r(e);let t=new Map;return n(e);function n(u){if(t.has(u))return t.get(u);let i=a(u);return t.set(u,i),i}function a(u){switch(fe(u)){case J:return r(u.map(n));case W:return r({...u,parts:u.parts.map(n)});case H:return r({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case j:{let{expandedStates:i,contents:o}=u;return i?(i=i.map(n),o=i[0]):o=n(o),r({...u,contents:o,expandedStates:i})}case Z:case Q:case oe:case le:case se:return r({...u,contents:n(u.contents)});case ie:case ge:case ae:case ce:case $:case ee:return r(u);default:throw new we(u)}}}function $n(e){if(e.length>0){let r=M(!1,e,-1);!r.expandedStates&&!r.break&&(r.break="propagated")}return null}function Kn(e){let r=new Set,t=[];function n(u){if(u.type===ee&&$n(t),u.type===j){if(t.push(u),r.has(u))return!1;r.add(u)}}function a(u){u.type===j&&t.pop().break&&$n(t)}Nn(e,n,a,!0)}function jn(e){let r=[],t=e.filter(Boolean);for(;t.length>0;){let n=t.shift();if(n){if(Array.isArray(n)){t.unshift(...n);continue}if(r.length>0&&typeof M(!1,r,-1)=="string"&&typeof n=="string"){r[r.length-1]+=n;continue}r.push(n)}}return r}function Xn(e){return Hn(e,r=>Array.isArray(r)?jn(r):r.parts?{...r,parts:jn(r.parts)}:r)}function Ee(e,r=rr){return Hn(e,t=>typeof t=="string"?tr(r,t.split(` +`)):t)}var V=Symbol("MODE_BREAK"),re=Symbol("MODE_FLAT"),ur=Symbol("cursor");function Jn(){return{value:"",length:0,queue:[]}}function Fl(e,r){return Dt(e,{type:"indent"},r)}function gl(e,r,t){return r===Number.NEGATIVE_INFINITY?e.root||Jn():r<0?Dt(e,{type:"dedent"},t):r?r.type==="root"?{...e,root:e}:Dt(e,{type:typeof r=="string"?"stringAlign":"numberAlign",n:r},t):e}function Dt(e,r,t){let n=r.type==="dedent"?e.queue.slice(0,-1):[...e.queue,r],a="",u=0,i=0,o=0;for(let p of n)switch(p.type){case"indent":c(),t.useTabs?s(1):l(t.tabWidth);break;case"stringAlign":c(),a+=p.n,u+=p.n.length;break;case"numberAlign":i+=1,o+=p.n;break;default:throw new Error(`Unexpected type '${p.type}'`)}return D(),{...e,value:a,length:u,queue:n};function s(p){a+=" ".repeat(p),u+=t.tabWidth*p}function l(p){a+=" ".repeat(p),u+=p}function c(){t.useTabs?f():D()}function f(){i>0&&s(i),h()}function D(){o>0&&l(o),h()}function h(){i=0,o=0}}function pt(e){let r=0,t=0,n=e.length;e:for(;n--;){let a=e[n];if(a===ur){t++;continue}for(let u=a.length-1;u>=0;u--){let i=a[u];if(i===" "||i===" ")r++;else{e[n]=a.slice(0,u+1);break e}}}if(r>0||t>0)for(e.length=n+1;t-- >0;)e.push(ur);return r}function Tr(e,r,t,n,a,u){if(t===Number.POSITIVE_INFINITY)return!0;let i=r.length,o=[e],s=[];for(;t>=0;){if(o.length===0){if(i===0)return!0;o.push(r[--i]);continue}let{mode:l,doc:c}=o.pop();switch(fe(c)){case ie:s.push(c),t-=nr(c);break;case J:case W:{let f=Wn(c);for(let D=f.length-1;D>=0;D--)o.push({mode:l,doc:f[D]});break}case Q:case Z:case oe:case le:o.push({mode:l,doc:c.contents});break;case ae:t+=pt(s);break;case j:{if(u&&c.break)return!1;let f=c.break?V:l,D=c.expandedStates&&f===V?M(!1,c.expandedStates,-1):c.contents;o.push({mode:f,doc:D});break}case H:{let D=(c.groupId?a[c.groupId]||re:l)===V?c.breakContents:c.flatContents;D&&o.push({mode:l,doc:D});break}case $:if(l===V||c.hard)return!0;c.soft||(s.push(" "),t--);break;case se:n=!0;break;case ce:if(n)return!1;break}}return!1}function Qn(e,r){let t={},n=r.printWidth,a=zn(r.endOfLine),u=0,i=[{ind:Jn(),mode:V,doc:e}],o=[],s=!1,l=[],c=0;for(Kn(e);i.length>0;){let{ind:D,mode:h,doc:p}=i.pop();switch(fe(p)){case ie:{let d=a!==` `?N(!1,p,` -`,a):p;o.push(d),i.length>0&&(u+=Xe(d));break}case X:for(let d=p.length-1;d>=0;d--)i.push({ind:D,mode:h,doc:p[d]});break;case ge:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(ur),c++;break;case Q:i.push({ind:Cl(D,r),mode:h,doc:p.contents});break;case Z:i.push({ind:bl(D,p.n,r),mode:h,doc:p.contents});break;case ae:u-=pt(o);break;case G:switch(h){case re:if(!s){i.push({ind:D,mode:p.break?V:re,doc:p.contents});break}case V:{s=!1;let d={ind:D,mode:re,doc:p.contents},m=n-u,F=l.length>0;if(!p.break&&_r(d,i,m,F,t))i.push(d);else if(p.expandedStates){let y=M(!1,p.expandedStates,-1);if(p.break){i.push({ind:D,mode:V,doc:y});break}else for(let v=1;v=p.expandedStates.length){i.push({ind:D,mode:V,doc:y});break}else{let B=p.expandedStates[v],b={ind:D,mode:re,doc:B};if(_r(b,i,m,F,t)){i.push(b);break}}}else i.push({ind:D,mode:V,doc:p.contents});break}}p.id&&(t[p.id]=M(!1,i,-1).mode);break;case W:{let d=n-u,{parts:m}=p;if(m.length===0)break;let[F,y]=m,v={ind:D,mode:re,doc:F},B={ind:D,mode:V,doc:F},b=_r(v,[],d,l.length>0,t,!0);if(m.length===1){b?i.push(v):i.push(B);break}let g={ind:D,mode:re,doc:y},A={ind:D,mode:V,doc:y};if(m.length===2){b?i.push(g,v):i.push(A,B);break}m.splice(0,2);let x={ind:D,mode:h,doc:Tr(m)},E=m[0];_r({ind:D,mode:re,doc:[F,y,E]},[],d,l.length>0,t,!0)?i.push(x,g,v):b?i.push(x,A,v):i.push(x,A,B);break}case H:case oe:{let d=p.groupId?t[p.groupId]:h;if(d===V){let m=p.type===H?p.breakContents:p.negate?p.contents:Qe(p.contents);m&&i.push({ind:D,mode:h,doc:m})}if(d===re){let m=p.type===H?p.flatContents:p.negate?Qe(p.contents):p.contents;m&&i.push({ind:D,mode:h,doc:m})}break}case se:l.push({ind:D,mode:h,doc:p.contents});break;case ce:l.length>0&&i.push({ind:D,mode:h,doc:Ne});break;case j:switch(h){case re:if(p.hard)s=!0;else{p.soft||(o.push(" "),u+=1);break}case V:if(l.length>0){i.push({ind:D,mode:h,doc:p},...l.reverse()),l.length=0;break}p.literal?D.root?(o.push(a,D.root.value),u=D.root.length):(o.push(a),u=0):(u-=pt(o),o.push(a+D.value),u=D.length);break}break;case le:i.push({ind:D,mode:h,doc:p.contents});break;case ee:break;default:throw new we(p)}i.length===0&&l.length>0&&(i.push(...l.reverse()),l.length=0)}let f=o.indexOf(ur);if(f!==-1){let D=o.indexOf(ur,f+1),h=o.slice(0,f).join(""),p=o.slice(f+1,D).join(""),d=o.slice(D+1).join("");return{formatted:h+p+d,cursorNodeStart:h.length,cursorNodeText:p}}return{formatted:o.join("")}}var dt=class extends Error{name="UnexpectedNodeError";constructor(r,t,n="type"){super(`Unexpected ${t} node ${n}: ${JSON.stringify(r[n])}.`),this.node=r}},nu=dt;async function yl(e,r){if(e.lang==="yaml"){let t=e.value.trim(),n=t?await r(t,{parser:"yaml"}):"";return qe([e.startDelimiter,P,n,n?P:"",e.endDelimiter])}}var uu=yl;var Al=e=>String(e).split(/[/\\]/).pop();function iu(e,r){if(!r)return;let t=Al(r).toLowerCase();return e.find(n=>{var a,u;return((a=n.extensions)==null?void 0:a.some(i=>t.endsWith(i)))||((u=n.filenames)==null?void 0:u.some(i=>i.toLowerCase()===t))})}function xl(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t==null?void 0:t.includes(r))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${r}`))}function kl(e,r){let t=e.plugins.flatMap(a=>a.languages??[]),n=xl(t,r.language)??iu(t,r.physicalFile)??iu(t,r.file)??(r.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var au=kl;var wl=new Proxy(()=>{},{get:()=>wl});function Te(e){return e.position.start.offset}function Se(e){return e.position.end.offset}var ou="(?:[\\u02ea-\\u02eb\\u1100-\\u11ff\\u2e80-\\u2e99\\u2e9b-\\u2ef3\\u2f00-\\u2fd5\\u2ff0-\\u303f\\u3041-\\u3096\\u3099-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312f\\u3131-\\u318e\\u3190-\\u4dbf\\u4e00-\\u9fff\\ua700-\\ua707\\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\\ud880-\\ud883\\ud885-\\ud887][\\udc00-\\udfff]|\\ud81b[\\udfe3]|\\ud82b[\\udff0-\\udff3\\udff5-\\udffb\\udffd-\\udffe]|\\ud82c[\\udc00-\\udd22\\udd32\\udd50-\\udd52\\udd55\\udd64-\\udd67]|\\ud83c[\\ude00\\ude50-\\ude51]|\\ud869[\\udc00-\\udedf\\udf00-\\udfff]|\\ud86d[\\udc00-\\udf39\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d\\udc20-\\udfff]|\\ud873[\\udc00-\\udea1\\udeb0-\\udfff]|\\ud87a[\\udc00-\\udfe0]|\\ud87e[\\udc00-\\ude1d]|\\ud884[\\udc00-\\udf4a\\udf50-\\udfff]|\\ud888[\\udc00-\\udfaf])(?:[\\ufe00-\\ufe0f]|\\udb40[\\udd00-\\uddef])?",su=new RegExp("[\\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]",""),ir="[\\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\\u061d-\\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\\u1b7d-\\u1b7e\\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\\u2e52-\\u2e5d\\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[\\udead\\udf55-\\udf59\\udf86-\\udf89]|\\ud804[\\udc47-\\udc4d\\udcbb-\\udcbc\\udcbe-\\udcc1\\udd40-\\udd43\\udd74-\\udd75\\uddc5-\\uddc8\\uddcd\\udddb\\udddd-\\udddf\\ude38-\\ude3d\\udea9]|\\ud805[\\udc4b-\\udc4f\\udc5a-\\udc5b\\udc5d\\udcc6\\uddc1-\\uddd7\\ude41-\\ude43\\ude60-\\ude6c\\udeb9\\udf3c-\\udf3e]|\\ud806[\\udc3b\\udd44-\\udd46\\udde2\\ude3f-\\ude46\\ude9a-\\ude9c\\ude9e-\\udea2\\udf00-\\udf09]|\\ud807[\\udc41-\\udc45\\udc70-\\udc71\\udef7-\\udef8\\udf43-\\udf4f\\udfff]|\\ud809[\\udc70-\\udc74]|\\ud80b[\\udff1-\\udff2]|\\ud81a[\\ude6e-\\ude6f\\udef5\\udf37-\\udf3b\\udf44]|\\ud81b[\\ude97-\\ude9a\\udfe2]|\\ud82f[\\udc9f]|\\ud836[\\ude87-\\ude8b]|\\ud83a[\\udd5e-\\udd5f]";var mt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Lr=new Set([...mt,"tableCell","paragraph","heading"]),ht=new RegExp(ir),_e="non-cjk",De="cj-letter",Ce="k-letter",ar="cjk-punctuation";function Or(e){let r=[],t=e.split(/([\t\n ]+)/);for(let[a,u]of t.entries()){if(a%2===1){r.push({type:"whitespace",value:/\n/.test(u)?` -`:" "});continue}if((a===0||a===t.length-1)&&u==="")continue;let i=u.split(new RegExp(`(${ou})`));for(let[o,s]of i.entries())if(!((o===0||o===i.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:_e,hasLeadingPunctuation:ht.test(s[0]),hasTrailingPunctuation:ht.test(M(!1,s,-1))});continue}n(ht.test(s)?{type:"word",value:s,kind:ar,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:s,kind:su.test(s)?Ce:De,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(a){let u=M(!1,r,-1);(u==null?void 0:u.type)==="word"&&!i(_e,ar)&&![u.value,a.value].some(o=>/\u3000/.test(o))&&r.push({type:"whitespace",value:""}),r.push(a);function i(o,s){return u.kind===o&&a.kind===s||u.kind===s&&a.kind===o}}}function Re(e,r){let[,t,n,a]=r.slice(e.position.start.offset,e.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/);return{numberText:t,marker:n,leadingSpaces:a}}function cu(e,r){if(!e.ordered||e.children.length<2)return!1;let t=Number(Re(e.children[0],r.originalText).numberText),n=Number(Re(e.children[1],r.originalText).numberText);if(t===0&&e.children.length>2){let a=Number(Re(e.children[2],r.originalText).numberText);return n===1&&a===1}return n===1}function Pr(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(` -`)&&r.endsWith(` -`)?t.slice(0,-1):t}function be(e,r){return function t(n,a,u){let i={...r(n,a,u)};return i.children&&(i.children=i.children.map((o,s)=>t(o,s,[i,...u]))),i}(e,null,[])}function Ft(e){if((e==null?void 0:e.type)!=="link"||e.children.length!==1)return!1;let[r]=e.children;return Te(e)===Te(r)&&Se(e)===Se(r)}function Bl(e,r){let{node:t}=e;if(t.type==="code"&&t.lang!==null){let n=au(r,{language:t.lang});if(n)return async a=>{let u=r.__inJsTemplate?"~":"`",i=u.repeat(Math.max(3,kr(t.value,u)+1)),o={parser:n};t.lang==="ts"||t.lang==="typescript"?o.filepath="dummy.ts":t.lang==="tsx"&&(o.filepath="dummy.tsx");let s=await a(Pr(t,r.originalText),o);return qe([i,t.lang,t.meta?" "+t.meta:"",P,Ee(s),P,i])}}switch(t.type){case"front-matter":return n=>uu(t,n);case"import":case"export":return n=>n(t.value,{parser:"babel"});case"jsx":return n=>n(`<$>${t.value}`,{parser:"__js_expression",rootMarker:"mdx"})}return null}var lu=Bl;var ql=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function Tl(e){let r=e.match(ql);if(!r)return{content:e};let{startDelimiter:t,language:n,value:a="",endDelimiter:u}=r.groups,i=n.trim()||"yaml";if(t==="+++"&&(i="toml"),i!=="yaml"&&t!==u)return{content:e};let[o]=r;return{frontMatter:{type:"front-matter",lang:i,value:a,startDelimiter:t,endDelimiter:u,raw:o.replace(/\n$/,"")},content:N(!1,o,/[^\n]/g," ")+e.slice(o.length)}}var or=Tl;var fu=["format","prettier"];function gt(e){let r=`@(${fu.join("|")})`,t=new RegExp([``,`{\\s*\\/\\*\\s*${r}\\s*\\*\\/\\s*}`,``,`{\\s*\\/\\*\\s*${r}\\s*\\*\\/\\s*}`,``].join("|"),"m"),n=e.match(t);return(n==null?void 0:n.index)===0}var Du=e=>gt(or(e).content.trimStart()),pu=e=>{let r=or(e),t=``;return r.frontMatter?`${r.frontMatter.raw} +.*-->`].join("|"),"m"),n=e.match(t);return(n==null?void 0:n.index)===0}var iu=e=>ht(ar(e).content.trimStart()),au=e=>{let r=ar(e),t=``;return r.frontMatter?`${r.frontMatter.raw} ${t} ${r.content}`:`${t} -${r.content}`};var Sl=/^.$/su;function _l(e,r){return e=Ll(e,r),e=Pl(e),e=Nl(e,r),e=Rl(e,r),e=Il(e),e}function Ll(e,r){return be(e,t=>t.type!=="text"||t.value==="*"||t.value==="_"||!Sl.test(t.value)||t.position.end.offset-t.position.start.offset===t.value.length?t:{...t,value:r.originalText.slice(t.position.start.offset,t.position.end.offset)})}function Ol(e,r,t){return be(e,n=>{if(!n.children)return n;let a=n.children.reduce((u,i)=>{let o=M(!1,u,-1);return o&&r(o,i)?u.splice(-1,1,t(o,i)):u.push(i),u},[]);return{...n,children:a}})}function Pl(e){return Ol(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function Il(e){return be(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:a}=r;return n.type==="paragraph"&&(t===0&&(a=a.trimStart()),t===n.children.length-1&&(a=a.trimEnd())),{type:"sentence",position:r.position,children:Or(a)}})}function Nl(e,r){return be(e,(t,n,a)=>{if(t.type==="code"){let u=/^\n?(?: {4,}|\t)/.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=u,u)for(let i=0;i{if(a.type==="list"&&a.children.length>0){for(let o=0;o1)return!0;let s=t(u);if(s===-1)return!1;if(a.children.length===1)return s%r.tabWidth===0;let l=t(i);return s!==l?!1:s%r.tabWidth===0?!0:Re(i,r.originalText).leadingSpaces.length>1}}var du=_l;var mu=Ie(xr(),1);function zl(e){return(e==null?void 0:e.type)==="front-matter"}var hu=zl;var Ul=new Set(["position","raw"]);function Fu(e,r,t){if((e.type==="front-matter"||e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=N(!1,e.value,` -`," ")),e.type==="wikiLink"&&(r.value=N(!1,e.value.trim(),/[\t\n]+/g," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,mu.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=N(!1,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=N(!1,e.title,/\\(?=["')])/g,"")),(t==null?void 0:t.type)==="root"&&t.children.length>0&&(t.children[0]===e||hu(t.children[0])&&t.children[1]===e)&&e.type==="html"&>(e.value))return null}Fu.ignoredProperties=Ul;var gu=Fu;var sr=null;function cr(e){if(sr!==null&&typeof sr.property){let r=sr;return sr=cr.prototype=null,r}return sr=cr.prototype=e??Object.create(null),new cr}var Ml=10;for(let e=0;e<=Ml;e++)cr();function vt(e){return cr(e)}function Yl(e,r="type"){vt(e);function t(n){let a=n[r],u=e[a];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return u}return t}var vu=Yl;var Vl={"front-matter":[],root:["children"],paragraph:["children"],sentence:["children"],word:[],whitespace:[],emphasis:["children"],strong:["children"],delete:["children"],inlineCode:[],wikiLink:[],link:["children"],image:[],blockquote:["children"],heading:["children"],code:[],html:[],list:["children"],thematicBreak:[],linkReference:["children"],imageReference:[],definition:[],footnote:["children"],footnoteReference:[],footnoteDefinition:["children"],table:["children"],tableCell:["children"],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:["children"],listItem:["children"],text:[]},Eu=Vl;var $l=vu(Eu),Cu=$l;var jl=new Set(["heading","tableCell","link","wikiLink"]),Gl=new Set(`$(\xA3\xA5\xB7'"\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFF04\uFF08\uFF3B\uFF5B\uFFE1\uFFE5[{\u2035\uFE34\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE4F\u3018\uFF5F\xAB`),Wl=new Set(`!%),.:;?]}\xA2\xB0\xB7'"\u2020\u2021\u203A\u2103\u2236\u3001\u3002\u3003\u3006\u3015\u3017\u301E\uFE5A\uFE5C\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFF5E\u2013\u2014\u2022\u3009\u300B\u300D\uFE30\uFE31\uFE32\uFE33\uFE50\uFE51\uFE52\uFE53\uFE54\uFE55\uFE56\uFE58\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE57\uFF5C\uFF64\u300F\u3011\u3019\u301F\uFF60\xBB\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\u2010\u30A0\u301C\uFF5E\u203C\u2047\u2048\u2049\u30FB\u3099\u309A`),bu=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function Hl({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;nr[""]}return e.usesCJSpaces}function Kl(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let a=t.kind,u=n.kind;return Au(a)&&Au(u)||a===Ce&&u===De||u===Ce&&a===De?!0:a===ar||u===ar||a===De&&u===De?!1:bu.has(n.value[0])||bu.has(M(!1,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:Hl(e)}function yu(e){return e===_e||e===De||e===Ce}function Au(e){return e===_e||e===Ce}function Jl(e,r,t,n,a){if(t!=="always"||e.hasAncestor(s=>jl.has(s.type)))return!1;if(n)return r!=="";if(r===" ")return!0;let{previous:u,next:i}=e;return!(r===""&&((u==null?void 0:u.kind)===Ce&&yu(i==null?void 0:i.kind)||(i==null?void 0:i.kind)===Ce&&yu(u==null?void 0:u.kind))||!a&&(i&&Wl.has(i.value[0])||u&&Gl.has(M(!1,u.value,-1))))}function Et(e,r,t,n){if(t==="preserve"&&r===` -`)return P;let a=r===" "||r===` -`&&Kl(e,n);return Jl(e,r,t,n,a)?a?Sr:rr:a?" ":""}var Xl=new Set(["listItem","definition","footnoteDefinition"]);function Ql(e,r,t){var a,u,i;let{node:n}=e;if(af(e))return Or(r.originalText.slice(n.position.start.offset,n.position.end.offset)).map(o=>o.type==="word"?o.value:Et(e,o.value,r.proseWrap,!0));switch(n.type){case"front-matter":return r.originalText.slice(n.position.start.offset,n.position.end.offset);case"root":return n.children.length===0?"":[Zn(tf(e,r,t)),P];case"paragraph":return Y(e,r,t,{postprocessor:Tr});case"sentence":return Y(e,r,t);case"word":{let o=N(!1,N(!1,n.value,"*","\\*"),new RegExp([`(^|${ir})(_+)`,`(_+)(${ir}|$)`].join("|"),"g"),(c,f,D,h,p)=>N(!1,D?`${f}${D}`:`${h}${p}`,"_","\\_")),s=(c,f,D)=>c.type==="sentence"&&D===0,l=(c,f,D)=>Ft(c.children[D-1]);return o!==n.value&&(e.match(void 0,s,l)||e.match(void 0,s,(c,f,D)=>c.type==="emphasis"&&D===0,l))&&(o=o.replace(/^(\\?[*_])+/,c=>N(!1,c,"\\",""))),o}case"whitespace":{let{next:o}=e,s=o&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(o.value)?"never":r.proseWrap;return Et(e,n.value,s)}case"emphasis":{let o;if(Ft(n.children[0]))o=r.originalText[n.position.start.offset];else{let{previous:s,next:l}=e;o=(s==null?void 0:s.type)==="sentence"&&((a=M(!1,s.children,-1))==null?void 0:a.type)==="word"&&!M(!1,s.children,-1).hasTrailingPunctuation||(l==null?void 0:l.type)==="sentence"&&((u=l.children[0])==null?void 0:u.type)==="word"&&!l.children[0].hasLeadingPunctuation||e.hasAncestor(f=>f.type==="emphasis")?"*":"_"}return[o,Y(e,r,t),o]}case"strong":return["**",Y(e,r,t),"**"];case"delete":return["~~",Y(e,r,t),"~~"];case"inlineCode":{let o=r.proseWrap==="preserve"?n.value:N(!1,n.value,` -`," "),s=Nn(o,"`"),l="`".repeat(s||1),c=o.startsWith("`")||o.endsWith("`")||/^[\n ]/.test(o)&&/[\n ]$/.test(o)&&/[^\n ]/.test(o)?" ":"";return[l,c,o,c,l]}case"wikiLink":{let o="";return r.proseWrap==="preserve"?o=n.value:o=N(!1,n.value,/[\t\n]+/g," "),["[[",o,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let o="mailto:";return["<",n.url.startsWith(o)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+o.length)!==o?n.url.slice(o.length):n.url,">"]}case"[":return["[",Y(e,r,t),"](",Ct(n.url,")"),Ir(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return["![",n.alt||"","](",Ct(n.url,")"),Ir(n.title,r),")"];case"blockquote":return["> ",ve("> ",Y(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",Y(e,r,t)];case"code":{if(n.isIndented){let l=" ".repeat(4);return ve(l,[l,Ee(n.value,P)])}let o=r.__inJsTemplate?"~":"`",s=o.repeat(Math.max(3,kr(n.value,o)+1));return[s,n.lang||"",n.meta?" "+n.meta:"",P,Ee(Pr(n,r.originalText),P),P,s]}case"html":{let{parent:o,isLast:s}=e,l=o.type==="root"&&s?n.value.trimEnd():n.value,c=/^$/s.test(l);return Ee(l,c?P:qe(tr))}case"list":{let o=ku(n,e.parent),s=cu(n,r);return Y(e,r,t,{processor(l){let c=D(),f=l.node;if(f.children.length===2&&f.children[1].type==="html"&&f.children[0].position.start.column!==f.children[1].position.start.column)return[c,xu(l,r,t,c)];return[c,ve(" ".repeat(c.length),xu(l,r,t,c))];function D(){let h=n.ordered?(l.isFirst?n.start:s?1:n.start+l.index)+(o%2===0?". ":") "):o%2===0?"- ":"* ";return n.isAligned||n.hasIndentedCodeblock?Zl(h,r):h}}})}case"thematicBreak":{let{ancestors:o}=e,s=o.findIndex(c=>c.type==="list");return s===-1?"---":ku(o[s],o[s+1])%2===0?"***":"---"}case"linkReference":return["[",Y(e,r,t),"]",n.referenceType==="full"?bt(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",bt(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let o=r.proseWrap==="always"?Sr:" ";return Ze([bt(n),":",Qe([o,Ct(n.url),n.title===null?"":[o,Ir(n.title,r,!1)]])])}case"footnote":return["[^",Y(e,r,t),"]"];case"footnoteReference":return Tu(n);case"footnoteDefinition":{let o=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[Tu(n),": ",o?Y(e,r,t):Ze([ve(" ".repeat(4),Y(e,r,t,{processor:({isFirst:s})=>s?Ze([rr,t()]):t()})),((i=e.next)==null?void 0:i.type)==="footnoteDefinition"?rr:""])]}case"table":return rf(e,r,t);case"tableCell":return Y(e,r,t);case"break":return/\s/.test(r.originalText[n.position.start.offset])?[" ",qe(tr)]:["\\",P];case"liquidNode":return Ee(n.value,P);case"import":case"export":case"jsx":return n.value;case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",P,n.value?[Ee(n.value,P),P]:"","$$"];case"inlineMath":return r.originalText.slice(Te(n),Se(n));case"tableRow":case"listItem":case"text":default:throw new nu(n,"Markdown")}}function xu(e,r,t,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,Y(e,r,t,{processor({node:i,isFirst:o}){if(o&&i.type!=="list")return ve(" ".repeat(u.length),t());let s=" ".repeat(sf(r.tabWidth-n.length,0,3));return[s,ve(s,t())]}})]}function Zl(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let a=e.length%r.tabWidth;return a===0?0:r.tabWidth-a}}function ku(e,r){return ef(e,r,t=>t.ordered===e.ordered)}function ef(e,r,t){let n=-1;for(let a of r.children)if(a.type===e.type&&t(a)?n++:n=-1,a===e)return n}function rf(e,r,t){let{node:n}=e,a=[],u=e.map(()=>e.map(({index:f})=>{let D=tu(t(),r).formatted,h=Xe(D);return a[f]=Math.max(a[f]||3,h),{text:D,width:h}},"children"),"children"),i=s(!1);if(r.proseWrap!=="never")return[er,i];let o=s(!0);return[er,Ze(Wn(o,i))];function s(f){let D=[c(u[0],f),l(f)];return u.length>1&&D.push(nr(Ne,u.slice(1).map(h=>c(h,f)))),nr(Ne,D)}function l(f){return`| ${a.map((h,p)=>{let d=n.align[p],m=d==="center"||d==="left"?":":"-",F=d==="center"||d==="right"?":":"-",y=f?"-":"-".repeat(h-2);return`${m}${y}${F}`}).join(" | ")} |`}function c(f,D){return`| ${f.map(({text:p,width:d},m)=>{if(D)return p;let F=a[m]-d,y=n.align[m],v=0;y==="right"?v=F:y==="center"&&(v=Math.floor(F/2));let B=F-v;return`${" ".repeat(v)}${p}${" ".repeat(B)}`}).join(" | ")} |`}}function tf(e,r,t){let n=[],a=null,{children:u}=e.node;for(let[i,o]of u.entries())switch(yt(o)){case"start":a===null&&(a={index:i,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:i,offset:o.position.start.offset}}),a=null);break;default:break}return Y(e,r,t,{processor({index:i}){if(n.length>0){let o=n[0];if(i===o.start.index)return[wu(u[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),wu(u[o.end.index])];if(o.start.indexo,processor:u=()=>t()}=n,i=[];return e.each(()=>{let o=u(e);o!==!1&&(i.length>0&&nf(e)&&(i.push(P),(uf(e,r)||qu(e))&&i.push(P),qu(e)&&i.push(P)),i.push(o))},"children"),a(i)}function wu(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function yt(e){let r;if(e.type==="html")r=e.value.match(/^$/);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/))}return r?r[1]||"next":!1}function nf({node:e,parent:r}){let t=mt.has(e.type),n=e.type==="html"&&Lr.has(r.type);return!t&&!n}function Bu(e,r){return e.type==="listItem"&&(e.spread||r.originalText.charAt(e.position.end.offset-1)===` -`)}function uf({node:e,previous:r,parent:t},n){if(Bu(r,n))return!0;let i=r.type===e.type&&Xl.has(e.type),o=t.type==="listItem"&&!Bu(t,n),s=yt(r)==="next",l=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,c=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(i||o||s||l||c)}function qu({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function af(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var of=(e,r)=>{for(let t of r)e=N(!1,e,t,encodeURIComponent(t));return e};function Ct(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>`\\${n}`).join("|")).test(e)?`<${of(e,"<>")}>`:e}function Ir(e,r,t=!0){if(!e)return"";if(t)return" "+Ir(e,r,!1);if(e=N(!1,e,/\\(?=["')])/g,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=Vn(e,r.singleQuote);return e=N(!1,e,"\\","\\\\"),e=N(!1,e,n,`\\${n}`),`${n}${e}${n}`}function sf(e,r,t){return et?t:e}function cf(e){return e.index>0&&yt(e.previous)==="next"}function bt(e){return`[${(0,Su.default)(e.label)}]`}function Tu(e){return`[^${e.label}]`}var lf={preprocess:du,print:Ql,embed:lu,massageAstNode:gu,hasPrettierIgnore:cf,insertPragma:pu,getVisitorKeys:Cu},_u=lf;var _n={};Pn(_n,{markdown:()=>km,mdx:()=>wm,remark:()=>km});var Hc=Ie(ws(),1),Kc=Ie(Ec(),1),Jc=Ie(Oc(),1),Xc=Ie(Ic(),1);var gm=/^import\s/,vm=/^export\s/,Nc="[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*|",Rc=/|/,Em=/^{\s*\/\*(.*)\*\/\s*}/,Cm=` +${r.content}`};var xl=new Set(["position","raw"]);function su(e,r,t){if((e.type==="front-matter"||e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete r.value,e.type==="list"&&delete r.isAligned,(e.type==="list"||e.type==="listItem")&&delete r.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(r.value=N(!1,e.value,` +`," ")),e.type==="wikiLink"&&(r.value=N(!1,e.value.trim(),/[\t\n]+/g," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(r.label=(0,ou.default)(e.label)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")r.url=N(!1,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(r.title=N(!1,e.title,/\\(?=["')])/g,"")),(t==null?void 0:t.type)==="root"&&t.children.length>0&&(t.children[0]===e||nu(t.children[0])&&t.children[1]===e)&&e.type==="html"&&ht(e.value))return null}su.ignoredProperties=xl;var cu=su;var lu=/(?:[\u02ea-\u02eb\u1100-\u11ff\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u303f\u3041-\u3096\u3099-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u3190-\u4dbf\u4e00-\u9fff\ua700-\ua707\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\ud880-\ud883\ud885-\ud887][\udc00-\udfff]|\ud81b[\udfe3]|\ud82b[\udff0-\udff3\udff5-\udffb\udffd-\udffe]|\ud82c[\udc00-\udd22\udd32\udd50-\udd52\udd55\udd64-\udd67]|\ud83c[\ude00\ude50-\ude51]|\ud869[\udc00-\udedf\udf00-\udfff]|\ud86d[\udc00-\udf39\udf40-\udfff]|\ud86e[\udc00-\udc1d\udc20-\udfff]|\ud873[\udc00-\udea1\udeb0-\udfff]|\ud87a[\udc00-\udfe0]|\ud87e[\udc00-\ude1d]|\ud884[\udc00-\udf4a\udf50-\udfff]|\ud888[\udc00-\udfaf])(?:[\ufe00-\ufe0f]|\udb40[\udd00-\uddef])?/,fu=/[\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]/,Te=/[\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\u061d-\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\u1b7d-\u1b7e\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\u2e52-\u2e5d\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[\udead\udf55-\udf59\udf86-\udf89]|\ud804[\udc47-\udc4d\udcbb-\udcbc\udcbe-\udcc1\udd40-\udd43\udd74-\udd75\uddc5-\uddc8\uddcd\udddb\udddd-\udddf\ude38-\ude3d\udea9]|\ud805[\udc4b-\udc4f\udc5a-\udc5b\udc5d\udcc6\uddc1-\uddd7\ude41-\ude43\ude60-\ude6c\udeb9\udf3c-\udf3e]|\ud806[\udc3b\udd44-\udd46\udde2\ude3f-\ude46\ude9a-\ude9c\ude9e-\udea2\udf00-\udf09]|\ud807[\udc41-\udc45\udc70-\udc71\udef7-\udef8\udf43-\udf4f\udfff]|\ud809[\udc70-\udc74]|\ud80b[\udff1-\udff2]|\ud81a[\ude6e-\ude6f\udef5\udf37-\udf3b\udf44]|\ud81b[\ude97-\ude9a\udfe2]|\ud82f[\udc9f]|\ud836[\ude87-\ude8b]|\ud83a[\udd5e-\udd5f]/;async function kl(e,r){if(e.lang==="yaml"){let t=e.value.trim(),n=t?await r(t,{parser:"yaml"}):"";return qe([e.startDelimiter,L,n,n?L:"",e.endDelimiter])}}var Du=kl;var wl=e=>String(e).split(/[/\\]/).pop();function pu(e,r){if(!r)return;let t=wl(r).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(a=>a.toLowerCase()===t))??e.find(({extensions:n})=>n==null?void 0:n.some(a=>t.endsWith(a)))}function Bl(e,r){if(r)return e.find(({name:t})=>t.toLowerCase()===r)??e.find(({aliases:t})=>t==null?void 0:t.includes(r))??e.find(({extensions:t})=>t==null?void 0:t.includes(`.${r}`))}function ql(e,r){let t=e.plugins.flatMap(a=>a.languages??[]),n=Bl(t,r.language)??pu(t,r.physicalFile)??pu(t,r.file)??(r.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var du=ql;var Tl=new Proxy(()=>{},{get:()=>Tl});function Se(e){return e.position.start.offset}function _e(e){return e.position.end.offset}var mt=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Or=new Set([...mt,"tableCell","paragraph","heading"]),Oe="non-cjk",De="cj-letter",Ce="k-letter",or="cjk-punctuation";function Pr(e){let r=[],t=e.split(/([\t\n ]+)/);for(let[a,u]of t.entries()){if(a%2===1){r.push({type:"whitespace",value:/\n/.test(u)?` +`:" "});continue}if((a===0||a===t.length-1)&&u==="")continue;let i=u.split(new RegExp(`(${lu.source})`));for(let[o,s]of i.entries())if(!((o===0||o===i.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:Oe,hasLeadingPunctuation:Te.test(s[0]),hasTrailingPunctuation:Te.test(M(!1,s,-1))});continue}n(Te.test(s)?{type:"word",value:s,kind:or,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:s,kind:fu.test(s)?Ce:De,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return r;function n(a){let u=M(!1,r,-1);(u==null?void 0:u.type)==="word"&&!i(Oe,or)&&![u.value,a.value].some(o=>/\u3000/.test(o))&&r.push({type:"whitespace",value:""}),r.push(a);function i(o,s){return u.kind===o&&a.kind===s||u.kind===s&&a.kind===o}}}function Ue(e,r){let[,t,n,a]=r.slice(e.position.start.offset,e.position.end.offset).match(/^\s*(\d+)(\.|\))(\s*)/);return{numberText:t,marker:n,leadingSpaces:a}}function hu(e,r){if(!e.ordered||e.children.length<2)return!1;let t=Number(Ue(e.children[0],r.originalText).numberText),n=Number(Ue(e.children[1],r.originalText).numberText);if(t===0&&e.children.length>2){let a=Number(Ue(e.children[2],r.originalText).numberText);return n===1&&a===1}return n===1}function Lr(e,r){let{value:t}=e;return e.position.end.offset===r.length&&t.endsWith(` +`)&&r.endsWith(` +`)?t.slice(0,-1):t}function be(e,r){return function t(n,a,u){let i={...r(n,a,u)};return i.children&&(i.children=i.children.map((o,s)=>t(o,s,[i,...u]))),i}(e,null,[])}function Ft(e){if((e==null?void 0:e.type)!=="link"||e.children.length!==1)return!1;let[r]=e.children;return Se(e)===Se(r)&&_e(e)===_e(r)}function Sl(e,r){let{node:t}=e;if(t.type==="code"&&t.lang!==null){let n=du(r,{language:t.lang});if(n)return async a=>{let u=r.__inJsTemplate?"~":"`",i=u.repeat(Math.max(3,Sr(t.value,u)+1)),o={parser:n};t.lang==="ts"||t.lang==="typescript"?o.filepath="dummy.ts":t.lang==="tsx"&&(o.filepath="dummy.tsx");let s=await a(Lr(t,r.originalText),o);return qe([i,t.lang,t.meta?" "+t.meta:"",L,Ee(s),L,i])}}switch(t.type){case"front-matter":return n=>Du(t,n);case"import":case"export":return n=>n(t.value,{parser:"babel"});case"jsx":return n=>n(`<$>${t.value}`,{parser:"__js_expression",rootMarker:"mdx"})}return null}var mu=Sl;var sr=null;function cr(e){if(sr!==null&&typeof sr.property){let r=sr;return sr=cr.prototype=null,r}return sr=cr.prototype=e??Object.create(null),new cr}var _l=10;for(let e=0;e<=_l;e++)cr();function gt(e){return cr(e)}function Ol(e,r="type"){gt(e);function t(n){let a=n[r],u=e[a];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return u}return t}var Fu=Ol;var Pl={"front-matter":[],root:["children"],paragraph:["children"],sentence:["children"],word:[],whitespace:[],emphasis:["children"],strong:["children"],delete:["children"],inlineCode:[],wikiLink:[],link:["children"],image:[],blockquote:["children"],heading:["children"],code:[],html:[],list:["children"],thematicBreak:[],linkReference:["children"],imageReference:[],definition:[],footnote:["children"],footnoteReference:[],footnoteDefinition:["children"],table:["children"],tableCell:["children"],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:["children"],listItem:["children"],text:[]},gu=Pl;var Ll=Fu(gu),vu=Ll;var Il=/^.$/su;function Nl(e,r){return e=Rl(e,r),e=zl(e),e=Yl(e,r),e=Vl(e,r),e=Ml(e),e}function Rl(e,r){return be(e,t=>t.type!=="text"||t.value==="*"||t.value==="_"||!Il.test(t.value)||t.position.end.offset-t.position.start.offset===t.value.length?t:{...t,value:r.originalText.slice(t.position.start.offset,t.position.end.offset)})}function Ul(e,r,t){return be(e,n=>{if(!n.children)return n;let a=n.children.reduce((u,i)=>{let o=M(!1,u,-1);return o&&r(o,i)?u.splice(-1,1,t(o,i)):u.push(i),u},[]);return{...n,children:a}})}function zl(e){return Ul(e,(r,t)=>r.type==="text"&&t.type==="text",(r,t)=>({type:"text",value:r.value+t.value,position:{start:r.position.start,end:t.position.end}}))}function Ml(e){return be(e,(r,t,[n])=>{if(r.type!=="text")return r;let{value:a}=r;return n.type==="paragraph"&&(t===0&&(a=a.trimStart()),t===n.children.length-1&&(a=a.trimEnd())),{type:"sentence",position:r.position,children:Pr(a)}})}function Yl(e,r){return be(e,(t,n,a)=>{if(t.type==="code"){let u=/^\n?(?: {4,}|\t)/.test(r.originalText.slice(t.position.start.offset,t.position.end.offset));if(t.isIndented=u,u)for(let i=0;i{if(a.type==="list"&&a.children.length>0){for(let o=0;o1)return!0;let s=t(u);if(s===-1)return!1;if(a.children.length===1)return s%r.tabWidth===0;let l=t(i);return s!==l?!1:s%r.tabWidth===0?!0:Ue(i,r.originalText).leadingSpaces.length>1}}var Eu=Nl;var Gl=new Set(["heading","tableCell","link","wikiLink"]),$l=new Set(`$(\xA3\xA5\xB7'"\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u301D\uFE59\uFE5B\uFF04\uFF08\uFF3B\uFF5B\uFFE1\uFFE5[{\u2035\uFE34\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE4F\u3018\uFF5F\xAB`),jl=new Set(`!%),.:;?]}\xA2\xB0\xB7'"\u2020\u2021\u203A\u2103\u2236\u3001\u3002\u3003\u3006\u3015\u3017\u301E\uFE5A\uFE5C\uFF01\uFF02\uFF05\uFF07\uFF09\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF3D\uFF5D\uFF5E\u2013\u2014\u2022\u3009\u300B\u300D\uFE30\uFE31\uFE32\uFE33\uFE50\uFE51\uFE52\uFE53\uFE54\uFE55\uFE56\uFE58\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE57\uFF5C\uFF64\u300F\u3011\u3019\u301F\uFF60\xBB\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\u2010\u30A0\u301C\uFF5E\u203C\u2047\u2048\u2049\u30FB\u3099\u309A`),Cu=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function Wl({parent:e}){if(e.usesCJSpaces===void 0){let r={" ":0,"":0},{children:t}=e;for(let n=1;nr[""]}return e.usesCJSpaces}function Hl(e,r){if(r)return!0;let{previous:t,next:n}=e;if(!t||!n)return!0;let a=t.kind,u=n.kind;return yu(a)&&yu(u)||a===Ce&&u===De||u===Ce&&a===De?!0:a===or||u===or||a===De&&u===De?!1:Cu.has(n.value[0])||Cu.has(M(!1,t.value,-1))?!0:t.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:Wl(e)}function bu(e){return e===Oe||e===De||e===Ce}function yu(e){return e===Oe||e===Ce}function Kl(e,r,t,n,a){if(t!=="always"||e.hasAncestor(s=>Gl.has(s.type)))return!1;if(n)return r!=="";if(r===" ")return!0;let{previous:u,next:i}=e;return!(r===""&&((u==null?void 0:u.kind)===Ce&&bu(i==null?void 0:i.kind)||(i==null?void 0:i.kind)===Ce&&bu(u==null?void 0:u.kind))||!a&&(i&&jl.has(i.value[0])||u&&$l.has(M(!1,u.value,-1))))}function vt(e,r,t,n){if(t==="preserve"&&r===` +`)return L;let a=r===" "||r===` +`&&Hl(e,n);return Kl(e,r,t,n,a)?a?qr:er:a?" ":""}var Xl=new Set(["listItem","definition","footnoteDefinition"]);function Jl(e,r,t){var a,u,i;let{node:n}=e;if(uf(e))return Pr(r.originalText.slice(n.position.start.offset,n.position.end.offset)).map(o=>o.type==="word"?o.value:vt(e,o.value,r.proseWrap,!0));switch(n.type){case"front-matter":return r.originalText.slice(n.position.start.offset,n.position.end.offset);case"root":return n.children.length===0?"":[Xn(rf(e,r,t)),L];case"paragraph":return Y(e,r,t,{postprocessor:Br});case"sentence":return Y(e,r,t);case"word":{let o=N(!1,N(!1,n.value,"*","\\*"),new RegExp([`(^|${Te.source})(_+)`,`(_+)(${Te.source}|$)`].join("|"),"g"),(c,f,D,h,p)=>N(!1,D?`${f}${D}`:`${h}${p}`,"_","\\_")),s=(c,f,D)=>c.type==="sentence"&&D===0,l=(c,f,D)=>Ft(c.children[D-1]);return o!==n.value&&(e.match(void 0,s,l)||e.match(void 0,s,(c,f,D)=>c.type==="emphasis"&&D===0,l))&&(o=o.replace(/^(\\?[*_])+/,c=>N(!1,c,"\\",""))),o}case"whitespace":{let{next:o}=e,s=o&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(o.value)?"never":r.proseWrap;return vt(e,n.value,s)}case"emphasis":{let o;if(Ft(n.children[0]))o=r.originalText[n.position.start.offset];else{let{previous:s,next:l}=e;o=(s==null?void 0:s.type)==="sentence"&&((a=M(!1,s.children,-1))==null?void 0:a.type)==="word"&&!M(!1,s.children,-1).hasTrailingPunctuation||(l==null?void 0:l.type)==="sentence"&&((u=l.children[0])==null?void 0:u.type)==="word"&&!l.children[0].hasLeadingPunctuation||e.hasAncestor(f=>f.type==="emphasis")?"*":"_"}return[o,Y(e,r,t),o]}case"strong":return["**",Y(e,r,t),"**"];case"delete":return["~~",Y(e,r,t),"~~"];case"inlineCode":{let o=r.proseWrap==="preserve"?n.value:N(!1,n.value,` +`," "),s=Zn(o,"`"),l="`".repeat(s||1),c=o.startsWith("`")||o.endsWith("`")||/^[\n ]/.test(o)&&/[\n ]$/.test(o)&&/[^\n ]/.test(o)?" ":"";return[l,c,o,c,l]}case"wikiLink":{let o="";return r.proseWrap==="preserve"?o=n.value:o=N(!1,n.value,/[\t\n]+/g," "),["[[",o,"]]"]}case"link":switch(r.originalText[n.position.start.offset]){case"<":{let o="mailto:";return["<",n.url.startsWith(o)&&r.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+o.length)!==o?n.url.slice(o.length):n.url,">"]}case"[":return["[",Y(e,r,t),"](",Et(n.url,")"),Ir(n.title,r),")"];default:return r.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return["![",n.alt||"","](",Et(n.url,")"),Ir(n.title,r),")"];case"blockquote":return["> ",ve("> ",Y(e,r,t))];case"heading":return["#".repeat(n.depth)+" ",Y(e,r,t)];case"code":{if(n.isIndented){let l=" ".repeat(4);return ve(l,[l,Ee(n.value,L)])}let o=r.__inJsTemplate?"~":"`",s=o.repeat(Math.max(3,Sr(n.value,o)+1));return[s,n.lang||"",n.meta?" "+n.meta:"",L,Ee(Lr(n,r.originalText),L),L,s]}case"html":{let{parent:o,isLast:s}=e,l=o.type==="root"&&s?n.value.trimEnd():n.value,c=/^$/s.test(l);return Ee(l,c?L:qe(rr))}case"list":{let o=xu(n,e.parent),s=hu(n,r);return Y(e,r,t,{processor(l){let c=D(),f=l.node;if(f.children.length===2&&f.children[1].type==="html"&&f.children[0].position.start.column!==f.children[1].position.start.column)return[c,Au(l,r,t,c)];return[c,ve(" ".repeat(c.length),Au(l,r,t,c))];function D(){let h=n.ordered?(l.isFirst?n.start:s?1:n.start+l.index)+(o%2===0?". ":") "):o%2===0?"- ":"* ";return n.isAligned||n.hasIndentedCodeblock?Ql(h,r):h}}})}case"thematicBreak":{let{ancestors:o}=e,s=o.findIndex(c=>c.type==="list");return s===-1?"---":xu(o[s],o[s+1])%2===0?"***":"---"}case"linkReference":return["[",Y(e,r,t),"]",n.referenceType==="full"?Ct(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":switch(n.referenceType){case"full":return["![",n.alt||"","]",Ct(n)];default:return["![",n.alt,"]",n.referenceType==="collapsed"?"[]":""]}case"definition":{let o=r.proseWrap==="always"?qr:" ";return Qe([Ct(n),":",Je([o,Et(n.url),n.title===null?"":[o,Ir(n.title,r,!1)]])])}case"footnote":return["[^",Y(e,r,t),"]"];case"footnoteReference":return qu(n);case"footnoteDefinition":{let o=n.children.length===1&&n.children[0].type==="paragraph"&&(r.proseWrap==="never"||r.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[qu(n),": ",o?Y(e,r,t):Qe([ve(" ".repeat(4),Y(e,r,t,{processor:({isFirst:s})=>s?Qe([er,t()]):t()})),((i=e.next)==null?void 0:i.type)==="footnoteDefinition"?er:""])]}case"table":return ef(e,r,t);case"tableCell":return Y(e,r,t);case"break":return/\s/.test(r.originalText[n.position.start.offset])?[" ",qe(rr)]:["\\",L];case"liquidNode":return Ee(n.value,L);case"import":case"export":case"jsx":return n.value;case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",L,n.value?[Ee(n.value,L),L]:"","$$"];case"inlineMath":return r.originalText.slice(Se(n),_e(n));case"tableRow":case"listItem":case"text":default:throw new tu(n,"Markdown")}}function Au(e,r,t,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,Y(e,r,t,{processor({node:i,isFirst:o}){if(o&&i.type!=="list")return ve(" ".repeat(u.length),t());let s=" ".repeat(of(r.tabWidth-n.length,0,3));return[s,ve(s,t())]}})]}function Ql(e,r){let t=n();return e+" ".repeat(t>=4?0:t);function n(){let a=e.length%r.tabWidth;return a===0?0:r.tabWidth-a}}function xu(e,r){return Zl(e,r,t=>t.ordered===e.ordered)}function Zl(e,r,t){let n=-1;for(let a of r.children)if(a.type===e.type&&t(a)?n++:n=-1,a===e)return n}function ef(e,r,t){let{node:n}=e,a=[],u=e.map(()=>e.map(({index:f})=>{let D=Qn(t(),r).formatted,h=nr(D);return a[f]=Math.max(a[f]||3,h),{text:D,width:h}},"children"),"children"),i=s(!1);if(r.proseWrap!=="never")return[Ze,i];let o=s(!0);return[Ze,Qe(Un(o,i))];function s(f){let D=[c(u[0],f),l(f)];return u.length>1&&D.push(tr(Re,u.slice(1).map(h=>c(h,f)))),tr(Re,D)}function l(f){return`| ${a.map((h,p)=>{let d=n.align[p],m=d==="center"||d==="left"?":":"-",F=d==="center"||d==="right"?":":"-",y=f?"-":"-".repeat(h-2);return`${m}${y}${F}`}).join(" | ")} |`}function c(f,D){return`| ${f.map(({text:p,width:d},m)=>{if(D)return p;let F=a[m]-d,y=n.align[m],v=0;y==="right"?v=F:y==="center"&&(v=Math.floor(F/2));let B=F-v;return`${" ".repeat(v)}${p}${" ".repeat(B)}`}).join(" | ")} |`}}function rf(e,r,t){let n=[],a=null,{children:u}=e.node;for(let[i,o]of u.entries())switch(bt(o)){case"start":a===null&&(a={index:i,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:i,offset:o.position.start.offset}}),a=null);break;default:break}return Y(e,r,t,{processor({index:i}){if(n.length>0){let o=n[0];if(i===o.start.index)return[ku(u[o.start.index]),r.originalText.slice(o.start.offset,o.end.offset),ku(u[o.end.index])];if(o.start.indexo,processor:u=()=>t()}=n,i=[];return e.each(()=>{let o=u(e);o!==!1&&(i.length>0&&tf(e)&&(i.push(L),(nf(e,r)||Bu(e))&&i.push(L),Bu(e)&&i.push(L)),i.push(o))},"children"),a(i)}function ku(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function bt(e){let r;if(e.type==="html")r=e.value.match(/^$/);else{let t;e.type==="esComment"?t=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(t=e.children[0]),t&&(r=t.value.match(/^prettier-ignore(?:-(start|end))?$/))}return r?r[1]||"next":!1}function tf({node:e,parent:r}){let t=mt.has(e.type),n=e.type==="html"&&Or.has(r.type);return!t&&!n}function wu(e,r){return e.type==="listItem"&&(e.spread||r.originalText.charAt(e.position.end.offset-1)===` +`)}function nf({node:e,previous:r,parent:t},n){if(wu(r,n))return!0;let i=r.type===e.type&&Xl.has(e.type),o=t.type==="listItem"&&!wu(t,n),s=bt(r)==="next",l=e.type==="html"&&r.type==="html"&&r.position.end.line+1===e.position.start.line,c=e.type==="html"&&t.type==="listItem"&&r.type==="paragraph"&&r.position.end.line+1===e.position.start.line;return!(i||o||s||l||c)}function Bu({node:e,previous:r}){let t=r.type==="list",n=e.type==="code"&&e.isIndented;return t&&n}function uf(e){let r=e.findAncestor(t=>t.type==="linkReference"||t.type==="imageReference");return r&&(r.type!=="linkReference"||r.referenceType!=="full")}var af=(e,r)=>{for(let t of r)e=N(!1,e,t,encodeURIComponent(t));return e};function Et(e,r=[]){let t=[" ",...Array.isArray(r)?r:[r]];return new RegExp(t.map(n=>`\\${n}`).join("|")).test(e)?`<${af(e,"<>")}>`:e}function Ir(e,r,t=!0){if(!e)return"";if(t)return" "+Ir(e,r,!1);if(e=N(!1,e,/\\(?=["')])/g,""),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=ru(e,r.singleQuote);return e=N(!1,e,"\\","\\\\"),e=N(!1,e,n,`\\${n}`),`${n}${e}${n}`}function of(e,r,t){return et?t:e}function sf(e){return e.index>0&&bt(e.previous)==="next"}function Ct(e){return`[${(0,Tu.default)(e.label)}]`}function qu(e){return`[^${e.label}]`}var cf={preprocess:Eu,print:Jl,embed:mu,massageAstNode:cu,hasPrettierIgnore:sf,insertPragma:au,getVisitorKeys:vu},Su=cf;var _u=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}];var yt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var lf={proseWrap:yt.proseWrap,singleQuote:yt.singleQuote},Ou=lf;var _n={};Pn(_n,{markdown:()=>km,mdx:()=>wm,remark:()=>km});var Kc=Ne(Lu(),1),Xc=Ne(Ku(),1),Jc=Ne(Gs(),1),Qc=Ne(Nc(),1);var gm=/^import\s/,vm=/^export\s/,Rc="[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*|",Uc=/|/,Em=/^{\s*\/\*(.*)\*\/\s*}/,Cm=` -`,zc=e=>gm.test(e),Sn=e=>vm.test(e),Uc=(e,r)=>{let t=r.indexOf(Cm),n=r.slice(0,t);if(Sn(n)||zc(n))return e(n)({type:Sn(n)?"export":"import",value:n})},Mc=(e,r)=>{let t=Em.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};Uc.locator=e=>Sn(e)||zc(e)?-1:1;Mc.locator=(e,r)=>e.indexOf("{",r);var Yc=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:a}=e.prototype;r.esSyntax=Uc,n.esComment=Mc,t.splice(t.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};function bm(){return e=>be(e,(r,t,[n])=>r.type!=="html"||Rc.test(r.value)||Lr.has(n.type)?r:{...r,type:"jsx"})}var Vc=bm;var ym=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let a=or(n);if(a.frontMatter)return t(a.frontMatter.raw)(a.frontMatter)}r.onlyAtStart=!0},$c=ym;var Am=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,a){let u=a.match(/^({%.*?%}|{{.*?}})/s);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}t.locator=function(n,a){return n.indexOf("{",a)}},jc=Am;var xm=function(){let e="wikiLink",r=/^\[\[(?.+?)]]/s,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=a;function a(u,i){let o=r.exec(i);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}a.locator=function(u,i){return u.indexOf("[",i)}},Gc=xm;function Qc({isMDX:e}){return r=>{let t=(0,Kc.default)().use(Hc.default,{commonmark:!0,...e&&{blocks:[Nc]}}).use(Xc.default).use($c).use(Jc.default).use(e?Yc:Wc).use(jc).use(e?Vc:Wc).use(Gc);return t.run(t.parse(r))}}function Wc(){}var Zc={astFormat:"mdast",hasPragma:Du,locStart:Te,locEnd:Se},km={...Zc,parse:Qc({isMDX:!1})},wm={...Zc,parse:Qc({isMDX:!0})};var el=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}];var Ln={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Bm={proseWrap:Ln.proseWrap,singleQuote:Ln.singleQuote},rl=Bm;var qm={mdast:_u};var K2=On;export{K2 as default,el as languages,rl as options,_n as parsers,qm as printers}; +`,zc=e=>gm.test(e),Sn=e=>vm.test(e),Mc=(e,r)=>{let t=r.indexOf(Cm),n=r.slice(0,t);if(Sn(n)||zc(n))return e(n)({type:Sn(n)?"export":"import",value:n})},Yc=(e,r)=>{let t=Em.exec(r);if(t)return e(t[0])({type:"esComment",value:t[1].trim()})};Mc.locator=e=>Sn(e)||zc(e)?-1:1;Yc.locator=(e,r)=>e.indexOf("{",r);var Vc=function(){let{Parser:e}=this,{blockTokenizers:r,blockMethods:t,inlineTokenizers:n,inlineMethods:a}=e.prototype;r.esSyntax=Mc,n.esComment=Yc,t.splice(t.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};var bm=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=r;function r(t,n){let a=ar(n);if(a.frontMatter)return t(a.frontMatter.raw)(a.frontMatter)}r.onlyAtStart=!0},Gc=bm;function ym(){return e=>be(e,(r,t,[n])=>r.type!=="html"||Uc.test(r.value)||Or.has(n.type)?r:{...r,type:"jsx"})}var $c=ym;var Am=function(){let e=this.Parser.prototype,r=e.inlineMethods;r.splice(r.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=t;function t(n,a){let u=a.match(/^({%.*?%}|{{.*?}})/s);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}t.locator=function(n,a){return n.indexOf("{",a)}},jc=Am;var xm=function(){let e="wikiLink",r=/^\[\[(?.+?)]]/s,t=this.Parser.prototype,n=t.inlineMethods;n.splice(n.indexOf("link"),0,e),t.inlineTokenizers.wikiLink=a;function a(u,i){let o=r.exec(i);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}a.locator=function(u,i){return u.indexOf("[",i)}},Wc=xm;function Zc({isMDX:e}){return r=>{let t=(0,Qc.default)().use(Jc.default,{commonmark:!0,...e&&{blocks:[Rc]}}).use(Kc.default).use(Gc).use(Xc.default).use(e?Vc:Hc).use(jc).use(e?$c:Hc).use(Wc);return t.run(t.parse(r))}}function Hc(){}var el={astFormat:"mdast",hasPragma:iu,locStart:Se,locEnd:_e},km={...el,parse:Zc({isMDX:!1})},wm={...el,parse:Zc({isMDX:!0})};var Bm={mdast:Su};var KE=On;export{KE as default,_u as languages,Ou as options,_n as parsers,Bm as printers}; diff --git a/node_modules/prettier/plugins/meriyah.js b/node_modules/prettier/plugins/meriyah.js index e9758a9..fe7e97a 100644 --- a/node_modules/prettier/plugins/meriyah.js +++ b/node_modules/prettier/plugins/meriyah.js @@ -1,5 +1,5 @@ -(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.meriyah=e()}})(function(){"use strict";var Ie=Object.create;var L2=Object.defineProperty;var Ne=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty;var Ue=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),Pu=(u,e)=>{for(var n in e)L2(u,n,{get:e[n],enumerable:!0})},Eu=(u,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of Ve(e))!Oe.call(u,t)&&t!==n&&L2(u,t,{get:()=>e[t],enumerable:!(i=Ne(e,t))||i.enumerable});return u};var Me=(u,e,n)=>(n=u!=null?Ie(Re(u)):{},Eu(e||!u||!u.__esModule?L2(n,"default",{value:u,enumerable:!0}):n,u)),Je=u=>Eu(L2({},"__esModule",{value:!0}),u);var be=Ue(a2=>{"use strict";Object.defineProperty(a2,"__esModule",{value:!0});a2.extract=D0;a2.parse=C0;a2.parseWithComments=De;a2.print=P0;a2.strip=b0;var g0=/\*\/$/,y0=/^\/\*\*?/,he=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,k0=/(^|\s+)\/\/([^\r\n]*)/g,ge=/^(\r?\n)+/,h0=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,ye=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,A0=/(\r?\n|^) *\* ?/g,Ae=[];function D0(u){let e=u.match(he);return e?e[0].trimLeft():""}function b0(u){let e=u.match(he);return e&&e[0]?u.substring(e[0].length):u}function C0(u){return De(u).pragmas}function De(u){let e=` -`;u=u.replace(y0,"").replace(g0,"").replace(A0,"$1");let n="";for(;n!==u;)n=u,u=u.replace(h0,`${e}$1 $2${e}`);u=u.replace(ge,"").trimRight();let i=Object.create(null),t=u.replace(ye,"").replace(ge,"").trimRight(),o;for(;o=ye.exec(u);){let l=o[2].replace(k0,"");typeof i[o[1]]=="string"||Array.isArray(i[o[1]])?i[o[1]]=Ae.concat(i[o[1]],l):i[o[1]]=l}return{comments:t,pragmas:i}}function P0({comments:u="",pragmas:e={}}){let n=` -`,i="/**",t=" *",o=" */",l=Object.keys(e),f=l.flatMap(a=>ke(a,e[a])).map(a=>`${t} ${a}${n}`).join("");if(!u){if(l.length===0)return"";if(l.length===1&&!Array.isArray(e[l[0]])){let a=e[l[0]];return`${i} ${ke(l[0],a)[0]}${o}`}}let c=u.split(n).map(a=>`${t} ${a}`).join(n)+n;return i+n+(u?c:"")+(u&&l.length?t+n:"")+f+o}function ke(u,e){return Ae.concat(e).map(n=>`@${u} ${n}`.trim())}});var z0={};Pu(z0,{parsers:()=>Cu});var Cu={};Pu(Cu,{meriyah:()=>X0});var je={0:"Unexpected token",28:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"Unexpected token `#`",4:"Illegal Unicode escape sequence",5:"Invalid code point %0",6:"Invalid hexadecimal escape sequence",8:"Octal literals are not allowed in strict mode",7:"Decimal integer literals with a leading zero are forbidden in strict mode",9:"Expected number in radix %0",146:"Invalid left-hand side assignment to a destructible right-hand side",10:"Non-number found after exponent indicator",11:"Invalid BigIntLiteral",12:"No identifiers allowed directly after numeric literal",13:"Escapes \\8 or \\9 are not syntactically valid escapes",14:"Unterminated string literal",15:"Unterminated template literal",16:"Multiline comment was not closed properly",17:"The identifier contained dynamic unicode escape that was not closed",18:"Illegal character '%0'",19:"Missing hexadecimal digits",20:"Invalid implicit octal",21:"Invalid line break in string literal",22:"Only unicode escapes are legal in identifier names",23:"Expected '%0'",24:"Invalid left-hand side in assignment",25:"Invalid left-hand side in async arrow",26:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',27:"Member access on super must be in a method",29:"Await expression not allowed in formal parameter",30:"Yield expression not allowed in formal parameter",93:"Unexpected token: 'escaped keyword'",31:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",120:"Async functions can only be declared at the top level or inside a block",32:"Unterminated regular expression",33:"Unexpected regular expression flag",34:"Duplicate regular expression flag '%0'",35:"%0 functions must have exactly %1 argument%2",36:"Setter function argument must not be a rest parameter",37:"%0 declaration must have a name in this context",38:"Function name may not contain any reserved words or be eval or arguments in strict mode",39:"The rest operator is missing an argument",40:"A getter cannot be a generator",41:"A setter cannot be a generator",42:"A computed property name must be followed by a colon or paren",131:"Object literal keys that are strings or numbers must be a method or have a colon",44:"Found `* async x(){}` but this should be `async * x(){}`",43:"Getters and setters can not be generators",45:"'%0' can not be generator method",46:"No line break is allowed after '=>'",47:"The left-hand side of the arrow can only be destructed through assignment",48:"The binding declaration is not destructible",49:"Async arrow can not be followed by new expression",50:"Classes may not have a static property named 'prototype'",51:"Class constructor may not be a %0",52:"Duplicate constructor method in class",53:"Invalid increment/decrement operand",54:"Invalid use of `new` keyword on an increment/decrement expression",55:"`=>` is an invalid assignment target",56:"Rest element may not have a trailing comma",57:"Missing initializer in %0 declaration",58:"'for-%0' loop head declarations can not have an initializer",59:"Invalid left-hand side in for-%0 loop: Must have a single binding",60:"Invalid shorthand property initializer",61:"Property name __proto__ appears more than once in object literal",62:"Let is disallowed as a lexically bound name",63:"Invalid use of '%0' inside new expression",64:"Illegal 'use strict' directive in function with non-simple parameter list",65:'Identifier "let" disallowed as left-hand side expression in strict mode',66:"Illegal continue statement",67:"Illegal break statement",68:"Cannot have `let[...]` as a var name in strict mode",69:"Invalid destructuring assignment target",70:"Rest parameter may not have a default initializer",71:"The rest argument must the be last parameter",72:"Invalid rest argument",74:"In strict mode code, functions can only be declared at top level or inside a block",75:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",76:"Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",77:"Class declaration can't appear in single-statement context",78:"Invalid left-hand side in for-%0",79:"Invalid assignment in for-%0",80:"for await (... of ...) is only valid in async functions and async generators",81:"The first token after the template expression should be a continuation of the template",83:"`let` declaration not allowed here and `let` cannot be a regular var name in strict mode",82:"`let \n [` is a restricted production at the start of a statement",84:"Catch clause requires exactly one parameter, not more (and no trailing comma)",85:"Catch clause parameter does not support default values",86:"Missing catch or finally after try",87:"More than one default clause in switch statement",88:"Illegal newline after throw",89:"Strict mode code may not include a with statement",90:"Illegal return statement",91:"The left hand side of the for-header binding declaration is not destructible",92:"new.target only allowed within functions",94:"'#' not followed by identifier",100:"Invalid keyword",99:"Can not use 'let' as a class name",98:"'A lexical declaration can't define a 'let' binding",97:"Can not use `let` as variable name in strict mode",95:"'%0' may not be used as an identifier in this context",96:"Await is only valid in async functions",101:"The %0 keyword can only be used with the module goal",102:"Unicode codepoint must not be greater than 0x10FFFF",103:"%0 source must be string",104:"Only a identifier can be used to indicate alias",105:"Only '*' or '{...}' can be imported after default",106:"Trailing decorator may be followed by method",107:"Decorators can't be used with a constructor",109:"HTML comments are only allowed with web compatibility (Annex B)",110:"The identifier 'let' must not be in expression position in strict mode",111:"Cannot assign to `eval` and `arguments` in strict mode",112:"The left-hand side of a for-of loop may not start with 'let'",113:"Block body arrows can not be immediately invoked without a group",114:"Block body arrows can not be immediately accessed without a group",115:"Unexpected strict mode reserved word",116:"Unexpected eval or arguments in strict mode",117:"Decorators must not be followed by a semicolon",118:"Calling delete on expression not allowed in strict mode",119:"Pattern can not have a tail",121:"Can not have a `yield` expression on the left side of a ternary",122:"An arrow function can not have a postfix update operator",123:"Invalid object literal key character after generator star",124:"Private fields can not be deleted",126:"Classes may not have a field called constructor",125:"Classes may not have a private element named constructor",127:"A class field initializer may not contain arguments",128:"Generators can only be declared at the top level or inside a block",129:"Async methods are a restricted production and cannot have a newline following it",130:"Unexpected character after object literal property name",132:"Invalid key token",133:"Label '%0' has already been declared",134:"continue statement must be nested within an iteration statement",135:"Undefined label '%0'",136:"Trailing comma is disallowed inside import(...) arguments",137:"import() requires exactly one argument",138:"Cannot use new with import(...)",139:"... is not allowed in import()",140:"Expected '=>'",141:"Duplicate binding '%0'",142:"Cannot export a duplicate name '%0'",145:"Duplicate %0 for-binding",143:"Exported binding '%0' needs to refer to a top-level declared variable",144:"Unexpected private field",148:"Numeric separators are not allowed at the end of numeric literals",147:"Only one underscore is allowed as numeric separator",149:"JSX value should be either an expression or a quoted JSX text",150:"Expected corresponding JSX closing tag for %0",151:"Adjacent JSX elements must be wrapped in an enclosing tag",152:"JSX attributes must only be assigned a non-empty 'expression'",153:"'%0' has already been declared",154:"'%0' shadowed a catch clause binding",155:"Dot property must be an identifier",156:"Encountered invalid input after spread/rest argument",157:"Catch without try",158:"Finally without try",159:"Expected corresponding closing tag for JSX fragment",160:"Coalescing and logical operators used together in the same expression must be disambiguated with parentheses",161:"Invalid tagged template on optional chain",162:"Invalid optional chain from super property",163:"Invalid optional chain from new expression",164:'Cannot use "import.meta" outside a module',165:"Leading decorators must be attached to a class declaration"},k2=class extends SyntaxError{constructor(e,n,i,t,...o){let l="["+n+":"+i+"]: "+je[t].replace(/%(\d+)/g,(f,c)=>o[c]);super(`${l}`),this.index=e,this.line=n,this.column=i,this.description=l,this.loc={line:n,column:i}}};function d(u,e,...n){throw new k2(u.index,u.line,u.column,e,...n)}function z2(u){throw new k2(u.index,u.line,u.column,u.type,u.params)}function h2(u,e,n,i,...t){throw new k2(u,e,n,i,...t)}function A2(u,e,n,i){throw new k2(u,e,n,i)}var E2=((u,e)=>{let n=new Uint32Array(104448),i=0,t=0;for(;i<3540;){let o=u[i++];if(o<0)t-=o;else{let l=u[i++];o&2&&(l=e[l]),o&1?n.fill(l,t,t+=u[i++]):n[t++]=l}}return n})([-1,2,24,2,25,2,5,-1,0,77595648,3,44,2,3,0,14,2,57,2,58,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,59,3,0,4,0,4294966523,3,0,4,2,16,2,60,2,0,0,4294836735,0,3221225471,0,4294901942,2,61,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,17,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,131,2,6,2,56,-1,2,37,0,4294443263,2,1,3,0,3,0,4294901711,2,39,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,2,194,2,3,0,3825204735,0,123747807,0,65487,0,4294828015,0,4092591615,0,1080049119,0,458703,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,66,0,4284449919,0,851904,2,4,2,11,0,67076095,-1,2,67,0,1073741743,0,4093591391,-1,0,50331649,0,3265266687,2,32,0,4294844415,0,4278190047,2,18,2,129,-1,3,0,2,2,21,2,0,2,9,2,0,2,14,2,15,3,0,10,2,69,2,0,2,70,2,71,2,72,2,0,2,73,2,0,2,10,0,261632,2,23,3,0,2,2,12,2,4,3,0,18,2,74,2,5,3,0,2,2,75,0,2088959,2,27,2,8,0,909311,3,0,2,0,814743551,2,41,0,67057664,3,0,2,2,40,2,0,2,28,2,0,2,29,2,7,0,268374015,2,26,2,49,2,0,2,76,0,134153215,-1,2,6,2,0,2,7,0,2684354559,0,67044351,0,3221160064,0,1,-1,3,0,2,2,42,0,1046528,3,0,3,2,8,2,0,2,51,0,4294960127,2,9,2,38,2,10,0,4294377472,2,11,3,0,7,0,4227858431,3,0,8,2,12,2,0,2,78,2,9,2,0,2,79,2,80,2,81,-1,2,124,0,1048577,2,82,2,13,-1,2,13,0,131042,2,83,2,84,2,85,2,0,2,33,-83,2,0,2,53,2,7,3,0,4,0,1046559,2,0,2,14,2,0,0,2147516671,2,20,3,86,2,2,0,-16,2,87,0,524222462,2,4,2,0,0,4269801471,2,4,2,0,2,15,2,77,2,16,3,0,2,2,47,2,0,-1,2,17,-16,3,0,206,-2,3,0,655,2,18,3,0,36,2,68,-1,2,17,2,9,3,0,8,2,89,2,121,2,0,0,3220242431,3,0,3,2,19,2,90,2,91,3,0,2,2,92,2,0,2,93,2,94,2,0,0,4351,2,0,2,8,3,0,2,0,67043391,0,3909091327,2,0,2,22,2,8,2,18,3,0,2,0,67076097,2,7,2,0,2,20,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,97,2,98,2,15,2,21,3,0,3,0,67057663,3,0,349,2,99,2,100,2,6,-264,3,0,11,2,22,3,0,2,2,31,-1,0,3774349439,2,101,2,102,3,0,2,2,19,2,103,3,0,10,2,9,2,17,2,0,2,45,2,0,2,30,2,104,2,23,0,1638399,2,172,2,105,3,0,3,2,18,2,24,2,25,2,5,2,26,2,0,2,7,2,106,-1,2,107,2,108,2,109,-1,3,0,3,2,11,-2,2,0,2,27,-3,2,150,-4,2,18,2,0,2,35,0,1,2,0,2,62,2,28,2,11,2,9,2,0,2,110,-1,3,0,4,2,9,2,21,2,111,2,6,2,0,2,112,2,0,2,48,-4,3,0,9,2,20,2,29,2,30,-4,2,113,2,114,2,29,2,20,2,7,-2,2,115,2,29,2,31,-2,2,0,2,116,-2,0,4277137519,0,2269118463,-1,3,18,2,-1,2,32,2,36,2,0,3,29,2,2,34,2,19,-3,3,0,2,2,33,-1,2,0,2,34,2,0,2,34,2,0,2,46,-10,2,0,0,203775,-2,2,18,2,43,2,35,-2,2,17,2,117,2,20,3,0,2,2,36,0,2147549120,2,0,2,11,2,17,2,135,2,0,2,37,2,52,0,5242879,3,0,2,0,402644511,-1,2,120,0,1090519039,-2,2,122,2,38,2,0,0,67045375,2,39,0,4226678271,0,3766565279,0,2039759,-4,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,40,2,41,-1,2,10,2,42,-6,2,0,2,11,-3,3,0,2,0,2147484671,2,125,0,4190109695,2,50,-2,2,126,0,4244635647,0,27,2,0,2,7,2,43,2,0,2,63,-1,2,0,2,40,-8,2,54,2,44,0,67043329,2,127,2,45,0,8388351,-2,2,128,0,3028287487,2,46,2,130,0,33259519,2,41,-9,2,20,-5,2,64,-2,3,0,28,2,31,-3,3,0,3,2,47,3,0,6,2,48,-85,3,0,33,2,47,-126,3,0,18,2,36,-269,3,0,17,2,40,2,7,2,41,-2,2,17,2,49,2,0,2,20,2,50,2,132,2,23,-21,3,0,2,-4,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,196635,3,0,191,2,51,3,0,38,2,29,-1,2,33,-279,3,0,8,2,7,-1,2,133,2,52,3,0,11,2,6,-72,3,0,3,2,134,0,1677656575,-166,0,4161266656,0,4071,0,15360,-4,0,28,-13,3,0,2,2,37,2,0,2,136,2,137,2,55,2,0,2,138,2,139,2,140,3,0,10,2,141,2,142,2,15,3,37,2,3,53,2,3,54,2,0,4294954999,2,0,-16,2,0,2,88,2,0,0,2105343,0,4160749584,0,65534,-42,0,4194303871,0,2011,-6,2,0,0,1073684479,0,17407,-11,2,0,2,31,-40,3,0,6,0,8323103,-1,3,0,2,2,42,-37,2,55,2,144,2,145,2,146,2,147,2,148,-105,2,24,-32,3,0,1334,2,9,-1,3,0,129,2,27,3,0,6,2,9,3,0,180,2,149,3,0,233,0,1,-96,3,0,16,2,9,-47,3,0,154,2,56,-22381,3,0,7,2,23,-6130,3,5,2,-1,0,69207040,3,44,2,3,0,14,2,57,2,58,-3,0,3168731136,0,4294956864,2,1,2,0,2,59,3,0,4,0,4294966275,3,0,4,2,16,2,60,2,0,2,33,-1,2,17,2,61,-1,2,0,2,56,0,4294885376,3,0,2,0,3145727,0,2617294944,0,4294770688,2,23,2,62,3,0,2,0,131135,2,95,0,70256639,0,71303167,0,272,2,40,2,56,-1,2,37,2,30,-1,2,96,2,63,0,4278255616,0,4294836227,0,4294549473,0,600178175,0,2952806400,0,268632067,0,4294543328,0,57540095,0,1577058304,0,1835008,0,4294688736,2,65,2,64,0,33554435,2,123,2,65,2,151,0,131075,0,3594373096,0,67094296,2,64,-1,0,4294828e3,0,603979263,2,160,0,3,0,4294828001,0,602930687,2,183,0,393219,0,4294828016,0,671088639,0,2154840064,0,4227858435,0,4236247008,2,66,2,36,-1,2,4,0,917503,2,36,-1,2,67,0,537788335,0,4026531935,-1,0,1,-1,2,32,2,68,0,7936,-3,2,0,0,2147485695,0,1010761728,0,4292984930,0,16387,2,0,2,14,2,15,3,0,10,2,69,2,0,2,70,2,71,2,72,2,0,2,73,2,0,2,11,-1,2,23,3,0,2,2,12,2,4,3,0,18,2,74,2,5,3,0,2,2,75,0,253951,3,19,2,0,122879,2,0,2,8,0,276824064,-2,3,0,2,2,40,2,0,0,4294903295,2,0,2,29,2,7,-1,2,17,2,49,2,0,2,76,2,41,-1,2,20,2,0,2,27,-2,0,128,-2,2,77,2,8,0,4064,-1,2,119,0,4227907585,2,0,2,118,2,0,2,48,2,173,2,9,2,38,2,10,-1,0,74440192,3,0,6,-2,3,0,8,2,12,2,0,2,78,2,9,2,0,2,79,2,80,2,81,-3,2,82,2,13,-3,2,83,2,84,2,85,2,0,2,33,-83,2,0,2,53,2,7,3,0,4,0,817183,2,0,2,14,2,0,0,33023,2,20,3,86,2,-17,2,87,0,524157950,2,4,2,0,2,88,2,4,2,0,2,15,2,77,2,16,3,0,2,2,47,2,0,-1,2,17,-16,3,0,206,-2,3,0,655,2,18,3,0,36,2,68,-1,2,17,2,9,3,0,8,2,89,0,3072,2,0,0,2147516415,2,9,3,0,2,2,23,2,90,2,91,3,0,2,2,92,2,0,2,93,2,94,0,4294965179,0,7,2,0,2,8,2,91,2,8,-1,0,1761345536,2,95,0,4294901823,2,36,2,18,2,96,2,34,2,166,0,2080440287,2,0,2,33,2,143,0,3296722943,2,0,0,1046675455,0,939524101,0,1837055,2,97,2,98,2,15,2,21,3,0,3,0,7,3,0,349,2,99,2,100,2,6,-264,3,0,11,2,22,3,0,2,2,31,-1,0,2700607615,2,101,2,102,3,0,2,2,19,2,103,3,0,10,2,9,2,17,2,0,2,45,2,0,2,30,2,104,-3,2,105,3,0,3,2,18,-1,3,5,2,2,26,2,0,2,7,2,106,-1,2,107,2,108,2,109,-1,3,0,3,2,11,-2,2,0,2,27,-8,2,18,2,0,2,35,-1,2,0,2,62,2,28,2,29,2,9,2,0,2,110,-1,3,0,4,2,9,2,17,2,111,2,6,2,0,2,112,2,0,2,48,-4,3,0,9,2,20,2,29,2,30,-4,2,113,2,114,2,29,2,20,2,7,-2,2,115,2,29,2,31,-2,2,0,2,116,-2,0,4277075969,2,29,-1,3,18,2,-1,2,32,2,117,2,0,3,29,2,2,34,2,19,-3,3,0,2,2,33,-1,2,0,2,34,2,0,2,34,2,0,2,48,-10,2,0,0,197631,-2,2,18,2,43,2,118,-2,2,17,2,117,2,20,2,119,2,51,-2,2,119,2,23,2,17,2,33,2,119,2,36,0,4294901904,0,4718591,2,119,2,34,0,335544350,-1,2,120,2,121,-2,2,122,2,38,2,7,-1,2,123,2,65,0,3758161920,0,3,-4,2,0,2,27,0,2147485568,0,3,2,0,2,23,0,176,-5,2,0,2,47,2,186,-1,2,0,2,23,2,197,-1,2,0,0,16779263,-2,2,11,-7,2,0,2,121,-3,3,0,2,2,124,2,125,0,2147549183,0,2,-2,2,126,2,35,0,10,0,4294965249,0,67633151,0,4026597376,2,0,0,536871935,-1,2,0,2,40,-8,2,54,2,47,0,1,2,127,2,23,-3,2,128,2,35,2,129,2,130,0,16778239,-10,2,34,-5,2,64,-2,3,0,28,2,31,-3,3,0,3,2,47,3,0,6,2,48,-85,3,0,33,2,47,-126,3,0,18,2,36,-269,3,0,17,2,40,2,7,-3,2,17,2,131,2,0,2,23,2,48,2,132,2,23,-21,3,0,2,-4,3,0,2,0,67583,-1,2,103,-2,0,11,3,0,191,2,51,3,0,38,2,29,-1,2,33,-279,3,0,8,2,7,-1,2,133,2,52,3,0,11,2,6,-72,3,0,3,2,134,2,135,-187,3,0,2,2,37,2,0,2,136,2,137,2,55,2,0,2,138,2,139,2,140,3,0,10,2,141,2,142,2,15,3,37,2,3,53,2,3,54,2,2,143,-73,2,0,0,1065361407,0,16384,-11,2,0,2,121,-40,3,0,6,2,117,-1,3,0,2,0,2063,-37,2,55,2,144,2,145,2,146,2,147,2,148,-138,3,0,1334,2,9,-1,3,0,129,2,27,3,0,6,2,9,3,0,180,2,149,3,0,233,0,1,-96,3,0,16,2,9,-47,3,0,154,2,56,-28517,2,0,0,1,-1,2,124,2,0,0,8193,-21,2,193,0,10255,0,4,-11,2,64,2,171,-1,0,71680,-1,2,161,0,4292900864,0,805306431,-5,2,150,-1,2,157,-1,0,6144,-2,2,127,-1,2,154,-1,0,2147532800,2,151,2,165,2,0,2,164,0,524032,0,4,-4,2,190,0,205128192,0,1333757536,0,2147483696,0,423953,0,747766272,0,2717763192,0,4286578751,0,278545,2,152,0,4294886464,0,33292336,0,417809,2,152,0,1327482464,0,4278190128,0,700594195,0,1006647527,0,4286497336,0,4160749631,2,153,0,469762560,0,4171219488,0,8323120,2,153,0,202375680,0,3214918176,0,4294508592,2,153,-1,0,983584,0,48,0,58720273,0,3489923072,0,10517376,0,4293066815,0,1,0,2013265920,2,177,2,0,0,2089,0,3221225552,0,201375904,2,0,-2,0,256,0,122880,0,16777216,2,150,0,4160757760,2,0,-6,2,167,-11,0,3263218176,-1,0,49664,0,2160197632,0,8388802,-1,0,12713984,-1,2,154,2,159,2,178,-2,2,162,-20,0,3758096385,-2,2,155,0,4292878336,2,90,2,169,0,4294057984,-2,2,163,2,156,2,175,-2,2,155,-1,2,182,-1,2,170,2,124,0,4026593280,0,14,0,4292919296,-1,2,158,0,939588608,-1,0,805306368,-1,2,124,0,1610612736,2,156,2,157,2,4,2,0,-2,2,158,2,159,-3,0,267386880,-1,2,160,0,7168,-1,0,65024,2,154,2,161,2,179,-7,2,168,-8,2,162,-1,0,1426112704,2,163,-1,2,164,0,271581216,0,2149777408,2,23,2,161,2,124,0,851967,2,180,-1,2,23,2,181,-4,2,158,-20,2,195,2,165,-56,0,3145728,2,185,-4,2,166,2,124,-4,0,32505856,-1,2,167,-1,0,2147385088,2,90,1,2155905152,2,-3,2,103,2,0,2,168,-2,2,169,-6,2,170,0,4026597375,0,1,-1,0,1,-1,2,171,-3,2,117,2,64,-2,2,166,-2,2,176,2,124,-878,2,159,-36,2,172,-1,2,201,-10,2,188,-5,2,174,-6,0,4294965251,2,27,-1,2,173,-1,2,174,-2,0,4227874752,-3,0,2146435072,2,159,-2,0,1006649344,2,124,-1,2,90,0,201375744,-3,0,134217720,2,90,0,4286677377,0,32896,-1,2,158,-3,2,175,-349,2,176,0,1920,2,177,3,0,264,-11,2,157,-2,2,178,2,0,0,520617856,0,2692743168,0,36,-3,0,524284,-11,2,23,-1,2,187,-1,2,184,0,3221291007,2,178,-1,2,202,0,2158720,-3,2,159,0,1,-4,2,124,0,3808625411,0,3489628288,2,200,0,1207959680,0,3221274624,2,0,-3,2,179,0,120,0,7340032,-2,2,180,2,4,2,23,2,163,3,0,4,2,159,-1,2,181,2,177,-1,0,8176,2,182,2,179,2,183,-1,0,4290773232,2,0,-4,2,163,2,189,0,15728640,2,177,-1,2,161,-1,0,4294934512,3,0,4,-9,2,90,2,170,2,184,3,0,4,0,704,0,1849688064,2,185,-1,2,124,0,4294901887,2,0,0,130547712,0,1879048192,2,199,3,0,2,-1,2,186,2,187,-1,0,17829776,0,2025848832,0,4261477888,-2,2,0,-1,0,4286580608,-1,0,29360128,2,192,0,16252928,0,3791388672,2,38,3,0,2,-2,2,196,2,0,-1,2,103,-1,0,66584576,-1,2,191,3,0,9,2,124,-1,0,4294755328,3,0,2,-1,2,161,2,178,3,0,2,2,23,2,188,2,90,-2,0,245760,0,2147418112,-1,2,150,2,203,0,4227923456,-1,2,164,2,161,2,90,-3,0,4292870145,0,262144,2,124,3,0,2,0,1073758848,2,189,-1,0,4227921920,2,190,0,68289024,0,528402016,0,4292927536,3,0,4,-2,0,268435456,2,91,-2,2,191,3,0,5,-1,2,192,2,163,2,0,-2,0,4227923936,2,62,-1,2,155,2,95,2,0,2,154,2,158,3,0,6,-1,2,177,3,0,3,-2,0,2146959360,0,9440640,0,104857600,0,4227923840,3,0,2,0,768,2,193,2,77,-2,2,161,-2,2,119,-1,2,155,3,0,8,0,512,0,8388608,2,194,2,172,2,187,0,4286578944,3,0,2,0,1152,0,1266679808,2,191,0,576,0,4261707776,2,95,3,0,9,2,155,3,0,5,2,16,-1,0,2147221504,-28,2,178,3,0,3,-3,0,4292902912,-6,2,96,3,0,85,-33,0,4294934528,3,0,126,-18,2,195,3,0,269,-17,2,155,2,124,2,198,3,0,2,2,23,0,4290822144,-2,0,67174336,0,520093700,2,17,3,0,21,-2,2,179,3,0,3,-2,0,30720,-1,0,32512,3,0,2,0,4294770656,-191,2,174,-38,2,170,2,0,2,196,3,0,279,-8,2,124,2,0,0,4294508543,0,65295,-11,2,177,3,0,72,-3,0,3758159872,0,201391616,3,0,155,-7,2,170,-1,0,384,-1,0,133693440,-3,2,196,-2,2,26,3,0,4,2,169,-2,2,90,2,155,3,0,4,-2,2,164,-1,2,150,0,335552923,2,197,-1,0,538974272,0,2214592512,0,132e3,-10,0,192,-8,0,12288,-21,0,134213632,0,4294901761,3,0,42,0,100663424,0,4294965284,3,0,6,-1,0,3221282816,2,198,3,0,11,-1,2,199,3,0,40,-6,0,4286578784,2,0,-2,0,1006694400,3,0,24,2,35,-1,2,94,3,0,2,0,1,2,163,3,0,6,2,197,0,4110942569,0,1432950139,0,2701658217,0,4026532864,0,4026532881,2,0,2,45,3,0,8,-1,2,158,-2,2,169,0,98304,0,65537,2,170,-5,0,4294950912,2,0,2,118,0,65528,2,177,0,4294770176,2,26,3,0,4,-30,2,174,0,3758153728,-3,2,169,-2,2,155,2,188,2,158,-1,2,191,-1,2,161,0,4294754304,3,0,2,-3,0,33554432,-2,2,200,-3,2,169,0,4175478784,2,201,0,4286643712,0,4286644216,2,0,-4,2,202,-1,2,165,0,4227923967,3,0,32,-1334,2,163,2,0,-129,2,94,-6,2,163,-180,2,203,-233,2,4,3,0,96,-16,2,163,3,0,47,-154,2,165,3,0,22381,-7,2,17,3,0,6128],[4294967295,4294967291,4092460543,4294828031,4294967294,134217726,268435455,2147483647,1048575,1073741823,3892314111,134217727,1061158911,536805376,4294910143,4160749567,4294901759,4294901760,536870911,262143,8388607,4294902783,4294918143,65535,67043328,2281701374,4294967232,2097151,4294903807,4194303,255,67108863,4294967039,511,524287,131071,127,4292870143,4294902271,4294549487,33554431,1023,67047423,4294901888,4286578687,4294770687,67043583,32767,15,2047999,67043343,16777215,4294902e3,4294934527,4294966783,4294967279,2047,262083,20511,4290772991,41943039,493567,4294959104,603979775,65536,602799615,805044223,4294965206,8191,1031749119,4294917631,2134769663,4286578493,4282253311,4294942719,33540095,4294905855,4294967264,2868854591,1608515583,265232348,534519807,2147614720,1060109444,4093640016,17376,2139062143,224,4169138175,4294909951,4286578688,4294967292,4294965759,2044,4292870144,4294966272,4294967280,8289918,4294934399,4294901775,4294965375,1602223615,4294967259,4294443008,268369920,4292804608,486341884,4294963199,3087007615,1073692671,4128527,4279238655,4294902015,4294966591,2445279231,3670015,3238002687,31,63,4294967288,4294705151,4095,3221208447,4294549472,2147483648,4285526655,4294966527,4294705152,4294966143,64,4294966719,16383,3774873592,458752,536807423,67043839,3758096383,3959414372,3755993023,2080374783,4294835295,4294967103,4160749565,4087,184024726,2862017156,1593309078,268434431,268434414,4294901763,536870912,2952790016,202506752,139264,402653184,4261412864,4227922944,49152,61440,3758096384,117440512,65280,3233808384,3221225472,2097152,4294965248,32768,57152,67108864,4293918720,4290772992,25165824,57344,4227915776,4278190080,4227907584,65520,4026531840,4227858432,4160749568,3758129152,4294836224,63488,1073741824,4294967040,4194304,251658240,196608,4294963200,64512,417808,4227923712,12582912,50331648,65472,4294967168,4294966784,16,4294917120,2080374784,4096,65408,524288,65532]);function h(u){return u.column++,u.currentChar=u.source.charCodeAt(++u.index)}function Xe(u,e){if((e&64512)!==55296)return 0;let n=u.source.charCodeAt(u.index+1);return(n&64512)!==56320?0:(e=u.currentChar=65536+((e&1023)<<10)+(n&1023),E2[(e>>>5)+0]>>>e&31&1||d(u,18,G(e)),u.index++,u.column++,1)}function uu(u,e){u.currentChar=u.source.charCodeAt(++u.index),u.flags|=1,e&4||(u.column=0,u.line++)}function c2(u){u.flags|=1,u.currentChar=u.source.charCodeAt(++u.index),u.column=0,u.line++}function ze(u){return u===160||u===65279||u===133||u===5760||u>=8192&&u<=8203||u===8239||u===8287||u===12288||u===8201||u===65519}function G(u){return u<=65535?String.fromCharCode(u):String.fromCharCode(u>>>10)+String.fromCharCode(u&1023)}function H(u){return u<65?u-48:u-65+10&15}function He(u){switch(u){case 134283266:return"NumericLiteral";case 134283267:return"StringLiteral";case 86021:case 86022:return"BooleanLiteral";case 86023:return"NullLiteral";case 65540:return"RegularExpression";case 67174408:case 67174409:case 132:return"TemplateLiteral";default:return(u&143360)===143360?"Identifier":(u&4096)===4096?"Keyword":"Punctuator"}}var L=[0,0,0,0,0,0,0,0,0,0,1032,0,0,2056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,3,0,0,8192,0,0,0,256,0,33024,0,0,242,242,114,114,114,114,114,114,594,594,0,0,16384,0,0,0,0,67,67,67,67,67,67,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,1,0,0,4099,0,71,71,71,71,71,71,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,16384,0,0,0,0],Ke=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Iu=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0];function Z2(u){return u<=127?Ke[u]:E2[(u>>>5)+34816]>>>u&31&1}function U2(u){return u<=127?Iu[u]:E2[(u>>>5)+0]>>>u&31&1||u===8204||u===8205}var Nu=["SingleLine","MultiLine","HTMLOpen","HTMLClose","HashbangComment"];function $e(u){let e=u.source;u.currentChar===35&&e.charCodeAt(u.index+1)===33&&(h(u),h(u),eu(u,e,0,4,u.tokenPos,u.linePos,u.colPos))}function wu(u,e,n,i,t,o,l,f){return i&2048&&d(u,0),eu(u,e,n,t,o,l,f)}function eu(u,e,n,i,t,o,l){let{index:f}=u;for(u.tokenPos=u.index,u.linePos=u.line,u.colPos=u.column;u.index=u.source.length)return d(u,32)}let t=u.index-1,o=0,l=u.currentChar,{index:f}=u;for(;U2(l);){switch(l){case 103:o&2&&d(u,34,"g"),o|=2;break;case 105:o&1&&d(u,34,"i"),o|=1;break;case 109:o&4&&d(u,34,"m"),o|=4;break;case 117:o&16&&d(u,34,"u"),o|=16;break;case 121:o&8&&d(u,34,"y"),o|=8;break;case 115:o&32&&d(u,34,"s"),o|=32;break;case 100:o&64&&d(u,34,"d"),o|=64;break;default:d(u,33)}l=h(u)}let c=u.source.slice(f,u.index),a=u.source.slice(n,t);return u.tokenRegExp={pattern:a,flags:c},e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),u.tokenValue=Ye(u,a,c),65540}function Ye(u,e,n){try{return new RegExp(e,n)}catch{try{return new RegExp(e,n.replace("d","")),null}catch{d(u,32)}}}function Qe(u,e,n){let{index:i}=u,t="",o=h(u),l=u.index;for(;!(L[o]&8);){if(o===n)return t+=u.source.slice(l,u.index),h(u),e&512&&(u.tokenRaw=u.source.slice(i,u.index)),u.tokenValue=t,134283267;if((o&8)===8&&o===92){if(t+=u.source.slice(l,u.index),o=h(u),o<127||o===8232||o===8233){let f=Vu(u,e,o);f>=0?t+=G(f):Ru(u,f,0)}else t+=G(o);l=u.index+1}u.index>=u.end&&d(u,14),o=h(u)}d(u,14)}function Vu(u,e,n){switch(n){case 98:return 8;case 102:return 12;case 114:return 13;case 110:return 10;case 116:return 9;case 118:return 11;case 13:if(u.index1114111)return-5;return u.currentChar<1||u.currentChar!==125?-4:t}else{if(!(L[i]&64))return-4;let t=u.source.charCodeAt(u.index+1);if(!(L[t]&64))return-4;let o=u.source.charCodeAt(u.index+2);if(!(L[o]&64))return-4;let l=u.source.charCodeAt(u.index+3);return L[l]&64?(u.index+=3,u.column+=3,u.currentChar=u.source.charCodeAt(u.index),H(i)<<12|H(t)<<8|H(o)<<4|H(l)):-4}}case 56:case 57:if(!(e&256))return-3;default:return n}}function Ru(u,e,n){switch(e){case-1:return;case-2:d(u,n?2:1);case-3:d(u,13);case-4:d(u,6);case-5:d(u,102)}}function Ou(u,e){let{index:n}=u,i=67174409,t="",o=h(u);for(;o!==96;){if(o===36&&u.source.charCodeAt(u.index+1)===123){h(u),i=67174408;break}else if((o&8)===8&&o===92)if(o=h(u),o>126)t+=G(o);else{let l=Vu(u,e|1024,o);if(l>=0)t+=G(l);else if(l!==-1&&e&65536){t=void 0,o=Ze(u,o),o<0&&(i=67174408);break}else Ru(u,l,1)}else u.index=u.end&&d(u,15),o=h(u)}return h(u),u.tokenValue=t,u.tokenRaw=u.source.slice(n+1,u.index-(i===67174409?1:2)),i}function Ze(u,e){for(;e!==96;){switch(e){case 36:{let n=u.index+1;if(n=u.end&&d(u,15),e=h(u)}return e}function re(u,e){return u.index>=u.end&&d(u,0),u.index--,u.column--,Ou(u,e)}function Su(u,e,n){let i=u.currentChar,t=0,o=9,l=n&64?0:1,f=0,c=0;if(n&64)t="."+I2(u,i),i=u.currentChar,i===110&&d(u,11);else{if(i===48)if(i=h(u),(i|32)===120){for(n=136,i=h(u);L[i]&4160;){if(i===95){c||d(u,147),c=0,i=h(u);continue}c=1,t=t*16+H(i),f++,i=h(u)}(f===0||!c)&&d(u,f===0?19:148)}else if((i|32)===111){for(n=132,i=h(u);L[i]&4128;){if(i===95){c||d(u,147),c=0,i=h(u);continue}c=1,t=t*8+(i-48),f++,i=h(u)}(f===0||!c)&&d(u,f===0?0:148)}else if((i|32)===98){for(n=130,i=h(u);L[i]&4224;){if(i===95){c||d(u,147),c=0,i=h(u);continue}c=1,t=t*2+(i-48),f++,i=h(u)}(f===0||!c)&&d(u,f===0?0:148)}else if(L[i]&32)for(e&1024&&d(u,1),n=1;L[i]&16;){if(L[i]&512){n=32,l=0;break}t=t*8+(i-48),i=h(u)}else L[i]&512?(e&1024&&d(u,1),u.flags|=64,n=32):i===95&&d(u,0);if(n&48){if(l){for(;o>=0&&L[i]&4112;){if(i===95){i=h(u),(i===95||n&32)&&A2(u.index,u.line,u.index+1,147),c=1;continue}c=0,t=10*t+(i-48),i=h(u),--o}if(c&&A2(u.index,u.line,u.index+1,148),o>=0&&!Z2(i)&&i!==46)return u.tokenValue=t,e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),134283266}t+=I2(u,i),i=u.currentChar,i===46&&(h(u)===95&&d(u,0),n=64,t+="."+I2(u,u.currentChar),i=u.currentChar)}}let a=u.index,g=0;if(i===110&&n&128)g=1,i=h(u);else if((i|32)===101){i=h(u),L[i]&256&&(i=h(u));let{index:m}=u;L[i]&16||d(u,10),t+=u.source.substring(a,m)+I2(u,i),i=u.currentChar}return(u.index","(","{",".","...","}",")",";",",","[","]",":","?","'",'"',"","++","--","=","<<=",">>=",">>>=","**=","+=","-=","*=","/=","%=","^=","|=","&=","||=","&&=","??=","typeof","delete","void","!","~","+","-","in","instanceof","*","%","/","**","&&","||","===","!==","==","!=","<=",">=","<",">","<<",">>",">>>","&","|","^","var","let","const","break","case","catch","class","continue","debugger","default","do","else","export","extends","finally","for","function","if","import","new","return","super","switch","this","throw","try","while","with","implements","interface","package","private","protected","public","static","yield","as","async","await","constructor","get","set","from","of","enum","eval","arguments","escaped keyword","escaped future reserved keyword","reserved if strict","#","BigIntLiteral","??","?.","WhiteSpace","Illegal","LineTerminator","PrivateField","Template","@","target","meta","LineFeed","Escaped","JSXText"],Uu=Object.create(null,{this:{value:86113},function:{value:86106},if:{value:20571},return:{value:20574},var:{value:86090},else:{value:20565},for:{value:20569},new:{value:86109},in:{value:8738868},typeof:{value:16863277},while:{value:20580},case:{value:20558},break:{value:20557},try:{value:20579},catch:{value:20559},delete:{value:16863278},throw:{value:86114},switch:{value:86112},continue:{value:20561},default:{value:20563},instanceof:{value:8476725},do:{value:20564},void:{value:16863279},finally:{value:20568},async:{value:209007},await:{value:209008},class:{value:86096},const:{value:86092},constructor:{value:12401},debugger:{value:20562},export:{value:20566},extends:{value:20567},false:{value:86021},from:{value:12404},get:{value:12402},implements:{value:36966},import:{value:86108},interface:{value:36967},let:{value:241739},null:{value:86023},of:{value:274549},package:{value:36968},private:{value:36969},protected:{value:36970},public:{value:36971},set:{value:12403},static:{value:36972},super:{value:86111},true:{value:86022},with:{value:20581},yield:{value:241773},enum:{value:86134},eval:{value:537079927},as:{value:77934},arguments:{value:537079928},target:{value:143494},meta:{value:143495}});function Bu(u,e,n){for(;Iu[h(u)];);return u.tokenValue=u.source.slice(u.tokenPos,u.index),u.currentChar!==92&&u.currentChar<=126?Uu[u.tokenValue]||208897:nu(u,e,0,n)}function Ge(u,e){let n=Mu(u);return U2(n)||d(u,4),u.tokenValue=G(n),nu(u,e,1,L[n]&4)}function nu(u,e,n,i){let t=u.index;for(;u.index=2&&o<=11){let l=Uu[u.tokenValue];return l===void 0?208897:n?l===209008?e&4196352?121:l:e&1024?l===36972||(l&36864)===36864?122:(l&20480)===20480?e&1073741824&&!(e&8192)?l:121:143483:e&1073741824&&!(e&8192)&&(l&20480)===20480?l:l===241773?e&1073741824?143483:e&2097152?121:l:l===209007?143483:(l&36864)===36864?l:121:l}return 208897}function xe(u){return Z2(h(u))||d(u,94),131}function Mu(u){return u.source.charCodeAt(u.index+1)!==117&&d(u,4),u.currentChar=u.source.charCodeAt(u.index+=2),pe(u)}function pe(u){let e=0,n=u.currentChar;if(n===123){let l=u.index-2;for(;L[h(u)]&64;)e=e<<4|H(u.currentChar),e>1114111&&A2(l,u.line,u.index+1,102);return u.currentChar!==125&&A2(l,u.line,u.index-1,6),h(u),e}L[n]&64||d(u,6);let i=u.source.charCodeAt(u.index+1);L[i]&64||d(u,6);let t=u.source.charCodeAt(u.index+2);L[t]&64||d(u,6);let o=u.source.charCodeAt(u.index+3);return L[o]&64||d(u,6),e=H(n)<<12|H(i)<<8|H(t)<<4|H(o),u.currentChar=u.source.charCodeAt(u.index+=4),e}var Ju=[129,129,129,129,129,129,129,129,129,128,136,128,128,130,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,128,16842800,134283267,131,208897,8457015,8455751,134283267,67174411,16,8457014,25233970,18,25233971,67108877,8457016,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,21,1074790417,8456258,1077936157,8456259,22,133,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,69271571,137,20,8455497,208897,132,4096,4096,4096,4096,4096,4096,4096,208897,4096,208897,208897,4096,208897,4096,208897,4096,208897,4096,4096,4096,208897,4096,4096,208897,4096,4096,2162700,8455240,1074790415,16842801,129];function D(u,e){if(u.flags=(u.flags|1)^1,u.startPos=u.index,u.startColumn=u.column,u.startLine=u.line,u.token=ju(u,e,0),u.onToken&&u.token!==1048576){let n={start:{line:u.linePos,column:u.colPos},end:{line:u.line,column:u.column}};u.onToken(He(u.token),u.tokenPos,u.index,n)}}function ju(u,e,n){let i=u.index===0,t=u.source,o=u.index,l=u.line,f=u.column;for(;u.index=u.end)return 8457014;let s=u.currentChar;return s===61?(h(u),4194340):s!==42?8457014:h(u)!==61?8457273:(h(u),4194337)}case 8455497:return h(u)!==61?8455497:(h(u),4194343);case 25233970:{h(u);let s=u.currentChar;return s===43?(h(u),33619995):s===61?(h(u),4194338):25233970}case 25233971:{h(u);let s=u.currentChar;if(s===45){if(h(u),(n&1||i)&&u.currentChar===62){e&256||d(u,109),h(u),n=wu(u,t,n,e,3,o,l,f),o=u.tokenPos,l=u.linePos,f=u.colPos;continue}return 33619996}return s===61?(h(u),4194339):25233971}case 8457016:{if(h(u),u.index=48&&m<=57)return Su(u,e,80);if(m===46){let s=u.index+1;if(s=48&&s<=57)))return h(u),67108991}return 22}}}else{if((c^8232)<=1){n=n&-5|1,c2(u);continue}if((c&64512)===55296||E2[(c>>>5)+34816]>>>c&31&1)return(c&64512)===56320&&(c=(c&1023)<<10|c&1023|65536,E2[(c>>>5)+0]>>>c&31&1||d(u,18,G(c)),u.index++,u.currentChar=c),u.column++,u.tokenValue="",nu(u,e,0,0);if(ze(c)){h(u);continue}d(u,18,G(c))}}return 1048576}function u1(u,e){return u.startPos=u.tokenPos=u.index,u.startColumn=u.colPos=u.column,u.startLine=u.linePos=u.line,u.token=L[u.currentChar]&8192?e1(u,e):ju(u,e,0),u.token}function e1(u,e){let n=u.currentChar,i=h(u),t=u.index;for(;i!==n;)u.index>=u.end&&d(u,14),i=h(u);return i!==n&&d(u,14),u.tokenValue=u.source.slice(t,u.index),h(u),e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),134283267}function d2(u,e){if(u.startPos=u.tokenPos=u.index,u.startColumn=u.colPos=u.column,u.startLine=u.linePos=u.line,u.index>=u.end)return u.token=1048576;switch(Ju[u.source.charCodeAt(u.index)]){case 8456258:{h(u),u.currentChar===47?(h(u),u.token=25):u.token=8456258;break}case 2162700:{h(u),u.token=2162700;break}default:{let i=0;for(;u.index1&&t&32&&u.token&262144&&d(u,59,U[u.token&255]),l}function Tu(u,e,n,i,t){let{token:o,tokenPos:l,linePos:f,colPos:c}=u,a=null,g=le(u,e,n,i,t,l,f,c);return u.token===1077936157?(D(u,e|32768),a=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),(t&32||!(o&2097152))&&(u.token===274549||u.token===8738868&&(o&2097152||!(i&4)||e&1024))&&h2(l,u.line,u.index-3,58,u.token===274549?"of":"in")):(i&16||(o&2097152)>0)&&(u.token&262144)!==262144&&d(u,57,i&16?"const":"destructuring"),y(u,e,l,f,c,{type:"VariableDeclarator",id:g,init:a})}function F1(u,e,n,i,t,o,l){D(u,e);let f=((e&4194304)>0||(e&2048)>0&&(e&8192)>0)&&q(u,e,209008);P(u,e|32768,67174411),n&&(n=J(n,1));let c=null,a=null,g=0,m=null,s=u.token===86090||u.token===241739||u.token===86092,k,{token:C,tokenPos:b,linePos:E,colPos:w}=u;if(s?C===241739?(m=I(u,e,0),u.token&2240512?(u.token===8738868?e&1024&&d(u,65):m=y(u,e,b,E,w,{type:"VariableDeclaration",kind:"let",declarations:y2(u,e|134217728,n,8,32)}),u.assignable=1):e&1024?d(u,65):(s=!1,u.assignable=1,m=N(u,e,m,0,0,b,E,w),u.token===274549&&d(u,112))):(D(u,e),m=y(u,e,b,E,w,C===86090?{type:"VariableDeclaration",kind:"var",declarations:y2(u,e|134217728,n,4,32)}:{type:"VariableDeclaration",kind:"const",declarations:y2(u,e|134217728,n,16,32)}),u.assignable=1):C===1074790417?f&&d(u,80):(C&2097152)===2097152?(m=C===2162700?Y(u,e,void 0,1,0,0,2,32,b,E,w):_(u,e,void 0,1,0,0,2,32,b,E,w),g=u.destructible,e&256&&g&64&&d(u,61),u.assignable=g&16?2:1,m=N(u,e|134217728,m,0,0,u.tokenPos,u.linePos,u.colPos)):m=W(u,e|134217728,1,0,1,b,E,w),(u.token&262144)===262144){if(u.token===274549){u.assignable&2&&d(u,78,f?"await":"of"),r(u,m),D(u,e|32768),k=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),P(u,e|32768,16);let S=P2(u,e,n,i);return y(u,e,t,o,l,{type:"ForOfStatement",left:m,right:k,body:S,await:f})}u.assignable&2&&d(u,78,"in"),r(u,m),D(u,e|32768),f&&d(u,80),k=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos),P(u,e|32768,16);let M=P2(u,e,n,i);return y(u,e,t,o,l,{type:"ForInStatement",body:M,left:m,right:k})}f&&d(u,80),s||(g&8&&u.token!==1077936157&&d(u,78,"loop"),m=O(u,e|134217728,0,0,b,E,w,m)),u.token===18&&(m=e2(u,e,0,u.tokenPos,u.linePos,u.colPos,m)),P(u,e|32768,1074790417),u.token!==1074790417&&(c=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),P(u,e|32768,1074790417),u.token!==16&&(a=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),P(u,e|32768,16);let v=P2(u,e,n,i);return y(u,e,t,o,l,{type:"ForStatement",init:m,test:c,update:a,body:v})}function Yu(u,e,n){return tu(e,u.token)||d(u,115),(u.token&537079808)===537079808&&d(u,116),n&&t2(u,e,n,u.tokenValue,8,0),I(u,e,0)}function q1(u,e,n){let i=u.tokenPos,t=u.linePos,o=u.colPos;D(u,e);let l=null,{tokenPos:f,linePos:c,colPos:a}=u,g=[];if(u.token===134283267)l=X(u,e);else{if(u.token&143360){let m=Yu(u,e,n);if(g=[y(u,e,f,c,a,{type:"ImportDefaultSpecifier",local:m})],q(u,e,18))switch(u.token){case 8457014:g.push(Fu(u,e,n));break;case 2162700:qu(u,e,n,g);break;default:d(u,105)}}else switch(u.token){case 8457014:g=[Fu(u,e,n)];break;case 2162700:qu(u,e,n,g);break;case 67174411:return Zu(u,e,i,t,o);case 67108877:return Qu(u,e,i,t,o);default:d(u,28,U[u.token&255])}l=L1(u,e)}return z(u,e|32768),y(u,e,i,t,o,{type:"ImportDeclaration",specifiers:g,source:l})}function Fu(u,e,n){let{tokenPos:i,linePos:t,colPos:o}=u;return D(u,e),P(u,e,77934),(u.token&134217728)===134217728&&h2(i,u.line,u.index,28,U[u.token&255]),y(u,e,i,t,o,{type:"ImportNamespaceSpecifier",local:Yu(u,e,n)})}function L1(u,e){return q(u,e,12404),u.token!==134283267&&d(u,103,"Import"),X(u,e)}function qu(u,e,n,i){for(D(u,e);u.token&143360;){let{token:t,tokenValue:o,tokenPos:l,linePos:f,colPos:c}=u,a=I(u,e,0),g;q(u,e,77934)?((u.token&134217728)===134217728||u.token===18?d(u,104):M2(u,e,16,u.token,0),o=u.tokenValue,g=I(u,e,0)):(M2(u,e,16,t,0),g=a),n&&t2(u,e,n,o,8,0),i.push(y(u,e,l,f,c,{type:"ImportSpecifier",local:g,imported:a})),u.token!==1074790415&&P(u,e,18)}return P(u,e,1074790415),i}function Qu(u,e,n,i,t){let o=Gu(u,e,y(u,e,n,i,t,{type:"Identifier",name:"import"}),n,i,t);return o=N(u,e,o,0,0,n,i,t),o=O(u,e,0,0,n,i,t,o),D2(u,e,o,n,i,t)}function Zu(u,e,n,i,t){let o=xu(u,e,0,n,i,t);return o=N(u,e,o,0,0,n,i,t),u.token===18&&(o=e2(u,e,0,n,i,t,o)),D2(u,e,o,n,i,t)}function I1(u,e,n){let i=u.tokenPos,t=u.linePos,o=u.colPos;D(u,e|32768);let l=[],f=null,c=null,a;if(q(u,e|32768,20563)){switch(u.token){case 86106:{f=i2(u,e,n,4,1,1,0,u.tokenPos,u.linePos,u.colPos);break}case 133:case 86096:f=p2(u,e,n,1,u.tokenPos,u.linePos,u.colPos);break;case 209007:let{tokenPos:g,linePos:m,colPos:s}=u;f=I(u,e,0);let{flags:k}=u;k&1||(u.token===86106?f=i2(u,e,n,4,1,1,1,g,m,s):u.token===67174411?(f=mu(u,e,f,1,1,0,k,g,m,s),f=N(u,e,f,0,0,g,m,s),f=O(u,e,0,0,g,m,s,f)):u.token&143360&&(n&&(n=H2(u,e,u.tokenValue)),f=I(u,e,0),f=v2(u,e,n,[f],1,g,m,s)));break;default:f=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),z(u,e|32768)}return n&&l2(u,"default"),y(u,e,i,t,o,{type:"ExportDefaultDeclaration",declaration:f})}switch(u.token){case 8457014:{D(u,e);let k=null;return q(u,e,77934)&&(n&&l2(u,u.tokenValue),k=I(u,e,0)),P(u,e,12404),u.token!==134283267&&d(u,103,"Export"),c=X(u,e),z(u,e|32768),y(u,e,i,t,o,{type:"ExportAllDeclaration",source:c,exported:k})}case 2162700:{D(u,e);let k=[],C=[];for(;u.token&143360;){let{tokenPos:b,tokenValue:E,linePos:w,colPos:v}=u,M=I(u,e,0),S;u.token===77934?(D(u,e),(u.token&134217728)===134217728&&d(u,104),n&&(k.push(u.tokenValue),C.push(E)),S=I(u,e,0)):(n&&(k.push(u.tokenValue),C.push(u.tokenValue)),S=M),l.push(y(u,e,b,w,v,{type:"ExportSpecifier",local:M,exported:S})),u.token!==1074790415&&P(u,e,18)}if(P(u,e,1074790415),q(u,e,12404))u.token!==134283267&&d(u,103,"Export"),c=X(u,e);else if(n){let b=0,E=k.length;for(;b0)&8738868,g,m;for(u.assignable=2;u.token&8454144&&(g=u.token,m=g&3840,(g&524288&&f&268435456||f&524288&&g&268435456)&&d(u,160),!(m+((g===8457273)<<8)-((a===g)<<12)<=l));)D(u,e|32768),c=y(u,e,i,t,o,{type:g&524288||g&268435456?"LogicalExpression":"BinaryExpression",left:c,right:n2(u,e,n,u.tokenPos,u.linePos,u.colPos,m,g,W(u,e,0,n,1,u.tokenPos,u.linePos,u.colPos)),operator:U[g&255]});return u.token===1077936157&&d(u,24),c}function N1(u,e,n,i,t,o,l){n||d(u,0);let f=u.token;D(u,e|32768);let c=W(u,e,0,l,1,u.tokenPos,u.linePos,u.colPos);return u.token===8457273&&d(u,31),e&1024&&f===16863278&&(c.type==="Identifier"?d(u,118):n1(c)&&d(u,124)),u.assignable=2,y(u,e,i,t,o,{type:"UnaryExpression",operator:U[f&255],argument:c,prefix:!0})}function V1(u,e,n,i,t,o,l,f,c,a){let{token:g}=u,m=I(u,e,o),{flags:s}=u;if(!(s&1)){if(u.token===86106)return ue(u,e,1,n,f,c,a);if((u.token&143360)===143360)return i||d(u,0),ie(u,e,t,f,c,a)}return!l&&u.token===67174411?mu(u,e,m,t,1,0,s,f,c,a):u.token===10?(ou(u,e,g,1),l&&d(u,49),$2(u,e,u.tokenValue,m,l,t,0,f,c,a)):m}function R1(u,e,n,i,t,o,l){if(n&&(u.destructible|=256),e&2097152){D(u,e|32768),e&8388608&&d(u,30),i||d(u,24),u.token===22&&d(u,121);let f=null,c=!1;return u.flags&1||(c=q(u,e|32768,8457014),(u.token&77824||c)&&(f=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos))),u.assignable=2,y(u,e,t,o,l,{type:"YieldExpression",argument:f,delegate:c})}return e&1024&&d(u,95,"yield"),au(u,e,t,o,l)}function O1(u,e,n,i,t,o,l){if(i&&(u.destructible|=128),e&4194304||e&2048&&e&8192){n&&d(u,0),e&8388608&&h2(u.index,u.line,u.index,29),D(u,e|32768);let f=W(u,e,0,0,1,u.tokenPos,u.linePos,u.colPos);return u.token===8457273&&d(u,31),u.assignable=2,y(u,e,t,o,l,{type:"AwaitExpression",argument:f})}return e&2048&&d(u,96),au(u,e,t,o,l)}function K2(u,e,n,i,t,o){let{tokenPos:l,linePos:f,colPos:c}=u;P(u,e|32768,2162700);let a=[],g=e;if(u.token!==1074790415){for(;u.token===134283267;){let{index:m,tokenPos:s,tokenValue:k,token:C}=u,b=X(u,e);Xu(u,m,s,k)&&(e|=1024,u.flags&128&&h2(u.index,u.line,u.tokenPos,64),u.flags&64&&h2(u.index,u.line,u.tokenPos,8)),a.push(fu(u,e,b,C,s,u.linePos,u.colPos))}e&1024&&(t&&((t&537079808)===537079808&&d(u,116),(t&36864)===36864&&d(u,38)),u.flags&512&&d(u,116),u.flags&256&&d(u,115)),e&64&&n&&o!==void 0&&!(g&1024)&&!(e&8192)&&z2(o)}for(u.flags=(u.flags|512|256|64)^832,u.destructible=(u.destructible|256)^256;u.token!==1074790415;)a.push(S2(u,e,n,4,{}));return P(u,i&24?e|32768:e,1074790415),u.flags&=-193,u.token===1077936157&&d(u,24),y(u,e,l,f,c,{type:"BlockStatement",body:a})}function U1(u,e,n,i,t){switch(D(u,e),u.token){case 67108991:d(u,162);case 67174411:{e&524288||d(u,26),e&16384&&d(u,27),u.assignable=2;break}case 69271571:case 67108877:{e&262144||d(u,27),e&16384&&d(u,27),u.assignable=1;break}default:d(u,28,"super")}return y(u,e,n,i,t,{type:"Super"})}function W(u,e,n,i,t,o,l,f){let c=K(u,e,2,0,n,0,i,t,o,l,f);return N(u,e,c,i,0,o,l,f)}function M1(u,e,n,i,t,o){u.assignable&2&&d(u,53);let{token:l}=u;return D(u,e),u.assignable=2,y(u,e,i,t,o,{type:"UpdateExpression",argument:n,operator:U[l&255],prefix:!1})}function N(u,e,n,i,t,o,l,f){if((u.token&33619968)===33619968&&!(u.flags&1))n=M1(u,e,n,o,l,f);else if((u.token&67108864)===67108864){switch(e=(e|134217728)^134217728,u.token){case 67108877:{D(u,(e|1073741824|8192)^8192),u.assignable=1;let c=ru(u,e);n=y(u,e,o,l,f,{type:"MemberExpression",object:n,computed:!1,property:c});break}case 69271571:{let c=!1;(u.flags&2048)===2048&&(c=!0,u.flags=(u.flags|2048)^2048),D(u,e|32768);let{tokenPos:a,linePos:g,colPos:m}=u,s=j(u,e,i,1,a,g,m);P(u,e,20),u.assignable=1,n=y(u,e,o,l,f,{type:"MemberExpression",object:n,computed:!0,property:s}),c&&(u.flags|=2048);break}case 67174411:{if((u.flags&1024)===1024)return u.flags=(u.flags|1024)^1024,n;let c=!1;(u.flags&2048)===2048&&(c=!0,u.flags=(u.flags|2048)^2048);let a=su(u,e,i);u.assignable=2,n=y(u,e,o,l,f,{type:"CallExpression",callee:n,arguments:a}),c&&(u.flags|=2048);break}case 67108991:{D(u,(e|1073741824|8192)^8192),u.flags|=2048,u.assignable=2,n=J1(u,e,n,o,l,f);break}default:(u.flags&2048)===2048&&d(u,161),u.assignable=2,n=y(u,e,o,l,f,{type:"TaggedTemplateExpression",tag:n,quasi:u.token===67174408?du(u,e|65536):cu(u,e,u.tokenPos,u.linePos,u.colPos)})}n=N(u,e,n,0,1,o,l,f)}return t===0&&(u.flags&2048)===2048&&(u.flags=(u.flags|2048)^2048,n=y(u,e,o,l,f,{type:"ChainExpression",expression:n})),n}function J1(u,e,n,i,t,o){let l=!1,f;if((u.token===69271571||u.token===67174411)&&(u.flags&2048)===2048&&(l=!0,u.flags=(u.flags|2048)^2048),u.token===69271571){D(u,e|32768);let{tokenPos:c,linePos:a,colPos:g}=u,m=j(u,e,0,1,c,a,g);P(u,e,20),u.assignable=2,f=y(u,e,i,t,o,{type:"MemberExpression",object:n,computed:!0,optional:!0,property:m})}else if(u.token===67174411){let c=su(u,e,0);u.assignable=2,f=y(u,e,i,t,o,{type:"CallExpression",callee:n,arguments:c,optional:!0})}else{u.token&143360||d(u,155);let c=I(u,e,0);u.assignable=2,f=y(u,e,i,t,o,{type:"MemberExpression",object:n,computed:!1,optional:!0,property:c})}return l&&(u.flags|=2048),f}function ru(u,e){return!(u.token&143360)&&u.token!==131&&d(u,155),e&1&&u.token===131?X2(u,e,u.tokenPos,u.linePos,u.colPos):I(u,e,0)}function j1(u,e,n,i,t,o,l){n&&d(u,54),i||d(u,0);let{token:f}=u;D(u,e|32768);let c=W(u,e,0,0,1,u.tokenPos,u.linePos,u.colPos);return u.assignable&2&&d(u,53),u.assignable=2,y(u,e,t,o,l,{type:"UpdateExpression",argument:c,operator:U[f&255],prefix:!0})}function K(u,e,n,i,t,o,l,f,c,a,g){if((u.token&143360)===143360){switch(u.token){case 209008:return O1(u,e,i,l,c,a,g);case 241773:return R1(u,e,l,t,c,a,g);case 209007:return V1(u,e,l,f,t,o,i,c,a,g)}let{token:m,tokenValue:s}=u,k=I(u,e|65536,o);return u.token===10?(f||d(u,0),ou(u,e,m,1),$2(u,e,s,k,i,t,0,c,a,g)):(e&16384&&m===537079928&&d(u,127),m===241739&&(e&1024&&d(u,110),n&24&&d(u,98)),u.assignable=e&1024&&(m&537079808)===537079808?2:1,k)}if((u.token&134217728)===134217728)return X(u,e);switch(u.token){case 33619995:case 33619996:return j1(u,e,i,f,c,a,g);case 16863278:case 16842800:case 16842801:case 25233970:case 25233971:case 16863277:case 16863279:return N1(u,e,f,c,a,g,l);case 86106:return ue(u,e,0,l,c,a,g);case 2162700:return W1(u,e,t?0:1,l,c,a,g);case 69271571:return $1(u,e,t?0:1,l,c,a,g);case 67174411:return Y1(u,e,t,1,0,c,a,g);case 86021:case 86022:case 86023:return H1(u,e,c,a,g);case 86113:return K1(u,e);case 65540:return r1(u,e,c,a,g);case 133:case 86096:return G1(u,e,l,c,a,g);case 86111:return U1(u,e,c,a,g);case 67174409:return cu(u,e,c,a,g);case 67174408:return du(u,e);case 86109:return Q1(u,e,l,c,a,g);case 134283389:return pu(u,e,c,a,g);case 131:return X2(u,e,c,a,g);case 86108:return X1(u,e,i,l,c,a,g);case 8456258:if(e&16)return yu(u,e,1,c,a,g);default:if(tu(e,u.token))return au(u,e,c,a,g);d(u,28,U[u.token&255])}}function X1(u,e,n,i,t,o,l){let f=I(u,e,0);return u.token===67108877?Gu(u,e,f,t,o,l):(n&&d(u,138),f=xu(u,e,i,t,o,l),u.assignable=2,N(u,e,f,i,0,t,o,l))}function Gu(u,e,n,i,t,o){return e&2048||d(u,164),D(u,e),u.token!==143495&&u.tokenValue!=="meta"&&d(u,28,U[u.token&255]),u.assignable=2,y(u,e,i,t,o,{type:"MetaProperty",meta:n,property:I(u,e,0)})}function xu(u,e,n,i,t,o){P(u,e|32768,67174411),u.token===14&&d(u,139);let l=R(u,e,1,0,n,u.tokenPos,u.linePos,u.colPos);return P(u,e,16),y(u,e,i,t,o,{type:"ImportExpression",source:l})}function pu(u,e,n,i,t){let{tokenRaw:o,tokenValue:l}=u;return D(u,e),u.assignable=2,y(u,e,n,i,t,e&512?{type:"Literal",value:l,bigint:o.slice(0,-1),raw:o}:{type:"Literal",value:l,bigint:o.slice(0,-1)})}function cu(u,e,n,i,t){u.assignable=2;let{tokenValue:o,tokenRaw:l,tokenPos:f,linePos:c,colPos:a}=u;P(u,e,67174409);let g=[R2(u,e,o,l,f,c,a,!0)];return y(u,e,n,i,t,{type:"TemplateLiteral",expressions:[],quasis:g})}function du(u,e){e=(e|134217728)^134217728;let{tokenValue:n,tokenRaw:i,tokenPos:t,linePos:o,colPos:l}=u;P(u,e|32768,67174408);let f=[R2(u,e,n,i,t,o,l,!1)],c=[j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)];for(u.token!==1074790415&&d(u,81);(u.token=re(u,e))!==67174409;){let{tokenValue:a,tokenRaw:g,tokenPos:m,linePos:s,colPos:k}=u;P(u,e|32768,67174408),f.push(R2(u,e,a,g,m,s,k,!1)),c.push(j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),u.token!==1074790415&&d(u,81)}{let{tokenValue:a,tokenRaw:g,tokenPos:m,linePos:s,colPos:k}=u;P(u,e,67174409),f.push(R2(u,e,a,g,m,s,k,!0))}return y(u,e,t,o,l,{type:"TemplateLiteral",expressions:c,quasis:f})}function R2(u,e,n,i,t,o,l,f){let c=y(u,e,t,o,l,{type:"TemplateElement",value:{cooked:n,raw:i},tail:f}),a=f?1:2;return e&2&&(c.start+=1,c.range[0]+=1,c.end-=a,c.range[1]-=a),e&4&&(c.loc.start.column+=1,c.loc.end.column-=a),c}function z1(u,e,n,i,t){e=(e|134217728)^134217728,P(u,e|32768,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return u.assignable=1,y(u,e,n,i,t,{type:"SpreadElement",argument:o})}function su(u,e,n){D(u,e|32768);let i=[];if(u.token===16)return D(u,e),i;for(;u.token!==16&&(u.token===14?i.push(z1(u,e,u.tokenPos,u.linePos,u.colPos)):i.push(R(u,e,1,0,n,u.tokenPos,u.linePos,u.colPos)),!(u.token!==18||(D(u,e|32768),u.token===16))););return P(u,e,16),i}function I(u,e,n){let{tokenValue:i,tokenPos:t,linePos:o,colPos:l}=u;return D(u,e),y(u,e,t,o,l,e&268435456?{type:"Identifier",name:i,pattern:n===1}:{type:"Identifier",name:i})}function X(u,e){let{tokenValue:n,tokenRaw:i,tokenPos:t,linePos:o,colPos:l}=u;return u.token===134283389?pu(u,e,t,o,l):(D(u,e),u.assignable=2,y(u,e,t,o,l,e&512?{type:"Literal",value:n,raw:i}:{type:"Literal",value:n}))}function H1(u,e,n,i,t){let o=U[u.token&255],l=u.token===86023?null:o==="true";return D(u,e),u.assignable=2,y(u,e,n,i,t,e&512?{type:"Literal",value:l,raw:o}:{type:"Literal",value:l})}function K1(u,e){let{tokenPos:n,linePos:i,colPos:t}=u;return D(u,e),u.assignable=2,y(u,e,n,i,t,{type:"ThisExpression"})}function i2(u,e,n,i,t,o,l,f,c,a){D(u,e|32768);let g=t?iu(u,e,8457014):0,m=null,s,k=n?s2():void 0;if(u.token===67174411)o&1||d(u,37,"Function");else{let E=i&4&&(!(e&8192)||!(e&2048))?4:64;zu(u,e|(e&3072)<<11,u.token),n&&(E&4?$u(u,e,n,u.tokenValue,E):t2(u,e,n,u.tokenValue,E,i),k=J(k,256),o&&o&2&&l2(u,u.tokenValue)),s=u.token,u.token&143360?m=I(u,e,0):d(u,28,U[u.token&255])}e=(e|32243712)^32243712|67108864|l*2+g<<21|(g?0:1073741824),n&&(k=J(k,512));let C=ne(u,e|8388608,k,0,1),b=K2(u,(e|8192|4096|131072)^143360,n?J(k,128):k,8,s,n?k.scopeError:void 0);return y(u,e,f,c,a,{type:"FunctionDeclaration",id:m,params:C,body:b,async:l===1,generator:g===1})}function ue(u,e,n,i,t,o,l){D(u,e|32768);let f=iu(u,e,8457014),c=n*2+f<<21,a=null,g,m=e&64?s2():void 0;(u.token&176128)>0&&(zu(u,(e|32243712)^32243712|c,u.token),m&&(m=J(m,256)),g=u.token,a=I(u,e,0)),e=(e|32243712)^32243712|67108864|c|(f?0:1073741824),m&&(m=J(m,512));let s=ne(u,e|8388608,m,i,1),k=K2(u,e&-134377473,m&&J(m,128),0,g,void 0);return u.assignable=2,y(u,e,t,o,l,{type:"FunctionExpression",id:a,params:s,body:k,async:n===1,generator:f===1})}function $1(u,e,n,i,t,o,l){let f=_(u,e,void 0,n,i,0,2,0,t,o,l);return e&256&&u.destructible&64&&d(u,61),u.destructible&8&&d(u,60),f}function _(u,e,n,i,t,o,l,f,c,a,g){D(u,e|32768);let m=[],s=0;for(e=(e|134217728)^134217728;u.token!==20;)if(q(u,e|32768,18))m.push(null);else{let C,{token:b,tokenPos:E,linePos:w,colPos:v,tokenValue:M}=u;if(b&143360)if(C=K(u,e,l,0,1,0,t,1,E,w,v),u.token===1077936157){u.assignable&2&&d(u,24),D(u,e|32768),n&&u2(u,e,n,M,l,f);let S=R(u,e,1,1,t,u.tokenPos,u.linePos,u.colPos);C=y(u,e,E,w,v,o?{type:"AssignmentPattern",left:C,right:S}:{type:"AssignmentExpression",operator:"=",left:C,right:S}),s|=u.destructible&256?256:0|u.destructible&128?128:0}else u.token===18||u.token===20?(u.assignable&2?s|=16:n&&u2(u,e,n,M,l,f),s|=u.destructible&256?256:0|u.destructible&128?128:0):(s|=l&1?32:l&2?0:16,C=N(u,e,C,t,0,E,w,v),u.token!==18&&u.token!==20?(u.token!==1077936157&&(s|=16),C=O(u,e,t,o,E,w,v,C)):u.token!==1077936157&&(s|=u.assignable&2?16:32));else b&2097152?(C=u.token===2162700?Y(u,e,n,0,t,o,l,f,E,w,v):_(u,e,n,0,t,o,l,f,E,w,v),s|=u.destructible,u.assignable=u.destructible&16?2:1,u.token===18||u.token===20?u.assignable&2&&(s|=16):u.destructible&8?d(u,69):(C=N(u,e,C,t,0,E,w,v),s=u.assignable&2?16:0,u.token!==18&&u.token!==20?C=O(u,e,t,o,E,w,v,C):u.token!==1077936157&&(s|=u.assignable&2?16:32))):b===14?(C=b2(u,e,n,20,l,f,0,t,o,E,w,v),s|=u.destructible,u.token!==18&&u.token!==20&&d(u,28,U[u.token&255])):(C=W(u,e,1,0,1,E,w,v),u.token!==18&&u.token!==20?(C=O(u,e,t,o,E,w,v,C),!(l&3)&&b===67174411&&(s|=16)):u.assignable&2?s|=16:b===67174411&&(s|=u.assignable&1&&l&3?32:16));if(m.push(C),q(u,e|32768,18)){if(u.token===20)break}else break}P(u,e,20);let k=y(u,e,c,a,g,{type:o?"ArrayPattern":"ArrayExpression",elements:m});return!i&&u.token&4194304?ee(u,e,s,t,o,c,a,g,k):(u.destructible=s,k)}function ee(u,e,n,i,t,o,l,f,c){u.token!==1077936157&&d(u,24),D(u,e|32768),n&16&&d(u,24),t||r(u,c);let{tokenPos:a,linePos:g,colPos:m}=u,s=R(u,e,1,1,i,a,g,m);return u.destructible=(n|64|8)^72|(u.destructible&128?128:0)|(u.destructible&256?256:0),y(u,e,o,l,f,t?{type:"AssignmentPattern",left:c,right:s}:{type:"AssignmentExpression",left:c,operator:"=",right:s})}function b2(u,e,n,i,t,o,l,f,c,a,g,m){D(u,e|32768);let s=null,k=0,{token:C,tokenValue:b,tokenPos:E,linePos:w,colPos:v}=u;if(C&143360)u.assignable=1,s=K(u,e,t,0,1,0,f,1,E,w,v),C=u.token,s=N(u,e,s,f,0,E,w,v),u.token!==18&&u.token!==i&&(u.assignable&2&&u.token===1077936157&&d(u,69),k|=16,s=O(u,e,f,c,E,w,v,s)),u.assignable&2?k|=16:C===i||C===18?n&&u2(u,e,n,b,t,o):k|=32,k|=u.destructible&128?128:0;else if(C===i)d(u,39);else if(C&2097152)s=u.token===2162700?Y(u,e,n,1,f,c,t,o,E,w,v):_(u,e,n,1,f,c,t,o,E,w,v),C=u.token,C!==1077936157&&C!==i&&C!==18?(u.destructible&8&&d(u,69),s=N(u,e,s,f,0,E,w,v),k|=u.assignable&2?16:0,(u.token&4194304)===4194304?(u.token!==1077936157&&(k|=16),s=O(u,e,f,c,E,w,v,s)):((u.token&8454144)===8454144&&(s=n2(u,e,1,E,w,v,4,C,s)),q(u,e|32768,22)&&(s=f2(u,e,s,E,w,v)),k|=u.assignable&2?16:32)):k|=i===1074790415&&C!==1077936157?16:u.destructible;else{k|=32,s=W(u,e,1,f,1,u.tokenPos,u.linePos,u.colPos);let{token:M,tokenPos:S,linePos:V,colPos:A}=u;return M===1077936157&&M!==i&&M!==18?(u.assignable&2&&d(u,24),s=O(u,e,f,c,S,V,A,s),k|=16):(M===18?k|=16:M!==i&&(s=O(u,e,f,c,S,V,A,s)),k|=u.assignable&1?32:16),u.destructible=k,u.token!==i&&u.token!==18&&d(u,156),y(u,e,a,g,m,{type:c?"RestElement":"SpreadElement",argument:s})}if(u.token!==i)if(t&1&&(k|=l?16:32),q(u,e|32768,1077936157)){k&16&&d(u,24),r(u,s);let M=R(u,e,1,1,f,u.tokenPos,u.linePos,u.colPos);s=y(u,e,E,w,v,c?{type:"AssignmentPattern",left:s,right:M}:{type:"AssignmentExpression",left:s,operator:"=",right:M}),k=16}else k|=16;return u.destructible=k,y(u,e,a,g,m,{type:c?"RestElement":"SpreadElement",argument:s})}function Z(u,e,n,i,t,o,l){let f=n&64?14680064:31981568;e=(e|f)^f|(n&88)<<18|100925440;let c=e&64?J(s2(),512):void 0,a=_1(u,e|8388608,c,n,1,i);c&&(c=J(c,128));let g=K2(u,e&-134230017,c,0,void 0,void 0);return y(u,e,t,o,l,{type:"FunctionExpression",params:a,body:g,async:(n&16)>0,generator:(n&8)>0,id:null})}function W1(u,e,n,i,t,o,l){let f=Y(u,e,void 0,n,i,0,2,0,t,o,l);return e&256&&u.destructible&64&&d(u,61),u.destructible&8&&d(u,60),f}function Y(u,e,n,i,t,o,l,f,c,a,g){D(u,e);let m=[],s=0,k=0;for(e=(e|134217728)^134217728;u.token!==1074790415;){let{token:b,tokenValue:E,linePos:w,colPos:v,tokenPos:M}=u;if(b===14)m.push(b2(u,e,n,1074790415,l,f,0,t,o,M,w,v));else{let S=0,V=null,A,Q=u.token;if(u.token&143360||u.token===121)if(V=I(u,e,0),u.token===18||u.token===1074790415||u.token===1077936157)if(S|=4,e&1024&&(b&537079808)===537079808?s|=16:M2(u,e,l,b,0),n&&u2(u,e,n,E,l,f),q(u,e|32768,1077936157)){s|=8;let B=R(u,e,1,1,t,u.tokenPos,u.linePos,u.colPos);s|=u.destructible&256?256:0|u.destructible&128?128:0,A=y(u,e,M,w,v,{type:"AssignmentPattern",left:e&-2147483648?Object.assign({},V):V,right:B})}else s|=(b===209008?128:0)|(b===121?16:0),A=e&-2147483648?Object.assign({},V):V;else if(q(u,e|32768,21)){let{tokenPos:B,linePos:F,colPos:T}=u;if(E==="__proto__"&&k++,u.token&143360){let o2=u.token,m2=u.tokenValue;s|=Q===121?16:0,A=K(u,e,l,0,1,0,t,1,B,F,T);let{token:x}=u;A=N(u,e,A,t,0,B,F,T),u.token===18||u.token===1074790415?x===1077936157||x===1074790415||x===18?(s|=u.destructible&128?128:0,u.assignable&2?s|=16:n&&(o2&143360)===143360&&u2(u,e,n,m2,l,f)):s|=u.assignable&1?32:16:(u.token&4194304)===4194304?(u.assignable&2?s|=16:x!==1077936157?s|=32:n&&u2(u,e,n,m2,l,f),A=O(u,e,t,o,B,F,T,A)):(s|=16,(u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,x,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,t,o,l,f,B,F,T):Y(u,e,n,0,t,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):u.destructible&8?d(u,69):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&2?16:0,(u.token&4194304)===4194304?A=N2(u,e,t,o,B,F,T,A):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,t,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&2?16:0,u.token!==18&&b!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,t,o,B,F,T,A))))}else u.token===69271571?(s|=16,b===209007&&(S|=16),S|=(b===12402?256:b===12403?512:1)|2,V=g2(u,e,t),s|=u.assignable,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):u.token&143360?(s|=16,b===121&&d(u,93),b===209007&&(u.flags&1&&d(u,129),S|=16),V=I(u,e,0),S|=b===12402?256:b===12403?512:1,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):u.token===67174411?(s|=16,S|=1,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):u.token===8457014?(s|=16,b===12402?d(u,40):b===12403?d(u,41):b===143483&&d(u,93),D(u,e),S|=9|(b===209007?16:0),u.token&143360?V=I(u,e,0):(u.token&134217728)===134217728?V=X(u,e):u.token===69271571?(S|=2,V=g2(u,e,t),s|=u.assignable):d(u,28,U[u.token&255]),A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):(u.token&134217728)===134217728?(b===209007&&(S|=16),S|=b===12402?256:b===12403?512:1,s|=16,V=X(u,e),A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):d(u,130);else if((u.token&134217728)===134217728)if(V=X(u,e),u.token===21){P(u,e|32768,21);let{tokenPos:B,linePos:F,colPos:T}=u;if(E==="__proto__"&&k++,u.token&143360){A=K(u,e,l,0,1,0,t,1,B,F,T);let{token:o2,tokenValue:m2}=u;A=N(u,e,A,t,0,B,F,T),u.token===18||u.token===1074790415?o2===1077936157||o2===1074790415||o2===18?u.assignable&2?s|=16:n&&u2(u,e,n,m2,l,f):s|=u.assignable&1?32:16:u.token===1077936157?(u.assignable&2&&(s|=16),A=O(u,e,t,o,B,F,T,A)):(s|=16,A=O(u,e,t,o,B,F,T,A))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,t,o,l,f,B,F,T):Y(u,e,n,0,t,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(u.destructible&8)!==8&&(A=N(u,e,A,t,0,B,F,T),s=u.assignable&2?16:0,(u.token&4194304)===4194304?A=N2(u,e,t,o,B,F,T,A):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,0,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&1?0:16,u.token!==18&&u.token!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,t,o,B,F,T,A))))}else u.token===67174411?(S|=1,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos),s=u.assignable|16):d(u,131);else if(u.token===69271571)if(V=g2(u,e,t),s|=u.destructible&256?256:0,S|=2,u.token===21){D(u,e|32768);let{tokenPos:B,linePos:F,colPos:T,tokenValue:o2,token:m2}=u;if(u.token&143360){A=K(u,e,l,0,1,0,t,1,B,F,T);let{token:x}=u;A=N(u,e,A,t,0,B,F,T),(u.token&4194304)===4194304?(s|=u.assignable&2?16:x===1077936157?0:32,A=N2(u,e,t,o,B,F,T,A)):u.token===18||u.token===1074790415?x===1077936157||x===1074790415||x===18?u.assignable&2?s|=16:n&&(m2&143360)===143360&&u2(u,e,n,o2,l,f):s|=u.assignable&1?32:16:(s|=16,A=O(u,e,t,o,B,F,T,A))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,t,o,l,f,B,F,T):Y(u,e,n,0,t,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):s&8?d(u,60):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&2?s|16:0,(u.token&4194304)===4194304?(u.token!==1077936157&&(s|=16),A=N2(u,e,t,o,B,F,T,A)):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,0,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&1?0:16,u.token!==18&&u.token!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,t,o,B,F,T,A))))}else u.token===67174411?(S|=1,A=Z(u,e,S,t,u.tokenPos,w,v),s=16):d(u,42);else if(b===8457014)if(P(u,e|32768,8457014),S|=8,u.token&143360){let{token:B,line:F,index:T}=u;V=I(u,e,0),S|=1,u.token===67174411?(s|=16,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):h2(T,F,T,B===209007?44:B===12402||u.token===12403?43:45,U[B&255])}else(u.token&134217728)===134217728?(s|=16,V=X(u,e),S|=1,A=Z(u,e,S,t,M,w,v)):u.token===69271571?(s|=16,S|=3,V=g2(u,e,t),A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):d(u,123);else d(u,28,U[b&255]);s|=u.destructible&128?128:0,u.destructible=s,m.push(y(u,e,M,w,v,{type:"Property",key:V,value:A,kind:S&768?S&512?"set":"get":"init",computed:(S&2)>0,method:(S&1)>0,shorthand:(S&4)>0}))}if(s|=u.destructible,u.token!==18)break;D(u,e)}P(u,e,1074790415),k>1&&(s|=64);let C=y(u,e,c,a,g,{type:o?"ObjectPattern":"ObjectExpression",properties:m});return!i&&u.token&4194304?ee(u,e,s,t,o,c,a,g,C):(u.destructible=s,C)}function _1(u,e,n,i,t,o){P(u,e,67174411);let l=[];if(u.flags=(u.flags|128)^128,u.token===16)return i&512&&d(u,35,"Setter","one",""),D(u,e),l;i&256&&d(u,35,"Getter","no","s"),i&512&&u.token===14&&d(u,36),e=(e|134217728)^134217728;let f=0,c=0;for(;u.token!==18;){let a=null,{tokenPos:g,linePos:m,colPos:s}=u;if(u.token&143360?(e&1024||((u.token&36864)===36864&&(u.flags|=256),(u.token&537079808)===537079808&&(u.flags|=512)),a=gu(u,e,n,i|1,0,g,m,s)):(u.token===2162700?a=Y(u,e,n,1,o,1,t,0,g,m,s):u.token===69271571?a=_(u,e,n,1,o,1,t,0,g,m,s):u.token===14&&(a=b2(u,e,n,16,t,0,0,o,1,g,m,s)),c=1,u.destructible&48&&d(u,48)),u.token===1077936157){D(u,e|32768),c=1;let k=R(u,e,1,1,0,u.tokenPos,u.linePos,u.colPos);a=y(u,e,g,m,s,{type:"AssignmentPattern",left:a,right:k})}if(f++,l.push(a),!q(u,e,18)||u.token===16)break}return i&512&&f!==1&&d(u,35,"Setter","one",""),n&&n.scopeError!==void 0&&z2(n.scopeError),c&&(u.flags|=128),P(u,e,16),l}function g2(u,e,n){D(u,e|32768);let i=R(u,(e|134217728)^134217728,1,0,n,u.tokenPos,u.linePos,u.colPos);return P(u,e,20),i}function Y1(u,e,n,i,t,o,l,f){u.flags=(u.flags|128)^128;let{tokenPos:c,linePos:a,colPos:g}=u;D(u,e|32768|1073741824);let m=e&64?J(s2(),1024):void 0;if(e=(e|134217728)^134217728,q(u,e,16))return j2(u,e,m,[],n,0,o,l,f);let s=0;u.destructible&=-385;let k,C=[],b=0,E=0,{tokenPos:w,linePos:v,colPos:M}=u;for(u.assignable=1;u.token!==16;){let{token:S,tokenPos:V,linePos:A,colPos:Q}=u;if(S&143360)m&&t2(u,e,m,u.tokenValue,1,0),k=K(u,e,i,0,1,0,1,1,V,A,Q),u.token===16||u.token===18?u.assignable&2?(s|=16,E=1):((S&537079808)===537079808||(S&36864)===36864)&&(E=1):(u.token===1077936157?E=1:s|=16,k=N(u,e,k,1,0,V,A,Q),u.token!==16&&u.token!==18&&(k=O(u,e,1,0,V,A,Q,k)));else if((S&2097152)===2097152)k=S===2162700?Y(u,e|1073741824,m,0,1,0,i,t,V,A,Q):_(u,e|1073741824,m,0,1,0,i,t,V,A,Q),s|=u.destructible,E=1,u.assignable=2,u.token!==16&&u.token!==18&&(s&8&&d(u,119),k=N(u,e,k,0,0,V,A,Q),s|=16,u.token!==16&&u.token!==18&&(k=O(u,e,0,0,V,A,Q,k)));else if(S===14){k=b2(u,e,m,16,i,t,0,1,0,V,A,Q),u.destructible&16&&d(u,72),E=1,b&&(u.token===16||u.token===18)&&C.push(k),s|=8;break}else{if(s|=16,k=R(u,e,1,0,1,V,A,Q),b&&(u.token===16||u.token===18)&&C.push(k),u.token===18&&(b||(b=1,C=[k])),b){for(;q(u,e|32768,18);)C.push(R(u,e,1,0,1,u.tokenPos,u.linePos,u.colPos));u.assignable=2,k=y(u,e,w,v,M,{type:"SequenceExpression",expressions:C})}return P(u,e,16),u.destructible=s,k}if(b&&(u.token===16||u.token===18)&&C.push(k),!q(u,e|32768,18))break;if(b||(b=1,C=[k]),u.token===16){s|=8;break}}return b&&(u.assignable=2,k=y(u,e,w,v,M,{type:"SequenceExpression",expressions:C})),P(u,e,16),s&16&&s&8&&d(u,146),s|=u.destructible&256?256:0|u.destructible&128?128:0,u.token===10?(s&48&&d(u,47),e&4196352&&s&128&&d(u,29),e&2098176&&s&256&&d(u,30),E&&(u.flags|=128),j2(u,e,m,b?C:[k],n,0,o,l,f)):(s&8&&d(u,140),u.destructible=(u.destructible|256)^256|s,e&128?y(u,e,c,a,g,{type:"ParenthesizedExpression",expression:k}):k)}function au(u,e,n,i,t){let{tokenValue:o}=u,l=I(u,e,0);if(u.assignable=1,u.token===10){let f;return e&64&&(f=H2(u,e,o)),u.flags=(u.flags|128)^128,v2(u,e,f,[l],0,n,i,t)}return l}function $2(u,e,n,i,t,o,l,f,c,a){o||d(u,55),t&&d(u,49),u.flags&=-129;let g=e&64?H2(u,e,n):void 0;return v2(u,e,g,[i],l,f,c,a)}function j2(u,e,n,i,t,o,l,f,c){t||d(u,55);for(let a=0;a0&&u.tokenValue==="constructor"&&d(u,107),u.token===1074790415&&d(u,106),q(u,e,1074790417)){k>0&&d(u,117);continue}m.push(oe(u,e,i,n,t,s,0,l,u.tokenPos,u.linePos,u.colPos))}return P(u,o&8?e|32768:e,1074790415),u.flags=u.flags&-33|g,y(u,e,f,c,a,{type:"ClassBody",body:m})}function oe(u,e,n,i,t,o,l,f,c,a,g){let m=l?32:0,s=null,{token:k,tokenPos:C,linePos:b,colPos:E}=u;if(k&176128)switch(s=I(u,e,0),k){case 36972:if(!l&&u.token!==67174411&&(u.token&1048576)!==1048576&&u.token!==1077936157)return oe(u,e,n,i,t,o,1,f,c,a,g);break;case 209007:if(u.token!==67174411&&!(u.flags&1)){if(e&1&&(u.token&1073741824)===1073741824)return V2(u,e,s,m,o,C,b,E);m|=16|(iu(u,e,8457014)?8:0)}break;case 12402:if(u.token!==67174411){if(e&1&&(u.token&1073741824)===1073741824)return V2(u,e,s,m,o,C,b,E);m|=256}break;case 12403:if(u.token!==67174411){if(e&1&&(u.token&1073741824)===1073741824)return V2(u,e,s,m,o,C,b,E);m|=512}break}else if(k===69271571)m|=2,s=g2(u,i,f);else if((k&134217728)===134217728)s=X(u,e);else if(k===8457014)m|=8,D(u,e);else if(e&1&&u.token===131)m|=4096,s=X2(u,e|16384,C,b,E);else if(e&1&&(u.token&1073741824)===1073741824)m|=128;else{if(l&&k===2162700)return B1(u,e,n,C,b,E);k===122?(s=I(u,e,0),u.token!==67174411&&d(u,28,U[u.token&255])):d(u,28,U[u.token&255])}if(m&792&&(u.token&143360?s=I(u,e,0):(u.token&134217728)===134217728?s=X(u,e):u.token===69271571?(m|=2,s=g2(u,e,0)):u.token===122?s=I(u,e,0):e&1&&u.token===131?(m|=4096,s=X2(u,e,C,b,E)):d(u,132)),m&2||(u.tokenValue==="constructor"?((u.token&1073741824)===1073741824?d(u,126):!(m&32)&&u.token===67174411&&(m&920?d(u,51,"accessor"):e&524288||(u.flags&32?d(u,52):u.flags|=32)),m|=64):!(m&4096)&&m&824&&u.tokenValue==="prototype"&&d(u,50)),e&1&&u.token!==67174411)return V2(u,e,s,m,o,C,b,E);let w=Z(u,e,m,f,u.tokenPos,u.linePos,u.colPos);return y(u,e,c,a,g,e&1?{type:"MethodDefinition",kind:!(m&32)&&m&64?"constructor":m&256?"get":m&512?"set":"method",static:(m&32)>0,computed:(m&2)>0,key:s,decorators:o,value:w}:{type:"MethodDefinition",kind:!(m&32)&&m&64?"constructor":m&256?"get":m&512?"set":"method",static:(m&32)>0,computed:(m&2)>0,key:s,value:w})}function X2(u,e,n,i,t){D(u,e);let{tokenValue:o}=u;return o==="constructor"&&d(u,125),D(u,e),y(u,e,n,i,t,{type:"PrivateIdentifier",name:o})}function V2(u,e,n,i,t,o,l,f){let c=null;if(i&8&&d(u,0),u.token===1077936157){D(u,e|32768);let{tokenPos:a,linePos:g,colPos:m}=u;u.token===537079928&&d(u,116),c=K(u,e|16384,2,0,1,0,0,1,a,g,m),((u.token&1073741824)!==1073741824||(u.token&4194304)===4194304)&&(c=N(u,e|16384,c,0,0,a,g,m),c=O(u,e|16384,0,0,a,g,m,c),u.token===18&&(c=e2(u,e,0,o,l,f,c)))}return y(u,e,o,l,f,{type:"PropertyDefinition",key:n,value:c,static:(i&32)>0,computed:(i&2)>0,decorators:t})}function le(u,e,n,i,t,o,l,f){if(u.token&143360)return gu(u,e,n,i,t,o,l,f);(u.token&2097152)!==2097152&&d(u,28,U[u.token&255]);let c=u.token===69271571?_(u,e,n,1,0,1,i,t,o,l,f):Y(u,e,n,1,0,1,i,t,o,l,f);return u.destructible&16&&d(u,48),u.destructible&32&&d(u,48),c}function gu(u,e,n,i,t,o,l,f){let{tokenValue:c,token:a}=u;return e&1024&&((a&537079808)===537079808?d(u,116):(a&36864)===36864&&d(u,115)),(a&20480)===20480&&d(u,100),e&2099200&&a===241773&&d(u,30),a===241739&&i&24&&d(u,98),e&4196352&&a===209008&&d(u,96),D(u,e),n&&u2(u,e,n,c,i,t),y(u,e,o,l,f,{type:"Identifier",name:c})}function yu(u,e,n,i,t,o){if(D(u,e),u.token===8456259)return y(u,e,i,t,o,{type:"JSXFragment",openingFragment:p1(u,e,i,t,o),children:Lu(u,e),closingFragment:e0(u,e,n,u.tokenPos,u.linePos,u.colPos)});let l=null,f=[],c=t0(u,e,n,i,t,o);if(!c.selfClosing){f=Lu(u,e),l=u0(u,e,n,u.tokenPos,u.linePos,u.colPos);let a=J2(l.name);J2(c.name)!==a&&d(u,150,a)}return y(u,e,i,t,o,{type:"JSXElement",children:f,openingElement:c,closingElement:l})}function p1(u,e,n,i,t){return d2(u,e),y(u,e,n,i,t,{type:"JSXOpeningFragment"})}function u0(u,e,n,i,t,o){P(u,e,25);let l=fe(u,e,u.tokenPos,u.linePos,u.colPos);return n?P(u,e,8456259):u.token=d2(u,e),y(u,e,i,t,o,{type:"JSXClosingElement",name:l})}function e0(u,e,n,i,t,o){return P(u,e,25),P(u,e,8456259),y(u,e,i,t,o,{type:"JSXClosingFragment"})}function Lu(u,e){let n=[];for(;u.token!==25;)u.index=u.tokenPos=u.startPos,u.column=u.colPos=u.startColumn,u.line=u.linePos=u.startLine,d2(u,e),n.push(n0(u,e,u.tokenPos,u.linePos,u.colPos));return n}function n0(u,e,n,i,t){if(u.token===138)return i0(u,e,n,i,t);if(u.token===2162700)return de(u,e,0,0,n,i,t);if(u.token===8456258)return yu(u,e,0,n,i,t);d(u,0)}function i0(u,e,n,i,t){d2(u,e);let o={type:"JSXText",value:u.tokenValue};return e&512&&(o.raw=u.tokenRaw),y(u,e,n,i,t,o)}function t0(u,e,n,i,t,o){(u.token&143360)!==143360&&(u.token&4096)!==4096&&d(u,0);let l=fe(u,e,u.tokenPos,u.linePos,u.colPos),f=l0(u,e),c=u.token===8457016;return u.token===8456259?d2(u,e):(P(u,e,8457016),n?P(u,e,8456259):d2(u,e)),y(u,e,i,t,o,{type:"JSXOpeningElement",name:l,attributes:f,selfClosing:c})}function fe(u,e,n,i,t){r2(u);let o=_2(u,e,n,i,t);if(u.token===21)return ce(u,e,o,n,i,t);for(;q(u,e,67108877);)r2(u),o=o0(u,e,o,n,i,t);return o}function o0(u,e,n,i,t,o){let l=_2(u,e,u.tokenPos,u.linePos,u.colPos);return y(u,e,i,t,o,{type:"JSXMemberExpression",object:n,property:l})}function l0(u,e){let n=[];for(;u.token!==8457016&&u.token!==8456259&&u.token!==1048576;)n.push(c0(u,e,u.tokenPos,u.linePos,u.colPos));return n}function f0(u,e,n,i,t){D(u,e),P(u,e,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return P(u,e,1074790415),y(u,e,n,i,t,{type:"JSXSpreadAttribute",argument:o})}function c0(u,e,n,i,t){if(u.token===2162700)return f0(u,e,n,i,t);r2(u);let o=null,l=_2(u,e,n,i,t);if(u.token===21&&(l=ce(u,e,l,n,i,t)),u.token===1077936157){let f=u1(u,e),{tokenPos:c,linePos:a,colPos:g}=u;switch(f){case 134283267:o=X(u,e);break;case 8456258:o=yu(u,e,1,c,a,g);break;case 2162700:o=de(u,e,1,1,c,a,g);break;default:d(u,149)}}return y(u,e,n,i,t,{type:"JSXAttribute",value:o,name:l})}function ce(u,e,n,i,t,o){P(u,e,21);let l=_2(u,e,u.tokenPos,u.linePos,u.colPos);return y(u,e,i,t,o,{type:"JSXNamespacedName",namespace:n,name:l})}function de(u,e,n,i,t,o,l){D(u,e|32768);let{tokenPos:f,linePos:c,colPos:a}=u;if(u.token===14)return d0(u,e,t,o,l);let g=null;return u.token===1074790415?(i&&d(u,152),g=s0(u,e,u.startPos,u.startLine,u.startColumn)):g=R(u,e,1,0,0,f,c,a),n?P(u,e,1074790415):d2(u,e),y(u,e,t,o,l,{type:"JSXExpressionContainer",expression:g})}function d0(u,e,n,i,t){P(u,e,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return P(u,e,1074790415),y(u,e,n,i,t,{type:"JSXSpreadChild",expression:o})}function s0(u,e,n,i,t){return u.startPos=u.tokenPos,u.startLine=u.linePos,u.startColumn=u.colPos,y(u,e,n,i,t,{type:"JSXEmptyExpression"})}function _2(u,e,n,i,t){let{tokenValue:o}=u;return D(u,e),y(u,e,n,i,t,{type:"JSXIdentifier",name:o})}function se(u,e){return c1(u,e,0)}function a0(u,e){let n=new SyntaxError(u+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var ae=a0;function m0(u){let e=[];for(let n of u)try{return n()}catch(i){e.push(i)}throw Object.assign(new Error("All combinations failed"),{errors:e})}var me=m0;var C2=Me(be(),1);function E0(u){if(!u.startsWith("#!"))return"";let e=u.indexOf(` -`);return e===-1?u:u.slice(0,e)}var Ce=E0;function w0(u){let e=Ce(u);e&&(u=u.slice(e.length+1));let n=(0,C2.extract)(u),{pragmas:i,comments:t}=(0,C2.parseWithComments)(n);return{shebang:e,text:u,pragmas:i,comments:t}}function Pe(u){let{pragmas:e}=w0(u);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function S0(u){return Array.isArray(u)&&u.length>0}var Y2=S0;function $(u){var i;let e=u.range?u.range[0]:u.start,n=((i=u.declaration)==null?void 0:i.decorators)??u.decorators;return Y2(n)?Math.min($(n[0]),e):e}function p(u){return u.range?u.range[1]:u.end}function B0(u){return u=typeof u=="function"?{parse:u}:u,{astFormat:"estree",hasPragma:Pe,locStart:$,locEnd:p,...u}}var Ee=B0;var v0=(u,e,n)=>{if(!(u&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},ku=v0;function T0(u){return u=new Set(u),e=>u.has(e==null?void 0:e.type)}var we=T0;var F0=we(["Block","CommentBlock","MultiLine"]),T2=F0;function q0(u){return T2(u)&&u.value[0]==="*"&&/@(?:type|satisfies)\b/.test(u.value)}var Se=q0;function L0(u){let e=`*${u.value}*`.split(` -`);return e.length>1&&e.every(n=>n.trimStart()[0]==="*")}var hu=L0;var F2=null;function q2(u){if(F2!==null&&typeof F2.property){let e=F2;return F2=q2.prototype=null,e}return F2=q2.prototype=u??Object.create(null),new q2}var I0=10;for(let u=0;u<=I0;u++)q2();function Au(u){return q2(u)}function N0(u,e="type"){Au(u);function n(i){let t=i[e],o=u[t];if(!Array.isArray(o))throw Object.assign(new Error(`Missing visitor keys for '${t}'.`),{node:i});return o}return n}var Be=N0;var ve={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var V0=Be(ve),Te=V0;function Du(u,e){if(!(u!==null&&typeof u=="object"))return u;if(Array.isArray(u)){for(let i=0;i{var f;(f=l.leadingComments)!=null&&f.some(Se)&&o.add($(l))}),u=Q2(u,l=>{if(l.type==="ParenthesizedExpression"){let{expression:f}=l;if(f.type==="TypeCastExpression")return f.range=l.range,f;let c=$(l);if(!o.has(c))return f.extra={...f.extra,parenthesized:!0},f}})}if(u=Q2(u,o=>{switch(o.type){case"LogicalExpression":if(Fe(o))return bu(o);break;case"VariableDeclaration":{let l=ku(!1,o.declarations,-1);l!=null&&l.init&&t(o,l);break}case"TSParenthesizedType":return o.typeAnnotation;case"TSTypeParameter":if(typeof o.name=="string"){let l=$(o);o.name={type:"Identifier",name:o.name,range:[l,l+o.name.length]}}break;case"TopicReference":u.extra={...u.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:l}=o;if(n==="meriyah"&&(l==null?void 0:l.type)==="Identifier"){let f=i.slice($(l),p(l));(f.startsWith('"')||f.startsWith("'"))&&(o.exported={...o.exported,type:"Literal",value:o.exported.name,raw:f})}break}case"TSUnionType":case"TSIntersectionType":if(o.types.length===1)return o.types[0];break}}),Y2(u.comments)){let o=ku(!1,u.comments,-1);for(let l=u.comments.length-2;l>=0;l--){let f=u.comments[l];p(f)===$(o)&&T2(f)&&T2(o)&&hu(f)&&hu(o)&&(u.comments.splice(l+1,1),f.value+="*//*"+o.value,f.range=[$(f),p(o)]),o=f}}return u.type==="Program"&&(u.range=[0,i.length]),u;function t(o,l){i[p(l)]!==";"&&(o.range=[$(o),p(l)])}}function Fe(u){return u.type==="LogicalExpression"&&u.right.type==="LogicalExpression"&&u.operator===u.right.operator}function bu(u){return Fe(u)?bu({type:"LogicalExpression",operator:u.operator,left:bu({type:"LogicalExpression",operator:u.operator,left:u.left,right:u.right.left,range:[$(u.left),p(u.right.left)]}),right:u.right.right,range:[$(u),p(u)]}):u}var qe=R0;function O0(u){let{filepath:e}=u;if(e){if(e=e.toLowerCase(),e.endsWith(".cjs"))return"script";if(e.endsWith(".mjs"))return"module"}}var Le=O0;var U0={next:!0,ranges:!0,webcompat:!0,loc:!0,raw:!0,directives:!0,globalReturn:!0,impliedStrict:!1,preserveParens:!1,lexical:!1,identifierPattern:!1,jsx:!0,specDeviation:!0,uniqueKeyInPattern:!1};function M0(u,e){let n=[],i=[],t=se(u,{...U0,module:e==="module",onComment:n,onToken:i});return t.comments=n,t.tokens=i,t}function J0(u){var o;let{message:e,line:n,column:i}=u,t=(o=e.match(/^\[(?\d+):(?\d+)]: (?.*)$/))==null?void 0:o.groups;return t&&(e=t.message,typeof n!="number"&&(n=Number(t.line),i=Number(t.column))),typeof n!="number"?u:ae(e,{loc:{start:{line:n,column:i}},cause:u})}function j0(u,e={}){let n=Le(e),i=(n?[n]:["module","script"]).map(o=>()=>M0(u,o)),t;try{t=me(i)}catch({errors:[o]}){throw J0(o)}return qe(t,{parser:"meriyah",text:u})}var X0=Ee(j0);return Je(z0);}); \ No newline at end of file +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.meriyah=e()}})(function(){"use strict";var Ie=Object.create;var L2=Object.defineProperty;var Ne=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty;var Ue=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),Cu=(u,e)=>{for(var n in e)L2(u,n,{get:e[n],enumerable:!0})},Pu=(u,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ve(e))!Oe.call(u,i)&&i!==n&&L2(u,i,{get:()=>e[i],enumerable:!(t=Ne(e,i))||t.enumerable});return u};var Me=(u,e,n)=>(n=u!=null?Ie(Re(u)):{},Pu(e||!u||!u.__esModule?L2(n,"default",{value:u,enumerable:!0}):n,u)),Je=u=>Pu(L2({},"__esModule",{value:!0}),u);var ve=Ue(a2=>{"use strict";Object.defineProperty(a2,"__esModule",{value:!0});a2.extract=F0;a2.parse=L0;a2.parseWithComments=Be;a2.print=I0;a2.strip=q0;var w0=/\*\/$/,S0=/^\/\*\*?/,we=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,B0=/(^|\s+)\/\/([^\r\n]*)/g,Ce=/^(\r?\n)+/,v0=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Pe=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,T0=/(\r?\n|^) *\* ?/g,Se=[];function F0(u){let e=u.match(we);return e?e[0].trimLeft():""}function q0(u){let e=u.match(we);return e&&e[0]?u.substring(e[0].length):u}function L0(u){return Be(u).pragmas}function Be(u){let e=` +`;u=u.replace(S0,"").replace(w0,"").replace(T0,"$1");let n="";for(;n!==u;)n=u,u=u.replace(v0,`${e}$1 $2${e}`);u=u.replace(Ce,"").trimRight();let t=Object.create(null),i=u.replace(Pe,"").replace(Ce,"").trimRight(),o;for(;o=Pe.exec(u);){let l=o[2].replace(B0,"");typeof t[o[1]]=="string"||Array.isArray(t[o[1]])?t[o[1]]=Se.concat(t[o[1]],l):t[o[1]]=l}return{comments:i,pragmas:t}}function I0({comments:u="",pragmas:e={}}){let n=` +`,t="/**",i=" *",o=" */",l=Object.keys(e),f=l.flatMap(a=>Ee(a,e[a])).map(a=>`${i} ${a}${n}`).join("");if(!u){if(l.length===0)return"";if(l.length===1&&!Array.isArray(e[l[0]])){let a=e[l[0]];return`${t} ${Ee(l[0],a)[0]}${o}`}}let c=u.split(n).map(a=>`${i} ${a}`).join(n)+n;return t+n+(u?c:"")+(u&&l.length?i+n:"")+f+o}function Ee(u,e){return Se.concat(e).map(n=>`@${u} ${n}`.trim())}});var z0={};Cu(z0,{parsers:()=>bu});var bu={};Cu(bu,{meriyah:()=>X0});var je={0:"Unexpected token",28:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"Unexpected token `#`",4:"Illegal Unicode escape sequence",5:"Invalid code point %0",6:"Invalid hexadecimal escape sequence",8:"Octal literals are not allowed in strict mode",7:"Decimal integer literals with a leading zero are forbidden in strict mode",9:"Expected number in radix %0",146:"Invalid left-hand side assignment to a destructible right-hand side",10:"Non-number found after exponent indicator",11:"Invalid BigIntLiteral",12:"No identifiers allowed directly after numeric literal",13:"Escapes \\8 or \\9 are not syntactically valid escapes",14:"Unterminated string literal",15:"Unterminated template literal",16:"Multiline comment was not closed properly",17:"The identifier contained dynamic unicode escape that was not closed",18:"Illegal character '%0'",19:"Missing hexadecimal digits",20:"Invalid implicit octal",21:"Invalid line break in string literal",22:"Only unicode escapes are legal in identifier names",23:"Expected '%0'",24:"Invalid left-hand side in assignment",25:"Invalid left-hand side in async arrow",26:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',27:"Member access on super must be in a method",29:"Await expression not allowed in formal parameter",30:"Yield expression not allowed in formal parameter",93:"Unexpected token: 'escaped keyword'",31:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",120:"Async functions can only be declared at the top level or inside a block",32:"Unterminated regular expression",33:"Unexpected regular expression flag",34:"Duplicate regular expression flag '%0'",35:"%0 functions must have exactly %1 argument%2",36:"Setter function argument must not be a rest parameter",37:"%0 declaration must have a name in this context",38:"Function name may not contain any reserved words or be eval or arguments in strict mode",39:"The rest operator is missing an argument",40:"A getter cannot be a generator",41:"A setter cannot be a generator",42:"A computed property name must be followed by a colon or paren",131:"Object literal keys that are strings or numbers must be a method or have a colon",44:"Found `* async x(){}` but this should be `async * x(){}`",43:"Getters and setters can not be generators",45:"'%0' can not be generator method",46:"No line break is allowed after '=>'",47:"The left-hand side of the arrow can only be destructed through assignment",48:"The binding declaration is not destructible",49:"Async arrow can not be followed by new expression",50:"Classes may not have a static property named 'prototype'",51:"Class constructor may not be a %0",52:"Duplicate constructor method in class",53:"Invalid increment/decrement operand",54:"Invalid use of `new` keyword on an increment/decrement expression",55:"`=>` is an invalid assignment target",56:"Rest element may not have a trailing comma",57:"Missing initializer in %0 declaration",58:"'for-%0' loop head declarations can not have an initializer",59:"Invalid left-hand side in for-%0 loop: Must have a single binding",60:"Invalid shorthand property initializer",61:"Property name __proto__ appears more than once in object literal",62:"Let is disallowed as a lexically bound name",63:"Invalid use of '%0' inside new expression",64:"Illegal 'use strict' directive in function with non-simple parameter list",65:'Identifier "let" disallowed as left-hand side expression in strict mode',66:"Illegal continue statement",67:"Illegal break statement",68:"Cannot have `let[...]` as a var name in strict mode",69:"Invalid destructuring assignment target",70:"Rest parameter may not have a default initializer",71:"The rest argument must the be last parameter",72:"Invalid rest argument",74:"In strict mode code, functions can only be declared at top level or inside a block",75:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",76:"Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",77:"Class declaration can't appear in single-statement context",78:"Invalid left-hand side in for-%0",79:"Invalid assignment in for-%0",80:"for await (... of ...) is only valid in async functions and async generators",81:"The first token after the template expression should be a continuation of the template",83:"`let` declaration not allowed here and `let` cannot be a regular var name in strict mode",82:"`let \n [` is a restricted production at the start of a statement",84:"Catch clause requires exactly one parameter, not more (and no trailing comma)",85:"Catch clause parameter does not support default values",86:"Missing catch or finally after try",87:"More than one default clause in switch statement",88:"Illegal newline after throw",89:"Strict mode code may not include a with statement",90:"Illegal return statement",91:"The left hand side of the for-header binding declaration is not destructible",92:"new.target only allowed within functions",94:"'#' not followed by identifier",100:"Invalid keyword",99:"Can not use 'let' as a class name",98:"'A lexical declaration can't define a 'let' binding",97:"Can not use `let` as variable name in strict mode",95:"'%0' may not be used as an identifier in this context",96:"Await is only valid in async functions",101:"The %0 keyword can only be used with the module goal",102:"Unicode codepoint must not be greater than 0x10FFFF",103:"%0 source must be string",104:"Only a identifier can be used to indicate alias",105:"Only '*' or '{...}' can be imported after default",106:"Trailing decorator may be followed by method",107:"Decorators can't be used with a constructor",109:"HTML comments are only allowed with web compatibility (Annex B)",110:"The identifier 'let' must not be in expression position in strict mode",111:"Cannot assign to `eval` and `arguments` in strict mode",112:"The left-hand side of a for-of loop may not start with 'let'",113:"Block body arrows can not be immediately invoked without a group",114:"Block body arrows can not be immediately accessed without a group",115:"Unexpected strict mode reserved word",116:"Unexpected eval or arguments in strict mode",117:"Decorators must not be followed by a semicolon",118:"Calling delete on expression not allowed in strict mode",119:"Pattern can not have a tail",121:"Can not have a `yield` expression on the left side of a ternary",122:"An arrow function can not have a postfix update operator",123:"Invalid object literal key character after generator star",124:"Private fields can not be deleted",126:"Classes may not have a field called constructor",125:"Classes may not have a private element named constructor",127:"A class field initializer may not contain arguments",128:"Generators can only be declared at the top level or inside a block",129:"Async methods are a restricted production and cannot have a newline following it",130:"Unexpected character after object literal property name",132:"Invalid key token",133:"Label '%0' has already been declared",134:"continue statement must be nested within an iteration statement",135:"Undefined label '%0'",136:"Trailing comma is disallowed inside import(...) arguments",137:"import() requires exactly one argument",138:"Cannot use new with import(...)",139:"... is not allowed in import()",140:"Expected '=>'",141:"Duplicate binding '%0'",142:"Cannot export a duplicate name '%0'",145:"Duplicate %0 for-binding",143:"Exported binding '%0' needs to refer to a top-level declared variable",144:"Unexpected private field",148:"Numeric separators are not allowed at the end of numeric literals",147:"Only one underscore is allowed as numeric separator",149:"JSX value should be either an expression or a quoted JSX text",150:"Expected corresponding JSX closing tag for %0",151:"Adjacent JSX elements must be wrapped in an enclosing tag",152:"JSX attributes must only be assigned a non-empty 'expression'",153:"'%0' has already been declared",154:"'%0' shadowed a catch clause binding",155:"Dot property must be an identifier",156:"Encountered invalid input after spread/rest argument",157:"Catch without try",158:"Finally without try",159:"Expected corresponding closing tag for JSX fragment",160:"Coalescing and logical operators used together in the same expression must be disambiguated with parentheses",161:"Invalid tagged template on optional chain",162:"Invalid optional chain from super property",163:"Invalid optional chain from new expression",164:'Cannot use "import.meta" outside a module',165:"Leading decorators must be attached to a class declaration"},k2=class extends SyntaxError{constructor(e,n,t,i,...o){let l="["+n+":"+t+"]: "+je[i].replace(/%(\d+)/g,(f,c)=>o[c]);super(`${l}`),this.index=e,this.line=n,this.column=t,this.description=l,this.loc={line:n,column:t}}};function d(u,e,...n){throw new k2(u.index,u.line,u.column,e,...n)}function z2(u){throw new k2(u.index,u.line,u.column,u.type,u.params)}function h2(u,e,n,t,...i){throw new k2(u,e,n,t,...i)}function A2(u,e,n,t){throw new k2(u,e,n,t)}var E2=((u,e)=>{let n=new Uint32Array(104448),t=0,i=0;for(;t<3540;){let o=u[t++];if(o<0)i-=o;else{let l=u[t++];o&2&&(l=e[l]),o&1?n.fill(l,i,i+=u[t++]):n[i++]=l}}return n})([-1,2,24,2,25,2,5,-1,0,77595648,3,44,2,3,0,14,2,57,2,58,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,59,3,0,4,0,4294966523,3,0,4,2,16,2,60,2,0,0,4294836735,0,3221225471,0,4294901942,2,61,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,17,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,131,2,6,2,56,-1,2,37,0,4294443263,2,1,3,0,3,0,4294901711,2,39,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,2,194,2,3,0,3825204735,0,123747807,0,65487,0,4294828015,0,4092591615,0,1080049119,0,458703,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,66,0,4284449919,0,851904,2,4,2,11,0,67076095,-1,2,67,0,1073741743,0,4093591391,-1,0,50331649,0,3265266687,2,32,0,4294844415,0,4278190047,2,18,2,129,-1,3,0,2,2,21,2,0,2,9,2,0,2,14,2,15,3,0,10,2,69,2,0,2,70,2,71,2,72,2,0,2,73,2,0,2,10,0,261632,2,23,3,0,2,2,12,2,4,3,0,18,2,74,2,5,3,0,2,2,75,0,2088959,2,27,2,8,0,909311,3,0,2,0,814743551,2,41,0,67057664,3,0,2,2,40,2,0,2,28,2,0,2,29,2,7,0,268374015,2,26,2,49,2,0,2,76,0,134153215,-1,2,6,2,0,2,7,0,2684354559,0,67044351,0,3221160064,0,1,-1,3,0,2,2,42,0,1046528,3,0,3,2,8,2,0,2,51,0,4294960127,2,9,2,38,2,10,0,4294377472,2,11,3,0,7,0,4227858431,3,0,8,2,12,2,0,2,78,2,9,2,0,2,79,2,80,2,81,-1,2,124,0,1048577,2,82,2,13,-1,2,13,0,131042,2,83,2,84,2,85,2,0,2,33,-83,2,0,2,53,2,7,3,0,4,0,1046559,2,0,2,14,2,0,0,2147516671,2,20,3,86,2,2,0,-16,2,87,0,524222462,2,4,2,0,0,4269801471,2,4,2,0,2,15,2,77,2,16,3,0,2,2,47,2,0,-1,2,17,-16,3,0,206,-2,3,0,655,2,18,3,0,36,2,68,-1,2,17,2,9,3,0,8,2,89,2,121,2,0,0,3220242431,3,0,3,2,19,2,90,2,91,3,0,2,2,92,2,0,2,93,2,94,2,0,0,4351,2,0,2,8,3,0,2,0,67043391,0,3909091327,2,0,2,22,2,8,2,18,3,0,2,0,67076097,2,7,2,0,2,20,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,97,2,98,2,15,2,21,3,0,3,0,67057663,3,0,349,2,99,2,100,2,6,-264,3,0,11,2,22,3,0,2,2,31,-1,0,3774349439,2,101,2,102,3,0,2,2,19,2,103,3,0,10,2,9,2,17,2,0,2,45,2,0,2,30,2,104,2,23,0,1638399,2,172,2,105,3,0,3,2,18,2,24,2,25,2,5,2,26,2,0,2,7,2,106,-1,2,107,2,108,2,109,-1,3,0,3,2,11,-2,2,0,2,27,-3,2,150,-4,2,18,2,0,2,35,0,1,2,0,2,62,2,28,2,11,2,9,2,0,2,110,-1,3,0,4,2,9,2,21,2,111,2,6,2,0,2,112,2,0,2,48,-4,3,0,9,2,20,2,29,2,30,-4,2,113,2,114,2,29,2,20,2,7,-2,2,115,2,29,2,31,-2,2,0,2,116,-2,0,4277137519,0,2269118463,-1,3,18,2,-1,2,32,2,36,2,0,3,29,2,2,34,2,19,-3,3,0,2,2,33,-1,2,0,2,34,2,0,2,34,2,0,2,46,-10,2,0,0,203775,-2,2,18,2,43,2,35,-2,2,17,2,117,2,20,3,0,2,2,36,0,2147549120,2,0,2,11,2,17,2,135,2,0,2,37,2,52,0,5242879,3,0,2,0,402644511,-1,2,120,0,1090519039,-2,2,122,2,38,2,0,0,67045375,2,39,0,4226678271,0,3766565279,0,2039759,-4,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,40,2,41,-1,2,10,2,42,-6,2,0,2,11,-3,3,0,2,0,2147484671,2,125,0,4190109695,2,50,-2,2,126,0,4244635647,0,27,2,0,2,7,2,43,2,0,2,63,-1,2,0,2,40,-8,2,54,2,44,0,67043329,2,127,2,45,0,8388351,-2,2,128,0,3028287487,2,46,2,130,0,33259519,2,41,-9,2,20,-5,2,64,-2,3,0,28,2,31,-3,3,0,3,2,47,3,0,6,2,48,-85,3,0,33,2,47,-126,3,0,18,2,36,-269,3,0,17,2,40,2,7,2,41,-2,2,17,2,49,2,0,2,20,2,50,2,132,2,23,-21,3,0,2,-4,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,196635,3,0,191,2,51,3,0,38,2,29,-1,2,33,-279,3,0,8,2,7,-1,2,133,2,52,3,0,11,2,6,-72,3,0,3,2,134,0,1677656575,-166,0,4161266656,0,4071,0,15360,-4,0,28,-13,3,0,2,2,37,2,0,2,136,2,137,2,55,2,0,2,138,2,139,2,140,3,0,10,2,141,2,142,2,15,3,37,2,3,53,2,3,54,2,0,4294954999,2,0,-16,2,0,2,88,2,0,0,2105343,0,4160749584,0,65534,-42,0,4194303871,0,2011,-6,2,0,0,1073684479,0,17407,-11,2,0,2,31,-40,3,0,6,0,8323103,-1,3,0,2,2,42,-37,2,55,2,144,2,145,2,146,2,147,2,148,-105,2,24,-32,3,0,1334,2,9,-1,3,0,129,2,27,3,0,6,2,9,3,0,180,2,149,3,0,233,0,1,-96,3,0,16,2,9,-47,3,0,154,2,56,-22381,3,0,7,2,23,-6130,3,5,2,-1,0,69207040,3,44,2,3,0,14,2,57,2,58,-3,0,3168731136,0,4294956864,2,1,2,0,2,59,3,0,4,0,4294966275,3,0,4,2,16,2,60,2,0,2,33,-1,2,17,2,61,-1,2,0,2,56,0,4294885376,3,0,2,0,3145727,0,2617294944,0,4294770688,2,23,2,62,3,0,2,0,131135,2,95,0,70256639,0,71303167,0,272,2,40,2,56,-1,2,37,2,30,-1,2,96,2,63,0,4278255616,0,4294836227,0,4294549473,0,600178175,0,2952806400,0,268632067,0,4294543328,0,57540095,0,1577058304,0,1835008,0,4294688736,2,65,2,64,0,33554435,2,123,2,65,2,151,0,131075,0,3594373096,0,67094296,2,64,-1,0,4294828e3,0,603979263,2,160,0,3,0,4294828001,0,602930687,2,183,0,393219,0,4294828016,0,671088639,0,2154840064,0,4227858435,0,4236247008,2,66,2,36,-1,2,4,0,917503,2,36,-1,2,67,0,537788335,0,4026531935,-1,0,1,-1,2,32,2,68,0,7936,-3,2,0,0,2147485695,0,1010761728,0,4292984930,0,16387,2,0,2,14,2,15,3,0,10,2,69,2,0,2,70,2,71,2,72,2,0,2,73,2,0,2,11,-1,2,23,3,0,2,2,12,2,4,3,0,18,2,74,2,5,3,0,2,2,75,0,253951,3,19,2,0,122879,2,0,2,8,0,276824064,-2,3,0,2,2,40,2,0,0,4294903295,2,0,2,29,2,7,-1,2,17,2,49,2,0,2,76,2,41,-1,2,20,2,0,2,27,-2,0,128,-2,2,77,2,8,0,4064,-1,2,119,0,4227907585,2,0,2,118,2,0,2,48,2,173,2,9,2,38,2,10,-1,0,74440192,3,0,6,-2,3,0,8,2,12,2,0,2,78,2,9,2,0,2,79,2,80,2,81,-3,2,82,2,13,-3,2,83,2,84,2,85,2,0,2,33,-83,2,0,2,53,2,7,3,0,4,0,817183,2,0,2,14,2,0,0,33023,2,20,3,86,2,-17,2,87,0,524157950,2,4,2,0,2,88,2,4,2,0,2,15,2,77,2,16,3,0,2,2,47,2,0,-1,2,17,-16,3,0,206,-2,3,0,655,2,18,3,0,36,2,68,-1,2,17,2,9,3,0,8,2,89,0,3072,2,0,0,2147516415,2,9,3,0,2,2,23,2,90,2,91,3,0,2,2,92,2,0,2,93,2,94,0,4294965179,0,7,2,0,2,8,2,91,2,8,-1,0,1761345536,2,95,0,4294901823,2,36,2,18,2,96,2,34,2,166,0,2080440287,2,0,2,33,2,143,0,3296722943,2,0,0,1046675455,0,939524101,0,1837055,2,97,2,98,2,15,2,21,3,0,3,0,7,3,0,349,2,99,2,100,2,6,-264,3,0,11,2,22,3,0,2,2,31,-1,0,2700607615,2,101,2,102,3,0,2,2,19,2,103,3,0,10,2,9,2,17,2,0,2,45,2,0,2,30,2,104,-3,2,105,3,0,3,2,18,-1,3,5,2,2,26,2,0,2,7,2,106,-1,2,107,2,108,2,109,-1,3,0,3,2,11,-2,2,0,2,27,-8,2,18,2,0,2,35,-1,2,0,2,62,2,28,2,29,2,9,2,0,2,110,-1,3,0,4,2,9,2,17,2,111,2,6,2,0,2,112,2,0,2,48,-4,3,0,9,2,20,2,29,2,30,-4,2,113,2,114,2,29,2,20,2,7,-2,2,115,2,29,2,31,-2,2,0,2,116,-2,0,4277075969,2,29,-1,3,18,2,-1,2,32,2,117,2,0,3,29,2,2,34,2,19,-3,3,0,2,2,33,-1,2,0,2,34,2,0,2,34,2,0,2,48,-10,2,0,0,197631,-2,2,18,2,43,2,118,-2,2,17,2,117,2,20,2,119,2,51,-2,2,119,2,23,2,17,2,33,2,119,2,36,0,4294901904,0,4718591,2,119,2,34,0,335544350,-1,2,120,2,121,-2,2,122,2,38,2,7,-1,2,123,2,65,0,3758161920,0,3,-4,2,0,2,27,0,2147485568,0,3,2,0,2,23,0,176,-5,2,0,2,47,2,186,-1,2,0,2,23,2,197,-1,2,0,0,16779263,-2,2,11,-7,2,0,2,121,-3,3,0,2,2,124,2,125,0,2147549183,0,2,-2,2,126,2,35,0,10,0,4294965249,0,67633151,0,4026597376,2,0,0,536871935,-1,2,0,2,40,-8,2,54,2,47,0,1,2,127,2,23,-3,2,128,2,35,2,129,2,130,0,16778239,-10,2,34,-5,2,64,-2,3,0,28,2,31,-3,3,0,3,2,47,3,0,6,2,48,-85,3,0,33,2,47,-126,3,0,18,2,36,-269,3,0,17,2,40,2,7,-3,2,17,2,131,2,0,2,23,2,48,2,132,2,23,-21,3,0,2,-4,3,0,2,0,67583,-1,2,103,-2,0,11,3,0,191,2,51,3,0,38,2,29,-1,2,33,-279,3,0,8,2,7,-1,2,133,2,52,3,0,11,2,6,-72,3,0,3,2,134,2,135,-187,3,0,2,2,37,2,0,2,136,2,137,2,55,2,0,2,138,2,139,2,140,3,0,10,2,141,2,142,2,15,3,37,2,3,53,2,3,54,2,2,143,-73,2,0,0,1065361407,0,16384,-11,2,0,2,121,-40,3,0,6,2,117,-1,3,0,2,0,2063,-37,2,55,2,144,2,145,2,146,2,147,2,148,-138,3,0,1334,2,9,-1,3,0,129,2,27,3,0,6,2,9,3,0,180,2,149,3,0,233,0,1,-96,3,0,16,2,9,-47,3,0,154,2,56,-28517,2,0,0,1,-1,2,124,2,0,0,8193,-21,2,193,0,10255,0,4,-11,2,64,2,171,-1,0,71680,-1,2,161,0,4292900864,0,805306431,-5,2,150,-1,2,157,-1,0,6144,-2,2,127,-1,2,154,-1,0,2147532800,2,151,2,165,2,0,2,164,0,524032,0,4,-4,2,190,0,205128192,0,1333757536,0,2147483696,0,423953,0,747766272,0,2717763192,0,4286578751,0,278545,2,152,0,4294886464,0,33292336,0,417809,2,152,0,1327482464,0,4278190128,0,700594195,0,1006647527,0,4286497336,0,4160749631,2,153,0,469762560,0,4171219488,0,8323120,2,153,0,202375680,0,3214918176,0,4294508592,2,153,-1,0,983584,0,48,0,58720273,0,3489923072,0,10517376,0,4293066815,0,1,0,2013265920,2,177,2,0,0,2089,0,3221225552,0,201375904,2,0,-2,0,256,0,122880,0,16777216,2,150,0,4160757760,2,0,-6,2,167,-11,0,3263218176,-1,0,49664,0,2160197632,0,8388802,-1,0,12713984,-1,2,154,2,159,2,178,-2,2,162,-20,0,3758096385,-2,2,155,0,4292878336,2,90,2,169,0,4294057984,-2,2,163,2,156,2,175,-2,2,155,-1,2,182,-1,2,170,2,124,0,4026593280,0,14,0,4292919296,-1,2,158,0,939588608,-1,0,805306368,-1,2,124,0,1610612736,2,156,2,157,2,4,2,0,-2,2,158,2,159,-3,0,267386880,-1,2,160,0,7168,-1,0,65024,2,154,2,161,2,179,-7,2,168,-8,2,162,-1,0,1426112704,2,163,-1,2,164,0,271581216,0,2149777408,2,23,2,161,2,124,0,851967,2,180,-1,2,23,2,181,-4,2,158,-20,2,195,2,165,-56,0,3145728,2,185,-4,2,166,2,124,-4,0,32505856,-1,2,167,-1,0,2147385088,2,90,1,2155905152,2,-3,2,103,2,0,2,168,-2,2,169,-6,2,170,0,4026597375,0,1,-1,0,1,-1,2,171,-3,2,117,2,64,-2,2,166,-2,2,176,2,124,-878,2,159,-36,2,172,-1,2,201,-10,2,188,-5,2,174,-6,0,4294965251,2,27,-1,2,173,-1,2,174,-2,0,4227874752,-3,0,2146435072,2,159,-2,0,1006649344,2,124,-1,2,90,0,201375744,-3,0,134217720,2,90,0,4286677377,0,32896,-1,2,158,-3,2,175,-349,2,176,0,1920,2,177,3,0,264,-11,2,157,-2,2,178,2,0,0,520617856,0,2692743168,0,36,-3,0,524284,-11,2,23,-1,2,187,-1,2,184,0,3221291007,2,178,-1,2,202,0,2158720,-3,2,159,0,1,-4,2,124,0,3808625411,0,3489628288,2,200,0,1207959680,0,3221274624,2,0,-3,2,179,0,120,0,7340032,-2,2,180,2,4,2,23,2,163,3,0,4,2,159,-1,2,181,2,177,-1,0,8176,2,182,2,179,2,183,-1,0,4290773232,2,0,-4,2,163,2,189,0,15728640,2,177,-1,2,161,-1,0,4294934512,3,0,4,-9,2,90,2,170,2,184,3,0,4,0,704,0,1849688064,2,185,-1,2,124,0,4294901887,2,0,0,130547712,0,1879048192,2,199,3,0,2,-1,2,186,2,187,-1,0,17829776,0,2025848832,0,4261477888,-2,2,0,-1,0,4286580608,-1,0,29360128,2,192,0,16252928,0,3791388672,2,38,3,0,2,-2,2,196,2,0,-1,2,103,-1,0,66584576,-1,2,191,3,0,9,2,124,-1,0,4294755328,3,0,2,-1,2,161,2,178,3,0,2,2,23,2,188,2,90,-2,0,245760,0,2147418112,-1,2,150,2,203,0,4227923456,-1,2,164,2,161,2,90,-3,0,4292870145,0,262144,2,124,3,0,2,0,1073758848,2,189,-1,0,4227921920,2,190,0,68289024,0,528402016,0,4292927536,3,0,4,-2,0,268435456,2,91,-2,2,191,3,0,5,-1,2,192,2,163,2,0,-2,0,4227923936,2,62,-1,2,155,2,95,2,0,2,154,2,158,3,0,6,-1,2,177,3,0,3,-2,0,2146959360,0,9440640,0,104857600,0,4227923840,3,0,2,0,768,2,193,2,77,-2,2,161,-2,2,119,-1,2,155,3,0,8,0,512,0,8388608,2,194,2,172,2,187,0,4286578944,3,0,2,0,1152,0,1266679808,2,191,0,576,0,4261707776,2,95,3,0,9,2,155,3,0,5,2,16,-1,0,2147221504,-28,2,178,3,0,3,-3,0,4292902912,-6,2,96,3,0,85,-33,0,4294934528,3,0,126,-18,2,195,3,0,269,-17,2,155,2,124,2,198,3,0,2,2,23,0,4290822144,-2,0,67174336,0,520093700,2,17,3,0,21,-2,2,179,3,0,3,-2,0,30720,-1,0,32512,3,0,2,0,4294770656,-191,2,174,-38,2,170,2,0,2,196,3,0,279,-8,2,124,2,0,0,4294508543,0,65295,-11,2,177,3,0,72,-3,0,3758159872,0,201391616,3,0,155,-7,2,170,-1,0,384,-1,0,133693440,-3,2,196,-2,2,26,3,0,4,2,169,-2,2,90,2,155,3,0,4,-2,2,164,-1,2,150,0,335552923,2,197,-1,0,538974272,0,2214592512,0,132e3,-10,0,192,-8,0,12288,-21,0,134213632,0,4294901761,3,0,42,0,100663424,0,4294965284,3,0,6,-1,0,3221282816,2,198,3,0,11,-1,2,199,3,0,40,-6,0,4286578784,2,0,-2,0,1006694400,3,0,24,2,35,-1,2,94,3,0,2,0,1,2,163,3,0,6,2,197,0,4110942569,0,1432950139,0,2701658217,0,4026532864,0,4026532881,2,0,2,45,3,0,8,-1,2,158,-2,2,169,0,98304,0,65537,2,170,-5,0,4294950912,2,0,2,118,0,65528,2,177,0,4294770176,2,26,3,0,4,-30,2,174,0,3758153728,-3,2,169,-2,2,155,2,188,2,158,-1,2,191,-1,2,161,0,4294754304,3,0,2,-3,0,33554432,-2,2,200,-3,2,169,0,4175478784,2,201,0,4286643712,0,4286644216,2,0,-4,2,202,-1,2,165,0,4227923967,3,0,32,-1334,2,163,2,0,-129,2,94,-6,2,163,-180,2,203,-233,2,4,3,0,96,-16,2,163,3,0,47,-154,2,165,3,0,22381,-7,2,17,3,0,6128],[4294967295,4294967291,4092460543,4294828031,4294967294,134217726,268435455,2147483647,1048575,1073741823,3892314111,134217727,1061158911,536805376,4294910143,4160749567,4294901759,4294901760,536870911,262143,8388607,4294902783,4294918143,65535,67043328,2281701374,4294967232,2097151,4294903807,4194303,255,67108863,4294967039,511,524287,131071,127,4292870143,4294902271,4294549487,33554431,1023,67047423,4294901888,4286578687,4294770687,67043583,32767,15,2047999,67043343,16777215,4294902e3,4294934527,4294966783,4294967279,2047,262083,20511,4290772991,41943039,493567,4294959104,603979775,65536,602799615,805044223,4294965206,8191,1031749119,4294917631,2134769663,4286578493,4282253311,4294942719,33540095,4294905855,4294967264,2868854591,1608515583,265232348,534519807,2147614720,1060109444,4093640016,17376,2139062143,224,4169138175,4294909951,4286578688,4294967292,4294965759,2044,4292870144,4294966272,4294967280,8289918,4294934399,4294901775,4294965375,1602223615,4294967259,4294443008,268369920,4292804608,486341884,4294963199,3087007615,1073692671,4128527,4279238655,4294902015,4294966591,2445279231,3670015,3238002687,31,63,4294967288,4294705151,4095,3221208447,4294549472,2147483648,4285526655,4294966527,4294705152,4294966143,64,4294966719,16383,3774873592,458752,536807423,67043839,3758096383,3959414372,3755993023,2080374783,4294835295,4294967103,4160749565,4087,184024726,2862017156,1593309078,268434431,268434414,4294901763,536870912,2952790016,202506752,139264,402653184,4261412864,4227922944,49152,61440,3758096384,117440512,65280,3233808384,3221225472,2097152,4294965248,32768,57152,67108864,4293918720,4290772992,25165824,57344,4227915776,4278190080,4227907584,65520,4026531840,4227858432,4160749568,3758129152,4294836224,63488,1073741824,4294967040,4194304,251658240,196608,4294963200,64512,417808,4227923712,12582912,50331648,65472,4294967168,4294966784,16,4294917120,2080374784,4096,65408,524288,65532]);function h(u){return u.column++,u.currentChar=u.source.charCodeAt(++u.index)}function Xe(u,e){if((e&64512)!==55296)return 0;let n=u.source.charCodeAt(u.index+1);return(n&64512)!==56320?0:(e=u.currentChar=65536+((e&1023)<<10)+(n&1023),E2[(e>>>5)+0]>>>e&31&1||d(u,18,G(e)),u.index++,u.column++,1)}function p2(u,e){u.currentChar=u.source.charCodeAt(++u.index),u.flags|=1,e&4||(u.column=0,u.line++)}function c2(u){u.flags|=1,u.currentChar=u.source.charCodeAt(++u.index),u.column=0,u.line++}function ze(u){return u===160||u===65279||u===133||u===5760||u>=8192&&u<=8203||u===8239||u===8287||u===12288||u===8201||u===65519}function G(u){return u<=65535?String.fromCharCode(u):String.fromCharCode(u>>>10)+String.fromCharCode(u&1023)}function H(u){return u<65?u-48:u-65+10&15}function He(u){switch(u){case 134283266:return"NumericLiteral";case 134283267:return"StringLiteral";case 86021:case 86022:return"BooleanLiteral";case 86023:return"NullLiteral";case 65540:return"RegularExpression";case 67174408:case 67174409:case 132:return"TemplateLiteral";default:return(u&143360)===143360?"Identifier":(u&4096)===4096?"Keyword":"Punctuator"}}var L=[0,0,0,0,0,0,0,0,0,0,1032,0,0,2056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,3,0,0,8192,0,0,0,256,0,33024,0,0,242,242,114,114,114,114,114,114,594,594,0,0,16384,0,0,0,0,67,67,67,67,67,67,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,1,0,0,4099,0,71,71,71,71,71,71,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,16384,0,0,0,0],Ke=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Lu=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0];function Q2(u){return u<=127?Ke[u]:E2[(u>>>5)+34816]>>>u&31&1}function U2(u){return u<=127?Lu[u]:E2[(u>>>5)+0]>>>u&31&1||u===8204||u===8205}var Iu=["SingleLine","MultiLine","HTMLOpen","HTMLClose","HashbangComment"];function $e(u){let e=u.source;u.currentChar===35&&e.charCodeAt(u.index+1)===33&&(h(u),h(u),uu(u,e,0,4,u.tokenPos,u.linePos,u.colPos))}function Eu(u,e,n,t,i,o,l,f){return t&2048&&d(u,0),uu(u,e,n,i,o,l,f)}function uu(u,e,n,t,i,o,l){let{index:f}=u;for(u.tokenPos=u.index,u.linePos=u.line,u.colPos=u.column;u.index=u.source.length)return d(u,32)}let i=u.index-1,o=0,l=u.currentChar,{index:f}=u;for(;U2(l);){switch(l){case 103:o&2&&d(u,34,"g"),o|=2;break;case 105:o&1&&d(u,34,"i"),o|=1;break;case 109:o&4&&d(u,34,"m"),o|=4;break;case 117:o&16&&d(u,34,"u"),o|=16;break;case 121:o&8&&d(u,34,"y"),o|=8;break;case 115:o&32&&d(u,34,"s"),o|=32;break;case 100:o&64&&d(u,34,"d"),o|=64;break;default:d(u,33)}l=h(u)}let c=u.source.slice(f,u.index),a=u.source.slice(n,i);return u.tokenRegExp={pattern:a,flags:c},e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),u.tokenValue=Ye(u,a,c),65540}function Ye(u,e,n){try{return new RegExp(e,n)}catch{try{return new RegExp(e,n.replace("d","")),null}catch{d(u,32)}}}function Qe(u,e,n){let{index:t}=u,i="",o=h(u),l=u.index;for(;!(L[o]&8);){if(o===n)return i+=u.source.slice(l,u.index),h(u),e&512&&(u.tokenRaw=u.source.slice(t,u.index)),u.tokenValue=i,134283267;if((o&8)===8&&o===92){if(i+=u.source.slice(l,u.index),o=h(u),o<127||o===8232||o===8233){let f=Nu(u,e,o);f>=0?i+=G(f):Vu(u,f,0)}else i+=G(o);l=u.index+1}u.index>=u.end&&d(u,14),o=h(u)}d(u,14)}function Nu(u,e,n){switch(n){case 98:return 8;case 102:return 12;case 114:return 13;case 110:return 10;case 116:return 9;case 118:return 11;case 13:if(u.index1114111)return-5;return u.currentChar<1||u.currentChar!==125?-4:i}else{if(!(L[t]&64))return-4;let i=u.source.charCodeAt(u.index+1);if(!(L[i]&64))return-4;let o=u.source.charCodeAt(u.index+2);if(!(L[o]&64))return-4;let l=u.source.charCodeAt(u.index+3);return L[l]&64?(u.index+=3,u.column+=3,u.currentChar=u.source.charCodeAt(u.index),H(t)<<12|H(i)<<8|H(o)<<4|H(l)):-4}}case 56:case 57:if(!(e&256))return-3;default:return n}}function Vu(u,e,n){switch(e){case-1:return;case-2:d(u,n?2:1);case-3:d(u,13);case-4:d(u,6);case-5:d(u,102)}}function Ru(u,e){let{index:n}=u,t=67174409,i="",o=h(u);for(;o!==96;){if(o===36&&u.source.charCodeAt(u.index+1)===123){h(u),t=67174408;break}else if((o&8)===8&&o===92)if(o=h(u),o>126)i+=G(o);else{let l=Nu(u,e|1024,o);if(l>=0)i+=G(l);else if(l!==-1&&e&65536){i=void 0,o=Ze(u,o),o<0&&(t=67174408);break}else Vu(u,l,1)}else u.index=u.end&&d(u,15),o=h(u)}return h(u),u.tokenValue=i,u.tokenRaw=u.source.slice(n+1,u.index-(t===67174409?1:2)),t}function Ze(u,e){for(;e!==96;){switch(e){case 36:{let n=u.index+1;if(n=u.end&&d(u,15),e=h(u)}return e}function re(u,e){return u.index>=u.end&&d(u,0),u.index--,u.column--,Ru(u,e)}function wu(u,e,n){let t=u.currentChar,i=0,o=9,l=n&64?0:1,f=0,c=0;if(n&64)i="."+I2(u,t),t=u.currentChar,t===110&&d(u,11);else{if(t===48)if(t=h(u),(t|32)===120){for(n=136,t=h(u);L[t]&4160;){if(t===95){c||d(u,147),c=0,t=h(u);continue}c=1,i=i*16+H(t),f++,t=h(u)}(f===0||!c)&&d(u,f===0?19:148)}else if((t|32)===111){for(n=132,t=h(u);L[t]&4128;){if(t===95){c||d(u,147),c=0,t=h(u);continue}c=1,i=i*8+(t-48),f++,t=h(u)}(f===0||!c)&&d(u,f===0?0:148)}else if((t|32)===98){for(n=130,t=h(u);L[t]&4224;){if(t===95){c||d(u,147),c=0,t=h(u);continue}c=1,i=i*2+(t-48),f++,t=h(u)}(f===0||!c)&&d(u,f===0?0:148)}else if(L[t]&32)for(e&1024&&d(u,1),n=1;L[t]&16;){if(L[t]&512){n=32,l=0;break}i=i*8+(t-48),t=h(u)}else L[t]&512?(e&1024&&d(u,1),u.flags|=64,n=32):t===95&&d(u,0);if(n&48){if(l){for(;o>=0&&L[t]&4112;){if(t===95){t=h(u),(t===95||n&32)&&A2(u.index,u.line,u.index+1,147),c=1;continue}c=0,i=10*i+(t-48),t=h(u),--o}if(c&&A2(u.index,u.line,u.index+1,148),o>=0&&!Q2(t)&&t!==46)return u.tokenValue=i,e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),134283266}i+=I2(u,t),t=u.currentChar,t===46&&(h(u)===95&&d(u,0),n=64,i+="."+I2(u,u.currentChar),t=u.currentChar)}}let a=u.index,g=0;if(t===110&&n&128)g=1,t=h(u);else if((t|32)===101){t=h(u),L[t]&256&&(t=h(u));let{index:m}=u;L[t]&16||d(u,10),i+=u.source.substring(a,m)+I2(u,t),t=u.currentChar}return(u.index","(","{",".","...","}",")",";",",","[","]",":","?","'",'"',"","++","--","=","<<=",">>=",">>>=","**=","+=","-=","*=","/=","%=","^=","|=","&=","||=","&&=","??=","typeof","delete","void","!","~","+","-","in","instanceof","*","%","/","**","&&","||","===","!==","==","!=","<=",">=","<",">","<<",">>",">>>","&","|","^","var","let","const","break","case","catch","class","continue","debugger","default","do","else","export","extends","finally","for","function","if","import","new","return","super","switch","this","throw","try","while","with","implements","interface","package","private","protected","public","static","yield","as","async","await","constructor","get","set","from","of","enum","eval","arguments","escaped keyword","escaped future reserved keyword","reserved if strict","#","BigIntLiteral","??","?.","WhiteSpace","Illegal","LineTerminator","PrivateField","Template","@","target","meta","LineFeed","Escaped","JSXText"],Ou=Object.create(null,{this:{value:86113},function:{value:86106},if:{value:20571},return:{value:20574},var:{value:86090},else:{value:20565},for:{value:20569},new:{value:86109},in:{value:8738868},typeof:{value:16863277},while:{value:20580},case:{value:20558},break:{value:20557},try:{value:20579},catch:{value:20559},delete:{value:16863278},throw:{value:86114},switch:{value:86112},continue:{value:20561},default:{value:20563},instanceof:{value:8476725},do:{value:20564},void:{value:16863279},finally:{value:20568},async:{value:209007},await:{value:209008},class:{value:86096},const:{value:86092},constructor:{value:12401},debugger:{value:20562},export:{value:20566},extends:{value:20567},false:{value:86021},from:{value:12404},get:{value:12402},implements:{value:36966},import:{value:86108},interface:{value:36967},let:{value:241739},null:{value:86023},of:{value:274549},package:{value:36968},private:{value:36969},protected:{value:36970},public:{value:36971},set:{value:12403},static:{value:36972},super:{value:86111},true:{value:86022},with:{value:20581},yield:{value:241773},enum:{value:86134},eval:{value:537079927},as:{value:77934},arguments:{value:537079928},target:{value:143494},meta:{value:143495}});function Su(u,e,n){for(;Lu[h(u)];);return u.tokenValue=u.source.slice(u.tokenPos,u.index),u.currentChar!==92&&u.currentChar<=126?Ou[u.tokenValue]||208897:eu(u,e,0,n)}function Ge(u,e){let n=Uu(u);return U2(n)||d(u,4),u.tokenValue=G(n),eu(u,e,1,L[n]&4)}function eu(u,e,n,t){let i=u.index;for(;u.index=2&&o<=11){let l=Ou[u.tokenValue];return l===void 0?208897:n?l===209008?e&4196352?121:l:e&1024?l===36972||(l&36864)===36864?122:(l&20480)===20480?e&1073741824&&!(e&8192)?l:121:143483:e&1073741824&&!(e&8192)&&(l&20480)===20480?l:l===241773?e&1073741824?143483:e&2097152?121:l:l===209007?143483:(l&36864)===36864?l:121:l}return 208897}function xe(u){return Q2(h(u))||d(u,94),131}function Uu(u){return u.source.charCodeAt(u.index+1)!==117&&d(u,4),u.currentChar=u.source.charCodeAt(u.index+=2),pe(u)}function pe(u){let e=0,n=u.currentChar;if(n===123){let l=u.index-2;for(;L[h(u)]&64;)e=e<<4|H(u.currentChar),e>1114111&&A2(l,u.line,u.index+1,102);return u.currentChar!==125&&A2(l,u.line,u.index-1,6),h(u),e}L[n]&64||d(u,6);let t=u.source.charCodeAt(u.index+1);L[t]&64||d(u,6);let i=u.source.charCodeAt(u.index+2);L[i]&64||d(u,6);let o=u.source.charCodeAt(u.index+3);return L[o]&64||d(u,6),e=H(n)<<12|H(t)<<8|H(i)<<4|H(o),u.currentChar=u.source.charCodeAt(u.index+=4),e}var Mu=[129,129,129,129,129,129,129,129,129,128,136,128,128,130,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,128,16842800,134283267,131,208897,8457015,8455751,134283267,67174411,16,8457014,25233970,18,25233971,67108877,8457016,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,21,1074790417,8456258,1077936157,8456259,22,133,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,69271571,137,20,8455497,208897,132,4096,4096,4096,4096,4096,4096,4096,208897,4096,208897,208897,4096,208897,4096,208897,4096,208897,4096,4096,4096,208897,4096,4096,208897,4096,4096,2162700,8455240,1074790415,16842801,129];function D(u,e){if(u.flags=(u.flags|1)^1,u.startPos=u.index,u.startColumn=u.column,u.startLine=u.line,u.token=Ju(u,e,0),u.onToken&&u.token!==1048576){let n={start:{line:u.linePos,column:u.colPos},end:{line:u.line,column:u.column}};u.onToken(He(u.token),u.tokenPos,u.index,n)}}function Ju(u,e,n){let t=u.index===0,i=u.source,o=u.index,l=u.line,f=u.column;for(;u.index=u.end)return 8457014;let s=u.currentChar;return s===61?(h(u),4194340):s!==42?8457014:h(u)!==61?8457273:(h(u),4194337)}case 8455497:return h(u)!==61?8455497:(h(u),4194343);case 25233970:{h(u);let s=u.currentChar;return s===43?(h(u),33619995):s===61?(h(u),4194338):25233970}case 25233971:{h(u);let s=u.currentChar;if(s===45){if(h(u),(n&1||t)&&u.currentChar===62){e&256||d(u,109),h(u),n=Eu(u,i,n,e,3,o,l,f),o=u.tokenPos,l=u.linePos,f=u.colPos;continue}return 33619996}return s===61?(h(u),4194339):25233971}case 8457016:{if(h(u),u.index=48&&m<=57)return wu(u,e,80);if(m===46){let s=u.index+1;if(s=48&&s<=57)))return h(u),67108991}return 22}}}else{if((c^8232)<=1){n=n&-5|1,c2(u);continue}if((c&64512)===55296||E2[(c>>>5)+34816]>>>c&31&1)return(c&64512)===56320&&(c=(c&1023)<<10|c&1023|65536,E2[(c>>>5)+0]>>>c&31&1||d(u,18,G(c)),u.index++,u.currentChar=c),u.column++,u.tokenValue="",eu(u,e,0,0);if(ze(c)){h(u);continue}d(u,18,G(c))}}return 1048576}function u1(u,e){return u.startPos=u.tokenPos=u.index,u.startColumn=u.colPos=u.column,u.startLine=u.linePos=u.line,u.token=L[u.currentChar]&8192?e1(u,e):Ju(u,e,0),u.token}function e1(u,e){let n=u.currentChar,t=h(u),i=u.index;for(;t!==n;)u.index>=u.end&&d(u,14),t=h(u);return t!==n&&d(u,14),u.tokenValue=u.source.slice(i,u.index),h(u),e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),134283267}function d2(u,e){if(u.startPos=u.tokenPos=u.index,u.startColumn=u.colPos=u.column,u.startLine=u.linePos=u.line,u.index>=u.end)return u.token=1048576;switch(Mu[u.source.charCodeAt(u.index)]){case 8456258:{h(u),u.currentChar===47?(h(u),u.token=25):u.token=8456258;break}case 2162700:{h(u),u.token=2162700;break}default:{let t=0;for(;u.index1&&i&32&&u.token&262144&&d(u,59,U[u.token&255]),l}function vu(u,e,n,t,i){let{token:o,tokenPos:l,linePos:f,colPos:c}=u,a=null,g=oe(u,e,n,t,i,l,f,c);return u.token===1077936157?(D(u,e|32768),a=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),(i&32||!(o&2097152))&&(u.token===274549||u.token===8738868&&(o&2097152||!(t&4)||e&1024))&&h2(l,u.line,u.index-3,58,u.token===274549?"of":"in")):(t&16||(o&2097152)>0)&&(u.token&262144)!==262144&&d(u,57,t&16?"const":"destructuring"),y(u,e,l,f,c,{type:"VariableDeclarator",id:g,init:a})}function F1(u,e,n,t,i,o,l){D(u,e);let f=((e&4194304)>0||(e&2048)>0&&(e&8192)>0)&&q(u,e,209008);P(u,e|32768,67174411),n&&(n=J(n,1));let c=null,a=null,g=0,m=null,s=u.token===86090||u.token===241739||u.token===86092,k,{token:C,tokenPos:b,linePos:E,colPos:w}=u;if(s?C===241739?(m=I(u,e,0),u.token&2240512?(u.token===8738868?e&1024&&d(u,65):m=y(u,e,b,E,w,{type:"VariableDeclaration",kind:"let",declarations:y2(u,e|134217728,n,8,32)}),u.assignable=1):e&1024?d(u,65):(s=!1,u.assignable=1,m=N(u,e,m,0,0,b,E,w),u.token===274549&&d(u,112))):(D(u,e),m=y(u,e,b,E,w,C===86090?{type:"VariableDeclaration",kind:"var",declarations:y2(u,e|134217728,n,4,32)}:{type:"VariableDeclaration",kind:"const",declarations:y2(u,e|134217728,n,16,32)}),u.assignable=1):C===1074790417?f&&d(u,80):(C&2097152)===2097152?(m=C===2162700?Y(u,e,void 0,1,0,0,2,32,b,E,w):_(u,e,void 0,1,0,0,2,32,b,E,w),g=u.destructible,e&256&&g&64&&d(u,61),u.assignable=g&16?2:1,m=N(u,e|134217728,m,0,0,u.tokenPos,u.linePos,u.colPos)):m=W(u,e|134217728,1,0,1,b,E,w),(u.token&262144)===262144){if(u.token===274549){u.assignable&2&&d(u,78,f?"await":"of"),r(u,m),D(u,e|32768),k=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),P(u,e|32768,16);let S=P2(u,e,n,t);return y(u,e,i,o,l,{type:"ForOfStatement",left:m,right:k,body:S,await:f})}u.assignable&2&&d(u,78,"in"),r(u,m),D(u,e|32768),f&&d(u,80),k=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos),P(u,e|32768,16);let M=P2(u,e,n,t);return y(u,e,i,o,l,{type:"ForInStatement",body:M,left:m,right:k})}f&&d(u,80),s||(g&8&&u.token!==1077936157&&d(u,78,"loop"),m=O(u,e|134217728,0,0,b,E,w,m)),u.token===18&&(m=e2(u,e,0,u.tokenPos,u.linePos,u.colPos,m)),P(u,e|32768,1074790417),u.token!==1074790417&&(c=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),P(u,e|32768,1074790417),u.token!==16&&(a=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),P(u,e|32768,16);let v=P2(u,e,n,t);return y(u,e,i,o,l,{type:"ForStatement",init:m,test:c,update:a,body:v})}function _u(u,e,n){return iu(e,u.token)||d(u,115),(u.token&537079808)===537079808&&d(u,116),n&&t2(u,e,n,u.tokenValue,8,0),I(u,e,0)}function q1(u,e,n){let t=u.tokenPos,i=u.linePos,o=u.colPos;D(u,e);let l=null,{tokenPos:f,linePos:c,colPos:a}=u,g=[];if(u.token===134283267)l=X(u,e);else{if(u.token&143360){let m=_u(u,e,n);if(g=[y(u,e,f,c,a,{type:"ImportDefaultSpecifier",local:m})],q(u,e,18))switch(u.token){case 8457014:g.push(Tu(u,e,n));break;case 2162700:Fu(u,e,n,g);break;default:d(u,105)}}else switch(u.token){case 8457014:g=[Tu(u,e,n)];break;case 2162700:Fu(u,e,n,g);break;case 67174411:return Qu(u,e,t,i,o);case 67108877:return Yu(u,e,t,i,o);default:d(u,28,U[u.token&255])}l=L1(u,e)}return z(u,e|32768),y(u,e,t,i,o,{type:"ImportDeclaration",specifiers:g,source:l})}function Tu(u,e,n){let{tokenPos:t,linePos:i,colPos:o}=u;return D(u,e),P(u,e,77934),(u.token&134217728)===134217728&&h2(t,u.line,u.index,28,U[u.token&255]),y(u,e,t,i,o,{type:"ImportNamespaceSpecifier",local:_u(u,e,n)})}function L1(u,e){return q(u,e,12404),u.token!==134283267&&d(u,103,"Import"),X(u,e)}function Fu(u,e,n,t){for(D(u,e);u.token&143360;){let{token:i,tokenValue:o,tokenPos:l,linePos:f,colPos:c}=u,a=I(u,e,0),g;q(u,e,77934)?((u.token&134217728)===134217728||u.token===18?d(u,104):M2(u,e,16,u.token,0),o=u.tokenValue,g=I(u,e,0)):(M2(u,e,16,i,0),g=a),n&&t2(u,e,n,o,8,0),t.push(y(u,e,l,f,c,{type:"ImportSpecifier",local:g,imported:a})),u.token!==1074790415&&P(u,e,18)}return P(u,e,1074790415),t}function Yu(u,e,n,t,i){let o=ru(u,e,y(u,e,n,t,i,{type:"Identifier",name:"import"}),n,t,i);return o=N(u,e,o,0,0,n,t,i),o=O(u,e,0,0,n,t,i,o),D2(u,e,o,n,t,i)}function Qu(u,e,n,t,i){let o=Gu(u,e,0,n,t,i);return o=N(u,e,o,0,0,n,t,i),u.token===18&&(o=e2(u,e,0,n,t,i,o)),D2(u,e,o,n,t,i)}function I1(u,e,n){let t=u.tokenPos,i=u.linePos,o=u.colPos;D(u,e|32768);let l=[],f=null,c=null,a;if(q(u,e|32768,20563)){switch(u.token){case 86106:{f=i2(u,e,n,4,1,1,0,u.tokenPos,u.linePos,u.colPos);break}case 133:case 86096:f=x2(u,e,n,1,u.tokenPos,u.linePos,u.colPos);break;case 209007:let{tokenPos:g,linePos:m,colPos:s}=u;f=I(u,e,0);let{flags:k}=u;k&1||(u.token===86106?f=i2(u,e,n,4,1,1,1,g,m,s):u.token===67174411?(f=au(u,e,f,1,1,0,k,g,m,s),f=N(u,e,f,0,0,g,m,s),f=O(u,e,0,0,g,m,s,f)):u.token&143360&&(n&&(n=H2(u,e,u.tokenValue)),f=I(u,e,0),f=v2(u,e,n,[f],1,g,m,s)));break;default:f=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),z(u,e|32768)}return n&&l2(u,"default"),y(u,e,t,i,o,{type:"ExportDefaultDeclaration",declaration:f})}switch(u.token){case 8457014:{D(u,e);let k=null;return q(u,e,77934)&&(n&&l2(u,u.tokenValue),k=I(u,e,0)),P(u,e,12404),u.token!==134283267&&d(u,103,"Export"),c=X(u,e),z(u,e|32768),y(u,e,t,i,o,{type:"ExportAllDeclaration",source:c,exported:k})}case 2162700:{D(u,e);let k=[],C=[];for(;u.token&143360;){let{tokenPos:b,tokenValue:E,linePos:w,colPos:v}=u,M=I(u,e,0),S;u.token===77934?(D(u,e),(u.token&134217728)===134217728&&d(u,104),n&&(k.push(u.tokenValue),C.push(E)),S=I(u,e,0)):(n&&(k.push(u.tokenValue),C.push(u.tokenValue)),S=M),l.push(y(u,e,b,w,v,{type:"ExportSpecifier",local:M,exported:S})),u.token!==1074790415&&P(u,e,18)}if(P(u,e,1074790415),q(u,e,12404))u.token!==134283267&&d(u,103,"Export"),c=X(u,e);else if(n){let b=0,E=k.length;for(;b0)&8738868,g,m;for(u.assignable=2;u.token&8454144&&(g=u.token,m=g&3840,(g&524288&&f&268435456||f&524288&&g&268435456)&&d(u,160),!(m+((g===8457273)<<8)-((a===g)<<12)<=l));)D(u,e|32768),c=y(u,e,t,i,o,{type:g&524288||g&268435456?"LogicalExpression":"BinaryExpression",left:c,right:n2(u,e,n,u.tokenPos,u.linePos,u.colPos,m,g,W(u,e,0,n,1,u.tokenPos,u.linePos,u.colPos)),operator:U[g&255]});return u.token===1077936157&&d(u,24),c}function N1(u,e,n,t,i,o,l){n||d(u,0);let f=u.token;D(u,e|32768);let c=W(u,e,0,l,1,u.tokenPos,u.linePos,u.colPos);return u.token===8457273&&d(u,31),e&1024&&f===16863278&&(c.type==="Identifier"?d(u,118):n1(c)&&d(u,124)),u.assignable=2,y(u,e,t,i,o,{type:"UnaryExpression",operator:U[f&255],argument:c,prefix:!0})}function V1(u,e,n,t,i,o,l,f,c,a){let{token:g}=u,m=I(u,e,o),{flags:s}=u;if(!(s&1)){if(u.token===86106)return pu(u,e,1,n,f,c,a);if((u.token&143360)===143360)return t||d(u,0),ne(u,e,i,f,c,a)}return!l&&u.token===67174411?au(u,e,m,i,1,0,s,f,c,a):u.token===10?(tu(u,e,g,1),l&&d(u,49),$2(u,e,u.tokenValue,m,l,i,0,f,c,a)):m}function R1(u,e,n,t,i,o,l){if(n&&(u.destructible|=256),e&2097152){D(u,e|32768),e&8388608&&d(u,30),t||d(u,24),u.token===22&&d(u,121);let f=null,c=!1;return u.flags&1||(c=q(u,e|32768,8457014),(u.token&77824||c)&&(f=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos))),u.assignable=2,y(u,e,i,o,l,{type:"YieldExpression",argument:f,delegate:c})}return e&1024&&d(u,95,"yield"),su(u,e,i,o,l)}function O1(u,e,n,t,i,o,l){if(t&&(u.destructible|=128),e&4194304||e&2048&&e&8192){n&&d(u,0),e&8388608&&h2(u.index,u.line,u.index,29),D(u,e|32768);let f=W(u,e,0,0,1,u.tokenPos,u.linePos,u.colPos);return u.token===8457273&&d(u,31),u.assignable=2,y(u,e,i,o,l,{type:"AwaitExpression",argument:f})}return e&2048&&d(u,96),su(u,e,i,o,l)}function K2(u,e,n,t,i,o){let{tokenPos:l,linePos:f,colPos:c}=u;P(u,e|32768,2162700);let a=[],g=e;if(u.token!==1074790415){for(;u.token===134283267;){let{index:m,tokenPos:s,tokenValue:k,token:C}=u,b=X(u,e);ju(u,m,s,k)&&(e|=1024,u.flags&128&&h2(u.index,u.line,u.tokenPos,64),u.flags&64&&h2(u.index,u.line,u.tokenPos,8)),a.push(lu(u,e,b,C,s,u.linePos,u.colPos))}e&1024&&(i&&((i&537079808)===537079808&&d(u,116),(i&36864)===36864&&d(u,38)),u.flags&512&&d(u,116),u.flags&256&&d(u,115)),e&64&&n&&o!==void 0&&!(g&1024)&&!(e&8192)&&z2(o)}for(u.flags=(u.flags|512|256|64)^832,u.destructible=(u.destructible|256)^256;u.token!==1074790415;)a.push(S2(u,e,n,4,{}));return P(u,t&24?e|32768:e,1074790415),u.flags&=-193,u.token===1077936157&&d(u,24),y(u,e,l,f,c,{type:"BlockStatement",body:a})}function U1(u,e,n,t,i){switch(D(u,e),u.token){case 67108991:d(u,162);case 67174411:{e&524288||d(u,26),e&16384&&d(u,27),u.assignable=2;break}case 69271571:case 67108877:{e&262144||d(u,27),e&16384&&d(u,27),u.assignable=1;break}default:d(u,28,"super")}return y(u,e,n,t,i,{type:"Super"})}function W(u,e,n,t,i,o,l,f){let c=K(u,e,2,0,n,0,t,i,o,l,f);return N(u,e,c,t,0,o,l,f)}function M1(u,e,n,t,i,o){u.assignable&2&&d(u,53);let{token:l}=u;return D(u,e),u.assignable=2,y(u,e,t,i,o,{type:"UpdateExpression",argument:n,operator:U[l&255],prefix:!1})}function N(u,e,n,t,i,o,l,f){if((u.token&33619968)===33619968&&!(u.flags&1))n=M1(u,e,n,o,l,f);else if((u.token&67108864)===67108864){switch(e=(e|134217728)^134217728,u.token){case 67108877:{D(u,(e|1073741824|8192)^8192),u.assignable=1;let c=Zu(u,e);n=y(u,e,o,l,f,{type:"MemberExpression",object:n,computed:!1,property:c});break}case 69271571:{let c=!1;(u.flags&2048)===2048&&(c=!0,u.flags=(u.flags|2048)^2048),D(u,e|32768);let{tokenPos:a,linePos:g,colPos:m}=u,s=j(u,e,t,1,a,g,m);P(u,e,20),u.assignable=1,n=y(u,e,o,l,f,{type:"MemberExpression",object:n,computed:!0,property:s}),c&&(u.flags|=2048);break}case 67174411:{if((u.flags&1024)===1024)return u.flags=(u.flags|1024)^1024,n;let c=!1;(u.flags&2048)===2048&&(c=!0,u.flags=(u.flags|2048)^2048);let a=du(u,e,t);u.assignable=2,n=y(u,e,o,l,f,{type:"CallExpression",callee:n,arguments:a}),c&&(u.flags|=2048);break}case 67108991:{D(u,(e|1073741824|8192)^8192),u.flags|=2048,u.assignable=2,n=J1(u,e,n,o,l,f);break}default:(u.flags&2048)===2048&&d(u,161),u.assignable=2,n=y(u,e,o,l,f,{type:"TaggedTemplateExpression",tag:n,quasi:u.token===67174408?cu(u,e|65536):fu(u,e,u.tokenPos,u.linePos,u.colPos)})}n=N(u,e,n,0,1,o,l,f)}return i===0&&(u.flags&2048)===2048&&(u.flags=(u.flags|2048)^2048,n=y(u,e,o,l,f,{type:"ChainExpression",expression:n})),n}function J1(u,e,n,t,i,o){let l=!1,f;if((u.token===69271571||u.token===67174411)&&(u.flags&2048)===2048&&(l=!0,u.flags=(u.flags|2048)^2048),u.token===69271571){D(u,e|32768);let{tokenPos:c,linePos:a,colPos:g}=u,m=j(u,e,0,1,c,a,g);P(u,e,20),u.assignable=2,f=y(u,e,t,i,o,{type:"MemberExpression",object:n,computed:!0,optional:!0,property:m})}else if(u.token===67174411){let c=du(u,e,0);u.assignable=2,f=y(u,e,t,i,o,{type:"CallExpression",callee:n,arguments:c,optional:!0})}else{u.token&143360||d(u,155);let c=I(u,e,0);u.assignable=2,f=y(u,e,t,i,o,{type:"MemberExpression",object:n,computed:!1,optional:!0,property:c})}return l&&(u.flags|=2048),f}function Zu(u,e){return!(u.token&143360)&&u.token!==131&&d(u,155),e&1&&u.token===131?X2(u,e,u.tokenPos,u.linePos,u.colPos):I(u,e,0)}function j1(u,e,n,t,i,o,l){n&&d(u,54),t||d(u,0);let{token:f}=u;D(u,e|32768);let c=W(u,e,0,0,1,u.tokenPos,u.linePos,u.colPos);return u.assignable&2&&d(u,53),u.assignable=2,y(u,e,i,o,l,{type:"UpdateExpression",argument:c,operator:U[f&255],prefix:!0})}function K(u,e,n,t,i,o,l,f,c,a,g){if((u.token&143360)===143360){switch(u.token){case 209008:return O1(u,e,t,l,c,a,g);case 241773:return R1(u,e,l,i,c,a,g);case 209007:return V1(u,e,l,f,i,o,t,c,a,g)}let{token:m,tokenValue:s}=u,k=I(u,e|65536,o);return u.token===10?(f||d(u,0),tu(u,e,m,1),$2(u,e,s,k,t,i,0,c,a,g)):(e&16384&&m===537079928&&d(u,127),m===241739&&(e&1024&&d(u,110),n&24&&d(u,98)),u.assignable=e&1024&&(m&537079808)===537079808?2:1,k)}if((u.token&134217728)===134217728)return X(u,e);switch(u.token){case 33619995:case 33619996:return j1(u,e,t,f,c,a,g);case 16863278:case 16842800:case 16842801:case 25233970:case 25233971:case 16863277:case 16863279:return N1(u,e,f,c,a,g,l);case 86106:return pu(u,e,0,l,c,a,g);case 2162700:return W1(u,e,i?0:1,l,c,a,g);case 69271571:return $1(u,e,i?0:1,l,c,a,g);case 67174411:return Y1(u,e,i,1,0,c,a,g);case 86021:case 86022:case 86023:return H1(u,e,c,a,g);case 86113:return K1(u,e);case 65540:return r1(u,e,c,a,g);case 133:case 86096:return G1(u,e,l,c,a,g);case 86111:return U1(u,e,c,a,g);case 67174409:return fu(u,e,c,a,g);case 67174408:return cu(u,e);case 86109:return Q1(u,e,l,c,a,g);case 134283389:return xu(u,e,c,a,g);case 131:return X2(u,e,c,a,g);case 86108:return X1(u,e,t,l,c,a,g);case 8456258:if(e&16)return gu(u,e,1,c,a,g);default:if(iu(e,u.token))return su(u,e,c,a,g);d(u,28,U[u.token&255])}}function X1(u,e,n,t,i,o,l){let f=I(u,e,0);return u.token===67108877?ru(u,e,f,i,o,l):(n&&d(u,138),f=Gu(u,e,t,i,o,l),u.assignable=2,N(u,e,f,t,0,i,o,l))}function ru(u,e,n,t,i,o){return e&2048||d(u,164),D(u,e),u.token!==143495&&u.tokenValue!=="meta"&&d(u,28,U[u.token&255]),u.assignable=2,y(u,e,t,i,o,{type:"MetaProperty",meta:n,property:I(u,e,0)})}function Gu(u,e,n,t,i,o){P(u,e|32768,67174411),u.token===14&&d(u,139);let l=R(u,e,1,0,n,u.tokenPos,u.linePos,u.colPos);return P(u,e,16),y(u,e,t,i,o,{type:"ImportExpression",source:l})}function xu(u,e,n,t,i){let{tokenRaw:o,tokenValue:l}=u;return D(u,e),u.assignable=2,y(u,e,n,t,i,e&512?{type:"Literal",value:l,bigint:o.slice(0,-1),raw:o}:{type:"Literal",value:l,bigint:o.slice(0,-1)})}function fu(u,e,n,t,i){u.assignable=2;let{tokenValue:o,tokenRaw:l,tokenPos:f,linePos:c,colPos:a}=u;P(u,e,67174409);let g=[R2(u,e,o,l,f,c,a,!0)];return y(u,e,n,t,i,{type:"TemplateLiteral",expressions:[],quasis:g})}function cu(u,e){e=(e|134217728)^134217728;let{tokenValue:n,tokenRaw:t,tokenPos:i,linePos:o,colPos:l}=u;P(u,e|32768,67174408);let f=[R2(u,e,n,t,i,o,l,!1)],c=[j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)];for(u.token!==1074790415&&d(u,81);(u.token=re(u,e))!==67174409;){let{tokenValue:a,tokenRaw:g,tokenPos:m,linePos:s,colPos:k}=u;P(u,e|32768,67174408),f.push(R2(u,e,a,g,m,s,k,!1)),c.push(j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),u.token!==1074790415&&d(u,81)}{let{tokenValue:a,tokenRaw:g,tokenPos:m,linePos:s,colPos:k}=u;P(u,e,67174409),f.push(R2(u,e,a,g,m,s,k,!0))}return y(u,e,i,o,l,{type:"TemplateLiteral",expressions:c,quasis:f})}function R2(u,e,n,t,i,o,l,f){let c=y(u,e,i,o,l,{type:"TemplateElement",value:{cooked:n,raw:t},tail:f}),a=f?1:2;return e&2&&(c.start+=1,c.range[0]+=1,c.end-=a,c.range[1]-=a),e&4&&(c.loc.start.column+=1,c.loc.end.column-=a),c}function z1(u,e,n,t,i){e=(e|134217728)^134217728,P(u,e|32768,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return u.assignable=1,y(u,e,n,t,i,{type:"SpreadElement",argument:o})}function du(u,e,n){D(u,e|32768);let t=[];if(u.token===16)return D(u,e),t;for(;u.token!==16&&(u.token===14?t.push(z1(u,e,u.tokenPos,u.linePos,u.colPos)):t.push(R(u,e,1,0,n,u.tokenPos,u.linePos,u.colPos)),!(u.token!==18||(D(u,e|32768),u.token===16))););return P(u,e,16),t}function I(u,e,n){let{tokenValue:t,tokenPos:i,linePos:o,colPos:l}=u;return D(u,e),y(u,e,i,o,l,e&268435456?{type:"Identifier",name:t,pattern:n===1}:{type:"Identifier",name:t})}function X(u,e){let{tokenValue:n,tokenRaw:t,tokenPos:i,linePos:o,colPos:l}=u;return u.token===134283389?xu(u,e,i,o,l):(D(u,e),u.assignable=2,y(u,e,i,o,l,e&512?{type:"Literal",value:n,raw:t}:{type:"Literal",value:n}))}function H1(u,e,n,t,i){let o=U[u.token&255],l=u.token===86023?null:o==="true";return D(u,e),u.assignable=2,y(u,e,n,t,i,e&512?{type:"Literal",value:l,raw:o}:{type:"Literal",value:l})}function K1(u,e){let{tokenPos:n,linePos:t,colPos:i}=u;return D(u,e),u.assignable=2,y(u,e,n,t,i,{type:"ThisExpression"})}function i2(u,e,n,t,i,o,l,f,c,a){D(u,e|32768);let g=i?nu(u,e,8457014):0,m=null,s,k=n?s2():void 0;if(u.token===67174411)o&1||d(u,37,"Function");else{let E=t&4&&(!(e&8192)||!(e&2048))?4:64;Xu(u,e|(e&3072)<<11,u.token),n&&(E&4?Ku(u,e,n,u.tokenValue,E):t2(u,e,n,u.tokenValue,E,t),k=J(k,256),o&&o&2&&l2(u,u.tokenValue)),s=u.token,u.token&143360?m=I(u,e,0):d(u,28,U[u.token&255])}e=(e|32243712)^32243712|67108864|l*2+g<<21|(g?0:1073741824),n&&(k=J(k,512));let C=ee(u,e|8388608,k,0,1),b=K2(u,(e|8192|4096|131072)^143360,n?J(k,128):k,8,s,n?k.scopeError:void 0);return y(u,e,f,c,a,{type:"FunctionDeclaration",id:m,params:C,body:b,async:l===1,generator:g===1})}function pu(u,e,n,t,i,o,l){D(u,e|32768);let f=nu(u,e,8457014),c=n*2+f<<21,a=null,g,m=e&64?s2():void 0;(u.token&176128)>0&&(Xu(u,(e|32243712)^32243712|c,u.token),m&&(m=J(m,256)),g=u.token,a=I(u,e,0)),e=(e|32243712)^32243712|67108864|c|(f?0:1073741824),m&&(m=J(m,512));let s=ee(u,e|8388608,m,t,1),k=K2(u,e&-134377473,m&&J(m,128),0,g,void 0);return u.assignable=2,y(u,e,i,o,l,{type:"FunctionExpression",id:a,params:s,body:k,async:n===1,generator:f===1})}function $1(u,e,n,t,i,o,l){let f=_(u,e,void 0,n,t,0,2,0,i,o,l);return e&256&&u.destructible&64&&d(u,61),u.destructible&8&&d(u,60),f}function _(u,e,n,t,i,o,l,f,c,a,g){D(u,e|32768);let m=[],s=0;for(e=(e|134217728)^134217728;u.token!==20;)if(q(u,e|32768,18))m.push(null);else{let C,{token:b,tokenPos:E,linePos:w,colPos:v,tokenValue:M}=u;if(b&143360)if(C=K(u,e,l,0,1,0,i,1,E,w,v),u.token===1077936157){u.assignable&2&&d(u,24),D(u,e|32768),n&&u2(u,e,n,M,l,f);let S=R(u,e,1,1,i,u.tokenPos,u.linePos,u.colPos);C=y(u,e,E,w,v,o?{type:"AssignmentPattern",left:C,right:S}:{type:"AssignmentExpression",operator:"=",left:C,right:S}),s|=u.destructible&256?256:0|u.destructible&128?128:0}else u.token===18||u.token===20?(u.assignable&2?s|=16:n&&u2(u,e,n,M,l,f),s|=u.destructible&256?256:0|u.destructible&128?128:0):(s|=l&1?32:l&2?0:16,C=N(u,e,C,i,0,E,w,v),u.token!==18&&u.token!==20?(u.token!==1077936157&&(s|=16),C=O(u,e,i,o,E,w,v,C)):u.token!==1077936157&&(s|=u.assignable&2?16:32));else b&2097152?(C=u.token===2162700?Y(u,e,n,0,i,o,l,f,E,w,v):_(u,e,n,0,i,o,l,f,E,w,v),s|=u.destructible,u.assignable=u.destructible&16?2:1,u.token===18||u.token===20?u.assignable&2&&(s|=16):u.destructible&8?d(u,69):(C=N(u,e,C,i,0,E,w,v),s=u.assignable&2?16:0,u.token!==18&&u.token!==20?C=O(u,e,i,o,E,w,v,C):u.token!==1077936157&&(s|=u.assignable&2?16:32))):b===14?(C=b2(u,e,n,20,l,f,0,i,o,E,w,v),s|=u.destructible,u.token!==18&&u.token!==20&&d(u,28,U[u.token&255])):(C=W(u,e,1,0,1,E,w,v),u.token!==18&&u.token!==20?(C=O(u,e,i,o,E,w,v,C),!(l&3)&&b===67174411&&(s|=16)):u.assignable&2?s|=16:b===67174411&&(s|=u.assignable&1&&l&3?32:16));if(m.push(C),q(u,e|32768,18)){if(u.token===20)break}else break}P(u,e,20);let k=y(u,e,c,a,g,{type:o?"ArrayPattern":"ArrayExpression",elements:m});return!t&&u.token&4194304?ue(u,e,s,i,o,c,a,g,k):(u.destructible=s,k)}function ue(u,e,n,t,i,o,l,f,c){u.token!==1077936157&&d(u,24),D(u,e|32768),n&16&&d(u,24),i||r(u,c);let{tokenPos:a,linePos:g,colPos:m}=u,s=R(u,e,1,1,t,a,g,m);return u.destructible=(n|64|8)^72|(u.destructible&128?128:0)|(u.destructible&256?256:0),y(u,e,o,l,f,i?{type:"AssignmentPattern",left:c,right:s}:{type:"AssignmentExpression",left:c,operator:"=",right:s})}function b2(u,e,n,t,i,o,l,f,c,a,g,m){D(u,e|32768);let s=null,k=0,{token:C,tokenValue:b,tokenPos:E,linePos:w,colPos:v}=u;if(C&143360)u.assignable=1,s=K(u,e,i,0,1,0,f,1,E,w,v),C=u.token,s=N(u,e,s,f,0,E,w,v),u.token!==18&&u.token!==t&&(u.assignable&2&&u.token===1077936157&&d(u,69),k|=16,s=O(u,e,f,c,E,w,v,s)),u.assignable&2?k|=16:C===t||C===18?n&&u2(u,e,n,b,i,o):k|=32,k|=u.destructible&128?128:0;else if(C===t)d(u,39);else if(C&2097152)s=u.token===2162700?Y(u,e,n,1,f,c,i,o,E,w,v):_(u,e,n,1,f,c,i,o,E,w,v),C=u.token,C!==1077936157&&C!==t&&C!==18?(u.destructible&8&&d(u,69),s=N(u,e,s,f,0,E,w,v),k|=u.assignable&2?16:0,(u.token&4194304)===4194304?(u.token!==1077936157&&(k|=16),s=O(u,e,f,c,E,w,v,s)):((u.token&8454144)===8454144&&(s=n2(u,e,1,E,w,v,4,C,s)),q(u,e|32768,22)&&(s=f2(u,e,s,E,w,v)),k|=u.assignable&2?16:32)):k|=t===1074790415&&C!==1077936157?16:u.destructible;else{k|=32,s=W(u,e,1,f,1,u.tokenPos,u.linePos,u.colPos);let{token:M,tokenPos:S,linePos:V,colPos:A}=u;return M===1077936157&&M!==t&&M!==18?(u.assignable&2&&d(u,24),s=O(u,e,f,c,S,V,A,s),k|=16):(M===18?k|=16:M!==t&&(s=O(u,e,f,c,S,V,A,s)),k|=u.assignable&1?32:16),u.destructible=k,u.token!==t&&u.token!==18&&d(u,156),y(u,e,a,g,m,{type:c?"RestElement":"SpreadElement",argument:s})}if(u.token!==t)if(i&1&&(k|=l?16:32),q(u,e|32768,1077936157)){k&16&&d(u,24),r(u,s);let M=R(u,e,1,1,f,u.tokenPos,u.linePos,u.colPos);s=y(u,e,E,w,v,c?{type:"AssignmentPattern",left:s,right:M}:{type:"AssignmentExpression",left:s,operator:"=",right:M}),k=16}else k|=16;return u.destructible=k,y(u,e,a,g,m,{type:c?"RestElement":"SpreadElement",argument:s})}function Z(u,e,n,t,i,o,l){let f=n&64?14680064:31981568;e=(e|f)^f|(n&88)<<18|100925440;let c=e&64?J(s2(),512):void 0,a=_1(u,e|8388608,c,n,1,t);c&&(c=J(c,128));let g=K2(u,e&-134230017,c,0,void 0,void 0);return y(u,e,i,o,l,{type:"FunctionExpression",params:a,body:g,async:(n&16)>0,generator:(n&8)>0,id:null})}function W1(u,e,n,t,i,o,l){let f=Y(u,e,void 0,n,t,0,2,0,i,o,l);return e&256&&u.destructible&64&&d(u,61),u.destructible&8&&d(u,60),f}function Y(u,e,n,t,i,o,l,f,c,a,g){D(u,e);let m=[],s=0,k=0;for(e=(e|134217728)^134217728;u.token!==1074790415;){let{token:b,tokenValue:E,linePos:w,colPos:v,tokenPos:M}=u;if(b===14)m.push(b2(u,e,n,1074790415,l,f,0,i,o,M,w,v));else{let S=0,V=null,A,Q=u.token;if(u.token&143360||u.token===121)if(V=I(u,e,0),u.token===18||u.token===1074790415||u.token===1077936157)if(S|=4,e&1024&&(b&537079808)===537079808?s|=16:M2(u,e,l,b,0),n&&u2(u,e,n,E,l,f),q(u,e|32768,1077936157)){s|=8;let B=R(u,e,1,1,i,u.tokenPos,u.linePos,u.colPos);s|=u.destructible&256?256:0|u.destructible&128?128:0,A=y(u,e,M,w,v,{type:"AssignmentPattern",left:e&-2147483648?Object.assign({},V):V,right:B})}else s|=(b===209008?128:0)|(b===121?16:0),A=e&-2147483648?Object.assign({},V):V;else if(q(u,e|32768,21)){let{tokenPos:B,linePos:F,colPos:T}=u;if(E==="__proto__"&&k++,u.token&143360){let o2=u.token,m2=u.tokenValue;s|=Q===121?16:0,A=K(u,e,l,0,1,0,i,1,B,F,T);let{token:x}=u;A=N(u,e,A,i,0,B,F,T),u.token===18||u.token===1074790415?x===1077936157||x===1074790415||x===18?(s|=u.destructible&128?128:0,u.assignable&2?s|=16:n&&(o2&143360)===143360&&u2(u,e,n,m2,l,f)):s|=u.assignable&1?32:16:(u.token&4194304)===4194304?(u.assignable&2?s|=16:x!==1077936157?s|=32:n&&u2(u,e,n,m2,l,f),A=O(u,e,i,o,B,F,T,A)):(s|=16,(u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,x,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,i,o,l,f,B,F,T):Y(u,e,n,0,i,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):u.destructible&8?d(u,69):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&2?16:0,(u.token&4194304)===4194304?A=N2(u,e,i,o,B,F,T,A):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,i,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&2?16:0,u.token!==18&&b!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,i,o,B,F,T,A))))}else u.token===69271571?(s|=16,b===209007&&(S|=16),S|=(b===12402?256:b===12403?512:1)|2,V=g2(u,e,i),s|=u.assignable,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):u.token&143360?(s|=16,b===121&&d(u,93),b===209007&&(u.flags&1&&d(u,129),S|=16),V=I(u,e,0),S|=b===12402?256:b===12403?512:1,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):u.token===67174411?(s|=16,S|=1,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):u.token===8457014?(s|=16,b===12402?d(u,40):b===12403?d(u,41):b===143483&&d(u,93),D(u,e),S|=9|(b===209007?16:0),u.token&143360?V=I(u,e,0):(u.token&134217728)===134217728?V=X(u,e):u.token===69271571?(S|=2,V=g2(u,e,i),s|=u.assignable):d(u,28,U[u.token&255]),A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):(u.token&134217728)===134217728?(b===209007&&(S|=16),S|=b===12402?256:b===12403?512:1,s|=16,V=X(u,e),A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):d(u,130);else if((u.token&134217728)===134217728)if(V=X(u,e),u.token===21){P(u,e|32768,21);let{tokenPos:B,linePos:F,colPos:T}=u;if(E==="__proto__"&&k++,u.token&143360){A=K(u,e,l,0,1,0,i,1,B,F,T);let{token:o2,tokenValue:m2}=u;A=N(u,e,A,i,0,B,F,T),u.token===18||u.token===1074790415?o2===1077936157||o2===1074790415||o2===18?u.assignable&2?s|=16:n&&u2(u,e,n,m2,l,f):s|=u.assignable&1?32:16:u.token===1077936157?(u.assignable&2&&(s|=16),A=O(u,e,i,o,B,F,T,A)):(s|=16,A=O(u,e,i,o,B,F,T,A))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,i,o,l,f,B,F,T):Y(u,e,n,0,i,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(u.destructible&8)!==8&&(A=N(u,e,A,i,0,B,F,T),s=u.assignable&2?16:0,(u.token&4194304)===4194304?A=N2(u,e,i,o,B,F,T,A):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,0,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&1?0:16,u.token!==18&&u.token!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,i,o,B,F,T,A))))}else u.token===67174411?(S|=1,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos),s=u.assignable|16):d(u,131);else if(u.token===69271571)if(V=g2(u,e,i),s|=u.destructible&256?256:0,S|=2,u.token===21){D(u,e|32768);let{tokenPos:B,linePos:F,colPos:T,tokenValue:o2,token:m2}=u;if(u.token&143360){A=K(u,e,l,0,1,0,i,1,B,F,T);let{token:x}=u;A=N(u,e,A,i,0,B,F,T),(u.token&4194304)===4194304?(s|=u.assignable&2?16:x===1077936157?0:32,A=N2(u,e,i,o,B,F,T,A)):u.token===18||u.token===1074790415?x===1077936157||x===1074790415||x===18?u.assignable&2?s|=16:n&&(m2&143360)===143360&&u2(u,e,n,o2,l,f):s|=u.assignable&1?32:16:(s|=16,A=O(u,e,i,o,B,F,T,A))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,i,o,l,f,B,F,T):Y(u,e,n,0,i,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):s&8?d(u,60):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&2?s|16:0,(u.token&4194304)===4194304?(u.token!==1077936157&&(s|=16),A=N2(u,e,i,o,B,F,T,A)):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,0,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&1?0:16,u.token!==18&&u.token!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,i,o,B,F,T,A))))}else u.token===67174411?(S|=1,A=Z(u,e,S,i,u.tokenPos,w,v),s=16):d(u,42);else if(b===8457014)if(P(u,e|32768,8457014),S|=8,u.token&143360){let{token:B,line:F,index:T}=u;V=I(u,e,0),S|=1,u.token===67174411?(s|=16,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):h2(T,F,T,B===209007?44:B===12402||u.token===12403?43:45,U[B&255])}else(u.token&134217728)===134217728?(s|=16,V=X(u,e),S|=1,A=Z(u,e,S,i,M,w,v)):u.token===69271571?(s|=16,S|=3,V=g2(u,e,i),A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):d(u,123);else d(u,28,U[b&255]);s|=u.destructible&128?128:0,u.destructible=s,m.push(y(u,e,M,w,v,{type:"Property",key:V,value:A,kind:S&768?S&512?"set":"get":"init",computed:(S&2)>0,method:(S&1)>0,shorthand:(S&4)>0}))}if(s|=u.destructible,u.token!==18)break;D(u,e)}P(u,e,1074790415),k>1&&(s|=64);let C=y(u,e,c,a,g,{type:o?"ObjectPattern":"ObjectExpression",properties:m});return!t&&u.token&4194304?ue(u,e,s,i,o,c,a,g,C):(u.destructible=s,C)}function _1(u,e,n,t,i,o){P(u,e,67174411);let l=[];if(u.flags=(u.flags|128)^128,u.token===16)return t&512&&d(u,35,"Setter","one",""),D(u,e),l;t&256&&d(u,35,"Getter","no","s"),t&512&&u.token===14&&d(u,36),e=(e|134217728)^134217728;let f=0,c=0;for(;u.token!==18;){let a=null,{tokenPos:g,linePos:m,colPos:s}=u;if(u.token&143360?(e&1024||((u.token&36864)===36864&&(u.flags|=256),(u.token&537079808)===537079808&&(u.flags|=512)),a=mu(u,e,n,t|1,0,g,m,s)):(u.token===2162700?a=Y(u,e,n,1,o,1,i,0,g,m,s):u.token===69271571?a=_(u,e,n,1,o,1,i,0,g,m,s):u.token===14&&(a=b2(u,e,n,16,i,0,0,o,1,g,m,s)),c=1,u.destructible&48&&d(u,48)),u.token===1077936157){D(u,e|32768),c=1;let k=R(u,e,1,1,0,u.tokenPos,u.linePos,u.colPos);a=y(u,e,g,m,s,{type:"AssignmentPattern",left:a,right:k})}if(f++,l.push(a),!q(u,e,18)||u.token===16)break}return t&512&&f!==1&&d(u,35,"Setter","one",""),n&&n.scopeError!==void 0&&z2(n.scopeError),c&&(u.flags|=128),P(u,e,16),l}function g2(u,e,n){D(u,e|32768);let t=R(u,(e|134217728)^134217728,1,0,n,u.tokenPos,u.linePos,u.colPos);return P(u,e,20),t}function Y1(u,e,n,t,i,o,l,f){u.flags=(u.flags|128)^128;let{tokenPos:c,linePos:a,colPos:g}=u;D(u,e|32768|1073741824);let m=e&64?J(s2(),1024):void 0;if(e=(e|134217728)^134217728,q(u,e,16))return j2(u,e,m,[],n,0,o,l,f);let s=0;u.destructible&=-385;let k,C=[],b=0,E=0,{tokenPos:w,linePos:v,colPos:M}=u;for(u.assignable=1;u.token!==16;){let{token:S,tokenPos:V,linePos:A,colPos:Q}=u;if(S&143360)m&&t2(u,e,m,u.tokenValue,1,0),k=K(u,e,t,0,1,0,1,1,V,A,Q),u.token===16||u.token===18?u.assignable&2?(s|=16,E=1):((S&537079808)===537079808||(S&36864)===36864)&&(E=1):(u.token===1077936157?E=1:s|=16,k=N(u,e,k,1,0,V,A,Q),u.token!==16&&u.token!==18&&(k=O(u,e,1,0,V,A,Q,k)));else if((S&2097152)===2097152)k=S===2162700?Y(u,e|1073741824,m,0,1,0,t,i,V,A,Q):_(u,e|1073741824,m,0,1,0,t,i,V,A,Q),s|=u.destructible,E=1,u.assignable=2,u.token!==16&&u.token!==18&&(s&8&&d(u,119),k=N(u,e,k,0,0,V,A,Q),s|=16,u.token!==16&&u.token!==18&&(k=O(u,e,0,0,V,A,Q,k)));else if(S===14){k=b2(u,e,m,16,t,i,0,1,0,V,A,Q),u.destructible&16&&d(u,72),E=1,b&&(u.token===16||u.token===18)&&C.push(k),s|=8;break}else{if(s|=16,k=R(u,e,1,0,1,V,A,Q),b&&(u.token===16||u.token===18)&&C.push(k),u.token===18&&(b||(b=1,C=[k])),b){for(;q(u,e|32768,18);)C.push(R(u,e,1,0,1,u.tokenPos,u.linePos,u.colPos));u.assignable=2,k=y(u,e,w,v,M,{type:"SequenceExpression",expressions:C})}return P(u,e,16),u.destructible=s,k}if(b&&(u.token===16||u.token===18)&&C.push(k),!q(u,e|32768,18))break;if(b||(b=1,C=[k]),u.token===16){s|=8;break}}return b&&(u.assignable=2,k=y(u,e,w,v,M,{type:"SequenceExpression",expressions:C})),P(u,e,16),s&16&&s&8&&d(u,146),s|=u.destructible&256?256:0|u.destructible&128?128:0,u.token===10?(s&48&&d(u,47),e&4196352&&s&128&&d(u,29),e&2098176&&s&256&&d(u,30),E&&(u.flags|=128),j2(u,e,m,b?C:[k],n,0,o,l,f)):(s&8&&d(u,140),u.destructible=(u.destructible|256)^256|s,e&128?y(u,e,c,a,g,{type:"ParenthesizedExpression",expression:k}):k)}function su(u,e,n,t,i){let{tokenValue:o}=u,l=I(u,e,0);if(u.assignable=1,u.token===10){let f;return e&64&&(f=H2(u,e,o)),u.flags=(u.flags|128)^128,v2(u,e,f,[l],0,n,t,i)}return l}function $2(u,e,n,t,i,o,l,f,c,a){o||d(u,55),i&&d(u,49),u.flags&=-129;let g=e&64?H2(u,e,n):void 0;return v2(u,e,g,[t],l,f,c,a)}function j2(u,e,n,t,i,o,l,f,c){i||d(u,55);for(let a=0;a0&&u.tokenValue==="constructor"&&d(u,107),u.token===1074790415&&d(u,106),q(u,e,1074790417)){k>0&&d(u,117);continue}m.push(te(u,e,t,n,i,s,0,l,u.tokenPos,u.linePos,u.colPos))}return P(u,o&8?e|32768:e,1074790415),u.flags=u.flags&-33|g,y(u,e,f,c,a,{type:"ClassBody",body:m})}function te(u,e,n,t,i,o,l,f,c,a,g){let m=l?32:0,s=null,{token:k,tokenPos:C,linePos:b,colPos:E}=u;if(k&176128)switch(s=I(u,e,0),k){case 36972:if(!l&&u.token!==67174411&&(u.token&1048576)!==1048576&&u.token!==1077936157)return te(u,e,n,t,i,o,1,f,c,a,g);break;case 209007:if(u.token!==67174411&&!(u.flags&1)){if(e&1&&(u.token&1073741824)===1073741824)return V2(u,e,s,m,o,C,b,E);m|=16|(nu(u,e,8457014)?8:0)}break;case 12402:if(u.token!==67174411){if(e&1&&(u.token&1073741824)===1073741824)return V2(u,e,s,m,o,C,b,E);m|=256}break;case 12403:if(u.token!==67174411){if(e&1&&(u.token&1073741824)===1073741824)return V2(u,e,s,m,o,C,b,E);m|=512}break}else if(k===69271571)m|=2,s=g2(u,t,f);else if((k&134217728)===134217728)s=X(u,e);else if(k===8457014)m|=8,D(u,e);else if(e&1&&u.token===131)m|=4096,s=X2(u,e|16384,C,b,E);else if(e&1&&(u.token&1073741824)===1073741824)m|=128;else{if(l&&k===2162700)return B1(u,e,n,C,b,E);k===122?(s=I(u,e,0),u.token!==67174411&&d(u,28,U[u.token&255])):d(u,28,U[u.token&255])}if(m&792&&(u.token&143360?s=I(u,e,0):(u.token&134217728)===134217728?s=X(u,e):u.token===69271571?(m|=2,s=g2(u,e,0)):u.token===122?s=I(u,e,0):e&1&&u.token===131?(m|=4096,s=X2(u,e,C,b,E)):d(u,132)),m&2||(u.tokenValue==="constructor"?((u.token&1073741824)===1073741824?d(u,126):!(m&32)&&u.token===67174411&&(m&920?d(u,51,"accessor"):e&524288||(u.flags&32?d(u,52):u.flags|=32)),m|=64):!(m&4096)&&m&824&&u.tokenValue==="prototype"&&d(u,50)),e&1&&u.token!==67174411)return V2(u,e,s,m,o,C,b,E);let w=Z(u,e,m,f,u.tokenPos,u.linePos,u.colPos);return y(u,e,c,a,g,e&1?{type:"MethodDefinition",kind:!(m&32)&&m&64?"constructor":m&256?"get":m&512?"set":"method",static:(m&32)>0,computed:(m&2)>0,key:s,decorators:o,value:w}:{type:"MethodDefinition",kind:!(m&32)&&m&64?"constructor":m&256?"get":m&512?"set":"method",static:(m&32)>0,computed:(m&2)>0,key:s,value:w})}function X2(u,e,n,t,i){D(u,e);let{tokenValue:o}=u;return o==="constructor"&&d(u,125),D(u,e),y(u,e,n,t,i,{type:"PrivateIdentifier",name:o})}function V2(u,e,n,t,i,o,l,f){let c=null;if(t&8&&d(u,0),u.token===1077936157){D(u,e|32768);let{tokenPos:a,linePos:g,colPos:m}=u;u.token===537079928&&d(u,116),c=K(u,e|16384,2,0,1,0,0,1,a,g,m),((u.token&1073741824)!==1073741824||(u.token&4194304)===4194304)&&(c=N(u,e|16384,c,0,0,a,g,m),c=O(u,e|16384,0,0,a,g,m,c),u.token===18&&(c=e2(u,e,0,o,l,f,c)))}return y(u,e,o,l,f,{type:"PropertyDefinition",key:n,value:c,static:(t&32)>0,computed:(t&2)>0,decorators:i})}function oe(u,e,n,t,i,o,l,f){if(u.token&143360)return mu(u,e,n,t,i,o,l,f);(u.token&2097152)!==2097152&&d(u,28,U[u.token&255]);let c=u.token===69271571?_(u,e,n,1,0,1,t,i,o,l,f):Y(u,e,n,1,0,1,t,i,o,l,f);return u.destructible&16&&d(u,48),u.destructible&32&&d(u,48),c}function mu(u,e,n,t,i,o,l,f){let{tokenValue:c,token:a}=u;return e&1024&&((a&537079808)===537079808?d(u,116):(a&36864)===36864&&d(u,115)),(a&20480)===20480&&d(u,100),e&2099200&&a===241773&&d(u,30),a===241739&&t&24&&d(u,98),e&4196352&&a===209008&&d(u,96),D(u,e),n&&u2(u,e,n,c,t,i),y(u,e,o,l,f,{type:"Identifier",name:c})}function gu(u,e,n,t,i,o){if(D(u,e),u.token===8456259)return y(u,e,t,i,o,{type:"JSXFragment",openingFragment:p1(u,e,t,i,o),children:qu(u,e),closingFragment:e0(u,e,n,u.tokenPos,u.linePos,u.colPos)});let l=null,f=[],c=t0(u,e,n,t,i,o);if(!c.selfClosing){f=qu(u,e),l=u0(u,e,n,u.tokenPos,u.linePos,u.colPos);let a=J2(l.name);J2(c.name)!==a&&d(u,150,a)}return y(u,e,t,i,o,{type:"JSXElement",children:f,openingElement:c,closingElement:l})}function p1(u,e,n,t,i){return d2(u,e),y(u,e,n,t,i,{type:"JSXOpeningFragment"})}function u0(u,e,n,t,i,o){P(u,e,25);let l=le(u,e,u.tokenPos,u.linePos,u.colPos);return n?P(u,e,8456259):u.token=d2(u,e),y(u,e,t,i,o,{type:"JSXClosingElement",name:l})}function e0(u,e,n,t,i,o){return P(u,e,25),P(u,e,8456259),y(u,e,t,i,o,{type:"JSXClosingFragment"})}function qu(u,e){let n=[];for(;u.token!==25;)u.index=u.tokenPos=u.startPos,u.column=u.colPos=u.startColumn,u.line=u.linePos=u.startLine,d2(u,e),n.push(n0(u,e,u.tokenPos,u.linePos,u.colPos));return n}function n0(u,e,n,t,i){if(u.token===138)return i0(u,e,n,t,i);if(u.token===2162700)return ce(u,e,0,0,n,t,i);if(u.token===8456258)return gu(u,e,0,n,t,i);d(u,0)}function i0(u,e,n,t,i){d2(u,e);let o={type:"JSXText",value:u.tokenValue};return e&512&&(o.raw=u.tokenRaw),y(u,e,n,t,i,o)}function t0(u,e,n,t,i,o){(u.token&143360)!==143360&&(u.token&4096)!==4096&&d(u,0);let l=le(u,e,u.tokenPos,u.linePos,u.colPos),f=l0(u,e),c=u.token===8457016;return u.token===8456259?d2(u,e):(P(u,e,8457016),n?P(u,e,8456259):d2(u,e)),y(u,e,t,i,o,{type:"JSXOpeningElement",name:l,attributes:f,selfClosing:c})}function le(u,e,n,t,i){Z2(u);let o=_2(u,e,n,t,i);if(u.token===21)return fe(u,e,o,n,t,i);for(;q(u,e,67108877);)Z2(u),o=o0(u,e,o,n,t,i);return o}function o0(u,e,n,t,i,o){let l=_2(u,e,u.tokenPos,u.linePos,u.colPos);return y(u,e,t,i,o,{type:"JSXMemberExpression",object:n,property:l})}function l0(u,e){let n=[];for(;u.token!==8457016&&u.token!==8456259&&u.token!==1048576;)n.push(c0(u,e,u.tokenPos,u.linePos,u.colPos));return n}function f0(u,e,n,t,i){D(u,e),P(u,e,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return P(u,e,1074790415),y(u,e,n,t,i,{type:"JSXSpreadAttribute",argument:o})}function c0(u,e,n,t,i){if(u.token===2162700)return f0(u,e,n,t,i);Z2(u);let o=null,l=_2(u,e,n,t,i);if(u.token===21&&(l=fe(u,e,l,n,t,i)),u.token===1077936157){let f=u1(u,e),{tokenPos:c,linePos:a,colPos:g}=u;switch(f){case 134283267:o=X(u,e);break;case 8456258:o=gu(u,e,1,c,a,g);break;case 2162700:o=ce(u,e,1,1,c,a,g);break;default:d(u,149)}}return y(u,e,n,t,i,{type:"JSXAttribute",value:o,name:l})}function fe(u,e,n,t,i,o){P(u,e,21);let l=_2(u,e,u.tokenPos,u.linePos,u.colPos);return y(u,e,t,i,o,{type:"JSXNamespacedName",namespace:n,name:l})}function ce(u,e,n,t,i,o,l){D(u,e|32768);let{tokenPos:f,linePos:c,colPos:a}=u;if(u.token===14)return d0(u,e,i,o,l);let g=null;return u.token===1074790415?(t&&d(u,152),g=s0(u,e,u.startPos,u.startLine,u.startColumn)):g=R(u,e,1,0,0,f,c,a),n?P(u,e,1074790415):d2(u,e),y(u,e,i,o,l,{type:"JSXExpressionContainer",expression:g})}function d0(u,e,n,t,i){P(u,e,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return P(u,e,1074790415),y(u,e,n,t,i,{type:"JSXSpreadChild",expression:o})}function s0(u,e,n,t,i){return u.startPos=u.tokenPos,u.startLine=u.linePos,u.startColumn=u.colPos,y(u,e,n,t,i,{type:"JSXEmptyExpression"})}function _2(u,e,n,t,i){let{tokenValue:o}=u;return D(u,e),y(u,e,n,t,i,{type:"JSXIdentifier",name:o})}function de(u,e){return c1(u,e,0)}function a0(u,e){let n=new SyntaxError(u+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var se=a0;function m0(u){let e=[];for(let n of u)try{return n()}catch(t){e.push(t)}throw Object.assign(new Error("All combinations failed"),{errors:e})}var ae=m0;var g0=(u,e,n)=>{if(!(u&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},yu=g0;function y0(u){return Array.isArray(u)&&u.length>0}var me=y0;function $(u){var t,i,o;let e=((t=u.range)==null?void 0:t[0])??u.start,n=(o=((i=u.declaration)==null?void 0:i.decorators)??u.decorators)==null?void 0:o[0];return n?Math.min($(n),e):e}function p(u){var e;return((e=u.range)==null?void 0:e[1])??u.end}function k0(u){let e=new Set(u);return n=>e.has(n==null?void 0:n.type)}var ge=k0;var h0=ge(["Block","CommentBlock","MultiLine"]),T2=h0;function A0(u){let e=`*${u.value}*`.split(` +`);return e.length>1&&e.every(n=>n.trimStart()[0]==="*")}var ku=A0;function D0(u){return T2(u)&&u.value[0]==="*"&&/@(?:type|satisfies)\b/.test(u.value)}var ye=D0;var F2=null;function q2(u){if(F2!==null&&typeof F2.property){let e=F2;return F2=q2.prototype=null,e}return F2=q2.prototype=u??Object.create(null),new q2}var b0=10;for(let u=0;u<=b0;u++)q2();function hu(u){return q2(u)}function C0(u,e="type"){hu(u);function n(t){let i=t[e],o=u[i];if(!Array.isArray(o))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:t});return o}return n}var ke=C0;var he={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var P0=ke(he),Ae=P0;function Au(u,e){if(!(u!==null&&typeof u=="object"))return u;if(Array.isArray(u)){for(let t=0;t{var l;(l=o.leadingComments)!=null&&l.some(ye)&&i.add($(o))}),u=Y2(u,o=>{if(o.type==="ParenthesizedExpression"){let{expression:l}=o;if(l.type==="TypeCastExpression")return l.range=[...o.range],l;let f=$(o);if(!i.has(f))return l.extra={...l.extra,parenthesized:!0},l}})}if(u=Y2(u,i=>{var o;switch(i.type){case"LogicalExpression":if(De(i))return Du(i);break;case"VariableDeclaration":{let l=yu(!1,i.declarations,-1);l!=null&&l.init&&t[p(l)]!==";"&&(i.range=[$(i),p(l)]);break}case"TSParenthesizedType":return i.typeAnnotation;case"TSTypeParameter":if(typeof i.name=="string"){let l=$(i);i.name={type:"Identifier",name:i.name,range:[l,l+i.name.length]}}break;case"TopicReference":u.extra={...u.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(n==="meriyah"&&((o=i.exported)==null?void 0:o.type)==="Identifier"){let{exported:l}=i,f=t.slice($(l),p(l));(f.startsWith('"')||f.startsWith("'"))&&(i.exported={...i.exported,type:"Literal",value:i.exported.name,raw:f})}break;case"TSUnionType":case"TSIntersectionType":if(i.types.length===1)return i.types[0];break}}),me(u.comments)){let i=yu(!1,u.comments,-1);for(let o=u.comments.length-2;o>=0;o--){let l=u.comments[o];p(l)===$(i)&&T2(l)&&T2(i)&&ku(l)&&ku(i)&&(u.comments.splice(o+1,1),l.value+="*//*"+i.value,l.range=[$(l),p(i)]),i=l}}return u.type==="Program"&&(u.range=[0,t.length]),u}function De(u){return u.type==="LogicalExpression"&&u.right.type==="LogicalExpression"&&u.operator===u.right.operator}function Du(u){return De(u)?Du({type:"LogicalExpression",operator:u.operator,left:Du({type:"LogicalExpression",operator:u.operator,left:u.left,right:u.right.left,range:[$(u.left),p(u.right.left)]}),right:u.right.right,range:[$(u),p(u)]}):u}var be=E0;var C2=Me(ve(),1);function N0(u){if(!u.startsWith("#!"))return"";let e=u.indexOf(` +`);return e===-1?u:u.slice(0,e)}var Te=N0;function V0(u){let e=Te(u);e&&(u=u.slice(e.length+1));let n=(0,C2.extract)(u),{pragmas:t,comments:i}=(0,C2.parseWithComments)(n);return{shebang:e,text:u,pragmas:t,comments:i}}function Fe(u){let{pragmas:e}=V0(u);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function R0(u){return u=typeof u=="function"?{parse:u}:u,{astFormat:"estree",hasPragma:Fe,locStart:$,locEnd:p,...u}}var qe=R0;function O0(u){let{filepath:e}=u;if(e){if(e=e.toLowerCase(),e.endsWith(".cjs"))return"script";if(e.endsWith(".mjs"))return"module"}}var Le=O0;var U0={next:!0,ranges:!0,webcompat:!0,loc:!0,raw:!0,directives:!0,globalReturn:!0,impliedStrict:!1,preserveParens:!1,lexical:!1,identifierPattern:!1,jsx:!0,specDeviation:!0,uniqueKeyInPattern:!1};function M0(u,e){let n=[],t=[],i=de(u,{...U0,module:e==="module",onComment:n,onToken:t});return i.comments=n,i.tokens=t,i}function J0(u){var o;let{message:e,line:n,column:t}=u,i=(o=e.match(/^\[(?\d+):(?\d+)]: (?.*)$/))==null?void 0:o.groups;return i&&(e=i.message,typeof n!="number"&&(n=Number(i.line),t=Number(i.column))),typeof n!="number"?u:se(e,{loc:{start:{line:n,column:t}},cause:u})}function j0(u,e={}){let n=Le(e),t=(n?[n]:["module","script"]).map(o=>()=>M0(u,o)),i;try{i=ae(t)}catch({errors:[o]}){throw J0(o)}return be(i,{parser:"meriyah",text:u})}var X0=qe(j0);return Je(z0);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/meriyah.mjs b/node_modules/prettier/plugins/meriyah.mjs index 36af3fb..01c4c81 100644 --- a/node_modules/prettier/plugins/meriyah.mjs +++ b/node_modules/prettier/plugins/meriyah.mjs @@ -1,5 +1,5 @@ -var Ie=Object.create;var Q2=Object.defineProperty;var Ne=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty;var Ue=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),Eu=(u,e)=>{for(var n in e)Q2(u,n,{get:e[n],enumerable:!0})},Me=(u,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of Ve(e))!Oe.call(u,t)&&t!==n&&Q2(u,t,{get:()=>e[t],enumerable:!(i=Ne(e,t))||i.enumerable});return u};var Je=(u,e,n)=>(n=u!=null?Ie(Re(u)):{},Me(e||!u||!u.__esModule?Q2(n,"default",{value:u,enumerable:!0}):n,u));var be=Ue(a2=>{"use strict";Object.defineProperty(a2,"__esModule",{value:!0});a2.extract=D0;a2.parse=C0;a2.parseWithComments=De;a2.print=P0;a2.strip=b0;var g0=/\*\/$/,y0=/^\/\*\*?/,he=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,k0=/(^|\s+)\/\/([^\r\n]*)/g,ge=/^(\r?\n)+/,h0=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,ye=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,A0=/(\r?\n|^) *\* ?/g,Ae=[];function D0(u){let e=u.match(he);return e?e[0].trimLeft():""}function b0(u){let e=u.match(he);return e&&e[0]?u.substring(e[0].length):u}function C0(u){return De(u).pragmas}function De(u){let e=` -`;u=u.replace(y0,"").replace(g0,"").replace(A0,"$1");let n="";for(;n!==u;)n=u,u=u.replace(h0,`${e}$1 $2${e}`);u=u.replace(ge,"").trimRight();let i=Object.create(null),t=u.replace(ye,"").replace(ge,"").trimRight(),o;for(;o=ye.exec(u);){let l=o[2].replace(k0,"");typeof i[o[1]]=="string"||Array.isArray(i[o[1]])?i[o[1]]=Ae.concat(i[o[1]],l):i[o[1]]=l}return{comments:t,pragmas:i}}function P0({comments:u="",pragmas:e={}}){let n=` -`,i="/**",t=" *",o=" */",l=Object.keys(e),f=l.flatMap(a=>ke(a,e[a])).map(a=>`${t} ${a}${n}`).join("");if(!u){if(l.length===0)return"";if(l.length===1&&!Array.isArray(e[l[0]])){let a=e[l[0]];return`${i} ${ke(l[0],a)[0]}${o}`}}let c=u.split(n).map(a=>`${t} ${a}`).join(n)+n;return i+n+(u?c:"")+(u&&l.length?t+n:"")+f+o}function ke(u,e){return Ae.concat(e).map(n=>`@${u} ${n}`.trim())}});var Pu={};Eu(Pu,{parsers:()=>Cu});var Cu={};Eu(Cu,{meriyah:()=>X0});var je={0:"Unexpected token",28:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"Unexpected token `#`",4:"Illegal Unicode escape sequence",5:"Invalid code point %0",6:"Invalid hexadecimal escape sequence",8:"Octal literals are not allowed in strict mode",7:"Decimal integer literals with a leading zero are forbidden in strict mode",9:"Expected number in radix %0",146:"Invalid left-hand side assignment to a destructible right-hand side",10:"Non-number found after exponent indicator",11:"Invalid BigIntLiteral",12:"No identifiers allowed directly after numeric literal",13:"Escapes \\8 or \\9 are not syntactically valid escapes",14:"Unterminated string literal",15:"Unterminated template literal",16:"Multiline comment was not closed properly",17:"The identifier contained dynamic unicode escape that was not closed",18:"Illegal character '%0'",19:"Missing hexadecimal digits",20:"Invalid implicit octal",21:"Invalid line break in string literal",22:"Only unicode escapes are legal in identifier names",23:"Expected '%0'",24:"Invalid left-hand side in assignment",25:"Invalid left-hand side in async arrow",26:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',27:"Member access on super must be in a method",29:"Await expression not allowed in formal parameter",30:"Yield expression not allowed in formal parameter",93:"Unexpected token: 'escaped keyword'",31:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",120:"Async functions can only be declared at the top level or inside a block",32:"Unterminated regular expression",33:"Unexpected regular expression flag",34:"Duplicate regular expression flag '%0'",35:"%0 functions must have exactly %1 argument%2",36:"Setter function argument must not be a rest parameter",37:"%0 declaration must have a name in this context",38:"Function name may not contain any reserved words or be eval or arguments in strict mode",39:"The rest operator is missing an argument",40:"A getter cannot be a generator",41:"A setter cannot be a generator",42:"A computed property name must be followed by a colon or paren",131:"Object literal keys that are strings or numbers must be a method or have a colon",44:"Found `* async x(){}` but this should be `async * x(){}`",43:"Getters and setters can not be generators",45:"'%0' can not be generator method",46:"No line break is allowed after '=>'",47:"The left-hand side of the arrow can only be destructed through assignment",48:"The binding declaration is not destructible",49:"Async arrow can not be followed by new expression",50:"Classes may not have a static property named 'prototype'",51:"Class constructor may not be a %0",52:"Duplicate constructor method in class",53:"Invalid increment/decrement operand",54:"Invalid use of `new` keyword on an increment/decrement expression",55:"`=>` is an invalid assignment target",56:"Rest element may not have a trailing comma",57:"Missing initializer in %0 declaration",58:"'for-%0' loop head declarations can not have an initializer",59:"Invalid left-hand side in for-%0 loop: Must have a single binding",60:"Invalid shorthand property initializer",61:"Property name __proto__ appears more than once in object literal",62:"Let is disallowed as a lexically bound name",63:"Invalid use of '%0' inside new expression",64:"Illegal 'use strict' directive in function with non-simple parameter list",65:'Identifier "let" disallowed as left-hand side expression in strict mode',66:"Illegal continue statement",67:"Illegal break statement",68:"Cannot have `let[...]` as a var name in strict mode",69:"Invalid destructuring assignment target",70:"Rest parameter may not have a default initializer",71:"The rest argument must the be last parameter",72:"Invalid rest argument",74:"In strict mode code, functions can only be declared at top level or inside a block",75:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",76:"Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",77:"Class declaration can't appear in single-statement context",78:"Invalid left-hand side in for-%0",79:"Invalid assignment in for-%0",80:"for await (... of ...) is only valid in async functions and async generators",81:"The first token after the template expression should be a continuation of the template",83:"`let` declaration not allowed here and `let` cannot be a regular var name in strict mode",82:"`let \n [` is a restricted production at the start of a statement",84:"Catch clause requires exactly one parameter, not more (and no trailing comma)",85:"Catch clause parameter does not support default values",86:"Missing catch or finally after try",87:"More than one default clause in switch statement",88:"Illegal newline after throw",89:"Strict mode code may not include a with statement",90:"Illegal return statement",91:"The left hand side of the for-header binding declaration is not destructible",92:"new.target only allowed within functions",94:"'#' not followed by identifier",100:"Invalid keyword",99:"Can not use 'let' as a class name",98:"'A lexical declaration can't define a 'let' binding",97:"Can not use `let` as variable name in strict mode",95:"'%0' may not be used as an identifier in this context",96:"Await is only valid in async functions",101:"The %0 keyword can only be used with the module goal",102:"Unicode codepoint must not be greater than 0x10FFFF",103:"%0 source must be string",104:"Only a identifier can be used to indicate alias",105:"Only '*' or '{...}' can be imported after default",106:"Trailing decorator may be followed by method",107:"Decorators can't be used with a constructor",109:"HTML comments are only allowed with web compatibility (Annex B)",110:"The identifier 'let' must not be in expression position in strict mode",111:"Cannot assign to `eval` and `arguments` in strict mode",112:"The left-hand side of a for-of loop may not start with 'let'",113:"Block body arrows can not be immediately invoked without a group",114:"Block body arrows can not be immediately accessed without a group",115:"Unexpected strict mode reserved word",116:"Unexpected eval or arguments in strict mode",117:"Decorators must not be followed by a semicolon",118:"Calling delete on expression not allowed in strict mode",119:"Pattern can not have a tail",121:"Can not have a `yield` expression on the left side of a ternary",122:"An arrow function can not have a postfix update operator",123:"Invalid object literal key character after generator star",124:"Private fields can not be deleted",126:"Classes may not have a field called constructor",125:"Classes may not have a private element named constructor",127:"A class field initializer may not contain arguments",128:"Generators can only be declared at the top level or inside a block",129:"Async methods are a restricted production and cannot have a newline following it",130:"Unexpected character after object literal property name",132:"Invalid key token",133:"Label '%0' has already been declared",134:"continue statement must be nested within an iteration statement",135:"Undefined label '%0'",136:"Trailing comma is disallowed inside import(...) arguments",137:"import() requires exactly one argument",138:"Cannot use new with import(...)",139:"... is not allowed in import()",140:"Expected '=>'",141:"Duplicate binding '%0'",142:"Cannot export a duplicate name '%0'",145:"Duplicate %0 for-binding",143:"Exported binding '%0' needs to refer to a top-level declared variable",144:"Unexpected private field",148:"Numeric separators are not allowed at the end of numeric literals",147:"Only one underscore is allowed as numeric separator",149:"JSX value should be either an expression or a quoted JSX text",150:"Expected corresponding JSX closing tag for %0",151:"Adjacent JSX elements must be wrapped in an enclosing tag",152:"JSX attributes must only be assigned a non-empty 'expression'",153:"'%0' has already been declared",154:"'%0' shadowed a catch clause binding",155:"Dot property must be an identifier",156:"Encountered invalid input after spread/rest argument",157:"Catch without try",158:"Finally without try",159:"Expected corresponding closing tag for JSX fragment",160:"Coalescing and logical operators used together in the same expression must be disambiguated with parentheses",161:"Invalid tagged template on optional chain",162:"Invalid optional chain from super property",163:"Invalid optional chain from new expression",164:'Cannot use "import.meta" outside a module',165:"Leading decorators must be attached to a class declaration"},k2=class extends SyntaxError{constructor(e,n,i,t,...o){let l="["+n+":"+i+"]: "+je[t].replace(/%(\d+)/g,(f,c)=>o[c]);super(`${l}`),this.index=e,this.line=n,this.column=i,this.description=l,this.loc={line:n,column:i}}};function d(u,e,...n){throw new k2(u.index,u.line,u.column,e,...n)}function X2(u){throw new k2(u.index,u.line,u.column,u.type,u.params)}function h2(u,e,n,i,...t){throw new k2(u,e,n,i,...t)}function A2(u,e,n,i){throw new k2(u,e,n,i)}var E2=((u,e)=>{let n=new Uint32Array(104448),i=0,t=0;for(;i<3540;){let o=u[i++];if(o<0)t-=o;else{let l=u[i++];o&2&&(l=e[l]),o&1?n.fill(l,t,t+=u[i++]):n[t++]=l}}return n})([-1,2,24,2,25,2,5,-1,0,77595648,3,44,2,3,0,14,2,57,2,58,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,59,3,0,4,0,4294966523,3,0,4,2,16,2,60,2,0,0,4294836735,0,3221225471,0,4294901942,2,61,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,17,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,131,2,6,2,56,-1,2,37,0,4294443263,2,1,3,0,3,0,4294901711,2,39,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,2,194,2,3,0,3825204735,0,123747807,0,65487,0,4294828015,0,4092591615,0,1080049119,0,458703,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,66,0,4284449919,0,851904,2,4,2,11,0,67076095,-1,2,67,0,1073741743,0,4093591391,-1,0,50331649,0,3265266687,2,32,0,4294844415,0,4278190047,2,18,2,129,-1,3,0,2,2,21,2,0,2,9,2,0,2,14,2,15,3,0,10,2,69,2,0,2,70,2,71,2,72,2,0,2,73,2,0,2,10,0,261632,2,23,3,0,2,2,12,2,4,3,0,18,2,74,2,5,3,0,2,2,75,0,2088959,2,27,2,8,0,909311,3,0,2,0,814743551,2,41,0,67057664,3,0,2,2,40,2,0,2,28,2,0,2,29,2,7,0,268374015,2,26,2,49,2,0,2,76,0,134153215,-1,2,6,2,0,2,7,0,2684354559,0,67044351,0,3221160064,0,1,-1,3,0,2,2,42,0,1046528,3,0,3,2,8,2,0,2,51,0,4294960127,2,9,2,38,2,10,0,4294377472,2,11,3,0,7,0,4227858431,3,0,8,2,12,2,0,2,78,2,9,2,0,2,79,2,80,2,81,-1,2,124,0,1048577,2,82,2,13,-1,2,13,0,131042,2,83,2,84,2,85,2,0,2,33,-83,2,0,2,53,2,7,3,0,4,0,1046559,2,0,2,14,2,0,0,2147516671,2,20,3,86,2,2,0,-16,2,87,0,524222462,2,4,2,0,0,4269801471,2,4,2,0,2,15,2,77,2,16,3,0,2,2,47,2,0,-1,2,17,-16,3,0,206,-2,3,0,655,2,18,3,0,36,2,68,-1,2,17,2,9,3,0,8,2,89,2,121,2,0,0,3220242431,3,0,3,2,19,2,90,2,91,3,0,2,2,92,2,0,2,93,2,94,2,0,0,4351,2,0,2,8,3,0,2,0,67043391,0,3909091327,2,0,2,22,2,8,2,18,3,0,2,0,67076097,2,7,2,0,2,20,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,97,2,98,2,15,2,21,3,0,3,0,67057663,3,0,349,2,99,2,100,2,6,-264,3,0,11,2,22,3,0,2,2,31,-1,0,3774349439,2,101,2,102,3,0,2,2,19,2,103,3,0,10,2,9,2,17,2,0,2,45,2,0,2,30,2,104,2,23,0,1638399,2,172,2,105,3,0,3,2,18,2,24,2,25,2,5,2,26,2,0,2,7,2,106,-1,2,107,2,108,2,109,-1,3,0,3,2,11,-2,2,0,2,27,-3,2,150,-4,2,18,2,0,2,35,0,1,2,0,2,62,2,28,2,11,2,9,2,0,2,110,-1,3,0,4,2,9,2,21,2,111,2,6,2,0,2,112,2,0,2,48,-4,3,0,9,2,20,2,29,2,30,-4,2,113,2,114,2,29,2,20,2,7,-2,2,115,2,29,2,31,-2,2,0,2,116,-2,0,4277137519,0,2269118463,-1,3,18,2,-1,2,32,2,36,2,0,3,29,2,2,34,2,19,-3,3,0,2,2,33,-1,2,0,2,34,2,0,2,34,2,0,2,46,-10,2,0,0,203775,-2,2,18,2,43,2,35,-2,2,17,2,117,2,20,3,0,2,2,36,0,2147549120,2,0,2,11,2,17,2,135,2,0,2,37,2,52,0,5242879,3,0,2,0,402644511,-1,2,120,0,1090519039,-2,2,122,2,38,2,0,0,67045375,2,39,0,4226678271,0,3766565279,0,2039759,-4,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,40,2,41,-1,2,10,2,42,-6,2,0,2,11,-3,3,0,2,0,2147484671,2,125,0,4190109695,2,50,-2,2,126,0,4244635647,0,27,2,0,2,7,2,43,2,0,2,63,-1,2,0,2,40,-8,2,54,2,44,0,67043329,2,127,2,45,0,8388351,-2,2,128,0,3028287487,2,46,2,130,0,33259519,2,41,-9,2,20,-5,2,64,-2,3,0,28,2,31,-3,3,0,3,2,47,3,0,6,2,48,-85,3,0,33,2,47,-126,3,0,18,2,36,-269,3,0,17,2,40,2,7,2,41,-2,2,17,2,49,2,0,2,20,2,50,2,132,2,23,-21,3,0,2,-4,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,196635,3,0,191,2,51,3,0,38,2,29,-1,2,33,-279,3,0,8,2,7,-1,2,133,2,52,3,0,11,2,6,-72,3,0,3,2,134,0,1677656575,-166,0,4161266656,0,4071,0,15360,-4,0,28,-13,3,0,2,2,37,2,0,2,136,2,137,2,55,2,0,2,138,2,139,2,140,3,0,10,2,141,2,142,2,15,3,37,2,3,53,2,3,54,2,0,4294954999,2,0,-16,2,0,2,88,2,0,0,2105343,0,4160749584,0,65534,-42,0,4194303871,0,2011,-6,2,0,0,1073684479,0,17407,-11,2,0,2,31,-40,3,0,6,0,8323103,-1,3,0,2,2,42,-37,2,55,2,144,2,145,2,146,2,147,2,148,-105,2,24,-32,3,0,1334,2,9,-1,3,0,129,2,27,3,0,6,2,9,3,0,180,2,149,3,0,233,0,1,-96,3,0,16,2,9,-47,3,0,154,2,56,-22381,3,0,7,2,23,-6130,3,5,2,-1,0,69207040,3,44,2,3,0,14,2,57,2,58,-3,0,3168731136,0,4294956864,2,1,2,0,2,59,3,0,4,0,4294966275,3,0,4,2,16,2,60,2,0,2,33,-1,2,17,2,61,-1,2,0,2,56,0,4294885376,3,0,2,0,3145727,0,2617294944,0,4294770688,2,23,2,62,3,0,2,0,131135,2,95,0,70256639,0,71303167,0,272,2,40,2,56,-1,2,37,2,30,-1,2,96,2,63,0,4278255616,0,4294836227,0,4294549473,0,600178175,0,2952806400,0,268632067,0,4294543328,0,57540095,0,1577058304,0,1835008,0,4294688736,2,65,2,64,0,33554435,2,123,2,65,2,151,0,131075,0,3594373096,0,67094296,2,64,-1,0,4294828e3,0,603979263,2,160,0,3,0,4294828001,0,602930687,2,183,0,393219,0,4294828016,0,671088639,0,2154840064,0,4227858435,0,4236247008,2,66,2,36,-1,2,4,0,917503,2,36,-1,2,67,0,537788335,0,4026531935,-1,0,1,-1,2,32,2,68,0,7936,-3,2,0,0,2147485695,0,1010761728,0,4292984930,0,16387,2,0,2,14,2,15,3,0,10,2,69,2,0,2,70,2,71,2,72,2,0,2,73,2,0,2,11,-1,2,23,3,0,2,2,12,2,4,3,0,18,2,74,2,5,3,0,2,2,75,0,253951,3,19,2,0,122879,2,0,2,8,0,276824064,-2,3,0,2,2,40,2,0,0,4294903295,2,0,2,29,2,7,-1,2,17,2,49,2,0,2,76,2,41,-1,2,20,2,0,2,27,-2,0,128,-2,2,77,2,8,0,4064,-1,2,119,0,4227907585,2,0,2,118,2,0,2,48,2,173,2,9,2,38,2,10,-1,0,74440192,3,0,6,-2,3,0,8,2,12,2,0,2,78,2,9,2,0,2,79,2,80,2,81,-3,2,82,2,13,-3,2,83,2,84,2,85,2,0,2,33,-83,2,0,2,53,2,7,3,0,4,0,817183,2,0,2,14,2,0,0,33023,2,20,3,86,2,-17,2,87,0,524157950,2,4,2,0,2,88,2,4,2,0,2,15,2,77,2,16,3,0,2,2,47,2,0,-1,2,17,-16,3,0,206,-2,3,0,655,2,18,3,0,36,2,68,-1,2,17,2,9,3,0,8,2,89,0,3072,2,0,0,2147516415,2,9,3,0,2,2,23,2,90,2,91,3,0,2,2,92,2,0,2,93,2,94,0,4294965179,0,7,2,0,2,8,2,91,2,8,-1,0,1761345536,2,95,0,4294901823,2,36,2,18,2,96,2,34,2,166,0,2080440287,2,0,2,33,2,143,0,3296722943,2,0,0,1046675455,0,939524101,0,1837055,2,97,2,98,2,15,2,21,3,0,3,0,7,3,0,349,2,99,2,100,2,6,-264,3,0,11,2,22,3,0,2,2,31,-1,0,2700607615,2,101,2,102,3,0,2,2,19,2,103,3,0,10,2,9,2,17,2,0,2,45,2,0,2,30,2,104,-3,2,105,3,0,3,2,18,-1,3,5,2,2,26,2,0,2,7,2,106,-1,2,107,2,108,2,109,-1,3,0,3,2,11,-2,2,0,2,27,-8,2,18,2,0,2,35,-1,2,0,2,62,2,28,2,29,2,9,2,0,2,110,-1,3,0,4,2,9,2,17,2,111,2,6,2,0,2,112,2,0,2,48,-4,3,0,9,2,20,2,29,2,30,-4,2,113,2,114,2,29,2,20,2,7,-2,2,115,2,29,2,31,-2,2,0,2,116,-2,0,4277075969,2,29,-1,3,18,2,-1,2,32,2,117,2,0,3,29,2,2,34,2,19,-3,3,0,2,2,33,-1,2,0,2,34,2,0,2,34,2,0,2,48,-10,2,0,0,197631,-2,2,18,2,43,2,118,-2,2,17,2,117,2,20,2,119,2,51,-2,2,119,2,23,2,17,2,33,2,119,2,36,0,4294901904,0,4718591,2,119,2,34,0,335544350,-1,2,120,2,121,-2,2,122,2,38,2,7,-1,2,123,2,65,0,3758161920,0,3,-4,2,0,2,27,0,2147485568,0,3,2,0,2,23,0,176,-5,2,0,2,47,2,186,-1,2,0,2,23,2,197,-1,2,0,0,16779263,-2,2,11,-7,2,0,2,121,-3,3,0,2,2,124,2,125,0,2147549183,0,2,-2,2,126,2,35,0,10,0,4294965249,0,67633151,0,4026597376,2,0,0,536871935,-1,2,0,2,40,-8,2,54,2,47,0,1,2,127,2,23,-3,2,128,2,35,2,129,2,130,0,16778239,-10,2,34,-5,2,64,-2,3,0,28,2,31,-3,3,0,3,2,47,3,0,6,2,48,-85,3,0,33,2,47,-126,3,0,18,2,36,-269,3,0,17,2,40,2,7,-3,2,17,2,131,2,0,2,23,2,48,2,132,2,23,-21,3,0,2,-4,3,0,2,0,67583,-1,2,103,-2,0,11,3,0,191,2,51,3,0,38,2,29,-1,2,33,-279,3,0,8,2,7,-1,2,133,2,52,3,0,11,2,6,-72,3,0,3,2,134,2,135,-187,3,0,2,2,37,2,0,2,136,2,137,2,55,2,0,2,138,2,139,2,140,3,0,10,2,141,2,142,2,15,3,37,2,3,53,2,3,54,2,2,143,-73,2,0,0,1065361407,0,16384,-11,2,0,2,121,-40,3,0,6,2,117,-1,3,0,2,0,2063,-37,2,55,2,144,2,145,2,146,2,147,2,148,-138,3,0,1334,2,9,-1,3,0,129,2,27,3,0,6,2,9,3,0,180,2,149,3,0,233,0,1,-96,3,0,16,2,9,-47,3,0,154,2,56,-28517,2,0,0,1,-1,2,124,2,0,0,8193,-21,2,193,0,10255,0,4,-11,2,64,2,171,-1,0,71680,-1,2,161,0,4292900864,0,805306431,-5,2,150,-1,2,157,-1,0,6144,-2,2,127,-1,2,154,-1,0,2147532800,2,151,2,165,2,0,2,164,0,524032,0,4,-4,2,190,0,205128192,0,1333757536,0,2147483696,0,423953,0,747766272,0,2717763192,0,4286578751,0,278545,2,152,0,4294886464,0,33292336,0,417809,2,152,0,1327482464,0,4278190128,0,700594195,0,1006647527,0,4286497336,0,4160749631,2,153,0,469762560,0,4171219488,0,8323120,2,153,0,202375680,0,3214918176,0,4294508592,2,153,-1,0,983584,0,48,0,58720273,0,3489923072,0,10517376,0,4293066815,0,1,0,2013265920,2,177,2,0,0,2089,0,3221225552,0,201375904,2,0,-2,0,256,0,122880,0,16777216,2,150,0,4160757760,2,0,-6,2,167,-11,0,3263218176,-1,0,49664,0,2160197632,0,8388802,-1,0,12713984,-1,2,154,2,159,2,178,-2,2,162,-20,0,3758096385,-2,2,155,0,4292878336,2,90,2,169,0,4294057984,-2,2,163,2,156,2,175,-2,2,155,-1,2,182,-1,2,170,2,124,0,4026593280,0,14,0,4292919296,-1,2,158,0,939588608,-1,0,805306368,-1,2,124,0,1610612736,2,156,2,157,2,4,2,0,-2,2,158,2,159,-3,0,267386880,-1,2,160,0,7168,-1,0,65024,2,154,2,161,2,179,-7,2,168,-8,2,162,-1,0,1426112704,2,163,-1,2,164,0,271581216,0,2149777408,2,23,2,161,2,124,0,851967,2,180,-1,2,23,2,181,-4,2,158,-20,2,195,2,165,-56,0,3145728,2,185,-4,2,166,2,124,-4,0,32505856,-1,2,167,-1,0,2147385088,2,90,1,2155905152,2,-3,2,103,2,0,2,168,-2,2,169,-6,2,170,0,4026597375,0,1,-1,0,1,-1,2,171,-3,2,117,2,64,-2,2,166,-2,2,176,2,124,-878,2,159,-36,2,172,-1,2,201,-10,2,188,-5,2,174,-6,0,4294965251,2,27,-1,2,173,-1,2,174,-2,0,4227874752,-3,0,2146435072,2,159,-2,0,1006649344,2,124,-1,2,90,0,201375744,-3,0,134217720,2,90,0,4286677377,0,32896,-1,2,158,-3,2,175,-349,2,176,0,1920,2,177,3,0,264,-11,2,157,-2,2,178,2,0,0,520617856,0,2692743168,0,36,-3,0,524284,-11,2,23,-1,2,187,-1,2,184,0,3221291007,2,178,-1,2,202,0,2158720,-3,2,159,0,1,-4,2,124,0,3808625411,0,3489628288,2,200,0,1207959680,0,3221274624,2,0,-3,2,179,0,120,0,7340032,-2,2,180,2,4,2,23,2,163,3,0,4,2,159,-1,2,181,2,177,-1,0,8176,2,182,2,179,2,183,-1,0,4290773232,2,0,-4,2,163,2,189,0,15728640,2,177,-1,2,161,-1,0,4294934512,3,0,4,-9,2,90,2,170,2,184,3,0,4,0,704,0,1849688064,2,185,-1,2,124,0,4294901887,2,0,0,130547712,0,1879048192,2,199,3,0,2,-1,2,186,2,187,-1,0,17829776,0,2025848832,0,4261477888,-2,2,0,-1,0,4286580608,-1,0,29360128,2,192,0,16252928,0,3791388672,2,38,3,0,2,-2,2,196,2,0,-1,2,103,-1,0,66584576,-1,2,191,3,0,9,2,124,-1,0,4294755328,3,0,2,-1,2,161,2,178,3,0,2,2,23,2,188,2,90,-2,0,245760,0,2147418112,-1,2,150,2,203,0,4227923456,-1,2,164,2,161,2,90,-3,0,4292870145,0,262144,2,124,3,0,2,0,1073758848,2,189,-1,0,4227921920,2,190,0,68289024,0,528402016,0,4292927536,3,0,4,-2,0,268435456,2,91,-2,2,191,3,0,5,-1,2,192,2,163,2,0,-2,0,4227923936,2,62,-1,2,155,2,95,2,0,2,154,2,158,3,0,6,-1,2,177,3,0,3,-2,0,2146959360,0,9440640,0,104857600,0,4227923840,3,0,2,0,768,2,193,2,77,-2,2,161,-2,2,119,-1,2,155,3,0,8,0,512,0,8388608,2,194,2,172,2,187,0,4286578944,3,0,2,0,1152,0,1266679808,2,191,0,576,0,4261707776,2,95,3,0,9,2,155,3,0,5,2,16,-1,0,2147221504,-28,2,178,3,0,3,-3,0,4292902912,-6,2,96,3,0,85,-33,0,4294934528,3,0,126,-18,2,195,3,0,269,-17,2,155,2,124,2,198,3,0,2,2,23,0,4290822144,-2,0,67174336,0,520093700,2,17,3,0,21,-2,2,179,3,0,3,-2,0,30720,-1,0,32512,3,0,2,0,4294770656,-191,2,174,-38,2,170,2,0,2,196,3,0,279,-8,2,124,2,0,0,4294508543,0,65295,-11,2,177,3,0,72,-3,0,3758159872,0,201391616,3,0,155,-7,2,170,-1,0,384,-1,0,133693440,-3,2,196,-2,2,26,3,0,4,2,169,-2,2,90,2,155,3,0,4,-2,2,164,-1,2,150,0,335552923,2,197,-1,0,538974272,0,2214592512,0,132e3,-10,0,192,-8,0,12288,-21,0,134213632,0,4294901761,3,0,42,0,100663424,0,4294965284,3,0,6,-1,0,3221282816,2,198,3,0,11,-1,2,199,3,0,40,-6,0,4286578784,2,0,-2,0,1006694400,3,0,24,2,35,-1,2,94,3,0,2,0,1,2,163,3,0,6,2,197,0,4110942569,0,1432950139,0,2701658217,0,4026532864,0,4026532881,2,0,2,45,3,0,8,-1,2,158,-2,2,169,0,98304,0,65537,2,170,-5,0,4294950912,2,0,2,118,0,65528,2,177,0,4294770176,2,26,3,0,4,-30,2,174,0,3758153728,-3,2,169,-2,2,155,2,188,2,158,-1,2,191,-1,2,161,0,4294754304,3,0,2,-3,0,33554432,-2,2,200,-3,2,169,0,4175478784,2,201,0,4286643712,0,4286644216,2,0,-4,2,202,-1,2,165,0,4227923967,3,0,32,-1334,2,163,2,0,-129,2,94,-6,2,163,-180,2,203,-233,2,4,3,0,96,-16,2,163,3,0,47,-154,2,165,3,0,22381,-7,2,17,3,0,6128],[4294967295,4294967291,4092460543,4294828031,4294967294,134217726,268435455,2147483647,1048575,1073741823,3892314111,134217727,1061158911,536805376,4294910143,4160749567,4294901759,4294901760,536870911,262143,8388607,4294902783,4294918143,65535,67043328,2281701374,4294967232,2097151,4294903807,4194303,255,67108863,4294967039,511,524287,131071,127,4292870143,4294902271,4294549487,33554431,1023,67047423,4294901888,4286578687,4294770687,67043583,32767,15,2047999,67043343,16777215,4294902e3,4294934527,4294966783,4294967279,2047,262083,20511,4290772991,41943039,493567,4294959104,603979775,65536,602799615,805044223,4294965206,8191,1031749119,4294917631,2134769663,4286578493,4282253311,4294942719,33540095,4294905855,4294967264,2868854591,1608515583,265232348,534519807,2147614720,1060109444,4093640016,17376,2139062143,224,4169138175,4294909951,4286578688,4294967292,4294965759,2044,4292870144,4294966272,4294967280,8289918,4294934399,4294901775,4294965375,1602223615,4294967259,4294443008,268369920,4292804608,486341884,4294963199,3087007615,1073692671,4128527,4279238655,4294902015,4294966591,2445279231,3670015,3238002687,31,63,4294967288,4294705151,4095,3221208447,4294549472,2147483648,4285526655,4294966527,4294705152,4294966143,64,4294966719,16383,3774873592,458752,536807423,67043839,3758096383,3959414372,3755993023,2080374783,4294835295,4294967103,4160749565,4087,184024726,2862017156,1593309078,268434431,268434414,4294901763,536870912,2952790016,202506752,139264,402653184,4261412864,4227922944,49152,61440,3758096384,117440512,65280,3233808384,3221225472,2097152,4294965248,32768,57152,67108864,4293918720,4290772992,25165824,57344,4227915776,4278190080,4227907584,65520,4026531840,4227858432,4160749568,3758129152,4294836224,63488,1073741824,4294967040,4194304,251658240,196608,4294963200,64512,417808,4227923712,12582912,50331648,65472,4294967168,4294966784,16,4294917120,2080374784,4096,65408,524288,65532]);function h(u){return u.column++,u.currentChar=u.source.charCodeAt(++u.index)}function Xe(u,e){if((e&64512)!==55296)return 0;let n=u.source.charCodeAt(u.index+1);return(n&64512)!==56320?0:(e=u.currentChar=65536+((e&1023)<<10)+(n&1023),E2[(e>>>5)+0]>>>e&31&1||d(u,18,G(e)),u.index++,u.column++,1)}function uu(u,e){u.currentChar=u.source.charCodeAt(++u.index),u.flags|=1,e&4||(u.column=0,u.line++)}function c2(u){u.flags|=1,u.currentChar=u.source.charCodeAt(++u.index),u.column=0,u.line++}function ze(u){return u===160||u===65279||u===133||u===5760||u>=8192&&u<=8203||u===8239||u===8287||u===12288||u===8201||u===65519}function G(u){return u<=65535?String.fromCharCode(u):String.fromCharCode(u>>>10)+String.fromCharCode(u&1023)}function H(u){return u<65?u-48:u-65+10&15}function He(u){switch(u){case 134283266:return"NumericLiteral";case 134283267:return"StringLiteral";case 86021:case 86022:return"BooleanLiteral";case 86023:return"NullLiteral";case 65540:return"RegularExpression";case 67174408:case 67174409:case 132:return"TemplateLiteral";default:return(u&143360)===143360?"Identifier":(u&4096)===4096?"Keyword":"Punctuator"}}var L=[0,0,0,0,0,0,0,0,0,0,1032,0,0,2056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,3,0,0,8192,0,0,0,256,0,33024,0,0,242,242,114,114,114,114,114,114,594,594,0,0,16384,0,0,0,0,67,67,67,67,67,67,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,1,0,0,4099,0,71,71,71,71,71,71,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,16384,0,0,0,0],Ke=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Iu=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0];function Z2(u){return u<=127?Ke[u]:E2[(u>>>5)+34816]>>>u&31&1}function O2(u){return u<=127?Iu[u]:E2[(u>>>5)+0]>>>u&31&1||u===8204||u===8205}var Nu=["SingleLine","MultiLine","HTMLOpen","HTMLClose","HashbangComment"];function $e(u){let e=u.source;u.currentChar===35&&e.charCodeAt(u.index+1)===33&&(h(u),h(u),eu(u,e,0,4,u.tokenPos,u.linePos,u.colPos))}function wu(u,e,n,i,t,o,l,f){return i&2048&&d(u,0),eu(u,e,n,t,o,l,f)}function eu(u,e,n,i,t,o,l){let{index:f}=u;for(u.tokenPos=u.index,u.linePos=u.line,u.colPos=u.column;u.index=u.source.length)return d(u,32)}let t=u.index-1,o=0,l=u.currentChar,{index:f}=u;for(;O2(l);){switch(l){case 103:o&2&&d(u,34,"g"),o|=2;break;case 105:o&1&&d(u,34,"i"),o|=1;break;case 109:o&4&&d(u,34,"m"),o|=4;break;case 117:o&16&&d(u,34,"u"),o|=16;break;case 121:o&8&&d(u,34,"y"),o|=8;break;case 115:o&32&&d(u,34,"s"),o|=32;break;case 100:o&64&&d(u,34,"d"),o|=64;break;default:d(u,33)}l=h(u)}let c=u.source.slice(f,u.index),a=u.source.slice(n,t);return u.tokenRegExp={pattern:a,flags:c},e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),u.tokenValue=Ye(u,a,c),65540}function Ye(u,e,n){try{return new RegExp(e,n)}catch{try{return new RegExp(e,n.replace("d","")),null}catch{d(u,32)}}}function Qe(u,e,n){let{index:i}=u,t="",o=h(u),l=u.index;for(;!(L[o]&8);){if(o===n)return t+=u.source.slice(l,u.index),h(u),e&512&&(u.tokenRaw=u.source.slice(i,u.index)),u.tokenValue=t,134283267;if((o&8)===8&&o===92){if(t+=u.source.slice(l,u.index),o=h(u),o<127||o===8232||o===8233){let f=Vu(u,e,o);f>=0?t+=G(f):Ru(u,f,0)}else t+=G(o);l=u.index+1}u.index>=u.end&&d(u,14),o=h(u)}d(u,14)}function Vu(u,e,n){switch(n){case 98:return 8;case 102:return 12;case 114:return 13;case 110:return 10;case 116:return 9;case 118:return 11;case 13:if(u.index1114111)return-5;return u.currentChar<1||u.currentChar!==125?-4:t}else{if(!(L[i]&64))return-4;let t=u.source.charCodeAt(u.index+1);if(!(L[t]&64))return-4;let o=u.source.charCodeAt(u.index+2);if(!(L[o]&64))return-4;let l=u.source.charCodeAt(u.index+3);return L[l]&64?(u.index+=3,u.column+=3,u.currentChar=u.source.charCodeAt(u.index),H(i)<<12|H(t)<<8|H(o)<<4|H(l)):-4}}case 56:case 57:if(!(e&256))return-3;default:return n}}function Ru(u,e,n){switch(e){case-1:return;case-2:d(u,n?2:1);case-3:d(u,13);case-4:d(u,6);case-5:d(u,102)}}function Ou(u,e){let{index:n}=u,i=67174409,t="",o=h(u);for(;o!==96;){if(o===36&&u.source.charCodeAt(u.index+1)===123){h(u),i=67174408;break}else if((o&8)===8&&o===92)if(o=h(u),o>126)t+=G(o);else{let l=Vu(u,e|1024,o);if(l>=0)t+=G(l);else if(l!==-1&&e&65536){t=void 0,o=Ze(u,o),o<0&&(i=67174408);break}else Ru(u,l,1)}else u.index=u.end&&d(u,15),o=h(u)}return h(u),u.tokenValue=t,u.tokenRaw=u.source.slice(n+1,u.index-(i===67174409?1:2)),i}function Ze(u,e){for(;e!==96;){switch(e){case 36:{let n=u.index+1;if(n=u.end&&d(u,15),e=h(u)}return e}function re(u,e){return u.index>=u.end&&d(u,0),u.index--,u.column--,Ou(u,e)}function Su(u,e,n){let i=u.currentChar,t=0,o=9,l=n&64?0:1,f=0,c=0;if(n&64)t="."+L2(u,i),i=u.currentChar,i===110&&d(u,11);else{if(i===48)if(i=h(u),(i|32)===120){for(n=136,i=h(u);L[i]&4160;){if(i===95){c||d(u,147),c=0,i=h(u);continue}c=1,t=t*16+H(i),f++,i=h(u)}(f===0||!c)&&d(u,f===0?19:148)}else if((i|32)===111){for(n=132,i=h(u);L[i]&4128;){if(i===95){c||d(u,147),c=0,i=h(u);continue}c=1,t=t*8+(i-48),f++,i=h(u)}(f===0||!c)&&d(u,f===0?0:148)}else if((i|32)===98){for(n=130,i=h(u);L[i]&4224;){if(i===95){c||d(u,147),c=0,i=h(u);continue}c=1,t=t*2+(i-48),f++,i=h(u)}(f===0||!c)&&d(u,f===0?0:148)}else if(L[i]&32)for(e&1024&&d(u,1),n=1;L[i]&16;){if(L[i]&512){n=32,l=0;break}t=t*8+(i-48),i=h(u)}else L[i]&512?(e&1024&&d(u,1),u.flags|=64,n=32):i===95&&d(u,0);if(n&48){if(l){for(;o>=0&&L[i]&4112;){if(i===95){i=h(u),(i===95||n&32)&&A2(u.index,u.line,u.index+1,147),c=1;continue}c=0,t=10*t+(i-48),i=h(u),--o}if(c&&A2(u.index,u.line,u.index+1,148),o>=0&&!Z2(i)&&i!==46)return u.tokenValue=t,e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),134283266}t+=L2(u,i),i=u.currentChar,i===46&&(h(u)===95&&d(u,0),n=64,t+="."+L2(u,u.currentChar),i=u.currentChar)}}let a=u.index,g=0;if(i===110&&n&128)g=1,i=h(u);else if((i|32)===101){i=h(u),L[i]&256&&(i=h(u));let{index:m}=u;L[i]&16||d(u,10),t+=u.source.substring(a,m)+L2(u,i),i=u.currentChar}return(u.index","(","{",".","...","}",")",";",",","[","]",":","?","'",'"',"","++","--","=","<<=",">>=",">>>=","**=","+=","-=","*=","/=","%=","^=","|=","&=","||=","&&=","??=","typeof","delete","void","!","~","+","-","in","instanceof","*","%","/","**","&&","||","===","!==","==","!=","<=",">=","<",">","<<",">>",">>>","&","|","^","var","let","const","break","case","catch","class","continue","debugger","default","do","else","export","extends","finally","for","function","if","import","new","return","super","switch","this","throw","try","while","with","implements","interface","package","private","protected","public","static","yield","as","async","await","constructor","get","set","from","of","enum","eval","arguments","escaped keyword","escaped future reserved keyword","reserved if strict","#","BigIntLiteral","??","?.","WhiteSpace","Illegal","LineTerminator","PrivateField","Template","@","target","meta","LineFeed","Escaped","JSXText"],Uu=Object.create(null,{this:{value:86113},function:{value:86106},if:{value:20571},return:{value:20574},var:{value:86090},else:{value:20565},for:{value:20569},new:{value:86109},in:{value:8738868},typeof:{value:16863277},while:{value:20580},case:{value:20558},break:{value:20557},try:{value:20579},catch:{value:20559},delete:{value:16863278},throw:{value:86114},switch:{value:86112},continue:{value:20561},default:{value:20563},instanceof:{value:8476725},do:{value:20564},void:{value:16863279},finally:{value:20568},async:{value:209007},await:{value:209008},class:{value:86096},const:{value:86092},constructor:{value:12401},debugger:{value:20562},export:{value:20566},extends:{value:20567},false:{value:86021},from:{value:12404},get:{value:12402},implements:{value:36966},import:{value:86108},interface:{value:36967},let:{value:241739},null:{value:86023},of:{value:274549},package:{value:36968},private:{value:36969},protected:{value:36970},public:{value:36971},set:{value:12403},static:{value:36972},super:{value:86111},true:{value:86022},with:{value:20581},yield:{value:241773},enum:{value:86134},eval:{value:537079927},as:{value:77934},arguments:{value:537079928},target:{value:143494},meta:{value:143495}});function Bu(u,e,n){for(;Iu[h(u)];);return u.tokenValue=u.source.slice(u.tokenPos,u.index),u.currentChar!==92&&u.currentChar<=126?Uu[u.tokenValue]||208897:nu(u,e,0,n)}function Ge(u,e){let n=Mu(u);return O2(n)||d(u,4),u.tokenValue=G(n),nu(u,e,1,L[n]&4)}function nu(u,e,n,i){let t=u.index;for(;u.index=2&&o<=11){let l=Uu[u.tokenValue];return l===void 0?208897:n?l===209008?e&4196352?121:l:e&1024?l===36972||(l&36864)===36864?122:(l&20480)===20480?e&1073741824&&!(e&8192)?l:121:143483:e&1073741824&&!(e&8192)&&(l&20480)===20480?l:l===241773?e&1073741824?143483:e&2097152?121:l:l===209007?143483:(l&36864)===36864?l:121:l}return 208897}function xe(u){return Z2(h(u))||d(u,94),131}function Mu(u){return u.source.charCodeAt(u.index+1)!==117&&d(u,4),u.currentChar=u.source.charCodeAt(u.index+=2),pe(u)}function pe(u){let e=0,n=u.currentChar;if(n===123){let l=u.index-2;for(;L[h(u)]&64;)e=e<<4|H(u.currentChar),e>1114111&&A2(l,u.line,u.index+1,102);return u.currentChar!==125&&A2(l,u.line,u.index-1,6),h(u),e}L[n]&64||d(u,6);let i=u.source.charCodeAt(u.index+1);L[i]&64||d(u,6);let t=u.source.charCodeAt(u.index+2);L[t]&64||d(u,6);let o=u.source.charCodeAt(u.index+3);return L[o]&64||d(u,6),e=H(n)<<12|H(i)<<8|H(t)<<4|H(o),u.currentChar=u.source.charCodeAt(u.index+=4),e}var Ju=[129,129,129,129,129,129,129,129,129,128,136,128,128,130,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,128,16842800,134283267,131,208897,8457015,8455751,134283267,67174411,16,8457014,25233970,18,25233971,67108877,8457016,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,21,1074790417,8456258,1077936157,8456259,22,133,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,69271571,137,20,8455497,208897,132,4096,4096,4096,4096,4096,4096,4096,208897,4096,208897,208897,4096,208897,4096,208897,4096,208897,4096,4096,4096,208897,4096,4096,208897,4096,4096,2162700,8455240,1074790415,16842801,129];function D(u,e){if(u.flags=(u.flags|1)^1,u.startPos=u.index,u.startColumn=u.column,u.startLine=u.line,u.token=ju(u,e,0),u.onToken&&u.token!==1048576){let n={start:{line:u.linePos,column:u.colPos},end:{line:u.line,column:u.column}};u.onToken(He(u.token),u.tokenPos,u.index,n)}}function ju(u,e,n){let i=u.index===0,t=u.source,o=u.index,l=u.line,f=u.column;for(;u.index=u.end)return 8457014;let s=u.currentChar;return s===61?(h(u),4194340):s!==42?8457014:h(u)!==61?8457273:(h(u),4194337)}case 8455497:return h(u)!==61?8455497:(h(u),4194343);case 25233970:{h(u);let s=u.currentChar;return s===43?(h(u),33619995):s===61?(h(u),4194338):25233970}case 25233971:{h(u);let s=u.currentChar;if(s===45){if(h(u),(n&1||i)&&u.currentChar===62){e&256||d(u,109),h(u),n=wu(u,t,n,e,3,o,l,f),o=u.tokenPos,l=u.linePos,f=u.colPos;continue}return 33619996}return s===61?(h(u),4194339):25233971}case 8457016:{if(h(u),u.index=48&&m<=57)return Su(u,e,80);if(m===46){let s=u.index+1;if(s=48&&s<=57)))return h(u),67108991}return 22}}}else{if((c^8232)<=1){n=n&-5|1,c2(u);continue}if((c&64512)===55296||E2[(c>>>5)+34816]>>>c&31&1)return(c&64512)===56320&&(c=(c&1023)<<10|c&1023|65536,E2[(c>>>5)+0]>>>c&31&1||d(u,18,G(c)),u.index++,u.currentChar=c),u.column++,u.tokenValue="",nu(u,e,0,0);if(ze(c)){h(u);continue}d(u,18,G(c))}}return 1048576}function u1(u,e){return u.startPos=u.tokenPos=u.index,u.startColumn=u.colPos=u.column,u.startLine=u.linePos=u.line,u.token=L[u.currentChar]&8192?e1(u,e):ju(u,e,0),u.token}function e1(u,e){let n=u.currentChar,i=h(u),t=u.index;for(;i!==n;)u.index>=u.end&&d(u,14),i=h(u);return i!==n&&d(u,14),u.tokenValue=u.source.slice(t,u.index),h(u),e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),134283267}function d2(u,e){if(u.startPos=u.tokenPos=u.index,u.startColumn=u.colPos=u.column,u.startLine=u.linePos=u.line,u.index>=u.end)return u.token=1048576;switch(Ju[u.source.charCodeAt(u.index)]){case 8456258:{h(u),u.currentChar===47?(h(u),u.token=25):u.token=8456258;break}case 2162700:{h(u),u.token=2162700;break}default:{let i=0;for(;u.index1&&t&32&&u.token&262144&&d(u,59,U[u.token&255]),l}function Tu(u,e,n,i,t){let{token:o,tokenPos:l,linePos:f,colPos:c}=u,a=null,g=le(u,e,n,i,t,l,f,c);return u.token===1077936157?(D(u,e|32768),a=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),(t&32||!(o&2097152))&&(u.token===274549||u.token===8738868&&(o&2097152||!(i&4)||e&1024))&&h2(l,u.line,u.index-3,58,u.token===274549?"of":"in")):(i&16||(o&2097152)>0)&&(u.token&262144)!==262144&&d(u,57,i&16?"const":"destructuring"),y(u,e,l,f,c,{type:"VariableDeclarator",id:g,init:a})}function F1(u,e,n,i,t,o,l){D(u,e);let f=((e&4194304)>0||(e&2048)>0&&(e&8192)>0)&&q(u,e,209008);P(u,e|32768,67174411),n&&(n=J(n,1));let c=null,a=null,g=0,m=null,s=u.token===86090||u.token===241739||u.token===86092,k,{token:C,tokenPos:b,linePos:E,colPos:w}=u;if(s?C===241739?(m=I(u,e,0),u.token&2240512?(u.token===8738868?e&1024&&d(u,65):m=y(u,e,b,E,w,{type:"VariableDeclaration",kind:"let",declarations:y2(u,e|134217728,n,8,32)}),u.assignable=1):e&1024?d(u,65):(s=!1,u.assignable=1,m=N(u,e,m,0,0,b,E,w),u.token===274549&&d(u,112))):(D(u,e),m=y(u,e,b,E,w,C===86090?{type:"VariableDeclaration",kind:"var",declarations:y2(u,e|134217728,n,4,32)}:{type:"VariableDeclaration",kind:"const",declarations:y2(u,e|134217728,n,16,32)}),u.assignable=1):C===1074790417?f&&d(u,80):(C&2097152)===2097152?(m=C===2162700?Y(u,e,void 0,1,0,0,2,32,b,E,w):_(u,e,void 0,1,0,0,2,32,b,E,w),g=u.destructible,e&256&&g&64&&d(u,61),u.assignable=g&16?2:1,m=N(u,e|134217728,m,0,0,u.tokenPos,u.linePos,u.colPos)):m=W(u,e|134217728,1,0,1,b,E,w),(u.token&262144)===262144){if(u.token===274549){u.assignable&2&&d(u,78,f?"await":"of"),r(u,m),D(u,e|32768),k=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),P(u,e|32768,16);let S=P2(u,e,n,i);return y(u,e,t,o,l,{type:"ForOfStatement",left:m,right:k,body:S,await:f})}u.assignable&2&&d(u,78,"in"),r(u,m),D(u,e|32768),f&&d(u,80),k=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos),P(u,e|32768,16);let M=P2(u,e,n,i);return y(u,e,t,o,l,{type:"ForInStatement",body:M,left:m,right:k})}f&&d(u,80),s||(g&8&&u.token!==1077936157&&d(u,78,"loop"),m=O(u,e|134217728,0,0,b,E,w,m)),u.token===18&&(m=e2(u,e,0,u.tokenPos,u.linePos,u.colPos,m)),P(u,e|32768,1074790417),u.token!==1074790417&&(c=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),P(u,e|32768,1074790417),u.token!==16&&(a=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),P(u,e|32768,16);let v=P2(u,e,n,i);return y(u,e,t,o,l,{type:"ForStatement",init:m,test:c,update:a,body:v})}function Yu(u,e,n){return tu(e,u.token)||d(u,115),(u.token&537079808)===537079808&&d(u,116),n&&t2(u,e,n,u.tokenValue,8,0),I(u,e,0)}function q1(u,e,n){let i=u.tokenPos,t=u.linePos,o=u.colPos;D(u,e);let l=null,{tokenPos:f,linePos:c,colPos:a}=u,g=[];if(u.token===134283267)l=X(u,e);else{if(u.token&143360){let m=Yu(u,e,n);if(g=[y(u,e,f,c,a,{type:"ImportDefaultSpecifier",local:m})],q(u,e,18))switch(u.token){case 8457014:g.push(Fu(u,e,n));break;case 2162700:qu(u,e,n,g);break;default:d(u,105)}}else switch(u.token){case 8457014:g=[Fu(u,e,n)];break;case 2162700:qu(u,e,n,g);break;case 67174411:return Zu(u,e,i,t,o);case 67108877:return Qu(u,e,i,t,o);default:d(u,28,U[u.token&255])}l=L1(u,e)}return z(u,e|32768),y(u,e,i,t,o,{type:"ImportDeclaration",specifiers:g,source:l})}function Fu(u,e,n){let{tokenPos:i,linePos:t,colPos:o}=u;return D(u,e),P(u,e,77934),(u.token&134217728)===134217728&&h2(i,u.line,u.index,28,U[u.token&255]),y(u,e,i,t,o,{type:"ImportNamespaceSpecifier",local:Yu(u,e,n)})}function L1(u,e){return q(u,e,12404),u.token!==134283267&&d(u,103,"Import"),X(u,e)}function qu(u,e,n,i){for(D(u,e);u.token&143360;){let{token:t,tokenValue:o,tokenPos:l,linePos:f,colPos:c}=u,a=I(u,e,0),g;q(u,e,77934)?((u.token&134217728)===134217728||u.token===18?d(u,104):U2(u,e,16,u.token,0),o=u.tokenValue,g=I(u,e,0)):(U2(u,e,16,t,0),g=a),n&&t2(u,e,n,o,8,0),i.push(y(u,e,l,f,c,{type:"ImportSpecifier",local:g,imported:a})),u.token!==1074790415&&P(u,e,18)}return P(u,e,1074790415),i}function Qu(u,e,n,i,t){let o=Gu(u,e,y(u,e,n,i,t,{type:"Identifier",name:"import"}),n,i,t);return o=N(u,e,o,0,0,n,i,t),o=O(u,e,0,0,n,i,t,o),D2(u,e,o,n,i,t)}function Zu(u,e,n,i,t){let o=xu(u,e,0,n,i,t);return o=N(u,e,o,0,0,n,i,t),u.token===18&&(o=e2(u,e,0,n,i,t,o)),D2(u,e,o,n,i,t)}function I1(u,e,n){let i=u.tokenPos,t=u.linePos,o=u.colPos;D(u,e|32768);let l=[],f=null,c=null,a;if(q(u,e|32768,20563)){switch(u.token){case 86106:{f=i2(u,e,n,4,1,1,0,u.tokenPos,u.linePos,u.colPos);break}case 133:case 86096:f=p2(u,e,n,1,u.tokenPos,u.linePos,u.colPos);break;case 209007:let{tokenPos:g,linePos:m,colPos:s}=u;f=I(u,e,0);let{flags:k}=u;k&1||(u.token===86106?f=i2(u,e,n,4,1,1,1,g,m,s):u.token===67174411?(f=mu(u,e,f,1,1,0,k,g,m,s),f=N(u,e,f,0,0,g,m,s),f=O(u,e,0,0,g,m,s,f)):u.token&143360&&(n&&(n=z2(u,e,u.tokenValue)),f=I(u,e,0),f=v2(u,e,n,[f],1,g,m,s)));break;default:f=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),z(u,e|32768)}return n&&l2(u,"default"),y(u,e,i,t,o,{type:"ExportDefaultDeclaration",declaration:f})}switch(u.token){case 8457014:{D(u,e);let k=null;return q(u,e,77934)&&(n&&l2(u,u.tokenValue),k=I(u,e,0)),P(u,e,12404),u.token!==134283267&&d(u,103,"Export"),c=X(u,e),z(u,e|32768),y(u,e,i,t,o,{type:"ExportAllDeclaration",source:c,exported:k})}case 2162700:{D(u,e);let k=[],C=[];for(;u.token&143360;){let{tokenPos:b,tokenValue:E,linePos:w,colPos:v}=u,M=I(u,e,0),S;u.token===77934?(D(u,e),(u.token&134217728)===134217728&&d(u,104),n&&(k.push(u.tokenValue),C.push(E)),S=I(u,e,0)):(n&&(k.push(u.tokenValue),C.push(u.tokenValue)),S=M),l.push(y(u,e,b,w,v,{type:"ExportSpecifier",local:M,exported:S})),u.token!==1074790415&&P(u,e,18)}if(P(u,e,1074790415),q(u,e,12404))u.token!==134283267&&d(u,103,"Export"),c=X(u,e);else if(n){let b=0,E=k.length;for(;b0)&8738868,g,m;for(u.assignable=2;u.token&8454144&&(g=u.token,m=g&3840,(g&524288&&f&268435456||f&524288&&g&268435456)&&d(u,160),!(m+((g===8457273)<<8)-((a===g)<<12)<=l));)D(u,e|32768),c=y(u,e,i,t,o,{type:g&524288||g&268435456?"LogicalExpression":"BinaryExpression",left:c,right:n2(u,e,n,u.tokenPos,u.linePos,u.colPos,m,g,W(u,e,0,n,1,u.tokenPos,u.linePos,u.colPos)),operator:U[g&255]});return u.token===1077936157&&d(u,24),c}function N1(u,e,n,i,t,o,l){n||d(u,0);let f=u.token;D(u,e|32768);let c=W(u,e,0,l,1,u.tokenPos,u.linePos,u.colPos);return u.token===8457273&&d(u,31),e&1024&&f===16863278&&(c.type==="Identifier"?d(u,118):n1(c)&&d(u,124)),u.assignable=2,y(u,e,i,t,o,{type:"UnaryExpression",operator:U[f&255],argument:c,prefix:!0})}function V1(u,e,n,i,t,o,l,f,c,a){let{token:g}=u,m=I(u,e,o),{flags:s}=u;if(!(s&1)){if(u.token===86106)return ue(u,e,1,n,f,c,a);if((u.token&143360)===143360)return i||d(u,0),ie(u,e,t,f,c,a)}return!l&&u.token===67174411?mu(u,e,m,t,1,0,s,f,c,a):u.token===10?(ou(u,e,g,1),l&&d(u,49),K2(u,e,u.tokenValue,m,l,t,0,f,c,a)):m}function R1(u,e,n,i,t,o,l){if(n&&(u.destructible|=256),e&2097152){D(u,e|32768),e&8388608&&d(u,30),i||d(u,24),u.token===22&&d(u,121);let f=null,c=!1;return u.flags&1||(c=q(u,e|32768,8457014),(u.token&77824||c)&&(f=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos))),u.assignable=2,y(u,e,t,o,l,{type:"YieldExpression",argument:f,delegate:c})}return e&1024&&d(u,95,"yield"),au(u,e,t,o,l)}function O1(u,e,n,i,t,o,l){if(i&&(u.destructible|=128),e&4194304||e&2048&&e&8192){n&&d(u,0),e&8388608&&h2(u.index,u.line,u.index,29),D(u,e|32768);let f=W(u,e,0,0,1,u.tokenPos,u.linePos,u.colPos);return u.token===8457273&&d(u,31),u.assignable=2,y(u,e,t,o,l,{type:"AwaitExpression",argument:f})}return e&2048&&d(u,96),au(u,e,t,o,l)}function H2(u,e,n,i,t,o){let{tokenPos:l,linePos:f,colPos:c}=u;P(u,e|32768,2162700);let a=[],g=e;if(u.token!==1074790415){for(;u.token===134283267;){let{index:m,tokenPos:s,tokenValue:k,token:C}=u,b=X(u,e);Xu(u,m,s,k)&&(e|=1024,u.flags&128&&h2(u.index,u.line,u.tokenPos,64),u.flags&64&&h2(u.index,u.line,u.tokenPos,8)),a.push(fu(u,e,b,C,s,u.linePos,u.colPos))}e&1024&&(t&&((t&537079808)===537079808&&d(u,116),(t&36864)===36864&&d(u,38)),u.flags&512&&d(u,116),u.flags&256&&d(u,115)),e&64&&n&&o!==void 0&&!(g&1024)&&!(e&8192)&&X2(o)}for(u.flags=(u.flags|512|256|64)^832,u.destructible=(u.destructible|256)^256;u.token!==1074790415;)a.push(S2(u,e,n,4,{}));return P(u,i&24?e|32768:e,1074790415),u.flags&=-193,u.token===1077936157&&d(u,24),y(u,e,l,f,c,{type:"BlockStatement",body:a})}function U1(u,e,n,i,t){switch(D(u,e),u.token){case 67108991:d(u,162);case 67174411:{e&524288||d(u,26),e&16384&&d(u,27),u.assignable=2;break}case 69271571:case 67108877:{e&262144||d(u,27),e&16384&&d(u,27),u.assignable=1;break}default:d(u,28,"super")}return y(u,e,n,i,t,{type:"Super"})}function W(u,e,n,i,t,o,l,f){let c=K(u,e,2,0,n,0,i,t,o,l,f);return N(u,e,c,i,0,o,l,f)}function M1(u,e,n,i,t,o){u.assignable&2&&d(u,53);let{token:l}=u;return D(u,e),u.assignable=2,y(u,e,i,t,o,{type:"UpdateExpression",argument:n,operator:U[l&255],prefix:!1})}function N(u,e,n,i,t,o,l,f){if((u.token&33619968)===33619968&&!(u.flags&1))n=M1(u,e,n,o,l,f);else if((u.token&67108864)===67108864){switch(e=(e|134217728)^134217728,u.token){case 67108877:{D(u,(e|1073741824|8192)^8192),u.assignable=1;let c=ru(u,e);n=y(u,e,o,l,f,{type:"MemberExpression",object:n,computed:!1,property:c});break}case 69271571:{let c=!1;(u.flags&2048)===2048&&(c=!0,u.flags=(u.flags|2048)^2048),D(u,e|32768);let{tokenPos:a,linePos:g,colPos:m}=u,s=j(u,e,i,1,a,g,m);P(u,e,20),u.assignable=1,n=y(u,e,o,l,f,{type:"MemberExpression",object:n,computed:!0,property:s}),c&&(u.flags|=2048);break}case 67174411:{if((u.flags&1024)===1024)return u.flags=(u.flags|1024)^1024,n;let c=!1;(u.flags&2048)===2048&&(c=!0,u.flags=(u.flags|2048)^2048);let a=su(u,e,i);u.assignable=2,n=y(u,e,o,l,f,{type:"CallExpression",callee:n,arguments:a}),c&&(u.flags|=2048);break}case 67108991:{D(u,(e|1073741824|8192)^8192),u.flags|=2048,u.assignable=2,n=J1(u,e,n,o,l,f);break}default:(u.flags&2048)===2048&&d(u,161),u.assignable=2,n=y(u,e,o,l,f,{type:"TaggedTemplateExpression",tag:n,quasi:u.token===67174408?du(u,e|65536):cu(u,e,u.tokenPos,u.linePos,u.colPos)})}n=N(u,e,n,0,1,o,l,f)}return t===0&&(u.flags&2048)===2048&&(u.flags=(u.flags|2048)^2048,n=y(u,e,o,l,f,{type:"ChainExpression",expression:n})),n}function J1(u,e,n,i,t,o){let l=!1,f;if((u.token===69271571||u.token===67174411)&&(u.flags&2048)===2048&&(l=!0,u.flags=(u.flags|2048)^2048),u.token===69271571){D(u,e|32768);let{tokenPos:c,linePos:a,colPos:g}=u,m=j(u,e,0,1,c,a,g);P(u,e,20),u.assignable=2,f=y(u,e,i,t,o,{type:"MemberExpression",object:n,computed:!0,optional:!0,property:m})}else if(u.token===67174411){let c=su(u,e,0);u.assignable=2,f=y(u,e,i,t,o,{type:"CallExpression",callee:n,arguments:c,optional:!0})}else{u.token&143360||d(u,155);let c=I(u,e,0);u.assignable=2,f=y(u,e,i,t,o,{type:"MemberExpression",object:n,computed:!1,optional:!0,property:c})}return l&&(u.flags|=2048),f}function ru(u,e){return!(u.token&143360)&&u.token!==131&&d(u,155),e&1&&u.token===131?j2(u,e,u.tokenPos,u.linePos,u.colPos):I(u,e,0)}function j1(u,e,n,i,t,o,l){n&&d(u,54),i||d(u,0);let{token:f}=u;D(u,e|32768);let c=W(u,e,0,0,1,u.tokenPos,u.linePos,u.colPos);return u.assignable&2&&d(u,53),u.assignable=2,y(u,e,t,o,l,{type:"UpdateExpression",argument:c,operator:U[f&255],prefix:!0})}function K(u,e,n,i,t,o,l,f,c,a,g){if((u.token&143360)===143360){switch(u.token){case 209008:return O1(u,e,i,l,c,a,g);case 241773:return R1(u,e,l,t,c,a,g);case 209007:return V1(u,e,l,f,t,o,i,c,a,g)}let{token:m,tokenValue:s}=u,k=I(u,e|65536,o);return u.token===10?(f||d(u,0),ou(u,e,m,1),K2(u,e,s,k,i,t,0,c,a,g)):(e&16384&&m===537079928&&d(u,127),m===241739&&(e&1024&&d(u,110),n&24&&d(u,98)),u.assignable=e&1024&&(m&537079808)===537079808?2:1,k)}if((u.token&134217728)===134217728)return X(u,e);switch(u.token){case 33619995:case 33619996:return j1(u,e,i,f,c,a,g);case 16863278:case 16842800:case 16842801:case 25233970:case 25233971:case 16863277:case 16863279:return N1(u,e,f,c,a,g,l);case 86106:return ue(u,e,0,l,c,a,g);case 2162700:return W1(u,e,t?0:1,l,c,a,g);case 69271571:return $1(u,e,t?0:1,l,c,a,g);case 67174411:return Y1(u,e,t,1,0,c,a,g);case 86021:case 86022:case 86023:return H1(u,e,c,a,g);case 86113:return K1(u,e);case 65540:return r1(u,e,c,a,g);case 133:case 86096:return G1(u,e,l,c,a,g);case 86111:return U1(u,e,c,a,g);case 67174409:return cu(u,e,c,a,g);case 67174408:return du(u,e);case 86109:return Q1(u,e,l,c,a,g);case 134283389:return pu(u,e,c,a,g);case 131:return j2(u,e,c,a,g);case 86108:return X1(u,e,i,l,c,a,g);case 8456258:if(e&16)return yu(u,e,1,c,a,g);default:if(tu(e,u.token))return au(u,e,c,a,g);d(u,28,U[u.token&255])}}function X1(u,e,n,i,t,o,l){let f=I(u,e,0);return u.token===67108877?Gu(u,e,f,t,o,l):(n&&d(u,138),f=xu(u,e,i,t,o,l),u.assignable=2,N(u,e,f,i,0,t,o,l))}function Gu(u,e,n,i,t,o){return e&2048||d(u,164),D(u,e),u.token!==143495&&u.tokenValue!=="meta"&&d(u,28,U[u.token&255]),u.assignable=2,y(u,e,i,t,o,{type:"MetaProperty",meta:n,property:I(u,e,0)})}function xu(u,e,n,i,t,o){P(u,e|32768,67174411),u.token===14&&d(u,139);let l=R(u,e,1,0,n,u.tokenPos,u.linePos,u.colPos);return P(u,e,16),y(u,e,i,t,o,{type:"ImportExpression",source:l})}function pu(u,e,n,i,t){let{tokenRaw:o,tokenValue:l}=u;return D(u,e),u.assignable=2,y(u,e,n,i,t,e&512?{type:"Literal",value:l,bigint:o.slice(0,-1),raw:o}:{type:"Literal",value:l,bigint:o.slice(0,-1)})}function cu(u,e,n,i,t){u.assignable=2;let{tokenValue:o,tokenRaw:l,tokenPos:f,linePos:c,colPos:a}=u;P(u,e,67174409);let g=[V2(u,e,o,l,f,c,a,!0)];return y(u,e,n,i,t,{type:"TemplateLiteral",expressions:[],quasis:g})}function du(u,e){e=(e|134217728)^134217728;let{tokenValue:n,tokenRaw:i,tokenPos:t,linePos:o,colPos:l}=u;P(u,e|32768,67174408);let f=[V2(u,e,n,i,t,o,l,!1)],c=[j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)];for(u.token!==1074790415&&d(u,81);(u.token=re(u,e))!==67174409;){let{tokenValue:a,tokenRaw:g,tokenPos:m,linePos:s,colPos:k}=u;P(u,e|32768,67174408),f.push(V2(u,e,a,g,m,s,k,!1)),c.push(j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),u.token!==1074790415&&d(u,81)}{let{tokenValue:a,tokenRaw:g,tokenPos:m,linePos:s,colPos:k}=u;P(u,e,67174409),f.push(V2(u,e,a,g,m,s,k,!0))}return y(u,e,t,o,l,{type:"TemplateLiteral",expressions:c,quasis:f})}function V2(u,e,n,i,t,o,l,f){let c=y(u,e,t,o,l,{type:"TemplateElement",value:{cooked:n,raw:i},tail:f}),a=f?1:2;return e&2&&(c.start+=1,c.range[0]+=1,c.end-=a,c.range[1]-=a),e&4&&(c.loc.start.column+=1,c.loc.end.column-=a),c}function z1(u,e,n,i,t){e=(e|134217728)^134217728,P(u,e|32768,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return u.assignable=1,y(u,e,n,i,t,{type:"SpreadElement",argument:o})}function su(u,e,n){D(u,e|32768);let i=[];if(u.token===16)return D(u,e),i;for(;u.token!==16&&(u.token===14?i.push(z1(u,e,u.tokenPos,u.linePos,u.colPos)):i.push(R(u,e,1,0,n,u.tokenPos,u.linePos,u.colPos)),!(u.token!==18||(D(u,e|32768),u.token===16))););return P(u,e,16),i}function I(u,e,n){let{tokenValue:i,tokenPos:t,linePos:o,colPos:l}=u;return D(u,e),y(u,e,t,o,l,e&268435456?{type:"Identifier",name:i,pattern:n===1}:{type:"Identifier",name:i})}function X(u,e){let{tokenValue:n,tokenRaw:i,tokenPos:t,linePos:o,colPos:l}=u;return u.token===134283389?pu(u,e,t,o,l):(D(u,e),u.assignable=2,y(u,e,t,o,l,e&512?{type:"Literal",value:n,raw:i}:{type:"Literal",value:n}))}function H1(u,e,n,i,t){let o=U[u.token&255],l=u.token===86023?null:o==="true";return D(u,e),u.assignable=2,y(u,e,n,i,t,e&512?{type:"Literal",value:l,raw:o}:{type:"Literal",value:l})}function K1(u,e){let{tokenPos:n,linePos:i,colPos:t}=u;return D(u,e),u.assignable=2,y(u,e,n,i,t,{type:"ThisExpression"})}function i2(u,e,n,i,t,o,l,f,c,a){D(u,e|32768);let g=t?iu(u,e,8457014):0,m=null,s,k=n?s2():void 0;if(u.token===67174411)o&1||d(u,37,"Function");else{let E=i&4&&(!(e&8192)||!(e&2048))?4:64;zu(u,e|(e&3072)<<11,u.token),n&&(E&4?$u(u,e,n,u.tokenValue,E):t2(u,e,n,u.tokenValue,E,i),k=J(k,256),o&&o&2&&l2(u,u.tokenValue)),s=u.token,u.token&143360?m=I(u,e,0):d(u,28,U[u.token&255])}e=(e|32243712)^32243712|67108864|l*2+g<<21|(g?0:1073741824),n&&(k=J(k,512));let C=ne(u,e|8388608,k,0,1),b=H2(u,(e|8192|4096|131072)^143360,n?J(k,128):k,8,s,n?k.scopeError:void 0);return y(u,e,f,c,a,{type:"FunctionDeclaration",id:m,params:C,body:b,async:l===1,generator:g===1})}function ue(u,e,n,i,t,o,l){D(u,e|32768);let f=iu(u,e,8457014),c=n*2+f<<21,a=null,g,m=e&64?s2():void 0;(u.token&176128)>0&&(zu(u,(e|32243712)^32243712|c,u.token),m&&(m=J(m,256)),g=u.token,a=I(u,e,0)),e=(e|32243712)^32243712|67108864|c|(f?0:1073741824),m&&(m=J(m,512));let s=ne(u,e|8388608,m,i,1),k=H2(u,e&-134377473,m&&J(m,128),0,g,void 0);return u.assignable=2,y(u,e,t,o,l,{type:"FunctionExpression",id:a,params:s,body:k,async:n===1,generator:f===1})}function $1(u,e,n,i,t,o,l){let f=_(u,e,void 0,n,i,0,2,0,t,o,l);return e&256&&u.destructible&64&&d(u,61),u.destructible&8&&d(u,60),f}function _(u,e,n,i,t,o,l,f,c,a,g){D(u,e|32768);let m=[],s=0;for(e=(e|134217728)^134217728;u.token!==20;)if(q(u,e|32768,18))m.push(null);else{let C,{token:b,tokenPos:E,linePos:w,colPos:v,tokenValue:M}=u;if(b&143360)if(C=K(u,e,l,0,1,0,t,1,E,w,v),u.token===1077936157){u.assignable&2&&d(u,24),D(u,e|32768),n&&u2(u,e,n,M,l,f);let S=R(u,e,1,1,t,u.tokenPos,u.linePos,u.colPos);C=y(u,e,E,w,v,o?{type:"AssignmentPattern",left:C,right:S}:{type:"AssignmentExpression",operator:"=",left:C,right:S}),s|=u.destructible&256?256:0|u.destructible&128?128:0}else u.token===18||u.token===20?(u.assignable&2?s|=16:n&&u2(u,e,n,M,l,f),s|=u.destructible&256?256:0|u.destructible&128?128:0):(s|=l&1?32:l&2?0:16,C=N(u,e,C,t,0,E,w,v),u.token!==18&&u.token!==20?(u.token!==1077936157&&(s|=16),C=O(u,e,t,o,E,w,v,C)):u.token!==1077936157&&(s|=u.assignable&2?16:32));else b&2097152?(C=u.token===2162700?Y(u,e,n,0,t,o,l,f,E,w,v):_(u,e,n,0,t,o,l,f,E,w,v),s|=u.destructible,u.assignable=u.destructible&16?2:1,u.token===18||u.token===20?u.assignable&2&&(s|=16):u.destructible&8?d(u,69):(C=N(u,e,C,t,0,E,w,v),s=u.assignable&2?16:0,u.token!==18&&u.token!==20?C=O(u,e,t,o,E,w,v,C):u.token!==1077936157&&(s|=u.assignable&2?16:32))):b===14?(C=b2(u,e,n,20,l,f,0,t,o,E,w,v),s|=u.destructible,u.token!==18&&u.token!==20&&d(u,28,U[u.token&255])):(C=W(u,e,1,0,1,E,w,v),u.token!==18&&u.token!==20?(C=O(u,e,t,o,E,w,v,C),!(l&3)&&b===67174411&&(s|=16)):u.assignable&2?s|=16:b===67174411&&(s|=u.assignable&1&&l&3?32:16));if(m.push(C),q(u,e|32768,18)){if(u.token===20)break}else break}P(u,e,20);let k=y(u,e,c,a,g,{type:o?"ArrayPattern":"ArrayExpression",elements:m});return!i&&u.token&4194304?ee(u,e,s,t,o,c,a,g,k):(u.destructible=s,k)}function ee(u,e,n,i,t,o,l,f,c){u.token!==1077936157&&d(u,24),D(u,e|32768),n&16&&d(u,24),t||r(u,c);let{tokenPos:a,linePos:g,colPos:m}=u,s=R(u,e,1,1,i,a,g,m);return u.destructible=(n|64|8)^72|(u.destructible&128?128:0)|(u.destructible&256?256:0),y(u,e,o,l,f,t?{type:"AssignmentPattern",left:c,right:s}:{type:"AssignmentExpression",left:c,operator:"=",right:s})}function b2(u,e,n,i,t,o,l,f,c,a,g,m){D(u,e|32768);let s=null,k=0,{token:C,tokenValue:b,tokenPos:E,linePos:w,colPos:v}=u;if(C&143360)u.assignable=1,s=K(u,e,t,0,1,0,f,1,E,w,v),C=u.token,s=N(u,e,s,f,0,E,w,v),u.token!==18&&u.token!==i&&(u.assignable&2&&u.token===1077936157&&d(u,69),k|=16,s=O(u,e,f,c,E,w,v,s)),u.assignable&2?k|=16:C===i||C===18?n&&u2(u,e,n,b,t,o):k|=32,k|=u.destructible&128?128:0;else if(C===i)d(u,39);else if(C&2097152)s=u.token===2162700?Y(u,e,n,1,f,c,t,o,E,w,v):_(u,e,n,1,f,c,t,o,E,w,v),C=u.token,C!==1077936157&&C!==i&&C!==18?(u.destructible&8&&d(u,69),s=N(u,e,s,f,0,E,w,v),k|=u.assignable&2?16:0,(u.token&4194304)===4194304?(u.token!==1077936157&&(k|=16),s=O(u,e,f,c,E,w,v,s)):((u.token&8454144)===8454144&&(s=n2(u,e,1,E,w,v,4,C,s)),q(u,e|32768,22)&&(s=f2(u,e,s,E,w,v)),k|=u.assignable&2?16:32)):k|=i===1074790415&&C!==1077936157?16:u.destructible;else{k|=32,s=W(u,e,1,f,1,u.tokenPos,u.linePos,u.colPos);let{token:M,tokenPos:S,linePos:V,colPos:A}=u;return M===1077936157&&M!==i&&M!==18?(u.assignable&2&&d(u,24),s=O(u,e,f,c,S,V,A,s),k|=16):(M===18?k|=16:M!==i&&(s=O(u,e,f,c,S,V,A,s)),k|=u.assignable&1?32:16),u.destructible=k,u.token!==i&&u.token!==18&&d(u,156),y(u,e,a,g,m,{type:c?"RestElement":"SpreadElement",argument:s})}if(u.token!==i)if(t&1&&(k|=l?16:32),q(u,e|32768,1077936157)){k&16&&d(u,24),r(u,s);let M=R(u,e,1,1,f,u.tokenPos,u.linePos,u.colPos);s=y(u,e,E,w,v,c?{type:"AssignmentPattern",left:s,right:M}:{type:"AssignmentExpression",left:s,operator:"=",right:M}),k=16}else k|=16;return u.destructible=k,y(u,e,a,g,m,{type:c?"RestElement":"SpreadElement",argument:s})}function Z(u,e,n,i,t,o,l){let f=n&64?14680064:31981568;e=(e|f)^f|(n&88)<<18|100925440;let c=e&64?J(s2(),512):void 0,a=_1(u,e|8388608,c,n,1,i);c&&(c=J(c,128));let g=H2(u,e&-134230017,c,0,void 0,void 0);return y(u,e,t,o,l,{type:"FunctionExpression",params:a,body:g,async:(n&16)>0,generator:(n&8)>0,id:null})}function W1(u,e,n,i,t,o,l){let f=Y(u,e,void 0,n,i,0,2,0,t,o,l);return e&256&&u.destructible&64&&d(u,61),u.destructible&8&&d(u,60),f}function Y(u,e,n,i,t,o,l,f,c,a,g){D(u,e);let m=[],s=0,k=0;for(e=(e|134217728)^134217728;u.token!==1074790415;){let{token:b,tokenValue:E,linePos:w,colPos:v,tokenPos:M}=u;if(b===14)m.push(b2(u,e,n,1074790415,l,f,0,t,o,M,w,v));else{let S=0,V=null,A,Q=u.token;if(u.token&143360||u.token===121)if(V=I(u,e,0),u.token===18||u.token===1074790415||u.token===1077936157)if(S|=4,e&1024&&(b&537079808)===537079808?s|=16:U2(u,e,l,b,0),n&&u2(u,e,n,E,l,f),q(u,e|32768,1077936157)){s|=8;let B=R(u,e,1,1,t,u.tokenPos,u.linePos,u.colPos);s|=u.destructible&256?256:0|u.destructible&128?128:0,A=y(u,e,M,w,v,{type:"AssignmentPattern",left:e&-2147483648?Object.assign({},V):V,right:B})}else s|=(b===209008?128:0)|(b===121?16:0),A=e&-2147483648?Object.assign({},V):V;else if(q(u,e|32768,21)){let{tokenPos:B,linePos:F,colPos:T}=u;if(E==="__proto__"&&k++,u.token&143360){let o2=u.token,m2=u.tokenValue;s|=Q===121?16:0,A=K(u,e,l,0,1,0,t,1,B,F,T);let{token:x}=u;A=N(u,e,A,t,0,B,F,T),u.token===18||u.token===1074790415?x===1077936157||x===1074790415||x===18?(s|=u.destructible&128?128:0,u.assignable&2?s|=16:n&&(o2&143360)===143360&&u2(u,e,n,m2,l,f)):s|=u.assignable&1?32:16:(u.token&4194304)===4194304?(u.assignable&2?s|=16:x!==1077936157?s|=32:n&&u2(u,e,n,m2,l,f),A=O(u,e,t,o,B,F,T,A)):(s|=16,(u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,x,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,t,o,l,f,B,F,T):Y(u,e,n,0,t,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):u.destructible&8?d(u,69):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&2?16:0,(u.token&4194304)===4194304?A=I2(u,e,t,o,B,F,T,A):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,t,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&2?16:0,u.token!==18&&b!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,t,o,B,F,T,A))))}else u.token===69271571?(s|=16,b===209007&&(S|=16),S|=(b===12402?256:b===12403?512:1)|2,V=g2(u,e,t),s|=u.assignable,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):u.token&143360?(s|=16,b===121&&d(u,93),b===209007&&(u.flags&1&&d(u,129),S|=16),V=I(u,e,0),S|=b===12402?256:b===12403?512:1,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):u.token===67174411?(s|=16,S|=1,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):u.token===8457014?(s|=16,b===12402?d(u,40):b===12403?d(u,41):b===143483&&d(u,93),D(u,e),S|=9|(b===209007?16:0),u.token&143360?V=I(u,e,0):(u.token&134217728)===134217728?V=X(u,e):u.token===69271571?(S|=2,V=g2(u,e,t),s|=u.assignable):d(u,28,U[u.token&255]),A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):(u.token&134217728)===134217728?(b===209007&&(S|=16),S|=b===12402?256:b===12403?512:1,s|=16,V=X(u,e),A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):d(u,130);else if((u.token&134217728)===134217728)if(V=X(u,e),u.token===21){P(u,e|32768,21);let{tokenPos:B,linePos:F,colPos:T}=u;if(E==="__proto__"&&k++,u.token&143360){A=K(u,e,l,0,1,0,t,1,B,F,T);let{token:o2,tokenValue:m2}=u;A=N(u,e,A,t,0,B,F,T),u.token===18||u.token===1074790415?o2===1077936157||o2===1074790415||o2===18?u.assignable&2?s|=16:n&&u2(u,e,n,m2,l,f):s|=u.assignable&1?32:16:u.token===1077936157?(u.assignable&2&&(s|=16),A=O(u,e,t,o,B,F,T,A)):(s|=16,A=O(u,e,t,o,B,F,T,A))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,t,o,l,f,B,F,T):Y(u,e,n,0,t,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(u.destructible&8)!==8&&(A=N(u,e,A,t,0,B,F,T),s=u.assignable&2?16:0,(u.token&4194304)===4194304?A=I2(u,e,t,o,B,F,T,A):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,0,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&1?0:16,u.token!==18&&u.token!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,t,o,B,F,T,A))))}else u.token===67174411?(S|=1,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos),s=u.assignable|16):d(u,131);else if(u.token===69271571)if(V=g2(u,e,t),s|=u.destructible&256?256:0,S|=2,u.token===21){D(u,e|32768);let{tokenPos:B,linePos:F,colPos:T,tokenValue:o2,token:m2}=u;if(u.token&143360){A=K(u,e,l,0,1,0,t,1,B,F,T);let{token:x}=u;A=N(u,e,A,t,0,B,F,T),(u.token&4194304)===4194304?(s|=u.assignable&2?16:x===1077936157?0:32,A=I2(u,e,t,o,B,F,T,A)):u.token===18||u.token===1074790415?x===1077936157||x===1074790415||x===18?u.assignable&2?s|=16:n&&(m2&143360)===143360&&u2(u,e,n,o2,l,f):s|=u.assignable&1?32:16:(s|=16,A=O(u,e,t,o,B,F,T,A))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,t,o,l,f,B,F,T):Y(u,e,n,0,t,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):s&8?d(u,60):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&2?s|16:0,(u.token&4194304)===4194304?(u.token!==1077936157&&(s|=16),A=I2(u,e,t,o,B,F,T,A)):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,0,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,t,0,B,F,T),s=u.assignable&1?0:16,u.token!==18&&u.token!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,t,o,B,F,T,A))))}else u.token===67174411?(S|=1,A=Z(u,e,S,t,u.tokenPos,w,v),s=16):d(u,42);else if(b===8457014)if(P(u,e|32768,8457014),S|=8,u.token&143360){let{token:B,line:F,index:T}=u;V=I(u,e,0),S|=1,u.token===67174411?(s|=16,A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):h2(T,F,T,B===209007?44:B===12402||u.token===12403?43:45,U[B&255])}else(u.token&134217728)===134217728?(s|=16,V=X(u,e),S|=1,A=Z(u,e,S,t,M,w,v)):u.token===69271571?(s|=16,S|=3,V=g2(u,e,t),A=Z(u,e,S,t,u.tokenPos,u.linePos,u.colPos)):d(u,123);else d(u,28,U[b&255]);s|=u.destructible&128?128:0,u.destructible=s,m.push(y(u,e,M,w,v,{type:"Property",key:V,value:A,kind:S&768?S&512?"set":"get":"init",computed:(S&2)>0,method:(S&1)>0,shorthand:(S&4)>0}))}if(s|=u.destructible,u.token!==18)break;D(u,e)}P(u,e,1074790415),k>1&&(s|=64);let C=y(u,e,c,a,g,{type:o?"ObjectPattern":"ObjectExpression",properties:m});return!i&&u.token&4194304?ee(u,e,s,t,o,c,a,g,C):(u.destructible=s,C)}function _1(u,e,n,i,t,o){P(u,e,67174411);let l=[];if(u.flags=(u.flags|128)^128,u.token===16)return i&512&&d(u,35,"Setter","one",""),D(u,e),l;i&256&&d(u,35,"Getter","no","s"),i&512&&u.token===14&&d(u,36),e=(e|134217728)^134217728;let f=0,c=0;for(;u.token!==18;){let a=null,{tokenPos:g,linePos:m,colPos:s}=u;if(u.token&143360?(e&1024||((u.token&36864)===36864&&(u.flags|=256),(u.token&537079808)===537079808&&(u.flags|=512)),a=gu(u,e,n,i|1,0,g,m,s)):(u.token===2162700?a=Y(u,e,n,1,o,1,t,0,g,m,s):u.token===69271571?a=_(u,e,n,1,o,1,t,0,g,m,s):u.token===14&&(a=b2(u,e,n,16,t,0,0,o,1,g,m,s)),c=1,u.destructible&48&&d(u,48)),u.token===1077936157){D(u,e|32768),c=1;let k=R(u,e,1,1,0,u.tokenPos,u.linePos,u.colPos);a=y(u,e,g,m,s,{type:"AssignmentPattern",left:a,right:k})}if(f++,l.push(a),!q(u,e,18)||u.token===16)break}return i&512&&f!==1&&d(u,35,"Setter","one",""),n&&n.scopeError!==void 0&&X2(n.scopeError),c&&(u.flags|=128),P(u,e,16),l}function g2(u,e,n){D(u,e|32768);let i=R(u,(e|134217728)^134217728,1,0,n,u.tokenPos,u.linePos,u.colPos);return P(u,e,20),i}function Y1(u,e,n,i,t,o,l,f){u.flags=(u.flags|128)^128;let{tokenPos:c,linePos:a,colPos:g}=u;D(u,e|32768|1073741824);let m=e&64?J(s2(),1024):void 0;if(e=(e|134217728)^134217728,q(u,e,16))return J2(u,e,m,[],n,0,o,l,f);let s=0;u.destructible&=-385;let k,C=[],b=0,E=0,{tokenPos:w,linePos:v,colPos:M}=u;for(u.assignable=1;u.token!==16;){let{token:S,tokenPos:V,linePos:A,colPos:Q}=u;if(S&143360)m&&t2(u,e,m,u.tokenValue,1,0),k=K(u,e,i,0,1,0,1,1,V,A,Q),u.token===16||u.token===18?u.assignable&2?(s|=16,E=1):((S&537079808)===537079808||(S&36864)===36864)&&(E=1):(u.token===1077936157?E=1:s|=16,k=N(u,e,k,1,0,V,A,Q),u.token!==16&&u.token!==18&&(k=O(u,e,1,0,V,A,Q,k)));else if((S&2097152)===2097152)k=S===2162700?Y(u,e|1073741824,m,0,1,0,i,t,V,A,Q):_(u,e|1073741824,m,0,1,0,i,t,V,A,Q),s|=u.destructible,E=1,u.assignable=2,u.token!==16&&u.token!==18&&(s&8&&d(u,119),k=N(u,e,k,0,0,V,A,Q),s|=16,u.token!==16&&u.token!==18&&(k=O(u,e,0,0,V,A,Q,k)));else if(S===14){k=b2(u,e,m,16,i,t,0,1,0,V,A,Q),u.destructible&16&&d(u,72),E=1,b&&(u.token===16||u.token===18)&&C.push(k),s|=8;break}else{if(s|=16,k=R(u,e,1,0,1,V,A,Q),b&&(u.token===16||u.token===18)&&C.push(k),u.token===18&&(b||(b=1,C=[k])),b){for(;q(u,e|32768,18);)C.push(R(u,e,1,0,1,u.tokenPos,u.linePos,u.colPos));u.assignable=2,k=y(u,e,w,v,M,{type:"SequenceExpression",expressions:C})}return P(u,e,16),u.destructible=s,k}if(b&&(u.token===16||u.token===18)&&C.push(k),!q(u,e|32768,18))break;if(b||(b=1,C=[k]),u.token===16){s|=8;break}}return b&&(u.assignable=2,k=y(u,e,w,v,M,{type:"SequenceExpression",expressions:C})),P(u,e,16),s&16&&s&8&&d(u,146),s|=u.destructible&256?256:0|u.destructible&128?128:0,u.token===10?(s&48&&d(u,47),e&4196352&&s&128&&d(u,29),e&2098176&&s&256&&d(u,30),E&&(u.flags|=128),J2(u,e,m,b?C:[k],n,0,o,l,f)):(s&8&&d(u,140),u.destructible=(u.destructible|256)^256|s,e&128?y(u,e,c,a,g,{type:"ParenthesizedExpression",expression:k}):k)}function au(u,e,n,i,t){let{tokenValue:o}=u,l=I(u,e,0);if(u.assignable=1,u.token===10){let f;return e&64&&(f=z2(u,e,o)),u.flags=(u.flags|128)^128,v2(u,e,f,[l],0,n,i,t)}return l}function K2(u,e,n,i,t,o,l,f,c,a){o||d(u,55),t&&d(u,49),u.flags&=-129;let g=e&64?z2(u,e,n):void 0;return v2(u,e,g,[i],l,f,c,a)}function J2(u,e,n,i,t,o,l,f,c){t||d(u,55);for(let a=0;a0&&u.tokenValue==="constructor"&&d(u,107),u.token===1074790415&&d(u,106),q(u,e,1074790417)){k>0&&d(u,117);continue}m.push(oe(u,e,i,n,t,s,0,l,u.tokenPos,u.linePos,u.colPos))}return P(u,o&8?e|32768:e,1074790415),u.flags=u.flags&-33|g,y(u,e,f,c,a,{type:"ClassBody",body:m})}function oe(u,e,n,i,t,o,l,f,c,a,g){let m=l?32:0,s=null,{token:k,tokenPos:C,linePos:b,colPos:E}=u;if(k&176128)switch(s=I(u,e,0),k){case 36972:if(!l&&u.token!==67174411&&(u.token&1048576)!==1048576&&u.token!==1077936157)return oe(u,e,n,i,t,o,1,f,c,a,g);break;case 209007:if(u.token!==67174411&&!(u.flags&1)){if(e&1&&(u.token&1073741824)===1073741824)return N2(u,e,s,m,o,C,b,E);m|=16|(iu(u,e,8457014)?8:0)}break;case 12402:if(u.token!==67174411){if(e&1&&(u.token&1073741824)===1073741824)return N2(u,e,s,m,o,C,b,E);m|=256}break;case 12403:if(u.token!==67174411){if(e&1&&(u.token&1073741824)===1073741824)return N2(u,e,s,m,o,C,b,E);m|=512}break}else if(k===69271571)m|=2,s=g2(u,i,f);else if((k&134217728)===134217728)s=X(u,e);else if(k===8457014)m|=8,D(u,e);else if(e&1&&u.token===131)m|=4096,s=j2(u,e|16384,C,b,E);else if(e&1&&(u.token&1073741824)===1073741824)m|=128;else{if(l&&k===2162700)return B1(u,e,n,C,b,E);k===122?(s=I(u,e,0),u.token!==67174411&&d(u,28,U[u.token&255])):d(u,28,U[u.token&255])}if(m&792&&(u.token&143360?s=I(u,e,0):(u.token&134217728)===134217728?s=X(u,e):u.token===69271571?(m|=2,s=g2(u,e,0)):u.token===122?s=I(u,e,0):e&1&&u.token===131?(m|=4096,s=j2(u,e,C,b,E)):d(u,132)),m&2||(u.tokenValue==="constructor"?((u.token&1073741824)===1073741824?d(u,126):!(m&32)&&u.token===67174411&&(m&920?d(u,51,"accessor"):e&524288||(u.flags&32?d(u,52):u.flags|=32)),m|=64):!(m&4096)&&m&824&&u.tokenValue==="prototype"&&d(u,50)),e&1&&u.token!==67174411)return N2(u,e,s,m,o,C,b,E);let w=Z(u,e,m,f,u.tokenPos,u.linePos,u.colPos);return y(u,e,c,a,g,e&1?{type:"MethodDefinition",kind:!(m&32)&&m&64?"constructor":m&256?"get":m&512?"set":"method",static:(m&32)>0,computed:(m&2)>0,key:s,decorators:o,value:w}:{type:"MethodDefinition",kind:!(m&32)&&m&64?"constructor":m&256?"get":m&512?"set":"method",static:(m&32)>0,computed:(m&2)>0,key:s,value:w})}function j2(u,e,n,i,t){D(u,e);let{tokenValue:o}=u;return o==="constructor"&&d(u,125),D(u,e),y(u,e,n,i,t,{type:"PrivateIdentifier",name:o})}function N2(u,e,n,i,t,o,l,f){let c=null;if(i&8&&d(u,0),u.token===1077936157){D(u,e|32768);let{tokenPos:a,linePos:g,colPos:m}=u;u.token===537079928&&d(u,116),c=K(u,e|16384,2,0,1,0,0,1,a,g,m),((u.token&1073741824)!==1073741824||(u.token&4194304)===4194304)&&(c=N(u,e|16384,c,0,0,a,g,m),c=O(u,e|16384,0,0,a,g,m,c),u.token===18&&(c=e2(u,e,0,o,l,f,c)))}return y(u,e,o,l,f,{type:"PropertyDefinition",key:n,value:c,static:(i&32)>0,computed:(i&2)>0,decorators:t})}function le(u,e,n,i,t,o,l,f){if(u.token&143360)return gu(u,e,n,i,t,o,l,f);(u.token&2097152)!==2097152&&d(u,28,U[u.token&255]);let c=u.token===69271571?_(u,e,n,1,0,1,i,t,o,l,f):Y(u,e,n,1,0,1,i,t,o,l,f);return u.destructible&16&&d(u,48),u.destructible&32&&d(u,48),c}function gu(u,e,n,i,t,o,l,f){let{tokenValue:c,token:a}=u;return e&1024&&((a&537079808)===537079808?d(u,116):(a&36864)===36864&&d(u,115)),(a&20480)===20480&&d(u,100),e&2099200&&a===241773&&d(u,30),a===241739&&i&24&&d(u,98),e&4196352&&a===209008&&d(u,96),D(u,e),n&&u2(u,e,n,c,i,t),y(u,e,o,l,f,{type:"Identifier",name:c})}function yu(u,e,n,i,t,o){if(D(u,e),u.token===8456259)return y(u,e,i,t,o,{type:"JSXFragment",openingFragment:p1(u,e,i,t,o),children:Lu(u,e),closingFragment:e0(u,e,n,u.tokenPos,u.linePos,u.colPos)});let l=null,f=[],c=t0(u,e,n,i,t,o);if(!c.selfClosing){f=Lu(u,e),l=u0(u,e,n,u.tokenPos,u.linePos,u.colPos);let a=M2(l.name);M2(c.name)!==a&&d(u,150,a)}return y(u,e,i,t,o,{type:"JSXElement",children:f,openingElement:c,closingElement:l})}function p1(u,e,n,i,t){return d2(u,e),y(u,e,n,i,t,{type:"JSXOpeningFragment"})}function u0(u,e,n,i,t,o){P(u,e,25);let l=fe(u,e,u.tokenPos,u.linePos,u.colPos);return n?P(u,e,8456259):u.token=d2(u,e),y(u,e,i,t,o,{type:"JSXClosingElement",name:l})}function e0(u,e,n,i,t,o){return P(u,e,25),P(u,e,8456259),y(u,e,i,t,o,{type:"JSXClosingFragment"})}function Lu(u,e){let n=[];for(;u.token!==25;)u.index=u.tokenPos=u.startPos,u.column=u.colPos=u.startColumn,u.line=u.linePos=u.startLine,d2(u,e),n.push(n0(u,e,u.tokenPos,u.linePos,u.colPos));return n}function n0(u,e,n,i,t){if(u.token===138)return i0(u,e,n,i,t);if(u.token===2162700)return de(u,e,0,0,n,i,t);if(u.token===8456258)return yu(u,e,0,n,i,t);d(u,0)}function i0(u,e,n,i,t){d2(u,e);let o={type:"JSXText",value:u.tokenValue};return e&512&&(o.raw=u.tokenRaw),y(u,e,n,i,t,o)}function t0(u,e,n,i,t,o){(u.token&143360)!==143360&&(u.token&4096)!==4096&&d(u,0);let l=fe(u,e,u.tokenPos,u.linePos,u.colPos),f=l0(u,e),c=u.token===8457016;return u.token===8456259?d2(u,e):(P(u,e,8457016),n?P(u,e,8456259):d2(u,e)),y(u,e,i,t,o,{type:"JSXOpeningElement",name:l,attributes:f,selfClosing:c})}function fe(u,e,n,i,t){r2(u);let o=W2(u,e,n,i,t);if(u.token===21)return ce(u,e,o,n,i,t);for(;q(u,e,67108877);)r2(u),o=o0(u,e,o,n,i,t);return o}function o0(u,e,n,i,t,o){let l=W2(u,e,u.tokenPos,u.linePos,u.colPos);return y(u,e,i,t,o,{type:"JSXMemberExpression",object:n,property:l})}function l0(u,e){let n=[];for(;u.token!==8457016&&u.token!==8456259&&u.token!==1048576;)n.push(c0(u,e,u.tokenPos,u.linePos,u.colPos));return n}function f0(u,e,n,i,t){D(u,e),P(u,e,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return P(u,e,1074790415),y(u,e,n,i,t,{type:"JSXSpreadAttribute",argument:o})}function c0(u,e,n,i,t){if(u.token===2162700)return f0(u,e,n,i,t);r2(u);let o=null,l=W2(u,e,n,i,t);if(u.token===21&&(l=ce(u,e,l,n,i,t)),u.token===1077936157){let f=u1(u,e),{tokenPos:c,linePos:a,colPos:g}=u;switch(f){case 134283267:o=X(u,e);break;case 8456258:o=yu(u,e,1,c,a,g);break;case 2162700:o=de(u,e,1,1,c,a,g);break;default:d(u,149)}}return y(u,e,n,i,t,{type:"JSXAttribute",value:o,name:l})}function ce(u,e,n,i,t,o){P(u,e,21);let l=W2(u,e,u.tokenPos,u.linePos,u.colPos);return y(u,e,i,t,o,{type:"JSXNamespacedName",namespace:n,name:l})}function de(u,e,n,i,t,o,l){D(u,e|32768);let{tokenPos:f,linePos:c,colPos:a}=u;if(u.token===14)return d0(u,e,t,o,l);let g=null;return u.token===1074790415?(i&&d(u,152),g=s0(u,e,u.startPos,u.startLine,u.startColumn)):g=R(u,e,1,0,0,f,c,a),n?P(u,e,1074790415):d2(u,e),y(u,e,t,o,l,{type:"JSXExpressionContainer",expression:g})}function d0(u,e,n,i,t){P(u,e,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return P(u,e,1074790415),y(u,e,n,i,t,{type:"JSXSpreadChild",expression:o})}function s0(u,e,n,i,t){return u.startPos=u.tokenPos,u.startLine=u.linePos,u.startColumn=u.colPos,y(u,e,n,i,t,{type:"JSXEmptyExpression"})}function W2(u,e,n,i,t){let{tokenValue:o}=u;return D(u,e),y(u,e,n,i,t,{type:"JSXIdentifier",name:o})}function se(u,e){return c1(u,e,0)}function a0(u,e){let n=new SyntaxError(u+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var ae=a0;function m0(u){let e=[];for(let n of u)try{return n()}catch(i){e.push(i)}throw Object.assign(new Error("All combinations failed"),{errors:e})}var me=m0;var C2=Je(be(),1);function E0(u){if(!u.startsWith("#!"))return"";let e=u.indexOf(` -`);return e===-1?u:u.slice(0,e)}var Ce=E0;function w0(u){let e=Ce(u);e&&(u=u.slice(e.length+1));let n=(0,C2.extract)(u),{pragmas:i,comments:t}=(0,C2.parseWithComments)(n);return{shebang:e,text:u,pragmas:i,comments:t}}function Pe(u){let{pragmas:e}=w0(u);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function S0(u){return Array.isArray(u)&&u.length>0}var _2=S0;function $(u){var i;let e=u.range?u.range[0]:u.start,n=((i=u.declaration)==null?void 0:i.decorators)??u.decorators;return _2(n)?Math.min($(n[0]),e):e}function p(u){return u.range?u.range[1]:u.end}function B0(u){return u=typeof u=="function"?{parse:u}:u,{astFormat:"estree",hasPragma:Pe,locStart:$,locEnd:p,...u}}var Ee=B0;var v0=(u,e,n)=>{if(!(u&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},ku=v0;function T0(u){return u=new Set(u),e=>u.has(e==null?void 0:e.type)}var we=T0;var F0=we(["Block","CommentBlock","MultiLine"]),T2=F0;function q0(u){return T2(u)&&u.value[0]==="*"&&/@(?:type|satisfies)\b/.test(u.value)}var Se=q0;function L0(u){let e=`*${u.value}*`.split(` -`);return e.length>1&&e.every(n=>n.trimStart()[0]==="*")}var hu=L0;var F2=null;function q2(u){if(F2!==null&&typeof F2.property){let e=F2;return F2=q2.prototype=null,e}return F2=q2.prototype=u??Object.create(null),new q2}var I0=10;for(let u=0;u<=I0;u++)q2();function Au(u){return q2(u)}function N0(u,e="type"){Au(u);function n(i){let t=i[e],o=u[t];if(!Array.isArray(o))throw Object.assign(new Error(`Missing visitor keys for '${t}'.`),{node:i});return o}return n}var Be=N0;var ve={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var V0=Be(ve),Te=V0;function Du(u,e){if(!(u!==null&&typeof u=="object"))return u;if(Array.isArray(u)){for(let i=0;i{var f;(f=l.leadingComments)!=null&&f.some(Se)&&o.add($(l))}),u=Y2(u,l=>{if(l.type==="ParenthesizedExpression"){let{expression:f}=l;if(f.type==="TypeCastExpression")return f.range=l.range,f;let c=$(l);if(!o.has(c))return f.extra={...f.extra,parenthesized:!0},f}})}if(u=Y2(u,o=>{switch(o.type){case"LogicalExpression":if(Fe(o))return bu(o);break;case"VariableDeclaration":{let l=ku(!1,o.declarations,-1);l!=null&&l.init&&t(o,l);break}case"TSParenthesizedType":return o.typeAnnotation;case"TSTypeParameter":if(typeof o.name=="string"){let l=$(o);o.name={type:"Identifier",name:o.name,range:[l,l+o.name.length]}}break;case"TopicReference":u.extra={...u.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:l}=o;if(n==="meriyah"&&(l==null?void 0:l.type)==="Identifier"){let f=i.slice($(l),p(l));(f.startsWith('"')||f.startsWith("'"))&&(o.exported={...o.exported,type:"Literal",value:o.exported.name,raw:f})}break}case"TSUnionType":case"TSIntersectionType":if(o.types.length===1)return o.types[0];break}}),_2(u.comments)){let o=ku(!1,u.comments,-1);for(let l=u.comments.length-2;l>=0;l--){let f=u.comments[l];p(f)===$(o)&&T2(f)&&T2(o)&&hu(f)&&hu(o)&&(u.comments.splice(l+1,1),f.value+="*//*"+o.value,f.range=[$(f),p(o)]),o=f}}return u.type==="Program"&&(u.range=[0,i.length]),u;function t(o,l){i[p(l)]!==";"&&(o.range=[$(o),p(l)])}}function Fe(u){return u.type==="LogicalExpression"&&u.right.type==="LogicalExpression"&&u.operator===u.right.operator}function bu(u){return Fe(u)?bu({type:"LogicalExpression",operator:u.operator,left:bu({type:"LogicalExpression",operator:u.operator,left:u.left,right:u.right.left,range:[$(u.left),p(u.right.left)]}),right:u.right.right,range:[$(u),p(u)]}):u}var qe=R0;function O0(u){let{filepath:e}=u;if(e){if(e=e.toLowerCase(),e.endsWith(".cjs"))return"script";if(e.endsWith(".mjs"))return"module"}}var Le=O0;var U0={next:!0,ranges:!0,webcompat:!0,loc:!0,raw:!0,directives:!0,globalReturn:!0,impliedStrict:!1,preserveParens:!1,lexical:!1,identifierPattern:!1,jsx:!0,specDeviation:!0,uniqueKeyInPattern:!1};function M0(u,e){let n=[],i=[],t=se(u,{...U0,module:e==="module",onComment:n,onToken:i});return t.comments=n,t.tokens=i,t}function J0(u){var o;let{message:e,line:n,column:i}=u,t=(o=e.match(/^\[(?\d+):(?\d+)]: (?.*)$/))==null?void 0:o.groups;return t&&(e=t.message,typeof n!="number"&&(n=Number(t.line),i=Number(t.column))),typeof n!="number"?u:ae(e,{loc:{start:{line:n,column:i}},cause:u})}function j0(u,e={}){let n=Le(e),i=(n?[n]:["module","script"]).map(o=>()=>M0(u,o)),t;try{t=me(i)}catch({errors:[o]}){throw J0(o)}return qe(t,{parser:"meriyah",text:u})}var X0=Ee(j0);var jn=Pu;export{jn as default,Cu as parsers}; +var Ie=Object.create;var Y2=Object.defineProperty;var Ne=Object.getOwnPropertyDescriptor;var Ve=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Oe=Object.prototype.hasOwnProperty;var Ue=(u,e)=>()=>(e||u((e={exports:{}}).exports,e),e.exports),Pu=(u,e)=>{for(var n in e)Y2(u,n,{get:e[n],enumerable:!0})},Me=(u,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ve(e))!Oe.call(u,i)&&i!==n&&Y2(u,i,{get:()=>e[i],enumerable:!(t=Ne(e,i))||t.enumerable});return u};var Je=(u,e,n)=>(n=u!=null?Ie(Re(u)):{},Me(e||!u||!u.__esModule?Y2(n,"default",{value:u,enumerable:!0}):n,u));var ve=Ue(a2=>{"use strict";Object.defineProperty(a2,"__esModule",{value:!0});a2.extract=F0;a2.parse=L0;a2.parseWithComments=Be;a2.print=I0;a2.strip=q0;var w0=/\*\/$/,S0=/^\/\*\*?/,we=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,B0=/(^|\s+)\/\/([^\r\n]*)/g,Ce=/^(\r?\n)+/,v0=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Pe=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,T0=/(\r?\n|^) *\* ?/g,Se=[];function F0(u){let e=u.match(we);return e?e[0].trimLeft():""}function q0(u){let e=u.match(we);return e&&e[0]?u.substring(e[0].length):u}function L0(u){return Be(u).pragmas}function Be(u){let e=` +`;u=u.replace(S0,"").replace(w0,"").replace(T0,"$1");let n="";for(;n!==u;)n=u,u=u.replace(v0,`${e}$1 $2${e}`);u=u.replace(Ce,"").trimRight();let t=Object.create(null),i=u.replace(Pe,"").replace(Ce,"").trimRight(),o;for(;o=Pe.exec(u);){let l=o[2].replace(B0,"");typeof t[o[1]]=="string"||Array.isArray(t[o[1]])?t[o[1]]=Se.concat(t[o[1]],l):t[o[1]]=l}return{comments:i,pragmas:t}}function I0({comments:u="",pragmas:e={}}){let n=` +`,t="/**",i=" *",o=" */",l=Object.keys(e),f=l.flatMap(a=>Ee(a,e[a])).map(a=>`${i} ${a}${n}`).join("");if(!u){if(l.length===0)return"";if(l.length===1&&!Array.isArray(e[l[0]])){let a=e[l[0]];return`${t} ${Ee(l[0],a)[0]}${o}`}}let c=u.split(n).map(a=>`${i} ${a}`).join(n)+n;return t+n+(u?c:"")+(u&&l.length?i+n:"")+f+o}function Ee(u,e){return Se.concat(e).map(n=>`@${u} ${n}`.trim())}});var Cu={};Pu(Cu,{parsers:()=>bu});var bu={};Pu(bu,{meriyah:()=>X0});var je={0:"Unexpected token",28:"Unexpected token: '%0'",1:"Octal escape sequences are not allowed in strict mode",2:"Octal escape sequences are not allowed in template strings",3:"Unexpected token `#`",4:"Illegal Unicode escape sequence",5:"Invalid code point %0",6:"Invalid hexadecimal escape sequence",8:"Octal literals are not allowed in strict mode",7:"Decimal integer literals with a leading zero are forbidden in strict mode",9:"Expected number in radix %0",146:"Invalid left-hand side assignment to a destructible right-hand side",10:"Non-number found after exponent indicator",11:"Invalid BigIntLiteral",12:"No identifiers allowed directly after numeric literal",13:"Escapes \\8 or \\9 are not syntactically valid escapes",14:"Unterminated string literal",15:"Unterminated template literal",16:"Multiline comment was not closed properly",17:"The identifier contained dynamic unicode escape that was not closed",18:"Illegal character '%0'",19:"Missing hexadecimal digits",20:"Invalid implicit octal",21:"Invalid line break in string literal",22:"Only unicode escapes are legal in identifier names",23:"Expected '%0'",24:"Invalid left-hand side in assignment",25:"Invalid left-hand side in async arrow",26:'Calls to super must be in the "constructor" method of a class expression or class declaration that has a superclass',27:"Member access on super must be in a method",29:"Await expression not allowed in formal parameter",30:"Yield expression not allowed in formal parameter",93:"Unexpected token: 'escaped keyword'",31:"Unary expressions as the left operand of an exponentiation expression must be disambiguated with parentheses",120:"Async functions can only be declared at the top level or inside a block",32:"Unterminated regular expression",33:"Unexpected regular expression flag",34:"Duplicate regular expression flag '%0'",35:"%0 functions must have exactly %1 argument%2",36:"Setter function argument must not be a rest parameter",37:"%0 declaration must have a name in this context",38:"Function name may not contain any reserved words or be eval or arguments in strict mode",39:"The rest operator is missing an argument",40:"A getter cannot be a generator",41:"A setter cannot be a generator",42:"A computed property name must be followed by a colon or paren",131:"Object literal keys that are strings or numbers must be a method or have a colon",44:"Found `* async x(){}` but this should be `async * x(){}`",43:"Getters and setters can not be generators",45:"'%0' can not be generator method",46:"No line break is allowed after '=>'",47:"The left-hand side of the arrow can only be destructed through assignment",48:"The binding declaration is not destructible",49:"Async arrow can not be followed by new expression",50:"Classes may not have a static property named 'prototype'",51:"Class constructor may not be a %0",52:"Duplicate constructor method in class",53:"Invalid increment/decrement operand",54:"Invalid use of `new` keyword on an increment/decrement expression",55:"`=>` is an invalid assignment target",56:"Rest element may not have a trailing comma",57:"Missing initializer in %0 declaration",58:"'for-%0' loop head declarations can not have an initializer",59:"Invalid left-hand side in for-%0 loop: Must have a single binding",60:"Invalid shorthand property initializer",61:"Property name __proto__ appears more than once in object literal",62:"Let is disallowed as a lexically bound name",63:"Invalid use of '%0' inside new expression",64:"Illegal 'use strict' directive in function with non-simple parameter list",65:'Identifier "let" disallowed as left-hand side expression in strict mode',66:"Illegal continue statement",67:"Illegal break statement",68:"Cannot have `let[...]` as a var name in strict mode",69:"Invalid destructuring assignment target",70:"Rest parameter may not have a default initializer",71:"The rest argument must the be last parameter",72:"Invalid rest argument",74:"In strict mode code, functions can only be declared at top level or inside a block",75:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement",76:"Without web compatibility enabled functions can not be declared at top level, inside a block, or as the body of an if statement",77:"Class declaration can't appear in single-statement context",78:"Invalid left-hand side in for-%0",79:"Invalid assignment in for-%0",80:"for await (... of ...) is only valid in async functions and async generators",81:"The first token after the template expression should be a continuation of the template",83:"`let` declaration not allowed here and `let` cannot be a regular var name in strict mode",82:"`let \n [` is a restricted production at the start of a statement",84:"Catch clause requires exactly one parameter, not more (and no trailing comma)",85:"Catch clause parameter does not support default values",86:"Missing catch or finally after try",87:"More than one default clause in switch statement",88:"Illegal newline after throw",89:"Strict mode code may not include a with statement",90:"Illegal return statement",91:"The left hand side of the for-header binding declaration is not destructible",92:"new.target only allowed within functions",94:"'#' not followed by identifier",100:"Invalid keyword",99:"Can not use 'let' as a class name",98:"'A lexical declaration can't define a 'let' binding",97:"Can not use `let` as variable name in strict mode",95:"'%0' may not be used as an identifier in this context",96:"Await is only valid in async functions",101:"The %0 keyword can only be used with the module goal",102:"Unicode codepoint must not be greater than 0x10FFFF",103:"%0 source must be string",104:"Only a identifier can be used to indicate alias",105:"Only '*' or '{...}' can be imported after default",106:"Trailing decorator may be followed by method",107:"Decorators can't be used with a constructor",109:"HTML comments are only allowed with web compatibility (Annex B)",110:"The identifier 'let' must not be in expression position in strict mode",111:"Cannot assign to `eval` and `arguments` in strict mode",112:"The left-hand side of a for-of loop may not start with 'let'",113:"Block body arrows can not be immediately invoked without a group",114:"Block body arrows can not be immediately accessed without a group",115:"Unexpected strict mode reserved word",116:"Unexpected eval or arguments in strict mode",117:"Decorators must not be followed by a semicolon",118:"Calling delete on expression not allowed in strict mode",119:"Pattern can not have a tail",121:"Can not have a `yield` expression on the left side of a ternary",122:"An arrow function can not have a postfix update operator",123:"Invalid object literal key character after generator star",124:"Private fields can not be deleted",126:"Classes may not have a field called constructor",125:"Classes may not have a private element named constructor",127:"A class field initializer may not contain arguments",128:"Generators can only be declared at the top level or inside a block",129:"Async methods are a restricted production and cannot have a newline following it",130:"Unexpected character after object literal property name",132:"Invalid key token",133:"Label '%0' has already been declared",134:"continue statement must be nested within an iteration statement",135:"Undefined label '%0'",136:"Trailing comma is disallowed inside import(...) arguments",137:"import() requires exactly one argument",138:"Cannot use new with import(...)",139:"... is not allowed in import()",140:"Expected '=>'",141:"Duplicate binding '%0'",142:"Cannot export a duplicate name '%0'",145:"Duplicate %0 for-binding",143:"Exported binding '%0' needs to refer to a top-level declared variable",144:"Unexpected private field",148:"Numeric separators are not allowed at the end of numeric literals",147:"Only one underscore is allowed as numeric separator",149:"JSX value should be either an expression or a quoted JSX text",150:"Expected corresponding JSX closing tag for %0",151:"Adjacent JSX elements must be wrapped in an enclosing tag",152:"JSX attributes must only be assigned a non-empty 'expression'",153:"'%0' has already been declared",154:"'%0' shadowed a catch clause binding",155:"Dot property must be an identifier",156:"Encountered invalid input after spread/rest argument",157:"Catch without try",158:"Finally without try",159:"Expected corresponding closing tag for JSX fragment",160:"Coalescing and logical operators used together in the same expression must be disambiguated with parentheses",161:"Invalid tagged template on optional chain",162:"Invalid optional chain from super property",163:"Invalid optional chain from new expression",164:'Cannot use "import.meta" outside a module',165:"Leading decorators must be attached to a class declaration"},k2=class extends SyntaxError{constructor(e,n,t,i,...o){let l="["+n+":"+t+"]: "+je[i].replace(/%(\d+)/g,(f,c)=>o[c]);super(`${l}`),this.index=e,this.line=n,this.column=t,this.description=l,this.loc={line:n,column:t}}};function d(u,e,...n){throw new k2(u.index,u.line,u.column,e,...n)}function X2(u){throw new k2(u.index,u.line,u.column,u.type,u.params)}function h2(u,e,n,t,...i){throw new k2(u,e,n,t,...i)}function A2(u,e,n,t){throw new k2(u,e,n,t)}var E2=((u,e)=>{let n=new Uint32Array(104448),t=0,i=0;for(;t<3540;){let o=u[t++];if(o<0)i-=o;else{let l=u[t++];o&2&&(l=e[l]),o&1?n.fill(l,i,i+=u[t++]):n[i++]=l}}return n})([-1,2,24,2,25,2,5,-1,0,77595648,3,44,2,3,0,14,2,57,2,58,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,59,3,0,4,0,4294966523,3,0,4,2,16,2,60,2,0,0,4294836735,0,3221225471,0,4294901942,2,61,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,17,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,131,2,6,2,56,-1,2,37,0,4294443263,2,1,3,0,3,0,4294901711,2,39,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,2,194,2,3,0,3825204735,0,123747807,0,65487,0,4294828015,0,4092591615,0,1080049119,0,458703,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,66,0,4284449919,0,851904,2,4,2,11,0,67076095,-1,2,67,0,1073741743,0,4093591391,-1,0,50331649,0,3265266687,2,32,0,4294844415,0,4278190047,2,18,2,129,-1,3,0,2,2,21,2,0,2,9,2,0,2,14,2,15,3,0,10,2,69,2,0,2,70,2,71,2,72,2,0,2,73,2,0,2,10,0,261632,2,23,3,0,2,2,12,2,4,3,0,18,2,74,2,5,3,0,2,2,75,0,2088959,2,27,2,8,0,909311,3,0,2,0,814743551,2,41,0,67057664,3,0,2,2,40,2,0,2,28,2,0,2,29,2,7,0,268374015,2,26,2,49,2,0,2,76,0,134153215,-1,2,6,2,0,2,7,0,2684354559,0,67044351,0,3221160064,0,1,-1,3,0,2,2,42,0,1046528,3,0,3,2,8,2,0,2,51,0,4294960127,2,9,2,38,2,10,0,4294377472,2,11,3,0,7,0,4227858431,3,0,8,2,12,2,0,2,78,2,9,2,0,2,79,2,80,2,81,-1,2,124,0,1048577,2,82,2,13,-1,2,13,0,131042,2,83,2,84,2,85,2,0,2,33,-83,2,0,2,53,2,7,3,0,4,0,1046559,2,0,2,14,2,0,0,2147516671,2,20,3,86,2,2,0,-16,2,87,0,524222462,2,4,2,0,0,4269801471,2,4,2,0,2,15,2,77,2,16,3,0,2,2,47,2,0,-1,2,17,-16,3,0,206,-2,3,0,655,2,18,3,0,36,2,68,-1,2,17,2,9,3,0,8,2,89,2,121,2,0,0,3220242431,3,0,3,2,19,2,90,2,91,3,0,2,2,92,2,0,2,93,2,94,2,0,0,4351,2,0,2,8,3,0,2,0,67043391,0,3909091327,2,0,2,22,2,8,2,18,3,0,2,0,67076097,2,7,2,0,2,20,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,97,2,98,2,15,2,21,3,0,3,0,67057663,3,0,349,2,99,2,100,2,6,-264,3,0,11,2,22,3,0,2,2,31,-1,0,3774349439,2,101,2,102,3,0,2,2,19,2,103,3,0,10,2,9,2,17,2,0,2,45,2,0,2,30,2,104,2,23,0,1638399,2,172,2,105,3,0,3,2,18,2,24,2,25,2,5,2,26,2,0,2,7,2,106,-1,2,107,2,108,2,109,-1,3,0,3,2,11,-2,2,0,2,27,-3,2,150,-4,2,18,2,0,2,35,0,1,2,0,2,62,2,28,2,11,2,9,2,0,2,110,-1,3,0,4,2,9,2,21,2,111,2,6,2,0,2,112,2,0,2,48,-4,3,0,9,2,20,2,29,2,30,-4,2,113,2,114,2,29,2,20,2,7,-2,2,115,2,29,2,31,-2,2,0,2,116,-2,0,4277137519,0,2269118463,-1,3,18,2,-1,2,32,2,36,2,0,3,29,2,2,34,2,19,-3,3,0,2,2,33,-1,2,0,2,34,2,0,2,34,2,0,2,46,-10,2,0,0,203775,-2,2,18,2,43,2,35,-2,2,17,2,117,2,20,3,0,2,2,36,0,2147549120,2,0,2,11,2,17,2,135,2,0,2,37,2,52,0,5242879,3,0,2,0,402644511,-1,2,120,0,1090519039,-2,2,122,2,38,2,0,0,67045375,2,39,0,4226678271,0,3766565279,0,2039759,-4,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,40,2,41,-1,2,10,2,42,-6,2,0,2,11,-3,3,0,2,0,2147484671,2,125,0,4190109695,2,50,-2,2,126,0,4244635647,0,27,2,0,2,7,2,43,2,0,2,63,-1,2,0,2,40,-8,2,54,2,44,0,67043329,2,127,2,45,0,8388351,-2,2,128,0,3028287487,2,46,2,130,0,33259519,2,41,-9,2,20,-5,2,64,-2,3,0,28,2,31,-3,3,0,3,2,47,3,0,6,2,48,-85,3,0,33,2,47,-126,3,0,18,2,36,-269,3,0,17,2,40,2,7,2,41,-2,2,17,2,49,2,0,2,20,2,50,2,132,2,23,-21,3,0,2,-4,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,196635,3,0,191,2,51,3,0,38,2,29,-1,2,33,-279,3,0,8,2,7,-1,2,133,2,52,3,0,11,2,6,-72,3,0,3,2,134,0,1677656575,-166,0,4161266656,0,4071,0,15360,-4,0,28,-13,3,0,2,2,37,2,0,2,136,2,137,2,55,2,0,2,138,2,139,2,140,3,0,10,2,141,2,142,2,15,3,37,2,3,53,2,3,54,2,0,4294954999,2,0,-16,2,0,2,88,2,0,0,2105343,0,4160749584,0,65534,-42,0,4194303871,0,2011,-6,2,0,0,1073684479,0,17407,-11,2,0,2,31,-40,3,0,6,0,8323103,-1,3,0,2,2,42,-37,2,55,2,144,2,145,2,146,2,147,2,148,-105,2,24,-32,3,0,1334,2,9,-1,3,0,129,2,27,3,0,6,2,9,3,0,180,2,149,3,0,233,0,1,-96,3,0,16,2,9,-47,3,0,154,2,56,-22381,3,0,7,2,23,-6130,3,5,2,-1,0,69207040,3,44,2,3,0,14,2,57,2,58,-3,0,3168731136,0,4294956864,2,1,2,0,2,59,3,0,4,0,4294966275,3,0,4,2,16,2,60,2,0,2,33,-1,2,17,2,61,-1,2,0,2,56,0,4294885376,3,0,2,0,3145727,0,2617294944,0,4294770688,2,23,2,62,3,0,2,0,131135,2,95,0,70256639,0,71303167,0,272,2,40,2,56,-1,2,37,2,30,-1,2,96,2,63,0,4278255616,0,4294836227,0,4294549473,0,600178175,0,2952806400,0,268632067,0,4294543328,0,57540095,0,1577058304,0,1835008,0,4294688736,2,65,2,64,0,33554435,2,123,2,65,2,151,0,131075,0,3594373096,0,67094296,2,64,-1,0,4294828e3,0,603979263,2,160,0,3,0,4294828001,0,602930687,2,183,0,393219,0,4294828016,0,671088639,0,2154840064,0,4227858435,0,4236247008,2,66,2,36,-1,2,4,0,917503,2,36,-1,2,67,0,537788335,0,4026531935,-1,0,1,-1,2,32,2,68,0,7936,-3,2,0,0,2147485695,0,1010761728,0,4292984930,0,16387,2,0,2,14,2,15,3,0,10,2,69,2,0,2,70,2,71,2,72,2,0,2,73,2,0,2,11,-1,2,23,3,0,2,2,12,2,4,3,0,18,2,74,2,5,3,0,2,2,75,0,253951,3,19,2,0,122879,2,0,2,8,0,276824064,-2,3,0,2,2,40,2,0,0,4294903295,2,0,2,29,2,7,-1,2,17,2,49,2,0,2,76,2,41,-1,2,20,2,0,2,27,-2,0,128,-2,2,77,2,8,0,4064,-1,2,119,0,4227907585,2,0,2,118,2,0,2,48,2,173,2,9,2,38,2,10,-1,0,74440192,3,0,6,-2,3,0,8,2,12,2,0,2,78,2,9,2,0,2,79,2,80,2,81,-3,2,82,2,13,-3,2,83,2,84,2,85,2,0,2,33,-83,2,0,2,53,2,7,3,0,4,0,817183,2,0,2,14,2,0,0,33023,2,20,3,86,2,-17,2,87,0,524157950,2,4,2,0,2,88,2,4,2,0,2,15,2,77,2,16,3,0,2,2,47,2,0,-1,2,17,-16,3,0,206,-2,3,0,655,2,18,3,0,36,2,68,-1,2,17,2,9,3,0,8,2,89,0,3072,2,0,0,2147516415,2,9,3,0,2,2,23,2,90,2,91,3,0,2,2,92,2,0,2,93,2,94,0,4294965179,0,7,2,0,2,8,2,91,2,8,-1,0,1761345536,2,95,0,4294901823,2,36,2,18,2,96,2,34,2,166,0,2080440287,2,0,2,33,2,143,0,3296722943,2,0,0,1046675455,0,939524101,0,1837055,2,97,2,98,2,15,2,21,3,0,3,0,7,3,0,349,2,99,2,100,2,6,-264,3,0,11,2,22,3,0,2,2,31,-1,0,2700607615,2,101,2,102,3,0,2,2,19,2,103,3,0,10,2,9,2,17,2,0,2,45,2,0,2,30,2,104,-3,2,105,3,0,3,2,18,-1,3,5,2,2,26,2,0,2,7,2,106,-1,2,107,2,108,2,109,-1,3,0,3,2,11,-2,2,0,2,27,-8,2,18,2,0,2,35,-1,2,0,2,62,2,28,2,29,2,9,2,0,2,110,-1,3,0,4,2,9,2,17,2,111,2,6,2,0,2,112,2,0,2,48,-4,3,0,9,2,20,2,29,2,30,-4,2,113,2,114,2,29,2,20,2,7,-2,2,115,2,29,2,31,-2,2,0,2,116,-2,0,4277075969,2,29,-1,3,18,2,-1,2,32,2,117,2,0,3,29,2,2,34,2,19,-3,3,0,2,2,33,-1,2,0,2,34,2,0,2,34,2,0,2,48,-10,2,0,0,197631,-2,2,18,2,43,2,118,-2,2,17,2,117,2,20,2,119,2,51,-2,2,119,2,23,2,17,2,33,2,119,2,36,0,4294901904,0,4718591,2,119,2,34,0,335544350,-1,2,120,2,121,-2,2,122,2,38,2,7,-1,2,123,2,65,0,3758161920,0,3,-4,2,0,2,27,0,2147485568,0,3,2,0,2,23,0,176,-5,2,0,2,47,2,186,-1,2,0,2,23,2,197,-1,2,0,0,16779263,-2,2,11,-7,2,0,2,121,-3,3,0,2,2,124,2,125,0,2147549183,0,2,-2,2,126,2,35,0,10,0,4294965249,0,67633151,0,4026597376,2,0,0,536871935,-1,2,0,2,40,-8,2,54,2,47,0,1,2,127,2,23,-3,2,128,2,35,2,129,2,130,0,16778239,-10,2,34,-5,2,64,-2,3,0,28,2,31,-3,3,0,3,2,47,3,0,6,2,48,-85,3,0,33,2,47,-126,3,0,18,2,36,-269,3,0,17,2,40,2,7,-3,2,17,2,131,2,0,2,23,2,48,2,132,2,23,-21,3,0,2,-4,3,0,2,0,67583,-1,2,103,-2,0,11,3,0,191,2,51,3,0,38,2,29,-1,2,33,-279,3,0,8,2,7,-1,2,133,2,52,3,0,11,2,6,-72,3,0,3,2,134,2,135,-187,3,0,2,2,37,2,0,2,136,2,137,2,55,2,0,2,138,2,139,2,140,3,0,10,2,141,2,142,2,15,3,37,2,3,53,2,3,54,2,2,143,-73,2,0,0,1065361407,0,16384,-11,2,0,2,121,-40,3,0,6,2,117,-1,3,0,2,0,2063,-37,2,55,2,144,2,145,2,146,2,147,2,148,-138,3,0,1334,2,9,-1,3,0,129,2,27,3,0,6,2,9,3,0,180,2,149,3,0,233,0,1,-96,3,0,16,2,9,-47,3,0,154,2,56,-28517,2,0,0,1,-1,2,124,2,0,0,8193,-21,2,193,0,10255,0,4,-11,2,64,2,171,-1,0,71680,-1,2,161,0,4292900864,0,805306431,-5,2,150,-1,2,157,-1,0,6144,-2,2,127,-1,2,154,-1,0,2147532800,2,151,2,165,2,0,2,164,0,524032,0,4,-4,2,190,0,205128192,0,1333757536,0,2147483696,0,423953,0,747766272,0,2717763192,0,4286578751,0,278545,2,152,0,4294886464,0,33292336,0,417809,2,152,0,1327482464,0,4278190128,0,700594195,0,1006647527,0,4286497336,0,4160749631,2,153,0,469762560,0,4171219488,0,8323120,2,153,0,202375680,0,3214918176,0,4294508592,2,153,-1,0,983584,0,48,0,58720273,0,3489923072,0,10517376,0,4293066815,0,1,0,2013265920,2,177,2,0,0,2089,0,3221225552,0,201375904,2,0,-2,0,256,0,122880,0,16777216,2,150,0,4160757760,2,0,-6,2,167,-11,0,3263218176,-1,0,49664,0,2160197632,0,8388802,-1,0,12713984,-1,2,154,2,159,2,178,-2,2,162,-20,0,3758096385,-2,2,155,0,4292878336,2,90,2,169,0,4294057984,-2,2,163,2,156,2,175,-2,2,155,-1,2,182,-1,2,170,2,124,0,4026593280,0,14,0,4292919296,-1,2,158,0,939588608,-1,0,805306368,-1,2,124,0,1610612736,2,156,2,157,2,4,2,0,-2,2,158,2,159,-3,0,267386880,-1,2,160,0,7168,-1,0,65024,2,154,2,161,2,179,-7,2,168,-8,2,162,-1,0,1426112704,2,163,-1,2,164,0,271581216,0,2149777408,2,23,2,161,2,124,0,851967,2,180,-1,2,23,2,181,-4,2,158,-20,2,195,2,165,-56,0,3145728,2,185,-4,2,166,2,124,-4,0,32505856,-1,2,167,-1,0,2147385088,2,90,1,2155905152,2,-3,2,103,2,0,2,168,-2,2,169,-6,2,170,0,4026597375,0,1,-1,0,1,-1,2,171,-3,2,117,2,64,-2,2,166,-2,2,176,2,124,-878,2,159,-36,2,172,-1,2,201,-10,2,188,-5,2,174,-6,0,4294965251,2,27,-1,2,173,-1,2,174,-2,0,4227874752,-3,0,2146435072,2,159,-2,0,1006649344,2,124,-1,2,90,0,201375744,-3,0,134217720,2,90,0,4286677377,0,32896,-1,2,158,-3,2,175,-349,2,176,0,1920,2,177,3,0,264,-11,2,157,-2,2,178,2,0,0,520617856,0,2692743168,0,36,-3,0,524284,-11,2,23,-1,2,187,-1,2,184,0,3221291007,2,178,-1,2,202,0,2158720,-3,2,159,0,1,-4,2,124,0,3808625411,0,3489628288,2,200,0,1207959680,0,3221274624,2,0,-3,2,179,0,120,0,7340032,-2,2,180,2,4,2,23,2,163,3,0,4,2,159,-1,2,181,2,177,-1,0,8176,2,182,2,179,2,183,-1,0,4290773232,2,0,-4,2,163,2,189,0,15728640,2,177,-1,2,161,-1,0,4294934512,3,0,4,-9,2,90,2,170,2,184,3,0,4,0,704,0,1849688064,2,185,-1,2,124,0,4294901887,2,0,0,130547712,0,1879048192,2,199,3,0,2,-1,2,186,2,187,-1,0,17829776,0,2025848832,0,4261477888,-2,2,0,-1,0,4286580608,-1,0,29360128,2,192,0,16252928,0,3791388672,2,38,3,0,2,-2,2,196,2,0,-1,2,103,-1,0,66584576,-1,2,191,3,0,9,2,124,-1,0,4294755328,3,0,2,-1,2,161,2,178,3,0,2,2,23,2,188,2,90,-2,0,245760,0,2147418112,-1,2,150,2,203,0,4227923456,-1,2,164,2,161,2,90,-3,0,4292870145,0,262144,2,124,3,0,2,0,1073758848,2,189,-1,0,4227921920,2,190,0,68289024,0,528402016,0,4292927536,3,0,4,-2,0,268435456,2,91,-2,2,191,3,0,5,-1,2,192,2,163,2,0,-2,0,4227923936,2,62,-1,2,155,2,95,2,0,2,154,2,158,3,0,6,-1,2,177,3,0,3,-2,0,2146959360,0,9440640,0,104857600,0,4227923840,3,0,2,0,768,2,193,2,77,-2,2,161,-2,2,119,-1,2,155,3,0,8,0,512,0,8388608,2,194,2,172,2,187,0,4286578944,3,0,2,0,1152,0,1266679808,2,191,0,576,0,4261707776,2,95,3,0,9,2,155,3,0,5,2,16,-1,0,2147221504,-28,2,178,3,0,3,-3,0,4292902912,-6,2,96,3,0,85,-33,0,4294934528,3,0,126,-18,2,195,3,0,269,-17,2,155,2,124,2,198,3,0,2,2,23,0,4290822144,-2,0,67174336,0,520093700,2,17,3,0,21,-2,2,179,3,0,3,-2,0,30720,-1,0,32512,3,0,2,0,4294770656,-191,2,174,-38,2,170,2,0,2,196,3,0,279,-8,2,124,2,0,0,4294508543,0,65295,-11,2,177,3,0,72,-3,0,3758159872,0,201391616,3,0,155,-7,2,170,-1,0,384,-1,0,133693440,-3,2,196,-2,2,26,3,0,4,2,169,-2,2,90,2,155,3,0,4,-2,2,164,-1,2,150,0,335552923,2,197,-1,0,538974272,0,2214592512,0,132e3,-10,0,192,-8,0,12288,-21,0,134213632,0,4294901761,3,0,42,0,100663424,0,4294965284,3,0,6,-1,0,3221282816,2,198,3,0,11,-1,2,199,3,0,40,-6,0,4286578784,2,0,-2,0,1006694400,3,0,24,2,35,-1,2,94,3,0,2,0,1,2,163,3,0,6,2,197,0,4110942569,0,1432950139,0,2701658217,0,4026532864,0,4026532881,2,0,2,45,3,0,8,-1,2,158,-2,2,169,0,98304,0,65537,2,170,-5,0,4294950912,2,0,2,118,0,65528,2,177,0,4294770176,2,26,3,0,4,-30,2,174,0,3758153728,-3,2,169,-2,2,155,2,188,2,158,-1,2,191,-1,2,161,0,4294754304,3,0,2,-3,0,33554432,-2,2,200,-3,2,169,0,4175478784,2,201,0,4286643712,0,4286644216,2,0,-4,2,202,-1,2,165,0,4227923967,3,0,32,-1334,2,163,2,0,-129,2,94,-6,2,163,-180,2,203,-233,2,4,3,0,96,-16,2,163,3,0,47,-154,2,165,3,0,22381,-7,2,17,3,0,6128],[4294967295,4294967291,4092460543,4294828031,4294967294,134217726,268435455,2147483647,1048575,1073741823,3892314111,134217727,1061158911,536805376,4294910143,4160749567,4294901759,4294901760,536870911,262143,8388607,4294902783,4294918143,65535,67043328,2281701374,4294967232,2097151,4294903807,4194303,255,67108863,4294967039,511,524287,131071,127,4292870143,4294902271,4294549487,33554431,1023,67047423,4294901888,4286578687,4294770687,67043583,32767,15,2047999,67043343,16777215,4294902e3,4294934527,4294966783,4294967279,2047,262083,20511,4290772991,41943039,493567,4294959104,603979775,65536,602799615,805044223,4294965206,8191,1031749119,4294917631,2134769663,4286578493,4282253311,4294942719,33540095,4294905855,4294967264,2868854591,1608515583,265232348,534519807,2147614720,1060109444,4093640016,17376,2139062143,224,4169138175,4294909951,4286578688,4294967292,4294965759,2044,4292870144,4294966272,4294967280,8289918,4294934399,4294901775,4294965375,1602223615,4294967259,4294443008,268369920,4292804608,486341884,4294963199,3087007615,1073692671,4128527,4279238655,4294902015,4294966591,2445279231,3670015,3238002687,31,63,4294967288,4294705151,4095,3221208447,4294549472,2147483648,4285526655,4294966527,4294705152,4294966143,64,4294966719,16383,3774873592,458752,536807423,67043839,3758096383,3959414372,3755993023,2080374783,4294835295,4294967103,4160749565,4087,184024726,2862017156,1593309078,268434431,268434414,4294901763,536870912,2952790016,202506752,139264,402653184,4261412864,4227922944,49152,61440,3758096384,117440512,65280,3233808384,3221225472,2097152,4294965248,32768,57152,67108864,4293918720,4290772992,25165824,57344,4227915776,4278190080,4227907584,65520,4026531840,4227858432,4160749568,3758129152,4294836224,63488,1073741824,4294967040,4194304,251658240,196608,4294963200,64512,417808,4227923712,12582912,50331648,65472,4294967168,4294966784,16,4294917120,2080374784,4096,65408,524288,65532]);function h(u){return u.column++,u.currentChar=u.source.charCodeAt(++u.index)}function Xe(u,e){if((e&64512)!==55296)return 0;let n=u.source.charCodeAt(u.index+1);return(n&64512)!==56320?0:(e=u.currentChar=65536+((e&1023)<<10)+(n&1023),E2[(e>>>5)+0]>>>e&31&1||d(u,18,G(e)),u.index++,u.column++,1)}function p2(u,e){u.currentChar=u.source.charCodeAt(++u.index),u.flags|=1,e&4||(u.column=0,u.line++)}function c2(u){u.flags|=1,u.currentChar=u.source.charCodeAt(++u.index),u.column=0,u.line++}function ze(u){return u===160||u===65279||u===133||u===5760||u>=8192&&u<=8203||u===8239||u===8287||u===12288||u===8201||u===65519}function G(u){return u<=65535?String.fromCharCode(u):String.fromCharCode(u>>>10)+String.fromCharCode(u&1023)}function H(u){return u<65?u-48:u-65+10&15}function He(u){switch(u){case 134283266:return"NumericLiteral";case 134283267:return"StringLiteral";case 86021:case 86022:return"BooleanLiteral";case 86023:return"NullLiteral";case 65540:return"RegularExpression";case 67174408:case 67174409:case 132:return"TemplateLiteral";default:return(u&143360)===143360?"Identifier":(u&4096)===4096?"Keyword":"Punctuator"}}var L=[0,0,0,0,0,0,0,0,0,0,1032,0,0,2056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,3,0,0,8192,0,0,0,256,0,33024,0,0,242,242,114,114,114,114,114,114,594,594,0,0,16384,0,0,0,0,67,67,67,67,67,67,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,1,0,0,4099,0,71,71,71,71,71,71,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,16384,0,0,0,0],Ke=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Lu=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0];function Q2(u){return u<=127?Ke[u]:E2[(u>>>5)+34816]>>>u&31&1}function O2(u){return u<=127?Lu[u]:E2[(u>>>5)+0]>>>u&31&1||u===8204||u===8205}var Iu=["SingleLine","MultiLine","HTMLOpen","HTMLClose","HashbangComment"];function $e(u){let e=u.source;u.currentChar===35&&e.charCodeAt(u.index+1)===33&&(h(u),h(u),uu(u,e,0,4,u.tokenPos,u.linePos,u.colPos))}function Eu(u,e,n,t,i,o,l,f){return t&2048&&d(u,0),uu(u,e,n,i,o,l,f)}function uu(u,e,n,t,i,o,l){let{index:f}=u;for(u.tokenPos=u.index,u.linePos=u.line,u.colPos=u.column;u.index=u.source.length)return d(u,32)}let i=u.index-1,o=0,l=u.currentChar,{index:f}=u;for(;O2(l);){switch(l){case 103:o&2&&d(u,34,"g"),o|=2;break;case 105:o&1&&d(u,34,"i"),o|=1;break;case 109:o&4&&d(u,34,"m"),o|=4;break;case 117:o&16&&d(u,34,"u"),o|=16;break;case 121:o&8&&d(u,34,"y"),o|=8;break;case 115:o&32&&d(u,34,"s"),o|=32;break;case 100:o&64&&d(u,34,"d"),o|=64;break;default:d(u,33)}l=h(u)}let c=u.source.slice(f,u.index),a=u.source.slice(n,i);return u.tokenRegExp={pattern:a,flags:c},e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),u.tokenValue=Ye(u,a,c),65540}function Ye(u,e,n){try{return new RegExp(e,n)}catch{try{return new RegExp(e,n.replace("d","")),null}catch{d(u,32)}}}function Qe(u,e,n){let{index:t}=u,i="",o=h(u),l=u.index;for(;!(L[o]&8);){if(o===n)return i+=u.source.slice(l,u.index),h(u),e&512&&(u.tokenRaw=u.source.slice(t,u.index)),u.tokenValue=i,134283267;if((o&8)===8&&o===92){if(i+=u.source.slice(l,u.index),o=h(u),o<127||o===8232||o===8233){let f=Nu(u,e,o);f>=0?i+=G(f):Vu(u,f,0)}else i+=G(o);l=u.index+1}u.index>=u.end&&d(u,14),o=h(u)}d(u,14)}function Nu(u,e,n){switch(n){case 98:return 8;case 102:return 12;case 114:return 13;case 110:return 10;case 116:return 9;case 118:return 11;case 13:if(u.index1114111)return-5;return u.currentChar<1||u.currentChar!==125?-4:i}else{if(!(L[t]&64))return-4;let i=u.source.charCodeAt(u.index+1);if(!(L[i]&64))return-4;let o=u.source.charCodeAt(u.index+2);if(!(L[o]&64))return-4;let l=u.source.charCodeAt(u.index+3);return L[l]&64?(u.index+=3,u.column+=3,u.currentChar=u.source.charCodeAt(u.index),H(t)<<12|H(i)<<8|H(o)<<4|H(l)):-4}}case 56:case 57:if(!(e&256))return-3;default:return n}}function Vu(u,e,n){switch(e){case-1:return;case-2:d(u,n?2:1);case-3:d(u,13);case-4:d(u,6);case-5:d(u,102)}}function Ru(u,e){let{index:n}=u,t=67174409,i="",o=h(u);for(;o!==96;){if(o===36&&u.source.charCodeAt(u.index+1)===123){h(u),t=67174408;break}else if((o&8)===8&&o===92)if(o=h(u),o>126)i+=G(o);else{let l=Nu(u,e|1024,o);if(l>=0)i+=G(l);else if(l!==-1&&e&65536){i=void 0,o=Ze(u,o),o<0&&(t=67174408);break}else Vu(u,l,1)}else u.index=u.end&&d(u,15),o=h(u)}return h(u),u.tokenValue=i,u.tokenRaw=u.source.slice(n+1,u.index-(t===67174409?1:2)),t}function Ze(u,e){for(;e!==96;){switch(e){case 36:{let n=u.index+1;if(n=u.end&&d(u,15),e=h(u)}return e}function re(u,e){return u.index>=u.end&&d(u,0),u.index--,u.column--,Ru(u,e)}function wu(u,e,n){let t=u.currentChar,i=0,o=9,l=n&64?0:1,f=0,c=0;if(n&64)i="."+L2(u,t),t=u.currentChar,t===110&&d(u,11);else{if(t===48)if(t=h(u),(t|32)===120){for(n=136,t=h(u);L[t]&4160;){if(t===95){c||d(u,147),c=0,t=h(u);continue}c=1,i=i*16+H(t),f++,t=h(u)}(f===0||!c)&&d(u,f===0?19:148)}else if((t|32)===111){for(n=132,t=h(u);L[t]&4128;){if(t===95){c||d(u,147),c=0,t=h(u);continue}c=1,i=i*8+(t-48),f++,t=h(u)}(f===0||!c)&&d(u,f===0?0:148)}else if((t|32)===98){for(n=130,t=h(u);L[t]&4224;){if(t===95){c||d(u,147),c=0,t=h(u);continue}c=1,i=i*2+(t-48),f++,t=h(u)}(f===0||!c)&&d(u,f===0?0:148)}else if(L[t]&32)for(e&1024&&d(u,1),n=1;L[t]&16;){if(L[t]&512){n=32,l=0;break}i=i*8+(t-48),t=h(u)}else L[t]&512?(e&1024&&d(u,1),u.flags|=64,n=32):t===95&&d(u,0);if(n&48){if(l){for(;o>=0&&L[t]&4112;){if(t===95){t=h(u),(t===95||n&32)&&A2(u.index,u.line,u.index+1,147),c=1;continue}c=0,i=10*i+(t-48),t=h(u),--o}if(c&&A2(u.index,u.line,u.index+1,148),o>=0&&!Q2(t)&&t!==46)return u.tokenValue=i,e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),134283266}i+=L2(u,t),t=u.currentChar,t===46&&(h(u)===95&&d(u,0),n=64,i+="."+L2(u,u.currentChar),t=u.currentChar)}}let a=u.index,g=0;if(t===110&&n&128)g=1,t=h(u);else if((t|32)===101){t=h(u),L[t]&256&&(t=h(u));let{index:m}=u;L[t]&16||d(u,10),i+=u.source.substring(a,m)+L2(u,t),t=u.currentChar}return(u.index","(","{",".","...","}",")",";",",","[","]",":","?","'",'"',"","++","--","=","<<=",">>=",">>>=","**=","+=","-=","*=","/=","%=","^=","|=","&=","||=","&&=","??=","typeof","delete","void","!","~","+","-","in","instanceof","*","%","/","**","&&","||","===","!==","==","!=","<=",">=","<",">","<<",">>",">>>","&","|","^","var","let","const","break","case","catch","class","continue","debugger","default","do","else","export","extends","finally","for","function","if","import","new","return","super","switch","this","throw","try","while","with","implements","interface","package","private","protected","public","static","yield","as","async","await","constructor","get","set","from","of","enum","eval","arguments","escaped keyword","escaped future reserved keyword","reserved if strict","#","BigIntLiteral","??","?.","WhiteSpace","Illegal","LineTerminator","PrivateField","Template","@","target","meta","LineFeed","Escaped","JSXText"],Ou=Object.create(null,{this:{value:86113},function:{value:86106},if:{value:20571},return:{value:20574},var:{value:86090},else:{value:20565},for:{value:20569},new:{value:86109},in:{value:8738868},typeof:{value:16863277},while:{value:20580},case:{value:20558},break:{value:20557},try:{value:20579},catch:{value:20559},delete:{value:16863278},throw:{value:86114},switch:{value:86112},continue:{value:20561},default:{value:20563},instanceof:{value:8476725},do:{value:20564},void:{value:16863279},finally:{value:20568},async:{value:209007},await:{value:209008},class:{value:86096},const:{value:86092},constructor:{value:12401},debugger:{value:20562},export:{value:20566},extends:{value:20567},false:{value:86021},from:{value:12404},get:{value:12402},implements:{value:36966},import:{value:86108},interface:{value:36967},let:{value:241739},null:{value:86023},of:{value:274549},package:{value:36968},private:{value:36969},protected:{value:36970},public:{value:36971},set:{value:12403},static:{value:36972},super:{value:86111},true:{value:86022},with:{value:20581},yield:{value:241773},enum:{value:86134},eval:{value:537079927},as:{value:77934},arguments:{value:537079928},target:{value:143494},meta:{value:143495}});function Su(u,e,n){for(;Lu[h(u)];);return u.tokenValue=u.source.slice(u.tokenPos,u.index),u.currentChar!==92&&u.currentChar<=126?Ou[u.tokenValue]||208897:eu(u,e,0,n)}function Ge(u,e){let n=Uu(u);return O2(n)||d(u,4),u.tokenValue=G(n),eu(u,e,1,L[n]&4)}function eu(u,e,n,t){let i=u.index;for(;u.index=2&&o<=11){let l=Ou[u.tokenValue];return l===void 0?208897:n?l===209008?e&4196352?121:l:e&1024?l===36972||(l&36864)===36864?122:(l&20480)===20480?e&1073741824&&!(e&8192)?l:121:143483:e&1073741824&&!(e&8192)&&(l&20480)===20480?l:l===241773?e&1073741824?143483:e&2097152?121:l:l===209007?143483:(l&36864)===36864?l:121:l}return 208897}function xe(u){return Q2(h(u))||d(u,94),131}function Uu(u){return u.source.charCodeAt(u.index+1)!==117&&d(u,4),u.currentChar=u.source.charCodeAt(u.index+=2),pe(u)}function pe(u){let e=0,n=u.currentChar;if(n===123){let l=u.index-2;for(;L[h(u)]&64;)e=e<<4|H(u.currentChar),e>1114111&&A2(l,u.line,u.index+1,102);return u.currentChar!==125&&A2(l,u.line,u.index-1,6),h(u),e}L[n]&64||d(u,6);let t=u.source.charCodeAt(u.index+1);L[t]&64||d(u,6);let i=u.source.charCodeAt(u.index+2);L[i]&64||d(u,6);let o=u.source.charCodeAt(u.index+3);return L[o]&64||d(u,6),e=H(n)<<12|H(t)<<8|H(i)<<4|H(o),u.currentChar=u.source.charCodeAt(u.index+=4),e}var Mu=[129,129,129,129,129,129,129,129,129,128,136,128,128,130,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,129,128,16842800,134283267,131,208897,8457015,8455751,134283267,67174411,16,8457014,25233970,18,25233971,67108877,8457016,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,134283266,21,1074790417,8456258,1077936157,8456259,22,133,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,208897,69271571,137,20,8455497,208897,132,4096,4096,4096,4096,4096,4096,4096,208897,4096,208897,208897,4096,208897,4096,208897,4096,208897,4096,4096,4096,208897,4096,4096,208897,4096,4096,2162700,8455240,1074790415,16842801,129];function D(u,e){if(u.flags=(u.flags|1)^1,u.startPos=u.index,u.startColumn=u.column,u.startLine=u.line,u.token=Ju(u,e,0),u.onToken&&u.token!==1048576){let n={start:{line:u.linePos,column:u.colPos},end:{line:u.line,column:u.column}};u.onToken(He(u.token),u.tokenPos,u.index,n)}}function Ju(u,e,n){let t=u.index===0,i=u.source,o=u.index,l=u.line,f=u.column;for(;u.index=u.end)return 8457014;let s=u.currentChar;return s===61?(h(u),4194340):s!==42?8457014:h(u)!==61?8457273:(h(u),4194337)}case 8455497:return h(u)!==61?8455497:(h(u),4194343);case 25233970:{h(u);let s=u.currentChar;return s===43?(h(u),33619995):s===61?(h(u),4194338):25233970}case 25233971:{h(u);let s=u.currentChar;if(s===45){if(h(u),(n&1||t)&&u.currentChar===62){e&256||d(u,109),h(u),n=Eu(u,i,n,e,3,o,l,f),o=u.tokenPos,l=u.linePos,f=u.colPos;continue}return 33619996}return s===61?(h(u),4194339):25233971}case 8457016:{if(h(u),u.index=48&&m<=57)return wu(u,e,80);if(m===46){let s=u.index+1;if(s=48&&s<=57)))return h(u),67108991}return 22}}}else{if((c^8232)<=1){n=n&-5|1,c2(u);continue}if((c&64512)===55296||E2[(c>>>5)+34816]>>>c&31&1)return(c&64512)===56320&&(c=(c&1023)<<10|c&1023|65536,E2[(c>>>5)+0]>>>c&31&1||d(u,18,G(c)),u.index++,u.currentChar=c),u.column++,u.tokenValue="",eu(u,e,0,0);if(ze(c)){h(u);continue}d(u,18,G(c))}}return 1048576}function u1(u,e){return u.startPos=u.tokenPos=u.index,u.startColumn=u.colPos=u.column,u.startLine=u.linePos=u.line,u.token=L[u.currentChar]&8192?e1(u,e):Ju(u,e,0),u.token}function e1(u,e){let n=u.currentChar,t=h(u),i=u.index;for(;t!==n;)u.index>=u.end&&d(u,14),t=h(u);return t!==n&&d(u,14),u.tokenValue=u.source.slice(i,u.index),h(u),e&512&&(u.tokenRaw=u.source.slice(u.tokenPos,u.index)),134283267}function d2(u,e){if(u.startPos=u.tokenPos=u.index,u.startColumn=u.colPos=u.column,u.startLine=u.linePos=u.line,u.index>=u.end)return u.token=1048576;switch(Mu[u.source.charCodeAt(u.index)]){case 8456258:{h(u),u.currentChar===47?(h(u),u.token=25):u.token=8456258;break}case 2162700:{h(u),u.token=2162700;break}default:{let t=0;for(;u.index1&&i&32&&u.token&262144&&d(u,59,U[u.token&255]),l}function vu(u,e,n,t,i){let{token:o,tokenPos:l,linePos:f,colPos:c}=u,a=null,g=oe(u,e,n,t,i,l,f,c);return u.token===1077936157?(D(u,e|32768),a=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),(i&32||!(o&2097152))&&(u.token===274549||u.token===8738868&&(o&2097152||!(t&4)||e&1024))&&h2(l,u.line,u.index-3,58,u.token===274549?"of":"in")):(t&16||(o&2097152)>0)&&(u.token&262144)!==262144&&d(u,57,t&16?"const":"destructuring"),y(u,e,l,f,c,{type:"VariableDeclarator",id:g,init:a})}function F1(u,e,n,t,i,o,l){D(u,e);let f=((e&4194304)>0||(e&2048)>0&&(e&8192)>0)&&q(u,e,209008);P(u,e|32768,67174411),n&&(n=J(n,1));let c=null,a=null,g=0,m=null,s=u.token===86090||u.token===241739||u.token===86092,k,{token:C,tokenPos:b,linePos:E,colPos:w}=u;if(s?C===241739?(m=I(u,e,0),u.token&2240512?(u.token===8738868?e&1024&&d(u,65):m=y(u,e,b,E,w,{type:"VariableDeclaration",kind:"let",declarations:y2(u,e|134217728,n,8,32)}),u.assignable=1):e&1024?d(u,65):(s=!1,u.assignable=1,m=N(u,e,m,0,0,b,E,w),u.token===274549&&d(u,112))):(D(u,e),m=y(u,e,b,E,w,C===86090?{type:"VariableDeclaration",kind:"var",declarations:y2(u,e|134217728,n,4,32)}:{type:"VariableDeclaration",kind:"const",declarations:y2(u,e|134217728,n,16,32)}),u.assignable=1):C===1074790417?f&&d(u,80):(C&2097152)===2097152?(m=C===2162700?Y(u,e,void 0,1,0,0,2,32,b,E,w):_(u,e,void 0,1,0,0,2,32,b,E,w),g=u.destructible,e&256&&g&64&&d(u,61),u.assignable=g&16?2:1,m=N(u,e|134217728,m,0,0,u.tokenPos,u.linePos,u.colPos)):m=W(u,e|134217728,1,0,1,b,E,w),(u.token&262144)===262144){if(u.token===274549){u.assignable&2&&d(u,78,f?"await":"of"),r(u,m),D(u,e|32768),k=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),P(u,e|32768,16);let S=P2(u,e,n,t);return y(u,e,i,o,l,{type:"ForOfStatement",left:m,right:k,body:S,await:f})}u.assignable&2&&d(u,78,"in"),r(u,m),D(u,e|32768),f&&d(u,80),k=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos),P(u,e|32768,16);let M=P2(u,e,n,t);return y(u,e,i,o,l,{type:"ForInStatement",body:M,left:m,right:k})}f&&d(u,80),s||(g&8&&u.token!==1077936157&&d(u,78,"loop"),m=O(u,e|134217728,0,0,b,E,w,m)),u.token===18&&(m=e2(u,e,0,u.tokenPos,u.linePos,u.colPos,m)),P(u,e|32768,1074790417),u.token!==1074790417&&(c=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),P(u,e|32768,1074790417),u.token!==16&&(a=j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),P(u,e|32768,16);let v=P2(u,e,n,t);return y(u,e,i,o,l,{type:"ForStatement",init:m,test:c,update:a,body:v})}function _u(u,e,n){return iu(e,u.token)||d(u,115),(u.token&537079808)===537079808&&d(u,116),n&&t2(u,e,n,u.tokenValue,8,0),I(u,e,0)}function q1(u,e,n){let t=u.tokenPos,i=u.linePos,o=u.colPos;D(u,e);let l=null,{tokenPos:f,linePos:c,colPos:a}=u,g=[];if(u.token===134283267)l=X(u,e);else{if(u.token&143360){let m=_u(u,e,n);if(g=[y(u,e,f,c,a,{type:"ImportDefaultSpecifier",local:m})],q(u,e,18))switch(u.token){case 8457014:g.push(Tu(u,e,n));break;case 2162700:Fu(u,e,n,g);break;default:d(u,105)}}else switch(u.token){case 8457014:g=[Tu(u,e,n)];break;case 2162700:Fu(u,e,n,g);break;case 67174411:return Qu(u,e,t,i,o);case 67108877:return Yu(u,e,t,i,o);default:d(u,28,U[u.token&255])}l=L1(u,e)}return z(u,e|32768),y(u,e,t,i,o,{type:"ImportDeclaration",specifiers:g,source:l})}function Tu(u,e,n){let{tokenPos:t,linePos:i,colPos:o}=u;return D(u,e),P(u,e,77934),(u.token&134217728)===134217728&&h2(t,u.line,u.index,28,U[u.token&255]),y(u,e,t,i,o,{type:"ImportNamespaceSpecifier",local:_u(u,e,n)})}function L1(u,e){return q(u,e,12404),u.token!==134283267&&d(u,103,"Import"),X(u,e)}function Fu(u,e,n,t){for(D(u,e);u.token&143360;){let{token:i,tokenValue:o,tokenPos:l,linePos:f,colPos:c}=u,a=I(u,e,0),g;q(u,e,77934)?((u.token&134217728)===134217728||u.token===18?d(u,104):U2(u,e,16,u.token,0),o=u.tokenValue,g=I(u,e,0)):(U2(u,e,16,i,0),g=a),n&&t2(u,e,n,o,8,0),t.push(y(u,e,l,f,c,{type:"ImportSpecifier",local:g,imported:a})),u.token!==1074790415&&P(u,e,18)}return P(u,e,1074790415),t}function Yu(u,e,n,t,i){let o=ru(u,e,y(u,e,n,t,i,{type:"Identifier",name:"import"}),n,t,i);return o=N(u,e,o,0,0,n,t,i),o=O(u,e,0,0,n,t,i,o),D2(u,e,o,n,t,i)}function Qu(u,e,n,t,i){let o=Gu(u,e,0,n,t,i);return o=N(u,e,o,0,0,n,t,i),u.token===18&&(o=e2(u,e,0,n,t,i,o)),D2(u,e,o,n,t,i)}function I1(u,e,n){let t=u.tokenPos,i=u.linePos,o=u.colPos;D(u,e|32768);let l=[],f=null,c=null,a;if(q(u,e|32768,20563)){switch(u.token){case 86106:{f=i2(u,e,n,4,1,1,0,u.tokenPos,u.linePos,u.colPos);break}case 133:case 86096:f=x2(u,e,n,1,u.tokenPos,u.linePos,u.colPos);break;case 209007:let{tokenPos:g,linePos:m,colPos:s}=u;f=I(u,e,0);let{flags:k}=u;k&1||(u.token===86106?f=i2(u,e,n,4,1,1,1,g,m,s):u.token===67174411?(f=au(u,e,f,1,1,0,k,g,m,s),f=N(u,e,f,0,0,g,m,s),f=O(u,e,0,0,g,m,s,f)):u.token&143360&&(n&&(n=z2(u,e,u.tokenValue)),f=I(u,e,0),f=v2(u,e,n,[f],1,g,m,s)));break;default:f=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos),z(u,e|32768)}return n&&l2(u,"default"),y(u,e,t,i,o,{type:"ExportDefaultDeclaration",declaration:f})}switch(u.token){case 8457014:{D(u,e);let k=null;return q(u,e,77934)&&(n&&l2(u,u.tokenValue),k=I(u,e,0)),P(u,e,12404),u.token!==134283267&&d(u,103,"Export"),c=X(u,e),z(u,e|32768),y(u,e,t,i,o,{type:"ExportAllDeclaration",source:c,exported:k})}case 2162700:{D(u,e);let k=[],C=[];for(;u.token&143360;){let{tokenPos:b,tokenValue:E,linePos:w,colPos:v}=u,M=I(u,e,0),S;u.token===77934?(D(u,e),(u.token&134217728)===134217728&&d(u,104),n&&(k.push(u.tokenValue),C.push(E)),S=I(u,e,0)):(n&&(k.push(u.tokenValue),C.push(u.tokenValue)),S=M),l.push(y(u,e,b,w,v,{type:"ExportSpecifier",local:M,exported:S})),u.token!==1074790415&&P(u,e,18)}if(P(u,e,1074790415),q(u,e,12404))u.token!==134283267&&d(u,103,"Export"),c=X(u,e);else if(n){let b=0,E=k.length;for(;b0)&8738868,g,m;for(u.assignable=2;u.token&8454144&&(g=u.token,m=g&3840,(g&524288&&f&268435456||f&524288&&g&268435456)&&d(u,160),!(m+((g===8457273)<<8)-((a===g)<<12)<=l));)D(u,e|32768),c=y(u,e,t,i,o,{type:g&524288||g&268435456?"LogicalExpression":"BinaryExpression",left:c,right:n2(u,e,n,u.tokenPos,u.linePos,u.colPos,m,g,W(u,e,0,n,1,u.tokenPos,u.linePos,u.colPos)),operator:U[g&255]});return u.token===1077936157&&d(u,24),c}function N1(u,e,n,t,i,o,l){n||d(u,0);let f=u.token;D(u,e|32768);let c=W(u,e,0,l,1,u.tokenPos,u.linePos,u.colPos);return u.token===8457273&&d(u,31),e&1024&&f===16863278&&(c.type==="Identifier"?d(u,118):n1(c)&&d(u,124)),u.assignable=2,y(u,e,t,i,o,{type:"UnaryExpression",operator:U[f&255],argument:c,prefix:!0})}function V1(u,e,n,t,i,o,l,f,c,a){let{token:g}=u,m=I(u,e,o),{flags:s}=u;if(!(s&1)){if(u.token===86106)return pu(u,e,1,n,f,c,a);if((u.token&143360)===143360)return t||d(u,0),ne(u,e,i,f,c,a)}return!l&&u.token===67174411?au(u,e,m,i,1,0,s,f,c,a):u.token===10?(tu(u,e,g,1),l&&d(u,49),K2(u,e,u.tokenValue,m,l,i,0,f,c,a)):m}function R1(u,e,n,t,i,o,l){if(n&&(u.destructible|=256),e&2097152){D(u,e|32768),e&8388608&&d(u,30),t||d(u,24),u.token===22&&d(u,121);let f=null,c=!1;return u.flags&1||(c=q(u,e|32768,8457014),(u.token&77824||c)&&(f=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos))),u.assignable=2,y(u,e,i,o,l,{type:"YieldExpression",argument:f,delegate:c})}return e&1024&&d(u,95,"yield"),su(u,e,i,o,l)}function O1(u,e,n,t,i,o,l){if(t&&(u.destructible|=128),e&4194304||e&2048&&e&8192){n&&d(u,0),e&8388608&&h2(u.index,u.line,u.index,29),D(u,e|32768);let f=W(u,e,0,0,1,u.tokenPos,u.linePos,u.colPos);return u.token===8457273&&d(u,31),u.assignable=2,y(u,e,i,o,l,{type:"AwaitExpression",argument:f})}return e&2048&&d(u,96),su(u,e,i,o,l)}function H2(u,e,n,t,i,o){let{tokenPos:l,linePos:f,colPos:c}=u;P(u,e|32768,2162700);let a=[],g=e;if(u.token!==1074790415){for(;u.token===134283267;){let{index:m,tokenPos:s,tokenValue:k,token:C}=u,b=X(u,e);ju(u,m,s,k)&&(e|=1024,u.flags&128&&h2(u.index,u.line,u.tokenPos,64),u.flags&64&&h2(u.index,u.line,u.tokenPos,8)),a.push(lu(u,e,b,C,s,u.linePos,u.colPos))}e&1024&&(i&&((i&537079808)===537079808&&d(u,116),(i&36864)===36864&&d(u,38)),u.flags&512&&d(u,116),u.flags&256&&d(u,115)),e&64&&n&&o!==void 0&&!(g&1024)&&!(e&8192)&&X2(o)}for(u.flags=(u.flags|512|256|64)^832,u.destructible=(u.destructible|256)^256;u.token!==1074790415;)a.push(S2(u,e,n,4,{}));return P(u,t&24?e|32768:e,1074790415),u.flags&=-193,u.token===1077936157&&d(u,24),y(u,e,l,f,c,{type:"BlockStatement",body:a})}function U1(u,e,n,t,i){switch(D(u,e),u.token){case 67108991:d(u,162);case 67174411:{e&524288||d(u,26),e&16384&&d(u,27),u.assignable=2;break}case 69271571:case 67108877:{e&262144||d(u,27),e&16384&&d(u,27),u.assignable=1;break}default:d(u,28,"super")}return y(u,e,n,t,i,{type:"Super"})}function W(u,e,n,t,i,o,l,f){let c=K(u,e,2,0,n,0,t,i,o,l,f);return N(u,e,c,t,0,o,l,f)}function M1(u,e,n,t,i,o){u.assignable&2&&d(u,53);let{token:l}=u;return D(u,e),u.assignable=2,y(u,e,t,i,o,{type:"UpdateExpression",argument:n,operator:U[l&255],prefix:!1})}function N(u,e,n,t,i,o,l,f){if((u.token&33619968)===33619968&&!(u.flags&1))n=M1(u,e,n,o,l,f);else if((u.token&67108864)===67108864){switch(e=(e|134217728)^134217728,u.token){case 67108877:{D(u,(e|1073741824|8192)^8192),u.assignable=1;let c=Zu(u,e);n=y(u,e,o,l,f,{type:"MemberExpression",object:n,computed:!1,property:c});break}case 69271571:{let c=!1;(u.flags&2048)===2048&&(c=!0,u.flags=(u.flags|2048)^2048),D(u,e|32768);let{tokenPos:a,linePos:g,colPos:m}=u,s=j(u,e,t,1,a,g,m);P(u,e,20),u.assignable=1,n=y(u,e,o,l,f,{type:"MemberExpression",object:n,computed:!0,property:s}),c&&(u.flags|=2048);break}case 67174411:{if((u.flags&1024)===1024)return u.flags=(u.flags|1024)^1024,n;let c=!1;(u.flags&2048)===2048&&(c=!0,u.flags=(u.flags|2048)^2048);let a=du(u,e,t);u.assignable=2,n=y(u,e,o,l,f,{type:"CallExpression",callee:n,arguments:a}),c&&(u.flags|=2048);break}case 67108991:{D(u,(e|1073741824|8192)^8192),u.flags|=2048,u.assignable=2,n=J1(u,e,n,o,l,f);break}default:(u.flags&2048)===2048&&d(u,161),u.assignable=2,n=y(u,e,o,l,f,{type:"TaggedTemplateExpression",tag:n,quasi:u.token===67174408?cu(u,e|65536):fu(u,e,u.tokenPos,u.linePos,u.colPos)})}n=N(u,e,n,0,1,o,l,f)}return i===0&&(u.flags&2048)===2048&&(u.flags=(u.flags|2048)^2048,n=y(u,e,o,l,f,{type:"ChainExpression",expression:n})),n}function J1(u,e,n,t,i,o){let l=!1,f;if((u.token===69271571||u.token===67174411)&&(u.flags&2048)===2048&&(l=!0,u.flags=(u.flags|2048)^2048),u.token===69271571){D(u,e|32768);let{tokenPos:c,linePos:a,colPos:g}=u,m=j(u,e,0,1,c,a,g);P(u,e,20),u.assignable=2,f=y(u,e,t,i,o,{type:"MemberExpression",object:n,computed:!0,optional:!0,property:m})}else if(u.token===67174411){let c=du(u,e,0);u.assignable=2,f=y(u,e,t,i,o,{type:"CallExpression",callee:n,arguments:c,optional:!0})}else{u.token&143360||d(u,155);let c=I(u,e,0);u.assignable=2,f=y(u,e,t,i,o,{type:"MemberExpression",object:n,computed:!1,optional:!0,property:c})}return l&&(u.flags|=2048),f}function Zu(u,e){return!(u.token&143360)&&u.token!==131&&d(u,155),e&1&&u.token===131?j2(u,e,u.tokenPos,u.linePos,u.colPos):I(u,e,0)}function j1(u,e,n,t,i,o,l){n&&d(u,54),t||d(u,0);let{token:f}=u;D(u,e|32768);let c=W(u,e,0,0,1,u.tokenPos,u.linePos,u.colPos);return u.assignable&2&&d(u,53),u.assignable=2,y(u,e,i,o,l,{type:"UpdateExpression",argument:c,operator:U[f&255],prefix:!0})}function K(u,e,n,t,i,o,l,f,c,a,g){if((u.token&143360)===143360){switch(u.token){case 209008:return O1(u,e,t,l,c,a,g);case 241773:return R1(u,e,l,i,c,a,g);case 209007:return V1(u,e,l,f,i,o,t,c,a,g)}let{token:m,tokenValue:s}=u,k=I(u,e|65536,o);return u.token===10?(f||d(u,0),tu(u,e,m,1),K2(u,e,s,k,t,i,0,c,a,g)):(e&16384&&m===537079928&&d(u,127),m===241739&&(e&1024&&d(u,110),n&24&&d(u,98)),u.assignable=e&1024&&(m&537079808)===537079808?2:1,k)}if((u.token&134217728)===134217728)return X(u,e);switch(u.token){case 33619995:case 33619996:return j1(u,e,t,f,c,a,g);case 16863278:case 16842800:case 16842801:case 25233970:case 25233971:case 16863277:case 16863279:return N1(u,e,f,c,a,g,l);case 86106:return pu(u,e,0,l,c,a,g);case 2162700:return W1(u,e,i?0:1,l,c,a,g);case 69271571:return $1(u,e,i?0:1,l,c,a,g);case 67174411:return Y1(u,e,i,1,0,c,a,g);case 86021:case 86022:case 86023:return H1(u,e,c,a,g);case 86113:return K1(u,e);case 65540:return r1(u,e,c,a,g);case 133:case 86096:return G1(u,e,l,c,a,g);case 86111:return U1(u,e,c,a,g);case 67174409:return fu(u,e,c,a,g);case 67174408:return cu(u,e);case 86109:return Q1(u,e,l,c,a,g);case 134283389:return xu(u,e,c,a,g);case 131:return j2(u,e,c,a,g);case 86108:return X1(u,e,t,l,c,a,g);case 8456258:if(e&16)return gu(u,e,1,c,a,g);default:if(iu(e,u.token))return su(u,e,c,a,g);d(u,28,U[u.token&255])}}function X1(u,e,n,t,i,o,l){let f=I(u,e,0);return u.token===67108877?ru(u,e,f,i,o,l):(n&&d(u,138),f=Gu(u,e,t,i,o,l),u.assignable=2,N(u,e,f,t,0,i,o,l))}function ru(u,e,n,t,i,o){return e&2048||d(u,164),D(u,e),u.token!==143495&&u.tokenValue!=="meta"&&d(u,28,U[u.token&255]),u.assignable=2,y(u,e,t,i,o,{type:"MetaProperty",meta:n,property:I(u,e,0)})}function Gu(u,e,n,t,i,o){P(u,e|32768,67174411),u.token===14&&d(u,139);let l=R(u,e,1,0,n,u.tokenPos,u.linePos,u.colPos);return P(u,e,16),y(u,e,t,i,o,{type:"ImportExpression",source:l})}function xu(u,e,n,t,i){let{tokenRaw:o,tokenValue:l}=u;return D(u,e),u.assignable=2,y(u,e,n,t,i,e&512?{type:"Literal",value:l,bigint:o.slice(0,-1),raw:o}:{type:"Literal",value:l,bigint:o.slice(0,-1)})}function fu(u,e,n,t,i){u.assignable=2;let{tokenValue:o,tokenRaw:l,tokenPos:f,linePos:c,colPos:a}=u;P(u,e,67174409);let g=[V2(u,e,o,l,f,c,a,!0)];return y(u,e,n,t,i,{type:"TemplateLiteral",expressions:[],quasis:g})}function cu(u,e){e=(e|134217728)^134217728;let{tokenValue:n,tokenRaw:t,tokenPos:i,linePos:o,colPos:l}=u;P(u,e|32768,67174408);let f=[V2(u,e,n,t,i,o,l,!1)],c=[j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)];for(u.token!==1074790415&&d(u,81);(u.token=re(u,e))!==67174409;){let{tokenValue:a,tokenRaw:g,tokenPos:m,linePos:s,colPos:k}=u;P(u,e|32768,67174408),f.push(V2(u,e,a,g,m,s,k,!1)),c.push(j(u,e,0,1,u.tokenPos,u.linePos,u.colPos)),u.token!==1074790415&&d(u,81)}{let{tokenValue:a,tokenRaw:g,tokenPos:m,linePos:s,colPos:k}=u;P(u,e,67174409),f.push(V2(u,e,a,g,m,s,k,!0))}return y(u,e,i,o,l,{type:"TemplateLiteral",expressions:c,quasis:f})}function V2(u,e,n,t,i,o,l,f){let c=y(u,e,i,o,l,{type:"TemplateElement",value:{cooked:n,raw:t},tail:f}),a=f?1:2;return e&2&&(c.start+=1,c.range[0]+=1,c.end-=a,c.range[1]-=a),e&4&&(c.loc.start.column+=1,c.loc.end.column-=a),c}function z1(u,e,n,t,i){e=(e|134217728)^134217728,P(u,e|32768,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return u.assignable=1,y(u,e,n,t,i,{type:"SpreadElement",argument:o})}function du(u,e,n){D(u,e|32768);let t=[];if(u.token===16)return D(u,e),t;for(;u.token!==16&&(u.token===14?t.push(z1(u,e,u.tokenPos,u.linePos,u.colPos)):t.push(R(u,e,1,0,n,u.tokenPos,u.linePos,u.colPos)),!(u.token!==18||(D(u,e|32768),u.token===16))););return P(u,e,16),t}function I(u,e,n){let{tokenValue:t,tokenPos:i,linePos:o,colPos:l}=u;return D(u,e),y(u,e,i,o,l,e&268435456?{type:"Identifier",name:t,pattern:n===1}:{type:"Identifier",name:t})}function X(u,e){let{tokenValue:n,tokenRaw:t,tokenPos:i,linePos:o,colPos:l}=u;return u.token===134283389?xu(u,e,i,o,l):(D(u,e),u.assignable=2,y(u,e,i,o,l,e&512?{type:"Literal",value:n,raw:t}:{type:"Literal",value:n}))}function H1(u,e,n,t,i){let o=U[u.token&255],l=u.token===86023?null:o==="true";return D(u,e),u.assignable=2,y(u,e,n,t,i,e&512?{type:"Literal",value:l,raw:o}:{type:"Literal",value:l})}function K1(u,e){let{tokenPos:n,linePos:t,colPos:i}=u;return D(u,e),u.assignable=2,y(u,e,n,t,i,{type:"ThisExpression"})}function i2(u,e,n,t,i,o,l,f,c,a){D(u,e|32768);let g=i?nu(u,e,8457014):0,m=null,s,k=n?s2():void 0;if(u.token===67174411)o&1||d(u,37,"Function");else{let E=t&4&&(!(e&8192)||!(e&2048))?4:64;Xu(u,e|(e&3072)<<11,u.token),n&&(E&4?Ku(u,e,n,u.tokenValue,E):t2(u,e,n,u.tokenValue,E,t),k=J(k,256),o&&o&2&&l2(u,u.tokenValue)),s=u.token,u.token&143360?m=I(u,e,0):d(u,28,U[u.token&255])}e=(e|32243712)^32243712|67108864|l*2+g<<21|(g?0:1073741824),n&&(k=J(k,512));let C=ee(u,e|8388608,k,0,1),b=H2(u,(e|8192|4096|131072)^143360,n?J(k,128):k,8,s,n?k.scopeError:void 0);return y(u,e,f,c,a,{type:"FunctionDeclaration",id:m,params:C,body:b,async:l===1,generator:g===1})}function pu(u,e,n,t,i,o,l){D(u,e|32768);let f=nu(u,e,8457014),c=n*2+f<<21,a=null,g,m=e&64?s2():void 0;(u.token&176128)>0&&(Xu(u,(e|32243712)^32243712|c,u.token),m&&(m=J(m,256)),g=u.token,a=I(u,e,0)),e=(e|32243712)^32243712|67108864|c|(f?0:1073741824),m&&(m=J(m,512));let s=ee(u,e|8388608,m,t,1),k=H2(u,e&-134377473,m&&J(m,128),0,g,void 0);return u.assignable=2,y(u,e,i,o,l,{type:"FunctionExpression",id:a,params:s,body:k,async:n===1,generator:f===1})}function $1(u,e,n,t,i,o,l){let f=_(u,e,void 0,n,t,0,2,0,i,o,l);return e&256&&u.destructible&64&&d(u,61),u.destructible&8&&d(u,60),f}function _(u,e,n,t,i,o,l,f,c,a,g){D(u,e|32768);let m=[],s=0;for(e=(e|134217728)^134217728;u.token!==20;)if(q(u,e|32768,18))m.push(null);else{let C,{token:b,tokenPos:E,linePos:w,colPos:v,tokenValue:M}=u;if(b&143360)if(C=K(u,e,l,0,1,0,i,1,E,w,v),u.token===1077936157){u.assignable&2&&d(u,24),D(u,e|32768),n&&u2(u,e,n,M,l,f);let S=R(u,e,1,1,i,u.tokenPos,u.linePos,u.colPos);C=y(u,e,E,w,v,o?{type:"AssignmentPattern",left:C,right:S}:{type:"AssignmentExpression",operator:"=",left:C,right:S}),s|=u.destructible&256?256:0|u.destructible&128?128:0}else u.token===18||u.token===20?(u.assignable&2?s|=16:n&&u2(u,e,n,M,l,f),s|=u.destructible&256?256:0|u.destructible&128?128:0):(s|=l&1?32:l&2?0:16,C=N(u,e,C,i,0,E,w,v),u.token!==18&&u.token!==20?(u.token!==1077936157&&(s|=16),C=O(u,e,i,o,E,w,v,C)):u.token!==1077936157&&(s|=u.assignable&2?16:32));else b&2097152?(C=u.token===2162700?Y(u,e,n,0,i,o,l,f,E,w,v):_(u,e,n,0,i,o,l,f,E,w,v),s|=u.destructible,u.assignable=u.destructible&16?2:1,u.token===18||u.token===20?u.assignable&2&&(s|=16):u.destructible&8?d(u,69):(C=N(u,e,C,i,0,E,w,v),s=u.assignable&2?16:0,u.token!==18&&u.token!==20?C=O(u,e,i,o,E,w,v,C):u.token!==1077936157&&(s|=u.assignable&2?16:32))):b===14?(C=b2(u,e,n,20,l,f,0,i,o,E,w,v),s|=u.destructible,u.token!==18&&u.token!==20&&d(u,28,U[u.token&255])):(C=W(u,e,1,0,1,E,w,v),u.token!==18&&u.token!==20?(C=O(u,e,i,o,E,w,v,C),!(l&3)&&b===67174411&&(s|=16)):u.assignable&2?s|=16:b===67174411&&(s|=u.assignable&1&&l&3?32:16));if(m.push(C),q(u,e|32768,18)){if(u.token===20)break}else break}P(u,e,20);let k=y(u,e,c,a,g,{type:o?"ArrayPattern":"ArrayExpression",elements:m});return!t&&u.token&4194304?ue(u,e,s,i,o,c,a,g,k):(u.destructible=s,k)}function ue(u,e,n,t,i,o,l,f,c){u.token!==1077936157&&d(u,24),D(u,e|32768),n&16&&d(u,24),i||r(u,c);let{tokenPos:a,linePos:g,colPos:m}=u,s=R(u,e,1,1,t,a,g,m);return u.destructible=(n|64|8)^72|(u.destructible&128?128:0)|(u.destructible&256?256:0),y(u,e,o,l,f,i?{type:"AssignmentPattern",left:c,right:s}:{type:"AssignmentExpression",left:c,operator:"=",right:s})}function b2(u,e,n,t,i,o,l,f,c,a,g,m){D(u,e|32768);let s=null,k=0,{token:C,tokenValue:b,tokenPos:E,linePos:w,colPos:v}=u;if(C&143360)u.assignable=1,s=K(u,e,i,0,1,0,f,1,E,w,v),C=u.token,s=N(u,e,s,f,0,E,w,v),u.token!==18&&u.token!==t&&(u.assignable&2&&u.token===1077936157&&d(u,69),k|=16,s=O(u,e,f,c,E,w,v,s)),u.assignable&2?k|=16:C===t||C===18?n&&u2(u,e,n,b,i,o):k|=32,k|=u.destructible&128?128:0;else if(C===t)d(u,39);else if(C&2097152)s=u.token===2162700?Y(u,e,n,1,f,c,i,o,E,w,v):_(u,e,n,1,f,c,i,o,E,w,v),C=u.token,C!==1077936157&&C!==t&&C!==18?(u.destructible&8&&d(u,69),s=N(u,e,s,f,0,E,w,v),k|=u.assignable&2?16:0,(u.token&4194304)===4194304?(u.token!==1077936157&&(k|=16),s=O(u,e,f,c,E,w,v,s)):((u.token&8454144)===8454144&&(s=n2(u,e,1,E,w,v,4,C,s)),q(u,e|32768,22)&&(s=f2(u,e,s,E,w,v)),k|=u.assignable&2?16:32)):k|=t===1074790415&&C!==1077936157?16:u.destructible;else{k|=32,s=W(u,e,1,f,1,u.tokenPos,u.linePos,u.colPos);let{token:M,tokenPos:S,linePos:V,colPos:A}=u;return M===1077936157&&M!==t&&M!==18?(u.assignable&2&&d(u,24),s=O(u,e,f,c,S,V,A,s),k|=16):(M===18?k|=16:M!==t&&(s=O(u,e,f,c,S,V,A,s)),k|=u.assignable&1?32:16),u.destructible=k,u.token!==t&&u.token!==18&&d(u,156),y(u,e,a,g,m,{type:c?"RestElement":"SpreadElement",argument:s})}if(u.token!==t)if(i&1&&(k|=l?16:32),q(u,e|32768,1077936157)){k&16&&d(u,24),r(u,s);let M=R(u,e,1,1,f,u.tokenPos,u.linePos,u.colPos);s=y(u,e,E,w,v,c?{type:"AssignmentPattern",left:s,right:M}:{type:"AssignmentExpression",left:s,operator:"=",right:M}),k=16}else k|=16;return u.destructible=k,y(u,e,a,g,m,{type:c?"RestElement":"SpreadElement",argument:s})}function Z(u,e,n,t,i,o,l){let f=n&64?14680064:31981568;e=(e|f)^f|(n&88)<<18|100925440;let c=e&64?J(s2(),512):void 0,a=_1(u,e|8388608,c,n,1,t);c&&(c=J(c,128));let g=H2(u,e&-134230017,c,0,void 0,void 0);return y(u,e,i,o,l,{type:"FunctionExpression",params:a,body:g,async:(n&16)>0,generator:(n&8)>0,id:null})}function W1(u,e,n,t,i,o,l){let f=Y(u,e,void 0,n,t,0,2,0,i,o,l);return e&256&&u.destructible&64&&d(u,61),u.destructible&8&&d(u,60),f}function Y(u,e,n,t,i,o,l,f,c,a,g){D(u,e);let m=[],s=0,k=0;for(e=(e|134217728)^134217728;u.token!==1074790415;){let{token:b,tokenValue:E,linePos:w,colPos:v,tokenPos:M}=u;if(b===14)m.push(b2(u,e,n,1074790415,l,f,0,i,o,M,w,v));else{let S=0,V=null,A,Q=u.token;if(u.token&143360||u.token===121)if(V=I(u,e,0),u.token===18||u.token===1074790415||u.token===1077936157)if(S|=4,e&1024&&(b&537079808)===537079808?s|=16:U2(u,e,l,b,0),n&&u2(u,e,n,E,l,f),q(u,e|32768,1077936157)){s|=8;let B=R(u,e,1,1,i,u.tokenPos,u.linePos,u.colPos);s|=u.destructible&256?256:0|u.destructible&128?128:0,A=y(u,e,M,w,v,{type:"AssignmentPattern",left:e&-2147483648?Object.assign({},V):V,right:B})}else s|=(b===209008?128:0)|(b===121?16:0),A=e&-2147483648?Object.assign({},V):V;else if(q(u,e|32768,21)){let{tokenPos:B,linePos:F,colPos:T}=u;if(E==="__proto__"&&k++,u.token&143360){let o2=u.token,m2=u.tokenValue;s|=Q===121?16:0,A=K(u,e,l,0,1,0,i,1,B,F,T);let{token:x}=u;A=N(u,e,A,i,0,B,F,T),u.token===18||u.token===1074790415?x===1077936157||x===1074790415||x===18?(s|=u.destructible&128?128:0,u.assignable&2?s|=16:n&&(o2&143360)===143360&&u2(u,e,n,m2,l,f)):s|=u.assignable&1?32:16:(u.token&4194304)===4194304?(u.assignable&2?s|=16:x!==1077936157?s|=32:n&&u2(u,e,n,m2,l,f),A=O(u,e,i,o,B,F,T,A)):(s|=16,(u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,x,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,i,o,l,f,B,F,T):Y(u,e,n,0,i,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):u.destructible&8?d(u,69):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&2?16:0,(u.token&4194304)===4194304?A=I2(u,e,i,o,B,F,T,A):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,i,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&2?16:0,u.token!==18&&b!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,i,o,B,F,T,A))))}else u.token===69271571?(s|=16,b===209007&&(S|=16),S|=(b===12402?256:b===12403?512:1)|2,V=g2(u,e,i),s|=u.assignable,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):u.token&143360?(s|=16,b===121&&d(u,93),b===209007&&(u.flags&1&&d(u,129),S|=16),V=I(u,e,0),S|=b===12402?256:b===12403?512:1,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):u.token===67174411?(s|=16,S|=1,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):u.token===8457014?(s|=16,b===12402?d(u,40):b===12403?d(u,41):b===143483&&d(u,93),D(u,e),S|=9|(b===209007?16:0),u.token&143360?V=I(u,e,0):(u.token&134217728)===134217728?V=X(u,e):u.token===69271571?(S|=2,V=g2(u,e,i),s|=u.assignable):d(u,28,U[u.token&255]),A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):(u.token&134217728)===134217728?(b===209007&&(S|=16),S|=b===12402?256:b===12403?512:1,s|=16,V=X(u,e),A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):d(u,130);else if((u.token&134217728)===134217728)if(V=X(u,e),u.token===21){P(u,e|32768,21);let{tokenPos:B,linePos:F,colPos:T}=u;if(E==="__proto__"&&k++,u.token&143360){A=K(u,e,l,0,1,0,i,1,B,F,T);let{token:o2,tokenValue:m2}=u;A=N(u,e,A,i,0,B,F,T),u.token===18||u.token===1074790415?o2===1077936157||o2===1074790415||o2===18?u.assignable&2?s|=16:n&&u2(u,e,n,m2,l,f):s|=u.assignable&1?32:16:u.token===1077936157?(u.assignable&2&&(s|=16),A=O(u,e,i,o,B,F,T,A)):(s|=16,A=O(u,e,i,o,B,F,T,A))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,i,o,l,f,B,F,T):Y(u,e,n,0,i,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(u.destructible&8)!==8&&(A=N(u,e,A,i,0,B,F,T),s=u.assignable&2?16:0,(u.token&4194304)===4194304?A=I2(u,e,i,o,B,F,T,A):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,0,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&1?0:16,u.token!==18&&u.token!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,i,o,B,F,T,A))))}else u.token===67174411?(S|=1,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos),s=u.assignable|16):d(u,131);else if(u.token===69271571)if(V=g2(u,e,i),s|=u.destructible&256?256:0,S|=2,u.token===21){D(u,e|32768);let{tokenPos:B,linePos:F,colPos:T,tokenValue:o2,token:m2}=u;if(u.token&143360){A=K(u,e,l,0,1,0,i,1,B,F,T);let{token:x}=u;A=N(u,e,A,i,0,B,F,T),(u.token&4194304)===4194304?(s|=u.assignable&2?16:x===1077936157?0:32,A=I2(u,e,i,o,B,F,T,A)):u.token===18||u.token===1074790415?x===1077936157||x===1074790415||x===18?u.assignable&2?s|=16:n&&(m2&143360)===143360&&u2(u,e,n,o2,l,f):s|=u.assignable&1?32:16:(s|=16,A=O(u,e,i,o,B,F,T,A))}else(u.token&2097152)===2097152?(A=u.token===69271571?_(u,e,n,0,i,o,l,f,B,F,T):Y(u,e,n,0,i,o,l,f,B,F,T),s=u.destructible,u.assignable=s&16?2:1,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):s&8?d(u,60):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&2?s|16:0,(u.token&4194304)===4194304?(u.token!==1077936157&&(s|=16),A=I2(u,e,i,o,B,F,T,A)):((u.token&8454144)===8454144&&(A=n2(u,e,1,B,F,T,4,b,A)),q(u,e|32768,22)&&(A=f2(u,e,A,B,F,T)),s|=u.assignable&2?16:32))):(A=W(u,e,1,0,1,B,F,T),s|=u.assignable&1?32:16,u.token===18||u.token===1074790415?u.assignable&2&&(s|=16):(A=N(u,e,A,i,0,B,F,T),s=u.assignable&1?0:16,u.token!==18&&u.token!==1074790415&&(u.token!==1077936157&&(s|=16),A=O(u,e,i,o,B,F,T,A))))}else u.token===67174411?(S|=1,A=Z(u,e,S,i,u.tokenPos,w,v),s=16):d(u,42);else if(b===8457014)if(P(u,e|32768,8457014),S|=8,u.token&143360){let{token:B,line:F,index:T}=u;V=I(u,e,0),S|=1,u.token===67174411?(s|=16,A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):h2(T,F,T,B===209007?44:B===12402||u.token===12403?43:45,U[B&255])}else(u.token&134217728)===134217728?(s|=16,V=X(u,e),S|=1,A=Z(u,e,S,i,M,w,v)):u.token===69271571?(s|=16,S|=3,V=g2(u,e,i),A=Z(u,e,S,i,u.tokenPos,u.linePos,u.colPos)):d(u,123);else d(u,28,U[b&255]);s|=u.destructible&128?128:0,u.destructible=s,m.push(y(u,e,M,w,v,{type:"Property",key:V,value:A,kind:S&768?S&512?"set":"get":"init",computed:(S&2)>0,method:(S&1)>0,shorthand:(S&4)>0}))}if(s|=u.destructible,u.token!==18)break;D(u,e)}P(u,e,1074790415),k>1&&(s|=64);let C=y(u,e,c,a,g,{type:o?"ObjectPattern":"ObjectExpression",properties:m});return!t&&u.token&4194304?ue(u,e,s,i,o,c,a,g,C):(u.destructible=s,C)}function _1(u,e,n,t,i,o){P(u,e,67174411);let l=[];if(u.flags=(u.flags|128)^128,u.token===16)return t&512&&d(u,35,"Setter","one",""),D(u,e),l;t&256&&d(u,35,"Getter","no","s"),t&512&&u.token===14&&d(u,36),e=(e|134217728)^134217728;let f=0,c=0;for(;u.token!==18;){let a=null,{tokenPos:g,linePos:m,colPos:s}=u;if(u.token&143360?(e&1024||((u.token&36864)===36864&&(u.flags|=256),(u.token&537079808)===537079808&&(u.flags|=512)),a=mu(u,e,n,t|1,0,g,m,s)):(u.token===2162700?a=Y(u,e,n,1,o,1,i,0,g,m,s):u.token===69271571?a=_(u,e,n,1,o,1,i,0,g,m,s):u.token===14&&(a=b2(u,e,n,16,i,0,0,o,1,g,m,s)),c=1,u.destructible&48&&d(u,48)),u.token===1077936157){D(u,e|32768),c=1;let k=R(u,e,1,1,0,u.tokenPos,u.linePos,u.colPos);a=y(u,e,g,m,s,{type:"AssignmentPattern",left:a,right:k})}if(f++,l.push(a),!q(u,e,18)||u.token===16)break}return t&512&&f!==1&&d(u,35,"Setter","one",""),n&&n.scopeError!==void 0&&X2(n.scopeError),c&&(u.flags|=128),P(u,e,16),l}function g2(u,e,n){D(u,e|32768);let t=R(u,(e|134217728)^134217728,1,0,n,u.tokenPos,u.linePos,u.colPos);return P(u,e,20),t}function Y1(u,e,n,t,i,o,l,f){u.flags=(u.flags|128)^128;let{tokenPos:c,linePos:a,colPos:g}=u;D(u,e|32768|1073741824);let m=e&64?J(s2(),1024):void 0;if(e=(e|134217728)^134217728,q(u,e,16))return J2(u,e,m,[],n,0,o,l,f);let s=0;u.destructible&=-385;let k,C=[],b=0,E=0,{tokenPos:w,linePos:v,colPos:M}=u;for(u.assignable=1;u.token!==16;){let{token:S,tokenPos:V,linePos:A,colPos:Q}=u;if(S&143360)m&&t2(u,e,m,u.tokenValue,1,0),k=K(u,e,t,0,1,0,1,1,V,A,Q),u.token===16||u.token===18?u.assignable&2?(s|=16,E=1):((S&537079808)===537079808||(S&36864)===36864)&&(E=1):(u.token===1077936157?E=1:s|=16,k=N(u,e,k,1,0,V,A,Q),u.token!==16&&u.token!==18&&(k=O(u,e,1,0,V,A,Q,k)));else if((S&2097152)===2097152)k=S===2162700?Y(u,e|1073741824,m,0,1,0,t,i,V,A,Q):_(u,e|1073741824,m,0,1,0,t,i,V,A,Q),s|=u.destructible,E=1,u.assignable=2,u.token!==16&&u.token!==18&&(s&8&&d(u,119),k=N(u,e,k,0,0,V,A,Q),s|=16,u.token!==16&&u.token!==18&&(k=O(u,e,0,0,V,A,Q,k)));else if(S===14){k=b2(u,e,m,16,t,i,0,1,0,V,A,Q),u.destructible&16&&d(u,72),E=1,b&&(u.token===16||u.token===18)&&C.push(k),s|=8;break}else{if(s|=16,k=R(u,e,1,0,1,V,A,Q),b&&(u.token===16||u.token===18)&&C.push(k),u.token===18&&(b||(b=1,C=[k])),b){for(;q(u,e|32768,18);)C.push(R(u,e,1,0,1,u.tokenPos,u.linePos,u.colPos));u.assignable=2,k=y(u,e,w,v,M,{type:"SequenceExpression",expressions:C})}return P(u,e,16),u.destructible=s,k}if(b&&(u.token===16||u.token===18)&&C.push(k),!q(u,e|32768,18))break;if(b||(b=1,C=[k]),u.token===16){s|=8;break}}return b&&(u.assignable=2,k=y(u,e,w,v,M,{type:"SequenceExpression",expressions:C})),P(u,e,16),s&16&&s&8&&d(u,146),s|=u.destructible&256?256:0|u.destructible&128?128:0,u.token===10?(s&48&&d(u,47),e&4196352&&s&128&&d(u,29),e&2098176&&s&256&&d(u,30),E&&(u.flags|=128),J2(u,e,m,b?C:[k],n,0,o,l,f)):(s&8&&d(u,140),u.destructible=(u.destructible|256)^256|s,e&128?y(u,e,c,a,g,{type:"ParenthesizedExpression",expression:k}):k)}function su(u,e,n,t,i){let{tokenValue:o}=u,l=I(u,e,0);if(u.assignable=1,u.token===10){let f;return e&64&&(f=z2(u,e,o)),u.flags=(u.flags|128)^128,v2(u,e,f,[l],0,n,t,i)}return l}function K2(u,e,n,t,i,o,l,f,c,a){o||d(u,55),i&&d(u,49),u.flags&=-129;let g=e&64?z2(u,e,n):void 0;return v2(u,e,g,[t],l,f,c,a)}function J2(u,e,n,t,i,o,l,f,c){i||d(u,55);for(let a=0;a0&&u.tokenValue==="constructor"&&d(u,107),u.token===1074790415&&d(u,106),q(u,e,1074790417)){k>0&&d(u,117);continue}m.push(te(u,e,t,n,i,s,0,l,u.tokenPos,u.linePos,u.colPos))}return P(u,o&8?e|32768:e,1074790415),u.flags=u.flags&-33|g,y(u,e,f,c,a,{type:"ClassBody",body:m})}function te(u,e,n,t,i,o,l,f,c,a,g){let m=l?32:0,s=null,{token:k,tokenPos:C,linePos:b,colPos:E}=u;if(k&176128)switch(s=I(u,e,0),k){case 36972:if(!l&&u.token!==67174411&&(u.token&1048576)!==1048576&&u.token!==1077936157)return te(u,e,n,t,i,o,1,f,c,a,g);break;case 209007:if(u.token!==67174411&&!(u.flags&1)){if(e&1&&(u.token&1073741824)===1073741824)return N2(u,e,s,m,o,C,b,E);m|=16|(nu(u,e,8457014)?8:0)}break;case 12402:if(u.token!==67174411){if(e&1&&(u.token&1073741824)===1073741824)return N2(u,e,s,m,o,C,b,E);m|=256}break;case 12403:if(u.token!==67174411){if(e&1&&(u.token&1073741824)===1073741824)return N2(u,e,s,m,o,C,b,E);m|=512}break}else if(k===69271571)m|=2,s=g2(u,t,f);else if((k&134217728)===134217728)s=X(u,e);else if(k===8457014)m|=8,D(u,e);else if(e&1&&u.token===131)m|=4096,s=j2(u,e|16384,C,b,E);else if(e&1&&(u.token&1073741824)===1073741824)m|=128;else{if(l&&k===2162700)return B1(u,e,n,C,b,E);k===122?(s=I(u,e,0),u.token!==67174411&&d(u,28,U[u.token&255])):d(u,28,U[u.token&255])}if(m&792&&(u.token&143360?s=I(u,e,0):(u.token&134217728)===134217728?s=X(u,e):u.token===69271571?(m|=2,s=g2(u,e,0)):u.token===122?s=I(u,e,0):e&1&&u.token===131?(m|=4096,s=j2(u,e,C,b,E)):d(u,132)),m&2||(u.tokenValue==="constructor"?((u.token&1073741824)===1073741824?d(u,126):!(m&32)&&u.token===67174411&&(m&920?d(u,51,"accessor"):e&524288||(u.flags&32?d(u,52):u.flags|=32)),m|=64):!(m&4096)&&m&824&&u.tokenValue==="prototype"&&d(u,50)),e&1&&u.token!==67174411)return N2(u,e,s,m,o,C,b,E);let w=Z(u,e,m,f,u.tokenPos,u.linePos,u.colPos);return y(u,e,c,a,g,e&1?{type:"MethodDefinition",kind:!(m&32)&&m&64?"constructor":m&256?"get":m&512?"set":"method",static:(m&32)>0,computed:(m&2)>0,key:s,decorators:o,value:w}:{type:"MethodDefinition",kind:!(m&32)&&m&64?"constructor":m&256?"get":m&512?"set":"method",static:(m&32)>0,computed:(m&2)>0,key:s,value:w})}function j2(u,e,n,t,i){D(u,e);let{tokenValue:o}=u;return o==="constructor"&&d(u,125),D(u,e),y(u,e,n,t,i,{type:"PrivateIdentifier",name:o})}function N2(u,e,n,t,i,o,l,f){let c=null;if(t&8&&d(u,0),u.token===1077936157){D(u,e|32768);let{tokenPos:a,linePos:g,colPos:m}=u;u.token===537079928&&d(u,116),c=K(u,e|16384,2,0,1,0,0,1,a,g,m),((u.token&1073741824)!==1073741824||(u.token&4194304)===4194304)&&(c=N(u,e|16384,c,0,0,a,g,m),c=O(u,e|16384,0,0,a,g,m,c),u.token===18&&(c=e2(u,e,0,o,l,f,c)))}return y(u,e,o,l,f,{type:"PropertyDefinition",key:n,value:c,static:(t&32)>0,computed:(t&2)>0,decorators:i})}function oe(u,e,n,t,i,o,l,f){if(u.token&143360)return mu(u,e,n,t,i,o,l,f);(u.token&2097152)!==2097152&&d(u,28,U[u.token&255]);let c=u.token===69271571?_(u,e,n,1,0,1,t,i,o,l,f):Y(u,e,n,1,0,1,t,i,o,l,f);return u.destructible&16&&d(u,48),u.destructible&32&&d(u,48),c}function mu(u,e,n,t,i,o,l,f){let{tokenValue:c,token:a}=u;return e&1024&&((a&537079808)===537079808?d(u,116):(a&36864)===36864&&d(u,115)),(a&20480)===20480&&d(u,100),e&2099200&&a===241773&&d(u,30),a===241739&&t&24&&d(u,98),e&4196352&&a===209008&&d(u,96),D(u,e),n&&u2(u,e,n,c,t,i),y(u,e,o,l,f,{type:"Identifier",name:c})}function gu(u,e,n,t,i,o){if(D(u,e),u.token===8456259)return y(u,e,t,i,o,{type:"JSXFragment",openingFragment:p1(u,e,t,i,o),children:qu(u,e),closingFragment:e0(u,e,n,u.tokenPos,u.linePos,u.colPos)});let l=null,f=[],c=t0(u,e,n,t,i,o);if(!c.selfClosing){f=qu(u,e),l=u0(u,e,n,u.tokenPos,u.linePos,u.colPos);let a=M2(l.name);M2(c.name)!==a&&d(u,150,a)}return y(u,e,t,i,o,{type:"JSXElement",children:f,openingElement:c,closingElement:l})}function p1(u,e,n,t,i){return d2(u,e),y(u,e,n,t,i,{type:"JSXOpeningFragment"})}function u0(u,e,n,t,i,o){P(u,e,25);let l=le(u,e,u.tokenPos,u.linePos,u.colPos);return n?P(u,e,8456259):u.token=d2(u,e),y(u,e,t,i,o,{type:"JSXClosingElement",name:l})}function e0(u,e,n,t,i,o){return P(u,e,25),P(u,e,8456259),y(u,e,t,i,o,{type:"JSXClosingFragment"})}function qu(u,e){let n=[];for(;u.token!==25;)u.index=u.tokenPos=u.startPos,u.column=u.colPos=u.startColumn,u.line=u.linePos=u.startLine,d2(u,e),n.push(n0(u,e,u.tokenPos,u.linePos,u.colPos));return n}function n0(u,e,n,t,i){if(u.token===138)return i0(u,e,n,t,i);if(u.token===2162700)return ce(u,e,0,0,n,t,i);if(u.token===8456258)return gu(u,e,0,n,t,i);d(u,0)}function i0(u,e,n,t,i){d2(u,e);let o={type:"JSXText",value:u.tokenValue};return e&512&&(o.raw=u.tokenRaw),y(u,e,n,t,i,o)}function t0(u,e,n,t,i,o){(u.token&143360)!==143360&&(u.token&4096)!==4096&&d(u,0);let l=le(u,e,u.tokenPos,u.linePos,u.colPos),f=l0(u,e),c=u.token===8457016;return u.token===8456259?d2(u,e):(P(u,e,8457016),n?P(u,e,8456259):d2(u,e)),y(u,e,t,i,o,{type:"JSXOpeningElement",name:l,attributes:f,selfClosing:c})}function le(u,e,n,t,i){Z2(u);let o=W2(u,e,n,t,i);if(u.token===21)return fe(u,e,o,n,t,i);for(;q(u,e,67108877);)Z2(u),o=o0(u,e,o,n,t,i);return o}function o0(u,e,n,t,i,o){let l=W2(u,e,u.tokenPos,u.linePos,u.colPos);return y(u,e,t,i,o,{type:"JSXMemberExpression",object:n,property:l})}function l0(u,e){let n=[];for(;u.token!==8457016&&u.token!==8456259&&u.token!==1048576;)n.push(c0(u,e,u.tokenPos,u.linePos,u.colPos));return n}function f0(u,e,n,t,i){D(u,e),P(u,e,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return P(u,e,1074790415),y(u,e,n,t,i,{type:"JSXSpreadAttribute",argument:o})}function c0(u,e,n,t,i){if(u.token===2162700)return f0(u,e,n,t,i);Z2(u);let o=null,l=W2(u,e,n,t,i);if(u.token===21&&(l=fe(u,e,l,n,t,i)),u.token===1077936157){let f=u1(u,e),{tokenPos:c,linePos:a,colPos:g}=u;switch(f){case 134283267:o=X(u,e);break;case 8456258:o=gu(u,e,1,c,a,g);break;case 2162700:o=ce(u,e,1,1,c,a,g);break;default:d(u,149)}}return y(u,e,n,t,i,{type:"JSXAttribute",value:o,name:l})}function fe(u,e,n,t,i,o){P(u,e,21);let l=W2(u,e,u.tokenPos,u.linePos,u.colPos);return y(u,e,t,i,o,{type:"JSXNamespacedName",namespace:n,name:l})}function ce(u,e,n,t,i,o,l){D(u,e|32768);let{tokenPos:f,linePos:c,colPos:a}=u;if(u.token===14)return d0(u,e,i,o,l);let g=null;return u.token===1074790415?(t&&d(u,152),g=s0(u,e,u.startPos,u.startLine,u.startColumn)):g=R(u,e,1,0,0,f,c,a),n?P(u,e,1074790415):d2(u,e),y(u,e,i,o,l,{type:"JSXExpressionContainer",expression:g})}function d0(u,e,n,t,i){P(u,e,14);let o=R(u,e,1,0,0,u.tokenPos,u.linePos,u.colPos);return P(u,e,1074790415),y(u,e,n,t,i,{type:"JSXSpreadChild",expression:o})}function s0(u,e,n,t,i){return u.startPos=u.tokenPos,u.startLine=u.linePos,u.startColumn=u.colPos,y(u,e,n,t,i,{type:"JSXEmptyExpression"})}function W2(u,e,n,t,i){let{tokenValue:o}=u;return D(u,e),y(u,e,n,t,i,{type:"JSXIdentifier",name:o})}function de(u,e){return c1(u,e,0)}function a0(u,e){let n=new SyntaxError(u+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var se=a0;function m0(u){let e=[];for(let n of u)try{return n()}catch(t){e.push(t)}throw Object.assign(new Error("All combinations failed"),{errors:e})}var ae=m0;var g0=(u,e,n)=>{if(!(u&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},yu=g0;function y0(u){return Array.isArray(u)&&u.length>0}var me=y0;function $(u){var t,i,o;let e=((t=u.range)==null?void 0:t[0])??u.start,n=(o=((i=u.declaration)==null?void 0:i.decorators)??u.decorators)==null?void 0:o[0];return n?Math.min($(n),e):e}function p(u){var e;return((e=u.range)==null?void 0:e[1])??u.end}function k0(u){let e=new Set(u);return n=>e.has(n==null?void 0:n.type)}var ge=k0;var h0=ge(["Block","CommentBlock","MultiLine"]),T2=h0;function A0(u){let e=`*${u.value}*`.split(` +`);return e.length>1&&e.every(n=>n.trimStart()[0]==="*")}var ku=A0;function D0(u){return T2(u)&&u.value[0]==="*"&&/@(?:type|satisfies)\b/.test(u.value)}var ye=D0;var F2=null;function q2(u){if(F2!==null&&typeof F2.property){let e=F2;return F2=q2.prototype=null,e}return F2=q2.prototype=u??Object.create(null),new q2}var b0=10;for(let u=0;u<=b0;u++)q2();function hu(u){return q2(u)}function C0(u,e="type"){hu(u);function n(t){let i=t[e],o=u[i];if(!Array.isArray(o))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:t});return o}return n}var ke=C0;var he={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var P0=ke(he),Ae=P0;function Au(u,e){if(!(u!==null&&typeof u=="object"))return u;if(Array.isArray(u)){for(let t=0;t{var l;(l=o.leadingComments)!=null&&l.some(ye)&&i.add($(o))}),u=_2(u,o=>{if(o.type==="ParenthesizedExpression"){let{expression:l}=o;if(l.type==="TypeCastExpression")return l.range=[...o.range],l;let f=$(o);if(!i.has(f))return l.extra={...l.extra,parenthesized:!0},l}})}if(u=_2(u,i=>{var o;switch(i.type){case"LogicalExpression":if(De(i))return Du(i);break;case"VariableDeclaration":{let l=yu(!1,i.declarations,-1);l!=null&&l.init&&t[p(l)]!==";"&&(i.range=[$(i),p(l)]);break}case"TSParenthesizedType":return i.typeAnnotation;case"TSTypeParameter":if(typeof i.name=="string"){let l=$(i);i.name={type:"Identifier",name:i.name,range:[l,l+i.name.length]}}break;case"TopicReference":u.extra={...u.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(n==="meriyah"&&((o=i.exported)==null?void 0:o.type)==="Identifier"){let{exported:l}=i,f=t.slice($(l),p(l));(f.startsWith('"')||f.startsWith("'"))&&(i.exported={...i.exported,type:"Literal",value:i.exported.name,raw:f})}break;case"TSUnionType":case"TSIntersectionType":if(i.types.length===1)return i.types[0];break}}),me(u.comments)){let i=yu(!1,u.comments,-1);for(let o=u.comments.length-2;o>=0;o--){let l=u.comments[o];p(l)===$(i)&&T2(l)&&T2(i)&&ku(l)&&ku(i)&&(u.comments.splice(o+1,1),l.value+="*//*"+i.value,l.range=[$(l),p(i)]),i=l}}return u.type==="Program"&&(u.range=[0,t.length]),u}function De(u){return u.type==="LogicalExpression"&&u.right.type==="LogicalExpression"&&u.operator===u.right.operator}function Du(u){return De(u)?Du({type:"LogicalExpression",operator:u.operator,left:Du({type:"LogicalExpression",operator:u.operator,left:u.left,right:u.right.left,range:[$(u.left),p(u.right.left)]}),right:u.right.right,range:[$(u),p(u)]}):u}var be=E0;var C2=Je(ve(),1);function N0(u){if(!u.startsWith("#!"))return"";let e=u.indexOf(` +`);return e===-1?u:u.slice(0,e)}var Te=N0;function V0(u){let e=Te(u);e&&(u=u.slice(e.length+1));let n=(0,C2.extract)(u),{pragmas:t,comments:i}=(0,C2.parseWithComments)(n);return{shebang:e,text:u,pragmas:t,comments:i}}function Fe(u){let{pragmas:e}=V0(u);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function R0(u){return u=typeof u=="function"?{parse:u}:u,{astFormat:"estree",hasPragma:Fe,locStart:$,locEnd:p,...u}}var qe=R0;function O0(u){let{filepath:e}=u;if(e){if(e=e.toLowerCase(),e.endsWith(".cjs"))return"script";if(e.endsWith(".mjs"))return"module"}}var Le=O0;var U0={next:!0,ranges:!0,webcompat:!0,loc:!0,raw:!0,directives:!0,globalReturn:!0,impliedStrict:!1,preserveParens:!1,lexical:!1,identifierPattern:!1,jsx:!0,specDeviation:!0,uniqueKeyInPattern:!1};function M0(u,e){let n=[],t=[],i=de(u,{...U0,module:e==="module",onComment:n,onToken:t});return i.comments=n,i.tokens=t,i}function J0(u){var o;let{message:e,line:n,column:t}=u,i=(o=e.match(/^\[(?\d+):(?\d+)]: (?.*)$/))==null?void 0:o.groups;return i&&(e=i.message,typeof n!="number"&&(n=Number(i.line),t=Number(i.column))),typeof n!="number"?u:se(e,{loc:{start:{line:n,column:t}},cause:u})}function j0(u,e={}){let n=Le(e),t=(n?[n]:["module","script"]).map(o=>()=>M0(u,o)),i;try{i=ae(t)}catch({errors:[o]}){throw J0(o)}return be(i,{parser:"meriyah",text:u})}var X0=qe(j0);var Jn=Cu;export{Jn as default,bu as parsers}; diff --git a/node_modules/prettier/plugins/postcss.js b/node_modules/prettier/plugins/postcss.js index 542d185..ea78b8d 100644 --- a/node_modules/prettier/plugins/postcss.js +++ b/node_modules/prettier/plugins/postcss.js @@ -1,52 +1,49 @@ -(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.postcss=e()}})(function(){"use strict";var Vl=Object.create;var Et=Object.defineProperty;var Yl=Object.getOwnPropertyDescriptor;var Gl=Object.getOwnPropertyNames;var Kl=Object.getPrototypeOf,Hl=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Cs=(t,e)=>{for(var n in e)Et(t,n,{get:e[n],enumerable:!0})},Os=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Gl(e))!Hl.call(t,s)&&s!==n&&Et(t,s,{get:()=>e[s],enumerable:!(r=Yl(e,s))||r.enumerable});return t};var ue=(t,e,n)=>(n=t!=null?Vl(Kl(t)):{},Os(e||!t||!t.__esModule?Et(n,"default",{value:t,enumerable:!0}):n,t)),Ql=t=>Os(Et({},"__esModule",{value:!0}),t);var Qs=y(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.extract=gc;pe.parse=vc;pe.parseWithComments=Hs;pe.print=xc;pe.strip=wc;var pc=/\*\/$/,hc=/^\/\*\*?/,Gs=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,dc=/(^|\s+)\/\/([^\r\n]*)/g,zs=/^(\r?\n)+/,mc=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Vs=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,yc=/(\r?\n|^) *\* ?/g,Ks=[];function gc(t){let e=t.match(Gs);return e?e[0].trimLeft():""}function wc(t){let e=t.match(Gs);return e&&e[0]?t.substring(e[0].length):t}function vc(t){return Hs(t).pragmas}function Hs(t){let e=` -`;t=t.replace(hc,"").replace(pc,"").replace(yc,"$1");let n="";for(;n!==t;)n=t,t=t.replace(mc,`${e}$1 $2${e}`);t=t.replace(zs,"").trimRight();let r=Object.create(null),s=t.replace(Vs,"").replace(zs,"").trimRight(),i;for(;i=Vs.exec(t);){let o=i[2].replace(dc,"");typeof r[i[1]]=="string"||Array.isArray(r[i[1]])?r[i[1]]=Ks.concat(r[i[1]],o):r[i[1]]=o}return{comments:s,pragmas:r}}function xc({comments:t="",pragmas:e={}}){let n=` -`,r="/**",s=" *",i=" */",o=Object.keys(e),a=o.flatMap(c=>Ys(c,e[c])).map(c=>`${s} ${c}${n}`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`${r} ${Ys(o[0],c)[0]}${i}`}}let u=t.split(n).map(c=>`${s} ${c}`).join(n)+n;return r+n+(t?u:"")+(t&&o.length?s+n:"")+a+i}function Ys(t,e){return Ks.concat(e).map(n=>`@${t} ${n}`.trim())}});var Yt=y((mx,gn)=>{"use strict";gn.exports.isClean=Symbol("isClean");gn.exports.my=Symbol("my")});var Ui=y((yx,wn)=>{var E=String,$i=function(){return{isColorSupported:!1,reset:E,bold:E,dim:E,italic:E,underline:E,inverse:E,hidden:E,strikethrough:E,black:E,red:E,green:E,yellow:E,blue:E,magenta:E,cyan:E,white:E,gray:E,bgBlack:E,bgRed:E,bgGreen:E,bgYellow:E,bgBlue:E,bgMagenta:E,bgCyan:E,bgWhite:E}};wn.exports=$i();wn.exports.createColors=$i});var vn=y(()=>{});var Gt=y((vx,Vi)=>{"use strict";var Wi=Ui(),zi=vn(),st=class t extends Error{constructor(e,n,r,s,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=Wi.isColorSupported),zi&&e&&(n=zi(n));let r=n.split(/\r?\n/),s=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),o=String(i).length,a,u;if(e){let{bold:c,gray:f,red:p}=Wi.createColors(!0);a=l=>c(p(l)),u=l=>f(l)}else a=u=c=>c;return r.slice(s,i).map((c,f)=>{let p=s+1+f,l=" "+(" "+p).slice(-o)+" | ";if(p===this.line){let g=u(l.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+u(l)+c+` +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.postcss=e()}})(function(){"use strict";var ul=Object.create;var bt=Object.defineProperty;var ll=Object.getOwnPropertyDescriptor;var cl=Object.getOwnPropertyNames;var fl=Object.getPrototypeOf,pl=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Zs=(t,e)=>{for(var s in e)bt(t,s,{get:e[s],enumerable:!0})},en=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of cl(e))!pl.call(t,n)&&n!==s&&bt(t,n,{get:()=>e[n],enumerable:!(r=ll(e,n))||r.enumerable});return t};var ue=(t,e,s)=>(s=t!=null?ul(fl(t)):{},en(e||!t||!t.__esModule?bt(s,"default",{value:t,enumerable:!0}):s,t)),hl=t=>en(bt({},"__esModule",{value:!0}),t);var On=y(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.extract=$l;pe.parse=zl;pe.parseWithComments=An;pe.print=Yl;pe.strip=Wl;var Dl=/\*\/$/,Ml=/^\/\*\*?/,Tn=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Bl=/(^|\s+)\/\/([^\r\n]*)/g,kn=/^(\r?\n)+/,Ul=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,En=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,Fl=/(\r?\n|^) *\* ?/g,Cn=[];function $l(t){let e=t.match(Tn);return e?e[0].trimLeft():""}function Wl(t){let e=t.match(Tn);return e&&e[0]?t.substring(e[0].length):t}function zl(t){return An(t).pragmas}function An(t){let e=` +`;t=t.replace(Ml,"").replace(Dl,"").replace(Fl,"$1");let s="";for(;s!==t;)s=t,t=t.replace(Ul,`${e}$1 $2${e}`);t=t.replace(kn,"").trimRight();let r=Object.create(null),n=t.replace(En,"").replace(kn,"").trimRight(),i;for(;i=En.exec(t);){let o=i[2].replace(Bl,"");typeof r[i[1]]=="string"||Array.isArray(r[i[1]])?r[i[1]]=Cn.concat(r[i[1]],o):r[i[1]]=o}return{comments:n,pragmas:r}}function Yl({comments:t="",pragmas:e={}}){let s=` +`,r="/**",n=" *",i=" */",o=Object.keys(e),a=o.flatMap(c=>Sn(c,e[c])).map(c=>`${n} ${c}${s}`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`${r} ${Sn(o[0],c)[0]}${i}`}}let u=t.split(s).map(c=>`${n} ${c}`).join(s)+s;return r+s+(t?u:"")+(t&&o.length?n+s:"")+a+i}function Sn(t,e){return Cn.concat(e).map(s=>`@${t} ${s}`.trim())}});var Wt=y((ov,ss)=>{"use strict";ss.exports.isClean=Symbol("isClean");ss.exports.my=Symbol("my")});var gi=y((av,ns)=>{var S=String,yi=function(){return{isColorSupported:!1,reset:S,bold:S,dim:S,italic:S,underline:S,inverse:S,hidden:S,strikethrough:S,black:S,red:S,green:S,yellow:S,blue:S,magenta:S,cyan:S,white:S,gray:S,bgBlack:S,bgRed:S,bgGreen:S,bgYellow:S,bgBlue:S,bgMagenta:S,bgCyan:S,bgWhite:S}};ns.exports=yi();ns.exports.createColors=yi});var is=y(()=>{});var zt=y((cv,xi)=>{"use strict";var wi=gi(),vi=is(),nt=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=wi.isColorSupported),vi&&e&&(s=vi(s));let r=s.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),o=String(i).length,a,u;if(e){let{bold:c,gray:f,red:p}=wi.createColors(!0);a=l=>c(p(l)),u=l=>f(l)}else a=u=c=>c;return r.slice(n,i).map((c,f)=>{let p=n+1+f,l=" "+(" "+p).slice(-o)+" | ";if(p===this.line){let g=u(l.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+u(l)+c+` `+g+a("^")}return" "+u(l)+c}).join(` `)}toString(){let e=this.showSourceCode();return e&&(e=` `+e+` -`),this.name+": "+this.message+e}};Vi.exports=st;st.default=st});var Kt=y((xx,Gi)=>{"use strict";var Yi={after:` +`),this.name+": "+this.message+e}};xi.exports=nt;nt.default=nt});var Yt=y((fv,bi)=>{"use strict";var _i={after:` `,beforeClose:` `,beforeComment:` `,beforeDecl:` `,beforeOpen:" ",beforeRule:` -`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Qc(t){return t[0].toUpperCase()+t.slice(1)}var it=class{constructor(e){this.builder=e}atrule(e,n){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let i=(e.raws.between||"")+(n?";":"");this.builder(r+s+i,e)}}beforeAfter(e,n){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):n==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&s.type!=="root";)i+=1,s=s.parent;if(r.includes(` -`)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s{if(s=u.raws[n],typeof s<"u")return!1})}return typeof s>"u"&&(s=Yi[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(` -`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(e,n){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(` -`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,n){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(` -`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let n;return e.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(e){let n;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(` -`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(e){let n;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(e){if(e.raws.indent)return e.raws.indent;let n;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(` -`);return n=i[i.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(e,n){let r=e[n],s=e.raws[n];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,n){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,n)}};Gi.exports=it;it.default=it});var ot=y((bx,Ki)=>{"use strict";var jc=Kt();function xn(t,e){new jc(e).stringify(t)}Ki.exports=xn;xn.default=xn});var ut=y((kx,Hi)=>{"use strict";var{isClean:Ht,my:Jc}=Yt(),Xc=Gt(),Zc=Kt(),ef=ot();function bn(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let s=t[r],i=typeof s;r==="parent"&&i==="object"?e&&(n[r]=e):r==="source"?n[r]=s:Array.isArray(s)?n[r]=s.map(o=>bn(o,n)):(i==="object"&&s!==null&&(s=bn(s)),n[r]=s)}return n}var at=class{constructor(e={}){this.raws={},this[Ht]=!1,this[Jc]=!0;for(let n in e)if(n==="nodes"){this.nodes=[];for(let r of e[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=e[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let n=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let n in e)this[n]=e[n];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let n=bn(this);for(let r in e)n[r]=e[r];return n}cloneAfter(e={}){let n=this.clone(e);return this.parent.insertAfter(this,n),n}cloneBefore(e={}){let n=this.clone(e);return this.parent.insertBefore(this,n),n}error(e,n={}){if(this.source){let{end:r,start:s}=this.rangeBy(n);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},n)}return new Xc(e)}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:n==="root"?()=>e.root().toProxy():e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ht]){this[Ht]=!1;let e=this;for(;e=e.parent;)e[Ht]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,n){let r=this.source.start;if(e.index)r=this.positionInside(e.index,n);else if(e.word){n=this.toString();let s=n.indexOf(e.word);s!==-1&&(r=this.positionInside(s,n))}return r}positionInside(e,n){let r=n||this.toString(),s=this.source.start.column,i=this.source.start.line;for(let o=0;otypeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,n);else if(o==="source"){let u=n.get(a.input);u==null&&(u=i,n.set(a.input,i),i++),r[o]={end:a.end,inputId:u,start:a.start}}else r[o]=a}return s&&(r.inputs=[...n.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ef){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let i in r)s[i]=r[i];return e.warn(n,s)}get proxyOf(){return this}};Hi.exports=at;at.default=at});var ct=y((_x,Qi)=>{"use strict";var tf=ut(),lt=class extends tf{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};Qi.exports=lt;lt.default=lt});var Ae=y((Tx,ji)=>{"use strict";var rf=ut(),ft=class extends rf{constructor(e){super(e),this.type="comment"}};ji.exports=ft;ft.default=ft});var se=y((Ex,io)=>{"use strict";var{isClean:Ji,my:Xi}=Yt(),Zi=ct(),eo=Ae(),nf=ut(),to,kn,_n,ro;function no(t){return t.map(e=>(e.nodes&&(e.nodes=no(e.nodes)),delete e.source,e))}function so(t){if(t[Ji]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)so(e)}var z=class t extends nf{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]e[n](...r.map(s=>typeof s=="function"?(i,o)=>s(i.toProxy(),o):s)):n==="every"||n==="some"?r=>e[n]((s,...i)=>r(s.toProxy(),...i)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Zi(e)]}else if(e.selector)e=[new kn(e)];else if(e.name)e=[new _n(e)];else if(e.text)e=[new eo(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Xi]||t.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Ji]&&so(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(i){throw n.addToError(i)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};z.registerParse=t=>{to=t};z.registerRule=t=>{kn=t};z.registerAtRule=t=>{_n=t};z.registerRoot=t=>{ro=t};io.exports=z;z.default=z;z.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,_n.prototype):t.type==="rule"?Object.setPrototypeOf(t,kn.prototype):t.type==="decl"?Object.setPrototypeOf(t,Zi.prototype):t.type==="comment"?Object.setPrototypeOf(t,eo.prototype):t.type==="root"&&Object.setPrototypeOf(t,ro.prototype),t[Xi]=!0,t.nodes&&t.nodes.forEach(e=>{z.rebuild(e)})}});var rr=y((Sx,lo)=>{"use strict";var Tn="'".charCodeAt(0),oo='"'.charCodeAt(0),Qt="\\".charCodeAt(0),ao="/".charCodeAt(0),jt=` -`.charCodeAt(0),pt=" ".charCodeAt(0),Jt="\f".charCodeAt(0),Xt=" ".charCodeAt(0),Zt="\r".charCodeAt(0),sf="[".charCodeAt(0),of="]".charCodeAt(0),af="(".charCodeAt(0),uf=")".charCodeAt(0),lf="{".charCodeAt(0),cf="}".charCodeAt(0),ff=";".charCodeAt(0),pf="*".charCodeAt(0),hf=":".charCodeAt(0),df="@".charCodeAt(0),er=/[\t\n\f\r "#'()/;[\\\]{}]/g,tr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,mf=/.[\r\n"'(/\\]/,uo=/[\da-f]/i;lo.exports=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,i,o,a,u,c,f,p,l,g,x,h=r.length,d=0,m=[],b=[];function w(){return d}function v(U){throw e.error("Unclosed "+U,d)}function R(){return b.length===0&&d>=h}function $(U){if(b.length)return b.pop();if(d>=h)return;let S=U?U.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case jt:case pt:case Xt:case Zt:case Jt:{o=d;do o+=1,i=r.charCodeAt(o);while(i===pt||i===jt||i===Xt||i===Zt||i===Jt);x=["space",r.slice(d,o)],d=o-1;break}case sf:case of:case lf:case cf:case hf:case ff:case uf:{let C=String.fromCharCode(i);x=[C,C,d];break}case af:{if(l=m.length?m.pop()[1]:"",g=r.charCodeAt(d+1),l==="url"&&g!==Tn&&g!==oo&&g!==pt&&g!==jt&&g!==Xt&&g!==Jt&&g!==Zt){o=d;do{if(f=!1,o=r.indexOf(")",o+1),o===-1)if(s||S){o=d;break}else v("bracket");for(p=o;r.charCodeAt(p-1)===Qt;)p-=1,f=!f}while(f);x=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),u=r.slice(d,o+1),o===-1||mf.test(u)?x=["(","(",d]:(x=["brackets",u,d,o],d=o);break}case Tn:case oo:{a=i===Tn?"'":'"',o=d;do{if(f=!1,o=r.indexOf(a,o+1),o===-1)if(s||S){o=d+1;break}else v("string");for(p=o;r.charCodeAt(p-1)===Qt;)p-=1,f=!f}while(f);x=["string",r.slice(d,o+1),d,o],d=o;break}case df:{er.lastIndex=d+1,er.test(r),er.lastIndex===0?o=r.length-1:o=er.lastIndex-2,x=["at-word",r.slice(d,o+1),d,o],d=o;break}case Qt:{for(o=d,c=!0;r.charCodeAt(o+1)===Qt;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==ao&&i!==pt&&i!==jt&&i!==Xt&&i!==Zt&&i!==Jt&&(o+=1,uo.test(r.charAt(o)))){for(;uo.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===pt&&(o+=1)}x=["word",r.slice(d,o+1),d,o],d=o;break}default:{i===ao&&r.charCodeAt(d+1)===pf?(o=r.indexOf("*/",d+2)+1,o===0&&(s||S?o=r.length:v("comment")),x=["comment",r.slice(d,o+1),d,o],d=o):(tr.lastIndex=d+1,tr.test(r),tr.lastIndex===0?o=r.length-1:o=tr.lastIndex-2,x=["word",r.slice(d,o+1),d,o],m.push(x),d=o);break}}return d++,x}function H(U){b.push(U)}return{back:H,endOfFile:R,nextToken:$,position:w}}});var nr=y((Cx,fo)=>{"use strict";var co=se(),Ne=class extends co{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};fo.exports=Ne;Ne.default=Ne;co.registerAtRule(Ne)});var Pe=y((Ox,yo)=>{"use strict";var po=se(),ho,mo,ie=class extends po{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let i of s)i.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ho(new mo,this,e).stringify()}};ie.registerLazyResult=t=>{ho=t};ie.registerProcessor=t=>{mo=t};yo.exports=ie;ie.default=ie;po.registerRoot(ie)});var En=y((Ax,go)=>{"use strict";var ht={comma(t){return ht.split(t,[","],!0)},space(t){let e=[" ",` -`," "];return ht.split(t,e)},split(t,e,n){let r=[],s="",i=!1,o=0,a=!1,u="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:a?f===u&&(a=!1):f==='"'||f==="'"?(a=!0,u=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(s!==""&&r.push(s.trim()),s="",i=!1):s+=f;return(n||s!=="")&&r.push(s.trim()),r}};go.exports=ht;ht.default=ht});var sr=y((Nx,vo)=>{"use strict";var wo=se(),yf=En(),Re=class extends wo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return yf.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};vo.exports=Re;Re.default=Re;wo.registerRule(Re)});var ir=y((Px,ko)=>{"use strict";var gf=ct(),wf=rr(),vf=Ae(),xf=nr(),bf=Pe(),xo=sr(),bo={empty:!0,space:!0};function kf(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}var Sn=class{constructor(e){this.input=e,this.root=new bf,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new xf;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,i,o=!1,a=!1,u=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(u.length>0){for(i=u.length-1,s=u[i];s&&s[0]==="space";)s=u[--i];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else u.push(e);else u.push(e);if(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=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),a&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let i=n-1;i>=0&&(s=e[i],!(s[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,i;for(let[o,a]of e.entries()){if(r=a,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return o}i=r}return!1}comment(e){let n=new vf;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=wf(this.input)}decl(e,n){let r=new gf;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||kf(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=!0;let f=this.stringFrom(e,c);f=this.spacesFromEnd(e)+f,f!==" !important"&&(r.raws.important=f);break}else if(i[1].toLowerCase()==="important"){let f=e.slice(0),p="";for(let l=c;l>0;l--){let g=f[l][0];if(p.trim().indexOf("!")===0&&g!=="space")break;p=f.pop()[1]+p}p.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=p,e=f)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new xo;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(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=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){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,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,i=null,o=[],a=e[1].startsWith("--"),u=[],c=e;for(;c;){if(r=c[0],u.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(a&&s&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(u,a);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),o.length>0&&this.unclosedBracket(i),n&&s){if(!a)for(;u.length&&(c=u[u.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,a)}else this.unknownWord(u)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[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);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let i,o,a=r.length,u="",c=!0,f,p;for(let l=0;lg+x[1],"");e.raws[n]={raw:l,value:u}}e[n]=u}rule(e){e.pop();let n=new xo;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s{});var Eo=y((qx,To)=>{var _f="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Tf=(t,e=21)=>(n=e)=>{let r="",s=n;for(;s--;)r+=t[Math.random()*t.length|0];return r},Ef=(t=21)=>{let e="",n=t;for(;n--;)e+=_f[Math.random()*64|0];return e};To.exports={nanoid:Ef,customAlphabet:Tf}});var Cn=y((Dx,So)=>{So.exports=class{}});var qe=y((Mx,No)=>{"use strict";var{SourceMapConsumer:Sf,SourceMapGenerator:Cf}=_o(),{fileURLToPath:Co,pathToFileURL:or}={},{isAbsolute:Nn,resolve:Pn}={},{nanoid:Of}=Eo(),On=vn(),Oo=Gt(),Af=Cn(),An=Symbol("fromOffsetCache"),Nf=!!(Sf&&Cf),Ao=!!(Pn&&Nn),Ie=class{constructor(e,n={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!Ao||/^\w+:\/\//.test(n.from)||Nn(n.from)?this.file=n.from:this.file=Pn(n.from)),Ao&&Nf){let r=new Af(this.css,n);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,n,r,s={}){let i,o,a;if(n&&typeof n=="object"){let c=n,f=r;if(typeof c.offset=="number"){let p=this.fromOffset(c.offset);n=p.line,r=p.col}else n=c.line,r=c.column;if(typeof f.offset=="number"){let p=this.fromOffset(f.offset);o=p.line,a=p.col}else o=f.line,a=f.column}else if(!r){let c=this.fromOffset(n);n=c.line,r=c.col}let u=this.origin(n,r,o,a);return u?i=new Oo(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,s.plugin):i=new Oo(e,o===void 0?n:{column:r,line:n},o===void 0?r:{column:a,line:o},this.css,this.file,s.plugin),i.input={column:r,endColumn:a,endLine:o,line:n,source:this.css},this.file&&(or&&(i.input.url=or(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let n,r;if(this[An])r=this[An];else{let i=this.css.split(` -`);r=new Array(i.length);let o=0;for(let a=0,u=i.length;a=n)s=r.length-1;else{let i=r.length-2,o;for(;s>1),e=r[o+1])s=o+1;else{s=o;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Pn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:n,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:s,line:r}));let u;Nn(o.source)?u=or(o.source):u=new URL(o.source,this.map.consumer().sourceRoot||or(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:u.toString()};if(u.protocol==="file:")if(Co)c.file=Co(u);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};No.exports=Ie;Ie.default=Ie;On&&On.registerInput&&On.registerInput(Ie)});var dt=y((Bx,Po)=>{"use strict";var Pf=se(),Rf=ir(),If=qe();function ar(t,e){let n=new If(t,e),r=new Rf(n);try{r.parse()}catch(s){throw s}return r.root}Po.exports=ar;ar.default=ar;Pf.registerParse(ar)});var Ro=y((Fx,Rn)=>{var qf=rr(),Df=qe();Rn.exports={isInlineComment(t){if(t[0]==="word"&&t[1].slice(0,2)==="//"){let e=t,n=[],r,s;for(;t;){if(/\r?\n/.test(t[1])){if(/['"].*\r?\n/.test(t[1])){n.push(t[1].substring(0,t[1].indexOf(` -`))),s=t[1].substring(t[1].indexOf(` -`));let o=this.input.css.valueOf().substring(this.tokenizer.position());s+=o,r=t[3]+o.length-s.length}else this.tokenizer.back(t);break}n.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",n.join(""),e[2],r];return this.inlineComment(i),s&&(this.input=new Df(s),this.tokenizer=qf(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),Rn.exports.isInlineComment.bind(this)(t)}return!1}}});var qo=y(($x,Io)=>{Io.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],n=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&n.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(a=>a[1]),[s]=e,i=e.pop(),o=["word",r.join(""),s[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var Lo=y((Ux,Do)=>{var Lf=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,Mf=/\.[0-9]/,Bf=t=>{let[,e]=t,[n]=e;return(n==="."||n==="#")&&Lf.test(e)===!1&&Mf.test(e)===!1};Do.exports={isMixinToken:Bf}});var Bo=y((Wx,Mo)=>{var Ff=rr(),$f=/^url\((.+)\)/;Mo.exports=t=>{let{name:e,params:n=""}=t;if(e==="import"&&n.length){t.import=!0;let r=Ff({css:n});for(t.filename=n.replace($f,"$1");!r.endOfFile();){let[s,i]=r.nextToken();if(s==="word"&&i==="url")return;if(s==="brackets"){t.options=i,t.filename=n.replace(i,"").trim();break}}}}});var Wo=y((zx,Uo)=>{var Fo=/:$/,$o=/^:(\s+)?/;Uo.exports=t=>{let{name:e,params:n=""}=t;if(t.name.slice(-1)===":"){if(Fo.test(e)){let[r]=e.match(Fo);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if($o.test(n)){let[r]=n.match($o);t.value=n.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var Yo=y((Yx,Vo)=>{var Uf=Ae(),Wf=ir(),{isInlineComment:zf}=Ro(),{interpolation:zo}=qo(),{isMixinToken:Vf}=Lo(),Yf=Bo(),Gf=Wo(),Kf=/(!\s*important)$/i;Vo.exports=class extends Wf{constructor(...e){super(...e),this.lastNode=null}atrule(e){zo.bind(this)(e)||(super.atrule(e),Yf(this.lastNode),Gf(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let n=e.findIndex(a=>a[0]==="("),r=e.reverse().find(a=>a[0]===")"),s=e.reverse().indexOf(r),o=e.splice(n,s).map(a=>a[1]).join("");for(let a of e.reverse())this.tokenizer.back(a);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,n,r){super.init(e,n,r),this.lastNode=e}inlineComment(e){let n=new Uf,r=e[1].slice(2);if(this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.inline=!0,n.raws.begin="//",/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,n.raws.left,n.text,n.raws.right]=s}}mixin(e){let[n]=e,r=n[1].slice(0,1),s=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((s<0||s>3)&&i>0){let c=e.reduce((w,v,R)=>v[0]===")"?R:w),p=e.slice(i,c+i).map(w=>w[1]).join(""),[l]=e.slice(i),g=[l[2],l[3]],[x]=e.slice(c,c+1),h=[x[2],x[3]],d=["brackets",p].concat(g,h),m=e.slice(0,i),b=e.slice(c+1);e=m,e.push(d),e=e.concat(b)}let a=[];for(let c of e)if((c[1]==="!"||a.length)&&a.push(c),c[1]==="important")break;if(a.length){let[c]=a,f=e.indexOf(c),p=a[a.length-1],l=[c[2],c[3]],g=[p[4],p[5]],h=["word",a.map(d=>d[1]).join("")].concat(l,g);e.splice(f,a.length,h)}let u=e.findIndex(c=>Kf.test(c[1]));u>0&&([,o]=e[u],e.splice(u,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){zf.bind(this)(e)||super.other(e)}rule(e){let n=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&n[0]==="{"&&(this.tokenizer.back(n),zo.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[n]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(Vf(n)){this.mixin(e);return}super.unknownWord(e)}}});var Ko=y((Kx,Go)=>{var Hf=Kt();Go.exports=class extends Hf{atrule(e,n){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,n);return}let s=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?s+=e.raws.afterName:i&&(s+=" "),e.nodes)this.block(e,s+i+o);else{let a=(e.raws.between||"")+o+(n?";":"");this.builder(s+i+a,e)}}comment(e){if(e.inline){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${n}${e.text}${r}`,e)}else super.comment(e)}}});var Ho=y((Hx,In)=>{var Qf=qe(),jf=Yo(),Jf=Ko();In.exports={parse(t,e){let n=new Qf(t,e),r=new jf(n);return r.parse(),r.root.walk(s=>{let i=n.css.lastIndexOf(s.source.input.css);if(i===0)return;if(i+s.source.input.css.length!==n.css.length)throw new Error("Invalid state detected in postcss-less");let o=i+s.source.start.offset,a=n.fromOffset(i+s.source.start.offset);if(s.source.start={offset:o,line:a.line,column:a.col},s.source.end){let u=i+s.source.end.offset,c=n.fromOffset(i+s.source.end.offset);s.source.end={offset:u,line:c.line,column:c.col}}}),r.root},stringify(t,e){new Jf(e).stringify(t)},nodeToString(t){let e="";return In.exports.stringify(t,n=>{e+=n}),e}}});var qn=y((Qx,Qo)=>{Qo.exports=class{generate(){}}});var ur=y((Jx,Xo)=>{"use strict";var Xf=se(),jo,Jo,ye=class extends Xf{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new jo(new Jo,this,e).stringify()}};ye.registerLazyResult=t=>{jo=t};ye.registerProcessor=t=>{Jo=t};Xo.exports=ye;ye.default=ye});var Dn=y((Xx,ea)=>{"use strict";var Zo={};ea.exports=function(e){Zo[e]||(Zo[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var Ln=y((Zx,ta)=>{"use strict";var mt=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};ta.exports=mt;mt.default=mt});var lr=y((eb,ra)=>{"use strict";var Zf=Ln(),yt=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new Zf(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};ra.exports=yt;yt.default=yt});var Fn=y((rb,oa)=>{"use strict";var{isClean:K,my:ep}=Yt(),tp=qn(),rp=ot(),np=se(),sp=ur(),tb=Dn(),na=lr(),ip=dt(),op=Pe(),ap={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},up={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},lp={Once:!0,postcssPlugin:!0,prepare:!0},De=0;function gt(t){return typeof t=="object"&&typeof t.then=="function"}function ia(t){let e=!1,n=ap[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,De,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,De,n+"Exit"]:[n,n+"Exit"]}function sa(t){let e;return t.type==="document"?e=["Document",De,"DocumentExit"]:t.type==="root"?e=["Root",De,"RootExit"]:e=ia(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Mn(t){return t[K]=!1,t.nodes&&t.nodes.forEach(e=>Mn(e)),t}var Bn={},oe=class t{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=Mn(n);else if(n instanceof t||n instanceof na)s=Mn(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let i=ip;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{s=i(n,r)}catch(o){this.processed=!0,this.error=o}s&&!s[ep]&&np.rebuild(s)}this.result=new na(e,s,r),this.helpers={...Bn,postcss:Bn,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!up[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!lp[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let r=this.visitTick(n);if(gt(r))try{await r}catch(s){let i=n[n.length-1].node;throw this.handleError(s,i)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(i=>r(i,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return gt(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=rp;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new tp(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(gt(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[K];)e[K]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let i;try{i=s(n,this.helpers)}catch(o){throw this.handleError(o,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(gt(i))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex{s[K]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};oe.registerPostcss=t=>{Bn=t};oa.exports=oe;oe.default=oe;op.registerLazyResult(oe);sp.registerLazyResult(oe)});var ua=y((sb,aa)=>{"use strict";var cp=qn(),fp=ot(),nb=Dn(),pp=dt(),hp=lr(),wt=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,i=fp;this.result=new hp(this._processor,s,this._opts),this.result.css=n;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new cp(i,s,this._opts,n);if(a.isMap()){let[u,c]=a.generate();u&&(this.result.css=u),c&&(this.result.map=c)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=pp;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};aa.exports=wt;wt.default=wt});var ca=y((ib,la)=>{"use strict";var dp=ua(),mp=Fn(),yp=ur(),gp=Pe(),ge=class{constructor(e=[]){this.version="8.4.31",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return this.plugins.length===0&&typeof n.parser>"u"&&typeof n.stringifier>"u"&&typeof n.syntax>"u"?new dp(this,e,n):new mp(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};la.exports=ge;ge.default=ge;gp.registerProcessor(ge);yp.registerProcessor(ge)});var pa=y((ob,fa)=>{"use strict";var wp=ct(),vp=Cn(),xp=Ae(),bp=nr(),kp=qe(),_p=Pe(),Tp=sr();function vt(t,e){if(Array.isArray(t))return t.map(s=>vt(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let i={...s,__proto__:kp.prototype};i.map&&(i.map={...i.map,__proto__:vp.prototype}),e.push(i)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>vt(s,e))),r.source){let{inputId:s,...i}=r.source;r.source=i,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new _p(r);if(r.type==="decl")return new wp(r);if(r.type==="rule")return new Tp(r);if(r.type==="comment")return new xp(r);if(r.type==="atrule")return new bp(r);throw new Error("Unknown node type: "+t.type)}fa.exports=vt;vt.default=vt});var cr=y((ab,va)=>{"use strict";var Ep=Gt(),ha=ct(),Sp=Fn(),Cp=se(),$n=ca(),Op=ot(),Ap=pa(),da=ur(),Np=Ln(),ma=Ae(),ya=nr(),Pp=lr(),Rp=qe(),Ip=dt(),qp=En(),ga=sr(),wa=Pe(),Dp=ut();function k(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new $n(t)}k.plugin=function(e,n){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: -https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let a=n(...o);return a.postcssPlugin=e,a.postcssVersion=new $n().version,a}let i;return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(o,a,u){return k([s(u)]).process(o,a)},s};k.stringify=Op;k.parse=Ip;k.fromJSON=Ap;k.list=qp;k.comment=t=>new ma(t);k.atRule=t=>new ya(t);k.decl=t=>new ha(t);k.rule=t=>new ga(t);k.root=t=>new wa(t);k.document=t=>new da(t);k.CssSyntaxError=Ep;k.Declaration=ha;k.Container=Cp;k.Processor=$n;k.Document=da;k.Comment=ma;k.Warning=Np;k.AtRule=ya;k.Result=Pp;k.Input=Rp;k.Rule=ga;k.Root=wa;k.Node=Dp;Sp.registerPostcss(k);va.exports=k;k.default=k});var ba=y((ub,xa)=>{var{Container:Lp}=cr(),Un=class extends Lp{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};xa.exports=Un});var Ca=y((lb,Sa)=>{"use strict";var Wn="'".charCodeAt(0),zn='"'.charCodeAt(0),xt="\\".charCodeAt(0),fr="/".charCodeAt(0),Vn=` -`.charCodeAt(0),pr=" ".charCodeAt(0),Yn="\f".charCodeAt(0),Gn=" ".charCodeAt(0),Kn="\r".charCodeAt(0),Mp="[".charCodeAt(0),Bp="]".charCodeAt(0),ka="(".charCodeAt(0),_a=")".charCodeAt(0),hr="{".charCodeAt(0),Ta="}".charCodeAt(0),Fp=";".charCodeAt(0),$p="*".charCodeAt(0),Up=":".charCodeAt(0),Wp="@".charCodeAt(0),zp=",".charCodeAt(0),Hn="#".charCodeAt(0),dr=/[\t\n\f\r "#'()/;[\\\]{}]/g,mr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Vp=/.[\r\n"'(/\\]/,Ea=/[\da-f]/i,yr=/[\n\f\r]/g;Sa.exports=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,i,o,a,u,c,f,p,l,g,x=r.length,h=0,d=[],m=[],b;function w(){return h}function v(S){throw e.error("Unclosed "+S,h)}function R(){return m.length===0&&h>=x}function $(){let S=1,C=!1,O=!1;for(;S>0;)o+=1,r.length<=o&&v("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),C?!O&&i===C?(C=!1,O=!1):i===xt?O=!O:O&&(O=!1):i===Wn||i===zn?C=i:i===Ta?S-=1:i===Hn&&l===hr&&(S+=1)}function H(S){if(m.length)return m.pop();if(h>=x)return;let C=S?S.ignoreUnclosed:!1;switch(i=r.charCodeAt(h),i){case Vn:case pr:case Gn:case Kn:case Yn:{o=h;do o+=1,i=r.charCodeAt(o);while(i===pr||i===Vn||i===Gn||i===Kn||i===Yn);g=["space",r.slice(h,o)],h=o-1;break}case Mp:case Bp:case hr:case Ta:case Up:case Fp:case _a:{let O=String.fromCharCode(i);g=[O,O,h];break}case zp:{g=["word",",",h,h+1];break}case ka:{if(p=d.length?d.pop()[1]:"",l=r.charCodeAt(h+1),p==="url"&&l!==Wn&&l!==zn){for(b=1,f=!1,o=h+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===xt)f=!f;else if(l===ka)b+=1;else if(l===_a&&(b-=1,b===0))break;o+=1}u=r.slice(h,o+1),g=["brackets",u,h,o],h=o}else o=r.indexOf(")",h+1),u=r.slice(h,o+1),o===-1||Vp.test(u)?g=["(","(",h]:(g=["brackets",u,h,o],h=o);break}case Wn:case zn:{for(a=i,o=h,f=!1;o{var{Comment:Yp}=cr(),Gp=ir(),Kp=ba(),Hp=Ca(),Qn=class extends Gp{atrule(e){let n=e[1],r=e;for(;!this.tokenizer.endOfFile();){let s=this.tokenizer.nextToken();if(s[0]==="word"&&s[2]===r[3]+1)n+=s[1],r=s;else{this.tokenizer.back(s);break}}super.atrule(["at-word",n,e[2],r[3]])}comment(e){if(e[4]==="inline"){let n=new Yp;this.init(n,e[2]),n.raws.inline=!0;let r=this.input.fromOffset(e[3]);n.source.end={column:r.col,line:r.line,offset:e[3]+1};let s=e[1].slice(2);if(/^\s*$/.test(s))n.text="",n.raws.left=s,n.raws.right="";else{let i=s.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");n.text=o,n.raws.left=i[1],n.raws.right=i[3],n.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=Hp(this.input)}raw(e,n,r,s){if(super.raw(e,n,r,s),e.raws[n]){let i=e.raws[n].raw;e.raws[n].raw=r.reduce((o,a)=>{if(a[0]==="comment"&&a[4]==="inline"){let u=a[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+u+"*/"}else return o+a[1]},""),i!==e.raws[n].raw&&(e.raws[n].scss=i)}}rule(e){let n=!1,r=0,s="";for(let i of e)if(n)i[0]!=="comment"&&i[0]!=="{"&&(s+=i[1]);else{if(i[0]==="space"&&i[1].includes(` -`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(n=!0)}if(!n||s.trim()===""||/^[#:A-Za-z-]/.test(s))super.rule(e);else{e.pop();let i=new Kp;this.init(i,e[0][2]);let o;for(let u=e.length-1;u>=0;u--)if(e[u][0]!=="space"){o=e[u];break}if(o[3]){let u=this.input.fromOffset(o[3]);i.source.end={column:u.col,line:u.line,offset:o[3]+1}}else{let u=this.input.fromOffset(o[2]);i.source.end={column:u.col,line:u.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let u=this.input.fromOffset(e[0][2]);i.source.start={column:u.col,line:u.line,offset:e[0][2]}}for(i.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let a;for(;e.length;)if(a=e.shift(),a[0]===":"){i.raws.between+=a[1];break}else i.raws.between+=a[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let u=e.length-1;u>0;u--){if(a=e[u],a[1]==="!important"){i.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(a[1]==="important"){let c=e.slice(0),f="";for(let p=u;p>0;p--){let l=c[p][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(a[0]!=="space"&&a[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};Oa.exports=Qn});var Pa=y((fb,Na)=>{var{Input:Qp}=cr(),jp=Aa();Na.exports=function(e,n){let r=new Qp(e,n),s=new jp(r);return s.parse(),s.root}});var V=y((yb,Da)=>{"use strict";var jn=function(t,e){let n=new t.constructor;for(let r in t){if(!t.hasOwnProperty(r))continue;let s=t[r],i=typeof s;r==="parent"&&i==="object"?e&&(n[r]=e):r==="source"?n[r]=s:s instanceof Array?n[r]=s.map(o=>jn(o,n)):r!=="before"&&r!=="after"&&r!=="between"&&r!=="semicolon"&&(i==="object"&&s!==null&&(s=jn(s)),n[r]=s)}return n};Da.exports=class{constructor(e){e=e||{},this.raws={before:"",after:""};for(let n in e)this[n]=e[n]}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 n=jn(this);for(let r in e)n[r]=e[r];return n}cloneBefore(e){e=e||{};let n=this.clone(e);return this.parent.insertBefore(this,n),n}cloneAfter(e){e=e||{};let n=this.clone(e);return this.parent.insertAfter(this,n),n}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let n of e)this.parent.insertBefore(this,n);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 n in this){if(!this.hasOwnProperty(n)||n==="parent")continue;let r=this[n];r instanceof Array?e[n]=r.map(s=>typeof s=="object"&&s.toJSON?s.toJSON():s):typeof r=="object"&&r.toJSON?e[n]=r.toJSON():e[n]=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 n=this.toString(),r=this.source.start.column,s=this.source.start.line;for(let i=0;i{"use strict";var th=V(),Le=class extends th{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 n=this.lastEach,r,s;if(this.indexes[n]=0,!!this.nodes){for(;this.indexes[n]{let s=e(n,r);return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkType(e,n){if(!e||!n)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((s,i)=>{if(r&&s instanceof e||!r&&s.type===e)return n.call(this,s,i)})}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 n of this.nodes)n.cleanRaws(e)}insertAfter(e,n){let r=this.index(e),s;this.nodes.splice(r+1,0,n);for(let i in this.indexes)s=this.indexes[i],r<=s&&(this.indexes[i]=s+this.nodes.length);return this}insertBefore(e,n){let r=this.index(e),s;this.nodes.splice(r,0,n);for(let i in this.indexes)s=this.indexes[i],r<=s&&(this.indexes[i]=s+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-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 typeof e=="number"?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}};Le.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!Le.prototype[e]&&(Le.prototype[e]=function(n){return this.walkType(t,n)})};La.exports=Le});var Ba=y((vb,Ma)=>{"use strict";var rh=B();Ma.exports=class extends rh{constructor(e){super(e),this.type="root"}}});var $a=y((bb,Fa)=>{"use strict";var nh=B();Fa.exports=class extends nh{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var za=y((kb,Wa)=>{"use strict";var Ua=B(),gr=class extends Ua{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};Ua.registerWalker(gr);Wa.exports=gr});var Ya=y((_b,Va)=>{"use strict";var sh=B(),ih=V(),wr=class extends ih{constructor(e){super(e),this.type="colon"}};sh.registerWalker(wr);Va.exports=wr});var Ka=y((Tb,Ga)=>{"use strict";var oh=B(),ah=V(),vr=class extends ah{constructor(e){super(e),this.type="comma"}};oh.registerWalker(vr);Ga.exports=vr});var Qa=y((Eb,Ha)=>{"use strict";var uh=B(),lh=V(),xr=class extends lh{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("")}};uh.registerWalker(xr);Ha.exports=xr});var Xa=y((Sb,Ja)=>{"use strict";var ja=B(),br=class extends ja{constructor(e){super(e),this.type="func",this.unbalanced=-1}};ja.registerWalker(br);Ja.exports=br});var eu=y((Cb,Za)=>{"use strict";var ch=B(),fh=V(),kr=class extends fh{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("")}};ch.registerWalker(kr);Za.exports=kr});var ru=y((Ob,tu)=>{"use strict";var ph=B(),hh=V(),_r=class extends hh{constructor(e){super(e),this.type="operator"}};ph.registerWalker(_r);tu.exports=_r});var su=y((Ab,nu)=>{"use strict";var dh=B(),mh=V(),Tr=class extends mh{constructor(e){super(e),this.type="paren",this.parenType=""}};dh.registerWalker(Tr);nu.exports=Tr});var ou=y((Nb,iu)=>{"use strict";var yh=B(),gh=V(),Er=class extends gh{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("")}};yh.registerWalker(Er);iu.exports=Er});var uu=y((Pb,au)=>{"use strict";var wh=B(),vh=V(),Sr=class extends vh{constructor(e){super(e),this.type="word"}};wh.registerWalker(Sr);au.exports=Sr});var cu=y((Rb,lu)=>{"use strict";var xh=B(),bh=V(),Cr=class extends bh{constructor(e){super(e),this.type="unicode-range"}};xh.registerWalker(Cr);lu.exports=Cr});var pu=y((Ib,fu)=>{"use strict";var Jn=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while tokzenizing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};fu.exports=Jn});var vu=y((qb,wu)=>{"use strict";var kh="{".charCodeAt(0),_h="}".charCodeAt(0),Th="(".charCodeAt(0),Eh=")".charCodeAt(0),hu="'".charCodeAt(0),Sh='"'.charCodeAt(0),du="\\".charCodeAt(0),Or="/".charCodeAt(0),Ch=".".charCodeAt(0),Oh=",".charCodeAt(0),Ah=":".charCodeAt(0),Xn="*".charCodeAt(0),Ar="-".charCodeAt(0),Zn="+".charCodeAt(0),Nh="#".charCodeAt(0),bt=` -`.charCodeAt(0),es=" ".charCodeAt(0),ts="\f".charCodeAt(0),rs=" ".charCodeAt(0),ns="\r".charCodeAt(0),Ph="@".charCodeAt(0),Rh="e".charCodeAt(0),Ih="E".charCodeAt(0),mu="0".charCodeAt(0),yu="9".charCodeAt(0),qh="u".charCodeAt(0),Dh="U".charCodeAt(0),Nr=/[ \n\t\r\{\(\)'"\\;,/]/g,Lh=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g,Me=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g,Mh=/^[a-z0-9]/i,Bh=/^[a-f0-9?\-]/i,gu=pu();wu.exports=function(e,n){n=n||{};let r=[],s=e.valueOf(),i=s.length,o=-1,a=1,u=0,c=0,f=null,p,l,g,x,h,d,m,b,w,v,R,$;function H(S){let C=`Unclosed ${S} at line: ${a}, column: ${u-o}, token: ${u}`;throw new gu(C)}function U(){let S=`Syntax error at line: ${a}, column: ${u-o}, token: ${u}`;throw new gu(S)}for(;u0&&r[r.length-1][0]==="word"&&r[r.length-1][1]==="url",r.push(["(","(",a,u-o,a,l-o,u]);break;case Eh:c--,f=f&&c>0,r.push([")",")",a,u-o,a,l-o,u]);break;case hu:case Sh:g=p===hu?"'":'"',l=u;do for(v=!1,l=s.indexOf(g,l+1),l===-1&&H("quote",g),R=l;s.charCodeAt(R-1)===du;)R-=1,v=!v;while(v);r.push(["string",s.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case Ph:Nr.lastIndex=u+1,Nr.test(s),Nr.lastIndex===0?l=s.length-1:l=Nr.lastIndex-2,r.push(["atword",s.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case du:l=u,p=s.charCodeAt(l+1),m&&p!==Or&&p!==es&&p!==bt&&p!==rs&&p!==ns&&p!==ts&&(l+=1),r.push(["word",s.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case Zn:case Ar:case Xn:l=u+1,$=s.slice(u+1,l+1);let S=s.slice(u-1,u);if(p===Ar&&$.charCodeAt(0)===Ar){l++,r.push(["word",s.slice(u,l),a,u-o,a,l-o,u]),u=l-1;break}r.push(["operator",s.slice(u,l),a,u-o,a,l-o,u]),u=l-1;break;default:if(p===Or&&(s.charCodeAt(u+1)===Xn||n.loose&&!f&&s.charCodeAt(u+1)===Or)){if(s.charCodeAt(u+1)===Xn)l=s.indexOf("*/",u+2)+1,l===0&&H("comment","*/");else{let O=s.indexOf(` -`,u+2);l=O!==-1?O-1:i}d=s.slice(u,l+1),x=d.split(` -`),h=x.length-1,h>0?(b=a+h,w=l-x[h].length):(b=a,w=o),r.push(["comment",d,a,u-o,b,l-w,u]),o=w,a=b,u=l}else if(p===Nh&&!Mh.test(s.slice(u+1,u+2)))l=u+1,r.push(["#",s.slice(u,l),a,u-o,a,l-o,u]),u=l-1;else if((p===qh||p===Dh)&&s.charCodeAt(u+1)===Zn){l=u+2;do l+=1,p=s.charCodeAt(l);while(l=mu&&p<=yu&&(C=Me),C.lastIndex=u+1,C.test(s),C.lastIndex===0?l=s.length-1:l=C.lastIndex-2,C===Me||p===Ch){let O=s.charCodeAt(l),ve=s.charCodeAt(l+1),Ss=s.charCodeAt(l+2);(O===Rh||O===Ih)&&(ve===Ar||ve===Zn)&&Ss>=mu&&Ss<=yu&&(Me.lastIndex=l+2,Me.test(s),Me.lastIndex===0?l=s.length-1:l=Me.lastIndex-2)}r.push(["word",s.slice(u,l+1),a,u-o,a,l-o,u]),u=l}break}u++}return r}});var ss=y((Db,xu)=>{xu.exports=function(e,n){if(n=typeof n=="number"?n:1/0,!n)return Array.isArray(e)?e.map(function(s){return s}):e;return r(e,1);function r(s,i){return s.reduce(function(o,a){return Array.isArray(a)&&i{bu.exports=function(t,e){for(var n=-1,r=[];(n=t.indexOf(e,n+1))!==-1;)r.push(n);return r}});var os=y((Mb,ku)=>{"use strict";function Fh(t,e){for(var n=1,r=t.length,s=t[0],i=t[0],o=1;o{"use strict";var as=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};_u.exports=as});var Ou=y(($b,Cu)=>{"use strict";var Wh=Ba(),zh=$a(),Vh=za(),Yh=Ya(),Gh=Ka(),Kh=Qa(),Hh=Xa(),Qh=eu(),jh=ru(),Eu=su(),Jh=ou(),Su=uu(),Xh=cu(),Zh=vu(),ed=ss(),td=is(),rd=os(),nd=Tu();function sd(t){return t.sort((e,n)=>e-n)}Cu.exports=class{constructor(e,n){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,n),this.position=0,this.unbalanced=0,this.root=new Wh;let s=new zh;this.root.append(s),this.current=s,this.tokens=Zh(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new Yh({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 Gh({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=!1,n=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&n.startsWith("//")&&(n=n.substring(2),e=!0),r=new Kh({value:n,inline:e,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(r),this.position++}error(e,n){throw new nd(e+` at line: ${n[2]}, column ${n[3]}`)}loop(){for(;this.position0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return n=new jh({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(n)}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();break}}parenOpen(){let e=1,n=this.position+1,r=this.currToken,s;for(;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()))}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 Xh({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=this.nextToken,n=this.currToken[1],r=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/,s=/^(?!\#([a-z0-9]+))[\#\{\}]/gi,i,o;if(!s.test(n))for(;e&&e[0]==="word";){this.position++;let a=this.currToken[1];n+=a,e=this.nextToken}i=td(n,"@"),o=sd(rd(ed([[0],i]))),o.forEach((a,u)=>{let c=o[u+1]||n.length,f=n.slice(a,c),p;if(~i.indexOf(a))p=new Vh({value:f.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u]});else if(r.test(this.currToken[1])){let l=f.replace(r,"");p=new Qh({value:f.replace(l,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u],unit:l})}else p=new(e&&e[0]==="("?Hh:Su)({value:f,source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u]}),p.type==="word"?(p.isHex=/^#(.+)/.test(f),p.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(p)}),this.position++}string(){let e=this.currToken,n=this.currToken[1],r=/^(\"|\')/,s=r.test(n),i="",o;s&&(i=n.match(r)[0],n=n.slice(1,n.length-1)),o=new Jh({value:n,source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6],quoted:s}),o.raws.quote=i,this.newNode(o),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]}}});var we=y((Rr,qu)=>{"use strict";Rr.__esModule=!0;var Iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function cd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var fd=function t(e,n){if((typeof e>"u"?"undefined":Iu(e))!=="object")return e;var r=new e.constructor;for(var s in e)if(e.hasOwnProperty(s)){var i=e[s],o=typeof i>"u"?"undefined":Iu(i);s==="parent"&&o==="object"?n&&(r[s]=n):i instanceof Array?r[s]=i.map(function(a){return t(a,r)}):r[s]=t(i,r)}return r},pd=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cd(this,t);for(var n in e)this[n]=e[n];var r=e.spaces;r=r===void 0?{}:r;var s=r.before,i=s===void 0?"":s,o=r.after,a=o===void 0?"":o;this.spaces={before:i,after:a}}return t.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.prototype.replaceWith=function(){if(this.parent){for(var n in arguments)this.parent.insertBefore(this,arguments[n]);this.remove()}return this},t.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},t.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},t.prototype.clone=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=fd(this);for(var s in n)r[s]=n[s];return r},t.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join("")},t}();Rr.default=pd;qu.exports=Rr.default});var L=y(F=>{"use strict";F.__esModule=!0;var Hb=F.TAG="tag",Qb=F.STRING="string",jb=F.SELECTOR="selector",Jb=F.ROOT="root",Xb=F.PSEUDO="pseudo",Zb=F.NESTING="nesting",ek=F.ID="id",tk=F.COMMENT="comment",rk=F.COMBINATOR="combinator",nk=F.CLASS="class",sk=F.ATTRIBUTE="attribute",ik=F.UNIVERSAL="universal"});var qr=y((Ir,Du)=>{"use strict";Ir.__esModule=!0;var hd=function(){function t(e,n){for(var r=0;r=r&&(this.indexes[i]=s-1);return this},e.prototype.removeAll=function(){for(var i=this.nodes,r=Array.isArray(i),s=0,i=r?i:i[Symbol.iterator]();;){var o;if(r){if(s>=i.length)break;o=i[s++]}else{if(s=i.next(),s.done)break;o=s.value}var a=o;a.parent=void 0}return this.nodes=[],this},e.prototype.empty=function(){return this.removeAll()},e.prototype.insertAfter=function(r,s){var i=this.index(r);this.nodes.splice(i+1,0,s);var o=void 0;for(var a in this.indexes)o=this.indexes[a],i<=o&&(this.indexes[a]=o+this.nodes.length);return this},e.prototype.insertBefore=function(r,s){var i=this.index(r);this.nodes.splice(i,0,s);var o=void 0;for(var a in this.indexes)o=this.indexes[a],i<=o&&(this.indexes[a]=o+this.nodes.length);return this},e.prototype.each=function(r){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var s=this.lastEach;if(this.indexes[s]=0,!!this.length){for(var i=void 0,o=void 0;this.indexes[s]{"use strict";Dr.__esModule=!0;var _d=qr(),Td=Sd(_d),Ed=L();function Sd(t){return t&&t.__esModule?t:{default:t}}function Cd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Od(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ad(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Nd=function(t){Ad(e,t);function e(n){Cd(this,e);var r=Od(this,t.call(this,n));return r.type=Ed.ROOT,r}return e.prototype.toString=function(){var r=this.reduce(function(s,i){var o=String(i);return o?s+o+",":""},"").slice(0,-1);return this.trailingComma?r+",":r},e}(Td.default);Dr.default=Nd;Lu.exports=Dr.default});var Fu=y((Lr,Bu)=>{"use strict";Lr.__esModule=!0;var Pd=qr(),Rd=qd(Pd),Id=L();function qd(t){return t&&t.__esModule?t:{default:t}}function Dd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ld(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Md(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Bd=function(t){Md(e,t);function e(n){Dd(this,e);var r=Ld(this,t.call(this,n));return r.type=Id.SELECTOR,r}return e}(Rd.default);Lr.default=Bd;Bu.exports=Lr.default});var Be=y((Mr,$u)=>{"use strict";Mr.__esModule=!0;var Fd=function(){function t(e,n){for(var r=0;r{"use strict";Br.__esModule=!0;var Kd=Be(),Hd=jd(Kd),Qd=L();function jd(t){return t&&t.__esModule?t:{default:t}}function Jd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Zd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var em=function(t){Zd(e,t);function e(n){Jd(this,e);var r=Xd(this,t.call(this,n));return r.type=Qd.CLASS,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"."+this.value,this.spaces.after].join("")},e}(Hd.default);Br.default=em;Uu.exports=Br.default});var Vu=y((Fr,zu)=>{"use strict";Fr.__esModule=!0;var tm=we(),rm=sm(tm),nm=L();function sm(t){return t&&t.__esModule?t:{default:t}}function im(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function om(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function am(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var um=function(t){am(e,t);function e(n){im(this,e);var r=om(this,t.call(this,n));return r.type=nm.COMMENT,r}return e}(rm.default);Fr.default=um;zu.exports=Fr.default});var Gu=y(($r,Yu)=>{"use strict";$r.__esModule=!0;var lm=Be(),cm=pm(lm),fm=L();function pm(t){return t&&t.__esModule?t:{default:t}}function hm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dm(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function mm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ym=function(t){mm(e,t);function e(n){hm(this,e);var r=dm(this,t.call(this,n));return r.type=fm.ID,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"#"+this.value,this.spaces.after].join("")},e}(cm.default);$r.default=ym;Yu.exports=$r.default});var Hu=y((Ur,Ku)=>{"use strict";Ur.__esModule=!0;var gm=Be(),wm=xm(gm),vm=L();function xm(t){return t&&t.__esModule?t:{default:t}}function bm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function km(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function _m(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Tm=function(t){_m(e,t);function e(n){bm(this,e);var r=km(this,t.call(this,n));return r.type=vm.TAG,r}return e}(wm.default);Ur.default=Tm;Ku.exports=Ur.default});var ju=y((Wr,Qu)=>{"use strict";Wr.__esModule=!0;var Em=we(),Sm=Om(Em),Cm=L();function Om(t){return t&&t.__esModule?t:{default:t}}function Am(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nm(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Pm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Rm=function(t){Pm(e,t);function e(n){Am(this,e);var r=Nm(this,t.call(this,n));return r.type=Cm.STRING,r}return e}(Sm.default);Wr.default=Rm;Qu.exports=Wr.default});var Xu=y((zr,Ju)=>{"use strict";zr.__esModule=!0;var Im=qr(),qm=Lm(Im),Dm=L();function Lm(t){return t&&t.__esModule?t:{default:t}}function Mm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bm(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Fm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var $m=function(t){Fm(e,t);function e(n){Mm(this,e);var r=Bm(this,t.call(this,n));return r.type=Dm.PSEUDO,r}return e.prototype.toString=function(){var r=this.length?"("+this.map(String).join(",")+")":"";return[this.spaces.before,String(this.value),r,this.spaces.after].join("")},e}(qm.default);zr.default=$m;Ju.exports=zr.default});var el=y((Vr,Zu)=>{"use strict";Vr.__esModule=!0;var Um=Be(),Wm=Vm(Um),zm=L();function Vm(t){return t&&t.__esModule?t:{default:t}}function Ym(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gm(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Km(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Hm=function(t){Km(e,t);function e(n){Ym(this,e);var r=Gm(this,t.call(this,n));return r.type=zm.ATTRIBUTE,r.raws={},r}return e.prototype.toString=function(){var r=[this.spaces.before,"[",this.ns,this.attribute];return this.operator&&r.push(this.operator),this.value&&r.push(this.value),this.raws.insensitive?r.push(this.raws.insensitive):this.insensitive&&r.push(" i"),r.push("]"),r.concat(this.spaces.after).join("")},e}(Wm.default);Vr.default=Hm;Zu.exports=Vr.default});var rl=y((Yr,tl)=>{"use strict";Yr.__esModule=!0;var Qm=Be(),jm=Xm(Qm),Jm=L();function Xm(t){return t&&t.__esModule?t:{default:t}}function Zm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ey(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ty(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ry=function(t){ty(e,t);function e(n){Zm(this,e);var r=ey(this,t.call(this,n));return r.type=Jm.UNIVERSAL,r.value="*",r}return e}(jm.default);Yr.default=ry;tl.exports=Yr.default});var sl=y((Gr,nl)=>{"use strict";Gr.__esModule=!0;var ny=we(),sy=oy(ny),iy=L();function oy(t){return t&&t.__esModule?t:{default:t}}function ay(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uy(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ly(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var cy=function(t){ly(e,t);function e(n){ay(this,e);var r=uy(this,t.call(this,n));return r.type=iy.COMBINATOR,r}return e}(sy.default);Gr.default=cy;nl.exports=Gr.default});var ol=y((Kr,il)=>{"use strict";Kr.__esModule=!0;var fy=we(),py=dy(fy),hy=L();function dy(t){return t&&t.__esModule?t:{default:t}}function my(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yy(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function gy(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var wy=function(t){gy(e,t);function e(n){my(this,e);var r=yy(this,t.call(this,n));return r.type=hy.NESTING,r.value="&",r}return e}(py.default);Kr.default=wy;il.exports=Kr.default});var ul=y((Hr,al)=>{"use strict";Hr.__esModule=!0;Hr.default=vy;function vy(t){return t.sort(function(e,n){return e-n})}al.exports=Hr.default});var gl=y((Jr,yl)=>{"use strict";Jr.__esModule=!0;Jr.default=Ny;var ll=39,xy=34,us=92,cl=47,kt=10,ls=32,cs=12,fs=9,ps=13,fl=43,pl=62,hl=126,dl=124,by=44,ky=40,_y=41,Ty=91,Ey=93,Sy=59,ml=42,Cy=58,Oy=38,Ay=64,Qr=/[ \n\t\r\{\(\)'"\\;/]/g,jr=/[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;function Ny(t){for(var e=[],n=t.css.valueOf(),r=void 0,s=void 0,i=void 0,o=void 0,a=void 0,u=void 0,c=void 0,f=void 0,p=void 0,l=void 0,g=void 0,x=n.length,h=-1,d=1,m=0,b=function(v,R){if(t.safe)n+=R,s=n.length-1;else throw t.error("Unclosed "+v,d,m-h,m)};m0?(f=d+a,p=s-o[a].length):(f=d,p=h),e.push(["comment",u,d,m-h,f,s-p,m]),h=p,d=f,m=s):(jr.lastIndex=m+1,jr.test(n),jr.lastIndex===0?s=n.length-1:s=jr.lastIndex-2,e.push(["word",n.slice(m,s+1),d,m-h,d,s-h,m]),m=s);break}m++}return e}yl.exports=Jr.default});var xl=y((Xr,vl)=>{"use strict";Xr.__esModule=!0;var Py=function(){function t(e,n){for(var r=0;r1?(o[0]===""&&(o[0]=!0),a.attribute=this.parseValue(o[2]),a.namespace=this.parseNamespace(o[0])):a.attribute=this.parseValue(i[0]),r=new Zy.default(a),i[2]){var u=i[2].split(/(\s+i\s*?)$/),c=u[0].trim();r.value=this.lossy?c:u[0],u[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=u[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var n=new ng.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&&n.nextToken&&n.nextToken[0]==="("&&n.error("Misplaced parenthesis.")})}else this.error('Unexpected "'+this.currToken[0]+'" found.')},t.prototype.space=function(){var n=this.currToken;this.position===0||this.prevToken[0]===","||this.prevToken[0]==="("?(this.spaces=this.parseSpace(n[1]),this.position++):this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.spaces.after=this.parseSpace(n[1]),this.position++):this.combinator()},t.prototype.string=function(){var n=this.currToken;this.newNode(new Qy.default({value:this.currToken[1],source:{start:{line:n[2],column:n[3]},end:{line:n[4],column:n[5]}},sourceIndex:n[6]})),this.position++},t.prototype.universal=function(n){var r=this.nextToken;if(r&&r[1]==="|")return this.position++,this.namespace();this.newNode(new tg.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]}),n),this.position++},t.prototype.splitWord=function(n,r){for(var s=this,i=this.nextToken,o=this.currToken[1];i&&i[0]==="word";){this.position++;var a=this.currToken[1];if(o+=a,a.lastIndexOf("\\")===a.length-1){var u=this.nextToken;u&&u[0]==="space"&&(o+=this.parseSpace(u[1]," "),this.position++)}i=this.nextToken}var c=(0,hs.default)(o,"."),f=(0,hs.default)(o,"#"),p=(0,hs.default)(o,"#{");p.length&&(f=f.filter(function(g){return!~p.indexOf(g)}));var l=(0,ag.default)((0,Ly.default)((0,Iy.default)([[0],c,f])));l.forEach(function(g,x){var h=l[x+1]||o.length,d=o.slice(g,h);if(x===0&&r)return r.call(s,d,l.length);var m=void 0;~c.indexOf(g)?m=new Uy.default({value:d.slice(1),source:{start:{line:s.currToken[2],column:s.currToken[3]+g},end:{line:s.currToken[4],column:s.currToken[3]+(h-1)}},sourceIndex:s.currToken[6]+l[x]}):~f.indexOf(g)?m=new Yy.default({value:d.slice(1),source:{start:{line:s.currToken[2],column:s.currToken[3]+g},end:{line:s.currToken[4],column:s.currToken[3]+(h-1)}},sourceIndex:s.currToken[6]+l[x]}):m=new Ky.default({value:d,source:{start:{line:s.currToken[2],column:s.currToken[3]+g},end:{line:s.currToken[4],column:s.currToken[3]+(h-1)}},sourceIndex:s.currToken[6]+l[x]}),s.newNode(m,n)}),this.position++},t.prototype.word=function(n){var r=this.nextToken;return r&&r[1]==="|"?(this.position++,this.namespace()):this.splitWord(n)},t.prototype.loop=function(){for(;this.position{"use strict";Zr.__esModule=!0;var dg=function(){function t(e,n){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},s=new yg.default({css:n,error:function(o){throw new Error(o)},options:r});return this.res=s,this.func(s),this},dg(t,[{key:"result",get:function(){return String(this.res)}}]),t}();Zr.default=vg;bl.exports=Zr.default});var gs=y(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});function _g(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}ys.default=_g});var vs=y(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});var Tg=gs(),Sl=Eg(Tg);function Eg(t){return t&&t.__esModule?t:{default:t}}function _t(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(n){n.parent=e})}_t.prototype=Object.create(Sl.default.prototype);_t.constructor=Sl.default;_t.prototype.walk=function(e,n){for(var r=typeof e=="string"||e instanceof RegExp,s=r?n:e,i=typeof e=="string"?new RegExp(e):e,o=0;o{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.parseMediaFeature=Al;Tt.parseMediaQuery=bs;Tt.parseMediaList=Og;var Sg=gs(),Cl=Ol(Sg),Cg=vs(),xs=Ol(Cg);function Ol(t){return t&&t.__esModule?t:{default:t}}function Al(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],n=[{mode:"normal",character:null}],r=[],s=0,i="",o=null,a=null,u=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),u++);for(var f=0;f0&&(n[c-1].after=i.before),i.type===void 0){if(c>0){if(n[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(n[c-1].value==="not"||n[c-1].value==="only"){i.type="media-type";continue}if(n[c-1].value==="and"){i.type="media-feature-expression";continue}n[c-1].type==="media-type"&&(n[c+1]?i.type=n[c+1].type==="media-feature-expression"?"keyword":"media-feature-expression":i.type="media-feature-expression")}if(c===0){if(!n[c+1]){i.type="media-type";continue}if(n[c+1]&&(n[c+1].type==="media-feature-expression"||n[c+1].type==="keyword")){i.type="media-type";continue}if(n[c+2]){if(n[c+2].type==="media-feature-expression"){i.type="media-type",n[c+1].type="keyword";continue}if(n[c+2].type==="keyword"){i.type="keyword",n[c+1].type="media-type";continue}}if(n[c+3]&&n[c+3].type==="media-feature-expression"){i.type="keyword",n[c+1].type="media-type",n[c+2].type="keyword";continue}}}return n}function Og(t){var e=[],n=0,r=0,s=/^(\s*)url\s*\(/.exec(t);if(s!==null){for(var i=s[0].length,o=1;o>0;){var a=t[i];a==="("&&o++,a===")"&&o--,i++}e.unshift(new Cl.default({type:"url",value:t.substring(0,i).trim(),sourceIndex:s[1].length,before:s[1],after:/^(\s*)/.exec(t.substring(i))[1]})),n=i}for(var u=n;u{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.default=Ig;var Ag=vs(),Ng=Rg(Ag),Pg=Nl();function Rg(t){return t&&t.__esModule?t:{default:t}}function Ig(t){return new Ng.default({nodes:(0,Pg.parseMediaList)(t),type:"media-query-list",value:t.trim()})}});var zg={};Cs(zg,{languages:()=>Ul,options:()=>zl,parsers:()=>Es,printers:()=>Wg});var jl=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},T=jl;var St="'",As='"';function Jl(t,e){let n=e===!0||e===St?St:As,r=n===St?As:St,s=0,i=0;for(let o of t)o===n?s++:o===r&&i++;return s>i?r:n}var Ns=Jl;function Xl(t,e,n){let r=e==='"'?"'":'"',i=T(!1,t,/\\(.)|(["'])/gs,(o,a,u)=>a===r?a:u===e?"\\"+u:u||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return e+i+e}var Ps=Xl;function Zl(t,e){let n=t.slice(1,-1),r=e.parser==="json"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":Ns(n,e.singleQuote);return Ps(n,r,!(e.parser==="css"||e.parser==="less"||e.parser==="scss"||e.__embeddedInHtml))}var Ct=Zl;function ec(t){return Array.isArray(t)&&t.length>0}var ee=ec;var Fe="string",$e="array",Ue="cursor",xe="indent",be="align",We="trim",ke="group",te="fill",le="if-break",ze="indent-if-break",Ve="line-suffix",Ye="line-suffix-boundary",Q="line",Ge="label",_e="break-parent",Ot=new Set([Ue,xe,be,We,ke,te,le,ze,Ve,Ye,Q,Ge,_e]);function tc(t){if(typeof t=="string")return Fe;if(Array.isArray(t))return $e;if(!t)return;let{type:e}=t;if(Ot.has(e))return e}var Ke=tc;var rc=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function nc(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', -Expected it to be 'string' or 'object'.`;if(Ke(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=rc([...Ot].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. -Expected it to be ${r}.`}var tn=class extends Error{name="InvalidDocError";constructor(e){super(nc(e)),this.doc=e}},rn=tn;var Rs=()=>{},ce=Rs,At=Rs;function q(t){return ce(t),{type:xe,contents:t}}function Is(t,e){return ce(e),{type:be,contents:e,n:t}}function D(t,e={}){return ce(t),At(e.expandedStates,!0),{type:ke,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function qs(t){return Is({type:"root"},t)}function fe(t){return Is(-1,t)}function He(t){return At(t),{type:te,parts:t}}function Nt(t,e="",n={}){return ce(t),e!==""&&ce(e),{type:le,breakContents:t,flatContents:e,groupId:n.groupId}}var Qe={type:_e};var sc={type:Q,hard:!0};var A={type:Q},M={type:Q,soft:!0},_=[sc,Qe];function Y(t,e){ce(t),At(e);let n=[];for(let r=0;r{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},G=ic;var Ds=t=>{if(Array.isArray(t))return t;if(t.type!==te)throw new Error(`Expect doc to be 'array' or '${te}'.`);return t.parts};function oc(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(Ke(i)){case $e:return e(i.map(r));case te:return e({...i,parts:i.parts.map(r)});case le:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case ke:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case be:case xe:case ze:case Ge:case Ve:return e({...i,contents:r(i.contents)});case Fe:case Ue:case We:case Ye:case Q:case _e:return e(i);default:throw new rn(i)}}}function ac(t){return t.type===Q&&!t.hard?t.soft?"":" ":t.type===le?t.flatContents:t}function Ls(t){return oc(t,ac)}var nn=class extends Error{name="UnexpectedNodeError";constructor(e,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},Ms=nn;function uc(t){return(t==null?void 0:t.type)==="front-matter"}var Te=uc;var lc=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function Bs(t,e,n){if(Te(t)&&t.lang==="yaml"&&delete e.value,t.type==="css-comment"&&n.type==="css-root"&&n.nodes.length>0&&((n.nodes[0]===t||Te(n.nodes[0])&&n.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/.test(t.text))||n.type==="css-root"&&G(!1,n.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,t.type==="selector-combinator"&&(e.value=T(!1,e.value,/\s+/g," ")),t.type==="media-feature"&&(e.value=T(!1,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(e.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=e.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=e.name.toLowerCase()),t.type==="value-number"&&(e.unit=e.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=T(!1,e.value,/;$/g,"")),(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&e.value&&(e.value=cc(e.value)),t.type==="selector-attribute"&&(e.attribute=e.attribute.trim(),e.namespace&&typeof e.namespace=="string"&&(e.namespace=e.namespace.trim(),e.namespace.length===0&&(e.namespace=!0)),e.value&&(e.value=T(!1,e.value.trim(),/^["']|["']$/g,""),delete e.quoted)),(t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&e.value&&(e.value=T(!1,e.value,/([\d+.e-]+)([a-z]*)/gi,(r,s,i)=>{let o=Number(s);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=t.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(s=>s.type==="value-number"&&s.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&r.value.endsWith("[")||r.type==="value-word"&&r.value.startsWith("]")))return{type:"value-atword",value:t.groups.map(r=>r.value).join(""),group:{open:null,close:null,groups:[],type:"value-paren_group"}}}Bs.ignoredProperties=lc;function cc(t){return T(!1,T(!1,t,"'",'"'),/\\([^\da-f])/gi,"$1")}var Fs=Bs;async function fc(t,e){if(t.lang==="yaml"){let n=t.value.trim(),r=n?await e(n,{parser:"yaml"}):"";return qs([t.startDelimiter,_,r,r?_:"",t.endDelimiter])}}var $s=fc;function Us(t){let{node:e}=t;if(e.type==="front-matter")return async n=>{let r=await $s(e,n);return r?[r,_]:void 0}}Us.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var Ws=Us;var re=ue(Qs(),1);function bc(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(` -`);return e===-1?t:t.slice(0,e)}var js=bc;function Js(t){let e=js(t);e&&(t=t.slice(e.length+1));let n=(0,re.extract)(t),{pragmas:r,comments:s}=(0,re.parseWithComments)(n);return{shebang:e,text:t,pragmas:r,comments:s}}function Xs(t){let{pragmas:e}=Js(t);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function Zs(t){let{shebang:e,text:n,pragmas:r,comments:s}=Js(t),i=(0,re.strip)(n),o=(0,re.print)({pragmas:{format:"",...r},comments:s.trimStart()});return(e?`${e} +`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function dc(t){return t[0].toUpperCase()+t.slice(1)}var it=class{constructor(e){this.builder=e}atrule(e,s){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(s?";":"");this.builder(r+n+i,e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(` +`)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a0&&e.nodes[s].type==="comment";)s-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(n=u.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=_i[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(` +`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` +`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` +`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(` +`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(` +`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};bi.exports=it;it.default=it});var ot=y((pv,ki)=>{"use strict";var mc=Yt();function os(t,e){new mc(e).stringify(t)}ki.exports=os;os.default=os});var ut=y((hv,Ei)=>{"use strict";var{isClean:Vt,my:yc}=Wt(),gc=zt(),wc=Yt(),vc=ot();function as(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>as(o,s)):(i==="object"&&n!==null&&(n=as(n)),s[r]=n)}return s}var at=class{constructor(e={}){this.raws={},this[Vt]=!1,this[yc]=!0;for(let s in e)if(s==="nodes"){this.nodes=[];for(let r of e[s])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[s]=e[s]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let s=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let s in e)this[s]=e[s];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let s=as(this);for(let r in e)s[r]=e[r];return s}cloneAfter(e={}){let s=this.clone(e);return this.parent.insertAfter(this,s),s}cloneBefore(e={}){let s=this.clone(e);return this.parent.insertBefore(this,s),s}error(e,s={}){if(this.source){let{end:r,start:n}=this.rangeBy(s);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},s)}return new gc(e)}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:s==="root"?()=>e.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Vt]){this[Vt]=!1;let e=this;for(;e=e.parent;)e[Vt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,s){let r=this.source.start;if(e.index)r=this.positionInside(e.index,s);else if(e.word){s=this.toString();let n=s.indexOf(e.word);n!==-1&&(r=this.positionInside(n,s))}return r}positionInside(e,s){let r=s||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let o=0;otypeof u=="object"&&u.toJSON?u.toJSON(null,s):u);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,s);else if(o==="source"){let u=s.get(a.input);u==null&&(u=i,s.set(a.input,i),i++),r[o]={end:a.end,inputId:u,start:a.start}}else r[o]=a}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=vc){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}get proxyOf(){return this}};Ei.exports=at;at.default=at});var ct=y((dv,Si)=>{"use strict";var xc=ut(),lt=class extends xc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};Si.exports=lt;lt.default=lt});var Oe=y((mv,Ti)=>{"use strict";var _c=ut(),ft=class extends _c{constructor(e){super(e),this.type="comment"}};Ti.exports=ft;ft.default=ft});var ne=y((yv,Li)=>{"use strict";var{isClean:Ci,my:Ai}=Wt(),Oi=ct(),Ni=Oe(),bc=ut(),Pi,us,ls,Ri;function Ii(t){return t.map(e=>(e.nodes&&(e.nodes=Ii(e.nodes)),delete e.source,e))}function qi(t){if(t[Ci]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)qi(e)}var z=class t extends bc{append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Oi(e)]}else if(e.selector)e=[new us(e)];else if(e.name)e=[new ls(e)];else if(e.text)e=[new Ni(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[Ai]||t.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[Ci]&&qi(n),typeof n.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(n.raws.before=s.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let s of e){let r=this.normalize(s,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(e,s,r){return r||(r=s,s={}),this.walkDecls(n=>{s.props&&!s.props.includes(n.prop)||s.fast&&!n.value.includes(s.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((s,r)=>{let n;try{n=e(s,r)}catch(i){throw s.addToError(i)}return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkAtRules(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return s(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="atrule")return s(r,n)}))}walkComments(e){return this.walk((s,r)=>{if(s.type==="comment")return e(s,r)})}walkDecls(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop))return s(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="decl")return s(r,n)}))}walkRules(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return s(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="rule")return s(r,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};z.registerParse=t=>{Pi=t};z.registerRule=t=>{us=t};z.registerAtRule=t=>{ls=t};z.registerRoot=t=>{Ri=t};Li.exports=z;z.default=z;z.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,ls.prototype):t.type==="rule"?Object.setPrototypeOf(t,us.prototype):t.type==="decl"?Object.setPrototypeOf(t,Oi.prototype):t.type==="comment"?Object.setPrototypeOf(t,Ni.prototype):t.type==="root"&&Object.setPrototypeOf(t,Ri.prototype),t[Ai]=!0,t.nodes&&t.nodes.forEach(e=>{z.rebuild(e)})}});var Kt=y((gv,Mi)=>{"use strict";var Gt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ht=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,kc=/.[\r\n"'(/\\]/,Di=/[\da-f]/i;Mi.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,a,u,c,f,p,l,g,x,h=r.length,d=0,m=[],_=[];function w(){return d}function v($){throw e.error("Unclosed "+$,d)}function R(){return _.length===0&&d>=h}function F($){if(_.length)return _.pop();if(d>=h)return;let T=$?$.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case 10:case 32:case 9:case 13:case 12:{o=d;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);x=["space",r.slice(d,o)],d=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let C=String.fromCharCode(i);x=[C,C,d];break}case 40:{if(l=m.length?m.pop()[1]:"",g=r.charCodeAt(d+1),l==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){o=d;do{if(f=!1,o=r.indexOf(")",o+1),o===-1)if(n||T){o=d;break}else v("bracket");for(p=o;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);x=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),u=r.slice(d,o+1),o===-1||kc.test(u)?x=["(","(",d]:(x=["brackets",u,d,o],d=o);break}case 39:case 34:{a=i===39?"'":'"',o=d;do{if(f=!1,o=r.indexOf(a,o+1),o===-1)if(n||T){o=d+1;break}else v("string");for(p=o;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);x=["string",r.slice(d,o+1),d,o],d=o;break}case 64:{Gt.lastIndex=d+1,Gt.test(r),Gt.lastIndex===0?o=r.length-1:o=Gt.lastIndex-2,x=["at-word",r.slice(d,o+1),d,o],d=o;break}case 92:{for(o=d,c=!0;r.charCodeAt(o+1)===92;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(o+=1,Di.test(r.charAt(o)))){for(;Di.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===32&&(o+=1)}x=["word",r.slice(d,o+1),d,o],d=o;break}default:{i===47&&r.charCodeAt(d+1)===42?(o=r.indexOf("*/",d+2)+1,o===0&&(n||T?o=r.length:v("comment")),x=["comment",r.slice(d,o+1),d,o],d=o):(Ht.lastIndex=d+1,Ht.test(r),Ht.lastIndex===0?o=r.length-1:o=Ht.lastIndex-2,x=["word",r.slice(d,o+1),d,o],m.push(x),d=o);break}}return d++,x}function K($){_.push($)}return{back:K,endOfFile:R,nextToken:F,position:w}}});var Qt=y((wv,Ui)=>{"use strict";var Bi=ne(),Ne=class extends Bi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};Ui.exports=Ne;Ne.default=Ne;Bi.registerAtRule(Ne)});var Pe=y((vv,zi)=>{"use strict";var Fi=ne(),$i,Wi,ie=class extends Fi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new $i(new Wi,this,e).stringify()}};ie.registerLazyResult=t=>{$i=t};ie.registerProcessor=t=>{Wi=t};zi.exports=ie;ie.default=ie;Fi.registerRoot(ie)});var cs=y((xv,Yi)=>{"use strict";var pt={comma(t){return pt.split(t,[","],!0)},space(t){let e=[" ",` +`," "];return pt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,a=!1,u="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:a?f===u&&(a=!1):f==='"'||f==="'"?(a=!0,u=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};Yi.exports=pt;pt.default=pt});var jt=y((_v,Gi)=>{"use strict";var Vi=ne(),Ec=cs(),Re=class extends Vi{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ec.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};Gi.exports=Re;Re.default=Re;Vi.registerRule(Re)});var Jt=y((bv,Qi)=>{"use strict";var Sc=ct(),Tc=Kt(),Cc=Oe(),Ac=Qt(),Oc=Pe(),Hi=jt(),Ki={empty:!0,space:!0};function Nc(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var fs=class{constructor(e){this.input=e,this.root=new Oc,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new Ac;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,a=!1,u=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(u.length>0){for(i=u.length-1,n=u[i];n&&n[0]==="space";)n=u[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else u.push(e);else u.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(s.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(s,"params",u),o&&(e=u[u.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,a]of e.entries()){if(r=a,n=r[0],n==="("&&(s+=1),n===")"&&(s-=1),s===0&&n===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return o}i=r}return!1}comment(e){let s=new Cc;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3]}}createTokenizer(){this.tokenizer=Tc(this.input)}decl(e,s){let r=new Sc;this.init(r,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||Nc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=!0;let f=this.stringFrom(e,c);f=this.spacesFromEnd(e)+f,f!==" !important"&&(r.raws.important=f);break}else if(i[1].toLowerCase()==="important"){let f=e.slice(0),p="";for(let l=c;l>0;l--){let g=f[l][0];if(p.trim().indexOf("!")===0&&g!=="space")break;p=f.pop()[1]+p}p.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=p,e=f)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),s),r.value.includes(":")&&!s&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let s=new Hi;this.init(s,e[2]),s.selector="",s.raws.between="",this.current=s}end(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=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){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,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let s=this.current.nodes[this.current.nodes.length-1];s&&s.type==="rule"&&!s.raws.ownSemicolon&&(s.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let s=this.input.fromOffset(e);return{column:s.col,line:s.line,offset:e}}init(e,s){this.current.push(e),e.source={input:this.input,start:this.getPosition(s)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let s=!1,r=null,n=!1,i=null,o=[],a=e[1].startsWith("--"),u=[],c=e;for(;c;){if(r=c[0],u.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(a&&n&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(n){this.decl(u,a);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),s=!0;break}else r===":"&&(n=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(s=!0),o.length>0&&this.unclosedBracket(i),s&&n){if(!a)for(;u.length&&(c=u[u.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,a)}else this.unknownWord(u)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[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);break}this.endFile()}precheckMissedSemicolon(){}raw(e,s,r,n){let i,o,a=r.length,u="",c=!0,f,p;for(let l=0;lg+x[1],"");e.raws[s]={raw:l,value:u}}e[s]=u}rule(e){e.pop();let s=new Hi;this.init(s,e[0][2]),s.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(s,"selector",e),this.current=s}spacesAndCommentsFromEnd(e){let s,r="";for(;e.length&&(s=e[e.length-1][0],!(s!=="space"&&s!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let s,r="";for(;e.length&&(s=e[0][0],!(s!=="space"&&s!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let s,r="";for(;e.length&&(s=e[e.length-1][0],s==="space");)r=e.pop()[1]+r;return r}stringFrom(e,s){let r="";for(let n=s;n{});var Xi=y((Sv,Ji)=>{var Pc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Rc=(t,e=21)=>(s=e)=>{let r="",n=s;for(;n--;)r+=t[Math.random()*t.length|0];return r},Ic=(t=21)=>{let e="",s=t;for(;s--;)e+=Pc[Math.random()*64|0];return e};Ji.exports={nanoid:Ic,customAlphabet:Rc}});var ps=y((Tv,Zi)=>{Zi.exports=class{}});var qe=y((Av,so)=>{"use strict";var{SourceMapConsumer:qc,SourceMapGenerator:Lc}=ji(),{fileURLToPath:eo,pathToFileURL:Xt}={},{isAbsolute:ms,resolve:ys}={},{nanoid:Dc}=Xi(),hs=is(),to=zt(),Mc=ps(),ds=Symbol("fromOffsetCache"),Bc=!!(qc&&Lc),ro=!!(ys&&ms),Ie=class{constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,s.from&&(!ro||/^\w+:\/\//.test(s.from)||ms(s.from)?this.file=s.from:this.file=ys(s.from)),ro&&Bc){let r=new Mc(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,a;if(s&&typeof s=="object"){let c=s,f=r;if(typeof c.offset=="number"){let p=this.fromOffset(c.offset);s=p.line,r=p.col}else s=c.line,r=c.column;if(typeof f.offset=="number"){let p=this.fromOffset(f.offset);o=p.line,a=p.col}else o=f.line,a=f.column}else if(!r){let c=this.fromOffset(s);s=c.line,r=c.col}let u=this.origin(s,r,o,a);return u?i=new to(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,n.plugin):i=new to(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:a,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:a,endLine:o,line:s,source:this.css},this.file&&(Xt&&(i.input.url=Xt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let s,r;if(this[ds])r=this[ds];else{let i=this.css.split(` +`);r=new Array(i.length);let o=0;for(let a=0,u=i.length;a=s)n=r.length-1;else{let i=r.length-2,o;for(;n>1),e=r[o+1])n=o+1;else{n=o;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ys(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:n,line:r}));let u;ms(o.source)?u=Xt(o.source):u=new URL(o.source,this.map.consumer().sourceRoot||Xt(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:u.toString()};if(u.protocol==="file:")if(eo)c.file=eo(u);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};so.exports=Ie;Ie.default=Ie;hs&&hs.registerInput&&hs.registerInput(Ie)});var ht=y((Ov,no)=>{"use strict";var Uc=ne(),Fc=Jt(),$c=qe();function Zt(t,e){let s=new $c(t,e),r=new Fc(s);try{r.parse()}catch(n){throw n}return r.root}no.exports=Zt;Zt.default=Zt;Uc.registerParse(Zt)});var io=y((Nv,gs)=>{var Wc=Kt(),zc=qe();gs.exports={isInlineComment(t){if(t[0]==="word"&&t[1].slice(0,2)==="//"){let e=t,s=[],r,n;for(;t;){if(/\r?\n/.test(t[1])){if(/['"].*\r?\n/.test(t[1])){s.push(t[1].substring(0,t[1].indexOf(` +`))),n=t[1].substring(t[1].indexOf(` +`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new zc(n),this.tokenizer=Wc(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),gs.exports.isInlineComment.bind(this)(t)}return!1}}});var ao=y((Pv,oo)=>{oo.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(a=>a[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var lo=y((Rv,uo)=>{var Yc=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,Vc=/\.[0-9]/,Gc=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&Yc.test(e)===!1&&Vc.test(e)===!1};uo.exports={isMixinToken:Gc}});var fo=y((Iv,co)=>{var Hc=Kt(),Kc=/^url\((.+)\)/;co.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=Hc({css:s});for(t.filename=s.replace(Kc,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var yo=y((qv,mo)=>{var po=/:$/,ho=/^:(\s+)?/;mo.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(po.test(e)){let[r]=e.match(po);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if(ho.test(s)){let[r]=s.match(ho);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var vo=y((Dv,wo)=>{var Qc=Oe(),jc=Jt(),{isInlineComment:Jc}=io(),{interpolation:go}=ao(),{isMixinToken:Xc}=lo(),Zc=fo(),ef=yo(),tf=/(!\s*important)$/i;wo.exports=class extends jc{constructor(...e){super(...e),this.lastNode=null}atrule(e){go.bind(this)(e)||(super.atrule(e),Zc(this.lastNode),ef(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(a=>a[0]==="("),r=e.reverse().find(a=>a[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(a=>a[1]).join("");for(let a of e.reverse())this.tokenizer.back(a);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new Qc,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((n<0||n>3)&&i>0){let c=e.reduce((w,v,R)=>v[0]===")"?R:w),p=e.slice(i,c+i).map(w=>w[1]).join(""),[l]=e.slice(i),g=[l[2],l[3]],[x]=e.slice(c,c+1),h=[x[2],x[3]],d=["brackets",p].concat(g,h),m=e.slice(0,i),_=e.slice(c+1);e=m,e.push(d),e=e.concat(_)}let a=[];for(let c of e)if((c[1]==="!"||a.length)&&a.push(c),c[1]==="important")break;if(a.length){let[c]=a,f=e.indexOf(c),p=a[a.length-1],l=[c[2],c[3]],g=[p[4],p[5]],h=["word",a.map(d=>d[1]).join("")].concat(l,g);e.splice(f,a.length,h)}let u=e.findIndex(c=>tf.test(c[1]));u>0&&([,o]=e[u],e.splice(u,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){Jc.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),go.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(Xc(s)){this.mixin(e);return}super.unknownWord(e)}}});var _o=y((Bv,xo)=>{var rf=Yt();xo.exports=class extends rf{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let a=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+a,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var bo=y((Uv,ws)=>{var sf=qe(),nf=vo(),of=_o();ws.exports={parse(t,e){let s=new sf(t,e),r=new nf(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndexOf(n.source.input.css);if(i===0)return;if(i+n.source.input.css.length!==s.css.length)throw new Error("Invalid state detected in postcss-less");let o=i+n.source.start.offset,a=s.fromOffset(i+n.source.start.offset);if(n.source.start={offset:o,line:a.line,column:a.col},n.source.end){let u=i+n.source.end.offset,c=s.fromOffset(i+n.source.end.offset);n.source.end={offset:u,line:c.line,column:c.col}}}),r.root},stringify(t,e){new of(e).stringify(t)},nodeToString(t){let e="";return ws.exports.stringify(t,s=>{e+=s}),e}}});var vs=y((Fv,ko)=>{ko.exports=class{generate(){}}});var er=y((Wv,To)=>{"use strict";var af=ne(),Eo,So,ye=class extends af{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Eo(new So,this,e).stringify()}};ye.registerLazyResult=t=>{Eo=t};ye.registerProcessor=t=>{So=t};To.exports=ye;ye.default=ye});var xs=y((zv,Ao)=>{"use strict";var Co={};Ao.exports=function(e){Co[e]||(Co[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var _s=y((Yv,Oo)=>{"use strict";var dt=class{constructor(e,s={}){if(this.type="warning",this.text=e,s.node&&s.node.source){let r=s.node.rangeBy(s);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in s)this[r]=s[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Oo.exports=dt;dt.default=dt});var tr=y((Vv,No)=>{"use strict";var uf=_s(),mt=class{constructor(e,s,r){this.processor=e,this.messages=[],this.root=s,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let r=new uf(e,s);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};No.exports=mt;mt.default=mt});var Es=y((Hv,qo)=>{"use strict";var{isClean:H,my:lf}=Wt(),cf=vs(),ff=ot(),pf=ne(),hf=er(),Gv=xs(),Po=tr(),df=ht(),mf=Pe(),yf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},wf={Once:!0,postcssPlugin:!0,prepare:!0},Le=0;function yt(t){return typeof t=="object"&&typeof t.then=="function"}function Io(t){let e=!1,s=yf[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,Le,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,Le,s+"Exit"]:[s,s+"Exit"]}function Ro(t){let e;return t.type==="document"?e=["Document",Le,"DocumentExit"]:t.type==="root"?e=["Root",Le,"RootExit"]:e=Io(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function bs(t){return t[H]=!1,t.nodes&&t.nodes.forEach(e=>bs(e)),t}var ks={},oe=class t{constructor(e,s,r){this.stringified=!1,this.processed=!1;let n;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))n=bs(s);else if(s instanceof t||s instanceof Po)n=bs(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let i=df;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(s,r)}catch(o){this.processed=!0,this.error=o}n&&!n[lf]&&pf.rebuild(n)}this.result=new Po(e,n,r),this.helpers={...ks,postcss:ks,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,s){let r=this.result.lastPlugin;try{s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(s,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,n])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!gf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wf[r])if(typeof s[r]=="object")for(let n in s[r])n==="*"?e(s,r,s[r][n]):e(s,r+"-"+n.toLowerCase(),s[r][n]);else typeof s[r]=="function"&&e(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let r=this.visitTick(s);if(yt(r))try{await r}catch(n){let i=s[s.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(e.type==="document"){let n=e.nodes.map(i=>r(i,this.helpers));await Promise.all(n)}else await r(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return yt(s[0])?Promise.all(s):s}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,s=ff;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let n=new cf(s,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let s=this.runOnRoot(e);if(yt(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[H];)e[H]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let s of e.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,s){return this.async().then(e,s)}toString(){return this.css}visitSync(e,s){for(let[r,n]of e){this.result.lastPlugin=r;let i;try{i=n(s,this.helpers)}catch(o){throw this.handleError(o,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(yt(i))throw this.getAsyncError()}}visitTick(e){let s=e[e.length-1],{node:r,visitors:n}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&s.visitorIndex{n[H]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};oe.registerPostcss=t=>{ks=t};qo.exports=oe;oe.default=oe;mf.registerLazyResult(oe);hf.registerLazyResult(oe)});var Do=y((Qv,Lo)=>{"use strict";var vf=vs(),xf=ot(),Kv=xs(),_f=ht(),bf=tr(),gt=class{constructor(e,s,r){s=s.toString(),this.stringified=!1,this._processor=e,this._css=s,this._opts=r,this._map=void 0;let n,i=xf;this.result=new bf(this._processor,n,this._opts),this.result.css=s;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new vf(i,n,this._opts,s);if(a.isMap()){let[u,c]=a.generate();u&&(this.result.css=u),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,s){return this.async().then(e,s)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,s=_f;try{e=s(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};Lo.exports=gt;gt.default=gt});var Bo=y((jv,Mo)=>{"use strict";var kf=Do(),Ef=Es(),Sf=er(),Tf=Pe(),ge=class{constructor(e=[]){this.version="8.4.33",this.plugins=this.normalize(e)}normalize(e){let s=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))s=s.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)s.push(r);else if(typeof r=="function")s.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return s}process(e,s={}){return!this.plugins.length&&!s.parser&&!s.stringifier&&!s.syntax?new kf(this,e,s):new Ef(this,e,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};Mo.exports=ge;ge.default=ge;Tf.registerProcessor(ge);Sf.registerProcessor(ge)});var Fo=y((Jv,Uo)=>{"use strict";var Cf=ct(),Af=ps(),Of=Oe(),Nf=Qt(),Pf=qe(),Rf=Pe(),If=jt();function wt(t,e){if(Array.isArray(t))return t.map(n=>wt(n));let{inputs:s,...r}=t;if(s){e=[];for(let n of s){let i={...n,__proto__:Pf.prototype};i.map&&(i.map={...i.map,__proto__:Af.prototype}),e.push(i)}}if(r.nodes&&(r.nodes=t.nodes.map(n=>wt(n,e))),r.source){let{inputId:n,...i}=r.source;r.source=i,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Rf(r);if(r.type==="decl")return new Cf(r);if(r.type==="rule")return new If(r);if(r.type==="comment")return new Of(r);if(r.type==="atrule")return new Nf(r);throw new Error("Unknown node type: "+t.type)}Uo.exports=wt;wt.default=wt});var rr=y((Xv,Ho)=>{"use strict";var qf=zt(),$o=ct(),Lf=Es(),Df=ne(),Ss=Bo(),Mf=ot(),Bf=Fo(),Wo=er(),Uf=_s(),zo=Oe(),Yo=Qt(),Ff=tr(),$f=qe(),Wf=ht(),zf=cs(),Vo=jt(),Go=Pe(),Yf=ut();function b(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Ss(t)}b.plugin=function(e,s){let r=!1;function n(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: +https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let a=s(...o);return a.postcssPlugin=e,a.postcssVersion=new Ss().version,a}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,a,u){return b([n(u)]).process(o,a)},n};b.stringify=Mf;b.parse=Wf;b.fromJSON=Bf;b.list=zf;b.comment=t=>new zo(t);b.atRule=t=>new Yo(t);b.decl=t=>new $o(t);b.rule=t=>new Vo(t);b.root=t=>new Go(t);b.document=t=>new Wo(t);b.CssSyntaxError=qf;b.Declaration=$o;b.Container=Df;b.Processor=Ss;b.Document=Wo;b.Comment=zo;b.Warning=Uf;b.AtRule=Yo;b.Result=Ff;b.Input=$f;b.Rule=Vo;b.Root=Go;b.Node=Yf;Lf.registerPostcss(b);Ho.exports=b;b.default=b});var Qo=y((Zv,Ko)=>{var{Container:Vf}=rr(),Ts=class extends Vf{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};Ko.exports=Ts});var Xo=y((ex,Jo)=>{"use strict";var sr=/[\t\n\f\r "#'()/;[\\\]{}]/g,nr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Gf=/.[\r\n"'(/\\]/,jo=/[\da-f]/i,ir=/[\n\f\r]/g;Jo.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,a,u,c,f,p,l,g,x=r.length,h=0,d=[],m=[],_;function w(){return h}function v(T){throw e.error("Unclosed "+T,h)}function R(){return m.length===0&&h>=x}function F(){let T=1,C=!1,A=!1;for(;T>0;)o+=1,r.length<=o&&v("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),C?!A&&i===C?(C=!1,A=!1):i===92?A=!A:A&&(A=!1):i===39||i===34?C=i:i===125?T-=1:i===35&&l===123&&(T+=1)}function K(T){if(m.length)return m.pop();if(h>=x)return;let C=T?T.ignoreUnclosed:!1;switch(i=r.charCodeAt(h),i){case 10:case 32:case 9:case 13:case 12:{o=h;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);g=["space",r.slice(h,o)],h=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let A=String.fromCharCode(i);g=[A,A,h];break}case 44:{g=["word",",",h,h+1];break}case 40:{if(p=d.length?d.pop()[1]:"",l=r.charCodeAt(h+1),p==="url"&&l!==39&&l!==34){for(_=1,f=!1,o=h+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===92)f=!f;else if(l===40)_+=1;else if(l===41&&(_-=1,_===0))break;o+=1}u=r.slice(h,o+1),g=["brackets",u,h,o],h=o}else o=r.indexOf(")",h+1),u=r.slice(h,o+1),o===-1||Gf.test(u)?g=["(","(",h]:(g=["brackets",u,h,o],h=o);break}case 39:case 34:{for(a=i,o=h,f=!1;o{var{Comment:Hf}=rr(),Kf=Jt(),Qf=Qo(),jf=Xo(),Cs=class extends Kf{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new Hf;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=jf(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,a)=>{if(a[0]==="comment"&&a[4]==="inline"){let u=a[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+u+"*/"}else return o+a[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(` +`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new Qf;this.init(i,e[0][2]);let o;for(let u=e.length-1;u>=0;u--)if(e[u][0]!=="space"){o=e[u];break}if(o[3]){let u=this.input.fromOffset(o[3]);i.source.end={column:u.col,line:u.line,offset:o[3]+1}}else{let u=this.input.fromOffset(o[2]);i.source.end={column:u.col,line:u.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let u=this.input.fromOffset(e[0][2]);i.source.start={column:u.col,line:u.line,offset:e[0][2]}}for(i.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let a;for(;e.length;)if(a=e.shift(),a[0]===":"){i.raws.between+=a[1];break}else i.raws.between+=a[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let u=e.length-1;u>0;u--){if(a=e[u],a[1]==="!important"){i.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(a[1]==="important"){let c=e.slice(0),f="";for(let p=u;p>0;p--){let l=c[p][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(a[0]!=="space"&&a[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};Zo.exports=Cs});var ra=y((rx,ta)=>{var{Input:Jf}=rr(),Xf=ea();ta.exports=function(e,s){let r=new Jf(e,s),n=new Xf(r);return n.parse(),n.root}});var Os=y(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});function ep(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}As.default=ep});var Ps=y(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var tp=Os(),na=rp(tp);function rp(t){return t&&t.__esModule?t:{default:t}}function vt(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}vt.prototype=Object.create(na.default.prototype);vt.constructor=na.default;vt.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.parseMediaFeature=aa;xt.parseMediaQuery=Is;xt.parseMediaList=ip;var sp=Os(),ia=oa(sp),np=Ps(),Rs=oa(np);function oa(t){return t&&t.__esModule?t:{default:t}}function aa(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,a=null,u=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),u++);for(var f=0;f0&&(s[c-1].after=i.before),i.type===void 0){if(c>0){if(s[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[c-1].value==="not"||s[c-1].value==="only"){i.type="media-type";continue}if(s[c-1].value==="and"){i.type="media-feature-expression";continue}s[c-1].type==="media-type"&&(s[c+1]?i.type=s[c+1].type==="media-feature-expression"?"keyword":"media-feature-expression":i.type="media-feature-expression")}if(c===0){if(!s[c+1]){i.type="media-type";continue}if(s[c+1]&&(s[c+1].type==="media-feature-expression"||s[c+1].type==="keyword")){i.type="media-type";continue}if(s[c+2]){if(s[c+2].type==="media-feature-expression"){i.type="media-type",s[c+1].type="keyword";continue}if(s[c+2].type==="keyword"){i.type="keyword",s[c+1].type="media-type";continue}}if(s[c+3]&&s[c+3].type==="media-feature-expression"){i.type="keyword",s[c+1].type="media-type",s[c+2].type="keyword";continue}}}return s}function ip(t){var e=[],s=0,r=0,n=/^(\s*)url\s*\(/.exec(t);if(n!==null){for(var i=n[0].length,o=1;o>0;){var a=t[i];a==="("&&o++,a===")"&&o--,i++}e.unshift(new ia.default({type:"url",value:t.substring(0,i).trim(),sourceIndex:n[1].length,before:n[1],after:/^(\s*)/.exec(t.substring(i))[1]})),s=i}for(var u=s;u{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.default=cp;var op=Ps(),ap=lp(op),up=ua();function lp(t){return t&&t.__esModule?t:{default:t}}function cp(t){return new ap.default({nodes:(0,up.parseMediaList)(t),type:"media-query-list",value:t.trim()})}});var Ds=y((fx,pa)=>{pa.exports=function(e,s){if(s=typeof s=="number"?s:1/0,!s)return Array.isArray(e)?e.map(function(n){return n}):e;return r(e,1);function r(n,i){return n.reduce(function(o,a){return Array.isArray(a)&&i{ha.exports=function(t,e){for(var s=-1,r=[];(s=t.indexOf(e,s+1))!==-1;)r.push(s);return r}});var Bs=y((hx,da)=>{"use strict";function hp(t,e){for(var s=1,r=t.length,n=t[0],i=t[0],o=1;o{"use strict";or.__esModule=!0;var ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function yp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var gp=function t(e,s){if((typeof e>"u"?"undefined":ma(e))!=="object")return e;var r=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=typeof i>"u"?"undefined":ma(i);n==="parent"&&o==="object"?s&&(r[n]=s):i instanceof Array?r[n]=i.map(function(a){return t(a,r)}):r[n]=t(i,r)}return r},wp=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yp(this,t);for(var s in e)this[s]=e[s];var r=e.spaces;r=r===void 0?{}:r;var n=r.before,i=n===void 0?"":n,o=r.after,a=o===void 0?"":o;this.spaces={before:i,after:a}}return t.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.prototype.replaceWith=function(){if(this.parent){for(var s in arguments)this.parent.insertBefore(this,arguments[s]);this.remove()}return this},t.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},t.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},t.prototype.clone=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=gp(this);for(var n in s)r[n]=s[n];return r},t.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join("")},t}();or.default=wp;ya.exports=or.default});var D=y(B=>{"use strict";B.__esModule=!0;var dx=B.TAG="tag",mx=B.STRING="string",yx=B.SELECTOR="selector",gx=B.ROOT="root",wx=B.PSEUDO="pseudo",vx=B.NESTING="nesting",xx=B.ID="id",_x=B.COMMENT="comment",bx=B.COMBINATOR="combinator",kx=B.CLASS="class",Ex=B.ATTRIBUTE="attribute",Sx=B.UNIVERSAL="universal"});var ur=y((ar,ga)=>{"use strict";ar.__esModule=!0;var vp=function(){function t(e,s){for(var r=0;r=r&&(this.indexes[i]=n-1);return this},e.prototype.removeAll=function(){for(var i=this.nodes,r=Array.isArray(i),n=0,i=r?i:i[Symbol.iterator]();;){var o;if(r){if(n>=i.length)break;o=i[n++]}else{if(n=i.next(),n.done)break;o=n.value}var a=o;a.parent=void 0}return this.nodes=[],this},e.prototype.empty=function(){return this.removeAll()},e.prototype.insertAfter=function(r,n){var i=this.index(r);this.nodes.splice(i+1,0,n);var o=void 0;for(var a in this.indexes)o=this.indexes[a],i<=o&&(this.indexes[a]=o+this.nodes.length);return this},e.prototype.insertBefore=function(r,n){var i=this.index(r);this.nodes.splice(i,0,n);var o=void 0;for(var a in this.indexes)o=this.indexes[a],i<=o&&(this.indexes[a]=o+this.nodes.length);return this},e.prototype.each=function(r){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var n=this.lastEach;if(this.indexes[n]=0,!!this.length){for(var i=void 0,o=void 0;this.indexes[n]{"use strict";lr.__esModule=!0;var Op=ur(),Np=Rp(Op),Pp=D();function Rp(t){return t&&t.__esModule?t:{default:t}}function Ip(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qp(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Lp(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Dp=function(t){Lp(e,t);function e(s){Ip(this,e);var r=qp(this,t.call(this,s));return r.type=Pp.ROOT,r}return e.prototype.toString=function(){var r=this.reduce(function(n,i){var o=String(i);return o?n+o+",":""},"").slice(0,-1);return this.trailingComma?r+",":r},e}(Np.default);lr.default=Dp;wa.exports=lr.default});var _a=y((cr,xa)=>{"use strict";cr.__esModule=!0;var Mp=ur(),Bp=Fp(Mp),Up=D();function Fp(t){return t&&t.__esModule?t:{default:t}}function $p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wp(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function zp(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Yp=function(t){zp(e,t);function e(s){$p(this,e);var r=Wp(this,t.call(this,s));return r.type=Up.SELECTOR,r}return e}(Bp.default);cr.default=Yp;xa.exports=cr.default});var De=y((fr,ba)=>{"use strict";fr.__esModule=!0;var Vp=function(){function t(e,s){for(var r=0;r{"use strict";pr.__esModule=!0;var Zp=De(),eh=rh(Zp),th=D();function rh(t){return t&&t.__esModule?t:{default:t}}function sh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ih(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var oh=function(t){ih(e,t);function e(s){sh(this,e);var r=nh(this,t.call(this,s));return r.type=th.CLASS,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"."+this.value,this.spaces.after].join("")},e}(eh.default);pr.default=oh;ka.exports=pr.default});var Ta=y((hr,Sa)=>{"use strict";hr.__esModule=!0;var ah=we(),uh=ch(ah),lh=D();function ch(t){return t&&t.__esModule?t:{default:t}}function fh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function hh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var dh=function(t){hh(e,t);function e(s){fh(this,e);var r=ph(this,t.call(this,s));return r.type=lh.COMMENT,r}return e}(uh.default);hr.default=dh;Sa.exports=hr.default});var Aa=y((dr,Ca)=>{"use strict";dr.__esModule=!0;var mh=De(),yh=wh(mh),gh=D();function wh(t){return t&&t.__esModule?t:{default:t}}function vh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function _h(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var bh=function(t){_h(e,t);function e(s){vh(this,e);var r=xh(this,t.call(this,s));return r.type=gh.ID,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"#"+this.value,this.spaces.after].join("")},e}(yh.default);dr.default=bh;Ca.exports=dr.default});var Na=y((mr,Oa)=>{"use strict";mr.__esModule=!0;var kh=De(),Eh=Th(kh),Sh=D();function Th(t){return t&&t.__esModule?t:{default:t}}function Ch(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ah(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Oh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Nh=function(t){Oh(e,t);function e(s){Ch(this,e);var r=Ah(this,t.call(this,s));return r.type=Sh.TAG,r}return e}(Eh.default);mr.default=Nh;Oa.exports=mr.default});var Ra=y((yr,Pa)=>{"use strict";yr.__esModule=!0;var Ph=we(),Rh=qh(Ph),Ih=D();function qh(t){return t&&t.__esModule?t:{default:t}}function Lh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Mh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Bh=function(t){Mh(e,t);function e(s){Lh(this,e);var r=Dh(this,t.call(this,s));return r.type=Ih.STRING,r}return e}(Rh.default);yr.default=Bh;Pa.exports=yr.default});var qa=y((gr,Ia)=>{"use strict";gr.__esModule=!0;var Uh=ur(),Fh=Wh(Uh),$h=D();function Wh(t){return t&&t.__esModule?t:{default:t}}function zh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Vh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Gh=function(t){Vh(e,t);function e(s){zh(this,e);var r=Yh(this,t.call(this,s));return r.type=$h.PSEUDO,r}return e.prototype.toString=function(){var r=this.length?"("+this.map(String).join(",")+")":"";return[this.spaces.before,String(this.value),r,this.spaces.after].join("")},e}(Fh.default);gr.default=Gh;Ia.exports=gr.default});var Da=y((wr,La)=>{"use strict";wr.__esModule=!0;var Hh=De(),Kh=jh(Hh),Qh=D();function jh(t){return t&&t.__esModule?t:{default:t}}function Jh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Zh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ed=function(t){Zh(e,t);function e(s){Jh(this,e);var r=Xh(this,t.call(this,s));return r.type=Qh.ATTRIBUTE,r.raws={},r}return e.prototype.toString=function(){var r=[this.spaces.before,"[",this.ns,this.attribute];return this.operator&&r.push(this.operator),this.value&&r.push(this.value),this.raws.insensitive?r.push(this.raws.insensitive):this.insensitive&&r.push(" i"),r.push("]"),r.concat(this.spaces.after).join("")},e}(Kh.default);wr.default=ed;La.exports=wr.default});var Ba=y((vr,Ma)=>{"use strict";vr.__esModule=!0;var td=De(),rd=nd(td),sd=D();function nd(t){return t&&t.__esModule?t:{default:t}}function id(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function od(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ad(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ud=function(t){ad(e,t);function e(s){id(this,e);var r=od(this,t.call(this,s));return r.type=sd.UNIVERSAL,r.value="*",r}return e}(rd.default);vr.default=ud;Ma.exports=vr.default});var Fa=y((xr,Ua)=>{"use strict";xr.__esModule=!0;var ld=we(),cd=pd(ld),fd=D();function pd(t){return t&&t.__esModule?t:{default:t}}function hd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function md(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var yd=function(t){md(e,t);function e(s){hd(this,e);var r=dd(this,t.call(this,s));return r.type=fd.COMBINATOR,r}return e}(cd.default);xr.default=yd;Ua.exports=xr.default});var Wa=y((_r,$a)=>{"use strict";_r.__esModule=!0;var gd=we(),wd=xd(gd),vd=D();function xd(t){return t&&t.__esModule?t:{default:t}}function _d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function kd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ed=function(t){kd(e,t);function e(s){_d(this,e);var r=bd(this,t.call(this,s));return r.type=vd.NESTING,r.value="&",r}return e}(wd.default);_r.default=Ed;$a.exports=_r.default});var Ya=y((br,za)=>{"use strict";br.__esModule=!0;br.default=Sd;function Sd(t){return t.sort(function(e,s){return e-s})}za.exports=br.default});var Za=y((Sr,Xa)=>{"use strict";Sr.__esModule=!0;Sr.default=Dd;var Va=39,Td=34,Us=92,Ga=47,_t=10,Fs=32,$s=12,Ws=9,zs=13,Ha=43,Ka=62,Qa=126,ja=124,Cd=44,Ad=40,Od=41,Nd=91,Pd=93,Rd=59,Ja=42,Id=58,qd=38,Ld=64,kr=/[ \n\t\r\{\(\)'"\\;/]/g,Er=/[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;function Dd(t){for(var e=[],s=t.css.valueOf(),r=void 0,n=void 0,i=void 0,o=void 0,a=void 0,u=void 0,c=void 0,f=void 0,p=void 0,l=void 0,g=void 0,x=s.length,h=-1,d=1,m=0,_=function(v,R){if(t.safe)s+=R,n=s.length-1;else throw t.error("Unclosed "+v,d,m-h,m)};m0?(f=d+a,p=n-o[a].length):(f=d,p=h),e.push(["comment",u,d,m-h,f,n-p,m]),h=p,d=f,m=n):(Er.lastIndex=m+1,Er.test(s),Er.lastIndex===0?n=s.length-1:n=Er.lastIndex-2,e.push(["word",s.slice(m,n+1),d,m-h,d,n-h,m]),m=n);break}m++}return e}Xa.exports=Sr.default});var ru=y((Tr,tu)=>{"use strict";Tr.__esModule=!0;var Md=function(){function t(e,s){for(var r=0;r1?(o[0]===""&&(o[0]=!0),a.attribute=this.parseValue(o[2]),a.namespace=this.parseNamespace(o[0])):a.attribute=this.parseValue(i[0]),r=new im.default(a),i[2]){var u=i[2].split(/(\s+i\s*?)$/),c=u[0].trim();r.value=this.lossy?c:u[0],u[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=u[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new lm.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&&s.nextToken&&s.nextToken[0]==="("&&s.error("Misplaced parenthesis.")})}else this.error('Unexpected "'+this.currToken[0]+'" found.')},t.prototype.space=function(){var s=this.currToken;this.position===0||this.prevToken[0]===","||this.prevToken[0]==="("?(this.spaces=this.parseSpace(s[1]),this.position++):this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.spaces.after=this.parseSpace(s[1]),this.position++):this.combinator()},t.prototype.string=function(){var s=this.currToken;this.newNode(new tm.default({value:this.currToken[1],source:{start:{line:s[2],column:s[3]},end:{line:s[4],column:s[5]}},sourceIndex:s[6]})),this.position++},t.prototype.universal=function(s){var r=this.nextToken;if(r&&r[1]==="|")return this.position++,this.namespace();this.newNode(new am.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]}),s),this.position++},t.prototype.splitWord=function(s,r){for(var n=this,i=this.nextToken,o=this.currToken[1];i&&i[0]==="word";){this.position++;var a=this.currToken[1];if(o+=a,a.lastIndexOf("\\")===a.length-1){var u=this.nextToken;u&&u[0]==="space"&&(o+=this.parseSpace(u[1]," "),this.position++)}i=this.nextToken}var c=(0,Ys.default)(o,"."),f=(0,Ys.default)(o,"#"),p=(0,Ys.default)(o,"#{");p.length&&(f=f.filter(function(g){return!~p.indexOf(g)}));var l=(0,hm.default)((0,Wd.default)((0,Ud.default)([[0],c,f])));l.forEach(function(g,x){var h=l[x+1]||o.length,d=o.slice(g,h);if(x===0&&r)return r.call(n,d,l.length);var m=void 0;~c.indexOf(g)?m=new Hd.default({value:d.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+g},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}):~f.indexOf(g)?m=new Jd.default({value:d.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+g},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}):m=new Zd.default({value:d,source:{start:{line:n.currToken[2],column:n.currToken[3]+g},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}),n.newNode(m,s)}),this.position++},t.prototype.word=function(s){var r=this.nextToken;return r&&r[1]==="|"?(this.position++,this.namespace()):this.splitWord(s)},t.prototype.loop=function(){for(;this.position{"use strict";Cr.__esModule=!0;var xm=function(){function t(e,s){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=new bm.default({css:s,error:function(o){throw new Error(o)},options:r});return this.res=n,this.func(n),this},xm(t,[{key:"result",get:function(){return String(this.res)}}]),t}();Cr.default=Sm;su.exports=Cr.default});var Y=y((Nx,ou)=>{"use strict";var Gs=function(t,e){let s=new t.constructor;for(let r in t){if(!t.hasOwnProperty(r))continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:n instanceof Array?s[r]=n.map(o=>Gs(o,s)):r!=="before"&&r!=="after"&&r!=="between"&&r!=="semicolon"&&(i==="object"&&n!==null&&(n=Gs(n)),s[r]=n)}return s};ou.exports=class{constructor(e){e=e||{},this.raws={before:"",after:""};for(let s in e)this[s]=e[s]}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 s=Gs(this);for(let r in e)s[r]=e[r];return s}cloneBefore(e){e=e||{};let s=this.clone(e);return this.parent.insertBefore(this,s),s}cloneAfter(e){e=e||{};let s=this.clone(e);return this.parent.insertAfter(this,s),s}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let s of e)this.parent.insertBefore(this,s);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 s in this){if(!this.hasOwnProperty(s)||s==="parent")continue;let r=this[s];r instanceof Array?e[s]=r.map(n=>typeof n=="object"&&n.toJSON?n.toJSON():n):typeof r=="object"&&r.toJSON?e[s]=r.toJSON():e[s]=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 s=this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i{"use strict";var Cm=Y(),Me=class extends Cm{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 s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}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 s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-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 typeof e=="number"?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}};Me.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!Me.prototype[e]&&(Me.prototype[e]=function(s){return this.walkType(t,s)})};au.exports=Me});var lu=y((Ix,uu)=>{"use strict";var Am=U();uu.exports=class extends Am{constructor(e){super(e),this.type="root"}}});var fu=y((Lx,cu)=>{"use strict";var Om=U();cu.exports=class extends Om{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var du=y((Dx,hu)=>{"use strict";var pu=U(),Ar=class extends pu{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};pu.registerWalker(Ar);hu.exports=Ar});var yu=y((Mx,mu)=>{"use strict";var Nm=U(),Pm=Y(),Or=class extends Pm{constructor(e){super(e),this.type="colon"}};Nm.registerWalker(Or);mu.exports=Or});var wu=y((Bx,gu)=>{"use strict";var Rm=U(),Im=Y(),Nr=class extends Im{constructor(e){super(e),this.type="comma"}};Rm.registerWalker(Nr);gu.exports=Nr});var xu=y((Ux,vu)=>{"use strict";var qm=U(),Lm=Y(),Pr=class extends Lm{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("")}};qm.registerWalker(Pr);vu.exports=Pr});var ku=y((Fx,bu)=>{"use strict";var _u=U(),Rr=class extends _u{constructor(e){super(e),this.type="func",this.unbalanced=-1}};_u.registerWalker(Rr);bu.exports=Rr});var Su=y(($x,Eu)=>{"use strict";var Dm=U(),Mm=Y(),Ir=class extends Mm{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("")}};Dm.registerWalker(Ir);Eu.exports=Ir});var Cu=y((Wx,Tu)=>{"use strict";var Bm=U(),Um=Y(),qr=class extends Um{constructor(e){super(e),this.type="operator"}};Bm.registerWalker(qr);Tu.exports=qr});var Ou=y((zx,Au)=>{"use strict";var Fm=U(),$m=Y(),Lr=class extends $m{constructor(e){super(e),this.type="paren",this.parenType=""}};Fm.registerWalker(Lr);Au.exports=Lr});var Pu=y((Yx,Nu)=>{"use strict";var Wm=U(),zm=Y(),Dr=class extends zm{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("")}};Wm.registerWalker(Dr);Nu.exports=Dr});var Iu=y((Vx,Ru)=>{"use strict";var Ym=U(),Vm=Y(),Mr=class extends Vm{constructor(e){super(e),this.type="word"}};Ym.registerWalker(Mr);Ru.exports=Mr});var Lu=y((Gx,qu)=>{"use strict";var Gm=U(),Hm=Y(),Br=class extends Hm{constructor(e){super(e),this.type="unicode-range"}};Gm.registerWalker(Br);qu.exports=Br});var Mu=y((Hx,Du)=>{"use strict";var Hs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while tokzenizing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};Du.exports=Hs});var Fu=y((Kx,Uu)=>{"use strict";var Ur=/[ \n\t\r\{\(\)'"\\;,/]/g,Km=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g,Be=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g,Qm=/^[a-z0-9]/i,jm=/^[a-f0-9?\-]/i,Bu=Mu();Uu.exports=function(e,s){s=s||{};let r=[],n=e.valueOf(),i=n.length,o=-1,a=1,u=0,c=0,f=null,p,l,g,x,h,d,m,_,w,v,R,F;function K(T){let C=`Unclosed ${T} at line: ${a}, column: ${u-o}, token: ${u}`;throw new Bu(C)}function $(){let T=`Syntax error at line: ${a}, column: ${u-o}, token: ${u}`;throw new Bu(T)}for(;u0&&r[r.length-1][0]==="word"&&r[r.length-1][1]==="url",r.push(["(","(",a,u-o,a,l-o,u]);break;case 41:c--,f=f&&c>0,r.push([")",")",a,u-o,a,l-o,u]);break;case 39:case 34:g=p===39?"'":'"',l=u;do for(v=!1,l=n.indexOf(g,l+1),l===-1&&K("quote",g),R=l;n.charCodeAt(R-1)===92;)R-=1,v=!v;while(v);r.push(["string",n.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case 64:Ur.lastIndex=u+1,Ur.test(n),Ur.lastIndex===0?l=n.length-1:l=Ur.lastIndex-2,r.push(["atword",n.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case 92:l=u,p=n.charCodeAt(l+1),m&&p!==47&&p!==32&&p!==10&&p!==9&&p!==13&&p!==12&&(l+=1),r.push(["word",n.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case 43:case 45:case 42:l=u+1,F=n.slice(u+1,l+1);let T=n.slice(u-1,u);if(p===45&&F.charCodeAt(0)===45){l++,r.push(["word",n.slice(u,l),a,u-o,a,l-o,u]),u=l-1;break}r.push(["operator",n.slice(u,l),a,u-o,a,l-o,u]),u=l-1;break;default:if(p===47&&(n.charCodeAt(u+1)===42||s.loose&&!f&&n.charCodeAt(u+1)===47)){if(n.charCodeAt(u+1)===42)l=n.indexOf("*/",u+2)+1,l===0&&K("comment","*/");else{let A=n.indexOf(` +`,u+2);l=A!==-1?A-1:i}d=n.slice(u,l+1),x=d.split(` +`),h=x.length-1,h>0?(_=a+h,w=l-x[h].length):(_=a,w=o),r.push(["comment",d,a,u-o,_,l-w,u]),o=w,a=_,u=l}else if(p===35&&!Qm.test(n.slice(u+1,u+2)))l=u+1,r.push(["#",n.slice(u,l),a,u-o,a,l-o,u]),u=l-1;else if((p===117||p===85)&&n.charCodeAt(u+1)===43){l=u+2;do l+=1,p=n.charCodeAt(l);while(l=48&&p<=57&&(C=Be),C.lastIndex=u+1,C.test(n),C.lastIndex===0?l=n.length-1:l=C.lastIndex-2,C===Be||p===46){let A=n.charCodeAt(l),ve=n.charCodeAt(l+1),Xs=n.charCodeAt(l+2);(A===101||A===69)&&(ve===45||ve===43)&&Xs>=48&&Xs<=57&&(Be.lastIndex=l+2,Be.test(n),Be.lastIndex===0?l=n.length-1:l=Be.lastIndex-2)}r.push(["word",n.slice(u,l+1),a,u-o,a,l-o,u]),u=l}break}u++}return r}});var Wu=y((Qx,$u)=>{"use strict";var Ks=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};$u.exports=Ks});var Gu=y((Jx,Vu)=>{"use strict";var Jm=lu(),Xm=fu(),Zm=du(),ey=yu(),ty=wu(),ry=xu(),sy=ku(),ny=Su(),iy=Cu(),zu=Ou(),oy=Pu(),Yu=Iu(),ay=Lu(),uy=Fu(),ly=Ds(),cy=Ms(),fy=Bs(),py=Wu();function hy(t){return t.sort((e,s)=>e-s)}Vu.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new Jm;let n=new Xm;this.root.append(n),this.current=n,this.tokens=uy(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new ey({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 ty({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=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new ry({value:s,inline:e,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(r),this.position++}error(e,s){throw new py(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new iy({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(s)}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();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s=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 ay({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=this.nextToken,s=this.currToken[1],r=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/,n=/^(?!\#([a-z0-9]+))[\#\{\}]/gi,i,o;if(!n.test(s))for(;e&&e[0]==="word";){this.position++;let a=this.currToken[1];s+=a,e=this.nextToken}i=cy(s,"@"),o=hy(fy(ly([[0],i]))),o.forEach((a,u)=>{let c=o[u+1]||s.length,f=s.slice(a,c),p;if(~i.indexOf(a))p=new Zm({value:f.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u]});else if(r.test(this.currToken[1])){let l=f.replace(r,"");p=new ny({value:f.replace(l,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u],unit:l})}else p=new(e&&e[0]==="("?sy:Yu)({value:f,source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u]}),p.type==="word"?(p.isHex=/^#(.+)/.test(f),p.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(p)}),this.position++}string(){let e=this.currToken,s=this.currToken[1],r=/^(\"|\')/,n=r.test(s),i="",o;n&&(i=s.match(r)[0],s=s.slice(1,s.length-1)),o=new oy({value:s,source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6],quoted:n}),o.raws.quote=i,this.newNode(o),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]}}});var Ny={};Zs(Ny,{languages:()=>hi,options:()=>mi,parsers:()=>Js,printers:()=>Oy});var dl=(t,e,s,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(s,r):s.global?e.replace(s,r):e.split(s).join(r)},E=dl;var Ue="string",Fe="array",$e="cursor",xe="indent",_e="align",We="trim",be="group",ee="fill",le="if-break",ze="indent-if-break",Ye="line-suffix",Ve="line-suffix-boundary",Q="line",Ge="label",ke="break-parent",kt=new Set([$e,xe,_e,We,be,ee,le,ze,Ye,Ve,Q,Ge,ke]);function ml(t){if(typeof t=="string")return Ue;if(Array.isArray(t))return Fe;if(!t)return;let{type:e}=t;if(kt.has(e))return e}var He=ml;var yl=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function gl(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(He(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=yl([...kt].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${r}.`}var Wr=class extends Error{name="InvalidDocError";constructor(e){super(gl(e)),this.doc=e}},zr=Wr;var tn=()=>{},ce=tn,Et=tn;function q(t){return ce(t),{type:xe,contents:t}}function rn(t,e){return ce(e),{type:_e,contents:e,n:t}}function L(t,e={}){return ce(t),Et(e.expandedStates,!0),{type:be,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function sn(t){return rn({type:"root"},t)}function fe(t){return rn(-1,t)}function Ke(t){return Et(t),{type:ee,parts:t}}function St(t,e="",s={}){return ce(t),e!==""&&ce(e),{type:le,breakContents:t,flatContents:e,groupId:s.groupId}}var Qe={type:ke};var wl={type:Q,hard:!0};var O={type:Q},M={type:Q,soft:!0},k=[wl,Qe];function V(t,e){ce(t),Et(e);let s=[];for(let r=0;r{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[s<0?e.length+s:s]:e.at(s)},G=vl;var nn=t=>{if(Array.isArray(t))return t;if(t.type!==ee)throw new Error(`Expect doc to be 'array' or '${ee}'.`);return t.parts};function xl(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){if(s.has(i))return s.get(i);let o=n(i);return s.set(i,o),o}function n(i){switch(He(i)){case Fe:return e(i.map(r));case ee:return e({...i,parts:i.parts.map(r)});case le:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case be:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case _e:case xe:case ze:case Ge:case Ye:return e({...i,contents:r(i.contents)});case Ue:case $e:case We:case Ve:case Q:case ke:return e(i);default:throw new zr(i)}}}function _l(t){return t.type===Q&&!t.hard?t.soft?"":" ":t.type===le?t.flatContents:t}function on(t){return xl(t,_l)}function bl(t){return Array.isArray(t)&&t.length>0}var te=bl;var Tt="'",an='"';function kl(t,e){let s=e===!0||e===Tt?Tt:an,r=s===Tt?an:Tt,n=0,i=0;for(let o of t)o===s?n++:o===r&&i++;return n>i?r:s}var un=kl;function El(t,e,s){let r=e==='"'?"'":'"',i=E(!1,t,/\\(.)|(["'])/gs,(o,a,u)=>a===r?a:u===e?"\\"+u:u||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return e+i+e}var ln=El;function Sl(t,e){let s=t.slice(1,-1),r=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":un(s,e.singleQuote);return ln(s,r,!(e.parser==="css"||e.parser==="less"||e.parser==="scss"||e.__embeddedInHtml))}var Ct=Sl;var Yr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},cn=Yr;function Tl(t){return(t==null?void 0:t.type)==="front-matter"}var Ee=Tl;var Cl=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function fn(t,e,s){if(Ee(t)&&t.lang==="yaml"&&delete e.value,t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||Ee(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/.test(t.text))||s.type==="css-root"&&G(!1,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,t.type==="selector-combinator"&&(e.value=E(!1,e.value,/\s+/g," ")),t.type==="media-feature"&&(e.value=E(!1,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(e.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=e.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=e.name.toLowerCase()),t.type==="value-number"&&(e.unit=e.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=E(!1,e.value,/;$/g,"")),(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&e.value&&(e.value=Al(e.value)),t.type==="selector-attribute"&&(e.attribute=e.attribute.trim(),e.namespace&&typeof e.namespace=="string"&&(e.namespace=e.namespace.trim(),e.namespace.length===0&&(e.namespace=!0)),e.value&&(e.value=E(!1,e.value.trim(),/^["']|["']$/g,""),delete e.quoted)),(t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&e.value&&(e.value=E(!1,e.value,/([\d+.e-]+)([a-z]*)/gi,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=t.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&r.value.endsWith("[")||r.type==="value-word"&&r.value.startsWith("]")))return{type:"value-atword",value:t.groups.map(r=>r.value).join(""),group:{open:null,close:null,groups:[],type:"value-paren_group"}}}fn.ignoredProperties=Cl;function Al(t){return E(!1,E(!1,t,"'",'"'),/\\([^\da-f])/gi,"$1")}var pn=fn;async function Ol(t,e){if(t.lang==="yaml"){let s=t.value.trim(),r=s?await e(s,{parser:"yaml"}):"";return sn([t.startDelimiter,k,r,r?k:"",t.endDelimiter])}}var hn=Ol;function dn(t){let{node:e}=t;if(e.type==="front-matter")return async s=>{let r=await hn(e,s);return r?[r,k]:void 0}}dn.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var mn=dn;var je=null;function Je(t){if(je!==null&&typeof je.property){let e=je;return je=Je.prototype=null,e}return je=Je.prototype=t??Object.create(null),new Je}var Nl=10;for(let t=0;t<=Nl;t++)Je();function Vr(t){return Je(t)}function Pl(t,e="type"){Vr(t);function s(r){let n=r[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}return s}var yn=Pl;var Rl={"front-matter":[],"css-root":["frontMatter","nodes"],"css-comment":[],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":["nodes"],"media-query":["nodes"],"media-type":[],"media-feature-expression":["nodes"],"media-feature":[],"media-colon":[],"media-value":[],"media-keyword":[],"media-url":[],"media-unknown":[],"selector-root":["nodes"],"selector-selector":["nodes"],"selector-comment":[],"selector-string":[],"selector-tag":[],"selector-id":[],"selector-class":[],"selector-attribute":[],"selector-combinator":["nodes"],"selector-universal":[],"selector-pseudo":["nodes"],"selector-nesting":[],"selector-unknown":[],"value-value":["group"],"value-root":["group"],"value-comment":[],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":["group"],"value-paren":[],"value-number":[],"value-operator":[],"value-word":[],"value-colon":[],"value-comma":[],"value-string":[],"value-atword":[],"value-unicode-range":[],"value-unknown":[]},gn=Rl;var Il=yn(gn),wn=Il;function ql(t,e){let s=0;for(let r=0;r{let n=!!(r!=null&&r.backwards);if(s===!1)return!1;let{length:i}=e,o=s;for(;o>=0&&o-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function _c(t){let e=t.match(kc);if(!e)return{content:t};let{startDelimiter:n,language:r,value:s="",endDelimiter:i}=e.groups,o=r.trim()||"yaml";if(n==="+++"&&(o="toml"),o!=="yaml"&&n!==i)return{content:t};let[a]=e;return{frontMatter:{type:"front-matter",lang:o,value:s,startDelimiter:n,endDelimiter:i,raw:a.replace(/\n$/,"")},content:T(!1,a,/[^\n]/g," ")+t.slice(a.length)}}var je=_c;function ei(t){return Xs(je(t).content)}function ti(t){let{frontMatter:e,content:n}=je(t);return(e?e.raw+` +`)+i}var Gl=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function Hl(t){let e=t.match(Gl);if(!e)return{content:t};let{startDelimiter:s,language:r,value:n="",endDelimiter:i}=e.groups,o=r.trim()||"yaml";if(s==="+++"&&(o="toml"),o!=="yaml"&&s!==i)return{content:t};let[a]=e;return{frontMatter:{type:"front-matter",lang:o,value:n,startDelimiter:s,endDelimiter:i,raw:a.replace(/\n$/,"")},content:E(!1,a,/[^\n]/g," ")+t.slice(a.length)}}var Xe=Hl;function qn(t){return Rn(Xe(t).content)}function Ln(t){let{frontMatter:e,content:s}=Xe(t);return(e?e.raw+` -`:"")+Zs(n)}var Je=null;function Xe(t){if(Je!==null&&typeof Je.property){let e=Je;return Je=Xe.prototype=null,e}return Je=Xe.prototype=t??Object.create(null),new Xe}var Tc=10;for(let t=0;t<=Tc;t++)Xe();function sn(t){return Xe(t)}function Ec(t,e="type"){sn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var ri=Ec;var Sc={"front-matter":[],"css-root":["frontMatter","nodes"],"css-comment":[],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":["nodes"],"media-query":["nodes"],"media-type":[],"media-feature-expression":["nodes"],"media-feature":[],"media-colon":[],"media-value":[],"media-keyword":[],"media-url":[],"media-unknown":[],"selector-root":["nodes"],"selector-selector":["nodes"],"selector-comment":[],"selector-string":[],"selector-tag":[],"selector-id":[],"selector-class":[],"selector-attribute":[],"selector-combinator":["nodes"],"selector-universal":[],"selector-pseudo":["nodes"],"selector-nesting":[],"selector-unknown":[],"value-value":["group"],"value-root":["group"],"value-comment":[],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":["group"],"value-paren":[],"value-number":[],"value-operator":[],"value-word":[],"value-colon":[],"value-comma":[],"value-string":[],"value-atword":[],"value-unicode-range":[],"value-unknown":[]},ni=Sc;var Cc=ri(ni),si=Cc;var Oc=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 ii(t){var e,n;return(n=(e=t.findAncestor(r=>r.type==="css-decl"))==null?void 0:e.prop)==null?void 0:n.toLowerCase()}var Ac=new Set(["initial","inherit","unset","revert"]);function oi(t){return Ac.has(t.toLowerCase())}function ai(t,e){var r;let n=t.findAncestor(s=>s.type==="css-atrule");return((r=n==null?void 0:n.name)==null?void 0:r.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(e.toLowerCase())}function ne(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function Ee(t,e){var r;let n=t.findAncestor(s=>s.type==="value-func");return((r=n==null?void 0:n.value)==null?void 0:r.toLowerCase())===e}function ui(t){var r;let e=t.findAncestor(s=>s.type==="css-rule"),n=(r=e==null?void 0:e.raws)==null?void 0:r.selector;return n&&(n.startsWith(":import")||n.startsWith(":export"))}function Se(t,e){let n=Array.isArray(e)?e:[e],r=t.findAncestor(s=>s.type==="css-atrule");return r&&n.includes(r.name.toLowerCase())}function li(t){var n;let{node:e}=t;return e.groups[0].value==="url"&&e.groups.length===2&&((n=t.findAncestor(r=>r.type==="css-atrule"))==null?void 0:n.name)==="import"}function ci(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function fi(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function Pt(t,e){var r;let n=(r=t.parent)==null?void 0:r.nodes;return n&&n.indexOf(e)===n.length-1}function pi(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/.test(e)||e.value&&/^@.+:.*$/.test(e.value):!1}function hi(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function di(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function mi(t){return t.type==="value-word"&&t.value==="in"}function Rt(t){return t.type==="value-operator"&&t.value==="*"}function Ze(t){return t.type==="value-operator"&&t.value==="/"}function j(t){return t.type==="value-operator"&&t.value==="+"}function he(t){return t.type==="value-operator"&&t.value==="-"}function Nc(t){return t.type==="value-operator"&&t.value==="%"}function It(t){return Rt(t)||Ze(t)||j(t)||he(t)||Nc(t)}function yi(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function gi(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function et(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function an(t){var e;return((e=t.raws)==null?void 0:e.params)&&/^\(\s*\)$/.test(t.raws.params)}function qt(t){return t.name.startsWith("prettier-placeholder")}function wi(t){return t.prop.startsWith("@prettier-placeholder")}function vi(t,e){return t.value==="$$"&&t.type==="value-func"&&(e==null?void 0:e.type)==="value-word"&&!e.raws.before}function xi(t){var e,n;return((e=t.value)==null?void 0:e.type)==="value-root"&&((n=t.value.group)==null?void 0:n.type)==="value-value"&&t.prop.toLowerCase()==="composes"}function bi(t){var e,n,r;return((r=(n=(e=t.value)==null?void 0:e.group)==null?void 0:n.group)==null?void 0:r.type)==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function de(t){var e;return((e=t.raws)==null?void 0:e.before)===""}function Dt(t){var e,n;return t.type==="value-comma_group"&&((n=(e=t.groups)==null?void 0:e[1])==null?void 0:n.type)==="value-colon"}function on(t){var e;return t.type==="value-paren_group"&&((e=t.groups)==null?void 0:e[0])&&Dt(t.groups[0])}function un(t,e){var i;if(e.parser!=="scss")return!1;let{node:n}=t;if(n.groups.length===0)return!1;let r=t.grandparent;if(!on(n)&&!(r&&on(r)))return!1;let s=t.findAncestor(o=>o.type==="css-decl");return!!((i=s==null?void 0:s.prop)!=null&&i.startsWith("$")||on(r)||r.type==="value-func")}function ln(t){return t.type==="value-comment"&&t.inline}function Lt(t){return t.type==="value-word"&&t.value==="#"}function cn(t){return t.type==="value-word"&&t.value==="{"}function Mt(t){return t.type==="value-word"&&t.value==="}"}function tt(t){return["value-word","value-atword"].includes(t.type)}function Bt(t){return(t==null?void 0:t.type)==="value-colon"}function ki(t,e){if(!Dt(e))return!1;let{groups:n}=e,r=n.indexOf(t);return r===-1?!1:Bt(n[r+1])}function _i(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function Ti(t){return t.type!=="value-func"?!1:Oc.has(t.value.toLowerCase())}function Ce(t){return/\/\//.test(t.split(/[\n\r]/).pop())}function rt(t){return(t==null?void 0:t.type)==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function Ei(t,e){var n,r;if(((n=t.open)==null?void 0:n.value)!=="("||((r=t.close)==null?void 0:r.value)!==")"||t.groups.some(s=>s.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let s=e.groups.indexOf(t)-1,i=e.groups[s];if((i==null?void 0:i.type)==="value-word"&&i.value==="with")return!0}return!1}function nt(t){var e,n;return t.type==="value-paren_group"&&((e=t.open)==null?void 0:e.value)==="("&&((n=t.close)==null?void 0:n.value)===")"}function Ft(t){return(e,n,r)=>{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&oCt(n,e))}function Ii(t,e){let n=e.singleQuote?"'":'"';return t.includes('"')||t.includes("'")?t:n+t+n}function me(t){return T(!1,t,Mc,(e,n,r,s,i)=>!r&&s?mn(s)+ne(i||""):e)}function mn(t){return Ni(t).replace(/\.0(?=$|e)/,"")}function qi(t){return t.trailingComma==="es5"||t.trailingComma==="all"}function Bc(t,e,n){var d;let{node:r}=t,s=t.parent,i=t.grandparent,o=ii(t),a=o&&s.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),u=t.findAncestor(m=>m.type==="css-atrule"),c=u&&et(u,e),f=r.groups.some(m=>ln(m)),p=t.map(n,"groups"),l=[],g=Ee(t,"url"),x=!1,h=!1;for(let m=0;mve:O!==-1?x=!0:ve!==-1&&(x=!1)}if(x||Bt(w)||Bt(v)||w.type==="value-atword"&&(w.value===""||w.value.endsWith("["))||v.type==="value-word"&&v.value.startsWith("]")||w.value==="~"||w.type!=="value-string"&&w.value&&w.value.includes("\\")&&v&&v.type!=="value-comment"||b!=null&&b.value&&b.value.indexOf("\\")===b.value.length-1&&w.type==="value-operator"&&w.value==="/"||w.value==="\\"||vi(w,v)||Lt(w)||cn(w)||Mt(v)||cn(v)&&de(v)||Mt(w)&&de(v)||w.value==="--"&&Lt(v))continue;let $=It(w),H=It(v);if(($&&Lt(v)||H&&Mt(w))&&de(v)||!b&&Ze(w)||Ee(t,"calc")&&(j(w)||j(v)||he(w)||he(v))&&de(v))continue;let U=(j(w)||he(w))&&m===0&&(v.type==="value-number"||v.isHex)&&i&&Ti(i)&&!de(v),S=(R==null?void 0:R.type)==="value-func"||R&&tt(R)||w.type==="value-func"||tt(w),C=v.type==="value-func"||tt(v)||(b==null?void 0:b.type)==="value-func"||b&&tt(b);if(e.parser==="scss"&&$&&w.value==="-"&&v.type==="value-func"&&P(w)!==N(v)){l.push(" ");continue}if(!(!(Rt(v)||Rt(w))&&!Ee(t,"calc")&&!U&&(Ze(v)&&!S||Ze(w)&&!C||j(v)&&!S||j(w)&&!C||he(v)||he(w))&&(de(v)||$&&(!b||b&&It(b))))&&!((e.parser==="scss"||e.parser==="less")&&$&&w.value==="-"&&nt(v)&&P(w)===N(v.open)&&v.open.value==="(")){if(ln(w)){if(s.type==="value-paren_group"){l.push(fe(_));continue}l.push(_);continue}if(c&&(yi(v)||gi(v)||di(v)||mi(w)||hi(w))){l.push(" ");continue}if(u&&u.name.toLowerCase()==="namespace"){l.push(" ");continue}if(a){w.source&&v.source&&w.source.start.line!==v.source.start.line?(l.push(_),h=!0):l.push(" ");continue}if(H){l.push(" ");continue}if((v==null?void 0:v.value)!=="..."&&!(rt(w)&&rt(v)&&P(w)===N(v))){if(rt(w)&&nt(v)&&P(w)===N(v.open)){l.push(M);continue}if(w.value==="with"&&nt(v)){l.push(" ");continue}(d=w.value)!=null&&d.endsWith("#")&&v.value==="{"&&nt(v.group)||l.push(A)}}}return f&&l.push(Qe),h&&l.unshift(_),c?D(q(l)):li(t)?D(He(l)):D(q(He(l)))}var Di=Bc;function Fc(t,e,n){let r=!!(n!=null&&n.backwards);if(e===!1)return!1;let s=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&s===` -`)return e-2;if(s===` -`||s==="\r"||s==="\u2028"||s==="\u2029")return e-1}else{if(s==="\r"&&t.charAt(e+1)===` -`)return e+2;if(s===` -`||s==="\r"||s==="\u2028"||s==="\u2029")return e+1}return e}var Wt=Fc;function $c(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let n=e+2;nn.type==="value-comment"))&&qi(e)&&t.callParent(()=>un(t,e))?Nt(","):""}function Bi(t,e,n){let{node:r,parent:s}=t,i=t.map(({node:g})=>typeof g=="string"?g:n(),"groups");if(s&&ci(s)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?n("open"):"",Y(",",i),r.close?n("close"):""];if(!r.open){let g=yn(t),x=Y([",",g?_:A],i);return q(g?[_,x]:D(He(x)))}let o=t.map(({node:g,isLast:x,index:h})=>{var b;let d=i[h];if(Dt(g)&&g.type==="value-comma_group"&&g.groups&&g.groups[0].type!=="value-paren_group"&&((b=g.groups[2])==null?void 0:b.type)==="value-paren_group"){let w=Ds(d.contents.contents);w[1]=D(w[1]),d=D(fe(d))}let m=[d,x?Yc(t,e):","];if(!x&&g.type==="value-comma_group"&&ee(g.groups)){let w=G(!1,g.groups,-1);!w.source&&w.close&&(w=w.close),w.source&&Vt(e.originalText,P(w))&&m.push(_)}return m},"groups"),a=ki(r,s),u=Ei(r,s),c=un(t,e),f=u||c&&!a,p=u||a,l=D([r.open?n("open"):"",q([M,Y(A,o)]),M,r.close?n("close"):""],{shouldBreak:f});return p?fe(l):l}function yn(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(n=>n.type==="value-comma_group"),(e,n)=>n==="group"&&e.type==="value-value",(e,n)=>n==="group"&&e.type==="value-root",(e,n)=>n==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function Gc(t,e,n){let r=[];return t.each(()=>{let{node:s,previous:i}=t;if((i==null?void 0:i.type)==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(N(s),P(s))):r.push(n()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!zt(e.originalText,N(o),{backwards:!0})&&!Te(s)||o.type==="css-atrule"&&o.name==="else"&&s.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?A:_),Vt(e.originalText,P(s))&&!Te(s)&&r.push(_))},"nodes"),r}var Oe=Gc;function Kc(t,e,n){var s,i,o,a,u,c;let{node:r}=t;switch(r.type){case"front-matter":return[r.raw,_];case"css-root":{let f=Oe(t,e,n),p=r.raws.after.trim();return p.startsWith(";")&&(p=p.slice(1).trim()),[r.frontMatter?[n("frontMatter"),_]:"",f,p?` ${p}`:"",r.nodes.length>0?_:""]}case"css-comment":{let f=r.inline||r.raws.inline,p=e.originalText.slice(N(r),P(r));return f?p.trimEnd():p}case"css-rule":return[n("selector"),r.important?" !important":"",r.nodes?[((s=r.selector)==null?void 0:s.type)==="selector-unknown"&&Ce(r.selector.value)?A:r.selector?" ":"","{",r.nodes.length>0?q([_,Oe(t,e,n)]):"",_,"}",pi(r)?";":""]:";"];case"css-decl":{let f=t.parent,{between:p}=r.raws,l=p.trim(),g=l===":",x=typeof r.value=="string"&&/^ *$/.test(r.value),h=typeof r.value=="string"?r.value:n("value");return h=xi(r)?Ls(h):h,!g&&Ce(l)&&!((o=(i=r.value)==null?void 0:i.group)!=null&&o.group&&t.call(()=>yn(t),"value","group","group"))&&(h=q([_,fe(h)])),[T(!1,r.raws.before,/[\s;]/g,""),f.type==="css-atrule"&&f.variable||ui(t)?r.prop:ne(r.prop),l.startsWith("//")?" ":"",l,r.extend||x?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",n("selector"),")"]:"",h,r.raws.important?r.raws.important.replace(/\s*!\s*important/i," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/i," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/i," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",q([M,Oe(t,e,n)]),M,"}"]:wi(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&Pt(t,r)?Nt(";"):";"]}case"css-atrule":{let f=t.parent,p=qt(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[n("selector"),r.important?" !important":"",p?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:n("params"),p?"":";"];if(r.variable)return["@",r.name,": ",r.value?n("value"):"",r.raws.between.trim()?r.raws.between.trim()+" ":"",r.nodes?["{",q([r.nodes.length>0?M:"",Oe(t,e,n)]),M,"}"]:"",p?"":";"]}let l=r.name==="import"&&((a=r.params)==null?void 0:a.type)==="value-unknown"&&r.params.value.endsWith(";");return["@",an(r)||r.name.endsWith(":")||qt(r)?r.name:ne(r.name),r.params?[an(r)?"":qt(r)?r.raws.afterName===""?"":r.name.endsWith(":")?" ":/^\s*\n\s*\n/.test(r.raws.afterName)?[_,_]:/^\s*\n/.test(r.raws.afterName)?_:" ":" ",typeof r.params=="string"?r.params:n("params")]:"",r.selector?q([" ",n("selector")]):"",r.value?D([" ",n("value"),et(r,e)?bi(r)?" ":A:""]):r.name==="else"?" ":"",r.nodes?[et(r,e)?"":r.selector&&!r.selector.nodes&&typeof r.selector.value=="string"&&Ce(r.selector.value)||!r.selector&&typeof r.params=="string"&&Ce(r.params)?A:" ","{",q([r.nodes.length>0?M:"",Oe(t,e,n)]),M,"}"]:p||l?"":";"]}case"media-query-list":{let f=[];return t.each(({node:p})=>{p.type==="media-query"&&p.value===""||f.push(n())},"nodes"),D(q(Y(A,f)))}case"media-query":return[Y(" ",t.map(n,"nodes")),Pt(t,r)?"":","];case"media-type":return me(W(r.value,e));case"media-feature-expression":return r.nodes?["(",...t.map(n,"nodes"),")"]:r.value;case"media-feature":return ne(W(T(!1,r.value,/ +/g," "),e));case"media-colon":return[r.value," "];case"media-value":return me(W(r.value,e));case"media-keyword":return W(r.value,e);case"media-url":return W(T(!1,T(!1,r.value,/^url\(\s+/gi,"url("),/\s+\)$/g,")"),e);case"media-unknown":return r.value;case"selector-root":return D([Se(t,"custom-selector")?[t.findAncestor(f=>f.type==="css-atrule").customSelector,A]:"",Y([",",Se(t,["extend","custom-selector","nest"])?A:_],t.map(n,"nodes"))]);case"selector-selector":return D(q(t.map(n,"nodes")));case"selector-comment":return r.value;case"selector-string":return W(r.value,e);case"selector-tag":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",((u=t.previous)==null?void 0:u.type)==="selector-nesting"?r.value:me(ai(t,r.value)?r.value.toLowerCase():r.value)];case"selector-id":return["#",r.value];case"selector-class":return[".",me(W(r.value,e))];case"selector-attribute":return["[",r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.attribute.trim(),r.operator??"",r.value?Ii(W(r.value.trim(),e),e):"",r.insensitive?" i":"","]"];case"selector-combinator":{if(r.value==="+"||r.value===">"||r.value==="~"||r.value===">>>"){let l=t.parent;return[l.type==="selector-selector"&&l.nodes[0]===r?"":A,r.value,Pt(t,r)?"":" "]}let f=r.value.trim().startsWith("(")?A:"",p=me(W(r.value.trim(),e))||A;return[f,p]}case"selector-universal":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.value];case"selector-pseudo":return[ne(r.value),ee(r.nodes)?D(["(",q([M,Y([",",A],t.map(n,"nodes"))]),M,")"]):""];case"selector-nesting":return r.value;case"selector-unknown":{let f=t.findAncestor(g=>g.type==="css-rule");if(f!=null&&f.isSCSSNesterProperty)return me(W(ne(r.value),e));let p=t.parent;if((c=p.raws)!=null&&c.selector){let g=N(p),x=g+p.raws.selector.length;return e.originalText.slice(g,x).trim()}let l=t.grandparent;if(p.type==="value-paren_group"&&(l==null?void 0:l.type)==="value-func"&&l.value==="selector"){let g=P(p.open)+1,x=N(p.close),h=e.originalText.slice(g,x).trim();return Ce(h)?[Qe,h]:h}return r.value}case"value-value":case"value-root":return n("group");case"value-comment":return e.originalText.slice(N(r),P(r));case"value-comma_group":return Di(t,e,n);case"value-paren_group":return Bi(t,e,n);case"value-func":return[r.value,Se(t,"supports")&&_i(r)?" ":"",n("group")];case"value-paren":return r.value;case"value-number":return[mn(r.value),Pi(r.unit)];case"value-operator":return r.value;case"value-word":return r.isColor&&r.isHex||oi(r.value)?r.value.toLowerCase():r.value;case"value-colon":{let{previous:f}=t;return[r.value,typeof(f==null?void 0:f.value)=="string"&&f.value.endsWith("\\")||Ee(t,"url")?"":A]}case"value-string":return Ct(r.raws.quote+r.value+r.raws.quote,e);case"value-atword":return["@",r.value];case"value-unicode-range":return r.value;case"value-unknown":return r.value;case"value-comma":default:throw new Ms(r,"PostCSS")}}var Hc={print:Kc,embed:Ws,insertPragma:ti,massageAstNode:Fs,getVisitorKeys:si},Fi=Hc;var Es={};Cs(Es,{css:()=>Bg,less:()=>Fg,scss:()=>$g});var ql=ue(dt(),1),Dl=ue(Ho(),1),Ll=ue(Pa(),1);function Jp(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Ra=Jp;function Xp(t,e){return e.parser!=="scss"||!t.selector?!1:t.selector.replace(/\/\*.*?\*\//,"").replace(/\/\/.*\n/,"").trim().endsWith(":")}var Ia=Xp;var Zp=new Set(["import","use","forward"]);function eh(t){return Zp.has(t)}var qa=eh;var Tl=ue(Ou(),1);var id=t=>{for(;t.parent;)t=t.parent;return t},Pr=id;function od(t){return Pr(t).text.slice(t.group.open.sourceIndex+1,t.group.close.sourceIndex).trim()}var Au=od;function ad(t){if(ee(t)){for(let e=t.length-1;e>0;e--)if(t[e].type==="word"&&t[e].value==="{"&&t[e-1].type==="word"&&t[e-1].value.endsWith("#"))return!0}return!1}var Nu=ad;function ud(t){return t.some(e=>e.type==="string"||e.type==="func"&&!e.value.endsWith("\\"))}var Pu=ud;function ld(t,e){return!!(e.parser==="scss"&&(t==null?void 0:t.type)==="word"&&t.value.startsWith("$"))}var Ru=ld;var _l=ue(kl(),1);function X(t,e,n){if(t&&typeof t=="object"){delete t.parent;for(let r in t)X(t[r],e,n),r==="type"&&typeof t[r]=="string"&&!t[r].startsWith(e)&&(!n||!n.test(t[r]))&&(t[r]=e+t[r])}return t}function ms(t){if(t&&typeof t=="object"){delete t.parent;for(let e in t)ms(t[e]);!Array.isArray(t)&&t.value&&!t.type&&(t.type="unknown")}return t}function xg(t){if(/\/\/|\/\*/.test(t))return{type:"selector-unknown",value:t.trim()};let e;try{new _l.default(n=>{e=n}).process(t)}catch{return{type:"selector-unknown",value:t}}return X(e,"selector-")}var Z=xg;function bg(t,e){var u;let{nodes:n}=t,r={open:null,close:null,groups:[],type:"paren_group"},s=[r],i=r,o={groups:[],type:"comma_group"},a=[o];for(let c=0;c0&&r.groups.push(o),r.close=f,a.length===1)throw new Error("Unbalanced parenthesis");a.pop(),o=G(!1,a,-1),o.groups.push(r),s.pop(),r=G(!1,s,-1)}else f.type==="comma"?(r.groups.push(o),o={groups:[],type:"comma_group"},a[a.length-1]=o):o.groups.push(f)}return o.groups.length>0&&r.groups.push(o),i}function en(t){return t.type==="paren_group"&&!t.open&&!t.close&&t.groups.length===1||t.type==="comma_group"&&t.groups.length===1?en(t.groups[0]):t.type==="paren_group"||t.type==="comma_group"?{...t,groups:t.groups.map(en)}:t}function El(t,e){if(t&&typeof t=="object")for(let n in t)n!=="parent"&&(El(t[n],e),n==="nodes"&&(t.group=en(bg(t,e)),delete t[n]));return t}function kg(t,e){if(e.parser==="less"&&t.startsWith("~`"))return{type:"value-unknown",value:t};let n=null;try{n=new Tl.default(t,{loose:!0}).parse()}catch{return{type:"value-unknown",value:t}}n.text=t;let r=El(n,e);return X(r,"value-",/^selector-/)}var ae=kg;var Rl=ue(Pl(),1);var qg=Rl.default.default;function Dg(t){let e;try{e=qg(t)}catch{return{type:"selector-unknown",value:t}}return X(ms(e),"media-")}var Il=Dg;var Lg=/(\s*)(!default).*$/,Mg=/(\s*)(!global).*$/;function Ml(t,e){var n,r;if(t&&typeof t=="object"){delete t.parent;for(let a in t)Ml(t[a],e);if(!t.type)return t;if(t.raws??(t.raws={}),t.type==="css-decl"&&typeof t.prop=="string"&&t.prop.startsWith("--")&&typeof t.value=="string"&&t.value.startsWith("{")){let a;if(t.value.trimEnd().endsWith("}")){let u=e.originalText.slice(0,t.source.start.offset),c="a".repeat(t.prop.length)+e.originalText.slice(t.source.start.offset+t.prop.length,t.source.end.offset),f=T(!1,u,/[^\n]/g," ")+c,p;e.parser==="scss"?p=$l:e.parser==="less"?p=Fl:p=Bl;let l;try{l=p(f,{...e})}catch{}((n=l==null?void 0:l.nodes)==null?void 0:n.length)===1&&l.nodes[0].type==="css-rule"&&(a=l.nodes[0].nodes)}return a?t.value={type:"css-rule",nodes:a}:t.value={type:"value-unknown",value:t.raws.value.raw},t}let s="";typeof t.selector=="string"&&(s=t.raws.selector?t.raws.selector.scss??t.raws.selector.raw:t.selector,t.raws.between&&t.raws.between.trim().length>0&&(s+=t.raws.between),t.raws.selector=s);let i="";typeof t.value=="string"&&(i=t.raws.value?t.raws.value.scss??t.raws.value.raw:t.value,i=i.trim(),t.raws.value=i);let o="";if(typeof t.params=="string"&&(o=t.raws.params?t.raws.params.scss??t.raws.params.raw:t.params,t.raws.afterName&&t.raws.afterName.trim().length>0&&(o=t.raws.afterName+o),t.raws.between&&t.raws.between.trim().length>0&&(o=o+t.raws.between),o=o.trim(),t.raws.params=o),s.trim().length>0)return s.startsWith("@")&&s.endsWith(":")?t:t.mixin?(t.selector=ae(s,e),t):(Ia(t,e)&&(t.isSCSSNesterProperty=!0),t.selector=Z(s),t);if(i.length>0){let a=i.match(Lg);a&&(i=i.slice(0,a.index),t.scssDefault=!0,a[0].trim()!=="!default"&&(t.raws.scssDefault=a[0]));let u=i.match(Mg);if(u&&(i=i.slice(0,u.index),t.scssGlobal=!0,u[0].trim()!=="!global"&&(t.raws.scssGlobal=u[0])),i.startsWith("progid:"))return{type:"value-unknown",value:i};t.value=ae(i,e)}if(e.parser==="less"&&t.type==="css-decl"&&i.startsWith("extend(")&&(t.extend||(t.extend=t.raws.between===":"),t.extend&&!t.selector&&(delete t.value,t.selector=Z(i.slice(7,-1)))),t.type==="css-atrule"){if(e.parser==="less"){if(t.mixin){let a=t.raws.identifier+t.name+t.raws.afterName+t.raws.params;return t.selector=Z(a),delete t.params,t}if(t.function)return t}if(e.parser==="css"&&t.name==="custom-selector"){let a=t.params.match(/:--\S+\s+/)[0].trim();return t.customSelector=a,t.selector=Z(t.params.slice(a.length).trim()),delete t.params,t}if(e.parser==="less"){if(t.name.includes(":")&&!t.params){t.variable=!0;let a=t.name.split(":");t.name=a[0],t.value=ae(a.slice(1).join(":"),e)}if(!["page","nest","keyframes"].includes(t.name)&&((r=t.params)==null?void 0:r[0])===":"){t.variable=!0;let a=t.params.slice(1);a&&(t.value=ae(a,e)),t.raws.afterName+=":"}if(t.variable)return delete t.params,t.value||delete t.value,t}}if(t.type==="css-atrule"&&o.length>0){let{name:a}=t,u=t.name.toLowerCase();return a==="warn"||a==="error"?(t.params={type:"media-unknown",value:o},t):a==="extend"||a==="nest"?(t.selector=Z(o),delete t.params,t):a==="at-root"?(/^\(\s*(?:without|with)\s*:.+\)$/s.test(o)?t.params=ae(o,e):(t.selector=Z(o),delete t.params),t):qa(u)?(t.import=!0,delete t.filename,t.params=ae(o,e),t):["namespace","supports","if","else","for","each","while","debug","mixin","include","function","return","define-mixin","add-mixin"].includes(a)?(o=o.replace(/(\$\S+?)(\s+)?\.{3}/,"$1...$2"),o=o.replace(/^(?!if)(\S+)(\s+)\(/,"$1($2"),t.value=ae(o,e),delete t.params,t):["media","custom-media"].includes(u)?o.includes("#{")?{type:"media-unknown",value:o}:(t.params=Il(o),t):(t.params=o,t)}}return t}function _s(t,e,n){let r=je(e),{frontMatter:s}=r;e=r.content;let i;try{i=t(e,{map:!1})}catch(o){let{name:a,reason:u,line:c,column:f}=o;throw typeof c!="number"?o:Ra(`${a}: ${u}`,{loc:{start:{line:c,column:f}},cause:o})}return n.originalText=e,i=Ml(X(i,"css-"),n),hn(i,e),s&&(s.source={startOffset:0,endOffset:s.raw.length},i.frontMatter=s),i}function Bl(t,e={}){return _s(ql.default.default,t,e)}function Fl(t,e={}){return _s(n=>Dl.default.parse(Ai(n)),t,e)}function $l(t,e={}){return _s(Ll.default,t,e)}var Ts={astFormat:"postcss",hasPragma:ei,locStart:N,locEnd:P},Bg={...Ts,parse:Bl},Fg={...Ts,parse:Fl},$g={...Ts,parse:$l};var Ul=[{linguistLanguageId:50,name:"CSS",type:"markup",tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",color:"#563d7c",extensions:[".css",".wxss"],parsers:["css"],vscodeLanguageIds:["css"]},{linguistLanguageId:262764437,name:"PostCSS",type:"markup",color:"#dc3a0c",tmScope:"source.postcss",group:"CSS",extensions:[".pcss",".postcss"],aceMode:"text",parsers:["css"],vscodeLanguageIds:["postcss"]},{linguistLanguageId:198,name:"Less",type:"markup",color:"#1d365d",aliases:["less-css"],extensions:[".less"],tmScope:"source.css.less",aceMode:"less",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"]},{linguistLanguageId:329,name:"SCSS",type:"markup",color:"#c6538c",tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",extensions:[".scss"],parsers:["scss"],vscodeLanguageIds:["scss"]}];var Wl={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Ug={singleQuote:Wl.singleQuote},zl=Ug;var Wg={postcss:Fi};return Ql(zg);}); \ No newline at end of file +`:"")+In(s)}var Kl=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 Dn(t){var e,s;return(s=(e=t.findAncestor(r=>r.type==="css-decl"))==null?void 0:e.prop)==null?void 0:s.toLowerCase()}var Ql=new Set(["initial","inherit","unset","revert"]);function Mn(t){return Ql.has(t.toLowerCase())}function Bn(t,e){var r;let s=t.findAncestor(n=>n.type==="css-atrule");return((r=s==null?void 0:s.name)==null?void 0:r.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(e.toLowerCase())}function se(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function Se(t,e){var r;let s=t.findAncestor(n=>n.type==="value-func");return((r=s==null?void 0:s.value)==null?void 0:r.toLowerCase())===e}function Un(t){var r;let e=t.findAncestor(n=>n.type==="css-rule"),s=(r=e==null?void 0:e.raws)==null?void 0:r.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))}function Te(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function Fn(t){var s;let{node:e}=t;return e.groups[0].value==="url"&&e.groups.length===2&&((s=t.findAncestor(r=>r.type==="css-atrule"))==null?void 0:s.name)==="import"}function $n(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function Wn(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function Pt(t,e){var r;let s=(r=t.parent)==null?void 0:r.nodes;return s&&s.indexOf(e)===s.length-1}function zn(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/.test(e)||e.value&&/^@.+:.*$/.test(e.value):!1}function Yn(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function Vn(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function Gn(t){return t.type==="value-word"&&t.value==="in"}function Rt(t){return t.type==="value-operator"&&t.value==="*"}function Ze(t){return t.type==="value-operator"&&t.value==="/"}function j(t){return t.type==="value-operator"&&t.value==="+"}function he(t){return t.type==="value-operator"&&t.value==="-"}function jl(t){return t.type==="value-operator"&&t.value==="%"}function It(t){return Rt(t)||Ze(t)||j(t)||he(t)||jl(t)}function Hn(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function Kn(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function et(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function jr(t){var e;return((e=t.raws)==null?void 0:e.params)&&/^\(\s*\)$/.test(t.raws.params)}function qt(t){return t.name.startsWith("prettier-placeholder")}function Qn(t){return t.prop.startsWith("@prettier-placeholder")}function jn(t,e){return t.value==="$$"&&t.type==="value-func"&&(e==null?void 0:e.type)==="value-word"&&!e.raws.before}function Jn(t){var e,s;return((e=t.value)==null?void 0:e.type)==="value-root"&&((s=t.value.group)==null?void 0:s.type)==="value-value"&&t.prop.toLowerCase()==="composes"}function Xn(t){var e,s,r;return((r=(s=(e=t.value)==null?void 0:e.group)==null?void 0:s.group)==null?void 0:r.type)==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function de(t){var e;return((e=t.raws)==null?void 0:e.before)===""}function Lt(t){var e,s;return t.type==="value-comma_group"&&((s=(e=t.groups)==null?void 0:e[1])==null?void 0:s.type)==="value-colon"}function Qr(t){var e;return t.type==="value-paren_group"&&((e=t.groups)==null?void 0:e[0])&&Lt(t.groups[0])}function Jr(t,e){var i;if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0)return!1;let r=t.grandparent;if(!Qr(s)&&!(r&&Qr(r)))return!1;let n=t.findAncestor(o=>o.type==="css-decl");return!!((i=n==null?void 0:n.prop)!=null&&i.startsWith("$")||Qr(r)||r.type==="value-func")}function Xr(t){return t.type==="value-comment"&&t.inline}function Dt(t){return t.type==="value-word"&&t.value==="#"}function Zr(t){return t.type==="value-word"&&t.value==="{"}function Mt(t){return t.type==="value-word"&&t.value==="}"}function tt(t){return["value-word","value-atword"].includes(t.type)}function Bt(t){return(t==null?void 0:t.type)==="value-colon"}function Zn(t,e){if(!Lt(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:Bt(s[r+1])}function ei(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function ti(t){return t.type!=="value-func"?!1:Kl.has(t.value.toLowerCase())}function Ce(t){return/\/\//.test(t.split(/[\n\r]/).pop())}function rt(t){return(t==null?void 0:t.type)==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function ri(t,e){var s,r;if(((s=t.open)==null?void 0:s.value)!=="("||((r=t.close)==null?void 0:r.value)!==")"||t.groups.some(n=>n.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let n=e.groups.indexOf(t)-1,i=e.groups[n];if((i==null?void 0:i.type)==="value-word"&&i.value==="with")return!0}return!1}function st(t){var e,s;return t.type==="value-paren_group"&&((e=t.open)==null?void 0:e.value)==="("&&((s=t.close)==null?void 0:s.value)===")"}function Jl(t,e,s){var d;let{node:r}=t,n=t.parent,i=t.grandparent,o=Dn(t),a=o&&n.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),u=t.findAncestor(m=>m.type==="css-atrule"),c=u&&et(u,e),f=r.groups.some(m=>Xr(m)),p=t.map(s,"groups"),l=[],g=Se(t,"url"),x=!1,h=!1;for(let m=0;mve:A!==-1?x=!0:ve!==-1&&(x=!1)}if(x||Bt(w)||Bt(v)||w.type==="value-atword"&&(w.value===""||w.value.endsWith("["))||v.type==="value-word"&&v.value.startsWith("]")||w.value==="~"||w.type!=="value-string"&&w.value&&w.value.includes("\\")&&v&&v.type!=="value-comment"||_!=null&&_.value&&_.value.indexOf("\\")===_.value.length-1&&w.type==="value-operator"&&w.value==="/"||w.value==="\\"||jn(w,v)||Dt(w)||Zr(w)||Mt(v)||Zr(v)&&de(v)||Mt(w)&&de(v)||w.value==="--"&&Dt(v))continue;let F=It(w),K=It(v);if((F&&Dt(v)||K&&Mt(w))&&de(v)||!_&&Ze(w)||Se(t,"calc")&&(j(w)||j(v)||he(w)||he(v))&&de(v))continue;let $=(j(w)||he(w))&&m===0&&(v.type==="value-number"||v.isHex)&&i&&ti(i)&&!de(v),T=(R==null?void 0:R.type)==="value-func"||R&&tt(R)||w.type==="value-func"||tt(w),C=v.type==="value-func"||tt(v)||(_==null?void 0:_.type)==="value-func"||_&&tt(_);if(e.parser==="scss"&&F&&w.value==="-"&&v.type==="value-func"&&P(w)!==N(v)){l.push(" ");continue}if(!(!(Rt(v)||Rt(w))&&!Se(t,"calc")&&!$&&(Ze(v)&&!T||Ze(w)&&!C||j(v)&&!T||j(w)&&!C||he(v)||he(w))&&(de(v)||F&&(!_||_&&It(_))))&&!((e.parser==="scss"||e.parser==="less")&&F&&w.value==="-"&&st(v)&&P(w)===N(v.open)&&v.open.value==="(")){if(Xr(w)){if(n.type==="value-paren_group"){l.push(fe(k));continue}l.push(k);continue}if(c&&(Hn(v)||Kn(v)||Vn(v)||Gn(w)||Yn(w))){l.push(" ");continue}if(u&&u.name.toLowerCase()==="namespace"){l.push(" ");continue}if(a){w.source&&v.source&&w.source.start.line!==v.source.start.line?(l.push(k),h=!0):l.push(" ");continue}if(K){l.push(" ");continue}if((v==null?void 0:v.value)!=="..."&&!(rt(w)&&rt(v)&&P(w)===N(v))){if(rt(w)&&st(v)&&P(w)===N(v.open)){l.push(M);continue}if(w.value==="with"&&st(v)){l.push(" ");continue}(d=w.value)!=null&&d.endsWith("#")&&v.value==="{"&&st(v.group)||l.push(O)}}}return f&&l.push(Qe),h&&l.unshift(k),c?L(q(l)):Fn(t)?L(Ke(l)):L(q(Ke(l)))}var si=Jl;function Xl(t){return t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}var ni=Xl;var es=new Map([["em","em"],["rem","rem"],["ex","ex"],["rex","rex"],["cap","cap"],["rcap","rcap"],["ch","ch"],["rch","rch"],["ic","ic"],["ric","ric"],["lh","lh"],["rlh","rlh"],["vw","vw"],["svw","svw"],["lvw","lvw"],["dvw","dvw"],["vh","vh"],["svh","svh"],["lvh","lvh"],["dvh","dvh"],["vi","vi"],["svi","svi"],["lvi","lvi"],["dvi","dvi"],["vb","vb"],["svb","svb"],["lvb","lvb"],["dvb","dvb"],["vmin","vmin"],["svmin","svmin"],["lvmin","lvmin"],["dvmin","dvmin"],["vmax","vmax"],["svmax","svmax"],["lvmax","lvmax"],["dvmax","dvmax"],["cm","cm"],["mm","mm"],["q","Q"],["in","in"],["pt","pt"],["pc","pc"],["px","px"],["deg","deg"],["grad","grad"],["rad","rad"],["turn","turn"],["s","s"],["ms","ms"],["hz","Hz"],["khz","kHz"],["dpi","dpi"],["dpcm","dpcm"],["dppx","dppx"],["x","x"],["cqw","cqw"],["cqh","cqh"],["cqi","cqi"],["cqb","cqb"],["cqmin","cqmin"],["cqmax","cqmax"]]);function ii(t){let e=t.toLowerCase();return es.has(e)?es.get(e):t}var oi=/(["'])(?:(?!\1)[^\\]|\\.)*\1/gs,Zl=/(?:\d*\.\d+|\d+\.?)(?:e[+-]?\d+)?/gi,ec=/[a-z]+/gi,tc=/[$@]?[_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/gi,rc=new RegExp(oi.source+`|(${tc.source})?(${Zl.source})(${ec.source})?`,"gi");function W(t,e){return E(!1,t,oi,s=>Ct(s,e))}function ai(t,e){let s=e.singleQuote?"'":'"';return t.includes('"')||t.includes("'")?t:s+t+s}function me(t){return E(!1,t,rc,(e,s,r,n,i)=>!r&&n?ts(n)+se(i||""):e)}function ts(t){return ni(t).replace(/\.0(?=$|e)/,"")}function ui(t){return t.trailingComma==="es5"||t.trailingComma==="all"}function sc(t,e,s){let r=!!(s!=null&&s.backwards);if(e===!1)return!1;let n=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&n===` +`)return e-2;if(n===` +`||n==="\r"||n==="\u2028"||n==="\u2029")return e-1}else{if(n==="\r"&&t.charAt(e+1)===` +`)return e+2;if(n===` +`||n==="\r"||n==="\u2028"||n==="\u2029")return e+1}return e}var Ut=sc;function nc(t,e,s={}){let r=Ot(t,s.backwards?e-1:e,s),n=Ut(t,r,s);return r!==n}var Ft=nc;function ic(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;ss.type==="value-comment"))&&ui(e)&&t.callParent(()=>Jr(t,e))?St(","):""}function fi(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:g})=>typeof g=="string"?g:s(),"groups");if(n&&$n(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",V(",",i),r.close?s("close"):""];if(!r.open){let g=rs(t),x=V([",",g?k:O],i);return q(g?[k,x]:L(Ke(x)))}let o=t.map(({node:g,isLast:x,index:h})=>{var _;let d=i[h];if(Lt(g)&&g.type==="value-comma_group"&&g.groups&&g.groups[0].type!=="value-paren_group"&&((_=g.groups[2])==null?void 0:_.type)==="value-paren_group"){let w=nn(d.contents.contents);w[1]=L(w[1]),d=L(fe(d))}let m=[d,x?lc(t,e):","];if(!x&&g.type==="value-comma_group"&&te(g.groups)){let w=G(!1,g.groups,-1);!w.source&&w.close&&(w=w.close),w.source&&$t(e.originalText,P(w))&&m.push(k)}return m},"groups"),a=Zn(r,n),u=ri(r,n),c=Jr(t,e),f=u||c&&!a,p=u||a,l=L([r.open?s("open"):"",q([M,V(O,o)]),M,r.close?s("close"):""],{shouldBreak:f});return p?fe(l):l}function rs(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function cc(t,e,s){let r=[];return t.each(()=>{let{node:n,previous:i}=t;if((i==null?void 0:i.type)==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(N(n),P(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Ft(e.originalText,N(o),{backwards:!0})&&!Ee(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?O:k),$t(e.originalText,P(n))&&!Ee(n)&&r.push(k))},"nodes"),r}var Ae=cc;function fc(t,e,s){var n,i,o,a,u,c;let{node:r}=t;switch(r.type){case"front-matter":return[r.raw,k];case"css-root":{let f=Ae(t,e,s),p=r.raws.after.trim();return p.startsWith(";")&&(p=p.slice(1).trim()),[r.frontMatter?[s("frontMatter"),k]:"",f,p?` ${p}`:"",r.nodes.length>0?k:""]}case"css-comment":{let f=r.inline||r.raws.inline,p=e.originalText.slice(N(r),P(r));return f?p.trimEnd():p}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[((n=r.selector)==null?void 0:n.type)==="selector-unknown"&&Ce(r.selector.value)?O:r.selector?" ":"","{",r.nodes.length>0?q([k,Ae(t,e,s)]):"",k,"}",zn(r)?";":""]:";"];case"css-decl":{let f=t.parent,{between:p}=r.raws,l=p.trim(),g=l===":",x=typeof r.value=="string"&&/^ *$/.test(r.value),h=typeof r.value=="string"?r.value:s("value");return h=Jn(r)?on(h):h,!g&&Ce(l)&&!((o=(i=r.value)==null?void 0:i.group)!=null&&o.group&&t.call(()=>rs(t),"value","group","group"))&&(h=q([k,fe(h)])),[E(!1,r.raws.before,/[\s;]/g,""),f.type==="css-atrule"&&f.variable||Un(t)?r.prop:se(r.prop),l.startsWith("//")?" ":"",l,r.extend||x?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",s("selector"),")"]:"",h,r.raws.important?r.raws.important.replace(/\s*!\s*important/i," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/i," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/i," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",q([M,Ae(t,e,s)]),M,"}"]:Qn(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&Pt(t,r)?St(";"):";"]}case"css-atrule":{let f=t.parent,p=qt(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",p?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),p?"":";"];if(r.variable)return["@",r.name,": ",r.value?s("value"):"",r.raws.between.trim()?r.raws.between.trim()+" ":"",r.nodes?["{",q([r.nodes.length>0?M:"",Ae(t,e,s)]),M,"}"]:"",p?"":";"]}let l=r.name==="import"&&((a=r.params)==null?void 0:a.type)==="value-unknown"&&r.params.value.endsWith(";");return["@",jr(r)||r.name.endsWith(":")||qt(r)?r.name:se(r.name),r.params?[jr(r)?"":qt(r)?r.raws.afterName===""?"":r.name.endsWith(":")?" ":/^\s*\n\s*\n/.test(r.raws.afterName)?[k,k]:/^\s*\n/.test(r.raws.afterName)?k:" ":" ",typeof r.params=="string"?r.params:s("params")]:"",r.selector?q([" ",s("selector")]):"",r.value?L([" ",s("value"),et(r,e)?Xn(r)?" ":O:""]):r.name==="else"?" ":"",r.nodes?[et(r,e)?"":r.selector&&!r.selector.nodes&&typeof r.selector.value=="string"&&Ce(r.selector.value)||!r.selector&&typeof r.params=="string"&&Ce(r.params)?O:" ","{",q([r.nodes.length>0?M:"",Ae(t,e,s)]),M,"}"]:p||l?"":";"]}case"media-query-list":{let f=[];return t.each(({node:p})=>{p.type==="media-query"&&p.value===""||f.push(s())},"nodes"),L(q(V(O,f)))}case"media-query":return[V(" ",t.map(s,"nodes")),Pt(t,r)?"":","];case"media-type":return me(W(r.value,e));case"media-feature-expression":return r.nodes?["(",...t.map(s,"nodes"),")"]:r.value;case"media-feature":return se(W(E(!1,r.value,/ +/g," "),e));case"media-colon":return[r.value," "];case"media-value":return me(W(r.value,e));case"media-keyword":return W(r.value,e);case"media-url":return W(E(!1,E(!1,r.value,/^url\(\s+/gi,"url("),/\s+\)$/g,")"),e);case"media-unknown":return r.value;case"selector-root":return L([Te(t,"custom-selector")?[t.findAncestor(f=>f.type==="css-atrule").customSelector,O]:"",V([",",Te(t,["extend","custom-selector","nest"])?O:k],t.map(s,"nodes"))]);case"selector-selector":return L(q(t.map(s,"nodes")));case"selector-comment":return r.value;case"selector-string":return W(r.value,e);case"selector-tag":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",((u=t.previous)==null?void 0:u.type)==="selector-nesting"?r.value:me(Bn(t,r.value)?r.value.toLowerCase():r.value)];case"selector-id":return["#",r.value];case"selector-class":return[".",me(W(r.value,e))];case"selector-attribute":return["[",r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.attribute.trim(),r.operator??"",r.value?ai(W(r.value.trim(),e),e):"",r.insensitive?" i":"","]"];case"selector-combinator":{if(r.value==="+"||r.value===">"||r.value==="~"||r.value===">>>"){let l=t.parent;return[l.type==="selector-selector"&&l.nodes[0]===r?"":O,r.value,Pt(t,r)?"":" "]}let f=r.value.trim().startsWith("(")?O:"",p=me(W(r.value.trim(),e))||O;return[f,p]}case"selector-universal":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.value];case"selector-pseudo":return[se(r.value),te(r.nodes)?L(["(",q([M,V([",",O],t.map(s,"nodes"))]),M,")"]):""];case"selector-nesting":return r.value;case"selector-unknown":{let f=t.findAncestor(g=>g.type==="css-rule");if(f!=null&&f.isSCSSNesterProperty)return me(W(se(r.value),e));let p=t.parent;if((c=p.raws)!=null&&c.selector){let g=N(p),x=g+p.raws.selector.length;return e.originalText.slice(g,x).trim()}let l=t.grandparent;if(p.type==="value-paren_group"&&(l==null?void 0:l.type)==="value-func"&&l.value==="selector"){let g=P(p.open)+1,x=N(p.close),h=e.originalText.slice(g,x).trim();return Ce(h)?[Qe,h]:h}return r.value}case"value-value":case"value-root":return s("group");case"value-comment":return e.originalText.slice(N(r),P(r));case"value-comma_group":return si(t,e,s);case"value-paren_group":return fi(t,e,s);case"value-func":return[r.value,Te(t,"supports")&&ei(r)?" ":"",s("group")];case"value-paren":return r.value;case"value-number":return[ts(r.value),ii(r.unit)];case"value-operator":return r.value;case"value-word":return r.isColor&&r.isHex||Mn(r.value)?r.value.toLowerCase():r.value;case"value-colon":{let{previous:f}=t;return[r.value,typeof(f==null?void 0:f.value)=="string"&&f.value.endsWith("\\")||Se(t,"url")?"":O]}case"value-string":return Ct(r.raws.quote+r.value+r.raws.quote,e);case"value-atword":return["@",r.value];case"value-unicode-range":return r.value;case"value-unknown":return r.value;case"value-comma":default:throw new cn(r,"PostCSS")}}var pc={print:fc,embed:mn,insertPragma:Ln,massageAstNode:pn,getVisitorKeys:wn},pi=pc;var hi=[{linguistLanguageId:50,name:"CSS",type:"markup",tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",color:"#563d7c",extensions:[".css",".wxss"],parsers:["css"],vscodeLanguageIds:["css"]},{linguistLanguageId:262764437,name:"PostCSS",type:"markup",color:"#dc3a0c",tmScope:"source.postcss",group:"CSS",extensions:[".pcss",".postcss"],aceMode:"text",parsers:["css"],vscodeLanguageIds:["postcss"]},{linguistLanguageId:198,name:"Less",type:"markup",color:"#1d365d",aliases:["less-css"],extensions:[".less"],tmScope:"source.css.less",aceMode:"less",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"]},{linguistLanguageId:329,name:"SCSS",type:"markup",color:"#c6538c",tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",extensions:[".scss"],parsers:["scss"],vscodeLanguageIds:["scss"]}];var di={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var hc={singleQuote:di.singleQuote},mi=hc;var Js={};Zs(Js,{css:()=>Ty,less:()=>Cy,scss:()=>Ay});var tl=ue(ht(),1),rl=ue(bo(),1),sl=ue(ra(),1);function Zf(t,e){let s=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(s,e)}var sa=Zf;var ca=ue(la(),1);function J(t,e,s){if(t&&typeof t=="object"){delete t.parent;for(let r in t)J(t[r],e,s),r==="type"&&typeof t[r]=="string"&&!t[r].startsWith(e)&&(!s||!s.test(t[r]))&&(t[r]=e+t[r])}return t}function Ls(t){if(t&&typeof t=="object"){delete t.parent;for(let e in t)Ls(t[e]);!Array.isArray(t)&&t.value&&!t.type&&(t.type="unknown")}return t}var fp=ca.default.default;function pp(t){let e;try{e=fp(t)}catch{return{type:"selector-unknown",value:t}}return J(Ls(e),"media-")}var fa=pp;var iu=ue(nu(),1);function Tm(t){if(/\/\/|\/\*/.test(t))return{type:"selector-unknown",value:t.trim()};let e;try{new iu.default(s=>{e=s}).process(t)}catch{return{type:"selector-unknown",value:t}}return J(e,"selector-")}var Z=Tm;var Ju=ue(Gu(),1);var dy=t=>{for(;t.parent;)t=t.parent;return t},Fr=dy;function my(t){return Fr(t).text.slice(t.group.open.sourceIndex+1,t.group.close.sourceIndex).trim()}var Hu=my;function yy(t){if(te(t)){for(let e=t.length-1;e>0;e--)if(t[e].type==="word"&&t[e].value==="{"&&t[e-1].type==="word"&&t[e-1].value.endsWith("#"))return!0}return!1}var Ku=yy;function gy(t){return t.some(e=>e.type==="string"||e.type==="func"&&!e.value.endsWith("\\"))}var Qu=gy;function wy(t,e){return!!(e.parser==="scss"&&(t==null?void 0:t.type)==="word"&&t.value.startsWith("$"))}var ju=wy;function vy(t,e){var u;let{nodes:s}=t,r={open:null,close:null,groups:[],type:"paren_group"},n=[r],i=r,o={groups:[],type:"comma_group"},a=[o];for(let c=0;c0&&r.groups.push(o),r.close=f,a.length===1)throw new Error("Unbalanced parenthesis");a.pop(),o=G(!1,a,-1),o.groups.push(r),n.pop(),r=G(!1,n,-1)}else f.type==="comma"?(r.groups.push(o),o={groups:[],type:"comma_group"},a[a.length-1]=o):o.groups.push(f)}return o.groups.length>0&&r.groups.push(o),i}function $r(t){return t.type==="paren_group"&&!t.open&&!t.close&&t.groups.length===1||t.type==="comma_group"&&t.groups.length===1?$r(t.groups[0]):t.type==="paren_group"||t.type==="comma_group"?{...t,groups:t.groups.map($r)}:t}function Xu(t,e){if(t&&typeof t=="object")for(let s in t)s!=="parent"&&(Xu(t[s],e),s==="nodes"&&(t.group=$r(vy(t,e)),delete t[s]));return t}function xy(t,e){if(e.parser==="less"&&t.startsWith("~`"))return{type:"value-unknown",value:t};let s=null;try{s=new Ju.default(t,{loose:!0}).parse()}catch{return{type:"value-unknown",value:t}}s.text=t;let r=Xu(s,e);return J(r,"value-",/^selector-/)}var ae=xy;var _y=new Set(["import","use","forward"]);function by(t){return _y.has(t)}var Zu=by;function ky(t,e){return e.parser!=="scss"||!t.selector?!1:t.selector.replace(/\/\*.*?\*\//,"").replace(/\/\/.*\n/,"").trim().endsWith(":")}var el=ky;var Ey=/(\s*)(!default).*$/,Sy=/(\s*)(!global).*$/;function nl(t,e){var s,r;if(t&&typeof t=="object"){delete t.parent;for(let a in t)nl(t[a],e);if(!t.type)return t;if(t.raws??(t.raws={}),t.type==="css-decl"&&typeof t.prop=="string"&&t.prop.startsWith("--")&&typeof t.value=="string"&&t.value.startsWith("{")){let a;if(t.value.trimEnd().endsWith("}")){let u=e.originalText.slice(0,t.source.start.offset),c="a".repeat(t.prop.length)+e.originalText.slice(t.source.start.offset+t.prop.length,t.source.end.offset),f=E(!1,u,/[^\n]/g," ")+c,p;e.parser==="scss"?p=al:e.parser==="less"?p=ol:p=il;let l;try{l=p(f,{...e})}catch{}((s=l==null?void 0:l.nodes)==null?void 0:s.length)===1&&l.nodes[0].type==="css-rule"&&(a=l.nodes[0].nodes)}return a?t.value={type:"css-rule",nodes:a}:t.value={type:"value-unknown",value:t.raws.value.raw},t}let n="";typeof t.selector=="string"&&(n=t.raws.selector?t.raws.selector.scss??t.raws.selector.raw:t.selector,t.raws.between&&t.raws.between.trim().length>0&&(n+=t.raws.between),t.raws.selector=n);let i="";typeof t.value=="string"&&(i=t.raws.value?t.raws.value.scss??t.raws.value.raw:t.value,i=i.trim(),t.raws.value=i);let o="";if(typeof t.params=="string"&&(o=t.raws.params?t.raws.params.scss??t.raws.params.raw:t.params,t.raws.afterName&&t.raws.afterName.trim().length>0&&(o=t.raws.afterName+o),t.raws.between&&t.raws.between.trim().length>0&&(o=o+t.raws.between),o=o.trim(),t.raws.params=o),n.trim().length>0)return n.startsWith("@")&&n.endsWith(":")?t:t.mixin?(t.selector=ae(n,e),t):(el(t,e)&&(t.isSCSSNesterProperty=!0),t.selector=Z(n),t);if(i.length>0){let a=i.match(Ey);a&&(i=i.slice(0,a.index),t.scssDefault=!0,a[0].trim()!=="!default"&&(t.raws.scssDefault=a[0]));let u=i.match(Sy);if(u&&(i=i.slice(0,u.index),t.scssGlobal=!0,u[0].trim()!=="!global"&&(t.raws.scssGlobal=u[0])),i.startsWith("progid:"))return{type:"value-unknown",value:i};t.value=ae(i,e)}if(e.parser==="less"&&t.type==="css-decl"&&i.startsWith("extend(")&&(t.extend||(t.extend=t.raws.between===":"),t.extend&&!t.selector&&(delete t.value,t.selector=Z(i.slice(7,-1)))),t.type==="css-atrule"){if(e.parser==="less"){if(t.mixin){let a=t.raws.identifier+t.name+t.raws.afterName+t.raws.params;return t.selector=Z(a),delete t.params,t}if(t.function)return t}if(e.parser==="css"&&t.name==="custom-selector"){let a=t.params.match(/:--\S+\s+/)[0].trim();return t.customSelector=a,t.selector=Z(t.params.slice(a.length).trim()),delete t.params,t}if(e.parser==="less"){if(t.name.includes(":")&&!t.params){t.variable=!0;let a=t.name.split(":");t.name=a[0],t.value=ae(a.slice(1).join(":"),e)}if(!["page","nest","keyframes"].includes(t.name)&&((r=t.params)==null?void 0:r[0])===":"){t.variable=!0;let a=t.params.slice(1);a&&(t.value=ae(a,e)),t.raws.afterName+=":"}if(t.variable)return delete t.params,t.value||delete t.value,t}}if(t.type==="css-atrule"&&o.length>0){let{name:a}=t,u=t.name.toLowerCase();return a==="warn"||a==="error"?(t.params={type:"media-unknown",value:o},t):a==="extend"||a==="nest"?(t.selector=Z(o),delete t.params,t):a==="at-root"?(/^\(\s*(?:without|with)\s*:.+\)$/s.test(o)?t.params=ae(o,e):(t.selector=Z(o),delete t.params),t):Zu(u)?(t.import=!0,delete t.filename,t.params=ae(o,e),t):["namespace","supports","if","else","for","each","while","debug","mixin","include","function","return","define-mixin","add-mixin"].includes(a)?(o=o.replace(/(\$\S+?)(\s+)?\.{3}/,"$1...$2"),o=o.replace(/^(?!if)(\S+)(\s+)\(/,"$1($2"),t.value=ae(o,e),delete t.params,t):["media","custom-media"].includes(u)?o.includes("#{")?{type:"media-unknown",value:o}:(t.params=fa(o),t):(t.params=o,t)}}return t}function Qs(t,e,s){let r=Xe(e),{frontMatter:n}=r;e=r.content;let i;try{i=t(e,{map:!1})}catch(o){let{name:a,reason:u,line:c,column:f}=o;throw typeof c!="number"?o:sa(`${a}: ${u}`,{loc:{start:{line:c,column:f}},cause:o})}return s.originalText=e,i=nl(J(i,"css-"),s),Kr(i,e),n&&(n.source={startOffset:0,endOffset:n.raw.length},i.frontMatter=n),i}function il(t,e={}){return Qs(tl.default.default,t,e)}function ol(t,e={}){return Qs(s=>rl.default.parse(bn(s)),t,e)}function al(t,e={}){return Qs(sl.default,t,e)}var js={astFormat:"postcss",hasPragma:qn,locStart:N,locEnd:P},Ty={...js,parse:il},Cy={...js,parse:ol},Ay={...js,parse:al};var Oy={postcss:pi};return hl(Ny);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/postcss.mjs b/node_modules/prettier/plugins/postcss.mjs index 5a54d60..e60770e 100644 --- a/node_modules/prettier/plugins/postcss.mjs +++ b/node_modules/prettier/plugins/postcss.mjs @@ -1,52 +1,49 @@ -var Vl=Object.create;var en=Object.defineProperty;var Yl=Object.getOwnPropertyDescriptor;var Gl=Object.getOwnPropertyNames;var Kl=Object.getPrototypeOf,Hl=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Os=(t,e)=>{for(var n in e)en(t,n,{get:e[n],enumerable:!0})},Ql=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Gl(e))!Hl.call(t,s)&&s!==n&&en(t,s,{get:()=>e[s],enumerable:!(r=Yl(e,s))||r.enumerable});return t};var ue=(t,e,n)=>(n=t!=null?Vl(Kl(t)):{},Ql(e||!t||!t.__esModule?en(n,"default",{value:t,enumerable:!0}):n,t));var Qs=y(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.extract=gc;pe.parse=vc;pe.parseWithComments=Hs;pe.print=xc;pe.strip=wc;var pc=/\*\/$/,hc=/^\/\*\*?/,Gs=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,dc=/(^|\s+)\/\/([^\r\n]*)/g,zs=/^(\r?\n)+/,mc=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,Vs=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,yc=/(\r?\n|^) *\* ?/g,Ks=[];function gc(t){let e=t.match(Gs);return e?e[0].trimLeft():""}function wc(t){let e=t.match(Gs);return e&&e[0]?t.substring(e[0].length):t}function vc(t){return Hs(t).pragmas}function Hs(t){let e=` -`;t=t.replace(hc,"").replace(pc,"").replace(yc,"$1");let n="";for(;n!==t;)n=t,t=t.replace(mc,`${e}$1 $2${e}`);t=t.replace(zs,"").trimRight();let r=Object.create(null),s=t.replace(Vs,"").replace(zs,"").trimRight(),i;for(;i=Vs.exec(t);){let o=i[2].replace(dc,"");typeof r[i[1]]=="string"||Array.isArray(r[i[1]])?r[i[1]]=Ks.concat(r[i[1]],o):r[i[1]]=o}return{comments:s,pragmas:r}}function xc({comments:t="",pragmas:e={}}){let n=` -`,r="/**",s=" *",i=" */",o=Object.keys(e),a=o.flatMap(c=>Ys(c,e[c])).map(c=>`${s} ${c}${n}`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`${r} ${Ys(o[0],c)[0]}${i}`}}let u=t.split(n).map(c=>`${s} ${c}`).join(n)+n;return r+n+(t?u:"")+(t&&o.length?s+n:"")+a+i}function Ys(t,e){return Ks.concat(e).map(n=>`@${t} ${n}`.trim())}});var Vt=y((dx,gn)=>{"use strict";gn.exports.isClean=Symbol("isClean");gn.exports.my=Symbol("my")});var Ui=y((mx,wn)=>{var E=String,$i=function(){return{isColorSupported:!1,reset:E,bold:E,dim:E,italic:E,underline:E,inverse:E,hidden:E,strikethrough:E,black:E,red:E,green:E,yellow:E,blue:E,magenta:E,cyan:E,white:E,gray:E,bgBlack:E,bgRed:E,bgGreen:E,bgYellow:E,bgBlue:E,bgMagenta:E,bgCyan:E,bgWhite:E}};wn.exports=$i();wn.exports.createColors=$i});var vn=y(()=>{});var Yt=y((wx,Vi)=>{"use strict";var Wi=Ui(),zi=vn(),st=class t extends Error{constructor(e,n,r,s,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),typeof n<"u"&&typeof r<"u"&&(typeof n=="number"?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let n=this.source;e==null&&(e=Wi.isColorSupported),zi&&e&&(n=zi(n));let r=n.split(/\r?\n/),s=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),o=String(i).length,a,u;if(e){let{bold:c,gray:f,red:p}=Wi.createColors(!0);a=l=>c(p(l)),u=l=>f(l)}else a=u=c=>c;return r.slice(s,i).map((c,f)=>{let p=s+1+f,l=" "+(" "+p).slice(-o)+" | ";if(p===this.line){let g=u(l.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+u(l)+c+` +var ul=Object.create;var $r=Object.defineProperty;var ll=Object.getOwnPropertyDescriptor;var cl=Object.getOwnPropertyNames;var fl=Object.getPrototypeOf,pl=Object.prototype.hasOwnProperty;var y=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),en=(t,e)=>{for(var s in e)$r(t,s,{get:e[s],enumerable:!0})},hl=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of cl(e))!pl.call(t,n)&&n!==s&&$r(t,n,{get:()=>e[n],enumerable:!(r=ll(e,n))||r.enumerable});return t};var ue=(t,e,s)=>(s=t!=null?ul(fl(t)):{},hl(e||!t||!t.__esModule?$r(s,"default",{value:t,enumerable:!0}):s,t));var On=y(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.extract=$l;pe.parse=zl;pe.parseWithComments=An;pe.print=Yl;pe.strip=Wl;var Dl=/\*\/$/,Ml=/^\/\*\*?/,Tn=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Bl=/(^|\s+)\/\/([^\r\n]*)/g,kn=/^(\r?\n)+/,Ul=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,En=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,Fl=/(\r?\n|^) *\* ?/g,Cn=[];function $l(t){let e=t.match(Tn);return e?e[0].trimLeft():""}function Wl(t){let e=t.match(Tn);return e&&e[0]?t.substring(e[0].length):t}function zl(t){return An(t).pragmas}function An(t){let e=` +`;t=t.replace(Ml,"").replace(Dl,"").replace(Fl,"$1");let s="";for(;s!==t;)s=t,t=t.replace(Ul,`${e}$1 $2${e}`);t=t.replace(kn,"").trimRight();let r=Object.create(null),n=t.replace(En,"").replace(kn,"").trimRight(),i;for(;i=En.exec(t);){let o=i[2].replace(Bl,"");typeof r[i[1]]=="string"||Array.isArray(r[i[1]])?r[i[1]]=Cn.concat(r[i[1]],o):r[i[1]]=o}return{comments:n,pragmas:r}}function Yl({comments:t="",pragmas:e={}}){let s=` +`,r="/**",n=" *",i=" */",o=Object.keys(e),a=o.flatMap(c=>Sn(c,e[c])).map(c=>`${n} ${c}${s}`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`${r} ${Sn(o[0],c)[0]}${i}`}}let u=t.split(s).map(c=>`${n} ${c}`).join(s)+s;return r+s+(t?u:"")+(t&&o.length?n+s:"")+a+i}function Sn(t,e){return Cn.concat(e).map(s=>`@${t} ${s}`.trim())}});var $t=y((iv,ss)=>{"use strict";ss.exports.isClean=Symbol("isClean");ss.exports.my=Symbol("my")});var gi=y((ov,ns)=>{var S=String,yi=function(){return{isColorSupported:!1,reset:S,bold:S,dim:S,italic:S,underline:S,inverse:S,hidden:S,strikethrough:S,black:S,red:S,green:S,yellow:S,blue:S,magenta:S,cyan:S,white:S,gray:S,bgBlack:S,bgRed:S,bgGreen:S,bgYellow:S,bgBlue:S,bgMagenta:S,bgCyan:S,bgWhite:S}};ns.exports=yi();ns.exports.createColors=yi});var is=y(()=>{});var Wt=y((lv,xi)=>{"use strict";var wi=gi(),vi=is(),nt=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=wi.isColorSupported),vi&&e&&(s=vi(s));let r=s.split(/\r?\n/),n=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),o=String(i).length,a,u;if(e){let{bold:c,gray:f,red:p}=wi.createColors(!0);a=l=>c(p(l)),u=l=>f(l)}else a=u=c=>c;return r.slice(n,i).map((c,f)=>{let p=n+1+f,l=" "+(" "+p).slice(-o)+" | ";if(p===this.line){let g=u(l.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+u(l)+c+` `+g+a("^")}return" "+u(l)+c}).join(` `)}toString(){let e=this.showSourceCode();return e&&(e=` `+e+` -`),this.name+": "+this.message+e}};Vi.exports=st;st.default=st});var Gt=y((vx,Gi)=>{"use strict";var Yi={after:` +`),this.name+": "+this.message+e}};xi.exports=nt;nt.default=nt});var zt=y((cv,bi)=>{"use strict";var _i={after:` `,beforeClose:` `,beforeComment:` `,beforeDecl:` `,beforeOpen:" ",beforeRule:` -`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Qc(t){return t[0].toUpperCase()+t.slice(1)}var it=class{constructor(e){this.builder=e}atrule(e,n){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let i=(e.raws.between||"")+(n?";":"");this.builder(r+s+i,e)}}beforeAfter(e,n){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):n==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&s.type!=="root";)i+=1,s=s.parent;if(r.includes(` -`)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a0&&e.nodes[n].type==="comment";)n-=1;let r=this.raw(e,"semicolon");for(let s=0;s{if(s=u.raws[n],typeof s<"u")return!1})}return typeof s>"u"&&(s=Yi[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return n=r.raws.after,n.includes(` -`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawBeforeComment(e,n){let r;return e.walkComments(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(` -`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,n){let r;return e.walkDecls(s=>{if(typeof s.raws.before<"u")return r=s.raws.before,r.includes(` -`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(n,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let n;return e.walk(r=>{if(r.type!=="decl"&&(n=r.raws.between,typeof n<"u"))return!1}),n}rawBeforeRule(e){let n;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return n=r.raws.before,n.includes(` -`)&&(n=n.replace(/[^\n]+$/,"")),!1}),n&&(n=n.replace(/\S/g,"")),n}rawColon(e){let n;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return n=r.raws.between.replace(/[^\s:]/g,""),!1}),n}rawEmptyBody(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(n=r.raws.after,typeof n<"u"))return!1}),n}rawIndent(e){if(e.raws.indent)return e.raws.indent;let n;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(` -`);return n=i[i.length-1],n=n.replace(/\S/g,""),!1}}),n}rawSemicolon(e){let n;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(n=r.raws.semicolon,typeof n<"u"))return!1}),n}rawValue(e,n){let r=e[n],s=e.raws[n];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,n){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,n)}};Gi.exports=it;it.default=it});var ot=y((xx,Ki)=>{"use strict";var jc=Gt();function xn(t,e){new jc(e).stringify(t)}Ki.exports=xn;xn.default=xn});var ut=y((bx,Hi)=>{"use strict";var{isClean:Kt,my:Jc}=Vt(),Xc=Yt(),Zc=Gt(),ef=ot();function bn(t,e){let n=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let s=t[r],i=typeof s;r==="parent"&&i==="object"?e&&(n[r]=e):r==="source"?n[r]=s:Array.isArray(s)?n[r]=s.map(o=>bn(o,n)):(i==="object"&&s!==null&&(s=bn(s)),n[r]=s)}return n}var at=class{constructor(e={}){this.raws={},this[Kt]=!1,this[Jc]=!0;for(let n in e)if(n==="nodes"){this.nodes=[];for(let r of e[n])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[n]=e[n]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let n=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let n in e)this[n]=e[n];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let n=bn(this);for(let r in e)n[r]=e[r];return n}cloneAfter(e={}){let n=this.clone(e);return this.parent.insertAfter(this,n),n}cloneBefore(e={}){let n=this.clone(e);return this.parent.insertBefore(this,n),n}error(e,n={}){if(this.source){let{end:r,start:s}=this.rangeBy(n);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},n)}return new Xc(e)}getProxyProcessor(){return{get(e,n){return n==="proxyOf"?e:n==="root"?()=>e.root().toProxy():e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Kt]){this[Kt]=!1;let e=this;for(;e=e.parent;)e[Kt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,n){let r=this.source.start;if(e.index)r=this.positionInside(e.index,n);else if(e.word){n=this.toString();let s=n.indexOf(e.word);s!==-1&&(r=this.positionInside(s,n))}return r}positionInside(e,n){let r=n||this.toString(),s=this.source.start.column,i=this.source.start.line;for(let o=0;otypeof u=="object"&&u.toJSON?u.toJSON(null,n):u);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,n);else if(o==="source"){let u=n.get(a.input);u==null&&(u=i,n.set(a.input,i),i++),r[o]={end:a.end,inputId:u,start:a.start}}else r[o]=a}return s&&(r.inputs=[...n.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ef){e.stringify&&(e=e.stringify);let n="";return e(this,r=>{n+=r}),n}warn(e,n,r){let s={node:this};for(let i in r)s[i]=r[i];return e.warn(n,s)}get proxyOf(){return this}};Hi.exports=at;at.default=at});var ct=y((kx,Qi)=>{"use strict";var tf=ut(),lt=class extends tf{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};Qi.exports=lt;lt.default=lt});var Ae=y((_x,ji)=>{"use strict";var rf=ut(),ft=class extends rf{constructor(e){super(e),this.type="comment"}};ji.exports=ft;ft.default=ft});var se=y((Tx,io)=>{"use strict";var{isClean:Ji,my:Xi}=Vt(),Zi=ct(),eo=Ae(),nf=ut(),to,kn,_n,ro;function no(t){return t.map(e=>(e.nodes&&(e.nodes=no(e.nodes)),delete e.source,e))}function so(t){if(t[Ji]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)so(e)}var z=class t extends nf{append(...e){for(let n of e){let r=this.normalize(n,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let n of this.nodes)n.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,s;for(;this.indexes[n]e[n](...r.map(s=>typeof s=="function"?(i,o)=>s(i.toProxy(),o):s)):n==="every"||n==="some"?r=>e[n]((s,...i)=>r(s.toProxy(),...i)):n==="root"?()=>e.root().toProxy():n==="nodes"?e.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?e[n].toProxy():e[n]:e[n]},set(e,n,r){return e[n]===r||(e[n]=r,(n==="name"||n==="params"||n==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,n){let r=this.index(e),s=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Zi(e)]}else if(e.selector)e=[new kn(e)];else if(e.name)e=[new _n(e)];else if(e.text)e=[new eo(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Xi]||t.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Ji]&&so(s),typeof s.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(s.raws.before=n.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let n of e){let r=this.normalize(n,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(e,n,r){return r||(r=n,n={}),this.walkDecls(s=>{n.props&&!n.props.includes(s.prop)||n.fast&&!s.value.includes(n.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((n,r)=>{let s;try{s=e(n,r)}catch(i){throw n.addToError(i)}return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkAtRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return n(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="atrule")return n(r,s)}))}walkComments(e){return this.walk((n,r)=>{if(n.type==="comment")return e(n,r)})}walkDecls(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return n(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="decl")return n(r,s)}))}walkRules(e,n){return n?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return n(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return n(r,s)}):(n=e,this.walk((r,s)=>{if(r.type==="rule")return n(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};z.registerParse=t=>{to=t};z.registerRule=t=>{kn=t};z.registerAtRule=t=>{_n=t};z.registerRoot=t=>{ro=t};io.exports=z;z.default=z;z.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,_n.prototype):t.type==="rule"?Object.setPrototypeOf(t,kn.prototype):t.type==="decl"?Object.setPrototypeOf(t,Zi.prototype):t.type==="comment"?Object.setPrototypeOf(t,eo.prototype):t.type==="root"&&Object.setPrototypeOf(t,ro.prototype),t[Xi]=!0,t.nodes&&t.nodes.forEach(e=>{z.rebuild(e)})}});var tr=y((Ex,lo)=>{"use strict";var Tn="'".charCodeAt(0),oo='"'.charCodeAt(0),Ht="\\".charCodeAt(0),ao="/".charCodeAt(0),Qt=` -`.charCodeAt(0),pt=" ".charCodeAt(0),jt="\f".charCodeAt(0),Jt=" ".charCodeAt(0),Xt="\r".charCodeAt(0),sf="[".charCodeAt(0),of="]".charCodeAt(0),af="(".charCodeAt(0),uf=")".charCodeAt(0),lf="{".charCodeAt(0),cf="}".charCodeAt(0),ff=";".charCodeAt(0),pf="*".charCodeAt(0),hf=":".charCodeAt(0),df="@".charCodeAt(0),Zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,er=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,mf=/.[\r\n"'(/\\]/,uo=/[\da-f]/i;lo.exports=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,i,o,a,u,c,f,p,l,g,x,h=r.length,d=0,m=[],b=[];function w(){return d}function v(U){throw e.error("Unclosed "+U,d)}function R(){return b.length===0&&d>=h}function $(U){if(b.length)return b.pop();if(d>=h)return;let S=U?U.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case Qt:case pt:case Jt:case Xt:case jt:{o=d;do o+=1,i=r.charCodeAt(o);while(i===pt||i===Qt||i===Jt||i===Xt||i===jt);x=["space",r.slice(d,o)],d=o-1;break}case sf:case of:case lf:case cf:case hf:case ff:case uf:{let C=String.fromCharCode(i);x=[C,C,d];break}case af:{if(l=m.length?m.pop()[1]:"",g=r.charCodeAt(d+1),l==="url"&&g!==Tn&&g!==oo&&g!==pt&&g!==Qt&&g!==Jt&&g!==jt&&g!==Xt){o=d;do{if(f=!1,o=r.indexOf(")",o+1),o===-1)if(s||S){o=d;break}else v("bracket");for(p=o;r.charCodeAt(p-1)===Ht;)p-=1,f=!f}while(f);x=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),u=r.slice(d,o+1),o===-1||mf.test(u)?x=["(","(",d]:(x=["brackets",u,d,o],d=o);break}case Tn:case oo:{a=i===Tn?"'":'"',o=d;do{if(f=!1,o=r.indexOf(a,o+1),o===-1)if(s||S){o=d+1;break}else v("string");for(p=o;r.charCodeAt(p-1)===Ht;)p-=1,f=!f}while(f);x=["string",r.slice(d,o+1),d,o],d=o;break}case df:{Zt.lastIndex=d+1,Zt.test(r),Zt.lastIndex===0?o=r.length-1:o=Zt.lastIndex-2,x=["at-word",r.slice(d,o+1),d,o],d=o;break}case Ht:{for(o=d,c=!0;r.charCodeAt(o+1)===Ht;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==ao&&i!==pt&&i!==Qt&&i!==Jt&&i!==Xt&&i!==jt&&(o+=1,uo.test(r.charAt(o)))){for(;uo.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===pt&&(o+=1)}x=["word",r.slice(d,o+1),d,o],d=o;break}default:{i===ao&&r.charCodeAt(d+1)===pf?(o=r.indexOf("*/",d+2)+1,o===0&&(s||S?o=r.length:v("comment")),x=["comment",r.slice(d,o+1),d,o],d=o):(er.lastIndex=d+1,er.test(r),er.lastIndex===0?o=r.length-1:o=er.lastIndex-2,x=["word",r.slice(d,o+1),d,o],m.push(x),d=o);break}}return d++,x}function H(U){b.push(U)}return{back:H,endOfFile:R,nextToken:$,position:w}}});var rr=y((Sx,fo)=>{"use strict";var co=se(),Ne=class extends co{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};fo.exports=Ne;Ne.default=Ne;co.registerAtRule(Ne)});var Pe=y((Cx,yo)=>{"use strict";var po=se(),ho,mo,ie=class extends po{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,n,r){let s=super.normalize(e);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let i of s)i.raws.before=n.raws.before}return s}removeChild(e,n){let r=this.index(e);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ho(new mo,this,e).stringify()}};ie.registerLazyResult=t=>{ho=t};ie.registerProcessor=t=>{mo=t};yo.exports=ie;ie.default=ie;po.registerRoot(ie)});var En=y((Ox,go)=>{"use strict";var ht={comma(t){return ht.split(t,[","],!0)},space(t){let e=[" ",` -`," "];return ht.split(t,e)},split(t,e,n){let r=[],s="",i=!1,o=0,a=!1,u="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:a?f===u&&(a=!1):f==='"'||f==="'"?(a=!0,u=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(s!==""&&r.push(s.trim()),s="",i=!1):s+=f;return(n||s!=="")&&r.push(s.trim()),r}};go.exports=ht;ht.default=ht});var nr=y((Ax,vo)=>{"use strict";var wo=se(),yf=En(),Re=class extends wo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return yf.comma(this.selector)}set selectors(e){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};vo.exports=Re;Re.default=Re;wo.registerRule(Re)});var sr=y((Nx,ko)=>{"use strict";var gf=ct(),wf=tr(),vf=Ae(),xf=rr(),bf=Pe(),xo=nr(),bo={empty:!0,space:!0};function kf(t){for(let e=t.length-1;e>=0;e--){let n=t[e],r=n[3]||n[2];if(r)return r}}var Sn=class{constructor(e){this.input=e,this.root=new bf,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let n=new xf;n.name=e[1].slice(1),n.name===""&&this.unnamedAtrule(n,e),this.init(n,e[2]);let r,s,i,o=!1,a=!1,u=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(u.length>0){for(i=u.length-1,s=u[i];s&&s[0]==="space";)s=u[--i];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}else u.push(e);else u.push(e);if(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=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),a&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let n=this.colon(e);if(n===!1)return;let r=0,s;for(let i=n-1;i>=0&&(s=e[i],!(s[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let n=0,r,s,i;for(let[o,a]of e.entries()){if(r=a,s=r[0],s==="("&&(n+=1),s===")"&&(n-=1),n===0&&s===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return o}i=r}return!1}comment(e){let n=new vf;this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=s[2],n.raws.left=s[1],n.raws.right=s[3]}}createTokenizer(){this.tokenizer=wf(this.input)}decl(e,n){let r=new gf;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||kf(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=!0;let f=this.stringFrom(e,c);f=this.spacesFromEnd(e)+f,f!==" !important"&&(r.raws.important=f);break}else if(i[1].toLowerCase()==="important"){let f=e.slice(0),p="";for(let l=c;l>0;l--){let g=f[l][0];if(p.trim().indexOf("!")===0&&g!=="space")break;p=f.pop()[1]+p}p.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=p,e=f)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let n=new xo;this.init(n,e[2]),n.selector="",n.raws.between="",this.current=n}end(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=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){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,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let n=this.input.fromOffset(e);return{column:n.col,line:n.line,offset:e}}init(e,n){this.current.push(e),e.source={input:this.input,start:this.getPosition(n)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let n=!1,r=null,s=!1,i=null,o=[],a=e[1].startsWith("--"),u=[],c=e;for(;c;){if(r=c[0],u.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(a&&s&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(u,a);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),o.length>0&&this.unclosedBracket(i),n&&s){if(!a)for(;u.length&&(c=u[u.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,a)}else this.unknownWord(u)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[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);break}this.endFile()}precheckMissedSemicolon(){}raw(e,n,r,s){let i,o,a=r.length,u="",c=!0,f,p;for(let l=0;lg+x[1],"");e.raws[n]={raw:l,value:u}}e[n]=u}rule(e){e.pop();let n=new xo;this.init(n,e[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(n,"selector",e),this.current=n}spacesAndCommentsFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],!(n!=="space"&&n!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let n,r="";for(;e.length&&(n=e[0][0],!(n!=="space"&&n!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let n,r="";for(;e.length&&(n=e[e.length-1][0],n==="space");)r=e.pop()[1]+r;return r}stringFrom(e,n){let r="";for(let s=n;s{});var Eo=y((Ix,To)=>{var _f="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Tf=(t,e=21)=>(n=e)=>{let r="",s=n;for(;s--;)r+=t[Math.random()*t.length|0];return r},Ef=(t=21)=>{let e="",n=t;for(;n--;)e+=_f[Math.random()*64|0];return e};To.exports={nanoid:Ef,customAlphabet:Tf}});var Cn=y((qx,So)=>{So.exports=class{}});var qe=y((Lx,No)=>{"use strict";var{SourceMapConsumer:Sf,SourceMapGenerator:Cf}=_o(),{fileURLToPath:Co,pathToFileURL:ir}={},{isAbsolute:Nn,resolve:Pn}={},{nanoid:Of}=Eo(),On=vn(),Oo=Yt(),Af=Cn(),An=Symbol("fromOffsetCache"),Nf=!!(Sf&&Cf),Ao=!!(Pn&&Nn),Ie=class{constructor(e,n={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,n.from&&(!Ao||/^\w+:\/\//.test(n.from)||Nn(n.from)?this.file=n.from:this.file=Pn(n.from)),Ao&&Nf){let r=new Af(this.css,n);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,n,r,s={}){let i,o,a;if(n&&typeof n=="object"){let c=n,f=r;if(typeof c.offset=="number"){let p=this.fromOffset(c.offset);n=p.line,r=p.col}else n=c.line,r=c.column;if(typeof f.offset=="number"){let p=this.fromOffset(f.offset);o=p.line,a=p.col}else o=f.line,a=f.column}else if(!r){let c=this.fromOffset(n);n=c.line,r=c.col}let u=this.origin(n,r,o,a);return u?i=new Oo(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,s.plugin):i=new Oo(e,o===void 0?n:{column:r,line:n},o===void 0?r:{column:a,line:o},this.css,this.file,s.plugin),i.input={column:r,endColumn:a,endLine:o,line:n,source:this.css},this.file&&(ir&&(i.input.url=ir(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let n,r;if(this[An])r=this[An];else{let i=this.css.split(` -`);r=new Array(i.length);let o=0;for(let a=0,u=i.length;a=n)s=r.length-1;else{let i=r.length-2,o;for(;s>1),e=r[o+1])s=o+1;else{s=o;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Pn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,n,r,s){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:n,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:s,line:r}));let u;Nn(o.source)?u=ir(o.source):u=new URL(o.source,this.map.consumer().sourceRoot||ir(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:u.toString()};if(u.protocol==="file:")if(Co)c.file=Co(u);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let n of["hasBOM","css","file","id"])this[n]!=null&&(e[n]=this[n]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};No.exports=Ie;Ie.default=Ie;On&&On.registerInput&&On.registerInput(Ie)});var dt=y((Mx,Po)=>{"use strict";var Pf=se(),Rf=sr(),If=qe();function or(t,e){let n=new If(t,e),r=new Rf(n);try{r.parse()}catch(s){throw s}return r.root}Po.exports=or;or.default=or;Pf.registerParse(or)});var Ro=y((Bx,Rn)=>{var qf=tr(),Df=qe();Rn.exports={isInlineComment(t){if(t[0]==="word"&&t[1].slice(0,2)==="//"){let e=t,n=[],r,s;for(;t;){if(/\r?\n/.test(t[1])){if(/['"].*\r?\n/.test(t[1])){n.push(t[1].substring(0,t[1].indexOf(` -`))),s=t[1].substring(t[1].indexOf(` -`));let o=this.input.css.valueOf().substring(this.tokenizer.position());s+=o,r=t[3]+o.length-s.length}else this.tokenizer.back(t);break}n.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",n.join(""),e[2],r];return this.inlineComment(i),s&&(this.input=new Df(s),this.tokenizer=qf(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),Rn.exports.isInlineComment.bind(this)(t)}return!1}}});var qo=y((Fx,Io)=>{Io.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],n=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&n.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(a=>a[1]),[s]=e,i=e.pop(),o=["word",r.join(""),s[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var Lo=y(($x,Do)=>{var Lf=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,Mf=/\.[0-9]/,Bf=t=>{let[,e]=t,[n]=e;return(n==="."||n==="#")&&Lf.test(e)===!1&&Mf.test(e)===!1};Do.exports={isMixinToken:Bf}});var Bo=y((Ux,Mo)=>{var Ff=tr(),$f=/^url\((.+)\)/;Mo.exports=t=>{let{name:e,params:n=""}=t;if(e==="import"&&n.length){t.import=!0;let r=Ff({css:n});for(t.filename=n.replace($f,"$1");!r.endOfFile();){let[s,i]=r.nextToken();if(s==="word"&&i==="url")return;if(s==="brackets"){t.options=i,t.filename=n.replace(i,"").trim();break}}}}});var Wo=y((Wx,Uo)=>{var Fo=/:$/,$o=/^:(\s+)?/;Uo.exports=t=>{let{name:e,params:n=""}=t;if(t.name.slice(-1)===":"){if(Fo.test(e)){let[r]=e.match(Fo);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if($o.test(n)){let[r]=n.match($o);t.value=n.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var Yo=y((Vx,Vo)=>{var Uf=Ae(),Wf=sr(),{isInlineComment:zf}=Ro(),{interpolation:zo}=qo(),{isMixinToken:Vf}=Lo(),Yf=Bo(),Gf=Wo(),Kf=/(!\s*important)$/i;Vo.exports=class extends Wf{constructor(...e){super(...e),this.lastNode=null}atrule(e){zo.bind(this)(e)||(super.atrule(e),Yf(this.lastNode),Gf(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let n=e.findIndex(a=>a[0]==="("),r=e.reverse().find(a=>a[0]===")"),s=e.reverse().indexOf(r),o=e.splice(n,s).map(a=>a[1]).join("");for(let a of e.reverse())this.tokenizer.back(a);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,n,r){super.init(e,n,r),this.lastNode=e}inlineComment(e){let n=new Uf,r=e[1].slice(2);if(this.init(n,e[2]),n.source.end=this.getPosition(e[3]||e[2]),n.inline=!0,n.raws.begin="//",/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let s=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,n.raws.left,n.text,n.raws.right]=s}}mixin(e){let[n]=e,r=n[1].slice(0,1),s=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((s<0||s>3)&&i>0){let c=e.reduce((w,v,R)=>v[0]===")"?R:w),p=e.slice(i,c+i).map(w=>w[1]).join(""),[l]=e.slice(i),g=[l[2],l[3]],[x]=e.slice(c,c+1),h=[x[2],x[3]],d=["brackets",p].concat(g,h),m=e.slice(0,i),b=e.slice(c+1);e=m,e.push(d),e=e.concat(b)}let a=[];for(let c of e)if((c[1]==="!"||a.length)&&a.push(c),c[1]==="important")break;if(a.length){let[c]=a,f=e.indexOf(c),p=a[a.length-1],l=[c[2],c[3]],g=[p[4],p[5]],h=["word",a.map(d=>d[1]).join("")].concat(l,g);e.splice(f,a.length,h)}let u=e.findIndex(c=>Kf.test(c[1]));u>0&&([,o]=e[u],e.splice(u,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){zf.bind(this)(e)||super.other(e)}rule(e){let n=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&n[0]==="{"&&(this.tokenizer.back(n),zo.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[n]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(Vf(n)){this.mixin(e);return}super.unknownWord(e)}}});var Ko=y((Gx,Go)=>{var Hf=Gt();Go.exports=class extends Hf{atrule(e,n){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,n);return}let s=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?s+=e.raws.afterName:i&&(s+=" "),e.nodes)this.block(e,s+i+o);else{let a=(e.raws.between||"")+o+(n?";":"");this.builder(s+i+a,e)}}comment(e){if(e.inline){let n=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${n}${e.text}${r}`,e)}else super.comment(e)}}});var Ho=y((Kx,In)=>{var Qf=qe(),jf=Yo(),Jf=Ko();In.exports={parse(t,e){let n=new Qf(t,e),r=new jf(n);return r.parse(),r.root.walk(s=>{let i=n.css.lastIndexOf(s.source.input.css);if(i===0)return;if(i+s.source.input.css.length!==n.css.length)throw new Error("Invalid state detected in postcss-less");let o=i+s.source.start.offset,a=n.fromOffset(i+s.source.start.offset);if(s.source.start={offset:o,line:a.line,column:a.col},s.source.end){let u=i+s.source.end.offset,c=n.fromOffset(i+s.source.end.offset);s.source.end={offset:u,line:c.line,column:c.col}}}),r.root},stringify(t,e){new Jf(e).stringify(t)},nodeToString(t){let e="";return In.exports.stringify(t,n=>{e+=n}),e}}});var qn=y((Hx,Qo)=>{Qo.exports=class{generate(){}}});var ar=y((jx,Xo)=>{"use strict";var Xf=se(),jo,Jo,ye=class extends Xf{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new jo(new Jo,this,e).stringify()}};ye.registerLazyResult=t=>{jo=t};ye.registerProcessor=t=>{Jo=t};Xo.exports=ye;ye.default=ye});var Dn=y((Jx,ea)=>{"use strict";var Zo={};ea.exports=function(e){Zo[e]||(Zo[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var Ln=y((Xx,ta)=>{"use strict";var mt=class{constructor(e,n={}){if(this.type="warning",this.text=e,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};ta.exports=mt;mt.default=mt});var ur=y((Zx,ra)=>{"use strict";var Zf=Ln(),yt=class{constructor(e,n,r){this.processor=e,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new Zf(e,n);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};ra.exports=yt;yt.default=yt});var Fn=y((tb,oa)=>{"use strict";var{isClean:K,my:ep}=Vt(),tp=qn(),rp=ot(),np=se(),sp=ar(),eb=Dn(),na=ur(),ip=dt(),op=Pe(),ap={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},up={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},lp={Once:!0,postcssPlugin:!0,prepare:!0},De=0;function gt(t){return typeof t=="object"&&typeof t.then=="function"}function ia(t){let e=!1,n=ap[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[n,n+"-"+e,De,n+"Exit",n+"Exit-"+e]:e?[n,n+"-"+e,n+"Exit",n+"Exit-"+e]:t.append?[n,De,n+"Exit"]:[n,n+"Exit"]}function sa(t){let e;return t.type==="document"?e=["Document",De,"DocumentExit"]:t.type==="root"?e=["Root",De,"RootExit"]:e=ia(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Mn(t){return t[K]=!1,t.nodes&&t.nodes.forEach(e=>Mn(e)),t}var Bn={},oe=class t{constructor(e,n,r){this.stringified=!1,this.processed=!1;let s;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))s=Mn(n);else if(n instanceof t||n instanceof na)s=Mn(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let i=ip;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{s=i(n,r)}catch(o){this.processed=!0,this.error=o}s&&!s[ep]&&np.rebuild(s)}this.result=new na(e,s,r),this.helpers={...Bn,postcss:Bn,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,n){let r=this.result.lastPlugin;try{n&&n.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(n,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,s])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!up[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!lp[r])if(typeof n[r]=="object")for(let s in n[r])s==="*"?e(n,r,n[r][s]):e(n,r+"-"+s.toLowerCase(),n[r][s]);else typeof n[r]=="function"&&e(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let r=this.visitTick(n);if(gt(r))try{await r}catch(s){let i=n[n.length-1].node;throw this.handleError(s,i)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(e.type==="document"){let s=e.nodes.map(i=>r(i,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return gt(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,n=rp;e.syntax&&(n=e.syntax.stringify),e.stringifier&&(n=e.stringifier),n.stringify&&(n=n.stringify);let s=new tp(n,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let n=this.runOnRoot(e);if(gt(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[K];)e[K]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let n of e.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,n){return this.async().then(e,n)}toString(){return this.css}visitSync(e,n){for(let[r,s]of e){this.result.lastPlugin=r;let i;try{i=s(n,this.helpers)}catch(o){throw this.handleError(o,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(gt(i))throw this.getAsyncError()}}visitTick(e){let n=e[e.length-1],{node:r,visitors:s}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&n.visitorIndex{s[K]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};oe.registerPostcss=t=>{Bn=t};oa.exports=oe;oe.default=oe;op.registerLazyResult(oe);sp.registerLazyResult(oe)});var ua=y((nb,aa)=>{"use strict";var cp=qn(),fp=ot(),rb=Dn(),pp=dt(),hp=ur(),wt=class{constructor(e,n,r){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=r,this._map=void 0;let s,i=fp;this.result=new hp(this._processor,s,this._opts),this.result.css=n;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new cp(i,s,this._opts,n);if(a.isMap()){let[u,c]=a.generate();u&&(this.result.css=u),c&&(this.result.map=c)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,n){return this.async().then(e,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,n=pp;try{e=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};aa.exports=wt;wt.default=wt});var ca=y((sb,la)=>{"use strict";var dp=ua(),mp=Fn(),yp=ar(),gp=Pe(),ge=class{constructor(e=[]){this.version="8.4.31",this.plugins=this.normalize(e)}normalize(e){let n=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(e,n={}){return this.plugins.length===0&&typeof n.parser>"u"&&typeof n.stringifier>"u"&&typeof n.syntax>"u"?new dp(this,e,n):new mp(this,e,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};la.exports=ge;ge.default=ge;gp.registerProcessor(ge);yp.registerProcessor(ge)});var pa=y((ib,fa)=>{"use strict";var wp=ct(),vp=Cn(),xp=Ae(),bp=rr(),kp=qe(),_p=Pe(),Tp=nr();function vt(t,e){if(Array.isArray(t))return t.map(s=>vt(s));let{inputs:n,...r}=t;if(n){e=[];for(let s of n){let i={...s,__proto__:kp.prototype};i.map&&(i.map={...i.map,__proto__:vp.prototype}),e.push(i)}}if(r.nodes&&(r.nodes=t.nodes.map(s=>vt(s,e))),r.source){let{inputId:s,...i}=r.source;r.source=i,s!=null&&(r.source.input=e[s])}if(r.type==="root")return new _p(r);if(r.type==="decl")return new wp(r);if(r.type==="rule")return new Tp(r);if(r.type==="comment")return new xp(r);if(r.type==="atrule")return new bp(r);throw new Error("Unknown node type: "+t.type)}fa.exports=vt;vt.default=vt});var lr=y((ob,va)=>{"use strict";var Ep=Yt(),ha=ct(),Sp=Fn(),Cp=se(),$n=ca(),Op=ot(),Ap=pa(),da=ar(),Np=Ln(),ma=Ae(),ya=rr(),Pp=ur(),Rp=qe(),Ip=dt(),qp=En(),ga=nr(),wa=Pe(),Dp=ut();function k(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new $n(t)}k.plugin=function(e,n){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: -https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let a=n(...o);return a.postcssPlugin=e,a.postcssVersion=new $n().version,a}let i;return Object.defineProperty(s,"postcss",{get(){return i||(i=s()),i}}),s.process=function(o,a,u){return k([s(u)]).process(o,a)},s};k.stringify=Op;k.parse=Ip;k.fromJSON=Ap;k.list=qp;k.comment=t=>new ma(t);k.atRule=t=>new ya(t);k.decl=t=>new ha(t);k.rule=t=>new ga(t);k.root=t=>new wa(t);k.document=t=>new da(t);k.CssSyntaxError=Ep;k.Declaration=ha;k.Container=Cp;k.Processor=$n;k.Document=da;k.Comment=ma;k.Warning=Np;k.AtRule=ya;k.Result=Pp;k.Input=Rp;k.Rule=ga;k.Root=wa;k.Node=Dp;Sp.registerPostcss(k);va.exports=k;k.default=k});var ba=y((ab,xa)=>{var{Container:Lp}=lr(),Un=class extends Lp{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};xa.exports=Un});var Ca=y((ub,Sa)=>{"use strict";var Wn="'".charCodeAt(0),zn='"'.charCodeAt(0),xt="\\".charCodeAt(0),cr="/".charCodeAt(0),Vn=` -`.charCodeAt(0),fr=" ".charCodeAt(0),Yn="\f".charCodeAt(0),Gn=" ".charCodeAt(0),Kn="\r".charCodeAt(0),Mp="[".charCodeAt(0),Bp="]".charCodeAt(0),ka="(".charCodeAt(0),_a=")".charCodeAt(0),pr="{".charCodeAt(0),Ta="}".charCodeAt(0),Fp=";".charCodeAt(0),$p="*".charCodeAt(0),Up=":".charCodeAt(0),Wp="@".charCodeAt(0),zp=",".charCodeAt(0),Hn="#".charCodeAt(0),hr=/[\t\n\f\r "#'()/;[\\\]{}]/g,dr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Vp=/.[\r\n"'(/\\]/,Ea=/[\da-f]/i,mr=/[\n\f\r]/g;Sa.exports=function(e,n={}){let r=e.css.valueOf(),s=n.ignoreErrors,i,o,a,u,c,f,p,l,g,x=r.length,h=0,d=[],m=[],b;function w(){return h}function v(S){throw e.error("Unclosed "+S,h)}function R(){return m.length===0&&h>=x}function $(){let S=1,C=!1,O=!1;for(;S>0;)o+=1,r.length<=o&&v("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),C?!O&&i===C?(C=!1,O=!1):i===xt?O=!O:O&&(O=!1):i===Wn||i===zn?C=i:i===Ta?S-=1:i===Hn&&l===pr&&(S+=1)}function H(S){if(m.length)return m.pop();if(h>=x)return;let C=S?S.ignoreUnclosed:!1;switch(i=r.charCodeAt(h),i){case Vn:case fr:case Gn:case Kn:case Yn:{o=h;do o+=1,i=r.charCodeAt(o);while(i===fr||i===Vn||i===Gn||i===Kn||i===Yn);g=["space",r.slice(h,o)],h=o-1;break}case Mp:case Bp:case pr:case Ta:case Up:case Fp:case _a:{let O=String.fromCharCode(i);g=[O,O,h];break}case zp:{g=["word",",",h,h+1];break}case ka:{if(p=d.length?d.pop()[1]:"",l=r.charCodeAt(h+1),p==="url"&&l!==Wn&&l!==zn){for(b=1,f=!1,o=h+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===xt)f=!f;else if(l===ka)b+=1;else if(l===_a&&(b-=1,b===0))break;o+=1}u=r.slice(h,o+1),g=["brackets",u,h,o],h=o}else o=r.indexOf(")",h+1),u=r.slice(h,o+1),o===-1||Vp.test(u)?g=["(","(",h]:(g=["brackets",u,h,o],h=o);break}case Wn:case zn:{for(a=i,o=h,f=!1;o{var{Comment:Yp}=lr(),Gp=sr(),Kp=ba(),Hp=Ca(),Qn=class extends Gp{atrule(e){let n=e[1],r=e;for(;!this.tokenizer.endOfFile();){let s=this.tokenizer.nextToken();if(s[0]==="word"&&s[2]===r[3]+1)n+=s[1],r=s;else{this.tokenizer.back(s);break}}super.atrule(["at-word",n,e[2],r[3]])}comment(e){if(e[4]==="inline"){let n=new Yp;this.init(n,e[2]),n.raws.inline=!0;let r=this.input.fromOffset(e[3]);n.source.end={column:r.col,line:r.line,offset:e[3]+1};let s=e[1].slice(2);if(/^\s*$/.test(s))n.text="",n.raws.left=s,n.raws.right="";else{let i=s.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");n.text=o,n.raws.left=i[1],n.raws.right=i[3],n.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=Hp(this.input)}raw(e,n,r,s){if(super.raw(e,n,r,s),e.raws[n]){let i=e.raws[n].raw;e.raws[n].raw=r.reduce((o,a)=>{if(a[0]==="comment"&&a[4]==="inline"){let u=a[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+u+"*/"}else return o+a[1]},""),i!==e.raws[n].raw&&(e.raws[n].scss=i)}}rule(e){let n=!1,r=0,s="";for(let i of e)if(n)i[0]!=="comment"&&i[0]!=="{"&&(s+=i[1]);else{if(i[0]==="space"&&i[1].includes(` -`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(n=!0)}if(!n||s.trim()===""||/^[#:A-Za-z-]/.test(s))super.rule(e);else{e.pop();let i=new Kp;this.init(i,e[0][2]);let o;for(let u=e.length-1;u>=0;u--)if(e[u][0]!=="space"){o=e[u];break}if(o[3]){let u=this.input.fromOffset(o[3]);i.source.end={column:u.col,line:u.line,offset:o[3]+1}}else{let u=this.input.fromOffset(o[2]);i.source.end={column:u.col,line:u.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let u=this.input.fromOffset(e[0][2]);i.source.start={column:u.col,line:u.line,offset:e[0][2]}}for(i.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let a;for(;e.length;)if(a=e.shift(),a[0]===":"){i.raws.between+=a[1];break}else i.raws.between+=a[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let u=e.length-1;u>0;u--){if(a=e[u],a[1]==="!important"){i.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(a[1]==="important"){let c=e.slice(0),f="";for(let p=u;p>0;p--){let l=c[p][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(a[0]!=="space"&&a[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};Oa.exports=Qn});var Pa=y((cb,Na)=>{var{Input:Qp}=lr(),jp=Aa();Na.exports=function(e,n){let r=new Qp(e,n),s=new jp(r);return s.parse(),s.root}});var V=y((mb,Da)=>{"use strict";var jn=function(t,e){let n=new t.constructor;for(let r in t){if(!t.hasOwnProperty(r))continue;let s=t[r],i=typeof s;r==="parent"&&i==="object"?e&&(n[r]=e):r==="source"?n[r]=s:s instanceof Array?n[r]=s.map(o=>jn(o,n)):r!=="before"&&r!=="after"&&r!=="between"&&r!=="semicolon"&&(i==="object"&&s!==null&&(s=jn(s)),n[r]=s)}return n};Da.exports=class{constructor(e){e=e||{},this.raws={before:"",after:""};for(let n in e)this[n]=e[n]}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 n=jn(this);for(let r in e)n[r]=e[r];return n}cloneBefore(e){e=e||{};let n=this.clone(e);return this.parent.insertBefore(this,n),n}cloneAfter(e){e=e||{};let n=this.clone(e);return this.parent.insertAfter(this,n),n}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let n of e)this.parent.insertBefore(this,n);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 n in this){if(!this.hasOwnProperty(n)||n==="parent")continue;let r=this[n];r instanceof Array?e[n]=r.map(s=>typeof s=="object"&&s.toJSON?s.toJSON():s):typeof r=="object"&&r.toJSON?e[n]=r.toJSON():e[n]=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 n=this.toString(),r=this.source.start.column,s=this.source.start.line;for(let i=0;i{"use strict";var th=V(),Le=class extends th{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 n=this.lastEach,r,s;if(this.indexes[n]=0,!!this.nodes){for(;this.indexes[n]{let s=e(n,r);return s!==!1&&n.walk&&(s=n.walk(e)),s})}walkType(e,n){if(!e||!n)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((s,i)=>{if(r&&s instanceof e||!r&&s.type===e)return n.call(this,s,i)})}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 n of this.nodes)n.cleanRaws(e)}insertAfter(e,n){let r=this.index(e),s;this.nodes.splice(r+1,0,n);for(let i in this.indexes)s=this.indexes[i],r<=s&&(this.indexes[i]=s+this.nodes.length);return this}insertBefore(e,n){let r=this.index(e),s;this.nodes.splice(r,0,n);for(let i in this.indexes)s=this.indexes[i],r<=s&&(this.indexes[i]=s+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=e&&(this.indexes[r]=n-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 typeof e=="number"?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}};Le.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!Le.prototype[e]&&(Le.prototype[e]=function(n){return this.walkType(t,n)})};La.exports=Le});var Ba=y((wb,Ma)=>{"use strict";var rh=B();Ma.exports=class extends rh{constructor(e){super(e),this.type="root"}}});var $a=y((xb,Fa)=>{"use strict";var nh=B();Fa.exports=class extends nh{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var za=y((bb,Wa)=>{"use strict";var Ua=B(),yr=class extends Ua{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};Ua.registerWalker(yr);Wa.exports=yr});var Ya=y((kb,Va)=>{"use strict";var sh=B(),ih=V(),gr=class extends ih{constructor(e){super(e),this.type="colon"}};sh.registerWalker(gr);Va.exports=gr});var Ka=y((_b,Ga)=>{"use strict";var oh=B(),ah=V(),wr=class extends ah{constructor(e){super(e),this.type="comma"}};oh.registerWalker(wr);Ga.exports=wr});var Qa=y((Tb,Ha)=>{"use strict";var uh=B(),lh=V(),vr=class extends lh{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("")}};uh.registerWalker(vr);Ha.exports=vr});var Xa=y((Eb,Ja)=>{"use strict";var ja=B(),xr=class extends ja{constructor(e){super(e),this.type="func",this.unbalanced=-1}};ja.registerWalker(xr);Ja.exports=xr});var eu=y((Sb,Za)=>{"use strict";var ch=B(),fh=V(),br=class extends fh{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("")}};ch.registerWalker(br);Za.exports=br});var ru=y((Cb,tu)=>{"use strict";var ph=B(),hh=V(),kr=class extends hh{constructor(e){super(e),this.type="operator"}};ph.registerWalker(kr);tu.exports=kr});var su=y((Ob,nu)=>{"use strict";var dh=B(),mh=V(),_r=class extends mh{constructor(e){super(e),this.type="paren",this.parenType=""}};dh.registerWalker(_r);nu.exports=_r});var ou=y((Ab,iu)=>{"use strict";var yh=B(),gh=V(),Tr=class extends gh{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("")}};yh.registerWalker(Tr);iu.exports=Tr});var uu=y((Nb,au)=>{"use strict";var wh=B(),vh=V(),Er=class extends vh{constructor(e){super(e),this.type="word"}};wh.registerWalker(Er);au.exports=Er});var cu=y((Pb,lu)=>{"use strict";var xh=B(),bh=V(),Sr=class extends bh{constructor(e){super(e),this.type="unicode-range"}};xh.registerWalker(Sr);lu.exports=Sr});var pu=y((Rb,fu)=>{"use strict";var Jn=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while tokzenizing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};fu.exports=Jn});var vu=y((Ib,wu)=>{"use strict";var kh="{".charCodeAt(0),_h="}".charCodeAt(0),Th="(".charCodeAt(0),Eh=")".charCodeAt(0),hu="'".charCodeAt(0),Sh='"'.charCodeAt(0),du="\\".charCodeAt(0),Cr="/".charCodeAt(0),Ch=".".charCodeAt(0),Oh=",".charCodeAt(0),Ah=":".charCodeAt(0),Xn="*".charCodeAt(0),Or="-".charCodeAt(0),Zn="+".charCodeAt(0),Nh="#".charCodeAt(0),bt=` -`.charCodeAt(0),es=" ".charCodeAt(0),ts="\f".charCodeAt(0),rs=" ".charCodeAt(0),ns="\r".charCodeAt(0),Ph="@".charCodeAt(0),Rh="e".charCodeAt(0),Ih="E".charCodeAt(0),mu="0".charCodeAt(0),yu="9".charCodeAt(0),qh="u".charCodeAt(0),Dh="U".charCodeAt(0),Ar=/[ \n\t\r\{\(\)'"\\;,/]/g,Lh=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g,Me=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g,Mh=/^[a-z0-9]/i,Bh=/^[a-f0-9?\-]/i,gu=pu();wu.exports=function(e,n){n=n||{};let r=[],s=e.valueOf(),i=s.length,o=-1,a=1,u=0,c=0,f=null,p,l,g,x,h,d,m,b,w,v,R,$;function H(S){let C=`Unclosed ${S} at line: ${a}, column: ${u-o}, token: ${u}`;throw new gu(C)}function U(){let S=`Syntax error at line: ${a}, column: ${u-o}, token: ${u}`;throw new gu(S)}for(;u0&&r[r.length-1][0]==="word"&&r[r.length-1][1]==="url",r.push(["(","(",a,u-o,a,l-o,u]);break;case Eh:c--,f=f&&c>0,r.push([")",")",a,u-o,a,l-o,u]);break;case hu:case Sh:g=p===hu?"'":'"',l=u;do for(v=!1,l=s.indexOf(g,l+1),l===-1&&H("quote",g),R=l;s.charCodeAt(R-1)===du;)R-=1,v=!v;while(v);r.push(["string",s.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case Ph:Ar.lastIndex=u+1,Ar.test(s),Ar.lastIndex===0?l=s.length-1:l=Ar.lastIndex-2,r.push(["atword",s.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case du:l=u,p=s.charCodeAt(l+1),m&&p!==Cr&&p!==es&&p!==bt&&p!==rs&&p!==ns&&p!==ts&&(l+=1),r.push(["word",s.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case Zn:case Or:case Xn:l=u+1,$=s.slice(u+1,l+1);let S=s.slice(u-1,u);if(p===Or&&$.charCodeAt(0)===Or){l++,r.push(["word",s.slice(u,l),a,u-o,a,l-o,u]),u=l-1;break}r.push(["operator",s.slice(u,l),a,u-o,a,l-o,u]),u=l-1;break;default:if(p===Cr&&(s.charCodeAt(u+1)===Xn||n.loose&&!f&&s.charCodeAt(u+1)===Cr)){if(s.charCodeAt(u+1)===Xn)l=s.indexOf("*/",u+2)+1,l===0&&H("comment","*/");else{let O=s.indexOf(` -`,u+2);l=O!==-1?O-1:i}d=s.slice(u,l+1),x=d.split(` -`),h=x.length-1,h>0?(b=a+h,w=l-x[h].length):(b=a,w=o),r.push(["comment",d,a,u-o,b,l-w,u]),o=w,a=b,u=l}else if(p===Nh&&!Mh.test(s.slice(u+1,u+2)))l=u+1,r.push(["#",s.slice(u,l),a,u-o,a,l-o,u]),u=l-1;else if((p===qh||p===Dh)&&s.charCodeAt(u+1)===Zn){l=u+2;do l+=1,p=s.charCodeAt(l);while(l=mu&&p<=yu&&(C=Me),C.lastIndex=u+1,C.test(s),C.lastIndex===0?l=s.length-1:l=C.lastIndex-2,C===Me||p===Ch){let O=s.charCodeAt(l),ve=s.charCodeAt(l+1),Cs=s.charCodeAt(l+2);(O===Rh||O===Ih)&&(ve===Or||ve===Zn)&&Cs>=mu&&Cs<=yu&&(Me.lastIndex=l+2,Me.test(s),Me.lastIndex===0?l=s.length-1:l=Me.lastIndex-2)}r.push(["word",s.slice(u,l+1),a,u-o,a,l-o,u]),u=l}break}u++}return r}});var ss=y((qb,xu)=>{xu.exports=function(e,n){if(n=typeof n=="number"?n:1/0,!n)return Array.isArray(e)?e.map(function(s){return s}):e;return r(e,1);function r(s,i){return s.reduce(function(o,a){return Array.isArray(a)&&i{bu.exports=function(t,e){for(var n=-1,r=[];(n=t.indexOf(e,n+1))!==-1;)r.push(n);return r}});var os=y((Lb,ku)=>{"use strict";function Fh(t,e){for(var n=1,r=t.length,s=t[0],i=t[0],o=1;o{"use strict";var as=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};_u.exports=as});var Ou=y((Fb,Cu)=>{"use strict";var Wh=Ba(),zh=$a(),Vh=za(),Yh=Ya(),Gh=Ka(),Kh=Qa(),Hh=Xa(),Qh=eu(),jh=ru(),Eu=su(),Jh=ou(),Su=uu(),Xh=cu(),Zh=vu(),ed=ss(),td=is(),rd=os(),nd=Tu();function sd(t){return t.sort((e,n)=>e-n)}Cu.exports=class{constructor(e,n){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,n),this.position=0,this.unbalanced=0,this.root=new Wh;let s=new zh;this.root.append(s),this.current=s,this.tokens=Zh(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new Yh({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 Gh({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=!1,n=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&n.startsWith("//")&&(n=n.substring(2),e=!0),r=new Kh({value:n,inline:e,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(r),this.position++}error(e,n){throw new nd(e+` at line: ${n[2]}, column ${n[3]}`)}loop(){for(;this.position0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return n=new jh({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(n)}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();break}}parenOpen(){let e=1,n=this.position+1,r=this.currToken,s;for(;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()))}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 Xh({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=this.nextToken,n=this.currToken[1],r=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/,s=/^(?!\#([a-z0-9]+))[\#\{\}]/gi,i,o;if(!s.test(n))for(;e&&e[0]==="word";){this.position++;let a=this.currToken[1];n+=a,e=this.nextToken}i=td(n,"@"),o=sd(rd(ed([[0],i]))),o.forEach((a,u)=>{let c=o[u+1]||n.length,f=n.slice(a,c),p;if(~i.indexOf(a))p=new Vh({value:f.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u]});else if(r.test(this.currToken[1])){let l=f.replace(r,"");p=new Qh({value:f.replace(l,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u],unit:l})}else p=new(e&&e[0]==="("?Hh:Su)({value:f,source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u]}),p.type==="word"?(p.isHex=/^#(.+)/.test(f),p.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(p)}),this.position++}string(){let e=this.currToken,n=this.currToken[1],r=/^(\"|\')/,s=r.test(n),i="",o;s&&(i=n.match(r)[0],n=n.slice(1,n.length-1)),o=new Jh({value:n,source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6],quoted:s}),o.raws.quote=i,this.newNode(o),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]}}});var we=y((Pr,qu)=>{"use strict";Pr.__esModule=!0;var Iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function cd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var fd=function t(e,n){if((typeof e>"u"?"undefined":Iu(e))!=="object")return e;var r=new e.constructor;for(var s in e)if(e.hasOwnProperty(s)){var i=e[s],o=typeof i>"u"?"undefined":Iu(i);s==="parent"&&o==="object"?n&&(r[s]=n):i instanceof Array?r[s]=i.map(function(a){return t(a,r)}):r[s]=t(i,r)}return r},pd=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cd(this,t);for(var n in e)this[n]=e[n];var r=e.spaces;r=r===void 0?{}:r;var s=r.before,i=s===void 0?"":s,o=r.after,a=o===void 0?"":o;this.spaces={before:i,after:a}}return t.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.prototype.replaceWith=function(){if(this.parent){for(var n in arguments)this.parent.insertBefore(this,arguments[n]);this.remove()}return this},t.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},t.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},t.prototype.clone=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=fd(this);for(var s in n)r[s]=n[s];return r},t.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join("")},t}();Pr.default=pd;qu.exports=Pr.default});var L=y(F=>{"use strict";F.__esModule=!0;var Kb=F.TAG="tag",Hb=F.STRING="string",Qb=F.SELECTOR="selector",jb=F.ROOT="root",Jb=F.PSEUDO="pseudo",Xb=F.NESTING="nesting",Zb=F.ID="id",ek=F.COMMENT="comment",tk=F.COMBINATOR="combinator",rk=F.CLASS="class",nk=F.ATTRIBUTE="attribute",sk=F.UNIVERSAL="universal"});var Ir=y((Rr,Du)=>{"use strict";Rr.__esModule=!0;var hd=function(){function t(e,n){for(var r=0;r=r&&(this.indexes[i]=s-1);return this},e.prototype.removeAll=function(){for(var i=this.nodes,r=Array.isArray(i),s=0,i=r?i:i[Symbol.iterator]();;){var o;if(r){if(s>=i.length)break;o=i[s++]}else{if(s=i.next(),s.done)break;o=s.value}var a=o;a.parent=void 0}return this.nodes=[],this},e.prototype.empty=function(){return this.removeAll()},e.prototype.insertAfter=function(r,s){var i=this.index(r);this.nodes.splice(i+1,0,s);var o=void 0;for(var a in this.indexes)o=this.indexes[a],i<=o&&(this.indexes[a]=o+this.nodes.length);return this},e.prototype.insertBefore=function(r,s){var i=this.index(r);this.nodes.splice(i,0,s);var o=void 0;for(var a in this.indexes)o=this.indexes[a],i<=o&&(this.indexes[a]=o+this.nodes.length);return this},e.prototype.each=function(r){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var s=this.lastEach;if(this.indexes[s]=0,!!this.length){for(var i=void 0,o=void 0;this.indexes[s]{"use strict";qr.__esModule=!0;var _d=Ir(),Td=Sd(_d),Ed=L();function Sd(t){return t&&t.__esModule?t:{default:t}}function Cd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Od(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Ad(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Nd=function(t){Ad(e,t);function e(n){Cd(this,e);var r=Od(this,t.call(this,n));return r.type=Ed.ROOT,r}return e.prototype.toString=function(){var r=this.reduce(function(s,i){var o=String(i);return o?s+o+",":""},"").slice(0,-1);return this.trailingComma?r+",":r},e}(Td.default);qr.default=Nd;Lu.exports=qr.default});var Fu=y((Dr,Bu)=>{"use strict";Dr.__esModule=!0;var Pd=Ir(),Rd=qd(Pd),Id=L();function qd(t){return t&&t.__esModule?t:{default:t}}function Dd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ld(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Md(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Bd=function(t){Md(e,t);function e(n){Dd(this,e);var r=Ld(this,t.call(this,n));return r.type=Id.SELECTOR,r}return e}(Rd.default);Dr.default=Bd;Bu.exports=Dr.default});var Be=y((Lr,$u)=>{"use strict";Lr.__esModule=!0;var Fd=function(){function t(e,n){for(var r=0;r{"use strict";Mr.__esModule=!0;var Kd=Be(),Hd=jd(Kd),Qd=L();function jd(t){return t&&t.__esModule?t:{default:t}}function Jd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Zd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var em=function(t){Zd(e,t);function e(n){Jd(this,e);var r=Xd(this,t.call(this,n));return r.type=Qd.CLASS,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"."+this.value,this.spaces.after].join("")},e}(Hd.default);Mr.default=em;Uu.exports=Mr.default});var Vu=y((Br,zu)=>{"use strict";Br.__esModule=!0;var tm=we(),rm=sm(tm),nm=L();function sm(t){return t&&t.__esModule?t:{default:t}}function im(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function om(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function am(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var um=function(t){am(e,t);function e(n){im(this,e);var r=om(this,t.call(this,n));return r.type=nm.COMMENT,r}return e}(rm.default);Br.default=um;zu.exports=Br.default});var Gu=y((Fr,Yu)=>{"use strict";Fr.__esModule=!0;var lm=Be(),cm=pm(lm),fm=L();function pm(t){return t&&t.__esModule?t:{default:t}}function hm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dm(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function mm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ym=function(t){mm(e,t);function e(n){hm(this,e);var r=dm(this,t.call(this,n));return r.type=fm.ID,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"#"+this.value,this.spaces.after].join("")},e}(cm.default);Fr.default=ym;Yu.exports=Fr.default});var Hu=y(($r,Ku)=>{"use strict";$r.__esModule=!0;var gm=Be(),wm=xm(gm),vm=L();function xm(t){return t&&t.__esModule?t:{default:t}}function bm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function km(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function _m(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Tm=function(t){_m(e,t);function e(n){bm(this,e);var r=km(this,t.call(this,n));return r.type=vm.TAG,r}return e}(wm.default);$r.default=Tm;Ku.exports=$r.default});var ju=y((Ur,Qu)=>{"use strict";Ur.__esModule=!0;var Em=we(),Sm=Om(Em),Cm=L();function Om(t){return t&&t.__esModule?t:{default:t}}function Am(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nm(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Pm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Rm=function(t){Pm(e,t);function e(n){Am(this,e);var r=Nm(this,t.call(this,n));return r.type=Cm.STRING,r}return e}(Sm.default);Ur.default=Rm;Qu.exports=Ur.default});var Xu=y((Wr,Ju)=>{"use strict";Wr.__esModule=!0;var Im=Ir(),qm=Lm(Im),Dm=L();function Lm(t){return t&&t.__esModule?t:{default:t}}function Mm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bm(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Fm(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var $m=function(t){Fm(e,t);function e(n){Mm(this,e);var r=Bm(this,t.call(this,n));return r.type=Dm.PSEUDO,r}return e.prototype.toString=function(){var r=this.length?"("+this.map(String).join(",")+")":"";return[this.spaces.before,String(this.value),r,this.spaces.after].join("")},e}(qm.default);Wr.default=$m;Ju.exports=Wr.default});var el=y((zr,Zu)=>{"use strict";zr.__esModule=!0;var Um=Be(),Wm=Vm(Um),zm=L();function Vm(t){return t&&t.__esModule?t:{default:t}}function Ym(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gm(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Km(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Hm=function(t){Km(e,t);function e(n){Ym(this,e);var r=Gm(this,t.call(this,n));return r.type=zm.ATTRIBUTE,r.raws={},r}return e.prototype.toString=function(){var r=[this.spaces.before,"[",this.ns,this.attribute];return this.operator&&r.push(this.operator),this.value&&r.push(this.value),this.raws.insensitive?r.push(this.raws.insensitive):this.insensitive&&r.push(" i"),r.push("]"),r.concat(this.spaces.after).join("")},e}(Wm.default);zr.default=Hm;Zu.exports=zr.default});var rl=y((Vr,tl)=>{"use strict";Vr.__esModule=!0;var Qm=Be(),jm=Xm(Qm),Jm=L();function Xm(t){return t&&t.__esModule?t:{default:t}}function Zm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ey(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ty(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ry=function(t){ty(e,t);function e(n){Zm(this,e);var r=ey(this,t.call(this,n));return r.type=Jm.UNIVERSAL,r.value="*",r}return e}(jm.default);Vr.default=ry;tl.exports=Vr.default});var sl=y((Yr,nl)=>{"use strict";Yr.__esModule=!0;var ny=we(),sy=oy(ny),iy=L();function oy(t){return t&&t.__esModule?t:{default:t}}function ay(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uy(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ly(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var cy=function(t){ly(e,t);function e(n){ay(this,e);var r=uy(this,t.call(this,n));return r.type=iy.COMBINATOR,r}return e}(sy.default);Yr.default=cy;nl.exports=Yr.default});var ol=y((Gr,il)=>{"use strict";Gr.__esModule=!0;var fy=we(),py=dy(fy),hy=L();function dy(t){return t&&t.__esModule?t:{default:t}}function my(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yy(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function gy(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var wy=function(t){gy(e,t);function e(n){my(this,e);var r=yy(this,t.call(this,n));return r.type=hy.NESTING,r.value="&",r}return e}(py.default);Gr.default=wy;il.exports=Gr.default});var ul=y((Kr,al)=>{"use strict";Kr.__esModule=!0;Kr.default=vy;function vy(t){return t.sort(function(e,n){return e-n})}al.exports=Kr.default});var gl=y((jr,yl)=>{"use strict";jr.__esModule=!0;jr.default=Ny;var ll=39,xy=34,us=92,cl=47,kt=10,ls=32,cs=12,fs=9,ps=13,fl=43,pl=62,hl=126,dl=124,by=44,ky=40,_y=41,Ty=91,Ey=93,Sy=59,ml=42,Cy=58,Oy=38,Ay=64,Hr=/[ \n\t\r\{\(\)'"\\;/]/g,Qr=/[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;function Ny(t){for(var e=[],n=t.css.valueOf(),r=void 0,s=void 0,i=void 0,o=void 0,a=void 0,u=void 0,c=void 0,f=void 0,p=void 0,l=void 0,g=void 0,x=n.length,h=-1,d=1,m=0,b=function(v,R){if(t.safe)n+=R,s=n.length-1;else throw t.error("Unclosed "+v,d,m-h,m)};m0?(f=d+a,p=s-o[a].length):(f=d,p=h),e.push(["comment",u,d,m-h,f,s-p,m]),h=p,d=f,m=s):(Qr.lastIndex=m+1,Qr.test(n),Qr.lastIndex===0?s=n.length-1:s=Qr.lastIndex-2,e.push(["word",n.slice(m,s+1),d,m-h,d,s-h,m]),m=s);break}m++}return e}yl.exports=jr.default});var xl=y((Jr,vl)=>{"use strict";Jr.__esModule=!0;var Py=function(){function t(e,n){for(var r=0;r1?(o[0]===""&&(o[0]=!0),a.attribute=this.parseValue(o[2]),a.namespace=this.parseNamespace(o[0])):a.attribute=this.parseValue(i[0]),r=new Zy.default(a),i[2]){var u=i[2].split(/(\s+i\s*?)$/),c=u[0].trim();r.value=this.lossy?c:u[0],u[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=u[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var n=new ng.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&&n.nextToken&&n.nextToken[0]==="("&&n.error("Misplaced parenthesis.")})}else this.error('Unexpected "'+this.currToken[0]+'" found.')},t.prototype.space=function(){var n=this.currToken;this.position===0||this.prevToken[0]===","||this.prevToken[0]==="("?(this.spaces=this.parseSpace(n[1]),this.position++):this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.spaces.after=this.parseSpace(n[1]),this.position++):this.combinator()},t.prototype.string=function(){var n=this.currToken;this.newNode(new Qy.default({value:this.currToken[1],source:{start:{line:n[2],column:n[3]},end:{line:n[4],column:n[5]}},sourceIndex:n[6]})),this.position++},t.prototype.universal=function(n){var r=this.nextToken;if(r&&r[1]==="|")return this.position++,this.namespace();this.newNode(new tg.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]}),n),this.position++},t.prototype.splitWord=function(n,r){for(var s=this,i=this.nextToken,o=this.currToken[1];i&&i[0]==="word";){this.position++;var a=this.currToken[1];if(o+=a,a.lastIndexOf("\\")===a.length-1){var u=this.nextToken;u&&u[0]==="space"&&(o+=this.parseSpace(u[1]," "),this.position++)}i=this.nextToken}var c=(0,hs.default)(o,"."),f=(0,hs.default)(o,"#"),p=(0,hs.default)(o,"#{");p.length&&(f=f.filter(function(g){return!~p.indexOf(g)}));var l=(0,ag.default)((0,Ly.default)((0,Iy.default)([[0],c,f])));l.forEach(function(g,x){var h=l[x+1]||o.length,d=o.slice(g,h);if(x===0&&r)return r.call(s,d,l.length);var m=void 0;~c.indexOf(g)?m=new Uy.default({value:d.slice(1),source:{start:{line:s.currToken[2],column:s.currToken[3]+g},end:{line:s.currToken[4],column:s.currToken[3]+(h-1)}},sourceIndex:s.currToken[6]+l[x]}):~f.indexOf(g)?m=new Yy.default({value:d.slice(1),source:{start:{line:s.currToken[2],column:s.currToken[3]+g},end:{line:s.currToken[4],column:s.currToken[3]+(h-1)}},sourceIndex:s.currToken[6]+l[x]}):m=new Ky.default({value:d,source:{start:{line:s.currToken[2],column:s.currToken[3]+g},end:{line:s.currToken[4],column:s.currToken[3]+(h-1)}},sourceIndex:s.currToken[6]+l[x]}),s.newNode(m,n)}),this.position++},t.prototype.word=function(n){var r=this.nextToken;return r&&r[1]==="|"?(this.position++,this.namespace()):this.splitWord(n)},t.prototype.loop=function(){for(;this.position{"use strict";Xr.__esModule=!0;var dg=function(){function t(e,n){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},s=new yg.default({css:n,error:function(o){throw new Error(o)},options:r});return this.res=s,this.func(s),this},dg(t,[{key:"result",get:function(){return String(this.res)}}]),t}();Xr.default=vg;bl.exports=Xr.default});var gs=y(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});function _g(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}ys.default=_g});var vs=y(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});var Tg=gs(),Sl=Eg(Tg);function Eg(t){return t&&t.__esModule?t:{default:t}}function _t(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(n){n.parent=e})}_t.prototype=Object.create(Sl.default.prototype);_t.constructor=Sl.default;_t.prototype.walk=function(e,n){for(var r=typeof e=="string"||e instanceof RegExp,s=r?n:e,i=typeof e=="string"?new RegExp(e):e,o=0;o{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.parseMediaFeature=Al;Tt.parseMediaQuery=bs;Tt.parseMediaList=Og;var Sg=gs(),Cl=Ol(Sg),Cg=vs(),xs=Ol(Cg);function Ol(t){return t&&t.__esModule?t:{default:t}}function Al(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],n=[{mode:"normal",character:null}],r=[],s=0,i="",o=null,a=null,u=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),u++);for(var f=0;f0&&(n[c-1].after=i.before),i.type===void 0){if(c>0){if(n[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(n[c-1].value==="not"||n[c-1].value==="only"){i.type="media-type";continue}if(n[c-1].value==="and"){i.type="media-feature-expression";continue}n[c-1].type==="media-type"&&(n[c+1]?i.type=n[c+1].type==="media-feature-expression"?"keyword":"media-feature-expression":i.type="media-feature-expression")}if(c===0){if(!n[c+1]){i.type="media-type";continue}if(n[c+1]&&(n[c+1].type==="media-feature-expression"||n[c+1].type==="keyword")){i.type="media-type";continue}if(n[c+2]){if(n[c+2].type==="media-feature-expression"){i.type="media-type",n[c+1].type="keyword";continue}if(n[c+2].type==="keyword"){i.type="keyword",n[c+1].type="media-type";continue}}if(n[c+3]&&n[c+3].type==="media-feature-expression"){i.type="keyword",n[c+1].type="media-type",n[c+2].type="keyword";continue}}}return n}function Og(t){var e=[],n=0,r=0,s=/^(\s*)url\s*\(/.exec(t);if(s!==null){for(var i=s[0].length,o=1;o>0;){var a=t[i];a==="("&&o++,a===")"&&o--,i++}e.unshift(new Cl.default({type:"url",value:t.substring(0,i).trim(),sourceIndex:s[1].length,before:s[1],after:/^(\s*)/.exec(t.substring(i))[1]})),n=i}for(var u=n;u{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});ks.default=Ig;var Ag=vs(),Ng=Rg(Ag),Pg=Nl();function Rg(t){return t&&t.__esModule?t:{default:t}}function Ig(t){return new Ng.default({nodes:(0,Pg.parseMediaList)(t),type:"media-query-list",value:t.trim()})}});var Ss={};Os(Ss,{languages:()=>Ul,options:()=>zl,parsers:()=>Es,printers:()=>Wg});var jl=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},T=jl;var Et="'",As='"';function Jl(t,e){let n=e===!0||e===Et?Et:As,r=n===Et?As:Et,s=0,i=0;for(let o of t)o===n?s++:o===r&&i++;return s>i?r:n}var Ns=Jl;function Xl(t,e,n){let r=e==='"'?"'":'"',i=T(!1,t,/\\(.)|(["'])/gs,(o,a,u)=>a===r?a:u===e?"\\"+u:u||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return e+i+e}var Ps=Xl;function Zl(t,e){let n=t.slice(1,-1),r=e.parser==="json"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":Ns(n,e.singleQuote);return Ps(n,r,!(e.parser==="css"||e.parser==="less"||e.parser==="scss"||e.__embeddedInHtml))}var St=Zl;function ec(t){return Array.isArray(t)&&t.length>0}var ee=ec;var Fe="string",$e="array",Ue="cursor",xe="indent",be="align",We="trim",ke="group",te="fill",le="if-break",ze="indent-if-break",Ve="line-suffix",Ye="line-suffix-boundary",Q="line",Ge="label",_e="break-parent",Ct=new Set([Ue,xe,be,We,ke,te,le,ze,Ve,Ye,Q,Ge,_e]);function tc(t){if(typeof t=="string")return Fe;if(Array.isArray(t))return $e;if(!t)return;let{type:e}=t;if(Ct.has(e))return e}var Ke=tc;var rc=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function nc(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', -Expected it to be 'string' or 'object'.`;if(Ke(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=rc([...Ct].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. -Expected it to be ${r}.`}var tn=class extends Error{name="InvalidDocError";constructor(e){super(nc(e)),this.doc=e}},rn=tn;var Rs=()=>{},ce=Rs,Ot=Rs;function q(t){return ce(t),{type:xe,contents:t}}function Is(t,e){return ce(e),{type:be,contents:e,n:t}}function D(t,e={}){return ce(t),Ot(e.expandedStates,!0),{type:ke,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function qs(t){return Is({type:"root"},t)}function fe(t){return Is(-1,t)}function He(t){return Ot(t),{type:te,parts:t}}function At(t,e="",n={}){return ce(t),e!==""&&ce(e),{type:le,breakContents:t,flatContents:e,groupId:n.groupId}}var Qe={type:_e};var sc={type:Q,hard:!0};var A={type:Q},M={type:Q,soft:!0},_=[sc,Qe];function Y(t,e){ce(t),Ot(e);let n=[];for(let r=0;r{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},G=ic;var Ds=t=>{if(Array.isArray(t))return t;if(t.type!==te)throw new Error(`Expect doc to be 'array' or '${te}'.`);return t.parts};function oc(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(Ke(i)){case $e:return e(i.map(r));case te:return e({...i,parts:i.parts.map(r)});case le:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case ke:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case be:case xe:case ze:case Ge:case Ve:return e({...i,contents:r(i.contents)});case Fe:case Ue:case We:case Ye:case Q:case _e:return e(i);default:throw new rn(i)}}}function ac(t){return t.type===Q&&!t.hard?t.soft?"":" ":t.type===le?t.flatContents:t}function Ls(t){return oc(t,ac)}var nn=class extends Error{name="UnexpectedNodeError";constructor(e,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},Ms=nn;function uc(t){return(t==null?void 0:t.type)==="front-matter"}var Te=uc;var lc=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function Bs(t,e,n){if(Te(t)&&t.lang==="yaml"&&delete e.value,t.type==="css-comment"&&n.type==="css-root"&&n.nodes.length>0&&((n.nodes[0]===t||Te(n.nodes[0])&&n.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/.test(t.text))||n.type==="css-root"&&G(!1,n.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,t.type==="selector-combinator"&&(e.value=T(!1,e.value,/\s+/g," ")),t.type==="media-feature"&&(e.value=T(!1,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(e.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=e.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=e.name.toLowerCase()),t.type==="value-number"&&(e.unit=e.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=T(!1,e.value,/;$/g,"")),(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&e.value&&(e.value=cc(e.value)),t.type==="selector-attribute"&&(e.attribute=e.attribute.trim(),e.namespace&&typeof e.namespace=="string"&&(e.namespace=e.namespace.trim(),e.namespace.length===0&&(e.namespace=!0)),e.value&&(e.value=T(!1,e.value.trim(),/^["']|["']$/g,""),delete e.quoted)),(t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&e.value&&(e.value=T(!1,e.value,/([\d+.e-]+)([a-z]*)/gi,(r,s,i)=>{let o=Number(s);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=t.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(s=>s.type==="value-number"&&s.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&r.value.endsWith("[")||r.type==="value-word"&&r.value.startsWith("]")))return{type:"value-atword",value:t.groups.map(r=>r.value).join(""),group:{open:null,close:null,groups:[],type:"value-paren_group"}}}Bs.ignoredProperties=lc;function cc(t){return T(!1,T(!1,t,"'",'"'),/\\([^\da-f])/gi,"$1")}var Fs=Bs;async function fc(t,e){if(t.lang==="yaml"){let n=t.value.trim(),r=n?await e(n,{parser:"yaml"}):"";return qs([t.startDelimiter,_,r,r?_:"",t.endDelimiter])}}var $s=fc;function Us(t){let{node:e}=t;if(e.type==="front-matter")return async n=>{let r=await $s(e,n);return r?[r,_]:void 0}}Us.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var Ws=Us;var re=ue(Qs(),1);function bc(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(` -`);return e===-1?t:t.slice(0,e)}var js=bc;function Js(t){let e=js(t);e&&(t=t.slice(e.length+1));let n=(0,re.extract)(t),{pragmas:r,comments:s}=(0,re.parseWithComments)(n);return{shebang:e,text:t,pragmas:r,comments:s}}function Xs(t){let{pragmas:e}=Js(t);return Object.prototype.hasOwnProperty.call(e,"prettier")||Object.prototype.hasOwnProperty.call(e,"format")}function Zs(t){let{shebang:e,text:n,pragmas:r,comments:s}=Js(t),i=(0,re.strip)(n),o=(0,re.print)({pragmas:{format:"",...r},comments:s.trimStart()});return(e?`${e} +`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function dc(t){return t[0].toUpperCase()+t.slice(1)}var it=class{constructor(e){this.builder=e}atrule(e,s){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(s?";":"");this.builder(r+n+i,e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(` +`)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a0&&e.nodes[s].type==="comment";)s-=1;let r=this.raw(e,"semicolon");for(let n=0;n{if(n=u.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=_i[r]),o.rawCache[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(` +`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` +`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(` +`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(` +`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(` +`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};bi.exports=it;it.default=it});var ot=y((fv,ki)=>{"use strict";var mc=zt();function os(t,e){new mc(e).stringify(t)}ki.exports=os;os.default=os});var ut=y((pv,Ei)=>{"use strict";var{isClean:Yt,my:yc}=$t(),gc=Wt(),wc=zt(),vc=ot();function as(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>as(o,s)):(i==="object"&&n!==null&&(n=as(n)),s[r]=n)}return s}var at=class{constructor(e={}){this.raws={},this[Yt]=!1,this[yc]=!0;for(let s in e)if(s==="nodes"){this.nodes=[];for(let r of e[s])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[s]=e[s]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let s=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let s in e)this[s]=e[s];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let s=as(this);for(let r in e)s[r]=e[r];return s}cloneAfter(e={}){let s=this.clone(e);return this.parent.insertAfter(this,s),s}cloneBefore(e={}){let s=this.clone(e);return this.parent.insertBefore(this,s),s}error(e,s={}){if(this.source){let{end:r,start:n}=this.rangeBy(s);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},s)}return new gc(e)}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:s==="root"?()=>e.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Yt]){this[Yt]=!1;let e=this;for(;e=e.parent;)e[Yt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,s){let r=this.source.start;if(e.index)r=this.positionInside(e.index,s);else if(e.word){s=this.toString();let n=s.indexOf(e.word);n!==-1&&(r=this.positionInside(n,s))}return r}positionInside(e,s){let r=s||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let o=0;otypeof u=="object"&&u.toJSON?u.toJSON(null,s):u);else if(typeof a=="object"&&a.toJSON)r[o]=a.toJSON(null,s);else if(o==="source"){let u=s.get(a.input);u==null&&(u=i,s.set(a.input,i),i++),r[o]={end:a.end,inputId:u,start:a.start}}else r[o]=a}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=vc){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}get proxyOf(){return this}};Ei.exports=at;at.default=at});var ct=y((hv,Si)=>{"use strict";var xc=ut(),lt=class extends xc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};Si.exports=lt;lt.default=lt});var Oe=y((dv,Ti)=>{"use strict";var _c=ut(),ft=class extends _c{constructor(e){super(e),this.type="comment"}};Ti.exports=ft;ft.default=ft});var ne=y((mv,Li)=>{"use strict";var{isClean:Ci,my:Ai}=$t(),Oi=ct(),Ni=Oe(),bc=ut(),Pi,us,ls,Ri;function Ii(t){return t.map(e=>(e.nodes&&(e.nodes=Ii(e.nodes)),delete e.source,e))}function qi(t){if(t[Ci]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)qi(e)}var z=class t extends bc{append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Oi(e)]}else if(e.selector)e=[new us(e)];else if(e.name)e=[new ls(e)];else if(e.text)e=[new Ni(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[Ai]||t.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[Ci]&&qi(n),typeof n.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(n.raws.before=s.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let s of e){let r=this.normalize(s,this.first,"prepend").reverse();for(let n of r)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(e,s,r){return r||(r=s,s={}),this.walkDecls(n=>{s.props&&!s.props.includes(n.prop)||s.fast&&!n.value.includes(s.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((s,r)=>{let n;try{n=e(s,r)}catch(i){throw s.addToError(i)}return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkAtRules(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="atrule"&&e.test(r.name))return s(r,n)}):this.walk((r,n)=>{if(r.type==="atrule"&&r.name===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="atrule")return s(r,n)}))}walkComments(e){return this.walk((s,r)=>{if(s.type==="comment")return e(s,r)})}walkDecls(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="decl"&&e.test(r.prop))return s(r,n)}):this.walk((r,n)=>{if(r.type==="decl"&&r.prop===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="decl")return s(r,n)}))}walkRules(e,s){return s?e instanceof RegExp?this.walk((r,n)=>{if(r.type==="rule"&&e.test(r.selector))return s(r,n)}):this.walk((r,n)=>{if(r.type==="rule"&&r.selector===e)return s(r,n)}):(s=e,this.walk((r,n)=>{if(r.type==="rule")return s(r,n)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};z.registerParse=t=>{Pi=t};z.registerRule=t=>{us=t};z.registerAtRule=t=>{ls=t};z.registerRoot=t=>{Ri=t};Li.exports=z;z.default=z;z.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,ls.prototype):t.type==="rule"?Object.setPrototypeOf(t,us.prototype):t.type==="decl"?Object.setPrototypeOf(t,Oi.prototype):t.type==="comment"?Object.setPrototypeOf(t,Ni.prototype):t.type==="root"&&Object.setPrototypeOf(t,Ri.prototype),t[Ai]=!0,t.nodes&&t.nodes.forEach(e=>{z.rebuild(e)})}});var Ht=y((yv,Mi)=>{"use strict";var Vt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Gt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,kc=/.[\r\n"'(/\\]/,Di=/[\da-f]/i;Mi.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,a,u,c,f,p,l,g,x,h=r.length,d=0,m=[],_=[];function w(){return d}function v($){throw e.error("Unclosed "+$,d)}function R(){return _.length===0&&d>=h}function F($){if(_.length)return _.pop();if(d>=h)return;let T=$?$.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case 10:case 32:case 9:case 13:case 12:{o=d;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);x=["space",r.slice(d,o)],d=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let C=String.fromCharCode(i);x=[C,C,d];break}case 40:{if(l=m.length?m.pop()[1]:"",g=r.charCodeAt(d+1),l==="url"&&g!==39&&g!==34&&g!==32&&g!==10&&g!==9&&g!==12&&g!==13){o=d;do{if(f=!1,o=r.indexOf(")",o+1),o===-1)if(n||T){o=d;break}else v("bracket");for(p=o;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);x=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),u=r.slice(d,o+1),o===-1||kc.test(u)?x=["(","(",d]:(x=["brackets",u,d,o],d=o);break}case 39:case 34:{a=i===39?"'":'"',o=d;do{if(f=!1,o=r.indexOf(a,o+1),o===-1)if(n||T){o=d+1;break}else v("string");for(p=o;r.charCodeAt(p-1)===92;)p-=1,f=!f}while(f);x=["string",r.slice(d,o+1),d,o],d=o;break}case 64:{Vt.lastIndex=d+1,Vt.test(r),Vt.lastIndex===0?o=r.length-1:o=Vt.lastIndex-2,x=["at-word",r.slice(d,o+1),d,o],d=o;break}case 92:{for(o=d,c=!0;r.charCodeAt(o+1)===92;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(o+=1,Di.test(r.charAt(o)))){for(;Di.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===32&&(o+=1)}x=["word",r.slice(d,o+1),d,o],d=o;break}default:{i===47&&r.charCodeAt(d+1)===42?(o=r.indexOf("*/",d+2)+1,o===0&&(n||T?o=r.length:v("comment")),x=["comment",r.slice(d,o+1),d,o],d=o):(Gt.lastIndex=d+1,Gt.test(r),Gt.lastIndex===0?o=r.length-1:o=Gt.lastIndex-2,x=["word",r.slice(d,o+1),d,o],m.push(x),d=o);break}}return d++,x}function K($){_.push($)}return{back:K,endOfFile:R,nextToken:F,position:w}}});var Kt=y((gv,Ui)=>{"use strict";var Bi=ne(),Ne=class extends Bi{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};Ui.exports=Ne;Ne.default=Ne;Bi.registerAtRule(Ne)});var Pe=y((wv,zi)=>{"use strict";var Fi=ne(),$i,Wi,ie=class extends Fi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new $i(new Wi,this,e).stringify()}};ie.registerLazyResult=t=>{$i=t};ie.registerProcessor=t=>{Wi=t};zi.exports=ie;ie.default=ie;Fi.registerRoot(ie)});var cs=y((vv,Yi)=>{"use strict";var pt={comma(t){return pt.split(t,[","],!0)},space(t){let e=[" ",` +`," "];return pt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,a=!1,u="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:a?f===u&&(a=!1):f==='"'||f==="'"?(a=!0,u=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};Yi.exports=pt;pt.default=pt});var Qt=y((xv,Gi)=>{"use strict";var Vi=ne(),Ec=cs(),Re=class extends Vi{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ec.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};Gi.exports=Re;Re.default=Re;Vi.registerRule(Re)});var jt=y((_v,Qi)=>{"use strict";var Sc=ct(),Tc=Ht(),Cc=Oe(),Ac=Kt(),Oc=Pe(),Hi=Qt(),Ki={empty:!0,space:!0};function Nc(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var fs=class{constructor(e){this.input=e,this.root=new Oc,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new Ac;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,a=!1,u=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(u.length>0){for(i=u.length-1,n=u[i];n&&n[0]==="space";)n=u[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else u.push(e);else u.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(s.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(s,"params",u),o&&(e=u[u.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,a]of e.entries()){if(r=a,n=r[0],n==="("&&(s+=1),n===")"&&(s-=1),s===0&&n===":")if(!i)this.doubleColon(r);else{if(i[0]==="word"&&i[1]==="progid")continue;return o}i=r}return!1}comment(e){let s=new Cc;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3]}}createTokenizer(){this.tokenizer=Tc(this.input)}decl(e,s){let r=new Sc;this.init(r,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||Nc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){r.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(i=e[c],i[1].toLowerCase()==="!important"){r.important=!0;let f=this.stringFrom(e,c);f=this.spacesFromEnd(e)+f,f!==" !important"&&(r.raws.important=f);break}else if(i[1].toLowerCase()==="important"){let f=e.slice(0),p="";for(let l=c;l>0;l--){let g=f[l][0];if(p.trim().indexOf("!")===0&&g!=="space")break;p=f.pop()[1]+p}p.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=p,e=f)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),s),r.value.includes(":")&&!s&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let s=new Hi;this.init(s,e[2]),s.selector="",s.raws.between="",this.current=s}end(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=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){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,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let s=this.current.nodes[this.current.nodes.length-1];s&&s.type==="rule"&&!s.raws.ownSemicolon&&(s.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let s=this.input.fromOffset(e);return{column:s.col,line:s.line,offset:e}}init(e,s){this.current.push(e),e.source={input:this.input,start:this.getPosition(s)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let s=!1,r=null,n=!1,i=null,o=[],a=e[1].startsWith("--"),u=[],c=e;for(;c;){if(r=c[0],u.push(c),r==="("||r==="[")i||(i=c),o.push(r==="("?")":"]");else if(a&&n&&r==="{")i||(i=c),o.push("}");else if(o.length===0)if(r===";")if(n){this.decl(u,a);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),s=!0;break}else r===":"&&(n=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(s=!0),o.length>0&&this.unclosedBracket(i),s&&n){if(!a)for(;u.length&&(c=u[u.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,a)}else this.unknownWord(u)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[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);break}this.endFile()}precheckMissedSemicolon(){}raw(e,s,r,n){let i,o,a=r.length,u="",c=!0,f,p;for(let l=0;lg+x[1],"");e.raws[s]={raw:l,value:u}}e[s]=u}rule(e){e.pop();let s=new Hi;this.init(s,e[0][2]),s.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(s,"selector",e),this.current=s}spacesAndCommentsFromEnd(e){let s,r="";for(;e.length&&(s=e[e.length-1][0],!(s!=="space"&&s!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let s,r="";for(;e.length&&(s=e[0][0],!(s!=="space"&&s!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let s,r="";for(;e.length&&(s=e[e.length-1][0],s==="space");)r=e.pop()[1]+r;return r}stringFrom(e,s){let r="";for(let n=s;n{});var Xi=y((Ev,Ji)=>{var Pc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Rc=(t,e=21)=>(s=e)=>{let r="",n=s;for(;n--;)r+=t[Math.random()*t.length|0];return r},Ic=(t=21)=>{let e="",s=t;for(;s--;)e+=Pc[Math.random()*64|0];return e};Ji.exports={nanoid:Ic,customAlphabet:Rc}});var ps=y((Sv,Zi)=>{Zi.exports=class{}});var qe=y((Cv,so)=>{"use strict";var{SourceMapConsumer:qc,SourceMapGenerator:Lc}=ji(),{fileURLToPath:eo,pathToFileURL:Jt}={},{isAbsolute:ms,resolve:ys}={},{nanoid:Dc}=Xi(),hs=is(),to=Wt(),Mc=ps(),ds=Symbol("fromOffsetCache"),Bc=!!(qc&&Lc),ro=!!(ys&&ms),Ie=class{constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,s.from&&(!ro||/^\w+:\/\//.test(s.from)||ms(s.from)?this.file=s.from:this.file=ys(s.from)),ro&&Bc){let r=new Mc(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,a;if(s&&typeof s=="object"){let c=s,f=r;if(typeof c.offset=="number"){let p=this.fromOffset(c.offset);s=p.line,r=p.col}else s=c.line,r=c.column;if(typeof f.offset=="number"){let p=this.fromOffset(f.offset);o=p.line,a=p.col}else o=f.line,a=f.column}else if(!r){let c=this.fromOffset(s);s=c.line,r=c.col}let u=this.origin(s,r,o,a);return u?i=new to(e,u.endLine===void 0?u.line:{column:u.column,line:u.line},u.endLine===void 0?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,n.plugin):i=new to(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:a,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:a,endLine:o,line:s,source:this.css},this.file&&(Jt&&(i.input.url=Jt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let s,r;if(this[ds])r=this[ds];else{let i=this.css.split(` +`);r=new Array(i.length);let o=0;for(let a=0,u=i.length;a=s)n=r.length-1;else{let i=r.length-2,o;for(;n>1),e=r[o+1])n=o+1;else{n=o;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ys(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s,line:e});if(!o.source)return!1;let a;typeof r=="number"&&(a=i.originalPositionFor({column:n,line:r}));let u;ms(o.source)?u=Jt(o.source):u=new URL(o.source,this.map.consumer().sourceRoot||Jt(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:u.toString()};if(u.protocol==="file:")if(eo)c.file=eo(u);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};so.exports=Ie;Ie.default=Ie;hs&&hs.registerInput&&hs.registerInput(Ie)});var ht=y((Av,no)=>{"use strict";var Uc=ne(),Fc=jt(),$c=qe();function Xt(t,e){let s=new $c(t,e),r=new Fc(s);try{r.parse()}catch(n){throw n}return r.root}no.exports=Xt;Xt.default=Xt;Uc.registerParse(Xt)});var io=y((Ov,gs)=>{var Wc=Ht(),zc=qe();gs.exports={isInlineComment(t){if(t[0]==="word"&&t[1].slice(0,2)==="//"){let e=t,s=[],r,n;for(;t;){if(/\r?\n/.test(t[1])){if(/['"].*\r?\n/.test(t[1])){s.push(t[1].substring(0,t[1].indexOf(` +`))),n=t[1].substring(t[1].indexOf(` +`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new zc(n),this.tokenizer=Wc(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),gs.exports.isInlineComment.bind(this)(t)}return!1}}});var ao=y((Nv,oo)=>{oo.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(a=>a[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var lo=y((Pv,uo)=>{var Yc=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,Vc=/\.[0-9]/,Gc=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&Yc.test(e)===!1&&Vc.test(e)===!1};uo.exports={isMixinToken:Gc}});var fo=y((Rv,co)=>{var Hc=Ht(),Kc=/^url\((.+)\)/;co.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=Hc({css:s});for(t.filename=s.replace(Kc,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var yo=y((Iv,mo)=>{var po=/:$/,ho=/^:(\s+)?/;mo.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(po.test(e)){let[r]=e.match(po);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if(ho.test(s)){let[r]=s.match(ho);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var vo=y((Lv,wo)=>{var Qc=Oe(),jc=jt(),{isInlineComment:Jc}=io(),{interpolation:go}=ao(),{isMixinToken:Xc}=lo(),Zc=fo(),ef=yo(),tf=/(!\s*important)$/i;wo.exports=class extends jc{constructor(...e){super(...e),this.lastNode=null}atrule(e){go.bind(this)(e)||(super.atrule(e),Zc(this.lastNode),ef(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(a=>a[0]==="("),r=e.reverse().find(a=>a[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(a=>a[1]).join("");for(let a of e.reverse())this.tokenizer.back(a);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new Qc,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((n<0||n>3)&&i>0){let c=e.reduce((w,v,R)=>v[0]===")"?R:w),p=e.slice(i,c+i).map(w=>w[1]).join(""),[l]=e.slice(i),g=[l[2],l[3]],[x]=e.slice(c,c+1),h=[x[2],x[3]],d=["brackets",p].concat(g,h),m=e.slice(0,i),_=e.slice(c+1);e=m,e.push(d),e=e.concat(_)}let a=[];for(let c of e)if((c[1]==="!"||a.length)&&a.push(c),c[1]==="important")break;if(a.length){let[c]=a,f=e.indexOf(c),p=a[a.length-1],l=[c[2],c[3]],g=[p[4],p[5]],h=["word",a.map(d=>d[1]).join("")].concat(l,g);e.splice(f,a.length,h)}let u=e.findIndex(c=>tf.test(c[1]));u>0&&([,o]=e[u],e.splice(u,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){Jc.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),go.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(Xc(s)){this.mixin(e);return}super.unknownWord(e)}}});var _o=y((Mv,xo)=>{var rf=zt();xo.exports=class extends rf{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let a=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+a,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var bo=y((Bv,ws)=>{var sf=qe(),nf=vo(),of=_o();ws.exports={parse(t,e){let s=new sf(t,e),r=new nf(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndexOf(n.source.input.css);if(i===0)return;if(i+n.source.input.css.length!==s.css.length)throw new Error("Invalid state detected in postcss-less");let o=i+n.source.start.offset,a=s.fromOffset(i+n.source.start.offset);if(n.source.start={offset:o,line:a.line,column:a.col},n.source.end){let u=i+n.source.end.offset,c=s.fromOffset(i+n.source.end.offset);n.source.end={offset:u,line:c.line,column:c.col}}}),r.root},stringify(t,e){new of(e).stringify(t)},nodeToString(t){let e="";return ws.exports.stringify(t,s=>{e+=s}),e}}});var vs=y((Uv,ko)=>{ko.exports=class{generate(){}}});var Zt=y(($v,To)=>{"use strict";var af=ne(),Eo,So,ye=class extends af{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Eo(new So,this,e).stringify()}};ye.registerLazyResult=t=>{Eo=t};ye.registerProcessor=t=>{So=t};To.exports=ye;ye.default=ye});var xs=y((Wv,Ao)=>{"use strict";var Co={};Ao.exports=function(e){Co[e]||(Co[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))}});var _s=y((zv,Oo)=>{"use strict";var dt=class{constructor(e,s={}){if(this.type="warning",this.text=e,s.node&&s.node.source){let r=s.node.rangeBy(s);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in s)this[r]=s[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};Oo.exports=dt;dt.default=dt});var er=y((Yv,No)=>{"use strict";var uf=_s(),mt=class{constructor(e,s,r){this.processor=e,this.messages=[],this.root=s,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let r=new uf(e,s);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};No.exports=mt;mt.default=mt});var Es=y((Gv,qo)=>{"use strict";var{isClean:H,my:lf}=$t(),cf=vs(),ff=ot(),pf=ne(),hf=Zt(),Vv=xs(),Po=er(),df=ht(),mf=Pe(),yf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gf={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},wf={Once:!0,postcssPlugin:!0,prepare:!0},Le=0;function yt(t){return typeof t=="object"&&typeof t.then=="function"}function Io(t){let e=!1,s=yf[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,Le,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,Le,s+"Exit"]:[s,s+"Exit"]}function Ro(t){let e;return t.type==="document"?e=["Document",Le,"DocumentExit"]:t.type==="root"?e=["Root",Le,"RootExit"]:e=Io(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function bs(t){return t[H]=!1,t.nodes&&t.nodes.forEach(e=>bs(e)),t}var ks={},oe=class t{constructor(e,s,r){this.stringified=!1,this.processed=!1;let n;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))n=bs(s);else if(s instanceof t||s instanceof Po)n=bs(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let i=df;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{n=i(s,r)}catch(o){this.processed=!0,this.error=o}n&&!n[lf]&&pf.rebuild(n)}this.result=new Po(e,n,r),this.helpers={...ks,postcss:ks,result:this.result},this.plugins=this.processor.plugins.map(i=>typeof i=="object"&&i.prepare?{...i,...i.prepare(this.result)}:i)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,s){let r=this.result.lastPlugin;try{s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(s,r,n)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,n])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!gf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!wf[r])if(typeof s[r]=="object")for(let n in s[r])n==="*"?e(s,r,s[r][n]):e(s,r+"-"+n.toLowerCase(),s[r][n]);else typeof s[r]=="function"&&e(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let r=this.visitTick(s);if(yt(r))try{await r}catch(n){let i=s[s.length-1].node;throw this.handleError(n,i)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(e.type==="document"){let n=e.nodes.map(i=>r(i,this.helpers));await Promise.all(n)}else await r(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return yt(s[0])?Promise.all(s):s}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,s=ff;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let n=new cf(s,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let s=this.runOnRoot(e);if(yt(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[H];)e[H]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let s of e.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,s){return this.async().then(e,s)}toString(){return this.css}visitSync(e,s){for(let[r,n]of e){this.result.lastPlugin=r;let i;try{i=n(s,this.helpers)}catch(o){throw this.handleError(o,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(yt(i))throw this.getAsyncError()}}visitTick(e){let s=e[e.length-1],{node:r,visitors:n}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(n.length>0&&s.visitorIndex{n[H]||this.walkSync(n)});else{let n=this.listeners[r];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};oe.registerPostcss=t=>{ks=t};qo.exports=oe;oe.default=oe;mf.registerLazyResult(oe);hf.registerLazyResult(oe)});var Do=y((Kv,Lo)=>{"use strict";var vf=vs(),xf=ot(),Hv=xs(),_f=ht(),bf=er(),gt=class{constructor(e,s,r){s=s.toString(),this.stringified=!1,this._processor=e,this._css=s,this._opts=r,this._map=void 0;let n,i=xf;this.result=new bf(this._processor,n,this._opts),this.result.css=s;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new vf(i,n,this._opts,s);if(a.isMap()){let[u,c]=a.generate();u&&(this.result.css=u),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,s){return this.async().then(e,s)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,s=_f;try{e=s(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};Lo.exports=gt;gt.default=gt});var Bo=y((Qv,Mo)=>{"use strict";var kf=Do(),Ef=Es(),Sf=Zt(),Tf=Pe(),ge=class{constructor(e=[]){this.version="8.4.33",this.plugins=this.normalize(e)}normalize(e){let s=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))s=s.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)s.push(r);else if(typeof r=="function")s.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return s}process(e,s={}){return!this.plugins.length&&!s.parser&&!s.stringifier&&!s.syntax?new kf(this,e,s):new Ef(this,e,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};Mo.exports=ge;ge.default=ge;Tf.registerProcessor(ge);Sf.registerProcessor(ge)});var Fo=y((jv,Uo)=>{"use strict";var Cf=ct(),Af=ps(),Of=Oe(),Nf=Kt(),Pf=qe(),Rf=Pe(),If=Qt();function wt(t,e){if(Array.isArray(t))return t.map(n=>wt(n));let{inputs:s,...r}=t;if(s){e=[];for(let n of s){let i={...n,__proto__:Pf.prototype};i.map&&(i.map={...i.map,__proto__:Af.prototype}),e.push(i)}}if(r.nodes&&(r.nodes=t.nodes.map(n=>wt(n,e))),r.source){let{inputId:n,...i}=r.source;r.source=i,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Rf(r);if(r.type==="decl")return new Cf(r);if(r.type==="rule")return new If(r);if(r.type==="comment")return new Of(r);if(r.type==="atrule")return new Nf(r);throw new Error("Unknown node type: "+t.type)}Uo.exports=wt;wt.default=wt});var tr=y((Jv,Ho)=>{"use strict";var qf=Wt(),$o=ct(),Lf=Es(),Df=ne(),Ss=Bo(),Mf=ot(),Bf=Fo(),Wo=Zt(),Uf=_s(),zo=Oe(),Yo=Kt(),Ff=er(),$f=qe(),Wf=ht(),zf=cs(),Vo=Qt(),Go=Pe(),Yf=ut();function b(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Ss(t)}b.plugin=function(e,s){let r=!1;function n(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: +https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let a=s(...o);return a.postcssPlugin=e,a.postcssVersion=new Ss().version,a}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,a,u){return b([n(u)]).process(o,a)},n};b.stringify=Mf;b.parse=Wf;b.fromJSON=Bf;b.list=zf;b.comment=t=>new zo(t);b.atRule=t=>new Yo(t);b.decl=t=>new $o(t);b.rule=t=>new Vo(t);b.root=t=>new Go(t);b.document=t=>new Wo(t);b.CssSyntaxError=qf;b.Declaration=$o;b.Container=Df;b.Processor=Ss;b.Document=Wo;b.Comment=zo;b.Warning=Uf;b.AtRule=Yo;b.Result=Ff;b.Input=$f;b.Rule=Vo;b.Root=Go;b.Node=Yf;Lf.registerPostcss(b);Ho.exports=b;b.default=b});var Qo=y((Xv,Ko)=>{var{Container:Vf}=tr(),Ts=class extends Vf{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};Ko.exports=Ts});var Xo=y((Zv,Jo)=>{"use strict";var rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Gf=/.[\r\n"'(/\\]/,jo=/[\da-f]/i,nr=/[\n\f\r]/g;Jo.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,a,u,c,f,p,l,g,x=r.length,h=0,d=[],m=[],_;function w(){return h}function v(T){throw e.error("Unclosed "+T,h)}function R(){return m.length===0&&h>=x}function F(){let T=1,C=!1,A=!1;for(;T>0;)o+=1,r.length<=o&&v("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),C?!A&&i===C?(C=!1,A=!1):i===92?A=!A:A&&(A=!1):i===39||i===34?C=i:i===125?T-=1:i===35&&l===123&&(T+=1)}function K(T){if(m.length)return m.pop();if(h>=x)return;let C=T?T.ignoreUnclosed:!1;switch(i=r.charCodeAt(h),i){case 10:case 32:case 9:case 13:case 12:{o=h;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);g=["space",r.slice(h,o)],h=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let A=String.fromCharCode(i);g=[A,A,h];break}case 44:{g=["word",",",h,h+1];break}case 40:{if(p=d.length?d.pop()[1]:"",l=r.charCodeAt(h+1),p==="url"&&l!==39&&l!==34){for(_=1,f=!1,o=h+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===92)f=!f;else if(l===40)_+=1;else if(l===41&&(_-=1,_===0))break;o+=1}u=r.slice(h,o+1),g=["brackets",u,h,o],h=o}else o=r.indexOf(")",h+1),u=r.slice(h,o+1),o===-1||Gf.test(u)?g=["(","(",h]:(g=["brackets",u,h,o],h=o);break}case 39:case 34:{for(a=i,o=h,f=!1;o{var{Comment:Hf}=tr(),Kf=jt(),Qf=Qo(),jf=Xo(),Cs=class extends Kf{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new Hf;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=jf(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,a)=>{if(a[0]==="comment"&&a[4]==="inline"){let u=a[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+u+"*/"}else return o+a[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(` +`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new Qf;this.init(i,e[0][2]);let o;for(let u=e.length-1;u>=0;u--)if(e[u][0]!=="space"){o=e[u];break}if(o[3]){let u=this.input.fromOffset(o[3]);i.source.end={column:u.col,line:u.line,offset:o[3]+1}}else{let u=this.input.fromOffset(o[2]);i.source.end={column:u.col,line:u.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let u=this.input.fromOffset(e[0][2]);i.source.start={column:u.col,line:u.line,offset:e[0][2]}}for(i.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let a;for(;e.length;)if(a=e.shift(),a[0]===":"){i.raws.between+=a[1];break}else i.raws.between+=a[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let u=e.length-1;u>0;u--){if(a=e[u],a[1]==="!important"){i.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(a[1]==="important"){let c=e.slice(0),f="";for(let p=u;p>0;p--){let l=c[p][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(a[0]!=="space"&&a[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};Zo.exports=Cs});var ra=y((tx,ta)=>{var{Input:Jf}=tr(),Xf=ea();ta.exports=function(e,s){let r=new Jf(e,s),n=new Xf(r);return n.parse(),n.root}});var Os=y(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});function ep(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}As.default=ep});var Ps=y(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});var tp=Os(),na=rp(tp);function rp(t){return t&&t.__esModule?t:{default:t}}function vt(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}vt.prototype=Object.create(na.default.prototype);vt.constructor=na.default;vt.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.parseMediaFeature=aa;xt.parseMediaQuery=Is;xt.parseMediaList=ip;var sp=Os(),ia=oa(sp),np=Ps(),Rs=oa(np);function oa(t){return t&&t.__esModule?t:{default:t}}function aa(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,a=null,u=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),u++);for(var f=0;f0&&(s[c-1].after=i.before),i.type===void 0){if(c>0){if(s[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[c-1].value==="not"||s[c-1].value==="only"){i.type="media-type";continue}if(s[c-1].value==="and"){i.type="media-feature-expression";continue}s[c-1].type==="media-type"&&(s[c+1]?i.type=s[c+1].type==="media-feature-expression"?"keyword":"media-feature-expression":i.type="media-feature-expression")}if(c===0){if(!s[c+1]){i.type="media-type";continue}if(s[c+1]&&(s[c+1].type==="media-feature-expression"||s[c+1].type==="keyword")){i.type="media-type";continue}if(s[c+2]){if(s[c+2].type==="media-feature-expression"){i.type="media-type",s[c+1].type="keyword";continue}if(s[c+2].type==="keyword"){i.type="keyword",s[c+1].type="media-type";continue}}if(s[c+3]&&s[c+3].type==="media-feature-expression"){i.type="keyword",s[c+1].type="media-type",s[c+2].type="keyword";continue}}}return s}function ip(t){var e=[],s=0,r=0,n=/^(\s*)url\s*\(/.exec(t);if(n!==null){for(var i=n[0].length,o=1;o>0;){var a=t[i];a==="("&&o++,a===")"&&o--,i++}e.unshift(new ia.default({type:"url",value:t.substring(0,i).trim(),sourceIndex:n[1].length,before:n[1],after:/^(\s*)/.exec(t.substring(i))[1]})),s=i}for(var u=s;u{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.default=cp;var op=Ps(),ap=lp(op),up=ua();function lp(t){return t&&t.__esModule?t:{default:t}}function cp(t){return new ap.default({nodes:(0,up.parseMediaList)(t),type:"media-query-list",value:t.trim()})}});var Ds=y((cx,pa)=>{pa.exports=function(e,s){if(s=typeof s=="number"?s:1/0,!s)return Array.isArray(e)?e.map(function(n){return n}):e;return r(e,1);function r(n,i){return n.reduce(function(o,a){return Array.isArray(a)&&i{ha.exports=function(t,e){for(var s=-1,r=[];(s=t.indexOf(e,s+1))!==-1;)r.push(s);return r}});var Bs=y((px,da)=>{"use strict";function hp(t,e){for(var s=1,r=t.length,n=t[0],i=t[0],o=1;o{"use strict";ir.__esModule=!0;var ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function yp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var gp=function t(e,s){if((typeof e>"u"?"undefined":ma(e))!=="object")return e;var r=new e.constructor;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n],o=typeof i>"u"?"undefined":ma(i);n==="parent"&&o==="object"?s&&(r[n]=s):i instanceof Array?r[n]=i.map(function(a){return t(a,r)}):r[n]=t(i,r)}return r},wp=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yp(this,t);for(var s in e)this[s]=e[s];var r=e.spaces;r=r===void 0?{}:r;var n=r.before,i=n===void 0?"":n,o=r.after,a=o===void 0?"":o;this.spaces={before:i,after:a}}return t.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.prototype.replaceWith=function(){if(this.parent){for(var s in arguments)this.parent.insertBefore(this,arguments[s]);this.remove()}return this},t.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},t.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},t.prototype.clone=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=gp(this);for(var n in s)r[n]=s[n];return r},t.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join("")},t}();ir.default=wp;ya.exports=ir.default});var D=y(B=>{"use strict";B.__esModule=!0;var hx=B.TAG="tag",dx=B.STRING="string",mx=B.SELECTOR="selector",yx=B.ROOT="root",gx=B.PSEUDO="pseudo",wx=B.NESTING="nesting",vx=B.ID="id",xx=B.COMMENT="comment",_x=B.COMBINATOR="combinator",bx=B.CLASS="class",kx=B.ATTRIBUTE="attribute",Ex=B.UNIVERSAL="universal"});var ar=y((or,ga)=>{"use strict";or.__esModule=!0;var vp=function(){function t(e,s){for(var r=0;r=r&&(this.indexes[i]=n-1);return this},e.prototype.removeAll=function(){for(var i=this.nodes,r=Array.isArray(i),n=0,i=r?i:i[Symbol.iterator]();;){var o;if(r){if(n>=i.length)break;o=i[n++]}else{if(n=i.next(),n.done)break;o=n.value}var a=o;a.parent=void 0}return this.nodes=[],this},e.prototype.empty=function(){return this.removeAll()},e.prototype.insertAfter=function(r,n){var i=this.index(r);this.nodes.splice(i+1,0,n);var o=void 0;for(var a in this.indexes)o=this.indexes[a],i<=o&&(this.indexes[a]=o+this.nodes.length);return this},e.prototype.insertBefore=function(r,n){var i=this.index(r);this.nodes.splice(i,0,n);var o=void 0;for(var a in this.indexes)o=this.indexes[a],i<=o&&(this.indexes[a]=o+this.nodes.length);return this},e.prototype.each=function(r){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var n=this.lastEach;if(this.indexes[n]=0,!!this.length){for(var i=void 0,o=void 0;this.indexes[n]{"use strict";ur.__esModule=!0;var Op=ar(),Np=Rp(Op),Pp=D();function Rp(t){return t&&t.__esModule?t:{default:t}}function Ip(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qp(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Lp(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Dp=function(t){Lp(e,t);function e(s){Ip(this,e);var r=qp(this,t.call(this,s));return r.type=Pp.ROOT,r}return e.prototype.toString=function(){var r=this.reduce(function(n,i){var o=String(i);return o?n+o+",":""},"").slice(0,-1);return this.trailingComma?r+",":r},e}(Np.default);ur.default=Dp;wa.exports=ur.default});var _a=y((lr,xa)=>{"use strict";lr.__esModule=!0;var Mp=ar(),Bp=Fp(Mp),Up=D();function Fp(t){return t&&t.__esModule?t:{default:t}}function $p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wp(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function zp(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Yp=function(t){zp(e,t);function e(s){$p(this,e);var r=Wp(this,t.call(this,s));return r.type=Up.SELECTOR,r}return e}(Bp.default);lr.default=Yp;xa.exports=lr.default});var De=y((cr,ba)=>{"use strict";cr.__esModule=!0;var Vp=function(){function t(e,s){for(var r=0;r{"use strict";fr.__esModule=!0;var Zp=De(),eh=rh(Zp),th=D();function rh(t){return t&&t.__esModule?t:{default:t}}function sh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ih(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var oh=function(t){ih(e,t);function e(s){sh(this,e);var r=nh(this,t.call(this,s));return r.type=th.CLASS,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"."+this.value,this.spaces.after].join("")},e}(eh.default);fr.default=oh;ka.exports=fr.default});var Ta=y((pr,Sa)=>{"use strict";pr.__esModule=!0;var ah=we(),uh=ch(ah),lh=D();function ch(t){return t&&t.__esModule?t:{default:t}}function fh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function hh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var dh=function(t){hh(e,t);function e(s){fh(this,e);var r=ph(this,t.call(this,s));return r.type=lh.COMMENT,r}return e}(uh.default);pr.default=dh;Sa.exports=pr.default});var Aa=y((hr,Ca)=>{"use strict";hr.__esModule=!0;var mh=De(),yh=wh(mh),gh=D();function wh(t){return t&&t.__esModule?t:{default:t}}function vh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function _h(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var bh=function(t){_h(e,t);function e(s){vh(this,e);var r=xh(this,t.call(this,s));return r.type=gh.ID,r}return e.prototype.toString=function(){return[this.spaces.before,this.ns,"#"+this.value,this.spaces.after].join("")},e}(yh.default);hr.default=bh;Ca.exports=hr.default});var Na=y((dr,Oa)=>{"use strict";dr.__esModule=!0;var kh=De(),Eh=Th(kh),Sh=D();function Th(t){return t&&t.__esModule?t:{default:t}}function Ch(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ah(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Oh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Nh=function(t){Oh(e,t);function e(s){Ch(this,e);var r=Ah(this,t.call(this,s));return r.type=Sh.TAG,r}return e}(Eh.default);dr.default=Nh;Oa.exports=dr.default});var Ra=y((mr,Pa)=>{"use strict";mr.__esModule=!0;var Ph=we(),Rh=qh(Ph),Ih=D();function qh(t){return t&&t.__esModule?t:{default:t}}function Lh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Mh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Bh=function(t){Mh(e,t);function e(s){Lh(this,e);var r=Dh(this,t.call(this,s));return r.type=Ih.STRING,r}return e}(Rh.default);mr.default=Bh;Pa.exports=mr.default});var qa=y((yr,Ia)=>{"use strict";yr.__esModule=!0;var Uh=ar(),Fh=Wh(Uh),$h=D();function Wh(t){return t&&t.__esModule?t:{default:t}}function zh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Vh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Gh=function(t){Vh(e,t);function e(s){zh(this,e);var r=Yh(this,t.call(this,s));return r.type=$h.PSEUDO,r}return e.prototype.toString=function(){var r=this.length?"("+this.map(String).join(",")+")":"";return[this.spaces.before,String(this.value),r,this.spaces.after].join("")},e}(Fh.default);yr.default=Gh;Ia.exports=yr.default});var Da=y((gr,La)=>{"use strict";gr.__esModule=!0;var Hh=De(),Kh=jh(Hh),Qh=D();function jh(t){return t&&t.__esModule?t:{default:t}}function Jh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xh(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Zh(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ed=function(t){Zh(e,t);function e(s){Jh(this,e);var r=Xh(this,t.call(this,s));return r.type=Qh.ATTRIBUTE,r.raws={},r}return e.prototype.toString=function(){var r=[this.spaces.before,"[",this.ns,this.attribute];return this.operator&&r.push(this.operator),this.value&&r.push(this.value),this.raws.insensitive?r.push(this.raws.insensitive):this.insensitive&&r.push(" i"),r.push("]"),r.concat(this.spaces.after).join("")},e}(Kh.default);gr.default=ed;La.exports=gr.default});var Ba=y((wr,Ma)=>{"use strict";wr.__esModule=!0;var td=De(),rd=nd(td),sd=D();function nd(t){return t&&t.__esModule?t:{default:t}}function id(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function od(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ad(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var ud=function(t){ad(e,t);function e(s){id(this,e);var r=od(this,t.call(this,s));return r.type=sd.UNIVERSAL,r.value="*",r}return e}(rd.default);wr.default=ud;Ma.exports=wr.default});var Fa=y((vr,Ua)=>{"use strict";vr.__esModule=!0;var ld=we(),cd=pd(ld),fd=D();function pd(t){return t&&t.__esModule?t:{default:t}}function hd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function md(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var yd=function(t){md(e,t);function e(s){hd(this,e);var r=dd(this,t.call(this,s));return r.type=fd.COMBINATOR,r}return e}(cd.default);vr.default=yd;Ua.exports=vr.default});var Wa=y((xr,$a)=>{"use strict";xr.__esModule=!0;var gd=we(),wd=xd(gd),vd=D();function xd(t){return t&&t.__esModule?t:{default:t}}function _d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bd(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function kd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var Ed=function(t){kd(e,t);function e(s){_d(this,e);var r=bd(this,t.call(this,s));return r.type=vd.NESTING,r.value="&",r}return e}(wd.default);xr.default=Ed;$a.exports=xr.default});var Ya=y((_r,za)=>{"use strict";_r.__esModule=!0;_r.default=Sd;function Sd(t){return t.sort(function(e,s){return e-s})}za.exports=_r.default});var Za=y((Er,Xa)=>{"use strict";Er.__esModule=!0;Er.default=Dd;var Va=39,Td=34,Us=92,Ga=47,_t=10,Fs=32,$s=12,Ws=9,zs=13,Ha=43,Ka=62,Qa=126,ja=124,Cd=44,Ad=40,Od=41,Nd=91,Pd=93,Rd=59,Ja=42,Id=58,qd=38,Ld=64,br=/[ \n\t\r\{\(\)'"\\;/]/g,kr=/[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;function Dd(t){for(var e=[],s=t.css.valueOf(),r=void 0,n=void 0,i=void 0,o=void 0,a=void 0,u=void 0,c=void 0,f=void 0,p=void 0,l=void 0,g=void 0,x=s.length,h=-1,d=1,m=0,_=function(v,R){if(t.safe)s+=R,n=s.length-1;else throw t.error("Unclosed "+v,d,m-h,m)};m0?(f=d+a,p=n-o[a].length):(f=d,p=h),e.push(["comment",u,d,m-h,f,n-p,m]),h=p,d=f,m=n):(kr.lastIndex=m+1,kr.test(s),kr.lastIndex===0?n=s.length-1:n=kr.lastIndex-2,e.push(["word",s.slice(m,n+1),d,m-h,d,n-h,m]),m=n);break}m++}return e}Xa.exports=Er.default});var ru=y((Sr,tu)=>{"use strict";Sr.__esModule=!0;var Md=function(){function t(e,s){for(var r=0;r1?(o[0]===""&&(o[0]=!0),a.attribute=this.parseValue(o[2]),a.namespace=this.parseNamespace(o[0])):a.attribute=this.parseValue(i[0]),r=new im.default(a),i[2]){var u=i[2].split(/(\s+i\s*?)$/),c=u[0].trim();r.value=this.lossy?c:u[0],u[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=u[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new lm.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&&s.nextToken&&s.nextToken[0]==="("&&s.error("Misplaced parenthesis.")})}else this.error('Unexpected "'+this.currToken[0]+'" found.')},t.prototype.space=function(){var s=this.currToken;this.position===0||this.prevToken[0]===","||this.prevToken[0]==="("?(this.spaces=this.parseSpace(s[1]),this.position++):this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.spaces.after=this.parseSpace(s[1]),this.position++):this.combinator()},t.prototype.string=function(){var s=this.currToken;this.newNode(new tm.default({value:this.currToken[1],source:{start:{line:s[2],column:s[3]},end:{line:s[4],column:s[5]}},sourceIndex:s[6]})),this.position++},t.prototype.universal=function(s){var r=this.nextToken;if(r&&r[1]==="|")return this.position++,this.namespace();this.newNode(new am.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]}),s),this.position++},t.prototype.splitWord=function(s,r){for(var n=this,i=this.nextToken,o=this.currToken[1];i&&i[0]==="word";){this.position++;var a=this.currToken[1];if(o+=a,a.lastIndexOf("\\")===a.length-1){var u=this.nextToken;u&&u[0]==="space"&&(o+=this.parseSpace(u[1]," "),this.position++)}i=this.nextToken}var c=(0,Ys.default)(o,"."),f=(0,Ys.default)(o,"#"),p=(0,Ys.default)(o,"#{");p.length&&(f=f.filter(function(g){return!~p.indexOf(g)}));var l=(0,hm.default)((0,Wd.default)((0,Ud.default)([[0],c,f])));l.forEach(function(g,x){var h=l[x+1]||o.length,d=o.slice(g,h);if(x===0&&r)return r.call(n,d,l.length);var m=void 0;~c.indexOf(g)?m=new Hd.default({value:d.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+g},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}):~f.indexOf(g)?m=new Jd.default({value:d.slice(1),source:{start:{line:n.currToken[2],column:n.currToken[3]+g},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}):m=new Zd.default({value:d,source:{start:{line:n.currToken[2],column:n.currToken[3]+g},end:{line:n.currToken[4],column:n.currToken[3]+(h-1)}},sourceIndex:n.currToken[6]+l[x]}),n.newNode(m,s)}),this.position++},t.prototype.word=function(s){var r=this.nextToken;return r&&r[1]==="|"?(this.position++,this.namespace()):this.splitWord(s)},t.prototype.loop=function(){for(;this.position{"use strict";Tr.__esModule=!0;var xm=function(){function t(e,s){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=new bm.default({css:s,error:function(o){throw new Error(o)},options:r});return this.res=n,this.func(n),this},xm(t,[{key:"result",get:function(){return String(this.res)}}]),t}();Tr.default=Sm;su.exports=Tr.default});var Y=y((Ox,ou)=>{"use strict";var Gs=function(t,e){let s=new t.constructor;for(let r in t){if(!t.hasOwnProperty(r))continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:n instanceof Array?s[r]=n.map(o=>Gs(o,s)):r!=="before"&&r!=="after"&&r!=="between"&&r!=="semicolon"&&(i==="object"&&n!==null&&(n=Gs(n)),s[r]=n)}return s};ou.exports=class{constructor(e){e=e||{},this.raws={before:"",after:""};for(let s in e)this[s]=e[s]}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 s=Gs(this);for(let r in e)s[r]=e[r];return s}cloneBefore(e){e=e||{};let s=this.clone(e);return this.parent.insertBefore(this,s),s}cloneAfter(e){e=e||{};let s=this.clone(e);return this.parent.insertAfter(this,s),s}replaceWith(){let e=Array.prototype.slice.call(arguments);if(this.parent){for(let s of e)this.parent.insertBefore(this,s);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 s in this){if(!this.hasOwnProperty(s)||s==="parent")continue;let r=this[s];r instanceof Array?e[s]=r.map(n=>typeof n=="object"&&n.toJSON?n.toJSON():n):typeof r=="object"&&r.toJSON?e[s]=r.toJSON():e[s]=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 s=this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i{"use strict";var Cm=Y(),Me=class extends Cm{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 s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}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 s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-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 typeof e=="number"?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}};Me.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!Me.prototype[e]&&(Me.prototype[e]=function(s){return this.walkType(t,s)})};au.exports=Me});var lu=y((Rx,uu)=>{"use strict";var Am=U();uu.exports=class extends Am{constructor(e){super(e),this.type="root"}}});var fu=y((qx,cu)=>{"use strict";var Om=U();cu.exports=class extends Om{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var du=y((Lx,hu)=>{"use strict";var pu=U(),Cr=class extends pu{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};pu.registerWalker(Cr);hu.exports=Cr});var yu=y((Dx,mu)=>{"use strict";var Nm=U(),Pm=Y(),Ar=class extends Pm{constructor(e){super(e),this.type="colon"}};Nm.registerWalker(Ar);mu.exports=Ar});var wu=y((Mx,gu)=>{"use strict";var Rm=U(),Im=Y(),Or=class extends Im{constructor(e){super(e),this.type="comma"}};Rm.registerWalker(Or);gu.exports=Or});var xu=y((Bx,vu)=>{"use strict";var qm=U(),Lm=Y(),Nr=class extends Lm{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("")}};qm.registerWalker(Nr);vu.exports=Nr});var ku=y((Ux,bu)=>{"use strict";var _u=U(),Pr=class extends _u{constructor(e){super(e),this.type="func",this.unbalanced=-1}};_u.registerWalker(Pr);bu.exports=Pr});var Su=y((Fx,Eu)=>{"use strict";var Dm=U(),Mm=Y(),Rr=class extends Mm{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("")}};Dm.registerWalker(Rr);Eu.exports=Rr});var Cu=y(($x,Tu)=>{"use strict";var Bm=U(),Um=Y(),Ir=class extends Um{constructor(e){super(e),this.type="operator"}};Bm.registerWalker(Ir);Tu.exports=Ir});var Ou=y((Wx,Au)=>{"use strict";var Fm=U(),$m=Y(),qr=class extends $m{constructor(e){super(e),this.type="paren",this.parenType=""}};Fm.registerWalker(qr);Au.exports=qr});var Pu=y((zx,Nu)=>{"use strict";var Wm=U(),zm=Y(),Lr=class extends zm{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("")}};Wm.registerWalker(Lr);Nu.exports=Lr});var Iu=y((Yx,Ru)=>{"use strict";var Ym=U(),Vm=Y(),Dr=class extends Vm{constructor(e){super(e),this.type="word"}};Ym.registerWalker(Dr);Ru.exports=Dr});var Lu=y((Vx,qu)=>{"use strict";var Gm=U(),Hm=Y(),Mr=class extends Hm{constructor(e){super(e),this.type="unicode-range"}};Gm.registerWalker(Mr);qu.exports=Mr});var Mu=y((Gx,Du)=>{"use strict";var Hs=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while tokzenizing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};Du.exports=Hs});var Fu=y((Hx,Uu)=>{"use strict";var Br=/[ \n\t\r\{\(\)'"\\;,/]/g,Km=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g,Be=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g,Qm=/^[a-z0-9]/i,jm=/^[a-f0-9?\-]/i,Bu=Mu();Uu.exports=function(e,s){s=s||{};let r=[],n=e.valueOf(),i=n.length,o=-1,a=1,u=0,c=0,f=null,p,l,g,x,h,d,m,_,w,v,R,F;function K(T){let C=`Unclosed ${T} at line: ${a}, column: ${u-o}, token: ${u}`;throw new Bu(C)}function $(){let T=`Syntax error at line: ${a}, column: ${u-o}, token: ${u}`;throw new Bu(T)}for(;u0&&r[r.length-1][0]==="word"&&r[r.length-1][1]==="url",r.push(["(","(",a,u-o,a,l-o,u]);break;case 41:c--,f=f&&c>0,r.push([")",")",a,u-o,a,l-o,u]);break;case 39:case 34:g=p===39?"'":'"',l=u;do for(v=!1,l=n.indexOf(g,l+1),l===-1&&K("quote",g),R=l;n.charCodeAt(R-1)===92;)R-=1,v=!v;while(v);r.push(["string",n.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case 64:Br.lastIndex=u+1,Br.test(n),Br.lastIndex===0?l=n.length-1:l=Br.lastIndex-2,r.push(["atword",n.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case 92:l=u,p=n.charCodeAt(l+1),m&&p!==47&&p!==32&&p!==10&&p!==9&&p!==13&&p!==12&&(l+=1),r.push(["word",n.slice(u,l+1),a,u-o,a,l-o,u]),u=l;break;case 43:case 45:case 42:l=u+1,F=n.slice(u+1,l+1);let T=n.slice(u-1,u);if(p===45&&F.charCodeAt(0)===45){l++,r.push(["word",n.slice(u,l),a,u-o,a,l-o,u]),u=l-1;break}r.push(["operator",n.slice(u,l),a,u-o,a,l-o,u]),u=l-1;break;default:if(p===47&&(n.charCodeAt(u+1)===42||s.loose&&!f&&n.charCodeAt(u+1)===47)){if(n.charCodeAt(u+1)===42)l=n.indexOf("*/",u+2)+1,l===0&&K("comment","*/");else{let A=n.indexOf(` +`,u+2);l=A!==-1?A-1:i}d=n.slice(u,l+1),x=d.split(` +`),h=x.length-1,h>0?(_=a+h,w=l-x[h].length):(_=a,w=o),r.push(["comment",d,a,u-o,_,l-w,u]),o=w,a=_,u=l}else if(p===35&&!Qm.test(n.slice(u+1,u+2)))l=u+1,r.push(["#",n.slice(u,l),a,u-o,a,l-o,u]),u=l-1;else if((p===117||p===85)&&n.charCodeAt(u+1)===43){l=u+2;do l+=1,p=n.charCodeAt(l);while(l=48&&p<=57&&(C=Be),C.lastIndex=u+1,C.test(n),C.lastIndex===0?l=n.length-1:l=C.lastIndex-2,C===Be||p===46){let A=n.charCodeAt(l),ve=n.charCodeAt(l+1),Zs=n.charCodeAt(l+2);(A===101||A===69)&&(ve===45||ve===43)&&Zs>=48&&Zs<=57&&(Be.lastIndex=l+2,Be.test(n),Be.lastIndex===0?l=n.length-1:l=Be.lastIndex-2)}r.push(["word",n.slice(u,l+1),a,u-o,a,l-o,u]),u=l}break}u++}return r}});var Wu=y((Kx,$u)=>{"use strict";var Ks=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};$u.exports=Ks});var Gu=y((jx,Vu)=>{"use strict";var Jm=lu(),Xm=fu(),Zm=du(),ey=yu(),ty=wu(),ry=xu(),sy=ku(),ny=Su(),iy=Cu(),zu=Ou(),oy=Pu(),Yu=Iu(),ay=Lu(),uy=Fu(),ly=Ds(),cy=Ms(),fy=Bs(),py=Wu();function hy(t){return t.sort((e,s)=>e-s)}Vu.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new Jm;let n=new Xm;this.root.append(n),this.current=n,this.tokens=uy(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new ey({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 ty({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=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new ry({value:s,inline:e,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(r),this.position++}error(e,s){throw new py(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new iy({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(s)}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();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s=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 ay({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=this.nextToken,s=this.currToken[1],r=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/,n=/^(?!\#([a-z0-9]+))[\#\{\}]/gi,i,o;if(!n.test(s))for(;e&&e[0]==="word";){this.position++;let a=this.currToken[1];s+=a,e=this.nextToken}i=cy(s,"@"),o=hy(fy(ly([[0],i]))),o.forEach((a,u)=>{let c=o[u+1]||s.length,f=s.slice(a,c),p;if(~i.indexOf(a))p=new Zm({value:f.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u]});else if(r.test(this.currToken[1])){let l=f.replace(r,"");p=new ny({value:f.replace(l,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u],unit:l})}else p=new(e&&e[0]==="("?sy:Yu)({value:f,source:{start:{line:this.currToken[2],column:this.currToken[3]+a},end:{line:this.currToken[4],column:this.currToken[3]+(c-1)}},sourceIndex:this.currToken[6]+o[u]}),p.type==="word"?(p.isHex=/^#(.+)/.test(f),p.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(p)}),this.position++}string(){let e=this.currToken,s=this.currToken[1],r=/^(\"|\')/,n=r.test(s),i="",o;n&&(i=s.match(r)[0],s=s.slice(1,s.length-1)),o=new oy({value:s,source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6],quoted:n}),o.raws.quote=i,this.newNode(o),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]}}});var Xs={};en(Xs,{languages:()=>hi,options:()=>mi,parsers:()=>Js,printers:()=>Oy});var dl=(t,e,s,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(s,r):s.global?e.replace(s,r):e.split(s).join(r)},E=dl;var Ue="string",Fe="array",$e="cursor",xe="indent",_e="align",We="trim",be="group",ee="fill",le="if-break",ze="indent-if-break",Ye="line-suffix",Ve="line-suffix-boundary",Q="line",Ge="label",ke="break-parent",bt=new Set([$e,xe,_e,We,be,ee,le,ze,Ye,Ve,Q,Ge,ke]);function ml(t){if(typeof t=="string")return Ue;if(Array.isArray(t))return Fe;if(!t)return;let{type:e}=t;if(bt.has(e))return e}var He=ml;var yl=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function gl(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +Expected it to be 'string' or 'object'.`;if(He(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=yl([...bt].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'. +Expected it to be ${r}.`}var Wr=class extends Error{name="InvalidDocError";constructor(e){super(gl(e)),this.doc=e}},zr=Wr;var tn=()=>{},ce=tn,kt=tn;function q(t){return ce(t),{type:xe,contents:t}}function rn(t,e){return ce(e),{type:_e,contents:e,n:t}}function L(t,e={}){return ce(t),kt(e.expandedStates,!0),{type:be,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function sn(t){return rn({type:"root"},t)}function fe(t){return rn(-1,t)}function Ke(t){return kt(t),{type:ee,parts:t}}function Et(t,e="",s={}){return ce(t),e!==""&&ce(e),{type:le,breakContents:t,flatContents:e,groupId:s.groupId}}var Qe={type:ke};var wl={type:Q,hard:!0};var O={type:Q},M={type:Q,soft:!0},k=[wl,Qe];function V(t,e){ce(t),kt(e);let s=[];for(let r=0;r{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[s<0?e.length+s:s]:e.at(s)},G=vl;var nn=t=>{if(Array.isArray(t))return t;if(t.type!==ee)throw new Error(`Expect doc to be 'array' or '${ee}'.`);return t.parts};function xl(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){if(s.has(i))return s.get(i);let o=n(i);return s.set(i,o),o}function n(i){switch(He(i)){case Fe:return e(i.map(r));case ee:return e({...i,parts:i.parts.map(r)});case le:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case be:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case _e:case xe:case ze:case Ge:case Ye:return e({...i,contents:r(i.contents)});case Ue:case $e:case We:case Ve:case Q:case ke:return e(i);default:throw new zr(i)}}}function _l(t){return t.type===Q&&!t.hard?t.soft?"":" ":t.type===le?t.flatContents:t}function on(t){return xl(t,_l)}function bl(t){return Array.isArray(t)&&t.length>0}var te=bl;var St="'",an='"';function kl(t,e){let s=e===!0||e===St?St:an,r=s===St?an:St,n=0,i=0;for(let o of t)o===s?n++:o===r&&i++;return n>i?r:s}var un=kl;function El(t,e,s){let r=e==='"'?"'":'"',i=E(!1,t,/\\(.)|(["'])/gs,(o,a,u)=>a===r?a:u===e?"\\"+u:u||(s&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(a)?a:"\\"+a));return e+i+e}var ln=El;function Sl(t,e){let s=t.slice(1,-1),r=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":un(s,e.singleQuote);return ln(s,r,!(e.parser==="css"||e.parser==="less"||e.parser==="scss"||e.__embeddedInHtml))}var Tt=Sl;var Yr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},cn=Yr;function Tl(t){return(t==null?void 0:t.type)==="front-matter"}var Ee=Tl;var Cl=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function fn(t,e,s){if(Ee(t)&&t.lang==="yaml"&&delete e.value,t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||Ee(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/.test(t.text))||s.type==="css-root"&&G(!1,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,t.type==="selector-combinator"&&(e.value=E(!1,e.value,/\s+/g," ")),t.type==="media-feature"&&(e.value=E(!1,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(e.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=e.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=e.name.toLowerCase()),t.type==="value-number"&&(e.unit=e.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=E(!1,e.value,/;$/g,"")),(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&e.value&&(e.value=Al(e.value)),t.type==="selector-attribute"&&(e.attribute=e.attribute.trim(),e.namespace&&typeof e.namespace=="string"&&(e.namespace=e.namespace.trim(),e.namespace.length===0&&(e.namespace=!0)),e.value&&(e.value=E(!1,e.value.trim(),/^["']|["']$/g,""),delete e.quoted)),(t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&e.value&&(e.value=E(!1,e.value,/([\d+.e-]+)([a-z]*)/gi,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=t.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&r.value.endsWith("[")||r.type==="value-word"&&r.value.startsWith("]")))return{type:"value-atword",value:t.groups.map(r=>r.value).join(""),group:{open:null,close:null,groups:[],type:"value-paren_group"}}}fn.ignoredProperties=Cl;function Al(t){return E(!1,E(!1,t,"'",'"'),/\\([^\da-f])/gi,"$1")}var pn=fn;async function Ol(t,e){if(t.lang==="yaml"){let s=t.value.trim(),r=s?await e(s,{parser:"yaml"}):"";return sn([t.startDelimiter,k,r,r?k:"",t.endDelimiter])}}var hn=Ol;function dn(t){let{node:e}=t;if(e.type==="front-matter")return async s=>{let r=await hn(e,s);return r?[r,k]:void 0}}dn.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var mn=dn;var je=null;function Je(t){if(je!==null&&typeof je.property){let e=je;return je=Je.prototype=null,e}return je=Je.prototype=t??Object.create(null),new Je}var Nl=10;for(let t=0;t<=Nl;t++)Je();function Vr(t){return Je(t)}function Pl(t,e="type"){Vr(t);function s(r){let n=r[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}return s}var yn=Pl;var Rl={"front-matter":[],"css-root":["frontMatter","nodes"],"css-comment":[],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":["nodes"],"media-query":["nodes"],"media-type":[],"media-feature-expression":["nodes"],"media-feature":[],"media-colon":[],"media-value":[],"media-keyword":[],"media-url":[],"media-unknown":[],"selector-root":["nodes"],"selector-selector":["nodes"],"selector-comment":[],"selector-string":[],"selector-tag":[],"selector-id":[],"selector-class":[],"selector-attribute":[],"selector-combinator":["nodes"],"selector-universal":[],"selector-pseudo":["nodes"],"selector-nesting":[],"selector-unknown":[],"value-value":["group"],"value-root":["group"],"value-comment":[],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":["group"],"value-paren":[],"value-number":[],"value-operator":[],"value-word":[],"value-colon":[],"value-comma":[],"value-string":[],"value-atword":[],"value-unicode-range":[],"value-unknown":[]},gn=Rl;var Il=yn(gn),wn=Il;function ql(t,e){let s=0;for(let r=0;r{let n=!!(r!=null&&r.backwards);if(s===!1)return!1;let{length:i}=e,o=s;for(;o>=0&&o-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function _c(t){let e=t.match(kc);if(!e)return{content:t};let{startDelimiter:n,language:r,value:s="",endDelimiter:i}=e.groups,o=r.trim()||"yaml";if(n==="+++"&&(o="toml"),o!=="yaml"&&n!==i)return{content:t};let[a]=e;return{frontMatter:{type:"front-matter",lang:o,value:s,startDelimiter:n,endDelimiter:i,raw:a.replace(/\n$/,"")},content:T(!1,a,/[^\n]/g," ")+t.slice(a.length)}}var je=_c;function ei(t){return Xs(je(t).content)}function ti(t){let{frontMatter:e,content:n}=je(t);return(e?e.raw+` +`)+i}var Gl=new RegExp("^(?-{3}|\\+{3})(?[^\\n]*)\\n(?:|(?.*?)\\n)(?\\k|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function Hl(t){let e=t.match(Gl);if(!e)return{content:t};let{startDelimiter:s,language:r,value:n="",endDelimiter:i}=e.groups,o=r.trim()||"yaml";if(s==="+++"&&(o="toml"),o!=="yaml"&&s!==i)return{content:t};let[a]=e;return{frontMatter:{type:"front-matter",lang:o,value:n,startDelimiter:s,endDelimiter:i,raw:a.replace(/\n$/,"")},content:E(!1,a,/[^\n]/g," ")+t.slice(a.length)}}var Xe=Hl;function qn(t){return Rn(Xe(t).content)}function Ln(t){let{frontMatter:e,content:s}=Xe(t);return(e?e.raw+` -`:"")+Zs(n)}var Je=null;function Xe(t){if(Je!==null&&typeof Je.property){let e=Je;return Je=Xe.prototype=null,e}return Je=Xe.prototype=t??Object.create(null),new Xe}var Tc=10;for(let t=0;t<=Tc;t++)Xe();function sn(t){return Xe(t)}function Ec(t,e="type"){sn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var ri=Ec;var Sc={"front-matter":[],"css-root":["frontMatter","nodes"],"css-comment":[],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":["nodes"],"media-query":["nodes"],"media-type":[],"media-feature-expression":["nodes"],"media-feature":[],"media-colon":[],"media-value":[],"media-keyword":[],"media-url":[],"media-unknown":[],"selector-root":["nodes"],"selector-selector":["nodes"],"selector-comment":[],"selector-string":[],"selector-tag":[],"selector-id":[],"selector-class":[],"selector-attribute":[],"selector-combinator":["nodes"],"selector-universal":[],"selector-pseudo":["nodes"],"selector-nesting":[],"selector-unknown":[],"value-value":["group"],"value-root":["group"],"value-comment":[],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":["group"],"value-paren":[],"value-number":[],"value-operator":[],"value-word":[],"value-colon":[],"value-comma":[],"value-string":[],"value-atword":[],"value-unicode-range":[],"value-unknown":[]},ni=Sc;var Cc=ri(ni),si=Cc;var Oc=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 ii(t){var e,n;return(n=(e=t.findAncestor(r=>r.type==="css-decl"))==null?void 0:e.prop)==null?void 0:n.toLowerCase()}var Ac=new Set(["initial","inherit","unset","revert"]);function oi(t){return Ac.has(t.toLowerCase())}function ai(t,e){var r;let n=t.findAncestor(s=>s.type==="css-atrule");return((r=n==null?void 0:n.name)==null?void 0:r.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(e.toLowerCase())}function ne(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function Ee(t,e){var r;let n=t.findAncestor(s=>s.type==="value-func");return((r=n==null?void 0:n.value)==null?void 0:r.toLowerCase())===e}function ui(t){var r;let e=t.findAncestor(s=>s.type==="css-rule"),n=(r=e==null?void 0:e.raws)==null?void 0:r.selector;return n&&(n.startsWith(":import")||n.startsWith(":export"))}function Se(t,e){let n=Array.isArray(e)?e:[e],r=t.findAncestor(s=>s.type==="css-atrule");return r&&n.includes(r.name.toLowerCase())}function li(t){var n;let{node:e}=t;return e.groups[0].value==="url"&&e.groups.length===2&&((n=t.findAncestor(r=>r.type==="css-atrule"))==null?void 0:n.name)==="import"}function ci(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function fi(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function Nt(t,e){var r;let n=(r=t.parent)==null?void 0:r.nodes;return n&&n.indexOf(e)===n.length-1}function pi(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/.test(e)||e.value&&/^@.+:.*$/.test(e.value):!1}function hi(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function di(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function mi(t){return t.type==="value-word"&&t.value==="in"}function Pt(t){return t.type==="value-operator"&&t.value==="*"}function Ze(t){return t.type==="value-operator"&&t.value==="/"}function j(t){return t.type==="value-operator"&&t.value==="+"}function he(t){return t.type==="value-operator"&&t.value==="-"}function Nc(t){return t.type==="value-operator"&&t.value==="%"}function Rt(t){return Pt(t)||Ze(t)||j(t)||he(t)||Nc(t)}function yi(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function gi(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function et(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function an(t){var e;return((e=t.raws)==null?void 0:e.params)&&/^\(\s*\)$/.test(t.raws.params)}function It(t){return t.name.startsWith("prettier-placeholder")}function wi(t){return t.prop.startsWith("@prettier-placeholder")}function vi(t,e){return t.value==="$$"&&t.type==="value-func"&&(e==null?void 0:e.type)==="value-word"&&!e.raws.before}function xi(t){var e,n;return((e=t.value)==null?void 0:e.type)==="value-root"&&((n=t.value.group)==null?void 0:n.type)==="value-value"&&t.prop.toLowerCase()==="composes"}function bi(t){var e,n,r;return((r=(n=(e=t.value)==null?void 0:e.group)==null?void 0:n.group)==null?void 0:r.type)==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function de(t){var e;return((e=t.raws)==null?void 0:e.before)===""}function qt(t){var e,n;return t.type==="value-comma_group"&&((n=(e=t.groups)==null?void 0:e[1])==null?void 0:n.type)==="value-colon"}function on(t){var e;return t.type==="value-paren_group"&&((e=t.groups)==null?void 0:e[0])&&qt(t.groups[0])}function un(t,e){var i;if(e.parser!=="scss")return!1;let{node:n}=t;if(n.groups.length===0)return!1;let r=t.grandparent;if(!on(n)&&!(r&&on(r)))return!1;let s=t.findAncestor(o=>o.type==="css-decl");return!!((i=s==null?void 0:s.prop)!=null&&i.startsWith("$")||on(r)||r.type==="value-func")}function ln(t){return t.type==="value-comment"&&t.inline}function Dt(t){return t.type==="value-word"&&t.value==="#"}function cn(t){return t.type==="value-word"&&t.value==="{"}function Lt(t){return t.type==="value-word"&&t.value==="}"}function tt(t){return["value-word","value-atword"].includes(t.type)}function Mt(t){return(t==null?void 0:t.type)==="value-colon"}function ki(t,e){if(!qt(e))return!1;let{groups:n}=e,r=n.indexOf(t);return r===-1?!1:Mt(n[r+1])}function _i(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function Ti(t){return t.type!=="value-func"?!1:Oc.has(t.value.toLowerCase())}function Ce(t){return/\/\//.test(t.split(/[\n\r]/).pop())}function rt(t){return(t==null?void 0:t.type)==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function Ei(t,e){var n,r;if(((n=t.open)==null?void 0:n.value)!=="("||((r=t.close)==null?void 0:r.value)!==")"||t.groups.some(s=>s.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let s=e.groups.indexOf(t)-1,i=e.groups[s];if((i==null?void 0:i.type)==="value-word"&&i.value==="with")return!0}return!1}function nt(t){var e,n;return t.type==="value-paren_group"&&((e=t.open)==null?void 0:e.value)==="("&&((n=t.close)==null?void 0:n.value)===")"}function Bt(t){return(e,n,r)=>{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&oSt(n,e))}function Ii(t,e){let n=e.singleQuote?"'":'"';return t.includes('"')||t.includes("'")?t:n+t+n}function me(t){return T(!1,t,Mc,(e,n,r,s,i)=>!r&&s?mn(s)+ne(i||""):e)}function mn(t){return Ni(t).replace(/\.0(?=$|e)/,"")}function qi(t){return t.trailingComma==="es5"||t.trailingComma==="all"}function Bc(t,e,n){var d;let{node:r}=t,s=t.parent,i=t.grandparent,o=ii(t),a=o&&s.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),u=t.findAncestor(m=>m.type==="css-atrule"),c=u&&et(u,e),f=r.groups.some(m=>ln(m)),p=t.map(n,"groups"),l=[],g=Ee(t,"url"),x=!1,h=!1;for(let m=0;mve:O!==-1?x=!0:ve!==-1&&(x=!1)}if(x||Mt(w)||Mt(v)||w.type==="value-atword"&&(w.value===""||w.value.endsWith("["))||v.type==="value-word"&&v.value.startsWith("]")||w.value==="~"||w.type!=="value-string"&&w.value&&w.value.includes("\\")&&v&&v.type!=="value-comment"||b!=null&&b.value&&b.value.indexOf("\\")===b.value.length-1&&w.type==="value-operator"&&w.value==="/"||w.value==="\\"||vi(w,v)||Dt(w)||cn(w)||Lt(v)||cn(v)&&de(v)||Lt(w)&&de(v)||w.value==="--"&&Dt(v))continue;let $=Rt(w),H=Rt(v);if(($&&Dt(v)||H&&Lt(w))&&de(v)||!b&&Ze(w)||Ee(t,"calc")&&(j(w)||j(v)||he(w)||he(v))&&de(v))continue;let U=(j(w)||he(w))&&m===0&&(v.type==="value-number"||v.isHex)&&i&&Ti(i)&&!de(v),S=(R==null?void 0:R.type)==="value-func"||R&&tt(R)||w.type==="value-func"||tt(w),C=v.type==="value-func"||tt(v)||(b==null?void 0:b.type)==="value-func"||b&&tt(b);if(e.parser==="scss"&&$&&w.value==="-"&&v.type==="value-func"&&P(w)!==N(v)){l.push(" ");continue}if(!(!(Pt(v)||Pt(w))&&!Ee(t,"calc")&&!U&&(Ze(v)&&!S||Ze(w)&&!C||j(v)&&!S||j(w)&&!C||he(v)||he(w))&&(de(v)||$&&(!b||b&&Rt(b))))&&!((e.parser==="scss"||e.parser==="less")&&$&&w.value==="-"&&nt(v)&&P(w)===N(v.open)&&v.open.value==="(")){if(ln(w)){if(s.type==="value-paren_group"){l.push(fe(_));continue}l.push(_);continue}if(c&&(yi(v)||gi(v)||di(v)||mi(w)||hi(w))){l.push(" ");continue}if(u&&u.name.toLowerCase()==="namespace"){l.push(" ");continue}if(a){w.source&&v.source&&w.source.start.line!==v.source.start.line?(l.push(_),h=!0):l.push(" ");continue}if(H){l.push(" ");continue}if((v==null?void 0:v.value)!=="..."&&!(rt(w)&&rt(v)&&P(w)===N(v))){if(rt(w)&&nt(v)&&P(w)===N(v.open)){l.push(M);continue}if(w.value==="with"&&nt(v)){l.push(" ");continue}(d=w.value)!=null&&d.endsWith("#")&&v.value==="{"&&nt(v.group)||l.push(A)}}}return f&&l.push(Qe),h&&l.unshift(_),c?D(q(l)):li(t)?D(He(l)):D(q(He(l)))}var Di=Bc;function Fc(t,e,n){let r=!!(n!=null&&n.backwards);if(e===!1)return!1;let s=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&s===` -`)return e-2;if(s===` -`||s==="\r"||s==="\u2028"||s==="\u2029")return e-1}else{if(s==="\r"&&t.charAt(e+1)===` -`)return e+2;if(s===` -`||s==="\r"||s==="\u2028"||s==="\u2029")return e+1}return e}var Ut=Fc;function $c(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let n=e+2;nn.type==="value-comment"))&&qi(e)&&t.callParent(()=>un(t,e))?At(","):""}function Bi(t,e,n){let{node:r,parent:s}=t,i=t.map(({node:g})=>typeof g=="string"?g:n(),"groups");if(s&&ci(s)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?n("open"):"",Y(",",i),r.close?n("close"):""];if(!r.open){let g=yn(t),x=Y([",",g?_:A],i);return q(g?[_,x]:D(He(x)))}let o=t.map(({node:g,isLast:x,index:h})=>{var b;let d=i[h];if(qt(g)&&g.type==="value-comma_group"&&g.groups&&g.groups[0].type!=="value-paren_group"&&((b=g.groups[2])==null?void 0:b.type)==="value-paren_group"){let w=Ds(d.contents.contents);w[1]=D(w[1]),d=D(fe(d))}let m=[d,x?Yc(t,e):","];if(!x&&g.type==="value-comma_group"&&ee(g.groups)){let w=G(!1,g.groups,-1);!w.source&&w.close&&(w=w.close),w.source&&zt(e.originalText,P(w))&&m.push(_)}return m},"groups"),a=ki(r,s),u=Ei(r,s),c=un(t,e),f=u||c&&!a,p=u||a,l=D([r.open?n("open"):"",q([M,Y(A,o)]),M,r.close?n("close"):""],{shouldBreak:f});return p?fe(l):l}function yn(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(n=>n.type==="value-comma_group"),(e,n)=>n==="group"&&e.type==="value-value",(e,n)=>n==="group"&&e.type==="value-root",(e,n)=>n==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function Gc(t,e,n){let r=[];return t.each(()=>{let{node:s,previous:i}=t;if((i==null?void 0:i.type)==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(N(s),P(s))):r.push(n()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Wt(e.originalText,N(o),{backwards:!0})&&!Te(s)||o.type==="css-atrule"&&o.name==="else"&&s.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?A:_),zt(e.originalText,P(s))&&!Te(s)&&r.push(_))},"nodes"),r}var Oe=Gc;function Kc(t,e,n){var s,i,o,a,u,c;let{node:r}=t;switch(r.type){case"front-matter":return[r.raw,_];case"css-root":{let f=Oe(t,e,n),p=r.raws.after.trim();return p.startsWith(";")&&(p=p.slice(1).trim()),[r.frontMatter?[n("frontMatter"),_]:"",f,p?` ${p}`:"",r.nodes.length>0?_:""]}case"css-comment":{let f=r.inline||r.raws.inline,p=e.originalText.slice(N(r),P(r));return f?p.trimEnd():p}case"css-rule":return[n("selector"),r.important?" !important":"",r.nodes?[((s=r.selector)==null?void 0:s.type)==="selector-unknown"&&Ce(r.selector.value)?A:r.selector?" ":"","{",r.nodes.length>0?q([_,Oe(t,e,n)]):"",_,"}",pi(r)?";":""]:";"];case"css-decl":{let f=t.parent,{between:p}=r.raws,l=p.trim(),g=l===":",x=typeof r.value=="string"&&/^ *$/.test(r.value),h=typeof r.value=="string"?r.value:n("value");return h=xi(r)?Ls(h):h,!g&&Ce(l)&&!((o=(i=r.value)==null?void 0:i.group)!=null&&o.group&&t.call(()=>yn(t),"value","group","group"))&&(h=q([_,fe(h)])),[T(!1,r.raws.before,/[\s;]/g,""),f.type==="css-atrule"&&f.variable||ui(t)?r.prop:ne(r.prop),l.startsWith("//")?" ":"",l,r.extend||x?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",n("selector"),")"]:"",h,r.raws.important?r.raws.important.replace(/\s*!\s*important/i," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/i," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/i," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",q([M,Oe(t,e,n)]),M,"}"]:wi(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&Nt(t,r)?At(";"):";"]}case"css-atrule":{let f=t.parent,p=It(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[n("selector"),r.important?" !important":"",p?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:n("params"),p?"":";"];if(r.variable)return["@",r.name,": ",r.value?n("value"):"",r.raws.between.trim()?r.raws.between.trim()+" ":"",r.nodes?["{",q([r.nodes.length>0?M:"",Oe(t,e,n)]),M,"}"]:"",p?"":";"]}let l=r.name==="import"&&((a=r.params)==null?void 0:a.type)==="value-unknown"&&r.params.value.endsWith(";");return["@",an(r)||r.name.endsWith(":")||It(r)?r.name:ne(r.name),r.params?[an(r)?"":It(r)?r.raws.afterName===""?"":r.name.endsWith(":")?" ":/^\s*\n\s*\n/.test(r.raws.afterName)?[_,_]:/^\s*\n/.test(r.raws.afterName)?_:" ":" ",typeof r.params=="string"?r.params:n("params")]:"",r.selector?q([" ",n("selector")]):"",r.value?D([" ",n("value"),et(r,e)?bi(r)?" ":A:""]):r.name==="else"?" ":"",r.nodes?[et(r,e)?"":r.selector&&!r.selector.nodes&&typeof r.selector.value=="string"&&Ce(r.selector.value)||!r.selector&&typeof r.params=="string"&&Ce(r.params)?A:" ","{",q([r.nodes.length>0?M:"",Oe(t,e,n)]),M,"}"]:p||l?"":";"]}case"media-query-list":{let f=[];return t.each(({node:p})=>{p.type==="media-query"&&p.value===""||f.push(n())},"nodes"),D(q(Y(A,f)))}case"media-query":return[Y(" ",t.map(n,"nodes")),Nt(t,r)?"":","];case"media-type":return me(W(r.value,e));case"media-feature-expression":return r.nodes?["(",...t.map(n,"nodes"),")"]:r.value;case"media-feature":return ne(W(T(!1,r.value,/ +/g," "),e));case"media-colon":return[r.value," "];case"media-value":return me(W(r.value,e));case"media-keyword":return W(r.value,e);case"media-url":return W(T(!1,T(!1,r.value,/^url\(\s+/gi,"url("),/\s+\)$/g,")"),e);case"media-unknown":return r.value;case"selector-root":return D([Se(t,"custom-selector")?[t.findAncestor(f=>f.type==="css-atrule").customSelector,A]:"",Y([",",Se(t,["extend","custom-selector","nest"])?A:_],t.map(n,"nodes"))]);case"selector-selector":return D(q(t.map(n,"nodes")));case"selector-comment":return r.value;case"selector-string":return W(r.value,e);case"selector-tag":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",((u=t.previous)==null?void 0:u.type)==="selector-nesting"?r.value:me(ai(t,r.value)?r.value.toLowerCase():r.value)];case"selector-id":return["#",r.value];case"selector-class":return[".",me(W(r.value,e))];case"selector-attribute":return["[",r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.attribute.trim(),r.operator??"",r.value?Ii(W(r.value.trim(),e),e):"",r.insensitive?" i":"","]"];case"selector-combinator":{if(r.value==="+"||r.value===">"||r.value==="~"||r.value===">>>"){let l=t.parent;return[l.type==="selector-selector"&&l.nodes[0]===r?"":A,r.value,Nt(t,r)?"":" "]}let f=r.value.trim().startsWith("(")?A:"",p=me(W(r.value.trim(),e))||A;return[f,p]}case"selector-universal":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.value];case"selector-pseudo":return[ne(r.value),ee(r.nodes)?D(["(",q([M,Y([",",A],t.map(n,"nodes"))]),M,")"]):""];case"selector-nesting":return r.value;case"selector-unknown":{let f=t.findAncestor(g=>g.type==="css-rule");if(f!=null&&f.isSCSSNesterProperty)return me(W(ne(r.value),e));let p=t.parent;if((c=p.raws)!=null&&c.selector){let g=N(p),x=g+p.raws.selector.length;return e.originalText.slice(g,x).trim()}let l=t.grandparent;if(p.type==="value-paren_group"&&(l==null?void 0:l.type)==="value-func"&&l.value==="selector"){let g=P(p.open)+1,x=N(p.close),h=e.originalText.slice(g,x).trim();return Ce(h)?[Qe,h]:h}return r.value}case"value-value":case"value-root":return n("group");case"value-comment":return e.originalText.slice(N(r),P(r));case"value-comma_group":return Di(t,e,n);case"value-paren_group":return Bi(t,e,n);case"value-func":return[r.value,Se(t,"supports")&&_i(r)?" ":"",n("group")];case"value-paren":return r.value;case"value-number":return[mn(r.value),Pi(r.unit)];case"value-operator":return r.value;case"value-word":return r.isColor&&r.isHex||oi(r.value)?r.value.toLowerCase():r.value;case"value-colon":{let{previous:f}=t;return[r.value,typeof(f==null?void 0:f.value)=="string"&&f.value.endsWith("\\")||Ee(t,"url")?"":A]}case"value-string":return St(r.raws.quote+r.value+r.raws.quote,e);case"value-atword":return["@",r.value];case"value-unicode-range":return r.value;case"value-unknown":return r.value;case"value-comma":default:throw new Ms(r,"PostCSS")}}var Hc={print:Kc,embed:Ws,insertPragma:ti,massageAstNode:Fs,getVisitorKeys:si},Fi=Hc;var Es={};Os(Es,{css:()=>Bg,less:()=>Fg,scss:()=>$g});var ql=ue(dt(),1),Dl=ue(Ho(),1),Ll=ue(Pa(),1);function Jp(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Ra=Jp;function Xp(t,e){return e.parser!=="scss"||!t.selector?!1:t.selector.replace(/\/\*.*?\*\//,"").replace(/\/\/.*\n/,"").trim().endsWith(":")}var Ia=Xp;var Zp=new Set(["import","use","forward"]);function eh(t){return Zp.has(t)}var qa=eh;var Tl=ue(Ou(),1);var id=t=>{for(;t.parent;)t=t.parent;return t},Nr=id;function od(t){return Nr(t).text.slice(t.group.open.sourceIndex+1,t.group.close.sourceIndex).trim()}var Au=od;function ad(t){if(ee(t)){for(let e=t.length-1;e>0;e--)if(t[e].type==="word"&&t[e].value==="{"&&t[e-1].type==="word"&&t[e-1].value.endsWith("#"))return!0}return!1}var Nu=ad;function ud(t){return t.some(e=>e.type==="string"||e.type==="func"&&!e.value.endsWith("\\"))}var Pu=ud;function ld(t,e){return!!(e.parser==="scss"&&(t==null?void 0:t.type)==="word"&&t.value.startsWith("$"))}var Ru=ld;var _l=ue(kl(),1);function X(t,e,n){if(t&&typeof t=="object"){delete t.parent;for(let r in t)X(t[r],e,n),r==="type"&&typeof t[r]=="string"&&!t[r].startsWith(e)&&(!n||!n.test(t[r]))&&(t[r]=e+t[r])}return t}function ms(t){if(t&&typeof t=="object"){delete t.parent;for(let e in t)ms(t[e]);!Array.isArray(t)&&t.value&&!t.type&&(t.type="unknown")}return t}function xg(t){if(/\/\/|\/\*/.test(t))return{type:"selector-unknown",value:t.trim()};let e;try{new _l.default(n=>{e=n}).process(t)}catch{return{type:"selector-unknown",value:t}}return X(e,"selector-")}var Z=xg;function bg(t,e){var u;let{nodes:n}=t,r={open:null,close:null,groups:[],type:"paren_group"},s=[r],i=r,o={groups:[],type:"comma_group"},a=[o];for(let c=0;c0&&r.groups.push(o),r.close=f,a.length===1)throw new Error("Unbalanced parenthesis");a.pop(),o=G(!1,a,-1),o.groups.push(r),s.pop(),r=G(!1,s,-1)}else f.type==="comma"?(r.groups.push(o),o={groups:[],type:"comma_group"},a[a.length-1]=o):o.groups.push(f)}return o.groups.length>0&&r.groups.push(o),i}function Zr(t){return t.type==="paren_group"&&!t.open&&!t.close&&t.groups.length===1||t.type==="comma_group"&&t.groups.length===1?Zr(t.groups[0]):t.type==="paren_group"||t.type==="comma_group"?{...t,groups:t.groups.map(Zr)}:t}function El(t,e){if(t&&typeof t=="object")for(let n in t)n!=="parent"&&(El(t[n],e),n==="nodes"&&(t.group=Zr(bg(t,e)),delete t[n]));return t}function kg(t,e){if(e.parser==="less"&&t.startsWith("~`"))return{type:"value-unknown",value:t};let n=null;try{n=new Tl.default(t,{loose:!0}).parse()}catch{return{type:"value-unknown",value:t}}n.text=t;let r=El(n,e);return X(r,"value-",/^selector-/)}var ae=kg;var Rl=ue(Pl(),1);var qg=Rl.default.default;function Dg(t){let e;try{e=qg(t)}catch{return{type:"selector-unknown",value:t}}return X(ms(e),"media-")}var Il=Dg;var Lg=/(\s*)(!default).*$/,Mg=/(\s*)(!global).*$/;function Ml(t,e){var n,r;if(t&&typeof t=="object"){delete t.parent;for(let a in t)Ml(t[a],e);if(!t.type)return t;if(t.raws??(t.raws={}),t.type==="css-decl"&&typeof t.prop=="string"&&t.prop.startsWith("--")&&typeof t.value=="string"&&t.value.startsWith("{")){let a;if(t.value.trimEnd().endsWith("}")){let u=e.originalText.slice(0,t.source.start.offset),c="a".repeat(t.prop.length)+e.originalText.slice(t.source.start.offset+t.prop.length,t.source.end.offset),f=T(!1,u,/[^\n]/g," ")+c,p;e.parser==="scss"?p=$l:e.parser==="less"?p=Fl:p=Bl;let l;try{l=p(f,{...e})}catch{}((n=l==null?void 0:l.nodes)==null?void 0:n.length)===1&&l.nodes[0].type==="css-rule"&&(a=l.nodes[0].nodes)}return a?t.value={type:"css-rule",nodes:a}:t.value={type:"value-unknown",value:t.raws.value.raw},t}let s="";typeof t.selector=="string"&&(s=t.raws.selector?t.raws.selector.scss??t.raws.selector.raw:t.selector,t.raws.between&&t.raws.between.trim().length>0&&(s+=t.raws.between),t.raws.selector=s);let i="";typeof t.value=="string"&&(i=t.raws.value?t.raws.value.scss??t.raws.value.raw:t.value,i=i.trim(),t.raws.value=i);let o="";if(typeof t.params=="string"&&(o=t.raws.params?t.raws.params.scss??t.raws.params.raw:t.params,t.raws.afterName&&t.raws.afterName.trim().length>0&&(o=t.raws.afterName+o),t.raws.between&&t.raws.between.trim().length>0&&(o=o+t.raws.between),o=o.trim(),t.raws.params=o),s.trim().length>0)return s.startsWith("@")&&s.endsWith(":")?t:t.mixin?(t.selector=ae(s,e),t):(Ia(t,e)&&(t.isSCSSNesterProperty=!0),t.selector=Z(s),t);if(i.length>0){let a=i.match(Lg);a&&(i=i.slice(0,a.index),t.scssDefault=!0,a[0].trim()!=="!default"&&(t.raws.scssDefault=a[0]));let u=i.match(Mg);if(u&&(i=i.slice(0,u.index),t.scssGlobal=!0,u[0].trim()!=="!global"&&(t.raws.scssGlobal=u[0])),i.startsWith("progid:"))return{type:"value-unknown",value:i};t.value=ae(i,e)}if(e.parser==="less"&&t.type==="css-decl"&&i.startsWith("extend(")&&(t.extend||(t.extend=t.raws.between===":"),t.extend&&!t.selector&&(delete t.value,t.selector=Z(i.slice(7,-1)))),t.type==="css-atrule"){if(e.parser==="less"){if(t.mixin){let a=t.raws.identifier+t.name+t.raws.afterName+t.raws.params;return t.selector=Z(a),delete t.params,t}if(t.function)return t}if(e.parser==="css"&&t.name==="custom-selector"){let a=t.params.match(/:--\S+\s+/)[0].trim();return t.customSelector=a,t.selector=Z(t.params.slice(a.length).trim()),delete t.params,t}if(e.parser==="less"){if(t.name.includes(":")&&!t.params){t.variable=!0;let a=t.name.split(":");t.name=a[0],t.value=ae(a.slice(1).join(":"),e)}if(!["page","nest","keyframes"].includes(t.name)&&((r=t.params)==null?void 0:r[0])===":"){t.variable=!0;let a=t.params.slice(1);a&&(t.value=ae(a,e)),t.raws.afterName+=":"}if(t.variable)return delete t.params,t.value||delete t.value,t}}if(t.type==="css-atrule"&&o.length>0){let{name:a}=t,u=t.name.toLowerCase();return a==="warn"||a==="error"?(t.params={type:"media-unknown",value:o},t):a==="extend"||a==="nest"?(t.selector=Z(o),delete t.params,t):a==="at-root"?(/^\(\s*(?:without|with)\s*:.+\)$/s.test(o)?t.params=ae(o,e):(t.selector=Z(o),delete t.params),t):qa(u)?(t.import=!0,delete t.filename,t.params=ae(o,e),t):["namespace","supports","if","else","for","each","while","debug","mixin","include","function","return","define-mixin","add-mixin"].includes(a)?(o=o.replace(/(\$\S+?)(\s+)?\.{3}/,"$1...$2"),o=o.replace(/^(?!if)(\S+)(\s+)\(/,"$1($2"),t.value=ae(o,e),delete t.params,t):["media","custom-media"].includes(u)?o.includes("#{")?{type:"media-unknown",value:o}:(t.params=Il(o),t):(t.params=o,t)}}return t}function _s(t,e,n){let r=je(e),{frontMatter:s}=r;e=r.content;let i;try{i=t(e,{map:!1})}catch(o){let{name:a,reason:u,line:c,column:f}=o;throw typeof c!="number"?o:Ra(`${a}: ${u}`,{loc:{start:{line:c,column:f}},cause:o})}return n.originalText=e,i=Ml(X(i,"css-"),n),hn(i,e),s&&(s.source={startOffset:0,endOffset:s.raw.length},i.frontMatter=s),i}function Bl(t,e={}){return _s(ql.default.default,t,e)}function Fl(t,e={}){return _s(n=>Dl.default.parse(Ai(n)),t,e)}function $l(t,e={}){return _s(Ll.default,t,e)}var Ts={astFormat:"postcss",hasPragma:ei,locStart:N,locEnd:P},Bg={...Ts,parse:Bl},Fg={...Ts,parse:Fl},$g={...Ts,parse:$l};var Ul=[{linguistLanguageId:50,name:"CSS",type:"markup",tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",color:"#563d7c",extensions:[".css",".wxss"],parsers:["css"],vscodeLanguageIds:["css"]},{linguistLanguageId:262764437,name:"PostCSS",type:"markup",color:"#dc3a0c",tmScope:"source.postcss",group:"CSS",extensions:[".pcss",".postcss"],aceMode:"text",parsers:["css"],vscodeLanguageIds:["postcss"]},{linguistLanguageId:198,name:"Less",type:"markup",color:"#1d365d",aliases:["less-css"],extensions:[".less"],tmScope:"source.css.less",aceMode:"less",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"]},{linguistLanguageId:329,name:"SCSS",type:"markup",color:"#c6538c",tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",extensions:[".scss"],parsers:["scss"],vscodeLanguageIds:["scss"]}];var Wl={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Ug={singleQuote:Wl.singleQuote},zl=Ug;var Wg={postcss:Fi};var Vk=Ss;export{Vk as default,Ul as languages,zl as options,Es as parsers,Wg as printers}; +`:"")+In(s)}var Kl=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 Dn(t){var e,s;return(s=(e=t.findAncestor(r=>r.type==="css-decl"))==null?void 0:e.prop)==null?void 0:s.toLowerCase()}var Ql=new Set(["initial","inherit","unset","revert"]);function Mn(t){return Ql.has(t.toLowerCase())}function Bn(t,e){var r;let s=t.findAncestor(n=>n.type==="css-atrule");return((r=s==null?void 0:s.name)==null?void 0:r.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(e.toLowerCase())}function se(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function Se(t,e){var r;let s=t.findAncestor(n=>n.type==="value-func");return((r=s==null?void 0:s.value)==null?void 0:r.toLowerCase())===e}function Un(t){var r;let e=t.findAncestor(n=>n.type==="css-rule"),s=(r=e==null?void 0:e.raws)==null?void 0:r.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))}function Te(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function Fn(t){var s;let{node:e}=t;return e.groups[0].value==="url"&&e.groups.length===2&&((s=t.findAncestor(r=>r.type==="css-atrule"))==null?void 0:s.name)==="import"}function $n(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function Wn(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function Nt(t,e){var r;let s=(r=t.parent)==null?void 0:r.nodes;return s&&s.indexOf(e)===s.length-1}function zn(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/.test(e)||e.value&&/^@.+:.*$/.test(e.value):!1}function Yn(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function Vn(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function Gn(t){return t.type==="value-word"&&t.value==="in"}function Pt(t){return t.type==="value-operator"&&t.value==="*"}function Ze(t){return t.type==="value-operator"&&t.value==="/"}function j(t){return t.type==="value-operator"&&t.value==="+"}function he(t){return t.type==="value-operator"&&t.value==="-"}function jl(t){return t.type==="value-operator"&&t.value==="%"}function Rt(t){return Pt(t)||Ze(t)||j(t)||he(t)||jl(t)}function Hn(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function Kn(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function et(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function jr(t){var e;return((e=t.raws)==null?void 0:e.params)&&/^\(\s*\)$/.test(t.raws.params)}function It(t){return t.name.startsWith("prettier-placeholder")}function Qn(t){return t.prop.startsWith("@prettier-placeholder")}function jn(t,e){return t.value==="$$"&&t.type==="value-func"&&(e==null?void 0:e.type)==="value-word"&&!e.raws.before}function Jn(t){var e,s;return((e=t.value)==null?void 0:e.type)==="value-root"&&((s=t.value.group)==null?void 0:s.type)==="value-value"&&t.prop.toLowerCase()==="composes"}function Xn(t){var e,s,r;return((r=(s=(e=t.value)==null?void 0:e.group)==null?void 0:s.group)==null?void 0:r.type)==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function de(t){var e;return((e=t.raws)==null?void 0:e.before)===""}function qt(t){var e,s;return t.type==="value-comma_group"&&((s=(e=t.groups)==null?void 0:e[1])==null?void 0:s.type)==="value-colon"}function Qr(t){var e;return t.type==="value-paren_group"&&((e=t.groups)==null?void 0:e[0])&&qt(t.groups[0])}function Jr(t,e){var i;if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0)return!1;let r=t.grandparent;if(!Qr(s)&&!(r&&Qr(r)))return!1;let n=t.findAncestor(o=>o.type==="css-decl");return!!((i=n==null?void 0:n.prop)!=null&&i.startsWith("$")||Qr(r)||r.type==="value-func")}function Xr(t){return t.type==="value-comment"&&t.inline}function Lt(t){return t.type==="value-word"&&t.value==="#"}function Zr(t){return t.type==="value-word"&&t.value==="{"}function Dt(t){return t.type==="value-word"&&t.value==="}"}function tt(t){return["value-word","value-atword"].includes(t.type)}function Mt(t){return(t==null?void 0:t.type)==="value-colon"}function Zn(t,e){if(!qt(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:Mt(s[r+1])}function ei(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function ti(t){return t.type!=="value-func"?!1:Kl.has(t.value.toLowerCase())}function Ce(t){return/\/\//.test(t.split(/[\n\r]/).pop())}function rt(t){return(t==null?void 0:t.type)==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function ri(t,e){var s,r;if(((s=t.open)==null?void 0:s.value)!=="("||((r=t.close)==null?void 0:r.value)!==")"||t.groups.some(n=>n.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let n=e.groups.indexOf(t)-1,i=e.groups[n];if((i==null?void 0:i.type)==="value-word"&&i.value==="with")return!0}return!1}function st(t){var e,s;return t.type==="value-paren_group"&&((e=t.open)==null?void 0:e.value)==="("&&((s=t.close)==null?void 0:s.value)===")"}function Jl(t,e,s){var d;let{node:r}=t,n=t.parent,i=t.grandparent,o=Dn(t),a=o&&n.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),u=t.findAncestor(m=>m.type==="css-atrule"),c=u&&et(u,e),f=r.groups.some(m=>Xr(m)),p=t.map(s,"groups"),l=[],g=Se(t,"url"),x=!1,h=!1;for(let m=0;mve:A!==-1?x=!0:ve!==-1&&(x=!1)}if(x||Mt(w)||Mt(v)||w.type==="value-atword"&&(w.value===""||w.value.endsWith("["))||v.type==="value-word"&&v.value.startsWith("]")||w.value==="~"||w.type!=="value-string"&&w.value&&w.value.includes("\\")&&v&&v.type!=="value-comment"||_!=null&&_.value&&_.value.indexOf("\\")===_.value.length-1&&w.type==="value-operator"&&w.value==="/"||w.value==="\\"||jn(w,v)||Lt(w)||Zr(w)||Dt(v)||Zr(v)&&de(v)||Dt(w)&&de(v)||w.value==="--"&&Lt(v))continue;let F=Rt(w),K=Rt(v);if((F&&Lt(v)||K&&Dt(w))&&de(v)||!_&&Ze(w)||Se(t,"calc")&&(j(w)||j(v)||he(w)||he(v))&&de(v))continue;let $=(j(w)||he(w))&&m===0&&(v.type==="value-number"||v.isHex)&&i&&ti(i)&&!de(v),T=(R==null?void 0:R.type)==="value-func"||R&&tt(R)||w.type==="value-func"||tt(w),C=v.type==="value-func"||tt(v)||(_==null?void 0:_.type)==="value-func"||_&&tt(_);if(e.parser==="scss"&&F&&w.value==="-"&&v.type==="value-func"&&P(w)!==N(v)){l.push(" ");continue}if(!(!(Pt(v)||Pt(w))&&!Se(t,"calc")&&!$&&(Ze(v)&&!T||Ze(w)&&!C||j(v)&&!T||j(w)&&!C||he(v)||he(w))&&(de(v)||F&&(!_||_&&Rt(_))))&&!((e.parser==="scss"||e.parser==="less")&&F&&w.value==="-"&&st(v)&&P(w)===N(v.open)&&v.open.value==="(")){if(Xr(w)){if(n.type==="value-paren_group"){l.push(fe(k));continue}l.push(k);continue}if(c&&(Hn(v)||Kn(v)||Vn(v)||Gn(w)||Yn(w))){l.push(" ");continue}if(u&&u.name.toLowerCase()==="namespace"){l.push(" ");continue}if(a){w.source&&v.source&&w.source.start.line!==v.source.start.line?(l.push(k),h=!0):l.push(" ");continue}if(K){l.push(" ");continue}if((v==null?void 0:v.value)!=="..."&&!(rt(w)&&rt(v)&&P(w)===N(v))){if(rt(w)&&st(v)&&P(w)===N(v.open)){l.push(M);continue}if(w.value==="with"&&st(v)){l.push(" ");continue}(d=w.value)!=null&&d.endsWith("#")&&v.value==="{"&&st(v.group)||l.push(O)}}}return f&&l.push(Qe),h&&l.unshift(k),c?L(q(l)):Fn(t)?L(Ke(l)):L(q(Ke(l)))}var si=Jl;function Xl(t){return t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}var ni=Xl;var es=new Map([["em","em"],["rem","rem"],["ex","ex"],["rex","rex"],["cap","cap"],["rcap","rcap"],["ch","ch"],["rch","rch"],["ic","ic"],["ric","ric"],["lh","lh"],["rlh","rlh"],["vw","vw"],["svw","svw"],["lvw","lvw"],["dvw","dvw"],["vh","vh"],["svh","svh"],["lvh","lvh"],["dvh","dvh"],["vi","vi"],["svi","svi"],["lvi","lvi"],["dvi","dvi"],["vb","vb"],["svb","svb"],["lvb","lvb"],["dvb","dvb"],["vmin","vmin"],["svmin","svmin"],["lvmin","lvmin"],["dvmin","dvmin"],["vmax","vmax"],["svmax","svmax"],["lvmax","lvmax"],["dvmax","dvmax"],["cm","cm"],["mm","mm"],["q","Q"],["in","in"],["pt","pt"],["pc","pc"],["px","px"],["deg","deg"],["grad","grad"],["rad","rad"],["turn","turn"],["s","s"],["ms","ms"],["hz","Hz"],["khz","kHz"],["dpi","dpi"],["dpcm","dpcm"],["dppx","dppx"],["x","x"],["cqw","cqw"],["cqh","cqh"],["cqi","cqi"],["cqb","cqb"],["cqmin","cqmin"],["cqmax","cqmax"]]);function ii(t){let e=t.toLowerCase();return es.has(e)?es.get(e):t}var oi=/(["'])(?:(?!\1)[^\\]|\\.)*\1/gs,Zl=/(?:\d*\.\d+|\d+\.?)(?:e[+-]?\d+)?/gi,ec=/[a-z]+/gi,tc=/[$@]?[_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/gi,rc=new RegExp(oi.source+`|(${tc.source})?(${Zl.source})(${ec.source})?`,"gi");function W(t,e){return E(!1,t,oi,s=>Tt(s,e))}function ai(t,e){let s=e.singleQuote?"'":'"';return t.includes('"')||t.includes("'")?t:s+t+s}function me(t){return E(!1,t,rc,(e,s,r,n,i)=>!r&&n?ts(n)+se(i||""):e)}function ts(t){return ni(t).replace(/\.0(?=$|e)/,"")}function ui(t){return t.trailingComma==="es5"||t.trailingComma==="all"}function sc(t,e,s){let r=!!(s!=null&&s.backwards);if(e===!1)return!1;let n=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&n===` +`)return e-2;if(n===` +`||n==="\r"||n==="\u2028"||n==="\u2029")return e-1}else{if(n==="\r"&&t.charAt(e+1)===` +`)return e+2;if(n===` +`||n==="\r"||n==="\u2028"||n==="\u2029")return e+1}return e}var Bt=sc;function nc(t,e,s={}){let r=At(t,s.backwards?e-1:e,s),n=Bt(t,r,s);return r!==n}var Ut=nc;function ic(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;ss.type==="value-comment"))&&ui(e)&&t.callParent(()=>Jr(t,e))?Et(","):""}function fi(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:g})=>typeof g=="string"?g:s(),"groups");if(n&&$n(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",V(",",i),r.close?s("close"):""];if(!r.open){let g=rs(t),x=V([",",g?k:O],i);return q(g?[k,x]:L(Ke(x)))}let o=t.map(({node:g,isLast:x,index:h})=>{var _;let d=i[h];if(qt(g)&&g.type==="value-comma_group"&&g.groups&&g.groups[0].type!=="value-paren_group"&&((_=g.groups[2])==null?void 0:_.type)==="value-paren_group"){let w=nn(d.contents.contents);w[1]=L(w[1]),d=L(fe(d))}let m=[d,x?lc(t,e):","];if(!x&&g.type==="value-comma_group"&&te(g.groups)){let w=G(!1,g.groups,-1);!w.source&&w.close&&(w=w.close),w.source&&Ft(e.originalText,P(w))&&m.push(k)}return m},"groups"),a=Zn(r,n),u=ri(r,n),c=Jr(t,e),f=u||c&&!a,p=u||a,l=L([r.open?s("open"):"",q([M,V(O,o)]),M,r.close?s("close"):""],{shouldBreak:f});return p?fe(l):l}function rs(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function cc(t,e,s){let r=[];return t.each(()=>{let{node:n,previous:i}=t;if((i==null?void 0:i.type)==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(N(n),P(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Ut(e.originalText,N(o),{backwards:!0})&&!Ee(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?O:k),Ft(e.originalText,P(n))&&!Ee(n)&&r.push(k))},"nodes"),r}var Ae=cc;function fc(t,e,s){var n,i,o,a,u,c;let{node:r}=t;switch(r.type){case"front-matter":return[r.raw,k];case"css-root":{let f=Ae(t,e,s),p=r.raws.after.trim();return p.startsWith(";")&&(p=p.slice(1).trim()),[r.frontMatter?[s("frontMatter"),k]:"",f,p?` ${p}`:"",r.nodes.length>0?k:""]}case"css-comment":{let f=r.inline||r.raws.inline,p=e.originalText.slice(N(r),P(r));return f?p.trimEnd():p}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[((n=r.selector)==null?void 0:n.type)==="selector-unknown"&&Ce(r.selector.value)?O:r.selector?" ":"","{",r.nodes.length>0?q([k,Ae(t,e,s)]):"",k,"}",zn(r)?";":""]:";"];case"css-decl":{let f=t.parent,{between:p}=r.raws,l=p.trim(),g=l===":",x=typeof r.value=="string"&&/^ *$/.test(r.value),h=typeof r.value=="string"?r.value:s("value");return h=Jn(r)?on(h):h,!g&&Ce(l)&&!((o=(i=r.value)==null?void 0:i.group)!=null&&o.group&&t.call(()=>rs(t),"value","group","group"))&&(h=q([k,fe(h)])),[E(!1,r.raws.before,/[\s;]/g,""),f.type==="css-atrule"&&f.variable||Un(t)?r.prop:se(r.prop),l.startsWith("//")?" ":"",l,r.extend||x?"":" ",e.parser==="less"&&r.extend&&r.selector?["extend(",s("selector"),")"]:"",h,r.raws.important?r.raws.important.replace(/\s*!\s*important/i," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/i," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/i," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",q([M,Ae(t,e,s)]),M,"}"]:Qn(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&Nt(t,r)?Et(";"):";"]}case"css-atrule":{let f=t.parent,p=It(r)&&!f.raws.semicolon&&e.originalText[P(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",p?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),p?"":";"];if(r.variable)return["@",r.name,": ",r.value?s("value"):"",r.raws.between.trim()?r.raws.between.trim()+" ":"",r.nodes?["{",q([r.nodes.length>0?M:"",Ae(t,e,s)]),M,"}"]:"",p?"":";"]}let l=r.name==="import"&&((a=r.params)==null?void 0:a.type)==="value-unknown"&&r.params.value.endsWith(";");return["@",jr(r)||r.name.endsWith(":")||It(r)?r.name:se(r.name),r.params?[jr(r)?"":It(r)?r.raws.afterName===""?"":r.name.endsWith(":")?" ":/^\s*\n\s*\n/.test(r.raws.afterName)?[k,k]:/^\s*\n/.test(r.raws.afterName)?k:" ":" ",typeof r.params=="string"?r.params:s("params")]:"",r.selector?q([" ",s("selector")]):"",r.value?L([" ",s("value"),et(r,e)?Xn(r)?" ":O:""]):r.name==="else"?" ":"",r.nodes?[et(r,e)?"":r.selector&&!r.selector.nodes&&typeof r.selector.value=="string"&&Ce(r.selector.value)||!r.selector&&typeof r.params=="string"&&Ce(r.params)?O:" ","{",q([r.nodes.length>0?M:"",Ae(t,e,s)]),M,"}"]:p||l?"":";"]}case"media-query-list":{let f=[];return t.each(({node:p})=>{p.type==="media-query"&&p.value===""||f.push(s())},"nodes"),L(q(V(O,f)))}case"media-query":return[V(" ",t.map(s,"nodes")),Nt(t,r)?"":","];case"media-type":return me(W(r.value,e));case"media-feature-expression":return r.nodes?["(",...t.map(s,"nodes"),")"]:r.value;case"media-feature":return se(W(E(!1,r.value,/ +/g," "),e));case"media-colon":return[r.value," "];case"media-value":return me(W(r.value,e));case"media-keyword":return W(r.value,e);case"media-url":return W(E(!1,E(!1,r.value,/^url\(\s+/gi,"url("),/\s+\)$/g,")"),e);case"media-unknown":return r.value;case"selector-root":return L([Te(t,"custom-selector")?[t.findAncestor(f=>f.type==="css-atrule").customSelector,O]:"",V([",",Te(t,["extend","custom-selector","nest"])?O:k],t.map(s,"nodes"))]);case"selector-selector":return L(q(t.map(s,"nodes")));case"selector-comment":return r.value;case"selector-string":return W(r.value,e);case"selector-tag":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",((u=t.previous)==null?void 0:u.type)==="selector-nesting"?r.value:me(Bn(t,r.value)?r.value.toLowerCase():r.value)];case"selector-id":return["#",r.value];case"selector-class":return[".",me(W(r.value,e))];case"selector-attribute":return["[",r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.attribute.trim(),r.operator??"",r.value?ai(W(r.value.trim(),e),e):"",r.insensitive?" i":"","]"];case"selector-combinator":{if(r.value==="+"||r.value===">"||r.value==="~"||r.value===">>>"){let l=t.parent;return[l.type==="selector-selector"&&l.nodes[0]===r?"":O,r.value,Nt(t,r)?"":" "]}let f=r.value.trim().startsWith("(")?O:"",p=me(W(r.value.trim(),e))||O;return[f,p]}case"selector-universal":return[r.namespace?[r.namespace===!0?"":r.namespace.trim(),"|"]:"",r.value];case"selector-pseudo":return[se(r.value),te(r.nodes)?L(["(",q([M,V([",",O],t.map(s,"nodes"))]),M,")"]):""];case"selector-nesting":return r.value;case"selector-unknown":{let f=t.findAncestor(g=>g.type==="css-rule");if(f!=null&&f.isSCSSNesterProperty)return me(W(se(r.value),e));let p=t.parent;if((c=p.raws)!=null&&c.selector){let g=N(p),x=g+p.raws.selector.length;return e.originalText.slice(g,x).trim()}let l=t.grandparent;if(p.type==="value-paren_group"&&(l==null?void 0:l.type)==="value-func"&&l.value==="selector"){let g=P(p.open)+1,x=N(p.close),h=e.originalText.slice(g,x).trim();return Ce(h)?[Qe,h]:h}return r.value}case"value-value":case"value-root":return s("group");case"value-comment":return e.originalText.slice(N(r),P(r));case"value-comma_group":return si(t,e,s);case"value-paren_group":return fi(t,e,s);case"value-func":return[r.value,Te(t,"supports")&&ei(r)?" ":"",s("group")];case"value-paren":return r.value;case"value-number":return[ts(r.value),ii(r.unit)];case"value-operator":return r.value;case"value-word":return r.isColor&&r.isHex||Mn(r.value)?r.value.toLowerCase():r.value;case"value-colon":{let{previous:f}=t;return[r.value,typeof(f==null?void 0:f.value)=="string"&&f.value.endsWith("\\")||Se(t,"url")?"":O]}case"value-string":return Tt(r.raws.quote+r.value+r.raws.quote,e);case"value-atword":return["@",r.value];case"value-unicode-range":return r.value;case"value-unknown":return r.value;case"value-comma":default:throw new cn(r,"PostCSS")}}var pc={print:fc,embed:mn,insertPragma:Ln,massageAstNode:pn,getVisitorKeys:wn},pi=pc;var hi=[{linguistLanguageId:50,name:"CSS",type:"markup",tmScope:"source.css",aceMode:"css",codemirrorMode:"css",codemirrorMimeType:"text/css",color:"#563d7c",extensions:[".css",".wxss"],parsers:["css"],vscodeLanguageIds:["css"]},{linguistLanguageId:262764437,name:"PostCSS",type:"markup",color:"#dc3a0c",tmScope:"source.postcss",group:"CSS",extensions:[".pcss",".postcss"],aceMode:"text",parsers:["css"],vscodeLanguageIds:["postcss"]},{linguistLanguageId:198,name:"Less",type:"markup",color:"#1d365d",aliases:["less-css"],extensions:[".less"],tmScope:"source.css.less",aceMode:"less",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["less"],vscodeLanguageIds:["less"]},{linguistLanguageId:329,name:"SCSS",type:"markup",color:"#c6538c",tmScope:"source.css.scss",aceMode:"scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",extensions:[".scss"],parsers:["scss"],vscodeLanguageIds:["scss"]}];var di={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var hc={singleQuote:di.singleQuote},mi=hc;var Js={};en(Js,{css:()=>Ty,less:()=>Cy,scss:()=>Ay});var tl=ue(ht(),1),rl=ue(bo(),1),sl=ue(ra(),1);function Zf(t,e){let s=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(s,e)}var sa=Zf;var ca=ue(la(),1);function J(t,e,s){if(t&&typeof t=="object"){delete t.parent;for(let r in t)J(t[r],e,s),r==="type"&&typeof t[r]=="string"&&!t[r].startsWith(e)&&(!s||!s.test(t[r]))&&(t[r]=e+t[r])}return t}function Ls(t){if(t&&typeof t=="object"){delete t.parent;for(let e in t)Ls(t[e]);!Array.isArray(t)&&t.value&&!t.type&&(t.type="unknown")}return t}var fp=ca.default.default;function pp(t){let e;try{e=fp(t)}catch{return{type:"selector-unknown",value:t}}return J(Ls(e),"media-")}var fa=pp;var iu=ue(nu(),1);function Tm(t){if(/\/\/|\/\*/.test(t))return{type:"selector-unknown",value:t.trim()};let e;try{new iu.default(s=>{e=s}).process(t)}catch{return{type:"selector-unknown",value:t}}return J(e,"selector-")}var Z=Tm;var Ju=ue(Gu(),1);var dy=t=>{for(;t.parent;)t=t.parent;return t},Ur=dy;function my(t){return Ur(t).text.slice(t.group.open.sourceIndex+1,t.group.close.sourceIndex).trim()}var Hu=my;function yy(t){if(te(t)){for(let e=t.length-1;e>0;e--)if(t[e].type==="word"&&t[e].value==="{"&&t[e-1].type==="word"&&t[e-1].value.endsWith("#"))return!0}return!1}var Ku=yy;function gy(t){return t.some(e=>e.type==="string"||e.type==="func"&&!e.value.endsWith("\\"))}var Qu=gy;function wy(t,e){return!!(e.parser==="scss"&&(t==null?void 0:t.type)==="word"&&t.value.startsWith("$"))}var ju=wy;function vy(t,e){var u;let{nodes:s}=t,r={open:null,close:null,groups:[],type:"paren_group"},n=[r],i=r,o={groups:[],type:"comma_group"},a=[o];for(let c=0;c0&&r.groups.push(o),r.close=f,a.length===1)throw new Error("Unbalanced parenthesis");a.pop(),o=G(!1,a,-1),o.groups.push(r),n.pop(),r=G(!1,n,-1)}else f.type==="comma"?(r.groups.push(o),o={groups:[],type:"comma_group"},a[a.length-1]=o):o.groups.push(f)}return o.groups.length>0&&r.groups.push(o),i}function Fr(t){return t.type==="paren_group"&&!t.open&&!t.close&&t.groups.length===1||t.type==="comma_group"&&t.groups.length===1?Fr(t.groups[0]):t.type==="paren_group"||t.type==="comma_group"?{...t,groups:t.groups.map(Fr)}:t}function Xu(t,e){if(t&&typeof t=="object")for(let s in t)s!=="parent"&&(Xu(t[s],e),s==="nodes"&&(t.group=Fr(vy(t,e)),delete t[s]));return t}function xy(t,e){if(e.parser==="less"&&t.startsWith("~`"))return{type:"value-unknown",value:t};let s=null;try{s=new Ju.default(t,{loose:!0}).parse()}catch{return{type:"value-unknown",value:t}}s.text=t;let r=Xu(s,e);return J(r,"value-",/^selector-/)}var ae=xy;var _y=new Set(["import","use","forward"]);function by(t){return _y.has(t)}var Zu=by;function ky(t,e){return e.parser!=="scss"||!t.selector?!1:t.selector.replace(/\/\*.*?\*\//,"").replace(/\/\/.*\n/,"").trim().endsWith(":")}var el=ky;var Ey=/(\s*)(!default).*$/,Sy=/(\s*)(!global).*$/;function nl(t,e){var s,r;if(t&&typeof t=="object"){delete t.parent;for(let a in t)nl(t[a],e);if(!t.type)return t;if(t.raws??(t.raws={}),t.type==="css-decl"&&typeof t.prop=="string"&&t.prop.startsWith("--")&&typeof t.value=="string"&&t.value.startsWith("{")){let a;if(t.value.trimEnd().endsWith("}")){let u=e.originalText.slice(0,t.source.start.offset),c="a".repeat(t.prop.length)+e.originalText.slice(t.source.start.offset+t.prop.length,t.source.end.offset),f=E(!1,u,/[^\n]/g," ")+c,p;e.parser==="scss"?p=al:e.parser==="less"?p=ol:p=il;let l;try{l=p(f,{...e})}catch{}((s=l==null?void 0:l.nodes)==null?void 0:s.length)===1&&l.nodes[0].type==="css-rule"&&(a=l.nodes[0].nodes)}return a?t.value={type:"css-rule",nodes:a}:t.value={type:"value-unknown",value:t.raws.value.raw},t}let n="";typeof t.selector=="string"&&(n=t.raws.selector?t.raws.selector.scss??t.raws.selector.raw:t.selector,t.raws.between&&t.raws.between.trim().length>0&&(n+=t.raws.between),t.raws.selector=n);let i="";typeof t.value=="string"&&(i=t.raws.value?t.raws.value.scss??t.raws.value.raw:t.value,i=i.trim(),t.raws.value=i);let o="";if(typeof t.params=="string"&&(o=t.raws.params?t.raws.params.scss??t.raws.params.raw:t.params,t.raws.afterName&&t.raws.afterName.trim().length>0&&(o=t.raws.afterName+o),t.raws.between&&t.raws.between.trim().length>0&&(o=o+t.raws.between),o=o.trim(),t.raws.params=o),n.trim().length>0)return n.startsWith("@")&&n.endsWith(":")?t:t.mixin?(t.selector=ae(n,e),t):(el(t,e)&&(t.isSCSSNesterProperty=!0),t.selector=Z(n),t);if(i.length>0){let a=i.match(Ey);a&&(i=i.slice(0,a.index),t.scssDefault=!0,a[0].trim()!=="!default"&&(t.raws.scssDefault=a[0]));let u=i.match(Sy);if(u&&(i=i.slice(0,u.index),t.scssGlobal=!0,u[0].trim()!=="!global"&&(t.raws.scssGlobal=u[0])),i.startsWith("progid:"))return{type:"value-unknown",value:i};t.value=ae(i,e)}if(e.parser==="less"&&t.type==="css-decl"&&i.startsWith("extend(")&&(t.extend||(t.extend=t.raws.between===":"),t.extend&&!t.selector&&(delete t.value,t.selector=Z(i.slice(7,-1)))),t.type==="css-atrule"){if(e.parser==="less"){if(t.mixin){let a=t.raws.identifier+t.name+t.raws.afterName+t.raws.params;return t.selector=Z(a),delete t.params,t}if(t.function)return t}if(e.parser==="css"&&t.name==="custom-selector"){let a=t.params.match(/:--\S+\s+/)[0].trim();return t.customSelector=a,t.selector=Z(t.params.slice(a.length).trim()),delete t.params,t}if(e.parser==="less"){if(t.name.includes(":")&&!t.params){t.variable=!0;let a=t.name.split(":");t.name=a[0],t.value=ae(a.slice(1).join(":"),e)}if(!["page","nest","keyframes"].includes(t.name)&&((r=t.params)==null?void 0:r[0])===":"){t.variable=!0;let a=t.params.slice(1);a&&(t.value=ae(a,e)),t.raws.afterName+=":"}if(t.variable)return delete t.params,t.value||delete t.value,t}}if(t.type==="css-atrule"&&o.length>0){let{name:a}=t,u=t.name.toLowerCase();return a==="warn"||a==="error"?(t.params={type:"media-unknown",value:o},t):a==="extend"||a==="nest"?(t.selector=Z(o),delete t.params,t):a==="at-root"?(/^\(\s*(?:without|with)\s*:.+\)$/s.test(o)?t.params=ae(o,e):(t.selector=Z(o),delete t.params),t):Zu(u)?(t.import=!0,delete t.filename,t.params=ae(o,e),t):["namespace","supports","if","else","for","each","while","debug","mixin","include","function","return","define-mixin","add-mixin"].includes(a)?(o=o.replace(/(\$\S+?)(\s+)?\.{3}/,"$1...$2"),o=o.replace(/^(?!if)(\S+)(\s+)\(/,"$1($2"),t.value=ae(o,e),delete t.params,t):["media","custom-media"].includes(u)?o.includes("#{")?{type:"media-unknown",value:o}:(t.params=fa(o),t):(t.params=o,t)}}return t}function Qs(t,e,s){let r=Xe(e),{frontMatter:n}=r;e=r.content;let i;try{i=t(e,{map:!1})}catch(o){let{name:a,reason:u,line:c,column:f}=o;throw typeof c!="number"?o:sa(`${a}: ${u}`,{loc:{start:{line:c,column:f}},cause:o})}return s.originalText=e,i=nl(J(i,"css-"),s),Kr(i,e),n&&(n.source={startOffset:0,endOffset:n.raw.length},i.frontMatter=n),i}function il(t,e={}){return Qs(tl.default.default,t,e)}function ol(t,e={}){return Qs(s=>rl.default.parse(bn(s)),t,e)}function al(t,e={}){return Qs(sl.default,t,e)}var js={astFormat:"postcss",hasPragma:qn,locStart:N,locEnd:P},Ty={...js,parse:il},Cy={...js,parse:ol},Ay={...js,parse:al};var Oy={postcss:pi};var P_=Xs;export{P_ as default,hi as languages,mi as options,Js as parsers,Oy as printers}; diff --git a/node_modules/prettier/plugins/typescript.js b/node_modules/prettier/plugins/typescript.js index 699d6bc..947feb9 100644 --- a/node_modules/prettier/plugins/typescript.js +++ b/node_modules/prettier/plugins/typescript.js @@ -1,25 +1,25 @@ -(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.typescript=e()}})(function(){"use strict";var T5=Object.create;var xf=Object.defineProperty;var S5=Object.getOwnPropertyDescriptor;var x5=Object.getOwnPropertyNames;var w5=Object.getPrototypeOf,C5=Object.prototype.hasOwnProperty;var E5=(e,t)=>()=>(e&&(t=e(e=0)),t);var ut=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Hh=(e,t)=>{for(var r in t)xf(e,r,{get:t[r],enumerable:!0})},Nb=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let _ of x5(t))!C5.call(e,_)&&_!==r&&xf(e,_,{get:()=>t[_],enumerable:!(a=S5(t,_))||a.enumerable});return e};var Ob=(e,t,r)=>(r=e!=null?T5(w5(e)):{},Nb(t||!e||!e.__esModule?xf(r,"default",{value:e,enumerable:!0}):r,e)),wf=e=>Nb(xf({},"__esModule",{value:!0}),e);var Cf={};Hh(Cf,{default:()=>k5});var A5,k5,Ef=E5(()=>{A5=()=>()=>{},k5=A5});var Dt=ut((QV,E7)=>{var D5=Object.defineProperty,hv=Object.getOwnPropertyNames,Vt=(e,t)=>function(){return e&&(t=(0,e[hv(e)[0]])(e=0)),t},P5=(e,t)=>function(){return t||(0,e[hv(e)[0]])((t={exports:{}}).exports,t),t.exports},I5=(e,t)=>{for(var r in t)D5(e,r,{get:t[r],enumerable:!0})},yv,Gf,Zh,N5=Vt({"src/compiler/corePublic.ts"(){"use strict";yv="5.2",Gf="5.2.2",Zh=(e=>(e[e.LessThan=-1]="LessThan",e[e.EqualTo=0]="EqualTo",e[e.GreaterThan=1]="GreaterThan",e))(Zh||{})}});function Ka(e){return e?e.length:0}function yr(e,t){if(e)for(let r=0;r=0;r--){let a=t(e[r],r);if(a)return a}}function ng(e,t){if(e!==void 0)for(let r=0;r=0;a--){let _=e[a];if(t(_,a))return _}}function _l(e,t,r){if(e===void 0)return-1;for(let a=r??0;a=0;a--)if(t(e[a],a))return a;return-1}function j5(e,t){for(let r=0;rr(a,t[_]))}function bv(e,t,r){for(let a=r||0;a{let p=t(_,a);if(p!==void 0){let[d,h]=p;d!==void 0&&h!==void 0&&r.set(d,h)}}),r}function X5(e,t,r){if(e.has(t))return e.get(t);let a=r();return e.set(t,a),a}function $5(e,t){return e.has(t)?!1:(e.add(t),!0)}function*Q5(e){yield e}function Y5(e,t,r){let a;if(e){a=[];let _=e.length,p,d,h=0,l=0;for(;h<_;){for(;l<_;){let v=e[l];if(d=t(v,l),l===0)p=d;else if(d!==p)break;l++}if(h{let[p,d]=t(_,a);r.set(p,d)}),r}function mt(e,t){if(e)if(t){for(let r of e)if(t(r))return!0}else return e.length>0;return!1}function Z5(e,t,r){let a;for(let _=0;_e[d])}function rC(e,t){let r=[];for(let a of e)Ol(r,a,t);return r}function Sv(e,t,r){return e.length===0?[]:e.length===1?e.slice():r?tC(e,t,r):rC(e,t)}function nC(e,t){if(e.length===0)return $e;let r=e[0],a=[r];for(let _=1;_0&&(_&=-2),_&2&&a(p,l)>0&&(_&=-3),p=l}return _}function sC(e,t,r=_o){if(!e||!t)return e===t;if(e.length!==t.length)return!1;for(let a=0;a0&&N.assertGreaterThanOrEqual(r(t[p],t[p-1]),0);t:for(let d=_;_d&&N.assertGreaterThanOrEqual(r(e[_],e[_-1]),0),r(t[p],e[_])){case-1:a.push(t[p]);continue e;case 0:continue e;case 1:continue t}}return a}function xt(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function lC(e,t){return e===void 0?t:t===void 0?e:zt(e)?zt(t)?y_(e,t):xt(e,t):zt(t)?xt(t,e):[e,t]}function ty(e,t){return t<0?e.length+t:t}function Rr(e,t,r,a){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(r,a);r=r===void 0?0:ty(t,r),a=a===void 0?t.length:ty(t,a);for(let _=r;_r(e[a],e[_])||kr(a,_))}function Xf(e,t){return e.length===0?e:e.slice().sort(t)}function*uC(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function Ev(e,t){let r=ag(e);return Cv(e,r,t),r.map(a=>e[a])}function pC(e,t,r,a){for(;r>1),l=r(e[h],h);switch(a(l,t)){case-1:p=h+1;break;case 0:return h;case 1:d=h-1;break}}return~p}function Rd(e,t,r,a,_){if(e&&e.length>0){let p=e.length;if(p>0){let d=a===void 0||a<0?0:a,h=_===void 0||d+_>p-1?p-1:d+_,l;for(arguments.length<=2?(l=e[d],d++):l=r;d<=h;)l=t(l,e[d],d),d++;return l}}return r}function Qr(e,t){return Jn.call(e,t)}function gC(e,t){return Jn.call(e,t)?e[t]:void 0}function sg(e){let t=[];for(let r in e)Jn.call(e,r)&&t.push(r);return t}function bC(e){let t=[];do{let r=Object.getOwnPropertyNames(e);for(let a of r)Ol(t,a)}while(e=Object.getPrototypeOf(e));return t}function vC(e){let t=[];for(let r in e)Jn.call(e,r)&&t.push(e[r]);return t}function TC(e,t){let r=new Array(e);for(let a=0;a100&&r>t.length>>1){let h=t.length-r;t.copyWithin(0,r),t.length=h,r=0}return d}return{enqueue:_,dequeue:p,isEmpty:a}}function OC(e,t){let r=new Map,a=0;function*_(){for(let d of r.values())zt(d)?yield*d:yield d}let p={has(d){let h=e(d);if(!r.has(h))return!1;let l=r.get(h);if(!zt(l))return t(l,d);for(let v of l)if(t(v,d))return!0;return!1},add(d){let h=e(d);if(r.has(h)){let l=r.get(h);if(zt(l))es(l,d,t)||(l.push(d),a++);else{let v=l;t(v,d)||(r.set(h,[v,d]),a++)}}else r.set(h,d),a++;return this},delete(d){let h=e(d);if(!r.has(h))return!1;let l=r.get(h);if(zt(l)){for(let v=0;v_(),[Symbol.toStringTag]:r[Symbol.toStringTag]};return p}function zt(e){return Array.isArray(e)}function If(e){return zt(e)?e:[e]}function b_(e){return typeof e=="string"}function MC(e){return typeof e=="number"}function On(e,t){return e!==void 0&&t(e)?e:void 0}function gi(e,t){return e!==void 0&&t(e)?e:N.fail(`Invalid cast. The supplied value ${e} did not pass the test '${N.getFunctionName(t)}'.`)}function Rn(e){}function $f(){return!1}function Pv(){return!0}function LC(){}function bt(e){return e}function Iv(e){return e.toLowerCase()}function Nv(e){return iy.test(e)?e.replace(iy,Iv):e}function JC(){throw new Error("Not implemented")}function ry(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Nn(e){let t=new Map;return r=>{let a=`${typeof r}:${r}`,_=t.get(a);return _===void 0&&!t.has(a)&&(_=e(r),t.set(a,_)),_}}function RC(e){let t=new WeakMap;return r=>{let a=t.get(r);return a===void 0&&!t.has(r)&&(a=e(r),t.set(r,a)),a}}function jC(e,t){return(...r)=>{let a=t.get(r);return a===void 0&&!t.has(r)&&(a=e(...r),t.set(r,a)),a}}function FC(e,t,r,a,_){if(_){let p=[];for(let d=0;dRd(p,(h,l)=>l(h),d)}else return a?p=>a(r(t(e(p)))):r?p=>r(t(e(p))):t?p=>t(e(p)):e?p=>e(p):p=>p}function _o(e,t){return e===t}function s_(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Ll(e,t){return _o(e,t)}function Ov(e,t){return e===t?0:e===void 0?-1:t===void 0?1:et(r,a)===-1?r:a)}function Bd(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toUpperCase(),t=t.toUpperCase(),et?1:0)}function qC(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toLowerCase(),t=t.toLowerCase(),et?1:0)}function Ci(e,t){return Ov(e,t)}function _g(e){return e?Bd:Ci}function zC(){return Yf}function Mv(e){Yf!==e&&(Yf=e,oy=void 0)}function WC(e,t){return(oy||(oy=Wv(Yf)))(e,t)}function VC(e,t,r,a){return e===t?0:e===void 0?-1:t===void 0?1:a(e[r],t[r])}function HC(e,t){return kr(e?1:0,t?1:0)}function Lv(e,t,r){let a=Math.max(2,Math.floor(e.length*.34)),_=Math.floor(e.length*.4)+1,p;for(let d of t){let h=r(d);if(h!==void 0&&Math.abs(h.length-e.length)<=a){if(h===e||h.length<3&&h.toLowerCase()!==e.toLowerCase())continue;let l=GC(e,h,_-.1);if(l===void 0)continue;N.assert(l<_),_=l,p=d}}return p}function GC(e,t,r){let a=new Array(t.length+1),_=new Array(t.length+1),p=r+.01;for(let h=0;h<=t.length;h++)a[h]=h;for(let h=1;h<=e.length;h++){let l=e.charCodeAt(h-1),v=Math.ceil(h>r?h-r:1),y=Math.floor(t.length>r+h?r+h:t.length);_[0]=h;let C=h;for(let k=1;kr)return;let S=a;a=_,_=S}let d=a[t.length];return d>r?void 0:d}function ts(e,t){let r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function XC(e,t){return ts(e,t)?e.slice(0,e.length-t.length):e}function $C(e,t){return ts(e,t)?e.slice(0,e.length-t.length):void 0}function eo(e,t){return e.indexOf(t)!==-1}function QC(e){let t=e.length;for(let r=t-1;r>0;r--){let a=e.charCodeAt(r);if(a>=48&&a<=57)do--r,a=e.charCodeAt(r);while(r>0&&a>=48&&a<=57);else if(r>4&&(a===110||a===78)){if(--r,a=e.charCodeAt(r),a!==105&&a!==73||(--r,a=e.charCodeAt(r),a!==109&&a!==77))break;--r,a=e.charCodeAt(r)}else break;if(a!==45&&a!==46)break;t=r}return t===e.length?e:e.slice(0,t)}function YC(e,t){for(let r=0;rr===t)}function KC(e,t){for(let r=0;r_&&(_=d.prefix.length,a=p)}return a}function Fr(e,t){return e.lastIndexOf(t,0)===0}function tE(e,t){return Fr(e,t)?e.substr(t.length):e}function Fv(e,t,r=bt){return Fr(r(e),r(t))?e.substring(t.length):void 0}function lg({prefix:e,suffix:t},r){return r.length>=e.length+t.length&&Fr(r,e)&&ts(r,t)}function rE(e,t){return r=>e(r)&&t(r)}function ug(...e){return(...t)=>{let r;for(let a of e)if(r=a(...t),r)return r;return r}}function nE(e){return(...t)=>!e(...t)}function iE(e){}function Qf(e){return e===void 0?void 0:[e]}function aE(e,t,r,a,_,p){p=p||Rn;let d=0,h=0,l=e.length,v=t.length,y=!1;for(;d=0&&Vi(e.charCodeAt(t));)t--;return e.slice(0,t+1)}function uE(){return!1}var $e,pg,qv,ny,zv,Jn,iy,ay,Wv,oy,Yf,qd,n_,gl,pE=Vt({"src/compiler/core.ts"(){"use strict";Dr(),$e=[],pg=new Map,qv=new Set,ny=(e=>(e[e.None=0]="None",e[e.CaseSensitive=1]="CaseSensitive",e[e.CaseInsensitive=2]="CaseInsensitive",e[e.Both=3]="Both",e))(ny||{}),zv=Array.prototype.at?(e,t)=>e==null?void 0:e.at(t):(e,t)=>{if(e&&(t=ty(e,t),t(e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Aggressive=2]="Aggressive",e[e.VeryAggressive=3]="VeryAggressive",e))(ay||{}),Wv=(()=>{let e,t,r=h();return l;function a(v,y,C){if(v===y)return 0;if(v===void 0)return-1;if(y===void 0)return 1;let S=C(v,y);return S<0?-1:S>0?1:0}function _(v){let y=new Intl.Collator(v,{usage:"sort",sensitivity:"variant"}).compare;return(C,S)=>a(C,S,y)}function p(v){if(v!==void 0)return d();return(C,S)=>a(C,S,y);function y(C,S){return C.localeCompare(S)}}function d(){return(C,S)=>a(C,S,v);function v(C,S){return y(C.toUpperCase(),S.toUpperCase())||y(C,S)}function y(C,S){return CS?1:0}}function h(){return typeof Intl=="object"&&typeof Intl.Collator=="function"?_:typeof String.prototype.localeCompare=="function"&&typeof String.prototype.toLocaleUpperCase=="function"&&"a".localeCompare("B")<0?p:d}function l(v){return v===void 0?e||(e=r(v)):v==="en-US"?t||(t=r(v)):r(v)}})(),qd=String.prototype.trim?e=>e.trim():e=>n_(gl(e)),n_=String.prototype.trimEnd?e=>e.trimEnd():lE,gl=String.prototype.trimStart?e=>e.trimStart():e=>e.replace(/^\s+/g,"")}}),sy,N,Vv=Vt({"src/compiler/debug.ts"(){"use strict";Dr(),Dr(),sy=(e=>(e[e.Off=0]="Off",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Verbose=4]="Verbose",e))(sy||{}),(e=>{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function r(q){return e.currentLogLevel<=q}e.shouldLog=r;function a(q,oe){e.loggingHost&&r(q)&&e.loggingHost.log(q,oe)}function _(q){a(3,q)}e.log=_,(q=>{function oe(z){a(1,z)}q.error=oe;function ge(z){a(2,z)}q.warn=ge;function Se(z){a(3,z)}q.log=Se;function nt(z){a(4,z)}q.trace=nt})(_=e.log||(e.log={}));let p={};function d(){return t}e.getAssertionLevel=d;function h(q){let oe=t;if(t=q,q>oe)for(let ge of sg(p)){let Se=p[ge];Se!==void 0&&e[ge]!==Se.assertion&&q>=Se.level&&(e[ge]=Se,p[ge]=void 0)}}e.setAssertionLevel=h;function l(q){return t>=q}e.shouldAssert=l;function v(q,oe){return l(q)?!0:(p[oe]={level:q,assertion:e[oe]},e[oe]=Rn,!1)}function y(q,oe){debugger;let ge=new Error(q?`Debug Failure. ${q}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(ge,oe||y),ge}e.fail=y;function C(q,oe,ge){return y(`${oe||"Unexpected node."}\r -Node ${Xt(q.kind)} was unexpected.`,ge||C)}e.failBadSyntaxKind=C;function S(q,oe,ge,Se){q||(oe=oe?`False expression: ${oe}`:"False expression.",ge&&(oe+=`\r -Verbose Debug Information: `+(typeof ge=="string"?ge:ge())),y(oe,Se||S))}e.assert=S;function k(q,oe,ge,Se,nt){if(q!==oe){let z=ge?Se?`${ge} ${Se}`:ge:"";y(`Expected ${q} === ${oe}. ${z}`,nt||k)}}e.assertEqual=k;function L(q,oe,ge,Se){q>=oe&&y(`Expected ${q} < ${oe}. ${ge||""}`,Se||L)}e.assertLessThan=L;function G(q,oe,ge){q>oe&&y(`Expected ${q} <= ${oe}`,ge||G)}e.assertLessThanOrEqual=G;function K(q,oe,ge){q= ${oe}`,ge||K)}e.assertGreaterThanOrEqual=K;function ue(q,oe,ge){q==null&&y(oe,ge||ue)}e.assertIsDefined=ue;function Y(q,oe,ge){return ue(q,oe,ge||Y),q}e.checkDefined=Y;function B(q,oe,ge){for(let Se of q)ue(Se,oe,ge||B)}e.assertEachIsDefined=B;function ae(q,oe,ge){return B(q,oe,ge||ae),q}e.checkEachDefined=ae;function Ce(q,oe="Illegal value:",ge){let Se=typeof q=="object"&&Qr(q,"kind")&&Qr(q,"pos")?"SyntaxKind: "+Xt(q.kind):JSON.stringify(q);return y(`${oe} ${Se}`,ge||Ce)}e.assertNever=Ce;function Ze(q,oe,ge,Se){v(1,"assertEachNode")&&S(oe===void 0||so(q,oe),ge||"Unexpected node.",()=>`Node array did not pass test '${or(oe)}'.`,Se||Ze)}e.assertEachNode=Ze;function qe(q,oe,ge,Se){v(1,"assertNode")&&S(q!==void 0&&(oe===void 0||oe(q)),ge||"Unexpected node.",()=>`Node ${Xt(q==null?void 0:q.kind)} did not pass test '${or(oe)}'.`,Se||qe)}e.assertNode=qe;function rt(q,oe,ge,Se){v(1,"assertNotNode")&&S(q===void 0||oe===void 0||!oe(q),ge||"Unexpected node.",()=>`Node ${Xt(q.kind)} should not have passed test '${or(oe)}'.`,Se||rt)}e.assertNotNode=rt;function it(q,oe,ge,Se){v(1,"assertOptionalNode")&&S(oe===void 0||q===void 0||oe(q),ge||"Unexpected node.",()=>`Node ${Xt(q==null?void 0:q.kind)} did not pass test '${or(oe)}'.`,Se||it)}e.assertOptionalNode=it;function Ir(q,oe,ge,Se){v(1,"assertOptionalToken")&&S(oe===void 0||q===void 0||q.kind===oe,ge||"Unexpected node.",()=>`Node ${Xt(q==null?void 0:q.kind)} was not a '${Xt(oe)}' token.`,Se||Ir)}e.assertOptionalToken=Ir;function ar(q,oe,ge){v(1,"assertMissingNode")&&S(q===void 0,oe||"Unexpected node.",()=>`Node ${Xt(q.kind)} was unexpected'.`,ge||ar)}e.assertMissingNode=ar;function ci(q){}e.type=ci;function or(q){if(typeof q!="function")return"";if(Qr(q,"name"))return q.name;{let oe=Function.prototype.toString.call(q),ge=/^function\s+([\w$]+)\s*\(/.exec(oe);return ge?ge[1]:""}}e.getFunctionName=or;function Nr(q){return`{ name: ${Vo(q.escapedName)}; flags: ${Tr(q.flags)}; declarations: ${Aa(q.declarations,oe=>Xt(oe.kind))} }`}e.formatSymbol=Nr;function Ge(q=0,oe,ge){let Se=Ur(oe);if(q===0)return Se.length>0&&Se[0][0]===0?Se[0][1]:"0";if(ge){let nt=[],z=q;for(let[X,ee]of Se){if(X>q)break;X!==0&&X&q&&(nt.push(ee),z&=~X)}if(z===0)return nt.join("|")}else for(let[nt,z]of Se)if(nt===q)return z;return q.toString()}e.formatEnum=Ge;let Gt=new Map;function Ur(q){let oe=Gt.get(q);if(oe)return oe;let ge=[];for(let nt in q){let z=q[nt];typeof z=="number"&&ge.push([z,nt])}let Se=Ev(ge,(nt,z)=>kr(nt[0],z[0]));return Gt.set(q,Se),Se}function Xt(q){return Ge(q,td,!1)}e.formatSyntaxKind=Xt;function Tn(q){return Ge(q,fd,!1)}e.formatSnippetKind=Tn;function Sn(q){return Ge(q,ud,!1)}e.formatScriptKind=Sn;function sr(q){return Ge(q,rd,!0)}e.formatNodeFlags=sr;function $t(q){return Ge(q,nd,!0)}e.formatModifierFlags=$t;function St(q){return Ge(q,pd,!0)}e.formatTransformFlags=St;function xn(q){return Ge(q,dd,!0)}e.formatEmitFlags=xn;function Tr(q){return Ge(q,od,!0)}e.formatSymbolFlags=Tr;function vt(q){return Ge(q,sd,!0)}e.formatTypeFlags=vt;function ct(q){return Ge(q,cd,!0)}e.formatSignatureFlags=ct;function Ut(q){return Ge(q,_d,!0)}e.formatObjectFlags=Ut;function fr(q){return Ge(q,bl,!0)}e.formatFlowFlags=fr;function ht(q){return Ge(q,id,!0)}e.formatRelationComparisonResult=ht;function wn(q){return Ge(q,CheckMode,!0)}e.formatCheckMode=wn;function Tt(q){return Ge(q,SignatureCheckMode,!0)}e.formatSignatureCheckMode=Tt;function Or(q){return Ge(q,TypeFacts,!0)}e.formatTypeFacts=Or;let pt=!1,Mr;function at(q){"__debugFlowFlags"in q||Object.defineProperties(q,{__tsDebuggerDisplay:{value(){let oe=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",ge=this.flags&~(2048-1);return`${oe}${ge?` (${fr(ge)})`:""}`}},__debugFlowFlags:{get(){return Ge(this.flags,bl,!0)}},__debugToString:{value(){return Ae(this)}}})}function er(q){pt&&(typeof Object.setPrototypeOf=="function"?(Mr||(Mr=Object.create(Object.prototype),at(Mr)),Object.setPrototypeOf(q,Mr)):at(q))}e.attachFlowNodeDebugInfo=er;let Qt;function tn(q){"__tsDebuggerDisplay"in q||Object.defineProperties(q,{__tsDebuggerDisplay:{value(oe){return oe=String(oe).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]"),`NodeArray ${oe}`}}})}function Bn(q){pt&&(typeof Object.setPrototypeOf=="function"?(Qt||(Qt=Object.create(Array.prototype),tn(Qt)),Object.setPrototypeOf(q,Qt)):tn(q))}e.attachNodeArrayDebugInfo=Bn;function Un(){if(pt)return;let q=new WeakMap,oe=new WeakMap;Object.defineProperties(wt.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let Se=this.flags&33554432?"TransientSymbol":"Symbol",nt=this.flags&-33554433;return`${Se} '${hd(this)}'${nt?` (${Tr(nt)})`:""}`}},__debugFlags:{get(){return Tr(this.flags)}}}),Object.defineProperties(wt.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let Se=this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&67359327?`IntrinsicType ${this.intrinsicName}`:this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",nt=this.flags&524288?this.objectFlags&-1344:0;return`${Se}${this.symbol?` '${hd(this.symbol)}'`:""}${nt?` (${Ut(nt)})`:""}`}},__debugFlags:{get(){return vt(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?Ut(this.objectFlags):""}},__debugTypeToString:{value(){let Se=q.get(this);return Se===void 0&&(Se=this.checker.typeToString(this),q.set(this,Se)),Se}}}),Object.defineProperties(wt.getSignatureConstructor().prototype,{__debugFlags:{get(){return ct(this.flags)}},__debugSignatureToString:{value(){var Se;return(Se=this.checker)==null?void 0:Se.signatureToString(this)}}});let ge=[wt.getNodeConstructor(),wt.getIdentifierConstructor(),wt.getTokenConstructor(),wt.getSourceFileConstructor()];for(let Se of ge)Qr(Se.prototype,"__debugKind")||Object.defineProperties(Se.prototype,{__tsDebuggerDisplay:{value(){return`${wa(this)?"GeneratedIdentifier":Ee(this)?`Identifier '${Ot(this)}'`:jr(this)?`PrivateIdentifier '${Ot(this)}'`:mn(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:lo(this)?`NumericLiteral ${this.text}`:o6(this)?`BigIntLiteral ${this.text}n`:No(this)?"TypeParameterDeclaration":Ma(this)?"ParameterDeclaration":J_(this)?"ConstructorDeclaration":m_(this)?"GetAccessorDeclaration":Qo(this)?"SetAccessorDeclaration":c6(this)?"CallSignatureDeclaration":Vx(this)?"ConstructSignatureDeclaration":l6(this)?"IndexSignatureDeclaration":Hx(this)?"TypePredicateNode":R_(this)?"TypeReferenceNode":tu(this)?"FunctionTypeNode":u6(this)?"ConstructorTypeNode":Gx(this)?"TypeQueryNode":Am(this)?"TypeLiteralNode":Xx(this)?"ArrayTypeNode":$x(this)?"TupleTypeNode":Qx(this)?"OptionalTypeNode":Yx(this)?"RestTypeNode":Kx(this)?"UnionTypeNode":Zx(this)?"IntersectionTypeNode":e8(this)?"ConditionalTypeNode":t8(this)?"InferTypeNode":f6(this)?"ParenthesizedTypeNode":d6(this)?"ThisTypeNode":r8(this)?"TypeOperatorNode":n8(this)?"IndexedAccessTypeNode":i8(this)?"MappedTypeNode":m6(this)?"LiteralTypeNode":p6(this)?"NamedTupleMember":ru(this)?"ImportTypeNode":Xt(this.kind)}${this.flags?` (${sr(this.flags)})`:""}`}},__debugKind:{get(){return Xt(this.kind)}},__debugNodeFlags:{get(){return sr(this.flags)}},__debugModifierFlags:{get(){return $t(lS(this))}},__debugTransformFlags:{get(){return St(this.transformFlags)}},__debugIsParseTreeNode:{get(){return Tl(this)}},__debugEmitFlags:{get(){return xn(ti(this))}},__debugGetText:{value(nt){if(Ta(this))return"";let z=oe.get(this);if(z===void 0){let X=Fl(this),ee=X&&ri(X);z=ee?Xo(ee,X,nt):"",oe.set(this,z)}return z}}});pt=!0}e.enableDebugInfo=Un;function rn(q){let oe=q&7,ge=oe===0?"in out":oe===3?"[bivariant]":oe===2?"in":oe===1?"out":oe===4?"[independent]":"";return q&8?ge+=" (unmeasurable)":q&16&&(ge+=" (unreliable)"),ge}e.formatVariance=rn;class nn{__debugToString(){var oe;switch(this.kind){case 3:return((oe=this.debugInfo)==null?void 0:oe.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return ey(this.sources,this.targets||Aa(this.sources,()=>"any"),(ge,Se)=>`${ge.__debugTypeToString()} -> ${typeof Se=="string"?Se:Se.__debugTypeToString()}`).join(", ");case 2:return ey(this.sources,this.targets,(ge,Se)=>`${ge.__debugTypeToString()} -> ${Se().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(` +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.typescript=e()}})(function(){"use strict";var W5=Object.create;var wf=Object.defineProperty;var V5=Object.getOwnPropertyDescriptor;var H5=Object.getOwnPropertyNames;var G5=Object.getPrototypeOf,X5=Object.prototype.hasOwnProperty;var E6=(e,t)=>()=>(e&&(t=e(e=0)),t);var mt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$h=(e,t)=>{for(var n in t)wf(e,n,{get:t[n],enumerable:!0})},C6=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let _ of H5(t))!X5.call(e,_)&&_!==n&&wf(e,_,{get:()=>t[_],enumerable:!(a=V5(t,_))||a.enumerable});return e};var Ot=(e,t,n)=>(n=e!=null?W5(G5(e)):{},C6(t||!e||!e.__esModule?wf(n,"default",{value:e,enumerable:!0}):n,e)),Ef=e=>C6(wf({},"__esModule",{value:!0}),e);var Cf={};$h(Cf,{default:()=>Q5});var $5,Q5,Af=E6(()=>{$5=()=>()=>{},Q5=$5});var lt=mt((Iz,D7)=>{var Y5=Object.defineProperty,uv=Object.getOwnPropertyNames,It=(e,t)=>function(){return e&&(t=(0,e[uv(e)[0]])(e=0)),t},K5=(e,t)=>function(){return t||(0,e[uv(e)[0]])((t={exports:{}}).exports,t),t.exports},_g=(e,t)=>{for(var n in t)Y5(e,n,{get:t[n],enumerable:!0})},jd,Xf,ry,Z5=It({"src/compiler/corePublic.ts"(){"use strict";jd="5.3",Xf="5.3.3",ry=(e=>(e[e.LessThan=-1]="LessThan",e[e.EqualTo=0]="EqualTo",e[e.GreaterThan=1]="GreaterThan",e))(ry||{})}});function eo(e){return e?e.length:0}function wn(e,t){if(e)for(let n=0;n=0;n--){let a=t(e[n],n);if(a)return a}}function cg(e,t){if(e!==void 0)for(let n=0;n=0;a--){let _=e[a];if(t(_,a))return _}}function ul(e,t,n){if(e===void 0)return-1;for(let a=n??0;a=0;a--)if(t(e[a],a))return a;return-1}function a9(e,t){for(let n=0;nn(a,t[_]))}function fv(e,t,n){for(let a=n||0;a{let p=t(_,a);if(p!==void 0){let[m,y]=p;m!==void 0&&y!==void 0&&n.set(m,y)}}),n}function m9(e,t,n){if(e.has(t))return e.get(t);let a=n();return e.set(t,a),a}function h9(e,t){return e.has(t)?!1:(e.add(t),!0)}function*y9(e){yield e}function g9(e,t,n){let a;if(e){a=[];let _=e.length,p,m,y=0,u=0;for(;y<_;){for(;u<_;){let x=e[u];if(m=t(x,u),u===0)p=m;else if(m!==p)break;u++}if(y{let[p,m]=t(_,a);n.set(p,m)}),n}function Ze(e,t){if(e)if(t){for(let n of e)if(t(n))return!0}else return e.length>0;return!1}function v9(e,t,n){let a;for(let _=0;_e[m])}function x9(e,t){let n=[];for(let a of e)Ll(n,a,t);return n}function hv(e,t,n){return e.length===0?[]:e.length===1?e.slice():n?S9(e,t,n):x9(e,t)}function w9(e,t){if(e.length===0)return Je;let n=e[0],a=[n];for(let _=1;_0&&(_&=-2),_&2&&a(p,u)>0&&(_&=-3),p=u}return _}function k9(e,t,n=_o){if(!e||!t)return e===t;if(e.length!==t.length)return!1;for(let a=0;a0&&I.assertGreaterThanOrEqual(n(t[p],t[p-1]),0);t:for(let m=_;_m&&I.assertGreaterThanOrEqual(n(e[_],e[_-1]),0),n(t[p],e[_])){case-1:a.push(t[p]);continue e;case 0:continue e;case 1:continue t}}return a}function Et(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function I9(e,t){return e===void 0?t:t===void 0?e:$t(e)?$t(t)?h_(e,t):Et(e,t):$t(t)?Et(t,e):[e,t]}function ay(e,t){return t<0?e.length+t:t}function zn(e,t,n,a){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(n,a);n=n===void 0?0:ay(t,n),a=a===void 0?t.length:ay(t,a);for(let _=n;_n(e[a],e[_])||Mn(a,_))}function $f(e,t){return e.length===0?e:e.slice().sort(t)}function*N9(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function vv(e,t){let n=ug(e);return bv(e,n,t),n.map(a=>e[a])}function O9(e,t,n,a){for(;n>1),u=n(e[y],y);switch(a(u,t)){case-1:p=y+1;break;case 0:return y;case 1:m=y-1;break}}return~p}function Bd(e,t,n,a,_){if(e&&e.length>0){let p=e.length;if(p>0){let m=a===void 0||a<0?0:a,y=_===void 0||m+_>p-1?p-1:m+_,u;for(arguments.length<=2?(u=e[m],m++):u=n;m<=y;)u=t(u,e[m],m),m++;return u}}return n}function Wn(e,t){return Wr.call(e,t)}function Sv(e,t){return Wr.call(e,t)?e[t]:void 0}function fg(e){let t=[];for(let n in e)Wr.call(e,n)&&t.push(n);return t}function F9(e){let t=[];do{let n=Object.getOwnPropertyNames(e);for(let a of n)Ll(t,a)}while(e=Object.getPrototypeOf(e));return t}function B9(e){let t=[];for(let n in e)Wr.call(e,n)&&t.push(e[n]);return t}function U9(e,t){let n=new Array(e);for(let a=0;a100&&n>t.length>>1){let y=t.length-n;t.copyWithin(0,n),t.length=y,n=0}return m}return{enqueue:_,dequeue:p,isEmpty:a}}function Z9(e,t){let n=new Map,a=0;function*_(){for(let m of n.values())$t(m)?yield*m:yield m}let p={has(m){let y=e(m);if(!n.has(y))return!1;let u=n.get(y);if(!$t(u))return t(u,m);for(let x of u)if(t(x,m))return!0;return!1},add(m){let y=e(m);if(n.has(y)){let u=n.get(y);if($t(u))rs(u,m,t)||(u.push(m),a++);else{let x=u;t(x,m)||(n.set(y,[x,m]),a++)}}else n.set(y,m),a++;return this},delete(m){let y=e(m);if(!n.has(y))return!1;let u=n.get(y);if($t(u)){for(let x=0;x_(),[Symbol.toStringTag]:n[Symbol.toStringTag]};return p}function $t(e){return Array.isArray(e)}function Nf(e){return $t(e)?e:[e]}function g_(e){return typeof e=="string"}function eE(e){return typeof e=="number"}function Ur(e,t){return e!==void 0&&t(e)?e:void 0}function wi(e,t){return e!==void 0&&t(e)?e:I.fail(`Invalid cast. The supplied value ${e} did not pass the test '${I.getFunctionName(t)}'.`)}function gr(e){}function Qf(){return!1}function Ev(){return!0}function tE(){}function bt(e){return e}function Cv(e){return e.toLowerCase()}function Av(e){return sy.test(e)?e.replace(sy,Cv):e}function nE(){throw new Error("Not implemented")}function Yf(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Fr(e){let t=new Map;return n=>{let a=`${typeof n}:${n}`,_=t.get(a);return _===void 0&&!t.has(a)&&(_=e(n),t.set(a,_)),_}}function rE(e){let t=new WeakMap;return n=>{let a=t.get(n);return a===void 0&&!t.has(n)&&(a=e(n),t.set(n,a)),a}}function iE(e,t){return(...n)=>{let a=t.get(n);return a===void 0&&!t.has(n)&&(a=e(...n),t.set(n,a)),a}}function aE(e,t,n,a,_){if(_){let p=[];for(let m=0;mBd(p,(y,u)=>u(y),m)}else return a?p=>a(n(t(e(p)))):n?p=>n(t(e(p))):t?p=>t(e(p)):e?p=>e(p):p=>p}function _o(e,t){return e===t}function s_(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Rl(e,t){return _o(e,t)}function kv(e,t){return e===t?0:e===void 0?-1:t===void 0?1:et(n,a)===-1?n:a)}function zd(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toUpperCase(),t=t.toUpperCase(),et?1:0)}function _E(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toLowerCase(),t=t.toLowerCase(),et?1:0)}function Ii(e,t){return kv(e,t)}function dg(e){return e?zd:Ii}function cE(){return Zf}function Dv(e){Zf!==e&&(Zf=e,cy=void 0)}function lE(e,t){return(cy||(cy=jv(Zf)))(e,t)}function uE(e,t,n,a){return e===t?0:e===void 0?-1:t===void 0?1:a(e[n],t[n])}function pE(e,t){return Mn(e?1:0,t?1:0)}function Pv(e,t,n){let a=Math.max(2,Math.floor(e.length*.34)),_=Math.floor(e.length*.4)+1,p;for(let m of t){let y=n(m);if(y!==void 0&&Math.abs(y.length-e.length)<=a){if(y===e||y.length<3&&y.toLowerCase()!==e.toLowerCase())continue;let u=fE(e,y,_-.1);if(u===void 0)continue;I.assert(u<_),_=u,p=m}}return p}function fE(e,t,n){let a=new Array(t.length+1),_=new Array(t.length+1),p=n+.01;for(let y=0;y<=t.length;y++)a[y]=y;for(let y=1;y<=e.length;y++){let u=e.charCodeAt(y-1),x=Math.ceil(y>n?y-n:1),d=Math.floor(t.length>n+y?n+y:t.length);_[0]=y;let S=y;for(let A=1;An)return;let T=a;a=_,_=T}let m=a[t.length];return m>n?void 0:m}function is(e,t){let n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}function dE(e,t){return is(e,t)?e.slice(0,e.length-t.length):e}function mE(e,t){return is(e,t)?e.slice(0,e.length-t.length):void 0}function hE(e){let t=e.length;for(let n=t-1;n>0;n--){let a=e.charCodeAt(n);if(a>=48&&a<=57)do--n,a=e.charCodeAt(n);while(n>0&&a>=48&&a<=57);else if(n>4&&(a===110||a===78)){if(--n,a=e.charCodeAt(n),a!==105&&a!==73||(--n,a=e.charCodeAt(n),a!==109&&a!==77))break;--n,a=e.charCodeAt(n)}else break;if(a!==45&&a!==46)break;t=n}return t===e.length?e:e.slice(0,t)}function yE(e,t){for(let n=0;nn===t)}function gE(e,t){for(let n=0;n_&&(_=m.prefix.length,a=p)}return a}function Hn(e,t){return e.lastIndexOf(t,0)===0}function TE(e,t){return Hn(e,t)?e.substr(t.length):e}function Mv(e,t,n=bt){return Hn(n(e),n(t))?e.substring(t.length):void 0}function hg({prefix:e,suffix:t},n){return n.length>=e.length+t.length&&Hn(n,e)&&is(n,t)}function SE(e,t){return n=>e(n)&&t(n)}function yg(...e){return(...t)=>{let n;for(let a of e)if(n=a(...t),n)return n;return n}}function xE(e){return(...t)=>!e(...t)}function wE(e){}function Kf(e){return e===void 0?void 0:[e]}function EE(e,t,n,a,_,p){p=p||gr;let m=0,y=0,u=e.length,x=t.length,d=!1;for(;m(e[e.None=0]="None",e[e.CaseSensitive=1]="CaseSensitive",e[e.CaseInsensitive=2]="CaseInsensitive",e[e.Both=3]="Both",e))(oy||{}),Rv=Array.prototype.at?(e,t)=>e==null?void 0:e.at(t):(e,t)=>{if(e&&(t=ay(e,t),t(e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Aggressive=2]="Aggressive",e[e.VeryAggressive=3]="VeryAggressive",e))(_y||{}),jv=(()=>{return t;function e(n,a,_){if(n===a)return 0;if(n===void 0)return-1;if(a===void 0)return 1;let p=_(n,a);return p<0?-1:p>0?1:0}function t(n){let a=new Intl.Collator(n,{usage:"sort",sensitivity:"variant"}).compare;return(_,p)=>e(_,p,a)}})()}}),ly,I,Fv=It({"src/compiler/debug.ts"(){"use strict";En(),En(),ly=(e=>(e[e.Off=0]="Off",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Verbose=4]="Verbose",e))(ly||{}),(e=>{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function n(U){return e.currentLogLevel<=U}e.shouldLog=n;function a(U,ie){e.loggingHost&&n(U)&&e.loggingHost.log(U,ie)}function _(U){a(3,U)}e.log=_,(U=>{function ie($e){a(1,$e)}U.error=ie;function ye($e){a(2,$e)}U.warn=ye;function Te($e){a(3,$e)}U.log=Te;function tt($e){a(4,$e)}U.trace=tt})(_=e.log||(e.log={}));let p={};function m(){return t}e.getAssertionLevel=m;function y(U){let ie=t;if(t=U,U>ie)for(let ye of fg(p)){let Te=p[ye];Te!==void 0&&e[ye]!==Te.assertion&&U>=Te.level&&(e[ye]=Te,p[ye]=void 0)}}e.setAssertionLevel=y;function u(U){return t>=U}e.shouldAssert=u;function x(U,ie){return u(U)?!0:(p[ie]={level:U,assertion:e[ie]},e[ie]=gr,!1)}function d(U,ie){debugger;let ye=new Error(U?`Debug Failure. ${U}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(ye,ie||d),ye}e.fail=d;function S(U,ie,ye){return d(`${ie||"Unexpected node."}\r +Node ${vt(U.kind)} was unexpected.`,ye||S)}e.failBadSyntaxKind=S;function T(U,ie,ye,Te){U||(ie=ie?`False expression: ${ie}`:"False expression.",ye&&(ie+=`\r +Verbose Debug Information: `+(typeof ye=="string"?ye:ye())),d(ie,Te||T))}e.assert=T;function A(U,ie,ye,Te,tt){if(U!==ie){let $e=ye?Te?`${ye} ${Te}`:ye:"";d(`Expected ${U} === ${ie}. ${$e}`,tt||A)}}e.assertEqual=A;function N(U,ie,ye,Te){U>=ie&&d(`Expected ${U} < ${ie}. ${ye||""}`,Te||N)}e.assertLessThan=N;function q(U,ie,ye){U>ie&&d(`Expected ${U} <= ${ie}`,ye||q)}e.assertLessThanOrEqual=q;function Q(U,ie,ye){U= ${ie}`,ye||Q)}e.assertGreaterThanOrEqual=Q;function se(U,ie,ye){U==null&&d(ie,ye||se)}e.assertIsDefined=se;function fe(U,ie,ye){return se(U,ie,ye||fe),U}e.checkDefined=fe;function F(U,ie,ye){for(let Te of U)se(Te,ie,ye||F)}e.assertEachIsDefined=F;function W(U,ie,ye){return F(U,ie,ye||W),U}e.checkEachDefined=W;function Se(U,ie="Illegal value:",ye){let Te=typeof U=="object"&&Wn(U,"kind")&&Wn(U,"pos")?"SyntaxKind: "+vt(U.kind):JSON.stringify(U);return d(`${ie} ${Te}`,ye||Se)}e.assertNever=Se;function Qe(U,ie,ye,Te){x(1,"assertEachNode")&&T(ie===void 0||so(U,ie),ye||"Unexpected node.",()=>`Node array did not pass test '${gn(ie)}'.`,Te||Qe)}e.assertEachNode=Qe;function Be(U,ie,ye,Te){x(1,"assertNode")&&T(U!==void 0&&(ie===void 0||ie(U)),ye||"Unexpected node.",()=>`Node ${vt(U==null?void 0:U.kind)} did not pass test '${gn(ie)}'.`,Te||Be)}e.assertNode=Be;function st(U,ie,ye,Te){x(1,"assertNotNode")&&T(U===void 0||ie===void 0||!ie(U),ye||"Unexpected node.",()=>`Node ${vt(U.kind)} should not have passed test '${gn(ie)}'.`,Te||st)}e.assertNotNode=st;function _t(U,ie,ye,Te){x(1,"assertOptionalNode")&&T(ie===void 0||U===void 0||ie(U),ye||"Unexpected node.",()=>`Node ${vt(U==null?void 0:U.kind)} did not pass test '${gn(ie)}'.`,Te||_t)}e.assertOptionalNode=_t;function hn(U,ie,ye,Te){x(1,"assertOptionalToken")&&T(ie===void 0||U===void 0||U.kind===ie,ye||"Unexpected node.",()=>`Node ${vt(U==null?void 0:U.kind)} was not a '${vt(ie)}' token.`,Te||hn)}e.assertOptionalToken=hn;function yn(U,ie,ye){x(1,"assertMissingNode")&&T(U===void 0,ie||"Unexpected node.",()=>`Node ${vt(U.kind)} was unexpected'.`,ye||yn)}e.assertMissingNode=yn;function fi(U){}e.type=fi;function gn(U){if(typeof U!="function")return"";if(Wn(U,"name"))return U.name;{let ie=Function.prototype.toString.call(U),ye=/^function\s+([\w$]+)\s*\(/.exec(ie);return ye?ye[1]:""}}e.getFunctionName=gn;function cr(U){return`{ name: ${Go(U.escapedName)}; flags: ${an(U.flags)}; declarations: ${xa(U.declarations,ie=>vt(ie.kind))} }`}e.formatSymbol=cr;function He(U=0,ie,ye){let Te=Gr(ie);if(U===0)return Te.length>0&&Te[0][0]===0?Te[0][1]:"0";if(ye){let tt=[],$e=U;for(let[Ut,St]of Te){if(Ut>U)break;Ut!==0&&Ut&U&&(tt.push(St),$e&=~Ut)}if($e===0)return tt.join("|")}else for(let[tt,$e]of Te)if(tt===U)return $e;return U.toString()}e.formatEnum=He;let Qn=new Map;function Gr(U){let ie=Qn.get(U);if(ie)return ie;let ye=[];for(let tt in U){let $e=U[tt];typeof $e=="number"&&ye.push([$e,tt])}let Te=vv(ye,(tt,$e)=>Mn(tt[0],$e[0]));return Qn.set(U,Te),Te}function vt(U){return He(U,rd,!1)}e.formatSyntaxKind=vt;function Jn(U){return He(U,md,!1)}e.formatSnippetKind=Jn;function Ar(U){return He(U,fd,!1)}e.formatScriptKind=Ar;function Ht(U){return He(U,id,!0)}e.formatNodeFlags=Ht;function rn(U){return He(U,ad,!0)}e.formatModifierFlags=rn;function at(U){return He(U,dd,!0)}e.formatTransformFlags=at;function kr(U){return He(U,hd,!0)}e.formatEmitFlags=kr;function an(U){return He(U,_d,!0)}e.formatSymbolFlags=an;function xt(U){return He(U,cd,!0)}e.formatTypeFlags=xt;function ut(U){return He(U,ud,!0)}e.formatSignatureFlags=ut;function Gt(U){return He(U,ld,!0)}e.formatObjectFlags=Gt;function cn(U){return He(U,Tl,!0)}e.formatFlowFlags=cn;function ht(U){return He(U,od,!0)}e.formatRelationComparisonResult=ht;function Dr(U){return He(U,CheckMode,!0)}e.formatCheckMode=Dr;function Tt(U){return He(U,SignatureCheckMode,!0)}e.formatSignatureCheckMode=Tt;function Rn(U){return He(U,TypeFacts,!0)}e.formatTypeFacts=Rn;let yt=!1,jn;function ct(U){"__debugFlowFlags"in U||Object.defineProperties(U,{__tsDebuggerDisplay:{value(){let ie=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",ye=this.flags&-2048;return`${ie}${ye?` (${cn(ye)})`:""}`}},__debugFlowFlags:{get(){return He(this.flags,Tl,!0)}},__debugToString:{value(){return De(this)}}})}function Kt(U){yt&&(typeof Object.setPrototypeOf=="function"?(jn||(jn=Object.create(Object.prototype),ct(jn)),Object.setPrototypeOf(U,jn)):ct(U))}e.attachFlowNodeDebugInfo=Kt;let Zt;function lr(U){"__tsDebuggerDisplay"in U||Object.defineProperties(U,{__tsDebuggerDisplay:{value(ie){return ie=String(ie).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]"),`NodeArray ${ie}`}}})}function di(U){yt&&(typeof Object.setPrototypeOf=="function"?(Zt||(Zt=Object.create(Array.prototype),lr(Zt)),Object.setPrototypeOf(U,Zt)):lr(U))}e.attachNodeArrayDebugInfo=di;function Xr(){if(yt)return;let U=new WeakMap,ie=new WeakMap;Object.defineProperties(Ct.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let Te=this.flags&33554432?"TransientSymbol":"Symbol",tt=this.flags&-33554433;return`${Te} '${gd(this)}'${tt?` (${an(tt)})`:""}`}},__debugFlags:{get(){return an(this.flags)}}}),Object.defineProperties(Ct.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let Te=this.flags&67359327?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",tt=this.flags&524288?this.objectFlags&-1344:0;return`${Te}${this.symbol?` '${gd(this.symbol)}'`:""}${tt?` (${Gt(tt)})`:""}`}},__debugFlags:{get(){return xt(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?Gt(this.objectFlags):""}},__debugTypeToString:{value(){let Te=U.get(this);return Te===void 0&&(Te=this.checker.typeToString(this),U.set(this,Te)),Te}}}),Object.defineProperties(Ct.getSignatureConstructor().prototype,{__debugFlags:{get(){return ut(this.flags)}},__debugSignatureToString:{value(){var Te;return(Te=this.checker)==null?void 0:Te.signatureToString(this)}}});let ye=[Ct.getNodeConstructor(),Ct.getIdentifierConstructor(),Ct.getTokenConstructor(),Ct.getSourceFileConstructor()];for(let Te of ye)Wn(Te.prototype,"__debugKind")||Object.defineProperties(Te.prototype,{__tsDebuggerDisplay:{value(){return`${va(this)?"GeneratedIdentifier":Ae(this)?`Identifier '${Lt(this)}'`:Vn(this)?`PrivateIdentifier '${Lt(this)}'`:Tr(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:lo(this)?`NumericLiteral ${this.text}`:db(this)?`BigIntLiteral ${this.text}n`:Lo(this)?"TypeParameterDeclaration":Pa(this)?"ParameterDeclaration":L_(this)?"ConstructorDeclaration":d_(this)?"GetAccessorDeclaration":Zo(this)?"SetAccessorDeclaration":yb(this)?"CallSignatureDeclaration":qx(this)?"ConstructSignatureDeclaration":gb(this)?"IndexSignatureDeclaration":zx(this)?"TypePredicateNode":J_(this)?"TypeReferenceNode":tu(this)?"FunctionTypeNode":bb(this)?"ConstructorTypeNode":Wx(this)?"TypeQueryNode":Im(this)?"TypeLiteralNode":Vx(this)?"ArrayTypeNode":Hx(this)?"TupleTypeNode":Gx(this)?"OptionalTypeNode":Xx(this)?"RestTypeNode":$x(this)?"UnionTypeNode":Qx(this)?"IntersectionTypeNode":Yx(this)?"ConditionalTypeNode":Kx(this)?"InferTypeNode":Tb(this)?"ParenthesizedTypeNode":Sb(this)?"ThisTypeNode":Zx(this)?"TypeOperatorNode":e8(this)?"IndexedAccessTypeNode":t8(this)?"MappedTypeNode":xb(this)?"LiteralTypeNode":vb(this)?"NamedTupleMember":nu(this)?"ImportTypeNode":vt(this.kind)}${this.flags?` (${Ht(this.flags)})`:""}`}},__debugKind:{get(){return vt(this.kind)}},__debugNodeFlags:{get(){return Ht(this.flags)}},__debugModifierFlags:{get(){return rn(iS(this))}},__debugTransformFlags:{get(){return at(this.transformFlags)}},__debugIsParseTreeNode:{get(){return xl(this)}},__debugEmitFlags:{get(){return kr(ai(this))}},__debugGetText:{value(tt){if(ya(this))return"";let $e=ie.get(this);if($e===void 0){let Ut=Ul(this),St=Ut&&oi(Ut);$e=St?Qo(St,Ut,tt):"",ie.set(this,$e)}return $e}}});yt=!0}e.enableDebugInfo=Xr;function Yn(U){let ie=U&7,ye=ie===0?"in out":ie===3?"[bivariant]":ie===2?"in":ie===1?"out":ie===4?"[independent]":"";return U&8?ye+=" (unmeasurable)":U&16&&(ye+=" (unreliable)"),ye}e.formatVariance=Yn;class Kn{__debugToString(){var ie;switch(this.kind){case 3:return((ie=this.debugInfo)==null?void 0:ie.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return iy(this.sources,this.targets||xa(this.sources,()=>"any"),(ye,Te)=>`${ye.__debugTypeToString()} -> ${typeof Te=="string"?Te:Te.__debugTypeToString()}`).join(", ");case 2:return iy(this.sources,this.targets,(ye,Te)=>`${ye.__debugTypeToString()} -> ${Te().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(` `).join(` `)} m2: ${this.mapper2.__debugToString().split(` `).join(` - `)}`;default:return Ce(this)}}}e.DebugTypeMapper=nn;function Di(q){return e.isDebugging?Object.setPrototypeOf(q,nn.prototype):q}e.attachDebugPrototypeIfDebug=Di;function qn(q){return console.log(Ae(q))}e.printControlFlowGraph=qn;function Ae(q){let oe=-1;function ge(x){return x.id||(x.id=oe,oe--),x.id}let Se;(x=>{x.lr="\u2500",x.ud="\u2502",x.dr="\u256D",x.dl="\u256E",x.ul="\u256F",x.ur="\u2570",x.udr="\u251C",x.udl="\u2524",x.dlr="\u252C",x.ulr="\u2534",x.udlr="\u256B"})(Se||(Se={}));let nt;(x=>{x[x.None=0]="None",x[x.Up=1]="Up",x[x.Down=2]="Down",x[x.Left=4]="Left",x[x.Right=8]="Right",x[x.UpDown=3]="UpDown",x[x.LeftRight=12]="LeftRight",x[x.UpLeft=5]="UpLeft",x[x.UpRight=9]="UpRight",x[x.DownLeft=6]="DownLeft",x[x.DownRight=10]="DownRight",x[x.UpDownLeft=7]="UpDownLeft",x[x.UpDownRight=11]="UpDownRight",x[x.UpLeftRight=13]="UpLeftRight",x[x.DownLeftRight=14]="DownLeftRight",x[x.UpDownLeftRight=15]="UpDownLeftRight",x[x.NoChildren=16]="NoChildren"})(nt||(nt={}));let z=2032,X=882,ee=Object.create(null),xe=[],ke=[],Le=ia(q,new Set);for(let x of xe)x.text=oa(x.flowNode,x.circular),En(x);let lt=Ii(Le),yt=aa(lt);return Vn(Le,0),Mt();function jt(x){return!!(x.flags&128)}function qr(x){return!!(x.flags&12)&&!!x.antecedents}function na(x){return!!(x.flags&z)}function Cn(x){return!!(x.flags&X)}function zn(x){let f=[];for(let $ of x.edges)$.source===x&&f.push($.target);return f}function Pi(x){let f=[];for(let $ of x.edges)$.target===x&&f.push($.source);return f}function ia(x,f){let $=ge(x),Q=ee[$];if(Q&&f.has(x))return Q.circular=!0,Q={id:-1,flowNode:x,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},xe.push(Q),Q;if(f.add(x),!Q)if(ee[$]=Q={id:$,flowNode:x,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},xe.push(Q),qr(x))for(let O of x.antecedents)Wn(Q,O,f);else na(x)&&Wn(Q,x.antecedent,f);return f.delete(x),Q}function Wn(x,f,$){let Q=ia(f,$),O={source:x,target:Q};ke.push(O),x.edges.push(O),Q.edges.push(O)}function En(x){if(x.level!==-1)return x.level;let f=0;for(let $ of Pi(x))f=Math.max(f,En($)+1);return x.level=f}function Ii(x){let f=0;for(let $ of zn(x))f=Math.max(f,Ii($));return f+1}function aa(x){let f=j(Array(x),0);for(let $ of xe)f[$.level]=Math.max(f[$.level],$.text.length);return f}function Vn(x,f){if(x.lane===-1){x.lane=f,x.endLane=f;let $=zn(x);for(let Q=0;Q<$.length;Q++){Q>0&&f++;let O=$[Q];Vn(O,f),O.endLane>x.endLane&&(f=O.endLane)}x.endLane=f}}function Sr(x){if(x&2)return"Start";if(x&4)return"Branch";if(x&8)return"Loop";if(x&16)return"Assignment";if(x&32)return"True";if(x&64)return"False";if(x&128)return"SwitchClause";if(x&256)return"ArrayMutation";if(x&512)return"Call";if(x&1024)return"ReduceLabel";if(x&1)return"Unreachable";throw new Error}function Je(x){let f=ri(x);return Xo(f,x,!1)}function oa(x,f){let $=Sr(x.flags);if(f&&($=`${$}#${ge(x)}`),Cn(x))x.node&&($+=` (${Je(x.node)})`);else if(jt(x)){let Q=[];for(let O=x.clauseStart;OMath.max(be,he.lane),0)+1,$=j(Array(f),""),Q=yt.map(()=>Array(f)),O=yt.map(()=>j(Array(f),0));for(let be of xe){Q[be.level][be.lane]=be;let he=zn(be);for(let we=0;we0&&(Ye|=1),we0&&(Ye|=1),we0?O[be-1][he]:0,we=he>0?O[be][he-1]:0,et=O[be][he];et||(Re&8&&(et|=12),we&2&&(et|=3),O[be][he]=et)}for(let be=0;be{w.lr="\u2500",w.ud="\u2502",w.dr="\u256D",w.dl="\u256E",w.ul="\u256F",w.ur="\u2570",w.udr="\u251C",w.udl="\u2524",w.dlr="\u252C",w.ulr="\u2534",w.udlr="\u256B"})(Te||(Te={}));let tt;(w=>{w[w.None=0]="None",w[w.Up=1]="Up",w[w.Down=2]="Down",w[w.Left=4]="Left",w[w.Right=8]="Right",w[w.UpDown=3]="UpDown",w[w.LeftRight=12]="LeftRight",w[w.UpLeft=5]="UpLeft",w[w.UpRight=9]="UpRight",w[w.DownLeft=6]="DownLeft",w[w.DownRight=10]="DownRight",w[w.UpDownLeft=7]="UpDownLeft",w[w.UpDownRight=11]="UpDownRight",w[w.UpLeftRight=13]="UpLeftRight",w[w.DownLeftRight=14]="DownLeftRight",w[w.UpDownLeftRight=15]="UpDownLeftRight",w[w.NoChildren=16]="NoChildren"})(tt||(tt={}));let $e=2032,Ut=882,St=Object.create(null),Jt=[],Rt=[],z=Zn(U,new Set);for(let w of Jt)w.text=oa(w.flowNode,w.circular),er(w);let K=Ri(z),te=aa(K);return $r(z,0),jt();function Ee(w){return!!(w.flags&128)}function je(w){return!!(w.flags&12)&&!!w.antecedents}function pt(w){return!!(w.flags&$e)}function nt(w){return!!(w.flags&Ut)}function kt(w){let f=[];for(let X of w.edges)X.source===w&&f.push(X.target);return f}function qt(w){let f=[];for(let X of w.edges)X.target===w&&f.push(X.source);return f}function Zn(w,f){let X=ye(w),$=St[X];if($&&f.has(w))return $.circular=!0,$={id:-1,flowNode:w,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Jt.push($),$;if(f.add(w),!$)if(St[X]=$={id:X,flowNode:w,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Jt.push($),je(w))for(let O of w.antecedents)kn($,O,f);else pt(w)&&kn($,w.antecedent,f);return f.delete(w),$}function kn(w,f,X){let $=Zn(f,X),O={source:w,target:$};Rt.push(O),w.edges.push(O),$.edges.push(O)}function er(w){if(w.level!==-1)return w.level;let f=0;for(let X of qt(w))f=Math.max(f,er(X)+1);return w.level=f}function Ri(w){let f=0;for(let X of kt(w))f=Math.max(f,Ri(X));return f+1}function aa(w){let f=R(Array(w),0);for(let X of Jt)f[X.level]=Math.max(f[X.level],X.text.length);return f}function $r(w,f){if(w.lane===-1){w.lane=f,w.endLane=f;let X=kt(w);for(let $=0;$0&&f++;let O=X[$];$r(O,f),O.endLane>w.endLane&&(f=O.endLane)}w.endLane=f}}function Dn(w){if(w&2)return"Start";if(w&4)return"Branch";if(w&8)return"Loop";if(w&16)return"Assignment";if(w&32)return"True";if(w&64)return"False";if(w&128)return"SwitchClause";if(w&256)return"ArrayMutation";if(w&512)return"Call";if(w&1024)return"ReduceLabel";if(w&1)return"Unreachable";throw new Error}function Ne(w){let f=oi(w);return Qo(f,w,!1)}function oa(w,f){let X=Dn(w.flags);if(f&&(X=`${X}#${ye(w)}`),nt(w))w.node&&(X+=` (${Ne(w.node)})`);else if(Ee(w)){let $=[];for(let O=w.clauseStart;OMath.max(be,ge.lane),0)+1,X=R(Array(f),""),$=te.map(()=>Array(f)),O=te.map(()=>R(Array(f),0));for(let be of Jt){$[be.level][be.lane]=be;let ge=kt(be);for(let xe=0;xe0&&(Ge|=1),xe0&&(Ge|=1),xe0?O[be-1][ge]:0,xe=ge>0?O[be][ge-1]:0,Ye=O[be][ge];Ye||(Le&8&&(Ye|=12),xe&2&&(Ye|=3),O[be][ge]=Ye)}for(let be=0;be0?x.repeat(f):"";let $="";for(;$.length{},dE=()=>{},mE=()=>{},Sa=Date.now,hE=()=>{},Kf=new Proxy(()=>{},{get:()=>Kf});function Mb(e){if(fg){let t=_y.get(e)??0;_y.set(e,t+1),ed.set(e,Sa()),Zf==null||Zf.mark(e),typeof onProfilerEvent=="function"&&onProfilerEvent(e)}}function yE(e,t,r){if(fg){let a=(r!==void 0?ed.get(r):void 0)??Sa(),_=(t!==void 0?ed.get(t):void 0)??Hv,p=cy.get(e)||0;cy.set(e,p+(a-_)),Zf==null||Zf.measure(e,t,r)}}var Zf,gE,fg,Hv,ed,_y,cy,XV=Vt({"src/compiler/performance.ts"(){"use strict";Dr(),gE={enter:Rn,exit:Rn},fg=!1,Hv=Sa(),ed=new Map,_y=new Map,cy=new Map}}),Gv=()=>{},bE=()=>{},xa;function vE(e,t=!0){let r=ld[e.category];return t?r.toLowerCase():r}var td,rd,nd,ly,id,uy,py,bl,fy,ad,dy,my,hy,yy,gy,by,vy,Ty,Sy,xy,wy,Cy,Ey,Ay,ky,od,Dy,Py,Iy,Ny,sd,_d,Oy,My,Ly,Jy,Ry,jy,cd,Fy,By,Uy,qy,zy,Wy,ld,Vy,Hy,Gy,Xy,$y,Qy,Yy,Ky,Zy,ud,e0,t0,r0,n0,i0,pd,fd,dd,a0,o0,s0,_0,c0,l0,u0,p0,zd,Xv=Vt({"src/compiler/types.ts"(){"use strict";td=(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.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKeyword",e[e.ForKeyword=99]="ForKeyword",e[e.FunctionKeyword=100]="FunctionKeyword",e[e.IfKeyword=101]="IfKeyword",e[e.ImportKeyword=102]="ImportKeyword",e[e.InKeyword=103]="InKeyword",e[e.InstanceOfKeyword=104]="InstanceOfKeyword",e[e.NewKeyword=105]="NewKeyword",e[e.NullKeyword=106]="NullKeyword",e[e.ReturnKeyword=107]="ReturnKeyword",e[e.SuperKeyword=108]="SuperKeyword",e[e.SwitchKeyword=109]="SwitchKeyword",e[e.ThisKeyword=110]="ThisKeyword",e[e.ThrowKeyword=111]="ThrowKeyword",e[e.TrueKeyword=112]="TrueKeyword",e[e.TryKeyword=113]="TryKeyword",e[e.TypeOfKeyword=114]="TypeOfKeyword",e[e.VarKeyword=115]="VarKeyword",e[e.VoidKeyword=116]="VoidKeyword",e[e.WhileKeyword=117]="WhileKeyword",e[e.WithKeyword=118]="WithKeyword",e[e.ImplementsKeyword=119]="ImplementsKeyword",e[e.InterfaceKeyword=120]="InterfaceKeyword",e[e.LetKeyword=121]="LetKeyword",e[e.PackageKeyword=122]="PackageKeyword",e[e.PrivateKeyword=123]="PrivateKeyword",e[e.ProtectedKeyword=124]="ProtectedKeyword",e[e.PublicKeyword=125]="PublicKeyword",e[e.StaticKeyword=126]="StaticKeyword",e[e.YieldKeyword=127]="YieldKeyword",e[e.AbstractKeyword=128]="AbstractKeyword",e[e.AccessorKeyword=129]="AccessorKeyword",e[e.AsKeyword=130]="AsKeyword",e[e.AssertsKeyword=131]="AssertsKeyword",e[e.AssertKeyword=132]="AssertKeyword",e[e.AnyKeyword=133]="AnyKeyword",e[e.AsyncKeyword=134]="AsyncKeyword",e[e.AwaitKeyword=135]="AwaitKeyword",e[e.BooleanKeyword=136]="BooleanKeyword",e[e.ConstructorKeyword=137]="ConstructorKeyword",e[e.DeclareKeyword=138]="DeclareKeyword",e[e.GetKeyword=139]="GetKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.QualifiedName=166]="QualifiedName",e[e.ComputedPropertyName=167]="ComputedPropertyName",e[e.TypeParameter=168]="TypeParameter",e[e.Parameter=169]="Parameter",e[e.Decorator=170]="Decorator",e[e.PropertySignature=171]="PropertySignature",e[e.PropertyDeclaration=172]="PropertyDeclaration",e[e.MethodSignature=173]="MethodSignature",e[e.MethodDeclaration=174]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=175]="ClassStaticBlockDeclaration",e[e.Constructor=176]="Constructor",e[e.GetAccessor=177]="GetAccessor",e[e.SetAccessor=178]="SetAccessor",e[e.CallSignature=179]="CallSignature",e[e.ConstructSignature=180]="ConstructSignature",e[e.IndexSignature=181]="IndexSignature",e[e.TypePredicate=182]="TypePredicate",e[e.TypeReference=183]="TypeReference",e[e.FunctionType=184]="FunctionType",e[e.ConstructorType=185]="ConstructorType",e[e.TypeQuery=186]="TypeQuery",e[e.TypeLiteral=187]="TypeLiteral",e[e.ArrayType=188]="ArrayType",e[e.TupleType=189]="TupleType",e[e.OptionalType=190]="OptionalType",e[e.RestType=191]="RestType",e[e.UnionType=192]="UnionType",e[e.IntersectionType=193]="IntersectionType",e[e.ConditionalType=194]="ConditionalType",e[e.InferType=195]="InferType",e[e.ParenthesizedType=196]="ParenthesizedType",e[e.ThisType=197]="ThisType",e[e.TypeOperator=198]="TypeOperator",e[e.IndexedAccessType=199]="IndexedAccessType",e[e.MappedType=200]="MappedType",e[e.LiteralType=201]="LiteralType",e[e.NamedTupleMember=202]="NamedTupleMember",e[e.TemplateLiteralType=203]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=204]="TemplateLiteralTypeSpan",e[e.ImportType=205]="ImportType",e[e.ObjectBindingPattern=206]="ObjectBindingPattern",e[e.ArrayBindingPattern=207]="ArrayBindingPattern",e[e.BindingElement=208]="BindingElement",e[e.ArrayLiteralExpression=209]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=210]="ObjectLiteralExpression",e[e.PropertyAccessExpression=211]="PropertyAccessExpression",e[e.ElementAccessExpression=212]="ElementAccessExpression",e[e.CallExpression=213]="CallExpression",e[e.NewExpression=214]="NewExpression",e[e.TaggedTemplateExpression=215]="TaggedTemplateExpression",e[e.TypeAssertionExpression=216]="TypeAssertionExpression",e[e.ParenthesizedExpression=217]="ParenthesizedExpression",e[e.FunctionExpression=218]="FunctionExpression",e[e.ArrowFunction=219]="ArrowFunction",e[e.DeleteExpression=220]="DeleteExpression",e[e.TypeOfExpression=221]="TypeOfExpression",e[e.VoidExpression=222]="VoidExpression",e[e.AwaitExpression=223]="AwaitExpression",e[e.PrefixUnaryExpression=224]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=225]="PostfixUnaryExpression",e[e.BinaryExpression=226]="BinaryExpression",e[e.ConditionalExpression=227]="ConditionalExpression",e[e.TemplateExpression=228]="TemplateExpression",e[e.YieldExpression=229]="YieldExpression",e[e.SpreadElement=230]="SpreadElement",e[e.ClassExpression=231]="ClassExpression",e[e.OmittedExpression=232]="OmittedExpression",e[e.ExpressionWithTypeArguments=233]="ExpressionWithTypeArguments",e[e.AsExpression=234]="AsExpression",e[e.NonNullExpression=235]="NonNullExpression",e[e.MetaProperty=236]="MetaProperty",e[e.SyntheticExpression=237]="SyntheticExpression",e[e.SatisfiesExpression=238]="SatisfiesExpression",e[e.TemplateSpan=239]="TemplateSpan",e[e.SemicolonClassElement=240]="SemicolonClassElement",e[e.Block=241]="Block",e[e.EmptyStatement=242]="EmptyStatement",e[e.VariableStatement=243]="VariableStatement",e[e.ExpressionStatement=244]="ExpressionStatement",e[e.IfStatement=245]="IfStatement",e[e.DoStatement=246]="DoStatement",e[e.WhileStatement=247]="WhileStatement",e[e.ForStatement=248]="ForStatement",e[e.ForInStatement=249]="ForInStatement",e[e.ForOfStatement=250]="ForOfStatement",e[e.ContinueStatement=251]="ContinueStatement",e[e.BreakStatement=252]="BreakStatement",e[e.ReturnStatement=253]="ReturnStatement",e[e.WithStatement=254]="WithStatement",e[e.SwitchStatement=255]="SwitchStatement",e[e.LabeledStatement=256]="LabeledStatement",e[e.ThrowStatement=257]="ThrowStatement",e[e.TryStatement=258]="TryStatement",e[e.DebuggerStatement=259]="DebuggerStatement",e[e.VariableDeclaration=260]="VariableDeclaration",e[e.VariableDeclarationList=261]="VariableDeclarationList",e[e.FunctionDeclaration=262]="FunctionDeclaration",e[e.ClassDeclaration=263]="ClassDeclaration",e[e.InterfaceDeclaration=264]="InterfaceDeclaration",e[e.TypeAliasDeclaration=265]="TypeAliasDeclaration",e[e.EnumDeclaration=266]="EnumDeclaration",e[e.ModuleDeclaration=267]="ModuleDeclaration",e[e.ModuleBlock=268]="ModuleBlock",e[e.CaseBlock=269]="CaseBlock",e[e.NamespaceExportDeclaration=270]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=271]="ImportEqualsDeclaration",e[e.ImportDeclaration=272]="ImportDeclaration",e[e.ImportClause=273]="ImportClause",e[e.NamespaceImport=274]="NamespaceImport",e[e.NamedImports=275]="NamedImports",e[e.ImportSpecifier=276]="ImportSpecifier",e[e.ExportAssignment=277]="ExportAssignment",e[e.ExportDeclaration=278]="ExportDeclaration",e[e.NamedExports=279]="NamedExports",e[e.NamespaceExport=280]="NamespaceExport",e[e.ExportSpecifier=281]="ExportSpecifier",e[e.MissingDeclaration=282]="MissingDeclaration",e[e.ExternalModuleReference=283]="ExternalModuleReference",e[e.JsxElement=284]="JsxElement",e[e.JsxSelfClosingElement=285]="JsxSelfClosingElement",e[e.JsxOpeningElement=286]="JsxOpeningElement",e[e.JsxClosingElement=287]="JsxClosingElement",e[e.JsxFragment=288]="JsxFragment",e[e.JsxOpeningFragment=289]="JsxOpeningFragment",e[e.JsxClosingFragment=290]="JsxClosingFragment",e[e.JsxAttribute=291]="JsxAttribute",e[e.JsxAttributes=292]="JsxAttributes",e[e.JsxSpreadAttribute=293]="JsxSpreadAttribute",e[e.JsxExpression=294]="JsxExpression",e[e.JsxNamespacedName=295]="JsxNamespacedName",e[e.CaseClause=296]="CaseClause",e[e.DefaultClause=297]="DefaultClause",e[e.HeritageClause=298]="HeritageClause",e[e.CatchClause=299]="CatchClause",e[e.AssertClause=300]="AssertClause",e[e.AssertEntry=301]="AssertEntry",e[e.ImportTypeAssertionContainer=302]="ImportTypeAssertionContainer",e[e.PropertyAssignment=303]="PropertyAssignment",e[e.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",e[e.SpreadAssignment=305]="SpreadAssignment",e[e.EnumMember=306]="EnumMember",e[e.UnparsedPrologue=307]="UnparsedPrologue",e[e.UnparsedPrepend=308]="UnparsedPrepend",e[e.UnparsedText=309]="UnparsedText",e[e.UnparsedInternalText=310]="UnparsedInternalText",e[e.UnparsedSyntheticReference=311]="UnparsedSyntheticReference",e[e.SourceFile=312]="SourceFile",e[e.Bundle=313]="Bundle",e[e.UnparsedSource=314]="UnparsedSource",e[e.InputFiles=315]="InputFiles",e[e.JSDocTypeExpression=316]="JSDocTypeExpression",e[e.JSDocNameReference=317]="JSDocNameReference",e[e.JSDocMemberName=318]="JSDocMemberName",e[e.JSDocAllType=319]="JSDocAllType",e[e.JSDocUnknownType=320]="JSDocUnknownType",e[e.JSDocNullableType=321]="JSDocNullableType",e[e.JSDocNonNullableType=322]="JSDocNonNullableType",e[e.JSDocOptionalType=323]="JSDocOptionalType",e[e.JSDocFunctionType=324]="JSDocFunctionType",e[e.JSDocVariadicType=325]="JSDocVariadicType",e[e.JSDocNamepathType=326]="JSDocNamepathType",e[e.JSDoc=327]="JSDoc",e[e.JSDocComment=327]="JSDocComment",e[e.JSDocText=328]="JSDocText",e[e.JSDocTypeLiteral=329]="JSDocTypeLiteral",e[e.JSDocSignature=330]="JSDocSignature",e[e.JSDocLink=331]="JSDocLink",e[e.JSDocLinkCode=332]="JSDocLinkCode",e[e.JSDocLinkPlain=333]="JSDocLinkPlain",e[e.JSDocTag=334]="JSDocTag",e[e.JSDocAugmentsTag=335]="JSDocAugmentsTag",e[e.JSDocImplementsTag=336]="JSDocImplementsTag",e[e.JSDocAuthorTag=337]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=338]="JSDocDeprecatedTag",e[e.JSDocClassTag=339]="JSDocClassTag",e[e.JSDocPublicTag=340]="JSDocPublicTag",e[e.JSDocPrivateTag=341]="JSDocPrivateTag",e[e.JSDocProtectedTag=342]="JSDocProtectedTag",e[e.JSDocReadonlyTag=343]="JSDocReadonlyTag",e[e.JSDocOverrideTag=344]="JSDocOverrideTag",e[e.JSDocCallbackTag=345]="JSDocCallbackTag",e[e.JSDocOverloadTag=346]="JSDocOverloadTag",e[e.JSDocEnumTag=347]="JSDocEnumTag",e[e.JSDocParameterTag=348]="JSDocParameterTag",e[e.JSDocReturnTag=349]="JSDocReturnTag",e[e.JSDocThisTag=350]="JSDocThisTag",e[e.JSDocTypeTag=351]="JSDocTypeTag",e[e.JSDocTemplateTag=352]="JSDocTemplateTag",e[e.JSDocTypedefTag=353]="JSDocTypedefTag",e[e.JSDocSeeTag=354]="JSDocSeeTag",e[e.JSDocPropertyTag=355]="JSDocPropertyTag",e[e.JSDocThrowsTag=356]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=357]="JSDocSatisfiesTag",e[e.SyntaxList=358]="SyntaxList",e[e.NotEmittedStatement=359]="NotEmittedStatement",e[e.PartiallyEmittedExpression=360]="PartiallyEmittedExpression",e[e.CommaListExpression=361]="CommaListExpression",e[e.SyntheticReferenceExpression=362]="SyntheticReferenceExpression",e[e.Count=363]="Count",e[e.FirstAssignment=64]="FirstAssignment",e[e.LastAssignment=79]="LastAssignment",e[e.FirstCompoundAssignment=65]="FirstCompoundAssignment",e[e.LastCompoundAssignment=79]="LastCompoundAssignment",e[e.FirstReservedWord=83]="FirstReservedWord",e[e.LastReservedWord=118]="LastReservedWord",e[e.FirstKeyword=83]="FirstKeyword",e[e.LastKeyword=165]="LastKeyword",e[e.FirstFutureReservedWord=119]="FirstFutureReservedWord",e[e.LastFutureReservedWord=127]="LastFutureReservedWord",e[e.FirstTypeNode=182]="FirstTypeNode",e[e.LastTypeNode=205]="LastTypeNode",e[e.FirstPunctuation=19]="FirstPunctuation",e[e.LastPunctuation=79]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=165]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=9]="FirstLiteralToken",e[e.LastLiteralToken=15]="LastLiteralToken",e[e.FirstTemplateToken=15]="FirstTemplateToken",e[e.LastTemplateToken=18]="LastTemplateToken",e[e.FirstBinaryOperator=30]="FirstBinaryOperator",e[e.LastBinaryOperator=79]="LastBinaryOperator",e[e.FirstStatement=243]="FirstStatement",e[e.LastStatement=259]="LastStatement",e[e.FirstNode=166]="FirstNode",e[e.FirstJSDocNode=316]="FirstJSDocNode",e[e.LastJSDocNode=357]="LastJSDocNode",e[e.FirstJSDocTagNode=334]="FirstJSDocTagNode",e[e.LastJSDocTagNode=357]="LastJSDocTagNode",e[e.FirstContextualKeyword=128]="FirstContextualKeyword",e[e.LastContextualKeyword=165]="LastContextualKeyword",e))(td||{}),rd=(e=>(e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.AwaitUsing=6]="AwaitUsing",e[e.NestedNamespace=8]="NestedNamespace",e[e.Synthesized=16]="Synthesized",e[e.Namespace=32]="Namespace",e[e.OptionalChain=64]="OptionalChain",e[e.ExportContext=128]="ExportContext",e[e.ContainsThis=256]="ContainsThis",e[e.HasImplicitReturn=512]="HasImplicitReturn",e[e.HasExplicitReturn=1024]="HasExplicitReturn",e[e.GlobalAugmentation=2048]="GlobalAugmentation",e[e.HasAsyncFunctions=4096]="HasAsyncFunctions",e[e.DisallowInContext=8192]="DisallowInContext",e[e.YieldContext=16384]="YieldContext",e[e.DecoratorContext=32768]="DecoratorContext",e[e.AwaitContext=65536]="AwaitContext",e[e.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=262144]="ThisNodeHasError",e[e.JavaScriptFile=524288]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=2097152]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",e[e.JSDoc=16777216]="JSDoc",e[e.Ambient=33554432]="Ambient",e[e.InWithStatement=67108864]="InWithStatement",e[e.JsonFile=134217728]="JsonFile",e[e.TypeCached=268435456]="TypeCached",e[e.Deprecated=536870912]="Deprecated",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",e[e.ContextFlags=101441536]="ContextFlags",e[e.TypeExcludesFlags=81920]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",e))(rd||{}),nd=(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.Accessor=128]="Accessor",e[e.Abstract=256]="Abstract",e[e.Async=512]="Async",e[e.Default=1024]="Default",e[e.Const=2048]="Const",e[e.HasComputedJSDocModifiers=4096]="HasComputedJSDocModifiers",e[e.Deprecated=8192]="Deprecated",e[e.Override=16384]="Override",e[e.In=32768]="In",e[e.Out=65536]="Out",e[e.Decorator=131072]="Decorator",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=28]="AccessibilityModifier",e[e.ParameterPropertyModifier=16476]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=24]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=117086]="TypeScriptModifier",e[e.ExportDefault=1025]="ExportDefault",e[e.All=258047]="All",e[e.Modifier=126975]="Modifier",e))(nd||{}),ly=(e=>(e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement",e))(ly||{}),id=(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))(id||{}),uy=(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))(uy||{}),py=(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.HexEscape=4096]="HexEscape",e[e.ContainsLeadingZero=8192]="ContainsLeadingZero",e[e.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.WithSpecifier=448]="WithSpecifier",e[e.StringLiteralFlags=7176]="StringLiteralFlags",e[e.NumericLiteralFlags=25584]="NumericLiteralFlags",e[e.TemplateLiteralLikeFlags=7176]="TemplateLiteralLikeFlags",e[e.IsInvalid=26656]="IsInvalid",e))(py||{}),bl=(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))(bl||{}),fy=(e=>(e[e.ExpectError=0]="ExpectError",e[e.Ignore=1]="Ignore",e))(fy||{}),ad=class{},dy=(e=>(e[e.RootFile=0]="RootFile",e[e.SourceFromProjectReference=1]="SourceFromProjectReference",e[e.OutputFromProjectReference=2]="OutputFromProjectReference",e[e.Import=3]="Import",e[e.ReferenceFile=4]="ReferenceFile",e[e.TypeReferenceDirective=5]="TypeReferenceDirective",e[e.LibFile=6]="LibFile",e[e.LibReferenceDirective=7]="LibReferenceDirective",e[e.AutomaticTypeDirectiveFile=8]="AutomaticTypeDirectiveFile",e))(dy||{}),my=(e=>(e[e.FilePreprocessingReferencedDiagnostic=0]="FilePreprocessingReferencedDiagnostic",e[e.FilePreprocessingFileExplainingDiagnostic=1]="FilePreprocessingFileExplainingDiagnostic",e[e.ResolutionDiagnostics=2]="ResolutionDiagnostics",e))(my||{}),hy=(e=>(e[e.Js=0]="Js",e[e.Dts=1]="Dts",e))(hy||{}),yy=(e=>(e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely",e))(yy||{}),gy=(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))(gy||{}),by=(e=>(e[e.Ok=0]="Ok",e[e.NeedsOverride=1]="NeedsOverride",e[e.HasInvalidOverride=2]="HasInvalidOverride",e))(by||{}),vy=(e=>(e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype",e))(vy||{}),Ty=(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))(Ty||{}),Sy=(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.OmitThisParameter=33554432]="OmitThisParameter",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",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.WriteComputedProps=1073741824]="WriteComputedProps",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))(Sy||{}),xy=(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.OmitThisParameter=33554432]="OmitThisParameter",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.NodeBuilderFlagsMask=848330091]="NodeBuilderFlagsMask",e))(xy||{}),wy=(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.WriteComputedProps=16]="WriteComputedProps",e[e.DoNotIncludeSymbolChain=32]="DoNotIncludeSymbolChain",e))(wy||{}),Cy=(e=>(e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed",e))(Cy||{}),Ey=(e=>(e[e.UnionOrIntersection=0]="UnionOrIntersection",e[e.Spread=1]="Spread",e))(Ey||{}),Ay=(e=>(e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier",e))(Ay||{}),ky=(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))(ky||{}),od=(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.AccessorExcludes=13247]="AccessorExcludes",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))(od||{}),Dy=(e=>(e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal",e))(Dy||{}),Py=(e=>(e[e.None=0]="None",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.Unresolved=1048576]="Unresolved",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=192]="Discriminant",e[e.Partial=48]="Partial",e))(Py||{}),Iy=(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))(Iy||{}),Ny=(e=>(e[e.None=0]="None",e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",e[e.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",e[e.CaptureArguments=512]="CaptureArguments",e[e.EnumValuesComputed=1024]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",e[e.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",e[e.AssignmentsMarked=131072]="AssignmentsMarked",e[e.ContainsConstructorReference=262144]="ContainsConstructorReference",e[e.ConstructorReference=536870912]="ConstructorReference",e[e.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",e[e.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",e[e.InCheckIdentifier=4194304]="InCheckIdentifier",e))(Ny||{}),sd=(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=109472]="Unit",e[e.Freshable=2976]="Freshable",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.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.Primitive=402784252]="Primitive",e[e.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",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=138117121]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Singleton=67358815]="Singleton",e[e.Narrowable=536624127]="Narrowable",e[e.IncludesMask=473694207]="IncludesMask",e[e.IncludesMissingType=262144]="IncludesMissingType",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject",e[e.IncludesInstantiable=33554432]="IncludesInstantiable",e[e.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",e))(sd||{}),_d=(e=>(e[e.None=0]="None",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.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.ObjectTypeKindMask=1343]="ObjectTypeKindMask",e[e.ContainsSpread=2097152]="ContainsSpread",e[e.ObjectRestType=4194304]="ObjectRestType",e[e.InstantiationExpressionType=8388608]="InstantiationExpressionType",e[e.IsClassInstanceClone=16777216]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",e[e.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",e[e.IsGenericObjectType=4194304]="IsGenericObjectType",e[e.IsGenericIndexType=8388608]="IsGenericIndexType",e[e.IsGenericType=12582912]="IsGenericType",e[e.ContainsIntersections=16777216]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=33554432]="IsNeverIntersection",e))(_d||{}),Oy=(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))(Oy||{}),My=(e=>(e[e.Required=1]="Required",e[e.Optional=2]="Optional",e[e.Rest=4]="Rest",e[e.Variadic=8]="Variadic",e[e.Fixed=3]="Fixed",e[e.Variable=12]="Variable",e[e.NonRequired=14]="NonRequired",e[e.NonRest=11]="NonRest",e))(My||{}),Ly=(e=>(e[e.None=0]="None",e[e.IncludeUndefined=1]="IncludeUndefined",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.Writing=4]="Writing",e[e.CacheSymbol=8]="CacheSymbol",e[e.NoTupleBoundsCheck=16]="NoTupleBoundsCheck",e[e.ExpressionPosition=32]="ExpressionPosition",e[e.ReportDeprecated=64]="ReportDeprecated",e[e.SuppressNoImplicitAnyError=128]="SuppressNoImplicitAnyError",e[e.Contextual=256]="Contextual",e[e.Persistent=1]="Persistent",e))(Ly||{}),Jy=(e=>(e[e.None=0]="None",e[e.StringsOnly=1]="StringsOnly",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.NoReducibleCheck=4]="NoReducibleCheck",e))(Jy||{}),Ry=(e=>(e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed",e))(Ry||{}),jy=(e=>(e[e.Call=0]="Call",e[e.Construct=1]="Construct",e))(jy||{}),cd=(e=>(e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Abstract=4]="Abstract",e[e.IsInnerCallChain=8]="IsInnerCallChain",e[e.IsOuterCallChain=16]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=64]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=167]="PropagatingFlags",e[e.CallChainFlags=24]="CallChainFlags",e))(cd||{}),Fy=(e=>(e[e.String=0]="String",e[e.Number=1]="Number",e))(Fy||{}),By=(e=>(e[e.Simple=0]="Simple",e[e.Array=1]="Array",e[e.Deferred=2]="Deferred",e[e.Function=3]="Function",e[e.Composite=4]="Composite",e[e.Merged=5]="Merged",e))(By||{}),Uy=(e=>(e[e.None=0]="None",e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.SpeculativeTuple=2]="SpeculativeTuple",e[e.SubstituteSource=4]="SubstituteSource",e[e.HomomorphicMappedType=8]="HomomorphicMappedType",e[e.PartialHomomorphicMappedType=16]="PartialHomomorphicMappedType",e[e.MappedTypeConstraint=32]="MappedTypeConstraint",e[e.ContravariantConditional=64]="ContravariantConditional",e[e.ReturnType=128]="ReturnType",e[e.LiteralKeyof=256]="LiteralKeyof",e[e.NoConstraints=512]="NoConstraints",e[e.AlwaysStrict=1024]="AlwaysStrict",e[e.MaxValue=2048]="MaxValue",e[e.PriorityImpliesCombination=416]="PriorityImpliesCombination",e[e.Circularity=-1]="Circularity",e))(Uy||{}),qy=(e=>(e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction",e))(qy||{}),zy=(e=>(e[e.False=0]="False",e[e.Unknown=1]="Unknown",e[e.Maybe=3]="Maybe",e[e.True=-1]="True",e))(zy||{}),Wy=(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))(Wy||{}),ld=(e=>(e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message",e))(ld||{}),Vy=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e[e.Node10=2]="Node10",e[e.Node16=3]="Node16",e[e.NodeNext=99]="NodeNext",e[e.Bundler=100]="Bundler",e))(Vy||{}),Hy=(e=>(e[e.Legacy=1]="Legacy",e[e.Auto=2]="Auto",e[e.Force=3]="Force",e))(Hy||{}),Gy=(e=>(e[e.FixedPollingInterval=0]="FixedPollingInterval",e[e.PriorityPollingInterval=1]="PriorityPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e[e.UseFsEvents=4]="UseFsEvents",e[e.UseFsEventsOnParentDirectory=5]="UseFsEventsOnParentDirectory",e))(Gy||{}),Xy=(e=>(e[e.UseFsEvents=0]="UseFsEvents",e[e.FixedPollingInterval=1]="FixedPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e))(Xy||{}),$y=(e=>(e[e.FixedInterval=0]="FixedInterval",e[e.PriorityInterval=1]="PriorityInterval",e[e.DynamicPriority=2]="DynamicPriority",e[e.FixedChunkSize=3]="FixedChunkSize",e))($y||{}),Qy=(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.ES2022=7]="ES2022",e[e.ESNext=99]="ESNext",e[e.Node16=100]="Node16",e[e.NodeNext=199]="NodeNext",e))(Qy||{}),Yy=(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))(Yy||{}),Ky=(e=>(e[e.Remove=0]="Remove",e[e.Preserve=1]="Preserve",e[e.Error=2]="Error",e))(Ky||{}),Zy=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(Zy||{}),ud=(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))(ud||{}),e0=(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.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(e0||{}),t0=(e=>(e[e.Standard=0]="Standard",e[e.JSX=1]="JSX",e))(t0||{}),r0=(e=>(e[e.None=0]="None",e[e.Recursive=1]="Recursive",e))(r0||{}),n0=(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.replacementCharacter=65533]="replacementCharacter",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))(n0||{}),i0=(e=>(e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo",e.Mjs=".mjs",e.Mts=".mts",e.Dmts=".d.mts",e.Cjs=".cjs",e.Cts=".cts",e.Dcts=".d.cts",e))(i0||{}),pd=(e=>(e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2022=8]="ContainsES2022",e[e.ContainsES2021=16]="ContainsES2021",e[e.ContainsES2020=32]="ContainsES2020",e[e.ContainsES2019=64]="ContainsES2019",e[e.ContainsES2018=128]="ContainsES2018",e[e.ContainsES2017=256]="ContainsES2017",e[e.ContainsES2016=512]="ContainsES2016",e[e.ContainsES2015=1024]="ContainsES2015",e[e.ContainsGenerator=2048]="ContainsGenerator",e[e.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=16384]="ContainsLexicalThis",e[e.ContainsRestOrSpread=32768]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=524288]="ContainsBindingPattern",e[e.ContainsYield=1048576]="ContainsYield",e[e.ContainsAwait=2097152]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=8388608]="ContainsDynamicImport",e[e.ContainsClassFields=16777216]="ContainsClassFields",e[e.ContainsDecorators=33554432]="ContainsDecorators",e[e.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",e[e.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",e[e.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",e[e.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",e[e.HasComputedFlags=-2147483648]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2022=8]="AssertES2022",e[e.AssertES2021=16]="AssertES2021",e[e.AssertES2020=32]="AssertES2020",e[e.AssertES2019=64]="AssertES2019",e[e.AssertES2018=128]="AssertES2018",e[e.AssertES2017=256]="AssertES2017",e[e.AssertES2016=512]="AssertES2016",e[e.AssertES2015=1024]="AssertES2015",e[e.AssertGenerator=2048]="AssertGenerator",e[e.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",e[e.NodeExcludes=-2147483648]="NodeExcludes",e[e.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",e[e.FunctionExcludes=-1937940480]="FunctionExcludes",e[e.ConstructorExcludes=-1937948672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",e[e.PropertyExcludes=-2013249536]="PropertyExcludes",e[e.ClassExcludes=-2147344384]="ClassExcludes",e[e.ModuleExcludes=-1941676032]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",e[e.ParameterExcludes=-2147483648]="ParameterExcludes",e[e.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",e[e.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",e[e.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",e[e.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",e))(pd||{}),fd=(e=>(e[e.TabStop=0]="TabStop",e[e.Placeholder=1]="Placeholder",e[e.Choice=2]="Choice",e[e.Variable=3]="Variable",e))(fd||{}),dd=(e=>(e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.MultiLine=2]="MultiLine",e[e.AdviseOnEmitNode=4]="AdviseOnEmitNode",e[e.NoSubstitution=8]="NoSubstitution",e[e.CapturesThis=16]="CapturesThis",e[e.NoLeadingSourceMap=32]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=64]="NoTrailingSourceMap",e[e.NoSourceMap=96]="NoSourceMap",e[e.NoNestedSourceMaps=128]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=768]="NoTokenSourceMaps",e[e.NoLeadingComments=1024]="NoLeadingComments",e[e.NoTrailingComments=2048]="NoTrailingComments",e[e.NoComments=3072]="NoComments",e[e.NoNestedComments=4096]="NoNestedComments",e[e.HelperName=8192]="HelperName",e[e.ExportName=16384]="ExportName",e[e.LocalName=32768]="LocalName",e[e.InternalName=65536]="InternalName",e[e.Indented=131072]="Indented",e[e.NoIndentation=262144]="NoIndentation",e[e.AsyncFunctionBody=524288]="AsyncFunctionBody",e[e.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",e[e.CustomPrologue=2097152]="CustomPrologue",e[e.NoHoisting=4194304]="NoHoisting",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e))(dd||{}),a0=(e=>(e[e.None=0]="None",e[e.TypeScriptClassWrapper=1]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=2]="NeverApplyImportHelper",e[e.IgnoreSourceNewlines=4]="IgnoreSourceNewlines",e[e.Immutable=8]="Immutable",e[e.IndirectCall=16]="IndirectCall",e[e.TransformPrivateStaticElements=32]="TransformPrivateStaticElements",e))(a0||{}),o0=(e=>(e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.ESDecorateAndRunInitializers=8]="ESDecorateAndRunInitializers",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.SpreadArray=1024]="SpreadArray",e[e.Await=2048]="Await",e[e.AsyncGenerator=4096]="AsyncGenerator",e[e.AsyncDelegator=8192]="AsyncDelegator",e[e.AsyncValues=16384]="AsyncValues",e[e.ExportStar=32768]="ExportStar",e[e.ImportStar=65536]="ImportStar",e[e.ImportDefault=131072]="ImportDefault",e[e.MakeTemplateObject=262144]="MakeTemplateObject",e[e.ClassPrivateFieldGet=524288]="ClassPrivateFieldGet",e[e.ClassPrivateFieldSet=1048576]="ClassPrivateFieldSet",e[e.ClassPrivateFieldIn=2097152]="ClassPrivateFieldIn",e[e.CreateBinding=4194304]="CreateBinding",e[e.SetFunctionName=8388608]="SetFunctionName",e[e.PropKey=16777216]="PropKey",e[e.AddDisposableResourceAndDisposeResources=33554432]="AddDisposableResourceAndDisposeResources",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=33554432]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=16384]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=6144]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=26624]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes",e))(o0||{}),s0=(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))(s0||{}),_0=(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[e.ExcludeJSDocTypeAssertion=16]="ExcludeJSDocTypeAssertion",e))(_0||{}),c0=(e=>(e[e.None=0]="None",e[e.InParameters=1]="InParameters",e[e.VariablesHoistedInParameters=2]="VariablesHoistedInParameters",e))(c0||{}),l0=(e=>(e.Prologue="prologue",e.EmitHelpers="emitHelpers",e.NoDefaultLib="no-default-lib",e.Reference="reference",e.Type="type",e.TypeResolutionModeRequire="type-require",e.TypeResolutionModeImport="type-import",e.Lib="lib",e.Prepend="prepend",e.Text="text",e.Internal="internal",e))(l0||{}),u0=(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=2359808]="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.ImportClauseEntries=526226]="ImportClauseEntries",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))(u0||{}),p0=(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))(p0||{}),zd={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},{name:"resolution-mode",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}}}}),TE=()=>{},f0;function dg(e){return e===47||e===92}function SE(e){return Jl(e)<0}function v_(e){return Jl(e)>0}function xE(e){let t=Jl(e);return t>0&&t===e.length}function mg(e){return Jl(e)!==0}function rs(e){return/^\.\.?($|[\\/])/.test(e)}function wE(e){return!mg(e)&&!rs(e)}function $v(e){return eo(T_(e),".")}function La(e,t){return e.length>t.length&&ts(e,t)}function ei(e,t){for(let r of t)if(La(e,r))return!0;return!1}function Wd(e){return e.length>0&&dg(e.charCodeAt(e.length-1))}function Lb(e){return e>=97&&e<=122||e>=65&&e<=90}function CE(e,t){let r=e.charCodeAt(t);if(r===58)return t+1;if(r===37&&e.charCodeAt(t+1)===51){let a=e.charCodeAt(t+2);if(a===97||a===65)return t+3}return-1}function Jl(e){if(!e)return 0;let t=e.charCodeAt(0);if(t===47||t===92){if(e.charCodeAt(1)!==t)return 1;let a=e.indexOf(t===47?fn:vg,2);return a<0?e.length:a+1}if(Lb(t)&&e.charCodeAt(1)===58){let a=e.charCodeAt(2);if(a===47||a===92)return 3;if(e.length===2)return 2}let r=e.indexOf(m0);if(r!==-1){let a=r+m0.length,_=e.indexOf(fn,a);if(_!==-1){let p=e.slice(0,r),d=e.slice(a,_);if(p==="file"&&(d===""||d==="localhost")&&Lb(e.charCodeAt(_+1))){let h=CE(e,_+2);if(h!==-1){if(e.charCodeAt(h)===47)return~(h+1);if(h===e.length)return~h}}return~(_+1)}return~e.length}return 0}function Ei(e){let t=Jl(e);return t<0?~t:t}function $i(e){e=qo(e);let t=Ei(e);return t===e.length?e:(e=S_(e),e.slice(0,Math.max(t,e.lastIndexOf(fn))))}function T_(e,t,r){if(e=qo(e),Ei(e)===e.length)return"";e=S_(e);let _=e.slice(Math.max(Ei(e),e.lastIndexOf(fn)+1)),p=t!==void 0&&r!==void 0?md(_,t,r):void 0;return p?_.slice(0,_.length-p.length):_}function Jb(e,t,r){if(Fr(t,".")||(t="."+t),e.length>=t.length&&e.charCodeAt(e.length-t.length)===46){let a=e.slice(e.length-t.length);if(r(a,t))return a}}function EE(e,t,r){if(typeof t=="string")return Jb(e,t,r)||"";for(let a of t){let _=Jb(e,a,r);if(_)return _}return""}function md(e,t,r){if(t)return EE(S_(e),t,r?s_:Ll);let a=T_(e),_=a.lastIndexOf(".");return _>=0?a.substring(_):""}function AE(e,t){let r=e.substring(0,t),a=e.substring(t).split(fn);return a.length&&!wi(a)&&a.pop(),[r,...a]}function Ai(e,t=""){return e=hr(t,e),AE(e,Ei(e))}function Uo(e,t){return e.length===0?"":(e[0]&&zo(e[0]))+e.slice(1,t).join(fn)}function qo(e){return e.indexOf("\\")!==-1?e.replace(e4,fn):e}function Da(e){if(!mt(e))return[];let t=[e[0]];for(let r=1;r1){if(t[t.length-1]!==".."){t.pop();continue}}else if(t[0])continue}t.push(a)}}return t}function hr(e,...t){e&&(e=qo(e));for(let r of t)r&&(r=qo(r),!e||Ei(r)!==0?e=r:e=zo(e)+r);return e}function d0(e,...t){return pn(mt(t)?hr(e,...t):qo(e))}function Vd(e,t){return Da(Ai(e,t))}function Pa(e,t){return Uo(Vd(e,t))}function pn(e){if(e=qo(e),!vl.test(e))return e;let t=e.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(t!==e&&(e=t,!vl.test(e)))return e;let r=Uo(Da(Ai(e)));return r&&Wd(e)?zo(r):r}function kE(e){return e.length===0?"":e.slice(1).join(fn)}function DE(e,t){return kE(Vd(e,t))}function xi(e,t,r){let a=v_(e)?pn(e):Pa(e,t);return r(a)}function S_(e){return Wd(e)?e.substr(0,e.length-1):e}function zo(e){return Wd(e)?e:e+fn}function hg(e){return!mg(e)&&!rs(e)?"./"+e:e}function Qv(e,t,r,a){let _=r!==void 0&&a!==void 0?md(e,r,a):md(e);return _?e.slice(0,e.length-_.length)+(Fr(t,".")?t:"."+t):e}function yg(e,t,r){if(e===t)return 0;if(e===void 0)return-1;if(t===void 0)return 1;let a=e.substring(0,Ei(e)),_=t.substring(0,Ei(t)),p=Bd(a,_);if(p!==0)return p;let d=e.substring(a.length),h=t.substring(_.length);if(!vl.test(d)&&!vl.test(h))return r(d,h);let l=Da(Ai(e)),v=Da(Ai(t)),y=Math.min(l.length,v.length);for(let C=1;C0==Ei(t)>0,"Paths must either both be absolute or both be relative");let p=gg(e,t,(typeof r=="boolean"?r:!1)?s_:Ll,typeof r=="function"?r:bt);return Uo(p)}function ME(e,t,r){return v_(e)?bg(t,e,t,r,!1):e}function LE(e,t,r){return hg(Kv($i(e),t,r))}function bg(e,t,r,a,_){let p=gg(d0(r,e),d0(r,t),Ll,a),d=p[0];if(_&&v_(d)){let h=d.charAt(0)===fn?"file://":"file:///";p[0]=h+d}return Uo(p)}function Zv(e,t){for(;;){let r=t(e);if(r!==void 0)return r;let a=$i(e);if(a===e)return;e=a}}function JE(e){return ts(e,"/node_modules")}var fn,vg,m0,e4,vl,t4=Vt({"src/compiler/path.ts"(){"use strict";Dr(),fn="/",vg="\\",m0="://",e4=/\\/g,vl=/(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/}});function i(e,t,r,a,_,p,d){return{code:e,category:t,key:r,message:a,reportsUnnecessary:_,elidedInCompatabilityPyramid:p,reportsDeprecated:d}}var U,RE=Vt({"src/compiler/diagnosticInformationMap.generated.ts"(){"use strict";Xv(),U={Unterminated_string_literal:i(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:i(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:i(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:i(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:i(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:i(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:i(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:i(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:i(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:i(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:i(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:i(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:i(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:i(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:i(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:i(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:i(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:i(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:i(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:i(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:i(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:i(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:i(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:i(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:i(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:i(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:i(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:i(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:i(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:i(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:i(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:i(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:i(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:i(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:i(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:i(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:i(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:i(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:i(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:i(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:i(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:i(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055","Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:i(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:i(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:i(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:i(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:i(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:i(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:i(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:i(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:i(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:i(1066,1,"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:i(1068,1,"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:i(1069,1,"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:i(1070,1,"_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:i(1071,1,"_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:i(1079,1,"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:i(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:i(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:i(1090,1,"_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:i(1091,1,"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:i(1092,1,"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:i(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:i(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:i(1095,1,"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:i(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:i(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:i(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:i(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:i(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:i(1101,1,"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:i(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:i(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:i(1104,1,"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:i(1105,1,"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."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:i(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:i(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:i(1108,1,"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:i(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:i(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:i(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:i(1113,1,"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:i(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:i(1115,1,"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:i(1116,1,"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:i(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:i(1118,1,"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:i(1119,1,"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:i(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:i(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:i(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:i(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:i(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:i(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:i(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:i(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:i(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:i(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:i(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:i(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:i(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:i(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:i(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:i(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:i(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:i(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:i(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:i(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:i(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:i(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:i(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:i(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:i(1147,1,"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:i(1148,1,"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:i(1149,1,"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."),_0_declarations_must_be_initialized:i(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:i(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:i(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:i(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:i(1162,1,"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:i(1163,1,"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:i(1164,1,"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:i(1165,1,"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_have_a_simple_literal_type_or_a_unique_symbol_type:i(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple 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:i(1168,1,"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:i(1169,1,"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:i(1170,1,"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:i(1171,1,"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:i(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:i(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:i(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:i(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:i(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:i(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:i(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:i(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:i(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:i(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:i(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:i(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:i(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:i(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:i(1186,1,"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:i(1187,1,"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:i(1188,1,"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:i(1189,1,"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:i(1190,1,"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:i(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:i(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:i(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:i(1194,1,"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:i(1195,1,"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:i(1196,1,"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:i(1197,1,"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:i(1198,1,"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:i(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:i(1200,1,"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:i(1202,1,"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:i(1203,1,"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_0_is_enabled_requires_using_export_type:i(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:i(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:i(1207,1,"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."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:i(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:i(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:i(1211,1,"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:i(1212,1,"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:i(1213,1,"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:i(1214,1,"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:i(1215,1,"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:i(1216,1,"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:i(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:i(1221,1,"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:i(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:i(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:i(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:i(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:i(1226,1,"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:i(1227,1,"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:i(1228,1,"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:i(1229,1,"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:i(1230,1,"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_must_be_at_the_top_level_of_a_file_or_module_declaration:i(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:i(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:i(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:i(1234,1,"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_at_the_top_level_of_a_namespace_or_module:i(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:i(1236,1,"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:i(1237,1,"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:i(1238,1,"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:i(1239,1,"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:i(1240,1,"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:i(1241,1,"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:i(1242,1,"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:i(1243,1,"_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:i(1244,1,"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:i(1245,1,"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:i(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:i(1247,1,"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:i(1248,1,"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:i(1249,1,"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:i(1250,1,"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:i(1251,1,"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:i(1252,1,"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."),Abstract_properties_can_only_appear_within_an_abstract_class:i(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:i(1254,1,"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:i(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:i(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:i(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:i(1259,1,"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:i(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:i(1261,1,"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:i(1262,1,"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:i(1263,1,"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:i(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:i(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:i(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:i(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:i(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:i(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:i(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:i(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:i(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:i(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:i(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:i(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:i(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:i(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:i(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:i(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:i(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:i(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:i(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:i(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:i(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:i(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:i(1286,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286","ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:i(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:i(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),with_statements_are_not_allowed_in_an_async_function_block:i(1300,1,"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:i(1308,1,"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."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:i(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),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:i(1312,1,"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:i(1313,1,"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:i(1314,1,"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:i(1315,1,"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:i(1316,1,"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:i(1317,1,"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:i(1318,1,"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:i(1319,1,"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:i(1320,1,"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:i(1321,1,"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:i(1322,1,"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_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext:i(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext:i(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."),Argument_of_dynamic_import_cannot_be_spread_element:i(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:i(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:i(1327,1,"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:i(1328,1,"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:i(1329,1,"_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:i(1330,1,"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:i(1331,1,"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:i(1332,1,"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:i(1333,1,"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:i(1334,1,"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:i(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:i(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:i(1338,1,"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:i(1339,1,"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:i(1340,1,"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}')'?"),Class_constructor_may_not_be_an_accessor:i(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext:i(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),A_label_is_not_allowed_here:i(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:i(1345,1,"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:i(1346,1,"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:i(1347,1,"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:i(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:i(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:i(1350,3,"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:i(1351,1,"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:i(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:i(1353,1,"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:i(1354,1,"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:i(1355,1,"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:i(1356,1,"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:i(1357,1,"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:i(1358,1,"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:i(1359,1,"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."),Type_0_does_not_satisfy_the_expected_type_1:i(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:i(1361,1,"_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:i(1362,1,"_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:i(1363,1,"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:i(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:i(1365,3,"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:i(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:i(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:i(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:i(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error:i(1371,1,"This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371","This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."),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:i(1375,1,"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:i(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:i(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:i(1379,1,"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:i(1380,1,"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:i(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:i(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:i(1385,1,"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:i(1386,1,"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:i(1387,1,"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:i(1388,1,"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:i(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:i(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:i(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:i(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:i(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:i(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:i(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:i(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:i(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:i(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:i(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:i(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:i(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:i(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:i(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:i(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:i(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:i(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:i(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:i(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:i(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:i(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:i(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:i(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:i(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:i(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:i(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:i(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:i(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:i(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:i(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:i(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:i(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:i(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:i(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:i(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:i(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:i(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:i(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:i(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:i(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_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:i(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops 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."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:i(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:i(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:i(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:i(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:i(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:i(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:i(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:i(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:i(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:i(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:i(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443",`Module declaration names may only use ' or " quoted strings.`),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled:i(1444,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444","'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled:i(1446,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:i(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:i(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments:i(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional assertion as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:i(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext:i(1452,1,"resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452","'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."),resolution_mode_should_be_either_require_or_import:i(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:i(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:i(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:i(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:i(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:i(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",`File is ECMAScript module because '{0}' has field "type" with value "module"`),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:i(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",`File is CommonJS module because '{0}' has field "type" whose value is not "module"`),File_is_CommonJS_module_because_0_does_not_have_field_type:i(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460",`File is CommonJS module because '{0}' does not have field "type"`),File_is_CommonJS_module_because_package_json_was_not_found:i(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:i(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:i(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:i(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:i(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:i(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:i(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:i(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:i(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:i(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:i(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479",`The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:i(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:i(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481",`To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:i(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:i(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:i(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:i(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:i(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:i(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:i(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:i(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:i(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:i(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:i(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:i(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:i(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:i(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),The_types_of_0_are_incompatible_between_these_types:i(2200,1,"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:i(2201,1,"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:i(2202,1,"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:i(2203,1,"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:i(2204,1,"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:i(2205,1,"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),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:i(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:i(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:i(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:i(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:i(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:i(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:i(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:i(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:i(2301,1,"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:i(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:i(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:i(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:i(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:i(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:i(2307,1,"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:i(2308,1,"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:i(2309,1,"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:i(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:i(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:i(2312,1,"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:i(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:i(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:i(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:i(2316,1,"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:i(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:i(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:i(2319,1,"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:i(2320,1,"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:i(2321,1,"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:i(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:i(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:i(2324,1,"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:i(2325,1,"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:i(2326,1,"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:i(2327,1,"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:i(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:i(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:i(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:i(2331,1,"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:i(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_constructor_arguments:i(2333,1,"this_cannot_be_referenced_in_constructor_arguments_2333","'this' cannot be referenced in constructor arguments."),this_cannot_be_referenced_in_a_static_property_initializer:i(2334,1,"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:i(2335,1,"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:i(2336,1,"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:i(2337,1,"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:i(2338,1,"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:i(2339,1,"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:i(2340,1,"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:i(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:i(2343,1,"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:i(2344,1,"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:i(2345,1,"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}'."),Untyped_function_calls_may_not_accept_type_arguments:i(2347,1,"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:i(2348,1,"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:i(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:i(2350,1,"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:i(2351,1,"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:i(2352,1,"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:i(2353,1,"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:i(2354,1,"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_undefined_void_nor_any_must_return_a_value:i(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:i(2356,1,"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:i(2357,1,"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:i(2358,1,"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:i(2359,1,"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_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:i(2362,1,"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:i(2363,1,"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:i(2364,1,"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:i(2365,1,"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:i(2366,1,"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_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:i(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:i(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:i(2369,1,"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:i(2370,1,"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:i(2371,1,"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:i(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:i(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:i(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:i(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:i(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:i(2377,1,"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:i(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:i(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:i(2383,1,"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:i(2384,1,"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:i(2385,1,"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:i(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:i(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:i(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:i(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:i(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:i(2391,1,"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:i(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:i(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:i(2394,1,"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:i(2395,1,"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:i(2396,1,"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:i(2397,1,"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:i(2398,1,"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:i(2399,1,"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:i(2400,1,"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."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:i(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:i(2402,1,"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:i(2403,1,"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:i(2404,1,"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:i(2405,1,"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:i(2406,1,"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:i(2407,1,"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:i(2408,1,"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:i(2409,1,"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:i(2410,1,"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'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:i(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:i(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:i(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:i(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:i(2415,1,"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:i(2416,1,"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:i(2417,1,"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:i(2418,1,"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:i(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:i(2420,1,"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:i(2422,1,"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:i(2423,1,"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:i(2425,1,"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:i(2426,1,"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:i(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:i(2428,1,"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:i(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:i(2431,1,"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:i(2432,1,"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:i(2433,1,"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:i(2434,1,"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:i(2435,1,"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:i(2436,1,"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:i(2437,1,"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:i(2438,1,"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:i(2439,1,"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:i(2440,1,"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:i(2441,1,"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:i(2442,1,"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:i(2443,1,"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:i(2444,1,"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:i(2445,1,"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_This_is_an_instance_of_class_2:i(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:i(2447,1,"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:i(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:i(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:i(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:i(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:i(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:i(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:i(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:i(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:i(2458,1,"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:i(2459,1,"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:i(2460,1,"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:i(2461,1,"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:i(2462,1,"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:i(2463,1,"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:i(2464,1,"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:i(2465,1,"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:i(2466,1,"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:i(2467,1,"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:i(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:i(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:i(2472,1,"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:i(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:i(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),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:i(2475,1,"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:i(2476,1,"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:i(2477,1,"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:i(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:i(2480,1,"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:i(2481,1,"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:i(2483,1,"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:i(2484,1,"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:i(2487,1,"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:i(2488,1,"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:i(2489,1,"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:i(2490,1,"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:i(2491,1,"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:i(2492,1,"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:i(2493,1,"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:i(2494,1,"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:i(2495,1,"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:i(2496,1,"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:i(2497,1,"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:i(2498,1,"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:i(2499,1,"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:i(2500,1,"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:i(2501,1,"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:i(2502,1,"_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:i(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:i(2504,1,"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:i(2505,1,"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:i(2506,1,"_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:i(2507,1,"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:i(2508,1,"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:i(2509,1,"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:i(2510,1,"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:i(2511,1,"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:i(2512,1,"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:i(2513,1,"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."),A_tuple_type_cannot_be_indexed_with_a_negative_value:i(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:i(2515,1,"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:i(2516,1,"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:i(2517,1,"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:i(2518,1,"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:i(2519,1,"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:i(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' 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:i(2522,1,"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:i(2523,1,"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:i(2524,1,"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:i(2525,1,"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:i(2526,1,"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:i(2527,1,"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:i(2528,1,"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:i(2529,1,"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:i(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:i(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:i(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:i(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:i(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:i(2536,1,"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:i(2537,1,"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:i(2538,1,"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:i(2539,1,"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:i(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:i(2542,1,"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:i(2543,1,"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:i(2544,1,"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:i(2545,1,"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:i(2547,1,"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:i(2548,1,"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:i(2549,1,"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:i(2550,1,"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:i(2551,1,"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:i(2552,1,"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:i(2553,1,"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:i(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:i(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:i(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:i(2558,1,"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:i(2559,1,"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:i(2560,1,"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:i(2561,1,"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:i(2562,1,"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:i(2563,1,"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:i(2564,1,"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:i(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:i(2566,1,"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:i(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:i(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:i(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:i(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:i(2574,1,"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:i(2575,1,"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_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:i(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:i(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:i(2578,1,"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:i(2580,1,"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:i(2581,1,"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:i(2582,1,"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:i(2583,1,"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:i(2584,1,"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:i(2585,1,"_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."),Cannot_assign_to_0_because_it_is_a_constant:i(2588,1,"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:i(2589,1,"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:i(2590,1,"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:i(2591,1,"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:i(2592,1,"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:i(2593,1,"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_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:i(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with '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:i(2595,1,"_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:i(2596,1,"_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:i(2597,1,"_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:i(2598,1,"_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_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:i(2602,1,"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:i(2603,1,"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:i(2604,1,"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."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:i(2606,1,"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:i(2607,1,"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:i(2608,1,"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:i(2609,1,"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:i(2610,1,"_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:i(2611,1,"_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:i(2612,1,"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:i(2613,1,"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:i(2614,1,"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:i(2615,1,"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:i(2616,1,"_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:i(2617,1,"_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:i(2618,1,"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:i(2619,1,"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:i(2620,1,"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:i(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:i(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:i(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:i(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:i(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:i(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:i(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:i(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:i(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:i(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:i(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:i(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:i(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:i(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:i(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:i(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:i(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:i(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:i(2649,1,"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:i(2651,1,"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:i(2652,1,"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:i(2653,1,"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}'."),JSX_expressions_must_have_one_parent_element:i(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:i(2658,1,"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:i(2659,1,"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:i(2660,1,"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:i(2661,1,"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:i(2662,1,"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:i(2663,1,"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:i(2664,1,"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:i(2665,1,"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:i(2666,1,"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:i(2667,1,"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:i(2668,1,"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:i(2669,1,"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:i(2670,1,"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:i(2671,1,"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:i(2672,1,"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:i(2673,1,"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:i(2674,1,"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:i(2675,1,"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:i(2676,1,"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:i(2677,1,"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:i(2678,1,"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:i(2679,1,"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:i(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:i(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:i(2683,1,"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:i(2684,1,"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:i(2685,1,"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:i(2686,1,"_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:i(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:i(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:i(2689,1,"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:i(2690,1,"_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}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:i(2692,1,"_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:i(2693,1,"_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:i(2694,1,"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:i(2695,1,"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:i(2696,1,"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:i(2697,1,"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:i(2698,1,"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:i(2699,1,"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:i(2700,1,"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:i(2701,1,"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:i(2702,1,"_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:i(2703,1,"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:i(2704,1,"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:i(2705,1,"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:i(2706,1,"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:i(2707,1,"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:i(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:i(2709,1,"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:i(2710,1,"_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:i(2711,1,"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:i(2712,1,"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:i(2713,1,"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:i(2714,1,"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:i(2715,1,"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:i(2716,1,"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:i(2717,1,"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:i(2718,1,"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:i(2719,1,"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:i(2720,1,"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:i(2721,1,"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:i(2722,1,"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:i(2723,1,"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:i(2724,1,"_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:i(2725,1,"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:i(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:i(2727,1,"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:i(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:i(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:i(2730,1,"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:i(2731,1,"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:i(2732,1,"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:i(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:i(2734,1,"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:i(2735,1,"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:i(2736,1,"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:i(2737,1,"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:i(2738,3,"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:i(2739,1,"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:i(2740,1,"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:i(2741,1,"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:i(2742,1,"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:i(2743,1,"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:i(2744,1,"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:i(2745,1,"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:i(2746,1,"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:i(2747,1,"_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_0_is_enabled:i(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:i(2749,1,"_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:i(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:i(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:i(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:i(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:i(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:i(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:i(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:i(2757,1,"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:i(2758,1,"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:i(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:i(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:i(2761,1,"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:i(2762,1,"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:i(2763,1,"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:i(2764,1,"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:i(2765,1,"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:i(2766,1,"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:i(2767,1,"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:i(2768,1,"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:i(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:i(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:i(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:i(2772,1,"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:i(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:i(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this 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:i(2775,1,"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:i(2776,1,"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:i(2777,1,"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:i(2778,1,"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:i(2779,1,"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:i(2780,1,"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:i(2781,1,"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:i(2782,3,"_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:i(2783,1,"_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:i(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:i(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:i(2786,1,"_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:i(2787,1,"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:i(2788,1,"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:i(2789,1,"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:i(2790,1,"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:i(2791,1,"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_nodenext_or_to_add_aliases_to_the_paths_option:i(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', 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:i(2793,1,"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:i(2794,1,"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:i(2795,1,"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:i(2796,1,"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."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:i(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:i(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:i(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:i(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:i(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:i(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:i(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:i(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:i(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:i(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:i(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:i(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:i(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:i(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:i(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:i(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:i(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers:i(2815,1,"arguments_cannot_be_referenced_in_property_initializers_2815","'arguments' cannot be referenced in property initializers."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:i(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:i(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:i(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:i(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:i(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext:i(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821","Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:i(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Cannot_find_namespace_0_Did_you_mean_1:i(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:i(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:i(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls:i(2836,1,"Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836","Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:i(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:i(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:i(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes:i(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840","An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:i(2841,1,"The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841","The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:i(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:i(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:i(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:i(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:i(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:i(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:i(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:i(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:i(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:i(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_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:i(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements 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."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),Import_declaration_0_is_using_private_name_1:i(4e3,1,"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:i(4002,1,"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:i(4004,1,"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:i(4006,1,"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:i(4008,1,"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:i(4010,1,"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:i(4012,1,"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:i(4014,1,"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:i(4016,1,"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:i(4019,1,"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:i(4020,1,"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:i(4021,1,"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:i(4022,1,"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:i(4023,1,"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:i(4024,1,"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:i(4025,1,"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:i(4026,1,"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:i(4027,1,"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:i(4028,1,"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:i(4029,1,"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:i(4030,1,"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:i(4031,1,"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:i(4032,1,"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:i(4033,1,"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:i(4034,1,"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:i(4035,1,"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:i(4036,1,"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:i(4037,1,"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:i(4038,1,"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:i(4039,1,"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:i(4040,1,"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:i(4041,1,"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:i(4042,1,"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:i(4043,1,"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:i(4044,1,"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:i(4045,1,"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:i(4046,1,"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:i(4047,1,"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:i(4048,1,"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:i(4049,1,"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:i(4050,1,"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:i(4051,1,"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:i(4052,1,"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:i(4053,1,"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:i(4054,1,"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:i(4055,1,"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:i(4056,1,"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:i(4057,1,"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:i(4058,1,"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:i(4059,1,"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:i(4060,1,"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:i(4061,1,"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:i(4062,1,"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:i(4063,1,"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:i(4064,1,"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:i(4065,1,"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:i(4066,1,"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:i(4067,1,"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:i(4068,1,"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:i(4069,1,"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:i(4070,1,"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:i(4071,1,"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:i(4072,1,"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:i(4073,1,"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:i(4074,1,"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:i(4075,1,"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:i(4076,1,"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:i(4077,1,"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:i(4078,1,"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:i(4081,1,"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:i(4082,1,"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:i(4083,1,"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}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:i(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:i(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' 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:i(4090,1,"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:i(4091,1,"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:i(4092,1,"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:i(4094,1,"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:i(4095,1,"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:i(4096,1,"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:i(4097,1,"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:i(4098,1,"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:i(4099,1,"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:i(4100,1,"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:i(4101,1,"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:i(4102,1,"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:i(4103,1,"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:i(4104,1,"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:i(4105,1,"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:i(4106,1,"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:i(4107,1,"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:i(4108,1,"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:i(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:i(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:i(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:i(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:i(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:i(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:i(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:i(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:i(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:i(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:i(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:i(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:i(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:i(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:i(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:i(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:i(4125,1,"resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125","'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),The_current_host_does_not_support_the_0_option:i(5001,1,"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:i(5009,1,"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:i(5010,1,"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:i(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:i(5014,1,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:i(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:i(5024,1,"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:i(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:i(5033,1,"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:i(5042,1,"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:i(5047,1,"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:i(5048,1,"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:i(5051,1,"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:i(5052,1,"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:i(5053,1,"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:i(5054,1,"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:i(5055,1,"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:i(5056,1,"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:i(5057,1,"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:i(5058,1,"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:i(5059,1,"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:i(5061,1,"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:i(5062,1,"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:i(5063,1,"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:i(5064,1,"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:i(5065,1,"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:i(5066,1,"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:i(5067,1,"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:i(5068,1,"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:i(5069,1,"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_when_moduleResolution_is_set_to_classic:i(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext:i(5071,1,"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:i(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:i(5073,1,"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:i(5074,1,"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:i(5075,1,"_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:i(5076,1,"_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:i(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:i(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:i(5079,1,"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:i(5080,1,"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:i(5081,1,"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:i(5082,1,"_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:i(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:i(5085,1,"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:i(5086,1,"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:i(5087,1,"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:i(5088,1,"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:i(5089,1,"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:i(5090,1,"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 './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:i(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:i(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:i(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:i(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later:i(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:i(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:i(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:i(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:i(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101",`Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),Option_0_has_been_removed_Please_remove_it_from_your_configuration:i(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:i(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:i(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:i(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:i(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:i(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107",`Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:i(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:i(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:i(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:i(6e3,3,"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:i(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:i(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:i(6004,3,"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:i(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:i(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:i(6007,3,"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:i(6008,3,"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:i(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:i(6010,3,"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:i(6011,3,"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:i(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:i(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:i(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:i(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:i(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:i(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:i(6019,3,"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:i(6020,3,"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:i(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:i(6024,3,"options_6024","options"),file:i(6025,3,"file_6025","file"),Examples_Colon_0:i(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:i(6027,3,"Options_Colon_6027","Options:"),Version_0:i(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:i(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:i(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:i(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:i(6034,3,"KIND_6034","KIND"),FILE:i(6035,3,"FILE_6035","FILE"),VERSION:i(6036,3,"VERSION_6036","VERSION"),LOCATION:i(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:i(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:i(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:i(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:i(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:i(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:i(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:i(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:i(6046,1,"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:i(6048,1,"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}'."),Unable_to_open_file_0:i(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:i(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:i(6052,3,"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:i(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:i(6054,1,"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:i(6055,3,"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:i(6056,3,"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:i(6058,3,"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:i(6059,1,"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:i(6060,3,"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:i(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:i(6064,1,"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:i(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:i(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:i(6070,3,"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:i(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:i(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:i(6073,3,"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:i(6074,3,"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:i(6075,3,"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:i(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:i(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:i(6078,3,"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:i(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:i(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),File_0_has_an_unsupported_extension_so_skipping_it:i(6081,3,"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:i(6082,1,"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:i(6083,3,"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:i(6084,3,"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:i(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:i(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:i(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:i(6088,3,"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:i(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:i(6090,3,"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:i(6091,3,"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:i(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:i(6093,3,"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:i(6094,3,"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_types_Colon_1:i(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:i(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:i(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:i(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:i(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:i(6100,3,"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:i(6101,3,"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:i(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:i(6104,3,"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:i(6105,3,"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:i(6106,3,"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:i(6107,3,"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:i(6108,3,"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:i(6109,3,"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:i(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:i(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:i(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:i(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:i(6114,1,"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:i(6115,3,"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:i(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:i(6119,3,"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:i(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:i(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:i(6122,3,"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:i(6123,3,"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:i(6124,3,"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:i(6125,3,"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:i(6126,3,"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:i(6127,3,"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:i(6128,3,"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:i(6130,3,"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:i(6131,1,"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:i(6132,3,"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:i(6133,1,"_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:i(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:i(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:i(6136,3,"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:i(6137,1,"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:i(6138,1,"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:i(6139,3,"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:i(6140,1,"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:i(6141,3,"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:i(6142,1,"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:i(6144,3,"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:i(6145,3,"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:i(6146,3,"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:i(6147,3,"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:i(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:i(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:i(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:i(6151,3,"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:i(6152,3,"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:i(6153,3,"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:i(6154,3,"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:i(6155,3,"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:i(6156,3,"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:i(6157,3,"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:i(6158,3,"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:i(6159,3,"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:i(6160,3,"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:i(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:i(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:i(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:i(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:i(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:i(6166,3,"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:i(6167,3,"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:i(6168,3,"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:i(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:i(6170,3,"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:i(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3:i(6179,3,"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:i(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:i(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:i(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:i(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:i(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:i(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:i(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:i(6189,1,"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:i(6191,3,"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:i(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:i(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:i(6194,3,"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:i(6195,3,"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:i(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:i(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:i(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:i(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:i(6200,1,"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:i(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:i(6202,1,"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:i(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:i(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:i(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:i(6206,3,"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:i(6207,3,"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:i(6208,3,"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:i(6209,3,"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:i(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:i(6211,3,"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:i(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:i(6213,3,"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:i(6214,3,"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:i(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:i(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:i(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:i(6218,3,"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:i(6219,3,"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:i(6220,3,"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:i(6221,3,"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:i(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:i(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:i(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:i(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:i(6226,3,"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', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:i(6227,3,"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', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:i(6229,1,"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:i(6230,1,"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:i(6231,1,"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:i(6232,1,"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:i(6233,1,"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:i(6234,1,"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:i(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:i(6236,1,"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:i(6237,3,"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:i(6238,1,"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"),File_0_exists_according_to_earlier_cached_lookups:i(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:i(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:i(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:i(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:i(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:i(6244,3,"Modules_6244","Modules"),File_Management:i(6245,3,"File_Management_6245","File Management"),Emit:i(6246,3,"Emit_6246","Emit"),JavaScript_Support:i(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:i(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:i(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:i(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:i(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:i(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:i(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:i(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:i(6255,3,"Projects_6255","Projects"),Output_Formatting:i(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:i(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:i(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:i(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:i(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:i(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:i(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:i(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:i(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:i(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:i(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:i(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:i(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:i(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:i(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:i(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:i(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:i(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:i(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:i(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278",`There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),Enable_project_compilation:i(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:i(6304,1,"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:i(6305,1,"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:i(6306,1,"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:i(6307,1,"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:i(6308,1,"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:i(6309,1,"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:i(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:i(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:i(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:i(6352,3,"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:i(6353,3,"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:i(6354,3,"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:i(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:i(6356,3,"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:i(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:i(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:i(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:i(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:i(6362,3,"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:i(6363,3,"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:i(6364,3,"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:i(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:i(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:i(6369,1,"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:i(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:i(6371,3,"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:i(6372,3,"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:i(6373,3,"Updating_output_of_project_0_6373","Updating output of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:i(6374,3,"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:i(6375,3,"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:i(6376,3,"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:i(6377,1,"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}'"),Composite_projects_may_not_disable_incremental_compilation:i(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:i(6380,3,"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:i(6381,3,"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:i(6382,3,"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:i(6383,3,"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:i(6384,3,"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:i(6385,2,"_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:i(6386,3,"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_signature_0_of_1_is_deprecated:i(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:i(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:i(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:i(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:i(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:i(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:i(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:i(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:i(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:i(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:i(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:i(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:i(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:i(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:i(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:i(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:i(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:i(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:i(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:i(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:i(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:i(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:i(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:i(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:i(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:i(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:i(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:i(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:i(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:i(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:i(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:i(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:i(6500,3,"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:i(6501,3,"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:i(6502,3,"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:i(6503,3,"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:i(6504,1,"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?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:i(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:i(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files:i(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:i(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:i(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:i(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:i(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:i(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:i(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:i(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:i(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:i(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:i(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:i(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:i(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:i(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:i(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:i(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:i(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:i(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:i(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:i(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:i(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:i(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:i(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:i(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:i(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:i(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:i(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:i(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:i(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:i(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:i(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:i(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:i(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:i(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:i(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:i(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:i(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:i(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:i(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:i(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:i(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:i(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:i(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:i(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:i(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:i(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:i(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:i(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:i(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:i(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:i(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:i(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:i(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:i(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:i(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:i(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:i(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:i(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:i(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:i(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:i(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:i(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:i(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:i(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:i(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:i(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:i(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:i(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:i(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:i(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:i(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:i(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:i(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:i(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:i(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:i(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:i(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:i(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:i(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:i(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:i(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:i(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:i(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:i(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:i(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:i(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:i(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:i(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:i(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:i(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:i(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:i(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:i(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:i(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:i(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:i(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:i(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:i(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:i(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:i(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:i(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:i(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:i(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:i(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:i(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:i(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:i(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:i(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:i(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:i(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:i(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:i(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:i(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:i(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Default_catch_clause_variables_as_unknown_instead_of_any:i(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:i(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),one_of_Colon:i(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:i(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:i(6902,3,"type_Colon_6902","type:"),default_Colon:i(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:i(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:i(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:i(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:i(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:i(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:i(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:i(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:i(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:i(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:i(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:i(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:i(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:i(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:i(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:i(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:i(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:i(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:i(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:i(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:i(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:i(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:i(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:i(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:i(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:i(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:i(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:i(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:i(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:i(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:i(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:i(7008,1,"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:i(7009,1,"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:i(7010,1,"_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:i(7011,1,"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."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:i(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:i(7013,1,"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:i(7014,1,"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:i(7015,1,"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:i(7016,1,"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:i(7017,1,"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:i(7018,1,"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:i(7019,1,"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:i(7020,1,"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:i(7022,1,"_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:i(7023,1,"_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:i(7024,1,"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:i(7025,1,"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:i(7026,1,"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:i(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:i(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:i(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:i(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:i(7031,1,"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:i(7032,1,"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:i(7033,1,"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:i(7034,1,"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:i(7035,1,"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:i(7036,1,"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:i(7037,3,"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:i(7038,3,"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:i(7039,1,"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:i(7040,1,"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:i(7041,1,"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:i(7042,1,"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:i(7043,2,"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:i(7044,2,"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:i(7045,2,"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:i(7046,2,"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:i(7047,2,"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:i(7048,2,"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:i(7049,2,"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:i(7050,2,"_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:i(7051,1,"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:i(7052,1,"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:i(7053,1,"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:i(7054,1,"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:i(7055,1,"_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:i(7056,1,"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."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:i(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:i(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:i(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:i(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:i(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:i(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:i(8001,1,"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:i(8002,1,"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:i(8003,1,"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:i(8004,1,"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:i(8005,1,"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:i(8006,1,"_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:i(8008,1,"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:i(8009,1,"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:i(8010,1,"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:i(8011,1,"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:i(8012,1,"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:i(8013,1,"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:i(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:i(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:i(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:i(8020,1,"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:i(8021,1,"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:i(8022,1,"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:i(8023,1,"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:i(8024,1,"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:i(8025,1,"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:i(8026,1,"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:i(8027,1,"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:i(8028,1,"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:i(8029,1,"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:i(8030,1,"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:i(8031,1,"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:i(8032,1,"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:i(8033,1,"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:i(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:i(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:i(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:i(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:i(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:i(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:i(9005,1,"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:i(9006,1,"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:i(17e3,1,"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:i(17001,1,"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:i(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:i(17004,1,"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:i(17005,1,"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:i(17006,1,"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:i(17007,1,"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:i(17008,1,"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:i(17009,1,"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:i(17010,1,"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:i(17011,1,"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:i(17012,1,"_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:i(17013,1,"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:i(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:i(17015,1,"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:i(17016,1,"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:i(17017,1,"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:i(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:i(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:i(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Circularity_detected_while_resolving_configuration_Colon_0:i(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:i(18002,1,"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:i(18003,1,"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_ES_module:i(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:i(80002,2,"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:i(80003,2,"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:i(80004,2,"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:i(80005,2,"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:i(80006,2,"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:i(80007,2,"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:i(80008,2,"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."),JSDoc_typedef_may_be_converted_to_TypeScript_type:i(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:i(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:i(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:i(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:i(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:i(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:i(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:i(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:i(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:i(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:i(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:i(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:i(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:i(90013,3,"Import_0_from_1_90013",`Import '{0}' from "{1}"`),Change_0_to_1:i(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:i(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:i(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:i(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:i(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:i(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:i(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:i(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:i(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:i(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:i(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:i(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:i(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:i(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:i(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:i(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:i(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:i(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:i(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:i(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:i(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:i(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:i(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:i(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:i(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:i(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:i(90055,3,"Remove_type_from_import_declaration_from_0_90055",`Remove 'type' from import declaration from "{0}"`),Remove_type_from_import_of_0_from_1:i(90056,3,"Remove_type_from_import_of_0_from_1_90056",`Remove 'type' from import of '{0}' from "{1}"`),Add_import_from_0:i(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:i(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:i(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:i(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Convert_function_to_an_ES2015_class:i(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:i(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:i(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:i(95005,3,"Extract_function_95005","Extract function"),Extract_constant:i(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:i(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:i(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:i(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:i(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:i(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:i(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:i(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:i(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:i(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:i(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:i(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:i(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:i(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:i(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:i(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:i(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:i(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:i(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:i(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:i(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:i(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:i(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:i(95030,3,"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:i(95031,3,"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:i(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:i(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:i(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:i(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:i(95036,3,"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:i(95037,3,"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:i(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:i(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:i(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:i(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:i(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:i(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:i(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:i(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:i(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:i(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:i(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:i(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:i(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:i(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:i(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:i(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:i(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:i(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:i(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:i(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:i(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:i(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:i(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:i(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:i(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:i(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:i(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:i(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:i(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:i(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:i(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:i(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:i(95070,3,"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:i(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:i(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:i(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:i(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:i(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:i(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:i(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:i(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:i(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:i(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:i(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:i(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:i(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:i(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:i(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:i(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:i(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:i(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:i(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:i(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:i(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:i(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:i(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:i(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:i(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:i(95097,3,"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:i(95098,3,"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:i(95099,3,"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:i(95100,3,"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:i(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:i(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:i(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:i(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:i(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:i(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:i(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:i(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:i(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:i(95112,3,"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:i(95113,3,"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:i(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:i(95115,3,"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:i(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:i(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:i(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:i(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:i(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:i(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:i(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:i(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:i(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:i(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:i(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:i(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:i(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:i(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:i(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:i(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:i(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:i(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:i(95134,3,"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:i(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:i(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:i(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:i(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:i(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:i(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:i(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:i(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:i(95143,3,"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:i(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:i(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:i(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:i(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:i(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:i(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:i(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:i(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:i(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:i(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenation:i(95154,3,"Can_only_convert_string_concatenation_95154","Can only convert string concatenation"),Selection_is_not_a_valid_statement_or_statements:i(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:i(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:i(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:i(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:i(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:i(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:i(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:i(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:i(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:i(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:i(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:i(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:i(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:i(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:i(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:i(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:i(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:i(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:i(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:i(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:i(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:i(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:i(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:i(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:i(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:i(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:i(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:i(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:i(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:i(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:i(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:i(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:i(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:i(18004,1,"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:i(18006,1,"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:i(18007,1,"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:i(18009,1,"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:i(18010,1,"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:i(18011,1,"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:i(18012,1,"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:i(18013,1,"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:i(18014,1,"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:i(18015,1,"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:i(18016,1,"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:i(18017,1,"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:i(18018,1,"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:i(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:i(18024,1,"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:i(18026,1,"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:i(18027,1,"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:i(18028,1,"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:i(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:i(18030,1,"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:i(18031,1,"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:i(18032,1,"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."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:i(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:i(18034,3,"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:i(18035,1,"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."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:i(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:i(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:i(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:i(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:i(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:i(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:i(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:i(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:i(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:i(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:i(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:i(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:i(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:i(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:i(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Non_abstract_class_0_does_not_implement_all_abstract_members_of_1:i(18052,1,"Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052","Non-abstract class '{0}' does not implement all abstract members of '{1}'"),Its_type_0_is_not_a_valid_JSX_element_type:i(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:i(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block.")}}});function kt(e){return e>=80}function r4(e){return e===32||kt(e)}function i_(e,t){if(e=2?i_(e,d4):t===1?i_(e,p4):i_(e,l4)}function jE(e,t){return t>=2?i_(e,m4):t===1?i_(e,f4):i_(e,u4)}function FE(e){let t=[];return e.forEach((r,a)=>{t[r]=a}),t}function nr(e){return g4[e]}function Rl(e){return h0.get(e)}function Hd(e){let t=[],r=0,a=0;for(;r127&&mr(_)&&(t.push(a),a=r);break}}return t.push(a),t}function BE(e,t,r,a){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,r,a):Tg(Ia(e),t,r,e.text,a)}function Tg(e,t,r,a,_){(t<0||t>=e.length)&&(_?t=t<0?0:t>=e.length?e.length-1:t:N.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${a!==void 0?gv(e,Hd(a)):"unknown"}`));let p=e[t]+r;return _?p>e[t+1]?e[t+1]:typeof a=="string"&&p>a.length?a.length:p:(t=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function mr(e){return e===10||e===13||e===8232||e===8233}function Eo(e){return e>=48&&e<=57}function Rb(e){return Eo(e)||e>=65&&e<=70||e>=97&&e<=102}function UE(e){return e<=1114111}function Nf(e){return e>=48&&e<=55}function qE(e,t){let r=e.charCodeAt(t);switch(r){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 t===0;default:return r>127}}function Nt(e,t,r,a,_){if(Oa(t))return t;let p=!1;for(;;){let d=e.charCodeAt(t);switch(d){case 13:e.charCodeAt(t+1)===10&&t++;case 10:if(t++,r)return t;p=!!_;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(a)break;if(e.charCodeAt(t+1)===47){for(t+=2;t127&&Vi(d)){t++;continue}break}return t}}function ko(e,t){if(N.assert(t>=0),t===0||mr(e.charCodeAt(t-1))){let r=e.charCodeAt(t);if(t+ll=0&&r127&&Vi(L)){C&&mr(L)&&(y=!0),r++;continue}break e}}return C&&(k=_(h,l,v,y,p,k)),k}function zE(e,t,r,a){return Gd(!1,e,t,!1,r,a)}function WE(e,t,r,a){return Gd(!1,e,t,!0,r,a)}function i4(e,t,r,a,_){return Gd(!0,e,t,!1,r,a,_)}function a4(e,t,r,a,_){return Gd(!0,e,t,!0,r,a,_)}function o4(e,t,r,a,_,p=[]){return p.push({kind:r,pos:e,end:t,hasTrailingNewLine:a}),p}function Wo(e,t){return i4(e,t,o4,void 0,void 0)}function s4(e,t){return a4(e,t,o4,void 0,void 0)}function _4(e){let t=Xd.exec(e);if(t)return t[0]}function un(e,t){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>127&&n4(e,t)}function Qa(e,t,r){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===36||e===95||(r===1?e===45||e===58:!1)||e>127&&jE(e,t)}function Cg(e,t,r){let a=cn(e,0);if(!un(a,t))return!1;for(let _=Yn(a);_y,getStartPos:()=>y,getTokenEnd:()=>l,getTextPos:()=>l,getToken:()=>S,getTokenStart:()=>C,getTokenPos:()=>C,getTokenText:()=>h.substring(C,l),getTokenValue:()=>k,hasUnicodeEscape:()=>(L&1024)!==0,hasExtendedUnicodeEscape:()=>(L&8)!==0,hasPrecedingLineBreak:()=>(L&1)!==0,hasPrecedingJSDocComment:()=>(L&2)!==0,isIdentifier:()=>S===80||S>118,isReservedWord:()=>S>=83&&S<=118,isUnterminated:()=>(L&4)!==0,getCommentDirectives:()=>G,getNumericLiteralFlags:()=>L&25584,getTokenFlags:()=>L,reScanGreaterToken:St,reScanAsteriskEqualsToken:xn,reScanSlashToken:Tr,reScanTemplateToken:Ut,reScanTemplateHeadOrNoSubstitutionTemplate:fr,scanJsxIdentifier:Mr,scanJsxAttributeValue:at,reScanJsxAttributeValue:er,reScanJsxToken:ht,reScanLessThanToken:wn,reScanHashToken:Tt,reScanQuestionToken:Or,reScanInvalidIdentifier:sr,scanJsxToken:pt,scanJsDocToken:tn,scanJSDocCommentTextToken:Qt,scan:Sn,getText:Di,clearCommentDirectives:qn,setText:Ae,setScriptTarget:oe,setLanguageVariant:ge,setOnError:q,resetTokenState:Se,setTextPos:Se,setInJSDocType:nt,tryScan:nn,lookAhead:rn,scanRange:Un};return N.isDebugging&&Object.defineProperty(ue,"__debugShowCurrentPositionInText",{get:()=>{let z=ue.getText();return z.slice(0,ue.getTokenFullStart())+"\u2551"+z.slice(ue.getTokenFullStart())}}),ue;function Y(z,X=l,ee,xe){if(_){let ke=l;l=X,_(z,ee||0,xe),l=ke}}function B(){let z=l,X=!1,ee=!1,xe="";for(;;){let ke=h.charCodeAt(l);if(ke===95){L|=512,X?(X=!1,ee=!0,xe+=h.substring(z,l)):(L|=16384,Y(ee?U.Multiple_consecutive_numeric_separators_are_not_permitted:U.Numeric_separators_are_not_allowed_here,l,1)),l++,z=l;continue}if(Eo(ke)){X=!0,ee=!1,l++;continue}break}return h.charCodeAt(l-1)===95&&(L|=16384,Y(U.Numeric_separators_are_not_allowed_here,l-1,1)),xe+h.substring(z,l)}function ae(){let z=l,X;if(h.charCodeAt(l)===48)if(l++,h.charCodeAt(l)===95)L|=16896,Y(U.Numeric_separators_are_not_allowed_here,l,1),l--,X=B();else if(!Ze())L|=8192,X=""+ +k;else if(!k)X="0";else{k=""+parseInt(k,8),L|=32;let lt=S===41,yt=(lt?"-":"")+"0o"+(+k).toString(8);return lt&&z--,Y(U.Octal_literals_are_not_allowed_Use_the_syntax_0,z,l-z,yt),9}else X=B();let ee,xe;h.charCodeAt(l)===46&&(l++,ee=B());let ke=l;if(h.charCodeAt(l)===69||h.charCodeAt(l)===101){l++,L|=16,(h.charCodeAt(l)===43||h.charCodeAt(l)===45)&&l++;let lt=l,yt=B();yt?(xe=h.substring(ke,lt)+yt,ke=l):Y(U.Digit_expected)}let Le;if(L&512?(Le=X,ee&&(Le+="."+ee),xe&&(Le+=xe)):Le=h.substring(z,ke),L&8192)return Y(U.Decimals_with_leading_zeros_are_not_allowed,z,ke-z),k=""+ +Le,9;if(ee!==void 0||L&16)return Ce(z,ee===void 0&&!!(L&16)),k=""+ +Le,9;{k=Le;let lt=Tn();return Ce(z),lt}}function Ce(z,X){if(!un(cn(h,l),e))return;let ee=l,{length:xe}=Gt();xe===1&&h[ee]==="n"?Y(X?U.A_bigint_literal_cannot_use_exponential_notation:U.A_bigint_literal_must_be_an_integer,z,ee-z+1):(Y(U.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal,ee,xe),l=ee)}function Ze(){let z=l,X=!0;for(;Eo(h.charCodeAt(l));)Nf(h.charCodeAt(l))||(X=!1),l++;return k=h.substring(z,l),X}function qe(z,X){let ee=it(z,!1,X);return ee?parseInt(ee,16):-1}function rt(z,X){return it(z,!0,X)}function it(z,X,ee){let xe=[],ke=!1,Le=!1;for(;xe.length=65&<<=70)lt+=97-65;else if(!(lt>=48&<<=57||lt>=97&<<=102))break;xe.push(lt),l++,Le=!1}return xe.length=v){ee+=h.substring(xe,l),L|=4,Y(U.Unterminated_string_literal);break}let ke=h.charCodeAt(l);if(ke===X){ee+=h.substring(xe,l),l++;break}if(ke===92&&!z){ee+=h.substring(xe,l),ee+=ci(!0),xe=l;continue}if(mr(ke)&&!z){ee+=h.substring(xe,l),L|=4,Y(U.Unterminated_string_literal);break}l++}return ee}function ar(z){let X=h.charCodeAt(l)===96;l++;let ee=l,xe="",ke;for(;;){if(l>=v){xe+=h.substring(ee,l),L|=4,Y(U.Unterminated_template_literal),ke=X?15:18;break}let Le=h.charCodeAt(l);if(Le===96){xe+=h.substring(ee,l),l++,ke=X?15:18;break}if(Le===36&&l+1=v)return Y(U.Unexpected_end_of_text),"";let ee=h.charCodeAt(l);switch(l++,ee){case 48:if(l>=v||!Eo(h.charCodeAt(l)))return"\0";case 49:case 50:case 51:l=v?(L|=2048,z&&Y(U.Unexpected_end_of_text),h.substring(X,l)):h.charCodeAt(l)!==125?(L|=2048,z&&Y(U.Unterminated_Unicode_escape_sequence),h.substring(X,l)):(l++,L|=8,Of(ke)):(L|=2048,z&&Y(U.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),h.substring(X,l))}for(;l1114111&&(Y(U.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),ee=!0),l>=v?(Y(U.Unexpected_end_of_text),ee=!0):h.charCodeAt(l)===125?l++:(Y(U.Unterminated_Unicode_escape_sequence),ee=!0),ee?"":Of(X)}function Nr(){if(l+5=0&&Qa(ee,e)){l+=3,L|=8,z+=or(),X=l;continue}if(ee=Nr(),!(ee>=0&&Qa(ee,e)))break;L|=1024,z+=h.substring(X,l),z+=Of(ee),l+=6,X=l}else break}return z+=h.substring(X,l),z}function Ur(){let z=k.length;if(z>=2&&z<=12){let X=k.charCodeAt(0);if(X>=97&&X<=122){let ee=c4.get(k);if(ee!==void 0)return S=ee}}return S=80}function Xt(z){let X="",ee=!1,xe=!1;for(;;){let ke=h.charCodeAt(l);if(ke===95){L|=512,ee?(ee=!1,xe=!0):Y(xe?U.Multiple_consecutive_numeric_separators_are_not_permitted:U.Numeric_separators_are_not_allowed_here,l,1),l++;continue}if(ee=!0,!Eo(ke)||ke-48>=z)break;X+=h[l],l++,xe=!1}return h.charCodeAt(l-1)===95&&Y(U.Numeric_separators_are_not_allowed_here,l-1,1),X}function Tn(){return h.charCodeAt(l)===110?(k+="n",L&384&&(k=xm(k)+"n"),l++,10):(k=""+(L&128?parseInt(k.slice(2),2):L&256?parseInt(k.slice(2),8):+k),9)}function Sn(){y=l,L=0;let z=!1;for(;;){if(C=l,l>=v)return S=1;let X=cn(h,l);if(l===0){if(X===65533)return Y(U.File_appears_to_be_binary),l=v,S=8;if(X===35&&xg(h,l)){if(l=wg(h,l),t)continue;return S=6}}switch(X){case 10:case 13:if(L|=1,t){l++;continue}else return X===13&&l+1=0&&un(ee,e))return l+=3,L|=8,k=or()+Gt(),S=Ur();let xe=Nr();return xe>=0&&un(xe,e)?(l+=6,L|=1024,k=String.fromCharCode(xe)+Gt(),S=Ur()):(Y(U.Invalid_character),l++,S=0);case 35:if(l!==0&&h[l+1]==="!")return Y(U.can_only_be_used_at_the_start_of_a_file),l++,S=0;let ke=cn(h,l+1);if(ke===92){l++;let yt=Ge();if(yt>=0&&un(yt,e))return l+=3,L|=8,k="#"+or()+Gt(),S=81;let jt=Nr();if(jt>=0&&un(jt,e))return l+=6,L|=1024,k="#"+String.fromCharCode(jt)+Gt(),S=81;l--}return un(ke,e)?(l++,$t(ke,e)):(k="#",Y(U.Invalid_character,l++,Yn(X))),S=81;default:let Le=$t(X,e);if(Le)return S=Le;if(Io(X)){l+=Yn(X);continue}else if(mr(X)){L|=1,l+=Yn(X);continue}let lt=Yn(X);return Y(U.Invalid_character,l,lt),l+=lt,S=0}}}function sr(){N.assert(S===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),l=C=y,L=0;let z=cn(h,l),X=$t(z,99);return X?S=X:(l+=Yn(z),S)}function $t(z,X){let ee=z;if(un(ee,X)){for(l+=Yn(ee);l=v)return S=1;let X=h.charCodeAt(l);if(X===60)return h.charCodeAt(l+1)===47?(l+=2,S=31):(l++,S=30);if(X===123)return l++,S=19;let ee=0;for(;l0)break;Vi(X)||(ee=l)}l++}return k=h.substring(y,l),ee===-1?13:12}function Mr(){if(kt(S)){for(;l=v)return S=1;for(let X=h.charCodeAt(l);l=0&&Io(h.charCodeAt(l-1))&&!(l+1=v)return S=1;let z=cn(h,l);switch(l+=Yn(z),z){case 9:case 11:case 12:case 32:for(;l=0&&un(X,e))return l+=3,L|=8,k=or()+Gt(),S=Ur();let ee=Nr();return ee>=0&&un(ee,e)?(l+=6,L|=1024,k=String.fromCharCode(ee)+Gt(),S=Ur()):(l++,S=0)}if(un(z,e)){let X=z;for(;l=0),l=z,y=z,C=z,S=0,k=void 0,L=0}function nt(z){K+=z?1:-1}}function Yn(e){return e>=65536?2:1}function VE(e){if(N.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);let t=Math.floor((e-65536)/1024)+55296,r=(e-65536)%1024+56320;return String.fromCharCode(t,r)}function Of(e){return b4(e)}var cl,c4,h0,l4,u4,p4,f4,d4,m4,h4,y4,g4,ll,Xd,cn,b4,HE=Vt({"src/compiler/scanner.ts"(){"use strict";Dr(),cl={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},c4=new Map(Object.entries(cl)),h0=new Map(Object.entries({...cl,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),l4=[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],u4=[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],p4=[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],f4=[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],d4=[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],m4=[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],h4=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,y4=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,g4=FE(h0),ll=7,Xd=/^#!.*/,cn=String.prototype.codePointAt?(e,t)=>e.codePointAt(t):function(t,r){let a=t.length;if(r<0||r>=a)return;let _=t.charCodeAt(r);if(_>=55296&&_<=56319&&a>r+1){let p=t.charCodeAt(r+1);if(p>=56320&&p<=57343)return(_-55296)*1024+p-56320+65536}return _},b4=String.fromCodePoint?e=>String.fromCodePoint(e):VE}});function GE(e){return rs(e)||v_(e)}function XE(e){return xv(e,F2)}function v4(e){switch(Ql(e)){case 99:return"lib.esnext.full.d.ts";case 9:return"lib.es2022.full.d.ts";case 8:return"lib.es2021.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"}}function Kt(e){return e.start+e.length}function T4(e){return e.length===0}function $E(e,t){return t>=e.start&&t=e.pos&&t<=e.end}function YE(e,t){return t.start>=e.start&&Kt(t)<=Kt(e)}function KE(e,t){return S4(e,t)!==void 0}function S4(e,t){let r=x4(e,t);return r&&r.length===0?void 0:r}function ZE(e,t){return Eg(e.start,e.length,t.start,t.length)}function eA(e,t,r){return Eg(e.start,e.length,t,r)}function Eg(e,t,r,a){let _=e+t,p=r+a;return r<=_&&p>=e}function tA(e,t){return t<=Kt(e)&&t>=e.start}function x4(e,t){let r=Math.max(e.start,t.start),a=Math.min(Kt(e),Kt(t));return r<=a?Hi(r,a):void 0}function w_(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function Hi(e,t){return w_(e,t-e)}function Qs(e){return w_(e.span.start,e.newLength)}function w4(e){return T4(e.span)&&e.newLength===0}function $d(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}function rA(e){if(e.length===0)return Vg;if(e.length===1)return e[0];let t=e[0],r=t.span.start,a=Kt(t.span),_=r+t.newLength;for(let p=1;p=2&&e.charCodeAt(0)===95&&e.charCodeAt(1)===95?"_"+e:e}function Vo(e){let t=e;return t.length>=3&&t.charCodeAt(0)===95&&t.charCodeAt(1)===95&&t.charCodeAt(2)===95?t.substr(1):t}function Ot(e){return Vo(e.escapedText)}function D4(e){let t=Rl(e.escapedText);return t?On(t,Si):void 0}function hd(e){return e.valueDeclaration&&i3(e.valueDeclaration)?Ot(e.valueDeclaration.name):Vo(e.escapedName)}function P4(e){let t=e.parent.parent;if(t){if(Ho(t))return Af(t);switch(t.kind){case 243:if(t.declarationList&&t.declarationList.declarations[0])return Af(t.declarationList.declarations[0]);break;case 244:let r=t.expression;switch(r.kind===226&&r.operatorToken.kind===64&&(r=r.left),r.kind){case 211:return r.name;case 212:let a=r.argumentExpression;if(Ee(a))return a}break;case 217:return Af(t.expression);case 256:{if(Ho(t.statement)||om(t.statement))return Af(t.statement);break}}}}function Af(e){let t=Bl(e);return t&&Ee(t)?t:void 0}function I4(e,t){return!!(Yd(e)&&Ee(e.name)&&Ot(e.name)===Ot(t)||as(e)&&mt(e.declarationList.declarations,r=>I4(r,t)))}function N4(e){return e.name||P4(e)}function Yd(e){return!!e.name}function Kd(e){switch(e.kind){case 80:return e;case 355:case 348:{let{name:r}=e;if(r.kind===166)return r.right;break}case 213:case 226:{let r=e;switch(Ja(r)){case 1:case 4:case 5:case 3:return dm(r.left);case 7:case 8:case 9:return r.arguments[1];default:return}}case 353:return N4(e);case 347:return P4(e);case 277:{let{expression:r}=e;return Ee(r)?r:void 0}case 212:let t=e;if(f2(t))return t.argumentExpression}return e.name}function Bl(e){if(e!==void 0)return Kd(e)||(km(e)||Dm(e)||Il(e)?O4(e):void 0)}function O4(e){if(e.parent){if(_s(e.parent)||nu(e.parent))return e.parent.name;if(Ct(e.parent)&&e===e.parent.right){if(Ee(e.parent.left))return e.parent.left;if($o(e.parent.left))return dm(e.parent.left)}else if(ki(e.parent)&&Ee(e.parent.name))return e.parent.name}else return}function sA(e){if(El(e))return $r(e.modifiers,L_)}function yd(e){if(gr(e,126975))return $r(e.modifiers,Lg)}function M4(e,t){if(e.name)if(Ee(e.name)){let r=e.name.escapedText;return c_(e.parent,t).filter(a=>h_(a)&&Ee(a.name)&&a.name.escapedText===r)}else{let r=e.parent.parameters.indexOf(e);N.assert(r>-1,"Parameters should always be in their parents' parameter list");let a=c_(e.parent,t).filter(h_);if(rKo(a)&&a.typeParameters.some(_=>_.name.escapedText===r))}function R4(e){return J4(e,!1)}function j4(e){return J4(e,!0)}function _A(e){return!!Zt(e,h_)}function F4(e){return Zt(e,Lm)}function B4(e){return $4(e,w8)}function cA(e){return Zt(e,v8)}function lA(e){return Zt(e,I6)}function U4(e){return Zt(e,I6,!0)}function uA(e){return Zt(e,N6)}function q4(e){return Zt(e,N6,!0)}function pA(e){return Zt(e,O6)}function z4(e){return Zt(e,O6,!0)}function fA(e){return Zt(e,M6)}function W4(e){return Zt(e,M6,!0)}function V4(e){return Zt(e,T8,!0)}function dA(e){return Zt(e,J6)}function H4(e){return Zt(e,J6,!0)}function mA(e){return Zt(e,S8)}function hA(e){return Zt(e,x8)}function G4(e){return Zt(e,R6)}function yA(e){return Zt(e,Ko)}function kg(e){return Zt(e,j6)}function em(e){let t=Zt(e,lu);if(t&&t.typeExpression&&t.typeExpression.type)return t}function tm(e){let t=Zt(e,lu);return!t&&Ma(e)&&(t=Yr(Zd(e),r=>!!r.typeExpression)),t&&t.typeExpression&&t.typeExpression.type}function X4(e){let t=G4(e);if(t&&t.typeExpression)return t.typeExpression.type;let r=em(e);if(r&&r.typeExpression){let a=r.typeExpression.type;if(Am(a)){let _=Yr(a.members,c6);return _&&_.type}if(tu(a)||Mm(a))return a.type}}function c_(e,t){var r;if(!mm(e))return $e;let a=(r=e.jsDoc)==null?void 0:r.jsDocCache;if(a===void 0||t){let _=yT(e,t);N.assert(_.length<2||_[0]!==_[1]),a=Bo(_,p=>cs(p)?p.tags:p),t||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=a)}return a}function Ul(e){return c_(e,!1)}function gA(e){return c_(e,!0)}function Zt(e,t,r){return Yr(c_(e,r),t)}function $4(e,t){return Ul(e).filter(t)}function bA(e,t){return Ul(e).filter(r=>r.kind===t)}function vA(e){return typeof e=="string"?e:e==null?void 0:e.map(t=>t.kind===328?t.text:TA(t)).join("")}function TA(e){let t=e.kind===331?"link":e.kind===332?"linkcode":"linkplain",r=e.name?vi(e.name):"",a=e.name&&e.text.startsWith("://")?"":" ";return`{@${t} ${r}${a}${e.text}}`}function SA(e){if(cu(e)){if(L6(e.parent)){let t=g2(e.parent);if(t&&Ka(t.tags))return Bo(t.tags,r=>Ko(r)?r.typeParameters:void 0)}return $e}if(Hl(e))return N.assert(e.parent.kind===327),Bo(e.parent.tags,t=>Ko(t)?t.typeParameters:void 0);if(e.typeParameters||j8(e)&&e.typeParameters)return e.typeParameters;if(Wt(e)){let t=ZT(e);if(t.length)return t;let r=tm(e);if(r&&tu(r)&&r.typeParameters)return r.typeParameters}return $e}function xA(e){return e.constraint?e.constraint:Ko(e.parent)&&e===e.parent.typeParameters[0]?e.parent.constraint:void 0}function ro(e){return e.kind===80||e.kind===81}function wA(e){return e.kind===178||e.kind===177}function Q4(e){return Br(e)&&!!(e.flags&64)}function Y4(e){return Ra(e)&&!!(e.flags&64)}function y0(e){return j_(e)&&!!(e.flags&64)}function Dg(e){let t=e.kind;return!!(e.flags&64)&&(t===211||t===212||t===213||t===235)}function Pg(e){return Dg(e)&&!jo(e)&&!!e.questionDotToken}function CA(e){return Pg(e.parent)&&e.parent.expression===e}function EA(e){return!Dg(e.parent)||Pg(e.parent)||e!==e.parent.expression}function AA(e){return e.kind===226&&e.operatorToken.kind===61}function K4(e){return R_(e)&&Ee(e.typeName)&&e.typeName.escapedText==="const"&&!e.typeArguments}function rm(e){return ls(e,8)}function Z4(e){return jo(e)&&!!(e.flags&64)}function kA(e){return e.kind===252||e.kind===251}function DA(e){return e.kind===280||e.kind===279}function e3(e){switch(e.kind){case 309:case 310:return!0;default:return!1}}function PA(e){return e3(e)||e.kind===307||e.kind===311}function Ig(e){return e.kind===355||e.kind===348}function IA(e){return ql(e.kind)}function ql(e){return e>=166}function t3(e){return e>=0&&e<=165}function NA(e){return t3(e.kind)}function va(e){return Qr(e,"pos")&&Qr(e,"end")}function Ng(e){return 9<=e&&e<=15}function Og(e){return Ng(e.kind)}function OA(e){switch(e.kind){case 210:case 209:case 14:case 218:case 231:return!0}return!1}function Sl(e){return 15<=e&&e<=18}function MA(e){return Sl(e.kind)}function LA(e){let t=e.kind;return t===17||t===18}function JA(e){return p8(e)||d8(e)}function r3(e){switch(e.kind){case 276:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 274:return e.parent.isTypeOnly;case 273:case 271:return e.isTypeOnly}return!1}function n3(e){switch(e.kind){case 281:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 278:return e.isTypeOnly&&!!e.moduleSpecifier&&!e.exportClause;case 280:return e.parent.isTypeOnly}return!1}function RA(e){return r3(e)||n3(e)}function jA(e){return mn(e)||Ee(e)}function FA(e){return e.kind===11||Sl(e.kind)}function wa(e){var t;return Ee(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function Mg(e){var t;return jr(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function BA(e){let t=e.emitNode.autoGenerate.flags;return!!(t&32)&&!!(t&16)&&!!(t&8)}function i3(e){return(oo(e)||Rg(e))&&jr(e.name)}function UA(e){return Br(e)&&jr(e.name)}function bi(e){switch(e){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function a3(e){return!!(J2(e)&16476)}function o3(e){return a3(e)||e===126||e===164||e===129}function Lg(e){return bi(e.kind)}function qA(e){let t=e.kind;return t===166||t===80}function zl(e){let t=e.kind;return t===80||t===81||t===11||t===9||t===167}function zA(e){let t=e.kind;return t===80||t===206||t===207}function Gi(e){return!!e&&Jg(e.kind)}function nm(e){return!!e&&(Jg(e.kind)||eu(e))}function s3(e){return e&&_3(e.kind)}function WA(e){return e.kind===112||e.kind===97}function _3(e){switch(e){case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function Jg(e){switch(e){case 173:case 179:case 330:case 180:case 181:case 184:case 324:case 185:return!0;default:return _3(e)}}function VA(e){return ii(e)||u8(e)||au(e)&&Gi(e.parent)}function no(e){let t=e.kind;return t===176||t===172||t===174||t===177||t===178||t===181||t===175||t===240}function dn(e){return e&&(e.kind===263||e.kind===231)}function im(e){return e&&(e.kind===177||e.kind===178)}function c3(e){return oo(e)&&aS(e)}function Rg(e){switch(e.kind){case 174:case 177:case 178:return!0;default:return!1}}function HA(e){switch(e.kind){case 174:case 177:case 178:case 172:return!0;default:return!1}}function Mf(e){return Lg(e)||L_(e)}function jg(e){let t=e.kind;return t===180||t===179||t===171||t===173||t===181||t===177||t===178}function GA(e){return jg(e)||no(e)}function Fg(e){let t=e.kind;return t===303||t===304||t===305||t===174||t===177||t===178}function g0(e){return DS(e.kind)}function XA(e){switch(e.kind){case 184:case 185:return!0}return!1}function am(e){if(e){let t=e.kind;return t===207||t===206}return!1}function l3(e){let t=e.kind;return t===209||t===210}function $A(e){let t=e.kind;return t===208||t===232}function Bg(e){switch(e.kind){case 260:case 169:case 208:return!0}return!1}function QA(e){return ki(e)||Ma(e)||p3(e)||d3(e)}function YA(e){return u3(e)||f3(e)}function u3(e){switch(e.kind){case 206:case 210:return!0}return!1}function p3(e){switch(e.kind){case 208:case 303:case 304:case 305:return!0}return!1}function f3(e){switch(e.kind){case 207:case 209:return!0}return!1}function d3(e){switch(e.kind){case 208:case 232:case 230:case 209:case 210:case 80:case 211:case 212:return!0}return Na(e,!0)}function KA(e){let t=e.kind;return t===211||t===166||t===205}function ZA(e){let t=e.kind;return t===211||t===166}function ek(e){switch(e.kind){case 286:case 285:case 213:case 214:case 215:case 170:return!0;default:return!1}}function tk(e){return e.kind===213||e.kind===214}function rk(e){let t=e.kind;return t===228||t===15}function Lo(e){return m3(rm(e).kind)}function m3(e){switch(e){case 211:case 212:case 214:case 213:case 284:case 285:case 288:case 215:case 209:case 217:case 210:case 231:case 218:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 228:case 97:case 106:case 110:case 112:case 108:case 235:case 233:case 236:case 102:case 282:return!0;default:return!1}}function h3(e){return y3(rm(e).kind)}function y3(e){switch(e){case 224:case 225:case 220:case 221:case 222:case 223:case 216:return!0;default:return m3(e)}}function nk(e){switch(e.kind){case 225:return!0;case 224:return e.operator===46||e.operator===47;default:return!1}}function ik(e){switch(e.kind){case 106:case 112:case 97:case 224:return!0;default:return Og(e)}}function om(e){return ak(rm(e).kind)}function ak(e){switch(e){case 227:case 229:case 219:case 226:case 230:case 234:case 232:case 361:case 360:case 238:return!0;default:return y3(e)}}function ok(e){let t=e.kind;return t===216||t===234}function sk(e){return A6(e)||_8(e)}function g3(e,t){switch(e.kind){case 248:case 249:case 250:case 246:case 247:return!0;case 256:return t&&g3(e.statement,t)}return!1}function b3(e){return ss(e)||B_(e)}function _k(e){return mt(e,b3)}function ck(e){return!um(e)&&!ss(e)&&!gr(e,1)&&!cm(e)}function lk(e){return um(e)||ss(e)||gr(e,1)}function uk(e){return e.kind===249||e.kind===250}function pk(e){return au(e)||om(e)}function fk(e){return au(e)}function dk(e){return v6(e)||om(e)}function mk(e){let t=e.kind;return t===268||t===267||t===80}function hk(e){let t=e.kind;return t===268||t===267}function yk(e){let t=e.kind;return t===80||t===267}function gk(e){let t=e.kind;return t===275||t===274}function bk(e){return e.kind===267||e.kind===266}function vk(e){switch(e.kind){case 219:case 226:case 208:case 213:case 179:case 263:case 231:case 175:case 176:case 185:case 180:case 212:case 266:case 306:case 277:case 278:case 281:case 262:case 218:case 184:case 177:case 80:case 273:case 271:case 276:case 181:case 264:case 345:case 347:case 324:case 348:case 355:case 330:case 353:case 329:case 291:case 292:case 293:case 200:case 174:case 173:case 267:case 202:case 280:case 270:case 274:case 214:case 15:case 9:case 210:case 169:case 211:case 303:case 172:case 171:case 178:case 304:case 312:case 305:case 11:case 265:case 187:case 168:case 260:return!0;default:return!1}}function Tk(e){switch(e.kind){case 219:case 241:case 179:case 269:case 299:case 175:case 194:case 176:case 185:case 180:case 248:case 249:case 250:case 262:case 218:case 184:case 177:case 181:case 345:case 347:case 324:case 330:case 353:case 200:case 174:case 173:case 267:case 178:case 312:case 265:return!0;default:return!1}}function Sk(e){return e===219||e===208||e===263||e===231||e===175||e===176||e===266||e===306||e===281||e===262||e===218||e===177||e===273||e===271||e===276||e===264||e===291||e===174||e===173||e===267||e===270||e===274||e===280||e===169||e===303||e===172||e===171||e===178||e===304||e===265||e===168||e===260||e===353||e===345||e===355}function Ug(e){return e===262||e===282||e===263||e===264||e===265||e===266||e===267||e===272||e===271||e===278||e===277||e===270}function qg(e){return e===252||e===251||e===259||e===246||e===244||e===242||e===249||e===250||e===248||e===245||e===256||e===253||e===255||e===257||e===258||e===243||e===247||e===254||e===359}function Ho(e){return e.kind===168?e.parent&&e.parent.kind!==352||Wt(e):Sk(e.kind)}function xk(e){return Ug(e.kind)}function wk(e){return qg(e.kind)}function v3(e){let t=e.kind;return qg(t)||Ug(t)||Ck(e)}function Ck(e){return e.kind!==241||e.parent!==void 0&&(e.parent.kind===258||e.parent.kind===299)?!1:!X3(e)}function T3(e){let t=e.kind;return qg(t)||Ug(t)||t===241}function Ek(e){let t=e.kind;return t===283||t===166||t===80}function Ak(e){let t=e.kind;return t===110||t===80||t===211||t===295}function S3(e){let t=e.kind;return t===284||t===294||t===285||t===12||t===288}function kk(e){let t=e.kind;return t===291||t===293}function Dk(e){let t=e.kind;return t===11||t===294}function x3(e){let t=e.kind;return t===286||t===285}function Pk(e){let t=e.kind;return t===296||t===297}function zg(e){return e.kind>=316&&e.kind<=357}function w3(e){return e.kind===327||e.kind===326||e.kind===328||ul(e)||Wg(e)||P6(e)||cu(e)}function Wg(e){return e.kind>=334&&e.kind<=357}function Zc(e){return e.kind===178}function el(e){return e.kind===177}function Wi(e){if(!mm(e))return!1;let{jsDoc:t}=e;return!!t&&t.length>0}function Ik(e){return!!e.type}function C3(e){return!!e.initializer}function Nk(e){switch(e.kind){case 260:case 169:case 208:case 172:case 303:case 306:return!0;default:return!1}}function b0(e){return e.kind===291||e.kind===293||Fg(e)}function Ok(e){return e.kind===183||e.kind===233}function Mk(e){let t=v0;for(let r of e){if(!r.length)continue;let a=0;for(;ar.kind===t)}function Fk(e){let t=new Map;if(e)for(let r of e)t.set(r.escapedName,r);return t}function T0(e){return(e.flags&33554432)!==0}function Bk(){var e="";let t=r=>e+=r;return{getText:()=>e,write:t,rawWrite:t,writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeLiteral:t,writeParameter:t,writeProperty:t,writeSymbol:(r,a)=>t(r),writeTrailingSemicolon:t,writeComment:t,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&Vi(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:Rn,decreaseIndent:Rn,clear:()=>e=""}}function Uk(e,t){return e.configFilePath!==t.configFilePath||A3(e,t)}function A3(e,t){return E_(e,t,moduleResolutionOptionDeclarations)}function qk(e,t){return E_(e,t,optionsAffectingProgramStructure)}function E_(e,t,r){return e!==t&&r.some(a=>!$2(j0(e,a),j0(t,a)))}function zk(e,t){for(;;){let r=t(e);if(r==="quit")return;if(r!==void 0)return r;if(ii(e))return;e=e.parent}}function Wk(e,t){let r=e.entries();for(let[a,_]of r){let p=t(_,a);if(p)return p}}function Vk(e,t){let r=e.keys();for(let a of r){let _=t(a);if(_)return _}}function Hk(e,t){e.forEach((r,a)=>{t.set(a,r)})}function Gk(e){let t=Zs.getText();try{return e(Zs),Zs.getText()}finally{Zs.clear(),Zs.writeKeyword(t)}}function sm(e){return e.end-e.pos}function Xk(e,t,r){var a,_;return(_=(a=e==null?void 0:e.resolvedModules)==null?void 0:a.get(t,r))==null?void 0:_.resolvedModule}function $k(e,t,r,a){e.resolvedModules||(e.resolvedModules=createModeAwareCache()),e.resolvedModules.set(t,a,r)}function Qk(e,t,r,a){e.resolvedTypeReferenceDirectiveNames||(e.resolvedTypeReferenceDirectiveNames=createModeAwareCache()),e.resolvedTypeReferenceDirectiveNames.set(t,a,r)}function Yk(e,t,r){var a,_;return(_=(a=e==null?void 0:e.resolvedTypeReferenceDirectiveNames)==null?void 0:a.get(t,r))==null?void 0:_.resolvedTypeReferenceDirective}function Kk(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular}function Zk(e,t){return e===t||e.resolvedModule===t.resolvedModule||!!e.resolvedModule&&!!t.resolvedModule&&e.resolvedModule.isExternalLibraryImport===t.resolvedModule.isExternalLibraryImport&&e.resolvedModule.extension===t.resolvedModule.extension&&e.resolvedModule.resolvedFileName===t.resolvedModule.resolvedFileName&&e.resolvedModule.originalPath===t.resolvedModule.originalPath&&tD(e.resolvedModule.packageId,t.resolvedModule.packageId)&&e.node10Result===t.node10Result}function eD(e,t,r,a,_){var p,d;let h=(d=(p=e.resolvedModules)==null?void 0:p.get(r,a))==null?void 0:d.node10Result,l=h?tl(void 0,U.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,h,h.indexOf(nodeModulesPathPart+"@types/")>-1?`@types/${mangleScopedPackageName(_)}`:_):t.typesPackageExists(_)?tl(void 0,U.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,_,mangleScopedPackageName(_)):t.packageBundlesTypes(_)?tl(void 0,U.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,_,r):tl(void 0,U.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,r,mangleScopedPackageName(_));return l&&(l.repopulateInfo=()=>({moduleReference:r,mode:a,packageName:_===r?void 0:_})),l}function tD(e,t){return e===t||!!e&&!!t&&e.name===t.name&&e.subModuleName===t.subModuleName&&e.version===t.version}function k3({name:e,subModuleName:t}){return t?`${e}/${t}`:e}function rD(e){return`${k3(e)}@${e.version}`}function nD(e,t){return e===t||e.resolvedTypeReferenceDirective===t.resolvedTypeReferenceDirective||!!e.resolvedTypeReferenceDirective&&!!t.resolvedTypeReferenceDirective&&e.resolvedTypeReferenceDirective.resolvedFileName===t.resolvedTypeReferenceDirective.resolvedFileName&&!!e.resolvedTypeReferenceDirective.primary==!!t.resolvedTypeReferenceDirective.primary&&e.resolvedTypeReferenceDirective.originalPath===t.resolvedTypeReferenceDirective.originalPath}function iD(e,t,r,a,_,p){N.assert(e.length===r.length);for(let d=0;d=0),Ia(t)[e]}function lD(e){let t=ri(e),r=to(t,e.pos);return`${t.fileName}(${r.line+1},${r.character+1})`}function D3(e,t){N.assert(e>=0);let r=Ia(t),a=e,_=t.text;if(a+1===r.length)return _.length-1;{let p=r[a],d=r[a+1]-1;for(N.assert(mr(_.charCodeAt(d)));p<=d&&mr(_.charCodeAt(d));)d--;return d}}function P3(e,t,r){return!(r&&r(t))&&!e.identifiers.has(t)}function zi(e){return e===void 0?!0:e.pos===e.end&&e.pos>=0&&e.kind!==1}function wl(e){return!zi(e)}function uD(e,t){return No(e)?t===e.expression:eu(e)?t===e.modifiers:Zl(e)?t===e.initializer:oo(e)?t===e.questionToken&&c3(e):_s(e)?t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Gs(e.modifiers,t,Mf):_u(e)?t===e.equalsToken||t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Gs(e.modifiers,t,Mf):d_(e)?t===e.exclamationToken:J_(e)?t===e.typeParameters||t===e.type||Gs(e.typeParameters,t,No):m_(e)?t===e.typeParameters||Gs(e.typeParameters,t,No):Qo(e)?t===e.typeParameters||t===e.type||Gs(e.typeParameters,t,No):x6(e)?t===e.modifiers||Gs(e.modifiers,t,Mf):!1}function Gs(e,t,r){return!e||zt(t)||!r(t)?!1:es(e,t)}function I3(e,t,r){if(t===void 0||t.length===0)return e;let a=0;for(;a[`${to(e,d.range.end).line}`,d])),a=new Map;return{getUnusedExpectations:_,markUsed:p};function _(){return jd(r.entries()).filter(([d,h])=>h.type===0&&!a.get(d)).map(([d,h])=>h)}function p(d){return r.has(`${d}`)?(a.set(`${d}`,!0),!0):!1}}function Go(e,t,r){return zi(e)?e.pos:zg(e)||e.kind===12?Nt((t||ri(e)).text,e.pos,!1,!0):r&&Wi(e)?Go(e.jsDoc[0],t):e.kind===358&&e._children.length>0?Go(e._children[0],t,r):Nt((t||ri(e)).text,e.pos,!1,!1,rT(e))}function gD(e,t){let r=!zi(e)&&q_(e)?ig(e.modifiers,L_):void 0;return r?Nt((t||ri(e)).text,r.end):Go(e,t)}function Xo(e,t,r=!1){return t_(e.text,t,r)}function bD(e){return!!Kr(e,g8)}function L3(e){return!!(B_(e)&&e.exportClause&&Nm(e.exportClause)&&e.exportClause.name.escapedText==="default")}function t_(e,t,r=!1){if(zi(t))return"";let a=e.substring(r?t.pos:Nt(e,t.pos),t.end);return bD(t)&&(a=a.split(/\r\n|\n|\r/).map(_=>gl(_.replace(/^\s*\*/,""))).join(` -`)),a}function _m(e,t=!1){return Xo(ri(e),e,t)}function vD(e){return e.pos}function TD(e,t){return Ml(e,t,vD,kr)}function ti(e){let t=e.emitNode;return t&&t.flags||0}function SD(e){let t=e.emitNode;return t&&t.internalFlags||0}function xD(e,t,r){if(t&&wD(e,r))return Xo(t,e);switch(e.kind){case 11:{let a=r&2?qT:r&1||ti(e)&16777216?Td:Sd;return e.singleQuote?"'"+a(e.text,39)+"'":'"'+a(e.text,34)+'"'}case 15:case 16:case 17:case 18:{let a=r&1||ti(e)&16777216?Td:Sd,_=e.rawText??iN(a(e.text,96));switch(e.kind){case 15:return"`"+_+"`";case 16:return"`"+_+"${";case 17:return"}"+_+"${";case 18:return"}"+_+"`"}break}case 9:case 10:return e.text;case 14:return r&4&&e.isUnterminated?e.text+(e.text.charCodeAt(e.text.length-1)===92?" /":"/"):e.text}return N.fail(`Literal kind '${e.kind}' not accounted for.`)}function wD(e,t){if(Ta(e)||!e.parent||t&4&&e.isUnterminated)return!1;if(lo(e)){if(e.numericLiteralFlags&26656)return!1;if(e.numericLiteralFlags&512)return!!(t&8)}return!o6(e)}function CD(e){return b_(e)?'"'+Sd(e)+'"':""+e}function ED(e){return T_(e).replace(/^(\d)/,"_$1").replace(/\W/g,"_")}function AD(e){return(C_(e)&7)!==0||J3(e)}function J3(e){let t=ym(e);return t.kind===260&&t.parent.kind===299}function cm(e){return Yi(e)&&(e.name.kind===11||lm(e))}function kD(e){return Yi(e)&&e.name.kind===11}function DD(e){return Yi(e)&&mn(e.name)}function R3(e){return Yi(e)||Ee(e)}function PD(e){return ID(e.valueDeclaration)}function ID(e){return!!e&&e.kind===267&&!e.body}function ND(e){return e.kind===312||e.kind===267||nm(e)}function lm(e){return!!(e.flags&2048)}function Gg(e){return cm(e)&&j3(e)}function j3(e){switch(e.parent.kind){case 312:return Zo(e.parent);case 268:return cm(e.parent.parent)&&ii(e.parent.parent.parent)&&!Zo(e.parent.parent.parent)}return!1}function F3(e){var t;return(t=e.declarations)==null?void 0:t.find(r=>!Gg(r)&&!(Yi(r)&&lm(r)))}function OD(e){return e===1||e===100||e===199}function Xg(e,t){return Zo(e)||OD(ni(t))&&!!e.commonJsModuleIndicator}function MD(e,t){switch(e.scriptKind){case 1:case 3:case 2:case 4:break;default:return!1}return e.isDeclarationFile?!1:W2(t,"alwaysStrict")||P8(e.statements)?!0:Zo(e)||B2(t)?ni(t)>=5?!0:!t.noImplicitUseStrict:!1}function LD(e){return!!(e.flags&33554432)||gr(e,2)}function B3(e,t){switch(e.kind){case 312:case 269:case 299:case 267:case 248:case 249:case 250:case 176:case 174:case 177:case 178:case 262:case 218:case 219:case 172:case 175:return!0;case 241:return!nm(t)}return!1}function JD(e){switch(N.type(e),e.kind){case 345:case 353:case 330:return!0;default:return U3(e)}}function U3(e){switch(N.type(e),e.kind){case 179:case 180:case 173:case 181:case 184:case 185:case 324:case 263:case 231:case 264:case 265:case 352:case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function $g(e){switch(e.kind){case 272:case 271:return!0;default:return!1}}function RD(e){return $g(e)||fm(e)}function jD(e){switch(e.kind){case 272:case 271:case 243:case 263:case 262:case 267:case 265:case 264:case 266:return!0;default:return!1}}function FD(e){return um(e)||Yi(e)||ru(e)||t2(e)}function um(e){return $g(e)||B_(e)}function BD(e){return Kr(e.parent,t=>!!(getContainerFlags(t)&1))}function S0(e){return Kr(e.parent,t=>B3(t,t.parent))}function UD(e,t){let r=S0(e);for(;r;)t(r),r=S0(r)}function q3(e){return!e||sm(e)===0?"(Missing)":_m(e)}function qD(e){return e.declaration?q3(e.declaration.parameters[0].name):void 0}function zD(e){return e.kind===167&&!Qi(e.expression)}function Qg(e){var t;switch(e.kind){case 80:case 81:return(t=e.emitNode)!=null&&t.autoGenerate?void 0:e.escapedText;case 11:case 9:case 15:return Mn(e.text);case 167:return Qi(e.expression)?Mn(e.expression.text):void 0;case 295:return Yl(e);default:return N.assertNever(e)}}function WD(e){return N.checkDefined(Qg(e))}function vi(e){switch(e.kind){case 110:return"this";case 81:case 80:return sm(e)===0?Ot(e):_m(e);case 166:return vi(e.left)+"."+vi(e.right);case 211:return Ee(e.name)||jr(e.name)?vi(e.expression)+"."+vi(e.name):N.assertNever(e.name);case 318:return vi(e.left)+vi(e.right);case 295:return vi(e.namespace)+":"+vi(e.name);default:return N.assertNever(e)}}function VD(e,t,...r){let a=ri(e);return z3(a,e,t,...r)}function HD(e,t,r,...a){let _=Nt(e.text,t.pos);return j2(e,_,t.end-_,r,...a)}function z3(e,t,r,...a){let _=Zg(e,t);return j2(e,_.start,_.length,r,...a)}function GD(e,t,r,a){let _=Zg(e,t);return Kg(e,_.start,_.length,r,a)}function XD(e,t,r,a){let _=Nt(e.text,t.pos);return Kg(e,_,t.end-_,r,a)}function Yg(e,t,r){N.assertGreaterThanOrEqual(t,0),N.assertGreaterThanOrEqual(r,0),e&&(N.assertLessThanOrEqual(t,e.text.length),N.assertLessThanOrEqual(t+r,e.text.length))}function Kg(e,t,r,a,_){return Yg(e,t,r),{file:e,start:t,length:r,code:a.code,category:a.category,messageText:a.next?a:a.messageText,relatedInformation:_}}function $D(e,t,r){return{file:e,start:0,length:0,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:r}}function QD(e){return typeof e.messageText=="string"?{code:e.code,category:e.category,messageText:e.messageText,next:e.next}:e.messageText}function YD(e,t,r){return{file:e,start:t.pos,length:t.end-t.pos,code:r.code,category:r.category,messageText:r.message}}function Ys(e,t){let r=ns(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);r.scan();let a=r.getTokenStart();return Hi(a,r.getTokenEnd())}function KD(e,t){let r=ns(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);return r.scan(),r.getToken()}function ZD(e,t){let r=Nt(e.text,t.pos);if(t.body&&t.body.kind===241){let{line:a}=to(e,t.body.pos),{line:_}=to(e,t.body.end);if(a<_)return w_(r,D3(a,e)-r+1)}return Hi(r,t.end)}function Zg(e,t){let r=t;switch(t.kind){case 312:{let p=Nt(e.text,0,!1);return p===e.text.length?w_(0,0):Ys(e,p)}case 260:case 208:case 263:case 231:case 264:case 267:case 266:case 306:case 262:case 218:case 174:case 177:case 178:case 265:case 172:case 171:case 274:r=t.name;break;case 219:return ZD(e,t);case 296:case 297:{let p=Nt(e.text,t.pos),d=t.statements.length>0?t.statements[0].pos:t.end;return Hi(p,d)}case 253:case 229:{let p=Nt(e.text,t.pos);return Ys(e,p)}case 238:{let p=Nt(e.text,t.expression.end);return Ys(e,p)}case 357:{let p=Nt(e.text,t.tagName.pos);return Ys(e,p)}}if(r===void 0)return Ys(e,t.pos);N.assert(!cs(r));let a=zi(r),_=a||Dd(t)?r.pos:Nt(e.text,r.pos);return a?(N.assert(_===r.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),N.assert(_===r.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(N.assert(_>=r.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),N.assert(_<=r.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),Hi(_,r.end)}function eP(e){return(e.externalModuleIndicator||e.commonJsModuleIndicator)!==void 0}function e2(e){return e.scriptKind===6}function tP(e){return!!(Qd(e)&2048)}function rP(e){return!!(Qd(e)&64&&!C4(e,e.parent))}function nP(e){return(C_(e)&7)===6}function iP(e){return(C_(e)&7)===4}function W3(e){return(C_(e)&7)===2}function aP(e){return(C_(e)&7)===1}function oP(e){return e.kind===213&&e.expression.kind===108}function t2(e){return e.kind===213&&e.expression.kind===102}function x0(e){return b6(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}function V3(e){return ru(e)&&m6(e.argument)&&mn(e.argument.literal)}function Ea(e){return e.kind===244&&e.expression.kind===11}function pm(e){return!!(ti(e)&2097152)}function w0(e){return pm(e)&&os(e)}function sP(e){return Ee(e.name)&&!e.initializer}function C0(e){return pm(e)&&as(e)&&so(e.declarationList.declarations,sP)}function _P(e,t){return e.kind!==12?Wo(t.text,e.pos):void 0}function H3(e,t){let r=e.kind===169||e.kind===168||e.kind===218||e.kind===219||e.kind===217||e.kind===260||e.kind===281?y_(s4(t,e.pos),Wo(t,e.pos)):Wo(t,e.pos);return $r(r,a=>t.charCodeAt(a.pos+1)===42&&t.charCodeAt(a.pos+2)===42&&t.charCodeAt(a.pos+3)!==47)}function r2(e){if(182<=e.kind&&e.kind<=205)return!0;switch(e.kind){case 133:case 159:case 150:case 163:case 154:case 136:case 155:case 151:case 157:case 106:case 146:return!0;case 116:return e.parent.kind!==222;case 233:return Nl(e.parent)&&!M0(e);case 168:return e.parent.kind===200||e.parent.kind===195;case 80:(e.parent.kind===166&&e.parent.right===e||e.parent.kind===211&&e.parent.name===e)&&(e=e.parent),N.assert(e.kind===80||e.kind===166||e.kind===211,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 166:case 211:case 110:{let{parent:t}=e;if(t.kind===186)return!1;if(t.kind===205)return!t.isTypeOf;if(182<=t.kind&&t.kind<=205)return!0;switch(t.kind){case 233:return Nl(t.parent)&&!M0(t);case 168:return e===t.constraint;case 352:return e===t.constraint;case 172:case 171:case 169:case 260:return e===t.type;case 262:case 218:case 219:case 176:case 174:case 173:case 177:case 178:return e===t.type;case 179:case 180:case 181:return e===t.type;case 216:return e===t.type;case 213:case 214:case 215:return es(t.typeArguments,e)}}}return!1}function cP(e,t){for(;e;){if(e.kind===t)return!0;e=e.parent}return!1}function lP(e,t){return r(e);function r(a){switch(a.kind){case 253:return t(a);case 269:case 241:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 296:case 297:case 256:case 258:case 299:return Bt(a,r)}}}function uP(e,t){return r(e);function r(a){switch(a.kind){case 229:t(a);let _=a.expression;_&&r(_);return;case 266:case 264:case 267:case 265:return;default:if(Gi(a)){if(a.name&&a.name.kind===167){r(a.name.expression);return}}else r2(a)||Bt(a,r)}}}function pP(e){return e&&e.kind===188?e.elementType:e&&e.kind===183?Jd(e.typeArguments):void 0}function fP(e){switch(e.kind){case 264:case 263:case 231:case 187:return e.members;case 210:return e.properties}}function n2(e){if(e)switch(e.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function dP(e){return n2(e)||im(e)}function G3(e){return e.parent.kind===261&&e.parent.parent.kind===243}function mP(e){return Wt(e)?uo(e.parent)&&Ct(e.parent.parent)&&Ja(e.parent.parent)===2||i2(e.parent):!1}function i2(e){return Wt(e)?Ct(e)&&Ja(e)===1:!1}function hP(e){return(ki(e)?W3(e)&&Ee(e.name)&&G3(e):oo(e)?O0(e)&&bm(e):Zl(e)&&O0(e))||i2(e)}function yP(e){switch(e.kind){case 174:case 173:case 176:case 177:case 178:case 262:case 218:return!0}return!1}function gP(e,t){for(;;){if(t&&t(e),e.statement.kind!==256)return e.statement;e=e.statement}}function X3(e){return e&&e.kind===241&&Gi(e.parent)}function bP(e){return e&&e.kind===174&&e.parent.kind===210}function vP(e){return(e.kind===174||e.kind===177||e.kind===178)&&(e.parent.kind===210||e.parent.kind===231)}function TP(e){return e&&e.kind===1}function SP(e){return e&&e.kind===0}function a2(e,t,r,a){return yr(e==null?void 0:e.properties,_=>{if(!_s(_))return;let p=Qg(_.name);return t===p||a&&a===p?r(_):void 0})}function xP(e,t,r){return a2(e,t,a=>iu(a.initializer)?Yr(a.initializer.elements,_=>mn(_)&&_.text===r):void 0)}function $3(e){if(e&&e.statements.length){let t=e.statements[0].expression;return On(t,uo)}}function wP(e,t,r){return Q3(e,t,a=>iu(a.initializer)?Yr(a.initializer.elements,_=>mn(_)&&_.text===r):void 0)}function Q3(e,t,r){return a2($3(e),t,r)}function CP(e){return Kr(e.parent,Gi)}function EP(e){return Kr(e.parent,s3)}function E0(e){return Kr(e.parent,dn)}function AP(e){return Kr(e.parent,t=>dn(t)||Gi(t)?"quit":eu(t))}function kP(e){return Kr(e.parent,nm)}function DP(e){let t=Kr(e.parent,r=>dn(r)?"quit":L_(r));return t&&dn(t.parent)?E0(t.parent):E0(t??e)}function o2(e,t,r){for(N.assert(e.kind!==312);;){if(e=e.parent,!e)return N.fail();switch(e.kind){case 167:if(r&&dn(e.parent.parent))return e;e=e.parent.parent;break;case 170:e.parent.kind===169&&no(e.parent.parent)?e=e.parent.parent:no(e.parent)&&(e=e.parent);break;case 219:if(!t)continue;case 262:case 218:case 267:case 175:case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 179:case 180:case 181:case 266:case 312:return e}}}function PP(e){switch(e.kind){case 219:case 262:case 218:case 172:return!0;case 241:switch(e.parent.kind){case 176:case 174:case 177:case 178:return!0;default:return!1}default:return!1}}function IP(e){Ee(e)&&(Yo(e.parent)||os(e.parent))&&e.parent.name===e&&(e=e.parent);let t=o2(e,!0,!1);return ii(t)}function NP(e){let t=o2(e,!1,!1);if(t)switch(t.kind){case 176:case 262:case 218:return t}}function OP(e,t){for(;;){if(e=e.parent,!e)return;switch(e.kind){case 167:e=e.parent;break;case 262:case 218:case 219:if(!t)continue;case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 175:return e;case 170:e.parent.kind===169&&no(e.parent.parent)?e=e.parent.parent:no(e.parent)&&(e=e.parent);break}}}function MP(e){if(e.kind===218||e.kind===219){let t=e,r=e.parent;for(;r.kind===217;)t=r,r=r.parent;if(r.kind===213&&r.expression===t)return r}}function LP(e){return e.kind===108||gd(e)}function gd(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===108}function JP(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===110}function RP(e){var t;return!!e&&ki(e)&&((t=e.initializer)==null?void 0:t.kind)===110}function jP(e){return!!e&&(_u(e)||_s(e))&&Ct(e.parent.parent)&&e.parent.parent.operatorToken.kind===64&&e.parent.parent.right.kind===110}function FP(e){switch(e.kind){case 183:return e.typeName;case 233:return co(e.expression)?e.expression:void 0;case 80:case 166:return e}}function BP(e){switch(e.kind){case 215:return e.tag;case 286:case 285:return e.tagName;default:return e.expression}}function Y3(e,t,r,a){if(e&&Yd(t)&&jr(t.name))return!1;switch(t.kind){case 263:return!0;case 231:return!e;case 172:return r!==void 0&&(e?Yo(r):dn(r)&&!nS(t)&&!iS(t));case 177:case 178:case 174:return t.body!==void 0&&r!==void 0&&(e?Yo(r):dn(r));case 169:return e?r!==void 0&&r.body!==void 0&&(r.kind===176||r.kind===174||r.kind===178)&&YT(r)!==t&&a!==void 0&&a.kind===263:!1}return!1}function l_(e,t,r,a){return El(t)&&Y3(e,t,r,a)}function A0(e,t,r,a){return l_(e,t,r,a)||s2(e,t,r)}function s2(e,t,r){switch(t.kind){case 263:return mt(t.members,a=>A0(e,a,t,r));case 231:return!e&&mt(t.members,a=>A0(e,a,t,r));case 174:case 178:case 176:return mt(t.parameters,a=>l_(e,a,t,r));default:return!1}}function UP(e,t){if(l_(e,t))return!0;let r=QT(t);return!!r&&s2(e,r,t)}function qP(e,t,r){let a;if(im(t)){let{firstAccessor:_,secondAccessor:p,setAccessor:d}=P2(r.members,t),h=El(_)?_:p&&El(p)?p:void 0;if(!h||t!==h)return!1;a=d==null?void 0:d.parameters}else d_(t)&&(a=t.parameters);if(l_(e,t,r))return!0;if(a){for(let _ of a)if(!Xl(_)&&l_(e,_,t,r))return!0}return!1}function K3(e){if(e.textSourceNode){switch(e.textSourceNode.kind){case 11:return K3(e.textSourceNode);case 15:return e.text===""}return!1}return e.text===""}function Lf(e){let{parent:t}=e;return t.kind===286||t.kind===285||t.kind===287?t.tagName===e:!1}function _2(e){switch(e.kind){case 108:case 106:case 112:case 97:case 14:case 209:case 210:case 211:case 212:case 213:case 214:case 215:case 234:case 216:case 238:case 235:case 217:case 218:case 231:case 219:case 222:case 220:case 221:case 224:case 225:case 226:case 227:case 230:case 228:case 232:case 284:case 285:case 288:case 229:case 223:case 236:return!0;case 233:return!Nl(e.parent)&&!Lm(e.parent);case 166:for(;e.parent.kind===166;)e=e.parent;return e.parent.kind===186||ul(e.parent)||Wf(e.parent)||r_(e.parent)||Lf(e);case 318:for(;r_(e.parent);)e=e.parent;return e.parent.kind===186||ul(e.parent)||Wf(e.parent)||r_(e.parent)||Lf(e);case 81:return Ct(e.parent)&&e.parent.left===e&&e.parent.operatorToken.kind===103;case 80:if(e.parent.kind===186||ul(e.parent)||Wf(e.parent)||r_(e.parent)||Lf(e))return!0;case 9:case 10:case 11:case 15:case 110:return Z3(e);default:return!1}}function Z3(e){let{parent:t}=e;switch(t.kind){case 260:case 169:case 172:case 171:case 306:case 303:case 208:return t.initializer===e;case 244:case 245:case 246:case 247:case 253:case 254:case 255:case 296:case 257:return t.expression===e;case 248:let r=t;return r.initializer===e&&r.initializer.kind!==261||r.condition===e||r.incrementor===e;case 249:case 250:let a=t;return a.initializer===e&&a.initializer.kind!==261||a.expression===e;case 216:case 234:return e===t.expression;case 239:return e===t.expression;case 167:return e===t.expression;case 170:case 294:case 293:case 305:return!0;case 233:return t.expression===e&&!r2(t);case 304:return t.objectAssignmentInitializer===e;case 238:return e===t.expression;default:return _2(t)}}function eT(e){for(;e.kind===166||e.kind===80;)e=e.parent;return e.kind===186}function zP(e){return Nm(e)&&!!e.parent.moduleSpecifier}function tT(e){return e.kind===271&&e.moduleReference.kind===283}function WP(e){return N.assert(tT(e)),e.moduleReference.expression}function VP(e){return fm(e)&&R2(e.initializer).arguments[0]}function HP(e){return e.kind===271&&e.moduleReference.kind!==283}function c2(e){return Wt(e)}function GP(e){return!Wt(e)}function Wt(e){return!!e&&!!(e.flags&524288)}function XP(e){return!!e&&!!(e.flags&134217728)}function $P(e){return!e2(e)}function rT(e){return!!e&&!!(e.flags&16777216)}function QP(e){return R_(e)&&Ee(e.typeName)&&e.typeName.escapedText==="Object"&&e.typeArguments&&e.typeArguments.length===2&&(e.typeArguments[0].kind===154||e.typeArguments[0].kind===150)}function Wl(e,t){if(e.kind!==213)return!1;let{expression:r,arguments:a}=e;if(r.kind!==80||r.escapedText!=="require"||a.length!==1)return!1;let _=a[0];return!t||Kn(_)}function nT(e){return iT(e,!1)}function fm(e){return iT(e,!0)}function YP(e){return nu(e)&&fm(e.parent.parent)}function iT(e,t){return ki(e)&&!!e.initializer&&Wl(t?R2(e.initializer):e.initializer,!0)}function aT(e){return as(e)&&e.declarationList.declarations.length>0&&so(e.declarationList.declarations,t=>nT(t))}function KP(e){return e===39||e===34}function ZP(e,t){return Xo(t,e).charCodeAt(0)===34}function k0(e){return Ct(e)||$o(e)||Ee(e)||j_(e)}function oT(e){return Wt(e)&&e.initializer&&Ct(e.initializer)&&(e.initializer.operatorToken.kind===57||e.initializer.operatorToken.kind===61)&&e.name&&co(e.name)&&u_(e.name,e.initializer.left)?e.initializer.right:e.initializer}function eI(e){let t=oT(e);return t&&A_(t,$l(e.name))}function tI(e,t){return yr(e.properties,r=>_s(r)&&Ee(r.name)&&r.name.escapedText==="value"&&r.initializer&&A_(r.initializer,t))}function rI(e){if(e&&e.parent&&Ct(e.parent)&&e.parent.operatorToken.kind===64){let t=$l(e.parent.left);return A_(e.parent.right,t)||nI(e.parent.left,e.parent.right,t)}if(e&&j_(e)&&p2(e)){let t=tI(e.arguments[2],e.arguments[1].text==="prototype");if(t)return t}}function A_(e,t){if(j_(e)){let r=Gl(e.expression);return r.kind===218||r.kind===219?e:void 0}if(e.kind===218||e.kind===231||e.kind===219||uo(e)&&(e.properties.length===0||t))return e}function nI(e,t,r){let a=Ct(t)&&(t.operatorToken.kind===57||t.operatorToken.kind===61)&&A_(t.right,r);if(a&&u_(e,t.left))return a}function iI(e){let t=ki(e.parent)?e.parent.name:Ct(e.parent)&&e.parent.operatorToken.kind===64?e.parent.left:void 0;return t&&A_(e.right,$l(t))&&co(t)&&u_(t,e.left)}function aI(e){if(Ct(e.parent)){let t=(e.parent.operatorToken.kind===57||e.parent.operatorToken.kind===61)&&Ct(e.parent.parent)?e.parent.parent:e.parent;if(t.operatorToken.kind===64&&Ee(t.left))return t.left}else if(ki(e.parent))return e.parent.name}function u_(e,t){return P0(e)&&P0(t)?vd(e)===vd(t):ro(e)&&Jf(t)&&(t.expression.kind===110||Ee(t.expression)&&(t.expression.escapedText==="window"||t.expression.escapedText==="self"||t.expression.escapedText==="global"))?u_(e,cT(t)):Jf(e)&&Jf(t)?io(e)===io(t)&&u_(e.expression,t.expression):!1}function l2(e){for(;Na(e,!0);)e=e.right;return e}function sT(e){return Ee(e)&&e.escapedText==="exports"}function _T(e){return Ee(e)&&e.escapedText==="module"}function u2(e){return(Br(e)||Vl(e))&&_T(e.expression)&&io(e)==="exports"}function Ja(e){let t=oI(e);return t===5||Wt(e)?t:0}function p2(e){return Ka(e.arguments)===3&&Br(e.expression)&&Ee(e.expression.expression)&&Ot(e.expression.expression)==="Object"&&Ot(e.expression.name)==="defineProperty"&&Qi(e.arguments[1])&&p_(e.arguments[0],!0)}function Jf(e){return Br(e)||Vl(e)}function Vl(e){return Ra(e)&&Qi(e.argumentExpression)}function k_(e,t){return Br(e)&&(!t&&e.expression.kind===110||Ee(e.name)&&p_(e.expression,!0))||f2(e,t)}function f2(e,t){return Vl(e)&&(!t&&e.expression.kind===110||co(e.expression)||k_(e.expression,!0))}function p_(e,t){return co(e)||k_(e,t)}function cT(e){return Br(e)?e.name:e.argumentExpression}function oI(e){if(j_(e)){if(!p2(e))return 0;let t=e.arguments[0];return sT(t)||u2(t)?8:k_(t)&&io(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!$o(e.left)||sI(l2(e))?0:p_(e.left.expression,!0)&&io(e.left)==="prototype"&&uo(uT(e))?6:lT(e.left)}function sI(e){return h6(e)&&lo(e.expression)&&e.expression.text==="0"}function dm(e){if(Br(e))return e.name;let t=Gl(e.argumentExpression);return lo(t)||Kn(t)?t:e}function io(e){let t=dm(e);if(t){if(Ee(t))return t.escapedText;if(Kn(t)||lo(t))return Mn(t.text)}}function lT(e){if(e.expression.kind===110)return 4;if(u2(e))return 2;if(p_(e.expression,!0)){if($l(e.expression))return 3;let t=e;for(;!Ee(t.expression);)t=t.expression;let r=t.expression;if((r.escapedText==="exports"||r.escapedText==="module"&&io(t)==="exports")&&k_(e))return 1;if(p_(e,!0)||Ra(e)&&S2(e))return 5}return 0}function uT(e){for(;Ct(e.right);)e=e.right;return e.right}function _I(e){return Ct(e)&&Ja(e)===3}function cI(e){return Wt(e)&&e.parent&&e.parent.kind===244&&(!Ra(e)||Vl(e))&&!!em(e.parent)}function lI(e,t){let{valueDeclaration:r}=e;(!r||!(t.flags&33554432&&!Wt(t)&&!(r.flags&33554432))&&k0(r)&&!k0(t)||r.kind!==t.kind&&R3(r))&&(e.valueDeclaration=t)}function uI(e){if(!e||!e.valueDeclaration)return!1;let t=e.valueDeclaration;return t.kind===262||ki(t)&&t.initializer&&Gi(t.initializer)}function pI(e){var t,r;switch(e.kind){case 260:case 208:return(t=Kr(e.initializer,a=>Wl(a,!0)))==null?void 0:t.arguments[0];case 272:return On(e.moduleSpecifier,Kn);case 271:return On((r=On(e.moduleReference,Om))==null?void 0:r.expression,Kn);case 273:case 280:return On(e.parent.moduleSpecifier,Kn);case 274:case 281:return On(e.parent.parent.moduleSpecifier,Kn);case 276:return On(e.parent.parent.parent.moduleSpecifier,Kn);default:N.assertNever(e)}}function fI(e){return pT(e)||N.failBadSyntaxKind(e.parent)}function pT(e){switch(e.parent.kind){case 272:case 278:return e.parent;case 283:return e.parent.parent;case 213:return t2(e.parent)||Wl(e.parent,!1)?e.parent:void 0;case 201:return N.assert(mn(e)),On(e.parent.parent,ru);default:return}}function d2(e){switch(e.kind){case 272:case 278:return e.moduleSpecifier;case 271:return e.moduleReference.kind===283?e.moduleReference.expression:void 0;case 205:return V3(e)?e.argument.literal:void 0;case 213:return e.arguments[0];case 267:return e.name.kind===11?e.name:void 0;default:return N.assertNever(e)}}function fT(e){switch(e.kind){case 272:return e.importClause&&On(e.importClause.namedBindings,E6);case 271:return e;case 278:return e.exportClause&&On(e.exportClause,Nm);default:return N.assertNever(e)}}function dT(e){return e.kind===272&&!!e.importClause&&!!e.importClause.name}function dI(e,t){if(e.name){let r=t(e);if(r)return r}if(e.namedBindings){let r=E6(e.namedBindings)?t(e.namedBindings):yr(e.namedBindings.elements,t);if(r)return r}}function mI(e){if(e)switch(e.kind){case 169:case 174:case 173:case 304:case 303:case 172:case 171:return e.questionToken!==void 0}return!1}function hI(e){let t=Mm(e)?g_(e.parameters):void 0,r=On(t&&t.name,Ee);return!!r&&r.escapedText==="new"}function Hl(e){return e.kind===353||e.kind===345||e.kind===347}function yI(e){return Hl(e)||T6(e)}function gI(e){return ou(e)&&Ct(e.expression)&&e.expression.operatorToken.kind===64?l2(e.expression):void 0}function mT(e){return ou(e)&&Ct(e.expression)&&Ja(e.expression)!==0&&Ct(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function m2(e){switch(e.kind){case 243:let t=Cl(e);return t&&t.initializer;case 172:return e.initializer;case 303:return e.initializer}}function Cl(e){return as(e)?g_(e.declarationList.declarations):void 0}function hT(e){return Yi(e)&&e.body&&e.body.kind===267?e.body:void 0}function bI(e){if(e.kind>=243&&e.kind<=259)return!0;switch(e.kind){case 80:case 110:case 108:case 166:case 236:case 212:case 211:case 208:case 218:case 219:case 174:case 177:case 178:return!0;default:return!1}}function mm(e){switch(e.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 324:case 330:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function yT(e,t){let r;n2(e)&&C3(e)&&Wi(e.initializer)&&(r=Rr(r,jb(e,ka(e.initializer.jsDoc))));let a=e;for(;a&&a.parent;){if(Wi(a)&&(r=Rr(r,jb(e,ka(a.jsDoc)))),a.kind===169){r=Rr(r,(t?L4:Zd)(a));break}if(a.kind===168){r=Rr(r,(t?j4:R4)(a));break}a=gT(a)}return r||$e}function jb(e,t){if(cs(t)){let r=$r(t.tags,a=>Fb(e,a));return t.tags===r?[t]:r}return Fb(e,t)?[t]:void 0}function Fb(e,t){return!(lu(t)||j6(t))||!t.parent||!cs(t.parent)||!is(t.parent.parent)||t.parent.parent===e}function gT(e){let t=e.parent;if(t.kind===303||t.kind===277||t.kind===172||t.kind===244&&e.kind===211||t.kind===253||hT(t)||Ct(e)&&e.operatorToken.kind===64)return t;if(t.parent&&(Cl(t.parent)===e||Ct(t)&&t.operatorToken.kind===64))return t.parent;if(t.parent&&t.parent.parent&&(Cl(t.parent.parent)||m2(t.parent.parent)===e||mT(t.parent.parent)))return t.parent.parent}function vI(e){if(e.symbol)return e.symbol;if(!Ee(e.name))return;let t=e.name.escapedText,r=h2(e);if(!r)return;let a=Yr(r.parameters,_=>_.name.kind===80&&_.name.escapedText===t);return a&&a.symbol}function TI(e){if(cs(e.parent)&&e.parent.tags){let t=Yr(e.parent.tags,Hl);if(t)return t}return h2(e)}function h2(e){let t=y2(e);if(t)return Zl(t)&&t.type&&Gi(t.type)?t.type:Gi(t)?t:void 0}function y2(e){let t=bT(e);if(t)return mT(t)||gI(t)||m2(t)||Cl(t)||hT(t)||t}function bT(e){let t=g2(e);if(!t)return;let r=t.parent;if(r&&r.jsDoc&&t===wi(r.jsDoc))return r}function g2(e){return Kr(e.parent,cs)}function SI(e){let t=e.name.escapedText,{typeParameters:r}=e.parent.parent.parent;return r&&Yr(r,a=>a.name.escapedText===t)}function xI(e){return!!e.typeArguments}function vT(e){let t=e.parent;for(;;){switch(t.kind){case 226:let r=t.operatorToken.kind;return D_(r)&&t.left===e?r===64||Tm(r)?1:2:0;case 224:case 225:let a=t.operator;return a===46||a===47?2:0;case 249:case 250:return t.initializer===e?1:0;case 217:case 209:case 230:case 235:e=t;break;case 305:e=t.parent;break;case 304:if(t.name!==e)return 0;e=t.parent;break;case 303:if(t.name===e)return 0;e=t.parent;break;default:return 0}t=e.parent}}function wI(e){return vT(e)!==0}function CI(e){switch(e.kind){case 241:case 243:case 254:case 245:case 255:case 269:case 296:case 297:case 256:case 248:case 249:case 250:case 246:case 247:case 258:case 299:return!0}return!1}function EI(e){return km(e)||Dm(e)||Rg(e)||os(e)||J_(e)}function TT(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function AI(e){return TT(e,196)}function ST(e){return TT(e,217)}function kI(e){let t;for(;e&&e.kind===196;)t=e,e=e.parent;return[t,e]}function DI(e){for(;f6(e);)e=e.type;return e}function Gl(e,t){return ls(e,t?17:1)}function PI(e){return e.kind!==211&&e.kind!==212?!1:(e=ST(e.parent),e&&e.kind===220)}function II(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1}function xT(e){return!ii(e)&&!am(e)&&Ho(e.parent)&&e.parent.name===e}function NI(e){let t=e.parent;switch(e.kind){case 11:case 15:case 9:if(ao(t))return t.parent;case 80:if(Ho(t))return t.name===e?t:void 0;if(M_(t)){let r=t.parent;return h_(r)&&r.name===t?r:void 0}else{let r=t.parent;return Ct(r)&&Ja(r)!==0&&(r.left.symbol||r.symbol)&&Bl(r)===e?r:void 0}case 81:return Ho(t)&&t.name===e?t:void 0;default:return}}function wT(e){return Qi(e)&&e.parent.kind===167&&Ho(e.parent.parent)}function OI(e){let t=e.parent;switch(t.kind){case 172:case 171:case 174:case 173:case 177:case 178:case 306:case 303:case 211:return t.name===e;case 166:return t.right===e;case 208:case 276:return t.propertyName===e;case 281:case 291:case 285:case 286:case 287:return!0}return!1}function MI(e){return e.kind===271||e.kind===270||e.kind===273&&e.name||e.kind===274||e.kind===280||e.kind===276||e.kind===281||e.kind===277&&D0(e)?!0:Wt(e)&&(Ct(e)&&Ja(e)===2&&D0(e)||Br(e)&&Ct(e.parent)&&e.parent.left===e&&e.parent.operatorToken.kind===64&&b2(e.parent.right))}function CT(e){switch(e.parent.kind){case 273:case 276:case 274:case 281:case 277:case 271:case 280:return e.parent;case 166:do e=e.parent;while(e.parent.kind===166);return CT(e)}}function b2(e){return co(e)||Il(e)}function D0(e){let t=ET(e);return b2(t)}function ET(e){return ss(e)?e.expression:e.right}function LI(e){return e.kind===304?e.name:e.kind===303?e.initializer:e.parent.right}function AT(e){let t=kT(e);if(t&&Wt(e)){let r=F4(e);if(r)return r.class}return t}function kT(e){let t=hm(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function DT(e){if(Wt(e))return B4(e).map(t=>t.class);{let t=hm(e.heritageClauses,119);return t==null?void 0:t.types}}function PT(e){return su(e)?IT(e)||$e:dn(e)&&y_(Qf(AT(e)),DT(e))||$e}function IT(e){let t=hm(e.heritageClauses,96);return t?t.types:void 0}function hm(e,t){if(e){for(let r of e)if(r.token===t)return r}}function JI(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}}function Si(e){return 83<=e&&e<=165}function NT(e){return 19<=e&&e<=79}function Rf(e){return Si(e)||NT(e)}function v2(e){return 128<=e&&e<=165}function OT(e){return Si(e)&&!v2(e)}function RI(e){return 119<=e&&e<=127}function jI(e){let t=Rl(e);return t!==void 0&&OT(t)}function FI(e){let t=Rl(e);return t!==void 0&&Si(t)}function BI(e){let t=D4(e);return!!t&&!v2(t)}function UI(e){return 2<=e&&e<=7}function qI(e){if(!e)return 4;let t=0;switch(e.kind){case 262:case 218:case 174:e.asteriskToken&&(t|=1);case 219:gr(e,512)&&(t|=2);break}return e.body||(t|=4),t}function zI(e){switch(e.kind){case 262:case 218:case 219:case 174:return e.body!==void 0&&e.asteriskToken===void 0&&gr(e,512)}return!1}function Qi(e){return Kn(e)||lo(e)}function T2(e){return Pm(e)&&(e.operator===40||e.operator===41)&&lo(e.operand)}function MT(e){let t=Bl(e);return!!t&&S2(t)}function S2(e){if(!(e.kind===167||e.kind===212))return!1;let t=Ra(e)?Gl(e.argumentExpression):e.expression;return!Qi(t)&&!T2(t)}function bd(e){switch(e.kind){case 80:case 81:return e.escapedText;case 11:case 9:return Mn(e.text);case 167:let t=e.expression;return Qi(t)?Mn(t.text):T2(t)?t.operator===41?nr(t.operator)+t.operand.text:t.operand.text:void 0;case 295:return Yl(e);default:return N.assertNever(e)}}function P0(e){switch(e.kind){case 80:case 11:case 15:case 9:return!0;default:return!1}}function vd(e){return ro(e)?Ot(e):U_(e)?Kl(e):e.text}function LT(e){return ro(e)?e.escapedText:U_(e)?Yl(e):Mn(e.text)}function WI(e){return`__@${getSymbolId(e)}@${e.escapedName}`}function VI(e,t){return`__#${getSymbolId(e)}@${t}`}function HI(e){return Fr(e.escapedName,"__@")}function GI(e){return Fr(e.escapedName,"__#")}function XI(e){return e.kind===80&&e.escapedText==="Symbol"}function JT(e){return Ee(e)?Ot(e)==="__proto__":mn(e)&&e.text==="__proto__"}function Ks(e,t){switch(e=ls(e),e.kind){case 231:if(classHasDeclaredOrExplicitlyAssignedName(e))return!1;break;case 218:if(e.name)return!1;break;case 219:break;default:return!1}return typeof t=="function"?t(e):!0}function RT(e){switch(e.kind){case 303:return!JT(e.name);case 304:return!!e.objectAssignmentInitializer;case 260:return Ee(e.name)&&!!e.initializer;case 169:return Ee(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 208:return Ee(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 172:return!!e.initializer;case 226:switch(e.operatorToken.kind){case 64:case 77:case 76:case 78:return Ee(e.left)}break;case 277:return!0}return!1}function $I(e,t){if(!RT(e))return!1;switch(e.kind){case 303:return Ks(e.initializer,t);case 304:return Ks(e.objectAssignmentInitializer,t);case 260:case 169:case 208:case 172:return Ks(e.initializer,t);case 226:return Ks(e.right,t);case 277:return Ks(e.expression,t)}}function QI(e){return e.escapedText==="push"||e.escapedText==="unshift"}function YI(e){return ym(e).kind===169}function ym(e){for(;e.kind===208;)e=e.parent.parent;return e}function KI(e){let t=e.kind;return t===176||t===218||t===262||t===219||t===174||t===177||t===178||t===267||t===312}function Ta(e){return Oa(e.pos)||Oa(e.end)}function ZI(e){return Fl(e,ii)||e}function eN(e){let t=x2(e),r=e.kind===214&&e.arguments!==void 0;return jT(e.kind,t,r)}function jT(e,t,r){switch(e){case 214:return r?0:1;case 224:case 221:case 222:case 220:case 223:case 227:case 229:return 1;case 226:switch(t){case 43:case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 1}}return 0}function tN(e){let t=x2(e),r=e.kind===214&&e.arguments!==void 0;return FT(e.kind,t,r)}function x2(e){return e.kind===226?e.operatorToken.kind:e.kind===224||e.kind===225?e.operator:e.kind}function FT(e,t,r){switch(e){case 361:return 0;case 230:return 1;case 229:return 2;case 227:return 4;case 226:switch(t){case 28:return 0;case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 3;default:return pl(t)}case 216:case 235:case 224:case 221:case 222:case 220:case 223:return 16;case 225:return 17;case 213:return 18;case 214:return r?19:18;case 215:case 211:case 212:case 236:return 19;case 234:case 238:return 11;case 110:case 108:case 80:case 81:case 106:case 112:case 97:case 9:case 10:case 11:case 209:case 210:case 218:case 219:case 231:case 14:case 15:case 228:case 217:case 232:case 284:case 285:case 288:return 20;default:return-1}}function pl(e){switch(e){case 61:return 4;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function rN(e){return $r(e,t=>{switch(t.kind){case 294:return!!t.expression;case 12:return!t.containsOnlyTriviaWhiteSpaces;default:return!0}})}function nN(){let e=[],t=[],r=new Map,a=!1;return{add:p,lookup:_,getGlobalDiagnostics:d,getDiagnostics:h};function _(l){let v;if(l.file?v=r.get(l.file.fileName):v=e,!v)return;let y=Ml(v,l,bt,wd);if(y>=0)return v[y]}function p(l){let v;l.file?(v=r.get(l.file.fileName),v||(v=[],r.set(l.file.fileName,v),yl(t,l.file.fileName,Ci))):(a&&(a=!1,e=e.slice()),v=e),yl(v,l,wd)}function d(){return a=!0,e}function h(l){if(l)return r.get(l)||[];let v=vv(t,y=>r.get(y));return e.length&&v.unshift(...e),v}}function iN(e){return e.replace(gx,"\\${")}function BT(e){return e&&!!(Fx(e)?e.templateFlags:e.head.templateFlags||mt(e.templateSpans,t=>!!t.literal.templateFlags))}function UT(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}function aN(e,t,r){if(e.charCodeAt(0)===0){let a=r.charCodeAt(t+e.length);return a>=48&&a<=57?"\\x00":"\\0"}return Sx.get(e)||UT(e.charCodeAt(0))}function Td(e,t){let r=t===96?Tx:t===39?vx:bx;return e.replace(r,aN)}function Sd(e,t){return e=Td(e,t),W0.test(e)?e.replace(W0,r=>UT(r.charCodeAt(0))):e}function oN(e){return"&#x"+e.toString(16).toUpperCase()+";"}function sN(e){return e.charCodeAt(0)===0?"�":Cx.get(e)||oN(e.charCodeAt(0))}function qT(e,t){let r=t===39?wx:xx;return e.replace(r,sN)}function _N(e){let t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&cN(e.charCodeAt(0))?e.substring(1,t-1):e}function cN(e){return e===39||e===34||e===96}function zT(e){let t=e.charCodeAt(0);return t>=97&&t<=122||eo(e,"-")}function w2(e){let t=Po[1];for(let r=Po.length;r<=e;r++)Po.push(Po[r-1]+t);return Po[e]}function Jo(){return Po[1].length}function lN(){return eo(Gf,"-dev")||eo(Gf,"-insiders")}function uN(e){var t,r,a,_,p,d=!1;function h(K){let ue=Hd(K);ue.length>1?(_=_+ue.length-1,p=t.length-K.length+ka(ue),a=p-t.length===0):a=!1}function l(K){K&&K.length&&(a&&(K=w2(r)+K,a=!1),t+=K,h(K))}function v(K){K&&(d=!1),l(K)}function y(K){K&&(d=!0),l(K)}function C(){t="",r=0,a=!0,_=0,p=0,d=!1}function S(K){K!==void 0&&(t+=K,h(K),d=!1)}function k(K){K&&K.length&&v(K)}function L(K){(!a||K)&&(t+=e,_++,p=t.length,a=!0,d=!1)}function G(){return a?t.length:t.length+e.length}return C(),{write:v,rawWrite:S,writeLiteral:k,writeLine:L,increaseIndent:()=>{r++},decreaseIndent:()=>{r--},getIndent:()=>r,getTextPos:()=>t.length,getLine:()=>_,getColumn:()=>a?r*Jo():t.length-p,getText:()=>t,isAtStartOfLine:()=>a,hasTrailingComment:()=>d,hasTrailingWhitespace:()=>!!t.length&&Vi(t.charCodeAt(t.length-1)),clear:C,writeKeyword:v,writeOperator:v,writeParameter:v,writeProperty:v,writePunctuation:v,writeSpace:v,writeStringLiteral:v,writeSymbol:(K,ue)=>v(K),writeTrailingSemicolon:v,writeComment:y,getTextPosWithWriteLine:G}}function pN(e){let t=!1;function r(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return{...e,writeTrailingSemicolon(){t=!0},writeLiteral(a){r(),e.writeLiteral(a)},writeStringLiteral(a){r(),e.writeStringLiteral(a)},writeSymbol(a,_){r(),e.writeSymbol(a,_)},writePunctuation(a){r(),e.writePunctuation(a)},writeKeyword(a){r(),e.writeKeyword(a)},writeOperator(a){r(),e.writeOperator(a)},writeParameter(a){r(),e.writeParameter(a)},writeSpace(a){r(),e.writeSpace(a)},writeProperty(a){r(),e.writeProperty(a)},writeComment(a){r(),e.writeComment(a)},writeLine(){r(),e.writeLine()},increaseIndent(){r(),e.increaseIndent()},decreaseIndent(){r(),e.decreaseIndent()}}}function C2(e){return e.useCaseSensitiveFileNames?e.useCaseSensitiveFileNames():!1}function WT(e){return Ud(C2(e))}function VT(e,t,r){return t.moduleName||E2(e,t.fileName,r&&r.fileName)}function Bb(e,t){return e.getCanonicalFileName(Pa(t,e.getCurrentDirectory()))}function fN(e,t,r){let a=t.getExternalModuleFileFromDeclaration(r);if(!a||a.isDeclarationFile)return;let _=d2(r);if(!(_&&Kn(_)&&!rs(_.text)&&Bb(e,a.path).indexOf(Bb(e,zo(e.getCommonSourceDirectory())))===-1))return VT(e,a)}function E2(e,t,r){let a=l=>e.getCanonicalFileName(l),_=xi(r?$i(r):e.getCommonSourceDirectory(),e.getCurrentDirectory(),a),p=Pa(t,e.getCurrentDirectory()),d=bg(_,p,_,a,!1),h=Al(d);return r?hg(h):h}function dN(e,t,r){let a=t.getCompilerOptions(),_;return a.outDir?_=Al(XT(e,t,a.outDir)):_=Al(e),_+r}function mN(e,t){return HT(e,t.getCompilerOptions(),t.getCurrentDirectory(),t.getCommonSourceDirectory(),r=>t.getCanonicalFileName(r))}function HT(e,t,r,a,_){let p=t.declarationDir||t.outDir,d=p?k2(e,p,r,a,_):e,h=GT(d);return Al(d)+h}function GT(e){return ei(e,[".mjs",".mts"])?".d.mts":ei(e,[".cjs",".cts"])?".d.cts":ei(e,[".json"])?".d.json.ts":".d.ts"}function hN(e){return ei(e,[".d.mts",".mjs",".mts"])?[".mts",".mjs"]:ei(e,[".d.cts",".cjs",".cts"])?[".cts",".cjs"]:ei(e,[".d.json.ts"])?[".json"]:[".tsx",".ts",".jsx",".js"]}function A2(e){return e.outFile||e.out}function yN(e,t){var r;if(e.paths)return e.baseUrl??N.checkDefined(e.pathsBasePath||((r=t.getCurrentDirectory)==null?void 0:r.call(t)),"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.")}function gN(e,t,r){let a=e.getCompilerOptions();if(A2(a)){let _=ni(a),p=a.emitDeclarationOnly||_===2||_===4;return $r(e.getSourceFiles(),d=>(p||!Zo(d))&&I0(d,e,r))}else{let _=t===void 0?e.getSourceFiles():[t];return $r(_,p=>I0(p,e,r))}}function I0(e,t,r){return!(t.getCompilerOptions().noEmitForJsFiles&&c2(e))&&!e.isDeclarationFile&&!t.isSourceFileFromExternalLibrary(e)&&(r||!(e2(e)&&t.getResolvedProjectReferenceToRedirect(e.fileName))&&!t.isSourceOfProjectReferenceRedirect(e.fileName))}function XT(e,t,r){return k2(e,r,t.getCurrentDirectory(),t.getCommonSourceDirectory(),a=>t.getCanonicalFileName(a))}function k2(e,t,r,a,_){let p=Pa(e,r);return p=_(p).indexOf(_(a))===0?p.substring(a.length):p,hr(t,p)}function bN(e,t,r,a,_,p,d){e.writeFile(r,a,_,h=>{t.add(fl(U.Could_not_write_file_0_Colon_1,r,h))},p,d)}function $T(e,t,r){if(e.length>Ei(e)&&!r(e)){let a=$i(e);$T(a,t,r),t(e)}}function vN(e,t,r,a,_,p){try{a(e,t,r)}catch{$T($i(pn(e)),_,p),a(e,t,r)}}function TN(e,t){let r=Ia(e);return __(r,t)}function Ca(e,t){return __(e,t)}function QT(e){return Yr(e.members,t=>J_(t)&&wl(t.body))}function D2(e){if(e&&e.parameters.length>0){let t=e.parameters.length===2&&Xl(e.parameters[0]);return e.parameters[t?1:0]}}function SN(e){let t=D2(e);return t&&t.type}function YT(e){if(e.parameters.length&&!cu(e)){let t=e.parameters[0];if(Xl(t))return t}}function Xl(e){return gm(e.name)}function gm(e){return!!e&&e.kind===80&&KT(e)}function xN(e){return!!Kr(e,t=>t.kind===186?!0:t.kind===80||t.kind===166?!1:"quit")}function wN(e){if(!gm(e))return!1;for(;M_(e.parent)&&e.parent.left===e;)e=e.parent;return e.parent.kind===186}function KT(e){return e.escapedText==="this"}function P2(e,t){let r,a,_,p;return MT(t)?(r=t,t.kind===177?_=t:t.kind===178?p=t:N.fail("Accessor has wrong kind")):yr(e,d=>{if(im(d)&&N0(d)===N0(t)){let h=bd(d.name),l=bd(t.name);h===l&&(r?a||(a=d):r=d,d.kind===177&&!_&&(_=d),d.kind===178&&!p&&(p=d))}}),{firstAccessor:r,secondAccessor:a,getAccessor:_,setAccessor:p}}function I2(e){if(!Wt(e)&&os(e))return;let t=e.type;return t||!Wt(e)?t:Ig(e)?e.typeExpression&&e.typeExpression.type:tm(e)}function CN(e){return e.type}function EN(e){return cu(e)?e.type&&e.type.typeExpression&&e.type.typeExpression.type:e.type||(Wt(e)?X4(e):void 0)}function ZT(e){return Bo(Ul(e),t=>AN(t)?t.typeParameters:void 0)}function AN(e){return Ko(e)&&!(e.parent.kind===327&&(e.parent.tags.some(Hl)||e.parent.tags.some(L6)))}function kN(e){let t=D2(e);return t&&I2(t)}function eS(e,t,r,a){tS(e,t,r.pos,a)}function tS(e,t,r,a){a&&a.length&&r!==a[0].pos&&Ca(e,r)!==Ca(e,a[0].pos)&&t.writeLine()}function DN(e,t,r,a){r!==a&&Ca(e,r)!==Ca(e,a)&&t.writeLine()}function rS(e,t,r,a,_,p,d,h){if(a&&a.length>0){_&&r.writeSpace(" ");let l=!1;for(let v of a)l&&(r.writeSpace(" "),l=!1),h(e,t,r,v.pos,v.end,d),v.hasTrailingNewLine?r.writeLine():l=!0;l&&p&&r.writeSpace(" ")}}function PN(e,t,r,a,_,p,d){let h,l;if(d?_.pos===0&&(h=$r(Wo(e,_.pos),v)):h=Wo(e,_.pos),h){let y=[],C;for(let S of h){if(C){let k=Ca(t,C.end);if(Ca(t,S.pos)>=k+2)break}y.push(S),C=S}if(y.length){let S=Ca(t,ka(y).end);Ca(t,Nt(e,_.pos))>=S+2&&(eS(t,r,_,h),rS(e,t,r,y,!1,!0,p,a),l={nodePos:_.pos,detachedCommentEndPos:ka(y).end})}}return l;function v(y){return M3(e,y.pos)}}function IN(e,t,r,a,_,p){if(e.charCodeAt(a+1)===42){let d=Sg(t,a),h=t.length,l;for(let v=a,y=d.line;v<_;y++){let C=y+1===h?e.length+1:t[y+1];if(v!==a){l===void 0&&(l=Ub(e,t[d.line],a));let k=r.getIndent()*Jo()-l+Ub(e,v,C);if(k>0){let L=k%Jo(),G=w2((k-L)/Jo());for(r.rawWrite(G);L;)r.rawWrite(" "),L--}else r.rawWrite("")}NN(e,_,r,p,v,C),v=C}}else r.writeComment(e.substring(a,_))}function NN(e,t,r,a,_,p){let d=Math.min(t,p-1),h=qd(e.substring(_,d));h?(r.writeComment(h),d!==t&&r.writeLine()):r.rawWrite(a)}function Ub(e,t,r){let a=0;for(;t=0&&e.kind<=165?0:(e.modifierFlagsCache&536870912||(e.modifierFlagsCache=L2(e)|536870912),t&&!(e.modifierFlagsCache&4096)&&(r||Wt(e))&&e.parent&&(e.modifierFlagsCache|=cS(e)|4096),e.modifierFlagsCache&-536875009)}function vm(e){return O2(e,!0)}function _S(e){return O2(e,!0,!0)}function M2(e){return O2(e,!1)}function cS(e){let t=0;return e.parent&&!Ma(e)&&(Wt(e)&&(U4(e)&&(t|=4),q4(e)&&(t|=8),z4(e)&&(t|=16),W4(e)&&(t|=64),V4(e)&&(t|=16384)),H4(e)&&(t|=8192)),t}function lS(e){return L2(e)|cS(e)}function L2(e){let t=q_(e)?ln(e.modifiers):0;return(e.flags&8||e.kind===80&&e.flags&4096)&&(t|=1),t}function ln(e){let t=0;if(e)for(let r of e)t|=J2(r.kind);return t}function J2(e){switch(e){case 126:return 32;case 125:return 4;case 124:return 16;case 123:return 8;case 128:return 256;case 129:return 128;case 95:return 1;case 138:return 2;case 87:return 2048;case 90:return 1024;case 134:return 512;case 148:return 64;case 164:return 16384;case 103:return 32768;case 147:return 65536;case 170:return 131072}return 0}function uS(e){return e===57||e===56}function JN(e){return uS(e)||e===54}function Tm(e){return e===76||e===77||e===78}function RN(e){return Ct(e)&&Tm(e.operatorToken.kind)}function pS(e){return uS(e)||e===61}function jN(e){return Ct(e)&&pS(e.operatorToken.kind)}function D_(e){return e>=64&&e<=79}function fS(e){let t=dS(e);return t&&!t.isImplements?t.class:void 0}function dS(e){if(g6(e)){if(Nl(e.parent)&&dn(e.parent.parent))return{class:e.parent.parent,isImplements:e.parent.token===119};if(Lm(e.parent)){let t=y2(e.parent);if(t&&dn(t))return{class:t,isImplements:!1}}}}function Na(e,t){return Ct(e)&&(t?e.operatorToken.kind===64:D_(e.operatorToken.kind))&&Lo(e.left)}function FN(e){return Na(e.parent)&&e.parent.left===e}function BN(e){if(Na(e,!0)){let t=e.left.kind;return t===210||t===209}return!1}function M0(e){return fS(e)!==void 0}function co(e){return e.kind===80||mS(e)}function UN(e){switch(e.kind){case 80:return e;case 166:do e=e.left;while(e.kind!==80);return e;case 211:do e=e.expression;while(e.kind!==80);return e}}function L0(e){return e.kind===80||e.kind===110||e.kind===108||e.kind===236||e.kind===211&&L0(e.expression)||e.kind===217&&L0(e.expression)}function mS(e){return Br(e)&&Ee(e.name)&&co(e.expression)}function J0(e){if(Br(e)){let t=J0(e.expression);if(t!==void 0)return t+"."+vi(e.name)}else if(Ra(e)){let t=J0(e.expression);if(t!==void 0&&zl(e.argumentExpression))return t+"."+bd(e.argumentExpression)}else{if(Ee(e))return Vo(e.escapedText);if(U_(e))return Kl(e)}}function $l(e){return k_(e)&&io(e)==="prototype"}function qN(e){return e.parent.kind===166&&e.parent.right===e||e.parent.kind===211&&e.parent.name===e||e.parent.kind===236&&e.parent.name===e}function hS(e){return Br(e.parent)&&e.parent.name===e||Ra(e.parent)&&e.parent.argumentExpression===e}function zN(e){return M_(e.parent)&&e.parent.right===e||Br(e.parent)&&e.parent.name===e||r_(e.parent)&&e.parent.right===e}function WN(e){return e.kind===210&&e.properties.length===0}function VN(e){return e.kind===209&&e.elements.length===0}function HN(e){if(!(!GN(e)||!e.declarations)){for(let t of e.declarations)if(t.localSymbol)return t.localSymbol}}function GN(e){return e&&Ka(e.declarations)>0&&gr(e.declarations[0],1024)}function XN(e){return Yr(Px,t=>La(e,t))}function $N(e){let t=[],r=e.length;for(let a=0;a>6|192),t.push(_&63|128)):_<65536?(t.push(_>>12|224),t.push(_>>6&63|128),t.push(_&63|128)):_<131072?(t.push(_>>18|240),t.push(_>>12&63|128),t.push(_>>6&63|128),t.push(_&63|128)):N.assert(!1,"Unexpected code point")}return t}function yS(e){let t="",r=$N(e),a=0,_=r.length,p,d,h,l;for(;a<_;)p=r[a]>>2,d=(r[a]&3)<<4|r[a+1]>>4,h=(r[a+1]&15)<<2|r[a+2]>>6,l=r[a+2]&63,a+1>=_?h=l=64:a+2>=_&&(l=64),t+=qi.charAt(p)+qi.charAt(d)+qi.charAt(h)+qi.charAt(l),a+=3;return t}function QN(e){let t="",r=0,a=e.length;for(;r>4&3,y=(d&15)<<4|h>>2&15,C=(h&3)<<6|l&63;y===0&&h!==0?a.push(v):C===0&&l!==0?a.push(v,y):a.push(v,y,C),_+=4}return QN(a)}function gS(e,t){let r=b_(t)?t:t.readFile(e);if(!r)return;let a=parseConfigFileTextToJson(e,r);return a.error?void 0:a.config}function ZN(e,t){return gS(e,t)||{}}function bS(e,t){return!t.directoryExists||t.directoryExists(e)}function vS(e){switch(e.newLine){case 0:return Ex;case 1:case void 0:return Ax}}function Sm(e,t=e){return N.assert(t>=e||t===-1),{pos:e,end:t}}function eO(e,t){return Sm(e.pos,t)}function xd(e,t){return Sm(t,e.end)}function TS(e){let t=q_(e)?ig(e.modifiers,L_):void 0;return t&&!Oa(t.end)?xd(e,t.end):e}function tO(e){if(oo(e)||d_(e))return xd(e,e.name.pos);let t=q_(e)?wi(e.modifiers):void 0;return t&&!Oa(t.end)?xd(e,t.end):TS(e)}function rO(e){return e.pos===e.end}function nO(e,t){return Sm(e,e+nr(t).length)}function iO(e,t){return SS(e,e,t)}function aO(e,t,r){return P_(f_(e,r,!1),f_(t,r,!1),r)}function oO(e,t,r){return P_(e.end,t.end,r)}function SS(e,t,r){return P_(f_(e,r,!1),t.end,r)}function sO(e,t,r){return P_(e.end,f_(t,r,!1),r)}function _O(e,t,r,a){let _=f_(t,r,a);return x_(r,e.end,_)}function cO(e,t,r){return x_(r,e.end,t.end)}function lO(e,t){return!P_(e.pos,e.end,t)}function P_(e,t,r){return x_(r,e,t)===0}function f_(e,t,r){return Oa(e.pos)?-1:Nt(t.text,e.pos,!1,r)}function uO(e,t,r,a){let _=Nt(r.text,e,!1,a),p=fO(_,t,r);return x_(r,p??t,_)}function pO(e,t,r,a){let _=Nt(r.text,e,!1,a);return x_(r,e,Math.min(t,_))}function fO(e,t=0,r){for(;e-- >t;)if(!Vi(r.text.charCodeAt(e)))return e}function dO(e){let t=Fl(e);if(t)switch(t.parent.kind){case 266:case 267:return t===t.parent.name}return!1}function mO(e){return $r(e.declarations,xS)}function xS(e){return ki(e)&&e.initializer!==void 0}function hO(e){return e.watch&&Qr(e,"watch")}function yO(e){e.close()}function wS(e){return e.flags&33554432?e.links.checkFlags:0}function gO(e,t=!1){if(e.valueDeclaration){let r=t&&e.declarations&&Yr(e.declarations,Qo)||e.flags&32768&&Yr(e.declarations,m_)||e.valueDeclaration,a=Qd(r);return e.parent&&e.parent.flags&32?a:a&-29}if(wS(e)&6){let r=e.links.checkFlags,a=r&1024?8:r&256?4:16,_=r&2048?32:0;return a|_}return e.flags&4194304?36:0}function bO(e,t){return e.flags&2097152?t.getAliasedSymbol(e):e}function vO(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags}function TO(e){return Do(e)===1}function SO(e){return Do(e)!==0}function Do(e){let{parent:t}=e;switch(t==null?void 0:t.kind){case 217:return Do(t);case 225:case 224:let{operator:r}=t;return r===46||r===47?2:0;case 226:let{left:a,operatorToken:_}=t;return a===e&&D_(_.kind)?_.kind===64?1:2:0;case 211:return t.name!==e?0:Do(t);case 303:{let p=Do(t.parent);return e===t.name?xO(p):p}case 304:return e===t.objectAssignmentInitializer?0:Do(t.parent);case 209:return Do(t);default:return 0}}function xO(e){switch(e){case 0:return 1;case 1:return 0;case 2:return 2;default:return N.assertNever(e)}}function CS(e,t){if(!e||!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(typeof e[r]=="object"){if(!CS(e[r],t[r]))return!1}else if(typeof e[r]!="function"&&e[r]!==t[r])return!1;return!0}function wO(e,t){e.forEach(t),e.clear()}function ES(e,t,r){let{onDeleteValue:a,onExistingValue:_}=r;e.forEach((p,d)=>{let h=t.get(d);h===void 0?(e.delete(d),a(p,d)):_&&_(p,h,d)})}function CO(e,t,r){ES(e,t,r);let{createNewValue:a}=r;t.forEach((_,p)=>{e.has(p)||e.set(p,a(p,_))})}function EO(e){if(e.flags&32){let t=AS(e);return!!t&&gr(t,256)}return!1}function AS(e){var t;return(t=e.declarations)==null?void 0:t.find(dn)}function jf(e){return e.flags&138117121?e.objectFlags:0}function AO(e,t){return!!Zv(e,r=>t(r)?!0:void 0)}function kO(e){return!!e&&!!e.declarations&&!!e.declarations[0]&&x6(e.declarations[0])}function DO({moduleSpecifier:e}){return mn(e)?e.text:_m(e)}function kS(e){let t;return Bt(e,r=>{wl(r)&&(t=r)},r=>{for(let a=r.length-1;a>=0;a--)if(wl(r[a])){t=r[a];break}}),t}function PO(e,t,r=!0){return e.has(t)?!1:(e.set(t,r),!0)}function IO(e){return dn(e)||su(e)||Am(e)}function DS(e){return e>=182&&e<=205||e===133||e===159||e===150||e===163||e===151||e===136||e===154||e===155||e===116||e===157||e===146||e===141||e===233||e===319||e===320||e===321||e===322||e===323||e===324||e===325}function $o(e){return e.kind===211||e.kind===212}function NO(e){return e.kind===211?e.name:(N.assert(e.kind===212),e.argumentExpression)}function OO(e){switch(e.kind){case"text":case"internal":return!0;default:return!1}}function MO(e){return e.kind===275||e.kind===279}function R2(e){for(;$o(e);)e=e.expression;return e}function LO(e,t){if($o(e.parent)&&hS(e))return r(e.parent);function r(a){if(a.kind===211){let _=t(a.name);if(_!==void 0)return _}else if(a.kind===212)if(Ee(a.argumentExpression)||Kn(a.argumentExpression)){let _=t(a.argumentExpression);if(_!==void 0)return _}else return;if($o(a.expression))return r(a.expression);if(Ee(a.expression))return t(a.expression)}}function JO(e,t){for(;;){switch(e.kind){case 225:e=e.operand;continue;case 226:e=e.left;continue;case 227:e=e.condition;continue;case 215:e=e.tag;continue;case 213:if(t)return e;case 234:case 212:case 211:case 235:case 360:case 238:e=e.expression;continue}return e}}function RO(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.isAssigned=void 0,this.links=void 0}function jO(e,t){this.flags=t,(N.isDebugging||xa)&&(this.checker=e)}function FO(e,t){this.flags=t,N.isDebugging&&(this.checker=e)}function Gh(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function BO(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function UO(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function qO(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r||(a=>a)}function zO(e){Z2.push(e),e(wt)}function PS(e){Object.assign(wt,e),yr(Z2,t=>t(wt))}function I_(e,t,r=0){return e.replace(/{(\d+)}/g,(a,_)=>""+N.checkDefined(t[+_+r]))}function IS(e){kl=e}function NS(e){!kl&&e&&(kl=e())}function N_(e){return kl&&kl[e.key]||e.message}function Ao(e,t,r,a){Yg(void 0,t,r);let _=N_(a);return arguments.length>4&&(_=I_(_,arguments,4)),{file:void 0,start:t,length:r,messageText:_,category:a.category,code:a.code,reportsUnnecessary:a.reportsUnnecessary,fileName:e}}function WO(e){return e.file===void 0&&e.start!==void 0&&e.length!==void 0&&typeof e.fileName=="string"}function OS(e,t){let r=t.fileName||"",a=t.text.length;N.assertEqual(e.fileName,r),N.assertLessThanOrEqual(e.start,a),N.assertLessThanOrEqual(e.start+e.length,a);let _={file:t,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){_.relatedInformation=[];for(let p of e.relatedInformation)WO(p)&&p.fileName===r?(N.assertLessThanOrEqual(p.start,a),N.assertLessThanOrEqual(p.start+p.length,a),_.relatedInformation.push(OS(p,t))):_.relatedInformation.push(p)}return _}function $a(e,t){let r=[];for(let a of e)r.push(OS(a,t));return r}function j2(e,t,r,a){Yg(e,t,r);let _=N_(a);return arguments.length>4&&(_=I_(_,arguments,4)),{file:e,start:t,length:r,messageText:_,category:a.category,code:a.code,reportsUnnecessary:a.reportsUnnecessary,reportsDeprecated:a.reportsDeprecated}}function VO(e,t){let r=N_(t);return arguments.length>2&&(r=I_(r,arguments,2)),r}function fl(e){let t=N_(e);return arguments.length>1&&(t=I_(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 HO(e,t){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText,relatedInformation:t}}function tl(e,t){let r=N_(t);return arguments.length>2&&(r=I_(r,arguments,2)),{messageText:r,category:t.category,code:t.code,next:e===void 0||Array.isArray(e)?e:[e]}}function GO(e,t){let r=e;for(;r.next;)r=r.next[0];r.next=[t]}function qb(e){return e.file?e.file.path:void 0}function F2(e,t){return wd(e,t)||XO(e,t)||0}function wd(e,t){return Ci(qb(e),qb(t))||kr(e.start,t.start)||kr(e.length,t.length)||kr(e.code,t.code)||MS(e.messageText,t.messageText)||0}function XO(e,t){return!e.relatedInformation&&!t.relatedInformation?0:e.relatedInformation&&t.relatedInformation?kr(e.relatedInformation.length,t.relatedInformation.length)||yr(e.relatedInformation,(r,a)=>{let _=t.relatedInformation[a];return F2(r,_)})||0:e.relatedInformation?-1:1}function MS(e,t){if(typeof e=="string"&&typeof t=="string")return Ci(e,t);if(typeof e=="string")return-1;if(typeof t=="string")return 1;let r=Ci(e.messageText,t.messageText);if(r)return r;if(!e.next&&!t.next)return 0;if(!e.next)return-1;if(!t.next)return 1;let a=Math.min(e.next.length,t.next.length);for(let _=0;_t.next.length?1:0}function R0(e){return e===4||e===2||e===1||e===6?1:0}function LS(e){if(e.transformFlags&2)return x3(e)||dl(e)?e:Bt(e,LS)}function $O(e){return e.isDeclarationFile?void 0:LS(e)}function QO(e){return(e.impliedNodeFormat===99||ei(e.fileName,[".cjs",".cts",".mjs",".mts"]))&&!e.isDeclarationFile?!0:void 0}function JS(e){switch(RS(e)){case 3:return _=>{_.externalModuleIndicator=ml(_)||!_.isDeclarationFile||void 0};case 1:return _=>{_.externalModuleIndicator=ml(_)};case 2:let t=[ml];(e.jsx===4||e.jsx===5)&&t.push($O),t.push(QO);let r=ug(...t);return _=>void(_.externalModuleIndicator=r(_))}}function Ql(e){return e.target??(e.module===100&&9||e.module===199&&99||1)}function ni(e){return typeof e.module=="number"?e.module:Ql(e)>=2?5:1}function YO(e){return e>=5&&e<=99}function O_(e){let t=e.moduleResolution;if(t===void 0)switch(ni(e)){case 1:t=2;break;case 100:t=3;break;case 199:t=99;break;default:t=1;break}return t}function RS(e){return e.moduleDetection||(ni(e)===100||ni(e)===199?3:2)}function KO(e){switch(ni(e)){case 1:case 2:case 5:case 6:case 7:case 99:case 100:case 199:return!0;default:return!1}}function B2(e){return!!(e.isolatedModules||e.verbatimModuleSyntax)}function ZO(e){return e.verbatimModuleSyntax||e.isolatedModules&&e.preserveValueImports}function eM(e){return e.allowUnreachableCode===!1}function tM(e){return e.allowUnusedLabels===!1}function rM(e){return!!(z2(e)&&e.declarationMap)}function U2(e){if(e.esModuleInterop!==void 0)return e.esModuleInterop;switch(ni(e)){case 100:case 199:return!0}}function nM(e){return e.allowSyntheticDefaultImports!==void 0?e.allowSyntheticDefaultImports:U2(e)||ni(e)===4||O_(e)===100}function q2(e){return e>=3&&e<=99||e===100}function iM(e){return!!e.noDtsResolution||O_(e)!==100}function aM(e){let t=O_(e);if(!q2(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}function oM(e){let t=O_(e);if(!q2(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}function jS(e){return e.resolveJsonModule!==void 0?e.resolveJsonModule:O_(e)===100}function z2(e){return!!(e.declaration||e.composite)}function sM(e){return!!(e.preserveConstEnums||B2(e))}function _M(e){return!!(e.incremental||e.composite)}function W2(e,t){return e[t]===void 0?!!e.strict:!!e[t]}function FS(e){return e.allowJs===void 0?!!e.checkJs:e.allowJs}function cM(e){return e.useDefineForClassFields===void 0?Ql(e)>=9:e.useDefineForClassFields}function lM(e){return e.useDefineForClassFields!==!1&&Ql(e)>=9}function uM(e,t){return E_(t,e,semanticDiagnosticsOptionDeclarations)}function pM(e,t){return E_(t,e,affectsEmitOptionDeclarations)}function fM(e,t){return E_(t,e,affectsDeclarationPathOptionDeclarations)}function j0(e,t){return t.strictFlag?W2(e,t.name):e[t.name]}function dM(e){let t=e.jsx;return t===2||t===4||t===5}function mM(e,t){let r=t==null?void 0:t.pragmas.get("jsximportsource"),a=zt(r)?r[r.length-1]:r;return e.jsx===4||e.jsx===5||e.jsxImportSource||a?(a==null?void 0:a.arguments.factory)||e.jsxImportSource||"react":void 0}function hM(e,t){return e?`${e}/${t.jsx===5?"jsx-dev-runtime":"jsx-runtime"}`:void 0}function yM(e){let t=!1;for(let r=0;r_,getSymlinkedDirectories:()=>r,getSymlinkedDirectoriesByRealpath:()=>a,setSymlinkedFile:(h,l)=>(_||(_=new Map)).set(h,l),setSymlinkedDirectory:(h,l)=>{let v=xi(h,e,t);rx(v)||(v=zo(v),l!==!1&&!(r!=null&&r.has(v))&&(a||(a=Fd())).add(zo(l.realPath),h),(r||(r=new Map)).set(v,l))},setSymlinksFromResolutions(h,l){var v,y;N.assert(!p),p=!0;for(let C of h)(v=C.resolvedModules)==null||v.forEach(S=>d(this,S.resolvedModule)),(y=C.resolvedTypeReferenceDirectiveNames)==null||y.forEach(S=>d(this,S.resolvedTypeReferenceDirective));l.forEach(C=>d(this,C.resolvedTypeReferenceDirective))},hasProcessedResolutions:()=>p};function d(h,l){if(!l||!l.originalPath||!l.resolvedFileName)return;let{resolvedFileName:v,originalPath:y}=l;h.setSymlinkedFile(xi(y,e,t),v);let[C,S]=bM(v,y,e,t)||$e;C&&S&&h.setSymlinkedDirectory(S,{real:C,realPath:xi(C,e,t)})}}function bM(e,t,r,a){let _=Ai(Pa(e,r)),p=Ai(Pa(t,r)),d=!1;for(;_.length>=2&&p.length>=2&&!zb(_[_.length-2],a)&&!zb(p[p.length-2],a)&&a(_[_.length-1])===a(p[p.length-1]);)_.pop(),p.pop(),d=!0;return d?[Uo(_),Uo(p)]:void 0}function zb(e,t){return e!==void 0&&(t(e)==="node_modules"||Fr(e,"@"))}function vM(e){return dg(e.charCodeAt(0))?e.slice(1):void 0}function TM(e,t,r){let a=Fv(e,t,r);return a===void 0?void 0:vM(a)}function SM(e){return e.replace(Ad,xM)}function xM(e){return"\\"+e}function Ff(e,t,r){let a=V2(e,t,r);return!a||!a.length?void 0:`^(${a.map(d=>`(${d})`).join("|")})${r==="exclude"?"($|/)":"$"}`}function V2(e,t,r){if(!(e===void 0||e.length===0))return Bo(e,a=>a&&US(a,t,r,e6[r]))}function BS(e){return!/[.*?]/.test(e)}function wM(e,t,r){let a=e&&US(e,t,r,e6[r]);return a&&`^(${a})${r==="exclude"?"($|/)":"$"}`}function US(e,t,r,{singleAsteriskRegexFragment:a,doubleAsteriskRegexFragment:_,replaceWildcardCharacter:p}){let d="",h=!1,l=Vd(e,t),v=ka(l);if(r!=="exclude"&&v==="**")return;l[0]=S_(l[0]),BS(v)&&l.push("**","*");let y=0;for(let C of l){if(C==="**")d+=_;else if(r==="directories"&&(d+="(",y++),h&&(d+=fn),r!=="exclude"){let S="";C.charCodeAt(0)===42?(S+="([^./]"+a+")?",C=C.substr(1)):C.charCodeAt(0)===63&&(S+="[^./]",C=C.substr(1)),S+=C.replace(Ad,p),S!==C&&(d+=Uf),d+=S}else d+=C.replace(Ad,p);h=!0}for(;y>0;)d+=")?",y--;return d}function Xh(e,t){return e==="*"?t:e==="?"?"[^/]":"\\"+e}function qS(e,t,r,a,_){e=pn(e),_=pn(_);let p=hr(_,e);return{includeFilePatterns:Aa(V2(r,p,"files"),d=>`^${d}$`),includeFilePattern:Ff(r,p,"files"),includeDirectoryPattern:Ff(r,p,"directories"),excludePattern:Ff(t,p,"exclude"),basePaths:EM(e,r,a)}}function Bf(e,t){return new RegExp(e,t?"":"i")}function CM(e,t,r,a,_,p,d,h,l){e=pn(e),p=pn(p);let v=qS(e,r,a,_,p),y=v.includeFilePatterns&&v.includeFilePatterns.map(ue=>Bf(ue,_)),C=v.includeDirectoryPattern&&Bf(v.includeDirectoryPattern,_),S=v.excludePattern&&Bf(v.excludePattern,_),k=y?y.map(()=>[]):[[]],L=new Map,G=Ud(_);for(let ue of v.basePaths)K(ue,hr(p,ue),d);return o_(k);function K(ue,Y,B){let ae=G(l(Y));if(L.has(ae))return;L.set(ae,!0);let{files:Ce,directories:Ze}=h(ue);for(let qe of Xf(Ce,Ci)){let rt=hr(ue,qe),it=hr(Y,qe);if(!(t&&!ei(rt,t))&&!(S&&S.test(it)))if(!y)k[0].push(rt);else{let Ir=_l(y,ar=>ar.test(it));Ir!==-1&&k[Ir].push(rt)}}if(!(B!==void 0&&(B--,B===0)))for(let qe of Xf(Ze,Ci)){let rt=hr(ue,qe),it=hr(Y,qe);(!C||C.test(it))&&(!S||!S.test(it))&&K(rt,it,B)}}}function EM(e,t,r){let a=[e];if(t){let _=[];for(let p of t){let d=v_(p)?p:pn(hr(e,p));_.push(AM(d))}_.sort(_g(!r));for(let p of _)so(a,d=>!Yv(d,p,e,!r))&&a.push(p)}return a}function AM(e){let t=bv(e,kx);return t<0?$v(e)?S_($i(e)):e:e.substring(0,e.lastIndexOf(fn,t))}function zS(e,t){return t||WS(e)||3}function WS(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}function VS(e,t){let r=e&&FS(e);if(!t||t.length===0)return r?Dl:Ro;let a=r?Dl:Ro,_=o_(a);return[...a,...Za(t,d=>d.scriptKind===7||r&&kM(d.scriptKind)&&_.indexOf(d.extension)===-1?[d.extension]:void 0)]}function HS(e,t){return!e||!jS(e)?t:t===Dl?Ix:t===Ro?Dx:[...t,[".json"]]}function kM(e){return e===1||e===2}function H2(e){return mt(r6,t=>La(e,t))}function G2(e){return mt(t6,t=>La(e,t))}function GS({imports:e},t=ug(H2,G2)){return ng(e,({text:r})=>rs(r)&&!ei(r,Cm)?t(r):void 0)||!1}function DM(e,t,r,a){if(e==="js"||t===99)return shouldAllowImportingTsExtension(r)&&_()!==2?3:2;if(e==="minimal")return 0;if(e==="index")return 1;if(!shouldAllowImportingTsExtension(r))return GS(a)?2:0;return _();function _(){let p=!1,d=a.imports.length?a.imports.map(h=>h.text):c2(a)?PM(a).map(h=>h.arguments[0].text):$e;for(let h of d)if(rs(h)){if(ei(h,Cm))continue;if(G2(h))return 3;H2(h)&&(p=!0)}return p?2:0}}function PM(e){let t=0,r;for(let a of e.statements){if(t>3)break;aT(a)?r=y_(r,a.declarationList.declarations.map(_=>_.initializer)):ou(a)&&Wl(a.expression,!0)?r=xt(r,a.expression):t++}return r||$e}function IM(e,t,r){if(!e)return!1;let a=VS(t,r);for(let _ of o_(HS(t,a)))if(La(e,_))return!0;return!1}function Wb(e){let t=e.match(/\//g);return t?t.length:0}function NM(e,t){return kr(Wb(e),Wb(t))}function Al(e){for(let t of Em){let r=XS(e,t);if(r!==void 0)return r}return e}function XS(e,t){return La(e,t)?$S(e,t):void 0}function $S(e,t){return e.substring(0,e.length-t.length)}function OM(e,t){return Qv(e,t,Em,!1)}function QS(e){let t=e.indexOf("*");return t===-1?e:e.indexOf("*",t+1)!==-1?void 0:{prefix:e.substr(0,t),suffix:e.substr(t+1)}}function MM(e){return Za(sg(e),t=>QS(t))}function Oa(e){return!(e>=0)}function YS(e){return e===".ts"||e===".tsx"||e===".d.ts"||e===".cts"||e===".mts"||e===".d.mts"||e===".d.cts"||Fr(e,".d.")&&ts(e,".ts")}function LM(e){return YS(e)||e===".json"}function rl(e){let t=X2(e);return t!==void 0?t:N.fail(`File ${e} has unknown extension.`)}function JM(e){return X2(e)!==void 0}function X2(e){return Yr(Em,t=>La(e,t))}function RM(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs}function jM(e,t){let r=[];for(let a of e){if(a===t)return t;b_(a)||r.push(a)}return jv(r,a=>a,t)}function FM(e,t){let r=e.indexOf(t);return N.assert(r!==-1),e.slice(r)}function nl(e,...t){return t.length&&(e.relatedInformation||(e.relatedInformation=[]),N.assert(e.relatedInformation!==$e,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...t)),e}function BM(e,t){N.assert(e.length!==0);let r=t(e[0]),a=r;for(let _=1;_a&&(a=p)}return{min:r,max:a}}function UM(e){return{pos:Go(e),end:e.end}}function qM(e,t){let r=t.pos-1,a=Math.min(e.text.length,Nt(e.text,t.end)+1);return{pos:r,end:a}}function zM(e,t,r){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib||r.isSourceOfProjectReferenceRedirect(e.fileName)}function $2(e,t){return e===t||typeof e=="object"&&e!==null&&typeof t=="object"&&t!==null&&kv(e,t,$2)}function xm(e){let 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:let v=e.length-1,y=0;for(;e.charCodeAt(y)===48;)y++;return e.slice(y,v)||"0"}let r=2,a=e.length-1,_=(a-r)*t,p=new Uint16Array((_>>>4)+(_&15?1:0));for(let v=a-1,y=0;v>=r;v--,y+=t){let C=y>>>4,S=e.charCodeAt(v),L=(S<=57?S-48:10+S-(S<=70?65:97))<<(y&15);p[C]|=L;let G=L>>>16;G&&(p[C+1]|=G)}let d="",h=p.length-1,l=!0;for(;l;){let v=0;l=!1;for(let y=h;y>=0;y--){let C=v<<16|p[y],S=C/10|0;p[y]=S,v=C-S*10,S&&!l&&(h=y,l=!0)}d=v+d}return d}function Q2({negative:e,base10Value:t}){return(e&&t!=="0"?"-":"")+t}function WM(e){if(ZS(e,!1))return KS(e)}function KS(e){let t=e.startsWith("-"),r=xm(`${t?e.slice(1):e}n`);return{negative:t,base10Value:r}}function ZS(e,t){if(e==="")return!1;let r=ns(99,!1),a=!0;r.setOnError(()=>a=!1),r.setText(e+"n");let _=r.scan(),p=_===41;p&&(_=r.scan());let d=r.getTokenFlags();return a&&_===10&&r.getTokenEnd()===e.length+1&&!(d&512)&&(!t||e===Q2({negative:p,base10Value:xm(r.getTokenValue())}))}function VM(e){return!!(e.flags&33554432)||eT(e)||XM(e)||GM(e)||!(_2(e)||HM(e))}function HM(e){return Ee(e)&&_u(e.parent)&&e.parent.name===e}function GM(e){for(;e.kind===80||e.kind===211;)e=e.parent;if(e.kind!==167)return!1;if(gr(e.parent,256))return!0;let t=e.parent.parent.kind;return t===264||t===187}function XM(e){if(e.kind!==80)return!1;let t=Kr(e.parent,r=>{switch(r.kind){case 298:return!0;case 211:case 233:return!1;default:return"quit"}});return(t==null?void 0:t.token)===119||(t==null?void 0:t.parent.kind)===264}function $M(e){return R_(e)&&Ee(e.typeName)}function QM(e,t=_o){if(e.length<2)return!0;let r=e[0];for(let a=1,_=e.length;a<_;a++){let p=e[a];if(!t(r,p))return!1}return!0}function Cd(e,t){return e.pos=t,e}function ex(e,t){return e.end=t,e}function Ya(e,t,r){return ex(Cd(e,t),r)}function Ed(e,t,r){return Ya(e,t,t+r)}function YM(e,t){return e&&(e.flags=t),e}function Xi(e,t){return e&&t&&(e.parent=t),e}function a_(e,t){if(e)for(let r of e)Xi(r,t);return e}function tx(e,t){if(!e)return e;return eg(e,zg(e)?r:_),e;function r(p,d){if(t&&p.parent===d)return"skip";Xi(p,d)}function a(p){if(Wi(p))for(let d of p.jsDoc)r(d,p),eg(d,r)}function _(p,d){return r(p,d)||a(p)}}function KM(e){return!Im(e)}function ZM(e){return iu(e)&&so(e.elements,KM)}function eL(e){for(N.assertIsDefined(e.parent);;){let t=e.parent;if(is(t)){e=t;continue}if(ou(t)||h6(t)||c8(t)&&(t.initializer===e||t.incrementor===e))return!0;if(F_(t)){if(e!==ka(t.elements))return!0;e=t;continue}if(Ct(t)&&t.operatorToken.kind===28){if(e===t.left)return!0;e=t;continue}return!1}}function rx(e){return mt(ignoredPaths,t=>eo(e,t))}function tL(e){if(!e.parent)return;switch(e.kind){case 168:let{parent:r}=e;return r.kind===195?void 0:r.typeParameters;case 169:return e.parent.parameters;case 204:return e.parent.templateSpans;case 239:return e.parent.templateSpans;case 170:{let{parent:a}=e;return U8(a)?a.modifiers:void 0}case 298:return e.parent.heritageClauses}let{parent:t}=e;if(Wg(e))return P6(e.parent)?void 0:e.parent.tags;switch(t.kind){case 187:case 264:return jg(e)?t.members:void 0;case 192:case 193:return t.types;case 189:case 209:case 361:case 275:case 279:return t.elements;case 210:case 292:return t.properties;case 213:case 214:return g0(e)?t.typeArguments:t.expression===e?void 0:t.arguments;case 284:case 288:return S3(e)?t.children:void 0;case 286:case 285:return g0(e)?t.typeArguments:void 0;case 241:case 296:case 297:case 268:return t.statements;case 269:return t.clauses;case 263:case 231:return no(e)?t.members:void 0;case 266:return y8(e)?t.members:void 0;case 312:return t.statements}}function rL(e){if(!e.typeParameters){if(mt(e.parameters,t=>!I2(t)))return!0;if(e.kind!==219){let t=g_(e.parameters);if(!(t&&Xl(t)))return!0}}return!1}function nL(e){return e==="Infinity"||e==="-Infinity"||e==="NaN"}function nx(e){return e.kind===260&&e.parent.kind===299}function iL(e){let t=e.valueDeclaration&&ym(e.valueDeclaration);return!!t&&(Ma(t)||nx(t))}function aL(e){return e.kind===218||e.kind===219}function oL(e){return e.replace(/\$/gm,()=>"\\$")}function ix(e){return(+e).toString()===e}function sL(e,t,r,a){return Cg(e,t)?Ln.createIdentifier(e):!a&&ix(e)&&+e>=0?Ln.createNumericLiteral(+e):Ln.createStringLiteral(e,!!r)}function ax(e){return!!(e.flags&262144&&e.isThisType)}function _L(e){let t=0,r=0,a=0,_=0,p;(v=>{v[v.BeforeNodeModules=0]="BeforeNodeModules",v[v.NodeModules=1]="NodeModules",v[v.Scope=2]="Scope",v[v.PackageContent=3]="PackageContent"})(p||(p={}));let d=0,h=0,l=0;for(;h>=0;)switch(d=h,h=e.indexOf("/",d+1),l){case 0:e.indexOf(nodeModulesPathPart,d)===d&&(t=d,r=h,l=1);break;case 1:case 2:l===1&&e.charAt(d+1)==="@"?l=2:(a=h,l=3);break;case 3:e.indexOf(nodeModulesPathPart,d)===d?l=1:l=3;break}return _=d,l>1?{topLevelNodeModulesIndex:t,topLevelPackageNameIndex:r,packageRootIndex:a,fileNameIndex:_}:void 0}function cL(e){var t;return e.kind===348?(t=e.typeExpression)==null?void 0:t.type:e.type}function ox(e){switch(e.kind){case 168:case 263:case 264:case 265:case 266:case 353:case 345:case 347:return!0;case 273:return e.isTypeOnly;case 276:case 281:return e.parent.parent.isTypeOnly;default:return!1}}function lL(e){return S6(e)||as(e)||os(e)||Yo(e)||su(e)||ox(e)||Yi(e)&&!Gg(e)&&!lm(e)}function sx(e){if(!Ig(e))return!1;let{isBracketed:t,typeExpression:r}=e;return t||!!r&&r.type.kind===323}function uL(e,t){if(e.length===0)return!1;let r=e.charCodeAt(0);return r===35?e.length>1&&un(e.charCodeAt(1),t):un(r,t)}function _x(e){var t;return((t=getSnippetElement(e))==null?void 0:t.kind)===0}function cx(e){return Wt(e)&&(e.type&&e.type.kind===323||Zd(e).some(({isBracketed:t,typeExpression:r})=>t||!!r&&r.type.kind===323))}function pL(e){switch(e.kind){case 172:case 171:return!!e.questionToken;case 169:return!!e.questionToken||cx(e);case 355:case 348:return sx(e);default:return!1}}function fL(e){let t=e.kind;return(t===211||t===212)&&jo(e.expression)}function dL(e){return Wt(e)&&is(e)&&Wi(e)&&!!kg(e)}function mL(e){return N.checkDefined(lx(e))}function lx(e){let t=kg(e);return t&&t.typeExpression&&t.typeExpression.type}function hL(e){return Ee(e)?e.escapedText:Yl(e)}function yL(e){return Ee(e)?Ot(e):Kl(e)}function gL(e){let t=e.kind;return t===80||t===295}function Yl(e){return`${e.namespace.escapedText}:${Ot(e.name)}`}function Kl(e){return`${Ot(e.namespace)}:${Ot(e.name)}`}function bL(e){return Ee(e)?Ot(e):Kl(e)}function vL(e){return!!(e.flags&8576)}function TL(e){return e.flags&8192?e.escapedName:e.flags&384?Mn(""+e.value):N.fail()}var ux,wm,px,fx,Zs,F0,Y2,dx,mx,K2,hx,yx,B0,U0,q0,z0,gx,bx,vx,Tx,Sx,W0,xx,wx,Cx,Po,qi,Ex,Ax,wt,Z2,kl,Ad,kx,V0,Uf,$h,Qh,Yh,e6,Ro,t6,Dx,Px,H0,r6,Dl,Ix,n6,Nx,Cm,G0,Em,Ox,SL=Vt({"src/compiler/utilities.ts"(){"use strict";Dr(),ux=[],wm="tslib",px=160,fx=1e6,Zs=Bk(),F0=(e=>(e[e.None=0]="None",e[e.NeverAsciiEscape=1]="NeverAsciiEscape",e[e.JsxAttributeEscape=2]="JsxAttributeEscape",e[e.TerminateUnterminatedLiterals=4]="TerminateUnterminatedLiterals",e[e.AllowNumericSeparator=8]="AllowNumericSeparator",e))(F0||{}),Y2=/^(\/\/\/\s*/,dx=/^(\/\/\/\s*/,mx=/^(\/\/\/\s*/,K2=/^(\/\/\/\s*/,hx=/^\/\/\/\s*/,yx=/^(\/\/\/\s*/,B0=(e=>(e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound",e))(B0||{}),U0=(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))(U0||{}),q0=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(q0||{}),z0=(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))(z0||{}),gx=/\$\{/g,bx=/[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,vx=/[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,Tx=/\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g,Sx=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","\x85":"\\u0085","\r\n":"\\r\\n"})),W0=/[^\u0000-\u007F]/g,xx=/["\u0000-\u001f\u2028\u2029\u0085]/g,wx=/['\u0000-\u001f\u2028\u2029\u0085]/g,Cx=new Map(Object.entries({'"':""","'":"'"})),Po=[""," "],qi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ex=`\r -`,Ax=` -`,wt={getNodeConstructor:()=>Gh,getTokenConstructor:()=>BO,getIdentifierConstructor:()=>UO,getPrivateIdentifierConstructor:()=>Gh,getSourceFileConstructor:()=>Gh,getSymbolConstructor:()=>RO,getTypeConstructor:()=>jO,getSignatureConstructor:()=>FO,getSourceMapSourceConstructor:()=>qO},Z2=[],Ad=/[^\w\s/]/g,kx=[42,63],V0=["node_modules","bower_components","jspm_packages"],Uf=`(?!(${V0.join("|")})(/|$))`,$h={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${Uf}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Xh(e,$h.singleAsteriskRegexFragment)},Qh={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${Uf}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Xh(e,Qh.singleAsteriskRegexFragment)},Yh={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:e=>Xh(e,Yh.singleAsteriskRegexFragment)},e6={files:$h,directories:Qh,exclude:Yh},Ro=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],t6=o_(Ro),Dx=[...Ro,[".json"]],Px=[".d.ts",".d.cts",".d.mts",".cts",".mts",".ts",".tsx"],H0=[[".js",".jsx"],[".mjs"],[".cjs"]],r6=o_(H0),Dl=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],Ix=[...Dl,[".json"]],n6=[".d.ts",".d.cts",".d.mts"],Nx=[".ts",".cts",".mts",".tsx"],Cm=[".mts",".d.mts",".mjs",".cts",".d.cts",".cjs"],G0=(e=>(e[e.Minimal=0]="Minimal",e[e.Index=1]="Index",e[e.JsExtension=2]="JsExtension",e[e.TsExtension=3]="TsExtension",e))(G0||{}),Em=[".d.ts",".d.mts",".d.cts",".mjs",".mts",".cjs",".cts",".ts",".js",".tsx",".jsx",".json"],Ox={files:$e,directories:$e}}});function Mx(){let e,t,r,a,_;return{createBaseSourceFileNode:p,createBaseIdentifierNode:d,createBasePrivateIdentifierNode:h,createBaseTokenNode:l,createBaseNode:v};function p(y){return new(_||(_=wt.getSourceFileConstructor()))(y,-1,-1)}function d(y){return new(r||(r=wt.getIdentifierConstructor()))(y,-1,-1)}function h(y){return new(a||(a=wt.getPrivateIdentifierConstructor()))(y,-1,-1)}function l(y){return new(t||(t=wt.getTokenConstructor()))(y,-1,-1)}function v(y){return new(e||(e=wt.getNodeConstructor()))(y,-1,-1)}}var xL=Vt({"src/compiler/factory/baseNodeFactory.ts"(){"use strict";Dr()}}),i6,wL=Vt({"src/compiler/factory/parenthesizerRules.ts"(){"use strict";Dr(),i6={getParenthesizeLeftSideOfBinaryForOperator:e=>bt,getParenthesizeRightSideOfBinaryForOperator:e=>bt,parenthesizeLeftSideOfBinary:(e,t)=>t,parenthesizeRightSideOfBinary:(e,t,r)=>r,parenthesizeExpressionOfComputedPropertyName:bt,parenthesizeConditionOfConditionalExpression:bt,parenthesizeBranchOfConditionalExpression:bt,parenthesizeExpressionOfExportDefault:bt,parenthesizeExpressionOfNew:e=>gi(e,Lo),parenthesizeLeftSideOfAccess:e=>gi(e,Lo),parenthesizeOperandOfPostfixUnary:e=>gi(e,Lo),parenthesizeOperandOfPrefixUnary:e=>gi(e,h3),parenthesizeExpressionsOfCommaDelimitedList:e=>gi(e,va),parenthesizeExpressionForDisallowedComma:bt,parenthesizeExpressionOfExpressionStatement:bt,parenthesizeConciseBodyOfArrowFunction:bt,parenthesizeCheckTypeOfConditionalType:bt,parenthesizeExtendsTypeOfConditionalType:bt,parenthesizeConstituentTypesOfUnionType:e=>gi(e,va),parenthesizeConstituentTypeOfUnionType:bt,parenthesizeConstituentTypesOfIntersectionType:e=>gi(e,va),parenthesizeConstituentTypeOfIntersectionType:bt,parenthesizeOperandOfTypeOperator:bt,parenthesizeOperandOfReadonlyTypeOperator:bt,parenthesizeNonArrayTypeOfPostfixType:bt,parenthesizeElementTypesOfTupleType:e=>gi(e,va),parenthesizeElementTypeOfTupleType:bt,parenthesizeTypeOfOptionalType:bt,parenthesizeTypeArguments:e=>e&&gi(e,va),parenthesizeLeadingTypeArgument:bt}}}),CL=()=>{},Lx=()=>new Proxy({},{get:()=>()=>{}});function EL(e){a6.push(e)}function kd(e,t){let r=e&8?AL:kL,a=ry(()=>e&1?i6:createParenthesizerRules(ue)),_=ry(()=>e&2?nullNodeConverters:Lx(ue)),p=Nn(n=>(o,s)=>nc(o,n,s)),d=Nn(n=>o=>qa(n,o)),h=Nn(n=>o=>Ts(o,n)),l=Nn(n=>()=>U1(n)),v=Nn(n=>o=>Nc(n,o)),y=Nn(n=>(o,s)=>q1(n,o,s)),C=Nn(n=>(o,s)=>Ic(n,o,s)),S=Nn(n=>(o,s)=>Ep(n,o,s)),k=Nn(n=>(o,s)=>jp(n,o,s)),L=Nn(n=>(o,s,u)=>th(n,o,s,u)),G=Nn(n=>(o,s,u)=>Fp(n,o,s,u)),K=Nn(n=>(o,s,u,g)=>rh(n,o,s,u,g)),ue={get parenthesizer(){return a()},get converters(){return _()},baseFactory:t,flags:e,createNodeArray:Y,createNumericLiteral:Ze,createBigIntLiteral:qe,createStringLiteral:it,createStringLiteralFromNode:Ir,createRegularExpressionLiteral:ar,createLiteralLikeNode:ci,createIdentifier:Ge,createTempVariable:Gt,createLoopVariable:Ur,createUniqueName:Xt,getGeneratedNameForNode:Tn,createPrivateIdentifier:sr,createUniquePrivateName:St,getGeneratedPrivateNameForNode:xn,createToken:vt,createSuper:ct,createThis:Ut,createNull:fr,createTrue:ht,createFalse:wn,createModifier:Tt,createModifiersFromModifierFlags:Or,createQualifiedName:pt,updateQualifiedName:Mr,createComputedPropertyName:at,updateComputedPropertyName:er,createTypeParameterDeclaration:Qt,updateTypeParameterDeclaration:tn,createParameterDeclaration:Bn,updateParameterDeclaration:Un,createDecorator:rn,updateDecorator:nn,createPropertySignature:Di,updatePropertySignature:qn,createPropertyDeclaration:q,updatePropertyDeclaration:oe,createMethodSignature:ge,updateMethodSignature:Se,createMethodDeclaration:nt,updateMethodDeclaration:z,createConstructorDeclaration:Le,updateConstructorDeclaration:lt,createGetAccessorDeclaration:jt,updateGetAccessorDeclaration:qr,createSetAccessorDeclaration:Cn,updateSetAccessorDeclaration:zn,createCallSignature:ia,updateCallSignature:Wn,createConstructSignature:En,updateConstructSignature:Ii,createIndexSignature:aa,updateIndexSignature:Vn,createClassStaticBlockDeclaration:ee,updateClassStaticBlockDeclaration:xe,createTemplateLiteralTypeSpan:Sr,updateTemplateLiteralTypeSpan:Je,createKeywordTypeNode:oa,createTypePredicateNode:Mt,updateTypePredicateNode:Lr,createTypeReferenceNode:j,updateTypeReferenceNode:T,createFunctionTypeNode:x,updateFunctionTypeNode:f,createConstructorTypeNode:Q,updateConstructorTypeNode:be,createTypeQueryNode:we,updateTypeQueryNode:et,createTypeLiteralNode:Ye,updateTypeLiteralNode:Ke,createArrayTypeNode:It,updateArrayTypeNode:qt,createTupleTypeNode:_r,updateTupleTypeNode:Te,createNamedTupleMember:ft,updateNamedTupleMember:An,createOptionalTypeNode:Et,updateOptionalTypeNode:H,createRestTypeNode:Fa,updateRestTypeNode:Ie,createUnionTypeNode:an,updateUnionTypeNode:Ba,createIntersectionTypeNode:kn,updateIntersectionTypeNode:je,createConditionalTypeNode:dt,updateConditionalTypeNode:li,createInferTypeNode:Hn,updateInferTypeNode:t1,createImportTypeNode:ui,updateImportTypeNode:fs,createParenthesizedType:xr,updateParenthesizedType:Ft,createThisTypeNode:M,createTypeOperatorNode:Jr,updateTypeOperatorNode:sa,createIndexedAccessTypeNode:Ni,updateIndexedAccessTypeNode:G_,createMappedTypeNode:Lt,updateMappedTypeNode:Yt,createLiteralTypeNode:Oi,updateLiteralTypeNode:n1,createTemplateLiteralType:dr,updateTemplateLiteralType:r1,createObjectBindingPattern:Tu,updateObjectBindingPattern:Ua,createArrayBindingPattern:Su,updateArrayBindingPattern:X_,createBindingElement:_a,updateBindingElement:xu,createArrayLiteralExpression:$_,updateArrayLiteralExpression:wu,createObjectLiteralExpression:ds,updateObjectLiteralExpression:i1,createPropertyAccessExpression:e&4?(n,o)=>setEmitFlags(Mi(n,o),262144):Mi,updatePropertyAccessExpression:Q_,createPropertyAccessChain:e&4?(n,o,s)=>setEmitFlags(hs(n,o,s),262144):hs,updatePropertyAccessChain:ys,createElementAccessExpression:Y_,updateElementAccessExpression:Eu,createElementAccessChain:Au,updateElementAccessChain:ku,createCallExpression:fo,updateCallExpression:a1,createCallChain:zr,updateCallChain:gs,createNewExpression:bs,updateNewExpression:Du,createTaggedTemplateExpression:Pu,updateTaggedTemplateExpression:o1,createTypeAssertion:Iu,updateTypeAssertion:Nu,createParenthesizedExpression:K_,updateParenthesizedExpression:Ou,createFunctionExpression:Z_,updateFunctionExpression:Mu,createArrowFunction:ec,updateArrowFunction:tc,createDeleteExpression:Lu,updateDeleteExpression:Wr,createTypeOfExpression:vs,updateTypeOfExpression:pi,createVoidExpression:rc,updateVoidExpression:ca,createAwaitExpression:la,updateAwaitExpression:s1,createPrefixUnaryExpression:qa,updatePrefixUnaryExpression:_1,createPostfixUnaryExpression:Ts,updatePostfixUnaryExpression:c1,createBinaryExpression:nc,updateBinaryExpression:Ru,createConditionalExpression:ju,updateConditionalExpression:fi,createTemplateExpression:ic,updateTemplateExpression:l1,createTemplateHead:oc,createTemplateMiddle:u1,createTemplateTail:Bu,createNoSubstitutionTemplateLiteral:p1,createTemplateLiteralLikeNode:Li,createYieldExpression:Uu,updateYieldExpression:f1,createSpreadElement:qu,updateSpreadElement:d1,createClassExpression:xs,updateClassExpression:sc,createOmittedExpression:m1,createExpressionWithTypeArguments:Vr,updateExpressionWithTypeArguments:_c,createAsExpression:zu,updateAsExpression:Wu,createNonNullExpression:cc,updateNonNullExpression:Vu,createSatisfiesExpression:lc,updateSatisfiesExpression:Dn,createNonNullChain:Hu,updateNonNullChain:ws,createMetaProperty:Gn,updateMetaProperty:Cs,createTemplateSpan:uc,updateTemplateSpan:Gu,createSemicolonClassElement:h1,createBlock:ua,updateBlock:y1,createVariableStatement:Xu,updateVariableStatement:pc,createEmptyStatement:fc,createExpressionStatement:Es,updateExpressionStatement:$u,createIfStatement:Qu,updateIfStatement:Yu,createDoStatement:Ku,updateDoStatement:g1,createWhileStatement:Zu,updateWhileStatement:ep,createForStatement:dc,updateForStatement:b1,createForInStatement:tp,updateForInStatement:v1,createForOfStatement:rp,updateForOfStatement:T1,createContinueStatement:mc,updateContinueStatement:np,createBreakStatement:hc,updateBreakStatement:S1,createReturnStatement:ip,updateReturnStatement:ap,createWithStatement:yc,updateWithStatement:op,createSwitchStatement:pa,updateSwitchStatement:x1,createLabeledStatement:sp,updateLabeledStatement:_p,createThrowStatement:cp,updateThrowStatement:w1,createTryStatement:lp,updateTryStatement:up,createDebuggerStatement:pp,createVariableDeclaration:As,updateVariableDeclaration:C1,createVariableDeclarationList:gc,updateVariableDeclarationList:E1,createFunctionDeclaration:bc,updateFunctionDeclaration:fp,createClassDeclaration:vc,updateClassDeclaration:Tc,createInterfaceDeclaration:dp,updateInterfaceDeclaration:gt,createTypeAliasDeclaration:Ji,updateTypeAliasDeclaration:Sc,createEnumDeclaration:Ri,updateEnumDeclaration:mp,createModuleDeclaration:Jt,updateModuleDeclaration:ji,createModuleBlock:tr,updateModuleBlock:k1,createCaseBlock:hp,updateCaseBlock:D1,createNamespaceExportDeclaration:xc,updateNamespaceExportDeclaration:P1,createImportEqualsDeclaration:yp,updateImportEqualsDeclaration:gp,createImportDeclaration:bp,updateImportDeclaration:vp,createImportClause:wc,updateImportClause:Tp,createAssertClause:Sp,updateAssertClause:ks,createAssertEntry:Cc,updateAssertEntry:xp,createImportTypeAssertionContainer:Ec,updateImportTypeAssertionContainer:N1,createNamespaceImport:Ds,updateNamespaceImport:O1,createNamespaceExport:Ac,updateNamespaceExport:M1,createNamedImports:wp,updateNamedImports:L1,createImportSpecifier:Cp,updateImportSpecifier:J1,createExportAssignment:Ps,updateExportAssignment:Fi,createExportDeclaration:kc,updateExportDeclaration:Dc,createNamedExports:Ns,updateNamedExports:R1,createExportSpecifier:fa,updateExportSpecifier:j1,createMissingDeclaration:F1,createExternalModuleReference:Pc,updateExternalModuleReference:B1,get createJSDocAllType(){return l(319)},get createJSDocUnknownType(){return l(320)},get createJSDocNonNullableType(){return C(322)},get updateJSDocNonNullableType(){return S(322)},get createJSDocNullableType(){return C(321)},get updateJSDocNullableType(){return S(321)},get createJSDocOptionalType(){return v(323)},get updateJSDocOptionalType(){return y(323)},get createJSDocVariadicType(){return v(325)},get updateJSDocVariadicType(){return y(325)},get createJSDocNamepathType(){return v(326)},get updateJSDocNamepathType(){return y(326)},createJSDocFunctionType:Ap,updateJSDocFunctionType:z1,createJSDocTypeLiteral:kp,updateJSDocTypeLiteral:W1,createJSDocTypeExpression:Dp,updateJSDocTypeExpression:V1,createJSDocSignature:Pp,updateJSDocSignature:H1,createJSDocTemplateTag:ho,updateJSDocTemplateTag:Os,createJSDocTypedefTag:Ms,updateJSDocTypedefTag:Ip,createJSDocParameterTag:Oc,updateJSDocParameterTag:Mc,createJSDocPropertyTag:Np,updateJSDocPropertyTag:Op,createJSDocCallbackTag:Mp,updateJSDocCallbackTag:G1,createJSDocOverloadTag:Lc,updateJSDocOverloadTag:X1,createJSDocAugmentsTag:Jc,updateJSDocAugmentsTag:$1,createJSDocImplementsTag:Ls,updateJSDocImplementsTag:eh,createJSDocSeeTag:Rc,updateJSDocSeeTag:yo,createJSDocNameReference:Lp,updateJSDocNameReference:Wa,createJSDocMemberName:go,updateJSDocMemberName:Q1,createJSDocLink:Jp,updateJSDocLink:Y1,createJSDocLinkCode:Rp,updateJSDocLinkCode:K1,createJSDocLinkPlain:jc,updateJSDocLinkPlain:Z1,get createJSDocTypeTag(){return G(351)},get updateJSDocTypeTag(){return K(351)},get createJSDocReturnTag(){return G(349)},get updateJSDocReturnTag(){return K(349)},get createJSDocThisTag(){return G(350)},get updateJSDocThisTag(){return K(350)},get createJSDocAuthorTag(){return k(337)},get updateJSDocAuthorTag(){return L(337)},get createJSDocClassTag(){return k(339)},get updateJSDocClassTag(){return L(339)},get createJSDocPublicTag(){return k(340)},get updateJSDocPublicTag(){return L(340)},get createJSDocPrivateTag(){return k(341)},get updateJSDocPrivateTag(){return L(341)},get createJSDocProtectedTag(){return k(342)},get updateJSDocProtectedTag(){return L(342)},get createJSDocReadonlyTag(){return k(343)},get updateJSDocReadonlyTag(){return L(343)},get createJSDocOverrideTag(){return k(344)},get updateJSDocOverrideTag(){return L(344)},get createJSDocDeprecatedTag(){return k(338)},get updateJSDocDeprecatedTag(){return L(338)},get createJSDocThrowsTag(){return G(356)},get updateJSDocThrowsTag(){return K(356)},get createJSDocSatisfiesTag(){return G(357)},get updateJSDocSatisfiesTag(){return K(357)},createJSDocEnumTag:Up,updateJSDocEnumTag:ih,createJSDocUnknownTag:Bp,updateJSDocUnknownTag:nh,createJSDocText:qp,updateJSDocText:ah,createJSDocComment:Js,updateJSDocComment:oh,createJsxElement:Fc,updateJsxElement:zp,createJsxSelfClosingElement:Wp,updateJsxSelfClosingElement:Rs,createJsxOpeningElement:Bc,updateJsxOpeningElement:sh,createJsxClosingElement:Vp,updateJsxClosingElement:_h,createJsxFragment:js,createJsxText:Fs,updateJsxText:Gp,createJsxOpeningFragment:Uc,createJsxJsxClosingFragment:wr,updateJsxFragment:Hp,createJsxAttribute:qc,updateJsxAttribute:Xp,createJsxAttributes:$p,updateJsxAttributes:Qp,createJsxSpreadAttribute:Yp,updateJsxSpreadAttribute:ch,createJsxExpression:bo,updateJsxExpression:lh,createJsxNamespacedName:Kp,updateJsxNamespacedName:uh,createCaseClause:Zp,updateCaseClause:zc,createDefaultClause:Va,updateDefaultClause:ph,createHeritageClause:Bs,updateHeritageClause:ef,createCatchClause:tf,updateCatchClause:vo,createPropertyAssignment:Us,updatePropertyAssignment:fh,createShorthandPropertyAssignment:Wc,updateShorthandPropertyAssignment:rf,createSpreadAssignment:da,updateSpreadAssignment:mh,createEnumMember:af,updateEnumMember:hh,createSourceFile:yh,updateSourceFile:bh,createRedirectedSourceFile:Vc,createBundle:sf,updateBundle:_f,createUnparsedSource:Gc,createUnparsedPrologue:vh,createUnparsedPrepend:cf,createUnparsedTextLike:Th,createUnparsedSyntheticReference:Sh,createInputFiles:qs,createSyntheticExpression:lf,createSyntaxList:xh,createNotEmittedStatement:wh,createPartiallyEmittedExpression:uf,updatePartiallyEmittedExpression:pf,createCommaListExpression:zs,updateCommaListExpression:ff,createSyntheticReferenceExpression:$c,updateSyntheticReferenceExpression:Eh,cloneNode:Qc,get createComma(){return p(28)},get createAssignment(){return p(64)},get createLogicalOr(){return p(57)},get createLogicalAnd(){return p(56)},get createBitwiseOr(){return p(52)},get createBitwiseXor(){return p(53)},get createBitwiseAnd(){return p(51)},get createStrictEquality(){return p(37)},get createStrictInequality(){return p(38)},get createEquality(){return p(35)},get createInequality(){return p(36)},get createLessThan(){return p(30)},get createLessThanEquals(){return p(33)},get createGreaterThan(){return p(32)},get createGreaterThanEquals(){return p(34)},get createLeftShift(){return p(48)},get createRightShift(){return p(49)},get createUnsignedRightShift(){return p(50)},get createAdd(){return p(40)},get createSubtract(){return p(41)},get createMultiply(){return p(42)},get createDivide(){return p(44)},get createModulo(){return p(45)},get createExponent(){return p(43)},get createPrefixPlus(){return d(40)},get createPrefixMinus(){return d(41)},get createPrefixIncrement(){return d(46)},get createPrefixDecrement(){return d(47)},get createBitwiseNot(){return d(55)},get createLogicalNot(){return d(54)},get createPostfixIncrement(){return h(46)},get createPostfixDecrement(){return h(47)},createImmediatelyInvokedFunctionExpression:Dh,createImmediatelyInvokedArrowFunction:Ph,createVoidZero:ma,createExportDefault:Ih,createExternalModuleExport:Nh,createTypeCheck:Oh,createIsNotTypeCheck:Mh,createMethodCall:ha,createGlobalMethodCall:Ha,createFunctionBindCall:Lh,createFunctionCallCall:Ws,createFunctionApplyCall:Jh,createArraySliceCall:Rh,createArrayConcatCall:jh,createObjectDefinePropertyCall:hf,createObjectGetOwnPropertyDescriptorCall:Fh,createReflectGetCall:Bh,createReflectSetCall:Uh,createPropertyDescriptor:yf,createCallBinding:A,createAssignmentTargetWrapper:R,inlineExpressions:te,getInternalName:ne,getLocalName:ie,getExportName:ve,getDeclarationName:He,getNamespaceMemberName:Be,getExternalModuleOrNamespaceExportName:Ue,restoreOuterExpressions:m,restoreEnclosingLabel:b,createUseStrictPrologue:di,copyPrologue:Rt,copyStandardPrologue:mi,copyCustomPrologue:hi,ensureUseStrict:Ui,liftToBlock:ga,mergeLexicalEnvironment:qh,updateModifiers:bf,updateModifierLike:zh};return yr(a6,n=>n(ue)),ue;function Y(n,o){if(n===void 0||n===$e)n=[];else if(va(n)){if(o===void 0||n.hasTrailingComma===o)return n.transformFlags===void 0&&Vb(n),N.attachNodeArrayDebugInfo(n),n;let g=n.slice();return g.pos=n.pos,g.end=n.end,g.hasTrailingComma=o,g.transformFlags=n.transformFlags,N.attachNodeArrayDebugInfo(g),g}let s=n.length,u=s>=1&&s<=4?n.slice():n;return u.pos=-1,u.end=-1,u.hasTrailingComma=!!o,u.transformFlags=0,Vb(u),N.attachNodeArrayDebugInfo(u),u}function B(n){return t.createBaseNode(n)}function ae(n){let o=B(n);return o.symbol=void 0,o.localSymbol=void 0,o}function Ce(n,o){return n!==o&&(n.typeArguments=o.typeArguments),r(n,o)}function Ze(n,o=0){let s=ae(9);return s.text=typeof n=="number"?n+"":n,s.numericLiteralFlags=o,o&384&&(s.transformFlags|=1024),s}function qe(n){let o=Tr(10);return o.text=typeof n=="string"?n:Q2(n)+"n",o.transformFlags|=32,o}function rt(n,o){let s=ae(11);return s.text=n,s.singleQuote=o,s}function it(n,o,s){let u=rt(n,o);return u.hasExtendedUnicodeEscape=s,s&&(u.transformFlags|=1024),u}function Ir(n){let o=rt(vd(n),void 0);return o.textSourceNode=n,o}function ar(n){let o=Tr(14);return o.text=n,o}function ci(n,o){switch(n){case 9:return Ze(o,0);case 10:return qe(o);case 11:return it(o,void 0);case 12:return Fs(o,!1);case 13:return Fs(o,!0);case 14:return ar(o);case 15:return Li(n,o,void 0,0)}}function or(n){let o=t.createBaseIdentifierNode(80);return o.escapedText=n,o.jsDoc=void 0,o.flowNode=void 0,o.symbol=void 0,o}function Nr(n,o,s,u){let g=or(Mn(n));return setIdentifierAutoGenerate(g,{flags:o,id:il,prefix:s,suffix:u}),il++,g}function Ge(n,o,s){o===void 0&&n&&(o=Rl(n)),o===80&&(o=void 0);let u=or(Mn(n));return s&&(u.flags|=256),u.escapedText==="await"&&(u.transformFlags|=67108864),u.flags&256&&(u.transformFlags|=1024),u}function Gt(n,o,s,u){let g=1;o&&(g|=8);let I=Nr("",g,s,u);return n&&n(I),I}function Ur(n){let o=2;return n&&(o|=8),Nr("",o,void 0,void 0)}function Xt(n,o=0,s,u){return N.assert(!(o&7),"Argument out of range: flags"),N.assert((o&48)!==32,"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),Nr(n,3|o,s,u)}function Tn(n,o=0,s,u){N.assert(!(o&7),"Argument out of range: flags");let g=n?ro(n)?Id(!1,s,n,u,Ot):`generated@${getNodeId(n)}`:"";(s||u)&&(o|=16);let I=Nr(g,4|o,s,u);return I.original=n,I}function Sn(n){let o=t.createBasePrivateIdentifierNode(81);return o.escapedText=n,o.transformFlags|=16777216,o}function sr(n){return Fr(n,"#")||N.fail("First character of private identifier must be #: "+n),Sn(Mn(n))}function $t(n,o,s,u){let g=Sn(Mn(n));return setIdentifierAutoGenerate(g,{flags:o,id:il,prefix:s,suffix:u}),il++,g}function St(n,o,s){n&&!Fr(n,"#")&&N.fail("First character of private identifier must be #: "+n);let u=8|(n?3:1);return $t(n??"",u,o,s)}function xn(n,o,s){let u=ro(n)?Id(!0,o,n,s,Ot):`#generated@${getNodeId(n)}`,I=$t(u,4|(o||s?16:0),o,s);return I.original=n,I}function Tr(n){return t.createBaseTokenNode(n)}function vt(n){N.assert(n>=0&&n<=165,"Invalid token"),N.assert(n<=15||n>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),N.assert(n<=9||n>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),N.assert(n!==80,"Invalid token. Use 'createIdentifier' to create identifiers");let o=Tr(n),s=0;switch(n){case 134:s=384;break;case 160:s=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:s=1;break;case 108:s=134218752,o.flowNode=void 0;break;case 126:s=1024;break;case 129:s=16777216;break;case 110:s=16384,o.flowNode=void 0;break}return s&&(o.transformFlags|=s),o}function ct(){return vt(108)}function Ut(){return vt(110)}function fr(){return vt(106)}function ht(){return vt(112)}function wn(){return vt(97)}function Tt(n){return vt(n)}function Or(n){let o=[];return n&1&&o.push(Tt(95)),n&2&&o.push(Tt(138)),n&1024&&o.push(Tt(90)),n&2048&&o.push(Tt(87)),n&4&&o.push(Tt(125)),n&8&&o.push(Tt(123)),n&16&&o.push(Tt(124)),n&256&&o.push(Tt(128)),n&32&&o.push(Tt(126)),n&16384&&o.push(Tt(164)),n&64&&o.push(Tt(148)),n&128&&o.push(Tt(129)),n&512&&o.push(Tt(134)),n&32768&&o.push(Tt(103)),n&65536&&o.push(Tt(147)),o.length?o:void 0}function pt(n,o){let s=B(166);return s.left=n,s.right=Xe(o),s.transformFlags|=V(s.left)|e_(s.right),s.flowNode=void 0,s}function Mr(n,o,s){return n.left!==o||n.right!==s?r(pt(o,s),n):n}function at(n){let o=B(167);return o.expression=a().parenthesizeExpressionOfComputedPropertyName(n),o.transformFlags|=V(o.expression)|1024|131072,o}function er(n,o){return n.expression!==o?r(at(o),n):n}function Qt(n,o,s,u){let g=ae(168);return g.modifiers=Oe(n),g.name=Xe(o),g.constraint=s,g.default=u,g.transformFlags=1,g.expression=void 0,g.jsDoc=void 0,g}function tn(n,o,s,u,g){return n.modifiers!==o||n.name!==s||n.constraint!==u||n.default!==g?r(Qt(o,s,u,g),n):n}function Bn(n,o,s,u,g,I){let W=ae(169);return W.modifiers=Oe(n),W.dotDotDotToken=o,W.name=Xe(s),W.questionToken=u,W.type=g,W.initializer=To(I),gm(W.name)?W.transformFlags=1:W.transformFlags=De(W.modifiers)|V(W.dotDotDotToken)|In(W.name)|V(W.questionToken)|V(W.initializer)|(W.questionToken??W.type?1:0)|(W.dotDotDotToken??W.initializer?1024:0)|(ln(W.modifiers)&16476?8192:0),W.jsDoc=void 0,W}function Un(n,o,s,u,g,I,W){return n.modifiers!==o||n.dotDotDotToken!==s||n.name!==u||n.questionToken!==g||n.type!==I||n.initializer!==W?r(Bn(o,s,u,g,I,W),n):n}function rn(n){let o=B(170);return o.expression=a().parenthesizeLeftSideOfAccess(n,!1),o.transformFlags|=V(o.expression)|1|8192|33554432,o}function nn(n,o){return n.expression!==o?r(rn(o),n):n}function Di(n,o,s,u){let g=ae(171);return g.modifiers=Oe(n),g.name=Xe(o),g.type=u,g.questionToken=s,g.transformFlags=1,g.initializer=void 0,g.jsDoc=void 0,g}function qn(n,o,s,u,g){return n.modifiers!==o||n.name!==s||n.questionToken!==u||n.type!==g?Ae(Di(o,s,u,g),n):n}function Ae(n,o){return n!==o&&(n.initializer=o.initializer),r(n,o)}function q(n,o,s,u,g){let I=ae(172);I.modifiers=Oe(n),I.name=Xe(o),I.questionToken=s&&Pl(s)?s:void 0,I.exclamationToken=s&&Pd(s)?s:void 0,I.type=u,I.initializer=To(g);let W=I.flags&33554432||ln(I.modifiers)&2;return I.transformFlags=De(I.modifiers)|In(I.name)|V(I.initializer)|(W||I.questionToken||I.exclamationToken||I.type?1:0)|(ao(I.name)||ln(I.modifiers)&32&&I.initializer?8192:0)|16777216,I.jsDoc=void 0,I}function oe(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.questionToken!==(u!==void 0&&Pl(u)?u:void 0)||n.exclamationToken!==(u!==void 0&&Pd(u)?u:void 0)||n.type!==g||n.initializer!==I?r(q(o,s,u,g,I),n):n}function ge(n,o,s,u,g,I){let W=ae(173);return W.modifiers=Oe(n),W.name=Xe(o),W.questionToken=s,W.typeParameters=Oe(u),W.parameters=Oe(g),W.type=I,W.transformFlags=1,W.jsDoc=void 0,W.locals=void 0,W.nextContainer=void 0,W.typeArguments=void 0,W}function Se(n,o,s,u,g,I,W){return n.modifiers!==o||n.name!==s||n.questionToken!==u||n.typeParameters!==g||n.parameters!==I||n.type!==W?Ce(ge(o,s,u,g,I,W),n):n}function nt(n,o,s,u,g,I,W,de){let We=ae(174);if(We.modifiers=Oe(n),We.asteriskToken=o,We.name=Xe(s),We.questionToken=u,We.exclamationToken=void 0,We.typeParameters=Oe(g),We.parameters=Y(I),We.type=W,We.body=de,!We.body)We.transformFlags=1;else{let Er=ln(We.modifiers)&512,$n=!!We.asteriskToken,yi=Er&&$n;We.transformFlags=De(We.modifiers)|V(We.asteriskToken)|In(We.name)|V(We.questionToken)|De(We.typeParameters)|De(We.parameters)|V(We.type)|V(We.body)&-67108865|(yi?128:Er?256:$n?2048:0)|(We.questionToken||We.typeParameters||We.type?1:0)|1024}return We.typeArguments=void 0,We.jsDoc=void 0,We.locals=void 0,We.nextContainer=void 0,We.flowNode=void 0,We.endFlowNode=void 0,We.returnFlowNode=void 0,We}function z(n,o,s,u,g,I,W,de,We){return n.modifiers!==o||n.asteriskToken!==s||n.name!==u||n.questionToken!==g||n.typeParameters!==I||n.parameters!==W||n.type!==de||n.body!==We?X(nt(o,s,u,g,I,W,de,We),n):n}function X(n,o){return n!==o&&(n.exclamationToken=o.exclamationToken),r(n,o)}function ee(n){let o=ae(175);return o.body=n,o.transformFlags=V(n)|16777216,o.modifiers=void 0,o.jsDoc=void 0,o.locals=void 0,o.nextContainer=void 0,o.endFlowNode=void 0,o.returnFlowNode=void 0,o}function xe(n,o){return n.body!==o?ke(ee(o),n):n}function ke(n,o){return n!==o&&(n.modifiers=o.modifiers),r(n,o)}function Le(n,o,s){let u=ae(176);return u.modifiers=Oe(n),u.parameters=Y(o),u.body=s,u.transformFlags=De(u.modifiers)|De(u.parameters)|V(u.body)&-67108865|1024,u.typeParameters=void 0,u.type=void 0,u.typeArguments=void 0,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.endFlowNode=void 0,u.returnFlowNode=void 0,u}function lt(n,o,s,u){return n.modifiers!==o||n.parameters!==s||n.body!==u?yt(Le(o,s,u),n):n}function yt(n,o){return n!==o&&(n.typeParameters=o.typeParameters,n.type=o.type),Ce(n,o)}function jt(n,o,s,u,g){let I=ae(177);return I.modifiers=Oe(n),I.name=Xe(o),I.parameters=Y(s),I.type=u,I.body=g,I.body?I.transformFlags=De(I.modifiers)|In(I.name)|De(I.parameters)|V(I.type)|V(I.body)&-67108865|(I.type?1:0):I.transformFlags=1,I.typeArguments=void 0,I.typeParameters=void 0,I.jsDoc=void 0,I.locals=void 0,I.nextContainer=void 0,I.flowNode=void 0,I.endFlowNode=void 0,I.returnFlowNode=void 0,I}function qr(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.parameters!==u||n.type!==g||n.body!==I?na(jt(o,s,u,g,I),n):n}function na(n,o){return n!==o&&(n.typeParameters=o.typeParameters),Ce(n,o)}function Cn(n,o,s,u){let g=ae(178);return g.modifiers=Oe(n),g.name=Xe(o),g.parameters=Y(s),g.body=u,g.body?g.transformFlags=De(g.modifiers)|In(g.name)|De(g.parameters)|V(g.body)&-67108865|(g.type?1:0):g.transformFlags=1,g.typeArguments=void 0,g.typeParameters=void 0,g.type=void 0,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g.endFlowNode=void 0,g.returnFlowNode=void 0,g}function zn(n,o,s,u,g){return n.modifiers!==o||n.name!==s||n.parameters!==u||n.body!==g?Pi(Cn(o,s,u,g),n):n}function Pi(n,o){return n!==o&&(n.typeParameters=o.typeParameters,n.type=o.type),Ce(n,o)}function ia(n,o,s){let u=ae(179);return u.typeParameters=Oe(n),u.parameters=Oe(o),u.type=s,u.transformFlags=1,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.typeArguments=void 0,u}function Wn(n,o,s,u){return n.typeParameters!==o||n.parameters!==s||n.type!==u?Ce(ia(o,s,u),n):n}function En(n,o,s){let u=ae(180);return u.typeParameters=Oe(n),u.parameters=Oe(o),u.type=s,u.transformFlags=1,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.typeArguments=void 0,u}function Ii(n,o,s,u){return n.typeParameters!==o||n.parameters!==s||n.type!==u?Ce(En(o,s,u),n):n}function aa(n,o,s){let u=ae(181);return u.modifiers=Oe(n),u.parameters=Oe(o),u.type=s,u.transformFlags=1,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.typeArguments=void 0,u}function Vn(n,o,s,u){return n.parameters!==s||n.type!==u||n.modifiers!==o?Ce(aa(o,s,u),n):n}function Sr(n,o){let s=B(204);return s.type=n,s.literal=o,s.transformFlags=1,s}function Je(n,o,s){return n.type!==o||n.literal!==s?r(Sr(o,s),n):n}function oa(n){return vt(n)}function Mt(n,o,s){let u=B(182);return u.assertsModifier=n,u.parameterName=Xe(o),u.type=s,u.transformFlags=1,u}function Lr(n,o,s,u){return n.assertsModifier!==o||n.parameterName!==s||n.type!==u?r(Mt(o,s,u),n):n}function j(n,o){let s=B(183);return s.typeName=Xe(n),s.typeArguments=o&&a().parenthesizeTypeArguments(Y(o)),s.transformFlags=1,s}function T(n,o,s){return n.typeName!==o||n.typeArguments!==s?r(j(o,s),n):n}function x(n,o,s){let u=ae(184);return u.typeParameters=Oe(n),u.parameters=Oe(o),u.type=s,u.transformFlags=1,u.modifiers=void 0,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.typeArguments=void 0,u}function f(n,o,s,u){return n.typeParameters!==o||n.parameters!==s||n.type!==u?$(x(o,s,u),n):n}function $(n,o){return n!==o&&(n.modifiers=o.modifiers),Ce(n,o)}function Q(...n){return n.length===4?O(...n):n.length===3?fe(...n):N.fail("Incorrect number of arguments specified.")}function O(n,o,s,u){let g=ae(185);return g.modifiers=Oe(n),g.typeParameters=Oe(o),g.parameters=Oe(s),g.type=u,g.transformFlags=1,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.typeArguments=void 0,g}function fe(n,o,s){return O(void 0,n,o,s)}function be(...n){return n.length===5?he(...n):n.length===4?Re(...n):N.fail("Incorrect number of arguments specified.")}function he(n,o,s,u,g){return n.modifiers!==o||n.typeParameters!==s||n.parameters!==u||n.type!==g?Ce(Q(o,s,u,g),n):n}function Re(n,o,s,u){return he(n,n.modifiers,o,s,u)}function we(n,o){let s=B(186);return s.exprName=n,s.typeArguments=o&&a().parenthesizeTypeArguments(o),s.transformFlags=1,s}function et(n,o,s){return n.exprName!==o||n.typeArguments!==s?r(we(o,s),n):n}function Ye(n){let o=ae(187);return o.members=Y(n),o.transformFlags=1,o}function Ke(n,o){return n.members!==o?r(Ye(o),n):n}function It(n){let o=B(188);return o.elementType=a().parenthesizeNonArrayTypeOfPostfixType(n),o.transformFlags=1,o}function qt(n,o){return n.elementType!==o?r(It(o),n):n}function _r(n){let o=B(189);return o.elements=Y(a().parenthesizeElementTypesOfTupleType(n)),o.transformFlags=1,o}function Te(n,o){return n.elements!==o?r(_r(o),n):n}function ft(n,o,s,u){let g=ae(202);return g.dotDotDotToken=n,g.name=o,g.questionToken=s,g.type=u,g.transformFlags=1,g.jsDoc=void 0,g}function An(n,o,s,u,g){return n.dotDotDotToken!==o||n.name!==s||n.questionToken!==u||n.type!==g?r(ft(o,s,u,g),n):n}function Et(n){let o=B(190);return o.type=a().parenthesizeTypeOfOptionalType(n),o.transformFlags=1,o}function H(n,o){return n.type!==o?r(Et(o),n):n}function Fa(n){let o=B(191);return o.type=n,o.transformFlags=1,o}function Ie(n,o){return n.type!==o?r(Fa(o),n):n}function ot(n,o,s){let u=B(n);return u.types=ue.createNodeArray(s(o)),u.transformFlags=1,u}function cr(n,o,s){return n.types!==o?r(ot(n.kind,o,s),n):n}function an(n){return ot(192,n,a().parenthesizeConstituentTypesOfUnionType)}function Ba(n,o){return cr(n,o,a().parenthesizeConstituentTypesOfUnionType)}function kn(n){return ot(193,n,a().parenthesizeConstituentTypesOfIntersectionType)}function je(n,o){return cr(n,o,a().parenthesizeConstituentTypesOfIntersectionType)}function dt(n,o,s,u){let g=B(194);return g.checkType=a().parenthesizeCheckTypeOfConditionalType(n),g.extendsType=a().parenthesizeExtendsTypeOfConditionalType(o),g.trueType=s,g.falseType=u,g.transformFlags=1,g.locals=void 0,g.nextContainer=void 0,g}function li(n,o,s,u,g){return n.checkType!==o||n.extendsType!==s||n.trueType!==u||n.falseType!==g?r(dt(o,s,u,g),n):n}function Hn(n){let o=B(195);return o.typeParameter=n,o.transformFlags=1,o}function t1(n,o){return n.typeParameter!==o?r(Hn(o),n):n}function dr(n,o){let s=B(203);return s.head=n,s.templateSpans=Y(o),s.transformFlags=1,s}function r1(n,o,s){return n.head!==o||n.templateSpans!==s?r(dr(o,s),n):n}function ui(n,o,s,u,g=!1){let I=B(205);return I.argument=n,I.assertions=o,I.qualifier=s,I.typeArguments=u&&a().parenthesizeTypeArguments(u),I.isTypeOf=g,I.transformFlags=1,I}function fs(n,o,s,u,g,I=n.isTypeOf){return n.argument!==o||n.assertions!==s||n.qualifier!==u||n.typeArguments!==g||n.isTypeOf!==I?r(ui(o,s,u,g,I),n):n}function xr(n){let o=B(196);return o.type=n,o.transformFlags=1,o}function Ft(n,o){return n.type!==o?r(xr(o),n):n}function M(){let n=B(197);return n.transformFlags=1,n}function Jr(n,o){let s=B(198);return s.operator=n,s.type=n===148?a().parenthesizeOperandOfReadonlyTypeOperator(o):a().parenthesizeOperandOfTypeOperator(o),s.transformFlags=1,s}function sa(n,o){return n.type!==o?r(Jr(n.operator,o),n):n}function Ni(n,o){let s=B(199);return s.objectType=a().parenthesizeNonArrayTypeOfPostfixType(n),s.indexType=o,s.transformFlags=1,s}function G_(n,o,s){return n.objectType!==o||n.indexType!==s?r(Ni(o,s),n):n}function Lt(n,o,s,u,g,I){let W=ae(200);return W.readonlyToken=n,W.typeParameter=o,W.nameType=s,W.questionToken=u,W.type=g,W.members=I&&Y(I),W.transformFlags=1,W.locals=void 0,W.nextContainer=void 0,W}function Yt(n,o,s,u,g,I,W){return n.readonlyToken!==o||n.typeParameter!==s||n.nameType!==u||n.questionToken!==g||n.type!==I||n.members!==W?r(Lt(o,s,u,g,I,W),n):n}function Oi(n){let o=B(201);return o.literal=n,o.transformFlags=1,o}function n1(n,o){return n.literal!==o?r(Oi(o),n):n}function Tu(n){let o=B(206);return o.elements=Y(n),o.transformFlags|=De(o.elements)|1024|524288,o.transformFlags&32768&&(o.transformFlags|=65664),o}function Ua(n,o){return n.elements!==o?r(Tu(o),n):n}function Su(n){let o=B(207);return o.elements=Y(n),o.transformFlags|=De(o.elements)|1024|524288,o}function X_(n,o){return n.elements!==o?r(Su(o),n):n}function _a(n,o,s,u){let g=ae(208);return g.dotDotDotToken=n,g.propertyName=Xe(o),g.name=Xe(s),g.initializer=To(u),g.transformFlags|=V(g.dotDotDotToken)|In(g.propertyName)|In(g.name)|V(g.initializer)|(g.dotDotDotToken?32768:0)|1024,g.flowNode=void 0,g}function xu(n,o,s,u,g){return n.propertyName!==s||n.dotDotDotToken!==o||n.name!==u||n.initializer!==g?r(_a(o,s,u,g),n):n}function $_(n,o){let s=B(209),u=n&&wi(n),g=Y(n,u&&Im(u)?!0:void 0);return s.elements=a().parenthesizeExpressionsOfCommaDelimitedList(g),s.multiLine=o,s.transformFlags|=De(s.elements),s}function wu(n,o){return n.elements!==o?r($_(o,n.multiLine),n):n}function ds(n,o){let s=ae(210);return s.properties=Y(n),s.multiLine=o,s.transformFlags|=De(s.properties),s.jsDoc=void 0,s}function i1(n,o){return n.properties!==o?r(ds(o,n.multiLine),n):n}function ms(n,o,s){let u=ae(211);return u.expression=n,u.questionDotToken=o,u.name=s,u.transformFlags=V(u.expression)|V(u.questionDotToken)|(Ee(u.name)?e_(u.name):V(u.name)|536870912),u.jsDoc=void 0,u.flowNode=void 0,u}function Mi(n,o){let s=ms(a().parenthesizeLeftSideOfAccess(n,!1),void 0,Xe(o));return qf(n)&&(s.transformFlags|=384),s}function Q_(n,o,s){return Q4(n)?ys(n,o,n.questionDotToken,gi(s,Ee)):n.expression!==o||n.name!==s?r(Mi(o,s),n):n}function hs(n,o,s){let u=ms(a().parenthesizeLeftSideOfAccess(n,!0),o,Xe(s));return u.flags|=64,u.transformFlags|=32,u}function ys(n,o,s,u){return N.assert(!!(n.flags&64),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),n.expression!==o||n.questionDotToken!==s||n.name!==u?r(hs(o,s,u),n):n}function Cu(n,o,s){let u=ae(212);return u.expression=n,u.questionDotToken=o,u.argumentExpression=s,u.transformFlags|=V(u.expression)|V(u.questionDotToken)|V(u.argumentExpression),u.jsDoc=void 0,u.flowNode=void 0,u}function Y_(n,o){let s=Cu(a().parenthesizeLeftSideOfAccess(n,!1),void 0,Cr(o));return qf(n)&&(s.transformFlags|=384),s}function Eu(n,o,s){return Y4(n)?ku(n,o,n.questionDotToken,s):n.expression!==o||n.argumentExpression!==s?r(Y_(o,s),n):n}function Au(n,o,s){let u=Cu(a().parenthesizeLeftSideOfAccess(n,!0),o,Cr(s));return u.flags|=64,u.transformFlags|=32,u}function ku(n,o,s,u){return N.assert(!!(n.flags&64),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),n.expression!==o||n.questionDotToken!==s||n.argumentExpression!==u?r(Au(o,s,u),n):n}function po(n,o,s,u){let g=ae(213);return g.expression=n,g.questionDotToken=o,g.typeArguments=s,g.arguments=u,g.transformFlags|=V(g.expression)|V(g.questionDotToken)|De(g.typeArguments)|De(g.arguments),g.typeArguments&&(g.transformFlags|=1),gd(g.expression)&&(g.transformFlags|=16384),g}function fo(n,o,s){let u=po(a().parenthesizeLeftSideOfAccess(n,!1),void 0,Oe(o),a().parenthesizeExpressionsOfCommaDelimitedList(Y(s)));return zx(u.expression)&&(u.transformFlags|=8388608),u}function a1(n,o,s,u){return y0(n)?gs(n,o,n.questionDotToken,s,u):n.expression!==o||n.typeArguments!==s||n.arguments!==u?r(fo(o,s,u),n):n}function zr(n,o,s,u){let g=po(a().parenthesizeLeftSideOfAccess(n,!0),o,Oe(s),a().parenthesizeExpressionsOfCommaDelimitedList(Y(u)));return g.flags|=64,g.transformFlags|=32,g}function gs(n,o,s,u,g){return N.assert(!!(n.flags&64),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),n.expression!==o||n.questionDotToken!==s||n.typeArguments!==u||n.arguments!==g?r(zr(o,s,u,g),n):n}function bs(n,o,s){let u=ae(214);return u.expression=a().parenthesizeExpressionOfNew(n),u.typeArguments=Oe(o),u.arguments=s?a().parenthesizeExpressionsOfCommaDelimitedList(s):void 0,u.transformFlags|=V(u.expression)|De(u.typeArguments)|De(u.arguments)|32,u.typeArguments&&(u.transformFlags|=1),u}function Du(n,o,s,u){return n.expression!==o||n.typeArguments!==s||n.arguments!==u?r(bs(o,s,u),n):n}function Pu(n,o,s){let u=B(215);return u.tag=a().parenthesizeLeftSideOfAccess(n,!1),u.typeArguments=Oe(o),u.template=s,u.transformFlags|=V(u.tag)|De(u.typeArguments)|V(u.template)|1024,u.typeArguments&&(u.transformFlags|=1),BT(u.template)&&(u.transformFlags|=128),u}function o1(n,o,s,u){return n.tag!==o||n.typeArguments!==s||n.template!==u?r(Pu(o,s,u),n):n}function Iu(n,o){let s=B(216);return s.expression=a().parenthesizeOperandOfPrefixUnary(o),s.type=n,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function Nu(n,o,s){return n.type!==o||n.expression!==s?r(Iu(o,s),n):n}function K_(n){let o=B(217);return o.expression=n,o.transformFlags=V(o.expression),o.jsDoc=void 0,o}function Ou(n,o){return n.expression!==o?r(K_(o),n):n}function Z_(n,o,s,u,g,I,W){let de=ae(218);de.modifiers=Oe(n),de.asteriskToken=o,de.name=Xe(s),de.typeParameters=Oe(u),de.parameters=Y(g),de.type=I,de.body=W;let We=ln(de.modifiers)&512,Er=!!de.asteriskToken,$n=We&&Er;return de.transformFlags=De(de.modifiers)|V(de.asteriskToken)|In(de.name)|De(de.typeParameters)|De(de.parameters)|V(de.type)|V(de.body)&-67108865|($n?128:We?256:Er?2048:0)|(de.typeParameters||de.type?1:0)|4194304,de.typeArguments=void 0,de.jsDoc=void 0,de.locals=void 0,de.nextContainer=void 0,de.flowNode=void 0,de.endFlowNode=void 0,de.returnFlowNode=void 0,de}function Mu(n,o,s,u,g,I,W,de){return n.name!==u||n.modifiers!==o||n.asteriskToken!==s||n.typeParameters!==g||n.parameters!==I||n.type!==W||n.body!==de?Ce(Z_(o,s,u,g,I,W,de),n):n}function ec(n,o,s,u,g,I){let W=ae(219);W.modifiers=Oe(n),W.typeParameters=Oe(o),W.parameters=Y(s),W.type=u,W.equalsGreaterThanToken=g??vt(39),W.body=a().parenthesizeConciseBodyOfArrowFunction(I);let de=ln(W.modifiers)&512;return W.transformFlags=De(W.modifiers)|De(W.typeParameters)|De(W.parameters)|V(W.type)|V(W.equalsGreaterThanToken)|V(W.body)&-67108865|(W.typeParameters||W.type?1:0)|(de?16640:0)|1024,W.typeArguments=void 0,W.jsDoc=void 0,W.locals=void 0,W.nextContainer=void 0,W.flowNode=void 0,W.endFlowNode=void 0,W.returnFlowNode=void 0,W}function tc(n,o,s,u,g,I,W){return n.modifiers!==o||n.typeParameters!==s||n.parameters!==u||n.type!==g||n.equalsGreaterThanToken!==I||n.body!==W?Ce(ec(o,s,u,g,I,W),n):n}function Lu(n){let o=B(220);return o.expression=a().parenthesizeOperandOfPrefixUnary(n),o.transformFlags|=V(o.expression),o}function Wr(n,o){return n.expression!==o?r(Lu(o),n):n}function vs(n){let o=B(221);return o.expression=a().parenthesizeOperandOfPrefixUnary(n),o.transformFlags|=V(o.expression),o}function pi(n,o){return n.expression!==o?r(vs(o),n):n}function rc(n){let o=B(222);return o.expression=a().parenthesizeOperandOfPrefixUnary(n),o.transformFlags|=V(o.expression),o}function ca(n,o){return n.expression!==o?r(rc(o),n):n}function la(n){let o=B(223);return o.expression=a().parenthesizeOperandOfPrefixUnary(n),o.transformFlags|=V(o.expression)|256|128|2097152,o}function s1(n,o){return n.expression!==o?r(la(o),n):n}function qa(n,o){let s=B(224);return s.operator=n,s.operand=a().parenthesizeOperandOfPrefixUnary(o),s.transformFlags|=V(s.operand),(n===46||n===47)&&Ee(s.operand)&&!wa(s.operand)&&!Y0(s.operand)&&(s.transformFlags|=268435456),s}function _1(n,o){return n.operand!==o?r(qa(n.operator,o),n):n}function Ts(n,o){let s=B(225);return s.operator=o,s.operand=a().parenthesizeOperandOfPostfixUnary(n),s.transformFlags|=V(s.operand),Ee(s.operand)&&!wa(s.operand)&&!Y0(s.operand)&&(s.transformFlags|=268435456),s}function c1(n,o){return n.operand!==o?r(Ts(o,n.operator),n):n}function nc(n,o,s){let u=ae(226),g=lr(o),I=g.kind;return u.left=a().parenthesizeLeftSideOfBinary(I,n),u.operatorToken=g,u.right=a().parenthesizeRightSideOfBinary(I,u.left,s),u.transformFlags|=V(u.left)|V(u.operatorToken)|V(u.right),I===61?u.transformFlags|=32:I===64?uo(u.left)?u.transformFlags|=5248|Ju(u.left):iu(u.left)&&(u.transformFlags|=5120|Ju(u.left)):I===43||I===68?u.transformFlags|=512:Tm(I)&&(u.transformFlags|=16),I===103&&jr(u.left)&&(u.transformFlags|=536870912),u.jsDoc=void 0,u}function Ju(n){return U6(n)?65536:0}function Ru(n,o,s,u){return n.left!==o||n.operatorToken!==s||n.right!==u?r(nc(o,s,u),n):n}function ju(n,o,s,u,g){let I=B(227);return I.condition=a().parenthesizeConditionOfConditionalExpression(n),I.questionToken=o??vt(58),I.whenTrue=a().parenthesizeBranchOfConditionalExpression(s),I.colonToken=u??vt(59),I.whenFalse=a().parenthesizeBranchOfConditionalExpression(g),I.transformFlags|=V(I.condition)|V(I.questionToken)|V(I.whenTrue)|V(I.colonToken)|V(I.whenFalse),I}function fi(n,o,s,u,g,I){return n.condition!==o||n.questionToken!==s||n.whenTrue!==u||n.colonToken!==g||n.whenFalse!==I?r(ju(o,s,u,g,I),n):n}function ic(n,o){let s=B(228);return s.head=n,s.templateSpans=Y(o),s.transformFlags|=V(s.head)|De(s.templateSpans)|1024,s}function l1(n,o,s){return n.head!==o||n.templateSpans!==s?r(ic(o,s),n):n}function Ss(n,o,s,u=0){N.assert(!(u&-7177),"Unsupported template flags.");let g;if(s!==void 0&&s!==o&&(g=DL(n,s),typeof g=="object"))return N.fail("Invalid raw text");if(o===void 0){if(g===void 0)return N.fail("Arguments 'text' and 'rawText' may not both be undefined.");o=g}else g!==void 0&&N.assert(o===g,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return o}function za(n){let o=1024;return n&&(o|=128),o}function Fu(n,o,s,u){let g=Tr(n);return g.text=o,g.rawText=s,g.templateFlags=u&7176,g.transformFlags=za(g.templateFlags),g}function ac(n,o,s,u){let g=ae(n);return g.text=o,g.rawText=s,g.templateFlags=u&7176,g.transformFlags=za(g.templateFlags),g}function Li(n,o,s,u){return n===15?ac(n,o,s,u):Fu(n,o,s,u)}function oc(n,o,s){return n=Ss(16,n,o,s),Li(16,n,o,s)}function u1(n,o,s){return n=Ss(16,n,o,s),Li(17,n,o,s)}function Bu(n,o,s){return n=Ss(16,n,o,s),Li(18,n,o,s)}function p1(n,o,s){return n=Ss(16,n,o,s),ac(15,n,o,s)}function Uu(n,o){N.assert(!n||!!o,"A `YieldExpression` with an asteriskToken must have an expression.");let s=B(229);return s.expression=o&&a().parenthesizeExpressionForDisallowedComma(o),s.asteriskToken=n,s.transformFlags|=V(s.expression)|V(s.asteriskToken)|1024|128|1048576,s}function f1(n,o,s){return n.expression!==s||n.asteriskToken!==o?r(Uu(o,s),n):n}function qu(n){let o=B(230);return o.expression=a().parenthesizeExpressionForDisallowedComma(n),o.transformFlags|=V(o.expression)|1024|32768,o}function d1(n,o){return n.expression!==o?r(qu(o),n):n}function xs(n,o,s,u,g){let I=ae(231);return I.modifiers=Oe(n),I.name=Xe(o),I.typeParameters=Oe(s),I.heritageClauses=Oe(u),I.members=Y(g),I.transformFlags|=De(I.modifiers)|In(I.name)|De(I.typeParameters)|De(I.heritageClauses)|De(I.members)|(I.typeParameters?1:0)|1024,I.jsDoc=void 0,I}function sc(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.typeParameters!==u||n.heritageClauses!==g||n.members!==I?r(xs(o,s,u,g,I),n):n}function m1(){return B(232)}function Vr(n,o){let s=B(233);return s.expression=a().parenthesizeLeftSideOfAccess(n,!1),s.typeArguments=o&&a().parenthesizeTypeArguments(o),s.transformFlags|=V(s.expression)|De(s.typeArguments)|1024,s}function _c(n,o,s){return n.expression!==o||n.typeArguments!==s?r(Vr(o,s),n):n}function zu(n,o){let s=B(234);return s.expression=n,s.type=o,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function Wu(n,o,s){return n.expression!==o||n.type!==s?r(zu(o,s),n):n}function cc(n){let o=B(235);return o.expression=a().parenthesizeLeftSideOfAccess(n,!1),o.transformFlags|=V(o.expression)|1,o}function Vu(n,o){return Z4(n)?ws(n,o):n.expression!==o?r(cc(o),n):n}function lc(n,o){let s=B(238);return s.expression=n,s.type=o,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function Dn(n,o,s){return n.expression!==o||n.type!==s?r(lc(o,s),n):n}function Hu(n){let o=B(235);return o.flags|=64,o.expression=a().parenthesizeLeftSideOfAccess(n,!0),o.transformFlags|=V(o.expression)|1,o}function ws(n,o){return N.assert(!!(n.flags&64),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),n.expression!==o?r(Hu(o),n):n}function Gn(n,o){let s=B(236);switch(s.keywordToken=n,s.name=o,s.transformFlags|=V(s.name),n){case 105:s.transformFlags|=1024;break;case 102:s.transformFlags|=32;break;default:return N.assertNever(n)}return s.flowNode=void 0,s}function Cs(n,o){return n.name!==o?r(Gn(n.keywordToken,o),n):n}function uc(n,o){let s=B(239);return s.expression=n,s.literal=o,s.transformFlags|=V(s.expression)|V(s.literal)|1024,s}function Gu(n,o,s){return n.expression!==o||n.literal!==s?r(uc(o,s),n):n}function h1(){let n=B(240);return n.transformFlags|=1024,n}function ua(n,o){let s=B(241);return s.statements=Y(n),s.multiLine=o,s.transformFlags|=De(s.statements),s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s}function y1(n,o){return n.statements!==o?r(ua(o,n.multiLine),n):n}function Xu(n,o){let s=B(243);return s.modifiers=Oe(n),s.declarationList=zt(o)?gc(o):o,s.transformFlags|=De(s.modifiers)|V(s.declarationList),ln(s.modifiers)&2&&(s.transformFlags=1),s.jsDoc=void 0,s.flowNode=void 0,s}function pc(n,o,s){return n.modifiers!==o||n.declarationList!==s?r(Xu(o,s),n):n}function fc(){let n=B(242);return n.jsDoc=void 0,n}function Es(n){let o=B(244);return o.expression=a().parenthesizeExpressionOfExpressionStatement(n),o.transformFlags|=V(o.expression),o.jsDoc=void 0,o.flowNode=void 0,o}function $u(n,o){return n.expression!==o?r(Es(o),n):n}function Qu(n,o,s){let u=B(245);return u.expression=n,u.thenStatement=on(o),u.elseStatement=on(s),u.transformFlags|=V(u.expression)|V(u.thenStatement)|V(u.elseStatement),u.jsDoc=void 0,u.flowNode=void 0,u}function Yu(n,o,s,u){return n.expression!==o||n.thenStatement!==s||n.elseStatement!==u?r(Qu(o,s,u),n):n}function Ku(n,o){let s=B(246);return s.statement=on(n),s.expression=o,s.transformFlags|=V(s.statement)|V(s.expression),s.jsDoc=void 0,s.flowNode=void 0,s}function g1(n,o,s){return n.statement!==o||n.expression!==s?r(Ku(o,s),n):n}function Zu(n,o){let s=B(247);return s.expression=n,s.statement=on(o),s.transformFlags|=V(s.expression)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function ep(n,o,s){return n.expression!==o||n.statement!==s?r(Zu(o,s),n):n}function dc(n,o,s,u){let g=B(248);return g.initializer=n,g.condition=o,g.incrementor=s,g.statement=on(u),g.transformFlags|=V(g.initializer)|V(g.condition)|V(g.incrementor)|V(g.statement),g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g}function b1(n,o,s,u,g){return n.initializer!==o||n.condition!==s||n.incrementor!==u||n.statement!==g?r(dc(o,s,u,g),n):n}function tp(n,o,s){let u=B(249);return u.initializer=n,u.expression=o,u.statement=on(s),u.transformFlags|=V(u.initializer)|V(u.expression)|V(u.statement),u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.flowNode=void 0,u}function v1(n,o,s,u){return n.initializer!==o||n.expression!==s||n.statement!==u?r(tp(o,s,u),n):n}function rp(n,o,s,u){let g=B(250);return g.awaitModifier=n,g.initializer=o,g.expression=a().parenthesizeExpressionForDisallowedComma(s),g.statement=on(u),g.transformFlags|=V(g.awaitModifier)|V(g.initializer)|V(g.expression)|V(g.statement)|1024,n&&(g.transformFlags|=128),g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g}function T1(n,o,s,u,g){return n.awaitModifier!==o||n.initializer!==s||n.expression!==u||n.statement!==g?r(rp(o,s,u,g),n):n}function mc(n){let o=B(251);return o.label=Xe(n),o.transformFlags|=V(o.label)|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function np(n,o){return n.label!==o?r(mc(o),n):n}function hc(n){let o=B(252);return o.label=Xe(n),o.transformFlags|=V(o.label)|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function S1(n,o){return n.label!==o?r(hc(o),n):n}function ip(n){let o=B(253);return o.expression=n,o.transformFlags|=V(o.expression)|128|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function ap(n,o){return n.expression!==o?r(ip(o),n):n}function yc(n,o){let s=B(254);return s.expression=n,s.statement=on(o),s.transformFlags|=V(s.expression)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function op(n,o,s){return n.expression!==o||n.statement!==s?r(yc(o,s),n):n}function pa(n,o){let s=B(255);return s.expression=a().parenthesizeExpressionForDisallowedComma(n),s.caseBlock=o,s.transformFlags|=V(s.expression)|V(s.caseBlock),s.jsDoc=void 0,s.flowNode=void 0,s.possiblyExhaustive=!1,s}function x1(n,o,s){return n.expression!==o||n.caseBlock!==s?r(pa(o,s),n):n}function sp(n,o){let s=B(256);return s.label=Xe(n),s.statement=on(o),s.transformFlags|=V(s.label)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function _p(n,o,s){return n.label!==o||n.statement!==s?r(sp(o,s),n):n}function cp(n){let o=B(257);return o.expression=n,o.transformFlags|=V(o.expression),o.jsDoc=void 0,o.flowNode=void 0,o}function w1(n,o){return n.expression!==o?r(cp(o),n):n}function lp(n,o,s){let u=B(258);return u.tryBlock=n,u.catchClause=o,u.finallyBlock=s,u.transformFlags|=V(u.tryBlock)|V(u.catchClause)|V(u.finallyBlock),u.jsDoc=void 0,u.flowNode=void 0,u}function up(n,o,s,u){return n.tryBlock!==o||n.catchClause!==s||n.finallyBlock!==u?r(lp(o,s,u),n):n}function pp(){let n=B(259);return n.jsDoc=void 0,n.flowNode=void 0,n}function As(n,o,s,u){let g=ae(260);return g.name=Xe(n),g.exclamationToken=o,g.type=s,g.initializer=To(u),g.transformFlags|=In(g.name)|V(g.initializer)|(g.exclamationToken??g.type?1:0),g.jsDoc=void 0,g}function C1(n,o,s,u,g){return n.name!==o||n.type!==u||n.exclamationToken!==s||n.initializer!==g?r(As(o,s,u,g),n):n}function gc(n,o=0){let s=B(261);return s.flags|=o&7,s.declarations=Y(n),s.transformFlags|=De(s.declarations)|4194304,o&7&&(s.transformFlags|=263168),o&4&&(s.transformFlags|=4),s}function E1(n,o){return n.declarations!==o?r(gc(o,n.flags),n):n}function bc(n,o,s,u,g,I,W){let de=ae(262);if(de.modifiers=Oe(n),de.asteriskToken=o,de.name=Xe(s),de.typeParameters=Oe(u),de.parameters=Y(g),de.type=I,de.body=W,!de.body||ln(de.modifiers)&2)de.transformFlags=1;else{let We=ln(de.modifiers)&512,Er=!!de.asteriskToken,$n=We&&Er;de.transformFlags=De(de.modifiers)|V(de.asteriskToken)|In(de.name)|De(de.typeParameters)|De(de.parameters)|V(de.type)|V(de.body)&-67108865|($n?128:We?256:Er?2048:0)|(de.typeParameters||de.type?1:0)|4194304}return de.typeArguments=void 0,de.jsDoc=void 0,de.locals=void 0,de.nextContainer=void 0,de.endFlowNode=void 0,de.returnFlowNode=void 0,de}function fp(n,o,s,u,g,I,W,de){return n.modifiers!==o||n.asteriskToken!==s||n.name!==u||n.typeParameters!==g||n.parameters!==I||n.type!==W||n.body!==de?A1(bc(o,s,u,g,I,W,de),n):n}function A1(n,o){return n!==o&&n.modifiers===o.modifiers&&(n.modifiers=o.modifiers),Ce(n,o)}function vc(n,o,s,u,g){let I=ae(263);return I.modifiers=Oe(n),I.name=Xe(o),I.typeParameters=Oe(s),I.heritageClauses=Oe(u),I.members=Y(g),ln(I.modifiers)&2?I.transformFlags=1:(I.transformFlags|=De(I.modifiers)|In(I.name)|De(I.typeParameters)|De(I.heritageClauses)|De(I.members)|(I.typeParameters?1:0)|1024,I.transformFlags&8192&&(I.transformFlags|=1)),I.jsDoc=void 0,I}function Tc(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.typeParameters!==u||n.heritageClauses!==g||n.members!==I?r(vc(o,s,u,g,I),n):n}function dp(n,o,s,u,g){let I=ae(264);return I.modifiers=Oe(n),I.name=Xe(o),I.typeParameters=Oe(s),I.heritageClauses=Oe(u),I.members=Y(g),I.transformFlags=1,I.jsDoc=void 0,I}function gt(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.typeParameters!==u||n.heritageClauses!==g||n.members!==I?r(dp(o,s,u,g,I),n):n}function Ji(n,o,s,u){let g=ae(265);return g.modifiers=Oe(n),g.name=Xe(o),g.typeParameters=Oe(s),g.type=u,g.transformFlags=1,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g}function Sc(n,o,s,u,g){return n.modifiers!==o||n.name!==s||n.typeParameters!==u||n.type!==g?r(Ji(o,s,u,g),n):n}function Ri(n,o,s){let u=ae(266);return u.modifiers=Oe(n),u.name=Xe(o),u.members=Y(s),u.transformFlags|=De(u.modifiers)|V(u.name)|De(u.members)|1,u.transformFlags&=-67108865,u.jsDoc=void 0,u}function mp(n,o,s,u){return n.modifiers!==o||n.name!==s||n.members!==u?r(Ri(o,s,u),n):n}function Jt(n,o,s,u=0){let g=ae(267);return g.modifiers=Oe(n),g.flags|=u&2088,g.name=o,g.body=s,ln(g.modifiers)&2?g.transformFlags=1:g.transformFlags|=De(g.modifiers)|V(g.name)|V(g.body)|1,g.transformFlags&=-67108865,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g}function ji(n,o,s,u){return n.modifiers!==o||n.name!==s||n.body!==u?r(Jt(o,s,u,n.flags),n):n}function tr(n){let o=B(268);return o.statements=Y(n),o.transformFlags|=De(o.statements),o.jsDoc=void 0,o}function k1(n,o){return n.statements!==o?r(tr(o),n):n}function hp(n){let o=B(269);return o.clauses=Y(n),o.transformFlags|=De(o.clauses),o.locals=void 0,o.nextContainer=void 0,o}function D1(n,o){return n.clauses!==o?r(hp(o),n):n}function xc(n){let o=ae(270);return o.name=Xe(n),o.transformFlags|=e_(o.name)|1,o.modifiers=void 0,o.jsDoc=void 0,o}function P1(n,o){return n.name!==o?I1(xc(o),n):n}function I1(n,o){return n!==o&&(n.modifiers=o.modifiers),r(n,o)}function yp(n,o,s,u){let g=ae(271);return g.modifiers=Oe(n),g.name=Xe(s),g.isTypeOnly=o,g.moduleReference=u,g.transformFlags|=De(g.modifiers)|e_(g.name)|V(g.moduleReference),Om(g.moduleReference)||(g.transformFlags|=1),g.transformFlags&=-67108865,g.jsDoc=void 0,g}function gp(n,o,s,u,g){return n.modifiers!==o||n.isTypeOnly!==s||n.name!==u||n.moduleReference!==g?r(yp(o,s,u,g),n):n}function bp(n,o,s,u){let g=B(272);return g.modifiers=Oe(n),g.importClause=o,g.moduleSpecifier=s,g.assertClause=u,g.transformFlags|=V(g.importClause)|V(g.moduleSpecifier),g.transformFlags&=-67108865,g.jsDoc=void 0,g}function vp(n,o,s,u,g){return n.modifiers!==o||n.importClause!==s||n.moduleSpecifier!==u||n.assertClause!==g?r(bp(o,s,u,g),n):n}function wc(n,o,s){let u=ae(273);return u.isTypeOnly=n,u.name=o,u.namedBindings=s,u.transformFlags|=V(u.name)|V(u.namedBindings),n&&(u.transformFlags|=1),u.transformFlags&=-67108865,u}function Tp(n,o,s,u){return n.isTypeOnly!==o||n.name!==s||n.namedBindings!==u?r(wc(o,s,u),n):n}function Sp(n,o){let s=B(300);return s.elements=Y(n),s.multiLine=o,s.transformFlags|=4,s}function ks(n,o,s){return n.elements!==o||n.multiLine!==s?r(Sp(o,s),n):n}function Cc(n,o){let s=B(301);return s.name=n,s.value=o,s.transformFlags|=4,s}function xp(n,o,s){return n.name!==o||n.value!==s?r(Cc(o,s),n):n}function Ec(n,o){let s=B(302);return s.assertClause=n,s.multiLine=o,s}function N1(n,o,s){return n.assertClause!==o||n.multiLine!==s?r(Ec(o,s),n):n}function Ds(n){let o=ae(274);return o.name=n,o.transformFlags|=V(o.name),o.transformFlags&=-67108865,o}function O1(n,o){return n.name!==o?r(Ds(o),n):n}function Ac(n){let o=ae(280);return o.name=n,o.transformFlags|=V(o.name)|32,o.transformFlags&=-67108865,o}function M1(n,o){return n.name!==o?r(Ac(o),n):n}function wp(n){let o=B(275);return o.elements=Y(n),o.transformFlags|=De(o.elements),o.transformFlags&=-67108865,o}function L1(n,o){return n.elements!==o?r(wp(o),n):n}function Cp(n,o,s){let u=ae(276);return u.isTypeOnly=n,u.propertyName=o,u.name=s,u.transformFlags|=V(u.propertyName)|V(u.name),u.transformFlags&=-67108865,u}function J1(n,o,s,u){return n.isTypeOnly!==o||n.propertyName!==s||n.name!==u?r(Cp(o,s,u),n):n}function Ps(n,o,s){let u=ae(277);return u.modifiers=Oe(n),u.isExportEquals=o,u.expression=o?a().parenthesizeRightSideOfBinary(64,void 0,s):a().parenthesizeExpressionOfExportDefault(s),u.transformFlags|=De(u.modifiers)|V(u.expression),u.transformFlags&=-67108865,u.jsDoc=void 0,u}function Fi(n,o,s){return n.modifiers!==o||n.expression!==s?r(Ps(o,n.isExportEquals,s),n):n}function kc(n,o,s,u,g){let I=ae(278);return I.modifiers=Oe(n),I.isTypeOnly=o,I.exportClause=s,I.moduleSpecifier=u,I.assertClause=g,I.transformFlags|=De(I.modifiers)|V(I.exportClause)|V(I.moduleSpecifier),I.transformFlags&=-67108865,I.jsDoc=void 0,I}function Dc(n,o,s,u,g,I){return n.modifiers!==o||n.isTypeOnly!==s||n.exportClause!==u||n.moduleSpecifier!==g||n.assertClause!==I?Is(kc(o,s,u,g,I),n):n}function Is(n,o){return n!==o&&n.modifiers===o.modifiers&&(n.modifiers=o.modifiers),r(n,o)}function Ns(n){let o=B(279);return o.elements=Y(n),o.transformFlags|=De(o.elements),o.transformFlags&=-67108865,o}function R1(n,o){return n.elements!==o?r(Ns(o),n):n}function fa(n,o,s){let u=B(281);return u.isTypeOnly=n,u.propertyName=Xe(o),u.name=Xe(s),u.transformFlags|=V(u.propertyName)|V(u.name),u.transformFlags&=-67108865,u.jsDoc=void 0,u}function j1(n,o,s,u){return n.isTypeOnly!==o||n.propertyName!==s||n.name!==u?r(fa(o,s,u),n):n}function F1(){let n=ae(282);return n.jsDoc=void 0,n}function Pc(n){let o=B(283);return o.expression=n,o.transformFlags|=V(o.expression),o.transformFlags&=-67108865,o}function B1(n,o){return n.expression!==o?r(Pc(o),n):n}function U1(n){return B(n)}function Ic(n,o,s=!1){let u=Nc(n,s?o&&a().parenthesizeNonArrayTypeOfPostfixType(o):o);return u.postfix=s,u}function Nc(n,o){let s=B(n);return s.type=o,s}function Ep(n,o,s){return o.type!==s?r(Ic(n,s,o.postfix),o):o}function q1(n,o,s){return o.type!==s?r(Nc(n,s),o):o}function Ap(n,o){let s=ae(324);return s.parameters=Oe(n),s.type=o,s.transformFlags=De(s.parameters)|(s.type?1:0),s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.typeArguments=void 0,s}function z1(n,o,s){return n.parameters!==o||n.type!==s?r(Ap(o,s),n):n}function kp(n,o=!1){let s=ae(329);return s.jsDocPropertyTags=Oe(n),s.isArrayType=o,s}function W1(n,o,s){return n.jsDocPropertyTags!==o||n.isArrayType!==s?r(kp(o,s),n):n}function Dp(n){let o=B(316);return o.type=n,o}function V1(n,o){return n.type!==o?r(Dp(o),n):n}function Pp(n,o,s){let u=ae(330);return u.typeParameters=Oe(n),u.parameters=Y(o),u.type=s,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u}function H1(n,o,s,u){return n.typeParameters!==o||n.parameters!==s||n.type!==u?r(Pp(o,s,u),n):n}function Hr(n){let o=kf(n.kind);return n.tagName.escapedText===Mn(o)?n.tagName:Ge(o)}function Bi(n,o,s){let u=B(n);return u.tagName=o,u.comment=s,u}function mo(n,o,s){let u=ae(n);return u.tagName=o,u.comment=s,u}function ho(n,o,s,u){let g=Bi(352,n??Ge("template"),u);return g.constraint=o,g.typeParameters=Y(s),g}function Os(n,o=Hr(n),s,u,g){return n.tagName!==o||n.constraint!==s||n.typeParameters!==u||n.comment!==g?r(ho(o,s,u,g),n):n}function Ms(n,o,s,u){let g=mo(353,n??Ge("typedef"),u);return g.typeExpression=o,g.fullName=s,g.name=K0(s),g.locals=void 0,g.nextContainer=void 0,g}function Ip(n,o=Hr(n),s,u,g){return n.tagName!==o||n.typeExpression!==s||n.fullName!==u||n.comment!==g?r(Ms(o,s,u,g),n):n}function Oc(n,o,s,u,g,I){let W=mo(348,n??Ge("param"),I);return W.typeExpression=u,W.name=o,W.isNameFirst=!!g,W.isBracketed=s,W}function Mc(n,o=Hr(n),s,u,g,I,W){return n.tagName!==o||n.name!==s||n.isBracketed!==u||n.typeExpression!==g||n.isNameFirst!==I||n.comment!==W?r(Oc(o,s,u,g,I,W),n):n}function Np(n,o,s,u,g,I){let W=mo(355,n??Ge("prop"),I);return W.typeExpression=u,W.name=o,W.isNameFirst=!!g,W.isBracketed=s,W}function Op(n,o=Hr(n),s,u,g,I,W){return n.tagName!==o||n.name!==s||n.isBracketed!==u||n.typeExpression!==g||n.isNameFirst!==I||n.comment!==W?r(Np(o,s,u,g,I,W),n):n}function Mp(n,o,s,u){let g=mo(345,n??Ge("callback"),u);return g.typeExpression=o,g.fullName=s,g.name=K0(s),g.locals=void 0,g.nextContainer=void 0,g}function G1(n,o=Hr(n),s,u,g){return n.tagName!==o||n.typeExpression!==s||n.fullName!==u||n.comment!==g?r(Mp(o,s,u,g),n):n}function Lc(n,o,s){let u=Bi(346,n??Ge("overload"),s);return u.typeExpression=o,u}function X1(n,o=Hr(n),s,u){return n.tagName!==o||n.typeExpression!==s||n.comment!==u?r(Lc(o,s,u),n):n}function Jc(n,o,s){let u=Bi(335,n??Ge("augments"),s);return u.class=o,u}function $1(n,o=Hr(n),s,u){return n.tagName!==o||n.class!==s||n.comment!==u?r(Jc(o,s,u),n):n}function Ls(n,o,s){let u=Bi(336,n??Ge("implements"),s);return u.class=o,u}function Rc(n,o,s){let u=Bi(354,n??Ge("see"),s);return u.name=o,u}function yo(n,o,s,u){return n.tagName!==o||n.name!==s||n.comment!==u?r(Rc(o,s,u),n):n}function Lp(n){let o=B(317);return o.name=n,o}function Wa(n,o){return n.name!==o?r(Lp(o),n):n}function go(n,o){let s=B(318);return s.left=n,s.right=o,s.transformFlags|=V(s.left)|V(s.right),s}function Q1(n,o,s){return n.left!==o||n.right!==s?r(go(o,s),n):n}function Jp(n,o){let s=B(331);return s.name=n,s.text=o,s}function Y1(n,o,s){return n.name!==o?r(Jp(o,s),n):n}function Rp(n,o){let s=B(332);return s.name=n,s.text=o,s}function K1(n,o,s){return n.name!==o?r(Rp(o,s),n):n}function jc(n,o){let s=B(333);return s.name=n,s.text=o,s}function Z1(n,o,s){return n.name!==o?r(jc(o,s),n):n}function eh(n,o=Hr(n),s,u){return n.tagName!==o||n.class!==s||n.comment!==u?r(Ls(o,s,u),n):n}function jp(n,o,s){return Bi(n,o??Ge(kf(n)),s)}function th(n,o,s=Hr(o),u){return o.tagName!==s||o.comment!==u?r(jp(n,s,u),o):o}function Fp(n,o,s,u){let g=Bi(n,o??Ge(kf(n)),u);return g.typeExpression=s,g}function rh(n,o,s=Hr(o),u,g){return o.tagName!==s||o.typeExpression!==u||o.comment!==g?r(Fp(n,s,u,g),o):o}function Bp(n,o){return Bi(334,n,o)}function nh(n,o,s){return n.tagName!==o||n.comment!==s?r(Bp(o,s),n):n}function Up(n,o,s){let u=mo(347,n??Ge(kf(347)),s);return u.typeExpression=o,u.locals=void 0,u.nextContainer=void 0,u}function ih(n,o=Hr(n),s,u){return n.tagName!==o||n.typeExpression!==s||n.comment!==u?r(Up(o,s,u),n):n}function qp(n){let o=B(328);return o.text=n,o}function ah(n,o){return n.text!==o?r(qp(o),n):n}function Js(n,o){let s=B(327);return s.comment=n,s.tags=Oe(o),s}function oh(n,o,s){return n.comment!==o||n.tags!==s?r(Js(o,s),n):n}function Fc(n,o,s){let u=B(284);return u.openingElement=n,u.children=Y(o),u.closingElement=s,u.transformFlags|=V(u.openingElement)|De(u.children)|V(u.closingElement)|2,u}function zp(n,o,s,u){return n.openingElement!==o||n.children!==s||n.closingElement!==u?r(Fc(o,s,u),n):n}function Wp(n,o,s){let u=B(285);return u.tagName=n,u.typeArguments=Oe(o),u.attributes=s,u.transformFlags|=V(u.tagName)|De(u.typeArguments)|V(u.attributes)|2,u.typeArguments&&(u.transformFlags|=1),u}function Rs(n,o,s,u){return n.tagName!==o||n.typeArguments!==s||n.attributes!==u?r(Wp(o,s,u),n):n}function Bc(n,o,s){let u=B(286);return u.tagName=n,u.typeArguments=Oe(o),u.attributes=s,u.transformFlags|=V(u.tagName)|De(u.typeArguments)|V(u.attributes)|2,o&&(u.transformFlags|=1),u}function sh(n,o,s,u){return n.tagName!==o||n.typeArguments!==s||n.attributes!==u?r(Bc(o,s,u),n):n}function Vp(n){let o=B(287);return o.tagName=n,o.transformFlags|=V(o.tagName)|2,o}function _h(n,o){return n.tagName!==o?r(Vp(o),n):n}function js(n,o,s){let u=B(288);return u.openingFragment=n,u.children=Y(o),u.closingFragment=s,u.transformFlags|=V(u.openingFragment)|De(u.children)|V(u.closingFragment)|2,u}function Hp(n,o,s,u){return n.openingFragment!==o||n.children!==s||n.closingFragment!==u?r(js(o,s,u),n):n}function Fs(n,o){let s=B(12);return s.text=n,s.containsOnlyTriviaWhiteSpaces=!!o,s.transformFlags|=2,s}function Gp(n,o,s){return n.text!==o||n.containsOnlyTriviaWhiteSpaces!==s?r(Fs(o,s),n):n}function Uc(){let n=B(289);return n.transformFlags|=2,n}function wr(){let n=B(290);return n.transformFlags|=2,n}function qc(n,o){let s=ae(291);return s.name=n,s.initializer=o,s.transformFlags|=V(s.name)|V(s.initializer)|2,s}function Xp(n,o,s){return n.name!==o||n.initializer!==s?r(qc(o,s),n):n}function $p(n){let o=ae(292);return o.properties=Y(n),o.transformFlags|=De(o.properties)|2,o}function Qp(n,o){return n.properties!==o?r($p(o),n):n}function Yp(n){let o=B(293);return o.expression=n,o.transformFlags|=V(o.expression)|2,o}function ch(n,o){return n.expression!==o?r(Yp(o),n):n}function bo(n,o){let s=B(294);return s.dotDotDotToken=n,s.expression=o,s.transformFlags|=V(s.dotDotDotToken)|V(s.expression)|2,s}function lh(n,o){return n.expression!==o?r(bo(n.dotDotDotToken,o),n):n}function Kp(n,o){let s=B(295);return s.namespace=n,s.name=o,s.transformFlags|=V(s.namespace)|V(s.name)|2,s}function uh(n,o,s){return n.namespace!==o||n.name!==s?r(Kp(o,s),n):n}function Zp(n,o){let s=B(296);return s.expression=a().parenthesizeExpressionForDisallowedComma(n),s.statements=Y(o),s.transformFlags|=V(s.expression)|De(s.statements),s.jsDoc=void 0,s}function zc(n,o,s){return n.expression!==o||n.statements!==s?r(Zp(o,s),n):n}function Va(n){let o=B(297);return o.statements=Y(n),o.transformFlags=De(o.statements),o}function ph(n,o){return n.statements!==o?r(Va(o),n):n}function Bs(n,o){let s=B(298);switch(s.token=n,s.types=Y(o),s.transformFlags|=De(s.types),n){case 96:s.transformFlags|=1024;break;case 119:s.transformFlags|=1;break;default:return N.assertNever(n)}return s}function ef(n,o){return n.types!==o?r(Bs(n.token,o),n):n}function tf(n,o){let s=B(299);return s.variableDeclaration=vf(n),s.block=o,s.transformFlags|=V(s.variableDeclaration)|V(s.block)|(n?0:64),s.locals=void 0,s.nextContainer=void 0,s}function vo(n,o,s){return n.variableDeclaration!==o||n.block!==s?r(tf(o,s),n):n}function Us(n,o){let s=ae(303);return s.name=Xe(n),s.initializer=a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=In(s.name)|V(s.initializer),s.modifiers=void 0,s.questionToken=void 0,s.exclamationToken=void 0,s.jsDoc=void 0,s}function fh(n,o,s){return n.name!==o||n.initializer!==s?dh(Us(o,s),n):n}function dh(n,o){return n!==o&&(n.modifiers=o.modifiers,n.questionToken=o.questionToken,n.exclamationToken=o.exclamationToken),r(n,o)}function Wc(n,o){let s=ae(304);return s.name=Xe(n),s.objectAssignmentInitializer=o&&a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=e_(s.name)|V(s.objectAssignmentInitializer)|1024,s.equalsToken=void 0,s.modifiers=void 0,s.questionToken=void 0,s.exclamationToken=void 0,s.jsDoc=void 0,s}function rf(n,o,s){return n.name!==o||n.objectAssignmentInitializer!==s?nf(Wc(o,s),n):n}function nf(n,o){return n!==o&&(n.modifiers=o.modifiers,n.questionToken=o.questionToken,n.exclamationToken=o.exclamationToken,n.equalsToken=o.equalsToken),r(n,o)}function da(n){let o=ae(305);return o.expression=a().parenthesizeExpressionForDisallowedComma(n),o.transformFlags|=V(o.expression)|128|65536,o.jsDoc=void 0,o}function mh(n,o){return n.expression!==o?r(da(o),n):n}function af(n,o){let s=ae(306);return s.name=Xe(n),s.initializer=o&&a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=V(s.name)|V(s.initializer)|1,s.jsDoc=void 0,s}function hh(n,o,s){return n.name!==o||n.initializer!==s?r(af(o,s),n):n}function yh(n,o,s){let u=t.createBaseSourceFileNode(312);return u.statements=Y(n),u.endOfFileToken=o,u.flags|=s,u.text="",u.fileName="",u.path="",u.resolvedPath="",u.originalFileName="",u.languageVersion=0,u.languageVariant=0,u.scriptKind=0,u.isDeclarationFile=!1,u.hasNoDefaultLib=!1,u.transformFlags|=De(u.statements)|V(u.endOfFileToken),u.locals=void 0,u.nextContainer=void 0,u.endFlowNode=void 0,u.nodeCount=0,u.identifierCount=0,u.symbolCount=0,u.parseDiagnostics=void 0,u.bindDiagnostics=void 0,u.bindSuggestionDiagnostics=void 0,u.lineMap=void 0,u.externalModuleIndicator=void 0,u.setExternalModuleIndicator=void 0,u.pragmas=void 0,u.checkJsDirective=void 0,u.referencedFiles=void 0,u.typeReferenceDirectives=void 0,u.libReferenceDirectives=void 0,u.amdDependencies=void 0,u.commentDirectives=void 0,u.identifiers=void 0,u.packageJsonLocations=void 0,u.packageJsonScope=void 0,u.imports=void 0,u.moduleAugmentations=void 0,u.ambientModuleNames=void 0,u.resolvedModules=void 0,u.classifiableNames=void 0,u.impliedNodeFormat=void 0,u}function Vc(n){let o=Object.create(n.redirectTarget);return Object.defineProperties(o,{id:{get(){return this.redirectInfo.redirectTarget.id},set(s){this.redirectInfo.redirectTarget.id=s}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(s){this.redirectInfo.redirectTarget.symbol=s}}}),o.redirectInfo=n,o}function of(n){let o=Vc(n.redirectInfo);return o.flags|=n.flags&-17,o.fileName=n.fileName,o.path=n.path,o.resolvedPath=n.resolvedPath,o.originalFileName=n.originalFileName,o.packageJsonLocations=n.packageJsonLocations,o.packageJsonScope=n.packageJsonScope,o.emitNode=void 0,o}function Xn(n){let o=t.createBaseSourceFileNode(312);o.flags|=n.flags&-17;for(let s in n)if(!(Qr(o,s)||!Qr(n,s))){if(s==="emitNode"){o.emitNode=void 0;continue}o[s]=n[s]}return o}function Hc(n){let o=n.redirectInfo?of(n):Xn(n);return Xr(o,n),o}function gh(n,o,s,u,g,I,W){let de=Hc(n);return de.statements=Y(o),de.isDeclarationFile=s,de.referencedFiles=u,de.typeReferenceDirectives=g,de.hasNoDefaultLib=I,de.libReferenceDirectives=W,de.transformFlags=De(de.statements)|V(de.endOfFileToken),de}function bh(n,o,s=n.isDeclarationFile,u=n.referencedFiles,g=n.typeReferenceDirectives,I=n.hasNoDefaultLib,W=n.libReferenceDirectives){return n.statements!==o||n.isDeclarationFile!==s||n.referencedFiles!==u||n.typeReferenceDirectives!==g||n.hasNoDefaultLib!==I||n.libReferenceDirectives!==W?r(gh(n,o,s,u,g,I,W),n):n}function sf(n,o=$e){let s=B(313);return s.prepends=o,s.sourceFiles=n,s.syntheticFileReferences=void 0,s.syntheticTypeReferences=void 0,s.syntheticLibReferences=void 0,s.hasNoDefaultLib=void 0,s}function _f(n,o,s=$e){return n.sourceFiles!==o||n.prepends!==s?r(sf(o,s),n):n}function Gc(n,o,s){let u=B(314);return u.prologues=n,u.syntheticReferences=o,u.texts=s,u.fileName="",u.text="",u.referencedFiles=$e,u.libReferenceDirectives=$e,u.getLineAndCharacterOfPosition=g=>to(u,g),u}function Xc(n,o){let s=B(n);return s.data=o,s}function vh(n){return Xc(307,n)}function cf(n,o){let s=Xc(308,n);return s.texts=o,s}function Th(n,o){return Xc(o?310:309,n)}function Sh(n){let o=B(311);return o.data=n.data,o.section=n,o}function qs(){let n=B(315);return n.javascriptText="",n.declarationText="",n}function lf(n,o=!1,s){let u=B(237);return u.type=n,u.isSpread=o,u.tupleNameSource=s,u}function xh(n){let o=B(358);return o._children=n,o}function wh(n){let o=B(359);return o.original=n,Ve(o,n),o}function uf(n,o){let s=B(360);return s.expression=n,s.original=o,s.transformFlags|=V(s.expression)|1,Ve(s,o),s}function pf(n,o){return n.expression!==o?r(uf(o,n.original),n):n}function Ch(n){if(Ta(n)&&!Tl(n)&&!n.original&&!n.emitNode&&!n.id){if(F_(n))return n.elements;if(Ct(n)&&Bx(n.operatorToken))return[n.left,n.right]}return n}function zs(n){let o=B(361);return o.elements=Y(Tv(n,Ch)),o.transformFlags|=De(o.elements),o}function ff(n,o){return n.elements!==o?r(zs(o),n):n}function $c(n,o){let s=B(362);return s.expression=n,s.thisArg=o,s.transformFlags|=V(s.expression)|V(s.thisArg),s}function Eh(n,o,s){return n.expression!==o||n.thisArg!==s?r($c(o,s),n):n}function Ah(n){let o=or(n.escapedText);return o.flags|=n.flags&-17,o.transformFlags=n.transformFlags,Xr(o,n),setIdentifierAutoGenerate(o,{...n.emitNode.autoGenerate}),o}function df(n){let o=or(n.escapedText);o.flags|=n.flags&-17,o.jsDoc=n.jsDoc,o.flowNode=n.flowNode,o.symbol=n.symbol,o.transformFlags=n.transformFlags,Xr(o,n);let s=getIdentifierTypeArguments(n);return s&&setIdentifierTypeArguments(o,s),o}function mf(n){let o=Sn(n.escapedText);return o.flags|=n.flags&-17,o.transformFlags=n.transformFlags,Xr(o,n),setIdentifierAutoGenerate(o,{...n.emitNode.autoGenerate}),o}function kh(n){let o=Sn(n.escapedText);return o.flags|=n.flags&-17,o.transformFlags=n.transformFlags,Xr(o,n),o}function Qc(n){if(n===void 0)return n;if(ii(n))return Hc(n);if(wa(n))return Ah(n);if(Ee(n))return df(n);if(Mg(n))return mf(n);if(jr(n))return kh(n);let o=ql(n.kind)?t.createBaseNode(n.kind):t.createBaseTokenNode(n.kind);o.flags|=n.flags&-17,o.transformFlags=n.transformFlags,Xr(o,n);for(let s in n)Qr(o,s)||!Qr(n,s)||(o[s]=n[s]);return o}function Dh(n,o,s){return fo(Z_(void 0,void 0,void 0,void 0,o?[o]:[],void 0,ua(n,!0)),void 0,s?[s]:[])}function Ph(n,o,s){return fo(ec(void 0,void 0,o?[o]:[],void 0,void 0,ua(n,!0)),void 0,s?[s]:[])}function ma(){return rc(Ze("0"))}function Ih(n){return Ps(void 0,!1,n)}function Nh(n){return kc(void 0,!1,Ns([fa(!1,void 0,n)]))}function Oh(n,o){return o==="null"?ue.createStrictEquality(n,fr()):o==="undefined"?ue.createStrictEquality(n,ma()):ue.createStrictEquality(vs(n),it(o))}function Mh(n,o){return o==="null"?ue.createStrictInequality(n,fr()):o==="undefined"?ue.createStrictInequality(n,ma()):ue.createStrictInequality(vs(n),it(o))}function ha(n,o,s){return y0(n)?zr(hs(n,void 0,o),void 0,void 0,s):fo(Mi(n,o),void 0,s)}function Lh(n,o,s){return ha(n,"bind",[o,...s])}function Ws(n,o,s){return ha(n,"call",[o,...s])}function Jh(n,o,s){return ha(n,"apply",[o,s])}function Ha(n,o,s){return ha(Ge(n),o,s)}function Rh(n,o){return ha(n,"slice",o===void 0?[]:[Cr(o)])}function jh(n,o){return ha(n,"concat",o)}function hf(n,o,s){return Ha("Object","defineProperty",[n,Cr(o),s])}function Fh(n,o){return Ha("Object","getOwnPropertyDescriptor",[n,Cr(o)])}function Bh(n,o,s){return Ha("Reflect","get",s?[n,o,s]:[n,o])}function Uh(n,o,s,u){return Ha("Reflect","set",u?[n,o,s,u]:[n,o,s])}function ya(n,o,s){return s?(n.push(Us(o,s)),!0):!1}function yf(n,o){let s=[];ya(s,"enumerable",Cr(n.enumerable)),ya(s,"configurable",Cr(n.configurable));let u=ya(s,"writable",Cr(n.writable));u=ya(s,"value",n.value)||u;let g=ya(s,"get",n.get);return g=ya(s,"set",n.set)||g,N.assert(!(u&&g),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),ds(s,!o)}function gf(n,o){switch(n.kind){case 217:return Ou(n,o);case 216:return Nu(n,n.type,o);case 234:return Wu(n,o,n.type);case 238:return Dn(n,o,n.type);case 235:return Vu(n,o);case 360:return pf(n,o)}}function c(n){return is(n)&&Ta(n)&&Ta(getSourceMapRange(n))&&Ta(getCommentRange(n))&&!mt(getSyntheticLeadingComments(n))&&!mt(getSyntheticTrailingComments(n))}function m(n,o,s=15){return n&&jm(n,s)&&!c(n)?gf(n,m(n.expression,o)):o}function b(n,o,s){if(!o)return n;let u=_p(o,o.label,l8(o.statement)?b(n,o.statement):n);return s&&s(o),u}function w(n,o){let s=Gl(n);switch(s.kind){case 80:return o;case 110:case 9:case 10:case 11:return!1;case 209:return s.elements.length!==0;case 210:return s.properties.length>0;default:return!0}}function A(n,o,s,u=!1){let g=ls(n,15),I,W;return gd(g)?(I=Ut(),W=g):qf(g)?(I=Ut(),W=s!==void 0&&s<2?Ve(Ge("_super"),g):g):ti(g)&8192?(I=ma(),W=a().parenthesizeLeftSideOfAccess(g,!1)):Br(g)?w(g.expression,u)?(I=Gt(o),W=Mi(Ve(ue.createAssignment(I,g.expression),g.expression),g.name),Ve(W,g)):(I=g.expression,W=g):Ra(g)?w(g.expression,u)?(I=Gt(o),W=Y_(Ve(ue.createAssignment(I,g.expression),g.expression),g.argumentExpression),Ve(W,g)):(I=g.expression,W=g):(I=ma(),W=a().parenthesizeLeftSideOfAccess(n,!1)),{target:W,thisArg:I}}function R(n,o){return Mi(K_(ds([Cn(void 0,"value",[Bn(void 0,void 0,n,void 0,void 0,void 0)],ua([Es(o)]))])),"value")}function te(n){return n.length>10?zs(n):Rd(n,ue.createComma)}function le(n,o,s,u=0,g){let I=g?n&&Kd(n):Bl(n);if(I&&Ee(I)&&!wa(I)){let W=Xi(Ve(Qc(I),I),I.parent);return u|=ti(I),s||(u|=96),o||(u|=3072),u&&setEmitFlags(W,u),W}return Tn(n)}function ne(n,o,s){return le(n,o,s,98304)}function ie(n,o,s,u){return le(n,o,s,32768,u)}function ve(n,o,s){return le(n,o,s,16384)}function He(n,o,s){return le(n,o,s)}function Be(n,o,s,u){let g=Mi(n,Ta(o)?o:Qc(o));Ve(g,o);let I=0;return u||(I|=96),s||(I|=3072),I&&setEmitFlags(g,I),g}function Ue(n,o,s,u){return n&&gr(o,1)?Be(n,le(o),s,u):ve(o,s,u)}function Rt(n,o,s,u){let g=mi(n,o,0,s);return hi(n,o,g,u)}function Gr(n){return mn(n.expression)&&n.expression.text==="use strict"}function di(){return Fm(Es(it("use strict")))}function mi(n,o,s=0,u){N.assert(o.length===0,"Prologue directives should be at the first statement in the target statements array");let g=!1,I=n.length;for(;sde&&Er.splice(g,0,...o.slice(de,We)),de>W&&Er.splice(u,0,...o.slice(W,de)),W>I&&Er.splice(s,0,...o.slice(I,W)),I>0)if(s===0)Er.splice(0,0,...o.slice(0,I));else{let $n=new Map;for(let yi=0;yi=0;yi--){let Vs=o[yi];$n.has(Vs.expression.text)||Er.unshift(Vs)}}return va(n)?Ve(Y(Er,n.hasTrailingComma),n):n}function bf(n,o){let s;return typeof o=="number"?s=Or(o):s=o,No(n)?tn(n,s,n.name,n.constraint,n.default):Ma(n)?Un(n,s,n.dotDotDotToken,n.name,n.questionToken,n.type,n.initializer):u6(n)?he(n,s,n.typeParameters,n.parameters,n.type):Zl(n)?qn(n,s,n.name,n.questionToken,n.type):oo(n)?oe(n,s,n.name,n.questionToken??n.exclamationToken,n.type,n.initializer):Wx(n)?Se(n,s,n.name,n.questionToken,n.typeParameters,n.parameters,n.type):d_(n)?z(n,s,n.asteriskToken,n.name,n.questionToken,n.typeParameters,n.parameters,n.type,n.body):J_(n)?lt(n,s,n.parameters,n.body):m_(n)?qr(n,s,n.name,n.parameters,n.type,n.body):Qo(n)?zn(n,s,n.name,n.parameters,n.body):l6(n)?Vn(n,s,n.parameters,n.type):km(n)?Mu(n,s,n.asteriskToken,n.name,n.typeParameters,n.parameters,n.type,n.body):Dm(n)?tc(n,s,n.typeParameters,n.parameters,n.type,n.equalsGreaterThanToken,n.body):Il(n)?sc(n,s,n.name,n.typeParameters,n.heritageClauses,n.members):as(n)?pc(n,s,n.declarationList):os(n)?fp(n,s,n.asteriskToken,n.name,n.typeParameters,n.parameters,n.type,n.body):Yo(n)?Tc(n,s,n.name,n.typeParameters,n.heritageClauses,n.members):su(n)?gt(n,s,n.name,n.typeParameters,n.heritageClauses,n.members):T6(n)?Sc(n,s,n.name,n.typeParameters,n.type):S6(n)?mp(n,s,n.name,n.members):Yi(n)?ji(n,s,n.name,n.body):w6(n)?gp(n,s,n.isTypeOnly,n.name,n.moduleReference):C6(n)?vp(n,s,n.importClause,n.moduleSpecifier,n.assertClause):ss(n)?Fi(n,s,n.expression):B_(n)?Dc(n,s,n.isTypeOnly,n.exportClause,n.moduleSpecifier,n.assertClause):N.assertNever(n)}function zh(n,o){return Ma(n)?Un(n,o,n.dotDotDotToken,n.name,n.questionToken,n.type,n.initializer):oo(n)?oe(n,o,n.name,n.questionToken??n.exclamationToken,n.type,n.initializer):d_(n)?z(n,o,n.asteriskToken,n.name,n.questionToken,n.typeParameters,n.parameters,n.type,n.body):m_(n)?qr(n,o,n.name,n.parameters,n.type,n.body):Qo(n)?zn(n,o,n.name,n.parameters,n.body):Il(n)?sc(n,o,n.name,n.typeParameters,n.heritageClauses,n.members):Yo(n)?Tc(n,o,n.name,n.typeParameters,n.heritageClauses,n.members):N.assertNever(n)}function Oe(n){return n?Y(n):void 0}function Xe(n){return typeof n=="string"?Ge(n):n}function Cr(n){return typeof n=="string"?it(n):typeof n=="number"?Ze(n):typeof n=="boolean"?n?ht():wn():n}function To(n){return n&&a().parenthesizeExpressionForDisallowedComma(n)}function lr(n){return typeof n=="number"?vt(n):n}function on(n){return n&&A6(n)?Ve(Xr(fc(),n),n):n}function vf(n){return typeof n=="string"||n&&!ki(n)?As(n,void 0,void 0,void 0):n}}function AL(e,t){return e!==t&&Ve(e,t),e}function kL(e,t){return e!==t&&(Xr(e,t),Ve(e,t)),e}function kf(e){switch(e){case 351:return"type";case 349:return"returns";case 350:return"this";case 347:return"enum";case 337:return"author";case 339:return"class";case 340:return"public";case 341:return"private";case 342:return"protected";case 343:return"readonly";case 344:return"override";case 352:return"template";case 353:return"typedef";case 348:return"param";case 355:return"prop";case 345:return"callback";case 346:return"overload";case 335:return"augments";case 336:return"implements";default:return N.fail(`Unsupported kind: ${N.formatSyntaxKind(e)}`)}}function DL(e,t){switch(_n||(_n=ns(99,!1,0)),e){case 15:_n.setText("`"+t+"`");break;case 16:_n.setText("`"+t+"${");break;case 17:_n.setText("}"+t+"${");break;case 18:_n.setText("}"+t+"`");break}let r=_n.scan();if(r===20&&(r=_n.reScanTemplateToken(!1)),_n.isUnterminated())return _n.setText(void 0),$0;let a;switch(r){case 15:case 16:case 17:case 18:a=_n.getTokenValue();break}return a===void 0||_n.scan()!==1?(_n.setText(void 0),$0):(_n.setText(void 0),a)}function In(e){return e&&Ee(e)?e_(e):V(e)}function e_(e){return V(e)&-67108865}function PL(e,t){return t|e.transformFlags&134234112}function V(e){if(!e)return 0;let t=e.transformFlags&~Jx(e.kind);return Yd(e)&&zl(e.name)?PL(e.name,t):t}function De(e){return e?e.transformFlags:0}function Vb(e){let t=0;for(let r of e)t|=V(r);e.transformFlags=t}function Jx(e){if(e>=182&&e<=205)return-2;switch(e){case 213:case 214:case 209:return-2147450880;case 267:return-1941676032;case 169:return-2147483648;case 219:return-2072174592;case 218:case 262:return-1937940480;case 261:return-2146893824;case 263:case 231:return-2147344384;case 176:return-1937948672;case 172:return-2013249536;case 174:case 177:case 178:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 168:case 171:case 173:case 179:case 180:case 181:case 264:case 265:return-2;case 210:return-2147278848;case 299:return-2147418112;case 206:case 207:return-2147450880;case 216:case 238:case 234:case 360:case 217:case 108:return-2147483648;case 211:case 212:return-2147483648;default:return-2147483648}}function Yc(e){return e.flags|=16,e}function IL(e,t,r){let a,_,p,d,h,l,v,y,C,S;b_(e)?(p="",d=e,h=e.length,l=t,v=r):(N.assert(t==="js"||t==="dts"),p=(t==="js"?e.javascriptPath:e.declarationPath)||"",l=t==="js"?e.javascriptMapPath:e.declarationMapPath,y=()=>t==="js"?e.javascriptText:e.declarationText,C=()=>t==="js"?e.javascriptMapText:e.declarationMapText,h=()=>y().length,e.buildInfo&&e.buildInfo.bundle&&(N.assert(r===void 0||typeof r=="boolean"),a=r,_=t==="js"?e.buildInfo.bundle.js:e.buildInfo.bundle.dts,S=e.oldFileOfCurrentEmit));let k=S?OL(N.checkDefined(_)):NL(_,a,h);return k.fileName=p,k.sourceMapPath=l,k.oldFileOfCurrentEmit=S,y&&C?(Object.defineProperty(k,"text",{get:y}),Object.defineProperty(k,"sourceMapText",{get:C})):(N.assert(!S),k.text=d??"",k.sourceMapText=v),k}function NL(e,t,r){let a,_,p,d,h,l,v,y;for(let S of e?e.sections:$e)switch(S.kind){case"prologue":a=xt(a,Ve(Ln.createUnparsedPrologue(S.data),S));break;case"emitHelpers":_=xt(_,getAllUnscopedEmitHelpers().get(S.data));break;case"no-default-lib":y=!0;break;case"reference":p=xt(p,{pos:-1,end:-1,fileName:S.data});break;case"type":d=xt(d,{pos:-1,end:-1,fileName:S.data});break;case"type-import":d=xt(d,{pos:-1,end:-1,fileName:S.data,resolutionMode:99});break;case"type-require":d=xt(d,{pos:-1,end:-1,fileName:S.data,resolutionMode:1});break;case"lib":h=xt(h,{pos:-1,end:-1,fileName:S.data});break;case"prepend":let k;for(let L of S.texts)(!t||L.kind!=="internal")&&(k=xt(k,Ve(Ln.createUnparsedTextLike(L.data,L.kind==="internal"),L)));l=Rr(l,k),v=xt(v,Ln.createUnparsedPrepend(S.data,k??$e));break;case"internal":if(t){v||(v=[]);break}case"text":v=xt(v,Ve(Ln.createUnparsedTextLike(S.data,S.kind==="internal"),S));break;default:N.assertNever(S)}if(!v){let S=Ln.createUnparsedTextLike(void 0,!1);Ed(S,0,typeof r=="function"?r():r),v=[S]}let C=z_.createUnparsedSource(a??$e,void 0,v);return a_(a,C),a_(v,C),a_(l,C),C.hasNoDefaultLib=y,C.helpers=_,C.referencedFiles=p||$e,C.typeReferenceDirectives=d,C.libReferenceDirectives=h||$e,C}function OL(e){let t,r;for(let _ of e.sections)switch(_.kind){case"internal":case"text":t=xt(t,Ve(Ln.createUnparsedTextLike(_.data,_.kind==="internal"),_));break;case"no-default-lib":case"reference":case"type":case"type-import":case"type-require":case"lib":r=xt(r,Ve(Ln.createUnparsedSyntheticReference(_),_));break;case"prologue":case"emitHelpers":case"prepend":break;default:N.assertNever(_)}let a=Ln.createUnparsedSource($e,r,t??$e);return a_(r,a),a_(t,a),a.helpers=Aa(e.sources&&e.sources.helpers,_=>getAllUnscopedEmitHelpers().get(_)),a}function ML(e,t,r,a,_,p){return b_(e)?jx(void 0,e,r,a,void 0,t,_,p):Rx(e,t,r,a,_,p)}function Rx(e,t,r,a,_,p,d,h){let l=z_.createInputFiles();l.javascriptPath=t,l.javascriptMapPath=r,l.declarationPath=a,l.declarationMapPath=_,l.buildInfoPath=p;let v=new Map,y=L=>{if(L===void 0)return;let G=v.get(L);return G===void 0&&(G=e(L),v.set(L,G!==void 0?G:!1)),G!==!1?G:void 0},C=L=>{let G=y(L);return G!==void 0?G:`/* Input file ${L} was missing */\r -`},S;return Object.defineProperties(l,{javascriptText:{get:()=>C(t)},javascriptMapText:{get:()=>y(r)},declarationText:{get:()=>C(N.checkDefined(a))},declarationMapText:{get:()=>y(_)},buildInfo:{get:()=>{if(S===void 0&&p)if(d!=null&&d.getBuildInfo)S=d.getBuildInfo(p,h.configFilePath)??!1;else{let L=y(p);S=L!==void 0?getBuildInfo(p,L)??!1:!1}return S||void 0}}}),l}function jx(e,t,r,a,_,p,d,h,l,v,y){let C=z_.createInputFiles();return C.javascriptPath=e,C.javascriptText=t,C.javascriptMapPath=r,C.javascriptMapText=a,C.declarationPath=_,C.declarationText=p,C.declarationMapPath=d,C.declarationMapText=h,C.buildInfoPath=l,C.buildInfo=v,C.oldFileOfCurrentEmit=y,C}function LL(e,t,r){return new(Gb||(Gb=wt.getSourceMapSourceConstructor()))(e,t,r)}function Xr(e,t){if(e.original!==t&&(e.original=t,t)){let r=t.emitNode;r&&(e.emitNode=JL(r,e.emitNode))}return e}function JL(e,t){let{flags:r,internalFlags:a,leadingComments:_,trailingComments:p,commentRange:d,sourceMapRange:h,tokenSourceMapRanges:l,constantValue:v,helpers:y,startsOnNewLine:C,snippetElement:S,classThis:k,assignedName:L}=e;if(t||(t={}),r&&(t.flags=r),a&&(t.internalFlags=a&-9),_&&(t.leadingComments=Rr(_.slice(),t.leadingComments)),p&&(t.trailingComments=Rr(p.slice(),t.trailingComments)),d&&(t.commentRange=d),h&&(t.sourceMapRange=h),l&&(t.tokenSourceMapRanges=RL(l,t.tokenSourceMapRanges)),v!==void 0&&(t.constantValue=v),y)for(let G of y)t.helpers=wv(t.helpers,G);return C!==void 0&&(t.startsOnNewLine=C),S!==void 0&&(t.snippetElement=S),k&&(t.classThis=k),L&&(t.assignedName=L),t}function RL(e,t){t||(t=[]);for(let r in e)t[r]=e[r];return t}var il,X0,a6,_n,$0,Xs,Hb,Ln,Gb,jL=Vt({"src/compiler/factory/nodeFactory.ts"(){"use strict";Dr(),il=0,X0=(e=>(e[e.None=0]="None",e[e.NoParenthesizerRules=1]="NoParenthesizerRules",e[e.NoNodeConverters=2]="NoNodeConverters",e[e.NoIndentationOnFreshPropertyAccess=4]="NoIndentationOnFreshPropertyAccess",e[e.NoOriginalNode=8]="NoOriginalNode",e))(X0||{}),a6=[],$0={},Xs=Mx(),Hb={createBaseSourceFileNode:e=>Yc(Xs.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>Yc(Xs.createBaseIdentifierNode(e)),createBasePrivateIdentifierNode:e=>Yc(Xs.createBasePrivateIdentifierNode(e)),createBaseTokenNode:e=>Yc(Xs.createBaseTokenNode(e)),createBaseNode:e=>Yc(Xs.createBaseNode(e))},Ln=kd(4,Hb)}}),FL=()=>{},BL=()=>{};function lo(e){return e.kind===9}function o6(e){return e.kind===10}function mn(e){return e.kind===11}function Dd(e){return e.kind===12}function UL(e){return e.kind===14}function Fx(e){return e.kind===15}function qL(e){return e.kind===16}function zL(e){return e.kind===17}function WL(e){return e.kind===18}function VL(e){return e.kind===26}function Bx(e){return e.kind===28}function s6(e){return e.kind===40}function _6(e){return e.kind===41}function HL(e){return e.kind===42}function Pd(e){return e.kind===54}function Pl(e){return e.kind===58}function GL(e){return e.kind===59}function XL(e){return e.kind===29}function $L(e){return e.kind===39}function Ee(e){return e.kind===80}function jr(e){return e.kind===81}function Ux(e){return e.kind===95}function QL(e){return e.kind===90}function al(e){return e.kind===134}function YL(e){return e.kind===131}function KL(e){return e.kind===135}function qx(e){return e.kind===148}function ZL(e){return e.kind===126}function eJ(e){return e.kind===128}function tJ(e){return e.kind===164}function rJ(e){return e.kind===129}function qf(e){return e.kind===108}function zx(e){return e.kind===102}function nJ(e){return e.kind===84}function M_(e){return e.kind===166}function ao(e){return e.kind===167}function No(e){return e.kind===168}function Ma(e){return e.kind===169}function L_(e){return e.kind===170}function Zl(e){return e.kind===171}function oo(e){return e.kind===172}function Wx(e){return e.kind===173}function d_(e){return e.kind===174}function eu(e){return e.kind===175}function J_(e){return e.kind===176}function m_(e){return e.kind===177}function Qo(e){return e.kind===178}function c6(e){return e.kind===179}function Vx(e){return e.kind===180}function l6(e){return e.kind===181}function Hx(e){return e.kind===182}function R_(e){return e.kind===183}function tu(e){return e.kind===184}function u6(e){return e.kind===185}function Gx(e){return e.kind===186}function Am(e){return e.kind===187}function Xx(e){return e.kind===188}function $x(e){return e.kind===189}function p6(e){return e.kind===202}function Qx(e){return e.kind===190}function Yx(e){return e.kind===191}function Kx(e){return e.kind===192}function Zx(e){return e.kind===193}function e8(e){return e.kind===194}function t8(e){return e.kind===195}function f6(e){return e.kind===196}function d6(e){return e.kind===197}function r8(e){return e.kind===198}function n8(e){return e.kind===199}function i8(e){return e.kind===200}function m6(e){return e.kind===201}function ru(e){return e.kind===205}function iJ(e){return e.kind===204}function aJ(e){return e.kind===203}function oJ(e){return e.kind===206}function sJ(e){return e.kind===207}function nu(e){return e.kind===208}function iu(e){return e.kind===209}function uo(e){return e.kind===210}function Br(e){return e.kind===211}function Ra(e){return e.kind===212}function j_(e){return e.kind===213}function a8(e){return e.kind===214}function o8(e){return e.kind===215}function _J(e){return e.kind===216}function is(e){return e.kind===217}function km(e){return e.kind===218}function Dm(e){return e.kind===219}function cJ(e){return e.kind===220}function lJ(e){return e.kind===221}function h6(e){return e.kind===222}function uJ(e){return e.kind===223}function Pm(e){return e.kind===224}function s8(e){return e.kind===225}function Ct(e){return e.kind===226}function pJ(e){return e.kind===227}function fJ(e){return e.kind===228}function dJ(e){return e.kind===229}function y6(e){return e.kind===230}function Il(e){return e.kind===231}function Im(e){return e.kind===232}function g6(e){return e.kind===233}function mJ(e){return e.kind===234}function hJ(e){return e.kind===238}function jo(e){return e.kind===235}function b6(e){return e.kind===236}function yJ(e){return e.kind===237}function _8(e){return e.kind===360}function F_(e){return e.kind===361}function gJ(e){return e.kind===239}function bJ(e){return e.kind===240}function au(e){return e.kind===241}function as(e){return e.kind===243}function vJ(e){return e.kind===242}function ou(e){return e.kind===244}function TJ(e){return e.kind===245}function SJ(e){return e.kind===246}function xJ(e){return e.kind===247}function c8(e){return e.kind===248}function wJ(e){return e.kind===249}function CJ(e){return e.kind===250}function EJ(e){return e.kind===251}function AJ(e){return e.kind===252}function kJ(e){return e.kind===253}function DJ(e){return e.kind===254}function PJ(e){return e.kind===255}function l8(e){return e.kind===256}function IJ(e){return e.kind===257}function NJ(e){return e.kind===258}function OJ(e){return e.kind===259}function ki(e){return e.kind===260}function v6(e){return e.kind===261}function os(e){return e.kind===262}function Yo(e){return e.kind===263}function su(e){return e.kind===264}function T6(e){return e.kind===265}function S6(e){return e.kind===266}function Yi(e){return e.kind===267}function u8(e){return e.kind===268}function MJ(e){return e.kind===269}function x6(e){return e.kind===270}function w6(e){return e.kind===271}function C6(e){return e.kind===272}function LJ(e){return e.kind===273}function JJ(e){return e.kind===302}function RJ(e){return e.kind===300}function jJ(e){return e.kind===301}function E6(e){return e.kind===274}function Nm(e){return e.kind===280}function FJ(e){return e.kind===275}function p8(e){return e.kind===276}function ss(e){return e.kind===277}function B_(e){return e.kind===278}function f8(e){return e.kind===279}function d8(e){return e.kind===281}function BJ(e){return e.kind===282}function A6(e){return e.kind===359}function UJ(e){return e.kind===362}function Om(e){return e.kind===283}function Q0(e){return e.kind===284}function qJ(e){return e.kind===285}function Oo(e){return e.kind===286}function zf(e){return e.kind===287}function dl(e){return e.kind===288}function k6(e){return e.kind===289}function zJ(e){return e.kind===290}function WJ(e){return e.kind===291}function D6(e){return e.kind===292}function VJ(e){return e.kind===293}function HJ(e){return e.kind===294}function U_(e){return e.kind===295}function GJ(e){return e.kind===296}function m8(e){return e.kind===297}function Nl(e){return e.kind===298}function XJ(e){return e.kind===299}function _s(e){return e.kind===303}function _u(e){return e.kind===304}function h8(e){return e.kind===305}function y8(e){return e.kind===306}function $J(e){return e.kind===308}function ii(e){return e.kind===312}function QJ(e){return e.kind===313}function YJ(e){return e.kind===314}function g8(e){return e.kind===316}function Wf(e){return e.kind===317}function r_(e){return e.kind===318}function KJ(e){return e.kind===331}function ZJ(e){return e.kind===332}function eR(e){return e.kind===333}function tR(e){return e.kind===319}function rR(e){return e.kind===320}function b8(e){return e.kind===321}function nR(e){return e.kind===322}function iR(e){return e.kind===323}function Mm(e){return e.kind===324}function aR(e){return e.kind===325}function oR(e){return e.kind===326}function cs(e){return e.kind===327}function P6(e){return e.kind===329}function cu(e){return e.kind===330}function Lm(e){return e.kind===335}function sR(e){return e.kind===337}function v8(e){return e.kind===339}function _R(e){return e.kind===345}function I6(e){return e.kind===340}function N6(e){return e.kind===341}function O6(e){return e.kind===342}function M6(e){return e.kind===343}function T8(e){return e.kind===344}function L6(e){return e.kind===346}function J6(e){return e.kind===338}function cR(e){return e.kind===354}function S8(e){return e.kind===347}function h_(e){return e.kind===348}function R6(e){return e.kind===349}function x8(e){return e.kind===350}function lu(e){return e.kind===351}function Ko(e){return e.kind===352}function lR(e){return e.kind===353}function uR(e){return e.kind===334}function pR(e){return e.kind===355}function w8(e){return e.kind===336}function j6(e){return e.kind===357}function fR(e){return e.kind===356}function dR(e){return e.kind===358}var mR=Vt({"src/compiler/factory/nodeTests.ts"(){"use strict";Dr()}});function hR(e){return e.createExportDeclaration(void 0,!1,e.createNamedExports([]),void 0)}function Jm(e,t,r,a){if(ao(r))return Ve(e.createElementAccessExpression(t,r.expression),a);{let _=Ve(ro(r)?e.createPropertyAccessExpression(t,r):e.createElementAccessExpression(t,r),r);return addEmitFlags(_,128),_}}function F6(e,t){let r=z_.createIdentifier(e||"React");return Xi(r,Fl(t)),r}function B6(e,t,r){if(M_(t)){let a=B6(e,t.left,r),_=e.createIdentifier(Ot(t.right));return _.escapedText=t.right.escapedText,e.createPropertyAccessExpression(a,_)}else return F6(Ot(t),r)}function C8(e,t,r,a){return t?B6(e,t,a):e.createPropertyAccessExpression(F6(r,a),"createElement")}function yR(e,t,r,a){return t?B6(e,t,a):e.createPropertyAccessExpression(F6(r,a),"Fragment")}function gR(e,t,r,a,_,p){let d=[r];if(a&&d.push(a),_&&_.length>0)if(a||d.push(e.createNull()),_.length>1)for(let h of _)Fm(h),d.push(h);else d.push(_[0]);return Ve(e.createCallExpression(t,void 0,d),p)}function bR(e,t,r,a,_,p,d){let l=[yR(e,r,a,p),e.createNull()];if(_&&_.length>0)if(_.length>1)for(let v of _)Fm(v),l.push(v);else l.push(_[0]);return Ve(e.createCallExpression(C8(e,t,a,p),void 0,l),d)}function vR(e,t,r){if(v6(t)){let a=og(t.declarations),_=e.updateVariableDeclaration(a,a.name,void 0,void 0,r);return Ve(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[_])),t)}else{let a=Ve(e.createAssignment(t,r),t);return Ve(e.createExpressionStatement(a),t)}}function TR(e,t,r){return au(t)?e.updateBlock(t,Ve(e.createNodeArray([r,...t.statements]),t.statements)):e.createBlock(e.createNodeArray([t,r]),!0)}function E8(e,t){if(M_(t)){let r=E8(e,t.left),a=Xi(Ve(e.cloneNode(t.right),t.right),t.right.parent);return Ve(e.createPropertyAccessExpression(r,a),t)}else return Xi(Ve(e.cloneNode(t),t),t.parent)}function A8(e,t){return Ee(t)?e.createStringLiteralFromNode(t):ao(t)?Xi(Ve(e.cloneNode(t.expression),t.expression),t.expression.parent):Xi(Ve(e.cloneNode(t),t),t.parent)}function SR(e,t,r,a,_){let{firstAccessor:p,getAccessor:d,setAccessor:h}=P2(t,r);if(r===p)return Ve(e.createObjectDefinePropertyCall(a,A8(e,r.name),e.createPropertyDescriptor({enumerable:e.createFalse(),configurable:!0,get:d&&Ve(Xr(e.createFunctionExpression(yd(d),void 0,void 0,void 0,d.parameters,void 0,d.body),d),d),set:h&&Ve(Xr(e.createFunctionExpression(yd(h),void 0,void 0,void 0,h.parameters,void 0,h.body),h),h)},!_)),p)}function xR(e,t,r){return Xr(Ve(e.createAssignment(Jm(e,r,t.name,t.name),t.initializer),t),t)}function wR(e,t,r){return Xr(Ve(e.createAssignment(Jm(e,r,t.name,t.name),e.cloneNode(t.name)),t),t)}function CR(e,t,r){return Xr(Ve(e.createAssignment(Jm(e,r,t.name,t.name),Xr(Ve(e.createFunctionExpression(yd(t),t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t)}function ER(e,t,r,a){switch(r.name&&jr(r.name)&&N.failBadSyntaxKind(r.name,"Private identifiers are not allowed in object literals."),r.kind){case 177:case 178:return SR(e,t.properties,r,a,!!t.multiLine);case 303:return xR(e,r,a);case 304:return wR(e,r,a);case 174:return CR(e,r,a)}}function AR(e,t,r,a,_){let p=t.operator;N.assert(p===46||p===47,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");let d=e.createTempVariable(a);r=e.createAssignment(d,r),Ve(r,t.operand);let h=Pm(t)?e.createPrefixUnaryExpression(p,d):e.createPostfixUnaryExpression(d,p);return Ve(h,t),_&&(h=e.createAssignment(_,h),Ve(h,t)),r=e.createComma(r,h),Ve(r,t),s8(t)&&(r=e.createComma(r,d),Ve(r,t)),r}function kR(e){return(ti(e)&65536)!==0}function Y0(e){return(ti(e)&32768)!==0}function DR(e){return(ti(e)&16384)!==0}function k8(e){return mn(e.expression)&&e.expression.text==="use strict"}function D8(e){for(let t of e)if(Ea(t)){if(k8(t))return t}else break}function P8(e){let t=g_(e);return t!==void 0&&Ea(t)&&k8(t)}function Rm(e){return e.kind===226&&e.operatorToken.kind===28}function PR(e){return Rm(e)||F_(e)}function I8(e){return is(e)&&Wt(e)&&!!em(e)}function IR(e){let t=tm(e);return N.assertIsDefined(t),t}function jm(e,t=15){switch(e.kind){case 217:return t&16&&I8(e)?!1:(t&1)!==0;case 216:case 234:case 233:case 238:return(t&2)!==0;case 235:return(t&4)!==0;case 360:return(t&8)!==0}return!1}function ls(e,t=15){for(;jm(e,t);)e=e.expression;return e}function NR(e,t=15){let r=e.parent;for(;jm(r,t);)r=r.parent,N.assert(r);return r}function OR(e){return ls(e,6)}function Fm(e){return setStartsOnNewLine(e,!0)}function N8(e){let t=jl(e,ii),r=t&&t.emitNode;return r&&r.externalHelpersModuleName}function MR(e){let t=jl(e,ii),r=t&&t.emitNode;return!!r&&(!!r.externalHelpersModuleName||!!r.externalHelpers)}function LR(e,t,r,a,_,p,d){if(a.importHelpers&&Xg(r,a)){let h,l=ni(a);if(l>=5&&l<=99||r.impliedNodeFormat===99){let v=getEmitHelpers(r);if(v){let y=[];for(let C of v)if(!C.scoped){let S=C.importName;S&&Ol(y,S)}if(mt(y)){y.sort(Ci),h=e.createNamedImports(Aa(y,k=>P3(r,k)?e.createImportSpecifier(!1,void 0,e.createIdentifier(k)):e.createImportSpecifier(!1,e.createIdentifier(k),t.getUnscopedHelperName(k))));let C=jl(r,ii),S=getOrCreateEmitNode(C);S.externalHelpers=!0}}}else{let v=O8(e,r,a,_,p||d);v&&(h=e.createNamespaceImport(v))}if(h){let v=e.createImportDeclaration(void 0,e.createImportClause(!1,void 0,h),e.createStringLiteral(wm),void 0);return addInternalEmitFlags(v,2),v}}}function O8(e,t,r,a,_){if(r.importHelpers&&Xg(t,r)){let p=N8(t);if(p)return p;let d=ni(r),h=(a||U2(r)&&_)&&d!==4&&(d<5||t.impliedNodeFormat===1);if(!h){let l=getEmitHelpers(t);if(l){for(let v of l)if(!v.scoped){h=!0;break}}}if(h){let l=jl(t,ii),v=getOrCreateEmitNode(l);return v.externalHelpersModuleName||(v.externalHelpersModuleName=e.createUniqueName(wm))}}}function JR(e,t,r){let a=fT(t);if(a&&!dT(t)&&!L3(t)){let _=a.name;return wa(_)?_:e.createIdentifier(Xo(r,_)||Ot(_))}if(t.kind===272&&t.importClause||t.kind===278&&t.moduleSpecifier)return e.getGeneratedNameForNode(t)}function RR(e,t,r,a,_,p){let d=d2(t);if(d&&mn(d))return FR(t,a,e,_,p)||jR(e,d,r)||e.cloneNode(d)}function jR(e,t,r){let a=r.renamedDependencies&&r.renamedDependencies.get(t.text);return a?e.createStringLiteral(a):void 0}function M8(e,t,r,a){if(t){if(t.moduleName)return e.createStringLiteral(t.moduleName);if(!t.isDeclarationFile&&A2(a))return e.createStringLiteral(E2(r,t.fileName))}}function FR(e,t,r,a,_){return M8(r,a.getExternalModuleFileFromDeclaration(e),t,_)}function L8(e){if(Bg(e))return e.initializer;if(_s(e)){let t=e.initializer;return Na(t,!0)?t.right:void 0}if(_u(e))return e.objectAssignmentInitializer;if(Na(e,!0))return e.right;if(y6(e))return L8(e.expression)}function Mo(e){if(Bg(e))return e.name;if(Fg(e)){switch(e.kind){case 303:return Mo(e.initializer);case 304:return e.name;case 305:return Mo(e.expression)}return}return Na(e,!0)?Mo(e.left):y6(e)?Mo(e.expression):e}function BR(e){switch(e.kind){case 169:case 208:return e.dotDotDotToken;case 230:case 305:return e}}function UR(e){let t=J8(e);return N.assert(!!t||h8(e),"Invalid property name for binding element."),t}function J8(e){switch(e.kind){case 208:if(e.propertyName){let r=e.propertyName;return jr(r)?N.failBadSyntaxKind(r):ao(r)&&Xb(r.expression)?r.expression:r}break;case 303:if(e.name){let r=e.name;return jr(r)?N.failBadSyntaxKind(r):ao(r)&&Xb(r.expression)?r.expression:r}break;case 305:return e.name&&jr(e.name)?N.failBadSyntaxKind(e.name):e.name}let t=Mo(e);if(t&&zl(t))return t}function Xb(e){let t=e.kind;return t===11||t===9}function R8(e){switch(e.kind){case 206:case 207:case 209:return e.elements;case 210:return e.properties}}function K0(e){if(e){let t=e;for(;;){if(Ee(t)||!t.body)return Ee(t)?t:t.name;t=t.body}}}function qR(e){let t=e.kind;return t===176||t===178}function j8(e){let t=e.kind;return t===176||t===177||t===178}function zR(e){let t=e.kind;return t===303||t===304||t===262||t===176||t===181||t===175||t===282||t===243||t===264||t===265||t===266||t===267||t===271||t===272||t===270||t===278||t===277}function WR(e){let t=e.kind;return t===175||t===303||t===304||t===282||t===270}function VR(e){return Pl(e)||Pd(e)}function HR(e){return Ee(e)||d6(e)}function GR(e){return qx(e)||s6(e)||_6(e)}function XR(e){return Pl(e)||s6(e)||_6(e)}function $R(e){return Ee(e)||mn(e)}function QR(e){let t=e.kind;return t===106||t===112||t===97||Og(e)||Pm(e)}function YR(e){return e===43}function KR(e){return e===42||e===44||e===45}function ZR(e){return YR(e)||KR(e)}function ej(e){return e===40||e===41}function tj(e){return ej(e)||ZR(e)}function rj(e){return e===48||e===49||e===50}function nj(e){return rj(e)||tj(e)}function ij(e){return e===30||e===33||e===32||e===34||e===104||e===103}function aj(e){return ij(e)||nj(e)}function oj(e){return e===35||e===37||e===36||e===38}function sj(e){return oj(e)||aj(e)}function _j(e){return e===51||e===52||e===53}function cj(e){return _j(e)||sj(e)}function lj(e){return e===56||e===57}function uj(e){return lj(e)||cj(e)}function pj(e){return e===61||uj(e)||D_(e)}function fj(e){return pj(e)||e===28}function dj(e){return fj(e.kind)}function mj(e,t,r,a,_,p){let d=new B8(e,t,r,a,_,p);return h;function h(l,v){let y={value:void 0},C=[Nd.enter],S=[l],k=[void 0],L=0;for(;C[L]!==Nd.done;)L=C[L](d,L,C,S,k,y,v);return N.assertEqual(L,0),y.value}}function F8(e){return e===95||e===90}function hj(e){let t=e.kind;return F8(t)}function yj(e){let t=e.kind;return bi(t)&&!F8(t)}function gj(e,t){if(t!==void 0)return t.length===0?t:Ve(e.createNodeArray([],t.hasTrailingComma),t)}function bj(e){var t;let r=e.emitNode.autoGenerate;if(r.flags&4){let a=r.id,_=e,p=_.original;for(;p;){_=p;let d=(t=_.emitNode)==null?void 0:t.autoGenerate;if(ro(_)&&(d===void 0||d.flags&4&&d.id!==a))break;p=_.original}return _}return e}function Z0(e,t){return typeof e=="object"?Id(!1,e.prefix,e.node,e.suffix,t):typeof e=="string"?e.length>0&&e.charCodeAt(0)===35?e.slice(1):e:""}function vj(e,t){return typeof e=="string"?e:Tj(e,N.checkDefined(t))}function Tj(e,t){return Mg(e)?t(e).slice(1):wa(e)?t(e):jr(e)?e.escapedText.slice(1):Ot(e)}function Id(e,t,r,a,_){return t=Z0(t,_),a=Z0(a,_),r=vj(r,_),`${e?"#":""}${t}${r}${a}`}function Sj(e,t,r,a){return e.updatePropertyDeclaration(t,r,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage"),void 0,void 0,a)}function xj(e,t,r,a,_=e.createThis()){return e.createGetAccessorDeclaration(r,a,[],void 0,e.createBlock([e.createReturnStatement(e.createPropertyAccessExpression(_,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")))]))}function wj(e,t,r,a,_=e.createThis()){return e.createSetAccessorDeclaration(r,a,[e.createParameterDeclaration(void 0,void 0,"value")],e.createBlock([e.createExpressionStatement(e.createAssignment(e.createPropertyAccessExpression(_,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")),e.createIdentifier("value")))]))}function Cj(e){let t=e.expression;for(;;){if(t=ls(t),F_(t)){t=ka(t.elements);continue}if(Rm(t)){t=t.right;continue}if(Na(t,!0)&&wa(t.left))return t;break}}function Ej(e){return is(e)&&Ta(e)&&!e.emitNode}function ol(e,t){if(Ej(e))ol(e.expression,t);else if(Rm(e))ol(e.left,t),ol(e.right,t);else if(F_(e))for(let r of e.elements)ol(r,t);else t.push(e)}function Aj(e){let t=[];return ol(e,t),t}function U6(e){if(e.transformFlags&65536)return!0;if(e.transformFlags&128)for(let t of R8(e)){let r=Mo(t);if(r&&l3(r)&&(r.transformFlags&65536||r.transformFlags&128&&U6(r)))return!0}return!1}var Nd,B8,kj=Vt({"src/compiler/factory/utilities.ts"(){"use strict";Dr(),(e=>{function t(y,C,S,k,L,G,K){let ue=C>0?L[C-1]:void 0;return N.assertEqual(S[C],t),L[C]=y.onEnter(k[C],ue,K),S[C]=h(y,t),C}e.enter=t;function r(y,C,S,k,L,G,K){N.assertEqual(S[C],r),N.assertIsDefined(y.onLeft),S[C]=h(y,r);let ue=y.onLeft(k[C].left,L[C],k[C]);return ue?(v(C,k,ue),l(C,S,k,L,ue)):C}e.left=r;function a(y,C,S,k,L,G,K){return N.assertEqual(S[C],a),N.assertIsDefined(y.onOperator),S[C]=h(y,a),y.onOperator(k[C].operatorToken,L[C],k[C]),C}e.operator=a;function _(y,C,S,k,L,G,K){N.assertEqual(S[C],_),N.assertIsDefined(y.onRight),S[C]=h(y,_);let ue=y.onRight(k[C].right,L[C],k[C]);return ue?(v(C,k,ue),l(C,S,k,L,ue)):C}e.right=_;function p(y,C,S,k,L,G,K){N.assertEqual(S[C],p),S[C]=h(y,p);let ue=y.onExit(k[C],L[C]);if(C>0){if(C--,y.foldState){let Y=S[C]===p?"right":"left";L[C]=y.foldState(L[C],ue,Y)}}else G.value=ue;return C}e.exit=p;function d(y,C,S,k,L,G,K){return N.assertEqual(S[C],d),C}e.done=d;function h(y,C){switch(C){case t:if(y.onLeft)return r;case r:if(y.onOperator)return a;case a:if(y.onRight)return _;case _:return p;case p:return d;case d:return d;default:N.fail("Invalid state")}}e.nextState=h;function l(y,C,S,k,L){return y++,C[y]=t,S[y]=L,k[y]=void 0,y}function v(y,C,S){if(N.shouldAssert(2))for(;y>=0;)N.assert(C[y]!==S,"Circular traversal detected."),y--}})(Nd||(Nd={})),B8=class{constructor(e,t,r,a,_,p){this.onEnter=e,this.onLeft=t,this.onOperator=r,this.onRight=a,this.onExit=_,this.foldState=p}}}});function Ve(e,t){return t?Ya(e,t.pos,t.end):e}function q_(e){let t=e.kind;return t===168||t===169||t===171||t===172||t===173||t===174||t===176||t===177||t===178||t===181||t===185||t===218||t===219||t===231||t===243||t===262||t===263||t===264||t===265||t===266||t===267||t===271||t===272||t===277||t===278}function U8(e){let t=e.kind;return t===169||t===172||t===174||t===177||t===178||t===231||t===263}var Dj=Vt({"src/compiler/factory/utilitiesPublic.ts"(){"use strict";Dr()}});function P(e,t){return t&&e(t)}function _e(e,t,r){if(r){if(t)return t(r);for(let a of r){let _=e(a);if(_)return _}}}function q8(e,t){return e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42&&e.charCodeAt(t+3)!==47}function ml(e){return yr(e.statements,Pj)||Ij(e)}function Pj(e){return q_(e)&&Nj(e,95)||w6(e)&&Om(e.moduleReference)||C6(e)||ss(e)||B_(e)?e:void 0}function Ij(e){return e.flags&8388608?z8(e):void 0}function z8(e){return Oj(e)?e:Bt(e,z8)}function Nj(e,t){return mt(e.modifiers,r=>r.kind===t)}function Oj(e){return b6(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}function $b(e,t,r){return _e(t,r,e.typeParameters)||_e(t,r,e.parameters)||P(t,e.type)}function Qb(e,t,r){return _e(t,r,e.types)}function Yb(e,t,r){return P(t,e.type)}function Kb(e,t,r){return _e(t,r,e.elements)}function Zb(e,t,r){return P(t,e.expression)||P(t,e.questionDotToken)||_e(t,r,e.typeArguments)||_e(t,r,e.arguments)}function ev(e,t,r){return _e(t,r,e.statements)}function tv(e,t,r){return P(t,e.label)}function rv(e,t,r){return _e(t,r,e.modifiers)||P(t,e.name)||_e(t,r,e.typeParameters)||_e(t,r,e.heritageClauses)||_e(t,r,e.members)}function nv(e,t,r){return _e(t,r,e.elements)}function iv(e,t,r){return P(t,e.propertyName)||P(t,e.name)}function av(e,t,r){return P(t,e.tagName)||_e(t,r,e.typeArguments)||P(t,e.attributes)}function wo(e,t,r){return P(t,e.type)}function ov(e,t,r){return P(t,e.tagName)||(e.isNameFirst?P(t,e.name)||P(t,e.typeExpression):P(t,e.typeExpression)||P(t,e.name))||(typeof e.comment=="string"?void 0:_e(t,r,e.comment))}function Co(e,t,r){return P(t,e.tagName)||P(t,e.typeExpression)||(typeof e.comment=="string"?void 0:_e(t,r,e.comment))}function Kh(e,t,r){return P(t,e.name)}function Xa(e,t,r){return P(t,e.tagName)||(typeof e.comment=="string"?void 0:_e(t,r,e.comment))}function Mj(e,t,r){return P(t,e.expression)}function Bt(e,t,r){if(e===void 0||e.kind<=165)return;let a=$8[e.kind];return a===void 0?void 0:a(e,t,r)}function eg(e,t,r){let a=sv(e),_=[];for(;_.length=0;--h)a.push(p[h]),_.push(d)}else{let h=t(p,d);if(h){if(h==="skip")continue;return h}if(p.kind>=166)for(let l of sv(p))a.push(l),_.push(p)}}}function sv(e){let t=[];return Bt(e,r,r),t;function r(a){t.unshift(a)}}function W8(e){e.externalModuleIndicator=ml(e)}function V8(e,t,r,a=!1,_){var p,d,h,l;(p=xa)==null||p.push(xa.Phase.Parse,"createSourceFile",{path:e},!0),Mb("beforeParse");let v;(d=Kf)==null||d.logStartParseSourceFile(e);let{languageVersion:y,setExternalModuleIndicator:C,impliedNodeFormat:S}=typeof r=="object"?r:{languageVersion:r};if(y===100)v=Zn.parseSourceFile(e,t,y,void 0,a,6,Rn);else{let k=S===void 0?C:L=>(L.impliedNodeFormat=S,(C||W8)(L));v=Zn.parseSourceFile(e,t,y,void 0,a,_,k)}return(h=Kf)==null||h.logStopParseSourceFile(),Mb("afterParse"),yE("Parse","beforeParse","afterParse"),(l=xa)==null||l.pop(),v}function Lj(e,t){return Zn.parseIsolatedEntityName(e,t)}function Jj(e,t){return Zn.parseJsonText(e,t)}function Zo(e){return e.externalModuleIndicator!==void 0}function q6(e,t,r,a=!1){let _=Vf.updateSourceFile(e,t,r,a);return _.flags|=e.flags&12582912,_}function Rj(e,t,r){let a=Zn.JSDocParser.parseIsolatedJSDocComment(e,t,r);return a&&a.jsDoc&&Zn.fixupParentReferences(a.jsDoc),a}function jj(e,t,r){return Zn.JSDocParser.parseJSDocTypeExpressionForTests(e,t,r)}function H8(e){return ei(e,n6)||La(e,".ts")&&eo(T_(e),".d.")}function Fj(e,t,r,a){if(e){if(e==="import")return 99;if(e==="require")return 1;a(t,r-t,U.resolution_mode_should_be_either_require_or_import)}}function G8(e,t){let r=[];for(let a of Wo(t,0)||$e){let _=t.substring(a.pos,a.end);Uj(r,a,_)}e.pragmas=new Map;for(let a of r){if(e.pragmas.has(a.name)){let _=e.pragmas.get(a.name);_ instanceof Array?_.push(a.args):e.pragmas.set(a.name,[_,a.args]);continue}e.pragmas.set(a.name,a.args)}}function X8(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((r,a)=>{switch(a){case"reference":{let _=e.referencedFiles,p=e.typeReferenceDirectives,d=e.libReferenceDirectives;yr(If(r),h=>{let{types:l,lib:v,path:y,["resolution-mode"]:C}=h.arguments;if(h.arguments["no-default-lib"])e.hasNoDefaultLib=!0;else if(l){let S=Fj(C,l.pos,l.end,t);p.push({pos:l.pos,end:l.end,fileName:l.value,...S?{resolutionMode:S}:{}})}else v?d.push({pos:v.pos,end:v.end,fileName:v.value}):y?_.push({pos:y.pos,end:y.end,fileName:y.value}):t(h.range.pos,h.range.end-h.range.pos,U.Invalid_reference_directive_syntax)});break}case"amd-dependency":{e.amdDependencies=Aa(If(r),_=>({name:_.arguments.name,path:_.arguments.path}));break}case"amd-module":{if(r instanceof Array)for(let _ of r)e.moduleName&&t(_.range.pos,_.range.end-_.range.pos,U.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=_.arguments.name;else e.moduleName=r.arguments.name;break}case"ts-nocheck":case"ts-check":{yr(If(r),_=>{(!e.checkJsDirective||_.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:a==="ts-check",end:_.range.end,pos:_.range.pos})});break}case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:N.fail("Unhandled pragma kind")}})}function Bj(e){if(Hf.has(e))return Hf.get(e);let t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return Hf.set(e,t),t}function Uj(e,t,r){let a=t.kind===2&&Q8.exec(r);if(a){let p=a[1].toLowerCase(),d=zd[p];if(!d||!(d.kind&1))return;if(d.args){let h={};for(let l of d.args){let y=Bj(l.name).exec(r);if(!y&&!l.optional)return;if(y){let C=y[2]||y[3];if(l.captureSpan){let S=t.pos+y.index+y[1].length+1;h[l.name]={value:C,pos:S,end:S+C.length}}else h[l.name]=C}}e.push({name:p,args:{arguments:h,range:t}})}else e.push({name:p,args:{arguments:{},range:t}});return}let _=t.kind===2&&Y8.exec(r);if(_)return _v(e,t,2,_);if(t.kind===3){let p=/@(\S+)(\s+.*)?$/gim,d;for(;d=p.exec(r);)_v(e,t,4,d)}}function _v(e,t,r,a){if(!a)return;let _=a[1].toLowerCase(),p=zd[_];if(!p||!(p.kind&r))return;let d=a[2],h=qj(p,d);h!=="fail"&&e.push({name:_,args:{arguments:h,range:t}})}function qj(e,t){if(!t)return{};if(!e.args)return{};let r=qd(t).split(/\s+/),a={};for(let _=0;_new(fv||(fv=wt.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(uv||(uv=wt.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(pv||(pv=wt.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(lv||(lv=wt.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(cv||(cv=wt.getNodeConstructor()))(e,-1,-1)},z_=kd(1,tg),$8={166:function(t,r,a){return P(r,t.left)||P(r,t.right)},168:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.constraint)||P(r,t.default)||P(r,t.expression)},304:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||P(r,t.exclamationToken)||P(r,t.equalsToken)||P(r,t.objectAssignmentInitializer)},305:function(t,r,a){return P(r,t.expression)},169:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.dotDotDotToken)||P(r,t.name)||P(r,t.questionToken)||P(r,t.type)||P(r,t.initializer)},172:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||P(r,t.exclamationToken)||P(r,t.type)||P(r,t.initializer)},171:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||P(r,t.type)||P(r,t.initializer)},303:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||P(r,t.exclamationToken)||P(r,t.initializer)},260:function(t,r,a){return P(r,t.name)||P(r,t.exclamationToken)||P(r,t.type)||P(r,t.initializer)},208:function(t,r,a){return P(r,t.dotDotDotToken)||P(r,t.propertyName)||P(r,t.name)||P(r,t.initializer)},181:function(t,r,a){return _e(r,a,t.modifiers)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)},185:function(t,r,a){return _e(r,a,t.modifiers)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)},184:function(t,r,a){return _e(r,a,t.modifiers)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)},179:$b,180:$b,174:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.asteriskToken)||P(r,t.name)||P(r,t.questionToken)||P(r,t.exclamationToken)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},173:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)},176:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},177:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},178:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},262:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.asteriskToken)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},218:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.asteriskToken)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},219:function(t,r,a){return _e(r,a,t.modifiers)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.equalsGreaterThanToken)||P(r,t.body)},175:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.body)},183:function(t,r,a){return P(r,t.typeName)||_e(r,a,t.typeArguments)},182:function(t,r,a){return P(r,t.assertsModifier)||P(r,t.parameterName)||P(r,t.type)},186:function(t,r,a){return P(r,t.exprName)||_e(r,a,t.typeArguments)},187:function(t,r,a){return _e(r,a,t.members)},188:function(t,r,a){return P(r,t.elementType)},189:function(t,r,a){return _e(r,a,t.elements)},192:Qb,193:Qb,194:function(t,r,a){return P(r,t.checkType)||P(r,t.extendsType)||P(r,t.trueType)||P(r,t.falseType)},195:function(t,r,a){return P(r,t.typeParameter)},205:function(t,r,a){return P(r,t.argument)||P(r,t.assertions)||P(r,t.qualifier)||_e(r,a,t.typeArguments)},302:function(t,r,a){return P(r,t.assertClause)},196:Yb,198:Yb,199:function(t,r,a){return P(r,t.objectType)||P(r,t.indexType)},200:function(t,r,a){return P(r,t.readonlyToken)||P(r,t.typeParameter)||P(r,t.nameType)||P(r,t.questionToken)||P(r,t.type)||_e(r,a,t.members)},201:function(t,r,a){return P(r,t.literal)},202:function(t,r,a){return P(r,t.dotDotDotToken)||P(r,t.name)||P(r,t.questionToken)||P(r,t.type)},206:Kb,207:Kb,209:function(t,r,a){return _e(r,a,t.elements)},210:function(t,r,a){return _e(r,a,t.properties)},211:function(t,r,a){return P(r,t.expression)||P(r,t.questionDotToken)||P(r,t.name)},212:function(t,r,a){return P(r,t.expression)||P(r,t.questionDotToken)||P(r,t.argumentExpression)},213:Zb,214:Zb,215:function(t,r,a){return P(r,t.tag)||P(r,t.questionDotToken)||_e(r,a,t.typeArguments)||P(r,t.template)},216:function(t,r,a){return P(r,t.type)||P(r,t.expression)},217:function(t,r,a){return P(r,t.expression)},220:function(t,r,a){return P(r,t.expression)},221:function(t,r,a){return P(r,t.expression)},222:function(t,r,a){return P(r,t.expression)},224:function(t,r,a){return P(r,t.operand)},229:function(t,r,a){return P(r,t.asteriskToken)||P(r,t.expression)},223:function(t,r,a){return P(r,t.expression)},225:function(t,r,a){return P(r,t.operand)},226:function(t,r,a){return P(r,t.left)||P(r,t.operatorToken)||P(r,t.right)},234:function(t,r,a){return P(r,t.expression)||P(r,t.type)},235:function(t,r,a){return P(r,t.expression)},238:function(t,r,a){return P(r,t.expression)||P(r,t.type)},236:function(t,r,a){return P(r,t.name)},227:function(t,r,a){return P(r,t.condition)||P(r,t.questionToken)||P(r,t.whenTrue)||P(r,t.colonToken)||P(r,t.whenFalse)},230:function(t,r,a){return P(r,t.expression)},241:ev,268:ev,312:function(t,r,a){return _e(r,a,t.statements)||P(r,t.endOfFileToken)},243:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.declarationList)},261:function(t,r,a){return _e(r,a,t.declarations)},244:function(t,r,a){return P(r,t.expression)},245:function(t,r,a){return P(r,t.expression)||P(r,t.thenStatement)||P(r,t.elseStatement)},246:function(t,r,a){return P(r,t.statement)||P(r,t.expression)},247:function(t,r,a){return P(r,t.expression)||P(r,t.statement)},248:function(t,r,a){return P(r,t.initializer)||P(r,t.condition)||P(r,t.incrementor)||P(r,t.statement)},249:function(t,r,a){return P(r,t.initializer)||P(r,t.expression)||P(r,t.statement)},250:function(t,r,a){return P(r,t.awaitModifier)||P(r,t.initializer)||P(r,t.expression)||P(r,t.statement)},251:tv,252:tv,253:function(t,r,a){return P(r,t.expression)},254:function(t,r,a){return P(r,t.expression)||P(r,t.statement)},255:function(t,r,a){return P(r,t.expression)||P(r,t.caseBlock)},269:function(t,r,a){return _e(r,a,t.clauses)},296:function(t,r,a){return P(r,t.expression)||_e(r,a,t.statements)},297:function(t,r,a){return _e(r,a,t.statements)},256:function(t,r,a){return P(r,t.label)||P(r,t.statement)},257:function(t,r,a){return P(r,t.expression)},258:function(t,r,a){return P(r,t.tryBlock)||P(r,t.catchClause)||P(r,t.finallyBlock)},299:function(t,r,a){return P(r,t.variableDeclaration)||P(r,t.block)},170:function(t,r,a){return P(r,t.expression)},263:rv,231:rv,264:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.heritageClauses)||_e(r,a,t.members)},265:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||P(r,t.type)},266:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.members)},306:function(t,r,a){return P(r,t.name)||P(r,t.initializer)},267:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.body)},271:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.moduleReference)},272:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.importClause)||P(r,t.moduleSpecifier)||P(r,t.assertClause)},273:function(t,r,a){return P(r,t.name)||P(r,t.namedBindings)},300:function(t,r,a){return _e(r,a,t.elements)},301:function(t,r,a){return P(r,t.name)||P(r,t.value)},270:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)},274:function(t,r,a){return P(r,t.name)},280:function(t,r,a){return P(r,t.name)},275:nv,279:nv,278:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.exportClause)||P(r,t.moduleSpecifier)||P(r,t.assertClause)},276:iv,281:iv,277:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.expression)},228:function(t,r,a){return P(r,t.head)||_e(r,a,t.templateSpans)},239:function(t,r,a){return P(r,t.expression)||P(r,t.literal)},203:function(t,r,a){return P(r,t.head)||_e(r,a,t.templateSpans)},204:function(t,r,a){return P(r,t.type)||P(r,t.literal)},167:function(t,r,a){return P(r,t.expression)},298:function(t,r,a){return _e(r,a,t.types)},233:function(t,r,a){return P(r,t.expression)||_e(r,a,t.typeArguments)},283:function(t,r,a){return P(r,t.expression)},282:function(t,r,a){return _e(r,a,t.modifiers)},361:function(t,r,a){return _e(r,a,t.elements)},284:function(t,r,a){return P(r,t.openingElement)||_e(r,a,t.children)||P(r,t.closingElement)},288:function(t,r,a){return P(r,t.openingFragment)||_e(r,a,t.children)||P(r,t.closingFragment)},285:av,286:av,292:function(t,r,a){return _e(r,a,t.properties)},291:function(t,r,a){return P(r,t.name)||P(r,t.initializer)},293:function(t,r,a){return P(r,t.expression)},294:function(t,r,a){return P(r,t.dotDotDotToken)||P(r,t.expression)},287:function(t,r,a){return P(r,t.tagName)},295:function(t,r,a){return P(r,t.namespace)||P(r,t.name)},190:wo,191:wo,316:wo,322:wo,321:wo,323:wo,325:wo,324:function(t,r,a){return _e(r,a,t.parameters)||P(r,t.type)},327:function(t,r,a){return(typeof t.comment=="string"?void 0:_e(r,a,t.comment))||_e(r,a,t.tags)},354:function(t,r,a){return P(r,t.tagName)||P(r,t.name)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},317:function(t,r,a){return P(r,t.name)},318:function(t,r,a){return P(r,t.left)||P(r,t.right)},348:ov,355:ov,337:function(t,r,a){return P(r,t.tagName)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},336:function(t,r,a){return P(r,t.tagName)||P(r,t.class)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},335:function(t,r,a){return P(r,t.tagName)||P(r,t.class)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},352:function(t,r,a){return P(r,t.tagName)||P(r,t.constraint)||_e(r,a,t.typeParameters)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},353:function(t,r,a){return P(r,t.tagName)||(t.typeExpression&&t.typeExpression.kind===316?P(r,t.typeExpression)||P(r,t.fullName)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment)):P(r,t.fullName)||P(r,t.typeExpression)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment)))},345:function(t,r,a){return P(r,t.tagName)||P(r,t.fullName)||P(r,t.typeExpression)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},349:Co,351:Co,350:Co,347:Co,357:Co,356:Co,346:Co,330:function(t,r,a){return yr(t.typeParameters,r)||yr(t.parameters,r)||P(r,t.type)},331:Kh,332:Kh,333:Kh,329:function(t,r,a){return yr(t.jsDocPropertyTags,r)},334:Xa,339:Xa,340:Xa,341:Xa,342:Xa,343:Xa,338:Xa,344:Xa,360:Mj},(e=>{var t=ns(99,!0),r=40960,a,_,p,d,h;function l(c){return wn++,c}var v={createBaseSourceFileNode:c=>l(new h(c,0,0)),createBaseIdentifierNode:c=>l(new p(c,0,0)),createBasePrivateIdentifierNode:c=>l(new d(c,0,0)),createBaseTokenNode:c=>l(new _(c,0,0)),createBaseNode:c=>l(new a(c,0,0))},y=kd(11,v),{createNodeArray:C,createNumericLiteral:S,createStringLiteral:k,createLiteralLikeNode:L,createIdentifier:G,createPrivateIdentifier:K,createToken:ue,createArrayLiteralExpression:Y,createObjectLiteralExpression:B,createPropertyAccessExpression:ae,createPropertyAccessChain:Ce,createElementAccessExpression:Ze,createElementAccessChain:qe,createCallExpression:rt,createCallChain:it,createNewExpression:Ir,createParenthesizedExpression:ar,createBlock:ci,createVariableStatement:or,createExpressionStatement:Nr,createIfStatement:Ge,createWhileStatement:Gt,createForStatement:Ur,createForOfStatement:Xt,createVariableDeclaration:Tn,createVariableDeclarationList:Sn}=y,sr,$t,St,xn,Tr,vt,ct,Ut,fr,ht,wn,Tt,Or,pt,Mr,at,er=!0,Qt=!1;function tn(c,m,b,w,A=!1,R,te){var le;if(R=zS(c,R),R===6){let ie=Un(c,m,b,w,A);return convertToJson(ie,(le=ie.statements[0])==null?void 0:le.expression,ie.parseDiagnostics,!1,void 0),ie.referencedFiles=$e,ie.typeReferenceDirectives=$e,ie.libReferenceDirectives=$e,ie.amdDependencies=$e,ie.hasNoDefaultLib=!1,ie.pragmas=pg,ie}rn(c,m,b,w,R);let ne=Di(b,A,R,te||W8);return nn(),ne}e.parseSourceFile=tn;function Bn(c,m){rn("",c,m,void 0,1),O();let b=la(!0),w=f()===1&&!ct.length;return nn(),w?b:void 0}e.parseIsolatedEntityName=Bn;function Un(c,m,b=2,w,A=!1){rn(c,m,b,w,6),$t=at,O();let R=T(),te,le;if(f()===1)te=Ft([],R,R),le=dr();else{let ve;for(;f()!==1;){let Ue;switch(f()){case 23:Ue=Jc();break;case 112:case 97:case 106:Ue=dr();break;case 41:Te(()=>O()===9&&O()!==59)?Ue=Ac():Ue=Ls();break;case 9:case 11:if(Te(()=>O()!==59)){Ue=fi();break}default:Ue=Ls();break}ve&&zt(ve)?ve.push(Ue):ve?ve=[ve,Ue]:(ve=Ue,f()!==1&&Je(U.Unexpected_token))}let He=zt(ve)?M(Y(ve),R):N.checkDefined(ve),Be=Nr(He);M(Be,R),te=Ft([Be],R),le=Hn(1,U.Unexpected_token)}let ne=ge(c,2,6,!1,te,le,$t,Rn);A&&oe(ne),ne.nodeCount=wn,ne.identifierCount=Or,ne.identifiers=Tt,ne.parseDiagnostics=$a(ct,ne),Ut&&(ne.jsDocDiagnostics=$a(Ut,ne));let ie=ne;return nn(),ie}e.parseJsonText=Un;function rn(c,m,b,w,A){switch(a=wt.getNodeConstructor(),_=wt.getTokenConstructor(),p=wt.getIdentifierConstructor(),d=wt.getPrivateIdentifierConstructor(),h=wt.getSourceFileConstructor(),sr=pn(c),St=m,xn=b,fr=w,Tr=A,vt=R0(A),ct=[],pt=0,Tt=new Map,Or=0,wn=0,$t=0,er=!0,Tr){case 1:case 2:at=524288;break;case 6:at=134742016;break;default:at=0;break}Qt=!1,t.setText(St),t.setOnError(j),t.setScriptTarget(xn),t.setLanguageVariant(vt)}function nn(){t.clearCommentDirectives(),t.setText(""),t.setOnError(void 0),St=void 0,xn=void 0,fr=void 0,Tr=void 0,vt=void 0,$t=0,ct=void 0,Ut=void 0,pt=0,Tt=void 0,Mr=void 0,er=!0}function Di(c,m,b,w){let A=H8(sr);A&&(at|=33554432),$t=at,O();let R=zr(0,wr);N.assert(f()===1);let te=x(),le=Ae(dr(),te),ne=ge(sr,c,b,A,R,le,$t,w);return G8(ne,St),X8(ne,ie),ne.commentDirectives=t.getCommentDirectives(),ne.nodeCount=wn,ne.identifierCount=Or,ne.identifiers=Tt,ne.parseDiagnostics=$a(ct,ne),Ut&&(ne.jsDocDiagnostics=$a(Ut,ne)),m&&oe(ne),ne;function ie(ve,He,Be){ct.push(Ao(sr,ve,He,Be))}}let qn=!1;function Ae(c,m){if(!m)return c;N.assert(!c.jsDoc);let b=Za(H3(c,St),w=>gf.parseJSDocComment(c,w.pos,w.end-w.pos));return b.length&&(c.jsDoc=b),qn&&(qn=!1,c.flags|=536870912),c}function q(c){let m=fr,b=Vf.createSyntaxCursor(c);fr={currentNode:ve};let w=[],A=ct;ct=[];let R=0,te=ne(c.statements,0);for(;te!==-1;){let He=c.statements[R],Be=c.statements[te];Rr(w,c.statements,R,te),R=ie(c.statements,te);let Ue=_l(A,Gr=>Gr.start>=He.pos),Rt=Ue>=0?_l(A,Gr=>Gr.start>=Be.pos,Ue):-1;Ue>=0&&Rr(ct,A,Ue,Rt>=0?Rt:void 0),_r(()=>{let Gr=at;for(at|=65536,t.resetTokenState(Be.pos),O();f()!==1;){let di=t.getTokenFullStart(),mi=gs(0,wr);if(w.push(mi),di===t.getTokenFullStart()&&O(),R>=0){let hi=c.statements[R];if(mi.end===hi.pos)break;mi.end>hi.pos&&(R=ie(c.statements,R+1))}}at=Gr},2),te=R>=0?ne(c.statements,R):-1}if(R>=0){let He=c.statements[R];Rr(w,c.statements,R);let Be=_l(A,Ue=>Ue.start>=He.pos);Be>=0&&Rr(ct,A,Be)}return fr=m,y.updateSourceFile(c,Ve(C(w),c.statements));function le(He){return!(He.flags&65536)&&!!(He.transformFlags&67108864)}function ne(He,Be){for(let Ue=Be;Ue118}function Et(){return f()===80?!0:f()===127&&En()||f()===135&&Sr()?!1:f()>118}function H(c,m,b=!0){return f()===c?(b&&O(),!0):(m?Je(m):Je(U._0_expected,nr(c)),!1)}let Fa=Object.keys(cl).filter(c=>c.length>2);function Ie(c){if(o8(c)){Mt(Nt(St,c.template.pos),c.template.end,U.Module_declaration_names_may_only_use_or_quoted_strings);return}let m=Ee(c)?Ot(c):void 0;if(!m||!Cg(m,xn)){Je(U._0_expected,nr(27));return}let b=Nt(St,c.pos);switch(m){case"const":case"let":case"var":Mt(b,c.end,U.Variable_declaration_not_allowed_at_this_location);return;case"declare":return;case"interface":ot(U.Interface_name_cannot_be_0,U.Interface_must_be_given_a_name,19);return;case"is":Mt(b,t.getTokenStart(),U.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return;case"module":case"namespace":ot(U.Namespace_name_cannot_be_0,U.Namespace_must_be_given_a_name,19);return;case"type":ot(U.Type_alias_name_cannot_be_0,U.Type_alias_must_be_given_a_name,64);return}let w=Lv(m,Fa,A=>A)??cr(m);if(w){Mt(b,c.end,U.Unknown_keyword_or_identifier_Did_you_mean_0,w);return}f()!==0&&Mt(b,c.end,U.Unexpected_keyword_or_identifier)}function ot(c,m,b){f()===b?Je(m):Je(c,t.getTokenValue())}function cr(c){for(let m of Fa)if(c.length>m.length+2&&Fr(c,m))return`${m} ${c.slice(m.length)}`}function an(c,m,b){if(f()===60&&!t.hasPrecedingLineBreak()){Je(U.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);return}if(f()===21){Je(U.Cannot_start_a_function_call_in_a_type_annotation),O();return}if(m&&!ui()){b?Je(U._0_expected,nr(27)):Je(U.Expected_for_property_initializer);return}if(!fs()){if(b){Je(U._0_expected,nr(27));return}Ie(c)}}function Ba(c){return f()===c?(fe(),!0):(N.assert(Rf(c)),Je(U._0_expected,nr(c)),!1)}function kn(c,m,b,w){if(f()===m){O();return}let A=Je(U._0_expected,nr(m));b&&A&&nl(A,Ao(sr,w,1,U.The_parser_expected_to_find_a_1_to_match_the_0_token_here,nr(c),nr(m)))}function je(c){return f()===c?(O(),!0):!1}function dt(c){if(f()===c)return dr()}function li(c){if(f()===c)return r1()}function Hn(c,m,b){return dt(c)||Jr(c,!1,m||U._0_expected,b||nr(c))}function t1(c){let m=li(c);return m||(N.assert(Rf(c)),Jr(c,!1,U._0_expected,nr(c)))}function dr(){let c=T(),m=f();return O(),M(ue(m),c)}function r1(){let c=T(),m=f();return fe(),M(ue(m),c)}function ui(){return f()===27?!0:f()===20||f()===1||t.hasPrecedingLineBreak()}function fs(){return ui()?(f()===27&&O(),!0):!1}function xr(){return fs()||H(27)}function Ft(c,m,b,w){let A=C(c,w);return Ya(A,m,b??t.getTokenFullStart()),A}function M(c,m,b){return Ya(c,m,b??t.getTokenFullStart()),at&&(c.flags|=at),Qt&&(Qt=!1,c.flags|=262144),c}function Jr(c,m,b,...w){m?oa(t.getTokenFullStart(),0,b,...w):b&&Je(b,...w);let A=T(),R=c===80?G("",void 0):Sl(c)?y.createTemplateLiteralLikeNode(c,"","",void 0):c===9?S("",void 0):c===11?k("",void 0):c===282?y.createMissingDeclaration():ue(c);return M(R,A)}function sa(c){let m=Tt.get(c);return m===void 0&&Tt.set(c,m=c),m}function Ni(c,m,b){if(c){Or++;let le=T(),ne=f(),ie=sa(t.getTokenValue()),ve=t.hasExtendedUnicodeEscape();return $(),M(G(ie,ne,ve),le)}if(f()===81)return Je(b||U.Private_identifiers_are_not_allowed_outside_class_bodies),Ni(!0);if(f()===0&&t.tryScan(()=>t.reScanInvalidIdentifier()===80))return Ni(!0);Or++;let w=f()===1,A=t.isReservedWord(),R=t.getTokenText(),te=A?U.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:U.Identifier_expected;return Jr(80,w,m||te,R)}function G_(c){return Ni(An(),void 0,c)}function Lt(c,m){return Ni(Et(),c,m)}function Yt(c){return Ni(kt(f()),c)}function Oi(){return kt(f())||f()===11||f()===9}function n1(){return kt(f())||f()===11}function Tu(c){if(f()===11||f()===9){let m=fi();return m.text=sa(m.text),m}return c&&f()===23?Su():f()===81?X_():Yt()}function Ua(){return Tu(!0)}function Su(){let c=T();H(23);let m=Le(Jt);return H(24),M(y.createComputedPropertyName(m),c)}function X_(){let c=T(),m=K(sa(t.getTokenValue()));return O(),M(m,c)}function _a(c){return f()===c&&ft($_)}function xu(){return O(),t.hasPrecedingLineBreak()?!1:ms()}function $_(){switch(f()){case 87:return O()===94;case 95:return O(),f()===90?Te(Mi):f()===156?Te(ds):wu();case 90:return Mi();case 126:case 139:case 153:return O(),ms();default:return xu()}}function wu(){return f()===60||f()!==42&&f()!==130&&f()!==19&&ms()}function ds(){return O(),wu()}function i1(){return bi(f())&&ft($_)}function ms(){return f()===23||f()===19||f()===42||f()===26||Oi()}function Mi(){return O(),f()===86||f()===100||f()===120||f()===60||f()===128&&Te(oh)||f()===134&&Te(Fc)}function Q_(c,m){if(bs(c))return!0;switch(c){case 0:case 1:case 3:return!(f()===27&&m)&&Bc();case 2:return f()===84||f()===90;case 4:return Te(Xu);case 5:return Te(mh)||f()===27&&!m;case 6:return f()===23||Oi();case 12:switch(f()){case 23:case 42:case 26:case 25:return!0;default:return Oi()}case 18:return Oi();case 9:return f()===23||f()===26||Oi();case 24:return n1();case 7:return f()===19?Te(hs):m?Et()&&!Eu():Sc()&&!Eu();case 8:return zc();case 10:return f()===28||f()===26||zc();case 19:return f()===103||f()===87||Et();case 15:switch(f()){case 28:case 25:return!0}case 11:return f()===26||Ri();case 16:return _c(!1);case 17:return _c(!0);case 20:case 21:return f()===28||pa();case 22:return lf();case 23:return f()===161&&Te(Yp)?!1:kt(f());case 13:return kt(f())||f()===19;case 14:return!0;case 25:return!0;case 26:return N.fail("ParsingContext.Count used as a context");default:N.assertNever(c,"Non-exhaustive case in 'isListElement'.")}}function hs(){if(N.assert(f()===19),O()===20){let c=O();return c===28||c===19||c===96||c===119}return!0}function ys(){return O(),Et()}function Cu(){return O(),kt(f())}function Y_(){return O(),r4(f())}function Eu(){return f()===119||f()===96?Te(Au):!1}function Au(){return O(),Ri()}function ku(){return O(),pa()}function po(c){if(f()===1)return!0;switch(c){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return f()===20;case 3:return f()===20||f()===84||f()===90;case 7:return f()===19||f()===96||f()===119;case 8:return fo();case 19:return f()===32||f()===21||f()===19||f()===96||f()===119;case 11:return f()===22||f()===27;case 15:case 21:case 10:return f()===24;case 17:case 16:case 18:return f()===22||f()===24;case 20:return f()!==28;case 22:return f()===19||f()===20;case 13:return f()===32||f()===44;case 14:return f()===30&&Te(kh);default:return!1}}function fo(){return!!(ui()||Cc(f())||f()===39)}function a1(){N.assert(pt,"Missing parsing context");for(let c=0;c<26;c++)if(pt&1<=0)}function vs(c){return c===6?U.An_enum_member_name_must_be_followed_by_a_or:void 0}function pi(){let c=Ft([],T());return c.isMissingList=!0,c}function rc(c){return!!c.isMissingList}function ca(c,m,b,w){if(H(b)){let A=Wr(c,m);return H(w),A}return pi()}function la(c,m){let b=T(),w=c?Yt(m):Lt(m);for(;je(25)&&f()!==30;)w=M(y.createQualifiedName(w,qa(c,!1)),b);return w}function s1(c,m){return M(y.createQualifiedName(c,m),c.pos)}function qa(c,m){if(t.hasPrecedingLineBreak()&&kt(f())&&Te(Js))return Jr(80,!0,U.Identifier_expected);if(f()===81){let b=X_();return m?b:Jr(80,!0,U.Identifier_expected)}return c?Yt():Lt()}function _1(c){let m=T(),b=[],w;do w=ju(c),b.push(w);while(w.literal.kind===17);return Ft(b,m)}function Ts(c){let m=T();return M(y.createTemplateExpression(ic(c),_1(c)),m)}function c1(){let c=T();return M(y.createTemplateLiteralType(ic(!1),nc()),c)}function nc(){let c=T(),m=[],b;do b=Ju(),m.push(b);while(b.literal.kind===17);return Ft(m,c)}function Ju(){let c=T();return M(y.createTemplateLiteralTypeSpan(gt(),Ru(!1)),c)}function Ru(c){return f()===20?(we(c),l1()):Hn(18,U._0_expected,nr(20))}function ju(c){let m=T();return M(y.createTemplateSpan(Le(Jt),Ru(c)),m)}function fi(){return za(f())}function ic(c){!c&&t.getTokenFlags()&26656&&we(!1);let m=za(f());return N.assert(m.kind===16,"Template head has wrong token kind"),m}function l1(){let c=za(f());return N.assert(c.kind===17||c.kind===18,"Template fragment has wrong token kind"),c}function Ss(c){let m=c===15||c===18,b=t.getTokenText();return b.substring(1,b.length-(t.isUnterminated()?0:m?1:2))}function za(c){let m=T(),b=Sl(c)?y.createTemplateLiteralLikeNode(c,t.getTokenValue(),Ss(c),t.getTokenFlags()&7176):c===9?S(t.getTokenValue(),t.getNumericLiteralFlags()):c===11?k(t.getTokenValue(),void 0,t.hasExtendedUnicodeEscape()):Ng(c)?L(c,t.getTokenValue()):N.fail();return t.hasExtendedUnicodeEscape()&&(b.hasExtendedUnicodeEscape=!0),t.isUnterminated()&&(b.isUnterminated=!0),O(),M(b,m)}function Fu(){return la(!0,U.Type_expected)}function ac(){if(!t.hasPrecedingLineBreak()&&et()===30)return ca(20,gt,30,32)}function Li(){let c=T();return M(y.createTypeReferenceNode(Fu(),ac()),c)}function oc(c){switch(c.kind){case 183:return zi(c.typeName);case 184:case 185:{let{parameters:m,type:b}=c;return rc(m)||oc(b)}case 196:return oc(c.type);default:return!1}}function u1(c){return O(),M(y.createTypePredicateNode(void 0,c,gt()),c.pos)}function Bu(){let c=T();return O(),M(y.createThisTypeNode(),c)}function p1(){let c=T();return O(),M(y.createJSDocAllType(),c)}function Uu(){let c=T();return O(),M(y.createJSDocNonNullableType(op(),!1),c)}function f1(){let c=T();return O(),f()===28||f()===20||f()===22||f()===32||f()===64||f()===52?M(y.createJSDocUnknownType(),c):M(y.createJSDocNullableType(gt(),!1),c)}function qu(){let c=T(),m=x();if(Te(df)){O();let b=Gn(36),w=Dn(59,!1);return Ae(M(y.createJSDocFunctionType(b,w),c),m)}return M(y.createTypeReferenceNode(Yt(),void 0),c)}function d1(){let c=T(),m;return(f()===110||f()===105)&&(m=Yt(),H(59)),M(y.createParameterDeclaration(void 0,void 0,m,void 0,xs(),void 0),c)}function xs(){t.setInJSDocType(!0);let c=T();if(je(144)){let w=y.createJSDocNamepathType(void 0);e:for(;;)switch(f()){case 20:case 1:case 28:case 5:break e;default:fe()}return t.setInJSDocType(!1),M(w,c)}let m=je(26),b=vc();return t.setInJSDocType(!1),m&&(b=M(y.createJSDocVariadicType(b),c)),f()===64?(O(),M(y.createJSDocOptionalType(b),c)):b}function sc(){let c=T();H(114);let m=la(!0),b=t.hasPrecedingLineBreak()?void 0:qs();return M(y.createTypeQueryNode(m,b),c)}function m1(){let c=T(),m=Xn(!1,!0),b=Lt(),w,A;je(96)&&(pa()||!Ri()?w=gt():A=Ps());let R=je(64)?gt():void 0,te=y.createTypeParameterDeclaration(m,b,w,R);return te.expression=A,M(te,c)}function Vr(){if(f()===30)return ca(19,m1,30,32)}function _c(c){return f()===26||zc()||bi(f())||f()===60||pa(!c)}function zu(c){let m=Va(U.Private_identifiers_cannot_be_used_as_parameters);return sm(m)===0&&!mt(c)&&bi(f())&&O(),m}function Wu(){return An()||f()===23||f()===19}function cc(c){return lc(c)}function Vu(c){return lc(c,!1)}function lc(c,m=!0){let b=T(),w=x(),A=c?Cn(()=>Xn(!0)):zn(()=>Xn(!0));if(f()===110){let ne=y.createParameterDeclaration(A,void 0,Ni(!0),void 0,Ji(),void 0),ie=g_(A);return ie&&Lr(ie,U.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),Ae(M(ne,b),w)}let R=er;er=!1;let te=dt(26);if(!m&&!Wu())return;let le=Ae(M(y.createParameterDeclaration(A,te,zu(A),dt(58),Ji(),ji()),b),w);return er=R,le}function Dn(c,m){if(Hu(c,m))return yt(vc)}function Hu(c,m){return c===39?(H(c),!0):je(59)?!0:m&&f()===39?(Je(U._0_expected,nr(59)),O(),!0):!1}function ws(c,m){let b=En(),w=Sr();z(!!(c&1)),ee(!!(c&2));let A=c&32?Wr(17,d1):Wr(16,()=>m?cc(w):Vu(w));return z(b),ee(w),A}function Gn(c){if(!H(21))return pi();let m=ws(c,!0);return H(22),m}function Cs(){je(28)||xr()}function uc(c){let m=T(),b=x();c===180&&H(105);let w=Vr(),A=Gn(4),R=Dn(59,!0);Cs();let te=c===179?y.createCallSignature(w,A,R):y.createConstructSignature(w,A,R);return Ae(M(te,m),b)}function Gu(){return f()===23&&Te(h1)}function h1(){if(O(),f()===26||f()===24)return!0;if(bi(f())){if(O(),Et())return!0}else if(Et())O();else return!1;return f()===59||f()===28?!0:f()!==58?!1:(O(),f()===59||f()===28||f()===24)}function ua(c,m,b){let w=ca(16,()=>cc(!1),23,24),A=Ji();Cs();let R=y.createIndexSignature(b,w,A);return Ae(M(R,c),m)}function y1(c,m,b){let w=Ua(),A=dt(58),R;if(f()===21||f()===30){let te=Vr(),le=Gn(4),ne=Dn(59,!0);R=y.createMethodSignature(b,w,A,te,le,ne)}else{let te=Ji();R=y.createPropertySignature(b,w,A,te),f()===64&&(R.initializer=ji())}return Cs(),Ae(M(R,c),m)}function Xu(){if(f()===21||f()===30||f()===139||f()===153)return!0;let c=!1;for(;bi(f());)c=!0,O();return f()===23?!0:(Oi()&&(c=!0,O()),c?f()===21||f()===30||f()===58||f()===59||f()===28||ui():!1)}function pc(){if(f()===21||f()===30)return uc(179);if(f()===105&&Te(fc))return uc(180);let c=T(),m=x(),b=Xn(!1);return _a(139)?da(c,m,b,177,4):_a(153)?da(c,m,b,178,4):Gu()?ua(c,m,b):y1(c,m,b)}function fc(){return O(),f()===21||f()===30}function Es(){return O()===25}function $u(){switch(O()){case 21:case 30:case 25:return!0}return!1}function Qu(){let c=T();return M(y.createTypeLiteralNode(Yu()),c)}function Yu(){let c;return H(19)?(c=zr(4,pc),H(20)):c=pi(),c}function Ku(){return O(),f()===40||f()===41?O()===148:(f()===148&&O(),f()===23&&ys()&&O()===103)}function g1(){let c=T(),m=Yt();H(103);let b=gt();return M(y.createTypeParameterDeclaration(void 0,m,b,void 0),c)}function Zu(){let c=T();H(19);let m;(f()===148||f()===40||f()===41)&&(m=dr(),m.kind!==148&&H(148)),H(23);let b=g1(),w=je(130)?gt():void 0;H(24);let A;(f()===58||f()===40||f()===41)&&(A=dr(),A.kind!==58&&H(58));let R=Ji();xr();let te=zr(4,pc);return H(20),M(y.createMappedTypeNode(m,b,w,A,R,te),c)}function ep(){let c=T();if(je(26))return M(y.createRestTypeNode(gt()),c);let m=gt();if(b8(m)&&m.pos===m.type.pos){let b=y.createOptionalTypeNode(m.type);return Ve(b,m),b.flags=m.flags,b}return m}function dc(){return O()===59||f()===58&&O()===59}function b1(){return f()===26?kt(O())&&dc():kt(f())&&dc()}function tp(){if(Te(b1)){let c=T(),m=x(),b=dt(26),w=Yt(),A=dt(58);H(59);let R=ep(),te=y.createNamedTupleMember(b,w,A,R);return Ae(M(te,c),m)}return ep()}function v1(){let c=T();return M(y.createTupleTypeNode(ca(21,tp,23,24)),c)}function rp(){let c=T();H(21);let m=gt();return H(22),M(y.createParenthesizedType(m),c)}function T1(){let c;if(f()===128){let m=T();O();let b=M(ue(128),m);c=Ft([b],m)}return c}function mc(){let c=T(),m=x(),b=T1(),w=je(105);N.assert(!b||w,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");let A=Vr(),R=Gn(4),te=Dn(39,!1),le=w?y.createConstructorTypeNode(b,A,R,te):y.createFunctionTypeNode(A,R,te);return Ae(M(le,c),m)}function np(){let c=dr();return f()===25?void 0:c}function hc(c){let m=T();c&&O();let b=f()===112||f()===97||f()===106?dr():za(f());return c&&(b=M(y.createPrefixUnaryExpression(41,b),m)),M(y.createLiteralTypeNode(b),m)}function S1(){return O(),f()===102}function ip(){let c=T(),m=t.getTokenStart();H(19);let b=t.hasPrecedingLineBreak();H(132),H(59);let w=ma(!0);if(!H(20)){let A=wi(ct);A&&A.code===U._0_expected.code&&nl(A,Ao(sr,m,1,U.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return M(y.createImportTypeAssertionContainer(w,b),c)}function ap(){$t|=4194304;let c=T(),m=je(114);H(102),H(21);let b=gt(),w;je(28)&&(w=ip()),H(22);let A=je(25)?Fu():void 0,R=ac();return M(y.createImportTypeNode(b,w,A,R,m),c)}function yc(){return O(),f()===9||f()===10}function op(){switch(f()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return ft(np)||Li();case 67:t.reScanAsteriskEqualsToken();case 42:return p1();case 61:t.reScanQuestionToken();case 58:return f1();case 100:return qu();case 54:return Uu();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return hc();case 41:return Te(yc)?hc(!0):Li();case 116:return dr();case 110:{let c=Bu();return f()===142&&!t.hasPrecedingLineBreak()?u1(c):c}case 114:return Te(S1)?ap():sc();case 19:return Te(Ku)?Zu():Qu();case 23:return v1();case 21:return rp();case 102:return ap();case 131:return Te(Js)?dp():Li();case 16:return c1();default:return Li()}}function pa(c){switch(f()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!c;case 41:return!c&&Te(yc);case 21:return!c&&Te(x1);default:return Et()}}function x1(){return O(),f()===22||_c(!1)||pa()}function sp(){let c=T(),m=op();for(;!t.hasPrecedingLineBreak();)switch(f()){case 54:O(),m=M(y.createJSDocNonNullableType(m,!0),c);break;case 58:if(Te(ku))return m;O(),m=M(y.createJSDocNullableType(m,!0),c);break;case 23:if(H(23),pa()){let b=gt();H(24),m=M(y.createIndexedAccessTypeNode(m,b),c)}else H(24),m=M(y.createArrayTypeNode(m),c);break;default:return m}return m}function _p(c){let m=T();return H(c),M(y.createTypeOperatorNode(c,up()),m)}function cp(){if(je(96)){let c=jt(gt);if(aa()||f()!==58)return c}}function w1(){let c=T(),m=Lt(),b=ft(cp),w=y.createTypeParameterDeclaration(void 0,m,b);return M(w,c)}function lp(){let c=T();return H(140),M(y.createInferTypeNode(w1()),c)}function up(){let c=f();switch(c){case 143:case 158:case 148:return _p(c);case 140:return lp()}return yt(sp)}function pp(c){if(bc()){let m=mc(),b;return tu(m)?b=c?U.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:U.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:b=c?U.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:U.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,Lr(m,b),m}}function As(c,m,b){let w=T(),A=c===52,R=je(c),te=R&&pp(A)||m();if(f()===c||R){let le=[te];for(;je(c);)le.push(pp(A)||m());te=M(b(Ft(le,w)),w)}return te}function C1(){return As(51,up,y.createIntersectionTypeNode)}function gc(){return As(52,C1,y.createUnionTypeNode)}function E1(){return O(),f()===105}function bc(){return f()===30||f()===21&&Te(A1)?!0:f()===105||f()===128&&Te(E1)}function fp(){if(bi(f())&&Xn(!1),Et()||f()===110)return O(),!0;if(f()===23||f()===19){let c=ct.length;return Va(),c===ct.length}return!1}function A1(){return O(),!!(f()===22||f()===26||fp()&&(f()===59||f()===28||f()===58||f()===64||f()===22&&(O(),f()===39)))}function vc(){let c=T(),m=Et()&&ft(Tc),b=gt();return m?M(y.createTypePredicateNode(void 0,m,b),c):b}function Tc(){let c=Lt();if(f()===142&&!t.hasPrecedingLineBreak())return O(),c}function dp(){let c=T(),m=Hn(131),b=f()===110?Bu():Lt(),w=je(142)?gt():void 0;return M(y.createTypePredicateNode(m,b,w),c)}function gt(){if(at&81920)return xe(81920,gt);if(bc())return mc();let c=T(),m=gc();if(!aa()&&!t.hasPrecedingLineBreak()&&je(96)){let b=jt(gt);H(58);let w=yt(gt);H(59);let A=yt(gt);return M(y.createConditionalTypeNode(m,b,w,A),c)}return m}function Ji(){return je(59)?gt():void 0}function Sc(){switch(f()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return Te($u);default:return Et()}}function Ri(){if(Sc())return!0;switch(f()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return Ec()?!0:Et()}}function mp(){return f()!==19&&f()!==100&&f()!==86&&f()!==60&&Ri()}function Jt(){let c=Vn();c&&X(!1);let m=T(),b=tr(!0),w;for(;w=dt(28);)b=Ds(b,w,tr(!0),m);return c&&X(!0),b}function ji(){return je(64)?tr(!0):void 0}function tr(c){if(k1())return D1();let m=P1(c)||bp(c);if(m)return m;let b=T(),w=x(),A=ks(0);return A.kind===80&&f()===39?xc(b,A,c,w,void 0):Lo(A)&&D_(he())?Ds(A,dr(),tr(c),b):Sp(A,b,c)}function k1(){return f()===127?En()?!0:Te(zp):!1}function hp(){return O(),!t.hasPrecedingLineBreak()&&Et()}function D1(){let c=T();return O(),!t.hasPrecedingLineBreak()&&(f()===42||Ri())?M(y.createYieldExpression(dt(42),tr(!0)),c):M(y.createYieldExpression(void 0,void 0),c)}function xc(c,m,b,w,A){N.assert(f()===39,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");let R=y.createParameterDeclaration(void 0,void 0,m,void 0,void 0,void 0);M(R,m.pos);let te=Ft([R],R.pos,R.end),le=Hn(39),ne=Tp(!!A,b),ie=y.createArrowFunction(A,void 0,te,void 0,le,ne);return Ae(M(ie,c),w)}function P1(c){let m=I1();if(m!==0)return m===1?wc(!0,!0):ft(()=>gp(c))}function I1(){return f()===21||f()===30||f()===134?Te(yp):f()===39?1:0}function yp(){if(f()===134&&(O(),t.hasPrecedingLineBreak()||f()!==21&&f()!==30))return 0;let c=f(),m=O();if(c===21){if(m===22)switch(O()){case 39:case 59:case 19:return 1;default:return 0}if(m===23||m===19)return 2;if(m===26)return 1;if(bi(m)&&m!==134&&Te(ys))return O()===130?0:1;if(!Et()&&m!==110)return 0;switch(O()){case 59:return 1;case 58:return O(),f()===59||f()===28||f()===64||f()===22?1:0;case 28:case 64:case 22:return 2}return 0}else return N.assert(c===30),!Et()&&f()!==87?0:vt===1?Te(()=>{je(87);let w=O();if(w===96)switch(O()){case 64:case 32:case 44:return!1;default:return!0}else if(w===28||w===64)return!0;return!1})?1:0:2}function gp(c){let m=t.getTokenStart();if(Mr!=null&&Mr.has(m))return;let b=wc(!1,c);return b||(Mr||(Mr=new Set)).add(m),b}function bp(c){if(f()===134&&Te(vp)===1){let m=T(),b=x(),w=Hc(),A=ks(0);return xc(m,A,c,b,w)}}function vp(){if(f()===134){if(O(),t.hasPrecedingLineBreak()||f()===39)return 0;let c=ks(0);if(!t.hasPrecedingLineBreak()&&c.kind===80&&f()===39)return 1}return 0}function wc(c,m){let b=T(),w=x(),A=Hc(),R=mt(A,al)?2:0,te=Vr(),le;if(H(21)){if(c)le=ws(R,c);else{let di=ws(R,c);if(!di)return;le=di}if(!H(22)&&!c)return}else{if(!c)return;le=pi()}let ne=f()===59,ie=Dn(59,!1);if(ie&&!c&&oc(ie))return;let ve=ie;for(;(ve==null?void 0:ve.kind)===196;)ve=ve.type;let He=ve&&Mm(ve);if(!c&&f()!==39&&(He||f()!==19))return;let Be=f(),Ue=Hn(39),Rt=Be===39||Be===19?Tp(mt(A,al),m):Lt();if(!m&&ne&&f()!==59)return;let Gr=y.createArrowFunction(A,te,le,ie,Ue,Rt);return Ae(M(Gr,b),w)}function Tp(c,m){if(f()===19)return go(c?2:0);if(f()!==27&&f()!==100&&f()!==86&&Bc()&&!mp())return go(16|(c?2:0));let b=er;er=!1;let w=c?Cn(()=>tr(m)):zn(()=>tr(m));return er=b,w}function Sp(c,m,b){let w=dt(58);if(!w)return c;let A;return M(y.createConditionalExpression(c,w,xe(r,()=>tr(!1)),A=Hn(59),wl(A)?tr(b):Jr(80,!1,U._0_expected,nr(59))),m)}function ks(c){let m=T(),b=Ps();return xp(c,b,m)}function Cc(c){return c===103||c===165}function xp(c,m,b){for(;;){he();let w=pl(f());if(!(f()===43?w>=c:w>c)||f()===103&&Ii())break;if(f()===130||f()===152){if(t.hasPrecedingLineBreak())break;{let R=f();O(),m=R===152?N1(m,gt()):O1(m,gt())}}else m=Ds(m,dr(),ks(w),b)}return m}function Ec(){return Ii()&&f()===103?!1:pl(f())>0}function N1(c,m){return M(y.createSatisfiesExpression(c,m),c.pos)}function Ds(c,m,b,w){return M(y.createBinaryExpression(c,m,b),w)}function O1(c,m){return M(y.createAsExpression(c,m),c.pos)}function Ac(){let c=T();return M(y.createPrefixUnaryExpression(f(),Q(Fi)),c)}function M1(){let c=T();return M(y.createDeleteExpression(Q(Fi)),c)}function wp(){let c=T();return M(y.createTypeOfExpression(Q(Fi)),c)}function L1(){let c=T();return M(y.createVoidExpression(Q(Fi)),c)}function Cp(){return f()===135?Sr()?!0:Te(zp):!1}function J1(){let c=T();return M(y.createAwaitExpression(Q(Fi)),c)}function Ps(){if(kc()){let b=T(),w=Dc();return f()===43?xp(pl(f()),w,b):w}let c=f(),m=Fi();if(f()===43){let b=Nt(St,m.pos),{end:w}=m;m.kind===216?Mt(b,w,U.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(N.assert(Rf(c)),Mt(b,w,U.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,nr(c)))}return m}function Fi(){switch(f()){case 40:case 41:case 55:case 54:return Ac();case 91:return M1();case 114:return wp();case 116:return L1();case 30:return vt===1?fa(!0,void 0,void 0,!0):V1();case 135:if(Cp())return J1();default:return Dc()}}function kc(){switch(f()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(vt!==1)return!1;default:return!0}}function Dc(){if(f()===46||f()===47){let m=T();return M(y.createPrefixUnaryExpression(f(),Q(Is)),m)}else if(vt===1&&f()===30&&Te(Y_))return fa(!0);let c=Is();if(N.assert(Lo(c)),(f()===46||f()===47)&&!t.hasPrecedingLineBreak()){let m=f();return O(),M(y.createPostfixUnaryExpression(c,m),c.pos)}return c}function Is(){let c=T(),m;return f()===102?Te(fc)?($t|=4194304,m=dr()):Te(Es)?(O(),O(),m=M(y.createMetaProperty(102,Yt()),c),$t|=8388608):m=Ns():m=f()===108?R1():Ns(),Ip(c,m)}function Ns(){let c=T(),m=Op();return ho(c,m,!0)}function R1(){let c=T(),m=dr();if(f()===30){let b=T(),w=ft(Mc);w!==void 0&&(Mt(b,T(),U.super_may_not_use_type_arguments),Os()||(m=y.createExpressionWithTypeArguments(m,w)))}return f()===21||f()===25||f()===23?m:(Hn(25,U.super_must_be_followed_by_an_argument_list_or_member_access),M(ae(m,qa(!0,!0)),c))}function fa(c,m,b,w=!1){let A=T(),R=U1(c),te;if(R.kind===286){let le=Pc(R),ne,ie=le[le.length-1];if((ie==null?void 0:ie.kind)===284&&!Ti(ie.openingElement.tagName,ie.closingElement.tagName)&&Ti(R.tagName,ie.closingElement.tagName)){let ve=ie.children.end,He=M(y.createJsxElement(ie.openingElement,ie.children,M(y.createJsxClosingElement(M(G(""),ve,ve)),ve,ve)),ie.openingElement.pos,ve);le=Ft([...le.slice(0,le.length-1),He],le.pos,ve),ne=ie.closingElement}else ne=W1(R,c),Ti(R.tagName,ne.tagName)||(b&&Oo(b)&&Ti(ne.tagName,b.tagName)?Lr(R.tagName,U.JSX_element_0_has_no_corresponding_closing_tag,t_(St,R.tagName)):Lr(ne.tagName,U.Expected_corresponding_JSX_closing_tag_for_0,t_(St,R.tagName)));te=M(y.createJsxElement(R,le,ne),A)}else R.kind===289?te=M(y.createJsxFragment(R,Pc(R),Dp(c)),A):(N.assert(R.kind===285),te=R);if(!w&&c&&f()===30){let le=typeof m>"u"?te.pos:m,ne=ft(()=>fa(!0,le));if(ne){let ie=Jr(28,!1);return Ed(ie,ne.pos,0),Mt(Nt(St,le),ne.end,U.JSX_expressions_must_have_one_parent_element),M(y.createBinaryExpression(te,ie,ne),A)}}return te}function j1(){let c=T(),m=y.createJsxText(t.getTokenValue(),ht===13);return ht=t.scanJsxToken(),M(m,c)}function F1(c,m){switch(m){case 1:if(k6(c))Lr(c,U.JSX_fragment_has_no_corresponding_closing_tag);else{let b=c.tagName,w=Math.min(Nt(St,b.pos),b.end);Mt(w,b.end,U.JSX_element_0_has_no_corresponding_closing_tag,t_(St,c.tagName))}return;case 31:case 7:return;case 12:case 13:return j1();case 19:return Ep(!1);case 30:return fa(!1,void 0,c);default:return N.assertNever(m)}}function Pc(c){let m=[],b=T(),w=pt;for(pt|=16384;;){let A=F1(c,ht=t.reScanJsxToken());if(!A||(m.push(A),Oo(c)&&(A==null?void 0:A.kind)===284&&!Ti(A.openingElement.tagName,A.closingElement.tagName)&&Ti(c.tagName,A.closingElement.tagName)))break}return pt=w,Ft(m,b)}function B1(){let c=T();return M(y.createJsxAttributes(zr(13,q1)),c)}function U1(c){let m=T();if(H(30),f()===32)return It(),M(y.createJsxOpeningFragment(),m);let b=Ic(),w=at&524288?void 0:qs(),A=B1(),R;return f()===32?(It(),R=y.createJsxOpeningElement(b,w,A)):(H(44),H(32,void 0,!1)&&(c?O():It()),R=y.createJsxSelfClosingElement(b,w,A)),M(R,m)}function Ic(){let c=T(),m=Nc();if(U_(m))return m;let b=m;for(;je(25);)b=M(ae(b,qa(!0,!1)),c);return b}function Nc(){let c=T();Ke();let m=f()===110,b=Yt();return je(59)?(Ke(),M(y.createJsxNamespacedName(b,Yt()),c)):m?M(y.createToken(110),c):b}function Ep(c){let m=T();if(!H(19))return;let b,w;return f()!==20&&(b=dt(26),w=Jt()),c?H(20):H(20,void 0,!1)&&It(),M(y.createJsxExpression(b,w),m)}function q1(){if(f()===19)return kp();let c=T();return M(y.createJsxAttribute(z1(),Ap()),c)}function Ap(){if(f()===64){if(qt()===11)return fi();if(f()===19)return Ep(!0);if(f()===30)return fa(!0);Je(U.or_JSX_element_expected)}}function z1(){let c=T();Ke();let m=Yt();return je(59)?(Ke(),M(y.createJsxNamespacedName(m,Yt()),c)):m}function kp(){let c=T();H(19),H(26);let m=Jt();return H(20),M(y.createJsxSpreadAttribute(m),c)}function W1(c,m){let b=T();H(31);let w=Ic();return H(32,void 0,!1)&&(m||!Ti(c.tagName,w)?O():It()),M(y.createJsxClosingElement(w),b)}function Dp(c){let m=T();return H(31),H(32,U.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(c?O():It()),M(y.createJsxJsxClosingFragment(),m)}function V1(){N.assert(vt!==1,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");let c=T();H(30);let m=gt();H(32);let b=Fi();return M(y.createTypeAssertion(m,b),c)}function Pp(){return O(),kt(f())||f()===23||Os()}function H1(){return f()===29&&Te(Pp)}function Hr(c){if(c.flags&64)return!0;if(jo(c)){let m=c.expression;for(;jo(m)&&!(m.flags&64);)m=m.expression;if(m.flags&64){for(;jo(c);)c.flags|=64,c=c.expression;return!0}}return!1}function Bi(c,m,b){let w=qa(!0,!0),A=b||Hr(m),R=A?Ce(m,b,w):ae(m,w);if(A&&jr(R.name)&&Lr(R.name,U.An_optional_chain_cannot_contain_private_identifiers),g6(m)&&m.typeArguments){let te=m.typeArguments.pos-1,le=Nt(St,m.typeArguments.end)+1;Mt(te,le,U.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return M(R,c)}function mo(c,m,b){let w;if(f()===24)w=Jr(80,!0,U.An_element_access_expression_should_take_an_argument);else{let R=Le(Jt);Qi(R)&&(R.text=sa(R.text)),w=R}H(24);let A=b||Hr(m)?qe(m,b,w):Ze(m,w);return M(A,c)}function ho(c,m,b){for(;;){let w,A=!1;if(b&&H1()?(w=Hn(29),A=kt(f())):A=je(25),A){m=Bi(c,m,w);continue}if((w||!Vn())&&je(23)){m=mo(c,m,w);continue}if(Os()){m=!w&&m.kind===233?Ms(c,m.expression,w,m.typeArguments):Ms(c,m,w,void 0);continue}if(!w){if(f()===54&&!t.hasPrecedingLineBreak()){O(),m=M(y.createNonNullExpression(m),c);continue}let R=ft(Mc);if(R){m=M(y.createExpressionWithTypeArguments(m,R),c);continue}}return m}}function Os(){return f()===15||f()===16}function Ms(c,m,b,w){let A=y.createTaggedTemplateExpression(m,w,f()===15?(we(!0),fi()):Ts(!0));return(b||m.flags&64)&&(A.flags|=64),A.questionDotToken=b,M(A,c)}function Ip(c,m){for(;;){m=ho(c,m,!0);let b,w=dt(29);if(w&&(b=ft(Mc),Os())){m=Ms(c,m,w,b);continue}if(b||f()===21){!w&&m.kind===233&&(b=m.typeArguments,m=m.expression);let A=Oc(),R=w||Hr(m)?it(m,w,b,A):rt(m,b,A);m=M(R,c);continue}if(w){let A=Jr(80,!1,U.Identifier_expected);m=M(Ce(m,w,A),c)}break}return m}function Oc(){H(21);let c=Wr(11,X1);return H(22),c}function Mc(){if(at&524288||et()!==30)return;O();let c=Wr(20,gt);if(he()===32)return O(),c&&Np()?c:void 0}function Np(){switch(f()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return t.hasPrecedingLineBreak()||Ec()||!Ri()}function Op(){switch(f()){case 15:t.getTokenFlags()&26656&&we(!1);case 9:case 10:case 11:return fi();case 110:case 108:case 106:case 112:case 97:return dr();case 21:return Mp();case 23:return Jc();case 19:return Ls();case 134:if(!Te(Fc))break;return Rc();case 60:return bh();case 86:return sf();case 100:return Rc();case 105:return Lp();case 44:case 69:if(Re()===14)return fi();break;case 16:return Ts(!1);case 81:return X_()}return Lt(U.Expression_expected)}function Mp(){let c=T(),m=x();H(21);let b=Le(Jt);return H(22),Ae(M(ar(b),c),m)}function G1(){let c=T();H(26);let m=tr(!0);return M(y.createSpreadElement(m),c)}function Lc(){return f()===26?G1():f()===28?M(y.createOmittedExpression(),T()):tr(!0)}function X1(){return xe(r,Lc)}function Jc(){let c=T(),m=t.getTokenStart(),b=H(23),w=t.hasPrecedingLineBreak(),A=Wr(15,Lc);return kn(23,24,b,m),M(Y(A,w),c)}function $1(){let c=T(),m=x();if(dt(26)){let ve=tr(!0);return Ae(M(y.createSpreadAssignment(ve),c),m)}let b=Xn(!0);if(_a(139))return da(c,m,b,177,0);if(_a(153))return da(c,m,b,178,0);let w=dt(42),A=Et(),R=Ua(),te=dt(58),le=dt(54);if(w||f()===21||f()===30)return Wc(c,m,b,w,R,te,le);let ne;if(A&&f()!==59){let ve=dt(64),He=ve?Le(()=>tr(!0)):void 0;ne=y.createShorthandPropertyAssignment(R,He),ne.equalsToken=ve}else{H(59);let ve=Le(()=>tr(!0));ne=y.createPropertyAssignment(R,ve)}return ne.modifiers=b,ne.questionToken=te,ne.exclamationToken=le,Ae(M(ne,c),m)}function Ls(){let c=T(),m=t.getTokenStart(),b=H(19),w=t.hasPrecedingLineBreak(),A=Wr(12,$1,!0);return kn(19,20,b,m),M(B(A,w),c)}function Rc(){let c=Vn();X(!1);let m=T(),b=x(),w=Xn(!1);H(100);let A=dt(42),R=A?1:0,te=mt(w,al)?2:0,le=R&&te?Pi(yo):R?qr(yo):te?Cn(yo):yo(),ne=Vr(),ie=Gn(R|te),ve=Dn(59,!1),He=go(R|te);X(c);let Be=y.createFunctionExpression(w,A,le,ne,ie,ve,He);return Ae(M(Be,m),b)}function yo(){return An()?G_():void 0}function Lp(){let c=T();if(H(105),je(25)){let R=Yt();return M(y.createMetaProperty(105,R),c)}let m=T(),b=ho(m,Op(),!1),w;b.kind===233&&(w=b.typeArguments,b=b.expression),f()===29&&Je(U.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,t_(St,b));let A=f()===21?Oc():void 0;return M(Ir(b,w,A),c)}function Wa(c,m){let b=T(),w=x(),A=t.getTokenStart(),R=H(19,m);if(R||c){let te=t.hasPrecedingLineBreak(),le=zr(1,wr);kn(19,20,R,A);let ne=Ae(M(ci(le,te),b),w);return f()===64&&(Je(U.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),O()),ne}else{let te=pi();return Ae(M(ci(te,void 0),b),w)}}function go(c,m){let b=En();z(!!(c&1));let w=Sr();ee(!!(c&2));let A=er;er=!1;let R=Vn();R&&X(!1);let te=Wa(!!(c&16),m);return R&&X(!0),er=A,z(b),ee(w),te}function Q1(){let c=T(),m=x();return H(27),Ae(M(y.createEmptyStatement(),c),m)}function Jp(){let c=T(),m=x();H(101);let b=t.getTokenStart(),w=H(21),A=Le(Jt);kn(21,22,w,b);let R=wr(),te=je(93)?wr():void 0;return Ae(M(Ge(A,R,te),c),m)}function Y1(){let c=T(),m=x();H(92);let b=wr();H(117);let w=t.getTokenStart(),A=H(21),R=Le(Jt);return kn(21,22,A,w),je(27),Ae(M(y.createDoStatement(b,R),c),m)}function Rp(){let c=T(),m=x();H(117);let b=t.getTokenStart(),w=H(21),A=Le(Jt);kn(21,22,w,b);let R=wr();return Ae(M(Gt(A,R),c),m)}function K1(){let c=T(),m=x();H(99);let b=dt(135);H(21);let w;f()!==27&&(f()===115||f()===121||f()===87||f()===160&&Te(_h)||f()===135&&Te(Fs)?w=ef(!0):w=lt(Jt));let A;if(b?H(165):je(165)){let R=Le(()=>tr(!0));H(22),A=Xt(b,w,R,wr())}else if(je(103)){let R=Le(Jt);H(22),A=y.createForInStatement(w,R,wr())}else{H(27);let R=f()!==27&&f()!==22?Le(Jt):void 0;H(27);let te=f()!==22?Le(Jt):void 0;H(22),A=Ur(w,R,te,wr())}return Ae(M(A,c),m)}function jc(c){let m=T(),b=x();H(c===252?83:88);let w=ui()?void 0:Lt();xr();let A=c===252?y.createBreakStatement(w):y.createContinueStatement(w);return Ae(M(A,m),b)}function Z1(){let c=T(),m=x();H(107);let b=ui()?void 0:Le(Jt);return xr(),Ae(M(y.createReturnStatement(b),c),m)}function eh(){let c=T(),m=x();H(118);let b=t.getTokenStart(),w=H(21),A=Le(Jt);kn(21,22,w,b);let R=ke(67108864,wr);return Ae(M(y.createWithStatement(A,R),c),m)}function jp(){let c=T(),m=x();H(84);let b=Le(Jt);H(59);let w=zr(3,wr);return Ae(M(y.createCaseClause(b,w),c),m)}function th(){let c=T();H(90),H(59);let m=zr(3,wr);return M(y.createDefaultClause(m),c)}function Fp(){return f()===84?jp():th()}function rh(){let c=T();H(19);let m=zr(2,Fp);return H(20),M(y.createCaseBlock(m),c)}function Bp(){let c=T(),m=x();H(109),H(21);let b=Le(Jt);H(22);let w=rh();return Ae(M(y.createSwitchStatement(b,w),c),m)}function nh(){let c=T(),m=x();H(111);let b=t.hasPrecedingLineBreak()?void 0:Le(Jt);return b===void 0&&(Or++,b=M(G(""),T())),fs()||Ie(b),Ae(M(y.createThrowStatement(b),c),m)}function Up(){let c=T(),m=x();H(113);let b=Wa(!1),w=f()===85?ih():void 0,A;return(!w||f()===98)&&(H(98,U.catch_or_finally_expected),A=Wa(!1)),Ae(M(y.createTryStatement(b,w,A),c),m)}function ih(){let c=T();H(85);let m;je(21)?(m=Bs(),H(22)):m=void 0;let b=Wa(!1);return M(y.createCatchClause(m,b),c)}function qp(){let c=T(),m=x();return H(89),xr(),Ae(M(y.createDebuggerStatement(),c),m)}function ah(){let c=T(),m=x(),b,w=f()===21,A=Le(Jt);return Ee(A)&&je(59)?b=y.createLabeledStatement(A,wr()):(fs()||Ie(A),b=Nr(A),w&&(m=!1)),Ae(M(b,c),m)}function Js(){return O(),kt(f())&&!t.hasPrecedingLineBreak()}function oh(){return O(),f()===86&&!t.hasPrecedingLineBreak()}function Fc(){return O(),f()===100&&!t.hasPrecedingLineBreak()}function zp(){return O(),(kt(f())||f()===9||f()===10||f()===11)&&!t.hasPrecedingLineBreak()}function Wp(){for(;;)switch(f()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return Hp();case 135:return Uc();case 120:case 156:return hp();case 144:case 145:return ch();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:let c=f();if(O(),t.hasPrecedingLineBreak())return!1;if(c===138&&f()===156)return!0;continue;case 162:return O(),f()===19||f()===80||f()===95;case 102:return O(),f()===11||f()===42||f()===19||kt(f());case 95:let m=O();if(m===156&&(m=Te(O)),m===64||m===42||m===19||m===90||m===130||m===60)return!0;continue;case 126:O();continue;default:return!1}}function Rs(){return Te(Wp)}function Bc(){switch(f()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:return!0;case 102:return Rs()||Te($u);case 87:case 95:return Rs();case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 129:case 125:case 123:case 124:case 126:case 148:return Rs()||!Te(Js);default:return Ri()}}function sh(){return O(),An()||f()===19||f()===23}function Vp(){return Te(sh)}function _h(){return js(!0)}function js(c){return O(),c&&f()===165?!1:(An()||f()===19)&&!t.hasPrecedingLineBreak()}function Hp(){return Te(js)}function Fs(){return Gp(!0)}function Gp(c){return O()===160?js(c):!1}function Uc(){return Te(Gp)}function wr(){switch(f()){case 27:return Q1();case 19:return Wa(!1);case 115:return vo(T(),x(),void 0);case 121:if(Vp())return vo(T(),x(),void 0);break;case 135:if(Uc())return vo(T(),x(),void 0);break;case 160:if(Hp())return vo(T(),x(),void 0);break;case 100:return Us(T(),x(),void 0);case 86:return _f(T(),x(),void 0);case 101:return Jp();case 92:return Y1();case 117:return Rp();case 99:return K1();case 88:return jc(251);case 83:return jc(252);case 107:return Z1();case 118:return eh();case 109:return Bp();case 111:return nh();case 113:case 85:case 98:return Up();case 89:return qp();case 60:return Xp();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(Rs())return Xp();break}return ah()}function qc(c){return c.kind===138}function Xp(){let c=T(),m=x(),b=Xn(!0);if(mt(b,qc)){let A=$p(c);if(A)return A;for(let R of b)R.flags|=33554432;return ke(33554432,()=>Qp(c,m,b))}else return Qp(c,m,b)}function $p(c){return ke(33554432,()=>{let m=bs(pt,c);if(m)return Du(m)})}function Qp(c,m,b){switch(f()){case 115:case 121:case 87:case 160:case 135:return vo(c,m,b);case 100:return Us(c,m,b);case 86:return _f(c,m,b);case 120:return wh(c,m,b);case 156:return uf(c,m,b);case 94:return Ch(c,m,b);case 162:case 144:case 145:return Eh(c,m,b);case 102:return Dh(c,m,b);case 95:switch(O(),f()){case 90:case 64:return Uh(c,m,b);case 130:return Qc(c,m,b);default:return Bh(c,m,b)}default:if(b){let w=Jr(282,!0,U.Declaration_expected);return Cd(w,c),w.modifiers=b,w}return}}function Yp(){return O()===11}function ch(){return O(),!t.hasPrecedingLineBreak()&&(Et()||f()===11)}function bo(c,m){if(f()!==19){if(c&4){Cs();return}if(ui()){xr();return}}return go(c,m)}function lh(){let c=T();if(f()===28)return M(y.createOmittedExpression(),c);let m=dt(26),b=Va(),w=ji();return M(y.createBindingElement(m,void 0,b,w),c)}function Kp(){let c=T(),m=dt(26),b=An(),w=Ua(),A;b&&f()!==59?(A=w,w=void 0):(H(59),A=Va());let R=ji();return M(y.createBindingElement(m,w,A,R),c)}function uh(){let c=T();H(19);let m=Le(()=>Wr(9,Kp));return H(20),M(y.createObjectBindingPattern(m),c)}function Zp(){let c=T();H(23);let m=Le(()=>Wr(10,lh));return H(24),M(y.createArrayBindingPattern(m),c)}function zc(){return f()===19||f()===23||f()===81||An()}function Va(c){return f()===23?Zp():f()===19?uh():G_(c)}function ph(){return Bs(!0)}function Bs(c){let m=T(),b=x(),w=Va(U.Private_identifiers_are_not_allowed_in_variable_declarations),A;c&&w.kind===80&&f()===54&&!t.hasPrecedingLineBreak()&&(A=dr());let R=Ji(),te=Cc(f())?void 0:ji(),le=Tn(w,A,R,te);return Ae(M(le,m),b)}function ef(c){let m=T(),b=0;switch(f()){case 115:break;case 121:b|=1;break;case 87:b|=2;break;case 160:b|=4;break;case 135:N.assert(Uc()),b|=6,O();break;default:N.fail()}O();let w;if(f()===165&&Te(tf))w=pi();else{let A=Ii();nt(c),w=Wr(8,c?Bs:ph),nt(A)}return M(Sn(w,b),m)}function tf(){return ys()&&O()===22}function vo(c,m,b){let w=ef(!1);xr();let A=or(b,w);return Ae(M(A,c),m)}function Us(c,m,b){let w=Sr(),A=ln(b);H(100);let R=dt(42),te=A&1024?yo():G_(),le=R?1:0,ne=A&512?2:0,ie=Vr();A&1&&ee(!0);let ve=Gn(le|ne),He=Dn(59,!1),Be=bo(le|ne,U.or_expected);ee(w);let Ue=y.createFunctionDeclaration(b,R,te,ie,ve,He,Be);return Ae(M(Ue,c),m)}function fh(){if(f()===137)return H(137);if(f()===11&&Te(O)===21)return ft(()=>{let c=fi();return c.text==="constructor"?c:void 0})}function dh(c,m,b){return ft(()=>{if(fh()){let w=Vr(),A=Gn(0),R=Dn(59,!1),te=bo(0,U.or_expected),le=y.createConstructorDeclaration(b,A,te);return le.typeParameters=w,le.type=R,Ae(M(le,c),m)}})}function Wc(c,m,b,w,A,R,te,le){let ne=w?1:0,ie=mt(b,al)?2:0,ve=Vr(),He=Gn(ne|ie),Be=Dn(59,!1),Ue=bo(ne|ie,le),Rt=y.createMethodDeclaration(b,w,A,R,ve,He,Be,Ue);return Rt.exclamationToken=te,Ae(M(Rt,c),m)}function rf(c,m,b,w,A){let R=!A&&!t.hasPrecedingLineBreak()?dt(54):void 0,te=Ji(),le=xe(90112,ji);an(w,te,le);let ne=y.createPropertyDeclaration(b,w,A||R,te,le);return Ae(M(ne,c),m)}function nf(c,m,b){let w=dt(42),A=Ua(),R=dt(58);return w||f()===21||f()===30?Wc(c,m,b,w,A,R,void 0,U.or_expected):rf(c,m,b,A,R)}function da(c,m,b,w,A){let R=Ua(),te=Vr(),le=Gn(0),ne=Dn(59,!1),ie=bo(A),ve=w===177?y.createGetAccessorDeclaration(b,R,le,ne,ie):y.createSetAccessorDeclaration(b,R,le,ie);return ve.typeParameters=te,Qo(ve)&&(ve.type=ne),Ae(M(ve,c),m)}function mh(){let c;if(f()===60)return!0;for(;bi(f());){if(c=f(),o3(c))return!0;O()}if(f()===42||(Oi()&&(c=f(),O()),f()===23))return!0;if(c!==void 0){if(!Si(c)||c===153||c===139)return!0;switch(f()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return ui()}}return!1}function af(c,m,b){Hn(126);let w=hh(),A=Ae(M(y.createClassStaticBlockDeclaration(w),c),m);return A.modifiers=b,A}function hh(){let c=En(),m=Sr();z(!1),ee(!0);let b=Wa(!1);return z(c),ee(m),b}function yh(){if(Sr()&&f()===135){let c=T(),m=Lt(U.Expression_expected);O();let b=ho(c,m,!0);return Ip(c,b)}return Is()}function Vc(){let c=T();if(!je(60))return;let m=na(yh);return M(y.createDecorator(m),c)}function of(c,m,b){let w=T(),A=f();if(f()===87&&m){if(!ft(xu))return}else{if(b&&f()===126&&Te(mf))return;if(c&&f()===126)return;if(!i1())return}return M(ue(A),w)}function Xn(c,m,b){let w=T(),A,R,te,le=!1,ne=!1,ie=!1;if(c&&f()===60)for(;R=Vc();)A=xt(A,R);for(;te=of(le,m,b);)te.kind===126&&(le=!0),A=xt(A,te),ne=!0;if(ne&&c&&f()===60)for(;R=Vc();)A=xt(A,R),ie=!0;if(ie)for(;te=of(le,m,b);)te.kind===126&&(le=!0),A=xt(A,te);return A&&Ft(A,w)}function Hc(){let c;if(f()===134){let m=T();O();let b=M(ue(134),m);c=Ft([b],m)}return c}function gh(){let c=T(),m=x();if(f()===27)return O(),Ae(M(y.createSemicolonClassElement(),c),m);let b=Xn(!0,!0,!0);if(f()===126&&Te(mf))return af(c,m,b);if(_a(139))return da(c,m,b,177,0);if(_a(153))return da(c,m,b,178,0);if(f()===137||f()===11){let w=dh(c,m,b);if(w)return w}if(Gu())return ua(c,m,b);if(kt(f())||f()===11||f()===9||f()===42||f()===23)if(mt(b,qc)){for(let A of b)A.flags|=33554432;return ke(33554432,()=>nf(c,m,b))}else return nf(c,m,b);if(b){let w=Jr(80,!0,U.Declaration_expected);return rf(c,m,b,w,void 0)}return N.fail("Should not have attempted to parse class member declaration.")}function bh(){let c=T(),m=x(),b=Xn(!0);if(f()===86)return Gc(c,m,b,231);let w=Jr(282,!0,U.Expression_expected);return Cd(w,c),w.modifiers=b,w}function sf(){return Gc(T(),x(),void 0,231)}function _f(c,m,b){return Gc(c,m,b,263)}function Gc(c,m,b,w){let A=Sr();H(86);let R=Xc(),te=Vr();mt(b,Ux)&&ee(!0);let le=cf(),ne;H(19)?(ne=xh(),H(20)):ne=pi(),ee(A);let ie=w===263?y.createClassDeclaration(b,R,te,le,ne):y.createClassExpression(b,R,te,le,ne);return Ae(M(ie,c),m)}function Xc(){return An()&&!vh()?Ni(An()):void 0}function vh(){return f()===119&&Te(Cu)}function cf(){if(lf())return zr(22,Th)}function Th(){let c=T(),m=f();N.assert(m===96||m===119),O();let b=Wr(7,Sh);return M(y.createHeritageClause(m,b),c)}function Sh(){let c=T(),m=Is();if(m.kind===233)return m;let b=qs();return M(y.createExpressionWithTypeArguments(m,b),c)}function qs(){return f()===30?ca(20,gt,30,32):void 0}function lf(){return f()===96||f()===119}function xh(){return zr(5,gh)}function wh(c,m,b){H(120);let w=Lt(),A=Vr(),R=cf(),te=Yu(),le=y.createInterfaceDeclaration(b,w,A,R,te);return Ae(M(le,c),m)}function uf(c,m,b){H(156),t.hasPrecedingLineBreak()&&Je(U.Line_break_not_permitted_here);let w=Lt(),A=Vr();H(64);let R=f()===141&&ft(np)||gt();xr();let te=y.createTypeAliasDeclaration(b,w,A,R);return Ae(M(te,c),m)}function pf(){let c=T(),m=x(),b=Ua(),w=Le(ji);return Ae(M(y.createEnumMember(b,w),c),m)}function Ch(c,m,b){H(94);let w=Lt(),A;H(19)?(A=ia(()=>Wr(6,pf)),H(20)):A=pi();let R=y.createEnumDeclaration(b,w,A);return Ae(M(R,c),m)}function zs(){let c=T(),m;return H(19)?(m=zr(1,wr),H(20)):m=pi(),M(y.createModuleBlock(m),c)}function ff(c,m,b,w){let A=w&32,R=Lt(),te=je(25)?ff(T(),!1,void 0,8|A):zs(),le=y.createModuleDeclaration(b,R,te,w);return Ae(M(le,c),m)}function $c(c,m,b){let w=0,A;f()===162?(A=Lt(),w|=2048):(A=fi(),A.text=sa(A.text));let R;f()===19?R=zs():xr();let te=y.createModuleDeclaration(b,A,R,w);return Ae(M(te,c),m)}function Eh(c,m,b){let w=0;if(f()===162)return $c(c,m,b);if(je(145))w|=32;else if(H(144),f()===11)return $c(c,m,b);return ff(c,m,b,w)}function Ah(){return f()===149&&Te(df)}function df(){return O()===21}function mf(){return O()===19}function kh(){return O()===44}function Qc(c,m,b){H(130),H(145);let w=Lt();xr();let A=y.createNamespaceExportDeclaration(w);return A.modifiers=b,Ae(M(A,c),m)}function Dh(c,m,b){H(102);let w=t.getTokenFullStart(),A;Et()&&(A=Lt());let R=!1;if(f()!==161&&(A==null?void 0:A.escapedText)==="type"&&(Et()||Ih())&&(R=!0,A=Et()?Lt():void 0),A&&!Nh())return Oh(c,m,b,A,R);let te;(A||f()===42||f()===19)&&(te=Mh(A,w,R),H(161));let le=Ws(),ne;f()===132&&!t.hasPrecedingLineBreak()&&(ne=ma()),xr();let ie=y.createImportDeclaration(b,te,le,ne);return Ae(M(ie,c),m)}function Ph(){let c=T(),m=kt(f())?Yt():za(11);H(59);let b=tr(!0);return M(y.createAssertEntry(m,b),c)}function ma(c){let m=T();c||H(132);let b=t.getTokenStart();if(H(19)){let w=t.hasPrecedingLineBreak(),A=Wr(24,Ph,!0);if(!H(20)){let R=wi(ct);R&&R.code===U._0_expected.code&&nl(R,Ao(sr,b,1,U.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return M(y.createAssertClause(A,w),m)}else{let w=Ft([],T(),void 0,!1);return M(y.createAssertClause(w,!1),m)}}function Ih(){return f()===42||f()===19}function Nh(){return f()===28||f()===161}function Oh(c,m,b,w,A){H(64);let R=ha();xr();let te=y.createImportEqualsDeclaration(b,A,w,R);return Ae(M(te,c),m)}function Mh(c,m,b){let w;return(!c||je(28))&&(w=f()===42?Jh():Ha(275)),M(y.createImportClause(b,c,w),m)}function ha(){return Ah()?Lh():la(!1)}function Lh(){let c=T();H(149),H(21);let m=Ws();return H(22),M(y.createExternalModuleReference(m),c)}function Ws(){if(f()===11){let c=fi();return c.text=sa(c.text),c}else return Jt()}function Jh(){let c=T();H(42),H(130);let m=Lt();return M(y.createNamespaceImport(m),c)}function Ha(c){let m=T(),b=c===275?y.createNamedImports(ca(23,jh,19,20)):y.createNamedExports(ca(23,Rh,19,20));return M(b,m)}function Rh(){let c=x();return Ae(hf(281),c)}function jh(){return hf(276)}function hf(c){let m=T(),b=Si(f())&&!Et(),w=t.getTokenStart(),A=t.getTokenEnd(),R=!1,te,le=!0,ne=Yt();if(ne.escapedText==="type")if(f()===130){let He=Yt();if(f()===130){let Be=Yt();kt(f())?(R=!0,te=He,ne=ve(),le=!1):(te=ne,ne=Be,le=!1)}else kt(f())?(te=ne,le=!1,ne=ve()):(R=!0,ne=He)}else kt(f())&&(R=!0,ne=ve());le&&f()===130&&(te=ne,H(130),ne=ve()),c===276&&b&&Mt(w,A,U.Identifier_expected);let ie=c===276?y.createImportSpecifier(R,te,ne):y.createExportSpecifier(R,te,ne);return M(ie,m);function ve(){return b=Si(f())&&!Et(),w=t.getTokenStart(),A=t.getTokenEnd(),Yt()}}function Fh(c){return M(y.createNamespaceExport(Yt()),c)}function Bh(c,m,b){let w=Sr();ee(!0);let A,R,te,le=je(156),ne=T();je(42)?(je(130)&&(A=Fh(ne)),H(161),R=Ws()):(A=Ha(279),(f()===161||f()===11&&!t.hasPrecedingLineBreak())&&(H(161),R=Ws())),R&&f()===132&&!t.hasPrecedingLineBreak()&&(te=ma()),xr(),ee(w);let ie=y.createExportDeclaration(b,le,A,R,te);return Ae(M(ie,c),m)}function Uh(c,m,b){let w=Sr();ee(!0);let A;je(64)?A=!0:H(90);let R=tr(!0);xr(),ee(w);let te=y.createExportAssignment(b,A,R);return Ae(M(te,c),m)}let ya;(c=>{c[c.SourceElements=0]="SourceElements",c[c.BlockStatements=1]="BlockStatements",c[c.SwitchClauses=2]="SwitchClauses",c[c.SwitchClauseStatements=3]="SwitchClauseStatements",c[c.TypeMembers=4]="TypeMembers",c[c.ClassMembers=5]="ClassMembers",c[c.EnumMembers=6]="EnumMembers",c[c.HeritageClauseElement=7]="HeritageClauseElement",c[c.VariableDeclarations=8]="VariableDeclarations",c[c.ObjectBindingElements=9]="ObjectBindingElements",c[c.ArrayBindingElements=10]="ArrayBindingElements",c[c.ArgumentExpressions=11]="ArgumentExpressions",c[c.ObjectLiteralMembers=12]="ObjectLiteralMembers",c[c.JsxAttributes=13]="JsxAttributes",c[c.JsxChildren=14]="JsxChildren",c[c.ArrayLiteralMembers=15]="ArrayLiteralMembers",c[c.Parameters=16]="Parameters",c[c.JSDocParameters=17]="JSDocParameters",c[c.RestProperties=18]="RestProperties",c[c.TypeParameters=19]="TypeParameters",c[c.TypeArguments=20]="TypeArguments",c[c.TupleElementTypes=21]="TupleElementTypes",c[c.HeritageClauses=22]="HeritageClauses",c[c.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",c[c.AssertEntries=24]="AssertEntries",c[c.JSDocComment=25]="JSDocComment",c[c.Count=26]="Count"})(ya||(ya={}));let yf;(c=>{c[c.False=0]="False",c[c.True=1]="True",c[c.Unknown=2]="Unknown"})(yf||(yf={}));let gf;(c=>{function m(ie,ve,He){rn("file.js",ie,99,void 0,1),t.setText(ie,ve,He),ht=t.scan();let Be=b(),Ue=ge("file.js",99,1,!1,[],ue(1),0,Rn),Rt=$a(ct,Ue);return Ut&&(Ue.jsDocDiagnostics=$a(Ut,Ue)),nn(),Be?{jsDocTypeExpression:Be,diagnostics:Rt}:void 0}c.parseJSDocTypeExpressionForTests=m;function b(ie){let ve=T(),He=(ie?je:H)(19),Be=ke(16777216,xs);(!ie||He)&&Ba(20);let Ue=y.createJSDocTypeExpression(Be);return oe(Ue),M(Ue,ve)}c.parseJSDocTypeExpression=b;function w(){let ie=T(),ve=je(19),He=T(),Be=la(!1);for(;f()===81;)Ye(),fe(),Be=M(y.createJSDocMemberName(Be,Lt()),He);ve&&Ba(20);let Ue=y.createJSDocNameReference(Be);return oe(Ue),M(Ue,ie)}c.parseJSDocNameReference=w;function A(ie,ve,He){rn("",ie,99,void 0,1);let Be=ke(16777216,()=>ne(ve,He)),Rt=$a(ct,{languageVariant:0,text:ie});return nn(),Be?{jsDoc:Be,diagnostics:Rt}:void 0}c.parseIsolatedJSDocComment=A;function R(ie,ve,He){let Be=ht,Ue=ct.length,Rt=Qt,Gr=ke(16777216,()=>ne(ve,He));return Xi(Gr,ie),at&524288&&(Ut||(Ut=[]),Ut.push(...ct)),ht=Be,ct.length=Ue,Qt=Rt,Gr}c.parseJSDocComment=R;let te;(ie=>{ie[ie.BeginningOfLine=0]="BeginningOfLine",ie[ie.SawAsterisk=1]="SawAsterisk",ie[ie.SavingComments=2]="SavingComments",ie[ie.SavingBackticks=3]="SavingBackticks"})(te||(te={}));let le;(ie=>{ie[ie.Property=1]="Property",ie[ie.Parameter=2]="Parameter",ie[ie.CallbackParameter=4]="CallbackParameter"})(le||(le={}));function ne(ie=0,ve){let He=pt;pt|=1<<25;let Be=St,Ue=ve===void 0?Be.length:ie+ve;if(ve=Ue-ie,N.assert(ie>=0),N.assert(ie<=Ue),N.assert(Ue<=Be.length),!q8(Be,ie))return;let Rt,Gr,di,mi,hi,Ui=[],ga=[],ba=t.scanRange(ie+3,ve-5,qh);return pt=He,ba;function qh(){let F=1,re,Z=ie-(Be.lastIndexOf(` -`,ie)+1)+4;function se(ze){re||(re=Z),Ui.push(ze),Z+=ze.length}for(fe();xo(5););xo(4)&&(F=0,Z=0);e:for(;;){switch(f()){case 60:zh(Ui),hi||(hi=T()),u(To(Z)),F=0,re=void 0;break;case 4:Ui.push(t.getTokenText()),F=0,Z=0;break;case 42:let ze=t.getTokenText();F===1?(F=2,se(ze)):(N.assert(F===0),F=1,Z+=ze.length);break;case 5:N.assert(F!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let At=t.getTokenText();re!==void 0&&Z+At.length>re&&Ui.push(At.slice(re-Z)),Z+=At.length;break;case 1:break e;case 82:F=2,se(t.getTokenValue());break;case 19:F=2;let Pn=t.getTokenFullStart(),sn=t.getTokenEnd()-1,Ar=vf(sn);if(Ar){mi||bf(Ui),ga.push(M(y.createJSDocText(Ui.join("")),mi??ie,Pn)),ga.push(Ar),Ui=[],mi=t.getTokenEnd();break}default:F=2,se(t.getTokenText());break}F===2?be(!1):fe()}let ce=n_(Ui.join(""));ga.length&&ce.length&&ga.push(M(y.createJSDocText(ce),mi??ie,hi)),ga.length&&Rt&&N.assertIsDefined(hi,"having parsed tags implies that the end of the comment span should be set");let Me=Rt&&Ft(Rt,Gr,di);return M(y.createJSDocComment(ga.length?Ft(ga,ie,hi):ce.length?ce:void 0,Me),ie,Ue)}function bf(F){for(;F.length&&(F[0]===` -`||F[0]==="\r");)F.shift()}function zh(F){for(;F.length;){let re=n_(F[F.length-1]);if(re==="")F.pop();else if(re.lengthAt&&(se.push(Qn.slice(At-F)),ze=2),F+=Qn.length;break;case 19:ze=2;let Tf=t.getTokenFullStart(),Hs=t.getTokenEnd()-1,Sf=vf(Hs);Sf?(ce.push(M(y.createJSDocText(se.join("")),Me??Z,Tf)),ce.push(Sf),se=[],Me=t.getTokenEnd()):Pn(t.getTokenText());break;case 62:ze===3?ze=2:ze=3,Pn(t.getTokenText());break;case 82:ze!==3&&(ze=2),Pn(t.getTokenValue());break;case 42:if(ze===0){ze=1,F+=1;break}default:ze!==3&&(ze=2),Pn(t.getTokenText());break}ze===2||ze===3?sn=be(ze===3):sn=fe()}bf(se);let Ar=n_(se.join(""));if(ce.length)return Ar.length&&ce.push(M(y.createJSDocText(Ar),Me??Z)),Ft(ce,Z,t.getTokenEnd());if(Ar.length)return Ar}function vf(F){let re=ft(n);if(!re)return;fe(),Xe();let Z=T(),se=kt(f())?la(!0):void 0;if(se)for(;f()===81;)Ye(),fe(),se=M(y.createJSDocMemberName(se,Lt()),Z);let ce=[];for(;f()!==20&&f()!==4&&f()!==1;)ce.push(t.getTokenText()),fe();let Me=re==="link"?y.createJSDocLink:re==="linkcode"?y.createJSDocLinkCode:y.createJSDocLinkPlain;return M(Me(se,ce.join("")),F,t.getTokenEnd())}function n(){if(Cr(),f()===19&&fe()===60&&kt(fe())){let F=t.getTokenValue();if(o(F))return F}}function o(F){return F==="link"||F==="linkcode"||F==="linkplain"}function s(F,re,Z,se){return M(y.createJSDocUnknownTag(re,lr(F,T(),Z,se)),F)}function u(F){F&&(Rt?Rt.push(F):(Rt=[F],Gr=F.pos),di=F.end)}function g(){return Cr(),f()===19?b():void 0}function I(){let F=xo(23);F&&Xe();let re=xo(62),Z=v5();return re&&t1(62),F&&(Xe(),dt(64)&&Jt(),H(24)),{name:Z,isBracketed:F}}function W(F){switch(F.kind){case 151:return!0;case 188:return W(F.elementType);default:return R_(F)&&Ee(F.typeName)&&F.typeName.escapedText==="Object"&&!F.typeArguments}}function de(F,re,Z,se){let ce=g(),Me=!ce;Cr();let{name:ze,isBracketed:At}=I(),Pn=Cr();Me&&!Te(n)&&(ce=g());let sn=lr(F,T(),se,Pn),Ar=We(ce,ze,Z,se);Ar&&(ce=Ar,Me=!0);let Qn=Z===1?y.createJSDocPropertyTag(re,ze,At,ce,Me,sn):y.createJSDocParameterTag(re,ze,At,ce,Me,sn);return M(Qn,F)}function We(F,re,Z,se){if(F&&W(F.type)){let ce=T(),Me,ze;for(;Me=ft(()=>Vh(Z,se,re));)Me.kind===348||Me.kind===355?ze=xt(ze,Me):Me.kind===352&&Lr(Me.tagName,U.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(ze){let At=M(y.createJSDocTypeLiteral(ze,F.type.kind===188),ce);return M(y.createJSDocTypeExpression(At),ce)}}}function Er(F,re,Z,se){mt(Rt,R6)&&Mt(re.pos,t.getTokenStart(),U._0_tag_already_specified,Vo(re.escapedText));let ce=g();return M(y.createJSDocReturnTag(re,ce,lr(F,T(),Z,se)),F)}function $n(F,re,Z,se){mt(Rt,lu)&&Mt(re.pos,t.getTokenStart(),U._0_tag_already_specified,Vo(re.escapedText));let ce=b(!0),Me=Z!==void 0&&se!==void 0?lr(F,T(),Z,se):void 0;return M(y.createJSDocTypeTag(re,ce,Me),F)}function yi(F,re,Z,se){let Me=f()===23||Te(()=>fe()===60&&kt(fe())&&o(t.getTokenValue()))?void 0:w(),ze=Z!==void 0&&se!==void 0?lr(F,T(),Z,se):void 0;return M(y.createJSDocSeeTag(re,Me,ze),F)}function Vs(F,re,Z,se){let ce=g(),Me=lr(F,T(),Z,se);return M(y.createJSDocThrowsTag(re,ce,Me),F)}function n5(F,re,Z,se){let ce=T(),Me=i5(),ze=t.getTokenFullStart(),At=lr(F,ze,Z,se);At||(ze=t.getTokenFullStart());let Pn=typeof At!="string"?Ft(y_([M(Me,ce,ze)],At),ce):Me.text+At;return M(y.createJSDocAuthorTag(re,Pn),F)}function i5(){let F=[],re=!1,Z=t.getToken();for(;Z!==1&&Z!==4;){if(Z===30)re=!0;else{if(Z===60&&!re)break;if(Z===32&&re){F.push(t.getTokenText()),t.resetTokenState(t.getTokenEnd());break}}F.push(t.getTokenText()),Z=fe()}return y.createJSDocText(F.join(""))}function a5(F,re,Z,se){let ce=Db();return M(y.createJSDocImplementsTag(re,ce,lr(F,T(),Z,se)),F)}function o5(F,re,Z,se){let ce=Db();return M(y.createJSDocAugmentsTag(re,ce,lr(F,T(),Z,se)),F)}function s5(F,re,Z,se){let ce=b(!1),Me=Z!==void 0&&se!==void 0?lr(F,T(),Z,se):void 0;return M(y.createJSDocSatisfiesTag(re,ce,Me),F)}function Db(){let F=je(19),re=T(),Z=_5();t.setInJSDocType(!0);let se=qs();t.setInJSDocType(!1);let ce=y.createExpressionWithTypeArguments(Z,se),Me=M(ce,re);return F&&H(20),Me}function _5(){let F=T(),re=Ga();for(;je(25);){let Z=Ga();re=M(ae(re,Z),F)}return re}function So(F,re,Z,se,ce){return M(re(Z,lr(F,T(),se,ce)),F)}function c5(F,re,Z,se){let ce=b(!0);return Xe(),M(y.createJSDocThisTag(re,ce,lr(F,T(),Z,se)),F)}function l5(F,re,Z,se){let ce=b(!0);return Xe(),M(y.createJSDocEnumTag(re,ce,lr(F,T(),Z,se)),F)}function u5(F,re,Z,se){let ce=g();Cr();let Me=Wh();Xe();let ze=on(Z),At;if(!ce||W(ce.type)){let sn,Ar,Qn,Tf=!1;for(;(sn=ft(()=>h5(Z)))&&sn.kind!==352;)if(Tf=!0,sn.kind===351)if(Ar){let Hs=Je(U.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);Hs&&nl(Hs,Ao(sr,0,0,U.The_tag_was_first_specified_here));break}else Ar=sn;else Qn=xt(Qn,sn);if(Tf){let Hs=ce&&ce.type.kind===188,Sf=y.createJSDocTypeLiteral(Qn,Hs);ce=Ar&&Ar.typeExpression&&!W(Ar.typeExpression.type)?Ar.typeExpression:M(Sf,F),At=ce.end}}At=At||ze!==void 0?T():(Me??ce??re).end,ze||(ze=lr(F,At,Z,se));let Pn=y.createJSDocTypedefTag(re,ce,Me,ze);return M(Pn,F,At)}function Wh(F){let re=t.getTokenStart();if(!kt(f()))return;let Z=Ga();if(je(25)){let se=Wh(!0),ce=y.createModuleDeclaration(void 0,Z,se,F?8:void 0);return M(ce,re)}return F&&(Z.flags|=4096),Z}function p5(F){let re=T(),Z,se;for(;Z=ft(()=>Vh(4,F));){if(Z.kind===352){Lr(Z.tagName,U.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}se=xt(se,Z)}return Ft(se||[],re)}function Pb(F,re){let Z=p5(re),se=ft(()=>{if(xo(60)){let ce=To(re);if(ce&&ce.kind===349)return ce}});return M(y.createJSDocSignature(void 0,Z,se),F)}function f5(F,re,Z,se){let ce=Wh();Xe();let Me=on(Z),ze=Pb(F,Z);Me||(Me=lr(F,T(),Z,se));let At=Me!==void 0?T():ze.end;return M(y.createJSDocCallbackTag(re,ze,ce,Me),F,At)}function d5(F,re,Z,se){Xe();let ce=on(Z),Me=Pb(F,Z);ce||(ce=lr(F,T(),Z,se));let ze=ce!==void 0?T():Me.end;return M(y.createJSDocOverloadTag(re,Me,ce),F,ze)}function m5(F,re){for(;!Ee(F)||!Ee(re);)if(!Ee(F)&&!Ee(re)&&F.right.escapedText===re.right.escapedText)F=F.left,re=re.left;else return!1;return F.escapedText===re.escapedText}function h5(F){return Vh(1,F)}function Vh(F,re,Z){let se=!0,ce=!1;for(;;)switch(fe()){case 60:if(se){let Me=y5(F,re);return Me&&(Me.kind===348||Me.kind===355)&&Z&&(Ee(Me.name)||!m5(Z,Me.name.left))?!1:Me}ce=!1;break;case 4:se=!0,ce=!1;break;case 42:ce&&(se=!1),ce=!0;break;case 80:se=!1;break;case 1:return!1}}function y5(F,re){N.assert(f()===60);let Z=t.getTokenFullStart();fe();let se=Ga(),ce=Cr(),Me;switch(se.escapedText){case"type":return F===1&&$n(Z,se);case"prop":case"property":Me=1;break;case"arg":case"argument":case"param":Me=6;break;case"template":return Ib(Z,se,re,ce);default:return!1}return F&Me?de(Z,se,F,re):!1}function g5(){let F=T(),re=xo(23);re&&Xe();let Z=Ga(U.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),se;if(re&&(Xe(),H(64),se=ke(16777216,xs),H(24)),!zi(Z))return M(y.createTypeParameterDeclaration(void 0,Z,void 0,se),F)}function b5(){let F=T(),re=[];do{Xe();let Z=g5();Z!==void 0&&re.push(Z),Cr()}while(xo(28));return Ft(re,F)}function Ib(F,re,Z,se){let ce=f()===19?b():void 0,Me=b5();return M(y.createJSDocTemplateTag(re,ce,Me,lr(F,T(),Z,se)),F)}function xo(F){return f()===F?(fe(),!0):!1}function v5(){let F=Ga();for(je(23)&&H(24);je(25);){let re=Ga();je(23)&&H(24),F=s1(F,re)}return F}function Ga(F){if(!kt(f()))return Jr(80,!F,F||U.Identifier_expected);Or++;let re=t.getTokenStart(),Z=t.getTokenEnd(),se=f(),ce=sa(t.getTokenValue()),Me=M(G(ce,se),re,Z);return fe(),Me}}})(gf=e.JSDocParser||(e.JSDocParser={}))})(Zn||(Zn={})),(e=>{function t(k,L,G,K){if(K=K||N.shouldAssert(2),y(k,L,G,K),w4(G))return k;if(k.statements.length===0)return Zn.parseSourceFile(k.fileName,L,k.languageVersion,void 0,!0,k.scriptKind,k.setExternalModuleIndicator);let ue=k;N.assert(!ue.hasBeenIncrementallyParsed),ue.hasBeenIncrementallyParsed=!0,Zn.fixupParentReferences(ue);let Y=k.text,B=C(k),ae=l(k,G);y(k,L,ae,K),N.assert(ae.span.start<=G.span.start),N.assert(Kt(ae.span)===Kt(G.span)),N.assert(Kt(Qs(ae))===Kt(Qs(G)));let Ce=Qs(ae).length-ae.span.length;h(ue,ae.span.start,Kt(ae.span),Kt(Qs(ae)),Ce,Y,L,K);let Ze=Zn.parseSourceFile(k.fileName,L,k.languageVersion,B,!0,k.scriptKind,k.setExternalModuleIndicator);return Ze.commentDirectives=r(k.commentDirectives,Ze.commentDirectives,ae.span.start,Kt(ae.span),Ce,Y,L,K),Ze.impliedNodeFormat=k.impliedNodeFormat,Ze}e.updateSourceFile=t;function r(k,L,G,K,ue,Y,B,ae){if(!k)return L;let Ce,Ze=!1;for(let rt of k){let{range:it,type:Ir}=rt;if(it.endK){qe();let ar={range:{pos:it.pos+ue,end:it.end+ue},type:Ir};Ce=xt(Ce,ar),ae&&N.assert(Y.substring(it.pos,it.end)===B.substring(ar.range.pos,ar.range.end))}}return qe(),Ce;function qe(){Ze||(Ze=!0,Ce?L&&Ce.push(...L):Ce=L)}}function a(k,L,G,K,ue,Y){L?ae(k):B(k);return;function B(Ce){let Ze="";if(Y&&_(Ce)&&(Ze=K.substring(Ce.pos,Ce.end)),Ce._children&&(Ce._children=void 0),Ya(Ce,Ce.pos+G,Ce.end+G),Y&&_(Ce)&&N.assert(Ze===ue.substring(Ce.pos,Ce.end)),Bt(Ce,B,ae),Wi(Ce))for(let qe of Ce.jsDoc)B(qe);d(Ce,Y)}function ae(Ce){Ce._children=void 0,Ya(Ce,Ce.pos+G,Ce.end+G);for(let Ze of Ce)B(Ze)}}function _(k){switch(k.kind){case 11:case 9:case 80:return!0}return!1}function p(k,L,G,K,ue){N.assert(k.end>=L,"Adjusting an element that was entirely before the change range"),N.assert(k.pos<=G,"Adjusting an element that was entirely after the change range"),N.assert(k.pos<=k.end);let Y=Math.min(k.pos,K),B=k.end>=G?k.end+ue:Math.min(k.end,K);N.assert(Y<=B),k.parent&&(N.assertGreaterThanOrEqual(Y,k.parent.pos),N.assertLessThanOrEqual(B,k.parent.end)),Ya(k,Y,B)}function d(k,L){if(L){let G=k.pos,K=ue=>{N.assert(ue.pos>=G),G=ue.end};if(Wi(k))for(let ue of k.jsDoc)K(ue);Bt(k,K),N.assert(G<=k.end)}}function h(k,L,G,K,ue,Y,B,ae){Ce(k);return;function Ce(qe){if(N.assert(qe.pos<=qe.end),qe.pos>G){a(qe,!1,ue,Y,B,ae);return}let rt=qe.end;if(rt>=L){if(qe.intersectsChange=!0,qe._children=void 0,p(qe,L,G,K,ue),Bt(qe,Ce,Ze),Wi(qe))for(let it of qe.jsDoc)Ce(it);d(qe,ae);return}N.assert(rtG){a(qe,!0,ue,Y,B,ae);return}let rt=qe.end;if(rt>=L){qe.intersectsChange=!0,qe._children=void 0,p(qe,L,G,K,ue);for(let it of qe)Ce(it);return}N.assert(rt0&&B<=1;B++){let ae=v(k,K);N.assert(ae.pos<=K);let Ce=ae.pos;K=Math.max(0,Ce-1)}let ue=Hi(K,Kt(L.span)),Y=L.newLength+(L.span.start-K);return $d(ue,Y)}function v(k,L){let G=k,K;if(Bt(k,Y),K){let B=ue(K);B.pos>G.pos&&(G=B)}return G;function ue(B){for(;;){let ae=kS(B);if(ae)B=ae;else return B}}function Y(B){if(!zi(B))if(B.pos<=L){if(B.pos>=G.pos&&(G=B),LL),!0}}function y(k,L,G,K){let ue=k.text;if(G&&(N.assert(ue.length-G.span.length+G.newLength===L.length),K||N.shouldAssert(3))){let Y=ue.substr(0,G.span.start),B=L.substr(0,G.span.start);N.assert(Y===B);let ae=ue.substring(Kt(G.span),ue.length),Ce=L.substring(Kt(Qs(G)),L.length);N.assert(ae===Ce)}}function C(k){let L=k.statements,G=0;N.assert(G=Ze.pos&&B=Ze.pos&&B{k[k.Value=-1]="Value"})(S||(S={}))})(Vf||(Vf={})),Hf=new Map,Q8=/^\/\/\/\s*<(\S+)\s.*?\/>/im,Y8=/^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im}}),Wj=()=>{},$V=Vt({"src/compiler/pnp.ts"(){"use strict";t4()}}),Vj=()=>{},Hj=()=>{},Gj=()=>{},Xj=()=>{},$j=()=>{},Qj=()=>{},Yj=()=>{},Kj=()=>{},Zj=()=>{},eF=()=>{},tF=()=>{},rF=()=>{},nF=()=>{},iF=()=>{},aF=()=>{},oF=()=>{},sF=()=>{},_F=()=>{},cF=()=>{},lF=()=>{},uF=()=>{},pF=()=>{},fF=()=>{},dF=()=>{},mF=()=>{},hF=()=>{},yF=()=>{},gF=()=>{},bF=()=>{},vF=()=>{},TF=()=>{},SF=()=>{},xF=()=>{},wF=()=>{},CF=()=>{},EF=()=>{},AF=()=>{},kF=()=>{},DF=()=>{},PF=()=>{},IF=()=>{},NF=()=>{},OF=()=>{},MF=()=>{},LF=()=>{},JF=()=>{},RF=()=>{},Dr=Vt({"src/compiler/_namespaces/ts.ts"(){"use strict";N5(),pE(),Vv(),fE(),dE(),hE(),bE(),Xv(),TE(),t4(),RE(),HE(),Jk(),SL(),xL(),wL(),CL(),jL(),FL(),BL(),mR(),kj(),Dj(),zj(),Wj(),Vj(),Hj(),Gj(),$j(),Qj(),Yj(),Kj(),Zj(),eF(),tF(),rF(),nF(),iF(),aF(),oF(),sF(),_F(),cF(),lF(),uF(),pF(),fF(),dF(),mF(),hF(),yF(),gF(),bF(),vF(),TF(),SF(),xF(),wF(),CF(),EF(),AF(),kF(),DF(),PF(),IF(),NF(),OF(),MF(),LF(),JF(),RF(),Xj(),Gv()}}),K8=()=>{},jF=()=>{},Z8=()=>{},Fo,Z8=()=>{Vv(),Fo=ns(99,!0)},FF=()=>{},e7=()=>{},BF=()=>{},UF=()=>{},qF=()=>{},zF=()=>{},WF=()=>{},VF=()=>{},HF=()=>{},GF=()=>{},t7=()=>{},r7=()=>{},n7=()=>{},XF=()=>{};function i7(e,t,r,a){let _=ql(e)?new Od(e,t,r):e===80?new Md(80,t,r):e===81?new Ld(81,t,r):new W6(e,t,r);return _.parent=a,_.flags=a.flags&101441536,_}function $F(e,t){if(!ql(e.kind))return $e;let r=[];if(w3(e))return e.forEachChild(d=>{r.push(d)}),r;Fo.setText((t||e.getSourceFile()).text);let a=e.pos,_=d=>{hl(r,a,d.pos,e),r.push(d),a=d.end},p=d=>{hl(r,a,d.pos,e),r.push(QF(d,e)),a=d.end};return yr(e.jsDoc,_),a=e.pos,e.forEachChild(_,p),hl(r,a,e.end,e),Fo.setText(void 0),r}function hl(e,t,r,a){for(Fo.resetTokenState(t);tt.tagName.text==="inheritDoc"||t.tagName.text==="inheritdoc")}function Df(e,t){if(!e)return $e;let r=ts_JsDoc_exports.getJsDocTagsFromDeclarations(e,t);if(t&&(r.length===0||e.some(a7))){let a=new Set;for(let _ of e){let p=o7(t,_,d=>{var h;if(!a.has(d))return a.add(d),_.kind===177||_.kind===178?d.getContextualJsDocTags(_,t):((h=d.declarations)==null?void 0:h.length)===1?d.getJsDocTags():void 0});p&&(r=[...p,...r])}}return r}function Kc(e,t){if(!e)return $e;let r=ts_JsDoc_exports.getJsDocCommentsFromDeclarations(e,t);if(t&&(r.length===0||e.some(a7))){let a=new Set;for(let _ of e){let p=o7(t,_,d=>{if(!a.has(d))return a.add(d),_.kind===177||_.kind===178?d.getContextualDocumentationComment(_,t):d.getDocumentationComment(t)});p&&(r=r.length===0?p.slice():p.concat(lineBreakPart(),r))}}return r}function o7(e,t,r){var a;let _=((a=t.parent)==null?void 0:a.kind)===176?t.parent.parent:t.parent;if(!_)return;let p=bm(t);return ng(PT(_),d=>{let h=e.getTypeAtLocation(d),l=p&&h.symbol?e.getTypeOfSymbol(h.symbol):h,v=e.getPropertyOfType(l,t.symbol.name);return v?r(v):void 0})}function YF(){return{getNodeConstructor:()=>Od,getTokenConstructor:()=>W6,getIdentifierConstructor:()=>Md,getPrivateIdentifierConstructor:()=>Ld,getSourceFileConstructor:()=>y7,getSymbolConstructor:()=>d7,getTypeConstructor:()=>m7,getSignatureConstructor:()=>h7,getSourceMapSourceConstructor:()=>g7}}function sl(e){let t=!0;for(let a in e)if(Qr(e,a)&&!dv(a)){t=!1;break}if(t)return e;let r={};for(let a in e)if(Qr(e,a)){let _=dv(a)?a:a.charAt(0).toLowerCase()+a.substr(1);r[_]=e[a]}return r}function dv(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function KF(e){return e?Aa(e,t=>t.text).join(""):""}function s7(){return{target:1,jsx:1}}function _7(){return ts_codefix_exports.getSupportedErrorCodes()}function c7(e,t,r){e.version=r,e.scriptSnapshot=t}function z6(e,t,r,a,_,p){let d=V8(e,getSnapshotText(t),r,_,p);return c7(d,t,a),d}function l7(e,t,r,a,_){if(a&&r!==e.version){let d,h=a.span.start!==0?e.text.substr(0,a.span.start):"",l=Kt(a.span)!==e.text.length?e.text.substr(Kt(a.span)):"";if(a.newLength===0)d=h&&l?h+l:h||l;else{let y=t.getText(a.span.start,a.span.start+a.newLength);d=h&&l?h+y+l:h?h+y:y+l}let v=q6(e,d,a,_);return c7(v,t,r),v.nameTable=void 0,e!==v&&e.scriptSnapshot&&(e.scriptSnapshot.dispose&&e.scriptSnapshot.dispose(),e.scriptSnapshot=void 0),v}let p={languageVersion:e.languageVersion,impliedNodeFormat:e.impliedNodeFormat,setExternalModuleIndicator:e.setExternalModuleIndicator};return z6(e.fileName,t,p,r,!0,e.scriptKind)}function ZF(e,t=createDocumentRegistry(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory()),r){var a;let _;r===void 0?_=0:typeof r=="boolean"?_=r?2:0:_=r;let p=new b7(e),d,h,l=0,v=e.getCancellationToken?new T7(e.getCancellationToken()):v7,y=e.getCurrentDirectory();NS((a=e.getLocalizedDiagnosticMessages)==null?void 0:a.bind(e));function C(j){e.log&&e.log(j)}let S=C2(e),k=Ud(S),L=getSourceMapper({useCaseSensitiveFileNames:()=>S,getCurrentDirectory:()=>y,getProgram:ue,fileExists:rr(e,e.fileExists),readFile:rr(e,e.readFile),getDocumentPositionMapper:rr(e,e.getDocumentPositionMapper),getSourceFileLike:rr(e,e.getSourceFileLike),log:C});function G(j){let T=d.getSourceFile(j);if(!T){let x=new Error(`Could not find source file: '${j}'.`);throw x.ProgramFiles=d.getSourceFiles().map(f=>f.fileName),x}return T}function K(){var j,T,x;if(N.assert(_!==2),e.getProjectVersion){let Ie=e.getProjectVersion();if(Ie){if(h===Ie&&!((j=e.hasChangedAutomaticTypeDirectiveNames)!=null&&j.call(e)))return;h=Ie}}let f=e.getTypeRootsVersion?e.getTypeRootsVersion():0;l!==f&&(C("TypeRoots version has changed; provide new program"),d=void 0,l=f);let $=e.getScriptFileNames().slice(),Q=e.getCompilationSettings()||s7(),O=e.hasInvalidatedResolutions||$f,fe=rr(e,e.hasInvalidatedLibResolutions)||$f,be=rr(e,e.hasChangedAutomaticTypeDirectiveNames),he=(T=e.getProjectReferences)==null?void 0:T.call(e),Re,we={getSourceFile:H,getSourceFileByPath:Fa,getCancellationToken:()=>v,getCanonicalFileName:k,useCaseSensitiveFileNames:()=>S,getNewLine:()=>vS(Q),getDefaultLibFileName:Ie=>e.getDefaultLibFileName(Ie),writeFile:Rn,getCurrentDirectory:()=>y,fileExists:Ie=>e.fileExists(Ie),readFile:Ie=>e.readFile&&e.readFile(Ie),getSymlinkCache:rr(e,e.getSymlinkCache),realpath:rr(e,e.realpath),directoryExists:Ie=>bS(Ie,e),getDirectories:Ie=>e.getDirectories?e.getDirectories(Ie):[],readDirectory:(Ie,ot,cr,an,Ba)=>(N.checkDefined(e.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),e.readDirectory(Ie,ot,cr,an,Ba)),onReleaseOldSourceFile:Et,onReleaseParsedCommandLine:An,hasInvalidatedResolutions:O,hasInvalidatedLibResolutions:fe,hasChangedAutomaticTypeDirectiveNames:be,trace:rr(e,e.trace),resolveModuleNames:rr(e,e.resolveModuleNames),getModuleResolutionCache:rr(e,e.getModuleResolutionCache),createHash:rr(e,e.createHash),resolveTypeReferenceDirectives:rr(e,e.resolveTypeReferenceDirectives),resolveModuleNameLiterals:rr(e,e.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:rr(e,e.resolveTypeReferenceDirectiveReferences),resolveLibrary:rr(e,e.resolveLibrary),useSourceOfProjectReferenceRedirect:rr(e,e.useSourceOfProjectReferenceRedirect),getParsedCommandLine:Te},et=we.getSourceFile,{getSourceFileWithCache:Ye}=changeCompilerHostLikeToUseCache(we,Ie=>xi(Ie,y,k),(...Ie)=>et.call(we,...Ie));we.getSourceFile=Ye,(x=e.setCompilerHost)==null||x.call(e,we);let Ke={useCaseSensitiveFileNames:S,fileExists:Ie=>we.fileExists(Ie),readFile:Ie=>we.readFile(Ie),directoryExists:Ie=>we.directoryExists(Ie),getDirectories:Ie=>we.getDirectories(Ie),realpath:we.realpath,readDirectory:(...Ie)=>we.readDirectory(...Ie),trace:we.trace,getCurrentDirectory:we.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:Rn},It=t.getKeyForCompilationSettings(Q),qt=new Set;if(isProgramUptoDate(d,$,Q,(Ie,ot)=>e.getScriptVersion(ot),Ie=>we.fileExists(Ie),O,fe,be,Te,he)){we=void 0,Re=void 0,qt=void 0;return}let _r={rootNames:$,options:Q,host:we,oldProgram:d,projectReferences:he};d=createProgram(_r),we=void 0,Re=void 0,qt=void 0,L.clearCache(),d.getTypeChecker();return;function Te(Ie){let ot=xi(Ie,y,k),cr=Re==null?void 0:Re.get(ot);if(cr!==void 0)return cr||void 0;let an=e.getParsedCommandLine?e.getParsedCommandLine(Ie):ft(Ie);return(Re||(Re=new Map)).set(ot,an||!1),an}function ft(Ie){let ot=H(Ie,100);if(ot)return ot.path=xi(Ie,y,k),ot.resolvedPath=ot.path,ot.originalFileName=ot.fileName,parseJsonSourceFileConfigFileContent(ot,Ke,Pa($i(Ie),y),void 0,Pa(Ie,y))}function An(Ie,ot,cr){var an;e.getParsedCommandLine?(an=e.onReleaseParsedCommandLine)==null||an.call(e,Ie,ot,cr):ot&&Et(ot.sourceFile,cr)}function Et(Ie,ot){let cr=t.getKeyForCompilationSettings(ot);t.releaseDocumentWithKey(Ie.resolvedPath,cr,Ie.scriptKind,Ie.impliedNodeFormat)}function H(Ie,ot,cr,an){return Fa(Ie,xi(Ie,y,k),ot,cr,an)}function Fa(Ie,ot,cr,an,Ba){N.assert(we,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");let kn=e.getScriptSnapshot(Ie);if(!kn)return;let je=getScriptKind(Ie,e),dt=e.getScriptVersion(Ie);if(!Ba){let li=d&&d.getSourceFileByPath(ot);if(li){if(je===li.scriptKind||qt.has(li.resolvedPath))return t.updateDocumentWithKey(Ie,ot,e,It,kn,dt,je,cr);t.releaseDocumentWithKey(li.resolvedPath,t.getKeyForCompilationSettings(d.getCompilerOptions()),li.scriptKind,li.impliedNodeFormat),qt.add(li.resolvedPath)}}return t.acquireDocumentWithKey(Ie,ot,e,It,kn,dt,je,cr)}}function ue(){if(_===2){N.assert(d===void 0);return}return K(),d}function Y(){var j;return(j=e.getPackageJsonAutoImportProvider)==null?void 0:j.call(e)}function B(j,T){let x=d.getTypeChecker(),f=$();if(!f)return!1;for(let O of j)for(let fe of O.references){let be=Q(fe);if(N.assertIsDefined(be),T.has(fe)||ts_FindAllReferences_exports.isDeclarationOfSymbol(be,f)){T.add(fe),fe.isDefinition=!0;let he=getMappedDocumentSpan(fe,L,rr(e,e.fileExists));he&&T.add(he)}else fe.isDefinition=!1}return!0;function $(){for(let O of j)for(let fe of O.references){if(T.has(fe)){let he=Q(fe);return N.assertIsDefined(he),x.getSymbolAtLocation(he)}let be=getMappedDocumentSpan(fe,L,rr(e,e.fileExists));if(be&&T.has(be)){let he=Q(be);if(he)return x.getSymbolAtLocation(he)}}}function Q(O){let fe=d.getSourceFile(O.fileName);if(!fe)return;let be=getTouchingPropertyName(fe,O.textSpan.start);return ts_FindAllReferences_exports.Core.getAdjustedNode(be,{use:ts_FindAllReferences_exports.FindReferencesUse.References})}}function ae(){if(d){let j=t.getKeyForCompilationSettings(d.getCompilerOptions());yr(d.getSourceFiles(),T=>t.releaseDocumentWithKey(T.resolvedPath,j,T.scriptKind,T.impliedNodeFormat)),d=void 0}}function Ce(){ae(),e=void 0}function Ze(j){return K(),d.getSyntacticDiagnostics(G(j),v).slice()}function qe(j){K();let T=G(j),x=d.getSemanticDiagnostics(T,v);if(!z2(d.getCompilerOptions()))return x.slice();let f=d.getDeclarationDiagnostics(T,v);return[...x,...f]}function rt(j){return K(),computeSuggestionDiagnostics(G(j),d,v)}function it(){return K(),[...d.getOptionsDiagnostics(v),...d.getGlobalDiagnostics(v)]}function Ir(j,T,x=emptyOptions,f){let $={...x,includeCompletionsForModuleExports:x.includeCompletionsForModuleExports||x.includeExternalModuleExports,includeCompletionsWithInsertText:x.includeCompletionsWithInsertText||x.includeInsertTextCompletions};return K(),ts_Completions_exports.getCompletionsAtPosition(e,d,C,G(j),T,$,x.triggerCharacter,x.triggerKind,v,f&&ts_formatting_exports.getFormatContext(f,e),x.includeSymbol)}function ar(j,T,x,f,$,Q=emptyOptions,O){return K(),ts_Completions_exports.getCompletionEntryDetails(d,C,G(j),T,{name:x,source:$,data:O},e,f&&ts_formatting_exports.getFormatContext(f,e),Q,v)}function ci(j,T,x,f,$=emptyOptions){return K(),ts_Completions_exports.getCompletionEntrySymbol(d,C,G(j),T,{name:x,source:f},e,$)}function or(j,T){K();let x=G(j),f=getTouchingPropertyName(x,T);if(f===x)return;let $=d.getTypeChecker(),Q=Nr(f),O=iB(Q,$);if(!O||$.isUnknownSymbol(O)){let we=Ge(x,Q,T)?$.getTypeAtLocation(Q):void 0;return we&&{kind:"",kindModifiers:"",textSpan:createTextSpanFromNode(Q,x),displayParts:$.runWithCancellationToken(v,et=>typeToDisplayParts(et,we,getContainerNode(Q))),documentation:we.symbol?we.symbol.getDocumentationComment($):void 0,tags:we.symbol?we.symbol.getJsDocTags($):void 0}}let{symbolKind:fe,displayParts:be,documentation:he,tags:Re}=$.runWithCancellationToken(v,we=>ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(we,O,x,getContainerNode(Q),Q));return{kind:fe,kindModifiers:ts_SymbolDisplay_exports.getSymbolModifiers($,O),textSpan:createTextSpanFromNode(Q,x),displayParts:be,documentation:he,tags:Re}}function Nr(j){return a8(j.parent)&&j.pos===j.parent.pos?j.parent.expression:p6(j.parent)&&j.pos===j.parent.pos||x0(j.parent)&&j.parent.name===j||U_(j.parent)?j.parent:j}function Ge(j,T,x){switch(T.kind){case 80:return!isLabelName(T)&&!isTagName(T)&&!K4(T.parent);case 211:case 166:return!isInComment(j,x);case 110:case 197:case 108:case 202:return!0;case 236:return x0(T);default:return!1}}function Gt(j,T,x,f){return K(),ts_GoToDefinition_exports.getDefinitionAtPosition(d,G(j),T,x,f)}function Ur(j,T){return K(),ts_GoToDefinition_exports.getDefinitionAndBoundSpan(d,G(j),T)}function Xt(j,T){return K(),ts_GoToDefinition_exports.getTypeDefinitionAtPosition(d.getTypeChecker(),G(j),T)}function Tn(j,T){return K(),ts_FindAllReferences_exports.getImplementationsAtPosition(d,v,d.getSourceFiles(),G(j),T)}function Sn(j,T,x){let f=pn(j);N.assert(x.some(O=>pn(O)===f)),K();let $=Za(x,O=>d.getSourceFile(O)),Q=G(j);return DocumentHighlights.getDocumentHighlights(d,v,Q,T,$)}function sr(j,T,x,f,$){K();let Q=G(j),O=getAdjustedRenameLocation(getTouchingPropertyName(Q,T));if(ts_Rename_exports.nodeIsEligibleForRename(O))if(Ee(O)&&(Oo(O.parent)||zf(O.parent))&&zT(O.escapedText)){let{openingElement:fe,closingElement:be}=O.parent.parent;return[fe,be].map(he=>{let Re=createTextSpanFromNode(he.tagName,Q);return{fileName:Q.fileName,textSpan:Re,...ts_FindAllReferences_exports.toContextSpan(Re,Q,he.parent)}})}else{let fe=getQuotePreference(Q,$??emptyOptions),be=typeof $=="boolean"?$:$==null?void 0:$.providePrefixAndSuffixTextForRename;return St(O,T,{findInStrings:x,findInComments:f,providePrefixAndSuffixTextForRename:be,use:ts_FindAllReferences_exports.FindReferencesUse.Rename},(he,Re,we)=>ts_FindAllReferences_exports.toRenameLocation(he,Re,we,be||!1,fe))}}function $t(j,T){return K(),St(getTouchingPropertyName(G(j),T),T,{use:ts_FindAllReferences_exports.FindReferencesUse.References},ts_FindAllReferences_exports.toReferenceEntry)}function St(j,T,x,f){K();let $=x&&x.use===ts_FindAllReferences_exports.FindReferencesUse.Rename?d.getSourceFiles().filter(Q=>!d.isSourceFileDefaultLibrary(Q)):d.getSourceFiles();return ts_FindAllReferences_exports.findReferenceOrRenameEntries(d,v,$,j,T,x,f)}function xn(j,T){return K(),ts_FindAllReferences_exports.findReferencedSymbols(d,v,d.getSourceFiles(),G(j),T)}function Tr(j){return K(),ts_FindAllReferences_exports.Core.getReferencesForFileName(j,d,d.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry)}function vt(j,T,x,f=!1){K();let $=x?[G(x)]:d.getSourceFiles();return getNavigateToItems($,d.getTypeChecker(),v,j,T,f)}function ct(j,T,x){K();let f=G(j),$=e.getCustomTransformers&&e.getCustomTransformers();return getFileEmitOutput(d,f,!!T,v,$,x)}function Ut(j,T,{triggerReason:x}=emptyOptions){K();let f=G(j);return ts_SignatureHelp_exports.getSignatureHelpItems(d,f,T,x,v)}function fr(j){return p.getCurrentSourceFile(j)}function ht(j,T,x){let f=p.getCurrentSourceFile(j),$=getTouchingPropertyName(f,T);if($===f)return;switch($.kind){case 211:case 166:case 11:case 97:case 112:case 106:case 108:case 110:case 197:case 80:break;default:return}let Q=$;for(;;)if(isRightSideOfPropertyAccess(Q)||isRightSideOfQualifiedName(Q))Q=Q.parent;else if(isNameOfModuleDeclaration(Q))if(Q.parent.parent.kind===267&&Q.parent.parent.body===Q.parent)Q=Q.parent.parent.name;else break;else break;return Hi(Q.getStart(),$.getEnd())}function wn(j,T){let x=p.getCurrentSourceFile(j);return ts_BreakpointResolver_exports.spanInSourceFileAtLocation(x,T)}function Tt(j){return getNavigationBarItems(p.getCurrentSourceFile(j),v)}function Or(j){return getNavigationTree(p.getCurrentSourceFile(j),v)}function pt(j,T,x){return K(),(x||"original")==="2020"?getSemanticClassifications2(d,v,G(j),T):getSemanticClassifications(d.getTypeChecker(),v,G(j),d.getClassifiableNames(),T)}function Mr(j,T,x){return K(),(x||"original")==="original"?getEncodedSemanticClassifications(d.getTypeChecker(),v,G(j),d.getClassifiableNames(),T):getEncodedSemanticClassifications2(d,v,G(j),T)}function at(j,T){return getSyntacticClassifications(v,p.getCurrentSourceFile(j),T)}function er(j,T){return getEncodedSyntacticClassifications(v,p.getCurrentSourceFile(j),T)}function Qt(j){let T=p.getCurrentSourceFile(j);return ts_OutliningElementsCollector_exports.collectElements(T,v)}let tn=new Map(Object.entries({19:20,21:22,23:24,32:30}));tn.forEach((j,T)=>tn.set(j.toString(),Number(T)));function Bn(j,T){let x=p.getCurrentSourceFile(j),f=getTouchingToken(x,T),$=f.getStart(x)===T?tn.get(f.kind.toString()):void 0,Q=$&&findChildOfKind(f.parent,$,x);return Q?[createTextSpanFromNode(f,x),createTextSpanFromNode(Q,x)].sort((O,fe)=>O.start-fe.start):$e}function Un(j,T,x){let f=Sa(),$=sl(x),Q=p.getCurrentSourceFile(j);C("getIndentationAtPosition: getCurrentSourceFile: "+(Sa()-f)),f=Sa();let O=ts_formatting_exports.SmartIndenter.getIndentation(T,Q,$);return C("getIndentationAtPosition: computeIndentation : "+(Sa()-f)),O}function rn(j,T,x,f){let $=p.getCurrentSourceFile(j);return ts_formatting_exports.formatSelection(T,x,$,ts_formatting_exports.getFormatContext(sl(f),e))}function nn(j,T){return ts_formatting_exports.formatDocument(p.getCurrentSourceFile(j),ts_formatting_exports.getFormatContext(sl(T),e))}function Di(j,T,x,f){let $=p.getCurrentSourceFile(j),Q=ts_formatting_exports.getFormatContext(sl(f),e);if(!isInComment($,T))switch(x){case"{":return ts_formatting_exports.formatOnOpeningCurly(T,$,Q);case"}":return ts_formatting_exports.formatOnClosingCurly(T,$,Q);case";":return ts_formatting_exports.formatOnSemicolon(T,$,Q);case` -`:return ts_formatting_exports.formatOnEnter(T,$,Q)}return[]}function qn(j,T,x,f,$,Q=emptyOptions){K();let O=G(j),fe=Hi(T,x),be=ts_formatting_exports.getFormatContext($,e);return Bo(Sv(f,_o,kr),he=>(v.throwIfCancellationRequested(),ts_codefix_exports.getFixes({errorCode:he,sourceFile:O,span:fe,program:d,host:e,cancellationToken:v,formatContext:be,preferences:Q})))}function Ae(j,T,x,f=emptyOptions){K(),N.assert(j.type==="file");let $=G(j.fileName),Q=ts_formatting_exports.getFormatContext(x,e);return ts_codefix_exports.getAllFixes({fixId:T,sourceFile:$,program:d,host:e,cancellationToken:v,formatContext:Q,preferences:f})}function q(j,T,x=emptyOptions){K(),N.assert(j.type==="file");let f=G(j.fileName),$=ts_formatting_exports.getFormatContext(T,e),Q=j.mode??(j.skipDestructiveCodeActions?"SortAndCombine":"All");return ts_OrganizeImports_exports.organizeImports(f,$,e,d,x,Q)}function oe(j,T,x,f=emptyOptions){return getEditsForFileRename(ue(),j,T,e,ts_formatting_exports.getFormatContext(x,e),f,L)}function ge(j,T){let x=typeof j=="string"?T:j;return zt(x)?Promise.all(x.map(f=>Se(f))):Se(x)}function Se(j){let T=x=>xi(x,y,k);return N.assertEqual(j.type,"install package"),e.installPackage?e.installPackage({fileName:T(j.file),packageName:j.packageName}):Promise.reject("Host does not implement `installPackage`")}function nt(j,T,x,f){let $=f?ts_formatting_exports.getFormatContext(f,e).options:void 0;return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(e,$),p.getCurrentSourceFile(j),T,x)}function z(j,T,x){if(x===60)return!1;let f=p.getCurrentSourceFile(j);if(isInString(f,T))return!1;if(isInsideJsxElementOrAttribute(f,T))return x===123;if(isInTemplateString(f,T))return!1;switch(x){case 39:case 34:case 96:return!isInComment(f,T)}return!0}function X(j,T){let x=p.getCurrentSourceFile(j),f=findPrecedingToken(T,x);if(!f)return;let $=f.kind===32&&Oo(f.parent)?f.parent.parent:Dd(f)&&Q0(f.parent)?f.parent:void 0;if($&&jt($))return{newText:``};let Q=f.kind===32&&k6(f.parent)?f.parent.parent:Dd(f)&&dl(f.parent)?f.parent:void 0;if(Q&&qr(Q))return{newText:""}}function ee(j,T){let x=p.getCurrentSourceFile(j),f=findPrecedingToken(T,x);if(!f||f.parent.kind===312)return;let $="[a-zA-Z0-9:\\-\\._$]*";if(dl(f.parent.parent)){let Q=f.parent.parent.openingFragment,O=f.parent.parent.closingFragment;if(xl(Q)||xl(O))return;let fe=Q.getStart(x)+1,be=O.getStart(x)+2;return T!==fe&&T!==be?void 0:{ranges:[{start:fe,length:0},{start:be,length:0}],wordPattern:$}}else{let Q=Kr(f.parent,Ye=>!!(Oo(Ye)||zf(Ye)));if(!Q)return;N.assert(Oo(Q)||zf(Q),"tag should be opening or closing element");let O=Q.parent.openingElement,fe=Q.parent.closingElement,be=O.tagName.getStart(x),he=O.tagName.end,Re=fe.tagName.getStart(x),we=fe.tagName.end;return!(be<=T&&T<=he||Re<=T&&T<=we)||O.tagName.getText(x)!==fe.tagName.getText(x)?void 0:{ranges:[{start:be,length:he-be},{start:Re,length:we-Re}],wordPattern:$}}}function xe(j,T){return{lineStarts:j.getLineStarts(),firstLine:j.getLineAndCharacterOfPosition(T.pos).line,lastLine:j.getLineAndCharacterOfPosition(T.end).line}}function ke(j,T,x){let f=p.getCurrentSourceFile(j),$=[],{lineStarts:Q,firstLine:O,lastLine:fe}=xe(f,T),be=x||!1,he=Number.MAX_VALUE,Re=new Map,we=new RegExp(/\S/),et=isInsideJsxElement(f,Q[O]),Ye=et?"{/*":"//";for(let Ke=O;Ke<=fe;Ke++){let It=f.text.substring(Q[Ke],f.getLineEndOfPosition(Q[Ke])),qt=we.exec(It);qt&&(he=Math.min(he,qt.index),Re.set(Ke.toString(),qt.index),It.substr(qt.index,Ye.length)!==Ye&&(be=x===void 0||x))}for(let Ke=O;Ke<=fe;Ke++){if(O!==fe&&Q[Ke]===T.end)continue;let It=Re.get(Ke.toString());It!==void 0&&(et?$.push.apply($,Le(j,{pos:Q[Ke]+he,end:f.getLineEndOfPosition(Q[Ke])},be,et)):be?$.push({newText:Ye,span:{length:0,start:Q[Ke]+he}}):f.text.substr(Q[Ke]+It,Ye.length)===Ye&&$.push({newText:"",span:{length:Ye.length,start:Q[Ke]+It}}))}return $}function Le(j,T,x,f){var $;let Q=p.getCurrentSourceFile(j),O=[],{text:fe}=Q,be=!1,he=x||!1,Re=[],{pos:we}=T,et=f!==void 0?f:isInsideJsxElement(Q,we),Ye=et?"{/*":"/*",Ke=et?"*/}":"*/",It=et?"\\{\\/\\*":"\\/\\*",qt=et?"\\*\\/\\}":"\\*\\/";for(;we<=T.end;){let _r=fe.substr(we,Ye.length)===Ye?Ye.length:0,Te=isInComment(Q,we+_r);if(Te)et&&(Te.pos--,Te.end++),Re.push(Te.pos),Te.kind===3&&Re.push(Te.end),be=!0,we=Te.end+1;else{let ft=fe.substring(we,T.end).search(`(${It})|(${qt})`);he=x!==void 0?x:he||!isTextWhiteSpaceLike(fe,we,ft===-1?T.end:we+ft),we=ft===-1?T.end+1:we+ft+Ke.length}}if(he||!be){(($=isInComment(Q,T.pos))==null?void 0:$.kind)!==2&&yl(Re,T.pos,kr),yl(Re,T.end,kr);let _r=Re[0];fe.substr(_r,Ye.length)!==Ye&&O.push({newText:Ye,span:{length:0,start:_r}});for(let Te=1;Te0?_r-Ke.length:0,ft=fe.substr(Te,Ke.length)===Ke?Ke.length:0;O.push({newText:"",span:{length:Ye.length,start:_r-ft}})}return O}function lt(j,T){let x=p.getCurrentSourceFile(j),{firstLine:f,lastLine:$}=xe(x,T);return f===$&&T.pos!==T.end?Le(j,T,!0):ke(j,T,!0)}function yt(j,T){let x=p.getCurrentSourceFile(j),f=[],{pos:$}=T,{end:Q}=T;$===Q&&(Q+=isInsideJsxElement(x,$)?2:1);for(let O=$;O<=Q;O++){let fe=isInComment(x,O);if(fe){switch(fe.kind){case 2:f.push.apply(f,ke(j,{end:fe.end,pos:fe.pos+1},!1));break;case 3:f.push.apply(f,Le(j,{end:fe.end,pos:fe.pos+1},!1))}O=fe.end+1}}return f}function jt({openingElement:j,closingElement:T,parent:x}){return!Ti(j.tagName,T.tagName)||Q0(x)&&Ti(j.tagName,x.openingElement.tagName)&&jt(x)}function qr({closingFragment:j,parent:T}){return!!(j.flags&262144)||dl(T)&&qr(T)}function na(j,T,x){let f=p.getCurrentSourceFile(j),$=ts_formatting_exports.getRangeOfEnclosingComment(f,T);return $&&(!x||$.kind===3)?createTextSpanFromRange($):void 0}function Cn(j,T){K();let x=G(j);v.throwIfCancellationRequested();let f=x.text,$=[];if(T.length>0&&!be(x.fileName)){let he=O(),Re;for(;Re=he.exec(f);){v.throwIfCancellationRequested();let we=3;N.assert(Re.length===T.length+we);let et=Re[1],Ye=Re.index+et.length;if(!isInComment(x,Ye))continue;let Ke;for(let qt=0;qt"("+Q(Te.text)+")").join("|")+")",Ke=/(?:$|\*\/)/.source,It=/(?:.*?)/.source,qt="("+Ye+It+")",_r=et+qt+Ke;return new RegExp(_r,"gim")}function fe(he){return he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57}function be(he){return eo(he,"/node_modules/")}}function zn(j,T,x){return K(),ts_Rename_exports.getRenameInfo(d,G(j),T,x||{})}function Pi(j,T,x,f,$,Q){let[O,fe]=typeof T=="number"?[T,void 0]:[T.pos,T.end];return{file:j,startPosition:O,endPosition:fe,program:ue(),host:e,formatContext:ts_formatting_exports.getFormatContext(f,e),cancellationToken:v,preferences:x,triggerReason:$,kind:Q}}function ia(j,T,x){return{file:j,program:ue(),host:e,span:T,preferences:x,cancellationToken:v}}function Wn(j,T){return ts_SmartSelectionRange_exports.getSmartSelectionRange(T,p.getCurrentSourceFile(j))}function En(j,T,x=emptyOptions,f,$,Q){K();let O=G(j);return ts_refactor_exports.getApplicableRefactors(Pi(O,T,x,emptyOptions,f,$),Q)}function Ii(j,T,x=emptyOptions){K();let f=G(j),$=N.checkDefined(d.getSourceFiles()),Q=rl(j),O=Za($,be=>!(d!=null&&d.isSourceFileFromExternalLibrary(f))&&!(f===G(be.fileName)||Q===".ts"&&rl(be.fileName)===".d.ts"||Q===".d.ts"&&Fr(T_(be.fileName),"lib.")&&rl(be.fileName)===".d.ts")&&Q===rl(be.fileName)?be.fileName:void 0);return{newFileName:createNewFileName(f,d,Pi(f,T,x,emptyOptions),e),files:O}}function aa(j,T,x,f,$,Q=emptyOptions,O){K();let fe=G(j);return ts_refactor_exports.getEditsForRefactor(Pi(fe,x,Q,T),f,$,O)}function Vn(j,T){return T===0?{line:0,character:0}:L.toLineColumnOffset(j,T)}function Sr(j,T){K();let x=ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(d,getTouchingPropertyName(G(j),T));return x&&mapOneOrMany(x,f=>ts_CallHierarchy_exports.createCallHierarchyItem(d,f))}function Je(j,T){K();let x=G(j),f=firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(d,T===0?x:getTouchingPropertyName(x,T)));return f?ts_CallHierarchy_exports.getIncomingCalls(d,f,v):[]}function oa(j,T){K();let x=G(j),f=firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(d,T===0?x:getTouchingPropertyName(x,T)));return f?ts_CallHierarchy_exports.getOutgoingCalls(d,f):[]}function Mt(j,T,x=emptyOptions){K();let f=G(j);return ts_InlayHints_exports.provideInlayHints(ia(f,T,x))}let Lr={dispose:Ce,cleanupSemanticCache:ae,getSyntacticDiagnostics:Ze,getSemanticDiagnostics:qe,getSuggestionDiagnostics:rt,getCompilerOptionsDiagnostics:it,getSyntacticClassifications:at,getSemanticClassifications:pt,getEncodedSyntacticClassifications:er,getEncodedSemanticClassifications:Mr,getCompletionsAtPosition:Ir,getCompletionEntryDetails:ar,getCompletionEntrySymbol:ci,getSignatureHelpItems:Ut,getQuickInfoAtPosition:or,getDefinitionAtPosition:Gt,getDefinitionAndBoundSpan:Ur,getImplementationAtPosition:Tn,getTypeDefinitionAtPosition:Xt,getReferencesAtPosition:$t,findReferences:xn,getFileReferences:Tr,getDocumentHighlights:Sn,getNameOrDottedNameSpan:ht,getBreakpointStatementAtPosition:wn,getNavigateToItems:vt,getRenameInfo:zn,getSmartSelectionRange:Wn,findRenameLocations:sr,getNavigationBarItems:Tt,getNavigationTree:Or,getOutliningSpans:Qt,getTodoComments:Cn,getBraceMatchingAtPosition:Bn,getIndentationAtPosition:Un,getFormattingEditsForRange:rn,getFormattingEditsForDocument:nn,getFormattingEditsAfterKeystroke:Di,getDocCommentTemplateAtPosition:nt,isValidBraceCompletionAtPosition:z,getJsxClosingTagAtPosition:X,getLinkedEditingRangeAtPosition:ee,getSpanOfEnclosingComment:na,getCodeFixesAtPosition:qn,getCombinedCodeFix:Ae,applyCodeActionCommand:ge,organizeImports:q,getEditsForFileRename:oe,getEmitOutput:ct,getNonBoundSourceFile:fr,getProgram:ue,getCurrentProgram:()=>d,getAutoImportProvider:Y,updateIsDefinitionOfReferencedSymbols:B,getApplicableRefactors:En,getEditsForRefactor:aa,getMoveToRefactoringFileSuggestions:Ii,toLineColumnOffset:Vn,getSourceMapper:()=>L,clearSourceMapperCache:()=>L.clearCache(),prepareCallHierarchy:Sr,provideCallHierarchyIncomingCalls:Je,provideCallHierarchyOutgoingCalls:oa,toggleLineComment:ke,toggleMultilineComment:Le,commentSelection:lt,uncommentSelection:yt,provideInlayHints:Mt,getSupportedCodeFixes:_7};switch(_){case 0:break;case 1:rg.forEach(j=>Lr[j]=()=>{throw new Error(`LanguageService Operation: ${j} not allowed in LanguageServiceMode.PartialSemantic`)});break;case 2:x7.forEach(j=>Lr[j]=()=>{throw new Error(`LanguageService Operation: ${j} not allowed in LanguageServiceMode.Syntactic`)});break;default:N.assertNever(_)}return Lr}function eB(e){return e.nameTable||tB(e),e.nameTable}function tB(e){let t=e.nameTable=new Map;e.forEachChild(function r(a){if(Ee(a)&&!isTagName(a)&&a.escapedText||Qi(a)&&rB(a)){let _=LT(a);t.set(_,t.get(_)===void 0?a.pos:-1)}else if(jr(a)){let _=a.escapedText;t.set(_,t.get(_)===void 0?a.pos:-1)}if(Bt(a,r),Wi(a))for(let _ of a.jsDoc)Bt(_,r)})}function rB(e){return xT(e)||e.parent.kind===283||aB(e)||wT(e)}function u7(e){let t=nB(e);return t&&(uo(t.parent)||D6(t.parent))?t:void 0}function nB(e){switch(e.kind){case 11:case 15:case 9:if(e.parent.kind===167)return b0(e.parent.parent)?e.parent.parent:void 0;case 80:return b0(e.parent)&&(e.parent.parent.kind===210||e.parent.parent.kind===292)&&e.parent.name===e?e.parent:void 0}}function iB(e,t){let r=u7(e);if(r){let a=t.getContextualType(r.parent),_=a&&p7(r,t,a,!1);if(_&&_.length===1)return og(_)}return t.getSymbolAtLocation(e)}function p7(e,t,r,a){let _=getNameFromPropertyName(e.name);if(!_)return $e;if(!r.isUnion()){let d=r.getProperty(_);return d?[d]:$e}let p=Za(r.types,d=>(uo(e.parent)||D6(e.parent))&&t.isTypeInvalidDueToUnionDiscriminant(d,e.parent)?void 0:d.getProperty(_));if(a&&(p.length===0||p.length===r.types.length)){let d=r.getProperty(_);if(d)return[d]}return p.length===0?Za(r.types,d=>d.getProperty(_)):p}function aB(e){return e&&e.parent&&e.parent.kind===212&&e.parent.argumentExpression===e}function oB(e){if(f0)return hr($i(pn(f0.getExecutingFilePath())),v4(e));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}var f7,Od,Pf,d7,W6,Md,Ld,m7,h7,y7,g7,b7,v7,T7,S7,rg,x7,sB=Vt({"src/services/services.ts"(){"use strict";w7(),t7(),r7(),n7(),e7(),XF(),f7="0.8",Od=class{constructor(e,t,r){this.pos=t,this.end=r,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.kind=e}assertHasRealPosition(e){N.assert(!Oa(this.pos)&&!Oa(this.end),e||"Node must have a real position for this operation")}getSourceFile(){return ri(this)}getStart(e,t){return this.assertHasRealPosition(),Go(this,e,t)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos}getFullText(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(e){return this.getChildren(e).length}getChildAt(e,t){return this.getChildren(t)[e]}getChildren(e){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),this._children||(this._children=$F(this,e))}getFirstToken(e){this.assertHasRealPosition();let t=this.getChildren(e);if(!t.length)return;let r=Yr(t,a=>a.kind<316||a.kind>357);return r.kind<166?r:r.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();let t=this.getChildren(e),r=wi(t);if(r)return r.kind<166?r:r.getLastToken(e)}forEachChild(e,t){return Bt(this,e,t)}},Pf=class{constructor(e,t){this.pos=e,this.end=t,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0}getSourceFile(){return ri(this)}getStart(e,t){return Go(this,e,t)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(e){return this.getEnd()-this.getStart(e)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(e){return this.getStart(e)-this.pos}getFullText(e){return(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(){return this.getChildren().length}getChildAt(e){return this.getChildren()[e]}getChildren(){return this.kind===1&&this.jsDoc||$e}getFirstToken(){}getLastToken(){}forEachChild(){}},d7=class{constructor(e,t){this.id=0,this.mergeId=0,this.flags=e,this.escapedName=t}getFlags(){return this.flags}get name(){return hd(this)}getEscapedName(){return this.escapedName}getName(){return this.name}getDeclarations(){return this.declarations}getDocumentationComment(e){if(!this.documentationComment)if(this.documentationComment=$e,!this.declarations&&T0(this)&&this.links.target&&T0(this.links.target)&&this.links.target.links.tupleLabelDeclaration){let t=this.links.target.links.tupleLabelDeclaration;this.documentationComment=Kc([t],e)}else this.documentationComment=Kc(this.declarations,e);return this.documentationComment}getContextualDocumentationComment(e,t){if(e){if(el(e)&&(this.contextualGetAccessorDocumentationComment||(this.contextualGetAccessorDocumentationComment=Kc($r(this.declarations,el),t)),Ka(this.contextualGetAccessorDocumentationComment)))return this.contextualGetAccessorDocumentationComment;if(Zc(e)&&(this.contextualSetAccessorDocumentationComment||(this.contextualSetAccessorDocumentationComment=Kc($r(this.declarations,Zc),t)),Ka(this.contextualSetAccessorDocumentationComment)))return this.contextualSetAccessorDocumentationComment}return this.getDocumentationComment(t)}getJsDocTags(e){return this.tags===void 0&&(this.tags=Df(this.declarations,e)),this.tags}getContextualJsDocTags(e,t){if(e){if(el(e)&&(this.contextualGetAccessorTags||(this.contextualGetAccessorTags=Df($r(this.declarations,el),t)),Ka(this.contextualGetAccessorTags)))return this.contextualGetAccessorTags;if(Zc(e)&&(this.contextualSetAccessorTags||(this.contextualSetAccessorTags=Df($r(this.declarations,Zc),t)),Ka(this.contextualSetAccessorTags)))return this.contextualSetAccessorTags}return this.getJsDocTags(t)}},W6=class extends Pf{constructor(e,t,r){super(t,r),this.kind=e}},Md=class extends Pf{constructor(e,t,r){super(t,r),this.kind=80}get text(){return Ot(this)}},Md.prototype.kind=80,Ld=class extends Pf{constructor(e,t,r){super(t,r),this.kind=81}get text(){return Ot(this)}},Ld.prototype.kind=81,m7=class{constructor(e,t){this.checker=e,this.flags=t}getFlags(){return this.flags}getSymbol(){return this.symbol}getProperties(){return this.checker.getPropertiesOfType(this)}getProperty(e){return this.checker.getPropertyOfType(this,e)}getApparentProperties(){return this.checker.getAugmentedPropertiesOfType(this)}getCallSignatures(){return this.checker.getSignaturesOfType(this,0)}getConstructSignatures(){return this.checker.getSignaturesOfType(this,1)}getStringIndexType(){return this.checker.getIndexTypeOfType(this,0)}getNumberIndexType(){return this.checker.getIndexTypeOfType(this,1)}getBaseTypes(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0}isNullableType(){return this.checker.isNullableType(this)}getNonNullableType(){return this.checker.getNonNullableType(this)}getNonOptionalType(){return this.checker.getNonOptionalType(this)}getConstraint(){return this.checker.getBaseConstraintOfType(this)}getDefault(){return this.checker.getDefaultFromTypeParameter(this)}isUnion(){return!!(this.flags&1048576)}isIntersection(){return!!(this.flags&2097152)}isUnionOrIntersection(){return!!(this.flags&3145728)}isLiteral(){return!!(this.flags&2432)}isStringLiteral(){return!!(this.flags&128)}isNumberLiteral(){return!!(this.flags&256)}isTypeParameter(){return!!(this.flags&262144)}isClassOrInterface(){return!!(jf(this)&3)}isClass(){return!!(jf(this)&1)}isIndexType(){return!!(this.flags&4194304)}get typeArguments(){if(jf(this)&4)return this.checker.getTypeArguments(this)}},h7=class{constructor(e,t){this.checker=e,this.flags=t}getDeclaration(){return this.declaration}getTypeParameters(){return this.typeParameters}getParameters(){return this.parameters}getReturnType(){return this.checker.getReturnTypeOfSignature(this)}getTypeParameterAtPosition(e){let t=this.checker.getParameterType(this,e);if(t.isIndexType()&&ax(t.type)){let r=t.type.getConstraint();if(r)return this.checker.getIndexType(r)}return t}getDocumentationComment(){return this.documentationComment||(this.documentationComment=Kc(Qf(this.declaration),this.checker))}getJsDocTags(){return this.jsDocTags||(this.jsDocTags=Df(Qf(this.declaration),this.checker))}},y7=class extends Od{constructor(e,t,r){super(e,t,r),this.kind=312}update(e,t){return q6(this,e,t)}getLineAndCharacterOfPosition(e){return to(this,e)}getLineStarts(){return Ia(this)}getPositionOfLineAndCharacter(e,t,r){return Tg(Ia(this),e,t,this.text,r)}getLineEndOfPosition(e){let{line:t}=this.getLineAndCharacterOfPosition(e),r=this.getLineStarts(),a;t+1>=r.length&&(a=this.getEnd()),a||(a=r[t+1]-1);let _=this.getFullText();return _[a]===` -`&&_[a-1]==="\r"?a-1:a}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=Fd();return this.forEachChild(_),e;function t(p){let d=a(p);d&&e.add(d,p)}function r(p){let d=e.get(p);return d||e.set(p,d=[]),d}function a(p){let d=Kd(p);return d&&(ao(d)&&Br(d.expression)?d.expression.name.text:zl(d)?getNameFromPropertyName(d):void 0)}function _(p){switch(p.kind){case 262:case 218:case 174:case 173:let d=p,h=a(d);if(h){let y=r(h),C=wi(y);C&&d.parent===C.parent&&d.symbol===C.symbol?d.body&&!C.body&&(y[y.length-1]=d):y.push(d)}Bt(p,_);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(p),Bt(p,_);break;case 169:if(!gr(p,16476))break;case 260:case 208:{let y=p;if(am(y.name)){Bt(y.name,_);break}y.initializer&&_(y.initializer)}case 306:case 172:case 171:t(p);break;case 278:let l=p;l.exportClause&&(f8(l.exportClause)?yr(l.exportClause.elements,_):_(l.exportClause.name));break;case 272:let v=p.importClause;v&&(v.name&&t(v.name),v.namedBindings&&(v.namedBindings.kind===274?t(v.namedBindings):yr(v.namedBindings.elements,_)));break;case 226:Ja(p)!==0&&t(p);default:Bt(p,_)}}}},g7=class{constructor(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r}getLineAndCharacterOfPosition(e){return to(this,e)}},b7=class{constructor(e){this.host=e}getCurrentSourceFile(e){var t,r,a,_,p,d,h,l;let v=this.host.getScriptSnapshot(e);if(!v)throw new Error("Could not find file: '"+e+"'.");let y=getScriptKind(e,this.host),C=this.host.getScriptVersion(e),S;if(this.currentFileName!==e){let k={languageVersion:99,impliedNodeFormat:getImpliedNodeFormatForFile(xi(e,this.host.getCurrentDirectory(),((a=(r=(t=this.host).getCompilerHost)==null?void 0:r.call(t))==null?void 0:a.getCanonicalFileName)||WT(this.host)),(l=(h=(d=(p=(_=this.host).getCompilerHost)==null?void 0:p.call(_))==null?void 0:d.getModuleResolutionCache)==null?void 0:h.call(d))==null?void 0:l.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:JS(this.host.getCompilationSettings())};S=z6(e,v,k,C,!0,y)}else if(this.currentFileVersion!==C){let k=v.getChangeRange(this.currentFileScriptSnapshot);S=l7(this.currentSourceFile,v,C,k)}return S&&(this.currentFileVersion=C,this.currentFileName=e,this.currentFileScriptSnapshot=v,this.currentSourceFile=S),this.currentSourceFile}},v7={isCancellationRequested:$f,throwIfCancellationRequested:Rn},T7=class{constructor(e){this.cancellationToken=e}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw(e=xa)==null||e.instant(xa.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new ad}},S7=class{constructor(e,t=20){this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}isCancellationRequested(){let e=Sa();return Math.abs(e-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds?(this.lastCancellationCheckTime=e,this.hostCancellationToken.isCancellationRequested()):!1}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw(e=xa)==null||e.instant(xa.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new ad}},rg=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes"],x7=[...rg,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"],PS(YF())}}),_B=()=>{},cB=()=>{},lB=()=>{},uB=()=>{},pB=()=>{},fB=()=>{},dB=()=>{},mB=()=>{},hB=()=>{},yB=()=>{},gB=()=>{},bB=()=>{},vB=()=>{},TB=()=>{},SB=()=>{},xB=()=>{},wB=()=>{},CB=()=>{},EB=()=>{},w7=Vt({"src/services/_namespaces/ts.ts"(){"use strict";Dr(),K8(),jF(),Z8(),FF(),e7(),BF(),UF(),qF(),zF(),WF(),VF(),HF(),GF(),sB(),_B(),cB(),lB(),uB(),pB(),fB(),dB(),mB(),hB(),yB(),gB(),t7(),r7(),bB(),vB(),n7(),TB(),SB(),xB(),wB(),CB(),EB()}}),AB=()=>{},C7={};I5(C7,{ANONYMOUS:()=>ANONYMOUS,AccessFlags:()=>Ly,AssertionLevel:()=>ay,AssignmentDeclarationKind:()=>Wy,AssignmentKind:()=>B0,Associativity:()=>q0,BreakpointResolver:()=>ts_BreakpointResolver_exports,BuilderFileEmit:()=>BuilderFileEmit,BuilderProgramKind:()=>BuilderProgramKind,BuilderState:()=>BuilderState,BundleFileSectionKind:()=>l0,CallHierarchy:()=>ts_CallHierarchy_exports,CharacterCodes:()=>n0,CheckFlags:()=>Py,CheckMode:()=>CheckMode,ClassificationType:()=>ClassificationType,ClassificationTypeNames:()=>ClassificationTypeNames,CommentDirectiveType:()=>fy,Comparison:()=>Zh,CompletionInfoFlags:()=>CompletionInfoFlags,CompletionTriggerKind:()=>CompletionTriggerKind,Completions:()=>ts_Completions_exports,ConfigFileProgramReloadLevel:()=>ConfigFileProgramReloadLevel,ContainerFlags:()=>ContainerFlags,ContextFlags:()=>Ty,CoreServicesShimHostAdapter:()=>CoreServicesShimHostAdapter,Debug:()=>N,DiagnosticCategory:()=>ld,Diagnostics:()=>U,DocumentHighlights:()=>DocumentHighlights,ElementFlags:()=>My,EmitFlags:()=>dd,EmitHint:()=>s0,EmitOnly:()=>hy,EndOfLineState:()=>EndOfLineState,EnumKind:()=>Dy,ExitStatus:()=>gy,ExportKind:()=>ExportKind,Extension:()=>i0,ExternalEmitHelpers:()=>o0,FileIncludeKind:()=>dy,FilePreprocessingDiagnosticsKind:()=>my,FileSystemEntryKind:()=>FileSystemEntryKind,FileWatcherEventKind:()=>FileWatcherEventKind,FindAllReferences:()=>ts_FindAllReferences_exports,FlattenLevel:()=>FlattenLevel,FlowFlags:()=>bl,ForegroundColorEscapeSequences:()=>ForegroundColorEscapeSequences,FunctionFlags:()=>U0,GeneratedIdentifierFlags:()=>uy,GetLiteralTextFlags:()=>F0,GoToDefinition:()=>ts_GoToDefinition_exports,HighlightSpanKind:()=>HighlightSpanKind,IdentifierNameMap:()=>IdentifierNameMap,IdentifierNameMultiMap:()=>IdentifierNameMultiMap,ImportKind:()=>ImportKind,ImportsNotUsedAsValues:()=>Ky,IndentStyle:()=>IndentStyle,IndexFlags:()=>Jy,IndexKind:()=>Fy,InferenceFlags:()=>qy,InferencePriority:()=>Uy,InlayHintKind:()=>InlayHintKind,InlayHints:()=>ts_InlayHints_exports,InternalEmitFlags:()=>a0,InternalSymbolName:()=>Iy,InvalidatedProjectKind:()=>InvalidatedProjectKind,JsDoc:()=>ts_JsDoc_exports,JsTyping:()=>ts_JsTyping_exports,JsxEmit:()=>Yy,JsxFlags:()=>ly,JsxReferenceKind:()=>Ry,LanguageServiceMode:()=>LanguageServiceMode,LanguageServiceShimHostAdapter:()=>LanguageServiceShimHostAdapter,LanguageVariant:()=>t0,LexicalEnvironmentFlags:()=>c0,ListFormat:()=>u0,LogLevel:()=>sy,MemberOverrideStatus:()=>by,ModifierFlags:()=>nd,ModuleDetectionKind:()=>Hy,ModuleInstanceState:()=>ModuleInstanceState,ModuleKind:()=>Qy,ModuleResolutionKind:()=>Vy,ModuleSpecifierEnding:()=>G0,NavigateTo:()=>ts_NavigateTo_exports,NavigationBar:()=>ts_NavigationBar_exports,NewLineKind:()=>Zy,NodeBuilderFlags:()=>Sy,NodeCheckFlags:()=>Ny,NodeFactoryFlags:()=>X0,NodeFlags:()=>rd,NodeResolutionFeatures:()=>NodeResolutionFeatures,ObjectFlags:()=>_d,OperationCanceledException:()=>ad,OperatorPrecedence:()=>z0,OrganizeImports:()=>ts_OrganizeImports_exports,OrganizeImportsMode:()=>OrganizeImportsMode,OuterExpressionKinds:()=>_0,OutliningElementsCollector:()=>ts_OutliningElementsCollector_exports,OutliningSpanKind:()=>OutliningSpanKind,OutputFileType:()=>OutputFileType,PackageJsonAutoImportPreference:()=>PackageJsonAutoImportPreference,PackageJsonDependencyGroup:()=>PackageJsonDependencyGroup,PatternMatchKind:()=>PatternMatchKind,PollingInterval:()=>PollingInterval,PollingWatchKind:()=>$y,PragmaKindFlags:()=>p0,PrivateIdentifierKind:()=>PrivateIdentifierKind,ProcessLevel:()=>ProcessLevel,QuotePreference:()=>QuotePreference,RelationComparisonResult:()=>id,Rename:()=>ts_Rename_exports,ScriptElementKind:()=>ScriptElementKind,ScriptElementKindModifier:()=>ScriptElementKindModifier,ScriptKind:()=>ud,ScriptSnapshot:()=>ScriptSnapshot,ScriptTarget:()=>e0,SemanticClassificationFormat:()=>SemanticClassificationFormat,SemanticMeaning:()=>SemanticMeaning,SemicolonPreference:()=>SemicolonPreference,SignatureCheckMode:()=>SignatureCheckMode,SignatureFlags:()=>cd,SignatureHelp:()=>ts_SignatureHelp_exports,SignatureKind:()=>jy,SmartSelectionRange:()=>ts_SmartSelectionRange_exports,SnippetKind:()=>fd,SortKind:()=>ny,StructureIsReused:()=>yy,SymbolAccessibility:()=>Cy,SymbolDisplay:()=>ts_SymbolDisplay_exports,SymbolDisplayPartKind:()=>SymbolDisplayPartKind,SymbolFlags:()=>od,SymbolFormatFlags:()=>wy,SyntaxKind:()=>td,SyntheticSymbolKind:()=>Ey,Ternary:()=>zy,ThrottledCancellationToken:()=>S7,TokenClass:()=>TokenClass,TokenFlags:()=>py,TransformFlags:()=>pd,TypeFacts:()=>TypeFacts,TypeFlags:()=>sd,TypeFormatFlags:()=>xy,TypeMapKind:()=>By,TypePredicateKind:()=>Ay,TypeReferenceSerializationKind:()=>ky,TypeScriptServicesFactory:()=>TypeScriptServicesFactory,UnionReduction:()=>vy,UpToDateStatusType:()=>UpToDateStatusType,VarianceFlags:()=>Oy,Version:()=>Version,VersionRange:()=>VersionRange,WatchDirectoryFlags:()=>r0,WatchDirectoryKind:()=>Xy,WatchFileKind:()=>Gy,WatchLogLevel:()=>WatchLogLevel,WatchType:()=>WatchType,accessPrivateIdentifier:()=>accessPrivateIdentifier,addDisposableResourceHelper:()=>addDisposableResourceHelper,addEmitFlags:()=>addEmitFlags,addEmitHelper:()=>addEmitHelper,addEmitHelpers:()=>addEmitHelpers,addInternalEmitFlags:()=>addInternalEmitFlags,addNodeFactoryPatcher:()=>EL,addObjectAllocatorPatcher:()=>zO,addRange:()=>Rr,addRelatedInfo:()=>nl,addSyntheticLeadingComment:()=>addSyntheticLeadingComment,addSyntheticTrailingComment:()=>addSyntheticTrailingComment,addToSeen:()=>PO,advancedAsyncSuperHelper:()=>advancedAsyncSuperHelper,affectsDeclarationPathOptionDeclarations:()=>affectsDeclarationPathOptionDeclarations,affectsEmitOptionDeclarations:()=>affectsEmitOptionDeclarations,allKeysStartWithDot:()=>allKeysStartWithDot,altDirectorySeparator:()=>vg,and:()=>rE,append:()=>xt,appendIfUnique:()=>wv,arrayFrom:()=>jd,arrayIsEqualTo:()=>sC,arrayIsHomogeneous:()=>QM,arrayIsSorted:()=>aC,arrayOf:()=>TC,arrayReverseIterator:()=>uC,arrayToMap:()=>xC,arrayToMultiMap:()=>Dv,arrayToNumericMap:()=>wC,arraysEqual:()=>gv,assertType:()=>iE,assign:()=>SC,assignHelper:()=>assignHelper,asyncDelegator:()=>asyncDelegator,asyncGeneratorHelper:()=>asyncGeneratorHelper,asyncSuperHelper:()=>asyncSuperHelper,asyncValues:()=>asyncValues,attachFileToDiagnostics:()=>$a,awaitHelper:()=>awaitHelper,awaiterHelper:()=>awaiterHelper,base64decode:()=>KN,base64encode:()=>YN,binarySearch:()=>Ml,binarySearchKey:()=>Av,bindSourceFile:()=>bindSourceFile,breakIntoCharacterSpans:()=>breakIntoCharacterSpans,breakIntoWordSpans:()=>breakIntoWordSpans,buildLinkParts:()=>buildLinkParts,buildOpts:()=>buildOpts,buildOverload:()=>buildOverload,bundlerModuleNameResolver:()=>bundlerModuleNameResolver,canBeConvertedToAsync:()=>canBeConvertedToAsync,canHaveDecorators:()=>U8,canHaveExportModifier:()=>lL,canHaveFlowNode:()=>bI,canHaveIllegalDecorators:()=>zR,canHaveIllegalModifiers:()=>WR,canHaveIllegalType:()=>qR,canHaveIllegalTypeParameters:()=>j8,canHaveJSDoc:()=>mm,canHaveLocals:()=>Tk,canHaveModifiers:()=>q_,canHaveSymbol:()=>vk,canJsonReportNoInputFiles:()=>canJsonReportNoInputFiles,canProduceDiagnostics:()=>canProduceDiagnostics,canUsePropertyAccess:()=>uL,canWatchAffectingLocation:()=>canWatchAffectingLocation,canWatchAtTypes:()=>canWatchAtTypes,canWatchDirectoryOrFile:()=>canWatchDirectoryOrFile,cartesianProduct:()=>oE,cast:()=>gi,chainBundle:()=>chainBundle,chainDiagnosticMessages:()=>tl,changeAnyExtension:()=>Qv,changeCompilerHostLikeToUseCache:()=>changeCompilerHostLikeToUseCache,changeExtension:()=>OM,changesAffectModuleResolution:()=>Uk,changesAffectingProgramStructure:()=>qk,childIsDecorated:()=>s2,classElementOrClassElementParameterIsDecorated:()=>qP,classHasClassThisAssignment:()=>classHasClassThisAssignment,classHasDeclaredOrExplicitlyAssignedName:()=>classHasDeclaredOrExplicitlyAssignedName,classHasExplicitlyAssignedName:()=>classHasExplicitlyAssignedName,classOrConstructorParameterIsDecorated:()=>UP,classPrivateFieldGetHelper:()=>classPrivateFieldGetHelper,classPrivateFieldInHelper:()=>classPrivateFieldInHelper,classPrivateFieldSetHelper:()=>classPrivateFieldSetHelper,classicNameResolver:()=>classicNameResolver,classifier:()=>ts_classifier_exports,cleanExtendedConfigCache:()=>cleanExtendedConfigCache,clear:()=>U5,clearMap:()=>wO,clearSharedExtendedConfigFileWatcher:()=>clearSharedExtendedConfigFileWatcher,climbPastPropertyAccess:()=>climbPastPropertyAccess,climbPastPropertyOrElementAccess:()=>climbPastPropertyOrElementAccess,clone:()=>AC,cloneCompilerOptions:()=>cloneCompilerOptions,closeFileWatcher:()=>yO,closeFileWatcherOf:()=>closeFileWatcherOf,codefix:()=>ts_codefix_exports,collapseTextChangeRangesAcrossMultipleVersions:()=>rA,collectExternalModuleInfo:()=>collectExternalModuleInfo,combine:()=>lC,combinePaths:()=>hr,commentPragmas:()=>zd,commonOptionsWithBuild:()=>commonOptionsWithBuild,commonPackageFolders:()=>V0,compact:()=>_C,compareBooleans:()=>HC,compareDataObjects:()=>CS,compareDiagnostics:()=>F2,compareDiagnosticsSkipRelatedInformation:()=>wd,compareEmitHelpers:()=>compareEmitHelpers,compareNumberOfDirectorySeparators:()=>NM,comparePaths:()=>NE,comparePathsCaseInsensitive:()=>IE,comparePathsCaseSensitive:()=>PE,comparePatternKeys:()=>comparePatternKeys,compareProperties:()=>VC,compareStringsCaseInsensitive:()=>Bd,compareStringsCaseInsensitiveEslintCompatible:()=>qC,compareStringsCaseSensitive:()=>Ci,compareStringsCaseSensitiveUI:()=>WC,compareTextSpans:()=>BC,compareValues:()=>kr,compileOnSaveCommandLineOption:()=>compileOnSaveCommandLineOption,compilerOptionsAffectDeclarationPath:()=>fM,compilerOptionsAffectEmit:()=>pM,compilerOptionsAffectSemanticDiagnostics:()=>uM,compilerOptionsDidYouMeanDiagnostics:()=>compilerOptionsDidYouMeanDiagnostics,compilerOptionsIndicateEsModules:()=>compilerOptionsIndicateEsModules,compose:()=>FC,computeCommonSourceDirectoryOfFilenames:()=>computeCommonSourceDirectoryOfFilenames,computeLineAndCharacterOfPosition:()=>Sg,computeLineOfPosition:()=>__,computeLineStarts:()=>Hd,computePositionOfLineAndCharacter:()=>Tg,computeSignature:()=>computeSignature,computeSignatureWithDiagnostics:()=>computeSignatureWithDiagnostics,computeSuggestionDiagnostics:()=>computeSuggestionDiagnostics,concatenate:()=>y_,concatenateDiagnosticMessageChains:()=>GO,consumesNodeCoreModules:()=>consumesNodeCoreModules,contains:()=>es,containsIgnoredPath:()=>rx,containsObjectRestOrSpread:()=>U6,containsParseError:()=>xl,containsPath:()=>Yv,convertCompilerOptionsForTelemetry:()=>convertCompilerOptionsForTelemetry,convertCompilerOptionsFromJson:()=>convertCompilerOptionsFromJson,convertJsonOption:()=>convertJsonOption,convertToBase64:()=>yS,convertToJson:()=>convertToJson,convertToObject:()=>convertToObject,convertToOptionsWithAbsolutePaths:()=>convertToOptionsWithAbsolutePaths,convertToRelativePath:()=>ME,convertToTSConfig:()=>convertToTSConfig,convertTypeAcquisitionFromJson:()=>convertTypeAcquisitionFromJson,copyComments:()=>copyComments,copyEntries:()=>Hk,copyLeadingComments:()=>copyLeadingComments,copyProperties:()=>DC,copyTrailingAsLeadingComments:()=>copyTrailingAsLeadingComments,copyTrailingComments:()=>copyTrailingComments,couldStartTrivia:()=>qE,countWhere:()=>F5,createAbstractBuilder:()=>createAbstractBuilder,createAccessorPropertyBackingField:()=>Sj,createAccessorPropertyGetRedirector:()=>xj,createAccessorPropertySetRedirector:()=>wj,createBaseNodeFactory:()=>Mx,createBinaryExpressionTrampoline:()=>mj,createBindingHelper:()=>createBindingHelper,createBuildInfo:()=>createBuildInfo,createBuilderProgram:()=>createBuilderProgram,createBuilderProgramUsingProgramBuildInfo:()=>createBuilderProgramUsingProgramBuildInfo,createBuilderStatusReporter:()=>createBuilderStatusReporter,createCacheWithRedirects:()=>createCacheWithRedirects,createCacheableExportInfoMap:()=>createCacheableExportInfoMap,createCachedDirectoryStructureHost:()=>createCachedDirectoryStructureHost,createClassNamedEvaluationHelperBlock:()=>createClassNamedEvaluationHelperBlock,createClassThisAssignmentBlock:()=>createClassThisAssignmentBlock,createClassifier:()=>createClassifier,createCommentDirectivesMap:()=>yD,createCompilerDiagnostic:()=>fl,createCompilerDiagnosticForInvalidCustomType:()=>createCompilerDiagnosticForInvalidCustomType,createCompilerDiagnosticFromMessageChain:()=>HO,createCompilerHost:()=>createCompilerHost,createCompilerHostFromProgramHost:()=>createCompilerHostFromProgramHost,createCompilerHostWorker:()=>createCompilerHostWorker,createDetachedDiagnostic:()=>Ao,createDiagnosticCollection:()=>nN,createDiagnosticForFileFromMessageChain:()=>$D,createDiagnosticForNode:()=>VD,createDiagnosticForNodeArray:()=>HD,createDiagnosticForNodeArrayFromMessageChain:()=>XD,createDiagnosticForNodeFromMessageChain:()=>GD,createDiagnosticForNodeInSourceFile:()=>z3,createDiagnosticForRange:()=>YD,createDiagnosticMessageChainFromDiagnostic:()=>QD,createDiagnosticReporter:()=>createDiagnosticReporter,createDocumentPositionMapper:()=>createDocumentPositionMapper,createDocumentRegistry:()=>createDocumentRegistry,createDocumentRegistryInternal:()=>createDocumentRegistryInternal,createEmitAndSemanticDiagnosticsBuilderProgram:()=>createEmitAndSemanticDiagnosticsBuilderProgram,createEmitHelperFactory:()=>createEmitHelperFactory,createEmptyExports:()=>hR,createExpressionForJsxElement:()=>gR,createExpressionForJsxFragment:()=>bR,createExpressionForObjectLiteralElementLike:()=>ER,createExpressionForPropertyName:()=>A8,createExpressionFromEntityName:()=>E8,createExternalHelpersImportDeclarationIfNeeded:()=>LR,createFileDiagnostic:()=>j2,createFileDiagnosticFromMessageChain:()=>Kg,createForOfBindingStatement:()=>vR,createGetCanonicalFileName:()=>Ud,createGetSourceFile:()=>createGetSourceFile,createGetSymbolAccessibilityDiagnosticForNode:()=>createGetSymbolAccessibilityDiagnosticForNode,createGetSymbolAccessibilityDiagnosticForNodeName:()=>createGetSymbolAccessibilityDiagnosticForNodeName,createGetSymbolWalker:()=>createGetSymbolWalker,createIncrementalCompilerHost:()=>createIncrementalCompilerHost,createIncrementalProgram:()=>createIncrementalProgram,createInputFiles:()=>ML,createInputFilesWithFilePaths:()=>Rx,createInputFilesWithFileTexts:()=>jx,createJsxFactoryExpression:()=>C8,createLanguageService:()=>ZF,createLanguageServiceSourceFile:()=>z6,createMemberAccessForPropertyName:()=>Jm,createModeAwareCache:()=>createModeAwareCache,createModeAwareCacheKey:()=>createModeAwareCacheKey,createModuleNotFoundChain:()=>eD,createModuleResolutionCache:()=>createModuleResolutionCache,createModuleResolutionLoader:()=>createModuleResolutionLoader,createModuleSpecifierResolutionHost:()=>createModuleSpecifierResolutionHost,createMultiMap:()=>Fd,createNodeConverters:()=>Lx,createNodeFactory:()=>kd,createOptionNameMap:()=>createOptionNameMap,createOverload:()=>createOverload,createPackageJsonImportFilter:()=>createPackageJsonImportFilter,createPackageJsonInfo:()=>createPackageJsonInfo,createParenthesizerRules:()=>createParenthesizerRules,createPatternMatcher:()=>createPatternMatcher,createPrependNodes:()=>createPrependNodes,createPrinter:()=>createPrinter,createPrinterWithDefaults:()=>createPrinterWithDefaults,createPrinterWithRemoveComments:()=>createPrinterWithRemoveComments,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>createPrinterWithRemoveCommentsNeverAsciiEscape,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>createPrinterWithRemoveCommentsOmitTrailingSemicolon,createProgram:()=>createProgram,createProgramHost:()=>createProgramHost,createPropertyNameNodeForIdentifierOrLiteral:()=>sL,createQueue:()=>NC,createRange:()=>Sm,createRedirectedBuilderProgram:()=>createRedirectedBuilderProgram,createResolutionCache:()=>createResolutionCache,createRuntimeTypeSerializer:()=>createRuntimeTypeSerializer,createScanner:()=>ns,createSemanticDiagnosticsBuilderProgram:()=>createSemanticDiagnosticsBuilderProgram,createSet:()=>OC,createSolutionBuilder:()=>createSolutionBuilder,createSolutionBuilderHost:()=>createSolutionBuilderHost,createSolutionBuilderWithWatch:()=>createSolutionBuilderWithWatch,createSolutionBuilderWithWatchHost:()=>createSolutionBuilderWithWatchHost,createSortedArray:()=>iC,createSourceFile:()=>V8,createSourceMapGenerator:()=>createSourceMapGenerator,createSourceMapSource:()=>LL,createSuperAccessVariableStatement:()=>createSuperAccessVariableStatement,createSymbolTable:()=>Fk,createSymlinkCache:()=>gM,createSystemWatchFunctions:()=>createSystemWatchFunctions,createTextChange:()=>createTextChange,createTextChangeFromStartLength:()=>createTextChangeFromStartLength,createTextChangeRange:()=>$d,createTextRangeFromNode:()=>createTextRangeFromNode,createTextRangeFromSpan:()=>createTextRangeFromSpan,createTextSpan:()=>w_,createTextSpanFromBounds:()=>Hi,createTextSpanFromNode:()=>createTextSpanFromNode,createTextSpanFromRange:()=>createTextSpanFromRange,createTextSpanFromStringLiteralLikeContent:()=>createTextSpanFromStringLiteralLikeContent,createTextWriter:()=>uN,createTokenRange:()=>nO,createTypeChecker:()=>createTypeChecker,createTypeReferenceDirectiveResolutionCache:()=>createTypeReferenceDirectiveResolutionCache,createTypeReferenceResolutionLoader:()=>createTypeReferenceResolutionLoader,createUnparsedSourceFile:()=>IL,createWatchCompilerHost:()=>createWatchCompilerHost2,createWatchCompilerHostOfConfigFile:()=>createWatchCompilerHostOfConfigFile,createWatchCompilerHostOfFilesAndCompilerOptions:()=>createWatchCompilerHostOfFilesAndCompilerOptions,createWatchFactory:()=>createWatchFactory,createWatchHost:()=>createWatchHost,createWatchProgram:()=>createWatchProgram,createWatchStatusReporter:()=>createWatchStatusReporter,createWriteFileMeasuringIO:()=>createWriteFileMeasuringIO,declarationNameToString:()=>q3,decodeMappings:()=>decodeMappings,decodedTextSpanIntersectsWith:()=>Eg,decorateHelper:()=>decorateHelper,deduplicate:()=>Sv,defaultIncludeSpec:()=>defaultIncludeSpec,defaultInitCompilerOptions:()=>defaultInitCompilerOptions,defaultMaximumTruncationLength:()=>px,detectSortCaseSensitivity:()=>oC,diagnosticCategoryName:()=>vE,diagnosticToString:()=>diagnosticToString,directoryProbablyExists:()=>bS,directorySeparator:()=>fn,displayPart:()=>displayPart,displayPartsToString:()=>KF,disposeEmitNodes:()=>disposeEmitNodes,disposeResourcesHelper:()=>disposeResourcesHelper,documentSpansEqual:()=>documentSpansEqual,dumpTracingLegend:()=>dumpTracingLegend,elementAt:()=>zv,elideNodes:()=>gj,emitComments:()=>rS,emitDetachedComments:()=>PN,emitFiles:()=>emitFiles,emitFilesAndReportErrors:()=>emitFilesAndReportErrors,emitFilesAndReportErrorsAndGetExitStatus:()=>emitFilesAndReportErrorsAndGetExitStatus,emitModuleKindIsNonNodeESM:()=>YO,emitNewLineBeforeLeadingCommentOfPosition:()=>DN,emitNewLineBeforeLeadingComments:()=>eS,emitNewLineBeforeLeadingCommentsOfPosition:()=>tS,emitSkippedWithNoDiagnostics:()=>emitSkippedWithNoDiagnostics,emitUsingBuildInfo:()=>emitUsingBuildInfo,emptyArray:()=>$e,emptyFileSystemEntries:()=>Ox,emptyMap:()=>pg,emptyOptions:()=>emptyOptions,emptySet:()=>qv,endsWith:()=>ts,ensurePathIsNonModuleName:()=>hg,ensureScriptKind:()=>zS,ensureTrailingDirectorySeparator:()=>zo,entityNameToString:()=>vi,enumerateInsertsAndDeletes:()=>aE,equalOwnProperties:()=>kv,equateStringsCaseInsensitive:()=>s_,equateStringsCaseSensitive:()=>Ll,equateValues:()=>_o,esDecorateHelper:()=>esDecorateHelper,escapeJsxAttributeString:()=>qT,escapeLeadingUnderscores:()=>Mn,escapeNonAsciiString:()=>Sd,escapeSnippetText:()=>oL,escapeString:()=>Td,every:()=>so,expandPreOrPostfixIncrementOrDecrementExpression:()=>AR,explainFiles:()=>explainFiles,explainIfFileIsRedirectAndImpliedFormat:()=>explainIfFileIsRedirectAndImpliedFormat,exportAssignmentIsAlias:()=>D0,exportStarHelper:()=>exportStarHelper,expressionResultIsUnused:()=>eL,extend:()=>kC,extendsHelper:()=>extendsHelper,extensionFromPath:()=>rl,extensionIsTS:()=>YS,extensionsNotSupportingExtensionlessResolution:()=>Cm,externalHelpersModuleNameText:()=>wm,factory:()=>Ln,fileExtensionIs:()=>La,fileExtensionIsOneOf:()=>ei,fileIncludeReasonToDiagnostics:()=>fileIncludeReasonToDiagnostics,fileShouldUseJavaScriptRequire:()=>fileShouldUseJavaScriptRequire,filter:()=>$r,filterMutate:()=>B5,filterSemanticDiagnostics:()=>filterSemanticDiagnostics,find:()=>Yr,findAncestor:()=>Kr,findBestPatternMatch:()=>jv,findChildOfKind:()=>findChildOfKind,findComputedPropertyNameCacheAssignment:()=>Cj,findConfigFile:()=>findConfigFile,findContainingList:()=>findContainingList,findDiagnosticForNode:()=>findDiagnosticForNode,findFirstNonJsxWhitespaceToken:()=>findFirstNonJsxWhitespaceToken,findIndex:()=>_l,findLast:()=>ig,findLastIndex:()=>R5,findListItemInfo:()=>findListItemInfo,findMap:()=>j5,findModifier:()=>findModifier,findNextToken:()=>findNextToken,findPackageJson:()=>findPackageJson,findPackageJsons:()=>findPackageJsons,findPrecedingMatchingToken:()=>findPrecedingMatchingToken,findPrecedingToken:()=>findPrecedingToken,findSuperStatementIndexPath:()=>findSuperStatementIndexPath,findTokenOnLeftOfPosition:()=>findTokenOnLeftOfPosition,findUseStrictPrologue:()=>D8,first:()=>og,firstDefined:()=>ng,firstDefinedIterator:()=>M5,firstIterator:()=>dC,firstOrOnly:()=>firstOrOnly,firstOrUndefined:()=>g_,firstOrUndefinedIterator:()=>fC,fixupCompilerOptions:()=>fixupCompilerOptions,flatMap:()=>Bo,flatMapIterator:()=>W5,flatMapToMutable:()=>vv,flatten:()=>o_,flattenCommaList:()=>Aj,flattenDestructuringAssignment:()=>flattenDestructuringAssignment,flattenDestructuringBinding:()=>flattenDestructuringBinding,flattenDiagnosticMessageText:()=>flattenDiagnosticMessageText,forEach:()=>yr,forEachAncestor:()=>zk,forEachAncestorDirectory:()=>Zv,forEachChild:()=>Bt,forEachChildRecursively:()=>eg,forEachEmittedFile:()=>forEachEmittedFile,forEachEnclosingBlockScopeContainer:()=>UD,forEachEntry:()=>Wk,forEachExternalModuleToImportFrom:()=>forEachExternalModuleToImportFrom,forEachImportClauseDeclaration:()=>dI,forEachKey:()=>Vk,forEachLeadingCommentRange:()=>zE,forEachNameInAccessChainWalkingLeft:()=>LO,forEachPropertyAssignment:()=>a2,forEachResolvedProjectReference:()=>forEachResolvedProjectReference,forEachReturnStatement:()=>lP,forEachRight:()=>O5,forEachTrailingCommentRange:()=>WE,forEachTsConfigPropArray:()=>Q3,forEachUnique:()=>forEachUnique,forEachYieldExpression:()=>uP,forSomeAncestorDirectory:()=>AO,formatColorAndReset:()=>formatColorAndReset,formatDiagnostic:()=>formatDiagnostic,formatDiagnostics:()=>formatDiagnostics,formatDiagnosticsWithColorAndContext:()=>formatDiagnosticsWithColorAndContext,formatGeneratedName:()=>Id,formatGeneratedNamePart:()=>Z0,formatLocation:()=>formatLocation,formatMessage:()=>VO,formatStringFromArgs:()=>I_,formatting:()=>ts_formatting_exports,fullTripleSlashAMDReferencePathRegEx:()=>K2,fullTripleSlashReferencePathRegEx:()=>Y2,generateDjb2Hash:()=>generateDjb2Hash,generateTSConfig:()=>generateTSConfig,generatorHelper:()=>generatorHelper,getAdjustedReferenceLocation:()=>getAdjustedReferenceLocation,getAdjustedRenameLocation:()=>getAdjustedRenameLocation,getAliasDeclarationFromName:()=>CT,getAllAccessorDeclarations:()=>P2,getAllDecoratorsOfClass:()=>getAllDecoratorsOfClass,getAllDecoratorsOfClassElement:()=>getAllDecoratorsOfClassElement,getAllJSDocTags:()=>$4,getAllJSDocTagsOfKind:()=>bA,getAllKeys:()=>bC,getAllProjectOutputs:()=>getAllProjectOutputs,getAllSuperTypeNodes:()=>PT,getAllUnscopedEmitHelpers:()=>getAllUnscopedEmitHelpers,getAllowJSCompilerOption:()=>FS,getAllowSyntheticDefaultImports:()=>nM,getAncestor:()=>JI,getAnyExtensionFromPath:()=>md,getAreDeclarationMapsEnabled:()=>rM,getAssignedExpandoInitializer:()=>rI,getAssignedName:()=>O4,getAssignedNameOfIdentifier:()=>getAssignedNameOfIdentifier,getAssignmentDeclarationKind:()=>Ja,getAssignmentDeclarationPropertyAccessKind:()=>lT,getAssignmentTargetKind:()=>vT,getAutomaticTypeDirectiveNames:()=>getAutomaticTypeDirectiveNames,getBaseFileName:()=>T_,getBinaryOperatorPrecedence:()=>pl,getBuildInfo:()=>getBuildInfo,getBuildInfoFileVersionMap:()=>getBuildInfoFileVersionMap,getBuildInfoText:()=>getBuildInfoText,getBuildOrderFromAnyBuildOrder:()=>getBuildOrderFromAnyBuildOrder,getBuilderCreationParameters:()=>getBuilderCreationParameters,getBuilderFileEmit:()=>getBuilderFileEmit,getCheckFlags:()=>wS,getClassExtendsHeritageElement:()=>kT,getClassLikeDeclarationOfSymbol:()=>AS,getCombinedLocalAndExportSymbolFlags:()=>vO,getCombinedModifierFlags:()=>Qd,getCombinedNodeFlags:()=>C_,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>iA,getCommentRange:()=>getCommentRange,getCommonSourceDirectory:()=>getCommonSourceDirectory,getCommonSourceDirectoryOfConfig:()=>getCommonSourceDirectoryOfConfig,getCompilerOptionValue:()=>j0,getCompilerOptionsDiffValue:()=>getCompilerOptionsDiffValue,getConditions:()=>getConditions,getConfigFileParsingDiagnostics:()=>getConfigFileParsingDiagnostics,getConstantValue:()=>getConstantValue,getContainerFlags:()=>getContainerFlags,getContainerNode:()=>getContainerNode,getContainingClass:()=>E0,getContainingClassExcludingClassDecorators:()=>DP,getContainingClassStaticBlock:()=>AP,getContainingFunction:()=>CP,getContainingFunctionDeclaration:()=>EP,getContainingFunctionOrClassStaticBlock:()=>kP,getContainingNodeArray:()=>tL,getContainingObjectLiteralElement:()=>u7,getContextualTypeFromParent:()=>getContextualTypeFromParent,getContextualTypeFromParentOrAncestorTypeNode:()=>getContextualTypeFromParentOrAncestorTypeNode,getCurrentTime:()=>getCurrentTime,getDeclarationDiagnostics:()=>getDeclarationDiagnostics,getDeclarationEmitExtensionForPath:()=>GT,getDeclarationEmitOutputFilePath:()=>mN,getDeclarationEmitOutputFilePathWorker:()=>HT,getDeclarationFromName:()=>NI,getDeclarationModifierFlagsFromSymbol:()=>gO,getDeclarationOfKind:()=>Rk,getDeclarationsOfKind:()=>jk,getDeclaredExpandoInitializer:()=>eI,getDecorators:()=>sA,getDefaultCompilerOptions:()=>s7,getDefaultExportInfoWorker:()=>getDefaultExportInfoWorker,getDefaultFormatCodeSettings:()=>getDefaultFormatCodeSettings,getDefaultLibFileName:()=>v4,getDefaultLibFilePath:()=>oB,getDefaultLikeExportInfo:()=>getDefaultLikeExportInfo,getDiagnosticText:()=>getDiagnosticText,getDiagnosticsWithinSpan:()=>getDiagnosticsWithinSpan,getDirectoryPath:()=>$i,getDirectoryToWatchFailedLookupLocation:()=>getDirectoryToWatchFailedLookupLocation,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>getDirectoryToWatchFailedLookupLocationFromTypeRoot,getDocumentPositionMapper:()=>getDocumentPositionMapper,getESModuleInterop:()=>U2,getEditsForFileRename:()=>getEditsForFileRename,getEffectiveBaseTypeNode:()=>AT,getEffectiveConstraintOfTypeParameter:()=>xA,getEffectiveContainerForJSDocTemplateTag:()=>TI,getEffectiveImplementsTypeNodes:()=>DT,getEffectiveInitializer:()=>oT,getEffectiveJSDocHost:()=>y2,getEffectiveModifierFlags:()=>vm,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>_S,getEffectiveModifierFlagsNoCache:()=>lS,getEffectiveReturnTypeNode:()=>EN,getEffectiveSetAccessorTypeAnnotationNode:()=>kN,getEffectiveTypeAnnotationNode:()=>I2,getEffectiveTypeParameterDeclarations:()=>SA,getEffectiveTypeRoots:()=>getEffectiveTypeRoots,getElementOrPropertyAccessArgumentExpressionOrName:()=>dm,getElementOrPropertyAccessName:()=>io,getElementsOfBindingOrAssignmentPattern:()=>R8,getEmitDeclarations:()=>z2,getEmitFlags:()=>ti,getEmitHelpers:()=>getEmitHelpers,getEmitModuleDetectionKind:()=>RS,getEmitModuleKind:()=>ni,getEmitModuleResolutionKind:()=>O_,getEmitScriptTarget:()=>Ql,getEmitStandardClassFields:()=>lM,getEnclosingBlockScopeContainer:()=>S0,getEnclosingContainer:()=>BD,getEncodedSemanticClassifications:()=>getEncodedSemanticClassifications,getEncodedSyntacticClassifications:()=>getEncodedSyntacticClassifications,getEndLinePosition:()=>D3,getEntityNameFromTypeNode:()=>FP,getEntrypointsFromPackageJsonInfo:()=>getEntrypointsFromPackageJsonInfo,getErrorCountForSummary:()=>getErrorCountForSummary,getErrorSpanForNode:()=>Zg,getErrorSummaryText:()=>getErrorSummaryText,getEscapedTextOfIdentifierOrLiteral:()=>LT,getEscapedTextOfJsxAttributeName:()=>hL,getEscapedTextOfJsxNamespacedName:()=>Yl,getExpandoInitializer:()=>A_,getExportAssignmentExpression:()=>ET,getExportInfoMap:()=>getExportInfoMap,getExportNeedsImportStarHelper:()=>getExportNeedsImportStarHelper,getExpressionAssociativity:()=>eN,getExpressionPrecedence:()=>tN,getExternalHelpersModuleName:()=>N8,getExternalModuleImportEqualsDeclarationExpression:()=>WP,getExternalModuleName:()=>d2,getExternalModuleNameFromDeclaration:()=>fN,getExternalModuleNameFromPath:()=>E2,getExternalModuleNameLiteral:()=>RR,getExternalModuleRequireArgument:()=>VP,getFallbackOptions:()=>getFallbackOptions,getFileEmitOutput:()=>getFileEmitOutput,getFileMatcherPatterns:()=>qS,getFileNamesFromConfigSpecs:()=>getFileNamesFromConfigSpecs,getFileWatcherEventKind:()=>getFileWatcherEventKind,getFilesInErrorForSummary:()=>getFilesInErrorForSummary,getFirstConstructorWithBody:()=>QT,getFirstIdentifier:()=>UN,getFirstNonSpaceCharacterPosition:()=>getFirstNonSpaceCharacterPosition,getFirstProjectOutput:()=>getFirstProjectOutput,getFixableErrorSpanExpression:()=>getFixableErrorSpanExpression,getFormatCodeSettingsForWriting:()=>getFormatCodeSettingsForWriting,getFullWidth:()=>sm,getFunctionFlags:()=>qI,getHeritageClause:()=>hm,getHostSignatureFromJSDoc:()=>h2,getIdentifierAutoGenerate:()=>getIdentifierAutoGenerate,getIdentifierGeneratedImportReference:()=>getIdentifierGeneratedImportReference,getIdentifierTypeArguments:()=>getIdentifierTypeArguments,getImmediatelyInvokedFunctionExpression:()=>MP,getImpliedNodeFormatForFile:()=>getImpliedNodeFormatForFile,getImpliedNodeFormatForFileWorker:()=>getImpliedNodeFormatForFileWorker,getImportNeedsImportDefaultHelper:()=>getImportNeedsImportDefaultHelper,getImportNeedsImportStarHelper:()=>getImportNeedsImportStarHelper,getIndentSize:()=>Jo,getIndentString:()=>w2,getInferredLibraryNameResolveFrom:()=>getInferredLibraryNameResolveFrom,getInitializedVariables:()=>mO,getInitializerOfBinaryExpression:()=>uT,getInitializerOfBindingOrAssignmentElement:()=>L8,getInterfaceBaseTypeNodes:()=>IT,getInternalEmitFlags:()=>SD,getInvokedExpression:()=>BP,getIsolatedModules:()=>B2,getJSDocAugmentsTag:()=>F4,getJSDocClassTag:()=>cA,getJSDocCommentRanges:()=>H3,getJSDocCommentsAndTags:()=>yT,getJSDocDeprecatedTag:()=>dA,getJSDocDeprecatedTagNoCache:()=>H4,getJSDocEnumTag:()=>mA,getJSDocHost:()=>bT,getJSDocImplementsTags:()=>B4,getJSDocOverrideTagNoCache:()=>V4,getJSDocParameterTags:()=>Zd,getJSDocParameterTagsNoCache:()=>L4,getJSDocPrivateTag:()=>uA,getJSDocPrivateTagNoCache:()=>q4,getJSDocProtectedTag:()=>pA,getJSDocProtectedTagNoCache:()=>z4,getJSDocPublicTag:()=>lA,getJSDocPublicTagNoCache:()=>U4,getJSDocReadonlyTag:()=>fA,getJSDocReadonlyTagNoCache:()=>W4,getJSDocReturnTag:()=>G4,getJSDocReturnType:()=>X4,getJSDocRoot:()=>g2,getJSDocSatisfiesExpressionType:()=>mL,getJSDocSatisfiesTag:()=>kg,getJSDocTags:()=>Ul,getJSDocTagsNoCache:()=>gA,getJSDocTemplateTag:()=>yA,getJSDocThisTag:()=>hA,getJSDocType:()=>tm,getJSDocTypeAliasName:()=>K0,getJSDocTypeAssertionType:()=>IR,getJSDocTypeParameterDeclarations:()=>ZT,getJSDocTypeParameterTags:()=>R4,getJSDocTypeParameterTagsNoCache:()=>j4,getJSDocTypeTag:()=>em,getJSXImplicitImportBase:()=>mM,getJSXRuntimeImport:()=>hM,getJSXTransformEnabled:()=>dM,getKeyForCompilerOptions:()=>getKeyForCompilerOptions,getLanguageVariant:()=>R0,getLastChild:()=>kS,getLeadingCommentRanges:()=>Wo,getLeadingCommentRangesOfNode:()=>_P,getLeftmostAccessExpression:()=>R2,getLeftmostExpression:()=>JO,getLineAndCharacterOfPosition:()=>to,getLineInfo:()=>getLineInfo,getLineOfLocalPosition:()=>TN,getLineOfLocalPositionFromLineMap:()=>Ca,getLineStartPositionForPosition:()=>getLineStartPositionForPosition,getLineStarts:()=>Ia,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>pO,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>uO,getLinesBetweenPositions:()=>x_,getLinesBetweenRangeEndAndRangeStart:()=>_O,getLinesBetweenRangeEndPositions:()=>cO,getLiteralText:()=>xD,getLocalNameForExternalImport:()=>JR,getLocalSymbolForExportDefault:()=>HN,getLocaleSpecificMessage:()=>N_,getLocaleTimeString:()=>getLocaleTimeString,getMappedContextSpan:()=>getMappedContextSpan,getMappedDocumentSpan:()=>getMappedDocumentSpan,getMappedLocation:()=>getMappedLocation,getMatchedFileSpec:()=>getMatchedFileSpec,getMatchedIncludeSpec:()=>getMatchedIncludeSpec,getMeaningFromDeclaration:()=>getMeaningFromDeclaration,getMeaningFromLocation:()=>getMeaningFromLocation,getMembersOfDeclaration:()=>fP,getModeForFileReference:()=>getModeForFileReference,getModeForResolutionAtIndex:()=>getModeForResolutionAtIndex,getModeForUsageLocation:()=>getModeForUsageLocation,getModifiedTime:()=>getModifiedTime,getModifiers:()=>yd,getModuleInstanceState:()=>getModuleInstanceState,getModuleNameStringLiteralAt:()=>getModuleNameStringLiteralAt,getModuleSpecifierEndingPreference:()=>DM,getModuleSpecifierResolverHost:()=>getModuleSpecifierResolverHost,getNameForExportedSymbol:()=>getNameForExportedSymbol,getNameFromIndexInfo:()=>qD,getNameFromPropertyName:()=>getNameFromPropertyName,getNameOfAccessExpression:()=>NO,getNameOfCompilerOptionValue:()=>getNameOfCompilerOptionValue,getNameOfDeclaration:()=>Bl,getNameOfExpando:()=>aI,getNameOfJSDocTypedef:()=>N4,getNameOrArgument:()=>cT,getNameTable:()=>eB,getNamesForExportedSymbol:()=>getNamesForExportedSymbol,getNamespaceDeclarationNode:()=>fT,getNewLineCharacter:()=>vS,getNewLineKind:()=>getNewLineKind,getNewLineOrDefaultFromHost:()=>getNewLineOrDefaultFromHost,getNewTargetContainer:()=>NP,getNextJSDocCommentLocation:()=>gT,getNodeForGeneratedName:()=>bj,getNodeId:()=>getNodeId,getNodeKind:()=>getNodeKind,getNodeModifiers:()=>getNodeModifiers,getNodeModulePathParts:()=>_L,getNonAssignedNameOfDeclaration:()=>Kd,getNonAssignmentOperatorForCompoundAssignment:()=>getNonAssignmentOperatorForCompoundAssignment,getNonAugmentationDeclaration:()=>F3,getNonDecoratorTokenPosOfNode:()=>gD,getNormalizedAbsolutePath:()=>Pa,getNormalizedAbsolutePathWithoutRoot:()=>DE,getNormalizedPathComponents:()=>Vd,getObjectFlags:()=>jf,getOperator:()=>x2,getOperatorAssociativity:()=>jT,getOperatorPrecedence:()=>FT,getOptionFromName:()=>getOptionFromName,getOptionsForLibraryResolution:()=>getOptionsForLibraryResolution,getOptionsNameMap:()=>getOptionsNameMap,getOrCreateEmitNode:()=>getOrCreateEmitNode,getOrCreateExternalHelpersModuleNameIfNeeded:()=>O8,getOrUpdate:()=>X5,getOriginalNode:()=>jl,getOriginalNodeId:()=>getOriginalNodeId,getOriginalSourceFile:()=>ZI,getOutputDeclarationFileName:()=>getOutputDeclarationFileName,getOutputExtension:()=>getOutputExtension,getOutputFileNames:()=>getOutputFileNames,getOutputPathsFor:()=>getOutputPathsFor,getOutputPathsForBundle:()=>getOutputPathsForBundle,getOwnEmitOutputFilePath:()=>dN,getOwnKeys:()=>sg,getOwnValues:()=>vC,getPackageJsonInfo:()=>getPackageJsonInfo,getPackageJsonTypesVersionsPaths:()=>getPackageJsonTypesVersionsPaths,getPackageJsonsVisibleToFile:()=>getPackageJsonsVisibleToFile,getPackageNameFromTypesPackageName:()=>getPackageNameFromTypesPackageName,getPackageScopeForPath:()=>getPackageScopeForPath,getParameterSymbolFromJSDoc:()=>vI,getParameterTypeNode:()=>cL,getParentNodeInSpan:()=>getParentNodeInSpan,getParseTreeNode:()=>Fl,getParsedCommandLineOfConfigFile:()=>getParsedCommandLineOfConfigFile,getPathComponents:()=>Ai,getPathComponentsRelativeTo:()=>gg,getPathFromPathComponents:()=>Uo,getPathUpdater:()=>getPathUpdater,getPathsBasePath:()=>yN,getPatternFromSpec:()=>wM,getPendingEmitKind:()=>getPendingEmitKind,getPositionOfLineAndCharacter:()=>BE,getPossibleGenericSignatures:()=>getPossibleGenericSignatures,getPossibleOriginalInputExtensionForExtension:()=>hN,getPossibleTypeArgumentsInfo:()=>getPossibleTypeArgumentsInfo,getPreEmitDiagnostics:()=>getPreEmitDiagnostics,getPrecedingNonSpaceCharacterPosition:()=>getPrecedingNonSpaceCharacterPosition,getPrivateIdentifier:()=>getPrivateIdentifier,getProperties:()=>getProperties,getProperty:()=>gC,getPropertyArrayElementValue:()=>xP,getPropertyAssignmentAliasLikeExpression:()=>LI,getPropertyNameForPropertyNameNode:()=>bd,getPropertyNameForUniqueESSymbol:()=>WI,getPropertyNameFromType:()=>TL,getPropertyNameOfBindingOrAssignmentElement:()=>UR,getPropertySymbolFromBindingElement:()=>getPropertySymbolFromBindingElement,getPropertySymbolsFromContextualType:()=>p7,getQuoteFromPreference:()=>getQuoteFromPreference,getQuotePreference:()=>getQuotePreference,getRangesWhere:()=>Z5,getRefactorContextSpan:()=>getRefactorContextSpan,getReferencedFileLocation:()=>getReferencedFileLocation,getRegexFromPattern:()=>Bf,getRegularExpressionForWildcard:()=>Ff,getRegularExpressionsForWildcards:()=>V2,getRelativePathFromDirectory:()=>Kv,getRelativePathFromFile:()=>LE,getRelativePathToDirectoryOrUrl:()=>bg,getRenameLocation:()=>getRenameLocation,getReplacementSpanForContextToken:()=>getReplacementSpanForContextToken,getResolutionDiagnostic:()=>getResolutionDiagnostic,getResolutionModeOverrideForClause:()=>getResolutionModeOverrideForClause,getResolveJsonModule:()=>jS,getResolvePackageJsonExports:()=>aM,getResolvePackageJsonImports:()=>oM,getResolvedExternalModuleName:()=>VT,getResolvedModule:()=>Xk,getResolvedTypeReferenceDirective:()=>Yk,getRestIndicatorOfBindingOrAssignmentElement:()=>BR,getRestParameterElementType:()=>pP,getRightMostAssignedExpression:()=>l2,getRootDeclaration:()=>ym,getRootDirectoryOfResolutionCache:()=>getRootDirectoryOfResolutionCache,getRootLength:()=>Ei,getRootPathSplitLength:()=>getRootPathSplitLength,getScriptKind:()=>getScriptKind,getScriptKindFromFileName:()=>WS,getScriptTargetFeatures:()=>getScriptTargetFeatures,getSelectedEffectiveModifierFlags:()=>oS,getSelectedSyntacticModifierFlags:()=>sS,getSemanticClassifications:()=>getSemanticClassifications,getSemanticJsxChildren:()=>rN,getSetAccessorTypeAnnotationNode:()=>SN,getSetAccessorValueParameter:()=>D2,getSetExternalModuleIndicator:()=>JS,getShebang:()=>_4,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>m2,getSingleVariableOfVariableStatement:()=>Cl,getSnapshotText:()=>getSnapshotText,getSnippetElement:()=>getSnippetElement,getSourceFileOfModule:()=>oD,getSourceFileOfNode:()=>ri,getSourceFilePathInNewDir:()=>XT,getSourceFilePathInNewDirWorker:()=>k2,getSourceFileVersionAsHashFromText:()=>getSourceFileVersionAsHashFromText,getSourceFilesToEmit:()=>gN,getSourceMapRange:()=>getSourceMapRange,getSourceMapper:()=>getSourceMapper,getSourceTextOfNodeFromSourceFile:()=>Xo,getSpanOfTokenAtPosition:()=>Ys,getSpellingSuggestion:()=>Lv,getStartPositionOfLine:()=>cD,getStartPositionOfRange:()=>f_,getStartsOnNewLine:()=>getStartsOnNewLine,getStaticPropertiesAndClassStaticBlock:()=>getStaticPropertiesAndClassStaticBlock,getStrictOptionValue:()=>W2,getStringComparer:()=>_g,getSuperCallFromStatement:()=>getSuperCallFromStatement,getSuperContainer:()=>OP,getSupportedCodeFixes:()=>_7,getSupportedExtensions:()=>VS,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>HS,getSwitchedType:()=>getSwitchedType,getSymbolId:()=>getSymbolId,getSymbolNameForPrivateIdentifier:()=>VI,getSymbolTarget:()=>getSymbolTarget,getSyntacticClassifications:()=>getSyntacticClassifications,getSyntacticModifierFlags:()=>M2,getSyntacticModifierFlagsNoCache:()=>L2,getSynthesizedDeepClone:()=>getSynthesizedDeepClone,getSynthesizedDeepCloneWithReplacements:()=>getSynthesizedDeepCloneWithReplacements,getSynthesizedDeepClones:()=>getSynthesizedDeepClones,getSynthesizedDeepClonesWithReplacements:()=>getSynthesizedDeepClonesWithReplacements,getSyntheticLeadingComments:()=>getSyntheticLeadingComments,getSyntheticTrailingComments:()=>getSyntheticTrailingComments,getTargetLabel:()=>getTargetLabel,getTargetOfBindingOrAssignmentElement:()=>Mo,getTemporaryModuleResolutionState:()=>getTemporaryModuleResolutionState,getTextOfConstantValue:()=>CD,getTextOfIdentifierOrLiteral:()=>vd,getTextOfJSDocComment:()=>vA,getTextOfJsxAttributeName:()=>yL,getTextOfJsxNamespacedName:()=>Kl,getTextOfNode:()=>_m,getTextOfNodeFromSourceText:()=>t_,getTextOfPropertyName:()=>WD,getThisContainer:()=>o2,getThisParameter:()=>YT,getTokenAtPosition:()=>getTokenAtPosition,getTokenPosOfNode:()=>Go,getTokenSourceMapRange:()=>getTokenSourceMapRange,getTouchingPropertyName:()=>getTouchingPropertyName,getTouchingToken:()=>getTouchingToken,getTrailingCommentRanges:()=>s4,getTrailingSemicolonDeferringWriter:()=>pN,getTransformFlagsSubtreeExclusions:()=>Jx,getTransformers:()=>getTransformers,getTsBuildInfoEmitOutputFilePath:()=>getTsBuildInfoEmitOutputFilePath,getTsConfigObjectLiteralExpression:()=>$3,getTsConfigPropArrayElementValue:()=>wP,getTypeAnnotationNode:()=>CN,getTypeArgumentOrTypeParameterList:()=>getTypeArgumentOrTypeParameterList,getTypeKeywordOfTypeOnlyImport:()=>getTypeKeywordOfTypeOnlyImport,getTypeNode:()=>getTypeNode,getTypeNodeIfAccessible:()=>getTypeNodeIfAccessible,getTypeParameterFromJsDoc:()=>SI,getTypeParameterOwner:()=>nA,getTypesPackageName:()=>getTypesPackageName,getUILocale:()=>zC,getUniqueName:()=>getUniqueName,getUniqueSymbolId:()=>getUniqueSymbolId,getUseDefineForClassFields:()=>cM,getWatchErrorSummaryDiagnosticMessage:()=>getWatchErrorSummaryDiagnosticMessage,getWatchFactory:()=>getWatchFactory,group:()=>CC,groupBy:()=>EC,guessIndentation:()=>Mk,handleNoEmitOptions:()=>handleNoEmitOptions,hasAbstractModifier:()=>nS,hasAccessorModifier:()=>aS,hasAmbientModifier:()=>iS,hasChangesInResolutions:()=>iD,hasChildOfKind:()=>hasChildOfKind,hasContextSensitiveParameters:()=>rL,hasDecorators:()=>El,hasDocComment:()=>hasDocComment,hasDynamicName:()=>MT,hasEffectiveModifier:()=>N2,hasEffectiveModifiers:()=>ON,hasEffectiveReadonlyModifier:()=>O0,hasExtension:()=>$v,hasIndexSignature:()=>hasIndexSignature,hasInitializer:()=>C3,hasInvalidEscape:()=>BT,hasJSDocNodes:()=>Wi,hasJSDocParameterTags:()=>_A,hasJSFileExtension:()=>H2,hasJsonModuleEmitEnabled:()=>KO,hasOnlyExpressionInitializer:()=>Nk,hasOverrideModifier:()=>LN,hasPossibleExternalModuleReference:()=>FD,hasProperty:()=>Qr,hasPropertyAccessExpressionWithName:()=>hasPropertyAccessExpressionWithName,hasQuestionToken:()=>mI,hasRecordedExternalHelpers:()=>MR,hasRestParameter:()=>Lk,hasScopeMarker:()=>_k,hasStaticModifier:()=>bm,hasSyntacticModifier:()=>gr,hasSyntacticModifiers:()=>MN,hasTSFileExtension:()=>G2,hasTabstop:()=>_x,hasTrailingDirectorySeparator:()=>Wd,hasType:()=>Ik,hasTypeArguments:()=>xI,hasZeroOrOneAsteriskCharacter:()=>yM,helperString:()=>helperString,hostGetCanonicalFileName:()=>WT,hostUsesCaseSensitiveFileNames:()=>C2,idText:()=>Ot,identifierIsThisKeyword:()=>KT,identifierToKeywordKind:()=>D4,identity:()=>bt,identitySourceMapConsumer:()=>identitySourceMapConsumer,ignoreSourceNewlines:()=>ignoreSourceNewlines,ignoredPaths:()=>ignoredPaths,importDefaultHelper:()=>importDefaultHelper,importFromModuleSpecifier:()=>fI,importNameElisionDisabled:()=>ZO,importStarHelper:()=>importStarHelper,indexOfAnyCharCode:()=>bv,indexOfNode:()=>TD,indicesOf:()=>ag,inferredTypesContainingFile:()=>inferredTypesContainingFile,injectClassNamedEvaluationHelperBlockIfMissing:()=>injectClassNamedEvaluationHelperBlockIfMissing,injectClassThisAssignmentIfMissing:()=>injectClassThisAssignmentIfMissing,insertImports:()=>insertImports,insertLeadingStatement:()=>TR,insertSorted:()=>yl,insertStatementAfterCustomPrologue:()=>mD,insertStatementAfterStandardPrologue:()=>dD,insertStatementsAfterCustomPrologue:()=>fD,insertStatementsAfterStandardPrologue:()=>pD,intersperse:()=>J5,intrinsicTagNameToString:()=>bL,introducesArgumentsExoticObject:()=>yP,inverseJsxOptionMap:()=>inverseJsxOptionMap,isAbstractConstructorSymbol:()=>EO,isAbstractModifier:()=>eJ,isAccessExpression:()=>$o,isAccessibilityModifier:()=>isAccessibilityModifier,isAccessor:()=>im,isAccessorModifier:()=>rJ,isAliasSymbolDeclaration:()=>MI,isAliasableExpression:()=>b2,isAmbientModule:()=>cm,isAmbientPropertyDeclaration:()=>LD,isAnonymousFunctionDefinition:()=>Ks,isAnyDirectorySeparator:()=>dg,isAnyImportOrBareOrAccessedRequire:()=>RD,isAnyImportOrReExport:()=>um,isAnyImportSyntax:()=>$g,isAnySupportedFileExtension:()=>JM,isApplicableVersionedTypesKey:()=>isApplicableVersionedTypesKey,isArgumentExpressionOfElementAccess:()=>isArgumentExpressionOfElementAccess,isArray:()=>zt,isArrayBindingElement:()=>$A,isArrayBindingOrAssignmentElement:()=>d3,isArrayBindingOrAssignmentPattern:()=>f3,isArrayBindingPattern:()=>sJ,isArrayLiteralExpression:()=>iu,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>isArrayLiteralOrObjectLiteralDestructuringPattern,isArrayTypeNode:()=>Xx,isArrowFunction:()=>Dm,isAsExpression:()=>mJ,isAssertClause:()=>RJ,isAssertEntry:()=>jJ,isAssertionExpression:()=>ok,isAssertionKey:()=>jA,isAssertsKeyword:()=>YL,isAssignmentDeclaration:()=>k0,isAssignmentExpression:()=>Na,isAssignmentOperator:()=>D_,isAssignmentPattern:()=>l3,isAssignmentTarget:()=>wI,isAsteriskToken:()=>HL,isAsyncFunction:()=>zI,isAsyncModifier:()=>al,isAutoAccessorPropertyDeclaration:()=>c3,isAwaitExpression:()=>uJ,isAwaitKeyword:()=>KL,isBigIntLiteral:()=>o6,isBinaryExpression:()=>Ct,isBinaryOperatorToken:()=>dj,isBindableObjectDefinePropertyCall:()=>p2,isBindableStaticAccessExpression:()=>k_,isBindableStaticElementAccessExpression:()=>f2,isBindableStaticNameExpression:()=>p_,isBindingElement:()=>nu,isBindingElementOfBareOrAccessedRequire:()=>YP,isBindingName:()=>zA,isBindingOrAssignmentElement:()=>QA,isBindingOrAssignmentPattern:()=>YA,isBindingPattern:()=>am,isBlock:()=>au,isBlockOrCatchScoped:()=>AD,isBlockScope:()=>B3,isBlockScopedContainerTopLevel:()=>ND,isBooleanLiteral:()=>WA,isBreakOrContinueStatement:()=>kA,isBreakStatement:()=>AJ,isBuildInfoFile:()=>isBuildInfoFile,isBuilderProgram:()=>isBuilderProgram2,isBundle:()=>QJ,isBundleFileTextLike:()=>OO,isCallChain:()=>y0,isCallExpression:()=>j_,isCallExpressionTarget:()=>isCallExpressionTarget,isCallLikeExpression:()=>ek,isCallOrNewExpression:()=>tk,isCallOrNewExpressionTarget:()=>isCallOrNewExpressionTarget,isCallSignatureDeclaration:()=>c6,isCallToHelper:()=>isCallToHelper,isCaseBlock:()=>MJ,isCaseClause:()=>GJ,isCaseKeyword:()=>nJ,isCaseOrDefaultClause:()=>Pk,isCatchClause:()=>XJ,isCatchClauseVariableDeclaration:()=>nx,isCatchClauseVariableDeclarationOrBindingElement:()=>J3,isCheckJsEnabledForFile:()=>RM,isChildOfNodeWithKind:()=>cP,isCircularBuildOrder:()=>isCircularBuildOrder,isClassDeclaration:()=>Yo,isClassElement:()=>no,isClassExpression:()=>Il,isClassLike:()=>dn,isClassMemberModifier:()=>o3,isClassNamedEvaluationHelperBlock:()=>isClassNamedEvaluationHelperBlock,isClassOrTypeElement:()=>GA,isClassStaticBlockDeclaration:()=>eu,isClassThisAssignmentBlock:()=>isClassThisAssignmentBlock,isCollapsedRange:()=>rO,isColonToken:()=>GL,isCommaExpression:()=>Rm,isCommaListExpression:()=>F_,isCommaSequence:()=>PR,isCommaToken:()=>Bx,isComment:()=>isComment,isCommonJsExportPropertyAssignment:()=>i2,isCommonJsExportedExpression:()=>mP,isCompoundAssignment:()=>isCompoundAssignment,isComputedNonLiteralName:()=>zD,isComputedPropertyName:()=>ao,isConciseBody:()=>pk,isConditionalExpression:()=>pJ,isConditionalTypeNode:()=>e8,isConstTypeReference:()=>K4,isConstructSignatureDeclaration:()=>Vx,isConstructorDeclaration:()=>J_,isConstructorTypeNode:()=>u6,isContextualKeyword:()=>v2,isContinueStatement:()=>EJ,isCustomPrologue:()=>pm,isDebuggerStatement:()=>OJ,isDeclaration:()=>Ho,isDeclarationBindingElement:()=>Bg,isDeclarationFileName:()=>H8,isDeclarationName:()=>xT,isDeclarationNameOfEnumOrNamespace:()=>dO,isDeclarationReadonly:()=>rP,isDeclarationStatement:()=>xk,isDeclarationWithTypeParameterChildren:()=>U3,isDeclarationWithTypeParameters:()=>JD,isDecorator:()=>L_,isDecoratorTarget:()=>isDecoratorTarget,isDefaultClause:()=>m8,isDefaultImport:()=>dT,isDefaultModifier:()=>QL,isDefaultedExpandoInitializer:()=>iI,isDeleteExpression:()=>cJ,isDeleteTarget:()=>PI,isDeprecatedDeclaration:()=>isDeprecatedDeclaration,isDestructuringAssignment:()=>BN,isDiagnosticWithLocation:()=>isDiagnosticWithLocation,isDiskPathRoot:()=>xE,isDoStatement:()=>SJ,isDocumentRegistryEntry:()=>isDocumentRegistryEntry,isDotDotDotToken:()=>VL,isDottedName:()=>L0,isDynamicName:()=>S2,isESSymbolIdentifier:()=>XI,isEffectiveExternalModule:()=>Xg,isEffectiveModuleDeclaration:()=>R3,isEffectiveStrictModeSourceFile:()=>MD,isElementAccessChain:()=>Y4,isElementAccessExpression:()=>Ra,isEmittedFileOfProgram:()=>isEmittedFileOfProgram,isEmptyArrayLiteral:()=>VN,isEmptyBindingElement:()=>A4,isEmptyBindingPattern:()=>E4,isEmptyObjectLiteral:()=>WN,isEmptyStatement:()=>vJ,isEmptyStringLiteral:()=>K3,isEntityName:()=>qA,isEntityNameExpression:()=>co,isEnumConst:()=>tP,isEnumDeclaration:()=>S6,isEnumMember:()=>y8,isEqualityOperatorKind:()=>isEqualityOperatorKind,isEqualsGreaterThanToken:()=>$L,isExclamationToken:()=>Pd,isExcludedFile:()=>isExcludedFile,isExclusivelyTypeOnlyImportOrExport:()=>isExclusivelyTypeOnlyImportOrExport,isExportAssignment:()=>ss,isExportDeclaration:()=>B_,isExportModifier:()=>Ux,isExportName:()=>DR,isExportNamespaceAsDefaultDeclaration:()=>L3,isExportOrDefaultModifier:()=>hj,isExportSpecifier:()=>d8,isExportsIdentifier:()=>sT,isExportsOrModuleExportsOrAlias:()=>isExportsOrModuleExportsOrAlias,isExpression:()=>om,isExpressionNode:()=>_2,isExpressionOfExternalModuleImportEqualsDeclaration:()=>isExpressionOfExternalModuleImportEqualsDeclaration,isExpressionOfOptionalChainRoot:()=>CA,isExpressionStatement:()=>ou,isExpressionWithTypeArguments:()=>g6,isExpressionWithTypeArgumentsInClassExtendsClause:()=>M0,isExternalModule:()=>Zo,isExternalModuleAugmentation:()=>Gg,isExternalModuleImportEqualsDeclaration:()=>tT,isExternalModuleIndicator:()=>lk,isExternalModuleNameRelative:()=>GE,isExternalModuleReference:()=>Om,isExternalModuleSymbol:()=>isExternalModuleSymbol,isExternalOrCommonJsModule:()=>eP,isFileLevelReservedGeneratedIdentifier:()=>BA,isFileLevelUniqueName:()=>P3,isFileProbablyExternalModule:()=>ml,isFirstDeclarationOfSymbolParameter:()=>isFirstDeclarationOfSymbolParameter,isFixablePromiseHandler:()=>isFixablePromiseHandler,isForInOrOfStatement:()=>uk,isForInStatement:()=>wJ,isForInitializer:()=>dk,isForOfStatement:()=>CJ,isForStatement:()=>c8,isFunctionBlock:()=>X3,isFunctionBody:()=>fk,isFunctionDeclaration:()=>os,isFunctionExpression:()=>km,isFunctionExpressionOrArrowFunction:()=>aL,isFunctionLike:()=>Gi,isFunctionLikeDeclaration:()=>s3,isFunctionLikeKind:()=>Jg,isFunctionLikeOrClassStaticBlockDeclaration:()=>nm,isFunctionOrConstructorTypeNode:()=>XA,isFunctionOrModuleBlock:()=>VA,isFunctionSymbol:()=>uI,isFunctionTypeNode:()=>tu,isFutureReservedKeyword:()=>RI,isGeneratedIdentifier:()=>wa,isGeneratedPrivateIdentifier:()=>Mg,isGetAccessor:()=>el,isGetAccessorDeclaration:()=>m_,isGetOrSetAccessorDeclaration:()=>wA,isGlobalDeclaration:()=>isGlobalDeclaration,isGlobalScopeAugmentation:()=>lm,isGrammarError:()=>uD,isHeritageClause:()=>Nl,isHoistedFunction:()=>w0,isHoistedVariableStatement:()=>C0,isIdentifier:()=>Ee,isIdentifierANonContextualKeyword:()=>BI,isIdentifierName:()=>OI,isIdentifierOrThisTypeNode:()=>HR,isIdentifierPart:()=>Qa,isIdentifierStart:()=>un,isIdentifierText:()=>Cg,isIdentifierTypePredicate:()=>TP,isIdentifierTypeReference:()=>$M,isIfStatement:()=>TJ,isIgnoredFileFromWildCardWatching:()=>isIgnoredFileFromWildCardWatching,isImplicitGlob:()=>BS,isImportCall:()=>t2,isImportClause:()=>LJ,isImportDeclaration:()=>C6,isImportEqualsDeclaration:()=>w6,isImportKeyword:()=>zx,isImportMeta:()=>x0,isImportOrExportSpecifier:()=>JA,isImportOrExportSpecifierName:()=>isImportOrExportSpecifierName,isImportSpecifier:()=>p8,isImportTypeAssertionContainer:()=>JJ,isImportTypeNode:()=>ru,isImportableFile:()=>isImportableFile,isInComment:()=>isInComment,isInExpressionContext:()=>Z3,isInJSDoc:()=>rT,isInJSFile:()=>Wt,isInJSXText:()=>isInJSXText,isInJsonFile:()=>XP,isInNonReferenceComment:()=>isInNonReferenceComment,isInReferenceComment:()=>isInReferenceComment,isInRightSideOfInternalImportEqualsDeclaration:()=>isInRightSideOfInternalImportEqualsDeclaration,isInString:()=>isInString,isInTemplateString:()=>isInTemplateString,isInTopLevelContext:()=>IP,isInTypeQuery:()=>xN,isIncrementalCompilation:()=>_M,isIndexSignatureDeclaration:()=>l6,isIndexedAccessTypeNode:()=>n8,isInferTypeNode:()=>t8,isInfinityOrNaNString:()=>nL,isInitializedProperty:()=>isInitializedProperty,isInitializedVariable:()=>xS,isInsideJsxElement:()=>isInsideJsxElement,isInsideJsxElementOrAttribute:()=>isInsideJsxElementOrAttribute,isInsideNodeModules:()=>isInsideNodeModules,isInsideTemplateLiteral:()=>isInsideTemplateLiteral,isInstantiatedModule:()=>isInstantiatedModule,isInterfaceDeclaration:()=>su,isInternalDeclaration:()=>isInternalDeclaration,isInternalModuleImportEqualsDeclaration:()=>HP,isInternalName:()=>kR,isIntersectionTypeNode:()=>Zx,isIntrinsicJsxName:()=>zT,isIterationStatement:()=>g3,isJSDoc:()=>cs,isJSDocAllType:()=>tR,isJSDocAugmentsTag:()=>Lm,isJSDocAuthorTag:()=>sR,isJSDocCallbackTag:()=>_R,isJSDocClassTag:()=>v8,isJSDocCommentContainingNode:()=>w3,isJSDocConstructSignature:()=>hI,isJSDocDeprecatedTag:()=>J6,isJSDocEnumTag:()=>S8,isJSDocFunctionType:()=>Mm,isJSDocImplementsTag:()=>w8,isJSDocIndexSignature:()=>QP,isJSDocLikeText:()=>q8,isJSDocLink:()=>KJ,isJSDocLinkCode:()=>ZJ,isJSDocLinkLike:()=>ul,isJSDocLinkPlain:()=>eR,isJSDocMemberName:()=>r_,isJSDocNameReference:()=>Wf,isJSDocNamepathType:()=>oR,isJSDocNamespaceBody:()=>yk,isJSDocNode:()=>zg,isJSDocNonNullableType:()=>nR,isJSDocNullableType:()=>b8,isJSDocOptionalParameter:()=>cx,isJSDocOptionalType:()=>iR,isJSDocOverloadTag:()=>L6,isJSDocOverrideTag:()=>T8,isJSDocParameterTag:()=>h_,isJSDocPrivateTag:()=>N6,isJSDocPropertyLikeTag:()=>Ig,isJSDocPropertyTag:()=>pR,isJSDocProtectedTag:()=>O6,isJSDocPublicTag:()=>I6,isJSDocReadonlyTag:()=>M6,isJSDocReturnTag:()=>R6,isJSDocSatisfiesExpression:()=>dL,isJSDocSatisfiesTag:()=>j6,isJSDocSeeTag:()=>cR,isJSDocSignature:()=>cu,isJSDocTag:()=>Wg,isJSDocTemplateTag:()=>Ko,isJSDocThisTag:()=>x8,isJSDocThrowsTag:()=>fR,isJSDocTypeAlias:()=>Hl,isJSDocTypeAssertion:()=>I8,isJSDocTypeExpression:()=>g8,isJSDocTypeLiteral:()=>P6,isJSDocTypeTag:()=>lu,isJSDocTypedefTag:()=>lR,isJSDocUnknownTag:()=>uR,isJSDocUnknownType:()=>rR,isJSDocVariadicType:()=>aR,isJSXTagName:()=>Lf,isJsonEqual:()=>$2,isJsonSourceFile:()=>e2,isJsxAttribute:()=>WJ,isJsxAttributeLike:()=>kk,isJsxAttributeName:()=>gL,isJsxAttributes:()=>D6,isJsxChild:()=>S3,isJsxClosingElement:()=>zf,isJsxClosingFragment:()=>zJ,isJsxElement:()=>Q0,isJsxExpression:()=>HJ,isJsxFragment:()=>dl,isJsxNamespacedName:()=>U_,isJsxOpeningElement:()=>Oo,isJsxOpeningFragment:()=>k6,isJsxOpeningLikeElement:()=>x3,isJsxOpeningLikeElementTagName:()=>isJsxOpeningLikeElementTagName,isJsxSelfClosingElement:()=>qJ,isJsxSpreadAttribute:()=>VJ,isJsxTagNameExpression:()=>Ak,isJsxText:()=>Dd,isJumpStatementTarget:()=>isJumpStatementTarget,isKeyword:()=>Si,isKeywordOrPunctuation:()=>Rf,isKnownSymbol:()=>HI,isLabelName:()=>isLabelName,isLabelOfLabeledStatement:()=>isLabelOfLabeledStatement,isLabeledStatement:()=>l8,isLateVisibilityPaintedStatement:()=>jD,isLeftHandSideExpression:()=>Lo,isLeftHandSideOfAssignment:()=>FN,isLet:()=>aP,isLineBreak:()=>mr,isLiteralComputedPropertyDeclarationName:()=>wT,isLiteralExpression:()=>Og,isLiteralExpressionOfObject:()=>OA,isLiteralImportTypeNode:()=>V3,isLiteralKind:()=>Ng,isLiteralLikeAccess:()=>Jf,isLiteralLikeElementAccess:()=>Vl,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>isLiteralNameOfPropertyDeclarationOrIndexAccess,isLiteralTypeLikeExpression:()=>QR,isLiteralTypeLiteral:()=>ik,isLiteralTypeNode:()=>m6,isLocalName:()=>Y0,isLogicalOperator:()=>JN,isLogicalOrCoalescingAssignmentExpression:()=>RN,isLogicalOrCoalescingAssignmentOperator:()=>Tm,isLogicalOrCoalescingBinaryExpression:()=>jN,isLogicalOrCoalescingBinaryOperator:()=>pS,isMappedTypeNode:()=>i8,isMemberName:()=>ro,isMetaProperty:()=>b6,isMethodDeclaration:()=>d_,isMethodOrAccessor:()=>Rg,isMethodSignature:()=>Wx,isMinusToken:()=>_6,isMissingDeclaration:()=>BJ,isModifier:()=>Lg,isModifierKind:()=>bi,isModifierLike:()=>Mf,isModuleAugmentationExternal:()=>j3,isModuleBlock:()=>u8,isModuleBody:()=>mk,isModuleDeclaration:()=>Yi,isModuleExportsAccessExpression:()=>u2,isModuleIdentifier:()=>_T,isModuleName:()=>$R,isModuleOrEnumDeclaration:()=>bk,isModuleReference:()=>Ek,isModuleSpecifierLike:()=>isModuleSpecifierLike,isModuleWithStringLiteralName:()=>kD,isNameOfFunctionDeclaration:()=>isNameOfFunctionDeclaration,isNameOfModuleDeclaration:()=>isNameOfModuleDeclaration,isNamedClassElement:()=>HA,isNamedDeclaration:()=>Yd,isNamedEvaluation:()=>$I,isNamedEvaluationSource:()=>RT,isNamedExportBindings:()=>DA,isNamedExports:()=>f8,isNamedImportBindings:()=>gk,isNamedImports:()=>FJ,isNamedImportsOrExports:()=>MO,isNamedTupleMember:()=>p6,isNamespaceBody:()=>hk,isNamespaceExport:()=>Nm,isNamespaceExportDeclaration:()=>x6,isNamespaceImport:()=>E6,isNamespaceReexportDeclaration:()=>zP,isNewExpression:()=>a8,isNewExpressionTarget:()=>isNewExpressionTarget,isNightly:()=>lN,isNoSubstitutionTemplateLiteral:()=>Fx,isNode:()=>IA,isNodeArray:()=>va,isNodeArrayMultiLine:()=>lO,isNodeDescendantOf:()=>II,isNodeKind:()=>ql,isNodeLikeSystem:()=>uE,isNodeModulesDirectory:()=>JE,isNodeWithPossibleHoistedDeclaration:()=>CI,isNonContextualKeyword:()=>OT,isNonExportDefaultModifier:()=>yj,isNonGlobalAmbientModule:()=>DD,isNonGlobalDeclaration:()=>isNonGlobalDeclaration,isNonNullAccess:()=>fL,isNonNullChain:()=>Z4,isNonNullExpression:()=>jo,isNonStaticMethodOrAccessorWithPrivateName:()=>isNonStaticMethodOrAccessorWithPrivateName,isNotEmittedOrPartiallyEmittedNode:()=>sk,isNotEmittedStatement:()=>A6,isNullishCoalesce:()=>AA,isNumber:()=>MC,isNumericLiteral:()=>lo,isNumericLiteralName:()=>ix,isObjectBindingElementWithoutPropertyName:()=>isObjectBindingElementWithoutPropertyName,isObjectBindingOrAssignmentElement:()=>p3,isObjectBindingOrAssignmentPattern:()=>u3,isObjectBindingPattern:()=>oJ,isObjectLiteralElement:()=>b0,isObjectLiteralElementLike:()=>Fg,isObjectLiteralExpression:()=>uo,isObjectLiteralMethod:()=>bP,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>vP,isObjectTypeDeclaration:()=>IO,isOctalDigit:()=>Nf,isOmittedExpression:()=>Im,isOptionalChain:()=>Dg,isOptionalChainRoot:()=>Pg,isOptionalDeclaration:()=>pL,isOptionalJSDocPropertyLikeTag:()=>sx,isOptionalTypeNode:()=>Qx,isOuterExpression:()=>jm,isOutermostOptionalChain:()=>EA,isOverrideModifier:()=>tJ,isPackedArrayLiteral:()=>ZM,isParameter:()=>Ma,isParameterDeclaration:()=>YI,isParameterOrCatchClauseVariable:()=>iL,isParameterPropertyDeclaration:()=>C4,isParameterPropertyModifier:()=>a3,isParenthesizedExpression:()=>is,isParenthesizedTypeNode:()=>f6,isParseTreeNode:()=>Tl,isPartOfTypeNode:()=>r2,isPartOfTypeQuery:()=>eT,isPartiallyEmittedExpression:()=>_8,isPatternMatch:()=>lg,isPinnedComment:()=>M3,isPlainJsFile:()=>sD,isPlusToken:()=>s6,isPossiblyTypeArgumentPosition:()=>isPossiblyTypeArgumentPosition,isPostfixUnaryExpression:()=>s8,isPrefixUnaryExpression:()=>Pm,isPrivateIdentifier:()=>jr,isPrivateIdentifierClassElementDeclaration:()=>i3,isPrivateIdentifierPropertyAccessExpression:()=>UA,isPrivateIdentifierSymbol:()=>GI,isProgramBundleEmitBuildInfo:()=>isProgramBundleEmitBuildInfo,isProgramUptoDate:()=>isProgramUptoDate,isPrologueDirective:()=>Ea,isPropertyAccessChain:()=>Q4,isPropertyAccessEntityNameExpression:()=>mS,isPropertyAccessExpression:()=>Br,isPropertyAccessOrQualifiedName:()=>ZA,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>KA,isPropertyAssignment:()=>_s,isPropertyDeclaration:()=>oo,isPropertyName:()=>zl,isPropertyNameLiteral:()=>P0,isPropertySignature:()=>Zl,isProtoSetter:()=>JT,isPrototypeAccess:()=>$l,isPrototypePropertyAssignment:()=>_I,isPunctuation:()=>NT,isPushOrUnshiftIdentifier:()=>QI,isQualifiedName:()=>M_,isQuestionDotToken:()=>XL,isQuestionOrExclamationToken:()=>VR,isQuestionOrPlusOrMinusToken:()=>XR,isQuestionToken:()=>Pl,isRawSourceMap:()=>isRawSourceMap,isReadonlyKeyword:()=>qx,isReadonlyKeywordOrPlusOrMinusToken:()=>GR,isRecognizedTripleSlashComment:()=>hD,isReferenceFileLocation:()=>isReferenceFileLocation,isReferencedFile:()=>isReferencedFile,isRegularExpressionLiteral:()=>UL,isRequireCall:()=>Wl,isRequireVariableStatement:()=>aT,isRestParameter:()=>E3,isRestTypeNode:()=>Yx,isReturnStatement:()=>kJ,isReturnStatementWithFixablePromiseHandler:()=>isReturnStatementWithFixablePromiseHandler,isRightSideOfAccessExpression:()=>hS,isRightSideOfPropertyAccess:()=>isRightSideOfPropertyAccess,isRightSideOfQualifiedName:()=>isRightSideOfQualifiedName,isRightSideOfQualifiedNameOrPropertyAccess:()=>qN,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>zN,isRootedDiskPath:()=>v_,isSameEntityName:()=>u_,isSatisfiesExpression:()=>hJ,isScopeMarker:()=>b3,isSemicolonClassElement:()=>bJ,isSetAccessor:()=>Zc,isSetAccessorDeclaration:()=>Qo,isShebangTrivia:()=>xg,isShorthandAmbientModuleSymbol:()=>PD,isShorthandPropertyAssignment:()=>_u,isSignedNumericLiteral:()=>T2,isSimpleCopiableExpression:()=>isSimpleCopiableExpression,isSimpleInlineableExpression:()=>isSimpleInlineableExpression,isSingleOrDoubleQuote:()=>KP,isSourceFile:()=>ii,isSourceFileFromLibrary:()=>isSourceFileFromLibrary,isSourceFileJS:()=>c2,isSourceFileNotJS:()=>GP,isSourceFileNotJson:()=>$P,isSourceMapping:()=>isSourceMapping,isSpecialPropertyDeclaration:()=>cI,isSpreadAssignment:()=>h8,isSpreadElement:()=>y6,isStatement:()=>v3,isStatementButNotDeclaration:()=>wk,isStatementOrBlock:()=>T3,isStatementWithLocals:()=>_D,isStatic:()=>N0,isStaticModifier:()=>ZL,isString:()=>b_,isStringAKeyword:()=>FI,isStringANonContextualKeyword:()=>jI,isStringAndEmptyAnonymousObjectIntersection:()=>isStringAndEmptyAnonymousObjectIntersection,isStringDoubleQuoted:()=>ZP,isStringLiteral:()=>mn,isStringLiteralLike:()=>Kn,isStringLiteralOrJsxExpression:()=>Dk,isStringLiteralOrTemplate:()=>isStringLiteralOrTemplate,isStringOrNumericLiteralLike:()=>Qi,isStringOrRegularExpressionOrTemplateLiteral:()=>isStringOrRegularExpressionOrTemplateLiteral,isStringTextContainingNode:()=>FA,isSuperCall:()=>oP,isSuperKeyword:()=>qf,isSuperOrSuperProperty:()=>LP,isSuperProperty:()=>gd,isSupportedSourceFileName:()=>IM,isSwitchStatement:()=>PJ,isSyntaxList:()=>dR,isSyntheticExpression:()=>yJ,isSyntheticReference:()=>UJ,isTagName:()=>isTagName,isTaggedTemplateExpression:()=>o8,isTaggedTemplateTag:()=>isTaggedTemplateTag,isTemplateExpression:()=>fJ,isTemplateHead:()=>qL,isTemplateLiteral:()=>rk,isTemplateLiteralKind:()=>Sl,isTemplateLiteralToken:()=>MA,isTemplateLiteralTypeNode:()=>aJ,isTemplateLiteralTypeSpan:()=>iJ,isTemplateMiddle:()=>zL,isTemplateMiddleOrTemplateTail:()=>LA,isTemplateSpan:()=>gJ,isTemplateTail:()=>WL,isTextWhiteSpaceLike:()=>isTextWhiteSpaceLike,isThis:()=>isThis,isThisContainerOrFunctionBlock:()=>PP,isThisIdentifier:()=>gm,isThisInTypeQuery:()=>wN,isThisInitializedDeclaration:()=>RP,isThisInitializedObjectBindingExpression:()=>jP,isThisProperty:()=>JP,isThisTypeNode:()=>d6,isThisTypeParameter:()=>ax,isThisTypePredicate:()=>SP,isThrowStatement:()=>IJ,isToken:()=>NA,isTokenKind:()=>t3,isTraceEnabled:()=>isTraceEnabled,isTransientSymbol:()=>T0,isTrivia:()=>UI,isTryStatement:()=>NJ,isTupleTypeNode:()=>$x,isTypeAlias:()=>yI,isTypeAliasDeclaration:()=>T6,isTypeAssertionExpression:()=>_J,isTypeDeclaration:()=>ox,isTypeElement:()=>jg,isTypeKeyword:()=>isTypeKeyword,isTypeKeywordToken:()=>isTypeKeywordToken,isTypeKeywordTokenOrIdentifier:()=>isTypeKeywordTokenOrIdentifier,isTypeLiteralNode:()=>Am,isTypeNode:()=>g0,isTypeNodeKind:()=>DS,isTypeOfExpression:()=>lJ,isTypeOnlyExportDeclaration:()=>n3,isTypeOnlyImportDeclaration:()=>r3,isTypeOnlyImportOrExportDeclaration:()=>RA,isTypeOperatorNode:()=>r8,isTypeParameterDeclaration:()=>No,isTypePredicateNode:()=>Hx,isTypeQueryNode:()=>Gx,isTypeReferenceNode:()=>R_,isTypeReferenceType:()=>Ok,isTypeUsableAsPropertyName:()=>vL,isUMDExportSymbol:()=>kO,isUnaryExpression:()=>h3,isUnaryExpressionWithWrite:()=>nk,isUnicodeIdentifierStart:()=>n4,isUnionTypeNode:()=>Kx,isUnparsedNode:()=>PA,isUnparsedPrepend:()=>$J,isUnparsedSource:()=>YJ,isUnparsedTextLike:()=>e3,isUrl:()=>SE,isValidBigIntString:()=>ZS,isValidESSymbolDeclaration:()=>hP,isValidTypeOnlyAliasUseSite:()=>VM,isValueSignatureDeclaration:()=>EI,isVarAwaitUsing:()=>nP,isVarConst:()=>W3,isVarUsing:()=>iP,isVariableDeclaration:()=>ki,isVariableDeclarationInVariableStatement:()=>G3,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>fm,isVariableDeclarationInitializedToRequire:()=>nT,isVariableDeclarationList:()=>v6,isVariableLike:()=>n2,isVariableLikeOrAccessor:()=>dP,isVariableStatement:()=>as,isVoidExpression:()=>h6,isWatchSet:()=>hO,isWhileStatement:()=>xJ,isWhiteSpaceLike:()=>Vi,isWhiteSpaceSingleLine:()=>Io,isWithStatement:()=>DJ,isWriteAccess:()=>SO,isWriteOnlyAccess:()=>TO,isYieldExpression:()=>dJ,jsxModeNeedsExplicitImport:()=>jsxModeNeedsExplicitImport,keywordPart:()=>keywordPart,last:()=>ka,lastOrUndefined:()=>wi,length:()=>Ka,libMap:()=>libMap,libs:()=>libs,lineBreakPart:()=>lineBreakPart,linkNamePart:()=>linkNamePart,linkPart:()=>linkPart,linkTextPart:()=>linkTextPart,listFiles:()=>listFiles,loadModuleFromGlobalCache:()=>loadModuleFromGlobalCache,loadWithModeAwareCache:()=>loadWithModeAwareCache,makeIdentifierFromModuleName:()=>ED,makeImport:()=>makeImport,makeImportIfNecessary:()=>makeImportIfNecessary,makeStringLiteral:()=>makeStringLiteral,mangleScopedPackageName:()=>mangleScopedPackageName,map:()=>Aa,mapAllOrFail:()=>V5,mapDefined:()=>Za,mapDefinedEntries:()=>G5,mapDefinedIterator:()=>H5,mapEntries:()=>K5,mapIterator:()=>q5,mapOneOrMany:()=>mapOneOrMany,mapToDisplayParts:()=>mapToDisplayParts,matchFiles:()=>CM,matchPatternOrExact:()=>jM,matchedText:()=>eE,matchesExclude:()=>matchesExclude,maybeBind:()=>rr,maybeSetLocalizedDiagnosticMessages:()=>NS,memoize:()=>ry,memoizeCached:()=>jC,memoizeOne:()=>Nn,memoizeWeak:()=>RC,metadataHelper:()=>metadataHelper,min:()=>UC,minAndMax:()=>BM,missingFileModifiedTime:()=>missingFileModifiedTime,modifierToFlag:()=>J2,modifiersToFlags:()=>ln,moduleOptionDeclaration:()=>moduleOptionDeclaration,moduleResolutionIsEqualTo:()=>Zk,moduleResolutionNameAndModeGetter:()=>moduleResolutionNameAndModeGetter,moduleResolutionOptionDeclarations:()=>moduleResolutionOptionDeclarations,moduleResolutionSupportsPackageJsonExportsAndImports:()=>q2,moduleResolutionUsesNodeModules:()=>moduleResolutionUsesNodeModules,moduleSpecifiers:()=>ts_moduleSpecifiers_exports,moveEmitHelpers:()=>moveEmitHelpers,moveRangeEnd:()=>eO,moveRangePastDecorators:()=>TS,moveRangePastModifiers:()=>tO,moveRangePos:()=>xd,moveSyntheticComments:()=>moveSyntheticComments,mutateMap:()=>CO,mutateMapSkippingNewValues:()=>ES,needsParentheses:()=>needsParentheses,needsScopeMarker:()=>ck,newCaseClauseTracker:()=>newCaseClauseTracker,newPrivateEnvironment:()=>newPrivateEnvironment,noEmitNotification:()=>noEmitNotification,noEmitSubstitution:()=>noEmitSubstitution,noTransformers:()=>noTransformers,noTruncationMaximumTruncationLength:()=>fx,nodeCanBeDecorated:()=>Y3,nodeHasName:()=>I4,nodeIsDecorated:()=>l_,nodeIsMissing:()=>zi,nodeIsPresent:()=>wl,nodeIsSynthesized:()=>Ta,nodeModuleNameResolver:()=>nodeModuleNameResolver,nodeModulesPathPart:()=>nodeModulesPathPart,nodeNextJsonConfigResolver:()=>nodeNextJsonConfigResolver,nodeOrChildIsDecorated:()=>A0,nodeOverlapsWithStartEnd:()=>nodeOverlapsWithStartEnd,nodePosToString:()=>lD,nodeSeenTracker:()=>nodeSeenTracker,nodeStartsNewLexicalEnvironment:()=>KI,nodeToDisplayParts:()=>nodeToDisplayParts,noop:()=>Rn,noopFileWatcher:()=>noopFileWatcher,normalizePath:()=>pn,normalizeSlashes:()=>qo,not:()=>nE,notImplemented:()=>JC,notImplementedResolver:()=>notImplementedResolver,nullNodeConverters:()=>nullNodeConverters,nullParenthesizerRules:()=>i6,nullTransformationContext:()=>nullTransformationContext,objectAllocator:()=>wt,operatorPart:()=>operatorPart,optionDeclarations:()=>optionDeclarations,optionMapToObject:()=>optionMapToObject,optionsAffectingProgramStructure:()=>optionsAffectingProgramStructure,optionsForBuild:()=>optionsForBuild,optionsForWatch:()=>optionsForWatch,optionsHaveChanges:()=>E_,optionsHaveModuleResolutionChanges:()=>A3,or:()=>ug,orderedRemoveItem:()=>YC,orderedRemoveItemAt:()=>Jv,outFile:()=>A2,packageIdToPackageName:()=>k3,packageIdToString:()=>rD,padLeft:()=>Uv,padRight:()=>sE,paramHelper:()=>paramHelper,parameterIsThisKeyword:()=>Xl,parameterNamePart:()=>parameterNamePart,parseBaseNodeFactory:()=>tg,parseBigInt:()=>WM,parseBuildCommand:()=>parseBuildCommand,parseCommandLine:()=>parseCommandLine,parseCommandLineWorker:()=>parseCommandLineWorker,parseConfigFileTextToJson:()=>parseConfigFileTextToJson,parseConfigFileWithSystem:()=>parseConfigFileWithSystem,parseConfigHostFromCompilerHostLike:()=>parseConfigHostFromCompilerHostLike,parseCustomTypeOption:()=>parseCustomTypeOption,parseIsolatedEntityName:()=>Lj,parseIsolatedJSDocComment:()=>Rj,parseJSDocTypeExpressionForTests:()=>jj,parseJsonConfigFileContent:()=>parseJsonConfigFileContent,parseJsonSourceFileConfigFileContent:()=>parseJsonSourceFileConfigFileContent,parseJsonText:()=>Jj,parseListTypeOption:()=>parseListTypeOption,parseNodeFactory:()=>z_,parseNodeModuleFromPath:()=>parseNodeModuleFromPath,parsePackageName:()=>parsePackageName,parsePseudoBigInt:()=>xm,parseValidBigInt:()=>KS,patchWriteFileEnsuringDirectory:()=>patchWriteFileEnsuringDirectory,pathContainsNodeModules:()=>pathContainsNodeModules,pathIsAbsolute:()=>mg,pathIsBareSpecifier:()=>wE,pathIsRelative:()=>rs,patternText:()=>ZC,perfLogger:()=>Kf,performIncrementalCompilation:()=>performIncrementalCompilation,performance:()=>ts_performance_exports,plainJSErrors:()=>plainJSErrors,positionBelongsToNode:()=>positionBelongsToNode,positionIsASICandidate:()=>positionIsASICandidate,positionIsSynthesized:()=>Oa,positionsAreOnSameLine:()=>P_,preProcessFile:()=>preProcessFile,probablyUsesSemicolons:()=>probablyUsesSemicolons,processCommentPragmas:()=>G8,processPragmasIntoFields:()=>X8,processTaggedTemplateExpression:()=>processTaggedTemplateExpression,programContainsEsModules:()=>programContainsEsModules,programContainsModules:()=>programContainsModules,projectReferenceIsEqualTo:()=>Kk,propKeyHelper:()=>propKeyHelper,propertyNamePart:()=>propertyNamePart,pseudoBigIntToString:()=>Q2,punctuationPart:()=>punctuationPart,pushIfUnique:()=>Ol,quote:()=>quote,quotePreferenceFromString:()=>quotePreferenceFromString,rangeContainsPosition:()=>rangeContainsPosition,rangeContainsPositionExclusive:()=>rangeContainsPositionExclusive,rangeContainsRange:()=>rangeContainsRange,rangeContainsRangeExclusive:()=>rangeContainsRangeExclusive,rangeContainsStartEnd:()=>rangeContainsStartEnd,rangeEndIsOnSameLineAsRangeStart:()=>sO,rangeEndPositionsAreOnSameLine:()=>oO,rangeEquals:()=>pC,rangeIsOnSingleLine:()=>iO,rangeOfNode:()=>UM,rangeOfTypeParameters:()=>qM,rangeOverlapsWithStartEnd:()=>rangeOverlapsWithStartEnd,rangeStartIsOnSameLineAsRangeEnd:()=>SS,rangeStartPositionsAreOnSameLine:()=>aO,readBuilderProgram:()=>readBuilderProgram,readConfigFile:()=>readConfigFile,readHelper:()=>readHelper,readJson:()=>ZN,readJsonConfigFile:()=>readJsonConfigFile,readJsonOrUndefined:()=>gS,realizeDiagnostics:()=>realizeDiagnostics,reduceEachLeadingCommentRange:()=>i4,reduceEachTrailingCommentRange:()=>a4,reduceLeft:()=>Rd,reduceLeftIterator:()=>L5,reducePathComponents:()=>Da,refactor:()=>ts_refactor_exports,regExpEscape:()=>SM,relativeComplement:()=>cC,removeAllComments:()=>removeAllComments,removeEmitHelper:()=>removeEmitHelper,removeExtension:()=>$S,removeFileExtension:()=>Al,removeIgnoredPath:()=>removeIgnoredPath,removeMinAndVersionNumbers:()=>QC,removeOptionality:()=>removeOptionality,removePrefix:()=>tE,removeSuffix:()=>XC,removeTrailingDirectorySeparator:()=>S_,repeatString:()=>repeatString,replaceElement:()=>yC,resolutionExtensionIsTSOrJson:()=>LM,resolveConfigFileProjectName:()=>resolveConfigFileProjectName,resolveJSModule:()=>resolveJSModule,resolveLibrary:()=>resolveLibrary,resolveModuleName:()=>resolveModuleName,resolveModuleNameFromCache:()=>resolveModuleNameFromCache,resolvePackageNameToPackageJson:()=>resolvePackageNameToPackageJson,resolvePath:()=>d0,resolveProjectReferencePath:()=>resolveProjectReferencePath,resolveTripleslashReference:()=>resolveTripleslashReference,resolveTypeReferenceDirective:()=>resolveTypeReferenceDirective,resolvingEmptyArray:()=>ux,restHelper:()=>restHelper,returnFalse:()=>$f,returnNoopFileWatcher:()=>returnNoopFileWatcher,returnTrue:()=>Pv,returnUndefined:()=>LC,returnsPromise:()=>returnsPromise,runInitializersHelper:()=>runInitializersHelper,sameFlatMap:()=>Tv,sameMap:()=>z5,sameMapping:()=>sameMapping,scanShebangTrivia:()=>wg,scanTokenAtPosition:()=>KD,scanner:()=>Fo,screenStartingMessageCodes:()=>screenStartingMessageCodes,semanticDiagnosticsOptionDeclarations:()=>semanticDiagnosticsOptionDeclarations,serializeCompilerOptions:()=>serializeCompilerOptions,server:()=>ts_server_exports,servicesVersion:()=>f7,setCommentRange:()=>setCommentRange,setConfigFileInOptions:()=>setConfigFileInOptions,setConstantValue:()=>setConstantValue,setEachParent:()=>a_,setEmitFlags:()=>setEmitFlags,setFunctionNameHelper:()=>setFunctionNameHelper,setGetSourceFileAsHashVersioned:()=>setGetSourceFileAsHashVersioned,setIdentifierAutoGenerate:()=>setIdentifierAutoGenerate,setIdentifierGeneratedImportReference:()=>setIdentifierGeneratedImportReference,setIdentifierTypeArguments:()=>setIdentifierTypeArguments,setInternalEmitFlags:()=>setInternalEmitFlags,setLocalizedDiagnosticMessages:()=>IS,setModuleDefaultHelper:()=>setModuleDefaultHelper,setNodeFlags:()=>YM,setObjectAllocator:()=>PS,setOriginalNode:()=>Xr,setParent:()=>Xi,setParentRecursive:()=>tx,setPrivateIdentifier:()=>setPrivateIdentifier,setResolvedModule:()=>$k,setResolvedTypeReferenceDirective:()=>Qk,setSnippetElement:()=>setSnippetElement,setSourceMapRange:()=>setSourceMapRange,setStackTraceLimit:()=>setStackTraceLimit,setStartsOnNewLine:()=>setStartsOnNewLine,setSyntheticLeadingComments:()=>setSyntheticLeadingComments,setSyntheticTrailingComments:()=>setSyntheticTrailingComments,setSys:()=>setSys,setSysLog:()=>setSysLog,setTextRange:()=>Ve,setTextRangeEnd:()=>ex,setTextRangePos:()=>Cd,setTextRangePosEnd:()=>Ya,setTextRangePosWidth:()=>Ed,setTokenSourceMapRange:()=>setTokenSourceMapRange,setTypeNode:()=>setTypeNode,setUILocale:()=>Mv,setValueDeclaration:()=>lI,shouldAllowImportingTsExtension:()=>shouldAllowImportingTsExtension,shouldPreserveConstEnums:()=>sM,shouldResolveJsRequire:()=>iM,shouldUseUriStyleNodeCoreModules:()=>shouldUseUriStyleNodeCoreModules,showModuleSpecifier:()=>DO,signatureHasLiteralTypes:()=>signatureHasLiteralTypes,signatureHasRestParameter:()=>signatureHasRestParameter,signatureToDisplayParts:()=>signatureToDisplayParts,single:()=>mC,singleElementArray:()=>Qf,singleIterator:()=>Q5,singleOrMany:()=>hC,singleOrUndefined:()=>Jd,skipAlias:()=>bO,skipAssertions:()=>OR,skipConstraint:()=>skipConstraint,skipOuterExpressions:()=>ls,skipParentheses:()=>Gl,skipPartiallyEmittedExpressions:()=>rm,skipTrivia:()=>Nt,skipTypeChecking:()=>zM,skipTypeParentheses:()=>DI,skipWhile:()=>cE,sliceAfter:()=>FM,some:()=>mt,sort:()=>Xf,sortAndDeduplicate:()=>xv,sortAndDeduplicateDiagnostics:()=>XE,sourceFileAffectingCompilerOptions:()=>sourceFileAffectingCompilerOptions,sourceFileMayBeEmitted:()=>I0,sourceMapCommentRegExp:()=>sourceMapCommentRegExp,sourceMapCommentRegExpDontCareLineStart:()=>sourceMapCommentRegExpDontCareLineStart,spacePart:()=>spacePart,spanMap:()=>Y5,spreadArrayHelper:()=>spreadArrayHelper,stableSort:()=>Ev,startEndContainsRange:()=>startEndContainsRange,startEndOverlapsWithStartEnd:()=>startEndOverlapsWithStartEnd,startOnNewLine:()=>Fm,startTracing:()=>startTracing,startsWith:()=>Fr,startsWithDirectory:()=>OE,startsWithUnderscore:()=>startsWithUnderscore,startsWithUseStrict:()=>P8,stringContains:()=>eo,stringContainsAt:()=>stringContainsAt,stringToToken:()=>Rl,stripQuotes:()=>_N,supportedDeclarationExtensions:()=>n6,supportedJSExtensions:()=>H0,supportedJSExtensionsFlat:()=>r6,supportedLocaleDirectories:()=>Hg,supportedTSExtensions:()=>Ro,supportedTSExtensionsFlat:()=>t6,supportedTSImplementationExtensions:()=>Nx,suppressLeadingAndTrailingTrivia:()=>suppressLeadingAndTrailingTrivia,suppressLeadingTrivia:()=>suppressLeadingTrivia,suppressTrailingTrivia:()=>suppressTrailingTrivia,symbolEscapedNameNoDefault:()=>symbolEscapedNameNoDefault,symbolName:()=>hd,symbolNameNoDefault:()=>symbolNameNoDefault,symbolPart:()=>symbolPart,symbolToDisplayParts:()=>symbolToDisplayParts,syntaxMayBeASICandidate:()=>syntaxMayBeASICandidate,syntaxRequiresTrailingSemicolonOrASI:()=>syntaxRequiresTrailingSemicolonOrASI,sys:()=>f0,sysLog:()=>sysLog,tagNamesAreEquivalent:()=>Ti,takeWhile:()=>_E,targetOptionDeclaration:()=>targetOptionDeclaration,templateObjectHelper:()=>templateObjectHelper,testFormatSettings:()=>testFormatSettings,textChangeRangeIsUnchanged:()=>w4,textChangeRangeNewSpan:()=>Qs,textChanges:()=>ts_textChanges_exports,textOrKeywordPart:()=>textOrKeywordPart,textPart:()=>textPart,textRangeContainsPositionInclusive:()=>QE,textSpanContainsPosition:()=>$E,textSpanContainsTextSpan:()=>YE,textSpanEnd:()=>Kt,textSpanIntersection:()=>x4,textSpanIntersectsWith:()=>eA,textSpanIntersectsWithPosition:()=>tA,textSpanIntersectsWithTextSpan:()=>ZE,textSpanIsEmpty:()=>T4,textSpanOverlap:()=>S4,textSpanOverlapsWith:()=>KE,textSpansEqual:()=>textSpansEqual,textToKeywordObj:()=>cl,timestamp:()=>Sa,toArray:()=>If,toBuilderFileEmit:()=>toBuilderFileEmit,toBuilderStateFileInfoForMultiEmit:()=>toBuilderStateFileInfoForMultiEmit,toEditorSettings:()=>sl,toFileNameLowerCase:()=>Nv,toLowerCase:()=>Iv,toPath:()=>xi,toProgramEmitPending:()=>toProgramEmitPending,tokenIsIdentifierOrKeyword:()=>kt,tokenIsIdentifierOrKeywordOrGreaterThan:()=>r4,tokenToString:()=>nr,trace:()=>trace,tracing:()=>xa,tracingEnabled:()=>tracingEnabled,transform:()=>transform,transformClassFields:()=>transformClassFields,transformDeclarations:()=>transformDeclarations,transformECMAScriptModule:()=>transformECMAScriptModule,transformES2015:()=>transformES2015,transformES2016:()=>transformES2016,transformES2017:()=>transformES2017,transformES2018:()=>transformES2018,transformES2019:()=>transformES2019,transformES2020:()=>transformES2020,transformES2021:()=>transformES2021,transformES5:()=>transformES5,transformESDecorators:()=>transformESDecorators,transformESNext:()=>transformESNext,transformGenerators:()=>transformGenerators,transformJsx:()=>transformJsx,transformLegacyDecorators:()=>transformLegacyDecorators,transformModule:()=>transformModule,transformNamedEvaluation:()=>transformNamedEvaluation,transformNodeModule:()=>transformNodeModule,transformNodes:()=>transformNodes,transformSystemModule:()=>transformSystemModule,transformTypeScript:()=>transformTypeScript,transpile:()=>transpile,transpileModule:()=>transpileModule,transpileOptionValueCompilerOptions:()=>transpileOptionValueCompilerOptions,trimString:()=>qd,trimStringEnd:()=>n_,trimStringStart:()=>gl,tryAddToSet:()=>$5,tryAndIgnoreErrors:()=>tryAndIgnoreErrors,tryCast:()=>On,tryDirectoryExists:()=>tryDirectoryExists,tryExtractTSExtension:()=>XN,tryFileExists:()=>tryFileExists,tryGetClassExtendingExpressionWithTypeArguments:()=>fS,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>dS,tryGetDirectories:()=>tryGetDirectories,tryGetExtensionFromPath:()=>X2,tryGetImportFromModuleSpecifier:()=>pT,tryGetJSDocSatisfiesTypeNode:()=>lx,tryGetModuleNameFromFile:()=>M8,tryGetModuleSpecifierFromDeclaration:()=>pI,tryGetNativePerformanceHooks:()=>mE,tryGetPropertyAccessOrIdentifierToString:()=>J0,tryGetPropertyNameOfBindingOrAssignmentElement:()=>J8,tryGetSourceMappingURL:()=>tryGetSourceMappingURL,tryGetTextOfPropertyName:()=>Qg,tryIOAndConsumeErrors:()=>tryIOAndConsumeErrors,tryParsePattern:()=>QS,tryParsePatterns:()=>MM,tryParseRawSourceMap:()=>tryParseRawSourceMap,tryReadDirectory:()=>tryReadDirectory,tryReadFile:()=>tryReadFile,tryRemoveDirectoryPrefix:()=>TM,tryRemoveExtension:()=>XS,tryRemovePrefix:()=>Fv,tryRemoveSuffix:()=>$C,typeAcquisitionDeclarations:()=>typeAcquisitionDeclarations,typeAliasNamePart:()=>typeAliasNamePart,typeDirectiveIsEqualTo:()=>nD,typeKeywords:()=>typeKeywords,typeParameterNamePart:()=>typeParameterNamePart,typeReferenceResolutionNameAndModeGetter:()=>typeReferenceResolutionNameAndModeGetter,typeToDisplayParts:()=>typeToDisplayParts,unchangedPollThresholds:()=>unchangedPollThresholds,unchangedTextChangeRange:()=>Vg,unescapeLeadingUnderscores:()=>Vo,unmangleScopedPackageName:()=>unmangleScopedPackageName,unorderedRemoveItem:()=>Rv,unorderedRemoveItemAt:()=>cg,unreachableCodeIsError:()=>eM,unusedLabelIsError:()=>tM,unwrapInnermostStatementOfLabel:()=>gP,updateErrorForNoInputFiles:()=>updateErrorForNoInputFiles,updateLanguageServiceSourceFile:()=>l7,updateMissingFilePathsWatch:()=>updateMissingFilePathsWatch,updatePackageJsonWatch:()=>updatePackageJsonWatch,updateResolutionField:()=>updateResolutionField,updateSharedExtendedConfigFileWatcher:()=>updateSharedExtendedConfigFileWatcher,updateSourceFile:()=>q6,updateWatchingWildcardDirectories:()=>updateWatchingWildcardDirectories,usesExtensionsOnImports:()=>GS,usingSingleLineStringWriter:()=>Gk,utf16EncodeAsString:()=>Of,validateLocaleAndSetLanguage:()=>oA,valuesHelper:()=>valuesHelper,version:()=>Gf,versionMajorMinor:()=>yv,visitArray:()=>visitArray,visitCommaListElements:()=>visitCommaListElements,visitEachChild:()=>visitEachChild,visitFunctionBody:()=>visitFunctionBody,visitIterationBody:()=>visitIterationBody,visitLexicalEnvironment:()=>visitLexicalEnvironment,visitNode:()=>visitNode,visitNodes:()=>visitNodes2,visitParameterList:()=>visitParameterList,walkUpBindingElementsAndPatterns:()=>k4,walkUpLexicalEnvironments:()=>walkUpLexicalEnvironments,walkUpOuterExpressions:()=>NR,walkUpParenthesizedExpressions:()=>ST,walkUpParenthesizedTypes:()=>AI,walkUpParenthesizedTypesAndGetParentAndChild:()=>kI,whitespaceOrMapCommentRegExp:()=>whitespaceOrMapCommentRegExp,writeCommentRange:()=>IN,writeFile:()=>bN,writeFileEnsuringDirectories:()=>vN,zipToModeAwareCache:()=>zipToModeAwareCache,zipWith:()=>ey});var mv=Vt({"src/typescript/_namespaces/ts.ts"(){"use strict";Dr(),K8(),w7(),AB()}}),kB=P5({"src/typescript/typescript.ts"(e,t){mv(),mv(),typeof console<"u"&&(N.loggingHost={log(r,a){switch(r){case 1:return console.error(a);case 2:return console.warn(a);case 3:return console.log(a);case 4:return console.log(a)}}}),t.exports=C7}});E7.exports=kB()});var V6=ut(A7=>{A7.typescriptVersionIsAtLeast=new Proxy({},{get:()=>!0})});var H6=ut(ai=>{"use strict";var DB=ai&&ai.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),PB=ai&&ai.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),IB=ai&&ai.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&DB(t,e,r);return PB(t,e),t};Object.defineProperty(ai,"__esModule",{value:!0});ai.getDecorators=ai.getModifiers=void 0;var W_=IB(Dt()),NB=V6(),k7=NB.typescriptVersionIsAtLeast["4.8"];function OB(e,t=!1){var r;if(e!=null){if(k7){if(t||W_.canHaveModifiers(e)){let a=W_.getModifiers(e);return a?Array.from(a):void 0}return}return(r=e.modifiers)==null?void 0:r.filter(a=>!W_.isDecorator(a))}}ai.getModifiers=OB;function MB(e,t=!1){var r;if(e!=null){if(k7){if(t||W_.canHaveDecorators(e)){let a=W_.getDecorators(e);return a?Array.from(a):void 0}return}return(r=e.decorators)==null?void 0:r.filter(W_.isDecorator)}}ai.getDecorators=MB});var D7=ut(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.xhtmlEntities=void 0;Bm.xhtmlEntities={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"}});var G6=ut(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});V_.AST_TOKEN_TYPES=V_.AST_NODE_TYPES=void 0;var P7;(function(e){e.AccessorProperty="AccessorProperty",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.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.ImportAttribute="ImportAttribute",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.JSXNamespacedName="JSXNamespacedName",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.PrivateIdentifier="PrivateIdentifier",e.Program="Program",e.Property="Property",e.PropertyDefinition="PropertyDefinition",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.StaticBlock="StaticBlock",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.TSAbstractAccessorProperty="TSAbstractAccessorProperty",e.TSAbstractKeyword="TSAbstractKeyword",e.TSAbstractMethodDefinition="TSAbstractMethodDefinition",e.TSAbstractPropertyDefinition="TSAbstractPropertyDefinition",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.TSInstantiationExpression="TSInstantiationExpression",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.TSIntrinsicKeyword="TSIntrinsicKeyword",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.TSPrivateKeyword="TSPrivateKeyword",e.TSPropertySignature="TSPropertySignature",e.TSProtectedKeyword="TSProtectedKeyword",e.TSPublicKeyword="TSPublicKeyword",e.TSQualifiedName="TSQualifiedName",e.TSReadonlyKeyword="TSReadonlyKeyword",e.TSRestType="TSRestType",e.TSSatisfiesExpression="TSSatisfiesExpression",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"})(P7||(V_.AST_NODE_TYPES=P7={}));var I7;(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"})(I7||(V_.AST_TOKEN_TYPES=I7={}))});var O7=ut(N7=>{"use strict";Object.defineProperty(N7,"__esModule",{value:!0})});var L7=ut(M7=>{"use strict";Object.defineProperty(M7,"__esModule",{value:!0})});var J7=ut(Ki=>{"use strict";var LB=Ki&&Ki.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),JB=Ki&&Ki.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),RB=Ki&&Ki.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&LB(t,e,r);return JB(t,e),t};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.TSESTree=void 0;Ki.TSESTree=RB(G6())});var j7=ut(jn=>{"use strict";var jB=jn&&jn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),X6=jn&&jn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&jB(t,e,r)};Object.defineProperty(jn,"__esModule",{value:!0});jn.AST_TOKEN_TYPES=jn.AST_NODE_TYPES=void 0;var R7=G6();Object.defineProperty(jn,"AST_NODE_TYPES",{enumerable:!0,get:function(){return R7.AST_NODE_TYPES}});Object.defineProperty(jn,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return R7.AST_TOKEN_TYPES}});X6(O7(),jn);X6(L7(),jn);X6(J7(),jn)});var B7=ut(F7=>{"use strict";Object.defineProperty(F7,"__esModule",{value:!0})});var q7=ut(U7=>{"use strict";Object.defineProperty(U7,"__esModule",{value:!0})});var Um=ut(hn=>{"use strict";var FB=hn&&hn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),z7=hn&&hn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&FB(t,e,r)};Object.defineProperty(hn,"__esModule",{value:!0});hn.TSESTree=hn.AST_TOKEN_TYPES=hn.AST_NODE_TYPES=void 0;var $6=j7();Object.defineProperty(hn,"AST_NODE_TYPES",{enumerable:!0,get:function(){return $6.AST_NODE_TYPES}});Object.defineProperty(hn,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return $6.AST_TOKEN_TYPES}});Object.defineProperty(hn,"TSESTree",{enumerable:!0,get:function(){return $6.TSESTree}});z7(B7(),hn);z7(q7(),hn)});var Wm=ut(me=>{"use strict";var BB=me&&me.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),UB=me&&me.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),qB=me&&me.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&BB(t,e,r);return UB(t,e),t};Object.defineProperty(me,"__esModule",{value:!0});me.getNamespaceModifiers=me.nodeCanBeDecorated=me.getContainingFunction=me.nodeIsPresent=me.isThisInTypeQuery=me.isThisIdentifier=me.identifierIsThisKeyword=me.firstDefined=me.nodeHasTokens=me.nodeHasIllegalDecorators=me.createError=me.TSError=me.convertTokens=me.convertToken=me.getTokenType=me.isChildUnwrappableOptionalChain=me.isChainExpression=me.isOptional=me.isComputedProperty=me.unescapeStringLiteralText=me.hasJSXAncestor=me.findFirstMatchingAncestor=me.findNextToken=me.getTSNodeAccessibility=me.getDeclarationKind=me.isJSXToken=me.getRange=me.canContainDirective=me.getLocFor=me.getLineAndCharacterFor=me.getBinaryExpressionType=me.isComment=me.isComma=me.getLastModifier=me.hasModifier=me.isESTreeClassMember=me.getTextForTokenKind=me.isESTreeBinaryOperator=me.isLogicalOperator=void 0;var Qe=qB(Dt()),uu=H6(),zB=D7(),ir=Um(),WB=V6(),W7=WB.typescriptVersionIsAtLeast["5.0"],ye=Qe.SyntaxKind,VB=new Set([ye.BarBarToken,ye.AmpersandAmpersandToken,ye.QuestionQuestionToken]),HB=new Set([Qe.SyntaxKind.EqualsToken,Qe.SyntaxKind.PlusEqualsToken,Qe.SyntaxKind.MinusEqualsToken,Qe.SyntaxKind.AsteriskEqualsToken,Qe.SyntaxKind.AsteriskAsteriskEqualsToken,Qe.SyntaxKind.SlashEqualsToken,Qe.SyntaxKind.PercentEqualsToken,Qe.SyntaxKind.LessThanLessThanEqualsToken,Qe.SyntaxKind.GreaterThanGreaterThanEqualsToken,Qe.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken,Qe.SyntaxKind.AmpersandEqualsToken,Qe.SyntaxKind.BarEqualsToken,Qe.SyntaxKind.BarBarEqualsToken,Qe.SyntaxKind.AmpersandAmpersandEqualsToken,Qe.SyntaxKind.QuestionQuestionEqualsToken,Qe.SyntaxKind.CaretEqualsToken]),GB=new Set([ye.InstanceOfKeyword,ye.InKeyword,ye.AsteriskAsteriskToken,ye.AsteriskToken,ye.SlashToken,ye.PercentToken,ye.PlusToken,ye.MinusToken,ye.AmpersandToken,ye.BarToken,ye.CaretToken,ye.LessThanLessThanToken,ye.GreaterThanGreaterThanToken,ye.GreaterThanGreaterThanGreaterThanToken,ye.AmpersandAmpersandToken,ye.BarBarToken,ye.LessThanToken,ye.LessThanEqualsToken,ye.GreaterThanToken,ye.GreaterThanEqualsToken,ye.EqualsEqualsToken,ye.EqualsEqualsEqualsToken,ye.ExclamationEqualsEqualsToken,ye.ExclamationEqualsToken]);function XB(e){return HB.has(e.kind)}function V7(e){return VB.has(e.kind)}me.isLogicalOperator=V7;function H7(e){return GB.has(e.kind)}me.isESTreeBinaryOperator=H7;function qm(e){return Qe.tokenToString(e)}me.getTextForTokenKind=qm;function $B(e){return e.kind!==ye.SemicolonClassElement}me.isESTreeClassMember=$B;function G7(e,t){let r=(0,uu.getModifiers)(t);return(r==null?void 0:r.some(a=>a.kind===e))===!0}me.hasModifier=G7;function QB(e){let t=(0,uu.getModifiers)(e);return t==null?null:t[t.length-1]??null}me.getLastModifier=QB;function YB(e){return e.kind===ye.CommaToken}me.isComma=YB;function X7(e){return e.kind===ye.SingleLineCommentTrivia||e.kind===ye.MultiLineCommentTrivia}me.isComment=X7;function KB(e){return e.kind===ye.JSDocComment}function ZB(e){if(XB(e))return{type:ir.AST_NODE_TYPES.AssignmentExpression,operator:qm(e.kind)};if(V7(e))return{type:ir.AST_NODE_TYPES.LogicalExpression,operator:qm(e.kind)};if(H7(e))return{type:ir.AST_NODE_TYPES.BinaryExpression,operator:qm(e.kind)};throw new Error(`Unexpected binary operator ${Qe.tokenToString(e.kind)}`)}me.getBinaryExpressionType=ZB;function $7(e,t){let r=t.getLineAndCharacterOfPosition(e);return{line:r.line+1,column:r.character}}me.getLineAndCharacterFor=$7;function Q7(e,t){let[r,a]=e.map(_=>$7(_,t));return{start:r,end:a}}me.getLocFor=Q7;function eU(e){if(e.kind===Qe.SyntaxKind.Block)switch(e.parent.kind){case Qe.SyntaxKind.Constructor:case Qe.SyntaxKind.GetAccessor:case Qe.SyntaxKind.SetAccessor:case Qe.SyntaxKind.ArrowFunction:case Qe.SyntaxKind.FunctionExpression:case Qe.SyntaxKind.FunctionDeclaration:case Qe.SyntaxKind.MethodDeclaration:return!0;default:return!1}return!0}me.canContainDirective=eU;function tU(e,t){return[e.getStart(t),e.getEnd()]}me.getRange=tU;function rU(e){return e.kind>=ye.FirstToken&&e.kind<=ye.LastToken}function Q6(e){return e.kind>=ye.JsxElement&&e.kind<=ye.JsxAttribute}me.isJSXToken=Q6;function nU(e){return e.flags&Qe.NodeFlags.Let?"let":(e.flags&Qe.NodeFlags.AwaitUsing)===Qe.NodeFlags.AwaitUsing?"await using":e.flags&Qe.NodeFlags.Const?"const":e.flags&Qe.NodeFlags.Using?"using":"var"}me.getDeclarationKind=nU;function iU(e){let t=(0,uu.getModifiers)(e);if(t!=null)for(let r of t)switch(r.kind){case ye.PublicKeyword:return"public";case ye.ProtectedKeyword:return"protected";case ye.PrivateKeyword:return"private";default:break}}me.getTSNodeAccessibility=iU;function aU(e,t,r){return a(t);function a(_){return Qe.isToken(_)&&_.pos===e.end?_:nw(_.getChildren(r),p=>(p.pos<=e.pos&&p.end>e.end||p.pos===e.end)&&rw(p,r)?a(p):void 0)}}me.findNextToken=aU;function Y7(e,t){for(;e;){if(t(e))return e;e=e.parent}}me.findFirstMatchingAncestor=Y7;function K7(e){return!!Y7(e,Q6)}me.hasJSXAncestor=K7;function oU(e){return e.replace(/&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g,t=>{let r=t.slice(1,-1);if(r[0]==="#"){let a=r[1]==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10);return a>1114111?t:String.fromCodePoint(a)}return zB.xhtmlEntities[r]||t})}me.unescapeStringLiteralText=oU;function sU(e){return e.kind===ye.ComputedPropertyName}me.isComputedProperty=sU;function _U(e){return e.questionToken?e.questionToken.kind===ye.QuestionToken:!1}me.isOptional=_U;function Z7(e){return e.type===ir.AST_NODE_TYPES.ChainExpression}me.isChainExpression=Z7;function cU(e,t){return Z7(t)&&e.expression.kind!==Qe.SyntaxKind.ParenthesizedExpression}me.isChildUnwrappableOptionalChain=cU;function ew(e){let t;if(W7&&e.kind===ye.Identifier?t=Qe.identifierToKeywordKind(e):"originalKeywordKind"in e&&(t=e.originalKeywordKind),t)return t===ye.NullKeyword?ir.AST_TOKEN_TYPES.Null:t>=ye.FirstFutureReservedWord&&t<=ye.LastKeyword?ir.AST_TOKEN_TYPES.Identifier:ir.AST_TOKEN_TYPES.Keyword;if(e.kind>=ye.FirstKeyword&&e.kind<=ye.LastFutureReservedWord)return e.kind===ye.FalseKeyword||e.kind===ye.TrueKeyword?ir.AST_TOKEN_TYPES.Boolean:ir.AST_TOKEN_TYPES.Keyword;if(e.kind>=ye.FirstPunctuation&&e.kind<=ye.LastPunctuation)return ir.AST_TOKEN_TYPES.Punctuator;if(e.kind>=ye.NoSubstitutionTemplateLiteral&&e.kind<=ye.TemplateTail)return ir.AST_TOKEN_TYPES.Template;switch(e.kind){case ye.NumericLiteral:return ir.AST_TOKEN_TYPES.Numeric;case ye.JsxText:return ir.AST_TOKEN_TYPES.JSXText;case ye.StringLiteral:return e.parent.kind===ye.JsxAttribute||e.parent.kind===ye.JsxElement?ir.AST_TOKEN_TYPES.JSXText:ir.AST_TOKEN_TYPES.String;case ye.RegularExpressionLiteral:return ir.AST_TOKEN_TYPES.RegularExpression;case ye.Identifier:case ye.ConstructorKeyword:case ye.GetKeyword:case ye.SetKeyword:default:}return e.kind===ye.Identifier&&(Q6(e.parent)||e.parent.kind===ye.PropertyAccessExpression&&K7(e))?ir.AST_TOKEN_TYPES.JSXIdentifier:ir.AST_TOKEN_TYPES.Identifier}me.getTokenType=ew;function tw(e,t){let r=e.kind===ye.JsxText?e.getFullStart():e.getStart(t),a=e.getEnd(),_=t.text.slice(r,a),p=ew(e),d=[r,a],h=Q7(d,t);return p===ir.AST_TOKEN_TYPES.RegularExpression?{type:p,value:_,range:d,loc:h,regex:{pattern:_.slice(1,_.lastIndexOf("/")),flags:_.slice(_.lastIndexOf("/")+1)}}:{type:p,value:_,range:d,loc:h}}me.convertToken=tw;function lU(e){let t=[];function r(a){if(!(X7(a)||KB(a)))if(rU(a)&&a.kind!==ye.EndOfFileToken){let _=tw(a,e);_&&t.push(_)}else a.getChildren(e).forEach(r)}return r(e),t}me.convertTokens=lU;var zm=class extends Error{constructor(t,r,a){super(t),this.fileName=r,this.location=a,Object.defineProperty(this,"name",{value:new.target.name,enumerable:!1,configurable:!0})}get index(){return this.location.start.offset}get lineNumber(){return this.location.start.line}get column(){return this.location.start.column}};me.TSError=zm;function uU(e,t,r,a=r){let[_,p]=[r,a].map(d=>{let{line:h,character:l}=t.getLineAndCharacterOfPosition(d);return{line:h+1,column:l,offset:d}});return new zm(e,t.fileName,{start:_,end:p})}me.createError=uU;function pU(e){var t;return!!("illegalDecorators"in e&&((t=e.illegalDecorators)!=null&&t.length))}me.nodeHasIllegalDecorators=pU;function rw(e,t){return e.kind===ye.EndOfFileToken?!!e.jsDoc:e.getWidth(t)!==0}me.nodeHasTokens=rw;function nw(e,t){if(e!==void 0)for(let r=0;r=0&&e.kind!==ye.EndOfFileToken}function mU(e){return!dU(e)}me.nodeIsPresent=mU;function hU(e){return Qe.findAncestor(e.parent,Qe.isFunctionLike)}me.getContainingFunction=hU;function yU(e){return G7(ye.AbstractKeyword,e)}function gU(e){if(e.parameters.length&&!Qe.isJSDocSignature(e)){let t=e.parameters[0];if(bU(t))return t}return null}function bU(e){return Y6(e.name)}function vU(e){switch(e.kind){case ye.ClassDeclaration:return!0;case ye.ClassExpression:return!0;case ye.PropertyDeclaration:{let{parent:t}=e;return!!(Qe.isClassDeclaration(t)||Qe.isClassLike(t)&&!yU(e))}case ye.GetAccessor:case ye.SetAccessor:case ye.MethodDeclaration:{let{parent:t}=e;return!!e.body&&(Qe.isClassDeclaration(t)||Qe.isClassLike(t))}case ye.Parameter:{let{parent:t}=e,r=t.parent;return!!t&&"body"in t&&!!t.body&&(t.kind===ye.Constructor||t.kind===ye.MethodDeclaration||t.kind===ye.SetAccessor)&&gU(t)!==e&&!!r&&r.kind===ye.ClassDeclaration}}return!1}me.nodeCanBeDecorated=vU;function TU(e){let t=(0,uu.getModifiers)(e),r=e;for(;(!t||t.length===0)&&Qe.isModuleDeclaration(r.parent)&&r.parent.name;){let a=(0,uu.getModifiers)(r.parent);a&&(a==null?void 0:a.length)>0&&(t=a),r=r.parent}return t}me.getNamespaceModifiers=TU});var Z6=ut(yn=>{"use strict";var SU=yn&&yn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),xU=yn&&yn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),wU=yn&&yn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&SU(t,e,r);return xU(t,e),t},Ne=yn&&yn.__classPrivateFieldGet||function(e,t,r,a){if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?a:r==="a"?a.call(e):a?a.value:t.get(e)},Pe,aw,br,oi,st;Object.defineProperty(yn,"__esModule",{value:!0});yn.Converter=yn.convertError=void 0;var _t=wU(Dt()),Zi=H6(),pe=Wm(),J=Um(),E=_t.SyntaxKind;function CU(e){return(0,pe.createError)("message"in e&&e.message||e.messageText,e.file,e.start)}yn.convertError=CU;var K6=class{constructor(t,r){Pe.add(this),this.esTreeNodeToTSNodeMap=new WeakMap,this.tsNodeToESTreeNodeMap=new WeakMap,this.allowPattern=!1,this.ast=t,this.options={...r}}getASTMaps(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}convertProgram(){return this.converter(this.ast)}converter(t,r,a){if(!t)return null;Ne(this,Pe,"m",aw).call(this,t);let _=this.allowPattern;a!==void 0&&(this.allowPattern=a);let p=this.convertNode(t,r??t.parent);return this.registerTSNodeInNodeMap(t,p),this.allowPattern=_,p}fixExports(t,r){let _=_t.isModuleDeclaration(t)&&!!(t.flags&_t.NodeFlags.Namespace)?(0,pe.getNamespaceModifiers)(t):(0,Zi.getModifiers)(t);if((_==null?void 0:_[0].kind)===E.ExportKeyword){this.registerTSNodeInNodeMap(t,r);let p=_[0],d=_[1],h=(d==null?void 0:d.kind)===E.DefaultKeyword,l=h?(0,pe.findNextToken)(d,this.ast,this.ast):(0,pe.findNextToken)(p,this.ast,this.ast);if(r.range[0]=l.getStart(this.ast),r.loc=(0,pe.getLocFor)(r.range,this.ast),h)return this.createNode(t,{type:J.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:r,range:[p.getStart(this.ast),r.range[1]],exportKind:"value"});let v=r.type===J.AST_NODE_TYPES.TSInterfaceDeclaration||r.type===J.AST_NODE_TYPES.TSTypeAliasDeclaration,y="declare"in r&&r.declare;return this.createNode(t,{type:J.AST_NODE_TYPES.ExportNamedDeclaration,declaration:r,specifiers:[],source:null,exportKind:v||y?"type":"value",range:[p.getStart(this.ast),r.range[1]],assertions:[]})}return r}registerTSNodeInNodeMap(t,r){r&&this.options.shouldPreserveNodeMaps&&(this.tsNodeToESTreeNodeMap.has(t)||this.tsNodeToESTreeNodeMap.set(t,r))}convertPattern(t,r){return this.converter(t,r,!0)}convertChild(t,r){return this.converter(t,r,!1)}createNode(t,r){let a=r;return a.range??(a.range=(0,pe.getRange)(t,this.ast)),a.loc??(a.loc=(0,pe.getLocFor)(a.range,this.ast)),a&&this.options.shouldPreserveNodeMaps&&this.esTreeNodeToTSNodeMap.set(a,t),a}convertBindingNameWithTypeAnnotation(t,r,a){let _=this.convertPattern(t);return r&&(_.typeAnnotation=this.convertTypeAnnotation(r,a),this.fixParentLocation(_,_.typeAnnotation.range)),_}convertTypeAnnotation(t,r){let a=(r==null?void 0:r.kind)===E.FunctionType||(r==null?void 0:r.kind)===E.ConstructorType?2:1,p=[t.getFullStart()-a,t.end],d=(0,pe.getLocFor)(p,this.ast);return{type:J.AST_NODE_TYPES.TSTypeAnnotation,loc:d,range:p,typeAnnotation:this.convertChild(t)}}convertBodyExpressions(t,r){let a=(0,pe.canContainDirective)(r);return t.map(_=>{let p=this.convertChild(_);if(a){if(p!=null&&p.expression&&_t.isExpressionStatement(_)&&_t.isStringLiteral(_.expression)){let d=p.expression.raw;return p.directive=d.slice(1,-1),p}a=!1}return p}).filter(_=>_)}convertTypeArgumentsToTypeParameterInstantiation(t,r){let a=(0,pe.findNextToken)(t,this.ast,this.ast);return this.createNode(r,{type:J.AST_NODE_TYPES.TSTypeParameterInstantiation,range:[t.pos-1,a.end],params:t.map(_=>this.convertChild(_))})}convertTSTypeParametersToTypeParametersDeclaration(t){let r=(0,pe.findNextToken)(t,this.ast,this.ast),a=[t.pos-1,r.end];return{type:J.AST_NODE_TYPES.TSTypeParameterDeclaration,range:a,loc:(0,pe.getLocFor)(a,this.ast),params:t.map(_=>this.convertChild(_))}}convertParameters(t){return t!=null&&t.length?t.map(r=>{var _;let a=this.convertChild(r);return a.decorators=((_=(0,Zi.getDecorators)(r))==null?void 0:_.map(p=>this.convertChild(p)))??[],a}):[]}convertChainExpression(t,r){let{child:a,isOptional:_}=(()=>t.type===J.AST_NODE_TYPES.MemberExpression?{child:t.object,isOptional:t.optional}:t.type===J.AST_NODE_TYPES.CallExpression?{child:t.callee,isOptional:t.optional}:{child:t.expression,isOptional:!1})(),p=(0,pe.isChildUnwrappableOptionalChain)(r,a);if(!p&&!_)return t;if(p&&(0,pe.isChainExpression)(a)){let d=a.expression;t.type===J.AST_NODE_TYPES.MemberExpression?t.object=d:t.type===J.AST_NODE_TYPES.CallExpression?t.callee=d:t.expression=d}return this.createNode(r,{type:J.AST_NODE_TYPES.ChainExpression,expression:t})}deeplyCopy(t){t.kind===_t.SyntaxKind.JSDocFunctionType&&Ne(this,Pe,"m",st).call(this,t,"JSDoc types can only be used inside documentation comments.");let r=`TS${E[t.kind]}`;if(this.options.errorOnUnknownASTType&&!J.AST_NODE_TYPES[r])throw new Error(`Unknown AST_NODE_TYPE: "${r}"`);let a=this.createNode(t,{type:r});"type"in t&&(a.typeAnnotation=t.type&&"kind"in t.type&&_t.isTypeNode(t.type)?this.convertTypeAnnotation(t.type,t):null),"typeArguments"in t&&(a.typeArguments=t.typeArguments&&"pos"in t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null,Ne(this,Pe,"m",oi).call(this,a,"typeParameters","typeArguments")),"typeParameters"in t&&(a.typeParameters=t.typeParameters&&"pos"in t.typeParameters?this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters):null);let _=(0,Zi.getDecorators)(t);_!=null&&_.length&&(a.decorators=_.map(d=>this.convertChild(d)));let p=new Set(["_children","decorators","end","flags","illegalDecorators","heritageClauses","locals","localSymbol","jsDoc","kind","modifierFlagsCache","modifiers","nextContainer","parent","pos","symbol","transformFlags","type","typeArguments","typeParameters"]);return Object.entries(t).filter(([d])=>!p.has(d)).forEach(([d,h])=>{Array.isArray(h)?a[d]=h.map(l=>this.convertChild(l)):h&&typeof h=="object"&&h.kind?a[d]=this.convertChild(h):a[d]=h}),a}convertJSXIdentifier(t){let r=this.createNode(t,{type:J.AST_NODE_TYPES.JSXIdentifier,name:t.getText()});return this.registerTSNodeInNodeMap(t,r),r}convertJSXNamespaceOrIdentifier(t){if(t.kind===_t.SyntaxKind.JsxNamespacedName){let _=this.createNode(t,{type:J.AST_NODE_TYPES.JSXNamespacedName,namespace:this.createNode(t.namespace,{type:J.AST_NODE_TYPES.JSXIdentifier,name:t.namespace.text}),name:this.createNode(t.name,{type:J.AST_NODE_TYPES.JSXIdentifier,name:t.name.text})});return this.registerTSNodeInNodeMap(t,_),_}let r=t.getText(),a=r.indexOf(":");if(a>0){let _=(0,pe.getRange)(t,this.ast),p=this.createNode(t,{type:J.AST_NODE_TYPES.JSXNamespacedName,namespace:this.createNode(t,{type:J.AST_NODE_TYPES.JSXIdentifier,name:r.slice(0,a),range:[_[0],_[0]+a]}),name:this.createNode(t,{type:J.AST_NODE_TYPES.JSXIdentifier,name:r.slice(a+1),range:[_[0]+a+1,_[1]]}),range:_});return this.registerTSNodeInNodeMap(t,p),p}return this.convertJSXIdentifier(t)}convertJSXTagName(t,r){let a;switch(t.kind){case E.PropertyAccessExpression:t.name.kind===E.PrivateIdentifier&&Ne(this,Pe,"m",st).call(this,t.name,"Non-private identifier expected."),a=this.createNode(t,{type:J.AST_NODE_TYPES.JSXMemberExpression,object:this.convertJSXTagName(t.expression,r),property:this.convertJSXIdentifier(t.name)});break;case E.ThisKeyword:case E.Identifier:default:return this.convertJSXNamespaceOrIdentifier(t)}return this.registerTSNodeInNodeMap(t,a),a}convertMethodSignature(t){return this.createNode(t,{type:J.AST_NODE_TYPES.TSMethodSignature,accessibility:(0,pe.getTSNodeAccessibility)(t),computed:(0,pe.isComputedProperty)(t.name),key:this.convertChild(t.name),kind:(()=>{switch(t.kind){case E.GetAccessor:return"get";case E.SetAccessor:return"set";case E.MethodSignature:return"method"}})(),optional:(0,pe.isOptional)(t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}convertAssertClasue(t){return t===void 0?[]:t.elements.map(r=>this.convertChild(r))}fixParentLocation(t,r){r[0]t.range[1]&&(t.range[1]=r[1],t.loc.end=(0,pe.getLineAndCharacterFor)(t.range[1],this.ast))}assertModuleSpecifier(t,r){var a;!r&&t.moduleSpecifier==null&&Ne(this,Pe,"m",br).call(this,t,"Module specifier must be a string literal."),t.moduleSpecifier&&((a=t.moduleSpecifier)==null?void 0:a.kind)!==E.StringLiteral&&Ne(this,Pe,"m",br).call(this,t.moduleSpecifier,"Module specifier must be a string literal.")}convertNode(t,r){var a,_,p,d,h;switch(t.kind){case E.SourceFile:return this.createNode(t,{type:J.AST_NODE_TYPES.Program,body:this.convertBodyExpressions(t.statements,t),comments:void 0,range:[t.getStart(this.ast),t.endOfFileToken.end],sourceType:t.externalModuleIndicator?"module":"script",tokens:void 0});case E.Block:return this.createNode(t,{type:J.AST_NODE_TYPES.BlockStatement,body:this.convertBodyExpressions(t.statements,t)});case E.Identifier:return(0,pe.isThisInTypeQuery)(t)?this.createNode(t,{type:J.AST_NODE_TYPES.ThisExpression}):this.createNode(t,{type:J.AST_NODE_TYPES.Identifier,decorators:[],name:t.text,optional:!1,typeAnnotation:void 0});case E.PrivateIdentifier:return this.createNode(t,{type:J.AST_NODE_TYPES.PrivateIdentifier,name:t.text.slice(1)});case E.WithStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.WithStatement,object:this.convertChild(t.expression),body:this.convertChild(t.statement)});case E.ReturnStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ReturnStatement,argument:this.convertChild(t.expression)});case E.LabeledStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.LabeledStatement,label:this.convertChild(t.label),body:this.convertChild(t.statement)});case E.ContinueStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ContinueStatement,label:this.convertChild(t.label)});case E.BreakStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.BreakStatement,label:this.convertChild(t.label)});case E.IfStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.IfStatement,test:this.convertChild(t.expression),consequent:this.convertChild(t.thenStatement),alternate:this.convertChild(t.elseStatement)});case E.SwitchStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.SwitchStatement,discriminant:this.convertChild(t.expression),cases:t.caseBlock.clauses.map(l=>this.convertChild(l))});case E.CaseClause:case E.DefaultClause:return this.createNode(t,{type:J.AST_NODE_TYPES.SwitchCase,test:t.kind===E.CaseClause?this.convertChild(t.expression):null,consequent:t.statements.map(l=>this.convertChild(l))});case E.ThrowStatement:return t.expression.end===t.expression.pos&&Ne(this,Pe,"m",br).call(this,t,"A throw statement must throw an expression."),this.createNode(t,{type:J.AST_NODE_TYPES.ThrowStatement,argument:this.convertChild(t.expression)});case E.TryStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.TryStatement,block:this.convertChild(t.tryBlock),handler:this.convertChild(t.catchClause),finalizer:this.convertChild(t.finallyBlock)});case E.CatchClause:return this.createNode(t,{type:J.AST_NODE_TYPES.CatchClause,param:t.variableDeclaration?this.convertBindingNameWithTypeAnnotation(t.variableDeclaration.name,t.variableDeclaration.type):null,body:this.convertChild(t.block)});case E.WhileStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.WhileStatement,test:this.convertChild(t.expression),body:this.convertChild(t.statement)});case E.DoStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.DoWhileStatement,test:this.convertChild(t.expression),body:this.convertChild(t.statement)});case E.ForStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ForStatement,init:this.convertChild(t.initializer),test:this.convertChild(t.condition),update:this.convertChild(t.incrementor),body:this.convertChild(t.statement)});case E.ForInStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ForInStatement,left:this.convertPattern(t.initializer),right:this.convertChild(t.expression),body:this.convertChild(t.statement)});case E.ForOfStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ForOfStatement,left:this.convertPattern(t.initializer),right:this.convertChild(t.expression),body:this.convertChild(t.statement),await:!!(t.awaitModifier&&t.awaitModifier.kind===E.AwaitKeyword)});case E.FunctionDeclaration:{let l=(0,pe.hasModifier)(E.DeclareKeyword,t),v=this.createNode(t,{type:l||!t.body?J.AST_NODE_TYPES.TSDeclareFunction:J.AST_NODE_TYPES.FunctionDeclaration,async:(0,pe.hasModifier)(E.AsyncKeyword,t),body:this.convertChild(t.body)||void 0,declare:l,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,v)}case E.VariableDeclaration:return this.createNode(t,{type:J.AST_NODE_TYPES.VariableDeclarator,definite:!!t.exclamationToken,id:this.convertBindingNameWithTypeAnnotation(t.name,t.type,t),init:this.convertChild(t.initializer)});case E.VariableStatement:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.VariableDeclaration,declarations:t.declarationList.declarations.map(v=>this.convertChild(v)),declare:(0,pe.hasModifier)(E.DeclareKeyword,t),kind:(0,pe.getDeclarationKind)(t.declarationList)});return l.declarations.length||Ne(this,Pe,"m",br).call(this,t,"A variable declaration list must have at least one variable declarator."),(l.kind==="using"||l.kind==="await using")&&t.declarationList.declarations.forEach((v,y)=>{l.declarations[y].init==null&&Ne(this,Pe,"m",st).call(this,v,`'${l.kind}' declarations must be initialized.`),l.declarations[y].id.type!==J.AST_NODE_TYPES.Identifier&&Ne(this,Pe,"m",st).call(this,v.name,`'${l.kind}' declarations may not have binding patterns.`)}),this.fixExports(t,l)}case E.VariableDeclarationList:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.VariableDeclaration,declarations:t.declarations.map(v=>this.convertChild(v)),declare:!1,kind:(0,pe.getDeclarationKind)(t)});return(l.kind==="using"||l.kind==="await using")&&t.declarations.forEach((v,y)=>{l.declarations[y].init!=null&&Ne(this,Pe,"m",st).call(this,v,`'${l.kind}' declarations may not be initialized in for statement.`),l.declarations[y].id.type!==J.AST_NODE_TYPES.Identifier&&Ne(this,Pe,"m",st).call(this,v.name,`'${l.kind}' declarations may not have binding patterns.`)}),l}case E.ExpressionStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ExpressionStatement,directive:void 0,expression:this.convertChild(t.expression)});case E.ThisKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.ThisExpression});case E.ArrayLiteralExpression:return this.allowPattern?this.createNode(t,{type:J.AST_NODE_TYPES.ArrayPattern,decorators:[],elements:t.elements.map(l=>this.convertPattern(l)),optional:!1,typeAnnotation:void 0}):this.createNode(t,{type:J.AST_NODE_TYPES.ArrayExpression,elements:t.elements.map(l=>this.convertChild(l))});case E.ObjectLiteralExpression:{if(this.allowPattern)return this.createNode(t,{type:J.AST_NODE_TYPES.ObjectPattern,decorators:[],optional:!1,properties:t.properties.map(v=>this.convertPattern(v)),typeAnnotation:void 0});let l=[];for(let v of t.properties)(v.kind===E.GetAccessor||v.kind===E.SetAccessor||v.kind===E.MethodDeclaration)&&!v.body&&Ne(this,Pe,"m",br).call(this,v.end-1,"'{' expected."),l.push(this.convertChild(v));return this.createNode(t,{type:J.AST_NODE_TYPES.ObjectExpression,properties:l})}case E.PropertyAssignment:{let{questionToken:l,exclamationToken:v}=t;return l&&Ne(this,Pe,"m",st).call(this,l,"A property assignment cannot have a question token."),v&&Ne(this,Pe,"m",st).call(this,v,"A property assignment cannot have an exclamation token."),this.createNode(t,{type:J.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:this.converter(t.initializer,t,this.allowPattern),computed:(0,pe.isComputedProperty)(t.name),method:!1,optional:!1,shorthand:!1,kind:"init"})}case E.ShorthandPropertyAssignment:{let{modifiers:l,questionToken:v,exclamationToken:y}=t;return l&&Ne(this,Pe,"m",st).call(this,l[0],"A shorthand property assignment cannot have modifiers."),v&&Ne(this,Pe,"m",st).call(this,v,"A shorthand property assignment cannot have a question token."),y&&Ne(this,Pe,"m",st).call(this,y,"A shorthand property assignment cannot have an exclamation token."),t.objectAssignmentInitializer?this.createNode(t,{type:J.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertPattern(t.name),optional:!1,right:this.convertChild(t.objectAssignmentInitializer),typeAnnotation:void 0}),computed:!1,method:!1,optional:!1,shorthand:!0,kind:"init"}):this.createNode(t,{type:J.AST_NODE_TYPES.Property,computed:!1,key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.convertChild(t.name)})}case E.ComputedPropertyName:return this.convertChild(t.expression);case E.PropertyDeclaration:{let l=(0,pe.hasModifier)(E.AbstractKeyword,t);l&&t.initializer&&Ne(this,Pe,"m",st).call(this,t.initializer,"Abstract property cannot have an initializer.");let v=(0,pe.hasModifier)(E.AccessorKeyword,t),y=(()=>v?l?J.AST_NODE_TYPES.TSAbstractAccessorProperty:J.AST_NODE_TYPES.AccessorProperty:l?J.AST_NODE_TYPES.TSAbstractPropertyDefinition:J.AST_NODE_TYPES.PropertyDefinition)(),C=this.convertChild(t.name);return this.createNode(t,{type:y,key:C,accessibility:(0,pe.getTSNodeAccessibility)(t),value:l?null:this.convertChild(t.initializer),computed:(0,pe.isComputedProperty)(t.name),static:(0,pe.hasModifier)(E.StaticKeyword,t),readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),decorators:((a=(0,Zi.getDecorators)(t))==null?void 0:a.map(S=>this.convertChild(S)))??[],declare:(0,pe.hasModifier)(E.DeclareKeyword,t),override:(0,pe.hasModifier)(E.OverrideKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t),optional:(C.type===J.AST_NODE_TYPES.Literal||t.name.kind===E.Identifier||t.name.kind===E.ComputedPropertyName||t.name.kind===E.PrivateIdentifier)&&!!t.questionToken,definite:!!t.exclamationToken})}case E.GetAccessor:case E.SetAccessor:if(t.parent.kind===E.InterfaceDeclaration||t.parent.kind===E.TypeLiteral)return this.convertMethodSignature(t);case E.MethodDeclaration:{let l=this.createNode(t,{type:t.body?J.AST_NODE_TYPES.FunctionExpression:J.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,id:null,generator:!!t.asteriskToken,expression:!1,async:(0,pe.hasModifier)(E.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,range:[t.parameters.pos-1,t.end],params:[],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});l.typeParameters&&this.fixParentLocation(l,l.typeParameters.range);let v;if(r.kind===E.ObjectLiteralExpression)l.params=t.parameters.map(y=>this.convertChild(y)),v=this.createNode(t,{type:J.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:l,computed:(0,pe.isComputedProperty)(t.name),optional:!!t.questionToken,method:t.kind===E.MethodDeclaration,shorthand:!1,kind:"init"});else{l.params=this.convertParameters(t.parameters);let y=(0,pe.hasModifier)(E.AbstractKeyword,t)?J.AST_NODE_TYPES.TSAbstractMethodDefinition:J.AST_NODE_TYPES.MethodDefinition;v=this.createNode(t,{type:y,accessibility:(0,pe.getTSNodeAccessibility)(t),computed:(0,pe.isComputedProperty)(t.name),decorators:((_=(0,Zi.getDecorators)(t))==null?void 0:_.map(C=>this.convertChild(C)))??[],key:this.convertChild(t.name),kind:"method",optional:!!t.questionToken,override:(0,pe.hasModifier)(E.OverrideKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t),value:l})}return t.kind===E.GetAccessor?v.kind="get":t.kind===E.SetAccessor?v.kind="set":!v.static&&t.name.kind===E.StringLiteral&&t.name.text==="constructor"&&v.type!==J.AST_NODE_TYPES.Property&&(v.kind="constructor"),v}case E.Constructor:{let l=(0,pe.getLastModifier)(t),v=(l&&(0,pe.findNextToken)(l,t,this.ast))??t.getFirstToken(),y=this.createNode(t,{type:t.body?J.AST_NODE_TYPES.FunctionExpression:J.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,async:!1,body:this.convertChild(t.body),declare:!1,expression:!1,generator:!1,id:null,params:this.convertParameters(t.parameters),range:[t.parameters.pos-1,t.end],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});y.typeParameters&&this.fixParentLocation(y,y.typeParameters.range);let C=this.createNode(t,{type:J.AST_NODE_TYPES.Identifier,decorators:[],name:"constructor",optional:!1,range:[v.getStart(this.ast),v.end],typeAnnotation:void 0}),S=(0,pe.hasModifier)(E.StaticKeyword,t);return this.createNode(t,{type:(0,pe.hasModifier)(E.AbstractKeyword,t)?J.AST_NODE_TYPES.TSAbstractMethodDefinition:J.AST_NODE_TYPES.MethodDefinition,accessibility:(0,pe.getTSNodeAccessibility)(t),computed:!1,decorators:[],optional:!1,key:C,kind:S?"method":"constructor",override:!1,static:S,value:y})}case E.FunctionExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.FunctionExpression,async:(0,pe.hasModifier)(E.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case E.SuperKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.Super});case E.ArrayBindingPattern:return this.createNode(t,{type:J.AST_NODE_TYPES.ArrayPattern,decorators:[],elements:t.elements.map(l=>this.convertPattern(l)),optional:!1,typeAnnotation:void 0});case E.OmittedExpression:return null;case E.ObjectBindingPattern:return this.createNode(t,{type:J.AST_NODE_TYPES.ObjectPattern,decorators:[],optional:!1,properties:t.elements.map(l=>this.convertPattern(l)),typeAnnotation:void 0});case E.BindingElement:{if(r.kind===E.ArrayBindingPattern){let v=this.convertChild(t.name,r);return t.initializer?this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:v,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}):t.dotDotDotToken?this.createNode(t,{type:J.AST_NODE_TYPES.RestElement,argument:v,decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):v}let l;return t.dotDotDotToken?l=this.createNode(t,{type:J.AST_NODE_TYPES.RestElement,argument:this.convertChild(t.propertyName??t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):l=this.createNode(t,{type:J.AST_NODE_TYPES.Property,key:this.convertChild(t.propertyName??t.name),value:this.convertChild(t.name),computed:!!(t.propertyName&&t.propertyName.kind===E.ComputedPropertyName),method:!1,optional:!1,shorthand:!t.propertyName,kind:"init"}),t.initializer&&(l.value=this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertChild(t.name),optional:!1,range:[t.name.getStart(this.ast),t.initializer.end],right:this.convertChild(t.initializer),typeAnnotation:void 0})),l}case E.ArrowFunction:return this.createNode(t,{type:J.AST_NODE_TYPES.ArrowFunctionExpression,generator:!1,id:null,params:this.convertParameters(t.parameters),body:this.convertChild(t.body),async:(0,pe.hasModifier)(E.AsyncKeyword,t),expression:t.body.kind!==E.Block,returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case E.YieldExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.YieldExpression,delegate:!!t.asteriskToken,argument:this.convertChild(t.expression)});case E.AwaitExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.AwaitExpression,argument:this.convertChild(t.expression)});case E.NoSubstitutionTemplateLiteral:return this.createNode(t,{type:J.AST_NODE_TYPES.TemplateLiteral,quasis:[this.createNode(t,{type:J.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-1),cooked:t.text},tail:!0})],expressions:[]});case E.TemplateExpression:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TemplateLiteral,quasis:[this.convertChild(t.head)],expressions:[]});return t.templateSpans.forEach(v=>{l.expressions.push(this.convertChild(v.expression)),l.quasis.push(this.convertChild(v.literal))}),l}case E.TaggedTemplateExpression:return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.TaggedTemplateExpression,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),tag:this.convertChild(t.tag),quasi:this.convertChild(t.template)},"typeParameters","typeArguments"));case E.TemplateHead:case E.TemplateMiddle:case E.TemplateTail:{let l=t.kind===E.TemplateTail;return this.createNode(t,{type:J.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-(l?1:2)),cooked:t.text},tail:l})}case E.SpreadAssignment:case E.SpreadElement:return this.allowPattern?this.createNode(t,{type:J.AST_NODE_TYPES.RestElement,argument:this.convertPattern(t.expression),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):this.createNode(t,{type:J.AST_NODE_TYPES.SpreadElement,argument:this.convertChild(t.expression)});case E.Parameter:{let l,v;return t.dotDotDotToken?l=v=this.createNode(t,{type:J.AST_NODE_TYPES.RestElement,argument:this.convertChild(t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):t.initializer?(l=this.convertChild(t.name),v=this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:l,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}),(0,Zi.getModifiers)(t)&&(v.range[0]=l.range[0],v.loc=(0,pe.getLocFor)(v.range,this.ast))):l=v=this.convertChild(t.name,r),t.type&&(l.typeAnnotation=this.convertTypeAnnotation(t.type,t),this.fixParentLocation(l,l.typeAnnotation.range)),t.questionToken&&(t.questionToken.end>l.range[1]&&(l.range[1]=t.questionToken.end,l.loc.end=(0,pe.getLineAndCharacterFor)(l.range[1],this.ast)),l.optional=!0),(0,Zi.getModifiers)(t)?this.createNode(t,{type:J.AST_NODE_TYPES.TSParameterProperty,accessibility:(0,pe.getTSNodeAccessibility)(t),decorators:[],override:(0,pe.hasModifier)(E.OverrideKeyword,t),parameter:v,readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t)}):v}case E.ClassDeclaration:!t.name&&(!(0,pe.hasModifier)(_t.SyntaxKind.ExportKeyword,t)||!(0,pe.hasModifier)(_t.SyntaxKind.DefaultKeyword,t))&&Ne(this,Pe,"m",br).call(this,t,"A class declaration without the 'default' modifier must have a name.");case E.ClassExpression:{let l=t.heritageClauses??[],v=t.kind===E.ClassDeclaration?J.AST_NODE_TYPES.ClassDeclaration:J.AST_NODE_TYPES.ClassExpression,y,C;for(let k of l){let{token:L,types:G}=k;G.length===0&&Ne(this,Pe,"m",br).call(this,k,`'${_t.tokenToString(L)}' list cannot be empty.`),L===E.ExtendsKeyword?(y&&Ne(this,Pe,"m",br).call(this,k,"'extends' clause already seen."),C&&Ne(this,Pe,"m",br).call(this,k,"'extends' clause must precede 'implements' clause."),G.length>1&&Ne(this,Pe,"m",br).call(this,G[1],"Classes can only extend a single class."),y??(y=k)):L===E.ImplementsKeyword&&(C&&Ne(this,Pe,"m",br).call(this,k,"'implements' clause already seen."),C??(C=k))}let S=this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:v,abstract:(0,pe.hasModifier)(E.AbstractKeyword,t),body:this.createNode(t,{type:J.AST_NODE_TYPES.ClassBody,body:t.members.filter(pe.isESTreeClassMember).map(k=>this.convertChild(k)),range:[t.members.pos-1,t.end]}),declare:(0,pe.hasModifier)(E.DeclareKeyword,t),decorators:((p=(0,Zi.getDecorators)(t))==null?void 0:p.map(k=>this.convertChild(k)))??[],id:this.convertChild(t.name),implements:(C==null?void 0:C.types.map(k=>this.convertChild(k)))??[],superClass:y!=null&&y.types[0]?this.convertChild(y.types[0].expression):null,superTypeArguments:void 0,typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)},"superTypeParameters","superTypeArguments"));return(d=y==null?void 0:y.types[0])!=null&&d.typeArguments&&(S.superTypeArguments=this.convertTypeArgumentsToTypeParameterInstantiation(y.types[0].typeArguments,y.types[0])),this.fixExports(t,S)}case E.ModuleBlock:return this.createNode(t,{type:J.AST_NODE_TYPES.TSModuleBlock,body:this.convertBodyExpressions(t.statements,t)});case E.ImportDeclaration:{this.assertModuleSpecifier(t,!1);let l=this.createNode(t,{type:J.AST_NODE_TYPES.ImportDeclaration,source:this.convertChild(t.moduleSpecifier),specifiers:[],importKind:"value",assertions:this.convertAssertClasue(t.assertClause)});if(t.importClause&&(t.importClause.isTypeOnly&&(l.importKind="type"),t.importClause.name&&l.specifiers.push(this.convertChild(t.importClause)),t.importClause.namedBindings))switch(t.importClause.namedBindings.kind){case E.NamespaceImport:l.specifiers.push(this.convertChild(t.importClause.namedBindings));break;case E.NamedImports:l.specifiers=l.specifiers.concat(t.importClause.namedBindings.elements.map(v=>this.convertChild(v)));break}return l}case E.NamespaceImport:return this.createNode(t,{type:J.AST_NODE_TYPES.ImportNamespaceSpecifier,local:this.convertChild(t.name)});case E.ImportSpecifier:return this.createNode(t,{type:J.AST_NODE_TYPES.ImportSpecifier,local:this.convertChild(t.name),imported:this.convertChild(t.propertyName??t.name),importKind:t.isTypeOnly?"type":"value"});case E.ImportClause:{let l=this.convertChild(t.name);return this.createNode(t,{type:J.AST_NODE_TYPES.ImportDefaultSpecifier,local:l,range:l.range})}case E.ExportDeclaration:return((h=t.exportClause)==null?void 0:h.kind)===E.NamedExports?(this.assertModuleSpecifier(t,!0),this.createNode(t,{type:J.AST_NODE_TYPES.ExportNamedDeclaration,source:this.convertChild(t.moduleSpecifier),specifiers:t.exportClause.elements.map(l=>this.convertChild(l)),exportKind:t.isTypeOnly?"type":"value",declaration:null,assertions:this.convertAssertClasue(t.assertClause)})):(this.assertModuleSpecifier(t,!1),this.createNode(t,{type:J.AST_NODE_TYPES.ExportAllDeclaration,source:this.convertChild(t.moduleSpecifier),exportKind:t.isTypeOnly?"type":"value",exported:t.exportClause&&t.exportClause.kind===E.NamespaceExport?this.convertChild(t.exportClause.name):null,assertions:this.convertAssertClasue(t.assertClause)}));case E.ExportSpecifier:return this.createNode(t,{type:J.AST_NODE_TYPES.ExportSpecifier,local:this.convertChild(t.propertyName??t.name),exported:this.convertChild(t.name),exportKind:t.isTypeOnly?"type":"value"});case E.ExportAssignment:return t.isExportEquals?this.createNode(t,{type:J.AST_NODE_TYPES.TSExportAssignment,expression:this.convertChild(t.expression)}):this.createNode(t,{type:J.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:this.convertChild(t.expression),exportKind:"value"});case E.PrefixUnaryExpression:case E.PostfixUnaryExpression:{let l=(0,pe.getTextForTokenKind)(t.operator);return l==="++"||l==="--"?this.createNode(t,{type:J.AST_NODE_TYPES.UpdateExpression,operator:l,prefix:t.kind===E.PrefixUnaryExpression,argument:this.convertChild(t.operand)}):this.createNode(t,{type:J.AST_NODE_TYPES.UnaryExpression,operator:l,prefix:t.kind===E.PrefixUnaryExpression,argument:this.convertChild(t.operand)})}case E.DeleteExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.UnaryExpression,operator:"delete",prefix:!0,argument:this.convertChild(t.expression)});case E.VoidExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.UnaryExpression,operator:"void",prefix:!0,argument:this.convertChild(t.expression)});case E.TypeOfExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.UnaryExpression,operator:"typeof",prefix:!0,argument:this.convertChild(t.expression)});case E.TypeOperator:return this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeOperator,operator:(0,pe.getTextForTokenKind)(t.operator),typeAnnotation:this.convertChild(t.type)});case E.BinaryExpression:{if((0,pe.isComma)(t.operatorToken)){let v=this.createNode(t,{type:J.AST_NODE_TYPES.SequenceExpression,expressions:[]}),y=this.convertChild(t.left);return y.type===J.AST_NODE_TYPES.SequenceExpression&&t.left.kind!==E.ParenthesizedExpression?v.expressions=v.expressions.concat(y.expressions):v.expressions.push(y),v.expressions.push(this.convertChild(t.right)),v}let l=(0,pe.getBinaryExpressionType)(t.operatorToken);return this.allowPattern&&l.type===J.AST_NODE_TYPES.AssignmentExpression?this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertPattern(t.left,t),optional:!1,right:this.convertChild(t.right),typeAnnotation:void 0}):this.createNode(t,{...l,left:this.converter(t.left,t,l.type===J.AST_NODE_TYPES.AssignmentExpression),right:this.convertChild(t.right)})}case E.PropertyAccessExpression:{let l=this.convertChild(t.expression),v=this.convertChild(t.name),y=!1,C=this.createNode(t,{type:J.AST_NODE_TYPES.MemberExpression,object:l,property:v,computed:y,optional:t.questionDotToken!==void 0});return this.convertChainExpression(C,t)}case E.ElementAccessExpression:{let l=this.convertChild(t.expression),v=this.convertChild(t.argumentExpression),y=!0,C=this.createNode(t,{type:J.AST_NODE_TYPES.MemberExpression,object:l,property:v,computed:y,optional:t.questionDotToken!==void 0});return this.convertChainExpression(C,t)}case E.CallExpression:{if(t.expression.kind===E.ImportKeyword)return t.arguments.length!==1&&t.arguments.length!==2&&Ne(this,Pe,"m",br).call(this,t.arguments[2]??t,"Dynamic import requires exactly one or two arguments."),this.createNode(t,{type:J.AST_NODE_TYPES.ImportExpression,source:this.convertChild(t.arguments[0]),attributes:t.arguments[1]?this.convertChild(t.arguments[1]):null});let l=this.convertChild(t.expression),v=t.arguments.map(S=>this.convertChild(S)),y=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),C=this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.CallExpression,callee:l,arguments:v,optional:t.questionDotToken!==void 0,typeArguments:y},"typeParameters","typeArguments"));return this.convertChainExpression(C,t)}case E.NewExpression:{let l=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t);return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.NewExpression,arguments:t.arguments?t.arguments.map(v=>this.convertChild(v)):[],callee:this.convertChild(t.expression),typeArguments:l},"typeParameters","typeArguments"))}case E.ConditionalExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.ConditionalExpression,test:this.convertChild(t.condition),consequent:this.convertChild(t.whenTrue),alternate:this.convertChild(t.whenFalse)});case E.MetaProperty:return this.createNode(t,{type:J.AST_NODE_TYPES.MetaProperty,meta:this.createNode(t.getFirstToken(),{type:J.AST_NODE_TYPES.Identifier,decorators:[],name:(0,pe.getTextForTokenKind)(t.keywordToken),optional:!1,typeAnnotation:void 0}),property:this.convertChild(t.name)});case E.Decorator:return this.createNode(t,{type:J.AST_NODE_TYPES.Decorator,expression:this.convertChild(t.expression)});case E.StringLiteral:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:r.kind===E.JsxAttribute?(0,pe.unescapeStringLiteralText)(t.text):t.text,raw:t.getText()});case E.NumericLiteral:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:Number(t.text),raw:t.getText()});case E.BigIntLiteral:{let l=(0,pe.getRange)(t,this.ast),v=this.ast.text.slice(l[0],l[1]),y=v.slice(0,-1).replace(/_/g,""),C=typeof BigInt<"u"?BigInt(y):null;return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,raw:v,value:C,bigint:C==null?y:String(C),range:l})}case E.RegularExpressionLiteral:{let l=t.text.slice(1,t.text.lastIndexOf("/")),v=t.text.slice(t.text.lastIndexOf("/")+1),y=null;try{y=new RegExp(l,v)}catch{}return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:y,raw:t.text,regex:{pattern:l,flags:v}})}case E.TrueKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:!0,raw:"true"});case E.FalseKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:!1,raw:"false"});case E.NullKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:null,raw:"null"});case E.EmptyStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.EmptyStatement});case E.DebuggerStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.DebuggerStatement});case E.JsxElement:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXElement,openingElement:this.convertChild(t.openingElement),closingElement:this.convertChild(t.closingElement),children:t.children.map(l=>this.convertChild(l))});case E.JsxFragment:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXFragment,openingFragment:this.convertChild(t.openingFragment),closingFragment:this.convertChild(t.closingFragment),children:t.children.map(l=>this.convertChild(l))});case E.JsxSelfClosingElement:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXElement,openingElement:this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.JSXOpeningElement,typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):void 0,selfClosing:!0,name:this.convertJSXTagName(t.tagName,t),attributes:t.attributes.properties.map(l=>this.convertChild(l)),range:(0,pe.getRange)(t,this.ast)},"typeParameters","typeArguments")),closingElement:null,children:[]});case E.JsxOpeningElement:return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.JSXOpeningElement,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),selfClosing:!1,name:this.convertJSXTagName(t.tagName,t),attributes:t.attributes.properties.map(l=>this.convertChild(l))},"typeParameters","typeArguments"));case E.JsxClosingElement:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXClosingElement,name:this.convertJSXTagName(t.tagName,t)});case E.JsxOpeningFragment:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXOpeningFragment});case E.JsxClosingFragment:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXClosingFragment});case E.JsxExpression:{let l=t.expression?this.convertChild(t.expression):this.createNode(t,{type:J.AST_NODE_TYPES.JSXEmptyExpression,range:[t.getStart(this.ast)+1,t.getEnd()-1]});return t.dotDotDotToken?this.createNode(t,{type:J.AST_NODE_TYPES.JSXSpreadChild,expression:l}):this.createNode(t,{type:J.AST_NODE_TYPES.JSXExpressionContainer,expression:l})}case E.JsxAttribute:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXAttribute,name:this.convertJSXNamespaceOrIdentifier(t.name),value:this.convertChild(t.initializer)});case E.JsxText:{let l=t.getFullStart(),v=t.getEnd(),y=this.ast.text.slice(l,v);return this.createNode(t,{type:J.AST_NODE_TYPES.JSXText,value:(0,pe.unescapeStringLiteralText)(y),raw:y,range:[l,v]})}case E.JsxSpreadAttribute:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXSpreadAttribute,argument:this.convertChild(t.expression)});case E.QualifiedName:return this.createNode(t,{type:J.AST_NODE_TYPES.TSQualifiedName,left:this.convertChild(t.left),right:this.convertChild(t.right)});case E.TypeReference:return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.TSTypeReference,typeName:this.convertChild(t.typeName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"));case E.TypeParameter:return this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeParameter,name:this.convertChild(t.name),constraint:t.constraint&&this.convertChild(t.constraint),default:t.default?this.convertChild(t.default):void 0,in:(0,pe.hasModifier)(E.InKeyword,t),out:(0,pe.hasModifier)(E.OutKeyword,t),const:(0,pe.hasModifier)(E.ConstKeyword,t)});case E.ThisType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSThisType});case E.AnyKeyword:case E.BigIntKeyword:case E.BooleanKeyword:case E.NeverKeyword:case E.NumberKeyword:case E.ObjectKeyword:case E.StringKeyword:case E.SymbolKeyword:case E.UnknownKeyword:case E.VoidKeyword:case E.UndefinedKeyword:case E.IntrinsicKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES[`TS${E[t.kind]}`]});case E.NonNullExpression:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSNonNullExpression,expression:this.convertChild(t.expression)});return this.convertChainExpression(l,t)}case E.TypeLiteral:return this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeLiteral,members:t.members.map(l=>this.convertChild(l))});case E.ArrayType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSArrayType,elementType:this.convertChild(t.elementType)});case E.IndexedAccessType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSIndexedAccessType,objectType:this.convertChild(t.objectType),indexType:this.convertChild(t.indexType)});case E.ConditionalType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSConditionalType,checkType:this.convertChild(t.checkType),extendsType:this.convertChild(t.extendsType),trueType:this.convertChild(t.trueType),falseType:this.convertChild(t.falseType)});case E.TypeQuery:return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.TSTypeQuery,exprName:this.convertChild(t.exprName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"));case E.MappedType:return t.members&&t.members.length>0&&Ne(this,Pe,"m",br).call(this,t.members[0],"A mapped type may not declare properties or methods."),this.createNode(t,{type:J.AST_NODE_TYPES.TSMappedType,nameType:this.convertChild(t.nameType)??null,optional:t.questionToken&&(t.questionToken.kind===E.QuestionToken||(0,pe.getTextForTokenKind)(t.questionToken.kind)),readonly:t.readonlyToken&&(t.readonlyToken.kind===E.ReadonlyKeyword||(0,pe.getTextForTokenKind)(t.readonlyToken.kind)),typeAnnotation:t.type&&this.convertChild(t.type),typeParameter:this.convertChild(t.typeParameter)});case E.ParenthesizedExpression:return this.convertChild(t.expression,r);case E.TypeAliasDeclaration:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeAliasDeclaration,declare:(0,pe.hasModifier)(E.DeclareKeyword,t),id:this.convertChild(t.name),typeAnnotation:this.convertChild(t.type),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,l)}case E.MethodSignature:return this.convertMethodSignature(t);case E.PropertySignature:{let{initializer:l}=t;return l&&Ne(this,Pe,"m",st).call(this,l,"A property signature cannot have an initializer."),this.createNode(t,{type:J.AST_NODE_TYPES.TSPropertySignature,accessibility:(0,pe.getTSNodeAccessibility)(t),computed:(0,pe.isComputedProperty)(t.name),key:this.convertChild(t.name),optional:(0,pe.isOptional)(t),readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)})}case E.IndexSignature:return this.createNode(t,{type:J.AST_NODE_TYPES.TSIndexSignature,accessibility:(0,pe.getTSNodeAccessibility)(t),parameters:t.parameters.map(l=>this.convertChild(l)),readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)});case E.ConstructorType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSConstructorType,abstract:(0,pe.hasModifier)(E.AbstractKeyword,t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case E.FunctionType:{let{modifiers:l}=t;l&&Ne(this,Pe,"m",st).call(this,l[0],"A function type cannot have modifiers.")}case E.ConstructSignature:case E.CallSignature:{let l=t.kind===E.ConstructSignature?J.AST_NODE_TYPES.TSConstructSignatureDeclaration:t.kind===E.CallSignature?J.AST_NODE_TYPES.TSCallSignatureDeclaration:J.AST_NODE_TYPES.TSFunctionType;return this.createNode(t,{type:l,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}case E.ExpressionWithTypeArguments:{let l=r.kind,v=l===E.InterfaceDeclaration?J.AST_NODE_TYPES.TSInterfaceHeritage:l===E.HeritageClause?J.AST_NODE_TYPES.TSClassImplements:J.AST_NODE_TYPES.TSInstantiationExpression;return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:v,expression:this.convertChild(t.expression),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"))}case E.InterfaceDeclaration:{let l=t.heritageClauses??[],v=[];for(let C of l){C.token!==E.ExtendsKeyword&&Ne(this,Pe,"m",st).call(this,C,C.token===E.ImplementsKeyword?"Interface declaration cannot have 'implements' clause.":"Unexpected token.");for(let S of C.types)v.push(this.convertChild(S,t))}let y=this.createNode(t,{type:J.AST_NODE_TYPES.TSInterfaceDeclaration,body:this.createNode(t,{type:J.AST_NODE_TYPES.TSInterfaceBody,body:t.members.map(C=>this.convertChild(C)),range:[t.members.pos-1,t.end]}),declare:(0,pe.hasModifier)(E.DeclareKeyword,t),extends:v,id:this.convertChild(t.name),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,y)}case E.TypePredicate:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSTypePredicate,asserts:t.assertsModifier!==void 0,parameterName:this.convertChild(t.parameterName),typeAnnotation:null});return t.type&&(l.typeAnnotation=this.convertTypeAnnotation(t.type,t),l.typeAnnotation.loc=l.typeAnnotation.typeAnnotation.loc,l.typeAnnotation.range=l.typeAnnotation.typeAnnotation.range),l}case E.ImportType:{let l=(0,pe.getRange)(t,this.ast);if(t.isTypeOf){let y=(0,pe.findNextToken)(t.getFirstToken(),t,this.ast);l[0]=y.getStart(this.ast)}let v=this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.TSImportType,argument:this.convertChild(t.argument),qualifier:this.convertChild(t.qualifier),typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null,range:l},"typeParameters","typeArguments"));return t.isTypeOf?this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeQuery,exprName:v,typeArguments:void 0,typeParameters:void 0}):v}case E.EnumDeclaration:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSEnumDeclaration,const:(0,pe.hasModifier)(E.ConstKeyword,t),declare:(0,pe.hasModifier)(E.DeclareKeyword,t),id:this.convertChild(t.name),members:t.members.map(v=>this.convertChild(v))});return this.fixExports(t,l)}case E.EnumMember:return this.createNode(t,{type:J.AST_NODE_TYPES.TSEnumMember,computed:t.name.kind===_t.SyntaxKind.ComputedPropertyName,id:this.convertChild(t.name),initializer:t.initializer&&this.convertChild(t.initializer)});case E.ModuleDeclaration:{let l=(0,pe.hasModifier)(E.DeclareKeyword,t),v=this.createNode(t,{type:J.AST_NODE_TYPES.TSModuleDeclaration,...(()=>{if(t.flags&_t.NodeFlags.GlobalAugmentation){let C=this.convertChild(t.name),S=this.convertChild(t.body);return(S==null||S.type===J.AST_NODE_TYPES.TSModuleDeclaration)&&Ne(this,Pe,"m",br).call(this,t.body??t,"Expected a valid module body"),C.type!==J.AST_NODE_TYPES.Identifier&&Ne(this,Pe,"m",br).call(this,t.name,"global module augmentation must have an Identifier id"),{kind:"global",body:S,declare:!1,global:!1,id:C}}if(!(t.flags&_t.NodeFlags.Namespace)){let C=this.convertChild(t.body);return{kind:"module",...C!=null?{body:C}:{},declare:!1,global:!1,id:this.convertChild(t.name)}}t.body==null&&Ne(this,Pe,"m",br).call(this,t,"Expected a module body"),t.name.kind!==_t.SyntaxKind.Identifier&&Ne(this,Pe,"m",br).call(this,t.name,"`namespace`s must have an Identifier id");let y=this.createNode(t.name,{decorators:[],name:t.name.text,optional:!1,range:[t.name.getStart(this.ast),t.name.getEnd()],type:J.AST_NODE_TYPES.Identifier,typeAnnotation:void 0});for(;t.body&&_t.isModuleDeclaration(t.body)&&t.body.name;){t=t.body,l||(l=(0,pe.hasModifier)(E.DeclareKeyword,t));let C=t.name,S=this.createNode(C,{decorators:[],name:C.text,optional:!1,range:[C.getStart(this.ast),C.getEnd()],type:J.AST_NODE_TYPES.Identifier,typeAnnotation:void 0});y=this.createNode(C,{left:y,right:S,range:[y.range[0],S.range[1]],type:J.AST_NODE_TYPES.TSQualifiedName})}return{kind:"namespace",body:this.convertChild(t.body),declare:!1,global:!1,id:y}})()});return v.declare=l,t.flags&_t.NodeFlags.GlobalAugmentation&&(v.global=!0),this.fixExports(t,v)}case E.ParenthesizedType:return this.convertChild(t.type);case E.UnionType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSUnionType,types:t.types.map(l=>this.convertChild(l))});case E.IntersectionType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSIntersectionType,types:t.types.map(l=>this.convertChild(l))});case E.AsExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.TSAsExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});case E.InferType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSInferType,typeParameter:this.convertChild(t.typeParameter)});case E.LiteralType:return t.literal.kind===E.NullKeyword?this.createNode(t.literal,{type:J.AST_NODE_TYPES.TSNullKeyword}):this.createNode(t,{type:J.AST_NODE_TYPES.TSLiteralType,literal:this.convertChild(t.literal)});case E.TypeAssertionExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeAssertion,typeAnnotation:this.convertChild(t.type),expression:this.convertChild(t.expression)});case E.ImportEqualsDeclaration:return this.fixExports(t,this.createNode(t,{type:J.AST_NODE_TYPES.TSImportEqualsDeclaration,id:this.convertChild(t.name),importKind:t.isTypeOnly?"type":"value",moduleReference:this.convertChild(t.moduleReference)}));case E.ExternalModuleReference:return this.createNode(t,{type:J.AST_NODE_TYPES.TSExternalModuleReference,expression:this.convertChild(t.expression)});case E.NamespaceExportDeclaration:return this.createNode(t,{type:J.AST_NODE_TYPES.TSNamespaceExportDeclaration,id:this.convertChild(t.name)});case E.AbstractKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.TSAbstractKeyword});case E.TupleType:{let l="elementTypes"in t?t.elementTypes.map(v=>this.convertChild(v)):t.elements.map(v=>this.convertChild(v));return this.createNode(t,{type:J.AST_NODE_TYPES.TSTupleType,elementTypes:l})}case E.NamedTupleMember:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSNamedTupleMember,elementType:this.convertChild(t.type,t),label:this.convertChild(t.name,t),optional:t.questionToken!=null});return t.dotDotDotToken?(l.range[0]=l.label.range[0],l.loc.start=l.label.loc.start,this.createNode(t,{type:J.AST_NODE_TYPES.TSRestType,typeAnnotation:l})):l}case E.OptionalType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSOptionalType,typeAnnotation:this.convertChild(t.type)});case E.RestType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSRestType,typeAnnotation:this.convertChild(t.type)});case E.TemplateLiteralType:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSTemplateLiteralType,quasis:[this.convertChild(t.head)],types:[]});return t.templateSpans.forEach(v=>{l.types.push(this.convertChild(v.type)),l.quasis.push(this.convertChild(v.literal))}),l}case E.ClassStaticBlockDeclaration:return this.createNode(t,{type:J.AST_NODE_TYPES.StaticBlock,body:this.convertBodyExpressions(t.body.statements,t)});case E.AssertEntry:return this.createNode(t,{type:J.AST_NODE_TYPES.ImportAttribute,key:this.convertChild(t.name),value:this.convertChild(t.value)});case E.SatisfiesExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.TSSatisfiesExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});default:return this.deeplyCopy(t)}}};yn.Converter=K6;Pe=new WeakSet,aw=function(t){if(!this.options.allowInvalidAST){(0,pe.nodeHasIllegalDecorators)(t)&&Ne(this,Pe,"m",st).call(this,t.illegalDecorators[0],"Decorators are not valid here.");for(let r of(0,Zi.getDecorators)(t,!0)??[])(0,pe.nodeCanBeDecorated)(t)||(_t.isMethodDeclaration(t)&&!(0,pe.nodeIsPresent)(t.body)?Ne(this,Pe,"m",st).call(this,r,"A decorator can only decorate a method implementation, not an overload."):Ne(this,Pe,"m",st).call(this,r,"Decorators are not valid here."));for(let r of(0,Zi.getModifiers)(t,!0)??[]){if(r.kind!==E.ReadonlyKeyword&&((t.kind===E.PropertySignature||t.kind===E.MethodSignature)&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on a type member`),t.kind===E.IndexSignature&&(r.kind!==E.StaticKeyword||!_t.isClassLike(t.parent))&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on an index signature`)),r.kind!==E.InKeyword&&r.kind!==E.OutKeyword&&r.kind!==E.ConstKeyword&&t.kind===E.TypeParameter&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on a type parameter`),(r.kind===E.InKeyword||r.kind===E.OutKeyword)&&(t.kind!==E.TypeParameter||!(_t.isInterfaceDeclaration(t.parent)||_t.isClassLike(t.parent)||_t.isTypeAliasDeclaration(t.parent)))&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`),r.kind===E.ReadonlyKeyword&&t.kind!==E.PropertyDeclaration&&t.kind!==E.PropertySignature&&t.kind!==E.IndexSignature&&t.kind!==E.Parameter&&Ne(this,Pe,"m",st).call(this,r,"'readonly' modifier can only appear on a property declaration or index signature."),r.kind===E.DeclareKeyword&&_t.isClassLike(t.parent)&&!_t.isPropertyDeclaration(t)&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on class elements of this kind.`),r.kind===E.DeclareKeyword&&_t.isVariableStatement(t)){let a=(0,pe.getDeclarationKind)(t.declarationList);(a==="using"||a==="await using")&&Ne(this,Pe,"m",st).call(this,r,`'declare' modifier cannot appear on a '${a}' declaration.`)}if(r.kind===E.AbstractKeyword&&t.kind!==E.ClassDeclaration&&t.kind!==E.ConstructorType&&t.kind!==E.MethodDeclaration&&t.kind!==E.PropertyDeclaration&&t.kind!==E.GetAccessor&&t.kind!==E.SetAccessor&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier can only appear on a class, method, or property declaration.`),(r.kind===E.StaticKeyword||r.kind===E.PublicKeyword||r.kind===E.ProtectedKeyword||r.kind===E.PrivateKeyword)&&(t.parent.kind===E.ModuleBlock||t.parent.kind===E.SourceFile)&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on a module or namespace element.`),r.kind===E.AccessorKeyword&&t.kind!==E.PropertyDeclaration&&Ne(this,Pe,"m",st).call(this,r,"'accessor' modifier can only appear on a property declaration."),r.kind===E.AsyncKeyword&&t.kind!==E.MethodDeclaration&&t.kind!==E.FunctionDeclaration&&t.kind!==E.FunctionExpression&&t.kind!==E.ArrowFunction&&Ne(this,Pe,"m",st).call(this,r,"'async' modifier cannot be used here."),t.kind===E.Parameter&&(r.kind===E.StaticKeyword||r.kind===E.ExportKeyword||r.kind===E.DeclareKeyword||r.kind===E.AsyncKeyword)&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on a parameter.`),t.kind===E.Parameter&&(r.kind===E.PublicKeyword||r.kind===E.PrivateKeyword||r.kind===E.ProtectedKeyword||r.kind===E.ReadonlyKeyword||r.kind===E.OverrideKeyword)){let a=(0,pe.getContainingFunction)(t);a.kind===E.Constructor&&(0,pe.nodeIsPresent)(a.body)||Ne(this,Pe,"m",st).call(this,r,"A parameter property is only allowed in a constructor implementation.")}}}},br=function(t,r){this.options.allowInvalidAST||Ne(this,Pe,"m",st).call(this,t,r)},oi=function(t,r,a){let _=!1;return Object.defineProperty(t,r,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>t[a]:()=>(_||((void 0)(`The '${r}' property is deprecated on ${t.type} nodes. Use '${a}' instead. See https://typescript-eslint.io/linting/troubleshooting#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`,"DeprecationWarning"),_=!0),t[a]),set(p){Object.defineProperty(t,r,{enumerable:!0,writable:!0,value:p})}}),t},st=function(t,r){let a,_;throw typeof t=="number"?a=_=t:(a=t.getStart(this.ast),_=t.getEnd()),(0,pe.createError)(r,this.ast,a,_)}});var Zw=ut((CH,Kw)=>{"use strict";var EU=Object.create,Vm=Object.defineProperty,AU=Object.getOwnPropertyDescriptor,kU=Object.getOwnPropertyNames,DU=Object.getPrototypeOf,PU=Object.prototype.hasOwnProperty,IU=(e,t)=>{for(var r in t)Vm(e,r,{get:t[r],enumerable:!0})},cw=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let _ of kU(t))!PU.call(e,_)&&_!==r&&Vm(e,_,{get:()=>t[_],enumerable:!(a=AU(t,_))||a.enumerable});return e},Pr=(e,t,r)=>(r=e!=null?EU(DU(e)):{},cw(t||!e||!e.__esModule?Vm(r,"default",{value:e,enumerable:!0}):r,e)),NU=e=>cw(Vm({},"__esModule",{value:!0}),e),lw={};IU(lw,{forEachComment:()=>MU,forEachToken:()=>uw,getCallSignaturesOfType:()=>tb,getPropertyOfType:()=>gb,getWellKnownSymbolPropertyOfType:()=>Kz,hasDecorators:()=>Fq,hasExpressionInitializer:()=>Nw,hasInitializer:()=>Bq,hasJSDoc:()=>Uq,hasModifiers:()=>qq,hasType:()=>zq,hasTypeArguments:()=>Wq,includesModifier:()=>RU,intersectionTypeParts:()=>nW,isAbstractKeyword:()=>jU,isAccessExpression:()=>Aq,isAccessibilityModifier:()=>sb,isAccessorDeclaration:()=>_b,isAccessorKeyword:()=>mw,isAnyKeyword:()=>FU,isArrayBindingElement:()=>kq,isArrayBindingOrAssignmentPattern:()=>Aw,isAssertKeyword:()=>BU,isAssertsKeyword:()=>UU,isAssignmentKind:()=>hz,isAssignmentPattern:()=>Dq,isAsyncKeyword:()=>qU,isAwaitKeyword:()=>zU,isBigIntKeyword:()=>WU,isBigIntLiteralType:()=>Vz,isBindingOrAssignmentElementRestIndicator:()=>Pq,isBindingOrAssignmentElementTarget:()=>Iq,isBindingOrAssignmentPattern:()=>kw,isBindingPattern:()=>cb,isBlockLike:()=>Nq,isBooleanKeyword:()=>VU,isBooleanLiteral:()=>Dw,isBooleanLiteralType:()=>hb,isClassLikeDeclaration:()=>Hm,isClassMemberModifier:()=>Oq,isColonToken:()=>HU,isCompilerOptionEnabled:()=>ja,isConditionalType:()=>Oz,isConstAssertionExpression:()=>Lw,isConstKeyword:()=>GU,isDeclarationName:()=>Pw,isDeclarationWithTypeParameterChildren:()=>Iw,isDeclarationWithTypeParameters:()=>Mq,isDeclareKeyword:()=>XU,isDefaultKeyword:()=>$U,isDestructuringPattern:()=>Lq,isDotToken:()=>QU,isEndOfFileToken:()=>hw,isEntityNameExpression:()=>hu,isEntityNameOrEntityNameExpression:()=>Jq,isEnumType:()=>Mz,isEqualsGreaterThanToken:()=>YU,isEqualsToken:()=>KU,isEvolvingArrayType:()=>zz,isExclamationToken:()=>ZU,isExportKeyword:()=>eq,isFalseKeyword:()=>tq,isFalseLiteral:()=>yw,isFalseLiteralType:()=>yb,isFalsyType:()=>rW,isForInOrOfStatement:()=>Rq,isFreshableIntrinsicType:()=>Wz,isFreshableType:()=>Vw,isFunctionLikeDeclaration:()=>jq,isFunctionScopeBoundary:()=>mz,isImportExpression:()=>rq,isImportKeyword:()=>nq,isInKeyword:()=>iq,isIndexType:()=>Lz,isIndexedAccessType:()=>Jz,isInputFiles:()=>aq,isInstantiableType:()=>Rz,isIntersectionType:()=>Gm,isIntrinsicAnyType:()=>bz,isIntrinsicBigIntType:()=>Tz,isIntrinsicBooleanType:()=>vz,isIntrinsicESSymbolType:()=>xz,isIntrinsicErrorType:()=>Sz,isIntrinsicNeverType:()=>Cz,isIntrinsicNonPrimitiveType:()=>Ez,isIntrinsicNullType:()=>Az,isIntrinsicNumberType:()=>kz,isIntrinsicStringType:()=>Dz,isIntrinsicType:()=>fb,isIntrinsicUndefinedType:()=>Pz,isIntrinsicUnknownType:()=>Iz,isIntrinsicVoidType:()=>Nz,isIterationStatement:()=>dz,isJSDocComment:()=>Vq,isJSDocNamespaceBody:()=>lb,isJSDocNamespaceDeclaration:()=>Jw,isJSDocText:()=>gw,isJSDocTypeReferencingNode:()=>Hq,isJsonMinusNumericLiteral:()=>bw,isJsonObjectExpression:()=>Gq,isJsxAttributeLike:()=>Xq,isJsxAttributeValue:()=>$q,isJsxChild:()=>Qq,isJsxTagNameExpression:()=>Ow,isJsxTagNamePropertyAccess:()=>Rw,isLiteralToken:()=>Yq,isLiteralType:()=>Hz,isModifierFlagSet:()=>pw,isModuleBody:()=>Kq,isModuleName:()=>Zq,isModuleReference:()=>ez,isNamedDeclarationWithName:()=>jw,isNamedImportBindings:()=>tz,isNamedImportsOrExports:()=>rz,isNamespaceBody:()=>ub,isNamespaceDeclaration:()=>Fw,isNeverKeyword:()=>oq,isNodeFlagSet:()=>fw,isNullKeyword:()=>sq,isNullLiteral:()=>vw,isNumberKeyword:()=>_q,isNumberLiteralType:()=>Gz,isNumericOrStringLikeLiteral:()=>Bw,isNumericPropertyName:()=>Ww,isObjectBindingOrAssignmentElement:()=>nz,isObjectBindingOrAssignmentPattern:()=>Mw,isObjectFlagSet:()=>mu,isObjectKeyword:()=>cq,isObjectType:()=>yu,isObjectTypeDeclaration:()=>iz,isOutKeyword:()=>lq,isOverrideKeyword:()=>uq,isParameterPropertyModifier:()=>az,isPrivateKeyword:()=>Tw,isPropertyAccessEntityNameExpression:()=>Uw,isPropertyNameLiteral:()=>oz,isPropertyReadonlyInType:()=>Qw,isProtectedKeyword:()=>Sw,isPseudoLiteralToken:()=>sz,isPublicKeyword:()=>xw,isQuestionDotToken:()=>pq,isQuestionToken:()=>fq,isReadonlyKeyword:()=>ab,isSignatureDeclaration:()=>pb,isStaticKeyword:()=>ww,isStrictCompilerOptionEnabled:()=>rb,isStringKeyword:()=>dq,isStringLiteralType:()=>Xz,isStringMappingType:()=>jz,isSubstitutionType:()=>Fz,isSuperElementAccessExpression:()=>qw,isSuperExpression:()=>ob,isSuperKeyword:()=>mq,isSuperProperty:()=>_z,isSuperPropertyAccessExpression:()=>zw,isSymbolFlagSet:()=>dw,isSymbolKeyword:()=>hq,isSyntaxList:()=>yq,isTemplateLiteralType:()=>$z,isThenableType:()=>_W,isThisExpression:()=>Cw,isThisKeyword:()=>gq,isTrueKeyword:()=>bq,isTrueLiteral:()=>Ew,isTrueLiteralType:()=>Qz,isTupleType:()=>Gw,isTupleTypeReference:()=>$w,isTypeFlagSet:()=>tt,isTypeOnlyCompatibleAliasDeclaration:()=>cz,isTypeParameter:()=>Bz,isTypeReference:()=>Xw,isTypeReferenceType:()=>lz,isTypeVariable:()=>Uz,isUndefinedKeyword:()=>vq,isUnionOrIntersectionType:()=>qz,isUnionOrIntersectionTypeNode:()=>uz,isUnionType:()=>mb,isUniqueESSymbolType:()=>Hw,isUnknownKeyword:()=>Tq,isUnknownLiteralType:()=>Yz,isUnparsedPrologue:()=>Sq,isUnparsedSourceText:()=>pz,isUnparsedSyntheticReference:()=>xq,isValidPropertyAccess:()=>yz,isVariableLikeDeclaration:()=>fz,isVoidKeyword:()=>wq,symbolHasReadonlyDeclaration:()=>Yw,unionTypeParts:()=>du});Kw.exports=NU(lw);var Zr=Pr(Dt(),1),ow=Pr(Dt(),1);function uw(e,t,r=e.getSourceFile()){let a=[];for(;;){if(ow.default.isTokenKind(e.kind))t(e);else if(e.kind!==ow.default.SyntaxKind.JSDocComment){let _=e.getChildren(r);if(_.length===1){e=_[0];continue}for(let p=_.length-1;p>=0;--p)a.push(_[p])}if(a.length===0)break;e=a.pop()}}function OU(e){switch(e.kind){case Zr.default.SyntaxKind.CloseBraceToken:return e.parent.kind!==Zr.default.SyntaxKind.JsxExpression||!eb(e.parent.parent);case Zr.default.SyntaxKind.GreaterThanToken:switch(e.parent.kind){case Zr.default.SyntaxKind.JsxOpeningElement:return e.end!==e.parent.end;case Zr.default.SyntaxKind.JsxOpeningFragment:return!1;case Zr.default.SyntaxKind.JsxSelfClosingElement:return e.end!==e.parent.end||!eb(e.parent.parent);case Zr.default.SyntaxKind.JsxClosingElement:case Zr.default.SyntaxKind.JsxClosingFragment:return!eb(e.parent.parent.parent)}}return!0}function eb(e){return e.kind===Zr.default.SyntaxKind.JsxElement||e.kind===Zr.default.SyntaxKind.JsxFragment}function MU(e,t,r=e.getSourceFile()){let a=r.text,_=r.languageVariant!==Zr.default.LanguageVariant.JSX;return uw(e,d=>{if(d.pos!==d.end&&(d.kind!==Zr.default.SyntaxKind.JsxText&&Zr.default.forEachLeadingCommentRange(a,d.pos===0?(Zr.default.getShebang(a)??"").length:d.pos,p),_||OU(d)))return Zr.default.forEachTrailingCommentRange(a,d.end,p)},r);function p(d,h,l){t(a,{pos:d,end:h,kind:l})}}var LU=Pr(Dt(),1);function ja(e,t){switch(t){case"stripInternal":case"declarationMap":case"emitDeclarationOnly":return e[t]===!0&&ja(e,"declaration");case"declaration":return e.declaration||ja(e,"composite");case"incremental":return e.incremental===void 0?ja(e,"composite"):e.incremental;case"skipDefaultLibCheck":return e.skipDefaultLibCheck||ja(e,"skipLibCheck");case"suppressImplicitAnyIndexErrors":return e.suppressImplicitAnyIndexErrors===!0&&ja(e,"noImplicitAny");case"allowSyntheticDefaultImports":return e.allowSyntheticDefaultImports!==void 0?e.allowSyntheticDefaultImports:ja(e,"esModuleInterop")||e.module===LU.default.ModuleKind.System;case"noUncheckedIndexedAccess":return e.noUncheckedIndexedAccess===!0&&ja(e,"strictNullChecks");case"allowJs":return e.allowJs===void 0?ja(e,"checkJs"):e.allowJs;case"noImplicitAny":case"noImplicitThis":case"strictNullChecks":case"strictFunctionTypes":case"strictPropertyInitialization":case"alwaysStrict":case"strictBindCallApply":return rb(e,t)}return e[t]===!0}function rb(e,t){return(e.strict?e[t]!==!1:e[t]===!0)&&(t!=="strictPropertyInitialization"||rb(e,"strictNullChecks"))}var JU=Pr(Dt(),1);function nb(e,t){return(e&t)!==0}function ib(e,t){return nb(e.flags,t)}function pw(e,t){return nb(JU.default.getCombinedModifierFlags(e),t)}var fw=ib;function mu(e,t){return nb(e.objectFlags,t)}var dw=ib,tt=ib;function RU(e,...t){if(e===void 0)return!1;for(let r of e)if(t.includes(r.kind))return!0;return!1}var pr=Pr(Dt(),1),Fe=Pr(Dt(),1);function jU(e){return e.kind===Fe.default.SyntaxKind.AbstractKeyword}function mw(e){return e.kind===Fe.default.SyntaxKind.AccessorKeyword}function FU(e){return e.kind===Fe.default.SyntaxKind.AnyKeyword}function BU(e){return e.kind===Fe.default.SyntaxKind.AssertKeyword}function UU(e){return e.kind===Fe.default.SyntaxKind.AssertsKeyword}function qU(e){return e.kind===Fe.default.SyntaxKind.AsyncKeyword}function zU(e){return e.kind===Fe.default.SyntaxKind.AwaitKeyword}function WU(e){return e.kind===Fe.default.SyntaxKind.BigIntKeyword}function VU(e){return e.kind===Fe.default.SyntaxKind.BooleanKeyword}function HU(e){return e.kind===Fe.default.SyntaxKind.ColonToken}function GU(e){return e.kind===Fe.default.SyntaxKind.ConstKeyword}function XU(e){return e.kind===Fe.default.SyntaxKind.DeclareKeyword}function $U(e){return e.kind===Fe.default.SyntaxKind.DefaultKeyword}function QU(e){return e.kind===Fe.default.SyntaxKind.DotToken}function hw(e){return e.kind===Fe.default.SyntaxKind.EndOfFileToken}function YU(e){return e.kind===Fe.default.SyntaxKind.EqualsGreaterThanToken}function KU(e){return e.kind===Fe.default.SyntaxKind.EqualsToken}function ZU(e){return e.kind===Fe.default.SyntaxKind.ExclamationToken}function eq(e){return e.kind===Fe.default.SyntaxKind.ExportKeyword}function tq(e){return e.kind===Fe.default.SyntaxKind.FalseKeyword}function yw(e){return e.kind===Fe.default.SyntaxKind.FalseKeyword}function rq(e){return e.kind===Fe.default.SyntaxKind.ImportKeyword}function nq(e){return e.kind===Fe.default.SyntaxKind.ImportKeyword}function iq(e){return e.kind===Fe.default.SyntaxKind.InKeyword}function aq(e){return e.kind===Fe.default.SyntaxKind.InputFiles}function gw(e){return e.kind===Fe.default.SyntaxKind.JSDocText}function bw(e){return e.kind===Fe.default.SyntaxKind.PrefixUnaryExpression}function oq(e){return e.kind===Fe.default.SyntaxKind.NeverKeyword}function sq(e){return e.kind===Fe.default.SyntaxKind.NullKeyword}function vw(e){return e.kind===Fe.default.SyntaxKind.NullKeyword}function _q(e){return e.kind===Fe.default.SyntaxKind.NumberKeyword}function cq(e){return e.kind===Fe.default.SyntaxKind.ObjectKeyword}function lq(e){return e.kind===Fe.default.SyntaxKind.OutKeyword}function uq(e){return e.kind===Fe.default.SyntaxKind.OverrideKeyword}function Tw(e){return e.kind===Fe.default.SyntaxKind.PrivateKeyword}function Sw(e){return e.kind===Fe.default.SyntaxKind.ProtectedKeyword}function xw(e){return e.kind===Fe.default.SyntaxKind.PublicKeyword}function pq(e){return e.kind===Fe.default.SyntaxKind.QuestionDotToken}function fq(e){return e.kind===Fe.default.SyntaxKind.QuestionToken}function ab(e){return e.kind===Fe.default.SyntaxKind.ReadonlyKeyword}function ww(e){return e.kind===Fe.default.SyntaxKind.StaticKeyword}function dq(e){return e.kind===Fe.default.SyntaxKind.StringKeyword}function ob(e){return e.kind===Fe.default.SyntaxKind.SuperKeyword}function mq(e){return e.kind===Fe.default.SyntaxKind.SuperKeyword}function hq(e){return e.kind===Fe.default.SyntaxKind.SymbolKeyword}function yq(e){return e.kind===Fe.default.SyntaxKind.SyntaxList}function Cw(e){return e.kind===Fe.default.SyntaxKind.ThisKeyword}function gq(e){return e.kind===Fe.default.SyntaxKind.ThisKeyword}function bq(e){return e.kind===Fe.default.SyntaxKind.TrueKeyword}function Ew(e){return e.kind===Fe.default.SyntaxKind.TrueKeyword}function vq(e){return e.kind===Fe.default.SyntaxKind.UndefinedKeyword}function Tq(e){return e.kind===Fe.default.SyntaxKind.UnknownKeyword}function Sq(e){return e.kind===Fe.default.SyntaxKind.UnparsedPrologue}function xq(e){return e.kind===Fe.default.SyntaxKind.UnparsedSyntheticReference}function wq(e){return e.kind===Fe.default.SyntaxKind.VoidKeyword}var D=Pr(Dt(),1),Cq=Pr(Dt(),1),[sw,Eq]=Cq.default.versionMajorMinor.split(".").map(e=>Number.parseInt(e,10));function fu(e,t=0){return sw>e||sw===e&&Eq>=t}function Aq(e){return D.default.isPropertyAccessExpression(e)||D.default.isElementAccessExpression(e)}function sb(e){return xw(e)||Tw(e)||Sw(e)}function _b(e){return D.default.isGetAccessorDeclaration(e)||D.default.isSetAccessorDeclaration(e)}function kq(e){return D.default.isBindingElement(e)||D.default.isOmittedExpression(e)}function Aw(e){return D.default.isArrayBindingPattern(e)||D.default.isArrayLiteralExpression(e)}function Dq(e){return D.default.isObjectLiteralExpression(e)||D.default.isArrayLiteralExpression(e)}function Pq(e){return D.default.isSpreadElement(e)||D.default.isSpreadAssignment(e)?!0:fu(4,4)?D.default.isDotDotDotToken(e):!1}function Iq(e){return kw(e)||D.default.isIdentifier(e)||D.default.isPropertyAccessExpression(e)||D.default.isElementAccessExpression(e)||D.default.isOmittedExpression(e)}function kw(e){return Mw(e)||Aw(e)}function cb(e){return D.default.isObjectBindingPattern(e)||D.default.isArrayBindingPattern(e)}function Nq(e){return D.default.isSourceFile(e)||D.default.isBlock(e)||D.default.isModuleBlock(e)||D.default.isCaseOrDefaultClause(e)}function Dw(e){return Ew(e)||yw(e)}function Hm(e){return D.default.isClassDeclaration(e)||D.default.isClassExpression(e)}function Oq(e){return sb(e)||ab(e)||ww(e)||mw(e)}function Pw(e){return D.default.isIdentifier(e)||D.default.isPrivateIdentifier(e)||D.default.isStringLiteralLike(e)||D.default.isNumericLiteral(e)||D.default.isComputedPropertyName(e)||D.default.isElementAccessExpression(e)||cb(e)||hu(e)}function Iw(e){return pb(e)||Hm(e)||D.default.isInterfaceDeclaration(e)||D.default.isTypeAliasDeclaration(e)||D.default.isJSDocTemplateTag(e)}function Mq(e){return Iw(e)||D.default.isJSDocTypedefTag(e)||D.default.isJSDocCallbackTag(e)||D.default.isJSDocSignature(e)}function Lq(e){return cb(e)||D.default.isObjectLiteralExpression(e)||D.default.isArrayLiteralExpression(e)}function hu(e){return D.default.isIdentifier(e)||Uw(e)}function Jq(e){return D.default.isEntityName(e)||hu(e)}function Rq(e){return D.default.isForInStatement(e)||D.default.isForOfStatement(e)}function jq(e){return D.default.isFunctionDeclaration(e)||D.default.isMethodDeclaration(e)||D.default.isGetAccessorDeclaration(e)||D.default.isSetAccessorDeclaration(e)||D.default.isConstructorDeclaration(e)||D.default.isFunctionExpression(e)||D.default.isArrowFunction(e)}function Fq(e){return D.default.isParameter(e)||D.default.isPropertyDeclaration(e)||D.default.isMethodDeclaration(e)||D.default.isGetAccessorDeclaration(e)||D.default.isSetAccessorDeclaration(e)||D.default.isClassExpression(e)||D.default.isClassDeclaration(e)}function Nw(e){return D.default.isVariableDeclaration(e)||D.default.isParameter(e)||D.default.isBindingElement(e)||D.default.isPropertyDeclaration(e)||D.default.isPropertyAssignment(e)||D.default.isEnumMember(e)}function Bq(e){return Nw(e)||D.default.isForStatement(e)||D.default.isForInStatement(e)||D.default.isForOfStatement(e)||D.default.isJsxAttribute(e)}function Uq(e){return!!(_b(e)||D.default.isArrowFunction(e)||D.default.isBlock(e)||D.default.isBreakStatement(e)||D.default.isCallSignatureDeclaration(e)||D.default.isCaseClause(e)||Hm(e)||D.default.isConstructorDeclaration(e)||D.default.isConstructorTypeNode(e)||D.default.isConstructSignatureDeclaration(e)||D.default.isContinueStatement(e)||D.default.isDebuggerStatement(e)||D.default.isDoStatement(e)||D.default.isEmptyStatement(e)||hw(e)||D.default.isEnumDeclaration(e)||D.default.isEnumMember(e)||D.default.isExportAssignment(e)||D.default.isExportDeclaration(e)||D.default.isExportSpecifier(e)||D.default.isExpressionStatement(e)||D.default.isForInStatement(e)||D.default.isForOfStatement(e)||D.default.isForStatement(e)||D.default.isFunctionDeclaration(e)||D.default.isFunctionExpression(e)||D.default.isFunctionTypeNode(e)||D.default.isIfStatement(e)||D.default.isImportDeclaration(e)||D.default.isImportEqualsDeclaration(e)||D.default.isIndexSignatureDeclaration(e)||D.default.isInterfaceDeclaration(e)||D.default.isJSDocFunctionType(e)||D.default.isLabeledStatement(e)||D.default.isMethodDeclaration(e)||D.default.isMethodSignature(e)||D.default.isModuleDeclaration(e)||D.default.isNamedTupleMember(e)||D.default.isNamespaceExportDeclaration(e)||D.default.isParameter(e)||D.default.isParenthesizedExpression(e)||D.default.isPropertyAssignment(e)||D.default.isPropertyDeclaration(e)||D.default.isPropertySignature(e)||D.default.isReturnStatement(e)||D.default.isShorthandPropertyAssignment(e)||D.default.isSpreadAssignment(e)||D.default.isSwitchStatement(e)||D.default.isThrowStatement(e)||D.default.isTryStatement(e)||D.default.isTypeAliasDeclaration(e)||D.default.isVariableDeclaration(e)||D.default.isVariableStatement(e)||D.default.isWhileStatement(e)||D.default.isWithStatement(e)||fu(4,4)&&D.default.isClassStaticBlockDeclaration(e)||fu(5,0)&&(D.default.isBinaryExpression(e)||D.default.isElementAccessExpression(e)||D.default.isIdentifier(e)||D.default.isJSDocSignature(e)||D.default.isObjectLiteralExpression(e)||D.default.isPropertyAccessExpression(e)||D.default.isTypeParameterDeclaration(e)))}function qq(e){return D.default.isTypeParameterDeclaration(e)||D.default.isParameter(e)||D.default.isConstructorTypeNode(e)||D.default.isPropertySignature(e)||D.default.isPropertyDeclaration(e)||D.default.isMethodSignature(e)||D.default.isMethodDeclaration(e)||D.default.isConstructorDeclaration(e)||D.default.isGetAccessorDeclaration(e)||D.default.isSetAccessorDeclaration(e)||D.default.isIndexSignatureDeclaration(e)||D.default.isFunctionExpression(e)||D.default.isArrowFunction(e)||D.default.isClassExpression(e)||D.default.isVariableStatement(e)||D.default.isFunctionDeclaration(e)||D.default.isClassDeclaration(e)||D.default.isInterfaceDeclaration(e)||D.default.isTypeAliasDeclaration(e)||D.default.isEnumDeclaration(e)||D.default.isModuleDeclaration(e)||D.default.isImportEqualsDeclaration(e)||D.default.isImportDeclaration(e)||D.default.isExportAssignment(e)||D.default.isExportDeclaration(e)}function zq(e){return pb(e)||D.default.isVariableDeclaration(e)||D.default.isParameter(e)||D.default.isPropertySignature(e)||D.default.isPropertyDeclaration(e)||D.default.isTypePredicateNode(e)||D.default.isParenthesizedTypeNode(e)||D.default.isTypeOperatorNode(e)||D.default.isMappedTypeNode(e)||D.default.isAssertionExpression(e)||D.default.isTypeAliasDeclaration(e)||D.default.isJSDocTypeExpression(e)||D.default.isJSDocNonNullableType(e)||D.default.isJSDocNullableType(e)||D.default.isJSDocOptionalType(e)||D.default.isJSDocVariadicType(e)}function Wq(e){return D.default.isCallExpression(e)||D.default.isNewExpression(e)||D.default.isTaggedTemplateExpression(e)||D.default.isJsxOpeningElement(e)||D.default.isJsxSelfClosingElement(e)}function Vq(e){return gw(e)?!0:fu(4,4)?D.default.isJSDocLink(e)||D.default.isJSDocLinkCode(e)||D.default.isJSDocLinkPlain(e):!1}function lb(e){return D.default.isIdentifier(e)||Jw(e)}function Hq(e){return D.default.isJSDocVariadicType(e)||D.default.isJSDocOptionalType(e)||D.default.isJSDocNullableType(e)||D.default.isJSDocNonNullableType(e)}function Gq(e){return D.default.isObjectLiteralExpression(e)||D.default.isArrayLiteralExpression(e)||bw(e)||D.default.isNumericLiteral(e)||D.default.isStringLiteral(e)||Dw(e)||vw(e)}function Xq(e){return D.default.isJsxAttribute(e)||D.default.isJsxSpreadAttribute(e)}function $q(e){return D.default.isStringLiteral(e)||D.default.isJsxExpression(e)||D.default.isJsxElement(e)||D.default.isJsxSelfClosingElement(e)||D.default.isJsxFragment(e)}function Qq(e){return D.default.isJsxText(e)||D.default.isJsxExpression(e)||D.default.isJsxElement(e)||D.default.isJsxSelfClosingElement(e)||D.default.isJsxFragment(e)}function Ow(e){return D.default.isIdentifier(e)||Cw(e)||Rw(e)}function Yq(e){return D.default.isNumericLiteral(e)||D.default.isBigIntLiteral(e)||D.default.isStringLiteral(e)||D.default.isJsxText(e)||D.default.isRegularExpressionLiteral(e)||D.default.isNoSubstitutionTemplateLiteral(e)}function Kq(e){return ub(e)||lb(e)}function Zq(e){return D.default.isIdentifier(e)||D.default.isStringLiteral(e)}function ez(e){return D.default.isEntityName(e)||D.default.isExternalModuleReference(e)}function tz(e){return D.default.isNamespaceImport(e)||D.default.isNamedImports(e)}function rz(e){return D.default.isNamedImports(e)||D.default.isNamedExports(e)}function ub(e){return D.default.isModuleBlock(e)||Fw(e)}function nz(e){return D.default.isBindingElement(e)||D.default.isPropertyAssignment(e)||D.default.isShorthandPropertyAssignment(e)||D.default.isSpreadAssignment(e)}function Mw(e){return D.default.isObjectBindingPattern(e)||D.default.isObjectLiteralExpression(e)}function iz(e){return Hm(e)||D.default.isInterfaceDeclaration(e)||D.default.isTypeLiteralNode(e)}function az(e){return sb(e)||ab(e)}function oz(e){return D.default.isIdentifier(e)||D.default.isStringLiteralLike(e)||D.default.isNumericLiteral(e)}function sz(e){return D.default.isTemplateHead(e)||D.default.isTemplateMiddle(e)||D.default.isTemplateTail(e)}function pb(e){return D.default.isCallSignatureDeclaration(e)||D.default.isConstructSignatureDeclaration(e)||D.default.isMethodSignature(e)||D.default.isIndexSignatureDeclaration(e)||D.default.isFunctionTypeNode(e)||D.default.isConstructorTypeNode(e)||D.default.isJSDocFunctionType(e)||D.default.isFunctionDeclaration(e)||D.default.isMethodDeclaration(e)||D.default.isConstructorDeclaration(e)||_b(e)||D.default.isFunctionExpression(e)||D.default.isArrowFunction(e)}function _z(e){return zw(e)||qw(e)}function cz(e){return!!(D.default.isImportClause(e)||D.default.isImportEqualsDeclaration(e)||D.default.isNamespaceImport(e)||D.default.isImportOrExportSpecifier(e)||fu(5,0)&&(D.default.isExportDeclaration(e)||D.default.isNamespaceExport(e)))}function lz(e){return D.default.isTypeReferenceNode(e)||D.default.isExpressionWithTypeArguments(e)}function uz(e){return D.default.isUnionTypeNode(e)||D.default.isIntersectionTypeNode(e)}function pz(e){return D.default.isUnparsedPrepend(e)||D.default.isUnparsedTextLike(e)}function fz(e){return D.default.isVariableDeclaration(e)||D.default.isParameter(e)||D.default.isBindingElement(e)||D.default.isPropertyDeclaration(e)||D.default.isPropertyAssignment(e)||D.default.isPropertySignature(e)||D.default.isJsxAttribute(e)||D.default.isShorthandPropertyAssignment(e)||D.default.isEnumMember(e)||D.default.isJSDocPropertyTag(e)||D.default.isJSDocParameterTag(e)}function Lw(e){return pr.default.isTypeReferenceNode(e.type)&&pr.default.isIdentifier(e.type.typeName)&&e.type.typeName.escapedText==="const"}function dz(e){switch(e.kind){case pr.default.SyntaxKind.DoStatement:case pr.default.SyntaxKind.ForInStatement:case pr.default.SyntaxKind.ForOfStatement:case pr.default.SyntaxKind.ForStatement:case pr.default.SyntaxKind.WhileStatement:return!0;default:return!1}}function Jw(e){return pr.default.isModuleDeclaration(e)&&pr.default.isIdentifier(e.name)&&(e.body===void 0||lb(e.body))}function Rw(e){return pr.default.isPropertyAccessExpression(e)&&Ow(e.expression)}function jw(e){return"name"in e&&e.name!==void 0&&e.name!==null&&Pw(e.name)}function Fw(e){return pr.default.isModuleDeclaration(e)&&pr.default.isIdentifier(e.name)&&e.body!==void 0&&ub(e.body)}function Bw(e){switch(e.kind){case pr.default.SyntaxKind.StringLiteral:case pr.default.SyntaxKind.NumericLiteral:case pr.default.SyntaxKind.NoSubstitutionTemplateLiteral:return!0;default:return!1}}function Uw(e){return pr.default.isPropertyAccessExpression(e)&&pr.default.isIdentifier(e.name)&&hu(e.expression)}function qw(e){return pr.default.isElementAccessExpression(e)&&ob(e.expression)}function zw(e){return pr.default.isPropertyAccessExpression(e)&&ob(e.expression)}var vr=Pr(Dt(),1);function mz(e){switch(e.kind){case vr.default.SyntaxKind.FunctionExpression:case vr.default.SyntaxKind.ArrowFunction:case vr.default.SyntaxKind.Constructor:case vr.default.SyntaxKind.ModuleDeclaration:case vr.default.SyntaxKind.ClassDeclaration:case vr.default.SyntaxKind.ClassExpression:case vr.default.SyntaxKind.EnumDeclaration:case vr.default.SyntaxKind.MethodDeclaration:case vr.default.SyntaxKind.FunctionDeclaration:case vr.default.SyntaxKind.GetAccessor:case vr.default.SyntaxKind.SetAccessor:case vr.default.SyntaxKind.MethodSignature:case vr.default.SyntaxKind.CallSignature:case vr.default.SyntaxKind.ConstructSignature:case vr.default.SyntaxKind.ConstructorType:case vr.default.SyntaxKind.FunctionType:return!0;case vr.default.SyntaxKind.SourceFile:return vr.default.isExternalModule(e);default:return!1}}var pu=Pr(Dt(),1);function hz(e){return e>=pu.default.SyntaxKind.FirstAssignment&&e<=pu.default.SyntaxKind.LastAssignment}function Ww(e){return String(+e)===e}function _w(e){return e>=65536?2:1}function yz(e,t=pu.default.ScriptTarget.Latest){if(e.length===0)return!1;let r=e.codePointAt(0);if(!pu.default.isIdentifierStart(r,t))return!1;for(let a=_w(r);ar.escapedName===t):e.getProperty(t)}function Kz(e,t,r){let a="__@"+t;for(let _ of e.getProperties()){if(!_.name.startsWith(a))continue;let p=_.valueDeclaration??_.getDeclarations()[0];if(!jw(p)||p.name===void 0||!gz.default.isComputedPropertyName(p.name))continue;let d=r.getApparentType(r.getTypeAtLocation(p.name.expression)).symbol;if(_.escapedName===Zz(r,d,t))return _}}function Zz(e,t,r){let a=t&&e.getTypeOfSymbolAtLocation(t,t.valueDeclaration).getProperty(r),_=a&&e.getTypeOfSymbolAtLocation(a,a.valueDeclaration);return _&&Hw(_)?_.escapedName:"__@"+r}var ur=Pr(Dt(),1),gn=Pr(Dt(),1);function eW(e){return e.arguments.length===3&&hu(e.arguments[0])&&Bw(e.arguments[1])&&gn.default.isPropertyAccessExpression(e.expression)&&e.expression.name.escapedText==="defineProperty"&&gn.default.isIdentifier(e.expression.expression)&&e.expression.expression.escapedText==="Object"}function tW(e){let t=e;for(;;){let r=t.parent;e:switch(r.kind){case gn.default.SyntaxKind.TypeAssertionExpression:case gn.default.SyntaxKind.AsExpression:return Lw(r);case gn.default.SyntaxKind.PrefixUnaryExpression:if(t.kind!==gn.default.SyntaxKind.NumericLiteral)return!1;switch(r.operator){case gn.default.SyntaxKind.PlusToken:case gn.default.SyntaxKind.MinusToken:t=r;break e;default:return!1}case gn.default.SyntaxKind.PropertyAssignment:if(r.initializer!==t)return!1;t=r.parent;break;case gn.default.SyntaxKind.ShorthandPropertyAssignment:t=r.parent;break;case gn.default.SyntaxKind.ParenthesizedExpression:case gn.default.SyntaxKind.ArrayLiteralExpression:case gn.default.SyntaxKind.ObjectLiteralExpression:case gn.default.SyntaxKind.TemplateExpression:t=r;break;default:return!1}}}function rW(e){return tt(e,ur.default.TypeFlags.Undefined|ur.default.TypeFlags.Null|ur.default.TypeFlags.Void)?!0:e.isLiteral()?!e.value:yb(e)}function nW(e){return Gm(e)?e.types:[e]}function iW(e,t,r){return(Gm(e)?e.types:[e]).some(_=>{let p=gb(_,t);if(p===void 0)return!1;if(p.flags&ur.default.SymbolFlags.Transient){if(/^(?:[1-9]\d*|0)$/.test(t)&&$w(_))return _.target.readonly;switch(aW(_,t,r)){case!0:return!0;case!1:return!1;default:}}return!!(dw(p,ur.default.SymbolFlags.ValueModule)||Yw(p,r))})}function aW(e,t,r){if(!yu(e)||!mu(e,ur.default.ObjectFlags.Mapped))return;let a=e.symbol.declarations[0];if(a.readonlyToken!==void 0&&!/^__@[^@]+$/.test(t))return a.readonlyToken.kind!==ur.default.SyntaxKind.MinusToken;let{modifiersType:_}=e;return _&&Qw(_,t,r)}function oW(e,t,r){let a=e.getApparentType(e.getTypeOfSymbolAtLocation(t,r));if(t.valueDeclaration.dotDotDotToken&&(a=a.getNumberIndexType(),a===void 0))return!1;for(let _ of du(a))if(_.getCallSignatures().length!==0)return!0;return!1}function Qw(e,t,r){let a=!1,_=!1;for(let p of du(e))if(gb(p,t)===void 0){let d=(Ww(t)?r.getIndexInfoOfType(p,ur.default.IndexKind.Number):void 0)??r.getIndexInfoOfType(p,ur.default.IndexKind.String);if(d!=null&&d.isReadonly){if(a)return!0;_=!0}}else{if(_||iW(p,t,r))return!0;a=!0}return!1}function sW(e,t){if(!eW(e))return!1;let r=t.getTypeAtLocation(e.arguments[2]);if(r.getProperty("value")===void 0)return r.getProperty("set")===void 0;let a=r.getProperty("writable");if(a===void 0)return!1;let _=a.valueDeclaration!==void 0&&ur.default.isPropertyAssignment(a.valueDeclaration)?t.getTypeAtLocation(a.valueDeclaration.initializer):t.getTypeOfSymbolAtLocation(a,e.arguments[2]);return yb(_)}function _W(e,t,r=e.getTypeAtLocation(t)){for(let a of du(e.getApparentType(r))){let _=a.getProperty("then");if(_===void 0)continue;let p=e.getTypeOfSymbolAtLocation(_,t);for(let d of du(p))for(let h of d.getCallSignatures())if(h.parameters.length!==0&&oW(e,h.parameters[0],t))return!0}return!1}function Yw(e,t){var r;return!!((e.flags&ur.default.SymbolFlags.Accessor)===ur.default.SymbolFlags.GetAccessor||(r=e.declarations)!=null&&r.some(a=>pw(a,ur.default.ModifierFlags.Readonly)||ur.default.isVariableDeclaration(a)&&fw(a.parent,ur.default.NodeFlags.Const)||ur.default.isCallExpression(a)&&sW(a,t)||ur.default.isEnumMember(a)||(ur.default.isPropertyAssignment(a)||ur.default.isShorthandPropertyAssignment(a))&&tW(a.parent)))}function du(e){return mb(e)?e.types:[e]}});var n9=ut(ea=>{"use strict";var cW=ea&&ea.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),lW=ea&&ea.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r9=ea&&ea.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&cW(t,e,r);return lW(t,e),t};Object.defineProperty(ea,"__esModule",{value:!0});ea.convertComments=void 0;var uW=r9(Zw()),e9=r9(Dt()),pW=Wm(),t9=Um();function fW(e,t){let r=[];return uW.forEachComment(e,(a,_)=>{let p=_.kind===e9.SyntaxKind.SingleLineCommentTrivia?t9.AST_TOKEN_TYPES.Line:t9.AST_TOKEN_TYPES.Block,d=[_.pos,_.end],h=(0,pW.getLocFor)(d,e),l=d[0]+2,v=_.kind===e9.SyntaxKind.SingleLineCommentTrivia?d[1]-l:d[1]-l-2;r.push({type:p,value:t.slice(l,l+v),range:d,loc:h})},e),r}ea.convertComments=fW});var a9=ut(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});Xm.astConverter=void 0;var i9=Z6(),dW=n9(),mW=Wm(),hW={};function yW(e,t,r){let{parseDiagnostics:a}=e;if(a.length)throw(0,i9.convertError)(a[0]);let _=new i9.Converter(e,{allowInvalidAST:t.allowInvalidAST,errorOnUnknownASTType:t.errorOnUnknownASTType,shouldPreserveNodeMaps:r,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings}),p=_.convertProgram();(!t.range||!t.loc)&&(0,hW.simpleTraverse)(p,{enter:h=>{t.range||delete h.range,t.loc||delete h.loc}}),t.tokens&&(p.tokens=(0,mW.convertTokens)(e)),t.comment&&(p.comments=(0,dW.convertComments)(e,t.codeFullText));let d=_.getASTMaps();return{estree:p,astMaps:d}}Xm.astConverter=yW});var bb=ut(si=>{"use strict";var gW=si&&si.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),bW=si&&si.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),vW=si&&si.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&gW(t,e,r);return bW(t,e),t};Object.defineProperty(si,"__esModule",{value:!0});si.getCodeText=si.isSourceFile=void 0;var TW=vW(Dt());function o9(e){if(typeof e!="object"||e==null)return!1;let t=e;return t.kind===TW.SyntaxKind.SourceFile&&typeof t.getFullText=="function"}si.isSourceFile=o9;function SW(e){return o9(e)?e.getFullText(e):e}si.getCodeText=SW});var s9=ut(bn=>{"use strict";var xW=bn&&bn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),wW=bn&&bn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),CW=bn&&bn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&xW(t,e,r);return wW(t,e),t},EW=bn&&bn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bn,"__esModule",{value:!0});bn.getLanguageVariant=bn.getScriptKind=void 0;var AW=EW({extname:e=>"."+e.split(".").pop()}),Ht=CW(Dt());function kW(e,t){switch(AW.default.extname(e).toLowerCase()){case Ht.Extension.Js:case Ht.Extension.Cjs:case Ht.Extension.Mjs:return Ht.ScriptKind.JS;case Ht.Extension.Jsx:return Ht.ScriptKind.JSX;case Ht.Extension.Ts:case Ht.Extension.Cts:case Ht.Extension.Mts:return Ht.ScriptKind.TS;case Ht.Extension.Tsx:return Ht.ScriptKind.TSX;case Ht.Extension.Json:return Ht.ScriptKind.JSON;default:return t?Ht.ScriptKind.TSX:Ht.ScriptKind.TS}}bn.getScriptKind=kW;function DW(e){switch(e){case Ht.ScriptKind.TSX:case Ht.ScriptKind.JSX:case Ht.ScriptKind.JS:case Ht.ScriptKind.JSON:return Ht.LanguageVariant.JSX;default:return Ht.LanguageVariant.Standard}}bn.getLanguageVariant=DW});var l9=ut(vn=>{"use strict";var PW=vn&&vn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),IW=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),NW=vn&&vn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&PW(t,e,r);return IW(t,e),t},OW=vn&&vn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vn,"__esModule",{value:!0});vn.createNoProgram=vn.createSourceFile=void 0;var MW=OW((Ef(),wf(Cf))),_9=NW(Dt()),LW=bb(),JW=s9(),RW=(0,MW.default)("typescript-eslint:typescript-estree:createSourceFile");function c9(e){return RW("Getting AST without type information in %s mode for: %s",e.jsx?"TSX":"TS",e.filePath),(0,LW.isSourceFile)(e.code)?e.code:_9.createSourceFile(e.filePath,e.codeFullText,_9.ScriptTarget.Latest,!0,(0,JW.getScriptKind)(e.filePath,e.jsx))}vn.createSourceFile=c9;function jW(e){return{ast:c9(e),program:null}}vn.createNoProgram=jW});var u9=ut(()=>{});var p9=ut($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.createParserServices=void 0;function FW(e,t){if(!t)return{program:t,...e};let r=t.getTypeChecker();return{program:t,...e,getSymbolAtLocation:a=>r.getSymbolAtLocation(e.esTreeNodeToTSNodeMap.get(a)),getTypeAtLocation:a=>r.getTypeAtLocation(e.esTreeNodeToTSNodeMap.get(a))}}$m.createParserServices=FW});var f9=ut(()=>{});var m9=ut(d9=>{d9.ExpiringCache=class{}});var y9=ut(h9=>{h9.resolveProjectList=()=>[]});var b9=ut(g9=>{g9.inferSingleRun=()=>!1});var T9=ut(v9=>{v9.warnAboutTSVersion=()=>{}});var w9=ut(ta=>{"use strict";var BW=ta&&ta.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ta,"__esModule",{value:!0});ta.clearTSServerProjectService=ta.clearTSConfigMatchCache=ta.createParseSettings=void 0;var vb=BW((Ef(),wf(Cf))),UW=f9(),qW={ensureAbsolutePath:e=>e},zW=bb(),S9=m9(),UH=y9(),WW=b9(),VW=T9(),HW=(0,vb.default)("typescript-eslint:typescript-estree:parser:parseSettings:createParseSettings"),Qm,x9=null;function GW(e,t={}){var d;let r=QW(e),a=(0,WW.inferSingleRun)(t),_=typeof t.tsconfigRootDir=="string"?t.tsconfigRootDir:"/prettier-security-dirname-placeholder",p={allowInvalidAST:t.allowInvalidAST===!0,code:e,codeFullText:r,comment:t.comment===!0,comments:[],DEPRECATED__createDefaultProgram:t.DEPRECATED__createDefaultProgram===!0,debugLevel:t.debugLevel===!0?new Set(["typescript-eslint"]):Array.isArray(t.debugLevel)?new Set(t.debugLevel):new Set,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:t.errorOnUnknownASTType===!0,EXPERIMENTAL_projectService:t.EXPERIMENTAL_useProjectService===!0?x9??(x9=(0,UW.createProjectService)()):void 0,EXPERIMENTAL_useSourceOfProjectReferenceRedirect:t.EXPERIMENTAL_useSourceOfProjectReferenceRedirect===!0,extraFileExtensions:Array.isArray(t.extraFileExtensions)&&t.extraFileExtensions.every(h=>typeof h=="string")?t.extraFileExtensions:[],filePath:(0,qW.ensureAbsolutePath)(typeof t.filePath=="string"&&t.filePath!==""?t.filePath:YW(t.jsx),_),jsx:t.jsx===!0,loc:t.loc===!0,log:typeof t.loggerFn=="function"?t.loggerFn:t.loggerFn===!1?()=>{}:console.log,preserveNodeMaps:t.preserveNodeMaps!==!1,programs:Array.isArray(t.programs)?t.programs:null,projects:[],range:t.range===!0,singleRun:a,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings??!0,tokens:t.tokens===!0?[]:null,tsconfigMatchCache:Qm??(Qm=new S9.ExpiringCache(a?"Infinity":((d=t.cacheLifetime)==null?void 0:d.glob)??S9.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS)),tsconfigRootDir:_};if(p.debugLevel.size>0){let h=[];p.debugLevel.has("typescript-eslint")&&h.push("typescript-eslint:*"),(p.debugLevel.has("eslint")||vb.default.enabled("eslint:*,-eslint:code-path"))&&h.push("eslint:*,-eslint:code-path"),vb.default.enable(h.join(","))}if(Array.isArray(t.programs)){if(!t.programs.length)throw new Error("You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.");HW("parserOptions.programs was provided, so parserOptions.project will be ignored.")}return!p.programs&&!p.EXPERIMENTAL_projectService&&(p.projects=[]),(0,VW.warnAboutTSVersion)(p),p}ta.createParseSettings=GW;function XW(){Qm==null||Qm.clear()}ta.clearTSConfigMatchCache=XW;function $W(){x9=null}ta.clearTSServerProjectService=$W;function QW(e){return(0,zW.isSourceFile)(e)?e.getFullText(e):typeof e=="string"?e:String(e)}function YW(e){return e?"estree.tsx":"estree.ts"}});var k9=ut(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});Ym.getFirstSemanticOrSyntacticError=void 0;var C9=Dt();function KW(e,t){try{let r=E9(e.getSyntacticDiagnostics(t));if(r.length>0)return A9(r[0]);let a=E9(e.getSemanticDiagnostics(t));return a.length>0?A9(a[0]):void 0}catch(r){console.warn(`Warning From TSC: "${r.message}`);return}}Ym.getFirstSemanticOrSyntacticError=KW;function E9(e){return e.filter(t=>{switch(t.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 A9(e){return{...e,message:(0,C9.flattenDiagnosticMessageText)(e.messageText,C9.sys.newLine)}}});var D9=ut(()=>{});var L9=ut(_i=>{"use strict";var ZW=_i&&_i.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_i,"__esModule",{value:!0});_i.clearParseAndGenerateServicesCalls=_i.clearProgramCache=_i.parseAndGenerateServices=_i.parse=void 0;var eV=ZW((Ef(),wf(Cf))),P9=a9(),tV=Z6(),rV={},I9={},nV={},N9=l9(),iV=u9(),O9={},aV=p9(),M9=w9(),oV=k9(),sV=D9(),_V=(0,eV.default)("typescript-eslint:typescript-estree:parser"),Tb=new Map;function cV(){Tb.clear()}_i.clearProgramCache=cV;function lV(e,t){if(e.EXPERIMENTAL_projectService){let a=(0,sV.useProgramFromProjectService)(e.EXPERIMENTAL_projectService,e);if(a)return a}if(e.programs){let a=(0,O9.useProvidedPrograms)(e.programs,e);if(a)return a}if(!t)return(0,N9.createNoProgram)(e);let r=(0,nV.createProjectProgram)(e,(0,iV.getWatchProgramsForProjects)(e));if(r)return r;if(e.DEPRECATED__createDefaultProgram){let a=(0,rV.createDefaultProgram)(e);if(a)return a}return(0,I9.createIsolatedProgram)(e)}function uV(e,t){let{ast:r}=pV(e,t,!1);return r}_i.parse=uV;function pV(e,t,r){let a=(0,M9.createParseSettings)(e,t);if(t!=null&&t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');let _=(0,N9.createSourceFile)(a),{estree:p,astMaps:d}=(0,P9.astConverter)(_,a,r);return{ast:p,esTreeNodeToTSNodeMap:d.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:d.tsNodeToESTreeNodeMap}}var Km={};function fV(){Km={}}_i.clearParseAndGenerateServicesCalls=fV;function dV(e,t){var v,y;let r=(0,M9.createParseSettings)(e,t);r.singleRun&&!r.programs&&((v=r.projects)==null?void 0:v.length)>0&&(r.programs={*[Symbol.iterator](){for(let C of r.projects){let S=Tb.get(C);if(S)yield S;else{_V("Detected single-run/CLI usage, creating Program once ahead of time for project: %s",C);let k=(0,O9.createProgramFromConfigFile)(C);Tb.set(C,k),yield k}}}});let a=r.programs!=null||((y=r.projects)==null?void 0:y.length)>0;if(t!==void 0&&(typeof t.errorOnTypeScriptSyntacticAndSemanticIssues=="boolean"&&t.errorOnTypeScriptSyntacticAndSemanticIssues&&(r.errorOnTypeScriptSyntacticAndSemanticIssues=!0),r.errorOnTypeScriptSyntacticAndSemanticIssues&&!a))throw new Error("Cannot calculate TypeScript semantic issues without a valid project.");r.singleRun&&t.filePath&&(Km[t.filePath]=(Km[t.filePath]||0)+1);let{ast:_,program:p}=r.singleRun&&t.filePath&&Km[t.filePath]>1?(0,I9.createIsolatedProgram)(r):lV(r,a),d=typeof r.preserveNodeMaps=="boolean"?r.preserveNodeMaps:!0,{estree:h,astMaps:l}=(0,P9.astConverter)(_,r,d);if(p&&r.errorOnTypeScriptSyntacticAndSemanticIssues){let C=(0,oV.getFirstSemanticOrSyntacticError)(p,_);if(C)throw(0,tV.convertError)(C)}return{ast:h,services:(0,aV.createParserServices)(l,p)}}_i.parseAndGenerateServices=dV});var W9=ut(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});ps.extract=SV;ps.parse=wV;ps.parseWithComments=z9;ps.print=CV;ps.strip=xV;var yV=/\*\/$/,gV=/^\/\*\*?/,U9=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,bV=/(^|\s+)\/\/([^\r\n]*)/g,j9=/^(\r?\n)+/,vV=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,F9=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,TV=/(\r?\n|^) *\* ?/g,q9=[];function SV(e){let t=e.match(U9);return t?t[0].trimLeft():""}function xV(e){let t=e.match(U9);return t&&t[0]?e.substring(t[0].length):e}function wV(e){return z9(e).pragmas}function z9(e){let t=` -`;e=e.replace(gV,"").replace(yV,"").replace(TV,"$1");let r="";for(;r!==e;)r=e,e=e.replace(vV,`${t}$1 $2${t}`);e=e.replace(j9,"").trimRight();let a=Object.create(null),_=e.replace(F9,"").replace(j9,"").trimRight(),p;for(;p=F9.exec(e);){let d=p[2].replace(bV,"");typeof a[p[1]]=="string"||Array.isArray(a[p[1]])?a[p[1]]=q9.concat(a[p[1]],d):a[p[1]]=d}return{comments:_,pragmas:a}}function CV({comments:e="",pragmas:t={}}){let r=` -`,a="/**",_=" *",p=" */",d=Object.keys(t),h=d.flatMap(v=>B9(v,t[v])).map(v=>`${_} ${v}${r}`).join("");if(!e){if(d.length===0)return"";if(d.length===1&&!Array.isArray(t[d[0]])){let v=t[d[0]];return`${a} ${B9(d[0],v)[0]}${p}`}}let l=e.split(r).map(v=>`${_} ${v}`).join(r)+r;return a+r+(e?l:"")+(e&&d.length?_+r:"")+h+p}function B9(e,t){return q9.concat(t).map(r=>`@${e} ${r}`.trim())}});var HV={};Hh(HV,{parsers:()=>kb});var kb={};Hh(kb,{typescript:()=>VV});var r5=Ob(L9(),1);function mV(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var J9=mV;function hV(e){let t=[];for(let r of e)try{return r()}catch(a){t.push(a)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var R9=hV;var H_=Ob(W9(),1);function EV(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` -`);return t===-1?e:e.slice(0,t)}var V9=EV;function AV(e){let t=V9(e);t&&(e=e.slice(t.length+1));let r=(0,H_.extract)(e),{pragmas:a,comments:_}=(0,H_.parseWithComments)(r);return{shebang:t,text:e,pragmas:a,comments:_}}function H9(e){let{pragmas:t}=AV(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function kV(e){return Array.isArray(e)&&e.length>0}var Zm=kV;function Fn(e){var a;let t=e.range?e.range[0]:e.start,r=((a=e.declaration)==null?void 0:a.decorators)??e.decorators;return Zm(r)?Math.min(Fn(r[0]),t):t}function ra(e){return e.range?e.range[1]:e.end}function DV(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:H9,locStart:Fn,locEnd:ra,...e}}var G9=DV;function PV(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var X9=PV;var IV=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Sb=IV;function NV(e){return e=new Set(e),t=>e.has(t==null?void 0:t.type)}var $9=NV;var OV=$9(["Block","CommentBlock","MultiLine"]),gu=OV;function MV(e){return gu(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var Q9=MV;function LV(e){let t=`*${e.value}*`.split(` -`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var xb=LV;var bu=null;function vu(e){if(bu!==null&&typeof bu.property){let t=bu;return bu=vu.prototype=null,t}return bu=vu.prototype=e??Object.create(null),new vu}var JV=10;for(let e=0;e<=JV;e++)vu();function wb(e){return vu(e)}function RV(e,t="type"){wb(e);function r(a){let _=a[t],p=e[_];if(!Array.isArray(p))throw Object.assign(new Error(`Missing visitor keys for '${_}'.`),{node:a});return p}return r}var Y9=RV;var K9={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var jV=Y9(K9),Z9=jV;function Cb(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let a=0;a{var h;(h=d.leadingComments)!=null&&h.some(Q9)&&p.add(Fn(d))}),e=e1(e,d=>{if(d.type==="ParenthesizedExpression"){let{expression:h}=d;if(h.type==="TypeCastExpression")return h.range=d.range,h;let l=Fn(d);if(!p.has(l))return h.extra={...h.extra,parenthesized:!0},h}})}if(e=e1(e,p=>{switch(p.type){case"LogicalExpression":if(e5(p))return Eb(p);break;case"VariableDeclaration":{let d=Sb(!1,p.declarations,-1);d!=null&&d.init&&_(p,d);break}case"TSParenthesizedType":return p.typeAnnotation;case"TSTypeParameter":if(typeof p.name=="string"){let d=Fn(p);p.name={type:"Identifier",name:p.name,range:[d,d+p.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:d}=p;if(r==="meriyah"&&(d==null?void 0:d.type)==="Identifier"){let h=a.slice(Fn(d),ra(d));(h.startsWith('"')||h.startsWith("'"))&&(p.exported={...p.exported,type:"Literal",value:p.exported.name,raw:h})}break}case"TSUnionType":case"TSIntersectionType":if(p.types.length===1)return p.types[0];break}}),Zm(e.comments)){let p=Sb(!1,e.comments,-1);for(let d=e.comments.length-2;d>=0;d--){let h=e.comments[d];ra(h)===Fn(p)&&gu(h)&&gu(p)&&xb(h)&&xb(p)&&(e.comments.splice(d+1,1),h.value+="*//*"+p.value,h.range=[Fn(h),ra(p)]),p=h}}return e.type==="Program"&&(e.range=[0,a.length]),e;function _(p,d){a[ra(d)]!==";"&&(p.range=[Fn(p),ra(d)])}}function e5(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function Eb(e){return e5(e)?Eb({type:"LogicalExpression",operator:e.operator,left:Eb({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[Fn(e.left),ra(e.right.left)]}),right:e.right.right,range:[Fn(e),ra(e)]}):e}var t5=FV;var Ab={loc:!0,range:!0,comment:!0,tokens:!0,loggerFn:!1,project:[],suppressDeprecatedPropertyWarnings:!0};function BV(e){let{message:t,location:r}=e;if(!r)return e;let{start:a,end:_}=r;return J9(t,{loc:{start:{line:a.line,column:a.column+1},end:{line:_.line,column:_.column+1}},cause:e})}var UV=e=>/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/i.test(e);function qV(e,t){let r=t==null?void 0:t.filepath;if(r&&UV(r))return[{...Ab,filePath:r}];let a=WV(e);return[{...Ab,jsx:a},{...Ab,jsx:!a}]}function zV(e,t){let r=X9(e),a=qV(e,t),_;try{_=R9(a.map(p=>()=>(0,r5.parse)(r,p)))}catch({errors:[p]}){throw BV(p)}return t5(_,{text:e})}function WV(e){return new RegExp(["(?:^[^\"'`]*)"].join(""),"m").test(e)}var VV=G9(zV);return wf(HV);}); \ No newline at end of file +`;function ue(be,ge){X[be]+=ge}}function Fn(w){switch(w){case 3:return"\u2502";case 12:return"\u2500";case 5:return"\u256F";case 9:return"\u2570";case 6:return"\u256E";case 10:return"\u256D";case 7:return"\u2524";case 11:return"\u251C";case 13:return"\u2534";case 14:return"\u252C";case 15:return"\u256B"}return" "}function R(w,f){if(w.fill)w.fill(f);else for(let X=0;X0?w.repeat(f):"";let X="";for(;X.length{},NE=()=>{},OE=()=>{},ga=Date.now,ME=()=>{},ed=new Proxy(()=>{},{get:()=>ed});function A6(e){if(bg){let t=uy.get(e)??0;uy.set(e,t+1),nd.set(e,ga()),td==null||td.mark(e),typeof onProfilerEvent=="function"&&onProfilerEvent(e)}}function LE(e,t,n){if(bg){let a=(n!==void 0?nd.get(n):void 0)??ga(),_=(t!==void 0?nd.get(t):void 0)??Bv,p=py.get(e)||0;py.set(e,p+(a-_)),td==null||td.measure(e,t,n)}}var td,JE,bg,Bv,nd,uy,py,Pz=It({"src/compiler/performance.ts"(){"use strict";En(),JE={enter:gr,exit:gr},bg=!1,Bv=ga(),nd=new Map,uy=new Map,py=new Map}}),Uv=()=>{},RE=()=>{},ba;function jE(e,t=!0){let n=pd[e.category];return t?n.toLowerCase():n}var rd,id,ad,fy,od,dy,my,Tl,hy,sd,yy,gy,by,vy,Ty,Sy,xy,wy,Ey,Cy,Ay,ky,Dy,Py,Iy,_d,Ny,Oy,My,Ly,cd,ld,Jy,Ry,jy,Fy,By,Uy,ud,qy,zy,Wy,Vy,Hy,Gy,pd,Xy,$y,Qy,Yy,Ky,Zy,e0,t0,n0,fd,r0,i0,a0,o0,s0,dd,md,hd,_0,c0,l0,u0,p0,f0,d0,m0,Vd,h0,qv=It({"src/compiler/types.ts"(){"use strict";rd=(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.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKeyword",e[e.ForKeyword=99]="ForKeyword",e[e.FunctionKeyword=100]="FunctionKeyword",e[e.IfKeyword=101]="IfKeyword",e[e.ImportKeyword=102]="ImportKeyword",e[e.InKeyword=103]="InKeyword",e[e.InstanceOfKeyword=104]="InstanceOfKeyword",e[e.NewKeyword=105]="NewKeyword",e[e.NullKeyword=106]="NullKeyword",e[e.ReturnKeyword=107]="ReturnKeyword",e[e.SuperKeyword=108]="SuperKeyword",e[e.SwitchKeyword=109]="SwitchKeyword",e[e.ThisKeyword=110]="ThisKeyword",e[e.ThrowKeyword=111]="ThrowKeyword",e[e.TrueKeyword=112]="TrueKeyword",e[e.TryKeyword=113]="TryKeyword",e[e.TypeOfKeyword=114]="TypeOfKeyword",e[e.VarKeyword=115]="VarKeyword",e[e.VoidKeyword=116]="VoidKeyword",e[e.WhileKeyword=117]="WhileKeyword",e[e.WithKeyword=118]="WithKeyword",e[e.ImplementsKeyword=119]="ImplementsKeyword",e[e.InterfaceKeyword=120]="InterfaceKeyword",e[e.LetKeyword=121]="LetKeyword",e[e.PackageKeyword=122]="PackageKeyword",e[e.PrivateKeyword=123]="PrivateKeyword",e[e.ProtectedKeyword=124]="ProtectedKeyword",e[e.PublicKeyword=125]="PublicKeyword",e[e.StaticKeyword=126]="StaticKeyword",e[e.YieldKeyword=127]="YieldKeyword",e[e.AbstractKeyword=128]="AbstractKeyword",e[e.AccessorKeyword=129]="AccessorKeyword",e[e.AsKeyword=130]="AsKeyword",e[e.AssertsKeyword=131]="AssertsKeyword",e[e.AssertKeyword=132]="AssertKeyword",e[e.AnyKeyword=133]="AnyKeyword",e[e.AsyncKeyword=134]="AsyncKeyword",e[e.AwaitKeyword=135]="AwaitKeyword",e[e.BooleanKeyword=136]="BooleanKeyword",e[e.ConstructorKeyword=137]="ConstructorKeyword",e[e.DeclareKeyword=138]="DeclareKeyword",e[e.GetKeyword=139]="GetKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.QualifiedName=166]="QualifiedName",e[e.ComputedPropertyName=167]="ComputedPropertyName",e[e.TypeParameter=168]="TypeParameter",e[e.Parameter=169]="Parameter",e[e.Decorator=170]="Decorator",e[e.PropertySignature=171]="PropertySignature",e[e.PropertyDeclaration=172]="PropertyDeclaration",e[e.MethodSignature=173]="MethodSignature",e[e.MethodDeclaration=174]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=175]="ClassStaticBlockDeclaration",e[e.Constructor=176]="Constructor",e[e.GetAccessor=177]="GetAccessor",e[e.SetAccessor=178]="SetAccessor",e[e.CallSignature=179]="CallSignature",e[e.ConstructSignature=180]="ConstructSignature",e[e.IndexSignature=181]="IndexSignature",e[e.TypePredicate=182]="TypePredicate",e[e.TypeReference=183]="TypeReference",e[e.FunctionType=184]="FunctionType",e[e.ConstructorType=185]="ConstructorType",e[e.TypeQuery=186]="TypeQuery",e[e.TypeLiteral=187]="TypeLiteral",e[e.ArrayType=188]="ArrayType",e[e.TupleType=189]="TupleType",e[e.OptionalType=190]="OptionalType",e[e.RestType=191]="RestType",e[e.UnionType=192]="UnionType",e[e.IntersectionType=193]="IntersectionType",e[e.ConditionalType=194]="ConditionalType",e[e.InferType=195]="InferType",e[e.ParenthesizedType=196]="ParenthesizedType",e[e.ThisType=197]="ThisType",e[e.TypeOperator=198]="TypeOperator",e[e.IndexedAccessType=199]="IndexedAccessType",e[e.MappedType=200]="MappedType",e[e.LiteralType=201]="LiteralType",e[e.NamedTupleMember=202]="NamedTupleMember",e[e.TemplateLiteralType=203]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=204]="TemplateLiteralTypeSpan",e[e.ImportType=205]="ImportType",e[e.ObjectBindingPattern=206]="ObjectBindingPattern",e[e.ArrayBindingPattern=207]="ArrayBindingPattern",e[e.BindingElement=208]="BindingElement",e[e.ArrayLiteralExpression=209]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=210]="ObjectLiteralExpression",e[e.PropertyAccessExpression=211]="PropertyAccessExpression",e[e.ElementAccessExpression=212]="ElementAccessExpression",e[e.CallExpression=213]="CallExpression",e[e.NewExpression=214]="NewExpression",e[e.TaggedTemplateExpression=215]="TaggedTemplateExpression",e[e.TypeAssertionExpression=216]="TypeAssertionExpression",e[e.ParenthesizedExpression=217]="ParenthesizedExpression",e[e.FunctionExpression=218]="FunctionExpression",e[e.ArrowFunction=219]="ArrowFunction",e[e.DeleteExpression=220]="DeleteExpression",e[e.TypeOfExpression=221]="TypeOfExpression",e[e.VoidExpression=222]="VoidExpression",e[e.AwaitExpression=223]="AwaitExpression",e[e.PrefixUnaryExpression=224]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=225]="PostfixUnaryExpression",e[e.BinaryExpression=226]="BinaryExpression",e[e.ConditionalExpression=227]="ConditionalExpression",e[e.TemplateExpression=228]="TemplateExpression",e[e.YieldExpression=229]="YieldExpression",e[e.SpreadElement=230]="SpreadElement",e[e.ClassExpression=231]="ClassExpression",e[e.OmittedExpression=232]="OmittedExpression",e[e.ExpressionWithTypeArguments=233]="ExpressionWithTypeArguments",e[e.AsExpression=234]="AsExpression",e[e.NonNullExpression=235]="NonNullExpression",e[e.MetaProperty=236]="MetaProperty",e[e.SyntheticExpression=237]="SyntheticExpression",e[e.SatisfiesExpression=238]="SatisfiesExpression",e[e.TemplateSpan=239]="TemplateSpan",e[e.SemicolonClassElement=240]="SemicolonClassElement",e[e.Block=241]="Block",e[e.EmptyStatement=242]="EmptyStatement",e[e.VariableStatement=243]="VariableStatement",e[e.ExpressionStatement=244]="ExpressionStatement",e[e.IfStatement=245]="IfStatement",e[e.DoStatement=246]="DoStatement",e[e.WhileStatement=247]="WhileStatement",e[e.ForStatement=248]="ForStatement",e[e.ForInStatement=249]="ForInStatement",e[e.ForOfStatement=250]="ForOfStatement",e[e.ContinueStatement=251]="ContinueStatement",e[e.BreakStatement=252]="BreakStatement",e[e.ReturnStatement=253]="ReturnStatement",e[e.WithStatement=254]="WithStatement",e[e.SwitchStatement=255]="SwitchStatement",e[e.LabeledStatement=256]="LabeledStatement",e[e.ThrowStatement=257]="ThrowStatement",e[e.TryStatement=258]="TryStatement",e[e.DebuggerStatement=259]="DebuggerStatement",e[e.VariableDeclaration=260]="VariableDeclaration",e[e.VariableDeclarationList=261]="VariableDeclarationList",e[e.FunctionDeclaration=262]="FunctionDeclaration",e[e.ClassDeclaration=263]="ClassDeclaration",e[e.InterfaceDeclaration=264]="InterfaceDeclaration",e[e.TypeAliasDeclaration=265]="TypeAliasDeclaration",e[e.EnumDeclaration=266]="EnumDeclaration",e[e.ModuleDeclaration=267]="ModuleDeclaration",e[e.ModuleBlock=268]="ModuleBlock",e[e.CaseBlock=269]="CaseBlock",e[e.NamespaceExportDeclaration=270]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=271]="ImportEqualsDeclaration",e[e.ImportDeclaration=272]="ImportDeclaration",e[e.ImportClause=273]="ImportClause",e[e.NamespaceImport=274]="NamespaceImport",e[e.NamedImports=275]="NamedImports",e[e.ImportSpecifier=276]="ImportSpecifier",e[e.ExportAssignment=277]="ExportAssignment",e[e.ExportDeclaration=278]="ExportDeclaration",e[e.NamedExports=279]="NamedExports",e[e.NamespaceExport=280]="NamespaceExport",e[e.ExportSpecifier=281]="ExportSpecifier",e[e.MissingDeclaration=282]="MissingDeclaration",e[e.ExternalModuleReference=283]="ExternalModuleReference",e[e.JsxElement=284]="JsxElement",e[e.JsxSelfClosingElement=285]="JsxSelfClosingElement",e[e.JsxOpeningElement=286]="JsxOpeningElement",e[e.JsxClosingElement=287]="JsxClosingElement",e[e.JsxFragment=288]="JsxFragment",e[e.JsxOpeningFragment=289]="JsxOpeningFragment",e[e.JsxClosingFragment=290]="JsxClosingFragment",e[e.JsxAttribute=291]="JsxAttribute",e[e.JsxAttributes=292]="JsxAttributes",e[e.JsxSpreadAttribute=293]="JsxSpreadAttribute",e[e.JsxExpression=294]="JsxExpression",e[e.JsxNamespacedName=295]="JsxNamespacedName",e[e.CaseClause=296]="CaseClause",e[e.DefaultClause=297]="DefaultClause",e[e.HeritageClause=298]="HeritageClause",e[e.CatchClause=299]="CatchClause",e[e.ImportAttributes=300]="ImportAttributes",e[e.ImportAttribute=301]="ImportAttribute",e[e.AssertClause=300]="AssertClause",e[e.AssertEntry=301]="AssertEntry",e[e.ImportTypeAssertionContainer=302]="ImportTypeAssertionContainer",e[e.PropertyAssignment=303]="PropertyAssignment",e[e.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",e[e.SpreadAssignment=305]="SpreadAssignment",e[e.EnumMember=306]="EnumMember",e[e.UnparsedPrologue=307]="UnparsedPrologue",e[e.UnparsedPrepend=308]="UnparsedPrepend",e[e.UnparsedText=309]="UnparsedText",e[e.UnparsedInternalText=310]="UnparsedInternalText",e[e.UnparsedSyntheticReference=311]="UnparsedSyntheticReference",e[e.SourceFile=312]="SourceFile",e[e.Bundle=313]="Bundle",e[e.UnparsedSource=314]="UnparsedSource",e[e.InputFiles=315]="InputFiles",e[e.JSDocTypeExpression=316]="JSDocTypeExpression",e[e.JSDocNameReference=317]="JSDocNameReference",e[e.JSDocMemberName=318]="JSDocMemberName",e[e.JSDocAllType=319]="JSDocAllType",e[e.JSDocUnknownType=320]="JSDocUnknownType",e[e.JSDocNullableType=321]="JSDocNullableType",e[e.JSDocNonNullableType=322]="JSDocNonNullableType",e[e.JSDocOptionalType=323]="JSDocOptionalType",e[e.JSDocFunctionType=324]="JSDocFunctionType",e[e.JSDocVariadicType=325]="JSDocVariadicType",e[e.JSDocNamepathType=326]="JSDocNamepathType",e[e.JSDoc=327]="JSDoc",e[e.JSDocComment=327]="JSDocComment",e[e.JSDocText=328]="JSDocText",e[e.JSDocTypeLiteral=329]="JSDocTypeLiteral",e[e.JSDocSignature=330]="JSDocSignature",e[e.JSDocLink=331]="JSDocLink",e[e.JSDocLinkCode=332]="JSDocLinkCode",e[e.JSDocLinkPlain=333]="JSDocLinkPlain",e[e.JSDocTag=334]="JSDocTag",e[e.JSDocAugmentsTag=335]="JSDocAugmentsTag",e[e.JSDocImplementsTag=336]="JSDocImplementsTag",e[e.JSDocAuthorTag=337]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=338]="JSDocDeprecatedTag",e[e.JSDocClassTag=339]="JSDocClassTag",e[e.JSDocPublicTag=340]="JSDocPublicTag",e[e.JSDocPrivateTag=341]="JSDocPrivateTag",e[e.JSDocProtectedTag=342]="JSDocProtectedTag",e[e.JSDocReadonlyTag=343]="JSDocReadonlyTag",e[e.JSDocOverrideTag=344]="JSDocOverrideTag",e[e.JSDocCallbackTag=345]="JSDocCallbackTag",e[e.JSDocOverloadTag=346]="JSDocOverloadTag",e[e.JSDocEnumTag=347]="JSDocEnumTag",e[e.JSDocParameterTag=348]="JSDocParameterTag",e[e.JSDocReturnTag=349]="JSDocReturnTag",e[e.JSDocThisTag=350]="JSDocThisTag",e[e.JSDocTypeTag=351]="JSDocTypeTag",e[e.JSDocTemplateTag=352]="JSDocTemplateTag",e[e.JSDocTypedefTag=353]="JSDocTypedefTag",e[e.JSDocSeeTag=354]="JSDocSeeTag",e[e.JSDocPropertyTag=355]="JSDocPropertyTag",e[e.JSDocThrowsTag=356]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=357]="JSDocSatisfiesTag",e[e.SyntaxList=358]="SyntaxList",e[e.NotEmittedStatement=359]="NotEmittedStatement",e[e.PartiallyEmittedExpression=360]="PartiallyEmittedExpression",e[e.CommaListExpression=361]="CommaListExpression",e[e.SyntheticReferenceExpression=362]="SyntheticReferenceExpression",e[e.Count=363]="Count",e[e.FirstAssignment=64]="FirstAssignment",e[e.LastAssignment=79]="LastAssignment",e[e.FirstCompoundAssignment=65]="FirstCompoundAssignment",e[e.LastCompoundAssignment=79]="LastCompoundAssignment",e[e.FirstReservedWord=83]="FirstReservedWord",e[e.LastReservedWord=118]="LastReservedWord",e[e.FirstKeyword=83]="FirstKeyword",e[e.LastKeyword=165]="LastKeyword",e[e.FirstFutureReservedWord=119]="FirstFutureReservedWord",e[e.LastFutureReservedWord=127]="LastFutureReservedWord",e[e.FirstTypeNode=182]="FirstTypeNode",e[e.LastTypeNode=205]="LastTypeNode",e[e.FirstPunctuation=19]="FirstPunctuation",e[e.LastPunctuation=79]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=165]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=9]="FirstLiteralToken",e[e.LastLiteralToken=15]="LastLiteralToken",e[e.FirstTemplateToken=15]="FirstTemplateToken",e[e.LastTemplateToken=18]="LastTemplateToken",e[e.FirstBinaryOperator=30]="FirstBinaryOperator",e[e.LastBinaryOperator=79]="LastBinaryOperator",e[e.FirstStatement=243]="FirstStatement",e[e.LastStatement=259]="LastStatement",e[e.FirstNode=166]="FirstNode",e[e.FirstJSDocNode=316]="FirstJSDocNode",e[e.LastJSDocNode=357]="LastJSDocNode",e[e.FirstJSDocTagNode=334]="FirstJSDocTagNode",e[e.LastJSDocTagNode=357]="LastJSDocTagNode",e[e.FirstContextualKeyword=128]="FirstContextualKeyword",e[e.LastContextualKeyword=165]="LastContextualKeyword",e))(rd||{}),id=(e=>(e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.AwaitUsing=6]="AwaitUsing",e[e.NestedNamespace=8]="NestedNamespace",e[e.Synthesized=16]="Synthesized",e[e.Namespace=32]="Namespace",e[e.OptionalChain=64]="OptionalChain",e[e.ExportContext=128]="ExportContext",e[e.ContainsThis=256]="ContainsThis",e[e.HasImplicitReturn=512]="HasImplicitReturn",e[e.HasExplicitReturn=1024]="HasExplicitReturn",e[e.GlobalAugmentation=2048]="GlobalAugmentation",e[e.HasAsyncFunctions=4096]="HasAsyncFunctions",e[e.DisallowInContext=8192]="DisallowInContext",e[e.YieldContext=16384]="YieldContext",e[e.DecoratorContext=32768]="DecoratorContext",e[e.AwaitContext=65536]="AwaitContext",e[e.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=262144]="ThisNodeHasError",e[e.JavaScriptFile=524288]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=2097152]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",e[e.JSDoc=16777216]="JSDoc",e[e.Ambient=33554432]="Ambient",e[e.InWithStatement=67108864]="InWithStatement",e[e.JsonFile=134217728]="JsonFile",e[e.TypeCached=268435456]="TypeCached",e[e.Deprecated=536870912]="Deprecated",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",e[e.ContextFlags=101441536]="ContextFlags",e[e.TypeExcludesFlags=81920]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",e))(id||{}),ad=(e=>(e[e.None=0]="None",e[e.Public=1]="Public",e[e.Private=2]="Private",e[e.Protected=4]="Protected",e[e.Readonly=8]="Readonly",e[e.Override=16]="Override",e[e.Export=32]="Export",e[e.Abstract=64]="Abstract",e[e.Ambient=128]="Ambient",e[e.Static=256]="Static",e[e.Accessor=512]="Accessor",e[e.Async=1024]="Async",e[e.Default=2048]="Default",e[e.Const=4096]="Const",e[e.In=8192]="In",e[e.Out=16384]="Out",e[e.Decorator=32768]="Decorator",e[e.Deprecated=65536]="Deprecated",e[e.JSDocPublic=8388608]="JSDocPublic",e[e.JSDocPrivate=16777216]="JSDocPrivate",e[e.JSDocProtected=33554432]="JSDocProtected",e[e.JSDocReadonly=67108864]="JSDocReadonly",e[e.JSDocOverride=134217728]="JSDocOverride",e[e.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",e[e.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",e[e.SyntacticModifiers=65535]="SyntacticModifiers",e[e.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",e[e.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",e[e.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",e[e.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=7]="AccessibilityModifier",e[e.ParameterPropertyModifier=31]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=28895]="TypeScriptModifier",e[e.ExportDefault=2080]="ExportDefault",e[e.All=131071]="All",e[e.Modifier=98303]="Modifier",e))(ad||{}),fy=(e=>(e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement",e))(fy||{}),od=(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))(od||{}),dy=(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))(dy||{}),my=(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.HexEscape=4096]="HexEscape",e[e.ContainsLeadingZero=8192]="ContainsLeadingZero",e[e.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.WithSpecifier=448]="WithSpecifier",e[e.StringLiteralFlags=7176]="StringLiteralFlags",e[e.NumericLiteralFlags=25584]="NumericLiteralFlags",e[e.TemplateLiteralLikeFlags=7176]="TemplateLiteralLikeFlags",e[e.IsInvalid=26656]="IsInvalid",e))(my||{}),Tl=(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))(Tl||{}),hy=(e=>(e[e.ExpectError=0]="ExpectError",e[e.Ignore=1]="Ignore",e))(hy||{}),sd=class{},yy=(e=>(e[e.RootFile=0]="RootFile",e[e.SourceFromProjectReference=1]="SourceFromProjectReference",e[e.OutputFromProjectReference=2]="OutputFromProjectReference",e[e.Import=3]="Import",e[e.ReferenceFile=4]="ReferenceFile",e[e.TypeReferenceDirective=5]="TypeReferenceDirective",e[e.LibFile=6]="LibFile",e[e.LibReferenceDirective=7]="LibReferenceDirective",e[e.AutomaticTypeDirectiveFile=8]="AutomaticTypeDirectiveFile",e))(yy||{}),gy=(e=>(e[e.FilePreprocessingReferencedDiagnostic=0]="FilePreprocessingReferencedDiagnostic",e[e.FilePreprocessingFileExplainingDiagnostic=1]="FilePreprocessingFileExplainingDiagnostic",e[e.ResolutionDiagnostics=2]="ResolutionDiagnostics",e))(gy||{}),by=(e=>(e[e.Js=0]="Js",e[e.Dts=1]="Dts",e))(by||{}),vy=(e=>(e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely",e))(vy||{}),Ty=(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))(Ty||{}),Sy=(e=>(e[e.Ok=0]="Ok",e[e.NeedsOverride=1]="NeedsOverride",e[e.HasInvalidOverride=2]="HasInvalidOverride",e))(Sy||{}),xy=(e=>(e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype",e))(xy||{}),wy=(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))(wy||{}),Ey=(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.OmitThisParameter=33554432]="OmitThisParameter",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",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.WriteComputedProps=1073741824]="WriteComputedProps",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))(Ey||{}),Cy=(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.OmitThisParameter=33554432]="OmitThisParameter",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.NodeBuilderFlagsMask=848330091]="NodeBuilderFlagsMask",e))(Cy||{}),Ay=(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.WriteComputedProps=16]="WriteComputedProps",e[e.DoNotIncludeSymbolChain=32]="DoNotIncludeSymbolChain",e))(Ay||{}),ky=(e=>(e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed",e))(ky||{}),Dy=(e=>(e[e.UnionOrIntersection=0]="UnionOrIntersection",e[e.Spread=1]="Spread",e))(Dy||{}),Py=(e=>(e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier",e))(Py||{}),Iy=(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))(Iy||{}),_d=(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.AccessorExcludes=13247]="AccessorExcludes",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))(_d||{}),Ny=(e=>(e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal",e))(Ny||{}),Oy=(e=>(e[e.None=0]="None",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.Unresolved=1048576]="Unresolved",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=192]="Discriminant",e[e.Partial=48]="Partial",e))(Oy||{}),My=(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))(My||{}),Ly=(e=>(e[e.None=0]="None",e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",e[e.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",e[e.CaptureArguments=512]="CaptureArguments",e[e.EnumValuesComputed=1024]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",e[e.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",e[e.AssignmentsMarked=131072]="AssignmentsMarked",e[e.ContainsConstructorReference=262144]="ContainsConstructorReference",e[e.ConstructorReference=536870912]="ConstructorReference",e[e.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",e[e.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",e[e.InCheckIdentifier=4194304]="InCheckIdentifier",e))(Ly||{}),cd=(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=109472]="Unit",e[e.Freshable=2976]="Freshable",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.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.Primitive=402784252]="Primitive",e[e.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",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.Singleton=67358815]="Singleton",e[e.Narrowable=536624127]="Narrowable",e[e.IncludesMask=473694207]="IncludesMask",e[e.IncludesMissingType=262144]="IncludesMissingType",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject",e[e.IncludesInstantiable=33554432]="IncludesInstantiable",e[e.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",e))(cd||{}),ld=(e=>(e[e.None=0]="None",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.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.InstantiatedMapped=96]="InstantiatedMapped",e[e.ObjectTypeKindMask=1343]="ObjectTypeKindMask",e[e.ContainsSpread=2097152]="ContainsSpread",e[e.ObjectRestType=4194304]="ObjectRestType",e[e.InstantiationExpressionType=8388608]="InstantiationExpressionType",e[e.IsClassInstanceClone=16777216]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",e[e.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",e[e.IsGenericObjectType=4194304]="IsGenericObjectType",e[e.IsGenericIndexType=8388608]="IsGenericIndexType",e[e.IsGenericType=12582912]="IsGenericType",e[e.ContainsIntersections=16777216]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=33554432]="IsNeverIntersection",e))(ld||{}),Jy=(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))(Jy||{}),Ry=(e=>(e[e.Required=1]="Required",e[e.Optional=2]="Optional",e[e.Rest=4]="Rest",e[e.Variadic=8]="Variadic",e[e.Fixed=3]="Fixed",e[e.Variable=12]="Variable",e[e.NonRequired=14]="NonRequired",e[e.NonRest=11]="NonRest",e))(Ry||{}),jy=(e=>(e[e.None=0]="None",e[e.IncludeUndefined=1]="IncludeUndefined",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.Writing=4]="Writing",e[e.CacheSymbol=8]="CacheSymbol",e[e.NoTupleBoundsCheck=16]="NoTupleBoundsCheck",e[e.ExpressionPosition=32]="ExpressionPosition",e[e.ReportDeprecated=64]="ReportDeprecated",e[e.SuppressNoImplicitAnyError=128]="SuppressNoImplicitAnyError",e[e.Contextual=256]="Contextual",e[e.Persistent=1]="Persistent",e))(jy||{}),Fy=(e=>(e[e.None=0]="None",e[e.StringsOnly=1]="StringsOnly",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.NoReducibleCheck=4]="NoReducibleCheck",e))(Fy||{}),By=(e=>(e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed",e))(By||{}),Uy=(e=>(e[e.Call=0]="Call",e[e.Construct=1]="Construct",e))(Uy||{}),ud=(e=>(e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Abstract=4]="Abstract",e[e.IsInnerCallChain=8]="IsInnerCallChain",e[e.IsOuterCallChain=16]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=64]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=167]="PropagatingFlags",e[e.CallChainFlags=24]="CallChainFlags",e))(ud||{}),qy=(e=>(e[e.String=0]="String",e[e.Number=1]="Number",e))(qy||{}),zy=(e=>(e[e.Simple=0]="Simple",e[e.Array=1]="Array",e[e.Deferred=2]="Deferred",e[e.Function=3]="Function",e[e.Composite=4]="Composite",e[e.Merged=5]="Merged",e))(zy||{}),Wy=(e=>(e[e.None=0]="None",e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.SpeculativeTuple=2]="SpeculativeTuple",e[e.SubstituteSource=4]="SubstituteSource",e[e.HomomorphicMappedType=8]="HomomorphicMappedType",e[e.PartialHomomorphicMappedType=16]="PartialHomomorphicMappedType",e[e.MappedTypeConstraint=32]="MappedTypeConstraint",e[e.ContravariantConditional=64]="ContravariantConditional",e[e.ReturnType=128]="ReturnType",e[e.LiteralKeyof=256]="LiteralKeyof",e[e.NoConstraints=512]="NoConstraints",e[e.AlwaysStrict=1024]="AlwaysStrict",e[e.MaxValue=2048]="MaxValue",e[e.PriorityImpliesCombination=416]="PriorityImpliesCombination",e[e.Circularity=-1]="Circularity",e))(Wy||{}),Vy=(e=>(e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction",e))(Vy||{}),Hy=(e=>(e[e.False=0]="False",e[e.Unknown=1]="Unknown",e[e.Maybe=3]="Maybe",e[e.True=-1]="True",e))(Hy||{}),Gy=(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))(Gy||{}),pd=(e=>(e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message",e))(pd||{}),Xy=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e[e.Node10=2]="Node10",e[e.Node16=3]="Node16",e[e.NodeNext=99]="NodeNext",e[e.Bundler=100]="Bundler",e))(Xy||{}),$y=(e=>(e[e.Legacy=1]="Legacy",e[e.Auto=2]="Auto",e[e.Force=3]="Force",e))($y||{}),Qy=(e=>(e[e.FixedPollingInterval=0]="FixedPollingInterval",e[e.PriorityPollingInterval=1]="PriorityPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e[e.UseFsEvents=4]="UseFsEvents",e[e.UseFsEventsOnParentDirectory=5]="UseFsEventsOnParentDirectory",e))(Qy||{}),Yy=(e=>(e[e.UseFsEvents=0]="UseFsEvents",e[e.FixedPollingInterval=1]="FixedPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e))(Yy||{}),Ky=(e=>(e[e.FixedInterval=0]="FixedInterval",e[e.PriorityInterval=1]="PriorityInterval",e[e.DynamicPriority=2]="DynamicPriority",e[e.FixedChunkSize=3]="FixedChunkSize",e))(Ky||{}),Zy=(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.ES2022=7]="ES2022",e[e.ESNext=99]="ESNext",e[e.Node16=100]="Node16",e[e.NodeNext=199]="NodeNext",e))(Zy||{}),e0=(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))(e0||{}),t0=(e=>(e[e.Remove=0]="Remove",e[e.Preserve=1]="Preserve",e[e.Error=2]="Error",e))(t0||{}),n0=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(n0||{}),fd=(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))(fd||{}),r0=(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.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(r0||{}),i0=(e=>(e[e.Standard=0]="Standard",e[e.JSX=1]="JSX",e))(i0||{}),a0=(e=>(e[e.None=0]="None",e[e.Recursive=1]="Recursive",e))(a0||{}),o0=(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.replacementCharacter=65533]="replacementCharacter",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))(o0||{}),s0=(e=>(e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo",e.Mjs=".mjs",e.Mts=".mts",e.Dmts=".d.mts",e.Cjs=".cjs",e.Cts=".cts",e.Dcts=".d.cts",e))(s0||{}),dd=(e=>(e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2022=8]="ContainsES2022",e[e.ContainsES2021=16]="ContainsES2021",e[e.ContainsES2020=32]="ContainsES2020",e[e.ContainsES2019=64]="ContainsES2019",e[e.ContainsES2018=128]="ContainsES2018",e[e.ContainsES2017=256]="ContainsES2017",e[e.ContainsES2016=512]="ContainsES2016",e[e.ContainsES2015=1024]="ContainsES2015",e[e.ContainsGenerator=2048]="ContainsGenerator",e[e.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=16384]="ContainsLexicalThis",e[e.ContainsRestOrSpread=32768]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=524288]="ContainsBindingPattern",e[e.ContainsYield=1048576]="ContainsYield",e[e.ContainsAwait=2097152]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=8388608]="ContainsDynamicImport",e[e.ContainsClassFields=16777216]="ContainsClassFields",e[e.ContainsDecorators=33554432]="ContainsDecorators",e[e.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",e[e.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",e[e.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",e[e.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",e[e.HasComputedFlags=-2147483648]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2022=8]="AssertES2022",e[e.AssertES2021=16]="AssertES2021",e[e.AssertES2020=32]="AssertES2020",e[e.AssertES2019=64]="AssertES2019",e[e.AssertES2018=128]="AssertES2018",e[e.AssertES2017=256]="AssertES2017",e[e.AssertES2016=512]="AssertES2016",e[e.AssertES2015=1024]="AssertES2015",e[e.AssertGenerator=2048]="AssertGenerator",e[e.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",e[e.NodeExcludes=-2147483648]="NodeExcludes",e[e.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",e[e.FunctionExcludes=-1937940480]="FunctionExcludes",e[e.ConstructorExcludes=-1937948672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",e[e.PropertyExcludes=-2013249536]="PropertyExcludes",e[e.ClassExcludes=-2147344384]="ClassExcludes",e[e.ModuleExcludes=-1941676032]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",e[e.ParameterExcludes=-2147483648]="ParameterExcludes",e[e.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",e[e.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",e[e.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",e[e.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",e))(dd||{}),md=(e=>(e[e.TabStop=0]="TabStop",e[e.Placeholder=1]="Placeholder",e[e.Choice=2]="Choice",e[e.Variable=3]="Variable",e))(md||{}),hd=(e=>(e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.MultiLine=2]="MultiLine",e[e.AdviseOnEmitNode=4]="AdviseOnEmitNode",e[e.NoSubstitution=8]="NoSubstitution",e[e.CapturesThis=16]="CapturesThis",e[e.NoLeadingSourceMap=32]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=64]="NoTrailingSourceMap",e[e.NoSourceMap=96]="NoSourceMap",e[e.NoNestedSourceMaps=128]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=768]="NoTokenSourceMaps",e[e.NoLeadingComments=1024]="NoLeadingComments",e[e.NoTrailingComments=2048]="NoTrailingComments",e[e.NoComments=3072]="NoComments",e[e.NoNestedComments=4096]="NoNestedComments",e[e.HelperName=8192]="HelperName",e[e.ExportName=16384]="ExportName",e[e.LocalName=32768]="LocalName",e[e.InternalName=65536]="InternalName",e[e.Indented=131072]="Indented",e[e.NoIndentation=262144]="NoIndentation",e[e.AsyncFunctionBody=524288]="AsyncFunctionBody",e[e.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",e[e.CustomPrologue=2097152]="CustomPrologue",e[e.NoHoisting=4194304]="NoHoisting",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e))(hd||{}),_0=(e=>(e[e.None=0]="None",e[e.TypeScriptClassWrapper=1]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=2]="NeverApplyImportHelper",e[e.IgnoreSourceNewlines=4]="IgnoreSourceNewlines",e[e.Immutable=8]="Immutable",e[e.IndirectCall=16]="IndirectCall",e[e.TransformPrivateStaticElements=32]="TransformPrivateStaticElements",e))(_0||{}),c0=(e=>(e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.ESDecorateAndRunInitializers=8]="ESDecorateAndRunInitializers",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.SpreadArray=1024]="SpreadArray",e[e.Await=2048]="Await",e[e.AsyncGenerator=4096]="AsyncGenerator",e[e.AsyncDelegator=8192]="AsyncDelegator",e[e.AsyncValues=16384]="AsyncValues",e[e.ExportStar=32768]="ExportStar",e[e.ImportStar=65536]="ImportStar",e[e.ImportDefault=131072]="ImportDefault",e[e.MakeTemplateObject=262144]="MakeTemplateObject",e[e.ClassPrivateFieldGet=524288]="ClassPrivateFieldGet",e[e.ClassPrivateFieldSet=1048576]="ClassPrivateFieldSet",e[e.ClassPrivateFieldIn=2097152]="ClassPrivateFieldIn",e[e.CreateBinding=4194304]="CreateBinding",e[e.SetFunctionName=8388608]="SetFunctionName",e[e.PropKey=16777216]="PropKey",e[e.AddDisposableResourceAndDisposeResources=33554432]="AddDisposableResourceAndDisposeResources",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=33554432]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=16384]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=6144]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=26624]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes",e))(c0||{}),l0=(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))(l0||{}),u0=(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[e.ExcludeJSDocTypeAssertion=16]="ExcludeJSDocTypeAssertion",e))(u0||{}),p0=(e=>(e[e.None=0]="None",e[e.InParameters=1]="InParameters",e[e.VariablesHoistedInParameters=2]="VariablesHoistedInParameters",e))(p0||{}),f0=(e=>(e.Prologue="prologue",e.EmitHelpers="emitHelpers",e.NoDefaultLib="no-default-lib",e.Reference="reference",e.Type="type",e.TypeResolutionModeRequire="type-require",e.TypeResolutionModeImport="type-import",e.Lib="lib",e.Prepend="prepend",e.Text="text",e.Internal="internal",e))(f0||{}),d0=(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=2359808]="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.ImportAttributes=526226]="ImportAttributes",e[e.ImportClauseEntries=526226]="ImportClauseEntries",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))(d0||{}),m0=(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))(m0||{}),Vd={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},{name:"resolution-mode",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}},h0=(e=>(e[e.ParseAll=0]="ParseAll",e[e.ParseNone=1]="ParseNone",e[e.ParseForTypeErrors=2]="ParseForTypeErrors",e[e.ParseForTypeInfo=3]="ParseForTypeInfo",e))(h0||{})}}),FE=()=>{},y0;function vg(e){return e===47||e===92}function BE(e){return jl(e)<0}function b_(e){return jl(e)>0}function UE(e){let t=jl(e);return t>0&&t===e.length}function Tg(e){return jl(e)!==0}function as(e){return/^\.\.?($|[\\/])/.test(e)}function qE(e){return!Tg(e)&&!as(e)}function zv(e){return os(e).includes(".")}function Na(e,t){return e.length>t.length&&is(e,t)}function ii(e,t){for(let n of t)if(Na(e,n))return!0;return!1}function Hd(e){return e.length>0&&vg(e.charCodeAt(e.length-1))}function k6(e){return e>=97&&e<=122||e>=65&&e<=90}function zE(e,t){let n=e.charCodeAt(t);if(n===58)return t+1;if(n===37&&e.charCodeAt(t+1)===51){let a=e.charCodeAt(t+2);if(a===97||a===65)return t+3}return-1}function jl(e){if(!e)return 0;let t=e.charCodeAt(0);if(t===47||t===92){if(e.charCodeAt(1)!==t)return 1;let a=e.indexOf(t===47?vr:Cg,2);return a<0?e.length:a+1}if(k6(t)&&e.charCodeAt(1)===58){let a=e.charCodeAt(2);if(a===47||a===92)return 3;if(e.length===2)return 2}let n=e.indexOf(b0);if(n!==-1){let a=n+b0.length,_=e.indexOf(vr,a);if(_!==-1){let p=e.slice(0,n),m=e.slice(a,_);if(p==="file"&&(m===""||m==="localhost")&&k6(e.charCodeAt(_+1))){let y=zE(e,_+2);if(y!==-1){if(e.charCodeAt(y)===47)return~(y+1);if(y===e.length)return~y}}return~(_+1)}return~e.length}return 0}function Ni(e){let t=jl(e);return t<0?~t:t}function Mi(e){e=Vo(e);let t=Ni(e);return t===e.length?e:(e=v_(e),e.slice(0,Math.max(t,e.lastIndexOf(vr))))}function os(e,t,n){if(e=Vo(e),Ni(e)===e.length)return"";e=v_(e);let _=e.slice(Math.max(Ni(e),e.lastIndexOf(vr)+1)),p=t!==void 0&&n!==void 0?yd(_,t,n):void 0;return p?_.slice(0,_.length-p.length):_}function D6(e,t,n){if(Hn(t,".")||(t="."+t),e.length>=t.length&&e.charCodeAt(e.length-t.length)===46){let a=e.slice(e.length-t.length);if(n(a,t))return a}}function WE(e,t,n){if(typeof t=="string")return D6(e,t,n)||"";for(let a of t){let _=D6(e,a,n);if(_)return _}return""}function yd(e,t,n){if(t)return WE(v_(e),t,n?s_:Rl);let a=os(e),_=a.lastIndexOf(".");return _>=0?a.substring(_):""}function VE(e,t){let n=e.substring(0,t),a=e.substring(t).split(vr);return a.length&&!Pi(a)&&a.pop(),[n,...a]}function Oi(e,t=""){return e=Qt(t,e),VE(e,Ni(e))}function Wo(e,t){return e.length===0?"":(e[0]&&to(e[0]))+e.slice(1,t).join(vr)}function Vo(e){return e.includes("\\")?e.replace($v,vr):e}function Ca(e){if(!Ze(e))return[];let t=[e[0]];for(let n=1;n1){if(t[t.length-1]!==".."){t.pop();continue}}else if(t[0])continue}t.push(a)}}return t}function Qt(e,...t){e&&(e=Vo(e));for(let n of t)n&&(n=Vo(n),!e||Ni(n)!==0?e=n:e=to(e)+n);return e}function g0(e,...t){return br(Ze(t)?Qt(e,...t):Vo(e))}function Gd(e,t){return Ca(Oi(e,t))}function Gi(e,t){return Wo(Gd(e,t))}function br(e){if(e=Vo(e),!Sl.test(e))return e;let t=e.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(t!==e&&(e=t,!Sl.test(e)))return e;let n=Wo(Ca(Oi(e)));return n&&Hd(e)?to(n):n}function HE(e){return e.length===0?"":e.slice(1).join(vr)}function GE(e,t){return HE(Gd(e,t))}function Di(e,t,n){let a=b_(e)?br(e):Gi(e,t);return n(a)}function v_(e){return Hd(e)?e.substr(0,e.length-1):e}function to(e){return Hd(e)?e:e+vr}function Sg(e){return!Tg(e)&&!as(e)?"./"+e:e}function Wv(e,t,n,a){let _=n!==void 0&&a!==void 0?yd(e,n,a):yd(e);return _?e.slice(0,e.length-_.length)+(Hn(t,".")?t:"."+t):e}function xg(e,t,n){if(e===t)return 0;if(e===void 0)return-1;if(t===void 0)return 1;let a=e.substring(0,Ni(e)),_=t.substring(0,Ni(t)),p=zd(a,_);if(p!==0)return p;let m=e.substring(a.length),y=t.substring(_.length);if(!Sl.test(m)&&!Sl.test(y))return n(m,y);let u=Ca(Oi(e)),x=Ca(Oi(t)),d=Math.min(u.length,x.length);for(let S=1;S0==Ni(t)>0,"Paths must either both be absolute or both be relative");let p=wg(e,t,(typeof n=="boolean"?n:!1)?s_:Rl,typeof n=="function"?n:bt);return Wo(p)}function YE(e,t,n){return b_(e)?Eg(t,e,t,n,!1):e}function KE(e,t,n){return Sg(Gv(Mi(e),t,n))}function Eg(e,t,n,a,_){let p=wg(g0(n,e),g0(n,t),Rl,a),m=p[0];if(_&&b_(m)){let y=m.charAt(0)===vr?"file://":"file:///";p[0]=y+m}return Wo(p)}function Xv(e,t){for(;;){let n=t(e);if(n!==void 0)return n;let a=Mi(e);if(a===e)return;e=a}}function ZE(e){return is(e,"/node_modules")}var vr,Cg,b0,$v,Sl,eC=It({"src/compiler/path.ts"(){"use strict";En(),vr="/",Cg="\\",b0="://",$v=/\\/g,Sl=/(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/}});function i(e,t,n,a,_,p,m){return{code:e,category:t,key:n,message:a,reportsUnnecessary:_,elidedInCompatabilityPyramid:p,reportsDeprecated:m}}var B,tC=It({"src/compiler/diagnosticInformationMap.generated.ts"(){"use strict";qv(),B={Unterminated_string_literal:i(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:i(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:i(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:i(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:i(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:i(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:i(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:i(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:i(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:i(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:i(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:i(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:i(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:i(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:i(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:i(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:i(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:i(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:i(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:i(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:i(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:i(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:i(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:i(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:i(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:i(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:i(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:i(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:i(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:i(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:i(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:i(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:i(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:i(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:i(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:i(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:i(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:i(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:i(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:i(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:i(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:i(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055","Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:i(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:i(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:i(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:i(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:i(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:i(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:i(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:i(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:i(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:i(1066,1,"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:i(1068,1,"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:i(1069,1,"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:i(1070,1,"_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:i(1071,1,"_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:i(1079,1,"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:i(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:i(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:i(1090,1,"_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:i(1091,1,"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:i(1092,1,"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:i(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:i(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:i(1095,1,"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:i(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:i(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:i(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:i(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:i(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:i(1101,1,"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:i(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:i(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:i(1104,1,"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:i(1105,1,"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."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:i(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:i(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:i(1108,1,"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:i(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:i(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:i(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:i(1113,1,"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:i(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:i(1115,1,"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:i(1116,1,"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:i(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:i(1118,1,"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:i(1119,1,"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:i(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:i(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:i(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:i(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:i(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:i(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:i(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:i(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:i(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:i(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:i(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:i(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:i(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:i(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:i(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:i(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:i(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:i(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:i(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:i(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:i(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:i(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:i(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:i(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:i(1147,1,"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:i(1148,1,"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:i(1149,1,"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."),_0_declarations_must_be_initialized:i(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:i(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:i(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:i(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:i(1162,1,"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:i(1163,1,"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:i(1164,1,"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:i(1165,1,"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_have_a_simple_literal_type_or_a_unique_symbol_type:i(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple 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:i(1168,1,"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:i(1169,1,"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:i(1170,1,"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:i(1171,1,"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:i(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:i(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:i(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:i(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:i(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:i(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:i(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:i(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:i(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:i(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:i(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:i(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:i(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:i(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:i(1186,1,"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:i(1187,1,"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:i(1188,1,"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:i(1189,1,"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:i(1190,1,"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:i(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:i(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:i(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:i(1194,1,"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:i(1195,1,"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:i(1196,1,"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:i(1197,1,"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:i(1198,1,"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:i(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:i(1200,1,"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:i(1202,1,"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:i(1203,1,"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_0_is_enabled_requires_using_export_type:i(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:i(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:i(1207,1,"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."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:i(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:i(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:i(1211,1,"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:i(1212,1,"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:i(1213,1,"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:i(1214,1,"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:i(1215,1,"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:i(1216,1,"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:i(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:i(1221,1,"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:i(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:i(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:i(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:i(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:i(1226,1,"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:i(1227,1,"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:i(1228,1,"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:i(1229,1,"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:i(1230,1,"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_must_be_at_the_top_level_of_a_file_or_module_declaration:i(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:i(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:i(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:i(1234,1,"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_at_the_top_level_of_a_namespace_or_module:i(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:i(1236,1,"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:i(1237,1,"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:i(1238,1,"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:i(1239,1,"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:i(1240,1,"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:i(1241,1,"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:i(1242,1,"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:i(1243,1,"_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:i(1244,1,"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:i(1245,1,"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:i(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:i(1247,1,"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:i(1248,1,"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:i(1249,1,"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:i(1250,1,"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:i(1251,1,"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:i(1252,1,"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."),Abstract_properties_can_only_appear_within_an_abstract_class:i(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:i(1254,1,"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:i(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:i(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:i(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:i(1259,1,"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:i(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:i(1261,1,"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:i(1262,1,"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:i(1263,1,"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:i(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:i(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:i(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:i(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:i(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:i(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:i(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:i(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:i(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:i(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:i(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:i(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:i(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:i(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:i(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:i(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:i(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:i(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:i(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:i(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:i(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:i(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:i(1286,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286","ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:i(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:i(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),with_statements_are_not_allowed_in_an_async_function_block:i(1300,1,"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:i(1308,1,"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."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:i(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),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:i(1312,1,"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:i(1313,1,"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:i(1314,1,"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:i(1315,1,"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:i(1316,1,"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:i(1317,1,"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:i(1318,1,"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:i(1319,1,"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:i(1320,1,"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:i(1321,1,"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:i(1322,1,"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_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext:i(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext:i(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."),Argument_of_dynamic_import_cannot_be_spread_element:i(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:i(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:i(1327,1,"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:i(1328,1,"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:i(1329,1,"_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:i(1330,1,"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:i(1331,1,"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:i(1332,1,"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:i(1333,1,"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:i(1334,1,"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:i(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:i(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:i(1338,1,"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:i(1339,1,"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:i(1340,1,"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}')'?"),Class_constructor_may_not_be_an_accessor:i(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext:i(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),A_label_is_not_allowed_here:i(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:i(1345,1,"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:i(1346,1,"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:i(1347,1,"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:i(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:i(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:i(1350,3,"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:i(1351,1,"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:i(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:i(1353,1,"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:i(1354,1,"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:i(1355,1,"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:i(1356,1,"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:i(1357,1,"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:i(1358,1,"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:i(1359,1,"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."),Type_0_does_not_satisfy_the_expected_type_1:i(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:i(1361,1,"_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:i(1362,1,"_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:i(1363,1,"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:i(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:i(1365,3,"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:i(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:i(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:i(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:i(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error:i(1371,1,"This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371","This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."),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:i(1375,1,"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:i(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:i(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:i(1379,1,"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:i(1380,1,"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:i(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:i(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:i(1385,1,"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:i(1386,1,"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:i(1387,1,"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:i(1388,1,"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:i(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:i(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:i(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:i(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:i(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:i(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:i(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:i(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:i(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:i(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:i(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:i(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:i(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:i(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:i(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:i(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:i(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:i(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:i(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:i(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:i(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:i(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:i(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:i(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:i(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:i(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:i(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:i(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:i(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:i(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:i(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:i(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:i(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:i(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:i(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:i(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:i(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:i(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:i(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:i(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:i(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_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:i(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops 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."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:i(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:i(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:i(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:i(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:i(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:i(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:i(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:i(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:i(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:i(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:i(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443",`Module declaration names may only use ' or " quoted strings.`),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled:i(1444,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444","'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled:i(1446,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:i(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:i(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments:i(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:i(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_should_be_either_require_or_import:i(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:i(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:i(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:i(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:i(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:i(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",`File is ECMAScript module because '{0}' has field "type" with value "module"`),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:i(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",`File is CommonJS module because '{0}' has field "type" whose value is not "module"`),File_is_CommonJS_module_because_0_does_not_have_field_type:i(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460",`File is CommonJS module because '{0}' does not have field "type"`),File_is_CommonJS_module_because_package_json_was_not_found:i(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),resolution_mode_is_the_only_valid_key_for_type_import_attributes:i(1463,1,"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463","'resolution-mode' is the only valid key for type import attributes."),Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:i(1464,1,"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464","Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:i(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:i(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:i(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:i(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:i(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:i(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:i(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:i(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:i(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:i(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479",`The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:i(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:i(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481",`To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:i(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:i(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:i(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:i(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:i(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:i(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:i(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:i(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:i(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:i(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:i(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:i(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:i(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:i(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),Identifier_string_literal_or_number_literal_expected:i(1496,1,"Identifier_string_literal_or_number_literal_expected_1496","Identifier, string literal, or number literal expected."),The_types_of_0_are_incompatible_between_these_types:i(2200,1,"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:i(2201,1,"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:i(2202,1,"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:i(2203,1,"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:i(2204,1,"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:i(2205,1,"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),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:i(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:i(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:i(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:i(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:i(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:i(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:i(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:i(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:i(2301,1,"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:i(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:i(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:i(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:i(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:i(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:i(2307,1,"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:i(2308,1,"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:i(2309,1,"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:i(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:i(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:i(2312,1,"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:i(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:i(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:i(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:i(2316,1,"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:i(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:i(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:i(2319,1,"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:i(2320,1,"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:i(2321,1,"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:i(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:i(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:i(2324,1,"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:i(2325,1,"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:i(2326,1,"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:i(2327,1,"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:i(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:i(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:i(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:i(2331,1,"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:i(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_constructor_arguments:i(2333,1,"this_cannot_be_referenced_in_constructor_arguments_2333","'this' cannot be referenced in constructor arguments."),this_cannot_be_referenced_in_a_static_property_initializer:i(2334,1,"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:i(2335,1,"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:i(2336,1,"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:i(2337,1,"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:i(2338,1,"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:i(2339,1,"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:i(2340,1,"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:i(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:i(2343,1,"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:i(2344,1,"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:i(2345,1,"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}'."),Untyped_function_calls_may_not_accept_type_arguments:i(2347,1,"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:i(2348,1,"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:i(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:i(2350,1,"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:i(2351,1,"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:i(2352,1,"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:i(2353,1,"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:i(2354,1,"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_undefined_void_nor_any_must_return_a_value:i(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:i(2356,1,"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:i(2357,1,"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:i(2358,1,"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_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method:i(2359,1,"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359","The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:i(2362,1,"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:i(2363,1,"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:i(2364,1,"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:i(2365,1,"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:i(2366,1,"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_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:i(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:i(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:i(2369,1,"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:i(2370,1,"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:i(2371,1,"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:i(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:i(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:i(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:i(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:i(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:i(2377,1,"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:i(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:i(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:i(2383,1,"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:i(2384,1,"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:i(2385,1,"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:i(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:i(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:i(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:i(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:i(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:i(2391,1,"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:i(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:i(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:i(2394,1,"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:i(2395,1,"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:i(2396,1,"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:i(2397,1,"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:i(2398,1,"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:i(2399,1,"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:i(2400,1,"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."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:i(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:i(2402,1,"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:i(2403,1,"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:i(2404,1,"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:i(2405,1,"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:i(2406,1,"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:i(2407,1,"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:i(2408,1,"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:i(2409,1,"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:i(2410,1,"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'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:i(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:i(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:i(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:i(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:i(2415,1,"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:i(2416,1,"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:i(2417,1,"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:i(2418,1,"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:i(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:i(2420,1,"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:i(2422,1,"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:i(2423,1,"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:i(2425,1,"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:i(2426,1,"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:i(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:i(2428,1,"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:i(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:i(2431,1,"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:i(2432,1,"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:i(2433,1,"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:i(2434,1,"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:i(2435,1,"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:i(2436,1,"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:i(2437,1,"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:i(2438,1,"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:i(2439,1,"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:i(2440,1,"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:i(2441,1,"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:i(2442,1,"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:i(2443,1,"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:i(2444,1,"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:i(2445,1,"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_This_is_an_instance_of_class_2:i(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:i(2447,1,"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:i(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:i(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:i(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:i(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:i(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:i(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:i(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:i(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:i(2458,1,"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:i(2459,1,"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:i(2460,1,"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:i(2461,1,"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:i(2462,1,"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:i(2463,1,"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:i(2464,1,"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:i(2465,1,"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:i(2466,1,"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:i(2467,1,"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:i(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:i(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:i(2472,1,"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:i(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:i(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),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:i(2475,1,"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:i(2476,1,"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:i(2477,1,"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:i(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:i(2480,1,"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:i(2481,1,"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:i(2483,1,"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:i(2484,1,"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:i(2487,1,"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:i(2488,1,"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:i(2489,1,"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:i(2490,1,"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:i(2491,1,"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:i(2492,1,"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:i(2493,1,"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:i(2494,1,"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:i(2495,1,"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:i(2496,1,"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:i(2497,1,"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:i(2498,1,"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:i(2499,1,"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:i(2500,1,"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:i(2501,1,"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:i(2502,1,"_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:i(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:i(2504,1,"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:i(2505,1,"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:i(2506,1,"_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:i(2507,1,"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:i(2508,1,"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:i(2509,1,"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:i(2510,1,"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:i(2511,1,"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:i(2512,1,"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:i(2513,1,"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."),A_tuple_type_cannot_be_indexed_with_a_negative_value:i(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:i(2515,1,"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:i(2516,1,"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:i(2517,1,"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:i(2518,1,"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:i(2519,1,"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:i(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' 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:i(2522,1,"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:i(2523,1,"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:i(2524,1,"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:i(2525,1,"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:i(2526,1,"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:i(2527,1,"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:i(2528,1,"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:i(2529,1,"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:i(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:i(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:i(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:i(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:i(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:i(2536,1,"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:i(2537,1,"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:i(2538,1,"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:i(2539,1,"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:i(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:i(2542,1,"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:i(2543,1,"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:i(2544,1,"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:i(2545,1,"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:i(2547,1,"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:i(2548,1,"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:i(2549,1,"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:i(2550,1,"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:i(2551,1,"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:i(2552,1,"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:i(2553,1,"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:i(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:i(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:i(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:i(2558,1,"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:i(2559,1,"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:i(2560,1,"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:i(2561,1,"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:i(2562,1,"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:i(2563,1,"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:i(2564,1,"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:i(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:i(2566,1,"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:i(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:i(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:i(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:i(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:i(2574,1,"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:i(2575,1,"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_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:i(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:i(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:i(2578,1,"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:i(2580,1,"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:i(2581,1,"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:i(2582,1,"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:i(2583,1,"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:i(2584,1,"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:i(2585,1,"_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."),Cannot_assign_to_0_because_it_is_a_constant:i(2588,1,"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:i(2589,1,"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:i(2590,1,"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:i(2591,1,"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:i(2592,1,"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:i(2593,1,"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_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:i(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with '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:i(2595,1,"_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:i(2596,1,"_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:i(2597,1,"_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:i(2598,1,"_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_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:i(2602,1,"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:i(2603,1,"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:i(2604,1,"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."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:i(2606,1,"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:i(2607,1,"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:i(2608,1,"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:i(2609,1,"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:i(2610,1,"_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:i(2611,1,"_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:i(2612,1,"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:i(2613,1,"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:i(2614,1,"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:i(2615,1,"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:i(2616,1,"_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:i(2617,1,"_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:i(2618,1,"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:i(2619,1,"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:i(2620,1,"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:i(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:i(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:i(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:i(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:i(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:i(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:i(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:i(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:i(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:i(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:i(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:i(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:i(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:i(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:i(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:i(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:i(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:i(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:i(2649,1,"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:i(2651,1,"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:i(2652,1,"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:i(2653,1,"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}'."),JSX_expressions_must_have_one_parent_element:i(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:i(2658,1,"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:i(2659,1,"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:i(2660,1,"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:i(2661,1,"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:i(2662,1,"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:i(2663,1,"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:i(2664,1,"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:i(2665,1,"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:i(2666,1,"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:i(2667,1,"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:i(2668,1,"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:i(2669,1,"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:i(2670,1,"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:i(2671,1,"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:i(2672,1,"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:i(2673,1,"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:i(2674,1,"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:i(2675,1,"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:i(2676,1,"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:i(2677,1,"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:i(2678,1,"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:i(2679,1,"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:i(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:i(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:i(2683,1,"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:i(2684,1,"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:i(2685,1,"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:i(2686,1,"_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:i(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:i(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:i(2689,1,"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:i(2690,1,"_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}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:i(2692,1,"_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:i(2693,1,"_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:i(2694,1,"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:i(2695,1,"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:i(2696,1,"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:i(2697,1,"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:i(2698,1,"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:i(2699,1,"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:i(2700,1,"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:i(2701,1,"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:i(2702,1,"_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:i(2703,1,"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:i(2704,1,"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:i(2705,1,"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:i(2706,1,"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:i(2707,1,"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:i(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:i(2709,1,"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:i(2710,1,"_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:i(2711,1,"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:i(2712,1,"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:i(2713,1,"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:i(2714,1,"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:i(2715,1,"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:i(2716,1,"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:i(2717,1,"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:i(2718,1,"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:i(2719,1,"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:i(2720,1,"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:i(2721,1,"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:i(2722,1,"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:i(2723,1,"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:i(2724,1,"_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:i(2725,1,"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:i(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:i(2727,1,"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:i(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:i(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:i(2730,1,"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:i(2731,1,"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:i(2732,1,"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:i(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:i(2734,1,"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:i(2735,1,"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:i(2736,1,"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:i(2737,1,"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:i(2738,3,"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:i(2739,1,"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:i(2740,1,"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:i(2741,1,"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:i(2742,1,"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:i(2743,1,"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:i(2744,1,"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:i(2745,1,"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:i(2746,1,"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:i(2747,1,"_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_0_is_enabled:i(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:i(2749,1,"_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:i(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:i(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:i(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:i(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:i(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:i(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:i(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:i(2757,1,"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:i(2758,1,"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:i(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:i(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:i(2761,1,"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:i(2762,1,"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:i(2763,1,"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:i(2764,1,"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:i(2765,1,"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:i(2766,1,"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:i(2767,1,"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:i(2768,1,"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:i(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:i(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:i(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:i(2772,1,"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:i(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:i(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this 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:i(2775,1,"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:i(2776,1,"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:i(2777,1,"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:i(2778,1,"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:i(2779,1,"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:i(2780,1,"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:i(2781,1,"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:i(2782,3,"_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:i(2783,1,"_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:i(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:i(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:i(2786,1,"_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:i(2787,1,"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:i(2788,1,"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:i(2789,1,"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:i(2790,1,"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:i(2791,1,"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_nodenext_or_to_add_aliases_to_the_paths_option:i(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', 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:i(2793,1,"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:i(2794,1,"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:i(2795,1,"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:i(2796,1,"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."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:i(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:i(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:i(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:i(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:i(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:i(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:i(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:i(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:i(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:i(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:i(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:i(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:i(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:i(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:i(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:i(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:i(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers:i(2815,1,"arguments_cannot_be_referenced_in_property_initializers_2815","'arguments' cannot be referenced in property initializers."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:i(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:i(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:i(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:i(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:i(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext:i(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821","Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:i(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext:i(2823,1,"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2823","Import attributes are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),Cannot_find_namespace_0_Did_you_mean_1:i(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:i(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:i(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:i(2836,1,"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836","Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:i(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:i(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:i(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types:i(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840","An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:i(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:i(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:i(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:i(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:i(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:i(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:i(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:i(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:i(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:i(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_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:i(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements 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."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super:i(2855,1,"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855","Class field '{0}' defined by the parent class is not accessible in the child class via super."),Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:i(2856,1,"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856","Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),Import_attributes_cannot_be_used_with_type_only_imports_or_exports:i(2857,1,"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857","Import attributes cannot be used with type-only imports or exports."),Import_attribute_values_must_be_string_literal_expressions:i(2858,1,"Import_attribute_values_must_be_string_literal_expressions_2858","Import attribute values must be string literal expressions."),Excessive_complexity_comparing_types_0_and_1:i(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method:i(2860,1,"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860","The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression:i(2861,1,"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861","An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),Type_0_is_generic_and_can_only_be_indexed_for_reading:i(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values:i(2863,1,"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863","A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types:i(2864,1,"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864","A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),Import_declaration_0_is_using_private_name_1:i(4e3,1,"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:i(4002,1,"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:i(4004,1,"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:i(4006,1,"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:i(4008,1,"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:i(4010,1,"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:i(4012,1,"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:i(4014,1,"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:i(4016,1,"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:i(4019,1,"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:i(4020,1,"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:i(4021,1,"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:i(4022,1,"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:i(4023,1,"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:i(4024,1,"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:i(4025,1,"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:i(4026,1,"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:i(4027,1,"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:i(4028,1,"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:i(4029,1,"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:i(4030,1,"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:i(4031,1,"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:i(4032,1,"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:i(4033,1,"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:i(4034,1,"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:i(4035,1,"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:i(4036,1,"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:i(4037,1,"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:i(4038,1,"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:i(4039,1,"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:i(4040,1,"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:i(4041,1,"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:i(4042,1,"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:i(4043,1,"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:i(4044,1,"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:i(4045,1,"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:i(4046,1,"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:i(4047,1,"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:i(4048,1,"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:i(4049,1,"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:i(4050,1,"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:i(4051,1,"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:i(4052,1,"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:i(4053,1,"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:i(4054,1,"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:i(4055,1,"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:i(4056,1,"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:i(4057,1,"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:i(4058,1,"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:i(4059,1,"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:i(4060,1,"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:i(4061,1,"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:i(4062,1,"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:i(4063,1,"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:i(4064,1,"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:i(4065,1,"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:i(4066,1,"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:i(4067,1,"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:i(4068,1,"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:i(4069,1,"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:i(4070,1,"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:i(4071,1,"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:i(4072,1,"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:i(4073,1,"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:i(4074,1,"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:i(4075,1,"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:i(4076,1,"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:i(4077,1,"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:i(4078,1,"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:i(4081,1,"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:i(4082,1,"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:i(4083,1,"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}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:i(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:i(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' 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:i(4090,1,"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:i(4091,1,"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:i(4092,1,"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:i(4094,1,"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:i(4095,1,"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:i(4096,1,"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:i(4097,1,"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:i(4098,1,"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:i(4099,1,"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:i(4100,1,"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:i(4101,1,"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:i(4102,1,"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:i(4103,1,"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:i(4104,1,"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:i(4105,1,"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:i(4106,1,"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:i(4107,1,"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:i(4108,1,"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:i(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:i(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:i(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:i(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:i(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:i(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:i(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:i(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:i(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:i(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:i(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:i(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:i(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:i(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:i(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:i(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),The_current_host_does_not_support_the_0_option:i(5001,1,"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:i(5009,1,"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:i(5010,1,"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:i(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:i(5014,1,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:i(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:i(5024,1,"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:i(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:i(5033,1,"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:i(5042,1,"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:i(5047,1,"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:i(5048,1,"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:i(5051,1,"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:i(5052,1,"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:i(5053,1,"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:i(5054,1,"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:i(5055,1,"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:i(5056,1,"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:i(5057,1,"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:i(5058,1,"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:i(5059,1,"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:i(5061,1,"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:i(5062,1,"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:i(5063,1,"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:i(5064,1,"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:i(5065,1,"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:i(5066,1,"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:i(5067,1,"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:i(5068,1,"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:i(5069,1,"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_when_moduleResolution_is_set_to_classic:i(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext:i(5071,1,"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:i(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:i(5073,1,"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:i(5074,1,"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:i(5075,1,"_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:i(5076,1,"_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:i(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:i(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:i(5079,1,"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:i(5080,1,"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:i(5081,1,"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:i(5082,1,"_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:i(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:i(5085,1,"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:i(5086,1,"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:i(5087,1,"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:i(5088,1,"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:i(5089,1,"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:i(5090,1,"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 './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:i(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:i(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:i(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:i(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later:i(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:i(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:i(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:i(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:i(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101",`Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),Option_0_has_been_removed_Please_remove_it_from_your_configuration:i(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:i(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:i(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:i(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:i(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:i(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107",`Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:i(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:i(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:i(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:i(6e3,3,"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:i(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:i(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:i(6004,3,"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:i(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:i(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:i(6007,3,"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:i(6008,3,"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:i(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:i(6010,3,"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:i(6011,3,"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:i(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:i(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:i(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:i(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:i(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:i(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:i(6019,3,"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:i(6020,3,"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:i(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:i(6024,3,"options_6024","options"),file:i(6025,3,"file_6025","file"),Examples_Colon_0:i(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:i(6027,3,"Options_Colon_6027","Options:"),Version_0:i(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:i(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:i(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:i(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:i(6034,3,"KIND_6034","KIND"),FILE:i(6035,3,"FILE_6035","FILE"),VERSION:i(6036,3,"VERSION_6036","VERSION"),LOCATION:i(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:i(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:i(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:i(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:i(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:i(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:i(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:i(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:i(6046,1,"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:i(6048,1,"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}'."),Unable_to_open_file_0:i(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:i(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:i(6052,3,"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:i(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:i(6054,1,"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:i(6055,3,"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:i(6056,3,"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:i(6058,3,"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:i(6059,1,"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:i(6060,3,"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:i(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:i(6064,1,"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:i(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:i(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:i(6070,3,"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:i(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:i(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:i(6073,3,"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:i(6074,3,"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:i(6075,3,"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:i(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:i(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:i(6078,3,"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:i(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:i(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),File_0_has_an_unsupported_extension_so_skipping_it:i(6081,3,"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:i(6082,1,"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:i(6083,3,"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:i(6084,3,"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:i(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:i(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:i(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:i(6088,3,"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:i(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:i(6090,3,"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:i(6091,3,"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:i(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:i(6093,3,"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:i(6094,3,"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_types_Colon_1:i(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:i(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:i(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:i(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:i(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:i(6100,3,"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:i(6101,3,"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:i(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:i(6104,3,"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:i(6105,3,"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:i(6106,3,"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:i(6107,3,"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:i(6108,3,"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:i(6109,3,"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:i(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:i(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:i(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:i(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:i(6114,1,"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:i(6115,3,"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:i(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:i(6119,3,"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:i(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:i(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:i(6122,3,"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:i(6123,3,"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:i(6124,3,"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:i(6125,3,"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:i(6126,3,"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:i(6127,3,"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:i(6128,3,"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:i(6130,3,"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:i(6131,1,"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:i(6132,3,"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:i(6133,1,"_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:i(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:i(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:i(6136,3,"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:i(6137,1,"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:i(6138,1,"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:i(6139,3,"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:i(6140,1,"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:i(6141,3,"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:i(6142,1,"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:i(6144,3,"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:i(6145,3,"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:i(6146,3,"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:i(6147,3,"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:i(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:i(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:i(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:i(6151,3,"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:i(6152,3,"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:i(6153,3,"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:i(6154,3,"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:i(6155,3,"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:i(6156,3,"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:i(6157,3,"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:i(6158,3,"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:i(6159,3,"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:i(6160,3,"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:i(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:i(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:i(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:i(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:i(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:i(6166,3,"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:i(6167,3,"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:i(6168,3,"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:i(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:i(6170,3,"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:i(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3:i(6179,3,"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:i(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:i(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:i(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:i(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:i(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:i(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:i(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:i(6189,1,"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:i(6191,3,"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:i(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:i(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:i(6194,3,"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:i(6195,3,"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:i(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:i(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:i(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:i(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:i(6200,1,"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:i(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:i(6202,1,"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:i(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:i(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:i(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:i(6206,3,"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:i(6207,3,"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:i(6208,3,"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:i(6209,3,"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:i(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:i(6211,3,"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:i(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:i(6213,3,"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:i(6214,3,"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:i(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:i(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:i(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:i(6218,3,"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:i(6219,3,"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:i(6220,3,"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:i(6221,3,"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:i(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:i(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:i(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:i(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:i(6226,3,"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', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:i(6227,3,"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', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:i(6229,1,"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:i(6230,1,"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:i(6231,1,"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:i(6232,1,"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:i(6233,1,"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:i(6234,1,"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:i(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:i(6236,1,"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:i(6237,3,"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:i(6238,1,"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"),File_0_exists_according_to_earlier_cached_lookups:i(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:i(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:i(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:i(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:i(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:i(6244,3,"Modules_6244","Modules"),File_Management:i(6245,3,"File_Management_6245","File Management"),Emit:i(6246,3,"Emit_6246","Emit"),JavaScript_Support:i(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:i(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:i(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:i(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:i(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:i(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:i(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:i(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:i(6255,3,"Projects_6255","Projects"),Output_Formatting:i(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:i(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:i(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:i(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:i(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:i(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:i(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:i(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:i(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:i(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:i(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:i(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:i(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:i(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:i(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:i(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:i(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:i(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:i(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:i(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278",`There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),Enable_project_compilation:i(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:i(6304,1,"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:i(6305,1,"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:i(6306,1,"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:i(6307,1,"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:i(6308,1,"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:i(6309,1,"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:i(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:i(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:i(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:i(6352,3,"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:i(6353,3,"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:i(6354,3,"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:i(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:i(6356,3,"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:i(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:i(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:i(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:i(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:i(6362,3,"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:i(6363,3,"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:i(6364,3,"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:i(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:i(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:i(6369,1,"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:i(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:i(6371,3,"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:i(6372,3,"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:i(6373,3,"Updating_output_of_project_0_6373","Updating output of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:i(6374,3,"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:i(6375,3,"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:i(6376,3,"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:i(6377,1,"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}'"),Composite_projects_may_not_disable_incremental_compilation:i(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:i(6380,3,"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:i(6381,3,"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:i(6382,3,"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:i(6383,3,"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:i(6384,3,"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:i(6385,2,"_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:i(6386,3,"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_signature_0_of_1_is_deprecated:i(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:i(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:i(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:i(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:i(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:i(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:i(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:i(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:i(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:i(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:i(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:i(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:i(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:i(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:i(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:i(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:i(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:i(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:i(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:i(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:i(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:i(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:i(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:i(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:i(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:i(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:i(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:i(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:i(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:i(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:i(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:i(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:i(6500,3,"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:i(6501,3,"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:i(6502,3,"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:i(6503,3,"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:i(6504,1,"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?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:i(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:i(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files:i(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:i(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:i(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:i(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:i(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:i(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:i(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:i(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:i(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:i(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:i(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:i(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:i(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:i(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:i(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:i(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:i(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:i(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:i(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:i(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:i(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:i(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:i(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:i(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:i(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:i(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:i(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:i(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:i(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:i(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:i(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:i(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:i(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:i(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:i(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:i(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:i(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:i(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:i(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:i(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:i(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:i(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:i(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:i(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:i(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:i(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:i(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:i(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:i(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:i(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:i(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:i(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:i(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:i(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:i(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:i(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:i(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:i(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:i(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:i(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:i(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:i(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:i(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:i(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:i(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:i(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:i(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:i(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:i(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:i(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:i(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:i(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:i(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:i(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:i(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:i(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:i(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:i(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:i(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:i(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:i(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:i(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:i(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:i(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:i(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:i(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:i(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:i(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:i(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:i(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:i(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:i(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:i(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:i(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:i(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:i(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:i(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:i(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:i(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:i(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:i(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:i(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:i(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:i(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:i(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:i(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:i(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:i(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:i(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:i(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:i(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:i(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:i(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:i(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Default_catch_clause_variables_as_unknown_instead_of_any:i(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:i(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),one_of_Colon:i(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:i(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:i(6902,3,"type_Colon_6902","type:"),default_Colon:i(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:i(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:i(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:i(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:i(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:i(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:i(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:i(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:i(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:i(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:i(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:i(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:i(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:i(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:i(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:i(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:i(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:i(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:i(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:i(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:i(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:i(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:i(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:i(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:i(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:i(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:i(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:i(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:i(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:i(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:i(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:i(7008,1,"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:i(7009,1,"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:i(7010,1,"_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:i(7011,1,"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."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:i(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:i(7013,1,"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:i(7014,1,"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:i(7015,1,"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:i(7016,1,"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:i(7017,1,"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:i(7018,1,"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:i(7019,1,"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:i(7020,1,"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:i(7022,1,"_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:i(7023,1,"_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:i(7024,1,"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:i(7025,1,"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:i(7026,1,"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:i(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:i(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:i(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:i(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:i(7031,1,"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:i(7032,1,"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:i(7033,1,"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:i(7034,1,"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:i(7035,1,"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:i(7036,1,"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:i(7037,3,"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:i(7038,3,"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:i(7039,1,"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:i(7040,1,"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:i(7041,1,"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:i(7042,1,"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:i(7043,2,"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:i(7044,2,"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:i(7045,2,"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:i(7046,2,"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:i(7047,2,"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:i(7048,2,"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:i(7049,2,"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:i(7050,2,"_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:i(7051,1,"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:i(7052,1,"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:i(7053,1,"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:i(7054,1,"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:i(7055,1,"_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:i(7056,1,"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."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:i(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:i(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:i(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:i(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:i(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:i(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:i(8001,1,"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:i(8002,1,"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:i(8003,1,"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:i(8004,1,"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:i(8005,1,"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:i(8006,1,"_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:i(8008,1,"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:i(8009,1,"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:i(8010,1,"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:i(8011,1,"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:i(8012,1,"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:i(8013,1,"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:i(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:i(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:i(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:i(8020,1,"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:i(8021,1,"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:i(8022,1,"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:i(8023,1,"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:i(8024,1,"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:i(8025,1,"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:i(8026,1,"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:i(8027,1,"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:i(8028,1,"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:i(8029,1,"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:i(8030,1,"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:i(8031,1,"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:i(8032,1,"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:i(8033,1,"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:i(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:i(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:i(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:i(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:i(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:i(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:i(9005,1,"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:i(9006,1,"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:i(17e3,1,"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:i(17001,1,"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:i(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:i(17004,1,"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:i(17005,1,"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:i(17006,1,"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:i(17007,1,"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:i(17008,1,"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:i(17009,1,"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:i(17010,1,"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:i(17011,1,"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:i(17012,1,"_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:i(17013,1,"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:i(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:i(17015,1,"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:i(17016,1,"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:i(17017,1,"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:i(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:i(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:i(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Unicode_escape_sequence_cannot_appear_here:i(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),Circularity_detected_while_resolving_configuration_Colon_0:i(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:i(18002,1,"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:i(18003,1,"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_ES_module:i(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:i(80002,2,"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:i(80003,2,"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:i(80004,2,"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:i(80005,2,"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:i(80006,2,"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:i(80007,2,"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:i(80008,2,"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."),JSDoc_typedef_may_be_converted_to_TypeScript_type:i(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:i(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:i(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:i(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:i(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:i(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:i(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:i(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:i(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:i(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:i(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:i(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:i(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:i(90013,3,"Import_0_from_1_90013",`Import '{0}' from "{1}"`),Change_0_to_1:i(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:i(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:i(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:i(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:i(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:i(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:i(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:i(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:i(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:i(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:i(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:i(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:i(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:i(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:i(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:i(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:i(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:i(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:i(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:i(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:i(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:i(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:i(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:i(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:i(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:i(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:i(90055,3,"Remove_type_from_import_declaration_from_0_90055",`Remove 'type' from import declaration from "{0}"`),Remove_type_from_import_of_0_from_1:i(90056,3,"Remove_type_from_import_of_0_from_1_90056",`Remove 'type' from import of '{0}' from "{1}"`),Add_import_from_0:i(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:i(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:i(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:i(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Convert_function_to_an_ES2015_class:i(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:i(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:i(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:i(95005,3,"Extract_function_95005","Extract function"),Extract_constant:i(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:i(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:i(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:i(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:i(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:i(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:i(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:i(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:i(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:i(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:i(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:i(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:i(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:i(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:i(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:i(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:i(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:i(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:i(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:i(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:i(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:i(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:i(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:i(95030,3,"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:i(95031,3,"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:i(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:i(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:i(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:i(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:i(95036,3,"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:i(95037,3,"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:i(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:i(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:i(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:i(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:i(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:i(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:i(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:i(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:i(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:i(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:i(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:i(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:i(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:i(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:i(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:i(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:i(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:i(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:i(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:i(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:i(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:i(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:i(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:i(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:i(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:i(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:i(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:i(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:i(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:i(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:i(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:i(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:i(95070,3,"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:i(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:i(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:i(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:i(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:i(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:i(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:i(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:i(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:i(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:i(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:i(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:i(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:i(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:i(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:i(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:i(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:i(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:i(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:i(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:i(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:i(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:i(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:i(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:i(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:i(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:i(95097,3,"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:i(95098,3,"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:i(95099,3,"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:i(95100,3,"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:i(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:i(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:i(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:i(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:i(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:i(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:i(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:i(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:i(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:i(95112,3,"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:i(95113,3,"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:i(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:i(95115,3,"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:i(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:i(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:i(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:i(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:i(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:i(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:i(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:i(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:i(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:i(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:i(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:i(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:i(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:i(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:i(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:i(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:i(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:i(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:i(95134,3,"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:i(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:i(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:i(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:i(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:i(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:i(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:i(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:i(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:i(95143,3,"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:i(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:i(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:i(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:i(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:i(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:i(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:i(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:i(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:i(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:i(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenations_and_string_literals:i(95154,3,"Can_only_convert_string_concatenations_and_string_literals_95154","Can only convert string concatenations and string literals"),Selection_is_not_a_valid_statement_or_statements:i(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:i(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:i(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:i(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:i(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:i(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:i(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:i(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:i(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:i(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:i(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:i(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:i(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:i(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:i(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:i(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:i(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:i(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:i(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:i(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:i(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:i(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:i(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:i(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:i(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:i(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:i(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:i(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:i(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:i(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:i(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:i(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:i(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:i(18004,1,"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:i(18006,1,"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:i(18007,1,"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:i(18009,1,"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:i(18010,1,"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:i(18011,1,"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:i(18012,1,"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:i(18013,1,"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:i(18014,1,"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:i(18015,1,"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:i(18016,1,"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:i(18017,1,"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:i(18018,1,"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:i(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:i(18024,1,"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:i(18026,1,"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:i(18027,1,"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:i(18028,1,"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:i(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:i(18030,1,"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:i(18031,1,"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:i(18032,1,"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."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:i(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:i(18034,3,"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:i(18035,1,"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."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:i(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:i(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:i(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:i(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:i(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:i(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:i(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:i(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:i(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:i(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:i(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:i(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:i(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:i(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:i(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Non_abstract_class_0_does_not_implement_all_abstract_members_of_1:i(18052,1,"Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052","Non-abstract class '{0}' does not implement all abstract members of '{1}'"),Its_type_0_is_not_a_valid_JSX_element_type:i(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:i(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block.")}}});function wt(e){return e>=80}function Qv(e){return e===32||wt(e)}function i_(e,t){if(e=2?i_(e,_4):t===1?i_(e,o4):i_(e,i4)}function nC(e,t){return t>=2?i_(e,c4):t===1?i_(e,s4):i_(e,a4)}function rC(e){let t=[];return e.forEach((n,a)=>{t[n]=a}),t}function en(e){return f4[e]}function Fl(e){return v0.get(e)}function Xd(e){let t=[],n=0,a=0;for(;n127&&On(_)&&(t.push(a),a=n);break}}return t.push(a),t}function iC(e,t,n,a){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,n,a):Ag(Aa(e),t,n,e.text,a)}function Ag(e,t,n,a,_){(t<0||t>=e.length)&&(_?t=t<0?0:t>=e.length?e.length-1:t:I.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${a!==void 0?pv(e,Xd(a)):"unknown"}`));let p=e[t]+n;return _?p>e[t+1]?e[t+1]:typeof a=="string"&&p>a.length?a.length:p:(t=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function On(e){return e===10||e===13||e===8232||e===8233}function Do(e){return e>=48&&e<=57}function P6(e){return Do(e)||e>=65&&e<=70||e>=97&&e<=102}function aC(e){return e<=1114111}function Of(e){return e>=48&&e<=55}function oC(e,t){let 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 t===0;default:return n>127}}function Mt(e,t,n,a,_){if(Da(t))return t;let p=!1;for(;;){let m=e.charCodeAt(t);switch(m){case 13:e.charCodeAt(t+1)===10&&t++;case 10:if(t++,n)return t;p=!!_;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(a)break;if(e.charCodeAt(t+1)===47){for(t+=2;t127&&ka(m)){t++;continue}break}return t}}function Io(e,t){if(I.assert(t>=0),t===0||On(e.charCodeAt(t-1))){let n=e.charCodeAt(t);if(t+fl=0&&n127&&ka(N)){S&&On(N)&&(d=!0),n++;continue}break e}}return S&&(A=_(y,u,x,d,p,A)),A}function sC(e,t,n,a){return $d(!1,e,t,!1,n,a)}function _C(e,t,n,a){return $d(!1,e,t,!0,n,a)}function Kv(e,t,n,a,_){return $d(!0,e,t,!1,n,a,_)}function Zv(e,t,n,a,_){return $d(!0,e,t,!0,n,a,_)}function e4(e,t,n,a,_,p=[]){return p.push({kind:n,pos:e,end:t,hasTrailingNewLine:a}),p}function Ho(e,t){return Kv(e,t,e4,void 0,void 0)}function t4(e,t){return Zv(e,t,e4,void 0,void 0)}function n4(e){let t=Qd.exec(e);if(t)return t[0]}function yr(e,t){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>127&&Yv(e,t)}function Ka(e,t,n){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===36||e===95||(n===1?e===45||e===58:!1)||e>127&&nC(e,t)}function Ig(e,t,n){let a=Br(e,0);if(!yr(a,t))return!1;for(let _=ti(a);_d,getStartPos:()=>d,getTokenEnd:()=>u,getTextPos:()=>u,getToken:()=>T,getTokenStart:()=>S,getTokenPos:()=>S,getTokenText:()=>y.substring(S,u),getTokenValue:()=>A,hasUnicodeEscape:()=>(N&1024)!==0,hasExtendedUnicodeEscape:()=>(N&8)!==0,hasPrecedingLineBreak:()=>(N&1)!==0,hasPrecedingJSDocComment:()=>(N&2)!==0,isIdentifier:()=>T===80||T>118,isReservedWord:()=>T>=83&&T<=118,isUnterminated:()=>(N&4)!==0,getCommentDirectives:()=>q,getNumericLiteralFlags:()=>N&25584,getTokenFlags:()=>N,reScanGreaterToken:xt,reScanAsteriskEqualsToken:ut,reScanSlashToken:Gt,reScanTemplateToken:Dr,reScanTemplateHeadOrNoSubstitutionTemplate:Tt,scanJsxIdentifier:Zt,scanJsxAttributeValue:lr,reScanJsxAttributeValue:di,reScanJsxToken:Rn,reScanLessThanToken:yt,reScanHashToken:jn,reScanQuestionToken:ct,reScanInvalidIdentifier:kr,scanJsxToken:Kt,scanJsDocToken:Yn,scanJSDocCommentTextToken:Xr,scan:rn,getText:U,clearCommentDirectives:ie,setText:ye,setScriptTarget:tt,setLanguageVariant:$e,setScriptKind:Ut,setJSDocParsingMode:St,setOnError:Te,resetTokenState:Jt,setTextPos:Jt,setInJSDocType:Rt,tryScan:De,lookAhead:Pr,scanRange:Ji};return I.isDebugging&&Object.defineProperty(F,"__debugShowCurrentPositionInText",{get:()=>{let z=F.getText();return z.slice(0,F.getTokenFullStart())+"\u2551"+z.slice(F.getTokenFullStart())}}),F;function W(z,K=u,te,Ee){if(_){let je=u;u=K,_(z,te||0,Ee),u=je}}function Se(){let z=u,K=!1,te=!1,Ee="";for(;;){let je=y.charCodeAt(u);if(je===95){N|=512,K?(K=!1,te=!0,Ee+=y.substring(z,u)):(N|=16384,W(te?B.Multiple_consecutive_numeric_separators_are_not_permitted:B.Numeric_separators_are_not_allowed_here,u,1)),u++,z=u;continue}if(Do(je)){K=!0,te=!1,u++;continue}break}return y.charCodeAt(u-1)===95&&(N|=16384,W(B.Numeric_separators_are_not_allowed_here,u-1,1)),Ee+y.substring(z,u)}function Qe(){let z=u,K;if(y.charCodeAt(u)===48)if(u++,y.charCodeAt(u)===95)N|=16896,W(B.Numeric_separators_are_not_allowed_here,u,1),u--,K=Se();else if(!st())N|=8192,K=""+ +A;else if(!A)K="0";else{A=""+parseInt(A,8),N|=32;let nt=T===41,kt=(nt?"-":"")+"0o"+(+A).toString(8);return nt&&z--,W(B.Octal_literals_are_not_allowed_Use_the_syntax_0,z,u-z,kt),9}else K=Se();let te,Ee;y.charCodeAt(u)===46&&(u++,te=Se());let je=u;if(y.charCodeAt(u)===69||y.charCodeAt(u)===101){u++,N|=16,(y.charCodeAt(u)===43||y.charCodeAt(u)===45)&&u++;let nt=u,kt=Se();kt?(Ee=y.substring(je,nt)+kt,je=u):W(B.Digit_expected)}let pt;if(N&512?(pt=K,te&&(pt+="."+te),Ee&&(pt+=Ee)):pt=y.substring(z,je),N&8192)return W(B.Decimals_with_leading_zeros_are_not_allowed,z,je-z),A=""+ +pt,9;if(te!==void 0||N&16)return Be(z,te===void 0&&!!(N&16)),A=""+ +pt,9;{A=pt;let nt=Ht();return Be(z),nt}}function Be(z,K){if(!yr(Br(y,u),e))return;let te=u,{length:Ee}=vt();Ee===1&&y[te]==="n"?W(K?B.A_bigint_literal_cannot_use_exponential_notation:B.A_bigint_literal_must_be_an_integer,z,te-z+1):(W(B.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal,te,Ee),u=te)}function st(){let z=u,K=!0;for(;Do(y.charCodeAt(u));)Of(y.charCodeAt(u))||(K=!1),u++;return A=y.substring(z,u),K}function _t(z,K){let te=yn(z,!1,K);return te?parseInt(te,16):-1}function hn(z,K){return yn(z,!0,K)}function yn(z,K,te){let Ee=[],je=!1,pt=!1;for(;Ee.length=65&&nt<=70)nt+=32;else if(!(nt>=48&&nt<=57||nt>=97&&nt<=102))break;Ee.push(nt),u++,pt=!1}return Ee.length=x){te+=y.substring(Ee,u),N|=4,W(B.Unterminated_string_literal);break}let je=y.charCodeAt(u);if(je===K){te+=y.substring(Ee,u),u++;break}if(je===92&&!z){te+=y.substring(Ee,u),te+=cr(!0),Ee=u;continue}if((je===10||je===13)&&!z){te+=y.substring(Ee,u),N|=4,W(B.Unterminated_string_literal);break}u++}return te}function gn(z){let K=y.charCodeAt(u)===96;u++;let te=u,Ee="",je;for(;;){if(u>=x){Ee+=y.substring(te,u),N|=4,W(B.Unterminated_template_literal),je=K?15:18;break}let pt=y.charCodeAt(u);if(pt===96){Ee+=y.substring(te,u),u++,je=K?15:18;break}if(pt===36&&u+1=x)return W(B.Unexpected_end_of_text),"";let te=y.charCodeAt(u);switch(u++,te){case 48:if(u>=x||!Do(y.charCodeAt(u)))return"\0";case 49:case 50:case 51:u=x?(N|=2048,z&&W(B.Unexpected_end_of_text),y.substring(K,u)):y.charCodeAt(u)!==125?(N|=2048,z&&W(B.Unterminated_Unicode_escape_sequence),y.substring(K,u)):(u++,N|=8,Mf(je)):(N|=2048,z&&W(B.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),y.substring(K,u))}for(;u1114111&&(W(B.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),te=!0),u>=x?(W(B.Unexpected_end_of_text),te=!0):y.charCodeAt(u)===125?u++:(W(B.Unterminated_Unicode_escape_sequence),te=!0),te?"":Mf(K)}function Qn(){if(u+5=0&&Ka(te,e)){u+=3,N|=8,z+=He(),K=u;continue}if(te=Qn(),!(te>=0&&Ka(te,e)))break;N|=1024,z+=y.substring(K,u),z+=Mf(te),u+=6,K=u}else break}return z+=y.substring(K,u),z}function Jn(){let z=A.length;if(z>=2&&z<=12){let K=A.charCodeAt(0);if(K>=97&&K<=122){let te=r4.get(A);if(te!==void 0)return T=te}}return T=80}function Ar(z){let K="",te=!1,Ee=!1;for(;;){let je=y.charCodeAt(u);if(je===95){N|=512,te?(te=!1,Ee=!0):W(Ee?B.Multiple_consecutive_numeric_separators_are_not_permitted:B.Numeric_separators_are_not_allowed_here,u,1),u++;continue}if(te=!0,!Do(je)||je-48>=z)break;K+=y[u],u++,Ee=!1}return y.charCodeAt(u-1)===95&&W(B.Numeric_separators_are_not_allowed_here,u-1,1),K}function Ht(){return y.charCodeAt(u)===110?(A+="n",N&384&&(A=Am(A)+"n"),u++,10):(A=""+(N&128?parseInt(A.slice(2),2):N&256?parseInt(A.slice(2),8):+A),9)}function rn(){d=u,N=0;let z=!1;for(;;){if(S=u,u>=x)return T=1;let K=Br(y,u);if(u===0){if(K===65533)return W(B.File_appears_to_be_binary),u=x,T=8;if(K===35&&Dg(y,u)){if(u=Pg(y,u),t)continue;return T=6}}switch(K){case 10:case 13:if(N|=1,t){u++;continue}else return K===13&&u+1=0&&yr(te,e))return u+=3,N|=8,A=He()+vt(),T=Jn();let Ee=Qn();return Ee>=0&&yr(Ee,e)?(u+=6,N|=1024,A=String.fromCharCode(Ee)+vt(),T=Jn()):(W(B.Invalid_character),u++,T=0);case 35:if(u!==0&&y[u+1]==="!")return W(B.can_only_be_used_at_the_start_of_a_file),u++,T=0;let je=Br(y,u+1);if(je===92){u++;let kt=Gr();if(kt>=0&&yr(kt,e))return u+=3,N|=8,A="#"+He()+vt(),T=81;let qt=Qn();if(qt>=0&&yr(qt,e))return u+=6,N|=1024,A="#"+String.fromCharCode(qt)+vt(),T=81;u--}return yr(je,e)?(u++,an(je,e)):(A="#",W(B.Invalid_character,u++,ti(K))),T=81;default:let pt=an(K,e);if(pt)return T=pt;if(Mo(K)){u+=ti(K);continue}else if(On(K)){N|=1,u+=ti(K);continue}let nt=ti(K);return W(B.Invalid_character,u,nt),u+=nt,T=0}}}function at(){switch(fe){case 0:return!0;case 1:return!1}return se!==3&&se!==4?!0:fe===3?!1:p4.test(y.slice(d,u))}function kr(){I.assert(T===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),u=S=d,N=0;let z=Br(y,u),K=an(z,99);return K?T=K:(u+=ti(z),T)}function an(z,K){let te=z;if(yr(te,K)){for(u+=ti(te);u=x)return T=1;let K=y.charCodeAt(u);if(K===60)return y.charCodeAt(u+1)===47?(u+=2,T=31):(u++,T=30);if(K===123)return u++,T=19;let te=0;for(;u0)break;ka(K)||(te=u)}u++}return A=y.substring(d,u),te===-1?13:12}function Zt(){if(wt(T)){for(;u=x)return T=1;for(let K=y.charCodeAt(u);u=0&&Mo(y.charCodeAt(u-1))&&!(u+1=x)return T=1;let z=Br(y,u);switch(u+=ti(z),z){case 9:case 11:case 12:case 32:for(;u=0&&yr(K,e))return u+=3,N|=8,A=He()+vt(),T=Jn();let te=Qn();return te>=0&&yr(te,e)?(u+=6,N|=1024,A=String.fromCharCode(te)+vt(),T=Jn()):(u++,T=0)}if(yr(z,e)){let K=z;for(;u=0),u=z,d=z,S=z,T=0,A=void 0,N=0}function Rt(z){Q+=z?1:-1}}function Br(e,t){return e.codePointAt(t)}function ti(e){return e>=65536?2:1}function cC(e){if(I.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);let t=Math.floor((e-65536)/1024)+55296,n=(e-65536)%1024+56320;return String.fromCharCode(t,n)}function Mf(e){return d4(e)}var pl,r4,v0,i4,a4,o4,s4,_4,c4,l4,u4,p4,f4,fl,Qd,d4,lC=It({"src/compiler/scanner.ts"(){"use strict";En(),pl={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},r4=new Map(Object.entries(pl)),v0=new Map(Object.entries({...pl,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),i4=[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],a4=[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],o4=[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],s4=[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],_4=[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],c4=[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],l4=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,u4=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,p4=/@(?:see|link)/i,f4=rC(v0),fl=7,Qd=/^#!.*/,d4=String.fromCodePoint?e=>String.fromCodePoint(e):cC}});function uC(e){return as(e)||b_(e)}function pC(e){return yv(e,H2)}function m4(e){switch(Ql(e)){case 99:return"lib.esnext.full.d.ts";case 9:return"lib.es2022.full.d.ts";case 8:return"lib.es2021.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"}}function tn(e){return e.start+e.length}function h4(e){return e.length===0}function fC(e,t){return t>=e.start&&t=e.pos&&t<=e.end}function mC(e,t){return t.start>=e.start&&tn(t)<=tn(e)}function hC(e,t){return y4(e,t)!==void 0}function y4(e,t){let n=g4(e,t);return n&&n.length===0?void 0:n}function yC(e,t){return Ng(e.start,e.length,t.start,t.length)}function gC(e,t,n){return Ng(e.start,e.length,t,n)}function Ng(e,t,n,a){let _=e+t,p=n+a;return n<=_&&p>=e}function bC(e,t){return t<=tn(e)&&t>=e.start}function g4(e,t){let n=Math.max(e.start,t.start),a=Math.min(tn(e),tn(t));return n<=a?Xi(n,a):void 0}function S_(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function Xi(e,t){return S_(e,t-e)}function Ys(e){return S_(e.span.start,e.newLength)}function b4(e){return h4(e.span)&&e.newLength===0}function Yd(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}function vC(e){if(e.length===0)return Yg;if(e.length===1)return e[0];let t=e[0],n=t.span.start,a=tn(t.span),_=n+t.newLength;for(let p=1;p=2&&e.charCodeAt(0)===95&&e.charCodeAt(1)===95?"_"+e:e}function Go(e){let t=e;return t.length>=3&&t.charCodeAt(0)===95&&t.charCodeAt(1)===95&&t.charCodeAt(2)===95?t.substr(1):t}function Lt(e){return Go(e.escapedText)}function w4(e){let t=Fl(e.escapedText);return t?Ur(t,ki):void 0}function gd(e){return e.valueDeclaration&&Z4(e.valueDeclaration)?Lt(e.valueDeclaration.name):Go(e.escapedName)}function E4(e){let t=e.parent.parent;if(t){if(Xo(t))return kf(t);switch(t.kind){case 243:if(t.declarationList&&t.declarationList.declarations[0])return kf(t.declarationList.declarations[0]);break;case 244:let n=t.expression;switch(n.kind===226&&n.operatorToken.kind===64&&(n=n.left),n.kind){case 211:return n.name;case 212:let a=n.argumentExpression;if(Ae(a))return a}break;case 217:return kf(t.expression);case 256:{if(Xo(t.statement)||_m(t.statement))return kf(t.statement);break}}}}function kf(e){let t=ql(e);return t&&Ae(t)?t:void 0}function C4(e,t){return!!(Zd(e)&&Ae(e.name)&&Lt(e.name)===Lt(t)||ls(e)&&Ze(e.declarationList.declarations,n=>C4(n,t)))}function A4(e){return e.name||E4(e)}function Zd(e){return!!e.name}function em(e){switch(e.kind){case 80:return e;case 355:case 348:{let{name:n}=e;if(n.kind===166)return n.right;break}case 213:case 226:{let n=e;switch(Oa(n)){case 1:case 4:case 5:case 3:return hm(n.left);case 7:case 8:case 9:return n.arguments[1];default:return}}case 353:return A4(e);case 347:return E4(e);case 277:{let{expression:n}=e;return Ae(n)?n:void 0}case 212:let t=e;if(v2(t))return t.argumentExpression}return e.name}function ql(e){if(e!==void 0)return em(e)||(Nm(e)||Om(e)||Ol(e)?k4(e):void 0)}function k4(e){if(e.parent){if(fs(e.parent)||ru(e.parent))return e.parent.name;if(At(e.parent)&&e===e.parent.right){if(Ae(e.parent.left))return e.parent.left;if(Ko(e.parent.left))return hm(e.parent.left)}else if(Li(e.parent)&&Ae(e.parent.name))return e.parent.name}else return}function EC(e){if(kl(e))return rr(e.modifiers,M_)}function bd(e){if(Cn(e,98303))return rr(e.modifiers,Ug)}function D4(e,t){if(e.name)if(Ae(e.name)){let n=e.name.escapedText;return c_(e.parent,t).filter(a=>m_(a)&&Ae(a.name)&&a.name.escapedText===n)}else{let n=e.parent.parameters.indexOf(e);I.assert(n>-1,"Parameters should always be in their parents' parameter list");let a=c_(e.parent,t).filter(m_);if(nts(a)&&a.typeParameters.some(_=>_.name.escapedText===n))}function N4(e){return I4(e,!1)}function O4(e){return I4(e,!0)}function CC(e){return!!nn(e,m_)}function M4(e){return nn(e,Fm)}function L4(e){return W4(e,T8)}function AC(e){return nn(e,y8)}function kC(e){return nn(e,Fb)}function J4(e){return nn(e,Fb,!0)}function DC(e){return nn(e,Bb)}function R4(e){return nn(e,Bb,!0)}function PC(e){return nn(e,Ub)}function j4(e){return nn(e,Ub,!0)}function IC(e){return nn(e,qb)}function F4(e){return nn(e,qb,!0)}function B4(e){return nn(e,g8,!0)}function NC(e){return nn(e,Wb)}function U4(e){return nn(e,Wb,!0)}function OC(e){return nn(e,b8)}function MC(e){return nn(e,v8)}function q4(e){return nn(e,Vb)}function LC(e){return nn(e,ts)}function Mg(e){return nn(e,Hb)}function nm(e){let t=nn(e,lu);if(t&&t.typeExpression&&t.typeExpression.type)return t}function rm(e){let t=nn(e,lu);return!t&&Pa(e)&&(t=ir(tm(e),n=>!!n.typeExpression)),t&&t.typeExpression&&t.typeExpression.type}function z4(e){let t=q4(e);if(t&&t.typeExpression)return t.typeExpression.type;let n=nm(e);if(n&&n.typeExpression){let a=n.typeExpression.type;if(Im(a)){let _=ir(a.members,yb);return _&&_.type}if(tu(a)||jm(a))return a.type}}function c_(e,t){var n;if(!ym(e))return Je;let a=(n=e.jsDoc)==null?void 0:n.jsDocCache;if(a===void 0||t){let _=p3(e,t);I.assert(_.length<2||_[0]!==_[1]),a=zo(_,p=>ds(p)?p.tags:p),t||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=a)}return a}function zl(e){return c_(e,!1)}function JC(e){return c_(e,!0)}function nn(e,t,n){return ir(c_(e,n),t)}function W4(e,t){return zl(e).filter(t)}function RC(e,t){return zl(e).filter(n=>n.kind===t)}function jC(e){return typeof e=="string"?e:e==null?void 0:e.map(t=>t.kind===328?t.text:FC(t)).join("")}function FC(e){let t=e.kind===331?"link":e.kind===332?"linkcode":"linkplain",n=e.name?Ci(e.name):"",a=e.name&&e.text.startsWith("://")?"":" ";return`{@${t} ${n}${a}${e.text}}`}function BC(e){if(cu(e)){if(zb(e.parent)){let t=E2(e.parent);if(t&&eo(t.tags))return zo(t.tags,n=>ts(n)?n.typeParameters:void 0)}return Je}if(Xl(e))return I.assert(e.parent.kind===327),zo(e.parent.tags,t=>ts(t)?t.typeParameters:void 0);if(e.typeParameters||L8(e)&&e.typeParameters)return e.typeParameters;if(Vt(e)){let t=G3(e);if(t.length)return t;let n=rm(e);if(n&&tu(n)&&n.typeParameters)return n.typeParameters}return Je}function UC(e){return e.constraint?e.constraint:ts(e.parent)&&e===e.parent.typeParameters[0]?e.parent.constraint:void 0}function ro(e){return e.kind===80||e.kind===81}function qC(e){return e.kind===178||e.kind===177}function V4(e){return Ln(e)&&!!(e.flags&64)}function H4(e){return Ki(e)&&!!(e.flags&64)}function T0(e){return R_(e)&&!!(e.flags&64)}function Lg(e){let t=e.kind;return!!(e.flags&64)&&(t===211||t===212||t===213||t===235)}function Jg(e){return Lg(e)&&!Uo(e)&&!!e.questionDotToken}function zC(e){return Jg(e.parent)&&e.parent.expression===e}function WC(e){return!Lg(e.parent)||Jg(e.parent)||e!==e.parent.expression}function VC(e){return e.kind===226&&e.operatorToken.kind===61}function G4(e){return J_(e)&&Ae(e.typeName)&&e.typeName.escapedText==="const"&&!e.typeArguments}function im(e){return ms(e,8)}function X4(e){return Uo(e)&&!!(e.flags&64)}function HC(e){return e.kind===252||e.kind===251}function GC(e){return e.kind===280||e.kind===279}function $4(e){switch(e.kind){case 309:case 310:return!0;default:return!1}}function XC(e){return $4(e)||e.kind===307||e.kind===311}function Rg(e){return e.kind===355||e.kind===348}function $C(e){return Wl(e.kind)}function Wl(e){return e>=166}function Q4(e){return e>=0&&e<=165}function QC(e){return Q4(e.kind)}function ha(e){return Wn(e,"pos")&&Wn(e,"end")}function jg(e){return 9<=e&&e<=15}function Fg(e){return jg(e.kind)}function YC(e){switch(e.kind){case 210:case 209:case 14:case 218:case 231:return!0}return!1}function wl(e){return 15<=e&&e<=18}function KC(e){return wl(e.kind)}function ZC(e){let t=e.kind;return t===17||t===18}function eA(e){return c8(e)||u8(e)}function Y4(e){switch(e.kind){case 276:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 274:return e.parent.isTypeOnly;case 273:case 271:return e.isTypeOnly}return!1}function K4(e){switch(e.kind){case 281:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 278:return e.isTypeOnly&&!!e.moduleSpecifier&&!e.exportClause;case 280:return e.parent.isTypeOnly}return!1}function tA(e){return Y4(e)||K4(e)}function nA(e){return e.kind===11||wl(e.kind)}function rA(e){return Tr(e)||Ae(e)}function va(e){var t;return Ae(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function Bg(e){var t;return Vn(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function iA(e){let t=e.emitNode.autoGenerate.flags;return!!(t&32)&&!!(t&16)&&!!(t&8)}function Z4(e){return(Ia(e)||zg(e))&&Vn(e.name)}function aA(e){return Ln(e)&&Vn(e.name)}function Ei(e){switch(e){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function eT(e){return!!(z2(e)&31)}function tT(e){return eT(e)||e===126||e===164||e===129}function Ug(e){return Ei(e.kind)}function oA(e){let t=e.kind;return t===166||t===80}function Vl(e){let t=e.kind;return t===80||t===81||t===11||t===9||t===167}function sA(e){let t=e.kind;return t===80||t===206||t===207}function $i(e){return!!e&&qg(e.kind)}function am(e){return!!e&&(qg(e.kind)||eu(e))}function nT(e){return e&&rT(e.kind)}function _A(e){return e.kind===112||e.kind===97}function rT(e){switch(e){case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function qg(e){switch(e){case 173:case 179:case 330:case 180:case 181:case 184:case 324:case 185:return!0;default:return rT(e)}}function cA(e){return ci(e)||_8(e)||au(e)&&$i(e.parent)}function io(e){let t=e.kind;return t===176||t===172||t===174||t===177||t===178||t===181||t===175||t===240}function ar(e){return e&&(e.kind===263||e.kind===231)}function om(e){return e&&(e.kind===177||e.kind===178)}function iT(e){return Ia(e)&&F2(e)}function lA(e){return Vt(e)&&ox(e)?(!_s(e)||!k_(e.expression))&&!Yo(e,!0):e.parent&&ar(e.parent)&&Ia(e)&&!F2(e)}function zg(e){switch(e.kind){case 174:case 177:case 178:return!0;default:return!1}}function uA(e){switch(e.kind){case 174:case 177:case 178:case 172:return!0;default:return!1}}function Lf(e){return Ug(e)||M_(e)}function Wg(e){let t=e.kind;return t===180||t===179||t===171||t===173||t===181||t===177||t===178}function pA(e){return Wg(e)||io(e)}function Vg(e){let t=e.kind;return t===303||t===304||t===305||t===174||t===177||t===178}function S0(e){return wS(e.kind)}function fA(e){switch(e.kind){case 184:case 185:return!0}return!1}function sm(e){if(e){let t=e.kind;return t===207||t===206}return!1}function aT(e){let t=e.kind;return t===209||t===210}function dA(e){let t=e.kind;return t===208||t===232}function Hg(e){switch(e.kind){case 260:case 169:case 208:return!0}return!1}function mA(e){return Li(e)||Pa(e)||sT(e)||cT(e)}function hA(e){return oT(e)||_T(e)}function oT(e){switch(e.kind){case 206:case 210:return!0}return!1}function sT(e){switch(e.kind){case 208:case 303:case 304:case 305:return!0}return!1}function _T(e){switch(e.kind){case 207:case 209:return!0}return!1}function cT(e){switch(e.kind){case 208:case 232:case 230:case 209:case 210:case 80:case 211:case 212:return!0}return si(e,!0)}function yA(e){let t=e.kind;return t===211||t===166||t===205}function gA(e){let t=e.kind;return t===211||t===166}function bA(e){return lT(e)||KS(e)}function lT(e){switch(e.kind){case 286:case 285:case 213:case 214:case 215:case 170:return!0;default:return!1}}function vA(e){return e.kind===213||e.kind===214}function TA(e){let t=e.kind;return t===228||t===15}function jo(e){return uT(im(e).kind)}function uT(e){switch(e){case 211:case 212:case 214:case 213:case 284:case 285:case 288:case 215:case 209:case 217:case 210:case 231:case 218:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 228:case 97:case 106:case 110:case 112:case 108:case 235:case 233:case 236:case 102:case 282:return!0;default:return!1}}function pT(e){return fT(im(e).kind)}function fT(e){switch(e){case 224:case 225:case 220:case 221:case 222:case 223:case 216:return!0;default:return uT(e)}}function SA(e){switch(e.kind){case 225:return!0;case 224:return e.operator===46||e.operator===47;default:return!1}}function xA(e){switch(e.kind){case 106:case 112:case 97:case 224:return!0;default:return Fg(e)}}function _m(e){return wA(im(e).kind)}function wA(e){switch(e){case 227:case 229:case 219:case 226:case 230:case 234:case 232:case 361:case 360:case 238:return!0;default:return fT(e)}}function EA(e){let t=e.kind;return t===216||t===234}function CA(e){return Lb(e)||a8(e)}function dT(e,t){switch(e.kind){case 248:case 249:case 250:case 246:case 247:return!0;case 256:return t&&dT(e.statement,t)}return!1}function mT(e){return ps(e)||F_(e)}function AA(e){return Ze(e,mT)}function kA(e){return!fm(e)&&!ps(e)&&!Cn(e,32)&&!um(e)}function DA(e){return fm(e)||ps(e)||Cn(e,32)}function PA(e){return e.kind===249||e.kind===250}function IA(e){return au(e)||_m(e)}function NA(e){return au(e)}function OA(e){return kb(e)||_m(e)}function MA(e){let t=e.kind;return t===268||t===267||t===80}function LA(e){let t=e.kind;return t===268||t===267}function JA(e){let t=e.kind;return t===80||t===267}function RA(e){let t=e.kind;return t===275||t===274}function jA(e){return e.kind===267||e.kind===266}function FA(e){switch(e.kind){case 219:case 226:case 208:case 213:case 179:case 263:case 231:case 175:case 176:case 185:case 180:case 212:case 266:case 306:case 277:case 278:case 281:case 262:case 218:case 184:case 177:case 80:case 273:case 271:case 276:case 181:case 264:case 345:case 347:case 324:case 348:case 355:case 330:case 353:case 329:case 291:case 292:case 293:case 200:case 174:case 173:case 267:case 202:case 280:case 270:case 274:case 214:case 15:case 9:case 210:case 169:case 211:case 303:case 172:case 171:case 178:case 304:case 312:case 305:case 11:case 265:case 187:case 168:case 260:return!0;default:return!1}}function BA(e){switch(e.kind){case 219:case 241:case 179:case 269:case 299:case 175:case 194:case 176:case 185:case 180:case 248:case 249:case 250:case 262:case 218:case 184:case 177:case 181:case 345:case 347:case 324:case 330:case 353:case 200:case 174:case 173:case 267:case 178:case 312:case 265:return!0;default:return!1}}function UA(e){return e===219||e===208||e===263||e===231||e===175||e===176||e===266||e===306||e===281||e===262||e===218||e===177||e===273||e===271||e===276||e===264||e===291||e===174||e===173||e===267||e===270||e===274||e===280||e===169||e===303||e===172||e===171||e===178||e===304||e===265||e===168||e===260||e===353||e===345||e===355}function Gg(e){return e===262||e===282||e===263||e===264||e===265||e===266||e===267||e===272||e===271||e===278||e===277||e===270}function Xg(e){return e===252||e===251||e===259||e===246||e===244||e===242||e===249||e===250||e===248||e===245||e===256||e===253||e===255||e===257||e===258||e===243||e===247||e===254||e===359}function Xo(e){return e.kind===168?e.parent&&e.parent.kind!==352||Vt(e):UA(e.kind)}function qA(e){return Gg(e.kind)}function zA(e){return Xg(e.kind)}function hT(e){let t=e.kind;return Xg(t)||Gg(t)||WA(e)}function WA(e){return e.kind!==241||e.parent!==void 0&&(e.parent.kind===258||e.parent.kind===299)?!1:!zT(e)}function yT(e){let t=e.kind;return Xg(t)||Gg(t)||t===241}function VA(e){let t=e.kind;return t===283||t===166||t===80}function HA(e){let t=e.kind;return t===110||t===80||t===211||t===295}function gT(e){let t=e.kind;return t===284||t===294||t===285||t===12||t===288}function GA(e){let t=e.kind;return t===291||t===293}function XA(e){let t=e.kind;return t===11||t===294}function bT(e){let t=e.kind;return t===286||t===285}function $A(e){let t=e.kind;return t===296||t===297}function $g(e){return e.kind>=316&&e.kind<=357}function vT(e){return e.kind===327||e.kind===326||e.kind===328||dl(e)||Qg(e)||jb(e)||cu(e)}function Qg(e){return e.kind>=334&&e.kind<=357}function nl(e){return e.kind===178}function rl(e){return e.kind===177}function Hi(e){if(!ym(e))return!1;let{jsDoc:t}=e;return!!t&&t.length>0}function QA(e){return!!e.type}function TT(e){return!!e.initializer}function YA(e){switch(e.kind){case 260:case 169:case 208:case 172:case 303:case 306:return!0;default:return!1}}function x0(e){return e.kind===291||e.kind===293||Vg(e)}function KA(e){return e.kind===183||e.kind===233}function ZA(e){let t=w0;for(let n of e){if(!n.length)continue;let a=0;for(;an.kind===t)}function ik(e){let t=new Map;if(e)for(let n of e)t.set(n.escapedName,n);return t}function E0(e){return(e.flags&33554432)!==0}function ak(){var e="";let t=n=>e+=n;return{getText:()=>e,write:t,rawWrite:t,writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeLiteral:t,writeParameter:t,writeProperty:t,writeSymbol:(n,a)=>t(n),writeTrailingSemicolon:t,writeComment:t,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&ka(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:gr,decreaseIndent:gr,clear:()=>e=""}}function ok(e,t){return e.configFilePath!==t.configFilePath||xT(e,t)}function xT(e,t){return w_(e,t,moduleResolutionOptionDeclarations)}function sk(e,t){return w_(e,t,optionsAffectingProgramStructure)}function w_(e,t,n){return e!==t&&n.some(a=>!rb(z0(e,a),z0(t,a)))}function _k(e,t){for(;;){let n=t(e);if(n==="quit")return;if(n!==void 0)return n;if(ci(e))return;e=e.parent}}function ck(e,t){let n=e.entries();for(let[a,_]of n){let p=t(_,a);if(p)return p}}function C0(e,t){let n=e.keys();for(let a of n){let _=t(a);if(_)return _}}function lk(e,t){e.forEach((n,a)=>{t.set(a,n)})}function uk(e){let t=e_.getText();try{return e(e_),e_.getText()}finally{e_.clear(),e_.writeKeyword(t)}}function cm(e){return e.end-e.pos}function pk(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular}function fk(e,t){return e===t||e.resolvedModule===t.resolvedModule||!!e.resolvedModule&&!!t.resolvedModule&&e.resolvedModule.isExternalLibraryImport===t.resolvedModule.isExternalLibraryImport&&e.resolvedModule.extension===t.resolvedModule.extension&&e.resolvedModule.resolvedFileName===t.resolvedModule.resolvedFileName&&e.resolvedModule.originalPath===t.resolvedModule.originalPath&&mk(e.resolvedModule.packageId,t.resolvedModule.packageId)&&e.node10Result===t.node10Result}function dk(e,t,n,a,_){var p;let m=(p=t.getResolvedModule(e,n,a))==null?void 0:p.node10Result,y=m?il(void 0,B.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,m,m.includes(nodeModulesPathPart+"@types/")?`@types/${mangleScopedPackageName(_)}`:_):t.typesPackageExists(_)?il(void 0,B.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,_,mangleScopedPackageName(_)):t.packageBundlesTypes(_)?il(void 0,B.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,_,n):il(void 0,B.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,n,mangleScopedPackageName(_));return y&&(y.repopulateInfo=()=>({moduleReference:n,mode:a,packageName:_===n?void 0:_})),y}function mk(e,t){return e===t||!!e&&!!t&&e.name===t.name&&e.subModuleName===t.subModuleName&&e.version===t.version}function wT({name:e,subModuleName:t}){return t?`${e}/${t}`:e}function hk(e){return`${wT(e)}@${e.version}`}function yk(e,t){return e===t||e.resolvedTypeReferenceDirective===t.resolvedTypeReferenceDirective||!!e.resolvedTypeReferenceDirective&&!!t.resolvedTypeReferenceDirective&&e.resolvedTypeReferenceDirective.resolvedFileName===t.resolvedTypeReferenceDirective.resolvedFileName&&!!e.resolvedTypeReferenceDirective.primary==!!t.resolvedTypeReferenceDirective.primary&&e.resolvedTypeReferenceDirective.originalPath===t.resolvedTypeReferenceDirective.originalPath}function gk(e,t,n,a,_,p){I.assert(e.length===n.length);for(let m=0;m=0),Aa(t)[e]}function wk(e){let t=oi(e),n=no(t,e.pos);return`${t.fileName}(${n.line+1},${n.character+1})`}function ET(e,t){I.assert(e>=0);let n=Aa(t),a=e,_=t.text;if(a+1===n.length)return _.length-1;{let p=n[a],m=n[a+1]-1;for(I.assert(On(_.charCodeAt(m)));p<=m&&On(_.charCodeAt(m));)m--;return m}}function CT(e,t,n){return!(n&&n(t))&&!e.identifiers.has(t)}function Vi(e){return e===void 0?!0:e.pos===e.end&&e.pos>=0&&e.kind!==1}function Cl(e){return!Vi(e)}function Ek(e,t){return Lo(e)?t===e.expression:eu(e)?t===e.modifiers:Zl(e)?t===e.initializer:Ia(e)?t===e.questionToken&&iT(e):fs(e)?t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Xs(e.modifiers,t,Lf):_u(e)?t===e.equalsToken||t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Xs(e.modifiers,t,Lf):f_(e)?t===e.exclamationToken:L_(e)?t===e.typeParameters||t===e.type||Xs(e.typeParameters,t,Lo):d_(e)?t===e.typeParameters||Xs(e.typeParameters,t,Lo):Zo(e)?t===e.typeParameters||t===e.type||Xs(e.typeParameters,t,Lo):Ib(e)?t===e.modifiers||Xs(e.modifiers,t,Lf):!1}function Xs(e,t,n){return!e||$t(t)||!n(t)?!1:rs(e,t)}function AT(e,t,n){if(t===void 0||t.length===0)return e;let a=0;for(;a[`${no(e,m.range.end).line}`,m])),a=new Map;return{getUnusedExpectations:_,markUsed:p};function _(){return Ud(n.entries()).filter(([m,y])=>y.type===0&&!a.get(m)).map(([m,y])=>y)}function p(m){return n.has(`${m}`)?(a.set(`${m}`,!0),!0):!1}}function $o(e,t,n){return Vi(e)?e.pos:$g(e)||e.kind===12?Mt((t||oi(e)).text,e.pos,!1,!0):n&&Hi(e)?$o(e.jsDoc[0],t):e.kind===358&&e._children.length>0?$o(e._children[0],t,n):Mt((t||oi(e)).text,e.pos,!1,!1,YT(e))}function Nk(e,t){let n=!Vi(e)&&U_(e)?lg(e.modifiers,M_):void 0;return n?Mt((t||oi(e)).text,n.end):$o(e,t)}function Qo(e,t,n=!1){return n_(e.text,t,n)}function Ok(e){return!!or(e,m8)}function IT(e){return!!(F_(e)&&e.exportClause&&Jm(e.exportClause)&&e.exportClause.name.escapedText==="default")}function n_(e,t,n=!1){if(Vi(t))return"";let a=e.substring(n?t.pos:Mt(e,t.pos),t.end);return Ok(t)&&(a=a.split(/\r\n|\n|\r/).map(_=>_.replace(/^\s*\*/,"").trimStart()).join(` +`)),a}function lm(e,t=!1){return Qo(oi(e),e,t)}function Mk(e){return e.pos}function Lk(e,t){return Jl(e,t,Mk,Mn)}function ai(e){let t=e.emitNode;return t&&t.flags||0}function Jk(e){let t=e.emitNode;return t&&t.internalFlags||0}function Rk(e,t,n){if(t&&jk(e,n))return Qo(t,e);switch(e.kind){case 11:{let a=n&2?J3:n&1||ai(e)&16777216?xd:wd;return e.singleQuote?"'"+a(e.text,39)+"'":'"'+a(e.text,34)+'"'}case 15:case 16:case 17:case 18:{let a=n&1||ai(e)&16777216?xd:wd,_=e.rawText??TI(a(e.text,96));switch(e.kind){case 15:return"`"+_+"`";case 16:return"`"+_+"${";case 17:return"}"+_+"${";case 18:return"}"+_+"`"}break}case 9:case 10:return e.text;case 14:return n&4&&e.isUnterminated?e.text+(e.text.charCodeAt(e.text.length-1)===92?" /":"/"):e.text}return I.fail(`Literal kind '${e.kind}' not accounted for.`)}function jk(e,t){if(ya(e)||!e.parent||t&4&&e.isUnterminated)return!1;if(lo(e)){if(e.numericLiteralFlags&26656)return!1;if(e.numericLiteralFlags&512)return!!(t&8)}return!db(e)}function Fk(e){return g_(e)?'"'+wd(e)+'"':""+e}function Bk(e){return os(e).replace(/^(\d)/,"_$1").replace(/\W/g,"_")}function Uk(e){return(x_(e)&7)!==0||NT(e)}function NT(e){let t=bm(e);return t.kind===260&&t.parent.kind===299}function um(e){return Zi(e)&&(e.name.kind===11||pm(e))}function qk(e){return Zi(e)&&e.name.kind===11}function zk(e){return Zi(e)&&Tr(e.name)}function OT(e){return Zi(e)||Ae(e)}function Wk(e){return Vk(e.valueDeclaration)}function Vk(e){return!!e&&e.kind===267&&!e.body}function Hk(e){return e.kind===312||e.kind===267||am(e)}function pm(e){return!!(e.flags&2048)}function Zg(e){return um(e)&&MT(e)}function MT(e){switch(e.parent.kind){case 312:return ns(e.parent);case 268:return um(e.parent.parent)&&ci(e.parent.parent.parent)&&!ns(e.parent.parent.parent)}return!1}function LT(e){var t;return(t=e.declarations)==null?void 0:t.find(n=>!Zg(n)&&!(Zi(n)&&pm(n)))}function Gk(e){return e===1||e===100||e===199}function e2(e,t){return ns(e)||Gk(_i(t))&&!!e.commonJsModuleIndicator}function Xk(e,t){switch(e.scriptKind){case 1:case 3:case 2:case 4:break;default:return!1}return e.isDeclarationFile?!1:Y2(t,"alwaysStrict")||A8(e.statements)?!0:ns(e)||G2(t)?_i(t)>=5?!0:!t.noImplicitUseStrict:!1}function $k(e){return!!(e.flags&33554432)||Cn(e,128)}function JT(e,t){switch(e.kind){case 312:case 269:case 299:case 267:case 248:case 249:case 250:case 176:case 174:case 177:case 178:case 262:case 218:case 219:case 172:case 175:return!0;case 241:return!am(t)}return!1}function Qk(e){switch(I.type(e),e.kind){case 345:case 353:case 330:return!0;default:return RT(e)}}function RT(e){switch(I.type(e),e.kind){case 179:case 180:case 173:case 181:case 184:case 185:case 324:case 263:case 231:case 264:case 265:case 352:case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function t2(e){switch(e.kind){case 272:case 271:return!0;default:return!1}}function Yk(e){return t2(e)||mm(e)}function Kk(e){switch(e.kind){case 272:case 271:case 243:case 263:case 262:case 267:case 265:case 264:case 266:return!0;default:return!1}}function Zk(e){return fm(e)||Zi(e)||nu(e)||s2(e)}function fm(e){return t2(e)||F_(e)}function eD(e){return or(e.parent,t=>!!(getContainerFlags(t)&1))}function A0(e){return or(e.parent,t=>JT(t,t.parent))}function tD(e,t){let n=A0(e);for(;n;)t(n),n=A0(n)}function jT(e){return!e||cm(e)===0?"(Missing)":lm(e)}function nD(e){return e.declaration?jT(e.declaration.parameters[0].name):void 0}function rD(e){return e.kind===167&&!Yi(e.expression)}function n2(e){var t;switch(e.kind){case 80:case 81:return(t=e.emitNode)!=null&&t.autoGenerate?void 0:e.escapedText;case 11:case 9:case 15:return qr(e.text);case 167:return Yi(e.expression)?qr(e.expression.text):void 0;case 295:return Yl(e);default:return I.assertNever(e)}}function iD(e){return I.checkDefined(n2(e))}function Ci(e){switch(e.kind){case 110:return"this";case 81:case 80:return cm(e)===0?Lt(e):lm(e);case 166:return Ci(e.left)+"."+Ci(e.right);case 211:return Ae(e.name)||Vn(e.name)?Ci(e.expression)+"."+Ci(e.name):I.assertNever(e.name);case 318:return Ci(e.left)+Ci(e.right);case 295:return Ci(e.namespace)+":"+Ci(e.name);default:return I.assertNever(e)}}function aD(e,t,...n){let a=oi(e);return FT(a,e,t,...n)}function oD(e,t,n,...a){let _=Mt(e.text,t.pos);return V2(e,_,t.end-_,n,...a)}function FT(e,t,n,...a){let _=a2(e,t);return V2(e,_.start,_.length,n,...a)}function sD(e,t,n,a){let _=a2(e,t);return i2(e,_.start,_.length,n,a)}function _D(e,t,n,a){let _=Mt(e.text,t.pos);return i2(e,_,t.end-_,n,a)}function r2(e,t,n){I.assertGreaterThanOrEqual(t,0),I.assertGreaterThanOrEqual(n,0),I.assertLessThanOrEqual(t,e.length),I.assertLessThanOrEqual(t+n,e.length)}function i2(e,t,n,a,_){return r2(e.text,t,n),{file:e,start:t,length:n,code:a.code,category:a.category,messageText:a.next?a:a.messageText,relatedInformation:_}}function cD(e,t,n){return{file:e,start:0,length:0,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:n}}function lD(e){return typeof e.messageText=="string"?{code:e.code,category:e.category,messageText:e.messageText,next:e.next}:e.messageText}function uD(e,t,n){return{file:e,start:t.pos,length:t.end-t.pos,code:n.code,category:n.category,messageText:n.message}}function Ks(e,t){let n=ss(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);n.scan();let a=n.getTokenStart();return Xi(a,n.getTokenEnd())}function pD(e,t){let n=ss(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);return n.scan(),n.getToken()}function fD(e,t){let n=Mt(e.text,t.pos);if(t.body&&t.body.kind===241){let{line:a}=no(e,t.body.pos),{line:_}=no(e,t.body.end);if(a<_)return S_(n,ET(a,e)-n+1)}return Xi(n,t.end)}function a2(e,t){let n=t;switch(t.kind){case 312:{let p=Mt(e.text,0,!1);return p===e.text.length?S_(0,0):Ks(e,p)}case 260:case 208:case 263:case 231:case 264:case 267:case 266:case 306:case 262:case 218:case 174:case 177:case 178:case 265:case 172:case 171:case 274:n=t.name;break;case 219:return fD(e,t);case 296:case 297:{let p=Mt(e.text,t.pos),m=t.statements.length>0?t.statements[0].pos:t.end;return Xi(p,m)}case 253:case 229:{let p=Mt(e.text,t.pos);return Ks(e,p)}case 238:{let p=Mt(e.text,t.expression.end);return Ks(e,p)}case 357:{let p=Mt(e.text,t.tagName.pos);return Ks(e,p)}}if(n===void 0)return Ks(e,t.pos);I.assert(!ds(n));let a=Vi(n),_=a||Id(t)?n.pos:Mt(e.text,n.pos);return a?(I.assert(_===n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),I.assert(_===n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(I.assert(_>=n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),I.assert(_<=n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),Xi(_,n.end)}function dD(e){return(e.externalModuleIndicator||e.commonJsModuleIndicator)!==void 0}function o2(e){return e.scriptKind===6}function mD(e){return!!(Kd(e)&4096)}function hD(e){return!!(Kd(e)&8&&!v4(e,e.parent))}function yD(e){return(x_(e)&7)===6}function gD(e){return(x_(e)&7)===4}function BT(e){return(x_(e)&7)===2}function bD(e){return(x_(e)&7)===1}function vD(e){return e.kind===213&&e.expression.kind===108}function s2(e){return e.kind===213&&e.expression.kind===102}function k0(e){return Ab(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}function _2(e){return nu(e)&&xb(e.argument)&&Tr(e.argument.literal)}function Sa(e){return e.kind===244&&e.expression.kind===11}function dm(e){return!!(ai(e)&2097152)}function D0(e){return dm(e)&&us(e)}function TD(e){return Ae(e.name)&&!e.initializer}function P0(e){return dm(e)&&ls(e)&&so(e.declarationList.declarations,TD)}function SD(e,t){return e.kind!==12?Ho(t.text,e.pos):void 0}function UT(e,t){let n=e.kind===169||e.kind===168||e.kind===218||e.kind===219||e.kind===217||e.kind===260||e.kind===281?h_(t4(t,e.pos),Ho(t,e.pos)):Ho(t,e.pos);return rr(n,a=>t.charCodeAt(a.pos+1)===42&&t.charCodeAt(a.pos+2)===42&&t.charCodeAt(a.pos+3)!==47)}function c2(e){if(182<=e.kind&&e.kind<=205)return!0;switch(e.kind){case 133:case 159:case 150:case 163:case 154:case 136:case 155:case 151:case 157:case 106:case 146:return!0;case 116:return e.parent.kind!==222;case 233:return Ml(e.parent)&&!F0(e);case 168:return e.parent.kind===200||e.parent.kind===195;case 80:(e.parent.kind===166&&e.parent.right===e||e.parent.kind===211&&e.parent.name===e)&&(e=e.parent),I.assert(e.kind===80||e.kind===166||e.kind===211,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 166:case 211:case 110:{let{parent:t}=e;if(t.kind===186)return!1;if(t.kind===205)return!t.isTypeOf;if(182<=t.kind&&t.kind<=205)return!0;switch(t.kind){case 233:return Ml(t.parent)&&!F0(t);case 168:return e===t.constraint;case 352:return e===t.constraint;case 172:case 171:case 169:case 260:return e===t.type;case 262:case 218:case 219:case 176:case 174:case 173:case 177:case 178:return e===t.type;case 179:case 180:case 181:return e===t.type;case 216:return e===t.type;case 213:case 214:case 215:return rs(t.typeArguments,e)}}}return!1}function xD(e,t){for(;e;){if(e.kind===t)return!0;e=e.parent}return!1}function wD(e,t){return n(e);function n(a){switch(a.kind){case 253:return t(a);case 269:case 241:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 296:case 297:case 256:case 258:case 299:return Wt(a,n)}}}function ED(e,t){return n(e);function n(a){switch(a.kind){case 229:t(a);let _=a.expression;_&&n(_);return;case 266:case 264:case 267:case 265:return;default:if($i(a)){if(a.name&&a.name.kind===167){n(a.name.expression);return}}else c2(a)||Wt(a,n)}}}function CD(e){return e&&e.kind===188?e.elementType:e&&e.kind===183?Fd(e.typeArguments):void 0}function AD(e){switch(e.kind){case 264:case 263:case 231:case 187:return e.members;case 210:return e.properties}}function l2(e){if(e)switch(e.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function kD(e){return l2(e)||om(e)}function qT(e){return e.parent.kind===261&&e.parent.parent.kind===243}function DD(e){return Vt(e)?uo(e.parent)&&At(e.parent.parent)&&Oa(e.parent.parent)===2||u2(e.parent):!1}function u2(e){return Vt(e)?At(e)&&Oa(e)===1:!1}function PD(e){return(Li(e)?BT(e)&&Ae(e.name)&&qT(e):Ia(e)?j0(e)&&xm(e):Zl(e)&&j0(e))||u2(e)}function ID(e){switch(e.kind){case 174:case 173:case 176:case 177:case 178:case 262:case 218:return!0}return!1}function ND(e,t){for(;;){if(t&&t(e),e.statement.kind!==256)return e.statement;e=e.statement}}function zT(e){return e&&e.kind===241&&$i(e.parent)}function OD(e){return e&&e.kind===174&&e.parent.kind===210}function MD(e){return(e.kind===174||e.kind===177||e.kind===178)&&(e.parent.kind===210||e.parent.kind===231)}function LD(e){return e&&e.kind===1}function JD(e){return e&&e.kind===0}function p2(e,t,n,a){return wn(e==null?void 0:e.properties,_=>{if(!fs(_))return;let p=n2(_.name);return t===p||a&&a===p?n(_):void 0})}function RD(e,t,n){return p2(e,t,a=>iu(a.initializer)?ir(a.initializer.elements,_=>Tr(_)&&_.text===n):void 0)}function WT(e){if(e&&e.statements.length){let t=e.statements[0].expression;return Ur(t,uo)}}function jD(e,t,n){return VT(e,t,a=>iu(a.initializer)?ir(a.initializer.elements,_=>Tr(_)&&_.text===n):void 0)}function VT(e,t,n){return p2(WT(e),t,n)}function FD(e){return or(e.parent,$i)}function BD(e){return or(e.parent,nT)}function I0(e){return or(e.parent,ar)}function UD(e){return or(e.parent,t=>ar(t)||$i(t)?"quit":eu(t))}function qD(e){return or(e.parent,am)}function zD(e){let t=or(e.parent,n=>ar(n)?"quit":M_(n));return t&&ar(t.parent)?I0(t.parent):I0(t??e)}function f2(e,t,n){for(I.assert(e.kind!==312);;){if(e=e.parent,!e)return I.fail();switch(e.kind){case 167:if(n&&ar(e.parent.parent))return e;e=e.parent.parent;break;case 170:e.parent.kind===169&&io(e.parent.parent)?e=e.parent.parent:io(e.parent)&&(e=e.parent);break;case 219:if(!t)continue;case 262:case 218:case 267:case 175:case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 179:case 180:case 181:case 266:case 312:return e}}}function WD(e){switch(e.kind){case 219:case 262:case 218:case 172:return!0;case 241:switch(e.parent.kind){case 176:case 174:case 177:case 178:return!0;default:return!1}default:return!1}}function VD(e){Ae(e)&&(es(e.parent)||us(e.parent))&&e.parent.name===e&&(e=e.parent);let t=f2(e,!0,!1);return ci(t)}function HD(e){let t=f2(e,!1,!1);if(t)switch(t.kind){case 176:case 262:case 218:return t}}function GD(e,t){for(;;){if(e=e.parent,!e)return;switch(e.kind){case 167:e=e.parent;break;case 262:case 218:case 219:if(!t)continue;case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 175:return e;case 170:e.parent.kind===169&&io(e.parent.parent)?e=e.parent.parent:io(e.parent)&&(e=e.parent);break}}}function XD(e){if(e.kind===218||e.kind===219){let t=e,n=e.parent;for(;n.kind===217;)t=n,n=n.parent;if(n.kind===213&&n.expression===t)return n}}function $D(e){return e.kind===108||vd(e)}function vd(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===108}function QD(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===110}function YD(e){var t;return!!e&&Li(e)&&((t=e.initializer)==null?void 0:t.kind)===110}function KD(e){return!!e&&(_u(e)||fs(e))&&At(e.parent.parent)&&e.parent.parent.operatorToken.kind===64&&e.parent.parent.right.kind===110}function ZD(e){switch(e.kind){case 183:return e.typeName;case 233:return co(e.expression)?e.expression:void 0;case 80:case 166:return e}}function eP(e){switch(e.kind){case 215:return e.tag;case 286:case 285:return e.tagName;case 226:return e.right;default:return e.expression}}function HT(e,t,n,a){if(e&&Zd(t)&&Vn(t.name))return!1;switch(t.kind){case 263:return!0;case 231:return!e;case 172:return n!==void 0&&(e?es(n):ar(n)&&!Y3(t)&&!K3(t));case 177:case 178:case 174:return t.body!==void 0&&n!==void 0&&(e?es(n):ar(n));case 169:return e?n!==void 0&&n.body!==void 0&&(n.kind===176||n.kind===174||n.kind===178)&&V3(n)!==t&&a!==void 0&&a.kind===263:!1}return!1}function l_(e,t,n,a){return kl(t)&&HT(e,t,n,a)}function N0(e,t,n,a){return l_(e,t,n,a)||d2(e,t,n)}function d2(e,t,n){switch(t.kind){case 263:return Ze(t.members,a=>N0(e,a,t,n));case 231:return!e&&Ze(t.members,a=>N0(e,a,t,n));case 174:case 178:case 176:return Ze(t.parameters,a=>l_(e,a,t,n));default:return!1}}function tP(e,t){if(l_(e,t))return!0;let n=W3(t);return!!n&&d2(e,n,t)}function nP(e,t,n){let a;if(om(t)){let{firstAccessor:_,secondAccessor:p,setAccessor:m}=J2(n.members,t),y=kl(_)?_:p&&kl(p)?p:void 0;if(!y||t!==y)return!1;a=m==null?void 0:m.parameters}else f_(t)&&(a=t.parameters);if(l_(e,t,n))return!0;if(a){for(let _ of a)if(!$l(_)&&l_(e,_,t,n))return!0}return!1}function GT(e){if(e.textSourceNode){switch(e.textSourceNode.kind){case 11:return GT(e.textSourceNode);case 15:return e.text===""}return!1}return e.text===""}function Jf(e){let{parent:t}=e;return t.kind===286||t.kind===285||t.kind===287?t.tagName===e:!1}function m2(e){switch(e.kind){case 108:case 106:case 112:case 97:case 14:case 209:case 210:case 211:case 212:case 213:case 214:case 215:case 234:case 216:case 238:case 235:case 217:case 218:case 231:case 219:case 222:case 220:case 221:case 224:case 225:case 226:case 227:case 230:case 228:case 232:case 284:case 285:case 288:case 229:case 223:case 236:return!0;case 233:return!Ml(e.parent)&&!Fm(e.parent);case 166:for(;e.parent.kind===166;)e=e.parent;return e.parent.kind===186||dl(e.parent)||Vf(e.parent)||r_(e.parent)||Jf(e);case 318:for(;r_(e.parent);)e=e.parent;return e.parent.kind===186||dl(e.parent)||Vf(e.parent)||r_(e.parent)||Jf(e);case 81:return At(e.parent)&&e.parent.left===e&&e.parent.operatorToken.kind===103;case 80:if(e.parent.kind===186||dl(e.parent)||Vf(e.parent)||r_(e.parent)||Jf(e))return!0;case 9:case 10:case 11:case 15:case 110:return XT(e);default:return!1}}function XT(e){let{parent:t}=e;switch(t.kind){case 260:case 169:case 172:case 171:case 306:case 303:case 208:return t.initializer===e;case 244:case 245:case 246:case 247:case 253:case 254:case 255:case 296:case 257:return t.expression===e;case 248:let n=t;return n.initializer===e&&n.initializer.kind!==261||n.condition===e||n.incrementor===e;case 249:case 250:let a=t;return a.initializer===e&&a.initializer.kind!==261||a.expression===e;case 216:case 234:return e===t.expression;case 239:return e===t.expression;case 167:return e===t.expression;case 170:case 294:case 293:case 305:return!0;case 233:return t.expression===e&&!c2(t);case 304:return t.objectAssignmentInitializer===e;case 238:return e===t.expression;default:return m2(t)}}function $T(e){for(;e.kind===166||e.kind===80;)e=e.parent;return e.kind===186}function rP(e){return Jm(e)&&!!e.parent.moduleSpecifier}function QT(e){return e.kind===271&&e.moduleReference.kind===283}function iP(e){return I.assert(QT(e)),e.moduleReference.expression}function aP(e){return mm(e)&&W2(e.initializer).arguments[0]}function oP(e){return e.kind===271&&e.moduleReference.kind!==283}function h2(e){return Vt(e)}function sP(e){return!Vt(e)}function Vt(e){return!!e&&!!(e.flags&524288)}function _P(e){return!!e&&!!(e.flags&134217728)}function cP(e){return!o2(e)}function YT(e){return!!e&&!!(e.flags&16777216)}function lP(e){return J_(e)&&Ae(e.typeName)&&e.typeName.escapedText==="Object"&&e.typeArguments&&e.typeArguments.length===2&&(e.typeArguments[0].kind===154||e.typeArguments[0].kind===150)}function Hl(e,t){if(e.kind!==213)return!1;let{expression:n,arguments:a}=e;if(n.kind!==80||n.escapedText!=="require"||a.length!==1)return!1;let _=a[0];return!t||ni(_)}function KT(e){return ZT(e,!1)}function mm(e){return ZT(e,!0)}function uP(e){return ru(e)&&mm(e.parent.parent)}function ZT(e,t){return Li(e)&&!!e.initializer&&Hl(t?W2(e.initializer):e.initializer,!0)}function e3(e){return ls(e)&&e.declarationList.declarations.length>0&&so(e.declarationList.declarations,t=>KT(t))}function pP(e){return e===39||e===34}function fP(e,t){return Qo(t,e).charCodeAt(0)===34}function O0(e){return At(e)||Ko(e)||Ae(e)||R_(e)}function t3(e){return Vt(e)&&e.initializer&&At(e.initializer)&&(e.initializer.operatorToken.kind===57||e.initializer.operatorToken.kind===61)&&e.name&&co(e.name)&&u_(e.name,e.initializer.left)?e.initializer.right:e.initializer}function dP(e){let t=t3(e);return t&&E_(t,k_(e.name))}function mP(e,t){return wn(e.properties,n=>fs(n)&&Ae(n.name)&&n.name.escapedText==="value"&&n.initializer&&E_(n.initializer,t))}function hP(e){if(e&&e.parent&&At(e.parent)&&e.parent.operatorToken.kind===64){let t=k_(e.parent.left);return E_(e.parent.right,t)||yP(e.parent.left,e.parent.right,t)}if(e&&R_(e)&&b2(e)){let t=mP(e.arguments[2],e.arguments[1].text==="prototype");if(t)return t}}function E_(e,t){if(R_(e)){let n=C_(e.expression);return n.kind===218||n.kind===219?e:void 0}if(e.kind===218||e.kind===231||e.kind===219||uo(e)&&(e.properties.length===0||t))return e}function yP(e,t,n){let a=At(t)&&(t.operatorToken.kind===57||t.operatorToken.kind===61)&&E_(t.right,n);if(a&&u_(e,t.left))return a}function gP(e){let t=Li(e.parent)?e.parent.name:At(e.parent)&&e.parent.operatorToken.kind===64?e.parent.left:void 0;return t&&E_(e.right,k_(t))&&co(t)&&u_(t,e.left)}function bP(e){if(At(e.parent)){let t=(e.parent.operatorToken.kind===57||e.parent.operatorToken.kind===61)&&At(e.parent.parent)?e.parent.parent:e.parent;if(t.operatorToken.kind===64&&Ae(t.left))return t.left}else if(Li(e.parent))return e.parent.name}function u_(e,t){return L0(e)&&L0(t)?Sd(e)===Sd(t):ro(e)&&Rf(t)&&(t.expression.kind===110||Ae(t.expression)&&(t.expression.escapedText==="window"||t.expression.escapedText==="self"||t.expression.escapedText==="global"))?u_(e,i3(t)):Rf(e)&&Rf(t)?ao(e)===ao(t)&&u_(e.expression,t.expression):!1}function y2(e){for(;si(e,!0);)e=e.right;return e}function n3(e){return Ae(e)&&e.escapedText==="exports"}function r3(e){return Ae(e)&&e.escapedText==="module"}function g2(e){return(Ln(e)||Gl(e))&&r3(e.expression)&&ao(e)==="exports"}function Oa(e){let t=vP(e);return t===5||Vt(e)?t:0}function b2(e){return eo(e.arguments)===3&&Ln(e.expression)&&Ae(e.expression.expression)&&Lt(e.expression.expression)==="Object"&&Lt(e.expression.name)==="defineProperty"&&Yi(e.arguments[1])&&Yo(e.arguments[0],!0)}function Rf(e){return Ln(e)||Gl(e)}function Gl(e){return Ki(e)&&Yi(e.argumentExpression)}function _s(e,t){return Ln(e)&&(!t&&e.expression.kind===110||Ae(e.name)&&Yo(e.expression,!0))||v2(e,t)}function v2(e,t){return Gl(e)&&(!t&&e.expression.kind===110||co(e.expression)||_s(e.expression,!0))}function Yo(e,t){return co(e)||_s(e,t)}function i3(e){return Ln(e)?e.name:e.argumentExpression}function vP(e){if(R_(e)){if(!b2(e))return 0;let t=e.arguments[0];return n3(t)||g2(t)?8:_s(t)&&ao(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!Ko(e.left)||TP(y2(e))?0:Yo(e.left.expression,!0)&&ao(e.left)==="prototype"&&uo(o3(e))?6:a3(e.left)}function TP(e){return wb(e)&&lo(e.expression)&&e.expression.text==="0"}function hm(e){if(Ln(e))return e.name;let t=C_(e.argumentExpression);return lo(t)||ni(t)?t:e}function ao(e){let t=hm(e);if(t){if(Ae(t))return t.escapedText;if(ni(t)||lo(t))return qr(t.text)}}function a3(e){if(e.expression.kind===110)return 4;if(g2(e))return 2;if(Yo(e.expression,!0)){if(k_(e.expression))return 3;let t=e;for(;!Ae(t.expression);)t=t.expression;let n=t.expression;if((n.escapedText==="exports"||n.escapedText==="module"&&ao(t)==="exports")&&_s(e))return 1;if(Yo(e,!0)||Ki(e)&&P2(e))return 5}return 0}function o3(e){for(;At(e.right);)e=e.right;return e.right}function SP(e){return At(e)&&Oa(e)===3}function xP(e){return Vt(e)&&e.parent&&e.parent.kind===244&&(!Ki(e)||Gl(e))&&!!nm(e.parent)}function wP(e,t){let{valueDeclaration:n}=e;(!n||!(t.flags&33554432&&!Vt(t)&&!(n.flags&33554432))&&O0(n)&&!O0(t)||n.kind!==t.kind&&OT(n))&&(e.valueDeclaration=t)}function EP(e){if(!e||!e.valueDeclaration)return!1;let t=e.valueDeclaration;return t.kind===262||Li(t)&&t.initializer&&$i(t.initializer)}function CP(e){var t,n;switch(e.kind){case 260:case 208:return(t=or(e.initializer,a=>Hl(a,!0)))==null?void 0:t.arguments[0];case 272:case 278:return Ur(e.moduleSpecifier,ni);case 271:return Ur((n=Ur(e.moduleReference,Rm))==null?void 0:n.expression,ni);case 273:case 280:return Ur(e.parent.moduleSpecifier,ni);case 274:case 281:return Ur(e.parent.parent.moduleSpecifier,ni);case 276:return Ur(e.parent.parent.parent.moduleSpecifier,ni);case 205:return _2(e)?e.argument.literal:void 0;default:I.assertNever(e)}}function AP(e){return s3(e)||I.failBadSyntaxKind(e.parent)}function s3(e){switch(e.parent.kind){case 272:case 278:return e.parent;case 283:return e.parent.parent;case 213:return s2(e.parent)||Hl(e.parent,!1)?e.parent:void 0;case 201:return I.assert(Tr(e)),Ur(e.parent.parent,nu);default:return}}function T2(e){switch(e.kind){case 272:case 278:return e.moduleSpecifier;case 271:return e.moduleReference.kind===283?e.moduleReference.expression:void 0;case 205:return _2(e)?e.argument.literal:void 0;case 213:return e.arguments[0];case 267:return e.name.kind===11?e.name:void 0;default:return I.assertNever(e)}}function _3(e){switch(e.kind){case 272:return e.importClause&&Ur(e.importClause.namedBindings,Mb);case 271:return e;case 278:return e.exportClause&&Ur(e.exportClause,Jm);default:return I.assertNever(e)}}function c3(e){return e.kind===272&&!!e.importClause&&!!e.importClause.name}function kP(e,t){if(e.name){let n=t(e);if(n)return n}if(e.namedBindings){let n=Mb(e.namedBindings)?t(e.namedBindings):wn(e.namedBindings.elements,t);if(n)return n}}function DP(e){if(e)switch(e.kind){case 169:case 174:case 173:case 304:case 303:case 172:case 171:return e.questionToken!==void 0}return!1}function PP(e){let t=jm(e)?y_(e.parameters):void 0,n=Ur(t&&t.name,Ae);return!!n&&n.escapedText==="new"}function Xl(e){return e.kind===353||e.kind===345||e.kind===347}function IP(e){return Xl(e)||Db(e)}function NP(e){return ou(e)&&At(e.expression)&&e.expression.operatorToken.kind===64?y2(e.expression):void 0}function l3(e){return ou(e)&&At(e.expression)&&Oa(e.expression)!==0&&At(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function S2(e){switch(e.kind){case 243:let t=Al(e);return t&&t.initializer;case 172:return e.initializer;case 303:return e.initializer}}function Al(e){return ls(e)?y_(e.declarationList.declarations):void 0}function u3(e){return Zi(e)&&e.body&&e.body.kind===267?e.body:void 0}function OP(e){if(e.kind>=243&&e.kind<=259)return!0;switch(e.kind){case 80:case 110:case 108:case 166:case 236:case 212:case 211:case 208:case 218:case 219:case 174:case 177:case 178:return!0;default:return!1}}function ym(e){switch(e.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 324:case 330:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function p3(e,t){let n;l2(e)&&TT(e)&&Hi(e.initializer)&&(n=zn(n,I6(e,Ea(e.initializer.jsDoc))));let a=e;for(;a&&a.parent;){if(Hi(a)&&(n=zn(n,I6(e,Ea(a.jsDoc)))),a.kind===169){n=zn(n,(t?P4:tm)(a));break}if(a.kind===168){n=zn(n,(t?O4:N4)(a));break}a=f3(a)}return n||Je}function I6(e,t){if(ds(t)){let n=rr(t.tags,a=>N6(e,a));return t.tags===n?[t]:n}return N6(e,t)?[t]:void 0}function N6(e,t){return!(lu(t)||Hb(t))||!t.parent||!ds(t.parent)||!cs(t.parent.parent)||t.parent.parent===e}function f3(e){let t=e.parent;if(t.kind===303||t.kind===277||t.kind===172||t.kind===244&&e.kind===211||t.kind===253||u3(t)||si(e))return t;if(t.parent&&(Al(t.parent)===e||si(t)))return t.parent;if(t.parent&&t.parent.parent&&(Al(t.parent.parent)||S2(t.parent.parent)===e||l3(t.parent.parent)))return t.parent.parent}function MP(e){if(e.symbol)return e.symbol;if(!Ae(e.name))return;let t=e.name.escapedText,n=x2(e);if(!n)return;let a=ir(n.parameters,_=>_.name.kind===80&&_.name.escapedText===t);return a&&a.symbol}function LP(e){if(ds(e.parent)&&e.parent.tags){let t=ir(e.parent.tags,Xl);if(t)return t}return x2(e)}function x2(e){let t=w2(e);if(t)return Zl(t)&&t.type&&$i(t.type)?t.type:$i(t)?t:void 0}function w2(e){let t=d3(e);if(t)return l3(t)||NP(t)||S2(t)||Al(t)||u3(t)||t}function d3(e){let t=E2(e);if(!t)return;let n=t.parent;if(n&&n.jsDoc&&t===Pi(n.jsDoc))return n}function E2(e){return or(e.parent,ds)}function JP(e){let t=e.name.escapedText,{typeParameters:n}=e.parent.parent.parent;return n&&ir(n,a=>a.name.escapedText===t)}function RP(e){return!!e.typeArguments}function C2(e){let t=e.parent;for(;;){switch(t.kind){case 226:let n=t,a=n.operatorToken.kind;return A_(a)&&n.left===e?n:void 0;case 224:case 225:let _=t,p=_.operator;return p===46||p===47?_:void 0;case 249:case 250:let m=t;return m.initializer===e?m:void 0;case 217:case 209:case 230:case 235:e=t;break;case 305:e=t.parent;break;case 304:if(t.name!==e)return;e=t.parent;break;case 303:if(t.name===e)return;e=t.parent;break;default:return}t=e.parent}}function jP(e){let t=C2(e);if(!t)return 0;switch(t.kind){case 226:let n=t.operatorToken.kind;return n===64||Em(n)?1:2;case 224:case 225:return 2;case 249:case 250:return 1}}function FP(e){return!!C2(e)}function BP(e){let t=C_(e.right);return t.kind===226&&$b(t.operatorToken.kind)}function UP(e){let t=C2(e);return!!t&&si(t,!0)&&BP(t)}function qP(e){switch(e.kind){case 241:case 243:case 254:case 245:case 255:case 269:case 296:case 297:case 256:case 248:case 249:case 250:case 246:case 247:case 258:case 299:return!0}return!1}function zP(e){return Nm(e)||Om(e)||zg(e)||us(e)||L_(e)}function m3(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function WP(e){return m3(e,196)}function h3(e){return m3(e,217)}function VP(e){let t;for(;e&&e.kind===196;)t=e,e=e.parent;return[t,e]}function HP(e){for(;Tb(e);)e=e.type;return e}function C_(e,t){return ms(e,t?17:1)}function GP(e){return e.kind!==211&&e.kind!==212?!1:(e=h3(e.parent),e&&e.kind===220)}function XP(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1}function y3(e){return!ci(e)&&!sm(e)&&Xo(e.parent)&&e.parent.name===e}function $P(e){let t=e.parent;switch(e.kind){case 11:case 15:case 9:if(oo(t))return t.parent;case 80:if(Xo(t))return t.name===e?t:void 0;if(O_(t)){let n=t.parent;return m_(n)&&n.name===t?n:void 0}else{let n=t.parent;return At(n)&&Oa(n)!==0&&(n.left.symbol||n.symbol)&&ql(n)===e?n:void 0}case 81:return Xo(t)&&t.name===e?t:void 0;default:return}}function g3(e){return Yi(e)&&e.parent.kind===167&&Xo(e.parent.parent)}function QP(e){let t=e.parent;switch(t.kind){case 172:case 171:case 174:case 173:case 177:case 178:case 306:case 303:case 211:return t.name===e;case 166:return t.right===e;case 208:case 276:return t.propertyName===e;case 281:case 291:case 285:case 286:case 287:return!0}return!1}function YP(e){return e.kind===271||e.kind===270||e.kind===273&&e.name||e.kind===274||e.kind===280||e.kind===276||e.kind===281||e.kind===277&&M0(e)?!0:Vt(e)&&(At(e)&&Oa(e)===2&&M0(e)||Ln(e)&&At(e.parent)&&e.parent.left===e&&e.parent.operatorToken.kind===64&&A2(e.parent.right))}function b3(e){switch(e.parent.kind){case 273:case 276:case 274:case 281:case 277:case 271:case 280:return e.parent;case 166:do e=e.parent;while(e.parent.kind===166);return b3(e)}}function A2(e){return co(e)||Ol(e)}function M0(e){let t=v3(e);return A2(t)}function v3(e){return ps(e)?e.expression:e.right}function KP(e){return e.kind===304?e.name:e.kind===303?e.initializer:e.parent.right}function T3(e){let t=S3(e);if(t&&Vt(e)){let n=M4(e);if(n)return n.class}return t}function S3(e){let t=gm(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function x3(e){if(Vt(e))return L4(e).map(t=>t.class);{let t=gm(e.heritageClauses,119);return t==null?void 0:t.types}}function w3(e){return su(e)?E3(e)||Je:ar(e)&&h_(Kf(T3(e)),x3(e))||Je}function E3(e){let t=gm(e.heritageClauses,96);return t?t.types:void 0}function gm(e,t){if(e){for(let n of e)if(n.token===t)return n}}function ZP(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}}function ki(e){return 83<=e&&e<=165}function C3(e){return 19<=e&&e<=79}function jf(e){return ki(e)||C3(e)}function k2(e){return 128<=e&&e<=165}function A3(e){return ki(e)&&!k2(e)}function eI(e){return 119<=e&&e<=127}function tI(e){let t=Fl(e);return t!==void 0&&A3(t)}function nI(e){let t=Fl(e);return t!==void 0&&ki(t)}function rI(e){let t=w4(e);return!!t&&!k2(t)}function iI(e){return 2<=e&&e<=7}function aI(e){if(!e)return 4;let t=0;switch(e.kind){case 262:case 218:case 174:e.asteriskToken&&(t|=1);case 219:Cn(e,1024)&&(t|=2);break}return e.body||(t|=4),t}function oI(e){switch(e.kind){case 262:case 218:case 219:case 174:return e.body!==void 0&&e.asteriskToken===void 0&&Cn(e,1024)}return!1}function Yi(e){return ni(e)||lo(e)}function D2(e){return Mm(e)&&(e.operator===40||e.operator===41)&&lo(e.operand)}function k3(e){let t=ql(e);return!!t&&P2(t)}function P2(e){if(!(e.kind===167||e.kind===212))return!1;let t=Ki(e)?C_(e.argumentExpression):e.expression;return!Yi(t)&&!D2(t)}function Td(e){switch(e.kind){case 80:case 81:return e.escapedText;case 11:case 15:case 9:return qr(e.text);case 167:let t=e.expression;return Yi(t)?qr(t.text):D2(t)?t.operator===41?en(t.operator)+t.operand.text:t.operand.text:void 0;case 295:return Yl(e);default:return I.assertNever(e)}}function L0(e){switch(e.kind){case 80:case 11:case 15:case 9:return!0;default:return!1}}function Sd(e){return ro(e)?Lt(e):B_(e)?Kl(e):e.text}function D3(e){return ro(e)?e.escapedText:B_(e)?Yl(e):qr(e.text)}function sI(e){return`__@${getSymbolId(e)}@${e.escapedName}`}function _I(e,t){return`__#${getSymbolId(e)}@${t}`}function cI(e){return Hn(e.escapedName,"__@")}function lI(e){return Hn(e.escapedName,"__#")}function uI(e){return e.kind===80&&e.escapedText==="Symbol"}function P3(e){return Ae(e)?Lt(e)==="__proto__":Tr(e)&&e.text==="__proto__"}function Zs(e,t){switch(e=ms(e),e.kind){case 231:if(classHasDeclaredOrExplicitlyAssignedName(e))return!1;break;case 218:if(e.name)return!1;break;case 219:break;default:return!1}return typeof t=="function"?t(e):!0}function I3(e){switch(e.kind){case 303:return!P3(e.name);case 304:return!!e.objectAssignmentInitializer;case 260:return Ae(e.name)&&!!e.initializer;case 169:return Ae(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 208:return Ae(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 172:return!!e.initializer;case 226:switch(e.operatorToken.kind){case 64:case 77:case 76:case 78:return Ae(e.left)}break;case 277:return!0}return!1}function pI(e,t){if(!I3(e))return!1;switch(e.kind){case 303:return Zs(e.initializer,t);case 304:return Zs(e.objectAssignmentInitializer,t);case 260:case 169:case 208:case 172:return Zs(e.initializer,t);case 226:return Zs(e.right,t);case 277:return Zs(e.expression,t)}}function fI(e){return e.escapedText==="push"||e.escapedText==="unshift"}function dI(e){return bm(e).kind===169}function bm(e){for(;e.kind===208;)e=e.parent.parent;return e}function mI(e){let t=e.kind;return t===176||t===218||t===262||t===219||t===174||t===177||t===178||t===267||t===312}function ya(e){return Da(e.pos)||Da(e.end)}function hI(e){return Ul(e,ci)||e}function yI(e){let t=I2(e),n=e.kind===214&&e.arguments!==void 0;return N3(e.kind,t,n)}function N3(e,t,n){switch(e){case 214:return n?0:1;case 224:case 221:case 222:case 220:case 223:case 227:case 229:return 1;case 226:switch(t){case 43:case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 1}}return 0}function gI(e){let t=I2(e),n=e.kind===214&&e.arguments!==void 0;return O3(e.kind,t,n)}function I2(e){return e.kind===226?e.operatorToken.kind:e.kind===224||e.kind===225?e.operator:e.kind}function O3(e,t,n){switch(e){case 361:return 0;case 230:return 1;case 229:return 2;case 227:return 4;case 226:switch(t){case 28:return 0;case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 3;default:return ml(t)}case 216:case 235:case 224:case 221:case 222:case 220:case 223:return 16;case 225:return 17;case 213:return 18;case 214:return n?19:18;case 215:case 211:case 212:case 236:return 19;case 234:case 238:return 11;case 110:case 108:case 80:case 81:case 106:case 112:case 97:case 9:case 10:case 11:case 209:case 210:case 218:case 219:case 231:case 14:case 15:case 228:case 217:case 232:case 284:case 285:case 288:return 20;default:return-1}}function ml(e){switch(e){case 61:return 4;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function bI(e){return rr(e,t=>{switch(t.kind){case 294:return!!t.expression;case 12:return!t.containsOnlyTriviaWhiteSpaces;default:return!0}})}function vI(){let e=[],t=[],n=new Map,a=!1;return{add:p,lookup:_,getGlobalDiagnostics:m,getDiagnostics:y};function _(u){let x;if(u.file?x=n.get(u.file.fileName):x=e,!x)return;let d=Jl(x,u,bt,Cd);if(d>=0)return x[d]}function p(u){let x;u.file?(x=n.get(u.file.fileName),x||(x=[],n.set(u.file.fileName,x),vl(t,u.file.fileName,Ii))):(a&&(a=!1,e=e.slice()),x=e),vl(x,u,Cd)}function m(){return a=!0,e}function y(u){if(u)return n.get(u)||[];let x=dv(t,d=>n.get(d));return e.length&&x.unshift(...e),x}}function TI(e){return e.replace(mx,"\\${")}function Qh(e){return!!((e.templateFlags||0)&2048)}function M3(e){return e&&!!(Jx(e)?Qh(e):Qh(e.head)||Ze(e.templateSpans,t=>Qh(t.literal)))}function L3(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}function SI(e,t,n){if(e.charCodeAt(0)===0){let a=n.charCodeAt(t+e.length);return a>=48&&a<=57?"\\x00":"\\0"}return bx.get(e)||L3(e.charCodeAt(0))}function xd(e,t){let n=t===96?gx:t===39?yx:hx;return e.replace(n,SI)}function wd(e,t){return e=xd(e,t),$0.test(e)?e.replace($0,n=>L3(n.charCodeAt(0))):e}function xI(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wI(e){return e.charCodeAt(0)===0?"�":Sx.get(e)||xI(e.charCodeAt(0))}function J3(e,t){let n=t===39?Tx:vx;return e.replace(n,wI)}function EI(e){let t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&CI(e.charCodeAt(0))?e.substring(1,t-1):e}function CI(e){return e===39||e===34||e===96}function R3(e){let t=e.charCodeAt(0);return t>=97&&t<=122||e.includes("-")}function N2(e){let t=Oo[1];for(let n=Oo.length;n<=e;n++)Oo.push(Oo[n-1]+t);return Oo[e]}function Fo(){return Oo[1].length}function AI(e){var t,n,a,_,p,m=!1;function y(Q){let se=Xd(Q);se.length>1?(_=_+se.length-1,p=t.length-Q.length+Ea(se),a=p-t.length===0):a=!1}function u(Q){Q&&Q.length&&(a&&(Q=N2(n)+Q,a=!1),t+=Q,y(Q))}function x(Q){Q&&(m=!1),u(Q)}function d(Q){Q&&(m=!0),u(Q)}function S(){t="",n=0,a=!0,_=0,p=0,m=!1}function T(Q){Q!==void 0&&(t+=Q,y(Q),m=!1)}function A(Q){Q&&Q.length&&x(Q)}function N(Q){(!a||Q)&&(t+=e,_++,p=t.length,a=!0,m=!1)}function q(){return a?t.length:t.length+e.length}return S(),{write:x,rawWrite:T,writeLiteral:A,writeLine:N,increaseIndent:()=>{n++},decreaseIndent:()=>{n--},getIndent:()=>n,getTextPos:()=>t.length,getLine:()=>_,getColumn:()=>a?n*Fo():t.length-p,getText:()=>t,isAtStartOfLine:()=>a,hasTrailingComment:()=>m,hasTrailingWhitespace:()=>!!t.length&&ka(t.charCodeAt(t.length-1)),clear:S,writeKeyword:x,writeOperator:x,writeParameter:x,writeProperty:x,writePunctuation:x,writeSpace:x,writeStringLiteral:x,writeSymbol:(Q,se)=>x(Q),writeTrailingSemicolon:x,writeComment:d,getTextPosWithWriteLine:q}}function kI(e){let t=!1;function n(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return{...e,writeTrailingSemicolon(){t=!0},writeLiteral(a){n(),e.writeLiteral(a)},writeStringLiteral(a){n(),e.writeStringLiteral(a)},writeSymbol(a,_){n(),e.writeSymbol(a,_)},writePunctuation(a){n(),e.writePunctuation(a)},writeKeyword(a){n(),e.writeKeyword(a)},writeOperator(a){n(),e.writeOperator(a)},writeParameter(a){n(),e.writeParameter(a)},writeSpace(a){n(),e.writeSpace(a)},writeProperty(a){n(),e.writeProperty(a)},writeComment(a){n(),e.writeComment(a)},writeLine(){n(),e.writeLine()},increaseIndent(){n(),e.increaseIndent()},decreaseIndent(){n(),e.decreaseIndent()}}}function O2(e){return e.useCaseSensitiveFileNames?e.useCaseSensitiveFileNames():!1}function j3(e){return Wd(O2(e))}function F3(e,t,n){return t.moduleName||M2(e,t.fileName,n&&n.fileName)}function O6(e,t){return e.getCanonicalFileName(Gi(t,e.getCurrentDirectory()))}function DI(e,t,n){let a=t.getExternalModuleFileFromDeclaration(n);if(!a||a.isDeclarationFile)return;let _=T2(n);if(!(_&&ni(_)&&!as(_.text)&&!O6(e,a.path).includes(O6(e,to(e.getCommonSourceDirectory())))))return F3(e,a)}function M2(e,t,n){let a=u=>e.getCanonicalFileName(u),_=Di(n?Mi(n):e.getCommonSourceDirectory(),e.getCurrentDirectory(),a),p=Gi(t,e.getCurrentDirectory()),m=Eg(_,p,_,a,!1),y=Dl(m);return n?Sg(y):y}function PI(e,t,n){let a=t.getCompilerOptions(),_;return a.outDir?_=Dl(q3(e,t,a.outDir)):_=Dl(e),_+n}function II(e,t){return B3(e,t.getCompilerOptions(),t.getCurrentDirectory(),t.getCommonSourceDirectory(),n=>t.getCanonicalFileName(n))}function B3(e,t,n,a,_){let p=t.declarationDir||t.outDir,m=p?Tm(e,p,n,a,_):e,y=U3(m);return Dl(m)+y}function U3(e){return ii(e,[".mjs",".mts"])?".d.mts":ii(e,[".cjs",".cts"])?".d.cts":ii(e,[".json"])?".d.json.ts":".d.ts"}function NI(e){return ii(e,[".d.mts",".mjs",".mts"])?[".mts",".mjs"]:ii(e,[".d.cts",".cjs",".cts"])?[".cts",".cjs"]:ii(e,[".d.json.ts"])?[".json"]:[".tsx",".ts",".jsx",".js"]}function vm(e){return e.outFile||e.out}function OI(e,t){var n;if(e.paths)return e.baseUrl??I.checkDefined(e.pathsBasePath||((n=t.getCurrentDirectory)==null?void 0:n.call(t)),"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.")}function MI(e,t,n){let a=e.getCompilerOptions();if(vm(a)){let _=_i(a),p=a.emitDeclarationOnly||_===2||_===4;return rr(e.getSourceFiles(),m=>(p||!ns(m))&&J0(m,e,n))}else{let _=t===void 0?e.getSourceFiles():[t];return rr(_,p=>J0(p,e,n))}}function J0(e,t,n){let a=t.getCompilerOptions();if(a.noEmitForJsFiles&&h2(e)||e.isDeclarationFile||t.isSourceFileFromExternalLibrary(e))return!1;if(n)return!0;if(t.isSourceOfProjectReferenceRedirect(e.fileName))return!1;if(!o2(e))return!0;if(t.getResolvedProjectReferenceToRedirect(e.fileName))return!1;if(vm(a))return!0;if(!a.outDir)return!1;if(a.rootDir||a.composite&&a.configFilePath){let _=Gi(getCommonSourceDirectory(a,()=>[],t.getCurrentDirectory(),t.getCanonicalFileName),t.getCurrentDirectory()),p=Tm(e.fileName,a.outDir,t.getCurrentDirectory(),_,t.getCanonicalFileName);if(Vv(e.fileName,p,t.getCurrentDirectory(),!t.useCaseSensitiveFileNames())===0)return!1}return!0}function q3(e,t,n){return Tm(e,n,t.getCurrentDirectory(),t.getCommonSourceDirectory(),a=>t.getCanonicalFileName(a))}function Tm(e,t,n,a,_){let p=Gi(e,n);return p=_(p).indexOf(_(a))===0?p.substring(a.length):p,Qt(t,p)}function LI(e,t,n,a,_,p,m){e.writeFile(n,a,_,y=>{t.add(hl(B.Could_not_write_file_0_Colon_1,n,y))},p,m)}function z3(e,t,n){if(e.length>Ni(e)&&!n(e)){let a=Mi(e);z3(a,t,n),t(e)}}function JI(e,t,n,a,_,p){try{a(e,t,n)}catch{z3(Mi(br(e)),_,p),a(e,t,n)}}function RI(e,t){let n=Aa(e);return __(n,t)}function Ta(e,t){return __(e,t)}function W3(e){return ir(e.members,t=>L_(t)&&Cl(t.body))}function L2(e){if(e&&e.parameters.length>0){let t=e.parameters.length===2&&$l(e.parameters[0]);return e.parameters[t?1:0]}}function jI(e){let t=L2(e);return t&&t.type}function V3(e){if(e.parameters.length&&!cu(e)){let t=e.parameters[0];if($l(t))return t}}function $l(e){return Sm(e.name)}function Sm(e){return!!e&&e.kind===80&&H3(e)}function FI(e){return!!or(e,t=>t.kind===186?!0:t.kind===80||t.kind===166?!1:"quit")}function BI(e){if(!Sm(e))return!1;for(;O_(e.parent)&&e.parent.left===e;)e=e.parent;return e.parent.kind===186}function H3(e){return e.escapedText==="this"}function J2(e,t){let n,a,_,p;return k3(t)?(n=t,t.kind===177?_=t:t.kind===178?p=t:I.fail("Accessor has wrong kind")):wn(e,m=>{if(om(m)&&R0(m)===R0(t)){let y=Td(m.name),u=Td(t.name);y===u&&(n?a||(a=m):n=m,m.kind===177&&!_&&(_=m),m.kind===178&&!p&&(p=m))}}),{firstAccessor:n,secondAccessor:a,getAccessor:_,setAccessor:p}}function R2(e){if(!Vt(e)&&us(e))return;let t=e.type;return t||!Vt(e)?t:Rg(e)?e.typeExpression&&e.typeExpression.type:rm(e)}function UI(e){return e.type}function qI(e){return cu(e)?e.type&&e.type.typeExpression&&e.type.typeExpression.type:e.type||(Vt(e)?z4(e):void 0)}function G3(e){return zo(zl(e),t=>zI(t)?t.typeParameters:void 0)}function zI(e){return ts(e)&&!(e.parent.kind===327&&(e.parent.tags.some(Xl)||e.parent.tags.some(zb)))}function WI(e){let t=L2(e);return t&&R2(t)}function X3(e,t,n,a){$3(e,t,n.pos,a)}function $3(e,t,n,a){a&&a.length&&n!==a[0].pos&&Ta(e,n)!==Ta(e,a[0].pos)&&t.writeLine()}function VI(e,t,n,a){n!==a&&Ta(e,n)!==Ta(e,a)&&t.writeLine()}function Q3(e,t,n,a,_,p,m,y){if(a&&a.length>0){_&&n.writeSpace(" ");let u=!1;for(let x of a)u&&(n.writeSpace(" "),u=!1),y(e,t,n,x.pos,x.end,m),x.hasTrailingNewLine?n.writeLine():u=!0;u&&p&&n.writeSpace(" ")}}function HI(e,t,n,a,_,p,m){let y,u;if(m?_.pos===0&&(y=rr(Ho(e,_.pos),x)):y=Ho(e,_.pos),y){let d=[],S;for(let T of y){if(S){let A=Ta(t,S.end);if(Ta(t,T.pos)>=A+2)break}d.push(T),S=T}if(d.length){let T=Ta(t,Ea(d).end);Ta(t,Mt(e,_.pos))>=T+2&&(X3(t,n,_,y),Q3(e,t,n,d,!1,!0,p,a),u={nodePos:_.pos,detachedCommentEndPos:Ea(d).end})}}return u;function x(d){return PT(e,d.pos)}}function GI(e,t,n,a,_,p){if(e.charCodeAt(a+1)===42){let m=kg(t,a),y=t.length,u;for(let x=a,d=m.line;x<_;d++){let S=d+1===y?e.length+1:t[d+1];if(x!==a){u===void 0&&(u=M6(e,t[m.line],a));let A=n.getIndent()*Fo()-u+M6(e,x,S);if(A>0){let N=A%Fo(),q=N2((A-N)/Fo());for(n.rawWrite(q);N;)n.rawWrite(" "),N--}else n.rawWrite("")}XI(e,_,n,p,x,S),x=S}}else n.writeComment(e.substring(a,_))}function XI(e,t,n,a,_,p){let m=Math.min(t,p-1),y=e.substring(_,m).trim();y?(n.writeComment(y),m!==t&&n.writeLine()):n.rawWrite(a)}function M6(e,t,n){let a=0;for(;t=0&&e.kind<=165?0:(e.modifierFlagsCache&536870912||(e.modifierFlagsCache=q2(e)|536870912),n||t&&Vt(e)?(!(e.modifierFlagsCache&268435456)&&e.parent&&(e.modifierFlagsCache|=nS(e)|268435456),rS(e.modifierFlagsCache)):KI(e.modifierFlagsCache))}function wm(e){return B2(e,!0)}function tS(e){return B2(e,!0,!0)}function U2(e){return B2(e,!1)}function nS(e){let t=0;return e.parent&&!Pa(e)&&(Vt(e)&&(J4(e)&&(t|=8388608),R4(e)&&(t|=16777216),j4(e)&&(t|=33554432),F4(e)&&(t|=67108864),B4(e)&&(t|=134217728)),U4(e)&&(t|=65536)),t}function KI(e){return e&65535}function rS(e){return e&131071|(e&260046848)>>>23}function ZI(e){return rS(nS(e))}function iS(e){return q2(e)|ZI(e)}function q2(e){let t=U_(e)?hr(e.modifiers):0;return(e.flags&8||e.kind===80&&e.flags&4096)&&(t|=32),t}function hr(e){let t=0;if(e)for(let n of e)t|=z2(n.kind);return t}function z2(e){switch(e){case 126:return 256;case 125:return 1;case 124:return 4;case 123:return 2;case 128:return 64;case 129:return 512;case 95:return 32;case 138:return 128;case 87:return 4096;case 90:return 2048;case 134:return 1024;case 148:return 8;case 164:return 16;case 103:return 8192;case 147:return 16384;case 170:return 32768}return 0}function aS(e){return e===57||e===56}function eN(e){return aS(e)||e===54}function Em(e){return e===76||e===77||e===78}function tN(e){return At(e)&&Em(e.operatorToken.kind)}function oS(e){return aS(e)||e===61}function nN(e){return At(e)&&oS(e.operatorToken.kind)}function A_(e){return e>=64&&e<=79}function sS(e){let t=_S(e);return t&&!t.isImplements?t.class:void 0}function _S(e){if(Cb(e)){if(Ml(e.parent)&&ar(e.parent.parent))return{class:e.parent.parent,isImplements:e.parent.token===119};if(Fm(e.parent)){let t=w2(e.parent);if(t&&ar(t))return{class:t,isImplements:!1}}}}function si(e,t){return At(e)&&(t?e.operatorToken.kind===64:A_(e.operatorToken.kind))&&jo(e.left)}function rN(e){return si(e.parent)&&e.parent.left===e}function iN(e){if(si(e,!0)){let t=e.left.kind;return t===210||t===209}return!1}function F0(e){return sS(e)!==void 0}function co(e){return e.kind===80||cS(e)}function aN(e){switch(e.kind){case 80:return e;case 166:do e=e.left;while(e.kind!==80);return e;case 211:do e=e.expression;while(e.kind!==80);return e}}function B0(e){return e.kind===80||e.kind===110||e.kind===108||e.kind===236||e.kind===211&&B0(e.expression)||e.kind===217&&B0(e.expression)}function cS(e){return Ln(e)&&Ae(e.name)&&co(e.expression)}function U0(e){if(Ln(e)){let t=U0(e.expression);if(t!==void 0)return t+"."+Ci(e.name)}else if(Ki(e)){let t=U0(e.expression);if(t!==void 0&&Vl(e.argumentExpression))return t+"."+Td(e.argumentExpression)}else{if(Ae(e))return Go(e.escapedText);if(B_(e))return Kl(e)}}function k_(e){return _s(e)&&ao(e)==="prototype"}function oN(e){return e.parent.kind===166&&e.parent.right===e||e.parent.kind===211&&e.parent.name===e||e.parent.kind===236&&e.parent.name===e}function lS(e){return!!e.parent&&(Ln(e.parent)&&e.parent.name===e||Ki(e.parent)&&e.parent.argumentExpression===e)}function sN(e){return O_(e.parent)&&e.parent.right===e||Ln(e.parent)&&e.parent.name===e||r_(e.parent)&&e.parent.right===e}function uS(e){return At(e)&&e.operatorToken.kind===104}function _N(e){return uS(e.parent)&&e===e.parent.right}function cN(e){return e.kind===210&&e.properties.length===0}function lN(e){return e.kind===209&&e.elements.length===0}function uN(e){if(!(!pN(e)||!e.declarations)){for(let t of e.declarations)if(t.localSymbol)return t.localSymbol}}function pN(e){return e&&eo(e.declarations)>0&&Cn(e.declarations[0],2048)}function fN(e){return ir(Ax,t=>Na(e,t))}function dN(e){let t=[],n=e.length;for(let a=0;a>6|192),t.push(_&63|128)):_<65536?(t.push(_>>12|224),t.push(_>>6&63|128),t.push(_&63|128)):_<131072?(t.push(_>>18|240),t.push(_>>12&63|128),t.push(_>>6&63|128),t.push(_&63|128)):I.assert(!1,"Unexpected code point")}return t}function pS(e){let t="",n=dN(e),a=0,_=n.length,p,m,y,u;for(;a<_;)p=n[a]>>2,m=(n[a]&3)<<4|n[a+1]>>4,y=(n[a+1]&15)<<2|n[a+2]>>6,u=n[a+2]&63,a+1>=_?y=u=64:a+2>=_&&(u=64),t+=Wi.charAt(p)+Wi.charAt(m)+Wi.charAt(y)+Wi.charAt(u),a+=3;return t}function mN(e){let t="",n=0,a=e.length;for(;n>4&3,d=(m&15)<<4|y>>2&15,S=(y&3)<<6|u&63;d===0&&y!==0?a.push(x):S===0&&u!==0?a.push(x,d):a.push(x,d,S),_+=4}return mN(a)}function fS(e,t){let n=g_(t)?t:t.readFile(e);if(!n)return;let a=parseConfigFileTextToJson(e,n);return a.error?void 0:a.config}function gN(e,t){return fS(e,t)||{}}function dS(e,t){return!t.directoryExists||t.directoryExists(e)}function mS(e){switch(e.newLine){case 0:return xx;case 1:case void 0:return wx}}function Cm(e,t=e){return I.assert(t>=e||t===-1),{pos:e,end:t}}function bN(e,t){return Cm(e.pos,t)}function Ed(e,t){return Cm(t,e.end)}function hS(e){let t=U_(e)?lg(e.modifiers,M_):void 0;return t&&!Da(t.end)?Ed(e,t.end):e}function vN(e){if(Ia(e)||f_(e))return Ed(e,e.name.pos);let t=U_(e)?Pi(e.modifiers):void 0;return t&&!Da(t.end)?Ed(e,t.end):hS(e)}function TN(e){return e.pos===e.end}function SN(e,t){return Cm(e,e+en(t).length)}function xN(e,t){return yS(e,e,t)}function wN(e,t,n){return D_(p_(e,n,!1),p_(t,n,!1),n)}function EN(e,t,n){return D_(e.end,t.end,n)}function yS(e,t,n){return D_(p_(e,n,!1),t.end,n)}function CN(e,t,n){return D_(e.end,p_(t,n,!1),n)}function AN(e,t,n,a){let _=p_(t,n,a);return T_(n,e.end,_)}function kN(e,t,n){return T_(n,e.end,t.end)}function DN(e,t){return!D_(e.pos,e.end,t)}function D_(e,t,n){return T_(n,e,t)===0}function p_(e,t,n){return Da(e.pos)?-1:Mt(t.text,e.pos,!1,n)}function PN(e,t,n,a){let _=Mt(n.text,e,!1,a),p=NN(_,t,n);return T_(n,p??t,_)}function IN(e,t,n,a){let _=Mt(n.text,e,!1,a);return T_(n,e,Math.min(t,_))}function NN(e,t=0,n){for(;e-- >t;)if(!ka(n.text.charCodeAt(e)))return e}function ON(e){let t=Ul(e);if(t)switch(t.parent.kind){case 266:case 267:return t===t.parent.name}return!1}function MN(e){return rr(e.declarations,gS)}function gS(e){return Li(e)&&e.initializer!==void 0}function LN(e){return e.watch&&Wn(e,"watch")}function JN(e){e.close()}function bS(e){return e.flags&33554432?e.links.checkFlags:0}function RN(e,t=!1){if(e.valueDeclaration){let n=t&&e.declarations&&ir(e.declarations,Zo)||e.flags&32768&&ir(e.declarations,d_)||e.valueDeclaration,a=Kd(n);return e.parent&&e.parent.flags&32?a:a&-8}if(bS(e)&6){let n=e.links.checkFlags,a=n&1024?2:n&256?1:4,_=n&2048?256:0;return a|_}return e.flags&4194304?257:0}function jN(e,t){return e.flags&2097152?t.getAliasedSymbol(e):e}function FN(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags}function BN(e){return No(e)===1}function UN(e){return No(e)!==0}function No(e){let{parent:t}=e;switch(t==null?void 0:t.kind){case 217:return No(t);case 225:case 224:let{operator:n}=t;return n===46||n===47?2:0;case 226:let{left:a,operatorToken:_}=t;return a===e&&A_(_.kind)?_.kind===64?1:2:0;case 211:return t.name!==e?0:No(t);case 303:{let p=No(t.parent);return e===t.name?qN(p):p}case 304:return e===t.objectAssignmentInitializer?0:No(t.parent);case 209:return No(t);default:return 0}}function qN(e){switch(e){case 0:return 1;case 1:return 0;case 2:return 2;default:return I.assertNever(e)}}function vS(e,t){if(!e||!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(typeof e[n]=="object"){if(!vS(e[n],t[n]))return!1}else if(typeof e[n]!="function"&&e[n]!==t[n])return!1;return!0}function zN(e,t){e.forEach(t),e.clear()}function TS(e,t,n){let{onDeleteValue:a,onExistingValue:_}=n;e.forEach((p,m)=>{let y=t.get(m);y===void 0?(e.delete(m),a(p,m)):_&&_(p,y,m)})}function WN(e,t,n){TS(e,t,n);let{createNewValue:a}=n;t.forEach((_,p)=>{e.has(p)||e.set(p,a(p,_))})}function VN(e){if(e.flags&32){let t=SS(e);return!!t&&Cn(t,64)}return!1}function SS(e){var t;return(t=e.declarations)==null?void 0:t.find(ar)}function Ff(e){return e.flags&3899393?e.objectFlags:0}function HN(e,t){return!!Xv(e,n=>t(n)?!0:void 0)}function GN(e){return!!e&&!!e.declarations&&!!e.declarations[0]&&Ib(e.declarations[0])}function XN({moduleSpecifier:e}){return Tr(e)?e.text:lm(e)}function xS(e){let t;return Wt(e,n=>{Cl(n)&&(t=n)},n=>{for(let a=n.length-1;a>=0;a--)if(Cl(n[a])){t=n[a];break}}),t}function $N(e,t,n=!0){return e.has(t)?!1:(e.set(t,n),!0)}function QN(e){return ar(e)||su(e)||Im(e)}function wS(e){return e>=182&&e<=205||e===133||e===159||e===150||e===163||e===151||e===136||e===154||e===155||e===116||e===157||e===146||e===141||e===233||e===319||e===320||e===321||e===322||e===323||e===324||e===325}function Ko(e){return e.kind===211||e.kind===212}function YN(e){return e.kind===211?e.name:(I.assert(e.kind===212),e.argumentExpression)}function KN(e){switch(e.kind){case"text":case"internal":return!0;default:return!1}}function ZN(e){return e.kind===275||e.kind===279}function W2(e){for(;Ko(e);)e=e.expression;return e}function eO(e,t){if(Ko(e.parent)&&lS(e))return n(e.parent);function n(a){if(a.kind===211){let _=t(a.name);if(_!==void 0)return _}else if(a.kind===212)if(Ae(a.argumentExpression)||ni(a.argumentExpression)){let _=t(a.argumentExpression);if(_!==void 0)return _}else return;if(Ko(a.expression))return n(a.expression);if(Ae(a.expression))return t(a.expression)}}function tO(e,t){for(;;){switch(e.kind){case 225:e=e.operand;continue;case 226:e=e.left;continue;case 227:e=e.condition;continue;case 215:e=e.tag;continue;case 213:if(t)return e;case 234:case 212:case 211:case 235:case 360:case 238:e=e.expression;continue}return e}}function nO(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.isAssigned=void 0,this.links=void 0}function rO(e,t){this.flags=t,(I.isDebugging||ba)&&(this.checker=e)}function iO(e,t){this.flags=t,I.isDebugging&&(this.checker=e)}function Yh(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,this.emitNode=void 0}function aO(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.emitNode=void 0}function oO(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.emitNode=void 0}function sO(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n||(a=>a)}function _O(e){sb.push(e),e(Ct)}function ES(e){Object.assign(Ct,e),wn(sb,t=>t(Ct))}function P_(e,t){return e.replace(/{(\d+)}/g,(n,a)=>""+I.checkDefined(t[+a]))}function CS(e){Pl=e}function AS(e){!Pl&&e&&(Pl=e())}function I_(e){return Pl&&Pl[e.key]||e.message}function Po(e,t,n,a,_,...p){n+a>t.length&&(a=t.length-n),r2(t,n,a);let m=I_(_);return Ze(p)&&(m=P_(m,p)),{file:void 0,start:n,length:a,messageText:m,category:_.category,code:_.code,reportsUnnecessary:_.reportsUnnecessary,fileName:e}}function cO(e){return e.file===void 0&&e.start!==void 0&&e.length!==void 0&&typeof e.fileName=="string"}function kS(e,t){let n=t.fileName||"",a=t.text.length;I.assertEqual(e.fileName,n),I.assertLessThanOrEqual(e.start,a),I.assertLessThanOrEqual(e.start+e.length,a);let _={file:t,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){_.relatedInformation=[];for(let p of e.relatedInformation)cO(p)&&p.fileName===n?(I.assertLessThanOrEqual(p.start,a),I.assertLessThanOrEqual(p.start+p.length,a),_.relatedInformation.push(kS(p,t))):_.relatedInformation.push(p)}return _}function Ya(e,t){let n=[];for(let a of e)n.push(kS(a,t));return n}function V2(e,t,n,a,..._){r2(e.text,t,n);let p=I_(a);return Ze(_)&&(p=P_(p,_)),{file:e,start:t,length:n,messageText:p,category:a.category,code:a.code,reportsUnnecessary:a.reportsUnnecessary,reportsDeprecated:a.reportsDeprecated}}function lO(e,...t){let n=I_(e);return Ze(t)&&(n=P_(n,t)),n}function hl(e,...t){let n=I_(e);return Ze(t)&&(n=P_(n,t)),{file:void 0,start:void 0,length:void 0,messageText:n,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated}}function uO(e,t){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText,relatedInformation:t}}function il(e,t,...n){let a=I_(t);return Ze(n)&&(a=P_(a,n)),{messageText:a,category:t.category,code:t.code,next:e===void 0||Array.isArray(e)?e:[e]}}function pO(e,t){let n=e;for(;n.next;)n=n.next[0];n.next=[t]}function L6(e){return e.file?e.file.path:void 0}function H2(e,t){return Cd(e,t)||fO(e,t)||0}function Cd(e,t){return Ii(L6(e),L6(t))||Mn(e.start,t.start)||Mn(e.length,t.length)||Mn(e.code,t.code)||DS(e.messageText,t.messageText)||0}function fO(e,t){return!e.relatedInformation&&!t.relatedInformation?0:e.relatedInformation&&t.relatedInformation?Mn(e.relatedInformation.length,t.relatedInformation.length)||wn(e.relatedInformation,(n,a)=>{let _=t.relatedInformation[a];return H2(n,_)})||0:e.relatedInformation?-1:1}function DS(e,t){if(typeof e=="string"&&typeof t=="string")return Ii(e,t);if(typeof e=="string")return-1;if(typeof t=="string")return 1;let n=Ii(e.messageText,t.messageText);if(n)return n;if(!e.next&&!t.next)return 0;if(!e.next)return-1;if(!t.next)return 1;let a=Math.min(e.next.length,t.next.length);for(let _=0;_t.next.length?1:0}function q0(e){return e===4||e===2||e===1||e===6?1:0}function PS(e){if(e.transformFlags&2)return bT(e)||yl(e)?e:Wt(e,PS)}function dO(e){return e.isDeclarationFile?void 0:PS(e)}function mO(e){return(e.impliedNodeFormat===99||ii(e.fileName,[".cjs",".cts",".mjs",".mts"]))&&!e.isDeclarationFile?!0:void 0}function IS(e){switch(NS(e)){case 3:return _=>{_.externalModuleIndicator=gl(_)||!_.isDeclarationFile||void 0};case 1:return _=>{_.externalModuleIndicator=gl(_)};case 2:let t=[gl];(e.jsx===4||e.jsx===5)&&t.push(dO),t.push(mO);let n=yg(...t);return _=>void(_.externalModuleIndicator=n(_))}}function Ql(e){return e.target??(e.module===100&&9||e.module===199&&99||1)}function _i(e){return typeof e.module=="number"?e.module:Ql(e)>=2?5:1}function hO(e){return e>=5&&e<=99}function N_(e){let t=e.moduleResolution;if(t===void 0)switch(_i(e)){case 1:t=2;break;case 100:t=3;break;case 199:t=99;break;default:t=1;break}return t}function NS(e){return e.moduleDetection||(_i(e)===100||_i(e)===199?3:2)}function yO(e){switch(_i(e)){case 1:case 2:case 5:case 6:case 7:case 99:case 100:case 199:return!0;default:return!1}}function G2(e){return!!(e.isolatedModules||e.verbatimModuleSyntax)}function gO(e){return e.verbatimModuleSyntax||e.isolatedModules&&e.preserveValueImports}function bO(e){return e.allowUnreachableCode===!1}function vO(e){return e.allowUnusedLabels===!1}function TO(e){return!!(Q2(e)&&e.declarationMap)}function X2(e){if(e.esModuleInterop!==void 0)return e.esModuleInterop;switch(_i(e)){case 100:case 199:return!0}}function SO(e){return e.allowSyntheticDefaultImports!==void 0?e.allowSyntheticDefaultImports:X2(e)||_i(e)===4||N_(e)===100}function $2(e){return e>=3&&e<=99||e===100}function xO(e){return!!e.noDtsResolution||N_(e)!==100}function wO(e){let t=N_(e);if(!$2(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}function EO(e){let t=N_(e);if(!$2(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}function OS(e){return e.resolveJsonModule!==void 0?e.resolveJsonModule:N_(e)===100}function Q2(e){return!!(e.declaration||e.composite)}function CO(e){return!!(e.preserveConstEnums||G2(e))}function AO(e){return!!(e.incremental||e.composite)}function Y2(e,t){return e[t]===void 0?!!e.strict:!!e[t]}function K2(e){return e.allowJs===void 0?!!e.checkJs:e.allowJs}function kO(e){return e.useDefineForClassFields===void 0?Ql(e)>=9:e.useDefineForClassFields}function DO(e){return e.useDefineForClassFields!==!1&&Ql(e)>=9}function PO(e,t){return w_(t,e,semanticDiagnosticsOptionDeclarations)}function IO(e,t){return w_(t,e,affectsEmitOptionDeclarations)}function NO(e,t){return w_(t,e,affectsDeclarationPathOptionDeclarations)}function z0(e,t){return t.strictFlag?Y2(e,t.name):t.allowJsFlag?K2(e):e[t.name]}function OO(e){let t=e.jsx;return t===2||t===4||t===5}function MO(e,t){let n=t==null?void 0:t.pragmas.get("jsximportsource"),a=$t(n)?n[n.length-1]:n;return e.jsx===4||e.jsx===5||e.jsxImportSource||a?(a==null?void 0:a.arguments.factory)||e.jsxImportSource||"react":void 0}function LO(e,t){return e?`${e}/${t.jsx===5?"jsx-dev-runtime":"jsx-runtime"}`:void 0}function JO(e){let t=!1;for(let n=0;n_,getSymlinkedDirectories:()=>n,getSymlinkedDirectoriesByRealpath:()=>a,setSymlinkedFile:(y,u)=>(_||(_=new Map)).set(y,u),setSymlinkedDirectory:(y,u)=>{let x=Di(y,e,t);QS(x)||(x=to(x),u!==!1&&!(n!=null&&n.has(x))&&(a||(a=qd())).add(u.realPath,y),(n||(n=new Map)).set(x,u))},setSymlinksFromResolutions(y,u,x){I.assert(!p),p=!0,y(d=>m(this,d.resolvedModule)),u(d=>m(this,d.resolvedTypeReferenceDirective)),x.forEach(d=>m(this,d.resolvedTypeReferenceDirective))},hasProcessedResolutions:()=>p};function m(y,u){if(!u||!u.originalPath||!u.resolvedFileName)return;let{resolvedFileName:x,originalPath:d}=u;y.setSymlinkedFile(Di(d,e,t),x);let[S,T]=jO(x,d,e,t)||Je;S&&T&&y.setSymlinkedDirectory(T,{real:to(S),realPath:to(Di(S,e,t))})}}function jO(e,t,n,a){let _=Oi(Gi(e,n)),p=Oi(Gi(t,n)),m=!1;for(;_.length>=2&&p.length>=2&&!J6(_[_.length-2],a)&&!J6(p[p.length-2],a)&&a(_[_.length-1])===a(p[p.length-1]);)_.pop(),p.pop(),m=!0;return m?[Wo(_),Wo(p)]:void 0}function J6(e,t){return e!==void 0&&(t(e)==="node_modules"||Hn(e,"@"))}function FO(e){return vg(e.charCodeAt(0))?e.slice(1):void 0}function BO(e,t,n){let a=Mv(e,t,n);return a===void 0?void 0:FO(a)}function UO(e){return e.replace(Dd,qO)}function qO(e){return"\\"+e}function Bf(e,t,n){let a=Z2(e,t,n);return!a||!a.length?void 0:`^(${a.map(m=>`(${m})`).join("|")})${n==="exclude"?"($|/)":"$"}`}function Z2(e,t,n){if(!(e===void 0||e.length===0))return zo(e,a=>a&&LS(a,t,n,_b[n]))}function MS(e){return!/[.*?]/.test(e)}function zO(e,t,n){let a=e&&LS(e,t,n,_b[n]);return a&&`^(${a})${n==="exclude"?"($|/)":"$"}`}function LS(e,t,n,{singleAsteriskRegexFragment:a,doubleAsteriskRegexFragment:_,replaceWildcardCharacter:p}){let m="",y=!1,u=Gd(e,t),x=Ea(u);if(n!=="exclude"&&x==="**")return;u[0]=v_(u[0]),MS(x)&&u.push("**","*");let d=0;for(let S of u){if(S==="**")m+=_;else if(n==="directories"&&(m+="(",d++),y&&(m+=vr),n!=="exclude"){let T="";S.charCodeAt(0)===42?(T+="([^./]"+a+")?",S=S.substr(1)):S.charCodeAt(0)===63&&(T+="[^./]",S=S.substr(1)),T+=S.replace(Dd,p),T!==S&&(m+=qf),m+=T}else m+=S.replace(Dd,p);y=!0}for(;d>0;)m+=")?",d--;return m}function Kh(e,t){return e==="*"?t:e==="?"?"[^/]":"\\"+e}function JS(e,t,n,a,_){e=br(e),_=br(_);let p=Qt(_,e);return{includeFilePatterns:xa(Z2(n,p,"files"),m=>`^${m}$`),includeFilePattern:Bf(n,p,"files"),includeDirectoryPattern:Bf(n,p,"directories"),excludePattern:Bf(t,p,"exclude"),basePaths:VO(e,n,a)}}function Uf(e,t){return new RegExp(e,t?"":"i")}function WO(e,t,n,a,_,p,m,y,u){e=br(e),p=br(p);let x=JS(e,n,a,_,p),d=x.includeFilePatterns&&x.includeFilePatterns.map(se=>Uf(se,_)),S=x.includeDirectoryPattern&&Uf(x.includeDirectoryPattern,_),T=x.excludePattern&&Uf(x.excludePattern,_),A=d?d.map(()=>[]):[[]],N=new Map,q=Wd(_);for(let se of x.basePaths)Q(se,Qt(p,se),m);return o_(A);function Q(se,fe,F){let W=q(u(fe));if(N.has(W))return;N.set(W,!0);let{files:Se,directories:Qe}=y(se);for(let Be of $f(Se,Ii)){let st=Qt(se,Be),_t=Qt(fe,Be);if(!(t&&!ii(st,t))&&!(T&&T.test(_t)))if(!d)A[0].push(st);else{let hn=ul(d,yn=>yn.test(_t));hn!==-1&&A[hn].push(st)}}if(!(F!==void 0&&(F--,F===0)))for(let Be of $f(Qe,Ii)){let st=Qt(se,Be),_t=Qt(fe,Be);(!S||S.test(_t))&&(!T||!T.test(_t))&&Q(st,_t,F)}}}function VO(e,t,n){let a=[e];if(t){let _=[];for(let p of t){let m=b_(p)?p:br(Qt(e,p));_.push(HO(m))}_.sort(dg(!n));for(let p of _)so(a,m=>!Hv(m,p,e,!n))&&a.push(p)}return a}function HO(e){let t=fv(e,Ex);return t<0?zv(e)?v_(Mi(e)):e:e.substring(0,e.lastIndexOf(vr,t))}function RS(e,t){return t||jS(e)||3}function jS(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}function FS(e,t){let n=e&&K2(e);if(!t||t.length===0)return n?Il:Bo;let a=n?Il:Bo,_=o_(a);return[...a,...wa(t,m=>m.scriptKind===7||n&&GO(m.scriptKind)&&!_.includes(m.extension)?[m.extension]:void 0)]}function BS(e,t){return!e||!OS(e)?t:t===Il?kx:t===Bo?Cx:[...t,[".json"]]}function GO(e){return e===1||e===2}function eb(e){return Ze(lb,t=>Na(e,t))}function tb(e){return Ze(cb,t=>Na(e,t))}function US({imports:e},t=yg(eb,tb)){return cg(e,({text:n})=>as(n)&&!ii(n,Dm)?t(n):void 0)||!1}function XO(e,t,n,a){if(e==="js"||t===99)return shouldAllowImportingTsExtension(n)&&_()!==2?3:2;if(e==="minimal")return 0;if(e==="index")return 1;if(!shouldAllowImportingTsExtension(n))return US(a)?2:0;return _();function _(){let p=!1,m=a.imports.length?a.imports.map(y=>y.text):h2(a)?$O(a).map(y=>y.arguments[0].text):Je;for(let y of m)if(as(y)){if(ii(y,Dm))continue;if(tb(y))return 3;eb(y)&&(p=!0)}return p?2:0}}function $O(e){let t=0,n;for(let a of e.statements){if(t>3)break;e3(a)?n=h_(n,a.declarationList.declarations.map(_=>_.initializer)):ou(a)&&Hl(a.expression,!0)?n=Et(n,a.expression):t++}return n||Je}function QO(e,t,n){if(!e)return!1;let a=FS(t,n);for(let _ of o_(BS(t,a)))if(Na(e,_))return!0;return!1}function R6(e){let t=e.match(/\//g);return t?t.length:0}function YO(e,t){return Mn(R6(e),R6(t))}function Dl(e){for(let t of Pm){let n=qS(e,t);if(n!==void 0)return n}return e}function qS(e,t){return Na(e,t)?zS(e,t):void 0}function zS(e,t){return e.substring(0,e.length-t.length)}function KO(e,t){return Wv(e,t,Pm,!1)}function WS(e){let t=e.indexOf("*");return t===-1?e:e.indexOf("*",t+1)!==-1?void 0:{prefix:e.substr(0,t),suffix:e.substr(t+1)}}function ZO(e){return wa(fg(e),t=>WS(t))}function Da(e){return!(e>=0)}function VS(e){return e===".ts"||e===".tsx"||e===".d.ts"||e===".cts"||e===".mts"||e===".d.mts"||e===".d.cts"||Hn(e,".d.")&&is(e,".ts")}function eM(e){return VS(e)||e===".json"}function al(e){let t=nb(e);return t!==void 0?t:I.fail(`File ${e} has unknown extension.`)}function tM(e){return nb(e)!==void 0}function nb(e){return ir(Pm,t=>Na(e,t))}function nM(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs}function rM(e,t){let n=[];for(let a of e){if(a===t)return t;g_(a)||n.push(a)}return Ov(n,a=>a,t)}function iM(e,t){let n=e.indexOf(t);return I.assert(n!==-1),e.slice(n)}function ol(e,...t){return t.length&&(e.relatedInformation||(e.relatedInformation=[]),I.assert(e.relatedInformation!==Je,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...t)),e}function aM(e,t){I.assert(e.length!==0);let n=t(e[0]),a=n;for(let _=1;_a&&(a=p)}return{min:n,max:a}}function oM(e){return{pos:$o(e),end:e.end}}function sM(e,t){let n=t.pos-1,a=Math.min(e.text.length,Mt(e.text,t.end)+1);return{pos:n,end:a}}function _M(e,t,n){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib||n.isSourceOfProjectReferenceRedirect(e.fileName)}function rb(e,t){return e===t||typeof e=="object"&&e!==null&&typeof t=="object"&&t!==null&&xv(e,t,rb)}function Am(e){let 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:let x=e.length-1,d=0;for(;e.charCodeAt(d)===48;)d++;return e.slice(d,x)||"0"}let n=2,a=e.length-1,_=(a-n)*t,p=new Uint16Array((_>>>4)+(_&15?1:0));for(let x=a-1,d=0;x>=n;x--,d+=t){let S=d>>>4,T=e.charCodeAt(x),N=(T<=57?T-48:10+T-(T<=70?65:97))<<(d&15);p[S]|=N;let q=N>>>16;q&&(p[S+1]|=q)}let m="",y=p.length-1,u=!0;for(;u;){let x=0;u=!1;for(let d=y;d>=0;d--){let S=x<<16|p[d],T=S/10|0;p[d]=T,x=S-T*10,T&&!u&&(y=d,u=!0)}m=x+m}return m}function ib({negative:e,base10Value:t}){return(e&&t!=="0"?"-":"")+t}function cM(e){if(GS(e,!1))return HS(e)}function HS(e){let t=e.startsWith("-"),n=Am(`${t?e.slice(1):e}n`);return{negative:t,base10Value:n}}function GS(e,t){if(e==="")return!1;let n=ss(99,!1),a=!0;n.setOnError(()=>a=!1),n.setText(e+"n");let _=n.scan(),p=_===41;p&&(_=n.scan());let m=n.getTokenFlags();return a&&_===10&&n.getTokenEnd()===e.length+1&&!(m&512)&&(!t||e===ib({negative:p,base10Value:Am(n.getTokenValue())}))}function lM(e){return!!(e.flags&33554432)||$T(e)||fM(e)||pM(e)||!(m2(e)||uM(e))}function uM(e){return Ae(e)&&_u(e.parent)&&e.parent.name===e}function pM(e){for(;e.kind===80||e.kind===211;)e=e.parent;if(e.kind!==167)return!1;if(Cn(e.parent,64))return!0;let t=e.parent.parent.kind;return t===264||t===187}function fM(e){if(e.kind!==80)return!1;let t=or(e.parent,n=>{switch(n.kind){case 298:return!0;case 211:case 233:return!1;default:return"quit"}});return(t==null?void 0:t.token)===119||(t==null?void 0:t.parent.kind)===264}function dM(e){return J_(e)&&Ae(e.typeName)}function mM(e,t=_o){if(e.length<2)return!0;let n=e[0];for(let a=1,_=e.length;a<_;a++){let p=e[a];if(!t(n,p))return!1}return!0}function Ad(e,t){return e.pos=t,e}function XS(e,t){return e.end=t,e}function Za(e,t,n){return XS(Ad(e,t),n)}function kd(e,t,n){return Za(e,t,t+n)}function hM(e,t){return e&&(e.flags=t),e}function Qi(e,t){return e&&t&&(e.parent=t),e}function a_(e,t){if(e)for(let n of e)Qi(n,t);return e}function $S(e,t){if(!e)return e;return ag(e,$g(e)?n:_),e;function n(p,m){if(t&&p.parent===m)return"skip";Qi(p,m)}function a(p){if(Hi(p))for(let m of p.jsDoc)n(m,p),ag(m,n)}function _(p,m){return n(p,m)||a(p)}}function yM(e){return!Lm(e)}function gM(e){return iu(e)&&so(e.elements,yM)}function bM(e){for(I.assertIsDefined(e.parent);;){let t=e.parent;if(cs(t)){e=t;continue}if(ou(t)||wb(t)||o8(t)&&(t.initializer===e||t.incrementor===e))return!0;if(j_(t)){if(e!==Ea(t.elements))return!0;e=t;continue}if(At(t)&&t.operatorToken.kind===28){if(e===t.left)return!0;e=t;continue}return!1}}function QS(e){return Ze(ignoredPaths,t=>e.includes(t))}function vM(e){if(!e.parent)return;switch(e.kind){case 168:let{parent:n}=e;return n.kind===195?void 0:n.typeParameters;case 169:return e.parent.parameters;case 204:return e.parent.templateSpans;case 239:return e.parent.templateSpans;case 170:{let{parent:a}=e;return j8(a)?a.modifiers:void 0}case 298:return e.parent.heritageClauses}let{parent:t}=e;if(Qg(e))return jb(e.parent)?void 0:e.parent.tags;switch(t.kind){case 187:case 264:return Wg(e)?t.members:void 0;case 192:case 193:return t.types;case 189:case 209:case 361:case 275:case 279:return t.elements;case 210:case 292:return t.properties;case 213:case 214:return S0(e)?t.typeArguments:t.expression===e?void 0:t.arguments;case 284:case 288:return gT(e)?t.children:void 0;case 286:case 285:return S0(e)?t.typeArguments:void 0;case 241:case 296:case 297:case 268:return t.statements;case 269:return t.clauses;case 263:case 231:return io(e)?t.members:void 0;case 266:return d8(e)?t.members:void 0;case 312:return t.statements}}function TM(e){if(!e.typeParameters){if(Ze(e.parameters,t=>!R2(t)))return!0;if(e.kind!==219){let t=y_(e.parameters);if(!(t&&$l(t)))return!0}}return!1}function SM(e){return e==="Infinity"||e==="-Infinity"||e==="NaN"}function YS(e){return e.kind===260&&e.parent.kind===299}function xM(e){let t=e.valueDeclaration&&bm(e.valueDeclaration);return!!t&&(Pa(t)||YS(t))}function KS(e){return e.kind===218||e.kind===219}function wM(e){return e.replace(/\$/gm,()=>"\\$")}function ZS(e){return(+e).toString()===e}function EM(e,t,n,a,_){let p=_&&e==="new";return!p&&Ig(e,t)?zr.createIdentifier(e):!a&&!p&&ZS(e)&&+e>=0?zr.createNumericLiteral(+e):zr.createStringLiteral(e,!!n)}function ex(e){return!!(e.flags&262144&&e.isThisType)}function CM(e){let t=0,n=0,a=0,_=0,p;(x=>{x[x.BeforeNodeModules=0]="BeforeNodeModules",x[x.NodeModules=1]="NodeModules",x[x.Scope=2]="Scope",x[x.PackageContent=3]="PackageContent"})(p||(p={}));let m=0,y=0,u=0;for(;y>=0;)switch(m=y,y=e.indexOf("/",m+1),u){case 0:e.indexOf(nodeModulesPathPart,m)===m&&(t=m,n=y,u=1);break;case 1:case 2:u===1&&e.charAt(m+1)==="@"?u=2:(a=y,u=3);break;case 3:e.indexOf(nodeModulesPathPart,m)===m?u=1:u=3;break}return _=m,u>1?{topLevelNodeModulesIndex:t,topLevelPackageNameIndex:n,packageRootIndex:a,fileNameIndex:_}:void 0}function AM(e){var t;return e.kind===348?(t=e.typeExpression)==null?void 0:t.type:e.type}function tx(e){switch(e.kind){case 168:case 263:case 264:case 265:case 266:case 353:case 345:case 347:return!0;case 273:return e.isTypeOnly;case 276:case 281:return e.parent.parent.isTypeOnly;default:return!1}}function kM(e){return Pb(e)||ls(e)||us(e)||es(e)||su(e)||tx(e)||Zi(e)&&!Zg(e)&&!pm(e)}function nx(e){if(!Rg(e))return!1;let{isBracketed:t,typeExpression:n}=e;return t||!!n&&n.type.kind===323}function DM(e,t){if(e.length===0)return!1;let n=e.charCodeAt(0);return n===35?e.length>1&&yr(e.charCodeAt(1),t):yr(n,t)}function rx(e){var t;return((t=getSnippetElement(e))==null?void 0:t.kind)===0}function ix(e){return Vt(e)&&(e.type&&e.type.kind===323||tm(e).some(({isBracketed:t,typeExpression:n})=>t||!!n&&n.type.kind===323))}function PM(e){switch(e.kind){case 172:case 171:return!!e.questionToken;case 169:return!!e.questionToken||ix(e);case 355:case 348:return nx(e);default:return!1}}function IM(e){let t=e.kind;return(t===211||t===212)&&Uo(e.expression)}function NM(e){return Vt(e)&&cs(e)&&Hi(e)&&!!Mg(e)}function OM(e){return I.checkDefined(ax(e))}function ax(e){let t=Mg(e);return t&&t.typeExpression&&t.typeExpression.type}function MM(e){return Ae(e)?e.escapedText:Yl(e)}function LM(e){return Ae(e)?Lt(e):Kl(e)}function JM(e){let t=e.kind;return t===80||t===295}function Yl(e){return`${e.namespace.escapedText}:${Lt(e.name)}`}function Kl(e){return`${Lt(e.namespace)}:${Lt(e.name)}`}function RM(e){return Ae(e)?Lt(e):Kl(e)}function jM(e){return!!(e.flags&8576)}function FM(e){return e.flags&8192?e.escapedName:e.flags&384?qr(""+e.value):I.fail()}function ox(e){return!!e&&(Ln(e)||Ki(e)||At(e))}function BM(e){return e===void 0?!1:!!getResolutionModeOverride(e.attributes)}var sx,km,_x,cx,e_,lx,W0,ab,ux,px,ob,fx,dx,V0,H0,G0,X0,mx,hx,yx,gx,bx,$0,vx,Tx,Sx,Oo,Wi,xx,wx,Ct,sb,Pl,Dd,Ex,Q0,qf,Zh,ey,ty,_b,Bo,cb,Cx,Ax,Y0,lb,Il,kx,ub,Dx,Dm,K0,Pm,Px,UM=It({"src/compiler/utilities.ts"(){"use strict";En(),sx=[],km="tslib",_x=160,cx=1e6,e_=ak(),lx=Yf(()=>new Map(Object.entries({Array:new Map(Object.entries({es2015:["find","findIndex","fill","copyWithin","entries","keys","values"],es2016:["includes"],es2019:["flat","flatMap"],es2022:["at"],es2023:["findLastIndex","findLast"]})),Iterator:new Map(Object.entries({es2015:Je})),AsyncIterator:new Map(Object.entries({es2015:Je})),Atomics:new Map(Object.entries({es2017:Je})),SharedArrayBuffer:new Map(Object.entries({es2017:Je})),AsyncIterable:new Map(Object.entries({es2018:Je})),AsyncIterableIterator:new Map(Object.entries({es2018:Je})),AsyncGenerator:new Map(Object.entries({es2018:Je})),AsyncGeneratorFunction:new Map(Object.entries({es2018:Je})),RegExp:new Map(Object.entries({es2015:["flags","sticky","unicode"],es2018:["dotAll"]})),Reflect:new Map(Object.entries({es2015:["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"]})),ArrayConstructor:new Map(Object.entries({es2015:["from","of"]})),ObjectConstructor:new Map(Object.entries({es2015:["assign","getOwnPropertySymbols","keys","is","setPrototypeOf"],es2017:["values","entries","getOwnPropertyDescriptors"],es2019:["fromEntries"],es2022:["hasOwn"]})),NumberConstructor:new Map(Object.entries({es2015:["isFinite","isInteger","isNaN","isSafeInteger","parseFloat","parseInt"]})),Math:new Map(Object.entries({es2015:["clz32","imul","sign","log10","log2","log1p","expm1","cosh","sinh","tanh","acosh","asinh","atanh","hypot","trunc","fround","cbrt"]})),Map:new Map(Object.entries({es2015:["entries","keys","values"]})),Set:new Map(Object.entries({es2015:["entries","keys","values"]})),PromiseConstructor:new Map(Object.entries({es2015:["all","race","reject","resolve"],es2020:["allSettled"],es2021:["any"]})),Symbol:new Map(Object.entries({es2015:["for","keyFor"],es2019:["description"]})),WeakMap:new Map(Object.entries({es2015:["entries","keys","values"]})),WeakSet:new Map(Object.entries({es2015:["entries","keys","values"]})),String:new Map(Object.entries({es2015:["codePointAt","includes","endsWith","normalize","repeat","startsWith","anchor","big","blink","bold","fixed","fontcolor","fontsize","italics","link","small","strike","sub","sup"],es2017:["padStart","padEnd"],es2019:["trimStart","trimEnd","trimLeft","trimRight"],es2020:["matchAll"],es2021:["replaceAll"],es2022:["at"]})),StringConstructor:new Map(Object.entries({es2015:["fromCodePoint","raw"]})),DateTimeFormat:new Map(Object.entries({es2017:["formatToParts"]})),Promise:new Map(Object.entries({es2015:Je,es2018:["finally"]})),RegExpMatchArray:new Map(Object.entries({es2018:["groups"]})),RegExpExecArray:new Map(Object.entries({es2018:["groups"]})),Intl:new Map(Object.entries({es2018:["PluralRules"]})),NumberFormat:new Map(Object.entries({es2018:["formatToParts"]})),SymbolConstructor:new Map(Object.entries({es2020:["matchAll"]})),DataView:new Map(Object.entries({es2020:["setBigInt64","setBigUint64","getBigInt64","getBigUint64"]})),BigInt:new Map(Object.entries({es2020:Je})),RelativeTimeFormat:new Map(Object.entries({es2020:["format","formatToParts","resolvedOptions"]})),Int8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint8ClampedArray:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Int16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Int32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Float32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Float64Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),BigInt64Array:new Map(Object.entries({es2020:Je,es2022:["at"],es2023:["findLastIndex","findLast"]})),BigUint64Array:new Map(Object.entries({es2020:Je,es2022:["at"],es2023:["findLastIndex","findLast"]})),Error:new Map(Object.entries({es2022:["cause"]}))}))),W0=(e=>(e[e.None=0]="None",e[e.NeverAsciiEscape=1]="NeverAsciiEscape",e[e.JsxAttributeEscape=2]="JsxAttributeEscape",e[e.TerminateUnterminatedLiterals=4]="TerminateUnterminatedLiterals",e[e.AllowNumericSeparator=8]="AllowNumericSeparator",e))(W0||{}),ab=/^(\/\/\/\s*/,ux=/^(\/\/\/\s*/,px=/^(\/\/\/\s*/,ob=/^(\/\/\/\s*/,fx=/^\/\/\/\s*/,dx=/^(\/\/\/\s*/,V0=(e=>(e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound",e))(V0||{}),H0=(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))(H0||{}),G0=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(G0||{}),X0=(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))(X0||{}),mx=/\$\{/g,hx=/[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,yx=/[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,gx=/\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g,bx=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","\x85":"\\u0085","\r\n":"\\r\\n"})),$0=/[^\u0000-\u007F]/g,vx=/["\u0000-\u001f\u2028\u2029\u0085]/g,Tx=/['\u0000-\u001f\u2028\u2029\u0085]/g,Sx=new Map(Object.entries({'"':""","'":"'"})),Oo=[""," "],Wi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",xx=`\r +`,wx=` +`,Ct={getNodeConstructor:()=>Yh,getTokenConstructor:()=>aO,getIdentifierConstructor:()=>oO,getPrivateIdentifierConstructor:()=>Yh,getSourceFileConstructor:()=>Yh,getSymbolConstructor:()=>nO,getTypeConstructor:()=>rO,getSignatureConstructor:()=>iO,getSourceMapSourceConstructor:()=>sO},sb=[],Dd=/[^\w\s/]/g,Ex=[42,63],Q0=["node_modules","bower_components","jspm_packages"],qf=`(?!(${Q0.join("|")})(/|$))`,Zh={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${qf}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Kh(e,Zh.singleAsteriskRegexFragment)},ey={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${qf}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Kh(e,ey.singleAsteriskRegexFragment)},ty={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:e=>Kh(e,ty.singleAsteriskRegexFragment)},_b={files:Zh,directories:ey,exclude:ty},Bo=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],cb=o_(Bo),Cx=[...Bo,[".json"]],Ax=[".d.ts",".d.cts",".d.mts",".cts",".mts",".ts",".tsx"],Y0=[[".js",".jsx"],[".mjs"],[".cjs"]],lb=o_(Y0),Il=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],kx=[...Il,[".json"]],ub=[".d.ts",".d.cts",".d.mts"],Dx=[".ts",".cts",".mts",".tsx"],Dm=[".mts",".d.mts",".mjs",".cts",".d.cts",".cjs"],K0=(e=>(e[e.Minimal=0]="Minimal",e[e.Index=1]="Index",e[e.JsExtension=2]="JsExtension",e[e.TsExtension=3]="TsExtension",e))(K0||{}),Pm=[".d.ts",".d.mts",".d.cts",".mjs",".mts",".cjs",".cts",".ts",".js",".tsx",".jsx",".json"],Px={files:Je,directories:Je}}});function Ix(){let e,t,n,a,_;return{createBaseSourceFileNode:p,createBaseIdentifierNode:m,createBasePrivateIdentifierNode:y,createBaseTokenNode:u,createBaseNode:x};function p(d){return new(_||(_=Ct.getSourceFileConstructor()))(d,-1,-1)}function m(d){return new(n||(n=Ct.getIdentifierConstructor()))(d,-1,-1)}function y(d){return new(a||(a=Ct.getPrivateIdentifierConstructor()))(d,-1,-1)}function u(d){return new(t||(t=Ct.getTokenConstructor()))(d,-1,-1)}function x(d){return new(e||(e=Ct.getNodeConstructor()))(d,-1,-1)}}var qM=It({"src/compiler/factory/baseNodeFactory.ts"(){"use strict";En()}}),pb,zM=It({"src/compiler/factory/parenthesizerRules.ts"(){"use strict";En(),pb={getParenthesizeLeftSideOfBinaryForOperator:e=>bt,getParenthesizeRightSideOfBinaryForOperator:e=>bt,parenthesizeLeftSideOfBinary:(e,t)=>t,parenthesizeRightSideOfBinary:(e,t,n)=>n,parenthesizeExpressionOfComputedPropertyName:bt,parenthesizeConditionOfConditionalExpression:bt,parenthesizeBranchOfConditionalExpression:bt,parenthesizeExpressionOfExportDefault:bt,parenthesizeExpressionOfNew:e=>wi(e,jo),parenthesizeLeftSideOfAccess:e=>wi(e,jo),parenthesizeOperandOfPostfixUnary:e=>wi(e,jo),parenthesizeOperandOfPrefixUnary:e=>wi(e,pT),parenthesizeExpressionsOfCommaDelimitedList:e=>wi(e,ha),parenthesizeExpressionForDisallowedComma:bt,parenthesizeExpressionOfExpressionStatement:bt,parenthesizeConciseBodyOfArrowFunction:bt,parenthesizeCheckTypeOfConditionalType:bt,parenthesizeExtendsTypeOfConditionalType:bt,parenthesizeConstituentTypesOfUnionType:e=>wi(e,ha),parenthesizeConstituentTypeOfUnionType:bt,parenthesizeConstituentTypesOfIntersectionType:e=>wi(e,ha),parenthesizeConstituentTypeOfIntersectionType:bt,parenthesizeOperandOfTypeOperator:bt,parenthesizeOperandOfReadonlyTypeOperator:bt,parenthesizeNonArrayTypeOfPostfixType:bt,parenthesizeElementTypesOfTupleType:e=>wi(e,ha),parenthesizeElementTypeOfTupleType:bt,parenthesizeTypeOfOptionalType:bt,parenthesizeTypeArguments:e=>e&&wi(e,ha),parenthesizeLeadingTypeArgument:bt}}}),WM=()=>{},Nx=()=>new Proxy({},{get:()=>()=>{}});function VM(e){fb.push(e)}function Pd(e,t){let n=e&8?HM:GM,a=Yf(()=>e&1?pb:createParenthesizerRules(se)),_=Yf(()=>e&2?nullNodeConverters:Nx(se)),p=Fr(r=>(o,s)=>sc(o,r,s)),m=Fr(r=>o=>ac(r,o)),y=Fr(r=>o=>oc(o,r)),u=Fr(r=>()=>q1(r)),x=Fr(r=>o=>Mc(r,o)),d=Fr(r=>(o,s)=>W1(r,o,s)),S=Fr(r=>(o,s)=>kp(r,o,s)),T=Fr(r=>(o,s)=>z1(r,o,s)),A=Fr(r=>(o,s)=>Bp(r,o,s)),N=Fr(r=>(o,s,l)=>ah(r,o,s,l)),q=Fr(r=>(o,s,l)=>Up(r,o,s,l)),Q=Fr(r=>(o,s,l,g)=>oh(r,o,s,l,g)),se={get parenthesizer(){return a()},get converters(){return _()},baseFactory:t,flags:e,createNodeArray:fe,createNumericLiteral:Qe,createBigIntLiteral:Be,createStringLiteral:_t,createStringLiteralFromNode:hn,createRegularExpressionLiteral:yn,createLiteralLikeNode:fi,createIdentifier:He,createTempVariable:Qn,createLoopVariable:Gr,createUniqueName:vt,getGeneratedNameForNode:Jn,createPrivateIdentifier:Ht,createUniquePrivateName:at,getGeneratedPrivateNameForNode:kr,createToken:xt,createSuper:ut,createThis:Gt,createNull:cn,createTrue:ht,createFalse:Dr,createModifier:Tt,createModifiersFromModifierFlags:Rn,createQualifiedName:yt,updateQualifiedName:jn,createComputedPropertyName:ct,updateComputedPropertyName:Kt,createTypeParameterDeclaration:Zt,updateTypeParameterDeclaration:lr,createParameterDeclaration:di,updateParameterDeclaration:Xr,createDecorator:Yn,updateDecorator:Kn,createPropertySignature:Ji,updatePropertySignature:Pr,createPropertyDeclaration:U,updatePropertyDeclaration:ie,createMethodSignature:ye,updateMethodSignature:Te,createMethodDeclaration:tt,updateMethodDeclaration:$e,createConstructorDeclaration:z,updateConstructorDeclaration:K,createGetAccessorDeclaration:Ee,updateGetAccessorDeclaration:je,createSetAccessorDeclaration:nt,updateSetAccessorDeclaration:kt,createCallSignature:Zn,updateCallSignature:kn,createConstructSignature:er,updateConstructSignature:Ri,createIndexSignature:aa,updateIndexSignature:$r,createClassStaticBlockDeclaration:St,updateClassStaticBlockDeclaration:Jt,createTemplateLiteralTypeSpan:Dn,updateTemplateLiteralTypeSpan:Ne,createKeywordTypeNode:oa,createTypePredicateNode:jt,updateTypePredicateNode:Fn,createTypeReferenceNode:R,updateTypeReferenceNode:v,createFunctionTypeNode:w,updateFunctionTypeNode:f,createConstructorTypeNode:$,updateConstructorTypeNode:be,createTypeQueryNode:xe,updateTypeQueryNode:Ye,createTypeLiteralNode:Ge,updateTypeLiteralNode:Xe,createArrayTypeNode:Nt,updateArrayTypeNode:Xt,createTupleTypeNode:ln,updateTupleTypeNode:ve,createNamedTupleMember:ft,updateNamedTupleMember:Ir,createOptionalTypeNode:Dt,updateOptionalTypeNode:G,createRestTypeNode:La,updateRestTypeNode:Pe,createUnionTypeNode:ur,updateUnionTypeNode:Ja,createIntersectionTypeNode:Nr,updateIntersectionTypeNode:Re,createConditionalTypeNode:dt,updateConditionalTypeNode:mi,createInferTypeNode:Qr,updateInferTypeNode:r1,createImportTypeNode:hi,updateImportTypeNode:Ts,createParenthesizedType:Pn,updateParenthesizedType:zt,createThisTypeNode:M,createTypeOperatorNode:Bn,updateTypeOperatorNode:sa,createIndexedAccessTypeNode:yi,updateIndexedAccessTypeNode:X_,createMappedTypeNode:Ft,updateMappedTypeNode:vn,createLiteralTypeNode:Ra,updateLiteralTypeNode:_a,createTemplateLiteralType:bn,updateTemplateLiteralType:i1,createObjectBindingPattern:yu,updateObjectBindingPattern:a1,createArrayBindingPattern:ca,updateArrayBindingPattern:o1,createBindingElement:Ss,updateBindingElement:ja,createArrayLiteralExpression:$_,updateArrayLiteralExpression:gu,createObjectLiteralExpression:fo,updateObjectLiteralExpression:s1,createPropertyAccessExpression:e&4?(r,o)=>setEmitFlags(gi(r,o),262144):gi,updatePropertyAccessExpression:vu,createPropertyAccessChain:e&4?(r,o,s)=>setEmitFlags(Fa(r,o,s),262144):Fa,updatePropertyAccessChain:Tu,createElementAccessExpression:Q_,updateElementAccessExpression:_1,createElementAccessChain:Y_,updateElementAccessChain:Su,createCallExpression:ji,updateCallExpression:c1,createCallChain:K_,updateCallChain:pr,createNewExpression:ws,updateNewExpression:Z_,createTaggedTemplateExpression:ec,updateTaggedTemplateExpression:l1,createTypeAssertion:wu,updateTypeAssertion:Eu,createParenthesizedExpression:tc,updateParenthesizedExpression:Cu,createFunctionExpression:nc,updateFunctionExpression:Au,createArrowFunction:rc,updateArrowFunction:ku,createDeleteExpression:ic,updateDeleteExpression:u1,createTypeOfExpression:Tn,updateTypeOfExpression:p1,createVoidExpression:Or,updateVoidExpression:f1,createAwaitExpression:Fi,updateAwaitExpression:Ba,createPrefixUnaryExpression:ac,updatePrefixUnaryExpression:Es,createPostfixUnaryExpression:oc,updatePostfixUnaryExpression:Du,createBinaryExpression:sc,updateBinaryExpression:d1,createConditionalExpression:_c,updateConditionalExpression:m1,createTemplateExpression:Yr,updateTemplateExpression:Iu,createTemplateHead:As,createTemplateMiddle:lc,createTemplateTail:h1,createNoSubstitutionTemplateLiteral:Ou,createTemplateLiteralLikeNode:Ua,createYieldExpression:Mu,updateYieldExpression:y1,createSpreadElement:Lu,updateSpreadElement:g1,createClassExpression:Ju,updateClassExpression:ho,createOmittedExpression:b1,createExpressionWithTypeArguments:Ru,updateExpressionWithTypeArguments:fr,createAsExpression:ks,updateAsExpression:ju,createNonNullExpression:Fu,updateNonNullExpression:uc,createSatisfiesExpression:Bu,updateSatisfiesExpression:pc,createNonNullChain:Mr,updateNonNullChain:Uu,createMetaProperty:Ds,updateMetaProperty:bi,createTemplateSpan:yo,updateTemplateSpan:qu,createSemicolonClassElement:zu,createBlock:qa,updateBlock:Wu,createVariableStatement:Vu,updateVariableStatement:Hu,createEmptyStatement:fc,createExpressionStatement:go,updateExpressionStatement:v1,createIfStatement:dc,updateIfStatement:T1,createDoStatement:mc,updateDoStatement:S1,createWhileStatement:Gu,updateWhileStatement:x1,createForStatement:hc,updateForStatement:Xu,createForInStatement:$u,updateForInStatement:w1,createForOfStatement:Qu,updateForOfStatement:E1,createContinueStatement:Yu,updateContinueStatement:Ku,createBreakStatement:yc,updateBreakStatement:Zu,createReturnStatement:ep,updateReturnStatement:tp,createWithStatement:gc,updateWithStatement:np,createSwitchStatement:la,updateSwitchStatement:C1,createLabeledStatement:rp,updateLabeledStatement:ip,createThrowStatement:ap,updateThrowStatement:A1,createTryStatement:op,updateTryStatement:sp,createDebuggerStatement:_p,createVariableDeclaration:Ps,updateVariableDeclaration:k1,createVariableDeclarationList:bc,updateVariableDeclarationList:D1,createFunctionDeclaration:vc,updateFunctionDeclaration:cp,createClassDeclaration:Tc,updateClassDeclaration:Sc,createInterfaceDeclaration:lp,updateInterfaceDeclaration:gt,createTypeAliasDeclaration:Bi,updateTypeAliasDeclaration:xc,createEnumDeclaration:Ui,updateEnumDeclaration:up,createModuleDeclaration:Bt,updateModuleDeclaration:qi,createModuleBlock:on,updateModuleBlock:I1,createCaseBlock:pp,updateCaseBlock:N1,createNamespaceExportDeclaration:wc,updateNamespaceExportDeclaration:O1,createImportEqualsDeclaration:fp,updateImportEqualsDeclaration:dp,createImportDeclaration:mp,updateImportDeclaration:hp,createImportClause:Ec,updateImportClause:yp,createAssertClause:gp,updateAssertClause:Is,createAssertEntry:Cc,updateAssertEntry:bp,createImportTypeAssertionContainer:Ac,updateImportTypeAssertionContainer:L1,createImportAttributes:Ns,updateImportAttributes:J1,createImportAttribute:kc,updateImportAttribute:R1,createNamespaceImport:vp,updateNamespaceImport:j1,createNamespaceExport:Tp,updateNamespaceExport:F1,createNamedImports:Dc,updateNamedImports:ua,createImportSpecifier:Sp,updateImportSpecifier:xp,createExportAssignment:za,updateExportAssignment:Pc,createExportDeclaration:Ic,updateExportDeclaration:Wa,createNamedExports:Nc,updateNamedExports:wp,createExportSpecifier:Oc,updateExportSpecifier:U1,createMissingDeclaration:Ep,createExternalModuleReference:Cp,updateExternalModuleReference:Ap,get createJSDocAllType(){return u(319)},get createJSDocUnknownType(){return u(320)},get createJSDocNonNullableType(){return S(322)},get updateJSDocNonNullableType(){return T(322)},get createJSDocNullableType(){return S(321)},get updateJSDocNullableType(){return T(321)},get createJSDocOptionalType(){return x(323)},get updateJSDocOptionalType(){return d(323)},get createJSDocVariadicType(){return x(325)},get updateJSDocVariadicType(){return d(325)},get createJSDocNamepathType(){return x(326)},get updateJSDocNamepathType(){return d(326)},createJSDocFunctionType:Dp,updateJSDocFunctionType:V1,createJSDocTypeLiteral:Pp,updateJSDocTypeLiteral:H1,createJSDocTypeExpression:Os,updateJSDocTypeExpression:G1,createJSDocSignature:Ip,updateJSDocSignature:Ms,createJSDocTemplateTag:Lc,updateJSDocTemplateTag:Jc,createJSDocTypedefTag:Np,updateJSDocTypedefTag:Op,createJSDocParameterTag:Mp,updateJSDocParameterTag:X1,createJSDocPropertyTag:Rc,updateJSDocPropertyTag:$1,createJSDocCallbackTag:jc,updateJSDocCallbackTag:Q1,createJSDocOverloadTag:Ls,updateJSDocOverloadTag:Lp,createJSDocAugmentsTag:Ha,updateJSDocAugmentsTag:Y1,createJSDocImplementsTag:pa,updateJSDocImplementsTag:ih,createJSDocSeeTag:bo,updateJSDocSeeTag:K1,createJSDocNameReference:Jp,updateJSDocNameReference:Z1,createJSDocMemberName:Rp,updateJSDocMemberName:eh,createJSDocLink:Fc,updateJSDocLink:th,createJSDocLinkCode:jp,updateJSDocLinkCode:nh,createJSDocLinkPlain:Fp,updateJSDocLinkPlain:rh,get createJSDocTypeTag(){return q(351)},get updateJSDocTypeTag(){return Q(351)},get createJSDocReturnTag(){return q(349)},get updateJSDocReturnTag(){return Q(349)},get createJSDocThisTag(){return q(350)},get updateJSDocThisTag(){return Q(350)},get createJSDocAuthorTag(){return A(337)},get updateJSDocAuthorTag(){return N(337)},get createJSDocClassTag(){return A(339)},get updateJSDocClassTag(){return N(339)},get createJSDocPublicTag(){return A(340)},get updateJSDocPublicTag(){return N(340)},get createJSDocPrivateTag(){return A(341)},get updateJSDocPrivateTag(){return N(341)},get createJSDocProtectedTag(){return A(342)},get updateJSDocProtectedTag(){return N(342)},get createJSDocReadonlyTag(){return A(343)},get updateJSDocReadonlyTag(){return N(343)},get createJSDocOverrideTag(){return A(344)},get updateJSDocOverrideTag(){return N(344)},get createJSDocDeprecatedTag(){return A(338)},get updateJSDocDeprecatedTag(){return N(338)},get createJSDocThrowsTag(){return q(356)},get updateJSDocThrowsTag(){return Q(356)},get createJSDocSatisfiesTag(){return q(357)},get updateJSDocSatisfiesTag(){return Q(357)},createJSDocEnumTag:Js,updateJSDocEnumTag:_h,createJSDocUnknownTag:qp,updateJSDocUnknownTag:sh,createJSDocText:Bc,updateJSDocText:zp,createJSDocComment:Wp,updateJSDocComment:Rs,createJsxElement:Uc,updateJsxElement:ch,createJsxSelfClosingElement:Vp,updateJsxSelfClosingElement:lh,createJsxOpeningElement:js,updateJsxOpeningElement:Hp,createJsxClosingElement:qc,updateJsxClosingElement:zc,createJsxFragment:Sn,createJsxText:vo,updateJsxText:uh,createJsxOpeningFragment:Xp,createJsxJsxClosingFragment:ph,updateJsxFragment:Gp,createJsxAttribute:$p,updateJsxAttribute:Fs,createJsxAttributes:Qp,updateJsxAttributes:fh,createJsxSpreadAttribute:Yp,updateJsxSpreadAttribute:dh,createJsxExpression:Bs,updateJsxExpression:To,createJsxNamespacedName:Kp,updateJsxNamespacedName:Wc,createCaseClause:Vc,updateCaseClause:mh,createDefaultClause:Ga,updateDefaultClause:Zp,createHeritageClause:ef,updateHeritageClause:hh,createCatchClause:Hc,updateCatchClause:tf,createPropertyAssignment:Us,updatePropertyAssignment:fa,createShorthandPropertyAssignment:nf,updateShorthandPropertyAssignment:gh,createSpreadAssignment:Gc,updateSpreadAssignment:rf,createEnumMember:Lr,updateEnumMember:af,createSourceFile:vh,updateSourceFile:xh,createRedirectedSourceFile:of,createBundle:Xc,updateBundle:wh,createUnparsedSource:Eh,createUnparsedPrologue:_f,createUnparsedPrepend:Ch,createUnparsedTextLike:Ah,createUnparsedSyntheticReference:kh,createInputFiles:Dh,createSyntheticExpression:Ph,createSyntaxList:cf,createNotEmittedStatement:lf,createPartiallyEmittedExpression:$c,updatePartiallyEmittedExpression:uf,createCommaListExpression:zs,updateCommaListExpression:pf,createSyntheticReferenceExpression:ff,updateSyntheticReferenceExpression:Nh,cloneNode:Yc,get createComma(){return p(28)},get createAssignment(){return p(64)},get createLogicalOr(){return p(57)},get createLogicalAnd(){return p(56)},get createBitwiseOr(){return p(52)},get createBitwiseXor(){return p(53)},get createBitwiseAnd(){return p(51)},get createStrictEquality(){return p(37)},get createStrictInequality(){return p(38)},get createEquality(){return p(35)},get createInequality(){return p(36)},get createLessThan(){return p(30)},get createLessThanEquals(){return p(33)},get createGreaterThan(){return p(32)},get createGreaterThanEquals(){return p(34)},get createLeftShift(){return p(48)},get createRightShift(){return p(49)},get createUnsignedRightShift(){return p(50)},get createAdd(){return p(40)},get createSubtract(){return p(41)},get createMultiply(){return p(42)},get createDivide(){return p(44)},get createModulo(){return p(45)},get createExponent(){return p(43)},get createPrefixPlus(){return m(40)},get createPrefixMinus(){return m(41)},get createPrefixIncrement(){return m(46)},get createPrefixDecrement(){return m(47)},get createBitwiseNot(){return m(55)},get createLogicalNot(){return m(54)},get createPostfixIncrement(){return y(46)},get createPostfixDecrement(){return y(47)},createImmediatelyInvokedFunctionExpression:Jh,createImmediatelyInvokedArrowFunction:Rh,createVoidZero:So,createExportDefault:jh,createExternalModuleExport:Ws,createTypeCheck:Fh,createIsNotTypeCheck:df,createMethodCall:da,createGlobalMethodCall:xo,createFunctionBindCall:Bh,createFunctionCallCall:mf,createFunctionApplyCall:Uh,createArraySliceCall:qh,createArrayConcatCall:hf,createObjectDefinePropertyCall:yf,createObjectGetOwnPropertyDescriptorCall:gf,createReflectGetCall:c,createReflectSetCall:h,createPropertyDescriptor:E,createCallBinding:ne,createAssignmentTargetWrapper:pe,inlineExpressions:Ue,getInternalName:Oe,getLocalName:xn,getExportName:qn,getDeclarationName:vi,getNamespaceMemberName:Zr,getExternalModuleOrNamespaceExportName:Jr,restoreOuterExpressions:Y,restoreEnclosingLabel:_e,createUseStrictPrologue:Kc,copyPrologue:ma,copyStandardPrologue:bf,copyCustomPrologue:Zc,ensureUseStrict:Wh,liftToBlock:vf,mergeLexicalEnvironment:zi,replaceModifiers:Tf,replaceDecoratorsAndModifiers:fn,replacePropertyName:Vs};return wn(fb,r=>r(se)),se;function fe(r,o){if(r===void 0||r===Je)r=[];else if(ha(r)){if(o===void 0||r.hasTrailingComma===o)return r.transformFlags===void 0&&j6(r),I.attachNodeArrayDebugInfo(r),r;let g=r.slice();return g.pos=r.pos,g.end=r.end,g.hasTrailingComma=o,g.transformFlags=r.transformFlags,I.attachNodeArrayDebugInfo(g),g}let s=r.length,l=s>=1&&s<=4?r.slice():r;return l.pos=-1,l.end=-1,l.hasTrailingComma=!!o,l.transformFlags=0,j6(l),I.attachNodeArrayDebugInfo(l),l}function F(r){return t.createBaseNode(r)}function W(r){let o=F(r);return o.symbol=void 0,o.localSymbol=void 0,o}function Se(r,o){return r!==o&&(r.typeArguments=o.typeArguments),n(r,o)}function Qe(r,o=0){let s=W(9);return s.text=typeof r=="number"?r+"":r,s.numericLiteralFlags=o,o&384&&(s.transformFlags|=1024),s}function Be(r){let o=an(10);return o.text=typeof r=="string"?r:ib(r)+"n",o.transformFlags|=32,o}function st(r,o){let s=W(11);return s.text=r,s.singleQuote=o,s}function _t(r,o,s){let l=st(r,o);return l.hasExtendedUnicodeEscape=s,s&&(l.transformFlags|=1024),l}function hn(r){let o=st(Sd(r),void 0);return o.textSourceNode=r,o}function yn(r){let o=an(14);return o.text=r,o}function fi(r,o){switch(r){case 9:return Qe(o,0);case 10:return Be(o);case 11:return _t(o,void 0);case 12:return vo(o,!1);case 13:return vo(o,!0);case 14:return yn(o);case 15:return Ua(r,o,void 0,0)}}function gn(r){let o=t.createBaseIdentifierNode(80);return o.escapedText=r,o.jsDoc=void 0,o.flowNode=void 0,o.symbol=void 0,o}function cr(r,o,s,l){let g=gn(qr(r));return setIdentifierAutoGenerate(g,{flags:o,id:sl,prefix:s,suffix:l}),sl++,g}function He(r,o,s){o===void 0&&r&&(o=Fl(r)),o===80&&(o=void 0);let l=gn(qr(r));return s&&(l.flags|=256),l.escapedText==="await"&&(l.transformFlags|=67108864),l.flags&256&&(l.transformFlags|=1024),l}function Qn(r,o,s,l){let g=1;o&&(g|=8);let D=cr("",g,s,l);return r&&r(D),D}function Gr(r){let o=2;return r&&(o|=8),cr("",o,void 0,void 0)}function vt(r,o=0,s,l){return I.assert(!(o&7),"Argument out of range: flags"),I.assert((o&48)!==32,"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),cr(r,3|o,s,l)}function Jn(r,o=0,s,l){I.assert(!(o&7),"Argument out of range: flags");let g=r?ro(r)?Od(!1,s,r,l,Lt):`generated@${getNodeId(r)}`:"";(s||l)&&(o|=16);let D=cr(g,4|o,s,l);return D.original=r,D}function Ar(r){let o=t.createBasePrivateIdentifierNode(81);return o.escapedText=r,o.transformFlags|=16777216,o}function Ht(r){return Hn(r,"#")||I.fail("First character of private identifier must be #: "+r),Ar(qr(r))}function rn(r,o,s,l){let g=Ar(qr(r));return setIdentifierAutoGenerate(g,{flags:o,id:sl,prefix:s,suffix:l}),sl++,g}function at(r,o,s){r&&!Hn(r,"#")&&I.fail("First character of private identifier must be #: "+r);let l=8|(r?3:1);return rn(r??"",l,o,s)}function kr(r,o,s){let l=ro(r)?Od(!0,o,r,s,Lt):`#generated@${getNodeId(r)}`,D=rn(l,4|(o||s?16:0),o,s);return D.original=r,D}function an(r){return t.createBaseTokenNode(r)}function xt(r){I.assert(r>=0&&r<=165,"Invalid token"),I.assert(r<=15||r>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),I.assert(r<=9||r>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),I.assert(r!==80,"Invalid token. Use 'createIdentifier' to create identifiers");let o=an(r),s=0;switch(r){case 134:s=384;break;case 160:s=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:s=1;break;case 108:s=134218752,o.flowNode=void 0;break;case 126:s=1024;break;case 129:s=16777216;break;case 110:s=16384,o.flowNode=void 0;break}return s&&(o.transformFlags|=s),o}function ut(){return xt(108)}function Gt(){return xt(110)}function cn(){return xt(106)}function ht(){return xt(112)}function Dr(){return xt(97)}function Tt(r){return xt(r)}function Rn(r){let o=[];return r&32&&o.push(Tt(95)),r&128&&o.push(Tt(138)),r&2048&&o.push(Tt(90)),r&4096&&o.push(Tt(87)),r&1&&o.push(Tt(125)),r&2&&o.push(Tt(123)),r&4&&o.push(Tt(124)),r&64&&o.push(Tt(128)),r&256&&o.push(Tt(126)),r&16&&o.push(Tt(164)),r&8&&o.push(Tt(148)),r&512&&o.push(Tt(129)),r&1024&&o.push(Tt(134)),r&8192&&o.push(Tt(103)),r&16384&&o.push(Tt(147)),o.length?o:void 0}function yt(r,o){let s=F(166);return s.left=r,s.right=Ke(o),s.transformFlags|=V(s.left)|t_(s.right),s.flowNode=void 0,s}function jn(r,o,s){return r.left!==o||r.right!==s?n(yt(o,s),r):r}function ct(r){let o=F(167);return o.expression=a().parenthesizeExpressionOfComputedPropertyName(r),o.transformFlags|=V(o.expression)|1024|131072,o}function Kt(r,o){return r.expression!==o?n(ct(o),r):r}function Zt(r,o,s,l){let g=W(168);return g.modifiers=Ie(r),g.name=Ke(o),g.constraint=s,g.default=l,g.transformFlags=1,g.expression=void 0,g.jsDoc=void 0,g}function lr(r,o,s,l,g){return r.modifiers!==o||r.name!==s||r.constraint!==l||r.default!==g?n(Zt(o,s,l,g),r):r}function di(r,o,s,l,g,D){let H=W(169);return H.modifiers=Ie(r),H.dotDotDotToken=o,H.name=Ke(s),H.questionToken=l,H.type=g,H.initializer=Hs(D),Sm(H.name)?H.transformFlags=1:H.transformFlags=ke(H.modifiers)|V(H.dotDotDotToken)|jr(H.name)|V(H.questionToken)|V(H.initializer)|(H.questionToken??H.type?1:0)|(H.dotDotDotToken??H.initializer?1024:0)|(hr(H.modifiers)&31?8192:0),H.jsDoc=void 0,H}function Xr(r,o,s,l,g,D,H){return r.modifiers!==o||r.dotDotDotToken!==s||r.name!==l||r.questionToken!==g||r.type!==D||r.initializer!==H?n(di(o,s,l,g,D,H),r):r}function Yn(r){let o=F(170);return o.expression=a().parenthesizeLeftSideOfAccess(r,!1),o.transformFlags|=V(o.expression)|1|8192|33554432,o}function Kn(r,o){return r.expression!==o?n(Yn(o),r):r}function Ji(r,o,s,l){let g=W(171);return g.modifiers=Ie(r),g.name=Ke(o),g.type=l,g.questionToken=s,g.transformFlags=1,g.initializer=void 0,g.jsDoc=void 0,g}function Pr(r,o,s,l,g){return r.modifiers!==o||r.name!==s||r.questionToken!==l||r.type!==g?De(Ji(o,s,l,g),r):r}function De(r,o){return r!==o&&(r.initializer=o.initializer),n(r,o)}function U(r,o,s,l,g){let D=W(172);D.modifiers=Ie(r),D.name=Ke(o),D.questionToken=s&&Nl(s)?s:void 0,D.exclamationToken=s&&Nd(s)?s:void 0,D.type=l,D.initializer=Hs(g);let H=D.flags&33554432||hr(D.modifiers)&128;return D.transformFlags=ke(D.modifiers)|jr(D.name)|V(D.initializer)|(H||D.questionToken||D.exclamationToken||D.type?1:0)|(oo(D.name)||hr(D.modifiers)&256&&D.initializer?8192:0)|16777216,D.jsDoc=void 0,D}function ie(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.questionToken!==(l!==void 0&&Nl(l)?l:void 0)||r.exclamationToken!==(l!==void 0&&Nd(l)?l:void 0)||r.type!==g||r.initializer!==D?n(U(o,s,l,g,D),r):r}function ye(r,o,s,l,g,D){let H=W(173);return H.modifiers=Ie(r),H.name=Ke(o),H.questionToken=s,H.typeParameters=Ie(l),H.parameters=Ie(g),H.type=D,H.transformFlags=1,H.jsDoc=void 0,H.locals=void 0,H.nextContainer=void 0,H.typeArguments=void 0,H}function Te(r,o,s,l,g,D,H){return r.modifiers!==o||r.name!==s||r.questionToken!==l||r.typeParameters!==g||r.parameters!==D||r.type!==H?Se(ye(o,s,l,g,D,H),r):r}function tt(r,o,s,l,g,D,H,me){let ze=W(174);if(ze.modifiers=Ie(r),ze.asteriskToken=o,ze.name=Ke(s),ze.questionToken=l,ze.exclamationToken=void 0,ze.typeParameters=Ie(g),ze.parameters=fe(D),ze.type=H,ze.body=me,!ze.body)ze.transformFlags=1;else{let In=hr(ze.modifiers)&1024,Si=!!ze.asteriskToken,xi=In&&Si;ze.transformFlags=ke(ze.modifiers)|V(ze.asteriskToken)|jr(ze.name)|V(ze.questionToken)|ke(ze.typeParameters)|ke(ze.parameters)|V(ze.type)|V(ze.body)&-67108865|(xi?128:In?256:Si?2048:0)|(ze.questionToken||ze.typeParameters||ze.type?1:0)|1024}return ze.typeArguments=void 0,ze.jsDoc=void 0,ze.locals=void 0,ze.nextContainer=void 0,ze.flowNode=void 0,ze.endFlowNode=void 0,ze.returnFlowNode=void 0,ze}function $e(r,o,s,l,g,D,H,me,ze){return r.modifiers!==o||r.asteriskToken!==s||r.name!==l||r.questionToken!==g||r.typeParameters!==D||r.parameters!==H||r.type!==me||r.body!==ze?Ut(tt(o,s,l,g,D,H,me,ze),r):r}function Ut(r,o){return r!==o&&(r.exclamationToken=o.exclamationToken),n(r,o)}function St(r){let o=W(175);return o.body=r,o.transformFlags=V(r)|16777216,o.modifiers=void 0,o.jsDoc=void 0,o.locals=void 0,o.nextContainer=void 0,o.endFlowNode=void 0,o.returnFlowNode=void 0,o}function Jt(r,o){return r.body!==o?Rt(St(o),r):r}function Rt(r,o){return r!==o&&(r.modifiers=o.modifiers),n(r,o)}function z(r,o,s){let l=W(176);return l.modifiers=Ie(r),l.parameters=fe(o),l.body=s,l.transformFlags=ke(l.modifiers)|ke(l.parameters)|V(l.body)&-67108865|1024,l.typeParameters=void 0,l.type=void 0,l.typeArguments=void 0,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.endFlowNode=void 0,l.returnFlowNode=void 0,l}function K(r,o,s,l){return r.modifiers!==o||r.parameters!==s||r.body!==l?te(z(o,s,l),r):r}function te(r,o){return r!==o&&(r.typeParameters=o.typeParameters,r.type=o.type),Se(r,o)}function Ee(r,o,s,l,g){let D=W(177);return D.modifiers=Ie(r),D.name=Ke(o),D.parameters=fe(s),D.type=l,D.body=g,D.body?D.transformFlags=ke(D.modifiers)|jr(D.name)|ke(D.parameters)|V(D.type)|V(D.body)&-67108865|(D.type?1:0):D.transformFlags=1,D.typeArguments=void 0,D.typeParameters=void 0,D.jsDoc=void 0,D.locals=void 0,D.nextContainer=void 0,D.flowNode=void 0,D.endFlowNode=void 0,D.returnFlowNode=void 0,D}function je(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.parameters!==l||r.type!==g||r.body!==D?pt(Ee(o,s,l,g,D),r):r}function pt(r,o){return r!==o&&(r.typeParameters=o.typeParameters),Se(r,o)}function nt(r,o,s,l){let g=W(178);return g.modifiers=Ie(r),g.name=Ke(o),g.parameters=fe(s),g.body=l,g.body?g.transformFlags=ke(g.modifiers)|jr(g.name)|ke(g.parameters)|V(g.body)&-67108865|(g.type?1:0):g.transformFlags=1,g.typeArguments=void 0,g.typeParameters=void 0,g.type=void 0,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g.endFlowNode=void 0,g.returnFlowNode=void 0,g}function kt(r,o,s,l,g){return r.modifiers!==o||r.name!==s||r.parameters!==l||r.body!==g?qt(nt(o,s,l,g),r):r}function qt(r,o){return r!==o&&(r.typeParameters=o.typeParameters,r.type=o.type),Se(r,o)}function Zn(r,o,s){let l=W(179);return l.typeParameters=Ie(r),l.parameters=Ie(o),l.type=s,l.transformFlags=1,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.typeArguments=void 0,l}function kn(r,o,s,l){return r.typeParameters!==o||r.parameters!==s||r.type!==l?Se(Zn(o,s,l),r):r}function er(r,o,s){let l=W(180);return l.typeParameters=Ie(r),l.parameters=Ie(o),l.type=s,l.transformFlags=1,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.typeArguments=void 0,l}function Ri(r,o,s,l){return r.typeParameters!==o||r.parameters!==s||r.type!==l?Se(er(o,s,l),r):r}function aa(r,o,s){let l=W(181);return l.modifiers=Ie(r),l.parameters=Ie(o),l.type=s,l.transformFlags=1,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.typeArguments=void 0,l}function $r(r,o,s,l){return r.parameters!==s||r.type!==l||r.modifiers!==o?Se(aa(o,s,l),r):r}function Dn(r,o){let s=F(204);return s.type=r,s.literal=o,s.transformFlags=1,s}function Ne(r,o,s){return r.type!==o||r.literal!==s?n(Dn(o,s),r):r}function oa(r){return xt(r)}function jt(r,o,s){let l=F(182);return l.assertsModifier=r,l.parameterName=Ke(o),l.type=s,l.transformFlags=1,l}function Fn(r,o,s,l){return r.assertsModifier!==o||r.parameterName!==s||r.type!==l?n(jt(o,s,l),r):r}function R(r,o){let s=F(183);return s.typeName=Ke(r),s.typeArguments=o&&a().parenthesizeTypeArguments(fe(o)),s.transformFlags=1,s}function v(r,o,s){return r.typeName!==o||r.typeArguments!==s?n(R(o,s),r):r}function w(r,o,s){let l=W(184);return l.typeParameters=Ie(r),l.parameters=Ie(o),l.type=s,l.transformFlags=1,l.modifiers=void 0,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.typeArguments=void 0,l}function f(r,o,s,l){return r.typeParameters!==o||r.parameters!==s||r.type!==l?X(w(o,s,l),r):r}function X(r,o){return r!==o&&(r.modifiers=o.modifiers),Se(r,o)}function $(...r){return r.length===4?O(...r):r.length===3?ue(...r):I.fail("Incorrect number of arguments specified.")}function O(r,o,s,l){let g=W(185);return g.modifiers=Ie(r),g.typeParameters=Ie(o),g.parameters=Ie(s),g.type=l,g.transformFlags=1,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.typeArguments=void 0,g}function ue(r,o,s){return O(void 0,r,o,s)}function be(...r){return r.length===5?ge(...r):r.length===4?Le(...r):I.fail("Incorrect number of arguments specified.")}function ge(r,o,s,l,g){return r.modifiers!==o||r.typeParameters!==s||r.parameters!==l||r.type!==g?Se($(o,s,l,g),r):r}function Le(r,o,s,l){return ge(r,r.modifiers,o,s,l)}function xe(r,o){let s=F(186);return s.exprName=r,s.typeArguments=o&&a().parenthesizeTypeArguments(o),s.transformFlags=1,s}function Ye(r,o,s){return r.exprName!==o||r.typeArguments!==s?n(xe(o,s),r):r}function Ge(r){let o=W(187);return o.members=fe(r),o.transformFlags=1,o}function Xe(r,o){return r.members!==o?n(Ge(o),r):r}function Nt(r){let o=F(188);return o.elementType=a().parenthesizeNonArrayTypeOfPostfixType(r),o.transformFlags=1,o}function Xt(r,o){return r.elementType!==o?n(Nt(o),r):r}function ln(r){let o=F(189);return o.elements=fe(a().parenthesizeElementTypesOfTupleType(r)),o.transformFlags=1,o}function ve(r,o){return r.elements!==o?n(ln(o),r):r}function ft(r,o,s,l){let g=W(202);return g.dotDotDotToken=r,g.name=o,g.questionToken=s,g.type=l,g.transformFlags=1,g.jsDoc=void 0,g}function Ir(r,o,s,l,g){return r.dotDotDotToken!==o||r.name!==s||r.questionToken!==l||r.type!==g?n(ft(o,s,l,g),r):r}function Dt(r){let o=F(190);return o.type=a().parenthesizeTypeOfOptionalType(r),o.transformFlags=1,o}function G(r,o){return r.type!==o?n(Dt(o),r):r}function La(r){let o=F(191);return o.type=r,o.transformFlags=1,o}function Pe(r,o){return r.type!==o?n(La(o),r):r}function ot(r,o,s){let l=F(r);return l.types=se.createNodeArray(s(o)),l.transformFlags=1,l}function un(r,o,s){return r.types!==o?n(ot(r.kind,o,s),r):r}function ur(r){return ot(192,r,a().parenthesizeConstituentTypesOfUnionType)}function Ja(r,o){return un(r,o,a().parenthesizeConstituentTypesOfUnionType)}function Nr(r){return ot(193,r,a().parenthesizeConstituentTypesOfIntersectionType)}function Re(r,o){return un(r,o,a().parenthesizeConstituentTypesOfIntersectionType)}function dt(r,o,s,l){let g=F(194);return g.checkType=a().parenthesizeCheckTypeOfConditionalType(r),g.extendsType=a().parenthesizeExtendsTypeOfConditionalType(o),g.trueType=s,g.falseType=l,g.transformFlags=1,g.locals=void 0,g.nextContainer=void 0,g}function mi(r,o,s,l,g){return r.checkType!==o||r.extendsType!==s||r.trueType!==l||r.falseType!==g?n(dt(o,s,l,g),r):r}function Qr(r){let o=F(195);return o.typeParameter=r,o.transformFlags=1,o}function r1(r,o){return r.typeParameter!==o?n(Qr(o),r):r}function bn(r,o){let s=F(203);return s.head=r,s.templateSpans=fe(o),s.transformFlags=1,s}function i1(r,o,s){return r.head!==o||r.templateSpans!==s?n(bn(o,s),r):r}function hi(r,o,s,l,g=!1){let D=F(205);return D.argument=r,D.attributes=o,D.assertions&&D.assertions.assertClause&&D.attributes&&(D.assertions.assertClause=D.attributes),D.qualifier=s,D.typeArguments=l&&a().parenthesizeTypeArguments(l),D.isTypeOf=g,D.transformFlags=1,D}function Ts(r,o,s,l,g,D=r.isTypeOf){return r.argument!==o||r.attributes!==s||r.qualifier!==l||r.typeArguments!==g||r.isTypeOf!==D?n(hi(o,s,l,g,D),r):r}function Pn(r){let o=F(196);return o.type=r,o.transformFlags=1,o}function zt(r,o){return r.type!==o?n(Pn(o),r):r}function M(){let r=F(197);return r.transformFlags=1,r}function Bn(r,o){let s=F(198);return s.operator=r,s.type=r===148?a().parenthesizeOperandOfReadonlyTypeOperator(o):a().parenthesizeOperandOfTypeOperator(o),s.transformFlags=1,s}function sa(r,o){return r.type!==o?n(Bn(r.operator,o),r):r}function yi(r,o){let s=F(199);return s.objectType=a().parenthesizeNonArrayTypeOfPostfixType(r),s.indexType=o,s.transformFlags=1,s}function X_(r,o,s){return r.objectType!==o||r.indexType!==s?n(yi(o,s),r):r}function Ft(r,o,s,l,g,D){let H=W(200);return H.readonlyToken=r,H.typeParameter=o,H.nameType=s,H.questionToken=l,H.type=g,H.members=D&&fe(D),H.transformFlags=1,H.locals=void 0,H.nextContainer=void 0,H}function vn(r,o,s,l,g,D,H){return r.readonlyToken!==o||r.typeParameter!==s||r.nameType!==l||r.questionToken!==g||r.type!==D||r.members!==H?n(Ft(o,s,l,g,D,H),r):r}function Ra(r){let o=F(201);return o.literal=r,o.transformFlags=1,o}function _a(r,o){return r.literal!==o?n(Ra(o),r):r}function yu(r){let o=F(206);return o.elements=fe(r),o.transformFlags|=ke(o.elements)|1024|524288,o.transformFlags&32768&&(o.transformFlags|=65664),o}function a1(r,o){return r.elements!==o?n(yu(o),r):r}function ca(r){let o=F(207);return o.elements=fe(r),o.transformFlags|=ke(o.elements)|1024|524288,o}function o1(r,o){return r.elements!==o?n(ca(o),r):r}function Ss(r,o,s,l){let g=W(208);return g.dotDotDotToken=r,g.propertyName=Ke(o),g.name=Ke(s),g.initializer=Hs(l),g.transformFlags|=V(g.dotDotDotToken)|jr(g.propertyName)|jr(g.name)|V(g.initializer)|(g.dotDotDotToken?32768:0)|1024,g.flowNode=void 0,g}function ja(r,o,s,l,g){return r.propertyName!==s||r.dotDotDotToken!==o||r.name!==l||r.initializer!==g?n(Ss(o,s,l,g),r):r}function $_(r,o){let s=F(209),l=r&&Pi(r),g=fe(r,l&&Lm(l)?!0:void 0);return s.elements=a().parenthesizeExpressionsOfCommaDelimitedList(g),s.multiLine=o,s.transformFlags|=ke(s.elements),s}function gu(r,o){return r.elements!==o?n($_(o,r.multiLine),r):r}function fo(r,o){let s=W(210);return s.properties=fe(r),s.multiLine=o,s.transformFlags|=ke(s.properties),s.jsDoc=void 0,s}function s1(r,o){return r.properties!==o?n(fo(o,r.multiLine),r):r}function bu(r,o,s){let l=W(211);return l.expression=r,l.questionDotToken=o,l.name=s,l.transformFlags=V(l.expression)|V(l.questionDotToken)|(Ae(l.name)?t_(l.name):V(l.name)|536870912),l.jsDoc=void 0,l.flowNode=void 0,l}function gi(r,o){let s=bu(a().parenthesizeLeftSideOfAccess(r,!1),void 0,Ke(o));return zf(r)&&(s.transformFlags|=384),s}function vu(r,o,s){return V4(r)?Tu(r,o,r.questionDotToken,wi(s,Ae)):r.expression!==o||r.name!==s?n(gi(o,s),r):r}function Fa(r,o,s){let l=bu(a().parenthesizeLeftSideOfAccess(r,!0),o,Ke(s));return l.flags|=64,l.transformFlags|=32,l}function Tu(r,o,s,l){return I.assert(!!(r.flags&64),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),r.expression!==o||r.questionDotToken!==s||r.name!==l?n(Fa(o,s,l),r):r}function xs(r,o,s){let l=W(212);return l.expression=r,l.questionDotToken=o,l.argumentExpression=s,l.transformFlags|=V(l.expression)|V(l.questionDotToken)|V(l.argumentExpression),l.jsDoc=void 0,l.flowNode=void 0,l}function Q_(r,o){let s=xs(a().parenthesizeLeftSideOfAccess(r,!1),void 0,Ti(o));return zf(r)&&(s.transformFlags|=384),s}function _1(r,o,s){return H4(r)?Su(r,o,r.questionDotToken,s):r.expression!==o||r.argumentExpression!==s?n(Q_(o,s),r):r}function Y_(r,o,s){let l=xs(a().parenthesizeLeftSideOfAccess(r,!0),o,Ti(s));return l.flags|=64,l.transformFlags|=32,l}function Su(r,o,s,l){return I.assert(!!(r.flags&64),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),r.expression!==o||r.questionDotToken!==s||r.argumentExpression!==l?n(Y_(o,s,l),r):r}function xu(r,o,s,l){let g=W(213);return g.expression=r,g.questionDotToken=o,g.typeArguments=s,g.arguments=l,g.transformFlags|=V(g.expression)|V(g.questionDotToken)|ke(g.typeArguments)|ke(g.arguments),g.typeArguments&&(g.transformFlags|=1),vd(g.expression)&&(g.transformFlags|=16384),g}function ji(r,o,s){let l=xu(a().parenthesizeLeftSideOfAccess(r,!1),void 0,Ie(o),a().parenthesizeExpressionsOfCommaDelimitedList(fe(s)));return Bx(l.expression)&&(l.transformFlags|=8388608),l}function c1(r,o,s,l){return T0(r)?pr(r,o,r.questionDotToken,s,l):r.expression!==o||r.typeArguments!==s||r.arguments!==l?n(ji(o,s,l),r):r}function K_(r,o,s,l){let g=xu(a().parenthesizeLeftSideOfAccess(r,!0),o,Ie(s),a().parenthesizeExpressionsOfCommaDelimitedList(fe(l)));return g.flags|=64,g.transformFlags|=32,g}function pr(r,o,s,l,g){return I.assert(!!(r.flags&64),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),r.expression!==o||r.questionDotToken!==s||r.typeArguments!==l||r.arguments!==g?n(K_(o,s,l,g),r):r}function ws(r,o,s){let l=W(214);return l.expression=a().parenthesizeExpressionOfNew(r),l.typeArguments=Ie(o),l.arguments=s?a().parenthesizeExpressionsOfCommaDelimitedList(s):void 0,l.transformFlags|=V(l.expression)|ke(l.typeArguments)|ke(l.arguments)|32,l.typeArguments&&(l.transformFlags|=1),l}function Z_(r,o,s,l){return r.expression!==o||r.typeArguments!==s||r.arguments!==l?n(ws(o,s,l),r):r}function ec(r,o,s){let l=F(215);return l.tag=a().parenthesizeLeftSideOfAccess(r,!1),l.typeArguments=Ie(o),l.template=s,l.transformFlags|=V(l.tag)|ke(l.typeArguments)|V(l.template)|1024,l.typeArguments&&(l.transformFlags|=1),M3(l.template)&&(l.transformFlags|=128),l}function l1(r,o,s,l){return r.tag!==o||r.typeArguments!==s||r.template!==l?n(ec(o,s,l),r):r}function wu(r,o){let s=F(216);return s.expression=a().parenthesizeOperandOfPrefixUnary(o),s.type=r,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function Eu(r,o,s){return r.type!==o||r.expression!==s?n(wu(o,s),r):r}function tc(r){let o=F(217);return o.expression=r,o.transformFlags=V(o.expression),o.jsDoc=void 0,o}function Cu(r,o){return r.expression!==o?n(tc(o),r):r}function nc(r,o,s,l,g,D,H){let me=W(218);me.modifiers=Ie(r),me.asteriskToken=o,me.name=Ke(s),me.typeParameters=Ie(l),me.parameters=fe(g),me.type=D,me.body=H;let ze=hr(me.modifiers)&1024,In=!!me.asteriskToken,Si=ze&&In;return me.transformFlags=ke(me.modifiers)|V(me.asteriskToken)|jr(me.name)|ke(me.typeParameters)|ke(me.parameters)|V(me.type)|V(me.body)&-67108865|(Si?128:ze?256:In?2048:0)|(me.typeParameters||me.type?1:0)|4194304,me.typeArguments=void 0,me.jsDoc=void 0,me.locals=void 0,me.nextContainer=void 0,me.flowNode=void 0,me.endFlowNode=void 0,me.returnFlowNode=void 0,me}function Au(r,o,s,l,g,D,H,me){return r.name!==l||r.modifiers!==o||r.asteriskToken!==s||r.typeParameters!==g||r.parameters!==D||r.type!==H||r.body!==me?Se(nc(o,s,l,g,D,H,me),r):r}function rc(r,o,s,l,g,D){let H=W(219);H.modifiers=Ie(r),H.typeParameters=Ie(o),H.parameters=fe(s),H.type=l,H.equalsGreaterThanToken=g??xt(39),H.body=a().parenthesizeConciseBodyOfArrowFunction(D);let me=hr(H.modifiers)&1024;return H.transformFlags=ke(H.modifiers)|ke(H.typeParameters)|ke(H.parameters)|V(H.type)|V(H.equalsGreaterThanToken)|V(H.body)&-67108865|(H.typeParameters||H.type?1:0)|(me?16640:0)|1024,H.typeArguments=void 0,H.jsDoc=void 0,H.locals=void 0,H.nextContainer=void 0,H.flowNode=void 0,H.endFlowNode=void 0,H.returnFlowNode=void 0,H}function ku(r,o,s,l,g,D,H){return r.modifiers!==o||r.typeParameters!==s||r.parameters!==l||r.type!==g||r.equalsGreaterThanToken!==D||r.body!==H?Se(rc(o,s,l,g,D,H),r):r}function ic(r){let o=F(220);return o.expression=a().parenthesizeOperandOfPrefixUnary(r),o.transformFlags|=V(o.expression),o}function u1(r,o){return r.expression!==o?n(ic(o),r):r}function Tn(r){let o=F(221);return o.expression=a().parenthesizeOperandOfPrefixUnary(r),o.transformFlags|=V(o.expression),o}function p1(r,o){return r.expression!==o?n(Tn(o),r):r}function Or(r){let o=F(222);return o.expression=a().parenthesizeOperandOfPrefixUnary(r),o.transformFlags|=V(o.expression),o}function f1(r,o){return r.expression!==o?n(Or(o),r):r}function Fi(r){let o=F(223);return o.expression=a().parenthesizeOperandOfPrefixUnary(r),o.transformFlags|=V(o.expression)|256|128|2097152,o}function Ba(r,o){return r.expression!==o?n(Fi(o),r):r}function ac(r,o){let s=F(224);return s.operator=r,s.operand=a().parenthesizeOperandOfPrefixUnary(o),s.transformFlags|=V(s.operand),(r===46||r===47)&&Ae(s.operand)&&!va(s.operand)&&!ng(s.operand)&&(s.transformFlags|=268435456),s}function Es(r,o){return r.operand!==o?n(ac(r.operator,o),r):r}function oc(r,o){let s=F(225);return s.operator=o,s.operand=a().parenthesizeOperandOfPostfixUnary(r),s.transformFlags|=V(s.operand),Ae(s.operand)&&!va(s.operand)&&!ng(s.operand)&&(s.transformFlags|=268435456),s}function Du(r,o){return r.operand!==o?n(oc(o,r.operator),r):r}function sc(r,o,s){let l=W(226),g=Vh(o),D=g.kind;return l.left=a().parenthesizeLeftSideOfBinary(D,r),l.operatorToken=g,l.right=a().parenthesizeRightSideOfBinary(D,l.left,s),l.transformFlags|=V(l.left)|V(l.operatorToken)|V(l.right),D===61?l.transformFlags|=32:D===64?uo(l.left)?l.transformFlags|=5248|Pu(l.left):iu(l.left)&&(l.transformFlags|=5120|Pu(l.left)):D===43||D===68?l.transformFlags|=512:Em(D)&&(l.transformFlags|=16),D===103&&Vn(l.left)&&(l.transformFlags|=536870912),l.jsDoc=void 0,l}function Pu(r){return Qb(r)?65536:0}function d1(r,o,s,l){return r.left!==o||r.operatorToken!==s||r.right!==l?n(sc(o,s,l),r):r}function _c(r,o,s,l,g){let D=F(227);return D.condition=a().parenthesizeConditionOfConditionalExpression(r),D.questionToken=o??xt(58),D.whenTrue=a().parenthesizeBranchOfConditionalExpression(s),D.colonToken=l??xt(59),D.whenFalse=a().parenthesizeBranchOfConditionalExpression(g),D.transformFlags|=V(D.condition)|V(D.questionToken)|V(D.whenTrue)|V(D.colonToken)|V(D.whenFalse),D}function m1(r,o,s,l,g,D){return r.condition!==o||r.questionToken!==s||r.whenTrue!==l||r.colonToken!==g||r.whenFalse!==D?n(_c(o,s,l,g,D),r):r}function Yr(r,o){let s=F(228);return s.head=r,s.templateSpans=fe(o),s.transformFlags|=V(s.head)|ke(s.templateSpans)|1024,s}function Iu(r,o,s){return r.head!==o||r.templateSpans!==s?n(Yr(o,s),r):r}function Cs(r,o,s,l=0){I.assert(!(l&-7177),"Unsupported template flags.");let g;if(s!==void 0&&s!==o&&(g=XM(r,s),typeof g=="object"))return I.fail("Invalid raw text");if(o===void 0){if(g===void 0)return I.fail("Arguments 'text' and 'rawText' may not both be undefined.");o=g}else g!==void 0&&I.assert(o===g,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return o}function Nu(r){let o=1024;return r&&(o|=128),o}function mo(r,o,s,l){let g=an(r);return g.text=o,g.rawText=s,g.templateFlags=l&7176,g.transformFlags=Nu(g.templateFlags),g}function cc(r,o,s,l){let g=W(r);return g.text=o,g.rawText=s,g.templateFlags=l&7176,g.transformFlags=Nu(g.templateFlags),g}function Ua(r,o,s,l){return r===15?cc(r,o,s,l):mo(r,o,s,l)}function As(r,o,s){return r=Cs(16,r,o,s),Ua(16,r,o,s)}function lc(r,o,s){return r=Cs(16,r,o,s),Ua(17,r,o,s)}function h1(r,o,s){return r=Cs(16,r,o,s),Ua(18,r,o,s)}function Ou(r,o,s){return r=Cs(16,r,o,s),cc(15,r,o,s)}function Mu(r,o){I.assert(!r||!!o,"A `YieldExpression` with an asteriskToken must have an expression.");let s=F(229);return s.expression=o&&a().parenthesizeExpressionForDisallowedComma(o),s.asteriskToken=r,s.transformFlags|=V(s.expression)|V(s.asteriskToken)|1024|128|1048576,s}function y1(r,o,s){return r.expression!==s||r.asteriskToken!==o?n(Mu(o,s),r):r}function Lu(r){let o=F(230);return o.expression=a().parenthesizeExpressionForDisallowedComma(r),o.transformFlags|=V(o.expression)|1024|32768,o}function g1(r,o){return r.expression!==o?n(Lu(o),r):r}function Ju(r,o,s,l,g){let D=W(231);return D.modifiers=Ie(r),D.name=Ke(o),D.typeParameters=Ie(s),D.heritageClauses=Ie(l),D.members=fe(g),D.transformFlags|=ke(D.modifiers)|jr(D.name)|ke(D.typeParameters)|ke(D.heritageClauses)|ke(D.members)|(D.typeParameters?1:0)|1024,D.jsDoc=void 0,D}function ho(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.typeParameters!==l||r.heritageClauses!==g||r.members!==D?n(Ju(o,s,l,g,D),r):r}function b1(){return F(232)}function Ru(r,o){let s=F(233);return s.expression=a().parenthesizeLeftSideOfAccess(r,!1),s.typeArguments=o&&a().parenthesizeTypeArguments(o),s.transformFlags|=V(s.expression)|ke(s.typeArguments)|1024,s}function fr(r,o,s){return r.expression!==o||r.typeArguments!==s?n(Ru(o,s),r):r}function ks(r,o){let s=F(234);return s.expression=r,s.type=o,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function ju(r,o,s){return r.expression!==o||r.type!==s?n(ks(o,s),r):r}function Fu(r){let o=F(235);return o.expression=a().parenthesizeLeftSideOfAccess(r,!1),o.transformFlags|=V(o.expression)|1,o}function uc(r,o){return X4(r)?Uu(r,o):r.expression!==o?n(Fu(o),r):r}function Bu(r,o){let s=F(238);return s.expression=r,s.type=o,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function pc(r,o,s){return r.expression!==o||r.type!==s?n(Bu(o,s),r):r}function Mr(r){let o=F(235);return o.flags|=64,o.expression=a().parenthesizeLeftSideOfAccess(r,!0),o.transformFlags|=V(o.expression)|1,o}function Uu(r,o){return I.assert(!!(r.flags&64),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),r.expression!==o?n(Mr(o),r):r}function Ds(r,o){let s=F(236);switch(s.keywordToken=r,s.name=o,s.transformFlags|=V(s.name),r){case 105:s.transformFlags|=1024;break;case 102:s.transformFlags|=32;break;default:return I.assertNever(r)}return s.flowNode=void 0,s}function bi(r,o){return r.name!==o?n(Ds(r.keywordToken,o),r):r}function yo(r,o){let s=F(239);return s.expression=r,s.literal=o,s.transformFlags|=V(s.expression)|V(s.literal)|1024,s}function qu(r,o,s){return r.expression!==o||r.literal!==s?n(yo(o,s),r):r}function zu(){let r=F(240);return r.transformFlags|=1024,r}function qa(r,o){let s=F(241);return s.statements=fe(r),s.multiLine=o,s.transformFlags|=ke(s.statements),s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s}function Wu(r,o){return r.statements!==o?n(qa(o,r.multiLine),r):r}function Vu(r,o){let s=F(243);return s.modifiers=Ie(r),s.declarationList=$t(o)?bc(o):o,s.transformFlags|=ke(s.modifiers)|V(s.declarationList),hr(s.modifiers)&128&&(s.transformFlags=1),s.jsDoc=void 0,s.flowNode=void 0,s}function Hu(r,o,s){return r.modifiers!==o||r.declarationList!==s?n(Vu(o,s),r):r}function fc(){let r=F(242);return r.jsDoc=void 0,r}function go(r){let o=F(244);return o.expression=a().parenthesizeExpressionOfExpressionStatement(r),o.transformFlags|=V(o.expression),o.jsDoc=void 0,o.flowNode=void 0,o}function v1(r,o){return r.expression!==o?n(go(o),r):r}function dc(r,o,s){let l=F(245);return l.expression=r,l.thenStatement=tr(o),l.elseStatement=tr(s),l.transformFlags|=V(l.expression)|V(l.thenStatement)|V(l.elseStatement),l.jsDoc=void 0,l.flowNode=void 0,l}function T1(r,o,s,l){return r.expression!==o||r.thenStatement!==s||r.elseStatement!==l?n(dc(o,s,l),r):r}function mc(r,o){let s=F(246);return s.statement=tr(r),s.expression=o,s.transformFlags|=V(s.statement)|V(s.expression),s.jsDoc=void 0,s.flowNode=void 0,s}function S1(r,o,s){return r.statement!==o||r.expression!==s?n(mc(o,s),r):r}function Gu(r,o){let s=F(247);return s.expression=r,s.statement=tr(o),s.transformFlags|=V(s.expression)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function x1(r,o,s){return r.expression!==o||r.statement!==s?n(Gu(o,s),r):r}function hc(r,o,s,l){let g=F(248);return g.initializer=r,g.condition=o,g.incrementor=s,g.statement=tr(l),g.transformFlags|=V(g.initializer)|V(g.condition)|V(g.incrementor)|V(g.statement),g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g}function Xu(r,o,s,l,g){return r.initializer!==o||r.condition!==s||r.incrementor!==l||r.statement!==g?n(hc(o,s,l,g),r):r}function $u(r,o,s){let l=F(249);return l.initializer=r,l.expression=o,l.statement=tr(s),l.transformFlags|=V(l.initializer)|V(l.expression)|V(l.statement),l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.flowNode=void 0,l}function w1(r,o,s,l){return r.initializer!==o||r.expression!==s||r.statement!==l?n($u(o,s,l),r):r}function Qu(r,o,s,l){let g=F(250);return g.awaitModifier=r,g.initializer=o,g.expression=a().parenthesizeExpressionForDisallowedComma(s),g.statement=tr(l),g.transformFlags|=V(g.awaitModifier)|V(g.initializer)|V(g.expression)|V(g.statement)|1024,r&&(g.transformFlags|=128),g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g}function E1(r,o,s,l,g){return r.awaitModifier!==o||r.initializer!==s||r.expression!==l||r.statement!==g?n(Qu(o,s,l,g),r):r}function Yu(r){let o=F(251);return o.label=Ke(r),o.transformFlags|=V(o.label)|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function Ku(r,o){return r.label!==o?n(Yu(o),r):r}function yc(r){let o=F(252);return o.label=Ke(r),o.transformFlags|=V(o.label)|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function Zu(r,o){return r.label!==o?n(yc(o),r):r}function ep(r){let o=F(253);return o.expression=r,o.transformFlags|=V(o.expression)|128|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function tp(r,o){return r.expression!==o?n(ep(o),r):r}function gc(r,o){let s=F(254);return s.expression=r,s.statement=tr(o),s.transformFlags|=V(s.expression)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function np(r,o,s){return r.expression!==o||r.statement!==s?n(gc(o,s),r):r}function la(r,o){let s=F(255);return s.expression=a().parenthesizeExpressionForDisallowedComma(r),s.caseBlock=o,s.transformFlags|=V(s.expression)|V(s.caseBlock),s.jsDoc=void 0,s.flowNode=void 0,s.possiblyExhaustive=!1,s}function C1(r,o,s){return r.expression!==o||r.caseBlock!==s?n(la(o,s),r):r}function rp(r,o){let s=F(256);return s.label=Ke(r),s.statement=tr(o),s.transformFlags|=V(s.label)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function ip(r,o,s){return r.label!==o||r.statement!==s?n(rp(o,s),r):r}function ap(r){let o=F(257);return o.expression=r,o.transformFlags|=V(o.expression),o.jsDoc=void 0,o.flowNode=void 0,o}function A1(r,o){return r.expression!==o?n(ap(o),r):r}function op(r,o,s){let l=F(258);return l.tryBlock=r,l.catchClause=o,l.finallyBlock=s,l.transformFlags|=V(l.tryBlock)|V(l.catchClause)|V(l.finallyBlock),l.jsDoc=void 0,l.flowNode=void 0,l}function sp(r,o,s,l){return r.tryBlock!==o||r.catchClause!==s||r.finallyBlock!==l?n(op(o,s,l),r):r}function _p(){let r=F(259);return r.jsDoc=void 0,r.flowNode=void 0,r}function Ps(r,o,s,l){let g=W(260);return g.name=Ke(r),g.exclamationToken=o,g.type=s,g.initializer=Hs(l),g.transformFlags|=jr(g.name)|V(g.initializer)|(g.exclamationToken??g.type?1:0),g.jsDoc=void 0,g}function k1(r,o,s,l,g){return r.name!==o||r.type!==l||r.exclamationToken!==s||r.initializer!==g?n(Ps(o,s,l,g),r):r}function bc(r,o=0){let s=F(261);return s.flags|=o&7,s.declarations=fe(r),s.transformFlags|=ke(s.declarations)|4194304,o&7&&(s.transformFlags|=263168),o&4&&(s.transformFlags|=4),s}function D1(r,o){return r.declarations!==o?n(bc(o,r.flags),r):r}function vc(r,o,s,l,g,D,H){let me=W(262);if(me.modifiers=Ie(r),me.asteriskToken=o,me.name=Ke(s),me.typeParameters=Ie(l),me.parameters=fe(g),me.type=D,me.body=H,!me.body||hr(me.modifiers)&128)me.transformFlags=1;else{let ze=hr(me.modifiers)&1024,In=!!me.asteriskToken,Si=ze&&In;me.transformFlags=ke(me.modifiers)|V(me.asteriskToken)|jr(me.name)|ke(me.typeParameters)|ke(me.parameters)|V(me.type)|V(me.body)&-67108865|(Si?128:ze?256:In?2048:0)|(me.typeParameters||me.type?1:0)|4194304}return me.typeArguments=void 0,me.jsDoc=void 0,me.locals=void 0,me.nextContainer=void 0,me.endFlowNode=void 0,me.returnFlowNode=void 0,me}function cp(r,o,s,l,g,D,H,me){return r.modifiers!==o||r.asteriskToken!==s||r.name!==l||r.typeParameters!==g||r.parameters!==D||r.type!==H||r.body!==me?P1(vc(o,s,l,g,D,H,me),r):r}function P1(r,o){return r!==o&&r.modifiers===o.modifiers&&(r.modifiers=o.modifiers),Se(r,o)}function Tc(r,o,s,l,g){let D=W(263);return D.modifiers=Ie(r),D.name=Ke(o),D.typeParameters=Ie(s),D.heritageClauses=Ie(l),D.members=fe(g),hr(D.modifiers)&128?D.transformFlags=1:(D.transformFlags|=ke(D.modifiers)|jr(D.name)|ke(D.typeParameters)|ke(D.heritageClauses)|ke(D.members)|(D.typeParameters?1:0)|1024,D.transformFlags&8192&&(D.transformFlags|=1)),D.jsDoc=void 0,D}function Sc(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.typeParameters!==l||r.heritageClauses!==g||r.members!==D?n(Tc(o,s,l,g,D),r):r}function lp(r,o,s,l,g){let D=W(264);return D.modifiers=Ie(r),D.name=Ke(o),D.typeParameters=Ie(s),D.heritageClauses=Ie(l),D.members=fe(g),D.transformFlags=1,D.jsDoc=void 0,D}function gt(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.typeParameters!==l||r.heritageClauses!==g||r.members!==D?n(lp(o,s,l,g,D),r):r}function Bi(r,o,s,l){let g=W(265);return g.modifiers=Ie(r),g.name=Ke(o),g.typeParameters=Ie(s),g.type=l,g.transformFlags=1,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g}function xc(r,o,s,l,g){return r.modifiers!==o||r.name!==s||r.typeParameters!==l||r.type!==g?n(Bi(o,s,l,g),r):r}function Ui(r,o,s){let l=W(266);return l.modifiers=Ie(r),l.name=Ke(o),l.members=fe(s),l.transformFlags|=ke(l.modifiers)|V(l.name)|ke(l.members)|1,l.transformFlags&=-67108865,l.jsDoc=void 0,l}function up(r,o,s,l){return r.modifiers!==o||r.name!==s||r.members!==l?n(Ui(o,s,l),r):r}function Bt(r,o,s,l=0){let g=W(267);return g.modifiers=Ie(r),g.flags|=l&2088,g.name=o,g.body=s,hr(g.modifiers)&128?g.transformFlags=1:g.transformFlags|=ke(g.modifiers)|V(g.name)|V(g.body)|1,g.transformFlags&=-67108865,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g}function qi(r,o,s,l){return r.modifiers!==o||r.name!==s||r.body!==l?n(Bt(o,s,l,r.flags),r):r}function on(r){let o=F(268);return o.statements=fe(r),o.transformFlags|=ke(o.statements),o.jsDoc=void 0,o}function I1(r,o){return r.statements!==o?n(on(o),r):r}function pp(r){let o=F(269);return o.clauses=fe(r),o.transformFlags|=ke(o.clauses),o.locals=void 0,o.nextContainer=void 0,o}function N1(r,o){return r.clauses!==o?n(pp(o),r):r}function wc(r){let o=W(270);return o.name=Ke(r),o.transformFlags|=t_(o.name)|1,o.modifiers=void 0,o.jsDoc=void 0,o}function O1(r,o){return r.name!==o?M1(wc(o),r):r}function M1(r,o){return r!==o&&(r.modifiers=o.modifiers),n(r,o)}function fp(r,o,s,l){let g=W(271);return g.modifiers=Ie(r),g.name=Ke(s),g.isTypeOnly=o,g.moduleReference=l,g.transformFlags|=ke(g.modifiers)|t_(g.name)|V(g.moduleReference),Rm(g.moduleReference)||(g.transformFlags|=1),g.transformFlags&=-67108865,g.jsDoc=void 0,g}function dp(r,o,s,l,g){return r.modifiers!==o||r.isTypeOnly!==s||r.name!==l||r.moduleReference!==g?n(fp(o,s,l,g),r):r}function mp(r,o,s,l){let g=F(272);return g.modifiers=Ie(r),g.importClause=o,g.moduleSpecifier=s,g.attributes=g.assertClause=l,g.transformFlags|=V(g.importClause)|V(g.moduleSpecifier),g.transformFlags&=-67108865,g.jsDoc=void 0,g}function hp(r,o,s,l,g){return r.modifiers!==o||r.importClause!==s||r.moduleSpecifier!==l||r.attributes!==g?n(mp(o,s,l,g),r):r}function Ec(r,o,s){let l=W(273);return l.isTypeOnly=r,l.name=o,l.namedBindings=s,l.transformFlags|=V(l.name)|V(l.namedBindings),r&&(l.transformFlags|=1),l.transformFlags&=-67108865,l}function yp(r,o,s,l){return r.isTypeOnly!==o||r.name!==s||r.namedBindings!==l?n(Ec(o,s,l),r):r}function gp(r,o){let s=F(300);return s.elements=fe(r),s.multiLine=o,s.token=132,s.transformFlags|=4,s}function Is(r,o,s){return r.elements!==o||r.multiLine!==s?n(gp(o,s),r):r}function Cc(r,o){let s=F(301);return s.name=r,s.value=o,s.transformFlags|=4,s}function bp(r,o,s){return r.name!==o||r.value!==s?n(Cc(o,s),r):r}function Ac(r,o){let s=F(302);return s.assertClause=r,s.multiLine=o,s}function L1(r,o,s){return r.assertClause!==o||r.multiLine!==s?n(Ac(o,s),r):r}function Ns(r,o,s){let l=F(300);return l.token=s??118,l.elements=fe(r),l.multiLine=o,l.transformFlags|=4,l}function J1(r,o,s){return r.elements!==o||r.multiLine!==s?n(Ns(o,s,r.token),r):r}function kc(r,o){let s=F(301);return s.name=r,s.value=o,s.transformFlags|=4,s}function R1(r,o,s){return r.name!==o||r.value!==s?n(kc(o,s),r):r}function vp(r){let o=W(274);return o.name=r,o.transformFlags|=V(o.name),o.transformFlags&=-67108865,o}function j1(r,o){return r.name!==o?n(vp(o),r):r}function Tp(r){let o=W(280);return o.name=r,o.transformFlags|=V(o.name)|32,o.transformFlags&=-67108865,o}function F1(r,o){return r.name!==o?n(Tp(o),r):r}function Dc(r){let o=F(275);return o.elements=fe(r),o.transformFlags|=ke(o.elements),o.transformFlags&=-67108865,o}function ua(r,o){return r.elements!==o?n(Dc(o),r):r}function Sp(r,o,s){let l=W(276);return l.isTypeOnly=r,l.propertyName=o,l.name=s,l.transformFlags|=V(l.propertyName)|V(l.name),l.transformFlags&=-67108865,l}function xp(r,o,s,l){return r.isTypeOnly!==o||r.propertyName!==s||r.name!==l?n(Sp(o,s,l),r):r}function za(r,o,s){let l=W(277);return l.modifiers=Ie(r),l.isExportEquals=o,l.expression=o?a().parenthesizeRightSideOfBinary(64,void 0,s):a().parenthesizeExpressionOfExportDefault(s),l.transformFlags|=ke(l.modifiers)|V(l.expression),l.transformFlags&=-67108865,l.jsDoc=void 0,l}function Pc(r,o,s){return r.modifiers!==o||r.expression!==s?n(za(o,r.isExportEquals,s),r):r}function Ic(r,o,s,l,g){let D=W(278);return D.modifiers=Ie(r),D.isTypeOnly=o,D.exportClause=s,D.moduleSpecifier=l,D.attributes=D.assertClause=g,D.transformFlags|=ke(D.modifiers)|V(D.exportClause)|V(D.moduleSpecifier),D.transformFlags&=-67108865,D.jsDoc=void 0,D}function Wa(r,o,s,l,g,D){return r.modifiers!==o||r.isTypeOnly!==s||r.exportClause!==l||r.moduleSpecifier!==g||r.attributes!==D?B1(Ic(o,s,l,g,D),r):r}function B1(r,o){return r!==o&&r.modifiers===o.modifiers&&(r.modifiers=o.modifiers),n(r,o)}function Nc(r){let o=F(279);return o.elements=fe(r),o.transformFlags|=ke(o.elements),o.transformFlags&=-67108865,o}function wp(r,o){return r.elements!==o?n(Nc(o),r):r}function Oc(r,o,s){let l=F(281);return l.isTypeOnly=r,l.propertyName=Ke(o),l.name=Ke(s),l.transformFlags|=V(l.propertyName)|V(l.name),l.transformFlags&=-67108865,l.jsDoc=void 0,l}function U1(r,o,s,l){return r.isTypeOnly!==o||r.propertyName!==s||r.name!==l?n(Oc(o,s,l),r):r}function Ep(){let r=W(282);return r.jsDoc=void 0,r}function Cp(r){let o=F(283);return o.expression=r,o.transformFlags|=V(o.expression),o.transformFlags&=-67108865,o}function Ap(r,o){return r.expression!==o?n(Cp(o),r):r}function q1(r){return F(r)}function kp(r,o,s=!1){let l=Mc(r,s?o&&a().parenthesizeNonArrayTypeOfPostfixType(o):o);return l.postfix=s,l}function Mc(r,o){let s=F(r);return s.type=o,s}function z1(r,o,s){return o.type!==s?n(kp(r,s,o.postfix),o):o}function W1(r,o,s){return o.type!==s?n(Mc(r,s),o):o}function Dp(r,o){let s=W(324);return s.parameters=Ie(r),s.type=o,s.transformFlags=ke(s.parameters)|(s.type?1:0),s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.typeArguments=void 0,s}function V1(r,o,s){return r.parameters!==o||r.type!==s?n(Dp(o,s),r):r}function Pp(r,o=!1){let s=W(329);return s.jsDocPropertyTags=Ie(r),s.isArrayType=o,s}function H1(r,o,s){return r.jsDocPropertyTags!==o||r.isArrayType!==s?n(Pp(o,s),r):r}function Os(r){let o=F(316);return o.type=r,o}function G1(r,o){return r.type!==o?n(Os(o),r):r}function Ip(r,o,s){let l=W(330);return l.typeParameters=Ie(r),l.parameters=fe(o),l.type=s,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l}function Ms(r,o,s,l){return r.typeParameters!==o||r.parameters!==s||r.type!==l?n(Ip(o,s,l),r):r}function Un(r){let o=Df(r.kind);return r.tagName.escapedText===qr(o)?r.tagName:He(o)}function Kr(r,o,s){let l=F(r);return l.tagName=o,l.comment=s,l}function Va(r,o,s){let l=W(r);return l.tagName=o,l.comment=s,l}function Lc(r,o,s,l){let g=Kr(352,r??He("template"),l);return g.constraint=o,g.typeParameters=fe(s),g}function Jc(r,o=Un(r),s,l,g){return r.tagName!==o||r.constraint!==s||r.typeParameters!==l||r.comment!==g?n(Lc(o,s,l,g),r):r}function Np(r,o,s,l){let g=Va(353,r??He("typedef"),l);return g.typeExpression=o,g.fullName=s,g.name=rg(s),g.locals=void 0,g.nextContainer=void 0,g}function Op(r,o=Un(r),s,l,g){return r.tagName!==o||r.typeExpression!==s||r.fullName!==l||r.comment!==g?n(Np(o,s,l,g),r):r}function Mp(r,o,s,l,g,D){let H=Va(348,r??He("param"),D);return H.typeExpression=l,H.name=o,H.isNameFirst=!!g,H.isBracketed=s,H}function X1(r,o=Un(r),s,l,g,D,H){return r.tagName!==o||r.name!==s||r.isBracketed!==l||r.typeExpression!==g||r.isNameFirst!==D||r.comment!==H?n(Mp(o,s,l,g,D,H),r):r}function Rc(r,o,s,l,g,D){let H=Va(355,r??He("prop"),D);return H.typeExpression=l,H.name=o,H.isNameFirst=!!g,H.isBracketed=s,H}function $1(r,o=Un(r),s,l,g,D,H){return r.tagName!==o||r.name!==s||r.isBracketed!==l||r.typeExpression!==g||r.isNameFirst!==D||r.comment!==H?n(Rc(o,s,l,g,D,H),r):r}function jc(r,o,s,l){let g=Va(345,r??He("callback"),l);return g.typeExpression=o,g.fullName=s,g.name=rg(s),g.locals=void 0,g.nextContainer=void 0,g}function Q1(r,o=Un(r),s,l,g){return r.tagName!==o||r.typeExpression!==s||r.fullName!==l||r.comment!==g?n(jc(o,s,l,g),r):r}function Ls(r,o,s){let l=Kr(346,r??He("overload"),s);return l.typeExpression=o,l}function Lp(r,o=Un(r),s,l){return r.tagName!==o||r.typeExpression!==s||r.comment!==l?n(Ls(o,s,l),r):r}function Ha(r,o,s){let l=Kr(335,r??He("augments"),s);return l.class=o,l}function Y1(r,o=Un(r),s,l){return r.tagName!==o||r.class!==s||r.comment!==l?n(Ha(o,s,l),r):r}function pa(r,o,s){let l=Kr(336,r??He("implements"),s);return l.class=o,l}function bo(r,o,s){let l=Kr(354,r??He("see"),s);return l.name=o,l}function K1(r,o,s,l){return r.tagName!==o||r.name!==s||r.comment!==l?n(bo(o,s,l),r):r}function Jp(r){let o=F(317);return o.name=r,o}function Z1(r,o){return r.name!==o?n(Jp(o),r):r}function Rp(r,o){let s=F(318);return s.left=r,s.right=o,s.transformFlags|=V(s.left)|V(s.right),s}function eh(r,o,s){return r.left!==o||r.right!==s?n(Rp(o,s),r):r}function Fc(r,o){let s=F(331);return s.name=r,s.text=o,s}function th(r,o,s){return r.name!==o?n(Fc(o,s),r):r}function jp(r,o){let s=F(332);return s.name=r,s.text=o,s}function nh(r,o,s){return r.name!==o?n(jp(o,s),r):r}function Fp(r,o){let s=F(333);return s.name=r,s.text=o,s}function rh(r,o,s){return r.name!==o?n(Fp(o,s),r):r}function ih(r,o=Un(r),s,l){return r.tagName!==o||r.class!==s||r.comment!==l?n(pa(o,s,l),r):r}function Bp(r,o,s){return Kr(r,o??He(Df(r)),s)}function ah(r,o,s=Un(o),l){return o.tagName!==s||o.comment!==l?n(Bp(r,s,l),o):o}function Up(r,o,s,l){let g=Kr(r,o??He(Df(r)),l);return g.typeExpression=s,g}function oh(r,o,s=Un(o),l,g){return o.tagName!==s||o.typeExpression!==l||o.comment!==g?n(Up(r,s,l,g),o):o}function qp(r,o){return Kr(334,r,o)}function sh(r,o,s){return r.tagName!==o||r.comment!==s?n(qp(o,s),r):r}function Js(r,o,s){let l=Va(347,r??He(Df(347)),s);return l.typeExpression=o,l.locals=void 0,l.nextContainer=void 0,l}function _h(r,o=Un(r),s,l){return r.tagName!==o||r.typeExpression!==s||r.comment!==l?n(Js(o,s,l),r):r}function Bc(r){let o=F(328);return o.text=r,o}function zp(r,o){return r.text!==o?n(Bc(o),r):r}function Wp(r,o){let s=F(327);return s.comment=r,s.tags=Ie(o),s}function Rs(r,o,s){return r.comment!==o||r.tags!==s?n(Wp(o,s),r):r}function Uc(r,o,s){let l=F(284);return l.openingElement=r,l.children=fe(o),l.closingElement=s,l.transformFlags|=V(l.openingElement)|ke(l.children)|V(l.closingElement)|2,l}function ch(r,o,s,l){return r.openingElement!==o||r.children!==s||r.closingElement!==l?n(Uc(o,s,l),r):r}function Vp(r,o,s){let l=F(285);return l.tagName=r,l.typeArguments=Ie(o),l.attributes=s,l.transformFlags|=V(l.tagName)|ke(l.typeArguments)|V(l.attributes)|2,l.typeArguments&&(l.transformFlags|=1),l}function lh(r,o,s,l){return r.tagName!==o||r.typeArguments!==s||r.attributes!==l?n(Vp(o,s,l),r):r}function js(r,o,s){let l=F(286);return l.tagName=r,l.typeArguments=Ie(o),l.attributes=s,l.transformFlags|=V(l.tagName)|ke(l.typeArguments)|V(l.attributes)|2,o&&(l.transformFlags|=1),l}function Hp(r,o,s,l){return r.tagName!==o||r.typeArguments!==s||r.attributes!==l?n(js(o,s,l),r):r}function qc(r){let o=F(287);return o.tagName=r,o.transformFlags|=V(o.tagName)|2,o}function zc(r,o){return r.tagName!==o?n(qc(o),r):r}function Sn(r,o,s){let l=F(288);return l.openingFragment=r,l.children=fe(o),l.closingFragment=s,l.transformFlags|=V(l.openingFragment)|ke(l.children)|V(l.closingFragment)|2,l}function Gp(r,o,s,l){return r.openingFragment!==o||r.children!==s||r.closingFragment!==l?n(Sn(o,s,l),r):r}function vo(r,o){let s=F(12);return s.text=r,s.containsOnlyTriviaWhiteSpaces=!!o,s.transformFlags|=2,s}function uh(r,o,s){return r.text!==o||r.containsOnlyTriviaWhiteSpaces!==s?n(vo(o,s),r):r}function Xp(){let r=F(289);return r.transformFlags|=2,r}function ph(){let r=F(290);return r.transformFlags|=2,r}function $p(r,o){let s=W(291);return s.name=r,s.initializer=o,s.transformFlags|=V(s.name)|V(s.initializer)|2,s}function Fs(r,o,s){return r.name!==o||r.initializer!==s?n($p(o,s),r):r}function Qp(r){let o=W(292);return o.properties=fe(r),o.transformFlags|=ke(o.properties)|2,o}function fh(r,o){return r.properties!==o?n(Qp(o),r):r}function Yp(r){let o=F(293);return o.expression=r,o.transformFlags|=V(o.expression)|2,o}function dh(r,o){return r.expression!==o?n(Yp(o),r):r}function Bs(r,o){let s=F(294);return s.dotDotDotToken=r,s.expression=o,s.transformFlags|=V(s.dotDotDotToken)|V(s.expression)|2,s}function To(r,o){return r.expression!==o?n(Bs(r.dotDotDotToken,o),r):r}function Kp(r,o){let s=F(295);return s.namespace=r,s.name=o,s.transformFlags|=V(s.namespace)|V(s.name)|2,s}function Wc(r,o,s){return r.namespace!==o||r.name!==s?n(Kp(o,s),r):r}function Vc(r,o){let s=F(296);return s.expression=a().parenthesizeExpressionForDisallowedComma(r),s.statements=fe(o),s.transformFlags|=V(s.expression)|ke(s.statements),s.jsDoc=void 0,s}function mh(r,o,s){return r.expression!==o||r.statements!==s?n(Vc(o,s),r):r}function Ga(r){let o=F(297);return o.statements=fe(r),o.transformFlags=ke(o.statements),o}function Zp(r,o){return r.statements!==o?n(Ga(o),r):r}function ef(r,o){let s=F(298);switch(s.token=r,s.types=fe(o),s.transformFlags|=ke(s.types),r){case 96:s.transformFlags|=1024;break;case 119:s.transformFlags|=1;break;default:return I.assertNever(r)}return s}function hh(r,o){return r.types!==o?n(ef(r.token,o),r):r}function Hc(r,o){let s=F(299);return s.variableDeclaration=Hh(r),s.block=o,s.transformFlags|=V(s.variableDeclaration)|V(s.block)|(r?0:64),s.locals=void 0,s.nextContainer=void 0,s}function tf(r,o,s){return r.variableDeclaration!==o||r.block!==s?n(Hc(o,s),r):r}function Us(r,o){let s=W(303);return s.name=Ke(r),s.initializer=a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=jr(s.name)|V(s.initializer),s.modifiers=void 0,s.questionToken=void 0,s.exclamationToken=void 0,s.jsDoc=void 0,s}function fa(r,o,s){return r.name!==o||r.initializer!==s?yh(Us(o,s),r):r}function yh(r,o){return r!==o&&(r.modifiers=o.modifiers,r.questionToken=o.questionToken,r.exclamationToken=o.exclamationToken),n(r,o)}function nf(r,o){let s=W(304);return s.name=Ke(r),s.objectAssignmentInitializer=o&&a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=t_(s.name)|V(s.objectAssignmentInitializer)|1024,s.equalsToken=void 0,s.modifiers=void 0,s.questionToken=void 0,s.exclamationToken=void 0,s.jsDoc=void 0,s}function gh(r,o,s){return r.name!==o||r.objectAssignmentInitializer!==s?bh(nf(o,s),r):r}function bh(r,o){return r!==o&&(r.modifiers=o.modifiers,r.questionToken=o.questionToken,r.exclamationToken=o.exclamationToken,r.equalsToken=o.equalsToken),n(r,o)}function Gc(r){let o=W(305);return o.expression=a().parenthesizeExpressionForDisallowedComma(r),o.transformFlags|=V(o.expression)|128|65536,o.jsDoc=void 0,o}function rf(r,o){return r.expression!==o?n(Gc(o),r):r}function Lr(r,o){let s=W(306);return s.name=Ke(r),s.initializer=o&&a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=V(s.name)|V(s.initializer)|1,s.jsDoc=void 0,s}function af(r,o,s){return r.name!==o||r.initializer!==s?n(Lr(o,s),r):r}function vh(r,o,s){let l=t.createBaseSourceFileNode(312);return l.statements=fe(r),l.endOfFileToken=o,l.flags|=s,l.text="",l.fileName="",l.path="",l.resolvedPath="",l.originalFileName="",l.languageVersion=0,l.languageVariant=0,l.scriptKind=0,l.isDeclarationFile=!1,l.hasNoDefaultLib=!1,l.transformFlags|=ke(l.statements)|V(l.endOfFileToken),l.locals=void 0,l.nextContainer=void 0,l.endFlowNode=void 0,l.nodeCount=0,l.identifierCount=0,l.symbolCount=0,l.parseDiagnostics=void 0,l.bindDiagnostics=void 0,l.bindSuggestionDiagnostics=void 0,l.lineMap=void 0,l.externalModuleIndicator=void 0,l.setExternalModuleIndicator=void 0,l.pragmas=void 0,l.checkJsDirective=void 0,l.referencedFiles=void 0,l.typeReferenceDirectives=void 0,l.libReferenceDirectives=void 0,l.amdDependencies=void 0,l.commentDirectives=void 0,l.identifiers=void 0,l.packageJsonLocations=void 0,l.packageJsonScope=void 0,l.imports=void 0,l.moduleAugmentations=void 0,l.ambientModuleNames=void 0,l.classifiableNames=void 0,l.impliedNodeFormat=void 0,l}function of(r){let o=Object.create(r.redirectTarget);return Object.defineProperties(o,{id:{get(){return this.redirectInfo.redirectTarget.id},set(s){this.redirectInfo.redirectTarget.id=s}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(s){this.redirectInfo.redirectTarget.symbol=s}}}),o.redirectInfo=r,o}function Th(r){let o=of(r.redirectInfo);return o.flags|=r.flags&-17,o.fileName=r.fileName,o.path=r.path,o.resolvedPath=r.resolvedPath,o.originalFileName=r.originalFileName,o.packageJsonLocations=r.packageJsonLocations,o.packageJsonScope=r.packageJsonScope,o.emitNode=void 0,o}function sf(r){let o=t.createBaseSourceFileNode(312);o.flags|=r.flags&-17;for(let s in r)if(!(Wn(o,s)||!Wn(r,s))){if(s==="emitNode"){o.emitNode=void 0;continue}o[s]=r[s]}return o}function qs(r){let o=r.redirectInfo?Th(r):sf(r);return nr(o,r),o}function Sh(r,o,s,l,g,D,H){let me=qs(r);return me.statements=fe(o),me.isDeclarationFile=s,me.referencedFiles=l,me.typeReferenceDirectives=g,me.hasNoDefaultLib=D,me.libReferenceDirectives=H,me.transformFlags=ke(me.statements)|V(me.endOfFileToken),me}function xh(r,o,s=r.isDeclarationFile,l=r.referencedFiles,g=r.typeReferenceDirectives,D=r.hasNoDefaultLib,H=r.libReferenceDirectives){return r.statements!==o||r.isDeclarationFile!==s||r.referencedFiles!==l||r.typeReferenceDirectives!==g||r.hasNoDefaultLib!==D||r.libReferenceDirectives!==H?n(Sh(r,o,s,l,g,D,H),r):r}function Xc(r,o=Je){let s=F(313);return s.prepends=o,s.sourceFiles=r,s.syntheticFileReferences=void 0,s.syntheticTypeReferences=void 0,s.syntheticLibReferences=void 0,s.hasNoDefaultLib=void 0,s}function wh(r,o,s=Je){return r.sourceFiles!==o||r.prepends!==s?n(Xc(o,s),r):r}function Eh(r,o,s){let l=F(314);return l.prologues=r,l.syntheticReferences=o,l.texts=s,l.fileName="",l.text="",l.referencedFiles=Je,l.libReferenceDirectives=Je,l.getLineAndCharacterOfPosition=g=>no(l,g),l}function Xa(r,o){let s=F(r);return s.data=o,s}function _f(r){return Xa(307,r)}function Ch(r,o){let s=Xa(308,r);return s.texts=o,s}function Ah(r,o){return Xa(o?310:309,r)}function kh(r){let o=F(311);return o.data=r.data,o.section=r,o}function Dh(){let r=F(315);return r.javascriptText="",r.declarationText="",r}function Ph(r,o=!1,s){let l=F(237);return l.type=r,l.isSpread=o,l.tupleNameSource=s,l}function cf(r){let o=F(358);return o._children=r,o}function lf(r){let o=F(359);return o.original=r,We(o,r),o}function $c(r,o){let s=F(360);return s.expression=r,s.original=o,s.transformFlags|=V(s.expression)|1,We(s,o),s}function uf(r,o){return r.expression!==o?n($c(o,r.original),r):r}function Ih(r){if(ya(r)&&!xl(r)&&!r.original&&!r.emitNode&&!r.id){if(j_(r))return r.elements;if(At(r)&&Rx(r.operatorToken))return[r.left,r.right]}return r}function zs(r){let o=F(361);return o.elements=fe(mv(r,Ih)),o.transformFlags|=ke(o.elements),o}function pf(r,o){return r.elements!==o?n(zs(o),r):r}function ff(r,o){let s=F(362);return s.expression=r,s.thisArg=o,s.transformFlags|=V(s.expression)|V(s.thisArg),s}function Nh(r,o,s){return r.expression!==o||r.thisArg!==s?n(ff(o,s),r):r}function Oh(r){let o=gn(r.escapedText);return o.flags|=r.flags&-17,o.transformFlags=r.transformFlags,nr(o,r),setIdentifierAutoGenerate(o,{...r.emitNode.autoGenerate}),o}function Mh(r){let o=gn(r.escapedText);o.flags|=r.flags&-17,o.jsDoc=r.jsDoc,o.flowNode=r.flowNode,o.symbol=r.symbol,o.transformFlags=r.transformFlags,nr(o,r);let s=getIdentifierTypeArguments(r);return s&&setIdentifierTypeArguments(o,s),o}function Qc(r){let o=Ar(r.escapedText);return o.flags|=r.flags&-17,o.transformFlags=r.transformFlags,nr(o,r),setIdentifierAutoGenerate(o,{...r.emitNode.autoGenerate}),o}function Lh(r){let o=Ar(r.escapedText);return o.flags|=r.flags&-17,o.transformFlags=r.transformFlags,nr(o,r),o}function Yc(r){if(r===void 0)return r;if(ci(r))return qs(r);if(va(r))return Oh(r);if(Ae(r))return Mh(r);if(Bg(r))return Qc(r);if(Vn(r))return Lh(r);let o=Wl(r.kind)?t.createBaseNode(r.kind):t.createBaseTokenNode(r.kind);o.flags|=r.flags&-17,o.transformFlags=r.transformFlags,nr(o,r);for(let s in r)Wn(o,s)||!Wn(r,s)||(o[s]=r[s]);return o}function Jh(r,o,s){return ji(nc(void 0,void 0,void 0,void 0,o?[o]:[],void 0,qa(r,!0)),void 0,s?[s]:[])}function Rh(r,o,s){return ji(rc(void 0,void 0,o?[o]:[],void 0,void 0,qa(r,!0)),void 0,s?[s]:[])}function So(){return Or(Qe("0"))}function jh(r){return za(void 0,!1,r)}function Ws(r){return Ic(void 0,!1,Nc([Oc(!1,void 0,r)]))}function Fh(r,o){return o==="null"?se.createStrictEquality(r,cn()):o==="undefined"?se.createStrictEquality(r,So()):se.createStrictEquality(Tn(r),_t(o))}function df(r,o){return o==="null"?se.createStrictInequality(r,cn()):o==="undefined"?se.createStrictInequality(r,So()):se.createStrictInequality(Tn(r),_t(o))}function da(r,o,s){return T0(r)?K_(Fa(r,void 0,o),void 0,void 0,s):ji(gi(r,o),void 0,s)}function Bh(r,o,s){return da(r,"bind",[o,...s])}function mf(r,o,s){return da(r,"call",[o,...s])}function Uh(r,o,s){return da(r,"apply",[o,s])}function xo(r,o,s){return da(He(r),o,s)}function qh(r,o){return da(r,"slice",o===void 0?[]:[Ti(o)])}function hf(r,o){return da(r,"concat",o)}function yf(r,o,s){return xo("Object","defineProperty",[r,Ti(o),s])}function gf(r,o){return xo("Object","getOwnPropertyDescriptor",[r,Ti(o)])}function c(r,o,s){return xo("Reflect","get",s?[r,o,s]:[r,o])}function h(r,o,s,l){return xo("Reflect","set",l?[r,o,s,l]:[r,o,s])}function b(r,o,s){return s?(r.push(Us(o,s)),!0):!1}function E(r,o){let s=[];b(s,"enumerable",Ti(r.enumerable)),b(s,"configurable",Ti(r.configurable));let l=b(s,"writable",Ti(r.writable));l=b(s,"value",r.value)||l;let g=b(s,"get",r.get);return g=b(s,"set",r.set)||g,I.assert(!(l&&g),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),fo(s,!o)}function k(r,o){switch(r.kind){case 217:return Cu(r,o);case 216:return Eu(r,r.type,o);case 234:return ju(r,o,r.type);case 238:return pc(r,o,r.type);case 235:return uc(r,o);case 360:return uf(r,o)}}function J(r){return cs(r)&&ya(r)&&ya(getSourceMapRange(r))&&ya(getCommentRange(r))&&!Ze(getSyntheticLeadingComments(r))&&!Ze(getSyntheticTrailingComments(r))}function Y(r,o,s=15){return r&&qm(r,s)&&!J(r)?k(r,Y(r.expression,o)):o}function _e(r,o,s){if(!o)return r;let l=ip(o,o.label,s8(o.statement)?_e(r,o.statement):r);return s&&s(o),l}function re(r,o){let s=C_(r);switch(s.kind){case 80:return o;case 110:case 9:case 10:case 11:return!1;case 209:return s.elements.length!==0;case 210:return s.properties.length>0;default:return!0}}function ne(r,o,s,l=!1){let g=ms(r,15),D,H;return vd(g)?(D=Gt(),H=g):zf(g)?(D=Gt(),H=s!==void 0&&s<2?We(He("_super"),g):g):ai(g)&8192?(D=So(),H=a().parenthesizeLeftSideOfAccess(g,!1)):Ln(g)?re(g.expression,l)?(D=Qn(o),H=gi(We(se.createAssignment(D,g.expression),g.expression),g.name),We(H,g)):(D=g.expression,H=g):Ki(g)?re(g.expression,l)?(D=Qn(o),H=Q_(We(se.createAssignment(D,g.expression),g.expression),g.argumentExpression),We(H,g)):(D=g.expression,H=g):(D=So(),H=a().parenthesizeLeftSideOfAccess(r,!1)),{target:H,thisArg:D}}function pe(r,o){return gi(tc(fo([nt(void 0,"value",[di(void 0,void 0,r,void 0,void 0,void 0)],qa([go(o)]))])),"value")}function Ue(r){return r.length>10?zs(r):Bd(r,se.createComma)}function Fe(r,o,s,l=0,g){let D=g?r&&em(r):ql(r);if(D&&Ae(D)&&!va(D)){let H=Qi(We(Yc(D),D),D.parent);return l|=ai(D),s||(l|=96),o||(l|=3072),l&&setEmitFlags(H,l),H}return Jn(r)}function Oe(r,o,s){return Fe(r,o,s,98304)}function xn(r,o,s,l){return Fe(r,o,s,32768,l)}function qn(r,o,s){return Fe(r,o,s,16384)}function vi(r,o,s){return Fe(r,o,s)}function Zr(r,o,s,l){let g=gi(r,ya(o)?o:Yc(o));We(g,o);let D=0;return l||(D|=96),s||(D|=3072),D&&setEmitFlags(g,D),g}function Jr(r,o,s,l){return r&&Cn(o,32)?Zr(r,Fe(o),s,l):qn(o,s,l)}function ma(r,o,s,l){let g=bf(r,o,0,s);return Zc(r,o,g,l)}function zh(r){return Tr(r.expression)&&r.expression.text==="use strict"}function Kc(){return zm(go(_t("use strict")))}function bf(r,o,s=0,l){I.assert(o.length===0,"Prologue directives should be at the first statement in the target statements array");let g=!1,D=r.length;for(;sme&&In.splice(g,0,...o.slice(me,ze)),me>H&&In.splice(l,0,...o.slice(H,me)),H>D&&In.splice(s,0,...o.slice(D,H)),D>0)if(s===0)In.splice(0,0,...o.slice(0,D));else{let Si=new Map;for(let xi=0;xi=0;xi--){let wo=o[xi];Si.has(wo.expression.text)||In.unshift(wo)}}return ha(r)?We(fe(In,r.hasTrailingComma),r):r}function Tf(r,o){let s;return typeof o=="number"?s=Rn(o):s=o,Lo(r)?lr(r,s,r.name,r.constraint,r.default):Pa(r)?Xr(r,s,r.dotDotDotToken,r.name,r.questionToken,r.type,r.initializer):bb(r)?ge(r,s,r.typeParameters,r.parameters,r.type):Zl(r)?Pr(r,s,r.name,r.questionToken,r.type):Ia(r)?ie(r,s,r.name,r.questionToken??r.exclamationToken,r.type,r.initializer):Ux(r)?Te(r,s,r.name,r.questionToken,r.typeParameters,r.parameters,r.type):f_(r)?$e(r,s,r.asteriskToken,r.name,r.questionToken,r.typeParameters,r.parameters,r.type,r.body):L_(r)?K(r,s,r.parameters,r.body):d_(r)?je(r,s,r.name,r.parameters,r.type,r.body):Zo(r)?kt(r,s,r.name,r.parameters,r.body):gb(r)?$r(r,s,r.parameters,r.type):Nm(r)?Au(r,s,r.asteriskToken,r.name,r.typeParameters,r.parameters,r.type,r.body):Om(r)?ku(r,s,r.typeParameters,r.parameters,r.type,r.equalsGreaterThanToken,r.body):Ol(r)?ho(r,s,r.name,r.typeParameters,r.heritageClauses,r.members):ls(r)?Hu(r,s,r.declarationList):us(r)?cp(r,s,r.asteriskToken,r.name,r.typeParameters,r.parameters,r.type,r.body):es(r)?Sc(r,s,r.name,r.typeParameters,r.heritageClauses,r.members):su(r)?gt(r,s,r.name,r.typeParameters,r.heritageClauses,r.members):Db(r)?xc(r,s,r.name,r.typeParameters,r.type):Pb(r)?up(r,s,r.name,r.members):Zi(r)?qi(r,s,r.name,r.body):Nb(r)?dp(r,s,r.isTypeOnly,r.name,r.moduleReference):Ob(r)?hp(r,s,r.importClause,r.moduleSpecifier,r.attributes):ps(r)?Pc(r,s,r.expression):F_(r)?Wa(r,s,r.isTypeOnly,r.exportClause,r.moduleSpecifier,r.attributes):I.assertNever(r)}function fn(r,o){return Pa(r)?Xr(r,o,r.dotDotDotToken,r.name,r.questionToken,r.type,r.initializer):Ia(r)?ie(r,o,r.name,r.questionToken??r.exclamationToken,r.type,r.initializer):f_(r)?$e(r,o,r.asteriskToken,r.name,r.questionToken,r.typeParameters,r.parameters,r.type,r.body):d_(r)?je(r,o,r.name,r.parameters,r.type,r.body):Zo(r)?kt(r,o,r.name,r.parameters,r.body):Ol(r)?ho(r,o,r.name,r.typeParameters,r.heritageClauses,r.members):es(r)?Sc(r,o,r.name,r.typeParameters,r.heritageClauses,r.members):I.assertNever(r)}function Vs(r,o){switch(r.kind){case 177:return je(r,r.modifiers,o,r.parameters,r.type,r.body);case 178:return kt(r,r.modifiers,o,r.parameters,r.body);case 174:return $e(r,r.modifiers,r.asteriskToken,o,r.questionToken,r.typeParameters,r.parameters,r.type,r.body);case 173:return Te(r,r.modifiers,o,r.questionToken,r.typeParameters,r.parameters,r.type);case 172:return ie(r,r.modifiers,o,r.questionToken??r.exclamationToken,r.type,r.initializer);case 171:return Pr(r,r.modifiers,o,r.questionToken,r.type);case 303:return fa(r,o,r.initializer)}}function Ie(r){return r?fe(r):void 0}function Ke(r){return typeof r=="string"?He(r):r}function Ti(r){return typeof r=="string"?_t(r):typeof r=="number"?Qe(r):typeof r=="boolean"?r?ht():Dr():r}function Hs(r){return r&&a().parenthesizeExpressionForDisallowedComma(r)}function Vh(r){return typeof r=="number"?xt(r):r}function tr(r){return r&&Lb(r)?We(nr(fc(),r),r):r}function Hh(r){return typeof r=="string"||r&&!Li(r)?Ps(r,void 0,void 0,void 0):r}}function HM(e,t){return e!==t&&We(e,t),e}function GM(e,t){return e!==t&&(nr(e,t),We(e,t)),e}function Df(e){switch(e){case 351:return"type";case 349:return"returns";case 350:return"this";case 347:return"enum";case 337:return"author";case 339:return"class";case 340:return"public";case 341:return"private";case 342:return"protected";case 343:return"readonly";case 344:return"override";case 352:return"template";case 353:return"typedef";case 348:return"param";case 355:return"prop";case 345:return"callback";case 346:return"overload";case 335:return"augments";case 336:return"implements";default:return I.fail(`Unsupported kind: ${I.formatSyntaxKind(e)}`)}}function XM(e,t){switch(mr||(mr=ss(99,!1,0)),e){case 15:mr.setText("`"+t+"`");break;case 16:mr.setText("`"+t+"${");break;case 17:mr.setText("}"+t+"${");break;case 18:mr.setText("}"+t+"`");break}let n=mr.scan();if(n===20&&(n=mr.reScanTemplateToken(!1)),mr.isUnterminated())return mr.setText(void 0),eg;let a;switch(n){case 15:case 16:case 17:case 18:a=mr.getTokenValue();break}return a===void 0||mr.scan()!==1?(mr.setText(void 0),eg):(mr.setText(void 0),a)}function jr(e){return e&&Ae(e)?t_(e):V(e)}function t_(e){return V(e)&-67108865}function $M(e,t){return t|e.transformFlags&134234112}function V(e){if(!e)return 0;let t=e.transformFlags&~Ox(e.kind);return Zd(e)&&Vl(e.name)?$M(e.name,t):t}function ke(e){return e?e.transformFlags:0}function j6(e){let t=0;for(let n of e)t|=V(n);e.transformFlags=t}function Ox(e){if(e>=182&&e<=205)return-2;switch(e){case 213:case 214:case 209:return-2147450880;case 267:return-1941676032;case 169:return-2147483648;case 219:return-2072174592;case 218:case 262:return-1937940480;case 261:return-2146893824;case 263:case 231:return-2147344384;case 176:return-1937948672;case 172:return-2013249536;case 174:case 177:case 178:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 168:case 171:case 173:case 179:case 180:case 181:case 264:case 265:return-2;case 210:return-2147278848;case 299:return-2147418112;case 206:case 207:return-2147450880;case 216:case 238:case 234:case 360:case 217:case 108:return-2147483648;case 211:case 212:return-2147483648;default:return-2147483648}}function el(e){return e.flags|=16,e}function QM(e,t,n){let a,_,p,m,y,u,x,d,S,T;g_(e)?(p="",m=e,y=e.length,u=t,x=n):(I.assert(t==="js"||t==="dts"),p=(t==="js"?e.javascriptPath:e.declarationPath)||"",u=t==="js"?e.javascriptMapPath:e.declarationMapPath,d=()=>t==="js"?e.javascriptText:e.declarationText,S=()=>t==="js"?e.javascriptMapText:e.declarationMapText,y=()=>d().length,e.buildInfo&&e.buildInfo.bundle&&(I.assert(n===void 0||typeof n=="boolean"),a=n,_=t==="js"?e.buildInfo.bundle.js:e.buildInfo.bundle.dts,T=e.oldFileOfCurrentEmit));let A=T?KM(I.checkDefined(_)):YM(_,a,y);return A.fileName=p,A.sourceMapPath=u,A.oldFileOfCurrentEmit=T,d&&S?(Object.defineProperty(A,"text",{get:d}),Object.defineProperty(A,"sourceMapText",{get:S})):(I.assert(!T),A.text=m??"",A.sourceMapText=x),A}function YM(e,t,n){let a,_,p,m,y,u,x,d;for(let T of e?e.sections:Je)switch(T.kind){case"prologue":a=Et(a,We(zr.createUnparsedPrologue(T.data),T));break;case"emitHelpers":_=Et(_,getAllUnscopedEmitHelpers().get(T.data));break;case"no-default-lib":d=!0;break;case"reference":p=Et(p,{pos:-1,end:-1,fileName:T.data});break;case"type":m=Et(m,{pos:-1,end:-1,fileName:T.data});break;case"type-import":m=Et(m,{pos:-1,end:-1,fileName:T.data,resolutionMode:99});break;case"type-require":m=Et(m,{pos:-1,end:-1,fileName:T.data,resolutionMode:1});break;case"lib":y=Et(y,{pos:-1,end:-1,fileName:T.data});break;case"prepend":let A;for(let N of T.texts)(!t||N.kind!=="internal")&&(A=Et(A,We(zr.createUnparsedTextLike(N.data,N.kind==="internal"),N)));u=zn(u,A),x=Et(x,zr.createUnparsedPrepend(T.data,A??Je));break;case"internal":if(t){x||(x=[]);break}case"text":x=Et(x,We(zr.createUnparsedTextLike(T.data,T.kind==="internal"),T));break;default:I.assertNever(T)}if(!x){let T=zr.createUnparsedTextLike(void 0,!1);kd(T,0,typeof n=="function"?n():n),x=[T]}let S=q_.createUnparsedSource(a??Je,void 0,x);return a_(a,S),a_(x,S),a_(u,S),S.hasNoDefaultLib=d,S.helpers=_,S.referencedFiles=p||Je,S.typeReferenceDirectives=m,S.libReferenceDirectives=y||Je,S}function KM(e){let t,n;for(let _ of e.sections)switch(_.kind){case"internal":case"text":t=Et(t,We(zr.createUnparsedTextLike(_.data,_.kind==="internal"),_));break;case"no-default-lib":case"reference":case"type":case"type-import":case"type-require":case"lib":n=Et(n,We(zr.createUnparsedSyntheticReference(_),_));break;case"prologue":case"emitHelpers":case"prepend":break;default:I.assertNever(_)}let a=zr.createUnparsedSource(Je,n,t??Je);return a_(n,a),a_(t,a),a.helpers=xa(e.sources&&e.sources.helpers,_=>getAllUnscopedEmitHelpers().get(_)),a}function ZM(e,t,n,a,_,p){return g_(e)?Lx(void 0,e,n,a,void 0,t,_,p):Mx(e,t,n,a,_,p)}function Mx(e,t,n,a,_,p,m,y){let u=q_.createInputFiles();u.javascriptPath=t,u.javascriptMapPath=n,u.declarationPath=a,u.declarationMapPath=_,u.buildInfoPath=p;let x=new Map,d=N=>{if(N===void 0)return;let q=x.get(N);return q===void 0&&(q=e(N),x.set(N,q!==void 0?q:!1)),q!==!1?q:void 0},S=N=>{let q=d(N);return q!==void 0?q:`/* Input file ${N} was missing */\r +`},T;return Object.defineProperties(u,{javascriptText:{get:()=>S(t)},javascriptMapText:{get:()=>d(n)},declarationText:{get:()=>S(I.checkDefined(a))},declarationMapText:{get:()=>d(_)},buildInfo:{get:()=>{if(T===void 0&&p)if(m!=null&&m.getBuildInfo)T=m.getBuildInfo(p,y.configFilePath)??!1;else{let N=d(p);T=N!==void 0?getBuildInfo(p,N)??!1:!1}return T||void 0}}}),u}function Lx(e,t,n,a,_,p,m,y,u,x,d){let S=q_.createInputFiles();return S.javascriptPath=e,S.javascriptText=t,S.javascriptMapPath=n,S.javascriptMapText=a,S.declarationPath=_,S.declarationText=p,S.declarationMapPath=m,S.declarationMapText=y,S.buildInfoPath=u,S.buildInfo=x,S.oldFileOfCurrentEmit=d,S}function eL(e,t,n){return new(B6||(B6=Ct.getSourceMapSourceConstructor()))(e,t,n)}function nr(e,t){if(e.original!==t&&(e.original=t,t)){let n=t.emitNode;n&&(e.emitNode=tL(n,e.emitNode))}return e}function tL(e,t){let{flags:n,internalFlags:a,leadingComments:_,trailingComments:p,commentRange:m,sourceMapRange:y,tokenSourceMapRanges:u,constantValue:x,helpers:d,startsOnNewLine:S,snippetElement:T,classThis:A,assignedName:N}=e;if(t||(t={}),n&&(t.flags=n),a&&(t.internalFlags=a&-9),_&&(t.leadingComments=zn(_.slice(),t.leadingComments)),p&&(t.trailingComments=zn(p.slice(),t.trailingComments)),m&&(t.commentRange=m),y&&(t.sourceMapRange=y),u&&(t.tokenSourceMapRanges=nL(u,t.tokenSourceMapRanges)),x!==void 0&&(t.constantValue=x),d)for(let q of d)t.helpers=gv(t.helpers,q);return S!==void 0&&(t.startsOnNewLine=S),T!==void 0&&(t.snippetElement=T),A&&(t.classThis=A),N&&(t.assignedName=N),t}function nL(e,t){t||(t=[]);for(let n in e)t[n]=e[n];return t}var sl,Z0,fb,mr,eg,$s,F6,zr,B6,rL=It({"src/compiler/factory/nodeFactory.ts"(){"use strict";En(),sl=0,Z0=(e=>(e[e.None=0]="None",e[e.NoParenthesizerRules=1]="NoParenthesizerRules",e[e.NoNodeConverters=2]="NoNodeConverters",e[e.NoIndentationOnFreshPropertyAccess=4]="NoIndentationOnFreshPropertyAccess",e[e.NoOriginalNode=8]="NoOriginalNode",e))(Z0||{}),fb=[],eg={},$s=Ix(),F6={createBaseSourceFileNode:e=>el($s.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>el($s.createBaseIdentifierNode(e)),createBasePrivateIdentifierNode:e=>el($s.createBasePrivateIdentifierNode(e)),createBaseTokenNode:e=>el($s.createBaseTokenNode(e)),createBaseNode:e=>el($s.createBaseNode(e))},zr=Pd(4,F6)}}),iL=()=>{},aL=()=>{};function lo(e){return e.kind===9}function db(e){return e.kind===10}function Tr(e){return e.kind===11}function Id(e){return e.kind===12}function oL(e){return e.kind===14}function Jx(e){return e.kind===15}function sL(e){return e.kind===16}function _L(e){return e.kind===17}function cL(e){return e.kind===18}function lL(e){return e.kind===26}function Rx(e){return e.kind===28}function mb(e){return e.kind===40}function hb(e){return e.kind===41}function uL(e){return e.kind===42}function Nd(e){return e.kind===54}function Nl(e){return e.kind===58}function pL(e){return e.kind===59}function fL(e){return e.kind===29}function dL(e){return e.kind===39}function Ae(e){return e.kind===80}function Vn(e){return e.kind===81}function jx(e){return e.kind===95}function mL(e){return e.kind===90}function _l(e){return e.kind===134}function hL(e){return e.kind===131}function yL(e){return e.kind===135}function Fx(e){return e.kind===148}function gL(e){return e.kind===126}function bL(e){return e.kind===128}function vL(e){return e.kind===164}function TL(e){return e.kind===129}function zf(e){return e.kind===108}function Bx(e){return e.kind===102}function SL(e){return e.kind===84}function O_(e){return e.kind===166}function oo(e){return e.kind===167}function Lo(e){return e.kind===168}function Pa(e){return e.kind===169}function M_(e){return e.kind===170}function Zl(e){return e.kind===171}function Ia(e){return e.kind===172}function Ux(e){return e.kind===173}function f_(e){return e.kind===174}function eu(e){return e.kind===175}function L_(e){return e.kind===176}function d_(e){return e.kind===177}function Zo(e){return e.kind===178}function yb(e){return e.kind===179}function qx(e){return e.kind===180}function gb(e){return e.kind===181}function zx(e){return e.kind===182}function J_(e){return e.kind===183}function tu(e){return e.kind===184}function bb(e){return e.kind===185}function Wx(e){return e.kind===186}function Im(e){return e.kind===187}function Vx(e){return e.kind===188}function Hx(e){return e.kind===189}function vb(e){return e.kind===202}function Gx(e){return e.kind===190}function Xx(e){return e.kind===191}function $x(e){return e.kind===192}function Qx(e){return e.kind===193}function Yx(e){return e.kind===194}function Kx(e){return e.kind===195}function Tb(e){return e.kind===196}function Sb(e){return e.kind===197}function Zx(e){return e.kind===198}function e8(e){return e.kind===199}function t8(e){return e.kind===200}function xb(e){return e.kind===201}function nu(e){return e.kind===205}function xL(e){return e.kind===204}function wL(e){return e.kind===203}function EL(e){return e.kind===206}function CL(e){return e.kind===207}function ru(e){return e.kind===208}function iu(e){return e.kind===209}function uo(e){return e.kind===210}function Ln(e){return e.kind===211}function Ki(e){return e.kind===212}function R_(e){return e.kind===213}function n8(e){return e.kind===214}function r8(e){return e.kind===215}function AL(e){return e.kind===216}function cs(e){return e.kind===217}function Nm(e){return e.kind===218}function Om(e){return e.kind===219}function kL(e){return e.kind===220}function DL(e){return e.kind===221}function wb(e){return e.kind===222}function PL(e){return e.kind===223}function Mm(e){return e.kind===224}function i8(e){return e.kind===225}function At(e){return e.kind===226}function IL(e){return e.kind===227}function NL(e){return e.kind===228}function OL(e){return e.kind===229}function Eb(e){return e.kind===230}function Ol(e){return e.kind===231}function Lm(e){return e.kind===232}function Cb(e){return e.kind===233}function ML(e){return e.kind===234}function LL(e){return e.kind===238}function Uo(e){return e.kind===235}function Ab(e){return e.kind===236}function JL(e){return e.kind===237}function a8(e){return e.kind===360}function j_(e){return e.kind===361}function RL(e){return e.kind===239}function jL(e){return e.kind===240}function au(e){return e.kind===241}function ls(e){return e.kind===243}function FL(e){return e.kind===242}function ou(e){return e.kind===244}function BL(e){return e.kind===245}function UL(e){return e.kind===246}function qL(e){return e.kind===247}function o8(e){return e.kind===248}function zL(e){return e.kind===249}function WL(e){return e.kind===250}function VL(e){return e.kind===251}function HL(e){return e.kind===252}function GL(e){return e.kind===253}function XL(e){return e.kind===254}function $L(e){return e.kind===255}function s8(e){return e.kind===256}function QL(e){return e.kind===257}function YL(e){return e.kind===258}function KL(e){return e.kind===259}function Li(e){return e.kind===260}function kb(e){return e.kind===261}function us(e){return e.kind===262}function es(e){return e.kind===263}function su(e){return e.kind===264}function Db(e){return e.kind===265}function Pb(e){return e.kind===266}function Zi(e){return e.kind===267}function _8(e){return e.kind===268}function ZL(e){return e.kind===269}function Ib(e){return e.kind===270}function Nb(e){return e.kind===271}function Ob(e){return e.kind===272}function eJ(e){return e.kind===273}function tJ(e){return e.kind===302}function nJ(e){return e.kind===300}function rJ(e){return e.kind===301}function iJ(e){return e.kind===300}function aJ(e){return e.kind===301}function Mb(e){return e.kind===274}function Jm(e){return e.kind===280}function oJ(e){return e.kind===275}function c8(e){return e.kind===276}function ps(e){return e.kind===277}function F_(e){return e.kind===278}function l8(e){return e.kind===279}function u8(e){return e.kind===281}function sJ(e){return e.kind===282}function Lb(e){return e.kind===359}function _J(e){return e.kind===362}function Rm(e){return e.kind===283}function tg(e){return e.kind===284}function cJ(e){return e.kind===285}function Jo(e){return e.kind===286}function Wf(e){return e.kind===287}function yl(e){return e.kind===288}function Jb(e){return e.kind===289}function lJ(e){return e.kind===290}function uJ(e){return e.kind===291}function Rb(e){return e.kind===292}function pJ(e){return e.kind===293}function fJ(e){return e.kind===294}function B_(e){return e.kind===295}function dJ(e){return e.kind===296}function p8(e){return e.kind===297}function Ml(e){return e.kind===298}function mJ(e){return e.kind===299}function fs(e){return e.kind===303}function _u(e){return e.kind===304}function f8(e){return e.kind===305}function d8(e){return e.kind===306}function hJ(e){return e.kind===308}function ci(e){return e.kind===312}function yJ(e){return e.kind===313}function gJ(e){return e.kind===314}function m8(e){return e.kind===316}function Vf(e){return e.kind===317}function r_(e){return e.kind===318}function bJ(e){return e.kind===331}function vJ(e){return e.kind===332}function TJ(e){return e.kind===333}function SJ(e){return e.kind===319}function xJ(e){return e.kind===320}function h8(e){return e.kind===321}function wJ(e){return e.kind===322}function EJ(e){return e.kind===323}function jm(e){return e.kind===324}function CJ(e){return e.kind===325}function AJ(e){return e.kind===326}function ds(e){return e.kind===327}function jb(e){return e.kind===329}function cu(e){return e.kind===330}function Fm(e){return e.kind===335}function kJ(e){return e.kind===337}function y8(e){return e.kind===339}function DJ(e){return e.kind===345}function Fb(e){return e.kind===340}function Bb(e){return e.kind===341}function Ub(e){return e.kind===342}function qb(e){return e.kind===343}function g8(e){return e.kind===344}function zb(e){return e.kind===346}function Wb(e){return e.kind===338}function PJ(e){return e.kind===354}function b8(e){return e.kind===347}function m_(e){return e.kind===348}function Vb(e){return e.kind===349}function v8(e){return e.kind===350}function lu(e){return e.kind===351}function ts(e){return e.kind===352}function IJ(e){return e.kind===353}function NJ(e){return e.kind===334}function OJ(e){return e.kind===355}function T8(e){return e.kind===336}function Hb(e){return e.kind===357}function MJ(e){return e.kind===356}function LJ(e){return e.kind===358}var JJ=It({"src/compiler/factory/nodeTests.ts"(){"use strict";En()}});function RJ(e){return e.createExportDeclaration(void 0,!1,e.createNamedExports([]),void 0)}function Bm(e,t,n,a){if(oo(n))return We(e.createElementAccessExpression(t,n.expression),a);{let _=We(ro(n)?e.createPropertyAccessExpression(t,n):e.createElementAccessExpression(t,n),n);return addEmitFlags(_,128),_}}function Gb(e,t){let n=q_.createIdentifier(e||"React");return Qi(n,Ul(t)),n}function Xb(e,t,n){if(O_(t)){let a=Xb(e,t.left,n),_=e.createIdentifier(Lt(t.right));return _.escapedText=t.right.escapedText,e.createPropertyAccessExpression(a,_)}else return Gb(Lt(t),n)}function S8(e,t,n,a){return t?Xb(e,t,a):e.createPropertyAccessExpression(Gb(n,a),"createElement")}function jJ(e,t,n,a){return t?Xb(e,t,a):e.createPropertyAccessExpression(Gb(n,a),"Fragment")}function FJ(e,t,n,a,_,p){let m=[n];if(a&&m.push(a),_&&_.length>0)if(a||m.push(e.createNull()),_.length>1)for(let y of _)zm(y),m.push(y);else m.push(_[0]);return We(e.createCallExpression(t,void 0,m),p)}function BJ(e,t,n,a,_,p,m){let u=[jJ(e,n,a,p),e.createNull()];if(_&&_.length>0)if(_.length>1)for(let x of _)zm(x),u.push(x);else u.push(_[0]);return We(e.createCallExpression(S8(e,t,a,p),void 0,u),m)}function UJ(e,t,n){if(kb(t)){let a=pg(t.declarations),_=e.updateVariableDeclaration(a,a.name,void 0,void 0,n);return We(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[_])),t)}else{let a=We(e.createAssignment(t,n),t);return We(e.createExpressionStatement(a),t)}}function qJ(e,t,n){return au(t)?e.updateBlock(t,We(e.createNodeArray([n,...t.statements]),t.statements)):e.createBlock(e.createNodeArray([t,n]),!0)}function x8(e,t){if(O_(t)){let n=x8(e,t.left),a=Qi(We(e.cloneNode(t.right),t.right),t.right.parent);return We(e.createPropertyAccessExpression(n,a),t)}else return Qi(We(e.cloneNode(t),t),t.parent)}function w8(e,t){return Ae(t)?e.createStringLiteralFromNode(t):oo(t)?Qi(We(e.cloneNode(t.expression),t.expression),t.expression.parent):Qi(We(e.cloneNode(t),t),t.parent)}function zJ(e,t,n,a,_){let{firstAccessor:p,getAccessor:m,setAccessor:y}=J2(t,n);if(n===p)return We(e.createObjectDefinePropertyCall(a,w8(e,n.name),e.createPropertyDescriptor({enumerable:e.createFalse(),configurable:!0,get:m&&We(nr(e.createFunctionExpression(bd(m),void 0,void 0,void 0,m.parameters,void 0,m.body),m),m),set:y&&We(nr(e.createFunctionExpression(bd(y),void 0,void 0,void 0,y.parameters,void 0,y.body),y),y)},!_)),p)}function WJ(e,t,n){return nr(We(e.createAssignment(Bm(e,n,t.name,t.name),t.initializer),t),t)}function VJ(e,t,n){return nr(We(e.createAssignment(Bm(e,n,t.name,t.name),e.cloneNode(t.name)),t),t)}function HJ(e,t,n){return nr(We(e.createAssignment(Bm(e,n,t.name,t.name),nr(We(e.createFunctionExpression(bd(t),t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t)}function GJ(e,t,n,a){switch(n.name&&Vn(n.name)&&I.failBadSyntaxKind(n.name,"Private identifiers are not allowed in object literals."),n.kind){case 177:case 178:return zJ(e,t.properties,n,a,!!t.multiLine);case 303:return WJ(e,n,a);case 304:return VJ(e,n,a);case 174:return HJ(e,n,a)}}function XJ(e,t,n,a,_){let p=t.operator;I.assert(p===46||p===47,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");let m=e.createTempVariable(a);n=e.createAssignment(m,n),We(n,t.operand);let y=Mm(t)?e.createPrefixUnaryExpression(p,m):e.createPostfixUnaryExpression(m,p);return We(y,t),_&&(y=e.createAssignment(_,y),We(y,t)),n=e.createComma(n,y),We(n,t),i8(t)&&(n=e.createComma(n,m),We(n,t)),n}function $J(e){return(ai(e)&65536)!==0}function ng(e){return(ai(e)&32768)!==0}function QJ(e){return(ai(e)&16384)!==0}function E8(e){return Tr(e.expression)&&e.expression.text==="use strict"}function C8(e){for(let t of e)if(Sa(t)){if(E8(t))return t}else break}function A8(e){let t=y_(e);return t!==void 0&&Sa(t)&&E8(t)}function Um(e){return e.kind===226&&e.operatorToken.kind===28}function YJ(e){return Um(e)||j_(e)}function k8(e){return cs(e)&&Vt(e)&&!!nm(e)}function KJ(e){let t=rm(e);return I.assertIsDefined(t),t}function qm(e,t=15){switch(e.kind){case 217:return t&16&&k8(e)?!1:(t&1)!==0;case 216:case 234:case 233:case 238:return(t&2)!==0;case 235:return(t&4)!==0;case 360:return(t&8)!==0}return!1}function ms(e,t=15){for(;qm(e,t);)e=e.expression;return e}function ZJ(e,t=15){let n=e.parent;for(;qm(n,t);)n=n.parent,I.assert(n);return n}function eR(e){return ms(e,6)}function zm(e){return setStartsOnNewLine(e,!0)}function D8(e){let t=Bl(e,ci),n=t&&t.emitNode;return n&&n.externalHelpersModuleName}function tR(e){let t=Bl(e,ci),n=t&&t.emitNode;return!!n&&(!!n.externalHelpersModuleName||!!n.externalHelpers)}function nR(e,t,n,a,_,p,m){if(a.importHelpers&&e2(n,a)){let y,u=_i(a);if(u>=5&&u<=99||n.impliedNodeFormat===99){let x=getEmitHelpers(n);if(x){let d=[];for(let S of x)if(!S.scoped){let T=S.importName;T&&Ll(d,T)}if(Ze(d)){d.sort(Ii),y=e.createNamedImports(xa(d,A=>CT(n,A)?e.createImportSpecifier(!1,void 0,e.createIdentifier(A)):e.createImportSpecifier(!1,e.createIdentifier(A),t.getUnscopedHelperName(A))));let S=Bl(n,ci),T=getOrCreateEmitNode(S);T.externalHelpers=!0}}}else{let x=P8(e,n,a,_,p||m);x&&(y=e.createNamespaceImport(x))}if(y){let x=e.createImportDeclaration(void 0,e.createImportClause(!1,void 0,y),e.createStringLiteral(km),void 0);return addInternalEmitFlags(x,2),x}}}function P8(e,t,n,a,_){if(n.importHelpers&&e2(t,n)){let p=D8(t);if(p)return p;let m=_i(n),y=(a||X2(n)&&_)&&m!==4&&(m<5||t.impliedNodeFormat===1);if(!y){let u=getEmitHelpers(t);if(u){for(let x of u)if(!x.scoped){y=!0;break}}}if(y){let u=Bl(t,ci),x=getOrCreateEmitNode(u);return x.externalHelpersModuleName||(x.externalHelpersModuleName=e.createUniqueName(km))}}}function rR(e,t,n){let a=_3(t);if(a&&!c3(t)&&!IT(t)){let _=a.name;return va(_)?_:e.createIdentifier(Qo(n,_)||Lt(_))}if(t.kind===272&&t.importClause||t.kind===278&&t.moduleSpecifier)return e.getGeneratedNameForNode(t)}function iR(e,t,n,a,_,p){let m=T2(t);if(m&&Tr(m))return oR(t,a,e,_,p)||aR(e,m,n)||e.cloneNode(m)}function aR(e,t,n){let a=n.renamedDependencies&&n.renamedDependencies.get(t.text);return a?e.createStringLiteral(a):void 0}function I8(e,t,n,a){if(t){if(t.moduleName)return e.createStringLiteral(t.moduleName);if(!t.isDeclarationFile&&vm(a))return e.createStringLiteral(M2(n,t.fileName))}}function oR(e,t,n,a,_){return I8(n,a.getExternalModuleFileFromDeclaration(e),t,_)}function N8(e){if(Hg(e))return e.initializer;if(fs(e)){let t=e.initializer;return si(t,!0)?t.right:void 0}if(_u(e))return e.objectAssignmentInitializer;if(si(e,!0))return e.right;if(Eb(e))return N8(e.expression)}function Ro(e){if(Hg(e))return e.name;if(Vg(e)){switch(e.kind){case 303:return Ro(e.initializer);case 304:return e.name;case 305:return Ro(e.expression)}return}return si(e,!0)?Ro(e.left):Eb(e)?Ro(e.expression):e}function sR(e){switch(e.kind){case 169:case 208:return e.dotDotDotToken;case 230:case 305:return e}}function _R(e){let t=O8(e);return I.assert(!!t||f8(e),"Invalid property name for binding element."),t}function O8(e){switch(e.kind){case 208:if(e.propertyName){let n=e.propertyName;return Vn(n)?I.failBadSyntaxKind(n):oo(n)&&U6(n.expression)?n.expression:n}break;case 303:if(e.name){let n=e.name;return Vn(n)?I.failBadSyntaxKind(n):oo(n)&&U6(n.expression)?n.expression:n}break;case 305:return e.name&&Vn(e.name)?I.failBadSyntaxKind(e.name):e.name}let t=Ro(e);if(t&&Vl(t))return t}function U6(e){let t=e.kind;return t===11||t===9}function M8(e){switch(e.kind){case 206:case 207:case 209:return e.elements;case 210:return e.properties}}function rg(e){if(e){let t=e;for(;;){if(Ae(t)||!t.body)return Ae(t)?t:t.name;t=t.body}}}function cR(e){let t=e.kind;return t===176||t===178}function L8(e){let t=e.kind;return t===176||t===177||t===178}function lR(e){let t=e.kind;return t===303||t===304||t===262||t===176||t===181||t===175||t===282||t===243||t===264||t===265||t===266||t===267||t===271||t===272||t===270||t===278||t===277}function uR(e){let t=e.kind;return t===175||t===303||t===304||t===282||t===270}function pR(e){return Nl(e)||Nd(e)}function fR(e){return Ae(e)||Sb(e)}function dR(e){return Fx(e)||mb(e)||hb(e)}function mR(e){return Nl(e)||mb(e)||hb(e)}function hR(e){return Ae(e)||Tr(e)}function yR(e){let t=e.kind;return t===106||t===112||t===97||Fg(e)||Mm(e)}function gR(e){return e===43}function bR(e){return e===42||e===44||e===45}function vR(e){return gR(e)||bR(e)}function TR(e){return e===40||e===41}function SR(e){return TR(e)||vR(e)}function xR(e){return e===48||e===49||e===50}function $b(e){return xR(e)||SR(e)}function wR(e){return e===30||e===33||e===32||e===34||e===104||e===103}function ER(e){return wR(e)||$b(e)}function CR(e){return e===35||e===37||e===36||e===38}function AR(e){return CR(e)||ER(e)}function kR(e){return e===51||e===52||e===53}function DR(e){return kR(e)||AR(e)}function PR(e){return e===56||e===57}function IR(e){return PR(e)||DR(e)}function NR(e){return e===61||IR(e)||A_(e)}function OR(e){return NR(e)||e===28}function MR(e){return OR(e.kind)}function LR(e,t,n,a,_,p){let m=new R8(e,t,n,a,_,p);return y;function y(u,x){let d={value:void 0},S=[Md.enter],T=[u],A=[void 0],N=0;for(;S[N]!==Md.done;)N=S[N](m,N,S,T,A,d,x);return I.assertEqual(N,0),d.value}}function J8(e){return e===95||e===90}function JR(e){let t=e.kind;return J8(t)}function RR(e){let t=e.kind;return Ei(t)&&!J8(t)}function jR(e,t){if(t!==void 0)return t.length===0?t:We(e.createNodeArray([],t.hasTrailingComma),t)}function FR(e){var t;let n=e.emitNode.autoGenerate;if(n.flags&4){let a=n.id,_=e,p=_.original;for(;p;){_=p;let m=(t=_.emitNode)==null?void 0:t.autoGenerate;if(ro(_)&&(m===void 0||m.flags&4&&m.id!==a))break;p=_.original}return _}return e}function ig(e,t){return typeof e=="object"?Od(!1,e.prefix,e.node,e.suffix,t):typeof e=="string"?e.length>0&&e.charCodeAt(0)===35?e.slice(1):e:""}function BR(e,t){return typeof e=="string"?e:UR(e,I.checkDefined(t))}function UR(e,t){return Bg(e)?t(e).slice(1):va(e)?t(e):Vn(e)?e.escapedText.slice(1):Lt(e)}function Od(e,t,n,a,_){return t=ig(t,_),a=ig(a,_),n=BR(n,_),`${e?"#":""}${t}${n}${a}`}function qR(e,t,n,a){return e.updatePropertyDeclaration(t,n,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage"),void 0,void 0,a)}function zR(e,t,n,a,_=e.createThis()){return e.createGetAccessorDeclaration(n,a,[],void 0,e.createBlock([e.createReturnStatement(e.createPropertyAccessExpression(_,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")))]))}function WR(e,t,n,a,_=e.createThis()){return e.createSetAccessorDeclaration(n,a,[e.createParameterDeclaration(void 0,void 0,"value")],e.createBlock([e.createExpressionStatement(e.createAssignment(e.createPropertyAccessExpression(_,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")),e.createIdentifier("value")))]))}function VR(e){let t=e.expression;for(;;){if(t=ms(t),j_(t)){t=Ea(t.elements);continue}if(Um(t)){t=t.right;continue}if(si(t,!0)&&va(t.left))return t;break}}function HR(e){return cs(e)&&ya(e)&&!e.emitNode}function cl(e,t){if(HR(e))cl(e.expression,t);else if(Um(e))cl(e.left,t),cl(e.right,t);else if(j_(e))for(let n of e.elements)cl(n,t);else t.push(e)}function GR(e){let t=[];return cl(e,t),t}function Qb(e){if(e.transformFlags&65536)return!0;if(e.transformFlags&128)for(let t of M8(e)){let n=Ro(t);if(n&&aT(n)&&(n.transformFlags&65536||n.transformFlags&128&&Qb(n)))return!0}return!1}var Md,R8,XR=It({"src/compiler/factory/utilities.ts"(){"use strict";En(),(e=>{function t(d,S,T,A,N,q,Q){let se=S>0?N[S-1]:void 0;return I.assertEqual(T[S],t),N[S]=d.onEnter(A[S],se,Q),T[S]=y(d,t),S}e.enter=t;function n(d,S,T,A,N,q,Q){I.assertEqual(T[S],n),I.assertIsDefined(d.onLeft),T[S]=y(d,n);let se=d.onLeft(A[S].left,N[S],A[S]);return se?(x(S,A,se),u(S,T,A,N,se)):S}e.left=n;function a(d,S,T,A,N,q,Q){return I.assertEqual(T[S],a),I.assertIsDefined(d.onOperator),T[S]=y(d,a),d.onOperator(A[S].operatorToken,N[S],A[S]),S}e.operator=a;function _(d,S,T,A,N,q,Q){I.assertEqual(T[S],_),I.assertIsDefined(d.onRight),T[S]=y(d,_);let se=d.onRight(A[S].right,N[S],A[S]);return se?(x(S,A,se),u(S,T,A,N,se)):S}e.right=_;function p(d,S,T,A,N,q,Q){I.assertEqual(T[S],p),T[S]=y(d,p);let se=d.onExit(A[S],N[S]);if(S>0){if(S--,d.foldState){let fe=T[S]===p?"right":"left";N[S]=d.foldState(N[S],se,fe)}}else q.value=se;return S}e.exit=p;function m(d,S,T,A,N,q,Q){return I.assertEqual(T[S],m),S}e.done=m;function y(d,S){switch(S){case t:if(d.onLeft)return n;case n:if(d.onOperator)return a;case a:if(d.onRight)return _;case _:return p;case p:return m;case m:return m;default:I.fail("Invalid state")}}e.nextState=y;function u(d,S,T,A,N){return d++,S[d]=t,T[d]=N,A[d]=void 0,d}function x(d,S,T){if(I.shouldAssert(2))for(;d>=0;)I.assert(S[d]!==T,"Circular traversal detected."),d--}})(Md||(Md={})),R8=class{constructor(e,t,n,a,_,p){this.onEnter=e,this.onLeft=t,this.onOperator=n,this.onRight=a,this.onExit=_,this.foldState=p}}}});function We(e,t){return t?Za(e,t.pos,t.end):e}function U_(e){let t=e.kind;return t===168||t===169||t===171||t===172||t===173||t===174||t===176||t===177||t===178||t===181||t===185||t===218||t===219||t===231||t===243||t===262||t===263||t===264||t===265||t===266||t===267||t===271||t===272||t===277||t===278}function j8(e){let t=e.kind;return t===169||t===172||t===174||t===177||t===178||t===231||t===263}var $R=It({"src/compiler/factory/utilitiesPublic.ts"(){"use strict";En()}});function P(e,t){return t&&e(t)}function oe(e,t,n){if(n){if(t)return t(n);for(let a of n){let _=e(a);if(_)return _}}}function F8(e,t){return e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42&&e.charCodeAt(t+3)!==47}function gl(e){return wn(e.statements,QR)||YR(e)}function QR(e){return U_(e)&&KR(e,95)||Nb(e)&&Rm(e.moduleReference)||Ob(e)||ps(e)||F_(e)?e:void 0}function YR(e){return e.flags&8388608?B8(e):void 0}function B8(e){return ZR(e)?e:Wt(e,B8)}function KR(e,t){return Ze(e.modifiers,n=>n.kind===t)}function ZR(e){return Ab(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}function q6(e,t,n){return oe(t,n,e.typeParameters)||oe(t,n,e.parameters)||P(t,e.type)}function z6(e,t,n){return oe(t,n,e.types)}function W6(e,t,n){return P(t,e.type)}function V6(e,t,n){return oe(t,n,e.elements)}function H6(e,t,n){return P(t,e.expression)||P(t,e.questionDotToken)||oe(t,n,e.typeArguments)||oe(t,n,e.arguments)}function G6(e,t,n){return oe(t,n,e.statements)}function X6(e,t,n){return P(t,e.label)}function $6(e,t,n){return oe(t,n,e.modifiers)||P(t,e.name)||oe(t,n,e.typeParameters)||oe(t,n,e.heritageClauses)||oe(t,n,e.members)}function Q6(e,t,n){return oe(t,n,e.elements)}function Y6(e,t,n){return P(t,e.propertyName)||P(t,e.name)}function K6(e,t,n){return P(t,e.tagName)||oe(t,n,e.typeArguments)||P(t,e.attributes)}function Ao(e,t,n){return P(t,e.type)}function Z6(e,t,n){return P(t,e.tagName)||(e.isNameFirst?P(t,e.name)||P(t,e.typeExpression):P(t,e.typeExpression)||P(t,e.name))||(typeof e.comment=="string"?void 0:oe(t,n,e.comment))}function ko(e,t,n){return P(t,e.tagName)||P(t,e.typeExpression)||(typeof e.comment=="string"?void 0:oe(t,n,e.comment))}function ny(e,t,n){return P(t,e.name)}function Qa(e,t,n){return P(t,e.tagName)||(typeof e.comment=="string"?void 0:oe(t,n,e.comment))}function ej(e,t,n){return P(t,e.expression)}function Wt(e,t,n){if(e===void 0||e.kind<=165)return;let a=H8[e.kind];return a===void 0?void 0:a(e,t,n)}function ag(e,t,n){let a=ev(e),_=[];for(;_.length=0;--y)a.push(p[y]),_.push(m)}else{let y=t(p,m);if(y){if(y==="skip")continue;return y}if(p.kind>=166)for(let u of ev(p))a.push(u),_.push(p)}}}function ev(e){let t=[];return Wt(e,n,n),t;function n(a){t.unshift(a)}}function U8(e){e.externalModuleIndicator=gl(e)}function q8(e,t,n,a=!1,_){var p,m,y,u;(p=ba)==null||p.push(ba.Phase.Parse,"createSourceFile",{path:e},!0),A6("beforeParse");let x;(m=ed)==null||m.logStartParseSourceFile(e);let{languageVersion:d,setExternalModuleIndicator:S,impliedNodeFormat:T,jsDocParsingMode:A}=typeof n=="object"?n:{languageVersion:n};if(d===100)x=ri.parseSourceFile(e,t,d,void 0,a,6,gr,A);else{let N=T===void 0?S:q=>(q.impliedNodeFormat=T,(S||U8)(q));x=ri.parseSourceFile(e,t,d,void 0,a,_,N,A)}return(y=ed)==null||y.logStopParseSourceFile(),A6("afterParse"),LE("Parse","beforeParse","afterParse"),(u=ba)==null||u.pop(),x}function tj(e,t){return ri.parseIsolatedEntityName(e,t)}function nj(e,t){return ri.parseJsonText(e,t)}function ns(e){return e.externalModuleIndicator!==void 0}function Yb(e,t,n,a=!1){let _=Hf.updateSourceFile(e,t,n,a);return _.flags|=e.flags&12582912,_}function rj(e,t,n){let a=ri.JSDocParser.parseIsolatedJSDocComment(e,t,n);return a&&a.jsDoc&&ri.fixupParentReferences(a.jsDoc),a}function ij(e,t,n){return ri.JSDocParser.parseJSDocTypeExpressionForTests(e,t,n)}function z8(e){return ii(e,ub)||Na(e,".ts")&&os(e).includes(".d.")}function aj(e,t,n,a){if(e){if(e==="import")return 99;if(e==="require")return 1;a(t,n-t,B.resolution_mode_should_be_either_require_or_import)}}function W8(e,t){let n=[];for(let a of Ho(t,0)||Je){let _=t.substring(a.pos,a.end);sj(n,a,_)}e.pragmas=new Map;for(let a of n){if(e.pragmas.has(a.name)){let _=e.pragmas.get(a.name);_ instanceof Array?_.push(a.args):e.pragmas.set(a.name,[_,a.args]);continue}e.pragmas.set(a.name,a.args)}}function V8(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((n,a)=>{switch(a){case"reference":{let _=e.referencedFiles,p=e.typeReferenceDirectives,m=e.libReferenceDirectives;wn(Nf(n),y=>{let{types:u,lib:x,path:d,["resolution-mode"]:S}=y.arguments;if(y.arguments["no-default-lib"])e.hasNoDefaultLib=!0;else if(u){let T=aj(S,u.pos,u.end,t);p.push({pos:u.pos,end:u.end,fileName:u.value,...T?{resolutionMode:T}:{}})}else x?m.push({pos:x.pos,end:x.end,fileName:x.value}):d?_.push({pos:d.pos,end:d.end,fileName:d.value}):t(y.range.pos,y.range.end-y.range.pos,B.Invalid_reference_directive_syntax)});break}case"amd-dependency":{e.amdDependencies=xa(Nf(n),_=>({name:_.arguments.name,path:_.arguments.path}));break}case"amd-module":{if(n instanceof Array)for(let _ of n)e.moduleName&&t(_.range.pos,_.range.end-_.range.pos,B.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=_.arguments.name;else e.moduleName=n.arguments.name;break}case"ts-nocheck":case"ts-check":{wn(Nf(n),_=>{(!e.checkJsDirective||_.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:a==="ts-check",end:_.range.end,pos:_.range.pos})});break}case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:I.fail("Unhandled pragma kind")}})}function oj(e){if(Gf.has(e))return Gf.get(e);let t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return Gf.set(e,t),t}function sj(e,t,n){let a=t.kind===2&&G8.exec(n);if(a){let p=a[1].toLowerCase(),m=Vd[p];if(!m||!(m.kind&1))return;if(m.args){let y={};for(let u of m.args){let d=oj(u.name).exec(n);if(!d&&!u.optional)return;if(d){let S=d[2]||d[3];if(u.captureSpan){let T=t.pos+d.index+d[1].length+1;y[u.name]={value:S,pos:T,end:T+S.length}}else y[u.name]=S}}e.push({name:p,args:{arguments:y,range:t}})}else e.push({name:p,args:{arguments:{},range:t}});return}let _=t.kind===2&&X8.exec(n);if(_)return tv(e,t,2,_);if(t.kind===3){let p=/@(\S+)(\s+.*)?$/gim,m;for(;m=p.exec(n);)tv(e,t,4,m)}}function tv(e,t,n,a){if(!a)return;let _=a[1].toLowerCase(),p=Vd[_];if(!p||!(p.kind&n))return;let m=a[2],y=_j(p,m);y!=="fail"&&e.push({name:_,args:{arguments:y,range:t}})}function _j(e,t){if(!t)return{};if(!e.args)return{};let n=t.trim().split(/\s+/),a={};for(let _=0;_new(ov||(ov=Ct.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(iv||(iv=Ct.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(av||(av=Ct.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(rv||(rv=Ct.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(nv||(nv=Ct.getNodeConstructor()))(e,-1,-1)},q_=Pd(1,og),H8={166:function(t,n,a){return P(n,t.left)||P(n,t.right)},168:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.constraint)||P(n,t.default)||P(n,t.expression)},304:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||P(n,t.exclamationToken)||P(n,t.equalsToken)||P(n,t.objectAssignmentInitializer)},305:function(t,n,a){return P(n,t.expression)},169:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.dotDotDotToken)||P(n,t.name)||P(n,t.questionToken)||P(n,t.type)||P(n,t.initializer)},172:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||P(n,t.exclamationToken)||P(n,t.type)||P(n,t.initializer)},171:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||P(n,t.type)||P(n,t.initializer)},303:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||P(n,t.exclamationToken)||P(n,t.initializer)},260:function(t,n,a){return P(n,t.name)||P(n,t.exclamationToken)||P(n,t.type)||P(n,t.initializer)},208:function(t,n,a){return P(n,t.dotDotDotToken)||P(n,t.propertyName)||P(n,t.name)||P(n,t.initializer)},181:function(t,n,a){return oe(n,a,t.modifiers)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)},185:function(t,n,a){return oe(n,a,t.modifiers)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)},184:function(t,n,a){return oe(n,a,t.modifiers)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)},179:q6,180:q6,174:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.asteriskToken)||P(n,t.name)||P(n,t.questionToken)||P(n,t.exclamationToken)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},173:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)},176:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},177:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},178:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},262:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.asteriskToken)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},218:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.asteriskToken)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},219:function(t,n,a){return oe(n,a,t.modifiers)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.equalsGreaterThanToken)||P(n,t.body)},175:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.body)},183:function(t,n,a){return P(n,t.typeName)||oe(n,a,t.typeArguments)},182:function(t,n,a){return P(n,t.assertsModifier)||P(n,t.parameterName)||P(n,t.type)},186:function(t,n,a){return P(n,t.exprName)||oe(n,a,t.typeArguments)},187:function(t,n,a){return oe(n,a,t.members)},188:function(t,n,a){return P(n,t.elementType)},189:function(t,n,a){return oe(n,a,t.elements)},192:z6,193:z6,194:function(t,n,a){return P(n,t.checkType)||P(n,t.extendsType)||P(n,t.trueType)||P(n,t.falseType)},195:function(t,n,a){return P(n,t.typeParameter)},205:function(t,n,a){return P(n,t.argument)||P(n,t.attributes)||P(n,t.qualifier)||oe(n,a,t.typeArguments)},302:function(t,n,a){return P(n,t.assertClause)},196:W6,198:W6,199:function(t,n,a){return P(n,t.objectType)||P(n,t.indexType)},200:function(t,n,a){return P(n,t.readonlyToken)||P(n,t.typeParameter)||P(n,t.nameType)||P(n,t.questionToken)||P(n,t.type)||oe(n,a,t.members)},201:function(t,n,a){return P(n,t.literal)},202:function(t,n,a){return P(n,t.dotDotDotToken)||P(n,t.name)||P(n,t.questionToken)||P(n,t.type)},206:V6,207:V6,209:function(t,n,a){return oe(n,a,t.elements)},210:function(t,n,a){return oe(n,a,t.properties)},211:function(t,n,a){return P(n,t.expression)||P(n,t.questionDotToken)||P(n,t.name)},212:function(t,n,a){return P(n,t.expression)||P(n,t.questionDotToken)||P(n,t.argumentExpression)},213:H6,214:H6,215:function(t,n,a){return P(n,t.tag)||P(n,t.questionDotToken)||oe(n,a,t.typeArguments)||P(n,t.template)},216:function(t,n,a){return P(n,t.type)||P(n,t.expression)},217:function(t,n,a){return P(n,t.expression)},220:function(t,n,a){return P(n,t.expression)},221:function(t,n,a){return P(n,t.expression)},222:function(t,n,a){return P(n,t.expression)},224:function(t,n,a){return P(n,t.operand)},229:function(t,n,a){return P(n,t.asteriskToken)||P(n,t.expression)},223:function(t,n,a){return P(n,t.expression)},225:function(t,n,a){return P(n,t.operand)},226:function(t,n,a){return P(n,t.left)||P(n,t.operatorToken)||P(n,t.right)},234:function(t,n,a){return P(n,t.expression)||P(n,t.type)},235:function(t,n,a){return P(n,t.expression)},238:function(t,n,a){return P(n,t.expression)||P(n,t.type)},236:function(t,n,a){return P(n,t.name)},227:function(t,n,a){return P(n,t.condition)||P(n,t.questionToken)||P(n,t.whenTrue)||P(n,t.colonToken)||P(n,t.whenFalse)},230:function(t,n,a){return P(n,t.expression)},241:G6,268:G6,312:function(t,n,a){return oe(n,a,t.statements)||P(n,t.endOfFileToken)},243:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.declarationList)},261:function(t,n,a){return oe(n,a,t.declarations)},244:function(t,n,a){return P(n,t.expression)},245:function(t,n,a){return P(n,t.expression)||P(n,t.thenStatement)||P(n,t.elseStatement)},246:function(t,n,a){return P(n,t.statement)||P(n,t.expression)},247:function(t,n,a){return P(n,t.expression)||P(n,t.statement)},248:function(t,n,a){return P(n,t.initializer)||P(n,t.condition)||P(n,t.incrementor)||P(n,t.statement)},249:function(t,n,a){return P(n,t.initializer)||P(n,t.expression)||P(n,t.statement)},250:function(t,n,a){return P(n,t.awaitModifier)||P(n,t.initializer)||P(n,t.expression)||P(n,t.statement)},251:X6,252:X6,253:function(t,n,a){return P(n,t.expression)},254:function(t,n,a){return P(n,t.expression)||P(n,t.statement)},255:function(t,n,a){return P(n,t.expression)||P(n,t.caseBlock)},269:function(t,n,a){return oe(n,a,t.clauses)},296:function(t,n,a){return P(n,t.expression)||oe(n,a,t.statements)},297:function(t,n,a){return oe(n,a,t.statements)},256:function(t,n,a){return P(n,t.label)||P(n,t.statement)},257:function(t,n,a){return P(n,t.expression)},258:function(t,n,a){return P(n,t.tryBlock)||P(n,t.catchClause)||P(n,t.finallyBlock)},299:function(t,n,a){return P(n,t.variableDeclaration)||P(n,t.block)},170:function(t,n,a){return P(n,t.expression)},263:$6,231:$6,264:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.heritageClauses)||oe(n,a,t.members)},265:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||P(n,t.type)},266:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.members)},306:function(t,n,a){return P(n,t.name)||P(n,t.initializer)},267:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.body)},271:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.moduleReference)},272:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.importClause)||P(n,t.moduleSpecifier)||P(n,t.attributes)},273:function(t,n,a){return P(n,t.name)||P(n,t.namedBindings)},300:function(t,n,a){return oe(n,a,t.elements)},301:function(t,n,a){return P(n,t.name)||P(n,t.value)},270:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)},274:function(t,n,a){return P(n,t.name)},280:function(t,n,a){return P(n,t.name)},275:Q6,279:Q6,278:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.exportClause)||P(n,t.moduleSpecifier)||P(n,t.attributes)},276:Y6,281:Y6,277:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.expression)},228:function(t,n,a){return P(n,t.head)||oe(n,a,t.templateSpans)},239:function(t,n,a){return P(n,t.expression)||P(n,t.literal)},203:function(t,n,a){return P(n,t.head)||oe(n,a,t.templateSpans)},204:function(t,n,a){return P(n,t.type)||P(n,t.literal)},167:function(t,n,a){return P(n,t.expression)},298:function(t,n,a){return oe(n,a,t.types)},233:function(t,n,a){return P(n,t.expression)||oe(n,a,t.typeArguments)},283:function(t,n,a){return P(n,t.expression)},282:function(t,n,a){return oe(n,a,t.modifiers)},361:function(t,n,a){return oe(n,a,t.elements)},284:function(t,n,a){return P(n,t.openingElement)||oe(n,a,t.children)||P(n,t.closingElement)},288:function(t,n,a){return P(n,t.openingFragment)||oe(n,a,t.children)||P(n,t.closingFragment)},285:K6,286:K6,292:function(t,n,a){return oe(n,a,t.properties)},291:function(t,n,a){return P(n,t.name)||P(n,t.initializer)},293:function(t,n,a){return P(n,t.expression)},294:function(t,n,a){return P(n,t.dotDotDotToken)||P(n,t.expression)},287:function(t,n,a){return P(n,t.tagName)},295:function(t,n,a){return P(n,t.namespace)||P(n,t.name)},190:Ao,191:Ao,316:Ao,322:Ao,321:Ao,323:Ao,325:Ao,324:function(t,n,a){return oe(n,a,t.parameters)||P(n,t.type)},327:function(t,n,a){return(typeof t.comment=="string"?void 0:oe(n,a,t.comment))||oe(n,a,t.tags)},354:function(t,n,a){return P(n,t.tagName)||P(n,t.name)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},317:function(t,n,a){return P(n,t.name)},318:function(t,n,a){return P(n,t.left)||P(n,t.right)},348:Z6,355:Z6,337:function(t,n,a){return P(n,t.tagName)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},336:function(t,n,a){return P(n,t.tagName)||P(n,t.class)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},335:function(t,n,a){return P(n,t.tagName)||P(n,t.class)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},352:function(t,n,a){return P(n,t.tagName)||P(n,t.constraint)||oe(n,a,t.typeParameters)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},353:function(t,n,a){return P(n,t.tagName)||(t.typeExpression&&t.typeExpression.kind===316?P(n,t.typeExpression)||P(n,t.fullName)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment)):P(n,t.fullName)||P(n,t.typeExpression)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment)))},345:function(t,n,a){return P(n,t.tagName)||P(n,t.fullName)||P(n,t.typeExpression)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},349:ko,351:ko,350:ko,347:ko,357:ko,356:ko,346:ko,330:function(t,n,a){return wn(t.typeParameters,n)||wn(t.parameters,n)||P(n,t.type)},331:ny,332:ny,333:ny,329:function(t,n,a){return wn(t.jsDocPropertyTags,n)},334:Qa,339:Qa,340:Qa,341:Qa,342:Qa,343:Qa,338:Qa,344:Qa,360:ej},(e=>{var t=ss(99,!0),n=40960,a,_,p,m,y;function u(c){return Dr++,c}var x={createBaseSourceFileNode:c=>u(new y(c,0,0)),createBaseIdentifierNode:c=>u(new p(c,0,0)),createBasePrivateIdentifierNode:c=>u(new m(c,0,0)),createBaseTokenNode:c=>u(new _(c,0,0)),createBaseNode:c=>u(new a(c,0,0))},d=Pd(11,x),{createNodeArray:S,createNumericLiteral:T,createStringLiteral:A,createLiteralLikeNode:N,createIdentifier:q,createPrivateIdentifier:Q,createToken:se,createArrayLiteralExpression:fe,createObjectLiteralExpression:F,createPropertyAccessExpression:W,createPropertyAccessChain:Se,createElementAccessExpression:Qe,createElementAccessChain:Be,createCallExpression:st,createCallChain:_t,createNewExpression:hn,createParenthesizedExpression:yn,createBlock:fi,createVariableStatement:gn,createExpressionStatement:cr,createIfStatement:He,createWhileStatement:Qn,createForStatement:Gr,createForOfStatement:vt,createVariableDeclaration:Jn,createVariableDeclarationList:Ar}=d,Ht,rn,at,kr,an,xt,ut,Gt,cn,ht,Dr,Tt,Rn,yt,jn,ct,Kt=!0,Zt=!1;function lr(c,h,b,E,k=!1,J,Y,_e=0){var re;if(J=RS(c,J),J===6){let pe=Xr(c,h,b,E,k);return convertToJson(pe,(re=pe.statements[0])==null?void 0:re.expression,pe.parseDiagnostics,!1,void 0),pe.referencedFiles=Je,pe.typeReferenceDirectives=Je,pe.libReferenceDirectives=Je,pe.amdDependencies=Je,pe.hasNoDefaultLib=!1,pe.pragmas=gg,pe}Yn(c,h,b,E,J,_e);let ne=Ji(b,k,J,Y||U8,_e);return Kn(),ne}e.parseSourceFile=lr;function di(c,h){Yn("",c,h,void 0,1,0),O();let b=Ba(!0),E=f()===1&&!ut.length;return Kn(),E?b:void 0}e.parseIsolatedEntityName=di;function Xr(c,h,b=2,E,k=!1){Yn(c,h,b,E,6,0),rn=ct,O();let J=v(),Y,_e;if(f()===1)Y=zt([],J,J),_e=bn();else{let pe;for(;f()!==1;){let Oe;switch(f()){case 23:Oe=jc();break;case 112:case 97:case 106:Oe=bn();break;case 41:ve(()=>O()===9&&O()!==59)?Oe=kc():Oe=Ls();break;case 9:case 11:if(ve(()=>O()!==59)){Oe=Yr();break}default:Oe=Ls();break}pe&&$t(pe)?pe.push(Oe):pe?pe=[pe,Oe]:(pe=Oe,f()!==1&&Ne(B.Unexpected_token))}let Ue=$t(pe)?M(fe(pe),J):I.checkDefined(pe),Fe=cr(Ue);M(Fe,J),Y=zt([Fe],J),_e=Qr(1,B.Unexpected_token)}let re=ye(c,2,6,!1,Y,_e,rn,gr);k&&ie(re),re.nodeCount=Dr,re.identifierCount=Rn,re.identifiers=Tt,re.parseDiagnostics=Ya(ut,re),Gt&&(re.jsDocDiagnostics=Ya(Gt,re));let ne=re;return Kn(),ne}e.parseJsonText=Xr;function Yn(c,h,b,E,k,J){switch(a=Ct.getNodeConstructor(),_=Ct.getTokenConstructor(),p=Ct.getIdentifierConstructor(),m=Ct.getPrivateIdentifierConstructor(),y=Ct.getSourceFileConstructor(),Ht=br(c),at=h,kr=b,cn=E,an=k,xt=q0(k),ut=[],yt=0,Tt=new Map,Rn=0,Dr=0,rn=0,Kt=!0,an){case 1:case 2:ct=524288;break;case 6:ct=134742016;break;default:ct=0;break}Zt=!1,t.setText(at),t.setOnError(R),t.setScriptTarget(kr),t.setLanguageVariant(xt),t.setScriptKind(an),t.setJSDocParsingMode(J)}function Kn(){t.clearCommentDirectives(),t.setText(""),t.setOnError(void 0),t.setScriptKind(0),t.setJSDocParsingMode(0),at=void 0,kr=void 0,cn=void 0,an=void 0,xt=void 0,rn=0,ut=void 0,Gt=void 0,yt=0,Tt=void 0,jn=void 0,Kt=!0}function Ji(c,h,b,E,k){let J=z8(Ht);J&&(ct|=33554432),rn=ct,O();let Y=pr(0,Sn);I.assert(f()===1);let _e=w(),re=De(bn(),_e),ne=ye(Ht,c,b,J,Y,re,rn,E);return W8(ne,at),V8(ne,pe),ne.commentDirectives=t.getCommentDirectives(),ne.nodeCount=Dr,ne.identifierCount=Rn,ne.identifiers=Tt,ne.parseDiagnostics=Ya(ut,ne),ne.jsDocParsingMode=k,Gt&&(ne.jsDocDiagnostics=Ya(Gt,ne)),h&&ie(ne),ne;function pe(Ue,Fe,Oe){ut.push(Po(Ht,at,Ue,Fe,Oe))}}let Pr=!1;function De(c,h){if(!h)return c;I.assert(!c.jsDoc);let b=wa(UT(c,at),E=>gf.parseJSDocComment(c,E.pos,E.end-E.pos));return b.length&&(c.jsDoc=b),Pr&&(Pr=!1,c.flags|=536870912),c}function U(c){let h=cn,b=Hf.createSyntaxCursor(c);cn={currentNode:pe};let E=[],k=ut;ut=[];let J=0,Y=re(c.statements,0);for(;Y!==-1;){let Ue=c.statements[J],Fe=c.statements[Y];zn(E,c.statements,J,Y),J=ne(c.statements,Y);let Oe=ul(k,qn=>qn.start>=Ue.pos),xn=Oe>=0?ul(k,qn=>qn.start>=Fe.pos,Oe):-1;Oe>=0&&zn(ut,k,Oe,xn>=0?xn:void 0),ln(()=>{let qn=ct;for(ct|=65536,t.resetTokenState(Fe.pos),O();f()!==1;){let vi=t.getTokenFullStart(),Zr=ws(0,Sn);if(E.push(Zr),vi===t.getTokenFullStart()&&O(),J>=0){let Jr=c.statements[J];if(Zr.end===Jr.pos)break;Zr.end>Jr.pos&&(J=ne(c.statements,J+1))}}ct=qn},2),Y=J>=0?re(c.statements,J):-1}if(J>=0){let Ue=c.statements[J];zn(E,c.statements,J);let Fe=ul(k,Oe=>Oe.start>=Ue.pos);Fe>=0&&zn(ut,k,Fe)}return cn=h,d.updateSourceFile(c,We(S(E),c.statements));function _e(Ue){return!(Ue.flags&65536)&&!!(Ue.transformFlags&67108864)}function re(Ue,Fe){for(let Oe=Fe;Oe118}function Dt(){return f()===80?!0:f()===127&&er()||f()===135&&Dn()?!1:f()>118}function G(c,h,b=!0){return f()===c?(b&&O(),!0):(h?Ne(h):Ne(B._0_expected,en(c)),!1)}let La=Object.keys(pl).filter(c=>c.length>2);function Pe(c){if(r8(c)){jt(Mt(at,c.template.pos),c.template.end,B.Module_declaration_names_may_only_use_or_quoted_strings);return}let h=Ae(c)?Lt(c):void 0;if(!h||!Ig(h,kr)){Ne(B._0_expected,en(27));return}let b=Mt(at,c.pos);switch(h){case"const":case"let":case"var":jt(b,c.end,B.Variable_declaration_not_allowed_at_this_location);return;case"declare":return;case"interface":ot(B.Interface_name_cannot_be_0,B.Interface_must_be_given_a_name,19);return;case"is":jt(b,t.getTokenStart(),B.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return;case"module":case"namespace":ot(B.Namespace_name_cannot_be_0,B.Namespace_must_be_given_a_name,19);return;case"type":ot(B.Type_alias_name_cannot_be_0,B.Type_alias_must_be_given_a_name,64);return}let E=Pv(h,La,k=>k)??un(h);if(E){jt(b,c.end,B.Unknown_keyword_or_identifier_Did_you_mean_0,E);return}f()!==0&&jt(b,c.end,B.Unexpected_keyword_or_identifier)}function ot(c,h,b){f()===b?Ne(h):Ne(c,t.getTokenValue())}function un(c){for(let h of La)if(c.length>h.length+2&&Hn(c,h))return`${h} ${c.slice(h.length)}`}function ur(c,h,b){if(f()===60&&!t.hasPrecedingLineBreak()){Ne(B.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);return}if(f()===21){Ne(B.Cannot_start_a_function_call_in_a_type_annotation),O();return}if(h&&!hi()){b?Ne(B._0_expected,en(27)):Ne(B.Expected_for_property_initializer);return}if(!Ts()){if(b){Ne(B._0_expected,en(27));return}Pe(c)}}function Ja(c){return f()===c?(ue(),!0):(I.assert(jf(c)),Ne(B._0_expected,en(c)),!1)}function Nr(c,h,b,E){if(f()===h){O();return}let k=Ne(B._0_expected,en(h));b&&k&&ol(k,Po(Ht,at,E,1,B.The_parser_expected_to_find_a_1_to_match_the_0_token_here,en(c),en(h)))}function Re(c){return f()===c?(O(),!0):!1}function dt(c){if(f()===c)return bn()}function mi(c){if(f()===c)return i1()}function Qr(c,h,b){return dt(c)||Bn(c,!1,h||B._0_expected,b||en(c))}function r1(c){let h=mi(c);return h||(I.assert(jf(c)),Bn(c,!1,B._0_expected,en(c)))}function bn(){let c=v(),h=f();return O(),M(se(h),c)}function i1(){let c=v(),h=f();return ue(),M(se(h),c)}function hi(){return f()===27?!0:f()===20||f()===1||t.hasPrecedingLineBreak()}function Ts(){return hi()?(f()===27&&O(),!0):!1}function Pn(){return Ts()||G(27)}function zt(c,h,b,E){let k=S(c,E);return Za(k,h,b??t.getTokenFullStart()),k}function M(c,h,b){return Za(c,h,b??t.getTokenFullStart()),ct&&(c.flags|=ct),Zt&&(Zt=!1,c.flags|=262144),c}function Bn(c,h,b,...E){h?oa(t.getTokenFullStart(),0,b,...E):b&&Ne(b,...E);let k=v(),J=c===80?q("",void 0):wl(c)?d.createTemplateLiteralLikeNode(c,"","",void 0):c===9?T("",void 0):c===11?A("",void 0):c===282?d.createMissingDeclaration():se(c);return M(J,k)}function sa(c){let h=Tt.get(c);return h===void 0&&Tt.set(c,h=c),h}function yi(c,h,b){if(c){Rn++;let _e=v(),re=f(),ne=sa(t.getTokenValue()),pe=t.hasExtendedUnicodeEscape();return X(),M(q(ne,re,pe),_e)}if(f()===81)return Ne(b||B.Private_identifiers_are_not_allowed_outside_class_bodies),yi(!0);if(f()===0&&t.tryScan(()=>t.reScanInvalidIdentifier()===80))return yi(!0);Rn++;let E=f()===1,k=t.isReservedWord(),J=t.getTokenText(),Y=k?B.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:B.Identifier_expected;return Bn(80,E,h||Y,J)}function X_(c){return yi(Ir(),void 0,c)}function Ft(c,h){return yi(Dt(),c,h)}function vn(c){return yi(wt(f()),c)}function Ra(){return(t.hasUnicodeEscape()||t.hasExtendedUnicodeEscape())&&Ne(B.Unicode_escape_sequence_cannot_appear_here),yi(wt(f()))}function _a(){return wt(f())||f()===11||f()===9}function yu(){return wt(f())||f()===11}function a1(c){if(f()===11||f()===9){let h=Yr();return h.text=sa(h.text),h}return c&&f()===23?o1():f()===81?Ss():vn()}function ca(){return a1(!0)}function o1(){let c=v();G(23);let h=z(Bt);return G(24),M(d.createComputedPropertyName(h),c)}function Ss(){let c=v(),h=Q(sa(t.getTokenValue()));return O(),M(h,c)}function ja(c){return f()===c&&ft(gu)}function $_(){return O(),t.hasPrecedingLineBreak()?!1:gi()}function gu(){switch(f()){case 87:return O()===94;case 95:return O(),f()===90?ve(vu):f()===156?ve(s1):fo();case 90:return vu();case 126:case 139:case 153:return O(),gi();default:return $_()}}function fo(){return f()===60||f()!==42&&f()!==130&&f()!==19&&gi()}function s1(){return O(),fo()}function bu(){return Ei(f())&&ft(gu)}function gi(){return f()===23||f()===19||f()===42||f()===26||_a()}function vu(){return O(),f()===86||f()===100||f()===120||f()===60||f()===128&&ve(_h)||f()===134&&ve(Bc)}function Fa(c,h){if(Z_(c))return!0;switch(c){case 0:case 1:case 3:return!(f()===27&&h)&&Uc();case 2:return f()===84||f()===90;case 4:return ve(Hu);case 5:return ve(yh)||f()===27&&!h;case 6:return f()===23||_a();case 12:switch(f()){case 23:case 42:case 26:case 25:return!0;default:return _a()}case 18:return _a();case 9:return f()===23||f()===26||_a();case 24:return yu();case 7:return f()===19?ve(Tu):h?Dt()&&!Y_():xc()&&!Y_();case 8:return Bs();case 10:return f()===28||f()===26||Bs();case 19:return f()===103||f()===87||Dt();case 15:switch(f()){case 28:case 25:return!0}case 11:return f()===26||Ui();case 16:return ks(!1);case 17:return ks(!0);case 20:case 21:return f()===28||la();case 22:return _f();case 23:return f()===161&&ve(ph)?!1:wt(f());case 13:return wt(f())||f()===19;case 14:return!0;case 25:return!0;case 26:return I.fail("ParsingContext.Count used as a context");default:I.assertNever(c,"Non-exhaustive case in 'isListElement'.")}}function Tu(){if(I.assert(f()===19),O()===20){let c=O();return c===28||c===19||c===96||c===119}return!0}function xs(){return O(),Dt()}function Q_(){return O(),wt(f())}function _1(){return O(),Qv(f())}function Y_(){return f()===119||f()===96?ve(Su):!1}function Su(){return O(),Ui()}function xu(){return O(),la()}function ji(c){if(f()===1)return!0;switch(c){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return f()===20;case 3:return f()===20||f()===84||f()===90;case 7:return f()===19||f()===96||f()===119;case 8:return c1();case 19:return f()===32||f()===21||f()===19||f()===96||f()===119;case 11:return f()===22||f()===27;case 15:case 21:case 10:return f()===24;case 17:case 16:case 18:return f()===22||f()===24;case 20:return f()!==28;case 22:return f()===19||f()===20;case 13:return f()===32||f()===44;case 14:return f()===30&&ve(ff);default:return!1}}function c1(){return!!(hi()||Cc(f())||f()===39)}function K_(){I.assert(yt,"Missing parsing context");for(let c=0;c<26;c++)if(yt&1<=0)}function p1(c){return c===6?B.An_enum_member_name_must_be_followed_by_a_or:void 0}function Or(){let c=zt([],v());return c.isMissingList=!0,c}function f1(c){return!!c.isMissingList}function Fi(c,h,b,E){if(G(b)){let k=Tn(c,h);return G(E),k}return Or()}function Ba(c,h){let b=v(),E=c?vn(h):Ft(h);for(;Re(25)&&f()!==30;)E=M(d.createQualifiedName(E,Es(c,!1,!0)),b);return E}function ac(c,h){return M(d.createQualifiedName(c,h),c.pos)}function Es(c,h,b){if(t.hasPrecedingLineBreak()&&wt(f())&&ve(Js))return Bn(80,!0,B.Identifier_expected);if(f()===81){let E=Ss();return h?E:Bn(80,!0,B.Identifier_expected)}return c?b?vn():Ra():Ft()}function oc(c){let h=v(),b=[],E;do E=m1(c),b.push(E);while(E.literal.kind===17);return zt(b,h)}function Du(c){let h=v();return M(d.createTemplateExpression(Iu(c),oc(c)),h)}function sc(){let c=v();return M(d.createTemplateLiteralType(Iu(!1),Pu()),c)}function Pu(){let c=v(),h=[],b;do b=d1(),h.push(b);while(b.literal.kind===17);return zt(h,c)}function d1(){let c=v();return M(d.createTemplateLiteralTypeSpan(gt(),_c(!1)),c)}function _c(c){return f()===20?(xe(c),Cs()):Qr(18,B._0_expected,en(20))}function m1(c){let h=v();return M(d.createTemplateSpan(z(Bt),_c(c)),h)}function Yr(){return mo(f())}function Iu(c){!c&&t.getTokenFlags()&26656&&xe(!1);let h=mo(f());return I.assert(h.kind===16,"Template head has wrong token kind"),h}function Cs(){let c=mo(f());return I.assert(c.kind===17||c.kind===18,"Template fragment has wrong token kind"),c}function Nu(c){let h=c===15||c===18,b=t.getTokenText();return b.substring(1,b.length-(t.isUnterminated()?0:h?1:2))}function mo(c){let h=v(),b=wl(c)?d.createTemplateLiteralLikeNode(c,t.getTokenValue(),Nu(c),t.getTokenFlags()&7176):c===9?T(t.getTokenValue(),t.getNumericLiteralFlags()):c===11?A(t.getTokenValue(),void 0,t.hasExtendedUnicodeEscape()):jg(c)?N(c,t.getTokenValue()):I.fail();return t.hasExtendedUnicodeEscape()&&(b.hasExtendedUnicodeEscape=!0),t.isUnterminated()&&(b.isUnterminated=!0),O(),M(b,h)}function cc(){return Ba(!0,B.Type_expected)}function Ua(){if(!t.hasPrecedingLineBreak()&&Ye()===30)return Fi(20,gt,30,32)}function As(){let c=v();return M(d.createTypeReferenceNode(cc(),Ua()),c)}function lc(c){switch(c.kind){case 183:return Vi(c.typeName);case 184:case 185:{let{parameters:h,type:b}=c;return f1(h)||lc(b)}case 196:return lc(c.type);default:return!1}}function h1(c){return O(),M(d.createTypePredicateNode(void 0,c,gt()),c.pos)}function Ou(){let c=v();return O(),M(d.createThisTypeNode(),c)}function Mu(){let c=v();return O(),M(d.createJSDocAllType(),c)}function y1(){let c=v();return O(),M(d.createJSDocNonNullableType(np(),!1),c)}function Lu(){let c=v();return O(),f()===28||f()===20||f()===22||f()===32||f()===64||f()===52?M(d.createJSDocUnknownType(),c):M(d.createJSDocNullableType(gt(),!1),c)}function g1(){let c=v(),h=w();if(ve(zs)){O();let b=bi(36),E=Mr(59,!1);return De(M(d.createJSDocFunctionType(b,E),c),h)}return M(d.createTypeReferenceNode(vn(),void 0),c)}function Ju(){let c=v(),h;return(f()===110||f()===105)&&(h=vn(),G(59)),M(d.createParameterDeclaration(void 0,void 0,h,void 0,ho(),void 0),c)}function ho(){t.setInJSDocType(!0);let c=v();if(Re(144)){let E=d.createJSDocNamepathType(void 0);e:for(;;)switch(f()){case 20:case 1:case 28:case 5:break e;default:ue()}return t.setInJSDocType(!1),M(E,c)}let h=Re(26),b=Tc();return t.setInJSDocType(!1),h&&(b=M(d.createJSDocVariadicType(b),c)),f()===64?(O(),M(d.createJSDocOptionalType(b),c)):b}function b1(){let c=v();G(114);let h=Ba(!0),b=t.hasPrecedingLineBreak()?void 0:Xa();return M(d.createTypeQueryNode(h,b),c)}function Ru(){let c=v(),h=Lr(!1,!0),b=Ft(),E,k;Re(96)&&(la()||!Ui()?E=gt():k=Dc());let J=Re(64)?gt():void 0,Y=d.createTypeParameterDeclaration(h,b,E,J);return Y.expression=k,M(Y,c)}function fr(){if(f()===30)return Fi(19,Ru,30,32)}function ks(c){return f()===26||Bs()||Ei(f())||f()===60||la(!c)}function ju(c){let h=To(B.Private_identifiers_cannot_be_used_as_parameters);return cm(h)===0&&!Ze(c)&&Ei(f())&&O(),h}function Fu(){return Ir()||f()===23||f()===19}function uc(c){return pc(c)}function Bu(c){return pc(c,!1)}function pc(c,h=!0){let b=v(),E=w(),k=c?nt(()=>Lr(!0)):kt(()=>Lr(!0));if(f()===110){let re=d.createParameterDeclaration(k,void 0,yi(!0),void 0,Bi(),void 0),ne=y_(k);return ne&&Fn(ne,B.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),De(M(re,b),E)}let J=Kt;Kt=!1;let Y=dt(26);if(!h&&!Fu())return;let _e=De(M(d.createParameterDeclaration(k,Y,ju(k),dt(58),Bi(),qi()),b),E);return Kt=J,_e}function Mr(c,h){if(Uu(c,h))return te(Tc)}function Uu(c,h){return c===39?(G(c),!0):Re(59)?!0:h&&f()===39?(Ne(B._0_expected,en(59)),O(),!0):!1}function Ds(c,h){let b=er(),E=Dn();$e(!!(c&1)),St(!!(c&2));let k=c&32?Tn(17,Ju):Tn(16,()=>h?uc(E):Bu(E));return $e(b),St(E),k}function bi(c){if(!G(21))return Or();let h=Ds(c,!0);return G(22),h}function yo(){Re(28)||Pn()}function qu(c){let h=v(),b=w();c===180&&G(105);let E=fr(),k=bi(4),J=Mr(59,!0);yo();let Y=c===179?d.createCallSignature(E,k,J):d.createConstructSignature(E,k,J);return De(M(Y,h),b)}function zu(){return f()===23&&ve(qa)}function qa(){if(O(),f()===26||f()===24)return!0;if(Ei(f())){if(O(),Dt())return!0}else if(Dt())O();else return!1;return f()===59||f()===28?!0:f()!==58?!1:(O(),f()===59||f()===28||f()===24)}function Wu(c,h,b){let E=Fi(16,()=>uc(!1),23,24),k=Bi();yo();let J=d.createIndexSignature(b,E,k);return De(M(J,c),h)}function Vu(c,h,b){let E=ca(),k=dt(58),J;if(f()===21||f()===30){let Y=fr(),_e=bi(4),re=Mr(59,!0);J=d.createMethodSignature(b,E,k,Y,_e,re)}else{let Y=Bi();J=d.createPropertySignature(b,E,k,Y),f()===64&&(J.initializer=qi())}return yo(),De(M(J,c),h)}function Hu(){if(f()===21||f()===30||f()===139||f()===153)return!0;let c=!1;for(;Ei(f());)c=!0,O();return f()===23?!0:(_a()&&(c=!0,O()),c?f()===21||f()===30||f()===58||f()===59||f()===28||hi():!1)}function fc(){if(f()===21||f()===30)return qu(179);if(f()===105&&ve(go))return qu(180);let c=v(),h=w(),b=Lr(!1);return ja(139)?fa(c,h,b,177,4):ja(153)?fa(c,h,b,178,4):zu()?Wu(c,h,b):Vu(c,h,b)}function go(){return O(),f()===21||f()===30}function v1(){return O()===25}function dc(){switch(O()){case 21:case 30:case 25:return!0}return!1}function T1(){let c=v();return M(d.createTypeLiteralNode(mc()),c)}function mc(){let c;return G(19)?(c=pr(4,fc),G(20)):c=Or(),c}function S1(){return O(),f()===40||f()===41?O()===148:(f()===148&&O(),f()===23&&xs()&&O()===103)}function Gu(){let c=v(),h=vn();G(103);let b=gt();return M(d.createTypeParameterDeclaration(void 0,h,b,void 0),c)}function x1(){let c=v();G(19);let h;(f()===148||f()===40||f()===41)&&(h=bn(),h.kind!==148&&G(148)),G(23);let b=Gu(),E=Re(130)?gt():void 0;G(24);let k;(f()===58||f()===40||f()===41)&&(k=bn(),k.kind!==58&&G(58));let J=Bi();Pn();let Y=pr(4,fc);return G(20),M(d.createMappedTypeNode(h,b,E,k,J,Y),c)}function hc(){let c=v();if(Re(26))return M(d.createRestTypeNode(gt()),c);let h=gt();if(h8(h)&&h.pos===h.type.pos){let b=d.createOptionalTypeNode(h.type);return We(b,h),b.flags=h.flags,b}return h}function Xu(){return O()===59||f()===58&&O()===59}function $u(){return f()===26?wt(O())&&Xu():wt(f())&&Xu()}function w1(){if(ve($u)){let c=v(),h=w(),b=dt(26),E=vn(),k=dt(58);G(59);let J=hc(),Y=d.createNamedTupleMember(b,E,k,J);return De(M(Y,c),h)}return hc()}function Qu(){let c=v();return M(d.createTupleTypeNode(Fi(21,w1,23,24)),c)}function E1(){let c=v();G(21);let h=gt();return G(22),M(d.createParenthesizedType(h),c)}function Yu(){let c;if(f()===128){let h=v();O();let b=M(se(128),h);c=zt([b],h)}return c}function Ku(){let c=v(),h=w(),b=Yu(),E=Re(105);I.assert(!b||E,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");let k=fr(),J=bi(4),Y=Mr(39,!1),_e=E?d.createConstructorTypeNode(b,k,J,Y):d.createFunctionTypeNode(k,J,Y);return De(M(_e,c),h)}function yc(){let c=bn();return f()===25?void 0:c}function Zu(c){let h=v();c&&O();let b=f()===112||f()===97||f()===106?bn():mo(f());return c&&(b=M(d.createPrefixUnaryExpression(41,b),h)),M(d.createLiteralTypeNode(b),h)}function ep(){return O(),f()===102}function tp(){rn|=4194304;let c=v(),h=Re(114);G(102),G(21);let b=gt(),E;if(Re(28)){let Y=t.getTokenStart();G(19);let _e=f();if(_e===118||_e===132?O():Ne(B._0_expected,en(118)),G(59),E=Qc(_e,!0),!G(20)){let re=Pi(ut);re&&re.code===B._0_expected.code&&ol(re,Po(Ht,at,Y,1,B.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}G(22);let k=Re(25)?cc():void 0,J=Ua();return M(d.createImportTypeNode(b,E,k,J,h),c)}function gc(){return O(),f()===9||f()===10}function np(){switch(f()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return ft(yc)||As();case 67:t.reScanAsteriskEqualsToken();case 42:return Mu();case 61:t.reScanQuestionToken();case 58:return Lu();case 100:return g1();case 54:return y1();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return Zu();case 41:return ve(gc)?Zu(!0):As();case 116:return bn();case 110:{let c=Ou();return f()===142&&!t.hasPrecedingLineBreak()?h1(c):c}case 114:return ve(ep)?tp():b1();case 19:return ve(S1)?x1():T1();case 23:return Qu();case 21:return E1();case 102:return tp();case 131:return ve(Js)?lp():As();case 16:return sc();default:return As()}}function la(c){switch(f()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!c;case 41:return!c&&ve(gc);case 21:return!c&&ve(C1);default:return Dt()}}function C1(){return O(),f()===22||ks(!1)||la()}function rp(){let c=v(),h=np();for(;!t.hasPrecedingLineBreak();)switch(f()){case 54:O(),h=M(d.createJSDocNonNullableType(h,!0),c);break;case 58:if(ve(xu))return h;O(),h=M(d.createJSDocNullableType(h,!0),c);break;case 23:if(G(23),la()){let b=gt();G(24),h=M(d.createIndexedAccessTypeNode(h,b),c)}else G(24),h=M(d.createArrayTypeNode(h),c);break;default:return h}return h}function ip(c){let h=v();return G(c),M(d.createTypeOperatorNode(c,sp()),h)}function ap(){if(Re(96)){let c=Ee(gt);if(aa()||f()!==58)return c}}function A1(){let c=v(),h=Ft(),b=ft(ap),E=d.createTypeParameterDeclaration(void 0,h,b);return M(E,c)}function op(){let c=v();return G(140),M(d.createInferTypeNode(A1()),c)}function sp(){let c=f();switch(c){case 143:case 158:case 148:return ip(c);case 140:return op()}return te(rp)}function _p(c){if(vc()){let h=Ku(),b;return tu(h)?b=c?B.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:B.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:b=c?B.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:B.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,Fn(h,b),h}}function Ps(c,h,b){let E=v(),k=c===52,J=Re(c),Y=J&&_p(k)||h();if(f()===c||J){let _e=[Y];for(;Re(c);)_e.push(_p(k)||h());Y=M(b(zt(_e,E)),E)}return Y}function k1(){return Ps(51,sp,d.createIntersectionTypeNode)}function bc(){return Ps(52,k1,d.createUnionTypeNode)}function D1(){return O(),f()===105}function vc(){return f()===30||f()===21&&ve(P1)?!0:f()===105||f()===128&&ve(D1)}function cp(){if(Ei(f())&&Lr(!1),Dt()||f()===110)return O(),!0;if(f()===23||f()===19){let c=ut.length;return To(),c===ut.length}return!1}function P1(){return O(),!!(f()===22||f()===26||cp()&&(f()===59||f()===28||f()===58||f()===64||f()===22&&(O(),f()===39)))}function Tc(){let c=v(),h=Dt()&&ft(Sc),b=gt();return h?M(d.createTypePredicateNode(void 0,h,b),c):b}function Sc(){let c=Ft();if(f()===142&&!t.hasPrecedingLineBreak())return O(),c}function lp(){let c=v(),h=Qr(131),b=f()===110?Ou():Ft(),E=Re(142)?gt():void 0;return M(d.createTypePredicateNode(h,b,E),c)}function gt(){if(ct&81920)return Jt(81920,gt);if(vc())return Ku();let c=v(),h=bc();if(!aa()&&!t.hasPrecedingLineBreak()&&Re(96)){let b=Ee(gt);G(58);let E=te(gt);G(59);let k=te(gt);return M(d.createConditionalTypeNode(h,b,E,k),c)}return h}function Bi(){return Re(59)?gt():void 0}function xc(){switch(f()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return ve(dc);default:return Dt()}}function Ui(){if(xc())return!0;switch(f()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return Ac()?!0:Dt()}}function up(){return f()!==19&&f()!==100&&f()!==86&&f()!==60&&Ui()}function Bt(){let c=$r();c&&Ut(!1);let h=v(),b=on(!0),E;for(;E=dt(28);)b=Ns(b,E,on(!0),h);return c&&Ut(!0),b}function qi(){return Re(64)?on(!0):void 0}function on(c){if(I1())return N1();let h=O1(c)||mp(c);if(h)return h;let b=v(),E=w(),k=Is(0);return k.kind===80&&f()===39?wc(b,k,c,E,void 0):jo(k)&&A_(ge())?Ns(k,bn(),on(c),b):gp(k,b,c)}function I1(){return f()===127?er()?!0:ve(zp):!1}function pp(){return O(),!t.hasPrecedingLineBreak()&&Dt()}function N1(){let c=v();return O(),!t.hasPrecedingLineBreak()&&(f()===42||Ui())?M(d.createYieldExpression(dt(42),on(!0)),c):M(d.createYieldExpression(void 0,void 0),c)}function wc(c,h,b,E,k){I.assert(f()===39,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");let J=d.createParameterDeclaration(void 0,void 0,h,void 0,void 0,void 0);M(J,h.pos);let Y=zt([J],J.pos,J.end),_e=Qr(39),re=yp(!!k,b),ne=d.createArrowFunction(k,void 0,Y,void 0,_e,re);return De(M(ne,c),E)}function O1(c){let h=M1();if(h!==0)return h===1?Ec(!0,!0):ft(()=>dp(c))}function M1(){return f()===21||f()===30||f()===134?ve(fp):f()===39?1:0}function fp(){if(f()===134&&(O(),t.hasPrecedingLineBreak()||f()!==21&&f()!==30))return 0;let c=f(),h=O();if(c===21){if(h===22)switch(O()){case 39:case 59:case 19:return 1;default:return 0}if(h===23||h===19)return 2;if(h===26)return 1;if(Ei(h)&&h!==134&&ve(xs))return O()===130?0:1;if(!Dt()&&h!==110)return 0;switch(O()){case 59:return 1;case 58:return O(),f()===59||f()===28||f()===64||f()===22?1:0;case 28:case 64:case 22:return 2}return 0}else return I.assert(c===30),!Dt()&&f()!==87?0:xt===1?ve(()=>{Re(87);let E=O();if(E===96)switch(O()){case 64:case 32:case 44:return!1;default:return!0}else if(E===28||E===64)return!0;return!1})?1:0:2}function dp(c){let h=t.getTokenStart();if(jn!=null&&jn.has(h))return;let b=Ec(!1,c);return b||(jn||(jn=new Set)).add(h),b}function mp(c){if(f()===134&&ve(hp)===1){let h=v(),b=w(),E=af(),k=Is(0);return wc(h,k,c,b,E)}}function hp(){if(f()===134){if(O(),t.hasPrecedingLineBreak()||f()===39)return 0;let c=Is(0);if(!t.hasPrecedingLineBreak()&&c.kind===80&&f()===39)return 1}return 0}function Ec(c,h){let b=v(),E=w(),k=af(),J=Ze(k,_l)?2:0,Y=fr(),_e;if(G(21)){if(c)_e=Ds(J,c);else{let vi=Ds(J,c);if(!vi)return;_e=vi}if(!G(22)&&!c)return}else{if(!c)return;_e=Or()}let re=f()===59,ne=Mr(59,!1);if(ne&&!c&&lc(ne))return;let pe=ne;for(;(pe==null?void 0:pe.kind)===196;)pe=pe.type;let Ue=pe&&jm(pe);if(!c&&f()!==39&&(Ue||f()!==19))return;let Fe=f(),Oe=Qr(39),xn=Fe===39||Fe===19?yp(Ze(k,_l),h):Ft();if(!h&&re&&f()!==59)return;let qn=d.createArrowFunction(k,Y,_e,ne,Oe,xn);return De(M(qn,b),E)}function yp(c,h){if(f()===19)return bo(c?2:0);if(f()!==27&&f()!==100&&f()!==86&&Uc()&&!up())return bo(16|(c?2:0));let b=Kt;Kt=!1;let E=c?nt(()=>on(h)):kt(()=>on(h));return Kt=b,E}function gp(c,h,b){let E=dt(58);if(!E)return c;let k;return M(d.createConditionalExpression(c,E,Jt(n,()=>on(!1)),k=Qr(59),Cl(k)?on(b):Bn(80,!1,B._0_expected,en(59))),h)}function Is(c){let h=v(),b=Dc();return bp(c,b,h)}function Cc(c){return c===103||c===165}function bp(c,h,b){for(;;){ge();let E=ml(f());if(!(f()===43?E>=c:E>c)||f()===103&&Ri())break;if(f()===130||f()===152){if(t.hasPrecedingLineBreak())break;{let J=f();O(),h=J===152?L1(h,gt()):J1(h,gt())}}else h=Ns(h,bn(),Is(E),b)}return h}function Ac(){return Ri()&&f()===103?!1:ml(f())>0}function L1(c,h){return M(d.createSatisfiesExpression(c,h),c.pos)}function Ns(c,h,b,E){return M(d.createBinaryExpression(c,h,b),E)}function J1(c,h){return M(d.createAsExpression(c,h),c.pos)}function kc(){let c=v();return M(d.createPrefixUnaryExpression(f(),$(ua)),c)}function R1(){let c=v();return M(d.createDeleteExpression($(ua)),c)}function vp(){let c=v();return M(d.createTypeOfExpression($(ua)),c)}function j1(){let c=v();return M(d.createVoidExpression($(ua)),c)}function Tp(){return f()===135?Dn()?!0:ve(zp):!1}function F1(){let c=v();return M(d.createAwaitExpression($(ua)),c)}function Dc(){if(Sp()){let b=v(),E=xp();return f()===43?bp(ml(f()),E,b):E}let c=f(),h=ua();if(f()===43){let b=Mt(at,h.pos),{end:E}=h;h.kind===216?jt(b,E,B.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(I.assert(jf(c)),jt(b,E,B.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,en(c)))}return h}function ua(){switch(f()){case 40:case 41:case 55:case 54:return kc();case 91:return R1();case 114:return vp();case 116:return j1();case 30:return xt===1?Wa(!0,void 0,void 0,!0):V1();case 135:if(Tp())return F1();default:return xp()}}function Sp(){switch(f()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(xt!==1)return!1;default:return!0}}function xp(){if(f()===46||f()===47){let h=v();return M(d.createPrefixUnaryExpression(f(),$(za)),h)}else if(xt===1&&f()===30&&ve(_1))return Wa(!0);let c=za();if(I.assert(jo(c)),(f()===46||f()===47)&&!t.hasPrecedingLineBreak()){let h=f();return O(),M(d.createPostfixUnaryExpression(c,h),c.pos)}return c}function za(){let c=v(),h;return f()===102?ve(go)?(rn|=4194304,h=bn()):ve(v1)?(O(),O(),h=M(d.createMetaProperty(102,vn()),c),rn|=8388608):h=Pc():h=f()===108?Ic():Pc(),Va(c,h)}function Pc(){let c=v(),h=Op();return Ms(c,h,!0)}function Ic(){let c=v(),h=bn();if(f()===30){let b=v(),E=ft(Jc);E!==void 0&&(jt(b,v(),B.super_may_not_use_type_arguments),Un()||(h=d.createExpressionWithTypeArguments(h,E)))}return f()===21||f()===25||f()===23?h:(Qr(25,B.super_must_be_followed_by_an_argument_list_or_member_access),M(W(h,Es(!0,!0,!0)),c))}function Wa(c,h,b,E=!1){let k=v(),J=U1(c),Y;if(J.kind===286){let _e=wp(J),re,ne=_e[_e.length-1];if((ne==null?void 0:ne.kind)===284&&!Ai(ne.openingElement.tagName,ne.closingElement.tagName)&&Ai(J.tagName,ne.closingElement.tagName)){let pe=ne.children.end,Ue=M(d.createJsxElement(ne.openingElement,ne.children,M(d.createJsxClosingElement(M(q(""),pe,pe)),pe,pe)),ne.openingElement.pos,pe);_e=zt([..._e.slice(0,_e.length-1),Ue],_e.pos,pe),re=ne.closingElement}else re=W1(J,c),Ai(J.tagName,re.tagName)||(b&&Jo(b)&&Ai(re.tagName,b.tagName)?Fn(J.tagName,B.JSX_element_0_has_no_corresponding_closing_tag,n_(at,J.tagName)):Fn(re.tagName,B.Expected_corresponding_JSX_closing_tag_for_0,n_(at,J.tagName)));Y=M(d.createJsxElement(J,_e,re),k)}else J.kind===289?Y=M(d.createJsxFragment(J,wp(J),Dp(c)),k):(I.assert(J.kind===285),Y=J);if(!E&&c&&f()===30){let _e=typeof h>"u"?Y.pos:h,re=ft(()=>Wa(!0,_e));if(re){let ne=Bn(28,!1);return kd(ne,re.pos,0),jt(Mt(at,_e),re.end,B.JSX_expressions_must_have_one_parent_element),M(d.createBinaryExpression(Y,ne,re),k)}}return Y}function B1(){let c=v(),h=d.createJsxText(t.getTokenValue(),ht===13);return ht=t.scanJsxToken(),M(h,c)}function Nc(c,h){switch(h){case 1:if(Jb(c))Fn(c,B.JSX_fragment_has_no_corresponding_closing_tag);else{let b=c.tagName,E=Math.min(Mt(at,b.pos),b.end);jt(E,b.end,B.JSX_element_0_has_no_corresponding_closing_tag,n_(at,c.tagName))}return;case 31:case 7:return;case 12:case 13:return B1();case 19:return Ap(!1);case 30:return Wa(!1,void 0,c);default:return I.assertNever(h)}}function wp(c){let h=[],b=v(),E=yt;for(yt|=16384;;){let k=Nc(c,ht=t.reScanJsxToken());if(!k||(h.push(k),Jo(c)&&(k==null?void 0:k.kind)===284&&!Ai(k.openingElement.tagName,k.closingElement.tagName)&&Ai(c.tagName,k.closingElement.tagName)))break}return yt=E,zt(h,b)}function Oc(){let c=v();return M(d.createJsxAttributes(pr(13,q1)),c)}function U1(c){let h=v();if(G(30),f()===32)return Nt(),M(d.createJsxOpeningFragment(),h);let b=Ep(),E=ct&524288?void 0:Xa(),k=Oc(),J;return f()===32?(Nt(),J=d.createJsxOpeningElement(b,E,k)):(G(44),G(32,void 0,!1)&&(c?O():Nt()),J=d.createJsxSelfClosingElement(b,E,k)),M(J,h)}function Ep(){let c=v(),h=Cp();if(B_(h))return h;let b=h;for(;Re(25);)b=M(W(b,Es(!0,!1,!1)),c);return b}function Cp(){let c=v();Xe();let h=f()===110,b=Ra();return Re(59)?(Xe(),M(d.createJsxNamespacedName(b,Ra()),c)):h?M(d.createToken(110),c):b}function Ap(c){let h=v();if(!G(19))return;let b,E;return f()!==20&&(c||(b=dt(26)),E=Bt()),c?G(20):G(20,void 0,!1)&&Nt(),M(d.createJsxExpression(b,E),h)}function q1(){if(f()===19)return z1();let c=v();return M(d.createJsxAttribute(Mc(),kp()),c)}function kp(){if(f()===64){if(Xt()===11)return Yr();if(f()===19)return Ap(!0);if(f()===30)return Wa(!0);Ne(B.or_JSX_element_expected)}}function Mc(){let c=v();Xe();let h=Ra();return Re(59)?(Xe(),M(d.createJsxNamespacedName(h,Ra()),c)):h}function z1(){let c=v();G(19),G(26);let h=Bt();return G(20),M(d.createJsxSpreadAttribute(h),c)}function W1(c,h){let b=v();G(31);let E=Ep();return G(32,void 0,!1)&&(h||!Ai(c.tagName,E)?O():Nt()),M(d.createJsxClosingElement(E),b)}function Dp(c){let h=v();return G(31),G(32,B.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(c?O():Nt()),M(d.createJsxJsxClosingFragment(),h)}function V1(){I.assert(xt!==1,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");let c=v();G(30);let h=gt();G(32);let b=ua();return M(d.createTypeAssertion(h,b),c)}function Pp(){return O(),wt(f())||f()===23||Un()}function H1(){return f()===29&&ve(Pp)}function Os(c){if(c.flags&64)return!0;if(Uo(c)){let h=c.expression;for(;Uo(h)&&!(h.flags&64);)h=h.expression;if(h.flags&64){for(;Uo(c);)c.flags|=64,c=c.expression;return!0}}return!1}function G1(c,h,b){let E=Es(!0,!0,!0),k=b||Os(h),J=k?Se(h,b,E):W(h,E);if(k&&Vn(J.name)&&Fn(J.name,B.An_optional_chain_cannot_contain_private_identifiers),Cb(h)&&h.typeArguments){let Y=h.typeArguments.pos-1,_e=Mt(at,h.typeArguments.end)+1;jt(Y,_e,B.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return M(J,c)}function Ip(c,h,b){let E;if(f()===24)E=Bn(80,!0,B.An_element_access_expression_should_take_an_argument);else{let J=z(Bt);Yi(J)&&(J.text=sa(J.text)),E=J}G(24);let k=b||Os(h)?Be(h,b,E):Qe(h,E);return M(k,c)}function Ms(c,h,b){for(;;){let E,k=!1;if(b&&H1()?(E=Qr(29),k=wt(f())):k=Re(25),k){h=G1(c,h,E);continue}if((E||!$r())&&Re(23)){h=Ip(c,h,E);continue}if(Un()){h=!E&&h.kind===233?Kr(c,h.expression,E,h.typeArguments):Kr(c,h,E,void 0);continue}if(!E){if(f()===54&&!t.hasPrecedingLineBreak()){O(),h=M(d.createNonNullExpression(h),c);continue}let J=ft(Jc);if(J){h=M(d.createExpressionWithTypeArguments(h,J),c);continue}}return h}}function Un(){return f()===15||f()===16}function Kr(c,h,b,E){let k=d.createTaggedTemplateExpression(h,E,f()===15?(xe(!0),Yr()):Du(!0));return(b||h.flags&64)&&(k.flags|=64),k.questionDotToken=b,M(k,c)}function Va(c,h){for(;;){h=Ms(c,h,!0);let b,E=dt(29);if(E&&(b=ft(Jc),Un())){h=Kr(c,h,E,b);continue}if(b||f()===21){!E&&h.kind===233&&(b=h.typeArguments,h=h.expression);let k=Lc(),J=E||Os(h)?_t(h,E,b,k):st(h,b,k);h=M(J,c);continue}if(E){let k=Bn(80,!1,B.Identifier_expected);h=M(Se(h,E,k),c)}break}return h}function Lc(){G(21);let c=Tn(11,$1);return G(22),c}function Jc(){if(ct&524288||Ye()!==30)return;O();let c=Tn(20,gt);if(ge()===32)return O(),c&&Np()?c:void 0}function Np(){switch(f()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return t.hasPrecedingLineBreak()||Ac()||!Ui()}function Op(){switch(f()){case 15:t.getTokenFlags()&26656&&xe(!1);case 9:case 10:case 11:return Yr();case 110:case 108:case 106:case 112:case 97:return bn();case 21:return Mp();case 23:return jc();case 19:return Ls();case 134:if(!ve(Bc))break;return Lp();case 60:return of();case 86:return Th();case 100:return Lp();case 105:return Y1();case 44:case 69:if(Le()===14)return Yr();break;case 16:return Du(!1);case 81:return Ss()}return Ft(B.Expression_expected)}function Mp(){let c=v(),h=w();G(21);let b=z(Bt);return G(22),De(M(yn(b),c),h)}function X1(){let c=v();G(26);let h=on(!0);return M(d.createSpreadElement(h),c)}function Rc(){return f()===26?X1():f()===28?M(d.createOmittedExpression(),v()):on(!0)}function $1(){return Jt(n,Rc)}function jc(){let c=v(),h=t.getTokenStart(),b=G(23),E=t.hasPrecedingLineBreak(),k=Tn(15,Rc);return Nr(23,24,b,h),M(fe(k,E),c)}function Q1(){let c=v(),h=w();if(dt(26)){let pe=on(!0);return De(M(d.createSpreadAssignment(pe),c),h)}let b=Lr(!0);if(ja(139))return fa(c,h,b,177,0);if(ja(153))return fa(c,h,b,178,0);let E=dt(42),k=Dt(),J=ca(),Y=dt(58),_e=dt(54);if(E||f()===21||f()===30)return Hc(c,h,b,E,J,Y,_e);let re;if(k&&f()!==59){let pe=dt(64),Ue=pe?z(()=>on(!0)):void 0;re=d.createShorthandPropertyAssignment(J,Ue),re.equalsToken=pe}else{G(59);let pe=z(()=>on(!0));re=d.createPropertyAssignment(J,pe)}return re.modifiers=b,re.questionToken=Y,re.exclamationToken=_e,De(M(re,c),h)}function Ls(){let c=v(),h=t.getTokenStart(),b=G(19),E=t.hasPrecedingLineBreak(),k=Tn(12,Q1,!0);return Nr(19,20,b,h),M(F(k,E),c)}function Lp(){let c=$r();Ut(!1);let h=v(),b=w(),E=Lr(!1);G(100);let k=dt(42),J=k?1:0,Y=Ze(E,_l)?2:0,_e=J&&Y?qt(Ha):J?je(Ha):Y?nt(Ha):Ha(),re=fr(),ne=bi(J|Y),pe=Mr(59,!1),Ue=bo(J|Y);Ut(c);let Fe=d.createFunctionExpression(E,k,_e,re,ne,pe,Ue);return De(M(Fe,h),b)}function Ha(){return Ir()?X_():void 0}function Y1(){let c=v();if(G(105),Re(25)){let J=vn();return M(d.createMetaProperty(105,J),c)}let h=v(),b=Ms(h,Op(),!1),E;b.kind===233&&(E=b.typeArguments,b=b.expression),f()===29&&Ne(B.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,n_(at,b));let k=f()===21?Lc():void 0;return M(hn(b,E,k),c)}function pa(c,h){let b=v(),E=w(),k=t.getTokenStart(),J=G(19,h);if(J||c){let Y=t.hasPrecedingLineBreak(),_e=pr(1,Sn);Nr(19,20,J,k);let re=De(M(fi(_e,Y),b),E);return f()===64&&(Ne(B.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),O()),re}else{let Y=Or();return De(M(fi(Y,void 0),b),E)}}function bo(c,h){let b=er();$e(!!(c&1));let E=Dn();St(!!(c&2));let k=Kt;Kt=!1;let J=$r();J&&Ut(!1);let Y=pa(!!(c&16),h);return J&&Ut(!0),Kt=k,$e(b),St(E),Y}function K1(){let c=v(),h=w();return G(27),De(M(d.createEmptyStatement(),c),h)}function Jp(){let c=v(),h=w();G(101);let b=t.getTokenStart(),E=G(21),k=z(Bt);Nr(21,22,E,b);let J=Sn(),Y=Re(93)?Sn():void 0;return De(M(He(k,J,Y),c),h)}function Z1(){let c=v(),h=w();G(92);let b=Sn();G(117);let E=t.getTokenStart(),k=G(21),J=z(Bt);return Nr(21,22,k,E),Re(27),De(M(d.createDoStatement(b,J),c),h)}function Rp(){let c=v(),h=w();G(117);let b=t.getTokenStart(),E=G(21),k=z(Bt);Nr(21,22,E,b);let J=Sn();return De(M(Qn(k,J),c),h)}function eh(){let c=v(),h=w();G(99);let b=dt(135);G(21);let E;f()!==27&&(f()===115||f()===121||f()===87||f()===160&&ve(lh)||f()===135&&ve(qc)?E=Vc(!0):E=K(Bt));let k;if(b?G(165):Re(165)){let J=z(()=>on(!0));G(22),k=vt(b,E,J,Sn())}else if(Re(103)){let J=z(Bt);G(22),k=d.createForInStatement(E,J,Sn())}else{G(27);let J=f()!==27&&f()!==22?z(Bt):void 0;G(27);let Y=f()!==22?z(Bt):void 0;G(22),k=Gr(E,J,Y,Sn())}return De(M(k,c),h)}function Fc(c){let h=v(),b=w();G(c===252?83:88);let E=hi()?void 0:Ft();Pn();let k=c===252?d.createBreakStatement(E):d.createContinueStatement(E);return De(M(k,h),b)}function th(){let c=v(),h=w();G(107);let b=hi()?void 0:z(Bt);return Pn(),De(M(d.createReturnStatement(b),c),h)}function jp(){let c=v(),h=w();G(118);let b=t.getTokenStart(),E=G(21),k=z(Bt);Nr(21,22,E,b);let J=Rt(67108864,Sn);return De(M(d.createWithStatement(k,J),c),h)}function nh(){let c=v(),h=w();G(84);let b=z(Bt);G(59);let E=pr(3,Sn);return De(M(d.createCaseClause(b,E),c),h)}function Fp(){let c=v();G(90),G(59);let h=pr(3,Sn);return M(d.createDefaultClause(h),c)}function rh(){return f()===84?nh():Fp()}function ih(){let c=v();G(19);let h=pr(2,rh);return G(20),M(d.createCaseBlock(h),c)}function Bp(){let c=v(),h=w();G(109),G(21);let b=z(Bt);G(22);let E=ih();return De(M(d.createSwitchStatement(b,E),c),h)}function ah(){let c=v(),h=w();G(111);let b=t.hasPrecedingLineBreak()?void 0:z(Bt);return b===void 0&&(Rn++,b=M(q(""),v())),Ts()||Pe(b),De(M(d.createThrowStatement(b),c),h)}function Up(){let c=v(),h=w();G(113);let b=pa(!1),E=f()===85?oh():void 0,k;return(!E||f()===98)&&(G(98,B.catch_or_finally_expected),k=pa(!1)),De(M(d.createTryStatement(b,E,k),c),h)}function oh(){let c=v();G(85);let h;Re(21)?(h=Wc(),G(22)):h=void 0;let b=pa(!1);return M(d.createCatchClause(h,b),c)}function qp(){let c=v(),h=w();return G(89),Pn(),De(M(d.createDebuggerStatement(),c),h)}function sh(){let c=v(),h=w(),b,E=f()===21,k=z(Bt);return Ae(k)&&Re(59)?b=d.createLabeledStatement(k,Sn()):(Ts()||Pe(k),b=cr(k),E&&(h=!1)),De(M(b,c),h)}function Js(){return O(),wt(f())&&!t.hasPrecedingLineBreak()}function _h(){return O(),f()===86&&!t.hasPrecedingLineBreak()}function Bc(){return O(),f()===100&&!t.hasPrecedingLineBreak()}function zp(){return O(),(wt(f())||f()===9||f()===10||f()===11)&&!t.hasPrecedingLineBreak()}function Wp(){for(;;)switch(f()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return Hp();case 135:return zc();case 120:case 156:return pp();case 144:case 145:return $p();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:let c=f();if(O(),t.hasPrecedingLineBreak())return!1;if(c===138&&f()===156)return!0;continue;case 162:return O(),f()===19||f()===80||f()===95;case 102:return O(),f()===11||f()===42||f()===19||wt(f());case 95:let h=O();if(h===156&&(h=ve(O)),h===64||h===42||h===19||h===90||h===130||h===60)return!0;continue;case 126:O();continue;default:return!1}}function Rs(){return ve(Wp)}function Uc(){switch(f()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:return!0;case 102:return Rs()||ve(dc);case 87:case 95:return Rs();case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 129:case 125:case 123:case 124:case 126:case 148:return Rs()||!ve(Js);default:return Ui()}}function ch(){return O(),Ir()||f()===19||f()===23}function Vp(){return ve(ch)}function lh(){return js(!0)}function js(c){return O(),c&&f()===165?!1:(Ir()||f()===19)&&!t.hasPrecedingLineBreak()}function Hp(){return ve(js)}function qc(c){return O()===160?js(c):!1}function zc(){return ve(qc)}function Sn(){switch(f()){case 27:return K1();case 19:return pa(!1);case 115:return Ga(v(),w(),void 0);case 121:if(Vp())return Ga(v(),w(),void 0);break;case 135:if(zc())return Ga(v(),w(),void 0);break;case 160:if(Hp())return Ga(v(),w(),void 0);break;case 100:return Zp(v(),w(),void 0);case 86:return sf(v(),w(),void 0);case 101:return Jp();case 92:return Z1();case 117:return Rp();case 99:return eh();case 88:return Fc(251);case 83:return Fc(252);case 107:return th();case 118:return jp();case 109:return Bp();case 111:return ah();case 113:case 85:case 98:return Up();case 89:return qp();case 60:return vo();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(Rs())return vo();break}return sh()}function Gp(c){return c.kind===138}function vo(){let c=v(),h=w(),b=Lr(!0);if(Ze(b,Gp)){let k=uh(c);if(k)return k;for(let J of b)J.flags|=33554432;return Rt(33554432,()=>Xp(c,h,b))}else return Xp(c,h,b)}function uh(c){return Rt(33554432,()=>{let h=Z_(yt,c);if(h)return ec(h)})}function Xp(c,h,b){switch(f()){case 115:case 121:case 87:case 160:case 135:return Ga(c,h,b);case 100:return Zp(c,h,b);case 86:return sf(c,h,b);case 120:return Ah(c,h,b);case 156:return kh(c,h,b);case 94:return Ph(c,h,b);case 162:case 144:case 145:return uf(c,h,b);case 102:return Oh(c,h,b);case 95:switch(O(),f()){case 90:case 64:return qh(c,h,b);case 130:return Nh(c,h,b);default:return xo(c,h,b)}default:if(b){let E=Bn(282,!0,B.Declaration_expected);return Ad(E,c),E.modifiers=b,E}return}}function ph(){return O()===11}function $p(){return O(),!t.hasPrecedingLineBreak()&&(Dt()||f()===11)}function Fs(c,h){if(f()!==19){if(c&4){yo();return}if(hi()){Pn();return}}return bo(c,h)}function Qp(){let c=v();if(f()===28)return M(d.createOmittedExpression(),c);let h=dt(26),b=To(),E=qi();return M(d.createBindingElement(h,void 0,b,E),c)}function fh(){let c=v(),h=dt(26),b=Ir(),E=ca(),k;b&&f()!==59?(k=E,E=void 0):(G(59),k=To());let J=qi();return M(d.createBindingElement(h,E,k,J),c)}function Yp(){let c=v();G(19);let h=z(()=>Tn(9,fh));return G(20),M(d.createObjectBindingPattern(h),c)}function dh(){let c=v();G(23);let h=z(()=>Tn(10,Qp));return G(24),M(d.createArrayBindingPattern(h),c)}function Bs(){return f()===19||f()===23||f()===81||Ir()}function To(c){return f()===23?dh():f()===19?Yp():X_(c)}function Kp(){return Wc(!0)}function Wc(c){let h=v(),b=w(),E=To(B.Private_identifiers_are_not_allowed_in_variable_declarations),k;c&&E.kind===80&&f()===54&&!t.hasPrecedingLineBreak()&&(k=bn());let J=Bi(),Y=Cc(f())?void 0:qi(),_e=Jn(E,k,J,Y);return De(M(_e,h),b)}function Vc(c){let h=v(),b=0;switch(f()){case 115:break;case 121:b|=1;break;case 87:b|=2;break;case 160:b|=4;break;case 135:I.assert(zc()),b|=6,O();break;default:I.fail()}O();let E;if(f()===165&&ve(mh))E=Or();else{let k=Ri();tt(c),E=Tn(8,c?Wc:Kp),tt(k)}return M(Ar(E,b),h)}function mh(){return xs()&&O()===22}function Ga(c,h,b){let E=Vc(!1);Pn();let k=gn(b,E);return De(M(k,c),h)}function Zp(c,h,b){let E=Dn(),k=hr(b);G(100);let J=dt(42),Y=k&2048?Ha():X_(),_e=J?1:0,re=k&1024?2:0,ne=fr();k&32&&St(!0);let pe=bi(_e|re),Ue=Mr(59,!1),Fe=Fs(_e|re,B.or_expected);St(E);let Oe=d.createFunctionDeclaration(b,J,Y,ne,pe,Ue,Fe);return De(M(Oe,c),h)}function ef(){if(f()===137)return G(137);if(f()===11&&ve(O)===21)return ft(()=>{let c=Yr();return c.text==="constructor"?c:void 0})}function hh(c,h,b){return ft(()=>{if(ef()){let E=fr(),k=bi(0),J=Mr(59,!1),Y=Fs(0,B.or_expected),_e=d.createConstructorDeclaration(b,k,Y);return _e.typeParameters=E,_e.type=J,De(M(_e,c),h)}})}function Hc(c,h,b,E,k,J,Y,_e){let re=E?1:0,ne=Ze(b,_l)?2:0,pe=fr(),Ue=bi(re|ne),Fe=Mr(59,!1),Oe=Fs(re|ne,_e),xn=d.createMethodDeclaration(b,E,k,J,pe,Ue,Fe,Oe);return xn.exclamationToken=Y,De(M(xn,c),h)}function tf(c,h,b,E,k){let J=!k&&!t.hasPrecedingLineBreak()?dt(54):void 0,Y=Bi(),_e=Jt(90112,qi);ur(E,Y,_e);let re=d.createPropertyDeclaration(b,E,k||J,Y,_e);return De(M(re,c),h)}function Us(c,h,b){let E=dt(42),k=ca(),J=dt(58);return E||f()===21||f()===30?Hc(c,h,b,E,k,J,void 0,B.or_expected):tf(c,h,b,k,J)}function fa(c,h,b,E,k){let J=ca(),Y=fr(),_e=bi(0),re=Mr(59,!1),ne=Fs(k),pe=E===177?d.createGetAccessorDeclaration(b,J,_e,re,ne):d.createSetAccessorDeclaration(b,J,_e,ne);return pe.typeParameters=Y,Zo(pe)&&(pe.type=re),De(M(pe,c),h)}function yh(){let c;if(f()===60)return!0;for(;Ei(f());){if(c=f(),tT(c))return!0;O()}if(f()===42||(_a()&&(c=f(),O()),f()===23))return!0;if(c!==void 0){if(!ki(c)||c===153||c===139)return!0;switch(f()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return hi()}}return!1}function nf(c,h,b){Qr(126);let E=gh(),k=De(M(d.createClassStaticBlockDeclaration(E),c),h);return k.modifiers=b,k}function gh(){let c=er(),h=Dn();$e(!1),St(!0);let b=pa(!1);return $e(c),St(h),b}function bh(){if(Dn()&&f()===135){let c=v(),h=Ft(B.Expression_expected);O();let b=Ms(c,h,!0);return Va(c,b)}return za()}function Gc(){let c=v();if(!Re(60))return;let h=pt(bh);return M(d.createDecorator(h),c)}function rf(c,h,b){let E=v(),k=f();if(f()===87&&h){if(!ft($_))return}else{if(b&&f()===126&&ve(pf))return;if(c&&f()===126)return;if(!bu())return}return M(se(k),E)}function Lr(c,h,b){let E=v(),k,J,Y,_e=!1,re=!1,ne=!1;if(c&&f()===60)for(;J=Gc();)k=Et(k,J);for(;Y=rf(_e,h,b);)Y.kind===126&&(_e=!0),k=Et(k,Y),re=!0;if(re&&c&&f()===60)for(;J=Gc();)k=Et(k,J),ne=!0;if(ne)for(;Y=rf(_e,h,b);)Y.kind===126&&(_e=!0),k=Et(k,Y);return k&&zt(k,E)}function af(){let c;if(f()===134){let h=v();O();let b=M(se(134),h);c=zt([b],h)}return c}function vh(){let c=v(),h=w();if(f()===27)return O(),De(M(d.createSemicolonClassElement(),c),h);let b=Lr(!0,!0,!0);if(f()===126&&ve(pf))return nf(c,h,b);if(ja(139))return fa(c,h,b,177,0);if(ja(153))return fa(c,h,b,178,0);if(f()===137||f()===11){let E=hh(c,h,b);if(E)return E}if(zu())return Wu(c,h,b);if(wt(f())||f()===11||f()===9||f()===42||f()===23)if(Ze(b,Gp)){for(let k of b)k.flags|=33554432;return Rt(33554432,()=>Us(c,h,b))}else return Us(c,h,b);if(b){let E=Bn(80,!0,B.Declaration_expected);return tf(c,h,b,E,void 0)}return I.fail("Should not have attempted to parse class member declaration.")}function of(){let c=v(),h=w(),b=Lr(!0);if(f()===86)return qs(c,h,b,231);let E=Bn(282,!0,B.Expression_expected);return Ad(E,c),E.modifiers=b,E}function Th(){return qs(v(),w(),void 0,231)}function sf(c,h,b){return qs(c,h,b,263)}function qs(c,h,b,E){let k=Dn();G(86);let J=Sh(),Y=fr();Ze(b,jx)&&St(!0);let _e=Xc(),re;G(19)?(re=Ch(),G(20)):re=Or(),St(k);let ne=E===263?d.createClassDeclaration(b,J,Y,_e,re):d.createClassExpression(b,J,Y,_e,re);return De(M(ne,c),h)}function Sh(){return Ir()&&!xh()?yi(Ir()):void 0}function xh(){return f()===119&&ve(Q_)}function Xc(){if(_f())return pr(22,wh)}function wh(){let c=v(),h=f();I.assert(h===96||h===119),O();let b=Tn(7,Eh);return M(d.createHeritageClause(h,b),c)}function Eh(){let c=v(),h=za();if(h.kind===233)return h;let b=Xa();return M(d.createExpressionWithTypeArguments(h,b),c)}function Xa(){return f()===30?Fi(20,gt,30,32):void 0}function _f(){return f()===96||f()===119}function Ch(){return pr(5,vh)}function Ah(c,h,b){G(120);let E=Ft(),k=fr(),J=Xc(),Y=mc(),_e=d.createInterfaceDeclaration(b,E,k,J,Y);return De(M(_e,c),h)}function kh(c,h,b){G(156),t.hasPrecedingLineBreak()&&Ne(B.Line_break_not_permitted_here);let E=Ft(),k=fr();G(64);let J=f()===141&&ft(yc)||gt();Pn();let Y=d.createTypeAliasDeclaration(b,E,k,J);return De(M(Y,c),h)}function Dh(){let c=v(),h=w(),b=ca(),E=z(qi);return De(M(d.createEnumMember(b,E),c),h)}function Ph(c,h,b){G(94);let E=Ft(),k;G(19)?(k=Zn(()=>Tn(6,Dh)),G(20)):k=Or();let J=d.createEnumDeclaration(b,E,k);return De(M(J,c),h)}function cf(){let c=v(),h;return G(19)?(h=pr(1,Sn),G(20)):h=Or(),M(d.createModuleBlock(h),c)}function lf(c,h,b,E){let k=E&32,J=E&8?vn():Ft(),Y=Re(25)?lf(v(),!1,void 0,8|k):cf(),_e=d.createModuleDeclaration(b,J,Y,E);return De(M(_e,c),h)}function $c(c,h,b){let E=0,k;f()===162?(k=Ft(),E|=2048):(k=Yr(),k.text=sa(k.text));let J;f()===19?J=cf():Pn();let Y=d.createModuleDeclaration(b,k,J,E);return De(M(Y,c),h)}function uf(c,h,b){let E=0;if(f()===162)return $c(c,h,b);if(Re(145))E|=32;else if(G(144),f()===11)return $c(c,h,b);return lf(c,h,b,E)}function Ih(){return f()===149&&ve(zs)}function zs(){return O()===21}function pf(){return O()===19}function ff(){return O()===44}function Nh(c,h,b){G(130),G(145);let E=Ft();Pn();let k=d.createNamespaceExportDeclaration(E);return k.modifiers=b,De(M(k,c),h)}function Oh(c,h,b){G(102);let E=t.getTokenFullStart(),k;Dt()&&(k=Ft());let J=!1;if(f()!==161&&(k==null?void 0:k.escapedText)==="type"&&(Dt()||Lh())&&(J=!0,k=Dt()?Ft():void 0),k&&!Yc())return Jh(c,h,b,k,J);let Y;(k||f()===42||f()===19)&&(Y=Rh(k,E,J),G(161));let _e=Ws(),re=f(),ne;(re===118||re===132)&&!t.hasPrecedingLineBreak()&&(ne=Qc(re)),Pn();let pe=d.createImportDeclaration(b,Y,_e,ne);return De(M(pe,c),h)}function Mh(){let c=v(),h=wt(f())?vn():mo(11);G(59);let b=on(!0);return M(d.createImportAttribute(h,b),c)}function Qc(c,h){let b=v();h||G(c);let E=t.getTokenStart();if(G(19)){let k=t.hasPrecedingLineBreak(),J=Tn(24,Mh,!0);if(!G(20)){let Y=Pi(ut);Y&&Y.code===B._0_expected.code&&ol(Y,Po(Ht,at,E,1,B.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return M(d.createImportAttributes(J,k,c),b)}else{let k=zt([],v(),void 0,!1);return M(d.createImportAttributes(k,!1,c),b)}}function Lh(){return f()===42||f()===19}function Yc(){return f()===28||f()===161}function Jh(c,h,b,E,k){G(64);let J=So();Pn();let Y=d.createImportEqualsDeclaration(b,k,E,J);return De(M(Y,c),h)}function Rh(c,h,b){let E;return(!c||Re(28))&&(E=f()===42?Fh():df(275)),M(d.createImportClause(b,c,E),h)}function So(){return Ih()?jh():Ba(!1)}function jh(){let c=v();G(149),G(21);let h=Ws();return G(22),M(d.createExternalModuleReference(h),c)}function Ws(){if(f()===11){let c=Yr();return c.text=sa(c.text),c}else return Bt()}function Fh(){let c=v();G(42),G(130);let h=Ft();return M(d.createNamespaceImport(h),c)}function df(c){let h=v(),b=c===275?d.createNamedImports(Fi(23,Bh,19,20)):d.createNamedExports(Fi(23,da,19,20));return M(b,h)}function da(){let c=w();return De(mf(281),c)}function Bh(){return mf(276)}function mf(c){let h=v(),b=ki(f())&&!Dt(),E=t.getTokenStart(),k=t.getTokenEnd(),J=!1,Y,_e=!0,re=vn();if(re.escapedText==="type")if(f()===130){let Ue=vn();if(f()===130){let Fe=vn();wt(f())?(J=!0,Y=Ue,re=pe(),_e=!1):(Y=re,re=Fe,_e=!1)}else wt(f())?(Y=re,_e=!1,re=pe()):(J=!0,re=Ue)}else wt(f())&&(J=!0,re=pe());_e&&f()===130&&(Y=re,G(130),re=pe()),c===276&&b&&jt(E,k,B.Identifier_expected);let ne=c===276?d.createImportSpecifier(J,Y,re):d.createExportSpecifier(J,Y,re);return M(ne,h);function pe(){return b=ki(f())&&!Dt(),E=t.getTokenStart(),k=t.getTokenEnd(),vn()}}function Uh(c){return M(d.createNamespaceExport(vn()),c)}function xo(c,h,b){let E=Dn();St(!0);let k,J,Y,_e=Re(156),re=v();Re(42)?(Re(130)&&(k=Uh(re)),G(161),J=Ws()):(k=df(279),(f()===161||f()===11&&!t.hasPrecedingLineBreak())&&(G(161),J=Ws()));let ne=f();J&&(ne===118||ne===132)&&!t.hasPrecedingLineBreak()&&(Y=Qc(ne)),Pn(),St(E);let pe=d.createExportDeclaration(b,_e,k,J,Y);return De(M(pe,c),h)}function qh(c,h,b){let E=Dn();St(!0);let k;Re(64)?k=!0:G(90);let J=on(!0);Pn(),St(E);let Y=d.createExportAssignment(b,k,J);return De(M(Y,c),h)}let hf;(c=>{c[c.SourceElements=0]="SourceElements",c[c.BlockStatements=1]="BlockStatements",c[c.SwitchClauses=2]="SwitchClauses",c[c.SwitchClauseStatements=3]="SwitchClauseStatements",c[c.TypeMembers=4]="TypeMembers",c[c.ClassMembers=5]="ClassMembers",c[c.EnumMembers=6]="EnumMembers",c[c.HeritageClauseElement=7]="HeritageClauseElement",c[c.VariableDeclarations=8]="VariableDeclarations",c[c.ObjectBindingElements=9]="ObjectBindingElements",c[c.ArrayBindingElements=10]="ArrayBindingElements",c[c.ArgumentExpressions=11]="ArgumentExpressions",c[c.ObjectLiteralMembers=12]="ObjectLiteralMembers",c[c.JsxAttributes=13]="JsxAttributes",c[c.JsxChildren=14]="JsxChildren",c[c.ArrayLiteralMembers=15]="ArrayLiteralMembers",c[c.Parameters=16]="Parameters",c[c.JSDocParameters=17]="JSDocParameters",c[c.RestProperties=18]="RestProperties",c[c.TypeParameters=19]="TypeParameters",c[c.TypeArguments=20]="TypeArguments",c[c.TupleElementTypes=21]="TupleElementTypes",c[c.HeritageClauses=22]="HeritageClauses",c[c.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",c[c.ImportAttributes=24]="ImportAttributes",c[c.JSDocComment=25]="JSDocComment",c[c.Count=26]="Count"})(hf||(hf={}));let yf;(c=>{c[c.False=0]="False",c[c.True=1]="True",c[c.Unknown=2]="Unknown"})(yf||(yf={}));let gf;(c=>{function h(ne,pe,Ue){Yn("file.js",ne,99,void 0,1,0),t.setText(ne,pe,Ue),ht=t.scan();let Fe=b(),Oe=ye("file.js",99,1,!1,[],se(1),0,gr),xn=Ya(ut,Oe);return Gt&&(Oe.jsDocDiagnostics=Ya(Gt,Oe)),Kn(),Fe?{jsDocTypeExpression:Fe,diagnostics:xn}:void 0}c.parseJSDocTypeExpressionForTests=h;function b(ne){let pe=v(),Ue=(ne?Re:G)(19),Fe=Rt(16777216,ho);(!ne||Ue)&&Ja(20);let Oe=d.createJSDocTypeExpression(Fe);return ie(Oe),M(Oe,pe)}c.parseJSDocTypeExpression=b;function E(){let ne=v(),pe=Re(19),Ue=v(),Fe=Ba(!1);for(;f()===81;)Ge(),ue(),Fe=M(d.createJSDocMemberName(Fe,Ft()),Ue);pe&&Ja(20);let Oe=d.createJSDocNameReference(Fe);return ie(Oe),M(Oe,ne)}c.parseJSDocNameReference=E;function k(ne,pe,Ue){Yn("",ne,99,void 0,1,0);let Fe=Rt(16777216,()=>re(pe,Ue)),xn=Ya(ut,{languageVariant:0,text:ne});return Kn(),Fe?{jsDoc:Fe,diagnostics:xn}:void 0}c.parseIsolatedJSDocComment=k;function J(ne,pe,Ue){let Fe=ht,Oe=ut.length,xn=Zt,qn=Rt(16777216,()=>re(pe,Ue));return Qi(qn,ne),ct&524288&&(Gt||(Gt=[]),Gt.push(...ut)),ht=Fe,ut.length=Oe,Zt=xn,qn}c.parseJSDocComment=J;let Y;(ne=>{ne[ne.BeginningOfLine=0]="BeginningOfLine",ne[ne.SawAsterisk=1]="SawAsterisk",ne[ne.SavingComments=2]="SavingComments",ne[ne.SavingBackticks=3]="SavingBackticks"})(Y||(Y={}));let _e;(ne=>{ne[ne.Property=1]="Property",ne[ne.Parameter=2]="Parameter",ne[ne.CallbackParameter=4]="CallbackParameter"})(_e||(_e={}));function re(ne=0,pe){let Ue=at,Fe=pe===void 0?Ue.length:ne+pe;if(pe=Fe-ne,I.assert(ne>=0),I.assert(ne<=Fe),I.assert(Fe<=Ue.length),!F8(Ue,ne))return;let Oe,xn,qn,vi,Zr,Jr=[],ma=[],zh=yt;yt|=1<<25;let Kc=t.scanRange(ne+3,pe-5,bf);return yt=zh,Kc;function bf(){let j=1,ee,Z=ne-(Ue.lastIndexOf(` +`,ne)+1)+4;function ae(qe){ee||(ee=Z),Jr.push(qe),Z+=qe.length}for(ue();Co(5););Co(4)&&(j=0,Z=0);e:for(;;){switch(f()){case 60:Wh(Jr),Zr||(Zr=v()),Vh(Tf(Z)),j=0,ee=void 0;break;case 4:Jr.push(t.getTokenText()),j=0,Z=0;break;case 42:let qe=t.getTokenText();j===1?(j=2,ae(qe)):(I.assert(j===0),j=1,Z+=qe.length);break;case 5:I.assert(j!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let Pt=t.getTokenText();ee!==void 0&&Z+Pt.length>ee&&Jr.push(Pt.slice(ee-Z)),Z+=Pt.length;break;case 1:break e;case 82:j=2,ae(t.getTokenValue());break;case 19:j=2;let Rr=t.getTokenFullStart(),dr=t.getTokenEnd()-1,Nn=Ie(dr);if(Nn){vi||Zc(Jr),ma.push(M(d.createJSDocText(Jr.join("")),vi??ne,Rr)),ma.push(Nn),Jr=[],vi=t.getTokenEnd();break}default:j=2,ae(t.getTokenText());break}j===2?be(!1):ue()}let ce=Jr.join("").trimEnd();ma.length&&ce.length&&ma.push(M(d.createJSDocText(ce),vi??ne,Zr)),ma.length&&Oe&&I.assertIsDefined(Zr,"having parsed tags implies that the end of the comment span should be set");let Me=Oe&&zt(Oe,xn,qn);return M(d.createJSDocComment(ma.length?zt(ma,ne,Zr):ce.length?ce:void 0,Me),ne,Fe)}function Zc(j){for(;j.length&&(j[0]===` +`||j[0]==="\r");)j.shift()}function Wh(j){for(;j.length;){let ee=j[j.length-1].trimEnd();if(ee==="")j.pop();else if(ee.lengthPt&&(ae.push(ei.slice(Pt-j)),qe=2),j+=ei.length;break;case 19:qe=2;let Sf=t.getTokenFullStart(),Gs=t.getTokenEnd()-1,xf=Ie(Gs);xf?(ce.push(M(d.createJSDocText(ae.join("")),Me??Z,Sf)),ce.push(xf),ae=[],Me=t.getTokenEnd()):Rr(t.getTokenText());break;case 62:qe===3?qe=2:qe=3,Rr(t.getTokenText());break;case 82:qe!==3&&(qe=2),Rr(t.getTokenValue());break;case 42:if(qe===0){qe=1,j+=1;break}default:qe!==3&&(qe=2),Rr(t.getTokenText());break}qe===2||qe===3?dr=be(qe===3):dr=ue()}Zc(ae);let Nn=ae.join("").trimEnd();if(ce.length)return Nn.length&&ce.push(M(d.createJSDocText(Nn),Me??Z)),zt(ce,Z,t.getTokenEnd());if(Nn.length)return Nn}function Ie(j){let ee=ft(Ke);if(!ee)return;ue(),pn();let Z=v(),ae=wt(f())?Ba(!0):void 0;if(ae)for(;f()===81;)Ge(),ue(),ae=M(d.createJSDocMemberName(ae,Ft()),Z);let ce=[];for(;f()!==20&&f()!==4&&f()!==1;)ce.push(t.getTokenText()),ue();let Me=ee==="link"?d.createJSDocLink:ee==="linkcode"?d.createJSDocLinkCode:d.createJSDocLinkPlain;return M(Me(ae,ce.join("")),j,t.getTokenEnd())}function Ke(){if(zi(),f()===19&&ue()===60&&wt(ue())){let j=t.getTokenValue();if(Ti(j))return j}}function Ti(j){return j==="link"||j==="linkcode"||j==="linkplain"}function Hs(j,ee,Z,ae){return M(d.createJSDocUnknownTag(ee,fn(j,v(),Z,ae)),j)}function Vh(j){j&&(Oe?Oe.push(j):(Oe=[j],xn=j.pos),qn=j.end)}function tr(){return zi(),f()===19?b():void 0}function Hh(){let j=Co(23);j&&pn();let ee=Co(62),Z=z5();return ee&&r1(62),j&&(pn(),dt(64)&&Bt(),G(24)),{name:Z,isBracketed:j}}function r(j){switch(j.kind){case 151:return!0;case 188:return r(j.elementType);default:return J_(j)&&Ae(j.typeName)&&j.typeName.escapedText==="Object"&&!j.typeArguments}}function o(j,ee,Z,ae){let ce=tr(),Me=!ce;zi();let{name:qe,isBracketed:Pt}=Hh(),Rr=zi();Me&&!ve(Ke)&&(ce=tr());let dr=fn(j,v(),ae,Rr),Nn=s(ce,qe,Z,ae);Nn&&(ce=Nn,Me=!0);let ei=Z===1?d.createJSDocPropertyTag(ee,qe,Pt,ce,Me,dr):d.createJSDocParameterTag(ee,qe,Pt,ce,Me,dr);return M(ei,j)}function s(j,ee,Z,ae){if(j&&r(j.type)){let ce=v(),Me,qe;for(;Me=ft(()=>Xh(Z,ae,ee));)Me.kind===348||Me.kind===355?qe=Et(qe,Me):Me.kind===352&&Fn(Me.tagName,B.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(qe){let Pt=M(d.createJSDocTypeLiteral(qe,j.type.kind===188),ce);return M(d.createJSDocTypeExpression(Pt),ce)}}}function l(j,ee,Z,ae){Ze(Oe,Vb)&&jt(ee.pos,t.getTokenStart(),B._0_tag_already_specified,Go(ee.escapedText));let ce=tr();return M(d.createJSDocReturnTag(ee,ce,fn(j,v(),Z,ae)),j)}function g(j,ee,Z,ae){Ze(Oe,lu)&&jt(ee.pos,t.getTokenStart(),B._0_tag_already_specified,Go(ee.escapedText));let ce=b(!0),Me=Z!==void 0&&ae!==void 0?fn(j,v(),Z,ae):void 0;return M(d.createJSDocTypeTag(ee,ce,Me),j)}function D(j,ee,Z,ae){let Me=f()===23||ve(()=>ue()===60&&wt(ue())&&Ti(t.getTokenValue()))?void 0:E(),qe=Z!==void 0&&ae!==void 0?fn(j,v(),Z,ae):void 0;return M(d.createJSDocSeeTag(ee,Me,qe),j)}function H(j,ee,Z,ae){let ce=tr(),Me=fn(j,v(),Z,ae);return M(d.createJSDocThrowsTag(ee,ce,Me),j)}function me(j,ee,Z,ae){let ce=v(),Me=ze(),qe=t.getTokenFullStart(),Pt=fn(j,qe,Z,ae);Pt||(qe=t.getTokenFullStart());let Rr=typeof Pt!="string"?zt(h_([M(Me,ce,qe)],Pt),ce):Me.text+Pt;return M(d.createJSDocAuthorTag(ee,Rr),j)}function ze(){let j=[],ee=!1,Z=t.getToken();for(;Z!==1&&Z!==4;){if(Z===30)ee=!0;else{if(Z===60&&!ee)break;if(Z===32&&ee){j.push(t.getTokenText()),t.resetTokenState(t.getTokenEnd());break}}j.push(t.getTokenText()),Z=ue()}return d.createJSDocText(j.join(""))}function In(j,ee,Z,ae){let ce=wo();return M(d.createJSDocImplementsTag(ee,ce,fn(j,v(),Z,ae)),j)}function Si(j,ee,Z,ae){let ce=wo();return M(d.createJSDocAugmentsTag(ee,ce,fn(j,v(),Z,ae)),j)}function xi(j,ee,Z,ae){let ce=b(!1),Me=Z!==void 0&&ae!==void 0?fn(j,v(),Z,ae):void 0;return M(d.createJSDocSatisfiesTag(ee,ce,Me),j)}function wo(){let j=Re(19),ee=v(),Z=I5();t.setInJSDocType(!0);let ae=Xa();t.setInJSDocType(!1);let ce=d.createExpressionWithTypeArguments(Z,ae),Me=M(ce,ee);return j&&G(20),Me}function I5(){let j=v(),ee=$a();for(;Re(25);){let Z=$a();ee=M(W(ee,Z),j)}return ee}function Eo(j,ee,Z,ae,ce){return M(ee(Z,fn(j,v(),ae,ce)),j)}function N5(j,ee,Z,ae){let ce=b(!0);return pn(),M(d.createJSDocThisTag(ee,ce,fn(j,v(),Z,ae)),j)}function O5(j,ee,Z,ae){let ce=b(!0);return pn(),M(d.createJSDocEnumTag(ee,ce,fn(j,v(),Z,ae)),j)}function M5(j,ee,Z,ae){let ce=tr();zi();let Me=Gh();pn();let qe=Vs(Z),Pt;if(!ce||r(ce.type)){let dr,Nn,ei,Sf=!1;for(;(dr=ft(()=>F5(Z)))&&dr.kind!==352;)if(Sf=!0,dr.kind===351)if(Nn){let Gs=Ne(B.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);Gs&&ol(Gs,Po(Ht,at,0,0,B.The_tag_was_first_specified_here));break}else Nn=dr;else ei=Et(ei,dr);if(Sf){let Gs=ce&&ce.type.kind===188,xf=d.createJSDocTypeLiteral(ei,Gs);ce=Nn&&Nn.typeExpression&&!r(Nn.typeExpression.type)?Nn.typeExpression:M(xf,j),Pt=ce.end}}Pt=Pt||qe!==void 0?v():(Me??ce??ee).end,qe||(qe=fn(j,Pt,Z,ae));let Rr=d.createJSDocTypedefTag(ee,ce,Me,qe);return M(Rr,j,Pt)}function Gh(j){let ee=t.getTokenStart();if(!wt(f()))return;let Z=$a();if(Re(25)){let ae=Gh(!0),ce=d.createModuleDeclaration(void 0,Z,ae,j?8:void 0);return M(ce,ee)}return j&&(Z.flags|=4096),Z}function L5(j){let ee=v(),Z,ae;for(;Z=ft(()=>Xh(4,j));){if(Z.kind===352){Fn(Z.tagName,B.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}ae=Et(ae,Z)}return zt(ae||[],ee)}function x6(j,ee){let Z=L5(ee),ae=ft(()=>{if(Co(60)){let ce=Tf(ee);if(ce&&ce.kind===349)return ce}});return M(d.createJSDocSignature(void 0,Z,ae),j)}function J5(j,ee,Z,ae){let ce=Gh();pn();let Me=Vs(Z),qe=x6(j,Z);Me||(Me=fn(j,v(),Z,ae));let Pt=Me!==void 0?v():qe.end;return M(d.createJSDocCallbackTag(ee,qe,ce,Me),j,Pt)}function R5(j,ee,Z,ae){pn();let ce=Vs(Z),Me=x6(j,Z);ce||(ce=fn(j,v(),Z,ae));let qe=ce!==void 0?v():Me.end;return M(d.createJSDocOverloadTag(ee,Me,ce),j,qe)}function j5(j,ee){for(;!Ae(j)||!Ae(ee);)if(!Ae(j)&&!Ae(ee)&&j.right.escapedText===ee.right.escapedText)j=j.left,ee=ee.left;else return!1;return j.escapedText===ee.escapedText}function F5(j){return Xh(1,j)}function Xh(j,ee,Z){let ae=!0,ce=!1;for(;;)switch(ue()){case 60:if(ae){let Me=B5(j,ee);return Me&&(Me.kind===348||Me.kind===355)&&Z&&(Ae(Me.name)||!j5(Z,Me.name.left))?!1:Me}ce=!1;break;case 4:ae=!0,ce=!1;break;case 42:ce&&(ae=!1),ce=!0;break;case 80:ae=!1;break;case 1:return!1}}function B5(j,ee){I.assert(f()===60);let Z=t.getTokenFullStart();ue();let ae=$a(),ce=zi(),Me;switch(ae.escapedText){case"type":return j===1&&g(Z,ae);case"prop":case"property":Me=1;break;case"arg":case"argument":case"param":Me=6;break;case"template":return w6(Z,ae,ee,ce);default:return!1}return j&Me?o(Z,ae,j,ee):!1}function U5(){let j=v(),ee=Co(23);ee&&pn();let Z=$a(B.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),ae;if(ee&&(pn(),G(64),ae=Rt(16777216,ho),G(24)),!Vi(Z))return M(d.createTypeParameterDeclaration(void 0,Z,void 0,ae),j)}function q5(){let j=v(),ee=[];do{pn();let Z=U5();Z!==void 0&&ee.push(Z),zi()}while(Co(28));return zt(ee,j)}function w6(j,ee,Z,ae){let ce=f()===19?b():void 0,Me=q5();return M(d.createJSDocTemplateTag(ee,ce,Me,fn(j,v(),Z,ae)),j)}function Co(j){return f()===j?(ue(),!0):!1}function z5(){let j=$a();for(Re(23)&&G(24);Re(25);){let ee=$a();Re(23)&&G(24),j=ac(j,ee)}return j}function $a(j){if(!wt(f()))return Bn(80,!j,j||B.Identifier_expected);Rn++;let ee=t.getTokenStart(),Z=t.getTokenEnd(),ae=f(),ce=sa(t.getTokenValue()),Me=M(q(ce,ae),ee,Z);return ue(),Me}}})(gf=e.JSDocParser||(e.JSDocParser={}))})(ri||(ri={})),(e=>{function t(A,N,q,Q){if(Q=Q||I.shouldAssert(2),d(A,N,q,Q),b4(q))return A;if(A.statements.length===0)return ri.parseSourceFile(A.fileName,N,A.languageVersion,void 0,!0,A.scriptKind,A.setExternalModuleIndicator,A.jsDocParsingMode);let se=A;I.assert(!se.hasBeenIncrementallyParsed),se.hasBeenIncrementallyParsed=!0,ri.fixupParentReferences(se);let fe=A.text,F=S(A),W=u(A,q);d(A,N,W,Q),I.assert(W.span.start<=q.span.start),I.assert(tn(W.span)===tn(q.span)),I.assert(tn(Ys(W))===tn(Ys(q)));let Se=Ys(W).length-W.span.length;y(se,W.span.start,tn(W.span),tn(Ys(W)),Se,fe,N,Q);let Qe=ri.parseSourceFile(A.fileName,N,A.languageVersion,F,!0,A.scriptKind,A.setExternalModuleIndicator,A.jsDocParsingMode);return Qe.commentDirectives=n(A.commentDirectives,Qe.commentDirectives,W.span.start,tn(W.span),Se,fe,N,Q),Qe.impliedNodeFormat=A.impliedNodeFormat,Qe}e.updateSourceFile=t;function n(A,N,q,Q,se,fe,F,W){if(!A)return N;let Se,Qe=!1;for(let st of A){let{range:_t,type:hn}=st;if(_t.endQ){Be();let yn={range:{pos:_t.pos+se,end:_t.end+se},type:hn};Se=Et(Se,yn),W&&I.assert(fe.substring(_t.pos,_t.end)===F.substring(yn.range.pos,yn.range.end))}}return Be(),Se;function Be(){Qe||(Qe=!0,Se?N&&Se.push(...N):Se=N)}}function a(A,N,q,Q,se,fe){N?W(A):F(A);return;function F(Se){let Qe="";if(fe&&_(Se)&&(Qe=Q.substring(Se.pos,Se.end)),Se._children&&(Se._children=void 0),Za(Se,Se.pos+q,Se.end+q),fe&&_(Se)&&I.assert(Qe===se.substring(Se.pos,Se.end)),Wt(Se,F,W),Hi(Se))for(let Be of Se.jsDoc)F(Be);m(Se,fe)}function W(Se){Se._children=void 0,Za(Se,Se.pos+q,Se.end+q);for(let Qe of Se)F(Qe)}}function _(A){switch(A.kind){case 11:case 9:case 80:return!0}return!1}function p(A,N,q,Q,se){I.assert(A.end>=N,"Adjusting an element that was entirely before the change range"),I.assert(A.pos<=q,"Adjusting an element that was entirely after the change range"),I.assert(A.pos<=A.end);let fe=Math.min(A.pos,Q),F=A.end>=q?A.end+se:Math.min(A.end,Q);I.assert(fe<=F),A.parent&&(I.assertGreaterThanOrEqual(fe,A.parent.pos),I.assertLessThanOrEqual(F,A.parent.end)),Za(A,fe,F)}function m(A,N){if(N){let q=A.pos,Q=se=>{I.assert(se.pos>=q),q=se.end};if(Hi(A))for(let se of A.jsDoc)Q(se);Wt(A,Q),I.assert(q<=A.end)}}function y(A,N,q,Q,se,fe,F,W){Se(A);return;function Se(Be){if(I.assert(Be.pos<=Be.end),Be.pos>q){a(Be,!1,se,fe,F,W);return}let st=Be.end;if(st>=N){if(Be.intersectsChange=!0,Be._children=void 0,p(Be,N,q,Q,se),Wt(Be,Se,Qe),Hi(Be))for(let _t of Be.jsDoc)Se(_t);m(Be,W);return}I.assert(stq){a(Be,!0,se,fe,F,W);return}let st=Be.end;if(st>=N){Be.intersectsChange=!0,Be._children=void 0,p(Be,N,q,Q,se);for(let _t of Be)Se(_t);return}I.assert(st0&&F<=1;F++){let W=x(A,Q);I.assert(W.pos<=Q);let Se=W.pos;Q=Math.max(0,Se-1)}let se=Xi(Q,tn(N.span)),fe=N.newLength+(N.span.start-Q);return Yd(se,fe)}function x(A,N){let q=A,Q;if(Wt(A,fe),Q){let F=se(Q);F.pos>q.pos&&(q=F)}return q;function se(F){for(;;){let W=xS(F);if(W)F=W;else return F}}function fe(F){if(!Vi(F))if(F.pos<=N){if(F.pos>=q.pos&&(q=F),NN),!0}}function d(A,N,q,Q){let se=A.text;if(q&&(I.assert(se.length-q.span.length+q.newLength===N.length),Q||I.shouldAssert(3))){let fe=se.substr(0,q.span.start),F=N.substr(0,q.span.start);I.assert(fe===F);let W=se.substring(tn(q.span),se.length),Se=N.substring(tn(Ys(q)),N.length);I.assert(W===Se)}}function S(A){let N=A.statements,q=0;I.assert(q=Qe.pos&&F=Qe.pos&&F{A[A.Value=-1]="Value"})(T||(T={}))})(Hf||(Hf={})),Gf=new Map,G8=/^\/\/\/\s*<(\S+)\s.*?\/>/im,X8=/^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im}}),lj=()=>{},uj=()=>{},pj=()=>{},fj=()=>{},dj=()=>{},mj=()=>{},hj=()=>{},yj=()=>{},gj=()=>{},bj=()=>{},vj=()=>{},Tj=()=>{},Sj=()=>{},xj=()=>{},wj=()=>{},Ej=()=>{},Cj=()=>{},Aj=()=>{},kj=()=>{},Dj=()=>{},Pj=()=>{},Ij=()=>{},Nj=()=>{},Oj=()=>{},Mj=()=>{},Lj=()=>{},Jj=()=>{},Rj=()=>{},jj=()=>{},Fj=()=>{},Bj=()=>{},Uj=()=>{},qj=()=>{},zj=()=>{},Wj=()=>{},Vj=()=>{},Hj=()=>{},Gj=()=>{},Xj=()=>{},$j=()=>{},Qj=()=>{},Yj=()=>{},Kj=()=>{},Zj=()=>{},eF=()=>{},tF=()=>{},nF=()=>{},rF=()=>{},En=It({"src/compiler/_namespaces/ts.ts"(){"use strict";Z5(),PE(),Fv(),IE(),NE(),ME(),RE(),qv(),FE(),eC(),tC(),lC(),tk(),UM(),qM(),zM(),WM(),rL(),iL(),aL(),JJ(),XR(),$R(),cj(),lj(),uj(),pj(),fj(),mj(),hj(),yj(),gj(),bj(),vj(),Tj(),Sj(),xj(),wj(),Ej(),Cj(),Aj(),kj(),Dj(),Pj(),Ij(),Nj(),Oj(),Mj(),Lj(),Jj(),Rj(),jj(),Fj(),Bj(),Uj(),qj(),zj(),Wj(),Vj(),Hj(),Gj(),Xj(),$j(),Qj(),Yj(),Kj(),Zj(),eF(),tF(),nF(),rF(),dj(),Uv()}}),$8=()=>{},Kb=()=>{},iF=()=>{},Q8=()=>{},qo,Q8=()=>{Fv(),qo=ss(99,!0)},aF=()=>{},Y8=()=>{},oF=()=>{},sF=()=>{},_F=()=>{},cF=()=>{},lF=()=>{},uF=()=>{},pF=()=>{},fF=()=>{},K8=()=>{},Z8=()=>{},e7=()=>{},dF=()=>{};function t7(e,t,n,a){let _=Wl(e)?new Ld(e,t,n):e===80?new Jd(80,t,n):e===81?new Rd(81,t,n):new e6(e,t,n);return _.parent=a,_.flags=a.flags&101441536,_}function mF(e,t){if(!Wl(e.kind))return Je;let n=[];if(vT(e))return e.forEachChild(m=>{n.push(m)}),n;qo.setText((t||e.getSourceFile()).text);let a=e.pos,_=m=>{bl(n,a,m.pos,e),n.push(m),a=m.end},p=m=>{bl(n,a,m.pos,e),n.push(hF(m,e)),a=m.end};return wn(e.jsDoc,_),a=e.pos,e.forEachChild(_,p),bl(n,a,e.end,e),qo.setText(void 0),n}function bl(e,t,n,a){for(qo.resetTokenState(t);tt.tagName.text==="inheritDoc"||t.tagName.text==="inheritdoc")}function Pf(e,t){if(!e)return Je;let n=ts_JsDoc_exports.getJsDocTagsFromDeclarations(e,t);if(t&&(n.length===0||e.some(n7))){let a=new Set;for(let _ of e){let p=r7(t,_,m=>{var y;if(!a.has(m))return a.add(m),_.kind===177||_.kind===178?m.getContextualJsDocTags(_,t):((y=m.declarations)==null?void 0:y.length)===1?m.getJsDocTags():void 0});p&&(n=[...p,...n])}}return n}function tl(e,t){if(!e)return Je;let n=ts_JsDoc_exports.getJsDocCommentsFromDeclarations(e,t);if(t&&(n.length===0||e.some(n7))){let a=new Set;for(let _ of e){let p=r7(t,_,m=>{if(!a.has(m))return a.add(m),_.kind===177||_.kind===178?m.getContextualDocumentationComment(_,t):m.getDocumentationComment(t)});p&&(n=n.length===0?p.slice():p.concat(lineBreakPart(),n))}}return n}function r7(e,t,n){var a;let _=((a=t.parent)==null?void 0:a.kind)===176?t.parent.parent:t.parent;if(!_)return;let p=xm(t);return cg(w3(_),m=>{let y=e.getTypeAtLocation(m),u=p&&y.symbol?e.getTypeOfSymbol(y.symbol):y,x=e.getPropertyOfType(u,t.symbol.name);return x?n(x):void 0})}function yF(){return{getNodeConstructor:()=>Ld,getTokenConstructor:()=>e6,getIdentifierConstructor:()=>Jd,getPrivateIdentifierConstructor:()=>Rd,getSourceFileConstructor:()=>d7,getSymbolConstructor:()=>u7,getTypeConstructor:()=>p7,getSignatureConstructor:()=>f7,getSourceMapSourceConstructor:()=>m7}}function ll(e){let t=!0;for(let a in e)if(Wn(e,a)&&!sv(a)){t=!1;break}if(t)return e;let n={};for(let a in e)if(Wn(e,a)){let _=sv(a)?a:a.charAt(0).toLowerCase()+a.substr(1);n[_]=e[a]}return n}function sv(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function gF(e){return e?xa(e,t=>t.text).join(""):""}function i7(){return{target:1,jsx:1}}function a7(){return ts_codefix_exports.getSupportedErrorCodes()}function o7(e,t,n){e.version=n,e.scriptSnapshot=t}function Zb(e,t,n,a,_,p){let m=q8(e,getSnapshotText(t),n,_,p);return o7(m,t,a),m}function s7(e,t,n,a,_){if(a&&n!==e.version){let m,y=a.span.start!==0?e.text.substr(0,a.span.start):"",u=tn(a.span)!==e.text.length?e.text.substr(tn(a.span)):"";if(a.newLength===0)m=y&&u?y+u:y||u;else{let d=t.getText(a.span.start,a.span.start+a.newLength);m=y&&u?y+d+u:y?y+d:d+u}let x=Yb(e,m,a,_);return o7(x,t,n),x.nameTable=void 0,e!==x&&e.scriptSnapshot&&(e.scriptSnapshot.dispose&&e.scriptSnapshot.dispose(),e.scriptSnapshot=void 0),x}let p={languageVersion:e.languageVersion,impliedNodeFormat:e.impliedNodeFormat,setExternalModuleIndicator:e.setExternalModuleIndicator,jsDocParsingMode:e.jsDocParsingMode};return Zb(e.fileName,t,p,n,!0,e.scriptKind)}function bF(e,t=createDocumentRegistry(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory()),n){var a;let _;n===void 0?_=0:typeof n=="boolean"?_=n?2:0:_=n;let p=new h7(e),m,y,u=0,x=e.getCancellationToken?new g7(e.getCancellationToken()):y7,d=e.getCurrentDirectory();AS((a=e.getLocalizedDiagnosticMessages)==null?void 0:a.bind(e));function S(R){e.log&&e.log(R)}let T=O2(e),A=Wd(T),N=getSourceMapper({useCaseSensitiveFileNames:()=>T,getCurrentDirectory:()=>d,getProgram:se,fileExists:sn(e,e.fileExists),readFile:sn(e,e.readFile),getDocumentPositionMapper:sn(e,e.getDocumentPositionMapper),getSourceFileLike:sn(e,e.getSourceFileLike),log:S});function q(R){let v=m.getSourceFile(R);if(!v){let w=new Error(`Could not find source file: '${R}'.`);throw w.ProgramFiles=m.getSourceFiles().map(f=>f.fileName),w}return v}function Q(){var R,v,w;if(I.assert(_!==2),e.getProjectVersion){let Pe=e.getProjectVersion();if(Pe){if(y===Pe&&!((R=e.hasChangedAutomaticTypeDirectiveNames)!=null&&R.call(e)))return;y=Pe}}let f=e.getTypeRootsVersion?e.getTypeRootsVersion():0;u!==f&&(S("TypeRoots version has changed; provide new program"),m=void 0,u=f);let X=e.getScriptFileNames().slice(),$=e.getCompilationSettings()||i7(),O=e.hasInvalidatedResolutions||Qf,ue=sn(e,e.hasInvalidatedLibResolutions)||Qf,be=sn(e,e.hasChangedAutomaticTypeDirectiveNames),ge=(v=e.getProjectReferences)==null?void 0:v.call(e),Le,xe={getSourceFile:G,getSourceFileByPath:La,getCancellationToken:()=>x,getCanonicalFileName:A,useCaseSensitiveFileNames:()=>T,getNewLine:()=>mS($),getDefaultLibFileName:Pe=>e.getDefaultLibFileName(Pe),writeFile:gr,getCurrentDirectory:()=>d,fileExists:Pe=>e.fileExists(Pe),readFile:Pe=>e.readFile&&e.readFile(Pe),getSymlinkCache:sn(e,e.getSymlinkCache),realpath:sn(e,e.realpath),directoryExists:Pe=>dS(Pe,e),getDirectories:Pe=>e.getDirectories?e.getDirectories(Pe):[],readDirectory:(Pe,ot,un,ur,Ja)=>(I.checkDefined(e.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),e.readDirectory(Pe,ot,un,ur,Ja)),onReleaseOldSourceFile:Dt,onReleaseParsedCommandLine:Ir,hasInvalidatedResolutions:O,hasInvalidatedLibResolutions:ue,hasChangedAutomaticTypeDirectiveNames:be,trace:sn(e,e.trace),resolveModuleNames:sn(e,e.resolveModuleNames),getModuleResolutionCache:sn(e,e.getModuleResolutionCache),createHash:sn(e,e.createHash),resolveTypeReferenceDirectives:sn(e,e.resolveTypeReferenceDirectives),resolveModuleNameLiterals:sn(e,e.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:sn(e,e.resolveTypeReferenceDirectiveReferences),resolveLibrary:sn(e,e.resolveLibrary),useSourceOfProjectReferenceRedirect:sn(e,e.useSourceOfProjectReferenceRedirect),getParsedCommandLine:ve,jsDocParsingMode:e.jsDocParsingMode},Ye=xe.getSourceFile,{getSourceFileWithCache:Ge}=changeCompilerHostLikeToUseCache(xe,Pe=>Di(Pe,d,A),(...Pe)=>Ye.call(xe,...Pe));xe.getSourceFile=Ge,(w=e.setCompilerHost)==null||w.call(e,xe);let Xe={useCaseSensitiveFileNames:T,fileExists:Pe=>xe.fileExists(Pe),readFile:Pe=>xe.readFile(Pe),directoryExists:Pe=>xe.directoryExists(Pe),getDirectories:Pe=>xe.getDirectories(Pe),realpath:xe.realpath,readDirectory:(...Pe)=>xe.readDirectory(...Pe),trace:xe.trace,getCurrentDirectory:xe.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:gr},Nt=t.getKeyForCompilationSettings($),Xt=new Set;if(isProgramUptoDate(m,X,$,(Pe,ot)=>e.getScriptVersion(ot),Pe=>xe.fileExists(Pe),O,ue,be,ve,ge)){xe=void 0,Le=void 0,Xt=void 0;return}let ln={rootNames:X,options:$,host:xe,oldProgram:m,projectReferences:ge};m=createProgram(ln),xe=void 0,Le=void 0,Xt=void 0,N.clearCache(),m.getTypeChecker();return;function ve(Pe){let ot=Di(Pe,d,A),un=Le==null?void 0:Le.get(ot);if(un!==void 0)return un||void 0;let ur=e.getParsedCommandLine?e.getParsedCommandLine(Pe):ft(Pe);return(Le||(Le=new Map)).set(ot,ur||!1),ur}function ft(Pe){let ot=G(Pe,100);if(ot)return ot.path=Di(Pe,d,A),ot.resolvedPath=ot.path,ot.originalFileName=ot.fileName,parseJsonSourceFileConfigFileContent(ot,Xe,Gi(Mi(Pe),d),void 0,Gi(Pe,d))}function Ir(Pe,ot,un){var ur;e.getParsedCommandLine?(ur=e.onReleaseParsedCommandLine)==null||ur.call(e,Pe,ot,un):ot&&Dt(ot.sourceFile,un)}function Dt(Pe,ot){let un=t.getKeyForCompilationSettings(ot);t.releaseDocumentWithKey(Pe.resolvedPath,un,Pe.scriptKind,Pe.impliedNodeFormat)}function G(Pe,ot,un,ur){return La(Pe,Di(Pe,d,A),ot,un,ur)}function La(Pe,ot,un,ur,Ja){I.assert(xe,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");let Nr=e.getScriptSnapshot(Pe);if(!Nr)return;let Re=getScriptKind(Pe,e),dt=e.getScriptVersion(Pe);if(!Ja){let mi=m&&m.getSourceFileByPath(ot);if(mi){if(Re===mi.scriptKind||Xt.has(mi.resolvedPath))return t.updateDocumentWithKey(Pe,ot,e,Nt,Nr,dt,Re,un);t.releaseDocumentWithKey(mi.resolvedPath,t.getKeyForCompilationSettings(m.getCompilerOptions()),mi.scriptKind,mi.impliedNodeFormat),Xt.add(mi.resolvedPath)}}return t.acquireDocumentWithKey(Pe,ot,e,Nt,Nr,dt,Re,un)}}function se(){if(_===2){I.assert(m===void 0);return}return Q(),m}function fe(){var R;return(R=e.getPackageJsonAutoImportProvider)==null?void 0:R.call(e)}function F(R,v){let w=m.getTypeChecker(),f=X();if(!f)return!1;for(let O of R)for(let ue of O.references){let be=$(ue);if(I.assertIsDefined(be),v.has(ue)||ts_FindAllReferences_exports.isDeclarationOfSymbol(be,f)){v.add(ue),ue.isDefinition=!0;let ge=getMappedDocumentSpan(ue,N,sn(e,e.fileExists));ge&&v.add(ge)}else ue.isDefinition=!1}return!0;function X(){for(let O of R)for(let ue of O.references){if(v.has(ue)){let ge=$(ue);return I.assertIsDefined(ge),w.getSymbolAtLocation(ge)}let be=getMappedDocumentSpan(ue,N,sn(e,e.fileExists));if(be&&v.has(be)){let ge=$(be);if(ge)return w.getSymbolAtLocation(ge)}}}function $(O){let ue=m.getSourceFile(O.fileName);if(!ue)return;let be=getTouchingPropertyName(ue,O.textSpan.start);return ts_FindAllReferences_exports.Core.getAdjustedNode(be,{use:ts_FindAllReferences_exports.FindReferencesUse.References})}}function W(){if(m){let R=t.getKeyForCompilationSettings(m.getCompilerOptions());wn(m.getSourceFiles(),v=>t.releaseDocumentWithKey(v.resolvedPath,R,v.scriptKind,v.impliedNodeFormat)),m=void 0}}function Se(){W(),e=void 0}function Qe(R){return Q(),m.getSyntacticDiagnostics(q(R),x).slice()}function Be(R){Q();let v=q(R),w=m.getSemanticDiagnostics(v,x);if(!Q2(m.getCompilerOptions()))return w.slice();let f=m.getDeclarationDiagnostics(v,x);return[...w,...f]}function st(R){return Q(),computeSuggestionDiagnostics(q(R),m,x)}function _t(){return Q(),[...m.getOptionsDiagnostics(x),...m.getGlobalDiagnostics(x)]}function hn(R,v,w=emptyOptions,f){let X={...w,includeCompletionsForModuleExports:w.includeCompletionsForModuleExports||w.includeExternalModuleExports,includeCompletionsWithInsertText:w.includeCompletionsWithInsertText||w.includeInsertTextCompletions};return Q(),ts_Completions_exports.getCompletionsAtPosition(e,m,S,q(R),v,X,w.triggerCharacter,w.triggerKind,x,f&&ts_formatting_exports.getFormatContext(f,e),w.includeSymbol)}function yn(R,v,w,f,X,$=emptyOptions,O){return Q(),ts_Completions_exports.getCompletionEntryDetails(m,S,q(R),v,{name:w,source:X,data:O},e,f&&ts_formatting_exports.getFormatContext(f,e),$,x)}function fi(R,v,w,f,X=emptyOptions){return Q(),ts_Completions_exports.getCompletionEntrySymbol(m,S,q(R),v,{name:w,source:f},e,X)}function gn(R,v){Q();let w=q(R),f=getTouchingPropertyName(w,v);if(f===w)return;let X=m.getTypeChecker(),$=cr(f),O=wF($,X);if(!O||X.isUnknownSymbol(O)){let xe=He(w,$,v)?X.getTypeAtLocation($):void 0;return xe&&{kind:"",kindModifiers:"",textSpan:createTextSpanFromNode($,w),displayParts:X.runWithCancellationToken(x,Ye=>typeToDisplayParts(Ye,xe,getContainerNode($))),documentation:xe.symbol?xe.symbol.getDocumentationComment(X):void 0,tags:xe.symbol?xe.symbol.getJsDocTags(X):void 0}}let{symbolKind:ue,displayParts:be,documentation:ge,tags:Le}=X.runWithCancellationToken(x,xe=>ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(xe,O,w,getContainerNode($),$));return{kind:ue,kindModifiers:ts_SymbolDisplay_exports.getSymbolModifiers(X,O),textSpan:createTextSpanFromNode($,w),displayParts:be,documentation:ge,tags:Le}}function cr(R){return n8(R.parent)&&R.pos===R.parent.pos?R.parent.expression:vb(R.parent)&&R.pos===R.parent.pos||k0(R.parent)&&R.parent.name===R||B_(R.parent)?R.parent:R}function He(R,v,w){switch(v.kind){case 80:return!isLabelName(v)&&!isTagName(v)&&!G4(v.parent);case 211:case 166:return!isInComment(R,w);case 110:case 197:case 108:case 202:return!0;case 236:return k0(v);default:return!1}}function Qn(R,v,w,f){return Q(),ts_GoToDefinition_exports.getDefinitionAtPosition(m,q(R),v,w,f)}function Gr(R,v){return Q(),ts_GoToDefinition_exports.getDefinitionAndBoundSpan(m,q(R),v)}function vt(R,v){return Q(),ts_GoToDefinition_exports.getTypeDefinitionAtPosition(m.getTypeChecker(),q(R),v)}function Jn(R,v){return Q(),ts_FindAllReferences_exports.getImplementationsAtPosition(m,x,m.getSourceFiles(),q(R),v)}function Ar(R,v,w){let f=br(R);I.assert(w.some(O=>br(O)===f)),Q();let X=wa(w,O=>m.getSourceFile(O)),$=q(R);return DocumentHighlights.getDocumentHighlights(m,x,$,v,X)}function Ht(R,v,w,f,X){Q();let $=q(R),O=getAdjustedRenameLocation(getTouchingPropertyName($,v));if(ts_Rename_exports.nodeIsEligibleForRename(O))if(Ae(O)&&(Jo(O.parent)||Wf(O.parent))&&R3(O.escapedText)){let{openingElement:ue,closingElement:be}=O.parent.parent;return[ue,be].map(ge=>{let Le=createTextSpanFromNode(ge.tagName,$);return{fileName:$.fileName,textSpan:Le,...ts_FindAllReferences_exports.toContextSpan(Le,$,ge.parent)}})}else{let ue=getQuotePreference($,X??emptyOptions),be=typeof X=="boolean"?X:X==null?void 0:X.providePrefixAndSuffixTextForRename;return at(O,v,{findInStrings:w,findInComments:f,providePrefixAndSuffixTextForRename:be,use:ts_FindAllReferences_exports.FindReferencesUse.Rename},(ge,Le,xe)=>ts_FindAllReferences_exports.toRenameLocation(ge,Le,xe,be||!1,ue))}}function rn(R,v){return Q(),at(getTouchingPropertyName(q(R),v),v,{use:ts_FindAllReferences_exports.FindReferencesUse.References},ts_FindAllReferences_exports.toReferenceEntry)}function at(R,v,w,f){Q();let X=w&&w.use===ts_FindAllReferences_exports.FindReferencesUse.Rename?m.getSourceFiles().filter($=>!m.isSourceFileDefaultLibrary($)):m.getSourceFiles();return ts_FindAllReferences_exports.findReferenceOrRenameEntries(m,x,X,R,v,w,f)}function kr(R,v){return Q(),ts_FindAllReferences_exports.findReferencedSymbols(m,x,m.getSourceFiles(),q(R),v)}function an(R){return Q(),ts_FindAllReferences_exports.Core.getReferencesForFileName(R,m,m.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry)}function xt(R,v,w,f=!1,X=!1){Q();let $=w?[q(w)]:m.getSourceFiles();return getNavigateToItems($,m.getTypeChecker(),x,R,v,f,X)}function ut(R,v,w){Q();let f=q(R),X=e.getCustomTransformers&&e.getCustomTransformers();return getFileEmitOutput(m,f,!!v,x,X,w)}function Gt(R,v,{triggerReason:w}=emptyOptions){Q();let f=q(R);return ts_SignatureHelp_exports.getSignatureHelpItems(m,f,v,w,x)}function cn(R){return p.getCurrentSourceFile(R)}function ht(R,v,w){let f=p.getCurrentSourceFile(R),X=getTouchingPropertyName(f,v);if(X===f)return;switch(X.kind){case 211:case 166:case 11:case 97:case 112:case 106:case 108:case 110:case 197:case 80:break;default:return}let $=X;for(;;)if(isRightSideOfPropertyAccess($)||isRightSideOfQualifiedName($))$=$.parent;else if(isNameOfModuleDeclaration($))if($.parent.parent.kind===267&&$.parent.parent.body===$.parent)$=$.parent.parent.name;else break;else break;return Xi($.getStart(),X.getEnd())}function Dr(R,v){let w=p.getCurrentSourceFile(R);return ts_BreakpointResolver_exports.spanInSourceFileAtLocation(w,v)}function Tt(R){return getNavigationBarItems(p.getCurrentSourceFile(R),x)}function Rn(R){return getNavigationTree(p.getCurrentSourceFile(R),x)}function yt(R,v,w){return Q(),(w||"original")==="2020"?getSemanticClassifications2(m,x,q(R),v):getSemanticClassifications(m.getTypeChecker(),x,q(R),m.getClassifiableNames(),v)}function jn(R,v,w){return Q(),(w||"original")==="original"?getEncodedSemanticClassifications(m.getTypeChecker(),x,q(R),m.getClassifiableNames(),v):getEncodedSemanticClassifications2(m,x,q(R),v)}function ct(R,v){return getSyntacticClassifications(x,p.getCurrentSourceFile(R),v)}function Kt(R,v){return getEncodedSyntacticClassifications(x,p.getCurrentSourceFile(R),v)}function Zt(R){let v=p.getCurrentSourceFile(R);return ts_OutliningElementsCollector_exports.collectElements(v,x)}let lr=new Map(Object.entries({19:20,21:22,23:24,32:30}));lr.forEach((R,v)=>lr.set(R.toString(),Number(v)));function di(R,v){let w=p.getCurrentSourceFile(R),f=getTouchingToken(w,v),X=f.getStart(w)===v?lr.get(f.kind.toString()):void 0,$=X&&findChildOfKind(f.parent,X,w);return $?[createTextSpanFromNode(f,w),createTextSpanFromNode($,w)].sort((O,ue)=>O.start-ue.start):Je}function Xr(R,v,w){let f=ga(),X=ll(w),$=p.getCurrentSourceFile(R);S("getIndentationAtPosition: getCurrentSourceFile: "+(ga()-f)),f=ga();let O=ts_formatting_exports.SmartIndenter.getIndentation(v,$,X);return S("getIndentationAtPosition: computeIndentation : "+(ga()-f)),O}function Yn(R,v,w,f){let X=p.getCurrentSourceFile(R);return ts_formatting_exports.formatSelection(v,w,X,ts_formatting_exports.getFormatContext(ll(f),e))}function Kn(R,v){return ts_formatting_exports.formatDocument(p.getCurrentSourceFile(R),ts_formatting_exports.getFormatContext(ll(v),e))}function Ji(R,v,w,f){let X=p.getCurrentSourceFile(R),$=ts_formatting_exports.getFormatContext(ll(f),e);if(!isInComment(X,v))switch(w){case"{":return ts_formatting_exports.formatOnOpeningCurly(v,X,$);case"}":return ts_formatting_exports.formatOnClosingCurly(v,X,$);case";":return ts_formatting_exports.formatOnSemicolon(v,X,$);case` +`:return ts_formatting_exports.formatOnEnter(v,X,$)}return[]}function Pr(R,v,w,f,X,$=emptyOptions){Q();let O=q(R),ue=Xi(v,w),be=ts_formatting_exports.getFormatContext(X,e);return zo(hv(f,_o,Mn),ge=>(x.throwIfCancellationRequested(),ts_codefix_exports.getFixes({errorCode:ge,sourceFile:O,span:ue,program:m,host:e,cancellationToken:x,formatContext:be,preferences:$})))}function De(R,v,w,f=emptyOptions){Q(),I.assert(R.type==="file");let X=q(R.fileName),$=ts_formatting_exports.getFormatContext(w,e);return ts_codefix_exports.getAllFixes({fixId:v,sourceFile:X,program:m,host:e,cancellationToken:x,formatContext:$,preferences:f})}function U(R,v,w=emptyOptions){Q(),I.assert(R.type==="file");let f=q(R.fileName),X=ts_formatting_exports.getFormatContext(v,e),$=R.mode??(R.skipDestructiveCodeActions?"SortAndCombine":"All");return ts_OrganizeImports_exports.organizeImports(f,X,e,m,w,$)}function ie(R,v,w,f=emptyOptions){return getEditsForFileRename(se(),R,v,e,ts_formatting_exports.getFormatContext(w,e),f,N)}function ye(R,v){let w=typeof R=="string"?v:R;return $t(w)?Promise.all(w.map(f=>Te(f))):Te(w)}function Te(R){let v=w=>Di(w,d,A);return I.assertEqual(R.type,"install package"),e.installPackage?e.installPackage({fileName:v(R.file),packageName:R.packageName}):Promise.reject("Host does not implement `installPackage`")}function tt(R,v,w,f){let X=f?ts_formatting_exports.getFormatContext(f,e).options:void 0;return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(e,X),p.getCurrentSourceFile(R),v,w)}function $e(R,v,w){if(w===60)return!1;let f=p.getCurrentSourceFile(R);if(isInString(f,v))return!1;if(isInsideJsxElementOrAttribute(f,v))return w===123;if(isInTemplateString(f,v))return!1;switch(w){case 39:case 34:case 96:return!isInComment(f,v)}return!0}function Ut(R,v){let w=p.getCurrentSourceFile(R),f=findPrecedingToken(v,w);if(!f)return;let X=f.kind===32&&Jo(f.parent)?f.parent.parent:Id(f)&&tg(f.parent)?f.parent:void 0;if(X&&Ee(X))return{newText:``};let $=f.kind===32&&Jb(f.parent)?f.parent.parent:Id(f)&&yl(f.parent)?f.parent:void 0;if($&&je($))return{newText:""}}function St(R,v){let w=p.getCurrentSourceFile(R),f=findPrecedingToken(v,w);if(!f||f.parent.kind===312)return;let X="[a-zA-Z0-9:\\-\\._$]*";if(yl(f.parent.parent)){let $=f.parent.parent.openingFragment,O=f.parent.parent.closingFragment;if(El($)||El(O))return;let ue=$.getStart(w)+1,be=O.getStart(w)+2;return v!==ue&&v!==be?void 0:{ranges:[{start:ue,length:0},{start:be,length:0}],wordPattern:X}}else{let $=or(f.parent,Ge=>!!(Jo(Ge)||Wf(Ge)));if(!$)return;I.assert(Jo($)||Wf($),"tag should be opening or closing element");let O=$.parent.openingElement,ue=$.parent.closingElement,be=O.tagName.getStart(w),ge=O.tagName.end,Le=ue.tagName.getStart(w),xe=ue.tagName.end;return!(be<=v&&v<=ge||Le<=v&&v<=xe)||O.tagName.getText(w)!==ue.tagName.getText(w)?void 0:{ranges:[{start:be,length:ge-be},{start:Le,length:xe-Le}],wordPattern:X}}}function Jt(R,v){return{lineStarts:R.getLineStarts(),firstLine:R.getLineAndCharacterOfPosition(v.pos).line,lastLine:R.getLineAndCharacterOfPosition(v.end).line}}function Rt(R,v,w){let f=p.getCurrentSourceFile(R),X=[],{lineStarts:$,firstLine:O,lastLine:ue}=Jt(f,v),be=w||!1,ge=Number.MAX_VALUE,Le=new Map,xe=new RegExp(/\S/),Ye=isInsideJsxElement(f,$[O]),Ge=Ye?"{/*":"//";for(let Xe=O;Xe<=ue;Xe++){let Nt=f.text.substring($[Xe],f.getLineEndOfPosition($[Xe])),Xt=xe.exec(Nt);Xt&&(ge=Math.min(ge,Xt.index),Le.set(Xe.toString(),Xt.index),Nt.substr(Xt.index,Ge.length)!==Ge&&(be=w===void 0||w))}for(let Xe=O;Xe<=ue;Xe++){if(O!==ue&&$[Xe]===v.end)continue;let Nt=Le.get(Xe.toString());Nt!==void 0&&(Ye?X.push(...z(R,{pos:$[Xe]+ge,end:f.getLineEndOfPosition($[Xe])},be,Ye)):be?X.push({newText:Ge,span:{length:0,start:$[Xe]+ge}}):f.text.substr($[Xe]+Nt,Ge.length)===Ge&&X.push({newText:"",span:{length:Ge.length,start:$[Xe]+Nt}}))}return X}function z(R,v,w,f){var X;let $=p.getCurrentSourceFile(R),O=[],{text:ue}=$,be=!1,ge=w||!1,Le=[],{pos:xe}=v,Ye=f!==void 0?f:isInsideJsxElement($,xe),Ge=Ye?"{/*":"/*",Xe=Ye?"*/}":"*/",Nt=Ye?"\\{\\/\\*":"\\/\\*",Xt=Ye?"\\*\\/\\}":"\\*\\/";for(;xe<=v.end;){let ln=ue.substr(xe,Ge.length)===Ge?Ge.length:0,ve=isInComment($,xe+ln);if(ve)Ye&&(ve.pos--,ve.end++),Le.push(ve.pos),ve.kind===3&&Le.push(ve.end),be=!0,xe=ve.end+1;else{let ft=ue.substring(xe,v.end).search(`(${Nt})|(${Xt})`);ge=w!==void 0?w:ge||!isTextWhiteSpaceLike(ue,xe,ft===-1?v.end:xe+ft),xe=ft===-1?v.end+1:xe+ft+Xe.length}}if(ge||!be){((X=isInComment($,v.pos))==null?void 0:X.kind)!==2&&vl(Le,v.pos,Mn),vl(Le,v.end,Mn);let ln=Le[0];ue.substr(ln,Ge.length)!==Ge&&O.push({newText:Ge,span:{length:0,start:ln}});for(let ve=1;ve0?ln-Xe.length:0,ft=ue.substr(ve,Xe.length)===Xe?Xe.length:0;O.push({newText:"",span:{length:Ge.length,start:ln-ft}})}return O}function K(R,v){let w=p.getCurrentSourceFile(R),{firstLine:f,lastLine:X}=Jt(w,v);return f===X&&v.pos!==v.end?z(R,v,!0):Rt(R,v,!0)}function te(R,v){let w=p.getCurrentSourceFile(R),f=[],{pos:X}=v,{end:$}=v;X===$&&($+=isInsideJsxElement(w,X)?2:1);for(let O=X;O<=$;O++){let ue=isInComment(w,O);if(ue){switch(ue.kind){case 2:f.push(...Rt(R,{end:ue.end,pos:ue.pos+1},!1));break;case 3:f.push(...z(R,{end:ue.end,pos:ue.pos+1},!1))}O=ue.end+1}}return f}function Ee({openingElement:R,closingElement:v,parent:w}){return!Ai(R.tagName,v.tagName)||tg(w)&&Ai(R.tagName,w.openingElement.tagName)&&Ee(w)}function je({closingFragment:R,parent:v}){return!!(R.flags&262144)||yl(v)&&je(v)}function pt(R,v,w){let f=p.getCurrentSourceFile(R),X=ts_formatting_exports.getRangeOfEnclosingComment(f,v);return X&&(!w||X.kind===3)?createTextSpanFromRange(X):void 0}function nt(R,v){Q();let w=q(R);x.throwIfCancellationRequested();let f=w.text,X=[];if(v.length>0&&!be(w.fileName)){let ge=O(),Le;for(;Le=ge.exec(f);){x.throwIfCancellationRequested();let xe=3;I.assert(Le.length===v.length+xe);let Ye=Le[1],Ge=Le.index+Ye.length;if(!isInComment(w,Ge))continue;let Xe;for(let Xt=0;Xt"("+$(ve.text)+")").join("|")+")",Xe=/(?:$|\*\/)/.source,Nt=/(?:.*?)/.source,Xt="("+Ge+Nt+")",ln=Ye+Xt+Xe;return new RegExp(ln,"gim")}function ue(ge){return ge>=97&&ge<=122||ge>=65&&ge<=90||ge>=48&&ge<=57}function be(ge){return ge.includes("/node_modules/")}}function kt(R,v,w){return Q(),ts_Rename_exports.getRenameInfo(m,q(R),v,w||{})}function qt(R,v,w,f,X,$){let[O,ue]=typeof v=="number"?[v,void 0]:[v.pos,v.end];return{file:R,startPosition:O,endPosition:ue,program:se(),host:e,formatContext:ts_formatting_exports.getFormatContext(f,e),cancellationToken:x,preferences:w,triggerReason:X,kind:$}}function Zn(R,v,w){return{file:R,program:se(),host:e,span:v,preferences:w,cancellationToken:x}}function kn(R,v){return ts_SmartSelectionRange_exports.getSmartSelectionRange(v,p.getCurrentSourceFile(R))}function er(R,v,w=emptyOptions,f,X,$){Q();let O=q(R);return ts_refactor_exports.getApplicableRefactors(qt(O,v,w,emptyOptions,f,X),$)}function Ri(R,v,w=emptyOptions){Q();let f=q(R),X=I.checkDefined(m.getSourceFiles()),$=al(R),O=wa(X,be=>!(m!=null&&m.isSourceFileFromExternalLibrary(f))&&!(f===q(be.fileName)||$===".ts"&&al(be.fileName)===".d.ts"||$===".d.ts"&&Hn(os(be.fileName),"lib.")&&al(be.fileName)===".d.ts")&&$===al(be.fileName)?be.fileName:void 0);return{newFileName:createNewFileName(f,m,qt(f,v,w,emptyOptions),e),files:O}}function aa(R,v,w,f,X,$=emptyOptions,O){Q();let ue=q(R);return ts_refactor_exports.getEditsForRefactor(qt(ue,w,$,v),f,X,O)}function $r(R,v){return v===0?{line:0,character:0}:N.toLineColumnOffset(R,v)}function Dn(R,v){Q();let w=ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(m,getTouchingPropertyName(q(R),v));return w&&mapOneOrMany(w,f=>ts_CallHierarchy_exports.createCallHierarchyItem(m,f))}function Ne(R,v){Q();let w=q(R),f=firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(m,v===0?w:getTouchingPropertyName(w,v)));return f?ts_CallHierarchy_exports.getIncomingCalls(m,f,x):[]}function oa(R,v){Q();let w=q(R),f=firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(m,v===0?w:getTouchingPropertyName(w,v)));return f?ts_CallHierarchy_exports.getOutgoingCalls(m,f):[]}function jt(R,v,w=emptyOptions){Q();let f=q(R);return ts_InlayHints_exports.provideInlayHints(Zn(f,v,w))}let Fn={dispose:Se,cleanupSemanticCache:W,getSyntacticDiagnostics:Qe,getSemanticDiagnostics:Be,getSuggestionDiagnostics:st,getCompilerOptionsDiagnostics:_t,getSyntacticClassifications:ct,getSemanticClassifications:yt,getEncodedSyntacticClassifications:Kt,getEncodedSemanticClassifications:jn,getCompletionsAtPosition:hn,getCompletionEntryDetails:yn,getCompletionEntrySymbol:fi,getSignatureHelpItems:Gt,getQuickInfoAtPosition:gn,getDefinitionAtPosition:Qn,getDefinitionAndBoundSpan:Gr,getImplementationAtPosition:Jn,getTypeDefinitionAtPosition:vt,getReferencesAtPosition:rn,findReferences:kr,getFileReferences:an,getDocumentHighlights:Ar,getNameOrDottedNameSpan:ht,getBreakpointStatementAtPosition:Dr,getNavigateToItems:xt,getRenameInfo:kt,getSmartSelectionRange:kn,findRenameLocations:Ht,getNavigationBarItems:Tt,getNavigationTree:Rn,getOutliningSpans:Zt,getTodoComments:nt,getBraceMatchingAtPosition:di,getIndentationAtPosition:Xr,getFormattingEditsForRange:Yn,getFormattingEditsForDocument:Kn,getFormattingEditsAfterKeystroke:Ji,getDocCommentTemplateAtPosition:tt,isValidBraceCompletionAtPosition:$e,getJsxClosingTagAtPosition:Ut,getLinkedEditingRangeAtPosition:St,getSpanOfEnclosingComment:pt,getCodeFixesAtPosition:Pr,getCombinedCodeFix:De,applyCodeActionCommand:ye,organizeImports:U,getEditsForFileRename:ie,getEmitOutput:ut,getNonBoundSourceFile:cn,getProgram:se,getCurrentProgram:()=>m,getAutoImportProvider:fe,updateIsDefinitionOfReferencedSymbols:F,getApplicableRefactors:er,getEditsForRefactor:aa,getMoveToRefactoringFileSuggestions:Ri,toLineColumnOffset:$r,getSourceMapper:()=>N,clearSourceMapperCache:()=>N.clearCache(),prepareCallHierarchy:Dn,provideCallHierarchyIncomingCalls:Ne,provideCallHierarchyOutgoingCalls:oa,toggleLineComment:Rt,toggleMultilineComment:z,commentSelection:K,uncommentSelection:te,provideInlayHints:jt,getSupportedCodeFixes:a7};switch(_){case 0:break;case 1:sg.forEach(R=>Fn[R]=()=>{throw new Error(`LanguageService Operation: ${R} not allowed in LanguageServiceMode.PartialSemantic`)});break;case 2:v7.forEach(R=>Fn[R]=()=>{throw new Error(`LanguageService Operation: ${R} not allowed in LanguageServiceMode.Syntactic`)});break;default:I.assertNever(_)}return Fn}function vF(e){return e.nameTable||TF(e),e.nameTable}function TF(e){let t=e.nameTable=new Map;e.forEachChild(function n(a){if(Ae(a)&&!isTagName(a)&&a.escapedText||Yi(a)&&SF(a)){let _=D3(a);t.set(_,t.get(_)===void 0?a.pos:-1)}else if(Vn(a)){let _=a.escapedText;t.set(_,t.get(_)===void 0?a.pos:-1)}if(Wt(a,n),Hi(a))for(let _ of a.jsDoc)Wt(_,n)})}function SF(e){return y3(e)||e.parent.kind===283||EF(e)||g3(e)}function _7(e){let t=xF(e);return t&&(uo(t.parent)||Rb(t.parent))?t:void 0}function xF(e){switch(e.kind){case 11:case 15:case 9:if(e.parent.kind===167)return x0(e.parent.parent)?e.parent.parent:void 0;case 80:return x0(e.parent)&&(e.parent.parent.kind===210||e.parent.parent.kind===292)&&e.parent.name===e?e.parent:void 0}}function wF(e,t){let n=_7(e);if(n){let a=t.getContextualType(n.parent),_=a&&c7(n,t,a,!1);if(_&&_.length===1)return pg(_)}return t.getSymbolAtLocation(e)}function c7(e,t,n,a){let _=getNameFromPropertyName(e.name);if(!_)return Je;if(!n.isUnion()){let m=n.getProperty(_);return m?[m]:Je}let p=wa(n.types,m=>(uo(e.parent)||Rb(e.parent))&&t.isTypeInvalidDueToUnionDiscriminant(m,e.parent)?void 0:m.getProperty(_));if(a&&(p.length===0||p.length===n.types.length)){let m=n.getProperty(_);if(m)return[m]}return p.length===0?wa(n.types,m=>m.getProperty(_)):p}function EF(e){return e&&e.parent&&e.parent.kind===212&&e.parent.argumentExpression===e}function CF(e){if(y0)return Qt(Mi(br(y0.getExecutingFilePath())),m4(e));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}var l7,Ld,If,u7,e6,Jd,Rd,p7,f7,d7,m7,h7,y7,g7,b7,sg,v7,AF=It({"src/services/services.ts"(){"use strict";T7(),K8(),Z8(),e7(),Y8(),dF(),l7="0.8",Ld=class{constructor(e,t,n){this.pos=t,this.end=n,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.kind=e}assertHasRealPosition(e){I.assert(!Da(this.pos)&&!Da(this.end),e||"Node must have a real position for this operation")}getSourceFile(){return oi(this)}getStart(e,t){return this.assertHasRealPosition(),$o(this,e,t)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos}getFullText(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(e){return this.getChildren(e).length}getChildAt(e,t){return this.getChildren(t)[e]}getChildren(e){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),this._children||(this._children=mF(this,e))}getFirstToken(e){this.assertHasRealPosition();let t=this.getChildren(e);if(!t.length)return;let n=ir(t,a=>a.kind<316||a.kind>357);return n.kind<166?n:n.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();let t=this.getChildren(e),n=Pi(t);if(n)return n.kind<166?n:n.getLastToken(e)}forEachChild(e,t){return Wt(this,e,t)}},If=class{constructor(e,t){this.pos=e,this.end=t,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0}getSourceFile(){return oi(this)}getStart(e,t){return $o(this,e,t)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(e){return this.getEnd()-this.getStart(e)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(e){return this.getStart(e)-this.pos}getFullText(e){return(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(){return this.getChildren().length}getChildAt(e){return this.getChildren()[e]}getChildren(){return this.kind===1&&this.jsDoc||Je}getFirstToken(){}getLastToken(){}forEachChild(){}},u7=class{constructor(e,t){this.id=0,this.mergeId=0,this.flags=e,this.escapedName=t}getFlags(){return this.flags}get name(){return gd(this)}getEscapedName(){return this.escapedName}getName(){return this.name}getDeclarations(){return this.declarations}getDocumentationComment(e){if(!this.documentationComment)if(this.documentationComment=Je,!this.declarations&&E0(this)&&this.links.target&&E0(this.links.target)&&this.links.target.links.tupleLabelDeclaration){let t=this.links.target.links.tupleLabelDeclaration;this.documentationComment=tl([t],e)}else this.documentationComment=tl(this.declarations,e);return this.documentationComment}getContextualDocumentationComment(e,t){if(e){if(rl(e)&&(this.contextualGetAccessorDocumentationComment||(this.contextualGetAccessorDocumentationComment=tl(rr(this.declarations,rl),t)),eo(this.contextualGetAccessorDocumentationComment)))return this.contextualGetAccessorDocumentationComment;if(nl(e)&&(this.contextualSetAccessorDocumentationComment||(this.contextualSetAccessorDocumentationComment=tl(rr(this.declarations,nl),t)),eo(this.contextualSetAccessorDocumentationComment)))return this.contextualSetAccessorDocumentationComment}return this.getDocumentationComment(t)}getJsDocTags(e){return this.tags===void 0&&(this.tags=Pf(this.declarations,e)),this.tags}getContextualJsDocTags(e,t){if(e){if(rl(e)&&(this.contextualGetAccessorTags||(this.contextualGetAccessorTags=Pf(rr(this.declarations,rl),t)),eo(this.contextualGetAccessorTags)))return this.contextualGetAccessorTags;if(nl(e)&&(this.contextualSetAccessorTags||(this.contextualSetAccessorTags=Pf(rr(this.declarations,nl),t)),eo(this.contextualSetAccessorTags)))return this.contextualSetAccessorTags}return this.getJsDocTags(t)}},e6=class extends If{constructor(e,t,n){super(t,n),this.kind=e}},Jd=class extends If{constructor(e,t,n){super(t,n),this.kind=80}get text(){return Lt(this)}},Jd.prototype.kind=80,Rd=class extends If{constructor(e,t,n){super(t,n),this.kind=81}get text(){return Lt(this)}},Rd.prototype.kind=81,p7=class{constructor(e,t){this.checker=e,this.flags=t}getFlags(){return this.flags}getSymbol(){return this.symbol}getProperties(){return this.checker.getPropertiesOfType(this)}getProperty(e){return this.checker.getPropertyOfType(this,e)}getApparentProperties(){return this.checker.getAugmentedPropertiesOfType(this)}getCallSignatures(){return this.checker.getSignaturesOfType(this,0)}getConstructSignatures(){return this.checker.getSignaturesOfType(this,1)}getStringIndexType(){return this.checker.getIndexTypeOfType(this,0)}getNumberIndexType(){return this.checker.getIndexTypeOfType(this,1)}getBaseTypes(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0}isNullableType(){return this.checker.isNullableType(this)}getNonNullableType(){return this.checker.getNonNullableType(this)}getNonOptionalType(){return this.checker.getNonOptionalType(this)}getConstraint(){return this.checker.getBaseConstraintOfType(this)}getDefault(){return this.checker.getDefaultFromTypeParameter(this)}isUnion(){return!!(this.flags&1048576)}isIntersection(){return!!(this.flags&2097152)}isUnionOrIntersection(){return!!(this.flags&3145728)}isLiteral(){return!!(this.flags&2432)}isStringLiteral(){return!!(this.flags&128)}isNumberLiteral(){return!!(this.flags&256)}isTypeParameter(){return!!(this.flags&262144)}isClassOrInterface(){return!!(Ff(this)&3)}isClass(){return!!(Ff(this)&1)}isIndexType(){return!!(this.flags&4194304)}get typeArguments(){if(Ff(this)&4)return this.checker.getTypeArguments(this)}},f7=class{constructor(e,t){this.checker=e,this.flags=t}getDeclaration(){return this.declaration}getTypeParameters(){return this.typeParameters}getParameters(){return this.parameters}getReturnType(){return this.checker.getReturnTypeOfSignature(this)}getTypeParameterAtPosition(e){let t=this.checker.getParameterType(this,e);if(t.isIndexType()&&ex(t.type)){let n=t.type.getConstraint();if(n)return this.checker.getIndexType(n)}return t}getDocumentationComment(){return this.documentationComment||(this.documentationComment=tl(Kf(this.declaration),this.checker))}getJsDocTags(){return this.jsDocTags||(this.jsDocTags=Pf(Kf(this.declaration),this.checker))}},d7=class extends Ld{constructor(e,t,n){super(e,t,n),this.kind=312}update(e,t){return Yb(this,e,t)}getLineAndCharacterOfPosition(e){return no(this,e)}getLineStarts(){return Aa(this)}getPositionOfLineAndCharacter(e,t,n){return Ag(Aa(this),e,t,this.text,n)}getLineEndOfPosition(e){let{line:t}=this.getLineAndCharacterOfPosition(e),n=this.getLineStarts(),a;t+1>=n.length&&(a=this.getEnd()),a||(a=n[t+1]-1);let _=this.getFullText();return _[a]===` +`&&_[a-1]==="\r"?a-1:a}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=qd();return this.forEachChild(_),e;function t(p){let m=a(p);m&&e.add(m,p)}function n(p){let m=e.get(p);return m||e.set(p,m=[]),m}function a(p){let m=em(p);return m&&(oo(m)&&Ln(m.expression)?m.expression.name.text:Vl(m)?getNameFromPropertyName(m):void 0)}function _(p){switch(p.kind){case 262:case 218:case 174:case 173:let m=p,y=a(m);if(y){let d=n(y),S=Pi(d);S&&m.parent===S.parent&&m.symbol===S.symbol?m.body&&!S.body&&(d[d.length-1]=m):d.push(m)}Wt(p,_);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(p),Wt(p,_);break;case 169:if(!Cn(p,31))break;case 260:case 208:{let d=p;if(sm(d.name)){Wt(d.name,_);break}d.initializer&&_(d.initializer)}case 306:case 172:case 171:t(p);break;case 278:let u=p;u.exportClause&&(l8(u.exportClause)?wn(u.exportClause.elements,_):_(u.exportClause.name));break;case 272:let x=p.importClause;x&&(x.name&&t(x.name),x.namedBindings&&(x.namedBindings.kind===274?t(x.namedBindings):wn(x.namedBindings.elements,_)));break;case 226:Oa(p)!==0&&t(p);default:Wt(p,_)}}}},m7=class{constructor(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n}getLineAndCharacterOfPosition(e){return no(this,e)}},h7=class{constructor(e){this.host=e}getCurrentSourceFile(e){var t,n,a,_,p,m,y,u;let x=this.host.getScriptSnapshot(e);if(!x)throw new Error("Could not find file: '"+e+"'.");let d=getScriptKind(e,this.host),S=this.host.getScriptVersion(e),T;if(this.currentFileName!==e){let A={languageVersion:99,impliedNodeFormat:getImpliedNodeFormatForFile(Di(e,this.host.getCurrentDirectory(),((a=(n=(t=this.host).getCompilerHost)==null?void 0:n.call(t))==null?void 0:a.getCanonicalFileName)||j3(this.host)),(u=(y=(m=(p=(_=this.host).getCompilerHost)==null?void 0:p.call(_))==null?void 0:m.getModuleResolutionCache)==null?void 0:y.call(m))==null?void 0:u.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:IS(this.host.getCompilationSettings()),jsDocParsingMode:0};T=Zb(e,x,A,S,!0,d)}else if(this.currentFileVersion!==S){let A=x.getChangeRange(this.currentFileScriptSnapshot);T=s7(this.currentSourceFile,x,S,A)}return T&&(this.currentFileVersion=S,this.currentFileName=e,this.currentFileScriptSnapshot=x,this.currentSourceFile=T),this.currentSourceFile}},y7={isCancellationRequested:Qf,throwIfCancellationRequested:gr},g7=class{constructor(e){this.cancellationToken=e}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw(e=ba)==null||e.instant(ba.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new sd}},b7=class{constructor(e,t=20){this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}isCancellationRequested(){let e=ga();return Math.abs(e-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds?(this.lastCancellationCheckTime=e,this.hostCancellationToken.isCancellationRequested()):!1}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw(e=ba)==null||e.instant(ba.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new sd}},sg=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes"],v7=[...sg,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"],ES(yF())}}),kF=()=>{},DF=()=>{},PF=()=>{},IF=()=>{},NF=()=>{},OF=()=>{},MF=()=>{},LF=()=>{},JF=()=>{},RF=()=>{},jF=()=>{},FF=()=>{},BF=()=>{},UF=()=>{},qF=()=>{},zF=()=>{},WF=()=>{},VF=()=>{},T7=It({"src/services/_namespaces/ts.ts"(){"use strict";En(),Kb(),iF(),Q8(),aF(),Y8(),oF(),sF(),_F(),cF(),lF(),uF(),pF(),fF(),AF(),kF(),DF(),PF(),IF(),NF(),OF(),MF(),LF(),JF(),RF(),K8(),Z8(),jF(),FF(),e7(),BF(),UF(),qF(),zF(),WF(),VF()}}),HF=It({"src/typingsInstallerCore/_namespaces/ts.ts"(){"use strict";En(),Kb(),C7()}});function _v(e,t,n,a){try{let _=resolveModuleName(t,Qt(e,"index.d.ts"),{moduleResolution:2},n);return _.resolvedModule&&_.resolvedModule.resolvedFileName}catch(_){a.isEnabled()&&a.writeLine(`Failed to resolve ${t} in folder '${e}': ${_.message}`);return}}function GF(e,t,n,a){let _=!1;for(let p=n.length;p>0;){let m=S7(e,t,n,p);p=m.remaining,_=a(m.command)||_}return _}function S7(e,t,n,a){let _=n.length-a,p,m=a;for(;p=`${e} install --ignore-scripts ${(m===n.length?n:n.slice(_,_+m)).join(" ")} --save-dev --user-agent="typesInstaller/${t}"`,!(p.length<8e3);)m=m-Math.floor(m/2);return{command:p,remaining:a-m}}function x7(e){return`@types/${e}@ts${jd}`}var cv,w7,XF=It({"src/typingsInstallerCore/typingsInstaller.ts"(){"use strict";HF(),C7(),cv={isEnabled:()=>!1,writeLine:gr},w7=class{constructor(e,t,n,a,_,p=cv){this.installTypingHost=e,this.globalCachePath=t,this.safeListPath=n,this.typesMapLocation=a,this.throttleLimit=_,this.log=p,this.packageNameToTypingLocation=new Map,this.missingTypingsSet=new Set,this.knownCachesSet=new Set,this.projectWatchers=new Map,this.pendingRunRequests=[],this.installRunCount=1,this.inFlightRequestCount=0,this.latestDistTag="latest",this.log.isEnabled()&&this.log.writeLine(`Global cache location '${t}', safe file path '${n}', types map path ${a}`),this.processCacheLocation(this.globalCachePath)}closeProject(e){this.closeWatchers(e.projectName)}closeWatchers(e){if(this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}'`),!this.projectWatchers.get(e)){this.log.isEnabled()&&this.log.writeLine(`No watchers are registered for project '${e}'`);return}this.projectWatchers.delete(e),this.sendResponse({kind:ActionWatchTypingLocations,projectName:e,files:[]}),this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}' - done.`)}install(e){this.log.isEnabled()&&this.log.writeLine(`Got install request${stringifyIndented(e)}`),e.cachePath&&(this.log.isEnabled()&&this.log.writeLine(`Request specifies cache path '${e.cachePath}', loading cached information...`),this.processCacheLocation(e.cachePath)),this.safeList===void 0&&this.initializeSafeList();let t=ts_JsTyping_exports.discoverTypings(this.installTypingHost,this.log.isEnabled()?n=>this.log.writeLine(n):void 0,e.fileNames,e.projectRootPath,this.safeList,this.packageNameToTypingLocation,e.typeAcquisition,e.unresolvedImports,this.typesRegistry,e.compilerOptions);this.watchFiles(e.projectName,t.filesToWatch),t.newTypingNames.length?this.installTypings(e,e.cachePath||this.globalCachePath,t.cachedTypingPaths,t.newTypingNames):(this.sendResponse(this.createSetTypings(e,t.cachedTypingPaths)),this.log.isEnabled()&&this.log.writeLine("No new typings were requested as a result of typings discovery"))}initializeSafeList(){if(this.typesMapLocation){let e=ts_JsTyping_exports.loadTypesMap(this.installTypingHost,this.typesMapLocation);if(e){this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`),this.safeList=e;return}this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`)}this.safeList=ts_JsTyping_exports.loadSafeList(this.installTypingHost,this.safeListPath)}processCacheLocation(e){if(this.log.isEnabled()&&this.log.writeLine(`Processing cache location '${e}'`),this.knownCachesSet.has(e)){this.log.isEnabled()&&this.log.writeLine("Cache location was already processed...");return}let t=Qt(e,"package.json"),n=Qt(e,"package-lock.json");if(this.log.isEnabled()&&this.log.writeLine(`Trying to find '${t}'...`),this.installTypingHost.fileExists(t)&&this.installTypingHost.fileExists(n)){let a=JSON.parse(this.installTypingHost.readFile(t)),_=JSON.parse(this.installTypingHost.readFile(n));if(this.log.isEnabled()&&(this.log.writeLine(`Loaded content of '${t}':${stringifyIndented(a)}`),this.log.writeLine(`Loaded content of '${n}':${stringifyIndented(_)}`)),a.devDependencies&&_.dependencies)for(let p in a.devDependencies){if(!Wn(_.dependencies,p))continue;let m=os(p);if(!m)continue;let y=_v(e,m,this.installTypingHost,this.log);if(!y){this.missingTypingsSet.add(m);continue}let u=this.packageNameToTypingLocation.get(m);if(u){if(u.typingLocation===y)continue;this.log.isEnabled()&&this.log.writeLine(`New typing for package ${m} from '${y}' conflicts with existing typing file '${u}'`)}this.log.isEnabled()&&this.log.writeLine(`Adding entry into typings cache: '${m}' => '${y}'`);let x=Sv(_.dependencies,p),d=x&&x.version;if(!d)continue;let S={typingLocation:y,version:new Version(d)};this.packageNameToTypingLocation.set(m,S)}}this.log.isEnabled()&&this.log.writeLine(`Finished processing cache location '${e}'`),this.knownCachesSet.add(e)}filterTypings(e){return wa(e,t=>{let n=mangleScopedPackageName(t);if(this.missingTypingsSet.has(n)){this.log.isEnabled()&&this.log.writeLine(`'${t}':: '${n}' is in missingTypingsSet - skipping...`);return}let a=ts_JsTyping_exports.validatePackageName(t);if(a!==ts_JsTyping_exports.NameValidationResult.Ok){this.missingTypingsSet.add(n),this.log.isEnabled()&&this.log.writeLine(ts_JsTyping_exports.renderPackageNameValidationFailure(a,t));return}if(!this.typesRegistry.has(n)){this.log.isEnabled()&&this.log.writeLine(`'${t}':: Entry for package '${n}' does not exist in local types registry - skipping...`);return}if(this.packageNameToTypingLocation.get(n)&&ts_JsTyping_exports.isTypingUpToDate(this.packageNameToTypingLocation.get(n),this.typesRegistry.get(n))){this.log.isEnabled()&&this.log.writeLine(`'${t}':: '${n}' already has an up-to-date typing - skipping...`);return}return n})}ensurePackageDirectoryExists(e){let t=Qt(e,"package.json");this.log.isEnabled()&&this.log.writeLine(`Npm config file: ${t}`),this.installTypingHost.fileExists(t)||(this.log.isEnabled()&&this.log.writeLine(`Npm config file: '${t}' is missing, creating new one...`),this.ensureDirectoryExists(e,this.installTypingHost),this.installTypingHost.writeFile(t,'{ "private": true }'))}installTypings(e,t,n,a){this.log.isEnabled()&&this.log.writeLine(`Installing typings ${JSON.stringify(a)}`);let _=this.filterTypings(a);if(_.length===0){this.log.isEnabled()&&this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"),this.sendResponse(this.createSetTypings(e,n));return}this.ensurePackageDirectoryExists(t);let p=this.installRunCount;this.installRunCount++,this.sendResponse({kind:EventBeginInstallTypes,eventId:p,typingsInstallerVersion:Xf,projectName:e.projectName});let m=_.map(x7);this.installTypingsAsync(p,m,t,y=>{try{if(!y){this.log.isEnabled()&&this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(_)}`);for(let x of _)this.missingTypingsSet.add(x);return}this.log.isEnabled()&&this.log.writeLine(`Installed typings ${JSON.stringify(m)}`);let u=[];for(let x of _){let d=_v(t,x,this.installTypingHost,this.log);if(!d){this.missingTypingsSet.add(x);continue}let S=this.typesRegistry.get(x),T=new Version(S[`ts${jd}`]||S[this.latestDistTag]),A={typingLocation:d,version:T};this.packageNameToTypingLocation.set(x,A),u.push(d)}this.log.isEnabled()&&this.log.writeLine(`Installed typing files ${JSON.stringify(u)}`),this.sendResponse(this.createSetTypings(e,n.concat(u)))}finally{let u={kind:EventEndInstallTypes,eventId:p,projectName:e.projectName,packagesToInstall:m,installSuccess:y,typingsInstallerVersion:Xf};this.sendResponse(u)}})}ensureDirectoryExists(e,t){let n=Mi(e);t.directoryExists(n)||this.ensureDirectoryExists(n,t),t.directoryExists(e)||t.createDirectory(e)}watchFiles(e,t){if(!t.length){this.closeWatchers(e);return}let n=this.projectWatchers.get(e),a=new Set(t);!n||C0(a,_=>!n.has(_))||C0(n,_=>!a.has(_))?(this.projectWatchers.set(e,a),this.sendResponse({kind:ActionWatchTypingLocations,projectName:e,files:t})):this.sendResponse({kind:ActionWatchTypingLocations,projectName:e,files:void 0})}createSetTypings(e,t){return{projectName:e.projectName,typeAcquisition:e.typeAcquisition,compilerOptions:e.compilerOptions,typings:t,unresolvedImports:e.unresolvedImports,kind:ActionSet}}installTypingsAsync(e,t,n,a){this.pendingRunRequests.unshift({requestId:e,packageNames:t,cwd:n,onRequestCompleted:a}),this.executeWithThrottling()}executeWithThrottling(){for(;this.inFlightRequestCount{this.inFlightRequestCount--,e.onRequestCompleted(t),this.executeWithThrottling()})}}}}}),E7={};_g(E7,{TypingsInstaller:()=>w7,getNpmCommandForInstallation:()=>S7,installNpmPackages:()=>GF,typingsName:()=>x7});var $F=It({"src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts"(){"use strict";XF()}}),C7=It({"src/typingsInstallerCore/_namespaces/ts.server.ts"(){"use strict";$8(),$F()}}),QF=()=>{},YF=()=>{},A7={};_g(A7,{ActionInvalidate:()=>ActionInvalidate,ActionPackageInstalled:()=>ActionPackageInstalled,ActionSet:()=>ActionSet,ActionWatchTypingLocations:()=>ActionWatchTypingLocations,Arguments:()=>Arguments,AutoImportProviderProject:()=>AutoImportProviderProject,AuxiliaryProject:()=>AuxiliaryProject,CharRangeSection:()=>CharRangeSection,CloseFileWatcherEvent:()=>CloseFileWatcherEvent,CommandNames:()=>CommandNames,ConfigFileDiagEvent:()=>ConfigFileDiagEvent,ConfiguredProject:()=>ConfiguredProject2,CreateDirectoryWatcherEvent:()=>CreateDirectoryWatcherEvent,CreateFileWatcherEvent:()=>CreateFileWatcherEvent,Errors:()=>Errors,EventBeginInstallTypes:()=>EventBeginInstallTypes,EventEndInstallTypes:()=>EventEndInstallTypes,EventInitializationFailed:()=>EventInitializationFailed,EventTypesRegistry:()=>EventTypesRegistry,ExternalProject:()=>ExternalProject2,GcTimer:()=>GcTimer,InferredProject:()=>InferredProject2,LargeFileReferencedEvent:()=>LargeFileReferencedEvent,LineIndex:()=>LineIndex,LineLeaf:()=>LineLeaf,LineNode:()=>LineNode,LogLevel:()=>LogLevel2,Msg:()=>Msg,OpenFileInfoTelemetryEvent:()=>OpenFileInfoTelemetryEvent,Project:()=>Project3,ProjectInfoTelemetryEvent:()=>ProjectInfoTelemetryEvent,ProjectKind:()=>ProjectKind,ProjectLanguageServiceStateEvent:()=>ProjectLanguageServiceStateEvent,ProjectLoadingFinishEvent:()=>ProjectLoadingFinishEvent,ProjectLoadingStartEvent:()=>ProjectLoadingStartEvent,ProjectReferenceProjectLoadKind:()=>ProjectReferenceProjectLoadKind,ProjectService:()=>ProjectService3,ProjectsUpdatedInBackgroundEvent:()=>ProjectsUpdatedInBackgroundEvent,ScriptInfo:()=>ScriptInfo,ScriptVersionCache:()=>ScriptVersionCache,Session:()=>Session3,TextStorage:()=>TextStorage,ThrottledOperations:()=>ThrottledOperations,TypingsCache:()=>TypingsCache,allFilesAreJsOrDts:()=>allFilesAreJsOrDts,allRootFilesAreJsOrDts:()=>allRootFilesAreJsOrDts,asNormalizedPath:()=>asNormalizedPath,convertCompilerOptions:()=>convertCompilerOptions,convertFormatOptions:()=>convertFormatOptions,convertScriptKindName:()=>convertScriptKindName,convertTypeAcquisition:()=>convertTypeAcquisition,convertUserPreferences:()=>convertUserPreferences,convertWatchOptions:()=>convertWatchOptions,countEachFileTypes:()=>countEachFileTypes,createInstallTypingsRequest:()=>createInstallTypingsRequest,createModuleSpecifierCache:()=>createModuleSpecifierCache,createNormalizedPathMap:()=>createNormalizedPathMap,createPackageJsonCache:()=>createPackageJsonCache,createSortedArray:()=>createSortedArray2,emptyArray:()=>emptyArray2,findArgument:()=>findArgument,forEachResolvedProjectReferenceProject:()=>forEachResolvedProjectReferenceProject,formatDiagnosticToProtocol:()=>formatDiagnosticToProtocol,formatMessage:()=>formatMessage2,getBaseConfigFileName:()=>getBaseConfigFileName,getLocationInNewDocument:()=>getLocationInNewDocument,hasArgument:()=>hasArgument,hasNoTypeScriptSource:()=>hasNoTypeScriptSource,indent:()=>indent2,isBackgroundProject:()=>isBackgroundProject,isConfigFile:()=>isConfigFile,isConfiguredProject:()=>isConfiguredProject,isDynamicFileName:()=>isDynamicFileName,isExternalProject:()=>isExternalProject,isInferredProject:()=>isInferredProject,isInferredProjectName:()=>isInferredProjectName,makeAutoImportProviderProjectName:()=>makeAutoImportProviderProjectName,makeAuxiliaryProjectName:()=>makeAuxiliaryProjectName,makeInferredProjectName:()=>makeInferredProjectName,maxFileSize:()=>maxFileSize,maxProgramSizeForNonTsFiles:()=>maxProgramSizeForNonTsFiles,normalizedPathToPath:()=>normalizedPathToPath,nowString:()=>nowString,nullCancellationToken:()=>nullCancellationToken,nullTypingsInstaller:()=>nullTypingsInstaller,projectContainsInfoDirectly:()=>projectContainsInfoDirectly,protocol:()=>ts_server_protocol_exports,removeSorted:()=>removeSorted,stringifyIndented:()=>stringifyIndented,toEvent:()=>toEvent,toNormalizedPath:()=>toNormalizedPath,tryConvertScriptKindName:()=>tryConvertScriptKindName,typingsInstaller:()=>E7,updateProjectIfDirty:()=>updateProjectIfDirty});var KF=It({"src/typescript/_namespaces/ts.server.ts"(){"use strict";$8(),QF()}}),k7={};_g(k7,{ANONYMOUS:()=>ANONYMOUS,AccessFlags:()=>jy,AssertionLevel:()=>_y,AssignmentDeclarationKind:()=>Gy,AssignmentKind:()=>V0,Associativity:()=>G0,BreakpointResolver:()=>ts_BreakpointResolver_exports,BuilderFileEmit:()=>BuilderFileEmit,BuilderProgramKind:()=>BuilderProgramKind,BuilderState:()=>BuilderState,BundleFileSectionKind:()=>f0,CallHierarchy:()=>ts_CallHierarchy_exports,CharacterCodes:()=>o0,CheckFlags:()=>Oy,CheckMode:()=>CheckMode,ClassificationType:()=>ClassificationType,ClassificationTypeNames:()=>ClassificationTypeNames,CommentDirectiveType:()=>hy,Comparison:()=>ry,CompletionInfoFlags:()=>CompletionInfoFlags,CompletionTriggerKind:()=>CompletionTriggerKind,Completions:()=>ts_Completions_exports,ContainerFlags:()=>ContainerFlags,ContextFlags:()=>wy,Debug:()=>I,DiagnosticCategory:()=>pd,Diagnostics:()=>B,DocumentHighlights:()=>DocumentHighlights,ElementFlags:()=>Ry,EmitFlags:()=>hd,EmitHint:()=>l0,EmitOnly:()=>by,EndOfLineState:()=>EndOfLineState,EnumKind:()=>Ny,ExitStatus:()=>Ty,ExportKind:()=>ExportKind,Extension:()=>s0,ExternalEmitHelpers:()=>c0,FileIncludeKind:()=>yy,FilePreprocessingDiagnosticsKind:()=>gy,FileSystemEntryKind:()=>FileSystemEntryKind,FileWatcherEventKind:()=>FileWatcherEventKind,FindAllReferences:()=>ts_FindAllReferences_exports,FlattenLevel:()=>FlattenLevel,FlowFlags:()=>Tl,ForegroundColorEscapeSequences:()=>ForegroundColorEscapeSequences,FunctionFlags:()=>H0,GeneratedIdentifierFlags:()=>dy,GetLiteralTextFlags:()=>W0,GoToDefinition:()=>ts_GoToDefinition_exports,HighlightSpanKind:()=>HighlightSpanKind,IdentifierNameMap:()=>IdentifierNameMap,IdentifierNameMultiMap:()=>IdentifierNameMultiMap,ImportKind:()=>ImportKind,ImportsNotUsedAsValues:()=>t0,IndentStyle:()=>IndentStyle,IndexFlags:()=>Fy,IndexKind:()=>qy,InferenceFlags:()=>Vy,InferencePriority:()=>Wy,InlayHintKind:()=>InlayHintKind,InlayHints:()=>ts_InlayHints_exports,InternalEmitFlags:()=>_0,InternalSymbolName:()=>My,InvalidatedProjectKind:()=>InvalidatedProjectKind,JSDocParsingMode:()=>h0,JsDoc:()=>ts_JsDoc_exports,JsTyping:()=>ts_JsTyping_exports,JsxEmit:()=>e0,JsxFlags:()=>fy,JsxReferenceKind:()=>By,LanguageServiceMode:()=>LanguageServiceMode,LanguageVariant:()=>i0,LexicalEnvironmentFlags:()=>p0,ListFormat:()=>d0,LogLevel:()=>ly,MemberOverrideStatus:()=>Sy,ModifierFlags:()=>ad,ModuleDetectionKind:()=>$y,ModuleInstanceState:()=>ModuleInstanceState,ModuleKind:()=>Zy,ModuleResolutionKind:()=>Xy,ModuleSpecifierEnding:()=>K0,NavigateTo:()=>ts_NavigateTo_exports,NavigationBar:()=>ts_NavigationBar_exports,NewLineKind:()=>n0,NodeBuilderFlags:()=>Ey,NodeCheckFlags:()=>Ly,NodeFactoryFlags:()=>Z0,NodeFlags:()=>id,NodeResolutionFeatures:()=>NodeResolutionFeatures,ObjectFlags:()=>ld,OperationCanceledException:()=>sd,OperatorPrecedence:()=>X0,OrganizeImports:()=>ts_OrganizeImports_exports,OrganizeImportsMode:()=>OrganizeImportsMode,OuterExpressionKinds:()=>u0,OutliningElementsCollector:()=>ts_OutliningElementsCollector_exports,OutliningSpanKind:()=>OutliningSpanKind,OutputFileType:()=>OutputFileType,PackageJsonAutoImportPreference:()=>PackageJsonAutoImportPreference,PackageJsonDependencyGroup:()=>PackageJsonDependencyGroup,PatternMatchKind:()=>PatternMatchKind,PollingInterval:()=>PollingInterval,PollingWatchKind:()=>Ky,PragmaKindFlags:()=>m0,PrivateIdentifierKind:()=>PrivateIdentifierKind,ProcessLevel:()=>ProcessLevel,ProgramUpdateLevel:()=>ProgramUpdateLevel,QuotePreference:()=>QuotePreference,RelationComparisonResult:()=>od,Rename:()=>ts_Rename_exports,ScriptElementKind:()=>ScriptElementKind,ScriptElementKindModifier:()=>ScriptElementKindModifier,ScriptKind:()=>fd,ScriptSnapshot:()=>ScriptSnapshot,ScriptTarget:()=>r0,SemanticClassificationFormat:()=>SemanticClassificationFormat,SemanticMeaning:()=>SemanticMeaning,SemicolonPreference:()=>SemicolonPreference,SignatureCheckMode:()=>SignatureCheckMode,SignatureFlags:()=>ud,SignatureHelp:()=>ts_SignatureHelp_exports,SignatureKind:()=>Uy,SmartSelectionRange:()=>ts_SmartSelectionRange_exports,SnippetKind:()=>md,SortKind:()=>oy,StructureIsReused:()=>vy,SymbolAccessibility:()=>ky,SymbolDisplay:()=>ts_SymbolDisplay_exports,SymbolDisplayPartKind:()=>SymbolDisplayPartKind,SymbolFlags:()=>_d,SymbolFormatFlags:()=>Ay,SyntaxKind:()=>rd,SyntheticSymbolKind:()=>Dy,Ternary:()=>Hy,ThrottledCancellationToken:()=>b7,TokenClass:()=>TokenClass,TokenFlags:()=>my,TransformFlags:()=>dd,TypeFacts:()=>TypeFacts,TypeFlags:()=>cd,TypeFormatFlags:()=>Cy,TypeMapKind:()=>zy,TypePredicateKind:()=>Py,TypeReferenceSerializationKind:()=>Iy,UnionReduction:()=>xy,UpToDateStatusType:()=>UpToDateStatusType,VarianceFlags:()=>Jy,Version:()=>Version,VersionRange:()=>VersionRange,WatchDirectoryFlags:()=>a0,WatchDirectoryKind:()=>Yy,WatchFileKind:()=>Qy,WatchLogLevel:()=>WatchLogLevel,WatchType:()=>WatchType,accessPrivateIdentifier:()=>accessPrivateIdentifier,addDisposableResourceHelper:()=>addDisposableResourceHelper,addEmitFlags:()=>addEmitFlags,addEmitHelper:()=>addEmitHelper,addEmitHelpers:()=>addEmitHelpers,addInternalEmitFlags:()=>addInternalEmitFlags,addNodeFactoryPatcher:()=>VM,addObjectAllocatorPatcher:()=>_O,addRange:()=>zn,addRelatedInfo:()=>ol,addSyntheticLeadingComment:()=>addSyntheticLeadingComment,addSyntheticTrailingComment:()=>addSyntheticTrailingComment,addToSeen:()=>$N,advancedAsyncSuperHelper:()=>advancedAsyncSuperHelper,affectsDeclarationPathOptionDeclarations:()=>affectsDeclarationPathOptionDeclarations,affectsEmitOptionDeclarations:()=>affectsEmitOptionDeclarations,allKeysStartWithDot:()=>allKeysStartWithDot,altDirectorySeparator:()=>Cg,and:()=>SE,append:()=>Et,appendIfUnique:()=>gv,arrayFrom:()=>Ud,arrayIsEqualTo:()=>k9,arrayIsHomogeneous:()=>mM,arrayIsSorted:()=>C9,arrayOf:()=>U9,arrayReverseIterator:()=>N9,arrayToMap:()=>z9,arrayToMultiMap:()=>wv,arrayToNumericMap:()=>W9,arraysEqual:()=>pv,assertType:()=>wE,assign:()=>q9,assignHelper:()=>assignHelper,asyncDelegator:()=>asyncDelegator,asyncGeneratorHelper:()=>asyncGeneratorHelper,asyncSuperHelper:()=>asyncSuperHelper,asyncValues:()=>asyncValues,attachFileToDiagnostics:()=>Ya,awaitHelper:()=>awaitHelper,awaiterHelper:()=>awaiterHelper,base64decode:()=>yN,base64encode:()=>hN,binarySearch:()=>Jl,binarySearchKey:()=>Tv,bindSourceFile:()=>bindSourceFile,breakIntoCharacterSpans:()=>breakIntoCharacterSpans,breakIntoWordSpans:()=>breakIntoWordSpans,buildLinkParts:()=>buildLinkParts,buildOpts:()=>buildOpts,buildOverload:()=>buildOverload,bundlerModuleNameResolver:()=>bundlerModuleNameResolver,canBeConvertedToAsync:()=>canBeConvertedToAsync,canHaveDecorators:()=>j8,canHaveExportModifier:()=>kM,canHaveFlowNode:()=>OP,canHaveIllegalDecorators:()=>lR,canHaveIllegalModifiers:()=>uR,canHaveIllegalType:()=>cR,canHaveIllegalTypeParameters:()=>L8,canHaveJSDoc:()=>ym,canHaveLocals:()=>BA,canHaveModifiers:()=>U_,canHaveSymbol:()=>FA,canJsonReportNoInputFiles:()=>canJsonReportNoInputFiles,canProduceDiagnostics:()=>canProduceDiagnostics,canUsePropertyAccess:()=>DM,canWatchAffectingLocation:()=>canWatchAffectingLocation,canWatchAtTypes:()=>canWatchAtTypes,canWatchDirectoryOrFile:()=>canWatchDirectoryOrFile,cartesianProduct:()=>CE,cast:()=>wi,chainBundle:()=>chainBundle,chainDiagnosticMessages:()=>il,changeAnyExtension:()=>Wv,changeCompilerHostLikeToUseCache:()=>changeCompilerHostLikeToUseCache,changeExtension:()=>KO,changesAffectModuleResolution:()=>ok,changesAffectingProgramStructure:()=>sk,childIsDecorated:()=>d2,classElementOrClassElementParameterIsDecorated:()=>nP,classHasClassThisAssignment:()=>classHasClassThisAssignment,classHasDeclaredOrExplicitlyAssignedName:()=>classHasDeclaredOrExplicitlyAssignedName,classHasExplicitlyAssignedName:()=>classHasExplicitlyAssignedName,classOrConstructorParameterIsDecorated:()=>tP,classPrivateFieldGetHelper:()=>classPrivateFieldGetHelper,classPrivateFieldInHelper:()=>classPrivateFieldInHelper,classPrivateFieldSetHelper:()=>classPrivateFieldSetHelper,classicNameResolver:()=>classicNameResolver,classifier:()=>ts_classifier_exports,cleanExtendedConfigCache:()=>cleanExtendedConfigCache,clear:()=>_9,clearMap:()=>zN,clearSharedExtendedConfigFileWatcher:()=>clearSharedExtendedConfigFileWatcher,climbPastPropertyAccess:()=>climbPastPropertyAccess,climbPastPropertyOrElementAccess:()=>climbPastPropertyOrElementAccess,clone:()=>G9,cloneCompilerOptions:()=>cloneCompilerOptions,closeFileWatcher:()=>JN,closeFileWatcherOf:()=>closeFileWatcherOf,codefix:()=>ts_codefix_exports,collapseTextChangeRangesAcrossMultipleVersions:()=>vC,collectExternalModuleInfo:()=>collectExternalModuleInfo,combine:()=>I9,combinePaths:()=>Qt,commentPragmas:()=>Vd,commonOptionsWithBuild:()=>commonOptionsWithBuild,commonPackageFolders:()=>Q0,compact:()=>D9,compareBooleans:()=>pE,compareDataObjects:()=>vS,compareDiagnostics:()=>H2,compareDiagnosticsSkipRelatedInformation:()=>Cd,compareEmitHelpers:()=>compareEmitHelpers,compareNumberOfDirectorySeparators:()=>YO,comparePaths:()=>Vv,comparePathsCaseInsensitive:()=>$E,comparePathsCaseSensitive:()=>XE,comparePatternKeys:()=>comparePatternKeys,compareProperties:()=>uE,compareStringsCaseInsensitive:()=>zd,compareStringsCaseInsensitiveEslintCompatible:()=>_E,compareStringsCaseSensitive:()=>Ii,compareStringsCaseSensitiveUI:()=>lE,compareTextSpans:()=>oE,compareValues:()=>Mn,compileOnSaveCommandLineOption:()=>compileOnSaveCommandLineOption,compilerOptionsAffectDeclarationPath:()=>NO,compilerOptionsAffectEmit:()=>IO,compilerOptionsAffectSemanticDiagnostics:()=>PO,compilerOptionsDidYouMeanDiagnostics:()=>compilerOptionsDidYouMeanDiagnostics,compilerOptionsIndicateEsModules:()=>compilerOptionsIndicateEsModules,compose:()=>aE,computeCommonSourceDirectoryOfFilenames:()=>computeCommonSourceDirectoryOfFilenames,computeLineAndCharacterOfPosition:()=>kg,computeLineOfPosition:()=>__,computeLineStarts:()=>Xd,computePositionOfLineAndCharacter:()=>Ag,computeSignature:()=>computeSignature,computeSignatureWithDiagnostics:()=>computeSignatureWithDiagnostics,computeSuggestionDiagnostics:()=>computeSuggestionDiagnostics,concatenate:()=>h_,concatenateDiagnosticMessageChains:()=>pO,consumesNodeCoreModules:()=>consumesNodeCoreModules,contains:()=>rs,containsIgnoredPath:()=>QS,containsObjectRestOrSpread:()=>Qb,containsParseError:()=>El,containsPath:()=>Hv,convertCompilerOptionsForTelemetry:()=>convertCompilerOptionsForTelemetry,convertCompilerOptionsFromJson:()=>convertCompilerOptionsFromJson,convertJsonOption:()=>convertJsonOption,convertToBase64:()=>pS,convertToJson:()=>convertToJson,convertToObject:()=>convertToObject,convertToOptionsWithAbsolutePaths:()=>convertToOptionsWithAbsolutePaths,convertToRelativePath:()=>YE,convertToTSConfig:()=>convertToTSConfig,convertTypeAcquisitionFromJson:()=>convertTypeAcquisitionFromJson,copyComments:()=>copyComments,copyEntries:()=>lk,copyLeadingComments:()=>copyLeadingComments,copyProperties:()=>$9,copyTrailingAsLeadingComments:()=>copyTrailingAsLeadingComments,copyTrailingComments:()=>copyTrailingComments,couldStartTrivia:()=>oC,countWhere:()=>o9,createAbstractBuilder:()=>createAbstractBuilder,createAccessorPropertyBackingField:()=>qR,createAccessorPropertyGetRedirector:()=>zR,createAccessorPropertySetRedirector:()=>WR,createBaseNodeFactory:()=>Ix,createBinaryExpressionTrampoline:()=>LR,createBindingHelper:()=>createBindingHelper,createBuildInfo:()=>createBuildInfo,createBuilderProgram:()=>createBuilderProgram,createBuilderProgramUsingProgramBuildInfo:()=>createBuilderProgramUsingProgramBuildInfo,createBuilderStatusReporter:()=>createBuilderStatusReporter,createCacheWithRedirects:()=>createCacheWithRedirects,createCacheableExportInfoMap:()=>createCacheableExportInfoMap,createCachedDirectoryStructureHost:()=>createCachedDirectoryStructureHost,createClassNamedEvaluationHelperBlock:()=>createClassNamedEvaluationHelperBlock,createClassThisAssignmentBlock:()=>createClassThisAssignmentBlock,createClassifier:()=>createClassifier,createCommentDirectivesMap:()=>Ik,createCompilerDiagnostic:()=>hl,createCompilerDiagnosticForInvalidCustomType:()=>createCompilerDiagnosticForInvalidCustomType,createCompilerDiagnosticFromMessageChain:()=>uO,createCompilerHost:()=>createCompilerHost,createCompilerHostFromProgramHost:()=>createCompilerHostFromProgramHost,createCompilerHostWorker:()=>createCompilerHostWorker,createDetachedDiagnostic:()=>Po,createDiagnosticCollection:()=>vI,createDiagnosticForFileFromMessageChain:()=>cD,createDiagnosticForNode:()=>aD,createDiagnosticForNodeArray:()=>oD,createDiagnosticForNodeArrayFromMessageChain:()=>_D,createDiagnosticForNodeFromMessageChain:()=>sD,createDiagnosticForNodeInSourceFile:()=>FT,createDiagnosticForRange:()=>uD,createDiagnosticMessageChainFromDiagnostic:()=>lD,createDiagnosticReporter:()=>createDiagnosticReporter,createDocumentPositionMapper:()=>createDocumentPositionMapper,createDocumentRegistry:()=>createDocumentRegistry,createDocumentRegistryInternal:()=>createDocumentRegistryInternal,createEmitAndSemanticDiagnosticsBuilderProgram:()=>createEmitAndSemanticDiagnosticsBuilderProgram,createEmitHelperFactory:()=>createEmitHelperFactory,createEmptyExports:()=>RJ,createExpressionForJsxElement:()=>FJ,createExpressionForJsxFragment:()=>BJ,createExpressionForObjectLiteralElementLike:()=>GJ,createExpressionForPropertyName:()=>w8,createExpressionFromEntityName:()=>x8,createExternalHelpersImportDeclarationIfNeeded:()=>nR,createFileDiagnostic:()=>V2,createFileDiagnosticFromMessageChain:()=>i2,createForOfBindingStatement:()=>UJ,createGetCanonicalFileName:()=>Wd,createGetSourceFile:()=>createGetSourceFile,createGetSymbolAccessibilityDiagnosticForNode:()=>createGetSymbolAccessibilityDiagnosticForNode,createGetSymbolAccessibilityDiagnosticForNodeName:()=>createGetSymbolAccessibilityDiagnosticForNodeName,createGetSymbolWalker:()=>createGetSymbolWalker,createIncrementalCompilerHost:()=>createIncrementalCompilerHost,createIncrementalProgram:()=>createIncrementalProgram,createInputFiles:()=>ZM,createInputFilesWithFilePaths:()=>Mx,createInputFilesWithFileTexts:()=>Lx,createJsxFactoryExpression:()=>S8,createLanguageService:()=>bF,createLanguageServiceSourceFile:()=>Zb,createMemberAccessForPropertyName:()=>Bm,createModeAwareCache:()=>createModeAwareCache,createModeAwareCacheKey:()=>createModeAwareCacheKey,createModuleNotFoundChain:()=>dk,createModuleResolutionCache:()=>createModuleResolutionCache,createModuleResolutionLoader:()=>createModuleResolutionLoader,createModuleResolutionLoaderUsingGlobalCache:()=>createModuleResolutionLoaderUsingGlobalCache,createModuleSpecifierResolutionHost:()=>createModuleSpecifierResolutionHost,createMultiMap:()=>qd,createNodeConverters:()=>Nx,createNodeFactory:()=>Pd,createOptionNameMap:()=>createOptionNameMap,createOverload:()=>createOverload,createPackageJsonImportFilter:()=>createPackageJsonImportFilter,createPackageJsonInfo:()=>createPackageJsonInfo,createParenthesizerRules:()=>createParenthesizerRules,createPatternMatcher:()=>createPatternMatcher,createPrependNodes:()=>createPrependNodes,createPrinter:()=>createPrinter,createPrinterWithDefaults:()=>createPrinterWithDefaults,createPrinterWithRemoveComments:()=>createPrinterWithRemoveComments,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>createPrinterWithRemoveCommentsNeverAsciiEscape,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>createPrinterWithRemoveCommentsOmitTrailingSemicolon,createProgram:()=>createProgram,createProgramHost:()=>createProgramHost,createPropertyNameNodeForIdentifierOrLiteral:()=>EM,createQueue:()=>K9,createRange:()=>Cm,createRedirectedBuilderProgram:()=>createRedirectedBuilderProgram,createResolutionCache:()=>createResolutionCache,createRuntimeTypeSerializer:()=>createRuntimeTypeSerializer,createScanner:()=>ss,createSemanticDiagnosticsBuilderProgram:()=>createSemanticDiagnosticsBuilderProgram,createSet:()=>Z9,createSolutionBuilder:()=>createSolutionBuilder,createSolutionBuilderHost:()=>createSolutionBuilderHost,createSolutionBuilderWithWatch:()=>createSolutionBuilderWithWatch,createSolutionBuilderWithWatchHost:()=>createSolutionBuilderWithWatchHost,createSortedArray:()=>E9,createSourceFile:()=>q8,createSourceMapGenerator:()=>createSourceMapGenerator,createSourceMapSource:()=>eL,createSuperAccessVariableStatement:()=>createSuperAccessVariableStatement,createSymbolTable:()=>ik,createSymlinkCache:()=>RO,createSystemWatchFunctions:()=>createSystemWatchFunctions,createTextChange:()=>createTextChange,createTextChangeFromStartLength:()=>createTextChangeFromStartLength,createTextChangeRange:()=>Yd,createTextRangeFromNode:()=>createTextRangeFromNode,createTextRangeFromSpan:()=>createTextRangeFromSpan,createTextSpan:()=>S_,createTextSpanFromBounds:()=>Xi,createTextSpanFromNode:()=>createTextSpanFromNode,createTextSpanFromRange:()=>createTextSpanFromRange,createTextSpanFromStringLiteralLikeContent:()=>createTextSpanFromStringLiteralLikeContent,createTextWriter:()=>AI,createTokenRange:()=>SN,createTypeChecker:()=>createTypeChecker,createTypeReferenceDirectiveResolutionCache:()=>createTypeReferenceDirectiveResolutionCache,createTypeReferenceResolutionLoader:()=>createTypeReferenceResolutionLoader,createUnparsedSourceFile:()=>QM,createWatchCompilerHost:()=>createWatchCompilerHost2,createWatchCompilerHostOfConfigFile:()=>createWatchCompilerHostOfConfigFile,createWatchCompilerHostOfFilesAndCompilerOptions:()=>createWatchCompilerHostOfFilesAndCompilerOptions,createWatchFactory:()=>createWatchFactory,createWatchHost:()=>createWatchHost,createWatchProgram:()=>createWatchProgram,createWatchStatusReporter:()=>createWatchStatusReporter,createWriteFileMeasuringIO:()=>createWriteFileMeasuringIO,declarationNameToString:()=>jT,decodeMappings:()=>decodeMappings,decodedTextSpanIntersectsWith:()=>Ng,decorateHelper:()=>decorateHelper,deduplicate:()=>hv,defaultIncludeSpec:()=>defaultIncludeSpec,defaultInitCompilerOptions:()=>defaultInitCompilerOptions,defaultMaximumTruncationLength:()=>_x,detectSortCaseSensitivity:()=>A9,diagnosticCategoryName:()=>jE,diagnosticToString:()=>diagnosticToString,directoryProbablyExists:()=>dS,directorySeparator:()=>vr,displayPart:()=>displayPart,displayPartsToString:()=>gF,disposeEmitNodes:()=>disposeEmitNodes,disposeResourcesHelper:()=>disposeResourcesHelper,documentSpansEqual:()=>documentSpansEqual,dumpTracingLegend:()=>dumpTracingLegend,elementAt:()=>Rv,elideNodes:()=>jR,emitComments:()=>Q3,emitDetachedComments:()=>HI,emitFiles:()=>emitFiles,emitFilesAndReportErrors:()=>emitFilesAndReportErrors,emitFilesAndReportErrorsAndGetExitStatus:()=>emitFilesAndReportErrorsAndGetExitStatus,emitModuleKindIsNonNodeESM:()=>hO,emitNewLineBeforeLeadingCommentOfPosition:()=>VI,emitNewLineBeforeLeadingComments:()=>X3,emitNewLineBeforeLeadingCommentsOfPosition:()=>$3,emitSkippedWithNoDiagnostics:()=>emitSkippedWithNoDiagnostics,emitUsingBuildInfo:()=>emitUsingBuildInfo,emptyArray:()=>Je,emptyFileSystemEntries:()=>Px,emptyMap:()=>gg,emptyOptions:()=>emptyOptions,emptySet:()=>Jv,endsWith:()=>is,ensurePathIsNonModuleName:()=>Sg,ensureScriptKind:()=>RS,ensureTrailingDirectorySeparator:()=>to,entityNameToString:()=>Ci,enumerateInsertsAndDeletes:()=>EE,equalOwnProperties:()=>xv,equateStringsCaseInsensitive:()=>s_,equateStringsCaseSensitive:()=>Rl,equateValues:()=>_o,esDecorateHelper:()=>esDecorateHelper,escapeJsxAttributeString:()=>J3,escapeLeadingUnderscores:()=>qr,escapeNonAsciiString:()=>wd,escapeSnippetText:()=>wM,escapeString:()=>xd,every:()=>so,expandPreOrPostfixIncrementOrDecrementExpression:()=>XJ,explainFiles:()=>explainFiles,explainIfFileIsRedirectAndImpliedFormat:()=>explainIfFileIsRedirectAndImpliedFormat,exportAssignmentIsAlias:()=>M0,exportStarHelper:()=>exportStarHelper,expressionResultIsUnused:()=>bM,extend:()=>X9,extendsHelper:()=>extendsHelper,extensionFromPath:()=>al,extensionIsTS:()=>VS,extensionsNotSupportingExtensionlessResolution:()=>Dm,externalHelpersModuleNameText:()=>km,factory:()=>zr,fileExtensionIs:()=>Na,fileExtensionIsOneOf:()=>ii,fileIncludeReasonToDiagnostics:()=>fileIncludeReasonToDiagnostics,fileShouldUseJavaScriptRequire:()=>fileShouldUseJavaScriptRequire,filter:()=>rr,filterMutate:()=>s9,filterSemanticDiagnostics:()=>filterSemanticDiagnostics,find:()=>ir,findAncestor:()=>or,findBestPatternMatch:()=>Ov,findChildOfKind:()=>findChildOfKind,findComputedPropertyNameCacheAssignment:()=>VR,findConfigFile:()=>findConfigFile,findContainingList:()=>findContainingList,findDiagnosticForNode:()=>findDiagnosticForNode,findFirstNonJsxWhitespaceToken:()=>findFirstNonJsxWhitespaceToken,findIndex:()=>ul,findLast:()=>lg,findLastIndex:()=>i9,findListItemInfo:()=>findListItemInfo,findMap:()=>a9,findModifier:()=>findModifier,findNextToken:()=>findNextToken,findPackageJson:()=>findPackageJson,findPackageJsons:()=>findPackageJsons,findPrecedingMatchingToken:()=>findPrecedingMatchingToken,findPrecedingToken:()=>findPrecedingToken,findSuperStatementIndexPath:()=>findSuperStatementIndexPath,findTokenOnLeftOfPosition:()=>findTokenOnLeftOfPosition,findUseStrictPrologue:()=>C8,first:()=>pg,firstDefined:()=>cg,firstDefinedIterator:()=>t9,firstIterator:()=>L9,firstOrOnly:()=>firstOrOnly,firstOrUndefined:()=>y_,firstOrUndefinedIterator:()=>M9,fixupCompilerOptions:()=>fixupCompilerOptions,flatMap:()=>zo,flatMapIterator:()=>u9,flatMapToMutable:()=>dv,flatten:()=>o_,flattenCommaList:()=>GR,flattenDestructuringAssignment:()=>flattenDestructuringAssignment,flattenDestructuringBinding:()=>flattenDestructuringBinding,flattenDiagnosticMessageText:()=>flattenDiagnosticMessageText,forEach:()=>wn,forEachAncestor:()=>_k,forEachAncestorDirectory:()=>Xv,forEachChild:()=>Wt,forEachChildRecursively:()=>ag,forEachEmittedFile:()=>forEachEmittedFile,forEachEnclosingBlockScopeContainer:()=>tD,forEachEntry:()=>ck,forEachExternalModuleToImportFrom:()=>forEachExternalModuleToImportFrom,forEachImportClauseDeclaration:()=>kP,forEachKey:()=>C0,forEachLeadingCommentRange:()=>sC,forEachNameInAccessChainWalkingLeft:()=>eO,forEachPropertyAssignment:()=>p2,forEachResolvedProjectReference:()=>forEachResolvedProjectReference,forEachReturnStatement:()=>wD,forEachRight:()=>e9,forEachTrailingCommentRange:()=>_C,forEachTsConfigPropArray:()=>VT,forEachUnique:()=>forEachUnique,forEachYieldExpression:()=>ED,forSomeAncestorDirectory:()=>HN,formatColorAndReset:()=>formatColorAndReset,formatDiagnostic:()=>formatDiagnostic,formatDiagnostics:()=>formatDiagnostics,formatDiagnosticsWithColorAndContext:()=>formatDiagnosticsWithColorAndContext,formatGeneratedName:()=>Od,formatGeneratedNamePart:()=>ig,formatLocation:()=>formatLocation,formatMessage:()=>lO,formatStringFromArgs:()=>P_,formatting:()=>ts_formatting_exports,fullTripleSlashAMDReferencePathRegEx:()=>ob,fullTripleSlashReferencePathRegEx:()=>ab,generateDjb2Hash:()=>generateDjb2Hash,generateTSConfig:()=>generateTSConfig,generatorHelper:()=>generatorHelper,getAdjustedReferenceLocation:()=>getAdjustedReferenceLocation,getAdjustedRenameLocation:()=>getAdjustedRenameLocation,getAliasDeclarationFromName:()=>b3,getAllAccessorDeclarations:()=>J2,getAllDecoratorsOfClass:()=>getAllDecoratorsOfClass,getAllDecoratorsOfClassElement:()=>getAllDecoratorsOfClassElement,getAllJSDocTags:()=>W4,getAllJSDocTagsOfKind:()=>RC,getAllKeys:()=>F9,getAllProjectOutputs:()=>getAllProjectOutputs,getAllSuperTypeNodes:()=>w3,getAllUnscopedEmitHelpers:()=>getAllUnscopedEmitHelpers,getAllowJSCompilerOption:()=>K2,getAllowSyntheticDefaultImports:()=>SO,getAncestor:()=>ZP,getAnyExtensionFromPath:()=>yd,getAreDeclarationMapsEnabled:()=>TO,getAssignedExpandoInitializer:()=>hP,getAssignedName:()=>k4,getAssignedNameOfIdentifier:()=>getAssignedNameOfIdentifier,getAssignmentDeclarationKind:()=>Oa,getAssignmentDeclarationPropertyAccessKind:()=>a3,getAssignmentTargetKind:()=>jP,getAutomaticTypeDirectiveNames:()=>getAutomaticTypeDirectiveNames,getBaseFileName:()=>os,getBinaryOperatorPrecedence:()=>ml,getBuildInfo:()=>getBuildInfo,getBuildInfoFileVersionMap:()=>getBuildInfoFileVersionMap,getBuildInfoText:()=>getBuildInfoText,getBuildOrderFromAnyBuildOrder:()=>getBuildOrderFromAnyBuildOrder,getBuilderCreationParameters:()=>getBuilderCreationParameters,getBuilderFileEmit:()=>getBuilderFileEmit,getCheckFlags:()=>bS,getClassExtendsHeritageElement:()=>S3,getClassLikeDeclarationOfSymbol:()=>SS,getCombinedLocalAndExportSymbolFlags:()=>FN,getCombinedModifierFlags:()=>Kd,getCombinedNodeFlags:()=>x_,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>SC,getCommentRange:()=>getCommentRange,getCommonSourceDirectory:()=>getCommonSourceDirectory,getCommonSourceDirectoryOfConfig:()=>getCommonSourceDirectoryOfConfig,getCompilerOptionValue:()=>z0,getCompilerOptionsDiffValue:()=>getCompilerOptionsDiffValue,getConditions:()=>getConditions,getConfigFileParsingDiagnostics:()=>getConfigFileParsingDiagnostics,getConstantValue:()=>getConstantValue,getContainerFlags:()=>getContainerFlags,getContainerNode:()=>getContainerNode,getContainingClass:()=>I0,getContainingClassExcludingClassDecorators:()=>zD,getContainingClassStaticBlock:()=>UD,getContainingFunction:()=>FD,getContainingFunctionDeclaration:()=>BD,getContainingFunctionOrClassStaticBlock:()=>qD,getContainingNodeArray:()=>vM,getContainingObjectLiteralElement:()=>_7,getContextualTypeFromParent:()=>getContextualTypeFromParent,getContextualTypeFromParentOrAncestorTypeNode:()=>getContextualTypeFromParentOrAncestorTypeNode,getCurrentTime:()=>getCurrentTime,getDeclarationDiagnostics:()=>getDeclarationDiagnostics,getDeclarationEmitExtensionForPath:()=>U3,getDeclarationEmitOutputFilePath:()=>II,getDeclarationEmitOutputFilePathWorker:()=>B3,getDeclarationFromName:()=>$P,getDeclarationModifierFlagsFromSymbol:()=>RN,getDeclarationOfKind:()=>nk,getDeclarationsOfKind:()=>rk,getDeclaredExpandoInitializer:()=>dP,getDecorators:()=>EC,getDefaultCompilerOptions:()=>i7,getDefaultExportInfoWorker:()=>getDefaultExportInfoWorker,getDefaultFormatCodeSettings:()=>getDefaultFormatCodeSettings,getDefaultLibFileName:()=>m4,getDefaultLibFilePath:()=>CF,getDefaultLikeExportInfo:()=>getDefaultLikeExportInfo,getDiagnosticText:()=>getDiagnosticText,getDiagnosticsWithinSpan:()=>getDiagnosticsWithinSpan,getDirectoryPath:()=>Mi,getDirectoryToWatchFailedLookupLocation:()=>getDirectoryToWatchFailedLookupLocation,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>getDirectoryToWatchFailedLookupLocationFromTypeRoot,getDocumentPositionMapper:()=>getDocumentPositionMapper,getESModuleInterop:()=>X2,getEditsForFileRename:()=>getEditsForFileRename,getEffectiveBaseTypeNode:()=>T3,getEffectiveConstraintOfTypeParameter:()=>UC,getEffectiveContainerForJSDocTemplateTag:()=>LP,getEffectiveImplementsTypeNodes:()=>x3,getEffectiveInitializer:()=>t3,getEffectiveJSDocHost:()=>w2,getEffectiveModifierFlags:()=>wm,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>tS,getEffectiveModifierFlagsNoCache:()=>iS,getEffectiveReturnTypeNode:()=>qI,getEffectiveSetAccessorTypeAnnotationNode:()=>WI,getEffectiveTypeAnnotationNode:()=>R2,getEffectiveTypeParameterDeclarations:()=>BC,getEffectiveTypeRoots:()=>getEffectiveTypeRoots,getElementOrPropertyAccessArgumentExpressionOrName:()=>hm,getElementOrPropertyAccessName:()=>ao,getElementsOfBindingOrAssignmentPattern:()=>M8,getEmitDeclarations:()=>Q2,getEmitFlags:()=>ai,getEmitHelpers:()=>getEmitHelpers,getEmitModuleDetectionKind:()=>NS,getEmitModuleKind:()=>_i,getEmitModuleResolutionKind:()=>N_,getEmitScriptTarget:()=>Ql,getEmitStandardClassFields:()=>DO,getEnclosingBlockScopeContainer:()=>A0,getEnclosingContainer:()=>eD,getEncodedSemanticClassifications:()=>getEncodedSemanticClassifications,getEncodedSyntacticClassifications:()=>getEncodedSyntacticClassifications,getEndLinePosition:()=>ET,getEntityNameFromTypeNode:()=>ZD,getEntrypointsFromPackageJsonInfo:()=>getEntrypointsFromPackageJsonInfo,getErrorCountForSummary:()=>getErrorCountForSummary,getErrorSpanForNode:()=>a2,getErrorSummaryText:()=>getErrorSummaryText,getEscapedTextOfIdentifierOrLiteral:()=>D3,getEscapedTextOfJsxAttributeName:()=>MM,getEscapedTextOfJsxNamespacedName:()=>Yl,getExpandoInitializer:()=>E_,getExportAssignmentExpression:()=>v3,getExportInfoMap:()=>getExportInfoMap,getExportNeedsImportStarHelper:()=>getExportNeedsImportStarHelper,getExpressionAssociativity:()=>yI,getExpressionPrecedence:()=>gI,getExternalHelpersModuleName:()=>D8,getExternalModuleImportEqualsDeclarationExpression:()=>iP,getExternalModuleName:()=>T2,getExternalModuleNameFromDeclaration:()=>DI,getExternalModuleNameFromPath:()=>M2,getExternalModuleNameLiteral:()=>iR,getExternalModuleRequireArgument:()=>aP,getFallbackOptions:()=>getFallbackOptions,getFileEmitOutput:()=>getFileEmitOutput,getFileMatcherPatterns:()=>JS,getFileNamesFromConfigSpecs:()=>getFileNamesFromConfigSpecs,getFileWatcherEventKind:()=>getFileWatcherEventKind,getFilesInErrorForSummary:()=>getFilesInErrorForSummary,getFirstConstructorWithBody:()=>W3,getFirstIdentifier:()=>aN,getFirstNonSpaceCharacterPosition:()=>getFirstNonSpaceCharacterPosition,getFirstProjectOutput:()=>getFirstProjectOutput,getFixableErrorSpanExpression:()=>getFixableErrorSpanExpression,getFormatCodeSettingsForWriting:()=>getFormatCodeSettingsForWriting,getFullWidth:()=>cm,getFunctionFlags:()=>aI,getHeritageClause:()=>gm,getHostSignatureFromJSDoc:()=>x2,getIdentifierAutoGenerate:()=>getIdentifierAutoGenerate,getIdentifierGeneratedImportReference:()=>getIdentifierGeneratedImportReference,getIdentifierTypeArguments:()=>getIdentifierTypeArguments,getImmediatelyInvokedFunctionExpression:()=>XD,getImpliedNodeFormatForFile:()=>getImpliedNodeFormatForFile,getImpliedNodeFormatForFileWorker:()=>getImpliedNodeFormatForFileWorker,getImportNeedsImportDefaultHelper:()=>getImportNeedsImportDefaultHelper,getImportNeedsImportStarHelper:()=>getImportNeedsImportStarHelper,getIndentSize:()=>Fo,getIndentString:()=>N2,getInferredLibraryNameResolveFrom:()=>getInferredLibraryNameResolveFrom,getInitializedVariables:()=>MN,getInitializerOfBinaryExpression:()=>o3,getInitializerOfBindingOrAssignmentElement:()=>N8,getInterfaceBaseTypeNodes:()=>E3,getInternalEmitFlags:()=>Jk,getInvokedExpression:()=>eP,getIsolatedModules:()=>G2,getJSDocAugmentsTag:()=>M4,getJSDocClassTag:()=>AC,getJSDocCommentRanges:()=>UT,getJSDocCommentsAndTags:()=>p3,getJSDocDeprecatedTag:()=>NC,getJSDocDeprecatedTagNoCache:()=>U4,getJSDocEnumTag:()=>OC,getJSDocHost:()=>d3,getJSDocImplementsTags:()=>L4,getJSDocOverrideTagNoCache:()=>B4,getJSDocParameterTags:()=>tm,getJSDocParameterTagsNoCache:()=>P4,getJSDocPrivateTag:()=>DC,getJSDocPrivateTagNoCache:()=>R4,getJSDocProtectedTag:()=>PC,getJSDocProtectedTagNoCache:()=>j4,getJSDocPublicTag:()=>kC,getJSDocPublicTagNoCache:()=>J4,getJSDocReadonlyTag:()=>IC,getJSDocReadonlyTagNoCache:()=>F4,getJSDocReturnTag:()=>q4,getJSDocReturnType:()=>z4,getJSDocRoot:()=>E2,getJSDocSatisfiesExpressionType:()=>OM,getJSDocSatisfiesTag:()=>Mg,getJSDocTags:()=>zl,getJSDocTagsNoCache:()=>JC,getJSDocTemplateTag:()=>LC,getJSDocThisTag:()=>MC,getJSDocType:()=>rm,getJSDocTypeAliasName:()=>rg,getJSDocTypeAssertionType:()=>KJ,getJSDocTypeParameterDeclarations:()=>G3,getJSDocTypeParameterTags:()=>N4,getJSDocTypeParameterTagsNoCache:()=>O4,getJSDocTypeTag:()=>nm,getJSXImplicitImportBase:()=>MO,getJSXRuntimeImport:()=>LO,getJSXTransformEnabled:()=>OO,getKeyForCompilerOptions:()=>getKeyForCompilerOptions,getLanguageVariant:()=>q0,getLastChild:()=>xS,getLeadingCommentRanges:()=>Ho,getLeadingCommentRangesOfNode:()=>SD,getLeftmostAccessExpression:()=>W2,getLeftmostExpression:()=>tO,getLibraryNameFromLibFileName:()=>getLibraryNameFromLibFileName,getLineAndCharacterOfPosition:()=>no,getLineInfo:()=>getLineInfo,getLineOfLocalPosition:()=>RI,getLineOfLocalPositionFromLineMap:()=>Ta,getLineStartPositionForPosition:()=>getLineStartPositionForPosition,getLineStarts:()=>Aa,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>IN,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>PN,getLinesBetweenPositions:()=>T_,getLinesBetweenRangeEndAndRangeStart:()=>AN,getLinesBetweenRangeEndPositions:()=>kN,getLiteralText:()=>Rk,getLocalNameForExternalImport:()=>rR,getLocalSymbolForExportDefault:()=>uN,getLocaleSpecificMessage:()=>I_,getLocaleTimeString:()=>getLocaleTimeString,getMappedContextSpan:()=>getMappedContextSpan,getMappedDocumentSpan:()=>getMappedDocumentSpan,getMappedLocation:()=>getMappedLocation,getMatchedFileSpec:()=>getMatchedFileSpec,getMatchedIncludeSpec:()=>getMatchedIncludeSpec,getMeaningFromDeclaration:()=>getMeaningFromDeclaration,getMeaningFromLocation:()=>getMeaningFromLocation,getMembersOfDeclaration:()=>AD,getModeForFileReference:()=>getModeForFileReference,getModeForResolutionAtIndex:()=>getModeForResolutionAtIndex,getModeForUsageLocation:()=>getModeForUsageLocation,getModifiedTime:()=>getModifiedTime,getModifiers:()=>bd,getModuleInstanceState:()=>getModuleInstanceState,getModuleNameStringLiteralAt:()=>getModuleNameStringLiteralAt,getModuleSpecifierEndingPreference:()=>XO,getModuleSpecifierResolverHost:()=>getModuleSpecifierResolverHost,getNameForExportedSymbol:()=>getNameForExportedSymbol,getNameFromIndexInfo:()=>nD,getNameFromPropertyName:()=>getNameFromPropertyName,getNameOfAccessExpression:()=>YN,getNameOfCompilerOptionValue:()=>getNameOfCompilerOptionValue,getNameOfDeclaration:()=>ql,getNameOfExpando:()=>bP,getNameOfJSDocTypedef:()=>A4,getNameOrArgument:()=>i3,getNameTable:()=>vF,getNamesForExportedSymbol:()=>getNamesForExportedSymbol,getNamespaceDeclarationNode:()=>_3,getNewLineCharacter:()=>mS,getNewLineKind:()=>getNewLineKind,getNewLineOrDefaultFromHost:()=>getNewLineOrDefaultFromHost,getNewTargetContainer:()=>HD,getNextJSDocCommentLocation:()=>f3,getNodeForGeneratedName:()=>FR,getNodeId:()=>getNodeId,getNodeKind:()=>getNodeKind,getNodeModifiers:()=>getNodeModifiers,getNodeModulePathParts:()=>CM,getNonAssignedNameOfDeclaration:()=>em,getNonAssignmentOperatorForCompoundAssignment:()=>getNonAssignmentOperatorForCompoundAssignment,getNonAugmentationDeclaration:()=>LT,getNonDecoratorTokenPosOfNode:()=>Nk,getNormalizedAbsolutePath:()=>Gi,getNormalizedAbsolutePathWithoutRoot:()=>GE,getNormalizedPathComponents:()=>Gd,getObjectFlags:()=>Ff,getOperator:()=>I2,getOperatorAssociativity:()=>N3,getOperatorPrecedence:()=>O3,getOptionFromName:()=>getOptionFromName,getOptionsForLibraryResolution:()=>getOptionsForLibraryResolution,getOptionsNameMap:()=>getOptionsNameMap,getOrCreateEmitNode:()=>getOrCreateEmitNode,getOrCreateExternalHelpersModuleNameIfNeeded:()=>P8,getOrUpdate:()=>m9,getOriginalNode:()=>Bl,getOriginalNodeId:()=>getOriginalNodeId,getOriginalSourceFile:()=>hI,getOutputDeclarationFileName:()=>getOutputDeclarationFileName,getOutputExtension:()=>getOutputExtension,getOutputFileNames:()=>getOutputFileNames,getOutputPathsFor:()=>getOutputPathsFor,getOutputPathsForBundle:()=>getOutputPathsForBundle,getOwnEmitOutputFilePath:()=>PI,getOwnKeys:()=>fg,getOwnValues:()=>B9,getPackageJsonInfo:()=>getPackageJsonInfo,getPackageJsonTypesVersionsPaths:()=>getPackageJsonTypesVersionsPaths,getPackageJsonsVisibleToFile:()=>getPackageJsonsVisibleToFile,getPackageNameFromTypesPackageName:()=>getPackageNameFromTypesPackageName,getPackageScopeForPath:()=>getPackageScopeForPath,getParameterSymbolFromJSDoc:()=>MP,getParameterTypeNode:()=>AM,getParentNodeInSpan:()=>getParentNodeInSpan,getParseTreeNode:()=>Ul,getParsedCommandLineOfConfigFile:()=>getParsedCommandLineOfConfigFile,getPathComponents:()=>Oi,getPathComponentsRelativeTo:()=>wg,getPathFromPathComponents:()=>Wo,getPathUpdater:()=>getPathUpdater,getPathsBasePath:()=>OI,getPatternFromSpec:()=>zO,getPendingEmitKind:()=>getPendingEmitKind,getPositionOfLineAndCharacter:()=>iC,getPossibleGenericSignatures:()=>getPossibleGenericSignatures,getPossibleOriginalInputExtensionForExtension:()=>NI,getPossibleTypeArgumentsInfo:()=>getPossibleTypeArgumentsInfo,getPreEmitDiagnostics:()=>getPreEmitDiagnostics,getPrecedingNonSpaceCharacterPosition:()=>getPrecedingNonSpaceCharacterPosition,getPrivateIdentifier:()=>getPrivateIdentifier,getProperties:()=>getProperties,getProperty:()=>Sv,getPropertyArrayElementValue:()=>RD,getPropertyAssignmentAliasLikeExpression:()=>KP,getPropertyNameForPropertyNameNode:()=>Td,getPropertyNameForUniqueESSymbol:()=>sI,getPropertyNameFromType:()=>FM,getPropertyNameOfBindingOrAssignmentElement:()=>_R,getPropertySymbolFromBindingElement:()=>getPropertySymbolFromBindingElement,getPropertySymbolsFromContextualType:()=>c7,getQuoteFromPreference:()=>getQuoteFromPreference,getQuotePreference:()=>getQuotePreference,getRangesWhere:()=>v9,getRefactorContextSpan:()=>getRefactorContextSpan,getReferencedFileLocation:()=>getReferencedFileLocation,getRegexFromPattern:()=>Uf,getRegularExpressionForWildcard:()=>Bf,getRegularExpressionsForWildcards:()=>Z2,getRelativePathFromDirectory:()=>Gv,getRelativePathFromFile:()=>KE,getRelativePathToDirectoryOrUrl:()=>Eg,getRenameLocation:()=>getRenameLocation,getReplacementSpanForContextToken:()=>getReplacementSpanForContextToken,getResolutionDiagnostic:()=>getResolutionDiagnostic,getResolutionModeOverride:()=>getResolutionModeOverride,getResolveJsonModule:()=>OS,getResolvePackageJsonExports:()=>wO,getResolvePackageJsonImports:()=>EO,getResolvedExternalModuleName:()=>F3,getRestIndicatorOfBindingOrAssignmentElement:()=>sR,getRestParameterElementType:()=>CD,getRightMostAssignedExpression:()=>y2,getRootDeclaration:()=>bm,getRootDirectoryOfResolutionCache:()=>getRootDirectoryOfResolutionCache,getRootLength:()=>Ni,getRootPathSplitLength:()=>getRootPathSplitLength,getScriptKind:()=>getScriptKind,getScriptKindFromFileName:()=>jS,getScriptTargetFeatures:()=>lx,getSelectedEffectiveModifierFlags:()=>Z3,getSelectedSyntacticModifierFlags:()=>eS,getSemanticClassifications:()=>getSemanticClassifications,getSemanticJsxChildren:()=>bI,getSetAccessorTypeAnnotationNode:()=>jI,getSetAccessorValueParameter:()=>L2,getSetExternalModuleIndicator:()=>IS,getShebang:()=>n4,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>S2,getSingleVariableOfVariableStatement:()=>Al,getSnapshotText:()=>getSnapshotText,getSnippetElement:()=>getSnippetElement,getSourceFileOfModule:()=>vk,getSourceFileOfNode:()=>oi,getSourceFilePathInNewDir:()=>q3,getSourceFilePathInNewDirWorker:()=>Tm,getSourceFileVersionAsHashFromText:()=>getSourceFileVersionAsHashFromText,getSourceFilesToEmit:()=>MI,getSourceMapRange:()=>getSourceMapRange,getSourceMapper:()=>getSourceMapper,getSourceTextOfNodeFromSourceFile:()=>Qo,getSpanOfTokenAtPosition:()=>Ks,getSpellingSuggestion:()=>Pv,getStartPositionOfLine:()=>xk,getStartPositionOfRange:()=>p_,getStartsOnNewLine:()=>getStartsOnNewLine,getStaticPropertiesAndClassStaticBlock:()=>getStaticPropertiesAndClassStaticBlock,getStrictOptionValue:()=>Y2,getStringComparer:()=>dg,getSuperCallFromStatement:()=>getSuperCallFromStatement,getSuperContainer:()=>GD,getSupportedCodeFixes:()=>a7,getSupportedExtensions:()=>FS,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>BS,getSwitchedType:()=>getSwitchedType,getSymbolId:()=>getSymbolId,getSymbolNameForPrivateIdentifier:()=>_I,getSymbolTarget:()=>getSymbolTarget,getSyntacticClassifications:()=>getSyntacticClassifications,getSyntacticModifierFlags:()=>U2,getSyntacticModifierFlagsNoCache:()=>q2,getSynthesizedDeepClone:()=>getSynthesizedDeepClone,getSynthesizedDeepCloneWithReplacements:()=>getSynthesizedDeepCloneWithReplacements,getSynthesizedDeepClones:()=>getSynthesizedDeepClones,getSynthesizedDeepClonesWithReplacements:()=>getSynthesizedDeepClonesWithReplacements,getSyntheticLeadingComments:()=>getSyntheticLeadingComments,getSyntheticTrailingComments:()=>getSyntheticTrailingComments,getTargetLabel:()=>getTargetLabel,getTargetOfBindingOrAssignmentElement:()=>Ro,getTemporaryModuleResolutionState:()=>getTemporaryModuleResolutionState,getTextOfConstantValue:()=>Fk,getTextOfIdentifierOrLiteral:()=>Sd,getTextOfJSDocComment:()=>jC,getTextOfJsxAttributeName:()=>LM,getTextOfJsxNamespacedName:()=>Kl,getTextOfNode:()=>lm,getTextOfNodeFromSourceText:()=>n_,getTextOfPropertyName:()=>iD,getThisContainer:()=>f2,getThisParameter:()=>V3,getTokenAtPosition:()=>getTokenAtPosition,getTokenPosOfNode:()=>$o,getTokenSourceMapRange:()=>getTokenSourceMapRange,getTouchingPropertyName:()=>getTouchingPropertyName,getTouchingToken:()=>getTouchingToken,getTrailingCommentRanges:()=>t4,getTrailingSemicolonDeferringWriter:()=>kI,getTransformFlagsSubtreeExclusions:()=>Ox,getTransformers:()=>getTransformers,getTsBuildInfoEmitOutputFilePath:()=>getTsBuildInfoEmitOutputFilePath,getTsConfigObjectLiteralExpression:()=>WT,getTsConfigPropArrayElementValue:()=>jD,getTypeAnnotationNode:()=>UI,getTypeArgumentOrTypeParameterList:()=>getTypeArgumentOrTypeParameterList,getTypeKeywordOfTypeOnlyImport:()=>getTypeKeywordOfTypeOnlyImport,getTypeNode:()=>getTypeNode,getTypeNodeIfAccessible:()=>getTypeNodeIfAccessible,getTypeParameterFromJsDoc:()=>JP,getTypeParameterOwner:()=>TC,getTypesPackageName:()=>getTypesPackageName,getUILocale:()=>cE,getUniqueName:()=>getUniqueName,getUniqueSymbolId:()=>getUniqueSymbolId,getUseDefineForClassFields:()=>kO,getWatchErrorSummaryDiagnosticMessage:()=>getWatchErrorSummaryDiagnosticMessage,getWatchFactory:()=>getWatchFactory,group:()=>V9,groupBy:()=>H9,guessIndentation:()=>ZA,handleNoEmitOptions:()=>handleNoEmitOptions,hasAbstractModifier:()=>Y3,hasAccessorModifier:()=>F2,hasAmbientModifier:()=>K3,hasChangesInResolutions:()=>gk,hasChildOfKind:()=>hasChildOfKind,hasContextSensitiveParameters:()=>TM,hasDecorators:()=>kl,hasDocComment:()=>hasDocComment,hasDynamicName:()=>k3,hasEffectiveModifier:()=>j2,hasEffectiveModifiers:()=>$I,hasEffectiveReadonlyModifier:()=>j0,hasExtension:()=>zv,hasIndexSignature:()=>hasIndexSignature,hasInitializer:()=>TT,hasInvalidEscape:()=>M3,hasJSDocNodes:()=>Hi,hasJSDocParameterTags:()=>CC,hasJSFileExtension:()=>eb,hasJsonModuleEmitEnabled:()=>yO,hasOnlyExpressionInitializer:()=>YA,hasOverrideModifier:()=>YI,hasPossibleExternalModuleReference:()=>Zk,hasProperty:()=>Wn,hasPropertyAccessExpressionWithName:()=>hasPropertyAccessExpressionWithName,hasQuestionToken:()=>DP,hasRecordedExternalHelpers:()=>tR,hasResolutionModeOverride:()=>BM,hasRestParameter:()=>ek,hasScopeMarker:()=>AA,hasStaticModifier:()=>xm,hasSyntacticModifier:()=>Cn,hasSyntacticModifiers:()=>QI,hasTSFileExtension:()=>tb,hasTabstop:()=>rx,hasTrailingDirectorySeparator:()=>Hd,hasType:()=>QA,hasTypeArguments:()=>RP,hasZeroOrOneAsteriskCharacter:()=>JO,helperString:()=>helperString,hostGetCanonicalFileName:()=>j3,hostUsesCaseSensitiveFileNames:()=>O2,idText:()=>Lt,identifierIsThisKeyword:()=>H3,identifierToKeywordKind:()=>w4,identity:()=>bt,identitySourceMapConsumer:()=>identitySourceMapConsumer,ignoreSourceNewlines:()=>ignoreSourceNewlines,ignoredPaths:()=>ignoredPaths,importDefaultHelper:()=>importDefaultHelper,importFromModuleSpecifier:()=>AP,importNameElisionDisabled:()=>gO,importStarHelper:()=>importStarHelper,indexOfAnyCharCode:()=>fv,indexOfNode:()=>Lk,indicesOf:()=>ug,inferredTypesContainingFile:()=>inferredTypesContainingFile,injectClassNamedEvaluationHelperBlockIfMissing:()=>injectClassNamedEvaluationHelperBlockIfMissing,injectClassThisAssignmentIfMissing:()=>injectClassThisAssignmentIfMissing,insertImports:()=>insertImports,insertLeadingStatement:()=>qJ,insertSorted:()=>vl,insertStatementAfterCustomPrologue:()=>Dk,insertStatementAfterStandardPrologue:()=>kk,insertStatementsAfterCustomPrologue:()=>Ak,insertStatementsAfterStandardPrologue:()=>Ck,intersperse:()=>r9,intrinsicTagNameToString:()=>RM,introducesArgumentsExoticObject:()=>ID,inverseJsxOptionMap:()=>inverseJsxOptionMap,isAbstractConstructorSymbol:()=>VN,isAbstractModifier:()=>bL,isAccessExpression:()=>Ko,isAccessibilityModifier:()=>isAccessibilityModifier,isAccessor:()=>om,isAccessorModifier:()=>TL,isAliasSymbolDeclaration:()=>YP,isAliasableExpression:()=>A2,isAmbientModule:()=>um,isAmbientPropertyDeclaration:()=>$k,isAnonymousFunctionDefinition:()=>Zs,isAnyDirectorySeparator:()=>vg,isAnyImportOrBareOrAccessedRequire:()=>Yk,isAnyImportOrReExport:()=>fm,isAnyImportSyntax:()=>t2,isAnySupportedFileExtension:()=>tM,isApplicableVersionedTypesKey:()=>isApplicableVersionedTypesKey,isArgumentExpressionOfElementAccess:()=>isArgumentExpressionOfElementAccess,isArray:()=>$t,isArrayBindingElement:()=>dA,isArrayBindingOrAssignmentElement:()=>cT,isArrayBindingOrAssignmentPattern:()=>_T,isArrayBindingPattern:()=>CL,isArrayLiteralExpression:()=>iu,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>isArrayLiteralOrObjectLiteralDestructuringPattern,isArrayTypeNode:()=>Vx,isArrowFunction:()=>Om,isAsExpression:()=>ML,isAssertClause:()=>nJ,isAssertEntry:()=>rJ,isAssertionExpression:()=>EA,isAssertsKeyword:()=>hL,isAssignmentDeclaration:()=>O0,isAssignmentExpression:()=>si,isAssignmentOperator:()=>A_,isAssignmentPattern:()=>aT,isAssignmentTarget:()=>FP,isAsteriskToken:()=>uL,isAsyncFunction:()=>oI,isAsyncModifier:()=>_l,isAutoAccessorPropertyDeclaration:()=>iT,isAwaitExpression:()=>PL,isAwaitKeyword:()=>yL,isBigIntLiteral:()=>db,isBinaryExpression:()=>At,isBinaryOperatorToken:()=>MR,isBindableObjectDefinePropertyCall:()=>b2,isBindableStaticAccessExpression:()=>_s,isBindableStaticElementAccessExpression:()=>v2,isBindableStaticNameExpression:()=>Yo,isBindingElement:()=>ru,isBindingElementOfBareOrAccessedRequire:()=>uP,isBindingName:()=>sA,isBindingOrAssignmentElement:()=>mA,isBindingOrAssignmentPattern:()=>hA,isBindingPattern:()=>sm,isBlock:()=>au,isBlockOrCatchScoped:()=>Uk,isBlockScope:()=>JT,isBlockScopedContainerTopLevel:()=>Hk,isBooleanLiteral:()=>_A,isBreakOrContinueStatement:()=>HC,isBreakStatement:()=>HL,isBuildInfoFile:()=>isBuildInfoFile,isBuilderProgram:()=>isBuilderProgram2,isBundle:()=>yJ,isBundleFileTextLike:()=>KN,isCallChain:()=>T0,isCallExpression:()=>R_,isCallExpressionTarget:()=>isCallExpressionTarget,isCallLikeExpression:()=>lT,isCallLikeOrFunctionLikeExpression:()=>bA,isCallOrNewExpression:()=>vA,isCallOrNewExpressionTarget:()=>isCallOrNewExpressionTarget,isCallSignatureDeclaration:()=>yb,isCallToHelper:()=>isCallToHelper,isCaseBlock:()=>ZL,isCaseClause:()=>dJ,isCaseKeyword:()=>SL,isCaseOrDefaultClause:()=>$A,isCatchClause:()=>mJ,isCatchClauseVariableDeclaration:()=>YS,isCatchClauseVariableDeclarationOrBindingElement:()=>NT,isCheckJsEnabledForFile:()=>nM,isChildOfNodeWithKind:()=>xD,isCircularBuildOrder:()=>isCircularBuildOrder,isClassDeclaration:()=>es,isClassElement:()=>io,isClassExpression:()=>Ol,isClassInstanceProperty:()=>lA,isClassLike:()=>ar,isClassMemberModifier:()=>tT,isClassNamedEvaluationHelperBlock:()=>isClassNamedEvaluationHelperBlock,isClassOrTypeElement:()=>pA,isClassStaticBlockDeclaration:()=>eu,isClassThisAssignmentBlock:()=>isClassThisAssignmentBlock,isCollapsedRange:()=>TN,isColonToken:()=>pL,isCommaExpression:()=>Um,isCommaListExpression:()=>j_,isCommaSequence:()=>YJ,isCommaToken:()=>Rx,isComment:()=>isComment,isCommonJsExportPropertyAssignment:()=>u2,isCommonJsExportedExpression:()=>DD,isCompoundAssignment:()=>isCompoundAssignment,isComputedNonLiteralName:()=>rD,isComputedPropertyName:()=>oo,isConciseBody:()=>IA,isConditionalExpression:()=>IL,isConditionalTypeNode:()=>Yx,isConstTypeReference:()=>G4,isConstructSignatureDeclaration:()=>qx,isConstructorDeclaration:()=>L_,isConstructorTypeNode:()=>bb,isContextualKeyword:()=>k2,isContinueStatement:()=>VL,isCustomPrologue:()=>dm,isDebuggerStatement:()=>KL,isDeclaration:()=>Xo,isDeclarationBindingElement:()=>Hg,isDeclarationFileName:()=>z8,isDeclarationName:()=>y3,isDeclarationNameOfEnumOrNamespace:()=>ON,isDeclarationReadonly:()=>hD,isDeclarationStatement:()=>qA,isDeclarationWithTypeParameterChildren:()=>RT,isDeclarationWithTypeParameters:()=>Qk,isDecorator:()=>M_,isDecoratorTarget:()=>isDecoratorTarget,isDefaultClause:()=>p8,isDefaultImport:()=>c3,isDefaultModifier:()=>mL,isDefaultedExpandoInitializer:()=>gP,isDeleteExpression:()=>kL,isDeleteTarget:()=>GP,isDeprecatedDeclaration:()=>isDeprecatedDeclaration,isDestructuringAssignment:()=>iN,isDiagnosticWithLocation:()=>isDiagnosticWithLocation,isDiskPathRoot:()=>UE,isDoStatement:()=>UL,isDocumentRegistryEntry:()=>isDocumentRegistryEntry,isDotDotDotToken:()=>lL,isDottedName:()=>B0,isDynamicName:()=>P2,isESSymbolIdentifier:()=>uI,isEffectiveExternalModule:()=>e2,isEffectiveModuleDeclaration:()=>OT,isEffectiveStrictModeSourceFile:()=>Xk,isElementAccessChain:()=>H4,isElementAccessExpression:()=>Ki,isEmittedFileOfProgram:()=>isEmittedFileOfProgram,isEmptyArrayLiteral:()=>lN,isEmptyBindingElement:()=>S4,isEmptyBindingPattern:()=>T4,isEmptyObjectLiteral:()=>cN,isEmptyStatement:()=>FL,isEmptyStringLiteral:()=>GT,isEntityName:()=>oA,isEntityNameExpression:()=>co,isEnumConst:()=>mD,isEnumDeclaration:()=>Pb,isEnumMember:()=>d8,isEqualityOperatorKind:()=>isEqualityOperatorKind,isEqualsGreaterThanToken:()=>dL,isExclamationToken:()=>Nd,isExcludedFile:()=>isExcludedFile,isExclusivelyTypeOnlyImportOrExport:()=>isExclusivelyTypeOnlyImportOrExport,isExpandoPropertyDeclaration:()=>ox,isExportAssignment:()=>ps,isExportDeclaration:()=>F_,isExportModifier:()=>jx,isExportName:()=>QJ,isExportNamespaceAsDefaultDeclaration:()=>IT,isExportOrDefaultModifier:()=>JR,isExportSpecifier:()=>u8,isExportsIdentifier:()=>n3,isExportsOrModuleExportsOrAlias:()=>isExportsOrModuleExportsOrAlias,isExpression:()=>_m,isExpressionNode:()=>m2,isExpressionOfExternalModuleImportEqualsDeclaration:()=>isExpressionOfExternalModuleImportEqualsDeclaration,isExpressionOfOptionalChainRoot:()=>zC,isExpressionStatement:()=>ou,isExpressionWithTypeArguments:()=>Cb,isExpressionWithTypeArgumentsInClassExtendsClause:()=>F0,isExternalModule:()=>ns,isExternalModuleAugmentation:()=>Zg,isExternalModuleImportEqualsDeclaration:()=>QT,isExternalModuleIndicator:()=>DA,isExternalModuleNameRelative:()=>uC,isExternalModuleReference:()=>Rm,isExternalModuleSymbol:()=>isExternalModuleSymbol,isExternalOrCommonJsModule:()=>dD,isFileLevelReservedGeneratedIdentifier:()=>iA,isFileLevelUniqueName:()=>CT,isFileProbablyExternalModule:()=>gl,isFirstDeclarationOfSymbolParameter:()=>isFirstDeclarationOfSymbolParameter,isFixablePromiseHandler:()=>isFixablePromiseHandler,isForInOrOfStatement:()=>PA,isForInStatement:()=>zL,isForInitializer:()=>OA,isForOfStatement:()=>WL,isForStatement:()=>o8,isFunctionBlock:()=>zT,isFunctionBody:()=>NA,isFunctionDeclaration:()=>us,isFunctionExpression:()=>Nm,isFunctionExpressionOrArrowFunction:()=>KS,isFunctionLike:()=>$i,isFunctionLikeDeclaration:()=>nT,isFunctionLikeKind:()=>qg,isFunctionLikeOrClassStaticBlockDeclaration:()=>am,isFunctionOrConstructorTypeNode:()=>fA,isFunctionOrModuleBlock:()=>cA,isFunctionSymbol:()=>EP,isFunctionTypeNode:()=>tu,isFutureReservedKeyword:()=>eI,isGeneratedIdentifier:()=>va,isGeneratedPrivateIdentifier:()=>Bg,isGetAccessor:()=>rl,isGetAccessorDeclaration:()=>d_,isGetOrSetAccessorDeclaration:()=>qC,isGlobalDeclaration:()=>isGlobalDeclaration,isGlobalScopeAugmentation:()=>pm,isGrammarError:()=>Ek,isHeritageClause:()=>Ml,isHoistedFunction:()=>D0,isHoistedVariableStatement:()=>P0,isIdentifier:()=>Ae,isIdentifierANonContextualKeyword:()=>rI,isIdentifierName:()=>QP,isIdentifierOrThisTypeNode:()=>fR,isIdentifierPart:()=>Ka,isIdentifierStart:()=>yr,isIdentifierText:()=>Ig,isIdentifierTypePredicate:()=>LD,isIdentifierTypeReference:()=>dM,isIfStatement:()=>BL,isIgnoredFileFromWildCardWatching:()=>isIgnoredFileFromWildCardWatching,isImplicitGlob:()=>MS,isImportAttribute:()=>aJ,isImportAttributeName:()=>rA,isImportAttributes:()=>iJ,isImportCall:()=>s2,isImportClause:()=>eJ,isImportDeclaration:()=>Ob,isImportEqualsDeclaration:()=>Nb,isImportKeyword:()=>Bx,isImportMeta:()=>k0,isImportOrExportSpecifier:()=>eA,isImportOrExportSpecifierName:()=>isImportOrExportSpecifierName,isImportSpecifier:()=>c8,isImportTypeAssertionContainer:()=>tJ,isImportTypeNode:()=>nu,isImportableFile:()=>isImportableFile,isInComment:()=>isInComment,isInCompoundLikeAssignment:()=>UP,isInExpressionContext:()=>XT,isInJSDoc:()=>YT,isInJSFile:()=>Vt,isInJSXText:()=>isInJSXText,isInJsonFile:()=>_P,isInNonReferenceComment:()=>isInNonReferenceComment,isInReferenceComment:()=>isInReferenceComment,isInRightSideOfInternalImportEqualsDeclaration:()=>isInRightSideOfInternalImportEqualsDeclaration,isInString:()=>isInString,isInTemplateString:()=>isInTemplateString,isInTopLevelContext:()=>VD,isInTypeQuery:()=>FI,isIncrementalCompilation:()=>AO,isIndexSignatureDeclaration:()=>gb,isIndexedAccessTypeNode:()=>e8,isInferTypeNode:()=>Kx,isInfinityOrNaNString:()=>SM,isInitializedProperty:()=>isInitializedProperty,isInitializedVariable:()=>gS,isInsideJsxElement:()=>isInsideJsxElement,isInsideJsxElementOrAttribute:()=>isInsideJsxElementOrAttribute,isInsideNodeModules:()=>isInsideNodeModules,isInsideTemplateLiteral:()=>isInsideTemplateLiteral,isInstanceOfExpression:()=>uS,isInstantiatedModule:()=>isInstantiatedModule,isInterfaceDeclaration:()=>su,isInternalDeclaration:()=>isInternalDeclaration,isInternalModuleImportEqualsDeclaration:()=>oP,isInternalName:()=>$J,isIntersectionTypeNode:()=>Qx,isIntrinsicJsxName:()=>R3,isIterationStatement:()=>dT,isJSDoc:()=>ds,isJSDocAllType:()=>SJ,isJSDocAugmentsTag:()=>Fm,isJSDocAuthorTag:()=>kJ,isJSDocCallbackTag:()=>DJ,isJSDocClassTag:()=>y8,isJSDocCommentContainingNode:()=>vT,isJSDocConstructSignature:()=>PP,isJSDocDeprecatedTag:()=>Wb,isJSDocEnumTag:()=>b8,isJSDocFunctionType:()=>jm,isJSDocImplementsTag:()=>T8,isJSDocIndexSignature:()=>lP,isJSDocLikeText:()=>F8,isJSDocLink:()=>bJ,isJSDocLinkCode:()=>vJ,isJSDocLinkLike:()=>dl,isJSDocLinkPlain:()=>TJ,isJSDocMemberName:()=>r_,isJSDocNameReference:()=>Vf,isJSDocNamepathType:()=>AJ,isJSDocNamespaceBody:()=>JA,isJSDocNode:()=>$g,isJSDocNonNullableType:()=>wJ,isJSDocNullableType:()=>h8,isJSDocOptionalParameter:()=>ix,isJSDocOptionalType:()=>EJ,isJSDocOverloadTag:()=>zb,isJSDocOverrideTag:()=>g8,isJSDocParameterTag:()=>m_,isJSDocPrivateTag:()=>Bb,isJSDocPropertyLikeTag:()=>Rg,isJSDocPropertyTag:()=>OJ,isJSDocProtectedTag:()=>Ub,isJSDocPublicTag:()=>Fb,isJSDocReadonlyTag:()=>qb,isJSDocReturnTag:()=>Vb,isJSDocSatisfiesExpression:()=>NM,isJSDocSatisfiesTag:()=>Hb,isJSDocSeeTag:()=>PJ,isJSDocSignature:()=>cu,isJSDocTag:()=>Qg,isJSDocTemplateTag:()=>ts,isJSDocThisTag:()=>v8,isJSDocThrowsTag:()=>MJ,isJSDocTypeAlias:()=>Xl,isJSDocTypeAssertion:()=>k8,isJSDocTypeExpression:()=>m8,isJSDocTypeLiteral:()=>jb,isJSDocTypeTag:()=>lu,isJSDocTypedefTag:()=>IJ,isJSDocUnknownTag:()=>NJ,isJSDocUnknownType:()=>xJ,isJSDocVariadicType:()=>CJ,isJSXTagName:()=>Jf,isJsonEqual:()=>rb,isJsonSourceFile:()=>o2,isJsxAttribute:()=>uJ,isJsxAttributeLike:()=>GA,isJsxAttributeName:()=>JM,isJsxAttributes:()=>Rb,isJsxChild:()=>gT,isJsxClosingElement:()=>Wf,isJsxClosingFragment:()=>lJ,isJsxElement:()=>tg,isJsxExpression:()=>fJ,isJsxFragment:()=>yl,isJsxNamespacedName:()=>B_,isJsxOpeningElement:()=>Jo,isJsxOpeningFragment:()=>Jb,isJsxOpeningLikeElement:()=>bT,isJsxOpeningLikeElementTagName:()=>isJsxOpeningLikeElementTagName,isJsxSelfClosingElement:()=>cJ,isJsxSpreadAttribute:()=>pJ,isJsxTagNameExpression:()=>HA,isJsxText:()=>Id,isJumpStatementTarget:()=>isJumpStatementTarget,isKeyword:()=>ki,isKeywordOrPunctuation:()=>jf,isKnownSymbol:()=>cI,isLabelName:()=>isLabelName,isLabelOfLabeledStatement:()=>isLabelOfLabeledStatement,isLabeledStatement:()=>s8,isLateVisibilityPaintedStatement:()=>Kk,isLeftHandSideExpression:()=>jo,isLeftHandSideOfAssignment:()=>rN,isLet:()=>bD,isLineBreak:()=>On,isLiteralComputedPropertyDeclarationName:()=>g3,isLiteralExpression:()=>Fg,isLiteralExpressionOfObject:()=>YC,isLiteralImportTypeNode:()=>_2,isLiteralKind:()=>jg,isLiteralLikeAccess:()=>Rf,isLiteralLikeElementAccess:()=>Gl,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>isLiteralNameOfPropertyDeclarationOrIndexAccess,isLiteralTypeLikeExpression:()=>yR,isLiteralTypeLiteral:()=>xA,isLiteralTypeNode:()=>xb,isLocalName:()=>ng,isLogicalOperator:()=>eN,isLogicalOrCoalescingAssignmentExpression:()=>tN,isLogicalOrCoalescingAssignmentOperator:()=>Em,isLogicalOrCoalescingBinaryExpression:()=>nN,isLogicalOrCoalescingBinaryOperator:()=>oS,isMappedTypeNode:()=>t8,isMemberName:()=>ro,isMetaProperty:()=>Ab,isMethodDeclaration:()=>f_,isMethodOrAccessor:()=>zg,isMethodSignature:()=>Ux,isMinusToken:()=>hb,isMissingDeclaration:()=>sJ,isModifier:()=>Ug,isModifierKind:()=>Ei,isModifierLike:()=>Lf,isModuleAugmentationExternal:()=>MT,isModuleBlock:()=>_8,isModuleBody:()=>MA,isModuleDeclaration:()=>Zi,isModuleExportsAccessExpression:()=>g2,isModuleIdentifier:()=>r3,isModuleName:()=>hR,isModuleOrEnumDeclaration:()=>jA,isModuleReference:()=>VA,isModuleSpecifierLike:()=>isModuleSpecifierLike,isModuleWithStringLiteralName:()=>qk,isNameOfFunctionDeclaration:()=>isNameOfFunctionDeclaration,isNameOfModuleDeclaration:()=>isNameOfModuleDeclaration,isNamedClassElement:()=>uA,isNamedDeclaration:()=>Zd,isNamedEvaluation:()=>pI,isNamedEvaluationSource:()=>I3,isNamedExportBindings:()=>GC,isNamedExports:()=>l8,isNamedImportBindings:()=>RA,isNamedImports:()=>oJ,isNamedImportsOrExports:()=>ZN,isNamedTupleMember:()=>vb,isNamespaceBody:()=>LA,isNamespaceExport:()=>Jm,isNamespaceExportDeclaration:()=>Ib,isNamespaceImport:()=>Mb,isNamespaceReexportDeclaration:()=>rP,isNewExpression:()=>n8,isNewExpressionTarget:()=>isNewExpressionTarget,isNoSubstitutionTemplateLiteral:()=>Jx,isNode:()=>$C,isNodeArray:()=>ha,isNodeArrayMultiLine:()=>DN,isNodeDescendantOf:()=>XP,isNodeKind:()=>Wl,isNodeLikeSystem:()=>DE,isNodeModulesDirectory:()=>ZE,isNodeWithPossibleHoistedDeclaration:()=>qP,isNonContextualKeyword:()=>A3,isNonExportDefaultModifier:()=>RR,isNonGlobalAmbientModule:()=>zk,isNonGlobalDeclaration:()=>isNonGlobalDeclaration,isNonNullAccess:()=>IM,isNonNullChain:()=>X4,isNonNullExpression:()=>Uo,isNonStaticMethodOrAccessorWithPrivateName:()=>isNonStaticMethodOrAccessorWithPrivateName,isNotEmittedOrPartiallyEmittedNode:()=>CA,isNotEmittedStatement:()=>Lb,isNullishCoalesce:()=>VC,isNumber:()=>eE,isNumericLiteral:()=>lo,isNumericLiteralName:()=>ZS,isObjectBindingElementWithoutPropertyName:()=>isObjectBindingElementWithoutPropertyName,isObjectBindingOrAssignmentElement:()=>sT,isObjectBindingOrAssignmentPattern:()=>oT,isObjectBindingPattern:()=>EL,isObjectLiteralElement:()=>x0,isObjectLiteralElementLike:()=>Vg,isObjectLiteralExpression:()=>uo,isObjectLiteralMethod:()=>OD,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>MD,isObjectTypeDeclaration:()=>QN,isOctalDigit:()=>Of,isOmittedExpression:()=>Lm,isOptionalChain:()=>Lg,isOptionalChainRoot:()=>Jg,isOptionalDeclaration:()=>PM,isOptionalJSDocPropertyLikeTag:()=>nx,isOptionalTypeNode:()=>Gx,isOuterExpression:()=>qm,isOutermostOptionalChain:()=>WC,isOverrideModifier:()=>vL,isPackedArrayLiteral:()=>gM,isParameter:()=>Pa,isParameterDeclaration:()=>dI,isParameterOrCatchClauseVariable:()=>xM,isParameterPropertyDeclaration:()=>v4,isParameterPropertyModifier:()=>eT,isParenthesizedExpression:()=>cs,isParenthesizedTypeNode:()=>Tb,isParseTreeNode:()=>xl,isPartOfTypeNode:()=>c2,isPartOfTypeQuery:()=>$T,isPartiallyEmittedExpression:()=>a8,isPatternMatch:()=>hg,isPinnedComment:()=>PT,isPlainJsFile:()=>Tk,isPlusToken:()=>mb,isPossiblyTypeArgumentPosition:()=>isPossiblyTypeArgumentPosition,isPostfixUnaryExpression:()=>i8,isPrefixUnaryExpression:()=>Mm,isPrivateIdentifier:()=>Vn,isPrivateIdentifierClassElementDeclaration:()=>Z4,isPrivateIdentifierPropertyAccessExpression:()=>aA,isPrivateIdentifierSymbol:()=>lI,isProgramBundleEmitBuildInfo:()=>isProgramBundleEmitBuildInfo,isProgramUptoDate:()=>isProgramUptoDate,isPrologueDirective:()=>Sa,isPropertyAccessChain:()=>V4,isPropertyAccessEntityNameExpression:()=>cS,isPropertyAccessExpression:()=>Ln,isPropertyAccessOrQualifiedName:()=>gA,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>yA,isPropertyAssignment:()=>fs,isPropertyDeclaration:()=>Ia,isPropertyName:()=>Vl,isPropertyNameLiteral:()=>L0,isPropertySignature:()=>Zl,isProtoSetter:()=>P3,isPrototypeAccess:()=>k_,isPrototypePropertyAssignment:()=>SP,isPunctuation:()=>C3,isPushOrUnshiftIdentifier:()=>fI,isQualifiedName:()=>O_,isQuestionDotToken:()=>fL,isQuestionOrExclamationToken:()=>pR,isQuestionOrPlusOrMinusToken:()=>mR,isQuestionToken:()=>Nl,isRawSourceMap:()=>isRawSourceMap,isReadonlyKeyword:()=>Fx,isReadonlyKeywordOrPlusOrMinusToken:()=>dR,isRecognizedTripleSlashComment:()=>Pk,isReferenceFileLocation:()=>isReferenceFileLocation,isReferencedFile:()=>isReferencedFile,isRegularExpressionLiteral:()=>oL,isRequireCall:()=>Hl,isRequireVariableStatement:()=>e3,isRestParameter:()=>ST,isRestTypeNode:()=>Xx,isReturnStatement:()=>GL,isReturnStatementWithFixablePromiseHandler:()=>isReturnStatementWithFixablePromiseHandler,isRightSideOfAccessExpression:()=>lS,isRightSideOfInstanceofExpression:()=>_N,isRightSideOfPropertyAccess:()=>isRightSideOfPropertyAccess,isRightSideOfQualifiedName:()=>isRightSideOfQualifiedName,isRightSideOfQualifiedNameOrPropertyAccess:()=>oN,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>sN,isRootedDiskPath:()=>b_,isSameEntityName:()=>u_,isSatisfiesExpression:()=>LL,isScopeMarker:()=>mT,isSemicolonClassElement:()=>jL,isSetAccessor:()=>nl,isSetAccessorDeclaration:()=>Zo,isShebangTrivia:()=>Dg,isShiftOperatorOrHigher:()=>$b,isShorthandAmbientModuleSymbol:()=>Wk,isShorthandPropertyAssignment:()=>_u,isSignedNumericLiteral:()=>D2,isSimpleCopiableExpression:()=>isSimpleCopiableExpression,isSimpleInlineableExpression:()=>isSimpleInlineableExpression,isSingleOrDoubleQuote:()=>pP,isSourceFile:()=>ci,isSourceFileFromLibrary:()=>isSourceFileFromLibrary,isSourceFileJS:()=>h2,isSourceFileNotJS:()=>sP,isSourceFileNotJson:()=>cP,isSourceMapping:()=>isSourceMapping,isSpecialPropertyDeclaration:()=>xP,isSpreadAssignment:()=>f8,isSpreadElement:()=>Eb,isStatement:()=>hT,isStatementButNotDeclaration:()=>zA,isStatementOrBlock:()=>yT,isStatementWithLocals:()=>Sk,isStatic:()=>R0,isStaticModifier:()=>gL,isString:()=>g_,isStringAKeyword:()=>nI,isStringANonContextualKeyword:()=>tI,isStringAndEmptyAnonymousObjectIntersection:()=>isStringAndEmptyAnonymousObjectIntersection,isStringDoubleQuoted:()=>fP,isStringLiteral:()=>Tr,isStringLiteralLike:()=>ni,isStringLiteralOrJsxExpression:()=>XA,isStringLiteralOrTemplate:()=>isStringLiteralOrTemplate,isStringOrNumericLiteralLike:()=>Yi,isStringOrRegularExpressionOrTemplateLiteral:()=>isStringOrRegularExpressionOrTemplateLiteral,isStringTextContainingNode:()=>nA,isSuperCall:()=>vD,isSuperKeyword:()=>zf,isSuperOrSuperProperty:()=>$D,isSuperProperty:()=>vd,isSupportedSourceFileName:()=>QO,isSwitchStatement:()=>$L,isSyntaxList:()=>LJ,isSyntheticExpression:()=>JL,isSyntheticReference:()=>_J,isTagName:()=>isTagName,isTaggedTemplateExpression:()=>r8,isTaggedTemplateTag:()=>isTaggedTemplateTag,isTemplateExpression:()=>NL,isTemplateHead:()=>sL,isTemplateLiteral:()=>TA,isTemplateLiteralKind:()=>wl,isTemplateLiteralToken:()=>KC,isTemplateLiteralTypeNode:()=>wL,isTemplateLiteralTypeSpan:()=>xL,isTemplateMiddle:()=>_L,isTemplateMiddleOrTemplateTail:()=>ZC,isTemplateSpan:()=>RL,isTemplateTail:()=>cL,isTextWhiteSpaceLike:()=>isTextWhiteSpaceLike,isThis:()=>isThis,isThisContainerOrFunctionBlock:()=>WD,isThisIdentifier:()=>Sm,isThisInTypeQuery:()=>BI,isThisInitializedDeclaration:()=>YD,isThisInitializedObjectBindingExpression:()=>KD,isThisProperty:()=>QD,isThisTypeNode:()=>Sb,isThisTypeParameter:()=>ex,isThisTypePredicate:()=>JD,isThrowStatement:()=>QL,isToken:()=>QC,isTokenKind:()=>Q4,isTraceEnabled:()=>isTraceEnabled,isTransientSymbol:()=>E0,isTrivia:()=>iI,isTryStatement:()=>YL,isTupleTypeNode:()=>Hx,isTypeAlias:()=>IP,isTypeAliasDeclaration:()=>Db,isTypeAssertionExpression:()=>AL,isTypeDeclaration:()=>tx,isTypeElement:()=>Wg,isTypeKeyword:()=>isTypeKeyword,isTypeKeywordToken:()=>isTypeKeywordToken,isTypeKeywordTokenOrIdentifier:()=>isTypeKeywordTokenOrIdentifier,isTypeLiteralNode:()=>Im,isTypeNode:()=>S0,isTypeNodeKind:()=>wS,isTypeOfExpression:()=>DL,isTypeOnlyExportDeclaration:()=>K4,isTypeOnlyImportDeclaration:()=>Y4,isTypeOnlyImportOrExportDeclaration:()=>tA,isTypeOperatorNode:()=>Zx,isTypeParameterDeclaration:()=>Lo,isTypePredicateNode:()=>zx,isTypeQueryNode:()=>Wx,isTypeReferenceNode:()=>J_,isTypeReferenceType:()=>KA,isTypeUsableAsPropertyName:()=>jM,isUMDExportSymbol:()=>GN,isUnaryExpression:()=>pT,isUnaryExpressionWithWrite:()=>SA,isUnicodeIdentifierStart:()=>Yv,isUnionTypeNode:()=>$x,isUnparsedNode:()=>XC,isUnparsedPrepend:()=>hJ,isUnparsedSource:()=>gJ,isUnparsedTextLike:()=>$4,isUrl:()=>BE,isValidBigIntString:()=>GS,isValidESSymbolDeclaration:()=>PD,isValidTypeOnlyAliasUseSite:()=>lM,isValueSignatureDeclaration:()=>zP,isVarAwaitUsing:()=>yD,isVarConst:()=>BT,isVarUsing:()=>gD,isVariableDeclaration:()=>Li,isVariableDeclarationInVariableStatement:()=>qT,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>mm,isVariableDeclarationInitializedToRequire:()=>KT,isVariableDeclarationList:()=>kb,isVariableLike:()=>l2,isVariableLikeOrAccessor:()=>kD,isVariableStatement:()=>ls,isVoidExpression:()=>wb,isWatchSet:()=>LN,isWhileStatement:()=>qL,isWhiteSpaceLike:()=>ka,isWhiteSpaceSingleLine:()=>Mo,isWithStatement:()=>XL,isWriteAccess:()=>UN,isWriteOnlyAccess:()=>BN,isYieldExpression:()=>OL,jsxModeNeedsExplicitImport:()=>jsxModeNeedsExplicitImport,keywordPart:()=>keywordPart,last:()=>Ea,lastOrUndefined:()=>Pi,length:()=>eo,libMap:()=>libMap,libs:()=>libs,lineBreakPart:()=>lineBreakPart,linkNamePart:()=>linkNamePart,linkPart:()=>linkPart,linkTextPart:()=>linkTextPart,listFiles:()=>listFiles,loadModuleFromGlobalCache:()=>loadModuleFromGlobalCache,loadWithModeAwareCache:()=>loadWithModeAwareCache,makeIdentifierFromModuleName:()=>Bk,makeImport:()=>makeImport,makeImportIfNecessary:()=>makeImportIfNecessary,makeStringLiteral:()=>makeStringLiteral,mangleScopedPackageName:()=>mangleScopedPackageName,map:()=>xa,mapAllOrFail:()=>p9,mapDefined:()=>wa,mapDefinedEntries:()=>d9,mapDefinedIterator:()=>f9,mapEntries:()=>b9,mapIterator:()=>c9,mapOneOrMany:()=>mapOneOrMany,mapToDisplayParts:()=>mapToDisplayParts,matchFiles:()=>WO,matchPatternOrExact:()=>rM,matchedText:()=>vE,matchesExclude:()=>matchesExclude,maybeBind:()=>sn,maybeSetLocalizedDiagnosticMessages:()=>AS,memoize:()=>Yf,memoizeCached:()=>iE,memoizeOne:()=>Fr,memoizeWeak:()=>rE,metadataHelper:()=>metadataHelper,min:()=>sE,minAndMax:()=>aM,missingFileModifiedTime:()=>missingFileModifiedTime,modifierToFlag:()=>z2,modifiersToFlags:()=>hr,moduleOptionDeclaration:()=>moduleOptionDeclaration,moduleResolutionIsEqualTo:()=>fk,moduleResolutionNameAndModeGetter:()=>moduleResolutionNameAndModeGetter,moduleResolutionOptionDeclarations:()=>moduleResolutionOptionDeclarations,moduleResolutionSupportsPackageJsonExportsAndImports:()=>$2,moduleResolutionUsesNodeModules:()=>moduleResolutionUsesNodeModules,moduleSpecifiers:()=>ts_moduleSpecifiers_exports,moveEmitHelpers:()=>moveEmitHelpers,moveRangeEnd:()=>bN,moveRangePastDecorators:()=>hS,moveRangePastModifiers:()=>vN,moveRangePos:()=>Ed,moveSyntheticComments:()=>moveSyntheticComments,mutateMap:()=>WN,mutateMapSkippingNewValues:()=>TS,needsParentheses:()=>needsParentheses,needsScopeMarker:()=>kA,newCaseClauseTracker:()=>newCaseClauseTracker,newPrivateEnvironment:()=>newPrivateEnvironment,noEmitNotification:()=>noEmitNotification,noEmitSubstitution:()=>noEmitSubstitution,noTransformers:()=>noTransformers,noTruncationMaximumTruncationLength:()=>cx,nodeCanBeDecorated:()=>HT,nodeHasName:()=>C4,nodeIsDecorated:()=>l_,nodeIsMissing:()=>Vi,nodeIsPresent:()=>Cl,nodeIsSynthesized:()=>ya,nodeModuleNameResolver:()=>nodeModuleNameResolver,nodeModulesPathPart:()=>nodeModulesPathPart,nodeNextJsonConfigResolver:()=>nodeNextJsonConfigResolver,nodeOrChildIsDecorated:()=>N0,nodeOverlapsWithStartEnd:()=>nodeOverlapsWithStartEnd,nodePosToString:()=>wk,nodeSeenTracker:()=>nodeSeenTracker,nodeStartsNewLexicalEnvironment:()=>mI,nodeToDisplayParts:()=>nodeToDisplayParts,noop:()=>gr,noopFileWatcher:()=>noopFileWatcher,normalizePath:()=>br,normalizeSlashes:()=>Vo,not:()=>xE,notImplemented:()=>nE,notImplementedResolver:()=>notImplementedResolver,nullNodeConverters:()=>nullNodeConverters,nullParenthesizerRules:()=>pb,nullTransformationContext:()=>nullTransformationContext,objectAllocator:()=>Ct,operatorPart:()=>operatorPart,optionDeclarations:()=>optionDeclarations,optionMapToObject:()=>optionMapToObject,optionsAffectingProgramStructure:()=>optionsAffectingProgramStructure,optionsForBuild:()=>optionsForBuild,optionsForWatch:()=>optionsForWatch,optionsHaveChanges:()=>w_,optionsHaveModuleResolutionChanges:()=>xT,or:()=>yg,orderedRemoveItem:()=>yE,orderedRemoveItemAt:()=>Iv,outFile:()=>vm,packageIdToPackageName:()=>wT,packageIdToString:()=>hk,paramHelper:()=>paramHelper,parameterIsThisKeyword:()=>$l,parameterNamePart:()=>parameterNamePart,parseBaseNodeFactory:()=>og,parseBigInt:()=>cM,parseBuildCommand:()=>parseBuildCommand,parseCommandLine:()=>parseCommandLine,parseCommandLineWorker:()=>parseCommandLineWorker,parseConfigFileTextToJson:()=>parseConfigFileTextToJson,parseConfigFileWithSystem:()=>parseConfigFileWithSystem,parseConfigHostFromCompilerHostLike:()=>parseConfigHostFromCompilerHostLike,parseCustomTypeOption:()=>parseCustomTypeOption,parseIsolatedEntityName:()=>tj,parseIsolatedJSDocComment:()=>rj,parseJSDocTypeExpressionForTests:()=>ij,parseJsonConfigFileContent:()=>parseJsonConfigFileContent,parseJsonSourceFileConfigFileContent:()=>parseJsonSourceFileConfigFileContent,parseJsonText:()=>nj,parseListTypeOption:()=>parseListTypeOption,parseNodeFactory:()=>q_,parseNodeModuleFromPath:()=>parseNodeModuleFromPath,parsePackageName:()=>parsePackageName,parsePseudoBigInt:()=>Am,parseValidBigInt:()=>HS,patchWriteFileEnsuringDirectory:()=>patchWriteFileEnsuringDirectory,pathContainsNodeModules:()=>pathContainsNodeModules,pathIsAbsolute:()=>Tg,pathIsBareSpecifier:()=>qE,pathIsRelative:()=>as,patternText:()=>bE,perfLogger:()=>ed,performIncrementalCompilation:()=>performIncrementalCompilation,performance:()=>ts_performance_exports,plainJSErrors:()=>plainJSErrors,positionBelongsToNode:()=>positionBelongsToNode,positionIsASICandidate:()=>positionIsASICandidate,positionIsSynthesized:()=>Da,positionsAreOnSameLine:()=>D_,preProcessFile:()=>preProcessFile,probablyUsesSemicolons:()=>probablyUsesSemicolons,processCommentPragmas:()=>W8,processPragmasIntoFields:()=>V8,processTaggedTemplateExpression:()=>processTaggedTemplateExpression,programContainsEsModules:()=>programContainsEsModules,programContainsModules:()=>programContainsModules,projectReferenceIsEqualTo:()=>pk,propKeyHelper:()=>propKeyHelper,propertyNamePart:()=>propertyNamePart,pseudoBigIntToString:()=>ib,punctuationPart:()=>punctuationPart,pushIfUnique:()=>Ll,quote:()=>quote,quotePreferenceFromString:()=>quotePreferenceFromString,rangeContainsPosition:()=>rangeContainsPosition,rangeContainsPositionExclusive:()=>rangeContainsPositionExclusive,rangeContainsRange:()=>rangeContainsRange,rangeContainsRangeExclusive:()=>rangeContainsRangeExclusive,rangeContainsStartEnd:()=>rangeContainsStartEnd,rangeEndIsOnSameLineAsRangeStart:()=>CN,rangeEndPositionsAreOnSameLine:()=>EN,rangeEquals:()=>O9,rangeIsOnSingleLine:()=>xN,rangeOfNode:()=>oM,rangeOfTypeParameters:()=>sM,rangeOverlapsWithStartEnd:()=>rangeOverlapsWithStartEnd,rangeStartIsOnSameLineAsRangeEnd:()=>yS,rangeStartPositionsAreOnSameLine:()=>wN,readBuilderProgram:()=>readBuilderProgram,readConfigFile:()=>readConfigFile,readHelper:()=>readHelper,readJson:()=>gN,readJsonConfigFile:()=>readJsonConfigFile,readJsonOrUndefined:()=>fS,reduceEachLeadingCommentRange:()=>Kv,reduceEachTrailingCommentRange:()=>Zv,reduceLeft:()=>Bd,reduceLeftIterator:()=>n9,reducePathComponents:()=>Ca,refactor:()=>ts_refactor_exports,regExpEscape:()=>UO,relativeComplement:()=>P9,removeAllComments:()=>removeAllComments,removeEmitHelper:()=>removeEmitHelper,removeExtension:()=>zS,removeFileExtension:()=>Dl,removeIgnoredPath:()=>removeIgnoredPath,removeMinAndVersionNumbers:()=>hE,removeOptionality:()=>removeOptionality,removePrefix:()=>TE,removeSuffix:()=>dE,removeTrailingDirectorySeparator:()=>v_,repeatString:()=>repeatString,replaceElement:()=>j9,resolutionExtensionIsTSOrJson:()=>eM,resolveConfigFileProjectName:()=>resolveConfigFileProjectName,resolveJSModule:()=>resolveJSModule,resolveLibrary:()=>resolveLibrary,resolveModuleName:()=>resolveModuleName,resolveModuleNameFromCache:()=>resolveModuleNameFromCache,resolvePackageNameToPackageJson:()=>resolvePackageNameToPackageJson,resolvePath:()=>g0,resolveProjectReferencePath:()=>resolveProjectReferencePath,resolveTripleslashReference:()=>resolveTripleslashReference,resolveTypeReferenceDirective:()=>resolveTypeReferenceDirective,resolvingEmptyArray:()=>sx,restHelper:()=>restHelper,returnFalse:()=>Qf,returnNoopFileWatcher:()=>returnNoopFileWatcher,returnTrue:()=>Ev,returnUndefined:()=>tE,returnsPromise:()=>returnsPromise,runInitializersHelper:()=>runInitializersHelper,sameFlatMap:()=>mv,sameMap:()=>l9,sameMapping:()=>sameMapping,scanShebangTrivia:()=>Pg,scanTokenAtPosition:()=>pD,scanner:()=>qo,screenStartingMessageCodes:()=>screenStartingMessageCodes,semanticDiagnosticsOptionDeclarations:()=>semanticDiagnosticsOptionDeclarations,serializeCompilerOptions:()=>serializeCompilerOptions,server:()=>A7,servicesVersion:()=>l7,setCommentRange:()=>setCommentRange,setConfigFileInOptions:()=>setConfigFileInOptions,setConstantValue:()=>setConstantValue,setEachParent:()=>a_,setEmitFlags:()=>setEmitFlags,setFunctionNameHelper:()=>setFunctionNameHelper,setGetSourceFileAsHashVersioned:()=>setGetSourceFileAsHashVersioned,setIdentifierAutoGenerate:()=>setIdentifierAutoGenerate,setIdentifierGeneratedImportReference:()=>setIdentifierGeneratedImportReference,setIdentifierTypeArguments:()=>setIdentifierTypeArguments,setInternalEmitFlags:()=>setInternalEmitFlags,setLocalizedDiagnosticMessages:()=>CS,setModuleDefaultHelper:()=>setModuleDefaultHelper,setNodeFlags:()=>hM,setObjectAllocator:()=>ES,setOriginalNode:()=>nr,setParent:()=>Qi,setParentRecursive:()=>$S,setPrivateIdentifier:()=>setPrivateIdentifier,setSnippetElement:()=>setSnippetElement,setSourceMapRange:()=>setSourceMapRange,setStackTraceLimit:()=>setStackTraceLimit,setStartsOnNewLine:()=>setStartsOnNewLine,setSyntheticLeadingComments:()=>setSyntheticLeadingComments,setSyntheticTrailingComments:()=>setSyntheticTrailingComments,setSys:()=>setSys,setSysLog:()=>setSysLog,setTextRange:()=>We,setTextRangeEnd:()=>XS,setTextRangePos:()=>Ad,setTextRangePosEnd:()=>Za,setTextRangePosWidth:()=>kd,setTokenSourceMapRange:()=>setTokenSourceMapRange,setTypeNode:()=>setTypeNode,setUILocale:()=>Dv,setValueDeclaration:()=>wP,shouldAllowImportingTsExtension:()=>shouldAllowImportingTsExtension,shouldPreserveConstEnums:()=>CO,shouldResolveJsRequire:()=>xO,shouldUseUriStyleNodeCoreModules:()=>shouldUseUriStyleNodeCoreModules,showModuleSpecifier:()=>XN,signatureHasLiteralTypes:()=>signatureHasLiteralTypes,signatureHasRestParameter:()=>signatureHasRestParameter,signatureToDisplayParts:()=>signatureToDisplayParts,single:()=>J9,singleElementArray:()=>Kf,singleIterator:()=>y9,singleOrMany:()=>R9,singleOrUndefined:()=>Fd,skipAlias:()=>jN,skipAssertions:()=>eR,skipConstraint:()=>skipConstraint,skipOuterExpressions:()=>ms,skipParentheses:()=>C_,skipPartiallyEmittedExpressions:()=>im,skipTrivia:()=>Mt,skipTypeChecking:()=>_M,skipTypeParentheses:()=>HP,skipWhile:()=>kE,sliceAfter:()=>iM,some:()=>Ze,sort:()=>$f,sortAndDeduplicate:()=>yv,sortAndDeduplicateDiagnostics:()=>pC,sourceFileAffectingCompilerOptions:()=>sourceFileAffectingCompilerOptions,sourceFileMayBeEmitted:()=>J0,sourceMapCommentRegExp:()=>sourceMapCommentRegExp,sourceMapCommentRegExpDontCareLineStart:()=>sourceMapCommentRegExpDontCareLineStart,spacePart:()=>spacePart,spanMap:()=>g9,spreadArrayHelper:()=>spreadArrayHelper,stableSort:()=>vv,startEndContainsRange:()=>startEndContainsRange,startEndOverlapsWithStartEnd:()=>startEndOverlapsWithStartEnd,startOnNewLine:()=>zm,startTracing:()=>startTracing,startsWith:()=>Hn,startsWithDirectory:()=>QE,startsWithUnderscore:()=>startsWithUnderscore,startsWithUseStrict:()=>A8,stringContainsAt:()=>stringContainsAt,stringToToken:()=>Fl,stripQuotes:()=>EI,supportedDeclarationExtensions:()=>ub,supportedJSExtensions:()=>Y0,supportedJSExtensionsFlat:()=>lb,supportedLocaleDirectories:()=>Kg,supportedTSExtensions:()=>Bo,supportedTSExtensionsFlat:()=>cb,supportedTSImplementationExtensions:()=>Dx,suppressLeadingAndTrailingTrivia:()=>suppressLeadingAndTrailingTrivia,suppressLeadingTrivia:()=>suppressLeadingTrivia,suppressTrailingTrivia:()=>suppressTrailingTrivia,symbolEscapedNameNoDefault:()=>symbolEscapedNameNoDefault,symbolName:()=>gd,symbolNameNoDefault:()=>symbolNameNoDefault,symbolPart:()=>symbolPart,symbolToDisplayParts:()=>symbolToDisplayParts,syntaxMayBeASICandidate:()=>syntaxMayBeASICandidate,syntaxRequiresTrailingSemicolonOrASI:()=>syntaxRequiresTrailingSemicolonOrASI,sys:()=>y0,sysLog:()=>sysLog,tagNamesAreEquivalent:()=>Ai,takeWhile:()=>AE,targetOptionDeclaration:()=>targetOptionDeclaration,templateObjectHelper:()=>templateObjectHelper,testFormatSettings:()=>testFormatSettings,textChangeRangeIsUnchanged:()=>b4,textChangeRangeNewSpan:()=>Ys,textChanges:()=>ts_textChanges_exports,textOrKeywordPart:()=>textOrKeywordPart,textPart:()=>textPart,textRangeContainsPositionInclusive:()=>dC,textSpanContainsPosition:()=>fC,textSpanContainsTextSpan:()=>mC,textSpanEnd:()=>tn,textSpanIntersection:()=>g4,textSpanIntersectsWith:()=>gC,textSpanIntersectsWithPosition:()=>bC,textSpanIntersectsWithTextSpan:()=>yC,textSpanIsEmpty:()=>h4,textSpanOverlap:()=>y4,textSpanOverlapsWith:()=>hC,textSpansEqual:()=>textSpansEqual,textToKeywordObj:()=>pl,timestamp:()=>ga,toArray:()=>Nf,toBuilderFileEmit:()=>toBuilderFileEmit,toBuilderStateFileInfoForMultiEmit:()=>toBuilderStateFileInfoForMultiEmit,toEditorSettings:()=>ll,toFileNameLowerCase:()=>Av,toLowerCase:()=>Cv,toPath:()=>Di,toProgramEmitPending:()=>toProgramEmitPending,tokenIsIdentifierOrKeyword:()=>wt,tokenIsIdentifierOrKeywordOrGreaterThan:()=>Qv,tokenToString:()=>en,trace:()=>trace,tracing:()=>ba,tracingEnabled:()=>tracingEnabled,transform:()=>transform,transformClassFields:()=>transformClassFields,transformDeclarations:()=>transformDeclarations,transformECMAScriptModule:()=>transformECMAScriptModule,transformES2015:()=>transformES2015,transformES2016:()=>transformES2016,transformES2017:()=>transformES2017,transformES2018:()=>transformES2018,transformES2019:()=>transformES2019,transformES2020:()=>transformES2020,transformES2021:()=>transformES2021,transformES5:()=>transformES5,transformESDecorators:()=>transformESDecorators,transformESNext:()=>transformESNext,transformGenerators:()=>transformGenerators,transformJsx:()=>transformJsx,transformLegacyDecorators:()=>transformLegacyDecorators,transformModule:()=>transformModule,transformNamedEvaluation:()=>transformNamedEvaluation,transformNodeModule:()=>transformNodeModule,transformNodes:()=>transformNodes,transformSystemModule:()=>transformSystemModule,transformTypeScript:()=>transformTypeScript,transpile:()=>transpile,transpileModule:()=>transpileModule,transpileOptionValueCompilerOptions:()=>transpileOptionValueCompilerOptions,tryAddToSet:()=>h9,tryAndIgnoreErrors:()=>tryAndIgnoreErrors,tryCast:()=>Ur,tryDirectoryExists:()=>tryDirectoryExists,tryExtractTSExtension:()=>fN,tryFileExists:()=>tryFileExists,tryGetClassExtendingExpressionWithTypeArguments:()=>sS,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>_S,tryGetDirectories:()=>tryGetDirectories,tryGetExtensionFromPath:()=>nb,tryGetImportFromModuleSpecifier:()=>s3,tryGetJSDocSatisfiesTypeNode:()=>ax,tryGetModuleNameFromFile:()=>I8,tryGetModuleSpecifierFromDeclaration:()=>CP,tryGetNativePerformanceHooks:()=>OE,tryGetPropertyAccessOrIdentifierToString:()=>U0,tryGetPropertyNameOfBindingOrAssignmentElement:()=>O8,tryGetSourceMappingURL:()=>tryGetSourceMappingURL,tryGetTextOfPropertyName:()=>n2,tryIOAndConsumeErrors:()=>tryIOAndConsumeErrors,tryParsePattern:()=>WS,tryParsePatterns:()=>ZO,tryParseRawSourceMap:()=>tryParseRawSourceMap,tryReadDirectory:()=>tryReadDirectory,tryReadFile:()=>tryReadFile,tryRemoveDirectoryPrefix:()=>BO,tryRemoveExtension:()=>qS,tryRemovePrefix:()=>Mv,tryRemoveSuffix:()=>mE,typeAcquisitionDeclarations:()=>typeAcquisitionDeclarations,typeAliasNamePart:()=>typeAliasNamePart,typeDirectiveIsEqualTo:()=>yk,typeKeywords:()=>typeKeywords,typeParameterNamePart:()=>typeParameterNamePart,typeReferenceResolutionNameAndModeGetter:()=>typeReferenceResolutionNameAndModeGetter,typeToDisplayParts:()=>typeToDisplayParts,unchangedPollThresholds:()=>unchangedPollThresholds,unchangedTextChangeRange:()=>Yg,unescapeLeadingUnderscores:()=>Go,unmangleScopedPackageName:()=>unmangleScopedPackageName,unorderedRemoveItem:()=>Nv,unorderedRemoveItemAt:()=>mg,unreachableCodeIsError:()=>bO,unusedLabelIsError:()=>vO,unwrapInnermostStatementOfLabel:()=>ND,updateErrorForNoInputFiles:()=>updateErrorForNoInputFiles,updateLanguageServiceSourceFile:()=>s7,updateMissingFilePathsWatch:()=>updateMissingFilePathsWatch,updatePackageJsonWatch:()=>updatePackageJsonWatch,updateResolutionField:()=>updateResolutionField,updateSharedExtendedConfigFileWatcher:()=>updateSharedExtendedConfigFileWatcher,updateSourceFile:()=>Yb,updateWatchingWildcardDirectories:()=>updateWatchingWildcardDirectories,usesExtensionsOnImports:()=>US,usingSingleLineStringWriter:()=>uk,utf16EncodeAsString:()=>Mf,validateLocaleAndSetLanguage:()=>wC,valuesHelper:()=>valuesHelper,version:()=>Xf,versionMajorMinor:()=>jd,visitArray:()=>visitArray,visitCommaListElements:()=>visitCommaListElements,visitEachChild:()=>visitEachChild,visitFunctionBody:()=>visitFunctionBody,visitIterationBody:()=>visitIterationBody,visitLexicalEnvironment:()=>visitLexicalEnvironment,visitNode:()=>visitNode,visitNodes:()=>visitNodes2,visitParameterList:()=>visitParameterList,walkUpBindingElementsAndPatterns:()=>x4,walkUpLexicalEnvironments:()=>walkUpLexicalEnvironments,walkUpOuterExpressions:()=>ZJ,walkUpParenthesizedExpressions:()=>h3,walkUpParenthesizedTypes:()=>WP,walkUpParenthesizedTypesAndGetParentAndChild:()=>VP,whitespaceOrMapCommentRegExp:()=>whitespaceOrMapCommentRegExp,writeCommentRange:()=>GI,writeFile:()=>LI,writeFileEnsuringDirectories:()=>JI,zipWith:()=>iy});var lv=It({"src/typescript/_namespaces/ts.ts"(){"use strict";En(),Kb(),T7(),YF(),KF()}}),ZF=K5({"src/typescript/typescript.ts"(e,t){lv(),lv(),typeof console<"u"&&(I.loggingHost={log(n,a){switch(n){case 1:return console.error(a);case 2:return console.warn(a);case 3:return console.log(a);case 4:return console.log(a)}}}),t.exports=k7}});D7.exports=ZF()});var t6=mt(P7=>{P7.typescriptVersionIsAtLeast=new Proxy({},{get:()=>!0})});var n6=mt(li=>{"use strict";var eB=li&&li.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),tB=li&&li.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),nB=li&&li.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&eB(t,e,n);return tB(t,e),t};Object.defineProperty(li,"__esModule",{value:!0});li.getDecorators=li.getModifiers=void 0;var z_=nB(lt()),rB=t6(),I7=rB.typescriptVersionIsAtLeast["4.8"];function iB(e,t=!1){var n;if(e!=null){if(I7){if(t||z_.canHaveModifiers(e)){let a=z_.getModifiers(e);return a?Array.from(a):void 0}return}return(n=e.modifiers)==null?void 0:n.filter(a=>!z_.isDecorator(a))}}li.getModifiers=iB;function aB(e,t=!1){var n;if(e!=null){if(I7){if(t||z_.canHaveDecorators(e)){let a=z_.getDecorators(e);return a?Array.from(a):void 0}return}return(n=e.decorators)==null?void 0:n.filter(z_.isDecorator)}}li.getDecorators=aB});var O7=mt(N7=>{N7.xhtmlEntities={}});var r6=mt(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});W_.AST_TOKEN_TYPES=W_.AST_NODE_TYPES=void 0;var M7;(function(e){e.AccessorProperty="AccessorProperty",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.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.ImportAttribute="ImportAttribute",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.JSXNamespacedName="JSXNamespacedName",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.PrivateIdentifier="PrivateIdentifier",e.Program="Program",e.Property="Property",e.PropertyDefinition="PropertyDefinition",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.StaticBlock="StaticBlock",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.TSAbstractAccessorProperty="TSAbstractAccessorProperty",e.TSAbstractKeyword="TSAbstractKeyword",e.TSAbstractMethodDefinition="TSAbstractMethodDefinition",e.TSAbstractPropertyDefinition="TSAbstractPropertyDefinition",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.TSInstantiationExpression="TSInstantiationExpression",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.TSIntrinsicKeyword="TSIntrinsicKeyword",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.TSPrivateKeyword="TSPrivateKeyword",e.TSPropertySignature="TSPropertySignature",e.TSProtectedKeyword="TSProtectedKeyword",e.TSPublicKeyword="TSPublicKeyword",e.TSQualifiedName="TSQualifiedName",e.TSReadonlyKeyword="TSReadonlyKeyword",e.TSRestType="TSRestType",e.TSSatisfiesExpression="TSSatisfiesExpression",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"})(M7||(W_.AST_NODE_TYPES=M7={}));var L7;(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"})(L7||(W_.AST_TOKEN_TYPES=L7={}))});var R7=mt(J7=>{"use strict";Object.defineProperty(J7,"__esModule",{value:!0})});var F7=mt(j7=>{"use strict";Object.defineProperty(j7,"__esModule",{value:!0})});var B7=mt(ea=>{"use strict";var oB=ea&&ea.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),sB=ea&&ea.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_B=ea&&ea.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&oB(t,e,n);return sB(t,e),t};Object.defineProperty(ea,"__esModule",{value:!0});ea.TSESTree=void 0;ea.TSESTree=_B(r6())});var q7=mt(Vr=>{"use strict";var cB=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),i6=Vr&&Vr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&cB(t,e,n)};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.AST_TOKEN_TYPES=Vr.AST_NODE_TYPES=void 0;var U7=r6();Object.defineProperty(Vr,"AST_NODE_TYPES",{enumerable:!0,get:function(){return U7.AST_NODE_TYPES}});Object.defineProperty(Vr,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return U7.AST_TOKEN_TYPES}});i6(R7(),Vr);i6(F7(),Vr);i6(B7(),Vr)});var W7=mt(z7=>{"use strict";Object.defineProperty(z7,"__esModule",{value:!0})});var H7=mt(V7=>{"use strict";Object.defineProperty(V7,"__esModule",{value:!0})});var Wm=mt(Sr=>{"use strict";var lB=Sr&&Sr.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),G7=Sr&&Sr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&lB(t,e,n)};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.TSESTree=Sr.AST_TOKEN_TYPES=Sr.AST_NODE_TYPES=void 0;var a6=q7();Object.defineProperty(Sr,"AST_NODE_TYPES",{enumerable:!0,get:function(){return a6.AST_NODE_TYPES}});Object.defineProperty(Sr,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return a6.AST_TOKEN_TYPES}});Object.defineProperty(Sr,"TSESTree",{enumerable:!0,get:function(){return a6.TSESTree}});G7(W7(),Sr);G7(H7(),Sr)});var Gm=mt(he=>{"use strict";var uB=he&&he.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),pB=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),fB=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&uB(t,e,n);return pB(t,e),t};Object.defineProperty(he,"__esModule",{value:!0});he.getNamespaceModifiers=he.isValidAssignmentTarget=he.nodeCanBeDecorated=he.getContainingFunction=he.nodeIsPresent=he.isThisInTypeQuery=he.isThisIdentifier=he.identifierIsThisKeyword=he.firstDefined=he.nodeHasTokens=he.nodeHasIllegalDecorators=he.createError=he.TSError=he.convertTokens=he.convertToken=he.getTokenType=he.isChildUnwrappableOptionalChain=he.isChainExpression=he.isOptional=he.isComputedProperty=he.unescapeStringLiteralText=he.hasJSXAncestor=he.findFirstMatchingAncestor=he.findNextToken=he.getTSNodeAccessibility=he.getDeclarationKind=he.isJSXToken=he.getRange=he.canContainDirective=he.getLocFor=he.getLineAndCharacterFor=he.getBinaryExpressionType=he.isComment=he.isComma=he.getLastModifier=he.hasModifier=he.isESTreeClassMember=he.getTextForTokenKind=he.isESTreeBinaryOperator=he.isLogicalOperator=void 0;var Ve=fB(lt()),uu=n6(),dB=O7(),_n=Wm(),mB=t6(),X7=mB.typescriptVersionIsAtLeast["5.0"],de=Ve.SyntaxKind,hB=new Set([de.BarBarToken,de.AmpersandAmpersandToken,de.QuestionQuestionToken]),yB=new Set([Ve.SyntaxKind.EqualsToken,Ve.SyntaxKind.PlusEqualsToken,Ve.SyntaxKind.MinusEqualsToken,Ve.SyntaxKind.AsteriskEqualsToken,Ve.SyntaxKind.AsteriskAsteriskEqualsToken,Ve.SyntaxKind.SlashEqualsToken,Ve.SyntaxKind.PercentEqualsToken,Ve.SyntaxKind.LessThanLessThanEqualsToken,Ve.SyntaxKind.GreaterThanGreaterThanEqualsToken,Ve.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken,Ve.SyntaxKind.AmpersandEqualsToken,Ve.SyntaxKind.BarEqualsToken,Ve.SyntaxKind.BarBarEqualsToken,Ve.SyntaxKind.AmpersandAmpersandEqualsToken,Ve.SyntaxKind.QuestionQuestionEqualsToken,Ve.SyntaxKind.CaretEqualsToken]),gB=new Set([de.InstanceOfKeyword,de.InKeyword,de.AsteriskAsteriskToken,de.AsteriskToken,de.SlashToken,de.PercentToken,de.PlusToken,de.MinusToken,de.AmpersandToken,de.BarToken,de.CaretToken,de.LessThanLessThanToken,de.GreaterThanGreaterThanToken,de.GreaterThanGreaterThanGreaterThanToken,de.AmpersandAmpersandToken,de.BarBarToken,de.LessThanToken,de.LessThanEqualsToken,de.GreaterThanToken,de.GreaterThanEqualsToken,de.EqualsEqualsToken,de.EqualsEqualsEqualsToken,de.ExclamationEqualsEqualsToken,de.ExclamationEqualsToken]);function bB(e){return yB.has(e.kind)}function $7(e){return hB.has(e.kind)}he.isLogicalOperator=$7;function Q7(e){return gB.has(e.kind)}he.isESTreeBinaryOperator=Q7;function Vm(e){return Ve.tokenToString(e)}he.getTextForTokenKind=Vm;function vB(e){return e.kind!==de.SemicolonClassElement}he.isESTreeClassMember=vB;function Y7(e,t){let n=(0,uu.getModifiers)(t);return(n==null?void 0:n.some(a=>a.kind===e))===!0}he.hasModifier=Y7;function TB(e){let t=(0,uu.getModifiers)(e);return t==null?null:t[t.length-1]??null}he.getLastModifier=TB;function SB(e){return e.kind===de.CommaToken}he.isComma=SB;function K7(e){return e.kind===de.SingleLineCommentTrivia||e.kind===de.MultiLineCommentTrivia}he.isComment=K7;function xB(e){return e.kind===de.JSDocComment}function wB(e){if(bB(e))return{type:_n.AST_NODE_TYPES.AssignmentExpression,operator:Vm(e.kind)};if($7(e))return{type:_n.AST_NODE_TYPES.LogicalExpression,operator:Vm(e.kind)};if(Q7(e))return{type:_n.AST_NODE_TYPES.BinaryExpression,operator:Vm(e.kind)};throw new Error(`Unexpected binary operator ${Ve.tokenToString(e.kind)}`)}he.getBinaryExpressionType=wB;function Z7(e,t){let n=t.getLineAndCharacterOfPosition(e);return{line:n.line+1,column:n.character}}he.getLineAndCharacterFor=Z7;function ew(e,t){let[n,a]=e.map(_=>Z7(_,t));return{start:n,end:a}}he.getLocFor=ew;function EB(e){if(e.kind===Ve.SyntaxKind.Block)switch(e.parent.kind){case Ve.SyntaxKind.Constructor:case Ve.SyntaxKind.GetAccessor:case Ve.SyntaxKind.SetAccessor:case Ve.SyntaxKind.ArrowFunction:case Ve.SyntaxKind.FunctionExpression:case Ve.SyntaxKind.FunctionDeclaration:case Ve.SyntaxKind.MethodDeclaration:return!0;default:return!1}return!0}he.canContainDirective=EB;function CB(e,t){return[e.getStart(t),e.getEnd()]}he.getRange=CB;function AB(e){return e.kind>=de.FirstToken&&e.kind<=de.LastToken}function o6(e){return e.kind>=de.JsxElement&&e.kind<=de.JsxAttribute}he.isJSXToken=o6;function kB(e){return e.flags&Ve.NodeFlags.Let?"let":(e.flags&Ve.NodeFlags.AwaitUsing)===Ve.NodeFlags.AwaitUsing?"await using":e.flags&Ve.NodeFlags.Const?"const":e.flags&Ve.NodeFlags.Using?"using":"var"}he.getDeclarationKind=kB;function DB(e){let t=(0,uu.getModifiers)(e);if(t!=null)for(let n of t)switch(n.kind){case de.PublicKeyword:return"public";case de.ProtectedKeyword:return"protected";case de.PrivateKeyword:return"private";default:break}}he.getTSNodeAccessibility=DB;function PB(e,t,n){return a(t);function a(_){return Ve.isToken(_)&&_.pos===e.end?_:sw(_.getChildren(n),p=>(p.pos<=e.pos&&p.end>e.end||p.pos===e.end)&&ow(p,n)?a(p):void 0)}}he.findNextToken=PB;function tw(e,t){let n=e;for(;n;){if(t(n))return n;n=n.parent}}he.findFirstMatchingAncestor=tw;function nw(e){return!!tw(e,o6)}he.hasJSXAncestor=nw;function IB(e){return e.replace(/&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g,t=>{let n=t.slice(1,-1);if(n[0]==="#"){let a=n[1]==="x"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return a>1114111?t:String.fromCodePoint(a)}return dB.xhtmlEntities[n]||t})}he.unescapeStringLiteralText=IB;function NB(e){return e.kind===de.ComputedPropertyName}he.isComputedProperty=NB;function OB(e){return!!e.questionToken}he.isOptional=OB;function rw(e){return e.type===_n.AST_NODE_TYPES.ChainExpression}he.isChainExpression=rw;function MB(e,t){return rw(t)&&e.expression.kind!==Ve.SyntaxKind.ParenthesizedExpression}he.isChildUnwrappableOptionalChain=MB;function iw(e){let t;if(X7&&e.kind===de.Identifier?t=Ve.identifierToKeywordKind(e):"originalKeywordKind"in e&&(t=e.originalKeywordKind),t)return t===de.NullKeyword?_n.AST_TOKEN_TYPES.Null:t>=de.FirstFutureReservedWord&&t<=de.LastKeyword?_n.AST_TOKEN_TYPES.Identifier:_n.AST_TOKEN_TYPES.Keyword;if(e.kind>=de.FirstKeyword&&e.kind<=de.LastFutureReservedWord)return e.kind===de.FalseKeyword||e.kind===de.TrueKeyword?_n.AST_TOKEN_TYPES.Boolean:_n.AST_TOKEN_TYPES.Keyword;if(e.kind>=de.FirstPunctuation&&e.kind<=de.LastPunctuation)return _n.AST_TOKEN_TYPES.Punctuator;if(e.kind>=de.NoSubstitutionTemplateLiteral&&e.kind<=de.TemplateTail)return _n.AST_TOKEN_TYPES.Template;switch(e.kind){case de.NumericLiteral:return _n.AST_TOKEN_TYPES.Numeric;case de.JsxText:return _n.AST_TOKEN_TYPES.JSXText;case de.StringLiteral:return e.parent.kind===de.JsxAttribute||e.parent.kind===de.JsxElement?_n.AST_TOKEN_TYPES.JSXText:_n.AST_TOKEN_TYPES.String;case de.RegularExpressionLiteral:return _n.AST_TOKEN_TYPES.RegularExpression;case de.Identifier:case de.ConstructorKeyword:case de.GetKeyword:case de.SetKeyword:default:}return e.kind===de.Identifier&&(o6(e.parent)||e.parent.kind===de.PropertyAccessExpression&&nw(e))?_n.AST_TOKEN_TYPES.JSXIdentifier:_n.AST_TOKEN_TYPES.Identifier}he.getTokenType=iw;function aw(e,t){let n=e.kind===de.JsxText?e.getFullStart():e.getStart(t),a=e.getEnd(),_=t.text.slice(n,a),p=iw(e),m=[n,a],y=ew(m,t);return p===_n.AST_TOKEN_TYPES.RegularExpression?{type:p,value:_,range:m,loc:y,regex:{pattern:_.slice(1,_.lastIndexOf("/")),flags:_.slice(_.lastIndexOf("/")+1)}}:{type:p,value:_,range:m,loc:y}}he.convertToken=aw;function LB(e){let t=[];function n(a){K7(a)||xB(a)||(AB(a)&&a.kind!==de.EndOfFileToken?t.push(aw(a,e)):a.getChildren(e).forEach(n))}return n(e),t}he.convertTokens=LB;var Hm=class extends Error{constructor(t,n,a){super(t),this.fileName=n,this.location=a,Object.defineProperty(this,"name",{value:new.target.name,enumerable:!1,configurable:!0})}get index(){return this.location.start.offset}get lineNumber(){return this.location.start.line}get column(){return this.location.start.column}};he.TSError=Hm;function JB(e,t,n,a=n){let[_,p]=[n,a].map(m=>{let{line:y,character:u}=t.getLineAndCharacterOfPosition(m);return{line:y+1,column:u,offset:m}});return new Hm(e,t.fileName,{start:_,end:p})}he.createError=JB;function RB(e){var t;return!!("illegalDecorators"in e&&((t=e.illegalDecorators)!=null&&t.length))}he.nodeHasIllegalDecorators=RB;function ow(e,t){return e.kind===de.EndOfFileToken?!!e.jsDoc:e.getWidth(t)!==0}he.nodeHasTokens=ow;function sw(e,t){if(e!==void 0)for(let n=0;n=0&&e.kind!==de.EndOfFileToken}function BB(e){return!FB(e)}he.nodeIsPresent=BB;function UB(e){return Ve.findAncestor(e.parent,Ve.isFunctionLike)}he.getContainingFunction=UB;function qB(e){return Y7(de.AbstractKeyword,e)}function zB(e){if(e.parameters.length&&!Ve.isJSDocSignature(e)){let t=e.parameters[0];if(WB(t))return t}return null}function WB(e){return s6(e.name)}function VB(e){switch(e.kind){case de.ClassDeclaration:return!0;case de.ClassExpression:return!0;case de.PropertyDeclaration:{let{parent:t}=e;return!!(Ve.isClassDeclaration(t)||Ve.isClassLike(t)&&!qB(e))}case de.GetAccessor:case de.SetAccessor:case de.MethodDeclaration:{let{parent:t}=e;return!!e.body&&(Ve.isClassDeclaration(t)||Ve.isClassLike(t))}case de.Parameter:{let{parent:t}=e,n=t.parent;return!!t&&"body"in t&&!!t.body&&(t.kind===de.Constructor||t.kind===de.MethodDeclaration||t.kind===de.SetAccessor)&&zB(t)!==e&&!!n&&n.kind===de.ClassDeclaration}}return!1}he.nodeCanBeDecorated=VB;function cw(e){switch(e.kind){case de.Identifier:return!0;case de.PropertyAccessExpression:case de.ElementAccessExpression:return!(e.flags&Ve.NodeFlags.OptionalChain);case de.ParenthesizedExpression:case de.TypeAssertionExpression:case de.AsExpression:case de.SatisfiesExpression:case de.NonNullExpression:return cw(e.expression);default:return!1}}he.isValidAssignmentTarget=cw;function HB(e){let t=(0,uu.getModifiers)(e),n=e;for(;(!t||t.length===0)&&Ve.isModuleDeclaration(n.parent);){let a=(0,uu.getModifiers)(n.parent);a!=null&&a.length&&(t=a),n=n.parent}return t}he.getNamespaceModifiers=HB});var c6=mt(xr=>{"use strict";var GB=xr&&xr.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),XB=xr&&xr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$B=xr&&xr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&GB(t,e,n);return XB(t,e),t},Ce=xr&&xr.__classPrivateFieldGet||function(e,t,n,a){if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?a:n==="a"?a.call(e):a?a.value:t.get(e)},we,lw,dn,Gn,rt,uw;Object.defineProperty(xr,"__esModule",{value:!0});xr.Converter=xr.convertError=void 0;var it=$B(lt()),ta=n6(),le=Gm(),L=Wm(),C=it.SyntaxKind;function QB(e){return(0,le.createError)("message"in e&&e.message||e.messageText,e.file,e.start)}xr.convertError=QB;var _6=class{constructor(t,n){we.add(this),this.esTreeNodeToTSNodeMap=new WeakMap,this.tsNodeToESTreeNodeMap=new WeakMap,this.allowPattern=!1,this.ast=t,this.options={...n}}getASTMaps(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}convertProgram(){return this.converter(this.ast)}converter(t,n,a){if(!t)return null;Ce(this,we,"m",lw).call(this,t);let _=this.allowPattern;a!==void 0&&(this.allowPattern=a);let p=this.convertNode(t,n??t.parent);return this.registerTSNodeInNodeMap(t,p),this.allowPattern=_,p}fixExports(t,n){let _=it.isModuleDeclaration(t)&&!!(t.flags&it.NodeFlags.Namespace)?(0,le.getNamespaceModifiers)(t):(0,ta.getModifiers)(t);if((_==null?void 0:_[0].kind)===C.ExportKeyword){this.registerTSNodeInNodeMap(t,n);let p=_[0],m=_[1],y=(m==null?void 0:m.kind)===C.DefaultKeyword,u=y?(0,le.findNextToken)(m,this.ast,this.ast):(0,le.findNextToken)(p,this.ast,this.ast);if(n.range[0]=u.getStart(this.ast),n.loc=(0,le.getLocFor)(n.range,this.ast),y)return this.createNode(t,{type:L.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:n,range:[p.getStart(this.ast),n.range[1]],exportKind:"value"});let x=n.type===L.AST_NODE_TYPES.TSInterfaceDeclaration||n.type===L.AST_NODE_TYPES.TSTypeAliasDeclaration,d="declare"in n&&n.declare;return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.ExportNamedDeclaration,declaration:n,specifiers:[],source:null,exportKind:x||d?"type":"value",range:[p.getStart(this.ast),n.range[1]],attributes:[]},"assertions","attributes",!0))}return n}registerTSNodeInNodeMap(t,n){n&&this.options.shouldPreserveNodeMaps&&(this.tsNodeToESTreeNodeMap.has(t)||this.tsNodeToESTreeNodeMap.set(t,n))}convertPattern(t,n){return this.converter(t,n,!0)}convertChild(t,n){return this.converter(t,n,!1)}createNode(t,n){let a=n;return a.range??(a.range=(0,le.getRange)(t,this.ast)),a.loc??(a.loc=(0,le.getLocFor)(a.range,this.ast)),a&&this.options.shouldPreserveNodeMaps&&this.esTreeNodeToTSNodeMap.set(a,t),a}convertBindingNameWithTypeAnnotation(t,n,a){let _=this.convertPattern(t);return n&&(_.typeAnnotation=this.convertTypeAnnotation(n,a),this.fixParentLocation(_,_.typeAnnotation.range)),_}convertTypeAnnotation(t,n){let a=(n==null?void 0:n.kind)===C.FunctionType||(n==null?void 0:n.kind)===C.ConstructorType?2:1,p=[t.getFullStart()-a,t.end],m=(0,le.getLocFor)(p,this.ast);return{type:L.AST_NODE_TYPES.TSTypeAnnotation,loc:m,range:p,typeAnnotation:this.convertChild(t)}}convertBodyExpressions(t,n){let a=(0,le.canContainDirective)(n);return t.map(_=>{let p=this.convertChild(_);if(a){if(p!=null&&p.expression&&it.isExpressionStatement(_)&&it.isStringLiteral(_.expression)){let m=p.expression.raw;return p.directive=m.slice(1,-1),p}a=!1}return p}).filter(_=>_)}convertTypeArgumentsToTypeParameterInstantiation(t,n){let a=(0,le.findNextToken)(t,this.ast,this.ast);return this.createNode(n,{type:L.AST_NODE_TYPES.TSTypeParameterInstantiation,range:[t.pos-1,a.end],params:t.map(_=>this.convertChild(_))})}convertTSTypeParametersToTypeParametersDeclaration(t){let n=(0,le.findNextToken)(t,this.ast,this.ast),a=[t.pos-1,n.end];return{type:L.AST_NODE_TYPES.TSTypeParameterDeclaration,range:a,loc:(0,le.getLocFor)(a,this.ast),params:t.map(_=>this.convertChild(_))}}convertParameters(t){return t!=null&&t.length?t.map(n=>{var _;let a=this.convertChild(n);return a.decorators=((_=(0,ta.getDecorators)(n))==null?void 0:_.map(p=>this.convertChild(p)))??[],a}):[]}convertChainExpression(t,n){let{child:a,isOptional:_}=t.type===L.AST_NODE_TYPES.MemberExpression?{child:t.object,isOptional:t.optional}:t.type===L.AST_NODE_TYPES.CallExpression?{child:t.callee,isOptional:t.optional}:{child:t.expression,isOptional:!1},p=(0,le.isChildUnwrappableOptionalChain)(n,a);if(!p&&!_)return t;if(p&&(0,le.isChainExpression)(a)){let m=a.expression;t.type===L.AST_NODE_TYPES.MemberExpression?t.object=m:t.type===L.AST_NODE_TYPES.CallExpression?t.callee=m:t.expression=m}return this.createNode(n,{type:L.AST_NODE_TYPES.ChainExpression,expression:t})}deeplyCopy(t){t.kind===it.SyntaxKind.JSDocFunctionType&&Ce(this,we,"m",rt).call(this,t,"JSDoc types can only be used inside documentation comments.");let n=`TS${C[t.kind]}`;if(this.options.errorOnUnknownASTType&&!L.AST_NODE_TYPES[n])throw new Error(`Unknown AST_NODE_TYPE: "${n}"`);let a=this.createNode(t,{type:n});"type"in t&&(a.typeAnnotation=t.type&&"kind"in t.type&&it.isTypeNode(t.type)?this.convertTypeAnnotation(t.type,t):null),"typeArguments"in t&&(a.typeArguments=t.typeArguments&&"pos"in t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null,Ce(this,we,"m",Gn).call(this,a,"typeParameters","typeArguments")),"typeParameters"in t&&(a.typeParameters=t.typeParameters&&"pos"in t.typeParameters?this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters):null);let _=(0,ta.getDecorators)(t);_!=null&&_.length&&(a.decorators=_.map(m=>this.convertChild(m)));let p=new Set(["_children","decorators","end","flags","illegalDecorators","heritageClauses","locals","localSymbol","jsDoc","kind","modifierFlagsCache","modifiers","nextContainer","parent","pos","symbol","transformFlags","type","typeArguments","typeParameters"]);return Object.entries(t).filter(([m])=>!p.has(m)).forEach(([m,y])=>{Array.isArray(y)?a[m]=y.map(u=>this.convertChild(u)):y&&typeof y=="object"&&y.kind?a[m]=this.convertChild(y):a[m]=y}),a}convertJSXIdentifier(t){let n=this.createNode(t,{type:L.AST_NODE_TYPES.JSXIdentifier,name:t.getText()});return this.registerTSNodeInNodeMap(t,n),n}convertJSXNamespaceOrIdentifier(t){if(t.kind===it.SyntaxKind.JsxNamespacedName){let _=this.createNode(t,{type:L.AST_NODE_TYPES.JSXNamespacedName,namespace:this.createNode(t.namespace,{type:L.AST_NODE_TYPES.JSXIdentifier,name:t.namespace.text}),name:this.createNode(t.name,{type:L.AST_NODE_TYPES.JSXIdentifier,name:t.name.text})});return this.registerTSNodeInNodeMap(t,_),_}let n=t.getText(),a=n.indexOf(":");if(a>0){let _=(0,le.getRange)(t,this.ast),p=this.createNode(t,{type:L.AST_NODE_TYPES.JSXNamespacedName,namespace:this.createNode(t,{type:L.AST_NODE_TYPES.JSXIdentifier,name:n.slice(0,a),range:[_[0],_[0]+a]}),name:this.createNode(t,{type:L.AST_NODE_TYPES.JSXIdentifier,name:n.slice(a+1),range:[_[0]+a+1,_[1]]}),range:_});return this.registerTSNodeInNodeMap(t,p),p}return this.convertJSXIdentifier(t)}convertJSXTagName(t,n){let a;switch(t.kind){case C.PropertyAccessExpression:t.name.kind===C.PrivateIdentifier&&Ce(this,we,"m",rt).call(this,t.name,"Non-private identifier expected."),a=this.createNode(t,{type:L.AST_NODE_TYPES.JSXMemberExpression,object:this.convertJSXTagName(t.expression,n),property:this.convertJSXIdentifier(t.name)});break;case C.ThisKeyword:case C.Identifier:default:return this.convertJSXNamespaceOrIdentifier(t)}return this.registerTSNodeInNodeMap(t,a),a}convertMethodSignature(t){return this.createNode(t,{type:L.AST_NODE_TYPES.TSMethodSignature,accessibility:(0,le.getTSNodeAccessibility)(t),computed:(0,le.isComputedProperty)(t.name),key:this.convertChild(t.name),kind:(()=>{switch(t.kind){case C.GetAccessor:return"get";case C.SetAccessor:return"set";case C.MethodSignature:return"method"}})(),optional:(0,le.isOptional)(t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}convertImportAttributes(t){return t===void 0?[]:t.elements.map(n=>this.convertChild(n))}fixParentLocation(t,n){n[0]t.range[1]&&(t.range[1]=n[1],t.loc.end=(0,le.getLineAndCharacterFor)(t.range[1],this.ast))}assertModuleSpecifier(t,n){var a;!n&&t.moduleSpecifier==null&&Ce(this,we,"m",dn).call(this,t,"Module specifier must be a string literal."),t.moduleSpecifier&&((a=t.moduleSpecifier)==null?void 0:a.kind)!==C.StringLiteral&&Ce(this,we,"m",dn).call(this,t.moduleSpecifier,"Module specifier must be a string literal.")}convertNode(t,n){var a,_,p,m,y,u,x;switch(t.kind){case C.SourceFile:return this.createNode(t,{type:L.AST_NODE_TYPES.Program,body:this.convertBodyExpressions(t.statements,t),comments:void 0,range:[t.getStart(this.ast),t.endOfFileToken.end],sourceType:t.externalModuleIndicator?"module":"script",tokens:void 0});case C.Block:return this.createNode(t,{type:L.AST_NODE_TYPES.BlockStatement,body:this.convertBodyExpressions(t.statements,t)});case C.Identifier:return(0,le.isThisInTypeQuery)(t)?this.createNode(t,{type:L.AST_NODE_TYPES.ThisExpression}):this.createNode(t,{type:L.AST_NODE_TYPES.Identifier,decorators:[],name:t.text,optional:!1,typeAnnotation:void 0});case C.PrivateIdentifier:return this.createNode(t,{type:L.AST_NODE_TYPES.PrivateIdentifier,name:t.text.slice(1)});case C.WithStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.WithStatement,object:this.convertChild(t.expression),body:this.convertChild(t.statement)});case C.ReturnStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ReturnStatement,argument:this.convertChild(t.expression)});case C.LabeledStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.LabeledStatement,label:this.convertChild(t.label),body:this.convertChild(t.statement)});case C.ContinueStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ContinueStatement,label:this.convertChild(t.label)});case C.BreakStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.BreakStatement,label:this.convertChild(t.label)});case C.IfStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.IfStatement,test:this.convertChild(t.expression),consequent:this.convertChild(t.thenStatement),alternate:this.convertChild(t.elseStatement)});case C.SwitchStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.SwitchStatement,discriminant:this.convertChild(t.expression),cases:t.caseBlock.clauses.map(d=>this.convertChild(d))});case C.CaseClause:case C.DefaultClause:return this.createNode(t,{type:L.AST_NODE_TYPES.SwitchCase,test:t.kind===C.CaseClause?this.convertChild(t.expression):null,consequent:t.statements.map(d=>this.convertChild(d))});case C.ThrowStatement:return t.expression.end===t.expression.pos&&Ce(this,we,"m",dn).call(this,t,"A throw statement must throw an expression."),this.createNode(t,{type:L.AST_NODE_TYPES.ThrowStatement,argument:this.convertChild(t.expression)});case C.TryStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.TryStatement,block:this.convertChild(t.tryBlock),handler:this.convertChild(t.catchClause),finalizer:this.convertChild(t.finallyBlock)});case C.CatchClause:return(a=t.variableDeclaration)!=null&&a.initializer&&Ce(this,we,"m",rt).call(this,t.variableDeclaration.initializer,"Catch clause variable cannot have an initializer."),this.createNode(t,{type:L.AST_NODE_TYPES.CatchClause,param:t.variableDeclaration?this.convertBindingNameWithTypeAnnotation(t.variableDeclaration.name,t.variableDeclaration.type):null,body:this.convertChild(t.block)});case C.WhileStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.WhileStatement,test:this.convertChild(t.expression),body:this.convertChild(t.statement)});case C.DoStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.DoWhileStatement,test:this.convertChild(t.expression),body:this.convertChild(t.statement)});case C.ForStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ForStatement,init:this.convertChild(t.initializer),test:this.convertChild(t.condition),update:this.convertChild(t.incrementor),body:this.convertChild(t.statement)});case C.ForInStatement:return Ce(this,we,"m",uw).call(this,t.initializer),this.createNode(t,{type:L.AST_NODE_TYPES.ForInStatement,left:this.convertPattern(t.initializer),right:this.convertChild(t.expression),body:this.convertChild(t.statement)});case C.ForOfStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ForOfStatement,left:this.convertPattern(t.initializer),right:this.convertChild(t.expression),body:this.convertChild(t.statement),await:!!(t.awaitModifier&&t.awaitModifier.kind===C.AwaitKeyword)});case C.FunctionDeclaration:{let d=(0,le.hasModifier)(C.DeclareKeyword,t),S=this.createNode(t,{type:d||!t.body?L.AST_NODE_TYPES.TSDeclareFunction:L.AST_NODE_TYPES.FunctionDeclaration,async:(0,le.hasModifier)(C.AsyncKeyword,t),body:this.convertChild(t.body)||void 0,declare:d,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,S)}case C.VariableDeclaration:return this.createNode(t,{type:L.AST_NODE_TYPES.VariableDeclarator,definite:!!t.exclamationToken,id:this.convertBindingNameWithTypeAnnotation(t.name,t.type,t),init:this.convertChild(t.initializer)});case C.VariableStatement:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.VariableDeclaration,declarations:t.declarationList.declarations.map(S=>this.convertChild(S)),declare:(0,le.hasModifier)(C.DeclareKeyword,t),kind:(0,le.getDeclarationKind)(t.declarationList)});return d.declarations.length||Ce(this,we,"m",dn).call(this,t,"A variable declaration list must have at least one variable declarator."),(d.kind==="using"||d.kind==="await using")&&t.declarationList.declarations.forEach((S,T)=>{d.declarations[T].init==null&&Ce(this,we,"m",rt).call(this,S,`'${d.kind}' declarations must be initialized.`),d.declarations[T].id.type!==L.AST_NODE_TYPES.Identifier&&Ce(this,we,"m",rt).call(this,S.name,`'${d.kind}' declarations may not have binding patterns.`)}),this.fixExports(t,d)}case C.VariableDeclarationList:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.VariableDeclaration,declarations:t.declarations.map(S=>this.convertChild(S)),declare:!1,kind:(0,le.getDeclarationKind)(t)});return(d.kind==="using"||d.kind==="await using")&&t.declarations.forEach((S,T)=>{d.declarations[T].init!=null&&Ce(this,we,"m",rt).call(this,S,`'${d.kind}' declarations may not be initialized in for statement.`),d.declarations[T].id.type!==L.AST_NODE_TYPES.Identifier&&Ce(this,we,"m",rt).call(this,S.name,`'${d.kind}' declarations may not have binding patterns.`)}),d}case C.ExpressionStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ExpressionStatement,directive:void 0,expression:this.convertChild(t.expression)});case C.ThisKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.ThisExpression});case C.ArrayLiteralExpression:return this.allowPattern?this.createNode(t,{type:L.AST_NODE_TYPES.ArrayPattern,decorators:[],elements:t.elements.map(d=>this.convertPattern(d)),optional:!1,typeAnnotation:void 0}):this.createNode(t,{type:L.AST_NODE_TYPES.ArrayExpression,elements:t.elements.map(d=>this.convertChild(d))});case C.ObjectLiteralExpression:{if(this.allowPattern)return this.createNode(t,{type:L.AST_NODE_TYPES.ObjectPattern,decorators:[],optional:!1,properties:t.properties.map(S=>this.convertPattern(S)),typeAnnotation:void 0});let d=[];for(let S of t.properties)(S.kind===C.GetAccessor||S.kind===C.SetAccessor||S.kind===C.MethodDeclaration)&&!S.body&&Ce(this,we,"m",dn).call(this,S.end-1,"'{' expected."),d.push(this.convertChild(S));return this.createNode(t,{type:L.AST_NODE_TYPES.ObjectExpression,properties:d})}case C.PropertyAssignment:{let{questionToken:d,exclamationToken:S}=t;return d&&Ce(this,we,"m",rt).call(this,d,"A property assignment cannot have a question token."),S&&Ce(this,we,"m",rt).call(this,S,"A property assignment cannot have an exclamation token."),this.createNode(t,{type:L.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:this.converter(t.initializer,t,this.allowPattern),computed:(0,le.isComputedProperty)(t.name),method:!1,optional:!1,shorthand:!1,kind:"init"})}case C.ShorthandPropertyAssignment:{let{modifiers:d,questionToken:S,exclamationToken:T}=t;return d&&Ce(this,we,"m",rt).call(this,d[0],"A shorthand property assignment cannot have modifiers."),S&&Ce(this,we,"m",rt).call(this,S,"A shorthand property assignment cannot have a question token."),T&&Ce(this,we,"m",rt).call(this,T,"A shorthand property assignment cannot have an exclamation token."),t.objectAssignmentInitializer?this.createNode(t,{type:L.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertPattern(t.name),optional:!1,right:this.convertChild(t.objectAssignmentInitializer),typeAnnotation:void 0}),computed:!1,method:!1,optional:!1,shorthand:!0,kind:"init"}):this.createNode(t,{type:L.AST_NODE_TYPES.Property,computed:!1,key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.convertChild(t.name)})}case C.ComputedPropertyName:return this.convertChild(t.expression);case C.PropertyDeclaration:{let d=(0,le.hasModifier)(C.AbstractKeyword,t);d&&t.initializer&&Ce(this,we,"m",rt).call(this,t.initializer,"Abstract property cannot have an initializer.");let S=(0,le.hasModifier)(C.AccessorKeyword,t),T=S?d?L.AST_NODE_TYPES.TSAbstractAccessorProperty:L.AST_NODE_TYPES.AccessorProperty:d?L.AST_NODE_TYPES.TSAbstractPropertyDefinition:L.AST_NODE_TYPES.PropertyDefinition,A=this.convertChild(t.name);return this.createNode(t,{type:T,key:A,accessibility:(0,le.getTSNodeAccessibility)(t),value:d?null:this.convertChild(t.initializer),computed:(0,le.isComputedProperty)(t.name),static:(0,le.hasModifier)(C.StaticKeyword,t),readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),decorators:((_=(0,ta.getDecorators)(t))==null?void 0:_.map(N=>this.convertChild(N)))??[],declare:(0,le.hasModifier)(C.DeclareKeyword,t),override:(0,le.hasModifier)(C.OverrideKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t),optional:(A.type===L.AST_NODE_TYPES.Literal||t.name.kind===C.Identifier||t.name.kind===C.ComputedPropertyName||t.name.kind===C.PrivateIdentifier)&&!!t.questionToken,definite:!!t.exclamationToken})}case C.GetAccessor:case C.SetAccessor:if(t.parent.kind===C.InterfaceDeclaration||t.parent.kind===C.TypeLiteral)return this.convertMethodSignature(t);case C.MethodDeclaration:{let d=this.createNode(t,{type:t.body?L.AST_NODE_TYPES.FunctionExpression:L.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,id:null,generator:!!t.asteriskToken,expression:!1,async:(0,le.hasModifier)(C.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,range:[t.parameters.pos-1,t.end],params:[],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});d.typeParameters&&this.fixParentLocation(d,d.typeParameters.range);let S;if(n.kind===C.ObjectLiteralExpression)d.params=t.parameters.map(T=>this.convertChild(T)),S=this.createNode(t,{type:L.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:d,computed:(0,le.isComputedProperty)(t.name),optional:!!t.questionToken,method:t.kind===C.MethodDeclaration,shorthand:!1,kind:"init"});else{d.params=this.convertParameters(t.parameters);let T=(0,le.hasModifier)(C.AbstractKeyword,t)?L.AST_NODE_TYPES.TSAbstractMethodDefinition:L.AST_NODE_TYPES.MethodDefinition;S=this.createNode(t,{type:T,accessibility:(0,le.getTSNodeAccessibility)(t),computed:(0,le.isComputedProperty)(t.name),decorators:((p=(0,ta.getDecorators)(t))==null?void 0:p.map(A=>this.convertChild(A)))??[],key:this.convertChild(t.name),kind:"method",optional:!!t.questionToken,override:(0,le.hasModifier)(C.OverrideKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t),value:d})}return t.kind===C.GetAccessor?S.kind="get":t.kind===C.SetAccessor?S.kind="set":!S.static&&t.name.kind===C.StringLiteral&&t.name.text==="constructor"&&S.type!==L.AST_NODE_TYPES.Property&&(S.kind="constructor"),S}case C.Constructor:{let d=(0,le.getLastModifier)(t),S=(d&&(0,le.findNextToken)(d,t,this.ast))??t.getFirstToken(),T=this.createNode(t,{type:t.body?L.AST_NODE_TYPES.FunctionExpression:L.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,async:!1,body:this.convertChild(t.body),declare:!1,expression:!1,generator:!1,id:null,params:this.convertParameters(t.parameters),range:[t.parameters.pos-1,t.end],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});T.typeParameters&&this.fixParentLocation(T,T.typeParameters.range);let A=this.createNode(t,{type:L.AST_NODE_TYPES.Identifier,decorators:[],name:"constructor",optional:!1,range:[S.getStart(this.ast),S.end],typeAnnotation:void 0}),N=(0,le.hasModifier)(C.StaticKeyword,t);return this.createNode(t,{type:(0,le.hasModifier)(C.AbstractKeyword,t)?L.AST_NODE_TYPES.TSAbstractMethodDefinition:L.AST_NODE_TYPES.MethodDefinition,accessibility:(0,le.getTSNodeAccessibility)(t),computed:!1,decorators:[],optional:!1,key:A,kind:N?"method":"constructor",override:!1,static:N,value:T})}case C.FunctionExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.FunctionExpression,async:(0,le.hasModifier)(C.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case C.SuperKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.Super});case C.ArrayBindingPattern:return this.createNode(t,{type:L.AST_NODE_TYPES.ArrayPattern,decorators:[],elements:t.elements.map(d=>this.convertPattern(d)),optional:!1,typeAnnotation:void 0});case C.OmittedExpression:return null;case C.ObjectBindingPattern:return this.createNode(t,{type:L.AST_NODE_TYPES.ObjectPattern,decorators:[],optional:!1,properties:t.elements.map(d=>this.convertPattern(d)),typeAnnotation:void 0});case C.BindingElement:{if(n.kind===C.ArrayBindingPattern){let S=this.convertChild(t.name,n);return t.initializer?this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:S,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}):t.dotDotDotToken?this.createNode(t,{type:L.AST_NODE_TYPES.RestElement,argument:S,decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):S}let d;return t.dotDotDotToken?d=this.createNode(t,{type:L.AST_NODE_TYPES.RestElement,argument:this.convertChild(t.propertyName??t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):d=this.createNode(t,{type:L.AST_NODE_TYPES.Property,key:this.convertChild(t.propertyName??t.name),value:this.convertChild(t.name),computed:!!(t.propertyName&&t.propertyName.kind===C.ComputedPropertyName),method:!1,optional:!1,shorthand:!t.propertyName,kind:"init"}),t.initializer&&(d.value=this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertChild(t.name),optional:!1,range:[t.name.getStart(this.ast),t.initializer.end],right:this.convertChild(t.initializer),typeAnnotation:void 0})),d}case C.ArrowFunction:return this.createNode(t,{type:L.AST_NODE_TYPES.ArrowFunctionExpression,generator:!1,id:null,params:this.convertParameters(t.parameters),body:this.convertChild(t.body),async:(0,le.hasModifier)(C.AsyncKeyword,t),expression:t.body.kind!==C.Block,returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case C.YieldExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.YieldExpression,delegate:!!t.asteriskToken,argument:this.convertChild(t.expression)});case C.AwaitExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.AwaitExpression,argument:this.convertChild(t.expression)});case C.NoSubstitutionTemplateLiteral:return this.createNode(t,{type:L.AST_NODE_TYPES.TemplateLiteral,quasis:[this.createNode(t,{type:L.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-1),cooked:t.text},tail:!0})],expressions:[]});case C.TemplateExpression:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TemplateLiteral,quasis:[this.convertChild(t.head)],expressions:[]});return t.templateSpans.forEach(S=>{d.expressions.push(this.convertChild(S.expression)),d.quasis.push(this.convertChild(S.literal))}),d}case C.TaggedTemplateExpression:return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.TaggedTemplateExpression,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),tag:this.convertChild(t.tag),quasi:this.convertChild(t.template)},"typeParameters","typeArguments"));case C.TemplateHead:case C.TemplateMiddle:case C.TemplateTail:{let d=t.kind===C.TemplateTail;return this.createNode(t,{type:L.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-(d?1:2)),cooked:t.text},tail:d})}case C.SpreadAssignment:case C.SpreadElement:return this.allowPattern?this.createNode(t,{type:L.AST_NODE_TYPES.RestElement,argument:this.convertPattern(t.expression),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):this.createNode(t,{type:L.AST_NODE_TYPES.SpreadElement,argument:this.convertChild(t.expression)});case C.Parameter:{let d,S;return t.dotDotDotToken?d=S=this.createNode(t,{type:L.AST_NODE_TYPES.RestElement,argument:this.convertChild(t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):t.initializer?(d=this.convertChild(t.name),S=this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:d,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}),(0,ta.getModifiers)(t)&&(S.range[0]=d.range[0],S.loc=(0,le.getLocFor)(S.range,this.ast))):d=S=this.convertChild(t.name,n),t.type&&(d.typeAnnotation=this.convertTypeAnnotation(t.type,t),this.fixParentLocation(d,d.typeAnnotation.range)),t.questionToken&&(t.questionToken.end>d.range[1]&&(d.range[1]=t.questionToken.end,d.loc.end=(0,le.getLineAndCharacterFor)(d.range[1],this.ast)),d.optional=!0),(0,ta.getModifiers)(t)?this.createNode(t,{type:L.AST_NODE_TYPES.TSParameterProperty,accessibility:(0,le.getTSNodeAccessibility)(t),decorators:[],override:(0,le.hasModifier)(C.OverrideKeyword,t),parameter:S,readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t)}):S}case C.ClassDeclaration:!t.name&&(!(0,le.hasModifier)(it.SyntaxKind.ExportKeyword,t)||!(0,le.hasModifier)(it.SyntaxKind.DefaultKeyword,t))&&Ce(this,we,"m",dn).call(this,t,"A class declaration without the 'default' modifier must have a name.");case C.ClassExpression:{let d=t.heritageClauses??[],S=t.kind===C.ClassDeclaration?L.AST_NODE_TYPES.ClassDeclaration:L.AST_NODE_TYPES.ClassExpression,T,A;for(let q of d){let{token:Q,types:se}=q;se.length===0&&Ce(this,we,"m",dn).call(this,q,`'${it.tokenToString(Q)}' list cannot be empty.`),Q===C.ExtendsKeyword?(T&&Ce(this,we,"m",dn).call(this,q,"'extends' clause already seen."),A&&Ce(this,we,"m",dn).call(this,q,"'extends' clause must precede 'implements' clause."),se.length>1&&Ce(this,we,"m",dn).call(this,se[1],"Classes can only extend a single class."),T??(T=q)):Q===C.ImplementsKeyword&&(A&&Ce(this,we,"m",dn).call(this,q,"'implements' clause already seen."),A??(A=q))}let N=this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:S,abstract:(0,le.hasModifier)(C.AbstractKeyword,t),body:this.createNode(t,{type:L.AST_NODE_TYPES.ClassBody,body:t.members.filter(le.isESTreeClassMember).map(q=>this.convertChild(q)),range:[t.members.pos-1,t.end]}),declare:(0,le.hasModifier)(C.DeclareKeyword,t),decorators:((m=(0,ta.getDecorators)(t))==null?void 0:m.map(q=>this.convertChild(q)))??[],id:this.convertChild(t.name),implements:(A==null?void 0:A.types.map(q=>this.convertChild(q)))??[],superClass:T!=null&&T.types[0]?this.convertChild(T.types[0].expression):null,superTypeArguments:void 0,typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)},"superTypeParameters","superTypeArguments"));return(y=T==null?void 0:T.types[0])!=null&&y.typeArguments&&(N.superTypeArguments=this.convertTypeArgumentsToTypeParameterInstantiation(T.types[0].typeArguments,T.types[0])),this.fixExports(t,N)}case C.ModuleBlock:return this.createNode(t,{type:L.AST_NODE_TYPES.TSModuleBlock,body:this.convertBodyExpressions(t.statements,t)});case C.ImportDeclaration:{this.assertModuleSpecifier(t,!1);let d=this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.ImportDeclaration,source:this.convertChild(t.moduleSpecifier),specifiers:[],importKind:"value",attributes:this.convertImportAttributes(t.attributes??t.assertClause)},"assertions","attributes",!0));if(t.importClause&&(t.importClause.isTypeOnly&&(d.importKind="type"),t.importClause.name&&d.specifiers.push(this.convertChild(t.importClause)),t.importClause.namedBindings))switch(t.importClause.namedBindings.kind){case C.NamespaceImport:d.specifiers.push(this.convertChild(t.importClause.namedBindings));break;case C.NamedImports:d.specifiers=d.specifiers.concat(t.importClause.namedBindings.elements.map(S=>this.convertChild(S)));break}return d}case C.NamespaceImport:return this.createNode(t,{type:L.AST_NODE_TYPES.ImportNamespaceSpecifier,local:this.convertChild(t.name)});case C.ImportSpecifier:return this.createNode(t,{type:L.AST_NODE_TYPES.ImportSpecifier,local:this.convertChild(t.name),imported:this.convertChild(t.propertyName??t.name),importKind:t.isTypeOnly?"type":"value"});case C.ImportClause:{let d=this.convertChild(t.name);return this.createNode(t,{type:L.AST_NODE_TYPES.ImportDefaultSpecifier,local:d,range:d.range})}case C.ExportDeclaration:return((u=t.exportClause)==null?void 0:u.kind)===C.NamedExports?(this.assertModuleSpecifier(t,!0),this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.ExportNamedDeclaration,source:this.convertChild(t.moduleSpecifier),specifiers:t.exportClause.elements.map(d=>this.convertChild(d)),exportKind:t.isTypeOnly?"type":"value",declaration:null,attributes:this.convertImportAttributes(t.attributes??t.assertClause)},"assertions","attributes",!0))):(this.assertModuleSpecifier(t,!1),this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.ExportAllDeclaration,source:this.convertChild(t.moduleSpecifier),exportKind:t.isTypeOnly?"type":"value",exported:((x=t.exportClause)==null?void 0:x.kind)===C.NamespaceExport?this.convertChild(t.exportClause.name):null,attributes:this.convertImportAttributes(t.attributes??t.assertClause)},"assertions","attributes",!0)));case C.ExportSpecifier:return this.createNode(t,{type:L.AST_NODE_TYPES.ExportSpecifier,local:this.convertChild(t.propertyName??t.name),exported:this.convertChild(t.name),exportKind:t.isTypeOnly?"type":"value"});case C.ExportAssignment:return t.isExportEquals?this.createNode(t,{type:L.AST_NODE_TYPES.TSExportAssignment,expression:this.convertChild(t.expression)}):this.createNode(t,{type:L.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:this.convertChild(t.expression),exportKind:"value"});case C.PrefixUnaryExpression:case C.PostfixUnaryExpression:{let d=(0,le.getTextForTokenKind)(t.operator);return d==="++"||d==="--"?((0,le.isValidAssignmentTarget)(t.operand)||Ce(this,we,"m",dn).call(this,t.operand,"Invalid left-hand side expression in unary operation"),this.createNode(t,{type:L.AST_NODE_TYPES.UpdateExpression,operator:d,prefix:t.kind===C.PrefixUnaryExpression,argument:this.convertChild(t.operand)})):this.createNode(t,{type:L.AST_NODE_TYPES.UnaryExpression,operator:d,prefix:t.kind===C.PrefixUnaryExpression,argument:this.convertChild(t.operand)})}case C.DeleteExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.UnaryExpression,operator:"delete",prefix:!0,argument:this.convertChild(t.expression)});case C.VoidExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.UnaryExpression,operator:"void",prefix:!0,argument:this.convertChild(t.expression)});case C.TypeOfExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.UnaryExpression,operator:"typeof",prefix:!0,argument:this.convertChild(t.expression)});case C.TypeOperator:return this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeOperator,operator:(0,le.getTextForTokenKind)(t.operator),typeAnnotation:this.convertChild(t.type)});case C.BinaryExpression:{if((0,le.isComma)(t.operatorToken)){let S=this.createNode(t,{type:L.AST_NODE_TYPES.SequenceExpression,expressions:[]}),T=this.convertChild(t.left);return T.type===L.AST_NODE_TYPES.SequenceExpression&&t.left.kind!==C.ParenthesizedExpression?S.expressions=S.expressions.concat(T.expressions):S.expressions.push(T),S.expressions.push(this.convertChild(t.right)),S}let d=(0,le.getBinaryExpressionType)(t.operatorToken);return this.allowPattern&&d.type===L.AST_NODE_TYPES.AssignmentExpression?this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertPattern(t.left,t),optional:!1,right:this.convertChild(t.right),typeAnnotation:void 0}):this.createNode(t,{...d,left:this.converter(t.left,t,d.type===L.AST_NODE_TYPES.AssignmentExpression),right:this.convertChild(t.right)})}case C.PropertyAccessExpression:{let d=this.convertChild(t.expression),S=this.convertChild(t.name),A=this.createNode(t,{type:L.AST_NODE_TYPES.MemberExpression,object:d,property:S,computed:!1,optional:t.questionDotToken!==void 0});return this.convertChainExpression(A,t)}case C.ElementAccessExpression:{let d=this.convertChild(t.expression),S=this.convertChild(t.argumentExpression),A=this.createNode(t,{type:L.AST_NODE_TYPES.MemberExpression,object:d,property:S,computed:!0,optional:t.questionDotToken!==void 0});return this.convertChainExpression(A,t)}case C.CallExpression:{if(t.expression.kind===C.ImportKeyword)return t.arguments.length!==1&&t.arguments.length!==2&&Ce(this,we,"m",dn).call(this,t.arguments[2]??t,"Dynamic import requires exactly one or two arguments."),this.createNode(t,{type:L.AST_NODE_TYPES.ImportExpression,source:this.convertChild(t.arguments[0]),attributes:t.arguments[1]?this.convertChild(t.arguments[1]):null});let d=this.convertChild(t.expression),S=t.arguments.map(N=>this.convertChild(N)),T=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),A=this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.CallExpression,callee:d,arguments:S,optional:t.questionDotToken!==void 0,typeArguments:T},"typeParameters","typeArguments"));return this.convertChainExpression(A,t)}case C.NewExpression:{let d=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t);return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.NewExpression,arguments:t.arguments?t.arguments.map(S=>this.convertChild(S)):[],callee:this.convertChild(t.expression),typeArguments:d},"typeParameters","typeArguments"))}case C.ConditionalExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.ConditionalExpression,test:this.convertChild(t.condition),consequent:this.convertChild(t.whenTrue),alternate:this.convertChild(t.whenFalse)});case C.MetaProperty:return this.createNode(t,{type:L.AST_NODE_TYPES.MetaProperty,meta:this.createNode(t.getFirstToken(),{type:L.AST_NODE_TYPES.Identifier,decorators:[],name:(0,le.getTextForTokenKind)(t.keywordToken),optional:!1,typeAnnotation:void 0}),property:this.convertChild(t.name)});case C.Decorator:return this.createNode(t,{type:L.AST_NODE_TYPES.Decorator,expression:this.convertChild(t.expression)});case C.StringLiteral:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:n.kind===C.JsxAttribute?(0,le.unescapeStringLiteralText)(t.text):t.text,raw:t.getText()});case C.NumericLiteral:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:Number(t.text),raw:t.getText()});case C.BigIntLiteral:{let d=(0,le.getRange)(t,this.ast),S=this.ast.text.slice(d[0],d[1]),T=S.slice(0,-1).replace(/_/g,""),A=typeof BigInt<"u"?BigInt(T):null;return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,raw:S,value:A,bigint:A==null?T:String(A),range:d})}case C.RegularExpressionLiteral:{let d=t.text.slice(1,t.text.lastIndexOf("/")),S=t.text.slice(t.text.lastIndexOf("/")+1),T=null;try{T=new RegExp(d,S)}catch{}return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:T,raw:t.text,regex:{pattern:d,flags:S}})}case C.TrueKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:!0,raw:"true"});case C.FalseKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:!1,raw:"false"});case C.NullKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:null,raw:"null"});case C.EmptyStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.EmptyStatement});case C.DebuggerStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.DebuggerStatement});case C.JsxElement:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXElement,openingElement:this.convertChild(t.openingElement),closingElement:this.convertChild(t.closingElement),children:t.children.map(d=>this.convertChild(d))});case C.JsxFragment:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXFragment,openingFragment:this.convertChild(t.openingFragment),closingFragment:this.convertChild(t.closingFragment),children:t.children.map(d=>this.convertChild(d))});case C.JsxSelfClosingElement:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXElement,openingElement:this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.JSXOpeningElement,typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):void 0,selfClosing:!0,name:this.convertJSXTagName(t.tagName,t),attributes:t.attributes.properties.map(d=>this.convertChild(d)),range:(0,le.getRange)(t,this.ast)},"typeParameters","typeArguments")),closingElement:null,children:[]});case C.JsxOpeningElement:return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.JSXOpeningElement,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),selfClosing:!1,name:this.convertJSXTagName(t.tagName,t),attributes:t.attributes.properties.map(d=>this.convertChild(d))},"typeParameters","typeArguments"));case C.JsxClosingElement:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXClosingElement,name:this.convertJSXTagName(t.tagName,t)});case C.JsxOpeningFragment:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXOpeningFragment});case C.JsxClosingFragment:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXClosingFragment});case C.JsxExpression:{let d=t.expression?this.convertChild(t.expression):this.createNode(t,{type:L.AST_NODE_TYPES.JSXEmptyExpression,range:[t.getStart(this.ast)+1,t.getEnd()-1]});return t.dotDotDotToken?this.createNode(t,{type:L.AST_NODE_TYPES.JSXSpreadChild,expression:d}):this.createNode(t,{type:L.AST_NODE_TYPES.JSXExpressionContainer,expression:d})}case C.JsxAttribute:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXAttribute,name:this.convertJSXNamespaceOrIdentifier(t.name),value:this.convertChild(t.initializer)});case C.JsxText:{let d=t.getFullStart(),S=t.getEnd(),T=this.ast.text.slice(d,S);return this.createNode(t,{type:L.AST_NODE_TYPES.JSXText,value:(0,le.unescapeStringLiteralText)(T),raw:T,range:[d,S]})}case C.JsxSpreadAttribute:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXSpreadAttribute,argument:this.convertChild(t.expression)});case C.QualifiedName:return this.createNode(t,{type:L.AST_NODE_TYPES.TSQualifiedName,left:this.convertChild(t.left),right:this.convertChild(t.right)});case C.TypeReference:return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.TSTypeReference,typeName:this.convertChild(t.typeName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"));case C.TypeParameter:return this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeParameter,name:this.convertChild(t.name),constraint:t.constraint&&this.convertChild(t.constraint),default:t.default?this.convertChild(t.default):void 0,in:(0,le.hasModifier)(C.InKeyword,t),out:(0,le.hasModifier)(C.OutKeyword,t),const:(0,le.hasModifier)(C.ConstKeyword,t)});case C.ThisType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSThisType});case C.AnyKeyword:case C.BigIntKeyword:case C.BooleanKeyword:case C.NeverKeyword:case C.NumberKeyword:case C.ObjectKeyword:case C.StringKeyword:case C.SymbolKeyword:case C.UnknownKeyword:case C.VoidKeyword:case C.UndefinedKeyword:case C.IntrinsicKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES[`TS${C[t.kind]}`]});case C.NonNullExpression:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSNonNullExpression,expression:this.convertChild(t.expression)});return this.convertChainExpression(d,t)}case C.TypeLiteral:return this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeLiteral,members:t.members.map(d=>this.convertChild(d))});case C.ArrayType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSArrayType,elementType:this.convertChild(t.elementType)});case C.IndexedAccessType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSIndexedAccessType,objectType:this.convertChild(t.objectType),indexType:this.convertChild(t.indexType)});case C.ConditionalType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSConditionalType,checkType:this.convertChild(t.checkType),extendsType:this.convertChild(t.extendsType),trueType:this.convertChild(t.trueType),falseType:this.convertChild(t.falseType)});case C.TypeQuery:return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.TSTypeQuery,exprName:this.convertChild(t.exprName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"));case C.MappedType:return t.members&&t.members.length>0&&Ce(this,we,"m",dn).call(this,t.members[0],"A mapped type may not declare properties or methods."),this.createNode(t,{type:L.AST_NODE_TYPES.TSMappedType,nameType:this.convertChild(t.nameType)??null,optional:t.questionToken&&(t.questionToken.kind===C.QuestionToken||(0,le.getTextForTokenKind)(t.questionToken.kind)),readonly:t.readonlyToken&&(t.readonlyToken.kind===C.ReadonlyKeyword||(0,le.getTextForTokenKind)(t.readonlyToken.kind)),typeAnnotation:t.type&&this.convertChild(t.type),typeParameter:this.convertChild(t.typeParameter)});case C.ParenthesizedExpression:return this.convertChild(t.expression,n);case C.TypeAliasDeclaration:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeAliasDeclaration,declare:(0,le.hasModifier)(C.DeclareKeyword,t),id:this.convertChild(t.name),typeAnnotation:this.convertChild(t.type),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,d)}case C.MethodSignature:return this.convertMethodSignature(t);case C.PropertySignature:{let{initializer:d}=t;return d&&Ce(this,we,"m",rt).call(this,d,"A property signature cannot have an initializer."),this.createNode(t,{type:L.AST_NODE_TYPES.TSPropertySignature,accessibility:(0,le.getTSNodeAccessibility)(t),computed:(0,le.isComputedProperty)(t.name),key:this.convertChild(t.name),optional:(0,le.isOptional)(t),readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)})}case C.IndexSignature:return this.createNode(t,{type:L.AST_NODE_TYPES.TSIndexSignature,accessibility:(0,le.getTSNodeAccessibility)(t),parameters:t.parameters.map(d=>this.convertChild(d)),readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)});case C.ConstructorType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSConstructorType,abstract:(0,le.hasModifier)(C.AbstractKeyword,t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case C.FunctionType:{let{modifiers:d}=t;d&&Ce(this,we,"m",rt).call(this,d[0],"A function type cannot have modifiers.")}case C.ConstructSignature:case C.CallSignature:{let d=t.kind===C.ConstructSignature?L.AST_NODE_TYPES.TSConstructSignatureDeclaration:t.kind===C.CallSignature?L.AST_NODE_TYPES.TSCallSignatureDeclaration:L.AST_NODE_TYPES.TSFunctionType;return this.createNode(t,{type:d,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}case C.ExpressionWithTypeArguments:{let d=n.kind,S=d===C.InterfaceDeclaration?L.AST_NODE_TYPES.TSInterfaceHeritage:d===C.HeritageClause?L.AST_NODE_TYPES.TSClassImplements:L.AST_NODE_TYPES.TSInstantiationExpression;return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:S,expression:this.convertChild(t.expression),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"))}case C.InterfaceDeclaration:{let d=t.heritageClauses??[],S=[];for(let A of d){A.token!==C.ExtendsKeyword&&Ce(this,we,"m",rt).call(this,A,A.token===C.ImplementsKeyword?"Interface declaration cannot have 'implements' clause.":"Unexpected token.");for(let N of A.types)S.push(this.convertChild(N,t))}let T=this.createNode(t,{type:L.AST_NODE_TYPES.TSInterfaceDeclaration,body:this.createNode(t,{type:L.AST_NODE_TYPES.TSInterfaceBody,body:t.members.map(A=>this.convertChild(A)),range:[t.members.pos-1,t.end]}),declare:(0,le.hasModifier)(C.DeclareKeyword,t),extends:S,id:this.convertChild(t.name),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,T)}case C.TypePredicate:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSTypePredicate,asserts:t.assertsModifier!==void 0,parameterName:this.convertChild(t.parameterName),typeAnnotation:null});return t.type&&(d.typeAnnotation=this.convertTypeAnnotation(t.type,t),d.typeAnnotation.loc=d.typeAnnotation.typeAnnotation.loc,d.typeAnnotation.range=d.typeAnnotation.typeAnnotation.range),d}case C.ImportType:{let d=(0,le.getRange)(t,this.ast);if(t.isTypeOf){let T=(0,le.findNextToken)(t.getFirstToken(),t,this.ast);d[0]=T.getStart(this.ast)}let S=this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.TSImportType,argument:this.convertChild(t.argument),qualifier:this.convertChild(t.qualifier),typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null,range:d},"typeParameters","typeArguments"));return t.isTypeOf?this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeQuery,exprName:S,typeArguments:void 0,typeParameters:void 0}):S}case C.EnumDeclaration:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSEnumDeclaration,const:(0,le.hasModifier)(C.ConstKeyword,t),declare:(0,le.hasModifier)(C.DeclareKeyword,t),id:this.convertChild(t.name),members:t.members.map(S=>this.convertChild(S))});return this.fixExports(t,d)}case C.EnumMember:return this.createNode(t,{type:L.AST_NODE_TYPES.TSEnumMember,computed:t.name.kind===it.SyntaxKind.ComputedPropertyName,id:this.convertChild(t.name),initializer:t.initializer&&this.convertChild(t.initializer)});case C.ModuleDeclaration:{let d=(0,le.hasModifier)(C.DeclareKeyword,t),S=this.createNode(t,{type:L.AST_NODE_TYPES.TSModuleDeclaration,...(()=>{if(t.flags&it.NodeFlags.GlobalAugmentation){let A=this.convertChild(t.name),N=this.convertChild(t.body);return(N==null||N.type===L.AST_NODE_TYPES.TSModuleDeclaration)&&Ce(this,we,"m",dn).call(this,t.body??t,"Expected a valid module body"),A.type!==L.AST_NODE_TYPES.Identifier&&Ce(this,we,"m",dn).call(this,t.name,"global module augmentation must have an Identifier id"),{kind:"global",body:N,declare:!1,global:!1,id:A}}if(!(t.flags&it.NodeFlags.Namespace)){let A=this.convertChild(t.body);return{kind:"module",...A!=null?{body:A}:{},declare:!1,global:!1,id:this.convertChild(t.name)}}t.body==null&&Ce(this,we,"m",dn).call(this,t,"Expected a module body"),t.name.kind!==it.SyntaxKind.Identifier&&Ce(this,we,"m",dn).call(this,t.name,"`namespace`s must have an Identifier id");let T=this.createNode(t.name,{decorators:[],name:t.name.text,optional:!1,range:[t.name.getStart(this.ast),t.name.getEnd()],type:L.AST_NODE_TYPES.Identifier,typeAnnotation:void 0});for(;t.body&&it.isModuleDeclaration(t.body)&&t.body.name;){t=t.body,d||(d=(0,le.hasModifier)(C.DeclareKeyword,t));let A=t.name,N=this.createNode(A,{decorators:[],name:A.text,optional:!1,range:[A.getStart(this.ast),A.getEnd()],type:L.AST_NODE_TYPES.Identifier,typeAnnotation:void 0});T=this.createNode(A,{left:T,right:N,range:[T.range[0],N.range[1]],type:L.AST_NODE_TYPES.TSQualifiedName})}return{kind:"namespace",body:this.convertChild(t.body),declare:!1,global:!1,id:T}})()});return S.declare=d,t.flags&it.NodeFlags.GlobalAugmentation&&(S.global=!0),this.fixExports(t,S)}case C.ParenthesizedType:return this.convertChild(t.type);case C.UnionType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSUnionType,types:t.types.map(d=>this.convertChild(d))});case C.IntersectionType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSIntersectionType,types:t.types.map(d=>this.convertChild(d))});case C.AsExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.TSAsExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});case C.InferType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSInferType,typeParameter:this.convertChild(t.typeParameter)});case C.LiteralType:return t.literal.kind===C.NullKeyword?this.createNode(t.literal,{type:L.AST_NODE_TYPES.TSNullKeyword}):this.createNode(t,{type:L.AST_NODE_TYPES.TSLiteralType,literal:this.convertChild(t.literal)});case C.TypeAssertionExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeAssertion,typeAnnotation:this.convertChild(t.type),expression:this.convertChild(t.expression)});case C.ImportEqualsDeclaration:return this.fixExports(t,this.createNode(t,{type:L.AST_NODE_TYPES.TSImportEqualsDeclaration,id:this.convertChild(t.name),importKind:t.isTypeOnly?"type":"value",moduleReference:this.convertChild(t.moduleReference)}));case C.ExternalModuleReference:return this.createNode(t,{type:L.AST_NODE_TYPES.TSExternalModuleReference,expression:this.convertChild(t.expression)});case C.NamespaceExportDeclaration:return this.createNode(t,{type:L.AST_NODE_TYPES.TSNamespaceExportDeclaration,id:this.convertChild(t.name)});case C.AbstractKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.TSAbstractKeyword});case C.TupleType:{let d="elementTypes"in t?t.elementTypes.map(S=>this.convertChild(S)):t.elements.map(S=>this.convertChild(S));return this.createNode(t,{type:L.AST_NODE_TYPES.TSTupleType,elementTypes:d})}case C.NamedTupleMember:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSNamedTupleMember,elementType:this.convertChild(t.type,t),label:this.convertChild(t.name,t),optional:t.questionToken!=null});return t.dotDotDotToken?(d.range[0]=d.label.range[0],d.loc.start=d.label.loc.start,this.createNode(t,{type:L.AST_NODE_TYPES.TSRestType,typeAnnotation:d})):d}case C.OptionalType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSOptionalType,typeAnnotation:this.convertChild(t.type)});case C.RestType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSRestType,typeAnnotation:this.convertChild(t.type)});case C.TemplateLiteralType:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSTemplateLiteralType,quasis:[this.convertChild(t.head)],types:[]});return t.templateSpans.forEach(S=>{d.types.push(this.convertChild(S.type)),d.quasis.push(this.convertChild(S.literal))}),d}case C.ClassStaticBlockDeclaration:return this.createNode(t,{type:L.AST_NODE_TYPES.StaticBlock,body:this.convertBodyExpressions(t.body.statements,t)});case C.AssertEntry:case C.ImportAttribute:return this.createNode(t,{type:L.AST_NODE_TYPES.ImportAttribute,key:this.convertChild(t.name),value:this.convertChild(t.value)});case C.SatisfiesExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.TSSatisfiesExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});default:return this.deeplyCopy(t)}}};xr.Converter=_6;we=new WeakSet,lw=function(t){if(!this.options.allowInvalidAST){(0,le.nodeHasIllegalDecorators)(t)&&Ce(this,we,"m",rt).call(this,t.illegalDecorators[0],"Decorators are not valid here.");for(let n of(0,ta.getDecorators)(t,!0)??[])(0,le.nodeCanBeDecorated)(t)||(it.isMethodDeclaration(t)&&!(0,le.nodeIsPresent)(t.body)?Ce(this,we,"m",rt).call(this,n,"A decorator can only decorate a method implementation, not an overload."):Ce(this,we,"m",rt).call(this,n,"Decorators are not valid here."));for(let n of(0,ta.getModifiers)(t,!0)??[]){if(n.kind!==C.ReadonlyKeyword&&((t.kind===C.PropertySignature||t.kind===C.MethodSignature)&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on a type member`),t.kind===C.IndexSignature&&(n.kind!==C.StaticKeyword||!it.isClassLike(t.parent))&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on an index signature`)),n.kind!==C.InKeyword&&n.kind!==C.OutKeyword&&n.kind!==C.ConstKeyword&&t.kind===C.TypeParameter&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on a type parameter`),(n.kind===C.InKeyword||n.kind===C.OutKeyword)&&(t.kind!==C.TypeParameter||!(it.isInterfaceDeclaration(t.parent)||it.isClassLike(t.parent)||it.isTypeAliasDeclaration(t.parent)))&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`),n.kind===C.ReadonlyKeyword&&t.kind!==C.PropertyDeclaration&&t.kind!==C.PropertySignature&&t.kind!==C.IndexSignature&&t.kind!==C.Parameter&&Ce(this,we,"m",rt).call(this,n,"'readonly' modifier can only appear on a property declaration or index signature."),n.kind===C.DeclareKeyword&&it.isClassLike(t.parent)&&!it.isPropertyDeclaration(t)&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on class elements of this kind.`),n.kind===C.DeclareKeyword&&it.isVariableStatement(t)){let a=(0,le.getDeclarationKind)(t.declarationList);(a==="using"||a==="await using")&&Ce(this,we,"m",rt).call(this,n,`'declare' modifier cannot appear on a '${a}' declaration.`)}if(n.kind===C.AbstractKeyword&&t.kind!==C.ClassDeclaration&&t.kind!==C.ConstructorType&&t.kind!==C.MethodDeclaration&&t.kind!==C.PropertyDeclaration&&t.kind!==C.GetAccessor&&t.kind!==C.SetAccessor&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier can only appear on a class, method, or property declaration.`),(n.kind===C.StaticKeyword||n.kind===C.PublicKeyword||n.kind===C.ProtectedKeyword||n.kind===C.PrivateKeyword)&&(t.parent.kind===C.ModuleBlock||t.parent.kind===C.SourceFile)&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on a module or namespace element.`),n.kind===C.AccessorKeyword&&t.kind!==C.PropertyDeclaration&&Ce(this,we,"m",rt).call(this,n,"'accessor' modifier can only appear on a property declaration."),n.kind===C.AsyncKeyword&&t.kind!==C.MethodDeclaration&&t.kind!==C.FunctionDeclaration&&t.kind!==C.FunctionExpression&&t.kind!==C.ArrowFunction&&Ce(this,we,"m",rt).call(this,n,"'async' modifier cannot be used here."),t.kind===C.Parameter&&(n.kind===C.StaticKeyword||n.kind===C.ExportKeyword||n.kind===C.DeclareKeyword||n.kind===C.AsyncKeyword)&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on a parameter.`),t.kind===C.Parameter&&(n.kind===C.PublicKeyword||n.kind===C.PrivateKeyword||n.kind===C.ProtectedKeyword||n.kind===C.ReadonlyKeyword||n.kind===C.OverrideKeyword)){let a=(0,le.getContainingFunction)(t);a.kind===C.Constructor&&(0,le.nodeIsPresent)(a.body)||Ce(this,we,"m",rt).call(this,n,"A parameter property is only allowed in a constructor implementation.")}}}},dn=function(t,n){this.options.allowInvalidAST||Ce(this,we,"m",rt).call(this,t,n)},Gn=function(t,n,a,_=!1){let p=_;return Object.defineProperty(t,n,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>t[a]:()=>(p||((void 0)(`The '${n}' property is deprecated on ${t.type} nodes. Use '${a}' instead. See https://typescript-eslint.io/linting/troubleshooting#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`,"DeprecationWarning"),p=!0),t[a]),set(m){Object.defineProperty(t,n,{enumerable:!0,writable:!0,value:m})}}),t},rt=function(t,n){let a,_;throw typeof t=="number"?a=_=t:(a=t.getStart(this.ast),_=t.getEnd()),(0,le.createError)(n,this.ast,a,_)},uw=function(t){it.isVariableDeclarationList(t)&&t.flags&it.NodeFlags.Using&&Ce(this,we,"m",rt).call(this,t,"The left-hand side of a 'for...in' statement cannot be a 'using' declaration.")}});function YB(e,t,n=e.getSourceFile()){let a=[];for(;;){if(u6.default.isTokenKind(e.kind))t(e);else if(e.kind!==u6.default.SyntaxKind.JSDocComment){let _=e.getChildren(n);if(_.length===1){e=_[0];continue}for(let p=_.length-1;p>=0;--p)a.push(_[p])}if(a.length===0)break;e=a.pop()}}function KB(e){switch(e.kind){case Xn.default.SyntaxKind.CloseBraceToken:return e.parent.kind!==Xn.default.SyntaxKind.JsxExpression||!l6(e.parent.parent);case Xn.default.SyntaxKind.GreaterThanToken:switch(e.parent.kind){case Xn.default.SyntaxKind.JsxOpeningElement:return e.end!==e.parent.end;case Xn.default.SyntaxKind.JsxOpeningFragment:return!1;case Xn.default.SyntaxKind.JsxSelfClosingElement:return e.end!==e.parent.end||!l6(e.parent.parent);case Xn.default.SyntaxKind.JsxClosingElement:case Xn.default.SyntaxKind.JsxClosingFragment:return!l6(e.parent.parent.parent)}}return!0}function l6(e){return e.kind===Xn.default.SyntaxKind.JsxElement||e.kind===Xn.default.SyntaxKind.JsxFragment}function mw(e,t,n=e.getSourceFile()){let a=n.text,_=n.languageVariant!==Xn.default.LanguageVariant.JSX;return YB(e,m=>{if(m.pos!==m.end&&(m.kind!==Xn.default.SyntaxKind.JsxText&&Xn.default.forEachLeadingCommentRange(a,m.pos===0?(Xn.default.getShebang(a)??"").length:m.pos,p),_||KB(m)))return Xn.default.forEachTrailingCommentRange(a,m.end,p)},n);function p(m,y,u){t(a,{pos:m,end:y,kind:u})}}function $m(e,...t){if(e===void 0)return!1;for(let n of e)if(t.includes(n.kind))return!0;return!1}function pU(e){return"identifierToKeywordKind"in bs.default?bs.default.identifierToKeywordKind(e):e.originalKeywordKind}function fU(e){return"canHaveDecorators"in bs.default?bs.default.canHaveDecorators(e):"decorators"in e}function dU(e){return"getDecorators"in bs.default?bs.default.getDecorators(e):e.decorators}function mU(e){switch(e.parent.kind){case mn.default.SyntaxKind.TypeParameter:case mn.default.SyntaxKind.InterfaceDeclaration:case mn.default.SyntaxKind.TypeAliasDeclaration:return 2;case mn.default.SyntaxKind.ClassDeclaration:case mn.default.SyntaxKind.ClassExpression:return 6;case mn.default.SyntaxKind.EnumDeclaration:return 7;case mn.default.SyntaxKind.NamespaceImport:case mn.default.SyntaxKind.ImportClause:return 15;case mn.default.SyntaxKind.ImportEqualsDeclaration:case mn.default.SyntaxKind.ImportSpecifier:return e.parent.name===e?15:void 0;case mn.default.SyntaxKind.ModuleDeclaration:return 1;case mn.default.SyntaxKind.Parameter:if(e.parent.parent.kind===mn.default.SyntaxKind.IndexSignature||pU(e)===mn.default.SyntaxKind.ThisKeyword)return;case mn.default.SyntaxKind.BindingElement:case mn.default.SyntaxKind.VariableDeclaration:return e.parent.name===e?4:void 0;case mn.default.SyntaxKind.FunctionDeclaration:case mn.default.SyntaxKind.FunctionExpression:return 4}}function pw(e){return{declaration:e,exported:!0,domain:mU(e)}}function jU(e){return e.parent.kind===An.default.SyntaxKind.ModuleDeclaration||$m(e.modifiers,An.default.SyntaxKind.ExportKeyword)}function fw(e){return e.body===void 0||e.body.kind!==An.default.SyntaxKind.ModuleBlock?!1:FU(e.body)}function FU(e){for(let t of e.statements)if(t.kind===An.default.SyntaxKind.ExportDeclaration||t.kind===An.default.SyntaxKind.ExportAssignment)return!0;return!1}function BU(e){return(e.flags&An.default.NodeFlags.BlockScoped)!==0}function Sw(e,t){for(let n of e.elements){if(n.kind!==An.default.SyntaxKind.BindingElement)continue;let a;if(n.name.kind===An.default.SyntaxKind.Identifier?a=t(n):a=Sw(n.name,t),a)return a}}var Xn,u6,ZB,eU,tU,nU,rU,hw,iU,aU,oU,sr,sU,_U,cU,lU,uU,An,mn,bs,hU,yU,gU,p6,et,po,_r,dw,sW,_W,cW,hs,bU,gs,vU,TU,SU,xU,na,ys,Ma,V_,wU,yw,H_,pu,EU,CU,AU,Xm,kU,DU,wr,PU,IU,NU,OU,MU,LU,gw,bw,vw,Tw,JU,RU,xw=E6(()=>{Xn=Ot(lt(),1),u6=Ot(lt(),1),ZB=Ot(lt(),1),eU=Ot(lt(),1),tU=Ot(lt(),1),nU=Ot(lt(),1),rU=Ot(lt(),1),hw=Ot(lt(),1),iU=Ot(lt(),1),aU=Ot(lt(),1),oU=Ot(lt(),1),sr=Ot(lt(),1),sU=Ot(lt(),1),_U=Ot(lt(),1),cU=Ot(lt(),1),lU=Ot(lt(),1),uU=Ot(lt(),1),An=Ot(lt(),1),mn=Ot(lt(),1),bs=Ot(lt(),1),hU=Ot(lt(),1),yU=Ot(lt(),1),gU=Ot(lt(),1),p6=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},et=(e,t,n)=>(p6(e,t,"read from private field"),n?n.call(e):t.get(e)),po=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},_r=(e,t,n,a)=>(p6(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),dw=(e,t,n)=>(p6(e,t,"access private method"),n);[sW,_W]=hw.default.versionMajorMinor.split(".").map(e=>Number.parseInt(e,10)),cW=sr.default.TypeFlags.Intrinsic??sr.default.TypeFlags.Any|sr.default.TypeFlags.Unknown|sr.default.TypeFlags.String|sr.default.TypeFlags.Number|sr.default.TypeFlags.BigInt|sr.default.TypeFlags.Boolean|sr.default.TypeFlags.BooleanLiteral|sr.default.TypeFlags.ESSymbol|sr.default.TypeFlags.Void|sr.default.TypeFlags.Undefined|sr.default.TypeFlags.Null|sr.default.TypeFlags.Never|sr.default.TypeFlags.NonPrimitive;bU=class{constructor(e){this.global=e,this.variables=new Map,this.uses=[],this.namespaceScopes=void 0,po(this,hs,void 0)}addVariable(e,t,n,a,_){let p=this.getDestinationScope(n).getVariables(),m={domain:_,exported:a,declaration:t},y=p.get(e);y===void 0?p.set(e,{domain:_,declarations:[m],uses:[]}):(y.domain|=_,y.declarations.push(m))}addUse(e){this.uses.push(e)}getVariables(){return this.variables}getFunctionScope(){return this}end(e){this.namespaceScopes!==void 0&&this.namespaceScopes.forEach(t=>t.finish(e)),this.namespaceScopes=_r(this,hs,void 0),this.applyUses(),this.variables.forEach(t=>{for(let n of t.declarations){let a={declarations:[],domain:n.domain,exported:n.exported,inGlobalScope:this.global,uses:[]};for(let _ of t.declarations)_.domain&n.domain&&a.declarations.push(_.declaration);for(let _ of t.uses)_.domain&n.domain&&a.uses.push(_);e(a,n.declaration,this)}})}markExported(e){}createOrReuseNamespaceScope(e,t,n,a){let _;return this.namespaceScopes===void 0?this.namespaceScopes=new Map:_=this.namespaceScopes.get(e),_===void 0?(_=new wU(n,a,this),this.namespaceScopes.set(e,_)):_.refresh(n,a),_}createOrReuseEnumScope(e,t){let n;return et(this,hs)===void 0?_r(this,hs,new Map):n=et(this,hs).get(e),n===void 0&&(n=new vU(this),et(this,hs).set(e,n)),n}applyUses(){for(let e of this.uses)this.applyUse(e)||this.addUseToParent(e);this.uses=[]}applyUse(e,t=this.variables){let n=t.get(e.location.text);return n===void 0||!(n.domain&e.domain)?!1:(n.uses.push(e),!0)}addUseToParent(e){}};hs=new WeakMap;gs=class extends bU{constructor(e,t){super(!1),this.parent=e,this.boundary=t}getDestinationScope(e){return this.boundary&e?this:this.parent.getDestinationScope(e)}addUseToParent(e){return this.parent.addUse(e,this)}},vU=class extends gs{constructor(e){super(e,1)}end(){this.applyUses()}};TU=new WeakMap;SU=new WeakMap;xU=new WeakMap;wU=class extends gs{constructor(e,t,n){super(n,1),po(this,na,new gs(this,1)),po(this,ys,void 0),po(this,Ma,void 0),po(this,V_,void 0),_r(this,Ma,e),_r(this,V_,t)}finish(e){return super.end(e)}end(e){et(this,na).end((t,n,a)=>{if(a!==et(this,na)||!t.exported&&(!et(this,Ma)||et(this,ys)!==void 0&&!et(this,ys).has(n.text)))return e(t,n,a);let _=this.variables.get(n.text);if(_===void 0)this.variables.set(n.text,{declarations:t.declarations.map(pw),domain:t.domain,uses:[...t.uses]});else{e:for(let p of t.declarations){for(let m of _.declarations)if(m.declaration===p)continue e;_.declarations.push(pw(p))}_.domain|=t.domain;for(let p of t.uses)_.uses.includes(p)||_.uses.push(p)}}),this.applyUses(),_r(this,na,new gs(this,1))}createOrReuseNamespaceScope(e,t,n,a){return!t&&(!et(this,Ma)||et(this,V_))?et(this,na).createOrReuseNamespaceScope(e,t,n||et(this,Ma),a):super.createOrReuseNamespaceScope(e,t,n||et(this,Ma),a)}createOrReuseEnumScope(e,t){return!t&&(!et(this,Ma)||et(this,V_))?et(this,na).createOrReuseEnumScope(e,t):super.createOrReuseEnumScope(e,t)}addUse(e,t){if(t!==et(this,na))return et(this,na).addUse(e);this.uses.push(e)}refresh(e,t){_r(this,Ma,e),_r(this,V_,t)}markExported(e){et(this,ys)===void 0&&_r(this,ys,new Set),et(this,ys).add(e.text)}getDestinationScope(){return et(this,na)}};na=new WeakMap;ys=new WeakMap;Ma=new WeakMap;V_=new WeakMap;yw=class extends gs{constructor(e){super(e,1)}beginBody(){this.applyUses()}},EU=class extends gs{constructor(e,t,n){super(n,1),po(this,H_,void 0),po(this,pu,void 0),_r(this,H_,e),_r(this,pu,t)}end(e){return this.innerScope.end(e),e({declarations:[et(this,H_)],domain:et(this,pu),exported:!1,uses:this.uses,inGlobalScope:!1},et(this,H_),this)}addUse(e,t){if(t!==this.innerScope)return this.innerScope.addUse(e);if(e.domain&et(this,pu)&&e.location.text===et(this,H_).text)this.uses.push(e);else return this.parent.addUse(e,this)}getFunctionScope(){return this.innerScope}getDestinationScope(){return this.innerScope}};H_=new WeakMap;pu=new WeakMap;CU=class extends EU{constructor(e,t){super(e,4,t),this.innerScope=new yw(this)}beginBody(){return this.innerScope.beginBody()}};AU=new WeakMap;kU=class extends gs{constructor(e){super(e,8),po(this,Xm,0)}updateState(e){_r(this,Xm,e)}addUse(e){return et(this,Xm)===2?void this.uses.push(e):this.parent.addUse(e,this)}};Xm=new WeakMap;DU=new WeakMap;wr=new WeakMap;PU=new WeakSet;IU=function(e,t,n){let a=et(this,wr),_=_r(this,wr,new kU(a));t(e.checkType),_.updateState(1),t(e.extendsType),_.updateState(2),t(e.trueType),_.updateState(3),t(e.falseType),_.end(n),_r(this,wr,a)};NU=new WeakSet;OU=function(e,t,n){var p;fU(e)&&((p=dU(e))==null||p.forEach(t));let a=et(this,wr);e.kind===An.default.SyntaxKind.FunctionDeclaration&&dw(this,gw,bw).call(this,e,!1,4);let _=_r(this,wr,e.kind===An.default.SyntaxKind.FunctionExpression&&e.name!==void 0?new CU(e.name,a):new yw(a));e.name!==void 0&&t(e.name),e.typeParameters!==void 0&&e.typeParameters.forEach(t),e.parameters.forEach(t),e.type!==void 0&&t(e.type),e.body!==void 0&&(_.beginBody(),t(e.body)),_.end(n),_r(this,wr,a)};MU=new WeakSet;LU=function(e,t){if(e.flags&An.default.NodeFlags.GlobalAugmentation)return t(e,et(this,wr).createOrReuseNamespaceScope("-global",!1,!0,!1));if(e.name.kind===An.default.SyntaxKind.Identifier){let n=jU(e);et(this,wr).addVariable(e.name.text,e.name,1,n,5);let a=$m(e.modifiers,An.default.SyntaxKind.DeclareKeyword);return t(e,et(this,wr).createOrReuseNamespaceScope(e.name.text,n,a,a&&fw(e)))}return t(e,et(this,wr).createOrReuseNamespaceScope(`"${e.name.text}"`,!1,!0,fw(e)))};gw=new WeakSet;bw=function(e,t,n){e.name!==void 0&&et(this,wr).addVariable(e.name.text,e.name,t?3:1,$m(e.modifiers,An.default.SyntaxKind.ExportKeyword),n)};vw=new WeakSet;Tw=function(e,t,n){if(e.kind===An.default.SyntaxKind.Identifier)return et(this,wr).addVariable(e.text,e,t?3:1,n,4);Sw(e,a=>{et(this,wr).addVariable(a.name.text,a.name,t?3:1,n,4)})};JU=new WeakSet;RU=function(e){let t=BU(e),n=e.parent.kind===An.default.SyntaxKind.VariableStatement&&$m(e.parent.modifiers,An.default.SyntaxKind.ExportKeyword);for(let a of e.declarations)dw(this,vw,Tw).call(this,a.name,t,n)}});var Cw=mt(ra=>{"use strict";xw();var qU=ra&&ra.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),zU=ra&&ra.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),WU=ra&&ra.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&qU(t,e,n);return zU(t,e),t};Object.defineProperty(ra,"__esModule",{value:!0});ra.convertComments=void 0;var ww=WU(lt()),VU=Gm(),Ew=Wm();function HU(e,t){let n=[];return mw(e,(a,_)=>{let p=_.kind===ww.SyntaxKind.SingleLineCommentTrivia?Ew.AST_TOKEN_TYPES.Line:Ew.AST_TOKEN_TYPES.Block,m=[_.pos,_.end],y=(0,VU.getLocFor)(m,e),u=m[0]+2,x=_.kind===ww.SyntaxKind.SingleLineCommentTrivia?m[1]-u:m[1]-u-2;n.push({type:p,value:t.slice(u,u+x),range:m,loc:y})},e),n}ra.convertComments=HU});var kw=mt(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});Qm.astConverter=void 0;var Aw=c6(),GU=Cw(),XU=Gm(),$U={};function QU(e,t,n){let{parseDiagnostics:a}=e;if(a.length)throw(0,Aw.convertError)(a[0]);let _=new Aw.Converter(e,{allowInvalidAST:t.allowInvalidAST,errorOnUnknownASTType:t.errorOnUnknownASTType,shouldPreserveNodeMaps:n,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings}),p=_.convertProgram();(!t.range||!t.loc)&&(0,$U.simpleTraverse)(p,{enter:y=>{t.range||delete y.range,t.loc||delete y.loc}}),t.tokens&&(p.tokens=(0,XU.convertTokens)(e)),t.comment&&(p.comments=(0,GU.convertComments)(e,t.codeFullText));let m=_.getASTMaps();return{estree:p,astMaps:m}}Qm.astConverter=QU});var f6=mt(ui=>{"use strict";var YU=ui&&ui.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),KU=ui&&ui.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ZU=ui&&ui.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&YU(t,e,n);return KU(t,e),t};Object.defineProperty(ui,"__esModule",{value:!0});ui.getCodeText=ui.isSourceFile=void 0;var eq=ZU(lt());function Dw(e){if(typeof e!="object"||e==null)return!1;let t=e;return t.kind===eq.SyntaxKind.SourceFile&&typeof t.getFullText=="function"}ui.isSourceFile=Dw;function tq(e){return Dw(e)?e.getFullText(e):e}ui.getCodeText=tq});var Pw=mt(Er=>{"use strict";var nq=Er&&Er.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),rq=Er&&Er.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),iq=Er&&Er.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&nq(t,e,n);return rq(t,e),t},aq=Er&&Er.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Er,"__esModule",{value:!0});Er.getLanguageVariant=Er.getScriptKind=void 0;var oq=aq({extname:e=>"."+e.split(".").pop()}),Yt=iq(lt());function sq(e,t){switch(oq.default.extname(e).toLowerCase()){case Yt.Extension.Js:case Yt.Extension.Cjs:case Yt.Extension.Mjs:return Yt.ScriptKind.JS;case Yt.Extension.Jsx:return Yt.ScriptKind.JSX;case Yt.Extension.Ts:case Yt.Extension.Cts:case Yt.Extension.Mts:return Yt.ScriptKind.TS;case Yt.Extension.Tsx:return Yt.ScriptKind.TSX;case Yt.Extension.Json:return Yt.ScriptKind.JSON;default:return t?Yt.ScriptKind.TSX:Yt.ScriptKind.TS}}Er.getScriptKind=sq;function _q(e){switch(e){case Yt.ScriptKind.TSX:case Yt.ScriptKind.JSX:case Yt.ScriptKind.JS:case Yt.ScriptKind.JSON:return Yt.LanguageVariant.JSX;default:return Yt.LanguageVariant.Standard}}Er.getLanguageVariant=_q});var Ow=mt(Cr=>{"use strict";var cq=Cr&&Cr.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),lq=Cr&&Cr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),uq=Cr&&Cr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&cq(t,e,n);return lq(t,e),t},pq=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.createNoProgram=Cr.createSourceFile=void 0;var fq=pq((Af(),Ef(Cf))),Iw=uq(lt()),dq=f6(),mq=Pw(),hq=(0,fq.default)("typescript-eslint:typescript-estree:createSourceFile");function Nw(e){return hq("Getting AST without type information in %s mode for: %s",e.jsx?"TSX":"TS",e.filePath),(0,dq.isSourceFile)(e.code)?e.code:Iw.createSourceFile(e.filePath,e.codeFullText,{languageVersion:Iw.ScriptTarget.Latest,jsDocParsingMode:e.jsDocParsingMode},!0,(0,mq.getScriptKind)(e.filePath,e.jsx))}Cr.createSourceFile=Nw;function yq(e){return{ast:Nw(e),program:null}}Cr.createNoProgram=yq});var Mw=mt(()=>{});var Lw=mt(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});Ym.createParserServices=void 0;function gq(e,t){if(!t)return{program:t,...e};let n=t.getTypeChecker();return{program:t,...e,getSymbolAtLocation:a=>n.getSymbolAtLocation(e.esTreeNodeToTSNodeMap.get(a)),getTypeAtLocation:a=>n.getTypeAtLocation(e.esTreeNodeToTSNodeMap.get(a))}}Ym.createParserServices=gq});var Jw=mt(()=>{});var jw=mt(Rw=>{Rw.ExpiringCache=class{}});var Bw=mt(Fw=>{Fw.resolveProjectList=()=>[]});var qw=mt(Uw=>{Uw.inferSingleRun=()=>!1});var Ww=mt(zw=>{zw.warnAboutTSVersion=()=>{}});var Yw=mt($n=>{"use strict";var bq=$n&&$n.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),vq=$n&&$n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Tq=$n&&$n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&bq(t,e,n);return vq(t,e),t},Sq=$n&&$n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($n,"__esModule",{value:!0});$n.clearTSServerProjectService=$n.clearTSConfigMatchCache=$n.createParseSettings=void 0;var d6=Sq((Af(),Ef(Cf))),Km=Tq(lt()),xq=Jw(),wq={ensureAbsolutePath:e=>e},Eq=f6(),Vw=jw(),OW=Bw(),Cq=qw(),Aq=Ww(),kq=(0,d6.default)("typescript-eslint:typescript-estree:parser:parseSettings:createParseSettings"),Zm,Qw=null,Hw,Gw,Xw,$w,fu={ParseAll:(Hw=Km.JSDocParsingMode)==null?void 0:Hw.ParseAll,ParseNone:(Gw=Km.JSDocParsingMode)==null?void 0:Gw.ParseNone,ParseForTypeErrors:(Xw=Km.JSDocParsingMode)==null?void 0:Xw.ParseForTypeErrors,ParseForTypeInfo:($w=Km.JSDocParsingMode)==null?void 0:$w.ParseForTypeInfo};function Dq(e,t={}){var u;let n=Nq(e),a=(0,Cq.inferSingleRun)(t),_=typeof t.tsconfigRootDir=="string"?t.tsconfigRootDir:"/prettier-security-dirname-placeholder",p=typeof t.loggerFn=="function",m=(()=>{switch(t.jsDocParsingMode){case"all":return fu.ParseAll;case"none":return fu.ParseNone;case"type-info":return fu.ParseForTypeInfo;default:return fu.ParseAll}})(),y={allowInvalidAST:t.allowInvalidAST===!0,code:e,codeFullText:n,comment:t.comment===!0,comments:[],DEPRECATED__createDefaultProgram:t.DEPRECATED__createDefaultProgram===!0,debugLevel:t.debugLevel===!0?new Set(["typescript-eslint"]):Array.isArray(t.debugLevel)?new Set(t.debugLevel):new Set,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:t.errorOnUnknownASTType===!0,EXPERIMENTAL_projectService:t.EXPERIMENTAL_useProjectService||t.project&&t.EXPERIMENTAL_useProjectService!==!1&&!1?Qw??(Qw=(0,xq.createProjectService)(t.EXPERIMENTAL_useProjectService,m)):void 0,EXPERIMENTAL_useSourceOfProjectReferenceRedirect:t.EXPERIMENTAL_useSourceOfProjectReferenceRedirect===!0,extraFileExtensions:Array.isArray(t.extraFileExtensions)&&t.extraFileExtensions.every(x=>typeof x=="string")?t.extraFileExtensions:[],filePath:(0,wq.ensureAbsolutePath)(typeof t.filePath=="string"&&t.filePath!==""?t.filePath:Oq(t.jsx),_),jsDocParsingMode:m,jsx:t.jsx===!0,loc:t.loc===!0,log:typeof t.loggerFn=="function"?t.loggerFn:t.loggerFn===!1?()=>{}:console.log,preserveNodeMaps:t.preserveNodeMaps!==!1,programs:Array.isArray(t.programs)?t.programs:null,projects:[],range:t.range===!0,singleRun:a,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings??!0,tokens:t.tokens===!0?[]:null,tsconfigMatchCache:Zm??(Zm=new Vw.ExpiringCache(a?"Infinity":((u=t.cacheLifetime)==null?void 0:u.glob)??Vw.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS)),tsconfigRootDir:_};if(y.debugLevel.size>0){let x=[];y.debugLevel.has("typescript-eslint")&&x.push("typescript-eslint:*"),(y.debugLevel.has("eslint")||d6.default.enabled("eslint:*,-eslint:code-path"))&&x.push("eslint:*,-eslint:code-path"),d6.default.enable(x.join(","))}if(Array.isArray(t.programs)){if(!t.programs.length)throw new Error("You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.");kq("parserOptions.programs was provided, so parserOptions.project will be ignored.")}return!y.programs&&!y.EXPERIMENTAL_projectService&&(y.projects=[]),t.jsDocParsingMode==null&&y.projects.length===0&&y.programs==null&&y.EXPERIMENTAL_projectService==null&&(y.jsDocParsingMode=fu.ParseNone),(0,Aq.warnAboutTSVersion)(y,p),y}$n.createParseSettings=Dq;function Pq(){Zm==null||Zm.clear()}$n.clearTSConfigMatchCache=Pq;function Iq(){Qw=null}$n.clearTSServerProjectService=Iq;function Nq(e){return(0,Eq.isSourceFile)(e)?e.getFullText(e):typeof e=="string"?e:String(e)}function Oq(e){return e?"estree.tsx":"estree.ts"}});var t5=mt(e1=>{"use strict";Object.defineProperty(e1,"__esModule",{value:!0});e1.getFirstSemanticOrSyntacticError=void 0;var Kw=lt();function Mq(e,t){try{let n=Zw(e.getSyntacticDiagnostics(t));if(n.length>0)return e5(n[0]);let a=Zw(e.getSemanticDiagnostics(t));return a.length>0?e5(a[0]):void 0}catch(n){console.warn(`Warning From TSC: "${n.message}`);return}}e1.getFirstSemanticOrSyntacticError=Mq;function Zw(e){return e.filter(t=>{switch(t.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 e5(e){return{...e,message:(0,Kw.flattenDiagnosticMessageText)(e.messageText,Kw.sys.newLine)}}});var n5=mt(()=>{});var _5=mt(pi=>{"use strict";var Lq=pi&&pi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pi,"__esModule",{value:!0});pi.clearParseAndGenerateServicesCalls=pi.clearProgramCache=pi.parseAndGenerateServices=pi.parse=void 0;var Jq=Lq((Af(),Ef(Cf))),r5=kw(),Rq=c6(),jq={},i5={},Fq={},a5=Ow(),Bq=Mw(),o5={},Uq=Lw(),s5=Yw(),qq=t5(),zq=n5(),Wq=(0,Jq.default)("typescript-eslint:typescript-estree:parser"),m6=new Map;function Vq(){m6.clear()}pi.clearProgramCache=Vq;function Hq(e,t){if(e.EXPERIMENTAL_projectService){let a=(0,zq.useProgramFromProjectService)(e.EXPERIMENTAL_projectService,e,t);if(a)return a}if(e.programs){let a=(0,o5.useProvidedPrograms)(e.programs,e);if(a)return a}if(!t)return(0,a5.createNoProgram)(e);let n=(0,Fq.createProjectProgram)(e,(0,Bq.getWatchProgramsForProjects)(e));if(n)return n;if(e.DEPRECATED__createDefaultProgram){let a=(0,jq.createDefaultProgram)(e);if(a)return a}return(0,i5.createIsolatedProgram)(e)}function Gq(e,t){let{ast:n}=Xq(e,t,!1);return n}pi.parse=Gq;function Xq(e,t,n){let a=(0,s5.createParseSettings)(e,t);if(t!=null&&t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');let _=(0,a5.createSourceFile)(a),{estree:p,astMaps:m}=(0,r5.astConverter)(_,a,n);return{ast:p,esTreeNodeToTSNodeMap:m.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:m.tsNodeToESTreeNodeMap}}var t1={};function $q(){t1={}}pi.clearParseAndGenerateServicesCalls=$q;function Qq(e,t){let n=(0,s5.createParseSettings)(e,t);n.singleRun&&!n.programs&&n.projects.length>0&&(n.programs={*[Symbol.iterator](){for(let x of n.projects){let d=m6.get(x);if(d)yield d;else{Wq("Detected single-run/CLI usage, creating Program once ahead of time for project: %s",x);let S=(0,o5.createProgramFromConfigFile)(x);m6.set(x,S),yield S}}}});let a=n.programs!=null||n.projects.length>0;if(typeof t.errorOnTypeScriptSyntacticAndSemanticIssues=="boolean"&&t.errorOnTypeScriptSyntacticAndSemanticIssues&&(n.errorOnTypeScriptSyntacticAndSemanticIssues=!0),n.errorOnTypeScriptSyntacticAndSemanticIssues&&!a)throw new Error("Cannot calculate TypeScript semantic issues without a valid project.");n.singleRun&&t.filePath&&(t1[t.filePath]=(t1[t.filePath]||0)+1);let{ast:_,program:p}=n.singleRun&&t.filePath&&t1[t.filePath]>1?(0,i5.createIsolatedProgram)(n):Hq(n,a),m=typeof n.preserveNodeMaps=="boolean"?n.preserveNodeMaps:!0,{estree:y,astMaps:u}=(0,r5.astConverter)(_,n,m);if(p&&n.errorOnTypeScriptSyntacticAndSemanticIssues){let x=(0,qq.getFirstSemanticOrSyntacticError)(p,_);if(x)throw(0,Rq.convertError)(x)}return{ast:y,services:(0,Uq.createParserServices)(u,p)}}pi.parseAndGenerateServices=Qq});var E5=mt(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.extract=dz;vs.parse=hz;vs.parseWithComments=w5;vs.print=yz;vs.strip=mz;var cz=/\*\/$/,lz=/^\/\*\*?/,S5=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,uz=/(^|\s+)\/\/([^\r\n]*)/g,b5=/^(\r?\n)+/,pz=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,v5=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,fz=/(\r?\n|^) *\* ?/g,x5=[];function dz(e){let t=e.match(S5);return t?t[0].trimLeft():""}function mz(e){let t=e.match(S5);return t&&t[0]?e.substring(t[0].length):e}function hz(e){return w5(e).pragmas}function w5(e){let t=` +`;e=e.replace(lz,"").replace(cz,"").replace(fz,"$1");let n="";for(;n!==e;)n=e,e=e.replace(pz,`${t}$1 $2${t}`);e=e.replace(b5,"").trimRight();let a=Object.create(null),_=e.replace(v5,"").replace(b5,"").trimRight(),p;for(;p=v5.exec(e);){let m=p[2].replace(uz,"");typeof a[p[1]]=="string"||Array.isArray(a[p[1]])?a[p[1]]=x5.concat(a[p[1]],m):a[p[1]]=m}return{comments:_,pragmas:a}}function yz({comments:e="",pragmas:t={}}){let n=` +`,a="/**",_=" *",p=" */",m=Object.keys(t),y=m.flatMap(x=>T5(x,t[x])).map(x=>`${_} ${x}${n}`).join("");if(!e){if(m.length===0)return"";if(m.length===1&&!Array.isArray(t[m[0]])){let x=t[m[0]];return`${a} ${T5(m[0],x)[0]}${p}`}}let u=e.split(n).map(x=>`${_} ${x}`).join(n)+n;return a+n+(e?u:"")+(e&&m.length?_+n:"")+y+p}function T5(e,t){return x5.concat(t).map(n=>`@${e} ${n}`.trim())}});var kz={};$h(kz,{parsers:()=>S6});var S6={};$h(S6,{typescript:()=>Az});var P5=Ot(_5(),1);function Yq(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var c5=Yq;function Kq(e){let t=[];for(let n of e)try{return n()}catch(a){t.push(a)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var l5=Kq;var Zq=(e,t,n)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[n<0?t.length+n:n]:t.at(n)},h6=Zq;function ez(e){return Array.isArray(e)&&e.length>0}var u5=ez;function Hr(e){var a,_,p;let t=((a=e.range)==null?void 0:a[0])??e.start,n=(p=((_=e.declaration)==null?void 0:_.decorators)??e.decorators)==null?void 0:p[0];return n?Math.min(Hr(n),t):t}function ia(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function tz(e){let t=new Set(e);return n=>t.has(n==null?void 0:n.type)}var p5=tz;var nz=p5(["Block","CommentBlock","MultiLine"]),du=nz;function rz(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(n=>n.trimStart()[0]==="*")}var y6=rz;function iz(e){return du(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var f5=iz;var mu=null;function hu(e){if(mu!==null&&typeof mu.property){let t=mu;return mu=hu.prototype=null,t}return mu=hu.prototype=e??Object.create(null),new hu}var az=10;for(let e=0;e<=az;e++)hu();function g6(e){return hu(e)}function oz(e,t="type"){g6(e);function n(a){let _=a[t],p=e[_];if(!Array.isArray(p))throw Object.assign(new Error(`Missing visitor keys for '${_}'.`),{node:a});return p}return n}var d5=oz;var m5={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var sz=d5(m5),h5=sz;function b6(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let a=0;a{var m;(m=p.leadingComments)!=null&&m.some(f5)&&_.add(Hr(p))}),e=n1(e,p=>{if(p.type==="ParenthesizedExpression"){let{expression:m}=p;if(m.type==="TypeCastExpression")return m.range=[...p.range],m;let y=Hr(p);if(!_.has(y))return m.extra={...m.extra,parenthesized:!0},m}})}if(e=n1(e,_=>{var p;switch(_.type){case"LogicalExpression":if(y5(_))return v6(_);break;case"VariableDeclaration":{let m=h6(!1,_.declarations,-1);m!=null&&m.init&&a[ia(m)]!==";"&&(_.range=[Hr(_),ia(m)]);break}case"TSParenthesizedType":return _.typeAnnotation;case"TSTypeParameter":if(typeof _.name=="string"){let m=Hr(_);_.name={type:"Identifier",name:_.name,range:[m,m+_.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(n==="meriyah"&&((p=_.exported)==null?void 0:p.type)==="Identifier"){let{exported:m}=_,y=a.slice(Hr(m),ia(m));(y.startsWith('"')||y.startsWith("'"))&&(_.exported={..._.exported,type:"Literal",value:_.exported.name,raw:y})}break;case"TSUnionType":case"TSIntersectionType":if(_.types.length===1)return _.types[0];break}}),u5(e.comments)){let _=h6(!1,e.comments,-1);for(let p=e.comments.length-2;p>=0;p--){let m=e.comments[p];ia(m)===Hr(_)&&du(m)&&du(_)&&y6(m)&&y6(_)&&(e.comments.splice(p+1,1),m.value+="*//*"+_.value,m.range=[Hr(m),ia(_)]),_=m}}return e.type==="Program"&&(e.range=[0,a.length]),e}function y5(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function v6(e){return y5(e)?v6({type:"LogicalExpression",operator:e.operator,left:v6({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[Hr(e.left),ia(e.right.left)]}),right:e.right.right,range:[Hr(e),ia(e)]}):e}var g5=_z;var G_=Ot(E5(),1);function gz(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var C5=gz;function bz(e){let t=C5(e);t&&(e=e.slice(t.length+1));let n=(0,G_.extract)(e),{pragmas:a,comments:_}=(0,G_.parseWithComments)(n);return{shebang:t,text:e,pragmas:a,comments:_}}function A5(e){let{pragmas:t}=bz(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function vz(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:A5,locStart:Hr,locEnd:ia,...e}}var k5=vz;function Tz(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var D5=Tz;var T6={loc:!0,range:!0,comment:!0,tokens:!0,loggerFn:!1,project:[],jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0};function Sz(e){let{message:t,location:n}=e;if(!n)return e;let{start:a,end:_}=n;return c5(t,{loc:{start:{line:a.line,column:a.column+1},end:{line:_.line,column:_.column+1}},cause:e})}var xz=e=>/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/i.test(e);function wz(e,t){let n=t==null?void 0:t.filepath;if(n&&xz(n))return[{...T6,filePath:n}];let a=Cz(e);return[{...T6,jsx:a},{...T6,jsx:!a}]}function Ez(e,t){let n=D5(e),a=wz(e,t),_;try{_=l5(a.map(p=>()=>(0,P5.parse)(n,p)))}catch({errors:[p]}){throw Sz(p)}return g5(_,{text:e})}function Cz(e){return new RegExp(["(?:^[^\"'`]*)"].join(""),"m").test(e)}var Az=k5(Ez);return Ef(kz);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/typescript.mjs b/node_modules/prettier/plugins/typescript.mjs index 116bdef..5bb9f59 100644 --- a/node_modules/prettier/plugins/typescript.mjs +++ b/node_modules/prettier/plugins/typescript.mjs @@ -1,25 +1,25 @@ -var S5=Object.create;var xf=Object.defineProperty;var x5=Object.getOwnPropertyDescriptor;var w5=Object.getOwnPropertyNames;var C5=Object.getPrototypeOf,E5=Object.prototype.hasOwnProperty;var A5=(e,t)=>()=>(e&&(t=e(e=0)),t);var ut=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vh=(e,t)=>{for(var r in t)xf(e,r,{get:t[r],enumerable:!0})},Ob=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let _ of w5(t))!E5.call(e,_)&&_!==r&&xf(e,_,{get:()=>t[_],enumerable:!(a=x5(t,_))||a.enumerable});return e};var Mb=(e,t,r)=>(r=e!=null?S5(C5(e)):{},Ob(t||!e||!e.__esModule?xf(r,"default",{value:e,enumerable:!0}):r,e)),Hh=e=>Ob(xf({},"__esModule",{value:!0}),e);var wf={};Vh(wf,{default:()=>D5});var k5,D5,Cf=A5(()=>{k5=()=>()=>{},D5=k5});var Dt=ut((QV,A7)=>{var P5=Object.defineProperty,yv=Object.getOwnPropertyNames,Vt=(e,t)=>function(){return e&&(t=(0,e[yv(e)[0]])(e=0)),t},I5=(e,t)=>function(){return t||(0,e[yv(e)[0]])((t={exports:{}}).exports,t),t.exports},N5=(e,t)=>{for(var r in t)P5(e,r,{get:t[r],enumerable:!0})},gv,Hf,Zh,O5=Vt({"src/compiler/corePublic.ts"(){"use strict";gv="5.2",Hf="5.2.2",Zh=(e=>(e[e.LessThan=-1]="LessThan",e[e.EqualTo=0]="EqualTo",e[e.GreaterThan=1]="GreaterThan",e))(Zh||{})}});function Ka(e){return e?e.length:0}function yr(e,t){if(e)for(let r=0;r=0;r--){let a=t(e[r],r);if(a)return a}}function ng(e,t){if(e!==void 0)for(let r=0;r=0;a--){let _=e[a];if(t(_,a))return _}}function _l(e,t,r){if(e===void 0)return-1;for(let a=r??0;a=0;a--)if(t(e[a],a))return a;return-1}function F5(e,t){for(let r=0;rr(a,t[_]))}function vv(e,t,r){for(let a=r||0;a{let p=t(_,a);if(p!==void 0){let[d,h]=p;d!==void 0&&h!==void 0&&r.set(d,h)}}),r}function $5(e,t,r){if(e.has(t))return e.get(t);let a=r();return e.set(t,a),a}function Q5(e,t){return e.has(t)?!1:(e.add(t),!0)}function*Y5(e){yield e}function K5(e,t,r){let a;if(e){a=[];let _=e.length,p,d,h=0,l=0;for(;h<_;){for(;l<_;){let v=e[l];if(d=t(v,l),l===0)p=d;else if(d!==p)break;l++}if(h{let[p,d]=t(_,a);r.set(p,d)}),r}function mt(e,t){if(e)if(t){for(let r of e)if(t(r))return!0}else return e.length>0;return!1}function eC(e,t,r){let a;for(let _=0;_e[d])}function nC(e,t){let r=[];for(let a of e)Ol(r,a,t);return r}function xv(e,t,r){return e.length===0?[]:e.length===1?e.slice():r?rC(e,t,r):nC(e,t)}function iC(e,t){if(e.length===0)return $e;let r=e[0],a=[r];for(let _=1;_0&&(_&=-2),_&2&&a(p,l)>0&&(_&=-3),p=l}return _}function _C(e,t,r=_o){if(!e||!t)return e===t;if(e.length!==t.length)return!1;for(let a=0;a0&&N.assertGreaterThanOrEqual(r(t[p],t[p-1]),0);t:for(let d=_;_d&&N.assertGreaterThanOrEqual(r(e[_],e[_-1]),0),r(t[p],e[_])){case-1:a.push(t[p]);continue e;case 0:continue e;case 1:continue t}}return a}function xt(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function uC(e,t){return e===void 0?t:t===void 0?e:zt(e)?zt(t)?y_(e,t):xt(e,t):zt(t)?xt(t,e):[e,t]}function ty(e,t){return t<0?e.length+t:t}function Rr(e,t,r,a){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(r,a);r=r===void 0?0:ty(t,r),a=a===void 0?t.length:ty(t,a);for(let _=r;_r(e[a],e[_])||kr(a,_))}function Gf(e,t){return e.length===0?e:e.slice().sort(t)}function*pC(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function Av(e,t){let r=ag(e);return Ev(e,r,t),r.map(a=>e[a])}function fC(e,t,r,a){for(;r>1),l=r(e[h],h);switch(a(l,t)){case-1:p=h+1;break;case 0:return h;case 1:d=h-1;break}}return~p}function Jd(e,t,r,a,_){if(e&&e.length>0){let p=e.length;if(p>0){let d=a===void 0||a<0?0:a,h=_===void 0||d+_>p-1?p-1:d+_,l;for(arguments.length<=2?(l=e[d],d++):l=r;d<=h;)l=t(l,e[d],d),d++;return l}}return r}function Qr(e,t){return Jn.call(e,t)}function bC(e,t){return Jn.call(e,t)?e[t]:void 0}function sg(e){let t=[];for(let r in e)Jn.call(e,r)&&t.push(r);return t}function vC(e){let t=[];do{let r=Object.getOwnPropertyNames(e);for(let a of r)Ol(t,a)}while(e=Object.getPrototypeOf(e));return t}function TC(e){let t=[];for(let r in e)Jn.call(e,r)&&t.push(e[r]);return t}function SC(e,t){let r=new Array(e);for(let a=0;a100&&r>t.length>>1){let h=t.length-r;t.copyWithin(0,r),t.length=h,r=0}return d}return{enqueue:_,dequeue:p,isEmpty:a}}function MC(e,t){let r=new Map,a=0;function*_(){for(let d of r.values())zt(d)?yield*d:yield d}let p={has(d){let h=e(d);if(!r.has(h))return!1;let l=r.get(h);if(!zt(l))return t(l,d);for(let v of l)if(t(v,d))return!0;return!1},add(d){let h=e(d);if(r.has(h)){let l=r.get(h);if(zt(l))es(l,d,t)||(l.push(d),a++);else{let v=l;t(v,d)||(r.set(h,[v,d]),a++)}}else r.set(h,d),a++;return this},delete(d){let h=e(d);if(!r.has(h))return!1;let l=r.get(h);if(zt(l)){for(let v=0;v_(),[Symbol.toStringTag]:r[Symbol.toStringTag]};return p}function zt(e){return Array.isArray(e)}function Pf(e){return zt(e)?e:[e]}function b_(e){return typeof e=="string"}function LC(e){return typeof e=="number"}function On(e,t){return e!==void 0&&t(e)?e:void 0}function gi(e,t){return e!==void 0&&t(e)?e:N.fail(`Invalid cast. The supplied value ${e} did not pass the test '${N.getFunctionName(t)}'.`)}function Rn(e){}function Xf(){return!1}function Iv(){return!0}function JC(){}function bt(e){return e}function Nv(e){return e.toLowerCase()}function Ov(e){return iy.test(e)?e.replace(iy,Nv):e}function RC(){throw new Error("Not implemented")}function ry(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Nn(e){let t=new Map;return r=>{let a=`${typeof r}:${r}`,_=t.get(a);return _===void 0&&!t.has(a)&&(_=e(r),t.set(a,_)),_}}function jC(e){let t=new WeakMap;return r=>{let a=t.get(r);return a===void 0&&!t.has(r)&&(a=e(r),t.set(r,a)),a}}function FC(e,t){return(...r)=>{let a=t.get(r);return a===void 0&&!t.has(r)&&(a=e(...r),t.set(r,a)),a}}function BC(e,t,r,a,_){if(_){let p=[];for(let d=0;dJd(p,(h,l)=>l(h),d)}else return a?p=>a(r(t(e(p)))):r?p=>r(t(e(p))):t?p=>t(e(p)):e?p=>e(p):p=>p}function _o(e,t){return e===t}function s_(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Ll(e,t){return _o(e,t)}function Mv(e,t){return e===t?0:e===void 0?-1:t===void 0?1:et(r,a)===-1?r:a)}function Fd(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toUpperCase(),t=t.toUpperCase(),et?1:0)}function zC(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toLowerCase(),t=t.toLowerCase(),et?1:0)}function Ci(e,t){return Mv(e,t)}function _g(e){return e?Fd:Ci}function WC(){return Qf}function Lv(e){Qf!==e&&(Qf=e,oy=void 0)}function VC(e,t){return(oy||(oy=Vv(Qf)))(e,t)}function HC(e,t,r,a){return e===t?0:e===void 0?-1:t===void 0?1:a(e[r],t[r])}function GC(e,t){return kr(e?1:0,t?1:0)}function Jv(e,t,r){let a=Math.max(2,Math.floor(e.length*.34)),_=Math.floor(e.length*.4)+1,p;for(let d of t){let h=r(d);if(h!==void 0&&Math.abs(h.length-e.length)<=a){if(h===e||h.length<3&&h.toLowerCase()!==e.toLowerCase())continue;let l=XC(e,h,_-.1);if(l===void 0)continue;N.assert(l<_),_=l,p=d}}return p}function XC(e,t,r){let a=new Array(t.length+1),_=new Array(t.length+1),p=r+.01;for(let h=0;h<=t.length;h++)a[h]=h;for(let h=1;h<=e.length;h++){let l=e.charCodeAt(h-1),v=Math.ceil(h>r?h-r:1),y=Math.floor(t.length>r+h?r+h:t.length);_[0]=h;let C=h;for(let k=1;kr)return;let S=a;a=_,_=S}let d=a[t.length];return d>r?void 0:d}function ts(e,t){let r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function $C(e,t){return ts(e,t)?e.slice(0,e.length-t.length):e}function QC(e,t){return ts(e,t)?e.slice(0,e.length-t.length):void 0}function eo(e,t){return e.indexOf(t)!==-1}function YC(e){let t=e.length;for(let r=t-1;r>0;r--){let a=e.charCodeAt(r);if(a>=48&&a<=57)do--r,a=e.charCodeAt(r);while(r>0&&a>=48&&a<=57);else if(r>4&&(a===110||a===78)){if(--r,a=e.charCodeAt(r),a!==105&&a!==73||(--r,a=e.charCodeAt(r),a!==109&&a!==77))break;--r,a=e.charCodeAt(r)}else break;if(a!==45&&a!==46)break;t=r}return t===e.length?e:e.slice(0,t)}function KC(e,t){for(let r=0;rr===t)}function ZC(e,t){for(let r=0;r_&&(_=d.prefix.length,a=p)}return a}function Fr(e,t){return e.lastIndexOf(t,0)===0}function rE(e,t){return Fr(e,t)?e.substr(t.length):e}function Bv(e,t,r=bt){return Fr(r(e),r(t))?e.substring(t.length):void 0}function lg({prefix:e,suffix:t},r){return r.length>=e.length+t.length&&Fr(r,e)&&ts(r,t)}function nE(e,t){return r=>e(r)&&t(r)}function ug(...e){return(...t)=>{let r;for(let a of e)if(r=a(...t),r)return r;return r}}function iE(e){return(...t)=>!e(...t)}function aE(e){}function $f(e){return e===void 0?void 0:[e]}function oE(e,t,r,a,_,p){p=p||Rn;let d=0,h=0,l=e.length,v=t.length,y=!1;for(;d=0&&Vi(e.charCodeAt(t));)t--;return e.slice(0,t+1)}function pE(){return!1}var $e,pg,zv,ny,Wv,Jn,iy,ay,Vv,oy,Qf,Ud,n_,gl,fE=Vt({"src/compiler/core.ts"(){"use strict";Dr(),$e=[],pg=new Map,zv=new Set,ny=(e=>(e[e.None=0]="None",e[e.CaseSensitive=1]="CaseSensitive",e[e.CaseInsensitive=2]="CaseInsensitive",e[e.Both=3]="Both",e))(ny||{}),Wv=Array.prototype.at?(e,t)=>e==null?void 0:e.at(t):(e,t)=>{if(e&&(t=ty(e,t),t(e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Aggressive=2]="Aggressive",e[e.VeryAggressive=3]="VeryAggressive",e))(ay||{}),Vv=(()=>{let e,t,r=h();return l;function a(v,y,C){if(v===y)return 0;if(v===void 0)return-1;if(y===void 0)return 1;let S=C(v,y);return S<0?-1:S>0?1:0}function _(v){let y=new Intl.Collator(v,{usage:"sort",sensitivity:"variant"}).compare;return(C,S)=>a(C,S,y)}function p(v){if(v!==void 0)return d();return(C,S)=>a(C,S,y);function y(C,S){return C.localeCompare(S)}}function d(){return(C,S)=>a(C,S,v);function v(C,S){return y(C.toUpperCase(),S.toUpperCase())||y(C,S)}function y(C,S){return CS?1:0}}function h(){return typeof Intl=="object"&&typeof Intl.Collator=="function"?_:typeof String.prototype.localeCompare=="function"&&typeof String.prototype.toLocaleUpperCase=="function"&&"a".localeCompare("B")<0?p:d}function l(v){return v===void 0?e||(e=r(v)):v==="en-US"?t||(t=r(v)):r(v)}})(),Ud=String.prototype.trim?e=>e.trim():e=>n_(gl(e)),n_=String.prototype.trimEnd?e=>e.trimEnd():uE,gl=String.prototype.trimStart?e=>e.trimStart():e=>e.replace(/^\s+/g,"")}}),sy,N,Hv=Vt({"src/compiler/debug.ts"(){"use strict";Dr(),Dr(),sy=(e=>(e[e.Off=0]="Off",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Verbose=4]="Verbose",e))(sy||{}),(e=>{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function r(q){return e.currentLogLevel<=q}e.shouldLog=r;function a(q,oe){e.loggingHost&&r(q)&&e.loggingHost.log(q,oe)}function _(q){a(3,q)}e.log=_,(q=>{function oe(z){a(1,z)}q.error=oe;function ge(z){a(2,z)}q.warn=ge;function Se(z){a(3,z)}q.log=Se;function nt(z){a(4,z)}q.trace=nt})(_=e.log||(e.log={}));let p={};function d(){return t}e.getAssertionLevel=d;function h(q){let oe=t;if(t=q,q>oe)for(let ge of sg(p)){let Se=p[ge];Se!==void 0&&e[ge]!==Se.assertion&&q>=Se.level&&(e[ge]=Se,p[ge]=void 0)}}e.setAssertionLevel=h;function l(q){return t>=q}e.shouldAssert=l;function v(q,oe){return l(q)?!0:(p[oe]={level:q,assertion:e[oe]},e[oe]=Rn,!1)}function y(q,oe){debugger;let ge=new Error(q?`Debug Failure. ${q}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(ge,oe||y),ge}e.fail=y;function C(q,oe,ge){return y(`${oe||"Unexpected node."}\r -Node ${Xt(q.kind)} was unexpected.`,ge||C)}e.failBadSyntaxKind=C;function S(q,oe,ge,Se){q||(oe=oe?`False expression: ${oe}`:"False expression.",ge&&(oe+=`\r -Verbose Debug Information: `+(typeof ge=="string"?ge:ge())),y(oe,Se||S))}e.assert=S;function k(q,oe,ge,Se,nt){if(q!==oe){let z=ge?Se?`${ge} ${Se}`:ge:"";y(`Expected ${q} === ${oe}. ${z}`,nt||k)}}e.assertEqual=k;function L(q,oe,ge,Se){q>=oe&&y(`Expected ${q} < ${oe}. ${ge||""}`,Se||L)}e.assertLessThan=L;function G(q,oe,ge){q>oe&&y(`Expected ${q} <= ${oe}`,ge||G)}e.assertLessThanOrEqual=G;function K(q,oe,ge){q= ${oe}`,ge||K)}e.assertGreaterThanOrEqual=K;function ue(q,oe,ge){q==null&&y(oe,ge||ue)}e.assertIsDefined=ue;function Y(q,oe,ge){return ue(q,oe,ge||Y),q}e.checkDefined=Y;function B(q,oe,ge){for(let Se of q)ue(Se,oe,ge||B)}e.assertEachIsDefined=B;function ae(q,oe,ge){return B(q,oe,ge||ae),q}e.checkEachDefined=ae;function Ce(q,oe="Illegal value:",ge){let Se=typeof q=="object"&&Qr(q,"kind")&&Qr(q,"pos")?"SyntaxKind: "+Xt(q.kind):JSON.stringify(q);return y(`${oe} ${Se}`,ge||Ce)}e.assertNever=Ce;function Ze(q,oe,ge,Se){v(1,"assertEachNode")&&S(oe===void 0||so(q,oe),ge||"Unexpected node.",()=>`Node array did not pass test '${or(oe)}'.`,Se||Ze)}e.assertEachNode=Ze;function qe(q,oe,ge,Se){v(1,"assertNode")&&S(q!==void 0&&(oe===void 0||oe(q)),ge||"Unexpected node.",()=>`Node ${Xt(q==null?void 0:q.kind)} did not pass test '${or(oe)}'.`,Se||qe)}e.assertNode=qe;function rt(q,oe,ge,Se){v(1,"assertNotNode")&&S(q===void 0||oe===void 0||!oe(q),ge||"Unexpected node.",()=>`Node ${Xt(q.kind)} should not have passed test '${or(oe)}'.`,Se||rt)}e.assertNotNode=rt;function it(q,oe,ge,Se){v(1,"assertOptionalNode")&&S(oe===void 0||q===void 0||oe(q),ge||"Unexpected node.",()=>`Node ${Xt(q==null?void 0:q.kind)} did not pass test '${or(oe)}'.`,Se||it)}e.assertOptionalNode=it;function Ir(q,oe,ge,Se){v(1,"assertOptionalToken")&&S(oe===void 0||q===void 0||q.kind===oe,ge||"Unexpected node.",()=>`Node ${Xt(q==null?void 0:q.kind)} was not a '${Xt(oe)}' token.`,Se||Ir)}e.assertOptionalToken=Ir;function ar(q,oe,ge){v(1,"assertMissingNode")&&S(q===void 0,oe||"Unexpected node.",()=>`Node ${Xt(q.kind)} was unexpected'.`,ge||ar)}e.assertMissingNode=ar;function ci(q){}e.type=ci;function or(q){if(typeof q!="function")return"";if(Qr(q,"name"))return q.name;{let oe=Function.prototype.toString.call(q),ge=/^function\s+([\w$]+)\s*\(/.exec(oe);return ge?ge[1]:""}}e.getFunctionName=or;function Nr(q){return`{ name: ${Vo(q.escapedName)}; flags: ${Tr(q.flags)}; declarations: ${Aa(q.declarations,oe=>Xt(oe.kind))} }`}e.formatSymbol=Nr;function Ge(q=0,oe,ge){let Se=Ur(oe);if(q===0)return Se.length>0&&Se[0][0]===0?Se[0][1]:"0";if(ge){let nt=[],z=q;for(let[X,ee]of Se){if(X>q)break;X!==0&&X&q&&(nt.push(ee),z&=~X)}if(z===0)return nt.join("|")}else for(let[nt,z]of Se)if(nt===q)return z;return q.toString()}e.formatEnum=Ge;let Gt=new Map;function Ur(q){let oe=Gt.get(q);if(oe)return oe;let ge=[];for(let nt in q){let z=q[nt];typeof z=="number"&&ge.push([z,nt])}let Se=Av(ge,(nt,z)=>kr(nt[0],z[0]));return Gt.set(q,Se),Se}function Xt(q){return Ge(q,ed,!1)}e.formatSyntaxKind=Xt;function Tn(q){return Ge(q,pd,!1)}e.formatSnippetKind=Tn;function Sn(q){return Ge(q,ld,!1)}e.formatScriptKind=Sn;function sr(q){return Ge(q,td,!0)}e.formatNodeFlags=sr;function $t(q){return Ge(q,rd,!0)}e.formatModifierFlags=$t;function St(q){return Ge(q,ud,!0)}e.formatTransformFlags=St;function xn(q){return Ge(q,fd,!0)}e.formatEmitFlags=xn;function Tr(q){return Ge(q,ad,!0)}e.formatSymbolFlags=Tr;function vt(q){return Ge(q,od,!0)}e.formatTypeFlags=vt;function ct(q){return Ge(q,_d,!0)}e.formatSignatureFlags=ct;function Ut(q){return Ge(q,sd,!0)}e.formatObjectFlags=Ut;function fr(q){return Ge(q,bl,!0)}e.formatFlowFlags=fr;function ht(q){return Ge(q,nd,!0)}e.formatRelationComparisonResult=ht;function wn(q){return Ge(q,CheckMode,!0)}e.formatCheckMode=wn;function Tt(q){return Ge(q,SignatureCheckMode,!0)}e.formatSignatureCheckMode=Tt;function Or(q){return Ge(q,TypeFacts,!0)}e.formatTypeFacts=Or;let pt=!1,Mr;function at(q){"__debugFlowFlags"in q||Object.defineProperties(q,{__tsDebuggerDisplay:{value(){let oe=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",ge=this.flags&~(2048-1);return`${oe}${ge?` (${fr(ge)})`:""}`}},__debugFlowFlags:{get(){return Ge(this.flags,bl,!0)}},__debugToString:{value(){return Ae(this)}}})}function er(q){pt&&(typeof Object.setPrototypeOf=="function"?(Mr||(Mr=Object.create(Object.prototype),at(Mr)),Object.setPrototypeOf(q,Mr)):at(q))}e.attachFlowNodeDebugInfo=er;let Qt;function tn(q){"__tsDebuggerDisplay"in q||Object.defineProperties(q,{__tsDebuggerDisplay:{value(oe){return oe=String(oe).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]"),`NodeArray ${oe}`}}})}function Bn(q){pt&&(typeof Object.setPrototypeOf=="function"?(Qt||(Qt=Object.create(Array.prototype),tn(Qt)),Object.setPrototypeOf(q,Qt)):tn(q))}e.attachNodeArrayDebugInfo=Bn;function Un(){if(pt)return;let q=new WeakMap,oe=new WeakMap;Object.defineProperties(wt.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let Se=this.flags&33554432?"TransientSymbol":"Symbol",nt=this.flags&-33554433;return`${Se} '${md(this)}'${nt?` (${Tr(nt)})`:""}`}},__debugFlags:{get(){return Tr(this.flags)}}}),Object.defineProperties(wt.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let Se=this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&67359327?`IntrinsicType ${this.intrinsicName}`:this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",nt=this.flags&524288?this.objectFlags&-1344:0;return`${Se}${this.symbol?` '${md(this.symbol)}'`:""}${nt?` (${Ut(nt)})`:""}`}},__debugFlags:{get(){return vt(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?Ut(this.objectFlags):""}},__debugTypeToString:{value(){let Se=q.get(this);return Se===void 0&&(Se=this.checker.typeToString(this),q.set(this,Se)),Se}}}),Object.defineProperties(wt.getSignatureConstructor().prototype,{__debugFlags:{get(){return ct(this.flags)}},__debugSignatureToString:{value(){var Se;return(Se=this.checker)==null?void 0:Se.signatureToString(this)}}});let ge=[wt.getNodeConstructor(),wt.getIdentifierConstructor(),wt.getTokenConstructor(),wt.getSourceFileConstructor()];for(let Se of ge)Qr(Se.prototype,"__debugKind")||Object.defineProperties(Se.prototype,{__tsDebuggerDisplay:{value(){return`${wa(this)?"GeneratedIdentifier":Ee(this)?`Identifier '${Ot(this)}'`:jr(this)?`PrivateIdentifier '${Ot(this)}'`:mn(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:lo(this)?`NumericLiteral ${this.text}`:o6(this)?`BigIntLiteral ${this.text}n`:No(this)?"TypeParameterDeclaration":Ma(this)?"ParameterDeclaration":J_(this)?"ConstructorDeclaration":m_(this)?"GetAccessorDeclaration":Qo(this)?"SetAccessorDeclaration":c6(this)?"CallSignatureDeclaration":Hx(this)?"ConstructSignatureDeclaration":l6(this)?"IndexSignatureDeclaration":Gx(this)?"TypePredicateNode":R_(this)?"TypeReferenceNode":tu(this)?"FunctionTypeNode":u6(this)?"ConstructorTypeNode":Xx(this)?"TypeQueryNode":Em(this)?"TypeLiteralNode":$x(this)?"ArrayTypeNode":Qx(this)?"TupleTypeNode":Yx(this)?"OptionalTypeNode":Kx(this)?"RestTypeNode":Zx(this)?"UnionTypeNode":e8(this)?"IntersectionTypeNode":t8(this)?"ConditionalTypeNode":r8(this)?"InferTypeNode":f6(this)?"ParenthesizedTypeNode":d6(this)?"ThisTypeNode":n8(this)?"TypeOperatorNode":i8(this)?"IndexedAccessTypeNode":a8(this)?"MappedTypeNode":m6(this)?"LiteralTypeNode":p6(this)?"NamedTupleMember":ru(this)?"ImportTypeNode":Xt(this.kind)}${this.flags?` (${sr(this.flags)})`:""}`}},__debugKind:{get(){return Xt(this.kind)}},__debugNodeFlags:{get(){return sr(this.flags)}},__debugModifierFlags:{get(){return $t(uS(this))}},__debugTransformFlags:{get(){return St(this.transformFlags)}},__debugIsParseTreeNode:{get(){return Tl(this)}},__debugEmitFlags:{get(){return xn(ti(this))}},__debugGetText:{value(nt){if(Ta(this))return"";let z=oe.get(this);if(z===void 0){let X=Fl(this),ee=X&&ri(X);z=ee?Xo(ee,X,nt):"",oe.set(this,z)}return z}}});pt=!0}e.enableDebugInfo=Un;function rn(q){let oe=q&7,ge=oe===0?"in out":oe===3?"[bivariant]":oe===2?"in":oe===1?"out":oe===4?"[independent]":"";return q&8?ge+=" (unmeasurable)":q&16&&(ge+=" (unreliable)"),ge}e.formatVariance=rn;class nn{__debugToString(){var oe;switch(this.kind){case 3:return((oe=this.debugInfo)==null?void 0:oe.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return ey(this.sources,this.targets||Aa(this.sources,()=>"any"),(ge,Se)=>`${ge.__debugTypeToString()} -> ${typeof Se=="string"?Se:Se.__debugTypeToString()}`).join(", ");case 2:return ey(this.sources,this.targets,(ge,Se)=>`${ge.__debugTypeToString()} -> ${Se().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(` +var V5=Object.create;var wf=Object.defineProperty;var H5=Object.getOwnPropertyDescriptor;var G5=Object.getOwnPropertyNames;var X5=Object.getPrototypeOf,$5=Object.prototype.hasOwnProperty;var C6=(e,t)=>()=>(e&&(t=e(e=0)),t);var mt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xh=(e,t)=>{for(var n in t)wf(e,n,{get:t[n],enumerable:!0})},A6=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let _ of G5(t))!$5.call(e,_)&&_!==n&&wf(e,_,{get:()=>t[_],enumerable:!(a=H5(t,_))||a.enumerable});return e};var Ot=(e,t,n)=>(n=e!=null?V5(X5(e)):{},A6(t||!e||!e.__esModule?wf(n,"default",{value:e,enumerable:!0}):n,e)),$h=e=>A6(wf({},"__esModule",{value:!0}),e);var Ef={};Xh(Ef,{default:()=>Y5});var Q5,Y5,Cf=C6(()=>{Q5=()=>()=>{},Y5=Q5});var lt=mt((Iz,P7)=>{var K5=Object.defineProperty,pv=Object.getOwnPropertyNames,It=(e,t)=>function(){return e&&(t=(0,e[pv(e)[0]])(e=0)),t},Z5=(e,t)=>function(){return t||(0,e[pv(e)[0]])((t={exports:{}}).exports,t),t.exports},_g=(e,t)=>{for(var n in t)K5(e,n,{get:t[n],enumerable:!0})},Rd,Gf,ry,e9=It({"src/compiler/corePublic.ts"(){"use strict";Rd="5.3",Gf="5.3.3",ry=(e=>(e[e.LessThan=-1]="LessThan",e[e.EqualTo=0]="EqualTo",e[e.GreaterThan=1]="GreaterThan",e))(ry||{})}});function eo(e){return e?e.length:0}function wn(e,t){if(e)for(let n=0;n=0;n--){let a=t(e[n],n);if(a)return a}}function cg(e,t){if(e!==void 0)for(let n=0;n=0;a--){let _=e[a];if(t(_,a))return _}}function ul(e,t,n){if(e===void 0)return-1;for(let a=n??0;a=0;a--)if(t(e[a],a))return a;return-1}function o9(e,t){for(let n=0;nn(a,t[_]))}function dv(e,t,n){for(let a=n||0;a{let p=t(_,a);if(p!==void 0){let[m,y]=p;m!==void 0&&y!==void 0&&n.set(m,y)}}),n}function h9(e,t,n){if(e.has(t))return e.get(t);let a=n();return e.set(t,a),a}function y9(e,t){return e.has(t)?!1:(e.add(t),!0)}function*g9(e){yield e}function b9(e,t,n){let a;if(e){a=[];let _=e.length,p,m,y=0,u=0;for(;y<_;){for(;u<_;){let x=e[u];if(m=t(x,u),u===0)p=m;else if(m!==p)break;u++}if(y{let[p,m]=t(_,a);n.set(p,m)}),n}function Ze(e,t){if(e)if(t){for(let n of e)if(t(n))return!0}else return e.length>0;return!1}function T9(e,t,n){let a;for(let _=0;_e[m])}function w9(e,t){let n=[];for(let a of e)Ll(n,a,t);return n}function yv(e,t,n){return e.length===0?[]:e.length===1?e.slice():n?x9(e,t,n):w9(e,t)}function E9(e,t){if(e.length===0)return Je;let n=e[0],a=[n];for(let _=1;_0&&(_&=-2),_&2&&a(p,u)>0&&(_&=-3),p=u}return _}function D9(e,t,n=_o){if(!e||!t)return e===t;if(e.length!==t.length)return!1;for(let a=0;a0&&I.assertGreaterThanOrEqual(n(t[p],t[p-1]),0);t:for(let m=_;_m&&I.assertGreaterThanOrEqual(n(e[_],e[_-1]),0),n(t[p],e[_])){case-1:a.push(t[p]);continue e;case 0:continue e;case 1:continue t}}return a}function Et(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function N9(e,t){return e===void 0?t:t===void 0?e:$t(e)?$t(t)?h_(e,t):Et(e,t):$t(t)?Et(t,e):[e,t]}function ay(e,t){return t<0?e.length+t:t}function zn(e,t,n,a){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(n,a);n=n===void 0?0:ay(t,n),a=a===void 0?t.length:ay(t,a);for(let _=n;_n(e[a],e[_])||Mn(a,_))}function Xf(e,t){return e.length===0?e:e.slice().sort(t)}function*O9(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function Tv(e,t){let n=ug(e);return vv(e,n,t),n.map(a=>e[a])}function M9(e,t,n,a){for(;n>1),u=n(e[y],y);switch(a(u,t)){case-1:p=y+1;break;case 0:return y;case 1:m=y-1;break}}return~p}function Fd(e,t,n,a,_){if(e&&e.length>0){let p=e.length;if(p>0){let m=a===void 0||a<0?0:a,y=_===void 0||m+_>p-1?p-1:m+_,u;for(arguments.length<=2?(u=e[m],m++):u=n;m<=y;)u=t(u,e[m],m),m++;return u}}return n}function Wn(e,t){return Wr.call(e,t)}function xv(e,t){return Wr.call(e,t)?e[t]:void 0}function fg(e){let t=[];for(let n in e)Wr.call(e,n)&&t.push(n);return t}function B9(e){let t=[];do{let n=Object.getOwnPropertyNames(e);for(let a of n)Ll(t,a)}while(e=Object.getPrototypeOf(e));return t}function U9(e){let t=[];for(let n in e)Wr.call(e,n)&&t.push(e[n]);return t}function q9(e,t){let n=new Array(e);for(let a=0;a100&&n>t.length>>1){let y=t.length-n;t.copyWithin(0,n),t.length=y,n=0}return m}return{enqueue:_,dequeue:p,isEmpty:a}}function eE(e,t){let n=new Map,a=0;function*_(){for(let m of n.values())$t(m)?yield*m:yield m}let p={has(m){let y=e(m);if(!n.has(y))return!1;let u=n.get(y);if(!$t(u))return t(u,m);for(let x of u)if(t(x,m))return!0;return!1},add(m){let y=e(m);if(n.has(y)){let u=n.get(y);if($t(u))rs(u,m,t)||(u.push(m),a++);else{let x=u;t(x,m)||(n.set(y,[x,m]),a++)}}else n.set(y,m),a++;return this},delete(m){let y=e(m);if(!n.has(y))return!1;let u=n.get(y);if($t(u)){for(let x=0;x_(),[Symbol.toStringTag]:n[Symbol.toStringTag]};return p}function $t(e){return Array.isArray(e)}function If(e){return $t(e)?e:[e]}function g_(e){return typeof e=="string"}function tE(e){return typeof e=="number"}function Ur(e,t){return e!==void 0&&t(e)?e:void 0}function wi(e,t){return e!==void 0&&t(e)?e:I.fail(`Invalid cast. The supplied value ${e} did not pass the test '${I.getFunctionName(t)}'.`)}function gr(e){}function $f(){return!1}function Cv(){return!0}function nE(){}function bt(e){return e}function Av(e){return e.toLowerCase()}function kv(e){return sy.test(e)?e.replace(sy,Av):e}function rE(){throw new Error("Not implemented")}function Qf(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Fr(e){let t=new Map;return n=>{let a=`${typeof n}:${n}`,_=t.get(a);return _===void 0&&!t.has(a)&&(_=e(n),t.set(a,_)),_}}function iE(e){let t=new WeakMap;return n=>{let a=t.get(n);return a===void 0&&!t.has(n)&&(a=e(n),t.set(n,a)),a}}function aE(e,t){return(...n)=>{let a=t.get(n);return a===void 0&&!t.has(n)&&(a=e(...n),t.set(n,a)),a}}function oE(e,t,n,a,_){if(_){let p=[];for(let m=0;mFd(p,(y,u)=>u(y),m)}else return a?p=>a(n(t(e(p)))):n?p=>n(t(e(p))):t?p=>t(e(p)):e?p=>e(p):p=>p}function _o(e,t){return e===t}function s_(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function Rl(e,t){return _o(e,t)}function Dv(e,t){return e===t?0:e===void 0?-1:t===void 0?1:et(n,a)===-1?n:a)}function qd(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toUpperCase(),t=t.toUpperCase(),et?1:0)}function cE(e,t){return e===t?0:e===void 0?-1:t===void 0?1:(e=e.toLowerCase(),t=t.toLowerCase(),et?1:0)}function Ii(e,t){return Dv(e,t)}function dg(e){return e?qd:Ii}function lE(){return Kf}function Pv(e){Kf!==e&&(Kf=e,cy=void 0)}function uE(e,t){return(cy||(cy=Fv(Kf)))(e,t)}function pE(e,t,n,a){return e===t?0:e===void 0?-1:t===void 0?1:a(e[n],t[n])}function fE(e,t){return Mn(e?1:0,t?1:0)}function Iv(e,t,n){let a=Math.max(2,Math.floor(e.length*.34)),_=Math.floor(e.length*.4)+1,p;for(let m of t){let y=n(m);if(y!==void 0&&Math.abs(y.length-e.length)<=a){if(y===e||y.length<3&&y.toLowerCase()!==e.toLowerCase())continue;let u=dE(e,y,_-.1);if(u===void 0)continue;I.assert(u<_),_=u,p=m}}return p}function dE(e,t,n){let a=new Array(t.length+1),_=new Array(t.length+1),p=n+.01;for(let y=0;y<=t.length;y++)a[y]=y;for(let y=1;y<=e.length;y++){let u=e.charCodeAt(y-1),x=Math.ceil(y>n?y-n:1),d=Math.floor(t.length>n+y?n+y:t.length);_[0]=y;let S=y;for(let A=1;An)return;let T=a;a=_,_=T}let m=a[t.length];return m>n?void 0:m}function is(e,t){let n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n}function mE(e,t){return is(e,t)?e.slice(0,e.length-t.length):e}function hE(e,t){return is(e,t)?e.slice(0,e.length-t.length):void 0}function yE(e){let t=e.length;for(let n=t-1;n>0;n--){let a=e.charCodeAt(n);if(a>=48&&a<=57)do--n,a=e.charCodeAt(n);while(n>0&&a>=48&&a<=57);else if(n>4&&(a===110||a===78)){if(--n,a=e.charCodeAt(n),a!==105&&a!==73||(--n,a=e.charCodeAt(n),a!==109&&a!==77))break;--n,a=e.charCodeAt(n)}else break;if(a!==45&&a!==46)break;t=n}return t===e.length?e:e.slice(0,t)}function gE(e,t){for(let n=0;nn===t)}function bE(e,t){for(let n=0;n_&&(_=m.prefix.length,a=p)}return a}function Hn(e,t){return e.lastIndexOf(t,0)===0}function SE(e,t){return Hn(e,t)?e.substr(t.length):e}function Lv(e,t,n=bt){return Hn(n(e),n(t))?e.substring(t.length):void 0}function hg({prefix:e,suffix:t},n){return n.length>=e.length+t.length&&Hn(n,e)&&is(n,t)}function xE(e,t){return n=>e(n)&&t(n)}function yg(...e){return(...t)=>{let n;for(let a of e)if(n=a(...t),n)return n;return n}}function wE(e){return(...t)=>!e(...t)}function EE(e){}function Yf(e){return e===void 0?void 0:[e]}function CE(e,t,n,a,_,p){p=p||gr;let m=0,y=0,u=e.length,x=t.length,d=!1;for(;m(e[e.None=0]="None",e[e.CaseSensitive=1]="CaseSensitive",e[e.CaseInsensitive=2]="CaseInsensitive",e[e.Both=3]="Both",e))(oy||{}),jv=Array.prototype.at?(e,t)=>e==null?void 0:e.at(t):(e,t)=>{if(e&&(t=ay(e,t),t(e[e.None=0]="None",e[e.Normal=1]="Normal",e[e.Aggressive=2]="Aggressive",e[e.VeryAggressive=3]="VeryAggressive",e))(_y||{}),Fv=(()=>{return t;function e(n,a,_){if(n===a)return 0;if(n===void 0)return-1;if(a===void 0)return 1;let p=_(n,a);return p<0?-1:p>0?1:0}function t(n){let a=new Intl.Collator(n,{usage:"sort",sensitivity:"variant"}).compare;return(_,p)=>e(_,p,a)}})()}}),ly,I,Bv=It({"src/compiler/debug.ts"(){"use strict";En(),En(),ly=(e=>(e[e.Off=0]="Off",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Info=3]="Info",e[e.Verbose=4]="Verbose",e))(ly||{}),(e=>{let t=0;e.currentLogLevel=2,e.isDebugging=!1;function n(U){return e.currentLogLevel<=U}e.shouldLog=n;function a(U,ie){e.loggingHost&&n(U)&&e.loggingHost.log(U,ie)}function _(U){a(3,U)}e.log=_,(U=>{function ie($e){a(1,$e)}U.error=ie;function ye($e){a(2,$e)}U.warn=ye;function Te($e){a(3,$e)}U.log=Te;function tt($e){a(4,$e)}U.trace=tt})(_=e.log||(e.log={}));let p={};function m(){return t}e.getAssertionLevel=m;function y(U){let ie=t;if(t=U,U>ie)for(let ye of fg(p)){let Te=p[ye];Te!==void 0&&e[ye]!==Te.assertion&&U>=Te.level&&(e[ye]=Te,p[ye]=void 0)}}e.setAssertionLevel=y;function u(U){return t>=U}e.shouldAssert=u;function x(U,ie){return u(U)?!0:(p[ie]={level:U,assertion:e[ie]},e[ie]=gr,!1)}function d(U,ie){debugger;let ye=new Error(U?`Debug Failure. ${U}`:"Debug Failure.");throw Error.captureStackTrace&&Error.captureStackTrace(ye,ie||d),ye}e.fail=d;function S(U,ie,ye){return d(`${ie||"Unexpected node."}\r +Node ${vt(U.kind)} was unexpected.`,ye||S)}e.failBadSyntaxKind=S;function T(U,ie,ye,Te){U||(ie=ie?`False expression: ${ie}`:"False expression.",ye&&(ie+=`\r +Verbose Debug Information: `+(typeof ye=="string"?ye:ye())),d(ie,Te||T))}e.assert=T;function A(U,ie,ye,Te,tt){if(U!==ie){let $e=ye?Te?`${ye} ${Te}`:ye:"";d(`Expected ${U} === ${ie}. ${$e}`,tt||A)}}e.assertEqual=A;function N(U,ie,ye,Te){U>=ie&&d(`Expected ${U} < ${ie}. ${ye||""}`,Te||N)}e.assertLessThan=N;function q(U,ie,ye){U>ie&&d(`Expected ${U} <= ${ie}`,ye||q)}e.assertLessThanOrEqual=q;function Q(U,ie,ye){U= ${ie}`,ye||Q)}e.assertGreaterThanOrEqual=Q;function se(U,ie,ye){U==null&&d(ie,ye||se)}e.assertIsDefined=se;function fe(U,ie,ye){return se(U,ie,ye||fe),U}e.checkDefined=fe;function F(U,ie,ye){for(let Te of U)se(Te,ie,ye||F)}e.assertEachIsDefined=F;function W(U,ie,ye){return F(U,ie,ye||W),U}e.checkEachDefined=W;function Se(U,ie="Illegal value:",ye){let Te=typeof U=="object"&&Wn(U,"kind")&&Wn(U,"pos")?"SyntaxKind: "+vt(U.kind):JSON.stringify(U);return d(`${ie} ${Te}`,ye||Se)}e.assertNever=Se;function Qe(U,ie,ye,Te){x(1,"assertEachNode")&&T(ie===void 0||so(U,ie),ye||"Unexpected node.",()=>`Node array did not pass test '${gn(ie)}'.`,Te||Qe)}e.assertEachNode=Qe;function Be(U,ie,ye,Te){x(1,"assertNode")&&T(U!==void 0&&(ie===void 0||ie(U)),ye||"Unexpected node.",()=>`Node ${vt(U==null?void 0:U.kind)} did not pass test '${gn(ie)}'.`,Te||Be)}e.assertNode=Be;function st(U,ie,ye,Te){x(1,"assertNotNode")&&T(U===void 0||ie===void 0||!ie(U),ye||"Unexpected node.",()=>`Node ${vt(U.kind)} should not have passed test '${gn(ie)}'.`,Te||st)}e.assertNotNode=st;function _t(U,ie,ye,Te){x(1,"assertOptionalNode")&&T(ie===void 0||U===void 0||ie(U),ye||"Unexpected node.",()=>`Node ${vt(U==null?void 0:U.kind)} did not pass test '${gn(ie)}'.`,Te||_t)}e.assertOptionalNode=_t;function hn(U,ie,ye,Te){x(1,"assertOptionalToken")&&T(ie===void 0||U===void 0||U.kind===ie,ye||"Unexpected node.",()=>`Node ${vt(U==null?void 0:U.kind)} was not a '${vt(ie)}' token.`,Te||hn)}e.assertOptionalToken=hn;function yn(U,ie,ye){x(1,"assertMissingNode")&&T(U===void 0,ie||"Unexpected node.",()=>`Node ${vt(U.kind)} was unexpected'.`,ye||yn)}e.assertMissingNode=yn;function fi(U){}e.type=fi;function gn(U){if(typeof U!="function")return"";if(Wn(U,"name"))return U.name;{let ie=Function.prototype.toString.call(U),ye=/^function\s+([\w$]+)\s*\(/.exec(ie);return ye?ye[1]:""}}e.getFunctionName=gn;function cr(U){return`{ name: ${Go(U.escapedName)}; flags: ${an(U.flags)}; declarations: ${xa(U.declarations,ie=>vt(ie.kind))} }`}e.formatSymbol=cr;function He(U=0,ie,ye){let Te=Gr(ie);if(U===0)return Te.length>0&&Te[0][0]===0?Te[0][1]:"0";if(ye){let tt=[],$e=U;for(let[Ut,St]of Te){if(Ut>U)break;Ut!==0&&Ut&U&&(tt.push(St),$e&=~Ut)}if($e===0)return tt.join("|")}else for(let[tt,$e]of Te)if(tt===U)return $e;return U.toString()}e.formatEnum=He;let Qn=new Map;function Gr(U){let ie=Qn.get(U);if(ie)return ie;let ye=[];for(let tt in U){let $e=U[tt];typeof $e=="number"&&ye.push([$e,tt])}let Te=Tv(ye,(tt,$e)=>Mn(tt[0],$e[0]));return Qn.set(U,Te),Te}function vt(U){return He(U,nd,!1)}e.formatSyntaxKind=vt;function Jn(U){return He(U,dd,!1)}e.formatSnippetKind=Jn;function Ar(U){return He(U,pd,!1)}e.formatScriptKind=Ar;function Ht(U){return He(U,rd,!0)}e.formatNodeFlags=Ht;function rn(U){return He(U,id,!0)}e.formatModifierFlags=rn;function at(U){return He(U,fd,!0)}e.formatTransformFlags=at;function kr(U){return He(U,md,!0)}e.formatEmitFlags=kr;function an(U){return He(U,sd,!0)}e.formatSymbolFlags=an;function xt(U){return He(U,_d,!0)}e.formatTypeFlags=xt;function ut(U){return He(U,ld,!0)}e.formatSignatureFlags=ut;function Gt(U){return He(U,cd,!0)}e.formatObjectFlags=Gt;function cn(U){return He(U,Tl,!0)}e.formatFlowFlags=cn;function ht(U){return He(U,ad,!0)}e.formatRelationComparisonResult=ht;function Dr(U){return He(U,CheckMode,!0)}e.formatCheckMode=Dr;function Tt(U){return He(U,SignatureCheckMode,!0)}e.formatSignatureCheckMode=Tt;function Rn(U){return He(U,TypeFacts,!0)}e.formatTypeFacts=Rn;let yt=!1,jn;function ct(U){"__debugFlowFlags"in U||Object.defineProperties(U,{__tsDebuggerDisplay:{value(){let ie=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",ye=this.flags&-2048;return`${ie}${ye?` (${cn(ye)})`:""}`}},__debugFlowFlags:{get(){return He(this.flags,Tl,!0)}},__debugToString:{value(){return De(this)}}})}function Kt(U){yt&&(typeof Object.setPrototypeOf=="function"?(jn||(jn=Object.create(Object.prototype),ct(jn)),Object.setPrototypeOf(U,jn)):ct(U))}e.attachFlowNodeDebugInfo=Kt;let Zt;function lr(U){"__tsDebuggerDisplay"in U||Object.defineProperties(U,{__tsDebuggerDisplay:{value(ie){return ie=String(ie).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/,"]"),`NodeArray ${ie}`}}})}function di(U){yt&&(typeof Object.setPrototypeOf=="function"?(Zt||(Zt=Object.create(Array.prototype),lr(Zt)),Object.setPrototypeOf(U,Zt)):lr(U))}e.attachNodeArrayDebugInfo=di;function Xr(){if(yt)return;let U=new WeakMap,ie=new WeakMap;Object.defineProperties(Ct.getSymbolConstructor().prototype,{__tsDebuggerDisplay:{value(){let Te=this.flags&33554432?"TransientSymbol":"Symbol",tt=this.flags&-33554433;return`${Te} '${yd(this)}'${tt?` (${an(tt)})`:""}`}},__debugFlags:{get(){return an(this.flags)}}}),Object.defineProperties(Ct.getTypeConstructor().prototype,{__tsDebuggerDisplay:{value(){let Te=this.flags&67359327?`IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName?` (${this.debugIntrinsicName})`:""}`:this.flags&98304?"NullableType":this.flags&384?`LiteralType ${JSON.stringify(this.value)}`:this.flags&2048?`LiteralType ${this.value.negative?"-":""}${this.value.base10Value}n`:this.flags&8192?"UniqueESSymbolType":this.flags&32?"EnumType":this.flags&1048576?"UnionType":this.flags&2097152?"IntersectionType":this.flags&4194304?"IndexType":this.flags&8388608?"IndexedAccessType":this.flags&16777216?"ConditionalType":this.flags&33554432?"SubstitutionType":this.flags&262144?"TypeParameter":this.flags&524288?this.objectFlags&3?"InterfaceType":this.objectFlags&4?"TypeReference":this.objectFlags&8?"TupleType":this.objectFlags&16?"AnonymousType":this.objectFlags&32?"MappedType":this.objectFlags&1024?"ReverseMappedType":this.objectFlags&256?"EvolvingArrayType":"ObjectType":"Type",tt=this.flags&524288?this.objectFlags&-1344:0;return`${Te}${this.symbol?` '${yd(this.symbol)}'`:""}${tt?` (${Gt(tt)})`:""}`}},__debugFlags:{get(){return xt(this.flags)}},__debugObjectFlags:{get(){return this.flags&524288?Gt(this.objectFlags):""}},__debugTypeToString:{value(){let Te=U.get(this);return Te===void 0&&(Te=this.checker.typeToString(this),U.set(this,Te)),Te}}}),Object.defineProperties(Ct.getSignatureConstructor().prototype,{__debugFlags:{get(){return ut(this.flags)}},__debugSignatureToString:{value(){var Te;return(Te=this.checker)==null?void 0:Te.signatureToString(this)}}});let ye=[Ct.getNodeConstructor(),Ct.getIdentifierConstructor(),Ct.getTokenConstructor(),Ct.getSourceFileConstructor()];for(let Te of ye)Wn(Te.prototype,"__debugKind")||Object.defineProperties(Te.prototype,{__tsDebuggerDisplay:{value(){return`${va(this)?"GeneratedIdentifier":Ae(this)?`Identifier '${Lt(this)}'`:Vn(this)?`PrivateIdentifier '${Lt(this)}'`:Tr(this)?`StringLiteral ${JSON.stringify(this.text.length<10?this.text:this.text.slice(10)+"...")}`:lo(this)?`NumericLiteral ${this.text}`:db(this)?`BigIntLiteral ${this.text}n`:Lo(this)?"TypeParameterDeclaration":Pa(this)?"ParameterDeclaration":L_(this)?"ConstructorDeclaration":d_(this)?"GetAccessorDeclaration":Zo(this)?"SetAccessorDeclaration":yb(this)?"CallSignatureDeclaration":zx(this)?"ConstructSignatureDeclaration":gb(this)?"IndexSignatureDeclaration":Wx(this)?"TypePredicateNode":J_(this)?"TypeReferenceNode":tu(this)?"FunctionTypeNode":bb(this)?"ConstructorTypeNode":Vx(this)?"TypeQueryNode":Pm(this)?"TypeLiteralNode":Hx(this)?"ArrayTypeNode":Gx(this)?"TupleTypeNode":Xx(this)?"OptionalTypeNode":$x(this)?"RestTypeNode":Qx(this)?"UnionTypeNode":Yx(this)?"IntersectionTypeNode":Kx(this)?"ConditionalTypeNode":Zx(this)?"InferTypeNode":Tb(this)?"ParenthesizedTypeNode":Sb(this)?"ThisTypeNode":e8(this)?"TypeOperatorNode":t8(this)?"IndexedAccessTypeNode":n8(this)?"MappedTypeNode":xb(this)?"LiteralTypeNode":vb(this)?"NamedTupleMember":nu(this)?"ImportTypeNode":vt(this.kind)}${this.flags?` (${Ht(this.flags)})`:""}`}},__debugKind:{get(){return vt(this.kind)}},__debugNodeFlags:{get(){return Ht(this.flags)}},__debugModifierFlags:{get(){return rn(aS(this))}},__debugTransformFlags:{get(){return at(this.transformFlags)}},__debugIsParseTreeNode:{get(){return xl(this)}},__debugEmitFlags:{get(){return kr(ai(this))}},__debugGetText:{value(tt){if(ya(this))return"";let $e=ie.get(this);if($e===void 0){let Ut=Ul(this),St=Ut&&oi(Ut);$e=St?Qo(St,Ut,tt):"",ie.set(this,$e)}return $e}}});yt=!0}e.enableDebugInfo=Xr;function Yn(U){let ie=U&7,ye=ie===0?"in out":ie===3?"[bivariant]":ie===2?"in":ie===1?"out":ie===4?"[independent]":"";return U&8?ye+=" (unmeasurable)":U&16&&(ye+=" (unreliable)"),ye}e.formatVariance=Yn;class Kn{__debugToString(){var ie;switch(this.kind){case 3:return((ie=this.debugInfo)==null?void 0:ie.call(this))||"(function mapper)";case 0:return`${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`;case 1:return iy(this.sources,this.targets||xa(this.sources,()=>"any"),(ye,Te)=>`${ye.__debugTypeToString()} -> ${typeof Te=="string"?Te:Te.__debugTypeToString()}`).join(", ");case 2:return iy(this.sources,this.targets,(ye,Te)=>`${ye.__debugTypeToString()} -> ${Te().__debugTypeToString()}`).join(", ");case 5:case 4:return`m1: ${this.mapper1.__debugToString().split(` `).join(` `)} m2: ${this.mapper2.__debugToString().split(` `).join(` - `)}`;default:return Ce(this)}}}e.DebugTypeMapper=nn;function Di(q){return e.isDebugging?Object.setPrototypeOf(q,nn.prototype):q}e.attachDebugPrototypeIfDebug=Di;function qn(q){return console.log(Ae(q))}e.printControlFlowGraph=qn;function Ae(q){let oe=-1;function ge(x){return x.id||(x.id=oe,oe--),x.id}let Se;(x=>{x.lr="\u2500",x.ud="\u2502",x.dr="\u256D",x.dl="\u256E",x.ul="\u256F",x.ur="\u2570",x.udr="\u251C",x.udl="\u2524",x.dlr="\u252C",x.ulr="\u2534",x.udlr="\u256B"})(Se||(Se={}));let nt;(x=>{x[x.None=0]="None",x[x.Up=1]="Up",x[x.Down=2]="Down",x[x.Left=4]="Left",x[x.Right=8]="Right",x[x.UpDown=3]="UpDown",x[x.LeftRight=12]="LeftRight",x[x.UpLeft=5]="UpLeft",x[x.UpRight=9]="UpRight",x[x.DownLeft=6]="DownLeft",x[x.DownRight=10]="DownRight",x[x.UpDownLeft=7]="UpDownLeft",x[x.UpDownRight=11]="UpDownRight",x[x.UpLeftRight=13]="UpLeftRight",x[x.DownLeftRight=14]="DownLeftRight",x[x.UpDownLeftRight=15]="UpDownLeftRight",x[x.NoChildren=16]="NoChildren"})(nt||(nt={}));let z=2032,X=882,ee=Object.create(null),xe=[],ke=[],Le=ia(q,new Set);for(let x of xe)x.text=oa(x.flowNode,x.circular),En(x);let lt=Ii(Le),yt=aa(lt);return Vn(Le,0),Mt();function jt(x){return!!(x.flags&128)}function qr(x){return!!(x.flags&12)&&!!x.antecedents}function na(x){return!!(x.flags&z)}function Cn(x){return!!(x.flags&X)}function zn(x){let f=[];for(let $ of x.edges)$.source===x&&f.push($.target);return f}function Pi(x){let f=[];for(let $ of x.edges)$.target===x&&f.push($.source);return f}function ia(x,f){let $=ge(x),Q=ee[$];if(Q&&f.has(x))return Q.circular=!0,Q={id:-1,flowNode:x,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},xe.push(Q),Q;if(f.add(x),!Q)if(ee[$]=Q={id:$,flowNode:x,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},xe.push(Q),qr(x))for(let O of x.antecedents)Wn(Q,O,f);else na(x)&&Wn(Q,x.antecedent,f);return f.delete(x),Q}function Wn(x,f,$){let Q=ia(f,$),O={source:x,target:Q};ke.push(O),x.edges.push(O),Q.edges.push(O)}function En(x){if(x.level!==-1)return x.level;let f=0;for(let $ of Pi(x))f=Math.max(f,En($)+1);return x.level=f}function Ii(x){let f=0;for(let $ of zn(x))f=Math.max(f,Ii($));return f+1}function aa(x){let f=j(Array(x),0);for(let $ of xe)f[$.level]=Math.max(f[$.level],$.text.length);return f}function Vn(x,f){if(x.lane===-1){x.lane=f,x.endLane=f;let $=zn(x);for(let Q=0;Q<$.length;Q++){Q>0&&f++;let O=$[Q];Vn(O,f),O.endLane>x.endLane&&(f=O.endLane)}x.endLane=f}}function Sr(x){if(x&2)return"Start";if(x&4)return"Branch";if(x&8)return"Loop";if(x&16)return"Assignment";if(x&32)return"True";if(x&64)return"False";if(x&128)return"SwitchClause";if(x&256)return"ArrayMutation";if(x&512)return"Call";if(x&1024)return"ReduceLabel";if(x&1)return"Unreachable";throw new Error}function Je(x){let f=ri(x);return Xo(f,x,!1)}function oa(x,f){let $=Sr(x.flags);if(f&&($=`${$}#${ge(x)}`),Cn(x))x.node&&($+=` (${Je(x.node)})`);else if(jt(x)){let Q=[];for(let O=x.clauseStart;OMath.max(be,he.lane),0)+1,$=j(Array(f),""),Q=yt.map(()=>Array(f)),O=yt.map(()=>j(Array(f),0));for(let be of xe){Q[be.level][be.lane]=be;let he=zn(be);for(let we=0;we0&&(Ye|=1),we0&&(Ye|=1),we0?O[be-1][he]:0,we=he>0?O[be][he-1]:0,et=O[be][he];et||(Re&8&&(et|=12),we&2&&(et|=3),O[be][he]=et)}for(let be=0;be{w.lr="\u2500",w.ud="\u2502",w.dr="\u256D",w.dl="\u256E",w.ul="\u256F",w.ur="\u2570",w.udr="\u251C",w.udl="\u2524",w.dlr="\u252C",w.ulr="\u2534",w.udlr="\u256B"})(Te||(Te={}));let tt;(w=>{w[w.None=0]="None",w[w.Up=1]="Up",w[w.Down=2]="Down",w[w.Left=4]="Left",w[w.Right=8]="Right",w[w.UpDown=3]="UpDown",w[w.LeftRight=12]="LeftRight",w[w.UpLeft=5]="UpLeft",w[w.UpRight=9]="UpRight",w[w.DownLeft=6]="DownLeft",w[w.DownRight=10]="DownRight",w[w.UpDownLeft=7]="UpDownLeft",w[w.UpDownRight=11]="UpDownRight",w[w.UpLeftRight=13]="UpLeftRight",w[w.DownLeftRight=14]="DownLeftRight",w[w.UpDownLeftRight=15]="UpDownLeftRight",w[w.NoChildren=16]="NoChildren"})(tt||(tt={}));let $e=2032,Ut=882,St=Object.create(null),Jt=[],Rt=[],z=Zn(U,new Set);for(let w of Jt)w.text=oa(w.flowNode,w.circular),er(w);let K=Ri(z),te=aa(K);return $r(z,0),jt();function Ee(w){return!!(w.flags&128)}function je(w){return!!(w.flags&12)&&!!w.antecedents}function pt(w){return!!(w.flags&$e)}function nt(w){return!!(w.flags&Ut)}function kt(w){let f=[];for(let X of w.edges)X.source===w&&f.push(X.target);return f}function qt(w){let f=[];for(let X of w.edges)X.target===w&&f.push(X.source);return f}function Zn(w,f){let X=ye(w),$=St[X];if($&&f.has(w))return $.circular=!0,$={id:-1,flowNode:w,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},Jt.push($),$;if(f.add(w),!$)if(St[X]=$={id:X,flowNode:w,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},Jt.push($),je(w))for(let O of w.antecedents)kn($,O,f);else pt(w)&&kn($,w.antecedent,f);return f.delete(w),$}function kn(w,f,X){let $=Zn(f,X),O={source:w,target:$};Rt.push(O),w.edges.push(O),$.edges.push(O)}function er(w){if(w.level!==-1)return w.level;let f=0;for(let X of qt(w))f=Math.max(f,er(X)+1);return w.level=f}function Ri(w){let f=0;for(let X of kt(w))f=Math.max(f,Ri(X));return f+1}function aa(w){let f=R(Array(w),0);for(let X of Jt)f[X.level]=Math.max(f[X.level],X.text.length);return f}function $r(w,f){if(w.lane===-1){w.lane=f,w.endLane=f;let X=kt(w);for(let $=0;$0&&f++;let O=X[$];$r(O,f),O.endLane>w.endLane&&(f=O.endLane)}w.endLane=f}}function Dn(w){if(w&2)return"Start";if(w&4)return"Branch";if(w&8)return"Loop";if(w&16)return"Assignment";if(w&32)return"True";if(w&64)return"False";if(w&128)return"SwitchClause";if(w&256)return"ArrayMutation";if(w&512)return"Call";if(w&1024)return"ReduceLabel";if(w&1)return"Unreachable";throw new Error}function Ne(w){let f=oi(w);return Qo(f,w,!1)}function oa(w,f){let X=Dn(w.flags);if(f&&(X=`${X}#${ye(w)}`),nt(w))w.node&&(X+=` (${Ne(w.node)})`);else if(Ee(w)){let $=[];for(let O=w.clauseStart;OMath.max(be,ge.lane),0)+1,X=R(Array(f),""),$=te.map(()=>Array(f)),O=te.map(()=>R(Array(f),0));for(let be of Jt){$[be.level][be.lane]=be;let ge=kt(be);for(let xe=0;xe0&&(Ge|=1),xe0&&(Ge|=1),xe0?O[be-1][ge]:0,xe=ge>0?O[be][ge-1]:0,Ye=O[be][ge];Ye||(Le&8&&(Ye|=12),xe&2&&(Ye|=3),O[be][ge]=Ye)}for(let be=0;be0?x.repeat(f):"";let $="";for(;$.length{},mE=()=>{},hE=()=>{},Sa=Date.now,yE=()=>{},Yf=new Proxy(()=>{},{get:()=>Yf});function Lb(e){if(fg){let t=_y.get(e)??0;_y.set(e,t+1),Zf.set(e,Sa()),Kf==null||Kf.mark(e),typeof onProfilerEvent=="function"&&onProfilerEvent(e)}}function gE(e,t,r){if(fg){let a=(r!==void 0?Zf.get(r):void 0)??Sa(),_=(t!==void 0?Zf.get(t):void 0)??Gv,p=cy.get(e)||0;cy.set(e,p+(a-_)),Kf==null||Kf.measure(e,t,r)}}var Kf,bE,fg,Gv,Zf,_y,cy,XV=Vt({"src/compiler/performance.ts"(){"use strict";Dr(),bE={enter:Rn,exit:Rn},fg=!1,Gv=Sa(),Zf=new Map,_y=new Map,cy=new Map}}),Xv=()=>{},vE=()=>{},xa;function TE(e,t=!0){let r=cd[e.category];return t?r.toLowerCase():r}var ed,td,rd,ly,nd,uy,py,bl,fy,id,dy,my,hy,yy,gy,by,vy,Ty,Sy,xy,wy,Cy,Ey,Ay,ky,ad,Dy,Py,Iy,Ny,od,sd,Oy,My,Ly,Jy,Ry,jy,_d,Fy,By,Uy,qy,zy,Wy,cd,Vy,Hy,Gy,Xy,$y,Qy,Yy,Ky,Zy,ld,e0,t0,r0,n0,i0,ud,pd,fd,a0,o0,s0,_0,c0,l0,u0,p0,qd,$v=Vt({"src/compiler/types.ts"(){"use strict";ed=(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.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKeyword",e[e.ForKeyword=99]="ForKeyword",e[e.FunctionKeyword=100]="FunctionKeyword",e[e.IfKeyword=101]="IfKeyword",e[e.ImportKeyword=102]="ImportKeyword",e[e.InKeyword=103]="InKeyword",e[e.InstanceOfKeyword=104]="InstanceOfKeyword",e[e.NewKeyword=105]="NewKeyword",e[e.NullKeyword=106]="NullKeyword",e[e.ReturnKeyword=107]="ReturnKeyword",e[e.SuperKeyword=108]="SuperKeyword",e[e.SwitchKeyword=109]="SwitchKeyword",e[e.ThisKeyword=110]="ThisKeyword",e[e.ThrowKeyword=111]="ThrowKeyword",e[e.TrueKeyword=112]="TrueKeyword",e[e.TryKeyword=113]="TryKeyword",e[e.TypeOfKeyword=114]="TypeOfKeyword",e[e.VarKeyword=115]="VarKeyword",e[e.VoidKeyword=116]="VoidKeyword",e[e.WhileKeyword=117]="WhileKeyword",e[e.WithKeyword=118]="WithKeyword",e[e.ImplementsKeyword=119]="ImplementsKeyword",e[e.InterfaceKeyword=120]="InterfaceKeyword",e[e.LetKeyword=121]="LetKeyword",e[e.PackageKeyword=122]="PackageKeyword",e[e.PrivateKeyword=123]="PrivateKeyword",e[e.ProtectedKeyword=124]="ProtectedKeyword",e[e.PublicKeyword=125]="PublicKeyword",e[e.StaticKeyword=126]="StaticKeyword",e[e.YieldKeyword=127]="YieldKeyword",e[e.AbstractKeyword=128]="AbstractKeyword",e[e.AccessorKeyword=129]="AccessorKeyword",e[e.AsKeyword=130]="AsKeyword",e[e.AssertsKeyword=131]="AssertsKeyword",e[e.AssertKeyword=132]="AssertKeyword",e[e.AnyKeyword=133]="AnyKeyword",e[e.AsyncKeyword=134]="AsyncKeyword",e[e.AwaitKeyword=135]="AwaitKeyword",e[e.BooleanKeyword=136]="BooleanKeyword",e[e.ConstructorKeyword=137]="ConstructorKeyword",e[e.DeclareKeyword=138]="DeclareKeyword",e[e.GetKeyword=139]="GetKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.QualifiedName=166]="QualifiedName",e[e.ComputedPropertyName=167]="ComputedPropertyName",e[e.TypeParameter=168]="TypeParameter",e[e.Parameter=169]="Parameter",e[e.Decorator=170]="Decorator",e[e.PropertySignature=171]="PropertySignature",e[e.PropertyDeclaration=172]="PropertyDeclaration",e[e.MethodSignature=173]="MethodSignature",e[e.MethodDeclaration=174]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=175]="ClassStaticBlockDeclaration",e[e.Constructor=176]="Constructor",e[e.GetAccessor=177]="GetAccessor",e[e.SetAccessor=178]="SetAccessor",e[e.CallSignature=179]="CallSignature",e[e.ConstructSignature=180]="ConstructSignature",e[e.IndexSignature=181]="IndexSignature",e[e.TypePredicate=182]="TypePredicate",e[e.TypeReference=183]="TypeReference",e[e.FunctionType=184]="FunctionType",e[e.ConstructorType=185]="ConstructorType",e[e.TypeQuery=186]="TypeQuery",e[e.TypeLiteral=187]="TypeLiteral",e[e.ArrayType=188]="ArrayType",e[e.TupleType=189]="TupleType",e[e.OptionalType=190]="OptionalType",e[e.RestType=191]="RestType",e[e.UnionType=192]="UnionType",e[e.IntersectionType=193]="IntersectionType",e[e.ConditionalType=194]="ConditionalType",e[e.InferType=195]="InferType",e[e.ParenthesizedType=196]="ParenthesizedType",e[e.ThisType=197]="ThisType",e[e.TypeOperator=198]="TypeOperator",e[e.IndexedAccessType=199]="IndexedAccessType",e[e.MappedType=200]="MappedType",e[e.LiteralType=201]="LiteralType",e[e.NamedTupleMember=202]="NamedTupleMember",e[e.TemplateLiteralType=203]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=204]="TemplateLiteralTypeSpan",e[e.ImportType=205]="ImportType",e[e.ObjectBindingPattern=206]="ObjectBindingPattern",e[e.ArrayBindingPattern=207]="ArrayBindingPattern",e[e.BindingElement=208]="BindingElement",e[e.ArrayLiteralExpression=209]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=210]="ObjectLiteralExpression",e[e.PropertyAccessExpression=211]="PropertyAccessExpression",e[e.ElementAccessExpression=212]="ElementAccessExpression",e[e.CallExpression=213]="CallExpression",e[e.NewExpression=214]="NewExpression",e[e.TaggedTemplateExpression=215]="TaggedTemplateExpression",e[e.TypeAssertionExpression=216]="TypeAssertionExpression",e[e.ParenthesizedExpression=217]="ParenthesizedExpression",e[e.FunctionExpression=218]="FunctionExpression",e[e.ArrowFunction=219]="ArrowFunction",e[e.DeleteExpression=220]="DeleteExpression",e[e.TypeOfExpression=221]="TypeOfExpression",e[e.VoidExpression=222]="VoidExpression",e[e.AwaitExpression=223]="AwaitExpression",e[e.PrefixUnaryExpression=224]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=225]="PostfixUnaryExpression",e[e.BinaryExpression=226]="BinaryExpression",e[e.ConditionalExpression=227]="ConditionalExpression",e[e.TemplateExpression=228]="TemplateExpression",e[e.YieldExpression=229]="YieldExpression",e[e.SpreadElement=230]="SpreadElement",e[e.ClassExpression=231]="ClassExpression",e[e.OmittedExpression=232]="OmittedExpression",e[e.ExpressionWithTypeArguments=233]="ExpressionWithTypeArguments",e[e.AsExpression=234]="AsExpression",e[e.NonNullExpression=235]="NonNullExpression",e[e.MetaProperty=236]="MetaProperty",e[e.SyntheticExpression=237]="SyntheticExpression",e[e.SatisfiesExpression=238]="SatisfiesExpression",e[e.TemplateSpan=239]="TemplateSpan",e[e.SemicolonClassElement=240]="SemicolonClassElement",e[e.Block=241]="Block",e[e.EmptyStatement=242]="EmptyStatement",e[e.VariableStatement=243]="VariableStatement",e[e.ExpressionStatement=244]="ExpressionStatement",e[e.IfStatement=245]="IfStatement",e[e.DoStatement=246]="DoStatement",e[e.WhileStatement=247]="WhileStatement",e[e.ForStatement=248]="ForStatement",e[e.ForInStatement=249]="ForInStatement",e[e.ForOfStatement=250]="ForOfStatement",e[e.ContinueStatement=251]="ContinueStatement",e[e.BreakStatement=252]="BreakStatement",e[e.ReturnStatement=253]="ReturnStatement",e[e.WithStatement=254]="WithStatement",e[e.SwitchStatement=255]="SwitchStatement",e[e.LabeledStatement=256]="LabeledStatement",e[e.ThrowStatement=257]="ThrowStatement",e[e.TryStatement=258]="TryStatement",e[e.DebuggerStatement=259]="DebuggerStatement",e[e.VariableDeclaration=260]="VariableDeclaration",e[e.VariableDeclarationList=261]="VariableDeclarationList",e[e.FunctionDeclaration=262]="FunctionDeclaration",e[e.ClassDeclaration=263]="ClassDeclaration",e[e.InterfaceDeclaration=264]="InterfaceDeclaration",e[e.TypeAliasDeclaration=265]="TypeAliasDeclaration",e[e.EnumDeclaration=266]="EnumDeclaration",e[e.ModuleDeclaration=267]="ModuleDeclaration",e[e.ModuleBlock=268]="ModuleBlock",e[e.CaseBlock=269]="CaseBlock",e[e.NamespaceExportDeclaration=270]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=271]="ImportEqualsDeclaration",e[e.ImportDeclaration=272]="ImportDeclaration",e[e.ImportClause=273]="ImportClause",e[e.NamespaceImport=274]="NamespaceImport",e[e.NamedImports=275]="NamedImports",e[e.ImportSpecifier=276]="ImportSpecifier",e[e.ExportAssignment=277]="ExportAssignment",e[e.ExportDeclaration=278]="ExportDeclaration",e[e.NamedExports=279]="NamedExports",e[e.NamespaceExport=280]="NamespaceExport",e[e.ExportSpecifier=281]="ExportSpecifier",e[e.MissingDeclaration=282]="MissingDeclaration",e[e.ExternalModuleReference=283]="ExternalModuleReference",e[e.JsxElement=284]="JsxElement",e[e.JsxSelfClosingElement=285]="JsxSelfClosingElement",e[e.JsxOpeningElement=286]="JsxOpeningElement",e[e.JsxClosingElement=287]="JsxClosingElement",e[e.JsxFragment=288]="JsxFragment",e[e.JsxOpeningFragment=289]="JsxOpeningFragment",e[e.JsxClosingFragment=290]="JsxClosingFragment",e[e.JsxAttribute=291]="JsxAttribute",e[e.JsxAttributes=292]="JsxAttributes",e[e.JsxSpreadAttribute=293]="JsxSpreadAttribute",e[e.JsxExpression=294]="JsxExpression",e[e.JsxNamespacedName=295]="JsxNamespacedName",e[e.CaseClause=296]="CaseClause",e[e.DefaultClause=297]="DefaultClause",e[e.HeritageClause=298]="HeritageClause",e[e.CatchClause=299]="CatchClause",e[e.AssertClause=300]="AssertClause",e[e.AssertEntry=301]="AssertEntry",e[e.ImportTypeAssertionContainer=302]="ImportTypeAssertionContainer",e[e.PropertyAssignment=303]="PropertyAssignment",e[e.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",e[e.SpreadAssignment=305]="SpreadAssignment",e[e.EnumMember=306]="EnumMember",e[e.UnparsedPrologue=307]="UnparsedPrologue",e[e.UnparsedPrepend=308]="UnparsedPrepend",e[e.UnparsedText=309]="UnparsedText",e[e.UnparsedInternalText=310]="UnparsedInternalText",e[e.UnparsedSyntheticReference=311]="UnparsedSyntheticReference",e[e.SourceFile=312]="SourceFile",e[e.Bundle=313]="Bundle",e[e.UnparsedSource=314]="UnparsedSource",e[e.InputFiles=315]="InputFiles",e[e.JSDocTypeExpression=316]="JSDocTypeExpression",e[e.JSDocNameReference=317]="JSDocNameReference",e[e.JSDocMemberName=318]="JSDocMemberName",e[e.JSDocAllType=319]="JSDocAllType",e[e.JSDocUnknownType=320]="JSDocUnknownType",e[e.JSDocNullableType=321]="JSDocNullableType",e[e.JSDocNonNullableType=322]="JSDocNonNullableType",e[e.JSDocOptionalType=323]="JSDocOptionalType",e[e.JSDocFunctionType=324]="JSDocFunctionType",e[e.JSDocVariadicType=325]="JSDocVariadicType",e[e.JSDocNamepathType=326]="JSDocNamepathType",e[e.JSDoc=327]="JSDoc",e[e.JSDocComment=327]="JSDocComment",e[e.JSDocText=328]="JSDocText",e[e.JSDocTypeLiteral=329]="JSDocTypeLiteral",e[e.JSDocSignature=330]="JSDocSignature",e[e.JSDocLink=331]="JSDocLink",e[e.JSDocLinkCode=332]="JSDocLinkCode",e[e.JSDocLinkPlain=333]="JSDocLinkPlain",e[e.JSDocTag=334]="JSDocTag",e[e.JSDocAugmentsTag=335]="JSDocAugmentsTag",e[e.JSDocImplementsTag=336]="JSDocImplementsTag",e[e.JSDocAuthorTag=337]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=338]="JSDocDeprecatedTag",e[e.JSDocClassTag=339]="JSDocClassTag",e[e.JSDocPublicTag=340]="JSDocPublicTag",e[e.JSDocPrivateTag=341]="JSDocPrivateTag",e[e.JSDocProtectedTag=342]="JSDocProtectedTag",e[e.JSDocReadonlyTag=343]="JSDocReadonlyTag",e[e.JSDocOverrideTag=344]="JSDocOverrideTag",e[e.JSDocCallbackTag=345]="JSDocCallbackTag",e[e.JSDocOverloadTag=346]="JSDocOverloadTag",e[e.JSDocEnumTag=347]="JSDocEnumTag",e[e.JSDocParameterTag=348]="JSDocParameterTag",e[e.JSDocReturnTag=349]="JSDocReturnTag",e[e.JSDocThisTag=350]="JSDocThisTag",e[e.JSDocTypeTag=351]="JSDocTypeTag",e[e.JSDocTemplateTag=352]="JSDocTemplateTag",e[e.JSDocTypedefTag=353]="JSDocTypedefTag",e[e.JSDocSeeTag=354]="JSDocSeeTag",e[e.JSDocPropertyTag=355]="JSDocPropertyTag",e[e.JSDocThrowsTag=356]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=357]="JSDocSatisfiesTag",e[e.SyntaxList=358]="SyntaxList",e[e.NotEmittedStatement=359]="NotEmittedStatement",e[e.PartiallyEmittedExpression=360]="PartiallyEmittedExpression",e[e.CommaListExpression=361]="CommaListExpression",e[e.SyntheticReferenceExpression=362]="SyntheticReferenceExpression",e[e.Count=363]="Count",e[e.FirstAssignment=64]="FirstAssignment",e[e.LastAssignment=79]="LastAssignment",e[e.FirstCompoundAssignment=65]="FirstCompoundAssignment",e[e.LastCompoundAssignment=79]="LastCompoundAssignment",e[e.FirstReservedWord=83]="FirstReservedWord",e[e.LastReservedWord=118]="LastReservedWord",e[e.FirstKeyword=83]="FirstKeyword",e[e.LastKeyword=165]="LastKeyword",e[e.FirstFutureReservedWord=119]="FirstFutureReservedWord",e[e.LastFutureReservedWord=127]="LastFutureReservedWord",e[e.FirstTypeNode=182]="FirstTypeNode",e[e.LastTypeNode=205]="LastTypeNode",e[e.FirstPunctuation=19]="FirstPunctuation",e[e.LastPunctuation=79]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=165]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=9]="FirstLiteralToken",e[e.LastLiteralToken=15]="LastLiteralToken",e[e.FirstTemplateToken=15]="FirstTemplateToken",e[e.LastTemplateToken=18]="LastTemplateToken",e[e.FirstBinaryOperator=30]="FirstBinaryOperator",e[e.LastBinaryOperator=79]="LastBinaryOperator",e[e.FirstStatement=243]="FirstStatement",e[e.LastStatement=259]="LastStatement",e[e.FirstNode=166]="FirstNode",e[e.FirstJSDocNode=316]="FirstJSDocNode",e[e.LastJSDocNode=357]="LastJSDocNode",e[e.FirstJSDocTagNode=334]="FirstJSDocTagNode",e[e.LastJSDocTagNode=357]="LastJSDocTagNode",e[e.FirstContextualKeyword=128]="FirstContextualKeyword",e[e.LastContextualKeyword=165]="LastContextualKeyword",e))(ed||{}),td=(e=>(e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.AwaitUsing=6]="AwaitUsing",e[e.NestedNamespace=8]="NestedNamespace",e[e.Synthesized=16]="Synthesized",e[e.Namespace=32]="Namespace",e[e.OptionalChain=64]="OptionalChain",e[e.ExportContext=128]="ExportContext",e[e.ContainsThis=256]="ContainsThis",e[e.HasImplicitReturn=512]="HasImplicitReturn",e[e.HasExplicitReturn=1024]="HasExplicitReturn",e[e.GlobalAugmentation=2048]="GlobalAugmentation",e[e.HasAsyncFunctions=4096]="HasAsyncFunctions",e[e.DisallowInContext=8192]="DisallowInContext",e[e.YieldContext=16384]="YieldContext",e[e.DecoratorContext=32768]="DecoratorContext",e[e.AwaitContext=65536]="AwaitContext",e[e.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=262144]="ThisNodeHasError",e[e.JavaScriptFile=524288]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=2097152]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",e[e.JSDoc=16777216]="JSDoc",e[e.Ambient=33554432]="Ambient",e[e.InWithStatement=67108864]="InWithStatement",e[e.JsonFile=134217728]="JsonFile",e[e.TypeCached=268435456]="TypeCached",e[e.Deprecated=536870912]="Deprecated",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",e[e.ContextFlags=101441536]="ContextFlags",e[e.TypeExcludesFlags=81920]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",e))(td||{}),rd=(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.Accessor=128]="Accessor",e[e.Abstract=256]="Abstract",e[e.Async=512]="Async",e[e.Default=1024]="Default",e[e.Const=2048]="Const",e[e.HasComputedJSDocModifiers=4096]="HasComputedJSDocModifiers",e[e.Deprecated=8192]="Deprecated",e[e.Override=16384]="Override",e[e.In=32768]="In",e[e.Out=65536]="Out",e[e.Decorator=131072]="Decorator",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=28]="AccessibilityModifier",e[e.ParameterPropertyModifier=16476]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=24]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=117086]="TypeScriptModifier",e[e.ExportDefault=1025]="ExportDefault",e[e.All=258047]="All",e[e.Modifier=126975]="Modifier",e))(rd||{}),ly=(e=>(e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement",e))(ly||{}),nd=(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))(nd||{}),uy=(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))(uy||{}),py=(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.HexEscape=4096]="HexEscape",e[e.ContainsLeadingZero=8192]="ContainsLeadingZero",e[e.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.WithSpecifier=448]="WithSpecifier",e[e.StringLiteralFlags=7176]="StringLiteralFlags",e[e.NumericLiteralFlags=25584]="NumericLiteralFlags",e[e.TemplateLiteralLikeFlags=7176]="TemplateLiteralLikeFlags",e[e.IsInvalid=26656]="IsInvalid",e))(py||{}),bl=(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))(bl||{}),fy=(e=>(e[e.ExpectError=0]="ExpectError",e[e.Ignore=1]="Ignore",e))(fy||{}),id=class{},dy=(e=>(e[e.RootFile=0]="RootFile",e[e.SourceFromProjectReference=1]="SourceFromProjectReference",e[e.OutputFromProjectReference=2]="OutputFromProjectReference",e[e.Import=3]="Import",e[e.ReferenceFile=4]="ReferenceFile",e[e.TypeReferenceDirective=5]="TypeReferenceDirective",e[e.LibFile=6]="LibFile",e[e.LibReferenceDirective=7]="LibReferenceDirective",e[e.AutomaticTypeDirectiveFile=8]="AutomaticTypeDirectiveFile",e))(dy||{}),my=(e=>(e[e.FilePreprocessingReferencedDiagnostic=0]="FilePreprocessingReferencedDiagnostic",e[e.FilePreprocessingFileExplainingDiagnostic=1]="FilePreprocessingFileExplainingDiagnostic",e[e.ResolutionDiagnostics=2]="ResolutionDiagnostics",e))(my||{}),hy=(e=>(e[e.Js=0]="Js",e[e.Dts=1]="Dts",e))(hy||{}),yy=(e=>(e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely",e))(yy||{}),gy=(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))(gy||{}),by=(e=>(e[e.Ok=0]="Ok",e[e.NeedsOverride=1]="NeedsOverride",e[e.HasInvalidOverride=2]="HasInvalidOverride",e))(by||{}),vy=(e=>(e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype",e))(vy||{}),Ty=(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))(Ty||{}),Sy=(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.OmitThisParameter=33554432]="OmitThisParameter",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",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.WriteComputedProps=1073741824]="WriteComputedProps",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))(Sy||{}),xy=(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.OmitThisParameter=33554432]="OmitThisParameter",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.NodeBuilderFlagsMask=848330091]="NodeBuilderFlagsMask",e))(xy||{}),wy=(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.WriteComputedProps=16]="WriteComputedProps",e[e.DoNotIncludeSymbolChain=32]="DoNotIncludeSymbolChain",e))(wy||{}),Cy=(e=>(e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed",e))(Cy||{}),Ey=(e=>(e[e.UnionOrIntersection=0]="UnionOrIntersection",e[e.Spread=1]="Spread",e))(Ey||{}),Ay=(e=>(e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier",e))(Ay||{}),ky=(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))(ky||{}),ad=(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.AccessorExcludes=13247]="AccessorExcludes",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))(ad||{}),Dy=(e=>(e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal",e))(Dy||{}),Py=(e=>(e[e.None=0]="None",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.Unresolved=1048576]="Unresolved",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=192]="Discriminant",e[e.Partial=48]="Partial",e))(Py||{}),Iy=(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))(Iy||{}),Ny=(e=>(e[e.None=0]="None",e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",e[e.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",e[e.CaptureArguments=512]="CaptureArguments",e[e.EnumValuesComputed=1024]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",e[e.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",e[e.AssignmentsMarked=131072]="AssignmentsMarked",e[e.ContainsConstructorReference=262144]="ContainsConstructorReference",e[e.ConstructorReference=536870912]="ConstructorReference",e[e.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",e[e.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",e[e.InCheckIdentifier=4194304]="InCheckIdentifier",e))(Ny||{}),od=(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=109472]="Unit",e[e.Freshable=2976]="Freshable",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.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.Primitive=402784252]="Primitive",e[e.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",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=138117121]="ObjectFlagsType",e[e.Simplifiable=25165824]="Simplifiable",e[e.Singleton=67358815]="Singleton",e[e.Narrowable=536624127]="Narrowable",e[e.IncludesMask=473694207]="IncludesMask",e[e.IncludesMissingType=262144]="IncludesMissingType",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject",e[e.IncludesInstantiable=33554432]="IncludesInstantiable",e[e.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",e))(od||{}),sd=(e=>(e[e.None=0]="None",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.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.ObjectTypeKindMask=1343]="ObjectTypeKindMask",e[e.ContainsSpread=2097152]="ContainsSpread",e[e.ObjectRestType=4194304]="ObjectRestType",e[e.InstantiationExpressionType=8388608]="InstantiationExpressionType",e[e.IsClassInstanceClone=16777216]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",e[e.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",e[e.IsGenericObjectType=4194304]="IsGenericObjectType",e[e.IsGenericIndexType=8388608]="IsGenericIndexType",e[e.IsGenericType=12582912]="IsGenericType",e[e.ContainsIntersections=16777216]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=33554432]="IsNeverIntersection",e))(sd||{}),Oy=(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))(Oy||{}),My=(e=>(e[e.Required=1]="Required",e[e.Optional=2]="Optional",e[e.Rest=4]="Rest",e[e.Variadic=8]="Variadic",e[e.Fixed=3]="Fixed",e[e.Variable=12]="Variable",e[e.NonRequired=14]="NonRequired",e[e.NonRest=11]="NonRest",e))(My||{}),Ly=(e=>(e[e.None=0]="None",e[e.IncludeUndefined=1]="IncludeUndefined",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.Writing=4]="Writing",e[e.CacheSymbol=8]="CacheSymbol",e[e.NoTupleBoundsCheck=16]="NoTupleBoundsCheck",e[e.ExpressionPosition=32]="ExpressionPosition",e[e.ReportDeprecated=64]="ReportDeprecated",e[e.SuppressNoImplicitAnyError=128]="SuppressNoImplicitAnyError",e[e.Contextual=256]="Contextual",e[e.Persistent=1]="Persistent",e))(Ly||{}),Jy=(e=>(e[e.None=0]="None",e[e.StringsOnly=1]="StringsOnly",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.NoReducibleCheck=4]="NoReducibleCheck",e))(Jy||{}),Ry=(e=>(e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed",e))(Ry||{}),jy=(e=>(e[e.Call=0]="Call",e[e.Construct=1]="Construct",e))(jy||{}),_d=(e=>(e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Abstract=4]="Abstract",e[e.IsInnerCallChain=8]="IsInnerCallChain",e[e.IsOuterCallChain=16]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=64]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=167]="PropagatingFlags",e[e.CallChainFlags=24]="CallChainFlags",e))(_d||{}),Fy=(e=>(e[e.String=0]="String",e[e.Number=1]="Number",e))(Fy||{}),By=(e=>(e[e.Simple=0]="Simple",e[e.Array=1]="Array",e[e.Deferred=2]="Deferred",e[e.Function=3]="Function",e[e.Composite=4]="Composite",e[e.Merged=5]="Merged",e))(By||{}),Uy=(e=>(e[e.None=0]="None",e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.SpeculativeTuple=2]="SpeculativeTuple",e[e.SubstituteSource=4]="SubstituteSource",e[e.HomomorphicMappedType=8]="HomomorphicMappedType",e[e.PartialHomomorphicMappedType=16]="PartialHomomorphicMappedType",e[e.MappedTypeConstraint=32]="MappedTypeConstraint",e[e.ContravariantConditional=64]="ContravariantConditional",e[e.ReturnType=128]="ReturnType",e[e.LiteralKeyof=256]="LiteralKeyof",e[e.NoConstraints=512]="NoConstraints",e[e.AlwaysStrict=1024]="AlwaysStrict",e[e.MaxValue=2048]="MaxValue",e[e.PriorityImpliesCombination=416]="PriorityImpliesCombination",e[e.Circularity=-1]="Circularity",e))(Uy||{}),qy=(e=>(e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction",e))(qy||{}),zy=(e=>(e[e.False=0]="False",e[e.Unknown=1]="Unknown",e[e.Maybe=3]="Maybe",e[e.True=-1]="True",e))(zy||{}),Wy=(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))(Wy||{}),cd=(e=>(e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message",e))(cd||{}),Vy=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e[e.Node10=2]="Node10",e[e.Node16=3]="Node16",e[e.NodeNext=99]="NodeNext",e[e.Bundler=100]="Bundler",e))(Vy||{}),Hy=(e=>(e[e.Legacy=1]="Legacy",e[e.Auto=2]="Auto",e[e.Force=3]="Force",e))(Hy||{}),Gy=(e=>(e[e.FixedPollingInterval=0]="FixedPollingInterval",e[e.PriorityPollingInterval=1]="PriorityPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e[e.UseFsEvents=4]="UseFsEvents",e[e.UseFsEventsOnParentDirectory=5]="UseFsEventsOnParentDirectory",e))(Gy||{}),Xy=(e=>(e[e.UseFsEvents=0]="UseFsEvents",e[e.FixedPollingInterval=1]="FixedPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e))(Xy||{}),$y=(e=>(e[e.FixedInterval=0]="FixedInterval",e[e.PriorityInterval=1]="PriorityInterval",e[e.DynamicPriority=2]="DynamicPriority",e[e.FixedChunkSize=3]="FixedChunkSize",e))($y||{}),Qy=(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.ES2022=7]="ES2022",e[e.ESNext=99]="ESNext",e[e.Node16=100]="Node16",e[e.NodeNext=199]="NodeNext",e))(Qy||{}),Yy=(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))(Yy||{}),Ky=(e=>(e[e.Remove=0]="Remove",e[e.Preserve=1]="Preserve",e[e.Error=2]="Error",e))(Ky||{}),Zy=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(Zy||{}),ld=(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))(ld||{}),e0=(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.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(e0||{}),t0=(e=>(e[e.Standard=0]="Standard",e[e.JSX=1]="JSX",e))(t0||{}),r0=(e=>(e[e.None=0]="None",e[e.Recursive=1]="Recursive",e))(r0||{}),n0=(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.replacementCharacter=65533]="replacementCharacter",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))(n0||{}),i0=(e=>(e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo",e.Mjs=".mjs",e.Mts=".mts",e.Dmts=".d.mts",e.Cjs=".cjs",e.Cts=".cts",e.Dcts=".d.cts",e))(i0||{}),ud=(e=>(e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2022=8]="ContainsES2022",e[e.ContainsES2021=16]="ContainsES2021",e[e.ContainsES2020=32]="ContainsES2020",e[e.ContainsES2019=64]="ContainsES2019",e[e.ContainsES2018=128]="ContainsES2018",e[e.ContainsES2017=256]="ContainsES2017",e[e.ContainsES2016=512]="ContainsES2016",e[e.ContainsES2015=1024]="ContainsES2015",e[e.ContainsGenerator=2048]="ContainsGenerator",e[e.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=16384]="ContainsLexicalThis",e[e.ContainsRestOrSpread=32768]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=524288]="ContainsBindingPattern",e[e.ContainsYield=1048576]="ContainsYield",e[e.ContainsAwait=2097152]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=8388608]="ContainsDynamicImport",e[e.ContainsClassFields=16777216]="ContainsClassFields",e[e.ContainsDecorators=33554432]="ContainsDecorators",e[e.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",e[e.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",e[e.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",e[e.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",e[e.HasComputedFlags=-2147483648]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2022=8]="AssertES2022",e[e.AssertES2021=16]="AssertES2021",e[e.AssertES2020=32]="AssertES2020",e[e.AssertES2019=64]="AssertES2019",e[e.AssertES2018=128]="AssertES2018",e[e.AssertES2017=256]="AssertES2017",e[e.AssertES2016=512]="AssertES2016",e[e.AssertES2015=1024]="AssertES2015",e[e.AssertGenerator=2048]="AssertGenerator",e[e.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",e[e.NodeExcludes=-2147483648]="NodeExcludes",e[e.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",e[e.FunctionExcludes=-1937940480]="FunctionExcludes",e[e.ConstructorExcludes=-1937948672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",e[e.PropertyExcludes=-2013249536]="PropertyExcludes",e[e.ClassExcludes=-2147344384]="ClassExcludes",e[e.ModuleExcludes=-1941676032]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",e[e.ParameterExcludes=-2147483648]="ParameterExcludes",e[e.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",e[e.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",e[e.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",e[e.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",e))(ud||{}),pd=(e=>(e[e.TabStop=0]="TabStop",e[e.Placeholder=1]="Placeholder",e[e.Choice=2]="Choice",e[e.Variable=3]="Variable",e))(pd||{}),fd=(e=>(e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.MultiLine=2]="MultiLine",e[e.AdviseOnEmitNode=4]="AdviseOnEmitNode",e[e.NoSubstitution=8]="NoSubstitution",e[e.CapturesThis=16]="CapturesThis",e[e.NoLeadingSourceMap=32]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=64]="NoTrailingSourceMap",e[e.NoSourceMap=96]="NoSourceMap",e[e.NoNestedSourceMaps=128]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=768]="NoTokenSourceMaps",e[e.NoLeadingComments=1024]="NoLeadingComments",e[e.NoTrailingComments=2048]="NoTrailingComments",e[e.NoComments=3072]="NoComments",e[e.NoNestedComments=4096]="NoNestedComments",e[e.HelperName=8192]="HelperName",e[e.ExportName=16384]="ExportName",e[e.LocalName=32768]="LocalName",e[e.InternalName=65536]="InternalName",e[e.Indented=131072]="Indented",e[e.NoIndentation=262144]="NoIndentation",e[e.AsyncFunctionBody=524288]="AsyncFunctionBody",e[e.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",e[e.CustomPrologue=2097152]="CustomPrologue",e[e.NoHoisting=4194304]="NoHoisting",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e))(fd||{}),a0=(e=>(e[e.None=0]="None",e[e.TypeScriptClassWrapper=1]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=2]="NeverApplyImportHelper",e[e.IgnoreSourceNewlines=4]="IgnoreSourceNewlines",e[e.Immutable=8]="Immutable",e[e.IndirectCall=16]="IndirectCall",e[e.TransformPrivateStaticElements=32]="TransformPrivateStaticElements",e))(a0||{}),o0=(e=>(e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.ESDecorateAndRunInitializers=8]="ESDecorateAndRunInitializers",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.SpreadArray=1024]="SpreadArray",e[e.Await=2048]="Await",e[e.AsyncGenerator=4096]="AsyncGenerator",e[e.AsyncDelegator=8192]="AsyncDelegator",e[e.AsyncValues=16384]="AsyncValues",e[e.ExportStar=32768]="ExportStar",e[e.ImportStar=65536]="ImportStar",e[e.ImportDefault=131072]="ImportDefault",e[e.MakeTemplateObject=262144]="MakeTemplateObject",e[e.ClassPrivateFieldGet=524288]="ClassPrivateFieldGet",e[e.ClassPrivateFieldSet=1048576]="ClassPrivateFieldSet",e[e.ClassPrivateFieldIn=2097152]="ClassPrivateFieldIn",e[e.CreateBinding=4194304]="CreateBinding",e[e.SetFunctionName=8388608]="SetFunctionName",e[e.PropKey=16777216]="PropKey",e[e.AddDisposableResourceAndDisposeResources=33554432]="AddDisposableResourceAndDisposeResources",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=33554432]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=16384]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=6144]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=26624]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes",e))(o0||{}),s0=(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))(s0||{}),_0=(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[e.ExcludeJSDocTypeAssertion=16]="ExcludeJSDocTypeAssertion",e))(_0||{}),c0=(e=>(e[e.None=0]="None",e[e.InParameters=1]="InParameters",e[e.VariablesHoistedInParameters=2]="VariablesHoistedInParameters",e))(c0||{}),l0=(e=>(e.Prologue="prologue",e.EmitHelpers="emitHelpers",e.NoDefaultLib="no-default-lib",e.Reference="reference",e.Type="type",e.TypeResolutionModeRequire="type-require",e.TypeResolutionModeImport="type-import",e.Lib="lib",e.Prepend="prepend",e.Text="text",e.Internal="internal",e))(l0||{}),u0=(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=2359808]="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.ImportClauseEntries=526226]="ImportClauseEntries",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))(u0||{}),p0=(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))(p0||{}),qd={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},{name:"resolution-mode",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}}}}),SE=()=>{},f0;function dg(e){return e===47||e===92}function xE(e){return Jl(e)<0}function v_(e){return Jl(e)>0}function wE(e){let t=Jl(e);return t>0&&t===e.length}function mg(e){return Jl(e)!==0}function rs(e){return/^\.\.?($|[\\/])/.test(e)}function CE(e){return!mg(e)&&!rs(e)}function Qv(e){return eo(T_(e),".")}function La(e,t){return e.length>t.length&&ts(e,t)}function ei(e,t){for(let r of t)if(La(e,r))return!0;return!1}function zd(e){return e.length>0&&dg(e.charCodeAt(e.length-1))}function Jb(e){return e>=97&&e<=122||e>=65&&e<=90}function EE(e,t){let r=e.charCodeAt(t);if(r===58)return t+1;if(r===37&&e.charCodeAt(t+1)===51){let a=e.charCodeAt(t+2);if(a===97||a===65)return t+3}return-1}function Jl(e){if(!e)return 0;let t=e.charCodeAt(0);if(t===47||t===92){if(e.charCodeAt(1)!==t)return 1;let a=e.indexOf(t===47?fn:vg,2);return a<0?e.length:a+1}if(Jb(t)&&e.charCodeAt(1)===58){let a=e.charCodeAt(2);if(a===47||a===92)return 3;if(e.length===2)return 2}let r=e.indexOf(m0);if(r!==-1){let a=r+m0.length,_=e.indexOf(fn,a);if(_!==-1){let p=e.slice(0,r),d=e.slice(a,_);if(p==="file"&&(d===""||d==="localhost")&&Jb(e.charCodeAt(_+1))){let h=EE(e,_+2);if(h!==-1){if(e.charCodeAt(h)===47)return~(h+1);if(h===e.length)return~h}}return~(_+1)}return~e.length}return 0}function Ei(e){let t=Jl(e);return t<0?~t:t}function $i(e){e=qo(e);let t=Ei(e);return t===e.length?e:(e=S_(e),e.slice(0,Math.max(t,e.lastIndexOf(fn))))}function T_(e,t,r){if(e=qo(e),Ei(e)===e.length)return"";e=S_(e);let _=e.slice(Math.max(Ei(e),e.lastIndexOf(fn)+1)),p=t!==void 0&&r!==void 0?dd(_,t,r):void 0;return p?_.slice(0,_.length-p.length):_}function Rb(e,t,r){if(Fr(t,".")||(t="."+t),e.length>=t.length&&e.charCodeAt(e.length-t.length)===46){let a=e.slice(e.length-t.length);if(r(a,t))return a}}function AE(e,t,r){if(typeof t=="string")return Rb(e,t,r)||"";for(let a of t){let _=Rb(e,a,r);if(_)return _}return""}function dd(e,t,r){if(t)return AE(S_(e),t,r?s_:Ll);let a=T_(e),_=a.lastIndexOf(".");return _>=0?a.substring(_):""}function kE(e,t){let r=e.substring(0,t),a=e.substring(t).split(fn);return a.length&&!wi(a)&&a.pop(),[r,...a]}function Ai(e,t=""){return e=hr(t,e),kE(e,Ei(e))}function Uo(e,t){return e.length===0?"":(e[0]&&zo(e[0]))+e.slice(1,t).join(fn)}function qo(e){return e.indexOf("\\")!==-1?e.replace(t4,fn):e}function Da(e){if(!mt(e))return[];let t=[e[0]];for(let r=1;r1){if(t[t.length-1]!==".."){t.pop();continue}}else if(t[0])continue}t.push(a)}}return t}function hr(e,...t){e&&(e=qo(e));for(let r of t)r&&(r=qo(r),!e||Ei(r)!==0?e=r:e=zo(e)+r);return e}function d0(e,...t){return pn(mt(t)?hr(e,...t):qo(e))}function Wd(e,t){return Da(Ai(e,t))}function Pa(e,t){return Uo(Wd(e,t))}function pn(e){if(e=qo(e),!vl.test(e))return e;let t=e.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(t!==e&&(e=t,!vl.test(e)))return e;let r=Uo(Da(Ai(e)));return r&&zd(e)?zo(r):r}function DE(e){return e.length===0?"":e.slice(1).join(fn)}function PE(e,t){return DE(Wd(e,t))}function xi(e,t,r){let a=v_(e)?pn(e):Pa(e,t);return r(a)}function S_(e){return zd(e)?e.substr(0,e.length-1):e}function zo(e){return zd(e)?e:e+fn}function hg(e){return!mg(e)&&!rs(e)?"./"+e:e}function Yv(e,t,r,a){let _=r!==void 0&&a!==void 0?dd(e,r,a):dd(e);return _?e.slice(0,e.length-_.length)+(Fr(t,".")?t:"."+t):e}function yg(e,t,r){if(e===t)return 0;if(e===void 0)return-1;if(t===void 0)return 1;let a=e.substring(0,Ei(e)),_=t.substring(0,Ei(t)),p=Fd(a,_);if(p!==0)return p;let d=e.substring(a.length),h=t.substring(_.length);if(!vl.test(d)&&!vl.test(h))return r(d,h);let l=Da(Ai(e)),v=Da(Ai(t)),y=Math.min(l.length,v.length);for(let C=1;C0==Ei(t)>0,"Paths must either both be absolute or both be relative");let p=gg(e,t,(typeof r=="boolean"?r:!1)?s_:Ll,typeof r=="function"?r:bt);return Uo(p)}function LE(e,t,r){return v_(e)?bg(t,e,t,r,!1):e}function JE(e,t,r){return hg(Zv($i(e),t,r))}function bg(e,t,r,a,_){let p=gg(d0(r,e),d0(r,t),Ll,a),d=p[0];if(_&&v_(d)){let h=d.charAt(0)===fn?"file://":"file:///";p[0]=h+d}return Uo(p)}function e4(e,t){for(;;){let r=t(e);if(r!==void 0)return r;let a=$i(e);if(a===e)return;e=a}}function RE(e){return ts(e,"/node_modules")}var fn,vg,m0,t4,vl,r4=Vt({"src/compiler/path.ts"(){"use strict";Dr(),fn="/",vg="\\",m0="://",t4=/\\/g,vl=/(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/}});function i(e,t,r,a,_,p,d){return{code:e,category:t,key:r,message:a,reportsUnnecessary:_,elidedInCompatabilityPyramid:p,reportsDeprecated:d}}var U,jE=Vt({"src/compiler/diagnosticInformationMap.generated.ts"(){"use strict";$v(),U={Unterminated_string_literal:i(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:i(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:i(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:i(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:i(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:i(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:i(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:i(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:i(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:i(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:i(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:i(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:i(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:i(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:i(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:i(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:i(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:i(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:i(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:i(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:i(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:i(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:i(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:i(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:i(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:i(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:i(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:i(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:i(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:i(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:i(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:i(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:i(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:i(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:i(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:i(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:i(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:i(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:i(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:i(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:i(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:i(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055","Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:i(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:i(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:i(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:i(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:i(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:i(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:i(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:i(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:i(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:i(1066,1,"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:i(1068,1,"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:i(1069,1,"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:i(1070,1,"_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:i(1071,1,"_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:i(1079,1,"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:i(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:i(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:i(1090,1,"_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:i(1091,1,"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:i(1092,1,"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:i(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:i(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:i(1095,1,"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:i(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:i(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:i(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:i(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:i(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:i(1101,1,"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:i(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:i(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:i(1104,1,"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:i(1105,1,"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."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:i(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:i(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:i(1108,1,"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:i(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:i(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:i(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:i(1113,1,"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:i(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:i(1115,1,"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:i(1116,1,"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:i(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:i(1118,1,"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:i(1119,1,"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:i(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:i(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:i(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:i(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:i(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:i(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:i(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:i(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:i(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:i(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:i(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:i(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:i(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:i(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:i(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:i(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:i(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:i(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:i(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:i(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:i(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:i(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:i(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:i(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:i(1147,1,"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:i(1148,1,"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:i(1149,1,"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."),_0_declarations_must_be_initialized:i(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:i(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:i(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:i(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:i(1162,1,"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:i(1163,1,"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:i(1164,1,"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:i(1165,1,"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_have_a_simple_literal_type_or_a_unique_symbol_type:i(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple 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:i(1168,1,"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:i(1169,1,"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:i(1170,1,"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:i(1171,1,"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:i(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:i(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:i(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:i(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:i(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:i(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:i(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:i(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:i(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:i(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:i(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:i(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:i(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:i(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:i(1186,1,"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:i(1187,1,"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:i(1188,1,"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:i(1189,1,"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:i(1190,1,"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:i(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:i(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:i(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:i(1194,1,"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:i(1195,1,"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:i(1196,1,"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:i(1197,1,"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:i(1198,1,"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:i(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:i(1200,1,"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:i(1202,1,"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:i(1203,1,"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_0_is_enabled_requires_using_export_type:i(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:i(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:i(1207,1,"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."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:i(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:i(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:i(1211,1,"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:i(1212,1,"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:i(1213,1,"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:i(1214,1,"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:i(1215,1,"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:i(1216,1,"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:i(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:i(1221,1,"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:i(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:i(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:i(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:i(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:i(1226,1,"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:i(1227,1,"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:i(1228,1,"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:i(1229,1,"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:i(1230,1,"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_must_be_at_the_top_level_of_a_file_or_module_declaration:i(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:i(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:i(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:i(1234,1,"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_at_the_top_level_of_a_namespace_or_module:i(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:i(1236,1,"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:i(1237,1,"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:i(1238,1,"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:i(1239,1,"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:i(1240,1,"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:i(1241,1,"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:i(1242,1,"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:i(1243,1,"_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:i(1244,1,"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:i(1245,1,"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:i(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:i(1247,1,"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:i(1248,1,"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:i(1249,1,"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:i(1250,1,"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:i(1251,1,"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:i(1252,1,"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."),Abstract_properties_can_only_appear_within_an_abstract_class:i(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:i(1254,1,"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:i(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:i(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:i(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:i(1259,1,"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:i(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:i(1261,1,"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:i(1262,1,"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:i(1263,1,"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:i(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:i(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:i(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:i(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:i(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:i(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:i(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:i(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:i(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:i(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:i(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:i(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:i(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:i(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:i(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:i(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:i(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:i(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:i(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:i(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:i(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:i(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:i(1286,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286","ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:i(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:i(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),with_statements_are_not_allowed_in_an_async_function_block:i(1300,1,"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:i(1308,1,"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."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:i(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),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:i(1312,1,"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:i(1313,1,"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:i(1314,1,"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:i(1315,1,"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:i(1316,1,"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:i(1317,1,"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:i(1318,1,"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:i(1319,1,"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:i(1320,1,"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:i(1321,1,"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:i(1322,1,"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_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext:i(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext:i(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."),Argument_of_dynamic_import_cannot_be_spread_element:i(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:i(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:i(1327,1,"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:i(1328,1,"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:i(1329,1,"_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:i(1330,1,"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:i(1331,1,"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:i(1332,1,"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:i(1333,1,"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:i(1334,1,"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:i(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:i(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:i(1338,1,"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:i(1339,1,"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:i(1340,1,"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}')'?"),Class_constructor_may_not_be_an_accessor:i(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext:i(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),A_label_is_not_allowed_here:i(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:i(1345,1,"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:i(1346,1,"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:i(1347,1,"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:i(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:i(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:i(1350,3,"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:i(1351,1,"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:i(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:i(1353,1,"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:i(1354,1,"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:i(1355,1,"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:i(1356,1,"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:i(1357,1,"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:i(1358,1,"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:i(1359,1,"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."),Type_0_does_not_satisfy_the_expected_type_1:i(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:i(1361,1,"_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:i(1362,1,"_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:i(1363,1,"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:i(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:i(1365,3,"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:i(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:i(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:i(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:i(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error:i(1371,1,"This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371","This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."),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:i(1375,1,"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:i(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:i(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:i(1379,1,"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:i(1380,1,"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:i(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:i(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:i(1385,1,"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:i(1386,1,"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:i(1387,1,"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:i(1388,1,"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:i(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:i(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:i(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:i(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:i(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:i(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:i(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:i(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:i(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:i(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:i(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:i(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:i(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:i(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:i(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:i(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:i(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:i(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:i(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:i(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:i(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:i(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:i(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:i(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:i(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:i(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:i(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:i(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:i(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:i(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:i(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:i(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:i(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:i(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:i(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:i(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:i(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:i(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:i(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:i(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:i(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_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:i(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops 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."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:i(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:i(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:i(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:i(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:i(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:i(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:i(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:i(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:i(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:i(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:i(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443",`Module declaration names may only use ' or " quoted strings.`),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled:i(1444,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444","'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled:i(1446,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:i(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:i(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments:i(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional assertion as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:i(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext:i(1452,1,"resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452","'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."),resolution_mode_should_be_either_require_or_import:i(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:i(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:i(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:i(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:i(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:i(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",`File is ECMAScript module because '{0}' has field "type" with value "module"`),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:i(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",`File is CommonJS module because '{0}' has field "type" whose value is not "module"`),File_is_CommonJS_module_because_0_does_not_have_field_type:i(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460",`File is CommonJS module because '{0}' does not have field "type"`),File_is_CommonJS_module_because_package_json_was_not_found:i(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:i(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:i(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:i(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:i(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:i(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:i(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:i(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:i(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:i(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:i(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479",`The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:i(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:i(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481",`To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:i(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:i(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:i(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:i(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:i(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:i(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:i(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:i(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:i(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:i(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:i(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:i(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:i(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:i(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),The_types_of_0_are_incompatible_between_these_types:i(2200,1,"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:i(2201,1,"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:i(2202,1,"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:i(2203,1,"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:i(2204,1,"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:i(2205,1,"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),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:i(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:i(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:i(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:i(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:i(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:i(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:i(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:i(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:i(2301,1,"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:i(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:i(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:i(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:i(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:i(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:i(2307,1,"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:i(2308,1,"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:i(2309,1,"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:i(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:i(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:i(2312,1,"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:i(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:i(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:i(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:i(2316,1,"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:i(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:i(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:i(2319,1,"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:i(2320,1,"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:i(2321,1,"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:i(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:i(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:i(2324,1,"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:i(2325,1,"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:i(2326,1,"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:i(2327,1,"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:i(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:i(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:i(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:i(2331,1,"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:i(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_constructor_arguments:i(2333,1,"this_cannot_be_referenced_in_constructor_arguments_2333","'this' cannot be referenced in constructor arguments."),this_cannot_be_referenced_in_a_static_property_initializer:i(2334,1,"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:i(2335,1,"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:i(2336,1,"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:i(2337,1,"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:i(2338,1,"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:i(2339,1,"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:i(2340,1,"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:i(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:i(2343,1,"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:i(2344,1,"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:i(2345,1,"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}'."),Untyped_function_calls_may_not_accept_type_arguments:i(2347,1,"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:i(2348,1,"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:i(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:i(2350,1,"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:i(2351,1,"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:i(2352,1,"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:i(2353,1,"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:i(2354,1,"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_undefined_void_nor_any_must_return_a_value:i(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:i(2356,1,"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:i(2357,1,"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:i(2358,1,"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:i(2359,1,"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_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:i(2362,1,"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:i(2363,1,"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:i(2364,1,"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:i(2365,1,"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:i(2366,1,"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_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:i(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:i(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:i(2369,1,"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:i(2370,1,"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:i(2371,1,"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:i(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:i(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:i(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:i(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:i(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:i(2377,1,"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:i(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:i(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:i(2383,1,"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:i(2384,1,"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:i(2385,1,"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:i(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:i(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:i(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:i(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:i(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:i(2391,1,"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:i(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:i(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:i(2394,1,"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:i(2395,1,"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:i(2396,1,"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:i(2397,1,"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:i(2398,1,"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:i(2399,1,"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:i(2400,1,"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."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:i(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:i(2402,1,"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:i(2403,1,"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:i(2404,1,"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:i(2405,1,"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:i(2406,1,"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:i(2407,1,"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:i(2408,1,"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:i(2409,1,"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:i(2410,1,"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'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:i(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:i(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:i(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:i(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:i(2415,1,"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:i(2416,1,"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:i(2417,1,"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:i(2418,1,"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:i(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:i(2420,1,"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:i(2422,1,"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:i(2423,1,"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:i(2425,1,"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:i(2426,1,"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:i(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:i(2428,1,"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:i(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:i(2431,1,"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:i(2432,1,"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:i(2433,1,"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:i(2434,1,"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:i(2435,1,"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:i(2436,1,"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:i(2437,1,"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:i(2438,1,"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:i(2439,1,"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:i(2440,1,"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:i(2441,1,"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:i(2442,1,"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:i(2443,1,"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:i(2444,1,"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:i(2445,1,"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_This_is_an_instance_of_class_2:i(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:i(2447,1,"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:i(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:i(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:i(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:i(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:i(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:i(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:i(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:i(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:i(2458,1,"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:i(2459,1,"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:i(2460,1,"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:i(2461,1,"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:i(2462,1,"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:i(2463,1,"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:i(2464,1,"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:i(2465,1,"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:i(2466,1,"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:i(2467,1,"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:i(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:i(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:i(2472,1,"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:i(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:i(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),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:i(2475,1,"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:i(2476,1,"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:i(2477,1,"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:i(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:i(2480,1,"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:i(2481,1,"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:i(2483,1,"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:i(2484,1,"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:i(2487,1,"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:i(2488,1,"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:i(2489,1,"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:i(2490,1,"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:i(2491,1,"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:i(2492,1,"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:i(2493,1,"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:i(2494,1,"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:i(2495,1,"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:i(2496,1,"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:i(2497,1,"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:i(2498,1,"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:i(2499,1,"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:i(2500,1,"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:i(2501,1,"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:i(2502,1,"_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:i(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:i(2504,1,"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:i(2505,1,"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:i(2506,1,"_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:i(2507,1,"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:i(2508,1,"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:i(2509,1,"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:i(2510,1,"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:i(2511,1,"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:i(2512,1,"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:i(2513,1,"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."),A_tuple_type_cannot_be_indexed_with_a_negative_value:i(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:i(2515,1,"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:i(2516,1,"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:i(2517,1,"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:i(2518,1,"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:i(2519,1,"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:i(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' 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:i(2522,1,"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:i(2523,1,"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:i(2524,1,"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:i(2525,1,"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:i(2526,1,"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:i(2527,1,"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:i(2528,1,"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:i(2529,1,"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:i(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:i(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:i(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:i(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:i(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:i(2536,1,"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:i(2537,1,"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:i(2538,1,"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:i(2539,1,"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:i(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:i(2542,1,"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:i(2543,1,"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:i(2544,1,"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:i(2545,1,"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:i(2547,1,"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:i(2548,1,"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:i(2549,1,"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:i(2550,1,"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:i(2551,1,"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:i(2552,1,"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:i(2553,1,"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:i(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:i(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:i(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:i(2558,1,"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:i(2559,1,"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:i(2560,1,"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:i(2561,1,"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:i(2562,1,"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:i(2563,1,"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:i(2564,1,"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:i(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:i(2566,1,"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:i(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:i(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:i(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:i(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:i(2574,1,"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:i(2575,1,"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_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:i(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:i(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:i(2578,1,"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:i(2580,1,"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:i(2581,1,"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:i(2582,1,"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:i(2583,1,"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:i(2584,1,"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:i(2585,1,"_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."),Cannot_assign_to_0_because_it_is_a_constant:i(2588,1,"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:i(2589,1,"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:i(2590,1,"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:i(2591,1,"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:i(2592,1,"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:i(2593,1,"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_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:i(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with '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:i(2595,1,"_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:i(2596,1,"_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:i(2597,1,"_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:i(2598,1,"_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_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:i(2602,1,"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:i(2603,1,"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:i(2604,1,"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."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:i(2606,1,"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:i(2607,1,"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:i(2608,1,"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:i(2609,1,"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:i(2610,1,"_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:i(2611,1,"_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:i(2612,1,"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:i(2613,1,"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:i(2614,1,"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:i(2615,1,"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:i(2616,1,"_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:i(2617,1,"_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:i(2618,1,"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:i(2619,1,"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:i(2620,1,"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:i(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:i(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:i(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:i(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:i(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:i(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:i(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:i(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:i(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:i(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:i(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:i(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:i(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:i(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:i(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:i(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:i(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:i(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:i(2649,1,"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:i(2651,1,"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:i(2652,1,"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:i(2653,1,"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}'."),JSX_expressions_must_have_one_parent_element:i(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:i(2658,1,"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:i(2659,1,"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:i(2660,1,"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:i(2661,1,"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:i(2662,1,"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:i(2663,1,"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:i(2664,1,"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:i(2665,1,"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:i(2666,1,"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:i(2667,1,"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:i(2668,1,"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:i(2669,1,"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:i(2670,1,"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:i(2671,1,"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:i(2672,1,"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:i(2673,1,"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:i(2674,1,"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:i(2675,1,"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:i(2676,1,"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:i(2677,1,"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:i(2678,1,"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:i(2679,1,"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:i(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:i(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:i(2683,1,"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:i(2684,1,"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:i(2685,1,"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:i(2686,1,"_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:i(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:i(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:i(2689,1,"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:i(2690,1,"_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}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:i(2692,1,"_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:i(2693,1,"_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:i(2694,1,"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:i(2695,1,"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:i(2696,1,"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:i(2697,1,"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:i(2698,1,"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:i(2699,1,"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:i(2700,1,"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:i(2701,1,"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:i(2702,1,"_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:i(2703,1,"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:i(2704,1,"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:i(2705,1,"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:i(2706,1,"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:i(2707,1,"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:i(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:i(2709,1,"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:i(2710,1,"_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:i(2711,1,"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:i(2712,1,"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:i(2713,1,"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:i(2714,1,"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:i(2715,1,"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:i(2716,1,"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:i(2717,1,"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:i(2718,1,"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:i(2719,1,"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:i(2720,1,"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:i(2721,1,"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:i(2722,1,"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:i(2723,1,"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:i(2724,1,"_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:i(2725,1,"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:i(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:i(2727,1,"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:i(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:i(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:i(2730,1,"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:i(2731,1,"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:i(2732,1,"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:i(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:i(2734,1,"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:i(2735,1,"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:i(2736,1,"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:i(2737,1,"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:i(2738,3,"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:i(2739,1,"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:i(2740,1,"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:i(2741,1,"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:i(2742,1,"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:i(2743,1,"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:i(2744,1,"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:i(2745,1,"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:i(2746,1,"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:i(2747,1,"_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_0_is_enabled:i(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:i(2749,1,"_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:i(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:i(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:i(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:i(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:i(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:i(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:i(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:i(2757,1,"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:i(2758,1,"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:i(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:i(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:i(2761,1,"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:i(2762,1,"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:i(2763,1,"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:i(2764,1,"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:i(2765,1,"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:i(2766,1,"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:i(2767,1,"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:i(2768,1,"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:i(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:i(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:i(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:i(2772,1,"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:i(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:i(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this 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:i(2775,1,"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:i(2776,1,"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:i(2777,1,"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:i(2778,1,"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:i(2779,1,"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:i(2780,1,"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:i(2781,1,"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:i(2782,3,"_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:i(2783,1,"_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:i(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:i(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:i(2786,1,"_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:i(2787,1,"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:i(2788,1,"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:i(2789,1,"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:i(2790,1,"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:i(2791,1,"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_nodenext_or_to_add_aliases_to_the_paths_option:i(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', 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:i(2793,1,"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:i(2794,1,"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:i(2795,1,"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:i(2796,1,"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."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:i(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:i(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:i(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:i(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:i(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:i(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:i(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:i(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:i(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:i(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:i(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:i(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:i(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:i(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:i(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:i(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:i(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers:i(2815,1,"arguments_cannot_be_referenced_in_property_initializers_2815","'arguments' cannot be referenced in property initializers."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:i(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:i(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:i(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:i(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:i(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext:i(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821","Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:i(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Cannot_find_namespace_0_Did_you_mean_1:i(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:i(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:i(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls:i(2836,1,"Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836","Import assertions are not allowed on statements that transpile to commonjs 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:i(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:i(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:i(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes:i(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840","An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:i(2841,1,"The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841","The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:i(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:i(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:i(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:i(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:i(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:i(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:i(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:i(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:i(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:i(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_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:i(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements 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."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),Import_declaration_0_is_using_private_name_1:i(4e3,1,"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:i(4002,1,"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:i(4004,1,"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:i(4006,1,"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:i(4008,1,"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:i(4010,1,"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:i(4012,1,"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:i(4014,1,"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:i(4016,1,"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:i(4019,1,"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:i(4020,1,"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:i(4021,1,"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:i(4022,1,"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:i(4023,1,"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:i(4024,1,"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:i(4025,1,"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:i(4026,1,"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:i(4027,1,"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:i(4028,1,"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:i(4029,1,"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:i(4030,1,"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:i(4031,1,"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:i(4032,1,"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:i(4033,1,"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:i(4034,1,"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:i(4035,1,"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:i(4036,1,"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:i(4037,1,"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:i(4038,1,"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:i(4039,1,"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:i(4040,1,"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:i(4041,1,"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:i(4042,1,"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:i(4043,1,"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:i(4044,1,"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:i(4045,1,"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:i(4046,1,"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:i(4047,1,"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:i(4048,1,"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:i(4049,1,"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:i(4050,1,"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:i(4051,1,"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:i(4052,1,"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:i(4053,1,"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:i(4054,1,"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:i(4055,1,"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:i(4056,1,"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:i(4057,1,"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:i(4058,1,"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:i(4059,1,"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:i(4060,1,"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:i(4061,1,"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:i(4062,1,"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:i(4063,1,"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:i(4064,1,"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:i(4065,1,"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:i(4066,1,"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:i(4067,1,"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:i(4068,1,"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:i(4069,1,"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:i(4070,1,"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:i(4071,1,"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:i(4072,1,"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:i(4073,1,"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:i(4074,1,"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:i(4075,1,"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:i(4076,1,"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:i(4077,1,"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:i(4078,1,"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:i(4081,1,"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:i(4082,1,"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:i(4083,1,"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}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:i(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:i(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' 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:i(4090,1,"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:i(4091,1,"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:i(4092,1,"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:i(4094,1,"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:i(4095,1,"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:i(4096,1,"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:i(4097,1,"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:i(4098,1,"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:i(4099,1,"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:i(4100,1,"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:i(4101,1,"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:i(4102,1,"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:i(4103,1,"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:i(4104,1,"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:i(4105,1,"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:i(4106,1,"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:i(4107,1,"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:i(4108,1,"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:i(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:i(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:i(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:i(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:i(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:i(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:i(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:i(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:i(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:i(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:i(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:i(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:i(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:i(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:i(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:i(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:i(4125,1,"resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125","'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),The_current_host_does_not_support_the_0_option:i(5001,1,"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:i(5009,1,"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:i(5010,1,"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:i(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:i(5014,1,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:i(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:i(5024,1,"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:i(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:i(5033,1,"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:i(5042,1,"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:i(5047,1,"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:i(5048,1,"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:i(5051,1,"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:i(5052,1,"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:i(5053,1,"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:i(5054,1,"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:i(5055,1,"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:i(5056,1,"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:i(5057,1,"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:i(5058,1,"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:i(5059,1,"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:i(5061,1,"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:i(5062,1,"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:i(5063,1,"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:i(5064,1,"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:i(5065,1,"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:i(5066,1,"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:i(5067,1,"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:i(5068,1,"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:i(5069,1,"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_when_moduleResolution_is_set_to_classic:i(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext:i(5071,1,"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:i(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:i(5073,1,"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:i(5074,1,"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:i(5075,1,"_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:i(5076,1,"_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:i(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:i(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:i(5079,1,"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:i(5080,1,"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:i(5081,1,"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:i(5082,1,"_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:i(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:i(5085,1,"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:i(5086,1,"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:i(5087,1,"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:i(5088,1,"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:i(5089,1,"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:i(5090,1,"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 './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:i(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:i(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:i(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:i(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later:i(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:i(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:i(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:i(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:i(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101",`Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),Option_0_has_been_removed_Please_remove_it_from_your_configuration:i(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:i(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:i(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:i(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:i(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:i(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107",`Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:i(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:i(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:i(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:i(6e3,3,"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:i(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:i(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:i(6004,3,"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:i(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:i(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:i(6007,3,"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:i(6008,3,"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:i(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:i(6010,3,"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:i(6011,3,"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:i(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:i(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:i(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:i(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:i(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:i(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:i(6019,3,"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:i(6020,3,"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:i(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:i(6024,3,"options_6024","options"),file:i(6025,3,"file_6025","file"),Examples_Colon_0:i(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:i(6027,3,"Options_Colon_6027","Options:"),Version_0:i(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:i(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:i(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:i(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:i(6034,3,"KIND_6034","KIND"),FILE:i(6035,3,"FILE_6035","FILE"),VERSION:i(6036,3,"VERSION_6036","VERSION"),LOCATION:i(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:i(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:i(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:i(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:i(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:i(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:i(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:i(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:i(6046,1,"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:i(6048,1,"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}'."),Unable_to_open_file_0:i(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:i(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:i(6052,3,"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:i(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:i(6054,1,"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:i(6055,3,"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:i(6056,3,"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:i(6058,3,"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:i(6059,1,"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:i(6060,3,"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:i(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:i(6064,1,"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:i(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:i(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:i(6070,3,"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:i(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:i(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:i(6073,3,"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:i(6074,3,"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:i(6075,3,"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:i(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:i(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:i(6078,3,"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:i(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:i(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),File_0_has_an_unsupported_extension_so_skipping_it:i(6081,3,"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:i(6082,1,"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:i(6083,3,"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:i(6084,3,"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:i(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:i(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:i(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:i(6088,3,"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:i(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:i(6090,3,"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:i(6091,3,"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:i(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:i(6093,3,"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:i(6094,3,"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_types_Colon_1:i(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:i(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:i(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:i(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:i(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:i(6100,3,"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:i(6101,3,"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:i(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:i(6104,3,"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:i(6105,3,"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:i(6106,3,"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:i(6107,3,"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:i(6108,3,"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:i(6109,3,"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:i(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:i(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:i(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:i(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:i(6114,1,"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:i(6115,3,"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:i(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:i(6119,3,"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:i(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:i(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:i(6122,3,"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:i(6123,3,"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:i(6124,3,"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:i(6125,3,"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:i(6126,3,"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:i(6127,3,"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:i(6128,3,"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:i(6130,3,"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:i(6131,1,"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:i(6132,3,"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:i(6133,1,"_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:i(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:i(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:i(6136,3,"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:i(6137,1,"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:i(6138,1,"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:i(6139,3,"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:i(6140,1,"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:i(6141,3,"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:i(6142,1,"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:i(6144,3,"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:i(6145,3,"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:i(6146,3,"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:i(6147,3,"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:i(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:i(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:i(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:i(6151,3,"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:i(6152,3,"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:i(6153,3,"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:i(6154,3,"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:i(6155,3,"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:i(6156,3,"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:i(6157,3,"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:i(6158,3,"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:i(6159,3,"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:i(6160,3,"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:i(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:i(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:i(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:i(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:i(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:i(6166,3,"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:i(6167,3,"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:i(6168,3,"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:i(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:i(6170,3,"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:i(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3:i(6179,3,"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:i(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:i(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:i(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:i(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:i(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:i(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:i(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:i(6189,1,"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:i(6191,3,"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:i(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:i(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:i(6194,3,"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:i(6195,3,"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:i(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:i(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:i(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:i(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:i(6200,1,"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:i(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:i(6202,1,"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:i(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:i(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:i(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:i(6206,3,"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:i(6207,3,"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:i(6208,3,"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:i(6209,3,"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:i(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:i(6211,3,"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:i(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:i(6213,3,"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:i(6214,3,"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:i(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:i(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:i(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:i(6218,3,"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:i(6219,3,"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:i(6220,3,"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:i(6221,3,"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:i(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:i(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:i(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:i(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:i(6226,3,"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', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:i(6227,3,"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', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:i(6229,1,"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:i(6230,1,"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:i(6231,1,"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:i(6232,1,"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:i(6233,1,"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:i(6234,1,"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:i(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:i(6236,1,"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:i(6237,3,"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:i(6238,1,"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"),File_0_exists_according_to_earlier_cached_lookups:i(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:i(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:i(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:i(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:i(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:i(6244,3,"Modules_6244","Modules"),File_Management:i(6245,3,"File_Management_6245","File Management"),Emit:i(6246,3,"Emit_6246","Emit"),JavaScript_Support:i(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:i(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:i(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:i(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:i(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:i(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:i(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:i(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:i(6255,3,"Projects_6255","Projects"),Output_Formatting:i(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:i(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:i(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:i(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:i(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:i(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:i(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:i(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:i(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:i(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:i(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:i(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:i(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:i(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:i(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:i(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:i(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:i(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:i(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:i(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278",`There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),Enable_project_compilation:i(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:i(6304,1,"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:i(6305,1,"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:i(6306,1,"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:i(6307,1,"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:i(6308,1,"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:i(6309,1,"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:i(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:i(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:i(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:i(6352,3,"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:i(6353,3,"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:i(6354,3,"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:i(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:i(6356,3,"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:i(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:i(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:i(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:i(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:i(6362,3,"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:i(6363,3,"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:i(6364,3,"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:i(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:i(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:i(6369,1,"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:i(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:i(6371,3,"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:i(6372,3,"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:i(6373,3,"Updating_output_of_project_0_6373","Updating output of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:i(6374,3,"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:i(6375,3,"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:i(6376,3,"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:i(6377,1,"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}'"),Composite_projects_may_not_disable_incremental_compilation:i(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:i(6380,3,"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:i(6381,3,"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:i(6382,3,"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:i(6383,3,"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:i(6384,3,"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:i(6385,2,"_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:i(6386,3,"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_signature_0_of_1_is_deprecated:i(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:i(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:i(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:i(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:i(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:i(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:i(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:i(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:i(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:i(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:i(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:i(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:i(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:i(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:i(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:i(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:i(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:i(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:i(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:i(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:i(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:i(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:i(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:i(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:i(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:i(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:i(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:i(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:i(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:i(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:i(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:i(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:i(6500,3,"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:i(6501,3,"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:i(6502,3,"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:i(6503,3,"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:i(6504,1,"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?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:i(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:i(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files:i(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:i(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:i(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:i(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:i(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:i(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:i(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:i(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:i(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:i(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:i(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:i(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:i(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:i(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:i(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:i(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:i(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:i(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:i(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:i(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:i(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:i(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:i(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:i(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:i(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:i(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:i(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:i(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:i(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:i(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:i(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:i(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:i(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:i(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:i(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:i(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:i(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:i(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:i(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:i(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:i(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:i(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:i(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:i(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:i(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:i(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:i(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:i(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:i(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:i(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:i(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:i(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:i(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:i(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:i(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:i(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:i(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:i(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:i(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:i(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:i(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:i(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:i(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:i(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:i(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:i(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:i(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:i(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:i(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:i(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:i(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:i(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:i(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:i(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:i(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:i(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:i(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:i(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:i(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:i(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:i(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:i(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:i(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:i(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:i(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:i(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:i(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:i(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:i(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:i(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:i(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:i(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:i(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:i(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:i(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:i(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:i(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:i(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:i(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:i(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:i(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:i(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:i(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:i(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:i(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:i(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:i(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:i(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:i(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:i(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:i(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:i(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:i(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:i(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Default_catch_clause_variables_as_unknown_instead_of_any:i(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:i(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),one_of_Colon:i(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:i(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:i(6902,3,"type_Colon_6902","type:"),default_Colon:i(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:i(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:i(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:i(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:i(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:i(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:i(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:i(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:i(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:i(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:i(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:i(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:i(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:i(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:i(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:i(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:i(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:i(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:i(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:i(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:i(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:i(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:i(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:i(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:i(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:i(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:i(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:i(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:i(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:i(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:i(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:i(7008,1,"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:i(7009,1,"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:i(7010,1,"_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:i(7011,1,"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."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:i(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:i(7013,1,"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:i(7014,1,"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:i(7015,1,"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:i(7016,1,"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:i(7017,1,"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:i(7018,1,"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:i(7019,1,"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:i(7020,1,"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:i(7022,1,"_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:i(7023,1,"_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:i(7024,1,"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:i(7025,1,"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:i(7026,1,"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:i(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:i(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:i(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:i(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:i(7031,1,"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:i(7032,1,"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:i(7033,1,"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:i(7034,1,"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:i(7035,1,"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:i(7036,1,"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:i(7037,3,"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:i(7038,3,"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:i(7039,1,"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:i(7040,1,"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:i(7041,1,"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:i(7042,1,"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:i(7043,2,"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:i(7044,2,"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:i(7045,2,"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:i(7046,2,"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:i(7047,2,"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:i(7048,2,"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:i(7049,2,"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:i(7050,2,"_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:i(7051,1,"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:i(7052,1,"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:i(7053,1,"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:i(7054,1,"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:i(7055,1,"_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:i(7056,1,"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."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:i(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:i(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:i(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:i(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:i(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:i(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:i(8001,1,"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:i(8002,1,"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:i(8003,1,"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:i(8004,1,"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:i(8005,1,"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:i(8006,1,"_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:i(8008,1,"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:i(8009,1,"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:i(8010,1,"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:i(8011,1,"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:i(8012,1,"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:i(8013,1,"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:i(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:i(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:i(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:i(8020,1,"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:i(8021,1,"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:i(8022,1,"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:i(8023,1,"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:i(8024,1,"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:i(8025,1,"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:i(8026,1,"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:i(8027,1,"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:i(8028,1,"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:i(8029,1,"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:i(8030,1,"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:i(8031,1,"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:i(8032,1,"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:i(8033,1,"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:i(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:i(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:i(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:i(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:i(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:i(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:i(9005,1,"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:i(9006,1,"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:i(17e3,1,"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:i(17001,1,"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:i(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:i(17004,1,"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:i(17005,1,"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:i(17006,1,"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:i(17007,1,"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:i(17008,1,"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:i(17009,1,"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:i(17010,1,"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:i(17011,1,"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:i(17012,1,"_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:i(17013,1,"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:i(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:i(17015,1,"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:i(17016,1,"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:i(17017,1,"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:i(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:i(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:i(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Circularity_detected_while_resolving_configuration_Colon_0:i(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:i(18002,1,"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:i(18003,1,"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_ES_module:i(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:i(80002,2,"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:i(80003,2,"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:i(80004,2,"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:i(80005,2,"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:i(80006,2,"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:i(80007,2,"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:i(80008,2,"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."),JSDoc_typedef_may_be_converted_to_TypeScript_type:i(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:i(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:i(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:i(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:i(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:i(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:i(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:i(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:i(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:i(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:i(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:i(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:i(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:i(90013,3,"Import_0_from_1_90013",`Import '{0}' from "{1}"`),Change_0_to_1:i(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:i(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:i(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:i(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:i(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:i(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:i(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:i(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:i(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:i(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:i(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:i(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:i(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:i(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:i(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:i(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:i(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:i(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:i(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:i(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:i(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:i(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:i(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:i(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:i(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:i(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:i(90055,3,"Remove_type_from_import_declaration_from_0_90055",`Remove 'type' from import declaration from "{0}"`),Remove_type_from_import_of_0_from_1:i(90056,3,"Remove_type_from_import_of_0_from_1_90056",`Remove 'type' from import of '{0}' from "{1}"`),Add_import_from_0:i(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:i(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:i(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:i(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Convert_function_to_an_ES2015_class:i(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:i(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:i(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:i(95005,3,"Extract_function_95005","Extract function"),Extract_constant:i(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:i(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:i(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:i(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:i(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:i(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:i(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:i(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:i(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:i(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:i(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:i(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:i(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:i(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:i(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:i(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:i(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:i(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:i(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:i(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:i(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:i(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:i(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:i(95030,3,"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:i(95031,3,"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:i(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:i(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:i(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:i(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:i(95036,3,"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:i(95037,3,"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:i(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:i(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:i(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:i(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:i(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:i(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:i(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:i(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:i(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:i(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:i(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:i(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:i(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:i(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:i(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:i(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:i(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:i(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:i(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:i(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:i(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:i(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:i(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:i(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:i(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:i(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:i(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:i(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:i(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:i(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:i(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:i(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:i(95070,3,"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:i(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:i(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:i(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:i(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:i(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:i(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:i(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:i(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:i(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:i(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:i(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:i(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:i(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:i(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:i(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:i(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:i(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:i(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:i(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:i(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:i(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:i(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:i(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:i(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:i(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:i(95097,3,"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:i(95098,3,"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:i(95099,3,"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:i(95100,3,"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:i(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:i(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:i(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:i(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:i(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:i(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:i(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:i(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:i(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:i(95112,3,"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:i(95113,3,"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:i(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:i(95115,3,"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:i(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:i(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:i(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:i(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:i(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:i(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:i(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:i(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:i(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:i(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:i(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:i(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:i(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:i(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:i(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:i(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:i(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:i(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:i(95134,3,"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:i(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:i(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:i(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:i(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:i(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:i(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:i(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:i(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:i(95143,3,"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:i(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:i(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:i(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:i(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:i(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:i(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:i(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:i(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:i(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:i(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenation:i(95154,3,"Can_only_convert_string_concatenation_95154","Can only convert string concatenation"),Selection_is_not_a_valid_statement_or_statements:i(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:i(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:i(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:i(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:i(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:i(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:i(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:i(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:i(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:i(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:i(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:i(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:i(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:i(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:i(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:i(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:i(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:i(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:i(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:i(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:i(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:i(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:i(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:i(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:i(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:i(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:i(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:i(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:i(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:i(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:i(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:i(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:i(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:i(18004,1,"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:i(18006,1,"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:i(18007,1,"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:i(18009,1,"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:i(18010,1,"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:i(18011,1,"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:i(18012,1,"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:i(18013,1,"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:i(18014,1,"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:i(18015,1,"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:i(18016,1,"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:i(18017,1,"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:i(18018,1,"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:i(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:i(18024,1,"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:i(18026,1,"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:i(18027,1,"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:i(18028,1,"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:i(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:i(18030,1,"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:i(18031,1,"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:i(18032,1,"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."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:i(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:i(18034,3,"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:i(18035,1,"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."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:i(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:i(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:i(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:i(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:i(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:i(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:i(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:i(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:i(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:i(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:i(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:i(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:i(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:i(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:i(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Non_abstract_class_0_does_not_implement_all_abstract_members_of_1:i(18052,1,"Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052","Non-abstract class '{0}' does not implement all abstract members of '{1}'"),Its_type_0_is_not_a_valid_JSX_element_type:i(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:i(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block.")}}});function kt(e){return e>=80}function n4(e){return e===32||kt(e)}function i_(e,t){if(e=2?i_(e,m4):t===1?i_(e,f4):i_(e,u4)}function FE(e,t){return t>=2?i_(e,h4):t===1?i_(e,d4):i_(e,p4)}function BE(e){let t=[];return e.forEach((r,a)=>{t[r]=a}),t}function nr(e){return b4[e]}function Rl(e){return h0.get(e)}function Vd(e){let t=[],r=0,a=0;for(;r127&&mr(_)&&(t.push(a),a=r);break}}return t.push(a),t}function UE(e,t,r,a){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,r,a):Tg(Ia(e),t,r,e.text,a)}function Tg(e,t,r,a,_){(t<0||t>=e.length)&&(_?t=t<0?0:t>=e.length?e.length-1:t:N.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${a!==void 0?bv(e,Vd(a)):"unknown"}`));let p=e[t]+r;return _?p>e[t+1]?e[t+1]:typeof a=="string"&&p>a.length?a.length:p:(t=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function mr(e){return e===10||e===13||e===8232||e===8233}function Eo(e){return e>=48&&e<=57}function jb(e){return Eo(e)||e>=65&&e<=70||e>=97&&e<=102}function qE(e){return e<=1114111}function If(e){return e>=48&&e<=55}function zE(e,t){let r=e.charCodeAt(t);switch(r){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 t===0;default:return r>127}}function Nt(e,t,r,a,_){if(Oa(t))return t;let p=!1;for(;;){let d=e.charCodeAt(t);switch(d){case 13:e.charCodeAt(t+1)===10&&t++;case 10:if(t++,r)return t;p=!!_;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(a)break;if(e.charCodeAt(t+1)===47){for(t+=2;t127&&Vi(d)){t++;continue}break}return t}}function ko(e,t){if(N.assert(t>=0),t===0||mr(e.charCodeAt(t-1))){let r=e.charCodeAt(t);if(t+ll=0&&r127&&Vi(L)){C&&mr(L)&&(y=!0),r++;continue}break e}}return C&&(k=_(h,l,v,y,p,k)),k}function WE(e,t,r,a){return Hd(!1,e,t,!1,r,a)}function VE(e,t,r,a){return Hd(!1,e,t,!0,r,a)}function a4(e,t,r,a,_){return Hd(!0,e,t,!1,r,a,_)}function o4(e,t,r,a,_){return Hd(!0,e,t,!0,r,a,_)}function s4(e,t,r,a,_,p=[]){return p.push({kind:r,pos:e,end:t,hasTrailingNewLine:a}),p}function Wo(e,t){return a4(e,t,s4,void 0,void 0)}function _4(e,t){return o4(e,t,s4,void 0,void 0)}function c4(e){let t=Gd.exec(e);if(t)return t[0]}function un(e,t){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>127&&i4(e,t)}function Qa(e,t,r){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===36||e===95||(r===1?e===45||e===58:!1)||e>127&&FE(e,t)}function Cg(e,t,r){let a=cn(e,0);if(!un(a,t))return!1;for(let _=Yn(a);_y,getStartPos:()=>y,getTokenEnd:()=>l,getTextPos:()=>l,getToken:()=>S,getTokenStart:()=>C,getTokenPos:()=>C,getTokenText:()=>h.substring(C,l),getTokenValue:()=>k,hasUnicodeEscape:()=>(L&1024)!==0,hasExtendedUnicodeEscape:()=>(L&8)!==0,hasPrecedingLineBreak:()=>(L&1)!==0,hasPrecedingJSDocComment:()=>(L&2)!==0,isIdentifier:()=>S===80||S>118,isReservedWord:()=>S>=83&&S<=118,isUnterminated:()=>(L&4)!==0,getCommentDirectives:()=>G,getNumericLiteralFlags:()=>L&25584,getTokenFlags:()=>L,reScanGreaterToken:St,reScanAsteriskEqualsToken:xn,reScanSlashToken:Tr,reScanTemplateToken:Ut,reScanTemplateHeadOrNoSubstitutionTemplate:fr,scanJsxIdentifier:Mr,scanJsxAttributeValue:at,reScanJsxAttributeValue:er,reScanJsxToken:ht,reScanLessThanToken:wn,reScanHashToken:Tt,reScanQuestionToken:Or,reScanInvalidIdentifier:sr,scanJsxToken:pt,scanJsDocToken:tn,scanJSDocCommentTextToken:Qt,scan:Sn,getText:Di,clearCommentDirectives:qn,setText:Ae,setScriptTarget:oe,setLanguageVariant:ge,setOnError:q,resetTokenState:Se,setTextPos:Se,setInJSDocType:nt,tryScan:nn,lookAhead:rn,scanRange:Un};return N.isDebugging&&Object.defineProperty(ue,"__debugShowCurrentPositionInText",{get:()=>{let z=ue.getText();return z.slice(0,ue.getTokenFullStart())+"\u2551"+z.slice(ue.getTokenFullStart())}}),ue;function Y(z,X=l,ee,xe){if(_){let ke=l;l=X,_(z,ee||0,xe),l=ke}}function B(){let z=l,X=!1,ee=!1,xe="";for(;;){let ke=h.charCodeAt(l);if(ke===95){L|=512,X?(X=!1,ee=!0,xe+=h.substring(z,l)):(L|=16384,Y(ee?U.Multiple_consecutive_numeric_separators_are_not_permitted:U.Numeric_separators_are_not_allowed_here,l,1)),l++,z=l;continue}if(Eo(ke)){X=!0,ee=!1,l++;continue}break}return h.charCodeAt(l-1)===95&&(L|=16384,Y(U.Numeric_separators_are_not_allowed_here,l-1,1)),xe+h.substring(z,l)}function ae(){let z=l,X;if(h.charCodeAt(l)===48)if(l++,h.charCodeAt(l)===95)L|=16896,Y(U.Numeric_separators_are_not_allowed_here,l,1),l--,X=B();else if(!Ze())L|=8192,X=""+ +k;else if(!k)X="0";else{k=""+parseInt(k,8),L|=32;let lt=S===41,yt=(lt?"-":"")+"0o"+(+k).toString(8);return lt&&z--,Y(U.Octal_literals_are_not_allowed_Use_the_syntax_0,z,l-z,yt),9}else X=B();let ee,xe;h.charCodeAt(l)===46&&(l++,ee=B());let ke=l;if(h.charCodeAt(l)===69||h.charCodeAt(l)===101){l++,L|=16,(h.charCodeAt(l)===43||h.charCodeAt(l)===45)&&l++;let lt=l,yt=B();yt?(xe=h.substring(ke,lt)+yt,ke=l):Y(U.Digit_expected)}let Le;if(L&512?(Le=X,ee&&(Le+="."+ee),xe&&(Le+=xe)):Le=h.substring(z,ke),L&8192)return Y(U.Decimals_with_leading_zeros_are_not_allowed,z,ke-z),k=""+ +Le,9;if(ee!==void 0||L&16)return Ce(z,ee===void 0&&!!(L&16)),k=""+ +Le,9;{k=Le;let lt=Tn();return Ce(z),lt}}function Ce(z,X){if(!un(cn(h,l),e))return;let ee=l,{length:xe}=Gt();xe===1&&h[ee]==="n"?Y(X?U.A_bigint_literal_cannot_use_exponential_notation:U.A_bigint_literal_must_be_an_integer,z,ee-z+1):(Y(U.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal,ee,xe),l=ee)}function Ze(){let z=l,X=!0;for(;Eo(h.charCodeAt(l));)If(h.charCodeAt(l))||(X=!1),l++;return k=h.substring(z,l),X}function qe(z,X){let ee=it(z,!1,X);return ee?parseInt(ee,16):-1}function rt(z,X){return it(z,!0,X)}function it(z,X,ee){let xe=[],ke=!1,Le=!1;for(;xe.length=65&<<=70)lt+=97-65;else if(!(lt>=48&<<=57||lt>=97&<<=102))break;xe.push(lt),l++,Le=!1}return xe.length=v){ee+=h.substring(xe,l),L|=4,Y(U.Unterminated_string_literal);break}let ke=h.charCodeAt(l);if(ke===X){ee+=h.substring(xe,l),l++;break}if(ke===92&&!z){ee+=h.substring(xe,l),ee+=ci(!0),xe=l;continue}if(mr(ke)&&!z){ee+=h.substring(xe,l),L|=4,Y(U.Unterminated_string_literal);break}l++}return ee}function ar(z){let X=h.charCodeAt(l)===96;l++;let ee=l,xe="",ke;for(;;){if(l>=v){xe+=h.substring(ee,l),L|=4,Y(U.Unterminated_template_literal),ke=X?15:18;break}let Le=h.charCodeAt(l);if(Le===96){xe+=h.substring(ee,l),l++,ke=X?15:18;break}if(Le===36&&l+1=v)return Y(U.Unexpected_end_of_text),"";let ee=h.charCodeAt(l);switch(l++,ee){case 48:if(l>=v||!Eo(h.charCodeAt(l)))return"\0";case 49:case 50:case 51:l=v?(L|=2048,z&&Y(U.Unexpected_end_of_text),h.substring(X,l)):h.charCodeAt(l)!==125?(L|=2048,z&&Y(U.Unterminated_Unicode_escape_sequence),h.substring(X,l)):(l++,L|=8,Nf(ke)):(L|=2048,z&&Y(U.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),h.substring(X,l))}for(;l1114111&&(Y(U.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),ee=!0),l>=v?(Y(U.Unexpected_end_of_text),ee=!0):h.charCodeAt(l)===125?l++:(Y(U.Unterminated_Unicode_escape_sequence),ee=!0),ee?"":Nf(X)}function Nr(){if(l+5=0&&Qa(ee,e)){l+=3,L|=8,z+=or(),X=l;continue}if(ee=Nr(),!(ee>=0&&Qa(ee,e)))break;L|=1024,z+=h.substring(X,l),z+=Nf(ee),l+=6,X=l}else break}return z+=h.substring(X,l),z}function Ur(){let z=k.length;if(z>=2&&z<=12){let X=k.charCodeAt(0);if(X>=97&&X<=122){let ee=l4.get(k);if(ee!==void 0)return S=ee}}return S=80}function Xt(z){let X="",ee=!1,xe=!1;for(;;){let ke=h.charCodeAt(l);if(ke===95){L|=512,ee?(ee=!1,xe=!0):Y(xe?U.Multiple_consecutive_numeric_separators_are_not_permitted:U.Numeric_separators_are_not_allowed_here,l,1),l++;continue}if(ee=!0,!Eo(ke)||ke-48>=z)break;X+=h[l],l++,xe=!1}return h.charCodeAt(l-1)===95&&Y(U.Numeric_separators_are_not_allowed_here,l-1,1),X}function Tn(){return h.charCodeAt(l)===110?(k+="n",L&384&&(k=Sm(k)+"n"),l++,10):(k=""+(L&128?parseInt(k.slice(2),2):L&256?parseInt(k.slice(2),8):+k),9)}function Sn(){y=l,L=0;let z=!1;for(;;){if(C=l,l>=v)return S=1;let X=cn(h,l);if(l===0){if(X===65533)return Y(U.File_appears_to_be_binary),l=v,S=8;if(X===35&&xg(h,l)){if(l=wg(h,l),t)continue;return S=6}}switch(X){case 10:case 13:if(L|=1,t){l++;continue}else return X===13&&l+1=0&&un(ee,e))return l+=3,L|=8,k=or()+Gt(),S=Ur();let xe=Nr();return xe>=0&&un(xe,e)?(l+=6,L|=1024,k=String.fromCharCode(xe)+Gt(),S=Ur()):(Y(U.Invalid_character),l++,S=0);case 35:if(l!==0&&h[l+1]==="!")return Y(U.can_only_be_used_at_the_start_of_a_file),l++,S=0;let ke=cn(h,l+1);if(ke===92){l++;let yt=Ge();if(yt>=0&&un(yt,e))return l+=3,L|=8,k="#"+or()+Gt(),S=81;let jt=Nr();if(jt>=0&&un(jt,e))return l+=6,L|=1024,k="#"+String.fromCharCode(jt)+Gt(),S=81;l--}return un(ke,e)?(l++,$t(ke,e)):(k="#",Y(U.Invalid_character,l++,Yn(X))),S=81;default:let Le=$t(X,e);if(Le)return S=Le;if(Io(X)){l+=Yn(X);continue}else if(mr(X)){L|=1,l+=Yn(X);continue}let lt=Yn(X);return Y(U.Invalid_character,l,lt),l+=lt,S=0}}}function sr(){N.assert(S===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),l=C=y,L=0;let z=cn(h,l),X=$t(z,99);return X?S=X:(l+=Yn(z),S)}function $t(z,X){let ee=z;if(un(ee,X)){for(l+=Yn(ee);l=v)return S=1;let X=h.charCodeAt(l);if(X===60)return h.charCodeAt(l+1)===47?(l+=2,S=31):(l++,S=30);if(X===123)return l++,S=19;let ee=0;for(;l0)break;Vi(X)||(ee=l)}l++}return k=h.substring(y,l),ee===-1?13:12}function Mr(){if(kt(S)){for(;l=v)return S=1;for(let X=h.charCodeAt(l);l=0&&Io(h.charCodeAt(l-1))&&!(l+1=v)return S=1;let z=cn(h,l);switch(l+=Yn(z),z){case 9:case 11:case 12:case 32:for(;l=0&&un(X,e))return l+=3,L|=8,k=or()+Gt(),S=Ur();let ee=Nr();return ee>=0&&un(ee,e)?(l+=6,L|=1024,k=String.fromCharCode(ee)+Gt(),S=Ur()):(l++,S=0)}if(un(z,e)){let X=z;for(;l=0),l=z,y=z,C=z,S=0,k=void 0,L=0}function nt(z){K+=z?1:-1}}function Yn(e){return e>=65536?2:1}function HE(e){if(N.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);let t=Math.floor((e-65536)/1024)+55296,r=(e-65536)%1024+56320;return String.fromCharCode(t,r)}function Nf(e){return v4(e)}var cl,l4,h0,u4,p4,f4,d4,m4,h4,y4,g4,b4,ll,Gd,cn,v4,GE=Vt({"src/compiler/scanner.ts"(){"use strict";Dr(),cl={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},l4=new Map(Object.entries(cl)),h0=new Map(Object.entries({...cl,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),u4=[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],p4=[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],f4=[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],d4=[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],m4=[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],h4=[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],y4=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,g4=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,b4=BE(h0),ll=7,Gd=/^#!.*/,cn=String.prototype.codePointAt?(e,t)=>e.codePointAt(t):function(t,r){let a=t.length;if(r<0||r>=a)return;let _=t.charCodeAt(r);if(_>=55296&&_<=56319&&a>r+1){let p=t.charCodeAt(r+1);if(p>=56320&&p<=57343)return(_-55296)*1024+p-56320+65536}return _},v4=String.fromCodePoint?e=>String.fromCodePoint(e):HE}});function XE(e){return rs(e)||v_(e)}function $E(e){return wv(e,F2)}function T4(e){switch(Ql(e)){case 99:return"lib.esnext.full.d.ts";case 9:return"lib.es2022.full.d.ts";case 8:return"lib.es2021.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"}}function Kt(e){return e.start+e.length}function S4(e){return e.length===0}function QE(e,t){return t>=e.start&&t=e.pos&&t<=e.end}function KE(e,t){return t.start>=e.start&&Kt(t)<=Kt(e)}function ZE(e,t){return x4(e,t)!==void 0}function x4(e,t){let r=w4(e,t);return r&&r.length===0?void 0:r}function eA(e,t){return Eg(e.start,e.length,t.start,t.length)}function tA(e,t,r){return Eg(e.start,e.length,t,r)}function Eg(e,t,r,a){let _=e+t,p=r+a;return r<=_&&p>=e}function rA(e,t){return t<=Kt(e)&&t>=e.start}function w4(e,t){let r=Math.max(e.start,t.start),a=Math.min(Kt(e),Kt(t));return r<=a?Hi(r,a):void 0}function w_(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function Hi(e,t){return w_(e,t-e)}function Qs(e){return w_(e.span.start,e.newLength)}function C4(e){return S4(e.span)&&e.newLength===0}function Xd(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}function nA(e){if(e.length===0)return Vg;if(e.length===1)return e[0];let t=e[0],r=t.span.start,a=Kt(t.span),_=r+t.newLength;for(let p=1;p=2&&e.charCodeAt(0)===95&&e.charCodeAt(1)===95?"_"+e:e}function Vo(e){let t=e;return t.length>=3&&t.charCodeAt(0)===95&&t.charCodeAt(1)===95&&t.charCodeAt(2)===95?t.substr(1):t}function Ot(e){return Vo(e.escapedText)}function P4(e){let t=Rl(e.escapedText);return t?On(t,Si):void 0}function md(e){return e.valueDeclaration&&a3(e.valueDeclaration)?Ot(e.valueDeclaration.name):Vo(e.escapedName)}function I4(e){let t=e.parent.parent;if(t){if(Ho(t))return Ef(t);switch(t.kind){case 243:if(t.declarationList&&t.declarationList.declarations[0])return Ef(t.declarationList.declarations[0]);break;case 244:let r=t.expression;switch(r.kind===226&&r.operatorToken.kind===64&&(r=r.left),r.kind){case 211:return r.name;case 212:let a=r.argumentExpression;if(Ee(a))return a}break;case 217:return Ef(t.expression);case 256:{if(Ho(t.statement)||am(t.statement))return Ef(t.statement);break}}}}function Ef(e){let t=Bl(e);return t&&Ee(t)?t:void 0}function N4(e,t){return!!(Qd(e)&&Ee(e.name)&&Ot(e.name)===Ot(t)||as(e)&&mt(e.declarationList.declarations,r=>N4(r,t)))}function O4(e){return e.name||I4(e)}function Qd(e){return!!e.name}function Yd(e){switch(e.kind){case 80:return e;case 355:case 348:{let{name:r}=e;if(r.kind===166)return r.right;break}case 213:case 226:{let r=e;switch(Ja(r)){case 1:case 4:case 5:case 3:return fm(r.left);case 7:case 8:case 9:return r.arguments[1];default:return}}case 353:return O4(e);case 347:return I4(e);case 277:{let{expression:r}=e;return Ee(r)?r:void 0}case 212:let t=e;if(f2(t))return t.argumentExpression}return e.name}function Bl(e){if(e!==void 0)return Yd(e)||(Am(e)||km(e)||Il(e)?M4(e):void 0)}function M4(e){if(e.parent){if(_s(e.parent)||nu(e.parent))return e.parent.name;if(Ct(e.parent)&&e===e.parent.right){if(Ee(e.parent.left))return e.parent.left;if($o(e.parent.left))return fm(e.parent.left)}else if(ki(e.parent)&&Ee(e.parent.name))return e.parent.name}else return}function _A(e){if(El(e))return $r(e.modifiers,L_)}function hd(e){if(gr(e,126975))return $r(e.modifiers,Lg)}function L4(e,t){if(e.name)if(Ee(e.name)){let r=e.name.escapedText;return c_(e.parent,t).filter(a=>h_(a)&&Ee(a.name)&&a.name.escapedText===r)}else{let r=e.parent.parameters.indexOf(e);N.assert(r>-1,"Parameters should always be in their parents' parameter list");let a=c_(e.parent,t).filter(h_);if(rKo(a)&&a.typeParameters.some(_=>_.name.escapedText===r))}function j4(e){return R4(e,!1)}function F4(e){return R4(e,!0)}function cA(e){return!!Zt(e,h_)}function B4(e){return Zt(e,Mm)}function U4(e){return Q4(e,C8)}function lA(e){return Zt(e,T8)}function uA(e){return Zt(e,I6)}function q4(e){return Zt(e,I6,!0)}function pA(e){return Zt(e,N6)}function z4(e){return Zt(e,N6,!0)}function fA(e){return Zt(e,O6)}function W4(e){return Zt(e,O6,!0)}function dA(e){return Zt(e,M6)}function V4(e){return Zt(e,M6,!0)}function H4(e){return Zt(e,S8,!0)}function mA(e){return Zt(e,J6)}function G4(e){return Zt(e,J6,!0)}function hA(e){return Zt(e,x8)}function yA(e){return Zt(e,w8)}function X4(e){return Zt(e,R6)}function gA(e){return Zt(e,Ko)}function kg(e){return Zt(e,j6)}function Zd(e){let t=Zt(e,lu);if(t&&t.typeExpression&&t.typeExpression.type)return t}function em(e){let t=Zt(e,lu);return!t&&Ma(e)&&(t=Yr(Kd(e),r=>!!r.typeExpression)),t&&t.typeExpression&&t.typeExpression.type}function $4(e){let t=X4(e);if(t&&t.typeExpression)return t.typeExpression.type;let r=Zd(e);if(r&&r.typeExpression){let a=r.typeExpression.type;if(Em(a)){let _=Yr(a.members,c6);return _&&_.type}if(tu(a)||Om(a))return a.type}}function c_(e,t){var r;if(!dm(e))return $e;let a=(r=e.jsDoc)==null?void 0:r.jsDocCache;if(a===void 0||t){let _=gT(e,t);N.assert(_.length<2||_[0]!==_[1]),a=Bo(_,p=>cs(p)?p.tags:p),t||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=a)}return a}function Ul(e){return c_(e,!1)}function bA(e){return c_(e,!0)}function Zt(e,t,r){return Yr(c_(e,r),t)}function Q4(e,t){return Ul(e).filter(t)}function vA(e,t){return Ul(e).filter(r=>r.kind===t)}function TA(e){return typeof e=="string"?e:e==null?void 0:e.map(t=>t.kind===328?t.text:SA(t)).join("")}function SA(e){let t=e.kind===331?"link":e.kind===332?"linkcode":"linkplain",r=e.name?vi(e.name):"",a=e.name&&e.text.startsWith("://")?"":" ";return`{@${t} ${r}${a}${e.text}}`}function xA(e){if(cu(e)){if(L6(e.parent)){let t=g2(e.parent);if(t&&Ka(t.tags))return Bo(t.tags,r=>Ko(r)?r.typeParameters:void 0)}return $e}if(Hl(e))return N.assert(e.parent.kind===327),Bo(e.parent.tags,t=>Ko(t)?t.typeParameters:void 0);if(e.typeParameters||F8(e)&&e.typeParameters)return e.typeParameters;if(Wt(e)){let t=eS(e);if(t.length)return t;let r=em(e);if(r&&tu(r)&&r.typeParameters)return r.typeParameters}return $e}function wA(e){return e.constraint?e.constraint:Ko(e.parent)&&e===e.parent.typeParameters[0]?e.parent.constraint:void 0}function ro(e){return e.kind===80||e.kind===81}function CA(e){return e.kind===178||e.kind===177}function Y4(e){return Br(e)&&!!(e.flags&64)}function K4(e){return Ra(e)&&!!(e.flags&64)}function y0(e){return j_(e)&&!!(e.flags&64)}function Dg(e){let t=e.kind;return!!(e.flags&64)&&(t===211||t===212||t===213||t===235)}function Pg(e){return Dg(e)&&!jo(e)&&!!e.questionDotToken}function EA(e){return Pg(e.parent)&&e.parent.expression===e}function AA(e){return!Dg(e.parent)||Pg(e.parent)||e!==e.parent.expression}function kA(e){return e.kind===226&&e.operatorToken.kind===61}function Z4(e){return R_(e)&&Ee(e.typeName)&&e.typeName.escapedText==="const"&&!e.typeArguments}function tm(e){return ls(e,8)}function e3(e){return jo(e)&&!!(e.flags&64)}function DA(e){return e.kind===252||e.kind===251}function PA(e){return e.kind===280||e.kind===279}function t3(e){switch(e.kind){case 309:case 310:return!0;default:return!1}}function IA(e){return t3(e)||e.kind===307||e.kind===311}function Ig(e){return e.kind===355||e.kind===348}function NA(e){return ql(e.kind)}function ql(e){return e>=166}function r3(e){return e>=0&&e<=165}function OA(e){return r3(e.kind)}function va(e){return Qr(e,"pos")&&Qr(e,"end")}function Ng(e){return 9<=e&&e<=15}function Og(e){return Ng(e.kind)}function MA(e){switch(e.kind){case 210:case 209:case 14:case 218:case 231:return!0}return!1}function Sl(e){return 15<=e&&e<=18}function LA(e){return Sl(e.kind)}function JA(e){let t=e.kind;return t===17||t===18}function RA(e){return f8(e)||m8(e)}function n3(e){switch(e.kind){case 276:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 274:return e.parent.isTypeOnly;case 273:case 271:return e.isTypeOnly}return!1}function i3(e){switch(e.kind){case 281:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 278:return e.isTypeOnly&&!!e.moduleSpecifier&&!e.exportClause;case 280:return e.parent.isTypeOnly}return!1}function jA(e){return n3(e)||i3(e)}function FA(e){return mn(e)||Ee(e)}function BA(e){return e.kind===11||Sl(e.kind)}function wa(e){var t;return Ee(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function Mg(e){var t;return jr(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function UA(e){let t=e.emitNode.autoGenerate.flags;return!!(t&32)&&!!(t&16)&&!!(t&8)}function a3(e){return(oo(e)||Rg(e))&&jr(e.name)}function qA(e){return Br(e)&&jr(e.name)}function bi(e){switch(e){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function o3(e){return!!(J2(e)&16476)}function s3(e){return o3(e)||e===126||e===164||e===129}function Lg(e){return bi(e.kind)}function zA(e){let t=e.kind;return t===166||t===80}function zl(e){let t=e.kind;return t===80||t===81||t===11||t===9||t===167}function WA(e){let t=e.kind;return t===80||t===206||t===207}function Gi(e){return!!e&&Jg(e.kind)}function rm(e){return!!e&&(Jg(e.kind)||eu(e))}function _3(e){return e&&c3(e.kind)}function VA(e){return e.kind===112||e.kind===97}function c3(e){switch(e){case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function Jg(e){switch(e){case 173:case 179:case 330:case 180:case 181:case 184:case 324:case 185:return!0;default:return c3(e)}}function HA(e){return ii(e)||p8(e)||au(e)&&Gi(e.parent)}function no(e){let t=e.kind;return t===176||t===172||t===174||t===177||t===178||t===181||t===175||t===240}function dn(e){return e&&(e.kind===263||e.kind===231)}function nm(e){return e&&(e.kind===177||e.kind===178)}function l3(e){return oo(e)&&oS(e)}function Rg(e){switch(e.kind){case 174:case 177:case 178:return!0;default:return!1}}function GA(e){switch(e.kind){case 174:case 177:case 178:case 172:return!0;default:return!1}}function Of(e){return Lg(e)||L_(e)}function jg(e){let t=e.kind;return t===180||t===179||t===171||t===173||t===181||t===177||t===178}function XA(e){return jg(e)||no(e)}function Fg(e){let t=e.kind;return t===303||t===304||t===305||t===174||t===177||t===178}function g0(e){return PS(e.kind)}function $A(e){switch(e.kind){case 184:case 185:return!0}return!1}function im(e){if(e){let t=e.kind;return t===207||t===206}return!1}function u3(e){let t=e.kind;return t===209||t===210}function QA(e){let t=e.kind;return t===208||t===232}function Bg(e){switch(e.kind){case 260:case 169:case 208:return!0}return!1}function YA(e){return ki(e)||Ma(e)||f3(e)||m3(e)}function KA(e){return p3(e)||d3(e)}function p3(e){switch(e.kind){case 206:case 210:return!0}return!1}function f3(e){switch(e.kind){case 208:case 303:case 304:case 305:return!0}return!1}function d3(e){switch(e.kind){case 207:case 209:return!0}return!1}function m3(e){switch(e.kind){case 208:case 232:case 230:case 209:case 210:case 80:case 211:case 212:return!0}return Na(e,!0)}function ZA(e){let t=e.kind;return t===211||t===166||t===205}function ek(e){let t=e.kind;return t===211||t===166}function tk(e){switch(e.kind){case 286:case 285:case 213:case 214:case 215:case 170:return!0;default:return!1}}function rk(e){return e.kind===213||e.kind===214}function nk(e){let t=e.kind;return t===228||t===15}function Lo(e){return h3(tm(e).kind)}function h3(e){switch(e){case 211:case 212:case 214:case 213:case 284:case 285:case 288:case 215:case 209:case 217:case 210:case 231:case 218:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 228:case 97:case 106:case 110:case 112:case 108:case 235:case 233:case 236:case 102:case 282:return!0;default:return!1}}function y3(e){return g3(tm(e).kind)}function g3(e){switch(e){case 224:case 225:case 220:case 221:case 222:case 223:case 216:return!0;default:return h3(e)}}function ik(e){switch(e.kind){case 225:return!0;case 224:return e.operator===46||e.operator===47;default:return!1}}function ak(e){switch(e.kind){case 106:case 112:case 97:case 224:return!0;default:return Og(e)}}function am(e){return ok(tm(e).kind)}function ok(e){switch(e){case 227:case 229:case 219:case 226:case 230:case 234:case 232:case 361:case 360:case 238:return!0;default:return g3(e)}}function sk(e){let t=e.kind;return t===216||t===234}function _k(e){return A6(e)||c8(e)}function b3(e,t){switch(e.kind){case 248:case 249:case 250:case 246:case 247:return!0;case 256:return t&&b3(e.statement,t)}return!1}function v3(e){return ss(e)||B_(e)}function ck(e){return mt(e,v3)}function lk(e){return!lm(e)&&!ss(e)&&!gr(e,1)&&!_m(e)}function uk(e){return lm(e)||ss(e)||gr(e,1)}function pk(e){return e.kind===249||e.kind===250}function fk(e){return au(e)||am(e)}function dk(e){return au(e)}function mk(e){return v6(e)||am(e)}function hk(e){let t=e.kind;return t===268||t===267||t===80}function yk(e){let t=e.kind;return t===268||t===267}function gk(e){let t=e.kind;return t===80||t===267}function bk(e){let t=e.kind;return t===275||t===274}function vk(e){return e.kind===267||e.kind===266}function Tk(e){switch(e.kind){case 219:case 226:case 208:case 213:case 179:case 263:case 231:case 175:case 176:case 185:case 180:case 212:case 266:case 306:case 277:case 278:case 281:case 262:case 218:case 184:case 177:case 80:case 273:case 271:case 276:case 181:case 264:case 345:case 347:case 324:case 348:case 355:case 330:case 353:case 329:case 291:case 292:case 293:case 200:case 174:case 173:case 267:case 202:case 280:case 270:case 274:case 214:case 15:case 9:case 210:case 169:case 211:case 303:case 172:case 171:case 178:case 304:case 312:case 305:case 11:case 265:case 187:case 168:case 260:return!0;default:return!1}}function Sk(e){switch(e.kind){case 219:case 241:case 179:case 269:case 299:case 175:case 194:case 176:case 185:case 180:case 248:case 249:case 250:case 262:case 218:case 184:case 177:case 181:case 345:case 347:case 324:case 330:case 353:case 200:case 174:case 173:case 267:case 178:case 312:case 265:return!0;default:return!1}}function xk(e){return e===219||e===208||e===263||e===231||e===175||e===176||e===266||e===306||e===281||e===262||e===218||e===177||e===273||e===271||e===276||e===264||e===291||e===174||e===173||e===267||e===270||e===274||e===280||e===169||e===303||e===172||e===171||e===178||e===304||e===265||e===168||e===260||e===353||e===345||e===355}function Ug(e){return e===262||e===282||e===263||e===264||e===265||e===266||e===267||e===272||e===271||e===278||e===277||e===270}function qg(e){return e===252||e===251||e===259||e===246||e===244||e===242||e===249||e===250||e===248||e===245||e===256||e===253||e===255||e===257||e===258||e===243||e===247||e===254||e===359}function Ho(e){return e.kind===168?e.parent&&e.parent.kind!==352||Wt(e):xk(e.kind)}function wk(e){return Ug(e.kind)}function Ck(e){return qg(e.kind)}function T3(e){let t=e.kind;return qg(t)||Ug(t)||Ek(e)}function Ek(e){return e.kind!==241||e.parent!==void 0&&(e.parent.kind===258||e.parent.kind===299)?!1:!$3(e)}function S3(e){let t=e.kind;return qg(t)||Ug(t)||t===241}function Ak(e){let t=e.kind;return t===283||t===166||t===80}function kk(e){let t=e.kind;return t===110||t===80||t===211||t===295}function x3(e){let t=e.kind;return t===284||t===294||t===285||t===12||t===288}function Dk(e){let t=e.kind;return t===291||t===293}function Pk(e){let t=e.kind;return t===11||t===294}function w3(e){let t=e.kind;return t===286||t===285}function Ik(e){let t=e.kind;return t===296||t===297}function zg(e){return e.kind>=316&&e.kind<=357}function C3(e){return e.kind===327||e.kind===326||e.kind===328||ul(e)||Wg(e)||P6(e)||cu(e)}function Wg(e){return e.kind>=334&&e.kind<=357}function Zc(e){return e.kind===178}function el(e){return e.kind===177}function Wi(e){if(!dm(e))return!1;let{jsDoc:t}=e;return!!t&&t.length>0}function Nk(e){return!!e.type}function E3(e){return!!e.initializer}function Ok(e){switch(e.kind){case 260:case 169:case 208:case 172:case 303:case 306:return!0;default:return!1}}function b0(e){return e.kind===291||e.kind===293||Fg(e)}function Mk(e){return e.kind===183||e.kind===233}function Lk(e){let t=v0;for(let r of e){if(!r.length)continue;let a=0;for(;ar.kind===t)}function Bk(e){let t=new Map;if(e)for(let r of e)t.set(r.escapedName,r);return t}function T0(e){return(e.flags&33554432)!==0}function Uk(){var e="";let t=r=>e+=r;return{getText:()=>e,write:t,rawWrite:t,writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeLiteral:t,writeParameter:t,writeProperty:t,writeSymbol:(r,a)=>t(r),writeTrailingSemicolon:t,writeComment:t,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&Vi(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:Rn,decreaseIndent:Rn,clear:()=>e=""}}function qk(e,t){return e.configFilePath!==t.configFilePath||k3(e,t)}function k3(e,t){return E_(e,t,moduleResolutionOptionDeclarations)}function zk(e,t){return E_(e,t,optionsAffectingProgramStructure)}function E_(e,t,r){return e!==t&&r.some(a=>!$2(j0(e,a),j0(t,a)))}function Wk(e,t){for(;;){let r=t(e);if(r==="quit")return;if(r!==void 0)return r;if(ii(e))return;e=e.parent}}function Vk(e,t){let r=e.entries();for(let[a,_]of r){let p=t(_,a);if(p)return p}}function Hk(e,t){let r=e.keys();for(let a of r){let _=t(a);if(_)return _}}function Gk(e,t){e.forEach((r,a)=>{t.set(a,r)})}function Xk(e){let t=Zs.getText();try{return e(Zs),Zs.getText()}finally{Zs.clear(),Zs.writeKeyword(t)}}function om(e){return e.end-e.pos}function $k(e,t,r){var a,_;return(_=(a=e==null?void 0:e.resolvedModules)==null?void 0:a.get(t,r))==null?void 0:_.resolvedModule}function Qk(e,t,r,a){e.resolvedModules||(e.resolvedModules=createModeAwareCache()),e.resolvedModules.set(t,a,r)}function Yk(e,t,r,a){e.resolvedTypeReferenceDirectiveNames||(e.resolvedTypeReferenceDirectiveNames=createModeAwareCache()),e.resolvedTypeReferenceDirectiveNames.set(t,a,r)}function Kk(e,t,r){var a,_;return(_=(a=e==null?void 0:e.resolvedTypeReferenceDirectiveNames)==null?void 0:a.get(t,r))==null?void 0:_.resolvedTypeReferenceDirective}function Zk(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular}function eD(e,t){return e===t||e.resolvedModule===t.resolvedModule||!!e.resolvedModule&&!!t.resolvedModule&&e.resolvedModule.isExternalLibraryImport===t.resolvedModule.isExternalLibraryImport&&e.resolvedModule.extension===t.resolvedModule.extension&&e.resolvedModule.resolvedFileName===t.resolvedModule.resolvedFileName&&e.resolvedModule.originalPath===t.resolvedModule.originalPath&&rD(e.resolvedModule.packageId,t.resolvedModule.packageId)&&e.node10Result===t.node10Result}function tD(e,t,r,a,_){var p,d;let h=(d=(p=e.resolvedModules)==null?void 0:p.get(r,a))==null?void 0:d.node10Result,l=h?tl(void 0,U.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,h,h.indexOf(nodeModulesPathPart+"@types/")>-1?`@types/${mangleScopedPackageName(_)}`:_):t.typesPackageExists(_)?tl(void 0,U.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,_,mangleScopedPackageName(_)):t.packageBundlesTypes(_)?tl(void 0,U.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,_,r):tl(void 0,U.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,r,mangleScopedPackageName(_));return l&&(l.repopulateInfo=()=>({moduleReference:r,mode:a,packageName:_===r?void 0:_})),l}function rD(e,t){return e===t||!!e&&!!t&&e.name===t.name&&e.subModuleName===t.subModuleName&&e.version===t.version}function D3({name:e,subModuleName:t}){return t?`${e}/${t}`:e}function nD(e){return`${D3(e)}@${e.version}`}function iD(e,t){return e===t||e.resolvedTypeReferenceDirective===t.resolvedTypeReferenceDirective||!!e.resolvedTypeReferenceDirective&&!!t.resolvedTypeReferenceDirective&&e.resolvedTypeReferenceDirective.resolvedFileName===t.resolvedTypeReferenceDirective.resolvedFileName&&!!e.resolvedTypeReferenceDirective.primary==!!t.resolvedTypeReferenceDirective.primary&&e.resolvedTypeReferenceDirective.originalPath===t.resolvedTypeReferenceDirective.originalPath}function aD(e,t,r,a,_,p){N.assert(e.length===r.length);for(let d=0;d=0),Ia(t)[e]}function uD(e){let t=ri(e),r=to(t,e.pos);return`${t.fileName}(${r.line+1},${r.character+1})`}function P3(e,t){N.assert(e>=0);let r=Ia(t),a=e,_=t.text;if(a+1===r.length)return _.length-1;{let p=r[a],d=r[a+1]-1;for(N.assert(mr(_.charCodeAt(d)));p<=d&&mr(_.charCodeAt(d));)d--;return d}}function I3(e,t,r){return!(r&&r(t))&&!e.identifiers.has(t)}function zi(e){return e===void 0?!0:e.pos===e.end&&e.pos>=0&&e.kind!==1}function wl(e){return!zi(e)}function pD(e,t){return No(e)?t===e.expression:eu(e)?t===e.modifiers:Zl(e)?t===e.initializer:oo(e)?t===e.questionToken&&l3(e):_s(e)?t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Gs(e.modifiers,t,Of):_u(e)?t===e.equalsToken||t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Gs(e.modifiers,t,Of):d_(e)?t===e.exclamationToken:J_(e)?t===e.typeParameters||t===e.type||Gs(e.typeParameters,t,No):m_(e)?t===e.typeParameters||Gs(e.typeParameters,t,No):Qo(e)?t===e.typeParameters||t===e.type||Gs(e.typeParameters,t,No):x6(e)?t===e.modifiers||Gs(e.modifiers,t,Of):!1}function Gs(e,t,r){return!e||zt(t)||!r(t)?!1:es(e,t)}function N3(e,t,r){if(t===void 0||t.length===0)return e;let a=0;for(;a[`${to(e,d.range.end).line}`,d])),a=new Map;return{getUnusedExpectations:_,markUsed:p};function _(){return Rd(r.entries()).filter(([d,h])=>h.type===0&&!a.get(d)).map(([d,h])=>h)}function p(d){return r.has(`${d}`)?(a.set(`${d}`,!0),!0):!1}}function Go(e,t,r){return zi(e)?e.pos:zg(e)||e.kind===12?Nt((t||ri(e)).text,e.pos,!1,!0):r&&Wi(e)?Go(e.jsDoc[0],t):e.kind===358&&e._children.length>0?Go(e._children[0],t,r):Nt((t||ri(e)).text,e.pos,!1,!1,nT(e))}function bD(e,t){let r=!zi(e)&&q_(e)?ig(e.modifiers,L_):void 0;return r?Nt((t||ri(e)).text,r.end):Go(e,t)}function Xo(e,t,r=!1){return t_(e.text,t,r)}function vD(e){return!!Kr(e,b8)}function J3(e){return!!(B_(e)&&e.exportClause&&Im(e.exportClause)&&e.exportClause.name.escapedText==="default")}function t_(e,t,r=!1){if(zi(t))return"";let a=e.substring(r?t.pos:Nt(e,t.pos),t.end);return vD(t)&&(a=a.split(/\r\n|\n|\r/).map(_=>gl(_.replace(/^\s*\*/,""))).join(` -`)),a}function sm(e,t=!1){return Xo(ri(e),e,t)}function TD(e){return e.pos}function SD(e,t){return Ml(e,t,TD,kr)}function ti(e){let t=e.emitNode;return t&&t.flags||0}function xD(e){let t=e.emitNode;return t&&t.internalFlags||0}function wD(e,t,r){if(t&&CD(e,r))return Xo(t,e);switch(e.kind){case 11:{let a=r&2?zT:r&1||ti(e)&16777216?vd:Td;return e.singleQuote?"'"+a(e.text,39)+"'":'"'+a(e.text,34)+'"'}case 15:case 16:case 17:case 18:{let a=r&1||ti(e)&16777216?vd:Td,_=e.rawText??aN(a(e.text,96));switch(e.kind){case 15:return"`"+_+"`";case 16:return"`"+_+"${";case 17:return"}"+_+"${";case 18:return"}"+_+"`"}break}case 9:case 10:return e.text;case 14:return r&4&&e.isUnterminated?e.text+(e.text.charCodeAt(e.text.length-1)===92?" /":"/"):e.text}return N.fail(`Literal kind '${e.kind}' not accounted for.`)}function CD(e,t){if(Ta(e)||!e.parent||t&4&&e.isUnterminated)return!1;if(lo(e)){if(e.numericLiteralFlags&26656)return!1;if(e.numericLiteralFlags&512)return!!(t&8)}return!o6(e)}function ED(e){return b_(e)?'"'+Td(e)+'"':""+e}function AD(e){return T_(e).replace(/^(\d)/,"_$1").replace(/\W/g,"_")}function kD(e){return(C_(e)&7)!==0||R3(e)}function R3(e){let t=hm(e);return t.kind===260&&t.parent.kind===299}function _m(e){return Yi(e)&&(e.name.kind===11||cm(e))}function DD(e){return Yi(e)&&e.name.kind===11}function PD(e){return Yi(e)&&mn(e.name)}function j3(e){return Yi(e)||Ee(e)}function ID(e){return ND(e.valueDeclaration)}function ND(e){return!!e&&e.kind===267&&!e.body}function OD(e){return e.kind===312||e.kind===267||rm(e)}function cm(e){return!!(e.flags&2048)}function Gg(e){return _m(e)&&F3(e)}function F3(e){switch(e.parent.kind){case 312:return Zo(e.parent);case 268:return _m(e.parent.parent)&&ii(e.parent.parent.parent)&&!Zo(e.parent.parent.parent)}return!1}function B3(e){var t;return(t=e.declarations)==null?void 0:t.find(r=>!Gg(r)&&!(Yi(r)&&cm(r)))}function MD(e){return e===1||e===100||e===199}function Xg(e,t){return Zo(e)||MD(ni(t))&&!!e.commonJsModuleIndicator}function LD(e,t){switch(e.scriptKind){case 1:case 3:case 2:case 4:break;default:return!1}return e.isDeclarationFile?!1:W2(t,"alwaysStrict")||I8(e.statements)?!0:Zo(e)||B2(t)?ni(t)>=5?!0:!t.noImplicitUseStrict:!1}function JD(e){return!!(e.flags&33554432)||gr(e,2)}function U3(e,t){switch(e.kind){case 312:case 269:case 299:case 267:case 248:case 249:case 250:case 176:case 174:case 177:case 178:case 262:case 218:case 219:case 172:case 175:return!0;case 241:return!rm(t)}return!1}function RD(e){switch(N.type(e),e.kind){case 345:case 353:case 330:return!0;default:return q3(e)}}function q3(e){switch(N.type(e),e.kind){case 179:case 180:case 173:case 181:case 184:case 185:case 324:case 263:case 231:case 264:case 265:case 352:case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function $g(e){switch(e.kind){case 272:case 271:return!0;default:return!1}}function jD(e){return $g(e)||pm(e)}function FD(e){switch(e.kind){case 272:case 271:case 243:case 263:case 262:case 267:case 265:case 264:case 266:return!0;default:return!1}}function BD(e){return lm(e)||Yi(e)||ru(e)||t2(e)}function lm(e){return $g(e)||B_(e)}function UD(e){return Kr(e.parent,t=>!!(getContainerFlags(t)&1))}function S0(e){return Kr(e.parent,t=>U3(t,t.parent))}function qD(e,t){let r=S0(e);for(;r;)t(r),r=S0(r)}function z3(e){return!e||om(e)===0?"(Missing)":sm(e)}function zD(e){return e.declaration?z3(e.declaration.parameters[0].name):void 0}function WD(e){return e.kind===167&&!Qi(e.expression)}function Qg(e){var t;switch(e.kind){case 80:case 81:return(t=e.emitNode)!=null&&t.autoGenerate?void 0:e.escapedText;case 11:case 9:case 15:return Mn(e.text);case 167:return Qi(e.expression)?Mn(e.expression.text):void 0;case 295:return Yl(e);default:return N.assertNever(e)}}function VD(e){return N.checkDefined(Qg(e))}function vi(e){switch(e.kind){case 110:return"this";case 81:case 80:return om(e)===0?Ot(e):sm(e);case 166:return vi(e.left)+"."+vi(e.right);case 211:return Ee(e.name)||jr(e.name)?vi(e.expression)+"."+vi(e.name):N.assertNever(e.name);case 318:return vi(e.left)+vi(e.right);case 295:return vi(e.namespace)+":"+vi(e.name);default:return N.assertNever(e)}}function HD(e,t,...r){let a=ri(e);return W3(a,e,t,...r)}function GD(e,t,r,...a){let _=Nt(e.text,t.pos);return j2(e,_,t.end-_,r,...a)}function W3(e,t,r,...a){let _=Zg(e,t);return j2(e,_.start,_.length,r,...a)}function XD(e,t,r,a){let _=Zg(e,t);return Kg(e,_.start,_.length,r,a)}function $D(e,t,r,a){let _=Nt(e.text,t.pos);return Kg(e,_,t.end-_,r,a)}function Yg(e,t,r){N.assertGreaterThanOrEqual(t,0),N.assertGreaterThanOrEqual(r,0),e&&(N.assertLessThanOrEqual(t,e.text.length),N.assertLessThanOrEqual(t+r,e.text.length))}function Kg(e,t,r,a,_){return Yg(e,t,r),{file:e,start:t,length:r,code:a.code,category:a.category,messageText:a.next?a:a.messageText,relatedInformation:_}}function QD(e,t,r){return{file:e,start:0,length:0,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:r}}function YD(e){return typeof e.messageText=="string"?{code:e.code,category:e.category,messageText:e.messageText,next:e.next}:e.messageText}function KD(e,t,r){return{file:e,start:t.pos,length:t.end-t.pos,code:r.code,category:r.category,messageText:r.message}}function Ys(e,t){let r=ns(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);r.scan();let a=r.getTokenStart();return Hi(a,r.getTokenEnd())}function ZD(e,t){let r=ns(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);return r.scan(),r.getToken()}function eP(e,t){let r=Nt(e.text,t.pos);if(t.body&&t.body.kind===241){let{line:a}=to(e,t.body.pos),{line:_}=to(e,t.body.end);if(a<_)return w_(r,P3(a,e)-r+1)}return Hi(r,t.end)}function Zg(e,t){let r=t;switch(t.kind){case 312:{let p=Nt(e.text,0,!1);return p===e.text.length?w_(0,0):Ys(e,p)}case 260:case 208:case 263:case 231:case 264:case 267:case 266:case 306:case 262:case 218:case 174:case 177:case 178:case 265:case 172:case 171:case 274:r=t.name;break;case 219:return eP(e,t);case 296:case 297:{let p=Nt(e.text,t.pos),d=t.statements.length>0?t.statements[0].pos:t.end;return Hi(p,d)}case 253:case 229:{let p=Nt(e.text,t.pos);return Ys(e,p)}case 238:{let p=Nt(e.text,t.expression.end);return Ys(e,p)}case 357:{let p=Nt(e.text,t.tagName.pos);return Ys(e,p)}}if(r===void 0)return Ys(e,t.pos);N.assert(!cs(r));let a=zi(r),_=a||kd(t)?r.pos:Nt(e.text,r.pos);return a?(N.assert(_===r.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),N.assert(_===r.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(N.assert(_>=r.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),N.assert(_<=r.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),Hi(_,r.end)}function tP(e){return(e.externalModuleIndicator||e.commonJsModuleIndicator)!==void 0}function e2(e){return e.scriptKind===6}function rP(e){return!!($d(e)&2048)}function nP(e){return!!($d(e)&64&&!E4(e,e.parent))}function iP(e){return(C_(e)&7)===6}function aP(e){return(C_(e)&7)===4}function V3(e){return(C_(e)&7)===2}function oP(e){return(C_(e)&7)===1}function sP(e){return e.kind===213&&e.expression.kind===108}function t2(e){return e.kind===213&&e.expression.kind===102}function x0(e){return b6(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}function H3(e){return ru(e)&&m6(e.argument)&&mn(e.argument.literal)}function Ea(e){return e.kind===244&&e.expression.kind===11}function um(e){return!!(ti(e)&2097152)}function w0(e){return um(e)&&os(e)}function _P(e){return Ee(e.name)&&!e.initializer}function C0(e){return um(e)&&as(e)&&so(e.declarationList.declarations,_P)}function cP(e,t){return e.kind!==12?Wo(t.text,e.pos):void 0}function G3(e,t){let r=e.kind===169||e.kind===168||e.kind===218||e.kind===219||e.kind===217||e.kind===260||e.kind===281?y_(_4(t,e.pos),Wo(t,e.pos)):Wo(t,e.pos);return $r(r,a=>t.charCodeAt(a.pos+1)===42&&t.charCodeAt(a.pos+2)===42&&t.charCodeAt(a.pos+3)!==47)}function r2(e){if(182<=e.kind&&e.kind<=205)return!0;switch(e.kind){case 133:case 159:case 150:case 163:case 154:case 136:case 155:case 151:case 157:case 106:case 146:return!0;case 116:return e.parent.kind!==222;case 233:return Nl(e.parent)&&!M0(e);case 168:return e.parent.kind===200||e.parent.kind===195;case 80:(e.parent.kind===166&&e.parent.right===e||e.parent.kind===211&&e.parent.name===e)&&(e=e.parent),N.assert(e.kind===80||e.kind===166||e.kind===211,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 166:case 211:case 110:{let{parent:t}=e;if(t.kind===186)return!1;if(t.kind===205)return!t.isTypeOf;if(182<=t.kind&&t.kind<=205)return!0;switch(t.kind){case 233:return Nl(t.parent)&&!M0(t);case 168:return e===t.constraint;case 352:return e===t.constraint;case 172:case 171:case 169:case 260:return e===t.type;case 262:case 218:case 219:case 176:case 174:case 173:case 177:case 178:return e===t.type;case 179:case 180:case 181:return e===t.type;case 216:return e===t.type;case 213:case 214:case 215:return es(t.typeArguments,e)}}}return!1}function lP(e,t){for(;e;){if(e.kind===t)return!0;e=e.parent}return!1}function uP(e,t){return r(e);function r(a){switch(a.kind){case 253:return t(a);case 269:case 241:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 296:case 297:case 256:case 258:case 299:return Bt(a,r)}}}function pP(e,t){return r(e);function r(a){switch(a.kind){case 229:t(a);let _=a.expression;_&&r(_);return;case 266:case 264:case 267:case 265:return;default:if(Gi(a)){if(a.name&&a.name.kind===167){r(a.name.expression);return}}else r2(a)||Bt(a,r)}}}function fP(e){return e&&e.kind===188?e.elementType:e&&e.kind===183?Ld(e.typeArguments):void 0}function dP(e){switch(e.kind){case 264:case 263:case 231:case 187:return e.members;case 210:return e.properties}}function n2(e){if(e)switch(e.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function mP(e){return n2(e)||nm(e)}function X3(e){return e.parent.kind===261&&e.parent.parent.kind===243}function hP(e){return Wt(e)?uo(e.parent)&&Ct(e.parent.parent)&&Ja(e.parent.parent)===2||i2(e.parent):!1}function i2(e){return Wt(e)?Ct(e)&&Ja(e)===1:!1}function yP(e){return(ki(e)?V3(e)&&Ee(e.name)&&X3(e):oo(e)?O0(e)&&gm(e):Zl(e)&&O0(e))||i2(e)}function gP(e){switch(e.kind){case 174:case 173:case 176:case 177:case 178:case 262:case 218:return!0}return!1}function bP(e,t){for(;;){if(t&&t(e),e.statement.kind!==256)return e.statement;e=e.statement}}function $3(e){return e&&e.kind===241&&Gi(e.parent)}function vP(e){return e&&e.kind===174&&e.parent.kind===210}function TP(e){return(e.kind===174||e.kind===177||e.kind===178)&&(e.parent.kind===210||e.parent.kind===231)}function SP(e){return e&&e.kind===1}function xP(e){return e&&e.kind===0}function a2(e,t,r,a){return yr(e==null?void 0:e.properties,_=>{if(!_s(_))return;let p=Qg(_.name);return t===p||a&&a===p?r(_):void 0})}function wP(e,t,r){return a2(e,t,a=>iu(a.initializer)?Yr(a.initializer.elements,_=>mn(_)&&_.text===r):void 0)}function Q3(e){if(e&&e.statements.length){let t=e.statements[0].expression;return On(t,uo)}}function CP(e,t,r){return Y3(e,t,a=>iu(a.initializer)?Yr(a.initializer.elements,_=>mn(_)&&_.text===r):void 0)}function Y3(e,t,r){return a2(Q3(e),t,r)}function EP(e){return Kr(e.parent,Gi)}function AP(e){return Kr(e.parent,_3)}function E0(e){return Kr(e.parent,dn)}function kP(e){return Kr(e.parent,t=>dn(t)||Gi(t)?"quit":eu(t))}function DP(e){return Kr(e.parent,rm)}function PP(e){let t=Kr(e.parent,r=>dn(r)?"quit":L_(r));return t&&dn(t.parent)?E0(t.parent):E0(t??e)}function o2(e,t,r){for(N.assert(e.kind!==312);;){if(e=e.parent,!e)return N.fail();switch(e.kind){case 167:if(r&&dn(e.parent.parent))return e;e=e.parent.parent;break;case 170:e.parent.kind===169&&no(e.parent.parent)?e=e.parent.parent:no(e.parent)&&(e=e.parent);break;case 219:if(!t)continue;case 262:case 218:case 267:case 175:case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 179:case 180:case 181:case 266:case 312:return e}}}function IP(e){switch(e.kind){case 219:case 262:case 218:case 172:return!0;case 241:switch(e.parent.kind){case 176:case 174:case 177:case 178:return!0;default:return!1}default:return!1}}function NP(e){Ee(e)&&(Yo(e.parent)||os(e.parent))&&e.parent.name===e&&(e=e.parent);let t=o2(e,!0,!1);return ii(t)}function OP(e){let t=o2(e,!1,!1);if(t)switch(t.kind){case 176:case 262:case 218:return t}}function MP(e,t){for(;;){if(e=e.parent,!e)return;switch(e.kind){case 167:e=e.parent;break;case 262:case 218:case 219:if(!t)continue;case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 175:return e;case 170:e.parent.kind===169&&no(e.parent.parent)?e=e.parent.parent:no(e.parent)&&(e=e.parent);break}}}function LP(e){if(e.kind===218||e.kind===219){let t=e,r=e.parent;for(;r.kind===217;)t=r,r=r.parent;if(r.kind===213&&r.expression===t)return r}}function JP(e){return e.kind===108||yd(e)}function yd(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===108}function RP(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===110}function jP(e){var t;return!!e&&ki(e)&&((t=e.initializer)==null?void 0:t.kind)===110}function FP(e){return!!e&&(_u(e)||_s(e))&&Ct(e.parent.parent)&&e.parent.parent.operatorToken.kind===64&&e.parent.parent.right.kind===110}function BP(e){switch(e.kind){case 183:return e.typeName;case 233:return co(e.expression)?e.expression:void 0;case 80:case 166:return e}}function UP(e){switch(e.kind){case 215:return e.tag;case 286:case 285:return e.tagName;default:return e.expression}}function K3(e,t,r,a){if(e&&Qd(t)&&jr(t.name))return!1;switch(t.kind){case 263:return!0;case 231:return!e;case 172:return r!==void 0&&(e?Yo(r):dn(r)&&!iS(t)&&!aS(t));case 177:case 178:case 174:return t.body!==void 0&&r!==void 0&&(e?Yo(r):dn(r));case 169:return e?r!==void 0&&r.body!==void 0&&(r.kind===176||r.kind===174||r.kind===178)&&KT(r)!==t&&a!==void 0&&a.kind===263:!1}return!1}function l_(e,t,r,a){return El(t)&&K3(e,t,r,a)}function A0(e,t,r,a){return l_(e,t,r,a)||s2(e,t,r)}function s2(e,t,r){switch(t.kind){case 263:return mt(t.members,a=>A0(e,a,t,r));case 231:return!e&&mt(t.members,a=>A0(e,a,t,r));case 174:case 178:case 176:return mt(t.parameters,a=>l_(e,a,t,r));default:return!1}}function qP(e,t){if(l_(e,t))return!0;let r=YT(t);return!!r&&s2(e,r,t)}function zP(e,t,r){let a;if(nm(t)){let{firstAccessor:_,secondAccessor:p,setAccessor:d}=P2(r.members,t),h=El(_)?_:p&&El(p)?p:void 0;if(!h||t!==h)return!1;a=d==null?void 0:d.parameters}else d_(t)&&(a=t.parameters);if(l_(e,t,r))return!0;if(a){for(let _ of a)if(!Xl(_)&&l_(e,_,t,r))return!0}return!1}function Z3(e){if(e.textSourceNode){switch(e.textSourceNode.kind){case 11:return Z3(e.textSourceNode);case 15:return e.text===""}return!1}return e.text===""}function Mf(e){let{parent:t}=e;return t.kind===286||t.kind===285||t.kind===287?t.tagName===e:!1}function _2(e){switch(e.kind){case 108:case 106:case 112:case 97:case 14:case 209:case 210:case 211:case 212:case 213:case 214:case 215:case 234:case 216:case 238:case 235:case 217:case 218:case 231:case 219:case 222:case 220:case 221:case 224:case 225:case 226:case 227:case 230:case 228:case 232:case 284:case 285:case 288:case 229:case 223:case 236:return!0;case 233:return!Nl(e.parent)&&!Mm(e.parent);case 166:for(;e.parent.kind===166;)e=e.parent;return e.parent.kind===186||ul(e.parent)||zf(e.parent)||r_(e.parent)||Mf(e);case 318:for(;r_(e.parent);)e=e.parent;return e.parent.kind===186||ul(e.parent)||zf(e.parent)||r_(e.parent)||Mf(e);case 81:return Ct(e.parent)&&e.parent.left===e&&e.parent.operatorToken.kind===103;case 80:if(e.parent.kind===186||ul(e.parent)||zf(e.parent)||r_(e.parent)||Mf(e))return!0;case 9:case 10:case 11:case 15:case 110:return eT(e);default:return!1}}function eT(e){let{parent:t}=e;switch(t.kind){case 260:case 169:case 172:case 171:case 306:case 303:case 208:return t.initializer===e;case 244:case 245:case 246:case 247:case 253:case 254:case 255:case 296:case 257:return t.expression===e;case 248:let r=t;return r.initializer===e&&r.initializer.kind!==261||r.condition===e||r.incrementor===e;case 249:case 250:let a=t;return a.initializer===e&&a.initializer.kind!==261||a.expression===e;case 216:case 234:return e===t.expression;case 239:return e===t.expression;case 167:return e===t.expression;case 170:case 294:case 293:case 305:return!0;case 233:return t.expression===e&&!r2(t);case 304:return t.objectAssignmentInitializer===e;case 238:return e===t.expression;default:return _2(t)}}function tT(e){for(;e.kind===166||e.kind===80;)e=e.parent;return e.kind===186}function WP(e){return Im(e)&&!!e.parent.moduleSpecifier}function rT(e){return e.kind===271&&e.moduleReference.kind===283}function VP(e){return N.assert(rT(e)),e.moduleReference.expression}function HP(e){return pm(e)&&R2(e.initializer).arguments[0]}function GP(e){return e.kind===271&&e.moduleReference.kind!==283}function c2(e){return Wt(e)}function XP(e){return!Wt(e)}function Wt(e){return!!e&&!!(e.flags&524288)}function $P(e){return!!e&&!!(e.flags&134217728)}function QP(e){return!e2(e)}function nT(e){return!!e&&!!(e.flags&16777216)}function YP(e){return R_(e)&&Ee(e.typeName)&&e.typeName.escapedText==="Object"&&e.typeArguments&&e.typeArguments.length===2&&(e.typeArguments[0].kind===154||e.typeArguments[0].kind===150)}function Wl(e,t){if(e.kind!==213)return!1;let{expression:r,arguments:a}=e;if(r.kind!==80||r.escapedText!=="require"||a.length!==1)return!1;let _=a[0];return!t||Kn(_)}function iT(e){return aT(e,!1)}function pm(e){return aT(e,!0)}function KP(e){return nu(e)&&pm(e.parent.parent)}function aT(e,t){return ki(e)&&!!e.initializer&&Wl(t?R2(e.initializer):e.initializer,!0)}function oT(e){return as(e)&&e.declarationList.declarations.length>0&&so(e.declarationList.declarations,t=>iT(t))}function ZP(e){return e===39||e===34}function eI(e,t){return Xo(t,e).charCodeAt(0)===34}function k0(e){return Ct(e)||$o(e)||Ee(e)||j_(e)}function sT(e){return Wt(e)&&e.initializer&&Ct(e.initializer)&&(e.initializer.operatorToken.kind===57||e.initializer.operatorToken.kind===61)&&e.name&&co(e.name)&&u_(e.name,e.initializer.left)?e.initializer.right:e.initializer}function tI(e){let t=sT(e);return t&&A_(t,$l(e.name))}function rI(e,t){return yr(e.properties,r=>_s(r)&&Ee(r.name)&&r.name.escapedText==="value"&&r.initializer&&A_(r.initializer,t))}function nI(e){if(e&&e.parent&&Ct(e.parent)&&e.parent.operatorToken.kind===64){let t=$l(e.parent.left);return A_(e.parent.right,t)||iI(e.parent.left,e.parent.right,t)}if(e&&j_(e)&&p2(e)){let t=rI(e.arguments[2],e.arguments[1].text==="prototype");if(t)return t}}function A_(e,t){if(j_(e)){let r=Gl(e.expression);return r.kind===218||r.kind===219?e:void 0}if(e.kind===218||e.kind===231||e.kind===219||uo(e)&&(e.properties.length===0||t))return e}function iI(e,t,r){let a=Ct(t)&&(t.operatorToken.kind===57||t.operatorToken.kind===61)&&A_(t.right,r);if(a&&u_(e,t.left))return a}function aI(e){let t=ki(e.parent)?e.parent.name:Ct(e.parent)&&e.parent.operatorToken.kind===64?e.parent.left:void 0;return t&&A_(e.right,$l(t))&&co(t)&&u_(t,e.left)}function oI(e){if(Ct(e.parent)){let t=(e.parent.operatorToken.kind===57||e.parent.operatorToken.kind===61)&&Ct(e.parent.parent)?e.parent.parent:e.parent;if(t.operatorToken.kind===64&&Ee(t.left))return t.left}else if(ki(e.parent))return e.parent.name}function u_(e,t){return P0(e)&&P0(t)?bd(e)===bd(t):ro(e)&&Lf(t)&&(t.expression.kind===110||Ee(t.expression)&&(t.expression.escapedText==="window"||t.expression.escapedText==="self"||t.expression.escapedText==="global"))?u_(e,lT(t)):Lf(e)&&Lf(t)?io(e)===io(t)&&u_(e.expression,t.expression):!1}function l2(e){for(;Na(e,!0);)e=e.right;return e}function _T(e){return Ee(e)&&e.escapedText==="exports"}function cT(e){return Ee(e)&&e.escapedText==="module"}function u2(e){return(Br(e)||Vl(e))&&cT(e.expression)&&io(e)==="exports"}function Ja(e){let t=sI(e);return t===5||Wt(e)?t:0}function p2(e){return Ka(e.arguments)===3&&Br(e.expression)&&Ee(e.expression.expression)&&Ot(e.expression.expression)==="Object"&&Ot(e.expression.name)==="defineProperty"&&Qi(e.arguments[1])&&p_(e.arguments[0],!0)}function Lf(e){return Br(e)||Vl(e)}function Vl(e){return Ra(e)&&Qi(e.argumentExpression)}function k_(e,t){return Br(e)&&(!t&&e.expression.kind===110||Ee(e.name)&&p_(e.expression,!0))||f2(e,t)}function f2(e,t){return Vl(e)&&(!t&&e.expression.kind===110||co(e.expression)||k_(e.expression,!0))}function p_(e,t){return co(e)||k_(e,t)}function lT(e){return Br(e)?e.name:e.argumentExpression}function sI(e){if(j_(e)){if(!p2(e))return 0;let t=e.arguments[0];return _T(t)||u2(t)?8:k_(t)&&io(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!$o(e.left)||_I(l2(e))?0:p_(e.left.expression,!0)&&io(e.left)==="prototype"&&uo(pT(e))?6:uT(e.left)}function _I(e){return h6(e)&&lo(e.expression)&&e.expression.text==="0"}function fm(e){if(Br(e))return e.name;let t=Gl(e.argumentExpression);return lo(t)||Kn(t)?t:e}function io(e){let t=fm(e);if(t){if(Ee(t))return t.escapedText;if(Kn(t)||lo(t))return Mn(t.text)}}function uT(e){if(e.expression.kind===110)return 4;if(u2(e))return 2;if(p_(e.expression,!0)){if($l(e.expression))return 3;let t=e;for(;!Ee(t.expression);)t=t.expression;let r=t.expression;if((r.escapedText==="exports"||r.escapedText==="module"&&io(t)==="exports")&&k_(e))return 1;if(p_(e,!0)||Ra(e)&&S2(e))return 5}return 0}function pT(e){for(;Ct(e.right);)e=e.right;return e.right}function cI(e){return Ct(e)&&Ja(e)===3}function lI(e){return Wt(e)&&e.parent&&e.parent.kind===244&&(!Ra(e)||Vl(e))&&!!Zd(e.parent)}function uI(e,t){let{valueDeclaration:r}=e;(!r||!(t.flags&33554432&&!Wt(t)&&!(r.flags&33554432))&&k0(r)&&!k0(t)||r.kind!==t.kind&&j3(r))&&(e.valueDeclaration=t)}function pI(e){if(!e||!e.valueDeclaration)return!1;let t=e.valueDeclaration;return t.kind===262||ki(t)&&t.initializer&&Gi(t.initializer)}function fI(e){var t,r;switch(e.kind){case 260:case 208:return(t=Kr(e.initializer,a=>Wl(a,!0)))==null?void 0:t.arguments[0];case 272:return On(e.moduleSpecifier,Kn);case 271:return On((r=On(e.moduleReference,Nm))==null?void 0:r.expression,Kn);case 273:case 280:return On(e.parent.moduleSpecifier,Kn);case 274:case 281:return On(e.parent.parent.moduleSpecifier,Kn);case 276:return On(e.parent.parent.parent.moduleSpecifier,Kn);default:N.assertNever(e)}}function dI(e){return fT(e)||N.failBadSyntaxKind(e.parent)}function fT(e){switch(e.parent.kind){case 272:case 278:return e.parent;case 283:return e.parent.parent;case 213:return t2(e.parent)||Wl(e.parent,!1)?e.parent:void 0;case 201:return N.assert(mn(e)),On(e.parent.parent,ru);default:return}}function d2(e){switch(e.kind){case 272:case 278:return e.moduleSpecifier;case 271:return e.moduleReference.kind===283?e.moduleReference.expression:void 0;case 205:return H3(e)?e.argument.literal:void 0;case 213:return e.arguments[0];case 267:return e.name.kind===11?e.name:void 0;default:return N.assertNever(e)}}function dT(e){switch(e.kind){case 272:return e.importClause&&On(e.importClause.namedBindings,E6);case 271:return e;case 278:return e.exportClause&&On(e.exportClause,Im);default:return N.assertNever(e)}}function mT(e){return e.kind===272&&!!e.importClause&&!!e.importClause.name}function mI(e,t){if(e.name){let r=t(e);if(r)return r}if(e.namedBindings){let r=E6(e.namedBindings)?t(e.namedBindings):yr(e.namedBindings.elements,t);if(r)return r}}function hI(e){if(e)switch(e.kind){case 169:case 174:case 173:case 304:case 303:case 172:case 171:return e.questionToken!==void 0}return!1}function yI(e){let t=Om(e)?g_(e.parameters):void 0,r=On(t&&t.name,Ee);return!!r&&r.escapedText==="new"}function Hl(e){return e.kind===353||e.kind===345||e.kind===347}function gI(e){return Hl(e)||T6(e)}function bI(e){return ou(e)&&Ct(e.expression)&&e.expression.operatorToken.kind===64?l2(e.expression):void 0}function hT(e){return ou(e)&&Ct(e.expression)&&Ja(e.expression)!==0&&Ct(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function m2(e){switch(e.kind){case 243:let t=Cl(e);return t&&t.initializer;case 172:return e.initializer;case 303:return e.initializer}}function Cl(e){return as(e)?g_(e.declarationList.declarations):void 0}function yT(e){return Yi(e)&&e.body&&e.body.kind===267?e.body:void 0}function vI(e){if(e.kind>=243&&e.kind<=259)return!0;switch(e.kind){case 80:case 110:case 108:case 166:case 236:case 212:case 211:case 208:case 218:case 219:case 174:case 177:case 178:return!0;default:return!1}}function dm(e){switch(e.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 324:case 330:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function gT(e,t){let r;n2(e)&&E3(e)&&Wi(e.initializer)&&(r=Rr(r,Fb(e,ka(e.initializer.jsDoc))));let a=e;for(;a&&a.parent;){if(Wi(a)&&(r=Rr(r,Fb(e,ka(a.jsDoc)))),a.kind===169){r=Rr(r,(t?J4:Kd)(a));break}if(a.kind===168){r=Rr(r,(t?F4:j4)(a));break}a=bT(a)}return r||$e}function Fb(e,t){if(cs(t)){let r=$r(t.tags,a=>Bb(e,a));return t.tags===r?[t]:r}return Bb(e,t)?[t]:void 0}function Bb(e,t){return!(lu(t)||j6(t))||!t.parent||!cs(t.parent)||!is(t.parent.parent)||t.parent.parent===e}function bT(e){let t=e.parent;if(t.kind===303||t.kind===277||t.kind===172||t.kind===244&&e.kind===211||t.kind===253||yT(t)||Ct(e)&&e.operatorToken.kind===64)return t;if(t.parent&&(Cl(t.parent)===e||Ct(t)&&t.operatorToken.kind===64))return t.parent;if(t.parent&&t.parent.parent&&(Cl(t.parent.parent)||m2(t.parent.parent)===e||hT(t.parent.parent)))return t.parent.parent}function TI(e){if(e.symbol)return e.symbol;if(!Ee(e.name))return;let t=e.name.escapedText,r=h2(e);if(!r)return;let a=Yr(r.parameters,_=>_.name.kind===80&&_.name.escapedText===t);return a&&a.symbol}function SI(e){if(cs(e.parent)&&e.parent.tags){let t=Yr(e.parent.tags,Hl);if(t)return t}return h2(e)}function h2(e){let t=y2(e);if(t)return Zl(t)&&t.type&&Gi(t.type)?t.type:Gi(t)?t:void 0}function y2(e){let t=vT(e);if(t)return hT(t)||bI(t)||m2(t)||Cl(t)||yT(t)||t}function vT(e){let t=g2(e);if(!t)return;let r=t.parent;if(r&&r.jsDoc&&t===wi(r.jsDoc))return r}function g2(e){return Kr(e.parent,cs)}function xI(e){let t=e.name.escapedText,{typeParameters:r}=e.parent.parent.parent;return r&&Yr(r,a=>a.name.escapedText===t)}function wI(e){return!!e.typeArguments}function TT(e){let t=e.parent;for(;;){switch(t.kind){case 226:let r=t.operatorToken.kind;return D_(r)&&t.left===e?r===64||vm(r)?1:2:0;case 224:case 225:let a=t.operator;return a===46||a===47?2:0;case 249:case 250:return t.initializer===e?1:0;case 217:case 209:case 230:case 235:e=t;break;case 305:e=t.parent;break;case 304:if(t.name!==e)return 0;e=t.parent;break;case 303:if(t.name===e)return 0;e=t.parent;break;default:return 0}t=e.parent}}function CI(e){return TT(e)!==0}function EI(e){switch(e.kind){case 241:case 243:case 254:case 245:case 255:case 269:case 296:case 297:case 256:case 248:case 249:case 250:case 246:case 247:case 258:case 299:return!0}return!1}function AI(e){return Am(e)||km(e)||Rg(e)||os(e)||J_(e)}function ST(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function kI(e){return ST(e,196)}function xT(e){return ST(e,217)}function DI(e){let t;for(;e&&e.kind===196;)t=e,e=e.parent;return[t,e]}function PI(e){for(;f6(e);)e=e.type;return e}function Gl(e,t){return ls(e,t?17:1)}function II(e){return e.kind!==211&&e.kind!==212?!1:(e=xT(e.parent),e&&e.kind===220)}function NI(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1}function wT(e){return!ii(e)&&!im(e)&&Ho(e.parent)&&e.parent.name===e}function OI(e){let t=e.parent;switch(e.kind){case 11:case 15:case 9:if(ao(t))return t.parent;case 80:if(Ho(t))return t.name===e?t:void 0;if(M_(t)){let r=t.parent;return h_(r)&&r.name===t?r:void 0}else{let r=t.parent;return Ct(r)&&Ja(r)!==0&&(r.left.symbol||r.symbol)&&Bl(r)===e?r:void 0}case 81:return Ho(t)&&t.name===e?t:void 0;default:return}}function CT(e){return Qi(e)&&e.parent.kind===167&&Ho(e.parent.parent)}function MI(e){let t=e.parent;switch(t.kind){case 172:case 171:case 174:case 173:case 177:case 178:case 306:case 303:case 211:return t.name===e;case 166:return t.right===e;case 208:case 276:return t.propertyName===e;case 281:case 291:case 285:case 286:case 287:return!0}return!1}function LI(e){return e.kind===271||e.kind===270||e.kind===273&&e.name||e.kind===274||e.kind===280||e.kind===276||e.kind===281||e.kind===277&&D0(e)?!0:Wt(e)&&(Ct(e)&&Ja(e)===2&&D0(e)||Br(e)&&Ct(e.parent)&&e.parent.left===e&&e.parent.operatorToken.kind===64&&b2(e.parent.right))}function ET(e){switch(e.parent.kind){case 273:case 276:case 274:case 281:case 277:case 271:case 280:return e.parent;case 166:do e=e.parent;while(e.parent.kind===166);return ET(e)}}function b2(e){return co(e)||Il(e)}function D0(e){let t=AT(e);return b2(t)}function AT(e){return ss(e)?e.expression:e.right}function JI(e){return e.kind===304?e.name:e.kind===303?e.initializer:e.parent.right}function kT(e){let t=DT(e);if(t&&Wt(e)){let r=B4(e);if(r)return r.class}return t}function DT(e){let t=mm(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function PT(e){if(Wt(e))return U4(e).map(t=>t.class);{let t=mm(e.heritageClauses,119);return t==null?void 0:t.types}}function IT(e){return su(e)?NT(e)||$e:dn(e)&&y_($f(kT(e)),PT(e))||$e}function NT(e){let t=mm(e.heritageClauses,96);return t?t.types:void 0}function mm(e,t){if(e){for(let r of e)if(r.token===t)return r}}function RI(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}}function Si(e){return 83<=e&&e<=165}function OT(e){return 19<=e&&e<=79}function Jf(e){return Si(e)||OT(e)}function v2(e){return 128<=e&&e<=165}function MT(e){return Si(e)&&!v2(e)}function jI(e){return 119<=e&&e<=127}function FI(e){let t=Rl(e);return t!==void 0&&MT(t)}function BI(e){let t=Rl(e);return t!==void 0&&Si(t)}function UI(e){let t=P4(e);return!!t&&!v2(t)}function qI(e){return 2<=e&&e<=7}function zI(e){if(!e)return 4;let t=0;switch(e.kind){case 262:case 218:case 174:e.asteriskToken&&(t|=1);case 219:gr(e,512)&&(t|=2);break}return e.body||(t|=4),t}function WI(e){switch(e.kind){case 262:case 218:case 219:case 174:return e.body!==void 0&&e.asteriskToken===void 0&&gr(e,512)}return!1}function Qi(e){return Kn(e)||lo(e)}function T2(e){return Dm(e)&&(e.operator===40||e.operator===41)&&lo(e.operand)}function LT(e){let t=Bl(e);return!!t&&S2(t)}function S2(e){if(!(e.kind===167||e.kind===212))return!1;let t=Ra(e)?Gl(e.argumentExpression):e.expression;return!Qi(t)&&!T2(t)}function gd(e){switch(e.kind){case 80:case 81:return e.escapedText;case 11:case 9:return Mn(e.text);case 167:let t=e.expression;return Qi(t)?Mn(t.text):T2(t)?t.operator===41?nr(t.operator)+t.operand.text:t.operand.text:void 0;case 295:return Yl(e);default:return N.assertNever(e)}}function P0(e){switch(e.kind){case 80:case 11:case 15:case 9:return!0;default:return!1}}function bd(e){return ro(e)?Ot(e):U_(e)?Kl(e):e.text}function JT(e){return ro(e)?e.escapedText:U_(e)?Yl(e):Mn(e.text)}function VI(e){return`__@${getSymbolId(e)}@${e.escapedName}`}function HI(e,t){return`__#${getSymbolId(e)}@${t}`}function GI(e){return Fr(e.escapedName,"__@")}function XI(e){return Fr(e.escapedName,"__#")}function $I(e){return e.kind===80&&e.escapedText==="Symbol"}function RT(e){return Ee(e)?Ot(e)==="__proto__":mn(e)&&e.text==="__proto__"}function Ks(e,t){switch(e=ls(e),e.kind){case 231:if(classHasDeclaredOrExplicitlyAssignedName(e))return!1;break;case 218:if(e.name)return!1;break;case 219:break;default:return!1}return typeof t=="function"?t(e):!0}function jT(e){switch(e.kind){case 303:return!RT(e.name);case 304:return!!e.objectAssignmentInitializer;case 260:return Ee(e.name)&&!!e.initializer;case 169:return Ee(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 208:return Ee(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 172:return!!e.initializer;case 226:switch(e.operatorToken.kind){case 64:case 77:case 76:case 78:return Ee(e.left)}break;case 277:return!0}return!1}function QI(e,t){if(!jT(e))return!1;switch(e.kind){case 303:return Ks(e.initializer,t);case 304:return Ks(e.objectAssignmentInitializer,t);case 260:case 169:case 208:case 172:return Ks(e.initializer,t);case 226:return Ks(e.right,t);case 277:return Ks(e.expression,t)}}function YI(e){return e.escapedText==="push"||e.escapedText==="unshift"}function KI(e){return hm(e).kind===169}function hm(e){for(;e.kind===208;)e=e.parent.parent;return e}function ZI(e){let t=e.kind;return t===176||t===218||t===262||t===219||t===174||t===177||t===178||t===267||t===312}function Ta(e){return Oa(e.pos)||Oa(e.end)}function eN(e){return Fl(e,ii)||e}function tN(e){let t=x2(e),r=e.kind===214&&e.arguments!==void 0;return FT(e.kind,t,r)}function FT(e,t,r){switch(e){case 214:return r?0:1;case 224:case 221:case 222:case 220:case 223:case 227:case 229:return 1;case 226:switch(t){case 43:case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 1}}return 0}function rN(e){let t=x2(e),r=e.kind===214&&e.arguments!==void 0;return BT(e.kind,t,r)}function x2(e){return e.kind===226?e.operatorToken.kind:e.kind===224||e.kind===225?e.operator:e.kind}function BT(e,t,r){switch(e){case 361:return 0;case 230:return 1;case 229:return 2;case 227:return 4;case 226:switch(t){case 28:return 0;case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 3;default:return pl(t)}case 216:case 235:case 224:case 221:case 222:case 220:case 223:return 16;case 225:return 17;case 213:return 18;case 214:return r?19:18;case 215:case 211:case 212:case 236:return 19;case 234:case 238:return 11;case 110:case 108:case 80:case 81:case 106:case 112:case 97:case 9:case 10:case 11:case 209:case 210:case 218:case 219:case 231:case 14:case 15:case 228:case 217:case 232:case 284:case 285:case 288:return 20;default:return-1}}function pl(e){switch(e){case 61:return 4;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function nN(e){return $r(e,t=>{switch(t.kind){case 294:return!!t.expression;case 12:return!t.containsOnlyTriviaWhiteSpaces;default:return!0}})}function iN(){let e=[],t=[],r=new Map,a=!1;return{add:p,lookup:_,getGlobalDiagnostics:d,getDiagnostics:h};function _(l){let v;if(l.file?v=r.get(l.file.fileName):v=e,!v)return;let y=Ml(v,l,bt,xd);if(y>=0)return v[y]}function p(l){let v;l.file?(v=r.get(l.file.fileName),v||(v=[],r.set(l.file.fileName,v),yl(t,l.file.fileName,Ci))):(a&&(a=!1,e=e.slice()),v=e),yl(v,l,xd)}function d(){return a=!0,e}function h(l){if(l)return r.get(l)||[];let v=Tv(t,y=>r.get(y));return e.length&&v.unshift(...e),v}}function aN(e){return e.replace(bx,"\\${")}function UT(e){return e&&!!(Bx(e)?e.templateFlags:e.head.templateFlags||mt(e.templateSpans,t=>!!t.literal.templateFlags))}function qT(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}function oN(e,t,r){if(e.charCodeAt(0)===0){let a=r.charCodeAt(t+e.length);return a>=48&&a<=57?"\\x00":"\\0"}return xx.get(e)||qT(e.charCodeAt(0))}function vd(e,t){let r=t===96?Sx:t===39?Tx:vx;return e.replace(r,oN)}function Td(e,t){return e=vd(e,t),W0.test(e)?e.replace(W0,r=>qT(r.charCodeAt(0))):e}function sN(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _N(e){return e.charCodeAt(0)===0?"�":Ex.get(e)||sN(e.charCodeAt(0))}function zT(e,t){let r=t===39?Cx:wx;return e.replace(r,_N)}function cN(e){let t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&lN(e.charCodeAt(0))?e.substring(1,t-1):e}function lN(e){return e===39||e===34||e===96}function WT(e){let t=e.charCodeAt(0);return t>=97&&t<=122||eo(e,"-")}function w2(e){let t=Po[1];for(let r=Po.length;r<=e;r++)Po.push(Po[r-1]+t);return Po[e]}function Jo(){return Po[1].length}function uN(){return eo(Hf,"-dev")||eo(Hf,"-insiders")}function pN(e){var t,r,a,_,p,d=!1;function h(K){let ue=Vd(K);ue.length>1?(_=_+ue.length-1,p=t.length-K.length+ka(ue),a=p-t.length===0):a=!1}function l(K){K&&K.length&&(a&&(K=w2(r)+K,a=!1),t+=K,h(K))}function v(K){K&&(d=!1),l(K)}function y(K){K&&(d=!0),l(K)}function C(){t="",r=0,a=!0,_=0,p=0,d=!1}function S(K){K!==void 0&&(t+=K,h(K),d=!1)}function k(K){K&&K.length&&v(K)}function L(K){(!a||K)&&(t+=e,_++,p=t.length,a=!0,d=!1)}function G(){return a?t.length:t.length+e.length}return C(),{write:v,rawWrite:S,writeLiteral:k,writeLine:L,increaseIndent:()=>{r++},decreaseIndent:()=>{r--},getIndent:()=>r,getTextPos:()=>t.length,getLine:()=>_,getColumn:()=>a?r*Jo():t.length-p,getText:()=>t,isAtStartOfLine:()=>a,hasTrailingComment:()=>d,hasTrailingWhitespace:()=>!!t.length&&Vi(t.charCodeAt(t.length-1)),clear:C,writeKeyword:v,writeOperator:v,writeParameter:v,writeProperty:v,writePunctuation:v,writeSpace:v,writeStringLiteral:v,writeSymbol:(K,ue)=>v(K),writeTrailingSemicolon:v,writeComment:y,getTextPosWithWriteLine:G}}function fN(e){let t=!1;function r(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return{...e,writeTrailingSemicolon(){t=!0},writeLiteral(a){r(),e.writeLiteral(a)},writeStringLiteral(a){r(),e.writeStringLiteral(a)},writeSymbol(a,_){r(),e.writeSymbol(a,_)},writePunctuation(a){r(),e.writePunctuation(a)},writeKeyword(a){r(),e.writeKeyword(a)},writeOperator(a){r(),e.writeOperator(a)},writeParameter(a){r(),e.writeParameter(a)},writeSpace(a){r(),e.writeSpace(a)},writeProperty(a){r(),e.writeProperty(a)},writeComment(a){r(),e.writeComment(a)},writeLine(){r(),e.writeLine()},increaseIndent(){r(),e.increaseIndent()},decreaseIndent(){r(),e.decreaseIndent()}}}function C2(e){return e.useCaseSensitiveFileNames?e.useCaseSensitiveFileNames():!1}function VT(e){return Bd(C2(e))}function HT(e,t,r){return t.moduleName||E2(e,t.fileName,r&&r.fileName)}function Ub(e,t){return e.getCanonicalFileName(Pa(t,e.getCurrentDirectory()))}function dN(e,t,r){let a=t.getExternalModuleFileFromDeclaration(r);if(!a||a.isDeclarationFile)return;let _=d2(r);if(!(_&&Kn(_)&&!rs(_.text)&&Ub(e,a.path).indexOf(Ub(e,zo(e.getCommonSourceDirectory())))===-1))return HT(e,a)}function E2(e,t,r){let a=l=>e.getCanonicalFileName(l),_=xi(r?$i(r):e.getCommonSourceDirectory(),e.getCurrentDirectory(),a),p=Pa(t,e.getCurrentDirectory()),d=bg(_,p,_,a,!1),h=Al(d);return r?hg(h):h}function mN(e,t,r){let a=t.getCompilerOptions(),_;return a.outDir?_=Al($T(e,t,a.outDir)):_=Al(e),_+r}function hN(e,t){return GT(e,t.getCompilerOptions(),t.getCurrentDirectory(),t.getCommonSourceDirectory(),r=>t.getCanonicalFileName(r))}function GT(e,t,r,a,_){let p=t.declarationDir||t.outDir,d=p?k2(e,p,r,a,_):e,h=XT(d);return Al(d)+h}function XT(e){return ei(e,[".mjs",".mts"])?".d.mts":ei(e,[".cjs",".cts"])?".d.cts":ei(e,[".json"])?".d.json.ts":".d.ts"}function yN(e){return ei(e,[".d.mts",".mjs",".mts"])?[".mts",".mjs"]:ei(e,[".d.cts",".cjs",".cts"])?[".cts",".cjs"]:ei(e,[".d.json.ts"])?[".json"]:[".tsx",".ts",".jsx",".js"]}function A2(e){return e.outFile||e.out}function gN(e,t){var r;if(e.paths)return e.baseUrl??N.checkDefined(e.pathsBasePath||((r=t.getCurrentDirectory)==null?void 0:r.call(t)),"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.")}function bN(e,t,r){let a=e.getCompilerOptions();if(A2(a)){let _=ni(a),p=a.emitDeclarationOnly||_===2||_===4;return $r(e.getSourceFiles(),d=>(p||!Zo(d))&&I0(d,e,r))}else{let _=t===void 0?e.getSourceFiles():[t];return $r(_,p=>I0(p,e,r))}}function I0(e,t,r){return!(t.getCompilerOptions().noEmitForJsFiles&&c2(e))&&!e.isDeclarationFile&&!t.isSourceFileFromExternalLibrary(e)&&(r||!(e2(e)&&t.getResolvedProjectReferenceToRedirect(e.fileName))&&!t.isSourceOfProjectReferenceRedirect(e.fileName))}function $T(e,t,r){return k2(e,r,t.getCurrentDirectory(),t.getCommonSourceDirectory(),a=>t.getCanonicalFileName(a))}function k2(e,t,r,a,_){let p=Pa(e,r);return p=_(p).indexOf(_(a))===0?p.substring(a.length):p,hr(t,p)}function vN(e,t,r,a,_,p,d){e.writeFile(r,a,_,h=>{t.add(fl(U.Could_not_write_file_0_Colon_1,r,h))},p,d)}function QT(e,t,r){if(e.length>Ei(e)&&!r(e)){let a=$i(e);QT(a,t,r),t(e)}}function TN(e,t,r,a,_,p){try{a(e,t,r)}catch{QT($i(pn(e)),_,p),a(e,t,r)}}function SN(e,t){let r=Ia(e);return __(r,t)}function Ca(e,t){return __(e,t)}function YT(e){return Yr(e.members,t=>J_(t)&&wl(t.body))}function D2(e){if(e&&e.parameters.length>0){let t=e.parameters.length===2&&Xl(e.parameters[0]);return e.parameters[t?1:0]}}function xN(e){let t=D2(e);return t&&t.type}function KT(e){if(e.parameters.length&&!cu(e)){let t=e.parameters[0];if(Xl(t))return t}}function Xl(e){return ym(e.name)}function ym(e){return!!e&&e.kind===80&&ZT(e)}function wN(e){return!!Kr(e,t=>t.kind===186?!0:t.kind===80||t.kind===166?!1:"quit")}function CN(e){if(!ym(e))return!1;for(;M_(e.parent)&&e.parent.left===e;)e=e.parent;return e.parent.kind===186}function ZT(e){return e.escapedText==="this"}function P2(e,t){let r,a,_,p;return LT(t)?(r=t,t.kind===177?_=t:t.kind===178?p=t:N.fail("Accessor has wrong kind")):yr(e,d=>{if(nm(d)&&N0(d)===N0(t)){let h=gd(d.name),l=gd(t.name);h===l&&(r?a||(a=d):r=d,d.kind===177&&!_&&(_=d),d.kind===178&&!p&&(p=d))}}),{firstAccessor:r,secondAccessor:a,getAccessor:_,setAccessor:p}}function I2(e){if(!Wt(e)&&os(e))return;let t=e.type;return t||!Wt(e)?t:Ig(e)?e.typeExpression&&e.typeExpression.type:em(e)}function EN(e){return e.type}function AN(e){return cu(e)?e.type&&e.type.typeExpression&&e.type.typeExpression.type:e.type||(Wt(e)?$4(e):void 0)}function eS(e){return Bo(Ul(e),t=>kN(t)?t.typeParameters:void 0)}function kN(e){return Ko(e)&&!(e.parent.kind===327&&(e.parent.tags.some(Hl)||e.parent.tags.some(L6)))}function DN(e){let t=D2(e);return t&&I2(t)}function tS(e,t,r,a){rS(e,t,r.pos,a)}function rS(e,t,r,a){a&&a.length&&r!==a[0].pos&&Ca(e,r)!==Ca(e,a[0].pos)&&t.writeLine()}function PN(e,t,r,a){r!==a&&Ca(e,r)!==Ca(e,a)&&t.writeLine()}function nS(e,t,r,a,_,p,d,h){if(a&&a.length>0){_&&r.writeSpace(" ");let l=!1;for(let v of a)l&&(r.writeSpace(" "),l=!1),h(e,t,r,v.pos,v.end,d),v.hasTrailingNewLine?r.writeLine():l=!0;l&&p&&r.writeSpace(" ")}}function IN(e,t,r,a,_,p,d){let h,l;if(d?_.pos===0&&(h=$r(Wo(e,_.pos),v)):h=Wo(e,_.pos),h){let y=[],C;for(let S of h){if(C){let k=Ca(t,C.end);if(Ca(t,S.pos)>=k+2)break}y.push(S),C=S}if(y.length){let S=Ca(t,ka(y).end);Ca(t,Nt(e,_.pos))>=S+2&&(tS(t,r,_,h),nS(e,t,r,y,!1,!0,p,a),l={nodePos:_.pos,detachedCommentEndPos:ka(y).end})}}return l;function v(y){return L3(e,y.pos)}}function NN(e,t,r,a,_,p){if(e.charCodeAt(a+1)===42){let d=Sg(t,a),h=t.length,l;for(let v=a,y=d.line;v<_;y++){let C=y+1===h?e.length+1:t[y+1];if(v!==a){l===void 0&&(l=qb(e,t[d.line],a));let k=r.getIndent()*Jo()-l+qb(e,v,C);if(k>0){let L=k%Jo(),G=w2((k-L)/Jo());for(r.rawWrite(G);L;)r.rawWrite(" "),L--}else r.rawWrite("")}ON(e,_,r,p,v,C),v=C}}else r.writeComment(e.substring(a,_))}function ON(e,t,r,a,_,p){let d=Math.min(t,p-1),h=Ud(e.substring(_,d));h?(r.writeComment(h),d!==t&&r.writeLine()):r.rawWrite(a)}function qb(e,t,r){let a=0;for(;t=0&&e.kind<=165?0:(e.modifierFlagsCache&536870912||(e.modifierFlagsCache=L2(e)|536870912),t&&!(e.modifierFlagsCache&4096)&&(r||Wt(e))&&e.parent&&(e.modifierFlagsCache|=lS(e)|4096),e.modifierFlagsCache&-536875009)}function bm(e){return O2(e,!0)}function cS(e){return O2(e,!0,!0)}function M2(e){return O2(e,!1)}function lS(e){let t=0;return e.parent&&!Ma(e)&&(Wt(e)&&(q4(e)&&(t|=4),z4(e)&&(t|=8),W4(e)&&(t|=16),V4(e)&&(t|=64),H4(e)&&(t|=16384)),G4(e)&&(t|=8192)),t}function uS(e){return L2(e)|lS(e)}function L2(e){let t=q_(e)?ln(e.modifiers):0;return(e.flags&8||e.kind===80&&e.flags&4096)&&(t|=1),t}function ln(e){let t=0;if(e)for(let r of e)t|=J2(r.kind);return t}function J2(e){switch(e){case 126:return 32;case 125:return 4;case 124:return 16;case 123:return 8;case 128:return 256;case 129:return 128;case 95:return 1;case 138:return 2;case 87:return 2048;case 90:return 1024;case 134:return 512;case 148:return 64;case 164:return 16384;case 103:return 32768;case 147:return 65536;case 170:return 131072}return 0}function pS(e){return e===57||e===56}function RN(e){return pS(e)||e===54}function vm(e){return e===76||e===77||e===78}function jN(e){return Ct(e)&&vm(e.operatorToken.kind)}function fS(e){return pS(e)||e===61}function FN(e){return Ct(e)&&fS(e.operatorToken.kind)}function D_(e){return e>=64&&e<=79}function dS(e){let t=mS(e);return t&&!t.isImplements?t.class:void 0}function mS(e){if(g6(e)){if(Nl(e.parent)&&dn(e.parent.parent))return{class:e.parent.parent,isImplements:e.parent.token===119};if(Mm(e.parent)){let t=y2(e.parent);if(t&&dn(t))return{class:t,isImplements:!1}}}}function Na(e,t){return Ct(e)&&(t?e.operatorToken.kind===64:D_(e.operatorToken.kind))&&Lo(e.left)}function BN(e){return Na(e.parent)&&e.parent.left===e}function UN(e){if(Na(e,!0)){let t=e.left.kind;return t===210||t===209}return!1}function M0(e){return dS(e)!==void 0}function co(e){return e.kind===80||hS(e)}function qN(e){switch(e.kind){case 80:return e;case 166:do e=e.left;while(e.kind!==80);return e;case 211:do e=e.expression;while(e.kind!==80);return e}}function L0(e){return e.kind===80||e.kind===110||e.kind===108||e.kind===236||e.kind===211&&L0(e.expression)||e.kind===217&&L0(e.expression)}function hS(e){return Br(e)&&Ee(e.name)&&co(e.expression)}function J0(e){if(Br(e)){let t=J0(e.expression);if(t!==void 0)return t+"."+vi(e.name)}else if(Ra(e)){let t=J0(e.expression);if(t!==void 0&&zl(e.argumentExpression))return t+"."+gd(e.argumentExpression)}else{if(Ee(e))return Vo(e.escapedText);if(U_(e))return Kl(e)}}function $l(e){return k_(e)&&io(e)==="prototype"}function zN(e){return e.parent.kind===166&&e.parent.right===e||e.parent.kind===211&&e.parent.name===e||e.parent.kind===236&&e.parent.name===e}function yS(e){return Br(e.parent)&&e.parent.name===e||Ra(e.parent)&&e.parent.argumentExpression===e}function WN(e){return M_(e.parent)&&e.parent.right===e||Br(e.parent)&&e.parent.name===e||r_(e.parent)&&e.parent.right===e}function VN(e){return e.kind===210&&e.properties.length===0}function HN(e){return e.kind===209&&e.elements.length===0}function GN(e){if(!(!XN(e)||!e.declarations)){for(let t of e.declarations)if(t.localSymbol)return t.localSymbol}}function XN(e){return e&&Ka(e.declarations)>0&&gr(e.declarations[0],1024)}function $N(e){return Yr(Ix,t=>La(e,t))}function QN(e){let t=[],r=e.length;for(let a=0;a>6|192),t.push(_&63|128)):_<65536?(t.push(_>>12|224),t.push(_>>6&63|128),t.push(_&63|128)):_<131072?(t.push(_>>18|240),t.push(_>>12&63|128),t.push(_>>6&63|128),t.push(_&63|128)):N.assert(!1,"Unexpected code point")}return t}function gS(e){let t="",r=QN(e),a=0,_=r.length,p,d,h,l;for(;a<_;)p=r[a]>>2,d=(r[a]&3)<<4|r[a+1]>>4,h=(r[a+1]&15)<<2|r[a+2]>>6,l=r[a+2]&63,a+1>=_?h=l=64:a+2>=_&&(l=64),t+=qi.charAt(p)+qi.charAt(d)+qi.charAt(h)+qi.charAt(l),a+=3;return t}function YN(e){let t="",r=0,a=e.length;for(;r>4&3,y=(d&15)<<4|h>>2&15,C=(h&3)<<6|l&63;y===0&&h!==0?a.push(v):C===0&&l!==0?a.push(v,y):a.push(v,y,C),_+=4}return YN(a)}function bS(e,t){let r=b_(t)?t:t.readFile(e);if(!r)return;let a=parseConfigFileTextToJson(e,r);return a.error?void 0:a.config}function eO(e,t){return bS(e,t)||{}}function vS(e,t){return!t.directoryExists||t.directoryExists(e)}function TS(e){switch(e.newLine){case 0:return Ax;case 1:case void 0:return kx}}function Tm(e,t=e){return N.assert(t>=e||t===-1),{pos:e,end:t}}function tO(e,t){return Tm(e.pos,t)}function Sd(e,t){return Tm(t,e.end)}function SS(e){let t=q_(e)?ig(e.modifiers,L_):void 0;return t&&!Oa(t.end)?Sd(e,t.end):e}function rO(e){if(oo(e)||d_(e))return Sd(e,e.name.pos);let t=q_(e)?wi(e.modifiers):void 0;return t&&!Oa(t.end)?Sd(e,t.end):SS(e)}function nO(e){return e.pos===e.end}function iO(e,t){return Tm(e,e+nr(t).length)}function aO(e,t){return xS(e,e,t)}function oO(e,t,r){return P_(f_(e,r,!1),f_(t,r,!1),r)}function sO(e,t,r){return P_(e.end,t.end,r)}function xS(e,t,r){return P_(f_(e,r,!1),t.end,r)}function _O(e,t,r){return P_(e.end,f_(t,r,!1),r)}function cO(e,t,r,a){let _=f_(t,r,a);return x_(r,e.end,_)}function lO(e,t,r){return x_(r,e.end,t.end)}function uO(e,t){return!P_(e.pos,e.end,t)}function P_(e,t,r){return x_(r,e,t)===0}function f_(e,t,r){return Oa(e.pos)?-1:Nt(t.text,e.pos,!1,r)}function pO(e,t,r,a){let _=Nt(r.text,e,!1,a),p=dO(_,t,r);return x_(r,p??t,_)}function fO(e,t,r,a){let _=Nt(r.text,e,!1,a);return x_(r,e,Math.min(t,_))}function dO(e,t=0,r){for(;e-- >t;)if(!Vi(r.text.charCodeAt(e)))return e}function mO(e){let t=Fl(e);if(t)switch(t.parent.kind){case 266:case 267:return t===t.parent.name}return!1}function hO(e){return $r(e.declarations,wS)}function wS(e){return ki(e)&&e.initializer!==void 0}function yO(e){return e.watch&&Qr(e,"watch")}function gO(e){e.close()}function CS(e){return e.flags&33554432?e.links.checkFlags:0}function bO(e,t=!1){if(e.valueDeclaration){let r=t&&e.declarations&&Yr(e.declarations,Qo)||e.flags&32768&&Yr(e.declarations,m_)||e.valueDeclaration,a=$d(r);return e.parent&&e.parent.flags&32?a:a&-29}if(CS(e)&6){let r=e.links.checkFlags,a=r&1024?8:r&256?4:16,_=r&2048?32:0;return a|_}return e.flags&4194304?36:0}function vO(e,t){return e.flags&2097152?t.getAliasedSymbol(e):e}function TO(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags}function SO(e){return Do(e)===1}function xO(e){return Do(e)!==0}function Do(e){let{parent:t}=e;switch(t==null?void 0:t.kind){case 217:return Do(t);case 225:case 224:let{operator:r}=t;return r===46||r===47?2:0;case 226:let{left:a,operatorToken:_}=t;return a===e&&D_(_.kind)?_.kind===64?1:2:0;case 211:return t.name!==e?0:Do(t);case 303:{let p=Do(t.parent);return e===t.name?wO(p):p}case 304:return e===t.objectAssignmentInitializer?0:Do(t.parent);case 209:return Do(t);default:return 0}}function wO(e){switch(e){case 0:return 1;case 1:return 0;case 2:return 2;default:return N.assertNever(e)}}function ES(e,t){if(!e||!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(typeof e[r]=="object"){if(!ES(e[r],t[r]))return!1}else if(typeof e[r]!="function"&&e[r]!==t[r])return!1;return!0}function CO(e,t){e.forEach(t),e.clear()}function AS(e,t,r){let{onDeleteValue:a,onExistingValue:_}=r;e.forEach((p,d)=>{let h=t.get(d);h===void 0?(e.delete(d),a(p,d)):_&&_(p,h,d)})}function EO(e,t,r){AS(e,t,r);let{createNewValue:a}=r;t.forEach((_,p)=>{e.has(p)||e.set(p,a(p,_))})}function AO(e){if(e.flags&32){let t=kS(e);return!!t&&gr(t,256)}return!1}function kS(e){var t;return(t=e.declarations)==null?void 0:t.find(dn)}function Rf(e){return e.flags&138117121?e.objectFlags:0}function kO(e,t){return!!e4(e,r=>t(r)?!0:void 0)}function DO(e){return!!e&&!!e.declarations&&!!e.declarations[0]&&x6(e.declarations[0])}function PO({moduleSpecifier:e}){return mn(e)?e.text:sm(e)}function DS(e){let t;return Bt(e,r=>{wl(r)&&(t=r)},r=>{for(let a=r.length-1;a>=0;a--)if(wl(r[a])){t=r[a];break}}),t}function IO(e,t,r=!0){return e.has(t)?!1:(e.set(t,r),!0)}function NO(e){return dn(e)||su(e)||Em(e)}function PS(e){return e>=182&&e<=205||e===133||e===159||e===150||e===163||e===151||e===136||e===154||e===155||e===116||e===157||e===146||e===141||e===233||e===319||e===320||e===321||e===322||e===323||e===324||e===325}function $o(e){return e.kind===211||e.kind===212}function OO(e){return e.kind===211?e.name:(N.assert(e.kind===212),e.argumentExpression)}function MO(e){switch(e.kind){case"text":case"internal":return!0;default:return!1}}function LO(e){return e.kind===275||e.kind===279}function R2(e){for(;$o(e);)e=e.expression;return e}function JO(e,t){if($o(e.parent)&&yS(e))return r(e.parent);function r(a){if(a.kind===211){let _=t(a.name);if(_!==void 0)return _}else if(a.kind===212)if(Ee(a.argumentExpression)||Kn(a.argumentExpression)){let _=t(a.argumentExpression);if(_!==void 0)return _}else return;if($o(a.expression))return r(a.expression);if(Ee(a.expression))return t(a.expression)}}function RO(e,t){for(;;){switch(e.kind){case 225:e=e.operand;continue;case 226:e=e.left;continue;case 227:e=e.condition;continue;case 215:e=e.tag;continue;case 213:if(t)return e;case 234:case 212:case 211:case 235:case 360:case 238:e=e.expression;continue}return e}}function jO(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.isAssigned=void 0,this.links=void 0}function FO(e,t){this.flags=t,(N.isDebugging||xa)&&(this.checker=e)}function BO(e,t){this.flags=t,N.isDebugging&&(this.checker=e)}function Gh(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function UO(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.emitNode=void 0}function qO(e,t,r){this.pos=t,this.end=r,this.kind=e,this.id=0,this.flags=0,this.transformFlags=0,this.parent=void 0,this.original=void 0,this.emitNode=void 0}function zO(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r||(a=>a)}function WO(e){Z2.push(e),e(wt)}function IS(e){Object.assign(wt,e),yr(Z2,t=>t(wt))}function I_(e,t,r=0){return e.replace(/{(\d+)}/g,(a,_)=>""+N.checkDefined(t[+_+r]))}function NS(e){kl=e}function OS(e){!kl&&e&&(kl=e())}function N_(e){return kl&&kl[e.key]||e.message}function Ao(e,t,r,a){Yg(void 0,t,r);let _=N_(a);return arguments.length>4&&(_=I_(_,arguments,4)),{file:void 0,start:t,length:r,messageText:_,category:a.category,code:a.code,reportsUnnecessary:a.reportsUnnecessary,fileName:e}}function VO(e){return e.file===void 0&&e.start!==void 0&&e.length!==void 0&&typeof e.fileName=="string"}function MS(e,t){let r=t.fileName||"",a=t.text.length;N.assertEqual(e.fileName,r),N.assertLessThanOrEqual(e.start,a),N.assertLessThanOrEqual(e.start+e.length,a);let _={file:t,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){_.relatedInformation=[];for(let p of e.relatedInformation)VO(p)&&p.fileName===r?(N.assertLessThanOrEqual(p.start,a),N.assertLessThanOrEqual(p.start+p.length,a),_.relatedInformation.push(MS(p,t))):_.relatedInformation.push(p)}return _}function $a(e,t){let r=[];for(let a of e)r.push(MS(a,t));return r}function j2(e,t,r,a){Yg(e,t,r);let _=N_(a);return arguments.length>4&&(_=I_(_,arguments,4)),{file:e,start:t,length:r,messageText:_,category:a.category,code:a.code,reportsUnnecessary:a.reportsUnnecessary,reportsDeprecated:a.reportsDeprecated}}function HO(e,t){let r=N_(t);return arguments.length>2&&(r=I_(r,arguments,2)),r}function fl(e){let t=N_(e);return arguments.length>1&&(t=I_(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 GO(e,t){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText,relatedInformation:t}}function tl(e,t){let r=N_(t);return arguments.length>2&&(r=I_(r,arguments,2)),{messageText:r,category:t.category,code:t.code,next:e===void 0||Array.isArray(e)?e:[e]}}function XO(e,t){let r=e;for(;r.next;)r=r.next[0];r.next=[t]}function zb(e){return e.file?e.file.path:void 0}function F2(e,t){return xd(e,t)||$O(e,t)||0}function xd(e,t){return Ci(zb(e),zb(t))||kr(e.start,t.start)||kr(e.length,t.length)||kr(e.code,t.code)||LS(e.messageText,t.messageText)||0}function $O(e,t){return!e.relatedInformation&&!t.relatedInformation?0:e.relatedInformation&&t.relatedInformation?kr(e.relatedInformation.length,t.relatedInformation.length)||yr(e.relatedInformation,(r,a)=>{let _=t.relatedInformation[a];return F2(r,_)})||0:e.relatedInformation?-1:1}function LS(e,t){if(typeof e=="string"&&typeof t=="string")return Ci(e,t);if(typeof e=="string")return-1;if(typeof t=="string")return 1;let r=Ci(e.messageText,t.messageText);if(r)return r;if(!e.next&&!t.next)return 0;if(!e.next)return-1;if(!t.next)return 1;let a=Math.min(e.next.length,t.next.length);for(let _=0;_t.next.length?1:0}function R0(e){return e===4||e===2||e===1||e===6?1:0}function JS(e){if(e.transformFlags&2)return w3(e)||dl(e)?e:Bt(e,JS)}function QO(e){return e.isDeclarationFile?void 0:JS(e)}function YO(e){return(e.impliedNodeFormat===99||ei(e.fileName,[".cjs",".cts",".mjs",".mts"]))&&!e.isDeclarationFile?!0:void 0}function RS(e){switch(jS(e)){case 3:return _=>{_.externalModuleIndicator=ml(_)||!_.isDeclarationFile||void 0};case 1:return _=>{_.externalModuleIndicator=ml(_)};case 2:let t=[ml];(e.jsx===4||e.jsx===5)&&t.push(QO),t.push(YO);let r=ug(...t);return _=>void(_.externalModuleIndicator=r(_))}}function Ql(e){return e.target??(e.module===100&&9||e.module===199&&99||1)}function ni(e){return typeof e.module=="number"?e.module:Ql(e)>=2?5:1}function KO(e){return e>=5&&e<=99}function O_(e){let t=e.moduleResolution;if(t===void 0)switch(ni(e)){case 1:t=2;break;case 100:t=3;break;case 199:t=99;break;default:t=1;break}return t}function jS(e){return e.moduleDetection||(ni(e)===100||ni(e)===199?3:2)}function ZO(e){switch(ni(e)){case 1:case 2:case 5:case 6:case 7:case 99:case 100:case 199:return!0;default:return!1}}function B2(e){return!!(e.isolatedModules||e.verbatimModuleSyntax)}function eM(e){return e.verbatimModuleSyntax||e.isolatedModules&&e.preserveValueImports}function tM(e){return e.allowUnreachableCode===!1}function rM(e){return e.allowUnusedLabels===!1}function nM(e){return!!(z2(e)&&e.declarationMap)}function U2(e){if(e.esModuleInterop!==void 0)return e.esModuleInterop;switch(ni(e)){case 100:case 199:return!0}}function iM(e){return e.allowSyntheticDefaultImports!==void 0?e.allowSyntheticDefaultImports:U2(e)||ni(e)===4||O_(e)===100}function q2(e){return e>=3&&e<=99||e===100}function aM(e){return!!e.noDtsResolution||O_(e)!==100}function oM(e){let t=O_(e);if(!q2(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}function sM(e){let t=O_(e);if(!q2(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}function FS(e){return e.resolveJsonModule!==void 0?e.resolveJsonModule:O_(e)===100}function z2(e){return!!(e.declaration||e.composite)}function _M(e){return!!(e.preserveConstEnums||B2(e))}function cM(e){return!!(e.incremental||e.composite)}function W2(e,t){return e[t]===void 0?!!e.strict:!!e[t]}function BS(e){return e.allowJs===void 0?!!e.checkJs:e.allowJs}function lM(e){return e.useDefineForClassFields===void 0?Ql(e)>=9:e.useDefineForClassFields}function uM(e){return e.useDefineForClassFields!==!1&&Ql(e)>=9}function pM(e,t){return E_(t,e,semanticDiagnosticsOptionDeclarations)}function fM(e,t){return E_(t,e,affectsEmitOptionDeclarations)}function dM(e,t){return E_(t,e,affectsDeclarationPathOptionDeclarations)}function j0(e,t){return t.strictFlag?W2(e,t.name):e[t.name]}function mM(e){let t=e.jsx;return t===2||t===4||t===5}function hM(e,t){let r=t==null?void 0:t.pragmas.get("jsximportsource"),a=zt(r)?r[r.length-1]:r;return e.jsx===4||e.jsx===5||e.jsxImportSource||a?(a==null?void 0:a.arguments.factory)||e.jsxImportSource||"react":void 0}function yM(e,t){return e?`${e}/${t.jsx===5?"jsx-dev-runtime":"jsx-runtime"}`:void 0}function gM(e){let t=!1;for(let r=0;r_,getSymlinkedDirectories:()=>r,getSymlinkedDirectoriesByRealpath:()=>a,setSymlinkedFile:(h,l)=>(_||(_=new Map)).set(h,l),setSymlinkedDirectory:(h,l)=>{let v=xi(h,e,t);nx(v)||(v=zo(v),l!==!1&&!(r!=null&&r.has(v))&&(a||(a=jd())).add(zo(l.realPath),h),(r||(r=new Map)).set(v,l))},setSymlinksFromResolutions(h,l){var v,y;N.assert(!p),p=!0;for(let C of h)(v=C.resolvedModules)==null||v.forEach(S=>d(this,S.resolvedModule)),(y=C.resolvedTypeReferenceDirectiveNames)==null||y.forEach(S=>d(this,S.resolvedTypeReferenceDirective));l.forEach(C=>d(this,C.resolvedTypeReferenceDirective))},hasProcessedResolutions:()=>p};function d(h,l){if(!l||!l.originalPath||!l.resolvedFileName)return;let{resolvedFileName:v,originalPath:y}=l;h.setSymlinkedFile(xi(y,e,t),v);let[C,S]=vM(v,y,e,t)||$e;C&&S&&h.setSymlinkedDirectory(S,{real:C,realPath:xi(C,e,t)})}}function vM(e,t,r,a){let _=Ai(Pa(e,r)),p=Ai(Pa(t,r)),d=!1;for(;_.length>=2&&p.length>=2&&!Wb(_[_.length-2],a)&&!Wb(p[p.length-2],a)&&a(_[_.length-1])===a(p[p.length-1]);)_.pop(),p.pop(),d=!0;return d?[Uo(_),Uo(p)]:void 0}function Wb(e,t){return e!==void 0&&(t(e)==="node_modules"||Fr(e,"@"))}function TM(e){return dg(e.charCodeAt(0))?e.slice(1):void 0}function SM(e,t,r){let a=Bv(e,t,r);return a===void 0?void 0:TM(a)}function xM(e){return e.replace(Ed,wM)}function wM(e){return"\\"+e}function jf(e,t,r){let a=V2(e,t,r);return!a||!a.length?void 0:`^(${a.map(d=>`(${d})`).join("|")})${r==="exclude"?"($|/)":"$"}`}function V2(e,t,r){if(!(e===void 0||e.length===0))return Bo(e,a=>a&&qS(a,t,r,e6[r]))}function US(e){return!/[.*?]/.test(e)}function CM(e,t,r){let a=e&&qS(e,t,r,e6[r]);return a&&`^(${a})${r==="exclude"?"($|/)":"$"}`}function qS(e,t,r,{singleAsteriskRegexFragment:a,doubleAsteriskRegexFragment:_,replaceWildcardCharacter:p}){let d="",h=!1,l=Wd(e,t),v=ka(l);if(r!=="exclude"&&v==="**")return;l[0]=S_(l[0]),US(v)&&l.push("**","*");let y=0;for(let C of l){if(C==="**")d+=_;else if(r==="directories"&&(d+="(",y++),h&&(d+=fn),r!=="exclude"){let S="";C.charCodeAt(0)===42?(S+="([^./]"+a+")?",C=C.substr(1)):C.charCodeAt(0)===63&&(S+="[^./]",C=C.substr(1)),S+=C.replace(Ed,p),S!==C&&(d+=Bf),d+=S}else d+=C.replace(Ed,p);h=!0}for(;y>0;)d+=")?",y--;return d}function Xh(e,t){return e==="*"?t:e==="?"?"[^/]":"\\"+e}function zS(e,t,r,a,_){e=pn(e),_=pn(_);let p=hr(_,e);return{includeFilePatterns:Aa(V2(r,p,"files"),d=>`^${d}$`),includeFilePattern:jf(r,p,"files"),includeDirectoryPattern:jf(r,p,"directories"),excludePattern:jf(t,p,"exclude"),basePaths:AM(e,r,a)}}function Ff(e,t){return new RegExp(e,t?"":"i")}function EM(e,t,r,a,_,p,d,h,l){e=pn(e),p=pn(p);let v=zS(e,r,a,_,p),y=v.includeFilePatterns&&v.includeFilePatterns.map(ue=>Ff(ue,_)),C=v.includeDirectoryPattern&&Ff(v.includeDirectoryPattern,_),S=v.excludePattern&&Ff(v.excludePattern,_),k=y?y.map(()=>[]):[[]],L=new Map,G=Bd(_);for(let ue of v.basePaths)K(ue,hr(p,ue),d);return o_(k);function K(ue,Y,B){let ae=G(l(Y));if(L.has(ae))return;L.set(ae,!0);let{files:Ce,directories:Ze}=h(ue);for(let qe of Gf(Ce,Ci)){let rt=hr(ue,qe),it=hr(Y,qe);if(!(t&&!ei(rt,t))&&!(S&&S.test(it)))if(!y)k[0].push(rt);else{let Ir=_l(y,ar=>ar.test(it));Ir!==-1&&k[Ir].push(rt)}}if(!(B!==void 0&&(B--,B===0)))for(let qe of Gf(Ze,Ci)){let rt=hr(ue,qe),it=hr(Y,qe);(!C||C.test(it))&&(!S||!S.test(it))&&K(rt,it,B)}}}function AM(e,t,r){let a=[e];if(t){let _=[];for(let p of t){let d=v_(p)?p:pn(hr(e,p));_.push(kM(d))}_.sort(_g(!r));for(let p of _)so(a,d=>!Kv(d,p,e,!r))&&a.push(p)}return a}function kM(e){let t=vv(e,Dx);return t<0?Qv(e)?S_($i(e)):e:e.substring(0,e.lastIndexOf(fn,t))}function WS(e,t){return t||VS(e)||3}function VS(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}function HS(e,t){let r=e&&BS(e);if(!t||t.length===0)return r?Dl:Ro;let a=r?Dl:Ro,_=o_(a);return[...a,...Za(t,d=>d.scriptKind===7||r&&DM(d.scriptKind)&&_.indexOf(d.extension)===-1?[d.extension]:void 0)]}function GS(e,t){return!e||!FS(e)?t:t===Dl?Nx:t===Ro?Px:[...t,[".json"]]}function DM(e){return e===1||e===2}function H2(e){return mt(r6,t=>La(e,t))}function G2(e){return mt(t6,t=>La(e,t))}function XS({imports:e},t=ug(H2,G2)){return ng(e,({text:r})=>rs(r)&&!ei(r,wm)?t(r):void 0)||!1}function PM(e,t,r,a){if(e==="js"||t===99)return shouldAllowImportingTsExtension(r)&&_()!==2?3:2;if(e==="minimal")return 0;if(e==="index")return 1;if(!shouldAllowImportingTsExtension(r))return XS(a)?2:0;return _();function _(){let p=!1,d=a.imports.length?a.imports.map(h=>h.text):c2(a)?IM(a).map(h=>h.arguments[0].text):$e;for(let h of d)if(rs(h)){if(ei(h,wm))continue;if(G2(h))return 3;H2(h)&&(p=!0)}return p?2:0}}function IM(e){let t=0,r;for(let a of e.statements){if(t>3)break;oT(a)?r=y_(r,a.declarationList.declarations.map(_=>_.initializer)):ou(a)&&Wl(a.expression,!0)?r=xt(r,a.expression):t++}return r||$e}function NM(e,t,r){if(!e)return!1;let a=HS(t,r);for(let _ of o_(GS(t,a)))if(La(e,_))return!0;return!1}function Vb(e){let t=e.match(/\//g);return t?t.length:0}function OM(e,t){return kr(Vb(e),Vb(t))}function Al(e){for(let t of Cm){let r=$S(e,t);if(r!==void 0)return r}return e}function $S(e,t){return La(e,t)?QS(e,t):void 0}function QS(e,t){return e.substring(0,e.length-t.length)}function MM(e,t){return Yv(e,t,Cm,!1)}function YS(e){let t=e.indexOf("*");return t===-1?e:e.indexOf("*",t+1)!==-1?void 0:{prefix:e.substr(0,t),suffix:e.substr(t+1)}}function LM(e){return Za(sg(e),t=>YS(t))}function Oa(e){return!(e>=0)}function KS(e){return e===".ts"||e===".tsx"||e===".d.ts"||e===".cts"||e===".mts"||e===".d.mts"||e===".d.cts"||Fr(e,".d.")&&ts(e,".ts")}function JM(e){return KS(e)||e===".json"}function rl(e){let t=X2(e);return t!==void 0?t:N.fail(`File ${e} has unknown extension.`)}function RM(e){return X2(e)!==void 0}function X2(e){return Yr(Cm,t=>La(e,t))}function jM(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs}function FM(e,t){let r=[];for(let a of e){if(a===t)return t;b_(a)||r.push(a)}return Fv(r,a=>a,t)}function BM(e,t){let r=e.indexOf(t);return N.assert(r!==-1),e.slice(r)}function nl(e,...t){return t.length&&(e.relatedInformation||(e.relatedInformation=[]),N.assert(e.relatedInformation!==$e,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...t)),e}function UM(e,t){N.assert(e.length!==0);let r=t(e[0]),a=r;for(let _=1;_a&&(a=p)}return{min:r,max:a}}function qM(e){return{pos:Go(e),end:e.end}}function zM(e,t){let r=t.pos-1,a=Math.min(e.text.length,Nt(e.text,t.end)+1);return{pos:r,end:a}}function WM(e,t,r){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib||r.isSourceOfProjectReferenceRedirect(e.fileName)}function $2(e,t){return e===t||typeof e=="object"&&e!==null&&typeof t=="object"&&t!==null&&Dv(e,t,$2)}function Sm(e){let 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:let v=e.length-1,y=0;for(;e.charCodeAt(y)===48;)y++;return e.slice(y,v)||"0"}let r=2,a=e.length-1,_=(a-r)*t,p=new Uint16Array((_>>>4)+(_&15?1:0));for(let v=a-1,y=0;v>=r;v--,y+=t){let C=y>>>4,S=e.charCodeAt(v),L=(S<=57?S-48:10+S-(S<=70?65:97))<<(y&15);p[C]|=L;let G=L>>>16;G&&(p[C+1]|=G)}let d="",h=p.length-1,l=!0;for(;l;){let v=0;l=!1;for(let y=h;y>=0;y--){let C=v<<16|p[y],S=C/10|0;p[y]=S,v=C-S*10,S&&!l&&(h=y,l=!0)}d=v+d}return d}function Q2({negative:e,base10Value:t}){return(e&&t!=="0"?"-":"")+t}function VM(e){if(ex(e,!1))return ZS(e)}function ZS(e){let t=e.startsWith("-"),r=Sm(`${t?e.slice(1):e}n`);return{negative:t,base10Value:r}}function ex(e,t){if(e==="")return!1;let r=ns(99,!1),a=!0;r.setOnError(()=>a=!1),r.setText(e+"n");let _=r.scan(),p=_===41;p&&(_=r.scan());let d=r.getTokenFlags();return a&&_===10&&r.getTokenEnd()===e.length+1&&!(d&512)&&(!t||e===Q2({negative:p,base10Value:Sm(r.getTokenValue())}))}function HM(e){return!!(e.flags&33554432)||tT(e)||$M(e)||XM(e)||!(_2(e)||GM(e))}function GM(e){return Ee(e)&&_u(e.parent)&&e.parent.name===e}function XM(e){for(;e.kind===80||e.kind===211;)e=e.parent;if(e.kind!==167)return!1;if(gr(e.parent,256))return!0;let t=e.parent.parent.kind;return t===264||t===187}function $M(e){if(e.kind!==80)return!1;let t=Kr(e.parent,r=>{switch(r.kind){case 298:return!0;case 211:case 233:return!1;default:return"quit"}});return(t==null?void 0:t.token)===119||(t==null?void 0:t.parent.kind)===264}function QM(e){return R_(e)&&Ee(e.typeName)}function YM(e,t=_o){if(e.length<2)return!0;let r=e[0];for(let a=1,_=e.length;a<_;a++){let p=e[a];if(!t(r,p))return!1}return!0}function wd(e,t){return e.pos=t,e}function tx(e,t){return e.end=t,e}function Ya(e,t,r){return tx(wd(e,t),r)}function Cd(e,t,r){return Ya(e,t,t+r)}function KM(e,t){return e&&(e.flags=t),e}function Xi(e,t){return e&&t&&(e.parent=t),e}function a_(e,t){if(e)for(let r of e)Xi(r,t);return e}function rx(e,t){if(!e)return e;return eg(e,zg(e)?r:_),e;function r(p,d){if(t&&p.parent===d)return"skip";Xi(p,d)}function a(p){if(Wi(p))for(let d of p.jsDoc)r(d,p),eg(d,r)}function _(p,d){return r(p,d)||a(p)}}function ZM(e){return!Pm(e)}function eL(e){return iu(e)&&so(e.elements,ZM)}function tL(e){for(N.assertIsDefined(e.parent);;){let t=e.parent;if(is(t)){e=t;continue}if(ou(t)||h6(t)||l8(t)&&(t.initializer===e||t.incrementor===e))return!0;if(F_(t)){if(e!==ka(t.elements))return!0;e=t;continue}if(Ct(t)&&t.operatorToken.kind===28){if(e===t.left)return!0;e=t;continue}return!1}}function nx(e){return mt(ignoredPaths,t=>eo(e,t))}function rL(e){if(!e.parent)return;switch(e.kind){case 168:let{parent:r}=e;return r.kind===195?void 0:r.typeParameters;case 169:return e.parent.parameters;case 204:return e.parent.templateSpans;case 239:return e.parent.templateSpans;case 170:{let{parent:a}=e;return q8(a)?a.modifiers:void 0}case 298:return e.parent.heritageClauses}let{parent:t}=e;if(Wg(e))return P6(e.parent)?void 0:e.parent.tags;switch(t.kind){case 187:case 264:return jg(e)?t.members:void 0;case 192:case 193:return t.types;case 189:case 209:case 361:case 275:case 279:return t.elements;case 210:case 292:return t.properties;case 213:case 214:return g0(e)?t.typeArguments:t.expression===e?void 0:t.arguments;case 284:case 288:return x3(e)?t.children:void 0;case 286:case 285:return g0(e)?t.typeArguments:void 0;case 241:case 296:case 297:case 268:return t.statements;case 269:return t.clauses;case 263:case 231:return no(e)?t.members:void 0;case 266:return g8(e)?t.members:void 0;case 312:return t.statements}}function nL(e){if(!e.typeParameters){if(mt(e.parameters,t=>!I2(t)))return!0;if(e.kind!==219){let t=g_(e.parameters);if(!(t&&Xl(t)))return!0}}return!1}function iL(e){return e==="Infinity"||e==="-Infinity"||e==="NaN"}function ix(e){return e.kind===260&&e.parent.kind===299}function aL(e){let t=e.valueDeclaration&&hm(e.valueDeclaration);return!!t&&(Ma(t)||ix(t))}function oL(e){return e.kind===218||e.kind===219}function sL(e){return e.replace(/\$/gm,()=>"\\$")}function ax(e){return(+e).toString()===e}function _L(e,t,r,a){return Cg(e,t)?Ln.createIdentifier(e):!a&&ax(e)&&+e>=0?Ln.createNumericLiteral(+e):Ln.createStringLiteral(e,!!r)}function ox(e){return!!(e.flags&262144&&e.isThisType)}function cL(e){let t=0,r=0,a=0,_=0,p;(v=>{v[v.BeforeNodeModules=0]="BeforeNodeModules",v[v.NodeModules=1]="NodeModules",v[v.Scope=2]="Scope",v[v.PackageContent=3]="PackageContent"})(p||(p={}));let d=0,h=0,l=0;for(;h>=0;)switch(d=h,h=e.indexOf("/",d+1),l){case 0:e.indexOf(nodeModulesPathPart,d)===d&&(t=d,r=h,l=1);break;case 1:case 2:l===1&&e.charAt(d+1)==="@"?l=2:(a=h,l=3);break;case 3:e.indexOf(nodeModulesPathPart,d)===d?l=1:l=3;break}return _=d,l>1?{topLevelNodeModulesIndex:t,topLevelPackageNameIndex:r,packageRootIndex:a,fileNameIndex:_}:void 0}function lL(e){var t;return e.kind===348?(t=e.typeExpression)==null?void 0:t.type:e.type}function sx(e){switch(e.kind){case 168:case 263:case 264:case 265:case 266:case 353:case 345:case 347:return!0;case 273:return e.isTypeOnly;case 276:case 281:return e.parent.parent.isTypeOnly;default:return!1}}function uL(e){return S6(e)||as(e)||os(e)||Yo(e)||su(e)||sx(e)||Yi(e)&&!Gg(e)&&!cm(e)}function _x(e){if(!Ig(e))return!1;let{isBracketed:t,typeExpression:r}=e;return t||!!r&&r.type.kind===323}function pL(e,t){if(e.length===0)return!1;let r=e.charCodeAt(0);return r===35?e.length>1&&un(e.charCodeAt(1),t):un(r,t)}function cx(e){var t;return((t=getSnippetElement(e))==null?void 0:t.kind)===0}function lx(e){return Wt(e)&&(e.type&&e.type.kind===323||Kd(e).some(({isBracketed:t,typeExpression:r})=>t||!!r&&r.type.kind===323))}function fL(e){switch(e.kind){case 172:case 171:return!!e.questionToken;case 169:return!!e.questionToken||lx(e);case 355:case 348:return _x(e);default:return!1}}function dL(e){let t=e.kind;return(t===211||t===212)&&jo(e.expression)}function mL(e){return Wt(e)&&is(e)&&Wi(e)&&!!kg(e)}function hL(e){return N.checkDefined(ux(e))}function ux(e){let t=kg(e);return t&&t.typeExpression&&t.typeExpression.type}function yL(e){return Ee(e)?e.escapedText:Yl(e)}function gL(e){return Ee(e)?Ot(e):Kl(e)}function bL(e){let t=e.kind;return t===80||t===295}function Yl(e){return`${e.namespace.escapedText}:${Ot(e.name)}`}function Kl(e){return`${Ot(e.namespace)}:${Ot(e.name)}`}function vL(e){return Ee(e)?Ot(e):Kl(e)}function TL(e){return!!(e.flags&8576)}function SL(e){return e.flags&8192?e.escapedName:e.flags&384?Mn(""+e.value):N.fail()}var px,xm,fx,dx,Zs,F0,Y2,mx,hx,K2,yx,gx,B0,U0,q0,z0,bx,vx,Tx,Sx,xx,W0,wx,Cx,Ex,Po,qi,Ax,kx,wt,Z2,kl,Ed,Dx,V0,Bf,$h,Qh,Yh,e6,Ro,t6,Px,Ix,H0,r6,Dl,Nx,n6,Ox,wm,G0,Cm,Mx,xL=Vt({"src/compiler/utilities.ts"(){"use strict";Dr(),px=[],xm="tslib",fx=160,dx=1e6,Zs=Uk(),F0=(e=>(e[e.None=0]="None",e[e.NeverAsciiEscape=1]="NeverAsciiEscape",e[e.JsxAttributeEscape=2]="JsxAttributeEscape",e[e.TerminateUnterminatedLiterals=4]="TerminateUnterminatedLiterals",e[e.AllowNumericSeparator=8]="AllowNumericSeparator",e))(F0||{}),Y2=/^(\/\/\/\s*/,mx=/^(\/\/\/\s*/,hx=/^(\/\/\/\s*/,K2=/^(\/\/\/\s*/,yx=/^\/\/\/\s*/,gx=/^(\/\/\/\s*/,B0=(e=>(e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound",e))(B0||{}),U0=(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))(U0||{}),q0=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(q0||{}),z0=(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))(z0||{}),bx=/\$\{/g,vx=/[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,Tx=/[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,Sx=/\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g,xx=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","\x85":"\\u0085","\r\n":"\\r\\n"})),W0=/[^\u0000-\u007F]/g,wx=/["\u0000-\u001f\u2028\u2029\u0085]/g,Cx=/['\u0000-\u001f\u2028\u2029\u0085]/g,Ex=new Map(Object.entries({'"':""","'":"'"})),Po=[""," "],qi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Ax=`\r -`,kx=` -`,wt={getNodeConstructor:()=>Gh,getTokenConstructor:()=>UO,getIdentifierConstructor:()=>qO,getPrivateIdentifierConstructor:()=>Gh,getSourceFileConstructor:()=>Gh,getSymbolConstructor:()=>jO,getTypeConstructor:()=>FO,getSignatureConstructor:()=>BO,getSourceMapSourceConstructor:()=>zO},Z2=[],Ed=/[^\w\s/]/g,Dx=[42,63],V0=["node_modules","bower_components","jspm_packages"],Bf=`(?!(${V0.join("|")})(/|$))`,$h={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${Bf}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Xh(e,$h.singleAsteriskRegexFragment)},Qh={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${Bf}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Xh(e,Qh.singleAsteriskRegexFragment)},Yh={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:e=>Xh(e,Yh.singleAsteriskRegexFragment)},e6={files:$h,directories:Qh,exclude:Yh},Ro=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],t6=o_(Ro),Px=[...Ro,[".json"]],Ix=[".d.ts",".d.cts",".d.mts",".cts",".mts",".ts",".tsx"],H0=[[".js",".jsx"],[".mjs"],[".cjs"]],r6=o_(H0),Dl=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],Nx=[...Dl,[".json"]],n6=[".d.ts",".d.cts",".d.mts"],Ox=[".ts",".cts",".mts",".tsx"],wm=[".mts",".d.mts",".mjs",".cts",".d.cts",".cjs"],G0=(e=>(e[e.Minimal=0]="Minimal",e[e.Index=1]="Index",e[e.JsExtension=2]="JsExtension",e[e.TsExtension=3]="TsExtension",e))(G0||{}),Cm=[".d.ts",".d.mts",".d.cts",".mjs",".mts",".cjs",".cts",".ts",".js",".tsx",".jsx",".json"],Mx={files:$e,directories:$e}}});function Lx(){let e,t,r,a,_;return{createBaseSourceFileNode:p,createBaseIdentifierNode:d,createBasePrivateIdentifierNode:h,createBaseTokenNode:l,createBaseNode:v};function p(y){return new(_||(_=wt.getSourceFileConstructor()))(y,-1,-1)}function d(y){return new(r||(r=wt.getIdentifierConstructor()))(y,-1,-1)}function h(y){return new(a||(a=wt.getPrivateIdentifierConstructor()))(y,-1,-1)}function l(y){return new(t||(t=wt.getTokenConstructor()))(y,-1,-1)}function v(y){return new(e||(e=wt.getNodeConstructor()))(y,-1,-1)}}var wL=Vt({"src/compiler/factory/baseNodeFactory.ts"(){"use strict";Dr()}}),i6,CL=Vt({"src/compiler/factory/parenthesizerRules.ts"(){"use strict";Dr(),i6={getParenthesizeLeftSideOfBinaryForOperator:e=>bt,getParenthesizeRightSideOfBinaryForOperator:e=>bt,parenthesizeLeftSideOfBinary:(e,t)=>t,parenthesizeRightSideOfBinary:(e,t,r)=>r,parenthesizeExpressionOfComputedPropertyName:bt,parenthesizeConditionOfConditionalExpression:bt,parenthesizeBranchOfConditionalExpression:bt,parenthesizeExpressionOfExportDefault:bt,parenthesizeExpressionOfNew:e=>gi(e,Lo),parenthesizeLeftSideOfAccess:e=>gi(e,Lo),parenthesizeOperandOfPostfixUnary:e=>gi(e,Lo),parenthesizeOperandOfPrefixUnary:e=>gi(e,y3),parenthesizeExpressionsOfCommaDelimitedList:e=>gi(e,va),parenthesizeExpressionForDisallowedComma:bt,parenthesizeExpressionOfExpressionStatement:bt,parenthesizeConciseBodyOfArrowFunction:bt,parenthesizeCheckTypeOfConditionalType:bt,parenthesizeExtendsTypeOfConditionalType:bt,parenthesizeConstituentTypesOfUnionType:e=>gi(e,va),parenthesizeConstituentTypeOfUnionType:bt,parenthesizeConstituentTypesOfIntersectionType:e=>gi(e,va),parenthesizeConstituentTypeOfIntersectionType:bt,parenthesizeOperandOfTypeOperator:bt,parenthesizeOperandOfReadonlyTypeOperator:bt,parenthesizeNonArrayTypeOfPostfixType:bt,parenthesizeElementTypesOfTupleType:e=>gi(e,va),parenthesizeElementTypeOfTupleType:bt,parenthesizeTypeOfOptionalType:bt,parenthesizeTypeArguments:e=>e&&gi(e,va),parenthesizeLeadingTypeArgument:bt}}}),EL=()=>{},Jx=()=>new Proxy({},{get:()=>()=>{}});function AL(e){a6.push(e)}function Ad(e,t){let r=e&8?kL:DL,a=ry(()=>e&1?i6:createParenthesizerRules(ue)),_=ry(()=>e&2?nullNodeConverters:Jx(ue)),p=Nn(n=>(o,s)=>nc(o,n,s)),d=Nn(n=>o=>qa(n,o)),h=Nn(n=>o=>Ts(o,n)),l=Nn(n=>()=>B1(n)),v=Nn(n=>o=>Nc(n,o)),y=Nn(n=>(o,s)=>U1(n,o,s)),C=Nn(n=>(o,s)=>Ic(n,o,s)),S=Nn(n=>(o,s)=>Ep(n,o,s)),k=Nn(n=>(o,s)=>jp(n,o,s)),L=Nn(n=>(o,s,u)=>eh(n,o,s,u)),G=Nn(n=>(o,s,u)=>Fp(n,o,s,u)),K=Nn(n=>(o,s,u,g)=>th(n,o,s,u,g)),ue={get parenthesizer(){return a()},get converters(){return _()},baseFactory:t,flags:e,createNodeArray:Y,createNumericLiteral:Ze,createBigIntLiteral:qe,createStringLiteral:it,createStringLiteralFromNode:Ir,createRegularExpressionLiteral:ar,createLiteralLikeNode:ci,createIdentifier:Ge,createTempVariable:Gt,createLoopVariable:Ur,createUniqueName:Xt,getGeneratedNameForNode:Tn,createPrivateIdentifier:sr,createUniquePrivateName:St,getGeneratedPrivateNameForNode:xn,createToken:vt,createSuper:ct,createThis:Ut,createNull:fr,createTrue:ht,createFalse:wn,createModifier:Tt,createModifiersFromModifierFlags:Or,createQualifiedName:pt,updateQualifiedName:Mr,createComputedPropertyName:at,updateComputedPropertyName:er,createTypeParameterDeclaration:Qt,updateTypeParameterDeclaration:tn,createParameterDeclaration:Bn,updateParameterDeclaration:Un,createDecorator:rn,updateDecorator:nn,createPropertySignature:Di,updatePropertySignature:qn,createPropertyDeclaration:q,updatePropertyDeclaration:oe,createMethodSignature:ge,updateMethodSignature:Se,createMethodDeclaration:nt,updateMethodDeclaration:z,createConstructorDeclaration:Le,updateConstructorDeclaration:lt,createGetAccessorDeclaration:jt,updateGetAccessorDeclaration:qr,createSetAccessorDeclaration:Cn,updateSetAccessorDeclaration:zn,createCallSignature:ia,updateCallSignature:Wn,createConstructSignature:En,updateConstructSignature:Ii,createIndexSignature:aa,updateIndexSignature:Vn,createClassStaticBlockDeclaration:ee,updateClassStaticBlockDeclaration:xe,createTemplateLiteralTypeSpan:Sr,updateTemplateLiteralTypeSpan:Je,createKeywordTypeNode:oa,createTypePredicateNode:Mt,updateTypePredicateNode:Lr,createTypeReferenceNode:j,updateTypeReferenceNode:T,createFunctionTypeNode:x,updateFunctionTypeNode:f,createConstructorTypeNode:Q,updateConstructorTypeNode:be,createTypeQueryNode:we,updateTypeQueryNode:et,createTypeLiteralNode:Ye,updateTypeLiteralNode:Ke,createArrayTypeNode:It,updateArrayTypeNode:qt,createTupleTypeNode:_r,updateTupleTypeNode:Te,createNamedTupleMember:ft,updateNamedTupleMember:An,createOptionalTypeNode:Et,updateOptionalTypeNode:H,createRestTypeNode:Fa,updateRestTypeNode:Ie,createUnionTypeNode:an,updateUnionTypeNode:Ba,createIntersectionTypeNode:kn,updateIntersectionTypeNode:je,createConditionalTypeNode:dt,updateConditionalTypeNode:li,createInferTypeNode:Hn,updateInferTypeNode:e1,createImportTypeNode:ui,updateImportTypeNode:fs,createParenthesizedType:xr,updateParenthesizedType:Ft,createThisTypeNode:M,createTypeOperatorNode:Jr,updateTypeOperatorNode:sa,createIndexedAccessTypeNode:Ni,updateIndexedAccessTypeNode:G_,createMappedTypeNode:Lt,updateMappedTypeNode:Yt,createLiteralTypeNode:Oi,updateLiteralTypeNode:r1,createTemplateLiteralType:dr,updateTemplateLiteralType:t1,createObjectBindingPattern:Tu,updateObjectBindingPattern:Ua,createArrayBindingPattern:Su,updateArrayBindingPattern:X_,createBindingElement:_a,updateBindingElement:xu,createArrayLiteralExpression:$_,updateArrayLiteralExpression:wu,createObjectLiteralExpression:ds,updateObjectLiteralExpression:n1,createPropertyAccessExpression:e&4?(n,o)=>setEmitFlags(Mi(n,o),262144):Mi,updatePropertyAccessExpression:Q_,createPropertyAccessChain:e&4?(n,o,s)=>setEmitFlags(hs(n,o,s),262144):hs,updatePropertyAccessChain:ys,createElementAccessExpression:Y_,updateElementAccessExpression:Eu,createElementAccessChain:Au,updateElementAccessChain:ku,createCallExpression:fo,updateCallExpression:i1,createCallChain:zr,updateCallChain:gs,createNewExpression:bs,updateNewExpression:Du,createTaggedTemplateExpression:Pu,updateTaggedTemplateExpression:a1,createTypeAssertion:Iu,updateTypeAssertion:Nu,createParenthesizedExpression:K_,updateParenthesizedExpression:Ou,createFunctionExpression:Z_,updateFunctionExpression:Mu,createArrowFunction:ec,updateArrowFunction:tc,createDeleteExpression:Lu,updateDeleteExpression:Wr,createTypeOfExpression:vs,updateTypeOfExpression:pi,createVoidExpression:rc,updateVoidExpression:ca,createAwaitExpression:la,updateAwaitExpression:o1,createPrefixUnaryExpression:qa,updatePrefixUnaryExpression:s1,createPostfixUnaryExpression:Ts,updatePostfixUnaryExpression:_1,createBinaryExpression:nc,updateBinaryExpression:Ru,createConditionalExpression:ju,updateConditionalExpression:fi,createTemplateExpression:ic,updateTemplateExpression:c1,createTemplateHead:oc,createTemplateMiddle:l1,createTemplateTail:Bu,createNoSubstitutionTemplateLiteral:u1,createTemplateLiteralLikeNode:Li,createYieldExpression:Uu,updateYieldExpression:p1,createSpreadElement:qu,updateSpreadElement:f1,createClassExpression:xs,updateClassExpression:sc,createOmittedExpression:d1,createExpressionWithTypeArguments:Vr,updateExpressionWithTypeArguments:_c,createAsExpression:zu,updateAsExpression:Wu,createNonNullExpression:cc,updateNonNullExpression:Vu,createSatisfiesExpression:lc,updateSatisfiesExpression:Dn,createNonNullChain:Hu,updateNonNullChain:ws,createMetaProperty:Gn,updateMetaProperty:Cs,createTemplateSpan:uc,updateTemplateSpan:Gu,createSemicolonClassElement:m1,createBlock:ua,updateBlock:h1,createVariableStatement:Xu,updateVariableStatement:pc,createEmptyStatement:fc,createExpressionStatement:Es,updateExpressionStatement:$u,createIfStatement:Qu,updateIfStatement:Yu,createDoStatement:Ku,updateDoStatement:y1,createWhileStatement:Zu,updateWhileStatement:ep,createForStatement:dc,updateForStatement:g1,createForInStatement:tp,updateForInStatement:b1,createForOfStatement:rp,updateForOfStatement:v1,createContinueStatement:mc,updateContinueStatement:np,createBreakStatement:hc,updateBreakStatement:T1,createReturnStatement:ip,updateReturnStatement:ap,createWithStatement:yc,updateWithStatement:op,createSwitchStatement:pa,updateSwitchStatement:S1,createLabeledStatement:sp,updateLabeledStatement:_p,createThrowStatement:cp,updateThrowStatement:x1,createTryStatement:lp,updateTryStatement:up,createDebuggerStatement:pp,createVariableDeclaration:As,updateVariableDeclaration:w1,createVariableDeclarationList:gc,updateVariableDeclarationList:C1,createFunctionDeclaration:bc,updateFunctionDeclaration:fp,createClassDeclaration:vc,updateClassDeclaration:Tc,createInterfaceDeclaration:dp,updateInterfaceDeclaration:gt,createTypeAliasDeclaration:Ji,updateTypeAliasDeclaration:Sc,createEnumDeclaration:Ri,updateEnumDeclaration:mp,createModuleDeclaration:Jt,updateModuleDeclaration:ji,createModuleBlock:tr,updateModuleBlock:A1,createCaseBlock:hp,updateCaseBlock:k1,createNamespaceExportDeclaration:xc,updateNamespaceExportDeclaration:D1,createImportEqualsDeclaration:yp,updateImportEqualsDeclaration:gp,createImportDeclaration:bp,updateImportDeclaration:vp,createImportClause:wc,updateImportClause:Tp,createAssertClause:Sp,updateAssertClause:ks,createAssertEntry:Cc,updateAssertEntry:xp,createImportTypeAssertionContainer:Ec,updateImportTypeAssertionContainer:I1,createNamespaceImport:Ds,updateNamespaceImport:N1,createNamespaceExport:Ac,updateNamespaceExport:O1,createNamedImports:wp,updateNamedImports:M1,createImportSpecifier:Cp,updateImportSpecifier:L1,createExportAssignment:Ps,updateExportAssignment:Fi,createExportDeclaration:kc,updateExportDeclaration:Dc,createNamedExports:Ns,updateNamedExports:J1,createExportSpecifier:fa,updateExportSpecifier:R1,createMissingDeclaration:j1,createExternalModuleReference:Pc,updateExternalModuleReference:F1,get createJSDocAllType(){return l(319)},get createJSDocUnknownType(){return l(320)},get createJSDocNonNullableType(){return C(322)},get updateJSDocNonNullableType(){return S(322)},get createJSDocNullableType(){return C(321)},get updateJSDocNullableType(){return S(321)},get createJSDocOptionalType(){return v(323)},get updateJSDocOptionalType(){return y(323)},get createJSDocVariadicType(){return v(325)},get updateJSDocVariadicType(){return y(325)},get createJSDocNamepathType(){return v(326)},get updateJSDocNamepathType(){return y(326)},createJSDocFunctionType:Ap,updateJSDocFunctionType:q1,createJSDocTypeLiteral:kp,updateJSDocTypeLiteral:z1,createJSDocTypeExpression:Dp,updateJSDocTypeExpression:W1,createJSDocSignature:Pp,updateJSDocSignature:V1,createJSDocTemplateTag:ho,updateJSDocTemplateTag:Os,createJSDocTypedefTag:Ms,updateJSDocTypedefTag:Ip,createJSDocParameterTag:Oc,updateJSDocParameterTag:Mc,createJSDocPropertyTag:Np,updateJSDocPropertyTag:Op,createJSDocCallbackTag:Mp,updateJSDocCallbackTag:H1,createJSDocOverloadTag:Lc,updateJSDocOverloadTag:G1,createJSDocAugmentsTag:Jc,updateJSDocAugmentsTag:X1,createJSDocImplementsTag:Ls,updateJSDocImplementsTag:Z1,createJSDocSeeTag:Rc,updateJSDocSeeTag:yo,createJSDocNameReference:Lp,updateJSDocNameReference:Wa,createJSDocMemberName:go,updateJSDocMemberName:$1,createJSDocLink:Jp,updateJSDocLink:Q1,createJSDocLinkCode:Rp,updateJSDocLinkCode:Y1,createJSDocLinkPlain:jc,updateJSDocLinkPlain:K1,get createJSDocTypeTag(){return G(351)},get updateJSDocTypeTag(){return K(351)},get createJSDocReturnTag(){return G(349)},get updateJSDocReturnTag(){return K(349)},get createJSDocThisTag(){return G(350)},get updateJSDocThisTag(){return K(350)},get createJSDocAuthorTag(){return k(337)},get updateJSDocAuthorTag(){return L(337)},get createJSDocClassTag(){return k(339)},get updateJSDocClassTag(){return L(339)},get createJSDocPublicTag(){return k(340)},get updateJSDocPublicTag(){return L(340)},get createJSDocPrivateTag(){return k(341)},get updateJSDocPrivateTag(){return L(341)},get createJSDocProtectedTag(){return k(342)},get updateJSDocProtectedTag(){return L(342)},get createJSDocReadonlyTag(){return k(343)},get updateJSDocReadonlyTag(){return L(343)},get createJSDocOverrideTag(){return k(344)},get updateJSDocOverrideTag(){return L(344)},get createJSDocDeprecatedTag(){return k(338)},get updateJSDocDeprecatedTag(){return L(338)},get createJSDocThrowsTag(){return G(356)},get updateJSDocThrowsTag(){return K(356)},get createJSDocSatisfiesTag(){return G(357)},get updateJSDocSatisfiesTag(){return K(357)},createJSDocEnumTag:Up,updateJSDocEnumTag:nh,createJSDocUnknownTag:Bp,updateJSDocUnknownTag:rh,createJSDocText:qp,updateJSDocText:ih,createJSDocComment:Js,updateJSDocComment:ah,createJsxElement:Fc,updateJsxElement:zp,createJsxSelfClosingElement:Wp,updateJsxSelfClosingElement:Rs,createJsxOpeningElement:Bc,updateJsxOpeningElement:oh,createJsxClosingElement:Vp,updateJsxClosingElement:sh,createJsxFragment:js,createJsxText:Fs,updateJsxText:Gp,createJsxOpeningFragment:Uc,createJsxJsxClosingFragment:wr,updateJsxFragment:Hp,createJsxAttribute:qc,updateJsxAttribute:Xp,createJsxAttributes:$p,updateJsxAttributes:Qp,createJsxSpreadAttribute:Yp,updateJsxSpreadAttribute:_h,createJsxExpression:bo,updateJsxExpression:ch,createJsxNamespacedName:Kp,updateJsxNamespacedName:lh,createCaseClause:Zp,updateCaseClause:zc,createDefaultClause:Va,updateDefaultClause:uh,createHeritageClause:Bs,updateHeritageClause:ef,createCatchClause:tf,updateCatchClause:vo,createPropertyAssignment:Us,updatePropertyAssignment:ph,createShorthandPropertyAssignment:Wc,updateShorthandPropertyAssignment:rf,createSpreadAssignment:da,updateSpreadAssignment:dh,createEnumMember:af,updateEnumMember:mh,createSourceFile:hh,updateSourceFile:gh,createRedirectedSourceFile:Vc,createBundle:sf,updateBundle:_f,createUnparsedSource:Gc,createUnparsedPrologue:bh,createUnparsedPrepend:cf,createUnparsedTextLike:vh,createUnparsedSyntheticReference:Th,createInputFiles:qs,createSyntheticExpression:lf,createSyntaxList:Sh,createNotEmittedStatement:xh,createPartiallyEmittedExpression:uf,updatePartiallyEmittedExpression:pf,createCommaListExpression:zs,updateCommaListExpression:ff,createSyntheticReferenceExpression:$c,updateSyntheticReferenceExpression:Ch,cloneNode:Qc,get createComma(){return p(28)},get createAssignment(){return p(64)},get createLogicalOr(){return p(57)},get createLogicalAnd(){return p(56)},get createBitwiseOr(){return p(52)},get createBitwiseXor(){return p(53)},get createBitwiseAnd(){return p(51)},get createStrictEquality(){return p(37)},get createStrictInequality(){return p(38)},get createEquality(){return p(35)},get createInequality(){return p(36)},get createLessThan(){return p(30)},get createLessThanEquals(){return p(33)},get createGreaterThan(){return p(32)},get createGreaterThanEquals(){return p(34)},get createLeftShift(){return p(48)},get createRightShift(){return p(49)},get createUnsignedRightShift(){return p(50)},get createAdd(){return p(40)},get createSubtract(){return p(41)},get createMultiply(){return p(42)},get createDivide(){return p(44)},get createModulo(){return p(45)},get createExponent(){return p(43)},get createPrefixPlus(){return d(40)},get createPrefixMinus(){return d(41)},get createPrefixIncrement(){return d(46)},get createPrefixDecrement(){return d(47)},get createBitwiseNot(){return d(55)},get createLogicalNot(){return d(54)},get createPostfixIncrement(){return h(46)},get createPostfixDecrement(){return h(47)},createImmediatelyInvokedFunctionExpression:kh,createImmediatelyInvokedArrowFunction:Dh,createVoidZero:ma,createExportDefault:Ph,createExternalModuleExport:Ih,createTypeCheck:Nh,createIsNotTypeCheck:Oh,createMethodCall:ha,createGlobalMethodCall:Ha,createFunctionBindCall:Mh,createFunctionCallCall:Ws,createFunctionApplyCall:Lh,createArraySliceCall:Jh,createArrayConcatCall:Rh,createObjectDefinePropertyCall:hf,createObjectGetOwnPropertyDescriptorCall:jh,createReflectGetCall:Fh,createReflectSetCall:Bh,createPropertyDescriptor:yf,createCallBinding:A,createAssignmentTargetWrapper:R,inlineExpressions:te,getInternalName:ne,getLocalName:ie,getExportName:ve,getDeclarationName:He,getNamespaceMemberName:Be,getExternalModuleOrNamespaceExportName:Ue,restoreOuterExpressions:m,restoreEnclosingLabel:b,createUseStrictPrologue:di,copyPrologue:Rt,copyStandardPrologue:mi,copyCustomPrologue:hi,ensureUseStrict:Ui,liftToBlock:ga,mergeLexicalEnvironment:Uh,updateModifiers:bf,updateModifierLike:qh};return yr(a6,n=>n(ue)),ue;function Y(n,o){if(n===void 0||n===$e)n=[];else if(va(n)){if(o===void 0||n.hasTrailingComma===o)return n.transformFlags===void 0&&Hb(n),N.attachNodeArrayDebugInfo(n),n;let g=n.slice();return g.pos=n.pos,g.end=n.end,g.hasTrailingComma=o,g.transformFlags=n.transformFlags,N.attachNodeArrayDebugInfo(g),g}let s=n.length,u=s>=1&&s<=4?n.slice():n;return u.pos=-1,u.end=-1,u.hasTrailingComma=!!o,u.transformFlags=0,Hb(u),N.attachNodeArrayDebugInfo(u),u}function B(n){return t.createBaseNode(n)}function ae(n){let o=B(n);return o.symbol=void 0,o.localSymbol=void 0,o}function Ce(n,o){return n!==o&&(n.typeArguments=o.typeArguments),r(n,o)}function Ze(n,o=0){let s=ae(9);return s.text=typeof n=="number"?n+"":n,s.numericLiteralFlags=o,o&384&&(s.transformFlags|=1024),s}function qe(n){let o=Tr(10);return o.text=typeof n=="string"?n:Q2(n)+"n",o.transformFlags|=32,o}function rt(n,o){let s=ae(11);return s.text=n,s.singleQuote=o,s}function it(n,o,s){let u=rt(n,o);return u.hasExtendedUnicodeEscape=s,s&&(u.transformFlags|=1024),u}function Ir(n){let o=rt(bd(n),void 0);return o.textSourceNode=n,o}function ar(n){let o=Tr(14);return o.text=n,o}function ci(n,o){switch(n){case 9:return Ze(o,0);case 10:return qe(o);case 11:return it(o,void 0);case 12:return Fs(o,!1);case 13:return Fs(o,!0);case 14:return ar(o);case 15:return Li(n,o,void 0,0)}}function or(n){let o=t.createBaseIdentifierNode(80);return o.escapedText=n,o.jsDoc=void 0,o.flowNode=void 0,o.symbol=void 0,o}function Nr(n,o,s,u){let g=or(Mn(n));return setIdentifierAutoGenerate(g,{flags:o,id:il,prefix:s,suffix:u}),il++,g}function Ge(n,o,s){o===void 0&&n&&(o=Rl(n)),o===80&&(o=void 0);let u=or(Mn(n));return s&&(u.flags|=256),u.escapedText==="await"&&(u.transformFlags|=67108864),u.flags&256&&(u.transformFlags|=1024),u}function Gt(n,o,s,u){let g=1;o&&(g|=8);let I=Nr("",g,s,u);return n&&n(I),I}function Ur(n){let o=2;return n&&(o|=8),Nr("",o,void 0,void 0)}function Xt(n,o=0,s,u){return N.assert(!(o&7),"Argument out of range: flags"),N.assert((o&48)!==32,"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),Nr(n,3|o,s,u)}function Tn(n,o=0,s,u){N.assert(!(o&7),"Argument out of range: flags");let g=n?ro(n)?Pd(!1,s,n,u,Ot):`generated@${getNodeId(n)}`:"";(s||u)&&(o|=16);let I=Nr(g,4|o,s,u);return I.original=n,I}function Sn(n){let o=t.createBasePrivateIdentifierNode(81);return o.escapedText=n,o.transformFlags|=16777216,o}function sr(n){return Fr(n,"#")||N.fail("First character of private identifier must be #: "+n),Sn(Mn(n))}function $t(n,o,s,u){let g=Sn(Mn(n));return setIdentifierAutoGenerate(g,{flags:o,id:il,prefix:s,suffix:u}),il++,g}function St(n,o,s){n&&!Fr(n,"#")&&N.fail("First character of private identifier must be #: "+n);let u=8|(n?3:1);return $t(n??"",u,o,s)}function xn(n,o,s){let u=ro(n)?Pd(!0,o,n,s,Ot):`#generated@${getNodeId(n)}`,I=$t(u,4|(o||s?16:0),o,s);return I.original=n,I}function Tr(n){return t.createBaseTokenNode(n)}function vt(n){N.assert(n>=0&&n<=165,"Invalid token"),N.assert(n<=15||n>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),N.assert(n<=9||n>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),N.assert(n!==80,"Invalid token. Use 'createIdentifier' to create identifiers");let o=Tr(n),s=0;switch(n){case 134:s=384;break;case 160:s=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:s=1;break;case 108:s=134218752,o.flowNode=void 0;break;case 126:s=1024;break;case 129:s=16777216;break;case 110:s=16384,o.flowNode=void 0;break}return s&&(o.transformFlags|=s),o}function ct(){return vt(108)}function Ut(){return vt(110)}function fr(){return vt(106)}function ht(){return vt(112)}function wn(){return vt(97)}function Tt(n){return vt(n)}function Or(n){let o=[];return n&1&&o.push(Tt(95)),n&2&&o.push(Tt(138)),n&1024&&o.push(Tt(90)),n&2048&&o.push(Tt(87)),n&4&&o.push(Tt(125)),n&8&&o.push(Tt(123)),n&16&&o.push(Tt(124)),n&256&&o.push(Tt(128)),n&32&&o.push(Tt(126)),n&16384&&o.push(Tt(164)),n&64&&o.push(Tt(148)),n&128&&o.push(Tt(129)),n&512&&o.push(Tt(134)),n&32768&&o.push(Tt(103)),n&65536&&o.push(Tt(147)),o.length?o:void 0}function pt(n,o){let s=B(166);return s.left=n,s.right=Xe(o),s.transformFlags|=V(s.left)|e_(s.right),s.flowNode=void 0,s}function Mr(n,o,s){return n.left!==o||n.right!==s?r(pt(o,s),n):n}function at(n){let o=B(167);return o.expression=a().parenthesizeExpressionOfComputedPropertyName(n),o.transformFlags|=V(o.expression)|1024|131072,o}function er(n,o){return n.expression!==o?r(at(o),n):n}function Qt(n,o,s,u){let g=ae(168);return g.modifiers=Oe(n),g.name=Xe(o),g.constraint=s,g.default=u,g.transformFlags=1,g.expression=void 0,g.jsDoc=void 0,g}function tn(n,o,s,u,g){return n.modifiers!==o||n.name!==s||n.constraint!==u||n.default!==g?r(Qt(o,s,u,g),n):n}function Bn(n,o,s,u,g,I){let W=ae(169);return W.modifiers=Oe(n),W.dotDotDotToken=o,W.name=Xe(s),W.questionToken=u,W.type=g,W.initializer=To(I),ym(W.name)?W.transformFlags=1:W.transformFlags=De(W.modifiers)|V(W.dotDotDotToken)|In(W.name)|V(W.questionToken)|V(W.initializer)|(W.questionToken??W.type?1:0)|(W.dotDotDotToken??W.initializer?1024:0)|(ln(W.modifiers)&16476?8192:0),W.jsDoc=void 0,W}function Un(n,o,s,u,g,I,W){return n.modifiers!==o||n.dotDotDotToken!==s||n.name!==u||n.questionToken!==g||n.type!==I||n.initializer!==W?r(Bn(o,s,u,g,I,W),n):n}function rn(n){let o=B(170);return o.expression=a().parenthesizeLeftSideOfAccess(n,!1),o.transformFlags|=V(o.expression)|1|8192|33554432,o}function nn(n,o){return n.expression!==o?r(rn(o),n):n}function Di(n,o,s,u){let g=ae(171);return g.modifiers=Oe(n),g.name=Xe(o),g.type=u,g.questionToken=s,g.transformFlags=1,g.initializer=void 0,g.jsDoc=void 0,g}function qn(n,o,s,u,g){return n.modifiers!==o||n.name!==s||n.questionToken!==u||n.type!==g?Ae(Di(o,s,u,g),n):n}function Ae(n,o){return n!==o&&(n.initializer=o.initializer),r(n,o)}function q(n,o,s,u,g){let I=ae(172);I.modifiers=Oe(n),I.name=Xe(o),I.questionToken=s&&Pl(s)?s:void 0,I.exclamationToken=s&&Dd(s)?s:void 0,I.type=u,I.initializer=To(g);let W=I.flags&33554432||ln(I.modifiers)&2;return I.transformFlags=De(I.modifiers)|In(I.name)|V(I.initializer)|(W||I.questionToken||I.exclamationToken||I.type?1:0)|(ao(I.name)||ln(I.modifiers)&32&&I.initializer?8192:0)|16777216,I.jsDoc=void 0,I}function oe(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.questionToken!==(u!==void 0&&Pl(u)?u:void 0)||n.exclamationToken!==(u!==void 0&&Dd(u)?u:void 0)||n.type!==g||n.initializer!==I?r(q(o,s,u,g,I),n):n}function ge(n,o,s,u,g,I){let W=ae(173);return W.modifiers=Oe(n),W.name=Xe(o),W.questionToken=s,W.typeParameters=Oe(u),W.parameters=Oe(g),W.type=I,W.transformFlags=1,W.jsDoc=void 0,W.locals=void 0,W.nextContainer=void 0,W.typeArguments=void 0,W}function Se(n,o,s,u,g,I,W){return n.modifiers!==o||n.name!==s||n.questionToken!==u||n.typeParameters!==g||n.parameters!==I||n.type!==W?Ce(ge(o,s,u,g,I,W),n):n}function nt(n,o,s,u,g,I,W,de){let We=ae(174);if(We.modifiers=Oe(n),We.asteriskToken=o,We.name=Xe(s),We.questionToken=u,We.exclamationToken=void 0,We.typeParameters=Oe(g),We.parameters=Y(I),We.type=W,We.body=de,!We.body)We.transformFlags=1;else{let Er=ln(We.modifiers)&512,$n=!!We.asteriskToken,yi=Er&&$n;We.transformFlags=De(We.modifiers)|V(We.asteriskToken)|In(We.name)|V(We.questionToken)|De(We.typeParameters)|De(We.parameters)|V(We.type)|V(We.body)&-67108865|(yi?128:Er?256:$n?2048:0)|(We.questionToken||We.typeParameters||We.type?1:0)|1024}return We.typeArguments=void 0,We.jsDoc=void 0,We.locals=void 0,We.nextContainer=void 0,We.flowNode=void 0,We.endFlowNode=void 0,We.returnFlowNode=void 0,We}function z(n,o,s,u,g,I,W,de,We){return n.modifiers!==o||n.asteriskToken!==s||n.name!==u||n.questionToken!==g||n.typeParameters!==I||n.parameters!==W||n.type!==de||n.body!==We?X(nt(o,s,u,g,I,W,de,We),n):n}function X(n,o){return n!==o&&(n.exclamationToken=o.exclamationToken),r(n,o)}function ee(n){let o=ae(175);return o.body=n,o.transformFlags=V(n)|16777216,o.modifiers=void 0,o.jsDoc=void 0,o.locals=void 0,o.nextContainer=void 0,o.endFlowNode=void 0,o.returnFlowNode=void 0,o}function xe(n,o){return n.body!==o?ke(ee(o),n):n}function ke(n,o){return n!==o&&(n.modifiers=o.modifiers),r(n,o)}function Le(n,o,s){let u=ae(176);return u.modifiers=Oe(n),u.parameters=Y(o),u.body=s,u.transformFlags=De(u.modifiers)|De(u.parameters)|V(u.body)&-67108865|1024,u.typeParameters=void 0,u.type=void 0,u.typeArguments=void 0,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.endFlowNode=void 0,u.returnFlowNode=void 0,u}function lt(n,o,s,u){return n.modifiers!==o||n.parameters!==s||n.body!==u?yt(Le(o,s,u),n):n}function yt(n,o){return n!==o&&(n.typeParameters=o.typeParameters,n.type=o.type),Ce(n,o)}function jt(n,o,s,u,g){let I=ae(177);return I.modifiers=Oe(n),I.name=Xe(o),I.parameters=Y(s),I.type=u,I.body=g,I.body?I.transformFlags=De(I.modifiers)|In(I.name)|De(I.parameters)|V(I.type)|V(I.body)&-67108865|(I.type?1:0):I.transformFlags=1,I.typeArguments=void 0,I.typeParameters=void 0,I.jsDoc=void 0,I.locals=void 0,I.nextContainer=void 0,I.flowNode=void 0,I.endFlowNode=void 0,I.returnFlowNode=void 0,I}function qr(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.parameters!==u||n.type!==g||n.body!==I?na(jt(o,s,u,g,I),n):n}function na(n,o){return n!==o&&(n.typeParameters=o.typeParameters),Ce(n,o)}function Cn(n,o,s,u){let g=ae(178);return g.modifiers=Oe(n),g.name=Xe(o),g.parameters=Y(s),g.body=u,g.body?g.transformFlags=De(g.modifiers)|In(g.name)|De(g.parameters)|V(g.body)&-67108865|(g.type?1:0):g.transformFlags=1,g.typeArguments=void 0,g.typeParameters=void 0,g.type=void 0,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g.endFlowNode=void 0,g.returnFlowNode=void 0,g}function zn(n,o,s,u,g){return n.modifiers!==o||n.name!==s||n.parameters!==u||n.body!==g?Pi(Cn(o,s,u,g),n):n}function Pi(n,o){return n!==o&&(n.typeParameters=o.typeParameters,n.type=o.type),Ce(n,o)}function ia(n,o,s){let u=ae(179);return u.typeParameters=Oe(n),u.parameters=Oe(o),u.type=s,u.transformFlags=1,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.typeArguments=void 0,u}function Wn(n,o,s,u){return n.typeParameters!==o||n.parameters!==s||n.type!==u?Ce(ia(o,s,u),n):n}function En(n,o,s){let u=ae(180);return u.typeParameters=Oe(n),u.parameters=Oe(o),u.type=s,u.transformFlags=1,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.typeArguments=void 0,u}function Ii(n,o,s,u){return n.typeParameters!==o||n.parameters!==s||n.type!==u?Ce(En(o,s,u),n):n}function aa(n,o,s){let u=ae(181);return u.modifiers=Oe(n),u.parameters=Oe(o),u.type=s,u.transformFlags=1,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.typeArguments=void 0,u}function Vn(n,o,s,u){return n.parameters!==s||n.type!==u||n.modifiers!==o?Ce(aa(o,s,u),n):n}function Sr(n,o){let s=B(204);return s.type=n,s.literal=o,s.transformFlags=1,s}function Je(n,o,s){return n.type!==o||n.literal!==s?r(Sr(o,s),n):n}function oa(n){return vt(n)}function Mt(n,o,s){let u=B(182);return u.assertsModifier=n,u.parameterName=Xe(o),u.type=s,u.transformFlags=1,u}function Lr(n,o,s,u){return n.assertsModifier!==o||n.parameterName!==s||n.type!==u?r(Mt(o,s,u),n):n}function j(n,o){let s=B(183);return s.typeName=Xe(n),s.typeArguments=o&&a().parenthesizeTypeArguments(Y(o)),s.transformFlags=1,s}function T(n,o,s){return n.typeName!==o||n.typeArguments!==s?r(j(o,s),n):n}function x(n,o,s){let u=ae(184);return u.typeParameters=Oe(n),u.parameters=Oe(o),u.type=s,u.transformFlags=1,u.modifiers=void 0,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.typeArguments=void 0,u}function f(n,o,s,u){return n.typeParameters!==o||n.parameters!==s||n.type!==u?$(x(o,s,u),n):n}function $(n,o){return n!==o&&(n.modifiers=o.modifiers),Ce(n,o)}function Q(...n){return n.length===4?O(...n):n.length===3?fe(...n):N.fail("Incorrect number of arguments specified.")}function O(n,o,s,u){let g=ae(185);return g.modifiers=Oe(n),g.typeParameters=Oe(o),g.parameters=Oe(s),g.type=u,g.transformFlags=1,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.typeArguments=void 0,g}function fe(n,o,s){return O(void 0,n,o,s)}function be(...n){return n.length===5?he(...n):n.length===4?Re(...n):N.fail("Incorrect number of arguments specified.")}function he(n,o,s,u,g){return n.modifiers!==o||n.typeParameters!==s||n.parameters!==u||n.type!==g?Ce(Q(o,s,u,g),n):n}function Re(n,o,s,u){return he(n,n.modifiers,o,s,u)}function we(n,o){let s=B(186);return s.exprName=n,s.typeArguments=o&&a().parenthesizeTypeArguments(o),s.transformFlags=1,s}function et(n,o,s){return n.exprName!==o||n.typeArguments!==s?r(we(o,s),n):n}function Ye(n){let o=ae(187);return o.members=Y(n),o.transformFlags=1,o}function Ke(n,o){return n.members!==o?r(Ye(o),n):n}function It(n){let o=B(188);return o.elementType=a().parenthesizeNonArrayTypeOfPostfixType(n),o.transformFlags=1,o}function qt(n,o){return n.elementType!==o?r(It(o),n):n}function _r(n){let o=B(189);return o.elements=Y(a().parenthesizeElementTypesOfTupleType(n)),o.transformFlags=1,o}function Te(n,o){return n.elements!==o?r(_r(o),n):n}function ft(n,o,s,u){let g=ae(202);return g.dotDotDotToken=n,g.name=o,g.questionToken=s,g.type=u,g.transformFlags=1,g.jsDoc=void 0,g}function An(n,o,s,u,g){return n.dotDotDotToken!==o||n.name!==s||n.questionToken!==u||n.type!==g?r(ft(o,s,u,g),n):n}function Et(n){let o=B(190);return o.type=a().parenthesizeTypeOfOptionalType(n),o.transformFlags=1,o}function H(n,o){return n.type!==o?r(Et(o),n):n}function Fa(n){let o=B(191);return o.type=n,o.transformFlags=1,o}function Ie(n,o){return n.type!==o?r(Fa(o),n):n}function ot(n,o,s){let u=B(n);return u.types=ue.createNodeArray(s(o)),u.transformFlags=1,u}function cr(n,o,s){return n.types!==o?r(ot(n.kind,o,s),n):n}function an(n){return ot(192,n,a().parenthesizeConstituentTypesOfUnionType)}function Ba(n,o){return cr(n,o,a().parenthesizeConstituentTypesOfUnionType)}function kn(n){return ot(193,n,a().parenthesizeConstituentTypesOfIntersectionType)}function je(n,o){return cr(n,o,a().parenthesizeConstituentTypesOfIntersectionType)}function dt(n,o,s,u){let g=B(194);return g.checkType=a().parenthesizeCheckTypeOfConditionalType(n),g.extendsType=a().parenthesizeExtendsTypeOfConditionalType(o),g.trueType=s,g.falseType=u,g.transformFlags=1,g.locals=void 0,g.nextContainer=void 0,g}function li(n,o,s,u,g){return n.checkType!==o||n.extendsType!==s||n.trueType!==u||n.falseType!==g?r(dt(o,s,u,g),n):n}function Hn(n){let o=B(195);return o.typeParameter=n,o.transformFlags=1,o}function e1(n,o){return n.typeParameter!==o?r(Hn(o),n):n}function dr(n,o){let s=B(203);return s.head=n,s.templateSpans=Y(o),s.transformFlags=1,s}function t1(n,o,s){return n.head!==o||n.templateSpans!==s?r(dr(o,s),n):n}function ui(n,o,s,u,g=!1){let I=B(205);return I.argument=n,I.assertions=o,I.qualifier=s,I.typeArguments=u&&a().parenthesizeTypeArguments(u),I.isTypeOf=g,I.transformFlags=1,I}function fs(n,o,s,u,g,I=n.isTypeOf){return n.argument!==o||n.assertions!==s||n.qualifier!==u||n.typeArguments!==g||n.isTypeOf!==I?r(ui(o,s,u,g,I),n):n}function xr(n){let o=B(196);return o.type=n,o.transformFlags=1,o}function Ft(n,o){return n.type!==o?r(xr(o),n):n}function M(){let n=B(197);return n.transformFlags=1,n}function Jr(n,o){let s=B(198);return s.operator=n,s.type=n===148?a().parenthesizeOperandOfReadonlyTypeOperator(o):a().parenthesizeOperandOfTypeOperator(o),s.transformFlags=1,s}function sa(n,o){return n.type!==o?r(Jr(n.operator,o),n):n}function Ni(n,o){let s=B(199);return s.objectType=a().parenthesizeNonArrayTypeOfPostfixType(n),s.indexType=o,s.transformFlags=1,s}function G_(n,o,s){return n.objectType!==o||n.indexType!==s?r(Ni(o,s),n):n}function Lt(n,o,s,u,g,I){let W=ae(200);return W.readonlyToken=n,W.typeParameter=o,W.nameType=s,W.questionToken=u,W.type=g,W.members=I&&Y(I),W.transformFlags=1,W.locals=void 0,W.nextContainer=void 0,W}function Yt(n,o,s,u,g,I,W){return n.readonlyToken!==o||n.typeParameter!==s||n.nameType!==u||n.questionToken!==g||n.type!==I||n.members!==W?r(Lt(o,s,u,g,I,W),n):n}function Oi(n){let o=B(201);return o.literal=n,o.transformFlags=1,o}function r1(n,o){return n.literal!==o?r(Oi(o),n):n}function Tu(n){let o=B(206);return o.elements=Y(n),o.transformFlags|=De(o.elements)|1024|524288,o.transformFlags&32768&&(o.transformFlags|=65664),o}function Ua(n,o){return n.elements!==o?r(Tu(o),n):n}function Su(n){let o=B(207);return o.elements=Y(n),o.transformFlags|=De(o.elements)|1024|524288,o}function X_(n,o){return n.elements!==o?r(Su(o),n):n}function _a(n,o,s,u){let g=ae(208);return g.dotDotDotToken=n,g.propertyName=Xe(o),g.name=Xe(s),g.initializer=To(u),g.transformFlags|=V(g.dotDotDotToken)|In(g.propertyName)|In(g.name)|V(g.initializer)|(g.dotDotDotToken?32768:0)|1024,g.flowNode=void 0,g}function xu(n,o,s,u,g){return n.propertyName!==s||n.dotDotDotToken!==o||n.name!==u||n.initializer!==g?r(_a(o,s,u,g),n):n}function $_(n,o){let s=B(209),u=n&&wi(n),g=Y(n,u&&Pm(u)?!0:void 0);return s.elements=a().parenthesizeExpressionsOfCommaDelimitedList(g),s.multiLine=o,s.transformFlags|=De(s.elements),s}function wu(n,o){return n.elements!==o?r($_(o,n.multiLine),n):n}function ds(n,o){let s=ae(210);return s.properties=Y(n),s.multiLine=o,s.transformFlags|=De(s.properties),s.jsDoc=void 0,s}function n1(n,o){return n.properties!==o?r(ds(o,n.multiLine),n):n}function ms(n,o,s){let u=ae(211);return u.expression=n,u.questionDotToken=o,u.name=s,u.transformFlags=V(u.expression)|V(u.questionDotToken)|(Ee(u.name)?e_(u.name):V(u.name)|536870912),u.jsDoc=void 0,u.flowNode=void 0,u}function Mi(n,o){let s=ms(a().parenthesizeLeftSideOfAccess(n,!1),void 0,Xe(o));return Uf(n)&&(s.transformFlags|=384),s}function Q_(n,o,s){return Y4(n)?ys(n,o,n.questionDotToken,gi(s,Ee)):n.expression!==o||n.name!==s?r(Mi(o,s),n):n}function hs(n,o,s){let u=ms(a().parenthesizeLeftSideOfAccess(n,!0),o,Xe(s));return u.flags|=64,u.transformFlags|=32,u}function ys(n,o,s,u){return N.assert(!!(n.flags&64),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),n.expression!==o||n.questionDotToken!==s||n.name!==u?r(hs(o,s,u),n):n}function Cu(n,o,s){let u=ae(212);return u.expression=n,u.questionDotToken=o,u.argumentExpression=s,u.transformFlags|=V(u.expression)|V(u.questionDotToken)|V(u.argumentExpression),u.jsDoc=void 0,u.flowNode=void 0,u}function Y_(n,o){let s=Cu(a().parenthesizeLeftSideOfAccess(n,!1),void 0,Cr(o));return Uf(n)&&(s.transformFlags|=384),s}function Eu(n,o,s){return K4(n)?ku(n,o,n.questionDotToken,s):n.expression!==o||n.argumentExpression!==s?r(Y_(o,s),n):n}function Au(n,o,s){let u=Cu(a().parenthesizeLeftSideOfAccess(n,!0),o,Cr(s));return u.flags|=64,u.transformFlags|=32,u}function ku(n,o,s,u){return N.assert(!!(n.flags&64),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),n.expression!==o||n.questionDotToken!==s||n.argumentExpression!==u?r(Au(o,s,u),n):n}function po(n,o,s,u){let g=ae(213);return g.expression=n,g.questionDotToken=o,g.typeArguments=s,g.arguments=u,g.transformFlags|=V(g.expression)|V(g.questionDotToken)|De(g.typeArguments)|De(g.arguments),g.typeArguments&&(g.transformFlags|=1),yd(g.expression)&&(g.transformFlags|=16384),g}function fo(n,o,s){let u=po(a().parenthesizeLeftSideOfAccess(n,!1),void 0,Oe(o),a().parenthesizeExpressionsOfCommaDelimitedList(Y(s)));return Wx(u.expression)&&(u.transformFlags|=8388608),u}function i1(n,o,s,u){return y0(n)?gs(n,o,n.questionDotToken,s,u):n.expression!==o||n.typeArguments!==s||n.arguments!==u?r(fo(o,s,u),n):n}function zr(n,o,s,u){let g=po(a().parenthesizeLeftSideOfAccess(n,!0),o,Oe(s),a().parenthesizeExpressionsOfCommaDelimitedList(Y(u)));return g.flags|=64,g.transformFlags|=32,g}function gs(n,o,s,u,g){return N.assert(!!(n.flags&64),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),n.expression!==o||n.questionDotToken!==s||n.typeArguments!==u||n.arguments!==g?r(zr(o,s,u,g),n):n}function bs(n,o,s){let u=ae(214);return u.expression=a().parenthesizeExpressionOfNew(n),u.typeArguments=Oe(o),u.arguments=s?a().parenthesizeExpressionsOfCommaDelimitedList(s):void 0,u.transformFlags|=V(u.expression)|De(u.typeArguments)|De(u.arguments)|32,u.typeArguments&&(u.transformFlags|=1),u}function Du(n,o,s,u){return n.expression!==o||n.typeArguments!==s||n.arguments!==u?r(bs(o,s,u),n):n}function Pu(n,o,s){let u=B(215);return u.tag=a().parenthesizeLeftSideOfAccess(n,!1),u.typeArguments=Oe(o),u.template=s,u.transformFlags|=V(u.tag)|De(u.typeArguments)|V(u.template)|1024,u.typeArguments&&(u.transformFlags|=1),UT(u.template)&&(u.transformFlags|=128),u}function a1(n,o,s,u){return n.tag!==o||n.typeArguments!==s||n.template!==u?r(Pu(o,s,u),n):n}function Iu(n,o){let s=B(216);return s.expression=a().parenthesizeOperandOfPrefixUnary(o),s.type=n,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function Nu(n,o,s){return n.type!==o||n.expression!==s?r(Iu(o,s),n):n}function K_(n){let o=B(217);return o.expression=n,o.transformFlags=V(o.expression),o.jsDoc=void 0,o}function Ou(n,o){return n.expression!==o?r(K_(o),n):n}function Z_(n,o,s,u,g,I,W){let de=ae(218);de.modifiers=Oe(n),de.asteriskToken=o,de.name=Xe(s),de.typeParameters=Oe(u),de.parameters=Y(g),de.type=I,de.body=W;let We=ln(de.modifiers)&512,Er=!!de.asteriskToken,$n=We&&Er;return de.transformFlags=De(de.modifiers)|V(de.asteriskToken)|In(de.name)|De(de.typeParameters)|De(de.parameters)|V(de.type)|V(de.body)&-67108865|($n?128:We?256:Er?2048:0)|(de.typeParameters||de.type?1:0)|4194304,de.typeArguments=void 0,de.jsDoc=void 0,de.locals=void 0,de.nextContainer=void 0,de.flowNode=void 0,de.endFlowNode=void 0,de.returnFlowNode=void 0,de}function Mu(n,o,s,u,g,I,W,de){return n.name!==u||n.modifiers!==o||n.asteriskToken!==s||n.typeParameters!==g||n.parameters!==I||n.type!==W||n.body!==de?Ce(Z_(o,s,u,g,I,W,de),n):n}function ec(n,o,s,u,g,I){let W=ae(219);W.modifiers=Oe(n),W.typeParameters=Oe(o),W.parameters=Y(s),W.type=u,W.equalsGreaterThanToken=g??vt(39),W.body=a().parenthesizeConciseBodyOfArrowFunction(I);let de=ln(W.modifiers)&512;return W.transformFlags=De(W.modifiers)|De(W.typeParameters)|De(W.parameters)|V(W.type)|V(W.equalsGreaterThanToken)|V(W.body)&-67108865|(W.typeParameters||W.type?1:0)|(de?16640:0)|1024,W.typeArguments=void 0,W.jsDoc=void 0,W.locals=void 0,W.nextContainer=void 0,W.flowNode=void 0,W.endFlowNode=void 0,W.returnFlowNode=void 0,W}function tc(n,o,s,u,g,I,W){return n.modifiers!==o||n.typeParameters!==s||n.parameters!==u||n.type!==g||n.equalsGreaterThanToken!==I||n.body!==W?Ce(ec(o,s,u,g,I,W),n):n}function Lu(n){let o=B(220);return o.expression=a().parenthesizeOperandOfPrefixUnary(n),o.transformFlags|=V(o.expression),o}function Wr(n,o){return n.expression!==o?r(Lu(o),n):n}function vs(n){let o=B(221);return o.expression=a().parenthesizeOperandOfPrefixUnary(n),o.transformFlags|=V(o.expression),o}function pi(n,o){return n.expression!==o?r(vs(o),n):n}function rc(n){let o=B(222);return o.expression=a().parenthesizeOperandOfPrefixUnary(n),o.transformFlags|=V(o.expression),o}function ca(n,o){return n.expression!==o?r(rc(o),n):n}function la(n){let o=B(223);return o.expression=a().parenthesizeOperandOfPrefixUnary(n),o.transformFlags|=V(o.expression)|256|128|2097152,o}function o1(n,o){return n.expression!==o?r(la(o),n):n}function qa(n,o){let s=B(224);return s.operator=n,s.operand=a().parenthesizeOperandOfPrefixUnary(o),s.transformFlags|=V(s.operand),(n===46||n===47)&&Ee(s.operand)&&!wa(s.operand)&&!Y0(s.operand)&&(s.transformFlags|=268435456),s}function s1(n,o){return n.operand!==o?r(qa(n.operator,o),n):n}function Ts(n,o){let s=B(225);return s.operator=o,s.operand=a().parenthesizeOperandOfPostfixUnary(n),s.transformFlags|=V(s.operand),Ee(s.operand)&&!wa(s.operand)&&!Y0(s.operand)&&(s.transformFlags|=268435456),s}function _1(n,o){return n.operand!==o?r(Ts(o,n.operator),n):n}function nc(n,o,s){let u=ae(226),g=lr(o),I=g.kind;return u.left=a().parenthesizeLeftSideOfBinary(I,n),u.operatorToken=g,u.right=a().parenthesizeRightSideOfBinary(I,u.left,s),u.transformFlags|=V(u.left)|V(u.operatorToken)|V(u.right),I===61?u.transformFlags|=32:I===64?uo(u.left)?u.transformFlags|=5248|Ju(u.left):iu(u.left)&&(u.transformFlags|=5120|Ju(u.left)):I===43||I===68?u.transformFlags|=512:vm(I)&&(u.transformFlags|=16),I===103&&jr(u.left)&&(u.transformFlags|=536870912),u.jsDoc=void 0,u}function Ju(n){return U6(n)?65536:0}function Ru(n,o,s,u){return n.left!==o||n.operatorToken!==s||n.right!==u?r(nc(o,s,u),n):n}function ju(n,o,s,u,g){let I=B(227);return I.condition=a().parenthesizeConditionOfConditionalExpression(n),I.questionToken=o??vt(58),I.whenTrue=a().parenthesizeBranchOfConditionalExpression(s),I.colonToken=u??vt(59),I.whenFalse=a().parenthesizeBranchOfConditionalExpression(g),I.transformFlags|=V(I.condition)|V(I.questionToken)|V(I.whenTrue)|V(I.colonToken)|V(I.whenFalse),I}function fi(n,o,s,u,g,I){return n.condition!==o||n.questionToken!==s||n.whenTrue!==u||n.colonToken!==g||n.whenFalse!==I?r(ju(o,s,u,g,I),n):n}function ic(n,o){let s=B(228);return s.head=n,s.templateSpans=Y(o),s.transformFlags|=V(s.head)|De(s.templateSpans)|1024,s}function c1(n,o,s){return n.head!==o||n.templateSpans!==s?r(ic(o,s),n):n}function Ss(n,o,s,u=0){N.assert(!(u&-7177),"Unsupported template flags.");let g;if(s!==void 0&&s!==o&&(g=PL(n,s),typeof g=="object"))return N.fail("Invalid raw text");if(o===void 0){if(g===void 0)return N.fail("Arguments 'text' and 'rawText' may not both be undefined.");o=g}else g!==void 0&&N.assert(o===g,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return o}function za(n){let o=1024;return n&&(o|=128),o}function Fu(n,o,s,u){let g=Tr(n);return g.text=o,g.rawText=s,g.templateFlags=u&7176,g.transformFlags=za(g.templateFlags),g}function ac(n,o,s,u){let g=ae(n);return g.text=o,g.rawText=s,g.templateFlags=u&7176,g.transformFlags=za(g.templateFlags),g}function Li(n,o,s,u){return n===15?ac(n,o,s,u):Fu(n,o,s,u)}function oc(n,o,s){return n=Ss(16,n,o,s),Li(16,n,o,s)}function l1(n,o,s){return n=Ss(16,n,o,s),Li(17,n,o,s)}function Bu(n,o,s){return n=Ss(16,n,o,s),Li(18,n,o,s)}function u1(n,o,s){return n=Ss(16,n,o,s),ac(15,n,o,s)}function Uu(n,o){N.assert(!n||!!o,"A `YieldExpression` with an asteriskToken must have an expression.");let s=B(229);return s.expression=o&&a().parenthesizeExpressionForDisallowedComma(o),s.asteriskToken=n,s.transformFlags|=V(s.expression)|V(s.asteriskToken)|1024|128|1048576,s}function p1(n,o,s){return n.expression!==s||n.asteriskToken!==o?r(Uu(o,s),n):n}function qu(n){let o=B(230);return o.expression=a().parenthesizeExpressionForDisallowedComma(n),o.transformFlags|=V(o.expression)|1024|32768,o}function f1(n,o){return n.expression!==o?r(qu(o),n):n}function xs(n,o,s,u,g){let I=ae(231);return I.modifiers=Oe(n),I.name=Xe(o),I.typeParameters=Oe(s),I.heritageClauses=Oe(u),I.members=Y(g),I.transformFlags|=De(I.modifiers)|In(I.name)|De(I.typeParameters)|De(I.heritageClauses)|De(I.members)|(I.typeParameters?1:0)|1024,I.jsDoc=void 0,I}function sc(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.typeParameters!==u||n.heritageClauses!==g||n.members!==I?r(xs(o,s,u,g,I),n):n}function d1(){return B(232)}function Vr(n,o){let s=B(233);return s.expression=a().parenthesizeLeftSideOfAccess(n,!1),s.typeArguments=o&&a().parenthesizeTypeArguments(o),s.transformFlags|=V(s.expression)|De(s.typeArguments)|1024,s}function _c(n,o,s){return n.expression!==o||n.typeArguments!==s?r(Vr(o,s),n):n}function zu(n,o){let s=B(234);return s.expression=n,s.type=o,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function Wu(n,o,s){return n.expression!==o||n.type!==s?r(zu(o,s),n):n}function cc(n){let o=B(235);return o.expression=a().parenthesizeLeftSideOfAccess(n,!1),o.transformFlags|=V(o.expression)|1,o}function Vu(n,o){return e3(n)?ws(n,o):n.expression!==o?r(cc(o),n):n}function lc(n,o){let s=B(238);return s.expression=n,s.type=o,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function Dn(n,o,s){return n.expression!==o||n.type!==s?r(lc(o,s),n):n}function Hu(n){let o=B(235);return o.flags|=64,o.expression=a().parenthesizeLeftSideOfAccess(n,!0),o.transformFlags|=V(o.expression)|1,o}function ws(n,o){return N.assert(!!(n.flags&64),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),n.expression!==o?r(Hu(o),n):n}function Gn(n,o){let s=B(236);switch(s.keywordToken=n,s.name=o,s.transformFlags|=V(s.name),n){case 105:s.transformFlags|=1024;break;case 102:s.transformFlags|=32;break;default:return N.assertNever(n)}return s.flowNode=void 0,s}function Cs(n,o){return n.name!==o?r(Gn(n.keywordToken,o),n):n}function uc(n,o){let s=B(239);return s.expression=n,s.literal=o,s.transformFlags|=V(s.expression)|V(s.literal)|1024,s}function Gu(n,o,s){return n.expression!==o||n.literal!==s?r(uc(o,s),n):n}function m1(){let n=B(240);return n.transformFlags|=1024,n}function ua(n,o){let s=B(241);return s.statements=Y(n),s.multiLine=o,s.transformFlags|=De(s.statements),s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s}function h1(n,o){return n.statements!==o?r(ua(o,n.multiLine),n):n}function Xu(n,o){let s=B(243);return s.modifiers=Oe(n),s.declarationList=zt(o)?gc(o):o,s.transformFlags|=De(s.modifiers)|V(s.declarationList),ln(s.modifiers)&2&&(s.transformFlags=1),s.jsDoc=void 0,s.flowNode=void 0,s}function pc(n,o,s){return n.modifiers!==o||n.declarationList!==s?r(Xu(o,s),n):n}function fc(){let n=B(242);return n.jsDoc=void 0,n}function Es(n){let o=B(244);return o.expression=a().parenthesizeExpressionOfExpressionStatement(n),o.transformFlags|=V(o.expression),o.jsDoc=void 0,o.flowNode=void 0,o}function $u(n,o){return n.expression!==o?r(Es(o),n):n}function Qu(n,o,s){let u=B(245);return u.expression=n,u.thenStatement=on(o),u.elseStatement=on(s),u.transformFlags|=V(u.expression)|V(u.thenStatement)|V(u.elseStatement),u.jsDoc=void 0,u.flowNode=void 0,u}function Yu(n,o,s,u){return n.expression!==o||n.thenStatement!==s||n.elseStatement!==u?r(Qu(o,s,u),n):n}function Ku(n,o){let s=B(246);return s.statement=on(n),s.expression=o,s.transformFlags|=V(s.statement)|V(s.expression),s.jsDoc=void 0,s.flowNode=void 0,s}function y1(n,o,s){return n.statement!==o||n.expression!==s?r(Ku(o,s),n):n}function Zu(n,o){let s=B(247);return s.expression=n,s.statement=on(o),s.transformFlags|=V(s.expression)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function ep(n,o,s){return n.expression!==o||n.statement!==s?r(Zu(o,s),n):n}function dc(n,o,s,u){let g=B(248);return g.initializer=n,g.condition=o,g.incrementor=s,g.statement=on(u),g.transformFlags|=V(g.initializer)|V(g.condition)|V(g.incrementor)|V(g.statement),g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g}function g1(n,o,s,u,g){return n.initializer!==o||n.condition!==s||n.incrementor!==u||n.statement!==g?r(dc(o,s,u,g),n):n}function tp(n,o,s){let u=B(249);return u.initializer=n,u.expression=o,u.statement=on(s),u.transformFlags|=V(u.initializer)|V(u.expression)|V(u.statement),u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u.flowNode=void 0,u}function b1(n,o,s,u){return n.initializer!==o||n.expression!==s||n.statement!==u?r(tp(o,s,u),n):n}function rp(n,o,s,u){let g=B(250);return g.awaitModifier=n,g.initializer=o,g.expression=a().parenthesizeExpressionForDisallowedComma(s),g.statement=on(u),g.transformFlags|=V(g.awaitModifier)|V(g.initializer)|V(g.expression)|V(g.statement)|1024,n&&(g.transformFlags|=128),g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g}function v1(n,o,s,u,g){return n.awaitModifier!==o||n.initializer!==s||n.expression!==u||n.statement!==g?r(rp(o,s,u,g),n):n}function mc(n){let o=B(251);return o.label=Xe(n),o.transformFlags|=V(o.label)|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function np(n,o){return n.label!==o?r(mc(o),n):n}function hc(n){let o=B(252);return o.label=Xe(n),o.transformFlags|=V(o.label)|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function T1(n,o){return n.label!==o?r(hc(o),n):n}function ip(n){let o=B(253);return o.expression=n,o.transformFlags|=V(o.expression)|128|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function ap(n,o){return n.expression!==o?r(ip(o),n):n}function yc(n,o){let s=B(254);return s.expression=n,s.statement=on(o),s.transformFlags|=V(s.expression)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function op(n,o,s){return n.expression!==o||n.statement!==s?r(yc(o,s),n):n}function pa(n,o){let s=B(255);return s.expression=a().parenthesizeExpressionForDisallowedComma(n),s.caseBlock=o,s.transformFlags|=V(s.expression)|V(s.caseBlock),s.jsDoc=void 0,s.flowNode=void 0,s.possiblyExhaustive=!1,s}function S1(n,o,s){return n.expression!==o||n.caseBlock!==s?r(pa(o,s),n):n}function sp(n,o){let s=B(256);return s.label=Xe(n),s.statement=on(o),s.transformFlags|=V(s.label)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function _p(n,o,s){return n.label!==o||n.statement!==s?r(sp(o,s),n):n}function cp(n){let o=B(257);return o.expression=n,o.transformFlags|=V(o.expression),o.jsDoc=void 0,o.flowNode=void 0,o}function x1(n,o){return n.expression!==o?r(cp(o),n):n}function lp(n,o,s){let u=B(258);return u.tryBlock=n,u.catchClause=o,u.finallyBlock=s,u.transformFlags|=V(u.tryBlock)|V(u.catchClause)|V(u.finallyBlock),u.jsDoc=void 0,u.flowNode=void 0,u}function up(n,o,s,u){return n.tryBlock!==o||n.catchClause!==s||n.finallyBlock!==u?r(lp(o,s,u),n):n}function pp(){let n=B(259);return n.jsDoc=void 0,n.flowNode=void 0,n}function As(n,o,s,u){let g=ae(260);return g.name=Xe(n),g.exclamationToken=o,g.type=s,g.initializer=To(u),g.transformFlags|=In(g.name)|V(g.initializer)|(g.exclamationToken??g.type?1:0),g.jsDoc=void 0,g}function w1(n,o,s,u,g){return n.name!==o||n.type!==u||n.exclamationToken!==s||n.initializer!==g?r(As(o,s,u,g),n):n}function gc(n,o=0){let s=B(261);return s.flags|=o&7,s.declarations=Y(n),s.transformFlags|=De(s.declarations)|4194304,o&7&&(s.transformFlags|=263168),o&4&&(s.transformFlags|=4),s}function C1(n,o){return n.declarations!==o?r(gc(o,n.flags),n):n}function bc(n,o,s,u,g,I,W){let de=ae(262);if(de.modifiers=Oe(n),de.asteriskToken=o,de.name=Xe(s),de.typeParameters=Oe(u),de.parameters=Y(g),de.type=I,de.body=W,!de.body||ln(de.modifiers)&2)de.transformFlags=1;else{let We=ln(de.modifiers)&512,Er=!!de.asteriskToken,$n=We&&Er;de.transformFlags=De(de.modifiers)|V(de.asteriskToken)|In(de.name)|De(de.typeParameters)|De(de.parameters)|V(de.type)|V(de.body)&-67108865|($n?128:We?256:Er?2048:0)|(de.typeParameters||de.type?1:0)|4194304}return de.typeArguments=void 0,de.jsDoc=void 0,de.locals=void 0,de.nextContainer=void 0,de.endFlowNode=void 0,de.returnFlowNode=void 0,de}function fp(n,o,s,u,g,I,W,de){return n.modifiers!==o||n.asteriskToken!==s||n.name!==u||n.typeParameters!==g||n.parameters!==I||n.type!==W||n.body!==de?E1(bc(o,s,u,g,I,W,de),n):n}function E1(n,o){return n!==o&&n.modifiers===o.modifiers&&(n.modifiers=o.modifiers),Ce(n,o)}function vc(n,o,s,u,g){let I=ae(263);return I.modifiers=Oe(n),I.name=Xe(o),I.typeParameters=Oe(s),I.heritageClauses=Oe(u),I.members=Y(g),ln(I.modifiers)&2?I.transformFlags=1:(I.transformFlags|=De(I.modifiers)|In(I.name)|De(I.typeParameters)|De(I.heritageClauses)|De(I.members)|(I.typeParameters?1:0)|1024,I.transformFlags&8192&&(I.transformFlags|=1)),I.jsDoc=void 0,I}function Tc(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.typeParameters!==u||n.heritageClauses!==g||n.members!==I?r(vc(o,s,u,g,I),n):n}function dp(n,o,s,u,g){let I=ae(264);return I.modifiers=Oe(n),I.name=Xe(o),I.typeParameters=Oe(s),I.heritageClauses=Oe(u),I.members=Y(g),I.transformFlags=1,I.jsDoc=void 0,I}function gt(n,o,s,u,g,I){return n.modifiers!==o||n.name!==s||n.typeParameters!==u||n.heritageClauses!==g||n.members!==I?r(dp(o,s,u,g,I),n):n}function Ji(n,o,s,u){let g=ae(265);return g.modifiers=Oe(n),g.name=Xe(o),g.typeParameters=Oe(s),g.type=u,g.transformFlags=1,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g}function Sc(n,o,s,u,g){return n.modifiers!==o||n.name!==s||n.typeParameters!==u||n.type!==g?r(Ji(o,s,u,g),n):n}function Ri(n,o,s){let u=ae(266);return u.modifiers=Oe(n),u.name=Xe(o),u.members=Y(s),u.transformFlags|=De(u.modifiers)|V(u.name)|De(u.members)|1,u.transformFlags&=-67108865,u.jsDoc=void 0,u}function mp(n,o,s,u){return n.modifiers!==o||n.name!==s||n.members!==u?r(Ri(o,s,u),n):n}function Jt(n,o,s,u=0){let g=ae(267);return g.modifiers=Oe(n),g.flags|=u&2088,g.name=o,g.body=s,ln(g.modifiers)&2?g.transformFlags=1:g.transformFlags|=De(g.modifiers)|V(g.name)|V(g.body)|1,g.transformFlags&=-67108865,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g}function ji(n,o,s,u){return n.modifiers!==o||n.name!==s||n.body!==u?r(Jt(o,s,u,n.flags),n):n}function tr(n){let o=B(268);return o.statements=Y(n),o.transformFlags|=De(o.statements),o.jsDoc=void 0,o}function A1(n,o){return n.statements!==o?r(tr(o),n):n}function hp(n){let o=B(269);return o.clauses=Y(n),o.transformFlags|=De(o.clauses),o.locals=void 0,o.nextContainer=void 0,o}function k1(n,o){return n.clauses!==o?r(hp(o),n):n}function xc(n){let o=ae(270);return o.name=Xe(n),o.transformFlags|=e_(o.name)|1,o.modifiers=void 0,o.jsDoc=void 0,o}function D1(n,o){return n.name!==o?P1(xc(o),n):n}function P1(n,o){return n!==o&&(n.modifiers=o.modifiers),r(n,o)}function yp(n,o,s,u){let g=ae(271);return g.modifiers=Oe(n),g.name=Xe(s),g.isTypeOnly=o,g.moduleReference=u,g.transformFlags|=De(g.modifiers)|e_(g.name)|V(g.moduleReference),Nm(g.moduleReference)||(g.transformFlags|=1),g.transformFlags&=-67108865,g.jsDoc=void 0,g}function gp(n,o,s,u,g){return n.modifiers!==o||n.isTypeOnly!==s||n.name!==u||n.moduleReference!==g?r(yp(o,s,u,g),n):n}function bp(n,o,s,u){let g=B(272);return g.modifiers=Oe(n),g.importClause=o,g.moduleSpecifier=s,g.assertClause=u,g.transformFlags|=V(g.importClause)|V(g.moduleSpecifier),g.transformFlags&=-67108865,g.jsDoc=void 0,g}function vp(n,o,s,u,g){return n.modifiers!==o||n.importClause!==s||n.moduleSpecifier!==u||n.assertClause!==g?r(bp(o,s,u,g),n):n}function wc(n,o,s){let u=ae(273);return u.isTypeOnly=n,u.name=o,u.namedBindings=s,u.transformFlags|=V(u.name)|V(u.namedBindings),n&&(u.transformFlags|=1),u.transformFlags&=-67108865,u}function Tp(n,o,s,u){return n.isTypeOnly!==o||n.name!==s||n.namedBindings!==u?r(wc(o,s,u),n):n}function Sp(n,o){let s=B(300);return s.elements=Y(n),s.multiLine=o,s.transformFlags|=4,s}function ks(n,o,s){return n.elements!==o||n.multiLine!==s?r(Sp(o,s),n):n}function Cc(n,o){let s=B(301);return s.name=n,s.value=o,s.transformFlags|=4,s}function xp(n,o,s){return n.name!==o||n.value!==s?r(Cc(o,s),n):n}function Ec(n,o){let s=B(302);return s.assertClause=n,s.multiLine=o,s}function I1(n,o,s){return n.assertClause!==o||n.multiLine!==s?r(Ec(o,s),n):n}function Ds(n){let o=ae(274);return o.name=n,o.transformFlags|=V(o.name),o.transformFlags&=-67108865,o}function N1(n,o){return n.name!==o?r(Ds(o),n):n}function Ac(n){let o=ae(280);return o.name=n,o.transformFlags|=V(o.name)|32,o.transformFlags&=-67108865,o}function O1(n,o){return n.name!==o?r(Ac(o),n):n}function wp(n){let o=B(275);return o.elements=Y(n),o.transformFlags|=De(o.elements),o.transformFlags&=-67108865,o}function M1(n,o){return n.elements!==o?r(wp(o),n):n}function Cp(n,o,s){let u=ae(276);return u.isTypeOnly=n,u.propertyName=o,u.name=s,u.transformFlags|=V(u.propertyName)|V(u.name),u.transformFlags&=-67108865,u}function L1(n,o,s,u){return n.isTypeOnly!==o||n.propertyName!==s||n.name!==u?r(Cp(o,s,u),n):n}function Ps(n,o,s){let u=ae(277);return u.modifiers=Oe(n),u.isExportEquals=o,u.expression=o?a().parenthesizeRightSideOfBinary(64,void 0,s):a().parenthesizeExpressionOfExportDefault(s),u.transformFlags|=De(u.modifiers)|V(u.expression),u.transformFlags&=-67108865,u.jsDoc=void 0,u}function Fi(n,o,s){return n.modifiers!==o||n.expression!==s?r(Ps(o,n.isExportEquals,s),n):n}function kc(n,o,s,u,g){let I=ae(278);return I.modifiers=Oe(n),I.isTypeOnly=o,I.exportClause=s,I.moduleSpecifier=u,I.assertClause=g,I.transformFlags|=De(I.modifiers)|V(I.exportClause)|V(I.moduleSpecifier),I.transformFlags&=-67108865,I.jsDoc=void 0,I}function Dc(n,o,s,u,g,I){return n.modifiers!==o||n.isTypeOnly!==s||n.exportClause!==u||n.moduleSpecifier!==g||n.assertClause!==I?Is(kc(o,s,u,g,I),n):n}function Is(n,o){return n!==o&&n.modifiers===o.modifiers&&(n.modifiers=o.modifiers),r(n,o)}function Ns(n){let o=B(279);return o.elements=Y(n),o.transformFlags|=De(o.elements),o.transformFlags&=-67108865,o}function J1(n,o){return n.elements!==o?r(Ns(o),n):n}function fa(n,o,s){let u=B(281);return u.isTypeOnly=n,u.propertyName=Xe(o),u.name=Xe(s),u.transformFlags|=V(u.propertyName)|V(u.name),u.transformFlags&=-67108865,u.jsDoc=void 0,u}function R1(n,o,s,u){return n.isTypeOnly!==o||n.propertyName!==s||n.name!==u?r(fa(o,s,u),n):n}function j1(){let n=ae(282);return n.jsDoc=void 0,n}function Pc(n){let o=B(283);return o.expression=n,o.transformFlags|=V(o.expression),o.transformFlags&=-67108865,o}function F1(n,o){return n.expression!==o?r(Pc(o),n):n}function B1(n){return B(n)}function Ic(n,o,s=!1){let u=Nc(n,s?o&&a().parenthesizeNonArrayTypeOfPostfixType(o):o);return u.postfix=s,u}function Nc(n,o){let s=B(n);return s.type=o,s}function Ep(n,o,s){return o.type!==s?r(Ic(n,s,o.postfix),o):o}function U1(n,o,s){return o.type!==s?r(Nc(n,s),o):o}function Ap(n,o){let s=ae(324);return s.parameters=Oe(n),s.type=o,s.transformFlags=De(s.parameters)|(s.type?1:0),s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.typeArguments=void 0,s}function q1(n,o,s){return n.parameters!==o||n.type!==s?r(Ap(o,s),n):n}function kp(n,o=!1){let s=ae(329);return s.jsDocPropertyTags=Oe(n),s.isArrayType=o,s}function z1(n,o,s){return n.jsDocPropertyTags!==o||n.isArrayType!==s?r(kp(o,s),n):n}function Dp(n){let o=B(316);return o.type=n,o}function W1(n,o){return n.type!==o?r(Dp(o),n):n}function Pp(n,o,s){let u=ae(330);return u.typeParameters=Oe(n),u.parameters=Y(o),u.type=s,u.jsDoc=void 0,u.locals=void 0,u.nextContainer=void 0,u}function V1(n,o,s,u){return n.typeParameters!==o||n.parameters!==s||n.type!==u?r(Pp(o,s,u),n):n}function Hr(n){let o=Af(n.kind);return n.tagName.escapedText===Mn(o)?n.tagName:Ge(o)}function Bi(n,o,s){let u=B(n);return u.tagName=o,u.comment=s,u}function mo(n,o,s){let u=ae(n);return u.tagName=o,u.comment=s,u}function ho(n,o,s,u){let g=Bi(352,n??Ge("template"),u);return g.constraint=o,g.typeParameters=Y(s),g}function Os(n,o=Hr(n),s,u,g){return n.tagName!==o||n.constraint!==s||n.typeParameters!==u||n.comment!==g?r(ho(o,s,u,g),n):n}function Ms(n,o,s,u){let g=mo(353,n??Ge("typedef"),u);return g.typeExpression=o,g.fullName=s,g.name=K0(s),g.locals=void 0,g.nextContainer=void 0,g}function Ip(n,o=Hr(n),s,u,g){return n.tagName!==o||n.typeExpression!==s||n.fullName!==u||n.comment!==g?r(Ms(o,s,u,g),n):n}function Oc(n,o,s,u,g,I){let W=mo(348,n??Ge("param"),I);return W.typeExpression=u,W.name=o,W.isNameFirst=!!g,W.isBracketed=s,W}function Mc(n,o=Hr(n),s,u,g,I,W){return n.tagName!==o||n.name!==s||n.isBracketed!==u||n.typeExpression!==g||n.isNameFirst!==I||n.comment!==W?r(Oc(o,s,u,g,I,W),n):n}function Np(n,o,s,u,g,I){let W=mo(355,n??Ge("prop"),I);return W.typeExpression=u,W.name=o,W.isNameFirst=!!g,W.isBracketed=s,W}function Op(n,o=Hr(n),s,u,g,I,W){return n.tagName!==o||n.name!==s||n.isBracketed!==u||n.typeExpression!==g||n.isNameFirst!==I||n.comment!==W?r(Np(o,s,u,g,I,W),n):n}function Mp(n,o,s,u){let g=mo(345,n??Ge("callback"),u);return g.typeExpression=o,g.fullName=s,g.name=K0(s),g.locals=void 0,g.nextContainer=void 0,g}function H1(n,o=Hr(n),s,u,g){return n.tagName!==o||n.typeExpression!==s||n.fullName!==u||n.comment!==g?r(Mp(o,s,u,g),n):n}function Lc(n,o,s){let u=Bi(346,n??Ge("overload"),s);return u.typeExpression=o,u}function G1(n,o=Hr(n),s,u){return n.tagName!==o||n.typeExpression!==s||n.comment!==u?r(Lc(o,s,u),n):n}function Jc(n,o,s){let u=Bi(335,n??Ge("augments"),s);return u.class=o,u}function X1(n,o=Hr(n),s,u){return n.tagName!==o||n.class!==s||n.comment!==u?r(Jc(o,s,u),n):n}function Ls(n,o,s){let u=Bi(336,n??Ge("implements"),s);return u.class=o,u}function Rc(n,o,s){let u=Bi(354,n??Ge("see"),s);return u.name=o,u}function yo(n,o,s,u){return n.tagName!==o||n.name!==s||n.comment!==u?r(Rc(o,s,u),n):n}function Lp(n){let o=B(317);return o.name=n,o}function Wa(n,o){return n.name!==o?r(Lp(o),n):n}function go(n,o){let s=B(318);return s.left=n,s.right=o,s.transformFlags|=V(s.left)|V(s.right),s}function $1(n,o,s){return n.left!==o||n.right!==s?r(go(o,s),n):n}function Jp(n,o){let s=B(331);return s.name=n,s.text=o,s}function Q1(n,o,s){return n.name!==o?r(Jp(o,s),n):n}function Rp(n,o){let s=B(332);return s.name=n,s.text=o,s}function Y1(n,o,s){return n.name!==o?r(Rp(o,s),n):n}function jc(n,o){let s=B(333);return s.name=n,s.text=o,s}function K1(n,o,s){return n.name!==o?r(jc(o,s),n):n}function Z1(n,o=Hr(n),s,u){return n.tagName!==o||n.class!==s||n.comment!==u?r(Ls(o,s,u),n):n}function jp(n,o,s){return Bi(n,o??Ge(Af(n)),s)}function eh(n,o,s=Hr(o),u){return o.tagName!==s||o.comment!==u?r(jp(n,s,u),o):o}function Fp(n,o,s,u){let g=Bi(n,o??Ge(Af(n)),u);return g.typeExpression=s,g}function th(n,o,s=Hr(o),u,g){return o.tagName!==s||o.typeExpression!==u||o.comment!==g?r(Fp(n,s,u,g),o):o}function Bp(n,o){return Bi(334,n,o)}function rh(n,o,s){return n.tagName!==o||n.comment!==s?r(Bp(o,s),n):n}function Up(n,o,s){let u=mo(347,n??Ge(Af(347)),s);return u.typeExpression=o,u.locals=void 0,u.nextContainer=void 0,u}function nh(n,o=Hr(n),s,u){return n.tagName!==o||n.typeExpression!==s||n.comment!==u?r(Up(o,s,u),n):n}function qp(n){let o=B(328);return o.text=n,o}function ih(n,o){return n.text!==o?r(qp(o),n):n}function Js(n,o){let s=B(327);return s.comment=n,s.tags=Oe(o),s}function ah(n,o,s){return n.comment!==o||n.tags!==s?r(Js(o,s),n):n}function Fc(n,o,s){let u=B(284);return u.openingElement=n,u.children=Y(o),u.closingElement=s,u.transformFlags|=V(u.openingElement)|De(u.children)|V(u.closingElement)|2,u}function zp(n,o,s,u){return n.openingElement!==o||n.children!==s||n.closingElement!==u?r(Fc(o,s,u),n):n}function Wp(n,o,s){let u=B(285);return u.tagName=n,u.typeArguments=Oe(o),u.attributes=s,u.transformFlags|=V(u.tagName)|De(u.typeArguments)|V(u.attributes)|2,u.typeArguments&&(u.transformFlags|=1),u}function Rs(n,o,s,u){return n.tagName!==o||n.typeArguments!==s||n.attributes!==u?r(Wp(o,s,u),n):n}function Bc(n,o,s){let u=B(286);return u.tagName=n,u.typeArguments=Oe(o),u.attributes=s,u.transformFlags|=V(u.tagName)|De(u.typeArguments)|V(u.attributes)|2,o&&(u.transformFlags|=1),u}function oh(n,o,s,u){return n.tagName!==o||n.typeArguments!==s||n.attributes!==u?r(Bc(o,s,u),n):n}function Vp(n){let o=B(287);return o.tagName=n,o.transformFlags|=V(o.tagName)|2,o}function sh(n,o){return n.tagName!==o?r(Vp(o),n):n}function js(n,o,s){let u=B(288);return u.openingFragment=n,u.children=Y(o),u.closingFragment=s,u.transformFlags|=V(u.openingFragment)|De(u.children)|V(u.closingFragment)|2,u}function Hp(n,o,s,u){return n.openingFragment!==o||n.children!==s||n.closingFragment!==u?r(js(o,s,u),n):n}function Fs(n,o){let s=B(12);return s.text=n,s.containsOnlyTriviaWhiteSpaces=!!o,s.transformFlags|=2,s}function Gp(n,o,s){return n.text!==o||n.containsOnlyTriviaWhiteSpaces!==s?r(Fs(o,s),n):n}function Uc(){let n=B(289);return n.transformFlags|=2,n}function wr(){let n=B(290);return n.transformFlags|=2,n}function qc(n,o){let s=ae(291);return s.name=n,s.initializer=o,s.transformFlags|=V(s.name)|V(s.initializer)|2,s}function Xp(n,o,s){return n.name!==o||n.initializer!==s?r(qc(o,s),n):n}function $p(n){let o=ae(292);return o.properties=Y(n),o.transformFlags|=De(o.properties)|2,o}function Qp(n,o){return n.properties!==o?r($p(o),n):n}function Yp(n){let o=B(293);return o.expression=n,o.transformFlags|=V(o.expression)|2,o}function _h(n,o){return n.expression!==o?r(Yp(o),n):n}function bo(n,o){let s=B(294);return s.dotDotDotToken=n,s.expression=o,s.transformFlags|=V(s.dotDotDotToken)|V(s.expression)|2,s}function ch(n,o){return n.expression!==o?r(bo(n.dotDotDotToken,o),n):n}function Kp(n,o){let s=B(295);return s.namespace=n,s.name=o,s.transformFlags|=V(s.namespace)|V(s.name)|2,s}function lh(n,o,s){return n.namespace!==o||n.name!==s?r(Kp(o,s),n):n}function Zp(n,o){let s=B(296);return s.expression=a().parenthesizeExpressionForDisallowedComma(n),s.statements=Y(o),s.transformFlags|=V(s.expression)|De(s.statements),s.jsDoc=void 0,s}function zc(n,o,s){return n.expression!==o||n.statements!==s?r(Zp(o,s),n):n}function Va(n){let o=B(297);return o.statements=Y(n),o.transformFlags=De(o.statements),o}function uh(n,o){return n.statements!==o?r(Va(o),n):n}function Bs(n,o){let s=B(298);switch(s.token=n,s.types=Y(o),s.transformFlags|=De(s.types),n){case 96:s.transformFlags|=1024;break;case 119:s.transformFlags|=1;break;default:return N.assertNever(n)}return s}function ef(n,o){return n.types!==o?r(Bs(n.token,o),n):n}function tf(n,o){let s=B(299);return s.variableDeclaration=vf(n),s.block=o,s.transformFlags|=V(s.variableDeclaration)|V(s.block)|(n?0:64),s.locals=void 0,s.nextContainer=void 0,s}function vo(n,o,s){return n.variableDeclaration!==o||n.block!==s?r(tf(o,s),n):n}function Us(n,o){let s=ae(303);return s.name=Xe(n),s.initializer=a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=In(s.name)|V(s.initializer),s.modifiers=void 0,s.questionToken=void 0,s.exclamationToken=void 0,s.jsDoc=void 0,s}function ph(n,o,s){return n.name!==o||n.initializer!==s?fh(Us(o,s),n):n}function fh(n,o){return n!==o&&(n.modifiers=o.modifiers,n.questionToken=o.questionToken,n.exclamationToken=o.exclamationToken),r(n,o)}function Wc(n,o){let s=ae(304);return s.name=Xe(n),s.objectAssignmentInitializer=o&&a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=e_(s.name)|V(s.objectAssignmentInitializer)|1024,s.equalsToken=void 0,s.modifiers=void 0,s.questionToken=void 0,s.exclamationToken=void 0,s.jsDoc=void 0,s}function rf(n,o,s){return n.name!==o||n.objectAssignmentInitializer!==s?nf(Wc(o,s),n):n}function nf(n,o){return n!==o&&(n.modifiers=o.modifiers,n.questionToken=o.questionToken,n.exclamationToken=o.exclamationToken,n.equalsToken=o.equalsToken),r(n,o)}function da(n){let o=ae(305);return o.expression=a().parenthesizeExpressionForDisallowedComma(n),o.transformFlags|=V(o.expression)|128|65536,o.jsDoc=void 0,o}function dh(n,o){return n.expression!==o?r(da(o),n):n}function af(n,o){let s=ae(306);return s.name=Xe(n),s.initializer=o&&a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=V(s.name)|V(s.initializer)|1,s.jsDoc=void 0,s}function mh(n,o,s){return n.name!==o||n.initializer!==s?r(af(o,s),n):n}function hh(n,o,s){let u=t.createBaseSourceFileNode(312);return u.statements=Y(n),u.endOfFileToken=o,u.flags|=s,u.text="",u.fileName="",u.path="",u.resolvedPath="",u.originalFileName="",u.languageVersion=0,u.languageVariant=0,u.scriptKind=0,u.isDeclarationFile=!1,u.hasNoDefaultLib=!1,u.transformFlags|=De(u.statements)|V(u.endOfFileToken),u.locals=void 0,u.nextContainer=void 0,u.endFlowNode=void 0,u.nodeCount=0,u.identifierCount=0,u.symbolCount=0,u.parseDiagnostics=void 0,u.bindDiagnostics=void 0,u.bindSuggestionDiagnostics=void 0,u.lineMap=void 0,u.externalModuleIndicator=void 0,u.setExternalModuleIndicator=void 0,u.pragmas=void 0,u.checkJsDirective=void 0,u.referencedFiles=void 0,u.typeReferenceDirectives=void 0,u.libReferenceDirectives=void 0,u.amdDependencies=void 0,u.commentDirectives=void 0,u.identifiers=void 0,u.packageJsonLocations=void 0,u.packageJsonScope=void 0,u.imports=void 0,u.moduleAugmentations=void 0,u.ambientModuleNames=void 0,u.resolvedModules=void 0,u.classifiableNames=void 0,u.impliedNodeFormat=void 0,u}function Vc(n){let o=Object.create(n.redirectTarget);return Object.defineProperties(o,{id:{get(){return this.redirectInfo.redirectTarget.id},set(s){this.redirectInfo.redirectTarget.id=s}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(s){this.redirectInfo.redirectTarget.symbol=s}}}),o.redirectInfo=n,o}function of(n){let o=Vc(n.redirectInfo);return o.flags|=n.flags&-17,o.fileName=n.fileName,o.path=n.path,o.resolvedPath=n.resolvedPath,o.originalFileName=n.originalFileName,o.packageJsonLocations=n.packageJsonLocations,o.packageJsonScope=n.packageJsonScope,o.emitNode=void 0,o}function Xn(n){let o=t.createBaseSourceFileNode(312);o.flags|=n.flags&-17;for(let s in n)if(!(Qr(o,s)||!Qr(n,s))){if(s==="emitNode"){o.emitNode=void 0;continue}o[s]=n[s]}return o}function Hc(n){let o=n.redirectInfo?of(n):Xn(n);return Xr(o,n),o}function yh(n,o,s,u,g,I,W){let de=Hc(n);return de.statements=Y(o),de.isDeclarationFile=s,de.referencedFiles=u,de.typeReferenceDirectives=g,de.hasNoDefaultLib=I,de.libReferenceDirectives=W,de.transformFlags=De(de.statements)|V(de.endOfFileToken),de}function gh(n,o,s=n.isDeclarationFile,u=n.referencedFiles,g=n.typeReferenceDirectives,I=n.hasNoDefaultLib,W=n.libReferenceDirectives){return n.statements!==o||n.isDeclarationFile!==s||n.referencedFiles!==u||n.typeReferenceDirectives!==g||n.hasNoDefaultLib!==I||n.libReferenceDirectives!==W?r(yh(n,o,s,u,g,I,W),n):n}function sf(n,o=$e){let s=B(313);return s.prepends=o,s.sourceFiles=n,s.syntheticFileReferences=void 0,s.syntheticTypeReferences=void 0,s.syntheticLibReferences=void 0,s.hasNoDefaultLib=void 0,s}function _f(n,o,s=$e){return n.sourceFiles!==o||n.prepends!==s?r(sf(o,s),n):n}function Gc(n,o,s){let u=B(314);return u.prologues=n,u.syntheticReferences=o,u.texts=s,u.fileName="",u.text="",u.referencedFiles=$e,u.libReferenceDirectives=$e,u.getLineAndCharacterOfPosition=g=>to(u,g),u}function Xc(n,o){let s=B(n);return s.data=o,s}function bh(n){return Xc(307,n)}function cf(n,o){let s=Xc(308,n);return s.texts=o,s}function vh(n,o){return Xc(o?310:309,n)}function Th(n){let o=B(311);return o.data=n.data,o.section=n,o}function qs(){let n=B(315);return n.javascriptText="",n.declarationText="",n}function lf(n,o=!1,s){let u=B(237);return u.type=n,u.isSpread=o,u.tupleNameSource=s,u}function Sh(n){let o=B(358);return o._children=n,o}function xh(n){let o=B(359);return o.original=n,Ve(o,n),o}function uf(n,o){let s=B(360);return s.expression=n,s.original=o,s.transformFlags|=V(s.expression)|1,Ve(s,o),s}function pf(n,o){return n.expression!==o?r(uf(o,n.original),n):n}function wh(n){if(Ta(n)&&!Tl(n)&&!n.original&&!n.emitNode&&!n.id){if(F_(n))return n.elements;if(Ct(n)&&Ux(n.operatorToken))return[n.left,n.right]}return n}function zs(n){let o=B(361);return o.elements=Y(Sv(n,wh)),o.transformFlags|=De(o.elements),o}function ff(n,o){return n.elements!==o?r(zs(o),n):n}function $c(n,o){let s=B(362);return s.expression=n,s.thisArg=o,s.transformFlags|=V(s.expression)|V(s.thisArg),s}function Ch(n,o,s){return n.expression!==o||n.thisArg!==s?r($c(o,s),n):n}function Eh(n){let o=or(n.escapedText);return o.flags|=n.flags&-17,o.transformFlags=n.transformFlags,Xr(o,n),setIdentifierAutoGenerate(o,{...n.emitNode.autoGenerate}),o}function df(n){let o=or(n.escapedText);o.flags|=n.flags&-17,o.jsDoc=n.jsDoc,o.flowNode=n.flowNode,o.symbol=n.symbol,o.transformFlags=n.transformFlags,Xr(o,n);let s=getIdentifierTypeArguments(n);return s&&setIdentifierTypeArguments(o,s),o}function mf(n){let o=Sn(n.escapedText);return o.flags|=n.flags&-17,o.transformFlags=n.transformFlags,Xr(o,n),setIdentifierAutoGenerate(o,{...n.emitNode.autoGenerate}),o}function Ah(n){let o=Sn(n.escapedText);return o.flags|=n.flags&-17,o.transformFlags=n.transformFlags,Xr(o,n),o}function Qc(n){if(n===void 0)return n;if(ii(n))return Hc(n);if(wa(n))return Eh(n);if(Ee(n))return df(n);if(Mg(n))return mf(n);if(jr(n))return Ah(n);let o=ql(n.kind)?t.createBaseNode(n.kind):t.createBaseTokenNode(n.kind);o.flags|=n.flags&-17,o.transformFlags=n.transformFlags,Xr(o,n);for(let s in n)Qr(o,s)||!Qr(n,s)||(o[s]=n[s]);return o}function kh(n,o,s){return fo(Z_(void 0,void 0,void 0,void 0,o?[o]:[],void 0,ua(n,!0)),void 0,s?[s]:[])}function Dh(n,o,s){return fo(ec(void 0,void 0,o?[o]:[],void 0,void 0,ua(n,!0)),void 0,s?[s]:[])}function ma(){return rc(Ze("0"))}function Ph(n){return Ps(void 0,!1,n)}function Ih(n){return kc(void 0,!1,Ns([fa(!1,void 0,n)]))}function Nh(n,o){return o==="null"?ue.createStrictEquality(n,fr()):o==="undefined"?ue.createStrictEquality(n,ma()):ue.createStrictEquality(vs(n),it(o))}function Oh(n,o){return o==="null"?ue.createStrictInequality(n,fr()):o==="undefined"?ue.createStrictInequality(n,ma()):ue.createStrictInequality(vs(n),it(o))}function ha(n,o,s){return y0(n)?zr(hs(n,void 0,o),void 0,void 0,s):fo(Mi(n,o),void 0,s)}function Mh(n,o,s){return ha(n,"bind",[o,...s])}function Ws(n,o,s){return ha(n,"call",[o,...s])}function Lh(n,o,s){return ha(n,"apply",[o,s])}function Ha(n,o,s){return ha(Ge(n),o,s)}function Jh(n,o){return ha(n,"slice",o===void 0?[]:[Cr(o)])}function Rh(n,o){return ha(n,"concat",o)}function hf(n,o,s){return Ha("Object","defineProperty",[n,Cr(o),s])}function jh(n,o){return Ha("Object","getOwnPropertyDescriptor",[n,Cr(o)])}function Fh(n,o,s){return Ha("Reflect","get",s?[n,o,s]:[n,o])}function Bh(n,o,s,u){return Ha("Reflect","set",u?[n,o,s,u]:[n,o,s])}function ya(n,o,s){return s?(n.push(Us(o,s)),!0):!1}function yf(n,o){let s=[];ya(s,"enumerable",Cr(n.enumerable)),ya(s,"configurable",Cr(n.configurable));let u=ya(s,"writable",Cr(n.writable));u=ya(s,"value",n.value)||u;let g=ya(s,"get",n.get);return g=ya(s,"set",n.set)||g,N.assert(!(u&&g),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),ds(s,!o)}function gf(n,o){switch(n.kind){case 217:return Ou(n,o);case 216:return Nu(n,n.type,o);case 234:return Wu(n,o,n.type);case 238:return Dn(n,o,n.type);case 235:return Vu(n,o);case 360:return pf(n,o)}}function c(n){return is(n)&&Ta(n)&&Ta(getSourceMapRange(n))&&Ta(getCommentRange(n))&&!mt(getSyntheticLeadingComments(n))&&!mt(getSyntheticTrailingComments(n))}function m(n,o,s=15){return n&&Rm(n,s)&&!c(n)?gf(n,m(n.expression,o)):o}function b(n,o,s){if(!o)return n;let u=_p(o,o.label,u8(o.statement)?b(n,o.statement):n);return s&&s(o),u}function w(n,o){let s=Gl(n);switch(s.kind){case 80:return o;case 110:case 9:case 10:case 11:return!1;case 209:return s.elements.length!==0;case 210:return s.properties.length>0;default:return!0}}function A(n,o,s,u=!1){let g=ls(n,15),I,W;return yd(g)?(I=Ut(),W=g):Uf(g)?(I=Ut(),W=s!==void 0&&s<2?Ve(Ge("_super"),g):g):ti(g)&8192?(I=ma(),W=a().parenthesizeLeftSideOfAccess(g,!1)):Br(g)?w(g.expression,u)?(I=Gt(o),W=Mi(Ve(ue.createAssignment(I,g.expression),g.expression),g.name),Ve(W,g)):(I=g.expression,W=g):Ra(g)?w(g.expression,u)?(I=Gt(o),W=Y_(Ve(ue.createAssignment(I,g.expression),g.expression),g.argumentExpression),Ve(W,g)):(I=g.expression,W=g):(I=ma(),W=a().parenthesizeLeftSideOfAccess(n,!1)),{target:W,thisArg:I}}function R(n,o){return Mi(K_(ds([Cn(void 0,"value",[Bn(void 0,void 0,n,void 0,void 0,void 0)],ua([Es(o)]))])),"value")}function te(n){return n.length>10?zs(n):Jd(n,ue.createComma)}function le(n,o,s,u=0,g){let I=g?n&&Yd(n):Bl(n);if(I&&Ee(I)&&!wa(I)){let W=Xi(Ve(Qc(I),I),I.parent);return u|=ti(I),s||(u|=96),o||(u|=3072),u&&setEmitFlags(W,u),W}return Tn(n)}function ne(n,o,s){return le(n,o,s,98304)}function ie(n,o,s,u){return le(n,o,s,32768,u)}function ve(n,o,s){return le(n,o,s,16384)}function He(n,o,s){return le(n,o,s)}function Be(n,o,s,u){let g=Mi(n,Ta(o)?o:Qc(o));Ve(g,o);let I=0;return u||(I|=96),s||(I|=3072),I&&setEmitFlags(g,I),g}function Ue(n,o,s,u){return n&&gr(o,1)?Be(n,le(o),s,u):ve(o,s,u)}function Rt(n,o,s,u){let g=mi(n,o,0,s);return hi(n,o,g,u)}function Gr(n){return mn(n.expression)&&n.expression.text==="use strict"}function di(){return jm(Es(it("use strict")))}function mi(n,o,s=0,u){N.assert(o.length===0,"Prologue directives should be at the first statement in the target statements array");let g=!1,I=n.length;for(;sde&&Er.splice(g,0,...o.slice(de,We)),de>W&&Er.splice(u,0,...o.slice(W,de)),W>I&&Er.splice(s,0,...o.slice(I,W)),I>0)if(s===0)Er.splice(0,0,...o.slice(0,I));else{let $n=new Map;for(let yi=0;yi=0;yi--){let Vs=o[yi];$n.has(Vs.expression.text)||Er.unshift(Vs)}}return va(n)?Ve(Y(Er,n.hasTrailingComma),n):n}function bf(n,o){let s;return typeof o=="number"?s=Or(o):s=o,No(n)?tn(n,s,n.name,n.constraint,n.default):Ma(n)?Un(n,s,n.dotDotDotToken,n.name,n.questionToken,n.type,n.initializer):u6(n)?he(n,s,n.typeParameters,n.parameters,n.type):Zl(n)?qn(n,s,n.name,n.questionToken,n.type):oo(n)?oe(n,s,n.name,n.questionToken??n.exclamationToken,n.type,n.initializer):Vx(n)?Se(n,s,n.name,n.questionToken,n.typeParameters,n.parameters,n.type):d_(n)?z(n,s,n.asteriskToken,n.name,n.questionToken,n.typeParameters,n.parameters,n.type,n.body):J_(n)?lt(n,s,n.parameters,n.body):m_(n)?qr(n,s,n.name,n.parameters,n.type,n.body):Qo(n)?zn(n,s,n.name,n.parameters,n.body):l6(n)?Vn(n,s,n.parameters,n.type):Am(n)?Mu(n,s,n.asteriskToken,n.name,n.typeParameters,n.parameters,n.type,n.body):km(n)?tc(n,s,n.typeParameters,n.parameters,n.type,n.equalsGreaterThanToken,n.body):Il(n)?sc(n,s,n.name,n.typeParameters,n.heritageClauses,n.members):as(n)?pc(n,s,n.declarationList):os(n)?fp(n,s,n.asteriskToken,n.name,n.typeParameters,n.parameters,n.type,n.body):Yo(n)?Tc(n,s,n.name,n.typeParameters,n.heritageClauses,n.members):su(n)?gt(n,s,n.name,n.typeParameters,n.heritageClauses,n.members):T6(n)?Sc(n,s,n.name,n.typeParameters,n.type):S6(n)?mp(n,s,n.name,n.members):Yi(n)?ji(n,s,n.name,n.body):w6(n)?gp(n,s,n.isTypeOnly,n.name,n.moduleReference):C6(n)?vp(n,s,n.importClause,n.moduleSpecifier,n.assertClause):ss(n)?Fi(n,s,n.expression):B_(n)?Dc(n,s,n.isTypeOnly,n.exportClause,n.moduleSpecifier,n.assertClause):N.assertNever(n)}function qh(n,o){return Ma(n)?Un(n,o,n.dotDotDotToken,n.name,n.questionToken,n.type,n.initializer):oo(n)?oe(n,o,n.name,n.questionToken??n.exclamationToken,n.type,n.initializer):d_(n)?z(n,o,n.asteriskToken,n.name,n.questionToken,n.typeParameters,n.parameters,n.type,n.body):m_(n)?qr(n,o,n.name,n.parameters,n.type,n.body):Qo(n)?zn(n,o,n.name,n.parameters,n.body):Il(n)?sc(n,o,n.name,n.typeParameters,n.heritageClauses,n.members):Yo(n)?Tc(n,o,n.name,n.typeParameters,n.heritageClauses,n.members):N.assertNever(n)}function Oe(n){return n?Y(n):void 0}function Xe(n){return typeof n=="string"?Ge(n):n}function Cr(n){return typeof n=="string"?it(n):typeof n=="number"?Ze(n):typeof n=="boolean"?n?ht():wn():n}function To(n){return n&&a().parenthesizeExpressionForDisallowedComma(n)}function lr(n){return typeof n=="number"?vt(n):n}function on(n){return n&&A6(n)?Ve(Xr(fc(),n),n):n}function vf(n){return typeof n=="string"||n&&!ki(n)?As(n,void 0,void 0,void 0):n}}function kL(e,t){return e!==t&&Ve(e,t),e}function DL(e,t){return e!==t&&(Xr(e,t),Ve(e,t)),e}function Af(e){switch(e){case 351:return"type";case 349:return"returns";case 350:return"this";case 347:return"enum";case 337:return"author";case 339:return"class";case 340:return"public";case 341:return"private";case 342:return"protected";case 343:return"readonly";case 344:return"override";case 352:return"template";case 353:return"typedef";case 348:return"param";case 355:return"prop";case 345:return"callback";case 346:return"overload";case 335:return"augments";case 336:return"implements";default:return N.fail(`Unsupported kind: ${N.formatSyntaxKind(e)}`)}}function PL(e,t){switch(_n||(_n=ns(99,!1,0)),e){case 15:_n.setText("`"+t+"`");break;case 16:_n.setText("`"+t+"${");break;case 17:_n.setText("}"+t+"${");break;case 18:_n.setText("}"+t+"`");break}let r=_n.scan();if(r===20&&(r=_n.reScanTemplateToken(!1)),_n.isUnterminated())return _n.setText(void 0),$0;let a;switch(r){case 15:case 16:case 17:case 18:a=_n.getTokenValue();break}return a===void 0||_n.scan()!==1?(_n.setText(void 0),$0):(_n.setText(void 0),a)}function In(e){return e&&Ee(e)?e_(e):V(e)}function e_(e){return V(e)&-67108865}function IL(e,t){return t|e.transformFlags&134234112}function V(e){if(!e)return 0;let t=e.transformFlags&~Rx(e.kind);return Qd(e)&&zl(e.name)?IL(e.name,t):t}function De(e){return e?e.transformFlags:0}function Hb(e){let t=0;for(let r of e)t|=V(r);e.transformFlags=t}function Rx(e){if(e>=182&&e<=205)return-2;switch(e){case 213:case 214:case 209:return-2147450880;case 267:return-1941676032;case 169:return-2147483648;case 219:return-2072174592;case 218:case 262:return-1937940480;case 261:return-2146893824;case 263:case 231:return-2147344384;case 176:return-1937948672;case 172:return-2013249536;case 174:case 177:case 178:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 168:case 171:case 173:case 179:case 180:case 181:case 264:case 265:return-2;case 210:return-2147278848;case 299:return-2147418112;case 206:case 207:return-2147450880;case 216:case 238:case 234:case 360:case 217:case 108:return-2147483648;case 211:case 212:return-2147483648;default:return-2147483648}}function Yc(e){return e.flags|=16,e}function NL(e,t,r){let a,_,p,d,h,l,v,y,C,S;b_(e)?(p="",d=e,h=e.length,l=t,v=r):(N.assert(t==="js"||t==="dts"),p=(t==="js"?e.javascriptPath:e.declarationPath)||"",l=t==="js"?e.javascriptMapPath:e.declarationMapPath,y=()=>t==="js"?e.javascriptText:e.declarationText,C=()=>t==="js"?e.javascriptMapText:e.declarationMapText,h=()=>y().length,e.buildInfo&&e.buildInfo.bundle&&(N.assert(r===void 0||typeof r=="boolean"),a=r,_=t==="js"?e.buildInfo.bundle.js:e.buildInfo.bundle.dts,S=e.oldFileOfCurrentEmit));let k=S?ML(N.checkDefined(_)):OL(_,a,h);return k.fileName=p,k.sourceMapPath=l,k.oldFileOfCurrentEmit=S,y&&C?(Object.defineProperty(k,"text",{get:y}),Object.defineProperty(k,"sourceMapText",{get:C})):(N.assert(!S),k.text=d??"",k.sourceMapText=v),k}function OL(e,t,r){let a,_,p,d,h,l,v,y;for(let S of e?e.sections:$e)switch(S.kind){case"prologue":a=xt(a,Ve(Ln.createUnparsedPrologue(S.data),S));break;case"emitHelpers":_=xt(_,getAllUnscopedEmitHelpers().get(S.data));break;case"no-default-lib":y=!0;break;case"reference":p=xt(p,{pos:-1,end:-1,fileName:S.data});break;case"type":d=xt(d,{pos:-1,end:-1,fileName:S.data});break;case"type-import":d=xt(d,{pos:-1,end:-1,fileName:S.data,resolutionMode:99});break;case"type-require":d=xt(d,{pos:-1,end:-1,fileName:S.data,resolutionMode:1});break;case"lib":h=xt(h,{pos:-1,end:-1,fileName:S.data});break;case"prepend":let k;for(let L of S.texts)(!t||L.kind!=="internal")&&(k=xt(k,Ve(Ln.createUnparsedTextLike(L.data,L.kind==="internal"),L)));l=Rr(l,k),v=xt(v,Ln.createUnparsedPrepend(S.data,k??$e));break;case"internal":if(t){v||(v=[]);break}case"text":v=xt(v,Ve(Ln.createUnparsedTextLike(S.data,S.kind==="internal"),S));break;default:N.assertNever(S)}if(!v){let S=Ln.createUnparsedTextLike(void 0,!1);Cd(S,0,typeof r=="function"?r():r),v=[S]}let C=z_.createUnparsedSource(a??$e,void 0,v);return a_(a,C),a_(v,C),a_(l,C),C.hasNoDefaultLib=y,C.helpers=_,C.referencedFiles=p||$e,C.typeReferenceDirectives=d,C.libReferenceDirectives=h||$e,C}function ML(e){let t,r;for(let _ of e.sections)switch(_.kind){case"internal":case"text":t=xt(t,Ve(Ln.createUnparsedTextLike(_.data,_.kind==="internal"),_));break;case"no-default-lib":case"reference":case"type":case"type-import":case"type-require":case"lib":r=xt(r,Ve(Ln.createUnparsedSyntheticReference(_),_));break;case"prologue":case"emitHelpers":case"prepend":break;default:N.assertNever(_)}let a=Ln.createUnparsedSource($e,r,t??$e);return a_(r,a),a_(t,a),a.helpers=Aa(e.sources&&e.sources.helpers,_=>getAllUnscopedEmitHelpers().get(_)),a}function LL(e,t,r,a,_,p){return b_(e)?Fx(void 0,e,r,a,void 0,t,_,p):jx(e,t,r,a,_,p)}function jx(e,t,r,a,_,p,d,h){let l=z_.createInputFiles();l.javascriptPath=t,l.javascriptMapPath=r,l.declarationPath=a,l.declarationMapPath=_,l.buildInfoPath=p;let v=new Map,y=L=>{if(L===void 0)return;let G=v.get(L);return G===void 0&&(G=e(L),v.set(L,G!==void 0?G:!1)),G!==!1?G:void 0},C=L=>{let G=y(L);return G!==void 0?G:`/* Input file ${L} was missing */\r -`},S;return Object.defineProperties(l,{javascriptText:{get:()=>C(t)},javascriptMapText:{get:()=>y(r)},declarationText:{get:()=>C(N.checkDefined(a))},declarationMapText:{get:()=>y(_)},buildInfo:{get:()=>{if(S===void 0&&p)if(d!=null&&d.getBuildInfo)S=d.getBuildInfo(p,h.configFilePath)??!1;else{let L=y(p);S=L!==void 0?getBuildInfo(p,L)??!1:!1}return S||void 0}}}),l}function Fx(e,t,r,a,_,p,d,h,l,v,y){let C=z_.createInputFiles();return C.javascriptPath=e,C.javascriptText=t,C.javascriptMapPath=r,C.javascriptMapText=a,C.declarationPath=_,C.declarationText=p,C.declarationMapPath=d,C.declarationMapText=h,C.buildInfoPath=l,C.buildInfo=v,C.oldFileOfCurrentEmit=y,C}function JL(e,t,r){return new(Xb||(Xb=wt.getSourceMapSourceConstructor()))(e,t,r)}function Xr(e,t){if(e.original!==t&&(e.original=t,t)){let r=t.emitNode;r&&(e.emitNode=RL(r,e.emitNode))}return e}function RL(e,t){let{flags:r,internalFlags:a,leadingComments:_,trailingComments:p,commentRange:d,sourceMapRange:h,tokenSourceMapRanges:l,constantValue:v,helpers:y,startsOnNewLine:C,snippetElement:S,classThis:k,assignedName:L}=e;if(t||(t={}),r&&(t.flags=r),a&&(t.internalFlags=a&-9),_&&(t.leadingComments=Rr(_.slice(),t.leadingComments)),p&&(t.trailingComments=Rr(p.slice(),t.trailingComments)),d&&(t.commentRange=d),h&&(t.sourceMapRange=h),l&&(t.tokenSourceMapRanges=jL(l,t.tokenSourceMapRanges)),v!==void 0&&(t.constantValue=v),y)for(let G of y)t.helpers=Cv(t.helpers,G);return C!==void 0&&(t.startsOnNewLine=C),S!==void 0&&(t.snippetElement=S),k&&(t.classThis=k),L&&(t.assignedName=L),t}function jL(e,t){t||(t=[]);for(let r in e)t[r]=e[r];return t}var il,X0,a6,_n,$0,Xs,Gb,Ln,Xb,FL=Vt({"src/compiler/factory/nodeFactory.ts"(){"use strict";Dr(),il=0,X0=(e=>(e[e.None=0]="None",e[e.NoParenthesizerRules=1]="NoParenthesizerRules",e[e.NoNodeConverters=2]="NoNodeConverters",e[e.NoIndentationOnFreshPropertyAccess=4]="NoIndentationOnFreshPropertyAccess",e[e.NoOriginalNode=8]="NoOriginalNode",e))(X0||{}),a6=[],$0={},Xs=Lx(),Gb={createBaseSourceFileNode:e=>Yc(Xs.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>Yc(Xs.createBaseIdentifierNode(e)),createBasePrivateIdentifierNode:e=>Yc(Xs.createBasePrivateIdentifierNode(e)),createBaseTokenNode:e=>Yc(Xs.createBaseTokenNode(e)),createBaseNode:e=>Yc(Xs.createBaseNode(e))},Ln=Ad(4,Gb)}}),BL=()=>{},UL=()=>{};function lo(e){return e.kind===9}function o6(e){return e.kind===10}function mn(e){return e.kind===11}function kd(e){return e.kind===12}function qL(e){return e.kind===14}function Bx(e){return e.kind===15}function zL(e){return e.kind===16}function WL(e){return e.kind===17}function VL(e){return e.kind===18}function HL(e){return e.kind===26}function Ux(e){return e.kind===28}function s6(e){return e.kind===40}function _6(e){return e.kind===41}function GL(e){return e.kind===42}function Dd(e){return e.kind===54}function Pl(e){return e.kind===58}function XL(e){return e.kind===59}function $L(e){return e.kind===29}function QL(e){return e.kind===39}function Ee(e){return e.kind===80}function jr(e){return e.kind===81}function qx(e){return e.kind===95}function YL(e){return e.kind===90}function al(e){return e.kind===134}function KL(e){return e.kind===131}function ZL(e){return e.kind===135}function zx(e){return e.kind===148}function eJ(e){return e.kind===126}function tJ(e){return e.kind===128}function rJ(e){return e.kind===164}function nJ(e){return e.kind===129}function Uf(e){return e.kind===108}function Wx(e){return e.kind===102}function iJ(e){return e.kind===84}function M_(e){return e.kind===166}function ao(e){return e.kind===167}function No(e){return e.kind===168}function Ma(e){return e.kind===169}function L_(e){return e.kind===170}function Zl(e){return e.kind===171}function oo(e){return e.kind===172}function Vx(e){return e.kind===173}function d_(e){return e.kind===174}function eu(e){return e.kind===175}function J_(e){return e.kind===176}function m_(e){return e.kind===177}function Qo(e){return e.kind===178}function c6(e){return e.kind===179}function Hx(e){return e.kind===180}function l6(e){return e.kind===181}function Gx(e){return e.kind===182}function R_(e){return e.kind===183}function tu(e){return e.kind===184}function u6(e){return e.kind===185}function Xx(e){return e.kind===186}function Em(e){return e.kind===187}function $x(e){return e.kind===188}function Qx(e){return e.kind===189}function p6(e){return e.kind===202}function Yx(e){return e.kind===190}function Kx(e){return e.kind===191}function Zx(e){return e.kind===192}function e8(e){return e.kind===193}function t8(e){return e.kind===194}function r8(e){return e.kind===195}function f6(e){return e.kind===196}function d6(e){return e.kind===197}function n8(e){return e.kind===198}function i8(e){return e.kind===199}function a8(e){return e.kind===200}function m6(e){return e.kind===201}function ru(e){return e.kind===205}function aJ(e){return e.kind===204}function oJ(e){return e.kind===203}function sJ(e){return e.kind===206}function _J(e){return e.kind===207}function nu(e){return e.kind===208}function iu(e){return e.kind===209}function uo(e){return e.kind===210}function Br(e){return e.kind===211}function Ra(e){return e.kind===212}function j_(e){return e.kind===213}function o8(e){return e.kind===214}function s8(e){return e.kind===215}function cJ(e){return e.kind===216}function is(e){return e.kind===217}function Am(e){return e.kind===218}function km(e){return e.kind===219}function lJ(e){return e.kind===220}function uJ(e){return e.kind===221}function h6(e){return e.kind===222}function pJ(e){return e.kind===223}function Dm(e){return e.kind===224}function _8(e){return e.kind===225}function Ct(e){return e.kind===226}function fJ(e){return e.kind===227}function dJ(e){return e.kind===228}function mJ(e){return e.kind===229}function y6(e){return e.kind===230}function Il(e){return e.kind===231}function Pm(e){return e.kind===232}function g6(e){return e.kind===233}function hJ(e){return e.kind===234}function yJ(e){return e.kind===238}function jo(e){return e.kind===235}function b6(e){return e.kind===236}function gJ(e){return e.kind===237}function c8(e){return e.kind===360}function F_(e){return e.kind===361}function bJ(e){return e.kind===239}function vJ(e){return e.kind===240}function au(e){return e.kind===241}function as(e){return e.kind===243}function TJ(e){return e.kind===242}function ou(e){return e.kind===244}function SJ(e){return e.kind===245}function xJ(e){return e.kind===246}function wJ(e){return e.kind===247}function l8(e){return e.kind===248}function CJ(e){return e.kind===249}function EJ(e){return e.kind===250}function AJ(e){return e.kind===251}function kJ(e){return e.kind===252}function DJ(e){return e.kind===253}function PJ(e){return e.kind===254}function IJ(e){return e.kind===255}function u8(e){return e.kind===256}function NJ(e){return e.kind===257}function OJ(e){return e.kind===258}function MJ(e){return e.kind===259}function ki(e){return e.kind===260}function v6(e){return e.kind===261}function os(e){return e.kind===262}function Yo(e){return e.kind===263}function su(e){return e.kind===264}function T6(e){return e.kind===265}function S6(e){return e.kind===266}function Yi(e){return e.kind===267}function p8(e){return e.kind===268}function LJ(e){return e.kind===269}function x6(e){return e.kind===270}function w6(e){return e.kind===271}function C6(e){return e.kind===272}function JJ(e){return e.kind===273}function RJ(e){return e.kind===302}function jJ(e){return e.kind===300}function FJ(e){return e.kind===301}function E6(e){return e.kind===274}function Im(e){return e.kind===280}function BJ(e){return e.kind===275}function f8(e){return e.kind===276}function ss(e){return e.kind===277}function B_(e){return e.kind===278}function d8(e){return e.kind===279}function m8(e){return e.kind===281}function UJ(e){return e.kind===282}function A6(e){return e.kind===359}function qJ(e){return e.kind===362}function Nm(e){return e.kind===283}function Q0(e){return e.kind===284}function zJ(e){return e.kind===285}function Oo(e){return e.kind===286}function qf(e){return e.kind===287}function dl(e){return e.kind===288}function k6(e){return e.kind===289}function WJ(e){return e.kind===290}function VJ(e){return e.kind===291}function D6(e){return e.kind===292}function HJ(e){return e.kind===293}function GJ(e){return e.kind===294}function U_(e){return e.kind===295}function XJ(e){return e.kind===296}function h8(e){return e.kind===297}function Nl(e){return e.kind===298}function $J(e){return e.kind===299}function _s(e){return e.kind===303}function _u(e){return e.kind===304}function y8(e){return e.kind===305}function g8(e){return e.kind===306}function QJ(e){return e.kind===308}function ii(e){return e.kind===312}function YJ(e){return e.kind===313}function KJ(e){return e.kind===314}function b8(e){return e.kind===316}function zf(e){return e.kind===317}function r_(e){return e.kind===318}function ZJ(e){return e.kind===331}function eR(e){return e.kind===332}function tR(e){return e.kind===333}function rR(e){return e.kind===319}function nR(e){return e.kind===320}function v8(e){return e.kind===321}function iR(e){return e.kind===322}function aR(e){return e.kind===323}function Om(e){return e.kind===324}function oR(e){return e.kind===325}function sR(e){return e.kind===326}function cs(e){return e.kind===327}function P6(e){return e.kind===329}function cu(e){return e.kind===330}function Mm(e){return e.kind===335}function _R(e){return e.kind===337}function T8(e){return e.kind===339}function cR(e){return e.kind===345}function I6(e){return e.kind===340}function N6(e){return e.kind===341}function O6(e){return e.kind===342}function M6(e){return e.kind===343}function S8(e){return e.kind===344}function L6(e){return e.kind===346}function J6(e){return e.kind===338}function lR(e){return e.kind===354}function x8(e){return e.kind===347}function h_(e){return e.kind===348}function R6(e){return e.kind===349}function w8(e){return e.kind===350}function lu(e){return e.kind===351}function Ko(e){return e.kind===352}function uR(e){return e.kind===353}function pR(e){return e.kind===334}function fR(e){return e.kind===355}function C8(e){return e.kind===336}function j6(e){return e.kind===357}function dR(e){return e.kind===356}function mR(e){return e.kind===358}var hR=Vt({"src/compiler/factory/nodeTests.ts"(){"use strict";Dr()}});function yR(e){return e.createExportDeclaration(void 0,!1,e.createNamedExports([]),void 0)}function Lm(e,t,r,a){if(ao(r))return Ve(e.createElementAccessExpression(t,r.expression),a);{let _=Ve(ro(r)?e.createPropertyAccessExpression(t,r):e.createElementAccessExpression(t,r),r);return addEmitFlags(_,128),_}}function F6(e,t){let r=z_.createIdentifier(e||"React");return Xi(r,Fl(t)),r}function B6(e,t,r){if(M_(t)){let a=B6(e,t.left,r),_=e.createIdentifier(Ot(t.right));return _.escapedText=t.right.escapedText,e.createPropertyAccessExpression(a,_)}else return F6(Ot(t),r)}function E8(e,t,r,a){return t?B6(e,t,a):e.createPropertyAccessExpression(F6(r,a),"createElement")}function gR(e,t,r,a){return t?B6(e,t,a):e.createPropertyAccessExpression(F6(r,a),"Fragment")}function bR(e,t,r,a,_,p){let d=[r];if(a&&d.push(a),_&&_.length>0)if(a||d.push(e.createNull()),_.length>1)for(let h of _)jm(h),d.push(h);else d.push(_[0]);return Ve(e.createCallExpression(t,void 0,d),p)}function vR(e,t,r,a,_,p,d){let l=[gR(e,r,a,p),e.createNull()];if(_&&_.length>0)if(_.length>1)for(let v of _)jm(v),l.push(v);else l.push(_[0]);return Ve(e.createCallExpression(E8(e,t,a,p),void 0,l),d)}function TR(e,t,r){if(v6(t)){let a=og(t.declarations),_=e.updateVariableDeclaration(a,a.name,void 0,void 0,r);return Ve(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[_])),t)}else{let a=Ve(e.createAssignment(t,r),t);return Ve(e.createExpressionStatement(a),t)}}function SR(e,t,r){return au(t)?e.updateBlock(t,Ve(e.createNodeArray([r,...t.statements]),t.statements)):e.createBlock(e.createNodeArray([t,r]),!0)}function A8(e,t){if(M_(t)){let r=A8(e,t.left),a=Xi(Ve(e.cloneNode(t.right),t.right),t.right.parent);return Ve(e.createPropertyAccessExpression(r,a),t)}else return Xi(Ve(e.cloneNode(t),t),t.parent)}function k8(e,t){return Ee(t)?e.createStringLiteralFromNode(t):ao(t)?Xi(Ve(e.cloneNode(t.expression),t.expression),t.expression.parent):Xi(Ve(e.cloneNode(t),t),t.parent)}function xR(e,t,r,a,_){let{firstAccessor:p,getAccessor:d,setAccessor:h}=P2(t,r);if(r===p)return Ve(e.createObjectDefinePropertyCall(a,k8(e,r.name),e.createPropertyDescriptor({enumerable:e.createFalse(),configurable:!0,get:d&&Ve(Xr(e.createFunctionExpression(hd(d),void 0,void 0,void 0,d.parameters,void 0,d.body),d),d),set:h&&Ve(Xr(e.createFunctionExpression(hd(h),void 0,void 0,void 0,h.parameters,void 0,h.body),h),h)},!_)),p)}function wR(e,t,r){return Xr(Ve(e.createAssignment(Lm(e,r,t.name,t.name),t.initializer),t),t)}function CR(e,t,r){return Xr(Ve(e.createAssignment(Lm(e,r,t.name,t.name),e.cloneNode(t.name)),t),t)}function ER(e,t,r){return Xr(Ve(e.createAssignment(Lm(e,r,t.name,t.name),Xr(Ve(e.createFunctionExpression(hd(t),t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t)}function AR(e,t,r,a){switch(r.name&&jr(r.name)&&N.failBadSyntaxKind(r.name,"Private identifiers are not allowed in object literals."),r.kind){case 177:case 178:return xR(e,t.properties,r,a,!!t.multiLine);case 303:return wR(e,r,a);case 304:return CR(e,r,a);case 174:return ER(e,r,a)}}function kR(e,t,r,a,_){let p=t.operator;N.assert(p===46||p===47,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");let d=e.createTempVariable(a);r=e.createAssignment(d,r),Ve(r,t.operand);let h=Dm(t)?e.createPrefixUnaryExpression(p,d):e.createPostfixUnaryExpression(d,p);return Ve(h,t),_&&(h=e.createAssignment(_,h),Ve(h,t)),r=e.createComma(r,h),Ve(r,t),_8(t)&&(r=e.createComma(r,d),Ve(r,t)),r}function DR(e){return(ti(e)&65536)!==0}function Y0(e){return(ti(e)&32768)!==0}function PR(e){return(ti(e)&16384)!==0}function D8(e){return mn(e.expression)&&e.expression.text==="use strict"}function P8(e){for(let t of e)if(Ea(t)){if(D8(t))return t}else break}function I8(e){let t=g_(e);return t!==void 0&&Ea(t)&&D8(t)}function Jm(e){return e.kind===226&&e.operatorToken.kind===28}function IR(e){return Jm(e)||F_(e)}function N8(e){return is(e)&&Wt(e)&&!!Zd(e)}function NR(e){let t=em(e);return N.assertIsDefined(t),t}function Rm(e,t=15){switch(e.kind){case 217:return t&16&&N8(e)?!1:(t&1)!==0;case 216:case 234:case 233:case 238:return(t&2)!==0;case 235:return(t&4)!==0;case 360:return(t&8)!==0}return!1}function ls(e,t=15){for(;Rm(e,t);)e=e.expression;return e}function OR(e,t=15){let r=e.parent;for(;Rm(r,t);)r=r.parent,N.assert(r);return r}function MR(e){return ls(e,6)}function jm(e){return setStartsOnNewLine(e,!0)}function O8(e){let t=jl(e,ii),r=t&&t.emitNode;return r&&r.externalHelpersModuleName}function LR(e){let t=jl(e,ii),r=t&&t.emitNode;return!!r&&(!!r.externalHelpersModuleName||!!r.externalHelpers)}function JR(e,t,r,a,_,p,d){if(a.importHelpers&&Xg(r,a)){let h,l=ni(a);if(l>=5&&l<=99||r.impliedNodeFormat===99){let v=getEmitHelpers(r);if(v){let y=[];for(let C of v)if(!C.scoped){let S=C.importName;S&&Ol(y,S)}if(mt(y)){y.sort(Ci),h=e.createNamedImports(Aa(y,k=>I3(r,k)?e.createImportSpecifier(!1,void 0,e.createIdentifier(k)):e.createImportSpecifier(!1,e.createIdentifier(k),t.getUnscopedHelperName(k))));let C=jl(r,ii),S=getOrCreateEmitNode(C);S.externalHelpers=!0}}}else{let v=M8(e,r,a,_,p||d);v&&(h=e.createNamespaceImport(v))}if(h){let v=e.createImportDeclaration(void 0,e.createImportClause(!1,void 0,h),e.createStringLiteral(xm),void 0);return addInternalEmitFlags(v,2),v}}}function M8(e,t,r,a,_){if(r.importHelpers&&Xg(t,r)){let p=O8(t);if(p)return p;let d=ni(r),h=(a||U2(r)&&_)&&d!==4&&(d<5||t.impliedNodeFormat===1);if(!h){let l=getEmitHelpers(t);if(l){for(let v of l)if(!v.scoped){h=!0;break}}}if(h){let l=jl(t,ii),v=getOrCreateEmitNode(l);return v.externalHelpersModuleName||(v.externalHelpersModuleName=e.createUniqueName(xm))}}}function RR(e,t,r){let a=dT(t);if(a&&!mT(t)&&!J3(t)){let _=a.name;return wa(_)?_:e.createIdentifier(Xo(r,_)||Ot(_))}if(t.kind===272&&t.importClause||t.kind===278&&t.moduleSpecifier)return e.getGeneratedNameForNode(t)}function jR(e,t,r,a,_,p){let d=d2(t);if(d&&mn(d))return BR(t,a,e,_,p)||FR(e,d,r)||e.cloneNode(d)}function FR(e,t,r){let a=r.renamedDependencies&&r.renamedDependencies.get(t.text);return a?e.createStringLiteral(a):void 0}function L8(e,t,r,a){if(t){if(t.moduleName)return e.createStringLiteral(t.moduleName);if(!t.isDeclarationFile&&A2(a))return e.createStringLiteral(E2(r,t.fileName))}}function BR(e,t,r,a,_){return L8(r,a.getExternalModuleFileFromDeclaration(e),t,_)}function J8(e){if(Bg(e))return e.initializer;if(_s(e)){let t=e.initializer;return Na(t,!0)?t.right:void 0}if(_u(e))return e.objectAssignmentInitializer;if(Na(e,!0))return e.right;if(y6(e))return J8(e.expression)}function Mo(e){if(Bg(e))return e.name;if(Fg(e)){switch(e.kind){case 303:return Mo(e.initializer);case 304:return e.name;case 305:return Mo(e.expression)}return}return Na(e,!0)?Mo(e.left):y6(e)?Mo(e.expression):e}function UR(e){switch(e.kind){case 169:case 208:return e.dotDotDotToken;case 230:case 305:return e}}function qR(e){let t=R8(e);return N.assert(!!t||y8(e),"Invalid property name for binding element."),t}function R8(e){switch(e.kind){case 208:if(e.propertyName){let r=e.propertyName;return jr(r)?N.failBadSyntaxKind(r):ao(r)&&$b(r.expression)?r.expression:r}break;case 303:if(e.name){let r=e.name;return jr(r)?N.failBadSyntaxKind(r):ao(r)&&$b(r.expression)?r.expression:r}break;case 305:return e.name&&jr(e.name)?N.failBadSyntaxKind(e.name):e.name}let t=Mo(e);if(t&&zl(t))return t}function $b(e){let t=e.kind;return t===11||t===9}function j8(e){switch(e.kind){case 206:case 207:case 209:return e.elements;case 210:return e.properties}}function K0(e){if(e){let t=e;for(;;){if(Ee(t)||!t.body)return Ee(t)?t:t.name;t=t.body}}}function zR(e){let t=e.kind;return t===176||t===178}function F8(e){let t=e.kind;return t===176||t===177||t===178}function WR(e){let t=e.kind;return t===303||t===304||t===262||t===176||t===181||t===175||t===282||t===243||t===264||t===265||t===266||t===267||t===271||t===272||t===270||t===278||t===277}function VR(e){let t=e.kind;return t===175||t===303||t===304||t===282||t===270}function HR(e){return Pl(e)||Dd(e)}function GR(e){return Ee(e)||d6(e)}function XR(e){return zx(e)||s6(e)||_6(e)}function $R(e){return Pl(e)||s6(e)||_6(e)}function QR(e){return Ee(e)||mn(e)}function YR(e){let t=e.kind;return t===106||t===112||t===97||Og(e)||Dm(e)}function KR(e){return e===43}function ZR(e){return e===42||e===44||e===45}function ej(e){return KR(e)||ZR(e)}function tj(e){return e===40||e===41}function rj(e){return tj(e)||ej(e)}function nj(e){return e===48||e===49||e===50}function ij(e){return nj(e)||rj(e)}function aj(e){return e===30||e===33||e===32||e===34||e===104||e===103}function oj(e){return aj(e)||ij(e)}function sj(e){return e===35||e===37||e===36||e===38}function _j(e){return sj(e)||oj(e)}function cj(e){return e===51||e===52||e===53}function lj(e){return cj(e)||_j(e)}function uj(e){return e===56||e===57}function pj(e){return uj(e)||lj(e)}function fj(e){return e===61||pj(e)||D_(e)}function dj(e){return fj(e)||e===28}function mj(e){return dj(e.kind)}function hj(e,t,r,a,_,p){let d=new U8(e,t,r,a,_,p);return h;function h(l,v){let y={value:void 0},C=[Id.enter],S=[l],k=[void 0],L=0;for(;C[L]!==Id.done;)L=C[L](d,L,C,S,k,y,v);return N.assertEqual(L,0),y.value}}function B8(e){return e===95||e===90}function yj(e){let t=e.kind;return B8(t)}function gj(e){let t=e.kind;return bi(t)&&!B8(t)}function bj(e,t){if(t!==void 0)return t.length===0?t:Ve(e.createNodeArray([],t.hasTrailingComma),t)}function vj(e){var t;let r=e.emitNode.autoGenerate;if(r.flags&4){let a=r.id,_=e,p=_.original;for(;p;){_=p;let d=(t=_.emitNode)==null?void 0:t.autoGenerate;if(ro(_)&&(d===void 0||d.flags&4&&d.id!==a))break;p=_.original}return _}return e}function Z0(e,t){return typeof e=="object"?Pd(!1,e.prefix,e.node,e.suffix,t):typeof e=="string"?e.length>0&&e.charCodeAt(0)===35?e.slice(1):e:""}function Tj(e,t){return typeof e=="string"?e:Sj(e,N.checkDefined(t))}function Sj(e,t){return Mg(e)?t(e).slice(1):wa(e)?t(e):jr(e)?e.escapedText.slice(1):Ot(e)}function Pd(e,t,r,a,_){return t=Z0(t,_),a=Z0(a,_),r=Tj(r,_),`${e?"#":""}${t}${r}${a}`}function xj(e,t,r,a){return e.updatePropertyDeclaration(t,r,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage"),void 0,void 0,a)}function wj(e,t,r,a,_=e.createThis()){return e.createGetAccessorDeclaration(r,a,[],void 0,e.createBlock([e.createReturnStatement(e.createPropertyAccessExpression(_,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")))]))}function Cj(e,t,r,a,_=e.createThis()){return e.createSetAccessorDeclaration(r,a,[e.createParameterDeclaration(void 0,void 0,"value")],e.createBlock([e.createExpressionStatement(e.createAssignment(e.createPropertyAccessExpression(_,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")),e.createIdentifier("value")))]))}function Ej(e){let t=e.expression;for(;;){if(t=ls(t),F_(t)){t=ka(t.elements);continue}if(Jm(t)){t=t.right;continue}if(Na(t,!0)&&wa(t.left))return t;break}}function Aj(e){return is(e)&&Ta(e)&&!e.emitNode}function ol(e,t){if(Aj(e))ol(e.expression,t);else if(Jm(e))ol(e.left,t),ol(e.right,t);else if(F_(e))for(let r of e.elements)ol(r,t);else t.push(e)}function kj(e){let t=[];return ol(e,t),t}function U6(e){if(e.transformFlags&65536)return!0;if(e.transformFlags&128)for(let t of j8(e)){let r=Mo(t);if(r&&u3(r)&&(r.transformFlags&65536||r.transformFlags&128&&U6(r)))return!0}return!1}var Id,U8,Dj=Vt({"src/compiler/factory/utilities.ts"(){"use strict";Dr(),(e=>{function t(y,C,S,k,L,G,K){let ue=C>0?L[C-1]:void 0;return N.assertEqual(S[C],t),L[C]=y.onEnter(k[C],ue,K),S[C]=h(y,t),C}e.enter=t;function r(y,C,S,k,L,G,K){N.assertEqual(S[C],r),N.assertIsDefined(y.onLeft),S[C]=h(y,r);let ue=y.onLeft(k[C].left,L[C],k[C]);return ue?(v(C,k,ue),l(C,S,k,L,ue)):C}e.left=r;function a(y,C,S,k,L,G,K){return N.assertEqual(S[C],a),N.assertIsDefined(y.onOperator),S[C]=h(y,a),y.onOperator(k[C].operatorToken,L[C],k[C]),C}e.operator=a;function _(y,C,S,k,L,G,K){N.assertEqual(S[C],_),N.assertIsDefined(y.onRight),S[C]=h(y,_);let ue=y.onRight(k[C].right,L[C],k[C]);return ue?(v(C,k,ue),l(C,S,k,L,ue)):C}e.right=_;function p(y,C,S,k,L,G,K){N.assertEqual(S[C],p),S[C]=h(y,p);let ue=y.onExit(k[C],L[C]);if(C>0){if(C--,y.foldState){let Y=S[C]===p?"right":"left";L[C]=y.foldState(L[C],ue,Y)}}else G.value=ue;return C}e.exit=p;function d(y,C,S,k,L,G,K){return N.assertEqual(S[C],d),C}e.done=d;function h(y,C){switch(C){case t:if(y.onLeft)return r;case r:if(y.onOperator)return a;case a:if(y.onRight)return _;case _:return p;case p:return d;case d:return d;default:N.fail("Invalid state")}}e.nextState=h;function l(y,C,S,k,L){return y++,C[y]=t,S[y]=L,k[y]=void 0,y}function v(y,C,S){if(N.shouldAssert(2))for(;y>=0;)N.assert(C[y]!==S,"Circular traversal detected."),y--}})(Id||(Id={})),U8=class{constructor(e,t,r,a,_,p){this.onEnter=e,this.onLeft=t,this.onOperator=r,this.onRight=a,this.onExit=_,this.foldState=p}}}});function Ve(e,t){return t?Ya(e,t.pos,t.end):e}function q_(e){let t=e.kind;return t===168||t===169||t===171||t===172||t===173||t===174||t===176||t===177||t===178||t===181||t===185||t===218||t===219||t===231||t===243||t===262||t===263||t===264||t===265||t===266||t===267||t===271||t===272||t===277||t===278}function q8(e){let t=e.kind;return t===169||t===172||t===174||t===177||t===178||t===231||t===263}var Pj=Vt({"src/compiler/factory/utilitiesPublic.ts"(){"use strict";Dr()}});function P(e,t){return t&&e(t)}function _e(e,t,r){if(r){if(t)return t(r);for(let a of r){let _=e(a);if(_)return _}}}function z8(e,t){return e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42&&e.charCodeAt(t+3)!==47}function ml(e){return yr(e.statements,Ij)||Nj(e)}function Ij(e){return q_(e)&&Oj(e,95)||w6(e)&&Nm(e.moduleReference)||C6(e)||ss(e)||B_(e)?e:void 0}function Nj(e){return e.flags&8388608?W8(e):void 0}function W8(e){return Mj(e)?e:Bt(e,W8)}function Oj(e,t){return mt(e.modifiers,r=>r.kind===t)}function Mj(e){return b6(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}function Qb(e,t,r){return _e(t,r,e.typeParameters)||_e(t,r,e.parameters)||P(t,e.type)}function Yb(e,t,r){return _e(t,r,e.types)}function Kb(e,t,r){return P(t,e.type)}function Zb(e,t,r){return _e(t,r,e.elements)}function ev(e,t,r){return P(t,e.expression)||P(t,e.questionDotToken)||_e(t,r,e.typeArguments)||_e(t,r,e.arguments)}function tv(e,t,r){return _e(t,r,e.statements)}function rv(e,t,r){return P(t,e.label)}function nv(e,t,r){return _e(t,r,e.modifiers)||P(t,e.name)||_e(t,r,e.typeParameters)||_e(t,r,e.heritageClauses)||_e(t,r,e.members)}function iv(e,t,r){return _e(t,r,e.elements)}function av(e,t,r){return P(t,e.propertyName)||P(t,e.name)}function ov(e,t,r){return P(t,e.tagName)||_e(t,r,e.typeArguments)||P(t,e.attributes)}function wo(e,t,r){return P(t,e.type)}function sv(e,t,r){return P(t,e.tagName)||(e.isNameFirst?P(t,e.name)||P(t,e.typeExpression):P(t,e.typeExpression)||P(t,e.name))||(typeof e.comment=="string"?void 0:_e(t,r,e.comment))}function Co(e,t,r){return P(t,e.tagName)||P(t,e.typeExpression)||(typeof e.comment=="string"?void 0:_e(t,r,e.comment))}function Kh(e,t,r){return P(t,e.name)}function Xa(e,t,r){return P(t,e.tagName)||(typeof e.comment=="string"?void 0:_e(t,r,e.comment))}function Lj(e,t,r){return P(t,e.expression)}function Bt(e,t,r){if(e===void 0||e.kind<=165)return;let a=Q8[e.kind];return a===void 0?void 0:a(e,t,r)}function eg(e,t,r){let a=_v(e),_=[];for(;_.length=0;--h)a.push(p[h]),_.push(d)}else{let h=t(p,d);if(h){if(h==="skip")continue;return h}if(p.kind>=166)for(let l of _v(p))a.push(l),_.push(p)}}}function _v(e){let t=[];return Bt(e,r,r),t;function r(a){t.unshift(a)}}function V8(e){e.externalModuleIndicator=ml(e)}function H8(e,t,r,a=!1,_){var p,d,h,l;(p=xa)==null||p.push(xa.Phase.Parse,"createSourceFile",{path:e},!0),Lb("beforeParse");let v;(d=Yf)==null||d.logStartParseSourceFile(e);let{languageVersion:y,setExternalModuleIndicator:C,impliedNodeFormat:S}=typeof r=="object"?r:{languageVersion:r};if(y===100)v=Zn.parseSourceFile(e,t,y,void 0,a,6,Rn);else{let k=S===void 0?C:L=>(L.impliedNodeFormat=S,(C||V8)(L));v=Zn.parseSourceFile(e,t,y,void 0,a,_,k)}return(h=Yf)==null||h.logStopParseSourceFile(),Lb("afterParse"),gE("Parse","beforeParse","afterParse"),(l=xa)==null||l.pop(),v}function Jj(e,t){return Zn.parseIsolatedEntityName(e,t)}function Rj(e,t){return Zn.parseJsonText(e,t)}function Zo(e){return e.externalModuleIndicator!==void 0}function q6(e,t,r,a=!1){let _=Wf.updateSourceFile(e,t,r,a);return _.flags|=e.flags&12582912,_}function jj(e,t,r){let a=Zn.JSDocParser.parseIsolatedJSDocComment(e,t,r);return a&&a.jsDoc&&Zn.fixupParentReferences(a.jsDoc),a}function Fj(e,t,r){return Zn.JSDocParser.parseJSDocTypeExpressionForTests(e,t,r)}function G8(e){return ei(e,n6)||La(e,".ts")&&eo(T_(e),".d.")}function Bj(e,t,r,a){if(e){if(e==="import")return 99;if(e==="require")return 1;a(t,r-t,U.resolution_mode_should_be_either_require_or_import)}}function X8(e,t){let r=[];for(let a of Wo(t,0)||$e){let _=t.substring(a.pos,a.end);qj(r,a,_)}e.pragmas=new Map;for(let a of r){if(e.pragmas.has(a.name)){let _=e.pragmas.get(a.name);_ instanceof Array?_.push(a.args):e.pragmas.set(a.name,[_,a.args]);continue}e.pragmas.set(a.name,a.args)}}function $8(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((r,a)=>{switch(a){case"reference":{let _=e.referencedFiles,p=e.typeReferenceDirectives,d=e.libReferenceDirectives;yr(Pf(r),h=>{let{types:l,lib:v,path:y,["resolution-mode"]:C}=h.arguments;if(h.arguments["no-default-lib"])e.hasNoDefaultLib=!0;else if(l){let S=Bj(C,l.pos,l.end,t);p.push({pos:l.pos,end:l.end,fileName:l.value,...S?{resolutionMode:S}:{}})}else v?d.push({pos:v.pos,end:v.end,fileName:v.value}):y?_.push({pos:y.pos,end:y.end,fileName:y.value}):t(h.range.pos,h.range.end-h.range.pos,U.Invalid_reference_directive_syntax)});break}case"amd-dependency":{e.amdDependencies=Aa(Pf(r),_=>({name:_.arguments.name,path:_.arguments.path}));break}case"amd-module":{if(r instanceof Array)for(let _ of r)e.moduleName&&t(_.range.pos,_.range.end-_.range.pos,U.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=_.arguments.name;else e.moduleName=r.arguments.name;break}case"ts-nocheck":case"ts-check":{yr(Pf(r),_=>{(!e.checkJsDirective||_.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:a==="ts-check",end:_.range.end,pos:_.range.pos})});break}case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:N.fail("Unhandled pragma kind")}})}function Uj(e){if(Vf.has(e))return Vf.get(e);let t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return Vf.set(e,t),t}function qj(e,t,r){let a=t.kind===2&&Y8.exec(r);if(a){let p=a[1].toLowerCase(),d=qd[p];if(!d||!(d.kind&1))return;if(d.args){let h={};for(let l of d.args){let y=Uj(l.name).exec(r);if(!y&&!l.optional)return;if(y){let C=y[2]||y[3];if(l.captureSpan){let S=t.pos+y.index+y[1].length+1;h[l.name]={value:C,pos:S,end:S+C.length}}else h[l.name]=C}}e.push({name:p,args:{arguments:h,range:t}})}else e.push({name:p,args:{arguments:{},range:t}});return}let _=t.kind===2&&K8.exec(r);if(_)return cv(e,t,2,_);if(t.kind===3){let p=/@(\S+)(\s+.*)?$/gim,d;for(;d=p.exec(r);)cv(e,t,4,d)}}function cv(e,t,r,a){if(!a)return;let _=a[1].toLowerCase(),p=qd[_];if(!p||!(p.kind&r))return;let d=a[2],h=zj(p,d);h!=="fail"&&e.push({name:_,args:{arguments:h,range:t}})}function zj(e,t){if(!t)return{};if(!e.args)return{};let r=Ud(t).split(/\s+/),a={};for(let _=0;_new(dv||(dv=wt.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(pv||(pv=wt.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(fv||(fv=wt.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(uv||(uv=wt.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(lv||(lv=wt.getNodeConstructor()))(e,-1,-1)},z_=Ad(1,tg),Q8={166:function(t,r,a){return P(r,t.left)||P(r,t.right)},168:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.constraint)||P(r,t.default)||P(r,t.expression)},304:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||P(r,t.exclamationToken)||P(r,t.equalsToken)||P(r,t.objectAssignmentInitializer)},305:function(t,r,a){return P(r,t.expression)},169:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.dotDotDotToken)||P(r,t.name)||P(r,t.questionToken)||P(r,t.type)||P(r,t.initializer)},172:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||P(r,t.exclamationToken)||P(r,t.type)||P(r,t.initializer)},171:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||P(r,t.type)||P(r,t.initializer)},303:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||P(r,t.exclamationToken)||P(r,t.initializer)},260:function(t,r,a){return P(r,t.name)||P(r,t.exclamationToken)||P(r,t.type)||P(r,t.initializer)},208:function(t,r,a){return P(r,t.dotDotDotToken)||P(r,t.propertyName)||P(r,t.name)||P(r,t.initializer)},181:function(t,r,a){return _e(r,a,t.modifiers)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)},185:function(t,r,a){return _e(r,a,t.modifiers)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)},184:function(t,r,a){return _e(r,a,t.modifiers)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)},179:Qb,180:Qb,174:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.asteriskToken)||P(r,t.name)||P(r,t.questionToken)||P(r,t.exclamationToken)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},173:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.questionToken)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)},176:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},177:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},178:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},262:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.asteriskToken)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},218:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.asteriskToken)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.body)},219:function(t,r,a){return _e(r,a,t.modifiers)||_e(r,a,t.typeParameters)||_e(r,a,t.parameters)||P(r,t.type)||P(r,t.equalsGreaterThanToken)||P(r,t.body)},175:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.body)},183:function(t,r,a){return P(r,t.typeName)||_e(r,a,t.typeArguments)},182:function(t,r,a){return P(r,t.assertsModifier)||P(r,t.parameterName)||P(r,t.type)},186:function(t,r,a){return P(r,t.exprName)||_e(r,a,t.typeArguments)},187:function(t,r,a){return _e(r,a,t.members)},188:function(t,r,a){return P(r,t.elementType)},189:function(t,r,a){return _e(r,a,t.elements)},192:Yb,193:Yb,194:function(t,r,a){return P(r,t.checkType)||P(r,t.extendsType)||P(r,t.trueType)||P(r,t.falseType)},195:function(t,r,a){return P(r,t.typeParameter)},205:function(t,r,a){return P(r,t.argument)||P(r,t.assertions)||P(r,t.qualifier)||_e(r,a,t.typeArguments)},302:function(t,r,a){return P(r,t.assertClause)},196:Kb,198:Kb,199:function(t,r,a){return P(r,t.objectType)||P(r,t.indexType)},200:function(t,r,a){return P(r,t.readonlyToken)||P(r,t.typeParameter)||P(r,t.nameType)||P(r,t.questionToken)||P(r,t.type)||_e(r,a,t.members)},201:function(t,r,a){return P(r,t.literal)},202:function(t,r,a){return P(r,t.dotDotDotToken)||P(r,t.name)||P(r,t.questionToken)||P(r,t.type)},206:Zb,207:Zb,209:function(t,r,a){return _e(r,a,t.elements)},210:function(t,r,a){return _e(r,a,t.properties)},211:function(t,r,a){return P(r,t.expression)||P(r,t.questionDotToken)||P(r,t.name)},212:function(t,r,a){return P(r,t.expression)||P(r,t.questionDotToken)||P(r,t.argumentExpression)},213:ev,214:ev,215:function(t,r,a){return P(r,t.tag)||P(r,t.questionDotToken)||_e(r,a,t.typeArguments)||P(r,t.template)},216:function(t,r,a){return P(r,t.type)||P(r,t.expression)},217:function(t,r,a){return P(r,t.expression)},220:function(t,r,a){return P(r,t.expression)},221:function(t,r,a){return P(r,t.expression)},222:function(t,r,a){return P(r,t.expression)},224:function(t,r,a){return P(r,t.operand)},229:function(t,r,a){return P(r,t.asteriskToken)||P(r,t.expression)},223:function(t,r,a){return P(r,t.expression)},225:function(t,r,a){return P(r,t.operand)},226:function(t,r,a){return P(r,t.left)||P(r,t.operatorToken)||P(r,t.right)},234:function(t,r,a){return P(r,t.expression)||P(r,t.type)},235:function(t,r,a){return P(r,t.expression)},238:function(t,r,a){return P(r,t.expression)||P(r,t.type)},236:function(t,r,a){return P(r,t.name)},227:function(t,r,a){return P(r,t.condition)||P(r,t.questionToken)||P(r,t.whenTrue)||P(r,t.colonToken)||P(r,t.whenFalse)},230:function(t,r,a){return P(r,t.expression)},241:tv,268:tv,312:function(t,r,a){return _e(r,a,t.statements)||P(r,t.endOfFileToken)},243:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.declarationList)},261:function(t,r,a){return _e(r,a,t.declarations)},244:function(t,r,a){return P(r,t.expression)},245:function(t,r,a){return P(r,t.expression)||P(r,t.thenStatement)||P(r,t.elseStatement)},246:function(t,r,a){return P(r,t.statement)||P(r,t.expression)},247:function(t,r,a){return P(r,t.expression)||P(r,t.statement)},248:function(t,r,a){return P(r,t.initializer)||P(r,t.condition)||P(r,t.incrementor)||P(r,t.statement)},249:function(t,r,a){return P(r,t.initializer)||P(r,t.expression)||P(r,t.statement)},250:function(t,r,a){return P(r,t.awaitModifier)||P(r,t.initializer)||P(r,t.expression)||P(r,t.statement)},251:rv,252:rv,253:function(t,r,a){return P(r,t.expression)},254:function(t,r,a){return P(r,t.expression)||P(r,t.statement)},255:function(t,r,a){return P(r,t.expression)||P(r,t.caseBlock)},269:function(t,r,a){return _e(r,a,t.clauses)},296:function(t,r,a){return P(r,t.expression)||_e(r,a,t.statements)},297:function(t,r,a){return _e(r,a,t.statements)},256:function(t,r,a){return P(r,t.label)||P(r,t.statement)},257:function(t,r,a){return P(r,t.expression)},258:function(t,r,a){return P(r,t.tryBlock)||P(r,t.catchClause)||P(r,t.finallyBlock)},299:function(t,r,a){return P(r,t.variableDeclaration)||P(r,t.block)},170:function(t,r,a){return P(r,t.expression)},263:nv,231:nv,264:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||_e(r,a,t.heritageClauses)||_e(r,a,t.members)},265:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.typeParameters)||P(r,t.type)},266:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||_e(r,a,t.members)},306:function(t,r,a){return P(r,t.name)||P(r,t.initializer)},267:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.body)},271:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)||P(r,t.moduleReference)},272:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.importClause)||P(r,t.moduleSpecifier)||P(r,t.assertClause)},273:function(t,r,a){return P(r,t.name)||P(r,t.namedBindings)},300:function(t,r,a){return _e(r,a,t.elements)},301:function(t,r,a){return P(r,t.name)||P(r,t.value)},270:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.name)},274:function(t,r,a){return P(r,t.name)},280:function(t,r,a){return P(r,t.name)},275:iv,279:iv,278:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.exportClause)||P(r,t.moduleSpecifier)||P(r,t.assertClause)},276:av,281:av,277:function(t,r,a){return _e(r,a,t.modifiers)||P(r,t.expression)},228:function(t,r,a){return P(r,t.head)||_e(r,a,t.templateSpans)},239:function(t,r,a){return P(r,t.expression)||P(r,t.literal)},203:function(t,r,a){return P(r,t.head)||_e(r,a,t.templateSpans)},204:function(t,r,a){return P(r,t.type)||P(r,t.literal)},167:function(t,r,a){return P(r,t.expression)},298:function(t,r,a){return _e(r,a,t.types)},233:function(t,r,a){return P(r,t.expression)||_e(r,a,t.typeArguments)},283:function(t,r,a){return P(r,t.expression)},282:function(t,r,a){return _e(r,a,t.modifiers)},361:function(t,r,a){return _e(r,a,t.elements)},284:function(t,r,a){return P(r,t.openingElement)||_e(r,a,t.children)||P(r,t.closingElement)},288:function(t,r,a){return P(r,t.openingFragment)||_e(r,a,t.children)||P(r,t.closingFragment)},285:ov,286:ov,292:function(t,r,a){return _e(r,a,t.properties)},291:function(t,r,a){return P(r,t.name)||P(r,t.initializer)},293:function(t,r,a){return P(r,t.expression)},294:function(t,r,a){return P(r,t.dotDotDotToken)||P(r,t.expression)},287:function(t,r,a){return P(r,t.tagName)},295:function(t,r,a){return P(r,t.namespace)||P(r,t.name)},190:wo,191:wo,316:wo,322:wo,321:wo,323:wo,325:wo,324:function(t,r,a){return _e(r,a,t.parameters)||P(r,t.type)},327:function(t,r,a){return(typeof t.comment=="string"?void 0:_e(r,a,t.comment))||_e(r,a,t.tags)},354:function(t,r,a){return P(r,t.tagName)||P(r,t.name)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},317:function(t,r,a){return P(r,t.name)},318:function(t,r,a){return P(r,t.left)||P(r,t.right)},348:sv,355:sv,337:function(t,r,a){return P(r,t.tagName)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},336:function(t,r,a){return P(r,t.tagName)||P(r,t.class)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},335:function(t,r,a){return P(r,t.tagName)||P(r,t.class)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},352:function(t,r,a){return P(r,t.tagName)||P(r,t.constraint)||_e(r,a,t.typeParameters)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},353:function(t,r,a){return P(r,t.tagName)||(t.typeExpression&&t.typeExpression.kind===316?P(r,t.typeExpression)||P(r,t.fullName)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment)):P(r,t.fullName)||P(r,t.typeExpression)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment)))},345:function(t,r,a){return P(r,t.tagName)||P(r,t.fullName)||P(r,t.typeExpression)||(typeof t.comment=="string"?void 0:_e(r,a,t.comment))},349:Co,351:Co,350:Co,347:Co,357:Co,356:Co,346:Co,330:function(t,r,a){return yr(t.typeParameters,r)||yr(t.parameters,r)||P(r,t.type)},331:Kh,332:Kh,333:Kh,329:function(t,r,a){return yr(t.jsDocPropertyTags,r)},334:Xa,339:Xa,340:Xa,341:Xa,342:Xa,343:Xa,338:Xa,344:Xa,360:Lj},(e=>{var t=ns(99,!0),r=40960,a,_,p,d,h;function l(c){return wn++,c}var v={createBaseSourceFileNode:c=>l(new h(c,0,0)),createBaseIdentifierNode:c=>l(new p(c,0,0)),createBasePrivateIdentifierNode:c=>l(new d(c,0,0)),createBaseTokenNode:c=>l(new _(c,0,0)),createBaseNode:c=>l(new a(c,0,0))},y=Ad(11,v),{createNodeArray:C,createNumericLiteral:S,createStringLiteral:k,createLiteralLikeNode:L,createIdentifier:G,createPrivateIdentifier:K,createToken:ue,createArrayLiteralExpression:Y,createObjectLiteralExpression:B,createPropertyAccessExpression:ae,createPropertyAccessChain:Ce,createElementAccessExpression:Ze,createElementAccessChain:qe,createCallExpression:rt,createCallChain:it,createNewExpression:Ir,createParenthesizedExpression:ar,createBlock:ci,createVariableStatement:or,createExpressionStatement:Nr,createIfStatement:Ge,createWhileStatement:Gt,createForStatement:Ur,createForOfStatement:Xt,createVariableDeclaration:Tn,createVariableDeclarationList:Sn}=y,sr,$t,St,xn,Tr,vt,ct,Ut,fr,ht,wn,Tt,Or,pt,Mr,at,er=!0,Qt=!1;function tn(c,m,b,w,A=!1,R,te){var le;if(R=WS(c,R),R===6){let ie=Un(c,m,b,w,A);return convertToJson(ie,(le=ie.statements[0])==null?void 0:le.expression,ie.parseDiagnostics,!1,void 0),ie.referencedFiles=$e,ie.typeReferenceDirectives=$e,ie.libReferenceDirectives=$e,ie.amdDependencies=$e,ie.hasNoDefaultLib=!1,ie.pragmas=pg,ie}rn(c,m,b,w,R);let ne=Di(b,A,R,te||V8);return nn(),ne}e.parseSourceFile=tn;function Bn(c,m){rn("",c,m,void 0,1),O();let b=la(!0),w=f()===1&&!ct.length;return nn(),w?b:void 0}e.parseIsolatedEntityName=Bn;function Un(c,m,b=2,w,A=!1){rn(c,m,b,w,6),$t=at,O();let R=T(),te,le;if(f()===1)te=Ft([],R,R),le=dr();else{let ve;for(;f()!==1;){let Ue;switch(f()){case 23:Ue=Jc();break;case 112:case 97:case 106:Ue=dr();break;case 41:Te(()=>O()===9&&O()!==59)?Ue=Ac():Ue=Ls();break;case 9:case 11:if(Te(()=>O()!==59)){Ue=fi();break}default:Ue=Ls();break}ve&&zt(ve)?ve.push(Ue):ve?ve=[ve,Ue]:(ve=Ue,f()!==1&&Je(U.Unexpected_token))}let He=zt(ve)?M(Y(ve),R):N.checkDefined(ve),Be=Nr(He);M(Be,R),te=Ft([Be],R),le=Hn(1,U.Unexpected_token)}let ne=ge(c,2,6,!1,te,le,$t,Rn);A&&oe(ne),ne.nodeCount=wn,ne.identifierCount=Or,ne.identifiers=Tt,ne.parseDiagnostics=$a(ct,ne),Ut&&(ne.jsDocDiagnostics=$a(Ut,ne));let ie=ne;return nn(),ie}e.parseJsonText=Un;function rn(c,m,b,w,A){switch(a=wt.getNodeConstructor(),_=wt.getTokenConstructor(),p=wt.getIdentifierConstructor(),d=wt.getPrivateIdentifierConstructor(),h=wt.getSourceFileConstructor(),sr=pn(c),St=m,xn=b,fr=w,Tr=A,vt=R0(A),ct=[],pt=0,Tt=new Map,Or=0,wn=0,$t=0,er=!0,Tr){case 1:case 2:at=524288;break;case 6:at=134742016;break;default:at=0;break}Qt=!1,t.setText(St),t.setOnError(j),t.setScriptTarget(xn),t.setLanguageVariant(vt)}function nn(){t.clearCommentDirectives(),t.setText(""),t.setOnError(void 0),St=void 0,xn=void 0,fr=void 0,Tr=void 0,vt=void 0,$t=0,ct=void 0,Ut=void 0,pt=0,Tt=void 0,Mr=void 0,er=!0}function Di(c,m,b,w){let A=G8(sr);A&&(at|=33554432),$t=at,O();let R=zr(0,wr);N.assert(f()===1);let te=x(),le=Ae(dr(),te),ne=ge(sr,c,b,A,R,le,$t,w);return X8(ne,St),$8(ne,ie),ne.commentDirectives=t.getCommentDirectives(),ne.nodeCount=wn,ne.identifierCount=Or,ne.identifiers=Tt,ne.parseDiagnostics=$a(ct,ne),Ut&&(ne.jsDocDiagnostics=$a(Ut,ne)),m&&oe(ne),ne;function ie(ve,He,Be){ct.push(Ao(sr,ve,He,Be))}}let qn=!1;function Ae(c,m){if(!m)return c;N.assert(!c.jsDoc);let b=Za(G3(c,St),w=>gf.parseJSDocComment(c,w.pos,w.end-w.pos));return b.length&&(c.jsDoc=b),qn&&(qn=!1,c.flags|=536870912),c}function q(c){let m=fr,b=Wf.createSyntaxCursor(c);fr={currentNode:ve};let w=[],A=ct;ct=[];let R=0,te=ne(c.statements,0);for(;te!==-1;){let He=c.statements[R],Be=c.statements[te];Rr(w,c.statements,R,te),R=ie(c.statements,te);let Ue=_l(A,Gr=>Gr.start>=He.pos),Rt=Ue>=0?_l(A,Gr=>Gr.start>=Be.pos,Ue):-1;Ue>=0&&Rr(ct,A,Ue,Rt>=0?Rt:void 0),_r(()=>{let Gr=at;for(at|=65536,t.resetTokenState(Be.pos),O();f()!==1;){let di=t.getTokenFullStart(),mi=gs(0,wr);if(w.push(mi),di===t.getTokenFullStart()&&O(),R>=0){let hi=c.statements[R];if(mi.end===hi.pos)break;mi.end>hi.pos&&(R=ie(c.statements,R+1))}}at=Gr},2),te=R>=0?ne(c.statements,R):-1}if(R>=0){let He=c.statements[R];Rr(w,c.statements,R);let Be=_l(A,Ue=>Ue.start>=He.pos);Be>=0&&Rr(ct,A,Be)}return fr=m,y.updateSourceFile(c,Ve(C(w),c.statements));function le(He){return!(He.flags&65536)&&!!(He.transformFlags&67108864)}function ne(He,Be){for(let Ue=Be;Ue118}function Et(){return f()===80?!0:f()===127&&En()||f()===135&&Sr()?!1:f()>118}function H(c,m,b=!0){return f()===c?(b&&O(),!0):(m?Je(m):Je(U._0_expected,nr(c)),!1)}let Fa=Object.keys(cl).filter(c=>c.length>2);function Ie(c){if(s8(c)){Mt(Nt(St,c.template.pos),c.template.end,U.Module_declaration_names_may_only_use_or_quoted_strings);return}let m=Ee(c)?Ot(c):void 0;if(!m||!Cg(m,xn)){Je(U._0_expected,nr(27));return}let b=Nt(St,c.pos);switch(m){case"const":case"let":case"var":Mt(b,c.end,U.Variable_declaration_not_allowed_at_this_location);return;case"declare":return;case"interface":ot(U.Interface_name_cannot_be_0,U.Interface_must_be_given_a_name,19);return;case"is":Mt(b,t.getTokenStart(),U.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return;case"module":case"namespace":ot(U.Namespace_name_cannot_be_0,U.Namespace_must_be_given_a_name,19);return;case"type":ot(U.Type_alias_name_cannot_be_0,U.Type_alias_must_be_given_a_name,64);return}let w=Jv(m,Fa,A=>A)??cr(m);if(w){Mt(b,c.end,U.Unknown_keyword_or_identifier_Did_you_mean_0,w);return}f()!==0&&Mt(b,c.end,U.Unexpected_keyword_or_identifier)}function ot(c,m,b){f()===b?Je(m):Je(c,t.getTokenValue())}function cr(c){for(let m of Fa)if(c.length>m.length+2&&Fr(c,m))return`${m} ${c.slice(m.length)}`}function an(c,m,b){if(f()===60&&!t.hasPrecedingLineBreak()){Je(U.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);return}if(f()===21){Je(U.Cannot_start_a_function_call_in_a_type_annotation),O();return}if(m&&!ui()){b?Je(U._0_expected,nr(27)):Je(U.Expected_for_property_initializer);return}if(!fs()){if(b){Je(U._0_expected,nr(27));return}Ie(c)}}function Ba(c){return f()===c?(fe(),!0):(N.assert(Jf(c)),Je(U._0_expected,nr(c)),!1)}function kn(c,m,b,w){if(f()===m){O();return}let A=Je(U._0_expected,nr(m));b&&A&&nl(A,Ao(sr,w,1,U.The_parser_expected_to_find_a_1_to_match_the_0_token_here,nr(c),nr(m)))}function je(c){return f()===c?(O(),!0):!1}function dt(c){if(f()===c)return dr()}function li(c){if(f()===c)return t1()}function Hn(c,m,b){return dt(c)||Jr(c,!1,m||U._0_expected,b||nr(c))}function e1(c){let m=li(c);return m||(N.assert(Jf(c)),Jr(c,!1,U._0_expected,nr(c)))}function dr(){let c=T(),m=f();return O(),M(ue(m),c)}function t1(){let c=T(),m=f();return fe(),M(ue(m),c)}function ui(){return f()===27?!0:f()===20||f()===1||t.hasPrecedingLineBreak()}function fs(){return ui()?(f()===27&&O(),!0):!1}function xr(){return fs()||H(27)}function Ft(c,m,b,w){let A=C(c,w);return Ya(A,m,b??t.getTokenFullStart()),A}function M(c,m,b){return Ya(c,m,b??t.getTokenFullStart()),at&&(c.flags|=at),Qt&&(Qt=!1,c.flags|=262144),c}function Jr(c,m,b,...w){m?oa(t.getTokenFullStart(),0,b,...w):b&&Je(b,...w);let A=T(),R=c===80?G("",void 0):Sl(c)?y.createTemplateLiteralLikeNode(c,"","",void 0):c===9?S("",void 0):c===11?k("",void 0):c===282?y.createMissingDeclaration():ue(c);return M(R,A)}function sa(c){let m=Tt.get(c);return m===void 0&&Tt.set(c,m=c),m}function Ni(c,m,b){if(c){Or++;let le=T(),ne=f(),ie=sa(t.getTokenValue()),ve=t.hasExtendedUnicodeEscape();return $(),M(G(ie,ne,ve),le)}if(f()===81)return Je(b||U.Private_identifiers_are_not_allowed_outside_class_bodies),Ni(!0);if(f()===0&&t.tryScan(()=>t.reScanInvalidIdentifier()===80))return Ni(!0);Or++;let w=f()===1,A=t.isReservedWord(),R=t.getTokenText(),te=A?U.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:U.Identifier_expected;return Jr(80,w,m||te,R)}function G_(c){return Ni(An(),void 0,c)}function Lt(c,m){return Ni(Et(),c,m)}function Yt(c){return Ni(kt(f()),c)}function Oi(){return kt(f())||f()===11||f()===9}function r1(){return kt(f())||f()===11}function Tu(c){if(f()===11||f()===9){let m=fi();return m.text=sa(m.text),m}return c&&f()===23?Su():f()===81?X_():Yt()}function Ua(){return Tu(!0)}function Su(){let c=T();H(23);let m=Le(Jt);return H(24),M(y.createComputedPropertyName(m),c)}function X_(){let c=T(),m=K(sa(t.getTokenValue()));return O(),M(m,c)}function _a(c){return f()===c&&ft($_)}function xu(){return O(),t.hasPrecedingLineBreak()?!1:ms()}function $_(){switch(f()){case 87:return O()===94;case 95:return O(),f()===90?Te(Mi):f()===156?Te(ds):wu();case 90:return Mi();case 126:case 139:case 153:return O(),ms();default:return xu()}}function wu(){return f()===60||f()!==42&&f()!==130&&f()!==19&&ms()}function ds(){return O(),wu()}function n1(){return bi(f())&&ft($_)}function ms(){return f()===23||f()===19||f()===42||f()===26||Oi()}function Mi(){return O(),f()===86||f()===100||f()===120||f()===60||f()===128&&Te(ah)||f()===134&&Te(Fc)}function Q_(c,m){if(bs(c))return!0;switch(c){case 0:case 1:case 3:return!(f()===27&&m)&&Bc();case 2:return f()===84||f()===90;case 4:return Te(Xu);case 5:return Te(dh)||f()===27&&!m;case 6:return f()===23||Oi();case 12:switch(f()){case 23:case 42:case 26:case 25:return!0;default:return Oi()}case 18:return Oi();case 9:return f()===23||f()===26||Oi();case 24:return r1();case 7:return f()===19?Te(hs):m?Et()&&!Eu():Sc()&&!Eu();case 8:return zc();case 10:return f()===28||f()===26||zc();case 19:return f()===103||f()===87||Et();case 15:switch(f()){case 28:case 25:return!0}case 11:return f()===26||Ri();case 16:return _c(!1);case 17:return _c(!0);case 20:case 21:return f()===28||pa();case 22:return lf();case 23:return f()===161&&Te(Yp)?!1:kt(f());case 13:return kt(f())||f()===19;case 14:return!0;case 25:return!0;case 26:return N.fail("ParsingContext.Count used as a context");default:N.assertNever(c,"Non-exhaustive case in 'isListElement'.")}}function hs(){if(N.assert(f()===19),O()===20){let c=O();return c===28||c===19||c===96||c===119}return!0}function ys(){return O(),Et()}function Cu(){return O(),kt(f())}function Y_(){return O(),n4(f())}function Eu(){return f()===119||f()===96?Te(Au):!1}function Au(){return O(),Ri()}function ku(){return O(),pa()}function po(c){if(f()===1)return!0;switch(c){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return f()===20;case 3:return f()===20||f()===84||f()===90;case 7:return f()===19||f()===96||f()===119;case 8:return fo();case 19:return f()===32||f()===21||f()===19||f()===96||f()===119;case 11:return f()===22||f()===27;case 15:case 21:case 10:return f()===24;case 17:case 16:case 18:return f()===22||f()===24;case 20:return f()!==28;case 22:return f()===19||f()===20;case 13:return f()===32||f()===44;case 14:return f()===30&&Te(Ah);default:return!1}}function fo(){return!!(ui()||Cc(f())||f()===39)}function i1(){N.assert(pt,"Missing parsing context");for(let c=0;c<26;c++)if(pt&1<=0)}function vs(c){return c===6?U.An_enum_member_name_must_be_followed_by_a_or:void 0}function pi(){let c=Ft([],T());return c.isMissingList=!0,c}function rc(c){return!!c.isMissingList}function ca(c,m,b,w){if(H(b)){let A=Wr(c,m);return H(w),A}return pi()}function la(c,m){let b=T(),w=c?Yt(m):Lt(m);for(;je(25)&&f()!==30;)w=M(y.createQualifiedName(w,qa(c,!1)),b);return w}function o1(c,m){return M(y.createQualifiedName(c,m),c.pos)}function qa(c,m){if(t.hasPrecedingLineBreak()&&kt(f())&&Te(Js))return Jr(80,!0,U.Identifier_expected);if(f()===81){let b=X_();return m?b:Jr(80,!0,U.Identifier_expected)}return c?Yt():Lt()}function s1(c){let m=T(),b=[],w;do w=ju(c),b.push(w);while(w.literal.kind===17);return Ft(b,m)}function Ts(c){let m=T();return M(y.createTemplateExpression(ic(c),s1(c)),m)}function _1(){let c=T();return M(y.createTemplateLiteralType(ic(!1),nc()),c)}function nc(){let c=T(),m=[],b;do b=Ju(),m.push(b);while(b.literal.kind===17);return Ft(m,c)}function Ju(){let c=T();return M(y.createTemplateLiteralTypeSpan(gt(),Ru(!1)),c)}function Ru(c){return f()===20?(we(c),c1()):Hn(18,U._0_expected,nr(20))}function ju(c){let m=T();return M(y.createTemplateSpan(Le(Jt),Ru(c)),m)}function fi(){return za(f())}function ic(c){!c&&t.getTokenFlags()&26656&&we(!1);let m=za(f());return N.assert(m.kind===16,"Template head has wrong token kind"),m}function c1(){let c=za(f());return N.assert(c.kind===17||c.kind===18,"Template fragment has wrong token kind"),c}function Ss(c){let m=c===15||c===18,b=t.getTokenText();return b.substring(1,b.length-(t.isUnterminated()?0:m?1:2))}function za(c){let m=T(),b=Sl(c)?y.createTemplateLiteralLikeNode(c,t.getTokenValue(),Ss(c),t.getTokenFlags()&7176):c===9?S(t.getTokenValue(),t.getNumericLiteralFlags()):c===11?k(t.getTokenValue(),void 0,t.hasExtendedUnicodeEscape()):Ng(c)?L(c,t.getTokenValue()):N.fail();return t.hasExtendedUnicodeEscape()&&(b.hasExtendedUnicodeEscape=!0),t.isUnterminated()&&(b.isUnterminated=!0),O(),M(b,m)}function Fu(){return la(!0,U.Type_expected)}function ac(){if(!t.hasPrecedingLineBreak()&&et()===30)return ca(20,gt,30,32)}function Li(){let c=T();return M(y.createTypeReferenceNode(Fu(),ac()),c)}function oc(c){switch(c.kind){case 183:return zi(c.typeName);case 184:case 185:{let{parameters:m,type:b}=c;return rc(m)||oc(b)}case 196:return oc(c.type);default:return!1}}function l1(c){return O(),M(y.createTypePredicateNode(void 0,c,gt()),c.pos)}function Bu(){let c=T();return O(),M(y.createThisTypeNode(),c)}function u1(){let c=T();return O(),M(y.createJSDocAllType(),c)}function Uu(){let c=T();return O(),M(y.createJSDocNonNullableType(op(),!1),c)}function p1(){let c=T();return O(),f()===28||f()===20||f()===22||f()===32||f()===64||f()===52?M(y.createJSDocUnknownType(),c):M(y.createJSDocNullableType(gt(),!1),c)}function qu(){let c=T(),m=x();if(Te(df)){O();let b=Gn(36),w=Dn(59,!1);return Ae(M(y.createJSDocFunctionType(b,w),c),m)}return M(y.createTypeReferenceNode(Yt(),void 0),c)}function f1(){let c=T(),m;return(f()===110||f()===105)&&(m=Yt(),H(59)),M(y.createParameterDeclaration(void 0,void 0,m,void 0,xs(),void 0),c)}function xs(){t.setInJSDocType(!0);let c=T();if(je(144)){let w=y.createJSDocNamepathType(void 0);e:for(;;)switch(f()){case 20:case 1:case 28:case 5:break e;default:fe()}return t.setInJSDocType(!1),M(w,c)}let m=je(26),b=vc();return t.setInJSDocType(!1),m&&(b=M(y.createJSDocVariadicType(b),c)),f()===64?(O(),M(y.createJSDocOptionalType(b),c)):b}function sc(){let c=T();H(114);let m=la(!0),b=t.hasPrecedingLineBreak()?void 0:qs();return M(y.createTypeQueryNode(m,b),c)}function d1(){let c=T(),m=Xn(!1,!0),b=Lt(),w,A;je(96)&&(pa()||!Ri()?w=gt():A=Ps());let R=je(64)?gt():void 0,te=y.createTypeParameterDeclaration(m,b,w,R);return te.expression=A,M(te,c)}function Vr(){if(f()===30)return ca(19,d1,30,32)}function _c(c){return f()===26||zc()||bi(f())||f()===60||pa(!c)}function zu(c){let m=Va(U.Private_identifiers_cannot_be_used_as_parameters);return om(m)===0&&!mt(c)&&bi(f())&&O(),m}function Wu(){return An()||f()===23||f()===19}function cc(c){return lc(c)}function Vu(c){return lc(c,!1)}function lc(c,m=!0){let b=T(),w=x(),A=c?Cn(()=>Xn(!0)):zn(()=>Xn(!0));if(f()===110){let ne=y.createParameterDeclaration(A,void 0,Ni(!0),void 0,Ji(),void 0),ie=g_(A);return ie&&Lr(ie,U.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),Ae(M(ne,b),w)}let R=er;er=!1;let te=dt(26);if(!m&&!Wu())return;let le=Ae(M(y.createParameterDeclaration(A,te,zu(A),dt(58),Ji(),ji()),b),w);return er=R,le}function Dn(c,m){if(Hu(c,m))return yt(vc)}function Hu(c,m){return c===39?(H(c),!0):je(59)?!0:m&&f()===39?(Je(U._0_expected,nr(59)),O(),!0):!1}function ws(c,m){let b=En(),w=Sr();z(!!(c&1)),ee(!!(c&2));let A=c&32?Wr(17,f1):Wr(16,()=>m?cc(w):Vu(w));return z(b),ee(w),A}function Gn(c){if(!H(21))return pi();let m=ws(c,!0);return H(22),m}function Cs(){je(28)||xr()}function uc(c){let m=T(),b=x();c===180&&H(105);let w=Vr(),A=Gn(4),R=Dn(59,!0);Cs();let te=c===179?y.createCallSignature(w,A,R):y.createConstructSignature(w,A,R);return Ae(M(te,m),b)}function Gu(){return f()===23&&Te(m1)}function m1(){if(O(),f()===26||f()===24)return!0;if(bi(f())){if(O(),Et())return!0}else if(Et())O();else return!1;return f()===59||f()===28?!0:f()!==58?!1:(O(),f()===59||f()===28||f()===24)}function ua(c,m,b){let w=ca(16,()=>cc(!1),23,24),A=Ji();Cs();let R=y.createIndexSignature(b,w,A);return Ae(M(R,c),m)}function h1(c,m,b){let w=Ua(),A=dt(58),R;if(f()===21||f()===30){let te=Vr(),le=Gn(4),ne=Dn(59,!0);R=y.createMethodSignature(b,w,A,te,le,ne)}else{let te=Ji();R=y.createPropertySignature(b,w,A,te),f()===64&&(R.initializer=ji())}return Cs(),Ae(M(R,c),m)}function Xu(){if(f()===21||f()===30||f()===139||f()===153)return!0;let c=!1;for(;bi(f());)c=!0,O();return f()===23?!0:(Oi()&&(c=!0,O()),c?f()===21||f()===30||f()===58||f()===59||f()===28||ui():!1)}function pc(){if(f()===21||f()===30)return uc(179);if(f()===105&&Te(fc))return uc(180);let c=T(),m=x(),b=Xn(!1);return _a(139)?da(c,m,b,177,4):_a(153)?da(c,m,b,178,4):Gu()?ua(c,m,b):h1(c,m,b)}function fc(){return O(),f()===21||f()===30}function Es(){return O()===25}function $u(){switch(O()){case 21:case 30:case 25:return!0}return!1}function Qu(){let c=T();return M(y.createTypeLiteralNode(Yu()),c)}function Yu(){let c;return H(19)?(c=zr(4,pc),H(20)):c=pi(),c}function Ku(){return O(),f()===40||f()===41?O()===148:(f()===148&&O(),f()===23&&ys()&&O()===103)}function y1(){let c=T(),m=Yt();H(103);let b=gt();return M(y.createTypeParameterDeclaration(void 0,m,b,void 0),c)}function Zu(){let c=T();H(19);let m;(f()===148||f()===40||f()===41)&&(m=dr(),m.kind!==148&&H(148)),H(23);let b=y1(),w=je(130)?gt():void 0;H(24);let A;(f()===58||f()===40||f()===41)&&(A=dr(),A.kind!==58&&H(58));let R=Ji();xr();let te=zr(4,pc);return H(20),M(y.createMappedTypeNode(m,b,w,A,R,te),c)}function ep(){let c=T();if(je(26))return M(y.createRestTypeNode(gt()),c);let m=gt();if(v8(m)&&m.pos===m.type.pos){let b=y.createOptionalTypeNode(m.type);return Ve(b,m),b.flags=m.flags,b}return m}function dc(){return O()===59||f()===58&&O()===59}function g1(){return f()===26?kt(O())&&dc():kt(f())&&dc()}function tp(){if(Te(g1)){let c=T(),m=x(),b=dt(26),w=Yt(),A=dt(58);H(59);let R=ep(),te=y.createNamedTupleMember(b,w,A,R);return Ae(M(te,c),m)}return ep()}function b1(){let c=T();return M(y.createTupleTypeNode(ca(21,tp,23,24)),c)}function rp(){let c=T();H(21);let m=gt();return H(22),M(y.createParenthesizedType(m),c)}function v1(){let c;if(f()===128){let m=T();O();let b=M(ue(128),m);c=Ft([b],m)}return c}function mc(){let c=T(),m=x(),b=v1(),w=je(105);N.assert(!b||w,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");let A=Vr(),R=Gn(4),te=Dn(39,!1),le=w?y.createConstructorTypeNode(b,A,R,te):y.createFunctionTypeNode(A,R,te);return Ae(M(le,c),m)}function np(){let c=dr();return f()===25?void 0:c}function hc(c){let m=T();c&&O();let b=f()===112||f()===97||f()===106?dr():za(f());return c&&(b=M(y.createPrefixUnaryExpression(41,b),m)),M(y.createLiteralTypeNode(b),m)}function T1(){return O(),f()===102}function ip(){let c=T(),m=t.getTokenStart();H(19);let b=t.hasPrecedingLineBreak();H(132),H(59);let w=ma(!0);if(!H(20)){let A=wi(ct);A&&A.code===U._0_expected.code&&nl(A,Ao(sr,m,1,U.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return M(y.createImportTypeAssertionContainer(w,b),c)}function ap(){$t|=4194304;let c=T(),m=je(114);H(102),H(21);let b=gt(),w;je(28)&&(w=ip()),H(22);let A=je(25)?Fu():void 0,R=ac();return M(y.createImportTypeNode(b,w,A,R,m),c)}function yc(){return O(),f()===9||f()===10}function op(){switch(f()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return ft(np)||Li();case 67:t.reScanAsteriskEqualsToken();case 42:return u1();case 61:t.reScanQuestionToken();case 58:return p1();case 100:return qu();case 54:return Uu();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return hc();case 41:return Te(yc)?hc(!0):Li();case 116:return dr();case 110:{let c=Bu();return f()===142&&!t.hasPrecedingLineBreak()?l1(c):c}case 114:return Te(T1)?ap():sc();case 19:return Te(Ku)?Zu():Qu();case 23:return b1();case 21:return rp();case 102:return ap();case 131:return Te(Js)?dp():Li();case 16:return _1();default:return Li()}}function pa(c){switch(f()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!c;case 41:return!c&&Te(yc);case 21:return!c&&Te(S1);default:return Et()}}function S1(){return O(),f()===22||_c(!1)||pa()}function sp(){let c=T(),m=op();for(;!t.hasPrecedingLineBreak();)switch(f()){case 54:O(),m=M(y.createJSDocNonNullableType(m,!0),c);break;case 58:if(Te(ku))return m;O(),m=M(y.createJSDocNullableType(m,!0),c);break;case 23:if(H(23),pa()){let b=gt();H(24),m=M(y.createIndexedAccessTypeNode(m,b),c)}else H(24),m=M(y.createArrayTypeNode(m),c);break;default:return m}return m}function _p(c){let m=T();return H(c),M(y.createTypeOperatorNode(c,up()),m)}function cp(){if(je(96)){let c=jt(gt);if(aa()||f()!==58)return c}}function x1(){let c=T(),m=Lt(),b=ft(cp),w=y.createTypeParameterDeclaration(void 0,m,b);return M(w,c)}function lp(){let c=T();return H(140),M(y.createInferTypeNode(x1()),c)}function up(){let c=f();switch(c){case 143:case 158:case 148:return _p(c);case 140:return lp()}return yt(sp)}function pp(c){if(bc()){let m=mc(),b;return tu(m)?b=c?U.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:U.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:b=c?U.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:U.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,Lr(m,b),m}}function As(c,m,b){let w=T(),A=c===52,R=je(c),te=R&&pp(A)||m();if(f()===c||R){let le=[te];for(;je(c);)le.push(pp(A)||m());te=M(b(Ft(le,w)),w)}return te}function w1(){return As(51,up,y.createIntersectionTypeNode)}function gc(){return As(52,w1,y.createUnionTypeNode)}function C1(){return O(),f()===105}function bc(){return f()===30||f()===21&&Te(E1)?!0:f()===105||f()===128&&Te(C1)}function fp(){if(bi(f())&&Xn(!1),Et()||f()===110)return O(),!0;if(f()===23||f()===19){let c=ct.length;return Va(),c===ct.length}return!1}function E1(){return O(),!!(f()===22||f()===26||fp()&&(f()===59||f()===28||f()===58||f()===64||f()===22&&(O(),f()===39)))}function vc(){let c=T(),m=Et()&&ft(Tc),b=gt();return m?M(y.createTypePredicateNode(void 0,m,b),c):b}function Tc(){let c=Lt();if(f()===142&&!t.hasPrecedingLineBreak())return O(),c}function dp(){let c=T(),m=Hn(131),b=f()===110?Bu():Lt(),w=je(142)?gt():void 0;return M(y.createTypePredicateNode(m,b,w),c)}function gt(){if(at&81920)return xe(81920,gt);if(bc())return mc();let c=T(),m=gc();if(!aa()&&!t.hasPrecedingLineBreak()&&je(96)){let b=jt(gt);H(58);let w=yt(gt);H(59);let A=yt(gt);return M(y.createConditionalTypeNode(m,b,w,A),c)}return m}function Ji(){return je(59)?gt():void 0}function Sc(){switch(f()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return Te($u);default:return Et()}}function Ri(){if(Sc())return!0;switch(f()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return Ec()?!0:Et()}}function mp(){return f()!==19&&f()!==100&&f()!==86&&f()!==60&&Ri()}function Jt(){let c=Vn();c&&X(!1);let m=T(),b=tr(!0),w;for(;w=dt(28);)b=Ds(b,w,tr(!0),m);return c&&X(!0),b}function ji(){return je(64)?tr(!0):void 0}function tr(c){if(A1())return k1();let m=D1(c)||bp(c);if(m)return m;let b=T(),w=x(),A=ks(0);return A.kind===80&&f()===39?xc(b,A,c,w,void 0):Lo(A)&&D_(he())?Ds(A,dr(),tr(c),b):Sp(A,b,c)}function A1(){return f()===127?En()?!0:Te(zp):!1}function hp(){return O(),!t.hasPrecedingLineBreak()&&Et()}function k1(){let c=T();return O(),!t.hasPrecedingLineBreak()&&(f()===42||Ri())?M(y.createYieldExpression(dt(42),tr(!0)),c):M(y.createYieldExpression(void 0,void 0),c)}function xc(c,m,b,w,A){N.assert(f()===39,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");let R=y.createParameterDeclaration(void 0,void 0,m,void 0,void 0,void 0);M(R,m.pos);let te=Ft([R],R.pos,R.end),le=Hn(39),ne=Tp(!!A,b),ie=y.createArrowFunction(A,void 0,te,void 0,le,ne);return Ae(M(ie,c),w)}function D1(c){let m=P1();if(m!==0)return m===1?wc(!0,!0):ft(()=>gp(c))}function P1(){return f()===21||f()===30||f()===134?Te(yp):f()===39?1:0}function yp(){if(f()===134&&(O(),t.hasPrecedingLineBreak()||f()!==21&&f()!==30))return 0;let c=f(),m=O();if(c===21){if(m===22)switch(O()){case 39:case 59:case 19:return 1;default:return 0}if(m===23||m===19)return 2;if(m===26)return 1;if(bi(m)&&m!==134&&Te(ys))return O()===130?0:1;if(!Et()&&m!==110)return 0;switch(O()){case 59:return 1;case 58:return O(),f()===59||f()===28||f()===64||f()===22?1:0;case 28:case 64:case 22:return 2}return 0}else return N.assert(c===30),!Et()&&f()!==87?0:vt===1?Te(()=>{je(87);let w=O();if(w===96)switch(O()){case 64:case 32:case 44:return!1;default:return!0}else if(w===28||w===64)return!0;return!1})?1:0:2}function gp(c){let m=t.getTokenStart();if(Mr!=null&&Mr.has(m))return;let b=wc(!1,c);return b||(Mr||(Mr=new Set)).add(m),b}function bp(c){if(f()===134&&Te(vp)===1){let m=T(),b=x(),w=Hc(),A=ks(0);return xc(m,A,c,b,w)}}function vp(){if(f()===134){if(O(),t.hasPrecedingLineBreak()||f()===39)return 0;let c=ks(0);if(!t.hasPrecedingLineBreak()&&c.kind===80&&f()===39)return 1}return 0}function wc(c,m){let b=T(),w=x(),A=Hc(),R=mt(A,al)?2:0,te=Vr(),le;if(H(21)){if(c)le=ws(R,c);else{let di=ws(R,c);if(!di)return;le=di}if(!H(22)&&!c)return}else{if(!c)return;le=pi()}let ne=f()===59,ie=Dn(59,!1);if(ie&&!c&&oc(ie))return;let ve=ie;for(;(ve==null?void 0:ve.kind)===196;)ve=ve.type;let He=ve&&Om(ve);if(!c&&f()!==39&&(He||f()!==19))return;let Be=f(),Ue=Hn(39),Rt=Be===39||Be===19?Tp(mt(A,al),m):Lt();if(!m&&ne&&f()!==59)return;let Gr=y.createArrowFunction(A,te,le,ie,Ue,Rt);return Ae(M(Gr,b),w)}function Tp(c,m){if(f()===19)return go(c?2:0);if(f()!==27&&f()!==100&&f()!==86&&Bc()&&!mp())return go(16|(c?2:0));let b=er;er=!1;let w=c?Cn(()=>tr(m)):zn(()=>tr(m));return er=b,w}function Sp(c,m,b){let w=dt(58);if(!w)return c;let A;return M(y.createConditionalExpression(c,w,xe(r,()=>tr(!1)),A=Hn(59),wl(A)?tr(b):Jr(80,!1,U._0_expected,nr(59))),m)}function ks(c){let m=T(),b=Ps();return xp(c,b,m)}function Cc(c){return c===103||c===165}function xp(c,m,b){for(;;){he();let w=pl(f());if(!(f()===43?w>=c:w>c)||f()===103&&Ii())break;if(f()===130||f()===152){if(t.hasPrecedingLineBreak())break;{let R=f();O(),m=R===152?I1(m,gt()):N1(m,gt())}}else m=Ds(m,dr(),ks(w),b)}return m}function Ec(){return Ii()&&f()===103?!1:pl(f())>0}function I1(c,m){return M(y.createSatisfiesExpression(c,m),c.pos)}function Ds(c,m,b,w){return M(y.createBinaryExpression(c,m,b),w)}function N1(c,m){return M(y.createAsExpression(c,m),c.pos)}function Ac(){let c=T();return M(y.createPrefixUnaryExpression(f(),Q(Fi)),c)}function O1(){let c=T();return M(y.createDeleteExpression(Q(Fi)),c)}function wp(){let c=T();return M(y.createTypeOfExpression(Q(Fi)),c)}function M1(){let c=T();return M(y.createVoidExpression(Q(Fi)),c)}function Cp(){return f()===135?Sr()?!0:Te(zp):!1}function L1(){let c=T();return M(y.createAwaitExpression(Q(Fi)),c)}function Ps(){if(kc()){let b=T(),w=Dc();return f()===43?xp(pl(f()),w,b):w}let c=f(),m=Fi();if(f()===43){let b=Nt(St,m.pos),{end:w}=m;m.kind===216?Mt(b,w,U.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(N.assert(Jf(c)),Mt(b,w,U.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,nr(c)))}return m}function Fi(){switch(f()){case 40:case 41:case 55:case 54:return Ac();case 91:return O1();case 114:return wp();case 116:return M1();case 30:return vt===1?fa(!0,void 0,void 0,!0):W1();case 135:if(Cp())return L1();default:return Dc()}}function kc(){switch(f()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(vt!==1)return!1;default:return!0}}function Dc(){if(f()===46||f()===47){let m=T();return M(y.createPrefixUnaryExpression(f(),Q(Is)),m)}else if(vt===1&&f()===30&&Te(Y_))return fa(!0);let c=Is();if(N.assert(Lo(c)),(f()===46||f()===47)&&!t.hasPrecedingLineBreak()){let m=f();return O(),M(y.createPostfixUnaryExpression(c,m),c.pos)}return c}function Is(){let c=T(),m;return f()===102?Te(fc)?($t|=4194304,m=dr()):Te(Es)?(O(),O(),m=M(y.createMetaProperty(102,Yt()),c),$t|=8388608):m=Ns():m=f()===108?J1():Ns(),Ip(c,m)}function Ns(){let c=T(),m=Op();return ho(c,m,!0)}function J1(){let c=T(),m=dr();if(f()===30){let b=T(),w=ft(Mc);w!==void 0&&(Mt(b,T(),U.super_may_not_use_type_arguments),Os()||(m=y.createExpressionWithTypeArguments(m,w)))}return f()===21||f()===25||f()===23?m:(Hn(25,U.super_must_be_followed_by_an_argument_list_or_member_access),M(ae(m,qa(!0,!0)),c))}function fa(c,m,b,w=!1){let A=T(),R=B1(c),te;if(R.kind===286){let le=Pc(R),ne,ie=le[le.length-1];if((ie==null?void 0:ie.kind)===284&&!Ti(ie.openingElement.tagName,ie.closingElement.tagName)&&Ti(R.tagName,ie.closingElement.tagName)){let ve=ie.children.end,He=M(y.createJsxElement(ie.openingElement,ie.children,M(y.createJsxClosingElement(M(G(""),ve,ve)),ve,ve)),ie.openingElement.pos,ve);le=Ft([...le.slice(0,le.length-1),He],le.pos,ve),ne=ie.closingElement}else ne=z1(R,c),Ti(R.tagName,ne.tagName)||(b&&Oo(b)&&Ti(ne.tagName,b.tagName)?Lr(R.tagName,U.JSX_element_0_has_no_corresponding_closing_tag,t_(St,R.tagName)):Lr(ne.tagName,U.Expected_corresponding_JSX_closing_tag_for_0,t_(St,R.tagName)));te=M(y.createJsxElement(R,le,ne),A)}else R.kind===289?te=M(y.createJsxFragment(R,Pc(R),Dp(c)),A):(N.assert(R.kind===285),te=R);if(!w&&c&&f()===30){let le=typeof m>"u"?te.pos:m,ne=ft(()=>fa(!0,le));if(ne){let ie=Jr(28,!1);return Cd(ie,ne.pos,0),Mt(Nt(St,le),ne.end,U.JSX_expressions_must_have_one_parent_element),M(y.createBinaryExpression(te,ie,ne),A)}}return te}function R1(){let c=T(),m=y.createJsxText(t.getTokenValue(),ht===13);return ht=t.scanJsxToken(),M(m,c)}function j1(c,m){switch(m){case 1:if(k6(c))Lr(c,U.JSX_fragment_has_no_corresponding_closing_tag);else{let b=c.tagName,w=Math.min(Nt(St,b.pos),b.end);Mt(w,b.end,U.JSX_element_0_has_no_corresponding_closing_tag,t_(St,c.tagName))}return;case 31:case 7:return;case 12:case 13:return R1();case 19:return Ep(!1);case 30:return fa(!1,void 0,c);default:return N.assertNever(m)}}function Pc(c){let m=[],b=T(),w=pt;for(pt|=16384;;){let A=j1(c,ht=t.reScanJsxToken());if(!A||(m.push(A),Oo(c)&&(A==null?void 0:A.kind)===284&&!Ti(A.openingElement.tagName,A.closingElement.tagName)&&Ti(c.tagName,A.closingElement.tagName)))break}return pt=w,Ft(m,b)}function F1(){let c=T();return M(y.createJsxAttributes(zr(13,U1)),c)}function B1(c){let m=T();if(H(30),f()===32)return It(),M(y.createJsxOpeningFragment(),m);let b=Ic(),w=at&524288?void 0:qs(),A=F1(),R;return f()===32?(It(),R=y.createJsxOpeningElement(b,w,A)):(H(44),H(32,void 0,!1)&&(c?O():It()),R=y.createJsxSelfClosingElement(b,w,A)),M(R,m)}function Ic(){let c=T(),m=Nc();if(U_(m))return m;let b=m;for(;je(25);)b=M(ae(b,qa(!0,!1)),c);return b}function Nc(){let c=T();Ke();let m=f()===110,b=Yt();return je(59)?(Ke(),M(y.createJsxNamespacedName(b,Yt()),c)):m?M(y.createToken(110),c):b}function Ep(c){let m=T();if(!H(19))return;let b,w;return f()!==20&&(b=dt(26),w=Jt()),c?H(20):H(20,void 0,!1)&&It(),M(y.createJsxExpression(b,w),m)}function U1(){if(f()===19)return kp();let c=T();return M(y.createJsxAttribute(q1(),Ap()),c)}function Ap(){if(f()===64){if(qt()===11)return fi();if(f()===19)return Ep(!0);if(f()===30)return fa(!0);Je(U.or_JSX_element_expected)}}function q1(){let c=T();Ke();let m=Yt();return je(59)?(Ke(),M(y.createJsxNamespacedName(m,Yt()),c)):m}function kp(){let c=T();H(19),H(26);let m=Jt();return H(20),M(y.createJsxSpreadAttribute(m),c)}function z1(c,m){let b=T();H(31);let w=Ic();return H(32,void 0,!1)&&(m||!Ti(c.tagName,w)?O():It()),M(y.createJsxClosingElement(w),b)}function Dp(c){let m=T();return H(31),H(32,U.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(c?O():It()),M(y.createJsxJsxClosingFragment(),m)}function W1(){N.assert(vt!==1,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");let c=T();H(30);let m=gt();H(32);let b=Fi();return M(y.createTypeAssertion(m,b),c)}function Pp(){return O(),kt(f())||f()===23||Os()}function V1(){return f()===29&&Te(Pp)}function Hr(c){if(c.flags&64)return!0;if(jo(c)){let m=c.expression;for(;jo(m)&&!(m.flags&64);)m=m.expression;if(m.flags&64){for(;jo(c);)c.flags|=64,c=c.expression;return!0}}return!1}function Bi(c,m,b){let w=qa(!0,!0),A=b||Hr(m),R=A?Ce(m,b,w):ae(m,w);if(A&&jr(R.name)&&Lr(R.name,U.An_optional_chain_cannot_contain_private_identifiers),g6(m)&&m.typeArguments){let te=m.typeArguments.pos-1,le=Nt(St,m.typeArguments.end)+1;Mt(te,le,U.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return M(R,c)}function mo(c,m,b){let w;if(f()===24)w=Jr(80,!0,U.An_element_access_expression_should_take_an_argument);else{let R=Le(Jt);Qi(R)&&(R.text=sa(R.text)),w=R}H(24);let A=b||Hr(m)?qe(m,b,w):Ze(m,w);return M(A,c)}function ho(c,m,b){for(;;){let w,A=!1;if(b&&V1()?(w=Hn(29),A=kt(f())):A=je(25),A){m=Bi(c,m,w);continue}if((w||!Vn())&&je(23)){m=mo(c,m,w);continue}if(Os()){m=!w&&m.kind===233?Ms(c,m.expression,w,m.typeArguments):Ms(c,m,w,void 0);continue}if(!w){if(f()===54&&!t.hasPrecedingLineBreak()){O(),m=M(y.createNonNullExpression(m),c);continue}let R=ft(Mc);if(R){m=M(y.createExpressionWithTypeArguments(m,R),c);continue}}return m}}function Os(){return f()===15||f()===16}function Ms(c,m,b,w){let A=y.createTaggedTemplateExpression(m,w,f()===15?(we(!0),fi()):Ts(!0));return(b||m.flags&64)&&(A.flags|=64),A.questionDotToken=b,M(A,c)}function Ip(c,m){for(;;){m=ho(c,m,!0);let b,w=dt(29);if(w&&(b=ft(Mc),Os())){m=Ms(c,m,w,b);continue}if(b||f()===21){!w&&m.kind===233&&(b=m.typeArguments,m=m.expression);let A=Oc(),R=w||Hr(m)?it(m,w,b,A):rt(m,b,A);m=M(R,c);continue}if(w){let A=Jr(80,!1,U.Identifier_expected);m=M(Ce(m,w,A),c)}break}return m}function Oc(){H(21);let c=Wr(11,G1);return H(22),c}function Mc(){if(at&524288||et()!==30)return;O();let c=Wr(20,gt);if(he()===32)return O(),c&&Np()?c:void 0}function Np(){switch(f()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return t.hasPrecedingLineBreak()||Ec()||!Ri()}function Op(){switch(f()){case 15:t.getTokenFlags()&26656&&we(!1);case 9:case 10:case 11:return fi();case 110:case 108:case 106:case 112:case 97:return dr();case 21:return Mp();case 23:return Jc();case 19:return Ls();case 134:if(!Te(Fc))break;return Rc();case 60:return gh();case 86:return sf();case 100:return Rc();case 105:return Lp();case 44:case 69:if(Re()===14)return fi();break;case 16:return Ts(!1);case 81:return X_()}return Lt(U.Expression_expected)}function Mp(){let c=T(),m=x();H(21);let b=Le(Jt);return H(22),Ae(M(ar(b),c),m)}function H1(){let c=T();H(26);let m=tr(!0);return M(y.createSpreadElement(m),c)}function Lc(){return f()===26?H1():f()===28?M(y.createOmittedExpression(),T()):tr(!0)}function G1(){return xe(r,Lc)}function Jc(){let c=T(),m=t.getTokenStart(),b=H(23),w=t.hasPrecedingLineBreak(),A=Wr(15,Lc);return kn(23,24,b,m),M(Y(A,w),c)}function X1(){let c=T(),m=x();if(dt(26)){let ve=tr(!0);return Ae(M(y.createSpreadAssignment(ve),c),m)}let b=Xn(!0);if(_a(139))return da(c,m,b,177,0);if(_a(153))return da(c,m,b,178,0);let w=dt(42),A=Et(),R=Ua(),te=dt(58),le=dt(54);if(w||f()===21||f()===30)return Wc(c,m,b,w,R,te,le);let ne;if(A&&f()!==59){let ve=dt(64),He=ve?Le(()=>tr(!0)):void 0;ne=y.createShorthandPropertyAssignment(R,He),ne.equalsToken=ve}else{H(59);let ve=Le(()=>tr(!0));ne=y.createPropertyAssignment(R,ve)}return ne.modifiers=b,ne.questionToken=te,ne.exclamationToken=le,Ae(M(ne,c),m)}function Ls(){let c=T(),m=t.getTokenStart(),b=H(19),w=t.hasPrecedingLineBreak(),A=Wr(12,X1,!0);return kn(19,20,b,m),M(B(A,w),c)}function Rc(){let c=Vn();X(!1);let m=T(),b=x(),w=Xn(!1);H(100);let A=dt(42),R=A?1:0,te=mt(w,al)?2:0,le=R&&te?Pi(yo):R?qr(yo):te?Cn(yo):yo(),ne=Vr(),ie=Gn(R|te),ve=Dn(59,!1),He=go(R|te);X(c);let Be=y.createFunctionExpression(w,A,le,ne,ie,ve,He);return Ae(M(Be,m),b)}function yo(){return An()?G_():void 0}function Lp(){let c=T();if(H(105),je(25)){let R=Yt();return M(y.createMetaProperty(105,R),c)}let m=T(),b=ho(m,Op(),!1),w;b.kind===233&&(w=b.typeArguments,b=b.expression),f()===29&&Je(U.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,t_(St,b));let A=f()===21?Oc():void 0;return M(Ir(b,w,A),c)}function Wa(c,m){let b=T(),w=x(),A=t.getTokenStart(),R=H(19,m);if(R||c){let te=t.hasPrecedingLineBreak(),le=zr(1,wr);kn(19,20,R,A);let ne=Ae(M(ci(le,te),b),w);return f()===64&&(Je(U.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),O()),ne}else{let te=pi();return Ae(M(ci(te,void 0),b),w)}}function go(c,m){let b=En();z(!!(c&1));let w=Sr();ee(!!(c&2));let A=er;er=!1;let R=Vn();R&&X(!1);let te=Wa(!!(c&16),m);return R&&X(!0),er=A,z(b),ee(w),te}function $1(){let c=T(),m=x();return H(27),Ae(M(y.createEmptyStatement(),c),m)}function Jp(){let c=T(),m=x();H(101);let b=t.getTokenStart(),w=H(21),A=Le(Jt);kn(21,22,w,b);let R=wr(),te=je(93)?wr():void 0;return Ae(M(Ge(A,R,te),c),m)}function Q1(){let c=T(),m=x();H(92);let b=wr();H(117);let w=t.getTokenStart(),A=H(21),R=Le(Jt);return kn(21,22,A,w),je(27),Ae(M(y.createDoStatement(b,R),c),m)}function Rp(){let c=T(),m=x();H(117);let b=t.getTokenStart(),w=H(21),A=Le(Jt);kn(21,22,w,b);let R=wr();return Ae(M(Gt(A,R),c),m)}function Y1(){let c=T(),m=x();H(99);let b=dt(135);H(21);let w;f()!==27&&(f()===115||f()===121||f()===87||f()===160&&Te(sh)||f()===135&&Te(Fs)?w=ef(!0):w=lt(Jt));let A;if(b?H(165):je(165)){let R=Le(()=>tr(!0));H(22),A=Xt(b,w,R,wr())}else if(je(103)){let R=Le(Jt);H(22),A=y.createForInStatement(w,R,wr())}else{H(27);let R=f()!==27&&f()!==22?Le(Jt):void 0;H(27);let te=f()!==22?Le(Jt):void 0;H(22),A=Ur(w,R,te,wr())}return Ae(M(A,c),m)}function jc(c){let m=T(),b=x();H(c===252?83:88);let w=ui()?void 0:Lt();xr();let A=c===252?y.createBreakStatement(w):y.createContinueStatement(w);return Ae(M(A,m),b)}function K1(){let c=T(),m=x();H(107);let b=ui()?void 0:Le(Jt);return xr(),Ae(M(y.createReturnStatement(b),c),m)}function Z1(){let c=T(),m=x();H(118);let b=t.getTokenStart(),w=H(21),A=Le(Jt);kn(21,22,w,b);let R=ke(67108864,wr);return Ae(M(y.createWithStatement(A,R),c),m)}function jp(){let c=T(),m=x();H(84);let b=Le(Jt);H(59);let w=zr(3,wr);return Ae(M(y.createCaseClause(b,w),c),m)}function eh(){let c=T();H(90),H(59);let m=zr(3,wr);return M(y.createDefaultClause(m),c)}function Fp(){return f()===84?jp():eh()}function th(){let c=T();H(19);let m=zr(2,Fp);return H(20),M(y.createCaseBlock(m),c)}function Bp(){let c=T(),m=x();H(109),H(21);let b=Le(Jt);H(22);let w=th();return Ae(M(y.createSwitchStatement(b,w),c),m)}function rh(){let c=T(),m=x();H(111);let b=t.hasPrecedingLineBreak()?void 0:Le(Jt);return b===void 0&&(Or++,b=M(G(""),T())),fs()||Ie(b),Ae(M(y.createThrowStatement(b),c),m)}function Up(){let c=T(),m=x();H(113);let b=Wa(!1),w=f()===85?nh():void 0,A;return(!w||f()===98)&&(H(98,U.catch_or_finally_expected),A=Wa(!1)),Ae(M(y.createTryStatement(b,w,A),c),m)}function nh(){let c=T();H(85);let m;je(21)?(m=Bs(),H(22)):m=void 0;let b=Wa(!1);return M(y.createCatchClause(m,b),c)}function qp(){let c=T(),m=x();return H(89),xr(),Ae(M(y.createDebuggerStatement(),c),m)}function ih(){let c=T(),m=x(),b,w=f()===21,A=Le(Jt);return Ee(A)&&je(59)?b=y.createLabeledStatement(A,wr()):(fs()||Ie(A),b=Nr(A),w&&(m=!1)),Ae(M(b,c),m)}function Js(){return O(),kt(f())&&!t.hasPrecedingLineBreak()}function ah(){return O(),f()===86&&!t.hasPrecedingLineBreak()}function Fc(){return O(),f()===100&&!t.hasPrecedingLineBreak()}function zp(){return O(),(kt(f())||f()===9||f()===10||f()===11)&&!t.hasPrecedingLineBreak()}function Wp(){for(;;)switch(f()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return Hp();case 135:return Uc();case 120:case 156:return hp();case 144:case 145:return _h();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:let c=f();if(O(),t.hasPrecedingLineBreak())return!1;if(c===138&&f()===156)return!0;continue;case 162:return O(),f()===19||f()===80||f()===95;case 102:return O(),f()===11||f()===42||f()===19||kt(f());case 95:let m=O();if(m===156&&(m=Te(O)),m===64||m===42||m===19||m===90||m===130||m===60)return!0;continue;case 126:O();continue;default:return!1}}function Rs(){return Te(Wp)}function Bc(){switch(f()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:return!0;case 102:return Rs()||Te($u);case 87:case 95:return Rs();case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 129:case 125:case 123:case 124:case 126:case 148:return Rs()||!Te(Js);default:return Ri()}}function oh(){return O(),An()||f()===19||f()===23}function Vp(){return Te(oh)}function sh(){return js(!0)}function js(c){return O(),c&&f()===165?!1:(An()||f()===19)&&!t.hasPrecedingLineBreak()}function Hp(){return Te(js)}function Fs(){return Gp(!0)}function Gp(c){return O()===160?js(c):!1}function Uc(){return Te(Gp)}function wr(){switch(f()){case 27:return $1();case 19:return Wa(!1);case 115:return vo(T(),x(),void 0);case 121:if(Vp())return vo(T(),x(),void 0);break;case 135:if(Uc())return vo(T(),x(),void 0);break;case 160:if(Hp())return vo(T(),x(),void 0);break;case 100:return Us(T(),x(),void 0);case 86:return _f(T(),x(),void 0);case 101:return Jp();case 92:return Q1();case 117:return Rp();case 99:return Y1();case 88:return jc(251);case 83:return jc(252);case 107:return K1();case 118:return Z1();case 109:return Bp();case 111:return rh();case 113:case 85:case 98:return Up();case 89:return qp();case 60:return Xp();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(Rs())return Xp();break}return ih()}function qc(c){return c.kind===138}function Xp(){let c=T(),m=x(),b=Xn(!0);if(mt(b,qc)){let A=$p(c);if(A)return A;for(let R of b)R.flags|=33554432;return ke(33554432,()=>Qp(c,m,b))}else return Qp(c,m,b)}function $p(c){return ke(33554432,()=>{let m=bs(pt,c);if(m)return Du(m)})}function Qp(c,m,b){switch(f()){case 115:case 121:case 87:case 160:case 135:return vo(c,m,b);case 100:return Us(c,m,b);case 86:return _f(c,m,b);case 120:return xh(c,m,b);case 156:return uf(c,m,b);case 94:return wh(c,m,b);case 162:case 144:case 145:return Ch(c,m,b);case 102:return kh(c,m,b);case 95:switch(O(),f()){case 90:case 64:return Bh(c,m,b);case 130:return Qc(c,m,b);default:return Fh(c,m,b)}default:if(b){let w=Jr(282,!0,U.Declaration_expected);return wd(w,c),w.modifiers=b,w}return}}function Yp(){return O()===11}function _h(){return O(),!t.hasPrecedingLineBreak()&&(Et()||f()===11)}function bo(c,m){if(f()!==19){if(c&4){Cs();return}if(ui()){xr();return}}return go(c,m)}function ch(){let c=T();if(f()===28)return M(y.createOmittedExpression(),c);let m=dt(26),b=Va(),w=ji();return M(y.createBindingElement(m,void 0,b,w),c)}function Kp(){let c=T(),m=dt(26),b=An(),w=Ua(),A;b&&f()!==59?(A=w,w=void 0):(H(59),A=Va());let R=ji();return M(y.createBindingElement(m,w,A,R),c)}function lh(){let c=T();H(19);let m=Le(()=>Wr(9,Kp));return H(20),M(y.createObjectBindingPattern(m),c)}function Zp(){let c=T();H(23);let m=Le(()=>Wr(10,ch));return H(24),M(y.createArrayBindingPattern(m),c)}function zc(){return f()===19||f()===23||f()===81||An()}function Va(c){return f()===23?Zp():f()===19?lh():G_(c)}function uh(){return Bs(!0)}function Bs(c){let m=T(),b=x(),w=Va(U.Private_identifiers_are_not_allowed_in_variable_declarations),A;c&&w.kind===80&&f()===54&&!t.hasPrecedingLineBreak()&&(A=dr());let R=Ji(),te=Cc(f())?void 0:ji(),le=Tn(w,A,R,te);return Ae(M(le,m),b)}function ef(c){let m=T(),b=0;switch(f()){case 115:break;case 121:b|=1;break;case 87:b|=2;break;case 160:b|=4;break;case 135:N.assert(Uc()),b|=6,O();break;default:N.fail()}O();let w;if(f()===165&&Te(tf))w=pi();else{let A=Ii();nt(c),w=Wr(8,c?Bs:uh),nt(A)}return M(Sn(w,b),m)}function tf(){return ys()&&O()===22}function vo(c,m,b){let w=ef(!1);xr();let A=or(b,w);return Ae(M(A,c),m)}function Us(c,m,b){let w=Sr(),A=ln(b);H(100);let R=dt(42),te=A&1024?yo():G_(),le=R?1:0,ne=A&512?2:0,ie=Vr();A&1&&ee(!0);let ve=Gn(le|ne),He=Dn(59,!1),Be=bo(le|ne,U.or_expected);ee(w);let Ue=y.createFunctionDeclaration(b,R,te,ie,ve,He,Be);return Ae(M(Ue,c),m)}function ph(){if(f()===137)return H(137);if(f()===11&&Te(O)===21)return ft(()=>{let c=fi();return c.text==="constructor"?c:void 0})}function fh(c,m,b){return ft(()=>{if(ph()){let w=Vr(),A=Gn(0),R=Dn(59,!1),te=bo(0,U.or_expected),le=y.createConstructorDeclaration(b,A,te);return le.typeParameters=w,le.type=R,Ae(M(le,c),m)}})}function Wc(c,m,b,w,A,R,te,le){let ne=w?1:0,ie=mt(b,al)?2:0,ve=Vr(),He=Gn(ne|ie),Be=Dn(59,!1),Ue=bo(ne|ie,le),Rt=y.createMethodDeclaration(b,w,A,R,ve,He,Be,Ue);return Rt.exclamationToken=te,Ae(M(Rt,c),m)}function rf(c,m,b,w,A){let R=!A&&!t.hasPrecedingLineBreak()?dt(54):void 0,te=Ji(),le=xe(90112,ji);an(w,te,le);let ne=y.createPropertyDeclaration(b,w,A||R,te,le);return Ae(M(ne,c),m)}function nf(c,m,b){let w=dt(42),A=Ua(),R=dt(58);return w||f()===21||f()===30?Wc(c,m,b,w,A,R,void 0,U.or_expected):rf(c,m,b,A,R)}function da(c,m,b,w,A){let R=Ua(),te=Vr(),le=Gn(0),ne=Dn(59,!1),ie=bo(A),ve=w===177?y.createGetAccessorDeclaration(b,R,le,ne,ie):y.createSetAccessorDeclaration(b,R,le,ie);return ve.typeParameters=te,Qo(ve)&&(ve.type=ne),Ae(M(ve,c),m)}function dh(){let c;if(f()===60)return!0;for(;bi(f());){if(c=f(),s3(c))return!0;O()}if(f()===42||(Oi()&&(c=f(),O()),f()===23))return!0;if(c!==void 0){if(!Si(c)||c===153||c===139)return!0;switch(f()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return ui()}}return!1}function af(c,m,b){Hn(126);let w=mh(),A=Ae(M(y.createClassStaticBlockDeclaration(w),c),m);return A.modifiers=b,A}function mh(){let c=En(),m=Sr();z(!1),ee(!0);let b=Wa(!1);return z(c),ee(m),b}function hh(){if(Sr()&&f()===135){let c=T(),m=Lt(U.Expression_expected);O();let b=ho(c,m,!0);return Ip(c,b)}return Is()}function Vc(){let c=T();if(!je(60))return;let m=na(hh);return M(y.createDecorator(m),c)}function of(c,m,b){let w=T(),A=f();if(f()===87&&m){if(!ft(xu))return}else{if(b&&f()===126&&Te(mf))return;if(c&&f()===126)return;if(!n1())return}return M(ue(A),w)}function Xn(c,m,b){let w=T(),A,R,te,le=!1,ne=!1,ie=!1;if(c&&f()===60)for(;R=Vc();)A=xt(A,R);for(;te=of(le,m,b);)te.kind===126&&(le=!0),A=xt(A,te),ne=!0;if(ne&&c&&f()===60)for(;R=Vc();)A=xt(A,R),ie=!0;if(ie)for(;te=of(le,m,b);)te.kind===126&&(le=!0),A=xt(A,te);return A&&Ft(A,w)}function Hc(){let c;if(f()===134){let m=T();O();let b=M(ue(134),m);c=Ft([b],m)}return c}function yh(){let c=T(),m=x();if(f()===27)return O(),Ae(M(y.createSemicolonClassElement(),c),m);let b=Xn(!0,!0,!0);if(f()===126&&Te(mf))return af(c,m,b);if(_a(139))return da(c,m,b,177,0);if(_a(153))return da(c,m,b,178,0);if(f()===137||f()===11){let w=fh(c,m,b);if(w)return w}if(Gu())return ua(c,m,b);if(kt(f())||f()===11||f()===9||f()===42||f()===23)if(mt(b,qc)){for(let A of b)A.flags|=33554432;return ke(33554432,()=>nf(c,m,b))}else return nf(c,m,b);if(b){let w=Jr(80,!0,U.Declaration_expected);return rf(c,m,b,w,void 0)}return N.fail("Should not have attempted to parse class member declaration.")}function gh(){let c=T(),m=x(),b=Xn(!0);if(f()===86)return Gc(c,m,b,231);let w=Jr(282,!0,U.Expression_expected);return wd(w,c),w.modifiers=b,w}function sf(){return Gc(T(),x(),void 0,231)}function _f(c,m,b){return Gc(c,m,b,263)}function Gc(c,m,b,w){let A=Sr();H(86);let R=Xc(),te=Vr();mt(b,qx)&&ee(!0);let le=cf(),ne;H(19)?(ne=Sh(),H(20)):ne=pi(),ee(A);let ie=w===263?y.createClassDeclaration(b,R,te,le,ne):y.createClassExpression(b,R,te,le,ne);return Ae(M(ie,c),m)}function Xc(){return An()&&!bh()?Ni(An()):void 0}function bh(){return f()===119&&Te(Cu)}function cf(){if(lf())return zr(22,vh)}function vh(){let c=T(),m=f();N.assert(m===96||m===119),O();let b=Wr(7,Th);return M(y.createHeritageClause(m,b),c)}function Th(){let c=T(),m=Is();if(m.kind===233)return m;let b=qs();return M(y.createExpressionWithTypeArguments(m,b),c)}function qs(){return f()===30?ca(20,gt,30,32):void 0}function lf(){return f()===96||f()===119}function Sh(){return zr(5,yh)}function xh(c,m,b){H(120);let w=Lt(),A=Vr(),R=cf(),te=Yu(),le=y.createInterfaceDeclaration(b,w,A,R,te);return Ae(M(le,c),m)}function uf(c,m,b){H(156),t.hasPrecedingLineBreak()&&Je(U.Line_break_not_permitted_here);let w=Lt(),A=Vr();H(64);let R=f()===141&&ft(np)||gt();xr();let te=y.createTypeAliasDeclaration(b,w,A,R);return Ae(M(te,c),m)}function pf(){let c=T(),m=x(),b=Ua(),w=Le(ji);return Ae(M(y.createEnumMember(b,w),c),m)}function wh(c,m,b){H(94);let w=Lt(),A;H(19)?(A=ia(()=>Wr(6,pf)),H(20)):A=pi();let R=y.createEnumDeclaration(b,w,A);return Ae(M(R,c),m)}function zs(){let c=T(),m;return H(19)?(m=zr(1,wr),H(20)):m=pi(),M(y.createModuleBlock(m),c)}function ff(c,m,b,w){let A=w&32,R=Lt(),te=je(25)?ff(T(),!1,void 0,8|A):zs(),le=y.createModuleDeclaration(b,R,te,w);return Ae(M(le,c),m)}function $c(c,m,b){let w=0,A;f()===162?(A=Lt(),w|=2048):(A=fi(),A.text=sa(A.text));let R;f()===19?R=zs():xr();let te=y.createModuleDeclaration(b,A,R,w);return Ae(M(te,c),m)}function Ch(c,m,b){let w=0;if(f()===162)return $c(c,m,b);if(je(145))w|=32;else if(H(144),f()===11)return $c(c,m,b);return ff(c,m,b,w)}function Eh(){return f()===149&&Te(df)}function df(){return O()===21}function mf(){return O()===19}function Ah(){return O()===44}function Qc(c,m,b){H(130),H(145);let w=Lt();xr();let A=y.createNamespaceExportDeclaration(w);return A.modifiers=b,Ae(M(A,c),m)}function kh(c,m,b){H(102);let w=t.getTokenFullStart(),A;Et()&&(A=Lt());let R=!1;if(f()!==161&&(A==null?void 0:A.escapedText)==="type"&&(Et()||Ph())&&(R=!0,A=Et()?Lt():void 0),A&&!Ih())return Nh(c,m,b,A,R);let te;(A||f()===42||f()===19)&&(te=Oh(A,w,R),H(161));let le=Ws(),ne;f()===132&&!t.hasPrecedingLineBreak()&&(ne=ma()),xr();let ie=y.createImportDeclaration(b,te,le,ne);return Ae(M(ie,c),m)}function Dh(){let c=T(),m=kt(f())?Yt():za(11);H(59);let b=tr(!0);return M(y.createAssertEntry(m,b),c)}function ma(c){let m=T();c||H(132);let b=t.getTokenStart();if(H(19)){let w=t.hasPrecedingLineBreak(),A=Wr(24,Dh,!0);if(!H(20)){let R=wi(ct);R&&R.code===U._0_expected.code&&nl(R,Ao(sr,b,1,U.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return M(y.createAssertClause(A,w),m)}else{let w=Ft([],T(),void 0,!1);return M(y.createAssertClause(w,!1),m)}}function Ph(){return f()===42||f()===19}function Ih(){return f()===28||f()===161}function Nh(c,m,b,w,A){H(64);let R=ha();xr();let te=y.createImportEqualsDeclaration(b,A,w,R);return Ae(M(te,c),m)}function Oh(c,m,b){let w;return(!c||je(28))&&(w=f()===42?Lh():Ha(275)),M(y.createImportClause(b,c,w),m)}function ha(){return Eh()?Mh():la(!1)}function Mh(){let c=T();H(149),H(21);let m=Ws();return H(22),M(y.createExternalModuleReference(m),c)}function Ws(){if(f()===11){let c=fi();return c.text=sa(c.text),c}else return Jt()}function Lh(){let c=T();H(42),H(130);let m=Lt();return M(y.createNamespaceImport(m),c)}function Ha(c){let m=T(),b=c===275?y.createNamedImports(ca(23,Rh,19,20)):y.createNamedExports(ca(23,Jh,19,20));return M(b,m)}function Jh(){let c=x();return Ae(hf(281),c)}function Rh(){return hf(276)}function hf(c){let m=T(),b=Si(f())&&!Et(),w=t.getTokenStart(),A=t.getTokenEnd(),R=!1,te,le=!0,ne=Yt();if(ne.escapedText==="type")if(f()===130){let He=Yt();if(f()===130){let Be=Yt();kt(f())?(R=!0,te=He,ne=ve(),le=!1):(te=ne,ne=Be,le=!1)}else kt(f())?(te=ne,le=!1,ne=ve()):(R=!0,ne=He)}else kt(f())&&(R=!0,ne=ve());le&&f()===130&&(te=ne,H(130),ne=ve()),c===276&&b&&Mt(w,A,U.Identifier_expected);let ie=c===276?y.createImportSpecifier(R,te,ne):y.createExportSpecifier(R,te,ne);return M(ie,m);function ve(){return b=Si(f())&&!Et(),w=t.getTokenStart(),A=t.getTokenEnd(),Yt()}}function jh(c){return M(y.createNamespaceExport(Yt()),c)}function Fh(c,m,b){let w=Sr();ee(!0);let A,R,te,le=je(156),ne=T();je(42)?(je(130)&&(A=jh(ne)),H(161),R=Ws()):(A=Ha(279),(f()===161||f()===11&&!t.hasPrecedingLineBreak())&&(H(161),R=Ws())),R&&f()===132&&!t.hasPrecedingLineBreak()&&(te=ma()),xr(),ee(w);let ie=y.createExportDeclaration(b,le,A,R,te);return Ae(M(ie,c),m)}function Bh(c,m,b){let w=Sr();ee(!0);let A;je(64)?A=!0:H(90);let R=tr(!0);xr(),ee(w);let te=y.createExportAssignment(b,A,R);return Ae(M(te,c),m)}let ya;(c=>{c[c.SourceElements=0]="SourceElements",c[c.BlockStatements=1]="BlockStatements",c[c.SwitchClauses=2]="SwitchClauses",c[c.SwitchClauseStatements=3]="SwitchClauseStatements",c[c.TypeMembers=4]="TypeMembers",c[c.ClassMembers=5]="ClassMembers",c[c.EnumMembers=6]="EnumMembers",c[c.HeritageClauseElement=7]="HeritageClauseElement",c[c.VariableDeclarations=8]="VariableDeclarations",c[c.ObjectBindingElements=9]="ObjectBindingElements",c[c.ArrayBindingElements=10]="ArrayBindingElements",c[c.ArgumentExpressions=11]="ArgumentExpressions",c[c.ObjectLiteralMembers=12]="ObjectLiteralMembers",c[c.JsxAttributes=13]="JsxAttributes",c[c.JsxChildren=14]="JsxChildren",c[c.ArrayLiteralMembers=15]="ArrayLiteralMembers",c[c.Parameters=16]="Parameters",c[c.JSDocParameters=17]="JSDocParameters",c[c.RestProperties=18]="RestProperties",c[c.TypeParameters=19]="TypeParameters",c[c.TypeArguments=20]="TypeArguments",c[c.TupleElementTypes=21]="TupleElementTypes",c[c.HeritageClauses=22]="HeritageClauses",c[c.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",c[c.AssertEntries=24]="AssertEntries",c[c.JSDocComment=25]="JSDocComment",c[c.Count=26]="Count"})(ya||(ya={}));let yf;(c=>{c[c.False=0]="False",c[c.True=1]="True",c[c.Unknown=2]="Unknown"})(yf||(yf={}));let gf;(c=>{function m(ie,ve,He){rn("file.js",ie,99,void 0,1),t.setText(ie,ve,He),ht=t.scan();let Be=b(),Ue=ge("file.js",99,1,!1,[],ue(1),0,Rn),Rt=$a(ct,Ue);return Ut&&(Ue.jsDocDiagnostics=$a(Ut,Ue)),nn(),Be?{jsDocTypeExpression:Be,diagnostics:Rt}:void 0}c.parseJSDocTypeExpressionForTests=m;function b(ie){let ve=T(),He=(ie?je:H)(19),Be=ke(16777216,xs);(!ie||He)&&Ba(20);let Ue=y.createJSDocTypeExpression(Be);return oe(Ue),M(Ue,ve)}c.parseJSDocTypeExpression=b;function w(){let ie=T(),ve=je(19),He=T(),Be=la(!1);for(;f()===81;)Ye(),fe(),Be=M(y.createJSDocMemberName(Be,Lt()),He);ve&&Ba(20);let Ue=y.createJSDocNameReference(Be);return oe(Ue),M(Ue,ie)}c.parseJSDocNameReference=w;function A(ie,ve,He){rn("",ie,99,void 0,1);let Be=ke(16777216,()=>ne(ve,He)),Rt=$a(ct,{languageVariant:0,text:ie});return nn(),Be?{jsDoc:Be,diagnostics:Rt}:void 0}c.parseIsolatedJSDocComment=A;function R(ie,ve,He){let Be=ht,Ue=ct.length,Rt=Qt,Gr=ke(16777216,()=>ne(ve,He));return Xi(Gr,ie),at&524288&&(Ut||(Ut=[]),Ut.push(...ct)),ht=Be,ct.length=Ue,Qt=Rt,Gr}c.parseJSDocComment=R;let te;(ie=>{ie[ie.BeginningOfLine=0]="BeginningOfLine",ie[ie.SawAsterisk=1]="SawAsterisk",ie[ie.SavingComments=2]="SavingComments",ie[ie.SavingBackticks=3]="SavingBackticks"})(te||(te={}));let le;(ie=>{ie[ie.Property=1]="Property",ie[ie.Parameter=2]="Parameter",ie[ie.CallbackParameter=4]="CallbackParameter"})(le||(le={}));function ne(ie=0,ve){let He=pt;pt|=1<<25;let Be=St,Ue=ve===void 0?Be.length:ie+ve;if(ve=Ue-ie,N.assert(ie>=0),N.assert(ie<=Ue),N.assert(Ue<=Be.length),!z8(Be,ie))return;let Rt,Gr,di,mi,hi,Ui=[],ga=[],ba=t.scanRange(ie+3,ve-5,Uh);return pt=He,ba;function Uh(){let F=1,re,Z=ie-(Be.lastIndexOf(` -`,ie)+1)+4;function se(ze){re||(re=Z),Ui.push(ze),Z+=ze.length}for(fe();xo(5););xo(4)&&(F=0,Z=0);e:for(;;){switch(f()){case 60:qh(Ui),hi||(hi=T()),u(To(Z)),F=0,re=void 0;break;case 4:Ui.push(t.getTokenText()),F=0,Z=0;break;case 42:let ze=t.getTokenText();F===1?(F=2,se(ze)):(N.assert(F===0),F=1,Z+=ze.length);break;case 5:N.assert(F!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let At=t.getTokenText();re!==void 0&&Z+At.length>re&&Ui.push(At.slice(re-Z)),Z+=At.length;break;case 1:break e;case 82:F=2,se(t.getTokenValue());break;case 19:F=2;let Pn=t.getTokenFullStart(),sn=t.getTokenEnd()-1,Ar=vf(sn);if(Ar){mi||bf(Ui),ga.push(M(y.createJSDocText(Ui.join("")),mi??ie,Pn)),ga.push(Ar),Ui=[],mi=t.getTokenEnd();break}default:F=2,se(t.getTokenText());break}F===2?be(!1):fe()}let ce=n_(Ui.join(""));ga.length&&ce.length&&ga.push(M(y.createJSDocText(ce),mi??ie,hi)),ga.length&&Rt&&N.assertIsDefined(hi,"having parsed tags implies that the end of the comment span should be set");let Me=Rt&&Ft(Rt,Gr,di);return M(y.createJSDocComment(ga.length?Ft(ga,ie,hi):ce.length?ce:void 0,Me),ie,Ue)}function bf(F){for(;F.length&&(F[0]===` -`||F[0]==="\r");)F.shift()}function qh(F){for(;F.length;){let re=n_(F[F.length-1]);if(re==="")F.pop();else if(re.lengthAt&&(se.push(Qn.slice(At-F)),ze=2),F+=Qn.length;break;case 19:ze=2;let Tf=t.getTokenFullStart(),Hs=t.getTokenEnd()-1,Sf=vf(Hs);Sf?(ce.push(M(y.createJSDocText(se.join("")),Me??Z,Tf)),ce.push(Sf),se=[],Me=t.getTokenEnd()):Pn(t.getTokenText());break;case 62:ze===3?ze=2:ze=3,Pn(t.getTokenText());break;case 82:ze!==3&&(ze=2),Pn(t.getTokenValue());break;case 42:if(ze===0){ze=1,F+=1;break}default:ze!==3&&(ze=2),Pn(t.getTokenText());break}ze===2||ze===3?sn=be(ze===3):sn=fe()}bf(se);let Ar=n_(se.join(""));if(ce.length)return Ar.length&&ce.push(M(y.createJSDocText(Ar),Me??Z)),Ft(ce,Z,t.getTokenEnd());if(Ar.length)return Ar}function vf(F){let re=ft(n);if(!re)return;fe(),Xe();let Z=T(),se=kt(f())?la(!0):void 0;if(se)for(;f()===81;)Ye(),fe(),se=M(y.createJSDocMemberName(se,Lt()),Z);let ce=[];for(;f()!==20&&f()!==4&&f()!==1;)ce.push(t.getTokenText()),fe();let Me=re==="link"?y.createJSDocLink:re==="linkcode"?y.createJSDocLinkCode:y.createJSDocLinkPlain;return M(Me(se,ce.join("")),F,t.getTokenEnd())}function n(){if(Cr(),f()===19&&fe()===60&&kt(fe())){let F=t.getTokenValue();if(o(F))return F}}function o(F){return F==="link"||F==="linkcode"||F==="linkplain"}function s(F,re,Z,se){return M(y.createJSDocUnknownTag(re,lr(F,T(),Z,se)),F)}function u(F){F&&(Rt?Rt.push(F):(Rt=[F],Gr=F.pos),di=F.end)}function g(){return Cr(),f()===19?b():void 0}function I(){let F=xo(23);F&&Xe();let re=xo(62),Z=T5();return re&&e1(62),F&&(Xe(),dt(64)&&Jt(),H(24)),{name:Z,isBracketed:F}}function W(F){switch(F.kind){case 151:return!0;case 188:return W(F.elementType);default:return R_(F)&&Ee(F.typeName)&&F.typeName.escapedText==="Object"&&!F.typeArguments}}function de(F,re,Z,se){let ce=g(),Me=!ce;Cr();let{name:ze,isBracketed:At}=I(),Pn=Cr();Me&&!Te(n)&&(ce=g());let sn=lr(F,T(),se,Pn),Ar=We(ce,ze,Z,se);Ar&&(ce=Ar,Me=!0);let Qn=Z===1?y.createJSDocPropertyTag(re,ze,At,ce,Me,sn):y.createJSDocParameterTag(re,ze,At,ce,Me,sn);return M(Qn,F)}function We(F,re,Z,se){if(F&&W(F.type)){let ce=T(),Me,ze;for(;Me=ft(()=>Wh(Z,se,re));)Me.kind===348||Me.kind===355?ze=xt(ze,Me):Me.kind===352&&Lr(Me.tagName,U.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(ze){let At=M(y.createJSDocTypeLiteral(ze,F.type.kind===188),ce);return M(y.createJSDocTypeExpression(At),ce)}}}function Er(F,re,Z,se){mt(Rt,R6)&&Mt(re.pos,t.getTokenStart(),U._0_tag_already_specified,Vo(re.escapedText));let ce=g();return M(y.createJSDocReturnTag(re,ce,lr(F,T(),Z,se)),F)}function $n(F,re,Z,se){mt(Rt,lu)&&Mt(re.pos,t.getTokenStart(),U._0_tag_already_specified,Vo(re.escapedText));let ce=b(!0),Me=Z!==void 0&&se!==void 0?lr(F,T(),Z,se):void 0;return M(y.createJSDocTypeTag(re,ce,Me),F)}function yi(F,re,Z,se){let Me=f()===23||Te(()=>fe()===60&&kt(fe())&&o(t.getTokenValue()))?void 0:w(),ze=Z!==void 0&&se!==void 0?lr(F,T(),Z,se):void 0;return M(y.createJSDocSeeTag(re,Me,ze),F)}function Vs(F,re,Z,se){let ce=g(),Me=lr(F,T(),Z,se);return M(y.createJSDocThrowsTag(re,ce,Me),F)}function i5(F,re,Z,se){let ce=T(),Me=a5(),ze=t.getTokenFullStart(),At=lr(F,ze,Z,se);At||(ze=t.getTokenFullStart());let Pn=typeof At!="string"?Ft(y_([M(Me,ce,ze)],At),ce):Me.text+At;return M(y.createJSDocAuthorTag(re,Pn),F)}function a5(){let F=[],re=!1,Z=t.getToken();for(;Z!==1&&Z!==4;){if(Z===30)re=!0;else{if(Z===60&&!re)break;if(Z===32&&re){F.push(t.getTokenText()),t.resetTokenState(t.getTokenEnd());break}}F.push(t.getTokenText()),Z=fe()}return y.createJSDocText(F.join(""))}function o5(F,re,Z,se){let ce=Pb();return M(y.createJSDocImplementsTag(re,ce,lr(F,T(),Z,se)),F)}function s5(F,re,Z,se){let ce=Pb();return M(y.createJSDocAugmentsTag(re,ce,lr(F,T(),Z,se)),F)}function _5(F,re,Z,se){let ce=b(!1),Me=Z!==void 0&&se!==void 0?lr(F,T(),Z,se):void 0;return M(y.createJSDocSatisfiesTag(re,ce,Me),F)}function Pb(){let F=je(19),re=T(),Z=c5();t.setInJSDocType(!0);let se=qs();t.setInJSDocType(!1);let ce=y.createExpressionWithTypeArguments(Z,se),Me=M(ce,re);return F&&H(20),Me}function c5(){let F=T(),re=Ga();for(;je(25);){let Z=Ga();re=M(ae(re,Z),F)}return re}function So(F,re,Z,se,ce){return M(re(Z,lr(F,T(),se,ce)),F)}function l5(F,re,Z,se){let ce=b(!0);return Xe(),M(y.createJSDocThisTag(re,ce,lr(F,T(),Z,se)),F)}function u5(F,re,Z,se){let ce=b(!0);return Xe(),M(y.createJSDocEnumTag(re,ce,lr(F,T(),Z,se)),F)}function p5(F,re,Z,se){let ce=g();Cr();let Me=zh();Xe();let ze=on(Z),At;if(!ce||W(ce.type)){let sn,Ar,Qn,Tf=!1;for(;(sn=ft(()=>y5(Z)))&&sn.kind!==352;)if(Tf=!0,sn.kind===351)if(Ar){let Hs=Je(U.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);Hs&&nl(Hs,Ao(sr,0,0,U.The_tag_was_first_specified_here));break}else Ar=sn;else Qn=xt(Qn,sn);if(Tf){let Hs=ce&&ce.type.kind===188,Sf=y.createJSDocTypeLiteral(Qn,Hs);ce=Ar&&Ar.typeExpression&&!W(Ar.typeExpression.type)?Ar.typeExpression:M(Sf,F),At=ce.end}}At=At||ze!==void 0?T():(Me??ce??re).end,ze||(ze=lr(F,At,Z,se));let Pn=y.createJSDocTypedefTag(re,ce,Me,ze);return M(Pn,F,At)}function zh(F){let re=t.getTokenStart();if(!kt(f()))return;let Z=Ga();if(je(25)){let se=zh(!0),ce=y.createModuleDeclaration(void 0,Z,se,F?8:void 0);return M(ce,re)}return F&&(Z.flags|=4096),Z}function f5(F){let re=T(),Z,se;for(;Z=ft(()=>Wh(4,F));){if(Z.kind===352){Lr(Z.tagName,U.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}se=xt(se,Z)}return Ft(se||[],re)}function Ib(F,re){let Z=f5(re),se=ft(()=>{if(xo(60)){let ce=To(re);if(ce&&ce.kind===349)return ce}});return M(y.createJSDocSignature(void 0,Z,se),F)}function d5(F,re,Z,se){let ce=zh();Xe();let Me=on(Z),ze=Ib(F,Z);Me||(Me=lr(F,T(),Z,se));let At=Me!==void 0?T():ze.end;return M(y.createJSDocCallbackTag(re,ze,ce,Me),F,At)}function m5(F,re,Z,se){Xe();let ce=on(Z),Me=Ib(F,Z);ce||(ce=lr(F,T(),Z,se));let ze=ce!==void 0?T():Me.end;return M(y.createJSDocOverloadTag(re,Me,ce),F,ze)}function h5(F,re){for(;!Ee(F)||!Ee(re);)if(!Ee(F)&&!Ee(re)&&F.right.escapedText===re.right.escapedText)F=F.left,re=re.left;else return!1;return F.escapedText===re.escapedText}function y5(F){return Wh(1,F)}function Wh(F,re,Z){let se=!0,ce=!1;for(;;)switch(fe()){case 60:if(se){let Me=g5(F,re);return Me&&(Me.kind===348||Me.kind===355)&&Z&&(Ee(Me.name)||!h5(Z,Me.name.left))?!1:Me}ce=!1;break;case 4:se=!0,ce=!1;break;case 42:ce&&(se=!1),ce=!0;break;case 80:se=!1;break;case 1:return!1}}function g5(F,re){N.assert(f()===60);let Z=t.getTokenFullStart();fe();let se=Ga(),ce=Cr(),Me;switch(se.escapedText){case"type":return F===1&&$n(Z,se);case"prop":case"property":Me=1;break;case"arg":case"argument":case"param":Me=6;break;case"template":return Nb(Z,se,re,ce);default:return!1}return F&Me?de(Z,se,F,re):!1}function b5(){let F=T(),re=xo(23);re&&Xe();let Z=Ga(U.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),se;if(re&&(Xe(),H(64),se=ke(16777216,xs),H(24)),!zi(Z))return M(y.createTypeParameterDeclaration(void 0,Z,void 0,se),F)}function v5(){let F=T(),re=[];do{Xe();let Z=b5();Z!==void 0&&re.push(Z),Cr()}while(xo(28));return Ft(re,F)}function Nb(F,re,Z,se){let ce=f()===19?b():void 0,Me=v5();return M(y.createJSDocTemplateTag(re,ce,Me,lr(F,T(),Z,se)),F)}function xo(F){return f()===F?(fe(),!0):!1}function T5(){let F=Ga();for(je(23)&&H(24);je(25);){let re=Ga();je(23)&&H(24),F=o1(F,re)}return F}function Ga(F){if(!kt(f()))return Jr(80,!F,F||U.Identifier_expected);Or++;let re=t.getTokenStart(),Z=t.getTokenEnd(),se=f(),ce=sa(t.getTokenValue()),Me=M(G(ce,se),re,Z);return fe(),Me}}})(gf=e.JSDocParser||(e.JSDocParser={}))})(Zn||(Zn={})),(e=>{function t(k,L,G,K){if(K=K||N.shouldAssert(2),y(k,L,G,K),C4(G))return k;if(k.statements.length===0)return Zn.parseSourceFile(k.fileName,L,k.languageVersion,void 0,!0,k.scriptKind,k.setExternalModuleIndicator);let ue=k;N.assert(!ue.hasBeenIncrementallyParsed),ue.hasBeenIncrementallyParsed=!0,Zn.fixupParentReferences(ue);let Y=k.text,B=C(k),ae=l(k,G);y(k,L,ae,K),N.assert(ae.span.start<=G.span.start),N.assert(Kt(ae.span)===Kt(G.span)),N.assert(Kt(Qs(ae))===Kt(Qs(G)));let Ce=Qs(ae).length-ae.span.length;h(ue,ae.span.start,Kt(ae.span),Kt(Qs(ae)),Ce,Y,L,K);let Ze=Zn.parseSourceFile(k.fileName,L,k.languageVersion,B,!0,k.scriptKind,k.setExternalModuleIndicator);return Ze.commentDirectives=r(k.commentDirectives,Ze.commentDirectives,ae.span.start,Kt(ae.span),Ce,Y,L,K),Ze.impliedNodeFormat=k.impliedNodeFormat,Ze}e.updateSourceFile=t;function r(k,L,G,K,ue,Y,B,ae){if(!k)return L;let Ce,Ze=!1;for(let rt of k){let{range:it,type:Ir}=rt;if(it.endK){qe();let ar={range:{pos:it.pos+ue,end:it.end+ue},type:Ir};Ce=xt(Ce,ar),ae&&N.assert(Y.substring(it.pos,it.end)===B.substring(ar.range.pos,ar.range.end))}}return qe(),Ce;function qe(){Ze||(Ze=!0,Ce?L&&Ce.push(...L):Ce=L)}}function a(k,L,G,K,ue,Y){L?ae(k):B(k);return;function B(Ce){let Ze="";if(Y&&_(Ce)&&(Ze=K.substring(Ce.pos,Ce.end)),Ce._children&&(Ce._children=void 0),Ya(Ce,Ce.pos+G,Ce.end+G),Y&&_(Ce)&&N.assert(Ze===ue.substring(Ce.pos,Ce.end)),Bt(Ce,B,ae),Wi(Ce))for(let qe of Ce.jsDoc)B(qe);d(Ce,Y)}function ae(Ce){Ce._children=void 0,Ya(Ce,Ce.pos+G,Ce.end+G);for(let Ze of Ce)B(Ze)}}function _(k){switch(k.kind){case 11:case 9:case 80:return!0}return!1}function p(k,L,G,K,ue){N.assert(k.end>=L,"Adjusting an element that was entirely before the change range"),N.assert(k.pos<=G,"Adjusting an element that was entirely after the change range"),N.assert(k.pos<=k.end);let Y=Math.min(k.pos,K),B=k.end>=G?k.end+ue:Math.min(k.end,K);N.assert(Y<=B),k.parent&&(N.assertGreaterThanOrEqual(Y,k.parent.pos),N.assertLessThanOrEqual(B,k.parent.end)),Ya(k,Y,B)}function d(k,L){if(L){let G=k.pos,K=ue=>{N.assert(ue.pos>=G),G=ue.end};if(Wi(k))for(let ue of k.jsDoc)K(ue);Bt(k,K),N.assert(G<=k.end)}}function h(k,L,G,K,ue,Y,B,ae){Ce(k);return;function Ce(qe){if(N.assert(qe.pos<=qe.end),qe.pos>G){a(qe,!1,ue,Y,B,ae);return}let rt=qe.end;if(rt>=L){if(qe.intersectsChange=!0,qe._children=void 0,p(qe,L,G,K,ue),Bt(qe,Ce,Ze),Wi(qe))for(let it of qe.jsDoc)Ce(it);d(qe,ae);return}N.assert(rtG){a(qe,!0,ue,Y,B,ae);return}let rt=qe.end;if(rt>=L){qe.intersectsChange=!0,qe._children=void 0,p(qe,L,G,K,ue);for(let it of qe)Ce(it);return}N.assert(rt0&&B<=1;B++){let ae=v(k,K);N.assert(ae.pos<=K);let Ce=ae.pos;K=Math.max(0,Ce-1)}let ue=Hi(K,Kt(L.span)),Y=L.newLength+(L.span.start-K);return Xd(ue,Y)}function v(k,L){let G=k,K;if(Bt(k,Y),K){let B=ue(K);B.pos>G.pos&&(G=B)}return G;function ue(B){for(;;){let ae=DS(B);if(ae)B=ae;else return B}}function Y(B){if(!zi(B))if(B.pos<=L){if(B.pos>=G.pos&&(G=B),LL),!0}}function y(k,L,G,K){let ue=k.text;if(G&&(N.assert(ue.length-G.span.length+G.newLength===L.length),K||N.shouldAssert(3))){let Y=ue.substr(0,G.span.start),B=L.substr(0,G.span.start);N.assert(Y===B);let ae=ue.substring(Kt(G.span),ue.length),Ce=L.substring(Kt(Qs(G)),L.length);N.assert(ae===Ce)}}function C(k){let L=k.statements,G=0;N.assert(G=Ze.pos&&B=Ze.pos&&B{k[k.Value=-1]="Value"})(S||(S={}))})(Wf||(Wf={})),Vf=new Map,Y8=/^\/\/\/\s*<(\S+)\s.*?\/>/im,K8=/^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im}}),Vj=()=>{},$V=Vt({"src/compiler/pnp.ts"(){"use strict";r4()}}),Hj=()=>{},Gj=()=>{},Xj=()=>{},$j=()=>{},Qj=()=>{},Yj=()=>{},Kj=()=>{},Zj=()=>{},eF=()=>{},tF=()=>{},rF=()=>{},nF=()=>{},iF=()=>{},aF=()=>{},oF=()=>{},sF=()=>{},_F=()=>{},cF=()=>{},lF=()=>{},uF=()=>{},pF=()=>{},fF=()=>{},dF=()=>{},mF=()=>{},hF=()=>{},yF=()=>{},gF=()=>{},bF=()=>{},vF=()=>{},TF=()=>{},SF=()=>{},xF=()=>{},wF=()=>{},CF=()=>{},EF=()=>{},AF=()=>{},kF=()=>{},DF=()=>{},PF=()=>{},IF=()=>{},NF=()=>{},OF=()=>{},MF=()=>{},LF=()=>{},JF=()=>{},RF=()=>{},jF=()=>{},Dr=Vt({"src/compiler/_namespaces/ts.ts"(){"use strict";O5(),fE(),Hv(),dE(),mE(),yE(),vE(),$v(),SE(),r4(),jE(),GE(),Rk(),xL(),wL(),CL(),EL(),FL(),BL(),UL(),hR(),Dj(),Pj(),Wj(),Vj(),Hj(),Gj(),Xj(),Qj(),Yj(),Kj(),Zj(),eF(),tF(),rF(),nF(),iF(),aF(),oF(),sF(),_F(),cF(),lF(),uF(),pF(),fF(),dF(),mF(),hF(),yF(),gF(),bF(),vF(),TF(),SF(),xF(),wF(),CF(),EF(),AF(),kF(),DF(),PF(),IF(),NF(),OF(),MF(),LF(),JF(),RF(),jF(),$j(),Xv()}}),Z8=()=>{},FF=()=>{},e7=()=>{},Fo,e7=()=>{Hv(),Fo=ns(99,!0)},BF=()=>{},t7=()=>{},UF=()=>{},qF=()=>{},zF=()=>{},WF=()=>{},VF=()=>{},HF=()=>{},GF=()=>{},XF=()=>{},r7=()=>{},n7=()=>{},i7=()=>{},$F=()=>{};function a7(e,t,r,a){let _=ql(e)?new Nd(e,t,r):e===80?new Od(80,t,r):e===81?new Md(81,t,r):new W6(e,t,r);return _.parent=a,_.flags=a.flags&101441536,_}function QF(e,t){if(!ql(e.kind))return $e;let r=[];if(C3(e))return e.forEachChild(d=>{r.push(d)}),r;Fo.setText((t||e.getSourceFile()).text);let a=e.pos,_=d=>{hl(r,a,d.pos,e),r.push(d),a=d.end},p=d=>{hl(r,a,d.pos,e),r.push(YF(d,e)),a=d.end};return yr(e.jsDoc,_),a=e.pos,e.forEachChild(_,p),hl(r,a,e.end,e),Fo.setText(void 0),r}function hl(e,t,r,a){for(Fo.resetTokenState(t);tt.tagName.text==="inheritDoc"||t.tagName.text==="inheritdoc")}function kf(e,t){if(!e)return $e;let r=ts_JsDoc_exports.getJsDocTagsFromDeclarations(e,t);if(t&&(r.length===0||e.some(o7))){let a=new Set;for(let _ of e){let p=s7(t,_,d=>{var h;if(!a.has(d))return a.add(d),_.kind===177||_.kind===178?d.getContextualJsDocTags(_,t):((h=d.declarations)==null?void 0:h.length)===1?d.getJsDocTags():void 0});p&&(r=[...p,...r])}}return r}function Kc(e,t){if(!e)return $e;let r=ts_JsDoc_exports.getJsDocCommentsFromDeclarations(e,t);if(t&&(r.length===0||e.some(o7))){let a=new Set;for(let _ of e){let p=s7(t,_,d=>{if(!a.has(d))return a.add(d),_.kind===177||_.kind===178?d.getContextualDocumentationComment(_,t):d.getDocumentationComment(t)});p&&(r=r.length===0?p.slice():p.concat(lineBreakPart(),r))}}return r}function s7(e,t,r){var a;let _=((a=t.parent)==null?void 0:a.kind)===176?t.parent.parent:t.parent;if(!_)return;let p=gm(t);return ng(IT(_),d=>{let h=e.getTypeAtLocation(d),l=p&&h.symbol?e.getTypeOfSymbol(h.symbol):h,v=e.getPropertyOfType(l,t.symbol.name);return v?r(v):void 0})}function KF(){return{getNodeConstructor:()=>Nd,getTokenConstructor:()=>W6,getIdentifierConstructor:()=>Od,getPrivateIdentifierConstructor:()=>Md,getSourceFileConstructor:()=>g7,getSymbolConstructor:()=>m7,getTypeConstructor:()=>h7,getSignatureConstructor:()=>y7,getSourceMapSourceConstructor:()=>b7}}function sl(e){let t=!0;for(let a in e)if(Qr(e,a)&&!mv(a)){t=!1;break}if(t)return e;let r={};for(let a in e)if(Qr(e,a)){let _=mv(a)?a:a.charAt(0).toLowerCase()+a.substr(1);r[_]=e[a]}return r}function mv(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function ZF(e){return e?Aa(e,t=>t.text).join(""):""}function _7(){return{target:1,jsx:1}}function c7(){return ts_codefix_exports.getSupportedErrorCodes()}function l7(e,t,r){e.version=r,e.scriptSnapshot=t}function z6(e,t,r,a,_,p){let d=H8(e,getSnapshotText(t),r,_,p);return l7(d,t,a),d}function u7(e,t,r,a,_){if(a&&r!==e.version){let d,h=a.span.start!==0?e.text.substr(0,a.span.start):"",l=Kt(a.span)!==e.text.length?e.text.substr(Kt(a.span)):"";if(a.newLength===0)d=h&&l?h+l:h||l;else{let y=t.getText(a.span.start,a.span.start+a.newLength);d=h&&l?h+y+l:h?h+y:y+l}let v=q6(e,d,a,_);return l7(v,t,r),v.nameTable=void 0,e!==v&&e.scriptSnapshot&&(e.scriptSnapshot.dispose&&e.scriptSnapshot.dispose(),e.scriptSnapshot=void 0),v}let p={languageVersion:e.languageVersion,impliedNodeFormat:e.impliedNodeFormat,setExternalModuleIndicator:e.setExternalModuleIndicator};return z6(e.fileName,t,p,r,!0,e.scriptKind)}function eB(e,t=createDocumentRegistry(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory()),r){var a;let _;r===void 0?_=0:typeof r=="boolean"?_=r?2:0:_=r;let p=new v7(e),d,h,l=0,v=e.getCancellationToken?new S7(e.getCancellationToken()):T7,y=e.getCurrentDirectory();OS((a=e.getLocalizedDiagnosticMessages)==null?void 0:a.bind(e));function C(j){e.log&&e.log(j)}let S=C2(e),k=Bd(S),L=getSourceMapper({useCaseSensitiveFileNames:()=>S,getCurrentDirectory:()=>y,getProgram:ue,fileExists:rr(e,e.fileExists),readFile:rr(e,e.readFile),getDocumentPositionMapper:rr(e,e.getDocumentPositionMapper),getSourceFileLike:rr(e,e.getSourceFileLike),log:C});function G(j){let T=d.getSourceFile(j);if(!T){let x=new Error(`Could not find source file: '${j}'.`);throw x.ProgramFiles=d.getSourceFiles().map(f=>f.fileName),x}return T}function K(){var j,T,x;if(N.assert(_!==2),e.getProjectVersion){let Ie=e.getProjectVersion();if(Ie){if(h===Ie&&!((j=e.hasChangedAutomaticTypeDirectiveNames)!=null&&j.call(e)))return;h=Ie}}let f=e.getTypeRootsVersion?e.getTypeRootsVersion():0;l!==f&&(C("TypeRoots version has changed; provide new program"),d=void 0,l=f);let $=e.getScriptFileNames().slice(),Q=e.getCompilationSettings()||_7(),O=e.hasInvalidatedResolutions||Xf,fe=rr(e,e.hasInvalidatedLibResolutions)||Xf,be=rr(e,e.hasChangedAutomaticTypeDirectiveNames),he=(T=e.getProjectReferences)==null?void 0:T.call(e),Re,we={getSourceFile:H,getSourceFileByPath:Fa,getCancellationToken:()=>v,getCanonicalFileName:k,useCaseSensitiveFileNames:()=>S,getNewLine:()=>TS(Q),getDefaultLibFileName:Ie=>e.getDefaultLibFileName(Ie),writeFile:Rn,getCurrentDirectory:()=>y,fileExists:Ie=>e.fileExists(Ie),readFile:Ie=>e.readFile&&e.readFile(Ie),getSymlinkCache:rr(e,e.getSymlinkCache),realpath:rr(e,e.realpath),directoryExists:Ie=>vS(Ie,e),getDirectories:Ie=>e.getDirectories?e.getDirectories(Ie):[],readDirectory:(Ie,ot,cr,an,Ba)=>(N.checkDefined(e.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),e.readDirectory(Ie,ot,cr,an,Ba)),onReleaseOldSourceFile:Et,onReleaseParsedCommandLine:An,hasInvalidatedResolutions:O,hasInvalidatedLibResolutions:fe,hasChangedAutomaticTypeDirectiveNames:be,trace:rr(e,e.trace),resolveModuleNames:rr(e,e.resolveModuleNames),getModuleResolutionCache:rr(e,e.getModuleResolutionCache),createHash:rr(e,e.createHash),resolveTypeReferenceDirectives:rr(e,e.resolveTypeReferenceDirectives),resolveModuleNameLiterals:rr(e,e.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:rr(e,e.resolveTypeReferenceDirectiveReferences),resolveLibrary:rr(e,e.resolveLibrary),useSourceOfProjectReferenceRedirect:rr(e,e.useSourceOfProjectReferenceRedirect),getParsedCommandLine:Te},et=we.getSourceFile,{getSourceFileWithCache:Ye}=changeCompilerHostLikeToUseCache(we,Ie=>xi(Ie,y,k),(...Ie)=>et.call(we,...Ie));we.getSourceFile=Ye,(x=e.setCompilerHost)==null||x.call(e,we);let Ke={useCaseSensitiveFileNames:S,fileExists:Ie=>we.fileExists(Ie),readFile:Ie=>we.readFile(Ie),directoryExists:Ie=>we.directoryExists(Ie),getDirectories:Ie=>we.getDirectories(Ie),realpath:we.realpath,readDirectory:(...Ie)=>we.readDirectory(...Ie),trace:we.trace,getCurrentDirectory:we.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:Rn},It=t.getKeyForCompilationSettings(Q),qt=new Set;if(isProgramUptoDate(d,$,Q,(Ie,ot)=>e.getScriptVersion(ot),Ie=>we.fileExists(Ie),O,fe,be,Te,he)){we=void 0,Re=void 0,qt=void 0;return}let _r={rootNames:$,options:Q,host:we,oldProgram:d,projectReferences:he};d=createProgram(_r),we=void 0,Re=void 0,qt=void 0,L.clearCache(),d.getTypeChecker();return;function Te(Ie){let ot=xi(Ie,y,k),cr=Re==null?void 0:Re.get(ot);if(cr!==void 0)return cr||void 0;let an=e.getParsedCommandLine?e.getParsedCommandLine(Ie):ft(Ie);return(Re||(Re=new Map)).set(ot,an||!1),an}function ft(Ie){let ot=H(Ie,100);if(ot)return ot.path=xi(Ie,y,k),ot.resolvedPath=ot.path,ot.originalFileName=ot.fileName,parseJsonSourceFileConfigFileContent(ot,Ke,Pa($i(Ie),y),void 0,Pa(Ie,y))}function An(Ie,ot,cr){var an;e.getParsedCommandLine?(an=e.onReleaseParsedCommandLine)==null||an.call(e,Ie,ot,cr):ot&&Et(ot.sourceFile,cr)}function Et(Ie,ot){let cr=t.getKeyForCompilationSettings(ot);t.releaseDocumentWithKey(Ie.resolvedPath,cr,Ie.scriptKind,Ie.impliedNodeFormat)}function H(Ie,ot,cr,an){return Fa(Ie,xi(Ie,y,k),ot,cr,an)}function Fa(Ie,ot,cr,an,Ba){N.assert(we,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");let kn=e.getScriptSnapshot(Ie);if(!kn)return;let je=getScriptKind(Ie,e),dt=e.getScriptVersion(Ie);if(!Ba){let li=d&&d.getSourceFileByPath(ot);if(li){if(je===li.scriptKind||qt.has(li.resolvedPath))return t.updateDocumentWithKey(Ie,ot,e,It,kn,dt,je,cr);t.releaseDocumentWithKey(li.resolvedPath,t.getKeyForCompilationSettings(d.getCompilerOptions()),li.scriptKind,li.impliedNodeFormat),qt.add(li.resolvedPath)}}return t.acquireDocumentWithKey(Ie,ot,e,It,kn,dt,je,cr)}}function ue(){if(_===2){N.assert(d===void 0);return}return K(),d}function Y(){var j;return(j=e.getPackageJsonAutoImportProvider)==null?void 0:j.call(e)}function B(j,T){let x=d.getTypeChecker(),f=$();if(!f)return!1;for(let O of j)for(let fe of O.references){let be=Q(fe);if(N.assertIsDefined(be),T.has(fe)||ts_FindAllReferences_exports.isDeclarationOfSymbol(be,f)){T.add(fe),fe.isDefinition=!0;let he=getMappedDocumentSpan(fe,L,rr(e,e.fileExists));he&&T.add(he)}else fe.isDefinition=!1}return!0;function $(){for(let O of j)for(let fe of O.references){if(T.has(fe)){let he=Q(fe);return N.assertIsDefined(he),x.getSymbolAtLocation(he)}let be=getMappedDocumentSpan(fe,L,rr(e,e.fileExists));if(be&&T.has(be)){let he=Q(be);if(he)return x.getSymbolAtLocation(he)}}}function Q(O){let fe=d.getSourceFile(O.fileName);if(!fe)return;let be=getTouchingPropertyName(fe,O.textSpan.start);return ts_FindAllReferences_exports.Core.getAdjustedNode(be,{use:ts_FindAllReferences_exports.FindReferencesUse.References})}}function ae(){if(d){let j=t.getKeyForCompilationSettings(d.getCompilerOptions());yr(d.getSourceFiles(),T=>t.releaseDocumentWithKey(T.resolvedPath,j,T.scriptKind,T.impliedNodeFormat)),d=void 0}}function Ce(){ae(),e=void 0}function Ze(j){return K(),d.getSyntacticDiagnostics(G(j),v).slice()}function qe(j){K();let T=G(j),x=d.getSemanticDiagnostics(T,v);if(!z2(d.getCompilerOptions()))return x.slice();let f=d.getDeclarationDiagnostics(T,v);return[...x,...f]}function rt(j){return K(),computeSuggestionDiagnostics(G(j),d,v)}function it(){return K(),[...d.getOptionsDiagnostics(v),...d.getGlobalDiagnostics(v)]}function Ir(j,T,x=emptyOptions,f){let $={...x,includeCompletionsForModuleExports:x.includeCompletionsForModuleExports||x.includeExternalModuleExports,includeCompletionsWithInsertText:x.includeCompletionsWithInsertText||x.includeInsertTextCompletions};return K(),ts_Completions_exports.getCompletionsAtPosition(e,d,C,G(j),T,$,x.triggerCharacter,x.triggerKind,v,f&&ts_formatting_exports.getFormatContext(f,e),x.includeSymbol)}function ar(j,T,x,f,$,Q=emptyOptions,O){return K(),ts_Completions_exports.getCompletionEntryDetails(d,C,G(j),T,{name:x,source:$,data:O},e,f&&ts_formatting_exports.getFormatContext(f,e),Q,v)}function ci(j,T,x,f,$=emptyOptions){return K(),ts_Completions_exports.getCompletionEntrySymbol(d,C,G(j),T,{name:x,source:f},e,$)}function or(j,T){K();let x=G(j),f=getTouchingPropertyName(x,T);if(f===x)return;let $=d.getTypeChecker(),Q=Nr(f),O=aB(Q,$);if(!O||$.isUnknownSymbol(O)){let we=Ge(x,Q,T)?$.getTypeAtLocation(Q):void 0;return we&&{kind:"",kindModifiers:"",textSpan:createTextSpanFromNode(Q,x),displayParts:$.runWithCancellationToken(v,et=>typeToDisplayParts(et,we,getContainerNode(Q))),documentation:we.symbol?we.symbol.getDocumentationComment($):void 0,tags:we.symbol?we.symbol.getJsDocTags($):void 0}}let{symbolKind:fe,displayParts:be,documentation:he,tags:Re}=$.runWithCancellationToken(v,we=>ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(we,O,x,getContainerNode(Q),Q));return{kind:fe,kindModifiers:ts_SymbolDisplay_exports.getSymbolModifiers($,O),textSpan:createTextSpanFromNode(Q,x),displayParts:be,documentation:he,tags:Re}}function Nr(j){return o8(j.parent)&&j.pos===j.parent.pos?j.parent.expression:p6(j.parent)&&j.pos===j.parent.pos||x0(j.parent)&&j.parent.name===j||U_(j.parent)?j.parent:j}function Ge(j,T,x){switch(T.kind){case 80:return!isLabelName(T)&&!isTagName(T)&&!Z4(T.parent);case 211:case 166:return!isInComment(j,x);case 110:case 197:case 108:case 202:return!0;case 236:return x0(T);default:return!1}}function Gt(j,T,x,f){return K(),ts_GoToDefinition_exports.getDefinitionAtPosition(d,G(j),T,x,f)}function Ur(j,T){return K(),ts_GoToDefinition_exports.getDefinitionAndBoundSpan(d,G(j),T)}function Xt(j,T){return K(),ts_GoToDefinition_exports.getTypeDefinitionAtPosition(d.getTypeChecker(),G(j),T)}function Tn(j,T){return K(),ts_FindAllReferences_exports.getImplementationsAtPosition(d,v,d.getSourceFiles(),G(j),T)}function Sn(j,T,x){let f=pn(j);N.assert(x.some(O=>pn(O)===f)),K();let $=Za(x,O=>d.getSourceFile(O)),Q=G(j);return DocumentHighlights.getDocumentHighlights(d,v,Q,T,$)}function sr(j,T,x,f,$){K();let Q=G(j),O=getAdjustedRenameLocation(getTouchingPropertyName(Q,T));if(ts_Rename_exports.nodeIsEligibleForRename(O))if(Ee(O)&&(Oo(O.parent)||qf(O.parent))&&WT(O.escapedText)){let{openingElement:fe,closingElement:be}=O.parent.parent;return[fe,be].map(he=>{let Re=createTextSpanFromNode(he.tagName,Q);return{fileName:Q.fileName,textSpan:Re,...ts_FindAllReferences_exports.toContextSpan(Re,Q,he.parent)}})}else{let fe=getQuotePreference(Q,$??emptyOptions),be=typeof $=="boolean"?$:$==null?void 0:$.providePrefixAndSuffixTextForRename;return St(O,T,{findInStrings:x,findInComments:f,providePrefixAndSuffixTextForRename:be,use:ts_FindAllReferences_exports.FindReferencesUse.Rename},(he,Re,we)=>ts_FindAllReferences_exports.toRenameLocation(he,Re,we,be||!1,fe))}}function $t(j,T){return K(),St(getTouchingPropertyName(G(j),T),T,{use:ts_FindAllReferences_exports.FindReferencesUse.References},ts_FindAllReferences_exports.toReferenceEntry)}function St(j,T,x,f){K();let $=x&&x.use===ts_FindAllReferences_exports.FindReferencesUse.Rename?d.getSourceFiles().filter(Q=>!d.isSourceFileDefaultLibrary(Q)):d.getSourceFiles();return ts_FindAllReferences_exports.findReferenceOrRenameEntries(d,v,$,j,T,x,f)}function xn(j,T){return K(),ts_FindAllReferences_exports.findReferencedSymbols(d,v,d.getSourceFiles(),G(j),T)}function Tr(j){return K(),ts_FindAllReferences_exports.Core.getReferencesForFileName(j,d,d.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry)}function vt(j,T,x,f=!1){K();let $=x?[G(x)]:d.getSourceFiles();return getNavigateToItems($,d.getTypeChecker(),v,j,T,f)}function ct(j,T,x){K();let f=G(j),$=e.getCustomTransformers&&e.getCustomTransformers();return getFileEmitOutput(d,f,!!T,v,$,x)}function Ut(j,T,{triggerReason:x}=emptyOptions){K();let f=G(j);return ts_SignatureHelp_exports.getSignatureHelpItems(d,f,T,x,v)}function fr(j){return p.getCurrentSourceFile(j)}function ht(j,T,x){let f=p.getCurrentSourceFile(j),$=getTouchingPropertyName(f,T);if($===f)return;switch($.kind){case 211:case 166:case 11:case 97:case 112:case 106:case 108:case 110:case 197:case 80:break;default:return}let Q=$;for(;;)if(isRightSideOfPropertyAccess(Q)||isRightSideOfQualifiedName(Q))Q=Q.parent;else if(isNameOfModuleDeclaration(Q))if(Q.parent.parent.kind===267&&Q.parent.parent.body===Q.parent)Q=Q.parent.parent.name;else break;else break;return Hi(Q.getStart(),$.getEnd())}function wn(j,T){let x=p.getCurrentSourceFile(j);return ts_BreakpointResolver_exports.spanInSourceFileAtLocation(x,T)}function Tt(j){return getNavigationBarItems(p.getCurrentSourceFile(j),v)}function Or(j){return getNavigationTree(p.getCurrentSourceFile(j),v)}function pt(j,T,x){return K(),(x||"original")==="2020"?getSemanticClassifications2(d,v,G(j),T):getSemanticClassifications(d.getTypeChecker(),v,G(j),d.getClassifiableNames(),T)}function Mr(j,T,x){return K(),(x||"original")==="original"?getEncodedSemanticClassifications(d.getTypeChecker(),v,G(j),d.getClassifiableNames(),T):getEncodedSemanticClassifications2(d,v,G(j),T)}function at(j,T){return getSyntacticClassifications(v,p.getCurrentSourceFile(j),T)}function er(j,T){return getEncodedSyntacticClassifications(v,p.getCurrentSourceFile(j),T)}function Qt(j){let T=p.getCurrentSourceFile(j);return ts_OutliningElementsCollector_exports.collectElements(T,v)}let tn=new Map(Object.entries({19:20,21:22,23:24,32:30}));tn.forEach((j,T)=>tn.set(j.toString(),Number(T)));function Bn(j,T){let x=p.getCurrentSourceFile(j),f=getTouchingToken(x,T),$=f.getStart(x)===T?tn.get(f.kind.toString()):void 0,Q=$&&findChildOfKind(f.parent,$,x);return Q?[createTextSpanFromNode(f,x),createTextSpanFromNode(Q,x)].sort((O,fe)=>O.start-fe.start):$e}function Un(j,T,x){let f=Sa(),$=sl(x),Q=p.getCurrentSourceFile(j);C("getIndentationAtPosition: getCurrentSourceFile: "+(Sa()-f)),f=Sa();let O=ts_formatting_exports.SmartIndenter.getIndentation(T,Q,$);return C("getIndentationAtPosition: computeIndentation : "+(Sa()-f)),O}function rn(j,T,x,f){let $=p.getCurrentSourceFile(j);return ts_formatting_exports.formatSelection(T,x,$,ts_formatting_exports.getFormatContext(sl(f),e))}function nn(j,T){return ts_formatting_exports.formatDocument(p.getCurrentSourceFile(j),ts_formatting_exports.getFormatContext(sl(T),e))}function Di(j,T,x,f){let $=p.getCurrentSourceFile(j),Q=ts_formatting_exports.getFormatContext(sl(f),e);if(!isInComment($,T))switch(x){case"{":return ts_formatting_exports.formatOnOpeningCurly(T,$,Q);case"}":return ts_formatting_exports.formatOnClosingCurly(T,$,Q);case";":return ts_formatting_exports.formatOnSemicolon(T,$,Q);case` -`:return ts_formatting_exports.formatOnEnter(T,$,Q)}return[]}function qn(j,T,x,f,$,Q=emptyOptions){K();let O=G(j),fe=Hi(T,x),be=ts_formatting_exports.getFormatContext($,e);return Bo(xv(f,_o,kr),he=>(v.throwIfCancellationRequested(),ts_codefix_exports.getFixes({errorCode:he,sourceFile:O,span:fe,program:d,host:e,cancellationToken:v,formatContext:be,preferences:Q})))}function Ae(j,T,x,f=emptyOptions){K(),N.assert(j.type==="file");let $=G(j.fileName),Q=ts_formatting_exports.getFormatContext(x,e);return ts_codefix_exports.getAllFixes({fixId:T,sourceFile:$,program:d,host:e,cancellationToken:v,formatContext:Q,preferences:f})}function q(j,T,x=emptyOptions){K(),N.assert(j.type==="file");let f=G(j.fileName),$=ts_formatting_exports.getFormatContext(T,e),Q=j.mode??(j.skipDestructiveCodeActions?"SortAndCombine":"All");return ts_OrganizeImports_exports.organizeImports(f,$,e,d,x,Q)}function oe(j,T,x,f=emptyOptions){return getEditsForFileRename(ue(),j,T,e,ts_formatting_exports.getFormatContext(x,e),f,L)}function ge(j,T){let x=typeof j=="string"?T:j;return zt(x)?Promise.all(x.map(f=>Se(f))):Se(x)}function Se(j){let T=x=>xi(x,y,k);return N.assertEqual(j.type,"install package"),e.installPackage?e.installPackage({fileName:T(j.file),packageName:j.packageName}):Promise.reject("Host does not implement `installPackage`")}function nt(j,T,x,f){let $=f?ts_formatting_exports.getFormatContext(f,e).options:void 0;return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(e,$),p.getCurrentSourceFile(j),T,x)}function z(j,T,x){if(x===60)return!1;let f=p.getCurrentSourceFile(j);if(isInString(f,T))return!1;if(isInsideJsxElementOrAttribute(f,T))return x===123;if(isInTemplateString(f,T))return!1;switch(x){case 39:case 34:case 96:return!isInComment(f,T)}return!0}function X(j,T){let x=p.getCurrentSourceFile(j),f=findPrecedingToken(T,x);if(!f)return;let $=f.kind===32&&Oo(f.parent)?f.parent.parent:kd(f)&&Q0(f.parent)?f.parent:void 0;if($&&jt($))return{newText:``};let Q=f.kind===32&&k6(f.parent)?f.parent.parent:kd(f)&&dl(f.parent)?f.parent:void 0;if(Q&&qr(Q))return{newText:""}}function ee(j,T){let x=p.getCurrentSourceFile(j),f=findPrecedingToken(T,x);if(!f||f.parent.kind===312)return;let $="[a-zA-Z0-9:\\-\\._$]*";if(dl(f.parent.parent)){let Q=f.parent.parent.openingFragment,O=f.parent.parent.closingFragment;if(xl(Q)||xl(O))return;let fe=Q.getStart(x)+1,be=O.getStart(x)+2;return T!==fe&&T!==be?void 0:{ranges:[{start:fe,length:0},{start:be,length:0}],wordPattern:$}}else{let Q=Kr(f.parent,Ye=>!!(Oo(Ye)||qf(Ye)));if(!Q)return;N.assert(Oo(Q)||qf(Q),"tag should be opening or closing element");let O=Q.parent.openingElement,fe=Q.parent.closingElement,be=O.tagName.getStart(x),he=O.tagName.end,Re=fe.tagName.getStart(x),we=fe.tagName.end;return!(be<=T&&T<=he||Re<=T&&T<=we)||O.tagName.getText(x)!==fe.tagName.getText(x)?void 0:{ranges:[{start:be,length:he-be},{start:Re,length:we-Re}],wordPattern:$}}}function xe(j,T){return{lineStarts:j.getLineStarts(),firstLine:j.getLineAndCharacterOfPosition(T.pos).line,lastLine:j.getLineAndCharacterOfPosition(T.end).line}}function ke(j,T,x){let f=p.getCurrentSourceFile(j),$=[],{lineStarts:Q,firstLine:O,lastLine:fe}=xe(f,T),be=x||!1,he=Number.MAX_VALUE,Re=new Map,we=new RegExp(/\S/),et=isInsideJsxElement(f,Q[O]),Ye=et?"{/*":"//";for(let Ke=O;Ke<=fe;Ke++){let It=f.text.substring(Q[Ke],f.getLineEndOfPosition(Q[Ke])),qt=we.exec(It);qt&&(he=Math.min(he,qt.index),Re.set(Ke.toString(),qt.index),It.substr(qt.index,Ye.length)!==Ye&&(be=x===void 0||x))}for(let Ke=O;Ke<=fe;Ke++){if(O!==fe&&Q[Ke]===T.end)continue;let It=Re.get(Ke.toString());It!==void 0&&(et?$.push.apply($,Le(j,{pos:Q[Ke]+he,end:f.getLineEndOfPosition(Q[Ke])},be,et)):be?$.push({newText:Ye,span:{length:0,start:Q[Ke]+he}}):f.text.substr(Q[Ke]+It,Ye.length)===Ye&&$.push({newText:"",span:{length:Ye.length,start:Q[Ke]+It}}))}return $}function Le(j,T,x,f){var $;let Q=p.getCurrentSourceFile(j),O=[],{text:fe}=Q,be=!1,he=x||!1,Re=[],{pos:we}=T,et=f!==void 0?f:isInsideJsxElement(Q,we),Ye=et?"{/*":"/*",Ke=et?"*/}":"*/",It=et?"\\{\\/\\*":"\\/\\*",qt=et?"\\*\\/\\}":"\\*\\/";for(;we<=T.end;){let _r=fe.substr(we,Ye.length)===Ye?Ye.length:0,Te=isInComment(Q,we+_r);if(Te)et&&(Te.pos--,Te.end++),Re.push(Te.pos),Te.kind===3&&Re.push(Te.end),be=!0,we=Te.end+1;else{let ft=fe.substring(we,T.end).search(`(${It})|(${qt})`);he=x!==void 0?x:he||!isTextWhiteSpaceLike(fe,we,ft===-1?T.end:we+ft),we=ft===-1?T.end+1:we+ft+Ke.length}}if(he||!be){(($=isInComment(Q,T.pos))==null?void 0:$.kind)!==2&&yl(Re,T.pos,kr),yl(Re,T.end,kr);let _r=Re[0];fe.substr(_r,Ye.length)!==Ye&&O.push({newText:Ye,span:{length:0,start:_r}});for(let Te=1;Te0?_r-Ke.length:0,ft=fe.substr(Te,Ke.length)===Ke?Ke.length:0;O.push({newText:"",span:{length:Ye.length,start:_r-ft}})}return O}function lt(j,T){let x=p.getCurrentSourceFile(j),{firstLine:f,lastLine:$}=xe(x,T);return f===$&&T.pos!==T.end?Le(j,T,!0):ke(j,T,!0)}function yt(j,T){let x=p.getCurrentSourceFile(j),f=[],{pos:$}=T,{end:Q}=T;$===Q&&(Q+=isInsideJsxElement(x,$)?2:1);for(let O=$;O<=Q;O++){let fe=isInComment(x,O);if(fe){switch(fe.kind){case 2:f.push.apply(f,ke(j,{end:fe.end,pos:fe.pos+1},!1));break;case 3:f.push.apply(f,Le(j,{end:fe.end,pos:fe.pos+1},!1))}O=fe.end+1}}return f}function jt({openingElement:j,closingElement:T,parent:x}){return!Ti(j.tagName,T.tagName)||Q0(x)&&Ti(j.tagName,x.openingElement.tagName)&&jt(x)}function qr({closingFragment:j,parent:T}){return!!(j.flags&262144)||dl(T)&&qr(T)}function na(j,T,x){let f=p.getCurrentSourceFile(j),$=ts_formatting_exports.getRangeOfEnclosingComment(f,T);return $&&(!x||$.kind===3)?createTextSpanFromRange($):void 0}function Cn(j,T){K();let x=G(j);v.throwIfCancellationRequested();let f=x.text,$=[];if(T.length>0&&!be(x.fileName)){let he=O(),Re;for(;Re=he.exec(f);){v.throwIfCancellationRequested();let we=3;N.assert(Re.length===T.length+we);let et=Re[1],Ye=Re.index+et.length;if(!isInComment(x,Ye))continue;let Ke;for(let qt=0;qt"("+Q(Te.text)+")").join("|")+")",Ke=/(?:$|\*\/)/.source,It=/(?:.*?)/.source,qt="("+Ye+It+")",_r=et+qt+Ke;return new RegExp(_r,"gim")}function fe(he){return he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57}function be(he){return eo(he,"/node_modules/")}}function zn(j,T,x){return K(),ts_Rename_exports.getRenameInfo(d,G(j),T,x||{})}function Pi(j,T,x,f,$,Q){let[O,fe]=typeof T=="number"?[T,void 0]:[T.pos,T.end];return{file:j,startPosition:O,endPosition:fe,program:ue(),host:e,formatContext:ts_formatting_exports.getFormatContext(f,e),cancellationToken:v,preferences:x,triggerReason:$,kind:Q}}function ia(j,T,x){return{file:j,program:ue(),host:e,span:T,preferences:x,cancellationToken:v}}function Wn(j,T){return ts_SmartSelectionRange_exports.getSmartSelectionRange(T,p.getCurrentSourceFile(j))}function En(j,T,x=emptyOptions,f,$,Q){K();let O=G(j);return ts_refactor_exports.getApplicableRefactors(Pi(O,T,x,emptyOptions,f,$),Q)}function Ii(j,T,x=emptyOptions){K();let f=G(j),$=N.checkDefined(d.getSourceFiles()),Q=rl(j),O=Za($,be=>!(d!=null&&d.isSourceFileFromExternalLibrary(f))&&!(f===G(be.fileName)||Q===".ts"&&rl(be.fileName)===".d.ts"||Q===".d.ts"&&Fr(T_(be.fileName),"lib.")&&rl(be.fileName)===".d.ts")&&Q===rl(be.fileName)?be.fileName:void 0);return{newFileName:createNewFileName(f,d,Pi(f,T,x,emptyOptions),e),files:O}}function aa(j,T,x,f,$,Q=emptyOptions,O){K();let fe=G(j);return ts_refactor_exports.getEditsForRefactor(Pi(fe,x,Q,T),f,$,O)}function Vn(j,T){return T===0?{line:0,character:0}:L.toLineColumnOffset(j,T)}function Sr(j,T){K();let x=ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(d,getTouchingPropertyName(G(j),T));return x&&mapOneOrMany(x,f=>ts_CallHierarchy_exports.createCallHierarchyItem(d,f))}function Je(j,T){K();let x=G(j),f=firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(d,T===0?x:getTouchingPropertyName(x,T)));return f?ts_CallHierarchy_exports.getIncomingCalls(d,f,v):[]}function oa(j,T){K();let x=G(j),f=firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(d,T===0?x:getTouchingPropertyName(x,T)));return f?ts_CallHierarchy_exports.getOutgoingCalls(d,f):[]}function Mt(j,T,x=emptyOptions){K();let f=G(j);return ts_InlayHints_exports.provideInlayHints(ia(f,T,x))}let Lr={dispose:Ce,cleanupSemanticCache:ae,getSyntacticDiagnostics:Ze,getSemanticDiagnostics:qe,getSuggestionDiagnostics:rt,getCompilerOptionsDiagnostics:it,getSyntacticClassifications:at,getSemanticClassifications:pt,getEncodedSyntacticClassifications:er,getEncodedSemanticClassifications:Mr,getCompletionsAtPosition:Ir,getCompletionEntryDetails:ar,getCompletionEntrySymbol:ci,getSignatureHelpItems:Ut,getQuickInfoAtPosition:or,getDefinitionAtPosition:Gt,getDefinitionAndBoundSpan:Ur,getImplementationAtPosition:Tn,getTypeDefinitionAtPosition:Xt,getReferencesAtPosition:$t,findReferences:xn,getFileReferences:Tr,getDocumentHighlights:Sn,getNameOrDottedNameSpan:ht,getBreakpointStatementAtPosition:wn,getNavigateToItems:vt,getRenameInfo:zn,getSmartSelectionRange:Wn,findRenameLocations:sr,getNavigationBarItems:Tt,getNavigationTree:Or,getOutliningSpans:Qt,getTodoComments:Cn,getBraceMatchingAtPosition:Bn,getIndentationAtPosition:Un,getFormattingEditsForRange:rn,getFormattingEditsForDocument:nn,getFormattingEditsAfterKeystroke:Di,getDocCommentTemplateAtPosition:nt,isValidBraceCompletionAtPosition:z,getJsxClosingTagAtPosition:X,getLinkedEditingRangeAtPosition:ee,getSpanOfEnclosingComment:na,getCodeFixesAtPosition:qn,getCombinedCodeFix:Ae,applyCodeActionCommand:ge,organizeImports:q,getEditsForFileRename:oe,getEmitOutput:ct,getNonBoundSourceFile:fr,getProgram:ue,getCurrentProgram:()=>d,getAutoImportProvider:Y,updateIsDefinitionOfReferencedSymbols:B,getApplicableRefactors:En,getEditsForRefactor:aa,getMoveToRefactoringFileSuggestions:Ii,toLineColumnOffset:Vn,getSourceMapper:()=>L,clearSourceMapperCache:()=>L.clearCache(),prepareCallHierarchy:Sr,provideCallHierarchyIncomingCalls:Je,provideCallHierarchyOutgoingCalls:oa,toggleLineComment:ke,toggleMultilineComment:Le,commentSelection:lt,uncommentSelection:yt,provideInlayHints:Mt,getSupportedCodeFixes:c7};switch(_){case 0:break;case 1:rg.forEach(j=>Lr[j]=()=>{throw new Error(`LanguageService Operation: ${j} not allowed in LanguageServiceMode.PartialSemantic`)});break;case 2:w7.forEach(j=>Lr[j]=()=>{throw new Error(`LanguageService Operation: ${j} not allowed in LanguageServiceMode.Syntactic`)});break;default:N.assertNever(_)}return Lr}function tB(e){return e.nameTable||rB(e),e.nameTable}function rB(e){let t=e.nameTable=new Map;e.forEachChild(function r(a){if(Ee(a)&&!isTagName(a)&&a.escapedText||Qi(a)&&nB(a)){let _=JT(a);t.set(_,t.get(_)===void 0?a.pos:-1)}else if(jr(a)){let _=a.escapedText;t.set(_,t.get(_)===void 0?a.pos:-1)}if(Bt(a,r),Wi(a))for(let _ of a.jsDoc)Bt(_,r)})}function nB(e){return wT(e)||e.parent.kind===283||oB(e)||CT(e)}function p7(e){let t=iB(e);return t&&(uo(t.parent)||D6(t.parent))?t:void 0}function iB(e){switch(e.kind){case 11:case 15:case 9:if(e.parent.kind===167)return b0(e.parent.parent)?e.parent.parent:void 0;case 80:return b0(e.parent)&&(e.parent.parent.kind===210||e.parent.parent.kind===292)&&e.parent.name===e?e.parent:void 0}}function aB(e,t){let r=p7(e);if(r){let a=t.getContextualType(r.parent),_=a&&f7(r,t,a,!1);if(_&&_.length===1)return og(_)}return t.getSymbolAtLocation(e)}function f7(e,t,r,a){let _=getNameFromPropertyName(e.name);if(!_)return $e;if(!r.isUnion()){let d=r.getProperty(_);return d?[d]:$e}let p=Za(r.types,d=>(uo(e.parent)||D6(e.parent))&&t.isTypeInvalidDueToUnionDiscriminant(d,e.parent)?void 0:d.getProperty(_));if(a&&(p.length===0||p.length===r.types.length)){let d=r.getProperty(_);if(d)return[d]}return p.length===0?Za(r.types,d=>d.getProperty(_)):p}function oB(e){return e&&e.parent&&e.parent.kind===212&&e.parent.argumentExpression===e}function sB(e){if(f0)return hr($i(pn(f0.getExecutingFilePath())),T4(e));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}var d7,Nd,Df,m7,W6,Od,Md,h7,y7,g7,b7,v7,T7,S7,x7,rg,w7,_B=Vt({"src/services/services.ts"(){"use strict";C7(),r7(),n7(),i7(),t7(),$F(),d7="0.8",Nd=class{constructor(e,t,r){this.pos=t,this.end=r,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.kind=e}assertHasRealPosition(e){N.assert(!Oa(this.pos)&&!Oa(this.end),e||"Node must have a real position for this operation")}getSourceFile(){return ri(this)}getStart(e,t){return this.assertHasRealPosition(),Go(this,e,t)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos}getFullText(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(e){return this.getChildren(e).length}getChildAt(e,t){return this.getChildren(t)[e]}getChildren(e){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),this._children||(this._children=QF(this,e))}getFirstToken(e){this.assertHasRealPosition();let t=this.getChildren(e);if(!t.length)return;let r=Yr(t,a=>a.kind<316||a.kind>357);return r.kind<166?r:r.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();let t=this.getChildren(e),r=wi(t);if(r)return r.kind<166?r:r.getLastToken(e)}forEachChild(e,t){return Bt(this,e,t)}},Df=class{constructor(e,t){this.pos=e,this.end=t,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0}getSourceFile(){return ri(this)}getStart(e,t){return Go(this,e,t)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(e){return this.getEnd()-this.getStart(e)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(e){return this.getStart(e)-this.pos}getFullText(e){return(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(){return this.getChildren().length}getChildAt(e){return this.getChildren()[e]}getChildren(){return this.kind===1&&this.jsDoc||$e}getFirstToken(){}getLastToken(){}forEachChild(){}},m7=class{constructor(e,t){this.id=0,this.mergeId=0,this.flags=e,this.escapedName=t}getFlags(){return this.flags}get name(){return md(this)}getEscapedName(){return this.escapedName}getName(){return this.name}getDeclarations(){return this.declarations}getDocumentationComment(e){if(!this.documentationComment)if(this.documentationComment=$e,!this.declarations&&T0(this)&&this.links.target&&T0(this.links.target)&&this.links.target.links.tupleLabelDeclaration){let t=this.links.target.links.tupleLabelDeclaration;this.documentationComment=Kc([t],e)}else this.documentationComment=Kc(this.declarations,e);return this.documentationComment}getContextualDocumentationComment(e,t){if(e){if(el(e)&&(this.contextualGetAccessorDocumentationComment||(this.contextualGetAccessorDocumentationComment=Kc($r(this.declarations,el),t)),Ka(this.contextualGetAccessorDocumentationComment)))return this.contextualGetAccessorDocumentationComment;if(Zc(e)&&(this.contextualSetAccessorDocumentationComment||(this.contextualSetAccessorDocumentationComment=Kc($r(this.declarations,Zc),t)),Ka(this.contextualSetAccessorDocumentationComment)))return this.contextualSetAccessorDocumentationComment}return this.getDocumentationComment(t)}getJsDocTags(e){return this.tags===void 0&&(this.tags=kf(this.declarations,e)),this.tags}getContextualJsDocTags(e,t){if(e){if(el(e)&&(this.contextualGetAccessorTags||(this.contextualGetAccessorTags=kf($r(this.declarations,el),t)),Ka(this.contextualGetAccessorTags)))return this.contextualGetAccessorTags;if(Zc(e)&&(this.contextualSetAccessorTags||(this.contextualSetAccessorTags=kf($r(this.declarations,Zc),t)),Ka(this.contextualSetAccessorTags)))return this.contextualSetAccessorTags}return this.getJsDocTags(t)}},W6=class extends Df{constructor(e,t,r){super(t,r),this.kind=e}},Od=class extends Df{constructor(e,t,r){super(t,r),this.kind=80}get text(){return Ot(this)}},Od.prototype.kind=80,Md=class extends Df{constructor(e,t,r){super(t,r),this.kind=81}get text(){return Ot(this)}},Md.prototype.kind=81,h7=class{constructor(e,t){this.checker=e,this.flags=t}getFlags(){return this.flags}getSymbol(){return this.symbol}getProperties(){return this.checker.getPropertiesOfType(this)}getProperty(e){return this.checker.getPropertyOfType(this,e)}getApparentProperties(){return this.checker.getAugmentedPropertiesOfType(this)}getCallSignatures(){return this.checker.getSignaturesOfType(this,0)}getConstructSignatures(){return this.checker.getSignaturesOfType(this,1)}getStringIndexType(){return this.checker.getIndexTypeOfType(this,0)}getNumberIndexType(){return this.checker.getIndexTypeOfType(this,1)}getBaseTypes(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0}isNullableType(){return this.checker.isNullableType(this)}getNonNullableType(){return this.checker.getNonNullableType(this)}getNonOptionalType(){return this.checker.getNonOptionalType(this)}getConstraint(){return this.checker.getBaseConstraintOfType(this)}getDefault(){return this.checker.getDefaultFromTypeParameter(this)}isUnion(){return!!(this.flags&1048576)}isIntersection(){return!!(this.flags&2097152)}isUnionOrIntersection(){return!!(this.flags&3145728)}isLiteral(){return!!(this.flags&2432)}isStringLiteral(){return!!(this.flags&128)}isNumberLiteral(){return!!(this.flags&256)}isTypeParameter(){return!!(this.flags&262144)}isClassOrInterface(){return!!(Rf(this)&3)}isClass(){return!!(Rf(this)&1)}isIndexType(){return!!(this.flags&4194304)}get typeArguments(){if(Rf(this)&4)return this.checker.getTypeArguments(this)}},y7=class{constructor(e,t){this.checker=e,this.flags=t}getDeclaration(){return this.declaration}getTypeParameters(){return this.typeParameters}getParameters(){return this.parameters}getReturnType(){return this.checker.getReturnTypeOfSignature(this)}getTypeParameterAtPosition(e){let t=this.checker.getParameterType(this,e);if(t.isIndexType()&&ox(t.type)){let r=t.type.getConstraint();if(r)return this.checker.getIndexType(r)}return t}getDocumentationComment(){return this.documentationComment||(this.documentationComment=Kc($f(this.declaration),this.checker))}getJsDocTags(){return this.jsDocTags||(this.jsDocTags=kf($f(this.declaration),this.checker))}},g7=class extends Nd{constructor(e,t,r){super(e,t,r),this.kind=312}update(e,t){return q6(this,e,t)}getLineAndCharacterOfPosition(e){return to(this,e)}getLineStarts(){return Ia(this)}getPositionOfLineAndCharacter(e,t,r){return Tg(Ia(this),e,t,this.text,r)}getLineEndOfPosition(e){let{line:t}=this.getLineAndCharacterOfPosition(e),r=this.getLineStarts(),a;t+1>=r.length&&(a=this.getEnd()),a||(a=r[t+1]-1);let _=this.getFullText();return _[a]===` -`&&_[a-1]==="\r"?a-1:a}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=jd();return this.forEachChild(_),e;function t(p){let d=a(p);d&&e.add(d,p)}function r(p){let d=e.get(p);return d||e.set(p,d=[]),d}function a(p){let d=Yd(p);return d&&(ao(d)&&Br(d.expression)?d.expression.name.text:zl(d)?getNameFromPropertyName(d):void 0)}function _(p){switch(p.kind){case 262:case 218:case 174:case 173:let d=p,h=a(d);if(h){let y=r(h),C=wi(y);C&&d.parent===C.parent&&d.symbol===C.symbol?d.body&&!C.body&&(y[y.length-1]=d):y.push(d)}Bt(p,_);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(p),Bt(p,_);break;case 169:if(!gr(p,16476))break;case 260:case 208:{let y=p;if(im(y.name)){Bt(y.name,_);break}y.initializer&&_(y.initializer)}case 306:case 172:case 171:t(p);break;case 278:let l=p;l.exportClause&&(d8(l.exportClause)?yr(l.exportClause.elements,_):_(l.exportClause.name));break;case 272:let v=p.importClause;v&&(v.name&&t(v.name),v.namedBindings&&(v.namedBindings.kind===274?t(v.namedBindings):yr(v.namedBindings.elements,_)));break;case 226:Ja(p)!==0&&t(p);default:Bt(p,_)}}}},b7=class{constructor(e,t,r){this.fileName=e,this.text=t,this.skipTrivia=r}getLineAndCharacterOfPosition(e){return to(this,e)}},v7=class{constructor(e){this.host=e}getCurrentSourceFile(e){var t,r,a,_,p,d,h,l;let v=this.host.getScriptSnapshot(e);if(!v)throw new Error("Could not find file: '"+e+"'.");let y=getScriptKind(e,this.host),C=this.host.getScriptVersion(e),S;if(this.currentFileName!==e){let k={languageVersion:99,impliedNodeFormat:getImpliedNodeFormatForFile(xi(e,this.host.getCurrentDirectory(),((a=(r=(t=this.host).getCompilerHost)==null?void 0:r.call(t))==null?void 0:a.getCanonicalFileName)||VT(this.host)),(l=(h=(d=(p=(_=this.host).getCompilerHost)==null?void 0:p.call(_))==null?void 0:d.getModuleResolutionCache)==null?void 0:h.call(d))==null?void 0:l.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:RS(this.host.getCompilationSettings())};S=z6(e,v,k,C,!0,y)}else if(this.currentFileVersion!==C){let k=v.getChangeRange(this.currentFileScriptSnapshot);S=u7(this.currentSourceFile,v,C,k)}return S&&(this.currentFileVersion=C,this.currentFileName=e,this.currentFileScriptSnapshot=v,this.currentSourceFile=S),this.currentSourceFile}},T7={isCancellationRequested:Xf,throwIfCancellationRequested:Rn},S7=class{constructor(e){this.cancellationToken=e}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw(e=xa)==null||e.instant(xa.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new id}},x7=class{constructor(e,t=20){this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}isCancellationRequested(){let e=Sa();return Math.abs(e-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds?(this.lastCancellationCheckTime=e,this.hostCancellationToken.isCancellationRequested()):!1}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw(e=xa)==null||e.instant(xa.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new id}},rg=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes"],w7=[...rg,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"],IS(KF())}}),cB=()=>{},lB=()=>{},uB=()=>{},pB=()=>{},fB=()=>{},dB=()=>{},mB=()=>{},hB=()=>{},yB=()=>{},gB=()=>{},bB=()=>{},vB=()=>{},TB=()=>{},SB=()=>{},xB=()=>{},wB=()=>{},CB=()=>{},EB=()=>{},AB=()=>{},C7=Vt({"src/services/_namespaces/ts.ts"(){"use strict";Dr(),Z8(),FF(),e7(),BF(),t7(),UF(),qF(),zF(),WF(),VF(),HF(),GF(),XF(),_B(),cB(),lB(),uB(),pB(),fB(),dB(),mB(),hB(),yB(),gB(),bB(),r7(),n7(),vB(),TB(),i7(),SB(),xB(),wB(),CB(),EB(),AB()}}),kB=()=>{},E7={};N5(E7,{ANONYMOUS:()=>ANONYMOUS,AccessFlags:()=>Ly,AssertionLevel:()=>ay,AssignmentDeclarationKind:()=>Wy,AssignmentKind:()=>B0,Associativity:()=>q0,BreakpointResolver:()=>ts_BreakpointResolver_exports,BuilderFileEmit:()=>BuilderFileEmit,BuilderProgramKind:()=>BuilderProgramKind,BuilderState:()=>BuilderState,BundleFileSectionKind:()=>l0,CallHierarchy:()=>ts_CallHierarchy_exports,CharacterCodes:()=>n0,CheckFlags:()=>Py,CheckMode:()=>CheckMode,ClassificationType:()=>ClassificationType,ClassificationTypeNames:()=>ClassificationTypeNames,CommentDirectiveType:()=>fy,Comparison:()=>Zh,CompletionInfoFlags:()=>CompletionInfoFlags,CompletionTriggerKind:()=>CompletionTriggerKind,Completions:()=>ts_Completions_exports,ConfigFileProgramReloadLevel:()=>ConfigFileProgramReloadLevel,ContainerFlags:()=>ContainerFlags,ContextFlags:()=>Ty,CoreServicesShimHostAdapter:()=>CoreServicesShimHostAdapter,Debug:()=>N,DiagnosticCategory:()=>cd,Diagnostics:()=>U,DocumentHighlights:()=>DocumentHighlights,ElementFlags:()=>My,EmitFlags:()=>fd,EmitHint:()=>s0,EmitOnly:()=>hy,EndOfLineState:()=>EndOfLineState,EnumKind:()=>Dy,ExitStatus:()=>gy,ExportKind:()=>ExportKind,Extension:()=>i0,ExternalEmitHelpers:()=>o0,FileIncludeKind:()=>dy,FilePreprocessingDiagnosticsKind:()=>my,FileSystemEntryKind:()=>FileSystemEntryKind,FileWatcherEventKind:()=>FileWatcherEventKind,FindAllReferences:()=>ts_FindAllReferences_exports,FlattenLevel:()=>FlattenLevel,FlowFlags:()=>bl,ForegroundColorEscapeSequences:()=>ForegroundColorEscapeSequences,FunctionFlags:()=>U0,GeneratedIdentifierFlags:()=>uy,GetLiteralTextFlags:()=>F0,GoToDefinition:()=>ts_GoToDefinition_exports,HighlightSpanKind:()=>HighlightSpanKind,IdentifierNameMap:()=>IdentifierNameMap,IdentifierNameMultiMap:()=>IdentifierNameMultiMap,ImportKind:()=>ImportKind,ImportsNotUsedAsValues:()=>Ky,IndentStyle:()=>IndentStyle,IndexFlags:()=>Jy,IndexKind:()=>Fy,InferenceFlags:()=>qy,InferencePriority:()=>Uy,InlayHintKind:()=>InlayHintKind,InlayHints:()=>ts_InlayHints_exports,InternalEmitFlags:()=>a0,InternalSymbolName:()=>Iy,InvalidatedProjectKind:()=>InvalidatedProjectKind,JsDoc:()=>ts_JsDoc_exports,JsTyping:()=>ts_JsTyping_exports,JsxEmit:()=>Yy,JsxFlags:()=>ly,JsxReferenceKind:()=>Ry,LanguageServiceMode:()=>LanguageServiceMode,LanguageServiceShimHostAdapter:()=>LanguageServiceShimHostAdapter,LanguageVariant:()=>t0,LexicalEnvironmentFlags:()=>c0,ListFormat:()=>u0,LogLevel:()=>sy,MemberOverrideStatus:()=>by,ModifierFlags:()=>rd,ModuleDetectionKind:()=>Hy,ModuleInstanceState:()=>ModuleInstanceState,ModuleKind:()=>Qy,ModuleResolutionKind:()=>Vy,ModuleSpecifierEnding:()=>G0,NavigateTo:()=>ts_NavigateTo_exports,NavigationBar:()=>ts_NavigationBar_exports,NewLineKind:()=>Zy,NodeBuilderFlags:()=>Sy,NodeCheckFlags:()=>Ny,NodeFactoryFlags:()=>X0,NodeFlags:()=>td,NodeResolutionFeatures:()=>NodeResolutionFeatures,ObjectFlags:()=>sd,OperationCanceledException:()=>id,OperatorPrecedence:()=>z0,OrganizeImports:()=>ts_OrganizeImports_exports,OrganizeImportsMode:()=>OrganizeImportsMode,OuterExpressionKinds:()=>_0,OutliningElementsCollector:()=>ts_OutliningElementsCollector_exports,OutliningSpanKind:()=>OutliningSpanKind,OutputFileType:()=>OutputFileType,PackageJsonAutoImportPreference:()=>PackageJsonAutoImportPreference,PackageJsonDependencyGroup:()=>PackageJsonDependencyGroup,PatternMatchKind:()=>PatternMatchKind,PollingInterval:()=>PollingInterval,PollingWatchKind:()=>$y,PragmaKindFlags:()=>p0,PrivateIdentifierKind:()=>PrivateIdentifierKind,ProcessLevel:()=>ProcessLevel,QuotePreference:()=>QuotePreference,RelationComparisonResult:()=>nd,Rename:()=>ts_Rename_exports,ScriptElementKind:()=>ScriptElementKind,ScriptElementKindModifier:()=>ScriptElementKindModifier,ScriptKind:()=>ld,ScriptSnapshot:()=>ScriptSnapshot,ScriptTarget:()=>e0,SemanticClassificationFormat:()=>SemanticClassificationFormat,SemanticMeaning:()=>SemanticMeaning,SemicolonPreference:()=>SemicolonPreference,SignatureCheckMode:()=>SignatureCheckMode,SignatureFlags:()=>_d,SignatureHelp:()=>ts_SignatureHelp_exports,SignatureKind:()=>jy,SmartSelectionRange:()=>ts_SmartSelectionRange_exports,SnippetKind:()=>pd,SortKind:()=>ny,StructureIsReused:()=>yy,SymbolAccessibility:()=>Cy,SymbolDisplay:()=>ts_SymbolDisplay_exports,SymbolDisplayPartKind:()=>SymbolDisplayPartKind,SymbolFlags:()=>ad,SymbolFormatFlags:()=>wy,SyntaxKind:()=>ed,SyntheticSymbolKind:()=>Ey,Ternary:()=>zy,ThrottledCancellationToken:()=>x7,TokenClass:()=>TokenClass,TokenFlags:()=>py,TransformFlags:()=>ud,TypeFacts:()=>TypeFacts,TypeFlags:()=>od,TypeFormatFlags:()=>xy,TypeMapKind:()=>By,TypePredicateKind:()=>Ay,TypeReferenceSerializationKind:()=>ky,TypeScriptServicesFactory:()=>TypeScriptServicesFactory,UnionReduction:()=>vy,UpToDateStatusType:()=>UpToDateStatusType,VarianceFlags:()=>Oy,Version:()=>Version,VersionRange:()=>VersionRange,WatchDirectoryFlags:()=>r0,WatchDirectoryKind:()=>Xy,WatchFileKind:()=>Gy,WatchLogLevel:()=>WatchLogLevel,WatchType:()=>WatchType,accessPrivateIdentifier:()=>accessPrivateIdentifier,addDisposableResourceHelper:()=>addDisposableResourceHelper,addEmitFlags:()=>addEmitFlags,addEmitHelper:()=>addEmitHelper,addEmitHelpers:()=>addEmitHelpers,addInternalEmitFlags:()=>addInternalEmitFlags,addNodeFactoryPatcher:()=>AL,addObjectAllocatorPatcher:()=>WO,addRange:()=>Rr,addRelatedInfo:()=>nl,addSyntheticLeadingComment:()=>addSyntheticLeadingComment,addSyntheticTrailingComment:()=>addSyntheticTrailingComment,addToSeen:()=>IO,advancedAsyncSuperHelper:()=>advancedAsyncSuperHelper,affectsDeclarationPathOptionDeclarations:()=>affectsDeclarationPathOptionDeclarations,affectsEmitOptionDeclarations:()=>affectsEmitOptionDeclarations,allKeysStartWithDot:()=>allKeysStartWithDot,altDirectorySeparator:()=>vg,and:()=>nE,append:()=>xt,appendIfUnique:()=>Cv,arrayFrom:()=>Rd,arrayIsEqualTo:()=>_C,arrayIsHomogeneous:()=>YM,arrayIsSorted:()=>oC,arrayOf:()=>SC,arrayReverseIterator:()=>pC,arrayToMap:()=>wC,arrayToMultiMap:()=>Pv,arrayToNumericMap:()=>CC,arraysEqual:()=>bv,assertType:()=>aE,assign:()=>xC,assignHelper:()=>assignHelper,asyncDelegator:()=>asyncDelegator,asyncGeneratorHelper:()=>asyncGeneratorHelper,asyncSuperHelper:()=>asyncSuperHelper,asyncValues:()=>asyncValues,attachFileToDiagnostics:()=>$a,awaitHelper:()=>awaitHelper,awaiterHelper:()=>awaiterHelper,base64decode:()=>ZN,base64encode:()=>KN,binarySearch:()=>Ml,binarySearchKey:()=>kv,bindSourceFile:()=>bindSourceFile,breakIntoCharacterSpans:()=>breakIntoCharacterSpans,breakIntoWordSpans:()=>breakIntoWordSpans,buildLinkParts:()=>buildLinkParts,buildOpts:()=>buildOpts,buildOverload:()=>buildOverload,bundlerModuleNameResolver:()=>bundlerModuleNameResolver,canBeConvertedToAsync:()=>canBeConvertedToAsync,canHaveDecorators:()=>q8,canHaveExportModifier:()=>uL,canHaveFlowNode:()=>vI,canHaveIllegalDecorators:()=>WR,canHaveIllegalModifiers:()=>VR,canHaveIllegalType:()=>zR,canHaveIllegalTypeParameters:()=>F8,canHaveJSDoc:()=>dm,canHaveLocals:()=>Sk,canHaveModifiers:()=>q_,canHaveSymbol:()=>Tk,canJsonReportNoInputFiles:()=>canJsonReportNoInputFiles,canProduceDiagnostics:()=>canProduceDiagnostics,canUsePropertyAccess:()=>pL,canWatchAffectingLocation:()=>canWatchAffectingLocation,canWatchAtTypes:()=>canWatchAtTypes,canWatchDirectoryOrFile:()=>canWatchDirectoryOrFile,cartesianProduct:()=>sE,cast:()=>gi,chainBundle:()=>chainBundle,chainDiagnosticMessages:()=>tl,changeAnyExtension:()=>Yv,changeCompilerHostLikeToUseCache:()=>changeCompilerHostLikeToUseCache,changeExtension:()=>MM,changesAffectModuleResolution:()=>qk,changesAffectingProgramStructure:()=>zk,childIsDecorated:()=>s2,classElementOrClassElementParameterIsDecorated:()=>zP,classHasClassThisAssignment:()=>classHasClassThisAssignment,classHasDeclaredOrExplicitlyAssignedName:()=>classHasDeclaredOrExplicitlyAssignedName,classHasExplicitlyAssignedName:()=>classHasExplicitlyAssignedName,classOrConstructorParameterIsDecorated:()=>qP,classPrivateFieldGetHelper:()=>classPrivateFieldGetHelper,classPrivateFieldInHelper:()=>classPrivateFieldInHelper,classPrivateFieldSetHelper:()=>classPrivateFieldSetHelper,classicNameResolver:()=>classicNameResolver,classifier:()=>ts_classifier_exports,cleanExtendedConfigCache:()=>cleanExtendedConfigCache,clear:()=>q5,clearMap:()=>CO,clearSharedExtendedConfigFileWatcher:()=>clearSharedExtendedConfigFileWatcher,climbPastPropertyAccess:()=>climbPastPropertyAccess,climbPastPropertyOrElementAccess:()=>climbPastPropertyOrElementAccess,clone:()=>kC,cloneCompilerOptions:()=>cloneCompilerOptions,closeFileWatcher:()=>gO,closeFileWatcherOf:()=>closeFileWatcherOf,codefix:()=>ts_codefix_exports,collapseTextChangeRangesAcrossMultipleVersions:()=>nA,collectExternalModuleInfo:()=>collectExternalModuleInfo,combine:()=>uC,combinePaths:()=>hr,commentPragmas:()=>qd,commonOptionsWithBuild:()=>commonOptionsWithBuild,commonPackageFolders:()=>V0,compact:()=>cC,compareBooleans:()=>GC,compareDataObjects:()=>ES,compareDiagnostics:()=>F2,compareDiagnosticsSkipRelatedInformation:()=>xd,compareEmitHelpers:()=>compareEmitHelpers,compareNumberOfDirectorySeparators:()=>OM,comparePaths:()=>OE,comparePathsCaseInsensitive:()=>NE,comparePathsCaseSensitive:()=>IE,comparePatternKeys:()=>comparePatternKeys,compareProperties:()=>HC,compareStringsCaseInsensitive:()=>Fd,compareStringsCaseInsensitiveEslintCompatible:()=>zC,compareStringsCaseSensitive:()=>Ci,compareStringsCaseSensitiveUI:()=>VC,compareTextSpans:()=>UC,compareValues:()=>kr,compileOnSaveCommandLineOption:()=>compileOnSaveCommandLineOption,compilerOptionsAffectDeclarationPath:()=>dM,compilerOptionsAffectEmit:()=>fM,compilerOptionsAffectSemanticDiagnostics:()=>pM,compilerOptionsDidYouMeanDiagnostics:()=>compilerOptionsDidYouMeanDiagnostics,compilerOptionsIndicateEsModules:()=>compilerOptionsIndicateEsModules,compose:()=>BC,computeCommonSourceDirectoryOfFilenames:()=>computeCommonSourceDirectoryOfFilenames,computeLineAndCharacterOfPosition:()=>Sg,computeLineOfPosition:()=>__,computeLineStarts:()=>Vd,computePositionOfLineAndCharacter:()=>Tg,computeSignature:()=>computeSignature,computeSignatureWithDiagnostics:()=>computeSignatureWithDiagnostics,computeSuggestionDiagnostics:()=>computeSuggestionDiagnostics,concatenate:()=>y_,concatenateDiagnosticMessageChains:()=>XO,consumesNodeCoreModules:()=>consumesNodeCoreModules,contains:()=>es,containsIgnoredPath:()=>nx,containsObjectRestOrSpread:()=>U6,containsParseError:()=>xl,containsPath:()=>Kv,convertCompilerOptionsForTelemetry:()=>convertCompilerOptionsForTelemetry,convertCompilerOptionsFromJson:()=>convertCompilerOptionsFromJson,convertJsonOption:()=>convertJsonOption,convertToBase64:()=>gS,convertToJson:()=>convertToJson,convertToObject:()=>convertToObject,convertToOptionsWithAbsolutePaths:()=>convertToOptionsWithAbsolutePaths,convertToRelativePath:()=>LE,convertToTSConfig:()=>convertToTSConfig,convertTypeAcquisitionFromJson:()=>convertTypeAcquisitionFromJson,copyComments:()=>copyComments,copyEntries:()=>Gk,copyLeadingComments:()=>copyLeadingComments,copyProperties:()=>PC,copyTrailingAsLeadingComments:()=>copyTrailingAsLeadingComments,copyTrailingComments:()=>copyTrailingComments,couldStartTrivia:()=>zE,countWhere:()=>B5,createAbstractBuilder:()=>createAbstractBuilder,createAccessorPropertyBackingField:()=>xj,createAccessorPropertyGetRedirector:()=>wj,createAccessorPropertySetRedirector:()=>Cj,createBaseNodeFactory:()=>Lx,createBinaryExpressionTrampoline:()=>hj,createBindingHelper:()=>createBindingHelper,createBuildInfo:()=>createBuildInfo,createBuilderProgram:()=>createBuilderProgram,createBuilderProgramUsingProgramBuildInfo:()=>createBuilderProgramUsingProgramBuildInfo,createBuilderStatusReporter:()=>createBuilderStatusReporter,createCacheWithRedirects:()=>createCacheWithRedirects,createCacheableExportInfoMap:()=>createCacheableExportInfoMap,createCachedDirectoryStructureHost:()=>createCachedDirectoryStructureHost,createClassNamedEvaluationHelperBlock:()=>createClassNamedEvaluationHelperBlock,createClassThisAssignmentBlock:()=>createClassThisAssignmentBlock,createClassifier:()=>createClassifier,createCommentDirectivesMap:()=>gD,createCompilerDiagnostic:()=>fl,createCompilerDiagnosticForInvalidCustomType:()=>createCompilerDiagnosticForInvalidCustomType,createCompilerDiagnosticFromMessageChain:()=>GO,createCompilerHost:()=>createCompilerHost,createCompilerHostFromProgramHost:()=>createCompilerHostFromProgramHost,createCompilerHostWorker:()=>createCompilerHostWorker,createDetachedDiagnostic:()=>Ao,createDiagnosticCollection:()=>iN,createDiagnosticForFileFromMessageChain:()=>QD,createDiagnosticForNode:()=>HD,createDiagnosticForNodeArray:()=>GD,createDiagnosticForNodeArrayFromMessageChain:()=>$D,createDiagnosticForNodeFromMessageChain:()=>XD,createDiagnosticForNodeInSourceFile:()=>W3,createDiagnosticForRange:()=>KD,createDiagnosticMessageChainFromDiagnostic:()=>YD,createDiagnosticReporter:()=>createDiagnosticReporter,createDocumentPositionMapper:()=>createDocumentPositionMapper,createDocumentRegistry:()=>createDocumentRegistry,createDocumentRegistryInternal:()=>createDocumentRegistryInternal,createEmitAndSemanticDiagnosticsBuilderProgram:()=>createEmitAndSemanticDiagnosticsBuilderProgram,createEmitHelperFactory:()=>createEmitHelperFactory,createEmptyExports:()=>yR,createExpressionForJsxElement:()=>bR,createExpressionForJsxFragment:()=>vR,createExpressionForObjectLiteralElementLike:()=>AR,createExpressionForPropertyName:()=>k8,createExpressionFromEntityName:()=>A8,createExternalHelpersImportDeclarationIfNeeded:()=>JR,createFileDiagnostic:()=>j2,createFileDiagnosticFromMessageChain:()=>Kg,createForOfBindingStatement:()=>TR,createGetCanonicalFileName:()=>Bd,createGetSourceFile:()=>createGetSourceFile,createGetSymbolAccessibilityDiagnosticForNode:()=>createGetSymbolAccessibilityDiagnosticForNode,createGetSymbolAccessibilityDiagnosticForNodeName:()=>createGetSymbolAccessibilityDiagnosticForNodeName,createGetSymbolWalker:()=>createGetSymbolWalker,createIncrementalCompilerHost:()=>createIncrementalCompilerHost,createIncrementalProgram:()=>createIncrementalProgram,createInputFiles:()=>LL,createInputFilesWithFilePaths:()=>jx,createInputFilesWithFileTexts:()=>Fx,createJsxFactoryExpression:()=>E8,createLanguageService:()=>eB,createLanguageServiceSourceFile:()=>z6,createMemberAccessForPropertyName:()=>Lm,createModeAwareCache:()=>createModeAwareCache,createModeAwareCacheKey:()=>createModeAwareCacheKey,createModuleNotFoundChain:()=>tD,createModuleResolutionCache:()=>createModuleResolutionCache,createModuleResolutionLoader:()=>createModuleResolutionLoader,createModuleSpecifierResolutionHost:()=>createModuleSpecifierResolutionHost,createMultiMap:()=>jd,createNodeConverters:()=>Jx,createNodeFactory:()=>Ad,createOptionNameMap:()=>createOptionNameMap,createOverload:()=>createOverload,createPackageJsonImportFilter:()=>createPackageJsonImportFilter,createPackageJsonInfo:()=>createPackageJsonInfo,createParenthesizerRules:()=>createParenthesizerRules,createPatternMatcher:()=>createPatternMatcher,createPrependNodes:()=>createPrependNodes,createPrinter:()=>createPrinter,createPrinterWithDefaults:()=>createPrinterWithDefaults,createPrinterWithRemoveComments:()=>createPrinterWithRemoveComments,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>createPrinterWithRemoveCommentsNeverAsciiEscape,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>createPrinterWithRemoveCommentsOmitTrailingSemicolon,createProgram:()=>createProgram,createProgramHost:()=>createProgramHost,createPropertyNameNodeForIdentifierOrLiteral:()=>_L,createQueue:()=>OC,createRange:()=>Tm,createRedirectedBuilderProgram:()=>createRedirectedBuilderProgram,createResolutionCache:()=>createResolutionCache,createRuntimeTypeSerializer:()=>createRuntimeTypeSerializer,createScanner:()=>ns,createSemanticDiagnosticsBuilderProgram:()=>createSemanticDiagnosticsBuilderProgram,createSet:()=>MC,createSolutionBuilder:()=>createSolutionBuilder,createSolutionBuilderHost:()=>createSolutionBuilderHost,createSolutionBuilderWithWatch:()=>createSolutionBuilderWithWatch,createSolutionBuilderWithWatchHost:()=>createSolutionBuilderWithWatchHost,createSortedArray:()=>aC,createSourceFile:()=>H8,createSourceMapGenerator:()=>createSourceMapGenerator,createSourceMapSource:()=>JL,createSuperAccessVariableStatement:()=>createSuperAccessVariableStatement,createSymbolTable:()=>Bk,createSymlinkCache:()=>bM,createSystemWatchFunctions:()=>createSystemWatchFunctions,createTextChange:()=>createTextChange,createTextChangeFromStartLength:()=>createTextChangeFromStartLength,createTextChangeRange:()=>Xd,createTextRangeFromNode:()=>createTextRangeFromNode,createTextRangeFromSpan:()=>createTextRangeFromSpan,createTextSpan:()=>w_,createTextSpanFromBounds:()=>Hi,createTextSpanFromNode:()=>createTextSpanFromNode,createTextSpanFromRange:()=>createTextSpanFromRange,createTextSpanFromStringLiteralLikeContent:()=>createTextSpanFromStringLiteralLikeContent,createTextWriter:()=>pN,createTokenRange:()=>iO,createTypeChecker:()=>createTypeChecker,createTypeReferenceDirectiveResolutionCache:()=>createTypeReferenceDirectiveResolutionCache,createTypeReferenceResolutionLoader:()=>createTypeReferenceResolutionLoader,createUnparsedSourceFile:()=>NL,createWatchCompilerHost:()=>createWatchCompilerHost2,createWatchCompilerHostOfConfigFile:()=>createWatchCompilerHostOfConfigFile,createWatchCompilerHostOfFilesAndCompilerOptions:()=>createWatchCompilerHostOfFilesAndCompilerOptions,createWatchFactory:()=>createWatchFactory,createWatchHost:()=>createWatchHost,createWatchProgram:()=>createWatchProgram,createWatchStatusReporter:()=>createWatchStatusReporter,createWriteFileMeasuringIO:()=>createWriteFileMeasuringIO,declarationNameToString:()=>z3,decodeMappings:()=>decodeMappings,decodedTextSpanIntersectsWith:()=>Eg,decorateHelper:()=>decorateHelper,deduplicate:()=>xv,defaultIncludeSpec:()=>defaultIncludeSpec,defaultInitCompilerOptions:()=>defaultInitCompilerOptions,defaultMaximumTruncationLength:()=>fx,detectSortCaseSensitivity:()=>sC,diagnosticCategoryName:()=>TE,diagnosticToString:()=>diagnosticToString,directoryProbablyExists:()=>vS,directorySeparator:()=>fn,displayPart:()=>displayPart,displayPartsToString:()=>ZF,disposeEmitNodes:()=>disposeEmitNodes,disposeResourcesHelper:()=>disposeResourcesHelper,documentSpansEqual:()=>documentSpansEqual,dumpTracingLegend:()=>dumpTracingLegend,elementAt:()=>Wv,elideNodes:()=>bj,emitComments:()=>nS,emitDetachedComments:()=>IN,emitFiles:()=>emitFiles,emitFilesAndReportErrors:()=>emitFilesAndReportErrors,emitFilesAndReportErrorsAndGetExitStatus:()=>emitFilesAndReportErrorsAndGetExitStatus,emitModuleKindIsNonNodeESM:()=>KO,emitNewLineBeforeLeadingCommentOfPosition:()=>PN,emitNewLineBeforeLeadingComments:()=>tS,emitNewLineBeforeLeadingCommentsOfPosition:()=>rS,emitSkippedWithNoDiagnostics:()=>emitSkippedWithNoDiagnostics,emitUsingBuildInfo:()=>emitUsingBuildInfo,emptyArray:()=>$e,emptyFileSystemEntries:()=>Mx,emptyMap:()=>pg,emptyOptions:()=>emptyOptions,emptySet:()=>zv,endsWith:()=>ts,ensurePathIsNonModuleName:()=>hg,ensureScriptKind:()=>WS,ensureTrailingDirectorySeparator:()=>zo,entityNameToString:()=>vi,enumerateInsertsAndDeletes:()=>oE,equalOwnProperties:()=>Dv,equateStringsCaseInsensitive:()=>s_,equateStringsCaseSensitive:()=>Ll,equateValues:()=>_o,esDecorateHelper:()=>esDecorateHelper,escapeJsxAttributeString:()=>zT,escapeLeadingUnderscores:()=>Mn,escapeNonAsciiString:()=>Td,escapeSnippetText:()=>sL,escapeString:()=>vd,every:()=>so,expandPreOrPostfixIncrementOrDecrementExpression:()=>kR,explainFiles:()=>explainFiles,explainIfFileIsRedirectAndImpliedFormat:()=>explainIfFileIsRedirectAndImpliedFormat,exportAssignmentIsAlias:()=>D0,exportStarHelper:()=>exportStarHelper,expressionResultIsUnused:()=>tL,extend:()=>DC,extendsHelper:()=>extendsHelper,extensionFromPath:()=>rl,extensionIsTS:()=>KS,extensionsNotSupportingExtensionlessResolution:()=>wm,externalHelpersModuleNameText:()=>xm,factory:()=>Ln,fileExtensionIs:()=>La,fileExtensionIsOneOf:()=>ei,fileIncludeReasonToDiagnostics:()=>fileIncludeReasonToDiagnostics,fileShouldUseJavaScriptRequire:()=>fileShouldUseJavaScriptRequire,filter:()=>$r,filterMutate:()=>U5,filterSemanticDiagnostics:()=>filterSemanticDiagnostics,find:()=>Yr,findAncestor:()=>Kr,findBestPatternMatch:()=>Fv,findChildOfKind:()=>findChildOfKind,findComputedPropertyNameCacheAssignment:()=>Ej,findConfigFile:()=>findConfigFile,findContainingList:()=>findContainingList,findDiagnosticForNode:()=>findDiagnosticForNode,findFirstNonJsxWhitespaceToken:()=>findFirstNonJsxWhitespaceToken,findIndex:()=>_l,findLast:()=>ig,findLastIndex:()=>j5,findListItemInfo:()=>findListItemInfo,findMap:()=>F5,findModifier:()=>findModifier,findNextToken:()=>findNextToken,findPackageJson:()=>findPackageJson,findPackageJsons:()=>findPackageJsons,findPrecedingMatchingToken:()=>findPrecedingMatchingToken,findPrecedingToken:()=>findPrecedingToken,findSuperStatementIndexPath:()=>findSuperStatementIndexPath,findTokenOnLeftOfPosition:()=>findTokenOnLeftOfPosition,findUseStrictPrologue:()=>P8,first:()=>og,firstDefined:()=>ng,firstDefinedIterator:()=>L5,firstIterator:()=>mC,firstOrOnly:()=>firstOrOnly,firstOrUndefined:()=>g_,firstOrUndefinedIterator:()=>dC,fixupCompilerOptions:()=>fixupCompilerOptions,flatMap:()=>Bo,flatMapIterator:()=>V5,flatMapToMutable:()=>Tv,flatten:()=>o_,flattenCommaList:()=>kj,flattenDestructuringAssignment:()=>flattenDestructuringAssignment,flattenDestructuringBinding:()=>flattenDestructuringBinding,flattenDiagnosticMessageText:()=>flattenDiagnosticMessageText,forEach:()=>yr,forEachAncestor:()=>Wk,forEachAncestorDirectory:()=>e4,forEachChild:()=>Bt,forEachChildRecursively:()=>eg,forEachEmittedFile:()=>forEachEmittedFile,forEachEnclosingBlockScopeContainer:()=>qD,forEachEntry:()=>Vk,forEachExternalModuleToImportFrom:()=>forEachExternalModuleToImportFrom,forEachImportClauseDeclaration:()=>mI,forEachKey:()=>Hk,forEachLeadingCommentRange:()=>WE,forEachNameInAccessChainWalkingLeft:()=>JO,forEachPropertyAssignment:()=>a2,forEachResolvedProjectReference:()=>forEachResolvedProjectReference,forEachReturnStatement:()=>uP,forEachRight:()=>M5,forEachTrailingCommentRange:()=>VE,forEachTsConfigPropArray:()=>Y3,forEachUnique:()=>forEachUnique,forEachYieldExpression:()=>pP,forSomeAncestorDirectory:()=>kO,formatColorAndReset:()=>formatColorAndReset,formatDiagnostic:()=>formatDiagnostic,formatDiagnostics:()=>formatDiagnostics,formatDiagnosticsWithColorAndContext:()=>formatDiagnosticsWithColorAndContext,formatGeneratedName:()=>Pd,formatGeneratedNamePart:()=>Z0,formatLocation:()=>formatLocation,formatMessage:()=>HO,formatStringFromArgs:()=>I_,formatting:()=>ts_formatting_exports,fullTripleSlashAMDReferencePathRegEx:()=>K2,fullTripleSlashReferencePathRegEx:()=>Y2,generateDjb2Hash:()=>generateDjb2Hash,generateTSConfig:()=>generateTSConfig,generatorHelper:()=>generatorHelper,getAdjustedReferenceLocation:()=>getAdjustedReferenceLocation,getAdjustedRenameLocation:()=>getAdjustedRenameLocation,getAliasDeclarationFromName:()=>ET,getAllAccessorDeclarations:()=>P2,getAllDecoratorsOfClass:()=>getAllDecoratorsOfClass,getAllDecoratorsOfClassElement:()=>getAllDecoratorsOfClassElement,getAllJSDocTags:()=>Q4,getAllJSDocTagsOfKind:()=>vA,getAllKeys:()=>vC,getAllProjectOutputs:()=>getAllProjectOutputs,getAllSuperTypeNodes:()=>IT,getAllUnscopedEmitHelpers:()=>getAllUnscopedEmitHelpers,getAllowJSCompilerOption:()=>BS,getAllowSyntheticDefaultImports:()=>iM,getAncestor:()=>RI,getAnyExtensionFromPath:()=>dd,getAreDeclarationMapsEnabled:()=>nM,getAssignedExpandoInitializer:()=>nI,getAssignedName:()=>M4,getAssignedNameOfIdentifier:()=>getAssignedNameOfIdentifier,getAssignmentDeclarationKind:()=>Ja,getAssignmentDeclarationPropertyAccessKind:()=>uT,getAssignmentTargetKind:()=>TT,getAutomaticTypeDirectiveNames:()=>getAutomaticTypeDirectiveNames,getBaseFileName:()=>T_,getBinaryOperatorPrecedence:()=>pl,getBuildInfo:()=>getBuildInfo,getBuildInfoFileVersionMap:()=>getBuildInfoFileVersionMap,getBuildInfoText:()=>getBuildInfoText,getBuildOrderFromAnyBuildOrder:()=>getBuildOrderFromAnyBuildOrder,getBuilderCreationParameters:()=>getBuilderCreationParameters,getBuilderFileEmit:()=>getBuilderFileEmit,getCheckFlags:()=>CS,getClassExtendsHeritageElement:()=>DT,getClassLikeDeclarationOfSymbol:()=>kS,getCombinedLocalAndExportSymbolFlags:()=>TO,getCombinedModifierFlags:()=>$d,getCombinedNodeFlags:()=>C_,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>aA,getCommentRange:()=>getCommentRange,getCommonSourceDirectory:()=>getCommonSourceDirectory,getCommonSourceDirectoryOfConfig:()=>getCommonSourceDirectoryOfConfig,getCompilerOptionValue:()=>j0,getCompilerOptionsDiffValue:()=>getCompilerOptionsDiffValue,getConditions:()=>getConditions,getConfigFileParsingDiagnostics:()=>getConfigFileParsingDiagnostics,getConstantValue:()=>getConstantValue,getContainerFlags:()=>getContainerFlags,getContainerNode:()=>getContainerNode,getContainingClass:()=>E0,getContainingClassExcludingClassDecorators:()=>PP,getContainingClassStaticBlock:()=>kP,getContainingFunction:()=>EP,getContainingFunctionDeclaration:()=>AP,getContainingFunctionOrClassStaticBlock:()=>DP,getContainingNodeArray:()=>rL,getContainingObjectLiteralElement:()=>p7,getContextualTypeFromParent:()=>getContextualTypeFromParent,getContextualTypeFromParentOrAncestorTypeNode:()=>getContextualTypeFromParentOrAncestorTypeNode,getCurrentTime:()=>getCurrentTime,getDeclarationDiagnostics:()=>getDeclarationDiagnostics,getDeclarationEmitExtensionForPath:()=>XT,getDeclarationEmitOutputFilePath:()=>hN,getDeclarationEmitOutputFilePathWorker:()=>GT,getDeclarationFromName:()=>OI,getDeclarationModifierFlagsFromSymbol:()=>bO,getDeclarationOfKind:()=>jk,getDeclarationsOfKind:()=>Fk,getDeclaredExpandoInitializer:()=>tI,getDecorators:()=>_A,getDefaultCompilerOptions:()=>_7,getDefaultExportInfoWorker:()=>getDefaultExportInfoWorker,getDefaultFormatCodeSettings:()=>getDefaultFormatCodeSettings,getDefaultLibFileName:()=>T4,getDefaultLibFilePath:()=>sB,getDefaultLikeExportInfo:()=>getDefaultLikeExportInfo,getDiagnosticText:()=>getDiagnosticText,getDiagnosticsWithinSpan:()=>getDiagnosticsWithinSpan,getDirectoryPath:()=>$i,getDirectoryToWatchFailedLookupLocation:()=>getDirectoryToWatchFailedLookupLocation,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>getDirectoryToWatchFailedLookupLocationFromTypeRoot,getDocumentPositionMapper:()=>getDocumentPositionMapper,getESModuleInterop:()=>U2,getEditsForFileRename:()=>getEditsForFileRename,getEffectiveBaseTypeNode:()=>kT,getEffectiveConstraintOfTypeParameter:()=>wA,getEffectiveContainerForJSDocTemplateTag:()=>SI,getEffectiveImplementsTypeNodes:()=>PT,getEffectiveInitializer:()=>sT,getEffectiveJSDocHost:()=>y2,getEffectiveModifierFlags:()=>bm,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>cS,getEffectiveModifierFlagsNoCache:()=>uS,getEffectiveReturnTypeNode:()=>AN,getEffectiveSetAccessorTypeAnnotationNode:()=>DN,getEffectiveTypeAnnotationNode:()=>I2,getEffectiveTypeParameterDeclarations:()=>xA,getEffectiveTypeRoots:()=>getEffectiveTypeRoots,getElementOrPropertyAccessArgumentExpressionOrName:()=>fm,getElementOrPropertyAccessName:()=>io,getElementsOfBindingOrAssignmentPattern:()=>j8,getEmitDeclarations:()=>z2,getEmitFlags:()=>ti,getEmitHelpers:()=>getEmitHelpers,getEmitModuleDetectionKind:()=>jS,getEmitModuleKind:()=>ni,getEmitModuleResolutionKind:()=>O_,getEmitScriptTarget:()=>Ql,getEmitStandardClassFields:()=>uM,getEnclosingBlockScopeContainer:()=>S0,getEnclosingContainer:()=>UD,getEncodedSemanticClassifications:()=>getEncodedSemanticClassifications,getEncodedSyntacticClassifications:()=>getEncodedSyntacticClassifications,getEndLinePosition:()=>P3,getEntityNameFromTypeNode:()=>BP,getEntrypointsFromPackageJsonInfo:()=>getEntrypointsFromPackageJsonInfo,getErrorCountForSummary:()=>getErrorCountForSummary,getErrorSpanForNode:()=>Zg,getErrorSummaryText:()=>getErrorSummaryText,getEscapedTextOfIdentifierOrLiteral:()=>JT,getEscapedTextOfJsxAttributeName:()=>yL,getEscapedTextOfJsxNamespacedName:()=>Yl,getExpandoInitializer:()=>A_,getExportAssignmentExpression:()=>AT,getExportInfoMap:()=>getExportInfoMap,getExportNeedsImportStarHelper:()=>getExportNeedsImportStarHelper,getExpressionAssociativity:()=>tN,getExpressionPrecedence:()=>rN,getExternalHelpersModuleName:()=>O8,getExternalModuleImportEqualsDeclarationExpression:()=>VP,getExternalModuleName:()=>d2,getExternalModuleNameFromDeclaration:()=>dN,getExternalModuleNameFromPath:()=>E2,getExternalModuleNameLiteral:()=>jR,getExternalModuleRequireArgument:()=>HP,getFallbackOptions:()=>getFallbackOptions,getFileEmitOutput:()=>getFileEmitOutput,getFileMatcherPatterns:()=>zS,getFileNamesFromConfigSpecs:()=>getFileNamesFromConfigSpecs,getFileWatcherEventKind:()=>getFileWatcherEventKind,getFilesInErrorForSummary:()=>getFilesInErrorForSummary,getFirstConstructorWithBody:()=>YT,getFirstIdentifier:()=>qN,getFirstNonSpaceCharacterPosition:()=>getFirstNonSpaceCharacterPosition,getFirstProjectOutput:()=>getFirstProjectOutput,getFixableErrorSpanExpression:()=>getFixableErrorSpanExpression,getFormatCodeSettingsForWriting:()=>getFormatCodeSettingsForWriting,getFullWidth:()=>om,getFunctionFlags:()=>zI,getHeritageClause:()=>mm,getHostSignatureFromJSDoc:()=>h2,getIdentifierAutoGenerate:()=>getIdentifierAutoGenerate,getIdentifierGeneratedImportReference:()=>getIdentifierGeneratedImportReference,getIdentifierTypeArguments:()=>getIdentifierTypeArguments,getImmediatelyInvokedFunctionExpression:()=>LP,getImpliedNodeFormatForFile:()=>getImpliedNodeFormatForFile,getImpliedNodeFormatForFileWorker:()=>getImpliedNodeFormatForFileWorker,getImportNeedsImportDefaultHelper:()=>getImportNeedsImportDefaultHelper,getImportNeedsImportStarHelper:()=>getImportNeedsImportStarHelper,getIndentSize:()=>Jo,getIndentString:()=>w2,getInferredLibraryNameResolveFrom:()=>getInferredLibraryNameResolveFrom,getInitializedVariables:()=>hO,getInitializerOfBinaryExpression:()=>pT,getInitializerOfBindingOrAssignmentElement:()=>J8,getInterfaceBaseTypeNodes:()=>NT,getInternalEmitFlags:()=>xD,getInvokedExpression:()=>UP,getIsolatedModules:()=>B2,getJSDocAugmentsTag:()=>B4,getJSDocClassTag:()=>lA,getJSDocCommentRanges:()=>G3,getJSDocCommentsAndTags:()=>gT,getJSDocDeprecatedTag:()=>mA,getJSDocDeprecatedTagNoCache:()=>G4,getJSDocEnumTag:()=>hA,getJSDocHost:()=>vT,getJSDocImplementsTags:()=>U4,getJSDocOverrideTagNoCache:()=>H4,getJSDocParameterTags:()=>Kd,getJSDocParameterTagsNoCache:()=>J4,getJSDocPrivateTag:()=>pA,getJSDocPrivateTagNoCache:()=>z4,getJSDocProtectedTag:()=>fA,getJSDocProtectedTagNoCache:()=>W4,getJSDocPublicTag:()=>uA,getJSDocPublicTagNoCache:()=>q4,getJSDocReadonlyTag:()=>dA,getJSDocReadonlyTagNoCache:()=>V4,getJSDocReturnTag:()=>X4,getJSDocReturnType:()=>$4,getJSDocRoot:()=>g2,getJSDocSatisfiesExpressionType:()=>hL,getJSDocSatisfiesTag:()=>kg,getJSDocTags:()=>Ul,getJSDocTagsNoCache:()=>bA,getJSDocTemplateTag:()=>gA,getJSDocThisTag:()=>yA,getJSDocType:()=>em,getJSDocTypeAliasName:()=>K0,getJSDocTypeAssertionType:()=>NR,getJSDocTypeParameterDeclarations:()=>eS,getJSDocTypeParameterTags:()=>j4,getJSDocTypeParameterTagsNoCache:()=>F4,getJSDocTypeTag:()=>Zd,getJSXImplicitImportBase:()=>hM,getJSXRuntimeImport:()=>yM,getJSXTransformEnabled:()=>mM,getKeyForCompilerOptions:()=>getKeyForCompilerOptions,getLanguageVariant:()=>R0,getLastChild:()=>DS,getLeadingCommentRanges:()=>Wo,getLeadingCommentRangesOfNode:()=>cP,getLeftmostAccessExpression:()=>R2,getLeftmostExpression:()=>RO,getLineAndCharacterOfPosition:()=>to,getLineInfo:()=>getLineInfo,getLineOfLocalPosition:()=>SN,getLineOfLocalPositionFromLineMap:()=>Ca,getLineStartPositionForPosition:()=>getLineStartPositionForPosition,getLineStarts:()=>Ia,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>fO,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>pO,getLinesBetweenPositions:()=>x_,getLinesBetweenRangeEndAndRangeStart:()=>cO,getLinesBetweenRangeEndPositions:()=>lO,getLiteralText:()=>wD,getLocalNameForExternalImport:()=>RR,getLocalSymbolForExportDefault:()=>GN,getLocaleSpecificMessage:()=>N_,getLocaleTimeString:()=>getLocaleTimeString,getMappedContextSpan:()=>getMappedContextSpan,getMappedDocumentSpan:()=>getMappedDocumentSpan,getMappedLocation:()=>getMappedLocation,getMatchedFileSpec:()=>getMatchedFileSpec,getMatchedIncludeSpec:()=>getMatchedIncludeSpec,getMeaningFromDeclaration:()=>getMeaningFromDeclaration,getMeaningFromLocation:()=>getMeaningFromLocation,getMembersOfDeclaration:()=>dP,getModeForFileReference:()=>getModeForFileReference,getModeForResolutionAtIndex:()=>getModeForResolutionAtIndex,getModeForUsageLocation:()=>getModeForUsageLocation,getModifiedTime:()=>getModifiedTime,getModifiers:()=>hd,getModuleInstanceState:()=>getModuleInstanceState,getModuleNameStringLiteralAt:()=>getModuleNameStringLiteralAt,getModuleSpecifierEndingPreference:()=>PM,getModuleSpecifierResolverHost:()=>getModuleSpecifierResolverHost,getNameForExportedSymbol:()=>getNameForExportedSymbol,getNameFromIndexInfo:()=>zD,getNameFromPropertyName:()=>getNameFromPropertyName,getNameOfAccessExpression:()=>OO,getNameOfCompilerOptionValue:()=>getNameOfCompilerOptionValue,getNameOfDeclaration:()=>Bl,getNameOfExpando:()=>oI,getNameOfJSDocTypedef:()=>O4,getNameOrArgument:()=>lT,getNameTable:()=>tB,getNamesForExportedSymbol:()=>getNamesForExportedSymbol,getNamespaceDeclarationNode:()=>dT,getNewLineCharacter:()=>TS,getNewLineKind:()=>getNewLineKind,getNewLineOrDefaultFromHost:()=>getNewLineOrDefaultFromHost,getNewTargetContainer:()=>OP,getNextJSDocCommentLocation:()=>bT,getNodeForGeneratedName:()=>vj,getNodeId:()=>getNodeId,getNodeKind:()=>getNodeKind,getNodeModifiers:()=>getNodeModifiers,getNodeModulePathParts:()=>cL,getNonAssignedNameOfDeclaration:()=>Yd,getNonAssignmentOperatorForCompoundAssignment:()=>getNonAssignmentOperatorForCompoundAssignment,getNonAugmentationDeclaration:()=>B3,getNonDecoratorTokenPosOfNode:()=>bD,getNormalizedAbsolutePath:()=>Pa,getNormalizedAbsolutePathWithoutRoot:()=>PE,getNormalizedPathComponents:()=>Wd,getObjectFlags:()=>Rf,getOperator:()=>x2,getOperatorAssociativity:()=>FT,getOperatorPrecedence:()=>BT,getOptionFromName:()=>getOptionFromName,getOptionsForLibraryResolution:()=>getOptionsForLibraryResolution,getOptionsNameMap:()=>getOptionsNameMap,getOrCreateEmitNode:()=>getOrCreateEmitNode,getOrCreateExternalHelpersModuleNameIfNeeded:()=>M8,getOrUpdate:()=>$5,getOriginalNode:()=>jl,getOriginalNodeId:()=>getOriginalNodeId,getOriginalSourceFile:()=>eN,getOutputDeclarationFileName:()=>getOutputDeclarationFileName,getOutputExtension:()=>getOutputExtension,getOutputFileNames:()=>getOutputFileNames,getOutputPathsFor:()=>getOutputPathsFor,getOutputPathsForBundle:()=>getOutputPathsForBundle,getOwnEmitOutputFilePath:()=>mN,getOwnKeys:()=>sg,getOwnValues:()=>TC,getPackageJsonInfo:()=>getPackageJsonInfo,getPackageJsonTypesVersionsPaths:()=>getPackageJsonTypesVersionsPaths,getPackageJsonsVisibleToFile:()=>getPackageJsonsVisibleToFile,getPackageNameFromTypesPackageName:()=>getPackageNameFromTypesPackageName,getPackageScopeForPath:()=>getPackageScopeForPath,getParameterSymbolFromJSDoc:()=>TI,getParameterTypeNode:()=>lL,getParentNodeInSpan:()=>getParentNodeInSpan,getParseTreeNode:()=>Fl,getParsedCommandLineOfConfigFile:()=>getParsedCommandLineOfConfigFile,getPathComponents:()=>Ai,getPathComponentsRelativeTo:()=>gg,getPathFromPathComponents:()=>Uo,getPathUpdater:()=>getPathUpdater,getPathsBasePath:()=>gN,getPatternFromSpec:()=>CM,getPendingEmitKind:()=>getPendingEmitKind,getPositionOfLineAndCharacter:()=>UE,getPossibleGenericSignatures:()=>getPossibleGenericSignatures,getPossibleOriginalInputExtensionForExtension:()=>yN,getPossibleTypeArgumentsInfo:()=>getPossibleTypeArgumentsInfo,getPreEmitDiagnostics:()=>getPreEmitDiagnostics,getPrecedingNonSpaceCharacterPosition:()=>getPrecedingNonSpaceCharacterPosition,getPrivateIdentifier:()=>getPrivateIdentifier,getProperties:()=>getProperties,getProperty:()=>bC,getPropertyArrayElementValue:()=>wP,getPropertyAssignmentAliasLikeExpression:()=>JI,getPropertyNameForPropertyNameNode:()=>gd,getPropertyNameForUniqueESSymbol:()=>VI,getPropertyNameFromType:()=>SL,getPropertyNameOfBindingOrAssignmentElement:()=>qR,getPropertySymbolFromBindingElement:()=>getPropertySymbolFromBindingElement,getPropertySymbolsFromContextualType:()=>f7,getQuoteFromPreference:()=>getQuoteFromPreference,getQuotePreference:()=>getQuotePreference,getRangesWhere:()=>eC,getRefactorContextSpan:()=>getRefactorContextSpan,getReferencedFileLocation:()=>getReferencedFileLocation,getRegexFromPattern:()=>Ff,getRegularExpressionForWildcard:()=>jf,getRegularExpressionsForWildcards:()=>V2,getRelativePathFromDirectory:()=>Zv,getRelativePathFromFile:()=>JE,getRelativePathToDirectoryOrUrl:()=>bg,getRenameLocation:()=>getRenameLocation,getReplacementSpanForContextToken:()=>getReplacementSpanForContextToken,getResolutionDiagnostic:()=>getResolutionDiagnostic,getResolutionModeOverrideForClause:()=>getResolutionModeOverrideForClause,getResolveJsonModule:()=>FS,getResolvePackageJsonExports:()=>oM,getResolvePackageJsonImports:()=>sM,getResolvedExternalModuleName:()=>HT,getResolvedModule:()=>$k,getResolvedTypeReferenceDirective:()=>Kk,getRestIndicatorOfBindingOrAssignmentElement:()=>UR,getRestParameterElementType:()=>fP,getRightMostAssignedExpression:()=>l2,getRootDeclaration:()=>hm,getRootDirectoryOfResolutionCache:()=>getRootDirectoryOfResolutionCache,getRootLength:()=>Ei,getRootPathSplitLength:()=>getRootPathSplitLength,getScriptKind:()=>getScriptKind,getScriptKindFromFileName:()=>VS,getScriptTargetFeatures:()=>getScriptTargetFeatures,getSelectedEffectiveModifierFlags:()=>sS,getSelectedSyntacticModifierFlags:()=>_S,getSemanticClassifications:()=>getSemanticClassifications,getSemanticJsxChildren:()=>nN,getSetAccessorTypeAnnotationNode:()=>xN,getSetAccessorValueParameter:()=>D2,getSetExternalModuleIndicator:()=>RS,getShebang:()=>c4,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>m2,getSingleVariableOfVariableStatement:()=>Cl,getSnapshotText:()=>getSnapshotText,getSnippetElement:()=>getSnippetElement,getSourceFileOfModule:()=>sD,getSourceFileOfNode:()=>ri,getSourceFilePathInNewDir:()=>$T,getSourceFilePathInNewDirWorker:()=>k2,getSourceFileVersionAsHashFromText:()=>getSourceFileVersionAsHashFromText,getSourceFilesToEmit:()=>bN,getSourceMapRange:()=>getSourceMapRange,getSourceMapper:()=>getSourceMapper,getSourceTextOfNodeFromSourceFile:()=>Xo,getSpanOfTokenAtPosition:()=>Ys,getSpellingSuggestion:()=>Jv,getStartPositionOfLine:()=>lD,getStartPositionOfRange:()=>f_,getStartsOnNewLine:()=>getStartsOnNewLine,getStaticPropertiesAndClassStaticBlock:()=>getStaticPropertiesAndClassStaticBlock,getStrictOptionValue:()=>W2,getStringComparer:()=>_g,getSuperCallFromStatement:()=>getSuperCallFromStatement,getSuperContainer:()=>MP,getSupportedCodeFixes:()=>c7,getSupportedExtensions:()=>HS,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>GS,getSwitchedType:()=>getSwitchedType,getSymbolId:()=>getSymbolId,getSymbolNameForPrivateIdentifier:()=>HI,getSymbolTarget:()=>getSymbolTarget,getSyntacticClassifications:()=>getSyntacticClassifications,getSyntacticModifierFlags:()=>M2,getSyntacticModifierFlagsNoCache:()=>L2,getSynthesizedDeepClone:()=>getSynthesizedDeepClone,getSynthesizedDeepCloneWithReplacements:()=>getSynthesizedDeepCloneWithReplacements,getSynthesizedDeepClones:()=>getSynthesizedDeepClones,getSynthesizedDeepClonesWithReplacements:()=>getSynthesizedDeepClonesWithReplacements,getSyntheticLeadingComments:()=>getSyntheticLeadingComments,getSyntheticTrailingComments:()=>getSyntheticTrailingComments,getTargetLabel:()=>getTargetLabel,getTargetOfBindingOrAssignmentElement:()=>Mo,getTemporaryModuleResolutionState:()=>getTemporaryModuleResolutionState,getTextOfConstantValue:()=>ED,getTextOfIdentifierOrLiteral:()=>bd,getTextOfJSDocComment:()=>TA,getTextOfJsxAttributeName:()=>gL,getTextOfJsxNamespacedName:()=>Kl,getTextOfNode:()=>sm,getTextOfNodeFromSourceText:()=>t_,getTextOfPropertyName:()=>VD,getThisContainer:()=>o2,getThisParameter:()=>KT,getTokenAtPosition:()=>getTokenAtPosition,getTokenPosOfNode:()=>Go,getTokenSourceMapRange:()=>getTokenSourceMapRange,getTouchingPropertyName:()=>getTouchingPropertyName,getTouchingToken:()=>getTouchingToken,getTrailingCommentRanges:()=>_4,getTrailingSemicolonDeferringWriter:()=>fN,getTransformFlagsSubtreeExclusions:()=>Rx,getTransformers:()=>getTransformers,getTsBuildInfoEmitOutputFilePath:()=>getTsBuildInfoEmitOutputFilePath,getTsConfigObjectLiteralExpression:()=>Q3,getTsConfigPropArrayElementValue:()=>CP,getTypeAnnotationNode:()=>EN,getTypeArgumentOrTypeParameterList:()=>getTypeArgumentOrTypeParameterList,getTypeKeywordOfTypeOnlyImport:()=>getTypeKeywordOfTypeOnlyImport,getTypeNode:()=>getTypeNode,getTypeNodeIfAccessible:()=>getTypeNodeIfAccessible,getTypeParameterFromJsDoc:()=>xI,getTypeParameterOwner:()=>iA,getTypesPackageName:()=>getTypesPackageName,getUILocale:()=>WC,getUniqueName:()=>getUniqueName,getUniqueSymbolId:()=>getUniqueSymbolId,getUseDefineForClassFields:()=>lM,getWatchErrorSummaryDiagnosticMessage:()=>getWatchErrorSummaryDiagnosticMessage,getWatchFactory:()=>getWatchFactory,group:()=>EC,groupBy:()=>AC,guessIndentation:()=>Lk,handleNoEmitOptions:()=>handleNoEmitOptions,hasAbstractModifier:()=>iS,hasAccessorModifier:()=>oS,hasAmbientModifier:()=>aS,hasChangesInResolutions:()=>aD,hasChildOfKind:()=>hasChildOfKind,hasContextSensitiveParameters:()=>nL,hasDecorators:()=>El,hasDocComment:()=>hasDocComment,hasDynamicName:()=>LT,hasEffectiveModifier:()=>N2,hasEffectiveModifiers:()=>MN,hasEffectiveReadonlyModifier:()=>O0,hasExtension:()=>Qv,hasIndexSignature:()=>hasIndexSignature,hasInitializer:()=>E3,hasInvalidEscape:()=>UT,hasJSDocNodes:()=>Wi,hasJSDocParameterTags:()=>cA,hasJSFileExtension:()=>H2,hasJsonModuleEmitEnabled:()=>ZO,hasOnlyExpressionInitializer:()=>Ok,hasOverrideModifier:()=>JN,hasPossibleExternalModuleReference:()=>BD,hasProperty:()=>Qr,hasPropertyAccessExpressionWithName:()=>hasPropertyAccessExpressionWithName,hasQuestionToken:()=>hI,hasRecordedExternalHelpers:()=>LR,hasRestParameter:()=>Jk,hasScopeMarker:()=>ck,hasStaticModifier:()=>gm,hasSyntacticModifier:()=>gr,hasSyntacticModifiers:()=>LN,hasTSFileExtension:()=>G2,hasTabstop:()=>cx,hasTrailingDirectorySeparator:()=>zd,hasType:()=>Nk,hasTypeArguments:()=>wI,hasZeroOrOneAsteriskCharacter:()=>gM,helperString:()=>helperString,hostGetCanonicalFileName:()=>VT,hostUsesCaseSensitiveFileNames:()=>C2,idText:()=>Ot,identifierIsThisKeyword:()=>ZT,identifierToKeywordKind:()=>P4,identity:()=>bt,identitySourceMapConsumer:()=>identitySourceMapConsumer,ignoreSourceNewlines:()=>ignoreSourceNewlines,ignoredPaths:()=>ignoredPaths,importDefaultHelper:()=>importDefaultHelper,importFromModuleSpecifier:()=>dI,importNameElisionDisabled:()=>eM,importStarHelper:()=>importStarHelper,indexOfAnyCharCode:()=>vv,indexOfNode:()=>SD,indicesOf:()=>ag,inferredTypesContainingFile:()=>inferredTypesContainingFile,injectClassNamedEvaluationHelperBlockIfMissing:()=>injectClassNamedEvaluationHelperBlockIfMissing,injectClassThisAssignmentIfMissing:()=>injectClassThisAssignmentIfMissing,insertImports:()=>insertImports,insertLeadingStatement:()=>SR,insertSorted:()=>yl,insertStatementAfterCustomPrologue:()=>hD,insertStatementAfterStandardPrologue:()=>mD,insertStatementsAfterCustomPrologue:()=>dD,insertStatementsAfterStandardPrologue:()=>fD,intersperse:()=>R5,intrinsicTagNameToString:()=>vL,introducesArgumentsExoticObject:()=>gP,inverseJsxOptionMap:()=>inverseJsxOptionMap,isAbstractConstructorSymbol:()=>AO,isAbstractModifier:()=>tJ,isAccessExpression:()=>$o,isAccessibilityModifier:()=>isAccessibilityModifier,isAccessor:()=>nm,isAccessorModifier:()=>nJ,isAliasSymbolDeclaration:()=>LI,isAliasableExpression:()=>b2,isAmbientModule:()=>_m,isAmbientPropertyDeclaration:()=>JD,isAnonymousFunctionDefinition:()=>Ks,isAnyDirectorySeparator:()=>dg,isAnyImportOrBareOrAccessedRequire:()=>jD,isAnyImportOrReExport:()=>lm,isAnyImportSyntax:()=>$g,isAnySupportedFileExtension:()=>RM,isApplicableVersionedTypesKey:()=>isApplicableVersionedTypesKey,isArgumentExpressionOfElementAccess:()=>isArgumentExpressionOfElementAccess,isArray:()=>zt,isArrayBindingElement:()=>QA,isArrayBindingOrAssignmentElement:()=>m3,isArrayBindingOrAssignmentPattern:()=>d3,isArrayBindingPattern:()=>_J,isArrayLiteralExpression:()=>iu,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>isArrayLiteralOrObjectLiteralDestructuringPattern,isArrayTypeNode:()=>$x,isArrowFunction:()=>km,isAsExpression:()=>hJ,isAssertClause:()=>jJ,isAssertEntry:()=>FJ,isAssertionExpression:()=>sk,isAssertionKey:()=>FA,isAssertsKeyword:()=>KL,isAssignmentDeclaration:()=>k0,isAssignmentExpression:()=>Na,isAssignmentOperator:()=>D_,isAssignmentPattern:()=>u3,isAssignmentTarget:()=>CI,isAsteriskToken:()=>GL,isAsyncFunction:()=>WI,isAsyncModifier:()=>al,isAutoAccessorPropertyDeclaration:()=>l3,isAwaitExpression:()=>pJ,isAwaitKeyword:()=>ZL,isBigIntLiteral:()=>o6,isBinaryExpression:()=>Ct,isBinaryOperatorToken:()=>mj,isBindableObjectDefinePropertyCall:()=>p2,isBindableStaticAccessExpression:()=>k_,isBindableStaticElementAccessExpression:()=>f2,isBindableStaticNameExpression:()=>p_,isBindingElement:()=>nu,isBindingElementOfBareOrAccessedRequire:()=>KP,isBindingName:()=>WA,isBindingOrAssignmentElement:()=>YA,isBindingOrAssignmentPattern:()=>KA,isBindingPattern:()=>im,isBlock:()=>au,isBlockOrCatchScoped:()=>kD,isBlockScope:()=>U3,isBlockScopedContainerTopLevel:()=>OD,isBooleanLiteral:()=>VA,isBreakOrContinueStatement:()=>DA,isBreakStatement:()=>kJ,isBuildInfoFile:()=>isBuildInfoFile,isBuilderProgram:()=>isBuilderProgram2,isBundle:()=>YJ,isBundleFileTextLike:()=>MO,isCallChain:()=>y0,isCallExpression:()=>j_,isCallExpressionTarget:()=>isCallExpressionTarget,isCallLikeExpression:()=>tk,isCallOrNewExpression:()=>rk,isCallOrNewExpressionTarget:()=>isCallOrNewExpressionTarget,isCallSignatureDeclaration:()=>c6,isCallToHelper:()=>isCallToHelper,isCaseBlock:()=>LJ,isCaseClause:()=>XJ,isCaseKeyword:()=>iJ,isCaseOrDefaultClause:()=>Ik,isCatchClause:()=>$J,isCatchClauseVariableDeclaration:()=>ix,isCatchClauseVariableDeclarationOrBindingElement:()=>R3,isCheckJsEnabledForFile:()=>jM,isChildOfNodeWithKind:()=>lP,isCircularBuildOrder:()=>isCircularBuildOrder,isClassDeclaration:()=>Yo,isClassElement:()=>no,isClassExpression:()=>Il,isClassLike:()=>dn,isClassMemberModifier:()=>s3,isClassNamedEvaluationHelperBlock:()=>isClassNamedEvaluationHelperBlock,isClassOrTypeElement:()=>XA,isClassStaticBlockDeclaration:()=>eu,isClassThisAssignmentBlock:()=>isClassThisAssignmentBlock,isCollapsedRange:()=>nO,isColonToken:()=>XL,isCommaExpression:()=>Jm,isCommaListExpression:()=>F_,isCommaSequence:()=>IR,isCommaToken:()=>Ux,isComment:()=>isComment,isCommonJsExportPropertyAssignment:()=>i2,isCommonJsExportedExpression:()=>hP,isCompoundAssignment:()=>isCompoundAssignment,isComputedNonLiteralName:()=>WD,isComputedPropertyName:()=>ao,isConciseBody:()=>fk,isConditionalExpression:()=>fJ,isConditionalTypeNode:()=>t8,isConstTypeReference:()=>Z4,isConstructSignatureDeclaration:()=>Hx,isConstructorDeclaration:()=>J_,isConstructorTypeNode:()=>u6,isContextualKeyword:()=>v2,isContinueStatement:()=>AJ,isCustomPrologue:()=>um,isDebuggerStatement:()=>MJ,isDeclaration:()=>Ho,isDeclarationBindingElement:()=>Bg,isDeclarationFileName:()=>G8,isDeclarationName:()=>wT,isDeclarationNameOfEnumOrNamespace:()=>mO,isDeclarationReadonly:()=>nP,isDeclarationStatement:()=>wk,isDeclarationWithTypeParameterChildren:()=>q3,isDeclarationWithTypeParameters:()=>RD,isDecorator:()=>L_,isDecoratorTarget:()=>isDecoratorTarget,isDefaultClause:()=>h8,isDefaultImport:()=>mT,isDefaultModifier:()=>YL,isDefaultedExpandoInitializer:()=>aI,isDeleteExpression:()=>lJ,isDeleteTarget:()=>II,isDeprecatedDeclaration:()=>isDeprecatedDeclaration,isDestructuringAssignment:()=>UN,isDiagnosticWithLocation:()=>isDiagnosticWithLocation,isDiskPathRoot:()=>wE,isDoStatement:()=>xJ,isDocumentRegistryEntry:()=>isDocumentRegistryEntry,isDotDotDotToken:()=>HL,isDottedName:()=>L0,isDynamicName:()=>S2,isESSymbolIdentifier:()=>$I,isEffectiveExternalModule:()=>Xg,isEffectiveModuleDeclaration:()=>j3,isEffectiveStrictModeSourceFile:()=>LD,isElementAccessChain:()=>K4,isElementAccessExpression:()=>Ra,isEmittedFileOfProgram:()=>isEmittedFileOfProgram,isEmptyArrayLiteral:()=>HN,isEmptyBindingElement:()=>k4,isEmptyBindingPattern:()=>A4,isEmptyObjectLiteral:()=>VN,isEmptyStatement:()=>TJ,isEmptyStringLiteral:()=>Z3,isEntityName:()=>zA,isEntityNameExpression:()=>co,isEnumConst:()=>rP,isEnumDeclaration:()=>S6,isEnumMember:()=>g8,isEqualityOperatorKind:()=>isEqualityOperatorKind,isEqualsGreaterThanToken:()=>QL,isExclamationToken:()=>Dd,isExcludedFile:()=>isExcludedFile,isExclusivelyTypeOnlyImportOrExport:()=>isExclusivelyTypeOnlyImportOrExport,isExportAssignment:()=>ss,isExportDeclaration:()=>B_,isExportModifier:()=>qx,isExportName:()=>PR,isExportNamespaceAsDefaultDeclaration:()=>J3,isExportOrDefaultModifier:()=>yj,isExportSpecifier:()=>m8,isExportsIdentifier:()=>_T,isExportsOrModuleExportsOrAlias:()=>isExportsOrModuleExportsOrAlias,isExpression:()=>am,isExpressionNode:()=>_2,isExpressionOfExternalModuleImportEqualsDeclaration:()=>isExpressionOfExternalModuleImportEqualsDeclaration,isExpressionOfOptionalChainRoot:()=>EA,isExpressionStatement:()=>ou,isExpressionWithTypeArguments:()=>g6,isExpressionWithTypeArgumentsInClassExtendsClause:()=>M0,isExternalModule:()=>Zo,isExternalModuleAugmentation:()=>Gg,isExternalModuleImportEqualsDeclaration:()=>rT,isExternalModuleIndicator:()=>uk,isExternalModuleNameRelative:()=>XE,isExternalModuleReference:()=>Nm,isExternalModuleSymbol:()=>isExternalModuleSymbol,isExternalOrCommonJsModule:()=>tP,isFileLevelReservedGeneratedIdentifier:()=>UA,isFileLevelUniqueName:()=>I3,isFileProbablyExternalModule:()=>ml,isFirstDeclarationOfSymbolParameter:()=>isFirstDeclarationOfSymbolParameter,isFixablePromiseHandler:()=>isFixablePromiseHandler,isForInOrOfStatement:()=>pk,isForInStatement:()=>CJ,isForInitializer:()=>mk,isForOfStatement:()=>EJ,isForStatement:()=>l8,isFunctionBlock:()=>$3,isFunctionBody:()=>dk,isFunctionDeclaration:()=>os,isFunctionExpression:()=>Am,isFunctionExpressionOrArrowFunction:()=>oL,isFunctionLike:()=>Gi,isFunctionLikeDeclaration:()=>_3,isFunctionLikeKind:()=>Jg,isFunctionLikeOrClassStaticBlockDeclaration:()=>rm,isFunctionOrConstructorTypeNode:()=>$A,isFunctionOrModuleBlock:()=>HA,isFunctionSymbol:()=>pI,isFunctionTypeNode:()=>tu,isFutureReservedKeyword:()=>jI,isGeneratedIdentifier:()=>wa,isGeneratedPrivateIdentifier:()=>Mg,isGetAccessor:()=>el,isGetAccessorDeclaration:()=>m_,isGetOrSetAccessorDeclaration:()=>CA,isGlobalDeclaration:()=>isGlobalDeclaration,isGlobalScopeAugmentation:()=>cm,isGrammarError:()=>pD,isHeritageClause:()=>Nl,isHoistedFunction:()=>w0,isHoistedVariableStatement:()=>C0,isIdentifier:()=>Ee,isIdentifierANonContextualKeyword:()=>UI,isIdentifierName:()=>MI,isIdentifierOrThisTypeNode:()=>GR,isIdentifierPart:()=>Qa,isIdentifierStart:()=>un,isIdentifierText:()=>Cg,isIdentifierTypePredicate:()=>SP,isIdentifierTypeReference:()=>QM,isIfStatement:()=>SJ,isIgnoredFileFromWildCardWatching:()=>isIgnoredFileFromWildCardWatching,isImplicitGlob:()=>US,isImportCall:()=>t2,isImportClause:()=>JJ,isImportDeclaration:()=>C6,isImportEqualsDeclaration:()=>w6,isImportKeyword:()=>Wx,isImportMeta:()=>x0,isImportOrExportSpecifier:()=>RA,isImportOrExportSpecifierName:()=>isImportOrExportSpecifierName,isImportSpecifier:()=>f8,isImportTypeAssertionContainer:()=>RJ,isImportTypeNode:()=>ru,isImportableFile:()=>isImportableFile,isInComment:()=>isInComment,isInExpressionContext:()=>eT,isInJSDoc:()=>nT,isInJSFile:()=>Wt,isInJSXText:()=>isInJSXText,isInJsonFile:()=>$P,isInNonReferenceComment:()=>isInNonReferenceComment,isInReferenceComment:()=>isInReferenceComment,isInRightSideOfInternalImportEqualsDeclaration:()=>isInRightSideOfInternalImportEqualsDeclaration,isInString:()=>isInString,isInTemplateString:()=>isInTemplateString,isInTopLevelContext:()=>NP,isInTypeQuery:()=>wN,isIncrementalCompilation:()=>cM,isIndexSignatureDeclaration:()=>l6,isIndexedAccessTypeNode:()=>i8,isInferTypeNode:()=>r8,isInfinityOrNaNString:()=>iL,isInitializedProperty:()=>isInitializedProperty,isInitializedVariable:()=>wS,isInsideJsxElement:()=>isInsideJsxElement,isInsideJsxElementOrAttribute:()=>isInsideJsxElementOrAttribute,isInsideNodeModules:()=>isInsideNodeModules,isInsideTemplateLiteral:()=>isInsideTemplateLiteral,isInstantiatedModule:()=>isInstantiatedModule,isInterfaceDeclaration:()=>su,isInternalDeclaration:()=>isInternalDeclaration,isInternalModuleImportEqualsDeclaration:()=>GP,isInternalName:()=>DR,isIntersectionTypeNode:()=>e8,isIntrinsicJsxName:()=>WT,isIterationStatement:()=>b3,isJSDoc:()=>cs,isJSDocAllType:()=>rR,isJSDocAugmentsTag:()=>Mm,isJSDocAuthorTag:()=>_R,isJSDocCallbackTag:()=>cR,isJSDocClassTag:()=>T8,isJSDocCommentContainingNode:()=>C3,isJSDocConstructSignature:()=>yI,isJSDocDeprecatedTag:()=>J6,isJSDocEnumTag:()=>x8,isJSDocFunctionType:()=>Om,isJSDocImplementsTag:()=>C8,isJSDocIndexSignature:()=>YP,isJSDocLikeText:()=>z8,isJSDocLink:()=>ZJ,isJSDocLinkCode:()=>eR,isJSDocLinkLike:()=>ul,isJSDocLinkPlain:()=>tR,isJSDocMemberName:()=>r_,isJSDocNameReference:()=>zf,isJSDocNamepathType:()=>sR,isJSDocNamespaceBody:()=>gk,isJSDocNode:()=>zg,isJSDocNonNullableType:()=>iR,isJSDocNullableType:()=>v8,isJSDocOptionalParameter:()=>lx,isJSDocOptionalType:()=>aR,isJSDocOverloadTag:()=>L6,isJSDocOverrideTag:()=>S8,isJSDocParameterTag:()=>h_,isJSDocPrivateTag:()=>N6,isJSDocPropertyLikeTag:()=>Ig,isJSDocPropertyTag:()=>fR,isJSDocProtectedTag:()=>O6,isJSDocPublicTag:()=>I6,isJSDocReadonlyTag:()=>M6,isJSDocReturnTag:()=>R6,isJSDocSatisfiesExpression:()=>mL,isJSDocSatisfiesTag:()=>j6,isJSDocSeeTag:()=>lR,isJSDocSignature:()=>cu,isJSDocTag:()=>Wg,isJSDocTemplateTag:()=>Ko,isJSDocThisTag:()=>w8,isJSDocThrowsTag:()=>dR,isJSDocTypeAlias:()=>Hl,isJSDocTypeAssertion:()=>N8,isJSDocTypeExpression:()=>b8,isJSDocTypeLiteral:()=>P6,isJSDocTypeTag:()=>lu,isJSDocTypedefTag:()=>uR,isJSDocUnknownTag:()=>pR,isJSDocUnknownType:()=>nR,isJSDocVariadicType:()=>oR,isJSXTagName:()=>Mf,isJsonEqual:()=>$2,isJsonSourceFile:()=>e2,isJsxAttribute:()=>VJ,isJsxAttributeLike:()=>Dk,isJsxAttributeName:()=>bL,isJsxAttributes:()=>D6,isJsxChild:()=>x3,isJsxClosingElement:()=>qf,isJsxClosingFragment:()=>WJ,isJsxElement:()=>Q0,isJsxExpression:()=>GJ,isJsxFragment:()=>dl,isJsxNamespacedName:()=>U_,isJsxOpeningElement:()=>Oo,isJsxOpeningFragment:()=>k6,isJsxOpeningLikeElement:()=>w3,isJsxOpeningLikeElementTagName:()=>isJsxOpeningLikeElementTagName,isJsxSelfClosingElement:()=>zJ,isJsxSpreadAttribute:()=>HJ,isJsxTagNameExpression:()=>kk,isJsxText:()=>kd,isJumpStatementTarget:()=>isJumpStatementTarget,isKeyword:()=>Si,isKeywordOrPunctuation:()=>Jf,isKnownSymbol:()=>GI,isLabelName:()=>isLabelName,isLabelOfLabeledStatement:()=>isLabelOfLabeledStatement,isLabeledStatement:()=>u8,isLateVisibilityPaintedStatement:()=>FD,isLeftHandSideExpression:()=>Lo,isLeftHandSideOfAssignment:()=>BN,isLet:()=>oP,isLineBreak:()=>mr,isLiteralComputedPropertyDeclarationName:()=>CT,isLiteralExpression:()=>Og,isLiteralExpressionOfObject:()=>MA,isLiteralImportTypeNode:()=>H3,isLiteralKind:()=>Ng,isLiteralLikeAccess:()=>Lf,isLiteralLikeElementAccess:()=>Vl,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>isLiteralNameOfPropertyDeclarationOrIndexAccess,isLiteralTypeLikeExpression:()=>YR,isLiteralTypeLiteral:()=>ak,isLiteralTypeNode:()=>m6,isLocalName:()=>Y0,isLogicalOperator:()=>RN,isLogicalOrCoalescingAssignmentExpression:()=>jN,isLogicalOrCoalescingAssignmentOperator:()=>vm,isLogicalOrCoalescingBinaryExpression:()=>FN,isLogicalOrCoalescingBinaryOperator:()=>fS,isMappedTypeNode:()=>a8,isMemberName:()=>ro,isMetaProperty:()=>b6,isMethodDeclaration:()=>d_,isMethodOrAccessor:()=>Rg,isMethodSignature:()=>Vx,isMinusToken:()=>_6,isMissingDeclaration:()=>UJ,isModifier:()=>Lg,isModifierKind:()=>bi,isModifierLike:()=>Of,isModuleAugmentationExternal:()=>F3,isModuleBlock:()=>p8,isModuleBody:()=>hk,isModuleDeclaration:()=>Yi,isModuleExportsAccessExpression:()=>u2,isModuleIdentifier:()=>cT,isModuleName:()=>QR,isModuleOrEnumDeclaration:()=>vk,isModuleReference:()=>Ak,isModuleSpecifierLike:()=>isModuleSpecifierLike,isModuleWithStringLiteralName:()=>DD,isNameOfFunctionDeclaration:()=>isNameOfFunctionDeclaration,isNameOfModuleDeclaration:()=>isNameOfModuleDeclaration,isNamedClassElement:()=>GA,isNamedDeclaration:()=>Qd,isNamedEvaluation:()=>QI,isNamedEvaluationSource:()=>jT,isNamedExportBindings:()=>PA,isNamedExports:()=>d8,isNamedImportBindings:()=>bk,isNamedImports:()=>BJ,isNamedImportsOrExports:()=>LO,isNamedTupleMember:()=>p6,isNamespaceBody:()=>yk,isNamespaceExport:()=>Im,isNamespaceExportDeclaration:()=>x6,isNamespaceImport:()=>E6,isNamespaceReexportDeclaration:()=>WP,isNewExpression:()=>o8,isNewExpressionTarget:()=>isNewExpressionTarget,isNightly:()=>uN,isNoSubstitutionTemplateLiteral:()=>Bx,isNode:()=>NA,isNodeArray:()=>va,isNodeArrayMultiLine:()=>uO,isNodeDescendantOf:()=>NI,isNodeKind:()=>ql,isNodeLikeSystem:()=>pE,isNodeModulesDirectory:()=>RE,isNodeWithPossibleHoistedDeclaration:()=>EI,isNonContextualKeyword:()=>MT,isNonExportDefaultModifier:()=>gj,isNonGlobalAmbientModule:()=>PD,isNonGlobalDeclaration:()=>isNonGlobalDeclaration,isNonNullAccess:()=>dL,isNonNullChain:()=>e3,isNonNullExpression:()=>jo,isNonStaticMethodOrAccessorWithPrivateName:()=>isNonStaticMethodOrAccessorWithPrivateName,isNotEmittedOrPartiallyEmittedNode:()=>_k,isNotEmittedStatement:()=>A6,isNullishCoalesce:()=>kA,isNumber:()=>LC,isNumericLiteral:()=>lo,isNumericLiteralName:()=>ax,isObjectBindingElementWithoutPropertyName:()=>isObjectBindingElementWithoutPropertyName,isObjectBindingOrAssignmentElement:()=>f3,isObjectBindingOrAssignmentPattern:()=>p3,isObjectBindingPattern:()=>sJ,isObjectLiteralElement:()=>b0,isObjectLiteralElementLike:()=>Fg,isObjectLiteralExpression:()=>uo,isObjectLiteralMethod:()=>vP,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>TP,isObjectTypeDeclaration:()=>NO,isOctalDigit:()=>If,isOmittedExpression:()=>Pm,isOptionalChain:()=>Dg,isOptionalChainRoot:()=>Pg,isOptionalDeclaration:()=>fL,isOptionalJSDocPropertyLikeTag:()=>_x,isOptionalTypeNode:()=>Yx,isOuterExpression:()=>Rm,isOutermostOptionalChain:()=>AA,isOverrideModifier:()=>rJ,isPackedArrayLiteral:()=>eL,isParameter:()=>Ma,isParameterDeclaration:()=>KI,isParameterOrCatchClauseVariable:()=>aL,isParameterPropertyDeclaration:()=>E4,isParameterPropertyModifier:()=>o3,isParenthesizedExpression:()=>is,isParenthesizedTypeNode:()=>f6,isParseTreeNode:()=>Tl,isPartOfTypeNode:()=>r2,isPartOfTypeQuery:()=>tT,isPartiallyEmittedExpression:()=>c8,isPatternMatch:()=>lg,isPinnedComment:()=>L3,isPlainJsFile:()=>_D,isPlusToken:()=>s6,isPossiblyTypeArgumentPosition:()=>isPossiblyTypeArgumentPosition,isPostfixUnaryExpression:()=>_8,isPrefixUnaryExpression:()=>Dm,isPrivateIdentifier:()=>jr,isPrivateIdentifierClassElementDeclaration:()=>a3,isPrivateIdentifierPropertyAccessExpression:()=>qA,isPrivateIdentifierSymbol:()=>XI,isProgramBundleEmitBuildInfo:()=>isProgramBundleEmitBuildInfo,isProgramUptoDate:()=>isProgramUptoDate,isPrologueDirective:()=>Ea,isPropertyAccessChain:()=>Y4,isPropertyAccessEntityNameExpression:()=>hS,isPropertyAccessExpression:()=>Br,isPropertyAccessOrQualifiedName:()=>ek,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>ZA,isPropertyAssignment:()=>_s,isPropertyDeclaration:()=>oo,isPropertyName:()=>zl,isPropertyNameLiteral:()=>P0,isPropertySignature:()=>Zl,isProtoSetter:()=>RT,isPrototypeAccess:()=>$l,isPrototypePropertyAssignment:()=>cI,isPunctuation:()=>OT,isPushOrUnshiftIdentifier:()=>YI,isQualifiedName:()=>M_,isQuestionDotToken:()=>$L,isQuestionOrExclamationToken:()=>HR,isQuestionOrPlusOrMinusToken:()=>$R,isQuestionToken:()=>Pl,isRawSourceMap:()=>isRawSourceMap,isReadonlyKeyword:()=>zx,isReadonlyKeywordOrPlusOrMinusToken:()=>XR,isRecognizedTripleSlashComment:()=>yD,isReferenceFileLocation:()=>isReferenceFileLocation,isReferencedFile:()=>isReferencedFile,isRegularExpressionLiteral:()=>qL,isRequireCall:()=>Wl,isRequireVariableStatement:()=>oT,isRestParameter:()=>A3,isRestTypeNode:()=>Kx,isReturnStatement:()=>DJ,isReturnStatementWithFixablePromiseHandler:()=>isReturnStatementWithFixablePromiseHandler,isRightSideOfAccessExpression:()=>yS,isRightSideOfPropertyAccess:()=>isRightSideOfPropertyAccess,isRightSideOfQualifiedName:()=>isRightSideOfQualifiedName,isRightSideOfQualifiedNameOrPropertyAccess:()=>zN,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>WN,isRootedDiskPath:()=>v_,isSameEntityName:()=>u_,isSatisfiesExpression:()=>yJ,isScopeMarker:()=>v3,isSemicolonClassElement:()=>vJ,isSetAccessor:()=>Zc,isSetAccessorDeclaration:()=>Qo,isShebangTrivia:()=>xg,isShorthandAmbientModuleSymbol:()=>ID,isShorthandPropertyAssignment:()=>_u,isSignedNumericLiteral:()=>T2,isSimpleCopiableExpression:()=>isSimpleCopiableExpression,isSimpleInlineableExpression:()=>isSimpleInlineableExpression,isSingleOrDoubleQuote:()=>ZP,isSourceFile:()=>ii,isSourceFileFromLibrary:()=>isSourceFileFromLibrary,isSourceFileJS:()=>c2,isSourceFileNotJS:()=>XP,isSourceFileNotJson:()=>QP,isSourceMapping:()=>isSourceMapping,isSpecialPropertyDeclaration:()=>lI,isSpreadAssignment:()=>y8,isSpreadElement:()=>y6,isStatement:()=>T3,isStatementButNotDeclaration:()=>Ck,isStatementOrBlock:()=>S3,isStatementWithLocals:()=>cD,isStatic:()=>N0,isStaticModifier:()=>eJ,isString:()=>b_,isStringAKeyword:()=>BI,isStringANonContextualKeyword:()=>FI,isStringAndEmptyAnonymousObjectIntersection:()=>isStringAndEmptyAnonymousObjectIntersection,isStringDoubleQuoted:()=>eI,isStringLiteral:()=>mn,isStringLiteralLike:()=>Kn,isStringLiteralOrJsxExpression:()=>Pk,isStringLiteralOrTemplate:()=>isStringLiteralOrTemplate,isStringOrNumericLiteralLike:()=>Qi,isStringOrRegularExpressionOrTemplateLiteral:()=>isStringOrRegularExpressionOrTemplateLiteral,isStringTextContainingNode:()=>BA,isSuperCall:()=>sP,isSuperKeyword:()=>Uf,isSuperOrSuperProperty:()=>JP,isSuperProperty:()=>yd,isSupportedSourceFileName:()=>NM,isSwitchStatement:()=>IJ,isSyntaxList:()=>mR,isSyntheticExpression:()=>gJ,isSyntheticReference:()=>qJ,isTagName:()=>isTagName,isTaggedTemplateExpression:()=>s8,isTaggedTemplateTag:()=>isTaggedTemplateTag,isTemplateExpression:()=>dJ,isTemplateHead:()=>zL,isTemplateLiteral:()=>nk,isTemplateLiteralKind:()=>Sl,isTemplateLiteralToken:()=>LA,isTemplateLiteralTypeNode:()=>oJ,isTemplateLiteralTypeSpan:()=>aJ,isTemplateMiddle:()=>WL,isTemplateMiddleOrTemplateTail:()=>JA,isTemplateSpan:()=>bJ,isTemplateTail:()=>VL,isTextWhiteSpaceLike:()=>isTextWhiteSpaceLike,isThis:()=>isThis,isThisContainerOrFunctionBlock:()=>IP,isThisIdentifier:()=>ym,isThisInTypeQuery:()=>CN,isThisInitializedDeclaration:()=>jP,isThisInitializedObjectBindingExpression:()=>FP,isThisProperty:()=>RP,isThisTypeNode:()=>d6,isThisTypeParameter:()=>ox,isThisTypePredicate:()=>xP,isThrowStatement:()=>NJ,isToken:()=>OA,isTokenKind:()=>r3,isTraceEnabled:()=>isTraceEnabled,isTransientSymbol:()=>T0,isTrivia:()=>qI,isTryStatement:()=>OJ,isTupleTypeNode:()=>Qx,isTypeAlias:()=>gI,isTypeAliasDeclaration:()=>T6,isTypeAssertionExpression:()=>cJ,isTypeDeclaration:()=>sx,isTypeElement:()=>jg,isTypeKeyword:()=>isTypeKeyword,isTypeKeywordToken:()=>isTypeKeywordToken,isTypeKeywordTokenOrIdentifier:()=>isTypeKeywordTokenOrIdentifier,isTypeLiteralNode:()=>Em,isTypeNode:()=>g0,isTypeNodeKind:()=>PS,isTypeOfExpression:()=>uJ,isTypeOnlyExportDeclaration:()=>i3,isTypeOnlyImportDeclaration:()=>n3,isTypeOnlyImportOrExportDeclaration:()=>jA,isTypeOperatorNode:()=>n8,isTypeParameterDeclaration:()=>No,isTypePredicateNode:()=>Gx,isTypeQueryNode:()=>Xx,isTypeReferenceNode:()=>R_,isTypeReferenceType:()=>Mk,isTypeUsableAsPropertyName:()=>TL,isUMDExportSymbol:()=>DO,isUnaryExpression:()=>y3,isUnaryExpressionWithWrite:()=>ik,isUnicodeIdentifierStart:()=>i4,isUnionTypeNode:()=>Zx,isUnparsedNode:()=>IA,isUnparsedPrepend:()=>QJ,isUnparsedSource:()=>KJ,isUnparsedTextLike:()=>t3,isUrl:()=>xE,isValidBigIntString:()=>ex,isValidESSymbolDeclaration:()=>yP,isValidTypeOnlyAliasUseSite:()=>HM,isValueSignatureDeclaration:()=>AI,isVarAwaitUsing:()=>iP,isVarConst:()=>V3,isVarUsing:()=>aP,isVariableDeclaration:()=>ki,isVariableDeclarationInVariableStatement:()=>X3,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>pm,isVariableDeclarationInitializedToRequire:()=>iT,isVariableDeclarationList:()=>v6,isVariableLike:()=>n2,isVariableLikeOrAccessor:()=>mP,isVariableStatement:()=>as,isVoidExpression:()=>h6,isWatchSet:()=>yO,isWhileStatement:()=>wJ,isWhiteSpaceLike:()=>Vi,isWhiteSpaceSingleLine:()=>Io,isWithStatement:()=>PJ,isWriteAccess:()=>xO,isWriteOnlyAccess:()=>SO,isYieldExpression:()=>mJ,jsxModeNeedsExplicitImport:()=>jsxModeNeedsExplicitImport,keywordPart:()=>keywordPart,last:()=>ka,lastOrUndefined:()=>wi,length:()=>Ka,libMap:()=>libMap,libs:()=>libs,lineBreakPart:()=>lineBreakPart,linkNamePart:()=>linkNamePart,linkPart:()=>linkPart,linkTextPart:()=>linkTextPart,listFiles:()=>listFiles,loadModuleFromGlobalCache:()=>loadModuleFromGlobalCache,loadWithModeAwareCache:()=>loadWithModeAwareCache,makeIdentifierFromModuleName:()=>AD,makeImport:()=>makeImport,makeImportIfNecessary:()=>makeImportIfNecessary,makeStringLiteral:()=>makeStringLiteral,mangleScopedPackageName:()=>mangleScopedPackageName,map:()=>Aa,mapAllOrFail:()=>H5,mapDefined:()=>Za,mapDefinedEntries:()=>X5,mapDefinedIterator:()=>G5,mapEntries:()=>Z5,mapIterator:()=>z5,mapOneOrMany:()=>mapOneOrMany,mapToDisplayParts:()=>mapToDisplayParts,matchFiles:()=>EM,matchPatternOrExact:()=>FM,matchedText:()=>tE,matchesExclude:()=>matchesExclude,maybeBind:()=>rr,maybeSetLocalizedDiagnosticMessages:()=>OS,memoize:()=>ry,memoizeCached:()=>FC,memoizeOne:()=>Nn,memoizeWeak:()=>jC,metadataHelper:()=>metadataHelper,min:()=>qC,minAndMax:()=>UM,missingFileModifiedTime:()=>missingFileModifiedTime,modifierToFlag:()=>J2,modifiersToFlags:()=>ln,moduleOptionDeclaration:()=>moduleOptionDeclaration,moduleResolutionIsEqualTo:()=>eD,moduleResolutionNameAndModeGetter:()=>moduleResolutionNameAndModeGetter,moduleResolutionOptionDeclarations:()=>moduleResolutionOptionDeclarations,moduleResolutionSupportsPackageJsonExportsAndImports:()=>q2,moduleResolutionUsesNodeModules:()=>moduleResolutionUsesNodeModules,moduleSpecifiers:()=>ts_moduleSpecifiers_exports,moveEmitHelpers:()=>moveEmitHelpers,moveRangeEnd:()=>tO,moveRangePastDecorators:()=>SS,moveRangePastModifiers:()=>rO,moveRangePos:()=>Sd,moveSyntheticComments:()=>moveSyntheticComments,mutateMap:()=>EO,mutateMapSkippingNewValues:()=>AS,needsParentheses:()=>needsParentheses,needsScopeMarker:()=>lk,newCaseClauseTracker:()=>newCaseClauseTracker,newPrivateEnvironment:()=>newPrivateEnvironment,noEmitNotification:()=>noEmitNotification,noEmitSubstitution:()=>noEmitSubstitution,noTransformers:()=>noTransformers,noTruncationMaximumTruncationLength:()=>dx,nodeCanBeDecorated:()=>K3,nodeHasName:()=>N4,nodeIsDecorated:()=>l_,nodeIsMissing:()=>zi,nodeIsPresent:()=>wl,nodeIsSynthesized:()=>Ta,nodeModuleNameResolver:()=>nodeModuleNameResolver,nodeModulesPathPart:()=>nodeModulesPathPart,nodeNextJsonConfigResolver:()=>nodeNextJsonConfigResolver,nodeOrChildIsDecorated:()=>A0,nodeOverlapsWithStartEnd:()=>nodeOverlapsWithStartEnd,nodePosToString:()=>uD,nodeSeenTracker:()=>nodeSeenTracker,nodeStartsNewLexicalEnvironment:()=>ZI,nodeToDisplayParts:()=>nodeToDisplayParts,noop:()=>Rn,noopFileWatcher:()=>noopFileWatcher,normalizePath:()=>pn,normalizeSlashes:()=>qo,not:()=>iE,notImplemented:()=>RC,notImplementedResolver:()=>notImplementedResolver,nullNodeConverters:()=>nullNodeConverters,nullParenthesizerRules:()=>i6,nullTransformationContext:()=>nullTransformationContext,objectAllocator:()=>wt,operatorPart:()=>operatorPart,optionDeclarations:()=>optionDeclarations,optionMapToObject:()=>optionMapToObject,optionsAffectingProgramStructure:()=>optionsAffectingProgramStructure,optionsForBuild:()=>optionsForBuild,optionsForWatch:()=>optionsForWatch,optionsHaveChanges:()=>E_,optionsHaveModuleResolutionChanges:()=>k3,or:()=>ug,orderedRemoveItem:()=>KC,orderedRemoveItemAt:()=>Rv,outFile:()=>A2,packageIdToPackageName:()=>D3,packageIdToString:()=>nD,padLeft:()=>qv,padRight:()=>_E,paramHelper:()=>paramHelper,parameterIsThisKeyword:()=>Xl,parameterNamePart:()=>parameterNamePart,parseBaseNodeFactory:()=>tg,parseBigInt:()=>VM,parseBuildCommand:()=>parseBuildCommand,parseCommandLine:()=>parseCommandLine,parseCommandLineWorker:()=>parseCommandLineWorker,parseConfigFileTextToJson:()=>parseConfigFileTextToJson,parseConfigFileWithSystem:()=>parseConfigFileWithSystem,parseConfigHostFromCompilerHostLike:()=>parseConfigHostFromCompilerHostLike,parseCustomTypeOption:()=>parseCustomTypeOption,parseIsolatedEntityName:()=>Jj,parseIsolatedJSDocComment:()=>jj,parseJSDocTypeExpressionForTests:()=>Fj,parseJsonConfigFileContent:()=>parseJsonConfigFileContent,parseJsonSourceFileConfigFileContent:()=>parseJsonSourceFileConfigFileContent,parseJsonText:()=>Rj,parseListTypeOption:()=>parseListTypeOption,parseNodeFactory:()=>z_,parseNodeModuleFromPath:()=>parseNodeModuleFromPath,parsePackageName:()=>parsePackageName,parsePseudoBigInt:()=>Sm,parseValidBigInt:()=>ZS,patchWriteFileEnsuringDirectory:()=>patchWriteFileEnsuringDirectory,pathContainsNodeModules:()=>pathContainsNodeModules,pathIsAbsolute:()=>mg,pathIsBareSpecifier:()=>CE,pathIsRelative:()=>rs,patternText:()=>eE,perfLogger:()=>Yf,performIncrementalCompilation:()=>performIncrementalCompilation,performance:()=>ts_performance_exports,plainJSErrors:()=>plainJSErrors,positionBelongsToNode:()=>positionBelongsToNode,positionIsASICandidate:()=>positionIsASICandidate,positionIsSynthesized:()=>Oa,positionsAreOnSameLine:()=>P_,preProcessFile:()=>preProcessFile,probablyUsesSemicolons:()=>probablyUsesSemicolons,processCommentPragmas:()=>X8,processPragmasIntoFields:()=>$8,processTaggedTemplateExpression:()=>processTaggedTemplateExpression,programContainsEsModules:()=>programContainsEsModules,programContainsModules:()=>programContainsModules,projectReferenceIsEqualTo:()=>Zk,propKeyHelper:()=>propKeyHelper,propertyNamePart:()=>propertyNamePart,pseudoBigIntToString:()=>Q2,punctuationPart:()=>punctuationPart,pushIfUnique:()=>Ol,quote:()=>quote,quotePreferenceFromString:()=>quotePreferenceFromString,rangeContainsPosition:()=>rangeContainsPosition,rangeContainsPositionExclusive:()=>rangeContainsPositionExclusive,rangeContainsRange:()=>rangeContainsRange,rangeContainsRangeExclusive:()=>rangeContainsRangeExclusive,rangeContainsStartEnd:()=>rangeContainsStartEnd,rangeEndIsOnSameLineAsRangeStart:()=>_O,rangeEndPositionsAreOnSameLine:()=>sO,rangeEquals:()=>fC,rangeIsOnSingleLine:()=>aO,rangeOfNode:()=>qM,rangeOfTypeParameters:()=>zM,rangeOverlapsWithStartEnd:()=>rangeOverlapsWithStartEnd,rangeStartIsOnSameLineAsRangeEnd:()=>xS,rangeStartPositionsAreOnSameLine:()=>oO,readBuilderProgram:()=>readBuilderProgram,readConfigFile:()=>readConfigFile,readHelper:()=>readHelper,readJson:()=>eO,readJsonConfigFile:()=>readJsonConfigFile,readJsonOrUndefined:()=>bS,realizeDiagnostics:()=>realizeDiagnostics,reduceEachLeadingCommentRange:()=>a4,reduceEachTrailingCommentRange:()=>o4,reduceLeft:()=>Jd,reduceLeftIterator:()=>J5,reducePathComponents:()=>Da,refactor:()=>ts_refactor_exports,regExpEscape:()=>xM,relativeComplement:()=>lC,removeAllComments:()=>removeAllComments,removeEmitHelper:()=>removeEmitHelper,removeExtension:()=>QS,removeFileExtension:()=>Al,removeIgnoredPath:()=>removeIgnoredPath,removeMinAndVersionNumbers:()=>YC,removeOptionality:()=>removeOptionality,removePrefix:()=>rE,removeSuffix:()=>$C,removeTrailingDirectorySeparator:()=>S_,repeatString:()=>repeatString,replaceElement:()=>gC,resolutionExtensionIsTSOrJson:()=>JM,resolveConfigFileProjectName:()=>resolveConfigFileProjectName,resolveJSModule:()=>resolveJSModule,resolveLibrary:()=>resolveLibrary,resolveModuleName:()=>resolveModuleName,resolveModuleNameFromCache:()=>resolveModuleNameFromCache,resolvePackageNameToPackageJson:()=>resolvePackageNameToPackageJson,resolvePath:()=>d0,resolveProjectReferencePath:()=>resolveProjectReferencePath,resolveTripleslashReference:()=>resolveTripleslashReference,resolveTypeReferenceDirective:()=>resolveTypeReferenceDirective,resolvingEmptyArray:()=>px,restHelper:()=>restHelper,returnFalse:()=>Xf,returnNoopFileWatcher:()=>returnNoopFileWatcher,returnTrue:()=>Iv,returnUndefined:()=>JC,returnsPromise:()=>returnsPromise,runInitializersHelper:()=>runInitializersHelper,sameFlatMap:()=>Sv,sameMap:()=>W5,sameMapping:()=>sameMapping,scanShebangTrivia:()=>wg,scanTokenAtPosition:()=>ZD,scanner:()=>Fo,screenStartingMessageCodes:()=>screenStartingMessageCodes,semanticDiagnosticsOptionDeclarations:()=>semanticDiagnosticsOptionDeclarations,serializeCompilerOptions:()=>serializeCompilerOptions,server:()=>ts_server_exports,servicesVersion:()=>d7,setCommentRange:()=>setCommentRange,setConfigFileInOptions:()=>setConfigFileInOptions,setConstantValue:()=>setConstantValue,setEachParent:()=>a_,setEmitFlags:()=>setEmitFlags,setFunctionNameHelper:()=>setFunctionNameHelper,setGetSourceFileAsHashVersioned:()=>setGetSourceFileAsHashVersioned,setIdentifierAutoGenerate:()=>setIdentifierAutoGenerate,setIdentifierGeneratedImportReference:()=>setIdentifierGeneratedImportReference,setIdentifierTypeArguments:()=>setIdentifierTypeArguments,setInternalEmitFlags:()=>setInternalEmitFlags,setLocalizedDiagnosticMessages:()=>NS,setModuleDefaultHelper:()=>setModuleDefaultHelper,setNodeFlags:()=>KM,setObjectAllocator:()=>IS,setOriginalNode:()=>Xr,setParent:()=>Xi,setParentRecursive:()=>rx,setPrivateIdentifier:()=>setPrivateIdentifier,setResolvedModule:()=>Qk,setResolvedTypeReferenceDirective:()=>Yk,setSnippetElement:()=>setSnippetElement,setSourceMapRange:()=>setSourceMapRange,setStackTraceLimit:()=>setStackTraceLimit,setStartsOnNewLine:()=>setStartsOnNewLine,setSyntheticLeadingComments:()=>setSyntheticLeadingComments,setSyntheticTrailingComments:()=>setSyntheticTrailingComments,setSys:()=>setSys,setSysLog:()=>setSysLog,setTextRange:()=>Ve,setTextRangeEnd:()=>tx,setTextRangePos:()=>wd,setTextRangePosEnd:()=>Ya,setTextRangePosWidth:()=>Cd,setTokenSourceMapRange:()=>setTokenSourceMapRange,setTypeNode:()=>setTypeNode,setUILocale:()=>Lv,setValueDeclaration:()=>uI,shouldAllowImportingTsExtension:()=>shouldAllowImportingTsExtension,shouldPreserveConstEnums:()=>_M,shouldResolveJsRequire:()=>aM,shouldUseUriStyleNodeCoreModules:()=>shouldUseUriStyleNodeCoreModules,showModuleSpecifier:()=>PO,signatureHasLiteralTypes:()=>signatureHasLiteralTypes,signatureHasRestParameter:()=>signatureHasRestParameter,signatureToDisplayParts:()=>signatureToDisplayParts,single:()=>hC,singleElementArray:()=>$f,singleIterator:()=>Y5,singleOrMany:()=>yC,singleOrUndefined:()=>Ld,skipAlias:()=>vO,skipAssertions:()=>MR,skipConstraint:()=>skipConstraint,skipOuterExpressions:()=>ls,skipParentheses:()=>Gl,skipPartiallyEmittedExpressions:()=>tm,skipTrivia:()=>Nt,skipTypeChecking:()=>WM,skipTypeParentheses:()=>PI,skipWhile:()=>lE,sliceAfter:()=>BM,some:()=>mt,sort:()=>Gf,sortAndDeduplicate:()=>wv,sortAndDeduplicateDiagnostics:()=>$E,sourceFileAffectingCompilerOptions:()=>sourceFileAffectingCompilerOptions,sourceFileMayBeEmitted:()=>I0,sourceMapCommentRegExp:()=>sourceMapCommentRegExp,sourceMapCommentRegExpDontCareLineStart:()=>sourceMapCommentRegExpDontCareLineStart,spacePart:()=>spacePart,spanMap:()=>K5,spreadArrayHelper:()=>spreadArrayHelper,stableSort:()=>Av,startEndContainsRange:()=>startEndContainsRange,startEndOverlapsWithStartEnd:()=>startEndOverlapsWithStartEnd,startOnNewLine:()=>jm,startTracing:()=>startTracing,startsWith:()=>Fr,startsWithDirectory:()=>ME,startsWithUnderscore:()=>startsWithUnderscore,startsWithUseStrict:()=>I8,stringContains:()=>eo,stringContainsAt:()=>stringContainsAt,stringToToken:()=>Rl,stripQuotes:()=>cN,supportedDeclarationExtensions:()=>n6,supportedJSExtensions:()=>H0,supportedJSExtensionsFlat:()=>r6,supportedLocaleDirectories:()=>Hg,supportedTSExtensions:()=>Ro,supportedTSExtensionsFlat:()=>t6,supportedTSImplementationExtensions:()=>Ox,suppressLeadingAndTrailingTrivia:()=>suppressLeadingAndTrailingTrivia,suppressLeadingTrivia:()=>suppressLeadingTrivia,suppressTrailingTrivia:()=>suppressTrailingTrivia,symbolEscapedNameNoDefault:()=>symbolEscapedNameNoDefault,symbolName:()=>md,symbolNameNoDefault:()=>symbolNameNoDefault,symbolPart:()=>symbolPart,symbolToDisplayParts:()=>symbolToDisplayParts,syntaxMayBeASICandidate:()=>syntaxMayBeASICandidate,syntaxRequiresTrailingSemicolonOrASI:()=>syntaxRequiresTrailingSemicolonOrASI,sys:()=>f0,sysLog:()=>sysLog,tagNamesAreEquivalent:()=>Ti,takeWhile:()=>cE,targetOptionDeclaration:()=>targetOptionDeclaration,templateObjectHelper:()=>templateObjectHelper,testFormatSettings:()=>testFormatSettings,textChangeRangeIsUnchanged:()=>C4,textChangeRangeNewSpan:()=>Qs,textChanges:()=>ts_textChanges_exports,textOrKeywordPart:()=>textOrKeywordPart,textPart:()=>textPart,textRangeContainsPositionInclusive:()=>YE,textSpanContainsPosition:()=>QE,textSpanContainsTextSpan:()=>KE,textSpanEnd:()=>Kt,textSpanIntersection:()=>w4,textSpanIntersectsWith:()=>tA,textSpanIntersectsWithPosition:()=>rA,textSpanIntersectsWithTextSpan:()=>eA,textSpanIsEmpty:()=>S4,textSpanOverlap:()=>x4,textSpanOverlapsWith:()=>ZE,textSpansEqual:()=>textSpansEqual,textToKeywordObj:()=>cl,timestamp:()=>Sa,toArray:()=>Pf,toBuilderFileEmit:()=>toBuilderFileEmit,toBuilderStateFileInfoForMultiEmit:()=>toBuilderStateFileInfoForMultiEmit,toEditorSettings:()=>sl,toFileNameLowerCase:()=>Ov,toLowerCase:()=>Nv,toPath:()=>xi,toProgramEmitPending:()=>toProgramEmitPending,tokenIsIdentifierOrKeyword:()=>kt,tokenIsIdentifierOrKeywordOrGreaterThan:()=>n4,tokenToString:()=>nr,trace:()=>trace,tracing:()=>xa,tracingEnabled:()=>tracingEnabled,transform:()=>transform,transformClassFields:()=>transformClassFields,transformDeclarations:()=>transformDeclarations,transformECMAScriptModule:()=>transformECMAScriptModule,transformES2015:()=>transformES2015,transformES2016:()=>transformES2016,transformES2017:()=>transformES2017,transformES2018:()=>transformES2018,transformES2019:()=>transformES2019,transformES2020:()=>transformES2020,transformES2021:()=>transformES2021,transformES5:()=>transformES5,transformESDecorators:()=>transformESDecorators,transformESNext:()=>transformESNext,transformGenerators:()=>transformGenerators,transformJsx:()=>transformJsx,transformLegacyDecorators:()=>transformLegacyDecorators,transformModule:()=>transformModule,transformNamedEvaluation:()=>transformNamedEvaluation,transformNodeModule:()=>transformNodeModule,transformNodes:()=>transformNodes,transformSystemModule:()=>transformSystemModule,transformTypeScript:()=>transformTypeScript,transpile:()=>transpile,transpileModule:()=>transpileModule,transpileOptionValueCompilerOptions:()=>transpileOptionValueCompilerOptions,trimString:()=>Ud,trimStringEnd:()=>n_,trimStringStart:()=>gl,tryAddToSet:()=>Q5,tryAndIgnoreErrors:()=>tryAndIgnoreErrors,tryCast:()=>On,tryDirectoryExists:()=>tryDirectoryExists,tryExtractTSExtension:()=>$N,tryFileExists:()=>tryFileExists,tryGetClassExtendingExpressionWithTypeArguments:()=>dS,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>mS,tryGetDirectories:()=>tryGetDirectories,tryGetExtensionFromPath:()=>X2,tryGetImportFromModuleSpecifier:()=>fT,tryGetJSDocSatisfiesTypeNode:()=>ux,tryGetModuleNameFromFile:()=>L8,tryGetModuleSpecifierFromDeclaration:()=>fI,tryGetNativePerformanceHooks:()=>hE,tryGetPropertyAccessOrIdentifierToString:()=>J0,tryGetPropertyNameOfBindingOrAssignmentElement:()=>R8,tryGetSourceMappingURL:()=>tryGetSourceMappingURL,tryGetTextOfPropertyName:()=>Qg,tryIOAndConsumeErrors:()=>tryIOAndConsumeErrors,tryParsePattern:()=>YS,tryParsePatterns:()=>LM,tryParseRawSourceMap:()=>tryParseRawSourceMap,tryReadDirectory:()=>tryReadDirectory,tryReadFile:()=>tryReadFile,tryRemoveDirectoryPrefix:()=>SM,tryRemoveExtension:()=>$S,tryRemovePrefix:()=>Bv,tryRemoveSuffix:()=>QC,typeAcquisitionDeclarations:()=>typeAcquisitionDeclarations,typeAliasNamePart:()=>typeAliasNamePart,typeDirectiveIsEqualTo:()=>iD,typeKeywords:()=>typeKeywords,typeParameterNamePart:()=>typeParameterNamePart,typeReferenceResolutionNameAndModeGetter:()=>typeReferenceResolutionNameAndModeGetter,typeToDisplayParts:()=>typeToDisplayParts,unchangedPollThresholds:()=>unchangedPollThresholds,unchangedTextChangeRange:()=>Vg,unescapeLeadingUnderscores:()=>Vo,unmangleScopedPackageName:()=>unmangleScopedPackageName,unorderedRemoveItem:()=>jv,unorderedRemoveItemAt:()=>cg,unreachableCodeIsError:()=>tM,unusedLabelIsError:()=>rM,unwrapInnermostStatementOfLabel:()=>bP,updateErrorForNoInputFiles:()=>updateErrorForNoInputFiles,updateLanguageServiceSourceFile:()=>u7,updateMissingFilePathsWatch:()=>updateMissingFilePathsWatch,updatePackageJsonWatch:()=>updatePackageJsonWatch,updateResolutionField:()=>updateResolutionField,updateSharedExtendedConfigFileWatcher:()=>updateSharedExtendedConfigFileWatcher,updateSourceFile:()=>q6,updateWatchingWildcardDirectories:()=>updateWatchingWildcardDirectories,usesExtensionsOnImports:()=>XS,usingSingleLineStringWriter:()=>Xk,utf16EncodeAsString:()=>Nf,validateLocaleAndSetLanguage:()=>sA,valuesHelper:()=>valuesHelper,version:()=>Hf,versionMajorMinor:()=>gv,visitArray:()=>visitArray,visitCommaListElements:()=>visitCommaListElements,visitEachChild:()=>visitEachChild,visitFunctionBody:()=>visitFunctionBody,visitIterationBody:()=>visitIterationBody,visitLexicalEnvironment:()=>visitLexicalEnvironment,visitNode:()=>visitNode,visitNodes:()=>visitNodes2,visitParameterList:()=>visitParameterList,walkUpBindingElementsAndPatterns:()=>D4,walkUpLexicalEnvironments:()=>walkUpLexicalEnvironments,walkUpOuterExpressions:()=>OR,walkUpParenthesizedExpressions:()=>xT,walkUpParenthesizedTypes:()=>kI,walkUpParenthesizedTypesAndGetParentAndChild:()=>DI,whitespaceOrMapCommentRegExp:()=>whitespaceOrMapCommentRegExp,writeCommentRange:()=>NN,writeFile:()=>vN,writeFileEnsuringDirectories:()=>TN,zipToModeAwareCache:()=>zipToModeAwareCache,zipWith:()=>ey});var hv=Vt({"src/typescript/_namespaces/ts.ts"(){"use strict";Dr(),Z8(),C7(),kB()}}),DB=I5({"src/typescript/typescript.ts"(e,t){hv(),hv(),typeof console<"u"&&(N.loggingHost={log(r,a){switch(r){case 1:return console.error(a);case 2:return console.warn(a);case 3:return console.log(a);case 4:return console.log(a)}}}),t.exports=E7}});A7.exports=DB()});var V6=ut(k7=>{k7.typescriptVersionIsAtLeast=new Proxy({},{get:()=>!0})});var H6=ut(ai=>{"use strict";var PB=ai&&ai.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),IB=ai&&ai.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),NB=ai&&ai.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&PB(t,e,r);return IB(t,e),t};Object.defineProperty(ai,"__esModule",{value:!0});ai.getDecorators=ai.getModifiers=void 0;var W_=NB(Dt()),OB=V6(),D7=OB.typescriptVersionIsAtLeast["4.8"];function MB(e,t=!1){var r;if(e!=null){if(D7){if(t||W_.canHaveModifiers(e)){let a=W_.getModifiers(e);return a?Array.from(a):void 0}return}return(r=e.modifiers)==null?void 0:r.filter(a=>!W_.isDecorator(a))}}ai.getModifiers=MB;function LB(e,t=!1){var r;if(e!=null){if(D7){if(t||W_.canHaveDecorators(e)){let a=W_.getDecorators(e);return a?Array.from(a):void 0}return}return(r=e.decorators)==null?void 0:r.filter(W_.isDecorator)}}ai.getDecorators=LB});var P7=ut(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});Fm.xhtmlEntities=void 0;Fm.xhtmlEntities={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"}});var G6=ut(V_=>{"use strict";Object.defineProperty(V_,"__esModule",{value:!0});V_.AST_TOKEN_TYPES=V_.AST_NODE_TYPES=void 0;var I7;(function(e){e.AccessorProperty="AccessorProperty",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.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.ImportAttribute="ImportAttribute",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.JSXNamespacedName="JSXNamespacedName",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.PrivateIdentifier="PrivateIdentifier",e.Program="Program",e.Property="Property",e.PropertyDefinition="PropertyDefinition",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.StaticBlock="StaticBlock",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.TSAbstractAccessorProperty="TSAbstractAccessorProperty",e.TSAbstractKeyword="TSAbstractKeyword",e.TSAbstractMethodDefinition="TSAbstractMethodDefinition",e.TSAbstractPropertyDefinition="TSAbstractPropertyDefinition",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.TSInstantiationExpression="TSInstantiationExpression",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.TSIntrinsicKeyword="TSIntrinsicKeyword",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.TSPrivateKeyword="TSPrivateKeyword",e.TSPropertySignature="TSPropertySignature",e.TSProtectedKeyword="TSProtectedKeyword",e.TSPublicKeyword="TSPublicKeyword",e.TSQualifiedName="TSQualifiedName",e.TSReadonlyKeyword="TSReadonlyKeyword",e.TSRestType="TSRestType",e.TSSatisfiesExpression="TSSatisfiesExpression",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"})(I7||(V_.AST_NODE_TYPES=I7={}));var N7;(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"})(N7||(V_.AST_TOKEN_TYPES=N7={}))});var M7=ut(O7=>{"use strict";Object.defineProperty(O7,"__esModule",{value:!0})});var J7=ut(L7=>{"use strict";Object.defineProperty(L7,"__esModule",{value:!0})});var R7=ut(Ki=>{"use strict";var JB=Ki&&Ki.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),RB=Ki&&Ki.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jB=Ki&&Ki.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&JB(t,e,r);return RB(t,e),t};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.TSESTree=void 0;Ki.TSESTree=jB(G6())});var F7=ut(jn=>{"use strict";var FB=jn&&jn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),X6=jn&&jn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&FB(t,e,r)};Object.defineProperty(jn,"__esModule",{value:!0});jn.AST_TOKEN_TYPES=jn.AST_NODE_TYPES=void 0;var j7=G6();Object.defineProperty(jn,"AST_NODE_TYPES",{enumerable:!0,get:function(){return j7.AST_NODE_TYPES}});Object.defineProperty(jn,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return j7.AST_TOKEN_TYPES}});X6(M7(),jn);X6(J7(),jn);X6(R7(),jn)});var U7=ut(B7=>{"use strict";Object.defineProperty(B7,"__esModule",{value:!0})});var z7=ut(q7=>{"use strict";Object.defineProperty(q7,"__esModule",{value:!0})});var Bm=ut(hn=>{"use strict";var BB=hn&&hn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),W7=hn&&hn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&BB(t,e,r)};Object.defineProperty(hn,"__esModule",{value:!0});hn.TSESTree=hn.AST_TOKEN_TYPES=hn.AST_NODE_TYPES=void 0;var $6=F7();Object.defineProperty(hn,"AST_NODE_TYPES",{enumerable:!0,get:function(){return $6.AST_NODE_TYPES}});Object.defineProperty(hn,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return $6.AST_TOKEN_TYPES}});Object.defineProperty(hn,"TSESTree",{enumerable:!0,get:function(){return $6.TSESTree}});W7(U7(),hn);W7(z7(),hn)});var zm=ut(me=>{"use strict";var UB=me&&me.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),qB=me&&me.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zB=me&&me.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&UB(t,e,r);return qB(t,e),t};Object.defineProperty(me,"__esModule",{value:!0});me.getNamespaceModifiers=me.nodeCanBeDecorated=me.getContainingFunction=me.nodeIsPresent=me.isThisInTypeQuery=me.isThisIdentifier=me.identifierIsThisKeyword=me.firstDefined=me.nodeHasTokens=me.nodeHasIllegalDecorators=me.createError=me.TSError=me.convertTokens=me.convertToken=me.getTokenType=me.isChildUnwrappableOptionalChain=me.isChainExpression=me.isOptional=me.isComputedProperty=me.unescapeStringLiteralText=me.hasJSXAncestor=me.findFirstMatchingAncestor=me.findNextToken=me.getTSNodeAccessibility=me.getDeclarationKind=me.isJSXToken=me.getRange=me.canContainDirective=me.getLocFor=me.getLineAndCharacterFor=me.getBinaryExpressionType=me.isComment=me.isComma=me.getLastModifier=me.hasModifier=me.isESTreeClassMember=me.getTextForTokenKind=me.isESTreeBinaryOperator=me.isLogicalOperator=void 0;var Qe=zB(Dt()),uu=H6(),WB=P7(),ir=Bm(),VB=V6(),V7=VB.typescriptVersionIsAtLeast["5.0"],ye=Qe.SyntaxKind,HB=new Set([ye.BarBarToken,ye.AmpersandAmpersandToken,ye.QuestionQuestionToken]),GB=new Set([Qe.SyntaxKind.EqualsToken,Qe.SyntaxKind.PlusEqualsToken,Qe.SyntaxKind.MinusEqualsToken,Qe.SyntaxKind.AsteriskEqualsToken,Qe.SyntaxKind.AsteriskAsteriskEqualsToken,Qe.SyntaxKind.SlashEqualsToken,Qe.SyntaxKind.PercentEqualsToken,Qe.SyntaxKind.LessThanLessThanEqualsToken,Qe.SyntaxKind.GreaterThanGreaterThanEqualsToken,Qe.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken,Qe.SyntaxKind.AmpersandEqualsToken,Qe.SyntaxKind.BarEqualsToken,Qe.SyntaxKind.BarBarEqualsToken,Qe.SyntaxKind.AmpersandAmpersandEqualsToken,Qe.SyntaxKind.QuestionQuestionEqualsToken,Qe.SyntaxKind.CaretEqualsToken]),XB=new Set([ye.InstanceOfKeyword,ye.InKeyword,ye.AsteriskAsteriskToken,ye.AsteriskToken,ye.SlashToken,ye.PercentToken,ye.PlusToken,ye.MinusToken,ye.AmpersandToken,ye.BarToken,ye.CaretToken,ye.LessThanLessThanToken,ye.GreaterThanGreaterThanToken,ye.GreaterThanGreaterThanGreaterThanToken,ye.AmpersandAmpersandToken,ye.BarBarToken,ye.LessThanToken,ye.LessThanEqualsToken,ye.GreaterThanToken,ye.GreaterThanEqualsToken,ye.EqualsEqualsToken,ye.EqualsEqualsEqualsToken,ye.ExclamationEqualsEqualsToken,ye.ExclamationEqualsToken]);function $B(e){return GB.has(e.kind)}function H7(e){return HB.has(e.kind)}me.isLogicalOperator=H7;function G7(e){return XB.has(e.kind)}me.isESTreeBinaryOperator=G7;function Um(e){return Qe.tokenToString(e)}me.getTextForTokenKind=Um;function QB(e){return e.kind!==ye.SemicolonClassElement}me.isESTreeClassMember=QB;function X7(e,t){let r=(0,uu.getModifiers)(t);return(r==null?void 0:r.some(a=>a.kind===e))===!0}me.hasModifier=X7;function YB(e){let t=(0,uu.getModifiers)(e);return t==null?null:t[t.length-1]??null}me.getLastModifier=YB;function KB(e){return e.kind===ye.CommaToken}me.isComma=KB;function $7(e){return e.kind===ye.SingleLineCommentTrivia||e.kind===ye.MultiLineCommentTrivia}me.isComment=$7;function ZB(e){return e.kind===ye.JSDocComment}function eU(e){if($B(e))return{type:ir.AST_NODE_TYPES.AssignmentExpression,operator:Um(e.kind)};if(H7(e))return{type:ir.AST_NODE_TYPES.LogicalExpression,operator:Um(e.kind)};if(G7(e))return{type:ir.AST_NODE_TYPES.BinaryExpression,operator:Um(e.kind)};throw new Error(`Unexpected binary operator ${Qe.tokenToString(e.kind)}`)}me.getBinaryExpressionType=eU;function Q7(e,t){let r=t.getLineAndCharacterOfPosition(e);return{line:r.line+1,column:r.character}}me.getLineAndCharacterFor=Q7;function Y7(e,t){let[r,a]=e.map(_=>Q7(_,t));return{start:r,end:a}}me.getLocFor=Y7;function tU(e){if(e.kind===Qe.SyntaxKind.Block)switch(e.parent.kind){case Qe.SyntaxKind.Constructor:case Qe.SyntaxKind.GetAccessor:case Qe.SyntaxKind.SetAccessor:case Qe.SyntaxKind.ArrowFunction:case Qe.SyntaxKind.FunctionExpression:case Qe.SyntaxKind.FunctionDeclaration:case Qe.SyntaxKind.MethodDeclaration:return!0;default:return!1}return!0}me.canContainDirective=tU;function rU(e,t){return[e.getStart(t),e.getEnd()]}me.getRange=rU;function nU(e){return e.kind>=ye.FirstToken&&e.kind<=ye.LastToken}function Q6(e){return e.kind>=ye.JsxElement&&e.kind<=ye.JsxAttribute}me.isJSXToken=Q6;function iU(e){return e.flags&Qe.NodeFlags.Let?"let":(e.flags&Qe.NodeFlags.AwaitUsing)===Qe.NodeFlags.AwaitUsing?"await using":e.flags&Qe.NodeFlags.Const?"const":e.flags&Qe.NodeFlags.Using?"using":"var"}me.getDeclarationKind=iU;function aU(e){let t=(0,uu.getModifiers)(e);if(t!=null)for(let r of t)switch(r.kind){case ye.PublicKeyword:return"public";case ye.ProtectedKeyword:return"protected";case ye.PrivateKeyword:return"private";default:break}}me.getTSNodeAccessibility=aU;function oU(e,t,r){return a(t);function a(_){return Qe.isToken(_)&&_.pos===e.end?_:iw(_.getChildren(r),p=>(p.pos<=e.pos&&p.end>e.end||p.pos===e.end)&&nw(p,r)?a(p):void 0)}}me.findNextToken=oU;function K7(e,t){for(;e;){if(t(e))return e;e=e.parent}}me.findFirstMatchingAncestor=K7;function Z7(e){return!!K7(e,Q6)}me.hasJSXAncestor=Z7;function sU(e){return e.replace(/&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g,t=>{let r=t.slice(1,-1);if(r[0]==="#"){let a=r[1]==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10);return a>1114111?t:String.fromCodePoint(a)}return WB.xhtmlEntities[r]||t})}me.unescapeStringLiteralText=sU;function _U(e){return e.kind===ye.ComputedPropertyName}me.isComputedProperty=_U;function cU(e){return e.questionToken?e.questionToken.kind===ye.QuestionToken:!1}me.isOptional=cU;function ew(e){return e.type===ir.AST_NODE_TYPES.ChainExpression}me.isChainExpression=ew;function lU(e,t){return ew(t)&&e.expression.kind!==Qe.SyntaxKind.ParenthesizedExpression}me.isChildUnwrappableOptionalChain=lU;function tw(e){let t;if(V7&&e.kind===ye.Identifier?t=Qe.identifierToKeywordKind(e):"originalKeywordKind"in e&&(t=e.originalKeywordKind),t)return t===ye.NullKeyword?ir.AST_TOKEN_TYPES.Null:t>=ye.FirstFutureReservedWord&&t<=ye.LastKeyword?ir.AST_TOKEN_TYPES.Identifier:ir.AST_TOKEN_TYPES.Keyword;if(e.kind>=ye.FirstKeyword&&e.kind<=ye.LastFutureReservedWord)return e.kind===ye.FalseKeyword||e.kind===ye.TrueKeyword?ir.AST_TOKEN_TYPES.Boolean:ir.AST_TOKEN_TYPES.Keyword;if(e.kind>=ye.FirstPunctuation&&e.kind<=ye.LastPunctuation)return ir.AST_TOKEN_TYPES.Punctuator;if(e.kind>=ye.NoSubstitutionTemplateLiteral&&e.kind<=ye.TemplateTail)return ir.AST_TOKEN_TYPES.Template;switch(e.kind){case ye.NumericLiteral:return ir.AST_TOKEN_TYPES.Numeric;case ye.JsxText:return ir.AST_TOKEN_TYPES.JSXText;case ye.StringLiteral:return e.parent.kind===ye.JsxAttribute||e.parent.kind===ye.JsxElement?ir.AST_TOKEN_TYPES.JSXText:ir.AST_TOKEN_TYPES.String;case ye.RegularExpressionLiteral:return ir.AST_TOKEN_TYPES.RegularExpression;case ye.Identifier:case ye.ConstructorKeyword:case ye.GetKeyword:case ye.SetKeyword:default:}return e.kind===ye.Identifier&&(Q6(e.parent)||e.parent.kind===ye.PropertyAccessExpression&&Z7(e))?ir.AST_TOKEN_TYPES.JSXIdentifier:ir.AST_TOKEN_TYPES.Identifier}me.getTokenType=tw;function rw(e,t){let r=e.kind===ye.JsxText?e.getFullStart():e.getStart(t),a=e.getEnd(),_=t.text.slice(r,a),p=tw(e),d=[r,a],h=Y7(d,t);return p===ir.AST_TOKEN_TYPES.RegularExpression?{type:p,value:_,range:d,loc:h,regex:{pattern:_.slice(1,_.lastIndexOf("/")),flags:_.slice(_.lastIndexOf("/")+1)}}:{type:p,value:_,range:d,loc:h}}me.convertToken=rw;function uU(e){let t=[];function r(a){if(!($7(a)||ZB(a)))if(nU(a)&&a.kind!==ye.EndOfFileToken){let _=rw(a,e);_&&t.push(_)}else a.getChildren(e).forEach(r)}return r(e),t}me.convertTokens=uU;var qm=class extends Error{constructor(t,r,a){super(t),this.fileName=r,this.location=a,Object.defineProperty(this,"name",{value:new.target.name,enumerable:!1,configurable:!0})}get index(){return this.location.start.offset}get lineNumber(){return this.location.start.line}get column(){return this.location.start.column}};me.TSError=qm;function pU(e,t,r,a=r){let[_,p]=[r,a].map(d=>{let{line:h,character:l}=t.getLineAndCharacterOfPosition(d);return{line:h+1,column:l,offset:d}});return new qm(e,t.fileName,{start:_,end:p})}me.createError=pU;function fU(e){var t;return!!("illegalDecorators"in e&&((t=e.illegalDecorators)!=null&&t.length))}me.nodeHasIllegalDecorators=fU;function nw(e,t){return e.kind===ye.EndOfFileToken?!!e.jsDoc:e.getWidth(t)!==0}me.nodeHasTokens=nw;function iw(e,t){if(e!==void 0)for(let r=0;r=0&&e.kind!==ye.EndOfFileToken}function hU(e){return!mU(e)}me.nodeIsPresent=hU;function yU(e){return Qe.findAncestor(e.parent,Qe.isFunctionLike)}me.getContainingFunction=yU;function gU(e){return X7(ye.AbstractKeyword,e)}function bU(e){if(e.parameters.length&&!Qe.isJSDocSignature(e)){let t=e.parameters[0];if(vU(t))return t}return null}function vU(e){return Y6(e.name)}function TU(e){switch(e.kind){case ye.ClassDeclaration:return!0;case ye.ClassExpression:return!0;case ye.PropertyDeclaration:{let{parent:t}=e;return!!(Qe.isClassDeclaration(t)||Qe.isClassLike(t)&&!gU(e))}case ye.GetAccessor:case ye.SetAccessor:case ye.MethodDeclaration:{let{parent:t}=e;return!!e.body&&(Qe.isClassDeclaration(t)||Qe.isClassLike(t))}case ye.Parameter:{let{parent:t}=e,r=t.parent;return!!t&&"body"in t&&!!t.body&&(t.kind===ye.Constructor||t.kind===ye.MethodDeclaration||t.kind===ye.SetAccessor)&&bU(t)!==e&&!!r&&r.kind===ye.ClassDeclaration}}return!1}me.nodeCanBeDecorated=TU;function SU(e){let t=(0,uu.getModifiers)(e),r=e;for(;(!t||t.length===0)&&Qe.isModuleDeclaration(r.parent)&&r.parent.name;){let a=(0,uu.getModifiers)(r.parent);a&&(a==null?void 0:a.length)>0&&(t=a),r=r.parent}return t}me.getNamespaceModifiers=SU});var Z6=ut(yn=>{"use strict";var xU=yn&&yn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),wU=yn&&yn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),CU=yn&&yn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&xU(t,e,r);return wU(t,e),t},Ne=yn&&yn.__classPrivateFieldGet||function(e,t,r,a){if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?a:r==="a"?a.call(e):a?a.value:t.get(e)},Pe,ow,br,oi,st;Object.defineProperty(yn,"__esModule",{value:!0});yn.Converter=yn.convertError=void 0;var _t=CU(Dt()),Zi=H6(),pe=zm(),J=Bm(),E=_t.SyntaxKind;function EU(e){return(0,pe.createError)("message"in e&&e.message||e.messageText,e.file,e.start)}yn.convertError=EU;var K6=class{constructor(t,r){Pe.add(this),this.esTreeNodeToTSNodeMap=new WeakMap,this.tsNodeToESTreeNodeMap=new WeakMap,this.allowPattern=!1,this.ast=t,this.options={...r}}getASTMaps(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}convertProgram(){return this.converter(this.ast)}converter(t,r,a){if(!t)return null;Ne(this,Pe,"m",ow).call(this,t);let _=this.allowPattern;a!==void 0&&(this.allowPattern=a);let p=this.convertNode(t,r??t.parent);return this.registerTSNodeInNodeMap(t,p),this.allowPattern=_,p}fixExports(t,r){let _=_t.isModuleDeclaration(t)&&!!(t.flags&_t.NodeFlags.Namespace)?(0,pe.getNamespaceModifiers)(t):(0,Zi.getModifiers)(t);if((_==null?void 0:_[0].kind)===E.ExportKeyword){this.registerTSNodeInNodeMap(t,r);let p=_[0],d=_[1],h=(d==null?void 0:d.kind)===E.DefaultKeyword,l=h?(0,pe.findNextToken)(d,this.ast,this.ast):(0,pe.findNextToken)(p,this.ast,this.ast);if(r.range[0]=l.getStart(this.ast),r.loc=(0,pe.getLocFor)(r.range,this.ast),h)return this.createNode(t,{type:J.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:r,range:[p.getStart(this.ast),r.range[1]],exportKind:"value"});let v=r.type===J.AST_NODE_TYPES.TSInterfaceDeclaration||r.type===J.AST_NODE_TYPES.TSTypeAliasDeclaration,y="declare"in r&&r.declare;return this.createNode(t,{type:J.AST_NODE_TYPES.ExportNamedDeclaration,declaration:r,specifiers:[],source:null,exportKind:v||y?"type":"value",range:[p.getStart(this.ast),r.range[1]],assertions:[]})}return r}registerTSNodeInNodeMap(t,r){r&&this.options.shouldPreserveNodeMaps&&(this.tsNodeToESTreeNodeMap.has(t)||this.tsNodeToESTreeNodeMap.set(t,r))}convertPattern(t,r){return this.converter(t,r,!0)}convertChild(t,r){return this.converter(t,r,!1)}createNode(t,r){let a=r;return a.range??(a.range=(0,pe.getRange)(t,this.ast)),a.loc??(a.loc=(0,pe.getLocFor)(a.range,this.ast)),a&&this.options.shouldPreserveNodeMaps&&this.esTreeNodeToTSNodeMap.set(a,t),a}convertBindingNameWithTypeAnnotation(t,r,a){let _=this.convertPattern(t);return r&&(_.typeAnnotation=this.convertTypeAnnotation(r,a),this.fixParentLocation(_,_.typeAnnotation.range)),_}convertTypeAnnotation(t,r){let a=(r==null?void 0:r.kind)===E.FunctionType||(r==null?void 0:r.kind)===E.ConstructorType?2:1,p=[t.getFullStart()-a,t.end],d=(0,pe.getLocFor)(p,this.ast);return{type:J.AST_NODE_TYPES.TSTypeAnnotation,loc:d,range:p,typeAnnotation:this.convertChild(t)}}convertBodyExpressions(t,r){let a=(0,pe.canContainDirective)(r);return t.map(_=>{let p=this.convertChild(_);if(a){if(p!=null&&p.expression&&_t.isExpressionStatement(_)&&_t.isStringLiteral(_.expression)){let d=p.expression.raw;return p.directive=d.slice(1,-1),p}a=!1}return p}).filter(_=>_)}convertTypeArgumentsToTypeParameterInstantiation(t,r){let a=(0,pe.findNextToken)(t,this.ast,this.ast);return this.createNode(r,{type:J.AST_NODE_TYPES.TSTypeParameterInstantiation,range:[t.pos-1,a.end],params:t.map(_=>this.convertChild(_))})}convertTSTypeParametersToTypeParametersDeclaration(t){let r=(0,pe.findNextToken)(t,this.ast,this.ast),a=[t.pos-1,r.end];return{type:J.AST_NODE_TYPES.TSTypeParameterDeclaration,range:a,loc:(0,pe.getLocFor)(a,this.ast),params:t.map(_=>this.convertChild(_))}}convertParameters(t){return t!=null&&t.length?t.map(r=>{var _;let a=this.convertChild(r);return a.decorators=((_=(0,Zi.getDecorators)(r))==null?void 0:_.map(p=>this.convertChild(p)))??[],a}):[]}convertChainExpression(t,r){let{child:a,isOptional:_}=(()=>t.type===J.AST_NODE_TYPES.MemberExpression?{child:t.object,isOptional:t.optional}:t.type===J.AST_NODE_TYPES.CallExpression?{child:t.callee,isOptional:t.optional}:{child:t.expression,isOptional:!1})(),p=(0,pe.isChildUnwrappableOptionalChain)(r,a);if(!p&&!_)return t;if(p&&(0,pe.isChainExpression)(a)){let d=a.expression;t.type===J.AST_NODE_TYPES.MemberExpression?t.object=d:t.type===J.AST_NODE_TYPES.CallExpression?t.callee=d:t.expression=d}return this.createNode(r,{type:J.AST_NODE_TYPES.ChainExpression,expression:t})}deeplyCopy(t){t.kind===_t.SyntaxKind.JSDocFunctionType&&Ne(this,Pe,"m",st).call(this,t,"JSDoc types can only be used inside documentation comments.");let r=`TS${E[t.kind]}`;if(this.options.errorOnUnknownASTType&&!J.AST_NODE_TYPES[r])throw new Error(`Unknown AST_NODE_TYPE: "${r}"`);let a=this.createNode(t,{type:r});"type"in t&&(a.typeAnnotation=t.type&&"kind"in t.type&&_t.isTypeNode(t.type)?this.convertTypeAnnotation(t.type,t):null),"typeArguments"in t&&(a.typeArguments=t.typeArguments&&"pos"in t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null,Ne(this,Pe,"m",oi).call(this,a,"typeParameters","typeArguments")),"typeParameters"in t&&(a.typeParameters=t.typeParameters&&"pos"in t.typeParameters?this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters):null);let _=(0,Zi.getDecorators)(t);_!=null&&_.length&&(a.decorators=_.map(d=>this.convertChild(d)));let p=new Set(["_children","decorators","end","flags","illegalDecorators","heritageClauses","locals","localSymbol","jsDoc","kind","modifierFlagsCache","modifiers","nextContainer","parent","pos","symbol","transformFlags","type","typeArguments","typeParameters"]);return Object.entries(t).filter(([d])=>!p.has(d)).forEach(([d,h])=>{Array.isArray(h)?a[d]=h.map(l=>this.convertChild(l)):h&&typeof h=="object"&&h.kind?a[d]=this.convertChild(h):a[d]=h}),a}convertJSXIdentifier(t){let r=this.createNode(t,{type:J.AST_NODE_TYPES.JSXIdentifier,name:t.getText()});return this.registerTSNodeInNodeMap(t,r),r}convertJSXNamespaceOrIdentifier(t){if(t.kind===_t.SyntaxKind.JsxNamespacedName){let _=this.createNode(t,{type:J.AST_NODE_TYPES.JSXNamespacedName,namespace:this.createNode(t.namespace,{type:J.AST_NODE_TYPES.JSXIdentifier,name:t.namespace.text}),name:this.createNode(t.name,{type:J.AST_NODE_TYPES.JSXIdentifier,name:t.name.text})});return this.registerTSNodeInNodeMap(t,_),_}let r=t.getText(),a=r.indexOf(":");if(a>0){let _=(0,pe.getRange)(t,this.ast),p=this.createNode(t,{type:J.AST_NODE_TYPES.JSXNamespacedName,namespace:this.createNode(t,{type:J.AST_NODE_TYPES.JSXIdentifier,name:r.slice(0,a),range:[_[0],_[0]+a]}),name:this.createNode(t,{type:J.AST_NODE_TYPES.JSXIdentifier,name:r.slice(a+1),range:[_[0]+a+1,_[1]]}),range:_});return this.registerTSNodeInNodeMap(t,p),p}return this.convertJSXIdentifier(t)}convertJSXTagName(t,r){let a;switch(t.kind){case E.PropertyAccessExpression:t.name.kind===E.PrivateIdentifier&&Ne(this,Pe,"m",st).call(this,t.name,"Non-private identifier expected."),a=this.createNode(t,{type:J.AST_NODE_TYPES.JSXMemberExpression,object:this.convertJSXTagName(t.expression,r),property:this.convertJSXIdentifier(t.name)});break;case E.ThisKeyword:case E.Identifier:default:return this.convertJSXNamespaceOrIdentifier(t)}return this.registerTSNodeInNodeMap(t,a),a}convertMethodSignature(t){return this.createNode(t,{type:J.AST_NODE_TYPES.TSMethodSignature,accessibility:(0,pe.getTSNodeAccessibility)(t),computed:(0,pe.isComputedProperty)(t.name),key:this.convertChild(t.name),kind:(()=>{switch(t.kind){case E.GetAccessor:return"get";case E.SetAccessor:return"set";case E.MethodSignature:return"method"}})(),optional:(0,pe.isOptional)(t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}convertAssertClasue(t){return t===void 0?[]:t.elements.map(r=>this.convertChild(r))}fixParentLocation(t,r){r[0]t.range[1]&&(t.range[1]=r[1],t.loc.end=(0,pe.getLineAndCharacterFor)(t.range[1],this.ast))}assertModuleSpecifier(t,r){var a;!r&&t.moduleSpecifier==null&&Ne(this,Pe,"m",br).call(this,t,"Module specifier must be a string literal."),t.moduleSpecifier&&((a=t.moduleSpecifier)==null?void 0:a.kind)!==E.StringLiteral&&Ne(this,Pe,"m",br).call(this,t.moduleSpecifier,"Module specifier must be a string literal.")}convertNode(t,r){var a,_,p,d,h;switch(t.kind){case E.SourceFile:return this.createNode(t,{type:J.AST_NODE_TYPES.Program,body:this.convertBodyExpressions(t.statements,t),comments:void 0,range:[t.getStart(this.ast),t.endOfFileToken.end],sourceType:t.externalModuleIndicator?"module":"script",tokens:void 0});case E.Block:return this.createNode(t,{type:J.AST_NODE_TYPES.BlockStatement,body:this.convertBodyExpressions(t.statements,t)});case E.Identifier:return(0,pe.isThisInTypeQuery)(t)?this.createNode(t,{type:J.AST_NODE_TYPES.ThisExpression}):this.createNode(t,{type:J.AST_NODE_TYPES.Identifier,decorators:[],name:t.text,optional:!1,typeAnnotation:void 0});case E.PrivateIdentifier:return this.createNode(t,{type:J.AST_NODE_TYPES.PrivateIdentifier,name:t.text.slice(1)});case E.WithStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.WithStatement,object:this.convertChild(t.expression),body:this.convertChild(t.statement)});case E.ReturnStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ReturnStatement,argument:this.convertChild(t.expression)});case E.LabeledStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.LabeledStatement,label:this.convertChild(t.label),body:this.convertChild(t.statement)});case E.ContinueStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ContinueStatement,label:this.convertChild(t.label)});case E.BreakStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.BreakStatement,label:this.convertChild(t.label)});case E.IfStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.IfStatement,test:this.convertChild(t.expression),consequent:this.convertChild(t.thenStatement),alternate:this.convertChild(t.elseStatement)});case E.SwitchStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.SwitchStatement,discriminant:this.convertChild(t.expression),cases:t.caseBlock.clauses.map(l=>this.convertChild(l))});case E.CaseClause:case E.DefaultClause:return this.createNode(t,{type:J.AST_NODE_TYPES.SwitchCase,test:t.kind===E.CaseClause?this.convertChild(t.expression):null,consequent:t.statements.map(l=>this.convertChild(l))});case E.ThrowStatement:return t.expression.end===t.expression.pos&&Ne(this,Pe,"m",br).call(this,t,"A throw statement must throw an expression."),this.createNode(t,{type:J.AST_NODE_TYPES.ThrowStatement,argument:this.convertChild(t.expression)});case E.TryStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.TryStatement,block:this.convertChild(t.tryBlock),handler:this.convertChild(t.catchClause),finalizer:this.convertChild(t.finallyBlock)});case E.CatchClause:return this.createNode(t,{type:J.AST_NODE_TYPES.CatchClause,param:t.variableDeclaration?this.convertBindingNameWithTypeAnnotation(t.variableDeclaration.name,t.variableDeclaration.type):null,body:this.convertChild(t.block)});case E.WhileStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.WhileStatement,test:this.convertChild(t.expression),body:this.convertChild(t.statement)});case E.DoStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.DoWhileStatement,test:this.convertChild(t.expression),body:this.convertChild(t.statement)});case E.ForStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ForStatement,init:this.convertChild(t.initializer),test:this.convertChild(t.condition),update:this.convertChild(t.incrementor),body:this.convertChild(t.statement)});case E.ForInStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ForInStatement,left:this.convertPattern(t.initializer),right:this.convertChild(t.expression),body:this.convertChild(t.statement)});case E.ForOfStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ForOfStatement,left:this.convertPattern(t.initializer),right:this.convertChild(t.expression),body:this.convertChild(t.statement),await:!!(t.awaitModifier&&t.awaitModifier.kind===E.AwaitKeyword)});case E.FunctionDeclaration:{let l=(0,pe.hasModifier)(E.DeclareKeyword,t),v=this.createNode(t,{type:l||!t.body?J.AST_NODE_TYPES.TSDeclareFunction:J.AST_NODE_TYPES.FunctionDeclaration,async:(0,pe.hasModifier)(E.AsyncKeyword,t),body:this.convertChild(t.body)||void 0,declare:l,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,v)}case E.VariableDeclaration:return this.createNode(t,{type:J.AST_NODE_TYPES.VariableDeclarator,definite:!!t.exclamationToken,id:this.convertBindingNameWithTypeAnnotation(t.name,t.type,t),init:this.convertChild(t.initializer)});case E.VariableStatement:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.VariableDeclaration,declarations:t.declarationList.declarations.map(v=>this.convertChild(v)),declare:(0,pe.hasModifier)(E.DeclareKeyword,t),kind:(0,pe.getDeclarationKind)(t.declarationList)});return l.declarations.length||Ne(this,Pe,"m",br).call(this,t,"A variable declaration list must have at least one variable declarator."),(l.kind==="using"||l.kind==="await using")&&t.declarationList.declarations.forEach((v,y)=>{l.declarations[y].init==null&&Ne(this,Pe,"m",st).call(this,v,`'${l.kind}' declarations must be initialized.`),l.declarations[y].id.type!==J.AST_NODE_TYPES.Identifier&&Ne(this,Pe,"m",st).call(this,v.name,`'${l.kind}' declarations may not have binding patterns.`)}),this.fixExports(t,l)}case E.VariableDeclarationList:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.VariableDeclaration,declarations:t.declarations.map(v=>this.convertChild(v)),declare:!1,kind:(0,pe.getDeclarationKind)(t)});return(l.kind==="using"||l.kind==="await using")&&t.declarations.forEach((v,y)=>{l.declarations[y].init!=null&&Ne(this,Pe,"m",st).call(this,v,`'${l.kind}' declarations may not be initialized in for statement.`),l.declarations[y].id.type!==J.AST_NODE_TYPES.Identifier&&Ne(this,Pe,"m",st).call(this,v.name,`'${l.kind}' declarations may not have binding patterns.`)}),l}case E.ExpressionStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.ExpressionStatement,directive:void 0,expression:this.convertChild(t.expression)});case E.ThisKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.ThisExpression});case E.ArrayLiteralExpression:return this.allowPattern?this.createNode(t,{type:J.AST_NODE_TYPES.ArrayPattern,decorators:[],elements:t.elements.map(l=>this.convertPattern(l)),optional:!1,typeAnnotation:void 0}):this.createNode(t,{type:J.AST_NODE_TYPES.ArrayExpression,elements:t.elements.map(l=>this.convertChild(l))});case E.ObjectLiteralExpression:{if(this.allowPattern)return this.createNode(t,{type:J.AST_NODE_TYPES.ObjectPattern,decorators:[],optional:!1,properties:t.properties.map(v=>this.convertPattern(v)),typeAnnotation:void 0});let l=[];for(let v of t.properties)(v.kind===E.GetAccessor||v.kind===E.SetAccessor||v.kind===E.MethodDeclaration)&&!v.body&&Ne(this,Pe,"m",br).call(this,v.end-1,"'{' expected."),l.push(this.convertChild(v));return this.createNode(t,{type:J.AST_NODE_TYPES.ObjectExpression,properties:l})}case E.PropertyAssignment:{let{questionToken:l,exclamationToken:v}=t;return l&&Ne(this,Pe,"m",st).call(this,l,"A property assignment cannot have a question token."),v&&Ne(this,Pe,"m",st).call(this,v,"A property assignment cannot have an exclamation token."),this.createNode(t,{type:J.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:this.converter(t.initializer,t,this.allowPattern),computed:(0,pe.isComputedProperty)(t.name),method:!1,optional:!1,shorthand:!1,kind:"init"})}case E.ShorthandPropertyAssignment:{let{modifiers:l,questionToken:v,exclamationToken:y}=t;return l&&Ne(this,Pe,"m",st).call(this,l[0],"A shorthand property assignment cannot have modifiers."),v&&Ne(this,Pe,"m",st).call(this,v,"A shorthand property assignment cannot have a question token."),y&&Ne(this,Pe,"m",st).call(this,y,"A shorthand property assignment cannot have an exclamation token."),t.objectAssignmentInitializer?this.createNode(t,{type:J.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertPattern(t.name),optional:!1,right:this.convertChild(t.objectAssignmentInitializer),typeAnnotation:void 0}),computed:!1,method:!1,optional:!1,shorthand:!0,kind:"init"}):this.createNode(t,{type:J.AST_NODE_TYPES.Property,computed:!1,key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.convertChild(t.name)})}case E.ComputedPropertyName:return this.convertChild(t.expression);case E.PropertyDeclaration:{let l=(0,pe.hasModifier)(E.AbstractKeyword,t);l&&t.initializer&&Ne(this,Pe,"m",st).call(this,t.initializer,"Abstract property cannot have an initializer.");let v=(0,pe.hasModifier)(E.AccessorKeyword,t),y=(()=>v?l?J.AST_NODE_TYPES.TSAbstractAccessorProperty:J.AST_NODE_TYPES.AccessorProperty:l?J.AST_NODE_TYPES.TSAbstractPropertyDefinition:J.AST_NODE_TYPES.PropertyDefinition)(),C=this.convertChild(t.name);return this.createNode(t,{type:y,key:C,accessibility:(0,pe.getTSNodeAccessibility)(t),value:l?null:this.convertChild(t.initializer),computed:(0,pe.isComputedProperty)(t.name),static:(0,pe.hasModifier)(E.StaticKeyword,t),readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),decorators:((a=(0,Zi.getDecorators)(t))==null?void 0:a.map(S=>this.convertChild(S)))??[],declare:(0,pe.hasModifier)(E.DeclareKeyword,t),override:(0,pe.hasModifier)(E.OverrideKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t),optional:(C.type===J.AST_NODE_TYPES.Literal||t.name.kind===E.Identifier||t.name.kind===E.ComputedPropertyName||t.name.kind===E.PrivateIdentifier)&&!!t.questionToken,definite:!!t.exclamationToken})}case E.GetAccessor:case E.SetAccessor:if(t.parent.kind===E.InterfaceDeclaration||t.parent.kind===E.TypeLiteral)return this.convertMethodSignature(t);case E.MethodDeclaration:{let l=this.createNode(t,{type:t.body?J.AST_NODE_TYPES.FunctionExpression:J.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,id:null,generator:!!t.asteriskToken,expression:!1,async:(0,pe.hasModifier)(E.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,range:[t.parameters.pos-1,t.end],params:[],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});l.typeParameters&&this.fixParentLocation(l,l.typeParameters.range);let v;if(r.kind===E.ObjectLiteralExpression)l.params=t.parameters.map(y=>this.convertChild(y)),v=this.createNode(t,{type:J.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:l,computed:(0,pe.isComputedProperty)(t.name),optional:!!t.questionToken,method:t.kind===E.MethodDeclaration,shorthand:!1,kind:"init"});else{l.params=this.convertParameters(t.parameters);let y=(0,pe.hasModifier)(E.AbstractKeyword,t)?J.AST_NODE_TYPES.TSAbstractMethodDefinition:J.AST_NODE_TYPES.MethodDefinition;v=this.createNode(t,{type:y,accessibility:(0,pe.getTSNodeAccessibility)(t),computed:(0,pe.isComputedProperty)(t.name),decorators:((_=(0,Zi.getDecorators)(t))==null?void 0:_.map(C=>this.convertChild(C)))??[],key:this.convertChild(t.name),kind:"method",optional:!!t.questionToken,override:(0,pe.hasModifier)(E.OverrideKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t),value:l})}return t.kind===E.GetAccessor?v.kind="get":t.kind===E.SetAccessor?v.kind="set":!v.static&&t.name.kind===E.StringLiteral&&t.name.text==="constructor"&&v.type!==J.AST_NODE_TYPES.Property&&(v.kind="constructor"),v}case E.Constructor:{let l=(0,pe.getLastModifier)(t),v=(l&&(0,pe.findNextToken)(l,t,this.ast))??t.getFirstToken(),y=this.createNode(t,{type:t.body?J.AST_NODE_TYPES.FunctionExpression:J.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,async:!1,body:this.convertChild(t.body),declare:!1,expression:!1,generator:!1,id:null,params:this.convertParameters(t.parameters),range:[t.parameters.pos-1,t.end],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});y.typeParameters&&this.fixParentLocation(y,y.typeParameters.range);let C=this.createNode(t,{type:J.AST_NODE_TYPES.Identifier,decorators:[],name:"constructor",optional:!1,range:[v.getStart(this.ast),v.end],typeAnnotation:void 0}),S=(0,pe.hasModifier)(E.StaticKeyword,t);return this.createNode(t,{type:(0,pe.hasModifier)(E.AbstractKeyword,t)?J.AST_NODE_TYPES.TSAbstractMethodDefinition:J.AST_NODE_TYPES.MethodDefinition,accessibility:(0,pe.getTSNodeAccessibility)(t),computed:!1,decorators:[],optional:!1,key:C,kind:S?"method":"constructor",override:!1,static:S,value:y})}case E.FunctionExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.FunctionExpression,async:(0,pe.hasModifier)(E.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case E.SuperKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.Super});case E.ArrayBindingPattern:return this.createNode(t,{type:J.AST_NODE_TYPES.ArrayPattern,decorators:[],elements:t.elements.map(l=>this.convertPattern(l)),optional:!1,typeAnnotation:void 0});case E.OmittedExpression:return null;case E.ObjectBindingPattern:return this.createNode(t,{type:J.AST_NODE_TYPES.ObjectPattern,decorators:[],optional:!1,properties:t.elements.map(l=>this.convertPattern(l)),typeAnnotation:void 0});case E.BindingElement:{if(r.kind===E.ArrayBindingPattern){let v=this.convertChild(t.name,r);return t.initializer?this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:v,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}):t.dotDotDotToken?this.createNode(t,{type:J.AST_NODE_TYPES.RestElement,argument:v,decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):v}let l;return t.dotDotDotToken?l=this.createNode(t,{type:J.AST_NODE_TYPES.RestElement,argument:this.convertChild(t.propertyName??t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):l=this.createNode(t,{type:J.AST_NODE_TYPES.Property,key:this.convertChild(t.propertyName??t.name),value:this.convertChild(t.name),computed:!!(t.propertyName&&t.propertyName.kind===E.ComputedPropertyName),method:!1,optional:!1,shorthand:!t.propertyName,kind:"init"}),t.initializer&&(l.value=this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertChild(t.name),optional:!1,range:[t.name.getStart(this.ast),t.initializer.end],right:this.convertChild(t.initializer),typeAnnotation:void 0})),l}case E.ArrowFunction:return this.createNode(t,{type:J.AST_NODE_TYPES.ArrowFunctionExpression,generator:!1,id:null,params:this.convertParameters(t.parameters),body:this.convertChild(t.body),async:(0,pe.hasModifier)(E.AsyncKeyword,t),expression:t.body.kind!==E.Block,returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case E.YieldExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.YieldExpression,delegate:!!t.asteriskToken,argument:this.convertChild(t.expression)});case E.AwaitExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.AwaitExpression,argument:this.convertChild(t.expression)});case E.NoSubstitutionTemplateLiteral:return this.createNode(t,{type:J.AST_NODE_TYPES.TemplateLiteral,quasis:[this.createNode(t,{type:J.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-1),cooked:t.text},tail:!0})],expressions:[]});case E.TemplateExpression:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TemplateLiteral,quasis:[this.convertChild(t.head)],expressions:[]});return t.templateSpans.forEach(v=>{l.expressions.push(this.convertChild(v.expression)),l.quasis.push(this.convertChild(v.literal))}),l}case E.TaggedTemplateExpression:return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.TaggedTemplateExpression,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),tag:this.convertChild(t.tag),quasi:this.convertChild(t.template)},"typeParameters","typeArguments"));case E.TemplateHead:case E.TemplateMiddle:case E.TemplateTail:{let l=t.kind===E.TemplateTail;return this.createNode(t,{type:J.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-(l?1:2)),cooked:t.text},tail:l})}case E.SpreadAssignment:case E.SpreadElement:return this.allowPattern?this.createNode(t,{type:J.AST_NODE_TYPES.RestElement,argument:this.convertPattern(t.expression),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):this.createNode(t,{type:J.AST_NODE_TYPES.SpreadElement,argument:this.convertChild(t.expression)});case E.Parameter:{let l,v;return t.dotDotDotToken?l=v=this.createNode(t,{type:J.AST_NODE_TYPES.RestElement,argument:this.convertChild(t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):t.initializer?(l=this.convertChild(t.name),v=this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:l,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}),(0,Zi.getModifiers)(t)&&(v.range[0]=l.range[0],v.loc=(0,pe.getLocFor)(v.range,this.ast))):l=v=this.convertChild(t.name,r),t.type&&(l.typeAnnotation=this.convertTypeAnnotation(t.type,t),this.fixParentLocation(l,l.typeAnnotation.range)),t.questionToken&&(t.questionToken.end>l.range[1]&&(l.range[1]=t.questionToken.end,l.loc.end=(0,pe.getLineAndCharacterFor)(l.range[1],this.ast)),l.optional=!0),(0,Zi.getModifiers)(t)?this.createNode(t,{type:J.AST_NODE_TYPES.TSParameterProperty,accessibility:(0,pe.getTSNodeAccessibility)(t),decorators:[],override:(0,pe.hasModifier)(E.OverrideKeyword,t),parameter:v,readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t)}):v}case E.ClassDeclaration:!t.name&&(!(0,pe.hasModifier)(_t.SyntaxKind.ExportKeyword,t)||!(0,pe.hasModifier)(_t.SyntaxKind.DefaultKeyword,t))&&Ne(this,Pe,"m",br).call(this,t,"A class declaration without the 'default' modifier must have a name.");case E.ClassExpression:{let l=t.heritageClauses??[],v=t.kind===E.ClassDeclaration?J.AST_NODE_TYPES.ClassDeclaration:J.AST_NODE_TYPES.ClassExpression,y,C;for(let k of l){let{token:L,types:G}=k;G.length===0&&Ne(this,Pe,"m",br).call(this,k,`'${_t.tokenToString(L)}' list cannot be empty.`),L===E.ExtendsKeyword?(y&&Ne(this,Pe,"m",br).call(this,k,"'extends' clause already seen."),C&&Ne(this,Pe,"m",br).call(this,k,"'extends' clause must precede 'implements' clause."),G.length>1&&Ne(this,Pe,"m",br).call(this,G[1],"Classes can only extend a single class."),y??(y=k)):L===E.ImplementsKeyword&&(C&&Ne(this,Pe,"m",br).call(this,k,"'implements' clause already seen."),C??(C=k))}let S=this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:v,abstract:(0,pe.hasModifier)(E.AbstractKeyword,t),body:this.createNode(t,{type:J.AST_NODE_TYPES.ClassBody,body:t.members.filter(pe.isESTreeClassMember).map(k=>this.convertChild(k)),range:[t.members.pos-1,t.end]}),declare:(0,pe.hasModifier)(E.DeclareKeyword,t),decorators:((p=(0,Zi.getDecorators)(t))==null?void 0:p.map(k=>this.convertChild(k)))??[],id:this.convertChild(t.name),implements:(C==null?void 0:C.types.map(k=>this.convertChild(k)))??[],superClass:y!=null&&y.types[0]?this.convertChild(y.types[0].expression):null,superTypeArguments:void 0,typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)},"superTypeParameters","superTypeArguments"));return(d=y==null?void 0:y.types[0])!=null&&d.typeArguments&&(S.superTypeArguments=this.convertTypeArgumentsToTypeParameterInstantiation(y.types[0].typeArguments,y.types[0])),this.fixExports(t,S)}case E.ModuleBlock:return this.createNode(t,{type:J.AST_NODE_TYPES.TSModuleBlock,body:this.convertBodyExpressions(t.statements,t)});case E.ImportDeclaration:{this.assertModuleSpecifier(t,!1);let l=this.createNode(t,{type:J.AST_NODE_TYPES.ImportDeclaration,source:this.convertChild(t.moduleSpecifier),specifiers:[],importKind:"value",assertions:this.convertAssertClasue(t.assertClause)});if(t.importClause&&(t.importClause.isTypeOnly&&(l.importKind="type"),t.importClause.name&&l.specifiers.push(this.convertChild(t.importClause)),t.importClause.namedBindings))switch(t.importClause.namedBindings.kind){case E.NamespaceImport:l.specifiers.push(this.convertChild(t.importClause.namedBindings));break;case E.NamedImports:l.specifiers=l.specifiers.concat(t.importClause.namedBindings.elements.map(v=>this.convertChild(v)));break}return l}case E.NamespaceImport:return this.createNode(t,{type:J.AST_NODE_TYPES.ImportNamespaceSpecifier,local:this.convertChild(t.name)});case E.ImportSpecifier:return this.createNode(t,{type:J.AST_NODE_TYPES.ImportSpecifier,local:this.convertChild(t.name),imported:this.convertChild(t.propertyName??t.name),importKind:t.isTypeOnly?"type":"value"});case E.ImportClause:{let l=this.convertChild(t.name);return this.createNode(t,{type:J.AST_NODE_TYPES.ImportDefaultSpecifier,local:l,range:l.range})}case E.ExportDeclaration:return((h=t.exportClause)==null?void 0:h.kind)===E.NamedExports?(this.assertModuleSpecifier(t,!0),this.createNode(t,{type:J.AST_NODE_TYPES.ExportNamedDeclaration,source:this.convertChild(t.moduleSpecifier),specifiers:t.exportClause.elements.map(l=>this.convertChild(l)),exportKind:t.isTypeOnly?"type":"value",declaration:null,assertions:this.convertAssertClasue(t.assertClause)})):(this.assertModuleSpecifier(t,!1),this.createNode(t,{type:J.AST_NODE_TYPES.ExportAllDeclaration,source:this.convertChild(t.moduleSpecifier),exportKind:t.isTypeOnly?"type":"value",exported:t.exportClause&&t.exportClause.kind===E.NamespaceExport?this.convertChild(t.exportClause.name):null,assertions:this.convertAssertClasue(t.assertClause)}));case E.ExportSpecifier:return this.createNode(t,{type:J.AST_NODE_TYPES.ExportSpecifier,local:this.convertChild(t.propertyName??t.name),exported:this.convertChild(t.name),exportKind:t.isTypeOnly?"type":"value"});case E.ExportAssignment:return t.isExportEquals?this.createNode(t,{type:J.AST_NODE_TYPES.TSExportAssignment,expression:this.convertChild(t.expression)}):this.createNode(t,{type:J.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:this.convertChild(t.expression),exportKind:"value"});case E.PrefixUnaryExpression:case E.PostfixUnaryExpression:{let l=(0,pe.getTextForTokenKind)(t.operator);return l==="++"||l==="--"?this.createNode(t,{type:J.AST_NODE_TYPES.UpdateExpression,operator:l,prefix:t.kind===E.PrefixUnaryExpression,argument:this.convertChild(t.operand)}):this.createNode(t,{type:J.AST_NODE_TYPES.UnaryExpression,operator:l,prefix:t.kind===E.PrefixUnaryExpression,argument:this.convertChild(t.operand)})}case E.DeleteExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.UnaryExpression,operator:"delete",prefix:!0,argument:this.convertChild(t.expression)});case E.VoidExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.UnaryExpression,operator:"void",prefix:!0,argument:this.convertChild(t.expression)});case E.TypeOfExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.UnaryExpression,operator:"typeof",prefix:!0,argument:this.convertChild(t.expression)});case E.TypeOperator:return this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeOperator,operator:(0,pe.getTextForTokenKind)(t.operator),typeAnnotation:this.convertChild(t.type)});case E.BinaryExpression:{if((0,pe.isComma)(t.operatorToken)){let v=this.createNode(t,{type:J.AST_NODE_TYPES.SequenceExpression,expressions:[]}),y=this.convertChild(t.left);return y.type===J.AST_NODE_TYPES.SequenceExpression&&t.left.kind!==E.ParenthesizedExpression?v.expressions=v.expressions.concat(y.expressions):v.expressions.push(y),v.expressions.push(this.convertChild(t.right)),v}let l=(0,pe.getBinaryExpressionType)(t.operatorToken);return this.allowPattern&&l.type===J.AST_NODE_TYPES.AssignmentExpression?this.createNode(t,{type:J.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertPattern(t.left,t),optional:!1,right:this.convertChild(t.right),typeAnnotation:void 0}):this.createNode(t,{...l,left:this.converter(t.left,t,l.type===J.AST_NODE_TYPES.AssignmentExpression),right:this.convertChild(t.right)})}case E.PropertyAccessExpression:{let l=this.convertChild(t.expression),v=this.convertChild(t.name),y=!1,C=this.createNode(t,{type:J.AST_NODE_TYPES.MemberExpression,object:l,property:v,computed:y,optional:t.questionDotToken!==void 0});return this.convertChainExpression(C,t)}case E.ElementAccessExpression:{let l=this.convertChild(t.expression),v=this.convertChild(t.argumentExpression),y=!0,C=this.createNode(t,{type:J.AST_NODE_TYPES.MemberExpression,object:l,property:v,computed:y,optional:t.questionDotToken!==void 0});return this.convertChainExpression(C,t)}case E.CallExpression:{if(t.expression.kind===E.ImportKeyword)return t.arguments.length!==1&&t.arguments.length!==2&&Ne(this,Pe,"m",br).call(this,t.arguments[2]??t,"Dynamic import requires exactly one or two arguments."),this.createNode(t,{type:J.AST_NODE_TYPES.ImportExpression,source:this.convertChild(t.arguments[0]),attributes:t.arguments[1]?this.convertChild(t.arguments[1]):null});let l=this.convertChild(t.expression),v=t.arguments.map(S=>this.convertChild(S)),y=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),C=this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.CallExpression,callee:l,arguments:v,optional:t.questionDotToken!==void 0,typeArguments:y},"typeParameters","typeArguments"));return this.convertChainExpression(C,t)}case E.NewExpression:{let l=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t);return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.NewExpression,arguments:t.arguments?t.arguments.map(v=>this.convertChild(v)):[],callee:this.convertChild(t.expression),typeArguments:l},"typeParameters","typeArguments"))}case E.ConditionalExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.ConditionalExpression,test:this.convertChild(t.condition),consequent:this.convertChild(t.whenTrue),alternate:this.convertChild(t.whenFalse)});case E.MetaProperty:return this.createNode(t,{type:J.AST_NODE_TYPES.MetaProperty,meta:this.createNode(t.getFirstToken(),{type:J.AST_NODE_TYPES.Identifier,decorators:[],name:(0,pe.getTextForTokenKind)(t.keywordToken),optional:!1,typeAnnotation:void 0}),property:this.convertChild(t.name)});case E.Decorator:return this.createNode(t,{type:J.AST_NODE_TYPES.Decorator,expression:this.convertChild(t.expression)});case E.StringLiteral:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:r.kind===E.JsxAttribute?(0,pe.unescapeStringLiteralText)(t.text):t.text,raw:t.getText()});case E.NumericLiteral:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:Number(t.text),raw:t.getText()});case E.BigIntLiteral:{let l=(0,pe.getRange)(t,this.ast),v=this.ast.text.slice(l[0],l[1]),y=v.slice(0,-1).replace(/_/g,""),C=typeof BigInt<"u"?BigInt(y):null;return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,raw:v,value:C,bigint:C==null?y:String(C),range:l})}case E.RegularExpressionLiteral:{let l=t.text.slice(1,t.text.lastIndexOf("/")),v=t.text.slice(t.text.lastIndexOf("/")+1),y=null;try{y=new RegExp(l,v)}catch{}return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:y,raw:t.text,regex:{pattern:l,flags:v}})}case E.TrueKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:!0,raw:"true"});case E.FalseKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:!1,raw:"false"});case E.NullKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.Literal,value:null,raw:"null"});case E.EmptyStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.EmptyStatement});case E.DebuggerStatement:return this.createNode(t,{type:J.AST_NODE_TYPES.DebuggerStatement});case E.JsxElement:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXElement,openingElement:this.convertChild(t.openingElement),closingElement:this.convertChild(t.closingElement),children:t.children.map(l=>this.convertChild(l))});case E.JsxFragment:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXFragment,openingFragment:this.convertChild(t.openingFragment),closingFragment:this.convertChild(t.closingFragment),children:t.children.map(l=>this.convertChild(l))});case E.JsxSelfClosingElement:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXElement,openingElement:this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.JSXOpeningElement,typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):void 0,selfClosing:!0,name:this.convertJSXTagName(t.tagName,t),attributes:t.attributes.properties.map(l=>this.convertChild(l)),range:(0,pe.getRange)(t,this.ast)},"typeParameters","typeArguments")),closingElement:null,children:[]});case E.JsxOpeningElement:return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.JSXOpeningElement,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),selfClosing:!1,name:this.convertJSXTagName(t.tagName,t),attributes:t.attributes.properties.map(l=>this.convertChild(l))},"typeParameters","typeArguments"));case E.JsxClosingElement:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXClosingElement,name:this.convertJSXTagName(t.tagName,t)});case E.JsxOpeningFragment:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXOpeningFragment});case E.JsxClosingFragment:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXClosingFragment});case E.JsxExpression:{let l=t.expression?this.convertChild(t.expression):this.createNode(t,{type:J.AST_NODE_TYPES.JSXEmptyExpression,range:[t.getStart(this.ast)+1,t.getEnd()-1]});return t.dotDotDotToken?this.createNode(t,{type:J.AST_NODE_TYPES.JSXSpreadChild,expression:l}):this.createNode(t,{type:J.AST_NODE_TYPES.JSXExpressionContainer,expression:l})}case E.JsxAttribute:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXAttribute,name:this.convertJSXNamespaceOrIdentifier(t.name),value:this.convertChild(t.initializer)});case E.JsxText:{let l=t.getFullStart(),v=t.getEnd(),y=this.ast.text.slice(l,v);return this.createNode(t,{type:J.AST_NODE_TYPES.JSXText,value:(0,pe.unescapeStringLiteralText)(y),raw:y,range:[l,v]})}case E.JsxSpreadAttribute:return this.createNode(t,{type:J.AST_NODE_TYPES.JSXSpreadAttribute,argument:this.convertChild(t.expression)});case E.QualifiedName:return this.createNode(t,{type:J.AST_NODE_TYPES.TSQualifiedName,left:this.convertChild(t.left),right:this.convertChild(t.right)});case E.TypeReference:return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.TSTypeReference,typeName:this.convertChild(t.typeName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"));case E.TypeParameter:return this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeParameter,name:this.convertChild(t.name),constraint:t.constraint&&this.convertChild(t.constraint),default:t.default?this.convertChild(t.default):void 0,in:(0,pe.hasModifier)(E.InKeyword,t),out:(0,pe.hasModifier)(E.OutKeyword,t),const:(0,pe.hasModifier)(E.ConstKeyword,t)});case E.ThisType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSThisType});case E.AnyKeyword:case E.BigIntKeyword:case E.BooleanKeyword:case E.NeverKeyword:case E.NumberKeyword:case E.ObjectKeyword:case E.StringKeyword:case E.SymbolKeyword:case E.UnknownKeyword:case E.VoidKeyword:case E.UndefinedKeyword:case E.IntrinsicKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES[`TS${E[t.kind]}`]});case E.NonNullExpression:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSNonNullExpression,expression:this.convertChild(t.expression)});return this.convertChainExpression(l,t)}case E.TypeLiteral:return this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeLiteral,members:t.members.map(l=>this.convertChild(l))});case E.ArrayType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSArrayType,elementType:this.convertChild(t.elementType)});case E.IndexedAccessType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSIndexedAccessType,objectType:this.convertChild(t.objectType),indexType:this.convertChild(t.indexType)});case E.ConditionalType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSConditionalType,checkType:this.convertChild(t.checkType),extendsType:this.convertChild(t.extendsType),trueType:this.convertChild(t.trueType),falseType:this.convertChild(t.falseType)});case E.TypeQuery:return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.TSTypeQuery,exprName:this.convertChild(t.exprName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"));case E.MappedType:return t.members&&t.members.length>0&&Ne(this,Pe,"m",br).call(this,t.members[0],"A mapped type may not declare properties or methods."),this.createNode(t,{type:J.AST_NODE_TYPES.TSMappedType,nameType:this.convertChild(t.nameType)??null,optional:t.questionToken&&(t.questionToken.kind===E.QuestionToken||(0,pe.getTextForTokenKind)(t.questionToken.kind)),readonly:t.readonlyToken&&(t.readonlyToken.kind===E.ReadonlyKeyword||(0,pe.getTextForTokenKind)(t.readonlyToken.kind)),typeAnnotation:t.type&&this.convertChild(t.type),typeParameter:this.convertChild(t.typeParameter)});case E.ParenthesizedExpression:return this.convertChild(t.expression,r);case E.TypeAliasDeclaration:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeAliasDeclaration,declare:(0,pe.hasModifier)(E.DeclareKeyword,t),id:this.convertChild(t.name),typeAnnotation:this.convertChild(t.type),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,l)}case E.MethodSignature:return this.convertMethodSignature(t);case E.PropertySignature:{let{initializer:l}=t;return l&&Ne(this,Pe,"m",st).call(this,l,"A property signature cannot have an initializer."),this.createNode(t,{type:J.AST_NODE_TYPES.TSPropertySignature,accessibility:(0,pe.getTSNodeAccessibility)(t),computed:(0,pe.isComputedProperty)(t.name),key:this.convertChild(t.name),optional:(0,pe.isOptional)(t),readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)})}case E.IndexSignature:return this.createNode(t,{type:J.AST_NODE_TYPES.TSIndexSignature,accessibility:(0,pe.getTSNodeAccessibility)(t),parameters:t.parameters.map(l=>this.convertChild(l)),readonly:(0,pe.hasModifier)(E.ReadonlyKeyword,t),static:(0,pe.hasModifier)(E.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)});case E.ConstructorType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSConstructorType,abstract:(0,pe.hasModifier)(E.AbstractKeyword,t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case E.FunctionType:{let{modifiers:l}=t;l&&Ne(this,Pe,"m",st).call(this,l[0],"A function type cannot have modifiers.")}case E.ConstructSignature:case E.CallSignature:{let l=t.kind===E.ConstructSignature?J.AST_NODE_TYPES.TSConstructSignatureDeclaration:t.kind===E.CallSignature?J.AST_NODE_TYPES.TSCallSignatureDeclaration:J.AST_NODE_TYPES.TSFunctionType;return this.createNode(t,{type:l,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}case E.ExpressionWithTypeArguments:{let l=r.kind,v=l===E.InterfaceDeclaration?J.AST_NODE_TYPES.TSInterfaceHeritage:l===E.HeritageClause?J.AST_NODE_TYPES.TSClassImplements:J.AST_NODE_TYPES.TSInstantiationExpression;return this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:v,expression:this.convertChild(t.expression),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"))}case E.InterfaceDeclaration:{let l=t.heritageClauses??[],v=[];for(let C of l){C.token!==E.ExtendsKeyword&&Ne(this,Pe,"m",st).call(this,C,C.token===E.ImplementsKeyword?"Interface declaration cannot have 'implements' clause.":"Unexpected token.");for(let S of C.types)v.push(this.convertChild(S,t))}let y=this.createNode(t,{type:J.AST_NODE_TYPES.TSInterfaceDeclaration,body:this.createNode(t,{type:J.AST_NODE_TYPES.TSInterfaceBody,body:t.members.map(C=>this.convertChild(C)),range:[t.members.pos-1,t.end]}),declare:(0,pe.hasModifier)(E.DeclareKeyword,t),extends:v,id:this.convertChild(t.name),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,y)}case E.TypePredicate:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSTypePredicate,asserts:t.assertsModifier!==void 0,parameterName:this.convertChild(t.parameterName),typeAnnotation:null});return t.type&&(l.typeAnnotation=this.convertTypeAnnotation(t.type,t),l.typeAnnotation.loc=l.typeAnnotation.typeAnnotation.loc,l.typeAnnotation.range=l.typeAnnotation.typeAnnotation.range),l}case E.ImportType:{let l=(0,pe.getRange)(t,this.ast);if(t.isTypeOf){let y=(0,pe.findNextToken)(t.getFirstToken(),t,this.ast);l[0]=y.getStart(this.ast)}let v=this.createNode(t,Ne(this,Pe,"m",oi).call(this,{type:J.AST_NODE_TYPES.TSImportType,argument:this.convertChild(t.argument),qualifier:this.convertChild(t.qualifier),typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null,range:l},"typeParameters","typeArguments"));return t.isTypeOf?this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeQuery,exprName:v,typeArguments:void 0,typeParameters:void 0}):v}case E.EnumDeclaration:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSEnumDeclaration,const:(0,pe.hasModifier)(E.ConstKeyword,t),declare:(0,pe.hasModifier)(E.DeclareKeyword,t),id:this.convertChild(t.name),members:t.members.map(v=>this.convertChild(v))});return this.fixExports(t,l)}case E.EnumMember:return this.createNode(t,{type:J.AST_NODE_TYPES.TSEnumMember,computed:t.name.kind===_t.SyntaxKind.ComputedPropertyName,id:this.convertChild(t.name),initializer:t.initializer&&this.convertChild(t.initializer)});case E.ModuleDeclaration:{let l=(0,pe.hasModifier)(E.DeclareKeyword,t),v=this.createNode(t,{type:J.AST_NODE_TYPES.TSModuleDeclaration,...(()=>{if(t.flags&_t.NodeFlags.GlobalAugmentation){let C=this.convertChild(t.name),S=this.convertChild(t.body);return(S==null||S.type===J.AST_NODE_TYPES.TSModuleDeclaration)&&Ne(this,Pe,"m",br).call(this,t.body??t,"Expected a valid module body"),C.type!==J.AST_NODE_TYPES.Identifier&&Ne(this,Pe,"m",br).call(this,t.name,"global module augmentation must have an Identifier id"),{kind:"global",body:S,declare:!1,global:!1,id:C}}if(!(t.flags&_t.NodeFlags.Namespace)){let C=this.convertChild(t.body);return{kind:"module",...C!=null?{body:C}:{},declare:!1,global:!1,id:this.convertChild(t.name)}}t.body==null&&Ne(this,Pe,"m",br).call(this,t,"Expected a module body"),t.name.kind!==_t.SyntaxKind.Identifier&&Ne(this,Pe,"m",br).call(this,t.name,"`namespace`s must have an Identifier id");let y=this.createNode(t.name,{decorators:[],name:t.name.text,optional:!1,range:[t.name.getStart(this.ast),t.name.getEnd()],type:J.AST_NODE_TYPES.Identifier,typeAnnotation:void 0});for(;t.body&&_t.isModuleDeclaration(t.body)&&t.body.name;){t=t.body,l||(l=(0,pe.hasModifier)(E.DeclareKeyword,t));let C=t.name,S=this.createNode(C,{decorators:[],name:C.text,optional:!1,range:[C.getStart(this.ast),C.getEnd()],type:J.AST_NODE_TYPES.Identifier,typeAnnotation:void 0});y=this.createNode(C,{left:y,right:S,range:[y.range[0],S.range[1]],type:J.AST_NODE_TYPES.TSQualifiedName})}return{kind:"namespace",body:this.convertChild(t.body),declare:!1,global:!1,id:y}})()});return v.declare=l,t.flags&_t.NodeFlags.GlobalAugmentation&&(v.global=!0),this.fixExports(t,v)}case E.ParenthesizedType:return this.convertChild(t.type);case E.UnionType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSUnionType,types:t.types.map(l=>this.convertChild(l))});case E.IntersectionType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSIntersectionType,types:t.types.map(l=>this.convertChild(l))});case E.AsExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.TSAsExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});case E.InferType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSInferType,typeParameter:this.convertChild(t.typeParameter)});case E.LiteralType:return t.literal.kind===E.NullKeyword?this.createNode(t.literal,{type:J.AST_NODE_TYPES.TSNullKeyword}):this.createNode(t,{type:J.AST_NODE_TYPES.TSLiteralType,literal:this.convertChild(t.literal)});case E.TypeAssertionExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.TSTypeAssertion,typeAnnotation:this.convertChild(t.type),expression:this.convertChild(t.expression)});case E.ImportEqualsDeclaration:return this.fixExports(t,this.createNode(t,{type:J.AST_NODE_TYPES.TSImportEqualsDeclaration,id:this.convertChild(t.name),importKind:t.isTypeOnly?"type":"value",moduleReference:this.convertChild(t.moduleReference)}));case E.ExternalModuleReference:return this.createNode(t,{type:J.AST_NODE_TYPES.TSExternalModuleReference,expression:this.convertChild(t.expression)});case E.NamespaceExportDeclaration:return this.createNode(t,{type:J.AST_NODE_TYPES.TSNamespaceExportDeclaration,id:this.convertChild(t.name)});case E.AbstractKeyword:return this.createNode(t,{type:J.AST_NODE_TYPES.TSAbstractKeyword});case E.TupleType:{let l="elementTypes"in t?t.elementTypes.map(v=>this.convertChild(v)):t.elements.map(v=>this.convertChild(v));return this.createNode(t,{type:J.AST_NODE_TYPES.TSTupleType,elementTypes:l})}case E.NamedTupleMember:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSNamedTupleMember,elementType:this.convertChild(t.type,t),label:this.convertChild(t.name,t),optional:t.questionToken!=null});return t.dotDotDotToken?(l.range[0]=l.label.range[0],l.loc.start=l.label.loc.start,this.createNode(t,{type:J.AST_NODE_TYPES.TSRestType,typeAnnotation:l})):l}case E.OptionalType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSOptionalType,typeAnnotation:this.convertChild(t.type)});case E.RestType:return this.createNode(t,{type:J.AST_NODE_TYPES.TSRestType,typeAnnotation:this.convertChild(t.type)});case E.TemplateLiteralType:{let l=this.createNode(t,{type:J.AST_NODE_TYPES.TSTemplateLiteralType,quasis:[this.convertChild(t.head)],types:[]});return t.templateSpans.forEach(v=>{l.types.push(this.convertChild(v.type)),l.quasis.push(this.convertChild(v.literal))}),l}case E.ClassStaticBlockDeclaration:return this.createNode(t,{type:J.AST_NODE_TYPES.StaticBlock,body:this.convertBodyExpressions(t.body.statements,t)});case E.AssertEntry:return this.createNode(t,{type:J.AST_NODE_TYPES.ImportAttribute,key:this.convertChild(t.name),value:this.convertChild(t.value)});case E.SatisfiesExpression:return this.createNode(t,{type:J.AST_NODE_TYPES.TSSatisfiesExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});default:return this.deeplyCopy(t)}}};yn.Converter=K6;Pe=new WeakSet,ow=function(t){if(!this.options.allowInvalidAST){(0,pe.nodeHasIllegalDecorators)(t)&&Ne(this,Pe,"m",st).call(this,t.illegalDecorators[0],"Decorators are not valid here.");for(let r of(0,Zi.getDecorators)(t,!0)??[])(0,pe.nodeCanBeDecorated)(t)||(_t.isMethodDeclaration(t)&&!(0,pe.nodeIsPresent)(t.body)?Ne(this,Pe,"m",st).call(this,r,"A decorator can only decorate a method implementation, not an overload."):Ne(this,Pe,"m",st).call(this,r,"Decorators are not valid here."));for(let r of(0,Zi.getModifiers)(t,!0)??[]){if(r.kind!==E.ReadonlyKeyword&&((t.kind===E.PropertySignature||t.kind===E.MethodSignature)&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on a type member`),t.kind===E.IndexSignature&&(r.kind!==E.StaticKeyword||!_t.isClassLike(t.parent))&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on an index signature`)),r.kind!==E.InKeyword&&r.kind!==E.OutKeyword&&r.kind!==E.ConstKeyword&&t.kind===E.TypeParameter&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on a type parameter`),(r.kind===E.InKeyword||r.kind===E.OutKeyword)&&(t.kind!==E.TypeParameter||!(_t.isInterfaceDeclaration(t.parent)||_t.isClassLike(t.parent)||_t.isTypeAliasDeclaration(t.parent)))&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`),r.kind===E.ReadonlyKeyword&&t.kind!==E.PropertyDeclaration&&t.kind!==E.PropertySignature&&t.kind!==E.IndexSignature&&t.kind!==E.Parameter&&Ne(this,Pe,"m",st).call(this,r,"'readonly' modifier can only appear on a property declaration or index signature."),r.kind===E.DeclareKeyword&&_t.isClassLike(t.parent)&&!_t.isPropertyDeclaration(t)&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on class elements of this kind.`),r.kind===E.DeclareKeyword&&_t.isVariableStatement(t)){let a=(0,pe.getDeclarationKind)(t.declarationList);(a==="using"||a==="await using")&&Ne(this,Pe,"m",st).call(this,r,`'declare' modifier cannot appear on a '${a}' declaration.`)}if(r.kind===E.AbstractKeyword&&t.kind!==E.ClassDeclaration&&t.kind!==E.ConstructorType&&t.kind!==E.MethodDeclaration&&t.kind!==E.PropertyDeclaration&&t.kind!==E.GetAccessor&&t.kind!==E.SetAccessor&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier can only appear on a class, method, or property declaration.`),(r.kind===E.StaticKeyword||r.kind===E.PublicKeyword||r.kind===E.ProtectedKeyword||r.kind===E.PrivateKeyword)&&(t.parent.kind===E.ModuleBlock||t.parent.kind===E.SourceFile)&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on a module or namespace element.`),r.kind===E.AccessorKeyword&&t.kind!==E.PropertyDeclaration&&Ne(this,Pe,"m",st).call(this,r,"'accessor' modifier can only appear on a property declaration."),r.kind===E.AsyncKeyword&&t.kind!==E.MethodDeclaration&&t.kind!==E.FunctionDeclaration&&t.kind!==E.FunctionExpression&&t.kind!==E.ArrowFunction&&Ne(this,Pe,"m",st).call(this,r,"'async' modifier cannot be used here."),t.kind===E.Parameter&&(r.kind===E.StaticKeyword||r.kind===E.ExportKeyword||r.kind===E.DeclareKeyword||r.kind===E.AsyncKeyword)&&Ne(this,Pe,"m",st).call(this,r,`'${_t.tokenToString(r.kind)}' modifier cannot appear on a parameter.`),t.kind===E.Parameter&&(r.kind===E.PublicKeyword||r.kind===E.PrivateKeyword||r.kind===E.ProtectedKeyword||r.kind===E.ReadonlyKeyword||r.kind===E.OverrideKeyword)){let a=(0,pe.getContainingFunction)(t);a.kind===E.Constructor&&(0,pe.nodeIsPresent)(a.body)||Ne(this,Pe,"m",st).call(this,r,"A parameter property is only allowed in a constructor implementation.")}}}},br=function(t,r){this.options.allowInvalidAST||Ne(this,Pe,"m",st).call(this,t,r)},oi=function(t,r,a){let _=!1;return Object.defineProperty(t,r,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>t[a]:()=>(_||((void 0)(`The '${r}' property is deprecated on ${t.type} nodes. Use '${a}' instead. See https://typescript-eslint.io/linting/troubleshooting#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`,"DeprecationWarning"),_=!0),t[a]),set(p){Object.defineProperty(t,r,{enumerable:!0,writable:!0,value:p})}}),t},st=function(t,r){let a,_;throw typeof t=="number"?a=_=t:(a=t.getStart(this.ast),_=t.getEnd()),(0,pe.createError)(r,this.ast,a,_)}});var e9=ut((CH,Zw)=>{"use strict";var AU=Object.create,Wm=Object.defineProperty,kU=Object.getOwnPropertyDescriptor,DU=Object.getOwnPropertyNames,PU=Object.getPrototypeOf,IU=Object.prototype.hasOwnProperty,NU=(e,t)=>{for(var r in t)Wm(e,r,{get:t[r],enumerable:!0})},lw=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let _ of DU(t))!IU.call(e,_)&&_!==r&&Wm(e,_,{get:()=>t[_],enumerable:!(a=kU(t,_))||a.enumerable});return e},Pr=(e,t,r)=>(r=e!=null?AU(PU(e)):{},lw(t||!e||!e.__esModule?Wm(r,"default",{value:e,enumerable:!0}):r,e)),OU=e=>lw(Wm({},"__esModule",{value:!0}),e),uw={};NU(uw,{forEachComment:()=>LU,forEachToken:()=>pw,getCallSignaturesOfType:()=>tb,getPropertyOfType:()=>gb,getWellKnownSymbolPropertyOfType:()=>Zz,hasDecorators:()=>Bq,hasExpressionInitializer:()=>Ow,hasInitializer:()=>Uq,hasJSDoc:()=>qq,hasModifiers:()=>zq,hasType:()=>Wq,hasTypeArguments:()=>Vq,includesModifier:()=>jU,intersectionTypeParts:()=>iW,isAbstractKeyword:()=>FU,isAccessExpression:()=>kq,isAccessibilityModifier:()=>sb,isAccessorDeclaration:()=>_b,isAccessorKeyword:()=>hw,isAnyKeyword:()=>BU,isArrayBindingElement:()=>Dq,isArrayBindingOrAssignmentPattern:()=>kw,isAssertKeyword:()=>UU,isAssertsKeyword:()=>qU,isAssignmentKind:()=>yz,isAssignmentPattern:()=>Pq,isAsyncKeyword:()=>zU,isAwaitKeyword:()=>WU,isBigIntKeyword:()=>VU,isBigIntLiteralType:()=>Hz,isBindingOrAssignmentElementRestIndicator:()=>Iq,isBindingOrAssignmentElementTarget:()=>Nq,isBindingOrAssignmentPattern:()=>Dw,isBindingPattern:()=>cb,isBlockLike:()=>Oq,isBooleanKeyword:()=>HU,isBooleanLiteral:()=>Pw,isBooleanLiteralType:()=>hb,isClassLikeDeclaration:()=>Vm,isClassMemberModifier:()=>Mq,isColonToken:()=>GU,isCompilerOptionEnabled:()=>ja,isConditionalType:()=>Mz,isConstAssertionExpression:()=>Jw,isConstKeyword:()=>XU,isDeclarationName:()=>Iw,isDeclarationWithTypeParameterChildren:()=>Nw,isDeclarationWithTypeParameters:()=>Lq,isDeclareKeyword:()=>$U,isDefaultKeyword:()=>QU,isDestructuringPattern:()=>Jq,isDotToken:()=>YU,isEndOfFileToken:()=>yw,isEntityNameExpression:()=>hu,isEntityNameOrEntityNameExpression:()=>Rq,isEnumType:()=>Lz,isEqualsGreaterThanToken:()=>KU,isEqualsToken:()=>ZU,isEvolvingArrayType:()=>Wz,isExclamationToken:()=>eq,isExportKeyword:()=>tq,isFalseKeyword:()=>rq,isFalseLiteral:()=>gw,isFalseLiteralType:()=>yb,isFalsyType:()=>nW,isForInOrOfStatement:()=>jq,isFreshableIntrinsicType:()=>Vz,isFreshableType:()=>Hw,isFunctionLikeDeclaration:()=>Fq,isFunctionScopeBoundary:()=>hz,isImportExpression:()=>nq,isImportKeyword:()=>iq,isInKeyword:()=>aq,isIndexType:()=>Jz,isIndexedAccessType:()=>Rz,isInputFiles:()=>oq,isInstantiableType:()=>jz,isIntersectionType:()=>Hm,isIntrinsicAnyType:()=>vz,isIntrinsicBigIntType:()=>Sz,isIntrinsicBooleanType:()=>Tz,isIntrinsicESSymbolType:()=>wz,isIntrinsicErrorType:()=>xz,isIntrinsicNeverType:()=>Ez,isIntrinsicNonPrimitiveType:()=>Az,isIntrinsicNullType:()=>kz,isIntrinsicNumberType:()=>Dz,isIntrinsicStringType:()=>Pz,isIntrinsicType:()=>fb,isIntrinsicUndefinedType:()=>Iz,isIntrinsicUnknownType:()=>Nz,isIntrinsicVoidType:()=>Oz,isIterationStatement:()=>mz,isJSDocComment:()=>Hq,isJSDocNamespaceBody:()=>lb,isJSDocNamespaceDeclaration:()=>Rw,isJSDocText:()=>bw,isJSDocTypeReferencingNode:()=>Gq,isJsonMinusNumericLiteral:()=>vw,isJsonObjectExpression:()=>Xq,isJsxAttributeLike:()=>$q,isJsxAttributeValue:()=>Qq,isJsxChild:()=>Yq,isJsxTagNameExpression:()=>Mw,isJsxTagNamePropertyAccess:()=>jw,isLiteralToken:()=>Kq,isLiteralType:()=>Gz,isModifierFlagSet:()=>fw,isModuleBody:()=>Zq,isModuleName:()=>ez,isModuleReference:()=>tz,isNamedDeclarationWithName:()=>Fw,isNamedImportBindings:()=>rz,isNamedImportsOrExports:()=>nz,isNamespaceBody:()=>ub,isNamespaceDeclaration:()=>Bw,isNeverKeyword:()=>sq,isNodeFlagSet:()=>dw,isNullKeyword:()=>_q,isNullLiteral:()=>Tw,isNumberKeyword:()=>cq,isNumberLiteralType:()=>Xz,isNumericOrStringLikeLiteral:()=>Uw,isNumericPropertyName:()=>Vw,isObjectBindingOrAssignmentElement:()=>iz,isObjectBindingOrAssignmentPattern:()=>Lw,isObjectFlagSet:()=>mu,isObjectKeyword:()=>lq,isObjectType:()=>yu,isObjectTypeDeclaration:()=>az,isOutKeyword:()=>uq,isOverrideKeyword:()=>pq,isParameterPropertyModifier:()=>oz,isPrivateKeyword:()=>Sw,isPropertyAccessEntityNameExpression:()=>qw,isPropertyNameLiteral:()=>sz,isPropertyReadonlyInType:()=>Yw,isProtectedKeyword:()=>xw,isPseudoLiteralToken:()=>_z,isPublicKeyword:()=>ww,isQuestionDotToken:()=>fq,isQuestionToken:()=>dq,isReadonlyKeyword:()=>ab,isSignatureDeclaration:()=>pb,isStaticKeyword:()=>Cw,isStrictCompilerOptionEnabled:()=>rb,isStringKeyword:()=>mq,isStringLiteralType:()=>$z,isStringMappingType:()=>Fz,isSubstitutionType:()=>Bz,isSuperElementAccessExpression:()=>zw,isSuperExpression:()=>ob,isSuperKeyword:()=>hq,isSuperProperty:()=>cz,isSuperPropertyAccessExpression:()=>Ww,isSymbolFlagSet:()=>mw,isSymbolKeyword:()=>yq,isSyntaxList:()=>gq,isTemplateLiteralType:()=>Qz,isThenableType:()=>cW,isThisExpression:()=>Ew,isThisKeyword:()=>bq,isTrueKeyword:()=>vq,isTrueLiteral:()=>Aw,isTrueLiteralType:()=>Yz,isTupleType:()=>Xw,isTupleTypeReference:()=>Qw,isTypeFlagSet:()=>tt,isTypeOnlyCompatibleAliasDeclaration:()=>lz,isTypeParameter:()=>Uz,isTypeReference:()=>$w,isTypeReferenceType:()=>uz,isTypeVariable:()=>qz,isUndefinedKeyword:()=>Tq,isUnionOrIntersectionType:()=>zz,isUnionOrIntersectionTypeNode:()=>pz,isUnionType:()=>mb,isUniqueESSymbolType:()=>Gw,isUnknownKeyword:()=>Sq,isUnknownLiteralType:()=>Kz,isUnparsedPrologue:()=>xq,isUnparsedSourceText:()=>fz,isUnparsedSyntheticReference:()=>wq,isValidPropertyAccess:()=>gz,isVariableLikeDeclaration:()=>dz,isVoidKeyword:()=>Cq,symbolHasReadonlyDeclaration:()=>Kw,unionTypeParts:()=>du});Zw.exports=OU(uw);var Zr=Pr(Dt(),1),sw=Pr(Dt(),1);function pw(e,t,r=e.getSourceFile()){let a=[];for(;;){if(sw.default.isTokenKind(e.kind))t(e);else if(e.kind!==sw.default.SyntaxKind.JSDocComment){let _=e.getChildren(r);if(_.length===1){e=_[0];continue}for(let p=_.length-1;p>=0;--p)a.push(_[p])}if(a.length===0)break;e=a.pop()}}function MU(e){switch(e.kind){case Zr.default.SyntaxKind.CloseBraceToken:return e.parent.kind!==Zr.default.SyntaxKind.JsxExpression||!eb(e.parent.parent);case Zr.default.SyntaxKind.GreaterThanToken:switch(e.parent.kind){case Zr.default.SyntaxKind.JsxOpeningElement:return e.end!==e.parent.end;case Zr.default.SyntaxKind.JsxOpeningFragment:return!1;case Zr.default.SyntaxKind.JsxSelfClosingElement:return e.end!==e.parent.end||!eb(e.parent.parent);case Zr.default.SyntaxKind.JsxClosingElement:case Zr.default.SyntaxKind.JsxClosingFragment:return!eb(e.parent.parent.parent)}}return!0}function eb(e){return e.kind===Zr.default.SyntaxKind.JsxElement||e.kind===Zr.default.SyntaxKind.JsxFragment}function LU(e,t,r=e.getSourceFile()){let a=r.text,_=r.languageVariant!==Zr.default.LanguageVariant.JSX;return pw(e,d=>{if(d.pos!==d.end&&(d.kind!==Zr.default.SyntaxKind.JsxText&&Zr.default.forEachLeadingCommentRange(a,d.pos===0?(Zr.default.getShebang(a)??"").length:d.pos,p),_||MU(d)))return Zr.default.forEachTrailingCommentRange(a,d.end,p)},r);function p(d,h,l){t(a,{pos:d,end:h,kind:l})}}var JU=Pr(Dt(),1);function ja(e,t){switch(t){case"stripInternal":case"declarationMap":case"emitDeclarationOnly":return e[t]===!0&&ja(e,"declaration");case"declaration":return e.declaration||ja(e,"composite");case"incremental":return e.incremental===void 0?ja(e,"composite"):e.incremental;case"skipDefaultLibCheck":return e.skipDefaultLibCheck||ja(e,"skipLibCheck");case"suppressImplicitAnyIndexErrors":return e.suppressImplicitAnyIndexErrors===!0&&ja(e,"noImplicitAny");case"allowSyntheticDefaultImports":return e.allowSyntheticDefaultImports!==void 0?e.allowSyntheticDefaultImports:ja(e,"esModuleInterop")||e.module===JU.default.ModuleKind.System;case"noUncheckedIndexedAccess":return e.noUncheckedIndexedAccess===!0&&ja(e,"strictNullChecks");case"allowJs":return e.allowJs===void 0?ja(e,"checkJs"):e.allowJs;case"noImplicitAny":case"noImplicitThis":case"strictNullChecks":case"strictFunctionTypes":case"strictPropertyInitialization":case"alwaysStrict":case"strictBindCallApply":return rb(e,t)}return e[t]===!0}function rb(e,t){return(e.strict?e[t]!==!1:e[t]===!0)&&(t!=="strictPropertyInitialization"||rb(e,"strictNullChecks"))}var RU=Pr(Dt(),1);function nb(e,t){return(e&t)!==0}function ib(e,t){return nb(e.flags,t)}function fw(e,t){return nb(RU.default.getCombinedModifierFlags(e),t)}var dw=ib;function mu(e,t){return nb(e.objectFlags,t)}var mw=ib,tt=ib;function jU(e,...t){if(e===void 0)return!1;for(let r of e)if(t.includes(r.kind))return!0;return!1}var pr=Pr(Dt(),1),Fe=Pr(Dt(),1);function FU(e){return e.kind===Fe.default.SyntaxKind.AbstractKeyword}function hw(e){return e.kind===Fe.default.SyntaxKind.AccessorKeyword}function BU(e){return e.kind===Fe.default.SyntaxKind.AnyKeyword}function UU(e){return e.kind===Fe.default.SyntaxKind.AssertKeyword}function qU(e){return e.kind===Fe.default.SyntaxKind.AssertsKeyword}function zU(e){return e.kind===Fe.default.SyntaxKind.AsyncKeyword}function WU(e){return e.kind===Fe.default.SyntaxKind.AwaitKeyword}function VU(e){return e.kind===Fe.default.SyntaxKind.BigIntKeyword}function HU(e){return e.kind===Fe.default.SyntaxKind.BooleanKeyword}function GU(e){return e.kind===Fe.default.SyntaxKind.ColonToken}function XU(e){return e.kind===Fe.default.SyntaxKind.ConstKeyword}function $U(e){return e.kind===Fe.default.SyntaxKind.DeclareKeyword}function QU(e){return e.kind===Fe.default.SyntaxKind.DefaultKeyword}function YU(e){return e.kind===Fe.default.SyntaxKind.DotToken}function yw(e){return e.kind===Fe.default.SyntaxKind.EndOfFileToken}function KU(e){return e.kind===Fe.default.SyntaxKind.EqualsGreaterThanToken}function ZU(e){return e.kind===Fe.default.SyntaxKind.EqualsToken}function eq(e){return e.kind===Fe.default.SyntaxKind.ExclamationToken}function tq(e){return e.kind===Fe.default.SyntaxKind.ExportKeyword}function rq(e){return e.kind===Fe.default.SyntaxKind.FalseKeyword}function gw(e){return e.kind===Fe.default.SyntaxKind.FalseKeyword}function nq(e){return e.kind===Fe.default.SyntaxKind.ImportKeyword}function iq(e){return e.kind===Fe.default.SyntaxKind.ImportKeyword}function aq(e){return e.kind===Fe.default.SyntaxKind.InKeyword}function oq(e){return e.kind===Fe.default.SyntaxKind.InputFiles}function bw(e){return e.kind===Fe.default.SyntaxKind.JSDocText}function vw(e){return e.kind===Fe.default.SyntaxKind.PrefixUnaryExpression}function sq(e){return e.kind===Fe.default.SyntaxKind.NeverKeyword}function _q(e){return e.kind===Fe.default.SyntaxKind.NullKeyword}function Tw(e){return e.kind===Fe.default.SyntaxKind.NullKeyword}function cq(e){return e.kind===Fe.default.SyntaxKind.NumberKeyword}function lq(e){return e.kind===Fe.default.SyntaxKind.ObjectKeyword}function uq(e){return e.kind===Fe.default.SyntaxKind.OutKeyword}function pq(e){return e.kind===Fe.default.SyntaxKind.OverrideKeyword}function Sw(e){return e.kind===Fe.default.SyntaxKind.PrivateKeyword}function xw(e){return e.kind===Fe.default.SyntaxKind.ProtectedKeyword}function ww(e){return e.kind===Fe.default.SyntaxKind.PublicKeyword}function fq(e){return e.kind===Fe.default.SyntaxKind.QuestionDotToken}function dq(e){return e.kind===Fe.default.SyntaxKind.QuestionToken}function ab(e){return e.kind===Fe.default.SyntaxKind.ReadonlyKeyword}function Cw(e){return e.kind===Fe.default.SyntaxKind.StaticKeyword}function mq(e){return e.kind===Fe.default.SyntaxKind.StringKeyword}function ob(e){return e.kind===Fe.default.SyntaxKind.SuperKeyword}function hq(e){return e.kind===Fe.default.SyntaxKind.SuperKeyword}function yq(e){return e.kind===Fe.default.SyntaxKind.SymbolKeyword}function gq(e){return e.kind===Fe.default.SyntaxKind.SyntaxList}function Ew(e){return e.kind===Fe.default.SyntaxKind.ThisKeyword}function bq(e){return e.kind===Fe.default.SyntaxKind.ThisKeyword}function vq(e){return e.kind===Fe.default.SyntaxKind.TrueKeyword}function Aw(e){return e.kind===Fe.default.SyntaxKind.TrueKeyword}function Tq(e){return e.kind===Fe.default.SyntaxKind.UndefinedKeyword}function Sq(e){return e.kind===Fe.default.SyntaxKind.UnknownKeyword}function xq(e){return e.kind===Fe.default.SyntaxKind.UnparsedPrologue}function wq(e){return e.kind===Fe.default.SyntaxKind.UnparsedSyntheticReference}function Cq(e){return e.kind===Fe.default.SyntaxKind.VoidKeyword}var D=Pr(Dt(),1),Eq=Pr(Dt(),1),[_w,Aq]=Eq.default.versionMajorMinor.split(".").map(e=>Number.parseInt(e,10));function fu(e,t=0){return _w>e||_w===e&&Aq>=t}function kq(e){return D.default.isPropertyAccessExpression(e)||D.default.isElementAccessExpression(e)}function sb(e){return ww(e)||Sw(e)||xw(e)}function _b(e){return D.default.isGetAccessorDeclaration(e)||D.default.isSetAccessorDeclaration(e)}function Dq(e){return D.default.isBindingElement(e)||D.default.isOmittedExpression(e)}function kw(e){return D.default.isArrayBindingPattern(e)||D.default.isArrayLiteralExpression(e)}function Pq(e){return D.default.isObjectLiteralExpression(e)||D.default.isArrayLiteralExpression(e)}function Iq(e){return D.default.isSpreadElement(e)||D.default.isSpreadAssignment(e)?!0:fu(4,4)?D.default.isDotDotDotToken(e):!1}function Nq(e){return Dw(e)||D.default.isIdentifier(e)||D.default.isPropertyAccessExpression(e)||D.default.isElementAccessExpression(e)||D.default.isOmittedExpression(e)}function Dw(e){return Lw(e)||kw(e)}function cb(e){return D.default.isObjectBindingPattern(e)||D.default.isArrayBindingPattern(e)}function Oq(e){return D.default.isSourceFile(e)||D.default.isBlock(e)||D.default.isModuleBlock(e)||D.default.isCaseOrDefaultClause(e)}function Pw(e){return Aw(e)||gw(e)}function Vm(e){return D.default.isClassDeclaration(e)||D.default.isClassExpression(e)}function Mq(e){return sb(e)||ab(e)||Cw(e)||hw(e)}function Iw(e){return D.default.isIdentifier(e)||D.default.isPrivateIdentifier(e)||D.default.isStringLiteralLike(e)||D.default.isNumericLiteral(e)||D.default.isComputedPropertyName(e)||D.default.isElementAccessExpression(e)||cb(e)||hu(e)}function Nw(e){return pb(e)||Vm(e)||D.default.isInterfaceDeclaration(e)||D.default.isTypeAliasDeclaration(e)||D.default.isJSDocTemplateTag(e)}function Lq(e){return Nw(e)||D.default.isJSDocTypedefTag(e)||D.default.isJSDocCallbackTag(e)||D.default.isJSDocSignature(e)}function Jq(e){return cb(e)||D.default.isObjectLiteralExpression(e)||D.default.isArrayLiteralExpression(e)}function hu(e){return D.default.isIdentifier(e)||qw(e)}function Rq(e){return D.default.isEntityName(e)||hu(e)}function jq(e){return D.default.isForInStatement(e)||D.default.isForOfStatement(e)}function Fq(e){return D.default.isFunctionDeclaration(e)||D.default.isMethodDeclaration(e)||D.default.isGetAccessorDeclaration(e)||D.default.isSetAccessorDeclaration(e)||D.default.isConstructorDeclaration(e)||D.default.isFunctionExpression(e)||D.default.isArrowFunction(e)}function Bq(e){return D.default.isParameter(e)||D.default.isPropertyDeclaration(e)||D.default.isMethodDeclaration(e)||D.default.isGetAccessorDeclaration(e)||D.default.isSetAccessorDeclaration(e)||D.default.isClassExpression(e)||D.default.isClassDeclaration(e)}function Ow(e){return D.default.isVariableDeclaration(e)||D.default.isParameter(e)||D.default.isBindingElement(e)||D.default.isPropertyDeclaration(e)||D.default.isPropertyAssignment(e)||D.default.isEnumMember(e)}function Uq(e){return Ow(e)||D.default.isForStatement(e)||D.default.isForInStatement(e)||D.default.isForOfStatement(e)||D.default.isJsxAttribute(e)}function qq(e){return!!(_b(e)||D.default.isArrowFunction(e)||D.default.isBlock(e)||D.default.isBreakStatement(e)||D.default.isCallSignatureDeclaration(e)||D.default.isCaseClause(e)||Vm(e)||D.default.isConstructorDeclaration(e)||D.default.isConstructorTypeNode(e)||D.default.isConstructSignatureDeclaration(e)||D.default.isContinueStatement(e)||D.default.isDebuggerStatement(e)||D.default.isDoStatement(e)||D.default.isEmptyStatement(e)||yw(e)||D.default.isEnumDeclaration(e)||D.default.isEnumMember(e)||D.default.isExportAssignment(e)||D.default.isExportDeclaration(e)||D.default.isExportSpecifier(e)||D.default.isExpressionStatement(e)||D.default.isForInStatement(e)||D.default.isForOfStatement(e)||D.default.isForStatement(e)||D.default.isFunctionDeclaration(e)||D.default.isFunctionExpression(e)||D.default.isFunctionTypeNode(e)||D.default.isIfStatement(e)||D.default.isImportDeclaration(e)||D.default.isImportEqualsDeclaration(e)||D.default.isIndexSignatureDeclaration(e)||D.default.isInterfaceDeclaration(e)||D.default.isJSDocFunctionType(e)||D.default.isLabeledStatement(e)||D.default.isMethodDeclaration(e)||D.default.isMethodSignature(e)||D.default.isModuleDeclaration(e)||D.default.isNamedTupleMember(e)||D.default.isNamespaceExportDeclaration(e)||D.default.isParameter(e)||D.default.isParenthesizedExpression(e)||D.default.isPropertyAssignment(e)||D.default.isPropertyDeclaration(e)||D.default.isPropertySignature(e)||D.default.isReturnStatement(e)||D.default.isShorthandPropertyAssignment(e)||D.default.isSpreadAssignment(e)||D.default.isSwitchStatement(e)||D.default.isThrowStatement(e)||D.default.isTryStatement(e)||D.default.isTypeAliasDeclaration(e)||D.default.isVariableDeclaration(e)||D.default.isVariableStatement(e)||D.default.isWhileStatement(e)||D.default.isWithStatement(e)||fu(4,4)&&D.default.isClassStaticBlockDeclaration(e)||fu(5,0)&&(D.default.isBinaryExpression(e)||D.default.isElementAccessExpression(e)||D.default.isIdentifier(e)||D.default.isJSDocSignature(e)||D.default.isObjectLiteralExpression(e)||D.default.isPropertyAccessExpression(e)||D.default.isTypeParameterDeclaration(e)))}function zq(e){return D.default.isTypeParameterDeclaration(e)||D.default.isParameter(e)||D.default.isConstructorTypeNode(e)||D.default.isPropertySignature(e)||D.default.isPropertyDeclaration(e)||D.default.isMethodSignature(e)||D.default.isMethodDeclaration(e)||D.default.isConstructorDeclaration(e)||D.default.isGetAccessorDeclaration(e)||D.default.isSetAccessorDeclaration(e)||D.default.isIndexSignatureDeclaration(e)||D.default.isFunctionExpression(e)||D.default.isArrowFunction(e)||D.default.isClassExpression(e)||D.default.isVariableStatement(e)||D.default.isFunctionDeclaration(e)||D.default.isClassDeclaration(e)||D.default.isInterfaceDeclaration(e)||D.default.isTypeAliasDeclaration(e)||D.default.isEnumDeclaration(e)||D.default.isModuleDeclaration(e)||D.default.isImportEqualsDeclaration(e)||D.default.isImportDeclaration(e)||D.default.isExportAssignment(e)||D.default.isExportDeclaration(e)}function Wq(e){return pb(e)||D.default.isVariableDeclaration(e)||D.default.isParameter(e)||D.default.isPropertySignature(e)||D.default.isPropertyDeclaration(e)||D.default.isTypePredicateNode(e)||D.default.isParenthesizedTypeNode(e)||D.default.isTypeOperatorNode(e)||D.default.isMappedTypeNode(e)||D.default.isAssertionExpression(e)||D.default.isTypeAliasDeclaration(e)||D.default.isJSDocTypeExpression(e)||D.default.isJSDocNonNullableType(e)||D.default.isJSDocNullableType(e)||D.default.isJSDocOptionalType(e)||D.default.isJSDocVariadicType(e)}function Vq(e){return D.default.isCallExpression(e)||D.default.isNewExpression(e)||D.default.isTaggedTemplateExpression(e)||D.default.isJsxOpeningElement(e)||D.default.isJsxSelfClosingElement(e)}function Hq(e){return bw(e)?!0:fu(4,4)?D.default.isJSDocLink(e)||D.default.isJSDocLinkCode(e)||D.default.isJSDocLinkPlain(e):!1}function lb(e){return D.default.isIdentifier(e)||Rw(e)}function Gq(e){return D.default.isJSDocVariadicType(e)||D.default.isJSDocOptionalType(e)||D.default.isJSDocNullableType(e)||D.default.isJSDocNonNullableType(e)}function Xq(e){return D.default.isObjectLiteralExpression(e)||D.default.isArrayLiteralExpression(e)||vw(e)||D.default.isNumericLiteral(e)||D.default.isStringLiteral(e)||Pw(e)||Tw(e)}function $q(e){return D.default.isJsxAttribute(e)||D.default.isJsxSpreadAttribute(e)}function Qq(e){return D.default.isStringLiteral(e)||D.default.isJsxExpression(e)||D.default.isJsxElement(e)||D.default.isJsxSelfClosingElement(e)||D.default.isJsxFragment(e)}function Yq(e){return D.default.isJsxText(e)||D.default.isJsxExpression(e)||D.default.isJsxElement(e)||D.default.isJsxSelfClosingElement(e)||D.default.isJsxFragment(e)}function Mw(e){return D.default.isIdentifier(e)||Ew(e)||jw(e)}function Kq(e){return D.default.isNumericLiteral(e)||D.default.isBigIntLiteral(e)||D.default.isStringLiteral(e)||D.default.isJsxText(e)||D.default.isRegularExpressionLiteral(e)||D.default.isNoSubstitutionTemplateLiteral(e)}function Zq(e){return ub(e)||lb(e)}function ez(e){return D.default.isIdentifier(e)||D.default.isStringLiteral(e)}function tz(e){return D.default.isEntityName(e)||D.default.isExternalModuleReference(e)}function rz(e){return D.default.isNamespaceImport(e)||D.default.isNamedImports(e)}function nz(e){return D.default.isNamedImports(e)||D.default.isNamedExports(e)}function ub(e){return D.default.isModuleBlock(e)||Bw(e)}function iz(e){return D.default.isBindingElement(e)||D.default.isPropertyAssignment(e)||D.default.isShorthandPropertyAssignment(e)||D.default.isSpreadAssignment(e)}function Lw(e){return D.default.isObjectBindingPattern(e)||D.default.isObjectLiteralExpression(e)}function az(e){return Vm(e)||D.default.isInterfaceDeclaration(e)||D.default.isTypeLiteralNode(e)}function oz(e){return sb(e)||ab(e)}function sz(e){return D.default.isIdentifier(e)||D.default.isStringLiteralLike(e)||D.default.isNumericLiteral(e)}function _z(e){return D.default.isTemplateHead(e)||D.default.isTemplateMiddle(e)||D.default.isTemplateTail(e)}function pb(e){return D.default.isCallSignatureDeclaration(e)||D.default.isConstructSignatureDeclaration(e)||D.default.isMethodSignature(e)||D.default.isIndexSignatureDeclaration(e)||D.default.isFunctionTypeNode(e)||D.default.isConstructorTypeNode(e)||D.default.isJSDocFunctionType(e)||D.default.isFunctionDeclaration(e)||D.default.isMethodDeclaration(e)||D.default.isConstructorDeclaration(e)||_b(e)||D.default.isFunctionExpression(e)||D.default.isArrowFunction(e)}function cz(e){return Ww(e)||zw(e)}function lz(e){return!!(D.default.isImportClause(e)||D.default.isImportEqualsDeclaration(e)||D.default.isNamespaceImport(e)||D.default.isImportOrExportSpecifier(e)||fu(5,0)&&(D.default.isExportDeclaration(e)||D.default.isNamespaceExport(e)))}function uz(e){return D.default.isTypeReferenceNode(e)||D.default.isExpressionWithTypeArguments(e)}function pz(e){return D.default.isUnionTypeNode(e)||D.default.isIntersectionTypeNode(e)}function fz(e){return D.default.isUnparsedPrepend(e)||D.default.isUnparsedTextLike(e)}function dz(e){return D.default.isVariableDeclaration(e)||D.default.isParameter(e)||D.default.isBindingElement(e)||D.default.isPropertyDeclaration(e)||D.default.isPropertyAssignment(e)||D.default.isPropertySignature(e)||D.default.isJsxAttribute(e)||D.default.isShorthandPropertyAssignment(e)||D.default.isEnumMember(e)||D.default.isJSDocPropertyTag(e)||D.default.isJSDocParameterTag(e)}function Jw(e){return pr.default.isTypeReferenceNode(e.type)&&pr.default.isIdentifier(e.type.typeName)&&e.type.typeName.escapedText==="const"}function mz(e){switch(e.kind){case pr.default.SyntaxKind.DoStatement:case pr.default.SyntaxKind.ForInStatement:case pr.default.SyntaxKind.ForOfStatement:case pr.default.SyntaxKind.ForStatement:case pr.default.SyntaxKind.WhileStatement:return!0;default:return!1}}function Rw(e){return pr.default.isModuleDeclaration(e)&&pr.default.isIdentifier(e.name)&&(e.body===void 0||lb(e.body))}function jw(e){return pr.default.isPropertyAccessExpression(e)&&Mw(e.expression)}function Fw(e){return"name"in e&&e.name!==void 0&&e.name!==null&&Iw(e.name)}function Bw(e){return pr.default.isModuleDeclaration(e)&&pr.default.isIdentifier(e.name)&&e.body!==void 0&&ub(e.body)}function Uw(e){switch(e.kind){case pr.default.SyntaxKind.StringLiteral:case pr.default.SyntaxKind.NumericLiteral:case pr.default.SyntaxKind.NoSubstitutionTemplateLiteral:return!0;default:return!1}}function qw(e){return pr.default.isPropertyAccessExpression(e)&&pr.default.isIdentifier(e.name)&&hu(e.expression)}function zw(e){return pr.default.isElementAccessExpression(e)&&ob(e.expression)}function Ww(e){return pr.default.isPropertyAccessExpression(e)&&ob(e.expression)}var vr=Pr(Dt(),1);function hz(e){switch(e.kind){case vr.default.SyntaxKind.FunctionExpression:case vr.default.SyntaxKind.ArrowFunction:case vr.default.SyntaxKind.Constructor:case vr.default.SyntaxKind.ModuleDeclaration:case vr.default.SyntaxKind.ClassDeclaration:case vr.default.SyntaxKind.ClassExpression:case vr.default.SyntaxKind.EnumDeclaration:case vr.default.SyntaxKind.MethodDeclaration:case vr.default.SyntaxKind.FunctionDeclaration:case vr.default.SyntaxKind.GetAccessor:case vr.default.SyntaxKind.SetAccessor:case vr.default.SyntaxKind.MethodSignature:case vr.default.SyntaxKind.CallSignature:case vr.default.SyntaxKind.ConstructSignature:case vr.default.SyntaxKind.ConstructorType:case vr.default.SyntaxKind.FunctionType:return!0;case vr.default.SyntaxKind.SourceFile:return vr.default.isExternalModule(e);default:return!1}}var pu=Pr(Dt(),1);function yz(e){return e>=pu.default.SyntaxKind.FirstAssignment&&e<=pu.default.SyntaxKind.LastAssignment}function Vw(e){return String(+e)===e}function cw(e){return e>=65536?2:1}function gz(e,t=pu.default.ScriptTarget.Latest){if(e.length===0)return!1;let r=e.codePointAt(0);if(!pu.default.isIdentifierStart(r,t))return!1;for(let a=cw(r);ar.escapedName===t):e.getProperty(t)}function Zz(e,t,r){let a="__@"+t;for(let _ of e.getProperties()){if(!_.name.startsWith(a))continue;let p=_.valueDeclaration??_.getDeclarations()[0];if(!Fw(p)||p.name===void 0||!bz.default.isComputedPropertyName(p.name))continue;let d=r.getApparentType(r.getTypeAtLocation(p.name.expression)).symbol;if(_.escapedName===eW(r,d,t))return _}}function eW(e,t,r){let a=t&&e.getTypeOfSymbolAtLocation(t,t.valueDeclaration).getProperty(r),_=a&&e.getTypeOfSymbolAtLocation(a,a.valueDeclaration);return _&&Gw(_)?_.escapedName:"__@"+r}var ur=Pr(Dt(),1),gn=Pr(Dt(),1);function tW(e){return e.arguments.length===3&&hu(e.arguments[0])&&Uw(e.arguments[1])&&gn.default.isPropertyAccessExpression(e.expression)&&e.expression.name.escapedText==="defineProperty"&&gn.default.isIdentifier(e.expression.expression)&&e.expression.expression.escapedText==="Object"}function rW(e){let t=e;for(;;){let r=t.parent;e:switch(r.kind){case gn.default.SyntaxKind.TypeAssertionExpression:case gn.default.SyntaxKind.AsExpression:return Jw(r);case gn.default.SyntaxKind.PrefixUnaryExpression:if(t.kind!==gn.default.SyntaxKind.NumericLiteral)return!1;switch(r.operator){case gn.default.SyntaxKind.PlusToken:case gn.default.SyntaxKind.MinusToken:t=r;break e;default:return!1}case gn.default.SyntaxKind.PropertyAssignment:if(r.initializer!==t)return!1;t=r.parent;break;case gn.default.SyntaxKind.ShorthandPropertyAssignment:t=r.parent;break;case gn.default.SyntaxKind.ParenthesizedExpression:case gn.default.SyntaxKind.ArrayLiteralExpression:case gn.default.SyntaxKind.ObjectLiteralExpression:case gn.default.SyntaxKind.TemplateExpression:t=r;break;default:return!1}}}function nW(e){return tt(e,ur.default.TypeFlags.Undefined|ur.default.TypeFlags.Null|ur.default.TypeFlags.Void)?!0:e.isLiteral()?!e.value:yb(e)}function iW(e){return Hm(e)?e.types:[e]}function aW(e,t,r){return(Hm(e)?e.types:[e]).some(_=>{let p=gb(_,t);if(p===void 0)return!1;if(p.flags&ur.default.SymbolFlags.Transient){if(/^(?:[1-9]\d*|0)$/.test(t)&&Qw(_))return _.target.readonly;switch(oW(_,t,r)){case!0:return!0;case!1:return!1;default:}}return!!(mw(p,ur.default.SymbolFlags.ValueModule)||Kw(p,r))})}function oW(e,t,r){if(!yu(e)||!mu(e,ur.default.ObjectFlags.Mapped))return;let a=e.symbol.declarations[0];if(a.readonlyToken!==void 0&&!/^__@[^@]+$/.test(t))return a.readonlyToken.kind!==ur.default.SyntaxKind.MinusToken;let{modifiersType:_}=e;return _&&Yw(_,t,r)}function sW(e,t,r){let a=e.getApparentType(e.getTypeOfSymbolAtLocation(t,r));if(t.valueDeclaration.dotDotDotToken&&(a=a.getNumberIndexType(),a===void 0))return!1;for(let _ of du(a))if(_.getCallSignatures().length!==0)return!0;return!1}function Yw(e,t,r){let a=!1,_=!1;for(let p of du(e))if(gb(p,t)===void 0){let d=(Vw(t)?r.getIndexInfoOfType(p,ur.default.IndexKind.Number):void 0)??r.getIndexInfoOfType(p,ur.default.IndexKind.String);if(d!=null&&d.isReadonly){if(a)return!0;_=!0}}else{if(_||aW(p,t,r))return!0;a=!0}return!1}function _W(e,t){if(!tW(e))return!1;let r=t.getTypeAtLocation(e.arguments[2]);if(r.getProperty("value")===void 0)return r.getProperty("set")===void 0;let a=r.getProperty("writable");if(a===void 0)return!1;let _=a.valueDeclaration!==void 0&&ur.default.isPropertyAssignment(a.valueDeclaration)?t.getTypeAtLocation(a.valueDeclaration.initializer):t.getTypeOfSymbolAtLocation(a,e.arguments[2]);return yb(_)}function cW(e,t,r=e.getTypeAtLocation(t)){for(let a of du(e.getApparentType(r))){let _=a.getProperty("then");if(_===void 0)continue;let p=e.getTypeOfSymbolAtLocation(_,t);for(let d of du(p))for(let h of d.getCallSignatures())if(h.parameters.length!==0&&sW(e,h.parameters[0],t))return!0}return!1}function Kw(e,t){var r;return!!((e.flags&ur.default.SymbolFlags.Accessor)===ur.default.SymbolFlags.GetAccessor||(r=e.declarations)!=null&&r.some(a=>fw(a,ur.default.ModifierFlags.Readonly)||ur.default.isVariableDeclaration(a)&&dw(a.parent,ur.default.NodeFlags.Const)||ur.default.isCallExpression(a)&&_W(a,t)||ur.default.isEnumMember(a)||(ur.default.isPropertyAssignment(a)||ur.default.isShorthandPropertyAssignment(a))&&rW(a.parent)))}function du(e){return mb(e)?e.types:[e]}});var i9=ut(ea=>{"use strict";var lW=ea&&ea.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),uW=ea&&ea.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n9=ea&&ea.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&lW(t,e,r);return uW(t,e),t};Object.defineProperty(ea,"__esModule",{value:!0});ea.convertComments=void 0;var pW=n9(e9()),t9=n9(Dt()),fW=zm(),r9=Bm();function dW(e,t){let r=[];return pW.forEachComment(e,(a,_)=>{let p=_.kind===t9.SyntaxKind.SingleLineCommentTrivia?r9.AST_TOKEN_TYPES.Line:r9.AST_TOKEN_TYPES.Block,d=[_.pos,_.end],h=(0,fW.getLocFor)(d,e),l=d[0]+2,v=_.kind===t9.SyntaxKind.SingleLineCommentTrivia?d[1]-l:d[1]-l-2;r.push({type:p,value:t.slice(l,l+v),range:d,loc:h})},e),r}ea.convertComments=dW});var o9=ut(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});Gm.astConverter=void 0;var a9=Z6(),mW=i9(),hW=zm(),yW={};function gW(e,t,r){let{parseDiagnostics:a}=e;if(a.length)throw(0,a9.convertError)(a[0]);let _=new a9.Converter(e,{allowInvalidAST:t.allowInvalidAST,errorOnUnknownASTType:t.errorOnUnknownASTType,shouldPreserveNodeMaps:r,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings}),p=_.convertProgram();(!t.range||!t.loc)&&(0,yW.simpleTraverse)(p,{enter:h=>{t.range||delete h.range,t.loc||delete h.loc}}),t.tokens&&(p.tokens=(0,hW.convertTokens)(e)),t.comment&&(p.comments=(0,mW.convertComments)(e,t.codeFullText));let d=_.getASTMaps();return{estree:p,astMaps:d}}Gm.astConverter=gW});var bb=ut(si=>{"use strict";var bW=si&&si.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),vW=si&&si.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),TW=si&&si.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&bW(t,e,r);return vW(t,e),t};Object.defineProperty(si,"__esModule",{value:!0});si.getCodeText=si.isSourceFile=void 0;var SW=TW(Dt());function s9(e){if(typeof e!="object"||e==null)return!1;let t=e;return t.kind===SW.SyntaxKind.SourceFile&&typeof t.getFullText=="function"}si.isSourceFile=s9;function xW(e){return s9(e)?e.getFullText(e):e}si.getCodeText=xW});var _9=ut(bn=>{"use strict";var wW=bn&&bn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),CW=bn&&bn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),EW=bn&&bn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&wW(t,e,r);return CW(t,e),t},AW=bn&&bn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bn,"__esModule",{value:!0});bn.getLanguageVariant=bn.getScriptKind=void 0;var kW=AW({extname:e=>"."+e.split(".").pop()}),Ht=EW(Dt());function DW(e,t){switch(kW.default.extname(e).toLowerCase()){case Ht.Extension.Js:case Ht.Extension.Cjs:case Ht.Extension.Mjs:return Ht.ScriptKind.JS;case Ht.Extension.Jsx:return Ht.ScriptKind.JSX;case Ht.Extension.Ts:case Ht.Extension.Cts:case Ht.Extension.Mts:return Ht.ScriptKind.TS;case Ht.Extension.Tsx:return Ht.ScriptKind.TSX;case Ht.Extension.Json:return Ht.ScriptKind.JSON;default:return t?Ht.ScriptKind.TSX:Ht.ScriptKind.TS}}bn.getScriptKind=DW;function PW(e){switch(e){case Ht.ScriptKind.TSX:case Ht.ScriptKind.JSX:case Ht.ScriptKind.JS:case Ht.ScriptKind.JSON:return Ht.LanguageVariant.JSX;default:return Ht.LanguageVariant.Standard}}bn.getLanguageVariant=PW});var u9=ut(vn=>{"use strict";var IW=vn&&vn.__createBinding||(Object.create?function(e,t,r,a){a===void 0&&(a=r);var _=Object.getOwnPropertyDescriptor(t,r);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,a,_)}:function(e,t,r,a){a===void 0&&(a=r),e[a]=t[r]}),NW=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),OW=vn&&vn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&IW(t,e,r);return NW(t,e),t},MW=vn&&vn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vn,"__esModule",{value:!0});vn.createNoProgram=vn.createSourceFile=void 0;var LW=MW((Cf(),Hh(wf))),c9=OW(Dt()),JW=bb(),RW=_9(),jW=(0,LW.default)("typescript-eslint:typescript-estree:createSourceFile");function l9(e){return jW("Getting AST without type information in %s mode for: %s",e.jsx?"TSX":"TS",e.filePath),(0,JW.isSourceFile)(e.code)?e.code:c9.createSourceFile(e.filePath,e.codeFullText,c9.ScriptTarget.Latest,!0,(0,RW.getScriptKind)(e.filePath,e.jsx))}vn.createSourceFile=l9;function FW(e){return{ast:l9(e),program:null}}vn.createNoProgram=FW});var p9=ut(()=>{});var f9=ut(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});Xm.createParserServices=void 0;function BW(e,t){if(!t)return{program:t,...e};let r=t.getTypeChecker();return{program:t,...e,getSymbolAtLocation:a=>r.getSymbolAtLocation(e.esTreeNodeToTSNodeMap.get(a)),getTypeAtLocation:a=>r.getTypeAtLocation(e.esTreeNodeToTSNodeMap.get(a))}}Xm.createParserServices=BW});var d9=ut(()=>{});var h9=ut(m9=>{m9.ExpiringCache=class{}});var g9=ut(y9=>{y9.resolveProjectList=()=>[]});var v9=ut(b9=>{b9.inferSingleRun=()=>!1});var S9=ut(T9=>{T9.warnAboutTSVersion=()=>{}});var C9=ut(ta=>{"use strict";var UW=ta&&ta.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ta,"__esModule",{value:!0});ta.clearTSServerProjectService=ta.clearTSConfigMatchCache=ta.createParseSettings=void 0;var vb=UW((Cf(),Hh(wf))),qW=d9(),zW={ensureAbsolutePath:e=>e},WW=bb(),x9=h9(),UH=g9(),VW=v9(),HW=S9(),GW=(0,vb.default)("typescript-eslint:typescript-estree:parser:parseSettings:createParseSettings"),$m,w9=null;function XW(e,t={}){var d;let r=YW(e),a=(0,VW.inferSingleRun)(t),_=typeof t.tsconfigRootDir=="string"?t.tsconfigRootDir:"/prettier-security-dirname-placeholder",p={allowInvalidAST:t.allowInvalidAST===!0,code:e,codeFullText:r,comment:t.comment===!0,comments:[],DEPRECATED__createDefaultProgram:t.DEPRECATED__createDefaultProgram===!0,debugLevel:t.debugLevel===!0?new Set(["typescript-eslint"]):Array.isArray(t.debugLevel)?new Set(t.debugLevel):new Set,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:t.errorOnUnknownASTType===!0,EXPERIMENTAL_projectService:t.EXPERIMENTAL_useProjectService===!0?w9??(w9=(0,qW.createProjectService)()):void 0,EXPERIMENTAL_useSourceOfProjectReferenceRedirect:t.EXPERIMENTAL_useSourceOfProjectReferenceRedirect===!0,extraFileExtensions:Array.isArray(t.extraFileExtensions)&&t.extraFileExtensions.every(h=>typeof h=="string")?t.extraFileExtensions:[],filePath:(0,zW.ensureAbsolutePath)(typeof t.filePath=="string"&&t.filePath!==""?t.filePath:KW(t.jsx),_),jsx:t.jsx===!0,loc:t.loc===!0,log:typeof t.loggerFn=="function"?t.loggerFn:t.loggerFn===!1?()=>{}:console.log,preserveNodeMaps:t.preserveNodeMaps!==!1,programs:Array.isArray(t.programs)?t.programs:null,projects:[],range:t.range===!0,singleRun:a,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings??!0,tokens:t.tokens===!0?[]:null,tsconfigMatchCache:$m??($m=new x9.ExpiringCache(a?"Infinity":((d=t.cacheLifetime)==null?void 0:d.glob)??x9.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS)),tsconfigRootDir:_};if(p.debugLevel.size>0){let h=[];p.debugLevel.has("typescript-eslint")&&h.push("typescript-eslint:*"),(p.debugLevel.has("eslint")||vb.default.enabled("eslint:*,-eslint:code-path"))&&h.push("eslint:*,-eslint:code-path"),vb.default.enable(h.join(","))}if(Array.isArray(t.programs)){if(!t.programs.length)throw new Error("You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.");GW("parserOptions.programs was provided, so parserOptions.project will be ignored.")}return!p.programs&&!p.EXPERIMENTAL_projectService&&(p.projects=[]),(0,HW.warnAboutTSVersion)(p),p}ta.createParseSettings=XW;function $W(){$m==null||$m.clear()}ta.clearTSConfigMatchCache=$W;function QW(){w9=null}ta.clearTSServerProjectService=QW;function YW(e){return(0,WW.isSourceFile)(e)?e.getFullText(e):typeof e=="string"?e:String(e)}function KW(e){return e?"estree.tsx":"estree.ts"}});var D9=ut(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});Qm.getFirstSemanticOrSyntacticError=void 0;var E9=Dt();function ZW(e,t){try{let r=A9(e.getSyntacticDiagnostics(t));if(r.length>0)return k9(r[0]);let a=A9(e.getSemanticDiagnostics(t));return a.length>0?k9(a[0]):void 0}catch(r){console.warn(`Warning From TSC: "${r.message}`);return}}Qm.getFirstSemanticOrSyntacticError=ZW;function A9(e){return e.filter(t=>{switch(t.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 k9(e){return{...e,message:(0,E9.flattenDiagnosticMessageText)(e.messageText,E9.sys.newLine)}}});var P9=ut(()=>{});var J9=ut(_i=>{"use strict";var eV=_i&&_i.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_i,"__esModule",{value:!0});_i.clearParseAndGenerateServicesCalls=_i.clearProgramCache=_i.parseAndGenerateServices=_i.parse=void 0;var tV=eV((Cf(),Hh(wf))),I9=o9(),rV=Z6(),nV={},N9={},iV={},O9=u9(),aV=p9(),M9={},oV=f9(),L9=C9(),sV=D9(),_V=P9(),cV=(0,tV.default)("typescript-eslint:typescript-estree:parser"),Tb=new Map;function lV(){Tb.clear()}_i.clearProgramCache=lV;function uV(e,t){if(e.EXPERIMENTAL_projectService){let a=(0,_V.useProgramFromProjectService)(e.EXPERIMENTAL_projectService,e);if(a)return a}if(e.programs){let a=(0,M9.useProvidedPrograms)(e.programs,e);if(a)return a}if(!t)return(0,O9.createNoProgram)(e);let r=(0,iV.createProjectProgram)(e,(0,aV.getWatchProgramsForProjects)(e));if(r)return r;if(e.DEPRECATED__createDefaultProgram){let a=(0,nV.createDefaultProgram)(e);if(a)return a}return(0,N9.createIsolatedProgram)(e)}function pV(e,t){let{ast:r}=fV(e,t,!1);return r}_i.parse=pV;function fV(e,t,r){let a=(0,L9.createParseSettings)(e,t);if(t!=null&&t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');let _=(0,O9.createSourceFile)(a),{estree:p,astMaps:d}=(0,I9.astConverter)(_,a,r);return{ast:p,esTreeNodeToTSNodeMap:d.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:d.tsNodeToESTreeNodeMap}}var Ym={};function dV(){Ym={}}_i.clearParseAndGenerateServicesCalls=dV;function mV(e,t){var v,y;let r=(0,L9.createParseSettings)(e,t);r.singleRun&&!r.programs&&((v=r.projects)==null?void 0:v.length)>0&&(r.programs={*[Symbol.iterator](){for(let C of r.projects){let S=Tb.get(C);if(S)yield S;else{cV("Detected single-run/CLI usage, creating Program once ahead of time for project: %s",C);let k=(0,M9.createProgramFromConfigFile)(C);Tb.set(C,k),yield k}}}});let a=r.programs!=null||((y=r.projects)==null?void 0:y.length)>0;if(t!==void 0&&(typeof t.errorOnTypeScriptSyntacticAndSemanticIssues=="boolean"&&t.errorOnTypeScriptSyntacticAndSemanticIssues&&(r.errorOnTypeScriptSyntacticAndSemanticIssues=!0),r.errorOnTypeScriptSyntacticAndSemanticIssues&&!a))throw new Error("Cannot calculate TypeScript semantic issues without a valid project.");r.singleRun&&t.filePath&&(Ym[t.filePath]=(Ym[t.filePath]||0)+1);let{ast:_,program:p}=r.singleRun&&t.filePath&&Ym[t.filePath]>1?(0,N9.createIsolatedProgram)(r):uV(r,a),d=typeof r.preserveNodeMaps=="boolean"?r.preserveNodeMaps:!0,{estree:h,astMaps:l}=(0,I9.astConverter)(_,r,d);if(p&&r.errorOnTypeScriptSyntacticAndSemanticIssues){let C=(0,sV.getFirstSemanticOrSyntacticError)(p,_);if(C)throw(0,rV.convertError)(C)}return{ast:h,services:(0,oV.createParserServices)(l,p)}}_i.parseAndGenerateServices=mV});var V9=ut(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});ps.extract=xV;ps.parse=CV;ps.parseWithComments=W9;ps.print=EV;ps.strip=wV;var gV=/\*\/$/,bV=/^\/\*\*?/,q9=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,vV=/(^|\s+)\/\/([^\r\n]*)/g,F9=/^(\r?\n)+/,TV=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,B9=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,SV=/(\r?\n|^) *\* ?/g,z9=[];function xV(e){let t=e.match(q9);return t?t[0].trimLeft():""}function wV(e){let t=e.match(q9);return t&&t[0]?e.substring(t[0].length):e}function CV(e){return W9(e).pragmas}function W9(e){let t=` -`;e=e.replace(bV,"").replace(gV,"").replace(SV,"$1");let r="";for(;r!==e;)r=e,e=e.replace(TV,`${t}$1 $2${t}`);e=e.replace(F9,"").trimRight();let a=Object.create(null),_=e.replace(B9,"").replace(F9,"").trimRight(),p;for(;p=B9.exec(e);){let d=p[2].replace(vV,"");typeof a[p[1]]=="string"||Array.isArray(a[p[1]])?a[p[1]]=z9.concat(a[p[1]],d):a[p[1]]=d}return{comments:_,pragmas:a}}function EV({comments:e="",pragmas:t={}}){let r=` -`,a="/**",_=" *",p=" */",d=Object.keys(t),h=d.flatMap(v=>U9(v,t[v])).map(v=>`${_} ${v}${r}`).join("");if(!e){if(d.length===0)return"";if(d.length===1&&!Array.isArray(t[d[0]])){let v=t[d[0]];return`${a} ${U9(d[0],v)[0]}${p}`}}let l=e.split(r).map(v=>`${_} ${v}`).join(r)+r;return a+r+(e?l:"")+(e&&d.length?_+r:"")+h+p}function U9(e,t){return z9.concat(t).map(r=>`@${e} ${r}`.trim())}});var Db={};Vh(Db,{parsers:()=>kb});var kb={};Vh(kb,{typescript:()=>HV});var n5=Mb(J9(),1);function hV(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var R9=hV;function yV(e){let t=[];for(let r of e)try{return r()}catch(a){t.push(a)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var j9=yV;var H_=Mb(V9(),1);function AV(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` -`);return t===-1?e:e.slice(0,t)}var H9=AV;function kV(e){let t=H9(e);t&&(e=e.slice(t.length+1));let r=(0,H_.extract)(e),{pragmas:a,comments:_}=(0,H_.parseWithComments)(r);return{shebang:t,text:e,pragmas:a,comments:_}}function G9(e){let{pragmas:t}=kV(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function DV(e){return Array.isArray(e)&&e.length>0}var Km=DV;function Fn(e){var a;let t=e.range?e.range[0]:e.start,r=((a=e.declaration)==null?void 0:a.decorators)??e.decorators;return Km(r)?Math.min(Fn(r[0]),t):t}function ra(e){return e.range?e.range[1]:e.end}function PV(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:G9,locStart:Fn,locEnd:ra,...e}}var X9=PV;function IV(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var $9=IV;var NV=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Sb=NV;function OV(e){return e=new Set(e),t=>e.has(t==null?void 0:t.type)}var Q9=OV;var MV=Q9(["Block","CommentBlock","MultiLine"]),gu=MV;function LV(e){return gu(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var Y9=LV;function JV(e){let t=`*${e.value}*`.split(` -`);return t.length>1&&t.every(r=>r.trimStart()[0]==="*")}var xb=JV;var bu=null;function vu(e){if(bu!==null&&typeof bu.property){let t=bu;return bu=vu.prototype=null,t}return bu=vu.prototype=e??Object.create(null),new vu}var RV=10;for(let e=0;e<=RV;e++)vu();function wb(e){return vu(e)}function jV(e,t="type"){wb(e);function r(a){let _=a[t],p=e[_];if(!Array.isArray(p))throw Object.assign(new Error(`Missing visitor keys for '${_}'.`),{node:a});return p}return r}var K9=jV;var Z9={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var FV=K9(Z9),e5=FV;function Cb(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let a=0;a{var h;(h=d.leadingComments)!=null&&h.some(Y9)&&p.add(Fn(d))}),e=Zm(e,d=>{if(d.type==="ParenthesizedExpression"){let{expression:h}=d;if(h.type==="TypeCastExpression")return h.range=d.range,h;let l=Fn(d);if(!p.has(l))return h.extra={...h.extra,parenthesized:!0},h}})}if(e=Zm(e,p=>{switch(p.type){case"LogicalExpression":if(t5(p))return Eb(p);break;case"VariableDeclaration":{let d=Sb(!1,p.declarations,-1);d!=null&&d.init&&_(p,d);break}case"TSParenthesizedType":return p.typeAnnotation;case"TSTypeParameter":if(typeof p.name=="string"){let d=Fn(p);p.name={type:"Identifier",name:p.name,range:[d,d+p.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:d}=p;if(r==="meriyah"&&(d==null?void 0:d.type)==="Identifier"){let h=a.slice(Fn(d),ra(d));(h.startsWith('"')||h.startsWith("'"))&&(p.exported={...p.exported,type:"Literal",value:p.exported.name,raw:h})}break}case"TSUnionType":case"TSIntersectionType":if(p.types.length===1)return p.types[0];break}}),Km(e.comments)){let p=Sb(!1,e.comments,-1);for(let d=e.comments.length-2;d>=0;d--){let h=e.comments[d];ra(h)===Fn(p)&&gu(h)&&gu(p)&&xb(h)&&xb(p)&&(e.comments.splice(d+1,1),h.value+="*//*"+p.value,h.range=[Fn(h),ra(p)]),p=h}}return e.type==="Program"&&(e.range=[0,a.length]),e;function _(p,d){a[ra(d)]!==";"&&(p.range=[Fn(p),ra(d)])}}function t5(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function Eb(e){return t5(e)?Eb({type:"LogicalExpression",operator:e.operator,left:Eb({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[Fn(e.left),ra(e.right.left)]}),right:e.right.right,range:[Fn(e),ra(e)]}):e}var r5=BV;var Ab={loc:!0,range:!0,comment:!0,tokens:!0,loggerFn:!1,project:[],suppressDeprecatedPropertyWarnings:!0};function UV(e){let{message:t,location:r}=e;if(!r)return e;let{start:a,end:_}=r;return R9(t,{loc:{start:{line:a.line,column:a.column+1},end:{line:_.line,column:_.column+1}},cause:e})}var qV=e=>/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/i.test(e);function zV(e,t){let r=t==null?void 0:t.filepath;if(r&&qV(r))return[{...Ab,filePath:r}];let a=VV(e);return[{...Ab,jsx:a},{...Ab,jsx:!a}]}function WV(e,t){let r=$9(e),a=zV(e,t),_;try{_=j9(a.map(p=>()=>(0,n5.parse)(r,p)))}catch({errors:[p]}){throw UV(p)}return r5(_,{text:e})}function VV(e){return new RegExp(["(?:^[^\"'`]*)"].join(""),"m").test(e)}var HV=X9(WV);var UG=Db;export{UG as default,kb as parsers}; +`;function ue(be,ge){X[be]+=ge}}function Fn(w){switch(w){case 3:return"\u2502";case 12:return"\u2500";case 5:return"\u256F";case 9:return"\u2570";case 6:return"\u256E";case 10:return"\u256D";case 7:return"\u2524";case 11:return"\u251C";case 13:return"\u2534";case 14:return"\u252C";case 15:return"\u256B"}return" "}function R(w,f){if(w.fill)w.fill(f);else for(let X=0;X0?w.repeat(f):"";let X="";for(;X.length{},OE=()=>{},ME=()=>{},ga=Date.now,LE=()=>{},Zf=new Proxy(()=>{},{get:()=>Zf});function k6(e){if(bg){let t=uy.get(e)??0;uy.set(e,t+1),td.set(e,ga()),ed==null||ed.mark(e),typeof onProfilerEvent=="function"&&onProfilerEvent(e)}}function JE(e,t,n){if(bg){let a=(n!==void 0?td.get(n):void 0)??ga(),_=(t!==void 0?td.get(t):void 0)??Uv,p=py.get(e)||0;py.set(e,p+(a-_)),ed==null||ed.measure(e,t,n)}}var ed,RE,bg,Uv,td,uy,py,Pz=It({"src/compiler/performance.ts"(){"use strict";En(),RE={enter:gr,exit:gr},bg=!1,Uv=ga(),td=new Map,uy=new Map,py=new Map}}),qv=()=>{},jE=()=>{},ba;function FE(e,t=!0){let n=ud[e.category];return t?n.toLowerCase():n}var nd,rd,id,fy,ad,dy,my,Tl,hy,od,yy,gy,by,vy,Ty,Sy,xy,wy,Ey,Cy,Ay,ky,Dy,Py,Iy,sd,Ny,Oy,My,Ly,_d,cd,Jy,Ry,jy,Fy,By,Uy,ld,qy,zy,Wy,Vy,Hy,Gy,ud,Xy,$y,Qy,Yy,Ky,Zy,e0,t0,n0,pd,r0,i0,a0,o0,s0,fd,dd,md,_0,c0,l0,u0,p0,f0,d0,m0,Wd,h0,zv=It({"src/compiler/types.ts"(){"use strict";nd=(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.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKeyword",e[e.ForKeyword=99]="ForKeyword",e[e.FunctionKeyword=100]="FunctionKeyword",e[e.IfKeyword=101]="IfKeyword",e[e.ImportKeyword=102]="ImportKeyword",e[e.InKeyword=103]="InKeyword",e[e.InstanceOfKeyword=104]="InstanceOfKeyword",e[e.NewKeyword=105]="NewKeyword",e[e.NullKeyword=106]="NullKeyword",e[e.ReturnKeyword=107]="ReturnKeyword",e[e.SuperKeyword=108]="SuperKeyword",e[e.SwitchKeyword=109]="SwitchKeyword",e[e.ThisKeyword=110]="ThisKeyword",e[e.ThrowKeyword=111]="ThrowKeyword",e[e.TrueKeyword=112]="TrueKeyword",e[e.TryKeyword=113]="TryKeyword",e[e.TypeOfKeyword=114]="TypeOfKeyword",e[e.VarKeyword=115]="VarKeyword",e[e.VoidKeyword=116]="VoidKeyword",e[e.WhileKeyword=117]="WhileKeyword",e[e.WithKeyword=118]="WithKeyword",e[e.ImplementsKeyword=119]="ImplementsKeyword",e[e.InterfaceKeyword=120]="InterfaceKeyword",e[e.LetKeyword=121]="LetKeyword",e[e.PackageKeyword=122]="PackageKeyword",e[e.PrivateKeyword=123]="PrivateKeyword",e[e.ProtectedKeyword=124]="ProtectedKeyword",e[e.PublicKeyword=125]="PublicKeyword",e[e.StaticKeyword=126]="StaticKeyword",e[e.YieldKeyword=127]="YieldKeyword",e[e.AbstractKeyword=128]="AbstractKeyword",e[e.AccessorKeyword=129]="AccessorKeyword",e[e.AsKeyword=130]="AsKeyword",e[e.AssertsKeyword=131]="AssertsKeyword",e[e.AssertKeyword=132]="AssertKeyword",e[e.AnyKeyword=133]="AnyKeyword",e[e.AsyncKeyword=134]="AsyncKeyword",e[e.AwaitKeyword=135]="AwaitKeyword",e[e.BooleanKeyword=136]="BooleanKeyword",e[e.ConstructorKeyword=137]="ConstructorKeyword",e[e.DeclareKeyword=138]="DeclareKeyword",e[e.GetKeyword=139]="GetKeyword",e[e.InferKeyword=140]="InferKeyword",e[e.IntrinsicKeyword=141]="IntrinsicKeyword",e[e.IsKeyword=142]="IsKeyword",e[e.KeyOfKeyword=143]="KeyOfKeyword",e[e.ModuleKeyword=144]="ModuleKeyword",e[e.NamespaceKeyword=145]="NamespaceKeyword",e[e.NeverKeyword=146]="NeverKeyword",e[e.OutKeyword=147]="OutKeyword",e[e.ReadonlyKeyword=148]="ReadonlyKeyword",e[e.RequireKeyword=149]="RequireKeyword",e[e.NumberKeyword=150]="NumberKeyword",e[e.ObjectKeyword=151]="ObjectKeyword",e[e.SatisfiesKeyword=152]="SatisfiesKeyword",e[e.SetKeyword=153]="SetKeyword",e[e.StringKeyword=154]="StringKeyword",e[e.SymbolKeyword=155]="SymbolKeyword",e[e.TypeKeyword=156]="TypeKeyword",e[e.UndefinedKeyword=157]="UndefinedKeyword",e[e.UniqueKeyword=158]="UniqueKeyword",e[e.UnknownKeyword=159]="UnknownKeyword",e[e.UsingKeyword=160]="UsingKeyword",e[e.FromKeyword=161]="FromKeyword",e[e.GlobalKeyword=162]="GlobalKeyword",e[e.BigIntKeyword=163]="BigIntKeyword",e[e.OverrideKeyword=164]="OverrideKeyword",e[e.OfKeyword=165]="OfKeyword",e[e.QualifiedName=166]="QualifiedName",e[e.ComputedPropertyName=167]="ComputedPropertyName",e[e.TypeParameter=168]="TypeParameter",e[e.Parameter=169]="Parameter",e[e.Decorator=170]="Decorator",e[e.PropertySignature=171]="PropertySignature",e[e.PropertyDeclaration=172]="PropertyDeclaration",e[e.MethodSignature=173]="MethodSignature",e[e.MethodDeclaration=174]="MethodDeclaration",e[e.ClassStaticBlockDeclaration=175]="ClassStaticBlockDeclaration",e[e.Constructor=176]="Constructor",e[e.GetAccessor=177]="GetAccessor",e[e.SetAccessor=178]="SetAccessor",e[e.CallSignature=179]="CallSignature",e[e.ConstructSignature=180]="ConstructSignature",e[e.IndexSignature=181]="IndexSignature",e[e.TypePredicate=182]="TypePredicate",e[e.TypeReference=183]="TypeReference",e[e.FunctionType=184]="FunctionType",e[e.ConstructorType=185]="ConstructorType",e[e.TypeQuery=186]="TypeQuery",e[e.TypeLiteral=187]="TypeLiteral",e[e.ArrayType=188]="ArrayType",e[e.TupleType=189]="TupleType",e[e.OptionalType=190]="OptionalType",e[e.RestType=191]="RestType",e[e.UnionType=192]="UnionType",e[e.IntersectionType=193]="IntersectionType",e[e.ConditionalType=194]="ConditionalType",e[e.InferType=195]="InferType",e[e.ParenthesizedType=196]="ParenthesizedType",e[e.ThisType=197]="ThisType",e[e.TypeOperator=198]="TypeOperator",e[e.IndexedAccessType=199]="IndexedAccessType",e[e.MappedType=200]="MappedType",e[e.LiteralType=201]="LiteralType",e[e.NamedTupleMember=202]="NamedTupleMember",e[e.TemplateLiteralType=203]="TemplateLiteralType",e[e.TemplateLiteralTypeSpan=204]="TemplateLiteralTypeSpan",e[e.ImportType=205]="ImportType",e[e.ObjectBindingPattern=206]="ObjectBindingPattern",e[e.ArrayBindingPattern=207]="ArrayBindingPattern",e[e.BindingElement=208]="BindingElement",e[e.ArrayLiteralExpression=209]="ArrayLiteralExpression",e[e.ObjectLiteralExpression=210]="ObjectLiteralExpression",e[e.PropertyAccessExpression=211]="PropertyAccessExpression",e[e.ElementAccessExpression=212]="ElementAccessExpression",e[e.CallExpression=213]="CallExpression",e[e.NewExpression=214]="NewExpression",e[e.TaggedTemplateExpression=215]="TaggedTemplateExpression",e[e.TypeAssertionExpression=216]="TypeAssertionExpression",e[e.ParenthesizedExpression=217]="ParenthesizedExpression",e[e.FunctionExpression=218]="FunctionExpression",e[e.ArrowFunction=219]="ArrowFunction",e[e.DeleteExpression=220]="DeleteExpression",e[e.TypeOfExpression=221]="TypeOfExpression",e[e.VoidExpression=222]="VoidExpression",e[e.AwaitExpression=223]="AwaitExpression",e[e.PrefixUnaryExpression=224]="PrefixUnaryExpression",e[e.PostfixUnaryExpression=225]="PostfixUnaryExpression",e[e.BinaryExpression=226]="BinaryExpression",e[e.ConditionalExpression=227]="ConditionalExpression",e[e.TemplateExpression=228]="TemplateExpression",e[e.YieldExpression=229]="YieldExpression",e[e.SpreadElement=230]="SpreadElement",e[e.ClassExpression=231]="ClassExpression",e[e.OmittedExpression=232]="OmittedExpression",e[e.ExpressionWithTypeArguments=233]="ExpressionWithTypeArguments",e[e.AsExpression=234]="AsExpression",e[e.NonNullExpression=235]="NonNullExpression",e[e.MetaProperty=236]="MetaProperty",e[e.SyntheticExpression=237]="SyntheticExpression",e[e.SatisfiesExpression=238]="SatisfiesExpression",e[e.TemplateSpan=239]="TemplateSpan",e[e.SemicolonClassElement=240]="SemicolonClassElement",e[e.Block=241]="Block",e[e.EmptyStatement=242]="EmptyStatement",e[e.VariableStatement=243]="VariableStatement",e[e.ExpressionStatement=244]="ExpressionStatement",e[e.IfStatement=245]="IfStatement",e[e.DoStatement=246]="DoStatement",e[e.WhileStatement=247]="WhileStatement",e[e.ForStatement=248]="ForStatement",e[e.ForInStatement=249]="ForInStatement",e[e.ForOfStatement=250]="ForOfStatement",e[e.ContinueStatement=251]="ContinueStatement",e[e.BreakStatement=252]="BreakStatement",e[e.ReturnStatement=253]="ReturnStatement",e[e.WithStatement=254]="WithStatement",e[e.SwitchStatement=255]="SwitchStatement",e[e.LabeledStatement=256]="LabeledStatement",e[e.ThrowStatement=257]="ThrowStatement",e[e.TryStatement=258]="TryStatement",e[e.DebuggerStatement=259]="DebuggerStatement",e[e.VariableDeclaration=260]="VariableDeclaration",e[e.VariableDeclarationList=261]="VariableDeclarationList",e[e.FunctionDeclaration=262]="FunctionDeclaration",e[e.ClassDeclaration=263]="ClassDeclaration",e[e.InterfaceDeclaration=264]="InterfaceDeclaration",e[e.TypeAliasDeclaration=265]="TypeAliasDeclaration",e[e.EnumDeclaration=266]="EnumDeclaration",e[e.ModuleDeclaration=267]="ModuleDeclaration",e[e.ModuleBlock=268]="ModuleBlock",e[e.CaseBlock=269]="CaseBlock",e[e.NamespaceExportDeclaration=270]="NamespaceExportDeclaration",e[e.ImportEqualsDeclaration=271]="ImportEqualsDeclaration",e[e.ImportDeclaration=272]="ImportDeclaration",e[e.ImportClause=273]="ImportClause",e[e.NamespaceImport=274]="NamespaceImport",e[e.NamedImports=275]="NamedImports",e[e.ImportSpecifier=276]="ImportSpecifier",e[e.ExportAssignment=277]="ExportAssignment",e[e.ExportDeclaration=278]="ExportDeclaration",e[e.NamedExports=279]="NamedExports",e[e.NamespaceExport=280]="NamespaceExport",e[e.ExportSpecifier=281]="ExportSpecifier",e[e.MissingDeclaration=282]="MissingDeclaration",e[e.ExternalModuleReference=283]="ExternalModuleReference",e[e.JsxElement=284]="JsxElement",e[e.JsxSelfClosingElement=285]="JsxSelfClosingElement",e[e.JsxOpeningElement=286]="JsxOpeningElement",e[e.JsxClosingElement=287]="JsxClosingElement",e[e.JsxFragment=288]="JsxFragment",e[e.JsxOpeningFragment=289]="JsxOpeningFragment",e[e.JsxClosingFragment=290]="JsxClosingFragment",e[e.JsxAttribute=291]="JsxAttribute",e[e.JsxAttributes=292]="JsxAttributes",e[e.JsxSpreadAttribute=293]="JsxSpreadAttribute",e[e.JsxExpression=294]="JsxExpression",e[e.JsxNamespacedName=295]="JsxNamespacedName",e[e.CaseClause=296]="CaseClause",e[e.DefaultClause=297]="DefaultClause",e[e.HeritageClause=298]="HeritageClause",e[e.CatchClause=299]="CatchClause",e[e.ImportAttributes=300]="ImportAttributes",e[e.ImportAttribute=301]="ImportAttribute",e[e.AssertClause=300]="AssertClause",e[e.AssertEntry=301]="AssertEntry",e[e.ImportTypeAssertionContainer=302]="ImportTypeAssertionContainer",e[e.PropertyAssignment=303]="PropertyAssignment",e[e.ShorthandPropertyAssignment=304]="ShorthandPropertyAssignment",e[e.SpreadAssignment=305]="SpreadAssignment",e[e.EnumMember=306]="EnumMember",e[e.UnparsedPrologue=307]="UnparsedPrologue",e[e.UnparsedPrepend=308]="UnparsedPrepend",e[e.UnparsedText=309]="UnparsedText",e[e.UnparsedInternalText=310]="UnparsedInternalText",e[e.UnparsedSyntheticReference=311]="UnparsedSyntheticReference",e[e.SourceFile=312]="SourceFile",e[e.Bundle=313]="Bundle",e[e.UnparsedSource=314]="UnparsedSource",e[e.InputFiles=315]="InputFiles",e[e.JSDocTypeExpression=316]="JSDocTypeExpression",e[e.JSDocNameReference=317]="JSDocNameReference",e[e.JSDocMemberName=318]="JSDocMemberName",e[e.JSDocAllType=319]="JSDocAllType",e[e.JSDocUnknownType=320]="JSDocUnknownType",e[e.JSDocNullableType=321]="JSDocNullableType",e[e.JSDocNonNullableType=322]="JSDocNonNullableType",e[e.JSDocOptionalType=323]="JSDocOptionalType",e[e.JSDocFunctionType=324]="JSDocFunctionType",e[e.JSDocVariadicType=325]="JSDocVariadicType",e[e.JSDocNamepathType=326]="JSDocNamepathType",e[e.JSDoc=327]="JSDoc",e[e.JSDocComment=327]="JSDocComment",e[e.JSDocText=328]="JSDocText",e[e.JSDocTypeLiteral=329]="JSDocTypeLiteral",e[e.JSDocSignature=330]="JSDocSignature",e[e.JSDocLink=331]="JSDocLink",e[e.JSDocLinkCode=332]="JSDocLinkCode",e[e.JSDocLinkPlain=333]="JSDocLinkPlain",e[e.JSDocTag=334]="JSDocTag",e[e.JSDocAugmentsTag=335]="JSDocAugmentsTag",e[e.JSDocImplementsTag=336]="JSDocImplementsTag",e[e.JSDocAuthorTag=337]="JSDocAuthorTag",e[e.JSDocDeprecatedTag=338]="JSDocDeprecatedTag",e[e.JSDocClassTag=339]="JSDocClassTag",e[e.JSDocPublicTag=340]="JSDocPublicTag",e[e.JSDocPrivateTag=341]="JSDocPrivateTag",e[e.JSDocProtectedTag=342]="JSDocProtectedTag",e[e.JSDocReadonlyTag=343]="JSDocReadonlyTag",e[e.JSDocOverrideTag=344]="JSDocOverrideTag",e[e.JSDocCallbackTag=345]="JSDocCallbackTag",e[e.JSDocOverloadTag=346]="JSDocOverloadTag",e[e.JSDocEnumTag=347]="JSDocEnumTag",e[e.JSDocParameterTag=348]="JSDocParameterTag",e[e.JSDocReturnTag=349]="JSDocReturnTag",e[e.JSDocThisTag=350]="JSDocThisTag",e[e.JSDocTypeTag=351]="JSDocTypeTag",e[e.JSDocTemplateTag=352]="JSDocTemplateTag",e[e.JSDocTypedefTag=353]="JSDocTypedefTag",e[e.JSDocSeeTag=354]="JSDocSeeTag",e[e.JSDocPropertyTag=355]="JSDocPropertyTag",e[e.JSDocThrowsTag=356]="JSDocThrowsTag",e[e.JSDocSatisfiesTag=357]="JSDocSatisfiesTag",e[e.SyntaxList=358]="SyntaxList",e[e.NotEmittedStatement=359]="NotEmittedStatement",e[e.PartiallyEmittedExpression=360]="PartiallyEmittedExpression",e[e.CommaListExpression=361]="CommaListExpression",e[e.SyntheticReferenceExpression=362]="SyntheticReferenceExpression",e[e.Count=363]="Count",e[e.FirstAssignment=64]="FirstAssignment",e[e.LastAssignment=79]="LastAssignment",e[e.FirstCompoundAssignment=65]="FirstCompoundAssignment",e[e.LastCompoundAssignment=79]="LastCompoundAssignment",e[e.FirstReservedWord=83]="FirstReservedWord",e[e.LastReservedWord=118]="LastReservedWord",e[e.FirstKeyword=83]="FirstKeyword",e[e.LastKeyword=165]="LastKeyword",e[e.FirstFutureReservedWord=119]="FirstFutureReservedWord",e[e.LastFutureReservedWord=127]="LastFutureReservedWord",e[e.FirstTypeNode=182]="FirstTypeNode",e[e.LastTypeNode=205]="LastTypeNode",e[e.FirstPunctuation=19]="FirstPunctuation",e[e.LastPunctuation=79]="LastPunctuation",e[e.FirstToken=0]="FirstToken",e[e.LastToken=165]="LastToken",e[e.FirstTriviaToken=2]="FirstTriviaToken",e[e.LastTriviaToken=7]="LastTriviaToken",e[e.FirstLiteralToken=9]="FirstLiteralToken",e[e.LastLiteralToken=15]="LastLiteralToken",e[e.FirstTemplateToken=15]="FirstTemplateToken",e[e.LastTemplateToken=18]="LastTemplateToken",e[e.FirstBinaryOperator=30]="FirstBinaryOperator",e[e.LastBinaryOperator=79]="LastBinaryOperator",e[e.FirstStatement=243]="FirstStatement",e[e.LastStatement=259]="LastStatement",e[e.FirstNode=166]="FirstNode",e[e.FirstJSDocNode=316]="FirstJSDocNode",e[e.LastJSDocNode=357]="LastJSDocNode",e[e.FirstJSDocTagNode=334]="FirstJSDocTagNode",e[e.LastJSDocTagNode=357]="LastJSDocTagNode",e[e.FirstContextualKeyword=128]="FirstContextualKeyword",e[e.LastContextualKeyword=165]="LastContextualKeyword",e))(nd||{}),rd=(e=>(e[e.None=0]="None",e[e.Let=1]="Let",e[e.Const=2]="Const",e[e.Using=4]="Using",e[e.AwaitUsing=6]="AwaitUsing",e[e.NestedNamespace=8]="NestedNamespace",e[e.Synthesized=16]="Synthesized",e[e.Namespace=32]="Namespace",e[e.OptionalChain=64]="OptionalChain",e[e.ExportContext=128]="ExportContext",e[e.ContainsThis=256]="ContainsThis",e[e.HasImplicitReturn=512]="HasImplicitReturn",e[e.HasExplicitReturn=1024]="HasExplicitReturn",e[e.GlobalAugmentation=2048]="GlobalAugmentation",e[e.HasAsyncFunctions=4096]="HasAsyncFunctions",e[e.DisallowInContext=8192]="DisallowInContext",e[e.YieldContext=16384]="YieldContext",e[e.DecoratorContext=32768]="DecoratorContext",e[e.AwaitContext=65536]="AwaitContext",e[e.DisallowConditionalTypesContext=131072]="DisallowConditionalTypesContext",e[e.ThisNodeHasError=262144]="ThisNodeHasError",e[e.JavaScriptFile=524288]="JavaScriptFile",e[e.ThisNodeOrAnySubNodesHasError=1048576]="ThisNodeOrAnySubNodesHasError",e[e.HasAggregatedChildData=2097152]="HasAggregatedChildData",e[e.PossiblyContainsDynamicImport=4194304]="PossiblyContainsDynamicImport",e[e.PossiblyContainsImportMeta=8388608]="PossiblyContainsImportMeta",e[e.JSDoc=16777216]="JSDoc",e[e.Ambient=33554432]="Ambient",e[e.InWithStatement=67108864]="InWithStatement",e[e.JsonFile=134217728]="JsonFile",e[e.TypeCached=268435456]="TypeCached",e[e.Deprecated=536870912]="Deprecated",e[e.BlockScoped=7]="BlockScoped",e[e.Constant=6]="Constant",e[e.ReachabilityCheckFlags=1536]="ReachabilityCheckFlags",e[e.ReachabilityAndEmitFlags=5632]="ReachabilityAndEmitFlags",e[e.ContextFlags=101441536]="ContextFlags",e[e.TypeExcludesFlags=81920]="TypeExcludesFlags",e[e.PermanentlySetIncrementalFlags=12582912]="PermanentlySetIncrementalFlags",e[e.IdentifierHasExtendedUnicodeEscape=256]="IdentifierHasExtendedUnicodeEscape",e[e.IdentifierIsInJSDocNamespace=4096]="IdentifierIsInJSDocNamespace",e))(rd||{}),id=(e=>(e[e.None=0]="None",e[e.Public=1]="Public",e[e.Private=2]="Private",e[e.Protected=4]="Protected",e[e.Readonly=8]="Readonly",e[e.Override=16]="Override",e[e.Export=32]="Export",e[e.Abstract=64]="Abstract",e[e.Ambient=128]="Ambient",e[e.Static=256]="Static",e[e.Accessor=512]="Accessor",e[e.Async=1024]="Async",e[e.Default=2048]="Default",e[e.Const=4096]="Const",e[e.In=8192]="In",e[e.Out=16384]="Out",e[e.Decorator=32768]="Decorator",e[e.Deprecated=65536]="Deprecated",e[e.JSDocPublic=8388608]="JSDocPublic",e[e.JSDocPrivate=16777216]="JSDocPrivate",e[e.JSDocProtected=33554432]="JSDocProtected",e[e.JSDocReadonly=67108864]="JSDocReadonly",e[e.JSDocOverride=134217728]="JSDocOverride",e[e.SyntacticOrJSDocModifiers=31]="SyntacticOrJSDocModifiers",e[e.SyntacticOnlyModifiers=65504]="SyntacticOnlyModifiers",e[e.SyntacticModifiers=65535]="SyntacticModifiers",e[e.JSDocCacheOnlyModifiers=260046848]="JSDocCacheOnlyModifiers",e[e.JSDocOnlyModifiers=65536]="JSDocOnlyModifiers",e[e.NonCacheOnlyModifiers=131071]="NonCacheOnlyModifiers",e[e.HasComputedJSDocModifiers=268435456]="HasComputedJSDocModifiers",e[e.HasComputedFlags=536870912]="HasComputedFlags",e[e.AccessibilityModifier=7]="AccessibilityModifier",e[e.ParameterPropertyModifier=31]="ParameterPropertyModifier",e[e.NonPublicAccessibilityModifier=6]="NonPublicAccessibilityModifier",e[e.TypeScriptModifier=28895]="TypeScriptModifier",e[e.ExportDefault=2080]="ExportDefault",e[e.All=131071]="All",e[e.Modifier=98303]="Modifier",e))(id||{}),fy=(e=>(e[e.None=0]="None",e[e.IntrinsicNamedElement=1]="IntrinsicNamedElement",e[e.IntrinsicIndexedElement=2]="IntrinsicIndexedElement",e[e.IntrinsicElement=3]="IntrinsicElement",e))(fy||{}),ad=(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))(ad||{}),dy=(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))(dy||{}),my=(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.HexEscape=4096]="HexEscape",e[e.ContainsLeadingZero=8192]="ContainsLeadingZero",e[e.ContainsInvalidSeparator=16384]="ContainsInvalidSeparator",e[e.BinaryOrOctalSpecifier=384]="BinaryOrOctalSpecifier",e[e.WithSpecifier=448]="WithSpecifier",e[e.StringLiteralFlags=7176]="StringLiteralFlags",e[e.NumericLiteralFlags=25584]="NumericLiteralFlags",e[e.TemplateLiteralLikeFlags=7176]="TemplateLiteralLikeFlags",e[e.IsInvalid=26656]="IsInvalid",e))(my||{}),Tl=(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))(Tl||{}),hy=(e=>(e[e.ExpectError=0]="ExpectError",e[e.Ignore=1]="Ignore",e))(hy||{}),od=class{},yy=(e=>(e[e.RootFile=0]="RootFile",e[e.SourceFromProjectReference=1]="SourceFromProjectReference",e[e.OutputFromProjectReference=2]="OutputFromProjectReference",e[e.Import=3]="Import",e[e.ReferenceFile=4]="ReferenceFile",e[e.TypeReferenceDirective=5]="TypeReferenceDirective",e[e.LibFile=6]="LibFile",e[e.LibReferenceDirective=7]="LibReferenceDirective",e[e.AutomaticTypeDirectiveFile=8]="AutomaticTypeDirectiveFile",e))(yy||{}),gy=(e=>(e[e.FilePreprocessingReferencedDiagnostic=0]="FilePreprocessingReferencedDiagnostic",e[e.FilePreprocessingFileExplainingDiagnostic=1]="FilePreprocessingFileExplainingDiagnostic",e[e.ResolutionDiagnostics=2]="ResolutionDiagnostics",e))(gy||{}),by=(e=>(e[e.Js=0]="Js",e[e.Dts=1]="Dts",e))(by||{}),vy=(e=>(e[e.Not=0]="Not",e[e.SafeModules=1]="SafeModules",e[e.Completely=2]="Completely",e))(vy||{}),Ty=(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))(Ty||{}),Sy=(e=>(e[e.Ok=0]="Ok",e[e.NeedsOverride=1]="NeedsOverride",e[e.HasInvalidOverride=2]="HasInvalidOverride",e))(Sy||{}),xy=(e=>(e[e.None=0]="None",e[e.Literal=1]="Literal",e[e.Subtype=2]="Subtype",e))(xy||{}),wy=(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))(wy||{}),Ey=(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.OmitThisParameter=33554432]="OmitThisParameter",e[e.AllowThisInObjectLiteral=32768]="AllowThisInObjectLiteral",e[e.AllowQualifiedNameInPlaceOfIdentifier=65536]="AllowQualifiedNameInPlaceOfIdentifier",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.WriteComputedProps=1073741824]="WriteComputedProps",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))(Ey||{}),Cy=(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.OmitThisParameter=33554432]="OmitThisParameter",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.NodeBuilderFlagsMask=848330091]="NodeBuilderFlagsMask",e))(Cy||{}),Ay=(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.WriteComputedProps=16]="WriteComputedProps",e[e.DoNotIncludeSymbolChain=32]="DoNotIncludeSymbolChain",e))(Ay||{}),ky=(e=>(e[e.Accessible=0]="Accessible",e[e.NotAccessible=1]="NotAccessible",e[e.CannotBeNamed=2]="CannotBeNamed",e))(ky||{}),Dy=(e=>(e[e.UnionOrIntersection=0]="UnionOrIntersection",e[e.Spread=1]="Spread",e))(Dy||{}),Py=(e=>(e[e.This=0]="This",e[e.Identifier=1]="Identifier",e[e.AssertsThis=2]="AssertsThis",e[e.AssertsIdentifier=3]="AssertsIdentifier",e))(Py||{}),Iy=(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))(Iy||{}),sd=(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.AccessorExcludes=13247]="AccessorExcludes",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))(sd||{}),Ny=(e=>(e[e.Numeric=0]="Numeric",e[e.Literal=1]="Literal",e))(Ny||{}),Oy=(e=>(e[e.None=0]="None",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.Unresolved=1048576]="Unresolved",e[e.Synthetic=6]="Synthetic",e[e.Discriminant=192]="Discriminant",e[e.Partial=48]="Partial",e))(Oy||{}),My=(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))(My||{}),Ly=(e=>(e[e.None=0]="None",e[e.TypeChecked=1]="TypeChecked",e[e.LexicalThis=2]="LexicalThis",e[e.CaptureThis=4]="CaptureThis",e[e.CaptureNewTarget=8]="CaptureNewTarget",e[e.SuperInstance=16]="SuperInstance",e[e.SuperStatic=32]="SuperStatic",e[e.ContextChecked=64]="ContextChecked",e[e.MethodWithSuperPropertyAccessInAsync=128]="MethodWithSuperPropertyAccessInAsync",e[e.MethodWithSuperPropertyAssignmentInAsync=256]="MethodWithSuperPropertyAssignmentInAsync",e[e.CaptureArguments=512]="CaptureArguments",e[e.EnumValuesComputed=1024]="EnumValuesComputed",e[e.LexicalModuleMergesWithClass=2048]="LexicalModuleMergesWithClass",e[e.LoopWithCapturedBlockScopedBinding=4096]="LoopWithCapturedBlockScopedBinding",e[e.ContainsCapturedBlockScopeBinding=8192]="ContainsCapturedBlockScopeBinding",e[e.CapturedBlockScopedBinding=16384]="CapturedBlockScopedBinding",e[e.BlockScopedBindingInLoop=32768]="BlockScopedBindingInLoop",e[e.NeedsLoopOutParameter=65536]="NeedsLoopOutParameter",e[e.AssignmentsMarked=131072]="AssignmentsMarked",e[e.ContainsConstructorReference=262144]="ContainsConstructorReference",e[e.ConstructorReference=536870912]="ConstructorReference",e[e.ContainsClassWithPrivateIdentifiers=1048576]="ContainsClassWithPrivateIdentifiers",e[e.ContainsSuperPropertyInStaticInitializer=2097152]="ContainsSuperPropertyInStaticInitializer",e[e.InCheckIdentifier=4194304]="InCheckIdentifier",e))(Ly||{}),_d=(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=109472]="Unit",e[e.Freshable=2976]="Freshable",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.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.Primitive=402784252]="Primitive",e[e.DefinitelyNonNullable=470302716]="DefinitelyNonNullable",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.Singleton=67358815]="Singleton",e[e.Narrowable=536624127]="Narrowable",e[e.IncludesMask=473694207]="IncludesMask",e[e.IncludesMissingType=262144]="IncludesMissingType",e[e.IncludesNonWideningType=4194304]="IncludesNonWideningType",e[e.IncludesWildcard=8388608]="IncludesWildcard",e[e.IncludesEmptyObject=16777216]="IncludesEmptyObject",e[e.IncludesInstantiable=33554432]="IncludesInstantiable",e[e.NotPrimitiveUnion=36323331]="NotPrimitiveUnion",e))(_d||{}),cd=(e=>(e[e.None=0]="None",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.ReverseMapped=1024]="ReverseMapped",e[e.JsxAttributes=2048]="JsxAttributes",e[e.JSLiteral=4096]="JSLiteral",e[e.FreshLiteral=8192]="FreshLiteral",e[e.ArrayLiteral=16384]="ArrayLiteral",e[e.PrimitiveUnion=32768]="PrimitiveUnion",e[e.ContainsWideningType=65536]="ContainsWideningType",e[e.ContainsObjectOrArrayLiteral=131072]="ContainsObjectOrArrayLiteral",e[e.NonInferrableType=262144]="NonInferrableType",e[e.CouldContainTypeVariablesComputed=524288]="CouldContainTypeVariablesComputed",e[e.CouldContainTypeVariables=1048576]="CouldContainTypeVariables",e[e.ClassOrInterface=3]="ClassOrInterface",e[e.RequiresWidening=196608]="RequiresWidening",e[e.PropagatingFlags=458752]="PropagatingFlags",e[e.InstantiatedMapped=96]="InstantiatedMapped",e[e.ObjectTypeKindMask=1343]="ObjectTypeKindMask",e[e.ContainsSpread=2097152]="ContainsSpread",e[e.ObjectRestType=4194304]="ObjectRestType",e[e.InstantiationExpressionType=8388608]="InstantiationExpressionType",e[e.IsClassInstanceClone=16777216]="IsClassInstanceClone",e[e.IdenticalBaseTypeCalculated=33554432]="IdenticalBaseTypeCalculated",e[e.IdenticalBaseTypeExists=67108864]="IdenticalBaseTypeExists",e[e.IsGenericTypeComputed=2097152]="IsGenericTypeComputed",e[e.IsGenericObjectType=4194304]="IsGenericObjectType",e[e.IsGenericIndexType=8388608]="IsGenericIndexType",e[e.IsGenericType=12582912]="IsGenericType",e[e.ContainsIntersections=16777216]="ContainsIntersections",e[e.IsUnknownLikeUnionComputed=33554432]="IsUnknownLikeUnionComputed",e[e.IsUnknownLikeUnion=67108864]="IsUnknownLikeUnion",e[e.IsNeverIntersectionComputed=16777216]="IsNeverIntersectionComputed",e[e.IsNeverIntersection=33554432]="IsNeverIntersection",e))(cd||{}),Jy=(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))(Jy||{}),Ry=(e=>(e[e.Required=1]="Required",e[e.Optional=2]="Optional",e[e.Rest=4]="Rest",e[e.Variadic=8]="Variadic",e[e.Fixed=3]="Fixed",e[e.Variable=12]="Variable",e[e.NonRequired=14]="NonRequired",e[e.NonRest=11]="NonRest",e))(Ry||{}),jy=(e=>(e[e.None=0]="None",e[e.IncludeUndefined=1]="IncludeUndefined",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.Writing=4]="Writing",e[e.CacheSymbol=8]="CacheSymbol",e[e.NoTupleBoundsCheck=16]="NoTupleBoundsCheck",e[e.ExpressionPosition=32]="ExpressionPosition",e[e.ReportDeprecated=64]="ReportDeprecated",e[e.SuppressNoImplicitAnyError=128]="SuppressNoImplicitAnyError",e[e.Contextual=256]="Contextual",e[e.Persistent=1]="Persistent",e))(jy||{}),Fy=(e=>(e[e.None=0]="None",e[e.StringsOnly=1]="StringsOnly",e[e.NoIndexSignatures=2]="NoIndexSignatures",e[e.NoReducibleCheck=4]="NoReducibleCheck",e))(Fy||{}),By=(e=>(e[e.Component=0]="Component",e[e.Function=1]="Function",e[e.Mixed=2]="Mixed",e))(By||{}),Uy=(e=>(e[e.Call=0]="Call",e[e.Construct=1]="Construct",e))(Uy||{}),ld=(e=>(e[e.None=0]="None",e[e.HasRestParameter=1]="HasRestParameter",e[e.HasLiteralTypes=2]="HasLiteralTypes",e[e.Abstract=4]="Abstract",e[e.IsInnerCallChain=8]="IsInnerCallChain",e[e.IsOuterCallChain=16]="IsOuterCallChain",e[e.IsUntypedSignatureInJSFile=32]="IsUntypedSignatureInJSFile",e[e.IsNonInferrable=64]="IsNonInferrable",e[e.IsSignatureCandidateForOverloadFailure=128]="IsSignatureCandidateForOverloadFailure",e[e.PropagatingFlags=167]="PropagatingFlags",e[e.CallChainFlags=24]="CallChainFlags",e))(ld||{}),qy=(e=>(e[e.String=0]="String",e[e.Number=1]="Number",e))(qy||{}),zy=(e=>(e[e.Simple=0]="Simple",e[e.Array=1]="Array",e[e.Deferred=2]="Deferred",e[e.Function=3]="Function",e[e.Composite=4]="Composite",e[e.Merged=5]="Merged",e))(zy||{}),Wy=(e=>(e[e.None=0]="None",e[e.NakedTypeVariable=1]="NakedTypeVariable",e[e.SpeculativeTuple=2]="SpeculativeTuple",e[e.SubstituteSource=4]="SubstituteSource",e[e.HomomorphicMappedType=8]="HomomorphicMappedType",e[e.PartialHomomorphicMappedType=16]="PartialHomomorphicMappedType",e[e.MappedTypeConstraint=32]="MappedTypeConstraint",e[e.ContravariantConditional=64]="ContravariantConditional",e[e.ReturnType=128]="ReturnType",e[e.LiteralKeyof=256]="LiteralKeyof",e[e.NoConstraints=512]="NoConstraints",e[e.AlwaysStrict=1024]="AlwaysStrict",e[e.MaxValue=2048]="MaxValue",e[e.PriorityImpliesCombination=416]="PriorityImpliesCombination",e[e.Circularity=-1]="Circularity",e))(Wy||{}),Vy=(e=>(e[e.None=0]="None",e[e.NoDefault=1]="NoDefault",e[e.AnyDefault=2]="AnyDefault",e[e.SkippedGenericFunction=4]="SkippedGenericFunction",e))(Vy||{}),Hy=(e=>(e[e.False=0]="False",e[e.Unknown=1]="Unknown",e[e.Maybe=3]="Maybe",e[e.True=-1]="True",e))(Hy||{}),Gy=(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))(Gy||{}),ud=(e=>(e[e.Warning=0]="Warning",e[e.Error=1]="Error",e[e.Suggestion=2]="Suggestion",e[e.Message=3]="Message",e))(ud||{}),Xy=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e[e.Node10=2]="Node10",e[e.Node16=3]="Node16",e[e.NodeNext=99]="NodeNext",e[e.Bundler=100]="Bundler",e))(Xy||{}),$y=(e=>(e[e.Legacy=1]="Legacy",e[e.Auto=2]="Auto",e[e.Force=3]="Force",e))($y||{}),Qy=(e=>(e[e.FixedPollingInterval=0]="FixedPollingInterval",e[e.PriorityPollingInterval=1]="PriorityPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e[e.UseFsEvents=4]="UseFsEvents",e[e.UseFsEventsOnParentDirectory=5]="UseFsEventsOnParentDirectory",e))(Qy||{}),Yy=(e=>(e[e.UseFsEvents=0]="UseFsEvents",e[e.FixedPollingInterval=1]="FixedPollingInterval",e[e.DynamicPriorityPolling=2]="DynamicPriorityPolling",e[e.FixedChunkSizePolling=3]="FixedChunkSizePolling",e))(Yy||{}),Ky=(e=>(e[e.FixedInterval=0]="FixedInterval",e[e.PriorityInterval=1]="PriorityInterval",e[e.DynamicPriority=2]="DynamicPriority",e[e.FixedChunkSize=3]="FixedChunkSize",e))(Ky||{}),Zy=(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.ES2022=7]="ES2022",e[e.ESNext=99]="ESNext",e[e.Node16=100]="Node16",e[e.NodeNext=199]="NodeNext",e))(Zy||{}),e0=(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))(e0||{}),t0=(e=>(e[e.Remove=0]="Remove",e[e.Preserve=1]="Preserve",e[e.Error=2]="Error",e))(t0||{}),n0=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(n0||{}),pd=(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))(pd||{}),r0=(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.ES2021=8]="ES2021",e[e.ES2022=9]="ES2022",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(r0||{}),i0=(e=>(e[e.Standard=0]="Standard",e[e.JSX=1]="JSX",e))(i0||{}),a0=(e=>(e[e.None=0]="None",e[e.Recursive=1]="Recursive",e))(a0||{}),o0=(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.replacementCharacter=65533]="replacementCharacter",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))(o0||{}),s0=(e=>(e.Ts=".ts",e.Tsx=".tsx",e.Dts=".d.ts",e.Js=".js",e.Jsx=".jsx",e.Json=".json",e.TsBuildInfo=".tsbuildinfo",e.Mjs=".mjs",e.Mts=".mts",e.Dmts=".d.mts",e.Cjs=".cjs",e.Cts=".cts",e.Dcts=".d.cts",e))(s0||{}),fd=(e=>(e[e.None=0]="None",e[e.ContainsTypeScript=1]="ContainsTypeScript",e[e.ContainsJsx=2]="ContainsJsx",e[e.ContainsESNext=4]="ContainsESNext",e[e.ContainsES2022=8]="ContainsES2022",e[e.ContainsES2021=16]="ContainsES2021",e[e.ContainsES2020=32]="ContainsES2020",e[e.ContainsES2019=64]="ContainsES2019",e[e.ContainsES2018=128]="ContainsES2018",e[e.ContainsES2017=256]="ContainsES2017",e[e.ContainsES2016=512]="ContainsES2016",e[e.ContainsES2015=1024]="ContainsES2015",e[e.ContainsGenerator=2048]="ContainsGenerator",e[e.ContainsDestructuringAssignment=4096]="ContainsDestructuringAssignment",e[e.ContainsTypeScriptClassSyntax=8192]="ContainsTypeScriptClassSyntax",e[e.ContainsLexicalThis=16384]="ContainsLexicalThis",e[e.ContainsRestOrSpread=32768]="ContainsRestOrSpread",e[e.ContainsObjectRestOrSpread=65536]="ContainsObjectRestOrSpread",e[e.ContainsComputedPropertyName=131072]="ContainsComputedPropertyName",e[e.ContainsBlockScopedBinding=262144]="ContainsBlockScopedBinding",e[e.ContainsBindingPattern=524288]="ContainsBindingPattern",e[e.ContainsYield=1048576]="ContainsYield",e[e.ContainsAwait=2097152]="ContainsAwait",e[e.ContainsHoistedDeclarationOrCompletion=4194304]="ContainsHoistedDeclarationOrCompletion",e[e.ContainsDynamicImport=8388608]="ContainsDynamicImport",e[e.ContainsClassFields=16777216]="ContainsClassFields",e[e.ContainsDecorators=33554432]="ContainsDecorators",e[e.ContainsPossibleTopLevelAwait=67108864]="ContainsPossibleTopLevelAwait",e[e.ContainsLexicalSuper=134217728]="ContainsLexicalSuper",e[e.ContainsUpdateExpressionForIdentifier=268435456]="ContainsUpdateExpressionForIdentifier",e[e.ContainsPrivateIdentifierInExpression=536870912]="ContainsPrivateIdentifierInExpression",e[e.HasComputedFlags=-2147483648]="HasComputedFlags",e[e.AssertTypeScript=1]="AssertTypeScript",e[e.AssertJsx=2]="AssertJsx",e[e.AssertESNext=4]="AssertESNext",e[e.AssertES2022=8]="AssertES2022",e[e.AssertES2021=16]="AssertES2021",e[e.AssertES2020=32]="AssertES2020",e[e.AssertES2019=64]="AssertES2019",e[e.AssertES2018=128]="AssertES2018",e[e.AssertES2017=256]="AssertES2017",e[e.AssertES2016=512]="AssertES2016",e[e.AssertES2015=1024]="AssertES2015",e[e.AssertGenerator=2048]="AssertGenerator",e[e.AssertDestructuringAssignment=4096]="AssertDestructuringAssignment",e[e.OuterExpressionExcludes=-2147483648]="OuterExpressionExcludes",e[e.PropertyAccessExcludes=-2147483648]="PropertyAccessExcludes",e[e.NodeExcludes=-2147483648]="NodeExcludes",e[e.ArrowFunctionExcludes=-2072174592]="ArrowFunctionExcludes",e[e.FunctionExcludes=-1937940480]="FunctionExcludes",e[e.ConstructorExcludes=-1937948672]="ConstructorExcludes",e[e.MethodOrAccessorExcludes=-2005057536]="MethodOrAccessorExcludes",e[e.PropertyExcludes=-2013249536]="PropertyExcludes",e[e.ClassExcludes=-2147344384]="ClassExcludes",e[e.ModuleExcludes=-1941676032]="ModuleExcludes",e[e.TypeExcludes=-2]="TypeExcludes",e[e.ObjectLiteralExcludes=-2147278848]="ObjectLiteralExcludes",e[e.ArrayLiteralOrCallOrNewExcludes=-2147450880]="ArrayLiteralOrCallOrNewExcludes",e[e.VariableDeclarationListExcludes=-2146893824]="VariableDeclarationListExcludes",e[e.ParameterExcludes=-2147483648]="ParameterExcludes",e[e.CatchClauseExcludes=-2147418112]="CatchClauseExcludes",e[e.BindingPatternExcludes=-2147450880]="BindingPatternExcludes",e[e.ContainsLexicalThisOrSuper=134234112]="ContainsLexicalThisOrSuper",e[e.PropertyNamePropagatingFlags=134234112]="PropertyNamePropagatingFlags",e))(fd||{}),dd=(e=>(e[e.TabStop=0]="TabStop",e[e.Placeholder=1]="Placeholder",e[e.Choice=2]="Choice",e[e.Variable=3]="Variable",e))(dd||{}),md=(e=>(e[e.None=0]="None",e[e.SingleLine=1]="SingleLine",e[e.MultiLine=2]="MultiLine",e[e.AdviseOnEmitNode=4]="AdviseOnEmitNode",e[e.NoSubstitution=8]="NoSubstitution",e[e.CapturesThis=16]="CapturesThis",e[e.NoLeadingSourceMap=32]="NoLeadingSourceMap",e[e.NoTrailingSourceMap=64]="NoTrailingSourceMap",e[e.NoSourceMap=96]="NoSourceMap",e[e.NoNestedSourceMaps=128]="NoNestedSourceMaps",e[e.NoTokenLeadingSourceMaps=256]="NoTokenLeadingSourceMaps",e[e.NoTokenTrailingSourceMaps=512]="NoTokenTrailingSourceMaps",e[e.NoTokenSourceMaps=768]="NoTokenSourceMaps",e[e.NoLeadingComments=1024]="NoLeadingComments",e[e.NoTrailingComments=2048]="NoTrailingComments",e[e.NoComments=3072]="NoComments",e[e.NoNestedComments=4096]="NoNestedComments",e[e.HelperName=8192]="HelperName",e[e.ExportName=16384]="ExportName",e[e.LocalName=32768]="LocalName",e[e.InternalName=65536]="InternalName",e[e.Indented=131072]="Indented",e[e.NoIndentation=262144]="NoIndentation",e[e.AsyncFunctionBody=524288]="AsyncFunctionBody",e[e.ReuseTempVariableScope=1048576]="ReuseTempVariableScope",e[e.CustomPrologue=2097152]="CustomPrologue",e[e.NoHoisting=4194304]="NoHoisting",e[e.Iterator=8388608]="Iterator",e[e.NoAsciiEscaping=16777216]="NoAsciiEscaping",e))(md||{}),_0=(e=>(e[e.None=0]="None",e[e.TypeScriptClassWrapper=1]="TypeScriptClassWrapper",e[e.NeverApplyImportHelper=2]="NeverApplyImportHelper",e[e.IgnoreSourceNewlines=4]="IgnoreSourceNewlines",e[e.Immutable=8]="Immutable",e[e.IndirectCall=16]="IndirectCall",e[e.TransformPrivateStaticElements=32]="TransformPrivateStaticElements",e))(_0||{}),c0=(e=>(e[e.Extends=1]="Extends",e[e.Assign=2]="Assign",e[e.Rest=4]="Rest",e[e.Decorate=8]="Decorate",e[e.ESDecorateAndRunInitializers=8]="ESDecorateAndRunInitializers",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.SpreadArray=1024]="SpreadArray",e[e.Await=2048]="Await",e[e.AsyncGenerator=4096]="AsyncGenerator",e[e.AsyncDelegator=8192]="AsyncDelegator",e[e.AsyncValues=16384]="AsyncValues",e[e.ExportStar=32768]="ExportStar",e[e.ImportStar=65536]="ImportStar",e[e.ImportDefault=131072]="ImportDefault",e[e.MakeTemplateObject=262144]="MakeTemplateObject",e[e.ClassPrivateFieldGet=524288]="ClassPrivateFieldGet",e[e.ClassPrivateFieldSet=1048576]="ClassPrivateFieldSet",e[e.ClassPrivateFieldIn=2097152]="ClassPrivateFieldIn",e[e.CreateBinding=4194304]="CreateBinding",e[e.SetFunctionName=8388608]="SetFunctionName",e[e.PropKey=16777216]="PropKey",e[e.AddDisposableResourceAndDisposeResources=33554432]="AddDisposableResourceAndDisposeResources",e[e.FirstEmitHelper=1]="FirstEmitHelper",e[e.LastEmitHelper=33554432]="LastEmitHelper",e[e.ForOfIncludes=256]="ForOfIncludes",e[e.ForAwaitOfIncludes=16384]="ForAwaitOfIncludes",e[e.AsyncGeneratorIncludes=6144]="AsyncGeneratorIncludes",e[e.AsyncDelegatorIncludes=26624]="AsyncDelegatorIncludes",e[e.SpreadIncludes=1536]="SpreadIncludes",e))(c0||{}),l0=(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))(l0||{}),u0=(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[e.ExcludeJSDocTypeAssertion=16]="ExcludeJSDocTypeAssertion",e))(u0||{}),p0=(e=>(e[e.None=0]="None",e[e.InParameters=1]="InParameters",e[e.VariablesHoistedInParameters=2]="VariablesHoistedInParameters",e))(p0||{}),f0=(e=>(e.Prologue="prologue",e.EmitHelpers="emitHelpers",e.NoDefaultLib="no-default-lib",e.Reference="reference",e.Type="type",e.TypeResolutionModeRequire="type-require",e.TypeResolutionModeImport="type-import",e.Lib="lib",e.Prepend="prepend",e.Text="text",e.Internal="internal",e))(f0||{}),d0=(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=2359808]="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.ImportAttributes=526226]="ImportAttributes",e[e.ImportClauseEntries=526226]="ImportClauseEntries",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))(d0||{}),m0=(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))(m0||{}),Wd={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},{name:"resolution-mode",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}},h0=(e=>(e[e.ParseAll=0]="ParseAll",e[e.ParseNone=1]="ParseNone",e[e.ParseForTypeErrors=2]="ParseForTypeErrors",e[e.ParseForTypeInfo=3]="ParseForTypeInfo",e))(h0||{})}}),BE=()=>{},y0;function vg(e){return e===47||e===92}function UE(e){return jl(e)<0}function b_(e){return jl(e)>0}function qE(e){let t=jl(e);return t>0&&t===e.length}function Tg(e){return jl(e)!==0}function as(e){return/^\.\.?($|[\\/])/.test(e)}function zE(e){return!Tg(e)&&!as(e)}function Wv(e){return os(e).includes(".")}function Na(e,t){return e.length>t.length&&is(e,t)}function ii(e,t){for(let n of t)if(Na(e,n))return!0;return!1}function Vd(e){return e.length>0&&vg(e.charCodeAt(e.length-1))}function D6(e){return e>=97&&e<=122||e>=65&&e<=90}function WE(e,t){let n=e.charCodeAt(t);if(n===58)return t+1;if(n===37&&e.charCodeAt(t+1)===51){let a=e.charCodeAt(t+2);if(a===97||a===65)return t+3}return-1}function jl(e){if(!e)return 0;let t=e.charCodeAt(0);if(t===47||t===92){if(e.charCodeAt(1)!==t)return 1;let a=e.indexOf(t===47?vr:Cg,2);return a<0?e.length:a+1}if(D6(t)&&e.charCodeAt(1)===58){let a=e.charCodeAt(2);if(a===47||a===92)return 3;if(e.length===2)return 2}let n=e.indexOf(b0);if(n!==-1){let a=n+b0.length,_=e.indexOf(vr,a);if(_!==-1){let p=e.slice(0,n),m=e.slice(a,_);if(p==="file"&&(m===""||m==="localhost")&&D6(e.charCodeAt(_+1))){let y=WE(e,_+2);if(y!==-1){if(e.charCodeAt(y)===47)return~(y+1);if(y===e.length)return~y}}return~(_+1)}return~e.length}return 0}function Ni(e){let t=jl(e);return t<0?~t:t}function Mi(e){e=Vo(e);let t=Ni(e);return t===e.length?e:(e=v_(e),e.slice(0,Math.max(t,e.lastIndexOf(vr))))}function os(e,t,n){if(e=Vo(e),Ni(e)===e.length)return"";e=v_(e);let _=e.slice(Math.max(Ni(e),e.lastIndexOf(vr)+1)),p=t!==void 0&&n!==void 0?hd(_,t,n):void 0;return p?_.slice(0,_.length-p.length):_}function P6(e,t,n){if(Hn(t,".")||(t="."+t),e.length>=t.length&&e.charCodeAt(e.length-t.length)===46){let a=e.slice(e.length-t.length);if(n(a,t))return a}}function VE(e,t,n){if(typeof t=="string")return P6(e,t,n)||"";for(let a of t){let _=P6(e,a,n);if(_)return _}return""}function hd(e,t,n){if(t)return VE(v_(e),t,n?s_:Rl);let a=os(e),_=a.lastIndexOf(".");return _>=0?a.substring(_):""}function HE(e,t){let n=e.substring(0,t),a=e.substring(t).split(vr);return a.length&&!Pi(a)&&a.pop(),[n,...a]}function Oi(e,t=""){return e=Qt(t,e),HE(e,Ni(e))}function Wo(e,t){return e.length===0?"":(e[0]&&to(e[0]))+e.slice(1,t).join(vr)}function Vo(e){return e.includes("\\")?e.replace(Qv,vr):e}function Ca(e){if(!Ze(e))return[];let t=[e[0]];for(let n=1;n1){if(t[t.length-1]!==".."){t.pop();continue}}else if(t[0])continue}t.push(a)}}return t}function Qt(e,...t){e&&(e=Vo(e));for(let n of t)n&&(n=Vo(n),!e||Ni(n)!==0?e=n:e=to(e)+n);return e}function g0(e,...t){return br(Ze(t)?Qt(e,...t):Vo(e))}function Hd(e,t){return Ca(Oi(e,t))}function Gi(e,t){return Wo(Hd(e,t))}function br(e){if(e=Vo(e),!Sl.test(e))return e;let t=e.replace(/\/\.\//g,"/").replace(/^\.\//,"");if(t!==e&&(e=t,!Sl.test(e)))return e;let n=Wo(Ca(Oi(e)));return n&&Vd(e)?to(n):n}function GE(e){return e.length===0?"":e.slice(1).join(vr)}function XE(e,t){return GE(Hd(e,t))}function Di(e,t,n){let a=b_(e)?br(e):Gi(e,t);return n(a)}function v_(e){return Vd(e)?e.substr(0,e.length-1):e}function to(e){return Vd(e)?e:e+vr}function Sg(e){return!Tg(e)&&!as(e)?"./"+e:e}function Vv(e,t,n,a){let _=n!==void 0&&a!==void 0?hd(e,n,a):hd(e);return _?e.slice(0,e.length-_.length)+(Hn(t,".")?t:"."+t):e}function xg(e,t,n){if(e===t)return 0;if(e===void 0)return-1;if(t===void 0)return 1;let a=e.substring(0,Ni(e)),_=t.substring(0,Ni(t)),p=qd(a,_);if(p!==0)return p;let m=e.substring(a.length),y=t.substring(_.length);if(!Sl.test(m)&&!Sl.test(y))return n(m,y);let u=Ca(Oi(e)),x=Ca(Oi(t)),d=Math.min(u.length,x.length);for(let S=1;S0==Ni(t)>0,"Paths must either both be absolute or both be relative");let p=wg(e,t,(typeof n=="boolean"?n:!1)?s_:Rl,typeof n=="function"?n:bt);return Wo(p)}function KE(e,t,n){return b_(e)?Eg(t,e,t,n,!1):e}function ZE(e,t,n){return Sg(Xv(Mi(e),t,n))}function Eg(e,t,n,a,_){let p=wg(g0(n,e),g0(n,t),Rl,a),m=p[0];if(_&&b_(m)){let y=m.charAt(0)===vr?"file://":"file:///";p[0]=y+m}return Wo(p)}function $v(e,t){for(;;){let n=t(e);if(n!==void 0)return n;let a=Mi(e);if(a===e)return;e=a}}function eC(e){return is(e,"/node_modules")}var vr,Cg,b0,Qv,Sl,tC=It({"src/compiler/path.ts"(){"use strict";En(),vr="/",Cg="\\",b0="://",Qv=/\\/g,Sl=/(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/}});function i(e,t,n,a,_,p,m){return{code:e,category:t,key:n,message:a,reportsUnnecessary:_,elidedInCompatabilityPyramid:p,reportsDeprecated:m}}var B,nC=It({"src/compiler/diagnosticInformationMap.generated.ts"(){"use strict";zv(),B={Unterminated_string_literal:i(1002,1,"Unterminated_string_literal_1002","Unterminated string literal."),Identifier_expected:i(1003,1,"Identifier_expected_1003","Identifier expected."),_0_expected:i(1005,1,"_0_expected_1005","'{0}' expected."),A_file_cannot_have_a_reference_to_itself:i(1006,1,"A_file_cannot_have_a_reference_to_itself_1006","A file cannot have a reference to itself."),The_parser_expected_to_find_a_1_to_match_the_0_token_here:i(1007,1,"The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007","The parser expected to find a '{1}' to match the '{0}' token here."),Trailing_comma_not_allowed:i(1009,1,"Trailing_comma_not_allowed_1009","Trailing comma not allowed."),Asterisk_Slash_expected:i(1010,1,"Asterisk_Slash_expected_1010","'*/' expected."),An_element_access_expression_should_take_an_argument:i(1011,1,"An_element_access_expression_should_take_an_argument_1011","An element access expression should take an argument."),Unexpected_token:i(1012,1,"Unexpected_token_1012","Unexpected token."),A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma:i(1013,1,"A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013","A rest parameter or binding pattern may not have a trailing comma."),A_rest_parameter_must_be_last_in_a_parameter_list:i(1014,1,"A_rest_parameter_must_be_last_in_a_parameter_list_1014","A rest parameter must be last in a parameter list."),Parameter_cannot_have_question_mark_and_initializer:i(1015,1,"Parameter_cannot_have_question_mark_and_initializer_1015","Parameter cannot have question mark and initializer."),A_required_parameter_cannot_follow_an_optional_parameter:i(1016,1,"A_required_parameter_cannot_follow_an_optional_parameter_1016","A required parameter cannot follow an optional parameter."),An_index_signature_cannot_have_a_rest_parameter:i(1017,1,"An_index_signature_cannot_have_a_rest_parameter_1017","An index signature cannot have a rest parameter."),An_index_signature_parameter_cannot_have_an_accessibility_modifier:i(1018,1,"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018","An index signature parameter cannot have an accessibility modifier."),An_index_signature_parameter_cannot_have_a_question_mark:i(1019,1,"An_index_signature_parameter_cannot_have_a_question_mark_1019","An index signature parameter cannot have a question mark."),An_index_signature_parameter_cannot_have_an_initializer:i(1020,1,"An_index_signature_parameter_cannot_have_an_initializer_1020","An index signature parameter cannot have an initializer."),An_index_signature_must_have_a_type_annotation:i(1021,1,"An_index_signature_must_have_a_type_annotation_1021","An index signature must have a type annotation."),An_index_signature_parameter_must_have_a_type_annotation:i(1022,1,"An_index_signature_parameter_must_have_a_type_annotation_1022","An index signature parameter must have a type annotation."),readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature:i(1024,1,"readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024","'readonly' modifier can only appear on a property declaration or index signature."),An_index_signature_cannot_have_a_trailing_comma:i(1025,1,"An_index_signature_cannot_have_a_trailing_comma_1025","An index signature cannot have a trailing comma."),Accessibility_modifier_already_seen:i(1028,1,"Accessibility_modifier_already_seen_1028","Accessibility modifier already seen."),_0_modifier_must_precede_1_modifier:i(1029,1,"_0_modifier_must_precede_1_modifier_1029","'{0}' modifier must precede '{1}' modifier."),_0_modifier_already_seen:i(1030,1,"_0_modifier_already_seen_1030","'{0}' modifier already seen."),_0_modifier_cannot_appear_on_class_elements_of_this_kind:i(1031,1,"_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031","'{0}' modifier cannot appear on class elements of this kind."),super_must_be_followed_by_an_argument_list_or_member_access:i(1034,1,"super_must_be_followed_by_an_argument_list_or_member_access_1034","'super' must be followed by an argument list or member access."),Only_ambient_modules_can_use_quoted_names:i(1035,1,"Only_ambient_modules_can_use_quoted_names_1035","Only ambient modules can use quoted names."),Statements_are_not_allowed_in_ambient_contexts:i(1036,1,"Statements_are_not_allowed_in_ambient_contexts_1036","Statements are not allowed in ambient contexts."),A_declare_modifier_cannot_be_used_in_an_already_ambient_context:i(1038,1,"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038","A 'declare' modifier cannot be used in an already ambient context."),Initializers_are_not_allowed_in_ambient_contexts:i(1039,1,"Initializers_are_not_allowed_in_ambient_contexts_1039","Initializers are not allowed in ambient contexts."),_0_modifier_cannot_be_used_in_an_ambient_context:i(1040,1,"_0_modifier_cannot_be_used_in_an_ambient_context_1040","'{0}' modifier cannot be used in an ambient context."),_0_modifier_cannot_be_used_here:i(1042,1,"_0_modifier_cannot_be_used_here_1042","'{0}' modifier cannot be used here."),_0_modifier_cannot_appear_on_a_module_or_namespace_element:i(1044,1,"_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044","'{0}' modifier cannot appear on a module or namespace element."),Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier:i(1046,1,"Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046","Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),A_rest_parameter_cannot_be_optional:i(1047,1,"A_rest_parameter_cannot_be_optional_1047","A rest parameter cannot be optional."),A_rest_parameter_cannot_have_an_initializer:i(1048,1,"A_rest_parameter_cannot_have_an_initializer_1048","A rest parameter cannot have an initializer."),A_set_accessor_must_have_exactly_one_parameter:i(1049,1,"A_set_accessor_must_have_exactly_one_parameter_1049","A 'set' accessor must have exactly one parameter."),A_set_accessor_cannot_have_an_optional_parameter:i(1051,1,"A_set_accessor_cannot_have_an_optional_parameter_1051","A 'set' accessor cannot have an optional parameter."),A_set_accessor_parameter_cannot_have_an_initializer:i(1052,1,"A_set_accessor_parameter_cannot_have_an_initializer_1052","A 'set' accessor parameter cannot have an initializer."),A_set_accessor_cannot_have_rest_parameter:i(1053,1,"A_set_accessor_cannot_have_rest_parameter_1053","A 'set' accessor cannot have rest parameter."),A_get_accessor_cannot_have_parameters:i(1054,1,"A_get_accessor_cannot_have_parameters_1054","A 'get' accessor cannot have parameters."),Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value:i(1055,1,"Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055","Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."),Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:i(1056,1,"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056","Accessors are only available when targeting ECMAScript 5 and higher."),The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member:i(1058,1,"The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058","The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),A_promise_must_have_a_then_method:i(1059,1,"A_promise_must_have_a_then_method_1059","A promise must have a 'then' method."),The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback:i(1060,1,"The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060","The first parameter of the 'then' method of a promise must be a callback."),Enum_member_must_have_initializer:i(1061,1,"Enum_member_must_have_initializer_1061","Enum member must have initializer."),Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:i(1062,1,"Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062","Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."),An_export_assignment_cannot_be_used_in_a_namespace:i(1063,1,"An_export_assignment_cannot_be_used_in_a_namespace_1063","An export assignment cannot be used in a namespace."),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0:i(1064,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064","The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"),The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:i(1065,1,"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065","The return type of an async function or method must be the global Promise type."),In_ambient_enum_declarations_member_initializer_must_be_constant_expression:i(1066,1,"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:i(1068,1,"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:i(1069,1,"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:i(1070,1,"_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:i(1071,1,"_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:i(1079,1,"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:i(1084,1,"Invalid_reference_directive_syntax_1084","Invalid 'reference' directive syntax."),_0_modifier_cannot_appear_on_a_constructor_declaration:i(1089,1,"_0_modifier_cannot_appear_on_a_constructor_declaration_1089","'{0}' modifier cannot appear on a constructor declaration."),_0_modifier_cannot_appear_on_a_parameter:i(1090,1,"_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:i(1091,1,"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:i(1092,1,"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:i(1093,1,"Type_annotation_cannot_appear_on_a_constructor_declaration_1093","Type annotation cannot appear on a constructor declaration."),An_accessor_cannot_have_type_parameters:i(1094,1,"An_accessor_cannot_have_type_parameters_1094","An accessor cannot have type parameters."),A_set_accessor_cannot_have_a_return_type_annotation:i(1095,1,"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:i(1096,1,"An_index_signature_must_have_exactly_one_parameter_1096","An index signature must have exactly one parameter."),_0_list_cannot_be_empty:i(1097,1,"_0_list_cannot_be_empty_1097","'{0}' list cannot be empty."),Type_parameter_list_cannot_be_empty:i(1098,1,"Type_parameter_list_cannot_be_empty_1098","Type parameter list cannot be empty."),Type_argument_list_cannot_be_empty:i(1099,1,"Type_argument_list_cannot_be_empty_1099","Type argument list cannot be empty."),Invalid_use_of_0_in_strict_mode:i(1100,1,"Invalid_use_of_0_in_strict_mode_1100","Invalid use of '{0}' in strict mode."),with_statements_are_not_allowed_in_strict_mode:i(1101,1,"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:i(1102,1,"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102","'delete' cannot be called on an identifier in strict mode."),for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:i(1103,1,"for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103","'for await' loops are only allowed within async functions and at the top levels of modules."),A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:i(1104,1,"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:i(1105,1,"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."),The_left_hand_side_of_a_for_of_statement_may_not_be_async:i(1106,1,"The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106","The left-hand side of a 'for...of' statement may not be 'async'."),Jump_target_cannot_cross_function_boundary:i(1107,1,"Jump_target_cannot_cross_function_boundary_1107","Jump target cannot cross function boundary."),A_return_statement_can_only_be_used_within_a_function_body:i(1108,1,"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:i(1109,1,"Expression_expected_1109","Expression expected."),Type_expected:i(1110,1,"Type_expected_1110","Type expected."),Private_field_0_must_be_declared_in_an_enclosing_class:i(1111,1,"Private_field_0_must_be_declared_in_an_enclosing_class_1111","Private field '{0}' must be declared in an enclosing class."),A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:i(1113,1,"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:i(1114,1,"Duplicate_label_0_1114","Duplicate label '{0}'."),A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:i(1115,1,"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:i(1116,1,"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:i(1117,1,"An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117","An object literal cannot have multiple properties with the same name."),An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:i(1118,1,"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:i(1119,1,"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:i(1120,1,"An_export_assignment_cannot_have_modifiers_1120","An export assignment cannot have modifiers."),Octal_literals_are_not_allowed_Use_the_syntax_0:i(1121,1,"Octal_literals_are_not_allowed_Use_the_syntax_0_1121","Octal literals are not allowed. Use the syntax '{0}'."),Variable_declaration_list_cannot_be_empty:i(1123,1,"Variable_declaration_list_cannot_be_empty_1123","Variable declaration list cannot be empty."),Digit_expected:i(1124,1,"Digit_expected_1124","Digit expected."),Hexadecimal_digit_expected:i(1125,1,"Hexadecimal_digit_expected_1125","Hexadecimal digit expected."),Unexpected_end_of_text:i(1126,1,"Unexpected_end_of_text_1126","Unexpected end of text."),Invalid_character:i(1127,1,"Invalid_character_1127","Invalid character."),Declaration_or_statement_expected:i(1128,1,"Declaration_or_statement_expected_1128","Declaration or statement expected."),Statement_expected:i(1129,1,"Statement_expected_1129","Statement expected."),case_or_default_expected:i(1130,1,"case_or_default_expected_1130","'case' or 'default' expected."),Property_or_signature_expected:i(1131,1,"Property_or_signature_expected_1131","Property or signature expected."),Enum_member_expected:i(1132,1,"Enum_member_expected_1132","Enum member expected."),Variable_declaration_expected:i(1134,1,"Variable_declaration_expected_1134","Variable declaration expected."),Argument_expression_expected:i(1135,1,"Argument_expression_expected_1135","Argument expression expected."),Property_assignment_expected:i(1136,1,"Property_assignment_expected_1136","Property assignment expected."),Expression_or_comma_expected:i(1137,1,"Expression_or_comma_expected_1137","Expression or comma expected."),Parameter_declaration_expected:i(1138,1,"Parameter_declaration_expected_1138","Parameter declaration expected."),Type_parameter_declaration_expected:i(1139,1,"Type_parameter_declaration_expected_1139","Type parameter declaration expected."),Type_argument_expected:i(1140,1,"Type_argument_expected_1140","Type argument expected."),String_literal_expected:i(1141,1,"String_literal_expected_1141","String literal expected."),Line_break_not_permitted_here:i(1142,1,"Line_break_not_permitted_here_1142","Line break not permitted here."),or_expected:i(1144,1,"or_expected_1144","'{' or ';' expected."),or_JSX_element_expected:i(1145,1,"or_JSX_element_expected_1145","'{' or JSX element expected."),Declaration_expected:i(1146,1,"Declaration_expected_1146","Declaration expected."),Import_declarations_in_a_namespace_cannot_reference_a_module:i(1147,1,"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:i(1148,1,"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:i(1149,1,"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."),_0_declarations_must_be_initialized:i(1155,1,"_0_declarations_must_be_initialized_1155","'{0}' declarations must be initialized."),_0_declarations_can_only_be_declared_inside_a_block:i(1156,1,"_0_declarations_can_only_be_declared_inside_a_block_1156","'{0}' declarations can only be declared inside a block."),Unterminated_template_literal:i(1160,1,"Unterminated_template_literal_1160","Unterminated template literal."),Unterminated_regular_expression_literal:i(1161,1,"Unterminated_regular_expression_literal_1161","Unterminated regular expression literal."),An_object_member_cannot_be_declared_optional:i(1162,1,"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:i(1163,1,"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:i(1164,1,"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:i(1165,1,"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_have_a_simple_literal_type_or_a_unique_symbol_type:i(1166,1,"A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166","A computed property name in a class property declaration must have a simple 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:i(1168,1,"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:i(1169,1,"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:i(1170,1,"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:i(1171,1,"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:i(1172,1,"extends_clause_already_seen_1172","'extends' clause already seen."),extends_clause_must_precede_implements_clause:i(1173,1,"extends_clause_must_precede_implements_clause_1173","'extends' clause must precede 'implements' clause."),Classes_can_only_extend_a_single_class:i(1174,1,"Classes_can_only_extend_a_single_class_1174","Classes can only extend a single class."),implements_clause_already_seen:i(1175,1,"implements_clause_already_seen_1175","'implements' clause already seen."),Interface_declaration_cannot_have_implements_clause:i(1176,1,"Interface_declaration_cannot_have_implements_clause_1176","Interface declaration cannot have 'implements' clause."),Binary_digit_expected:i(1177,1,"Binary_digit_expected_1177","Binary digit expected."),Octal_digit_expected:i(1178,1,"Octal_digit_expected_1178","Octal digit expected."),Unexpected_token_expected:i(1179,1,"Unexpected_token_expected_1179","Unexpected token. '{' expected."),Property_destructuring_pattern_expected:i(1180,1,"Property_destructuring_pattern_expected_1180","Property destructuring pattern expected."),Array_element_destructuring_pattern_expected:i(1181,1,"Array_element_destructuring_pattern_expected_1181","Array element destructuring pattern expected."),A_destructuring_declaration_must_have_an_initializer:i(1182,1,"A_destructuring_declaration_must_have_an_initializer_1182","A destructuring declaration must have an initializer."),An_implementation_cannot_be_declared_in_ambient_contexts:i(1183,1,"An_implementation_cannot_be_declared_in_ambient_contexts_1183","An implementation cannot be declared in ambient contexts."),Modifiers_cannot_appear_here:i(1184,1,"Modifiers_cannot_appear_here_1184","Modifiers cannot appear here."),Merge_conflict_marker_encountered:i(1185,1,"Merge_conflict_marker_encountered_1185","Merge conflict marker encountered."),A_rest_element_cannot_have_an_initializer:i(1186,1,"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:i(1187,1,"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:i(1188,1,"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:i(1189,1,"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:i(1190,1,"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:i(1191,1,"An_import_declaration_cannot_have_modifiers_1191","An import declaration cannot have modifiers."),Module_0_has_no_default_export:i(1192,1,"Module_0_has_no_default_export_1192","Module '{0}' has no default export."),An_export_declaration_cannot_have_modifiers:i(1193,1,"An_export_declaration_cannot_have_modifiers_1193","An export declaration cannot have modifiers."),Export_declarations_are_not_permitted_in_a_namespace:i(1194,1,"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:i(1195,1,"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:i(1196,1,"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:i(1197,1,"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:i(1198,1,"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:i(1199,1,"Unterminated_Unicode_escape_sequence_1199","Unterminated Unicode escape sequence."),Line_terminator_not_permitted_before_arrow:i(1200,1,"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:i(1202,1,"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:i(1203,1,"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_0_is_enabled_requires_using_export_type:i(1205,1,"Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205","Re-exporting a type when '{0}' is enabled requires using 'export type'."),Decorators_are_not_valid_here:i(1206,1,"Decorators_are_not_valid_here_1206","Decorators are not valid here."),Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:i(1207,1,"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."),Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0:i(1209,1,"Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209","Invalid optional chain from new expression. Did you mean to call '{0}()'?"),Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode:i(1210,1,"Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210","Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),A_class_declaration_without_the_default_modifier_must_have_a_name:i(1211,1,"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:i(1212,1,"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:i(1213,1,"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:i(1214,1,"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:i(1215,1,"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:i(1216,1,"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:i(1218,1,"Export_assignment_is_not_supported_when_module_flag_is_system_1218","Export assignment is not supported when '--module' flag is 'system'."),Generators_are_not_allowed_in_an_ambient_context:i(1221,1,"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:i(1222,1,"An_overload_signature_cannot_be_declared_as_a_generator_1222","An overload signature cannot be declared as a generator."),_0_tag_already_specified:i(1223,1,"_0_tag_already_specified_1223","'{0}' tag already specified."),Signature_0_must_be_a_type_predicate:i(1224,1,"Signature_0_must_be_a_type_predicate_1224","Signature '{0}' must be a type predicate."),Cannot_find_parameter_0:i(1225,1,"Cannot_find_parameter_0_1225","Cannot find parameter '{0}'."),Type_predicate_0_is_not_assignable_to_1:i(1226,1,"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:i(1227,1,"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:i(1228,1,"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:i(1229,1,"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:i(1230,1,"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_must_be_at_the_top_level_of_a_file_or_module_declaration:i(1231,1,"An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231","An export assignment must be at the top level of a file or module declaration."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:i(1232,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232","An import declaration can only be used at the top level of a namespace or module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module:i(1233,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233","An export declaration can only be used at the top level of a namespace or module."),An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:i(1234,1,"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_at_the_top_level_of_a_namespace_or_module:i(1235,1,"A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235","A namespace declaration is only allowed at the top level of a namespace or module."),The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:i(1236,1,"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:i(1237,1,"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:i(1238,1,"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:i(1239,1,"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:i(1240,1,"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:i(1241,1,"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:i(1242,1,"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:i(1243,1,"_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:i(1244,1,"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:i(1245,1,"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:i(1246,1,"An_interface_property_cannot_have_an_initializer_1246","An interface property cannot have an initializer."),A_type_literal_property_cannot_have_an_initializer:i(1247,1,"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:i(1248,1,"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:i(1249,1,"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:i(1250,1,"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:i(1251,1,"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:i(1252,1,"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."),Abstract_properties_can_only_appear_within_an_abstract_class:i(1253,1,"Abstract_properties_can_only_appear_within_an_abstract_class_1253","Abstract properties can only appear within an abstract class."),A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference:i(1254,1,"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:i(1255,1,"A_definite_assignment_assertion_is_not_permitted_in_this_context_1255","A definite assignment assertion '!' is not permitted in this context."),A_required_element_cannot_follow_an_optional_element:i(1257,1,"A_required_element_cannot_follow_an_optional_element_1257","A required element cannot follow an optional element."),A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration:i(1258,1,"A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258","A default export must be at the top level of a file or module declaration."),Module_0_can_only_be_default_imported_using_the_1_flag:i(1259,1,"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:i(1260,1,"Keywords_cannot_contain_escape_characters_1260","Keywords cannot contain escape characters."),Already_included_file_name_0_differs_from_file_name_1_only_in_casing:i(1261,1,"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:i(1262,1,"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:i(1263,1,"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:i(1264,1,"Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264","Declarations with definite assignment assertions must also have type annotations."),A_rest_element_cannot_follow_another_rest_element:i(1265,1,"A_rest_element_cannot_follow_another_rest_element_1265","A rest element cannot follow another rest element."),An_optional_element_cannot_follow_a_rest_element:i(1266,1,"An_optional_element_cannot_follow_a_rest_element_1266","An optional element cannot follow a rest element."),Property_0_cannot_have_an_initializer_because_it_is_marked_abstract:i(1267,1,"Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267","Property '{0}' cannot have an initializer because it is marked abstract."),An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type:i(1268,1,"An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268","An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled:i(1269,1,"Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269","Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."),Decorator_function_return_type_0_is_not_assignable_to_type_1:i(1270,1,"Decorator_function_return_type_0_is_not_assignable_to_type_1_1270","Decorator function return type '{0}' is not assignable to type '{1}'."),Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any:i(1271,1,"Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271","Decorator function return type is '{0}' but is expected to be 'void' or 'any'."),A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled:i(1272,1,"A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272","A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."),_0_modifier_cannot_appear_on_a_type_parameter:i(1273,1,"_0_modifier_cannot_appear_on_a_type_parameter_1273","'{0}' modifier cannot appear on a type parameter"),_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias:i(1274,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274","'{0}' modifier can only appear on a type parameter of a class, interface or type alias"),accessor_modifier_can_only_appear_on_a_property_declaration:i(1275,1,"accessor_modifier_can_only_appear_on_a_property_declaration_1275","'accessor' modifier can only appear on a property declaration."),An_accessor_property_cannot_be_declared_optional:i(1276,1,"An_accessor_property_cannot_be_declared_optional_1276","An 'accessor' property cannot be declared optional."),_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class:i(1277,1,"_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277","'{0}' modifier can only appear on a type parameter of a function, method or class"),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0:i(1278,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278","The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."),The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0:i(1279,1,"The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279","The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."),Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement:i(1280,1,"Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280","Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."),Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead:i(1281,1,"Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281","Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."),An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:i(1282,1,"An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282","An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:i(1283,1,"An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283","An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type:i(1284,1,"An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284","An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration:i(1285,1,"An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285","An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:i(1286,1,"ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286","ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled:i(1287,1,"A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287","A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled:i(1288,1,"An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288","An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),with_statements_are_not_allowed_in_an_async_function_block:i(1300,1,"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:i(1308,1,"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."),The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level:i(1309,1,"The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309","The current file is a CommonJS module and cannot use 'await' at the top level."),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:i(1312,1,"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:i(1313,1,"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:i(1314,1,"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:i(1315,1,"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:i(1316,1,"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:i(1317,1,"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:i(1318,1,"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:i(1319,1,"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:i(1320,1,"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:i(1321,1,"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:i(1322,1,"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_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext:i(1323,1,"Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323","Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."),Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext:i(1324,1,"Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324","Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."),Argument_of_dynamic_import_cannot_be_spread_element:i(1325,1,"Argument_of_dynamic_import_cannot_be_spread_element_1325","Argument of dynamic import cannot be spread element."),This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments:i(1326,1,"This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326","This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."),String_literal_with_double_quotes_expected:i(1327,1,"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:i(1328,1,"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:i(1329,1,"_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:i(1330,1,"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:i(1331,1,"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:i(1332,1,"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:i(1333,1,"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:i(1334,1,"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:i(1335,1,"unique_symbol_types_are_not_allowed_here_1335","'unique symbol' types are not allowed here."),An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead:i(1337,1,"An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337","An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type:i(1338,1,"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:i(1339,1,"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:i(1340,1,"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}')'?"),Class_constructor_may_not_be_an_accessor:i(1341,1,"Class_constructor_may_not_be_an_accessor_1341","Class constructor may not be an accessor."),The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext:i(1343,1,"The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343","The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."),A_label_is_not_allowed_here:i(1344,1,"A_label_is_not_allowed_here_1344","'A label is not allowed here."),An_expression_of_type_void_cannot_be_tested_for_truthiness:i(1345,1,"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:i(1346,1,"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:i(1347,1,"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:i(1348,1,"Non_simple_parameter_declared_here_1348","Non-simple parameter declared here."),use_strict_directive_used_here:i(1349,1,"use_strict_directive_used_here_1349","'use strict' directive used here."),Print_the_final_configuration_instead_of_building:i(1350,3,"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:i(1351,1,"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:i(1352,1,"A_bigint_literal_cannot_use_exponential_notation_1352","A bigint literal cannot use exponential notation."),A_bigint_literal_must_be_an_integer:i(1353,1,"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:i(1354,1,"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:i(1355,1,"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:i(1356,1,"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:i(1357,1,"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:i(1358,1,"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:i(1359,1,"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."),Type_0_does_not_satisfy_the_expected_type_1:i(1360,1,"Type_0_does_not_satisfy_the_expected_type_1_1360","Type '{0}' does not satisfy the expected type '{1}'."),_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type:i(1361,1,"_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:i(1362,1,"_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:i(1363,1,"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:i(1364,3,"Convert_to_type_only_export_1364","Convert to type-only export"),Convert_all_re_exported_types_to_type_only_exports:i(1365,3,"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:i(1366,3,"Split_into_two_separate_import_declarations_1366","Split into two separate import declarations"),Split_all_invalid_type_only_imports:i(1367,3,"Split_all_invalid_type_only_imports_1367","Split all invalid type-only imports"),Class_constructor_may_not_be_a_generator:i(1368,1,"Class_constructor_may_not_be_a_generator_1368","Class constructor may not be a generator."),Did_you_mean_0:i(1369,3,"Did_you_mean_0_1369","Did you mean '{0}'?"),This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error:i(1371,1,"This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371","This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."),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:i(1375,1,"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:i(1376,3,"_0_was_imported_here_1376","'{0}' was imported here."),_0_was_exported_here:i(1377,3,"_0_was_exported_here_1377","'{0}' was exported here."),Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(1378,1,"Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378","Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type:i(1379,1,"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:i(1380,1,"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:i(1381,1,"Unexpected_token_Did_you_mean_or_rbrace_1381","Unexpected token. Did you mean `{'}'}` or `}`?"),Unexpected_token_Did_you_mean_or_gt:i(1382,1,"Unexpected_token_Did_you_mean_or_gt_1382","Unexpected token. Did you mean `{'>'}` or `>`?"),Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:i(1385,1,"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:i(1386,1,"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:i(1387,1,"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:i(1388,1,"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:i(1389,1,"_0_is_not_allowed_as_a_variable_declaration_name_1389","'{0}' is not allowed as a variable declaration name."),_0_is_not_allowed_as_a_parameter_name:i(1390,1,"_0_is_not_allowed_as_a_parameter_name_1390","'{0}' is not allowed as a parameter name."),An_import_alias_cannot_use_import_type:i(1392,1,"An_import_alias_cannot_use_import_type_1392","An import alias cannot use 'import type'"),Imported_via_0_from_file_1:i(1393,3,"Imported_via_0_from_file_1_1393","Imported via {0} from file '{1}'"),Imported_via_0_from_file_1_with_packageId_2:i(1394,3,"Imported_via_0_from_file_1_with_packageId_2_1394","Imported via {0} from file '{1}' with packageId '{2}'"),Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions:i(1395,3,"Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395","Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions:i(1396,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396","Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"),Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions:i(1397,3,"Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397","Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"),Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions:i(1398,3,"Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398","Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"),File_is_included_via_import_here:i(1399,3,"File_is_included_via_import_here_1399","File is included via import here."),Referenced_via_0_from_file_1:i(1400,3,"Referenced_via_0_from_file_1_1400","Referenced via '{0}' from file '{1}'"),File_is_included_via_reference_here:i(1401,3,"File_is_included_via_reference_here_1401","File is included via reference here."),Type_library_referenced_via_0_from_file_1:i(1402,3,"Type_library_referenced_via_0_from_file_1_1402","Type library referenced via '{0}' from file '{1}'"),Type_library_referenced_via_0_from_file_1_with_packageId_2:i(1403,3,"Type_library_referenced_via_0_from_file_1_with_packageId_2_1403","Type library referenced via '{0}' from file '{1}' with packageId '{2}'"),File_is_included_via_type_library_reference_here:i(1404,3,"File_is_included_via_type_library_reference_here_1404","File is included via type library reference here."),Library_referenced_via_0_from_file_1:i(1405,3,"Library_referenced_via_0_from_file_1_1405","Library referenced via '{0}' from file '{1}'"),File_is_included_via_library_reference_here:i(1406,3,"File_is_included_via_library_reference_here_1406","File is included via library reference here."),Matched_by_include_pattern_0_in_1:i(1407,3,"Matched_by_include_pattern_0_in_1_1407","Matched by include pattern '{0}' in '{1}'"),File_is_matched_by_include_pattern_specified_here:i(1408,3,"File_is_matched_by_include_pattern_specified_here_1408","File is matched by include pattern specified here."),Part_of_files_list_in_tsconfig_json:i(1409,3,"Part_of_files_list_in_tsconfig_json_1409","Part of 'files' list in tsconfig.json"),File_is_matched_by_files_list_specified_here:i(1410,3,"File_is_matched_by_files_list_specified_here_1410","File is matched by 'files' list specified here."),Output_from_referenced_project_0_included_because_1_specified:i(1411,3,"Output_from_referenced_project_0_included_because_1_specified_1411","Output from referenced project '{0}' included because '{1}' specified"),Output_from_referenced_project_0_included_because_module_is_specified_as_none:i(1412,3,"Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412","Output from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_output_from_referenced_project_specified_here:i(1413,3,"File_is_output_from_referenced_project_specified_here_1413","File is output from referenced project specified here."),Source_from_referenced_project_0_included_because_1_specified:i(1414,3,"Source_from_referenced_project_0_included_because_1_specified_1414","Source from referenced project '{0}' included because '{1}' specified"),Source_from_referenced_project_0_included_because_module_is_specified_as_none:i(1415,3,"Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415","Source from referenced project '{0}' included because '--module' is specified as 'none'"),File_is_source_from_referenced_project_specified_here:i(1416,3,"File_is_source_from_referenced_project_specified_here_1416","File is source from referenced project specified here."),Entry_point_of_type_library_0_specified_in_compilerOptions:i(1417,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_1417","Entry point of type library '{0}' specified in compilerOptions"),Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1:i(1418,3,"Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418","Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"),File_is_entry_point_of_type_library_specified_here:i(1419,3,"File_is_entry_point_of_type_library_specified_here_1419","File is entry point of type library specified here."),Entry_point_for_implicit_type_library_0:i(1420,3,"Entry_point_for_implicit_type_library_0_1420","Entry point for implicit type library '{0}'"),Entry_point_for_implicit_type_library_0_with_packageId_1:i(1421,3,"Entry_point_for_implicit_type_library_0_with_packageId_1_1421","Entry point for implicit type library '{0}' with packageId '{1}'"),Library_0_specified_in_compilerOptions:i(1422,3,"Library_0_specified_in_compilerOptions_1422","Library '{0}' specified in compilerOptions"),File_is_library_specified_here:i(1423,3,"File_is_library_specified_here_1423","File is library specified here."),Default_library:i(1424,3,"Default_library_1424","Default library"),Default_library_for_target_0:i(1425,3,"Default_library_for_target_0_1425","Default library for target '{0}'"),File_is_default_library_for_target_specified_here:i(1426,3,"File_is_default_library_for_target_specified_here_1426","File is default library for target specified here."),Root_file_specified_for_compilation:i(1427,3,"Root_file_specified_for_compilation_1427","Root file specified for compilation"),File_is_output_of_project_reference_source_0:i(1428,3,"File_is_output_of_project_reference_source_0_1428","File is output of project reference source '{0}'"),File_redirects_to_file_0:i(1429,3,"File_redirects_to_file_0_1429","File redirects to file '{0}'"),The_file_is_in_the_program_because_Colon:i(1430,3,"The_file_is_in_the_program_because_Colon_1430","The file is in the program because:"),for_await_loops_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:i(1431,1,"for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431","'for await' loops 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."),Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(1432,1,"Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432","Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters:i(1433,1,"Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433","Neither decorators nor modifiers may be applied to 'this' parameters."),Unexpected_keyword_or_identifier:i(1434,1,"Unexpected_keyword_or_identifier_1434","Unexpected keyword or identifier."),Unknown_keyword_or_identifier_Did_you_mean_0:i(1435,1,"Unknown_keyword_or_identifier_Did_you_mean_0_1435","Unknown keyword or identifier. Did you mean '{0}'?"),Decorators_must_precede_the_name_and_all_keywords_of_property_declarations:i(1436,1,"Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436","Decorators must precede the name and all keywords of property declarations."),Namespace_must_be_given_a_name:i(1437,1,"Namespace_must_be_given_a_name_1437","Namespace must be given a name."),Interface_must_be_given_a_name:i(1438,1,"Interface_must_be_given_a_name_1438","Interface must be given a name."),Type_alias_must_be_given_a_name:i(1439,1,"Type_alias_must_be_given_a_name_1439","Type alias must be given a name."),Variable_declaration_not_allowed_at_this_location:i(1440,1,"Variable_declaration_not_allowed_at_this_location_1440","Variable declaration not allowed at this location."),Cannot_start_a_function_call_in_a_type_annotation:i(1441,1,"Cannot_start_a_function_call_in_a_type_annotation_1441","Cannot start a function call in a type annotation."),Expected_for_property_initializer:i(1442,1,"Expected_for_property_initializer_1442","Expected '=' for property initializer."),Module_declaration_names_may_only_use_or_quoted_strings:i(1443,1,"Module_declaration_names_may_only_use_or_quoted_strings_1443",`Module declaration names may only use ' or " quoted strings.`),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled:i(1444,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444","'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled:i(1446,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled:i(1448,1,"_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448","'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."),Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed:i(1449,3,"Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449","Preserve unused imported values in the JavaScript output that would otherwise be removed."),Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments:i(1450,3,"Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450","Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"),Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression:i(1451,1,"Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451","Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),resolution_mode_should_be_either_require_or_import:i(1453,1,"resolution_mode_should_be_either_require_or_import_1453","`resolution-mode` should be either `require` or `import`."),resolution_mode_can_only_be_set_for_type_only_imports:i(1454,1,"resolution_mode_can_only_be_set_for_type_only_imports_1454","`resolution-mode` can only be set for type-only imports."),resolution_mode_is_the_only_valid_key_for_type_import_assertions:i(1455,1,"resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455","`resolution-mode` is the only valid key for type import assertions."),Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:i(1456,1,"Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456","Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."),Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk:i(1457,3,"Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457","Matched by default include pattern '**/*'"),File_is_ECMAScript_module_because_0_has_field_type_with_value_module:i(1458,3,"File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458",`File is ECMAScript module because '{0}' has field "type" with value "module"`),File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module:i(1459,3,"File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459",`File is CommonJS module because '{0}' has field "type" whose value is not "module"`),File_is_CommonJS_module_because_0_does_not_have_field_type:i(1460,3,"File_is_CommonJS_module_because_0_does_not_have_field_type_1460",`File is CommonJS module because '{0}' does not have field "type"`),File_is_CommonJS_module_because_package_json_was_not_found:i(1461,3,"File_is_CommonJS_module_because_package_json_was_not_found_1461","File is CommonJS module because 'package.json' was not found"),resolution_mode_is_the_only_valid_key_for_type_import_attributes:i(1463,1,"resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463","'resolution-mode' is the only valid key for type import attributes."),Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require:i(1464,1,"Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464","Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."),The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output:i(1470,1,"The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470","The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead:i(1471,1,"Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471","Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."),catch_or_finally_expected:i(1472,1,"catch_or_finally_expected_1472","'catch' or 'finally' expected."),An_import_declaration_can_only_be_used_at_the_top_level_of_a_module:i(1473,1,"An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473","An import declaration can only be used at the top level of a module."),An_export_declaration_can_only_be_used_at_the_top_level_of_a_module:i(1474,1,"An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474","An export declaration can only be used at the top level of a module."),Control_what_method_is_used_to_detect_module_format_JS_files:i(1475,3,"Control_what_method_is_used_to_detect_module_format_JS_files_1475","Control what method is used to detect module-format JS files."),auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules:i(1476,3,"auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476",'"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'),An_instantiation_expression_cannot_be_followed_by_a_property_access:i(1477,1,"An_instantiation_expression_cannot_be_followed_by_a_property_access_1477","An instantiation expression cannot be followed by a property access."),Identifier_or_string_literal_expected:i(1478,1,"Identifier_or_string_literal_expected_1478","Identifier or string literal expected."),The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead:i(1479,1,"The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479",`The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module:i(1480,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480",'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'),To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1:i(1481,3,"To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481",`To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`),To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0:i(1482,3,"To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482",'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'),To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module:i(1483,3,"To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483",'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:i(1484,1,"_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484","'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled:i(1485,1,"_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485","'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),Decorator_used_before_export_here:i(1486,1,"Decorator_used_before_export_here_1486","Decorator used before 'export' here."),Octal_escape_sequences_are_not_allowed_Use_the_syntax_0:i(1487,1,"Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487","Octal escape sequences are not allowed. Use the syntax '{0}'."),Escape_sequence_0_is_not_allowed:i(1488,1,"Escape_sequence_0_is_not_allowed_1488","Escape sequence '{0}' is not allowed."),Decimals_with_leading_zeros_are_not_allowed:i(1489,1,"Decimals_with_leading_zeros_are_not_allowed_1489","Decimals with leading zeros are not allowed."),File_appears_to_be_binary:i(1490,1,"File_appears_to_be_binary_1490","File appears to be binary."),_0_modifier_cannot_appear_on_a_using_declaration:i(1491,1,"_0_modifier_cannot_appear_on_a_using_declaration_1491","'{0}' modifier cannot appear on a 'using' declaration."),_0_declarations_may_not_have_binding_patterns:i(1492,1,"_0_declarations_may_not_have_binding_patterns_1492","'{0}' declarations may not have binding patterns."),The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration:i(1493,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493","The left-hand side of a 'for...in' statement cannot be a 'using' declaration."),The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration:i(1494,1,"The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494","The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."),_0_modifier_cannot_appear_on_an_await_using_declaration:i(1495,1,"_0_modifier_cannot_appear_on_an_await_using_declaration_1495","'{0}' modifier cannot appear on an 'await using' declaration."),Identifier_string_literal_or_number_literal_expected:i(1496,1,"Identifier_string_literal_or_number_literal_expected_1496","Identifier, string literal, or number literal expected."),The_types_of_0_are_incompatible_between_these_types:i(2200,1,"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:i(2201,1,"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:i(2202,1,"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:i(2203,1,"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:i(2204,1,"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:i(2205,1,"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),The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement:i(2206,1,"The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206","The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement:i(2207,1,"The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207","The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),This_type_parameter_might_need_an_extends_0_constraint:i(2208,1,"This_type_parameter_might_need_an_extends_0_constraint_2208","This type parameter might need an `extends {0}` constraint."),The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:i(2209,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209","The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate:i(2210,1,"The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210","The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),Add_extends_constraint:i(2211,3,"Add_extends_constraint_2211","Add `extends` constraint."),Add_extends_constraint_to_all_type_parameters:i(2212,3,"Add_extends_constraint_to_all_type_parameters_2212","Add `extends` constraint to all type parameters"),Duplicate_identifier_0:i(2300,1,"Duplicate_identifier_0_2300","Duplicate identifier '{0}'."),Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:i(2301,1,"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:i(2302,1,"Static_members_cannot_reference_class_type_parameters_2302","Static members cannot reference class type parameters."),Circular_definition_of_import_alias_0:i(2303,1,"Circular_definition_of_import_alias_0_2303","Circular definition of import alias '{0}'."),Cannot_find_name_0:i(2304,1,"Cannot_find_name_0_2304","Cannot find name '{0}'."),Module_0_has_no_exported_member_1:i(2305,1,"Module_0_has_no_exported_member_1_2305","Module '{0}' has no exported member '{1}'."),File_0_is_not_a_module:i(2306,1,"File_0_is_not_a_module_2306","File '{0}' is not a module."),Cannot_find_module_0_or_its_corresponding_type_declarations:i(2307,1,"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:i(2308,1,"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:i(2309,1,"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:i(2310,1,"Type_0_recursively_references_itself_as_a_base_type_2310","Type '{0}' recursively references itself as a base type."),Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function:i(2311,1,"Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311","Cannot find name '{0}'. Did you mean to write this in an async function?"),An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members:i(2312,1,"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:i(2313,1,"Type_parameter_0_has_a_circular_constraint_2313","Type parameter '{0}' has a circular constraint."),Generic_type_0_requires_1_type_argument_s:i(2314,1,"Generic_type_0_requires_1_type_argument_s_2314","Generic type '{0}' requires {1} type argument(s)."),Type_0_is_not_generic:i(2315,1,"Type_0_is_not_generic_2315","Type '{0}' is not generic."),Global_type_0_must_be_a_class_or_interface_type:i(2316,1,"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:i(2317,1,"Global_type_0_must_have_1_type_parameter_s_2317","Global type '{0}' must have {1} type parameter(s)."),Cannot_find_global_type_0:i(2318,1,"Cannot_find_global_type_0_2318","Cannot find global type '{0}'."),Named_property_0_of_types_1_and_2_are_not_identical:i(2319,1,"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:i(2320,1,"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:i(2321,1,"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:i(2322,1,"Type_0_is_not_assignable_to_type_1_2322","Type '{0}' is not assignable to type '{1}'."),Cannot_redeclare_exported_variable_0:i(2323,1,"Cannot_redeclare_exported_variable_0_2323","Cannot redeclare exported variable '{0}'."),Property_0_is_missing_in_type_1:i(2324,1,"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:i(2325,1,"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:i(2326,1,"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:i(2327,1,"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:i(2328,1,"Types_of_parameters_0_and_1_are_incompatible_2328","Types of parameters '{0}' and '{1}' are incompatible."),Index_signature_for_type_0_is_missing_in_type_1:i(2329,1,"Index_signature_for_type_0_is_missing_in_type_1_2329","Index signature for type '{0}' is missing in type '{1}'."),_0_and_1_index_signatures_are_incompatible:i(2330,1,"_0_and_1_index_signatures_are_incompatible_2330","'{0}' and '{1}' index signatures are incompatible."),this_cannot_be_referenced_in_a_module_or_namespace_body:i(2331,1,"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:i(2332,1,"this_cannot_be_referenced_in_current_location_2332","'this' cannot be referenced in current location."),this_cannot_be_referenced_in_constructor_arguments:i(2333,1,"this_cannot_be_referenced_in_constructor_arguments_2333","'this' cannot be referenced in constructor arguments."),this_cannot_be_referenced_in_a_static_property_initializer:i(2334,1,"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:i(2335,1,"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:i(2336,1,"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:i(2337,1,"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:i(2338,1,"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:i(2339,1,"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:i(2340,1,"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:i(2341,1,"Property_0_is_private_and_only_accessible_within_class_1_2341","Property '{0}' is private and only accessible within class '{1}'."),This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0:i(2343,1,"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:i(2344,1,"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:i(2345,1,"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}'."),Untyped_function_calls_may_not_accept_type_arguments:i(2347,1,"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:i(2348,1,"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:i(2349,1,"This_expression_is_not_callable_2349","This expression is not callable."),Only_a_void_function_can_be_called_with_the_new_keyword:i(2350,1,"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:i(2351,1,"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:i(2352,1,"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:i(2353,1,"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:i(2354,1,"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_undefined_void_nor_any_must_return_a_value:i(2355,1,"A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355","A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."),An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type:i(2356,1,"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:i(2357,1,"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:i(2358,1,"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_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method:i(2359,1,"The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359","The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."),The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type:i(2362,1,"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:i(2363,1,"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:i(2364,1,"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:i(2365,1,"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:i(2366,1,"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_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap:i(2367,1,"This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367","This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."),Type_parameter_name_cannot_be_0:i(2368,1,"Type_parameter_name_cannot_be_0_2368","Type parameter name cannot be '{0}'."),A_parameter_property_is_only_allowed_in_a_constructor_implementation:i(2369,1,"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:i(2370,1,"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:i(2371,1,"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:i(2372,1,"Parameter_0_cannot_reference_itself_2372","Parameter '{0}' cannot reference itself."),Parameter_0_cannot_reference_identifier_1_declared_after_it:i(2373,1,"Parameter_0_cannot_reference_identifier_1_declared_after_it_2373","Parameter '{0}' cannot reference identifier '{1}' declared after it."),Duplicate_index_signature_for_type_0:i(2374,1,"Duplicate_index_signature_for_type_0_2374","Duplicate index signature for type '{0}'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:i(2375,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers:i(2376,1,"A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376","A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."),Constructors_for_derived_classes_must_contain_a_super_call:i(2377,1,"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:i(2378,1,"A_get_accessor_must_return_a_value_2378","A 'get' accessor must return a value."),Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties:i(2379,1,"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379","Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),Overload_signatures_must_all_be_exported_or_non_exported:i(2383,1,"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:i(2384,1,"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:i(2385,1,"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:i(2386,1,"Overload_signatures_must_all_be_optional_or_required_2386","Overload signatures must all be optional or required."),Function_overload_must_be_static:i(2387,1,"Function_overload_must_be_static_2387","Function overload must be static."),Function_overload_must_not_be_static:i(2388,1,"Function_overload_must_not_be_static_2388","Function overload must not be static."),Function_implementation_name_must_be_0:i(2389,1,"Function_implementation_name_must_be_0_2389","Function implementation name must be '{0}'."),Constructor_implementation_is_missing:i(2390,1,"Constructor_implementation_is_missing_2390","Constructor implementation is missing."),Function_implementation_is_missing_or_not_immediately_following_the_declaration:i(2391,1,"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:i(2392,1,"Multiple_constructor_implementations_are_not_allowed_2392","Multiple constructor implementations are not allowed."),Duplicate_function_implementation:i(2393,1,"Duplicate_function_implementation_2393","Duplicate function implementation."),This_overload_signature_is_not_compatible_with_its_implementation_signature:i(2394,1,"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:i(2395,1,"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:i(2396,1,"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:i(2397,1,"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:i(2398,1,"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:i(2399,1,"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:i(2400,1,"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."),A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers:i(2401,1,"A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401","A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."),Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:i(2402,1,"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:i(2403,1,"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:i(2404,1,"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:i(2405,1,"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:i(2406,1,"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:i(2407,1,"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:i(2408,1,"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:i(2409,1,"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:i(2410,1,"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'."),Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target:i(2412,1,"Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412","Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),Property_0_of_type_1_is_not_assignable_to_2_index_type_3:i(2411,1,"Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411","Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),_0_index_type_1_is_not_assignable_to_2_index_type_3:i(2413,1,"_0_index_type_1_is_not_assignable_to_2_index_type_3_2413","'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),Class_name_cannot_be_0:i(2414,1,"Class_name_cannot_be_0_2414","Class name cannot be '{0}'."),Class_0_incorrectly_extends_base_class_1:i(2415,1,"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:i(2416,1,"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:i(2417,1,"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:i(2418,1,"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:i(2419,1,"Types_of_construct_signatures_are_incompatible_2419","Types of construct signatures are incompatible."),Class_0_incorrectly_implements_interface_1:i(2420,1,"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:i(2422,1,"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:i(2423,1,"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:i(2425,1,"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:i(2426,1,"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:i(2427,1,"Interface_name_cannot_be_0_2427","Interface name cannot be '{0}'."),All_declarations_of_0_must_have_identical_type_parameters:i(2428,1,"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:i(2430,1,"Interface_0_incorrectly_extends_interface_1_2430","Interface '{0}' incorrectly extends interface '{1}'."),Enum_name_cannot_be_0:i(2431,1,"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:i(2432,1,"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:i(2433,1,"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:i(2434,1,"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:i(2435,1,"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:i(2436,1,"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:i(2437,1,"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:i(2438,1,"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:i(2439,1,"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:i(2440,1,"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:i(2441,1,"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:i(2442,1,"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:i(2443,1,"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:i(2444,1,"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:i(2445,1,"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_This_is_an_instance_of_class_2:i(2446,1,"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446","Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:i(2447,1,"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:i(2448,1,"Block_scoped_variable_0_used_before_its_declaration_2448","Block-scoped variable '{0}' used before its declaration."),Class_0_used_before_its_declaration:i(2449,1,"Class_0_used_before_its_declaration_2449","Class '{0}' used before its declaration."),Enum_0_used_before_its_declaration:i(2450,1,"Enum_0_used_before_its_declaration_2450","Enum '{0}' used before its declaration."),Cannot_redeclare_block_scoped_variable_0:i(2451,1,"Cannot_redeclare_block_scoped_variable_0_2451","Cannot redeclare block-scoped variable '{0}'."),An_enum_member_cannot_have_a_numeric_name:i(2452,1,"An_enum_member_cannot_have_a_numeric_name_2452","An enum member cannot have a numeric name."),Variable_0_is_used_before_being_assigned:i(2454,1,"Variable_0_is_used_before_being_assigned_2454","Variable '{0}' is used before being assigned."),Type_alias_0_circularly_references_itself:i(2456,1,"Type_alias_0_circularly_references_itself_2456","Type alias '{0}' circularly references itself."),Type_alias_name_cannot_be_0:i(2457,1,"Type_alias_name_cannot_be_0_2457","Type alias name cannot be '{0}'."),An_AMD_module_cannot_have_multiple_name_assignments:i(2458,1,"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:i(2459,1,"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:i(2460,1,"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:i(2461,1,"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:i(2462,1,"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:i(2463,1,"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:i(2464,1,"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:i(2465,1,"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:i(2466,1,"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:i(2467,1,"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:i(2468,1,"Cannot_find_global_value_0_2468","Cannot find global value '{0}'."),The_0_operator_cannot_be_applied_to_type_symbol:i(2469,1,"The_0_operator_cannot_be_applied_to_type_symbol_2469","The '{0}' operator cannot be applied to type 'symbol'."),Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:i(2472,1,"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:i(2473,1,"Enum_declarations_must_all_be_const_or_non_const_2473","Enum declarations must all be const or non-const."),const_enum_member_initializers_must_be_constant_expressions:i(2474,1,"const_enum_member_initializers_must_be_constant_expressions_2474","const enum member initializers must be constant expressions."),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:i(2475,1,"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:i(2476,1,"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:i(2477,1,"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:i(2478,1,"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478","'const' enum member initializer was evaluated to disallowed value 'NaN'."),let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:i(2480,1,"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:i(2481,1,"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:i(2483,1,"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:i(2484,1,"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:i(2487,1,"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:i(2488,1,"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:i(2489,1,"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:i(2490,1,"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:i(2491,1,"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:i(2492,1,"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:i(2493,1,"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:i(2494,1,"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:i(2495,1,"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:i(2496,1,"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:i(2497,1,"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:i(2498,1,"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:i(2499,1,"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:i(2500,1,"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:i(2501,1,"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:i(2502,1,"_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:i(2503,1,"Cannot_find_namespace_0_2503","Cannot find namespace '{0}'."),Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator:i(2504,1,"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:i(2505,1,"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:i(2506,1,"_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:i(2507,1,"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:i(2508,1,"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:i(2509,1,"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:i(2510,1,"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:i(2511,1,"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:i(2512,1,"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:i(2513,1,"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."),A_tuple_type_cannot_be_indexed_with_a_negative_value:i(2514,1,"A_tuple_type_cannot_be_indexed_with_a_negative_value_2514","A tuple type cannot be indexed with a negative value."),Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:i(2515,1,"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:i(2516,1,"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:i(2517,1,"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:i(2518,1,"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:i(2519,1,"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:i(2520,1,"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520","Duplicate identifier '{0}'. Compiler uses declaration '{1}' 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:i(2522,1,"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:i(2523,1,"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:i(2524,1,"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:i(2525,1,"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:i(2526,1,"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:i(2527,1,"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:i(2528,1,"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:i(2529,1,"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:i(2530,1,"Property_0_is_incompatible_with_index_signature_2530","Property '{0}' is incompatible with index signature."),Object_is_possibly_null:i(2531,1,"Object_is_possibly_null_2531","Object is possibly 'null'."),Object_is_possibly_undefined:i(2532,1,"Object_is_possibly_undefined_2532","Object is possibly 'undefined'."),Object_is_possibly_null_or_undefined:i(2533,1,"Object_is_possibly_null_or_undefined_2533","Object is possibly 'null' or 'undefined'."),A_function_returning_never_cannot_have_a_reachable_end_point:i(2534,1,"A_function_returning_never_cannot_have_a_reachable_end_point_2534","A function returning 'never' cannot have a reachable end point."),Type_0_cannot_be_used_to_index_type_1:i(2536,1,"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:i(2537,1,"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:i(2538,1,"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:i(2539,1,"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:i(2540,1,"Cannot_assign_to_0_because_it_is_a_read_only_property_2540","Cannot assign to '{0}' because it is a read-only property."),Index_signature_in_type_0_only_permits_reading:i(2542,1,"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:i(2543,1,"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:i(2544,1,"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:i(2545,1,"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:i(2547,1,"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:i(2548,1,"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:i(2549,1,"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:i(2550,1,"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:i(2551,1,"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:i(2552,1,"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:i(2553,1,"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:i(2554,1,"Expected_0_arguments_but_got_1_2554","Expected {0} arguments, but got {1}."),Expected_at_least_0_arguments_but_got_1:i(2555,1,"Expected_at_least_0_arguments_but_got_1_2555","Expected at least {0} arguments, but got {1}."),A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter:i(2556,1,"A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556","A spread argument must either have a tuple type or be passed to a rest parameter."),Expected_0_type_arguments_but_got_1:i(2558,1,"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:i(2559,1,"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:i(2560,1,"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:i(2561,1,"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:i(2562,1,"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:i(2563,1,"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:i(2564,1,"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:i(2565,1,"Property_0_is_used_before_being_assigned_2565","Property '{0}' is used before being assigned."),A_rest_element_cannot_have_a_property_name:i(2566,1,"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:i(2567,1,"Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567","Enum declarations can only merge with namespace or other enum declarations."),Property_0_may_not_exist_on_type_1_Did_you_mean_2:i(2568,1,"Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568","Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),Could_not_find_name_0_Did_you_mean_1:i(2570,1,"Could_not_find_name_0_Did_you_mean_1_2570","Could not find name '{0}'. Did you mean '{1}'?"),Object_is_of_type_unknown:i(2571,1,"Object_is_of_type_unknown_2571","Object is of type 'unknown'."),A_rest_element_type_must_be_an_array_type:i(2574,1,"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:i(2575,1,"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_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead:i(2576,1,"Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576","Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),Return_type_annotation_circularly_references_itself:i(2577,1,"Return_type_annotation_circularly_references_itself_2577","Return type annotation circularly references itself."),Unused_ts_expect_error_directive:i(2578,1,"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:i(2580,1,"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:i(2581,1,"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:i(2582,1,"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:i(2583,1,"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:i(2584,1,"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:i(2585,1,"_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."),Cannot_assign_to_0_because_it_is_a_constant:i(2588,1,"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:i(2589,1,"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:i(2590,1,"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:i(2591,1,"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:i(2592,1,"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:i(2593,1,"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_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag:i(2594,1,"This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594","This module is declared with '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:i(2595,1,"_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:i(2596,1,"_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:i(2597,1,"_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:i(2598,1,"_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_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:i(2602,1,"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:i(2603,1,"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:i(2604,1,"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."),Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:i(2606,1,"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:i(2607,1,"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:i(2608,1,"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:i(2609,1,"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:i(2610,1,"_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:i(2611,1,"_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:i(2612,1,"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:i(2613,1,"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:i(2614,1,"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:i(2615,1,"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:i(2616,1,"_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:i(2617,1,"_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:i(2618,1,"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:i(2619,1,"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:i(2620,1,"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:i(2621,1,"Target_allows_only_0_element_s_but_source_may_have_more_2621","Target allows only {0} element(s) but source may have more."),Source_provides_no_match_for_required_element_at_position_0_in_target:i(2623,1,"Source_provides_no_match_for_required_element_at_position_0_in_target_2623","Source provides no match for required element at position {0} in target."),Source_provides_no_match_for_variadic_element_at_position_0_in_target:i(2624,1,"Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624","Source provides no match for variadic element at position {0} in target."),Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target:i(2625,1,"Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625","Variadic element at position {0} in source does not match element at position {1} in target."),Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target:i(2626,1,"Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626","Type at position {0} in source is not compatible with type at position {1} in target."),Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target:i(2627,1,"Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627","Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),Cannot_assign_to_0_because_it_is_an_enum:i(2628,1,"Cannot_assign_to_0_because_it_is_an_enum_2628","Cannot assign to '{0}' because it is an enum."),Cannot_assign_to_0_because_it_is_a_class:i(2629,1,"Cannot_assign_to_0_because_it_is_a_class_2629","Cannot assign to '{0}' because it is a class."),Cannot_assign_to_0_because_it_is_a_function:i(2630,1,"Cannot_assign_to_0_because_it_is_a_function_2630","Cannot assign to '{0}' because it is a function."),Cannot_assign_to_0_because_it_is_a_namespace:i(2631,1,"Cannot_assign_to_0_because_it_is_a_namespace_2631","Cannot assign to '{0}' because it is a namespace."),Cannot_assign_to_0_because_it_is_an_import:i(2632,1,"Cannot_assign_to_0_because_it_is_an_import_2632","Cannot assign to '{0}' because it is an import."),JSX_property_access_expressions_cannot_include_JSX_namespace_names:i(2633,1,"JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633","JSX property access expressions cannot include JSX namespace names"),_0_index_signatures_are_incompatible:i(2634,1,"_0_index_signatures_are_incompatible_2634","'{0}' index signatures are incompatible."),Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable:i(2635,1,"Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635","Type '{0}' has no signatures for which the type argument list is applicable."),Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation:i(2636,1,"Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636","Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types:i(2637,1,"Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637","Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator:i(2638,1,"Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638","Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),React_components_cannot_include_JSX_namespace_names:i(2639,1,"React_components_cannot_include_JSX_namespace_names_2639","React components cannot include JSX namespace names"),Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity:i(2649,1,"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:i(2651,1,"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:i(2652,1,"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:i(2653,1,"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}'."),JSX_expressions_must_have_one_parent_element:i(2657,1,"JSX_expressions_must_have_one_parent_element_2657","JSX expressions must have one parent element."),Type_0_provides_no_match_for_the_signature_1:i(2658,1,"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:i(2659,1,"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:i(2660,1,"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:i(2661,1,"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:i(2662,1,"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:i(2663,1,"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:i(2664,1,"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:i(2665,1,"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:i(2666,1,"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:i(2667,1,"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:i(2668,1,"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:i(2669,1,"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:i(2670,1,"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:i(2671,1,"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:i(2672,1,"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:i(2673,1,"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:i(2674,1,"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:i(2675,1,"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:i(2676,1,"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:i(2677,1,"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:i(2678,1,"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:i(2679,1,"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:i(2680,1,"A_0_parameter_must_be_the_first_parameter_2680","A '{0}' parameter must be the first parameter."),A_constructor_cannot_have_a_this_parameter:i(2681,1,"A_constructor_cannot_have_a_this_parameter_2681","A constructor cannot have a 'this' parameter."),this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation:i(2683,1,"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:i(2684,1,"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:i(2685,1,"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:i(2686,1,"_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:i(2687,1,"All_declarations_of_0_must_have_identical_modifiers_2687","All declarations of '{0}' must have identical modifiers."),Cannot_find_type_definition_file_for_0:i(2688,1,"Cannot_find_type_definition_file_for_0_2688","Cannot find type definition file for '{0}'."),Cannot_extend_an_interface_0_Did_you_mean_implements:i(2689,1,"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:i(2690,1,"_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}'?"),_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible:i(2692,1,"_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:i(2693,1,"_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:i(2694,1,"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:i(2695,1,"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:i(2696,1,"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:i(2697,1,"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:i(2698,1,"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:i(2699,1,"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:i(2700,1,"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:i(2701,1,"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:i(2702,1,"_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:i(2703,1,"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:i(2704,1,"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:i(2705,1,"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:i(2706,1,"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:i(2707,1,"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:i(2708,1,"Cannot_use_namespace_0_as_a_value_2708","Cannot use namespace '{0}' as a value."),Cannot_use_namespace_0_as_a_type:i(2709,1,"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:i(2710,1,"_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:i(2711,1,"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:i(2712,1,"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:i(2713,1,"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:i(2714,1,"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:i(2715,1,"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:i(2716,1,"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:i(2717,1,"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:i(2718,1,"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:i(2719,1,"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:i(2720,1,"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:i(2721,1,"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:i(2722,1,"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:i(2723,1,"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:i(2724,1,"_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:i(2725,1,"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:i(2726,1,"Cannot_find_lib_definition_for_0_2726","Cannot find lib definition for '{0}'."),Cannot_find_lib_definition_for_0_Did_you_mean_1:i(2727,1,"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:i(2728,3,"_0_is_declared_here_2728","'{0}' is declared here."),Property_0_is_used_before_its_initialization:i(2729,1,"Property_0_is_used_before_its_initialization_2729","Property '{0}' is used before its initialization."),An_arrow_function_cannot_have_a_this_parameter:i(2730,1,"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:i(2731,1,"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:i(2732,1,"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:i(2733,1,"Property_0_was_also_declared_here_2733","Property '{0}' was also declared here."),Are_you_missing_a_semicolon:i(2734,1,"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:i(2735,1,"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:i(2736,1,"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:i(2737,1,"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:i(2738,3,"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:i(2739,1,"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:i(2740,1,"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:i(2741,1,"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:i(2742,1,"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:i(2743,1,"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:i(2744,1,"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:i(2745,1,"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:i(2746,1,"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:i(2747,1,"_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_0_is_enabled:i(2748,1,"Cannot_access_ambient_const_enums_when_0_is_enabled_2748","Cannot access ambient const enums when '{0}' is enabled."),_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0:i(2749,1,"_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:i(2750,1,"The_implementation_signature_is_declared_here_2750","The implementation signature is declared here."),Circularity_originates_in_type_at_this_location:i(2751,1,"Circularity_originates_in_type_at_this_location_2751","Circularity originates in type at this location."),The_first_export_default_is_here:i(2752,1,"The_first_export_default_is_here_2752","The first export default is here."),Another_export_default_is_here:i(2753,1,"Another_export_default_is_here_2753","Another export default is here."),super_may_not_use_type_arguments:i(2754,1,"super_may_not_use_type_arguments_2754","'super' may not use type arguments."),No_constituent_of_type_0_is_callable:i(2755,1,"No_constituent_of_type_0_is_callable_2755","No constituent of type '{0}' is callable."),Not_all_constituents_of_type_0_are_callable:i(2756,1,"Not_all_constituents_of_type_0_are_callable_2756","Not all constituents of type '{0}' are callable."),Type_0_has_no_call_signatures:i(2757,1,"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:i(2758,1,"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:i(2759,1,"No_constituent_of_type_0_is_constructable_2759","No constituent of type '{0}' is constructable."),Not_all_constituents_of_type_0_are_constructable:i(2760,1,"Not_all_constituents_of_type_0_are_constructable_2760","Not all constituents of type '{0}' are constructable."),Type_0_has_no_construct_signatures:i(2761,1,"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:i(2762,1,"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:i(2763,1,"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:i(2764,1,"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:i(2765,1,"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:i(2766,1,"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:i(2767,1,"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:i(2768,1,"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:i(2769,1,"No_overload_matches_this_call_2769","No overload matches this call."),The_last_overload_gave_the_following_error:i(2770,1,"The_last_overload_gave_the_following_error_2770","The last overload gave the following error."),The_last_overload_is_declared_here:i(2771,1,"The_last_overload_is_declared_here_2771","The last overload is declared here."),Overload_0_of_1_2_gave_the_following_error:i(2772,1,"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:i(2773,1,"Did_you_forget_to_use_await_2773","Did you forget to use 'await'?"),This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead:i(2774,1,"This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774","This condition will always return true since this 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:i(2775,1,"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:i(2776,1,"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:i(2777,1,"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:i(2778,1,"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:i(2779,1,"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:i(2780,1,"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:i(2781,1,"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:i(2782,3,"_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:i(2783,1,"_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:i(2784,1,"get_and_set_accessors_cannot_declare_this_parameters_2784","'get' and 'set' accessors cannot declare 'this' parameters."),This_spread_always_overwrites_this_property:i(2785,1,"This_spread_always_overwrites_this_property_2785","This spread always overwrites this property."),_0_cannot_be_used_as_a_JSX_component:i(2786,1,"_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:i(2787,1,"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:i(2788,1,"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:i(2789,1,"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:i(2790,1,"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:i(2791,1,"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_nodenext_or_to_add_aliases_to_the_paths_option:i(2792,1,"Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792","Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', 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:i(2793,1,"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:i(2794,1,"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:i(2795,1,"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:i(2796,1,"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."),A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract:i(2797,1,"A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797","A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."),The_declaration_was_marked_as_deprecated_here:i(2798,1,"The_declaration_was_marked_as_deprecated_here_2798","The declaration was marked as deprecated here."),Type_produces_a_tuple_type_that_is_too_large_to_represent:i(2799,1,"Type_produces_a_tuple_type_that_is_too_large_to_represent_2799","Type produces a tuple type that is too large to represent."),Expression_produces_a_tuple_type_that_is_too_large_to_represent:i(2800,1,"Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800","Expression produces a tuple type that is too large to represent."),This_condition_will_always_return_true_since_this_0_is_always_defined:i(2801,1,"This_condition_will_always_return_true_since_this_0_is_always_defined_2801","This condition will always return true since this '{0}' is always defined."),Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher:i(2802,1,"Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802","Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),Cannot_assign_to_private_method_0_Private_methods_are_not_writable:i(2803,1,"Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803","Cannot assign to private method '{0}'. Private methods are not writable."),Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name:i(2804,1,"Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804","Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),Private_accessor_was_defined_without_a_getter:i(2806,1,"Private_accessor_was_defined_without_a_getter_2806","Private accessor was defined without a getter."),This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0:i(2807,1,"This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807","This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),A_get_accessor_must_be_at_least_as_accessible_as_the_setter:i(2808,1,"A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808","A get accessor must be at least as accessible as the setter"),Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses:i(2809,1,"Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809","Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."),Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments:i(2810,1,"Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810","Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."),Initializer_for_property_0:i(2811,1,"Initializer_for_property_0_2811","Initializer for property '{0}'"),Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom:i(2812,1,"Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812","Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),Class_declaration_cannot_implement_overload_list_for_0:i(2813,1,"Class_declaration_cannot_implement_overload_list_for_0_2813","Class declaration cannot implement overload list for '{0}'."),Function_with_bodies_can_only_merge_with_classes_that_are_ambient:i(2814,1,"Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814","Function with bodies can only merge with classes that are ambient."),arguments_cannot_be_referenced_in_property_initializers:i(2815,1,"arguments_cannot_be_referenced_in_property_initializers_2815","'arguments' cannot be referenced in property initializers."),Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class:i(2816,1,"Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816","Cannot use 'this' in a static property initializer of a decorated class."),Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block:i(2817,1,"Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817","Property '{0}' has no initializer and is not definitely assigned in a class static block."),Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers:i(2818,1,"Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818","Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),Namespace_name_cannot_be_0:i(2819,1,"Namespace_name_cannot_be_0_2819","Namespace name cannot be '{0}'."),Type_0_is_not_assignable_to_type_1_Did_you_mean_2:i(2820,1,"Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820","Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext:i(2821,1,"Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821","Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),Import_assertions_cannot_be_used_with_type_only_imports_or_exports:i(2822,1,"Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822","Import assertions cannot be used with type-only imports or exports."),Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext:i(2823,1,"Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2823","Import attributes are only supported when the '--module' option is set to 'esnext' or 'nodenext'."),Cannot_find_namespace_0_Did_you_mean_1:i(2833,1,"Cannot_find_namespace_0_Did_you_mean_1_2833","Cannot find namespace '{0}'. Did you mean '{1}'?"),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path:i(2834,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."),Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0:i(2835,1,"Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835","Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"),Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:i(2836,1,"Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836","Import assertions are not allowed on statements that compile to CommonJS 'require' calls."),Import_assertion_values_must_be_string_literal_expressions:i(2837,1,"Import_assertion_values_must_be_string_literal_expressions_2837","Import assertion values must be string literal expressions."),All_declarations_of_0_must_have_identical_constraints:i(2838,1,"All_declarations_of_0_must_have_identical_constraints_2838","All declarations of '{0}' must have identical constraints."),This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value:i(2839,1,"This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839","This condition will always return '{0}' since JavaScript compares objects by reference, not value."),An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types:i(2840,1,"An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840","An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation:i(2842,1,"_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842","'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here:i(2843,1,"We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843","We can only write a type for '{0}' by adding a type for the entire parameter here."),Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:i(2844,1,"Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844","Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),This_condition_will_always_return_0:i(2845,1,"This_condition_will_always_return_0_2845","This condition will always return '{0}'."),A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead:i(2846,1,"A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846","A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"),The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression:i(2848,1,"The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848","The right-hand side of an 'instanceof' expression must not be an instantiation expression."),Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1:i(2849,1,"Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849","Target signature provides too few arguments. Expected {0} or more, but got {1}."),The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined:i(2850,1,"The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850","The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined:i(2851,1,"The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851","The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."),await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules:i(2852,1,"await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852","'await using' statements are only allowed within async functions and at the top levels of modules."),await_using_statements_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:i(2853,1,"await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853","'await using' statements 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."),Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher:i(2854,1,"Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854","Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super:i(2855,1,"Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855","Class field '{0}' defined by the parent class is not accessible in the child class via super."),Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls:i(2856,1,"Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856","Import attributes are not allowed on statements that compile to CommonJS 'require' calls."),Import_attributes_cannot_be_used_with_type_only_imports_or_exports:i(2857,1,"Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857","Import attributes cannot be used with type-only imports or exports."),Import_attribute_values_must_be_string_literal_expressions:i(2858,1,"Import_attribute_values_must_be_string_literal_expressions_2858","Import attribute values must be string literal expressions."),Excessive_complexity_comparing_types_0_and_1:i(2859,1,"Excessive_complexity_comparing_types_0_and_1_2859","Excessive complexity comparing types '{0}' and '{1}'."),The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method:i(2860,1,"The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860","The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression:i(2861,1,"An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861","An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),Type_0_is_generic_and_can_only_be_indexed_for_reading:i(2862,1,"Type_0_is_generic_and_can_only_be_indexed_for_reading_2862","Type '{0}' is generic and can only be indexed for reading."),A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values:i(2863,1,"A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863","A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types:i(2864,1,"A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864","A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),Import_declaration_0_is_using_private_name_1:i(4e3,1,"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:i(4002,1,"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:i(4004,1,"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:i(4006,1,"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:i(4008,1,"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:i(4010,1,"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:i(4012,1,"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:i(4014,1,"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:i(4016,1,"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:i(4019,1,"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:i(4020,1,"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:i(4021,1,"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:i(4022,1,"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:i(4023,1,"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:i(4024,1,"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:i(4025,1,"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:i(4026,1,"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:i(4027,1,"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:i(4028,1,"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:i(4029,1,"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:i(4030,1,"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:i(4031,1,"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:i(4032,1,"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:i(4033,1,"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:i(4034,1,"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:i(4035,1,"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:i(4036,1,"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:i(4037,1,"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:i(4038,1,"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:i(4039,1,"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:i(4040,1,"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:i(4041,1,"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:i(4042,1,"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:i(4043,1,"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:i(4044,1,"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:i(4045,1,"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:i(4046,1,"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:i(4047,1,"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:i(4048,1,"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:i(4049,1,"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:i(4050,1,"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:i(4051,1,"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:i(4052,1,"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:i(4053,1,"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:i(4054,1,"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:i(4055,1,"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:i(4056,1,"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:i(4057,1,"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:i(4058,1,"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:i(4059,1,"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:i(4060,1,"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:i(4061,1,"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:i(4062,1,"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:i(4063,1,"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:i(4064,1,"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:i(4065,1,"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:i(4066,1,"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:i(4067,1,"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:i(4068,1,"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:i(4069,1,"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:i(4070,1,"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:i(4071,1,"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:i(4072,1,"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:i(4073,1,"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:i(4074,1,"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:i(4075,1,"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:i(4076,1,"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:i(4077,1,"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:i(4078,1,"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:i(4081,1,"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:i(4082,1,"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:i(4083,1,"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}'."),Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2:i(4084,1,"Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084","Exported type alias '{0}' has or is using private name '{1}' from module {2}."),Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1:i(4085,1,"Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085","Extends clause for inferred type '{0}' 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:i(4090,1,"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:i(4091,1,"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:i(4092,1,"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:i(4094,1,"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:i(4095,1,"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:i(4096,1,"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:i(4097,1,"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:i(4098,1,"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:i(4099,1,"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:i(4100,1,"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:i(4101,1,"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:i(4102,1,"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:i(4103,1,"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:i(4104,1,"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:i(4105,1,"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:i(4106,1,"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:i(4107,1,"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:i(4108,1,"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:i(4109,1,"Type_arguments_for_0_circularly_reference_themselves_4109","Type arguments for '{0}' circularly reference themselves."),Tuple_type_arguments_circularly_reference_themselves:i(4110,1,"Tuple_type_arguments_circularly_reference_themselves_4110","Tuple type arguments circularly reference themselves."),Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0:i(4111,1,"Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111","Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class:i(4112,1,"This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112","This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0:i(4113,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0:i(4114,1,"This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114","This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0:i(4115,1,"This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115","This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0:i(4116,1,"This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116","This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:i(4117,1,"This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117","This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized:i(4118,1,"The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118","The type of this node cannot be serialized because its property '{0}' cannot be serialized."),This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:i(4119,1,"This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119","This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0:i(4120,1,"This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120","This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class:i(4121,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121","This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0:i(4122,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122","This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1:i(4123,1,"This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123","This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next:i(4124,1,"Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124","Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),The_current_host_does_not_support_the_0_option:i(5001,1,"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:i(5009,1,"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:i(5010,1,"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:i(5012,1,"Cannot_read_file_0_Colon_1_5012","Cannot read file '{0}': {1}."),Failed_to_parse_file_0_Colon_1:i(5014,1,"Failed_to_parse_file_0_Colon_1_5014","Failed to parse file '{0}': {1}."),Unknown_compiler_option_0:i(5023,1,"Unknown_compiler_option_0_5023","Unknown compiler option '{0}'."),Compiler_option_0_requires_a_value_of_type_1:i(5024,1,"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:i(5025,1,"Unknown_compiler_option_0_Did_you_mean_1_5025","Unknown compiler option '{0}'. Did you mean '{1}'?"),Could_not_write_file_0_Colon_1:i(5033,1,"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:i(5042,1,"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:i(5047,1,"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:i(5048,1,"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:i(5051,1,"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:i(5052,1,"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:i(5053,1,"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:i(5054,1,"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:i(5055,1,"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:i(5056,1,"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:i(5057,1,"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:i(5058,1,"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:i(5059,1,"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:i(5061,1,"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:i(5062,1,"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:i(5063,1,"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:i(5064,1,"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:i(5065,1,"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:i(5066,1,"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:i(5067,1,"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:i(5068,1,"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:i(5069,1,"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_when_moduleResolution_is_set_to_classic:i(5070,1,"Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070","Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."),Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext:i(5071,1,"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:i(5072,1,"Unknown_build_option_0_5072","Unknown build option '{0}'."),Build_option_0_requires_a_value_of_type_1:i(5073,1,"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:i(5074,1,"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:i(5075,1,"_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:i(5076,1,"_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:i(5077,1,"Unknown_build_option_0_Did_you_mean_1_5077","Unknown build option '{0}'. Did you mean '{1}'?"),Unknown_watch_option_0:i(5078,1,"Unknown_watch_option_0_5078","Unknown watch option '{0}'."),Unknown_watch_option_0_Did_you_mean_1:i(5079,1,"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:i(5080,1,"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:i(5081,1,"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:i(5082,1,"_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:i(5083,1,"Cannot_read_file_0_5083","Cannot read file '{0}'."),A_tuple_member_cannot_be_both_optional_and_rest:i(5085,1,"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:i(5086,1,"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:i(5087,1,"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:i(5088,1,"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:i(5089,1,"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:i(5090,1,"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 './'?"),Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled:i(5091,1,"Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091","Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."),The_root_value_of_a_0_file_must_be_an_object:i(5092,1,"The_root_value_of_a_0_file_must_be_an_object_5092","The root value of a '{0}' file must be an object."),Compiler_option_0_may_only_be_used_with_build:i(5093,1,"Compiler_option_0_may_only_be_used_with_build_5093","Compiler option '--{0}' may only be used with '--build'."),Compiler_option_0_may_not_be_used_with_build:i(5094,1,"Compiler_option_0_may_not_be_used_with_build_5094","Compiler option '--{0}' may not be used with '--build'."),Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later:i(5095,1,"Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later_5095","Option '{0}' can only be used when 'module' is set to 'es2015' or later."),Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set:i(5096,1,"Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096","Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."),An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled:i(5097,1,"An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097","An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."),Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler:i(5098,1,"Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098","Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."),Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error:i(5101,1,"Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101",`Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`),Option_0_has_been_removed_Please_remove_it_from_your_configuration:i(5102,1,"Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102","Option '{0}' has been removed. Please remove it from your configuration."),Invalid_value_for_ignoreDeprecations:i(5103,1,"Invalid_value_for_ignoreDeprecations_5103","Invalid value for '--ignoreDeprecations'."),Option_0_is_redundant_and_cannot_be_specified_with_option_1:i(5104,1,"Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104","Option '{0}' is redundant and cannot be specified with option '{1}'."),Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System:i(5105,1,"Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105","Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."),Use_0_instead:i(5106,3,"Use_0_instead_5106","Use '{0}' instead."),Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error:i(5107,1,"Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107",`Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`),Option_0_1_has_been_removed_Please_remove_it_from_your_configuration:i(5108,1,"Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108","Option '{0}={1}' has been removed. Please remove it from your configuration."),Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1:i(5109,1,"Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109","Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."),Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1:i(5110,1,"Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110","Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."),Generates_a_sourcemap_for_each_corresponding_d_ts_file:i(6e3,3,"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:i(6001,3,"Concatenate_and_emit_output_to_single_file_6001","Concatenate and emit output to single file."),Generates_corresponding_d_ts_file:i(6002,3,"Generates_corresponding_d_ts_file_6002","Generates corresponding '.d.ts' file."),Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:i(6004,3,"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:i(6005,3,"Watch_input_files_6005","Watch input files."),Redirect_output_structure_to_the_directory:i(6006,3,"Redirect_output_structure_to_the_directory_6006","Redirect output structure to the directory."),Do_not_erase_const_enum_declarations_in_generated_code:i(6007,3,"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:i(6008,3,"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:i(6009,3,"Do_not_emit_comments_to_output_6009","Do not emit comments to output."),Do_not_emit_outputs:i(6010,3,"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:i(6011,3,"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:i(6012,3,"Skip_type_checking_of_declaration_files_6012","Skip type checking of declaration files."),Do_not_resolve_the_real_path_of_symlinks:i(6013,3,"Do_not_resolve_the_real_path_of_symlinks_6013","Do not resolve the real path of symlinks."),Only_emit_d_ts_declaration_files:i(6014,3,"Only_emit_d_ts_declaration_files_6014","Only emit '.d.ts' declaration files."),Specify_ECMAScript_target_version:i(6015,3,"Specify_ECMAScript_target_version_6015","Specify ECMAScript target version."),Specify_module_code_generation:i(6016,3,"Specify_module_code_generation_6016","Specify module code generation."),Print_this_message:i(6017,3,"Print_this_message_6017","Print this message."),Print_the_compiler_s_version:i(6019,3,"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:i(6020,3,"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:i(6023,3,"Syntax_Colon_0_6023","Syntax: {0}"),options:i(6024,3,"options_6024","options"),file:i(6025,3,"file_6025","file"),Examples_Colon_0:i(6026,3,"Examples_Colon_0_6026","Examples: {0}"),Options_Colon:i(6027,3,"Options_Colon_6027","Options:"),Version_0:i(6029,3,"Version_0_6029","Version {0}"),Insert_command_line_options_and_files_from_a_file:i(6030,3,"Insert_command_line_options_and_files_from_a_file_6030","Insert command line options and files from a file."),Starting_compilation_in_watch_mode:i(6031,3,"Starting_compilation_in_watch_mode_6031","Starting compilation in watch mode..."),File_change_detected_Starting_incremental_compilation:i(6032,3,"File_change_detected_Starting_incremental_compilation_6032","File change detected. Starting incremental compilation..."),KIND:i(6034,3,"KIND_6034","KIND"),FILE:i(6035,3,"FILE_6035","FILE"),VERSION:i(6036,3,"VERSION_6036","VERSION"),LOCATION:i(6037,3,"LOCATION_6037","LOCATION"),DIRECTORY:i(6038,3,"DIRECTORY_6038","DIRECTORY"),STRATEGY:i(6039,3,"STRATEGY_6039","STRATEGY"),FILE_OR_DIRECTORY:i(6040,3,"FILE_OR_DIRECTORY_6040","FILE OR DIRECTORY"),Errors_Files:i(6041,3,"Errors_Files_6041","Errors Files"),Generates_corresponding_map_file:i(6043,3,"Generates_corresponding_map_file_6043","Generates corresponding '.map' file."),Compiler_option_0_expects_an_argument:i(6044,1,"Compiler_option_0_expects_an_argument_6044","Compiler option '{0}' expects an argument."),Unterminated_quoted_string_in_response_file_0:i(6045,1,"Unterminated_quoted_string_in_response_file_0_6045","Unterminated quoted string in response file '{0}'."),Argument_for_0_option_must_be_Colon_1:i(6046,1,"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:i(6048,1,"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}'."),Unable_to_open_file_0:i(6050,1,"Unable_to_open_file_0_6050","Unable to open file '{0}'."),Corrupted_locale_file_0:i(6051,1,"Corrupted_locale_file_0_6051","Corrupted locale file {0}."),Raise_error_on_expressions_and_declarations_with_an_implied_any_type:i(6052,3,"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:i(6053,1,"File_0_not_found_6053","File '{0}' not found."),File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1:i(6054,1,"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:i(6055,3,"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:i(6056,3,"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:i(6058,3,"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:i(6059,1,"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:i(6060,3,"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:i(6061,3,"NEWLINE_6061","NEWLINE"),Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line:i(6064,1,"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:i(6065,3,"Enables_experimental_support_for_ES7_decorators_6065","Enables experimental support for ES7 decorators."),Enables_experimental_support_for_emitting_type_metadata_for_decorators:i(6066,3,"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066","Enables experimental support for emitting type metadata for decorators."),Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:i(6070,3,"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:i(6071,3,"Successfully_created_a_tsconfig_json_file_6071","Successfully created a tsconfig.json file."),Suppress_excess_property_checks_for_object_literals:i(6072,3,"Suppress_excess_property_checks_for_object_literals_6072","Suppress excess property checks for object literals."),Stylize_errors_and_messages_using_color_and_context_experimental:i(6073,3,"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:i(6074,3,"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:i(6075,3,"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:i(6076,3,"Report_errors_for_fallthrough_cases_in_switch_statement_6076","Report errors for fallthrough cases in switch statement."),Do_not_report_errors_on_unreachable_code:i(6077,3,"Do_not_report_errors_on_unreachable_code_6077","Do not report errors on unreachable code."),Disallow_inconsistently_cased_references_to_the_same_file:i(6078,3,"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:i(6079,3,"Specify_library_files_to_be_included_in_the_compilation_6079","Specify library files to be included in the compilation."),Specify_JSX_code_generation:i(6080,3,"Specify_JSX_code_generation_6080","Specify JSX code generation."),File_0_has_an_unsupported_extension_so_skipping_it:i(6081,3,"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:i(6082,1,"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:i(6083,3,"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:i(6084,3,"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:i(6085,3,"Enable_tracing_of_the_name_resolution_process_6085","Enable tracing of the name resolution process."),Resolving_module_0_from_1:i(6086,3,"Resolving_module_0_from_1_6086","======== Resolving module '{0}' from '{1}'. ========"),Explicitly_specified_module_resolution_kind_Colon_0:i(6087,3,"Explicitly_specified_module_resolution_kind_Colon_0_6087","Explicitly specified module resolution kind: '{0}'."),Module_resolution_kind_is_not_specified_using_0:i(6088,3,"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:i(6089,3,"Module_name_0_was_successfully_resolved_to_1_6089","======== Module name '{0}' was successfully resolved to '{1}'. ========"),Module_name_0_was_not_resolved:i(6090,3,"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:i(6091,3,"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:i(6092,3,"Module_name_0_matched_pattern_1_6092","Module name '{0}', matched pattern '{1}'."),Trying_substitution_0_candidate_module_location_Colon_1:i(6093,3,"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:i(6094,3,"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_types_Colon_1:i(6095,3,"Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095","Loading module as file / folder, candidate module location '{0}', target file types: {1}."),File_0_does_not_exist:i(6096,3,"File_0_does_not_exist_6096","File '{0}' does not exist."),File_0_exists_use_it_as_a_name_resolution_result:i(6097,3,"File_0_exists_use_it_as_a_name_resolution_result_6097","File '{0}' exists - use it as a name resolution result."),Loading_module_0_from_node_modules_folder_target_file_types_Colon_1:i(6098,3,"Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098","Loading module '{0}' from 'node_modules' folder, target file types: {1}."),Found_package_json_at_0:i(6099,3,"Found_package_json_at_0_6099","Found 'package.json' at '{0}'."),package_json_does_not_have_a_0_field:i(6100,3,"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:i(6101,3,"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:i(6102,3,"Allow_javascript_files_to_be_compiled_6102","Allow javascript files to be compiled."),Checking_if_0_is_the_longest_matching_prefix_for_1_2:i(6104,3,"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:i(6105,3,"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:i(6106,3,"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:i(6107,3,"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:i(6108,3,"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:i(6109,3,"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:i(6110,3,"Trying_other_entries_in_rootDirs_6110","Trying other entries in 'rootDirs'."),Module_resolution_using_rootDirs_has_failed:i(6111,3,"Module_resolution_using_rootDirs_has_failed_6111","Module resolution using 'rootDirs' has failed."),Do_not_emit_use_strict_directives_in_module_output:i(6112,3,"Do_not_emit_use_strict_directives_in_module_output_6112","Do not emit 'use strict' directives in module output."),Enable_strict_null_checks:i(6113,3,"Enable_strict_null_checks_6113","Enable strict null checks."),Unknown_option_excludes_Did_you_mean_exclude:i(6114,1,"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:i(6115,3,"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:i(6116,3,"Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116","======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2:i(6119,3,"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:i(6120,3,"Type_reference_directive_0_was_not_resolved_6120","======== Type reference directive '{0}' was not resolved. ========"),Resolving_with_primary_search_path_0:i(6121,3,"Resolving_with_primary_search_path_0_6121","Resolving with primary search path '{0}'."),Root_directory_cannot_be_determined_skipping_primary_search_paths:i(6122,3,"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:i(6123,3,"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:i(6124,3,"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:i(6125,3,"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:i(6126,3,"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:i(6127,3,"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:i(6128,3,"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:i(6130,3,"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:i(6131,1,"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:i(6132,3,"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:i(6133,1,"_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:i(6134,3,"Report_errors_on_unused_locals_6134","Report errors on unused locals."),Report_errors_on_unused_parameters:i(6135,3,"Report_errors_on_unused_parameters_6135","Report errors on unused parameters."),The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files:i(6136,3,"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:i(6137,1,"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:i(6138,1,"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:i(6139,3,"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:i(6140,1,"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:i(6141,3,"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:i(6142,1,"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:i(6144,3,"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:i(6145,3,"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:i(6146,3,"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:i(6147,3,"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:i(6148,3,"Directory_0_does_not_exist_skipping_all_lookups_in_it_6148","Directory '{0}' does not exist, skipping all lookups in it."),Show_diagnostic_information:i(6149,3,"Show_diagnostic_information_6149","Show diagnostic information."),Show_verbose_diagnostic_information:i(6150,3,"Show_verbose_diagnostic_information_6150","Show verbose diagnostic information."),Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file:i(6151,3,"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:i(6152,3,"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:i(6153,3,"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:i(6154,3,"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:i(6155,3,"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:i(6156,3,"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:i(6157,3,"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:i(6158,3,"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:i(6159,3,"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:i(6160,3,"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:i(6161,3,"List_of_folders_to_include_type_definitions_from_6161","List of folders to include type definitions from."),Disable_size_limitations_on_JavaScript_projects:i(6162,3,"Disable_size_limitations_on_JavaScript_projects_6162","Disable size limitations on JavaScript projects."),The_character_set_of_the_input_files:i(6163,3,"The_character_set_of_the_input_files_6163","The character set of the input files."),Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1:i(6164,3,"Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164","Skipping module '{0}' that looks like an absolute URI, target file types: {1}."),Do_not_truncate_error_messages:i(6165,3,"Do_not_truncate_error_messages_6165","Do not truncate error messages."),Output_directory_for_generated_declaration_files:i(6166,3,"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:i(6167,3,"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:i(6168,3,"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:i(6169,3,"Show_all_compiler_options_6169","Show all compiler options."),Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file:i(6170,3,"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:i(6171,3,"Command_line_Options_6171","Command-line Options"),Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3:i(6179,3,"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:i(6180,3,"Enable_all_strict_type_checking_options_6180","Enable all strict type-checking options."),Scoped_package_detected_looking_in_0:i(6182,3,"Scoped_package_detected_looking_in_0_6182","Scoped package detected, looking in '{0}'"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2:i(6183,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:i(6184,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184","Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Enable_strict_checking_of_function_types:i(6186,3,"Enable_strict_checking_of_function_types_6186","Enable strict checking of function types."),Enable_strict_checking_of_property_initialization_in_classes:i(6187,3,"Enable_strict_checking_of_property_initialization_in_classes_6187","Enable strict checking of property initialization in classes."),Numeric_separators_are_not_allowed_here:i(6188,1,"Numeric_separators_are_not_allowed_here_6188","Numeric separators are not allowed here."),Multiple_consecutive_numeric_separators_are_not_permitted:i(6189,1,"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:i(6191,3,"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:i(6192,1,"All_imports_in_import_declaration_are_unused_6192","All imports in import declaration are unused.",!0),Found_1_error_Watching_for_file_changes:i(6193,3,"Found_1_error_Watching_for_file_changes_6193","Found 1 error. Watching for file changes."),Found_0_errors_Watching_for_file_changes:i(6194,3,"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:i(6195,3,"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:i(6196,1,"_0_is_declared_but_never_used_6196","'{0}' is declared but never used.",!0),Include_modules_imported_with_json_extension:i(6197,3,"Include_modules_imported_with_json_extension_6197","Include modules imported with '.json' extension"),All_destructured_elements_are_unused:i(6198,1,"All_destructured_elements_are_unused_6198","All destructured elements are unused.",!0),All_variables_are_unused:i(6199,1,"All_variables_are_unused_6199","All variables are unused.",!0),Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0:i(6200,1,"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:i(6201,3,"Conflicts_are_in_this_file_6201","Conflicts are in this file."),Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0:i(6202,1,"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:i(6203,3,"_0_was_also_declared_here_6203","'{0}' was also declared here."),and_here:i(6204,3,"and_here_6204","and here."),All_type_parameters_are_unused:i(6205,1,"All_type_parameters_are_unused_6205","All type parameters are unused."),package_json_has_a_typesVersions_field_with_version_specific_path_mappings:i(6206,3,"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:i(6207,3,"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:i(6208,3,"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:i(6209,3,"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:i(6210,3,"An_argument_for_0_was_not_provided_6210","An argument for '{0}' was not provided."),An_argument_matching_this_binding_pattern_was_not_provided:i(6211,3,"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:i(6212,3,"Did_you_mean_to_call_this_expression_6212","Did you mean to call this expression?"),Did_you_mean_to_use_new_with_this_expression:i(6213,3,"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:i(6214,3,"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:i(6215,3,"Using_compiler_options_of_project_reference_redirect_0_6215","Using compiler options of project reference redirect '{0}'."),Found_1_error:i(6216,3,"Found_1_error_6216","Found 1 error."),Found_0_errors:i(6217,3,"Found_0_errors_6217","Found {0} errors."),Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2:i(6218,3,"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:i(6219,3,"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:i(6220,3,"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:i(6221,3,"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:i(6222,3,"Emit_class_fields_with_Define_instead_of_Set_6222","Emit class fields with Define instead of Set."),Generates_a_CPU_profile:i(6223,3,"Generates_a_CPU_profile_6223","Generates a CPU profile."),Disable_solution_searching_for_this_project:i(6224,3,"Disable_solution_searching_for_this_project_6224","Disable solution searching for this project."),Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory:i(6225,3,"Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225","Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling:i(6226,3,"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', 'FixedChunkSizePolling'."),Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize:i(6227,3,"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', 'FixedChunkSize'."),Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3:i(6229,1,"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:i(6230,1,"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:i(6231,1,"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:i(6232,1,"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:i(6233,1,"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:i(6234,1,"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:i(6235,3,"Disable_loading_referenced_projects_6235","Disable loading referenced projects."),Arguments_for_the_rest_parameter_0_were_not_provided:i(6236,1,"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:i(6237,3,"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:i(6238,1,"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"),File_0_exists_according_to_earlier_cached_lookups:i(6239,3,"File_0_exists_according_to_earlier_cached_lookups_6239","File '{0}' exists according to earlier cached lookups."),File_0_does_not_exist_according_to_earlier_cached_lookups:i(6240,3,"File_0_does_not_exist_according_to_earlier_cached_lookups_6240","File '{0}' does not exist according to earlier cached lookups."),Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1:i(6241,3,"Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241","Resolution for type reference directive '{0}' was found in cache from location '{1}'."),Resolving_type_reference_directive_0_containing_file_1:i(6242,3,"Resolving_type_reference_directive_0_containing_file_1_6242","======== Resolving type reference directive '{0}', containing file '{1}'. ========"),Interpret_optional_property_types_as_written_rather_than_adding_undefined:i(6243,3,"Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243","Interpret optional property types as written, rather than adding 'undefined'."),Modules:i(6244,3,"Modules_6244","Modules"),File_Management:i(6245,3,"File_Management_6245","File Management"),Emit:i(6246,3,"Emit_6246","Emit"),JavaScript_Support:i(6247,3,"JavaScript_Support_6247","JavaScript Support"),Type_Checking:i(6248,3,"Type_Checking_6248","Type Checking"),Editor_Support:i(6249,3,"Editor_Support_6249","Editor Support"),Watch_and_Build_Modes:i(6250,3,"Watch_and_Build_Modes_6250","Watch and Build Modes"),Compiler_Diagnostics:i(6251,3,"Compiler_Diagnostics_6251","Compiler Diagnostics"),Interop_Constraints:i(6252,3,"Interop_Constraints_6252","Interop Constraints"),Backwards_Compatibility:i(6253,3,"Backwards_Compatibility_6253","Backwards Compatibility"),Language_and_Environment:i(6254,3,"Language_and_Environment_6254","Language and Environment"),Projects:i(6255,3,"Projects_6255","Projects"),Output_Formatting:i(6256,3,"Output_Formatting_6256","Output Formatting"),Completeness:i(6257,3,"Completeness_6257","Completeness"),_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file:i(6258,1,"_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258","'{0}' should be set inside the 'compilerOptions' object of the config json file"),Found_1_error_in_0:i(6259,3,"Found_1_error_in_0_6259","Found 1 error in {0}"),Found_0_errors_in_the_same_file_starting_at_Colon_1:i(6260,3,"Found_0_errors_in_the_same_file_starting_at_Colon_1_6260","Found {0} errors in the same file, starting at: {1}"),Found_0_errors_in_1_files:i(6261,3,"Found_0_errors_in_1_files_6261","Found {0} errors in {1} files."),File_name_0_has_a_1_extension_looking_up_2_instead:i(6262,3,"File_name_0_has_a_1_extension_looking_up_2_instead_6262","File name '{0}' has a '{1}' extension - looking up '{2}' instead."),Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set:i(6263,1,"Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263","Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."),Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present:i(6264,3,"Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264","Enable importing files with any extension, provided a declaration file is present."),Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder:i(6265,3,"Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265","Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."),Option_0_can_only_be_specified_on_command_line:i(6266,1,"Option_0_can_only_be_specified_on_command_line_6266","Option '{0}' can only be specified on command line."),Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve:i(6270,3,"Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270","Directory '{0}' has no containing package.json scope. Imports will not resolve."),Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1:i(6271,3,"Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271","Import specifier '{0}' does not exist in package.json scope at path '{1}'."),Invalid_import_specifier_0_has_no_possible_resolutions:i(6272,3,"Invalid_import_specifier_0_has_no_possible_resolutions_6272","Invalid import specifier '{0}' has no possible resolutions."),package_json_scope_0_has_no_imports_defined:i(6273,3,"package_json_scope_0_has_no_imports_defined_6273","package.json scope '{0}' has no imports defined."),package_json_scope_0_explicitly_maps_specifier_1_to_null:i(6274,3,"package_json_scope_0_explicitly_maps_specifier_1_to_null_6274","package.json scope '{0}' explicitly maps specifier '{1}' to null."),package_json_scope_0_has_invalid_type_for_target_of_specifier_1:i(6275,3,"package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275","package.json scope '{0}' has invalid type for target of specifier '{1}'"),Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1:i(6276,3,"Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276","Export specifier '{0}' does not exist in package.json scope at path '{1}'."),Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update:i(6277,3,"Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277","Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."),There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings:i(6278,3,"There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278",`There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`),Enable_project_compilation:i(6302,3,"Enable_project_compilation_6302","Enable project compilation"),Composite_projects_may_not_disable_declaration_emit:i(6304,1,"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:i(6305,1,"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:i(6306,1,"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:i(6307,1,"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:i(6308,1,"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:i(6309,1,"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:i(6310,1,"Referenced_project_0_may_not_disable_emit_6310","Referenced project '{0}' may not disable emit."),Project_0_is_out_of_date_because_output_1_is_older_than_input_2:i(6350,3,"Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350","Project '{0}' is out of date because output '{1}' is older than input '{2}'"),Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2:i(6351,3,"Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351","Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"),Project_0_is_out_of_date_because_output_file_1_does_not_exist:i(6352,3,"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:i(6353,3,"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:i(6354,3,"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:i(6355,3,"Projects_in_this_build_Colon_0_6355","Projects in this build: {0}"),A_non_dry_build_would_delete_the_following_files_Colon_0:i(6356,3,"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:i(6357,3,"A_non_dry_build_would_build_project_0_6357","A non-dry build would build project '{0}'"),Building_project_0:i(6358,3,"Building_project_0_6358","Building project '{0}'..."),Updating_output_timestamps_of_project_0:i(6359,3,"Updating_output_timestamps_of_project_0_6359","Updating output timestamps of project '{0}'..."),Project_0_is_up_to_date:i(6361,3,"Project_0_is_up_to_date_6361","Project '{0}' is up to date"),Skipping_build_of_project_0_because_its_dependency_1_has_errors:i(6362,3,"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:i(6363,3,"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:i(6364,3,"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:i(6365,3,"Delete_the_outputs_of_all_projects_6365","Delete the outputs of all projects."),Show_what_would_be_built_or_deleted_if_specified_with_clean:i(6367,3,"Show_what_would_be_built_or_deleted_if_specified_with_clean_6367","Show what would be built (or deleted, if specified with '--clean')"),Option_build_must_be_the_first_command_line_argument:i(6369,1,"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:i(6370,1,"Options_0_and_1_cannot_be_combined_6370","Options '{0}' and '{1}' cannot be combined."),Updating_unchanged_output_timestamps_of_project_0:i(6371,3,"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:i(6372,3,"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:i(6373,3,"Updating_output_of_project_0_6373","Updating output of project '{0}'..."),A_non_dry_build_would_update_timestamps_for_output_of_project_0:i(6374,3,"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:i(6375,3,"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:i(6376,3,"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:i(6377,1,"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}'"),Composite_projects_may_not_disable_incremental_compilation:i(6379,1,"Composite_projects_may_not_disable_incremental_compilation_6379","Composite projects may not disable incremental compilation."),Specify_file_to_store_incremental_compilation_information:i(6380,3,"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:i(6381,3,"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:i(6382,3,"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:i(6383,3,"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:i(6384,3,"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:i(6385,2,"_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:i(6386,3,"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_signature_0_of_1_is_deprecated:i(6387,2,"The_signature_0_of_1_is_deprecated_6387","The signature '{0}' of '{1}' is deprecated.",void 0,void 0,!0),Project_0_is_being_forcibly_rebuilt:i(6388,3,"Project_0_is_being_forcibly_rebuilt_6388","Project '{0}' is being forcibly rebuilt"),Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved:i(6389,3,"Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389","Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2:i(6390,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3:i(6391,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved:i(6392,3,"Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392","Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:i(6393,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:i(6394,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:i(6395,3,"Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395","Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3:i(6396,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4:i(6397,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved:i(6398,3,"Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398","Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted:i(6399,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399","Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"),Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files:i(6400,3,"Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400","Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"),Project_0_is_out_of_date_because_there_was_error_reading_file_1:i(6401,3,"Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401","Project '{0}' is out of date because there was error reading file '{1}'"),Resolving_in_0_mode_with_conditions_1:i(6402,3,"Resolving_in_0_mode_with_conditions_1_6402","Resolving in {0} mode with conditions {1}."),Matched_0_condition_1:i(6403,3,"Matched_0_condition_1_6403","Matched '{0}' condition '{1}'."),Using_0_subpath_1_with_target_2:i(6404,3,"Using_0_subpath_1_with_target_2_6404","Using '{0}' subpath '{1}' with target '{2}'."),Saw_non_matching_condition_0:i(6405,3,"Saw_non_matching_condition_0_6405","Saw non-matching condition '{0}'."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions:i(6406,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406","Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"),Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set:i(6407,3,"Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407","Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."),Use_the_package_json_exports_field_when_resolving_package_imports:i(6408,3,"Use_the_package_json_exports_field_when_resolving_package_imports_6408","Use the package.json 'exports' field when resolving package imports."),Use_the_package_json_imports_field_when_resolving_imports:i(6409,3,"Use_the_package_json_imports_field_when_resolving_imports_6409","Use the package.json 'imports' field when resolving imports."),Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports:i(6410,3,"Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410","Conditions to set in addition to the resolver-specific defaults when resolving imports."),true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false:i(6411,3,"true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411","`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."),Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more:i(6412,3,"Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412","Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."),Entering_conditional_exports:i(6413,3,"Entering_conditional_exports_6413","Entering conditional exports."),Resolved_under_condition_0:i(6414,3,"Resolved_under_condition_0_6414","Resolved under condition '{0}'."),Failed_to_resolve_under_condition_0:i(6415,3,"Failed_to_resolve_under_condition_0_6415","Failed to resolve under condition '{0}'."),Exiting_conditional_exports:i(6416,3,"Exiting_conditional_exports_6416","Exiting conditional exports."),Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0:i(6417,3,"Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417","Searching all ancestor node_modules directories for preferred extensions: {0}."),Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0:i(6418,3,"Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418","Searching all ancestor node_modules directories for fallback extensions: {0}."),The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1:i(6500,3,"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:i(6501,3,"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:i(6502,3,"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:i(6503,3,"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:i(6504,1,"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?"),Print_names_of_files_and_the_reason_they_are_part_of_the_compilation:i(6505,3,"Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505","Print names of files and the reason they are part of the compilation."),Consider_adding_a_declare_modifier_to_this_class:i(6506,3,"Consider_adding_a_declare_modifier_to_this_class_6506","Consider adding a 'declare' modifier to this class."),Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files:i(6600,3,"Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600","Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."),Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export:i(6601,3,"Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601","Allow 'import x from y' when a module doesn't have a default export."),Allow_accessing_UMD_globals_from_modules:i(6602,3,"Allow_accessing_UMD_globals_from_modules_6602","Allow accessing UMD globals from modules."),Disable_error_reporting_for_unreachable_code:i(6603,3,"Disable_error_reporting_for_unreachable_code_6603","Disable error reporting for unreachable code."),Disable_error_reporting_for_unused_labels:i(6604,3,"Disable_error_reporting_for_unused_labels_6604","Disable error reporting for unused labels."),Ensure_use_strict_is_always_emitted:i(6605,3,"Ensure_use_strict_is_always_emitted_6605","Ensure 'use strict' is always emitted."),Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it:i(6606,3,"Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606","Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."),Specify_the_base_directory_to_resolve_non_relative_module_names:i(6607,3,"Specify_the_base_directory_to_resolve_non_relative_module_names_6607","Specify the base directory to resolve non-relative module names."),No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files:i(6608,3,"No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608","No longer supported. In early versions, manually set the text encoding for reading files."),Enable_error_reporting_in_type_checked_JavaScript_files:i(6609,3,"Enable_error_reporting_in_type_checked_JavaScript_files_6609","Enable error reporting in type-checked JavaScript files."),Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references:i(6611,3,"Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611","Enable constraints that allow a TypeScript project to be used with project references."),Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project:i(6612,3,"Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612","Generate .d.ts files from TypeScript and JavaScript files in your project."),Specify_the_output_directory_for_generated_declaration_files:i(6613,3,"Specify_the_output_directory_for_generated_declaration_files_6613","Specify the output directory for generated declaration files."),Create_sourcemaps_for_d_ts_files:i(6614,3,"Create_sourcemaps_for_d_ts_files_6614","Create sourcemaps for d.ts files."),Output_compiler_performance_information_after_building:i(6615,3,"Output_compiler_performance_information_after_building_6615","Output compiler performance information after building."),Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project:i(6616,3,"Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616","Disables inference for type acquisition by looking at filenames in a project."),Reduce_the_number_of_projects_loaded_automatically_by_TypeScript:i(6617,3,"Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617","Reduce the number of projects loaded automatically by TypeScript."),Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server:i(6618,3,"Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618","Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),Opt_a_project_out_of_multi_project_reference_checking_when_editing:i(6619,3,"Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619","Opt a project out of multi-project reference checking when editing."),Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects:i(6620,3,"Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620","Disable preferring source files instead of declaration files when referencing composite projects."),Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration:i(6621,3,"Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621","Emit more compliant, but verbose and less performant JavaScript for iteration."),Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files:i(6622,3,"Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622","Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),Only_output_d_ts_files_and_not_JavaScript_files:i(6623,3,"Only_output_d_ts_files_and_not_JavaScript_files_6623","Only output d.ts files and not JavaScript files."),Emit_design_type_metadata_for_decorated_declarations_in_source_files:i(6624,3,"Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624","Emit design-type metadata for decorated declarations in source files."),Disable_the_type_acquisition_for_JavaScript_projects:i(6625,3,"Disable_the_type_acquisition_for_JavaScript_projects_6625","Disable the type acquisition for JavaScript projects"),Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility:i(6626,3,"Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626","Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."),Filters_results_from_the_include_option:i(6627,3,"Filters_results_from_the_include_option_6627","Filters results from the `include` option."),Remove_a_list_of_directories_from_the_watch_process:i(6628,3,"Remove_a_list_of_directories_from_the_watch_process_6628","Remove a list of directories from the watch process."),Remove_a_list_of_files_from_the_watch_mode_s_processing:i(6629,3,"Remove_a_list_of_files_from_the_watch_mode_s_processing_6629","Remove a list of files from the watch mode's processing."),Enable_experimental_support_for_legacy_experimental_decorators:i(6630,3,"Enable_experimental_support_for_legacy_experimental_decorators_6630","Enable experimental support for legacy experimental decorators."),Print_files_read_during_the_compilation_including_why_it_was_included:i(6631,3,"Print_files_read_during_the_compilation_including_why_it_was_included_6631","Print files read during the compilation including why it was included."),Output_more_detailed_compiler_performance_information_after_building:i(6632,3,"Output_more_detailed_compiler_performance_information_after_building_6632","Output more detailed compiler performance information after building."),Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited:i(6633,3,"Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633","Specify one or more path or node module references to base configuration files from which settings are inherited."),Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers:i(6634,3,"Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634","Specify what approach the watcher should use if the system runs out of native file watchers."),Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include:i(6635,3,"Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635","Include a list of files. This does not support glob patterns, as opposed to `include`."),Build_all_projects_including_those_that_appear_to_be_up_to_date:i(6636,3,"Build_all_projects_including_those_that_appear_to_be_up_to_date_6636","Build all projects, including those that appear to be up to date."),Ensure_that_casing_is_correct_in_imports:i(6637,3,"Ensure_that_casing_is_correct_in_imports_6637","Ensure that casing is correct in imports."),Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging:i(6638,3,"Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638","Emit a v8 CPU profile of the compiler run for debugging."),Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file:i(6639,3,"Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639","Allow importing helper functions from tslib once per project, instead of including them per-file."),Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation:i(6641,3,"Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641","Specify a list of glob patterns that match files to be included in compilation."),Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects:i(6642,3,"Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642","Save .tsbuildinfo files to allow for incremental compilation of projects."),Include_sourcemap_files_inside_the_emitted_JavaScript:i(6643,3,"Include_sourcemap_files_inside_the_emitted_JavaScript_6643","Include sourcemap files inside the emitted JavaScript."),Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript:i(6644,3,"Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644","Include source code in the sourcemaps inside the emitted JavaScript."),Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports:i(6645,3,"Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645","Ensure that each file can be safely transpiled without relying on other imports."),Specify_what_JSX_code_is_generated:i(6646,3,"Specify_what_JSX_code_is_generated_6646","Specify what JSX code is generated."),Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h:i(6647,3,"Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647","Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."),Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment:i(6648,3,"Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648","Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk:i(6649,3,"Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649","Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."),Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option:i(6650,3,"Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650","Make keyof only return strings instead of string, numbers or symbols. Legacy option."),Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment:i(6651,3,"Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651","Specify a set of bundled library declaration files that describe the target runtime environment."),Print_the_names_of_emitted_files_after_a_compilation:i(6652,3,"Print_the_names_of_emitted_files_after_a_compilation_6652","Print the names of emitted files after a compilation."),Print_all_of_the_files_read_during_the_compilation:i(6653,3,"Print_all_of_the_files_read_during_the_compilation_6653","Print all of the files read during the compilation."),Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit:i(6654,3,"Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654","Set the language of the messaging from TypeScript. This does not affect emit."),Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:i(6655,3,"Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655","Specify the location where debugger should locate map files instead of generated locations."),Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs:i(6656,3,"Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656","Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."),Specify_what_module_code_is_generated:i(6657,3,"Specify_what_module_code_is_generated_6657","Specify what module code is generated."),Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier:i(6658,3,"Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658","Specify how TypeScript looks up a file from a given module specifier."),Set_the_newline_character_for_emitting_files:i(6659,3,"Set_the_newline_character_for_emitting_files_6659","Set the newline character for emitting files."),Disable_emitting_files_from_a_compilation:i(6660,3,"Disable_emitting_files_from_a_compilation_6660","Disable emitting files from a compilation."),Disable_generating_custom_helper_functions_like_extends_in_compiled_output:i(6661,3,"Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661","Disable generating custom helper functions like '__extends' in compiled output."),Disable_emitting_files_if_any_type_checking_errors_are_reported:i(6662,3,"Disable_emitting_files_if_any_type_checking_errors_are_reported_6662","Disable emitting files if any type checking errors are reported."),Disable_truncating_types_in_error_messages:i(6663,3,"Disable_truncating_types_in_error_messages_6663","Disable truncating types in error messages."),Enable_error_reporting_for_fallthrough_cases_in_switch_statements:i(6664,3,"Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664","Enable error reporting for fallthrough cases in switch statements."),Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type:i(6665,3,"Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665","Enable error reporting for expressions and declarations with an implied 'any' type."),Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier:i(6666,3,"Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666","Ensure overriding members in derived classes are marked with an override modifier."),Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function:i(6667,3,"Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667","Enable error reporting for codepaths that do not explicitly return in a function."),Enable_error_reporting_when_this_is_given_the_type_any:i(6668,3,"Enable_error_reporting_when_this_is_given_the_type_any_6668","Enable error reporting when 'this' is given the type 'any'."),Disable_adding_use_strict_directives_in_emitted_JavaScript_files:i(6669,3,"Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669","Disable adding 'use strict' directives in emitted JavaScript files."),Disable_including_any_library_files_including_the_default_lib_d_ts:i(6670,3,"Disable_including_any_library_files_including_the_default_lib_d_ts_6670","Disable including any library files, including the default lib.d.ts."),Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type:i(6671,3,"Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671","Enforces using indexed accessors for keys declared using an indexed type."),Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project:i(6672,3,"Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672","Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."),Disable_strict_checking_of_generic_signatures_in_function_types:i(6673,3,"Disable_strict_checking_of_generic_signatures_in_function_types_6673","Disable strict checking of generic signatures in function types."),Add_undefined_to_a_type_when_accessed_using_an_index:i(6674,3,"Add_undefined_to_a_type_when_accessed_using_an_index_6674","Add 'undefined' to a type when accessed using an index."),Enable_error_reporting_when_local_variables_aren_t_read:i(6675,3,"Enable_error_reporting_when_local_variables_aren_t_read_6675","Enable error reporting when local variables aren't read."),Raise_an_error_when_a_function_parameter_isn_t_read:i(6676,3,"Raise_an_error_when_a_function_parameter_isn_t_read_6676","Raise an error when a function parameter isn't read."),Deprecated_setting_Use_outFile_instead:i(6677,3,"Deprecated_setting_Use_outFile_instead_6677","Deprecated setting. Use 'outFile' instead."),Specify_an_output_folder_for_all_emitted_files:i(6678,3,"Specify_an_output_folder_for_all_emitted_files_6678","Specify an output folder for all emitted files."),Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output:i(6679,3,"Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679","Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."),Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations:i(6680,3,"Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680","Specify a set of entries that re-map imports to additional lookup locations."),Specify_a_list_of_language_service_plugins_to_include:i(6681,3,"Specify_a_list_of_language_service_plugins_to_include_6681","Specify a list of language service plugins to include."),Disable_erasing_const_enum_declarations_in_generated_code:i(6682,3,"Disable_erasing_const_enum_declarations_in_generated_code_6682","Disable erasing 'const enum' declarations in generated code."),Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node:i(6683,3,"Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683","Disable resolving symlinks to their realpath. This correlates to the same flag in node."),Disable_wiping_the_console_in_watch_mode:i(6684,3,"Disable_wiping_the_console_in_watch_mode_6684","Disable wiping the console in watch mode."),Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read:i(6685,3,"Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685","Enable color and formatting in TypeScript's output to make compiler errors easier to read."),Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit:i(6686,3,"Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686","Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."),Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references:i(6687,3,"Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687","Specify an array of objects that specify paths for projects. Used in project references."),Disable_emitting_comments:i(6688,3,"Disable_emitting_comments_6688","Disable emitting comments."),Enable_importing_json_files:i(6689,3,"Enable_importing_json_files_6689","Enable importing .json files."),Specify_the_root_folder_within_your_source_files:i(6690,3,"Specify_the_root_folder_within_your_source_files_6690","Specify the root folder within your source files."),Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules:i(6691,3,"Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691","Allow multiple folders to be treated as one when resolving modules."),Skip_type_checking_d_ts_files_that_are_included_with_TypeScript:i(6692,3,"Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692","Skip type checking .d.ts files that are included with TypeScript."),Skip_type_checking_all_d_ts_files:i(6693,3,"Skip_type_checking_all_d_ts_files_6693","Skip type checking all .d.ts files."),Create_source_map_files_for_emitted_JavaScript_files:i(6694,3,"Create_source_map_files_for_emitted_JavaScript_files_6694","Create source map files for emitted JavaScript files."),Specify_the_root_path_for_debuggers_to_find_the_reference_source_code:i(6695,3,"Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695","Specify the root path for debuggers to find the reference source code."),Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function:i(6697,3,"Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697","Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."),When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible:i(6698,3,"When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698","When assigning functions, check to ensure parameters and the return values are subtype-compatible."),When_type_checking_take_into_account_null_and_undefined:i(6699,3,"When_type_checking_take_into_account_null_and_undefined_6699","When type checking, take into account 'null' and 'undefined'."),Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor:i(6700,3,"Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700","Check for class properties that are declared but not set in the constructor."),Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments:i(6701,3,"Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701","Disable emitting declarations that have '@internal' in their JSDoc comments."),Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals:i(6702,3,"Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702","Disable reporting of excess property errors during the creation of object literals."),Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures:i(6703,3,"Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703","Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."),Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively:i(6704,3,"Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704","Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations:i(6705,3,"Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705","Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),Log_paths_used_during_the_moduleResolution_process:i(6706,3,"Log_paths_used_during_the_moduleResolution_process_6706","Log paths used during the 'moduleResolution' process."),Specify_the_path_to_tsbuildinfo_incremental_compilation_file:i(6707,3,"Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707","Specify the path to .tsbuildinfo incremental compilation file."),Specify_options_for_automatic_acquisition_of_declaration_files:i(6709,3,"Specify_options_for_automatic_acquisition_of_declaration_files_6709","Specify options for automatic acquisition of declaration files."),Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types:i(6710,3,"Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710","Specify multiple folders that act like './node_modules/@types'."),Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file:i(6711,3,"Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711","Specify type package names to be included without being referenced in a source file."),Emit_ECMAScript_standard_compliant_class_fields:i(6712,3,"Emit_ECMAScript_standard_compliant_class_fields_6712","Emit ECMAScript-standard-compliant class fields."),Enable_verbose_logging:i(6713,3,"Enable_verbose_logging_6713","Enable verbose logging."),Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality:i(6714,3,"Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714","Specify how directories are watched on systems that lack recursive file-watching functionality."),Specify_how_the_TypeScript_watch_mode_works:i(6715,3,"Specify_how_the_TypeScript_watch_mode_works_6715","Specify how the TypeScript watch mode works."),Require_undeclared_properties_from_index_signatures_to_use_element_accesses:i(6717,3,"Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717","Require undeclared properties from index signatures to use element accesses."),Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types:i(6718,3,"Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718","Specify emit/checking behavior for imports that are only used for types."),Default_catch_clause_variables_as_unknown_instead_of_any:i(6803,3,"Default_catch_clause_variables_as_unknown_instead_of_any_6803","Default catch clause variables as 'unknown' instead of 'any'."),Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting:i(6804,3,"Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804","Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),one_of_Colon:i(6900,3,"one_of_Colon_6900","one of:"),one_or_more_Colon:i(6901,3,"one_or_more_Colon_6901","one or more:"),type_Colon:i(6902,3,"type_Colon_6902","type:"),default_Colon:i(6903,3,"default_Colon_6903","default:"),module_system_or_esModuleInterop:i(6904,3,"module_system_or_esModuleInterop_6904",'module === "system" or esModuleInterop'),false_unless_strict_is_set:i(6905,3,"false_unless_strict_is_set_6905","`false`, unless `strict` is set"),false_unless_composite_is_set:i(6906,3,"false_unless_composite_is_set_6906","`false`, unless `composite` is set"),node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified:i(6907,3,"node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907",'`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'),if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk:i(6908,3,"if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908",'`[]` if `files` is specified, otherwise `["**/*"]`'),true_if_composite_false_otherwise:i(6909,3,"true_if_composite_false_otherwise_6909","`true` if `composite`, `false` otherwise"),module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node:i(69010,3,"module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010","module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),Computed_from_the_list_of_input_files:i(6911,3,"Computed_from_the_list_of_input_files_6911","Computed from the list of input files"),Platform_specific:i(6912,3,"Platform_specific_6912","Platform specific"),You_can_learn_about_all_of_the_compiler_options_at_0:i(6913,3,"You_can_learn_about_all_of_the_compiler_options_at_0_6913","You can learn about all of the compiler options at {0}"),Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon:i(6914,3,"Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914","Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0:i(6915,3,"Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915","Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"),COMMON_COMMANDS:i(6916,3,"COMMON_COMMANDS_6916","COMMON COMMANDS"),ALL_COMPILER_OPTIONS:i(6917,3,"ALL_COMPILER_OPTIONS_6917","ALL COMPILER OPTIONS"),WATCH_OPTIONS:i(6918,3,"WATCH_OPTIONS_6918","WATCH OPTIONS"),BUILD_OPTIONS:i(6919,3,"BUILD_OPTIONS_6919","BUILD OPTIONS"),COMMON_COMPILER_OPTIONS:i(6920,3,"COMMON_COMPILER_OPTIONS_6920","COMMON COMPILER OPTIONS"),COMMAND_LINE_FLAGS:i(6921,3,"COMMAND_LINE_FLAGS_6921","COMMAND LINE FLAGS"),tsc_Colon_The_TypeScript_Compiler:i(6922,3,"tsc_Colon_The_TypeScript_Compiler_6922","tsc: The TypeScript Compiler"),Compiles_the_current_project_tsconfig_json_in_the_working_directory:i(6923,3,"Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923","Compiles the current project (tsconfig.json in the working directory.)"),Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options:i(6924,3,"Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924","Ignoring tsconfig.json, compiles the specified files with default compiler options."),Build_a_composite_project_in_the_working_directory:i(6925,3,"Build_a_composite_project_in_the_working_directory_6925","Build a composite project in the working directory."),Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory:i(6926,3,"Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926","Creates a tsconfig.json with the recommended settings in the working directory."),Compiles_the_TypeScript_project_located_at_the_specified_path:i(6927,3,"Compiles_the_TypeScript_project_located_at_the_specified_path_6927","Compiles the TypeScript project located at the specified path."),An_expanded_version_of_this_information_showing_all_possible_compiler_options:i(6928,3,"An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928","An expanded version of this information, showing all possible compiler options"),Compiles_the_current_project_with_additional_settings:i(6929,3,"Compiles_the_current_project_with_additional_settings_6929","Compiles the current project, with additional settings."),true_for_ES2022_and_above_including_ESNext:i(6930,3,"true_for_ES2022_and_above_including_ESNext_6930","`true` for ES2022 and above, including ESNext."),List_of_file_name_suffixes_to_search_when_resolving_a_module:i(6931,1,"List_of_file_name_suffixes_to_search_when_resolving_a_module_6931","List of file name suffixes to search when resolving a module."),Variable_0_implicitly_has_an_1_type:i(7005,1,"Variable_0_implicitly_has_an_1_type_7005","Variable '{0}' implicitly has an '{1}' type."),Parameter_0_implicitly_has_an_1_type:i(7006,1,"Parameter_0_implicitly_has_an_1_type_7006","Parameter '{0}' implicitly has an '{1}' type."),Member_0_implicitly_has_an_1_type:i(7008,1,"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:i(7009,1,"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:i(7010,1,"_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:i(7011,1,"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."),This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation:i(7012,1,"This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012","This overload implicitly returns the type '{0}' because it lacks a return type annotation."),Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:i(7013,1,"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:i(7014,1,"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:i(7015,1,"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:i(7016,1,"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:i(7017,1,"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:i(7018,1,"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:i(7019,1,"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:i(7020,1,"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:i(7022,1,"_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:i(7023,1,"_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:i(7024,1,"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:i(7025,1,"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:i(7026,1,"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:i(7027,1,"Unreachable_code_detected_7027","Unreachable code detected.",!0),Unused_label:i(7028,1,"Unused_label_7028","Unused label.",!0),Fallthrough_case_in_switch:i(7029,1,"Fallthrough_case_in_switch_7029","Fallthrough case in switch."),Not_all_code_paths_return_a_value:i(7030,1,"Not_all_code_paths_return_a_value_7030","Not all code paths return a value."),Binding_element_0_implicitly_has_an_1_type:i(7031,1,"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:i(7032,1,"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:i(7033,1,"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:i(7034,1,"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:i(7035,1,"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:i(7036,1,"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:i(7037,3,"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:i(7038,3,"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:i(7039,1,"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:i(7040,1,"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:i(7041,1,"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:i(7042,1,"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:i(7043,2,"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:i(7044,2,"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:i(7045,2,"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:i(7046,2,"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:i(7047,2,"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:i(7048,2,"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:i(7049,2,"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:i(7050,2,"_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:i(7051,1,"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:i(7052,1,"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:i(7053,1,"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:i(7054,1,"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:i(7055,1,"_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:i(7056,1,"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."),yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation:i(7057,1,"yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057","'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1:i(7058,1,"If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058","If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead:i(7059,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059","This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint:i(7060,1,"This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060","This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),A_mapped_type_may_not_declare_properties_or_methods:i(7061,1,"A_mapped_type_may_not_declare_properties_or_methods_7061","A mapped type may not declare properties or methods."),You_cannot_rename_this_element:i(8e3,1,"You_cannot_rename_this_element_8000","You cannot rename this element."),You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:i(8001,1,"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:i(8002,1,"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:i(8003,1,"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:i(8004,1,"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:i(8005,1,"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:i(8006,1,"_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:i(8008,1,"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:i(8009,1,"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:i(8010,1,"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:i(8011,1,"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:i(8012,1,"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:i(8013,1,"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:i(8016,1,"Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016","Type assertion expressions can only be used in TypeScript files."),Signature_declarations_can_only_be_used_in_TypeScript_files:i(8017,1,"Signature_declarations_can_only_be_used_in_TypeScript_files_8017","Signature declarations can only be used in TypeScript files."),Report_errors_in_js_files:i(8019,3,"Report_errors_in_js_files_8019","Report errors in .js files."),JSDoc_types_can_only_be_used_inside_documentation_comments:i(8020,1,"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:i(8021,1,"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:i(8022,1,"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:i(8023,1,"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:i(8024,1,"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:i(8025,1,"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:i(8026,1,"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:i(8027,1,"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:i(8028,1,"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:i(8029,1,"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:i(8030,1,"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:i(8031,1,"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:i(8032,1,"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:i(8033,1,"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:i(8034,1,"The_tag_was_first_specified_here_8034","The tag was first specified here."),You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder:i(8035,1,"You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035","You cannot rename elements that are defined in a 'node_modules' folder."),You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder:i(8036,1,"You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036","You cannot rename elements that are defined in another 'node_modules' folder."),Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files:i(8037,1,"Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037","Type satisfaction expressions can only be used in TypeScript files."),Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export:i(8038,1,"Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038","Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag:i(8039,1,"A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039","A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"),Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit:i(9005,1,"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:i(9006,1,"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:i(17e3,1,"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:i(17001,1,"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:i(17002,1,"Expected_corresponding_JSX_closing_tag_for_0_17002","Expected corresponding JSX closing tag for '{0}'."),Cannot_use_JSX_unless_the_jsx_flag_is_provided:i(17004,1,"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:i(17005,1,"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:i(17006,1,"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:i(17007,1,"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:i(17008,1,"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:i(17009,1,"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:i(17010,1,"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:i(17011,1,"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:i(17012,1,"_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:i(17013,1,"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:i(17014,1,"JSX_fragment_has_no_corresponding_closing_tag_17014","JSX fragment has no corresponding closing tag."),Expected_corresponding_closing_tag_for_JSX_fragment:i(17015,1,"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:i(17016,1,"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:i(17017,1,"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:i(17018,1,"Unknown_type_acquisition_option_0_Did_you_mean_1_17018","Unknown type acquisition option '{0}'. Did you mean '{1}'?"),_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:i(17019,1,"_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019","'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1:i(17020,1,"_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020","'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"),Unicode_escape_sequence_cannot_appear_here:i(17021,1,"Unicode_escape_sequence_cannot_appear_here_17021","Unicode escape sequence cannot appear here."),Circularity_detected_while_resolving_configuration_Colon_0:i(18e3,1,"Circularity_detected_while_resolving_configuration_Colon_0_18000","Circularity detected while resolving configuration: {0}"),The_files_list_in_config_file_0_is_empty:i(18002,1,"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:i(18003,1,"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_ES_module:i(80001,2,"File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001","File is a CommonJS module; it may be converted to an ES module."),This_constructor_function_may_be_converted_to_a_class_declaration:i(80002,2,"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:i(80003,2,"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:i(80004,2,"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:i(80005,2,"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:i(80006,2,"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:i(80007,2,"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:i(80008,2,"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."),JSDoc_typedef_may_be_converted_to_TypeScript_type:i(80009,2,"JSDoc_typedef_may_be_converted_to_TypeScript_type_80009","JSDoc typedef may be converted to TypeScript type."),JSDoc_typedefs_may_be_converted_to_TypeScript_types:i(80010,2,"JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010","JSDoc typedefs may be converted to TypeScript types."),Add_missing_super_call:i(90001,3,"Add_missing_super_call_90001","Add missing 'super()' call"),Make_super_call_the_first_statement_in_the_constructor:i(90002,3,"Make_super_call_the_first_statement_in_the_constructor_90002","Make 'super()' call the first statement in the constructor"),Change_extends_to_implements:i(90003,3,"Change_extends_to_implements_90003","Change 'extends' to 'implements'"),Remove_unused_declaration_for_Colon_0:i(90004,3,"Remove_unused_declaration_for_Colon_0_90004","Remove unused declaration for: '{0}'"),Remove_import_from_0:i(90005,3,"Remove_import_from_0_90005","Remove import from '{0}'"),Implement_interface_0:i(90006,3,"Implement_interface_0_90006","Implement interface '{0}'"),Implement_inherited_abstract_class:i(90007,3,"Implement_inherited_abstract_class_90007","Implement inherited abstract class"),Add_0_to_unresolved_variable:i(90008,3,"Add_0_to_unresolved_variable_90008","Add '{0}.' to unresolved variable"),Remove_variable_statement:i(90010,3,"Remove_variable_statement_90010","Remove variable statement"),Remove_template_tag:i(90011,3,"Remove_template_tag_90011","Remove template tag"),Remove_type_parameters:i(90012,3,"Remove_type_parameters_90012","Remove type parameters"),Import_0_from_1:i(90013,3,"Import_0_from_1_90013",`Import '{0}' from "{1}"`),Change_0_to_1:i(90014,3,"Change_0_to_1_90014","Change '{0}' to '{1}'"),Declare_property_0:i(90016,3,"Declare_property_0_90016","Declare property '{0}'"),Add_index_signature_for_property_0:i(90017,3,"Add_index_signature_for_property_0_90017","Add index signature for property '{0}'"),Disable_checking_for_this_file:i(90018,3,"Disable_checking_for_this_file_90018","Disable checking for this file"),Ignore_this_error_message:i(90019,3,"Ignore_this_error_message_90019","Ignore this error message"),Initialize_property_0_in_the_constructor:i(90020,3,"Initialize_property_0_in_the_constructor_90020","Initialize property '{0}' in the constructor"),Initialize_static_property_0:i(90021,3,"Initialize_static_property_0_90021","Initialize static property '{0}'"),Change_spelling_to_0:i(90022,3,"Change_spelling_to_0_90022","Change spelling to '{0}'"),Declare_method_0:i(90023,3,"Declare_method_0_90023","Declare method '{0}'"),Declare_static_method_0:i(90024,3,"Declare_static_method_0_90024","Declare static method '{0}'"),Prefix_0_with_an_underscore:i(90025,3,"Prefix_0_with_an_underscore_90025","Prefix '{0}' with an underscore"),Rewrite_as_the_indexed_access_type_0:i(90026,3,"Rewrite_as_the_indexed_access_type_0_90026","Rewrite as the indexed access type '{0}'"),Declare_static_property_0:i(90027,3,"Declare_static_property_0_90027","Declare static property '{0}'"),Call_decorator_expression:i(90028,3,"Call_decorator_expression_90028","Call decorator expression"),Add_async_modifier_to_containing_function:i(90029,3,"Add_async_modifier_to_containing_function_90029","Add async modifier to containing function"),Replace_infer_0_with_unknown:i(90030,3,"Replace_infer_0_with_unknown_90030","Replace 'infer {0}' with 'unknown'"),Replace_all_unused_infer_with_unknown:i(90031,3,"Replace_all_unused_infer_with_unknown_90031","Replace all unused 'infer' with 'unknown'"),Add_parameter_name:i(90034,3,"Add_parameter_name_90034","Add parameter name"),Declare_private_property_0:i(90035,3,"Declare_private_property_0_90035","Declare private property '{0}'"),Replace_0_with_Promise_1:i(90036,3,"Replace_0_with_Promise_1_90036","Replace '{0}' with 'Promise<{1}>'"),Fix_all_incorrect_return_type_of_an_async_functions:i(90037,3,"Fix_all_incorrect_return_type_of_an_async_functions_90037","Fix all incorrect return type of an async functions"),Declare_private_method_0:i(90038,3,"Declare_private_method_0_90038","Declare private method '{0}'"),Remove_unused_destructuring_declaration:i(90039,3,"Remove_unused_destructuring_declaration_90039","Remove unused destructuring declaration"),Remove_unused_declarations_for_Colon_0:i(90041,3,"Remove_unused_declarations_for_Colon_0_90041","Remove unused declarations for: '{0}'"),Declare_a_private_field_named_0:i(90053,3,"Declare_a_private_field_named_0_90053","Declare a private field named '{0}'."),Includes_imports_of_types_referenced_by_0:i(90054,3,"Includes_imports_of_types_referenced_by_0_90054","Includes imports of types referenced by '{0}'"),Remove_type_from_import_declaration_from_0:i(90055,3,"Remove_type_from_import_declaration_from_0_90055",`Remove 'type' from import declaration from "{0}"`),Remove_type_from_import_of_0_from_1:i(90056,3,"Remove_type_from_import_of_0_from_1_90056",`Remove 'type' from import of '{0}' from "{1}"`),Add_import_from_0:i(90057,3,"Add_import_from_0_90057",'Add import from "{0}"'),Update_import_from_0:i(90058,3,"Update_import_from_0_90058",'Update import from "{0}"'),Export_0_from_module_1:i(90059,3,"Export_0_from_module_1_90059","Export '{0}' from module '{1}'"),Export_all_referenced_locals:i(90060,3,"Export_all_referenced_locals_90060","Export all referenced locals"),Convert_function_to_an_ES2015_class:i(95001,3,"Convert_function_to_an_ES2015_class_95001","Convert function to an ES2015 class"),Convert_0_to_1_in_0:i(95003,3,"Convert_0_to_1_in_0_95003","Convert '{0}' to '{1} in {0}'"),Extract_to_0_in_1:i(95004,3,"Extract_to_0_in_1_95004","Extract to {0} in {1}"),Extract_function:i(95005,3,"Extract_function_95005","Extract function"),Extract_constant:i(95006,3,"Extract_constant_95006","Extract constant"),Extract_to_0_in_enclosing_scope:i(95007,3,"Extract_to_0_in_enclosing_scope_95007","Extract to {0} in enclosing scope"),Extract_to_0_in_1_scope:i(95008,3,"Extract_to_0_in_1_scope_95008","Extract to {0} in {1} scope"),Annotate_with_type_from_JSDoc:i(95009,3,"Annotate_with_type_from_JSDoc_95009","Annotate with type from JSDoc"),Infer_type_of_0_from_usage:i(95011,3,"Infer_type_of_0_from_usage_95011","Infer type of '{0}' from usage"),Infer_parameter_types_from_usage:i(95012,3,"Infer_parameter_types_from_usage_95012","Infer parameter types from usage"),Convert_to_default_import:i(95013,3,"Convert_to_default_import_95013","Convert to default import"),Install_0:i(95014,3,"Install_0_95014","Install '{0}'"),Replace_import_with_0:i(95015,3,"Replace_import_with_0_95015","Replace import with '{0}'."),Use_synthetic_default_member:i(95016,3,"Use_synthetic_default_member_95016","Use synthetic 'default' member."),Convert_to_ES_module:i(95017,3,"Convert_to_ES_module_95017","Convert to ES module"),Add_undefined_type_to_property_0:i(95018,3,"Add_undefined_type_to_property_0_95018","Add 'undefined' type to property '{0}'"),Add_initializer_to_property_0:i(95019,3,"Add_initializer_to_property_0_95019","Add initializer to property '{0}'"),Add_definite_assignment_assertion_to_property_0:i(95020,3,"Add_definite_assignment_assertion_to_property_0_95020","Add definite assignment assertion to property '{0}'"),Convert_all_type_literals_to_mapped_type:i(95021,3,"Convert_all_type_literals_to_mapped_type_95021","Convert all type literals to mapped type"),Add_all_missing_members:i(95022,3,"Add_all_missing_members_95022","Add all missing members"),Infer_all_types_from_usage:i(95023,3,"Infer_all_types_from_usage_95023","Infer all types from usage"),Delete_all_unused_declarations:i(95024,3,"Delete_all_unused_declarations_95024","Delete all unused declarations"),Prefix_all_unused_declarations_with_where_possible:i(95025,3,"Prefix_all_unused_declarations_with_where_possible_95025","Prefix all unused declarations with '_' where possible"),Fix_all_detected_spelling_errors:i(95026,3,"Fix_all_detected_spelling_errors_95026","Fix all detected spelling errors"),Add_initializers_to_all_uninitialized_properties:i(95027,3,"Add_initializers_to_all_uninitialized_properties_95027","Add initializers to all uninitialized properties"),Add_definite_assignment_assertions_to_all_uninitialized_properties:i(95028,3,"Add_definite_assignment_assertions_to_all_uninitialized_properties_95028","Add definite assignment assertions to all uninitialized properties"),Add_undefined_type_to_all_uninitialized_properties:i(95029,3,"Add_undefined_type_to_all_uninitialized_properties_95029","Add undefined type to all uninitialized properties"),Change_all_jsdoc_style_types_to_TypeScript:i(95030,3,"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:i(95031,3,"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:i(95032,3,"Implement_all_unimplemented_interfaces_95032","Implement all unimplemented interfaces"),Install_all_missing_types_packages:i(95033,3,"Install_all_missing_types_packages_95033","Install all missing types packages"),Rewrite_all_as_indexed_access_types:i(95034,3,"Rewrite_all_as_indexed_access_types_95034","Rewrite all as indexed access types"),Convert_all_to_default_imports:i(95035,3,"Convert_all_to_default_imports_95035","Convert all to default imports"),Make_all_super_calls_the_first_statement_in_their_constructor:i(95036,3,"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:i(95037,3,"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:i(95038,3,"Change_all_extended_interfaces_to_implements_95038","Change all extended interfaces to 'implements'"),Add_all_missing_super_calls:i(95039,3,"Add_all_missing_super_calls_95039","Add all missing super calls"),Implement_all_inherited_abstract_classes:i(95040,3,"Implement_all_inherited_abstract_classes_95040","Implement all inherited abstract classes"),Add_all_missing_async_modifiers:i(95041,3,"Add_all_missing_async_modifiers_95041","Add all missing 'async' modifiers"),Add_ts_ignore_to_all_error_messages:i(95042,3,"Add_ts_ignore_to_all_error_messages_95042","Add '@ts-ignore' to all error messages"),Annotate_everything_with_types_from_JSDoc:i(95043,3,"Annotate_everything_with_types_from_JSDoc_95043","Annotate everything with types from JSDoc"),Add_to_all_uncalled_decorators:i(95044,3,"Add_to_all_uncalled_decorators_95044","Add '()' to all uncalled decorators"),Convert_all_constructor_functions_to_classes:i(95045,3,"Convert_all_constructor_functions_to_classes_95045","Convert all constructor functions to classes"),Generate_get_and_set_accessors:i(95046,3,"Generate_get_and_set_accessors_95046","Generate 'get' and 'set' accessors"),Convert_require_to_import:i(95047,3,"Convert_require_to_import_95047","Convert 'require' to 'import'"),Convert_all_require_to_import:i(95048,3,"Convert_all_require_to_import_95048","Convert all 'require' to 'import'"),Move_to_a_new_file:i(95049,3,"Move_to_a_new_file_95049","Move to a new file"),Remove_unreachable_code:i(95050,3,"Remove_unreachable_code_95050","Remove unreachable code"),Remove_all_unreachable_code:i(95051,3,"Remove_all_unreachable_code_95051","Remove all unreachable code"),Add_missing_typeof:i(95052,3,"Add_missing_typeof_95052","Add missing 'typeof'"),Remove_unused_label:i(95053,3,"Remove_unused_label_95053","Remove unused label"),Remove_all_unused_labels:i(95054,3,"Remove_all_unused_labels_95054","Remove all unused labels"),Convert_0_to_mapped_object_type:i(95055,3,"Convert_0_to_mapped_object_type_95055","Convert '{0}' to mapped object type"),Convert_namespace_import_to_named_imports:i(95056,3,"Convert_namespace_import_to_named_imports_95056","Convert namespace import to named imports"),Convert_named_imports_to_namespace_import:i(95057,3,"Convert_named_imports_to_namespace_import_95057","Convert named imports to namespace import"),Add_or_remove_braces_in_an_arrow_function:i(95058,3,"Add_or_remove_braces_in_an_arrow_function_95058","Add or remove braces in an arrow function"),Add_braces_to_arrow_function:i(95059,3,"Add_braces_to_arrow_function_95059","Add braces to arrow function"),Remove_braces_from_arrow_function:i(95060,3,"Remove_braces_from_arrow_function_95060","Remove braces from arrow function"),Convert_default_export_to_named_export:i(95061,3,"Convert_default_export_to_named_export_95061","Convert default export to named export"),Convert_named_export_to_default_export:i(95062,3,"Convert_named_export_to_default_export_95062","Convert named export to default export"),Add_missing_enum_member_0:i(95063,3,"Add_missing_enum_member_0_95063","Add missing enum member '{0}'"),Add_all_missing_imports:i(95064,3,"Add_all_missing_imports_95064","Add all missing imports"),Convert_to_async_function:i(95065,3,"Convert_to_async_function_95065","Convert to async function"),Convert_all_to_async_functions:i(95066,3,"Convert_all_to_async_functions_95066","Convert all to async functions"),Add_missing_call_parentheses:i(95067,3,"Add_missing_call_parentheses_95067","Add missing call parentheses"),Add_all_missing_call_parentheses:i(95068,3,"Add_all_missing_call_parentheses_95068","Add all missing call parentheses"),Add_unknown_conversion_for_non_overlapping_types:i(95069,3,"Add_unknown_conversion_for_non_overlapping_types_95069","Add 'unknown' conversion for non-overlapping types"),Add_unknown_to_all_conversions_of_non_overlapping_types:i(95070,3,"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:i(95071,3,"Add_missing_new_operator_to_call_95071","Add missing 'new' operator to call"),Add_missing_new_operator_to_all_calls:i(95072,3,"Add_missing_new_operator_to_all_calls_95072","Add missing 'new' operator to all calls"),Add_names_to_all_parameters_without_names:i(95073,3,"Add_names_to_all_parameters_without_names_95073","Add names to all parameters without names"),Enable_the_experimentalDecorators_option_in_your_configuration_file:i(95074,3,"Enable_the_experimentalDecorators_option_in_your_configuration_file_95074","Enable the 'experimentalDecorators' option in your configuration file"),Convert_parameters_to_destructured_object:i(95075,3,"Convert_parameters_to_destructured_object_95075","Convert parameters to destructured object"),Extract_type:i(95077,3,"Extract_type_95077","Extract type"),Extract_to_type_alias:i(95078,3,"Extract_to_type_alias_95078","Extract to type alias"),Extract_to_typedef:i(95079,3,"Extract_to_typedef_95079","Extract to typedef"),Infer_this_type_of_0_from_usage:i(95080,3,"Infer_this_type_of_0_from_usage_95080","Infer 'this' type of '{0}' from usage"),Add_const_to_unresolved_variable:i(95081,3,"Add_const_to_unresolved_variable_95081","Add 'const' to unresolved variable"),Add_const_to_all_unresolved_variables:i(95082,3,"Add_const_to_all_unresolved_variables_95082","Add 'const' to all unresolved variables"),Add_await:i(95083,3,"Add_await_95083","Add 'await'"),Add_await_to_initializer_for_0:i(95084,3,"Add_await_to_initializer_for_0_95084","Add 'await' to initializer for '{0}'"),Fix_all_expressions_possibly_missing_await:i(95085,3,"Fix_all_expressions_possibly_missing_await_95085","Fix all expressions possibly missing 'await'"),Remove_unnecessary_await:i(95086,3,"Remove_unnecessary_await_95086","Remove unnecessary 'await'"),Remove_all_unnecessary_uses_of_await:i(95087,3,"Remove_all_unnecessary_uses_of_await_95087","Remove all unnecessary uses of 'await'"),Enable_the_jsx_flag_in_your_configuration_file:i(95088,3,"Enable_the_jsx_flag_in_your_configuration_file_95088","Enable the '--jsx' flag in your configuration file"),Add_await_to_initializers:i(95089,3,"Add_await_to_initializers_95089","Add 'await' to initializers"),Extract_to_interface:i(95090,3,"Extract_to_interface_95090","Extract to interface"),Convert_to_a_bigint_numeric_literal:i(95091,3,"Convert_to_a_bigint_numeric_literal_95091","Convert to a bigint numeric literal"),Convert_all_to_bigint_numeric_literals:i(95092,3,"Convert_all_to_bigint_numeric_literals_95092","Convert all to bigint numeric literals"),Convert_const_to_let:i(95093,3,"Convert_const_to_let_95093","Convert 'const' to 'let'"),Prefix_with_declare:i(95094,3,"Prefix_with_declare_95094","Prefix with 'declare'"),Prefix_all_incorrect_property_declarations_with_declare:i(95095,3,"Prefix_all_incorrect_property_declarations_with_declare_95095","Prefix all incorrect property declarations with 'declare'"),Convert_to_template_string:i(95096,3,"Convert_to_template_string_95096","Convert to template string"),Add_export_to_make_this_file_into_a_module:i(95097,3,"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:i(95098,3,"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:i(95099,3,"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:i(95100,3,"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:i(95101,3,"Convert_all_invalid_characters_to_HTML_entity_code_95101","Convert all invalid characters to HTML entity code"),Convert_all_const_to_let:i(95102,3,"Convert_all_const_to_let_95102","Convert all 'const' to 'let'"),Convert_function_expression_0_to_arrow_function:i(95105,3,"Convert_function_expression_0_to_arrow_function_95105","Convert function expression '{0}' to arrow function"),Convert_function_declaration_0_to_arrow_function:i(95106,3,"Convert_function_declaration_0_to_arrow_function_95106","Convert function declaration '{0}' to arrow function"),Fix_all_implicit_this_errors:i(95107,3,"Fix_all_implicit_this_errors_95107","Fix all implicit-'this' errors"),Wrap_invalid_character_in_an_expression_container:i(95108,3,"Wrap_invalid_character_in_an_expression_container_95108","Wrap invalid character in an expression container"),Wrap_all_invalid_characters_in_an_expression_container:i(95109,3,"Wrap_all_invalid_characters_in_an_expression_container_95109","Wrap all invalid characters in an expression container"),Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file:i(95110,3,"Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110","Visit https://aka.ms/tsconfig to read more about this file"),Add_a_return_statement:i(95111,3,"Add_a_return_statement_95111","Add a return statement"),Remove_braces_from_arrow_function_body:i(95112,3,"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:i(95113,3,"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:i(95114,3,"Add_all_missing_return_statement_95114","Add all missing return statement"),Remove_braces_from_all_arrow_function_bodies_with_relevant_issues:i(95115,3,"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:i(95116,3,"Wrap_all_object_literal_with_parentheses_95116","Wrap all object literal with parentheses"),Move_labeled_tuple_element_modifiers_to_labels:i(95117,3,"Move_labeled_tuple_element_modifiers_to_labels_95117","Move labeled tuple element modifiers to labels"),Convert_overload_list_to_single_signature:i(95118,3,"Convert_overload_list_to_single_signature_95118","Convert overload list to single signature"),Generate_get_and_set_accessors_for_all_overriding_properties:i(95119,3,"Generate_get_and_set_accessors_for_all_overriding_properties_95119","Generate 'get' and 'set' accessors for all overriding properties"),Wrap_in_JSX_fragment:i(95120,3,"Wrap_in_JSX_fragment_95120","Wrap in JSX fragment"),Wrap_all_unparented_JSX_in_JSX_fragment:i(95121,3,"Wrap_all_unparented_JSX_in_JSX_fragment_95121","Wrap all unparented JSX in JSX fragment"),Convert_arrow_function_or_function_expression:i(95122,3,"Convert_arrow_function_or_function_expression_95122","Convert arrow function or function expression"),Convert_to_anonymous_function:i(95123,3,"Convert_to_anonymous_function_95123","Convert to anonymous function"),Convert_to_named_function:i(95124,3,"Convert_to_named_function_95124","Convert to named function"),Convert_to_arrow_function:i(95125,3,"Convert_to_arrow_function_95125","Convert to arrow function"),Remove_parentheses:i(95126,3,"Remove_parentheses_95126","Remove parentheses"),Could_not_find_a_containing_arrow_function:i(95127,3,"Could_not_find_a_containing_arrow_function_95127","Could not find a containing arrow function"),Containing_function_is_not_an_arrow_function:i(95128,3,"Containing_function_is_not_an_arrow_function_95128","Containing function is not an arrow function"),Could_not_find_export_statement:i(95129,3,"Could_not_find_export_statement_95129","Could not find export statement"),This_file_already_has_a_default_export:i(95130,3,"This_file_already_has_a_default_export_95130","This file already has a default export"),Could_not_find_import_clause:i(95131,3,"Could_not_find_import_clause_95131","Could not find import clause"),Could_not_find_namespace_import_or_named_imports:i(95132,3,"Could_not_find_namespace_import_or_named_imports_95132","Could not find namespace import or named imports"),Selection_is_not_a_valid_type_node:i(95133,3,"Selection_is_not_a_valid_type_node_95133","Selection is not a valid type node"),No_type_could_be_extracted_from_this_type_node:i(95134,3,"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:i(95135,3,"Could_not_find_property_for_which_to_generate_accessor_95135","Could not find property for which to generate accessor"),Name_is_not_valid:i(95136,3,"Name_is_not_valid_95136","Name is not valid"),Can_only_convert_property_with_modifier:i(95137,3,"Can_only_convert_property_with_modifier_95137","Can only convert property with modifier"),Switch_each_misused_0_to_1:i(95138,3,"Switch_each_misused_0_to_1_95138","Switch each misused '{0}' to '{1}'"),Convert_to_optional_chain_expression:i(95139,3,"Convert_to_optional_chain_expression_95139","Convert to optional chain expression"),Could_not_find_convertible_access_expression:i(95140,3,"Could_not_find_convertible_access_expression_95140","Could not find convertible access expression"),Could_not_find_matching_access_expressions:i(95141,3,"Could_not_find_matching_access_expressions_95141","Could not find matching access expressions"),Can_only_convert_logical_AND_access_chains:i(95142,3,"Can_only_convert_logical_AND_access_chains_95142","Can only convert logical AND access chains"),Add_void_to_Promise_resolved_without_a_value:i(95143,3,"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:i(95144,3,"Add_void_to_all_Promises_resolved_without_a_value_95144","Add 'void' to all Promises resolved without a value"),Use_element_access_for_0:i(95145,3,"Use_element_access_for_0_95145","Use element access for '{0}'"),Use_element_access_for_all_undeclared_properties:i(95146,3,"Use_element_access_for_all_undeclared_properties_95146","Use element access for all undeclared properties."),Delete_all_unused_imports:i(95147,3,"Delete_all_unused_imports_95147","Delete all unused imports"),Infer_function_return_type:i(95148,3,"Infer_function_return_type_95148","Infer function return type"),Return_type_must_be_inferred_from_a_function:i(95149,3,"Return_type_must_be_inferred_from_a_function_95149","Return type must be inferred from a function"),Could_not_determine_function_return_type:i(95150,3,"Could_not_determine_function_return_type_95150","Could not determine function return type"),Could_not_convert_to_arrow_function:i(95151,3,"Could_not_convert_to_arrow_function_95151","Could not convert to arrow function"),Could_not_convert_to_named_function:i(95152,3,"Could_not_convert_to_named_function_95152","Could not convert to named function"),Could_not_convert_to_anonymous_function:i(95153,3,"Could_not_convert_to_anonymous_function_95153","Could not convert to anonymous function"),Can_only_convert_string_concatenations_and_string_literals:i(95154,3,"Can_only_convert_string_concatenations_and_string_literals_95154","Can only convert string concatenations and string literals"),Selection_is_not_a_valid_statement_or_statements:i(95155,3,"Selection_is_not_a_valid_statement_or_statements_95155","Selection is not a valid statement or statements"),Add_missing_function_declaration_0:i(95156,3,"Add_missing_function_declaration_0_95156","Add missing function declaration '{0}'"),Add_all_missing_function_declarations:i(95157,3,"Add_all_missing_function_declarations_95157","Add all missing function declarations"),Method_not_implemented:i(95158,3,"Method_not_implemented_95158","Method not implemented."),Function_not_implemented:i(95159,3,"Function_not_implemented_95159","Function not implemented."),Add_override_modifier:i(95160,3,"Add_override_modifier_95160","Add 'override' modifier"),Remove_override_modifier:i(95161,3,"Remove_override_modifier_95161","Remove 'override' modifier"),Add_all_missing_override_modifiers:i(95162,3,"Add_all_missing_override_modifiers_95162","Add all missing 'override' modifiers"),Remove_all_unnecessary_override_modifiers:i(95163,3,"Remove_all_unnecessary_override_modifiers_95163","Remove all unnecessary 'override' modifiers"),Can_only_convert_named_export:i(95164,3,"Can_only_convert_named_export_95164","Can only convert named export"),Add_missing_properties:i(95165,3,"Add_missing_properties_95165","Add missing properties"),Add_all_missing_properties:i(95166,3,"Add_all_missing_properties_95166","Add all missing properties"),Add_missing_attributes:i(95167,3,"Add_missing_attributes_95167","Add missing attributes"),Add_all_missing_attributes:i(95168,3,"Add_all_missing_attributes_95168","Add all missing attributes"),Add_undefined_to_optional_property_type:i(95169,3,"Add_undefined_to_optional_property_type_95169","Add 'undefined' to optional property type"),Convert_named_imports_to_default_import:i(95170,3,"Convert_named_imports_to_default_import_95170","Convert named imports to default import"),Delete_unused_param_tag_0:i(95171,3,"Delete_unused_param_tag_0_95171","Delete unused '@param' tag '{0}'"),Delete_all_unused_param_tags:i(95172,3,"Delete_all_unused_param_tags_95172","Delete all unused '@param' tags"),Rename_param_tag_name_0_to_1:i(95173,3,"Rename_param_tag_name_0_to_1_95173","Rename '@param' tag name '{0}' to '{1}'"),Use_0:i(95174,3,"Use_0_95174","Use `{0}`."),Use_Number_isNaN_in_all_conditions:i(95175,3,"Use_Number_isNaN_in_all_conditions_95175","Use `Number.isNaN` in all conditions."),Convert_typedef_to_TypeScript_type:i(95176,3,"Convert_typedef_to_TypeScript_type_95176","Convert typedef to TypeScript type."),Convert_all_typedef_to_TypeScript_types:i(95177,3,"Convert_all_typedef_to_TypeScript_types_95177","Convert all typedef to TypeScript types."),Move_to_file:i(95178,3,"Move_to_file_95178","Move to file"),Cannot_move_to_file_selected_file_is_invalid:i(95179,3,"Cannot_move_to_file_selected_file_is_invalid_95179","Cannot move to file, selected file is invalid"),Use_import_type:i(95180,3,"Use_import_type_95180","Use 'import type'"),Use_type_0:i(95181,3,"Use_type_0_95181","Use 'type {0}'"),Fix_all_with_type_only_imports:i(95182,3,"Fix_all_with_type_only_imports_95182","Fix all with type-only imports"),Cannot_move_statements_to_the_selected_file:i(95183,3,"Cannot_move_statements_to_the_selected_file_95183","Cannot move statements to the selected file"),Inline_variable:i(95184,3,"Inline_variable_95184","Inline variable"),Could_not_find_variable_to_inline:i(95185,3,"Could_not_find_variable_to_inline_95185","Could not find variable to inline."),Variables_with_multiple_declarations_cannot_be_inlined:i(95186,3,"Variables_with_multiple_declarations_cannot_be_inlined_95186","Variables with multiple declarations cannot be inlined."),Add_missing_comma_for_object_member_completion_0:i(95187,3,"Add_missing_comma_for_object_member_completion_0_95187","Add missing comma for object member completion '{0}'."),No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer:i(18004,1,"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:i(18006,1,"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:i(18007,1,"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:i(18009,1,"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:i(18010,1,"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:i(18011,1,"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:i(18012,1,"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:i(18013,1,"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:i(18014,1,"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:i(18015,1,"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:i(18016,1,"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:i(18017,1,"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:i(18018,1,"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:i(18019,1,"_0_modifier_cannot_be_used_with_a_private_identifier_18019","'{0}' modifier cannot be used with a private identifier."),An_enum_member_cannot_be_named_with_a_private_identifier:i(18024,1,"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:i(18026,1,"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:i(18027,1,"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:i(18028,1,"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:i(18029,1,"Private_identifiers_are_not_allowed_in_variable_declarations_18029","Private identifiers are not allowed in variable declarations."),An_optional_chain_cannot_contain_private_identifiers:i(18030,1,"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:i(18031,1,"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:i(18032,1,"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."),Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values:i(18033,1,"Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033","Type '{0}' is not assignable to type '{1}' as required for computed enum member values."),Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment:i(18034,3,"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:i(18035,1,"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."),Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator:i(18036,1,"Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036","Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),await_expression_cannot_be_used_inside_a_class_static_block:i(18037,1,"await_expression_cannot_be_used_inside_a_class_static_block_18037","'await' expression cannot be used inside a class static block."),for_await_loops_cannot_be_used_inside_a_class_static_block:i(18038,1,"for_await_loops_cannot_be_used_inside_a_class_static_block_18038","'for await' loops cannot be used inside a class static block."),Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block:i(18039,1,"Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039","Invalid use of '{0}'. It cannot be used inside a class static block."),A_return_statement_cannot_be_used_inside_a_class_static_block:i(18041,1,"A_return_statement_cannot_be_used_inside_a_class_static_block_18041","A 'return' statement cannot be used inside a class static block."),_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation:i(18042,1,"_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042","'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."),Types_cannot_appear_in_export_declarations_in_JavaScript_files:i(18043,1,"Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043","Types cannot appear in export declarations in JavaScript files."),_0_is_automatically_exported_here:i(18044,3,"_0_is_automatically_exported_here_18044","'{0}' is automatically exported here."),Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher:i(18045,1,"Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045","Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."),_0_is_of_type_unknown:i(18046,1,"_0_is_of_type_unknown_18046","'{0}' is of type 'unknown'."),_0_is_possibly_null:i(18047,1,"_0_is_possibly_null_18047","'{0}' is possibly 'null'."),_0_is_possibly_undefined:i(18048,1,"_0_is_possibly_undefined_18048","'{0}' is possibly 'undefined'."),_0_is_possibly_null_or_undefined:i(18049,1,"_0_is_possibly_null_or_undefined_18049","'{0}' is possibly 'null' or 'undefined'."),The_value_0_cannot_be_used_here:i(18050,1,"The_value_0_cannot_be_used_here_18050","The value '{0}' cannot be used here."),Compiler_option_0_cannot_be_given_an_empty_string:i(18051,1,"Compiler_option_0_cannot_be_given_an_empty_string_18051","Compiler option '{0}' cannot be given an empty string."),Non_abstract_class_0_does_not_implement_all_abstract_members_of_1:i(18052,1,"Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052","Non-abstract class '{0}' does not implement all abstract members of '{1}'"),Its_type_0_is_not_a_valid_JSX_element_type:i(18053,1,"Its_type_0_is_not_a_valid_JSX_element_type_18053","Its type '{0}' is not a valid JSX element type."),await_using_statements_cannot_be_used_inside_a_class_static_block:i(18054,1,"await_using_statements_cannot_be_used_inside_a_class_static_block_18054","'await using' statements cannot be used inside a class static block.")}}});function wt(e){return e>=80}function Yv(e){return e===32||wt(e)}function i_(e,t){if(e=2?i_(e,c4):t===1?i_(e,s4):i_(e,a4)}function rC(e,t){return t>=2?i_(e,l4):t===1?i_(e,_4):i_(e,o4)}function iC(e){let t=[];return e.forEach((n,a)=>{t[n]=a}),t}function en(e){return d4[e]}function Fl(e){return v0.get(e)}function Gd(e){let t=[],n=0,a=0;for(;n127&&On(_)&&(t.push(a),a=n);break}}return t.push(a),t}function aC(e,t,n,a){return e.getPositionOfLineAndCharacter?e.getPositionOfLineAndCharacter(t,n,a):Ag(Aa(e),t,n,e.text,a)}function Ag(e,t,n,a,_){(t<0||t>=e.length)&&(_?t=t<0?0:t>=e.length?e.length-1:t:I.fail(`Bad line number. Line: ${t}, lineStarts.length: ${e.length} , line map is correct? ${a!==void 0?fv(e,Gd(a)):"unknown"}`));let p=e[t]+n;return _?p>e[t+1]?e[t+1]:typeof a=="string"&&p>a.length?a.length:p:(t=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function On(e){return e===10||e===13||e===8232||e===8233}function Do(e){return e>=48&&e<=57}function I6(e){return Do(e)||e>=65&&e<=70||e>=97&&e<=102}function oC(e){return e<=1114111}function Nf(e){return e>=48&&e<=55}function sC(e,t){let 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 t===0;default:return n>127}}function Mt(e,t,n,a,_){if(Da(t))return t;let p=!1;for(;;){let m=e.charCodeAt(t);switch(m){case 13:e.charCodeAt(t+1)===10&&t++;case 10:if(t++,n)return t;p=!!_;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(a)break;if(e.charCodeAt(t+1)===47){for(t+=2;t127&&ka(m)){t++;continue}break}return t}}function Io(e,t){if(I.assert(t>=0),t===0||On(e.charCodeAt(t-1))){let n=e.charCodeAt(t);if(t+fl=0&&n127&&ka(N)){S&&On(N)&&(d=!0),n++;continue}break e}}return S&&(A=_(y,u,x,d,p,A)),A}function _C(e,t,n,a){return Xd(!1,e,t,!1,n,a)}function cC(e,t,n,a){return Xd(!1,e,t,!0,n,a)}function Zv(e,t,n,a,_){return Xd(!0,e,t,!1,n,a,_)}function e4(e,t,n,a,_){return Xd(!0,e,t,!0,n,a,_)}function t4(e,t,n,a,_,p=[]){return p.push({kind:n,pos:e,end:t,hasTrailingNewLine:a}),p}function Ho(e,t){return Zv(e,t,t4,void 0,void 0)}function n4(e,t){return e4(e,t,t4,void 0,void 0)}function r4(e){let t=$d.exec(e);if(t)return t[0]}function yr(e,t){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>127&&Kv(e,t)}function Ka(e,t,n){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===36||e===95||(n===1?e===45||e===58:!1)||e>127&&rC(e,t)}function Ig(e,t,n){let a=Br(e,0);if(!yr(a,t))return!1;for(let _=ti(a);_d,getStartPos:()=>d,getTokenEnd:()=>u,getTextPos:()=>u,getToken:()=>T,getTokenStart:()=>S,getTokenPos:()=>S,getTokenText:()=>y.substring(S,u),getTokenValue:()=>A,hasUnicodeEscape:()=>(N&1024)!==0,hasExtendedUnicodeEscape:()=>(N&8)!==0,hasPrecedingLineBreak:()=>(N&1)!==0,hasPrecedingJSDocComment:()=>(N&2)!==0,isIdentifier:()=>T===80||T>118,isReservedWord:()=>T>=83&&T<=118,isUnterminated:()=>(N&4)!==0,getCommentDirectives:()=>q,getNumericLiteralFlags:()=>N&25584,getTokenFlags:()=>N,reScanGreaterToken:xt,reScanAsteriskEqualsToken:ut,reScanSlashToken:Gt,reScanTemplateToken:Dr,reScanTemplateHeadOrNoSubstitutionTemplate:Tt,scanJsxIdentifier:Zt,scanJsxAttributeValue:lr,reScanJsxAttributeValue:di,reScanJsxToken:Rn,reScanLessThanToken:yt,reScanHashToken:jn,reScanQuestionToken:ct,reScanInvalidIdentifier:kr,scanJsxToken:Kt,scanJsDocToken:Yn,scanJSDocCommentTextToken:Xr,scan:rn,getText:U,clearCommentDirectives:ie,setText:ye,setScriptTarget:tt,setLanguageVariant:$e,setScriptKind:Ut,setJSDocParsingMode:St,setOnError:Te,resetTokenState:Jt,setTextPos:Jt,setInJSDocType:Rt,tryScan:De,lookAhead:Pr,scanRange:Ji};return I.isDebugging&&Object.defineProperty(F,"__debugShowCurrentPositionInText",{get:()=>{let z=F.getText();return z.slice(0,F.getTokenFullStart())+"\u2551"+z.slice(F.getTokenFullStart())}}),F;function W(z,K=u,te,Ee){if(_){let je=u;u=K,_(z,te||0,Ee),u=je}}function Se(){let z=u,K=!1,te=!1,Ee="";for(;;){let je=y.charCodeAt(u);if(je===95){N|=512,K?(K=!1,te=!0,Ee+=y.substring(z,u)):(N|=16384,W(te?B.Multiple_consecutive_numeric_separators_are_not_permitted:B.Numeric_separators_are_not_allowed_here,u,1)),u++,z=u;continue}if(Do(je)){K=!0,te=!1,u++;continue}break}return y.charCodeAt(u-1)===95&&(N|=16384,W(B.Numeric_separators_are_not_allowed_here,u-1,1)),Ee+y.substring(z,u)}function Qe(){let z=u,K;if(y.charCodeAt(u)===48)if(u++,y.charCodeAt(u)===95)N|=16896,W(B.Numeric_separators_are_not_allowed_here,u,1),u--,K=Se();else if(!st())N|=8192,K=""+ +A;else if(!A)K="0";else{A=""+parseInt(A,8),N|=32;let nt=T===41,kt=(nt?"-":"")+"0o"+(+A).toString(8);return nt&&z--,W(B.Octal_literals_are_not_allowed_Use_the_syntax_0,z,u-z,kt),9}else K=Se();let te,Ee;y.charCodeAt(u)===46&&(u++,te=Se());let je=u;if(y.charCodeAt(u)===69||y.charCodeAt(u)===101){u++,N|=16,(y.charCodeAt(u)===43||y.charCodeAt(u)===45)&&u++;let nt=u,kt=Se();kt?(Ee=y.substring(je,nt)+kt,je=u):W(B.Digit_expected)}let pt;if(N&512?(pt=K,te&&(pt+="."+te),Ee&&(pt+=Ee)):pt=y.substring(z,je),N&8192)return W(B.Decimals_with_leading_zeros_are_not_allowed,z,je-z),A=""+ +pt,9;if(te!==void 0||N&16)return Be(z,te===void 0&&!!(N&16)),A=""+ +pt,9;{A=pt;let nt=Ht();return Be(z),nt}}function Be(z,K){if(!yr(Br(y,u),e))return;let te=u,{length:Ee}=vt();Ee===1&&y[te]==="n"?W(K?B.A_bigint_literal_cannot_use_exponential_notation:B.A_bigint_literal_must_be_an_integer,z,te-z+1):(W(B.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal,te,Ee),u=te)}function st(){let z=u,K=!0;for(;Do(y.charCodeAt(u));)Nf(y.charCodeAt(u))||(K=!1),u++;return A=y.substring(z,u),K}function _t(z,K){let te=yn(z,!1,K);return te?parseInt(te,16):-1}function hn(z,K){return yn(z,!0,K)}function yn(z,K,te){let Ee=[],je=!1,pt=!1;for(;Ee.length=65&&nt<=70)nt+=32;else if(!(nt>=48&&nt<=57||nt>=97&&nt<=102))break;Ee.push(nt),u++,pt=!1}return Ee.length=x){te+=y.substring(Ee,u),N|=4,W(B.Unterminated_string_literal);break}let je=y.charCodeAt(u);if(je===K){te+=y.substring(Ee,u),u++;break}if(je===92&&!z){te+=y.substring(Ee,u),te+=cr(!0),Ee=u;continue}if((je===10||je===13)&&!z){te+=y.substring(Ee,u),N|=4,W(B.Unterminated_string_literal);break}u++}return te}function gn(z){let K=y.charCodeAt(u)===96;u++;let te=u,Ee="",je;for(;;){if(u>=x){Ee+=y.substring(te,u),N|=4,W(B.Unterminated_template_literal),je=K?15:18;break}let pt=y.charCodeAt(u);if(pt===96){Ee+=y.substring(te,u),u++,je=K?15:18;break}if(pt===36&&u+1=x)return W(B.Unexpected_end_of_text),"";let te=y.charCodeAt(u);switch(u++,te){case 48:if(u>=x||!Do(y.charCodeAt(u)))return"\0";case 49:case 50:case 51:u=x?(N|=2048,z&&W(B.Unexpected_end_of_text),y.substring(K,u)):y.charCodeAt(u)!==125?(N|=2048,z&&W(B.Unterminated_Unicode_escape_sequence),y.substring(K,u)):(u++,N|=8,Of(je)):(N|=2048,z&&W(B.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),y.substring(K,u))}for(;u1114111&&(W(B.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),te=!0),u>=x?(W(B.Unexpected_end_of_text),te=!0):y.charCodeAt(u)===125?u++:(W(B.Unterminated_Unicode_escape_sequence),te=!0),te?"":Of(K)}function Qn(){if(u+5=0&&Ka(te,e)){u+=3,N|=8,z+=He(),K=u;continue}if(te=Qn(),!(te>=0&&Ka(te,e)))break;N|=1024,z+=y.substring(K,u),z+=Of(te),u+=6,K=u}else break}return z+=y.substring(K,u),z}function Jn(){let z=A.length;if(z>=2&&z<=12){let K=A.charCodeAt(0);if(K>=97&&K<=122){let te=i4.get(A);if(te!==void 0)return T=te}}return T=80}function Ar(z){let K="",te=!1,Ee=!1;for(;;){let je=y.charCodeAt(u);if(je===95){N|=512,te?(te=!1,Ee=!0):W(Ee?B.Multiple_consecutive_numeric_separators_are_not_permitted:B.Numeric_separators_are_not_allowed_here,u,1),u++;continue}if(te=!0,!Do(je)||je-48>=z)break;K+=y[u],u++,Ee=!1}return y.charCodeAt(u-1)===95&&W(B.Numeric_separators_are_not_allowed_here,u-1,1),K}function Ht(){return y.charCodeAt(u)===110?(A+="n",N&384&&(A=Cm(A)+"n"),u++,10):(A=""+(N&128?parseInt(A.slice(2),2):N&256?parseInt(A.slice(2),8):+A),9)}function rn(){d=u,N=0;let z=!1;for(;;){if(S=u,u>=x)return T=1;let K=Br(y,u);if(u===0){if(K===65533)return W(B.File_appears_to_be_binary),u=x,T=8;if(K===35&&Dg(y,u)){if(u=Pg(y,u),t)continue;return T=6}}switch(K){case 10:case 13:if(N|=1,t){u++;continue}else return K===13&&u+1=0&&yr(te,e))return u+=3,N|=8,A=He()+vt(),T=Jn();let Ee=Qn();return Ee>=0&&yr(Ee,e)?(u+=6,N|=1024,A=String.fromCharCode(Ee)+vt(),T=Jn()):(W(B.Invalid_character),u++,T=0);case 35:if(u!==0&&y[u+1]==="!")return W(B.can_only_be_used_at_the_start_of_a_file),u++,T=0;let je=Br(y,u+1);if(je===92){u++;let kt=Gr();if(kt>=0&&yr(kt,e))return u+=3,N|=8,A="#"+He()+vt(),T=81;let qt=Qn();if(qt>=0&&yr(qt,e))return u+=6,N|=1024,A="#"+String.fromCharCode(qt)+vt(),T=81;u--}return yr(je,e)?(u++,an(je,e)):(A="#",W(B.Invalid_character,u++,ti(K))),T=81;default:let pt=an(K,e);if(pt)return T=pt;if(Mo(K)){u+=ti(K);continue}else if(On(K)){N|=1,u+=ti(K);continue}let nt=ti(K);return W(B.Invalid_character,u,nt),u+=nt,T=0}}}function at(){switch(fe){case 0:return!0;case 1:return!1}return se!==3&&se!==4?!0:fe===3?!1:f4.test(y.slice(d,u))}function kr(){I.assert(T===0,"'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."),u=S=d,N=0;let z=Br(y,u),K=an(z,99);return K?T=K:(u+=ti(z),T)}function an(z,K){let te=z;if(yr(te,K)){for(u+=ti(te);u=x)return T=1;let K=y.charCodeAt(u);if(K===60)return y.charCodeAt(u+1)===47?(u+=2,T=31):(u++,T=30);if(K===123)return u++,T=19;let te=0;for(;u0)break;ka(K)||(te=u)}u++}return A=y.substring(d,u),te===-1?13:12}function Zt(){if(wt(T)){for(;u=x)return T=1;for(let K=y.charCodeAt(u);u=0&&Mo(y.charCodeAt(u-1))&&!(u+1=x)return T=1;let z=Br(y,u);switch(u+=ti(z),z){case 9:case 11:case 12:case 32:for(;u=0&&yr(K,e))return u+=3,N|=8,A=He()+vt(),T=Jn();let te=Qn();return te>=0&&yr(te,e)?(u+=6,N|=1024,A=String.fromCharCode(te)+vt(),T=Jn()):(u++,T=0)}if(yr(z,e)){let K=z;for(;u=0),u=z,d=z,S=z,T=0,A=void 0,N=0}function Rt(z){Q+=z?1:-1}}function Br(e,t){return e.codePointAt(t)}function ti(e){return e>=65536?2:1}function lC(e){if(I.assert(0<=e&&e<=1114111),e<=65535)return String.fromCharCode(e);let t=Math.floor((e-65536)/1024)+55296,n=(e-65536)%1024+56320;return String.fromCharCode(t,n)}function Of(e){return m4(e)}var pl,i4,v0,a4,o4,s4,_4,c4,l4,u4,p4,f4,d4,fl,$d,m4,uC=It({"src/compiler/scanner.ts"(){"use strict";En(),pl={abstract:128,accessor:129,any:133,as:130,asserts:131,assert:132,bigint:163,boolean:136,break:83,case:84,catch:85,class:86,continue:88,const:87,constructor:137,debugger:89,declare:138,default:90,delete:91,do:92,else:93,enum:94,export:95,extends:96,false:97,finally:98,for:99,from:161,function:100,get:139,if:101,implements:119,import:102,in:103,infer:140,instanceof:104,interface:120,intrinsic:141,is:142,keyof:143,let:121,module:144,namespace:145,never:146,new:105,null:106,number:150,object:151,package:122,private:123,protected:124,public:125,override:164,out:147,readonly:148,require:149,global:162,return:107,satisfies:152,set:153,static:126,string:154,super:108,switch:109,symbol:155,this:110,throw:111,true:112,try:113,type:156,typeof:114,undefined:157,unique:158,unknown:159,using:160,var:115,void:116,while:117,with:118,yield:127,async:134,await:135,of:165},i4=new Map(Object.entries(pl)),v0=new Map(Object.entries({...pl,"{":19,"}":20,"(":21,")":22,"[":23,"]":24,".":25,"...":26,";":27,",":28,"<":30,">":32,"<=":33,">=":34,"==":35,"!=":36,"===":37,"!==":38,"=>":39,"+":40,"-":41,"**":43,"*":42,"/":44,"%":45,"++":46,"--":47,"<<":48,">":49,">>>":50,"&":51,"|":52,"^":53,"!":54,"~":55,"&&":56,"||":57,"?":58,"??":61,"?.":29,":":59,"=":64,"+=":65,"-=":66,"*=":67,"**=":68,"/=":69,"%=":70,"<<=":71,">>=":72,">>>=":73,"&=":74,"|=":75,"^=":79,"||=":76,"&&=":77,"??=":78,"@":60,"#":63,"`":62})),a4=[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],o4=[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],s4=[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],_4=[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],c4=[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],l4=[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],u4=/^\/\/\/?\s*@(ts-expect-error|ts-ignore)/,p4=/^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/,f4=/@(?:see|link)/i,d4=iC(v0),fl=7,$d=/^#!.*/,m4=String.fromCodePoint?e=>String.fromCodePoint(e):lC}});function pC(e){return as(e)||b_(e)}function fC(e){return gv(e,H2)}function h4(e){switch(Ql(e)){case 99:return"lib.esnext.full.d.ts";case 9:return"lib.es2022.full.d.ts";case 8:return"lib.es2021.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"}}function tn(e){return e.start+e.length}function y4(e){return e.length===0}function dC(e,t){return t>=e.start&&t=e.pos&&t<=e.end}function hC(e,t){return t.start>=e.start&&tn(t)<=tn(e)}function yC(e,t){return g4(e,t)!==void 0}function g4(e,t){let n=b4(e,t);return n&&n.length===0?void 0:n}function gC(e,t){return Ng(e.start,e.length,t.start,t.length)}function bC(e,t,n){return Ng(e.start,e.length,t,n)}function Ng(e,t,n,a){let _=e+t,p=n+a;return n<=_&&p>=e}function vC(e,t){return t<=tn(e)&&t>=e.start}function b4(e,t){let n=Math.max(e.start,t.start),a=Math.min(tn(e),tn(t));return n<=a?Xi(n,a):void 0}function S_(e,t){if(e<0)throw new Error("start < 0");if(t<0)throw new Error("length < 0");return{start:e,length:t}}function Xi(e,t){return S_(e,t-e)}function Ys(e){return S_(e.span.start,e.newLength)}function v4(e){return y4(e.span)&&e.newLength===0}function Qd(e,t){if(t<0)throw new Error("newLength < 0");return{span:e,newLength:t}}function TC(e){if(e.length===0)return Yg;if(e.length===1)return e[0];let t=e[0],n=t.span.start,a=tn(t.span),_=n+t.newLength;for(let p=1;p=2&&e.charCodeAt(0)===95&&e.charCodeAt(1)===95?"_"+e:e}function Go(e){let t=e;return t.length>=3&&t.charCodeAt(0)===95&&t.charCodeAt(1)===95&&t.charCodeAt(2)===95?t.substr(1):t}function Lt(e){return Go(e.escapedText)}function E4(e){let t=Fl(e.escapedText);return t?Ur(t,ki):void 0}function yd(e){return e.valueDeclaration&&eT(e.valueDeclaration)?Lt(e.valueDeclaration.name):Go(e.escapedName)}function C4(e){let t=e.parent.parent;if(t){if(Xo(t))return Af(t);switch(t.kind){case 243:if(t.declarationList&&t.declarationList.declarations[0])return Af(t.declarationList.declarations[0]);break;case 244:let n=t.expression;switch(n.kind===226&&n.operatorToken.kind===64&&(n=n.left),n.kind){case 211:return n.name;case 212:let a=n.argumentExpression;if(Ae(a))return a}break;case 217:return Af(t.expression);case 256:{if(Xo(t.statement)||sm(t.statement))return Af(t.statement);break}}}}function Af(e){let t=ql(e);return t&&Ae(t)?t:void 0}function A4(e,t){return!!(Kd(e)&&Ae(e.name)&&Lt(e.name)===Lt(t)||ls(e)&&Ze(e.declarationList.declarations,n=>A4(n,t)))}function k4(e){return e.name||C4(e)}function Kd(e){return!!e.name}function Zd(e){switch(e.kind){case 80:return e;case 355:case 348:{let{name:n}=e;if(n.kind===166)return n.right;break}case 213:case 226:{let n=e;switch(Oa(n)){case 1:case 4:case 5:case 3:return mm(n.left);case 7:case 8:case 9:return n.arguments[1];default:return}}case 353:return k4(e);case 347:return C4(e);case 277:{let{expression:n}=e;return Ae(n)?n:void 0}case 212:let t=e;if(v2(t))return t.argumentExpression}return e.name}function ql(e){if(e!==void 0)return Zd(e)||(Im(e)||Nm(e)||Ol(e)?D4(e):void 0)}function D4(e){if(e.parent){if(fs(e.parent)||ru(e.parent))return e.parent.name;if(At(e.parent)&&e===e.parent.right){if(Ae(e.parent.left))return e.parent.left;if(Ko(e.parent.left))return mm(e.parent.left)}else if(Li(e.parent)&&Ae(e.parent.name))return e.parent.name}else return}function CC(e){if(kl(e))return rr(e.modifiers,M_)}function gd(e){if(Cn(e,98303))return rr(e.modifiers,Ug)}function P4(e,t){if(e.name)if(Ae(e.name)){let n=e.name.escapedText;return c_(e.parent,t).filter(a=>m_(a)&&Ae(a.name)&&a.name.escapedText===n)}else{let n=e.parent.parameters.indexOf(e);I.assert(n>-1,"Parameters should always be in their parents' parameter list");let a=c_(e.parent,t).filter(m_);if(nts(a)&&a.typeParameters.some(_=>_.name.escapedText===n))}function O4(e){return N4(e,!1)}function M4(e){return N4(e,!0)}function AC(e){return!!nn(e,m_)}function L4(e){return nn(e,jm)}function J4(e){return V4(e,S8)}function kC(e){return nn(e,g8)}function DC(e){return nn(e,Fb)}function R4(e){return nn(e,Fb,!0)}function PC(e){return nn(e,Bb)}function j4(e){return nn(e,Bb,!0)}function IC(e){return nn(e,Ub)}function F4(e){return nn(e,Ub,!0)}function NC(e){return nn(e,qb)}function B4(e){return nn(e,qb,!0)}function U4(e){return nn(e,b8,!0)}function OC(e){return nn(e,Wb)}function q4(e){return nn(e,Wb,!0)}function MC(e){return nn(e,v8)}function LC(e){return nn(e,T8)}function z4(e){return nn(e,Vb)}function JC(e){return nn(e,ts)}function Mg(e){return nn(e,Hb)}function tm(e){let t=nn(e,lu);if(t&&t.typeExpression&&t.typeExpression.type)return t}function nm(e){let t=nn(e,lu);return!t&&Pa(e)&&(t=ir(em(e),n=>!!n.typeExpression)),t&&t.typeExpression&&t.typeExpression.type}function W4(e){let t=z4(e);if(t&&t.typeExpression)return t.typeExpression.type;let n=tm(e);if(n&&n.typeExpression){let a=n.typeExpression.type;if(Pm(a)){let _=ir(a.members,yb);return _&&_.type}if(tu(a)||Rm(a))return a.type}}function c_(e,t){var n;if(!hm(e))return Je;let a=(n=e.jsDoc)==null?void 0:n.jsDocCache;if(a===void 0||t){let _=f3(e,t);I.assert(_.length<2||_[0]!==_[1]),a=zo(_,p=>ds(p)?p.tags:p),t||(e.jsDoc??(e.jsDoc=[]),e.jsDoc.jsDocCache=a)}return a}function zl(e){return c_(e,!1)}function RC(e){return c_(e,!0)}function nn(e,t,n){return ir(c_(e,n),t)}function V4(e,t){return zl(e).filter(t)}function jC(e,t){return zl(e).filter(n=>n.kind===t)}function FC(e){return typeof e=="string"?e:e==null?void 0:e.map(t=>t.kind===328?t.text:BC(t)).join("")}function BC(e){let t=e.kind===331?"link":e.kind===332?"linkcode":"linkplain",n=e.name?Ci(e.name):"",a=e.name&&e.text.startsWith("://")?"":" ";return`{@${t} ${n}${a}${e.text}}`}function UC(e){if(cu(e)){if(zb(e.parent)){let t=E2(e.parent);if(t&&eo(t.tags))return zo(t.tags,n=>ts(n)?n.typeParameters:void 0)}return Je}if(Xl(e))return I.assert(e.parent.kind===327),zo(e.parent.tags,t=>ts(t)?t.typeParameters:void 0);if(e.typeParameters||J8(e)&&e.typeParameters)return e.typeParameters;if(Vt(e)){let t=X3(e);if(t.length)return t;let n=nm(e);if(n&&tu(n)&&n.typeParameters)return n.typeParameters}return Je}function qC(e){return e.constraint?e.constraint:ts(e.parent)&&e===e.parent.typeParameters[0]?e.parent.constraint:void 0}function ro(e){return e.kind===80||e.kind===81}function zC(e){return e.kind===178||e.kind===177}function H4(e){return Ln(e)&&!!(e.flags&64)}function G4(e){return Ki(e)&&!!(e.flags&64)}function T0(e){return R_(e)&&!!(e.flags&64)}function Lg(e){let t=e.kind;return!!(e.flags&64)&&(t===211||t===212||t===213||t===235)}function Jg(e){return Lg(e)&&!Uo(e)&&!!e.questionDotToken}function WC(e){return Jg(e.parent)&&e.parent.expression===e}function VC(e){return!Lg(e.parent)||Jg(e.parent)||e!==e.parent.expression}function HC(e){return e.kind===226&&e.operatorToken.kind===61}function X4(e){return J_(e)&&Ae(e.typeName)&&e.typeName.escapedText==="const"&&!e.typeArguments}function rm(e){return ms(e,8)}function $4(e){return Uo(e)&&!!(e.flags&64)}function GC(e){return e.kind===252||e.kind===251}function XC(e){return e.kind===280||e.kind===279}function Q4(e){switch(e.kind){case 309:case 310:return!0;default:return!1}}function $C(e){return Q4(e)||e.kind===307||e.kind===311}function Rg(e){return e.kind===355||e.kind===348}function QC(e){return Wl(e.kind)}function Wl(e){return e>=166}function Y4(e){return e>=0&&e<=165}function YC(e){return Y4(e.kind)}function ha(e){return Wn(e,"pos")&&Wn(e,"end")}function jg(e){return 9<=e&&e<=15}function Fg(e){return jg(e.kind)}function KC(e){switch(e.kind){case 210:case 209:case 14:case 218:case 231:return!0}return!1}function wl(e){return 15<=e&&e<=18}function ZC(e){return wl(e.kind)}function eA(e){let t=e.kind;return t===17||t===18}function tA(e){return l8(e)||p8(e)}function K4(e){switch(e.kind){case 276:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 274:return e.parent.isTypeOnly;case 273:case 271:return e.isTypeOnly}return!1}function Z4(e){switch(e.kind){case 281:return e.isTypeOnly||e.parent.parent.isTypeOnly;case 278:return e.isTypeOnly&&!!e.moduleSpecifier&&!e.exportClause;case 280:return e.parent.isTypeOnly}return!1}function nA(e){return K4(e)||Z4(e)}function rA(e){return e.kind===11||wl(e.kind)}function iA(e){return Tr(e)||Ae(e)}function va(e){var t;return Ae(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function Bg(e){var t;return Vn(e)&&((t=e.emitNode)==null?void 0:t.autoGenerate)!==void 0}function aA(e){let t=e.emitNode.autoGenerate.flags;return!!(t&32)&&!!(t&16)&&!!(t&8)}function eT(e){return(Ia(e)||zg(e))&&Vn(e.name)}function oA(e){return Ln(e)&&Vn(e.name)}function Ei(e){switch(e){case 128:case 129:case 134:case 87:case 138:case 90:case 95:case 103:case 125:case 123:case 124:case 148:case 126:case 147:case 164:return!0}return!1}function tT(e){return!!(z2(e)&31)}function nT(e){return tT(e)||e===126||e===164||e===129}function Ug(e){return Ei(e.kind)}function sA(e){let t=e.kind;return t===166||t===80}function Vl(e){let t=e.kind;return t===80||t===81||t===11||t===9||t===167}function _A(e){let t=e.kind;return t===80||t===206||t===207}function $i(e){return!!e&&qg(e.kind)}function im(e){return!!e&&(qg(e.kind)||eu(e))}function rT(e){return e&&iT(e.kind)}function cA(e){return e.kind===112||e.kind===97}function iT(e){switch(e){case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function qg(e){switch(e){case 173:case 179:case 330:case 180:case 181:case 184:case 324:case 185:return!0;default:return iT(e)}}function lA(e){return ci(e)||c8(e)||au(e)&&$i(e.parent)}function io(e){let t=e.kind;return t===176||t===172||t===174||t===177||t===178||t===181||t===175||t===240}function ar(e){return e&&(e.kind===263||e.kind===231)}function am(e){return e&&(e.kind===177||e.kind===178)}function aT(e){return Ia(e)&&F2(e)}function uA(e){return Vt(e)&&sx(e)?(!_s(e)||!k_(e.expression))&&!Yo(e,!0):e.parent&&ar(e.parent)&&Ia(e)&&!F2(e)}function zg(e){switch(e.kind){case 174:case 177:case 178:return!0;default:return!1}}function pA(e){switch(e.kind){case 174:case 177:case 178:case 172:return!0;default:return!1}}function Mf(e){return Ug(e)||M_(e)}function Wg(e){let t=e.kind;return t===180||t===179||t===171||t===173||t===181||t===177||t===178}function fA(e){return Wg(e)||io(e)}function Vg(e){let t=e.kind;return t===303||t===304||t===305||t===174||t===177||t===178}function S0(e){return ES(e.kind)}function dA(e){switch(e.kind){case 184:case 185:return!0}return!1}function om(e){if(e){let t=e.kind;return t===207||t===206}return!1}function oT(e){let t=e.kind;return t===209||t===210}function mA(e){let t=e.kind;return t===208||t===232}function Hg(e){switch(e.kind){case 260:case 169:case 208:return!0}return!1}function hA(e){return Li(e)||Pa(e)||_T(e)||lT(e)}function yA(e){return sT(e)||cT(e)}function sT(e){switch(e.kind){case 206:case 210:return!0}return!1}function _T(e){switch(e.kind){case 208:case 303:case 304:case 305:return!0}return!1}function cT(e){switch(e.kind){case 207:case 209:return!0}return!1}function lT(e){switch(e.kind){case 208:case 232:case 230:case 209:case 210:case 80:case 211:case 212:return!0}return si(e,!0)}function gA(e){let t=e.kind;return t===211||t===166||t===205}function bA(e){let t=e.kind;return t===211||t===166}function vA(e){return uT(e)||ZS(e)}function uT(e){switch(e.kind){case 286:case 285:case 213:case 214:case 215:case 170:return!0;default:return!1}}function TA(e){return e.kind===213||e.kind===214}function SA(e){let t=e.kind;return t===228||t===15}function jo(e){return pT(rm(e).kind)}function pT(e){switch(e){case 211:case 212:case 214:case 213:case 284:case 285:case 288:case 215:case 209:case 217:case 210:case 231:case 218:case 80:case 81:case 14:case 9:case 10:case 11:case 15:case 228:case 97:case 106:case 110:case 112:case 108:case 235:case 233:case 236:case 102:case 282:return!0;default:return!1}}function fT(e){return dT(rm(e).kind)}function dT(e){switch(e){case 224:case 225:case 220:case 221:case 222:case 223:case 216:return!0;default:return pT(e)}}function xA(e){switch(e.kind){case 225:return!0;case 224:return e.operator===46||e.operator===47;default:return!1}}function wA(e){switch(e.kind){case 106:case 112:case 97:case 224:return!0;default:return Fg(e)}}function sm(e){return EA(rm(e).kind)}function EA(e){switch(e){case 227:case 229:case 219:case 226:case 230:case 234:case 232:case 361:case 360:case 238:return!0;default:return dT(e)}}function CA(e){let t=e.kind;return t===216||t===234}function AA(e){return Lb(e)||o8(e)}function mT(e,t){switch(e.kind){case 248:case 249:case 250:case 246:case 247:return!0;case 256:return t&&mT(e.statement,t)}return!1}function hT(e){return ps(e)||F_(e)}function kA(e){return Ze(e,hT)}function DA(e){return!pm(e)&&!ps(e)&&!Cn(e,32)&&!lm(e)}function PA(e){return pm(e)||ps(e)||Cn(e,32)}function IA(e){return e.kind===249||e.kind===250}function NA(e){return au(e)||sm(e)}function OA(e){return au(e)}function MA(e){return kb(e)||sm(e)}function LA(e){let t=e.kind;return t===268||t===267||t===80}function JA(e){let t=e.kind;return t===268||t===267}function RA(e){let t=e.kind;return t===80||t===267}function jA(e){let t=e.kind;return t===275||t===274}function FA(e){return e.kind===267||e.kind===266}function BA(e){switch(e.kind){case 219:case 226:case 208:case 213:case 179:case 263:case 231:case 175:case 176:case 185:case 180:case 212:case 266:case 306:case 277:case 278:case 281:case 262:case 218:case 184:case 177:case 80:case 273:case 271:case 276:case 181:case 264:case 345:case 347:case 324:case 348:case 355:case 330:case 353:case 329:case 291:case 292:case 293:case 200:case 174:case 173:case 267:case 202:case 280:case 270:case 274:case 214:case 15:case 9:case 210:case 169:case 211:case 303:case 172:case 171:case 178:case 304:case 312:case 305:case 11:case 265:case 187:case 168:case 260:return!0;default:return!1}}function UA(e){switch(e.kind){case 219:case 241:case 179:case 269:case 299:case 175:case 194:case 176:case 185:case 180:case 248:case 249:case 250:case 262:case 218:case 184:case 177:case 181:case 345:case 347:case 324:case 330:case 353:case 200:case 174:case 173:case 267:case 178:case 312:case 265:return!0;default:return!1}}function qA(e){return e===219||e===208||e===263||e===231||e===175||e===176||e===266||e===306||e===281||e===262||e===218||e===177||e===273||e===271||e===276||e===264||e===291||e===174||e===173||e===267||e===270||e===274||e===280||e===169||e===303||e===172||e===171||e===178||e===304||e===265||e===168||e===260||e===353||e===345||e===355}function Gg(e){return e===262||e===282||e===263||e===264||e===265||e===266||e===267||e===272||e===271||e===278||e===277||e===270}function Xg(e){return e===252||e===251||e===259||e===246||e===244||e===242||e===249||e===250||e===248||e===245||e===256||e===253||e===255||e===257||e===258||e===243||e===247||e===254||e===359}function Xo(e){return e.kind===168?e.parent&&e.parent.kind!==352||Vt(e):qA(e.kind)}function zA(e){return Gg(e.kind)}function WA(e){return Xg(e.kind)}function yT(e){let t=e.kind;return Xg(t)||Gg(t)||VA(e)}function VA(e){return e.kind!==241||e.parent!==void 0&&(e.parent.kind===258||e.parent.kind===299)?!1:!WT(e)}function gT(e){let t=e.kind;return Xg(t)||Gg(t)||t===241}function HA(e){let t=e.kind;return t===283||t===166||t===80}function GA(e){let t=e.kind;return t===110||t===80||t===211||t===295}function bT(e){let t=e.kind;return t===284||t===294||t===285||t===12||t===288}function XA(e){let t=e.kind;return t===291||t===293}function $A(e){let t=e.kind;return t===11||t===294}function vT(e){let t=e.kind;return t===286||t===285}function QA(e){let t=e.kind;return t===296||t===297}function $g(e){return e.kind>=316&&e.kind<=357}function TT(e){return e.kind===327||e.kind===326||e.kind===328||dl(e)||Qg(e)||jb(e)||cu(e)}function Qg(e){return e.kind>=334&&e.kind<=357}function nl(e){return e.kind===178}function rl(e){return e.kind===177}function Hi(e){if(!hm(e))return!1;let{jsDoc:t}=e;return!!t&&t.length>0}function YA(e){return!!e.type}function ST(e){return!!e.initializer}function KA(e){switch(e.kind){case 260:case 169:case 208:case 172:case 303:case 306:return!0;default:return!1}}function x0(e){return e.kind===291||e.kind===293||Vg(e)}function ZA(e){return e.kind===183||e.kind===233}function ek(e){let t=w0;for(let n of e){if(!n.length)continue;let a=0;for(;an.kind===t)}function ak(e){let t=new Map;if(e)for(let n of e)t.set(n.escapedName,n);return t}function E0(e){return(e.flags&33554432)!==0}function ok(){var e="";let t=n=>e+=n;return{getText:()=>e,write:t,rawWrite:t,writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeLiteral:t,writeParameter:t,writeProperty:t,writeSymbol:(n,a)=>t(n),writeTrailingSemicolon:t,writeComment:t,getTextPos:()=>e.length,getLine:()=>0,getColumn:()=>0,getIndent:()=>0,isAtStartOfLine:()=>!1,hasTrailingComment:()=>!1,hasTrailingWhitespace:()=>!!e.length&&ka(e.charCodeAt(e.length-1)),writeLine:()=>e+=" ",increaseIndent:gr,decreaseIndent:gr,clear:()=>e=""}}function sk(e,t){return e.configFilePath!==t.configFilePath||wT(e,t)}function wT(e,t){return w_(e,t,moduleResolutionOptionDeclarations)}function _k(e,t){return w_(e,t,optionsAffectingProgramStructure)}function w_(e,t,n){return e!==t&&n.some(a=>!rb(z0(e,a),z0(t,a)))}function ck(e,t){for(;;){let n=t(e);if(n==="quit")return;if(n!==void 0)return n;if(ci(e))return;e=e.parent}}function lk(e,t){let n=e.entries();for(let[a,_]of n){let p=t(_,a);if(p)return p}}function C0(e,t){let n=e.keys();for(let a of n){let _=t(a);if(_)return _}}function uk(e,t){e.forEach((n,a)=>{t.set(a,n)})}function pk(e){let t=e_.getText();try{return e(e_),e_.getText()}finally{e_.clear(),e_.writeKeyword(t)}}function _m(e){return e.end-e.pos}function fk(e,t){return e.path===t.path&&!e.prepend==!t.prepend&&!e.circular==!t.circular}function dk(e,t){return e===t||e.resolvedModule===t.resolvedModule||!!e.resolvedModule&&!!t.resolvedModule&&e.resolvedModule.isExternalLibraryImport===t.resolvedModule.isExternalLibraryImport&&e.resolvedModule.extension===t.resolvedModule.extension&&e.resolvedModule.resolvedFileName===t.resolvedModule.resolvedFileName&&e.resolvedModule.originalPath===t.resolvedModule.originalPath&&hk(e.resolvedModule.packageId,t.resolvedModule.packageId)&&e.node10Result===t.node10Result}function mk(e,t,n,a,_){var p;let m=(p=t.getResolvedModule(e,n,a))==null?void 0:p.node10Result,y=m?il(void 0,B.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings,m,m.includes(nodeModulesPathPart+"@types/")?`@types/${mangleScopedPackageName(_)}`:_):t.typesPackageExists(_)?il(void 0,B.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,_,mangleScopedPackageName(_)):t.packageBundlesTypes(_)?il(void 0,B.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1,_,n):il(void 0,B.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0,n,mangleScopedPackageName(_));return y&&(y.repopulateInfo=()=>({moduleReference:n,mode:a,packageName:_===n?void 0:_})),y}function hk(e,t){return e===t||!!e&&!!t&&e.name===t.name&&e.subModuleName===t.subModuleName&&e.version===t.version}function ET({name:e,subModuleName:t}){return t?`${e}/${t}`:e}function yk(e){return`${ET(e)}@${e.version}`}function gk(e,t){return e===t||e.resolvedTypeReferenceDirective===t.resolvedTypeReferenceDirective||!!e.resolvedTypeReferenceDirective&&!!t.resolvedTypeReferenceDirective&&e.resolvedTypeReferenceDirective.resolvedFileName===t.resolvedTypeReferenceDirective.resolvedFileName&&!!e.resolvedTypeReferenceDirective.primary==!!t.resolvedTypeReferenceDirective.primary&&e.resolvedTypeReferenceDirective.originalPath===t.resolvedTypeReferenceDirective.originalPath}function bk(e,t,n,a,_,p){I.assert(e.length===n.length);for(let m=0;m=0),Aa(t)[e]}function Ek(e){let t=oi(e),n=no(t,e.pos);return`${t.fileName}(${n.line+1},${n.character+1})`}function CT(e,t){I.assert(e>=0);let n=Aa(t),a=e,_=t.text;if(a+1===n.length)return _.length-1;{let p=n[a],m=n[a+1]-1;for(I.assert(On(_.charCodeAt(m)));p<=m&&On(_.charCodeAt(m));)m--;return m}}function AT(e,t,n){return!(n&&n(t))&&!e.identifiers.has(t)}function Vi(e){return e===void 0?!0:e.pos===e.end&&e.pos>=0&&e.kind!==1}function Cl(e){return!Vi(e)}function Ck(e,t){return Lo(e)?t===e.expression:eu(e)?t===e.modifiers:Zl(e)?t===e.initializer:Ia(e)?t===e.questionToken&&aT(e):fs(e)?t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Xs(e.modifiers,t,Mf):_u(e)?t===e.equalsToken||t===e.modifiers||t===e.questionToken||t===e.exclamationToken||Xs(e.modifiers,t,Mf):f_(e)?t===e.exclamationToken:L_(e)?t===e.typeParameters||t===e.type||Xs(e.typeParameters,t,Lo):d_(e)?t===e.typeParameters||Xs(e.typeParameters,t,Lo):Zo(e)?t===e.typeParameters||t===e.type||Xs(e.typeParameters,t,Lo):Ib(e)?t===e.modifiers||Xs(e.modifiers,t,Mf):!1}function Xs(e,t,n){return!e||$t(t)||!n(t)?!1:rs(e,t)}function kT(e,t,n){if(t===void 0||t.length===0)return e;let a=0;for(;a[`${no(e,m.range.end).line}`,m])),a=new Map;return{getUnusedExpectations:_,markUsed:p};function _(){return Bd(n.entries()).filter(([m,y])=>y.type===0&&!a.get(m)).map(([m,y])=>y)}function p(m){return n.has(`${m}`)?(a.set(`${m}`,!0),!0):!1}}function $o(e,t,n){return Vi(e)?e.pos:$g(e)||e.kind===12?Mt((t||oi(e)).text,e.pos,!1,!0):n&&Hi(e)?$o(e.jsDoc[0],t):e.kind===358&&e._children.length>0?$o(e._children[0],t,n):Mt((t||oi(e)).text,e.pos,!1,!1,KT(e))}function Ok(e,t){let n=!Vi(e)&&U_(e)?lg(e.modifiers,M_):void 0;return n?Mt((t||oi(e)).text,n.end):$o(e,t)}function Qo(e,t,n=!1){return n_(e.text,t,n)}function Mk(e){return!!or(e,h8)}function NT(e){return!!(F_(e)&&e.exportClause&&Lm(e.exportClause)&&e.exportClause.name.escapedText==="default")}function n_(e,t,n=!1){if(Vi(t))return"";let a=e.substring(n?t.pos:Mt(e,t.pos),t.end);return Mk(t)&&(a=a.split(/\r\n|\n|\r/).map(_=>_.replace(/^\s*\*/,"").trimStart()).join(` +`)),a}function cm(e,t=!1){return Qo(oi(e),e,t)}function Lk(e){return e.pos}function Jk(e,t){return Jl(e,t,Lk,Mn)}function ai(e){let t=e.emitNode;return t&&t.flags||0}function Rk(e){let t=e.emitNode;return t&&t.internalFlags||0}function jk(e,t,n){if(t&&Fk(e,n))return Qo(t,e);switch(e.kind){case 11:{let a=n&2?R3:n&1||ai(e)&16777216?Sd:xd;return e.singleQuote?"'"+a(e.text,39)+"'":'"'+a(e.text,34)+'"'}case 15:case 16:case 17:case 18:{let a=n&1||ai(e)&16777216?Sd:xd,_=e.rawText??SI(a(e.text,96));switch(e.kind){case 15:return"`"+_+"`";case 16:return"`"+_+"${";case 17:return"}"+_+"${";case 18:return"}"+_+"`"}break}case 9:case 10:return e.text;case 14:return n&4&&e.isUnterminated?e.text+(e.text.charCodeAt(e.text.length-1)===92?" /":"/"):e.text}return I.fail(`Literal kind '${e.kind}' not accounted for.`)}function Fk(e,t){if(ya(e)||!e.parent||t&4&&e.isUnterminated)return!1;if(lo(e)){if(e.numericLiteralFlags&26656)return!1;if(e.numericLiteralFlags&512)return!!(t&8)}return!db(e)}function Bk(e){return g_(e)?'"'+xd(e)+'"':""+e}function Uk(e){return os(e).replace(/^(\d)/,"_$1").replace(/\W/g,"_")}function qk(e){return(x_(e)&7)!==0||OT(e)}function OT(e){let t=gm(e);return t.kind===260&&t.parent.kind===299}function lm(e){return Zi(e)&&(e.name.kind===11||um(e))}function zk(e){return Zi(e)&&e.name.kind===11}function Wk(e){return Zi(e)&&Tr(e.name)}function MT(e){return Zi(e)||Ae(e)}function Vk(e){return Hk(e.valueDeclaration)}function Hk(e){return!!e&&e.kind===267&&!e.body}function Gk(e){return e.kind===312||e.kind===267||im(e)}function um(e){return!!(e.flags&2048)}function Zg(e){return lm(e)&<(e)}function LT(e){switch(e.parent.kind){case 312:return ns(e.parent);case 268:return lm(e.parent.parent)&&ci(e.parent.parent.parent)&&!ns(e.parent.parent.parent)}return!1}function JT(e){var t;return(t=e.declarations)==null?void 0:t.find(n=>!Zg(n)&&!(Zi(n)&&um(n)))}function Xk(e){return e===1||e===100||e===199}function e2(e,t){return ns(e)||Xk(_i(t))&&!!e.commonJsModuleIndicator}function $k(e,t){switch(e.scriptKind){case 1:case 3:case 2:case 4:break;default:return!1}return e.isDeclarationFile?!1:Y2(t,"alwaysStrict")||k8(e.statements)?!0:ns(e)||G2(t)?_i(t)>=5?!0:!t.noImplicitUseStrict:!1}function Qk(e){return!!(e.flags&33554432)||Cn(e,128)}function RT(e,t){switch(e.kind){case 312:case 269:case 299:case 267:case 248:case 249:case 250:case 176:case 174:case 177:case 178:case 262:case 218:case 219:case 172:case 175:return!0;case 241:return!im(t)}return!1}function Yk(e){switch(I.type(e),e.kind){case 345:case 353:case 330:return!0;default:return jT(e)}}function jT(e){switch(I.type(e),e.kind){case 179:case 180:case 173:case 181:case 184:case 185:case 324:case 263:case 231:case 264:case 265:case 352:case 262:case 174:case 176:case 177:case 178:case 218:case 219:return!0;default:return!1}}function t2(e){switch(e.kind){case 272:case 271:return!0;default:return!1}}function Kk(e){return t2(e)||dm(e)}function Zk(e){switch(e.kind){case 272:case 271:case 243:case 263:case 262:case 267:case 265:case 264:case 266:return!0;default:return!1}}function eD(e){return pm(e)||Zi(e)||nu(e)||s2(e)}function pm(e){return t2(e)||F_(e)}function tD(e){return or(e.parent,t=>!!(getContainerFlags(t)&1))}function A0(e){return or(e.parent,t=>RT(t,t.parent))}function nD(e,t){let n=A0(e);for(;n;)t(n),n=A0(n)}function FT(e){return!e||_m(e)===0?"(Missing)":cm(e)}function rD(e){return e.declaration?FT(e.declaration.parameters[0].name):void 0}function iD(e){return e.kind===167&&!Yi(e.expression)}function n2(e){var t;switch(e.kind){case 80:case 81:return(t=e.emitNode)!=null&&t.autoGenerate?void 0:e.escapedText;case 11:case 9:case 15:return qr(e.text);case 167:return Yi(e.expression)?qr(e.expression.text):void 0;case 295:return Yl(e);default:return I.assertNever(e)}}function aD(e){return I.checkDefined(n2(e))}function Ci(e){switch(e.kind){case 110:return"this";case 81:case 80:return _m(e)===0?Lt(e):cm(e);case 166:return Ci(e.left)+"."+Ci(e.right);case 211:return Ae(e.name)||Vn(e.name)?Ci(e.expression)+"."+Ci(e.name):I.assertNever(e.name);case 318:return Ci(e.left)+Ci(e.right);case 295:return Ci(e.namespace)+":"+Ci(e.name);default:return I.assertNever(e)}}function oD(e,t,...n){let a=oi(e);return BT(a,e,t,...n)}function sD(e,t,n,...a){let _=Mt(e.text,t.pos);return V2(e,_,t.end-_,n,...a)}function BT(e,t,n,...a){let _=a2(e,t);return V2(e,_.start,_.length,n,...a)}function _D(e,t,n,a){let _=a2(e,t);return i2(e,_.start,_.length,n,a)}function cD(e,t,n,a){let _=Mt(e.text,t.pos);return i2(e,_,t.end-_,n,a)}function r2(e,t,n){I.assertGreaterThanOrEqual(t,0),I.assertGreaterThanOrEqual(n,0),I.assertLessThanOrEqual(t,e.length),I.assertLessThanOrEqual(t+n,e.length)}function i2(e,t,n,a,_){return r2(e.text,t,n),{file:e,start:t,length:n,code:a.code,category:a.category,messageText:a.next?a:a.messageText,relatedInformation:_}}function lD(e,t,n){return{file:e,start:0,length:0,code:t.code,category:t.category,messageText:t.next?t:t.messageText,relatedInformation:n}}function uD(e){return typeof e.messageText=="string"?{code:e.code,category:e.category,messageText:e.messageText,next:e.next}:e.messageText}function pD(e,t,n){return{file:e,start:t.pos,length:t.end-t.pos,code:n.code,category:n.category,messageText:n.message}}function Ks(e,t){let n=ss(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);n.scan();let a=n.getTokenStart();return Xi(a,n.getTokenEnd())}function fD(e,t){let n=ss(e.languageVersion,!0,e.languageVariant,e.text,void 0,t);return n.scan(),n.getToken()}function dD(e,t){let n=Mt(e.text,t.pos);if(t.body&&t.body.kind===241){let{line:a}=no(e,t.body.pos),{line:_}=no(e,t.body.end);if(a<_)return S_(n,CT(a,e)-n+1)}return Xi(n,t.end)}function a2(e,t){let n=t;switch(t.kind){case 312:{let p=Mt(e.text,0,!1);return p===e.text.length?S_(0,0):Ks(e,p)}case 260:case 208:case 263:case 231:case 264:case 267:case 266:case 306:case 262:case 218:case 174:case 177:case 178:case 265:case 172:case 171:case 274:n=t.name;break;case 219:return dD(e,t);case 296:case 297:{let p=Mt(e.text,t.pos),m=t.statements.length>0?t.statements[0].pos:t.end;return Xi(p,m)}case 253:case 229:{let p=Mt(e.text,t.pos);return Ks(e,p)}case 238:{let p=Mt(e.text,t.expression.end);return Ks(e,p)}case 357:{let p=Mt(e.text,t.tagName.pos);return Ks(e,p)}}if(n===void 0)return Ks(e,t.pos);I.assert(!ds(n));let a=Vi(n),_=a||Pd(t)?n.pos:Mt(e.text,n.pos);return a?(I.assert(_===n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),I.assert(_===n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")):(I.assert(_>=n.pos,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"),I.assert(_<=n.end,"This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809")),Xi(_,n.end)}function mD(e){return(e.externalModuleIndicator||e.commonJsModuleIndicator)!==void 0}function o2(e){return e.scriptKind===6}function hD(e){return!!(Yd(e)&4096)}function yD(e){return!!(Yd(e)&8&&!T4(e,e.parent))}function gD(e){return(x_(e)&7)===6}function bD(e){return(x_(e)&7)===4}function UT(e){return(x_(e)&7)===2}function vD(e){return(x_(e)&7)===1}function TD(e){return e.kind===213&&e.expression.kind===108}function s2(e){return e.kind===213&&e.expression.kind===102}function k0(e){return Ab(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}function _2(e){return nu(e)&&xb(e.argument)&&Tr(e.argument.literal)}function Sa(e){return e.kind===244&&e.expression.kind===11}function fm(e){return!!(ai(e)&2097152)}function D0(e){return fm(e)&&us(e)}function SD(e){return Ae(e.name)&&!e.initializer}function P0(e){return fm(e)&&ls(e)&&so(e.declarationList.declarations,SD)}function xD(e,t){return e.kind!==12?Ho(t.text,e.pos):void 0}function qT(e,t){let n=e.kind===169||e.kind===168||e.kind===218||e.kind===219||e.kind===217||e.kind===260||e.kind===281?h_(n4(t,e.pos),Ho(t,e.pos)):Ho(t,e.pos);return rr(n,a=>t.charCodeAt(a.pos+1)===42&&t.charCodeAt(a.pos+2)===42&&t.charCodeAt(a.pos+3)!==47)}function c2(e){if(182<=e.kind&&e.kind<=205)return!0;switch(e.kind){case 133:case 159:case 150:case 163:case 154:case 136:case 155:case 151:case 157:case 106:case 146:return!0;case 116:return e.parent.kind!==222;case 233:return Ml(e.parent)&&!F0(e);case 168:return e.parent.kind===200||e.parent.kind===195;case 80:(e.parent.kind===166&&e.parent.right===e||e.parent.kind===211&&e.parent.name===e)&&(e=e.parent),I.assert(e.kind===80||e.kind===166||e.kind===211,"'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");case 166:case 211:case 110:{let{parent:t}=e;if(t.kind===186)return!1;if(t.kind===205)return!t.isTypeOf;if(182<=t.kind&&t.kind<=205)return!0;switch(t.kind){case 233:return Ml(t.parent)&&!F0(t);case 168:return e===t.constraint;case 352:return e===t.constraint;case 172:case 171:case 169:case 260:return e===t.type;case 262:case 218:case 219:case 176:case 174:case 173:case 177:case 178:return e===t.type;case 179:case 180:case 181:return e===t.type;case 216:return e===t.type;case 213:case 214:case 215:return rs(t.typeArguments,e)}}}return!1}function wD(e,t){for(;e;){if(e.kind===t)return!0;e=e.parent}return!1}function ED(e,t){return n(e);function n(a){switch(a.kind){case 253:return t(a);case 269:case 241:case 245:case 246:case 247:case 248:case 249:case 250:case 254:case 255:case 296:case 297:case 256:case 258:case 299:return Wt(a,n)}}}function CD(e,t){return n(e);function n(a){switch(a.kind){case 229:t(a);let _=a.expression;_&&n(_);return;case 266:case 264:case 267:case 265:return;default:if($i(a)){if(a.name&&a.name.kind===167){n(a.name.expression);return}}else c2(a)||Wt(a,n)}}}function AD(e){return e&&e.kind===188?e.elementType:e&&e.kind===183?jd(e.typeArguments):void 0}function kD(e){switch(e.kind){case 264:case 263:case 231:case 187:return e.members;case 210:return e.properties}}function l2(e){if(e)switch(e.kind){case 208:case 306:case 169:case 303:case 172:case 171:case 304:case 260:return!0}return!1}function DD(e){return l2(e)||am(e)}function zT(e){return e.parent.kind===261&&e.parent.parent.kind===243}function PD(e){return Vt(e)?uo(e.parent)&&At(e.parent.parent)&&Oa(e.parent.parent)===2||u2(e.parent):!1}function u2(e){return Vt(e)?At(e)&&Oa(e)===1:!1}function ID(e){return(Li(e)?UT(e)&&Ae(e.name)&&zT(e):Ia(e)?j0(e)&&Sm(e):Zl(e)&&j0(e))||u2(e)}function ND(e){switch(e.kind){case 174:case 173:case 176:case 177:case 178:case 262:case 218:return!0}return!1}function OD(e,t){for(;;){if(t&&t(e),e.statement.kind!==256)return e.statement;e=e.statement}}function WT(e){return e&&e.kind===241&&$i(e.parent)}function MD(e){return e&&e.kind===174&&e.parent.kind===210}function LD(e){return(e.kind===174||e.kind===177||e.kind===178)&&(e.parent.kind===210||e.parent.kind===231)}function JD(e){return e&&e.kind===1}function RD(e){return e&&e.kind===0}function p2(e,t,n,a){return wn(e==null?void 0:e.properties,_=>{if(!fs(_))return;let p=n2(_.name);return t===p||a&&a===p?n(_):void 0})}function jD(e,t,n){return p2(e,t,a=>iu(a.initializer)?ir(a.initializer.elements,_=>Tr(_)&&_.text===n):void 0)}function VT(e){if(e&&e.statements.length){let t=e.statements[0].expression;return Ur(t,uo)}}function FD(e,t,n){return HT(e,t,a=>iu(a.initializer)?ir(a.initializer.elements,_=>Tr(_)&&_.text===n):void 0)}function HT(e,t,n){return p2(VT(e),t,n)}function BD(e){return or(e.parent,$i)}function UD(e){return or(e.parent,rT)}function I0(e){return or(e.parent,ar)}function qD(e){return or(e.parent,t=>ar(t)||$i(t)?"quit":eu(t))}function zD(e){return or(e.parent,im)}function WD(e){let t=or(e.parent,n=>ar(n)?"quit":M_(n));return t&&ar(t.parent)?I0(t.parent):I0(t??e)}function f2(e,t,n){for(I.assert(e.kind!==312);;){if(e=e.parent,!e)return I.fail();switch(e.kind){case 167:if(n&&ar(e.parent.parent))return e;e=e.parent.parent;break;case 170:e.parent.kind===169&&io(e.parent.parent)?e=e.parent.parent:io(e.parent)&&(e=e.parent);break;case 219:if(!t)continue;case 262:case 218:case 267:case 175:case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 179:case 180:case 181:case 266:case 312:return e}}}function VD(e){switch(e.kind){case 219:case 262:case 218:case 172:return!0;case 241:switch(e.parent.kind){case 176:case 174:case 177:case 178:return!0;default:return!1}default:return!1}}function HD(e){Ae(e)&&(es(e.parent)||us(e.parent))&&e.parent.name===e&&(e=e.parent);let t=f2(e,!0,!1);return ci(t)}function GD(e){let t=f2(e,!1,!1);if(t)switch(t.kind){case 176:case 262:case 218:return t}}function XD(e,t){for(;;){if(e=e.parent,!e)return;switch(e.kind){case 167:e=e.parent;break;case 262:case 218:case 219:if(!t)continue;case 172:case 171:case 174:case 173:case 176:case 177:case 178:case 175:return e;case 170:e.parent.kind===169&&io(e.parent.parent)?e=e.parent.parent:io(e.parent)&&(e=e.parent);break}}}function $D(e){if(e.kind===218||e.kind===219){let t=e,n=e.parent;for(;n.kind===217;)t=n,n=n.parent;if(n.kind===213&&n.expression===t)return n}}function QD(e){return e.kind===108||bd(e)}function bd(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===108}function YD(e){let t=e.kind;return(t===211||t===212)&&e.expression.kind===110}function KD(e){var t;return!!e&&Li(e)&&((t=e.initializer)==null?void 0:t.kind)===110}function ZD(e){return!!e&&(_u(e)||fs(e))&&At(e.parent.parent)&&e.parent.parent.operatorToken.kind===64&&e.parent.parent.right.kind===110}function eP(e){switch(e.kind){case 183:return e.typeName;case 233:return co(e.expression)?e.expression:void 0;case 80:case 166:return e}}function tP(e){switch(e.kind){case 215:return e.tag;case 286:case 285:return e.tagName;case 226:return e.right;default:return e.expression}}function GT(e,t,n,a){if(e&&Kd(t)&&Vn(t.name))return!1;switch(t.kind){case 263:return!0;case 231:return!e;case 172:return n!==void 0&&(e?es(n):ar(n)&&!K3(t)&&!Z3(t));case 177:case 178:case 174:return t.body!==void 0&&n!==void 0&&(e?es(n):ar(n));case 169:return e?n!==void 0&&n.body!==void 0&&(n.kind===176||n.kind===174||n.kind===178)&&H3(n)!==t&&a!==void 0&&a.kind===263:!1}return!1}function l_(e,t,n,a){return kl(t)&>(e,t,n,a)}function N0(e,t,n,a){return l_(e,t,n,a)||d2(e,t,n)}function d2(e,t,n){switch(t.kind){case 263:return Ze(t.members,a=>N0(e,a,t,n));case 231:return!e&&Ze(t.members,a=>N0(e,a,t,n));case 174:case 178:case 176:return Ze(t.parameters,a=>l_(e,a,t,n));default:return!1}}function nP(e,t){if(l_(e,t))return!0;let n=V3(t);return!!n&&d2(e,n,t)}function rP(e,t,n){let a;if(am(t)){let{firstAccessor:_,secondAccessor:p,setAccessor:m}=J2(n.members,t),y=kl(_)?_:p&&kl(p)?p:void 0;if(!y||t!==y)return!1;a=m==null?void 0:m.parameters}else f_(t)&&(a=t.parameters);if(l_(e,t,n))return!0;if(a){for(let _ of a)if(!$l(_)&&l_(e,_,t,n))return!0}return!1}function XT(e){if(e.textSourceNode){switch(e.textSourceNode.kind){case 11:return XT(e.textSourceNode);case 15:return e.text===""}return!1}return e.text===""}function Lf(e){let{parent:t}=e;return t.kind===286||t.kind===285||t.kind===287?t.tagName===e:!1}function m2(e){switch(e.kind){case 108:case 106:case 112:case 97:case 14:case 209:case 210:case 211:case 212:case 213:case 214:case 215:case 234:case 216:case 238:case 235:case 217:case 218:case 231:case 219:case 222:case 220:case 221:case 224:case 225:case 226:case 227:case 230:case 228:case 232:case 284:case 285:case 288:case 229:case 223:case 236:return!0;case 233:return!Ml(e.parent)&&!jm(e.parent);case 166:for(;e.parent.kind===166;)e=e.parent;return e.parent.kind===186||dl(e.parent)||Wf(e.parent)||r_(e.parent)||Lf(e);case 318:for(;r_(e.parent);)e=e.parent;return e.parent.kind===186||dl(e.parent)||Wf(e.parent)||r_(e.parent)||Lf(e);case 81:return At(e.parent)&&e.parent.left===e&&e.parent.operatorToken.kind===103;case 80:if(e.parent.kind===186||dl(e.parent)||Wf(e.parent)||r_(e.parent)||Lf(e))return!0;case 9:case 10:case 11:case 15:case 110:return $T(e);default:return!1}}function $T(e){let{parent:t}=e;switch(t.kind){case 260:case 169:case 172:case 171:case 306:case 303:case 208:return t.initializer===e;case 244:case 245:case 246:case 247:case 253:case 254:case 255:case 296:case 257:return t.expression===e;case 248:let n=t;return n.initializer===e&&n.initializer.kind!==261||n.condition===e||n.incrementor===e;case 249:case 250:let a=t;return a.initializer===e&&a.initializer.kind!==261||a.expression===e;case 216:case 234:return e===t.expression;case 239:return e===t.expression;case 167:return e===t.expression;case 170:case 294:case 293:case 305:return!0;case 233:return t.expression===e&&!c2(t);case 304:return t.objectAssignmentInitializer===e;case 238:return e===t.expression;default:return m2(t)}}function QT(e){for(;e.kind===166||e.kind===80;)e=e.parent;return e.kind===186}function iP(e){return Lm(e)&&!!e.parent.moduleSpecifier}function YT(e){return e.kind===271&&e.moduleReference.kind===283}function aP(e){return I.assert(YT(e)),e.moduleReference.expression}function oP(e){return dm(e)&&W2(e.initializer).arguments[0]}function sP(e){return e.kind===271&&e.moduleReference.kind!==283}function h2(e){return Vt(e)}function _P(e){return!Vt(e)}function Vt(e){return!!e&&!!(e.flags&524288)}function cP(e){return!!e&&!!(e.flags&134217728)}function lP(e){return!o2(e)}function KT(e){return!!e&&!!(e.flags&16777216)}function uP(e){return J_(e)&&Ae(e.typeName)&&e.typeName.escapedText==="Object"&&e.typeArguments&&e.typeArguments.length===2&&(e.typeArguments[0].kind===154||e.typeArguments[0].kind===150)}function Hl(e,t){if(e.kind!==213)return!1;let{expression:n,arguments:a}=e;if(n.kind!==80||n.escapedText!=="require"||a.length!==1)return!1;let _=a[0];return!t||ni(_)}function ZT(e){return e3(e,!1)}function dm(e){return e3(e,!0)}function pP(e){return ru(e)&&dm(e.parent.parent)}function e3(e,t){return Li(e)&&!!e.initializer&&Hl(t?W2(e.initializer):e.initializer,!0)}function t3(e){return ls(e)&&e.declarationList.declarations.length>0&&so(e.declarationList.declarations,t=>ZT(t))}function fP(e){return e===39||e===34}function dP(e,t){return Qo(t,e).charCodeAt(0)===34}function O0(e){return At(e)||Ko(e)||Ae(e)||R_(e)}function n3(e){return Vt(e)&&e.initializer&&At(e.initializer)&&(e.initializer.operatorToken.kind===57||e.initializer.operatorToken.kind===61)&&e.name&&co(e.name)&&u_(e.name,e.initializer.left)?e.initializer.right:e.initializer}function mP(e){let t=n3(e);return t&&E_(t,k_(e.name))}function hP(e,t){return wn(e.properties,n=>fs(n)&&Ae(n.name)&&n.name.escapedText==="value"&&n.initializer&&E_(n.initializer,t))}function yP(e){if(e&&e.parent&&At(e.parent)&&e.parent.operatorToken.kind===64){let t=k_(e.parent.left);return E_(e.parent.right,t)||gP(e.parent.left,e.parent.right,t)}if(e&&R_(e)&&b2(e)){let t=hP(e.arguments[2],e.arguments[1].text==="prototype");if(t)return t}}function E_(e,t){if(R_(e)){let n=C_(e.expression);return n.kind===218||n.kind===219?e:void 0}if(e.kind===218||e.kind===231||e.kind===219||uo(e)&&(e.properties.length===0||t))return e}function gP(e,t,n){let a=At(t)&&(t.operatorToken.kind===57||t.operatorToken.kind===61)&&E_(t.right,n);if(a&&u_(e,t.left))return a}function bP(e){let t=Li(e.parent)?e.parent.name:At(e.parent)&&e.parent.operatorToken.kind===64?e.parent.left:void 0;return t&&E_(e.right,k_(t))&&co(t)&&u_(t,e.left)}function vP(e){if(At(e.parent)){let t=(e.parent.operatorToken.kind===57||e.parent.operatorToken.kind===61)&&At(e.parent.parent)?e.parent.parent:e.parent;if(t.operatorToken.kind===64&&Ae(t.left))return t.left}else if(Li(e.parent))return e.parent.name}function u_(e,t){return L0(e)&&L0(t)?Td(e)===Td(t):ro(e)&&Jf(t)&&(t.expression.kind===110||Ae(t.expression)&&(t.expression.escapedText==="window"||t.expression.escapedText==="self"||t.expression.escapedText==="global"))?u_(e,a3(t)):Jf(e)&&Jf(t)?ao(e)===ao(t)&&u_(e.expression,t.expression):!1}function y2(e){for(;si(e,!0);)e=e.right;return e}function r3(e){return Ae(e)&&e.escapedText==="exports"}function i3(e){return Ae(e)&&e.escapedText==="module"}function g2(e){return(Ln(e)||Gl(e))&&i3(e.expression)&&ao(e)==="exports"}function Oa(e){let t=TP(e);return t===5||Vt(e)?t:0}function b2(e){return eo(e.arguments)===3&&Ln(e.expression)&&Ae(e.expression.expression)&&Lt(e.expression.expression)==="Object"&&Lt(e.expression.name)==="defineProperty"&&Yi(e.arguments[1])&&Yo(e.arguments[0],!0)}function Jf(e){return Ln(e)||Gl(e)}function Gl(e){return Ki(e)&&Yi(e.argumentExpression)}function _s(e,t){return Ln(e)&&(!t&&e.expression.kind===110||Ae(e.name)&&Yo(e.expression,!0))||v2(e,t)}function v2(e,t){return Gl(e)&&(!t&&e.expression.kind===110||co(e.expression)||_s(e.expression,!0))}function Yo(e,t){return co(e)||_s(e,t)}function a3(e){return Ln(e)?e.name:e.argumentExpression}function TP(e){if(R_(e)){if(!b2(e))return 0;let t=e.arguments[0];return r3(t)||g2(t)?8:_s(t)&&ao(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!Ko(e.left)||SP(y2(e))?0:Yo(e.left.expression,!0)&&ao(e.left)==="prototype"&&uo(s3(e))?6:o3(e.left)}function SP(e){return wb(e)&&lo(e.expression)&&e.expression.text==="0"}function mm(e){if(Ln(e))return e.name;let t=C_(e.argumentExpression);return lo(t)||ni(t)?t:e}function ao(e){let t=mm(e);if(t){if(Ae(t))return t.escapedText;if(ni(t)||lo(t))return qr(t.text)}}function o3(e){if(e.expression.kind===110)return 4;if(g2(e))return 2;if(Yo(e.expression,!0)){if(k_(e.expression))return 3;let t=e;for(;!Ae(t.expression);)t=t.expression;let n=t.expression;if((n.escapedText==="exports"||n.escapedText==="module"&&ao(t)==="exports")&&_s(e))return 1;if(Yo(e,!0)||Ki(e)&&P2(e))return 5}return 0}function s3(e){for(;At(e.right);)e=e.right;return e.right}function xP(e){return At(e)&&Oa(e)===3}function wP(e){return Vt(e)&&e.parent&&e.parent.kind===244&&(!Ki(e)||Gl(e))&&!!tm(e.parent)}function EP(e,t){let{valueDeclaration:n}=e;(!n||!(t.flags&33554432&&!Vt(t)&&!(n.flags&33554432))&&O0(n)&&!O0(t)||n.kind!==t.kind&&MT(n))&&(e.valueDeclaration=t)}function CP(e){if(!e||!e.valueDeclaration)return!1;let t=e.valueDeclaration;return t.kind===262||Li(t)&&t.initializer&&$i(t.initializer)}function AP(e){var t,n;switch(e.kind){case 260:case 208:return(t=or(e.initializer,a=>Hl(a,!0)))==null?void 0:t.arguments[0];case 272:case 278:return Ur(e.moduleSpecifier,ni);case 271:return Ur((n=Ur(e.moduleReference,Jm))==null?void 0:n.expression,ni);case 273:case 280:return Ur(e.parent.moduleSpecifier,ni);case 274:case 281:return Ur(e.parent.parent.moduleSpecifier,ni);case 276:return Ur(e.parent.parent.parent.moduleSpecifier,ni);case 205:return _2(e)?e.argument.literal:void 0;default:I.assertNever(e)}}function kP(e){return _3(e)||I.failBadSyntaxKind(e.parent)}function _3(e){switch(e.parent.kind){case 272:case 278:return e.parent;case 283:return e.parent.parent;case 213:return s2(e.parent)||Hl(e.parent,!1)?e.parent:void 0;case 201:return I.assert(Tr(e)),Ur(e.parent.parent,nu);default:return}}function T2(e){switch(e.kind){case 272:case 278:return e.moduleSpecifier;case 271:return e.moduleReference.kind===283?e.moduleReference.expression:void 0;case 205:return _2(e)?e.argument.literal:void 0;case 213:return e.arguments[0];case 267:return e.name.kind===11?e.name:void 0;default:return I.assertNever(e)}}function c3(e){switch(e.kind){case 272:return e.importClause&&Ur(e.importClause.namedBindings,Mb);case 271:return e;case 278:return e.exportClause&&Ur(e.exportClause,Lm);default:return I.assertNever(e)}}function l3(e){return e.kind===272&&!!e.importClause&&!!e.importClause.name}function DP(e,t){if(e.name){let n=t(e);if(n)return n}if(e.namedBindings){let n=Mb(e.namedBindings)?t(e.namedBindings):wn(e.namedBindings.elements,t);if(n)return n}}function PP(e){if(e)switch(e.kind){case 169:case 174:case 173:case 304:case 303:case 172:case 171:return e.questionToken!==void 0}return!1}function IP(e){let t=Rm(e)?y_(e.parameters):void 0,n=Ur(t&&t.name,Ae);return!!n&&n.escapedText==="new"}function Xl(e){return e.kind===353||e.kind===345||e.kind===347}function NP(e){return Xl(e)||Db(e)}function OP(e){return ou(e)&&At(e.expression)&&e.expression.operatorToken.kind===64?y2(e.expression):void 0}function u3(e){return ou(e)&&At(e.expression)&&Oa(e.expression)!==0&&At(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function S2(e){switch(e.kind){case 243:let t=Al(e);return t&&t.initializer;case 172:return e.initializer;case 303:return e.initializer}}function Al(e){return ls(e)?y_(e.declarationList.declarations):void 0}function p3(e){return Zi(e)&&e.body&&e.body.kind===267?e.body:void 0}function MP(e){if(e.kind>=243&&e.kind<=259)return!0;switch(e.kind){case 80:case 110:case 108:case 166:case 236:case 212:case 211:case 208:case 218:case 219:case 174:case 177:case 178:return!0;default:return!1}}function hm(e){switch(e.kind){case 219:case 226:case 241:case 252:case 179:case 296:case 263:case 231:case 175:case 176:case 185:case 180:case 251:case 259:case 246:case 212:case 242:case 1:case 266:case 306:case 277:case 278:case 281:case 244:case 249:case 250:case 248:case 262:case 218:case 184:case 177:case 80:case 245:case 272:case 271:case 181:case 264:case 324:case 330:case 256:case 174:case 173:case 267:case 202:case 270:case 210:case 169:case 217:case 211:case 303:case 172:case 171:case 253:case 240:case 178:case 304:case 305:case 255:case 257:case 258:case 265:case 168:case 260:case 243:case 247:case 254:return!0;default:return!1}}function f3(e,t){let n;l2(e)&&ST(e)&&Hi(e.initializer)&&(n=zn(n,N6(e,Ea(e.initializer.jsDoc))));let a=e;for(;a&&a.parent;){if(Hi(a)&&(n=zn(n,N6(e,Ea(a.jsDoc)))),a.kind===169){n=zn(n,(t?I4:em)(a));break}if(a.kind===168){n=zn(n,(t?M4:O4)(a));break}a=d3(a)}return n||Je}function N6(e,t){if(ds(t)){let n=rr(t.tags,a=>O6(e,a));return t.tags===n?[t]:n}return O6(e,t)?[t]:void 0}function O6(e,t){return!(lu(t)||Hb(t))||!t.parent||!ds(t.parent)||!cs(t.parent.parent)||t.parent.parent===e}function d3(e){let t=e.parent;if(t.kind===303||t.kind===277||t.kind===172||t.kind===244&&e.kind===211||t.kind===253||p3(t)||si(e))return t;if(t.parent&&(Al(t.parent)===e||si(t)))return t.parent;if(t.parent&&t.parent.parent&&(Al(t.parent.parent)||S2(t.parent.parent)===e||u3(t.parent.parent)))return t.parent.parent}function LP(e){if(e.symbol)return e.symbol;if(!Ae(e.name))return;let t=e.name.escapedText,n=x2(e);if(!n)return;let a=ir(n.parameters,_=>_.name.kind===80&&_.name.escapedText===t);return a&&a.symbol}function JP(e){if(ds(e.parent)&&e.parent.tags){let t=ir(e.parent.tags,Xl);if(t)return t}return x2(e)}function x2(e){let t=w2(e);if(t)return Zl(t)&&t.type&&$i(t.type)?t.type:$i(t)?t:void 0}function w2(e){let t=m3(e);if(t)return u3(t)||OP(t)||S2(t)||Al(t)||p3(t)||t}function m3(e){let t=E2(e);if(!t)return;let n=t.parent;if(n&&n.jsDoc&&t===Pi(n.jsDoc))return n}function E2(e){return or(e.parent,ds)}function RP(e){let t=e.name.escapedText,{typeParameters:n}=e.parent.parent.parent;return n&&ir(n,a=>a.name.escapedText===t)}function jP(e){return!!e.typeArguments}function C2(e){let t=e.parent;for(;;){switch(t.kind){case 226:let n=t,a=n.operatorToken.kind;return A_(a)&&n.left===e?n:void 0;case 224:case 225:let _=t,p=_.operator;return p===46||p===47?_:void 0;case 249:case 250:let m=t;return m.initializer===e?m:void 0;case 217:case 209:case 230:case 235:e=t;break;case 305:e=t.parent;break;case 304:if(t.name!==e)return;e=t.parent;break;case 303:if(t.name===e)return;e=t.parent;break;default:return}t=e.parent}}function FP(e){let t=C2(e);if(!t)return 0;switch(t.kind){case 226:let n=t.operatorToken.kind;return n===64||wm(n)?1:2;case 224:case 225:return 2;case 249:case 250:return 1}}function BP(e){return!!C2(e)}function UP(e){let t=C_(e.right);return t.kind===226&&$b(t.operatorToken.kind)}function qP(e){let t=C2(e);return!!t&&si(t,!0)&&UP(t)}function zP(e){switch(e.kind){case 241:case 243:case 254:case 245:case 255:case 269:case 296:case 297:case 256:case 248:case 249:case 250:case 246:case 247:case 258:case 299:return!0}return!1}function WP(e){return Im(e)||Nm(e)||zg(e)||us(e)||L_(e)}function h3(e,t){for(;e&&e.kind===t;)e=e.parent;return e}function VP(e){return h3(e,196)}function y3(e){return h3(e,217)}function HP(e){let t;for(;e&&e.kind===196;)t=e,e=e.parent;return[t,e]}function GP(e){for(;Tb(e);)e=e.type;return e}function C_(e,t){return ms(e,t?17:1)}function XP(e){return e.kind!==211&&e.kind!==212?!1:(e=y3(e.parent),e&&e.kind===220)}function $P(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1}function g3(e){return!ci(e)&&!om(e)&&Xo(e.parent)&&e.parent.name===e}function QP(e){let t=e.parent;switch(e.kind){case 11:case 15:case 9:if(oo(t))return t.parent;case 80:if(Xo(t))return t.name===e?t:void 0;if(O_(t)){let n=t.parent;return m_(n)&&n.name===t?n:void 0}else{let n=t.parent;return At(n)&&Oa(n)!==0&&(n.left.symbol||n.symbol)&&ql(n)===e?n:void 0}case 81:return Xo(t)&&t.name===e?t:void 0;default:return}}function b3(e){return Yi(e)&&e.parent.kind===167&&Xo(e.parent.parent)}function YP(e){let t=e.parent;switch(t.kind){case 172:case 171:case 174:case 173:case 177:case 178:case 306:case 303:case 211:return t.name===e;case 166:return t.right===e;case 208:case 276:return t.propertyName===e;case 281:case 291:case 285:case 286:case 287:return!0}return!1}function KP(e){return e.kind===271||e.kind===270||e.kind===273&&e.name||e.kind===274||e.kind===280||e.kind===276||e.kind===281||e.kind===277&&M0(e)?!0:Vt(e)&&(At(e)&&Oa(e)===2&&M0(e)||Ln(e)&&At(e.parent)&&e.parent.left===e&&e.parent.operatorToken.kind===64&&A2(e.parent.right))}function v3(e){switch(e.parent.kind){case 273:case 276:case 274:case 281:case 277:case 271:case 280:return e.parent;case 166:do e=e.parent;while(e.parent.kind===166);return v3(e)}}function A2(e){return co(e)||Ol(e)}function M0(e){let t=T3(e);return A2(t)}function T3(e){return ps(e)?e.expression:e.right}function ZP(e){return e.kind===304?e.name:e.kind===303?e.initializer:e.parent.right}function S3(e){let t=x3(e);if(t&&Vt(e)){let n=L4(e);if(n)return n.class}return t}function x3(e){let t=ym(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function w3(e){if(Vt(e))return J4(e).map(t=>t.class);{let t=ym(e.heritageClauses,119);return t==null?void 0:t.types}}function E3(e){return su(e)?C3(e)||Je:ar(e)&&h_(Yf(S3(e)),w3(e))||Je}function C3(e){let t=ym(e.heritageClauses,96);return t?t.types:void 0}function ym(e,t){if(e){for(let n of e)if(n.token===t)return n}}function eI(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}}function ki(e){return 83<=e&&e<=165}function A3(e){return 19<=e&&e<=79}function Rf(e){return ki(e)||A3(e)}function k2(e){return 128<=e&&e<=165}function k3(e){return ki(e)&&!k2(e)}function tI(e){return 119<=e&&e<=127}function nI(e){let t=Fl(e);return t!==void 0&&k3(t)}function rI(e){let t=Fl(e);return t!==void 0&&ki(t)}function iI(e){let t=E4(e);return!!t&&!k2(t)}function aI(e){return 2<=e&&e<=7}function oI(e){if(!e)return 4;let t=0;switch(e.kind){case 262:case 218:case 174:e.asteriskToken&&(t|=1);case 219:Cn(e,1024)&&(t|=2);break}return e.body||(t|=4),t}function sI(e){switch(e.kind){case 262:case 218:case 219:case 174:return e.body!==void 0&&e.asteriskToken===void 0&&Cn(e,1024)}return!1}function Yi(e){return ni(e)||lo(e)}function D2(e){return Om(e)&&(e.operator===40||e.operator===41)&&lo(e.operand)}function D3(e){let t=ql(e);return!!t&&P2(t)}function P2(e){if(!(e.kind===167||e.kind===212))return!1;let t=Ki(e)?C_(e.argumentExpression):e.expression;return!Yi(t)&&!D2(t)}function vd(e){switch(e.kind){case 80:case 81:return e.escapedText;case 11:case 15:case 9:return qr(e.text);case 167:let t=e.expression;return Yi(t)?qr(t.text):D2(t)?t.operator===41?en(t.operator)+t.operand.text:t.operand.text:void 0;case 295:return Yl(e);default:return I.assertNever(e)}}function L0(e){switch(e.kind){case 80:case 11:case 15:case 9:return!0;default:return!1}}function Td(e){return ro(e)?Lt(e):B_(e)?Kl(e):e.text}function P3(e){return ro(e)?e.escapedText:B_(e)?Yl(e):qr(e.text)}function _I(e){return`__@${getSymbolId(e)}@${e.escapedName}`}function cI(e,t){return`__#${getSymbolId(e)}@${t}`}function lI(e){return Hn(e.escapedName,"__@")}function uI(e){return Hn(e.escapedName,"__#")}function pI(e){return e.kind===80&&e.escapedText==="Symbol"}function I3(e){return Ae(e)?Lt(e)==="__proto__":Tr(e)&&e.text==="__proto__"}function Zs(e,t){switch(e=ms(e),e.kind){case 231:if(classHasDeclaredOrExplicitlyAssignedName(e))return!1;break;case 218:if(e.name)return!1;break;case 219:break;default:return!1}return typeof t=="function"?t(e):!0}function N3(e){switch(e.kind){case 303:return!I3(e.name);case 304:return!!e.objectAssignmentInitializer;case 260:return Ae(e.name)&&!!e.initializer;case 169:return Ae(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 208:return Ae(e.name)&&!!e.initializer&&!e.dotDotDotToken;case 172:return!!e.initializer;case 226:switch(e.operatorToken.kind){case 64:case 77:case 76:case 78:return Ae(e.left)}break;case 277:return!0}return!1}function fI(e,t){if(!N3(e))return!1;switch(e.kind){case 303:return Zs(e.initializer,t);case 304:return Zs(e.objectAssignmentInitializer,t);case 260:case 169:case 208:case 172:return Zs(e.initializer,t);case 226:return Zs(e.right,t);case 277:return Zs(e.expression,t)}}function dI(e){return e.escapedText==="push"||e.escapedText==="unshift"}function mI(e){return gm(e).kind===169}function gm(e){for(;e.kind===208;)e=e.parent.parent;return e}function hI(e){let t=e.kind;return t===176||t===218||t===262||t===219||t===174||t===177||t===178||t===267||t===312}function ya(e){return Da(e.pos)||Da(e.end)}function yI(e){return Ul(e,ci)||e}function gI(e){let t=I2(e),n=e.kind===214&&e.arguments!==void 0;return O3(e.kind,t,n)}function O3(e,t,n){switch(e){case 214:return n?0:1;case 224:case 221:case 222:case 220:case 223:case 227:case 229:return 1;case 226:switch(t){case 43:case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 1}}return 0}function bI(e){let t=I2(e),n=e.kind===214&&e.arguments!==void 0;return M3(e.kind,t,n)}function I2(e){return e.kind===226?e.operatorToken.kind:e.kind===224||e.kind===225?e.operator:e.kind}function M3(e,t,n){switch(e){case 361:return 0;case 230:return 1;case 229:return 2;case 227:return 4;case 226:switch(t){case 28:return 0;case 64:case 65:case 66:case 68:case 67:case 69:case 70:case 71:case 72:case 73:case 74:case 79:case 75:case 76:case 77:case 78:return 3;default:return ml(t)}case 216:case 235:case 224:case 221:case 222:case 220:case 223:return 16;case 225:return 17;case 213:return 18;case 214:return n?19:18;case 215:case 211:case 212:case 236:return 19;case 234:case 238:return 11;case 110:case 108:case 80:case 81:case 106:case 112:case 97:case 9:case 10:case 11:case 209:case 210:case 218:case 219:case 231:case 14:case 15:case 228:case 217:case 232:case 284:case 285:case 288:return 20;default:return-1}}function ml(e){switch(e){case 61:return 4;case 57:return 5;case 56:return 6;case 52:return 7;case 53:return 8;case 51:return 9;case 35:case 36:case 37:case 38:return 10;case 30:case 32:case 33:case 34:case 104:case 103:case 130:case 152:return 11;case 48:case 49:case 50:return 12;case 40:case 41:return 13;case 42:case 44:case 45:return 14;case 43:return 15}return-1}function vI(e){return rr(e,t=>{switch(t.kind){case 294:return!!t.expression;case 12:return!t.containsOnlyTriviaWhiteSpaces;default:return!0}})}function TI(){let e=[],t=[],n=new Map,a=!1;return{add:p,lookup:_,getGlobalDiagnostics:m,getDiagnostics:y};function _(u){let x;if(u.file?x=n.get(u.file.fileName):x=e,!x)return;let d=Jl(x,u,bt,Ed);if(d>=0)return x[d]}function p(u){let x;u.file?(x=n.get(u.file.fileName),x||(x=[],n.set(u.file.fileName,x),vl(t,u.file.fileName,Ii))):(a&&(a=!1,e=e.slice()),x=e),vl(x,u,Ed)}function m(){return a=!0,e}function y(u){if(u)return n.get(u)||[];let x=mv(t,d=>n.get(d));return e.length&&x.unshift(...e),x}}function SI(e){return e.replace(hx,"\\${")}function Qh(e){return!!((e.templateFlags||0)&2048)}function L3(e){return e&&!!(Rx(e)?Qh(e):Qh(e.head)||Ze(e.templateSpans,t=>Qh(t.literal)))}function J3(e){return"\\u"+("0000"+e.toString(16).toUpperCase()).slice(-4)}function xI(e,t,n){if(e.charCodeAt(0)===0){let a=n.charCodeAt(t+e.length);return a>=48&&a<=57?"\\x00":"\\0"}return vx.get(e)||J3(e.charCodeAt(0))}function Sd(e,t){let n=t===96?bx:t===39?gx:yx;return e.replace(n,xI)}function xd(e,t){return e=Sd(e,t),$0.test(e)?e.replace($0,n=>J3(n.charCodeAt(0))):e}function wI(e){return"&#x"+e.toString(16).toUpperCase()+";"}function EI(e){return e.charCodeAt(0)===0?"�":xx.get(e)||wI(e.charCodeAt(0))}function R3(e,t){let n=t===39?Sx:Tx;return e.replace(n,EI)}function CI(e){let t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&AI(e.charCodeAt(0))?e.substring(1,t-1):e}function AI(e){return e===39||e===34||e===96}function j3(e){let t=e.charCodeAt(0);return t>=97&&t<=122||e.includes("-")}function N2(e){let t=Oo[1];for(let n=Oo.length;n<=e;n++)Oo.push(Oo[n-1]+t);return Oo[e]}function Fo(){return Oo[1].length}function kI(e){var t,n,a,_,p,m=!1;function y(Q){let se=Gd(Q);se.length>1?(_=_+se.length-1,p=t.length-Q.length+Ea(se),a=p-t.length===0):a=!1}function u(Q){Q&&Q.length&&(a&&(Q=N2(n)+Q,a=!1),t+=Q,y(Q))}function x(Q){Q&&(m=!1),u(Q)}function d(Q){Q&&(m=!0),u(Q)}function S(){t="",n=0,a=!0,_=0,p=0,m=!1}function T(Q){Q!==void 0&&(t+=Q,y(Q),m=!1)}function A(Q){Q&&Q.length&&x(Q)}function N(Q){(!a||Q)&&(t+=e,_++,p=t.length,a=!0,m=!1)}function q(){return a?t.length:t.length+e.length}return S(),{write:x,rawWrite:T,writeLiteral:A,writeLine:N,increaseIndent:()=>{n++},decreaseIndent:()=>{n--},getIndent:()=>n,getTextPos:()=>t.length,getLine:()=>_,getColumn:()=>a?n*Fo():t.length-p,getText:()=>t,isAtStartOfLine:()=>a,hasTrailingComment:()=>m,hasTrailingWhitespace:()=>!!t.length&&ka(t.charCodeAt(t.length-1)),clear:S,writeKeyword:x,writeOperator:x,writeParameter:x,writeProperty:x,writePunctuation:x,writeSpace:x,writeStringLiteral:x,writeSymbol:(Q,se)=>x(Q),writeTrailingSemicolon:x,writeComment:d,getTextPosWithWriteLine:q}}function DI(e){let t=!1;function n(){t&&(e.writeTrailingSemicolon(";"),t=!1)}return{...e,writeTrailingSemicolon(){t=!0},writeLiteral(a){n(),e.writeLiteral(a)},writeStringLiteral(a){n(),e.writeStringLiteral(a)},writeSymbol(a,_){n(),e.writeSymbol(a,_)},writePunctuation(a){n(),e.writePunctuation(a)},writeKeyword(a){n(),e.writeKeyword(a)},writeOperator(a){n(),e.writeOperator(a)},writeParameter(a){n(),e.writeParameter(a)},writeSpace(a){n(),e.writeSpace(a)},writeProperty(a){n(),e.writeProperty(a)},writeComment(a){n(),e.writeComment(a)},writeLine(){n(),e.writeLine()},increaseIndent(){n(),e.increaseIndent()},decreaseIndent(){n(),e.decreaseIndent()}}}function O2(e){return e.useCaseSensitiveFileNames?e.useCaseSensitiveFileNames():!1}function F3(e){return zd(O2(e))}function B3(e,t,n){return t.moduleName||M2(e,t.fileName,n&&n.fileName)}function M6(e,t){return e.getCanonicalFileName(Gi(t,e.getCurrentDirectory()))}function PI(e,t,n){let a=t.getExternalModuleFileFromDeclaration(n);if(!a||a.isDeclarationFile)return;let _=T2(n);if(!(_&&ni(_)&&!as(_.text)&&!M6(e,a.path).includes(M6(e,to(e.getCommonSourceDirectory())))))return B3(e,a)}function M2(e,t,n){let a=u=>e.getCanonicalFileName(u),_=Di(n?Mi(n):e.getCommonSourceDirectory(),e.getCurrentDirectory(),a),p=Gi(t,e.getCurrentDirectory()),m=Eg(_,p,_,a,!1),y=Dl(m);return n?Sg(y):y}function II(e,t,n){let a=t.getCompilerOptions(),_;return a.outDir?_=Dl(z3(e,t,a.outDir)):_=Dl(e),_+n}function NI(e,t){return U3(e,t.getCompilerOptions(),t.getCurrentDirectory(),t.getCommonSourceDirectory(),n=>t.getCanonicalFileName(n))}function U3(e,t,n,a,_){let p=t.declarationDir||t.outDir,m=p?vm(e,p,n,a,_):e,y=q3(m);return Dl(m)+y}function q3(e){return ii(e,[".mjs",".mts"])?".d.mts":ii(e,[".cjs",".cts"])?".d.cts":ii(e,[".json"])?".d.json.ts":".d.ts"}function OI(e){return ii(e,[".d.mts",".mjs",".mts"])?[".mts",".mjs"]:ii(e,[".d.cts",".cjs",".cts"])?[".cts",".cjs"]:ii(e,[".d.json.ts"])?[".json"]:[".tsx",".ts",".jsx",".js"]}function bm(e){return e.outFile||e.out}function MI(e,t){var n;if(e.paths)return e.baseUrl??I.checkDefined(e.pathsBasePath||((n=t.getCurrentDirectory)==null?void 0:n.call(t)),"Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'.")}function LI(e,t,n){let a=e.getCompilerOptions();if(bm(a)){let _=_i(a),p=a.emitDeclarationOnly||_===2||_===4;return rr(e.getSourceFiles(),m=>(p||!ns(m))&&J0(m,e,n))}else{let _=t===void 0?e.getSourceFiles():[t];return rr(_,p=>J0(p,e,n))}}function J0(e,t,n){let a=t.getCompilerOptions();if(a.noEmitForJsFiles&&h2(e)||e.isDeclarationFile||t.isSourceFileFromExternalLibrary(e))return!1;if(n)return!0;if(t.isSourceOfProjectReferenceRedirect(e.fileName))return!1;if(!o2(e))return!0;if(t.getResolvedProjectReferenceToRedirect(e.fileName))return!1;if(bm(a))return!0;if(!a.outDir)return!1;if(a.rootDir||a.composite&&a.configFilePath){let _=Gi(getCommonSourceDirectory(a,()=>[],t.getCurrentDirectory(),t.getCanonicalFileName),t.getCurrentDirectory()),p=vm(e.fileName,a.outDir,t.getCurrentDirectory(),_,t.getCanonicalFileName);if(Hv(e.fileName,p,t.getCurrentDirectory(),!t.useCaseSensitiveFileNames())===0)return!1}return!0}function z3(e,t,n){return vm(e,n,t.getCurrentDirectory(),t.getCommonSourceDirectory(),a=>t.getCanonicalFileName(a))}function vm(e,t,n,a,_){let p=Gi(e,n);return p=_(p).indexOf(_(a))===0?p.substring(a.length):p,Qt(t,p)}function JI(e,t,n,a,_,p,m){e.writeFile(n,a,_,y=>{t.add(hl(B.Could_not_write_file_0_Colon_1,n,y))},p,m)}function W3(e,t,n){if(e.length>Ni(e)&&!n(e)){let a=Mi(e);W3(a,t,n),t(e)}}function RI(e,t,n,a,_,p){try{a(e,t,n)}catch{W3(Mi(br(e)),_,p),a(e,t,n)}}function jI(e,t){let n=Aa(e);return __(n,t)}function Ta(e,t){return __(e,t)}function V3(e){return ir(e.members,t=>L_(t)&&Cl(t.body))}function L2(e){if(e&&e.parameters.length>0){let t=e.parameters.length===2&&$l(e.parameters[0]);return e.parameters[t?1:0]}}function FI(e){let t=L2(e);return t&&t.type}function H3(e){if(e.parameters.length&&!cu(e)){let t=e.parameters[0];if($l(t))return t}}function $l(e){return Tm(e.name)}function Tm(e){return!!e&&e.kind===80&&G3(e)}function BI(e){return!!or(e,t=>t.kind===186?!0:t.kind===80||t.kind===166?!1:"quit")}function UI(e){if(!Tm(e))return!1;for(;O_(e.parent)&&e.parent.left===e;)e=e.parent;return e.parent.kind===186}function G3(e){return e.escapedText==="this"}function J2(e,t){let n,a,_,p;return D3(t)?(n=t,t.kind===177?_=t:t.kind===178?p=t:I.fail("Accessor has wrong kind")):wn(e,m=>{if(am(m)&&R0(m)===R0(t)){let y=vd(m.name),u=vd(t.name);y===u&&(n?a||(a=m):n=m,m.kind===177&&!_&&(_=m),m.kind===178&&!p&&(p=m))}}),{firstAccessor:n,secondAccessor:a,getAccessor:_,setAccessor:p}}function R2(e){if(!Vt(e)&&us(e))return;let t=e.type;return t||!Vt(e)?t:Rg(e)?e.typeExpression&&e.typeExpression.type:nm(e)}function qI(e){return e.type}function zI(e){return cu(e)?e.type&&e.type.typeExpression&&e.type.typeExpression.type:e.type||(Vt(e)?W4(e):void 0)}function X3(e){return zo(zl(e),t=>WI(t)?t.typeParameters:void 0)}function WI(e){return ts(e)&&!(e.parent.kind===327&&(e.parent.tags.some(Xl)||e.parent.tags.some(zb)))}function VI(e){let t=L2(e);return t&&R2(t)}function $3(e,t,n,a){Q3(e,t,n.pos,a)}function Q3(e,t,n,a){a&&a.length&&n!==a[0].pos&&Ta(e,n)!==Ta(e,a[0].pos)&&t.writeLine()}function HI(e,t,n,a){n!==a&&Ta(e,n)!==Ta(e,a)&&t.writeLine()}function Y3(e,t,n,a,_,p,m,y){if(a&&a.length>0){_&&n.writeSpace(" ");let u=!1;for(let x of a)u&&(n.writeSpace(" "),u=!1),y(e,t,n,x.pos,x.end,m),x.hasTrailingNewLine?n.writeLine():u=!0;u&&p&&n.writeSpace(" ")}}function GI(e,t,n,a,_,p,m){let y,u;if(m?_.pos===0&&(y=rr(Ho(e,_.pos),x)):y=Ho(e,_.pos),y){let d=[],S;for(let T of y){if(S){let A=Ta(t,S.end);if(Ta(t,T.pos)>=A+2)break}d.push(T),S=T}if(d.length){let T=Ta(t,Ea(d).end);Ta(t,Mt(e,_.pos))>=T+2&&($3(t,n,_,y),Y3(e,t,n,d,!1,!0,p,a),u={nodePos:_.pos,detachedCommentEndPos:Ea(d).end})}}return u;function x(d){return IT(e,d.pos)}}function XI(e,t,n,a,_,p){if(e.charCodeAt(a+1)===42){let m=kg(t,a),y=t.length,u;for(let x=a,d=m.line;x<_;d++){let S=d+1===y?e.length+1:t[d+1];if(x!==a){u===void 0&&(u=L6(e,t[m.line],a));let A=n.getIndent()*Fo()-u+L6(e,x,S);if(A>0){let N=A%Fo(),q=N2((A-N)/Fo());for(n.rawWrite(q);N;)n.rawWrite(" "),N--}else n.rawWrite("")}$I(e,_,n,p,x,S),x=S}}else n.writeComment(e.substring(a,_))}function $I(e,t,n,a,_,p){let m=Math.min(t,p-1),y=e.substring(_,m).trim();y?(n.writeComment(y),m!==t&&n.writeLine()):n.rawWrite(a)}function L6(e,t,n){let a=0;for(;t=0&&e.kind<=165?0:(e.modifierFlagsCache&536870912||(e.modifierFlagsCache=q2(e)|536870912),n||t&&Vt(e)?(!(e.modifierFlagsCache&268435456)&&e.parent&&(e.modifierFlagsCache|=rS(e)|268435456),iS(e.modifierFlagsCache)):ZI(e.modifierFlagsCache))}function xm(e){return B2(e,!0)}function nS(e){return B2(e,!0,!0)}function U2(e){return B2(e,!1)}function rS(e){let t=0;return e.parent&&!Pa(e)&&(Vt(e)&&(R4(e)&&(t|=8388608),j4(e)&&(t|=16777216),F4(e)&&(t|=33554432),B4(e)&&(t|=67108864),U4(e)&&(t|=134217728)),q4(e)&&(t|=65536)),t}function ZI(e){return e&65535}function iS(e){return e&131071|(e&260046848)>>>23}function eN(e){return iS(rS(e))}function aS(e){return q2(e)|eN(e)}function q2(e){let t=U_(e)?hr(e.modifiers):0;return(e.flags&8||e.kind===80&&e.flags&4096)&&(t|=32),t}function hr(e){let t=0;if(e)for(let n of e)t|=z2(n.kind);return t}function z2(e){switch(e){case 126:return 256;case 125:return 1;case 124:return 4;case 123:return 2;case 128:return 64;case 129:return 512;case 95:return 32;case 138:return 128;case 87:return 4096;case 90:return 2048;case 134:return 1024;case 148:return 8;case 164:return 16;case 103:return 8192;case 147:return 16384;case 170:return 32768}return 0}function oS(e){return e===57||e===56}function tN(e){return oS(e)||e===54}function wm(e){return e===76||e===77||e===78}function nN(e){return At(e)&&wm(e.operatorToken.kind)}function sS(e){return oS(e)||e===61}function rN(e){return At(e)&&sS(e.operatorToken.kind)}function A_(e){return e>=64&&e<=79}function _S(e){let t=cS(e);return t&&!t.isImplements?t.class:void 0}function cS(e){if(Cb(e)){if(Ml(e.parent)&&ar(e.parent.parent))return{class:e.parent.parent,isImplements:e.parent.token===119};if(jm(e.parent)){let t=w2(e.parent);if(t&&ar(t))return{class:t,isImplements:!1}}}}function si(e,t){return At(e)&&(t?e.operatorToken.kind===64:A_(e.operatorToken.kind))&&jo(e.left)}function iN(e){return si(e.parent)&&e.parent.left===e}function aN(e){if(si(e,!0)){let t=e.left.kind;return t===210||t===209}return!1}function F0(e){return _S(e)!==void 0}function co(e){return e.kind===80||lS(e)}function oN(e){switch(e.kind){case 80:return e;case 166:do e=e.left;while(e.kind!==80);return e;case 211:do e=e.expression;while(e.kind!==80);return e}}function B0(e){return e.kind===80||e.kind===110||e.kind===108||e.kind===236||e.kind===211&&B0(e.expression)||e.kind===217&&B0(e.expression)}function lS(e){return Ln(e)&&Ae(e.name)&&co(e.expression)}function U0(e){if(Ln(e)){let t=U0(e.expression);if(t!==void 0)return t+"."+Ci(e.name)}else if(Ki(e)){let t=U0(e.expression);if(t!==void 0&&Vl(e.argumentExpression))return t+"."+vd(e.argumentExpression)}else{if(Ae(e))return Go(e.escapedText);if(B_(e))return Kl(e)}}function k_(e){return _s(e)&&ao(e)==="prototype"}function sN(e){return e.parent.kind===166&&e.parent.right===e||e.parent.kind===211&&e.parent.name===e||e.parent.kind===236&&e.parent.name===e}function uS(e){return!!e.parent&&(Ln(e.parent)&&e.parent.name===e||Ki(e.parent)&&e.parent.argumentExpression===e)}function _N(e){return O_(e.parent)&&e.parent.right===e||Ln(e.parent)&&e.parent.name===e||r_(e.parent)&&e.parent.right===e}function pS(e){return At(e)&&e.operatorToken.kind===104}function cN(e){return pS(e.parent)&&e===e.parent.right}function lN(e){return e.kind===210&&e.properties.length===0}function uN(e){return e.kind===209&&e.elements.length===0}function pN(e){if(!(!fN(e)||!e.declarations)){for(let t of e.declarations)if(t.localSymbol)return t.localSymbol}}function fN(e){return e&&eo(e.declarations)>0&&Cn(e.declarations[0],2048)}function dN(e){return ir(kx,t=>Na(e,t))}function mN(e){let t=[],n=e.length;for(let a=0;a>6|192),t.push(_&63|128)):_<65536?(t.push(_>>12|224),t.push(_>>6&63|128),t.push(_&63|128)):_<131072?(t.push(_>>18|240),t.push(_>>12&63|128),t.push(_>>6&63|128),t.push(_&63|128)):I.assert(!1,"Unexpected code point")}return t}function fS(e){let t="",n=mN(e),a=0,_=n.length,p,m,y,u;for(;a<_;)p=n[a]>>2,m=(n[a]&3)<<4|n[a+1]>>4,y=(n[a+1]&15)<<2|n[a+2]>>6,u=n[a+2]&63,a+1>=_?y=u=64:a+2>=_&&(u=64),t+=Wi.charAt(p)+Wi.charAt(m)+Wi.charAt(y)+Wi.charAt(u),a+=3;return t}function hN(e){let t="",n=0,a=e.length;for(;n>4&3,d=(m&15)<<4|y>>2&15,S=(y&3)<<6|u&63;d===0&&y!==0?a.push(x):S===0&&u!==0?a.push(x,d):a.push(x,d,S),_+=4}return hN(a)}function dS(e,t){let n=g_(t)?t:t.readFile(e);if(!n)return;let a=parseConfigFileTextToJson(e,n);return a.error?void 0:a.config}function bN(e,t){return dS(e,t)||{}}function mS(e,t){return!t.directoryExists||t.directoryExists(e)}function hS(e){switch(e.newLine){case 0:return wx;case 1:case void 0:return Ex}}function Em(e,t=e){return I.assert(t>=e||t===-1),{pos:e,end:t}}function vN(e,t){return Em(e.pos,t)}function wd(e,t){return Em(t,e.end)}function yS(e){let t=U_(e)?lg(e.modifiers,M_):void 0;return t&&!Da(t.end)?wd(e,t.end):e}function TN(e){if(Ia(e)||f_(e))return wd(e,e.name.pos);let t=U_(e)?Pi(e.modifiers):void 0;return t&&!Da(t.end)?wd(e,t.end):yS(e)}function SN(e){return e.pos===e.end}function xN(e,t){return Em(e,e+en(t).length)}function wN(e,t){return gS(e,e,t)}function EN(e,t,n){return D_(p_(e,n,!1),p_(t,n,!1),n)}function CN(e,t,n){return D_(e.end,t.end,n)}function gS(e,t,n){return D_(p_(e,n,!1),t.end,n)}function AN(e,t,n){return D_(e.end,p_(t,n,!1),n)}function kN(e,t,n,a){let _=p_(t,n,a);return T_(n,e.end,_)}function DN(e,t,n){return T_(n,e.end,t.end)}function PN(e,t){return!D_(e.pos,e.end,t)}function D_(e,t,n){return T_(n,e,t)===0}function p_(e,t,n){return Da(e.pos)?-1:Mt(t.text,e.pos,!1,n)}function IN(e,t,n,a){let _=Mt(n.text,e,!1,a),p=ON(_,t,n);return T_(n,p??t,_)}function NN(e,t,n,a){let _=Mt(n.text,e,!1,a);return T_(n,e,Math.min(t,_))}function ON(e,t=0,n){for(;e-- >t;)if(!ka(n.text.charCodeAt(e)))return e}function MN(e){let t=Ul(e);if(t)switch(t.parent.kind){case 266:case 267:return t===t.parent.name}return!1}function LN(e){return rr(e.declarations,bS)}function bS(e){return Li(e)&&e.initializer!==void 0}function JN(e){return e.watch&&Wn(e,"watch")}function RN(e){e.close()}function vS(e){return e.flags&33554432?e.links.checkFlags:0}function jN(e,t=!1){if(e.valueDeclaration){let n=t&&e.declarations&&ir(e.declarations,Zo)||e.flags&32768&&ir(e.declarations,d_)||e.valueDeclaration,a=Yd(n);return e.parent&&e.parent.flags&32?a:a&-8}if(vS(e)&6){let n=e.links.checkFlags,a=n&1024?2:n&256?1:4,_=n&2048?256:0;return a|_}return e.flags&4194304?257:0}function FN(e,t){return e.flags&2097152?t.getAliasedSymbol(e):e}function BN(e){return e.exportSymbol?e.exportSymbol.flags|e.flags:e.flags}function UN(e){return No(e)===1}function qN(e){return No(e)!==0}function No(e){let{parent:t}=e;switch(t==null?void 0:t.kind){case 217:return No(t);case 225:case 224:let{operator:n}=t;return n===46||n===47?2:0;case 226:let{left:a,operatorToken:_}=t;return a===e&&A_(_.kind)?_.kind===64?1:2:0;case 211:return t.name!==e?0:No(t);case 303:{let p=No(t.parent);return e===t.name?zN(p):p}case 304:return e===t.objectAssignmentInitializer?0:No(t.parent);case 209:return No(t);default:return 0}}function zN(e){switch(e){case 0:return 1;case 1:return 0;case 2:return 2;default:return I.assertNever(e)}}function TS(e,t){if(!e||!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(typeof e[n]=="object"){if(!TS(e[n],t[n]))return!1}else if(typeof e[n]!="function"&&e[n]!==t[n])return!1;return!0}function WN(e,t){e.forEach(t),e.clear()}function SS(e,t,n){let{onDeleteValue:a,onExistingValue:_}=n;e.forEach((p,m)=>{let y=t.get(m);y===void 0?(e.delete(m),a(p,m)):_&&_(p,y,m)})}function VN(e,t,n){SS(e,t,n);let{createNewValue:a}=n;t.forEach((_,p)=>{e.has(p)||e.set(p,a(p,_))})}function HN(e){if(e.flags&32){let t=xS(e);return!!t&&Cn(t,64)}return!1}function xS(e){var t;return(t=e.declarations)==null?void 0:t.find(ar)}function jf(e){return e.flags&3899393?e.objectFlags:0}function GN(e,t){return!!$v(e,n=>t(n)?!0:void 0)}function XN(e){return!!e&&!!e.declarations&&!!e.declarations[0]&&Ib(e.declarations[0])}function $N({moduleSpecifier:e}){return Tr(e)?e.text:cm(e)}function wS(e){let t;return Wt(e,n=>{Cl(n)&&(t=n)},n=>{for(let a=n.length-1;a>=0;a--)if(Cl(n[a])){t=n[a];break}}),t}function QN(e,t,n=!0){return e.has(t)?!1:(e.set(t,n),!0)}function YN(e){return ar(e)||su(e)||Pm(e)}function ES(e){return e>=182&&e<=205||e===133||e===159||e===150||e===163||e===151||e===136||e===154||e===155||e===116||e===157||e===146||e===141||e===233||e===319||e===320||e===321||e===322||e===323||e===324||e===325}function Ko(e){return e.kind===211||e.kind===212}function KN(e){return e.kind===211?e.name:(I.assert(e.kind===212),e.argumentExpression)}function ZN(e){switch(e.kind){case"text":case"internal":return!0;default:return!1}}function eO(e){return e.kind===275||e.kind===279}function W2(e){for(;Ko(e);)e=e.expression;return e}function tO(e,t){if(Ko(e.parent)&&uS(e))return n(e.parent);function n(a){if(a.kind===211){let _=t(a.name);if(_!==void 0)return _}else if(a.kind===212)if(Ae(a.argumentExpression)||ni(a.argumentExpression)){let _=t(a.argumentExpression);if(_!==void 0)return _}else return;if(Ko(a.expression))return n(a.expression);if(Ae(a.expression))return t(a.expression)}}function nO(e,t){for(;;){switch(e.kind){case 225:e=e.operand;continue;case 226:e=e.left;continue;case 227:e=e.condition;continue;case 215:e=e.tag;continue;case 213:if(t)return e;case 234:case 212:case 211:case 235:case 360:case 238:e=e.expression;continue}return e}}function rO(e,t){this.flags=e,this.escapedName=t,this.declarations=void 0,this.valueDeclaration=void 0,this.id=0,this.mergeId=0,this.parent=void 0,this.members=void 0,this.exports=void 0,this.exportSymbol=void 0,this.constEnumOnlyModule=void 0,this.isReferenced=void 0,this.isAssigned=void 0,this.links=void 0}function iO(e,t){this.flags=t,(I.isDebugging||ba)&&(this.checker=e)}function aO(e,t){this.flags=t,I.isDebugging&&(this.checker=e)}function Yh(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,this.emitNode=void 0}function oO(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.emitNode=void 0}function sO(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.emitNode=void 0}function _O(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n||(a=>a)}function cO(e){sb.push(e),e(Ct)}function CS(e){Object.assign(Ct,e),wn(sb,t=>t(Ct))}function P_(e,t){return e.replace(/{(\d+)}/g,(n,a)=>""+I.checkDefined(t[+a]))}function AS(e){Pl=e}function kS(e){!Pl&&e&&(Pl=e())}function I_(e){return Pl&&Pl[e.key]||e.message}function Po(e,t,n,a,_,...p){n+a>t.length&&(a=t.length-n),r2(t,n,a);let m=I_(_);return Ze(p)&&(m=P_(m,p)),{file:void 0,start:n,length:a,messageText:m,category:_.category,code:_.code,reportsUnnecessary:_.reportsUnnecessary,fileName:e}}function lO(e){return e.file===void 0&&e.start!==void 0&&e.length!==void 0&&typeof e.fileName=="string"}function DS(e,t){let n=t.fileName||"",a=t.text.length;I.assertEqual(e.fileName,n),I.assertLessThanOrEqual(e.start,a),I.assertLessThanOrEqual(e.start+e.length,a);let _={file:t,start:e.start,length:e.length,messageText:e.messageText,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary};if(e.relatedInformation){_.relatedInformation=[];for(let p of e.relatedInformation)lO(p)&&p.fileName===n?(I.assertLessThanOrEqual(p.start,a),I.assertLessThanOrEqual(p.start+p.length,a),_.relatedInformation.push(DS(p,t))):_.relatedInformation.push(p)}return _}function Ya(e,t){let n=[];for(let a of e)n.push(DS(a,t));return n}function V2(e,t,n,a,..._){r2(e.text,t,n);let p=I_(a);return Ze(_)&&(p=P_(p,_)),{file:e,start:t,length:n,messageText:p,category:a.category,code:a.code,reportsUnnecessary:a.reportsUnnecessary,reportsDeprecated:a.reportsDeprecated}}function uO(e,...t){let n=I_(e);return Ze(t)&&(n=P_(n,t)),n}function hl(e,...t){let n=I_(e);return Ze(t)&&(n=P_(n,t)),{file:void 0,start:void 0,length:void 0,messageText:n,category:e.category,code:e.code,reportsUnnecessary:e.reportsUnnecessary,reportsDeprecated:e.reportsDeprecated}}function pO(e,t){return{file:void 0,start:void 0,length:void 0,code:e.code,category:e.category,messageText:e.next?e:e.messageText,relatedInformation:t}}function il(e,t,...n){let a=I_(t);return Ze(n)&&(a=P_(a,n)),{messageText:a,category:t.category,code:t.code,next:e===void 0||Array.isArray(e)?e:[e]}}function fO(e,t){let n=e;for(;n.next;)n=n.next[0];n.next=[t]}function J6(e){return e.file?e.file.path:void 0}function H2(e,t){return Ed(e,t)||dO(e,t)||0}function Ed(e,t){return Ii(J6(e),J6(t))||Mn(e.start,t.start)||Mn(e.length,t.length)||Mn(e.code,t.code)||PS(e.messageText,t.messageText)||0}function dO(e,t){return!e.relatedInformation&&!t.relatedInformation?0:e.relatedInformation&&t.relatedInformation?Mn(e.relatedInformation.length,t.relatedInformation.length)||wn(e.relatedInformation,(n,a)=>{let _=t.relatedInformation[a];return H2(n,_)})||0:e.relatedInformation?-1:1}function PS(e,t){if(typeof e=="string"&&typeof t=="string")return Ii(e,t);if(typeof e=="string")return-1;if(typeof t=="string")return 1;let n=Ii(e.messageText,t.messageText);if(n)return n;if(!e.next&&!t.next)return 0;if(!e.next)return-1;if(!t.next)return 1;let a=Math.min(e.next.length,t.next.length);for(let _=0;_t.next.length?1:0}function q0(e){return e===4||e===2||e===1||e===6?1:0}function IS(e){if(e.transformFlags&2)return vT(e)||yl(e)?e:Wt(e,IS)}function mO(e){return e.isDeclarationFile?void 0:IS(e)}function hO(e){return(e.impliedNodeFormat===99||ii(e.fileName,[".cjs",".cts",".mjs",".mts"]))&&!e.isDeclarationFile?!0:void 0}function NS(e){switch(OS(e)){case 3:return _=>{_.externalModuleIndicator=gl(_)||!_.isDeclarationFile||void 0};case 1:return _=>{_.externalModuleIndicator=gl(_)};case 2:let t=[gl];(e.jsx===4||e.jsx===5)&&t.push(mO),t.push(hO);let n=yg(...t);return _=>void(_.externalModuleIndicator=n(_))}}function Ql(e){return e.target??(e.module===100&&9||e.module===199&&99||1)}function _i(e){return typeof e.module=="number"?e.module:Ql(e)>=2?5:1}function yO(e){return e>=5&&e<=99}function N_(e){let t=e.moduleResolution;if(t===void 0)switch(_i(e)){case 1:t=2;break;case 100:t=3;break;case 199:t=99;break;default:t=1;break}return t}function OS(e){return e.moduleDetection||(_i(e)===100||_i(e)===199?3:2)}function gO(e){switch(_i(e)){case 1:case 2:case 5:case 6:case 7:case 99:case 100:case 199:return!0;default:return!1}}function G2(e){return!!(e.isolatedModules||e.verbatimModuleSyntax)}function bO(e){return e.verbatimModuleSyntax||e.isolatedModules&&e.preserveValueImports}function vO(e){return e.allowUnreachableCode===!1}function TO(e){return e.allowUnusedLabels===!1}function SO(e){return!!(Q2(e)&&e.declarationMap)}function X2(e){if(e.esModuleInterop!==void 0)return e.esModuleInterop;switch(_i(e)){case 100:case 199:return!0}}function xO(e){return e.allowSyntheticDefaultImports!==void 0?e.allowSyntheticDefaultImports:X2(e)||_i(e)===4||N_(e)===100}function $2(e){return e>=3&&e<=99||e===100}function wO(e){return!!e.noDtsResolution||N_(e)!==100}function EO(e){let t=N_(e);if(!$2(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}function CO(e){let t=N_(e);if(!$2(t))return!1;if(e.resolvePackageJsonExports!==void 0)return e.resolvePackageJsonExports;switch(t){case 3:case 99:case 100:return!0}return!1}function MS(e){return e.resolveJsonModule!==void 0?e.resolveJsonModule:N_(e)===100}function Q2(e){return!!(e.declaration||e.composite)}function AO(e){return!!(e.preserveConstEnums||G2(e))}function kO(e){return!!(e.incremental||e.composite)}function Y2(e,t){return e[t]===void 0?!!e.strict:!!e[t]}function K2(e){return e.allowJs===void 0?!!e.checkJs:e.allowJs}function DO(e){return e.useDefineForClassFields===void 0?Ql(e)>=9:e.useDefineForClassFields}function PO(e){return e.useDefineForClassFields!==!1&&Ql(e)>=9}function IO(e,t){return w_(t,e,semanticDiagnosticsOptionDeclarations)}function NO(e,t){return w_(t,e,affectsEmitOptionDeclarations)}function OO(e,t){return w_(t,e,affectsDeclarationPathOptionDeclarations)}function z0(e,t){return t.strictFlag?Y2(e,t.name):t.allowJsFlag?K2(e):e[t.name]}function MO(e){let t=e.jsx;return t===2||t===4||t===5}function LO(e,t){let n=t==null?void 0:t.pragmas.get("jsximportsource"),a=$t(n)?n[n.length-1]:n;return e.jsx===4||e.jsx===5||e.jsxImportSource||a?(a==null?void 0:a.arguments.factory)||e.jsxImportSource||"react":void 0}function JO(e,t){return e?`${e}/${t.jsx===5?"jsx-dev-runtime":"jsx-runtime"}`:void 0}function RO(e){let t=!1;for(let n=0;n_,getSymlinkedDirectories:()=>n,getSymlinkedDirectoriesByRealpath:()=>a,setSymlinkedFile:(y,u)=>(_||(_=new Map)).set(y,u),setSymlinkedDirectory:(y,u)=>{let x=Di(y,e,t);YS(x)||(x=to(x),u!==!1&&!(n!=null&&n.has(x))&&(a||(a=Ud())).add(u.realPath,y),(n||(n=new Map)).set(x,u))},setSymlinksFromResolutions(y,u,x){I.assert(!p),p=!0,y(d=>m(this,d.resolvedModule)),u(d=>m(this,d.resolvedTypeReferenceDirective)),x.forEach(d=>m(this,d.resolvedTypeReferenceDirective))},hasProcessedResolutions:()=>p};function m(y,u){if(!u||!u.originalPath||!u.resolvedFileName)return;let{resolvedFileName:x,originalPath:d}=u;y.setSymlinkedFile(Di(d,e,t),x);let[S,T]=FO(x,d,e,t)||Je;S&&T&&y.setSymlinkedDirectory(T,{real:to(S),realPath:to(Di(S,e,t))})}}function FO(e,t,n,a){let _=Oi(Gi(e,n)),p=Oi(Gi(t,n)),m=!1;for(;_.length>=2&&p.length>=2&&!R6(_[_.length-2],a)&&!R6(p[p.length-2],a)&&a(_[_.length-1])===a(p[p.length-1]);)_.pop(),p.pop(),m=!0;return m?[Wo(_),Wo(p)]:void 0}function R6(e,t){return e!==void 0&&(t(e)==="node_modules"||Hn(e,"@"))}function BO(e){return vg(e.charCodeAt(0))?e.slice(1):void 0}function UO(e,t,n){let a=Lv(e,t,n);return a===void 0?void 0:BO(a)}function qO(e){return e.replace(kd,zO)}function zO(e){return"\\"+e}function Ff(e,t,n){let a=Z2(e,t,n);return!a||!a.length?void 0:`^(${a.map(m=>`(${m})`).join("|")})${n==="exclude"?"($|/)":"$"}`}function Z2(e,t,n){if(!(e===void 0||e.length===0))return zo(e,a=>a&&JS(a,t,n,_b[n]))}function LS(e){return!/[.*?]/.test(e)}function WO(e,t,n){let a=e&&JS(e,t,n,_b[n]);return a&&`^(${a})${n==="exclude"?"($|/)":"$"}`}function JS(e,t,n,{singleAsteriskRegexFragment:a,doubleAsteriskRegexFragment:_,replaceWildcardCharacter:p}){let m="",y=!1,u=Hd(e,t),x=Ea(u);if(n!=="exclude"&&x==="**")return;u[0]=v_(u[0]),LS(x)&&u.push("**","*");let d=0;for(let S of u){if(S==="**")m+=_;else if(n==="directories"&&(m+="(",d++),y&&(m+=vr),n!=="exclude"){let T="";S.charCodeAt(0)===42?(T+="([^./]"+a+")?",S=S.substr(1)):S.charCodeAt(0)===63&&(T+="[^./]",S=S.substr(1)),T+=S.replace(kd,p),T!==S&&(m+=Uf),m+=T}else m+=S.replace(kd,p);y=!0}for(;d>0;)m+=")?",d--;return m}function Kh(e,t){return e==="*"?t:e==="?"?"[^/]":"\\"+e}function RS(e,t,n,a,_){e=br(e),_=br(_);let p=Qt(_,e);return{includeFilePatterns:xa(Z2(n,p,"files"),m=>`^${m}$`),includeFilePattern:Ff(n,p,"files"),includeDirectoryPattern:Ff(n,p,"directories"),excludePattern:Ff(t,p,"exclude"),basePaths:HO(e,n,a)}}function Bf(e,t){return new RegExp(e,t?"":"i")}function VO(e,t,n,a,_,p,m,y,u){e=br(e),p=br(p);let x=RS(e,n,a,_,p),d=x.includeFilePatterns&&x.includeFilePatterns.map(se=>Bf(se,_)),S=x.includeDirectoryPattern&&Bf(x.includeDirectoryPattern,_),T=x.excludePattern&&Bf(x.excludePattern,_),A=d?d.map(()=>[]):[[]],N=new Map,q=zd(_);for(let se of x.basePaths)Q(se,Qt(p,se),m);return o_(A);function Q(se,fe,F){let W=q(u(fe));if(N.has(W))return;N.set(W,!0);let{files:Se,directories:Qe}=y(se);for(let Be of Xf(Se,Ii)){let st=Qt(se,Be),_t=Qt(fe,Be);if(!(t&&!ii(st,t))&&!(T&&T.test(_t)))if(!d)A[0].push(st);else{let hn=ul(d,yn=>yn.test(_t));hn!==-1&&A[hn].push(st)}}if(!(F!==void 0&&(F--,F===0)))for(let Be of Xf(Qe,Ii)){let st=Qt(se,Be),_t=Qt(fe,Be);(!S||S.test(_t))&&(!T||!T.test(_t))&&Q(st,_t,F)}}}function HO(e,t,n){let a=[e];if(t){let _=[];for(let p of t){let m=b_(p)?p:br(Qt(e,p));_.push(GO(m))}_.sort(dg(!n));for(let p of _)so(a,m=>!Gv(m,p,e,!n))&&a.push(p)}return a}function GO(e){let t=dv(e,Cx);return t<0?Wv(e)?v_(Mi(e)):e:e.substring(0,e.lastIndexOf(vr,t))}function jS(e,t){return t||FS(e)||3}function FS(e){switch(e.substr(e.lastIndexOf(".")).toLowerCase()){case".js":case".cjs":case".mjs":return 1;case".jsx":return 2;case".ts":case".cts":case".mts":return 3;case".tsx":return 4;case".json":return 6;default:return 0}}function BS(e,t){let n=e&&K2(e);if(!t||t.length===0)return n?Il:Bo;let a=n?Il:Bo,_=o_(a);return[...a,...wa(t,m=>m.scriptKind===7||n&&XO(m.scriptKind)&&!_.includes(m.extension)?[m.extension]:void 0)]}function US(e,t){return!e||!MS(e)?t:t===Il?Dx:t===Bo?Ax:[...t,[".json"]]}function XO(e){return e===1||e===2}function eb(e){return Ze(lb,t=>Na(e,t))}function tb(e){return Ze(cb,t=>Na(e,t))}function qS({imports:e},t=yg(eb,tb)){return cg(e,({text:n})=>as(n)&&!ii(n,km)?t(n):void 0)||!1}function $O(e,t,n,a){if(e==="js"||t===99)return shouldAllowImportingTsExtension(n)&&_()!==2?3:2;if(e==="minimal")return 0;if(e==="index")return 1;if(!shouldAllowImportingTsExtension(n))return qS(a)?2:0;return _();function _(){let p=!1,m=a.imports.length?a.imports.map(y=>y.text):h2(a)?QO(a).map(y=>y.arguments[0].text):Je;for(let y of m)if(as(y)){if(ii(y,km))continue;if(tb(y))return 3;eb(y)&&(p=!0)}return p?2:0}}function QO(e){let t=0,n;for(let a of e.statements){if(t>3)break;t3(a)?n=h_(n,a.declarationList.declarations.map(_=>_.initializer)):ou(a)&&Hl(a.expression,!0)?n=Et(n,a.expression):t++}return n||Je}function YO(e,t,n){if(!e)return!1;let a=BS(t,n);for(let _ of o_(US(t,a)))if(Na(e,_))return!0;return!1}function j6(e){let t=e.match(/\//g);return t?t.length:0}function KO(e,t){return Mn(j6(e),j6(t))}function Dl(e){for(let t of Dm){let n=zS(e,t);if(n!==void 0)return n}return e}function zS(e,t){return Na(e,t)?WS(e,t):void 0}function WS(e,t){return e.substring(0,e.length-t.length)}function ZO(e,t){return Vv(e,t,Dm,!1)}function VS(e){let t=e.indexOf("*");return t===-1?e:e.indexOf("*",t+1)!==-1?void 0:{prefix:e.substr(0,t),suffix:e.substr(t+1)}}function eM(e){return wa(fg(e),t=>VS(t))}function Da(e){return!(e>=0)}function HS(e){return e===".ts"||e===".tsx"||e===".d.ts"||e===".cts"||e===".mts"||e===".d.mts"||e===".d.cts"||Hn(e,".d.")&&is(e,".ts")}function tM(e){return HS(e)||e===".json"}function al(e){let t=nb(e);return t!==void 0?t:I.fail(`File ${e} has unknown extension.`)}function nM(e){return nb(e)!==void 0}function nb(e){return ir(Dm,t=>Na(e,t))}function rM(e,t){return e.checkJsDirective?e.checkJsDirective.enabled:t.checkJs}function iM(e,t){let n=[];for(let a of e){if(a===t)return t;g_(a)||n.push(a)}return Mv(n,a=>a,t)}function aM(e,t){let n=e.indexOf(t);return I.assert(n!==-1),e.slice(n)}function ol(e,...t){return t.length&&(e.relatedInformation||(e.relatedInformation=[]),I.assert(e.relatedInformation!==Je,"Diagnostic had empty array singleton for related info, but is still being constructed!"),e.relatedInformation.push(...t)),e}function oM(e,t){I.assert(e.length!==0);let n=t(e[0]),a=n;for(let _=1;_a&&(a=p)}return{min:n,max:a}}function sM(e){return{pos:$o(e),end:e.end}}function _M(e,t){let n=t.pos-1,a=Math.min(e.text.length,Mt(e.text,t.end)+1);return{pos:n,end:a}}function cM(e,t,n){return t.skipLibCheck&&e.isDeclarationFile||t.skipDefaultLibCheck&&e.hasNoDefaultLib||n.isSourceOfProjectReferenceRedirect(e.fileName)}function rb(e,t){return e===t||typeof e=="object"&&e!==null&&typeof t=="object"&&t!==null&&wv(e,t,rb)}function Cm(e){let 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:let x=e.length-1,d=0;for(;e.charCodeAt(d)===48;)d++;return e.slice(d,x)||"0"}let n=2,a=e.length-1,_=(a-n)*t,p=new Uint16Array((_>>>4)+(_&15?1:0));for(let x=a-1,d=0;x>=n;x--,d+=t){let S=d>>>4,T=e.charCodeAt(x),N=(T<=57?T-48:10+T-(T<=70?65:97))<<(d&15);p[S]|=N;let q=N>>>16;q&&(p[S+1]|=q)}let m="",y=p.length-1,u=!0;for(;u;){let x=0;u=!1;for(let d=y;d>=0;d--){let S=x<<16|p[d],T=S/10|0;p[d]=T,x=S-T*10,T&&!u&&(y=d,u=!0)}m=x+m}return m}function ib({negative:e,base10Value:t}){return(e&&t!=="0"?"-":"")+t}function lM(e){if(XS(e,!1))return GS(e)}function GS(e){let t=e.startsWith("-"),n=Cm(`${t?e.slice(1):e}n`);return{negative:t,base10Value:n}}function XS(e,t){if(e==="")return!1;let n=ss(99,!1),a=!0;n.setOnError(()=>a=!1),n.setText(e+"n");let _=n.scan(),p=_===41;p&&(_=n.scan());let m=n.getTokenFlags();return a&&_===10&&n.getTokenEnd()===e.length+1&&!(m&512)&&(!t||e===ib({negative:p,base10Value:Cm(n.getTokenValue())}))}function uM(e){return!!(e.flags&33554432)||QT(e)||dM(e)||fM(e)||!(m2(e)||pM(e))}function pM(e){return Ae(e)&&_u(e.parent)&&e.parent.name===e}function fM(e){for(;e.kind===80||e.kind===211;)e=e.parent;if(e.kind!==167)return!1;if(Cn(e.parent,64))return!0;let t=e.parent.parent.kind;return t===264||t===187}function dM(e){if(e.kind!==80)return!1;let t=or(e.parent,n=>{switch(n.kind){case 298:return!0;case 211:case 233:return!1;default:return"quit"}});return(t==null?void 0:t.token)===119||(t==null?void 0:t.parent.kind)===264}function mM(e){return J_(e)&&Ae(e.typeName)}function hM(e,t=_o){if(e.length<2)return!0;let n=e[0];for(let a=1,_=e.length;a<_;a++){let p=e[a];if(!t(n,p))return!1}return!0}function Cd(e,t){return e.pos=t,e}function $S(e,t){return e.end=t,e}function Za(e,t,n){return $S(Cd(e,t),n)}function Ad(e,t,n){return Za(e,t,t+n)}function yM(e,t){return e&&(e.flags=t),e}function Qi(e,t){return e&&t&&(e.parent=t),e}function a_(e,t){if(e)for(let n of e)Qi(n,t);return e}function QS(e,t){if(!e)return e;return ag(e,$g(e)?n:_),e;function n(p,m){if(t&&p.parent===m)return"skip";Qi(p,m)}function a(p){if(Hi(p))for(let m of p.jsDoc)n(m,p),ag(m,n)}function _(p,m){return n(p,m)||a(p)}}function gM(e){return!Mm(e)}function bM(e){return iu(e)&&so(e.elements,gM)}function vM(e){for(I.assertIsDefined(e.parent);;){let t=e.parent;if(cs(t)){e=t;continue}if(ou(t)||wb(t)||s8(t)&&(t.initializer===e||t.incrementor===e))return!0;if(j_(t)){if(e!==Ea(t.elements))return!0;e=t;continue}if(At(t)&&t.operatorToken.kind===28){if(e===t.left)return!0;e=t;continue}return!1}}function YS(e){return Ze(ignoredPaths,t=>e.includes(t))}function TM(e){if(!e.parent)return;switch(e.kind){case 168:let{parent:n}=e;return n.kind===195?void 0:n.typeParameters;case 169:return e.parent.parameters;case 204:return e.parent.templateSpans;case 239:return e.parent.templateSpans;case 170:{let{parent:a}=e;return F8(a)?a.modifiers:void 0}case 298:return e.parent.heritageClauses}let{parent:t}=e;if(Qg(e))return jb(e.parent)?void 0:e.parent.tags;switch(t.kind){case 187:case 264:return Wg(e)?t.members:void 0;case 192:case 193:return t.types;case 189:case 209:case 361:case 275:case 279:return t.elements;case 210:case 292:return t.properties;case 213:case 214:return S0(e)?t.typeArguments:t.expression===e?void 0:t.arguments;case 284:case 288:return bT(e)?t.children:void 0;case 286:case 285:return S0(e)?t.typeArguments:void 0;case 241:case 296:case 297:case 268:return t.statements;case 269:return t.clauses;case 263:case 231:return io(e)?t.members:void 0;case 266:return m8(e)?t.members:void 0;case 312:return t.statements}}function SM(e){if(!e.typeParameters){if(Ze(e.parameters,t=>!R2(t)))return!0;if(e.kind!==219){let t=y_(e.parameters);if(!(t&&$l(t)))return!0}}return!1}function xM(e){return e==="Infinity"||e==="-Infinity"||e==="NaN"}function KS(e){return e.kind===260&&e.parent.kind===299}function wM(e){let t=e.valueDeclaration&&gm(e.valueDeclaration);return!!t&&(Pa(t)||KS(t))}function ZS(e){return e.kind===218||e.kind===219}function EM(e){return e.replace(/\$/gm,()=>"\\$")}function ex(e){return(+e).toString()===e}function CM(e,t,n,a,_){let p=_&&e==="new";return!p&&Ig(e,t)?zr.createIdentifier(e):!a&&!p&&ex(e)&&+e>=0?zr.createNumericLiteral(+e):zr.createStringLiteral(e,!!n)}function tx(e){return!!(e.flags&262144&&e.isThisType)}function AM(e){let t=0,n=0,a=0,_=0,p;(x=>{x[x.BeforeNodeModules=0]="BeforeNodeModules",x[x.NodeModules=1]="NodeModules",x[x.Scope=2]="Scope",x[x.PackageContent=3]="PackageContent"})(p||(p={}));let m=0,y=0,u=0;for(;y>=0;)switch(m=y,y=e.indexOf("/",m+1),u){case 0:e.indexOf(nodeModulesPathPart,m)===m&&(t=m,n=y,u=1);break;case 1:case 2:u===1&&e.charAt(m+1)==="@"?u=2:(a=y,u=3);break;case 3:e.indexOf(nodeModulesPathPart,m)===m?u=1:u=3;break}return _=m,u>1?{topLevelNodeModulesIndex:t,topLevelPackageNameIndex:n,packageRootIndex:a,fileNameIndex:_}:void 0}function kM(e){var t;return e.kind===348?(t=e.typeExpression)==null?void 0:t.type:e.type}function nx(e){switch(e.kind){case 168:case 263:case 264:case 265:case 266:case 353:case 345:case 347:return!0;case 273:return e.isTypeOnly;case 276:case 281:return e.parent.parent.isTypeOnly;default:return!1}}function DM(e){return Pb(e)||ls(e)||us(e)||es(e)||su(e)||nx(e)||Zi(e)&&!Zg(e)&&!um(e)}function rx(e){if(!Rg(e))return!1;let{isBracketed:t,typeExpression:n}=e;return t||!!n&&n.type.kind===323}function PM(e,t){if(e.length===0)return!1;let n=e.charCodeAt(0);return n===35?e.length>1&&yr(e.charCodeAt(1),t):yr(n,t)}function ix(e){var t;return((t=getSnippetElement(e))==null?void 0:t.kind)===0}function ax(e){return Vt(e)&&(e.type&&e.type.kind===323||em(e).some(({isBracketed:t,typeExpression:n})=>t||!!n&&n.type.kind===323))}function IM(e){switch(e.kind){case 172:case 171:return!!e.questionToken;case 169:return!!e.questionToken||ax(e);case 355:case 348:return rx(e);default:return!1}}function NM(e){let t=e.kind;return(t===211||t===212)&&Uo(e.expression)}function OM(e){return Vt(e)&&cs(e)&&Hi(e)&&!!Mg(e)}function MM(e){return I.checkDefined(ox(e))}function ox(e){let t=Mg(e);return t&&t.typeExpression&&t.typeExpression.type}function LM(e){return Ae(e)?e.escapedText:Yl(e)}function JM(e){return Ae(e)?Lt(e):Kl(e)}function RM(e){let t=e.kind;return t===80||t===295}function Yl(e){return`${e.namespace.escapedText}:${Lt(e.name)}`}function Kl(e){return`${Lt(e.namespace)}:${Lt(e.name)}`}function jM(e){return Ae(e)?Lt(e):Kl(e)}function FM(e){return!!(e.flags&8576)}function BM(e){return e.flags&8192?e.escapedName:e.flags&384?qr(""+e.value):I.fail()}function sx(e){return!!e&&(Ln(e)||Ki(e)||At(e))}function UM(e){return e===void 0?!1:!!getResolutionModeOverride(e.attributes)}var _x,Am,cx,lx,e_,ux,W0,ab,px,fx,ob,dx,mx,V0,H0,G0,X0,hx,yx,gx,bx,vx,$0,Tx,Sx,xx,Oo,Wi,wx,Ex,Ct,sb,Pl,kd,Cx,Q0,Uf,Zh,ey,ty,_b,Bo,cb,Ax,kx,Y0,lb,Il,Dx,ub,Px,km,K0,Dm,Ix,qM=It({"src/compiler/utilities.ts"(){"use strict";En(),_x=[],Am="tslib",cx=160,lx=1e6,e_=ok(),ux=Qf(()=>new Map(Object.entries({Array:new Map(Object.entries({es2015:["find","findIndex","fill","copyWithin","entries","keys","values"],es2016:["includes"],es2019:["flat","flatMap"],es2022:["at"],es2023:["findLastIndex","findLast"]})),Iterator:new Map(Object.entries({es2015:Je})),AsyncIterator:new Map(Object.entries({es2015:Je})),Atomics:new Map(Object.entries({es2017:Je})),SharedArrayBuffer:new Map(Object.entries({es2017:Je})),AsyncIterable:new Map(Object.entries({es2018:Je})),AsyncIterableIterator:new Map(Object.entries({es2018:Je})),AsyncGenerator:new Map(Object.entries({es2018:Je})),AsyncGeneratorFunction:new Map(Object.entries({es2018:Je})),RegExp:new Map(Object.entries({es2015:["flags","sticky","unicode"],es2018:["dotAll"]})),Reflect:new Map(Object.entries({es2015:["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"]})),ArrayConstructor:new Map(Object.entries({es2015:["from","of"]})),ObjectConstructor:new Map(Object.entries({es2015:["assign","getOwnPropertySymbols","keys","is","setPrototypeOf"],es2017:["values","entries","getOwnPropertyDescriptors"],es2019:["fromEntries"],es2022:["hasOwn"]})),NumberConstructor:new Map(Object.entries({es2015:["isFinite","isInteger","isNaN","isSafeInteger","parseFloat","parseInt"]})),Math:new Map(Object.entries({es2015:["clz32","imul","sign","log10","log2","log1p","expm1","cosh","sinh","tanh","acosh","asinh","atanh","hypot","trunc","fround","cbrt"]})),Map:new Map(Object.entries({es2015:["entries","keys","values"]})),Set:new Map(Object.entries({es2015:["entries","keys","values"]})),PromiseConstructor:new Map(Object.entries({es2015:["all","race","reject","resolve"],es2020:["allSettled"],es2021:["any"]})),Symbol:new Map(Object.entries({es2015:["for","keyFor"],es2019:["description"]})),WeakMap:new Map(Object.entries({es2015:["entries","keys","values"]})),WeakSet:new Map(Object.entries({es2015:["entries","keys","values"]})),String:new Map(Object.entries({es2015:["codePointAt","includes","endsWith","normalize","repeat","startsWith","anchor","big","blink","bold","fixed","fontcolor","fontsize","italics","link","small","strike","sub","sup"],es2017:["padStart","padEnd"],es2019:["trimStart","trimEnd","trimLeft","trimRight"],es2020:["matchAll"],es2021:["replaceAll"],es2022:["at"]})),StringConstructor:new Map(Object.entries({es2015:["fromCodePoint","raw"]})),DateTimeFormat:new Map(Object.entries({es2017:["formatToParts"]})),Promise:new Map(Object.entries({es2015:Je,es2018:["finally"]})),RegExpMatchArray:new Map(Object.entries({es2018:["groups"]})),RegExpExecArray:new Map(Object.entries({es2018:["groups"]})),Intl:new Map(Object.entries({es2018:["PluralRules"]})),NumberFormat:new Map(Object.entries({es2018:["formatToParts"]})),SymbolConstructor:new Map(Object.entries({es2020:["matchAll"]})),DataView:new Map(Object.entries({es2020:["setBigInt64","setBigUint64","getBigInt64","getBigUint64"]})),BigInt:new Map(Object.entries({es2020:Je})),RelativeTimeFormat:new Map(Object.entries({es2020:["format","formatToParts","resolvedOptions"]})),Int8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint8Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint8ClampedArray:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Int16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint16Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Int32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Uint32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Float32Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),Float64Array:new Map(Object.entries({es2022:["at"],es2023:["findLastIndex","findLast"]})),BigInt64Array:new Map(Object.entries({es2020:Je,es2022:["at"],es2023:["findLastIndex","findLast"]})),BigUint64Array:new Map(Object.entries({es2020:Je,es2022:["at"],es2023:["findLastIndex","findLast"]})),Error:new Map(Object.entries({es2022:["cause"]}))}))),W0=(e=>(e[e.None=0]="None",e[e.NeverAsciiEscape=1]="NeverAsciiEscape",e[e.JsxAttributeEscape=2]="JsxAttributeEscape",e[e.TerminateUnterminatedLiterals=4]="TerminateUnterminatedLiterals",e[e.AllowNumericSeparator=8]="AllowNumericSeparator",e))(W0||{}),ab=/^(\/\/\/\s*/,px=/^(\/\/\/\s*/,fx=/^(\/\/\/\s*/,ob=/^(\/\/\/\s*/,dx=/^\/\/\/\s*/,mx=/^(\/\/\/\s*/,V0=(e=>(e[e.None=0]="None",e[e.Definite=1]="Definite",e[e.Compound=2]="Compound",e))(V0||{}),H0=(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))(H0||{}),G0=(e=>(e[e.Left=0]="Left",e[e.Right=1]="Right",e))(G0||{}),X0=(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))(X0||{}),hx=/\$\{/g,yx=/[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,gx=/[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g,bx=/\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g,vx=new Map(Object.entries({" ":"\\t","\v":"\\v","\f":"\\f","\b":"\\b","\r":"\\r","\n":"\\n","\\":"\\\\",'"':'\\"',"'":"\\'","`":"\\`","\u2028":"\\u2028","\u2029":"\\u2029","\x85":"\\u0085","\r\n":"\\r\\n"})),$0=/[^\u0000-\u007F]/g,Tx=/["\u0000-\u001f\u2028\u2029\u0085]/g,Sx=/['\u0000-\u001f\u2028\u2029\u0085]/g,xx=new Map(Object.entries({'"':""","'":"'"})),Oo=[""," "],Wi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",wx=`\r +`,Ex=` +`,Ct={getNodeConstructor:()=>Yh,getTokenConstructor:()=>oO,getIdentifierConstructor:()=>sO,getPrivateIdentifierConstructor:()=>Yh,getSourceFileConstructor:()=>Yh,getSymbolConstructor:()=>rO,getTypeConstructor:()=>iO,getSignatureConstructor:()=>aO,getSourceMapSourceConstructor:()=>_O},sb=[],kd=/[^\w\s/]/g,Cx=[42,63],Q0=["node_modules","bower_components","jspm_packages"],Uf=`(?!(${Q0.join("|")})(/|$))`,Zh={singleAsteriskRegexFragment:"([^./]|(\\.(?!min\\.js$))?)*",doubleAsteriskRegexFragment:`(/${Uf}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Kh(e,Zh.singleAsteriskRegexFragment)},ey={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:`(/${Uf}[^/.][^/]*)*?`,replaceWildcardCharacter:e=>Kh(e,ey.singleAsteriskRegexFragment)},ty={singleAsteriskRegexFragment:"[^/]*",doubleAsteriskRegexFragment:"(/.+?)?",replaceWildcardCharacter:e=>Kh(e,ty.singleAsteriskRegexFragment)},_b={files:Zh,directories:ey,exclude:ty},Bo=[[".ts",".tsx",".d.ts"],[".cts",".d.cts"],[".mts",".d.mts"]],cb=o_(Bo),Ax=[...Bo,[".json"]],kx=[".d.ts",".d.cts",".d.mts",".cts",".mts",".ts",".tsx"],Y0=[[".js",".jsx"],[".mjs"],[".cjs"]],lb=o_(Y0),Il=[[".ts",".tsx",".d.ts",".js",".jsx"],[".cts",".d.cts",".cjs"],[".mts",".d.mts",".mjs"]],Dx=[...Il,[".json"]],ub=[".d.ts",".d.cts",".d.mts"],Px=[".ts",".cts",".mts",".tsx"],km=[".mts",".d.mts",".mjs",".cts",".d.cts",".cjs"],K0=(e=>(e[e.Minimal=0]="Minimal",e[e.Index=1]="Index",e[e.JsExtension=2]="JsExtension",e[e.TsExtension=3]="TsExtension",e))(K0||{}),Dm=[".d.ts",".d.mts",".d.cts",".mjs",".mts",".cjs",".cts",".ts",".js",".tsx",".jsx",".json"],Ix={files:Je,directories:Je}}});function Nx(){let e,t,n,a,_;return{createBaseSourceFileNode:p,createBaseIdentifierNode:m,createBasePrivateIdentifierNode:y,createBaseTokenNode:u,createBaseNode:x};function p(d){return new(_||(_=Ct.getSourceFileConstructor()))(d,-1,-1)}function m(d){return new(n||(n=Ct.getIdentifierConstructor()))(d,-1,-1)}function y(d){return new(a||(a=Ct.getPrivateIdentifierConstructor()))(d,-1,-1)}function u(d){return new(t||(t=Ct.getTokenConstructor()))(d,-1,-1)}function x(d){return new(e||(e=Ct.getNodeConstructor()))(d,-1,-1)}}var zM=It({"src/compiler/factory/baseNodeFactory.ts"(){"use strict";En()}}),pb,WM=It({"src/compiler/factory/parenthesizerRules.ts"(){"use strict";En(),pb={getParenthesizeLeftSideOfBinaryForOperator:e=>bt,getParenthesizeRightSideOfBinaryForOperator:e=>bt,parenthesizeLeftSideOfBinary:(e,t)=>t,parenthesizeRightSideOfBinary:(e,t,n)=>n,parenthesizeExpressionOfComputedPropertyName:bt,parenthesizeConditionOfConditionalExpression:bt,parenthesizeBranchOfConditionalExpression:bt,parenthesizeExpressionOfExportDefault:bt,parenthesizeExpressionOfNew:e=>wi(e,jo),parenthesizeLeftSideOfAccess:e=>wi(e,jo),parenthesizeOperandOfPostfixUnary:e=>wi(e,jo),parenthesizeOperandOfPrefixUnary:e=>wi(e,fT),parenthesizeExpressionsOfCommaDelimitedList:e=>wi(e,ha),parenthesizeExpressionForDisallowedComma:bt,parenthesizeExpressionOfExpressionStatement:bt,parenthesizeConciseBodyOfArrowFunction:bt,parenthesizeCheckTypeOfConditionalType:bt,parenthesizeExtendsTypeOfConditionalType:bt,parenthesizeConstituentTypesOfUnionType:e=>wi(e,ha),parenthesizeConstituentTypeOfUnionType:bt,parenthesizeConstituentTypesOfIntersectionType:e=>wi(e,ha),parenthesizeConstituentTypeOfIntersectionType:bt,parenthesizeOperandOfTypeOperator:bt,parenthesizeOperandOfReadonlyTypeOperator:bt,parenthesizeNonArrayTypeOfPostfixType:bt,parenthesizeElementTypesOfTupleType:e=>wi(e,ha),parenthesizeElementTypeOfTupleType:bt,parenthesizeTypeOfOptionalType:bt,parenthesizeTypeArguments:e=>e&&wi(e,ha),parenthesizeLeadingTypeArgument:bt}}}),VM=()=>{},Ox=()=>new Proxy({},{get:()=>()=>{}});function HM(e){fb.push(e)}function Dd(e,t){let n=e&8?GM:XM,a=Qf(()=>e&1?pb:createParenthesizerRules(se)),_=Qf(()=>e&2?nullNodeConverters:Ox(se)),p=Fr(r=>(o,s)=>sc(o,r,s)),m=Fr(r=>o=>ac(r,o)),y=Fr(r=>o=>oc(o,r)),u=Fr(r=>()=>U1(r)),x=Fr(r=>o=>Mc(r,o)),d=Fr(r=>(o,s)=>z1(r,o,s)),S=Fr(r=>(o,s)=>kp(r,o,s)),T=Fr(r=>(o,s)=>q1(r,o,s)),A=Fr(r=>(o,s)=>Bp(r,o,s)),N=Fr(r=>(o,s,l)=>ih(r,o,s,l)),q=Fr(r=>(o,s,l)=>Up(r,o,s,l)),Q=Fr(r=>(o,s,l,g)=>ah(r,o,s,l,g)),se={get parenthesizer(){return a()},get converters(){return _()},baseFactory:t,flags:e,createNodeArray:fe,createNumericLiteral:Qe,createBigIntLiteral:Be,createStringLiteral:_t,createStringLiteralFromNode:hn,createRegularExpressionLiteral:yn,createLiteralLikeNode:fi,createIdentifier:He,createTempVariable:Qn,createLoopVariable:Gr,createUniqueName:vt,getGeneratedNameForNode:Jn,createPrivateIdentifier:Ht,createUniquePrivateName:at,getGeneratedPrivateNameForNode:kr,createToken:xt,createSuper:ut,createThis:Gt,createNull:cn,createTrue:ht,createFalse:Dr,createModifier:Tt,createModifiersFromModifierFlags:Rn,createQualifiedName:yt,updateQualifiedName:jn,createComputedPropertyName:ct,updateComputedPropertyName:Kt,createTypeParameterDeclaration:Zt,updateTypeParameterDeclaration:lr,createParameterDeclaration:di,updateParameterDeclaration:Xr,createDecorator:Yn,updateDecorator:Kn,createPropertySignature:Ji,updatePropertySignature:Pr,createPropertyDeclaration:U,updatePropertyDeclaration:ie,createMethodSignature:ye,updateMethodSignature:Te,createMethodDeclaration:tt,updateMethodDeclaration:$e,createConstructorDeclaration:z,updateConstructorDeclaration:K,createGetAccessorDeclaration:Ee,updateGetAccessorDeclaration:je,createSetAccessorDeclaration:nt,updateSetAccessorDeclaration:kt,createCallSignature:Zn,updateCallSignature:kn,createConstructSignature:er,updateConstructSignature:Ri,createIndexSignature:aa,updateIndexSignature:$r,createClassStaticBlockDeclaration:St,updateClassStaticBlockDeclaration:Jt,createTemplateLiteralTypeSpan:Dn,updateTemplateLiteralTypeSpan:Ne,createKeywordTypeNode:oa,createTypePredicateNode:jt,updateTypePredicateNode:Fn,createTypeReferenceNode:R,updateTypeReferenceNode:v,createFunctionTypeNode:w,updateFunctionTypeNode:f,createConstructorTypeNode:$,updateConstructorTypeNode:be,createTypeQueryNode:xe,updateTypeQueryNode:Ye,createTypeLiteralNode:Ge,updateTypeLiteralNode:Xe,createArrayTypeNode:Nt,updateArrayTypeNode:Xt,createTupleTypeNode:ln,updateTupleTypeNode:ve,createNamedTupleMember:ft,updateNamedTupleMember:Ir,createOptionalTypeNode:Dt,updateOptionalTypeNode:G,createRestTypeNode:La,updateRestTypeNode:Pe,createUnionTypeNode:ur,updateUnionTypeNode:Ja,createIntersectionTypeNode:Nr,updateIntersectionTypeNode:Re,createConditionalTypeNode:dt,updateConditionalTypeNode:mi,createInferTypeNode:Qr,updateInferTypeNode:n1,createImportTypeNode:hi,updateImportTypeNode:Ts,createParenthesizedType:Pn,updateParenthesizedType:zt,createThisTypeNode:M,createTypeOperatorNode:Bn,updateTypeOperatorNode:sa,createIndexedAccessTypeNode:yi,updateIndexedAccessTypeNode:X_,createMappedTypeNode:Ft,updateMappedTypeNode:vn,createLiteralTypeNode:Ra,updateLiteralTypeNode:_a,createTemplateLiteralType:bn,updateTemplateLiteralType:r1,createObjectBindingPattern:yu,updateObjectBindingPattern:i1,createArrayBindingPattern:ca,updateArrayBindingPattern:a1,createBindingElement:Ss,updateBindingElement:ja,createArrayLiteralExpression:$_,updateArrayLiteralExpression:gu,createObjectLiteralExpression:fo,updateObjectLiteralExpression:o1,createPropertyAccessExpression:e&4?(r,o)=>setEmitFlags(gi(r,o),262144):gi,updatePropertyAccessExpression:vu,createPropertyAccessChain:e&4?(r,o,s)=>setEmitFlags(Fa(r,o,s),262144):Fa,updatePropertyAccessChain:Tu,createElementAccessExpression:Q_,updateElementAccessExpression:s1,createElementAccessChain:Y_,updateElementAccessChain:Su,createCallExpression:ji,updateCallExpression:_1,createCallChain:K_,updateCallChain:pr,createNewExpression:ws,updateNewExpression:Z_,createTaggedTemplateExpression:ec,updateTaggedTemplateExpression:c1,createTypeAssertion:wu,updateTypeAssertion:Eu,createParenthesizedExpression:tc,updateParenthesizedExpression:Cu,createFunctionExpression:nc,updateFunctionExpression:Au,createArrowFunction:rc,updateArrowFunction:ku,createDeleteExpression:ic,updateDeleteExpression:l1,createTypeOfExpression:Tn,updateTypeOfExpression:u1,createVoidExpression:Or,updateVoidExpression:p1,createAwaitExpression:Fi,updateAwaitExpression:Ba,createPrefixUnaryExpression:ac,updatePrefixUnaryExpression:Es,createPostfixUnaryExpression:oc,updatePostfixUnaryExpression:Du,createBinaryExpression:sc,updateBinaryExpression:f1,createConditionalExpression:_c,updateConditionalExpression:d1,createTemplateExpression:Yr,updateTemplateExpression:Iu,createTemplateHead:As,createTemplateMiddle:lc,createTemplateTail:m1,createNoSubstitutionTemplateLiteral:Ou,createTemplateLiteralLikeNode:Ua,createYieldExpression:Mu,updateYieldExpression:h1,createSpreadElement:Lu,updateSpreadElement:y1,createClassExpression:Ju,updateClassExpression:ho,createOmittedExpression:g1,createExpressionWithTypeArguments:Ru,updateExpressionWithTypeArguments:fr,createAsExpression:ks,updateAsExpression:ju,createNonNullExpression:Fu,updateNonNullExpression:uc,createSatisfiesExpression:Bu,updateSatisfiesExpression:pc,createNonNullChain:Mr,updateNonNullChain:Uu,createMetaProperty:Ds,updateMetaProperty:bi,createTemplateSpan:yo,updateTemplateSpan:qu,createSemicolonClassElement:zu,createBlock:qa,updateBlock:Wu,createVariableStatement:Vu,updateVariableStatement:Hu,createEmptyStatement:fc,createExpressionStatement:go,updateExpressionStatement:b1,createIfStatement:dc,updateIfStatement:v1,createDoStatement:mc,updateDoStatement:T1,createWhileStatement:Gu,updateWhileStatement:S1,createForStatement:hc,updateForStatement:Xu,createForInStatement:$u,updateForInStatement:x1,createForOfStatement:Qu,updateForOfStatement:w1,createContinueStatement:Yu,updateContinueStatement:Ku,createBreakStatement:yc,updateBreakStatement:Zu,createReturnStatement:ep,updateReturnStatement:tp,createWithStatement:gc,updateWithStatement:np,createSwitchStatement:la,updateSwitchStatement:E1,createLabeledStatement:rp,updateLabeledStatement:ip,createThrowStatement:ap,updateThrowStatement:C1,createTryStatement:op,updateTryStatement:sp,createDebuggerStatement:_p,createVariableDeclaration:Ps,updateVariableDeclaration:A1,createVariableDeclarationList:bc,updateVariableDeclarationList:k1,createFunctionDeclaration:vc,updateFunctionDeclaration:cp,createClassDeclaration:Tc,updateClassDeclaration:Sc,createInterfaceDeclaration:lp,updateInterfaceDeclaration:gt,createTypeAliasDeclaration:Bi,updateTypeAliasDeclaration:xc,createEnumDeclaration:Ui,updateEnumDeclaration:up,createModuleDeclaration:Bt,updateModuleDeclaration:qi,createModuleBlock:on,updateModuleBlock:P1,createCaseBlock:pp,updateCaseBlock:I1,createNamespaceExportDeclaration:wc,updateNamespaceExportDeclaration:N1,createImportEqualsDeclaration:fp,updateImportEqualsDeclaration:dp,createImportDeclaration:mp,updateImportDeclaration:hp,createImportClause:Ec,updateImportClause:yp,createAssertClause:gp,updateAssertClause:Is,createAssertEntry:Cc,updateAssertEntry:bp,createImportTypeAssertionContainer:Ac,updateImportTypeAssertionContainer:M1,createImportAttributes:Ns,updateImportAttributes:L1,createImportAttribute:kc,updateImportAttribute:J1,createNamespaceImport:vp,updateNamespaceImport:R1,createNamespaceExport:Tp,updateNamespaceExport:j1,createNamedImports:Dc,updateNamedImports:ua,createImportSpecifier:Sp,updateImportSpecifier:xp,createExportAssignment:za,updateExportAssignment:Pc,createExportDeclaration:Ic,updateExportDeclaration:Wa,createNamedExports:Nc,updateNamedExports:wp,createExportSpecifier:Oc,updateExportSpecifier:B1,createMissingDeclaration:Ep,createExternalModuleReference:Cp,updateExternalModuleReference:Ap,get createJSDocAllType(){return u(319)},get createJSDocUnknownType(){return u(320)},get createJSDocNonNullableType(){return S(322)},get updateJSDocNonNullableType(){return T(322)},get createJSDocNullableType(){return S(321)},get updateJSDocNullableType(){return T(321)},get createJSDocOptionalType(){return x(323)},get updateJSDocOptionalType(){return d(323)},get createJSDocVariadicType(){return x(325)},get updateJSDocVariadicType(){return d(325)},get createJSDocNamepathType(){return x(326)},get updateJSDocNamepathType(){return d(326)},createJSDocFunctionType:Dp,updateJSDocFunctionType:W1,createJSDocTypeLiteral:Pp,updateJSDocTypeLiteral:V1,createJSDocTypeExpression:Os,updateJSDocTypeExpression:H1,createJSDocSignature:Ip,updateJSDocSignature:Ms,createJSDocTemplateTag:Lc,updateJSDocTemplateTag:Jc,createJSDocTypedefTag:Np,updateJSDocTypedefTag:Op,createJSDocParameterTag:Mp,updateJSDocParameterTag:G1,createJSDocPropertyTag:Rc,updateJSDocPropertyTag:X1,createJSDocCallbackTag:jc,updateJSDocCallbackTag:$1,createJSDocOverloadTag:Ls,updateJSDocOverloadTag:Lp,createJSDocAugmentsTag:Ha,updateJSDocAugmentsTag:Q1,createJSDocImplementsTag:pa,updateJSDocImplementsTag:rh,createJSDocSeeTag:bo,updateJSDocSeeTag:Y1,createJSDocNameReference:Jp,updateJSDocNameReference:K1,createJSDocMemberName:Rp,updateJSDocMemberName:Z1,createJSDocLink:Fc,updateJSDocLink:eh,createJSDocLinkCode:jp,updateJSDocLinkCode:th,createJSDocLinkPlain:Fp,updateJSDocLinkPlain:nh,get createJSDocTypeTag(){return q(351)},get updateJSDocTypeTag(){return Q(351)},get createJSDocReturnTag(){return q(349)},get updateJSDocReturnTag(){return Q(349)},get createJSDocThisTag(){return q(350)},get updateJSDocThisTag(){return Q(350)},get createJSDocAuthorTag(){return A(337)},get updateJSDocAuthorTag(){return N(337)},get createJSDocClassTag(){return A(339)},get updateJSDocClassTag(){return N(339)},get createJSDocPublicTag(){return A(340)},get updateJSDocPublicTag(){return N(340)},get createJSDocPrivateTag(){return A(341)},get updateJSDocPrivateTag(){return N(341)},get createJSDocProtectedTag(){return A(342)},get updateJSDocProtectedTag(){return N(342)},get createJSDocReadonlyTag(){return A(343)},get updateJSDocReadonlyTag(){return N(343)},get createJSDocOverrideTag(){return A(344)},get updateJSDocOverrideTag(){return N(344)},get createJSDocDeprecatedTag(){return A(338)},get updateJSDocDeprecatedTag(){return N(338)},get createJSDocThrowsTag(){return q(356)},get updateJSDocThrowsTag(){return Q(356)},get createJSDocSatisfiesTag(){return q(357)},get updateJSDocSatisfiesTag(){return Q(357)},createJSDocEnumTag:Js,updateJSDocEnumTag:sh,createJSDocUnknownTag:qp,updateJSDocUnknownTag:oh,createJSDocText:Bc,updateJSDocText:zp,createJSDocComment:Wp,updateJSDocComment:Rs,createJsxElement:Uc,updateJsxElement:_h,createJsxSelfClosingElement:Vp,updateJsxSelfClosingElement:ch,createJsxOpeningElement:js,updateJsxOpeningElement:Hp,createJsxClosingElement:qc,updateJsxClosingElement:zc,createJsxFragment:Sn,createJsxText:vo,updateJsxText:lh,createJsxOpeningFragment:Xp,createJsxJsxClosingFragment:uh,updateJsxFragment:Gp,createJsxAttribute:$p,updateJsxAttribute:Fs,createJsxAttributes:Qp,updateJsxAttributes:ph,createJsxSpreadAttribute:Yp,updateJsxSpreadAttribute:fh,createJsxExpression:Bs,updateJsxExpression:To,createJsxNamespacedName:Kp,updateJsxNamespacedName:Wc,createCaseClause:Vc,updateCaseClause:dh,createDefaultClause:Ga,updateDefaultClause:Zp,createHeritageClause:ef,updateHeritageClause:mh,createCatchClause:Hc,updateCatchClause:tf,createPropertyAssignment:Us,updatePropertyAssignment:fa,createShorthandPropertyAssignment:nf,updateShorthandPropertyAssignment:yh,createSpreadAssignment:Gc,updateSpreadAssignment:rf,createEnumMember:Lr,updateEnumMember:af,createSourceFile:bh,updateSourceFile:Sh,createRedirectedSourceFile:of,createBundle:Xc,updateBundle:xh,createUnparsedSource:wh,createUnparsedPrologue:_f,createUnparsedPrepend:Eh,createUnparsedTextLike:Ch,createUnparsedSyntheticReference:Ah,createInputFiles:kh,createSyntheticExpression:Dh,createSyntaxList:cf,createNotEmittedStatement:lf,createPartiallyEmittedExpression:$c,updatePartiallyEmittedExpression:uf,createCommaListExpression:zs,updateCommaListExpression:pf,createSyntheticReferenceExpression:ff,updateSyntheticReferenceExpression:Ih,cloneNode:Yc,get createComma(){return p(28)},get createAssignment(){return p(64)},get createLogicalOr(){return p(57)},get createLogicalAnd(){return p(56)},get createBitwiseOr(){return p(52)},get createBitwiseXor(){return p(53)},get createBitwiseAnd(){return p(51)},get createStrictEquality(){return p(37)},get createStrictInequality(){return p(38)},get createEquality(){return p(35)},get createInequality(){return p(36)},get createLessThan(){return p(30)},get createLessThanEquals(){return p(33)},get createGreaterThan(){return p(32)},get createGreaterThanEquals(){return p(34)},get createLeftShift(){return p(48)},get createRightShift(){return p(49)},get createUnsignedRightShift(){return p(50)},get createAdd(){return p(40)},get createSubtract(){return p(41)},get createMultiply(){return p(42)},get createDivide(){return p(44)},get createModulo(){return p(45)},get createExponent(){return p(43)},get createPrefixPlus(){return m(40)},get createPrefixMinus(){return m(41)},get createPrefixIncrement(){return m(46)},get createPrefixDecrement(){return m(47)},get createBitwiseNot(){return m(55)},get createLogicalNot(){return m(54)},get createPostfixIncrement(){return y(46)},get createPostfixDecrement(){return y(47)},createImmediatelyInvokedFunctionExpression:Lh,createImmediatelyInvokedArrowFunction:Jh,createVoidZero:So,createExportDefault:Rh,createExternalModuleExport:Ws,createTypeCheck:jh,createIsNotTypeCheck:df,createMethodCall:da,createGlobalMethodCall:xo,createFunctionBindCall:Fh,createFunctionCallCall:mf,createFunctionApplyCall:Bh,createArraySliceCall:Uh,createArrayConcatCall:hf,createObjectDefinePropertyCall:yf,createObjectGetOwnPropertyDescriptorCall:gf,createReflectGetCall:c,createReflectSetCall:h,createPropertyDescriptor:E,createCallBinding:ne,createAssignmentTargetWrapper:pe,inlineExpressions:Ue,getInternalName:Oe,getLocalName:xn,getExportName:qn,getDeclarationName:vi,getNamespaceMemberName:Zr,getExternalModuleOrNamespaceExportName:Jr,restoreOuterExpressions:Y,restoreEnclosingLabel:_e,createUseStrictPrologue:Kc,copyPrologue:ma,copyStandardPrologue:bf,copyCustomPrologue:Zc,ensureUseStrict:zh,liftToBlock:vf,mergeLexicalEnvironment:zi,replaceModifiers:Tf,replaceDecoratorsAndModifiers:fn,replacePropertyName:Vs};return wn(fb,r=>r(se)),se;function fe(r,o){if(r===void 0||r===Je)r=[];else if(ha(r)){if(o===void 0||r.hasTrailingComma===o)return r.transformFlags===void 0&&F6(r),I.attachNodeArrayDebugInfo(r),r;let g=r.slice();return g.pos=r.pos,g.end=r.end,g.hasTrailingComma=o,g.transformFlags=r.transformFlags,I.attachNodeArrayDebugInfo(g),g}let s=r.length,l=s>=1&&s<=4?r.slice():r;return l.pos=-1,l.end=-1,l.hasTrailingComma=!!o,l.transformFlags=0,F6(l),I.attachNodeArrayDebugInfo(l),l}function F(r){return t.createBaseNode(r)}function W(r){let o=F(r);return o.symbol=void 0,o.localSymbol=void 0,o}function Se(r,o){return r!==o&&(r.typeArguments=o.typeArguments),n(r,o)}function Qe(r,o=0){let s=W(9);return s.text=typeof r=="number"?r+"":r,s.numericLiteralFlags=o,o&384&&(s.transformFlags|=1024),s}function Be(r){let o=an(10);return o.text=typeof r=="string"?r:ib(r)+"n",o.transformFlags|=32,o}function st(r,o){let s=W(11);return s.text=r,s.singleQuote=o,s}function _t(r,o,s){let l=st(r,o);return l.hasExtendedUnicodeEscape=s,s&&(l.transformFlags|=1024),l}function hn(r){let o=st(Td(r),void 0);return o.textSourceNode=r,o}function yn(r){let o=an(14);return o.text=r,o}function fi(r,o){switch(r){case 9:return Qe(o,0);case 10:return Be(o);case 11:return _t(o,void 0);case 12:return vo(o,!1);case 13:return vo(o,!0);case 14:return yn(o);case 15:return Ua(r,o,void 0,0)}}function gn(r){let o=t.createBaseIdentifierNode(80);return o.escapedText=r,o.jsDoc=void 0,o.flowNode=void 0,o.symbol=void 0,o}function cr(r,o,s,l){let g=gn(qr(r));return setIdentifierAutoGenerate(g,{flags:o,id:sl,prefix:s,suffix:l}),sl++,g}function He(r,o,s){o===void 0&&r&&(o=Fl(r)),o===80&&(o=void 0);let l=gn(qr(r));return s&&(l.flags|=256),l.escapedText==="await"&&(l.transformFlags|=67108864),l.flags&256&&(l.transformFlags|=1024),l}function Qn(r,o,s,l){let g=1;o&&(g|=8);let D=cr("",g,s,l);return r&&r(D),D}function Gr(r){let o=2;return r&&(o|=8),cr("",o,void 0,void 0)}function vt(r,o=0,s,l){return I.assert(!(o&7),"Argument out of range: flags"),I.assert((o&48)!==32,"GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"),cr(r,3|o,s,l)}function Jn(r,o=0,s,l){I.assert(!(o&7),"Argument out of range: flags");let g=r?ro(r)?Nd(!1,s,r,l,Lt):`generated@${getNodeId(r)}`:"";(s||l)&&(o|=16);let D=cr(g,4|o,s,l);return D.original=r,D}function Ar(r){let o=t.createBasePrivateIdentifierNode(81);return o.escapedText=r,o.transformFlags|=16777216,o}function Ht(r){return Hn(r,"#")||I.fail("First character of private identifier must be #: "+r),Ar(qr(r))}function rn(r,o,s,l){let g=Ar(qr(r));return setIdentifierAutoGenerate(g,{flags:o,id:sl,prefix:s,suffix:l}),sl++,g}function at(r,o,s){r&&!Hn(r,"#")&&I.fail("First character of private identifier must be #: "+r);let l=8|(r?3:1);return rn(r??"",l,o,s)}function kr(r,o,s){let l=ro(r)?Nd(!0,o,r,s,Lt):`#generated@${getNodeId(r)}`,D=rn(l,4|(o||s?16:0),o,s);return D.original=r,D}function an(r){return t.createBaseTokenNode(r)}function xt(r){I.assert(r>=0&&r<=165,"Invalid token"),I.assert(r<=15||r>=18,"Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."),I.assert(r<=9||r>=15,"Invalid token. Use 'createLiteralLikeNode' to create literals."),I.assert(r!==80,"Invalid token. Use 'createIdentifier' to create identifiers");let o=an(r),s=0;switch(r){case 134:s=384;break;case 160:s=4;break;case 125:case 123:case 124:case 148:case 128:case 138:case 87:case 133:case 150:case 163:case 146:case 151:case 103:case 147:case 164:case 154:case 136:case 155:case 116:case 159:case 157:s=1;break;case 108:s=134218752,o.flowNode=void 0;break;case 126:s=1024;break;case 129:s=16777216;break;case 110:s=16384,o.flowNode=void 0;break}return s&&(o.transformFlags|=s),o}function ut(){return xt(108)}function Gt(){return xt(110)}function cn(){return xt(106)}function ht(){return xt(112)}function Dr(){return xt(97)}function Tt(r){return xt(r)}function Rn(r){let o=[];return r&32&&o.push(Tt(95)),r&128&&o.push(Tt(138)),r&2048&&o.push(Tt(90)),r&4096&&o.push(Tt(87)),r&1&&o.push(Tt(125)),r&2&&o.push(Tt(123)),r&4&&o.push(Tt(124)),r&64&&o.push(Tt(128)),r&256&&o.push(Tt(126)),r&16&&o.push(Tt(164)),r&8&&o.push(Tt(148)),r&512&&o.push(Tt(129)),r&1024&&o.push(Tt(134)),r&8192&&o.push(Tt(103)),r&16384&&o.push(Tt(147)),o.length?o:void 0}function yt(r,o){let s=F(166);return s.left=r,s.right=Ke(o),s.transformFlags|=V(s.left)|t_(s.right),s.flowNode=void 0,s}function jn(r,o,s){return r.left!==o||r.right!==s?n(yt(o,s),r):r}function ct(r){let o=F(167);return o.expression=a().parenthesizeExpressionOfComputedPropertyName(r),o.transformFlags|=V(o.expression)|1024|131072,o}function Kt(r,o){return r.expression!==o?n(ct(o),r):r}function Zt(r,o,s,l){let g=W(168);return g.modifiers=Ie(r),g.name=Ke(o),g.constraint=s,g.default=l,g.transformFlags=1,g.expression=void 0,g.jsDoc=void 0,g}function lr(r,o,s,l,g){return r.modifiers!==o||r.name!==s||r.constraint!==l||r.default!==g?n(Zt(o,s,l,g),r):r}function di(r,o,s,l,g,D){let H=W(169);return H.modifiers=Ie(r),H.dotDotDotToken=o,H.name=Ke(s),H.questionToken=l,H.type=g,H.initializer=Hs(D),Tm(H.name)?H.transformFlags=1:H.transformFlags=ke(H.modifiers)|V(H.dotDotDotToken)|jr(H.name)|V(H.questionToken)|V(H.initializer)|(H.questionToken??H.type?1:0)|(H.dotDotDotToken??H.initializer?1024:0)|(hr(H.modifiers)&31?8192:0),H.jsDoc=void 0,H}function Xr(r,o,s,l,g,D,H){return r.modifiers!==o||r.dotDotDotToken!==s||r.name!==l||r.questionToken!==g||r.type!==D||r.initializer!==H?n(di(o,s,l,g,D,H),r):r}function Yn(r){let o=F(170);return o.expression=a().parenthesizeLeftSideOfAccess(r,!1),o.transformFlags|=V(o.expression)|1|8192|33554432,o}function Kn(r,o){return r.expression!==o?n(Yn(o),r):r}function Ji(r,o,s,l){let g=W(171);return g.modifiers=Ie(r),g.name=Ke(o),g.type=l,g.questionToken=s,g.transformFlags=1,g.initializer=void 0,g.jsDoc=void 0,g}function Pr(r,o,s,l,g){return r.modifiers!==o||r.name!==s||r.questionToken!==l||r.type!==g?De(Ji(o,s,l,g),r):r}function De(r,o){return r!==o&&(r.initializer=o.initializer),n(r,o)}function U(r,o,s,l,g){let D=W(172);D.modifiers=Ie(r),D.name=Ke(o),D.questionToken=s&&Nl(s)?s:void 0,D.exclamationToken=s&&Id(s)?s:void 0,D.type=l,D.initializer=Hs(g);let H=D.flags&33554432||hr(D.modifiers)&128;return D.transformFlags=ke(D.modifiers)|jr(D.name)|V(D.initializer)|(H||D.questionToken||D.exclamationToken||D.type?1:0)|(oo(D.name)||hr(D.modifiers)&256&&D.initializer?8192:0)|16777216,D.jsDoc=void 0,D}function ie(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.questionToken!==(l!==void 0&&Nl(l)?l:void 0)||r.exclamationToken!==(l!==void 0&&Id(l)?l:void 0)||r.type!==g||r.initializer!==D?n(U(o,s,l,g,D),r):r}function ye(r,o,s,l,g,D){let H=W(173);return H.modifiers=Ie(r),H.name=Ke(o),H.questionToken=s,H.typeParameters=Ie(l),H.parameters=Ie(g),H.type=D,H.transformFlags=1,H.jsDoc=void 0,H.locals=void 0,H.nextContainer=void 0,H.typeArguments=void 0,H}function Te(r,o,s,l,g,D,H){return r.modifiers!==o||r.name!==s||r.questionToken!==l||r.typeParameters!==g||r.parameters!==D||r.type!==H?Se(ye(o,s,l,g,D,H),r):r}function tt(r,o,s,l,g,D,H,me){let ze=W(174);if(ze.modifiers=Ie(r),ze.asteriskToken=o,ze.name=Ke(s),ze.questionToken=l,ze.exclamationToken=void 0,ze.typeParameters=Ie(g),ze.parameters=fe(D),ze.type=H,ze.body=me,!ze.body)ze.transformFlags=1;else{let In=hr(ze.modifiers)&1024,Si=!!ze.asteriskToken,xi=In&&Si;ze.transformFlags=ke(ze.modifiers)|V(ze.asteriskToken)|jr(ze.name)|V(ze.questionToken)|ke(ze.typeParameters)|ke(ze.parameters)|V(ze.type)|V(ze.body)&-67108865|(xi?128:In?256:Si?2048:0)|(ze.questionToken||ze.typeParameters||ze.type?1:0)|1024}return ze.typeArguments=void 0,ze.jsDoc=void 0,ze.locals=void 0,ze.nextContainer=void 0,ze.flowNode=void 0,ze.endFlowNode=void 0,ze.returnFlowNode=void 0,ze}function $e(r,o,s,l,g,D,H,me,ze){return r.modifiers!==o||r.asteriskToken!==s||r.name!==l||r.questionToken!==g||r.typeParameters!==D||r.parameters!==H||r.type!==me||r.body!==ze?Ut(tt(o,s,l,g,D,H,me,ze),r):r}function Ut(r,o){return r!==o&&(r.exclamationToken=o.exclamationToken),n(r,o)}function St(r){let o=W(175);return o.body=r,o.transformFlags=V(r)|16777216,o.modifiers=void 0,o.jsDoc=void 0,o.locals=void 0,o.nextContainer=void 0,o.endFlowNode=void 0,o.returnFlowNode=void 0,o}function Jt(r,o){return r.body!==o?Rt(St(o),r):r}function Rt(r,o){return r!==o&&(r.modifiers=o.modifiers),n(r,o)}function z(r,o,s){let l=W(176);return l.modifiers=Ie(r),l.parameters=fe(o),l.body=s,l.transformFlags=ke(l.modifiers)|ke(l.parameters)|V(l.body)&-67108865|1024,l.typeParameters=void 0,l.type=void 0,l.typeArguments=void 0,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.endFlowNode=void 0,l.returnFlowNode=void 0,l}function K(r,o,s,l){return r.modifiers!==o||r.parameters!==s||r.body!==l?te(z(o,s,l),r):r}function te(r,o){return r!==o&&(r.typeParameters=o.typeParameters,r.type=o.type),Se(r,o)}function Ee(r,o,s,l,g){let D=W(177);return D.modifiers=Ie(r),D.name=Ke(o),D.parameters=fe(s),D.type=l,D.body=g,D.body?D.transformFlags=ke(D.modifiers)|jr(D.name)|ke(D.parameters)|V(D.type)|V(D.body)&-67108865|(D.type?1:0):D.transformFlags=1,D.typeArguments=void 0,D.typeParameters=void 0,D.jsDoc=void 0,D.locals=void 0,D.nextContainer=void 0,D.flowNode=void 0,D.endFlowNode=void 0,D.returnFlowNode=void 0,D}function je(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.parameters!==l||r.type!==g||r.body!==D?pt(Ee(o,s,l,g,D),r):r}function pt(r,o){return r!==o&&(r.typeParameters=o.typeParameters),Se(r,o)}function nt(r,o,s,l){let g=W(178);return g.modifiers=Ie(r),g.name=Ke(o),g.parameters=fe(s),g.body=l,g.body?g.transformFlags=ke(g.modifiers)|jr(g.name)|ke(g.parameters)|V(g.body)&-67108865|(g.type?1:0):g.transformFlags=1,g.typeArguments=void 0,g.typeParameters=void 0,g.type=void 0,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g.endFlowNode=void 0,g.returnFlowNode=void 0,g}function kt(r,o,s,l,g){return r.modifiers!==o||r.name!==s||r.parameters!==l||r.body!==g?qt(nt(o,s,l,g),r):r}function qt(r,o){return r!==o&&(r.typeParameters=o.typeParameters,r.type=o.type),Se(r,o)}function Zn(r,o,s){let l=W(179);return l.typeParameters=Ie(r),l.parameters=Ie(o),l.type=s,l.transformFlags=1,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.typeArguments=void 0,l}function kn(r,o,s,l){return r.typeParameters!==o||r.parameters!==s||r.type!==l?Se(Zn(o,s,l),r):r}function er(r,o,s){let l=W(180);return l.typeParameters=Ie(r),l.parameters=Ie(o),l.type=s,l.transformFlags=1,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.typeArguments=void 0,l}function Ri(r,o,s,l){return r.typeParameters!==o||r.parameters!==s||r.type!==l?Se(er(o,s,l),r):r}function aa(r,o,s){let l=W(181);return l.modifiers=Ie(r),l.parameters=Ie(o),l.type=s,l.transformFlags=1,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.typeArguments=void 0,l}function $r(r,o,s,l){return r.parameters!==s||r.type!==l||r.modifiers!==o?Se(aa(o,s,l),r):r}function Dn(r,o){let s=F(204);return s.type=r,s.literal=o,s.transformFlags=1,s}function Ne(r,o,s){return r.type!==o||r.literal!==s?n(Dn(o,s),r):r}function oa(r){return xt(r)}function jt(r,o,s){let l=F(182);return l.assertsModifier=r,l.parameterName=Ke(o),l.type=s,l.transformFlags=1,l}function Fn(r,o,s,l){return r.assertsModifier!==o||r.parameterName!==s||r.type!==l?n(jt(o,s,l),r):r}function R(r,o){let s=F(183);return s.typeName=Ke(r),s.typeArguments=o&&a().parenthesizeTypeArguments(fe(o)),s.transformFlags=1,s}function v(r,o,s){return r.typeName!==o||r.typeArguments!==s?n(R(o,s),r):r}function w(r,o,s){let l=W(184);return l.typeParameters=Ie(r),l.parameters=Ie(o),l.type=s,l.transformFlags=1,l.modifiers=void 0,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.typeArguments=void 0,l}function f(r,o,s,l){return r.typeParameters!==o||r.parameters!==s||r.type!==l?X(w(o,s,l),r):r}function X(r,o){return r!==o&&(r.modifiers=o.modifiers),Se(r,o)}function $(...r){return r.length===4?O(...r):r.length===3?ue(...r):I.fail("Incorrect number of arguments specified.")}function O(r,o,s,l){let g=W(185);return g.modifiers=Ie(r),g.typeParameters=Ie(o),g.parameters=Ie(s),g.type=l,g.transformFlags=1,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.typeArguments=void 0,g}function ue(r,o,s){return O(void 0,r,o,s)}function be(...r){return r.length===5?ge(...r):r.length===4?Le(...r):I.fail("Incorrect number of arguments specified.")}function ge(r,o,s,l,g){return r.modifiers!==o||r.typeParameters!==s||r.parameters!==l||r.type!==g?Se($(o,s,l,g),r):r}function Le(r,o,s,l){return ge(r,r.modifiers,o,s,l)}function xe(r,o){let s=F(186);return s.exprName=r,s.typeArguments=o&&a().parenthesizeTypeArguments(o),s.transformFlags=1,s}function Ye(r,o,s){return r.exprName!==o||r.typeArguments!==s?n(xe(o,s),r):r}function Ge(r){let o=W(187);return o.members=fe(r),o.transformFlags=1,o}function Xe(r,o){return r.members!==o?n(Ge(o),r):r}function Nt(r){let o=F(188);return o.elementType=a().parenthesizeNonArrayTypeOfPostfixType(r),o.transformFlags=1,o}function Xt(r,o){return r.elementType!==o?n(Nt(o),r):r}function ln(r){let o=F(189);return o.elements=fe(a().parenthesizeElementTypesOfTupleType(r)),o.transformFlags=1,o}function ve(r,o){return r.elements!==o?n(ln(o),r):r}function ft(r,o,s,l){let g=W(202);return g.dotDotDotToken=r,g.name=o,g.questionToken=s,g.type=l,g.transformFlags=1,g.jsDoc=void 0,g}function Ir(r,o,s,l,g){return r.dotDotDotToken!==o||r.name!==s||r.questionToken!==l||r.type!==g?n(ft(o,s,l,g),r):r}function Dt(r){let o=F(190);return o.type=a().parenthesizeTypeOfOptionalType(r),o.transformFlags=1,o}function G(r,o){return r.type!==o?n(Dt(o),r):r}function La(r){let o=F(191);return o.type=r,o.transformFlags=1,o}function Pe(r,o){return r.type!==o?n(La(o),r):r}function ot(r,o,s){let l=F(r);return l.types=se.createNodeArray(s(o)),l.transformFlags=1,l}function un(r,o,s){return r.types!==o?n(ot(r.kind,o,s),r):r}function ur(r){return ot(192,r,a().parenthesizeConstituentTypesOfUnionType)}function Ja(r,o){return un(r,o,a().parenthesizeConstituentTypesOfUnionType)}function Nr(r){return ot(193,r,a().parenthesizeConstituentTypesOfIntersectionType)}function Re(r,o){return un(r,o,a().parenthesizeConstituentTypesOfIntersectionType)}function dt(r,o,s,l){let g=F(194);return g.checkType=a().parenthesizeCheckTypeOfConditionalType(r),g.extendsType=a().parenthesizeExtendsTypeOfConditionalType(o),g.trueType=s,g.falseType=l,g.transformFlags=1,g.locals=void 0,g.nextContainer=void 0,g}function mi(r,o,s,l,g){return r.checkType!==o||r.extendsType!==s||r.trueType!==l||r.falseType!==g?n(dt(o,s,l,g),r):r}function Qr(r){let o=F(195);return o.typeParameter=r,o.transformFlags=1,o}function n1(r,o){return r.typeParameter!==o?n(Qr(o),r):r}function bn(r,o){let s=F(203);return s.head=r,s.templateSpans=fe(o),s.transformFlags=1,s}function r1(r,o,s){return r.head!==o||r.templateSpans!==s?n(bn(o,s),r):r}function hi(r,o,s,l,g=!1){let D=F(205);return D.argument=r,D.attributes=o,D.assertions&&D.assertions.assertClause&&D.attributes&&(D.assertions.assertClause=D.attributes),D.qualifier=s,D.typeArguments=l&&a().parenthesizeTypeArguments(l),D.isTypeOf=g,D.transformFlags=1,D}function Ts(r,o,s,l,g,D=r.isTypeOf){return r.argument!==o||r.attributes!==s||r.qualifier!==l||r.typeArguments!==g||r.isTypeOf!==D?n(hi(o,s,l,g,D),r):r}function Pn(r){let o=F(196);return o.type=r,o.transformFlags=1,o}function zt(r,o){return r.type!==o?n(Pn(o),r):r}function M(){let r=F(197);return r.transformFlags=1,r}function Bn(r,o){let s=F(198);return s.operator=r,s.type=r===148?a().parenthesizeOperandOfReadonlyTypeOperator(o):a().parenthesizeOperandOfTypeOperator(o),s.transformFlags=1,s}function sa(r,o){return r.type!==o?n(Bn(r.operator,o),r):r}function yi(r,o){let s=F(199);return s.objectType=a().parenthesizeNonArrayTypeOfPostfixType(r),s.indexType=o,s.transformFlags=1,s}function X_(r,o,s){return r.objectType!==o||r.indexType!==s?n(yi(o,s),r):r}function Ft(r,o,s,l,g,D){let H=W(200);return H.readonlyToken=r,H.typeParameter=o,H.nameType=s,H.questionToken=l,H.type=g,H.members=D&&fe(D),H.transformFlags=1,H.locals=void 0,H.nextContainer=void 0,H}function vn(r,o,s,l,g,D,H){return r.readonlyToken!==o||r.typeParameter!==s||r.nameType!==l||r.questionToken!==g||r.type!==D||r.members!==H?n(Ft(o,s,l,g,D,H),r):r}function Ra(r){let o=F(201);return o.literal=r,o.transformFlags=1,o}function _a(r,o){return r.literal!==o?n(Ra(o),r):r}function yu(r){let o=F(206);return o.elements=fe(r),o.transformFlags|=ke(o.elements)|1024|524288,o.transformFlags&32768&&(o.transformFlags|=65664),o}function i1(r,o){return r.elements!==o?n(yu(o),r):r}function ca(r){let o=F(207);return o.elements=fe(r),o.transformFlags|=ke(o.elements)|1024|524288,o}function a1(r,o){return r.elements!==o?n(ca(o),r):r}function Ss(r,o,s,l){let g=W(208);return g.dotDotDotToken=r,g.propertyName=Ke(o),g.name=Ke(s),g.initializer=Hs(l),g.transformFlags|=V(g.dotDotDotToken)|jr(g.propertyName)|jr(g.name)|V(g.initializer)|(g.dotDotDotToken?32768:0)|1024,g.flowNode=void 0,g}function ja(r,o,s,l,g){return r.propertyName!==s||r.dotDotDotToken!==o||r.name!==l||r.initializer!==g?n(Ss(o,s,l,g),r):r}function $_(r,o){let s=F(209),l=r&&Pi(r),g=fe(r,l&&Mm(l)?!0:void 0);return s.elements=a().parenthesizeExpressionsOfCommaDelimitedList(g),s.multiLine=o,s.transformFlags|=ke(s.elements),s}function gu(r,o){return r.elements!==o?n($_(o,r.multiLine),r):r}function fo(r,o){let s=W(210);return s.properties=fe(r),s.multiLine=o,s.transformFlags|=ke(s.properties),s.jsDoc=void 0,s}function o1(r,o){return r.properties!==o?n(fo(o,r.multiLine),r):r}function bu(r,o,s){let l=W(211);return l.expression=r,l.questionDotToken=o,l.name=s,l.transformFlags=V(l.expression)|V(l.questionDotToken)|(Ae(l.name)?t_(l.name):V(l.name)|536870912),l.jsDoc=void 0,l.flowNode=void 0,l}function gi(r,o){let s=bu(a().parenthesizeLeftSideOfAccess(r,!1),void 0,Ke(o));return qf(r)&&(s.transformFlags|=384),s}function vu(r,o,s){return H4(r)?Tu(r,o,r.questionDotToken,wi(s,Ae)):r.expression!==o||r.name!==s?n(gi(o,s),r):r}function Fa(r,o,s){let l=bu(a().parenthesizeLeftSideOfAccess(r,!0),o,Ke(s));return l.flags|=64,l.transformFlags|=32,l}function Tu(r,o,s,l){return I.assert(!!(r.flags&64),"Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."),r.expression!==o||r.questionDotToken!==s||r.name!==l?n(Fa(o,s,l),r):r}function xs(r,o,s){let l=W(212);return l.expression=r,l.questionDotToken=o,l.argumentExpression=s,l.transformFlags|=V(l.expression)|V(l.questionDotToken)|V(l.argumentExpression),l.jsDoc=void 0,l.flowNode=void 0,l}function Q_(r,o){let s=xs(a().parenthesizeLeftSideOfAccess(r,!1),void 0,Ti(o));return qf(r)&&(s.transformFlags|=384),s}function s1(r,o,s){return G4(r)?Su(r,o,r.questionDotToken,s):r.expression!==o||r.argumentExpression!==s?n(Q_(o,s),r):r}function Y_(r,o,s){let l=xs(a().parenthesizeLeftSideOfAccess(r,!0),o,Ti(s));return l.flags|=64,l.transformFlags|=32,l}function Su(r,o,s,l){return I.assert(!!(r.flags&64),"Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."),r.expression!==o||r.questionDotToken!==s||r.argumentExpression!==l?n(Y_(o,s,l),r):r}function xu(r,o,s,l){let g=W(213);return g.expression=r,g.questionDotToken=o,g.typeArguments=s,g.arguments=l,g.transformFlags|=V(g.expression)|V(g.questionDotToken)|ke(g.typeArguments)|ke(g.arguments),g.typeArguments&&(g.transformFlags|=1),bd(g.expression)&&(g.transformFlags|=16384),g}function ji(r,o,s){let l=xu(a().parenthesizeLeftSideOfAccess(r,!1),void 0,Ie(o),a().parenthesizeExpressionsOfCommaDelimitedList(fe(s)));return Ux(l.expression)&&(l.transformFlags|=8388608),l}function _1(r,o,s,l){return T0(r)?pr(r,o,r.questionDotToken,s,l):r.expression!==o||r.typeArguments!==s||r.arguments!==l?n(ji(o,s,l),r):r}function K_(r,o,s,l){let g=xu(a().parenthesizeLeftSideOfAccess(r,!0),o,Ie(s),a().parenthesizeExpressionsOfCommaDelimitedList(fe(l)));return g.flags|=64,g.transformFlags|=32,g}function pr(r,o,s,l,g){return I.assert(!!(r.flags&64),"Cannot update a CallExpression using updateCallChain. Use updateCall instead."),r.expression!==o||r.questionDotToken!==s||r.typeArguments!==l||r.arguments!==g?n(K_(o,s,l,g),r):r}function ws(r,o,s){let l=W(214);return l.expression=a().parenthesizeExpressionOfNew(r),l.typeArguments=Ie(o),l.arguments=s?a().parenthesizeExpressionsOfCommaDelimitedList(s):void 0,l.transformFlags|=V(l.expression)|ke(l.typeArguments)|ke(l.arguments)|32,l.typeArguments&&(l.transformFlags|=1),l}function Z_(r,o,s,l){return r.expression!==o||r.typeArguments!==s||r.arguments!==l?n(ws(o,s,l),r):r}function ec(r,o,s){let l=F(215);return l.tag=a().parenthesizeLeftSideOfAccess(r,!1),l.typeArguments=Ie(o),l.template=s,l.transformFlags|=V(l.tag)|ke(l.typeArguments)|V(l.template)|1024,l.typeArguments&&(l.transformFlags|=1),L3(l.template)&&(l.transformFlags|=128),l}function c1(r,o,s,l){return r.tag!==o||r.typeArguments!==s||r.template!==l?n(ec(o,s,l),r):r}function wu(r,o){let s=F(216);return s.expression=a().parenthesizeOperandOfPrefixUnary(o),s.type=r,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function Eu(r,o,s){return r.type!==o||r.expression!==s?n(wu(o,s),r):r}function tc(r){let o=F(217);return o.expression=r,o.transformFlags=V(o.expression),o.jsDoc=void 0,o}function Cu(r,o){return r.expression!==o?n(tc(o),r):r}function nc(r,o,s,l,g,D,H){let me=W(218);me.modifiers=Ie(r),me.asteriskToken=o,me.name=Ke(s),me.typeParameters=Ie(l),me.parameters=fe(g),me.type=D,me.body=H;let ze=hr(me.modifiers)&1024,In=!!me.asteriskToken,Si=ze&&In;return me.transformFlags=ke(me.modifiers)|V(me.asteriskToken)|jr(me.name)|ke(me.typeParameters)|ke(me.parameters)|V(me.type)|V(me.body)&-67108865|(Si?128:ze?256:In?2048:0)|(me.typeParameters||me.type?1:0)|4194304,me.typeArguments=void 0,me.jsDoc=void 0,me.locals=void 0,me.nextContainer=void 0,me.flowNode=void 0,me.endFlowNode=void 0,me.returnFlowNode=void 0,me}function Au(r,o,s,l,g,D,H,me){return r.name!==l||r.modifiers!==o||r.asteriskToken!==s||r.typeParameters!==g||r.parameters!==D||r.type!==H||r.body!==me?Se(nc(o,s,l,g,D,H,me),r):r}function rc(r,o,s,l,g,D){let H=W(219);H.modifiers=Ie(r),H.typeParameters=Ie(o),H.parameters=fe(s),H.type=l,H.equalsGreaterThanToken=g??xt(39),H.body=a().parenthesizeConciseBodyOfArrowFunction(D);let me=hr(H.modifiers)&1024;return H.transformFlags=ke(H.modifiers)|ke(H.typeParameters)|ke(H.parameters)|V(H.type)|V(H.equalsGreaterThanToken)|V(H.body)&-67108865|(H.typeParameters||H.type?1:0)|(me?16640:0)|1024,H.typeArguments=void 0,H.jsDoc=void 0,H.locals=void 0,H.nextContainer=void 0,H.flowNode=void 0,H.endFlowNode=void 0,H.returnFlowNode=void 0,H}function ku(r,o,s,l,g,D,H){return r.modifiers!==o||r.typeParameters!==s||r.parameters!==l||r.type!==g||r.equalsGreaterThanToken!==D||r.body!==H?Se(rc(o,s,l,g,D,H),r):r}function ic(r){let o=F(220);return o.expression=a().parenthesizeOperandOfPrefixUnary(r),o.transformFlags|=V(o.expression),o}function l1(r,o){return r.expression!==o?n(ic(o),r):r}function Tn(r){let o=F(221);return o.expression=a().parenthesizeOperandOfPrefixUnary(r),o.transformFlags|=V(o.expression),o}function u1(r,o){return r.expression!==o?n(Tn(o),r):r}function Or(r){let o=F(222);return o.expression=a().parenthesizeOperandOfPrefixUnary(r),o.transformFlags|=V(o.expression),o}function p1(r,o){return r.expression!==o?n(Or(o),r):r}function Fi(r){let o=F(223);return o.expression=a().parenthesizeOperandOfPrefixUnary(r),o.transformFlags|=V(o.expression)|256|128|2097152,o}function Ba(r,o){return r.expression!==o?n(Fi(o),r):r}function ac(r,o){let s=F(224);return s.operator=r,s.operand=a().parenthesizeOperandOfPrefixUnary(o),s.transformFlags|=V(s.operand),(r===46||r===47)&&Ae(s.operand)&&!va(s.operand)&&!ng(s.operand)&&(s.transformFlags|=268435456),s}function Es(r,o){return r.operand!==o?n(ac(r.operator,o),r):r}function oc(r,o){let s=F(225);return s.operator=o,s.operand=a().parenthesizeOperandOfPostfixUnary(r),s.transformFlags|=V(s.operand),Ae(s.operand)&&!va(s.operand)&&!ng(s.operand)&&(s.transformFlags|=268435456),s}function Du(r,o){return r.operand!==o?n(oc(o,r.operator),r):r}function sc(r,o,s){let l=W(226),g=Wh(o),D=g.kind;return l.left=a().parenthesizeLeftSideOfBinary(D,r),l.operatorToken=g,l.right=a().parenthesizeRightSideOfBinary(D,l.left,s),l.transformFlags|=V(l.left)|V(l.operatorToken)|V(l.right),D===61?l.transformFlags|=32:D===64?uo(l.left)?l.transformFlags|=5248|Pu(l.left):iu(l.left)&&(l.transformFlags|=5120|Pu(l.left)):D===43||D===68?l.transformFlags|=512:wm(D)&&(l.transformFlags|=16),D===103&&Vn(l.left)&&(l.transformFlags|=536870912),l.jsDoc=void 0,l}function Pu(r){return Qb(r)?65536:0}function f1(r,o,s,l){return r.left!==o||r.operatorToken!==s||r.right!==l?n(sc(o,s,l),r):r}function _c(r,o,s,l,g){let D=F(227);return D.condition=a().parenthesizeConditionOfConditionalExpression(r),D.questionToken=o??xt(58),D.whenTrue=a().parenthesizeBranchOfConditionalExpression(s),D.colonToken=l??xt(59),D.whenFalse=a().parenthesizeBranchOfConditionalExpression(g),D.transformFlags|=V(D.condition)|V(D.questionToken)|V(D.whenTrue)|V(D.colonToken)|V(D.whenFalse),D}function d1(r,o,s,l,g,D){return r.condition!==o||r.questionToken!==s||r.whenTrue!==l||r.colonToken!==g||r.whenFalse!==D?n(_c(o,s,l,g,D),r):r}function Yr(r,o){let s=F(228);return s.head=r,s.templateSpans=fe(o),s.transformFlags|=V(s.head)|ke(s.templateSpans)|1024,s}function Iu(r,o,s){return r.head!==o||r.templateSpans!==s?n(Yr(o,s),r):r}function Cs(r,o,s,l=0){I.assert(!(l&-7177),"Unsupported template flags.");let g;if(s!==void 0&&s!==o&&(g=$M(r,s),typeof g=="object"))return I.fail("Invalid raw text");if(o===void 0){if(g===void 0)return I.fail("Arguments 'text' and 'rawText' may not both be undefined.");o=g}else g!==void 0&&I.assert(o===g,"Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'.");return o}function Nu(r){let o=1024;return r&&(o|=128),o}function mo(r,o,s,l){let g=an(r);return g.text=o,g.rawText=s,g.templateFlags=l&7176,g.transformFlags=Nu(g.templateFlags),g}function cc(r,o,s,l){let g=W(r);return g.text=o,g.rawText=s,g.templateFlags=l&7176,g.transformFlags=Nu(g.templateFlags),g}function Ua(r,o,s,l){return r===15?cc(r,o,s,l):mo(r,o,s,l)}function As(r,o,s){return r=Cs(16,r,o,s),Ua(16,r,o,s)}function lc(r,o,s){return r=Cs(16,r,o,s),Ua(17,r,o,s)}function m1(r,o,s){return r=Cs(16,r,o,s),Ua(18,r,o,s)}function Ou(r,o,s){return r=Cs(16,r,o,s),cc(15,r,o,s)}function Mu(r,o){I.assert(!r||!!o,"A `YieldExpression` with an asteriskToken must have an expression.");let s=F(229);return s.expression=o&&a().parenthesizeExpressionForDisallowedComma(o),s.asteriskToken=r,s.transformFlags|=V(s.expression)|V(s.asteriskToken)|1024|128|1048576,s}function h1(r,o,s){return r.expression!==s||r.asteriskToken!==o?n(Mu(o,s),r):r}function Lu(r){let o=F(230);return o.expression=a().parenthesizeExpressionForDisallowedComma(r),o.transformFlags|=V(o.expression)|1024|32768,o}function y1(r,o){return r.expression!==o?n(Lu(o),r):r}function Ju(r,o,s,l,g){let D=W(231);return D.modifiers=Ie(r),D.name=Ke(o),D.typeParameters=Ie(s),D.heritageClauses=Ie(l),D.members=fe(g),D.transformFlags|=ke(D.modifiers)|jr(D.name)|ke(D.typeParameters)|ke(D.heritageClauses)|ke(D.members)|(D.typeParameters?1:0)|1024,D.jsDoc=void 0,D}function ho(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.typeParameters!==l||r.heritageClauses!==g||r.members!==D?n(Ju(o,s,l,g,D),r):r}function g1(){return F(232)}function Ru(r,o){let s=F(233);return s.expression=a().parenthesizeLeftSideOfAccess(r,!1),s.typeArguments=o&&a().parenthesizeTypeArguments(o),s.transformFlags|=V(s.expression)|ke(s.typeArguments)|1024,s}function fr(r,o,s){return r.expression!==o||r.typeArguments!==s?n(Ru(o,s),r):r}function ks(r,o){let s=F(234);return s.expression=r,s.type=o,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function ju(r,o,s){return r.expression!==o||r.type!==s?n(ks(o,s),r):r}function Fu(r){let o=F(235);return o.expression=a().parenthesizeLeftSideOfAccess(r,!1),o.transformFlags|=V(o.expression)|1,o}function uc(r,o){return $4(r)?Uu(r,o):r.expression!==o?n(Fu(o),r):r}function Bu(r,o){let s=F(238);return s.expression=r,s.type=o,s.transformFlags|=V(s.expression)|V(s.type)|1,s}function pc(r,o,s){return r.expression!==o||r.type!==s?n(Bu(o,s),r):r}function Mr(r){let o=F(235);return o.flags|=64,o.expression=a().parenthesizeLeftSideOfAccess(r,!0),o.transformFlags|=V(o.expression)|1,o}function Uu(r,o){return I.assert(!!(r.flags&64),"Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."),r.expression!==o?n(Mr(o),r):r}function Ds(r,o){let s=F(236);switch(s.keywordToken=r,s.name=o,s.transformFlags|=V(s.name),r){case 105:s.transformFlags|=1024;break;case 102:s.transformFlags|=32;break;default:return I.assertNever(r)}return s.flowNode=void 0,s}function bi(r,o){return r.name!==o?n(Ds(r.keywordToken,o),r):r}function yo(r,o){let s=F(239);return s.expression=r,s.literal=o,s.transformFlags|=V(s.expression)|V(s.literal)|1024,s}function qu(r,o,s){return r.expression!==o||r.literal!==s?n(yo(o,s),r):r}function zu(){let r=F(240);return r.transformFlags|=1024,r}function qa(r,o){let s=F(241);return s.statements=fe(r),s.multiLine=o,s.transformFlags|=ke(s.statements),s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s}function Wu(r,o){return r.statements!==o?n(qa(o,r.multiLine),r):r}function Vu(r,o){let s=F(243);return s.modifiers=Ie(r),s.declarationList=$t(o)?bc(o):o,s.transformFlags|=ke(s.modifiers)|V(s.declarationList),hr(s.modifiers)&128&&(s.transformFlags=1),s.jsDoc=void 0,s.flowNode=void 0,s}function Hu(r,o,s){return r.modifiers!==o||r.declarationList!==s?n(Vu(o,s),r):r}function fc(){let r=F(242);return r.jsDoc=void 0,r}function go(r){let o=F(244);return o.expression=a().parenthesizeExpressionOfExpressionStatement(r),o.transformFlags|=V(o.expression),o.jsDoc=void 0,o.flowNode=void 0,o}function b1(r,o){return r.expression!==o?n(go(o),r):r}function dc(r,o,s){let l=F(245);return l.expression=r,l.thenStatement=tr(o),l.elseStatement=tr(s),l.transformFlags|=V(l.expression)|V(l.thenStatement)|V(l.elseStatement),l.jsDoc=void 0,l.flowNode=void 0,l}function v1(r,o,s,l){return r.expression!==o||r.thenStatement!==s||r.elseStatement!==l?n(dc(o,s,l),r):r}function mc(r,o){let s=F(246);return s.statement=tr(r),s.expression=o,s.transformFlags|=V(s.statement)|V(s.expression),s.jsDoc=void 0,s.flowNode=void 0,s}function T1(r,o,s){return r.statement!==o||r.expression!==s?n(mc(o,s),r):r}function Gu(r,o){let s=F(247);return s.expression=r,s.statement=tr(o),s.transformFlags|=V(s.expression)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function S1(r,o,s){return r.expression!==o||r.statement!==s?n(Gu(o,s),r):r}function hc(r,o,s,l){let g=F(248);return g.initializer=r,g.condition=o,g.incrementor=s,g.statement=tr(l),g.transformFlags|=V(g.initializer)|V(g.condition)|V(g.incrementor)|V(g.statement),g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g}function Xu(r,o,s,l,g){return r.initializer!==o||r.condition!==s||r.incrementor!==l||r.statement!==g?n(hc(o,s,l,g),r):r}function $u(r,o,s){let l=F(249);return l.initializer=r,l.expression=o,l.statement=tr(s),l.transformFlags|=V(l.initializer)|V(l.expression)|V(l.statement),l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l.flowNode=void 0,l}function x1(r,o,s,l){return r.initializer!==o||r.expression!==s||r.statement!==l?n($u(o,s,l),r):r}function Qu(r,o,s,l){let g=F(250);return g.awaitModifier=r,g.initializer=o,g.expression=a().parenthesizeExpressionForDisallowedComma(s),g.statement=tr(l),g.transformFlags|=V(g.awaitModifier)|V(g.initializer)|V(g.expression)|V(g.statement)|1024,r&&(g.transformFlags|=128),g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g.flowNode=void 0,g}function w1(r,o,s,l,g){return r.awaitModifier!==o||r.initializer!==s||r.expression!==l||r.statement!==g?n(Qu(o,s,l,g),r):r}function Yu(r){let o=F(251);return o.label=Ke(r),o.transformFlags|=V(o.label)|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function Ku(r,o){return r.label!==o?n(Yu(o),r):r}function yc(r){let o=F(252);return o.label=Ke(r),o.transformFlags|=V(o.label)|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function Zu(r,o){return r.label!==o?n(yc(o),r):r}function ep(r){let o=F(253);return o.expression=r,o.transformFlags|=V(o.expression)|128|4194304,o.jsDoc=void 0,o.flowNode=void 0,o}function tp(r,o){return r.expression!==o?n(ep(o),r):r}function gc(r,o){let s=F(254);return s.expression=r,s.statement=tr(o),s.transformFlags|=V(s.expression)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function np(r,o,s){return r.expression!==o||r.statement!==s?n(gc(o,s),r):r}function la(r,o){let s=F(255);return s.expression=a().parenthesizeExpressionForDisallowedComma(r),s.caseBlock=o,s.transformFlags|=V(s.expression)|V(s.caseBlock),s.jsDoc=void 0,s.flowNode=void 0,s.possiblyExhaustive=!1,s}function E1(r,o,s){return r.expression!==o||r.caseBlock!==s?n(la(o,s),r):r}function rp(r,o){let s=F(256);return s.label=Ke(r),s.statement=tr(o),s.transformFlags|=V(s.label)|V(s.statement),s.jsDoc=void 0,s.flowNode=void 0,s}function ip(r,o,s){return r.label!==o||r.statement!==s?n(rp(o,s),r):r}function ap(r){let o=F(257);return o.expression=r,o.transformFlags|=V(o.expression),o.jsDoc=void 0,o.flowNode=void 0,o}function C1(r,o){return r.expression!==o?n(ap(o),r):r}function op(r,o,s){let l=F(258);return l.tryBlock=r,l.catchClause=o,l.finallyBlock=s,l.transformFlags|=V(l.tryBlock)|V(l.catchClause)|V(l.finallyBlock),l.jsDoc=void 0,l.flowNode=void 0,l}function sp(r,o,s,l){return r.tryBlock!==o||r.catchClause!==s||r.finallyBlock!==l?n(op(o,s,l),r):r}function _p(){let r=F(259);return r.jsDoc=void 0,r.flowNode=void 0,r}function Ps(r,o,s,l){let g=W(260);return g.name=Ke(r),g.exclamationToken=o,g.type=s,g.initializer=Hs(l),g.transformFlags|=jr(g.name)|V(g.initializer)|(g.exclamationToken??g.type?1:0),g.jsDoc=void 0,g}function A1(r,o,s,l,g){return r.name!==o||r.type!==l||r.exclamationToken!==s||r.initializer!==g?n(Ps(o,s,l,g),r):r}function bc(r,o=0){let s=F(261);return s.flags|=o&7,s.declarations=fe(r),s.transformFlags|=ke(s.declarations)|4194304,o&7&&(s.transformFlags|=263168),o&4&&(s.transformFlags|=4),s}function k1(r,o){return r.declarations!==o?n(bc(o,r.flags),r):r}function vc(r,o,s,l,g,D,H){let me=W(262);if(me.modifiers=Ie(r),me.asteriskToken=o,me.name=Ke(s),me.typeParameters=Ie(l),me.parameters=fe(g),me.type=D,me.body=H,!me.body||hr(me.modifiers)&128)me.transformFlags=1;else{let ze=hr(me.modifiers)&1024,In=!!me.asteriskToken,Si=ze&&In;me.transformFlags=ke(me.modifiers)|V(me.asteriskToken)|jr(me.name)|ke(me.typeParameters)|ke(me.parameters)|V(me.type)|V(me.body)&-67108865|(Si?128:ze?256:In?2048:0)|(me.typeParameters||me.type?1:0)|4194304}return me.typeArguments=void 0,me.jsDoc=void 0,me.locals=void 0,me.nextContainer=void 0,me.endFlowNode=void 0,me.returnFlowNode=void 0,me}function cp(r,o,s,l,g,D,H,me){return r.modifiers!==o||r.asteriskToken!==s||r.name!==l||r.typeParameters!==g||r.parameters!==D||r.type!==H||r.body!==me?D1(vc(o,s,l,g,D,H,me),r):r}function D1(r,o){return r!==o&&r.modifiers===o.modifiers&&(r.modifiers=o.modifiers),Se(r,o)}function Tc(r,o,s,l,g){let D=W(263);return D.modifiers=Ie(r),D.name=Ke(o),D.typeParameters=Ie(s),D.heritageClauses=Ie(l),D.members=fe(g),hr(D.modifiers)&128?D.transformFlags=1:(D.transformFlags|=ke(D.modifiers)|jr(D.name)|ke(D.typeParameters)|ke(D.heritageClauses)|ke(D.members)|(D.typeParameters?1:0)|1024,D.transformFlags&8192&&(D.transformFlags|=1)),D.jsDoc=void 0,D}function Sc(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.typeParameters!==l||r.heritageClauses!==g||r.members!==D?n(Tc(o,s,l,g,D),r):r}function lp(r,o,s,l,g){let D=W(264);return D.modifiers=Ie(r),D.name=Ke(o),D.typeParameters=Ie(s),D.heritageClauses=Ie(l),D.members=fe(g),D.transformFlags=1,D.jsDoc=void 0,D}function gt(r,o,s,l,g,D){return r.modifiers!==o||r.name!==s||r.typeParameters!==l||r.heritageClauses!==g||r.members!==D?n(lp(o,s,l,g,D),r):r}function Bi(r,o,s,l){let g=W(265);return g.modifiers=Ie(r),g.name=Ke(o),g.typeParameters=Ie(s),g.type=l,g.transformFlags=1,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g}function xc(r,o,s,l,g){return r.modifiers!==o||r.name!==s||r.typeParameters!==l||r.type!==g?n(Bi(o,s,l,g),r):r}function Ui(r,o,s){let l=W(266);return l.modifiers=Ie(r),l.name=Ke(o),l.members=fe(s),l.transformFlags|=ke(l.modifiers)|V(l.name)|ke(l.members)|1,l.transformFlags&=-67108865,l.jsDoc=void 0,l}function up(r,o,s,l){return r.modifiers!==o||r.name!==s||r.members!==l?n(Ui(o,s,l),r):r}function Bt(r,o,s,l=0){let g=W(267);return g.modifiers=Ie(r),g.flags|=l&2088,g.name=o,g.body=s,hr(g.modifiers)&128?g.transformFlags=1:g.transformFlags|=ke(g.modifiers)|V(g.name)|V(g.body)|1,g.transformFlags&=-67108865,g.jsDoc=void 0,g.locals=void 0,g.nextContainer=void 0,g}function qi(r,o,s,l){return r.modifiers!==o||r.name!==s||r.body!==l?n(Bt(o,s,l,r.flags),r):r}function on(r){let o=F(268);return o.statements=fe(r),o.transformFlags|=ke(o.statements),o.jsDoc=void 0,o}function P1(r,o){return r.statements!==o?n(on(o),r):r}function pp(r){let o=F(269);return o.clauses=fe(r),o.transformFlags|=ke(o.clauses),o.locals=void 0,o.nextContainer=void 0,o}function I1(r,o){return r.clauses!==o?n(pp(o),r):r}function wc(r){let o=W(270);return o.name=Ke(r),o.transformFlags|=t_(o.name)|1,o.modifiers=void 0,o.jsDoc=void 0,o}function N1(r,o){return r.name!==o?O1(wc(o),r):r}function O1(r,o){return r!==o&&(r.modifiers=o.modifiers),n(r,o)}function fp(r,o,s,l){let g=W(271);return g.modifiers=Ie(r),g.name=Ke(s),g.isTypeOnly=o,g.moduleReference=l,g.transformFlags|=ke(g.modifiers)|t_(g.name)|V(g.moduleReference),Jm(g.moduleReference)||(g.transformFlags|=1),g.transformFlags&=-67108865,g.jsDoc=void 0,g}function dp(r,o,s,l,g){return r.modifiers!==o||r.isTypeOnly!==s||r.name!==l||r.moduleReference!==g?n(fp(o,s,l,g),r):r}function mp(r,o,s,l){let g=F(272);return g.modifiers=Ie(r),g.importClause=o,g.moduleSpecifier=s,g.attributes=g.assertClause=l,g.transformFlags|=V(g.importClause)|V(g.moduleSpecifier),g.transformFlags&=-67108865,g.jsDoc=void 0,g}function hp(r,o,s,l,g){return r.modifiers!==o||r.importClause!==s||r.moduleSpecifier!==l||r.attributes!==g?n(mp(o,s,l,g),r):r}function Ec(r,o,s){let l=W(273);return l.isTypeOnly=r,l.name=o,l.namedBindings=s,l.transformFlags|=V(l.name)|V(l.namedBindings),r&&(l.transformFlags|=1),l.transformFlags&=-67108865,l}function yp(r,o,s,l){return r.isTypeOnly!==o||r.name!==s||r.namedBindings!==l?n(Ec(o,s,l),r):r}function gp(r,o){let s=F(300);return s.elements=fe(r),s.multiLine=o,s.token=132,s.transformFlags|=4,s}function Is(r,o,s){return r.elements!==o||r.multiLine!==s?n(gp(o,s),r):r}function Cc(r,o){let s=F(301);return s.name=r,s.value=o,s.transformFlags|=4,s}function bp(r,o,s){return r.name!==o||r.value!==s?n(Cc(o,s),r):r}function Ac(r,o){let s=F(302);return s.assertClause=r,s.multiLine=o,s}function M1(r,o,s){return r.assertClause!==o||r.multiLine!==s?n(Ac(o,s),r):r}function Ns(r,o,s){let l=F(300);return l.token=s??118,l.elements=fe(r),l.multiLine=o,l.transformFlags|=4,l}function L1(r,o,s){return r.elements!==o||r.multiLine!==s?n(Ns(o,s,r.token),r):r}function kc(r,o){let s=F(301);return s.name=r,s.value=o,s.transformFlags|=4,s}function J1(r,o,s){return r.name!==o||r.value!==s?n(kc(o,s),r):r}function vp(r){let o=W(274);return o.name=r,o.transformFlags|=V(o.name),o.transformFlags&=-67108865,o}function R1(r,o){return r.name!==o?n(vp(o),r):r}function Tp(r){let o=W(280);return o.name=r,o.transformFlags|=V(o.name)|32,o.transformFlags&=-67108865,o}function j1(r,o){return r.name!==o?n(Tp(o),r):r}function Dc(r){let o=F(275);return o.elements=fe(r),o.transformFlags|=ke(o.elements),o.transformFlags&=-67108865,o}function ua(r,o){return r.elements!==o?n(Dc(o),r):r}function Sp(r,o,s){let l=W(276);return l.isTypeOnly=r,l.propertyName=o,l.name=s,l.transformFlags|=V(l.propertyName)|V(l.name),l.transformFlags&=-67108865,l}function xp(r,o,s,l){return r.isTypeOnly!==o||r.propertyName!==s||r.name!==l?n(Sp(o,s,l),r):r}function za(r,o,s){let l=W(277);return l.modifiers=Ie(r),l.isExportEquals=o,l.expression=o?a().parenthesizeRightSideOfBinary(64,void 0,s):a().parenthesizeExpressionOfExportDefault(s),l.transformFlags|=ke(l.modifiers)|V(l.expression),l.transformFlags&=-67108865,l.jsDoc=void 0,l}function Pc(r,o,s){return r.modifiers!==o||r.expression!==s?n(za(o,r.isExportEquals,s),r):r}function Ic(r,o,s,l,g){let D=W(278);return D.modifiers=Ie(r),D.isTypeOnly=o,D.exportClause=s,D.moduleSpecifier=l,D.attributes=D.assertClause=g,D.transformFlags|=ke(D.modifiers)|V(D.exportClause)|V(D.moduleSpecifier),D.transformFlags&=-67108865,D.jsDoc=void 0,D}function Wa(r,o,s,l,g,D){return r.modifiers!==o||r.isTypeOnly!==s||r.exportClause!==l||r.moduleSpecifier!==g||r.attributes!==D?F1(Ic(o,s,l,g,D),r):r}function F1(r,o){return r!==o&&r.modifiers===o.modifiers&&(r.modifiers=o.modifiers),n(r,o)}function Nc(r){let o=F(279);return o.elements=fe(r),o.transformFlags|=ke(o.elements),o.transformFlags&=-67108865,o}function wp(r,o){return r.elements!==o?n(Nc(o),r):r}function Oc(r,o,s){let l=F(281);return l.isTypeOnly=r,l.propertyName=Ke(o),l.name=Ke(s),l.transformFlags|=V(l.propertyName)|V(l.name),l.transformFlags&=-67108865,l.jsDoc=void 0,l}function B1(r,o,s,l){return r.isTypeOnly!==o||r.propertyName!==s||r.name!==l?n(Oc(o,s,l),r):r}function Ep(){let r=W(282);return r.jsDoc=void 0,r}function Cp(r){let o=F(283);return o.expression=r,o.transformFlags|=V(o.expression),o.transformFlags&=-67108865,o}function Ap(r,o){return r.expression!==o?n(Cp(o),r):r}function U1(r){return F(r)}function kp(r,o,s=!1){let l=Mc(r,s?o&&a().parenthesizeNonArrayTypeOfPostfixType(o):o);return l.postfix=s,l}function Mc(r,o){let s=F(r);return s.type=o,s}function q1(r,o,s){return o.type!==s?n(kp(r,s,o.postfix),o):o}function z1(r,o,s){return o.type!==s?n(Mc(r,s),o):o}function Dp(r,o){let s=W(324);return s.parameters=Ie(r),s.type=o,s.transformFlags=ke(s.parameters)|(s.type?1:0),s.jsDoc=void 0,s.locals=void 0,s.nextContainer=void 0,s.typeArguments=void 0,s}function W1(r,o,s){return r.parameters!==o||r.type!==s?n(Dp(o,s),r):r}function Pp(r,o=!1){let s=W(329);return s.jsDocPropertyTags=Ie(r),s.isArrayType=o,s}function V1(r,o,s){return r.jsDocPropertyTags!==o||r.isArrayType!==s?n(Pp(o,s),r):r}function Os(r){let o=F(316);return o.type=r,o}function H1(r,o){return r.type!==o?n(Os(o),r):r}function Ip(r,o,s){let l=W(330);return l.typeParameters=Ie(r),l.parameters=fe(o),l.type=s,l.jsDoc=void 0,l.locals=void 0,l.nextContainer=void 0,l}function Ms(r,o,s,l){return r.typeParameters!==o||r.parameters!==s||r.type!==l?n(Ip(o,s,l),r):r}function Un(r){let o=kf(r.kind);return r.tagName.escapedText===qr(o)?r.tagName:He(o)}function Kr(r,o,s){let l=F(r);return l.tagName=o,l.comment=s,l}function Va(r,o,s){let l=W(r);return l.tagName=o,l.comment=s,l}function Lc(r,o,s,l){let g=Kr(352,r??He("template"),l);return g.constraint=o,g.typeParameters=fe(s),g}function Jc(r,o=Un(r),s,l,g){return r.tagName!==o||r.constraint!==s||r.typeParameters!==l||r.comment!==g?n(Lc(o,s,l,g),r):r}function Np(r,o,s,l){let g=Va(353,r??He("typedef"),l);return g.typeExpression=o,g.fullName=s,g.name=rg(s),g.locals=void 0,g.nextContainer=void 0,g}function Op(r,o=Un(r),s,l,g){return r.tagName!==o||r.typeExpression!==s||r.fullName!==l||r.comment!==g?n(Np(o,s,l,g),r):r}function Mp(r,o,s,l,g,D){let H=Va(348,r??He("param"),D);return H.typeExpression=l,H.name=o,H.isNameFirst=!!g,H.isBracketed=s,H}function G1(r,o=Un(r),s,l,g,D,H){return r.tagName!==o||r.name!==s||r.isBracketed!==l||r.typeExpression!==g||r.isNameFirst!==D||r.comment!==H?n(Mp(o,s,l,g,D,H),r):r}function Rc(r,o,s,l,g,D){let H=Va(355,r??He("prop"),D);return H.typeExpression=l,H.name=o,H.isNameFirst=!!g,H.isBracketed=s,H}function X1(r,o=Un(r),s,l,g,D,H){return r.tagName!==o||r.name!==s||r.isBracketed!==l||r.typeExpression!==g||r.isNameFirst!==D||r.comment!==H?n(Rc(o,s,l,g,D,H),r):r}function jc(r,o,s,l){let g=Va(345,r??He("callback"),l);return g.typeExpression=o,g.fullName=s,g.name=rg(s),g.locals=void 0,g.nextContainer=void 0,g}function $1(r,o=Un(r),s,l,g){return r.tagName!==o||r.typeExpression!==s||r.fullName!==l||r.comment!==g?n(jc(o,s,l,g),r):r}function Ls(r,o,s){let l=Kr(346,r??He("overload"),s);return l.typeExpression=o,l}function Lp(r,o=Un(r),s,l){return r.tagName!==o||r.typeExpression!==s||r.comment!==l?n(Ls(o,s,l),r):r}function Ha(r,o,s){let l=Kr(335,r??He("augments"),s);return l.class=o,l}function Q1(r,o=Un(r),s,l){return r.tagName!==o||r.class!==s||r.comment!==l?n(Ha(o,s,l),r):r}function pa(r,o,s){let l=Kr(336,r??He("implements"),s);return l.class=o,l}function bo(r,o,s){let l=Kr(354,r??He("see"),s);return l.name=o,l}function Y1(r,o,s,l){return r.tagName!==o||r.name!==s||r.comment!==l?n(bo(o,s,l),r):r}function Jp(r){let o=F(317);return o.name=r,o}function K1(r,o){return r.name!==o?n(Jp(o),r):r}function Rp(r,o){let s=F(318);return s.left=r,s.right=o,s.transformFlags|=V(s.left)|V(s.right),s}function Z1(r,o,s){return r.left!==o||r.right!==s?n(Rp(o,s),r):r}function Fc(r,o){let s=F(331);return s.name=r,s.text=o,s}function eh(r,o,s){return r.name!==o?n(Fc(o,s),r):r}function jp(r,o){let s=F(332);return s.name=r,s.text=o,s}function th(r,o,s){return r.name!==o?n(jp(o,s),r):r}function Fp(r,o){let s=F(333);return s.name=r,s.text=o,s}function nh(r,o,s){return r.name!==o?n(Fp(o,s),r):r}function rh(r,o=Un(r),s,l){return r.tagName!==o||r.class!==s||r.comment!==l?n(pa(o,s,l),r):r}function Bp(r,o,s){return Kr(r,o??He(kf(r)),s)}function ih(r,o,s=Un(o),l){return o.tagName!==s||o.comment!==l?n(Bp(r,s,l),o):o}function Up(r,o,s,l){let g=Kr(r,o??He(kf(r)),l);return g.typeExpression=s,g}function ah(r,o,s=Un(o),l,g){return o.tagName!==s||o.typeExpression!==l||o.comment!==g?n(Up(r,s,l,g),o):o}function qp(r,o){return Kr(334,r,o)}function oh(r,o,s){return r.tagName!==o||r.comment!==s?n(qp(o,s),r):r}function Js(r,o,s){let l=Va(347,r??He(kf(347)),s);return l.typeExpression=o,l.locals=void 0,l.nextContainer=void 0,l}function sh(r,o=Un(r),s,l){return r.tagName!==o||r.typeExpression!==s||r.comment!==l?n(Js(o,s,l),r):r}function Bc(r){let o=F(328);return o.text=r,o}function zp(r,o){return r.text!==o?n(Bc(o),r):r}function Wp(r,o){let s=F(327);return s.comment=r,s.tags=Ie(o),s}function Rs(r,o,s){return r.comment!==o||r.tags!==s?n(Wp(o,s),r):r}function Uc(r,o,s){let l=F(284);return l.openingElement=r,l.children=fe(o),l.closingElement=s,l.transformFlags|=V(l.openingElement)|ke(l.children)|V(l.closingElement)|2,l}function _h(r,o,s,l){return r.openingElement!==o||r.children!==s||r.closingElement!==l?n(Uc(o,s,l),r):r}function Vp(r,o,s){let l=F(285);return l.tagName=r,l.typeArguments=Ie(o),l.attributes=s,l.transformFlags|=V(l.tagName)|ke(l.typeArguments)|V(l.attributes)|2,l.typeArguments&&(l.transformFlags|=1),l}function ch(r,o,s,l){return r.tagName!==o||r.typeArguments!==s||r.attributes!==l?n(Vp(o,s,l),r):r}function js(r,o,s){let l=F(286);return l.tagName=r,l.typeArguments=Ie(o),l.attributes=s,l.transformFlags|=V(l.tagName)|ke(l.typeArguments)|V(l.attributes)|2,o&&(l.transformFlags|=1),l}function Hp(r,o,s,l){return r.tagName!==o||r.typeArguments!==s||r.attributes!==l?n(js(o,s,l),r):r}function qc(r){let o=F(287);return o.tagName=r,o.transformFlags|=V(o.tagName)|2,o}function zc(r,o){return r.tagName!==o?n(qc(o),r):r}function Sn(r,o,s){let l=F(288);return l.openingFragment=r,l.children=fe(o),l.closingFragment=s,l.transformFlags|=V(l.openingFragment)|ke(l.children)|V(l.closingFragment)|2,l}function Gp(r,o,s,l){return r.openingFragment!==o||r.children!==s||r.closingFragment!==l?n(Sn(o,s,l),r):r}function vo(r,o){let s=F(12);return s.text=r,s.containsOnlyTriviaWhiteSpaces=!!o,s.transformFlags|=2,s}function lh(r,o,s){return r.text!==o||r.containsOnlyTriviaWhiteSpaces!==s?n(vo(o,s),r):r}function Xp(){let r=F(289);return r.transformFlags|=2,r}function uh(){let r=F(290);return r.transformFlags|=2,r}function $p(r,o){let s=W(291);return s.name=r,s.initializer=o,s.transformFlags|=V(s.name)|V(s.initializer)|2,s}function Fs(r,o,s){return r.name!==o||r.initializer!==s?n($p(o,s),r):r}function Qp(r){let o=W(292);return o.properties=fe(r),o.transformFlags|=ke(o.properties)|2,o}function ph(r,o){return r.properties!==o?n(Qp(o),r):r}function Yp(r){let o=F(293);return o.expression=r,o.transformFlags|=V(o.expression)|2,o}function fh(r,o){return r.expression!==o?n(Yp(o),r):r}function Bs(r,o){let s=F(294);return s.dotDotDotToken=r,s.expression=o,s.transformFlags|=V(s.dotDotDotToken)|V(s.expression)|2,s}function To(r,o){return r.expression!==o?n(Bs(r.dotDotDotToken,o),r):r}function Kp(r,o){let s=F(295);return s.namespace=r,s.name=o,s.transformFlags|=V(s.namespace)|V(s.name)|2,s}function Wc(r,o,s){return r.namespace!==o||r.name!==s?n(Kp(o,s),r):r}function Vc(r,o){let s=F(296);return s.expression=a().parenthesizeExpressionForDisallowedComma(r),s.statements=fe(o),s.transformFlags|=V(s.expression)|ke(s.statements),s.jsDoc=void 0,s}function dh(r,o,s){return r.expression!==o||r.statements!==s?n(Vc(o,s),r):r}function Ga(r){let o=F(297);return o.statements=fe(r),o.transformFlags=ke(o.statements),o}function Zp(r,o){return r.statements!==o?n(Ga(o),r):r}function ef(r,o){let s=F(298);switch(s.token=r,s.types=fe(o),s.transformFlags|=ke(s.types),r){case 96:s.transformFlags|=1024;break;case 119:s.transformFlags|=1;break;default:return I.assertNever(r)}return s}function mh(r,o){return r.types!==o?n(ef(r.token,o),r):r}function Hc(r,o){let s=F(299);return s.variableDeclaration=Vh(r),s.block=o,s.transformFlags|=V(s.variableDeclaration)|V(s.block)|(r?0:64),s.locals=void 0,s.nextContainer=void 0,s}function tf(r,o,s){return r.variableDeclaration!==o||r.block!==s?n(Hc(o,s),r):r}function Us(r,o){let s=W(303);return s.name=Ke(r),s.initializer=a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=jr(s.name)|V(s.initializer),s.modifiers=void 0,s.questionToken=void 0,s.exclamationToken=void 0,s.jsDoc=void 0,s}function fa(r,o,s){return r.name!==o||r.initializer!==s?hh(Us(o,s),r):r}function hh(r,o){return r!==o&&(r.modifiers=o.modifiers,r.questionToken=o.questionToken,r.exclamationToken=o.exclamationToken),n(r,o)}function nf(r,o){let s=W(304);return s.name=Ke(r),s.objectAssignmentInitializer=o&&a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=t_(s.name)|V(s.objectAssignmentInitializer)|1024,s.equalsToken=void 0,s.modifiers=void 0,s.questionToken=void 0,s.exclamationToken=void 0,s.jsDoc=void 0,s}function yh(r,o,s){return r.name!==o||r.objectAssignmentInitializer!==s?gh(nf(o,s),r):r}function gh(r,o){return r!==o&&(r.modifiers=o.modifiers,r.questionToken=o.questionToken,r.exclamationToken=o.exclamationToken,r.equalsToken=o.equalsToken),n(r,o)}function Gc(r){let o=W(305);return o.expression=a().parenthesizeExpressionForDisallowedComma(r),o.transformFlags|=V(o.expression)|128|65536,o.jsDoc=void 0,o}function rf(r,o){return r.expression!==o?n(Gc(o),r):r}function Lr(r,o){let s=W(306);return s.name=Ke(r),s.initializer=o&&a().parenthesizeExpressionForDisallowedComma(o),s.transformFlags|=V(s.name)|V(s.initializer)|1,s.jsDoc=void 0,s}function af(r,o,s){return r.name!==o||r.initializer!==s?n(Lr(o,s),r):r}function bh(r,o,s){let l=t.createBaseSourceFileNode(312);return l.statements=fe(r),l.endOfFileToken=o,l.flags|=s,l.text="",l.fileName="",l.path="",l.resolvedPath="",l.originalFileName="",l.languageVersion=0,l.languageVariant=0,l.scriptKind=0,l.isDeclarationFile=!1,l.hasNoDefaultLib=!1,l.transformFlags|=ke(l.statements)|V(l.endOfFileToken),l.locals=void 0,l.nextContainer=void 0,l.endFlowNode=void 0,l.nodeCount=0,l.identifierCount=0,l.symbolCount=0,l.parseDiagnostics=void 0,l.bindDiagnostics=void 0,l.bindSuggestionDiagnostics=void 0,l.lineMap=void 0,l.externalModuleIndicator=void 0,l.setExternalModuleIndicator=void 0,l.pragmas=void 0,l.checkJsDirective=void 0,l.referencedFiles=void 0,l.typeReferenceDirectives=void 0,l.libReferenceDirectives=void 0,l.amdDependencies=void 0,l.commentDirectives=void 0,l.identifiers=void 0,l.packageJsonLocations=void 0,l.packageJsonScope=void 0,l.imports=void 0,l.moduleAugmentations=void 0,l.ambientModuleNames=void 0,l.classifiableNames=void 0,l.impliedNodeFormat=void 0,l}function of(r){let o=Object.create(r.redirectTarget);return Object.defineProperties(o,{id:{get(){return this.redirectInfo.redirectTarget.id},set(s){this.redirectInfo.redirectTarget.id=s}},symbol:{get(){return this.redirectInfo.redirectTarget.symbol},set(s){this.redirectInfo.redirectTarget.symbol=s}}}),o.redirectInfo=r,o}function vh(r){let o=of(r.redirectInfo);return o.flags|=r.flags&-17,o.fileName=r.fileName,o.path=r.path,o.resolvedPath=r.resolvedPath,o.originalFileName=r.originalFileName,o.packageJsonLocations=r.packageJsonLocations,o.packageJsonScope=r.packageJsonScope,o.emitNode=void 0,o}function sf(r){let o=t.createBaseSourceFileNode(312);o.flags|=r.flags&-17;for(let s in r)if(!(Wn(o,s)||!Wn(r,s))){if(s==="emitNode"){o.emitNode=void 0;continue}o[s]=r[s]}return o}function qs(r){let o=r.redirectInfo?vh(r):sf(r);return nr(o,r),o}function Th(r,o,s,l,g,D,H){let me=qs(r);return me.statements=fe(o),me.isDeclarationFile=s,me.referencedFiles=l,me.typeReferenceDirectives=g,me.hasNoDefaultLib=D,me.libReferenceDirectives=H,me.transformFlags=ke(me.statements)|V(me.endOfFileToken),me}function Sh(r,o,s=r.isDeclarationFile,l=r.referencedFiles,g=r.typeReferenceDirectives,D=r.hasNoDefaultLib,H=r.libReferenceDirectives){return r.statements!==o||r.isDeclarationFile!==s||r.referencedFiles!==l||r.typeReferenceDirectives!==g||r.hasNoDefaultLib!==D||r.libReferenceDirectives!==H?n(Th(r,o,s,l,g,D,H),r):r}function Xc(r,o=Je){let s=F(313);return s.prepends=o,s.sourceFiles=r,s.syntheticFileReferences=void 0,s.syntheticTypeReferences=void 0,s.syntheticLibReferences=void 0,s.hasNoDefaultLib=void 0,s}function xh(r,o,s=Je){return r.sourceFiles!==o||r.prepends!==s?n(Xc(o,s),r):r}function wh(r,o,s){let l=F(314);return l.prologues=r,l.syntheticReferences=o,l.texts=s,l.fileName="",l.text="",l.referencedFiles=Je,l.libReferenceDirectives=Je,l.getLineAndCharacterOfPosition=g=>no(l,g),l}function Xa(r,o){let s=F(r);return s.data=o,s}function _f(r){return Xa(307,r)}function Eh(r,o){let s=Xa(308,r);return s.texts=o,s}function Ch(r,o){return Xa(o?310:309,r)}function Ah(r){let o=F(311);return o.data=r.data,o.section=r,o}function kh(){let r=F(315);return r.javascriptText="",r.declarationText="",r}function Dh(r,o=!1,s){let l=F(237);return l.type=r,l.isSpread=o,l.tupleNameSource=s,l}function cf(r){let o=F(358);return o._children=r,o}function lf(r){let o=F(359);return o.original=r,We(o,r),o}function $c(r,o){let s=F(360);return s.expression=r,s.original=o,s.transformFlags|=V(s.expression)|1,We(s,o),s}function uf(r,o){return r.expression!==o?n($c(o,r.original),r):r}function Ph(r){if(ya(r)&&!xl(r)&&!r.original&&!r.emitNode&&!r.id){if(j_(r))return r.elements;if(At(r)&&jx(r.operatorToken))return[r.left,r.right]}return r}function zs(r){let o=F(361);return o.elements=fe(hv(r,Ph)),o.transformFlags|=ke(o.elements),o}function pf(r,o){return r.elements!==o?n(zs(o),r):r}function ff(r,o){let s=F(362);return s.expression=r,s.thisArg=o,s.transformFlags|=V(s.expression)|V(s.thisArg),s}function Ih(r,o,s){return r.expression!==o||r.thisArg!==s?n(ff(o,s),r):r}function Nh(r){let o=gn(r.escapedText);return o.flags|=r.flags&-17,o.transformFlags=r.transformFlags,nr(o,r),setIdentifierAutoGenerate(o,{...r.emitNode.autoGenerate}),o}function Oh(r){let o=gn(r.escapedText);o.flags|=r.flags&-17,o.jsDoc=r.jsDoc,o.flowNode=r.flowNode,o.symbol=r.symbol,o.transformFlags=r.transformFlags,nr(o,r);let s=getIdentifierTypeArguments(r);return s&&setIdentifierTypeArguments(o,s),o}function Qc(r){let o=Ar(r.escapedText);return o.flags|=r.flags&-17,o.transformFlags=r.transformFlags,nr(o,r),setIdentifierAutoGenerate(o,{...r.emitNode.autoGenerate}),o}function Mh(r){let o=Ar(r.escapedText);return o.flags|=r.flags&-17,o.transformFlags=r.transformFlags,nr(o,r),o}function Yc(r){if(r===void 0)return r;if(ci(r))return qs(r);if(va(r))return Nh(r);if(Ae(r))return Oh(r);if(Bg(r))return Qc(r);if(Vn(r))return Mh(r);let o=Wl(r.kind)?t.createBaseNode(r.kind):t.createBaseTokenNode(r.kind);o.flags|=r.flags&-17,o.transformFlags=r.transformFlags,nr(o,r);for(let s in r)Wn(o,s)||!Wn(r,s)||(o[s]=r[s]);return o}function Lh(r,o,s){return ji(nc(void 0,void 0,void 0,void 0,o?[o]:[],void 0,qa(r,!0)),void 0,s?[s]:[])}function Jh(r,o,s){return ji(rc(void 0,void 0,o?[o]:[],void 0,void 0,qa(r,!0)),void 0,s?[s]:[])}function So(){return Or(Qe("0"))}function Rh(r){return za(void 0,!1,r)}function Ws(r){return Ic(void 0,!1,Nc([Oc(!1,void 0,r)]))}function jh(r,o){return o==="null"?se.createStrictEquality(r,cn()):o==="undefined"?se.createStrictEquality(r,So()):se.createStrictEquality(Tn(r),_t(o))}function df(r,o){return o==="null"?se.createStrictInequality(r,cn()):o==="undefined"?se.createStrictInequality(r,So()):se.createStrictInequality(Tn(r),_t(o))}function da(r,o,s){return T0(r)?K_(Fa(r,void 0,o),void 0,void 0,s):ji(gi(r,o),void 0,s)}function Fh(r,o,s){return da(r,"bind",[o,...s])}function mf(r,o,s){return da(r,"call",[o,...s])}function Bh(r,o,s){return da(r,"apply",[o,s])}function xo(r,o,s){return da(He(r),o,s)}function Uh(r,o){return da(r,"slice",o===void 0?[]:[Ti(o)])}function hf(r,o){return da(r,"concat",o)}function yf(r,o,s){return xo("Object","defineProperty",[r,Ti(o),s])}function gf(r,o){return xo("Object","getOwnPropertyDescriptor",[r,Ti(o)])}function c(r,o,s){return xo("Reflect","get",s?[r,o,s]:[r,o])}function h(r,o,s,l){return xo("Reflect","set",l?[r,o,s,l]:[r,o,s])}function b(r,o,s){return s?(r.push(Us(o,s)),!0):!1}function E(r,o){let s=[];b(s,"enumerable",Ti(r.enumerable)),b(s,"configurable",Ti(r.configurable));let l=b(s,"writable",Ti(r.writable));l=b(s,"value",r.value)||l;let g=b(s,"get",r.get);return g=b(s,"set",r.set)||g,I.assert(!(l&&g),"A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."),fo(s,!o)}function k(r,o){switch(r.kind){case 217:return Cu(r,o);case 216:return Eu(r,r.type,o);case 234:return ju(r,o,r.type);case 238:return pc(r,o,r.type);case 235:return uc(r,o);case 360:return uf(r,o)}}function J(r){return cs(r)&&ya(r)&&ya(getSourceMapRange(r))&&ya(getCommentRange(r))&&!Ze(getSyntheticLeadingComments(r))&&!Ze(getSyntheticTrailingComments(r))}function Y(r,o,s=15){return r&&Um(r,s)&&!J(r)?k(r,Y(r.expression,o)):o}function _e(r,o,s){if(!o)return r;let l=ip(o,o.label,_8(o.statement)?_e(r,o.statement):r);return s&&s(o),l}function re(r,o){let s=C_(r);switch(s.kind){case 80:return o;case 110:case 9:case 10:case 11:return!1;case 209:return s.elements.length!==0;case 210:return s.properties.length>0;default:return!0}}function ne(r,o,s,l=!1){let g=ms(r,15),D,H;return bd(g)?(D=Gt(),H=g):qf(g)?(D=Gt(),H=s!==void 0&&s<2?We(He("_super"),g):g):ai(g)&8192?(D=So(),H=a().parenthesizeLeftSideOfAccess(g,!1)):Ln(g)?re(g.expression,l)?(D=Qn(o),H=gi(We(se.createAssignment(D,g.expression),g.expression),g.name),We(H,g)):(D=g.expression,H=g):Ki(g)?re(g.expression,l)?(D=Qn(o),H=Q_(We(se.createAssignment(D,g.expression),g.expression),g.argumentExpression),We(H,g)):(D=g.expression,H=g):(D=So(),H=a().parenthesizeLeftSideOfAccess(r,!1)),{target:H,thisArg:D}}function pe(r,o){return gi(tc(fo([nt(void 0,"value",[di(void 0,void 0,r,void 0,void 0,void 0)],qa([go(o)]))])),"value")}function Ue(r){return r.length>10?zs(r):Fd(r,se.createComma)}function Fe(r,o,s,l=0,g){let D=g?r&&Zd(r):ql(r);if(D&&Ae(D)&&!va(D)){let H=Qi(We(Yc(D),D),D.parent);return l|=ai(D),s||(l|=96),o||(l|=3072),l&&setEmitFlags(H,l),H}return Jn(r)}function Oe(r,o,s){return Fe(r,o,s,98304)}function xn(r,o,s,l){return Fe(r,o,s,32768,l)}function qn(r,o,s){return Fe(r,o,s,16384)}function vi(r,o,s){return Fe(r,o,s)}function Zr(r,o,s,l){let g=gi(r,ya(o)?o:Yc(o));We(g,o);let D=0;return l||(D|=96),s||(D|=3072),D&&setEmitFlags(g,D),g}function Jr(r,o,s,l){return r&&Cn(o,32)?Zr(r,Fe(o),s,l):qn(o,s,l)}function ma(r,o,s,l){let g=bf(r,o,0,s);return Zc(r,o,g,l)}function qh(r){return Tr(r.expression)&&r.expression.text==="use strict"}function Kc(){return qm(go(_t("use strict")))}function bf(r,o,s=0,l){I.assert(o.length===0,"Prologue directives should be at the first statement in the target statements array");let g=!1,D=r.length;for(;sme&&In.splice(g,0,...o.slice(me,ze)),me>H&&In.splice(l,0,...o.slice(H,me)),H>D&&In.splice(s,0,...o.slice(D,H)),D>0)if(s===0)In.splice(0,0,...o.slice(0,D));else{let Si=new Map;for(let xi=0;xi=0;xi--){let wo=o[xi];Si.has(wo.expression.text)||In.unshift(wo)}}return ha(r)?We(fe(In,r.hasTrailingComma),r):r}function Tf(r,o){let s;return typeof o=="number"?s=Rn(o):s=o,Lo(r)?lr(r,s,r.name,r.constraint,r.default):Pa(r)?Xr(r,s,r.dotDotDotToken,r.name,r.questionToken,r.type,r.initializer):bb(r)?ge(r,s,r.typeParameters,r.parameters,r.type):Zl(r)?Pr(r,s,r.name,r.questionToken,r.type):Ia(r)?ie(r,s,r.name,r.questionToken??r.exclamationToken,r.type,r.initializer):qx(r)?Te(r,s,r.name,r.questionToken,r.typeParameters,r.parameters,r.type):f_(r)?$e(r,s,r.asteriskToken,r.name,r.questionToken,r.typeParameters,r.parameters,r.type,r.body):L_(r)?K(r,s,r.parameters,r.body):d_(r)?je(r,s,r.name,r.parameters,r.type,r.body):Zo(r)?kt(r,s,r.name,r.parameters,r.body):gb(r)?$r(r,s,r.parameters,r.type):Im(r)?Au(r,s,r.asteriskToken,r.name,r.typeParameters,r.parameters,r.type,r.body):Nm(r)?ku(r,s,r.typeParameters,r.parameters,r.type,r.equalsGreaterThanToken,r.body):Ol(r)?ho(r,s,r.name,r.typeParameters,r.heritageClauses,r.members):ls(r)?Hu(r,s,r.declarationList):us(r)?cp(r,s,r.asteriskToken,r.name,r.typeParameters,r.parameters,r.type,r.body):es(r)?Sc(r,s,r.name,r.typeParameters,r.heritageClauses,r.members):su(r)?gt(r,s,r.name,r.typeParameters,r.heritageClauses,r.members):Db(r)?xc(r,s,r.name,r.typeParameters,r.type):Pb(r)?up(r,s,r.name,r.members):Zi(r)?qi(r,s,r.name,r.body):Nb(r)?dp(r,s,r.isTypeOnly,r.name,r.moduleReference):Ob(r)?hp(r,s,r.importClause,r.moduleSpecifier,r.attributes):ps(r)?Pc(r,s,r.expression):F_(r)?Wa(r,s,r.isTypeOnly,r.exportClause,r.moduleSpecifier,r.attributes):I.assertNever(r)}function fn(r,o){return Pa(r)?Xr(r,o,r.dotDotDotToken,r.name,r.questionToken,r.type,r.initializer):Ia(r)?ie(r,o,r.name,r.questionToken??r.exclamationToken,r.type,r.initializer):f_(r)?$e(r,o,r.asteriskToken,r.name,r.questionToken,r.typeParameters,r.parameters,r.type,r.body):d_(r)?je(r,o,r.name,r.parameters,r.type,r.body):Zo(r)?kt(r,o,r.name,r.parameters,r.body):Ol(r)?ho(r,o,r.name,r.typeParameters,r.heritageClauses,r.members):es(r)?Sc(r,o,r.name,r.typeParameters,r.heritageClauses,r.members):I.assertNever(r)}function Vs(r,o){switch(r.kind){case 177:return je(r,r.modifiers,o,r.parameters,r.type,r.body);case 178:return kt(r,r.modifiers,o,r.parameters,r.body);case 174:return $e(r,r.modifiers,r.asteriskToken,o,r.questionToken,r.typeParameters,r.parameters,r.type,r.body);case 173:return Te(r,r.modifiers,o,r.questionToken,r.typeParameters,r.parameters,r.type);case 172:return ie(r,r.modifiers,o,r.questionToken??r.exclamationToken,r.type,r.initializer);case 171:return Pr(r,r.modifiers,o,r.questionToken,r.type);case 303:return fa(r,o,r.initializer)}}function Ie(r){return r?fe(r):void 0}function Ke(r){return typeof r=="string"?He(r):r}function Ti(r){return typeof r=="string"?_t(r):typeof r=="number"?Qe(r):typeof r=="boolean"?r?ht():Dr():r}function Hs(r){return r&&a().parenthesizeExpressionForDisallowedComma(r)}function Wh(r){return typeof r=="number"?xt(r):r}function tr(r){return r&&Lb(r)?We(nr(fc(),r),r):r}function Vh(r){return typeof r=="string"||r&&!Li(r)?Ps(r,void 0,void 0,void 0):r}}function GM(e,t){return e!==t&&We(e,t),e}function XM(e,t){return e!==t&&(nr(e,t),We(e,t)),e}function kf(e){switch(e){case 351:return"type";case 349:return"returns";case 350:return"this";case 347:return"enum";case 337:return"author";case 339:return"class";case 340:return"public";case 341:return"private";case 342:return"protected";case 343:return"readonly";case 344:return"override";case 352:return"template";case 353:return"typedef";case 348:return"param";case 355:return"prop";case 345:return"callback";case 346:return"overload";case 335:return"augments";case 336:return"implements";default:return I.fail(`Unsupported kind: ${I.formatSyntaxKind(e)}`)}}function $M(e,t){switch(mr||(mr=ss(99,!1,0)),e){case 15:mr.setText("`"+t+"`");break;case 16:mr.setText("`"+t+"${");break;case 17:mr.setText("}"+t+"${");break;case 18:mr.setText("}"+t+"`");break}let n=mr.scan();if(n===20&&(n=mr.reScanTemplateToken(!1)),mr.isUnterminated())return mr.setText(void 0),eg;let a;switch(n){case 15:case 16:case 17:case 18:a=mr.getTokenValue();break}return a===void 0||mr.scan()!==1?(mr.setText(void 0),eg):(mr.setText(void 0),a)}function jr(e){return e&&Ae(e)?t_(e):V(e)}function t_(e){return V(e)&-67108865}function QM(e,t){return t|e.transformFlags&134234112}function V(e){if(!e)return 0;let t=e.transformFlags&~Mx(e.kind);return Kd(e)&&Vl(e.name)?QM(e.name,t):t}function ke(e){return e?e.transformFlags:0}function F6(e){let t=0;for(let n of e)t|=V(n);e.transformFlags=t}function Mx(e){if(e>=182&&e<=205)return-2;switch(e){case 213:case 214:case 209:return-2147450880;case 267:return-1941676032;case 169:return-2147483648;case 219:return-2072174592;case 218:case 262:return-1937940480;case 261:return-2146893824;case 263:case 231:return-2147344384;case 176:return-1937948672;case 172:return-2013249536;case 174:case 177:case 178:return-2005057536;case 133:case 150:case 163:case 146:case 154:case 151:case 136:case 155:case 116:case 168:case 171:case 173:case 179:case 180:case 181:case 264:case 265:return-2;case 210:return-2147278848;case 299:return-2147418112;case 206:case 207:return-2147450880;case 216:case 238:case 234:case 360:case 217:case 108:return-2147483648;case 211:case 212:return-2147483648;default:return-2147483648}}function el(e){return e.flags|=16,e}function YM(e,t,n){let a,_,p,m,y,u,x,d,S,T;g_(e)?(p="",m=e,y=e.length,u=t,x=n):(I.assert(t==="js"||t==="dts"),p=(t==="js"?e.javascriptPath:e.declarationPath)||"",u=t==="js"?e.javascriptMapPath:e.declarationMapPath,d=()=>t==="js"?e.javascriptText:e.declarationText,S=()=>t==="js"?e.javascriptMapText:e.declarationMapText,y=()=>d().length,e.buildInfo&&e.buildInfo.bundle&&(I.assert(n===void 0||typeof n=="boolean"),a=n,_=t==="js"?e.buildInfo.bundle.js:e.buildInfo.bundle.dts,T=e.oldFileOfCurrentEmit));let A=T?ZM(I.checkDefined(_)):KM(_,a,y);return A.fileName=p,A.sourceMapPath=u,A.oldFileOfCurrentEmit=T,d&&S?(Object.defineProperty(A,"text",{get:d}),Object.defineProperty(A,"sourceMapText",{get:S})):(I.assert(!T),A.text=m??"",A.sourceMapText=x),A}function KM(e,t,n){let a,_,p,m,y,u,x,d;for(let T of e?e.sections:Je)switch(T.kind){case"prologue":a=Et(a,We(zr.createUnparsedPrologue(T.data),T));break;case"emitHelpers":_=Et(_,getAllUnscopedEmitHelpers().get(T.data));break;case"no-default-lib":d=!0;break;case"reference":p=Et(p,{pos:-1,end:-1,fileName:T.data});break;case"type":m=Et(m,{pos:-1,end:-1,fileName:T.data});break;case"type-import":m=Et(m,{pos:-1,end:-1,fileName:T.data,resolutionMode:99});break;case"type-require":m=Et(m,{pos:-1,end:-1,fileName:T.data,resolutionMode:1});break;case"lib":y=Et(y,{pos:-1,end:-1,fileName:T.data});break;case"prepend":let A;for(let N of T.texts)(!t||N.kind!=="internal")&&(A=Et(A,We(zr.createUnparsedTextLike(N.data,N.kind==="internal"),N)));u=zn(u,A),x=Et(x,zr.createUnparsedPrepend(T.data,A??Je));break;case"internal":if(t){x||(x=[]);break}case"text":x=Et(x,We(zr.createUnparsedTextLike(T.data,T.kind==="internal"),T));break;default:I.assertNever(T)}if(!x){let T=zr.createUnparsedTextLike(void 0,!1);Ad(T,0,typeof n=="function"?n():n),x=[T]}let S=q_.createUnparsedSource(a??Je,void 0,x);return a_(a,S),a_(x,S),a_(u,S),S.hasNoDefaultLib=d,S.helpers=_,S.referencedFiles=p||Je,S.typeReferenceDirectives=m,S.libReferenceDirectives=y||Je,S}function ZM(e){let t,n;for(let _ of e.sections)switch(_.kind){case"internal":case"text":t=Et(t,We(zr.createUnparsedTextLike(_.data,_.kind==="internal"),_));break;case"no-default-lib":case"reference":case"type":case"type-import":case"type-require":case"lib":n=Et(n,We(zr.createUnparsedSyntheticReference(_),_));break;case"prologue":case"emitHelpers":case"prepend":break;default:I.assertNever(_)}let a=zr.createUnparsedSource(Je,n,t??Je);return a_(n,a),a_(t,a),a.helpers=xa(e.sources&&e.sources.helpers,_=>getAllUnscopedEmitHelpers().get(_)),a}function eL(e,t,n,a,_,p){return g_(e)?Jx(void 0,e,n,a,void 0,t,_,p):Lx(e,t,n,a,_,p)}function Lx(e,t,n,a,_,p,m,y){let u=q_.createInputFiles();u.javascriptPath=t,u.javascriptMapPath=n,u.declarationPath=a,u.declarationMapPath=_,u.buildInfoPath=p;let x=new Map,d=N=>{if(N===void 0)return;let q=x.get(N);return q===void 0&&(q=e(N),x.set(N,q!==void 0?q:!1)),q!==!1?q:void 0},S=N=>{let q=d(N);return q!==void 0?q:`/* Input file ${N} was missing */\r +`},T;return Object.defineProperties(u,{javascriptText:{get:()=>S(t)},javascriptMapText:{get:()=>d(n)},declarationText:{get:()=>S(I.checkDefined(a))},declarationMapText:{get:()=>d(_)},buildInfo:{get:()=>{if(T===void 0&&p)if(m!=null&&m.getBuildInfo)T=m.getBuildInfo(p,y.configFilePath)??!1;else{let N=d(p);T=N!==void 0?getBuildInfo(p,N)??!1:!1}return T||void 0}}}),u}function Jx(e,t,n,a,_,p,m,y,u,x,d){let S=q_.createInputFiles();return S.javascriptPath=e,S.javascriptText=t,S.javascriptMapPath=n,S.javascriptMapText=a,S.declarationPath=_,S.declarationText=p,S.declarationMapPath=m,S.declarationMapText=y,S.buildInfoPath=u,S.buildInfo=x,S.oldFileOfCurrentEmit=d,S}function tL(e,t,n){return new(U6||(U6=Ct.getSourceMapSourceConstructor()))(e,t,n)}function nr(e,t){if(e.original!==t&&(e.original=t,t)){let n=t.emitNode;n&&(e.emitNode=nL(n,e.emitNode))}return e}function nL(e,t){let{flags:n,internalFlags:a,leadingComments:_,trailingComments:p,commentRange:m,sourceMapRange:y,tokenSourceMapRanges:u,constantValue:x,helpers:d,startsOnNewLine:S,snippetElement:T,classThis:A,assignedName:N}=e;if(t||(t={}),n&&(t.flags=n),a&&(t.internalFlags=a&-9),_&&(t.leadingComments=zn(_.slice(),t.leadingComments)),p&&(t.trailingComments=zn(p.slice(),t.trailingComments)),m&&(t.commentRange=m),y&&(t.sourceMapRange=y),u&&(t.tokenSourceMapRanges=rL(u,t.tokenSourceMapRanges)),x!==void 0&&(t.constantValue=x),d)for(let q of d)t.helpers=bv(t.helpers,q);return S!==void 0&&(t.startsOnNewLine=S),T!==void 0&&(t.snippetElement=T),A&&(t.classThis=A),N&&(t.assignedName=N),t}function rL(e,t){t||(t=[]);for(let n in e)t[n]=e[n];return t}var sl,Z0,fb,mr,eg,$s,B6,zr,U6,iL=It({"src/compiler/factory/nodeFactory.ts"(){"use strict";En(),sl=0,Z0=(e=>(e[e.None=0]="None",e[e.NoParenthesizerRules=1]="NoParenthesizerRules",e[e.NoNodeConverters=2]="NoNodeConverters",e[e.NoIndentationOnFreshPropertyAccess=4]="NoIndentationOnFreshPropertyAccess",e[e.NoOriginalNode=8]="NoOriginalNode",e))(Z0||{}),fb=[],eg={},$s=Nx(),B6={createBaseSourceFileNode:e=>el($s.createBaseSourceFileNode(e)),createBaseIdentifierNode:e=>el($s.createBaseIdentifierNode(e)),createBasePrivateIdentifierNode:e=>el($s.createBasePrivateIdentifierNode(e)),createBaseTokenNode:e=>el($s.createBaseTokenNode(e)),createBaseNode:e=>el($s.createBaseNode(e))},zr=Dd(4,B6)}}),aL=()=>{},oL=()=>{};function lo(e){return e.kind===9}function db(e){return e.kind===10}function Tr(e){return e.kind===11}function Pd(e){return e.kind===12}function sL(e){return e.kind===14}function Rx(e){return e.kind===15}function _L(e){return e.kind===16}function cL(e){return e.kind===17}function lL(e){return e.kind===18}function uL(e){return e.kind===26}function jx(e){return e.kind===28}function mb(e){return e.kind===40}function hb(e){return e.kind===41}function pL(e){return e.kind===42}function Id(e){return e.kind===54}function Nl(e){return e.kind===58}function fL(e){return e.kind===59}function dL(e){return e.kind===29}function mL(e){return e.kind===39}function Ae(e){return e.kind===80}function Vn(e){return e.kind===81}function Fx(e){return e.kind===95}function hL(e){return e.kind===90}function _l(e){return e.kind===134}function yL(e){return e.kind===131}function gL(e){return e.kind===135}function Bx(e){return e.kind===148}function bL(e){return e.kind===126}function vL(e){return e.kind===128}function TL(e){return e.kind===164}function SL(e){return e.kind===129}function qf(e){return e.kind===108}function Ux(e){return e.kind===102}function xL(e){return e.kind===84}function O_(e){return e.kind===166}function oo(e){return e.kind===167}function Lo(e){return e.kind===168}function Pa(e){return e.kind===169}function M_(e){return e.kind===170}function Zl(e){return e.kind===171}function Ia(e){return e.kind===172}function qx(e){return e.kind===173}function f_(e){return e.kind===174}function eu(e){return e.kind===175}function L_(e){return e.kind===176}function d_(e){return e.kind===177}function Zo(e){return e.kind===178}function yb(e){return e.kind===179}function zx(e){return e.kind===180}function gb(e){return e.kind===181}function Wx(e){return e.kind===182}function J_(e){return e.kind===183}function tu(e){return e.kind===184}function bb(e){return e.kind===185}function Vx(e){return e.kind===186}function Pm(e){return e.kind===187}function Hx(e){return e.kind===188}function Gx(e){return e.kind===189}function vb(e){return e.kind===202}function Xx(e){return e.kind===190}function $x(e){return e.kind===191}function Qx(e){return e.kind===192}function Yx(e){return e.kind===193}function Kx(e){return e.kind===194}function Zx(e){return e.kind===195}function Tb(e){return e.kind===196}function Sb(e){return e.kind===197}function e8(e){return e.kind===198}function t8(e){return e.kind===199}function n8(e){return e.kind===200}function xb(e){return e.kind===201}function nu(e){return e.kind===205}function wL(e){return e.kind===204}function EL(e){return e.kind===203}function CL(e){return e.kind===206}function AL(e){return e.kind===207}function ru(e){return e.kind===208}function iu(e){return e.kind===209}function uo(e){return e.kind===210}function Ln(e){return e.kind===211}function Ki(e){return e.kind===212}function R_(e){return e.kind===213}function r8(e){return e.kind===214}function i8(e){return e.kind===215}function kL(e){return e.kind===216}function cs(e){return e.kind===217}function Im(e){return e.kind===218}function Nm(e){return e.kind===219}function DL(e){return e.kind===220}function PL(e){return e.kind===221}function wb(e){return e.kind===222}function IL(e){return e.kind===223}function Om(e){return e.kind===224}function a8(e){return e.kind===225}function At(e){return e.kind===226}function NL(e){return e.kind===227}function OL(e){return e.kind===228}function ML(e){return e.kind===229}function Eb(e){return e.kind===230}function Ol(e){return e.kind===231}function Mm(e){return e.kind===232}function Cb(e){return e.kind===233}function LL(e){return e.kind===234}function JL(e){return e.kind===238}function Uo(e){return e.kind===235}function Ab(e){return e.kind===236}function RL(e){return e.kind===237}function o8(e){return e.kind===360}function j_(e){return e.kind===361}function jL(e){return e.kind===239}function FL(e){return e.kind===240}function au(e){return e.kind===241}function ls(e){return e.kind===243}function BL(e){return e.kind===242}function ou(e){return e.kind===244}function UL(e){return e.kind===245}function qL(e){return e.kind===246}function zL(e){return e.kind===247}function s8(e){return e.kind===248}function WL(e){return e.kind===249}function VL(e){return e.kind===250}function HL(e){return e.kind===251}function GL(e){return e.kind===252}function XL(e){return e.kind===253}function $L(e){return e.kind===254}function QL(e){return e.kind===255}function _8(e){return e.kind===256}function YL(e){return e.kind===257}function KL(e){return e.kind===258}function ZL(e){return e.kind===259}function Li(e){return e.kind===260}function kb(e){return e.kind===261}function us(e){return e.kind===262}function es(e){return e.kind===263}function su(e){return e.kind===264}function Db(e){return e.kind===265}function Pb(e){return e.kind===266}function Zi(e){return e.kind===267}function c8(e){return e.kind===268}function eJ(e){return e.kind===269}function Ib(e){return e.kind===270}function Nb(e){return e.kind===271}function Ob(e){return e.kind===272}function tJ(e){return e.kind===273}function nJ(e){return e.kind===302}function rJ(e){return e.kind===300}function iJ(e){return e.kind===301}function aJ(e){return e.kind===300}function oJ(e){return e.kind===301}function Mb(e){return e.kind===274}function Lm(e){return e.kind===280}function sJ(e){return e.kind===275}function l8(e){return e.kind===276}function ps(e){return e.kind===277}function F_(e){return e.kind===278}function u8(e){return e.kind===279}function p8(e){return e.kind===281}function _J(e){return e.kind===282}function Lb(e){return e.kind===359}function cJ(e){return e.kind===362}function Jm(e){return e.kind===283}function tg(e){return e.kind===284}function lJ(e){return e.kind===285}function Jo(e){return e.kind===286}function zf(e){return e.kind===287}function yl(e){return e.kind===288}function Jb(e){return e.kind===289}function uJ(e){return e.kind===290}function pJ(e){return e.kind===291}function Rb(e){return e.kind===292}function fJ(e){return e.kind===293}function dJ(e){return e.kind===294}function B_(e){return e.kind===295}function mJ(e){return e.kind===296}function f8(e){return e.kind===297}function Ml(e){return e.kind===298}function hJ(e){return e.kind===299}function fs(e){return e.kind===303}function _u(e){return e.kind===304}function d8(e){return e.kind===305}function m8(e){return e.kind===306}function yJ(e){return e.kind===308}function ci(e){return e.kind===312}function gJ(e){return e.kind===313}function bJ(e){return e.kind===314}function h8(e){return e.kind===316}function Wf(e){return e.kind===317}function r_(e){return e.kind===318}function vJ(e){return e.kind===331}function TJ(e){return e.kind===332}function SJ(e){return e.kind===333}function xJ(e){return e.kind===319}function wJ(e){return e.kind===320}function y8(e){return e.kind===321}function EJ(e){return e.kind===322}function CJ(e){return e.kind===323}function Rm(e){return e.kind===324}function AJ(e){return e.kind===325}function kJ(e){return e.kind===326}function ds(e){return e.kind===327}function jb(e){return e.kind===329}function cu(e){return e.kind===330}function jm(e){return e.kind===335}function DJ(e){return e.kind===337}function g8(e){return e.kind===339}function PJ(e){return e.kind===345}function Fb(e){return e.kind===340}function Bb(e){return e.kind===341}function Ub(e){return e.kind===342}function qb(e){return e.kind===343}function b8(e){return e.kind===344}function zb(e){return e.kind===346}function Wb(e){return e.kind===338}function IJ(e){return e.kind===354}function v8(e){return e.kind===347}function m_(e){return e.kind===348}function Vb(e){return e.kind===349}function T8(e){return e.kind===350}function lu(e){return e.kind===351}function ts(e){return e.kind===352}function NJ(e){return e.kind===353}function OJ(e){return e.kind===334}function MJ(e){return e.kind===355}function S8(e){return e.kind===336}function Hb(e){return e.kind===357}function LJ(e){return e.kind===356}function JJ(e){return e.kind===358}var RJ=It({"src/compiler/factory/nodeTests.ts"(){"use strict";En()}});function jJ(e){return e.createExportDeclaration(void 0,!1,e.createNamedExports([]),void 0)}function Fm(e,t,n,a){if(oo(n))return We(e.createElementAccessExpression(t,n.expression),a);{let _=We(ro(n)?e.createPropertyAccessExpression(t,n):e.createElementAccessExpression(t,n),n);return addEmitFlags(_,128),_}}function Gb(e,t){let n=q_.createIdentifier(e||"React");return Qi(n,Ul(t)),n}function Xb(e,t,n){if(O_(t)){let a=Xb(e,t.left,n),_=e.createIdentifier(Lt(t.right));return _.escapedText=t.right.escapedText,e.createPropertyAccessExpression(a,_)}else return Gb(Lt(t),n)}function x8(e,t,n,a){return t?Xb(e,t,a):e.createPropertyAccessExpression(Gb(n,a),"createElement")}function FJ(e,t,n,a){return t?Xb(e,t,a):e.createPropertyAccessExpression(Gb(n,a),"Fragment")}function BJ(e,t,n,a,_,p){let m=[n];if(a&&m.push(a),_&&_.length>0)if(a||m.push(e.createNull()),_.length>1)for(let y of _)qm(y),m.push(y);else m.push(_[0]);return We(e.createCallExpression(t,void 0,m),p)}function UJ(e,t,n,a,_,p,m){let u=[FJ(e,n,a,p),e.createNull()];if(_&&_.length>0)if(_.length>1)for(let x of _)qm(x),u.push(x);else u.push(_[0]);return We(e.createCallExpression(x8(e,t,a,p),void 0,u),m)}function qJ(e,t,n){if(kb(t)){let a=pg(t.declarations),_=e.updateVariableDeclaration(a,a.name,void 0,void 0,n);return We(e.createVariableStatement(void 0,e.updateVariableDeclarationList(t,[_])),t)}else{let a=We(e.createAssignment(t,n),t);return We(e.createExpressionStatement(a),t)}}function zJ(e,t,n){return au(t)?e.updateBlock(t,We(e.createNodeArray([n,...t.statements]),t.statements)):e.createBlock(e.createNodeArray([t,n]),!0)}function w8(e,t){if(O_(t)){let n=w8(e,t.left),a=Qi(We(e.cloneNode(t.right),t.right),t.right.parent);return We(e.createPropertyAccessExpression(n,a),t)}else return Qi(We(e.cloneNode(t),t),t.parent)}function E8(e,t){return Ae(t)?e.createStringLiteralFromNode(t):oo(t)?Qi(We(e.cloneNode(t.expression),t.expression),t.expression.parent):Qi(We(e.cloneNode(t),t),t.parent)}function WJ(e,t,n,a,_){let{firstAccessor:p,getAccessor:m,setAccessor:y}=J2(t,n);if(n===p)return We(e.createObjectDefinePropertyCall(a,E8(e,n.name),e.createPropertyDescriptor({enumerable:e.createFalse(),configurable:!0,get:m&&We(nr(e.createFunctionExpression(gd(m),void 0,void 0,void 0,m.parameters,void 0,m.body),m),m),set:y&&We(nr(e.createFunctionExpression(gd(y),void 0,void 0,void 0,y.parameters,void 0,y.body),y),y)},!_)),p)}function VJ(e,t,n){return nr(We(e.createAssignment(Fm(e,n,t.name,t.name),t.initializer),t),t)}function HJ(e,t,n){return nr(We(e.createAssignment(Fm(e,n,t.name,t.name),e.cloneNode(t.name)),t),t)}function GJ(e,t,n){return nr(We(e.createAssignment(Fm(e,n,t.name,t.name),nr(We(e.createFunctionExpression(gd(t),t.asteriskToken,void 0,void 0,t.parameters,void 0,t.body),t),t)),t),t)}function XJ(e,t,n,a){switch(n.name&&Vn(n.name)&&I.failBadSyntaxKind(n.name,"Private identifiers are not allowed in object literals."),n.kind){case 177:case 178:return WJ(e,t.properties,n,a,!!t.multiLine);case 303:return VJ(e,n,a);case 304:return HJ(e,n,a);case 174:return GJ(e,n,a)}}function $J(e,t,n,a,_){let p=t.operator;I.assert(p===46||p===47,"Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");let m=e.createTempVariable(a);n=e.createAssignment(m,n),We(n,t.operand);let y=Om(t)?e.createPrefixUnaryExpression(p,m):e.createPostfixUnaryExpression(m,p);return We(y,t),_&&(y=e.createAssignment(_,y),We(y,t)),n=e.createComma(n,y),We(n,t),a8(t)&&(n=e.createComma(n,m),We(n,t)),n}function QJ(e){return(ai(e)&65536)!==0}function ng(e){return(ai(e)&32768)!==0}function YJ(e){return(ai(e)&16384)!==0}function C8(e){return Tr(e.expression)&&e.expression.text==="use strict"}function A8(e){for(let t of e)if(Sa(t)){if(C8(t))return t}else break}function k8(e){let t=y_(e);return t!==void 0&&Sa(t)&&C8(t)}function Bm(e){return e.kind===226&&e.operatorToken.kind===28}function KJ(e){return Bm(e)||j_(e)}function D8(e){return cs(e)&&Vt(e)&&!!tm(e)}function ZJ(e){let t=nm(e);return I.assertIsDefined(t),t}function Um(e,t=15){switch(e.kind){case 217:return t&16&&D8(e)?!1:(t&1)!==0;case 216:case 234:case 233:case 238:return(t&2)!==0;case 235:return(t&4)!==0;case 360:return(t&8)!==0}return!1}function ms(e,t=15){for(;Um(e,t);)e=e.expression;return e}function eR(e,t=15){let n=e.parent;for(;Um(n,t);)n=n.parent,I.assert(n);return n}function tR(e){return ms(e,6)}function qm(e){return setStartsOnNewLine(e,!0)}function P8(e){let t=Bl(e,ci),n=t&&t.emitNode;return n&&n.externalHelpersModuleName}function nR(e){let t=Bl(e,ci),n=t&&t.emitNode;return!!n&&(!!n.externalHelpersModuleName||!!n.externalHelpers)}function rR(e,t,n,a,_,p,m){if(a.importHelpers&&e2(n,a)){let y,u=_i(a);if(u>=5&&u<=99||n.impliedNodeFormat===99){let x=getEmitHelpers(n);if(x){let d=[];for(let S of x)if(!S.scoped){let T=S.importName;T&&Ll(d,T)}if(Ze(d)){d.sort(Ii),y=e.createNamedImports(xa(d,A=>AT(n,A)?e.createImportSpecifier(!1,void 0,e.createIdentifier(A)):e.createImportSpecifier(!1,e.createIdentifier(A),t.getUnscopedHelperName(A))));let S=Bl(n,ci),T=getOrCreateEmitNode(S);T.externalHelpers=!0}}}else{let x=I8(e,n,a,_,p||m);x&&(y=e.createNamespaceImport(x))}if(y){let x=e.createImportDeclaration(void 0,e.createImportClause(!1,void 0,y),e.createStringLiteral(Am),void 0);return addInternalEmitFlags(x,2),x}}}function I8(e,t,n,a,_){if(n.importHelpers&&e2(t,n)){let p=P8(t);if(p)return p;let m=_i(n),y=(a||X2(n)&&_)&&m!==4&&(m<5||t.impliedNodeFormat===1);if(!y){let u=getEmitHelpers(t);if(u){for(let x of u)if(!x.scoped){y=!0;break}}}if(y){let u=Bl(t,ci),x=getOrCreateEmitNode(u);return x.externalHelpersModuleName||(x.externalHelpersModuleName=e.createUniqueName(Am))}}}function iR(e,t,n){let a=c3(t);if(a&&!l3(t)&&!NT(t)){let _=a.name;return va(_)?_:e.createIdentifier(Qo(n,_)||Lt(_))}if(t.kind===272&&t.importClause||t.kind===278&&t.moduleSpecifier)return e.getGeneratedNameForNode(t)}function aR(e,t,n,a,_,p){let m=T2(t);if(m&&Tr(m))return sR(t,a,e,_,p)||oR(e,m,n)||e.cloneNode(m)}function oR(e,t,n){let a=n.renamedDependencies&&n.renamedDependencies.get(t.text);return a?e.createStringLiteral(a):void 0}function N8(e,t,n,a){if(t){if(t.moduleName)return e.createStringLiteral(t.moduleName);if(!t.isDeclarationFile&&bm(a))return e.createStringLiteral(M2(n,t.fileName))}}function sR(e,t,n,a,_){return N8(n,a.getExternalModuleFileFromDeclaration(e),t,_)}function O8(e){if(Hg(e))return e.initializer;if(fs(e)){let t=e.initializer;return si(t,!0)?t.right:void 0}if(_u(e))return e.objectAssignmentInitializer;if(si(e,!0))return e.right;if(Eb(e))return O8(e.expression)}function Ro(e){if(Hg(e))return e.name;if(Vg(e)){switch(e.kind){case 303:return Ro(e.initializer);case 304:return e.name;case 305:return Ro(e.expression)}return}return si(e,!0)?Ro(e.left):Eb(e)?Ro(e.expression):e}function _R(e){switch(e.kind){case 169:case 208:return e.dotDotDotToken;case 230:case 305:return e}}function cR(e){let t=M8(e);return I.assert(!!t||d8(e),"Invalid property name for binding element."),t}function M8(e){switch(e.kind){case 208:if(e.propertyName){let n=e.propertyName;return Vn(n)?I.failBadSyntaxKind(n):oo(n)&&q6(n.expression)?n.expression:n}break;case 303:if(e.name){let n=e.name;return Vn(n)?I.failBadSyntaxKind(n):oo(n)&&q6(n.expression)?n.expression:n}break;case 305:return e.name&&Vn(e.name)?I.failBadSyntaxKind(e.name):e.name}let t=Ro(e);if(t&&Vl(t))return t}function q6(e){let t=e.kind;return t===11||t===9}function L8(e){switch(e.kind){case 206:case 207:case 209:return e.elements;case 210:return e.properties}}function rg(e){if(e){let t=e;for(;;){if(Ae(t)||!t.body)return Ae(t)?t:t.name;t=t.body}}}function lR(e){let t=e.kind;return t===176||t===178}function J8(e){let t=e.kind;return t===176||t===177||t===178}function uR(e){let t=e.kind;return t===303||t===304||t===262||t===176||t===181||t===175||t===282||t===243||t===264||t===265||t===266||t===267||t===271||t===272||t===270||t===278||t===277}function pR(e){let t=e.kind;return t===175||t===303||t===304||t===282||t===270}function fR(e){return Nl(e)||Id(e)}function dR(e){return Ae(e)||Sb(e)}function mR(e){return Bx(e)||mb(e)||hb(e)}function hR(e){return Nl(e)||mb(e)||hb(e)}function yR(e){return Ae(e)||Tr(e)}function gR(e){let t=e.kind;return t===106||t===112||t===97||Fg(e)||Om(e)}function bR(e){return e===43}function vR(e){return e===42||e===44||e===45}function TR(e){return bR(e)||vR(e)}function SR(e){return e===40||e===41}function xR(e){return SR(e)||TR(e)}function wR(e){return e===48||e===49||e===50}function $b(e){return wR(e)||xR(e)}function ER(e){return e===30||e===33||e===32||e===34||e===104||e===103}function CR(e){return ER(e)||$b(e)}function AR(e){return e===35||e===37||e===36||e===38}function kR(e){return AR(e)||CR(e)}function DR(e){return e===51||e===52||e===53}function PR(e){return DR(e)||kR(e)}function IR(e){return e===56||e===57}function NR(e){return IR(e)||PR(e)}function OR(e){return e===61||NR(e)||A_(e)}function MR(e){return OR(e)||e===28}function LR(e){return MR(e.kind)}function JR(e,t,n,a,_,p){let m=new j8(e,t,n,a,_,p);return y;function y(u,x){let d={value:void 0},S=[Od.enter],T=[u],A=[void 0],N=0;for(;S[N]!==Od.done;)N=S[N](m,N,S,T,A,d,x);return I.assertEqual(N,0),d.value}}function R8(e){return e===95||e===90}function RR(e){let t=e.kind;return R8(t)}function jR(e){let t=e.kind;return Ei(t)&&!R8(t)}function FR(e,t){if(t!==void 0)return t.length===0?t:We(e.createNodeArray([],t.hasTrailingComma),t)}function BR(e){var t;let n=e.emitNode.autoGenerate;if(n.flags&4){let a=n.id,_=e,p=_.original;for(;p;){_=p;let m=(t=_.emitNode)==null?void 0:t.autoGenerate;if(ro(_)&&(m===void 0||m.flags&4&&m.id!==a))break;p=_.original}return _}return e}function ig(e,t){return typeof e=="object"?Nd(!1,e.prefix,e.node,e.suffix,t):typeof e=="string"?e.length>0&&e.charCodeAt(0)===35?e.slice(1):e:""}function UR(e,t){return typeof e=="string"?e:qR(e,I.checkDefined(t))}function qR(e,t){return Bg(e)?t(e).slice(1):va(e)?t(e):Vn(e)?e.escapedText.slice(1):Lt(e)}function Nd(e,t,n,a,_){return t=ig(t,_),a=ig(a,_),n=UR(n,_),`${e?"#":""}${t}${n}${a}`}function zR(e,t,n,a){return e.updatePropertyDeclaration(t,n,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage"),void 0,void 0,a)}function WR(e,t,n,a,_=e.createThis()){return e.createGetAccessorDeclaration(n,a,[],void 0,e.createBlock([e.createReturnStatement(e.createPropertyAccessExpression(_,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")))]))}function VR(e,t,n,a,_=e.createThis()){return e.createSetAccessorDeclaration(n,a,[e.createParameterDeclaration(void 0,void 0,"value")],e.createBlock([e.createExpressionStatement(e.createAssignment(e.createPropertyAccessExpression(_,e.getGeneratedPrivateNameForNode(t.name,void 0,"_accessor_storage")),e.createIdentifier("value")))]))}function HR(e){let t=e.expression;for(;;){if(t=ms(t),j_(t)){t=Ea(t.elements);continue}if(Bm(t)){t=t.right;continue}if(si(t,!0)&&va(t.left))return t;break}}function GR(e){return cs(e)&&ya(e)&&!e.emitNode}function cl(e,t){if(GR(e))cl(e.expression,t);else if(Bm(e))cl(e.left,t),cl(e.right,t);else if(j_(e))for(let n of e.elements)cl(n,t);else t.push(e)}function XR(e){let t=[];return cl(e,t),t}function Qb(e){if(e.transformFlags&65536)return!0;if(e.transformFlags&128)for(let t of L8(e)){let n=Ro(t);if(n&&oT(n)&&(n.transformFlags&65536||n.transformFlags&128&&Qb(n)))return!0}return!1}var Od,j8,$R=It({"src/compiler/factory/utilities.ts"(){"use strict";En(),(e=>{function t(d,S,T,A,N,q,Q){let se=S>0?N[S-1]:void 0;return I.assertEqual(T[S],t),N[S]=d.onEnter(A[S],se,Q),T[S]=y(d,t),S}e.enter=t;function n(d,S,T,A,N,q,Q){I.assertEqual(T[S],n),I.assertIsDefined(d.onLeft),T[S]=y(d,n);let se=d.onLeft(A[S].left,N[S],A[S]);return se?(x(S,A,se),u(S,T,A,N,se)):S}e.left=n;function a(d,S,T,A,N,q,Q){return I.assertEqual(T[S],a),I.assertIsDefined(d.onOperator),T[S]=y(d,a),d.onOperator(A[S].operatorToken,N[S],A[S]),S}e.operator=a;function _(d,S,T,A,N,q,Q){I.assertEqual(T[S],_),I.assertIsDefined(d.onRight),T[S]=y(d,_);let se=d.onRight(A[S].right,N[S],A[S]);return se?(x(S,A,se),u(S,T,A,N,se)):S}e.right=_;function p(d,S,T,A,N,q,Q){I.assertEqual(T[S],p),T[S]=y(d,p);let se=d.onExit(A[S],N[S]);if(S>0){if(S--,d.foldState){let fe=T[S]===p?"right":"left";N[S]=d.foldState(N[S],se,fe)}}else q.value=se;return S}e.exit=p;function m(d,S,T,A,N,q,Q){return I.assertEqual(T[S],m),S}e.done=m;function y(d,S){switch(S){case t:if(d.onLeft)return n;case n:if(d.onOperator)return a;case a:if(d.onRight)return _;case _:return p;case p:return m;case m:return m;default:I.fail("Invalid state")}}e.nextState=y;function u(d,S,T,A,N){return d++,S[d]=t,T[d]=N,A[d]=void 0,d}function x(d,S,T){if(I.shouldAssert(2))for(;d>=0;)I.assert(S[d]!==T,"Circular traversal detected."),d--}})(Od||(Od={})),j8=class{constructor(e,t,n,a,_,p){this.onEnter=e,this.onLeft=t,this.onOperator=n,this.onRight=a,this.onExit=_,this.foldState=p}}}});function We(e,t){return t?Za(e,t.pos,t.end):e}function U_(e){let t=e.kind;return t===168||t===169||t===171||t===172||t===173||t===174||t===176||t===177||t===178||t===181||t===185||t===218||t===219||t===231||t===243||t===262||t===263||t===264||t===265||t===266||t===267||t===271||t===272||t===277||t===278}function F8(e){let t=e.kind;return t===169||t===172||t===174||t===177||t===178||t===231||t===263}var QR=It({"src/compiler/factory/utilitiesPublic.ts"(){"use strict";En()}});function P(e,t){return t&&e(t)}function oe(e,t,n){if(n){if(t)return t(n);for(let a of n){let _=e(a);if(_)return _}}}function B8(e,t){return e.charCodeAt(t+1)===42&&e.charCodeAt(t+2)===42&&e.charCodeAt(t+3)!==47}function gl(e){return wn(e.statements,YR)||KR(e)}function YR(e){return U_(e)&&ZR(e,95)||Nb(e)&&Jm(e.moduleReference)||Ob(e)||ps(e)||F_(e)?e:void 0}function KR(e){return e.flags&8388608?U8(e):void 0}function U8(e){return ej(e)?e:Wt(e,U8)}function ZR(e,t){return Ze(e.modifiers,n=>n.kind===t)}function ej(e){return Ab(e)&&e.keywordToken===102&&e.name.escapedText==="meta"}function z6(e,t,n){return oe(t,n,e.typeParameters)||oe(t,n,e.parameters)||P(t,e.type)}function W6(e,t,n){return oe(t,n,e.types)}function V6(e,t,n){return P(t,e.type)}function H6(e,t,n){return oe(t,n,e.elements)}function G6(e,t,n){return P(t,e.expression)||P(t,e.questionDotToken)||oe(t,n,e.typeArguments)||oe(t,n,e.arguments)}function X6(e,t,n){return oe(t,n,e.statements)}function $6(e,t,n){return P(t,e.label)}function Q6(e,t,n){return oe(t,n,e.modifiers)||P(t,e.name)||oe(t,n,e.typeParameters)||oe(t,n,e.heritageClauses)||oe(t,n,e.members)}function Y6(e,t,n){return oe(t,n,e.elements)}function K6(e,t,n){return P(t,e.propertyName)||P(t,e.name)}function Z6(e,t,n){return P(t,e.tagName)||oe(t,n,e.typeArguments)||P(t,e.attributes)}function Ao(e,t,n){return P(t,e.type)}function ev(e,t,n){return P(t,e.tagName)||(e.isNameFirst?P(t,e.name)||P(t,e.typeExpression):P(t,e.typeExpression)||P(t,e.name))||(typeof e.comment=="string"?void 0:oe(t,n,e.comment))}function ko(e,t,n){return P(t,e.tagName)||P(t,e.typeExpression)||(typeof e.comment=="string"?void 0:oe(t,n,e.comment))}function ny(e,t,n){return P(t,e.name)}function Qa(e,t,n){return P(t,e.tagName)||(typeof e.comment=="string"?void 0:oe(t,n,e.comment))}function tj(e,t,n){return P(t,e.expression)}function Wt(e,t,n){if(e===void 0||e.kind<=165)return;let a=G8[e.kind];return a===void 0?void 0:a(e,t,n)}function ag(e,t,n){let a=tv(e),_=[];for(;_.length=0;--y)a.push(p[y]),_.push(m)}else{let y=t(p,m);if(y){if(y==="skip")continue;return y}if(p.kind>=166)for(let u of tv(p))a.push(u),_.push(p)}}}function tv(e){let t=[];return Wt(e,n,n),t;function n(a){t.unshift(a)}}function q8(e){e.externalModuleIndicator=gl(e)}function z8(e,t,n,a=!1,_){var p,m,y,u;(p=ba)==null||p.push(ba.Phase.Parse,"createSourceFile",{path:e},!0),k6("beforeParse");let x;(m=Zf)==null||m.logStartParseSourceFile(e);let{languageVersion:d,setExternalModuleIndicator:S,impliedNodeFormat:T,jsDocParsingMode:A}=typeof n=="object"?n:{languageVersion:n};if(d===100)x=ri.parseSourceFile(e,t,d,void 0,a,6,gr,A);else{let N=T===void 0?S:q=>(q.impliedNodeFormat=T,(S||q8)(q));x=ri.parseSourceFile(e,t,d,void 0,a,_,N,A)}return(y=Zf)==null||y.logStopParseSourceFile(),k6("afterParse"),JE("Parse","beforeParse","afterParse"),(u=ba)==null||u.pop(),x}function nj(e,t){return ri.parseIsolatedEntityName(e,t)}function rj(e,t){return ri.parseJsonText(e,t)}function ns(e){return e.externalModuleIndicator!==void 0}function Yb(e,t,n,a=!1){let _=Vf.updateSourceFile(e,t,n,a);return _.flags|=e.flags&12582912,_}function ij(e,t,n){let a=ri.JSDocParser.parseIsolatedJSDocComment(e,t,n);return a&&a.jsDoc&&ri.fixupParentReferences(a.jsDoc),a}function aj(e,t,n){return ri.JSDocParser.parseJSDocTypeExpressionForTests(e,t,n)}function W8(e){return ii(e,ub)||Na(e,".ts")&&os(e).includes(".d.")}function oj(e,t,n,a){if(e){if(e==="import")return 99;if(e==="require")return 1;a(t,n-t,B.resolution_mode_should_be_either_require_or_import)}}function V8(e,t){let n=[];for(let a of Ho(t,0)||Je){let _=t.substring(a.pos,a.end);_j(n,a,_)}e.pragmas=new Map;for(let a of n){if(e.pragmas.has(a.name)){let _=e.pragmas.get(a.name);_ instanceof Array?_.push(a.args):e.pragmas.set(a.name,[_,a.args]);continue}e.pragmas.set(a.name,a.args)}}function H8(e,t){e.checkJsDirective=void 0,e.referencedFiles=[],e.typeReferenceDirectives=[],e.libReferenceDirectives=[],e.amdDependencies=[],e.hasNoDefaultLib=!1,e.pragmas.forEach((n,a)=>{switch(a){case"reference":{let _=e.referencedFiles,p=e.typeReferenceDirectives,m=e.libReferenceDirectives;wn(If(n),y=>{let{types:u,lib:x,path:d,["resolution-mode"]:S}=y.arguments;if(y.arguments["no-default-lib"])e.hasNoDefaultLib=!0;else if(u){let T=oj(S,u.pos,u.end,t);p.push({pos:u.pos,end:u.end,fileName:u.value,...T?{resolutionMode:T}:{}})}else x?m.push({pos:x.pos,end:x.end,fileName:x.value}):d?_.push({pos:d.pos,end:d.end,fileName:d.value}):t(y.range.pos,y.range.end-y.range.pos,B.Invalid_reference_directive_syntax)});break}case"amd-dependency":{e.amdDependencies=xa(If(n),_=>({name:_.arguments.name,path:_.arguments.path}));break}case"amd-module":{if(n instanceof Array)for(let _ of n)e.moduleName&&t(_.range.pos,_.range.end-_.range.pos,B.An_AMD_module_cannot_have_multiple_name_assignments),e.moduleName=_.arguments.name;else e.moduleName=n.arguments.name;break}case"ts-nocheck":case"ts-check":{wn(If(n),_=>{(!e.checkJsDirective||_.range.pos>e.checkJsDirective.pos)&&(e.checkJsDirective={enabled:a==="ts-check",end:_.range.end,pos:_.range.pos})});break}case"jsx":case"jsxfrag":case"jsximportsource":case"jsxruntime":return;default:I.fail("Unhandled pragma kind")}})}function sj(e){if(Hf.has(e))return Hf.get(e);let t=new RegExp(`(\\s${e}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`,"im");return Hf.set(e,t),t}function _j(e,t,n){let a=t.kind===2&&X8.exec(n);if(a){let p=a[1].toLowerCase(),m=Wd[p];if(!m||!(m.kind&1))return;if(m.args){let y={};for(let u of m.args){let d=sj(u.name).exec(n);if(!d&&!u.optional)return;if(d){let S=d[2]||d[3];if(u.captureSpan){let T=t.pos+d.index+d[1].length+1;y[u.name]={value:S,pos:T,end:T+S.length}}else y[u.name]=S}}e.push({name:p,args:{arguments:y,range:t}})}else e.push({name:p,args:{arguments:{},range:t}});return}let _=t.kind===2&&$8.exec(n);if(_)return nv(e,t,2,_);if(t.kind===3){let p=/@(\S+)(\s+.*)?$/gim,m;for(;m=p.exec(n);)nv(e,t,4,m)}}function nv(e,t,n,a){if(!a)return;let _=a[1].toLowerCase(),p=Wd[_];if(!p||!(p.kind&n))return;let m=a[2],y=cj(p,m);y!=="fail"&&e.push({name:_,args:{arguments:y,range:t}})}function cj(e,t){if(!t)return{};if(!e.args)return{};let n=t.trim().split(/\s+/),a={};for(let _=0;_new(sv||(sv=Ct.getSourceFileConstructor()))(e,-1,-1),createBaseIdentifierNode:e=>new(av||(av=Ct.getIdentifierConstructor()))(e,-1,-1),createBasePrivateIdentifierNode:e=>new(ov||(ov=Ct.getPrivateIdentifierConstructor()))(e,-1,-1),createBaseTokenNode:e=>new(iv||(iv=Ct.getTokenConstructor()))(e,-1,-1),createBaseNode:e=>new(rv||(rv=Ct.getNodeConstructor()))(e,-1,-1)},q_=Dd(1,og),G8={166:function(t,n,a){return P(n,t.left)||P(n,t.right)},168:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.constraint)||P(n,t.default)||P(n,t.expression)},304:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||P(n,t.exclamationToken)||P(n,t.equalsToken)||P(n,t.objectAssignmentInitializer)},305:function(t,n,a){return P(n,t.expression)},169:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.dotDotDotToken)||P(n,t.name)||P(n,t.questionToken)||P(n,t.type)||P(n,t.initializer)},172:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||P(n,t.exclamationToken)||P(n,t.type)||P(n,t.initializer)},171:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||P(n,t.type)||P(n,t.initializer)},303:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||P(n,t.exclamationToken)||P(n,t.initializer)},260:function(t,n,a){return P(n,t.name)||P(n,t.exclamationToken)||P(n,t.type)||P(n,t.initializer)},208:function(t,n,a){return P(n,t.dotDotDotToken)||P(n,t.propertyName)||P(n,t.name)||P(n,t.initializer)},181:function(t,n,a){return oe(n,a,t.modifiers)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)},185:function(t,n,a){return oe(n,a,t.modifiers)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)},184:function(t,n,a){return oe(n,a,t.modifiers)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)},179:z6,180:z6,174:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.asteriskToken)||P(n,t.name)||P(n,t.questionToken)||P(n,t.exclamationToken)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},173:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.questionToken)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)},176:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},177:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},178:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},262:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.asteriskToken)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},218:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.asteriskToken)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.body)},219:function(t,n,a){return oe(n,a,t.modifiers)||oe(n,a,t.typeParameters)||oe(n,a,t.parameters)||P(n,t.type)||P(n,t.equalsGreaterThanToken)||P(n,t.body)},175:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.body)},183:function(t,n,a){return P(n,t.typeName)||oe(n,a,t.typeArguments)},182:function(t,n,a){return P(n,t.assertsModifier)||P(n,t.parameterName)||P(n,t.type)},186:function(t,n,a){return P(n,t.exprName)||oe(n,a,t.typeArguments)},187:function(t,n,a){return oe(n,a,t.members)},188:function(t,n,a){return P(n,t.elementType)},189:function(t,n,a){return oe(n,a,t.elements)},192:W6,193:W6,194:function(t,n,a){return P(n,t.checkType)||P(n,t.extendsType)||P(n,t.trueType)||P(n,t.falseType)},195:function(t,n,a){return P(n,t.typeParameter)},205:function(t,n,a){return P(n,t.argument)||P(n,t.attributes)||P(n,t.qualifier)||oe(n,a,t.typeArguments)},302:function(t,n,a){return P(n,t.assertClause)},196:V6,198:V6,199:function(t,n,a){return P(n,t.objectType)||P(n,t.indexType)},200:function(t,n,a){return P(n,t.readonlyToken)||P(n,t.typeParameter)||P(n,t.nameType)||P(n,t.questionToken)||P(n,t.type)||oe(n,a,t.members)},201:function(t,n,a){return P(n,t.literal)},202:function(t,n,a){return P(n,t.dotDotDotToken)||P(n,t.name)||P(n,t.questionToken)||P(n,t.type)},206:H6,207:H6,209:function(t,n,a){return oe(n,a,t.elements)},210:function(t,n,a){return oe(n,a,t.properties)},211:function(t,n,a){return P(n,t.expression)||P(n,t.questionDotToken)||P(n,t.name)},212:function(t,n,a){return P(n,t.expression)||P(n,t.questionDotToken)||P(n,t.argumentExpression)},213:G6,214:G6,215:function(t,n,a){return P(n,t.tag)||P(n,t.questionDotToken)||oe(n,a,t.typeArguments)||P(n,t.template)},216:function(t,n,a){return P(n,t.type)||P(n,t.expression)},217:function(t,n,a){return P(n,t.expression)},220:function(t,n,a){return P(n,t.expression)},221:function(t,n,a){return P(n,t.expression)},222:function(t,n,a){return P(n,t.expression)},224:function(t,n,a){return P(n,t.operand)},229:function(t,n,a){return P(n,t.asteriskToken)||P(n,t.expression)},223:function(t,n,a){return P(n,t.expression)},225:function(t,n,a){return P(n,t.operand)},226:function(t,n,a){return P(n,t.left)||P(n,t.operatorToken)||P(n,t.right)},234:function(t,n,a){return P(n,t.expression)||P(n,t.type)},235:function(t,n,a){return P(n,t.expression)},238:function(t,n,a){return P(n,t.expression)||P(n,t.type)},236:function(t,n,a){return P(n,t.name)},227:function(t,n,a){return P(n,t.condition)||P(n,t.questionToken)||P(n,t.whenTrue)||P(n,t.colonToken)||P(n,t.whenFalse)},230:function(t,n,a){return P(n,t.expression)},241:X6,268:X6,312:function(t,n,a){return oe(n,a,t.statements)||P(n,t.endOfFileToken)},243:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.declarationList)},261:function(t,n,a){return oe(n,a,t.declarations)},244:function(t,n,a){return P(n,t.expression)},245:function(t,n,a){return P(n,t.expression)||P(n,t.thenStatement)||P(n,t.elseStatement)},246:function(t,n,a){return P(n,t.statement)||P(n,t.expression)},247:function(t,n,a){return P(n,t.expression)||P(n,t.statement)},248:function(t,n,a){return P(n,t.initializer)||P(n,t.condition)||P(n,t.incrementor)||P(n,t.statement)},249:function(t,n,a){return P(n,t.initializer)||P(n,t.expression)||P(n,t.statement)},250:function(t,n,a){return P(n,t.awaitModifier)||P(n,t.initializer)||P(n,t.expression)||P(n,t.statement)},251:$6,252:$6,253:function(t,n,a){return P(n,t.expression)},254:function(t,n,a){return P(n,t.expression)||P(n,t.statement)},255:function(t,n,a){return P(n,t.expression)||P(n,t.caseBlock)},269:function(t,n,a){return oe(n,a,t.clauses)},296:function(t,n,a){return P(n,t.expression)||oe(n,a,t.statements)},297:function(t,n,a){return oe(n,a,t.statements)},256:function(t,n,a){return P(n,t.label)||P(n,t.statement)},257:function(t,n,a){return P(n,t.expression)},258:function(t,n,a){return P(n,t.tryBlock)||P(n,t.catchClause)||P(n,t.finallyBlock)},299:function(t,n,a){return P(n,t.variableDeclaration)||P(n,t.block)},170:function(t,n,a){return P(n,t.expression)},263:Q6,231:Q6,264:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||oe(n,a,t.heritageClauses)||oe(n,a,t.members)},265:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.typeParameters)||P(n,t.type)},266:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||oe(n,a,t.members)},306:function(t,n,a){return P(n,t.name)||P(n,t.initializer)},267:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.body)},271:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)||P(n,t.moduleReference)},272:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.importClause)||P(n,t.moduleSpecifier)||P(n,t.attributes)},273:function(t,n,a){return P(n,t.name)||P(n,t.namedBindings)},300:function(t,n,a){return oe(n,a,t.elements)},301:function(t,n,a){return P(n,t.name)||P(n,t.value)},270:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.name)},274:function(t,n,a){return P(n,t.name)},280:function(t,n,a){return P(n,t.name)},275:Y6,279:Y6,278:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.exportClause)||P(n,t.moduleSpecifier)||P(n,t.attributes)},276:K6,281:K6,277:function(t,n,a){return oe(n,a,t.modifiers)||P(n,t.expression)},228:function(t,n,a){return P(n,t.head)||oe(n,a,t.templateSpans)},239:function(t,n,a){return P(n,t.expression)||P(n,t.literal)},203:function(t,n,a){return P(n,t.head)||oe(n,a,t.templateSpans)},204:function(t,n,a){return P(n,t.type)||P(n,t.literal)},167:function(t,n,a){return P(n,t.expression)},298:function(t,n,a){return oe(n,a,t.types)},233:function(t,n,a){return P(n,t.expression)||oe(n,a,t.typeArguments)},283:function(t,n,a){return P(n,t.expression)},282:function(t,n,a){return oe(n,a,t.modifiers)},361:function(t,n,a){return oe(n,a,t.elements)},284:function(t,n,a){return P(n,t.openingElement)||oe(n,a,t.children)||P(n,t.closingElement)},288:function(t,n,a){return P(n,t.openingFragment)||oe(n,a,t.children)||P(n,t.closingFragment)},285:Z6,286:Z6,292:function(t,n,a){return oe(n,a,t.properties)},291:function(t,n,a){return P(n,t.name)||P(n,t.initializer)},293:function(t,n,a){return P(n,t.expression)},294:function(t,n,a){return P(n,t.dotDotDotToken)||P(n,t.expression)},287:function(t,n,a){return P(n,t.tagName)},295:function(t,n,a){return P(n,t.namespace)||P(n,t.name)},190:Ao,191:Ao,316:Ao,322:Ao,321:Ao,323:Ao,325:Ao,324:function(t,n,a){return oe(n,a,t.parameters)||P(n,t.type)},327:function(t,n,a){return(typeof t.comment=="string"?void 0:oe(n,a,t.comment))||oe(n,a,t.tags)},354:function(t,n,a){return P(n,t.tagName)||P(n,t.name)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},317:function(t,n,a){return P(n,t.name)},318:function(t,n,a){return P(n,t.left)||P(n,t.right)},348:ev,355:ev,337:function(t,n,a){return P(n,t.tagName)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},336:function(t,n,a){return P(n,t.tagName)||P(n,t.class)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},335:function(t,n,a){return P(n,t.tagName)||P(n,t.class)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},352:function(t,n,a){return P(n,t.tagName)||P(n,t.constraint)||oe(n,a,t.typeParameters)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},353:function(t,n,a){return P(n,t.tagName)||(t.typeExpression&&t.typeExpression.kind===316?P(n,t.typeExpression)||P(n,t.fullName)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment)):P(n,t.fullName)||P(n,t.typeExpression)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment)))},345:function(t,n,a){return P(n,t.tagName)||P(n,t.fullName)||P(n,t.typeExpression)||(typeof t.comment=="string"?void 0:oe(n,a,t.comment))},349:ko,351:ko,350:ko,347:ko,357:ko,356:ko,346:ko,330:function(t,n,a){return wn(t.typeParameters,n)||wn(t.parameters,n)||P(n,t.type)},331:ny,332:ny,333:ny,329:function(t,n,a){return wn(t.jsDocPropertyTags,n)},334:Qa,339:Qa,340:Qa,341:Qa,342:Qa,343:Qa,338:Qa,344:Qa,360:tj},(e=>{var t=ss(99,!0),n=40960,a,_,p,m,y;function u(c){return Dr++,c}var x={createBaseSourceFileNode:c=>u(new y(c,0,0)),createBaseIdentifierNode:c=>u(new p(c,0,0)),createBasePrivateIdentifierNode:c=>u(new m(c,0,0)),createBaseTokenNode:c=>u(new _(c,0,0)),createBaseNode:c=>u(new a(c,0,0))},d=Dd(11,x),{createNodeArray:S,createNumericLiteral:T,createStringLiteral:A,createLiteralLikeNode:N,createIdentifier:q,createPrivateIdentifier:Q,createToken:se,createArrayLiteralExpression:fe,createObjectLiteralExpression:F,createPropertyAccessExpression:W,createPropertyAccessChain:Se,createElementAccessExpression:Qe,createElementAccessChain:Be,createCallExpression:st,createCallChain:_t,createNewExpression:hn,createParenthesizedExpression:yn,createBlock:fi,createVariableStatement:gn,createExpressionStatement:cr,createIfStatement:He,createWhileStatement:Qn,createForStatement:Gr,createForOfStatement:vt,createVariableDeclaration:Jn,createVariableDeclarationList:Ar}=d,Ht,rn,at,kr,an,xt,ut,Gt,cn,ht,Dr,Tt,Rn,yt,jn,ct,Kt=!0,Zt=!1;function lr(c,h,b,E,k=!1,J,Y,_e=0){var re;if(J=jS(c,J),J===6){let pe=Xr(c,h,b,E,k);return convertToJson(pe,(re=pe.statements[0])==null?void 0:re.expression,pe.parseDiagnostics,!1,void 0),pe.referencedFiles=Je,pe.typeReferenceDirectives=Je,pe.libReferenceDirectives=Je,pe.amdDependencies=Je,pe.hasNoDefaultLib=!1,pe.pragmas=gg,pe}Yn(c,h,b,E,J,_e);let ne=Ji(b,k,J,Y||q8,_e);return Kn(),ne}e.parseSourceFile=lr;function di(c,h){Yn("",c,h,void 0,1,0),O();let b=Ba(!0),E=f()===1&&!ut.length;return Kn(),E?b:void 0}e.parseIsolatedEntityName=di;function Xr(c,h,b=2,E,k=!1){Yn(c,h,b,E,6,0),rn=ct,O();let J=v(),Y,_e;if(f()===1)Y=zt([],J,J),_e=bn();else{let pe;for(;f()!==1;){let Oe;switch(f()){case 23:Oe=jc();break;case 112:case 97:case 106:Oe=bn();break;case 41:ve(()=>O()===9&&O()!==59)?Oe=kc():Oe=Ls();break;case 9:case 11:if(ve(()=>O()!==59)){Oe=Yr();break}default:Oe=Ls();break}pe&&$t(pe)?pe.push(Oe):pe?pe=[pe,Oe]:(pe=Oe,f()!==1&&Ne(B.Unexpected_token))}let Ue=$t(pe)?M(fe(pe),J):I.checkDefined(pe),Fe=cr(Ue);M(Fe,J),Y=zt([Fe],J),_e=Qr(1,B.Unexpected_token)}let re=ye(c,2,6,!1,Y,_e,rn,gr);k&&ie(re),re.nodeCount=Dr,re.identifierCount=Rn,re.identifiers=Tt,re.parseDiagnostics=Ya(ut,re),Gt&&(re.jsDocDiagnostics=Ya(Gt,re));let ne=re;return Kn(),ne}e.parseJsonText=Xr;function Yn(c,h,b,E,k,J){switch(a=Ct.getNodeConstructor(),_=Ct.getTokenConstructor(),p=Ct.getIdentifierConstructor(),m=Ct.getPrivateIdentifierConstructor(),y=Ct.getSourceFileConstructor(),Ht=br(c),at=h,kr=b,cn=E,an=k,xt=q0(k),ut=[],yt=0,Tt=new Map,Rn=0,Dr=0,rn=0,Kt=!0,an){case 1:case 2:ct=524288;break;case 6:ct=134742016;break;default:ct=0;break}Zt=!1,t.setText(at),t.setOnError(R),t.setScriptTarget(kr),t.setLanguageVariant(xt),t.setScriptKind(an),t.setJSDocParsingMode(J)}function Kn(){t.clearCommentDirectives(),t.setText(""),t.setOnError(void 0),t.setScriptKind(0),t.setJSDocParsingMode(0),at=void 0,kr=void 0,cn=void 0,an=void 0,xt=void 0,rn=0,ut=void 0,Gt=void 0,yt=0,Tt=void 0,jn=void 0,Kt=!0}function Ji(c,h,b,E,k){let J=W8(Ht);J&&(ct|=33554432),rn=ct,O();let Y=pr(0,Sn);I.assert(f()===1);let _e=w(),re=De(bn(),_e),ne=ye(Ht,c,b,J,Y,re,rn,E);return V8(ne,at),H8(ne,pe),ne.commentDirectives=t.getCommentDirectives(),ne.nodeCount=Dr,ne.identifierCount=Rn,ne.identifiers=Tt,ne.parseDiagnostics=Ya(ut,ne),ne.jsDocParsingMode=k,Gt&&(ne.jsDocDiagnostics=Ya(Gt,ne)),h&&ie(ne),ne;function pe(Ue,Fe,Oe){ut.push(Po(Ht,at,Ue,Fe,Oe))}}let Pr=!1;function De(c,h){if(!h)return c;I.assert(!c.jsDoc);let b=wa(qT(c,at),E=>gf.parseJSDocComment(c,E.pos,E.end-E.pos));return b.length&&(c.jsDoc=b),Pr&&(Pr=!1,c.flags|=536870912),c}function U(c){let h=cn,b=Vf.createSyntaxCursor(c);cn={currentNode:pe};let E=[],k=ut;ut=[];let J=0,Y=re(c.statements,0);for(;Y!==-1;){let Ue=c.statements[J],Fe=c.statements[Y];zn(E,c.statements,J,Y),J=ne(c.statements,Y);let Oe=ul(k,qn=>qn.start>=Ue.pos),xn=Oe>=0?ul(k,qn=>qn.start>=Fe.pos,Oe):-1;Oe>=0&&zn(ut,k,Oe,xn>=0?xn:void 0),ln(()=>{let qn=ct;for(ct|=65536,t.resetTokenState(Fe.pos),O();f()!==1;){let vi=t.getTokenFullStart(),Zr=ws(0,Sn);if(E.push(Zr),vi===t.getTokenFullStart()&&O(),J>=0){let Jr=c.statements[J];if(Zr.end===Jr.pos)break;Zr.end>Jr.pos&&(J=ne(c.statements,J+1))}}ct=qn},2),Y=J>=0?re(c.statements,J):-1}if(J>=0){let Ue=c.statements[J];zn(E,c.statements,J);let Fe=ul(k,Oe=>Oe.start>=Ue.pos);Fe>=0&&zn(ut,k,Fe)}return cn=h,d.updateSourceFile(c,We(S(E),c.statements));function _e(Ue){return!(Ue.flags&65536)&&!!(Ue.transformFlags&67108864)}function re(Ue,Fe){for(let Oe=Fe;Oe118}function Dt(){return f()===80?!0:f()===127&&er()||f()===135&&Dn()?!1:f()>118}function G(c,h,b=!0){return f()===c?(b&&O(),!0):(h?Ne(h):Ne(B._0_expected,en(c)),!1)}let La=Object.keys(pl).filter(c=>c.length>2);function Pe(c){if(i8(c)){jt(Mt(at,c.template.pos),c.template.end,B.Module_declaration_names_may_only_use_or_quoted_strings);return}let h=Ae(c)?Lt(c):void 0;if(!h||!Ig(h,kr)){Ne(B._0_expected,en(27));return}let b=Mt(at,c.pos);switch(h){case"const":case"let":case"var":jt(b,c.end,B.Variable_declaration_not_allowed_at_this_location);return;case"declare":return;case"interface":ot(B.Interface_name_cannot_be_0,B.Interface_must_be_given_a_name,19);return;case"is":jt(b,t.getTokenStart(),B.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);return;case"module":case"namespace":ot(B.Namespace_name_cannot_be_0,B.Namespace_must_be_given_a_name,19);return;case"type":ot(B.Type_alias_name_cannot_be_0,B.Type_alias_must_be_given_a_name,64);return}let E=Iv(h,La,k=>k)??un(h);if(E){jt(b,c.end,B.Unknown_keyword_or_identifier_Did_you_mean_0,E);return}f()!==0&&jt(b,c.end,B.Unexpected_keyword_or_identifier)}function ot(c,h,b){f()===b?Ne(h):Ne(c,t.getTokenValue())}function un(c){for(let h of La)if(c.length>h.length+2&&Hn(c,h))return`${h} ${c.slice(h.length)}`}function ur(c,h,b){if(f()===60&&!t.hasPrecedingLineBreak()){Ne(B.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);return}if(f()===21){Ne(B.Cannot_start_a_function_call_in_a_type_annotation),O();return}if(h&&!hi()){b?Ne(B._0_expected,en(27)):Ne(B.Expected_for_property_initializer);return}if(!Ts()){if(b){Ne(B._0_expected,en(27));return}Pe(c)}}function Ja(c){return f()===c?(ue(),!0):(I.assert(Rf(c)),Ne(B._0_expected,en(c)),!1)}function Nr(c,h,b,E){if(f()===h){O();return}let k=Ne(B._0_expected,en(h));b&&k&&ol(k,Po(Ht,at,E,1,B.The_parser_expected_to_find_a_1_to_match_the_0_token_here,en(c),en(h)))}function Re(c){return f()===c?(O(),!0):!1}function dt(c){if(f()===c)return bn()}function mi(c){if(f()===c)return r1()}function Qr(c,h,b){return dt(c)||Bn(c,!1,h||B._0_expected,b||en(c))}function n1(c){let h=mi(c);return h||(I.assert(Rf(c)),Bn(c,!1,B._0_expected,en(c)))}function bn(){let c=v(),h=f();return O(),M(se(h),c)}function r1(){let c=v(),h=f();return ue(),M(se(h),c)}function hi(){return f()===27?!0:f()===20||f()===1||t.hasPrecedingLineBreak()}function Ts(){return hi()?(f()===27&&O(),!0):!1}function Pn(){return Ts()||G(27)}function zt(c,h,b,E){let k=S(c,E);return Za(k,h,b??t.getTokenFullStart()),k}function M(c,h,b){return Za(c,h,b??t.getTokenFullStart()),ct&&(c.flags|=ct),Zt&&(Zt=!1,c.flags|=262144),c}function Bn(c,h,b,...E){h?oa(t.getTokenFullStart(),0,b,...E):b&&Ne(b,...E);let k=v(),J=c===80?q("",void 0):wl(c)?d.createTemplateLiteralLikeNode(c,"","",void 0):c===9?T("",void 0):c===11?A("",void 0):c===282?d.createMissingDeclaration():se(c);return M(J,k)}function sa(c){let h=Tt.get(c);return h===void 0&&Tt.set(c,h=c),h}function yi(c,h,b){if(c){Rn++;let _e=v(),re=f(),ne=sa(t.getTokenValue()),pe=t.hasExtendedUnicodeEscape();return X(),M(q(ne,re,pe),_e)}if(f()===81)return Ne(b||B.Private_identifiers_are_not_allowed_outside_class_bodies),yi(!0);if(f()===0&&t.tryScan(()=>t.reScanInvalidIdentifier()===80))return yi(!0);Rn++;let E=f()===1,k=t.isReservedWord(),J=t.getTokenText(),Y=k?B.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here:B.Identifier_expected;return Bn(80,E,h||Y,J)}function X_(c){return yi(Ir(),void 0,c)}function Ft(c,h){return yi(Dt(),c,h)}function vn(c){return yi(wt(f()),c)}function Ra(){return(t.hasUnicodeEscape()||t.hasExtendedUnicodeEscape())&&Ne(B.Unicode_escape_sequence_cannot_appear_here),yi(wt(f()))}function _a(){return wt(f())||f()===11||f()===9}function yu(){return wt(f())||f()===11}function i1(c){if(f()===11||f()===9){let h=Yr();return h.text=sa(h.text),h}return c&&f()===23?a1():f()===81?Ss():vn()}function ca(){return i1(!0)}function a1(){let c=v();G(23);let h=z(Bt);return G(24),M(d.createComputedPropertyName(h),c)}function Ss(){let c=v(),h=Q(sa(t.getTokenValue()));return O(),M(h,c)}function ja(c){return f()===c&&ft(gu)}function $_(){return O(),t.hasPrecedingLineBreak()?!1:gi()}function gu(){switch(f()){case 87:return O()===94;case 95:return O(),f()===90?ve(vu):f()===156?ve(o1):fo();case 90:return vu();case 126:case 139:case 153:return O(),gi();default:return $_()}}function fo(){return f()===60||f()!==42&&f()!==130&&f()!==19&&gi()}function o1(){return O(),fo()}function bu(){return Ei(f())&&ft(gu)}function gi(){return f()===23||f()===19||f()===42||f()===26||_a()}function vu(){return O(),f()===86||f()===100||f()===120||f()===60||f()===128&&ve(sh)||f()===134&&ve(Bc)}function Fa(c,h){if(Z_(c))return!0;switch(c){case 0:case 1:case 3:return!(f()===27&&h)&&Uc();case 2:return f()===84||f()===90;case 4:return ve(Hu);case 5:return ve(hh)||f()===27&&!h;case 6:return f()===23||_a();case 12:switch(f()){case 23:case 42:case 26:case 25:return!0;default:return _a()}case 18:return _a();case 9:return f()===23||f()===26||_a();case 24:return yu();case 7:return f()===19?ve(Tu):h?Dt()&&!Y_():xc()&&!Y_();case 8:return Bs();case 10:return f()===28||f()===26||Bs();case 19:return f()===103||f()===87||Dt();case 15:switch(f()){case 28:case 25:return!0}case 11:return f()===26||Ui();case 16:return ks(!1);case 17:return ks(!0);case 20:case 21:return f()===28||la();case 22:return _f();case 23:return f()===161&&ve(uh)?!1:wt(f());case 13:return wt(f())||f()===19;case 14:return!0;case 25:return!0;case 26:return I.fail("ParsingContext.Count used as a context");default:I.assertNever(c,"Non-exhaustive case in 'isListElement'.")}}function Tu(){if(I.assert(f()===19),O()===20){let c=O();return c===28||c===19||c===96||c===119}return!0}function xs(){return O(),Dt()}function Q_(){return O(),wt(f())}function s1(){return O(),Yv(f())}function Y_(){return f()===119||f()===96?ve(Su):!1}function Su(){return O(),Ui()}function xu(){return O(),la()}function ji(c){if(f()===1)return!0;switch(c){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 23:case 24:return f()===20;case 3:return f()===20||f()===84||f()===90;case 7:return f()===19||f()===96||f()===119;case 8:return _1();case 19:return f()===32||f()===21||f()===19||f()===96||f()===119;case 11:return f()===22||f()===27;case 15:case 21:case 10:return f()===24;case 17:case 16:case 18:return f()===22||f()===24;case 20:return f()!==28;case 22:return f()===19||f()===20;case 13:return f()===32||f()===44;case 14:return f()===30&&ve(ff);default:return!1}}function _1(){return!!(hi()||Cc(f())||f()===39)}function K_(){I.assert(yt,"Missing parsing context");for(let c=0;c<26;c++)if(yt&1<=0)}function u1(c){return c===6?B.An_enum_member_name_must_be_followed_by_a_or:void 0}function Or(){let c=zt([],v());return c.isMissingList=!0,c}function p1(c){return!!c.isMissingList}function Fi(c,h,b,E){if(G(b)){let k=Tn(c,h);return G(E),k}return Or()}function Ba(c,h){let b=v(),E=c?vn(h):Ft(h);for(;Re(25)&&f()!==30;)E=M(d.createQualifiedName(E,Es(c,!1,!0)),b);return E}function ac(c,h){return M(d.createQualifiedName(c,h),c.pos)}function Es(c,h,b){if(t.hasPrecedingLineBreak()&&wt(f())&&ve(Js))return Bn(80,!0,B.Identifier_expected);if(f()===81){let E=Ss();return h?E:Bn(80,!0,B.Identifier_expected)}return c?b?vn():Ra():Ft()}function oc(c){let h=v(),b=[],E;do E=d1(c),b.push(E);while(E.literal.kind===17);return zt(b,h)}function Du(c){let h=v();return M(d.createTemplateExpression(Iu(c),oc(c)),h)}function sc(){let c=v();return M(d.createTemplateLiteralType(Iu(!1),Pu()),c)}function Pu(){let c=v(),h=[],b;do b=f1(),h.push(b);while(b.literal.kind===17);return zt(h,c)}function f1(){let c=v();return M(d.createTemplateLiteralTypeSpan(gt(),_c(!1)),c)}function _c(c){return f()===20?(xe(c),Cs()):Qr(18,B._0_expected,en(20))}function d1(c){let h=v();return M(d.createTemplateSpan(z(Bt),_c(c)),h)}function Yr(){return mo(f())}function Iu(c){!c&&t.getTokenFlags()&26656&&xe(!1);let h=mo(f());return I.assert(h.kind===16,"Template head has wrong token kind"),h}function Cs(){let c=mo(f());return I.assert(c.kind===17||c.kind===18,"Template fragment has wrong token kind"),c}function Nu(c){let h=c===15||c===18,b=t.getTokenText();return b.substring(1,b.length-(t.isUnterminated()?0:h?1:2))}function mo(c){let h=v(),b=wl(c)?d.createTemplateLiteralLikeNode(c,t.getTokenValue(),Nu(c),t.getTokenFlags()&7176):c===9?T(t.getTokenValue(),t.getNumericLiteralFlags()):c===11?A(t.getTokenValue(),void 0,t.hasExtendedUnicodeEscape()):jg(c)?N(c,t.getTokenValue()):I.fail();return t.hasExtendedUnicodeEscape()&&(b.hasExtendedUnicodeEscape=!0),t.isUnterminated()&&(b.isUnterminated=!0),O(),M(b,h)}function cc(){return Ba(!0,B.Type_expected)}function Ua(){if(!t.hasPrecedingLineBreak()&&Ye()===30)return Fi(20,gt,30,32)}function As(){let c=v();return M(d.createTypeReferenceNode(cc(),Ua()),c)}function lc(c){switch(c.kind){case 183:return Vi(c.typeName);case 184:case 185:{let{parameters:h,type:b}=c;return p1(h)||lc(b)}case 196:return lc(c.type);default:return!1}}function m1(c){return O(),M(d.createTypePredicateNode(void 0,c,gt()),c.pos)}function Ou(){let c=v();return O(),M(d.createThisTypeNode(),c)}function Mu(){let c=v();return O(),M(d.createJSDocAllType(),c)}function h1(){let c=v();return O(),M(d.createJSDocNonNullableType(np(),!1),c)}function Lu(){let c=v();return O(),f()===28||f()===20||f()===22||f()===32||f()===64||f()===52?M(d.createJSDocUnknownType(),c):M(d.createJSDocNullableType(gt(),!1),c)}function y1(){let c=v(),h=w();if(ve(zs)){O();let b=bi(36),E=Mr(59,!1);return De(M(d.createJSDocFunctionType(b,E),c),h)}return M(d.createTypeReferenceNode(vn(),void 0),c)}function Ju(){let c=v(),h;return(f()===110||f()===105)&&(h=vn(),G(59)),M(d.createParameterDeclaration(void 0,void 0,h,void 0,ho(),void 0),c)}function ho(){t.setInJSDocType(!0);let c=v();if(Re(144)){let E=d.createJSDocNamepathType(void 0);e:for(;;)switch(f()){case 20:case 1:case 28:case 5:break e;default:ue()}return t.setInJSDocType(!1),M(E,c)}let h=Re(26),b=Tc();return t.setInJSDocType(!1),h&&(b=M(d.createJSDocVariadicType(b),c)),f()===64?(O(),M(d.createJSDocOptionalType(b),c)):b}function g1(){let c=v();G(114);let h=Ba(!0),b=t.hasPrecedingLineBreak()?void 0:Xa();return M(d.createTypeQueryNode(h,b),c)}function Ru(){let c=v(),h=Lr(!1,!0),b=Ft(),E,k;Re(96)&&(la()||!Ui()?E=gt():k=Dc());let J=Re(64)?gt():void 0,Y=d.createTypeParameterDeclaration(h,b,E,J);return Y.expression=k,M(Y,c)}function fr(){if(f()===30)return Fi(19,Ru,30,32)}function ks(c){return f()===26||Bs()||Ei(f())||f()===60||la(!c)}function ju(c){let h=To(B.Private_identifiers_cannot_be_used_as_parameters);return _m(h)===0&&!Ze(c)&&Ei(f())&&O(),h}function Fu(){return Ir()||f()===23||f()===19}function uc(c){return pc(c)}function Bu(c){return pc(c,!1)}function pc(c,h=!0){let b=v(),E=w(),k=c?nt(()=>Lr(!0)):kt(()=>Lr(!0));if(f()===110){let re=d.createParameterDeclaration(k,void 0,yi(!0),void 0,Bi(),void 0),ne=y_(k);return ne&&Fn(ne,B.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters),De(M(re,b),E)}let J=Kt;Kt=!1;let Y=dt(26);if(!h&&!Fu())return;let _e=De(M(d.createParameterDeclaration(k,Y,ju(k),dt(58),Bi(),qi()),b),E);return Kt=J,_e}function Mr(c,h){if(Uu(c,h))return te(Tc)}function Uu(c,h){return c===39?(G(c),!0):Re(59)?!0:h&&f()===39?(Ne(B._0_expected,en(59)),O(),!0):!1}function Ds(c,h){let b=er(),E=Dn();$e(!!(c&1)),St(!!(c&2));let k=c&32?Tn(17,Ju):Tn(16,()=>h?uc(E):Bu(E));return $e(b),St(E),k}function bi(c){if(!G(21))return Or();let h=Ds(c,!0);return G(22),h}function yo(){Re(28)||Pn()}function qu(c){let h=v(),b=w();c===180&&G(105);let E=fr(),k=bi(4),J=Mr(59,!0);yo();let Y=c===179?d.createCallSignature(E,k,J):d.createConstructSignature(E,k,J);return De(M(Y,h),b)}function zu(){return f()===23&&ve(qa)}function qa(){if(O(),f()===26||f()===24)return!0;if(Ei(f())){if(O(),Dt())return!0}else if(Dt())O();else return!1;return f()===59||f()===28?!0:f()!==58?!1:(O(),f()===59||f()===28||f()===24)}function Wu(c,h,b){let E=Fi(16,()=>uc(!1),23,24),k=Bi();yo();let J=d.createIndexSignature(b,E,k);return De(M(J,c),h)}function Vu(c,h,b){let E=ca(),k=dt(58),J;if(f()===21||f()===30){let Y=fr(),_e=bi(4),re=Mr(59,!0);J=d.createMethodSignature(b,E,k,Y,_e,re)}else{let Y=Bi();J=d.createPropertySignature(b,E,k,Y),f()===64&&(J.initializer=qi())}return yo(),De(M(J,c),h)}function Hu(){if(f()===21||f()===30||f()===139||f()===153)return!0;let c=!1;for(;Ei(f());)c=!0,O();return f()===23?!0:(_a()&&(c=!0,O()),c?f()===21||f()===30||f()===58||f()===59||f()===28||hi():!1)}function fc(){if(f()===21||f()===30)return qu(179);if(f()===105&&ve(go))return qu(180);let c=v(),h=w(),b=Lr(!1);return ja(139)?fa(c,h,b,177,4):ja(153)?fa(c,h,b,178,4):zu()?Wu(c,h,b):Vu(c,h,b)}function go(){return O(),f()===21||f()===30}function b1(){return O()===25}function dc(){switch(O()){case 21:case 30:case 25:return!0}return!1}function v1(){let c=v();return M(d.createTypeLiteralNode(mc()),c)}function mc(){let c;return G(19)?(c=pr(4,fc),G(20)):c=Or(),c}function T1(){return O(),f()===40||f()===41?O()===148:(f()===148&&O(),f()===23&&xs()&&O()===103)}function Gu(){let c=v(),h=vn();G(103);let b=gt();return M(d.createTypeParameterDeclaration(void 0,h,b,void 0),c)}function S1(){let c=v();G(19);let h;(f()===148||f()===40||f()===41)&&(h=bn(),h.kind!==148&&G(148)),G(23);let b=Gu(),E=Re(130)?gt():void 0;G(24);let k;(f()===58||f()===40||f()===41)&&(k=bn(),k.kind!==58&&G(58));let J=Bi();Pn();let Y=pr(4,fc);return G(20),M(d.createMappedTypeNode(h,b,E,k,J,Y),c)}function hc(){let c=v();if(Re(26))return M(d.createRestTypeNode(gt()),c);let h=gt();if(y8(h)&&h.pos===h.type.pos){let b=d.createOptionalTypeNode(h.type);return We(b,h),b.flags=h.flags,b}return h}function Xu(){return O()===59||f()===58&&O()===59}function $u(){return f()===26?wt(O())&&Xu():wt(f())&&Xu()}function x1(){if(ve($u)){let c=v(),h=w(),b=dt(26),E=vn(),k=dt(58);G(59);let J=hc(),Y=d.createNamedTupleMember(b,E,k,J);return De(M(Y,c),h)}return hc()}function Qu(){let c=v();return M(d.createTupleTypeNode(Fi(21,x1,23,24)),c)}function w1(){let c=v();G(21);let h=gt();return G(22),M(d.createParenthesizedType(h),c)}function Yu(){let c;if(f()===128){let h=v();O();let b=M(se(128),h);c=zt([b],h)}return c}function Ku(){let c=v(),h=w(),b=Yu(),E=Re(105);I.assert(!b||E,"Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");let k=fr(),J=bi(4),Y=Mr(39,!1),_e=E?d.createConstructorTypeNode(b,k,J,Y):d.createFunctionTypeNode(k,J,Y);return De(M(_e,c),h)}function yc(){let c=bn();return f()===25?void 0:c}function Zu(c){let h=v();c&&O();let b=f()===112||f()===97||f()===106?bn():mo(f());return c&&(b=M(d.createPrefixUnaryExpression(41,b),h)),M(d.createLiteralTypeNode(b),h)}function ep(){return O(),f()===102}function tp(){rn|=4194304;let c=v(),h=Re(114);G(102),G(21);let b=gt(),E;if(Re(28)){let Y=t.getTokenStart();G(19);let _e=f();if(_e===118||_e===132?O():Ne(B._0_expected,en(118)),G(59),E=Qc(_e,!0),!G(20)){let re=Pi(ut);re&&re.code===B._0_expected.code&&ol(re,Po(Ht,at,Y,1,B.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}}G(22);let k=Re(25)?cc():void 0,J=Ua();return M(d.createImportTypeNode(b,E,k,J,h),c)}function gc(){return O(),f()===9||f()===10}function np(){switch(f()){case 133:case 159:case 154:case 150:case 163:case 155:case 136:case 157:case 146:case 151:return ft(yc)||As();case 67:t.reScanAsteriskEqualsToken();case 42:return Mu();case 61:t.reScanQuestionToken();case 58:return Lu();case 100:return y1();case 54:return h1();case 15:case 11:case 9:case 10:case 112:case 97:case 106:return Zu();case 41:return ve(gc)?Zu(!0):As();case 116:return bn();case 110:{let c=Ou();return f()===142&&!t.hasPrecedingLineBreak()?m1(c):c}case 114:return ve(ep)?tp():g1();case 19:return ve(T1)?S1():v1();case 23:return Qu();case 21:return w1();case 102:return tp();case 131:return ve(Js)?lp():As();case 16:return sc();default:return As()}}function la(c){switch(f()){case 133:case 159:case 154:case 150:case 163:case 136:case 148:case 155:case 158:case 116:case 157:case 106:case 110:case 114:case 146:case 19:case 23:case 30:case 52:case 51:case 105:case 11:case 9:case 10:case 112:case 97:case 151:case 42:case 58:case 54:case 26:case 140:case 102:case 131:case 15:case 16:return!0;case 100:return!c;case 41:return!c&&ve(gc);case 21:return!c&&ve(E1);default:return Dt()}}function E1(){return O(),f()===22||ks(!1)||la()}function rp(){let c=v(),h=np();for(;!t.hasPrecedingLineBreak();)switch(f()){case 54:O(),h=M(d.createJSDocNonNullableType(h,!0),c);break;case 58:if(ve(xu))return h;O(),h=M(d.createJSDocNullableType(h,!0),c);break;case 23:if(G(23),la()){let b=gt();G(24),h=M(d.createIndexedAccessTypeNode(h,b),c)}else G(24),h=M(d.createArrayTypeNode(h),c);break;default:return h}return h}function ip(c){let h=v();return G(c),M(d.createTypeOperatorNode(c,sp()),h)}function ap(){if(Re(96)){let c=Ee(gt);if(aa()||f()!==58)return c}}function C1(){let c=v(),h=Ft(),b=ft(ap),E=d.createTypeParameterDeclaration(void 0,h,b);return M(E,c)}function op(){let c=v();return G(140),M(d.createInferTypeNode(C1()),c)}function sp(){let c=f();switch(c){case 143:case 158:case 148:return ip(c);case 140:return op()}return te(rp)}function _p(c){if(vc()){let h=Ku(),b;return tu(h)?b=c?B.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type:B.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type:b=c?B.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type:B.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type,Fn(h,b),h}}function Ps(c,h,b){let E=v(),k=c===52,J=Re(c),Y=J&&_p(k)||h();if(f()===c||J){let _e=[Y];for(;Re(c);)_e.push(_p(k)||h());Y=M(b(zt(_e,E)),E)}return Y}function A1(){return Ps(51,sp,d.createIntersectionTypeNode)}function bc(){return Ps(52,A1,d.createUnionTypeNode)}function k1(){return O(),f()===105}function vc(){return f()===30||f()===21&&ve(D1)?!0:f()===105||f()===128&&ve(k1)}function cp(){if(Ei(f())&&Lr(!1),Dt()||f()===110)return O(),!0;if(f()===23||f()===19){let c=ut.length;return To(),c===ut.length}return!1}function D1(){return O(),!!(f()===22||f()===26||cp()&&(f()===59||f()===28||f()===58||f()===64||f()===22&&(O(),f()===39)))}function Tc(){let c=v(),h=Dt()&&ft(Sc),b=gt();return h?M(d.createTypePredicateNode(void 0,h,b),c):b}function Sc(){let c=Ft();if(f()===142&&!t.hasPrecedingLineBreak())return O(),c}function lp(){let c=v(),h=Qr(131),b=f()===110?Ou():Ft(),E=Re(142)?gt():void 0;return M(d.createTypePredicateNode(h,b,E),c)}function gt(){if(ct&81920)return Jt(81920,gt);if(vc())return Ku();let c=v(),h=bc();if(!aa()&&!t.hasPrecedingLineBreak()&&Re(96)){let b=Ee(gt);G(58);let E=te(gt);G(59);let k=te(gt);return M(d.createConditionalTypeNode(h,b,E,k),c)}return h}function Bi(){return Re(59)?gt():void 0}function xc(){switch(f()){case 110:case 108:case 106:case 112:case 97:case 9:case 10:case 11:case 15:case 16:case 21:case 23:case 19:case 100:case 86:case 105:case 44:case 69:case 80:return!0;case 102:return ve(dc);default:return Dt()}}function Ui(){if(xc())return!0;switch(f()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 46:case 47:case 30:case 135:case 127:case 81:case 60:return!0;default:return Ac()?!0:Dt()}}function up(){return f()!==19&&f()!==100&&f()!==86&&f()!==60&&Ui()}function Bt(){let c=$r();c&&Ut(!1);let h=v(),b=on(!0),E;for(;E=dt(28);)b=Ns(b,E,on(!0),h);return c&&Ut(!0),b}function qi(){return Re(64)?on(!0):void 0}function on(c){if(P1())return I1();let h=N1(c)||mp(c);if(h)return h;let b=v(),E=w(),k=Is(0);return k.kind===80&&f()===39?wc(b,k,c,E,void 0):jo(k)&&A_(ge())?Ns(k,bn(),on(c),b):gp(k,b,c)}function P1(){return f()===127?er()?!0:ve(zp):!1}function pp(){return O(),!t.hasPrecedingLineBreak()&&Dt()}function I1(){let c=v();return O(),!t.hasPrecedingLineBreak()&&(f()===42||Ui())?M(d.createYieldExpression(dt(42),on(!0)),c):M(d.createYieldExpression(void 0,void 0),c)}function wc(c,h,b,E,k){I.assert(f()===39,"parseSimpleArrowFunctionExpression should only have been called if we had a =>");let J=d.createParameterDeclaration(void 0,void 0,h,void 0,void 0,void 0);M(J,h.pos);let Y=zt([J],J.pos,J.end),_e=Qr(39),re=yp(!!k,b),ne=d.createArrowFunction(k,void 0,Y,void 0,_e,re);return De(M(ne,c),E)}function N1(c){let h=O1();if(h!==0)return h===1?Ec(!0,!0):ft(()=>dp(c))}function O1(){return f()===21||f()===30||f()===134?ve(fp):f()===39?1:0}function fp(){if(f()===134&&(O(),t.hasPrecedingLineBreak()||f()!==21&&f()!==30))return 0;let c=f(),h=O();if(c===21){if(h===22)switch(O()){case 39:case 59:case 19:return 1;default:return 0}if(h===23||h===19)return 2;if(h===26)return 1;if(Ei(h)&&h!==134&&ve(xs))return O()===130?0:1;if(!Dt()&&h!==110)return 0;switch(O()){case 59:return 1;case 58:return O(),f()===59||f()===28||f()===64||f()===22?1:0;case 28:case 64:case 22:return 2}return 0}else return I.assert(c===30),!Dt()&&f()!==87?0:xt===1?ve(()=>{Re(87);let E=O();if(E===96)switch(O()){case 64:case 32:case 44:return!1;default:return!0}else if(E===28||E===64)return!0;return!1})?1:0:2}function dp(c){let h=t.getTokenStart();if(jn!=null&&jn.has(h))return;let b=Ec(!1,c);return b||(jn||(jn=new Set)).add(h),b}function mp(c){if(f()===134&&ve(hp)===1){let h=v(),b=w(),E=af(),k=Is(0);return wc(h,k,c,b,E)}}function hp(){if(f()===134){if(O(),t.hasPrecedingLineBreak()||f()===39)return 0;let c=Is(0);if(!t.hasPrecedingLineBreak()&&c.kind===80&&f()===39)return 1}return 0}function Ec(c,h){let b=v(),E=w(),k=af(),J=Ze(k,_l)?2:0,Y=fr(),_e;if(G(21)){if(c)_e=Ds(J,c);else{let vi=Ds(J,c);if(!vi)return;_e=vi}if(!G(22)&&!c)return}else{if(!c)return;_e=Or()}let re=f()===59,ne=Mr(59,!1);if(ne&&!c&&lc(ne))return;let pe=ne;for(;(pe==null?void 0:pe.kind)===196;)pe=pe.type;let Ue=pe&&Rm(pe);if(!c&&f()!==39&&(Ue||f()!==19))return;let Fe=f(),Oe=Qr(39),xn=Fe===39||Fe===19?yp(Ze(k,_l),h):Ft();if(!h&&re&&f()!==59)return;let qn=d.createArrowFunction(k,Y,_e,ne,Oe,xn);return De(M(qn,b),E)}function yp(c,h){if(f()===19)return bo(c?2:0);if(f()!==27&&f()!==100&&f()!==86&&Uc()&&!up())return bo(16|(c?2:0));let b=Kt;Kt=!1;let E=c?nt(()=>on(h)):kt(()=>on(h));return Kt=b,E}function gp(c,h,b){let E=dt(58);if(!E)return c;let k;return M(d.createConditionalExpression(c,E,Jt(n,()=>on(!1)),k=Qr(59),Cl(k)?on(b):Bn(80,!1,B._0_expected,en(59))),h)}function Is(c){let h=v(),b=Dc();return bp(c,b,h)}function Cc(c){return c===103||c===165}function bp(c,h,b){for(;;){ge();let E=ml(f());if(!(f()===43?E>=c:E>c)||f()===103&&Ri())break;if(f()===130||f()===152){if(t.hasPrecedingLineBreak())break;{let J=f();O(),h=J===152?M1(h,gt()):L1(h,gt())}}else h=Ns(h,bn(),Is(E),b)}return h}function Ac(){return Ri()&&f()===103?!1:ml(f())>0}function M1(c,h){return M(d.createSatisfiesExpression(c,h),c.pos)}function Ns(c,h,b,E){return M(d.createBinaryExpression(c,h,b),E)}function L1(c,h){return M(d.createAsExpression(c,h),c.pos)}function kc(){let c=v();return M(d.createPrefixUnaryExpression(f(),$(ua)),c)}function J1(){let c=v();return M(d.createDeleteExpression($(ua)),c)}function vp(){let c=v();return M(d.createTypeOfExpression($(ua)),c)}function R1(){let c=v();return M(d.createVoidExpression($(ua)),c)}function Tp(){return f()===135?Dn()?!0:ve(zp):!1}function j1(){let c=v();return M(d.createAwaitExpression($(ua)),c)}function Dc(){if(Sp()){let b=v(),E=xp();return f()===43?bp(ml(f()),E,b):E}let c=f(),h=ua();if(f()===43){let b=Mt(at,h.pos),{end:E}=h;h.kind===216?jt(b,E,B.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):(I.assert(Rf(c)),jt(b,E,B.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,en(c)))}return h}function ua(){switch(f()){case 40:case 41:case 55:case 54:return kc();case 91:return J1();case 114:return vp();case 116:return R1();case 30:return xt===1?Wa(!0,void 0,void 0,!0):W1();case 135:if(Tp())return j1();default:return xp()}}function Sp(){switch(f()){case 40:case 41:case 55:case 54:case 91:case 114:case 116:case 135:return!1;case 30:if(xt!==1)return!1;default:return!0}}function xp(){if(f()===46||f()===47){let h=v();return M(d.createPrefixUnaryExpression(f(),$(za)),h)}else if(xt===1&&f()===30&&ve(s1))return Wa(!0);let c=za();if(I.assert(jo(c)),(f()===46||f()===47)&&!t.hasPrecedingLineBreak()){let h=f();return O(),M(d.createPostfixUnaryExpression(c,h),c.pos)}return c}function za(){let c=v(),h;return f()===102?ve(go)?(rn|=4194304,h=bn()):ve(b1)?(O(),O(),h=M(d.createMetaProperty(102,vn()),c),rn|=8388608):h=Pc():h=f()===108?Ic():Pc(),Va(c,h)}function Pc(){let c=v(),h=Op();return Ms(c,h,!0)}function Ic(){let c=v(),h=bn();if(f()===30){let b=v(),E=ft(Jc);E!==void 0&&(jt(b,v(),B.super_may_not_use_type_arguments),Un()||(h=d.createExpressionWithTypeArguments(h,E)))}return f()===21||f()===25||f()===23?h:(Qr(25,B.super_must_be_followed_by_an_argument_list_or_member_access),M(W(h,Es(!0,!0,!0)),c))}function Wa(c,h,b,E=!1){let k=v(),J=B1(c),Y;if(J.kind===286){let _e=wp(J),re,ne=_e[_e.length-1];if((ne==null?void 0:ne.kind)===284&&!Ai(ne.openingElement.tagName,ne.closingElement.tagName)&&Ai(J.tagName,ne.closingElement.tagName)){let pe=ne.children.end,Ue=M(d.createJsxElement(ne.openingElement,ne.children,M(d.createJsxClosingElement(M(q(""),pe,pe)),pe,pe)),ne.openingElement.pos,pe);_e=zt([..._e.slice(0,_e.length-1),Ue],_e.pos,pe),re=ne.closingElement}else re=z1(J,c),Ai(J.tagName,re.tagName)||(b&&Jo(b)&&Ai(re.tagName,b.tagName)?Fn(J.tagName,B.JSX_element_0_has_no_corresponding_closing_tag,n_(at,J.tagName)):Fn(re.tagName,B.Expected_corresponding_JSX_closing_tag_for_0,n_(at,J.tagName)));Y=M(d.createJsxElement(J,_e,re),k)}else J.kind===289?Y=M(d.createJsxFragment(J,wp(J),Dp(c)),k):(I.assert(J.kind===285),Y=J);if(!E&&c&&f()===30){let _e=typeof h>"u"?Y.pos:h,re=ft(()=>Wa(!0,_e));if(re){let ne=Bn(28,!1);return Ad(ne,re.pos,0),jt(Mt(at,_e),re.end,B.JSX_expressions_must_have_one_parent_element),M(d.createBinaryExpression(Y,ne,re),k)}}return Y}function F1(){let c=v(),h=d.createJsxText(t.getTokenValue(),ht===13);return ht=t.scanJsxToken(),M(h,c)}function Nc(c,h){switch(h){case 1:if(Jb(c))Fn(c,B.JSX_fragment_has_no_corresponding_closing_tag);else{let b=c.tagName,E=Math.min(Mt(at,b.pos),b.end);jt(E,b.end,B.JSX_element_0_has_no_corresponding_closing_tag,n_(at,c.tagName))}return;case 31:case 7:return;case 12:case 13:return F1();case 19:return Ap(!1);case 30:return Wa(!1,void 0,c);default:return I.assertNever(h)}}function wp(c){let h=[],b=v(),E=yt;for(yt|=16384;;){let k=Nc(c,ht=t.reScanJsxToken());if(!k||(h.push(k),Jo(c)&&(k==null?void 0:k.kind)===284&&!Ai(k.openingElement.tagName,k.closingElement.tagName)&&Ai(c.tagName,k.closingElement.tagName)))break}return yt=E,zt(h,b)}function Oc(){let c=v();return M(d.createJsxAttributes(pr(13,U1)),c)}function B1(c){let h=v();if(G(30),f()===32)return Nt(),M(d.createJsxOpeningFragment(),h);let b=Ep(),E=ct&524288?void 0:Xa(),k=Oc(),J;return f()===32?(Nt(),J=d.createJsxOpeningElement(b,E,k)):(G(44),G(32,void 0,!1)&&(c?O():Nt()),J=d.createJsxSelfClosingElement(b,E,k)),M(J,h)}function Ep(){let c=v(),h=Cp();if(B_(h))return h;let b=h;for(;Re(25);)b=M(W(b,Es(!0,!1,!1)),c);return b}function Cp(){let c=v();Xe();let h=f()===110,b=Ra();return Re(59)?(Xe(),M(d.createJsxNamespacedName(b,Ra()),c)):h?M(d.createToken(110),c):b}function Ap(c){let h=v();if(!G(19))return;let b,E;return f()!==20&&(c||(b=dt(26)),E=Bt()),c?G(20):G(20,void 0,!1)&&Nt(),M(d.createJsxExpression(b,E),h)}function U1(){if(f()===19)return q1();let c=v();return M(d.createJsxAttribute(Mc(),kp()),c)}function kp(){if(f()===64){if(Xt()===11)return Yr();if(f()===19)return Ap(!0);if(f()===30)return Wa(!0);Ne(B.or_JSX_element_expected)}}function Mc(){let c=v();Xe();let h=Ra();return Re(59)?(Xe(),M(d.createJsxNamespacedName(h,Ra()),c)):h}function q1(){let c=v();G(19),G(26);let h=Bt();return G(20),M(d.createJsxSpreadAttribute(h),c)}function z1(c,h){let b=v();G(31);let E=Ep();return G(32,void 0,!1)&&(h||!Ai(c.tagName,E)?O():Nt()),M(d.createJsxClosingElement(E),b)}function Dp(c){let h=v();return G(31),G(32,B.Expected_corresponding_closing_tag_for_JSX_fragment,!1)&&(c?O():Nt()),M(d.createJsxJsxClosingFragment(),h)}function W1(){I.assert(xt!==1,"Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments.");let c=v();G(30);let h=gt();G(32);let b=ua();return M(d.createTypeAssertion(h,b),c)}function Pp(){return O(),wt(f())||f()===23||Un()}function V1(){return f()===29&&ve(Pp)}function Os(c){if(c.flags&64)return!0;if(Uo(c)){let h=c.expression;for(;Uo(h)&&!(h.flags&64);)h=h.expression;if(h.flags&64){for(;Uo(c);)c.flags|=64,c=c.expression;return!0}}return!1}function H1(c,h,b){let E=Es(!0,!0,!0),k=b||Os(h),J=k?Se(h,b,E):W(h,E);if(k&&Vn(J.name)&&Fn(J.name,B.An_optional_chain_cannot_contain_private_identifiers),Cb(h)&&h.typeArguments){let Y=h.typeArguments.pos-1,_e=Mt(at,h.typeArguments.end)+1;jt(Y,_e,B.An_instantiation_expression_cannot_be_followed_by_a_property_access)}return M(J,c)}function Ip(c,h,b){let E;if(f()===24)E=Bn(80,!0,B.An_element_access_expression_should_take_an_argument);else{let J=z(Bt);Yi(J)&&(J.text=sa(J.text)),E=J}G(24);let k=b||Os(h)?Be(h,b,E):Qe(h,E);return M(k,c)}function Ms(c,h,b){for(;;){let E,k=!1;if(b&&V1()?(E=Qr(29),k=wt(f())):k=Re(25),k){h=H1(c,h,E);continue}if((E||!$r())&&Re(23)){h=Ip(c,h,E);continue}if(Un()){h=!E&&h.kind===233?Kr(c,h.expression,E,h.typeArguments):Kr(c,h,E,void 0);continue}if(!E){if(f()===54&&!t.hasPrecedingLineBreak()){O(),h=M(d.createNonNullExpression(h),c);continue}let J=ft(Jc);if(J){h=M(d.createExpressionWithTypeArguments(h,J),c);continue}}return h}}function Un(){return f()===15||f()===16}function Kr(c,h,b,E){let k=d.createTaggedTemplateExpression(h,E,f()===15?(xe(!0),Yr()):Du(!0));return(b||h.flags&64)&&(k.flags|=64),k.questionDotToken=b,M(k,c)}function Va(c,h){for(;;){h=Ms(c,h,!0);let b,E=dt(29);if(E&&(b=ft(Jc),Un())){h=Kr(c,h,E,b);continue}if(b||f()===21){!E&&h.kind===233&&(b=h.typeArguments,h=h.expression);let k=Lc(),J=E||Os(h)?_t(h,E,b,k):st(h,b,k);h=M(J,c);continue}if(E){let k=Bn(80,!1,B.Identifier_expected);h=M(Se(h,E,k),c)}break}return h}function Lc(){G(21);let c=Tn(11,X1);return G(22),c}function Jc(){if(ct&524288||Ye()!==30)return;O();let c=Tn(20,gt);if(ge()===32)return O(),c&&Np()?c:void 0}function Np(){switch(f()){case 21:case 15:case 16:return!0;case 30:case 32:case 40:case 41:return!1}return t.hasPrecedingLineBreak()||Ac()||!Ui()}function Op(){switch(f()){case 15:t.getTokenFlags()&26656&&xe(!1);case 9:case 10:case 11:return Yr();case 110:case 108:case 106:case 112:case 97:return bn();case 21:return Mp();case 23:return jc();case 19:return Ls();case 134:if(!ve(Bc))break;return Lp();case 60:return of();case 86:return vh();case 100:return Lp();case 105:return Q1();case 44:case 69:if(Le()===14)return Yr();break;case 16:return Du(!1);case 81:return Ss()}return Ft(B.Expression_expected)}function Mp(){let c=v(),h=w();G(21);let b=z(Bt);return G(22),De(M(yn(b),c),h)}function G1(){let c=v();G(26);let h=on(!0);return M(d.createSpreadElement(h),c)}function Rc(){return f()===26?G1():f()===28?M(d.createOmittedExpression(),v()):on(!0)}function X1(){return Jt(n,Rc)}function jc(){let c=v(),h=t.getTokenStart(),b=G(23),E=t.hasPrecedingLineBreak(),k=Tn(15,Rc);return Nr(23,24,b,h),M(fe(k,E),c)}function $1(){let c=v(),h=w();if(dt(26)){let pe=on(!0);return De(M(d.createSpreadAssignment(pe),c),h)}let b=Lr(!0);if(ja(139))return fa(c,h,b,177,0);if(ja(153))return fa(c,h,b,178,0);let E=dt(42),k=Dt(),J=ca(),Y=dt(58),_e=dt(54);if(E||f()===21||f()===30)return Hc(c,h,b,E,J,Y,_e);let re;if(k&&f()!==59){let pe=dt(64),Ue=pe?z(()=>on(!0)):void 0;re=d.createShorthandPropertyAssignment(J,Ue),re.equalsToken=pe}else{G(59);let pe=z(()=>on(!0));re=d.createPropertyAssignment(J,pe)}return re.modifiers=b,re.questionToken=Y,re.exclamationToken=_e,De(M(re,c),h)}function Ls(){let c=v(),h=t.getTokenStart(),b=G(19),E=t.hasPrecedingLineBreak(),k=Tn(12,$1,!0);return Nr(19,20,b,h),M(F(k,E),c)}function Lp(){let c=$r();Ut(!1);let h=v(),b=w(),E=Lr(!1);G(100);let k=dt(42),J=k?1:0,Y=Ze(E,_l)?2:0,_e=J&&Y?qt(Ha):J?je(Ha):Y?nt(Ha):Ha(),re=fr(),ne=bi(J|Y),pe=Mr(59,!1),Ue=bo(J|Y);Ut(c);let Fe=d.createFunctionExpression(E,k,_e,re,ne,pe,Ue);return De(M(Fe,h),b)}function Ha(){return Ir()?X_():void 0}function Q1(){let c=v();if(G(105),Re(25)){let J=vn();return M(d.createMetaProperty(105,J),c)}let h=v(),b=Ms(h,Op(),!1),E;b.kind===233&&(E=b.typeArguments,b=b.expression),f()===29&&Ne(B.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0,n_(at,b));let k=f()===21?Lc():void 0;return M(hn(b,E,k),c)}function pa(c,h){let b=v(),E=w(),k=t.getTokenStart(),J=G(19,h);if(J||c){let Y=t.hasPrecedingLineBreak(),_e=pr(1,Sn);Nr(19,20,J,k);let re=De(M(fi(_e,Y),b),E);return f()===64&&(Ne(B.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses),O()),re}else{let Y=Or();return De(M(fi(Y,void 0),b),E)}}function bo(c,h){let b=er();$e(!!(c&1));let E=Dn();St(!!(c&2));let k=Kt;Kt=!1;let J=$r();J&&Ut(!1);let Y=pa(!!(c&16),h);return J&&Ut(!0),Kt=k,$e(b),St(E),Y}function Y1(){let c=v(),h=w();return G(27),De(M(d.createEmptyStatement(),c),h)}function Jp(){let c=v(),h=w();G(101);let b=t.getTokenStart(),E=G(21),k=z(Bt);Nr(21,22,E,b);let J=Sn(),Y=Re(93)?Sn():void 0;return De(M(He(k,J,Y),c),h)}function K1(){let c=v(),h=w();G(92);let b=Sn();G(117);let E=t.getTokenStart(),k=G(21),J=z(Bt);return Nr(21,22,k,E),Re(27),De(M(d.createDoStatement(b,J),c),h)}function Rp(){let c=v(),h=w();G(117);let b=t.getTokenStart(),E=G(21),k=z(Bt);Nr(21,22,E,b);let J=Sn();return De(M(Qn(k,J),c),h)}function Z1(){let c=v(),h=w();G(99);let b=dt(135);G(21);let E;f()!==27&&(f()===115||f()===121||f()===87||f()===160&&ve(ch)||f()===135&&ve(qc)?E=Vc(!0):E=K(Bt));let k;if(b?G(165):Re(165)){let J=z(()=>on(!0));G(22),k=vt(b,E,J,Sn())}else if(Re(103)){let J=z(Bt);G(22),k=d.createForInStatement(E,J,Sn())}else{G(27);let J=f()!==27&&f()!==22?z(Bt):void 0;G(27);let Y=f()!==22?z(Bt):void 0;G(22),k=Gr(E,J,Y,Sn())}return De(M(k,c),h)}function Fc(c){let h=v(),b=w();G(c===252?83:88);let E=hi()?void 0:Ft();Pn();let k=c===252?d.createBreakStatement(E):d.createContinueStatement(E);return De(M(k,h),b)}function eh(){let c=v(),h=w();G(107);let b=hi()?void 0:z(Bt);return Pn(),De(M(d.createReturnStatement(b),c),h)}function jp(){let c=v(),h=w();G(118);let b=t.getTokenStart(),E=G(21),k=z(Bt);Nr(21,22,E,b);let J=Rt(67108864,Sn);return De(M(d.createWithStatement(k,J),c),h)}function th(){let c=v(),h=w();G(84);let b=z(Bt);G(59);let E=pr(3,Sn);return De(M(d.createCaseClause(b,E),c),h)}function Fp(){let c=v();G(90),G(59);let h=pr(3,Sn);return M(d.createDefaultClause(h),c)}function nh(){return f()===84?th():Fp()}function rh(){let c=v();G(19);let h=pr(2,nh);return G(20),M(d.createCaseBlock(h),c)}function Bp(){let c=v(),h=w();G(109),G(21);let b=z(Bt);G(22);let E=rh();return De(M(d.createSwitchStatement(b,E),c),h)}function ih(){let c=v(),h=w();G(111);let b=t.hasPrecedingLineBreak()?void 0:z(Bt);return b===void 0&&(Rn++,b=M(q(""),v())),Ts()||Pe(b),De(M(d.createThrowStatement(b),c),h)}function Up(){let c=v(),h=w();G(113);let b=pa(!1),E=f()===85?ah():void 0,k;return(!E||f()===98)&&(G(98,B.catch_or_finally_expected),k=pa(!1)),De(M(d.createTryStatement(b,E,k),c),h)}function ah(){let c=v();G(85);let h;Re(21)?(h=Wc(),G(22)):h=void 0;let b=pa(!1);return M(d.createCatchClause(h,b),c)}function qp(){let c=v(),h=w();return G(89),Pn(),De(M(d.createDebuggerStatement(),c),h)}function oh(){let c=v(),h=w(),b,E=f()===21,k=z(Bt);return Ae(k)&&Re(59)?b=d.createLabeledStatement(k,Sn()):(Ts()||Pe(k),b=cr(k),E&&(h=!1)),De(M(b,c),h)}function Js(){return O(),wt(f())&&!t.hasPrecedingLineBreak()}function sh(){return O(),f()===86&&!t.hasPrecedingLineBreak()}function Bc(){return O(),f()===100&&!t.hasPrecedingLineBreak()}function zp(){return O(),(wt(f())||f()===9||f()===10||f()===11)&&!t.hasPrecedingLineBreak()}function Wp(){for(;;)switch(f()){case 115:case 121:case 87:case 100:case 86:case 94:return!0;case 160:return Hp();case 135:return zc();case 120:case 156:return pp();case 144:case 145:return $p();case 128:case 129:case 134:case 138:case 123:case 124:case 125:case 148:let c=f();if(O(),t.hasPrecedingLineBreak())return!1;if(c===138&&f()===156)return!0;continue;case 162:return O(),f()===19||f()===80||f()===95;case 102:return O(),f()===11||f()===42||f()===19||wt(f());case 95:let h=O();if(h===156&&(h=ve(O)),h===64||h===42||h===19||h===90||h===130||h===60)return!0;continue;case 126:O();continue;default:return!1}}function Rs(){return ve(Wp)}function Uc(){switch(f()){case 60:case 27:case 19:case 115:case 121:case 160:case 100:case 86:case 94:case 101:case 92:case 117:case 99:case 88:case 83:case 107:case 118:case 109:case 111:case 113:case 89:case 85:case 98:return!0;case 102:return Rs()||ve(dc);case 87:case 95:return Rs();case 134:case 138:case 120:case 144:case 145:case 156:case 162:return!0;case 129:case 125:case 123:case 124:case 126:case 148:return Rs()||!ve(Js);default:return Ui()}}function _h(){return O(),Ir()||f()===19||f()===23}function Vp(){return ve(_h)}function ch(){return js(!0)}function js(c){return O(),c&&f()===165?!1:(Ir()||f()===19)&&!t.hasPrecedingLineBreak()}function Hp(){return ve(js)}function qc(c){return O()===160?js(c):!1}function zc(){return ve(qc)}function Sn(){switch(f()){case 27:return Y1();case 19:return pa(!1);case 115:return Ga(v(),w(),void 0);case 121:if(Vp())return Ga(v(),w(),void 0);break;case 135:if(zc())return Ga(v(),w(),void 0);break;case 160:if(Hp())return Ga(v(),w(),void 0);break;case 100:return Zp(v(),w(),void 0);case 86:return sf(v(),w(),void 0);case 101:return Jp();case 92:return K1();case 117:return Rp();case 99:return Z1();case 88:return Fc(251);case 83:return Fc(252);case 107:return eh();case 118:return jp();case 109:return Bp();case 111:return ih();case 113:case 85:case 98:return Up();case 89:return qp();case 60:return vo();case 134:case 120:case 156:case 144:case 145:case 138:case 87:case 94:case 95:case 102:case 123:case 124:case 125:case 128:case 129:case 126:case 148:case 162:if(Rs())return vo();break}return oh()}function Gp(c){return c.kind===138}function vo(){let c=v(),h=w(),b=Lr(!0);if(Ze(b,Gp)){let k=lh(c);if(k)return k;for(let J of b)J.flags|=33554432;return Rt(33554432,()=>Xp(c,h,b))}else return Xp(c,h,b)}function lh(c){return Rt(33554432,()=>{let h=Z_(yt,c);if(h)return ec(h)})}function Xp(c,h,b){switch(f()){case 115:case 121:case 87:case 160:case 135:return Ga(c,h,b);case 100:return Zp(c,h,b);case 86:return sf(c,h,b);case 120:return Ch(c,h,b);case 156:return Ah(c,h,b);case 94:return Dh(c,h,b);case 162:case 144:case 145:return uf(c,h,b);case 102:return Nh(c,h,b);case 95:switch(O(),f()){case 90:case 64:return Uh(c,h,b);case 130:return Ih(c,h,b);default:return xo(c,h,b)}default:if(b){let E=Bn(282,!0,B.Declaration_expected);return Cd(E,c),E.modifiers=b,E}return}}function uh(){return O()===11}function $p(){return O(),!t.hasPrecedingLineBreak()&&(Dt()||f()===11)}function Fs(c,h){if(f()!==19){if(c&4){yo();return}if(hi()){Pn();return}}return bo(c,h)}function Qp(){let c=v();if(f()===28)return M(d.createOmittedExpression(),c);let h=dt(26),b=To(),E=qi();return M(d.createBindingElement(h,void 0,b,E),c)}function ph(){let c=v(),h=dt(26),b=Ir(),E=ca(),k;b&&f()!==59?(k=E,E=void 0):(G(59),k=To());let J=qi();return M(d.createBindingElement(h,E,k,J),c)}function Yp(){let c=v();G(19);let h=z(()=>Tn(9,ph));return G(20),M(d.createObjectBindingPattern(h),c)}function fh(){let c=v();G(23);let h=z(()=>Tn(10,Qp));return G(24),M(d.createArrayBindingPattern(h),c)}function Bs(){return f()===19||f()===23||f()===81||Ir()}function To(c){return f()===23?fh():f()===19?Yp():X_(c)}function Kp(){return Wc(!0)}function Wc(c){let h=v(),b=w(),E=To(B.Private_identifiers_are_not_allowed_in_variable_declarations),k;c&&E.kind===80&&f()===54&&!t.hasPrecedingLineBreak()&&(k=bn());let J=Bi(),Y=Cc(f())?void 0:qi(),_e=Jn(E,k,J,Y);return De(M(_e,h),b)}function Vc(c){let h=v(),b=0;switch(f()){case 115:break;case 121:b|=1;break;case 87:b|=2;break;case 160:b|=4;break;case 135:I.assert(zc()),b|=6,O();break;default:I.fail()}O();let E;if(f()===165&&ve(dh))E=Or();else{let k=Ri();tt(c),E=Tn(8,c?Wc:Kp),tt(k)}return M(Ar(E,b),h)}function dh(){return xs()&&O()===22}function Ga(c,h,b){let E=Vc(!1);Pn();let k=gn(b,E);return De(M(k,c),h)}function Zp(c,h,b){let E=Dn(),k=hr(b);G(100);let J=dt(42),Y=k&2048?Ha():X_(),_e=J?1:0,re=k&1024?2:0,ne=fr();k&32&&St(!0);let pe=bi(_e|re),Ue=Mr(59,!1),Fe=Fs(_e|re,B.or_expected);St(E);let Oe=d.createFunctionDeclaration(b,J,Y,ne,pe,Ue,Fe);return De(M(Oe,c),h)}function ef(){if(f()===137)return G(137);if(f()===11&&ve(O)===21)return ft(()=>{let c=Yr();return c.text==="constructor"?c:void 0})}function mh(c,h,b){return ft(()=>{if(ef()){let E=fr(),k=bi(0),J=Mr(59,!1),Y=Fs(0,B.or_expected),_e=d.createConstructorDeclaration(b,k,Y);return _e.typeParameters=E,_e.type=J,De(M(_e,c),h)}})}function Hc(c,h,b,E,k,J,Y,_e){let re=E?1:0,ne=Ze(b,_l)?2:0,pe=fr(),Ue=bi(re|ne),Fe=Mr(59,!1),Oe=Fs(re|ne,_e),xn=d.createMethodDeclaration(b,E,k,J,pe,Ue,Fe,Oe);return xn.exclamationToken=Y,De(M(xn,c),h)}function tf(c,h,b,E,k){let J=!k&&!t.hasPrecedingLineBreak()?dt(54):void 0,Y=Bi(),_e=Jt(90112,qi);ur(E,Y,_e);let re=d.createPropertyDeclaration(b,E,k||J,Y,_e);return De(M(re,c),h)}function Us(c,h,b){let E=dt(42),k=ca(),J=dt(58);return E||f()===21||f()===30?Hc(c,h,b,E,k,J,void 0,B.or_expected):tf(c,h,b,k,J)}function fa(c,h,b,E,k){let J=ca(),Y=fr(),_e=bi(0),re=Mr(59,!1),ne=Fs(k),pe=E===177?d.createGetAccessorDeclaration(b,J,_e,re,ne):d.createSetAccessorDeclaration(b,J,_e,ne);return pe.typeParameters=Y,Zo(pe)&&(pe.type=re),De(M(pe,c),h)}function hh(){let c;if(f()===60)return!0;for(;Ei(f());){if(c=f(),nT(c))return!0;O()}if(f()===42||(_a()&&(c=f(),O()),f()===23))return!0;if(c!==void 0){if(!ki(c)||c===153||c===139)return!0;switch(f()){case 21:case 30:case 54:case 59:case 64:case 58:return!0;default:return hi()}}return!1}function nf(c,h,b){Qr(126);let E=yh(),k=De(M(d.createClassStaticBlockDeclaration(E),c),h);return k.modifiers=b,k}function yh(){let c=er(),h=Dn();$e(!1),St(!0);let b=pa(!1);return $e(c),St(h),b}function gh(){if(Dn()&&f()===135){let c=v(),h=Ft(B.Expression_expected);O();let b=Ms(c,h,!0);return Va(c,b)}return za()}function Gc(){let c=v();if(!Re(60))return;let h=pt(gh);return M(d.createDecorator(h),c)}function rf(c,h,b){let E=v(),k=f();if(f()===87&&h){if(!ft($_))return}else{if(b&&f()===126&&ve(pf))return;if(c&&f()===126)return;if(!bu())return}return M(se(k),E)}function Lr(c,h,b){let E=v(),k,J,Y,_e=!1,re=!1,ne=!1;if(c&&f()===60)for(;J=Gc();)k=Et(k,J);for(;Y=rf(_e,h,b);)Y.kind===126&&(_e=!0),k=Et(k,Y),re=!0;if(re&&c&&f()===60)for(;J=Gc();)k=Et(k,J),ne=!0;if(ne)for(;Y=rf(_e,h,b);)Y.kind===126&&(_e=!0),k=Et(k,Y);return k&&zt(k,E)}function af(){let c;if(f()===134){let h=v();O();let b=M(se(134),h);c=zt([b],h)}return c}function bh(){let c=v(),h=w();if(f()===27)return O(),De(M(d.createSemicolonClassElement(),c),h);let b=Lr(!0,!0,!0);if(f()===126&&ve(pf))return nf(c,h,b);if(ja(139))return fa(c,h,b,177,0);if(ja(153))return fa(c,h,b,178,0);if(f()===137||f()===11){let E=mh(c,h,b);if(E)return E}if(zu())return Wu(c,h,b);if(wt(f())||f()===11||f()===9||f()===42||f()===23)if(Ze(b,Gp)){for(let k of b)k.flags|=33554432;return Rt(33554432,()=>Us(c,h,b))}else return Us(c,h,b);if(b){let E=Bn(80,!0,B.Declaration_expected);return tf(c,h,b,E,void 0)}return I.fail("Should not have attempted to parse class member declaration.")}function of(){let c=v(),h=w(),b=Lr(!0);if(f()===86)return qs(c,h,b,231);let E=Bn(282,!0,B.Expression_expected);return Cd(E,c),E.modifiers=b,E}function vh(){return qs(v(),w(),void 0,231)}function sf(c,h,b){return qs(c,h,b,263)}function qs(c,h,b,E){let k=Dn();G(86);let J=Th(),Y=fr();Ze(b,Fx)&&St(!0);let _e=Xc(),re;G(19)?(re=Eh(),G(20)):re=Or(),St(k);let ne=E===263?d.createClassDeclaration(b,J,Y,_e,re):d.createClassExpression(b,J,Y,_e,re);return De(M(ne,c),h)}function Th(){return Ir()&&!Sh()?yi(Ir()):void 0}function Sh(){return f()===119&&ve(Q_)}function Xc(){if(_f())return pr(22,xh)}function xh(){let c=v(),h=f();I.assert(h===96||h===119),O();let b=Tn(7,wh);return M(d.createHeritageClause(h,b),c)}function wh(){let c=v(),h=za();if(h.kind===233)return h;let b=Xa();return M(d.createExpressionWithTypeArguments(h,b),c)}function Xa(){return f()===30?Fi(20,gt,30,32):void 0}function _f(){return f()===96||f()===119}function Eh(){return pr(5,bh)}function Ch(c,h,b){G(120);let E=Ft(),k=fr(),J=Xc(),Y=mc(),_e=d.createInterfaceDeclaration(b,E,k,J,Y);return De(M(_e,c),h)}function Ah(c,h,b){G(156),t.hasPrecedingLineBreak()&&Ne(B.Line_break_not_permitted_here);let E=Ft(),k=fr();G(64);let J=f()===141&&ft(yc)||gt();Pn();let Y=d.createTypeAliasDeclaration(b,E,k,J);return De(M(Y,c),h)}function kh(){let c=v(),h=w(),b=ca(),E=z(qi);return De(M(d.createEnumMember(b,E),c),h)}function Dh(c,h,b){G(94);let E=Ft(),k;G(19)?(k=Zn(()=>Tn(6,kh)),G(20)):k=Or();let J=d.createEnumDeclaration(b,E,k);return De(M(J,c),h)}function cf(){let c=v(),h;return G(19)?(h=pr(1,Sn),G(20)):h=Or(),M(d.createModuleBlock(h),c)}function lf(c,h,b,E){let k=E&32,J=E&8?vn():Ft(),Y=Re(25)?lf(v(),!1,void 0,8|k):cf(),_e=d.createModuleDeclaration(b,J,Y,E);return De(M(_e,c),h)}function $c(c,h,b){let E=0,k;f()===162?(k=Ft(),E|=2048):(k=Yr(),k.text=sa(k.text));let J;f()===19?J=cf():Pn();let Y=d.createModuleDeclaration(b,k,J,E);return De(M(Y,c),h)}function uf(c,h,b){let E=0;if(f()===162)return $c(c,h,b);if(Re(145))E|=32;else if(G(144),f()===11)return $c(c,h,b);return lf(c,h,b,E)}function Ph(){return f()===149&&ve(zs)}function zs(){return O()===21}function pf(){return O()===19}function ff(){return O()===44}function Ih(c,h,b){G(130),G(145);let E=Ft();Pn();let k=d.createNamespaceExportDeclaration(E);return k.modifiers=b,De(M(k,c),h)}function Nh(c,h,b){G(102);let E=t.getTokenFullStart(),k;Dt()&&(k=Ft());let J=!1;if(f()!==161&&(k==null?void 0:k.escapedText)==="type"&&(Dt()||Mh())&&(J=!0,k=Dt()?Ft():void 0),k&&!Yc())return Lh(c,h,b,k,J);let Y;(k||f()===42||f()===19)&&(Y=Jh(k,E,J),G(161));let _e=Ws(),re=f(),ne;(re===118||re===132)&&!t.hasPrecedingLineBreak()&&(ne=Qc(re)),Pn();let pe=d.createImportDeclaration(b,Y,_e,ne);return De(M(pe,c),h)}function Oh(){let c=v(),h=wt(f())?vn():mo(11);G(59);let b=on(!0);return M(d.createImportAttribute(h,b),c)}function Qc(c,h){let b=v();h||G(c);let E=t.getTokenStart();if(G(19)){let k=t.hasPrecedingLineBreak(),J=Tn(24,Oh,!0);if(!G(20)){let Y=Pi(ut);Y&&Y.code===B._0_expected.code&&ol(Y,Po(Ht,at,E,1,B.The_parser_expected_to_find_a_1_to_match_the_0_token_here,"{","}"))}return M(d.createImportAttributes(J,k,c),b)}else{let k=zt([],v(),void 0,!1);return M(d.createImportAttributes(k,!1,c),b)}}function Mh(){return f()===42||f()===19}function Yc(){return f()===28||f()===161}function Lh(c,h,b,E,k){G(64);let J=So();Pn();let Y=d.createImportEqualsDeclaration(b,k,E,J);return De(M(Y,c),h)}function Jh(c,h,b){let E;return(!c||Re(28))&&(E=f()===42?jh():df(275)),M(d.createImportClause(b,c,E),h)}function So(){return Ph()?Rh():Ba(!1)}function Rh(){let c=v();G(149),G(21);let h=Ws();return G(22),M(d.createExternalModuleReference(h),c)}function Ws(){if(f()===11){let c=Yr();return c.text=sa(c.text),c}else return Bt()}function jh(){let c=v();G(42),G(130);let h=Ft();return M(d.createNamespaceImport(h),c)}function df(c){let h=v(),b=c===275?d.createNamedImports(Fi(23,Fh,19,20)):d.createNamedExports(Fi(23,da,19,20));return M(b,h)}function da(){let c=w();return De(mf(281),c)}function Fh(){return mf(276)}function mf(c){let h=v(),b=ki(f())&&!Dt(),E=t.getTokenStart(),k=t.getTokenEnd(),J=!1,Y,_e=!0,re=vn();if(re.escapedText==="type")if(f()===130){let Ue=vn();if(f()===130){let Fe=vn();wt(f())?(J=!0,Y=Ue,re=pe(),_e=!1):(Y=re,re=Fe,_e=!1)}else wt(f())?(Y=re,_e=!1,re=pe()):(J=!0,re=Ue)}else wt(f())&&(J=!0,re=pe());_e&&f()===130&&(Y=re,G(130),re=pe()),c===276&&b&&jt(E,k,B.Identifier_expected);let ne=c===276?d.createImportSpecifier(J,Y,re):d.createExportSpecifier(J,Y,re);return M(ne,h);function pe(){return b=ki(f())&&!Dt(),E=t.getTokenStart(),k=t.getTokenEnd(),vn()}}function Bh(c){return M(d.createNamespaceExport(vn()),c)}function xo(c,h,b){let E=Dn();St(!0);let k,J,Y,_e=Re(156),re=v();Re(42)?(Re(130)&&(k=Bh(re)),G(161),J=Ws()):(k=df(279),(f()===161||f()===11&&!t.hasPrecedingLineBreak())&&(G(161),J=Ws()));let ne=f();J&&(ne===118||ne===132)&&!t.hasPrecedingLineBreak()&&(Y=Qc(ne)),Pn(),St(E);let pe=d.createExportDeclaration(b,_e,k,J,Y);return De(M(pe,c),h)}function Uh(c,h,b){let E=Dn();St(!0);let k;Re(64)?k=!0:G(90);let J=on(!0);Pn(),St(E);let Y=d.createExportAssignment(b,k,J);return De(M(Y,c),h)}let hf;(c=>{c[c.SourceElements=0]="SourceElements",c[c.BlockStatements=1]="BlockStatements",c[c.SwitchClauses=2]="SwitchClauses",c[c.SwitchClauseStatements=3]="SwitchClauseStatements",c[c.TypeMembers=4]="TypeMembers",c[c.ClassMembers=5]="ClassMembers",c[c.EnumMembers=6]="EnumMembers",c[c.HeritageClauseElement=7]="HeritageClauseElement",c[c.VariableDeclarations=8]="VariableDeclarations",c[c.ObjectBindingElements=9]="ObjectBindingElements",c[c.ArrayBindingElements=10]="ArrayBindingElements",c[c.ArgumentExpressions=11]="ArgumentExpressions",c[c.ObjectLiteralMembers=12]="ObjectLiteralMembers",c[c.JsxAttributes=13]="JsxAttributes",c[c.JsxChildren=14]="JsxChildren",c[c.ArrayLiteralMembers=15]="ArrayLiteralMembers",c[c.Parameters=16]="Parameters",c[c.JSDocParameters=17]="JSDocParameters",c[c.RestProperties=18]="RestProperties",c[c.TypeParameters=19]="TypeParameters",c[c.TypeArguments=20]="TypeArguments",c[c.TupleElementTypes=21]="TupleElementTypes",c[c.HeritageClauses=22]="HeritageClauses",c[c.ImportOrExportSpecifiers=23]="ImportOrExportSpecifiers",c[c.ImportAttributes=24]="ImportAttributes",c[c.JSDocComment=25]="JSDocComment",c[c.Count=26]="Count"})(hf||(hf={}));let yf;(c=>{c[c.False=0]="False",c[c.True=1]="True",c[c.Unknown=2]="Unknown"})(yf||(yf={}));let gf;(c=>{function h(ne,pe,Ue){Yn("file.js",ne,99,void 0,1,0),t.setText(ne,pe,Ue),ht=t.scan();let Fe=b(),Oe=ye("file.js",99,1,!1,[],se(1),0,gr),xn=Ya(ut,Oe);return Gt&&(Oe.jsDocDiagnostics=Ya(Gt,Oe)),Kn(),Fe?{jsDocTypeExpression:Fe,diagnostics:xn}:void 0}c.parseJSDocTypeExpressionForTests=h;function b(ne){let pe=v(),Ue=(ne?Re:G)(19),Fe=Rt(16777216,ho);(!ne||Ue)&&Ja(20);let Oe=d.createJSDocTypeExpression(Fe);return ie(Oe),M(Oe,pe)}c.parseJSDocTypeExpression=b;function E(){let ne=v(),pe=Re(19),Ue=v(),Fe=Ba(!1);for(;f()===81;)Ge(),ue(),Fe=M(d.createJSDocMemberName(Fe,Ft()),Ue);pe&&Ja(20);let Oe=d.createJSDocNameReference(Fe);return ie(Oe),M(Oe,ne)}c.parseJSDocNameReference=E;function k(ne,pe,Ue){Yn("",ne,99,void 0,1,0);let Fe=Rt(16777216,()=>re(pe,Ue)),xn=Ya(ut,{languageVariant:0,text:ne});return Kn(),Fe?{jsDoc:Fe,diagnostics:xn}:void 0}c.parseIsolatedJSDocComment=k;function J(ne,pe,Ue){let Fe=ht,Oe=ut.length,xn=Zt,qn=Rt(16777216,()=>re(pe,Ue));return Qi(qn,ne),ct&524288&&(Gt||(Gt=[]),Gt.push(...ut)),ht=Fe,ut.length=Oe,Zt=xn,qn}c.parseJSDocComment=J;let Y;(ne=>{ne[ne.BeginningOfLine=0]="BeginningOfLine",ne[ne.SawAsterisk=1]="SawAsterisk",ne[ne.SavingComments=2]="SavingComments",ne[ne.SavingBackticks=3]="SavingBackticks"})(Y||(Y={}));let _e;(ne=>{ne[ne.Property=1]="Property",ne[ne.Parameter=2]="Parameter",ne[ne.CallbackParameter=4]="CallbackParameter"})(_e||(_e={}));function re(ne=0,pe){let Ue=at,Fe=pe===void 0?Ue.length:ne+pe;if(pe=Fe-ne,I.assert(ne>=0),I.assert(ne<=Fe),I.assert(Fe<=Ue.length),!B8(Ue,ne))return;let Oe,xn,qn,vi,Zr,Jr=[],ma=[],qh=yt;yt|=1<<25;let Kc=t.scanRange(ne+3,pe-5,bf);return yt=qh,Kc;function bf(){let j=1,ee,Z=ne-(Ue.lastIndexOf(` +`,ne)+1)+4;function ae(qe){ee||(ee=Z),Jr.push(qe),Z+=qe.length}for(ue();Co(5););Co(4)&&(j=0,Z=0);e:for(;;){switch(f()){case 60:zh(Jr),Zr||(Zr=v()),Wh(Tf(Z)),j=0,ee=void 0;break;case 4:Jr.push(t.getTokenText()),j=0,Z=0;break;case 42:let qe=t.getTokenText();j===1?(j=2,ae(qe)):(I.assert(j===0),j=1,Z+=qe.length);break;case 5:I.assert(j!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let Pt=t.getTokenText();ee!==void 0&&Z+Pt.length>ee&&Jr.push(Pt.slice(ee-Z)),Z+=Pt.length;break;case 1:break e;case 82:j=2,ae(t.getTokenValue());break;case 19:j=2;let Rr=t.getTokenFullStart(),dr=t.getTokenEnd()-1,Nn=Ie(dr);if(Nn){vi||Zc(Jr),ma.push(M(d.createJSDocText(Jr.join("")),vi??ne,Rr)),ma.push(Nn),Jr=[],vi=t.getTokenEnd();break}default:j=2,ae(t.getTokenText());break}j===2?be(!1):ue()}let ce=Jr.join("").trimEnd();ma.length&&ce.length&&ma.push(M(d.createJSDocText(ce),vi??ne,Zr)),ma.length&&Oe&&I.assertIsDefined(Zr,"having parsed tags implies that the end of the comment span should be set");let Me=Oe&&zt(Oe,xn,qn);return M(d.createJSDocComment(ma.length?zt(ma,ne,Zr):ce.length?ce:void 0,Me),ne,Fe)}function Zc(j){for(;j.length&&(j[0]===` +`||j[0]==="\r");)j.shift()}function zh(j){for(;j.length;){let ee=j[j.length-1].trimEnd();if(ee==="")j.pop();else if(ee.lengthPt&&(ae.push(ei.slice(Pt-j)),qe=2),j+=ei.length;break;case 19:qe=2;let Sf=t.getTokenFullStart(),Gs=t.getTokenEnd()-1,xf=Ie(Gs);xf?(ce.push(M(d.createJSDocText(ae.join("")),Me??Z,Sf)),ce.push(xf),ae=[],Me=t.getTokenEnd()):Rr(t.getTokenText());break;case 62:qe===3?qe=2:qe=3,Rr(t.getTokenText());break;case 82:qe!==3&&(qe=2),Rr(t.getTokenValue());break;case 42:if(qe===0){qe=1,j+=1;break}default:qe!==3&&(qe=2),Rr(t.getTokenText());break}qe===2||qe===3?dr=be(qe===3):dr=ue()}Zc(ae);let Nn=ae.join("").trimEnd();if(ce.length)return Nn.length&&ce.push(M(d.createJSDocText(Nn),Me??Z)),zt(ce,Z,t.getTokenEnd());if(Nn.length)return Nn}function Ie(j){let ee=ft(Ke);if(!ee)return;ue(),pn();let Z=v(),ae=wt(f())?Ba(!0):void 0;if(ae)for(;f()===81;)Ge(),ue(),ae=M(d.createJSDocMemberName(ae,Ft()),Z);let ce=[];for(;f()!==20&&f()!==4&&f()!==1;)ce.push(t.getTokenText()),ue();let Me=ee==="link"?d.createJSDocLink:ee==="linkcode"?d.createJSDocLinkCode:d.createJSDocLinkPlain;return M(Me(ae,ce.join("")),j,t.getTokenEnd())}function Ke(){if(zi(),f()===19&&ue()===60&&wt(ue())){let j=t.getTokenValue();if(Ti(j))return j}}function Ti(j){return j==="link"||j==="linkcode"||j==="linkplain"}function Hs(j,ee,Z,ae){return M(d.createJSDocUnknownTag(ee,fn(j,v(),Z,ae)),j)}function Wh(j){j&&(Oe?Oe.push(j):(Oe=[j],xn=j.pos),qn=j.end)}function tr(){return zi(),f()===19?b():void 0}function Vh(){let j=Co(23);j&&pn();let ee=Co(62),Z=W5();return ee&&n1(62),j&&(pn(),dt(64)&&Bt(),G(24)),{name:Z,isBracketed:j}}function r(j){switch(j.kind){case 151:return!0;case 188:return r(j.elementType);default:return J_(j)&&Ae(j.typeName)&&j.typeName.escapedText==="Object"&&!j.typeArguments}}function o(j,ee,Z,ae){let ce=tr(),Me=!ce;zi();let{name:qe,isBracketed:Pt}=Vh(),Rr=zi();Me&&!ve(Ke)&&(ce=tr());let dr=fn(j,v(),ae,Rr),Nn=s(ce,qe,Z,ae);Nn&&(ce=Nn,Me=!0);let ei=Z===1?d.createJSDocPropertyTag(ee,qe,Pt,ce,Me,dr):d.createJSDocParameterTag(ee,qe,Pt,ce,Me,dr);return M(ei,j)}function s(j,ee,Z,ae){if(j&&r(j.type)){let ce=v(),Me,qe;for(;Me=ft(()=>Gh(Z,ae,ee));)Me.kind===348||Me.kind===355?qe=Et(qe,Me):Me.kind===352&&Fn(Me.tagName,B.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(qe){let Pt=M(d.createJSDocTypeLiteral(qe,j.type.kind===188),ce);return M(d.createJSDocTypeExpression(Pt),ce)}}}function l(j,ee,Z,ae){Ze(Oe,Vb)&&jt(ee.pos,t.getTokenStart(),B._0_tag_already_specified,Go(ee.escapedText));let ce=tr();return M(d.createJSDocReturnTag(ee,ce,fn(j,v(),Z,ae)),j)}function g(j,ee,Z,ae){Ze(Oe,lu)&&jt(ee.pos,t.getTokenStart(),B._0_tag_already_specified,Go(ee.escapedText));let ce=b(!0),Me=Z!==void 0&&ae!==void 0?fn(j,v(),Z,ae):void 0;return M(d.createJSDocTypeTag(ee,ce,Me),j)}function D(j,ee,Z,ae){let Me=f()===23||ve(()=>ue()===60&&wt(ue())&&Ti(t.getTokenValue()))?void 0:E(),qe=Z!==void 0&&ae!==void 0?fn(j,v(),Z,ae):void 0;return M(d.createJSDocSeeTag(ee,Me,qe),j)}function H(j,ee,Z,ae){let ce=tr(),Me=fn(j,v(),Z,ae);return M(d.createJSDocThrowsTag(ee,ce,Me),j)}function me(j,ee,Z,ae){let ce=v(),Me=ze(),qe=t.getTokenFullStart(),Pt=fn(j,qe,Z,ae);Pt||(qe=t.getTokenFullStart());let Rr=typeof Pt!="string"?zt(h_([M(Me,ce,qe)],Pt),ce):Me.text+Pt;return M(d.createJSDocAuthorTag(ee,Rr),j)}function ze(){let j=[],ee=!1,Z=t.getToken();for(;Z!==1&&Z!==4;){if(Z===30)ee=!0;else{if(Z===60&&!ee)break;if(Z===32&&ee){j.push(t.getTokenText()),t.resetTokenState(t.getTokenEnd());break}}j.push(t.getTokenText()),Z=ue()}return d.createJSDocText(j.join(""))}function In(j,ee,Z,ae){let ce=wo();return M(d.createJSDocImplementsTag(ee,ce,fn(j,v(),Z,ae)),j)}function Si(j,ee,Z,ae){let ce=wo();return M(d.createJSDocAugmentsTag(ee,ce,fn(j,v(),Z,ae)),j)}function xi(j,ee,Z,ae){let ce=b(!1),Me=Z!==void 0&&ae!==void 0?fn(j,v(),Z,ae):void 0;return M(d.createJSDocSatisfiesTag(ee,ce,Me),j)}function wo(){let j=Re(19),ee=v(),Z=N5();t.setInJSDocType(!0);let ae=Xa();t.setInJSDocType(!1);let ce=d.createExpressionWithTypeArguments(Z,ae),Me=M(ce,ee);return j&&G(20),Me}function N5(){let j=v(),ee=$a();for(;Re(25);){let Z=$a();ee=M(W(ee,Z),j)}return ee}function Eo(j,ee,Z,ae,ce){return M(ee(Z,fn(j,v(),ae,ce)),j)}function O5(j,ee,Z,ae){let ce=b(!0);return pn(),M(d.createJSDocThisTag(ee,ce,fn(j,v(),Z,ae)),j)}function M5(j,ee,Z,ae){let ce=b(!0);return pn(),M(d.createJSDocEnumTag(ee,ce,fn(j,v(),Z,ae)),j)}function L5(j,ee,Z,ae){let ce=tr();zi();let Me=Hh();pn();let qe=Vs(Z),Pt;if(!ce||r(ce.type)){let dr,Nn,ei,Sf=!1;for(;(dr=ft(()=>B5(Z)))&&dr.kind!==352;)if(Sf=!0,dr.kind===351)if(Nn){let Gs=Ne(B.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);Gs&&ol(Gs,Po(Ht,at,0,0,B.The_tag_was_first_specified_here));break}else Nn=dr;else ei=Et(ei,dr);if(Sf){let Gs=ce&&ce.type.kind===188,xf=d.createJSDocTypeLiteral(ei,Gs);ce=Nn&&Nn.typeExpression&&!r(Nn.typeExpression.type)?Nn.typeExpression:M(xf,j),Pt=ce.end}}Pt=Pt||qe!==void 0?v():(Me??ce??ee).end,qe||(qe=fn(j,Pt,Z,ae));let Rr=d.createJSDocTypedefTag(ee,ce,Me,qe);return M(Rr,j,Pt)}function Hh(j){let ee=t.getTokenStart();if(!wt(f()))return;let Z=$a();if(Re(25)){let ae=Hh(!0),ce=d.createModuleDeclaration(void 0,Z,ae,j?8:void 0);return M(ce,ee)}return j&&(Z.flags|=4096),Z}function J5(j){let ee=v(),Z,ae;for(;Z=ft(()=>Gh(4,j));){if(Z.kind===352){Fn(Z.tagName,B.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);break}ae=Et(ae,Z)}return zt(ae||[],ee)}function w6(j,ee){let Z=J5(ee),ae=ft(()=>{if(Co(60)){let ce=Tf(ee);if(ce&&ce.kind===349)return ce}});return M(d.createJSDocSignature(void 0,Z,ae),j)}function R5(j,ee,Z,ae){let ce=Hh();pn();let Me=Vs(Z),qe=w6(j,Z);Me||(Me=fn(j,v(),Z,ae));let Pt=Me!==void 0?v():qe.end;return M(d.createJSDocCallbackTag(ee,qe,ce,Me),j,Pt)}function j5(j,ee,Z,ae){pn();let ce=Vs(Z),Me=w6(j,Z);ce||(ce=fn(j,v(),Z,ae));let qe=ce!==void 0?v():Me.end;return M(d.createJSDocOverloadTag(ee,Me,ce),j,qe)}function F5(j,ee){for(;!Ae(j)||!Ae(ee);)if(!Ae(j)&&!Ae(ee)&&j.right.escapedText===ee.right.escapedText)j=j.left,ee=ee.left;else return!1;return j.escapedText===ee.escapedText}function B5(j){return Gh(1,j)}function Gh(j,ee,Z){let ae=!0,ce=!1;for(;;)switch(ue()){case 60:if(ae){let Me=U5(j,ee);return Me&&(Me.kind===348||Me.kind===355)&&Z&&(Ae(Me.name)||!F5(Z,Me.name.left))?!1:Me}ce=!1;break;case 4:ae=!0,ce=!1;break;case 42:ce&&(ae=!1),ce=!0;break;case 80:ae=!1;break;case 1:return!1}}function U5(j,ee){I.assert(f()===60);let Z=t.getTokenFullStart();ue();let ae=$a(),ce=zi(),Me;switch(ae.escapedText){case"type":return j===1&&g(Z,ae);case"prop":case"property":Me=1;break;case"arg":case"argument":case"param":Me=6;break;case"template":return E6(Z,ae,ee,ce);default:return!1}return j&Me?o(Z,ae,j,ee):!1}function q5(){let j=v(),ee=Co(23);ee&&pn();let Z=$a(B.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces),ae;if(ee&&(pn(),G(64),ae=Rt(16777216,ho),G(24)),!Vi(Z))return M(d.createTypeParameterDeclaration(void 0,Z,void 0,ae),j)}function z5(){let j=v(),ee=[];do{pn();let Z=q5();Z!==void 0&&ee.push(Z),zi()}while(Co(28));return zt(ee,j)}function E6(j,ee,Z,ae){let ce=f()===19?b():void 0,Me=z5();return M(d.createJSDocTemplateTag(ee,ce,Me,fn(j,v(),Z,ae)),j)}function Co(j){return f()===j?(ue(),!0):!1}function W5(){let j=$a();for(Re(23)&&G(24);Re(25);){let ee=$a();Re(23)&&G(24),j=ac(j,ee)}return j}function $a(j){if(!wt(f()))return Bn(80,!j,j||B.Identifier_expected);Rn++;let ee=t.getTokenStart(),Z=t.getTokenEnd(),ae=f(),ce=sa(t.getTokenValue()),Me=M(q(ce,ae),ee,Z);return ue(),Me}}})(gf=e.JSDocParser||(e.JSDocParser={}))})(ri||(ri={})),(e=>{function t(A,N,q,Q){if(Q=Q||I.shouldAssert(2),d(A,N,q,Q),v4(q))return A;if(A.statements.length===0)return ri.parseSourceFile(A.fileName,N,A.languageVersion,void 0,!0,A.scriptKind,A.setExternalModuleIndicator,A.jsDocParsingMode);let se=A;I.assert(!se.hasBeenIncrementallyParsed),se.hasBeenIncrementallyParsed=!0,ri.fixupParentReferences(se);let fe=A.text,F=S(A),W=u(A,q);d(A,N,W,Q),I.assert(W.span.start<=q.span.start),I.assert(tn(W.span)===tn(q.span)),I.assert(tn(Ys(W))===tn(Ys(q)));let Se=Ys(W).length-W.span.length;y(se,W.span.start,tn(W.span),tn(Ys(W)),Se,fe,N,Q);let Qe=ri.parseSourceFile(A.fileName,N,A.languageVersion,F,!0,A.scriptKind,A.setExternalModuleIndicator,A.jsDocParsingMode);return Qe.commentDirectives=n(A.commentDirectives,Qe.commentDirectives,W.span.start,tn(W.span),Se,fe,N,Q),Qe.impliedNodeFormat=A.impliedNodeFormat,Qe}e.updateSourceFile=t;function n(A,N,q,Q,se,fe,F,W){if(!A)return N;let Se,Qe=!1;for(let st of A){let{range:_t,type:hn}=st;if(_t.endQ){Be();let yn={range:{pos:_t.pos+se,end:_t.end+se},type:hn};Se=Et(Se,yn),W&&I.assert(fe.substring(_t.pos,_t.end)===F.substring(yn.range.pos,yn.range.end))}}return Be(),Se;function Be(){Qe||(Qe=!0,Se?N&&Se.push(...N):Se=N)}}function a(A,N,q,Q,se,fe){N?W(A):F(A);return;function F(Se){let Qe="";if(fe&&_(Se)&&(Qe=Q.substring(Se.pos,Se.end)),Se._children&&(Se._children=void 0),Za(Se,Se.pos+q,Se.end+q),fe&&_(Se)&&I.assert(Qe===se.substring(Se.pos,Se.end)),Wt(Se,F,W),Hi(Se))for(let Be of Se.jsDoc)F(Be);m(Se,fe)}function W(Se){Se._children=void 0,Za(Se,Se.pos+q,Se.end+q);for(let Qe of Se)F(Qe)}}function _(A){switch(A.kind){case 11:case 9:case 80:return!0}return!1}function p(A,N,q,Q,se){I.assert(A.end>=N,"Adjusting an element that was entirely before the change range"),I.assert(A.pos<=q,"Adjusting an element that was entirely after the change range"),I.assert(A.pos<=A.end);let fe=Math.min(A.pos,Q),F=A.end>=q?A.end+se:Math.min(A.end,Q);I.assert(fe<=F),A.parent&&(I.assertGreaterThanOrEqual(fe,A.parent.pos),I.assertLessThanOrEqual(F,A.parent.end)),Za(A,fe,F)}function m(A,N){if(N){let q=A.pos,Q=se=>{I.assert(se.pos>=q),q=se.end};if(Hi(A))for(let se of A.jsDoc)Q(se);Wt(A,Q),I.assert(q<=A.end)}}function y(A,N,q,Q,se,fe,F,W){Se(A);return;function Se(Be){if(I.assert(Be.pos<=Be.end),Be.pos>q){a(Be,!1,se,fe,F,W);return}let st=Be.end;if(st>=N){if(Be.intersectsChange=!0,Be._children=void 0,p(Be,N,q,Q,se),Wt(Be,Se,Qe),Hi(Be))for(let _t of Be.jsDoc)Se(_t);m(Be,W);return}I.assert(stq){a(Be,!0,se,fe,F,W);return}let st=Be.end;if(st>=N){Be.intersectsChange=!0,Be._children=void 0,p(Be,N,q,Q,se);for(let _t of Be)Se(_t);return}I.assert(st0&&F<=1;F++){let W=x(A,Q);I.assert(W.pos<=Q);let Se=W.pos;Q=Math.max(0,Se-1)}let se=Xi(Q,tn(N.span)),fe=N.newLength+(N.span.start-Q);return Qd(se,fe)}function x(A,N){let q=A,Q;if(Wt(A,fe),Q){let F=se(Q);F.pos>q.pos&&(q=F)}return q;function se(F){for(;;){let W=wS(F);if(W)F=W;else return F}}function fe(F){if(!Vi(F))if(F.pos<=N){if(F.pos>=q.pos&&(q=F),NN),!0}}function d(A,N,q,Q){let se=A.text;if(q&&(I.assert(se.length-q.span.length+q.newLength===N.length),Q||I.shouldAssert(3))){let fe=se.substr(0,q.span.start),F=N.substr(0,q.span.start);I.assert(fe===F);let W=se.substring(tn(q.span),se.length),Se=N.substring(tn(Ys(q)),N.length);I.assert(W===Se)}}function S(A){let N=A.statements,q=0;I.assert(q=Qe.pos&&F=Qe.pos&&F{A[A.Value=-1]="Value"})(T||(T={}))})(Vf||(Vf={})),Hf=new Map,X8=/^\/\/\/\s*<(\S+)\s.*?\/>/im,$8=/^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im}}),uj=()=>{},pj=()=>{},fj=()=>{},dj=()=>{},mj=()=>{},hj=()=>{},yj=()=>{},gj=()=>{},bj=()=>{},vj=()=>{},Tj=()=>{},Sj=()=>{},xj=()=>{},wj=()=>{},Ej=()=>{},Cj=()=>{},Aj=()=>{},kj=()=>{},Dj=()=>{},Pj=()=>{},Ij=()=>{},Nj=()=>{},Oj=()=>{},Mj=()=>{},Lj=()=>{},Jj=()=>{},Rj=()=>{},jj=()=>{},Fj=()=>{},Bj=()=>{},Uj=()=>{},qj=()=>{},zj=()=>{},Wj=()=>{},Vj=()=>{},Hj=()=>{},Gj=()=>{},Xj=()=>{},$j=()=>{},Qj=()=>{},Yj=()=>{},Kj=()=>{},Zj=()=>{},eF=()=>{},tF=()=>{},nF=()=>{},rF=()=>{},iF=()=>{},En=It({"src/compiler/_namespaces/ts.ts"(){"use strict";e9(),IE(),Bv(),NE(),OE(),LE(),jE(),zv(),BE(),tC(),nC(),uC(),nk(),qM(),zM(),WM(),VM(),iL(),aL(),oL(),RJ(),$R(),QR(),lj(),uj(),pj(),fj(),dj(),hj(),yj(),gj(),bj(),vj(),Tj(),Sj(),xj(),wj(),Ej(),Cj(),Aj(),kj(),Dj(),Pj(),Ij(),Nj(),Oj(),Mj(),Lj(),Jj(),Rj(),jj(),Fj(),Bj(),Uj(),qj(),zj(),Wj(),Vj(),Hj(),Gj(),Xj(),$j(),Qj(),Yj(),Kj(),Zj(),eF(),tF(),nF(),rF(),iF(),mj(),qv()}}),Q8=()=>{},Kb=()=>{},aF=()=>{},Y8=()=>{},qo,Y8=()=>{Bv(),qo=ss(99,!0)},oF=()=>{},K8=()=>{},sF=()=>{},_F=()=>{},cF=()=>{},lF=()=>{},uF=()=>{},pF=()=>{},fF=()=>{},dF=()=>{},Z8=()=>{},e7=()=>{},t7=()=>{},mF=()=>{};function n7(e,t,n,a){let _=Wl(e)?new Md(e,t,n):e===80?new Ld(80,t,n):e===81?new Jd(81,t,n):new e6(e,t,n);return _.parent=a,_.flags=a.flags&101441536,_}function hF(e,t){if(!Wl(e.kind))return Je;let n=[];if(TT(e))return e.forEachChild(m=>{n.push(m)}),n;qo.setText((t||e.getSourceFile()).text);let a=e.pos,_=m=>{bl(n,a,m.pos,e),n.push(m),a=m.end},p=m=>{bl(n,a,m.pos,e),n.push(yF(m,e)),a=m.end};return wn(e.jsDoc,_),a=e.pos,e.forEachChild(_,p),bl(n,a,e.end,e),qo.setText(void 0),n}function bl(e,t,n,a){for(qo.resetTokenState(t);tt.tagName.text==="inheritDoc"||t.tagName.text==="inheritdoc")}function Df(e,t){if(!e)return Je;let n=ts_JsDoc_exports.getJsDocTagsFromDeclarations(e,t);if(t&&(n.length===0||e.some(r7))){let a=new Set;for(let _ of e){let p=i7(t,_,m=>{var y;if(!a.has(m))return a.add(m),_.kind===177||_.kind===178?m.getContextualJsDocTags(_,t):((y=m.declarations)==null?void 0:y.length)===1?m.getJsDocTags():void 0});p&&(n=[...p,...n])}}return n}function tl(e,t){if(!e)return Je;let n=ts_JsDoc_exports.getJsDocCommentsFromDeclarations(e,t);if(t&&(n.length===0||e.some(r7))){let a=new Set;for(let _ of e){let p=i7(t,_,m=>{if(!a.has(m))return a.add(m),_.kind===177||_.kind===178?m.getContextualDocumentationComment(_,t):m.getDocumentationComment(t)});p&&(n=n.length===0?p.slice():p.concat(lineBreakPart(),n))}}return n}function i7(e,t,n){var a;let _=((a=t.parent)==null?void 0:a.kind)===176?t.parent.parent:t.parent;if(!_)return;let p=Sm(t);return cg(E3(_),m=>{let y=e.getTypeAtLocation(m),u=p&&y.symbol?e.getTypeOfSymbol(y.symbol):y,x=e.getPropertyOfType(u,t.symbol.name);return x?n(x):void 0})}function gF(){return{getNodeConstructor:()=>Md,getTokenConstructor:()=>e6,getIdentifierConstructor:()=>Ld,getPrivateIdentifierConstructor:()=>Jd,getSourceFileConstructor:()=>m7,getSymbolConstructor:()=>p7,getTypeConstructor:()=>f7,getSignatureConstructor:()=>d7,getSourceMapSourceConstructor:()=>h7}}function ll(e){let t=!0;for(let a in e)if(Wn(e,a)&&!_v(a)){t=!1;break}if(t)return e;let n={};for(let a in e)if(Wn(e,a)){let _=_v(a)?a:a.charAt(0).toLowerCase()+a.substr(1);n[_]=e[a]}return n}function _v(e){return!e.length||e.charAt(0)===e.charAt(0).toLowerCase()}function bF(e){return e?xa(e,t=>t.text).join(""):""}function a7(){return{target:1,jsx:1}}function o7(){return ts_codefix_exports.getSupportedErrorCodes()}function s7(e,t,n){e.version=n,e.scriptSnapshot=t}function Zb(e,t,n,a,_,p){let m=z8(e,getSnapshotText(t),n,_,p);return s7(m,t,a),m}function _7(e,t,n,a,_){if(a&&n!==e.version){let m,y=a.span.start!==0?e.text.substr(0,a.span.start):"",u=tn(a.span)!==e.text.length?e.text.substr(tn(a.span)):"";if(a.newLength===0)m=y&&u?y+u:y||u;else{let d=t.getText(a.span.start,a.span.start+a.newLength);m=y&&u?y+d+u:y?y+d:d+u}let x=Yb(e,m,a,_);return s7(x,t,n),x.nameTable=void 0,e!==x&&e.scriptSnapshot&&(e.scriptSnapshot.dispose&&e.scriptSnapshot.dispose(),e.scriptSnapshot=void 0),x}let p={languageVersion:e.languageVersion,impliedNodeFormat:e.impliedNodeFormat,setExternalModuleIndicator:e.setExternalModuleIndicator,jsDocParsingMode:e.jsDocParsingMode};return Zb(e.fileName,t,p,n,!0,e.scriptKind)}function vF(e,t=createDocumentRegistry(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory()),n){var a;let _;n===void 0?_=0:typeof n=="boolean"?_=n?2:0:_=n;let p=new y7(e),m,y,u=0,x=e.getCancellationToken?new b7(e.getCancellationToken()):g7,d=e.getCurrentDirectory();kS((a=e.getLocalizedDiagnosticMessages)==null?void 0:a.bind(e));function S(R){e.log&&e.log(R)}let T=O2(e),A=zd(T),N=getSourceMapper({useCaseSensitiveFileNames:()=>T,getCurrentDirectory:()=>d,getProgram:se,fileExists:sn(e,e.fileExists),readFile:sn(e,e.readFile),getDocumentPositionMapper:sn(e,e.getDocumentPositionMapper),getSourceFileLike:sn(e,e.getSourceFileLike),log:S});function q(R){let v=m.getSourceFile(R);if(!v){let w=new Error(`Could not find source file: '${R}'.`);throw w.ProgramFiles=m.getSourceFiles().map(f=>f.fileName),w}return v}function Q(){var R,v,w;if(I.assert(_!==2),e.getProjectVersion){let Pe=e.getProjectVersion();if(Pe){if(y===Pe&&!((R=e.hasChangedAutomaticTypeDirectiveNames)!=null&&R.call(e)))return;y=Pe}}let f=e.getTypeRootsVersion?e.getTypeRootsVersion():0;u!==f&&(S("TypeRoots version has changed; provide new program"),m=void 0,u=f);let X=e.getScriptFileNames().slice(),$=e.getCompilationSettings()||a7(),O=e.hasInvalidatedResolutions||$f,ue=sn(e,e.hasInvalidatedLibResolutions)||$f,be=sn(e,e.hasChangedAutomaticTypeDirectiveNames),ge=(v=e.getProjectReferences)==null?void 0:v.call(e),Le,xe={getSourceFile:G,getSourceFileByPath:La,getCancellationToken:()=>x,getCanonicalFileName:A,useCaseSensitiveFileNames:()=>T,getNewLine:()=>hS($),getDefaultLibFileName:Pe=>e.getDefaultLibFileName(Pe),writeFile:gr,getCurrentDirectory:()=>d,fileExists:Pe=>e.fileExists(Pe),readFile:Pe=>e.readFile&&e.readFile(Pe),getSymlinkCache:sn(e,e.getSymlinkCache),realpath:sn(e,e.realpath),directoryExists:Pe=>mS(Pe,e),getDirectories:Pe=>e.getDirectories?e.getDirectories(Pe):[],readDirectory:(Pe,ot,un,ur,Ja)=>(I.checkDefined(e.readDirectory,"'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"),e.readDirectory(Pe,ot,un,ur,Ja)),onReleaseOldSourceFile:Dt,onReleaseParsedCommandLine:Ir,hasInvalidatedResolutions:O,hasInvalidatedLibResolutions:ue,hasChangedAutomaticTypeDirectiveNames:be,trace:sn(e,e.trace),resolveModuleNames:sn(e,e.resolveModuleNames),getModuleResolutionCache:sn(e,e.getModuleResolutionCache),createHash:sn(e,e.createHash),resolveTypeReferenceDirectives:sn(e,e.resolveTypeReferenceDirectives),resolveModuleNameLiterals:sn(e,e.resolveModuleNameLiterals),resolveTypeReferenceDirectiveReferences:sn(e,e.resolveTypeReferenceDirectiveReferences),resolveLibrary:sn(e,e.resolveLibrary),useSourceOfProjectReferenceRedirect:sn(e,e.useSourceOfProjectReferenceRedirect),getParsedCommandLine:ve,jsDocParsingMode:e.jsDocParsingMode},Ye=xe.getSourceFile,{getSourceFileWithCache:Ge}=changeCompilerHostLikeToUseCache(xe,Pe=>Di(Pe,d,A),(...Pe)=>Ye.call(xe,...Pe));xe.getSourceFile=Ge,(w=e.setCompilerHost)==null||w.call(e,xe);let Xe={useCaseSensitiveFileNames:T,fileExists:Pe=>xe.fileExists(Pe),readFile:Pe=>xe.readFile(Pe),directoryExists:Pe=>xe.directoryExists(Pe),getDirectories:Pe=>xe.getDirectories(Pe),realpath:xe.realpath,readDirectory:(...Pe)=>xe.readDirectory(...Pe),trace:xe.trace,getCurrentDirectory:xe.getCurrentDirectory,onUnRecoverableConfigFileDiagnostic:gr},Nt=t.getKeyForCompilationSettings($),Xt=new Set;if(isProgramUptoDate(m,X,$,(Pe,ot)=>e.getScriptVersion(ot),Pe=>xe.fileExists(Pe),O,ue,be,ve,ge)){xe=void 0,Le=void 0,Xt=void 0;return}let ln={rootNames:X,options:$,host:xe,oldProgram:m,projectReferences:ge};m=createProgram(ln),xe=void 0,Le=void 0,Xt=void 0,N.clearCache(),m.getTypeChecker();return;function ve(Pe){let ot=Di(Pe,d,A),un=Le==null?void 0:Le.get(ot);if(un!==void 0)return un||void 0;let ur=e.getParsedCommandLine?e.getParsedCommandLine(Pe):ft(Pe);return(Le||(Le=new Map)).set(ot,ur||!1),ur}function ft(Pe){let ot=G(Pe,100);if(ot)return ot.path=Di(Pe,d,A),ot.resolvedPath=ot.path,ot.originalFileName=ot.fileName,parseJsonSourceFileConfigFileContent(ot,Xe,Gi(Mi(Pe),d),void 0,Gi(Pe,d))}function Ir(Pe,ot,un){var ur;e.getParsedCommandLine?(ur=e.onReleaseParsedCommandLine)==null||ur.call(e,Pe,ot,un):ot&&Dt(ot.sourceFile,un)}function Dt(Pe,ot){let un=t.getKeyForCompilationSettings(ot);t.releaseDocumentWithKey(Pe.resolvedPath,un,Pe.scriptKind,Pe.impliedNodeFormat)}function G(Pe,ot,un,ur){return La(Pe,Di(Pe,d,A),ot,un,ur)}function La(Pe,ot,un,ur,Ja){I.assert(xe,"getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");let Nr=e.getScriptSnapshot(Pe);if(!Nr)return;let Re=getScriptKind(Pe,e),dt=e.getScriptVersion(Pe);if(!Ja){let mi=m&&m.getSourceFileByPath(ot);if(mi){if(Re===mi.scriptKind||Xt.has(mi.resolvedPath))return t.updateDocumentWithKey(Pe,ot,e,Nt,Nr,dt,Re,un);t.releaseDocumentWithKey(mi.resolvedPath,t.getKeyForCompilationSettings(m.getCompilerOptions()),mi.scriptKind,mi.impliedNodeFormat),Xt.add(mi.resolvedPath)}}return t.acquireDocumentWithKey(Pe,ot,e,Nt,Nr,dt,Re,un)}}function se(){if(_===2){I.assert(m===void 0);return}return Q(),m}function fe(){var R;return(R=e.getPackageJsonAutoImportProvider)==null?void 0:R.call(e)}function F(R,v){let w=m.getTypeChecker(),f=X();if(!f)return!1;for(let O of R)for(let ue of O.references){let be=$(ue);if(I.assertIsDefined(be),v.has(ue)||ts_FindAllReferences_exports.isDeclarationOfSymbol(be,f)){v.add(ue),ue.isDefinition=!0;let ge=getMappedDocumentSpan(ue,N,sn(e,e.fileExists));ge&&v.add(ge)}else ue.isDefinition=!1}return!0;function X(){for(let O of R)for(let ue of O.references){if(v.has(ue)){let ge=$(ue);return I.assertIsDefined(ge),w.getSymbolAtLocation(ge)}let be=getMappedDocumentSpan(ue,N,sn(e,e.fileExists));if(be&&v.has(be)){let ge=$(be);if(ge)return w.getSymbolAtLocation(ge)}}}function $(O){let ue=m.getSourceFile(O.fileName);if(!ue)return;let be=getTouchingPropertyName(ue,O.textSpan.start);return ts_FindAllReferences_exports.Core.getAdjustedNode(be,{use:ts_FindAllReferences_exports.FindReferencesUse.References})}}function W(){if(m){let R=t.getKeyForCompilationSettings(m.getCompilerOptions());wn(m.getSourceFiles(),v=>t.releaseDocumentWithKey(v.resolvedPath,R,v.scriptKind,v.impliedNodeFormat)),m=void 0}}function Se(){W(),e=void 0}function Qe(R){return Q(),m.getSyntacticDiagnostics(q(R),x).slice()}function Be(R){Q();let v=q(R),w=m.getSemanticDiagnostics(v,x);if(!Q2(m.getCompilerOptions()))return w.slice();let f=m.getDeclarationDiagnostics(v,x);return[...w,...f]}function st(R){return Q(),computeSuggestionDiagnostics(q(R),m,x)}function _t(){return Q(),[...m.getOptionsDiagnostics(x),...m.getGlobalDiagnostics(x)]}function hn(R,v,w=emptyOptions,f){let X={...w,includeCompletionsForModuleExports:w.includeCompletionsForModuleExports||w.includeExternalModuleExports,includeCompletionsWithInsertText:w.includeCompletionsWithInsertText||w.includeInsertTextCompletions};return Q(),ts_Completions_exports.getCompletionsAtPosition(e,m,S,q(R),v,X,w.triggerCharacter,w.triggerKind,x,f&&ts_formatting_exports.getFormatContext(f,e),w.includeSymbol)}function yn(R,v,w,f,X,$=emptyOptions,O){return Q(),ts_Completions_exports.getCompletionEntryDetails(m,S,q(R),v,{name:w,source:X,data:O},e,f&&ts_formatting_exports.getFormatContext(f,e),$,x)}function fi(R,v,w,f,X=emptyOptions){return Q(),ts_Completions_exports.getCompletionEntrySymbol(m,S,q(R),v,{name:w,source:f},e,X)}function gn(R,v){Q();let w=q(R),f=getTouchingPropertyName(w,v);if(f===w)return;let X=m.getTypeChecker(),$=cr(f),O=EF($,X);if(!O||X.isUnknownSymbol(O)){let xe=He(w,$,v)?X.getTypeAtLocation($):void 0;return xe&&{kind:"",kindModifiers:"",textSpan:createTextSpanFromNode($,w),displayParts:X.runWithCancellationToken(x,Ye=>typeToDisplayParts(Ye,xe,getContainerNode($))),documentation:xe.symbol?xe.symbol.getDocumentationComment(X):void 0,tags:xe.symbol?xe.symbol.getJsDocTags(X):void 0}}let{symbolKind:ue,displayParts:be,documentation:ge,tags:Le}=X.runWithCancellationToken(x,xe=>ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(xe,O,w,getContainerNode($),$));return{kind:ue,kindModifiers:ts_SymbolDisplay_exports.getSymbolModifiers(X,O),textSpan:createTextSpanFromNode($,w),displayParts:be,documentation:ge,tags:Le}}function cr(R){return r8(R.parent)&&R.pos===R.parent.pos?R.parent.expression:vb(R.parent)&&R.pos===R.parent.pos||k0(R.parent)&&R.parent.name===R||B_(R.parent)?R.parent:R}function He(R,v,w){switch(v.kind){case 80:return!isLabelName(v)&&!isTagName(v)&&!X4(v.parent);case 211:case 166:return!isInComment(R,w);case 110:case 197:case 108:case 202:return!0;case 236:return k0(v);default:return!1}}function Qn(R,v,w,f){return Q(),ts_GoToDefinition_exports.getDefinitionAtPosition(m,q(R),v,w,f)}function Gr(R,v){return Q(),ts_GoToDefinition_exports.getDefinitionAndBoundSpan(m,q(R),v)}function vt(R,v){return Q(),ts_GoToDefinition_exports.getTypeDefinitionAtPosition(m.getTypeChecker(),q(R),v)}function Jn(R,v){return Q(),ts_FindAllReferences_exports.getImplementationsAtPosition(m,x,m.getSourceFiles(),q(R),v)}function Ar(R,v,w){let f=br(R);I.assert(w.some(O=>br(O)===f)),Q();let X=wa(w,O=>m.getSourceFile(O)),$=q(R);return DocumentHighlights.getDocumentHighlights(m,x,$,v,X)}function Ht(R,v,w,f,X){Q();let $=q(R),O=getAdjustedRenameLocation(getTouchingPropertyName($,v));if(ts_Rename_exports.nodeIsEligibleForRename(O))if(Ae(O)&&(Jo(O.parent)||zf(O.parent))&&j3(O.escapedText)){let{openingElement:ue,closingElement:be}=O.parent.parent;return[ue,be].map(ge=>{let Le=createTextSpanFromNode(ge.tagName,$);return{fileName:$.fileName,textSpan:Le,...ts_FindAllReferences_exports.toContextSpan(Le,$,ge.parent)}})}else{let ue=getQuotePreference($,X??emptyOptions),be=typeof X=="boolean"?X:X==null?void 0:X.providePrefixAndSuffixTextForRename;return at(O,v,{findInStrings:w,findInComments:f,providePrefixAndSuffixTextForRename:be,use:ts_FindAllReferences_exports.FindReferencesUse.Rename},(ge,Le,xe)=>ts_FindAllReferences_exports.toRenameLocation(ge,Le,xe,be||!1,ue))}}function rn(R,v){return Q(),at(getTouchingPropertyName(q(R),v),v,{use:ts_FindAllReferences_exports.FindReferencesUse.References},ts_FindAllReferences_exports.toReferenceEntry)}function at(R,v,w,f){Q();let X=w&&w.use===ts_FindAllReferences_exports.FindReferencesUse.Rename?m.getSourceFiles().filter($=>!m.isSourceFileDefaultLibrary($)):m.getSourceFiles();return ts_FindAllReferences_exports.findReferenceOrRenameEntries(m,x,X,R,v,w,f)}function kr(R,v){return Q(),ts_FindAllReferences_exports.findReferencedSymbols(m,x,m.getSourceFiles(),q(R),v)}function an(R){return Q(),ts_FindAllReferences_exports.Core.getReferencesForFileName(R,m,m.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry)}function xt(R,v,w,f=!1,X=!1){Q();let $=w?[q(w)]:m.getSourceFiles();return getNavigateToItems($,m.getTypeChecker(),x,R,v,f,X)}function ut(R,v,w){Q();let f=q(R),X=e.getCustomTransformers&&e.getCustomTransformers();return getFileEmitOutput(m,f,!!v,x,X,w)}function Gt(R,v,{triggerReason:w}=emptyOptions){Q();let f=q(R);return ts_SignatureHelp_exports.getSignatureHelpItems(m,f,v,w,x)}function cn(R){return p.getCurrentSourceFile(R)}function ht(R,v,w){let f=p.getCurrentSourceFile(R),X=getTouchingPropertyName(f,v);if(X===f)return;switch(X.kind){case 211:case 166:case 11:case 97:case 112:case 106:case 108:case 110:case 197:case 80:break;default:return}let $=X;for(;;)if(isRightSideOfPropertyAccess($)||isRightSideOfQualifiedName($))$=$.parent;else if(isNameOfModuleDeclaration($))if($.parent.parent.kind===267&&$.parent.parent.body===$.parent)$=$.parent.parent.name;else break;else break;return Xi($.getStart(),X.getEnd())}function Dr(R,v){let w=p.getCurrentSourceFile(R);return ts_BreakpointResolver_exports.spanInSourceFileAtLocation(w,v)}function Tt(R){return getNavigationBarItems(p.getCurrentSourceFile(R),x)}function Rn(R){return getNavigationTree(p.getCurrentSourceFile(R),x)}function yt(R,v,w){return Q(),(w||"original")==="2020"?getSemanticClassifications2(m,x,q(R),v):getSemanticClassifications(m.getTypeChecker(),x,q(R),m.getClassifiableNames(),v)}function jn(R,v,w){return Q(),(w||"original")==="original"?getEncodedSemanticClassifications(m.getTypeChecker(),x,q(R),m.getClassifiableNames(),v):getEncodedSemanticClassifications2(m,x,q(R),v)}function ct(R,v){return getSyntacticClassifications(x,p.getCurrentSourceFile(R),v)}function Kt(R,v){return getEncodedSyntacticClassifications(x,p.getCurrentSourceFile(R),v)}function Zt(R){let v=p.getCurrentSourceFile(R);return ts_OutliningElementsCollector_exports.collectElements(v,x)}let lr=new Map(Object.entries({19:20,21:22,23:24,32:30}));lr.forEach((R,v)=>lr.set(R.toString(),Number(v)));function di(R,v){let w=p.getCurrentSourceFile(R),f=getTouchingToken(w,v),X=f.getStart(w)===v?lr.get(f.kind.toString()):void 0,$=X&&findChildOfKind(f.parent,X,w);return $?[createTextSpanFromNode(f,w),createTextSpanFromNode($,w)].sort((O,ue)=>O.start-ue.start):Je}function Xr(R,v,w){let f=ga(),X=ll(w),$=p.getCurrentSourceFile(R);S("getIndentationAtPosition: getCurrentSourceFile: "+(ga()-f)),f=ga();let O=ts_formatting_exports.SmartIndenter.getIndentation(v,$,X);return S("getIndentationAtPosition: computeIndentation : "+(ga()-f)),O}function Yn(R,v,w,f){let X=p.getCurrentSourceFile(R);return ts_formatting_exports.formatSelection(v,w,X,ts_formatting_exports.getFormatContext(ll(f),e))}function Kn(R,v){return ts_formatting_exports.formatDocument(p.getCurrentSourceFile(R),ts_formatting_exports.getFormatContext(ll(v),e))}function Ji(R,v,w,f){let X=p.getCurrentSourceFile(R),$=ts_formatting_exports.getFormatContext(ll(f),e);if(!isInComment(X,v))switch(w){case"{":return ts_formatting_exports.formatOnOpeningCurly(v,X,$);case"}":return ts_formatting_exports.formatOnClosingCurly(v,X,$);case";":return ts_formatting_exports.formatOnSemicolon(v,X,$);case` +`:return ts_formatting_exports.formatOnEnter(v,X,$)}return[]}function Pr(R,v,w,f,X,$=emptyOptions){Q();let O=q(R),ue=Xi(v,w),be=ts_formatting_exports.getFormatContext(X,e);return zo(yv(f,_o,Mn),ge=>(x.throwIfCancellationRequested(),ts_codefix_exports.getFixes({errorCode:ge,sourceFile:O,span:ue,program:m,host:e,cancellationToken:x,formatContext:be,preferences:$})))}function De(R,v,w,f=emptyOptions){Q(),I.assert(R.type==="file");let X=q(R.fileName),$=ts_formatting_exports.getFormatContext(w,e);return ts_codefix_exports.getAllFixes({fixId:v,sourceFile:X,program:m,host:e,cancellationToken:x,formatContext:$,preferences:f})}function U(R,v,w=emptyOptions){Q(),I.assert(R.type==="file");let f=q(R.fileName),X=ts_formatting_exports.getFormatContext(v,e),$=R.mode??(R.skipDestructiveCodeActions?"SortAndCombine":"All");return ts_OrganizeImports_exports.organizeImports(f,X,e,m,w,$)}function ie(R,v,w,f=emptyOptions){return getEditsForFileRename(se(),R,v,e,ts_formatting_exports.getFormatContext(w,e),f,N)}function ye(R,v){let w=typeof R=="string"?v:R;return $t(w)?Promise.all(w.map(f=>Te(f))):Te(w)}function Te(R){let v=w=>Di(w,d,A);return I.assertEqual(R.type,"install package"),e.installPackage?e.installPackage({fileName:v(R.file),packageName:R.packageName}):Promise.reject("Host does not implement `installPackage`")}function tt(R,v,w,f){let X=f?ts_formatting_exports.getFormatContext(f,e).options:void 0;return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(e,X),p.getCurrentSourceFile(R),v,w)}function $e(R,v,w){if(w===60)return!1;let f=p.getCurrentSourceFile(R);if(isInString(f,v))return!1;if(isInsideJsxElementOrAttribute(f,v))return w===123;if(isInTemplateString(f,v))return!1;switch(w){case 39:case 34:case 96:return!isInComment(f,v)}return!0}function Ut(R,v){let w=p.getCurrentSourceFile(R),f=findPrecedingToken(v,w);if(!f)return;let X=f.kind===32&&Jo(f.parent)?f.parent.parent:Pd(f)&&tg(f.parent)?f.parent:void 0;if(X&&Ee(X))return{newText:``};let $=f.kind===32&&Jb(f.parent)?f.parent.parent:Pd(f)&&yl(f.parent)?f.parent:void 0;if($&&je($))return{newText:""}}function St(R,v){let w=p.getCurrentSourceFile(R),f=findPrecedingToken(v,w);if(!f||f.parent.kind===312)return;let X="[a-zA-Z0-9:\\-\\._$]*";if(yl(f.parent.parent)){let $=f.parent.parent.openingFragment,O=f.parent.parent.closingFragment;if(El($)||El(O))return;let ue=$.getStart(w)+1,be=O.getStart(w)+2;return v!==ue&&v!==be?void 0:{ranges:[{start:ue,length:0},{start:be,length:0}],wordPattern:X}}else{let $=or(f.parent,Ge=>!!(Jo(Ge)||zf(Ge)));if(!$)return;I.assert(Jo($)||zf($),"tag should be opening or closing element");let O=$.parent.openingElement,ue=$.parent.closingElement,be=O.tagName.getStart(w),ge=O.tagName.end,Le=ue.tagName.getStart(w),xe=ue.tagName.end;return!(be<=v&&v<=ge||Le<=v&&v<=xe)||O.tagName.getText(w)!==ue.tagName.getText(w)?void 0:{ranges:[{start:be,length:ge-be},{start:Le,length:xe-Le}],wordPattern:X}}}function Jt(R,v){return{lineStarts:R.getLineStarts(),firstLine:R.getLineAndCharacterOfPosition(v.pos).line,lastLine:R.getLineAndCharacterOfPosition(v.end).line}}function Rt(R,v,w){let f=p.getCurrentSourceFile(R),X=[],{lineStarts:$,firstLine:O,lastLine:ue}=Jt(f,v),be=w||!1,ge=Number.MAX_VALUE,Le=new Map,xe=new RegExp(/\S/),Ye=isInsideJsxElement(f,$[O]),Ge=Ye?"{/*":"//";for(let Xe=O;Xe<=ue;Xe++){let Nt=f.text.substring($[Xe],f.getLineEndOfPosition($[Xe])),Xt=xe.exec(Nt);Xt&&(ge=Math.min(ge,Xt.index),Le.set(Xe.toString(),Xt.index),Nt.substr(Xt.index,Ge.length)!==Ge&&(be=w===void 0||w))}for(let Xe=O;Xe<=ue;Xe++){if(O!==ue&&$[Xe]===v.end)continue;let Nt=Le.get(Xe.toString());Nt!==void 0&&(Ye?X.push(...z(R,{pos:$[Xe]+ge,end:f.getLineEndOfPosition($[Xe])},be,Ye)):be?X.push({newText:Ge,span:{length:0,start:$[Xe]+ge}}):f.text.substr($[Xe]+Nt,Ge.length)===Ge&&X.push({newText:"",span:{length:Ge.length,start:$[Xe]+Nt}}))}return X}function z(R,v,w,f){var X;let $=p.getCurrentSourceFile(R),O=[],{text:ue}=$,be=!1,ge=w||!1,Le=[],{pos:xe}=v,Ye=f!==void 0?f:isInsideJsxElement($,xe),Ge=Ye?"{/*":"/*",Xe=Ye?"*/}":"*/",Nt=Ye?"\\{\\/\\*":"\\/\\*",Xt=Ye?"\\*\\/\\}":"\\*\\/";for(;xe<=v.end;){let ln=ue.substr(xe,Ge.length)===Ge?Ge.length:0,ve=isInComment($,xe+ln);if(ve)Ye&&(ve.pos--,ve.end++),Le.push(ve.pos),ve.kind===3&&Le.push(ve.end),be=!0,xe=ve.end+1;else{let ft=ue.substring(xe,v.end).search(`(${Nt})|(${Xt})`);ge=w!==void 0?w:ge||!isTextWhiteSpaceLike(ue,xe,ft===-1?v.end:xe+ft),xe=ft===-1?v.end+1:xe+ft+Xe.length}}if(ge||!be){((X=isInComment($,v.pos))==null?void 0:X.kind)!==2&&vl(Le,v.pos,Mn),vl(Le,v.end,Mn);let ln=Le[0];ue.substr(ln,Ge.length)!==Ge&&O.push({newText:Ge,span:{length:0,start:ln}});for(let ve=1;ve0?ln-Xe.length:0,ft=ue.substr(ve,Xe.length)===Xe?Xe.length:0;O.push({newText:"",span:{length:Ge.length,start:ln-ft}})}return O}function K(R,v){let w=p.getCurrentSourceFile(R),{firstLine:f,lastLine:X}=Jt(w,v);return f===X&&v.pos!==v.end?z(R,v,!0):Rt(R,v,!0)}function te(R,v){let w=p.getCurrentSourceFile(R),f=[],{pos:X}=v,{end:$}=v;X===$&&($+=isInsideJsxElement(w,X)?2:1);for(let O=X;O<=$;O++){let ue=isInComment(w,O);if(ue){switch(ue.kind){case 2:f.push(...Rt(R,{end:ue.end,pos:ue.pos+1},!1));break;case 3:f.push(...z(R,{end:ue.end,pos:ue.pos+1},!1))}O=ue.end+1}}return f}function Ee({openingElement:R,closingElement:v,parent:w}){return!Ai(R.tagName,v.tagName)||tg(w)&&Ai(R.tagName,w.openingElement.tagName)&&Ee(w)}function je({closingFragment:R,parent:v}){return!!(R.flags&262144)||yl(v)&&je(v)}function pt(R,v,w){let f=p.getCurrentSourceFile(R),X=ts_formatting_exports.getRangeOfEnclosingComment(f,v);return X&&(!w||X.kind===3)?createTextSpanFromRange(X):void 0}function nt(R,v){Q();let w=q(R);x.throwIfCancellationRequested();let f=w.text,X=[];if(v.length>0&&!be(w.fileName)){let ge=O(),Le;for(;Le=ge.exec(f);){x.throwIfCancellationRequested();let xe=3;I.assert(Le.length===v.length+xe);let Ye=Le[1],Ge=Le.index+Ye.length;if(!isInComment(w,Ge))continue;let Xe;for(let Xt=0;Xt"("+$(ve.text)+")").join("|")+")",Xe=/(?:$|\*\/)/.source,Nt=/(?:.*?)/.source,Xt="("+Ge+Nt+")",ln=Ye+Xt+Xe;return new RegExp(ln,"gim")}function ue(ge){return ge>=97&&ge<=122||ge>=65&&ge<=90||ge>=48&&ge<=57}function be(ge){return ge.includes("/node_modules/")}}function kt(R,v,w){return Q(),ts_Rename_exports.getRenameInfo(m,q(R),v,w||{})}function qt(R,v,w,f,X,$){let[O,ue]=typeof v=="number"?[v,void 0]:[v.pos,v.end];return{file:R,startPosition:O,endPosition:ue,program:se(),host:e,formatContext:ts_formatting_exports.getFormatContext(f,e),cancellationToken:x,preferences:w,triggerReason:X,kind:$}}function Zn(R,v,w){return{file:R,program:se(),host:e,span:v,preferences:w,cancellationToken:x}}function kn(R,v){return ts_SmartSelectionRange_exports.getSmartSelectionRange(v,p.getCurrentSourceFile(R))}function er(R,v,w=emptyOptions,f,X,$){Q();let O=q(R);return ts_refactor_exports.getApplicableRefactors(qt(O,v,w,emptyOptions,f,X),$)}function Ri(R,v,w=emptyOptions){Q();let f=q(R),X=I.checkDefined(m.getSourceFiles()),$=al(R),O=wa(X,be=>!(m!=null&&m.isSourceFileFromExternalLibrary(f))&&!(f===q(be.fileName)||$===".ts"&&al(be.fileName)===".d.ts"||$===".d.ts"&&Hn(os(be.fileName),"lib.")&&al(be.fileName)===".d.ts")&&$===al(be.fileName)?be.fileName:void 0);return{newFileName:createNewFileName(f,m,qt(f,v,w,emptyOptions),e),files:O}}function aa(R,v,w,f,X,$=emptyOptions,O){Q();let ue=q(R);return ts_refactor_exports.getEditsForRefactor(qt(ue,w,$,v),f,X,O)}function $r(R,v){return v===0?{line:0,character:0}:N.toLineColumnOffset(R,v)}function Dn(R,v){Q();let w=ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(m,getTouchingPropertyName(q(R),v));return w&&mapOneOrMany(w,f=>ts_CallHierarchy_exports.createCallHierarchyItem(m,f))}function Ne(R,v){Q();let w=q(R),f=firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(m,v===0?w:getTouchingPropertyName(w,v)));return f?ts_CallHierarchy_exports.getIncomingCalls(m,f,x):[]}function oa(R,v){Q();let w=q(R),f=firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(m,v===0?w:getTouchingPropertyName(w,v)));return f?ts_CallHierarchy_exports.getOutgoingCalls(m,f):[]}function jt(R,v,w=emptyOptions){Q();let f=q(R);return ts_InlayHints_exports.provideInlayHints(Zn(f,v,w))}let Fn={dispose:Se,cleanupSemanticCache:W,getSyntacticDiagnostics:Qe,getSemanticDiagnostics:Be,getSuggestionDiagnostics:st,getCompilerOptionsDiagnostics:_t,getSyntacticClassifications:ct,getSemanticClassifications:yt,getEncodedSyntacticClassifications:Kt,getEncodedSemanticClassifications:jn,getCompletionsAtPosition:hn,getCompletionEntryDetails:yn,getCompletionEntrySymbol:fi,getSignatureHelpItems:Gt,getQuickInfoAtPosition:gn,getDefinitionAtPosition:Qn,getDefinitionAndBoundSpan:Gr,getImplementationAtPosition:Jn,getTypeDefinitionAtPosition:vt,getReferencesAtPosition:rn,findReferences:kr,getFileReferences:an,getDocumentHighlights:Ar,getNameOrDottedNameSpan:ht,getBreakpointStatementAtPosition:Dr,getNavigateToItems:xt,getRenameInfo:kt,getSmartSelectionRange:kn,findRenameLocations:Ht,getNavigationBarItems:Tt,getNavigationTree:Rn,getOutliningSpans:Zt,getTodoComments:nt,getBraceMatchingAtPosition:di,getIndentationAtPosition:Xr,getFormattingEditsForRange:Yn,getFormattingEditsForDocument:Kn,getFormattingEditsAfterKeystroke:Ji,getDocCommentTemplateAtPosition:tt,isValidBraceCompletionAtPosition:$e,getJsxClosingTagAtPosition:Ut,getLinkedEditingRangeAtPosition:St,getSpanOfEnclosingComment:pt,getCodeFixesAtPosition:Pr,getCombinedCodeFix:De,applyCodeActionCommand:ye,organizeImports:U,getEditsForFileRename:ie,getEmitOutput:ut,getNonBoundSourceFile:cn,getProgram:se,getCurrentProgram:()=>m,getAutoImportProvider:fe,updateIsDefinitionOfReferencedSymbols:F,getApplicableRefactors:er,getEditsForRefactor:aa,getMoveToRefactoringFileSuggestions:Ri,toLineColumnOffset:$r,getSourceMapper:()=>N,clearSourceMapperCache:()=>N.clearCache(),prepareCallHierarchy:Dn,provideCallHierarchyIncomingCalls:Ne,provideCallHierarchyOutgoingCalls:oa,toggleLineComment:Rt,toggleMultilineComment:z,commentSelection:K,uncommentSelection:te,provideInlayHints:jt,getSupportedCodeFixes:o7};switch(_){case 0:break;case 1:sg.forEach(R=>Fn[R]=()=>{throw new Error(`LanguageService Operation: ${R} not allowed in LanguageServiceMode.PartialSemantic`)});break;case 2:T7.forEach(R=>Fn[R]=()=>{throw new Error(`LanguageService Operation: ${R} not allowed in LanguageServiceMode.Syntactic`)});break;default:I.assertNever(_)}return Fn}function TF(e){return e.nameTable||SF(e),e.nameTable}function SF(e){let t=e.nameTable=new Map;e.forEachChild(function n(a){if(Ae(a)&&!isTagName(a)&&a.escapedText||Yi(a)&&xF(a)){let _=P3(a);t.set(_,t.get(_)===void 0?a.pos:-1)}else if(Vn(a)){let _=a.escapedText;t.set(_,t.get(_)===void 0?a.pos:-1)}if(Wt(a,n),Hi(a))for(let _ of a.jsDoc)Wt(_,n)})}function xF(e){return g3(e)||e.parent.kind===283||CF(e)||b3(e)}function c7(e){let t=wF(e);return t&&(uo(t.parent)||Rb(t.parent))?t:void 0}function wF(e){switch(e.kind){case 11:case 15:case 9:if(e.parent.kind===167)return x0(e.parent.parent)?e.parent.parent:void 0;case 80:return x0(e.parent)&&(e.parent.parent.kind===210||e.parent.parent.kind===292)&&e.parent.name===e?e.parent:void 0}}function EF(e,t){let n=c7(e);if(n){let a=t.getContextualType(n.parent),_=a&&l7(n,t,a,!1);if(_&&_.length===1)return pg(_)}return t.getSymbolAtLocation(e)}function l7(e,t,n,a){let _=getNameFromPropertyName(e.name);if(!_)return Je;if(!n.isUnion()){let m=n.getProperty(_);return m?[m]:Je}let p=wa(n.types,m=>(uo(e.parent)||Rb(e.parent))&&t.isTypeInvalidDueToUnionDiscriminant(m,e.parent)?void 0:m.getProperty(_));if(a&&(p.length===0||p.length===n.types.length)){let m=n.getProperty(_);if(m)return[m]}return p.length===0?wa(n.types,m=>m.getProperty(_)):p}function CF(e){return e&&e.parent&&e.parent.kind===212&&e.parent.argumentExpression===e}function AF(e){if(y0)return Qt(Mi(br(y0.getExecutingFilePath())),h4(e));throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ")}var u7,Md,Pf,p7,e6,Ld,Jd,f7,d7,m7,h7,y7,g7,b7,v7,sg,T7,kF=It({"src/services/services.ts"(){"use strict";S7(),Z8(),e7(),t7(),K8(),mF(),u7="0.8",Md=class{constructor(e,t,n){this.pos=t,this.end=n,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0,this.kind=e}assertHasRealPosition(e){I.assert(!Da(this.pos)&&!Da(this.end),e||"Node must have a real position for this operation")}getSourceFile(){return oi(this)}getStart(e,t){return this.assertHasRealPosition(),$o(this,e,t)}getFullStart(){return this.assertHasRealPosition(),this.pos}getEnd(){return this.assertHasRealPosition(),this.end}getWidth(e){return this.assertHasRealPosition(),this.getEnd()-this.getStart(e)}getFullWidth(){return this.assertHasRealPosition(),this.end-this.pos}getLeadingTriviaWidth(e){return this.assertHasRealPosition(),this.getStart(e)-this.pos}getFullText(e){return this.assertHasRealPosition(),(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return this.assertHasRealPosition(),e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(e){return this.getChildren(e).length}getChildAt(e,t){return this.getChildren(t)[e]}getChildren(e){return this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"),this._children||(this._children=hF(this,e))}getFirstToken(e){this.assertHasRealPosition();let t=this.getChildren(e);if(!t.length)return;let n=ir(t,a=>a.kind<316||a.kind>357);return n.kind<166?n:n.getFirstToken(e)}getLastToken(e){this.assertHasRealPosition();let t=this.getChildren(e),n=Pi(t);if(n)return n.kind<166?n:n.getLastToken(e)}forEachChild(e,t){return Wt(this,e,t)}},Pf=class{constructor(e,t){this.pos=e,this.end=t,this.flags=0,this.modifierFlagsCache=0,this.transformFlags=0,this.parent=void 0}getSourceFile(){return oi(this)}getStart(e,t){return $o(this,e,t)}getFullStart(){return this.pos}getEnd(){return this.end}getWidth(e){return this.getEnd()-this.getStart(e)}getFullWidth(){return this.end-this.pos}getLeadingTriviaWidth(e){return this.getStart(e)-this.pos}getFullText(e){return(e||this.getSourceFile()).text.substring(this.pos,this.end)}getText(e){return e||(e=this.getSourceFile()),e.text.substring(this.getStart(e),this.getEnd())}getChildCount(){return this.getChildren().length}getChildAt(e){return this.getChildren()[e]}getChildren(){return this.kind===1&&this.jsDoc||Je}getFirstToken(){}getLastToken(){}forEachChild(){}},p7=class{constructor(e,t){this.id=0,this.mergeId=0,this.flags=e,this.escapedName=t}getFlags(){return this.flags}get name(){return yd(this)}getEscapedName(){return this.escapedName}getName(){return this.name}getDeclarations(){return this.declarations}getDocumentationComment(e){if(!this.documentationComment)if(this.documentationComment=Je,!this.declarations&&E0(this)&&this.links.target&&E0(this.links.target)&&this.links.target.links.tupleLabelDeclaration){let t=this.links.target.links.tupleLabelDeclaration;this.documentationComment=tl([t],e)}else this.documentationComment=tl(this.declarations,e);return this.documentationComment}getContextualDocumentationComment(e,t){if(e){if(rl(e)&&(this.contextualGetAccessorDocumentationComment||(this.contextualGetAccessorDocumentationComment=tl(rr(this.declarations,rl),t)),eo(this.contextualGetAccessorDocumentationComment)))return this.contextualGetAccessorDocumentationComment;if(nl(e)&&(this.contextualSetAccessorDocumentationComment||(this.contextualSetAccessorDocumentationComment=tl(rr(this.declarations,nl),t)),eo(this.contextualSetAccessorDocumentationComment)))return this.contextualSetAccessorDocumentationComment}return this.getDocumentationComment(t)}getJsDocTags(e){return this.tags===void 0&&(this.tags=Df(this.declarations,e)),this.tags}getContextualJsDocTags(e,t){if(e){if(rl(e)&&(this.contextualGetAccessorTags||(this.contextualGetAccessorTags=Df(rr(this.declarations,rl),t)),eo(this.contextualGetAccessorTags)))return this.contextualGetAccessorTags;if(nl(e)&&(this.contextualSetAccessorTags||(this.contextualSetAccessorTags=Df(rr(this.declarations,nl),t)),eo(this.contextualSetAccessorTags)))return this.contextualSetAccessorTags}return this.getJsDocTags(t)}},e6=class extends Pf{constructor(e,t,n){super(t,n),this.kind=e}},Ld=class extends Pf{constructor(e,t,n){super(t,n),this.kind=80}get text(){return Lt(this)}},Ld.prototype.kind=80,Jd=class extends Pf{constructor(e,t,n){super(t,n),this.kind=81}get text(){return Lt(this)}},Jd.prototype.kind=81,f7=class{constructor(e,t){this.checker=e,this.flags=t}getFlags(){return this.flags}getSymbol(){return this.symbol}getProperties(){return this.checker.getPropertiesOfType(this)}getProperty(e){return this.checker.getPropertyOfType(this,e)}getApparentProperties(){return this.checker.getAugmentedPropertiesOfType(this)}getCallSignatures(){return this.checker.getSignaturesOfType(this,0)}getConstructSignatures(){return this.checker.getSignaturesOfType(this,1)}getStringIndexType(){return this.checker.getIndexTypeOfType(this,0)}getNumberIndexType(){return this.checker.getIndexTypeOfType(this,1)}getBaseTypes(){return this.isClassOrInterface()?this.checker.getBaseTypes(this):void 0}isNullableType(){return this.checker.isNullableType(this)}getNonNullableType(){return this.checker.getNonNullableType(this)}getNonOptionalType(){return this.checker.getNonOptionalType(this)}getConstraint(){return this.checker.getBaseConstraintOfType(this)}getDefault(){return this.checker.getDefaultFromTypeParameter(this)}isUnion(){return!!(this.flags&1048576)}isIntersection(){return!!(this.flags&2097152)}isUnionOrIntersection(){return!!(this.flags&3145728)}isLiteral(){return!!(this.flags&2432)}isStringLiteral(){return!!(this.flags&128)}isNumberLiteral(){return!!(this.flags&256)}isTypeParameter(){return!!(this.flags&262144)}isClassOrInterface(){return!!(jf(this)&3)}isClass(){return!!(jf(this)&1)}isIndexType(){return!!(this.flags&4194304)}get typeArguments(){if(jf(this)&4)return this.checker.getTypeArguments(this)}},d7=class{constructor(e,t){this.checker=e,this.flags=t}getDeclaration(){return this.declaration}getTypeParameters(){return this.typeParameters}getParameters(){return this.parameters}getReturnType(){return this.checker.getReturnTypeOfSignature(this)}getTypeParameterAtPosition(e){let t=this.checker.getParameterType(this,e);if(t.isIndexType()&&tx(t.type)){let n=t.type.getConstraint();if(n)return this.checker.getIndexType(n)}return t}getDocumentationComment(){return this.documentationComment||(this.documentationComment=tl(Yf(this.declaration),this.checker))}getJsDocTags(){return this.jsDocTags||(this.jsDocTags=Df(Yf(this.declaration),this.checker))}},m7=class extends Md{constructor(e,t,n){super(e,t,n),this.kind=312}update(e,t){return Yb(this,e,t)}getLineAndCharacterOfPosition(e){return no(this,e)}getLineStarts(){return Aa(this)}getPositionOfLineAndCharacter(e,t,n){return Ag(Aa(this),e,t,this.text,n)}getLineEndOfPosition(e){let{line:t}=this.getLineAndCharacterOfPosition(e),n=this.getLineStarts(),a;t+1>=n.length&&(a=this.getEnd()),a||(a=n[t+1]-1);let _=this.getFullText();return _[a]===` +`&&_[a-1]==="\r"?a-1:a}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=Ud();return this.forEachChild(_),e;function t(p){let m=a(p);m&&e.add(m,p)}function n(p){let m=e.get(p);return m||e.set(p,m=[]),m}function a(p){let m=Zd(p);return m&&(oo(m)&&Ln(m.expression)?m.expression.name.text:Vl(m)?getNameFromPropertyName(m):void 0)}function _(p){switch(p.kind){case 262:case 218:case 174:case 173:let m=p,y=a(m);if(y){let d=n(y),S=Pi(d);S&&m.parent===S.parent&&m.symbol===S.symbol?m.body&&!S.body&&(d[d.length-1]=m):d.push(m)}Wt(p,_);break;case 263:case 231:case 264:case 265:case 266:case 267:case 271:case 281:case 276:case 273:case 274:case 177:case 178:case 187:t(p),Wt(p,_);break;case 169:if(!Cn(p,31))break;case 260:case 208:{let d=p;if(om(d.name)){Wt(d.name,_);break}d.initializer&&_(d.initializer)}case 306:case 172:case 171:t(p);break;case 278:let u=p;u.exportClause&&(u8(u.exportClause)?wn(u.exportClause.elements,_):_(u.exportClause.name));break;case 272:let x=p.importClause;x&&(x.name&&t(x.name),x.namedBindings&&(x.namedBindings.kind===274?t(x.namedBindings):wn(x.namedBindings.elements,_)));break;case 226:Oa(p)!==0&&t(p);default:Wt(p,_)}}}},h7=class{constructor(e,t,n){this.fileName=e,this.text=t,this.skipTrivia=n}getLineAndCharacterOfPosition(e){return no(this,e)}},y7=class{constructor(e){this.host=e}getCurrentSourceFile(e){var t,n,a,_,p,m,y,u;let x=this.host.getScriptSnapshot(e);if(!x)throw new Error("Could not find file: '"+e+"'.");let d=getScriptKind(e,this.host),S=this.host.getScriptVersion(e),T;if(this.currentFileName!==e){let A={languageVersion:99,impliedNodeFormat:getImpliedNodeFormatForFile(Di(e,this.host.getCurrentDirectory(),((a=(n=(t=this.host).getCompilerHost)==null?void 0:n.call(t))==null?void 0:a.getCanonicalFileName)||F3(this.host)),(u=(y=(m=(p=(_=this.host).getCompilerHost)==null?void 0:p.call(_))==null?void 0:m.getModuleResolutionCache)==null?void 0:y.call(m))==null?void 0:u.getPackageJsonInfoCache(),this.host,this.host.getCompilationSettings()),setExternalModuleIndicator:NS(this.host.getCompilationSettings()),jsDocParsingMode:0};T=Zb(e,x,A,S,!0,d)}else if(this.currentFileVersion!==S){let A=x.getChangeRange(this.currentFileScriptSnapshot);T=_7(this.currentSourceFile,x,S,A)}return T&&(this.currentFileVersion=S,this.currentFileName=e,this.currentFileScriptSnapshot=x,this.currentSourceFile=T),this.currentSourceFile}},g7={isCancellationRequested:$f,throwIfCancellationRequested:gr},b7=class{constructor(e){this.cancellationToken=e}isCancellationRequested(){return this.cancellationToken.isCancellationRequested()}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw(e=ba)==null||e.instant(ba.Phase.Session,"cancellationThrown",{kind:"CancellationTokenObject"}),new od}},v7=class{constructor(e,t=20){this.hostCancellationToken=e,this.throttleWaitMilliseconds=t,this.lastCancellationCheckTime=0}isCancellationRequested(){let e=ga();return Math.abs(e-this.lastCancellationCheckTime)>=this.throttleWaitMilliseconds?(this.lastCancellationCheckTime=e,this.hostCancellationToken.isCancellationRequested()):!1}throwIfCancellationRequested(){var e;if(this.isCancellationRequested())throw(e=ba)==null||e.instant(ba.Phase.Session,"cancellationThrown",{kind:"ThrottledCancellationToken"}),new od}},sg=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes"],T7=[...sg,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors"],CS(gF())}}),DF=()=>{},PF=()=>{},IF=()=>{},NF=()=>{},OF=()=>{},MF=()=>{},LF=()=>{},JF=()=>{},RF=()=>{},jF=()=>{},FF=()=>{},BF=()=>{},UF=()=>{},qF=()=>{},zF=()=>{},WF=()=>{},VF=()=>{},HF=()=>{},S7=It({"src/services/_namespaces/ts.ts"(){"use strict";En(),Kb(),aF(),Y8(),oF(),K8(),sF(),_F(),cF(),lF(),uF(),pF(),fF(),dF(),kF(),DF(),PF(),IF(),NF(),OF(),MF(),LF(),JF(),RF(),jF(),Z8(),e7(),FF(),BF(),t7(),UF(),qF(),zF(),WF(),VF(),HF()}}),GF=It({"src/typingsInstallerCore/_namespaces/ts.ts"(){"use strict";En(),Kb(),A7()}});function cv(e,t,n,a){try{let _=resolveModuleName(t,Qt(e,"index.d.ts"),{moduleResolution:2},n);return _.resolvedModule&&_.resolvedModule.resolvedFileName}catch(_){a.isEnabled()&&a.writeLine(`Failed to resolve ${t} in folder '${e}': ${_.message}`);return}}function XF(e,t,n,a){let _=!1;for(let p=n.length;p>0;){let m=x7(e,t,n,p);p=m.remaining,_=a(m.command)||_}return _}function x7(e,t,n,a){let _=n.length-a,p,m=a;for(;p=`${e} install --ignore-scripts ${(m===n.length?n:n.slice(_,_+m)).join(" ")} --save-dev --user-agent="typesInstaller/${t}"`,!(p.length<8e3);)m=m-Math.floor(m/2);return{command:p,remaining:a-m}}function w7(e){return`@types/${e}@ts${Rd}`}var lv,E7,$F=It({"src/typingsInstallerCore/typingsInstaller.ts"(){"use strict";GF(),A7(),lv={isEnabled:()=>!1,writeLine:gr},E7=class{constructor(e,t,n,a,_,p=lv){this.installTypingHost=e,this.globalCachePath=t,this.safeListPath=n,this.typesMapLocation=a,this.throttleLimit=_,this.log=p,this.packageNameToTypingLocation=new Map,this.missingTypingsSet=new Set,this.knownCachesSet=new Set,this.projectWatchers=new Map,this.pendingRunRequests=[],this.installRunCount=1,this.inFlightRequestCount=0,this.latestDistTag="latest",this.log.isEnabled()&&this.log.writeLine(`Global cache location '${t}', safe file path '${n}', types map path ${a}`),this.processCacheLocation(this.globalCachePath)}closeProject(e){this.closeWatchers(e.projectName)}closeWatchers(e){if(this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}'`),!this.projectWatchers.get(e)){this.log.isEnabled()&&this.log.writeLine(`No watchers are registered for project '${e}'`);return}this.projectWatchers.delete(e),this.sendResponse({kind:ActionWatchTypingLocations,projectName:e,files:[]}),this.log.isEnabled()&&this.log.writeLine(`Closing file watchers for project '${e}' - done.`)}install(e){this.log.isEnabled()&&this.log.writeLine(`Got install request${stringifyIndented(e)}`),e.cachePath&&(this.log.isEnabled()&&this.log.writeLine(`Request specifies cache path '${e.cachePath}', loading cached information...`),this.processCacheLocation(e.cachePath)),this.safeList===void 0&&this.initializeSafeList();let t=ts_JsTyping_exports.discoverTypings(this.installTypingHost,this.log.isEnabled()?n=>this.log.writeLine(n):void 0,e.fileNames,e.projectRootPath,this.safeList,this.packageNameToTypingLocation,e.typeAcquisition,e.unresolvedImports,this.typesRegistry,e.compilerOptions);this.watchFiles(e.projectName,t.filesToWatch),t.newTypingNames.length?this.installTypings(e,e.cachePath||this.globalCachePath,t.cachedTypingPaths,t.newTypingNames):(this.sendResponse(this.createSetTypings(e,t.cachedTypingPaths)),this.log.isEnabled()&&this.log.writeLine("No new typings were requested as a result of typings discovery"))}initializeSafeList(){if(this.typesMapLocation){let e=ts_JsTyping_exports.loadTypesMap(this.installTypingHost,this.typesMapLocation);if(e){this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`),this.safeList=e;return}this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`)}this.safeList=ts_JsTyping_exports.loadSafeList(this.installTypingHost,this.safeListPath)}processCacheLocation(e){if(this.log.isEnabled()&&this.log.writeLine(`Processing cache location '${e}'`),this.knownCachesSet.has(e)){this.log.isEnabled()&&this.log.writeLine("Cache location was already processed...");return}let t=Qt(e,"package.json"),n=Qt(e,"package-lock.json");if(this.log.isEnabled()&&this.log.writeLine(`Trying to find '${t}'...`),this.installTypingHost.fileExists(t)&&this.installTypingHost.fileExists(n)){let a=JSON.parse(this.installTypingHost.readFile(t)),_=JSON.parse(this.installTypingHost.readFile(n));if(this.log.isEnabled()&&(this.log.writeLine(`Loaded content of '${t}':${stringifyIndented(a)}`),this.log.writeLine(`Loaded content of '${n}':${stringifyIndented(_)}`)),a.devDependencies&&_.dependencies)for(let p in a.devDependencies){if(!Wn(_.dependencies,p))continue;let m=os(p);if(!m)continue;let y=cv(e,m,this.installTypingHost,this.log);if(!y){this.missingTypingsSet.add(m);continue}let u=this.packageNameToTypingLocation.get(m);if(u){if(u.typingLocation===y)continue;this.log.isEnabled()&&this.log.writeLine(`New typing for package ${m} from '${y}' conflicts with existing typing file '${u}'`)}this.log.isEnabled()&&this.log.writeLine(`Adding entry into typings cache: '${m}' => '${y}'`);let x=xv(_.dependencies,p),d=x&&x.version;if(!d)continue;let S={typingLocation:y,version:new Version(d)};this.packageNameToTypingLocation.set(m,S)}}this.log.isEnabled()&&this.log.writeLine(`Finished processing cache location '${e}'`),this.knownCachesSet.add(e)}filterTypings(e){return wa(e,t=>{let n=mangleScopedPackageName(t);if(this.missingTypingsSet.has(n)){this.log.isEnabled()&&this.log.writeLine(`'${t}':: '${n}' is in missingTypingsSet - skipping...`);return}let a=ts_JsTyping_exports.validatePackageName(t);if(a!==ts_JsTyping_exports.NameValidationResult.Ok){this.missingTypingsSet.add(n),this.log.isEnabled()&&this.log.writeLine(ts_JsTyping_exports.renderPackageNameValidationFailure(a,t));return}if(!this.typesRegistry.has(n)){this.log.isEnabled()&&this.log.writeLine(`'${t}':: Entry for package '${n}' does not exist in local types registry - skipping...`);return}if(this.packageNameToTypingLocation.get(n)&&ts_JsTyping_exports.isTypingUpToDate(this.packageNameToTypingLocation.get(n),this.typesRegistry.get(n))){this.log.isEnabled()&&this.log.writeLine(`'${t}':: '${n}' already has an up-to-date typing - skipping...`);return}return n})}ensurePackageDirectoryExists(e){let t=Qt(e,"package.json");this.log.isEnabled()&&this.log.writeLine(`Npm config file: ${t}`),this.installTypingHost.fileExists(t)||(this.log.isEnabled()&&this.log.writeLine(`Npm config file: '${t}' is missing, creating new one...`),this.ensureDirectoryExists(e,this.installTypingHost),this.installTypingHost.writeFile(t,'{ "private": true }'))}installTypings(e,t,n,a){this.log.isEnabled()&&this.log.writeLine(`Installing typings ${JSON.stringify(a)}`);let _=this.filterTypings(a);if(_.length===0){this.log.isEnabled()&&this.log.writeLine("All typings are known to be missing or invalid - no need to install more typings"),this.sendResponse(this.createSetTypings(e,n));return}this.ensurePackageDirectoryExists(t);let p=this.installRunCount;this.installRunCount++,this.sendResponse({kind:EventBeginInstallTypes,eventId:p,typingsInstallerVersion:Gf,projectName:e.projectName});let m=_.map(w7);this.installTypingsAsync(p,m,t,y=>{try{if(!y){this.log.isEnabled()&&this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(_)}`);for(let x of _)this.missingTypingsSet.add(x);return}this.log.isEnabled()&&this.log.writeLine(`Installed typings ${JSON.stringify(m)}`);let u=[];for(let x of _){let d=cv(t,x,this.installTypingHost,this.log);if(!d){this.missingTypingsSet.add(x);continue}let S=this.typesRegistry.get(x),T=new Version(S[`ts${Rd}`]||S[this.latestDistTag]),A={typingLocation:d,version:T};this.packageNameToTypingLocation.set(x,A),u.push(d)}this.log.isEnabled()&&this.log.writeLine(`Installed typing files ${JSON.stringify(u)}`),this.sendResponse(this.createSetTypings(e,n.concat(u)))}finally{let u={kind:EventEndInstallTypes,eventId:p,projectName:e.projectName,packagesToInstall:m,installSuccess:y,typingsInstallerVersion:Gf};this.sendResponse(u)}})}ensureDirectoryExists(e,t){let n=Mi(e);t.directoryExists(n)||this.ensureDirectoryExists(n,t),t.directoryExists(e)||t.createDirectory(e)}watchFiles(e,t){if(!t.length){this.closeWatchers(e);return}let n=this.projectWatchers.get(e),a=new Set(t);!n||C0(a,_=>!n.has(_))||C0(n,_=>!a.has(_))?(this.projectWatchers.set(e,a),this.sendResponse({kind:ActionWatchTypingLocations,projectName:e,files:t})):this.sendResponse({kind:ActionWatchTypingLocations,projectName:e,files:void 0})}createSetTypings(e,t){return{projectName:e.projectName,typeAcquisition:e.typeAcquisition,compilerOptions:e.compilerOptions,typings:t,unresolvedImports:e.unresolvedImports,kind:ActionSet}}installTypingsAsync(e,t,n,a){this.pendingRunRequests.unshift({requestId:e,packageNames:t,cwd:n,onRequestCompleted:a}),this.executeWithThrottling()}executeWithThrottling(){for(;this.inFlightRequestCount{this.inFlightRequestCount--,e.onRequestCompleted(t),this.executeWithThrottling()})}}}}}),C7={};_g(C7,{TypingsInstaller:()=>E7,getNpmCommandForInstallation:()=>x7,installNpmPackages:()=>XF,typingsName:()=>w7});var QF=It({"src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts"(){"use strict";$F()}}),A7=It({"src/typingsInstallerCore/_namespaces/ts.server.ts"(){"use strict";Q8(),QF()}}),YF=()=>{},KF=()=>{},k7={};_g(k7,{ActionInvalidate:()=>ActionInvalidate,ActionPackageInstalled:()=>ActionPackageInstalled,ActionSet:()=>ActionSet,ActionWatchTypingLocations:()=>ActionWatchTypingLocations,Arguments:()=>Arguments,AutoImportProviderProject:()=>AutoImportProviderProject,AuxiliaryProject:()=>AuxiliaryProject,CharRangeSection:()=>CharRangeSection,CloseFileWatcherEvent:()=>CloseFileWatcherEvent,CommandNames:()=>CommandNames,ConfigFileDiagEvent:()=>ConfigFileDiagEvent,ConfiguredProject:()=>ConfiguredProject2,CreateDirectoryWatcherEvent:()=>CreateDirectoryWatcherEvent,CreateFileWatcherEvent:()=>CreateFileWatcherEvent,Errors:()=>Errors,EventBeginInstallTypes:()=>EventBeginInstallTypes,EventEndInstallTypes:()=>EventEndInstallTypes,EventInitializationFailed:()=>EventInitializationFailed,EventTypesRegistry:()=>EventTypesRegistry,ExternalProject:()=>ExternalProject2,GcTimer:()=>GcTimer,InferredProject:()=>InferredProject2,LargeFileReferencedEvent:()=>LargeFileReferencedEvent,LineIndex:()=>LineIndex,LineLeaf:()=>LineLeaf,LineNode:()=>LineNode,LogLevel:()=>LogLevel2,Msg:()=>Msg,OpenFileInfoTelemetryEvent:()=>OpenFileInfoTelemetryEvent,Project:()=>Project3,ProjectInfoTelemetryEvent:()=>ProjectInfoTelemetryEvent,ProjectKind:()=>ProjectKind,ProjectLanguageServiceStateEvent:()=>ProjectLanguageServiceStateEvent,ProjectLoadingFinishEvent:()=>ProjectLoadingFinishEvent,ProjectLoadingStartEvent:()=>ProjectLoadingStartEvent,ProjectReferenceProjectLoadKind:()=>ProjectReferenceProjectLoadKind,ProjectService:()=>ProjectService3,ProjectsUpdatedInBackgroundEvent:()=>ProjectsUpdatedInBackgroundEvent,ScriptInfo:()=>ScriptInfo,ScriptVersionCache:()=>ScriptVersionCache,Session:()=>Session3,TextStorage:()=>TextStorage,ThrottledOperations:()=>ThrottledOperations,TypingsCache:()=>TypingsCache,allFilesAreJsOrDts:()=>allFilesAreJsOrDts,allRootFilesAreJsOrDts:()=>allRootFilesAreJsOrDts,asNormalizedPath:()=>asNormalizedPath,convertCompilerOptions:()=>convertCompilerOptions,convertFormatOptions:()=>convertFormatOptions,convertScriptKindName:()=>convertScriptKindName,convertTypeAcquisition:()=>convertTypeAcquisition,convertUserPreferences:()=>convertUserPreferences,convertWatchOptions:()=>convertWatchOptions,countEachFileTypes:()=>countEachFileTypes,createInstallTypingsRequest:()=>createInstallTypingsRequest,createModuleSpecifierCache:()=>createModuleSpecifierCache,createNormalizedPathMap:()=>createNormalizedPathMap,createPackageJsonCache:()=>createPackageJsonCache,createSortedArray:()=>createSortedArray2,emptyArray:()=>emptyArray2,findArgument:()=>findArgument,forEachResolvedProjectReferenceProject:()=>forEachResolvedProjectReferenceProject,formatDiagnosticToProtocol:()=>formatDiagnosticToProtocol,formatMessage:()=>formatMessage2,getBaseConfigFileName:()=>getBaseConfigFileName,getLocationInNewDocument:()=>getLocationInNewDocument,hasArgument:()=>hasArgument,hasNoTypeScriptSource:()=>hasNoTypeScriptSource,indent:()=>indent2,isBackgroundProject:()=>isBackgroundProject,isConfigFile:()=>isConfigFile,isConfiguredProject:()=>isConfiguredProject,isDynamicFileName:()=>isDynamicFileName,isExternalProject:()=>isExternalProject,isInferredProject:()=>isInferredProject,isInferredProjectName:()=>isInferredProjectName,makeAutoImportProviderProjectName:()=>makeAutoImportProviderProjectName,makeAuxiliaryProjectName:()=>makeAuxiliaryProjectName,makeInferredProjectName:()=>makeInferredProjectName,maxFileSize:()=>maxFileSize,maxProgramSizeForNonTsFiles:()=>maxProgramSizeForNonTsFiles,normalizedPathToPath:()=>normalizedPathToPath,nowString:()=>nowString,nullCancellationToken:()=>nullCancellationToken,nullTypingsInstaller:()=>nullTypingsInstaller,projectContainsInfoDirectly:()=>projectContainsInfoDirectly,protocol:()=>ts_server_protocol_exports,removeSorted:()=>removeSorted,stringifyIndented:()=>stringifyIndented,toEvent:()=>toEvent,toNormalizedPath:()=>toNormalizedPath,tryConvertScriptKindName:()=>tryConvertScriptKindName,typingsInstaller:()=>C7,updateProjectIfDirty:()=>updateProjectIfDirty});var ZF=It({"src/typescript/_namespaces/ts.server.ts"(){"use strict";Q8(),YF()}}),D7={};_g(D7,{ANONYMOUS:()=>ANONYMOUS,AccessFlags:()=>jy,AssertionLevel:()=>_y,AssignmentDeclarationKind:()=>Gy,AssignmentKind:()=>V0,Associativity:()=>G0,BreakpointResolver:()=>ts_BreakpointResolver_exports,BuilderFileEmit:()=>BuilderFileEmit,BuilderProgramKind:()=>BuilderProgramKind,BuilderState:()=>BuilderState,BundleFileSectionKind:()=>f0,CallHierarchy:()=>ts_CallHierarchy_exports,CharacterCodes:()=>o0,CheckFlags:()=>Oy,CheckMode:()=>CheckMode,ClassificationType:()=>ClassificationType,ClassificationTypeNames:()=>ClassificationTypeNames,CommentDirectiveType:()=>hy,Comparison:()=>ry,CompletionInfoFlags:()=>CompletionInfoFlags,CompletionTriggerKind:()=>CompletionTriggerKind,Completions:()=>ts_Completions_exports,ContainerFlags:()=>ContainerFlags,ContextFlags:()=>wy,Debug:()=>I,DiagnosticCategory:()=>ud,Diagnostics:()=>B,DocumentHighlights:()=>DocumentHighlights,ElementFlags:()=>Ry,EmitFlags:()=>md,EmitHint:()=>l0,EmitOnly:()=>by,EndOfLineState:()=>EndOfLineState,EnumKind:()=>Ny,ExitStatus:()=>Ty,ExportKind:()=>ExportKind,Extension:()=>s0,ExternalEmitHelpers:()=>c0,FileIncludeKind:()=>yy,FilePreprocessingDiagnosticsKind:()=>gy,FileSystemEntryKind:()=>FileSystemEntryKind,FileWatcherEventKind:()=>FileWatcherEventKind,FindAllReferences:()=>ts_FindAllReferences_exports,FlattenLevel:()=>FlattenLevel,FlowFlags:()=>Tl,ForegroundColorEscapeSequences:()=>ForegroundColorEscapeSequences,FunctionFlags:()=>H0,GeneratedIdentifierFlags:()=>dy,GetLiteralTextFlags:()=>W0,GoToDefinition:()=>ts_GoToDefinition_exports,HighlightSpanKind:()=>HighlightSpanKind,IdentifierNameMap:()=>IdentifierNameMap,IdentifierNameMultiMap:()=>IdentifierNameMultiMap,ImportKind:()=>ImportKind,ImportsNotUsedAsValues:()=>t0,IndentStyle:()=>IndentStyle,IndexFlags:()=>Fy,IndexKind:()=>qy,InferenceFlags:()=>Vy,InferencePriority:()=>Wy,InlayHintKind:()=>InlayHintKind,InlayHints:()=>ts_InlayHints_exports,InternalEmitFlags:()=>_0,InternalSymbolName:()=>My,InvalidatedProjectKind:()=>InvalidatedProjectKind,JSDocParsingMode:()=>h0,JsDoc:()=>ts_JsDoc_exports,JsTyping:()=>ts_JsTyping_exports,JsxEmit:()=>e0,JsxFlags:()=>fy,JsxReferenceKind:()=>By,LanguageServiceMode:()=>LanguageServiceMode,LanguageVariant:()=>i0,LexicalEnvironmentFlags:()=>p0,ListFormat:()=>d0,LogLevel:()=>ly,MemberOverrideStatus:()=>Sy,ModifierFlags:()=>id,ModuleDetectionKind:()=>$y,ModuleInstanceState:()=>ModuleInstanceState,ModuleKind:()=>Zy,ModuleResolutionKind:()=>Xy,ModuleSpecifierEnding:()=>K0,NavigateTo:()=>ts_NavigateTo_exports,NavigationBar:()=>ts_NavigationBar_exports,NewLineKind:()=>n0,NodeBuilderFlags:()=>Ey,NodeCheckFlags:()=>Ly,NodeFactoryFlags:()=>Z0,NodeFlags:()=>rd,NodeResolutionFeatures:()=>NodeResolutionFeatures,ObjectFlags:()=>cd,OperationCanceledException:()=>od,OperatorPrecedence:()=>X0,OrganizeImports:()=>ts_OrganizeImports_exports,OrganizeImportsMode:()=>OrganizeImportsMode,OuterExpressionKinds:()=>u0,OutliningElementsCollector:()=>ts_OutliningElementsCollector_exports,OutliningSpanKind:()=>OutliningSpanKind,OutputFileType:()=>OutputFileType,PackageJsonAutoImportPreference:()=>PackageJsonAutoImportPreference,PackageJsonDependencyGroup:()=>PackageJsonDependencyGroup,PatternMatchKind:()=>PatternMatchKind,PollingInterval:()=>PollingInterval,PollingWatchKind:()=>Ky,PragmaKindFlags:()=>m0,PrivateIdentifierKind:()=>PrivateIdentifierKind,ProcessLevel:()=>ProcessLevel,ProgramUpdateLevel:()=>ProgramUpdateLevel,QuotePreference:()=>QuotePreference,RelationComparisonResult:()=>ad,Rename:()=>ts_Rename_exports,ScriptElementKind:()=>ScriptElementKind,ScriptElementKindModifier:()=>ScriptElementKindModifier,ScriptKind:()=>pd,ScriptSnapshot:()=>ScriptSnapshot,ScriptTarget:()=>r0,SemanticClassificationFormat:()=>SemanticClassificationFormat,SemanticMeaning:()=>SemanticMeaning,SemicolonPreference:()=>SemicolonPreference,SignatureCheckMode:()=>SignatureCheckMode,SignatureFlags:()=>ld,SignatureHelp:()=>ts_SignatureHelp_exports,SignatureKind:()=>Uy,SmartSelectionRange:()=>ts_SmartSelectionRange_exports,SnippetKind:()=>dd,SortKind:()=>oy,StructureIsReused:()=>vy,SymbolAccessibility:()=>ky,SymbolDisplay:()=>ts_SymbolDisplay_exports,SymbolDisplayPartKind:()=>SymbolDisplayPartKind,SymbolFlags:()=>sd,SymbolFormatFlags:()=>Ay,SyntaxKind:()=>nd,SyntheticSymbolKind:()=>Dy,Ternary:()=>Hy,ThrottledCancellationToken:()=>v7,TokenClass:()=>TokenClass,TokenFlags:()=>my,TransformFlags:()=>fd,TypeFacts:()=>TypeFacts,TypeFlags:()=>_d,TypeFormatFlags:()=>Cy,TypeMapKind:()=>zy,TypePredicateKind:()=>Py,TypeReferenceSerializationKind:()=>Iy,UnionReduction:()=>xy,UpToDateStatusType:()=>UpToDateStatusType,VarianceFlags:()=>Jy,Version:()=>Version,VersionRange:()=>VersionRange,WatchDirectoryFlags:()=>a0,WatchDirectoryKind:()=>Yy,WatchFileKind:()=>Qy,WatchLogLevel:()=>WatchLogLevel,WatchType:()=>WatchType,accessPrivateIdentifier:()=>accessPrivateIdentifier,addDisposableResourceHelper:()=>addDisposableResourceHelper,addEmitFlags:()=>addEmitFlags,addEmitHelper:()=>addEmitHelper,addEmitHelpers:()=>addEmitHelpers,addInternalEmitFlags:()=>addInternalEmitFlags,addNodeFactoryPatcher:()=>HM,addObjectAllocatorPatcher:()=>cO,addRange:()=>zn,addRelatedInfo:()=>ol,addSyntheticLeadingComment:()=>addSyntheticLeadingComment,addSyntheticTrailingComment:()=>addSyntheticTrailingComment,addToSeen:()=>QN,advancedAsyncSuperHelper:()=>advancedAsyncSuperHelper,affectsDeclarationPathOptionDeclarations:()=>affectsDeclarationPathOptionDeclarations,affectsEmitOptionDeclarations:()=>affectsEmitOptionDeclarations,allKeysStartWithDot:()=>allKeysStartWithDot,altDirectorySeparator:()=>Cg,and:()=>xE,append:()=>Et,appendIfUnique:()=>bv,arrayFrom:()=>Bd,arrayIsEqualTo:()=>D9,arrayIsHomogeneous:()=>hM,arrayIsSorted:()=>A9,arrayOf:()=>q9,arrayReverseIterator:()=>O9,arrayToMap:()=>W9,arrayToMultiMap:()=>Ev,arrayToNumericMap:()=>V9,arraysEqual:()=>fv,assertType:()=>EE,assign:()=>z9,assignHelper:()=>assignHelper,asyncDelegator:()=>asyncDelegator,asyncGeneratorHelper:()=>asyncGeneratorHelper,asyncSuperHelper:()=>asyncSuperHelper,asyncValues:()=>asyncValues,attachFileToDiagnostics:()=>Ya,awaitHelper:()=>awaitHelper,awaiterHelper:()=>awaiterHelper,base64decode:()=>gN,base64encode:()=>yN,binarySearch:()=>Jl,binarySearchKey:()=>Sv,bindSourceFile:()=>bindSourceFile,breakIntoCharacterSpans:()=>breakIntoCharacterSpans,breakIntoWordSpans:()=>breakIntoWordSpans,buildLinkParts:()=>buildLinkParts,buildOpts:()=>buildOpts,buildOverload:()=>buildOverload,bundlerModuleNameResolver:()=>bundlerModuleNameResolver,canBeConvertedToAsync:()=>canBeConvertedToAsync,canHaveDecorators:()=>F8,canHaveExportModifier:()=>DM,canHaveFlowNode:()=>MP,canHaveIllegalDecorators:()=>uR,canHaveIllegalModifiers:()=>pR,canHaveIllegalType:()=>lR,canHaveIllegalTypeParameters:()=>J8,canHaveJSDoc:()=>hm,canHaveLocals:()=>UA,canHaveModifiers:()=>U_,canHaveSymbol:()=>BA,canJsonReportNoInputFiles:()=>canJsonReportNoInputFiles,canProduceDiagnostics:()=>canProduceDiagnostics,canUsePropertyAccess:()=>PM,canWatchAffectingLocation:()=>canWatchAffectingLocation,canWatchAtTypes:()=>canWatchAtTypes,canWatchDirectoryOrFile:()=>canWatchDirectoryOrFile,cartesianProduct:()=>AE,cast:()=>wi,chainBundle:()=>chainBundle,chainDiagnosticMessages:()=>il,changeAnyExtension:()=>Vv,changeCompilerHostLikeToUseCache:()=>changeCompilerHostLikeToUseCache,changeExtension:()=>ZO,changesAffectModuleResolution:()=>sk,changesAffectingProgramStructure:()=>_k,childIsDecorated:()=>d2,classElementOrClassElementParameterIsDecorated:()=>rP,classHasClassThisAssignment:()=>classHasClassThisAssignment,classHasDeclaredOrExplicitlyAssignedName:()=>classHasDeclaredOrExplicitlyAssignedName,classHasExplicitlyAssignedName:()=>classHasExplicitlyAssignedName,classOrConstructorParameterIsDecorated:()=>nP,classPrivateFieldGetHelper:()=>classPrivateFieldGetHelper,classPrivateFieldInHelper:()=>classPrivateFieldInHelper,classPrivateFieldSetHelper:()=>classPrivateFieldSetHelper,classicNameResolver:()=>classicNameResolver,classifier:()=>ts_classifier_exports,cleanExtendedConfigCache:()=>cleanExtendedConfigCache,clear:()=>c9,clearMap:()=>WN,clearSharedExtendedConfigFileWatcher:()=>clearSharedExtendedConfigFileWatcher,climbPastPropertyAccess:()=>climbPastPropertyAccess,climbPastPropertyOrElementAccess:()=>climbPastPropertyOrElementAccess,clone:()=>X9,cloneCompilerOptions:()=>cloneCompilerOptions,closeFileWatcher:()=>RN,closeFileWatcherOf:()=>closeFileWatcherOf,codefix:()=>ts_codefix_exports,collapseTextChangeRangesAcrossMultipleVersions:()=>TC,collectExternalModuleInfo:()=>collectExternalModuleInfo,combine:()=>N9,combinePaths:()=>Qt,commentPragmas:()=>Wd,commonOptionsWithBuild:()=>commonOptionsWithBuild,commonPackageFolders:()=>Q0,compact:()=>P9,compareBooleans:()=>fE,compareDataObjects:()=>TS,compareDiagnostics:()=>H2,compareDiagnosticsSkipRelatedInformation:()=>Ed,compareEmitHelpers:()=>compareEmitHelpers,compareNumberOfDirectorySeparators:()=>KO,comparePaths:()=>Hv,comparePathsCaseInsensitive:()=>QE,comparePathsCaseSensitive:()=>$E,comparePatternKeys:()=>comparePatternKeys,compareProperties:()=>pE,compareStringsCaseInsensitive:()=>qd,compareStringsCaseInsensitiveEslintCompatible:()=>cE,compareStringsCaseSensitive:()=>Ii,compareStringsCaseSensitiveUI:()=>uE,compareTextSpans:()=>sE,compareValues:()=>Mn,compileOnSaveCommandLineOption:()=>compileOnSaveCommandLineOption,compilerOptionsAffectDeclarationPath:()=>OO,compilerOptionsAffectEmit:()=>NO,compilerOptionsAffectSemanticDiagnostics:()=>IO,compilerOptionsDidYouMeanDiagnostics:()=>compilerOptionsDidYouMeanDiagnostics,compilerOptionsIndicateEsModules:()=>compilerOptionsIndicateEsModules,compose:()=>oE,computeCommonSourceDirectoryOfFilenames:()=>computeCommonSourceDirectoryOfFilenames,computeLineAndCharacterOfPosition:()=>kg,computeLineOfPosition:()=>__,computeLineStarts:()=>Gd,computePositionOfLineAndCharacter:()=>Ag,computeSignature:()=>computeSignature,computeSignatureWithDiagnostics:()=>computeSignatureWithDiagnostics,computeSuggestionDiagnostics:()=>computeSuggestionDiagnostics,concatenate:()=>h_,concatenateDiagnosticMessageChains:()=>fO,consumesNodeCoreModules:()=>consumesNodeCoreModules,contains:()=>rs,containsIgnoredPath:()=>YS,containsObjectRestOrSpread:()=>Qb,containsParseError:()=>El,containsPath:()=>Gv,convertCompilerOptionsForTelemetry:()=>convertCompilerOptionsForTelemetry,convertCompilerOptionsFromJson:()=>convertCompilerOptionsFromJson,convertJsonOption:()=>convertJsonOption,convertToBase64:()=>fS,convertToJson:()=>convertToJson,convertToObject:()=>convertToObject,convertToOptionsWithAbsolutePaths:()=>convertToOptionsWithAbsolutePaths,convertToRelativePath:()=>KE,convertToTSConfig:()=>convertToTSConfig,convertTypeAcquisitionFromJson:()=>convertTypeAcquisitionFromJson,copyComments:()=>copyComments,copyEntries:()=>uk,copyLeadingComments:()=>copyLeadingComments,copyProperties:()=>Q9,copyTrailingAsLeadingComments:()=>copyTrailingAsLeadingComments,copyTrailingComments:()=>copyTrailingComments,couldStartTrivia:()=>sC,countWhere:()=>s9,createAbstractBuilder:()=>createAbstractBuilder,createAccessorPropertyBackingField:()=>zR,createAccessorPropertyGetRedirector:()=>WR,createAccessorPropertySetRedirector:()=>VR,createBaseNodeFactory:()=>Nx,createBinaryExpressionTrampoline:()=>JR,createBindingHelper:()=>createBindingHelper,createBuildInfo:()=>createBuildInfo,createBuilderProgram:()=>createBuilderProgram,createBuilderProgramUsingProgramBuildInfo:()=>createBuilderProgramUsingProgramBuildInfo,createBuilderStatusReporter:()=>createBuilderStatusReporter,createCacheWithRedirects:()=>createCacheWithRedirects,createCacheableExportInfoMap:()=>createCacheableExportInfoMap,createCachedDirectoryStructureHost:()=>createCachedDirectoryStructureHost,createClassNamedEvaluationHelperBlock:()=>createClassNamedEvaluationHelperBlock,createClassThisAssignmentBlock:()=>createClassThisAssignmentBlock,createClassifier:()=>createClassifier,createCommentDirectivesMap:()=>Nk,createCompilerDiagnostic:()=>hl,createCompilerDiagnosticForInvalidCustomType:()=>createCompilerDiagnosticForInvalidCustomType,createCompilerDiagnosticFromMessageChain:()=>pO,createCompilerHost:()=>createCompilerHost,createCompilerHostFromProgramHost:()=>createCompilerHostFromProgramHost,createCompilerHostWorker:()=>createCompilerHostWorker,createDetachedDiagnostic:()=>Po,createDiagnosticCollection:()=>TI,createDiagnosticForFileFromMessageChain:()=>lD,createDiagnosticForNode:()=>oD,createDiagnosticForNodeArray:()=>sD,createDiagnosticForNodeArrayFromMessageChain:()=>cD,createDiagnosticForNodeFromMessageChain:()=>_D,createDiagnosticForNodeInSourceFile:()=>BT,createDiagnosticForRange:()=>pD,createDiagnosticMessageChainFromDiagnostic:()=>uD,createDiagnosticReporter:()=>createDiagnosticReporter,createDocumentPositionMapper:()=>createDocumentPositionMapper,createDocumentRegistry:()=>createDocumentRegistry,createDocumentRegistryInternal:()=>createDocumentRegistryInternal,createEmitAndSemanticDiagnosticsBuilderProgram:()=>createEmitAndSemanticDiagnosticsBuilderProgram,createEmitHelperFactory:()=>createEmitHelperFactory,createEmptyExports:()=>jJ,createExpressionForJsxElement:()=>BJ,createExpressionForJsxFragment:()=>UJ,createExpressionForObjectLiteralElementLike:()=>XJ,createExpressionForPropertyName:()=>E8,createExpressionFromEntityName:()=>w8,createExternalHelpersImportDeclarationIfNeeded:()=>rR,createFileDiagnostic:()=>V2,createFileDiagnosticFromMessageChain:()=>i2,createForOfBindingStatement:()=>qJ,createGetCanonicalFileName:()=>zd,createGetSourceFile:()=>createGetSourceFile,createGetSymbolAccessibilityDiagnosticForNode:()=>createGetSymbolAccessibilityDiagnosticForNode,createGetSymbolAccessibilityDiagnosticForNodeName:()=>createGetSymbolAccessibilityDiagnosticForNodeName,createGetSymbolWalker:()=>createGetSymbolWalker,createIncrementalCompilerHost:()=>createIncrementalCompilerHost,createIncrementalProgram:()=>createIncrementalProgram,createInputFiles:()=>eL,createInputFilesWithFilePaths:()=>Lx,createInputFilesWithFileTexts:()=>Jx,createJsxFactoryExpression:()=>x8,createLanguageService:()=>vF,createLanguageServiceSourceFile:()=>Zb,createMemberAccessForPropertyName:()=>Fm,createModeAwareCache:()=>createModeAwareCache,createModeAwareCacheKey:()=>createModeAwareCacheKey,createModuleNotFoundChain:()=>mk,createModuleResolutionCache:()=>createModuleResolutionCache,createModuleResolutionLoader:()=>createModuleResolutionLoader,createModuleResolutionLoaderUsingGlobalCache:()=>createModuleResolutionLoaderUsingGlobalCache,createModuleSpecifierResolutionHost:()=>createModuleSpecifierResolutionHost,createMultiMap:()=>Ud,createNodeConverters:()=>Ox,createNodeFactory:()=>Dd,createOptionNameMap:()=>createOptionNameMap,createOverload:()=>createOverload,createPackageJsonImportFilter:()=>createPackageJsonImportFilter,createPackageJsonInfo:()=>createPackageJsonInfo,createParenthesizerRules:()=>createParenthesizerRules,createPatternMatcher:()=>createPatternMatcher,createPrependNodes:()=>createPrependNodes,createPrinter:()=>createPrinter,createPrinterWithDefaults:()=>createPrinterWithDefaults,createPrinterWithRemoveComments:()=>createPrinterWithRemoveComments,createPrinterWithRemoveCommentsNeverAsciiEscape:()=>createPrinterWithRemoveCommentsNeverAsciiEscape,createPrinterWithRemoveCommentsOmitTrailingSemicolon:()=>createPrinterWithRemoveCommentsOmitTrailingSemicolon,createProgram:()=>createProgram,createProgramHost:()=>createProgramHost,createPropertyNameNodeForIdentifierOrLiteral:()=>CM,createQueue:()=>Z9,createRange:()=>Em,createRedirectedBuilderProgram:()=>createRedirectedBuilderProgram,createResolutionCache:()=>createResolutionCache,createRuntimeTypeSerializer:()=>createRuntimeTypeSerializer,createScanner:()=>ss,createSemanticDiagnosticsBuilderProgram:()=>createSemanticDiagnosticsBuilderProgram,createSet:()=>eE,createSolutionBuilder:()=>createSolutionBuilder,createSolutionBuilderHost:()=>createSolutionBuilderHost,createSolutionBuilderWithWatch:()=>createSolutionBuilderWithWatch,createSolutionBuilderWithWatchHost:()=>createSolutionBuilderWithWatchHost,createSortedArray:()=>C9,createSourceFile:()=>z8,createSourceMapGenerator:()=>createSourceMapGenerator,createSourceMapSource:()=>tL,createSuperAccessVariableStatement:()=>createSuperAccessVariableStatement,createSymbolTable:()=>ak,createSymlinkCache:()=>jO,createSystemWatchFunctions:()=>createSystemWatchFunctions,createTextChange:()=>createTextChange,createTextChangeFromStartLength:()=>createTextChangeFromStartLength,createTextChangeRange:()=>Qd,createTextRangeFromNode:()=>createTextRangeFromNode,createTextRangeFromSpan:()=>createTextRangeFromSpan,createTextSpan:()=>S_,createTextSpanFromBounds:()=>Xi,createTextSpanFromNode:()=>createTextSpanFromNode,createTextSpanFromRange:()=>createTextSpanFromRange,createTextSpanFromStringLiteralLikeContent:()=>createTextSpanFromStringLiteralLikeContent,createTextWriter:()=>kI,createTokenRange:()=>xN,createTypeChecker:()=>createTypeChecker,createTypeReferenceDirectiveResolutionCache:()=>createTypeReferenceDirectiveResolutionCache,createTypeReferenceResolutionLoader:()=>createTypeReferenceResolutionLoader,createUnparsedSourceFile:()=>YM,createWatchCompilerHost:()=>createWatchCompilerHost2,createWatchCompilerHostOfConfigFile:()=>createWatchCompilerHostOfConfigFile,createWatchCompilerHostOfFilesAndCompilerOptions:()=>createWatchCompilerHostOfFilesAndCompilerOptions,createWatchFactory:()=>createWatchFactory,createWatchHost:()=>createWatchHost,createWatchProgram:()=>createWatchProgram,createWatchStatusReporter:()=>createWatchStatusReporter,createWriteFileMeasuringIO:()=>createWriteFileMeasuringIO,declarationNameToString:()=>FT,decodeMappings:()=>decodeMappings,decodedTextSpanIntersectsWith:()=>Ng,decorateHelper:()=>decorateHelper,deduplicate:()=>yv,defaultIncludeSpec:()=>defaultIncludeSpec,defaultInitCompilerOptions:()=>defaultInitCompilerOptions,defaultMaximumTruncationLength:()=>cx,detectSortCaseSensitivity:()=>k9,diagnosticCategoryName:()=>FE,diagnosticToString:()=>diagnosticToString,directoryProbablyExists:()=>mS,directorySeparator:()=>vr,displayPart:()=>displayPart,displayPartsToString:()=>bF,disposeEmitNodes:()=>disposeEmitNodes,disposeResourcesHelper:()=>disposeResourcesHelper,documentSpansEqual:()=>documentSpansEqual,dumpTracingLegend:()=>dumpTracingLegend,elementAt:()=>jv,elideNodes:()=>FR,emitComments:()=>Y3,emitDetachedComments:()=>GI,emitFiles:()=>emitFiles,emitFilesAndReportErrors:()=>emitFilesAndReportErrors,emitFilesAndReportErrorsAndGetExitStatus:()=>emitFilesAndReportErrorsAndGetExitStatus,emitModuleKindIsNonNodeESM:()=>yO,emitNewLineBeforeLeadingCommentOfPosition:()=>HI,emitNewLineBeforeLeadingComments:()=>$3,emitNewLineBeforeLeadingCommentsOfPosition:()=>Q3,emitSkippedWithNoDiagnostics:()=>emitSkippedWithNoDiagnostics,emitUsingBuildInfo:()=>emitUsingBuildInfo,emptyArray:()=>Je,emptyFileSystemEntries:()=>Ix,emptyMap:()=>gg,emptyOptions:()=>emptyOptions,emptySet:()=>Rv,endsWith:()=>is,ensurePathIsNonModuleName:()=>Sg,ensureScriptKind:()=>jS,ensureTrailingDirectorySeparator:()=>to,entityNameToString:()=>Ci,enumerateInsertsAndDeletes:()=>CE,equalOwnProperties:()=>wv,equateStringsCaseInsensitive:()=>s_,equateStringsCaseSensitive:()=>Rl,equateValues:()=>_o,esDecorateHelper:()=>esDecorateHelper,escapeJsxAttributeString:()=>R3,escapeLeadingUnderscores:()=>qr,escapeNonAsciiString:()=>xd,escapeSnippetText:()=>EM,escapeString:()=>Sd,every:()=>so,expandPreOrPostfixIncrementOrDecrementExpression:()=>$J,explainFiles:()=>explainFiles,explainIfFileIsRedirectAndImpliedFormat:()=>explainIfFileIsRedirectAndImpliedFormat,exportAssignmentIsAlias:()=>M0,exportStarHelper:()=>exportStarHelper,expressionResultIsUnused:()=>vM,extend:()=>$9,extendsHelper:()=>extendsHelper,extensionFromPath:()=>al,extensionIsTS:()=>HS,extensionsNotSupportingExtensionlessResolution:()=>km,externalHelpersModuleNameText:()=>Am,factory:()=>zr,fileExtensionIs:()=>Na,fileExtensionIsOneOf:()=>ii,fileIncludeReasonToDiagnostics:()=>fileIncludeReasonToDiagnostics,fileShouldUseJavaScriptRequire:()=>fileShouldUseJavaScriptRequire,filter:()=>rr,filterMutate:()=>_9,filterSemanticDiagnostics:()=>filterSemanticDiagnostics,find:()=>ir,findAncestor:()=>or,findBestPatternMatch:()=>Mv,findChildOfKind:()=>findChildOfKind,findComputedPropertyNameCacheAssignment:()=>HR,findConfigFile:()=>findConfigFile,findContainingList:()=>findContainingList,findDiagnosticForNode:()=>findDiagnosticForNode,findFirstNonJsxWhitespaceToken:()=>findFirstNonJsxWhitespaceToken,findIndex:()=>ul,findLast:()=>lg,findLastIndex:()=>a9,findListItemInfo:()=>findListItemInfo,findMap:()=>o9,findModifier:()=>findModifier,findNextToken:()=>findNextToken,findPackageJson:()=>findPackageJson,findPackageJsons:()=>findPackageJsons,findPrecedingMatchingToken:()=>findPrecedingMatchingToken,findPrecedingToken:()=>findPrecedingToken,findSuperStatementIndexPath:()=>findSuperStatementIndexPath,findTokenOnLeftOfPosition:()=>findTokenOnLeftOfPosition,findUseStrictPrologue:()=>A8,first:()=>pg,firstDefined:()=>cg,firstDefinedIterator:()=>n9,firstIterator:()=>J9,firstOrOnly:()=>firstOrOnly,firstOrUndefined:()=>y_,firstOrUndefinedIterator:()=>L9,fixupCompilerOptions:()=>fixupCompilerOptions,flatMap:()=>zo,flatMapIterator:()=>p9,flatMapToMutable:()=>mv,flatten:()=>o_,flattenCommaList:()=>XR,flattenDestructuringAssignment:()=>flattenDestructuringAssignment,flattenDestructuringBinding:()=>flattenDestructuringBinding,flattenDiagnosticMessageText:()=>flattenDiagnosticMessageText,forEach:()=>wn,forEachAncestor:()=>ck,forEachAncestorDirectory:()=>$v,forEachChild:()=>Wt,forEachChildRecursively:()=>ag,forEachEmittedFile:()=>forEachEmittedFile,forEachEnclosingBlockScopeContainer:()=>nD,forEachEntry:()=>lk,forEachExternalModuleToImportFrom:()=>forEachExternalModuleToImportFrom,forEachImportClauseDeclaration:()=>DP,forEachKey:()=>C0,forEachLeadingCommentRange:()=>_C,forEachNameInAccessChainWalkingLeft:()=>tO,forEachPropertyAssignment:()=>p2,forEachResolvedProjectReference:()=>forEachResolvedProjectReference,forEachReturnStatement:()=>ED,forEachRight:()=>t9,forEachTrailingCommentRange:()=>cC,forEachTsConfigPropArray:()=>HT,forEachUnique:()=>forEachUnique,forEachYieldExpression:()=>CD,forSomeAncestorDirectory:()=>GN,formatColorAndReset:()=>formatColorAndReset,formatDiagnostic:()=>formatDiagnostic,formatDiagnostics:()=>formatDiagnostics,formatDiagnosticsWithColorAndContext:()=>formatDiagnosticsWithColorAndContext,formatGeneratedName:()=>Nd,formatGeneratedNamePart:()=>ig,formatLocation:()=>formatLocation,formatMessage:()=>uO,formatStringFromArgs:()=>P_,formatting:()=>ts_formatting_exports,fullTripleSlashAMDReferencePathRegEx:()=>ob,fullTripleSlashReferencePathRegEx:()=>ab,generateDjb2Hash:()=>generateDjb2Hash,generateTSConfig:()=>generateTSConfig,generatorHelper:()=>generatorHelper,getAdjustedReferenceLocation:()=>getAdjustedReferenceLocation,getAdjustedRenameLocation:()=>getAdjustedRenameLocation,getAliasDeclarationFromName:()=>v3,getAllAccessorDeclarations:()=>J2,getAllDecoratorsOfClass:()=>getAllDecoratorsOfClass,getAllDecoratorsOfClassElement:()=>getAllDecoratorsOfClassElement,getAllJSDocTags:()=>V4,getAllJSDocTagsOfKind:()=>jC,getAllKeys:()=>B9,getAllProjectOutputs:()=>getAllProjectOutputs,getAllSuperTypeNodes:()=>E3,getAllUnscopedEmitHelpers:()=>getAllUnscopedEmitHelpers,getAllowJSCompilerOption:()=>K2,getAllowSyntheticDefaultImports:()=>xO,getAncestor:()=>eI,getAnyExtensionFromPath:()=>hd,getAreDeclarationMapsEnabled:()=>SO,getAssignedExpandoInitializer:()=>yP,getAssignedName:()=>D4,getAssignedNameOfIdentifier:()=>getAssignedNameOfIdentifier,getAssignmentDeclarationKind:()=>Oa,getAssignmentDeclarationPropertyAccessKind:()=>o3,getAssignmentTargetKind:()=>FP,getAutomaticTypeDirectiveNames:()=>getAutomaticTypeDirectiveNames,getBaseFileName:()=>os,getBinaryOperatorPrecedence:()=>ml,getBuildInfo:()=>getBuildInfo,getBuildInfoFileVersionMap:()=>getBuildInfoFileVersionMap,getBuildInfoText:()=>getBuildInfoText,getBuildOrderFromAnyBuildOrder:()=>getBuildOrderFromAnyBuildOrder,getBuilderCreationParameters:()=>getBuilderCreationParameters,getBuilderFileEmit:()=>getBuilderFileEmit,getCheckFlags:()=>vS,getClassExtendsHeritageElement:()=>x3,getClassLikeDeclarationOfSymbol:()=>xS,getCombinedLocalAndExportSymbolFlags:()=>BN,getCombinedModifierFlags:()=>Yd,getCombinedNodeFlags:()=>x_,getCombinedNodeFlagsAlwaysIncludeJSDoc:()=>xC,getCommentRange:()=>getCommentRange,getCommonSourceDirectory:()=>getCommonSourceDirectory,getCommonSourceDirectoryOfConfig:()=>getCommonSourceDirectoryOfConfig,getCompilerOptionValue:()=>z0,getCompilerOptionsDiffValue:()=>getCompilerOptionsDiffValue,getConditions:()=>getConditions,getConfigFileParsingDiagnostics:()=>getConfigFileParsingDiagnostics,getConstantValue:()=>getConstantValue,getContainerFlags:()=>getContainerFlags,getContainerNode:()=>getContainerNode,getContainingClass:()=>I0,getContainingClassExcludingClassDecorators:()=>WD,getContainingClassStaticBlock:()=>qD,getContainingFunction:()=>BD,getContainingFunctionDeclaration:()=>UD,getContainingFunctionOrClassStaticBlock:()=>zD,getContainingNodeArray:()=>TM,getContainingObjectLiteralElement:()=>c7,getContextualTypeFromParent:()=>getContextualTypeFromParent,getContextualTypeFromParentOrAncestorTypeNode:()=>getContextualTypeFromParentOrAncestorTypeNode,getCurrentTime:()=>getCurrentTime,getDeclarationDiagnostics:()=>getDeclarationDiagnostics,getDeclarationEmitExtensionForPath:()=>q3,getDeclarationEmitOutputFilePath:()=>NI,getDeclarationEmitOutputFilePathWorker:()=>U3,getDeclarationFromName:()=>QP,getDeclarationModifierFlagsFromSymbol:()=>jN,getDeclarationOfKind:()=>rk,getDeclarationsOfKind:()=>ik,getDeclaredExpandoInitializer:()=>mP,getDecorators:()=>CC,getDefaultCompilerOptions:()=>a7,getDefaultExportInfoWorker:()=>getDefaultExportInfoWorker,getDefaultFormatCodeSettings:()=>getDefaultFormatCodeSettings,getDefaultLibFileName:()=>h4,getDefaultLibFilePath:()=>AF,getDefaultLikeExportInfo:()=>getDefaultLikeExportInfo,getDiagnosticText:()=>getDiagnosticText,getDiagnosticsWithinSpan:()=>getDiagnosticsWithinSpan,getDirectoryPath:()=>Mi,getDirectoryToWatchFailedLookupLocation:()=>getDirectoryToWatchFailedLookupLocation,getDirectoryToWatchFailedLookupLocationFromTypeRoot:()=>getDirectoryToWatchFailedLookupLocationFromTypeRoot,getDocumentPositionMapper:()=>getDocumentPositionMapper,getESModuleInterop:()=>X2,getEditsForFileRename:()=>getEditsForFileRename,getEffectiveBaseTypeNode:()=>S3,getEffectiveConstraintOfTypeParameter:()=>qC,getEffectiveContainerForJSDocTemplateTag:()=>JP,getEffectiveImplementsTypeNodes:()=>w3,getEffectiveInitializer:()=>n3,getEffectiveJSDocHost:()=>w2,getEffectiveModifierFlags:()=>xm,getEffectiveModifierFlagsAlwaysIncludeJSDoc:()=>nS,getEffectiveModifierFlagsNoCache:()=>aS,getEffectiveReturnTypeNode:()=>zI,getEffectiveSetAccessorTypeAnnotationNode:()=>VI,getEffectiveTypeAnnotationNode:()=>R2,getEffectiveTypeParameterDeclarations:()=>UC,getEffectiveTypeRoots:()=>getEffectiveTypeRoots,getElementOrPropertyAccessArgumentExpressionOrName:()=>mm,getElementOrPropertyAccessName:()=>ao,getElementsOfBindingOrAssignmentPattern:()=>L8,getEmitDeclarations:()=>Q2,getEmitFlags:()=>ai,getEmitHelpers:()=>getEmitHelpers,getEmitModuleDetectionKind:()=>OS,getEmitModuleKind:()=>_i,getEmitModuleResolutionKind:()=>N_,getEmitScriptTarget:()=>Ql,getEmitStandardClassFields:()=>PO,getEnclosingBlockScopeContainer:()=>A0,getEnclosingContainer:()=>tD,getEncodedSemanticClassifications:()=>getEncodedSemanticClassifications,getEncodedSyntacticClassifications:()=>getEncodedSyntacticClassifications,getEndLinePosition:()=>CT,getEntityNameFromTypeNode:()=>eP,getEntrypointsFromPackageJsonInfo:()=>getEntrypointsFromPackageJsonInfo,getErrorCountForSummary:()=>getErrorCountForSummary,getErrorSpanForNode:()=>a2,getErrorSummaryText:()=>getErrorSummaryText,getEscapedTextOfIdentifierOrLiteral:()=>P3,getEscapedTextOfJsxAttributeName:()=>LM,getEscapedTextOfJsxNamespacedName:()=>Yl,getExpandoInitializer:()=>E_,getExportAssignmentExpression:()=>T3,getExportInfoMap:()=>getExportInfoMap,getExportNeedsImportStarHelper:()=>getExportNeedsImportStarHelper,getExpressionAssociativity:()=>gI,getExpressionPrecedence:()=>bI,getExternalHelpersModuleName:()=>P8,getExternalModuleImportEqualsDeclarationExpression:()=>aP,getExternalModuleName:()=>T2,getExternalModuleNameFromDeclaration:()=>PI,getExternalModuleNameFromPath:()=>M2,getExternalModuleNameLiteral:()=>aR,getExternalModuleRequireArgument:()=>oP,getFallbackOptions:()=>getFallbackOptions,getFileEmitOutput:()=>getFileEmitOutput,getFileMatcherPatterns:()=>RS,getFileNamesFromConfigSpecs:()=>getFileNamesFromConfigSpecs,getFileWatcherEventKind:()=>getFileWatcherEventKind,getFilesInErrorForSummary:()=>getFilesInErrorForSummary,getFirstConstructorWithBody:()=>V3,getFirstIdentifier:()=>oN,getFirstNonSpaceCharacterPosition:()=>getFirstNonSpaceCharacterPosition,getFirstProjectOutput:()=>getFirstProjectOutput,getFixableErrorSpanExpression:()=>getFixableErrorSpanExpression,getFormatCodeSettingsForWriting:()=>getFormatCodeSettingsForWriting,getFullWidth:()=>_m,getFunctionFlags:()=>oI,getHeritageClause:()=>ym,getHostSignatureFromJSDoc:()=>x2,getIdentifierAutoGenerate:()=>getIdentifierAutoGenerate,getIdentifierGeneratedImportReference:()=>getIdentifierGeneratedImportReference,getIdentifierTypeArguments:()=>getIdentifierTypeArguments,getImmediatelyInvokedFunctionExpression:()=>$D,getImpliedNodeFormatForFile:()=>getImpliedNodeFormatForFile,getImpliedNodeFormatForFileWorker:()=>getImpliedNodeFormatForFileWorker,getImportNeedsImportDefaultHelper:()=>getImportNeedsImportDefaultHelper,getImportNeedsImportStarHelper:()=>getImportNeedsImportStarHelper,getIndentSize:()=>Fo,getIndentString:()=>N2,getInferredLibraryNameResolveFrom:()=>getInferredLibraryNameResolveFrom,getInitializedVariables:()=>LN,getInitializerOfBinaryExpression:()=>s3,getInitializerOfBindingOrAssignmentElement:()=>O8,getInterfaceBaseTypeNodes:()=>C3,getInternalEmitFlags:()=>Rk,getInvokedExpression:()=>tP,getIsolatedModules:()=>G2,getJSDocAugmentsTag:()=>L4,getJSDocClassTag:()=>kC,getJSDocCommentRanges:()=>qT,getJSDocCommentsAndTags:()=>f3,getJSDocDeprecatedTag:()=>OC,getJSDocDeprecatedTagNoCache:()=>q4,getJSDocEnumTag:()=>MC,getJSDocHost:()=>m3,getJSDocImplementsTags:()=>J4,getJSDocOverrideTagNoCache:()=>U4,getJSDocParameterTags:()=>em,getJSDocParameterTagsNoCache:()=>I4,getJSDocPrivateTag:()=>PC,getJSDocPrivateTagNoCache:()=>j4,getJSDocProtectedTag:()=>IC,getJSDocProtectedTagNoCache:()=>F4,getJSDocPublicTag:()=>DC,getJSDocPublicTagNoCache:()=>R4,getJSDocReadonlyTag:()=>NC,getJSDocReadonlyTagNoCache:()=>B4,getJSDocReturnTag:()=>z4,getJSDocReturnType:()=>W4,getJSDocRoot:()=>E2,getJSDocSatisfiesExpressionType:()=>MM,getJSDocSatisfiesTag:()=>Mg,getJSDocTags:()=>zl,getJSDocTagsNoCache:()=>RC,getJSDocTemplateTag:()=>JC,getJSDocThisTag:()=>LC,getJSDocType:()=>nm,getJSDocTypeAliasName:()=>rg,getJSDocTypeAssertionType:()=>ZJ,getJSDocTypeParameterDeclarations:()=>X3,getJSDocTypeParameterTags:()=>O4,getJSDocTypeParameterTagsNoCache:()=>M4,getJSDocTypeTag:()=>tm,getJSXImplicitImportBase:()=>LO,getJSXRuntimeImport:()=>JO,getJSXTransformEnabled:()=>MO,getKeyForCompilerOptions:()=>getKeyForCompilerOptions,getLanguageVariant:()=>q0,getLastChild:()=>wS,getLeadingCommentRanges:()=>Ho,getLeadingCommentRangesOfNode:()=>xD,getLeftmostAccessExpression:()=>W2,getLeftmostExpression:()=>nO,getLibraryNameFromLibFileName:()=>getLibraryNameFromLibFileName,getLineAndCharacterOfPosition:()=>no,getLineInfo:()=>getLineInfo,getLineOfLocalPosition:()=>jI,getLineOfLocalPositionFromLineMap:()=>Ta,getLineStartPositionForPosition:()=>getLineStartPositionForPosition,getLineStarts:()=>Aa,getLinesBetweenPositionAndNextNonWhitespaceCharacter:()=>NN,getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter:()=>IN,getLinesBetweenPositions:()=>T_,getLinesBetweenRangeEndAndRangeStart:()=>kN,getLinesBetweenRangeEndPositions:()=>DN,getLiteralText:()=>jk,getLocalNameForExternalImport:()=>iR,getLocalSymbolForExportDefault:()=>pN,getLocaleSpecificMessage:()=>I_,getLocaleTimeString:()=>getLocaleTimeString,getMappedContextSpan:()=>getMappedContextSpan,getMappedDocumentSpan:()=>getMappedDocumentSpan,getMappedLocation:()=>getMappedLocation,getMatchedFileSpec:()=>getMatchedFileSpec,getMatchedIncludeSpec:()=>getMatchedIncludeSpec,getMeaningFromDeclaration:()=>getMeaningFromDeclaration,getMeaningFromLocation:()=>getMeaningFromLocation,getMembersOfDeclaration:()=>kD,getModeForFileReference:()=>getModeForFileReference,getModeForResolutionAtIndex:()=>getModeForResolutionAtIndex,getModeForUsageLocation:()=>getModeForUsageLocation,getModifiedTime:()=>getModifiedTime,getModifiers:()=>gd,getModuleInstanceState:()=>getModuleInstanceState,getModuleNameStringLiteralAt:()=>getModuleNameStringLiteralAt,getModuleSpecifierEndingPreference:()=>$O,getModuleSpecifierResolverHost:()=>getModuleSpecifierResolverHost,getNameForExportedSymbol:()=>getNameForExportedSymbol,getNameFromIndexInfo:()=>rD,getNameFromPropertyName:()=>getNameFromPropertyName,getNameOfAccessExpression:()=>KN,getNameOfCompilerOptionValue:()=>getNameOfCompilerOptionValue,getNameOfDeclaration:()=>ql,getNameOfExpando:()=>vP,getNameOfJSDocTypedef:()=>k4,getNameOrArgument:()=>a3,getNameTable:()=>TF,getNamesForExportedSymbol:()=>getNamesForExportedSymbol,getNamespaceDeclarationNode:()=>c3,getNewLineCharacter:()=>hS,getNewLineKind:()=>getNewLineKind,getNewLineOrDefaultFromHost:()=>getNewLineOrDefaultFromHost,getNewTargetContainer:()=>GD,getNextJSDocCommentLocation:()=>d3,getNodeForGeneratedName:()=>BR,getNodeId:()=>getNodeId,getNodeKind:()=>getNodeKind,getNodeModifiers:()=>getNodeModifiers,getNodeModulePathParts:()=>AM,getNonAssignedNameOfDeclaration:()=>Zd,getNonAssignmentOperatorForCompoundAssignment:()=>getNonAssignmentOperatorForCompoundAssignment,getNonAugmentationDeclaration:()=>JT,getNonDecoratorTokenPosOfNode:()=>Ok,getNormalizedAbsolutePath:()=>Gi,getNormalizedAbsolutePathWithoutRoot:()=>XE,getNormalizedPathComponents:()=>Hd,getObjectFlags:()=>jf,getOperator:()=>I2,getOperatorAssociativity:()=>O3,getOperatorPrecedence:()=>M3,getOptionFromName:()=>getOptionFromName,getOptionsForLibraryResolution:()=>getOptionsForLibraryResolution,getOptionsNameMap:()=>getOptionsNameMap,getOrCreateEmitNode:()=>getOrCreateEmitNode,getOrCreateExternalHelpersModuleNameIfNeeded:()=>I8,getOrUpdate:()=>h9,getOriginalNode:()=>Bl,getOriginalNodeId:()=>getOriginalNodeId,getOriginalSourceFile:()=>yI,getOutputDeclarationFileName:()=>getOutputDeclarationFileName,getOutputExtension:()=>getOutputExtension,getOutputFileNames:()=>getOutputFileNames,getOutputPathsFor:()=>getOutputPathsFor,getOutputPathsForBundle:()=>getOutputPathsForBundle,getOwnEmitOutputFilePath:()=>II,getOwnKeys:()=>fg,getOwnValues:()=>U9,getPackageJsonInfo:()=>getPackageJsonInfo,getPackageJsonTypesVersionsPaths:()=>getPackageJsonTypesVersionsPaths,getPackageJsonsVisibleToFile:()=>getPackageJsonsVisibleToFile,getPackageNameFromTypesPackageName:()=>getPackageNameFromTypesPackageName,getPackageScopeForPath:()=>getPackageScopeForPath,getParameterSymbolFromJSDoc:()=>LP,getParameterTypeNode:()=>kM,getParentNodeInSpan:()=>getParentNodeInSpan,getParseTreeNode:()=>Ul,getParsedCommandLineOfConfigFile:()=>getParsedCommandLineOfConfigFile,getPathComponents:()=>Oi,getPathComponentsRelativeTo:()=>wg,getPathFromPathComponents:()=>Wo,getPathUpdater:()=>getPathUpdater,getPathsBasePath:()=>MI,getPatternFromSpec:()=>WO,getPendingEmitKind:()=>getPendingEmitKind,getPositionOfLineAndCharacter:()=>aC,getPossibleGenericSignatures:()=>getPossibleGenericSignatures,getPossibleOriginalInputExtensionForExtension:()=>OI,getPossibleTypeArgumentsInfo:()=>getPossibleTypeArgumentsInfo,getPreEmitDiagnostics:()=>getPreEmitDiagnostics,getPrecedingNonSpaceCharacterPosition:()=>getPrecedingNonSpaceCharacterPosition,getPrivateIdentifier:()=>getPrivateIdentifier,getProperties:()=>getProperties,getProperty:()=>xv,getPropertyArrayElementValue:()=>jD,getPropertyAssignmentAliasLikeExpression:()=>ZP,getPropertyNameForPropertyNameNode:()=>vd,getPropertyNameForUniqueESSymbol:()=>_I,getPropertyNameFromType:()=>BM,getPropertyNameOfBindingOrAssignmentElement:()=>cR,getPropertySymbolFromBindingElement:()=>getPropertySymbolFromBindingElement,getPropertySymbolsFromContextualType:()=>l7,getQuoteFromPreference:()=>getQuoteFromPreference,getQuotePreference:()=>getQuotePreference,getRangesWhere:()=>T9,getRefactorContextSpan:()=>getRefactorContextSpan,getReferencedFileLocation:()=>getReferencedFileLocation,getRegexFromPattern:()=>Bf,getRegularExpressionForWildcard:()=>Ff,getRegularExpressionsForWildcards:()=>Z2,getRelativePathFromDirectory:()=>Xv,getRelativePathFromFile:()=>ZE,getRelativePathToDirectoryOrUrl:()=>Eg,getRenameLocation:()=>getRenameLocation,getReplacementSpanForContextToken:()=>getReplacementSpanForContextToken,getResolutionDiagnostic:()=>getResolutionDiagnostic,getResolutionModeOverride:()=>getResolutionModeOverride,getResolveJsonModule:()=>MS,getResolvePackageJsonExports:()=>EO,getResolvePackageJsonImports:()=>CO,getResolvedExternalModuleName:()=>B3,getRestIndicatorOfBindingOrAssignmentElement:()=>_R,getRestParameterElementType:()=>AD,getRightMostAssignedExpression:()=>y2,getRootDeclaration:()=>gm,getRootDirectoryOfResolutionCache:()=>getRootDirectoryOfResolutionCache,getRootLength:()=>Ni,getRootPathSplitLength:()=>getRootPathSplitLength,getScriptKind:()=>getScriptKind,getScriptKindFromFileName:()=>FS,getScriptTargetFeatures:()=>ux,getSelectedEffectiveModifierFlags:()=>eS,getSelectedSyntacticModifierFlags:()=>tS,getSemanticClassifications:()=>getSemanticClassifications,getSemanticJsxChildren:()=>vI,getSetAccessorTypeAnnotationNode:()=>FI,getSetAccessorValueParameter:()=>L2,getSetExternalModuleIndicator:()=>NS,getShebang:()=>r4,getSingleInitializerOfVariableStatementOrPropertyDeclaration:()=>S2,getSingleVariableOfVariableStatement:()=>Al,getSnapshotText:()=>getSnapshotText,getSnippetElement:()=>getSnippetElement,getSourceFileOfModule:()=>Tk,getSourceFileOfNode:()=>oi,getSourceFilePathInNewDir:()=>z3,getSourceFilePathInNewDirWorker:()=>vm,getSourceFileVersionAsHashFromText:()=>getSourceFileVersionAsHashFromText,getSourceFilesToEmit:()=>LI,getSourceMapRange:()=>getSourceMapRange,getSourceMapper:()=>getSourceMapper,getSourceTextOfNodeFromSourceFile:()=>Qo,getSpanOfTokenAtPosition:()=>Ks,getSpellingSuggestion:()=>Iv,getStartPositionOfLine:()=>wk,getStartPositionOfRange:()=>p_,getStartsOnNewLine:()=>getStartsOnNewLine,getStaticPropertiesAndClassStaticBlock:()=>getStaticPropertiesAndClassStaticBlock,getStrictOptionValue:()=>Y2,getStringComparer:()=>dg,getSuperCallFromStatement:()=>getSuperCallFromStatement,getSuperContainer:()=>XD,getSupportedCodeFixes:()=>o7,getSupportedExtensions:()=>BS,getSupportedExtensionsWithJsonIfResolveJsonModule:()=>US,getSwitchedType:()=>getSwitchedType,getSymbolId:()=>getSymbolId,getSymbolNameForPrivateIdentifier:()=>cI,getSymbolTarget:()=>getSymbolTarget,getSyntacticClassifications:()=>getSyntacticClassifications,getSyntacticModifierFlags:()=>U2,getSyntacticModifierFlagsNoCache:()=>q2,getSynthesizedDeepClone:()=>getSynthesizedDeepClone,getSynthesizedDeepCloneWithReplacements:()=>getSynthesizedDeepCloneWithReplacements,getSynthesizedDeepClones:()=>getSynthesizedDeepClones,getSynthesizedDeepClonesWithReplacements:()=>getSynthesizedDeepClonesWithReplacements,getSyntheticLeadingComments:()=>getSyntheticLeadingComments,getSyntheticTrailingComments:()=>getSyntheticTrailingComments,getTargetLabel:()=>getTargetLabel,getTargetOfBindingOrAssignmentElement:()=>Ro,getTemporaryModuleResolutionState:()=>getTemporaryModuleResolutionState,getTextOfConstantValue:()=>Bk,getTextOfIdentifierOrLiteral:()=>Td,getTextOfJSDocComment:()=>FC,getTextOfJsxAttributeName:()=>JM,getTextOfJsxNamespacedName:()=>Kl,getTextOfNode:()=>cm,getTextOfNodeFromSourceText:()=>n_,getTextOfPropertyName:()=>aD,getThisContainer:()=>f2,getThisParameter:()=>H3,getTokenAtPosition:()=>getTokenAtPosition,getTokenPosOfNode:()=>$o,getTokenSourceMapRange:()=>getTokenSourceMapRange,getTouchingPropertyName:()=>getTouchingPropertyName,getTouchingToken:()=>getTouchingToken,getTrailingCommentRanges:()=>n4,getTrailingSemicolonDeferringWriter:()=>DI,getTransformFlagsSubtreeExclusions:()=>Mx,getTransformers:()=>getTransformers,getTsBuildInfoEmitOutputFilePath:()=>getTsBuildInfoEmitOutputFilePath,getTsConfigObjectLiteralExpression:()=>VT,getTsConfigPropArrayElementValue:()=>FD,getTypeAnnotationNode:()=>qI,getTypeArgumentOrTypeParameterList:()=>getTypeArgumentOrTypeParameterList,getTypeKeywordOfTypeOnlyImport:()=>getTypeKeywordOfTypeOnlyImport,getTypeNode:()=>getTypeNode,getTypeNodeIfAccessible:()=>getTypeNodeIfAccessible,getTypeParameterFromJsDoc:()=>RP,getTypeParameterOwner:()=>SC,getTypesPackageName:()=>getTypesPackageName,getUILocale:()=>lE,getUniqueName:()=>getUniqueName,getUniqueSymbolId:()=>getUniqueSymbolId,getUseDefineForClassFields:()=>DO,getWatchErrorSummaryDiagnosticMessage:()=>getWatchErrorSummaryDiagnosticMessage,getWatchFactory:()=>getWatchFactory,group:()=>H9,groupBy:()=>G9,guessIndentation:()=>ek,handleNoEmitOptions:()=>handleNoEmitOptions,hasAbstractModifier:()=>K3,hasAccessorModifier:()=>F2,hasAmbientModifier:()=>Z3,hasChangesInResolutions:()=>bk,hasChildOfKind:()=>hasChildOfKind,hasContextSensitiveParameters:()=>SM,hasDecorators:()=>kl,hasDocComment:()=>hasDocComment,hasDynamicName:()=>D3,hasEffectiveModifier:()=>j2,hasEffectiveModifiers:()=>QI,hasEffectiveReadonlyModifier:()=>j0,hasExtension:()=>Wv,hasIndexSignature:()=>hasIndexSignature,hasInitializer:()=>ST,hasInvalidEscape:()=>L3,hasJSDocNodes:()=>Hi,hasJSDocParameterTags:()=>AC,hasJSFileExtension:()=>eb,hasJsonModuleEmitEnabled:()=>gO,hasOnlyExpressionInitializer:()=>KA,hasOverrideModifier:()=>KI,hasPossibleExternalModuleReference:()=>eD,hasProperty:()=>Wn,hasPropertyAccessExpressionWithName:()=>hasPropertyAccessExpressionWithName,hasQuestionToken:()=>PP,hasRecordedExternalHelpers:()=>nR,hasResolutionModeOverride:()=>UM,hasRestParameter:()=>tk,hasScopeMarker:()=>kA,hasStaticModifier:()=>Sm,hasSyntacticModifier:()=>Cn,hasSyntacticModifiers:()=>YI,hasTSFileExtension:()=>tb,hasTabstop:()=>ix,hasTrailingDirectorySeparator:()=>Vd,hasType:()=>YA,hasTypeArguments:()=>jP,hasZeroOrOneAsteriskCharacter:()=>RO,helperString:()=>helperString,hostGetCanonicalFileName:()=>F3,hostUsesCaseSensitiveFileNames:()=>O2,idText:()=>Lt,identifierIsThisKeyword:()=>G3,identifierToKeywordKind:()=>E4,identity:()=>bt,identitySourceMapConsumer:()=>identitySourceMapConsumer,ignoreSourceNewlines:()=>ignoreSourceNewlines,ignoredPaths:()=>ignoredPaths,importDefaultHelper:()=>importDefaultHelper,importFromModuleSpecifier:()=>kP,importNameElisionDisabled:()=>bO,importStarHelper:()=>importStarHelper,indexOfAnyCharCode:()=>dv,indexOfNode:()=>Jk,indicesOf:()=>ug,inferredTypesContainingFile:()=>inferredTypesContainingFile,injectClassNamedEvaluationHelperBlockIfMissing:()=>injectClassNamedEvaluationHelperBlockIfMissing,injectClassThisAssignmentIfMissing:()=>injectClassThisAssignmentIfMissing,insertImports:()=>insertImports,insertLeadingStatement:()=>zJ,insertSorted:()=>vl,insertStatementAfterCustomPrologue:()=>Pk,insertStatementAfterStandardPrologue:()=>Dk,insertStatementsAfterCustomPrologue:()=>kk,insertStatementsAfterStandardPrologue:()=>Ak,intersperse:()=>i9,intrinsicTagNameToString:()=>jM,introducesArgumentsExoticObject:()=>ND,inverseJsxOptionMap:()=>inverseJsxOptionMap,isAbstractConstructorSymbol:()=>HN,isAbstractModifier:()=>vL,isAccessExpression:()=>Ko,isAccessibilityModifier:()=>isAccessibilityModifier,isAccessor:()=>am,isAccessorModifier:()=>SL,isAliasSymbolDeclaration:()=>KP,isAliasableExpression:()=>A2,isAmbientModule:()=>lm,isAmbientPropertyDeclaration:()=>Qk,isAnonymousFunctionDefinition:()=>Zs,isAnyDirectorySeparator:()=>vg,isAnyImportOrBareOrAccessedRequire:()=>Kk,isAnyImportOrReExport:()=>pm,isAnyImportSyntax:()=>t2,isAnySupportedFileExtension:()=>nM,isApplicableVersionedTypesKey:()=>isApplicableVersionedTypesKey,isArgumentExpressionOfElementAccess:()=>isArgumentExpressionOfElementAccess,isArray:()=>$t,isArrayBindingElement:()=>mA,isArrayBindingOrAssignmentElement:()=>lT,isArrayBindingOrAssignmentPattern:()=>cT,isArrayBindingPattern:()=>AL,isArrayLiteralExpression:()=>iu,isArrayLiteralOrObjectLiteralDestructuringPattern:()=>isArrayLiteralOrObjectLiteralDestructuringPattern,isArrayTypeNode:()=>Hx,isArrowFunction:()=>Nm,isAsExpression:()=>LL,isAssertClause:()=>rJ,isAssertEntry:()=>iJ,isAssertionExpression:()=>CA,isAssertsKeyword:()=>yL,isAssignmentDeclaration:()=>O0,isAssignmentExpression:()=>si,isAssignmentOperator:()=>A_,isAssignmentPattern:()=>oT,isAssignmentTarget:()=>BP,isAsteriskToken:()=>pL,isAsyncFunction:()=>sI,isAsyncModifier:()=>_l,isAutoAccessorPropertyDeclaration:()=>aT,isAwaitExpression:()=>IL,isAwaitKeyword:()=>gL,isBigIntLiteral:()=>db,isBinaryExpression:()=>At,isBinaryOperatorToken:()=>LR,isBindableObjectDefinePropertyCall:()=>b2,isBindableStaticAccessExpression:()=>_s,isBindableStaticElementAccessExpression:()=>v2,isBindableStaticNameExpression:()=>Yo,isBindingElement:()=>ru,isBindingElementOfBareOrAccessedRequire:()=>pP,isBindingName:()=>_A,isBindingOrAssignmentElement:()=>hA,isBindingOrAssignmentPattern:()=>yA,isBindingPattern:()=>om,isBlock:()=>au,isBlockOrCatchScoped:()=>qk,isBlockScope:()=>RT,isBlockScopedContainerTopLevel:()=>Gk,isBooleanLiteral:()=>cA,isBreakOrContinueStatement:()=>GC,isBreakStatement:()=>GL,isBuildInfoFile:()=>isBuildInfoFile,isBuilderProgram:()=>isBuilderProgram2,isBundle:()=>gJ,isBundleFileTextLike:()=>ZN,isCallChain:()=>T0,isCallExpression:()=>R_,isCallExpressionTarget:()=>isCallExpressionTarget,isCallLikeExpression:()=>uT,isCallLikeOrFunctionLikeExpression:()=>vA,isCallOrNewExpression:()=>TA,isCallOrNewExpressionTarget:()=>isCallOrNewExpressionTarget,isCallSignatureDeclaration:()=>yb,isCallToHelper:()=>isCallToHelper,isCaseBlock:()=>eJ,isCaseClause:()=>mJ,isCaseKeyword:()=>xL,isCaseOrDefaultClause:()=>QA,isCatchClause:()=>hJ,isCatchClauseVariableDeclaration:()=>KS,isCatchClauseVariableDeclarationOrBindingElement:()=>OT,isCheckJsEnabledForFile:()=>rM,isChildOfNodeWithKind:()=>wD,isCircularBuildOrder:()=>isCircularBuildOrder,isClassDeclaration:()=>es,isClassElement:()=>io,isClassExpression:()=>Ol,isClassInstanceProperty:()=>uA,isClassLike:()=>ar,isClassMemberModifier:()=>nT,isClassNamedEvaluationHelperBlock:()=>isClassNamedEvaluationHelperBlock,isClassOrTypeElement:()=>fA,isClassStaticBlockDeclaration:()=>eu,isClassThisAssignmentBlock:()=>isClassThisAssignmentBlock,isCollapsedRange:()=>SN,isColonToken:()=>fL,isCommaExpression:()=>Bm,isCommaListExpression:()=>j_,isCommaSequence:()=>KJ,isCommaToken:()=>jx,isComment:()=>isComment,isCommonJsExportPropertyAssignment:()=>u2,isCommonJsExportedExpression:()=>PD,isCompoundAssignment:()=>isCompoundAssignment,isComputedNonLiteralName:()=>iD,isComputedPropertyName:()=>oo,isConciseBody:()=>NA,isConditionalExpression:()=>NL,isConditionalTypeNode:()=>Kx,isConstTypeReference:()=>X4,isConstructSignatureDeclaration:()=>zx,isConstructorDeclaration:()=>L_,isConstructorTypeNode:()=>bb,isContextualKeyword:()=>k2,isContinueStatement:()=>HL,isCustomPrologue:()=>fm,isDebuggerStatement:()=>ZL,isDeclaration:()=>Xo,isDeclarationBindingElement:()=>Hg,isDeclarationFileName:()=>W8,isDeclarationName:()=>g3,isDeclarationNameOfEnumOrNamespace:()=>MN,isDeclarationReadonly:()=>yD,isDeclarationStatement:()=>zA,isDeclarationWithTypeParameterChildren:()=>jT,isDeclarationWithTypeParameters:()=>Yk,isDecorator:()=>M_,isDecoratorTarget:()=>isDecoratorTarget,isDefaultClause:()=>f8,isDefaultImport:()=>l3,isDefaultModifier:()=>hL,isDefaultedExpandoInitializer:()=>bP,isDeleteExpression:()=>DL,isDeleteTarget:()=>XP,isDeprecatedDeclaration:()=>isDeprecatedDeclaration,isDestructuringAssignment:()=>aN,isDiagnosticWithLocation:()=>isDiagnosticWithLocation,isDiskPathRoot:()=>qE,isDoStatement:()=>qL,isDocumentRegistryEntry:()=>isDocumentRegistryEntry,isDotDotDotToken:()=>uL,isDottedName:()=>B0,isDynamicName:()=>P2,isESSymbolIdentifier:()=>pI,isEffectiveExternalModule:()=>e2,isEffectiveModuleDeclaration:()=>MT,isEffectiveStrictModeSourceFile:()=>$k,isElementAccessChain:()=>G4,isElementAccessExpression:()=>Ki,isEmittedFileOfProgram:()=>isEmittedFileOfProgram,isEmptyArrayLiteral:()=>uN,isEmptyBindingElement:()=>x4,isEmptyBindingPattern:()=>S4,isEmptyObjectLiteral:()=>lN,isEmptyStatement:()=>BL,isEmptyStringLiteral:()=>XT,isEntityName:()=>sA,isEntityNameExpression:()=>co,isEnumConst:()=>hD,isEnumDeclaration:()=>Pb,isEnumMember:()=>m8,isEqualityOperatorKind:()=>isEqualityOperatorKind,isEqualsGreaterThanToken:()=>mL,isExclamationToken:()=>Id,isExcludedFile:()=>isExcludedFile,isExclusivelyTypeOnlyImportOrExport:()=>isExclusivelyTypeOnlyImportOrExport,isExpandoPropertyDeclaration:()=>sx,isExportAssignment:()=>ps,isExportDeclaration:()=>F_,isExportModifier:()=>Fx,isExportName:()=>YJ,isExportNamespaceAsDefaultDeclaration:()=>NT,isExportOrDefaultModifier:()=>RR,isExportSpecifier:()=>p8,isExportsIdentifier:()=>r3,isExportsOrModuleExportsOrAlias:()=>isExportsOrModuleExportsOrAlias,isExpression:()=>sm,isExpressionNode:()=>m2,isExpressionOfExternalModuleImportEqualsDeclaration:()=>isExpressionOfExternalModuleImportEqualsDeclaration,isExpressionOfOptionalChainRoot:()=>WC,isExpressionStatement:()=>ou,isExpressionWithTypeArguments:()=>Cb,isExpressionWithTypeArgumentsInClassExtendsClause:()=>F0,isExternalModule:()=>ns,isExternalModuleAugmentation:()=>Zg,isExternalModuleImportEqualsDeclaration:()=>YT,isExternalModuleIndicator:()=>PA,isExternalModuleNameRelative:()=>pC,isExternalModuleReference:()=>Jm,isExternalModuleSymbol:()=>isExternalModuleSymbol,isExternalOrCommonJsModule:()=>mD,isFileLevelReservedGeneratedIdentifier:()=>aA,isFileLevelUniqueName:()=>AT,isFileProbablyExternalModule:()=>gl,isFirstDeclarationOfSymbolParameter:()=>isFirstDeclarationOfSymbolParameter,isFixablePromiseHandler:()=>isFixablePromiseHandler,isForInOrOfStatement:()=>IA,isForInStatement:()=>WL,isForInitializer:()=>MA,isForOfStatement:()=>VL,isForStatement:()=>s8,isFunctionBlock:()=>WT,isFunctionBody:()=>OA,isFunctionDeclaration:()=>us,isFunctionExpression:()=>Im,isFunctionExpressionOrArrowFunction:()=>ZS,isFunctionLike:()=>$i,isFunctionLikeDeclaration:()=>rT,isFunctionLikeKind:()=>qg,isFunctionLikeOrClassStaticBlockDeclaration:()=>im,isFunctionOrConstructorTypeNode:()=>dA,isFunctionOrModuleBlock:()=>lA,isFunctionSymbol:()=>CP,isFunctionTypeNode:()=>tu,isFutureReservedKeyword:()=>tI,isGeneratedIdentifier:()=>va,isGeneratedPrivateIdentifier:()=>Bg,isGetAccessor:()=>rl,isGetAccessorDeclaration:()=>d_,isGetOrSetAccessorDeclaration:()=>zC,isGlobalDeclaration:()=>isGlobalDeclaration,isGlobalScopeAugmentation:()=>um,isGrammarError:()=>Ck,isHeritageClause:()=>Ml,isHoistedFunction:()=>D0,isHoistedVariableStatement:()=>P0,isIdentifier:()=>Ae,isIdentifierANonContextualKeyword:()=>iI,isIdentifierName:()=>YP,isIdentifierOrThisTypeNode:()=>dR,isIdentifierPart:()=>Ka,isIdentifierStart:()=>yr,isIdentifierText:()=>Ig,isIdentifierTypePredicate:()=>JD,isIdentifierTypeReference:()=>mM,isIfStatement:()=>UL,isIgnoredFileFromWildCardWatching:()=>isIgnoredFileFromWildCardWatching,isImplicitGlob:()=>LS,isImportAttribute:()=>oJ,isImportAttributeName:()=>iA,isImportAttributes:()=>aJ,isImportCall:()=>s2,isImportClause:()=>tJ,isImportDeclaration:()=>Ob,isImportEqualsDeclaration:()=>Nb,isImportKeyword:()=>Ux,isImportMeta:()=>k0,isImportOrExportSpecifier:()=>tA,isImportOrExportSpecifierName:()=>isImportOrExportSpecifierName,isImportSpecifier:()=>l8,isImportTypeAssertionContainer:()=>nJ,isImportTypeNode:()=>nu,isImportableFile:()=>isImportableFile,isInComment:()=>isInComment,isInCompoundLikeAssignment:()=>qP,isInExpressionContext:()=>$T,isInJSDoc:()=>KT,isInJSFile:()=>Vt,isInJSXText:()=>isInJSXText,isInJsonFile:()=>cP,isInNonReferenceComment:()=>isInNonReferenceComment,isInReferenceComment:()=>isInReferenceComment,isInRightSideOfInternalImportEqualsDeclaration:()=>isInRightSideOfInternalImportEqualsDeclaration,isInString:()=>isInString,isInTemplateString:()=>isInTemplateString,isInTopLevelContext:()=>HD,isInTypeQuery:()=>BI,isIncrementalCompilation:()=>kO,isIndexSignatureDeclaration:()=>gb,isIndexedAccessTypeNode:()=>t8,isInferTypeNode:()=>Zx,isInfinityOrNaNString:()=>xM,isInitializedProperty:()=>isInitializedProperty,isInitializedVariable:()=>bS,isInsideJsxElement:()=>isInsideJsxElement,isInsideJsxElementOrAttribute:()=>isInsideJsxElementOrAttribute,isInsideNodeModules:()=>isInsideNodeModules,isInsideTemplateLiteral:()=>isInsideTemplateLiteral,isInstanceOfExpression:()=>pS,isInstantiatedModule:()=>isInstantiatedModule,isInterfaceDeclaration:()=>su,isInternalDeclaration:()=>isInternalDeclaration,isInternalModuleImportEqualsDeclaration:()=>sP,isInternalName:()=>QJ,isIntersectionTypeNode:()=>Yx,isIntrinsicJsxName:()=>j3,isIterationStatement:()=>mT,isJSDoc:()=>ds,isJSDocAllType:()=>xJ,isJSDocAugmentsTag:()=>jm,isJSDocAuthorTag:()=>DJ,isJSDocCallbackTag:()=>PJ,isJSDocClassTag:()=>g8,isJSDocCommentContainingNode:()=>TT,isJSDocConstructSignature:()=>IP,isJSDocDeprecatedTag:()=>Wb,isJSDocEnumTag:()=>v8,isJSDocFunctionType:()=>Rm,isJSDocImplementsTag:()=>S8,isJSDocIndexSignature:()=>uP,isJSDocLikeText:()=>B8,isJSDocLink:()=>vJ,isJSDocLinkCode:()=>TJ,isJSDocLinkLike:()=>dl,isJSDocLinkPlain:()=>SJ,isJSDocMemberName:()=>r_,isJSDocNameReference:()=>Wf,isJSDocNamepathType:()=>kJ,isJSDocNamespaceBody:()=>RA,isJSDocNode:()=>$g,isJSDocNonNullableType:()=>EJ,isJSDocNullableType:()=>y8,isJSDocOptionalParameter:()=>ax,isJSDocOptionalType:()=>CJ,isJSDocOverloadTag:()=>zb,isJSDocOverrideTag:()=>b8,isJSDocParameterTag:()=>m_,isJSDocPrivateTag:()=>Bb,isJSDocPropertyLikeTag:()=>Rg,isJSDocPropertyTag:()=>MJ,isJSDocProtectedTag:()=>Ub,isJSDocPublicTag:()=>Fb,isJSDocReadonlyTag:()=>qb,isJSDocReturnTag:()=>Vb,isJSDocSatisfiesExpression:()=>OM,isJSDocSatisfiesTag:()=>Hb,isJSDocSeeTag:()=>IJ,isJSDocSignature:()=>cu,isJSDocTag:()=>Qg,isJSDocTemplateTag:()=>ts,isJSDocThisTag:()=>T8,isJSDocThrowsTag:()=>LJ,isJSDocTypeAlias:()=>Xl,isJSDocTypeAssertion:()=>D8,isJSDocTypeExpression:()=>h8,isJSDocTypeLiteral:()=>jb,isJSDocTypeTag:()=>lu,isJSDocTypedefTag:()=>NJ,isJSDocUnknownTag:()=>OJ,isJSDocUnknownType:()=>wJ,isJSDocVariadicType:()=>AJ,isJSXTagName:()=>Lf,isJsonEqual:()=>rb,isJsonSourceFile:()=>o2,isJsxAttribute:()=>pJ,isJsxAttributeLike:()=>XA,isJsxAttributeName:()=>RM,isJsxAttributes:()=>Rb,isJsxChild:()=>bT,isJsxClosingElement:()=>zf,isJsxClosingFragment:()=>uJ,isJsxElement:()=>tg,isJsxExpression:()=>dJ,isJsxFragment:()=>yl,isJsxNamespacedName:()=>B_,isJsxOpeningElement:()=>Jo,isJsxOpeningFragment:()=>Jb,isJsxOpeningLikeElement:()=>vT,isJsxOpeningLikeElementTagName:()=>isJsxOpeningLikeElementTagName,isJsxSelfClosingElement:()=>lJ,isJsxSpreadAttribute:()=>fJ,isJsxTagNameExpression:()=>GA,isJsxText:()=>Pd,isJumpStatementTarget:()=>isJumpStatementTarget,isKeyword:()=>ki,isKeywordOrPunctuation:()=>Rf,isKnownSymbol:()=>lI,isLabelName:()=>isLabelName,isLabelOfLabeledStatement:()=>isLabelOfLabeledStatement,isLabeledStatement:()=>_8,isLateVisibilityPaintedStatement:()=>Zk,isLeftHandSideExpression:()=>jo,isLeftHandSideOfAssignment:()=>iN,isLet:()=>vD,isLineBreak:()=>On,isLiteralComputedPropertyDeclarationName:()=>b3,isLiteralExpression:()=>Fg,isLiteralExpressionOfObject:()=>KC,isLiteralImportTypeNode:()=>_2,isLiteralKind:()=>jg,isLiteralLikeAccess:()=>Jf,isLiteralLikeElementAccess:()=>Gl,isLiteralNameOfPropertyDeclarationOrIndexAccess:()=>isLiteralNameOfPropertyDeclarationOrIndexAccess,isLiteralTypeLikeExpression:()=>gR,isLiteralTypeLiteral:()=>wA,isLiteralTypeNode:()=>xb,isLocalName:()=>ng,isLogicalOperator:()=>tN,isLogicalOrCoalescingAssignmentExpression:()=>nN,isLogicalOrCoalescingAssignmentOperator:()=>wm,isLogicalOrCoalescingBinaryExpression:()=>rN,isLogicalOrCoalescingBinaryOperator:()=>sS,isMappedTypeNode:()=>n8,isMemberName:()=>ro,isMetaProperty:()=>Ab,isMethodDeclaration:()=>f_,isMethodOrAccessor:()=>zg,isMethodSignature:()=>qx,isMinusToken:()=>hb,isMissingDeclaration:()=>_J,isModifier:()=>Ug,isModifierKind:()=>Ei,isModifierLike:()=>Mf,isModuleAugmentationExternal:()=>LT,isModuleBlock:()=>c8,isModuleBody:()=>LA,isModuleDeclaration:()=>Zi,isModuleExportsAccessExpression:()=>g2,isModuleIdentifier:()=>i3,isModuleName:()=>yR,isModuleOrEnumDeclaration:()=>FA,isModuleReference:()=>HA,isModuleSpecifierLike:()=>isModuleSpecifierLike,isModuleWithStringLiteralName:()=>zk,isNameOfFunctionDeclaration:()=>isNameOfFunctionDeclaration,isNameOfModuleDeclaration:()=>isNameOfModuleDeclaration,isNamedClassElement:()=>pA,isNamedDeclaration:()=>Kd,isNamedEvaluation:()=>fI,isNamedEvaluationSource:()=>N3,isNamedExportBindings:()=>XC,isNamedExports:()=>u8,isNamedImportBindings:()=>jA,isNamedImports:()=>sJ,isNamedImportsOrExports:()=>eO,isNamedTupleMember:()=>vb,isNamespaceBody:()=>JA,isNamespaceExport:()=>Lm,isNamespaceExportDeclaration:()=>Ib,isNamespaceImport:()=>Mb,isNamespaceReexportDeclaration:()=>iP,isNewExpression:()=>r8,isNewExpressionTarget:()=>isNewExpressionTarget,isNoSubstitutionTemplateLiteral:()=>Rx,isNode:()=>QC,isNodeArray:()=>ha,isNodeArrayMultiLine:()=>PN,isNodeDescendantOf:()=>$P,isNodeKind:()=>Wl,isNodeLikeSystem:()=>PE,isNodeModulesDirectory:()=>eC,isNodeWithPossibleHoistedDeclaration:()=>zP,isNonContextualKeyword:()=>k3,isNonExportDefaultModifier:()=>jR,isNonGlobalAmbientModule:()=>Wk,isNonGlobalDeclaration:()=>isNonGlobalDeclaration,isNonNullAccess:()=>NM,isNonNullChain:()=>$4,isNonNullExpression:()=>Uo,isNonStaticMethodOrAccessorWithPrivateName:()=>isNonStaticMethodOrAccessorWithPrivateName,isNotEmittedOrPartiallyEmittedNode:()=>AA,isNotEmittedStatement:()=>Lb,isNullishCoalesce:()=>HC,isNumber:()=>tE,isNumericLiteral:()=>lo,isNumericLiteralName:()=>ex,isObjectBindingElementWithoutPropertyName:()=>isObjectBindingElementWithoutPropertyName,isObjectBindingOrAssignmentElement:()=>_T,isObjectBindingOrAssignmentPattern:()=>sT,isObjectBindingPattern:()=>CL,isObjectLiteralElement:()=>x0,isObjectLiteralElementLike:()=>Vg,isObjectLiteralExpression:()=>uo,isObjectLiteralMethod:()=>MD,isObjectLiteralOrClassExpressionMethodOrAccessor:()=>LD,isObjectTypeDeclaration:()=>YN,isOctalDigit:()=>Nf,isOmittedExpression:()=>Mm,isOptionalChain:()=>Lg,isOptionalChainRoot:()=>Jg,isOptionalDeclaration:()=>IM,isOptionalJSDocPropertyLikeTag:()=>rx,isOptionalTypeNode:()=>Xx,isOuterExpression:()=>Um,isOutermostOptionalChain:()=>VC,isOverrideModifier:()=>TL,isPackedArrayLiteral:()=>bM,isParameter:()=>Pa,isParameterDeclaration:()=>mI,isParameterOrCatchClauseVariable:()=>wM,isParameterPropertyDeclaration:()=>T4,isParameterPropertyModifier:()=>tT,isParenthesizedExpression:()=>cs,isParenthesizedTypeNode:()=>Tb,isParseTreeNode:()=>xl,isPartOfTypeNode:()=>c2,isPartOfTypeQuery:()=>QT,isPartiallyEmittedExpression:()=>o8,isPatternMatch:()=>hg,isPinnedComment:()=>IT,isPlainJsFile:()=>Sk,isPlusToken:()=>mb,isPossiblyTypeArgumentPosition:()=>isPossiblyTypeArgumentPosition,isPostfixUnaryExpression:()=>a8,isPrefixUnaryExpression:()=>Om,isPrivateIdentifier:()=>Vn,isPrivateIdentifierClassElementDeclaration:()=>eT,isPrivateIdentifierPropertyAccessExpression:()=>oA,isPrivateIdentifierSymbol:()=>uI,isProgramBundleEmitBuildInfo:()=>isProgramBundleEmitBuildInfo,isProgramUptoDate:()=>isProgramUptoDate,isPrologueDirective:()=>Sa,isPropertyAccessChain:()=>H4,isPropertyAccessEntityNameExpression:()=>lS,isPropertyAccessExpression:()=>Ln,isPropertyAccessOrQualifiedName:()=>bA,isPropertyAccessOrQualifiedNameOrImportTypeNode:()=>gA,isPropertyAssignment:()=>fs,isPropertyDeclaration:()=>Ia,isPropertyName:()=>Vl,isPropertyNameLiteral:()=>L0,isPropertySignature:()=>Zl,isProtoSetter:()=>I3,isPrototypeAccess:()=>k_,isPrototypePropertyAssignment:()=>xP,isPunctuation:()=>A3,isPushOrUnshiftIdentifier:()=>dI,isQualifiedName:()=>O_,isQuestionDotToken:()=>dL,isQuestionOrExclamationToken:()=>fR,isQuestionOrPlusOrMinusToken:()=>hR,isQuestionToken:()=>Nl,isRawSourceMap:()=>isRawSourceMap,isReadonlyKeyword:()=>Bx,isReadonlyKeywordOrPlusOrMinusToken:()=>mR,isRecognizedTripleSlashComment:()=>Ik,isReferenceFileLocation:()=>isReferenceFileLocation,isReferencedFile:()=>isReferencedFile,isRegularExpressionLiteral:()=>sL,isRequireCall:()=>Hl,isRequireVariableStatement:()=>t3,isRestParameter:()=>xT,isRestTypeNode:()=>$x,isReturnStatement:()=>XL,isReturnStatementWithFixablePromiseHandler:()=>isReturnStatementWithFixablePromiseHandler,isRightSideOfAccessExpression:()=>uS,isRightSideOfInstanceofExpression:()=>cN,isRightSideOfPropertyAccess:()=>isRightSideOfPropertyAccess,isRightSideOfQualifiedName:()=>isRightSideOfQualifiedName,isRightSideOfQualifiedNameOrPropertyAccess:()=>sN,isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName:()=>_N,isRootedDiskPath:()=>b_,isSameEntityName:()=>u_,isSatisfiesExpression:()=>JL,isScopeMarker:()=>hT,isSemicolonClassElement:()=>FL,isSetAccessor:()=>nl,isSetAccessorDeclaration:()=>Zo,isShebangTrivia:()=>Dg,isShiftOperatorOrHigher:()=>$b,isShorthandAmbientModuleSymbol:()=>Vk,isShorthandPropertyAssignment:()=>_u,isSignedNumericLiteral:()=>D2,isSimpleCopiableExpression:()=>isSimpleCopiableExpression,isSimpleInlineableExpression:()=>isSimpleInlineableExpression,isSingleOrDoubleQuote:()=>fP,isSourceFile:()=>ci,isSourceFileFromLibrary:()=>isSourceFileFromLibrary,isSourceFileJS:()=>h2,isSourceFileNotJS:()=>_P,isSourceFileNotJson:()=>lP,isSourceMapping:()=>isSourceMapping,isSpecialPropertyDeclaration:()=>wP,isSpreadAssignment:()=>d8,isSpreadElement:()=>Eb,isStatement:()=>yT,isStatementButNotDeclaration:()=>WA,isStatementOrBlock:()=>gT,isStatementWithLocals:()=>xk,isStatic:()=>R0,isStaticModifier:()=>bL,isString:()=>g_,isStringAKeyword:()=>rI,isStringANonContextualKeyword:()=>nI,isStringAndEmptyAnonymousObjectIntersection:()=>isStringAndEmptyAnonymousObjectIntersection,isStringDoubleQuoted:()=>dP,isStringLiteral:()=>Tr,isStringLiteralLike:()=>ni,isStringLiteralOrJsxExpression:()=>$A,isStringLiteralOrTemplate:()=>isStringLiteralOrTemplate,isStringOrNumericLiteralLike:()=>Yi,isStringOrRegularExpressionOrTemplateLiteral:()=>isStringOrRegularExpressionOrTemplateLiteral,isStringTextContainingNode:()=>rA,isSuperCall:()=>TD,isSuperKeyword:()=>qf,isSuperOrSuperProperty:()=>QD,isSuperProperty:()=>bd,isSupportedSourceFileName:()=>YO,isSwitchStatement:()=>QL,isSyntaxList:()=>JJ,isSyntheticExpression:()=>RL,isSyntheticReference:()=>cJ,isTagName:()=>isTagName,isTaggedTemplateExpression:()=>i8,isTaggedTemplateTag:()=>isTaggedTemplateTag,isTemplateExpression:()=>OL,isTemplateHead:()=>_L,isTemplateLiteral:()=>SA,isTemplateLiteralKind:()=>wl,isTemplateLiteralToken:()=>ZC,isTemplateLiteralTypeNode:()=>EL,isTemplateLiteralTypeSpan:()=>wL,isTemplateMiddle:()=>cL,isTemplateMiddleOrTemplateTail:()=>eA,isTemplateSpan:()=>jL,isTemplateTail:()=>lL,isTextWhiteSpaceLike:()=>isTextWhiteSpaceLike,isThis:()=>isThis,isThisContainerOrFunctionBlock:()=>VD,isThisIdentifier:()=>Tm,isThisInTypeQuery:()=>UI,isThisInitializedDeclaration:()=>KD,isThisInitializedObjectBindingExpression:()=>ZD,isThisProperty:()=>YD,isThisTypeNode:()=>Sb,isThisTypeParameter:()=>tx,isThisTypePredicate:()=>RD,isThrowStatement:()=>YL,isToken:()=>YC,isTokenKind:()=>Y4,isTraceEnabled:()=>isTraceEnabled,isTransientSymbol:()=>E0,isTrivia:()=>aI,isTryStatement:()=>KL,isTupleTypeNode:()=>Gx,isTypeAlias:()=>NP,isTypeAliasDeclaration:()=>Db,isTypeAssertionExpression:()=>kL,isTypeDeclaration:()=>nx,isTypeElement:()=>Wg,isTypeKeyword:()=>isTypeKeyword,isTypeKeywordToken:()=>isTypeKeywordToken,isTypeKeywordTokenOrIdentifier:()=>isTypeKeywordTokenOrIdentifier,isTypeLiteralNode:()=>Pm,isTypeNode:()=>S0,isTypeNodeKind:()=>ES,isTypeOfExpression:()=>PL,isTypeOnlyExportDeclaration:()=>Z4,isTypeOnlyImportDeclaration:()=>K4,isTypeOnlyImportOrExportDeclaration:()=>nA,isTypeOperatorNode:()=>e8,isTypeParameterDeclaration:()=>Lo,isTypePredicateNode:()=>Wx,isTypeQueryNode:()=>Vx,isTypeReferenceNode:()=>J_,isTypeReferenceType:()=>ZA,isTypeUsableAsPropertyName:()=>FM,isUMDExportSymbol:()=>XN,isUnaryExpression:()=>fT,isUnaryExpressionWithWrite:()=>xA,isUnicodeIdentifierStart:()=>Kv,isUnionTypeNode:()=>Qx,isUnparsedNode:()=>$C,isUnparsedPrepend:()=>yJ,isUnparsedSource:()=>bJ,isUnparsedTextLike:()=>Q4,isUrl:()=>UE,isValidBigIntString:()=>XS,isValidESSymbolDeclaration:()=>ID,isValidTypeOnlyAliasUseSite:()=>uM,isValueSignatureDeclaration:()=>WP,isVarAwaitUsing:()=>gD,isVarConst:()=>UT,isVarUsing:()=>bD,isVariableDeclaration:()=>Li,isVariableDeclarationInVariableStatement:()=>zT,isVariableDeclarationInitializedToBareOrAccessedRequire:()=>dm,isVariableDeclarationInitializedToRequire:()=>ZT,isVariableDeclarationList:()=>kb,isVariableLike:()=>l2,isVariableLikeOrAccessor:()=>DD,isVariableStatement:()=>ls,isVoidExpression:()=>wb,isWatchSet:()=>JN,isWhileStatement:()=>zL,isWhiteSpaceLike:()=>ka,isWhiteSpaceSingleLine:()=>Mo,isWithStatement:()=>$L,isWriteAccess:()=>qN,isWriteOnlyAccess:()=>UN,isYieldExpression:()=>ML,jsxModeNeedsExplicitImport:()=>jsxModeNeedsExplicitImport,keywordPart:()=>keywordPart,last:()=>Ea,lastOrUndefined:()=>Pi,length:()=>eo,libMap:()=>libMap,libs:()=>libs,lineBreakPart:()=>lineBreakPart,linkNamePart:()=>linkNamePart,linkPart:()=>linkPart,linkTextPart:()=>linkTextPart,listFiles:()=>listFiles,loadModuleFromGlobalCache:()=>loadModuleFromGlobalCache,loadWithModeAwareCache:()=>loadWithModeAwareCache,makeIdentifierFromModuleName:()=>Uk,makeImport:()=>makeImport,makeImportIfNecessary:()=>makeImportIfNecessary,makeStringLiteral:()=>makeStringLiteral,mangleScopedPackageName:()=>mangleScopedPackageName,map:()=>xa,mapAllOrFail:()=>f9,mapDefined:()=>wa,mapDefinedEntries:()=>m9,mapDefinedIterator:()=>d9,mapEntries:()=>v9,mapIterator:()=>l9,mapOneOrMany:()=>mapOneOrMany,mapToDisplayParts:()=>mapToDisplayParts,matchFiles:()=>VO,matchPatternOrExact:()=>iM,matchedText:()=>TE,matchesExclude:()=>matchesExclude,maybeBind:()=>sn,maybeSetLocalizedDiagnosticMessages:()=>kS,memoize:()=>Qf,memoizeCached:()=>aE,memoizeOne:()=>Fr,memoizeWeak:()=>iE,metadataHelper:()=>metadataHelper,min:()=>_E,minAndMax:()=>oM,missingFileModifiedTime:()=>missingFileModifiedTime,modifierToFlag:()=>z2,modifiersToFlags:()=>hr,moduleOptionDeclaration:()=>moduleOptionDeclaration,moduleResolutionIsEqualTo:()=>dk,moduleResolutionNameAndModeGetter:()=>moduleResolutionNameAndModeGetter,moduleResolutionOptionDeclarations:()=>moduleResolutionOptionDeclarations,moduleResolutionSupportsPackageJsonExportsAndImports:()=>$2,moduleResolutionUsesNodeModules:()=>moduleResolutionUsesNodeModules,moduleSpecifiers:()=>ts_moduleSpecifiers_exports,moveEmitHelpers:()=>moveEmitHelpers,moveRangeEnd:()=>vN,moveRangePastDecorators:()=>yS,moveRangePastModifiers:()=>TN,moveRangePos:()=>wd,moveSyntheticComments:()=>moveSyntheticComments,mutateMap:()=>VN,mutateMapSkippingNewValues:()=>SS,needsParentheses:()=>needsParentheses,needsScopeMarker:()=>DA,newCaseClauseTracker:()=>newCaseClauseTracker,newPrivateEnvironment:()=>newPrivateEnvironment,noEmitNotification:()=>noEmitNotification,noEmitSubstitution:()=>noEmitSubstitution,noTransformers:()=>noTransformers,noTruncationMaximumTruncationLength:()=>lx,nodeCanBeDecorated:()=>GT,nodeHasName:()=>A4,nodeIsDecorated:()=>l_,nodeIsMissing:()=>Vi,nodeIsPresent:()=>Cl,nodeIsSynthesized:()=>ya,nodeModuleNameResolver:()=>nodeModuleNameResolver,nodeModulesPathPart:()=>nodeModulesPathPart,nodeNextJsonConfigResolver:()=>nodeNextJsonConfigResolver,nodeOrChildIsDecorated:()=>N0,nodeOverlapsWithStartEnd:()=>nodeOverlapsWithStartEnd,nodePosToString:()=>Ek,nodeSeenTracker:()=>nodeSeenTracker,nodeStartsNewLexicalEnvironment:()=>hI,nodeToDisplayParts:()=>nodeToDisplayParts,noop:()=>gr,noopFileWatcher:()=>noopFileWatcher,normalizePath:()=>br,normalizeSlashes:()=>Vo,not:()=>wE,notImplemented:()=>rE,notImplementedResolver:()=>notImplementedResolver,nullNodeConverters:()=>nullNodeConverters,nullParenthesizerRules:()=>pb,nullTransformationContext:()=>nullTransformationContext,objectAllocator:()=>Ct,operatorPart:()=>operatorPart,optionDeclarations:()=>optionDeclarations,optionMapToObject:()=>optionMapToObject,optionsAffectingProgramStructure:()=>optionsAffectingProgramStructure,optionsForBuild:()=>optionsForBuild,optionsForWatch:()=>optionsForWatch,optionsHaveChanges:()=>w_,optionsHaveModuleResolutionChanges:()=>wT,or:()=>yg,orderedRemoveItem:()=>gE,orderedRemoveItemAt:()=>Nv,outFile:()=>bm,packageIdToPackageName:()=>ET,packageIdToString:()=>yk,paramHelper:()=>paramHelper,parameterIsThisKeyword:()=>$l,parameterNamePart:()=>parameterNamePart,parseBaseNodeFactory:()=>og,parseBigInt:()=>lM,parseBuildCommand:()=>parseBuildCommand,parseCommandLine:()=>parseCommandLine,parseCommandLineWorker:()=>parseCommandLineWorker,parseConfigFileTextToJson:()=>parseConfigFileTextToJson,parseConfigFileWithSystem:()=>parseConfigFileWithSystem,parseConfigHostFromCompilerHostLike:()=>parseConfigHostFromCompilerHostLike,parseCustomTypeOption:()=>parseCustomTypeOption,parseIsolatedEntityName:()=>nj,parseIsolatedJSDocComment:()=>ij,parseJSDocTypeExpressionForTests:()=>aj,parseJsonConfigFileContent:()=>parseJsonConfigFileContent,parseJsonSourceFileConfigFileContent:()=>parseJsonSourceFileConfigFileContent,parseJsonText:()=>rj,parseListTypeOption:()=>parseListTypeOption,parseNodeFactory:()=>q_,parseNodeModuleFromPath:()=>parseNodeModuleFromPath,parsePackageName:()=>parsePackageName,parsePseudoBigInt:()=>Cm,parseValidBigInt:()=>GS,patchWriteFileEnsuringDirectory:()=>patchWriteFileEnsuringDirectory,pathContainsNodeModules:()=>pathContainsNodeModules,pathIsAbsolute:()=>Tg,pathIsBareSpecifier:()=>zE,pathIsRelative:()=>as,patternText:()=>vE,perfLogger:()=>Zf,performIncrementalCompilation:()=>performIncrementalCompilation,performance:()=>ts_performance_exports,plainJSErrors:()=>plainJSErrors,positionBelongsToNode:()=>positionBelongsToNode,positionIsASICandidate:()=>positionIsASICandidate,positionIsSynthesized:()=>Da,positionsAreOnSameLine:()=>D_,preProcessFile:()=>preProcessFile,probablyUsesSemicolons:()=>probablyUsesSemicolons,processCommentPragmas:()=>V8,processPragmasIntoFields:()=>H8,processTaggedTemplateExpression:()=>processTaggedTemplateExpression,programContainsEsModules:()=>programContainsEsModules,programContainsModules:()=>programContainsModules,projectReferenceIsEqualTo:()=>fk,propKeyHelper:()=>propKeyHelper,propertyNamePart:()=>propertyNamePart,pseudoBigIntToString:()=>ib,punctuationPart:()=>punctuationPart,pushIfUnique:()=>Ll,quote:()=>quote,quotePreferenceFromString:()=>quotePreferenceFromString,rangeContainsPosition:()=>rangeContainsPosition,rangeContainsPositionExclusive:()=>rangeContainsPositionExclusive,rangeContainsRange:()=>rangeContainsRange,rangeContainsRangeExclusive:()=>rangeContainsRangeExclusive,rangeContainsStartEnd:()=>rangeContainsStartEnd,rangeEndIsOnSameLineAsRangeStart:()=>AN,rangeEndPositionsAreOnSameLine:()=>CN,rangeEquals:()=>M9,rangeIsOnSingleLine:()=>wN,rangeOfNode:()=>sM,rangeOfTypeParameters:()=>_M,rangeOverlapsWithStartEnd:()=>rangeOverlapsWithStartEnd,rangeStartIsOnSameLineAsRangeEnd:()=>gS,rangeStartPositionsAreOnSameLine:()=>EN,readBuilderProgram:()=>readBuilderProgram,readConfigFile:()=>readConfigFile,readHelper:()=>readHelper,readJson:()=>bN,readJsonConfigFile:()=>readJsonConfigFile,readJsonOrUndefined:()=>dS,reduceEachLeadingCommentRange:()=>Zv,reduceEachTrailingCommentRange:()=>e4,reduceLeft:()=>Fd,reduceLeftIterator:()=>r9,reducePathComponents:()=>Ca,refactor:()=>ts_refactor_exports,regExpEscape:()=>qO,relativeComplement:()=>I9,removeAllComments:()=>removeAllComments,removeEmitHelper:()=>removeEmitHelper,removeExtension:()=>WS,removeFileExtension:()=>Dl,removeIgnoredPath:()=>removeIgnoredPath,removeMinAndVersionNumbers:()=>yE,removeOptionality:()=>removeOptionality,removePrefix:()=>SE,removeSuffix:()=>mE,removeTrailingDirectorySeparator:()=>v_,repeatString:()=>repeatString,replaceElement:()=>F9,resolutionExtensionIsTSOrJson:()=>tM,resolveConfigFileProjectName:()=>resolveConfigFileProjectName,resolveJSModule:()=>resolveJSModule,resolveLibrary:()=>resolveLibrary,resolveModuleName:()=>resolveModuleName,resolveModuleNameFromCache:()=>resolveModuleNameFromCache,resolvePackageNameToPackageJson:()=>resolvePackageNameToPackageJson,resolvePath:()=>g0,resolveProjectReferencePath:()=>resolveProjectReferencePath,resolveTripleslashReference:()=>resolveTripleslashReference,resolveTypeReferenceDirective:()=>resolveTypeReferenceDirective,resolvingEmptyArray:()=>_x,restHelper:()=>restHelper,returnFalse:()=>$f,returnNoopFileWatcher:()=>returnNoopFileWatcher,returnTrue:()=>Cv,returnUndefined:()=>nE,returnsPromise:()=>returnsPromise,runInitializersHelper:()=>runInitializersHelper,sameFlatMap:()=>hv,sameMap:()=>u9,sameMapping:()=>sameMapping,scanShebangTrivia:()=>Pg,scanTokenAtPosition:()=>fD,scanner:()=>qo,screenStartingMessageCodes:()=>screenStartingMessageCodes,semanticDiagnosticsOptionDeclarations:()=>semanticDiagnosticsOptionDeclarations,serializeCompilerOptions:()=>serializeCompilerOptions,server:()=>k7,servicesVersion:()=>u7,setCommentRange:()=>setCommentRange,setConfigFileInOptions:()=>setConfigFileInOptions,setConstantValue:()=>setConstantValue,setEachParent:()=>a_,setEmitFlags:()=>setEmitFlags,setFunctionNameHelper:()=>setFunctionNameHelper,setGetSourceFileAsHashVersioned:()=>setGetSourceFileAsHashVersioned,setIdentifierAutoGenerate:()=>setIdentifierAutoGenerate,setIdentifierGeneratedImportReference:()=>setIdentifierGeneratedImportReference,setIdentifierTypeArguments:()=>setIdentifierTypeArguments,setInternalEmitFlags:()=>setInternalEmitFlags,setLocalizedDiagnosticMessages:()=>AS,setModuleDefaultHelper:()=>setModuleDefaultHelper,setNodeFlags:()=>yM,setObjectAllocator:()=>CS,setOriginalNode:()=>nr,setParent:()=>Qi,setParentRecursive:()=>QS,setPrivateIdentifier:()=>setPrivateIdentifier,setSnippetElement:()=>setSnippetElement,setSourceMapRange:()=>setSourceMapRange,setStackTraceLimit:()=>setStackTraceLimit,setStartsOnNewLine:()=>setStartsOnNewLine,setSyntheticLeadingComments:()=>setSyntheticLeadingComments,setSyntheticTrailingComments:()=>setSyntheticTrailingComments,setSys:()=>setSys,setSysLog:()=>setSysLog,setTextRange:()=>We,setTextRangeEnd:()=>$S,setTextRangePos:()=>Cd,setTextRangePosEnd:()=>Za,setTextRangePosWidth:()=>Ad,setTokenSourceMapRange:()=>setTokenSourceMapRange,setTypeNode:()=>setTypeNode,setUILocale:()=>Pv,setValueDeclaration:()=>EP,shouldAllowImportingTsExtension:()=>shouldAllowImportingTsExtension,shouldPreserveConstEnums:()=>AO,shouldResolveJsRequire:()=>wO,shouldUseUriStyleNodeCoreModules:()=>shouldUseUriStyleNodeCoreModules,showModuleSpecifier:()=>$N,signatureHasLiteralTypes:()=>signatureHasLiteralTypes,signatureHasRestParameter:()=>signatureHasRestParameter,signatureToDisplayParts:()=>signatureToDisplayParts,single:()=>R9,singleElementArray:()=>Yf,singleIterator:()=>g9,singleOrMany:()=>j9,singleOrUndefined:()=>jd,skipAlias:()=>FN,skipAssertions:()=>tR,skipConstraint:()=>skipConstraint,skipOuterExpressions:()=>ms,skipParentheses:()=>C_,skipPartiallyEmittedExpressions:()=>rm,skipTrivia:()=>Mt,skipTypeChecking:()=>cM,skipTypeParentheses:()=>GP,skipWhile:()=>DE,sliceAfter:()=>aM,some:()=>Ze,sort:()=>Xf,sortAndDeduplicate:()=>gv,sortAndDeduplicateDiagnostics:()=>fC,sourceFileAffectingCompilerOptions:()=>sourceFileAffectingCompilerOptions,sourceFileMayBeEmitted:()=>J0,sourceMapCommentRegExp:()=>sourceMapCommentRegExp,sourceMapCommentRegExpDontCareLineStart:()=>sourceMapCommentRegExpDontCareLineStart,spacePart:()=>spacePart,spanMap:()=>b9,spreadArrayHelper:()=>spreadArrayHelper,stableSort:()=>Tv,startEndContainsRange:()=>startEndContainsRange,startEndOverlapsWithStartEnd:()=>startEndOverlapsWithStartEnd,startOnNewLine:()=>qm,startTracing:()=>startTracing,startsWith:()=>Hn,startsWithDirectory:()=>YE,startsWithUnderscore:()=>startsWithUnderscore,startsWithUseStrict:()=>k8,stringContainsAt:()=>stringContainsAt,stringToToken:()=>Fl,stripQuotes:()=>CI,supportedDeclarationExtensions:()=>ub,supportedJSExtensions:()=>Y0,supportedJSExtensionsFlat:()=>lb,supportedLocaleDirectories:()=>Kg,supportedTSExtensions:()=>Bo,supportedTSExtensionsFlat:()=>cb,supportedTSImplementationExtensions:()=>Px,suppressLeadingAndTrailingTrivia:()=>suppressLeadingAndTrailingTrivia,suppressLeadingTrivia:()=>suppressLeadingTrivia,suppressTrailingTrivia:()=>suppressTrailingTrivia,symbolEscapedNameNoDefault:()=>symbolEscapedNameNoDefault,symbolName:()=>yd,symbolNameNoDefault:()=>symbolNameNoDefault,symbolPart:()=>symbolPart,symbolToDisplayParts:()=>symbolToDisplayParts,syntaxMayBeASICandidate:()=>syntaxMayBeASICandidate,syntaxRequiresTrailingSemicolonOrASI:()=>syntaxRequiresTrailingSemicolonOrASI,sys:()=>y0,sysLog:()=>sysLog,tagNamesAreEquivalent:()=>Ai,takeWhile:()=>kE,targetOptionDeclaration:()=>targetOptionDeclaration,templateObjectHelper:()=>templateObjectHelper,testFormatSettings:()=>testFormatSettings,textChangeRangeIsUnchanged:()=>v4,textChangeRangeNewSpan:()=>Ys,textChanges:()=>ts_textChanges_exports,textOrKeywordPart:()=>textOrKeywordPart,textPart:()=>textPart,textRangeContainsPositionInclusive:()=>mC,textSpanContainsPosition:()=>dC,textSpanContainsTextSpan:()=>hC,textSpanEnd:()=>tn,textSpanIntersection:()=>b4,textSpanIntersectsWith:()=>bC,textSpanIntersectsWithPosition:()=>vC,textSpanIntersectsWithTextSpan:()=>gC,textSpanIsEmpty:()=>y4,textSpanOverlap:()=>g4,textSpanOverlapsWith:()=>yC,textSpansEqual:()=>textSpansEqual,textToKeywordObj:()=>pl,timestamp:()=>ga,toArray:()=>If,toBuilderFileEmit:()=>toBuilderFileEmit,toBuilderStateFileInfoForMultiEmit:()=>toBuilderStateFileInfoForMultiEmit,toEditorSettings:()=>ll,toFileNameLowerCase:()=>kv,toLowerCase:()=>Av,toPath:()=>Di,toProgramEmitPending:()=>toProgramEmitPending,tokenIsIdentifierOrKeyword:()=>wt,tokenIsIdentifierOrKeywordOrGreaterThan:()=>Yv,tokenToString:()=>en,trace:()=>trace,tracing:()=>ba,tracingEnabled:()=>tracingEnabled,transform:()=>transform,transformClassFields:()=>transformClassFields,transformDeclarations:()=>transformDeclarations,transformECMAScriptModule:()=>transformECMAScriptModule,transformES2015:()=>transformES2015,transformES2016:()=>transformES2016,transformES2017:()=>transformES2017,transformES2018:()=>transformES2018,transformES2019:()=>transformES2019,transformES2020:()=>transformES2020,transformES2021:()=>transformES2021,transformES5:()=>transformES5,transformESDecorators:()=>transformESDecorators,transformESNext:()=>transformESNext,transformGenerators:()=>transformGenerators,transformJsx:()=>transformJsx,transformLegacyDecorators:()=>transformLegacyDecorators,transformModule:()=>transformModule,transformNamedEvaluation:()=>transformNamedEvaluation,transformNodeModule:()=>transformNodeModule,transformNodes:()=>transformNodes,transformSystemModule:()=>transformSystemModule,transformTypeScript:()=>transformTypeScript,transpile:()=>transpile,transpileModule:()=>transpileModule,transpileOptionValueCompilerOptions:()=>transpileOptionValueCompilerOptions,tryAddToSet:()=>y9,tryAndIgnoreErrors:()=>tryAndIgnoreErrors,tryCast:()=>Ur,tryDirectoryExists:()=>tryDirectoryExists,tryExtractTSExtension:()=>dN,tryFileExists:()=>tryFileExists,tryGetClassExtendingExpressionWithTypeArguments:()=>_S,tryGetClassImplementingOrExtendingExpressionWithTypeArguments:()=>cS,tryGetDirectories:()=>tryGetDirectories,tryGetExtensionFromPath:()=>nb,tryGetImportFromModuleSpecifier:()=>_3,tryGetJSDocSatisfiesTypeNode:()=>ox,tryGetModuleNameFromFile:()=>N8,tryGetModuleSpecifierFromDeclaration:()=>AP,tryGetNativePerformanceHooks:()=>ME,tryGetPropertyAccessOrIdentifierToString:()=>U0,tryGetPropertyNameOfBindingOrAssignmentElement:()=>M8,tryGetSourceMappingURL:()=>tryGetSourceMappingURL,tryGetTextOfPropertyName:()=>n2,tryIOAndConsumeErrors:()=>tryIOAndConsumeErrors,tryParsePattern:()=>VS,tryParsePatterns:()=>eM,tryParseRawSourceMap:()=>tryParseRawSourceMap,tryReadDirectory:()=>tryReadDirectory,tryReadFile:()=>tryReadFile,tryRemoveDirectoryPrefix:()=>UO,tryRemoveExtension:()=>zS,tryRemovePrefix:()=>Lv,tryRemoveSuffix:()=>hE,typeAcquisitionDeclarations:()=>typeAcquisitionDeclarations,typeAliasNamePart:()=>typeAliasNamePart,typeDirectiveIsEqualTo:()=>gk,typeKeywords:()=>typeKeywords,typeParameterNamePart:()=>typeParameterNamePart,typeReferenceResolutionNameAndModeGetter:()=>typeReferenceResolutionNameAndModeGetter,typeToDisplayParts:()=>typeToDisplayParts,unchangedPollThresholds:()=>unchangedPollThresholds,unchangedTextChangeRange:()=>Yg,unescapeLeadingUnderscores:()=>Go,unmangleScopedPackageName:()=>unmangleScopedPackageName,unorderedRemoveItem:()=>Ov,unorderedRemoveItemAt:()=>mg,unreachableCodeIsError:()=>vO,unusedLabelIsError:()=>TO,unwrapInnermostStatementOfLabel:()=>OD,updateErrorForNoInputFiles:()=>updateErrorForNoInputFiles,updateLanguageServiceSourceFile:()=>_7,updateMissingFilePathsWatch:()=>updateMissingFilePathsWatch,updatePackageJsonWatch:()=>updatePackageJsonWatch,updateResolutionField:()=>updateResolutionField,updateSharedExtendedConfigFileWatcher:()=>updateSharedExtendedConfigFileWatcher,updateSourceFile:()=>Yb,updateWatchingWildcardDirectories:()=>updateWatchingWildcardDirectories,usesExtensionsOnImports:()=>qS,usingSingleLineStringWriter:()=>pk,utf16EncodeAsString:()=>Of,validateLocaleAndSetLanguage:()=>EC,valuesHelper:()=>valuesHelper,version:()=>Gf,versionMajorMinor:()=>Rd,visitArray:()=>visitArray,visitCommaListElements:()=>visitCommaListElements,visitEachChild:()=>visitEachChild,visitFunctionBody:()=>visitFunctionBody,visitIterationBody:()=>visitIterationBody,visitLexicalEnvironment:()=>visitLexicalEnvironment,visitNode:()=>visitNode,visitNodes:()=>visitNodes2,visitParameterList:()=>visitParameterList,walkUpBindingElementsAndPatterns:()=>w4,walkUpLexicalEnvironments:()=>walkUpLexicalEnvironments,walkUpOuterExpressions:()=>eR,walkUpParenthesizedExpressions:()=>y3,walkUpParenthesizedTypes:()=>VP,walkUpParenthesizedTypesAndGetParentAndChild:()=>HP,whitespaceOrMapCommentRegExp:()=>whitespaceOrMapCommentRegExp,writeCommentRange:()=>XI,writeFile:()=>JI,writeFileEnsuringDirectories:()=>RI,zipWith:()=>iy});var uv=It({"src/typescript/_namespaces/ts.ts"(){"use strict";En(),Kb(),S7(),KF(),ZF()}}),eB=Z5({"src/typescript/typescript.ts"(e,t){uv(),uv(),typeof console<"u"&&(I.loggingHost={log(n,a){switch(n){case 1:return console.error(a);case 2:return console.warn(a);case 3:return console.log(a);case 4:return console.log(a)}}}),t.exports=D7}});P7.exports=eB()});var t6=mt(I7=>{I7.typescriptVersionIsAtLeast=new Proxy({},{get:()=>!0})});var n6=mt(li=>{"use strict";var tB=li&&li.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),nB=li&&li.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),rB=li&&li.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&tB(t,e,n);return nB(t,e),t};Object.defineProperty(li,"__esModule",{value:!0});li.getDecorators=li.getModifiers=void 0;var z_=rB(lt()),iB=t6(),N7=iB.typescriptVersionIsAtLeast["4.8"];function aB(e,t=!1){var n;if(e!=null){if(N7){if(t||z_.canHaveModifiers(e)){let a=z_.getModifiers(e);return a?Array.from(a):void 0}return}return(n=e.modifiers)==null?void 0:n.filter(a=>!z_.isDecorator(a))}}li.getModifiers=aB;function oB(e,t=!1){var n;if(e!=null){if(N7){if(t||z_.canHaveDecorators(e)){let a=z_.getDecorators(e);return a?Array.from(a):void 0}return}return(n=e.decorators)==null?void 0:n.filter(z_.isDecorator)}}li.getDecorators=oB});var M7=mt(O7=>{O7.xhtmlEntities={}});var r6=mt(W_=>{"use strict";Object.defineProperty(W_,"__esModule",{value:!0});W_.AST_TOKEN_TYPES=W_.AST_NODE_TYPES=void 0;var L7;(function(e){e.AccessorProperty="AccessorProperty",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.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.ImportAttribute="ImportAttribute",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.JSXNamespacedName="JSXNamespacedName",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.PrivateIdentifier="PrivateIdentifier",e.Program="Program",e.Property="Property",e.PropertyDefinition="PropertyDefinition",e.RestElement="RestElement",e.ReturnStatement="ReturnStatement",e.SequenceExpression="SequenceExpression",e.SpreadElement="SpreadElement",e.StaticBlock="StaticBlock",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.TSAbstractAccessorProperty="TSAbstractAccessorProperty",e.TSAbstractKeyword="TSAbstractKeyword",e.TSAbstractMethodDefinition="TSAbstractMethodDefinition",e.TSAbstractPropertyDefinition="TSAbstractPropertyDefinition",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.TSInstantiationExpression="TSInstantiationExpression",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.TSIntrinsicKeyword="TSIntrinsicKeyword",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.TSPrivateKeyword="TSPrivateKeyword",e.TSPropertySignature="TSPropertySignature",e.TSProtectedKeyword="TSProtectedKeyword",e.TSPublicKeyword="TSPublicKeyword",e.TSQualifiedName="TSQualifiedName",e.TSReadonlyKeyword="TSReadonlyKeyword",e.TSRestType="TSRestType",e.TSSatisfiesExpression="TSSatisfiesExpression",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"})(L7||(W_.AST_NODE_TYPES=L7={}));var J7;(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"})(J7||(W_.AST_TOKEN_TYPES=J7={}))});var j7=mt(R7=>{"use strict";Object.defineProperty(R7,"__esModule",{value:!0})});var B7=mt(F7=>{"use strict";Object.defineProperty(F7,"__esModule",{value:!0})});var U7=mt(ea=>{"use strict";var sB=ea&&ea.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),_B=ea&&ea.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cB=ea&&ea.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&sB(t,e,n);return _B(t,e),t};Object.defineProperty(ea,"__esModule",{value:!0});ea.TSESTree=void 0;ea.TSESTree=cB(r6())});var z7=mt(Vr=>{"use strict";var lB=Vr&&Vr.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),i6=Vr&&Vr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&lB(t,e,n)};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.AST_TOKEN_TYPES=Vr.AST_NODE_TYPES=void 0;var q7=r6();Object.defineProperty(Vr,"AST_NODE_TYPES",{enumerable:!0,get:function(){return q7.AST_NODE_TYPES}});Object.defineProperty(Vr,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return q7.AST_TOKEN_TYPES}});i6(j7(),Vr);i6(B7(),Vr);i6(U7(),Vr)});var V7=mt(W7=>{"use strict";Object.defineProperty(W7,"__esModule",{value:!0})});var G7=mt(H7=>{"use strict";Object.defineProperty(H7,"__esModule",{value:!0})});var zm=mt(Sr=>{"use strict";var uB=Sr&&Sr.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),X7=Sr&&Sr.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&uB(t,e,n)};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.TSESTree=Sr.AST_TOKEN_TYPES=Sr.AST_NODE_TYPES=void 0;var a6=z7();Object.defineProperty(Sr,"AST_NODE_TYPES",{enumerable:!0,get:function(){return a6.AST_NODE_TYPES}});Object.defineProperty(Sr,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return a6.AST_TOKEN_TYPES}});Object.defineProperty(Sr,"TSESTree",{enumerable:!0,get:function(){return a6.TSESTree}});X7(V7(),Sr);X7(G7(),Sr)});var Hm=mt(he=>{"use strict";var pB=he&&he.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),fB=he&&he.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),dB=he&&he.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&pB(t,e,n);return fB(t,e),t};Object.defineProperty(he,"__esModule",{value:!0});he.getNamespaceModifiers=he.isValidAssignmentTarget=he.nodeCanBeDecorated=he.getContainingFunction=he.nodeIsPresent=he.isThisInTypeQuery=he.isThisIdentifier=he.identifierIsThisKeyword=he.firstDefined=he.nodeHasTokens=he.nodeHasIllegalDecorators=he.createError=he.TSError=he.convertTokens=he.convertToken=he.getTokenType=he.isChildUnwrappableOptionalChain=he.isChainExpression=he.isOptional=he.isComputedProperty=he.unescapeStringLiteralText=he.hasJSXAncestor=he.findFirstMatchingAncestor=he.findNextToken=he.getTSNodeAccessibility=he.getDeclarationKind=he.isJSXToken=he.getRange=he.canContainDirective=he.getLocFor=he.getLineAndCharacterFor=he.getBinaryExpressionType=he.isComment=he.isComma=he.getLastModifier=he.hasModifier=he.isESTreeClassMember=he.getTextForTokenKind=he.isESTreeBinaryOperator=he.isLogicalOperator=void 0;var Ve=dB(lt()),uu=n6(),mB=M7(),_n=zm(),hB=t6(),$7=hB.typescriptVersionIsAtLeast["5.0"],de=Ve.SyntaxKind,yB=new Set([de.BarBarToken,de.AmpersandAmpersandToken,de.QuestionQuestionToken]),gB=new Set([Ve.SyntaxKind.EqualsToken,Ve.SyntaxKind.PlusEqualsToken,Ve.SyntaxKind.MinusEqualsToken,Ve.SyntaxKind.AsteriskEqualsToken,Ve.SyntaxKind.AsteriskAsteriskEqualsToken,Ve.SyntaxKind.SlashEqualsToken,Ve.SyntaxKind.PercentEqualsToken,Ve.SyntaxKind.LessThanLessThanEqualsToken,Ve.SyntaxKind.GreaterThanGreaterThanEqualsToken,Ve.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken,Ve.SyntaxKind.AmpersandEqualsToken,Ve.SyntaxKind.BarEqualsToken,Ve.SyntaxKind.BarBarEqualsToken,Ve.SyntaxKind.AmpersandAmpersandEqualsToken,Ve.SyntaxKind.QuestionQuestionEqualsToken,Ve.SyntaxKind.CaretEqualsToken]),bB=new Set([de.InstanceOfKeyword,de.InKeyword,de.AsteriskAsteriskToken,de.AsteriskToken,de.SlashToken,de.PercentToken,de.PlusToken,de.MinusToken,de.AmpersandToken,de.BarToken,de.CaretToken,de.LessThanLessThanToken,de.GreaterThanGreaterThanToken,de.GreaterThanGreaterThanGreaterThanToken,de.AmpersandAmpersandToken,de.BarBarToken,de.LessThanToken,de.LessThanEqualsToken,de.GreaterThanToken,de.GreaterThanEqualsToken,de.EqualsEqualsToken,de.EqualsEqualsEqualsToken,de.ExclamationEqualsEqualsToken,de.ExclamationEqualsToken]);function vB(e){return gB.has(e.kind)}function Q7(e){return yB.has(e.kind)}he.isLogicalOperator=Q7;function Y7(e){return bB.has(e.kind)}he.isESTreeBinaryOperator=Y7;function Wm(e){return Ve.tokenToString(e)}he.getTextForTokenKind=Wm;function TB(e){return e.kind!==de.SemicolonClassElement}he.isESTreeClassMember=TB;function K7(e,t){let n=(0,uu.getModifiers)(t);return(n==null?void 0:n.some(a=>a.kind===e))===!0}he.hasModifier=K7;function SB(e){let t=(0,uu.getModifiers)(e);return t==null?null:t[t.length-1]??null}he.getLastModifier=SB;function xB(e){return e.kind===de.CommaToken}he.isComma=xB;function Z7(e){return e.kind===de.SingleLineCommentTrivia||e.kind===de.MultiLineCommentTrivia}he.isComment=Z7;function wB(e){return e.kind===de.JSDocComment}function EB(e){if(vB(e))return{type:_n.AST_NODE_TYPES.AssignmentExpression,operator:Wm(e.kind)};if(Q7(e))return{type:_n.AST_NODE_TYPES.LogicalExpression,operator:Wm(e.kind)};if(Y7(e))return{type:_n.AST_NODE_TYPES.BinaryExpression,operator:Wm(e.kind)};throw new Error(`Unexpected binary operator ${Ve.tokenToString(e.kind)}`)}he.getBinaryExpressionType=EB;function ew(e,t){let n=t.getLineAndCharacterOfPosition(e);return{line:n.line+1,column:n.character}}he.getLineAndCharacterFor=ew;function tw(e,t){let[n,a]=e.map(_=>ew(_,t));return{start:n,end:a}}he.getLocFor=tw;function CB(e){if(e.kind===Ve.SyntaxKind.Block)switch(e.parent.kind){case Ve.SyntaxKind.Constructor:case Ve.SyntaxKind.GetAccessor:case Ve.SyntaxKind.SetAccessor:case Ve.SyntaxKind.ArrowFunction:case Ve.SyntaxKind.FunctionExpression:case Ve.SyntaxKind.FunctionDeclaration:case Ve.SyntaxKind.MethodDeclaration:return!0;default:return!1}return!0}he.canContainDirective=CB;function AB(e,t){return[e.getStart(t),e.getEnd()]}he.getRange=AB;function kB(e){return e.kind>=de.FirstToken&&e.kind<=de.LastToken}function o6(e){return e.kind>=de.JsxElement&&e.kind<=de.JsxAttribute}he.isJSXToken=o6;function DB(e){return e.flags&Ve.NodeFlags.Let?"let":(e.flags&Ve.NodeFlags.AwaitUsing)===Ve.NodeFlags.AwaitUsing?"await using":e.flags&Ve.NodeFlags.Const?"const":e.flags&Ve.NodeFlags.Using?"using":"var"}he.getDeclarationKind=DB;function PB(e){let t=(0,uu.getModifiers)(e);if(t!=null)for(let n of t)switch(n.kind){case de.PublicKeyword:return"public";case de.ProtectedKeyword:return"protected";case de.PrivateKeyword:return"private";default:break}}he.getTSNodeAccessibility=PB;function IB(e,t,n){return a(t);function a(_){return Ve.isToken(_)&&_.pos===e.end?_:_w(_.getChildren(n),p=>(p.pos<=e.pos&&p.end>e.end||p.pos===e.end)&&sw(p,n)?a(p):void 0)}}he.findNextToken=IB;function nw(e,t){let n=e;for(;n;){if(t(n))return n;n=n.parent}}he.findFirstMatchingAncestor=nw;function rw(e){return!!nw(e,o6)}he.hasJSXAncestor=rw;function NB(e){return e.replace(/&(?:#\d+|#x[\da-fA-F]+|[0-9a-zA-Z]+);/g,t=>{let n=t.slice(1,-1);if(n[0]==="#"){let a=n[1]==="x"?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return a>1114111?t:String.fromCodePoint(a)}return mB.xhtmlEntities[n]||t})}he.unescapeStringLiteralText=NB;function OB(e){return e.kind===de.ComputedPropertyName}he.isComputedProperty=OB;function MB(e){return!!e.questionToken}he.isOptional=MB;function iw(e){return e.type===_n.AST_NODE_TYPES.ChainExpression}he.isChainExpression=iw;function LB(e,t){return iw(t)&&e.expression.kind!==Ve.SyntaxKind.ParenthesizedExpression}he.isChildUnwrappableOptionalChain=LB;function aw(e){let t;if($7&&e.kind===de.Identifier?t=Ve.identifierToKeywordKind(e):"originalKeywordKind"in e&&(t=e.originalKeywordKind),t)return t===de.NullKeyword?_n.AST_TOKEN_TYPES.Null:t>=de.FirstFutureReservedWord&&t<=de.LastKeyword?_n.AST_TOKEN_TYPES.Identifier:_n.AST_TOKEN_TYPES.Keyword;if(e.kind>=de.FirstKeyword&&e.kind<=de.LastFutureReservedWord)return e.kind===de.FalseKeyword||e.kind===de.TrueKeyword?_n.AST_TOKEN_TYPES.Boolean:_n.AST_TOKEN_TYPES.Keyword;if(e.kind>=de.FirstPunctuation&&e.kind<=de.LastPunctuation)return _n.AST_TOKEN_TYPES.Punctuator;if(e.kind>=de.NoSubstitutionTemplateLiteral&&e.kind<=de.TemplateTail)return _n.AST_TOKEN_TYPES.Template;switch(e.kind){case de.NumericLiteral:return _n.AST_TOKEN_TYPES.Numeric;case de.JsxText:return _n.AST_TOKEN_TYPES.JSXText;case de.StringLiteral:return e.parent.kind===de.JsxAttribute||e.parent.kind===de.JsxElement?_n.AST_TOKEN_TYPES.JSXText:_n.AST_TOKEN_TYPES.String;case de.RegularExpressionLiteral:return _n.AST_TOKEN_TYPES.RegularExpression;case de.Identifier:case de.ConstructorKeyword:case de.GetKeyword:case de.SetKeyword:default:}return e.kind===de.Identifier&&(o6(e.parent)||e.parent.kind===de.PropertyAccessExpression&&rw(e))?_n.AST_TOKEN_TYPES.JSXIdentifier:_n.AST_TOKEN_TYPES.Identifier}he.getTokenType=aw;function ow(e,t){let n=e.kind===de.JsxText?e.getFullStart():e.getStart(t),a=e.getEnd(),_=t.text.slice(n,a),p=aw(e),m=[n,a],y=tw(m,t);return p===_n.AST_TOKEN_TYPES.RegularExpression?{type:p,value:_,range:m,loc:y,regex:{pattern:_.slice(1,_.lastIndexOf("/")),flags:_.slice(_.lastIndexOf("/")+1)}}:{type:p,value:_,range:m,loc:y}}he.convertToken=ow;function JB(e){let t=[];function n(a){Z7(a)||wB(a)||(kB(a)&&a.kind!==de.EndOfFileToken?t.push(ow(a,e)):a.getChildren(e).forEach(n))}return n(e),t}he.convertTokens=JB;var Vm=class extends Error{constructor(t,n,a){super(t),this.fileName=n,this.location=a,Object.defineProperty(this,"name",{value:new.target.name,enumerable:!1,configurable:!0})}get index(){return this.location.start.offset}get lineNumber(){return this.location.start.line}get column(){return this.location.start.column}};he.TSError=Vm;function RB(e,t,n,a=n){let[_,p]=[n,a].map(m=>{let{line:y,character:u}=t.getLineAndCharacterOfPosition(m);return{line:y+1,column:u,offset:m}});return new Vm(e,t.fileName,{start:_,end:p})}he.createError=RB;function jB(e){var t;return!!("illegalDecorators"in e&&((t=e.illegalDecorators)!=null&&t.length))}he.nodeHasIllegalDecorators=jB;function sw(e,t){return e.kind===de.EndOfFileToken?!!e.jsDoc:e.getWidth(t)!==0}he.nodeHasTokens=sw;function _w(e,t){if(e!==void 0)for(let n=0;n=0&&e.kind!==de.EndOfFileToken}function UB(e){return!BB(e)}he.nodeIsPresent=UB;function qB(e){return Ve.findAncestor(e.parent,Ve.isFunctionLike)}he.getContainingFunction=qB;function zB(e){return K7(de.AbstractKeyword,e)}function WB(e){if(e.parameters.length&&!Ve.isJSDocSignature(e)){let t=e.parameters[0];if(VB(t))return t}return null}function VB(e){return s6(e.name)}function HB(e){switch(e.kind){case de.ClassDeclaration:return!0;case de.ClassExpression:return!0;case de.PropertyDeclaration:{let{parent:t}=e;return!!(Ve.isClassDeclaration(t)||Ve.isClassLike(t)&&!zB(e))}case de.GetAccessor:case de.SetAccessor:case de.MethodDeclaration:{let{parent:t}=e;return!!e.body&&(Ve.isClassDeclaration(t)||Ve.isClassLike(t))}case de.Parameter:{let{parent:t}=e,n=t.parent;return!!t&&"body"in t&&!!t.body&&(t.kind===de.Constructor||t.kind===de.MethodDeclaration||t.kind===de.SetAccessor)&&WB(t)!==e&&!!n&&n.kind===de.ClassDeclaration}}return!1}he.nodeCanBeDecorated=HB;function lw(e){switch(e.kind){case de.Identifier:return!0;case de.PropertyAccessExpression:case de.ElementAccessExpression:return!(e.flags&Ve.NodeFlags.OptionalChain);case de.ParenthesizedExpression:case de.TypeAssertionExpression:case de.AsExpression:case de.SatisfiesExpression:case de.NonNullExpression:return lw(e.expression);default:return!1}}he.isValidAssignmentTarget=lw;function GB(e){let t=(0,uu.getModifiers)(e),n=e;for(;(!t||t.length===0)&&Ve.isModuleDeclaration(n.parent);){let a=(0,uu.getModifiers)(n.parent);a!=null&&a.length&&(t=a),n=n.parent}return t}he.getNamespaceModifiers=GB});var c6=mt(xr=>{"use strict";var XB=xr&&xr.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),$B=xr&&xr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),QB=xr&&xr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&XB(t,e,n);return $B(t,e),t},Ce=xr&&xr.__classPrivateFieldGet||function(e,t,n,a){if(n==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?a:n==="a"?a.call(e):a?a.value:t.get(e)},we,uw,dn,Gn,rt,pw;Object.defineProperty(xr,"__esModule",{value:!0});xr.Converter=xr.convertError=void 0;var it=QB(lt()),ta=n6(),le=Hm(),L=zm(),C=it.SyntaxKind;function YB(e){return(0,le.createError)("message"in e&&e.message||e.messageText,e.file,e.start)}xr.convertError=YB;var _6=class{constructor(t,n){we.add(this),this.esTreeNodeToTSNodeMap=new WeakMap,this.tsNodeToESTreeNodeMap=new WeakMap,this.allowPattern=!1,this.ast=t,this.options={...n}}getASTMaps(){return{esTreeNodeToTSNodeMap:this.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:this.tsNodeToESTreeNodeMap}}convertProgram(){return this.converter(this.ast)}converter(t,n,a){if(!t)return null;Ce(this,we,"m",uw).call(this,t);let _=this.allowPattern;a!==void 0&&(this.allowPattern=a);let p=this.convertNode(t,n??t.parent);return this.registerTSNodeInNodeMap(t,p),this.allowPattern=_,p}fixExports(t,n){let _=it.isModuleDeclaration(t)&&!!(t.flags&it.NodeFlags.Namespace)?(0,le.getNamespaceModifiers)(t):(0,ta.getModifiers)(t);if((_==null?void 0:_[0].kind)===C.ExportKeyword){this.registerTSNodeInNodeMap(t,n);let p=_[0],m=_[1],y=(m==null?void 0:m.kind)===C.DefaultKeyword,u=y?(0,le.findNextToken)(m,this.ast,this.ast):(0,le.findNextToken)(p,this.ast,this.ast);if(n.range[0]=u.getStart(this.ast),n.loc=(0,le.getLocFor)(n.range,this.ast),y)return this.createNode(t,{type:L.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:n,range:[p.getStart(this.ast),n.range[1]],exportKind:"value"});let x=n.type===L.AST_NODE_TYPES.TSInterfaceDeclaration||n.type===L.AST_NODE_TYPES.TSTypeAliasDeclaration,d="declare"in n&&n.declare;return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.ExportNamedDeclaration,declaration:n,specifiers:[],source:null,exportKind:x||d?"type":"value",range:[p.getStart(this.ast),n.range[1]],attributes:[]},"assertions","attributes",!0))}return n}registerTSNodeInNodeMap(t,n){n&&this.options.shouldPreserveNodeMaps&&(this.tsNodeToESTreeNodeMap.has(t)||this.tsNodeToESTreeNodeMap.set(t,n))}convertPattern(t,n){return this.converter(t,n,!0)}convertChild(t,n){return this.converter(t,n,!1)}createNode(t,n){let a=n;return a.range??(a.range=(0,le.getRange)(t,this.ast)),a.loc??(a.loc=(0,le.getLocFor)(a.range,this.ast)),a&&this.options.shouldPreserveNodeMaps&&this.esTreeNodeToTSNodeMap.set(a,t),a}convertBindingNameWithTypeAnnotation(t,n,a){let _=this.convertPattern(t);return n&&(_.typeAnnotation=this.convertTypeAnnotation(n,a),this.fixParentLocation(_,_.typeAnnotation.range)),_}convertTypeAnnotation(t,n){let a=(n==null?void 0:n.kind)===C.FunctionType||(n==null?void 0:n.kind)===C.ConstructorType?2:1,p=[t.getFullStart()-a,t.end],m=(0,le.getLocFor)(p,this.ast);return{type:L.AST_NODE_TYPES.TSTypeAnnotation,loc:m,range:p,typeAnnotation:this.convertChild(t)}}convertBodyExpressions(t,n){let a=(0,le.canContainDirective)(n);return t.map(_=>{let p=this.convertChild(_);if(a){if(p!=null&&p.expression&&it.isExpressionStatement(_)&&it.isStringLiteral(_.expression)){let m=p.expression.raw;return p.directive=m.slice(1,-1),p}a=!1}return p}).filter(_=>_)}convertTypeArgumentsToTypeParameterInstantiation(t,n){let a=(0,le.findNextToken)(t,this.ast,this.ast);return this.createNode(n,{type:L.AST_NODE_TYPES.TSTypeParameterInstantiation,range:[t.pos-1,a.end],params:t.map(_=>this.convertChild(_))})}convertTSTypeParametersToTypeParametersDeclaration(t){let n=(0,le.findNextToken)(t,this.ast,this.ast),a=[t.pos-1,n.end];return{type:L.AST_NODE_TYPES.TSTypeParameterDeclaration,range:a,loc:(0,le.getLocFor)(a,this.ast),params:t.map(_=>this.convertChild(_))}}convertParameters(t){return t!=null&&t.length?t.map(n=>{var _;let a=this.convertChild(n);return a.decorators=((_=(0,ta.getDecorators)(n))==null?void 0:_.map(p=>this.convertChild(p)))??[],a}):[]}convertChainExpression(t,n){let{child:a,isOptional:_}=t.type===L.AST_NODE_TYPES.MemberExpression?{child:t.object,isOptional:t.optional}:t.type===L.AST_NODE_TYPES.CallExpression?{child:t.callee,isOptional:t.optional}:{child:t.expression,isOptional:!1},p=(0,le.isChildUnwrappableOptionalChain)(n,a);if(!p&&!_)return t;if(p&&(0,le.isChainExpression)(a)){let m=a.expression;t.type===L.AST_NODE_TYPES.MemberExpression?t.object=m:t.type===L.AST_NODE_TYPES.CallExpression?t.callee=m:t.expression=m}return this.createNode(n,{type:L.AST_NODE_TYPES.ChainExpression,expression:t})}deeplyCopy(t){t.kind===it.SyntaxKind.JSDocFunctionType&&Ce(this,we,"m",rt).call(this,t,"JSDoc types can only be used inside documentation comments.");let n=`TS${C[t.kind]}`;if(this.options.errorOnUnknownASTType&&!L.AST_NODE_TYPES[n])throw new Error(`Unknown AST_NODE_TYPE: "${n}"`);let a=this.createNode(t,{type:n});"type"in t&&(a.typeAnnotation=t.type&&"kind"in t.type&&it.isTypeNode(t.type)?this.convertTypeAnnotation(t.type,t):null),"typeArguments"in t&&(a.typeArguments=t.typeArguments&&"pos"in t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null,Ce(this,we,"m",Gn).call(this,a,"typeParameters","typeArguments")),"typeParameters"in t&&(a.typeParameters=t.typeParameters&&"pos"in t.typeParameters?this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters):null);let _=(0,ta.getDecorators)(t);_!=null&&_.length&&(a.decorators=_.map(m=>this.convertChild(m)));let p=new Set(["_children","decorators","end","flags","illegalDecorators","heritageClauses","locals","localSymbol","jsDoc","kind","modifierFlagsCache","modifiers","nextContainer","parent","pos","symbol","transformFlags","type","typeArguments","typeParameters"]);return Object.entries(t).filter(([m])=>!p.has(m)).forEach(([m,y])=>{Array.isArray(y)?a[m]=y.map(u=>this.convertChild(u)):y&&typeof y=="object"&&y.kind?a[m]=this.convertChild(y):a[m]=y}),a}convertJSXIdentifier(t){let n=this.createNode(t,{type:L.AST_NODE_TYPES.JSXIdentifier,name:t.getText()});return this.registerTSNodeInNodeMap(t,n),n}convertJSXNamespaceOrIdentifier(t){if(t.kind===it.SyntaxKind.JsxNamespacedName){let _=this.createNode(t,{type:L.AST_NODE_TYPES.JSXNamespacedName,namespace:this.createNode(t.namespace,{type:L.AST_NODE_TYPES.JSXIdentifier,name:t.namespace.text}),name:this.createNode(t.name,{type:L.AST_NODE_TYPES.JSXIdentifier,name:t.name.text})});return this.registerTSNodeInNodeMap(t,_),_}let n=t.getText(),a=n.indexOf(":");if(a>0){let _=(0,le.getRange)(t,this.ast),p=this.createNode(t,{type:L.AST_NODE_TYPES.JSXNamespacedName,namespace:this.createNode(t,{type:L.AST_NODE_TYPES.JSXIdentifier,name:n.slice(0,a),range:[_[0],_[0]+a]}),name:this.createNode(t,{type:L.AST_NODE_TYPES.JSXIdentifier,name:n.slice(a+1),range:[_[0]+a+1,_[1]]}),range:_});return this.registerTSNodeInNodeMap(t,p),p}return this.convertJSXIdentifier(t)}convertJSXTagName(t,n){let a;switch(t.kind){case C.PropertyAccessExpression:t.name.kind===C.PrivateIdentifier&&Ce(this,we,"m",rt).call(this,t.name,"Non-private identifier expected."),a=this.createNode(t,{type:L.AST_NODE_TYPES.JSXMemberExpression,object:this.convertJSXTagName(t.expression,n),property:this.convertJSXIdentifier(t.name)});break;case C.ThisKeyword:case C.Identifier:default:return this.convertJSXNamespaceOrIdentifier(t)}return this.registerTSNodeInNodeMap(t,a),a}convertMethodSignature(t){return this.createNode(t,{type:L.AST_NODE_TYPES.TSMethodSignature,accessibility:(0,le.getTSNodeAccessibility)(t),computed:(0,le.isComputedProperty)(t.name),key:this.convertChild(t.name),kind:(()=>{switch(t.kind){case C.GetAccessor:return"get";case C.SetAccessor:return"set";case C.MethodSignature:return"method"}})(),optional:(0,le.isOptional)(t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}convertImportAttributes(t){return t===void 0?[]:t.elements.map(n=>this.convertChild(n))}fixParentLocation(t,n){n[0]t.range[1]&&(t.range[1]=n[1],t.loc.end=(0,le.getLineAndCharacterFor)(t.range[1],this.ast))}assertModuleSpecifier(t,n){var a;!n&&t.moduleSpecifier==null&&Ce(this,we,"m",dn).call(this,t,"Module specifier must be a string literal."),t.moduleSpecifier&&((a=t.moduleSpecifier)==null?void 0:a.kind)!==C.StringLiteral&&Ce(this,we,"m",dn).call(this,t.moduleSpecifier,"Module specifier must be a string literal.")}convertNode(t,n){var a,_,p,m,y,u,x;switch(t.kind){case C.SourceFile:return this.createNode(t,{type:L.AST_NODE_TYPES.Program,body:this.convertBodyExpressions(t.statements,t),comments:void 0,range:[t.getStart(this.ast),t.endOfFileToken.end],sourceType:t.externalModuleIndicator?"module":"script",tokens:void 0});case C.Block:return this.createNode(t,{type:L.AST_NODE_TYPES.BlockStatement,body:this.convertBodyExpressions(t.statements,t)});case C.Identifier:return(0,le.isThisInTypeQuery)(t)?this.createNode(t,{type:L.AST_NODE_TYPES.ThisExpression}):this.createNode(t,{type:L.AST_NODE_TYPES.Identifier,decorators:[],name:t.text,optional:!1,typeAnnotation:void 0});case C.PrivateIdentifier:return this.createNode(t,{type:L.AST_NODE_TYPES.PrivateIdentifier,name:t.text.slice(1)});case C.WithStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.WithStatement,object:this.convertChild(t.expression),body:this.convertChild(t.statement)});case C.ReturnStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ReturnStatement,argument:this.convertChild(t.expression)});case C.LabeledStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.LabeledStatement,label:this.convertChild(t.label),body:this.convertChild(t.statement)});case C.ContinueStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ContinueStatement,label:this.convertChild(t.label)});case C.BreakStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.BreakStatement,label:this.convertChild(t.label)});case C.IfStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.IfStatement,test:this.convertChild(t.expression),consequent:this.convertChild(t.thenStatement),alternate:this.convertChild(t.elseStatement)});case C.SwitchStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.SwitchStatement,discriminant:this.convertChild(t.expression),cases:t.caseBlock.clauses.map(d=>this.convertChild(d))});case C.CaseClause:case C.DefaultClause:return this.createNode(t,{type:L.AST_NODE_TYPES.SwitchCase,test:t.kind===C.CaseClause?this.convertChild(t.expression):null,consequent:t.statements.map(d=>this.convertChild(d))});case C.ThrowStatement:return t.expression.end===t.expression.pos&&Ce(this,we,"m",dn).call(this,t,"A throw statement must throw an expression."),this.createNode(t,{type:L.AST_NODE_TYPES.ThrowStatement,argument:this.convertChild(t.expression)});case C.TryStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.TryStatement,block:this.convertChild(t.tryBlock),handler:this.convertChild(t.catchClause),finalizer:this.convertChild(t.finallyBlock)});case C.CatchClause:return(a=t.variableDeclaration)!=null&&a.initializer&&Ce(this,we,"m",rt).call(this,t.variableDeclaration.initializer,"Catch clause variable cannot have an initializer."),this.createNode(t,{type:L.AST_NODE_TYPES.CatchClause,param:t.variableDeclaration?this.convertBindingNameWithTypeAnnotation(t.variableDeclaration.name,t.variableDeclaration.type):null,body:this.convertChild(t.block)});case C.WhileStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.WhileStatement,test:this.convertChild(t.expression),body:this.convertChild(t.statement)});case C.DoStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.DoWhileStatement,test:this.convertChild(t.expression),body:this.convertChild(t.statement)});case C.ForStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ForStatement,init:this.convertChild(t.initializer),test:this.convertChild(t.condition),update:this.convertChild(t.incrementor),body:this.convertChild(t.statement)});case C.ForInStatement:return Ce(this,we,"m",pw).call(this,t.initializer),this.createNode(t,{type:L.AST_NODE_TYPES.ForInStatement,left:this.convertPattern(t.initializer),right:this.convertChild(t.expression),body:this.convertChild(t.statement)});case C.ForOfStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ForOfStatement,left:this.convertPattern(t.initializer),right:this.convertChild(t.expression),body:this.convertChild(t.statement),await:!!(t.awaitModifier&&t.awaitModifier.kind===C.AwaitKeyword)});case C.FunctionDeclaration:{let d=(0,le.hasModifier)(C.DeclareKeyword,t),S=this.createNode(t,{type:d||!t.body?L.AST_NODE_TYPES.TSDeclareFunction:L.AST_NODE_TYPES.FunctionDeclaration,async:(0,le.hasModifier)(C.AsyncKeyword,t),body:this.convertChild(t.body)||void 0,declare:d,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,S)}case C.VariableDeclaration:return this.createNode(t,{type:L.AST_NODE_TYPES.VariableDeclarator,definite:!!t.exclamationToken,id:this.convertBindingNameWithTypeAnnotation(t.name,t.type,t),init:this.convertChild(t.initializer)});case C.VariableStatement:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.VariableDeclaration,declarations:t.declarationList.declarations.map(S=>this.convertChild(S)),declare:(0,le.hasModifier)(C.DeclareKeyword,t),kind:(0,le.getDeclarationKind)(t.declarationList)});return d.declarations.length||Ce(this,we,"m",dn).call(this,t,"A variable declaration list must have at least one variable declarator."),(d.kind==="using"||d.kind==="await using")&&t.declarationList.declarations.forEach((S,T)=>{d.declarations[T].init==null&&Ce(this,we,"m",rt).call(this,S,`'${d.kind}' declarations must be initialized.`),d.declarations[T].id.type!==L.AST_NODE_TYPES.Identifier&&Ce(this,we,"m",rt).call(this,S.name,`'${d.kind}' declarations may not have binding patterns.`)}),this.fixExports(t,d)}case C.VariableDeclarationList:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.VariableDeclaration,declarations:t.declarations.map(S=>this.convertChild(S)),declare:!1,kind:(0,le.getDeclarationKind)(t)});return(d.kind==="using"||d.kind==="await using")&&t.declarations.forEach((S,T)=>{d.declarations[T].init!=null&&Ce(this,we,"m",rt).call(this,S,`'${d.kind}' declarations may not be initialized in for statement.`),d.declarations[T].id.type!==L.AST_NODE_TYPES.Identifier&&Ce(this,we,"m",rt).call(this,S.name,`'${d.kind}' declarations may not have binding patterns.`)}),d}case C.ExpressionStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.ExpressionStatement,directive:void 0,expression:this.convertChild(t.expression)});case C.ThisKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.ThisExpression});case C.ArrayLiteralExpression:return this.allowPattern?this.createNode(t,{type:L.AST_NODE_TYPES.ArrayPattern,decorators:[],elements:t.elements.map(d=>this.convertPattern(d)),optional:!1,typeAnnotation:void 0}):this.createNode(t,{type:L.AST_NODE_TYPES.ArrayExpression,elements:t.elements.map(d=>this.convertChild(d))});case C.ObjectLiteralExpression:{if(this.allowPattern)return this.createNode(t,{type:L.AST_NODE_TYPES.ObjectPattern,decorators:[],optional:!1,properties:t.properties.map(S=>this.convertPattern(S)),typeAnnotation:void 0});let d=[];for(let S of t.properties)(S.kind===C.GetAccessor||S.kind===C.SetAccessor||S.kind===C.MethodDeclaration)&&!S.body&&Ce(this,we,"m",dn).call(this,S.end-1,"'{' expected."),d.push(this.convertChild(S));return this.createNode(t,{type:L.AST_NODE_TYPES.ObjectExpression,properties:d})}case C.PropertyAssignment:{let{questionToken:d,exclamationToken:S}=t;return d&&Ce(this,we,"m",rt).call(this,d,"A property assignment cannot have a question token."),S&&Ce(this,we,"m",rt).call(this,S,"A property assignment cannot have an exclamation token."),this.createNode(t,{type:L.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:this.converter(t.initializer,t,this.allowPattern),computed:(0,le.isComputedProperty)(t.name),method:!1,optional:!1,shorthand:!1,kind:"init"})}case C.ShorthandPropertyAssignment:{let{modifiers:d,questionToken:S,exclamationToken:T}=t;return d&&Ce(this,we,"m",rt).call(this,d[0],"A shorthand property assignment cannot have modifiers."),S&&Ce(this,we,"m",rt).call(this,S,"A shorthand property assignment cannot have a question token."),T&&Ce(this,we,"m",rt).call(this,T,"A shorthand property assignment cannot have an exclamation token."),t.objectAssignmentInitializer?this.createNode(t,{type:L.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertPattern(t.name),optional:!1,right:this.convertChild(t.objectAssignmentInitializer),typeAnnotation:void 0}),computed:!1,method:!1,optional:!1,shorthand:!0,kind:"init"}):this.createNode(t,{type:L.AST_NODE_TYPES.Property,computed:!1,key:this.convertChild(t.name),kind:"init",method:!1,optional:!1,shorthand:!0,value:this.convertChild(t.name)})}case C.ComputedPropertyName:return this.convertChild(t.expression);case C.PropertyDeclaration:{let d=(0,le.hasModifier)(C.AbstractKeyword,t);d&&t.initializer&&Ce(this,we,"m",rt).call(this,t.initializer,"Abstract property cannot have an initializer.");let S=(0,le.hasModifier)(C.AccessorKeyword,t),T=S?d?L.AST_NODE_TYPES.TSAbstractAccessorProperty:L.AST_NODE_TYPES.AccessorProperty:d?L.AST_NODE_TYPES.TSAbstractPropertyDefinition:L.AST_NODE_TYPES.PropertyDefinition,A=this.convertChild(t.name);return this.createNode(t,{type:T,key:A,accessibility:(0,le.getTSNodeAccessibility)(t),value:d?null:this.convertChild(t.initializer),computed:(0,le.isComputedProperty)(t.name),static:(0,le.hasModifier)(C.StaticKeyword,t),readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),decorators:((_=(0,ta.getDecorators)(t))==null?void 0:_.map(N=>this.convertChild(N)))??[],declare:(0,le.hasModifier)(C.DeclareKeyword,t),override:(0,le.hasModifier)(C.OverrideKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t),optional:(A.type===L.AST_NODE_TYPES.Literal||t.name.kind===C.Identifier||t.name.kind===C.ComputedPropertyName||t.name.kind===C.PrivateIdentifier)&&!!t.questionToken,definite:!!t.exclamationToken})}case C.GetAccessor:case C.SetAccessor:if(t.parent.kind===C.InterfaceDeclaration||t.parent.kind===C.TypeLiteral)return this.convertMethodSignature(t);case C.MethodDeclaration:{let d=this.createNode(t,{type:t.body?L.AST_NODE_TYPES.FunctionExpression:L.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,id:null,generator:!!t.asteriskToken,expression:!1,async:(0,le.hasModifier)(C.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,range:[t.parameters.pos-1,t.end],params:[],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});d.typeParameters&&this.fixParentLocation(d,d.typeParameters.range);let S;if(n.kind===C.ObjectLiteralExpression)d.params=t.parameters.map(T=>this.convertChild(T)),S=this.createNode(t,{type:L.AST_NODE_TYPES.Property,key:this.convertChild(t.name),value:d,computed:(0,le.isComputedProperty)(t.name),optional:!!t.questionToken,method:t.kind===C.MethodDeclaration,shorthand:!1,kind:"init"});else{d.params=this.convertParameters(t.parameters);let T=(0,le.hasModifier)(C.AbstractKeyword,t)?L.AST_NODE_TYPES.TSAbstractMethodDefinition:L.AST_NODE_TYPES.MethodDefinition;S=this.createNode(t,{type:T,accessibility:(0,le.getTSNodeAccessibility)(t),computed:(0,le.isComputedProperty)(t.name),decorators:((p=(0,ta.getDecorators)(t))==null?void 0:p.map(A=>this.convertChild(A)))??[],key:this.convertChild(t.name),kind:"method",optional:!!t.questionToken,override:(0,le.hasModifier)(C.OverrideKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t),value:d})}return t.kind===C.GetAccessor?S.kind="get":t.kind===C.SetAccessor?S.kind="set":!S.static&&t.name.kind===C.StringLiteral&&t.name.text==="constructor"&&S.type!==L.AST_NODE_TYPES.Property&&(S.kind="constructor"),S}case C.Constructor:{let d=(0,le.getLastModifier)(t),S=(d&&(0,le.findNextToken)(d,t,this.ast))??t.getFirstToken(),T=this.createNode(t,{type:t.body?L.AST_NODE_TYPES.FunctionExpression:L.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,async:!1,body:this.convertChild(t.body),declare:!1,expression:!1,generator:!1,id:null,params:this.convertParameters(t.parameters),range:[t.parameters.pos-1,t.end],returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});T.typeParameters&&this.fixParentLocation(T,T.typeParameters.range);let A=this.createNode(t,{type:L.AST_NODE_TYPES.Identifier,decorators:[],name:"constructor",optional:!1,range:[S.getStart(this.ast),S.end],typeAnnotation:void 0}),N=(0,le.hasModifier)(C.StaticKeyword,t);return this.createNode(t,{type:(0,le.hasModifier)(C.AbstractKeyword,t)?L.AST_NODE_TYPES.TSAbstractMethodDefinition:L.AST_NODE_TYPES.MethodDefinition,accessibility:(0,le.getTSNodeAccessibility)(t),computed:!1,decorators:[],optional:!1,key:A,kind:N?"method":"constructor",override:!1,static:N,value:T})}case C.FunctionExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.FunctionExpression,async:(0,le.hasModifier)(C.AsyncKeyword,t),body:this.convertChild(t.body),declare:!1,expression:!1,generator:!!t.asteriskToken,id:this.convertChild(t.name),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case C.SuperKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.Super});case C.ArrayBindingPattern:return this.createNode(t,{type:L.AST_NODE_TYPES.ArrayPattern,decorators:[],elements:t.elements.map(d=>this.convertPattern(d)),optional:!1,typeAnnotation:void 0});case C.OmittedExpression:return null;case C.ObjectBindingPattern:return this.createNode(t,{type:L.AST_NODE_TYPES.ObjectPattern,decorators:[],optional:!1,properties:t.elements.map(d=>this.convertPattern(d)),typeAnnotation:void 0});case C.BindingElement:{if(n.kind===C.ArrayBindingPattern){let S=this.convertChild(t.name,n);return t.initializer?this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:S,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}):t.dotDotDotToken?this.createNode(t,{type:L.AST_NODE_TYPES.RestElement,argument:S,decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):S}let d;return t.dotDotDotToken?d=this.createNode(t,{type:L.AST_NODE_TYPES.RestElement,argument:this.convertChild(t.propertyName??t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):d=this.createNode(t,{type:L.AST_NODE_TYPES.Property,key:this.convertChild(t.propertyName??t.name),value:this.convertChild(t.name),computed:!!(t.propertyName&&t.propertyName.kind===C.ComputedPropertyName),method:!1,optional:!1,shorthand:!t.propertyName,kind:"init"}),t.initializer&&(d.value=this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertChild(t.name),optional:!1,range:[t.name.getStart(this.ast),t.initializer.end],right:this.convertChild(t.initializer),typeAnnotation:void 0})),d}case C.ArrowFunction:return this.createNode(t,{type:L.AST_NODE_TYPES.ArrowFunctionExpression,generator:!1,id:null,params:this.convertParameters(t.parameters),body:this.convertChild(t.body),async:(0,le.hasModifier)(C.AsyncKeyword,t),expression:t.body.kind!==C.Block,returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case C.YieldExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.YieldExpression,delegate:!!t.asteriskToken,argument:this.convertChild(t.expression)});case C.AwaitExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.AwaitExpression,argument:this.convertChild(t.expression)});case C.NoSubstitutionTemplateLiteral:return this.createNode(t,{type:L.AST_NODE_TYPES.TemplateLiteral,quasis:[this.createNode(t,{type:L.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-1),cooked:t.text},tail:!0})],expressions:[]});case C.TemplateExpression:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TemplateLiteral,quasis:[this.convertChild(t.head)],expressions:[]});return t.templateSpans.forEach(S=>{d.expressions.push(this.convertChild(S.expression)),d.quasis.push(this.convertChild(S.literal))}),d}case C.TaggedTemplateExpression:return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.TaggedTemplateExpression,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),tag:this.convertChild(t.tag),quasi:this.convertChild(t.template)},"typeParameters","typeArguments"));case C.TemplateHead:case C.TemplateMiddle:case C.TemplateTail:{let d=t.kind===C.TemplateTail;return this.createNode(t,{type:L.AST_NODE_TYPES.TemplateElement,value:{raw:this.ast.text.slice(t.getStart(this.ast)+1,t.end-(d?1:2)),cooked:t.text},tail:d})}case C.SpreadAssignment:case C.SpreadElement:return this.allowPattern?this.createNode(t,{type:L.AST_NODE_TYPES.RestElement,argument:this.convertPattern(t.expression),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):this.createNode(t,{type:L.AST_NODE_TYPES.SpreadElement,argument:this.convertChild(t.expression)});case C.Parameter:{let d,S;return t.dotDotDotToken?d=S=this.createNode(t,{type:L.AST_NODE_TYPES.RestElement,argument:this.convertChild(t.name),decorators:[],optional:!1,typeAnnotation:void 0,value:void 0}):t.initializer?(d=this.convertChild(t.name),S=this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:d,optional:!1,right:this.convertChild(t.initializer),typeAnnotation:void 0}),(0,ta.getModifiers)(t)&&(S.range[0]=d.range[0],S.loc=(0,le.getLocFor)(S.range,this.ast))):d=S=this.convertChild(t.name,n),t.type&&(d.typeAnnotation=this.convertTypeAnnotation(t.type,t),this.fixParentLocation(d,d.typeAnnotation.range)),t.questionToken&&(t.questionToken.end>d.range[1]&&(d.range[1]=t.questionToken.end,d.loc.end=(0,le.getLineAndCharacterFor)(d.range[1],this.ast)),d.optional=!0),(0,ta.getModifiers)(t)?this.createNode(t,{type:L.AST_NODE_TYPES.TSParameterProperty,accessibility:(0,le.getTSNodeAccessibility)(t),decorators:[],override:(0,le.hasModifier)(C.OverrideKeyword,t),parameter:S,readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t)}):S}case C.ClassDeclaration:!t.name&&(!(0,le.hasModifier)(it.SyntaxKind.ExportKeyword,t)||!(0,le.hasModifier)(it.SyntaxKind.DefaultKeyword,t))&&Ce(this,we,"m",dn).call(this,t,"A class declaration without the 'default' modifier must have a name.");case C.ClassExpression:{let d=t.heritageClauses??[],S=t.kind===C.ClassDeclaration?L.AST_NODE_TYPES.ClassDeclaration:L.AST_NODE_TYPES.ClassExpression,T,A;for(let q of d){let{token:Q,types:se}=q;se.length===0&&Ce(this,we,"m",dn).call(this,q,`'${it.tokenToString(Q)}' list cannot be empty.`),Q===C.ExtendsKeyword?(T&&Ce(this,we,"m",dn).call(this,q,"'extends' clause already seen."),A&&Ce(this,we,"m",dn).call(this,q,"'extends' clause must precede 'implements' clause."),se.length>1&&Ce(this,we,"m",dn).call(this,se[1],"Classes can only extend a single class."),T??(T=q)):Q===C.ImplementsKeyword&&(A&&Ce(this,we,"m",dn).call(this,q,"'implements' clause already seen."),A??(A=q))}let N=this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:S,abstract:(0,le.hasModifier)(C.AbstractKeyword,t),body:this.createNode(t,{type:L.AST_NODE_TYPES.ClassBody,body:t.members.filter(le.isESTreeClassMember).map(q=>this.convertChild(q)),range:[t.members.pos-1,t.end]}),declare:(0,le.hasModifier)(C.DeclareKeyword,t),decorators:((m=(0,ta.getDecorators)(t))==null?void 0:m.map(q=>this.convertChild(q)))??[],id:this.convertChild(t.name),implements:(A==null?void 0:A.types.map(q=>this.convertChild(q)))??[],superClass:T!=null&&T.types[0]?this.convertChild(T.types[0].expression):null,superTypeArguments:void 0,typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)},"superTypeParameters","superTypeArguments"));return(y=T==null?void 0:T.types[0])!=null&&y.typeArguments&&(N.superTypeArguments=this.convertTypeArgumentsToTypeParameterInstantiation(T.types[0].typeArguments,T.types[0])),this.fixExports(t,N)}case C.ModuleBlock:return this.createNode(t,{type:L.AST_NODE_TYPES.TSModuleBlock,body:this.convertBodyExpressions(t.statements,t)});case C.ImportDeclaration:{this.assertModuleSpecifier(t,!1);let d=this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.ImportDeclaration,source:this.convertChild(t.moduleSpecifier),specifiers:[],importKind:"value",attributes:this.convertImportAttributes(t.attributes??t.assertClause)},"assertions","attributes",!0));if(t.importClause&&(t.importClause.isTypeOnly&&(d.importKind="type"),t.importClause.name&&d.specifiers.push(this.convertChild(t.importClause)),t.importClause.namedBindings))switch(t.importClause.namedBindings.kind){case C.NamespaceImport:d.specifiers.push(this.convertChild(t.importClause.namedBindings));break;case C.NamedImports:d.specifiers=d.specifiers.concat(t.importClause.namedBindings.elements.map(S=>this.convertChild(S)));break}return d}case C.NamespaceImport:return this.createNode(t,{type:L.AST_NODE_TYPES.ImportNamespaceSpecifier,local:this.convertChild(t.name)});case C.ImportSpecifier:return this.createNode(t,{type:L.AST_NODE_TYPES.ImportSpecifier,local:this.convertChild(t.name),imported:this.convertChild(t.propertyName??t.name),importKind:t.isTypeOnly?"type":"value"});case C.ImportClause:{let d=this.convertChild(t.name);return this.createNode(t,{type:L.AST_NODE_TYPES.ImportDefaultSpecifier,local:d,range:d.range})}case C.ExportDeclaration:return((u=t.exportClause)==null?void 0:u.kind)===C.NamedExports?(this.assertModuleSpecifier(t,!0),this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.ExportNamedDeclaration,source:this.convertChild(t.moduleSpecifier),specifiers:t.exportClause.elements.map(d=>this.convertChild(d)),exportKind:t.isTypeOnly?"type":"value",declaration:null,attributes:this.convertImportAttributes(t.attributes??t.assertClause)},"assertions","attributes",!0))):(this.assertModuleSpecifier(t,!1),this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.ExportAllDeclaration,source:this.convertChild(t.moduleSpecifier),exportKind:t.isTypeOnly?"type":"value",exported:((x=t.exportClause)==null?void 0:x.kind)===C.NamespaceExport?this.convertChild(t.exportClause.name):null,attributes:this.convertImportAttributes(t.attributes??t.assertClause)},"assertions","attributes",!0)));case C.ExportSpecifier:return this.createNode(t,{type:L.AST_NODE_TYPES.ExportSpecifier,local:this.convertChild(t.propertyName??t.name),exported:this.convertChild(t.name),exportKind:t.isTypeOnly?"type":"value"});case C.ExportAssignment:return t.isExportEquals?this.createNode(t,{type:L.AST_NODE_TYPES.TSExportAssignment,expression:this.convertChild(t.expression)}):this.createNode(t,{type:L.AST_NODE_TYPES.ExportDefaultDeclaration,declaration:this.convertChild(t.expression),exportKind:"value"});case C.PrefixUnaryExpression:case C.PostfixUnaryExpression:{let d=(0,le.getTextForTokenKind)(t.operator);return d==="++"||d==="--"?((0,le.isValidAssignmentTarget)(t.operand)||Ce(this,we,"m",dn).call(this,t.operand,"Invalid left-hand side expression in unary operation"),this.createNode(t,{type:L.AST_NODE_TYPES.UpdateExpression,operator:d,prefix:t.kind===C.PrefixUnaryExpression,argument:this.convertChild(t.operand)})):this.createNode(t,{type:L.AST_NODE_TYPES.UnaryExpression,operator:d,prefix:t.kind===C.PrefixUnaryExpression,argument:this.convertChild(t.operand)})}case C.DeleteExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.UnaryExpression,operator:"delete",prefix:!0,argument:this.convertChild(t.expression)});case C.VoidExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.UnaryExpression,operator:"void",prefix:!0,argument:this.convertChild(t.expression)});case C.TypeOfExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.UnaryExpression,operator:"typeof",prefix:!0,argument:this.convertChild(t.expression)});case C.TypeOperator:return this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeOperator,operator:(0,le.getTextForTokenKind)(t.operator),typeAnnotation:this.convertChild(t.type)});case C.BinaryExpression:{if((0,le.isComma)(t.operatorToken)){let S=this.createNode(t,{type:L.AST_NODE_TYPES.SequenceExpression,expressions:[]}),T=this.convertChild(t.left);return T.type===L.AST_NODE_TYPES.SequenceExpression&&t.left.kind!==C.ParenthesizedExpression?S.expressions=S.expressions.concat(T.expressions):S.expressions.push(T),S.expressions.push(this.convertChild(t.right)),S}let d=(0,le.getBinaryExpressionType)(t.operatorToken);return this.allowPattern&&d.type===L.AST_NODE_TYPES.AssignmentExpression?this.createNode(t,{type:L.AST_NODE_TYPES.AssignmentPattern,decorators:[],left:this.convertPattern(t.left,t),optional:!1,right:this.convertChild(t.right),typeAnnotation:void 0}):this.createNode(t,{...d,left:this.converter(t.left,t,d.type===L.AST_NODE_TYPES.AssignmentExpression),right:this.convertChild(t.right)})}case C.PropertyAccessExpression:{let d=this.convertChild(t.expression),S=this.convertChild(t.name),A=this.createNode(t,{type:L.AST_NODE_TYPES.MemberExpression,object:d,property:S,computed:!1,optional:t.questionDotToken!==void 0});return this.convertChainExpression(A,t)}case C.ElementAccessExpression:{let d=this.convertChild(t.expression),S=this.convertChild(t.argumentExpression),A=this.createNode(t,{type:L.AST_NODE_TYPES.MemberExpression,object:d,property:S,computed:!0,optional:t.questionDotToken!==void 0});return this.convertChainExpression(A,t)}case C.CallExpression:{if(t.expression.kind===C.ImportKeyword)return t.arguments.length!==1&&t.arguments.length!==2&&Ce(this,we,"m",dn).call(this,t.arguments[2]??t,"Dynamic import requires exactly one or two arguments."),this.createNode(t,{type:L.AST_NODE_TYPES.ImportExpression,source:this.convertChild(t.arguments[0]),attributes:t.arguments[1]?this.convertChild(t.arguments[1]):null});let d=this.convertChild(t.expression),S=t.arguments.map(N=>this.convertChild(N)),T=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),A=this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.CallExpression,callee:d,arguments:S,optional:t.questionDotToken!==void 0,typeArguments:T},"typeParameters","typeArguments"));return this.convertChainExpression(A,t)}case C.NewExpression:{let d=t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t);return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.NewExpression,arguments:t.arguments?t.arguments.map(S=>this.convertChild(S)):[],callee:this.convertChild(t.expression),typeArguments:d},"typeParameters","typeArguments"))}case C.ConditionalExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.ConditionalExpression,test:this.convertChild(t.condition),consequent:this.convertChild(t.whenTrue),alternate:this.convertChild(t.whenFalse)});case C.MetaProperty:return this.createNode(t,{type:L.AST_NODE_TYPES.MetaProperty,meta:this.createNode(t.getFirstToken(),{type:L.AST_NODE_TYPES.Identifier,decorators:[],name:(0,le.getTextForTokenKind)(t.keywordToken),optional:!1,typeAnnotation:void 0}),property:this.convertChild(t.name)});case C.Decorator:return this.createNode(t,{type:L.AST_NODE_TYPES.Decorator,expression:this.convertChild(t.expression)});case C.StringLiteral:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:n.kind===C.JsxAttribute?(0,le.unescapeStringLiteralText)(t.text):t.text,raw:t.getText()});case C.NumericLiteral:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:Number(t.text),raw:t.getText()});case C.BigIntLiteral:{let d=(0,le.getRange)(t,this.ast),S=this.ast.text.slice(d[0],d[1]),T=S.slice(0,-1).replace(/_/g,""),A=typeof BigInt<"u"?BigInt(T):null;return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,raw:S,value:A,bigint:A==null?T:String(A),range:d})}case C.RegularExpressionLiteral:{let d=t.text.slice(1,t.text.lastIndexOf("/")),S=t.text.slice(t.text.lastIndexOf("/")+1),T=null;try{T=new RegExp(d,S)}catch{}return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:T,raw:t.text,regex:{pattern:d,flags:S}})}case C.TrueKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:!0,raw:"true"});case C.FalseKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:!1,raw:"false"});case C.NullKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.Literal,value:null,raw:"null"});case C.EmptyStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.EmptyStatement});case C.DebuggerStatement:return this.createNode(t,{type:L.AST_NODE_TYPES.DebuggerStatement});case C.JsxElement:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXElement,openingElement:this.convertChild(t.openingElement),closingElement:this.convertChild(t.closingElement),children:t.children.map(d=>this.convertChild(d))});case C.JsxFragment:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXFragment,openingFragment:this.convertChild(t.openingFragment),closingFragment:this.convertChild(t.closingFragment),children:t.children.map(d=>this.convertChild(d))});case C.JsxSelfClosingElement:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXElement,openingElement:this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.JSXOpeningElement,typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):void 0,selfClosing:!0,name:this.convertJSXTagName(t.tagName,t),attributes:t.attributes.properties.map(d=>this.convertChild(d)),range:(0,le.getRange)(t,this.ast)},"typeParameters","typeArguments")),closingElement:null,children:[]});case C.JsxOpeningElement:return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.JSXOpeningElement,typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t),selfClosing:!1,name:this.convertJSXTagName(t.tagName,t),attributes:t.attributes.properties.map(d=>this.convertChild(d))},"typeParameters","typeArguments"));case C.JsxClosingElement:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXClosingElement,name:this.convertJSXTagName(t.tagName,t)});case C.JsxOpeningFragment:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXOpeningFragment});case C.JsxClosingFragment:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXClosingFragment});case C.JsxExpression:{let d=t.expression?this.convertChild(t.expression):this.createNode(t,{type:L.AST_NODE_TYPES.JSXEmptyExpression,range:[t.getStart(this.ast)+1,t.getEnd()-1]});return t.dotDotDotToken?this.createNode(t,{type:L.AST_NODE_TYPES.JSXSpreadChild,expression:d}):this.createNode(t,{type:L.AST_NODE_TYPES.JSXExpressionContainer,expression:d})}case C.JsxAttribute:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXAttribute,name:this.convertJSXNamespaceOrIdentifier(t.name),value:this.convertChild(t.initializer)});case C.JsxText:{let d=t.getFullStart(),S=t.getEnd(),T=this.ast.text.slice(d,S);return this.createNode(t,{type:L.AST_NODE_TYPES.JSXText,value:(0,le.unescapeStringLiteralText)(T),raw:T,range:[d,S]})}case C.JsxSpreadAttribute:return this.createNode(t,{type:L.AST_NODE_TYPES.JSXSpreadAttribute,argument:this.convertChild(t.expression)});case C.QualifiedName:return this.createNode(t,{type:L.AST_NODE_TYPES.TSQualifiedName,left:this.convertChild(t.left),right:this.convertChild(t.right)});case C.TypeReference:return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.TSTypeReference,typeName:this.convertChild(t.typeName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"));case C.TypeParameter:return this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeParameter,name:this.convertChild(t.name),constraint:t.constraint&&this.convertChild(t.constraint),default:t.default?this.convertChild(t.default):void 0,in:(0,le.hasModifier)(C.InKeyword,t),out:(0,le.hasModifier)(C.OutKeyword,t),const:(0,le.hasModifier)(C.ConstKeyword,t)});case C.ThisType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSThisType});case C.AnyKeyword:case C.BigIntKeyword:case C.BooleanKeyword:case C.NeverKeyword:case C.NumberKeyword:case C.ObjectKeyword:case C.StringKeyword:case C.SymbolKeyword:case C.UnknownKeyword:case C.VoidKeyword:case C.UndefinedKeyword:case C.IntrinsicKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES[`TS${C[t.kind]}`]});case C.NonNullExpression:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSNonNullExpression,expression:this.convertChild(t.expression)});return this.convertChainExpression(d,t)}case C.TypeLiteral:return this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeLiteral,members:t.members.map(d=>this.convertChild(d))});case C.ArrayType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSArrayType,elementType:this.convertChild(t.elementType)});case C.IndexedAccessType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSIndexedAccessType,objectType:this.convertChild(t.objectType),indexType:this.convertChild(t.indexType)});case C.ConditionalType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSConditionalType,checkType:this.convertChild(t.checkType),extendsType:this.convertChild(t.extendsType),trueType:this.convertChild(t.trueType),falseType:this.convertChild(t.falseType)});case C.TypeQuery:return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.TSTypeQuery,exprName:this.convertChild(t.exprName),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"));case C.MappedType:return t.members&&t.members.length>0&&Ce(this,we,"m",dn).call(this,t.members[0],"A mapped type may not declare properties or methods."),this.createNode(t,{type:L.AST_NODE_TYPES.TSMappedType,nameType:this.convertChild(t.nameType)??null,optional:t.questionToken&&(t.questionToken.kind===C.QuestionToken||(0,le.getTextForTokenKind)(t.questionToken.kind)),readonly:t.readonlyToken&&(t.readonlyToken.kind===C.ReadonlyKeyword||(0,le.getTextForTokenKind)(t.readonlyToken.kind)),typeAnnotation:t.type&&this.convertChild(t.type),typeParameter:this.convertChild(t.typeParameter)});case C.ParenthesizedExpression:return this.convertChild(t.expression,n);case C.TypeAliasDeclaration:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeAliasDeclaration,declare:(0,le.hasModifier)(C.DeclareKeyword,t),id:this.convertChild(t.name),typeAnnotation:this.convertChild(t.type),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,d)}case C.MethodSignature:return this.convertMethodSignature(t);case C.PropertySignature:{let{initializer:d}=t;return d&&Ce(this,we,"m",rt).call(this,d,"A property signature cannot have an initializer."),this.createNode(t,{type:L.AST_NODE_TYPES.TSPropertySignature,accessibility:(0,le.getTSNodeAccessibility)(t),computed:(0,le.isComputedProperty)(t.name),key:this.convertChild(t.name),optional:(0,le.isOptional)(t),readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)})}case C.IndexSignature:return this.createNode(t,{type:L.AST_NODE_TYPES.TSIndexSignature,accessibility:(0,le.getTSNodeAccessibility)(t),parameters:t.parameters.map(d=>this.convertChild(d)),readonly:(0,le.hasModifier)(C.ReadonlyKeyword,t),static:(0,le.hasModifier)(C.StaticKeyword,t),typeAnnotation:t.type&&this.convertTypeAnnotation(t.type,t)});case C.ConstructorType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSConstructorType,abstract:(0,le.hasModifier)(C.AbstractKeyword,t),params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});case C.FunctionType:{let{modifiers:d}=t;d&&Ce(this,we,"m",rt).call(this,d[0],"A function type cannot have modifiers.")}case C.ConstructSignature:case C.CallSignature:{let d=t.kind===C.ConstructSignature?L.AST_NODE_TYPES.TSConstructSignatureDeclaration:t.kind===C.CallSignature?L.AST_NODE_TYPES.TSCallSignatureDeclaration:L.AST_NODE_TYPES.TSFunctionType;return this.createNode(t,{type:d,params:this.convertParameters(t.parameters),returnType:t.type&&this.convertTypeAnnotation(t.type,t),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)})}case C.ExpressionWithTypeArguments:{let d=n.kind,S=d===C.InterfaceDeclaration?L.AST_NODE_TYPES.TSInterfaceHeritage:d===C.HeritageClause?L.AST_NODE_TYPES.TSClassImplements:L.AST_NODE_TYPES.TSInstantiationExpression;return this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:S,expression:this.convertChild(t.expression),typeArguments:t.typeArguments&&this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t)},"typeParameters","typeArguments"))}case C.InterfaceDeclaration:{let d=t.heritageClauses??[],S=[];for(let A of d){A.token!==C.ExtendsKeyword&&Ce(this,we,"m",rt).call(this,A,A.token===C.ImplementsKeyword?"Interface declaration cannot have 'implements' clause.":"Unexpected token.");for(let N of A.types)S.push(this.convertChild(N,t))}let T=this.createNode(t,{type:L.AST_NODE_TYPES.TSInterfaceDeclaration,body:this.createNode(t,{type:L.AST_NODE_TYPES.TSInterfaceBody,body:t.members.map(A=>this.convertChild(A)),range:[t.members.pos-1,t.end]}),declare:(0,le.hasModifier)(C.DeclareKeyword,t),extends:S,id:this.convertChild(t.name),typeParameters:t.typeParameters&&this.convertTSTypeParametersToTypeParametersDeclaration(t.typeParameters)});return this.fixExports(t,T)}case C.TypePredicate:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSTypePredicate,asserts:t.assertsModifier!==void 0,parameterName:this.convertChild(t.parameterName),typeAnnotation:null});return t.type&&(d.typeAnnotation=this.convertTypeAnnotation(t.type,t),d.typeAnnotation.loc=d.typeAnnotation.typeAnnotation.loc,d.typeAnnotation.range=d.typeAnnotation.typeAnnotation.range),d}case C.ImportType:{let d=(0,le.getRange)(t,this.ast);if(t.isTypeOf){let T=(0,le.findNextToken)(t.getFirstToken(),t,this.ast);d[0]=T.getStart(this.ast)}let S=this.createNode(t,Ce(this,we,"m",Gn).call(this,{type:L.AST_NODE_TYPES.TSImportType,argument:this.convertChild(t.argument),qualifier:this.convertChild(t.qualifier),typeArguments:t.typeArguments?this.convertTypeArgumentsToTypeParameterInstantiation(t.typeArguments,t):null,range:d},"typeParameters","typeArguments"));return t.isTypeOf?this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeQuery,exprName:S,typeArguments:void 0,typeParameters:void 0}):S}case C.EnumDeclaration:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSEnumDeclaration,const:(0,le.hasModifier)(C.ConstKeyword,t),declare:(0,le.hasModifier)(C.DeclareKeyword,t),id:this.convertChild(t.name),members:t.members.map(S=>this.convertChild(S))});return this.fixExports(t,d)}case C.EnumMember:return this.createNode(t,{type:L.AST_NODE_TYPES.TSEnumMember,computed:t.name.kind===it.SyntaxKind.ComputedPropertyName,id:this.convertChild(t.name),initializer:t.initializer&&this.convertChild(t.initializer)});case C.ModuleDeclaration:{let d=(0,le.hasModifier)(C.DeclareKeyword,t),S=this.createNode(t,{type:L.AST_NODE_TYPES.TSModuleDeclaration,...(()=>{if(t.flags&it.NodeFlags.GlobalAugmentation){let A=this.convertChild(t.name),N=this.convertChild(t.body);return(N==null||N.type===L.AST_NODE_TYPES.TSModuleDeclaration)&&Ce(this,we,"m",dn).call(this,t.body??t,"Expected a valid module body"),A.type!==L.AST_NODE_TYPES.Identifier&&Ce(this,we,"m",dn).call(this,t.name,"global module augmentation must have an Identifier id"),{kind:"global",body:N,declare:!1,global:!1,id:A}}if(!(t.flags&it.NodeFlags.Namespace)){let A=this.convertChild(t.body);return{kind:"module",...A!=null?{body:A}:{},declare:!1,global:!1,id:this.convertChild(t.name)}}t.body==null&&Ce(this,we,"m",dn).call(this,t,"Expected a module body"),t.name.kind!==it.SyntaxKind.Identifier&&Ce(this,we,"m",dn).call(this,t.name,"`namespace`s must have an Identifier id");let T=this.createNode(t.name,{decorators:[],name:t.name.text,optional:!1,range:[t.name.getStart(this.ast),t.name.getEnd()],type:L.AST_NODE_TYPES.Identifier,typeAnnotation:void 0});for(;t.body&&it.isModuleDeclaration(t.body)&&t.body.name;){t=t.body,d||(d=(0,le.hasModifier)(C.DeclareKeyword,t));let A=t.name,N=this.createNode(A,{decorators:[],name:A.text,optional:!1,range:[A.getStart(this.ast),A.getEnd()],type:L.AST_NODE_TYPES.Identifier,typeAnnotation:void 0});T=this.createNode(A,{left:T,right:N,range:[T.range[0],N.range[1]],type:L.AST_NODE_TYPES.TSQualifiedName})}return{kind:"namespace",body:this.convertChild(t.body),declare:!1,global:!1,id:T}})()});return S.declare=d,t.flags&it.NodeFlags.GlobalAugmentation&&(S.global=!0),this.fixExports(t,S)}case C.ParenthesizedType:return this.convertChild(t.type);case C.UnionType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSUnionType,types:t.types.map(d=>this.convertChild(d))});case C.IntersectionType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSIntersectionType,types:t.types.map(d=>this.convertChild(d))});case C.AsExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.TSAsExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});case C.InferType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSInferType,typeParameter:this.convertChild(t.typeParameter)});case C.LiteralType:return t.literal.kind===C.NullKeyword?this.createNode(t.literal,{type:L.AST_NODE_TYPES.TSNullKeyword}):this.createNode(t,{type:L.AST_NODE_TYPES.TSLiteralType,literal:this.convertChild(t.literal)});case C.TypeAssertionExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.TSTypeAssertion,typeAnnotation:this.convertChild(t.type),expression:this.convertChild(t.expression)});case C.ImportEqualsDeclaration:return this.fixExports(t,this.createNode(t,{type:L.AST_NODE_TYPES.TSImportEqualsDeclaration,id:this.convertChild(t.name),importKind:t.isTypeOnly?"type":"value",moduleReference:this.convertChild(t.moduleReference)}));case C.ExternalModuleReference:return this.createNode(t,{type:L.AST_NODE_TYPES.TSExternalModuleReference,expression:this.convertChild(t.expression)});case C.NamespaceExportDeclaration:return this.createNode(t,{type:L.AST_NODE_TYPES.TSNamespaceExportDeclaration,id:this.convertChild(t.name)});case C.AbstractKeyword:return this.createNode(t,{type:L.AST_NODE_TYPES.TSAbstractKeyword});case C.TupleType:{let d="elementTypes"in t?t.elementTypes.map(S=>this.convertChild(S)):t.elements.map(S=>this.convertChild(S));return this.createNode(t,{type:L.AST_NODE_TYPES.TSTupleType,elementTypes:d})}case C.NamedTupleMember:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSNamedTupleMember,elementType:this.convertChild(t.type,t),label:this.convertChild(t.name,t),optional:t.questionToken!=null});return t.dotDotDotToken?(d.range[0]=d.label.range[0],d.loc.start=d.label.loc.start,this.createNode(t,{type:L.AST_NODE_TYPES.TSRestType,typeAnnotation:d})):d}case C.OptionalType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSOptionalType,typeAnnotation:this.convertChild(t.type)});case C.RestType:return this.createNode(t,{type:L.AST_NODE_TYPES.TSRestType,typeAnnotation:this.convertChild(t.type)});case C.TemplateLiteralType:{let d=this.createNode(t,{type:L.AST_NODE_TYPES.TSTemplateLiteralType,quasis:[this.convertChild(t.head)],types:[]});return t.templateSpans.forEach(S=>{d.types.push(this.convertChild(S.type)),d.quasis.push(this.convertChild(S.literal))}),d}case C.ClassStaticBlockDeclaration:return this.createNode(t,{type:L.AST_NODE_TYPES.StaticBlock,body:this.convertBodyExpressions(t.body.statements,t)});case C.AssertEntry:case C.ImportAttribute:return this.createNode(t,{type:L.AST_NODE_TYPES.ImportAttribute,key:this.convertChild(t.name),value:this.convertChild(t.value)});case C.SatisfiesExpression:return this.createNode(t,{type:L.AST_NODE_TYPES.TSSatisfiesExpression,expression:this.convertChild(t.expression),typeAnnotation:this.convertChild(t.type)});default:return this.deeplyCopy(t)}}};xr.Converter=_6;we=new WeakSet,uw=function(t){if(!this.options.allowInvalidAST){(0,le.nodeHasIllegalDecorators)(t)&&Ce(this,we,"m",rt).call(this,t.illegalDecorators[0],"Decorators are not valid here.");for(let n of(0,ta.getDecorators)(t,!0)??[])(0,le.nodeCanBeDecorated)(t)||(it.isMethodDeclaration(t)&&!(0,le.nodeIsPresent)(t.body)?Ce(this,we,"m",rt).call(this,n,"A decorator can only decorate a method implementation, not an overload."):Ce(this,we,"m",rt).call(this,n,"Decorators are not valid here."));for(let n of(0,ta.getModifiers)(t,!0)??[]){if(n.kind!==C.ReadonlyKeyword&&((t.kind===C.PropertySignature||t.kind===C.MethodSignature)&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on a type member`),t.kind===C.IndexSignature&&(n.kind!==C.StaticKeyword||!it.isClassLike(t.parent))&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on an index signature`)),n.kind!==C.InKeyword&&n.kind!==C.OutKeyword&&n.kind!==C.ConstKeyword&&t.kind===C.TypeParameter&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on a type parameter`),(n.kind===C.InKeyword||n.kind===C.OutKeyword)&&(t.kind!==C.TypeParameter||!(it.isInterfaceDeclaration(t.parent)||it.isClassLike(t.parent)||it.isTypeAliasDeclaration(t.parent)))&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier can only appear on a type parameter of a class, interface or type alias`),n.kind===C.ReadonlyKeyword&&t.kind!==C.PropertyDeclaration&&t.kind!==C.PropertySignature&&t.kind!==C.IndexSignature&&t.kind!==C.Parameter&&Ce(this,we,"m",rt).call(this,n,"'readonly' modifier can only appear on a property declaration or index signature."),n.kind===C.DeclareKeyword&&it.isClassLike(t.parent)&&!it.isPropertyDeclaration(t)&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on class elements of this kind.`),n.kind===C.DeclareKeyword&&it.isVariableStatement(t)){let a=(0,le.getDeclarationKind)(t.declarationList);(a==="using"||a==="await using")&&Ce(this,we,"m",rt).call(this,n,`'declare' modifier cannot appear on a '${a}' declaration.`)}if(n.kind===C.AbstractKeyword&&t.kind!==C.ClassDeclaration&&t.kind!==C.ConstructorType&&t.kind!==C.MethodDeclaration&&t.kind!==C.PropertyDeclaration&&t.kind!==C.GetAccessor&&t.kind!==C.SetAccessor&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier can only appear on a class, method, or property declaration.`),(n.kind===C.StaticKeyword||n.kind===C.PublicKeyword||n.kind===C.ProtectedKeyword||n.kind===C.PrivateKeyword)&&(t.parent.kind===C.ModuleBlock||t.parent.kind===C.SourceFile)&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on a module or namespace element.`),n.kind===C.AccessorKeyword&&t.kind!==C.PropertyDeclaration&&Ce(this,we,"m",rt).call(this,n,"'accessor' modifier can only appear on a property declaration."),n.kind===C.AsyncKeyword&&t.kind!==C.MethodDeclaration&&t.kind!==C.FunctionDeclaration&&t.kind!==C.FunctionExpression&&t.kind!==C.ArrowFunction&&Ce(this,we,"m",rt).call(this,n,"'async' modifier cannot be used here."),t.kind===C.Parameter&&(n.kind===C.StaticKeyword||n.kind===C.ExportKeyword||n.kind===C.DeclareKeyword||n.kind===C.AsyncKeyword)&&Ce(this,we,"m",rt).call(this,n,`'${it.tokenToString(n.kind)}' modifier cannot appear on a parameter.`),t.kind===C.Parameter&&(n.kind===C.PublicKeyword||n.kind===C.PrivateKeyword||n.kind===C.ProtectedKeyword||n.kind===C.ReadonlyKeyword||n.kind===C.OverrideKeyword)){let a=(0,le.getContainingFunction)(t);a.kind===C.Constructor&&(0,le.nodeIsPresent)(a.body)||Ce(this,we,"m",rt).call(this,n,"A parameter property is only allowed in a constructor implementation.")}}}},dn=function(t,n){this.options.allowInvalidAST||Ce(this,we,"m",rt).call(this,t,n)},Gn=function(t,n,a,_=!1){let p=_;return Object.defineProperty(t,n,{configurable:!0,get:this.options.suppressDeprecatedPropertyWarnings?()=>t[a]:()=>(p||((void 0)(`The '${n}' property is deprecated on ${t.type} nodes. Use '${a}' instead. See https://typescript-eslint.io/linting/troubleshooting#the-key-property-is-deprecated-on-type-nodes-use-key-instead-warnings.`,"DeprecationWarning"),p=!0),t[a]),set(m){Object.defineProperty(t,n,{enumerable:!0,writable:!0,value:m})}}),t},rt=function(t,n){let a,_;throw typeof t=="number"?a=_=t:(a=t.getStart(this.ast),_=t.getEnd()),(0,le.createError)(n,this.ast,a,_)},pw=function(t){it.isVariableDeclarationList(t)&&t.flags&it.NodeFlags.Using&&Ce(this,we,"m",rt).call(this,t,"The left-hand side of a 'for...in' statement cannot be a 'using' declaration.")}});function KB(e,t,n=e.getSourceFile()){let a=[];for(;;){if(u6.default.isTokenKind(e.kind))t(e);else if(e.kind!==u6.default.SyntaxKind.JSDocComment){let _=e.getChildren(n);if(_.length===1){e=_[0];continue}for(let p=_.length-1;p>=0;--p)a.push(_[p])}if(a.length===0)break;e=a.pop()}}function ZB(e){switch(e.kind){case Xn.default.SyntaxKind.CloseBraceToken:return e.parent.kind!==Xn.default.SyntaxKind.JsxExpression||!l6(e.parent.parent);case Xn.default.SyntaxKind.GreaterThanToken:switch(e.parent.kind){case Xn.default.SyntaxKind.JsxOpeningElement:return e.end!==e.parent.end;case Xn.default.SyntaxKind.JsxOpeningFragment:return!1;case Xn.default.SyntaxKind.JsxSelfClosingElement:return e.end!==e.parent.end||!l6(e.parent.parent);case Xn.default.SyntaxKind.JsxClosingElement:case Xn.default.SyntaxKind.JsxClosingFragment:return!l6(e.parent.parent.parent)}}return!0}function l6(e){return e.kind===Xn.default.SyntaxKind.JsxElement||e.kind===Xn.default.SyntaxKind.JsxFragment}function hw(e,t,n=e.getSourceFile()){let a=n.text,_=n.languageVariant!==Xn.default.LanguageVariant.JSX;return KB(e,m=>{if(m.pos!==m.end&&(m.kind!==Xn.default.SyntaxKind.JsxText&&Xn.default.forEachLeadingCommentRange(a,m.pos===0?(Xn.default.getShebang(a)??"").length:m.pos,p),_||ZB(m)))return Xn.default.forEachTrailingCommentRange(a,m.end,p)},n);function p(m,y,u){t(a,{pos:m,end:y,kind:u})}}function Xm(e,...t){if(e===void 0)return!1;for(let n of e)if(t.includes(n.kind))return!0;return!1}function fU(e){return"identifierToKeywordKind"in bs.default?bs.default.identifierToKeywordKind(e):e.originalKeywordKind}function dU(e){return"canHaveDecorators"in bs.default?bs.default.canHaveDecorators(e):"decorators"in e}function mU(e){return"getDecorators"in bs.default?bs.default.getDecorators(e):e.decorators}function hU(e){switch(e.parent.kind){case mn.default.SyntaxKind.TypeParameter:case mn.default.SyntaxKind.InterfaceDeclaration:case mn.default.SyntaxKind.TypeAliasDeclaration:return 2;case mn.default.SyntaxKind.ClassDeclaration:case mn.default.SyntaxKind.ClassExpression:return 6;case mn.default.SyntaxKind.EnumDeclaration:return 7;case mn.default.SyntaxKind.NamespaceImport:case mn.default.SyntaxKind.ImportClause:return 15;case mn.default.SyntaxKind.ImportEqualsDeclaration:case mn.default.SyntaxKind.ImportSpecifier:return e.parent.name===e?15:void 0;case mn.default.SyntaxKind.ModuleDeclaration:return 1;case mn.default.SyntaxKind.Parameter:if(e.parent.parent.kind===mn.default.SyntaxKind.IndexSignature||fU(e)===mn.default.SyntaxKind.ThisKeyword)return;case mn.default.SyntaxKind.BindingElement:case mn.default.SyntaxKind.VariableDeclaration:return e.parent.name===e?4:void 0;case mn.default.SyntaxKind.FunctionDeclaration:case mn.default.SyntaxKind.FunctionExpression:return 4}}function fw(e){return{declaration:e,exported:!0,domain:hU(e)}}function FU(e){return e.parent.kind===An.default.SyntaxKind.ModuleDeclaration||Xm(e.modifiers,An.default.SyntaxKind.ExportKeyword)}function dw(e){return e.body===void 0||e.body.kind!==An.default.SyntaxKind.ModuleBlock?!1:BU(e.body)}function BU(e){for(let t of e.statements)if(t.kind===An.default.SyntaxKind.ExportDeclaration||t.kind===An.default.SyntaxKind.ExportAssignment)return!0;return!1}function UU(e){return(e.flags&An.default.NodeFlags.BlockScoped)!==0}function xw(e,t){for(let n of e.elements){if(n.kind!==An.default.SyntaxKind.BindingElement)continue;let a;if(n.name.kind===An.default.SyntaxKind.Identifier?a=t(n):a=xw(n.name,t),a)return a}}var Xn,u6,eU,tU,nU,rU,iU,yw,aU,oU,sU,sr,_U,cU,lU,uU,pU,An,mn,bs,yU,gU,bU,p6,et,po,_r,mw,sW,_W,cW,hs,vU,gs,TU,SU,xU,wU,na,ys,Ma,V_,EU,gw,H_,pu,CU,AU,kU,Gm,DU,PU,wr,IU,NU,OU,MU,LU,JU,bw,vw,Tw,Sw,RU,jU,ww=C6(()=>{Xn=Ot(lt(),1),u6=Ot(lt(),1),eU=Ot(lt(),1),tU=Ot(lt(),1),nU=Ot(lt(),1),rU=Ot(lt(),1),iU=Ot(lt(),1),yw=Ot(lt(),1),aU=Ot(lt(),1),oU=Ot(lt(),1),sU=Ot(lt(),1),sr=Ot(lt(),1),_U=Ot(lt(),1),cU=Ot(lt(),1),lU=Ot(lt(),1),uU=Ot(lt(),1),pU=Ot(lt(),1),An=Ot(lt(),1),mn=Ot(lt(),1),bs=Ot(lt(),1),yU=Ot(lt(),1),gU=Ot(lt(),1),bU=Ot(lt(),1),p6=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},et=(e,t,n)=>(p6(e,t,"read from private field"),n?n.call(e):t.get(e)),po=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},_r=(e,t,n,a)=>(p6(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),mw=(e,t,n)=>(p6(e,t,"access private method"),n);[sW,_W]=yw.default.versionMajorMinor.split(".").map(e=>Number.parseInt(e,10)),cW=sr.default.TypeFlags.Intrinsic??sr.default.TypeFlags.Any|sr.default.TypeFlags.Unknown|sr.default.TypeFlags.String|sr.default.TypeFlags.Number|sr.default.TypeFlags.BigInt|sr.default.TypeFlags.Boolean|sr.default.TypeFlags.BooleanLiteral|sr.default.TypeFlags.ESSymbol|sr.default.TypeFlags.Void|sr.default.TypeFlags.Undefined|sr.default.TypeFlags.Null|sr.default.TypeFlags.Never|sr.default.TypeFlags.NonPrimitive;vU=class{constructor(e){this.global=e,this.variables=new Map,this.uses=[],this.namespaceScopes=void 0,po(this,hs,void 0)}addVariable(e,t,n,a,_){let p=this.getDestinationScope(n).getVariables(),m={domain:_,exported:a,declaration:t},y=p.get(e);y===void 0?p.set(e,{domain:_,declarations:[m],uses:[]}):(y.domain|=_,y.declarations.push(m))}addUse(e){this.uses.push(e)}getVariables(){return this.variables}getFunctionScope(){return this}end(e){this.namespaceScopes!==void 0&&this.namespaceScopes.forEach(t=>t.finish(e)),this.namespaceScopes=_r(this,hs,void 0),this.applyUses(),this.variables.forEach(t=>{for(let n of t.declarations){let a={declarations:[],domain:n.domain,exported:n.exported,inGlobalScope:this.global,uses:[]};for(let _ of t.declarations)_.domain&n.domain&&a.declarations.push(_.declaration);for(let _ of t.uses)_.domain&n.domain&&a.uses.push(_);e(a,n.declaration,this)}})}markExported(e){}createOrReuseNamespaceScope(e,t,n,a){let _;return this.namespaceScopes===void 0?this.namespaceScopes=new Map:_=this.namespaceScopes.get(e),_===void 0?(_=new EU(n,a,this),this.namespaceScopes.set(e,_)):_.refresh(n,a),_}createOrReuseEnumScope(e,t){let n;return et(this,hs)===void 0?_r(this,hs,new Map):n=et(this,hs).get(e),n===void 0&&(n=new TU(this),et(this,hs).set(e,n)),n}applyUses(){for(let e of this.uses)this.applyUse(e)||this.addUseToParent(e);this.uses=[]}applyUse(e,t=this.variables){let n=t.get(e.location.text);return n===void 0||!(n.domain&e.domain)?!1:(n.uses.push(e),!0)}addUseToParent(e){}};hs=new WeakMap;gs=class extends vU{constructor(e,t){super(!1),this.parent=e,this.boundary=t}getDestinationScope(e){return this.boundary&e?this:this.parent.getDestinationScope(e)}addUseToParent(e){return this.parent.addUse(e,this)}},TU=class extends gs{constructor(e){super(e,1)}end(){this.applyUses()}};SU=new WeakMap;xU=new WeakMap;wU=new WeakMap;EU=class extends gs{constructor(e,t,n){super(n,1),po(this,na,new gs(this,1)),po(this,ys,void 0),po(this,Ma,void 0),po(this,V_,void 0),_r(this,Ma,e),_r(this,V_,t)}finish(e){return super.end(e)}end(e){et(this,na).end((t,n,a)=>{if(a!==et(this,na)||!t.exported&&(!et(this,Ma)||et(this,ys)!==void 0&&!et(this,ys).has(n.text)))return e(t,n,a);let _=this.variables.get(n.text);if(_===void 0)this.variables.set(n.text,{declarations:t.declarations.map(fw),domain:t.domain,uses:[...t.uses]});else{e:for(let p of t.declarations){for(let m of _.declarations)if(m.declaration===p)continue e;_.declarations.push(fw(p))}_.domain|=t.domain;for(let p of t.uses)_.uses.includes(p)||_.uses.push(p)}}),this.applyUses(),_r(this,na,new gs(this,1))}createOrReuseNamespaceScope(e,t,n,a){return!t&&(!et(this,Ma)||et(this,V_))?et(this,na).createOrReuseNamespaceScope(e,t,n||et(this,Ma),a):super.createOrReuseNamespaceScope(e,t,n||et(this,Ma),a)}createOrReuseEnumScope(e,t){return!t&&(!et(this,Ma)||et(this,V_))?et(this,na).createOrReuseEnumScope(e,t):super.createOrReuseEnumScope(e,t)}addUse(e,t){if(t!==et(this,na))return et(this,na).addUse(e);this.uses.push(e)}refresh(e,t){_r(this,Ma,e),_r(this,V_,t)}markExported(e){et(this,ys)===void 0&&_r(this,ys,new Set),et(this,ys).add(e.text)}getDestinationScope(){return et(this,na)}};na=new WeakMap;ys=new WeakMap;Ma=new WeakMap;V_=new WeakMap;gw=class extends gs{constructor(e){super(e,1)}beginBody(){this.applyUses()}},CU=class extends gs{constructor(e,t,n){super(n,1),po(this,H_,void 0),po(this,pu,void 0),_r(this,H_,e),_r(this,pu,t)}end(e){return this.innerScope.end(e),e({declarations:[et(this,H_)],domain:et(this,pu),exported:!1,uses:this.uses,inGlobalScope:!1},et(this,H_),this)}addUse(e,t){if(t!==this.innerScope)return this.innerScope.addUse(e);if(e.domain&et(this,pu)&&e.location.text===et(this,H_).text)this.uses.push(e);else return this.parent.addUse(e,this)}getFunctionScope(){return this.innerScope}getDestinationScope(){return this.innerScope}};H_=new WeakMap;pu=new WeakMap;AU=class extends CU{constructor(e,t){super(e,4,t),this.innerScope=new gw(this)}beginBody(){return this.innerScope.beginBody()}};kU=new WeakMap;DU=class extends gs{constructor(e){super(e,8),po(this,Gm,0)}updateState(e){_r(this,Gm,e)}addUse(e){return et(this,Gm)===2?void this.uses.push(e):this.parent.addUse(e,this)}};Gm=new WeakMap;PU=new WeakMap;wr=new WeakMap;IU=new WeakSet;NU=function(e,t,n){let a=et(this,wr),_=_r(this,wr,new DU(a));t(e.checkType),_.updateState(1),t(e.extendsType),_.updateState(2),t(e.trueType),_.updateState(3),t(e.falseType),_.end(n),_r(this,wr,a)};OU=new WeakSet;MU=function(e,t,n){var p;dU(e)&&((p=mU(e))==null||p.forEach(t));let a=et(this,wr);e.kind===An.default.SyntaxKind.FunctionDeclaration&&mw(this,bw,vw).call(this,e,!1,4);let _=_r(this,wr,e.kind===An.default.SyntaxKind.FunctionExpression&&e.name!==void 0?new AU(e.name,a):new gw(a));e.name!==void 0&&t(e.name),e.typeParameters!==void 0&&e.typeParameters.forEach(t),e.parameters.forEach(t),e.type!==void 0&&t(e.type),e.body!==void 0&&(_.beginBody(),t(e.body)),_.end(n),_r(this,wr,a)};LU=new WeakSet;JU=function(e,t){if(e.flags&An.default.NodeFlags.GlobalAugmentation)return t(e,et(this,wr).createOrReuseNamespaceScope("-global",!1,!0,!1));if(e.name.kind===An.default.SyntaxKind.Identifier){let n=FU(e);et(this,wr).addVariable(e.name.text,e.name,1,n,5);let a=Xm(e.modifiers,An.default.SyntaxKind.DeclareKeyword);return t(e,et(this,wr).createOrReuseNamespaceScope(e.name.text,n,a,a&&dw(e)))}return t(e,et(this,wr).createOrReuseNamespaceScope(`"${e.name.text}"`,!1,!0,dw(e)))};bw=new WeakSet;vw=function(e,t,n){e.name!==void 0&&et(this,wr).addVariable(e.name.text,e.name,t?3:1,Xm(e.modifiers,An.default.SyntaxKind.ExportKeyword),n)};Tw=new WeakSet;Sw=function(e,t,n){if(e.kind===An.default.SyntaxKind.Identifier)return et(this,wr).addVariable(e.text,e,t?3:1,n,4);xw(e,a=>{et(this,wr).addVariable(a.name.text,a.name,t?3:1,n,4)})};RU=new WeakSet;jU=function(e){let t=UU(e),n=e.parent.kind===An.default.SyntaxKind.VariableStatement&&Xm(e.parent.modifiers,An.default.SyntaxKind.ExportKeyword);for(let a of e.declarations)mw(this,Tw,Sw).call(this,a.name,t,n)}});var Aw=mt(ra=>{"use strict";ww();var zU=ra&&ra.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),WU=ra&&ra.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),VU=ra&&ra.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&zU(t,e,n);return WU(t,e),t};Object.defineProperty(ra,"__esModule",{value:!0});ra.convertComments=void 0;var Ew=VU(lt()),HU=Hm(),Cw=zm();function GU(e,t){let n=[];return hw(e,(a,_)=>{let p=_.kind===Ew.SyntaxKind.SingleLineCommentTrivia?Cw.AST_TOKEN_TYPES.Line:Cw.AST_TOKEN_TYPES.Block,m=[_.pos,_.end],y=(0,HU.getLocFor)(m,e),u=m[0]+2,x=_.kind===Ew.SyntaxKind.SingleLineCommentTrivia?m[1]-u:m[1]-u-2;n.push({type:p,value:t.slice(u,u+x),range:m,loc:y})},e),n}ra.convertComments=GU});var Dw=mt($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.astConverter=void 0;var kw=c6(),XU=Aw(),$U=Hm(),QU={};function YU(e,t,n){let{parseDiagnostics:a}=e;if(a.length)throw(0,kw.convertError)(a[0]);let _=new kw.Converter(e,{allowInvalidAST:t.allowInvalidAST,errorOnUnknownASTType:t.errorOnUnknownASTType,shouldPreserveNodeMaps:n,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings}),p=_.convertProgram();(!t.range||!t.loc)&&(0,QU.simpleTraverse)(p,{enter:y=>{t.range||delete y.range,t.loc||delete y.loc}}),t.tokens&&(p.tokens=(0,$U.convertTokens)(e)),t.comment&&(p.comments=(0,XU.convertComments)(e,t.codeFullText));let m=_.getASTMaps();return{estree:p,astMaps:m}}$m.astConverter=YU});var f6=mt(ui=>{"use strict";var KU=ui&&ui.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),ZU=ui&&ui.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),eq=ui&&ui.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&KU(t,e,n);return ZU(t,e),t};Object.defineProperty(ui,"__esModule",{value:!0});ui.getCodeText=ui.isSourceFile=void 0;var tq=eq(lt());function Pw(e){if(typeof e!="object"||e==null)return!1;let t=e;return t.kind===tq.SyntaxKind.SourceFile&&typeof t.getFullText=="function"}ui.isSourceFile=Pw;function nq(e){return Pw(e)?e.getFullText(e):e}ui.getCodeText=nq});var Iw=mt(Er=>{"use strict";var rq=Er&&Er.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),iq=Er&&Er.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),aq=Er&&Er.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&rq(t,e,n);return iq(t,e),t},oq=Er&&Er.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Er,"__esModule",{value:!0});Er.getLanguageVariant=Er.getScriptKind=void 0;var sq=oq({extname:e=>"."+e.split(".").pop()}),Yt=aq(lt());function _q(e,t){switch(sq.default.extname(e).toLowerCase()){case Yt.Extension.Js:case Yt.Extension.Cjs:case Yt.Extension.Mjs:return Yt.ScriptKind.JS;case Yt.Extension.Jsx:return Yt.ScriptKind.JSX;case Yt.Extension.Ts:case Yt.Extension.Cts:case Yt.Extension.Mts:return Yt.ScriptKind.TS;case Yt.Extension.Tsx:return Yt.ScriptKind.TSX;case Yt.Extension.Json:return Yt.ScriptKind.JSON;default:return t?Yt.ScriptKind.TSX:Yt.ScriptKind.TS}}Er.getScriptKind=_q;function cq(e){switch(e){case Yt.ScriptKind.TSX:case Yt.ScriptKind.JSX:case Yt.ScriptKind.JS:case Yt.ScriptKind.JSON:return Yt.LanguageVariant.JSX;default:return Yt.LanguageVariant.Standard}}Er.getLanguageVariant=cq});var Mw=mt(Cr=>{"use strict";var lq=Cr&&Cr.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),uq=Cr&&Cr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pq=Cr&&Cr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&lq(t,e,n);return uq(t,e),t},fq=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.createNoProgram=Cr.createSourceFile=void 0;var dq=fq((Cf(),$h(Ef))),Nw=pq(lt()),mq=f6(),hq=Iw(),yq=(0,dq.default)("typescript-eslint:typescript-estree:createSourceFile");function Ow(e){return yq("Getting AST without type information in %s mode for: %s",e.jsx?"TSX":"TS",e.filePath),(0,mq.isSourceFile)(e.code)?e.code:Nw.createSourceFile(e.filePath,e.codeFullText,{languageVersion:Nw.ScriptTarget.Latest,jsDocParsingMode:e.jsDocParsingMode},!0,(0,hq.getScriptKind)(e.filePath,e.jsx))}Cr.createSourceFile=Ow;function gq(e){return{ast:Ow(e),program:null}}Cr.createNoProgram=gq});var Lw=mt(()=>{});var Jw=mt(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});Qm.createParserServices=void 0;function bq(e,t){if(!t)return{program:t,...e};let n=t.getTypeChecker();return{program:t,...e,getSymbolAtLocation:a=>n.getSymbolAtLocation(e.esTreeNodeToTSNodeMap.get(a)),getTypeAtLocation:a=>n.getTypeAtLocation(e.esTreeNodeToTSNodeMap.get(a))}}Qm.createParserServices=bq});var Rw=mt(()=>{});var Fw=mt(jw=>{jw.ExpiringCache=class{}});var Uw=mt(Bw=>{Bw.resolveProjectList=()=>[]});var zw=mt(qw=>{qw.inferSingleRun=()=>!1});var Vw=mt(Ww=>{Ww.warnAboutTSVersion=()=>{}});var Kw=mt($n=>{"use strict";var vq=$n&&$n.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var _=Object.getOwnPropertyDescriptor(t,n);(!_||("get"in _?!t.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,_)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),Tq=$n&&$n.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Sq=$n&&$n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&vq(t,e,n);return Tq(t,e),t},xq=$n&&$n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($n,"__esModule",{value:!0});$n.clearTSServerProjectService=$n.clearTSConfigMatchCache=$n.createParseSettings=void 0;var d6=xq((Cf(),$h(Ef))),Ym=Sq(lt()),wq=Rw(),Eq={ensureAbsolutePath:e=>e},Cq=f6(),Hw=Fw(),OW=Uw(),Aq=zw(),kq=Vw(),Dq=(0,d6.default)("typescript-eslint:typescript-estree:parser:parseSettings:createParseSettings"),Km,Yw=null,Gw,Xw,$w,Qw,fu={ParseAll:(Gw=Ym.JSDocParsingMode)==null?void 0:Gw.ParseAll,ParseNone:(Xw=Ym.JSDocParsingMode)==null?void 0:Xw.ParseNone,ParseForTypeErrors:($w=Ym.JSDocParsingMode)==null?void 0:$w.ParseForTypeErrors,ParseForTypeInfo:(Qw=Ym.JSDocParsingMode)==null?void 0:Qw.ParseForTypeInfo};function Pq(e,t={}){var u;let n=Oq(e),a=(0,Aq.inferSingleRun)(t),_=typeof t.tsconfigRootDir=="string"?t.tsconfigRootDir:"/prettier-security-dirname-placeholder",p=typeof t.loggerFn=="function",m=(()=>{switch(t.jsDocParsingMode){case"all":return fu.ParseAll;case"none":return fu.ParseNone;case"type-info":return fu.ParseForTypeInfo;default:return fu.ParseAll}})(),y={allowInvalidAST:t.allowInvalidAST===!0,code:e,codeFullText:n,comment:t.comment===!0,comments:[],DEPRECATED__createDefaultProgram:t.DEPRECATED__createDefaultProgram===!0,debugLevel:t.debugLevel===!0?new Set(["typescript-eslint"]):Array.isArray(t.debugLevel)?new Set(t.debugLevel):new Set,errorOnTypeScriptSyntacticAndSemanticIssues:!1,errorOnUnknownASTType:t.errorOnUnknownASTType===!0,EXPERIMENTAL_projectService:t.EXPERIMENTAL_useProjectService||t.project&&t.EXPERIMENTAL_useProjectService!==!1&&!1?Yw??(Yw=(0,wq.createProjectService)(t.EXPERIMENTAL_useProjectService,m)):void 0,EXPERIMENTAL_useSourceOfProjectReferenceRedirect:t.EXPERIMENTAL_useSourceOfProjectReferenceRedirect===!0,extraFileExtensions:Array.isArray(t.extraFileExtensions)&&t.extraFileExtensions.every(x=>typeof x=="string")?t.extraFileExtensions:[],filePath:(0,Eq.ensureAbsolutePath)(typeof t.filePath=="string"&&t.filePath!==""?t.filePath:Mq(t.jsx),_),jsDocParsingMode:m,jsx:t.jsx===!0,loc:t.loc===!0,log:typeof t.loggerFn=="function"?t.loggerFn:t.loggerFn===!1?()=>{}:console.log,preserveNodeMaps:t.preserveNodeMaps!==!1,programs:Array.isArray(t.programs)?t.programs:null,projects:[],range:t.range===!0,singleRun:a,suppressDeprecatedPropertyWarnings:t.suppressDeprecatedPropertyWarnings??!0,tokens:t.tokens===!0?[]:null,tsconfigMatchCache:Km??(Km=new Hw.ExpiringCache(a?"Infinity":((u=t.cacheLifetime)==null?void 0:u.glob)??Hw.DEFAULT_TSCONFIG_CACHE_DURATION_SECONDS)),tsconfigRootDir:_};if(y.debugLevel.size>0){let x=[];y.debugLevel.has("typescript-eslint")&&x.push("typescript-eslint:*"),(y.debugLevel.has("eslint")||d6.default.enabled("eslint:*,-eslint:code-path"))&&x.push("eslint:*,-eslint:code-path"),d6.default.enable(x.join(","))}if(Array.isArray(t.programs)){if(!t.programs.length)throw new Error("You have set parserOptions.programs to an empty array. This will cause all files to not be found in existing programs. Either provide one or more existing TypeScript Program instances in the array, or remove the parserOptions.programs setting.");Dq("parserOptions.programs was provided, so parserOptions.project will be ignored.")}return!y.programs&&!y.EXPERIMENTAL_projectService&&(y.projects=[]),t.jsDocParsingMode==null&&y.projects.length===0&&y.programs==null&&y.EXPERIMENTAL_projectService==null&&(y.jsDocParsingMode=fu.ParseNone),(0,kq.warnAboutTSVersion)(y,p),y}$n.createParseSettings=Pq;function Iq(){Km==null||Km.clear()}$n.clearTSConfigMatchCache=Iq;function Nq(){Yw=null}$n.clearTSServerProjectService=Nq;function Oq(e){return(0,Cq.isSourceFile)(e)?e.getFullText(e):typeof e=="string"?e:String(e)}function Mq(e){return e?"estree.tsx":"estree.ts"}});var n5=mt(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.getFirstSemanticOrSyntacticError=void 0;var Zw=lt();function Lq(e,t){try{let n=e5(e.getSyntacticDiagnostics(t));if(n.length>0)return t5(n[0]);let a=e5(e.getSemanticDiagnostics(t));return a.length>0?t5(a[0]):void 0}catch(n){console.warn(`Warning From TSC: "${n.message}`);return}}Zm.getFirstSemanticOrSyntacticError=Lq;function e5(e){return e.filter(t=>{switch(t.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 t5(e){return{...e,message:(0,Zw.flattenDiagnosticMessageText)(e.messageText,Zw.sys.newLine)}}});var r5=mt(()=>{});var c5=mt(pi=>{"use strict";var Jq=pi&&pi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pi,"__esModule",{value:!0});pi.clearParseAndGenerateServicesCalls=pi.clearProgramCache=pi.parseAndGenerateServices=pi.parse=void 0;var Rq=Jq((Cf(),$h(Ef))),i5=Dw(),jq=c6(),Fq={},a5={},Bq={},o5=Mw(),Uq=Lw(),s5={},qq=Jw(),_5=Kw(),zq=n5(),Wq=r5(),Vq=(0,Rq.default)("typescript-eslint:typescript-estree:parser"),m6=new Map;function Hq(){m6.clear()}pi.clearProgramCache=Hq;function Gq(e,t){if(e.EXPERIMENTAL_projectService){let a=(0,Wq.useProgramFromProjectService)(e.EXPERIMENTAL_projectService,e,t);if(a)return a}if(e.programs){let a=(0,s5.useProvidedPrograms)(e.programs,e);if(a)return a}if(!t)return(0,o5.createNoProgram)(e);let n=(0,Bq.createProjectProgram)(e,(0,Uq.getWatchProgramsForProjects)(e));if(n)return n;if(e.DEPRECATED__createDefaultProgram){let a=(0,Fq.createDefaultProgram)(e);if(a)return a}return(0,a5.createIsolatedProgram)(e)}function Xq(e,t){let{ast:n}=$q(e,t,!1);return n}pi.parse=Xq;function $q(e,t,n){let a=(0,_5.createParseSettings)(e,t);if(t!=null&&t.errorOnTypeScriptSyntacticAndSemanticIssues)throw new Error('"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()');let _=(0,o5.createSourceFile)(a),{estree:p,astMaps:m}=(0,i5.astConverter)(_,a,n);return{ast:p,esTreeNodeToTSNodeMap:m.esTreeNodeToTSNodeMap,tsNodeToESTreeNodeMap:m.tsNodeToESTreeNodeMap}}var e1={};function Qq(){e1={}}pi.clearParseAndGenerateServicesCalls=Qq;function Yq(e,t){let n=(0,_5.createParseSettings)(e,t);n.singleRun&&!n.programs&&n.projects.length>0&&(n.programs={*[Symbol.iterator](){for(let x of n.projects){let d=m6.get(x);if(d)yield d;else{Vq("Detected single-run/CLI usage, creating Program once ahead of time for project: %s",x);let S=(0,s5.createProgramFromConfigFile)(x);m6.set(x,S),yield S}}}});let a=n.programs!=null||n.projects.length>0;if(typeof t.errorOnTypeScriptSyntacticAndSemanticIssues=="boolean"&&t.errorOnTypeScriptSyntacticAndSemanticIssues&&(n.errorOnTypeScriptSyntacticAndSemanticIssues=!0),n.errorOnTypeScriptSyntacticAndSemanticIssues&&!a)throw new Error("Cannot calculate TypeScript semantic issues without a valid project.");n.singleRun&&t.filePath&&(e1[t.filePath]=(e1[t.filePath]||0)+1);let{ast:_,program:p}=n.singleRun&&t.filePath&&e1[t.filePath]>1?(0,a5.createIsolatedProgram)(n):Gq(n,a),m=typeof n.preserveNodeMaps=="boolean"?n.preserveNodeMaps:!0,{estree:y,astMaps:u}=(0,i5.astConverter)(_,n,m);if(p&&n.errorOnTypeScriptSyntacticAndSemanticIssues){let x=(0,zq.getFirstSemanticOrSyntacticError)(p,_);if(x)throw(0,jq.convertError)(x)}return{ast:y,services:(0,qq.createParserServices)(u,p)}}pi.parseAndGenerateServices=Yq});var C5=mt(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.extract=mz;vs.parse=yz;vs.parseWithComments=E5;vs.print=gz;vs.strip=hz;var lz=/\*\/$/,uz=/^\/\*\*?/,x5=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,pz=/(^|\s+)\/\/([^\r\n]*)/g,v5=/^(\r?\n)+/,fz=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,T5=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,dz=/(\r?\n|^) *\* ?/g,w5=[];function mz(e){let t=e.match(x5);return t?t[0].trimLeft():""}function hz(e){let t=e.match(x5);return t&&t[0]?e.substring(t[0].length):e}function yz(e){return E5(e).pragmas}function E5(e){let t=` +`;e=e.replace(uz,"").replace(lz,"").replace(dz,"$1");let n="";for(;n!==e;)n=e,e=e.replace(fz,`${t}$1 $2${t}`);e=e.replace(v5,"").trimRight();let a=Object.create(null),_=e.replace(T5,"").replace(v5,"").trimRight(),p;for(;p=T5.exec(e);){let m=p[2].replace(pz,"");typeof a[p[1]]=="string"||Array.isArray(a[p[1]])?a[p[1]]=w5.concat(a[p[1]],m):a[p[1]]=m}return{comments:_,pragmas:a}}function gz({comments:e="",pragmas:t={}}){let n=` +`,a="/**",_=" *",p=" */",m=Object.keys(t),y=m.flatMap(x=>S5(x,t[x])).map(x=>`${_} ${x}${n}`).join("");if(!e){if(m.length===0)return"";if(m.length===1&&!Array.isArray(t[m[0]])){let x=t[m[0]];return`${a} ${S5(m[0],x)[0]}${p}`}}let u=e.split(n).map(x=>`${_} ${x}`).join(n)+n;return a+n+(e?u:"")+(e&&m.length?_+n:"")+y+p}function S5(e,t){return w5.concat(t).map(n=>`@${e} ${n}`.trim())}});var x6={};Xh(x6,{parsers:()=>S6});var S6={};Xh(S6,{typescript:()=>kz});var I5=Ot(c5(),1);function Kq(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var l5=Kq;function Zq(e){let t=[];for(let n of e)try{return n()}catch(a){t.push(a)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var u5=Zq;var ez=(e,t,n)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[n<0?t.length+n:n]:t.at(n)},h6=ez;function tz(e){return Array.isArray(e)&&e.length>0}var p5=tz;function Hr(e){var a,_,p;let t=((a=e.range)==null?void 0:a[0])??e.start,n=(p=((_=e.declaration)==null?void 0:_.decorators)??e.decorators)==null?void 0:p[0];return n?Math.min(Hr(n),t):t}function ia(e){var t;return((t=e.range)==null?void 0:t[1])??e.end}function nz(e){let t=new Set(e);return n=>t.has(n==null?void 0:n.type)}var f5=nz;var rz=f5(["Block","CommentBlock","MultiLine"]),du=rz;function iz(e){let t=`*${e.value}*`.split(` +`);return t.length>1&&t.every(n=>n.trimStart()[0]==="*")}var y6=iz;function az(e){return du(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value)}var d5=az;var mu=null;function hu(e){if(mu!==null&&typeof mu.property){let t=mu;return mu=hu.prototype=null,t}return mu=hu.prototype=e??Object.create(null),new hu}var oz=10;for(let e=0;e<=oz;e++)hu();function g6(e){return hu(e)}function sz(e,t="type"){g6(e);function n(a){let _=a[t],p=e[_];if(!Array.isArray(p))throw Object.assign(new Error(`Missing visitor keys for '${_}'.`),{node:a});return p}return n}var m5=sz;var h5={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],AsConstExpression:["expression"],SatisfiesExpression:["expression","typeAnnotation"]};var _z=m5(h5),y5=_z;function b6(e,t){if(!(e!==null&&typeof e=="object"))return e;if(Array.isArray(e)){for(let a=0;a{var m;(m=p.leadingComments)!=null&&m.some(d5)&&_.add(Hr(p))}),e=t1(e,p=>{if(p.type==="ParenthesizedExpression"){let{expression:m}=p;if(m.type==="TypeCastExpression")return m.range=[...p.range],m;let y=Hr(p);if(!_.has(y))return m.extra={...m.extra,parenthesized:!0},m}})}if(e=t1(e,_=>{var p;switch(_.type){case"LogicalExpression":if(g5(_))return v6(_);break;case"VariableDeclaration":{let m=h6(!1,_.declarations,-1);m!=null&&m.init&&a[ia(m)]!==";"&&(_.range=[Hr(_),ia(m)]);break}case"TSParenthesizedType":return _.typeAnnotation;case"TSTypeParameter":if(typeof _.name=="string"){let m=Hr(_);_.name={type:"Identifier",name:_.name,range:[m,m+_.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":if(n==="meriyah"&&((p=_.exported)==null?void 0:p.type)==="Identifier"){let{exported:m}=_,y=a.slice(Hr(m),ia(m));(y.startsWith('"')||y.startsWith("'"))&&(_.exported={..._.exported,type:"Literal",value:_.exported.name,raw:y})}break;case"TSUnionType":case"TSIntersectionType":if(_.types.length===1)return _.types[0];break}}),p5(e.comments)){let _=h6(!1,e.comments,-1);for(let p=e.comments.length-2;p>=0;p--){let m=e.comments[p];ia(m)===Hr(_)&&du(m)&&du(_)&&y6(m)&&y6(_)&&(e.comments.splice(p+1,1),m.value+="*//*"+_.value,m.range=[Hr(m),ia(_)]),_=m}}return e.type==="Program"&&(e.range=[0,a.length]),e}function g5(e){return e.type==="LogicalExpression"&&e.right.type==="LogicalExpression"&&e.operator===e.right.operator}function v6(e){return g5(e)?v6({type:"LogicalExpression",operator:e.operator,left:v6({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[Hr(e.left),ia(e.right.left)]}),right:e.right.right,range:[Hr(e),ia(e)]}):e}var b5=cz;var G_=Ot(C5(),1);function bz(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(` +`);return t===-1?e:e.slice(0,t)}var A5=bz;function vz(e){let t=A5(e);t&&(e=e.slice(t.length+1));let n=(0,G_.extract)(e),{pragmas:a,comments:_}=(0,G_.parseWithComments)(n);return{shebang:t,text:e,pragmas:a,comments:_}}function k5(e){let{pragmas:t}=vz(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}function Tz(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:k5,locStart:Hr,locEnd:ia,...e}}var D5=Tz;function Sz(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var P5=Sz;var T6={loc:!0,range:!0,comment:!0,tokens:!0,loggerFn:!1,project:[],jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0};function xz(e){let{message:t,location:n}=e;if(!n)return e;let{start:a,end:_}=n;return l5(t,{loc:{start:{line:a.line,column:a.column+1},end:{line:_.line,column:_.column+1}},cause:e})}var wz=e=>/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/i.test(e);function Ez(e,t){let n=t==null?void 0:t.filepath;if(n&&wz(n))return[{...T6,filePath:n}];let a=Az(e);return[{...T6,jsx:a},{...T6,jsx:!a}]}function Cz(e,t){let n=P5(e),a=Ez(e,t),_;try{_=u5(a.map(p=>()=>(0,I5.parse)(n,p)))}catch({errors:[p]}){throw xz(p)}return b5(_,{text:e})}function Az(e){return new RegExp(["(?:^[^\"'`]*)"].join(""),"m").test(e)}var kz=D5(Cz);var NV=x6;export{NV as default,S6 as parsers}; diff --git a/node_modules/prettier/plugins/yaml.js b/node_modules/prettier/plugins/yaml.js index 9cac12e..e6bb952 100644 --- a/node_modules/prettier/plugins/yaml.js +++ b/node_modules/prettier/plugins/yaml.js @@ -1,7 +1,7 @@ -(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.yaml=e()}})(function(){"use strict";var Li=Object.create;var yt=Object.defineProperty;var Ai=Object.getOwnPropertyDescriptor;var Ti=Object.getOwnPropertyNames;var Ci=Object.getPrototypeOf,Mi=Object.prototype.hasOwnProperty;var ee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),tr=(t,e)=>{for(var n in e)yt(t,n,{get:e[n],enumerable:!0})},nr=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ti(e))!Mi.call(t,s)&&s!==n&&yt(t,s,{get:()=>e[s],enumerable:!(r=Ai(e,s))||r.enumerable});return t};var rr=(t,e,n)=>(n=t!=null?Li(Ci(t)):{},nr(e||!t||!t.__esModule?yt(n,"default",{value:t,enumerable:!0}):n,t)),ki=t=>nr(yt({},"__esModule",{value:!0}),t);var le=ee(U=>{"use strict";var re={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},lt={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"},No="tag:yaml.org,2002:",Oo={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function Ms(t){let e=[0],n=t.indexOf(` +(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.yaml=e()}})(function(){"use strict";var Li=Object.create;var yt=Object.defineProperty;var Ai=Object.getOwnPropertyDescriptor;var Ti=Object.getOwnPropertyNames;var Ci=Object.getPrototypeOf,Mi=Object.prototype.hasOwnProperty;var ee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),tr=(t,e)=>{for(var n in e)yt(t,n,{get:e[n],enumerable:!0})},nr=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ti(e))!Mi.call(t,s)&&s!==n&&yt(t,s,{get:()=>e[s],enumerable:!(r=Ai(e,s))||r.enumerable});return t};var rr=(t,e,n)=>(n=t!=null?Li(Ci(t)):{},nr(e||!t||!t.__esModule?yt(n,"default",{value:t,enumerable:!0}):n,t)),ki=t=>nr(yt({},"__esModule",{value:!0}),t);var le=ee(U=>{"use strict";var re={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},lt={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"},Oo="tag:yaml.org,2002:",Lo={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function vs(t){let e=[0],n=t.indexOf(` `);for(;n!==-1;)n+=1,e.push(n),n=t.indexOf(` -`,n);return e}function ks(t){let e,n;return typeof t=="string"?(e=Ms(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=Ms(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function An(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=ks(e);if(!n||!r||t>r.length)return null;for(let i=0;i=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===` -`;)--i;return r.slice(s,i)}function Ao({start:t,end:e},n,r=80){let s=Lo(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s} +`,n);return e}function Is(t){let e,n;return typeof t=="string"?(e=vs(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=vs(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function An(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=Is(e);if(!n||!r||t>r.length)return null;for(let i=0;i=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===` +`;)--i;return r.slice(s,i)}function To({start:t,end:e},n,r=80){let s=Ao(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s} ${c}${l}${a}`}var Ye=class t{static copy(e){return new t(e.start,e.end)}constructor(e,n){this.start=e,this.end=n||e}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(e,n){let{start:r,end:s}=this;if(e.length===0||s<=e[0])return this.origStart=r,this.origEnd=s,n;let i=n;for(;ir);)++i;this.origStart=r+i;let o=i;for(;i=s);)++i;return this.origEnd=s+i,o}},se=class t{static addStringTerminator(e,n,r){if(r[r.length-1]===` `)return r;let s=t.endOfWhiteSpace(e,n);return s>=e.length||e[s]===` `?r+` @@ -21,10 +21,10 @@ ${c}${l}${a}`}var Ye=class t{static copy(e){return new t(e.start,e.end)}construc `:s=0,n+=1,o+=` `;break;case" ":s<=r&&(i=!0),n=t.endOfWhiteSpace(e,n+2)-1;break;case" ":s+=1,n+=1;break}a=e[n+1]}return o||(o=" "),a&&s<=r&&(i=!0),{fold:o,offset:n,error:i}}constructor(e,n,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=e,this.value=null}getPropValue(e,n,r){if(!this.context)return null;let{src:s}=this.context,i=this.props[e];return i&&s[i.start]===n?s.slice(i.start+(r?1:0),i.end):null}get anchor(){for(let e=0;e0?e.join(` `):null}commentHasRequiredWhitespace(e){let{src:n}=this.context;if(this.header&&e===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return e!==r||t.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;nr.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},de=class extends Error{constructor(e,n,r){if(!r||!(n instanceof se))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Ye(this.offset,this.offset+1);let n=e&&An(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&Ao(this.linePos,e);s&&(this.message+=`: +`)return!0;return!1}parseComment(e){let{src:n}=this.context;if(n[e]===re.COMMENT){let r=t.endOfLine(n,e+1),s=new Ye(e,r);return this.props.push(s),r}return e}setOrigRanges(e,n){return this.range&&(n=this.range.setOrigRange(e,n)),this.valueRange&&this.valueRange.setOrigRange(e,n),this.props.forEach(r=>r.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},de=class extends Error{constructor(e,n,r){if(!r||!(n instanceof se))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Ye(this.offset,this.offset+1);let n=e&&An(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&To(this.linePos,e);s&&(this.message+=`: ${s} -`)}delete this.source}},Tn=class extends de{constructor(e,n){super("YAMLReferenceError",e,n)}},ft=class extends de{constructor(e,n){super("YAMLSemanticError",e,n)}},Cn=class extends de{constructor(e,n){super("YAMLSyntaxError",e,n)}},Mn=class extends de{constructor(e,n){super("YAMLWarning",e,n)}};function To(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kn=class t extends se{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==` +`)}delete this.source}},Tn=class extends de{constructor(e,n){super("YAMLReferenceError",e,n)}},ft=class extends de{constructor(e,n){super("YAMLSemanticError",e,n)}},Cn=class extends de{constructor(e,n){super("YAMLSyntaxError",e,n)}},Mn=class extends de{constructor(e,n){super("YAMLWarning",e,n)}};function Co(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kn=class t extends se{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==` `&&!(r&&(s==="["||s==="]"||s==="{"||s==="}"||s===","));){let o=e[i+1];if(s===":"&&(!o||o===` `||o===" "||o===" "||r&&o===",")||(s===" "||s===" ")&&o==="#")break;i+=1,s=o}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{src:r}=this.context,s=r[n-1];for(;el?r.slice(l,a+1):c)}else i+=c}let o=r[e];switch(o){case" ":{let a="Plain value cannot start with a tab character";return{errors:[new ft(this,a)],str:i}}case"@":case"`":{let a=`Plain value cannot start with reserved character ${o}`;return{errors:[new ft(this,a)],str:i}}default:return i}}parseBlockValue(e){let{indent:n,inFlow:r,src:s}=this.context,i=e,o=e;for(let a=s[i];a===` `&&!se.atDocumentBoundary(s,i+1);a=s[i]){let c=se.endOfBlockIndent(s,n,i+1);if(c===null||s[c]==="#")break;s[c]===` `?i=c:(o=t.endOfLine(s,c,r),i=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=o,o}parse(e,n){this.context=e;let{inFlow:r,src:s}=e,i=n,o=s[i];return o&&o!=="#"&&o!==` -`&&(i=t.endOfLine(s,n,r)),this.valueRange=new Ye(n,i),i=se.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};U.Char=re;U.Node=se;U.PlainValue=kn;U.Range=Ye;U.Type=lt;U.YAMLError=de;U.YAMLReferenceError=Tn;U.YAMLSemanticError=ft;U.YAMLSyntaxError=Cn;U.YAMLWarning=Mn;U._defineProperty=To;U.defaultTagPrefix=No;U.defaultTags=Oo});var Is=ee(vs=>{"use strict";var u=le(),Ee=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ut=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],d=null;for(;l===` +`&&(i=t.endOfLine(s,n,r)),this.valueRange=new Ye(n,i),i=se.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};U.Char=re;U.Node=se;U.PlainValue=kn;U.Range=Ye;U.Type=lt;U.YAMLError=de;U.YAMLReferenceError=Tn;U.YAMLSemanticError=ft;U.YAMLSyntaxError=Cn;U.YAMLWarning=Mn;U._defineProperty=Co;U.defaultTagPrefix=Oo;U.defaultTags=Lo});var _s=ee(Ps=>{"use strict";var u=le(),Ee=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ut=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],d=null;for(;l===` `||l==="#";){if(l==="#"){let h=u.Node.endOfLine(s,c+1);m.push(new u.Range(c,h)),c=h}else{i=!0,o=c+1;let h=u.Node.endOfWhiteSpace(s,o);s[h]===` -`&&m.length===0&&(d=new Ee,o=d.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(d){let h=e.parent.items||e.parent.contents;h&&h.push(d)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},ye=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function vn(t){let e=t;for(;e instanceof ut;)e=e.node;if(!(e instanceof $t))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var $t=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==` +`&&m.length===0&&(d=new Ee,o=d.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(d){let h=e.parent.items||e.parent.contents;h&&h.push(d)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},ye=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function vn(t){let e=t;for(;e instanceof ut;)e=e.node;if(!(e instanceof Ft))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var Ft=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==` `?!1:t.nextContentHasIndent(e,n,r):!1}constructor(e){super(e.type===u.Type.SEQ_ITEM?u.Type.SEQ:u.Type.MAP);for(let r=e.props.length-1;r>=0;--r)if(e.props[r].start0}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,i=u.Node.startOfLine(s,n),o=this.items[0];o.context.parent=this,this.valueRange=u.Range.copy(o.valueRange);let a=o.range.start-o.context.lineStart,c=n;c=u.Node.normalizeOffset(s,c);let l=s[c],f=u.Node.endOfWhiteSpace(s,i)===c,m=!1;for(;l;){for(;l===` `||l==="#";){if(f&&l===` `&&!m){let h=new Ee;if(c=h.parse({src:s},c),this.valueRange.end=c,c>=s.length){l=null;break}this.items.push(h),c-=1}else if(l==="#"){if(c=s.length){l=null;break}}if(i=c+1,c=u.Node.endOfIndent(s,i),u.Node.atBlank(s,c)){let h=u.Node.endOfWhiteSpace(s,c),g=s[h];(!g||g===` @@ -77,85 +77,85 @@ ${s} `:for(;i[a+1]===" "||i[a+1]===" ";)a+=1;break;default:e.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==` `&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:s}=this.context,i=s.substr(e,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(r.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,n+2)}`)),s.substr(e-2,n+2)):String.fromCodePoint(a)}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},Yn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r;)if(r==="'"){if(e[n+1]!=="'")break;r=e[n+=2]}else r=e[n+=1];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;al?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function Co(t,e){switch(t){case u.Type.ALIAS:return new _n(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new xn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new Rn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ut(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new Dn(t,e);case u.Type.QUOTE_SINGLE:return new Yn(t,e);default:return null}}var Bn=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:d,valueStart:y}=f.parseProps(l),h=Co(d,m),g=h.parse(f,y);if(h.range=new u.Range(l,g),g<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=g,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new $t(h);return g=w.parse(new t(f),g),w.range=new u.Range(l,g),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ut)return!0;let i=e.range.end;return s[i]===` +`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function Mo(t,e){switch(t){case u.Type.ALIAS:return new _n(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new xn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new Rn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ut(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new Dn(t,e);case u.Type.QUOTE_SINGLE:return new Yn(t,e);default:return null}}var Bn=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:d,valueStart:y}=f.parseProps(l),h=Mo(d,m),g=h.parse(f,y);if(h.range=new u.Range(l,g),g<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=g,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new Ft(h);return g=w.parse(new t(f),g),w.range=new u.Range(l,g),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ut)return!0;let i=e.range.end;return s[i]===` `||s[i-1]===` `?!1:(i=u.Node.endOfWhiteSpace(s,i),s[i]===":")}parseProps(e){let{inFlow:n,parent:r,src:s}=this,i=[],o=!1;e=this.atLineStart?u.Node.endOfIndent(s,e):u.Node.endOfWhiteSpace(s,e);let a=s[e];for(;a===u.Char.ANCHOR||a===u.Char.COMMENT||a===u.Char.TAG||a===` `;){if(a===` `){let l=e,f;do f=l+1,l=u.Node.endOfIndent(s,f);while(s[l]===` -`);let m=l-(f+this.indent),d=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!d))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function Mo(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),` +`);let m=l-(f+this.indent),d=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!d))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function ko(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),` `)));let n=[],r=0;do{let s=new Pn,i=new Bn({src:t});r=s.parse(i,r),n.push(s)}while(r{if(e.length===0)return!1;for(let i=1;in.join(`... -`),n}vs.parse=Mo});var $e=ee(k=>{"use strict";var p=le();function ko(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)} +`),n}Ps.parse=ko});var $e=ee(k=>{"use strict";var p=le();function vo(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)} ${e}${t}`:t}function Be(t,e,n){return n?n.indexOf(` `)===-1?`${t} #${n}`:`${t} -`+n.replace(/^/gm,`${e||""}#`):t}var V=class{};function ue(t,e,n){if(Array.isArray(t))return t.map((r,s)=>ue(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var P=class extends V{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:ue(this.value,e,n)}toString(){return String(this.value)}};function Ps(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var Rs=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,W=class t extends V{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(Rs(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Ps(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof P?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof P&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,Ps(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let d=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:i,inFlow:m,type:null});let y=!1,h=!1,g=this.items.reduce((C,L,M)=>{let A;L&&(!y&&L.spaceBefore&&C.push({type:"comment",str:""}),L.commentBefore&&L.commentBefore.match(/^.*$/gm).forEach(Oi=>{C.push({type:"comment",str:`#${Oi}`})}),L.comment&&(A=L.comment),m&&(!y&&L.spaceBefore||L.commentBefore||L.comment||L.key&&(L.key.commentBefore||L.key.comment)||L.value&&(L.value.commentBefore||L.value.comment))&&(h=!0)),y=!1;let _=f(L,e,()=>A=null,()=>y=!0);return m&&!h&&_.includes(` +`+n.replace(/^/gm,`${e||""}#`):t}var V=class{};function ue(t,e,n){if(Array.isArray(t))return t.map((r,s)=>ue(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var P=class extends V{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:ue(this.value,e,n)}toString(){return String(this.value)}};function xs(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var Ys=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,W=class t extends V{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(Ys(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,xs(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof P?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof P&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,xs(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let d=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:i,inFlow:m,type:null});let y=!1,h=!1,g=this.items.reduce((C,L,M)=>{let A;L&&(!y&&L.spaceBefore&&C.push({type:"comment",str:""}),L.commentBefore&&L.commentBefore.match(/^.*$/gm).forEach(Oi=>{C.push({type:"comment",str:`#${Oi}`})}),L.comment&&(A=L.comment),m&&(!y&&L.spaceBefore||L.commentBefore||L.comment||L.key&&(L.key.commentBefore||L.key.comment)||L.value&&(L.value.commentBefore||L.value.comment))&&(h=!0)),y=!1;let _=f(L,e,()=>A=null,()=>y=!0);return m&&!h&&_.includes(` `)&&(h=!0),m&&MA.str);if(h||M.reduce((A,_)=>A+_.length+2,2)>t.maxFlowStringSingleLineLength){w=C;for(let A of M)w+=A?` ${l}${c}${A}`:` `;w+=` ${c}${L}`}else w=`${C} ${M.join(" ")} ${L}`}else{let C=g.map(n);w=C.shift();for(let L of C)w+=L?` ${c}${L}`:` `}return this.comment?(w+=` -`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(W,"maxFlowStringSingleLineLength",60);function Ft(t){let e=t instanceof P?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var pe=class extends W{add(e){this.items.push(e)}delete(e){let n=Ft(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Ft(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof P?s.value:s}has(e){let n=Ft(e);return typeof n=="number"&&ns.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},vo=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof V&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends V{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof V?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new P(null)),this.key instanceof V)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=ue(this.key,"",e);if(n instanceof Map){let s=ue(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=vo(this.key,r,e),i=ue(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof V&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof W){let _="With simple keys, collection cannot be used as a key value";throw new Error(_)}}let f=!o&&(!a||l||(a instanceof V?a instanceof W||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:d,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:d+y});let g=!1,w=h(a,e,()=>l=null,()=>g=!0);if(w=Be(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Be(w,e.indent,this.comment),n&&n()):g&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w} +`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(W,"maxFlowStringSingleLineLength",60);function qt(t){let e=t instanceof P?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var pe=class extends W{add(e){this.items.push(e)}delete(e){let n=qt(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=qt(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof P?s.value:s}has(e){let n=qt(e);return typeof n=="number"&&ns.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},Io=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof V&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends V{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof V?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new P(null)),this.key instanceof V)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=ue(this.key,"",e);if(n instanceof Map){let s=ue(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=Io(this.key,r,e),i=ue(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof V&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof W){let _="With simple keys, collection cannot be used as a key value";throw new Error(_)}}let f=!o&&(!a||l||(a instanceof V?a instanceof W||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:d,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:d+y});let g=!1,w=h(a,e,()=>l=null,()=>g=!0);if(w=Be(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Be(w,e.indent,this.comment),n&&n()):g&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w} ${d}:`:`${w}:`,this.comment&&(w=Be(w,e.indent,this.comment),n&&n());let C="",L=null;if(c instanceof V){if(c.spaceBefore&&(C=` `),c.commentBefore){let _=c.commentBefore.replace(/^/gm,`${e.indent}#`);C+=` ${_}`}L=c.comment}else c&&typeof c=="object"&&(c=m.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof P&&(e.indentAtStart=w.length+1),g=!1,!i&&s>=2&&!e.inFlow&&!f&&c instanceof pe&&c.type!==p.Type.FLOW_SEQ&&!c.tag&&!m.anchors.getName(c)&&(e.indent=e.indent.substr(2));let M=h(c,e,()=>L=null,()=>g=!0),A=" ";return C||this.comment?A=`${C} ${e.indent}`:!f&&c instanceof W?(!(M[0]==="["||M[0]==="{")||M.includes(` `))&&(A=` ${e.indent}`):M[0]===` -`&&(A=""),g&&!L&&r&&r(),Be(w+A+M,e.indent,L)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var qt=(t,e)=>{if(t instanceof we){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof W){let n=0;for(let r of t.items){let s=qt(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=qt(t.key,e),r=qt(t.value,e);return Math.max(n,r)}return 1},we=class t extends V{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return ue(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=qt(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(we,"default",!0);function pt(t,e){let n=e instanceof P?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var mt=class extends W{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=pt(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=pt(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=pt(this.items,e),s=r&&r.value;return!n&&s instanceof P?s.value:s}has(e){return!!pt(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},Ds="<<",Vt=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof pe||(n=new pe,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new P(Ds),new pe);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof mt))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},Io={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},Po={trueStr:"true",falseStr:"false"},_o={asBigInt:!1},xo={nullStr:"null"},be={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Fn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof P||(a=new P(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new P(t)}var Ys="flow",$n="block",Ut="quoted",_s=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==` -`);n=t[e+1]}return e};function Wt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let d,y,h=!1,g=-1,w=-1,C=-1;n===$n&&(g=_s(t,g),g!==-1&&(m=g+c));for(let M;M=t[g+=1];){if(n===Ut&&M==="\\"){switch(w=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}C=g}if(M===` -`)n===$n&&(g=_s(t,g)),m=g+c,d=void 0;else{if(M===" "&&y&&y!==" "&&y!==` +`&&(A=""),g&&!L&&r&&r(),Be(w+A+M,e.indent,L)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Ut=(t,e)=>{if(t instanceof we){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof W){let n=0;for(let r of t.items){let s=Ut(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=Ut(t.key,e),r=Ut(t.value,e);return Math.max(n,r)}return 1},we=class t extends V{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return ue(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=Ut(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(we,"default",!0);function pt(t,e){let n=e instanceof P?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var mt=class extends W{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=pt(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=pt(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=pt(this.items,e),s=r&&r.value;return!n&&s instanceof P?s.value:s}has(e){return!!pt(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},Bs="<<",Wt=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof pe||(n=new pe,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new P(Bs),new pe);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof mt))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},Po={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},_o={trueStr:"true",falseStr:"false"},xo={asBigInt:!1},Ro={nullStr:"null"},be={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Fn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof P||(a=new P(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new P(t)}var $s="flow",$n="block",Kt="quoted",Rs=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==` +`);n=t[e+1]}return e};function jt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let d,y,h=!1,g=-1,w=-1,C=-1;n===$n&&(g=Rs(t,g),g!==-1&&(m=g+c));for(let M;M=t[g+=1];){if(n===Kt&&M==="\\"){switch(w=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}C=g}if(M===` +`)n===$n&&(g=Rs(t,g)),m=g+c,d=void 0;else{if(M===" "&&y&&y!==" "&&y!==` `&&y!==" "){let A=t[g+1];A&&A!==" "&&A!==` -`&&A!==" "&&(d=g)}if(g>=m)if(d)l.push(d),m=d+c,d=void 0;else if(n===Ut){for(;y===" "||y===" ";)y=M,M=t[g+=1],h=!0;let A=g>C+1?g-2:w-1;if(f[A])return t;l.push(A),f[A]=!0,m=A+c,d=void 0}else h=!0}y=M}if(h&&a&&a(),l.length===0)return t;o&&o();let L=t.slice(0,l[0]);for(let M=0;Mt?Object.assign({indentAtStart:t},be.fold):be.fold,jt=t=>/^(%|---|\.\.\.)/m.test(t);function Ro(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;ir)return!0;if(o=i+1,s-o<=r)return!1}return!0}function Se(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=be.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(jt(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length=m)if(d)l.push(d),m=d+c,d=void 0;else if(n===Kt){for(;y===" "||y===" ";)y=M,M=t[g+=1],h=!0;let A=g>C+1?g-2:w-1;if(f[A])return t;l.push(A),f[A]=!0,m=A+c,d=void 0}else h=!0}y=M}if(h&&a&&a(),l.length===0)return t;o&&o();let L=t.slice(0,l[0]);for(let M=0;Mt?Object.assign({indentAtStart:t},be.fold):be.fold,Qt=t=>/^(%|---|\.\.\.)/m.test(t);function Do(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;ir)return!0;if(o=i+1,s-o<=r)return!1}return!0}function Se(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=be.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(Qt(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length";if(!n)return l+` +`,l+=2;a+=o,i[l+2]===" "&&(a+="\\"),l+=1,c=l+1}break;default:l+=1}return a=c?a+i.slice(c):i,n?a:jt(a,o,Kt,qn(e))}function Fs(t,e){if(e.implicitKey){if(/\n/.test(t))return Se(t,e)}else if(/[ \t]\n|\n[ \t]/.test(t))return Se(t,e);let n=e.indent||(Qt(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$& +${n}`)+"'";return e.implicitKey?r:jt(r,n,$s,qn(e))}function Vt({comment:t,type:e,value:n},r,s,i){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Se(n,r);let o=r.indent||(r.forceBlockIndent||Qt(n)?" ":""),a=o?"2":"1",c=e===p.Type.BLOCK_FOLDED?!1:e===p.Type.BLOCK_LITERAL?!0:!Do(n,be.fold.lineWidth,o.length),l=c?"|":">";if(!n)return l+` `;let f="",m="";if(n=n.replace(/[\n\t ]*$/,y=>{let h=y.indexOf(` `);return h===-1?l+="-":(n===y||h!==y.length-1)&&(l+="+",i&&i()),m=y.replace(/\n$/,""),""}).replace(/^[\n ]*/,y=>{y.indexOf(" ")!==-1&&(l+=a);let h=y.match(/ +$/);return h?(f=y.slice(0,-h[0].length),h[0]):(f=y,"")}),m&&(m=m.replace(/\n+(?!\n|$)/g,`$&${o}`)),f&&(f=f.replace(/\n+/g,`$&${o}`)),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),s&&s()),!n)return`${l}${a} ${o}${m}`;if(c)return n=n.replace(/\n+/g,`$&${o}`),`${l} ${o}${f}${n}${m}`;n=n.replace(/\n+/g,` -$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let d=Wt(`${f}${n}${m}`,o,$n,be.fold);return`${l} -${o}${d}`}function Do(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return Se(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(` -`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?Bs(o,e):Se(o,e):Kt(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(` -`)!==-1)return Kt(t,e,n,r);if(l===""&&jt(o))return e.forceBlockIndent=!0,Kt(t,e,n,r);let m=o.replace(/\n+/g,`$& -${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof Fn(m,y,y.scalarFallback).value!="string")return Se(o,e)}let d=c?m:Wt(m,l,Ys,qn(e));return s&&!f&&(d.indexOf(` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let d=jt(`${f}${n}${m}`,o,$n,be.fold);return`${l} +${o}${d}`}function Yo(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return Se(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(` +`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?Fs(o,e):Se(o,e):Vt(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(` +`)!==-1)return Vt(t,e,n,r);if(l===""&&Qt(o))return e.forceBlockIndent=!0,Vt(t,e,n,r);let m=o.replace(/\n+/g,`$& +${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof Fn(m,y,y.scalarFallback).value!="string")return Se(o,e)}let d=c?m:jt(m,l,$s,qn(e));return s&&!f&&(d.indexOf(` `)!==-1||s.indexOf(` -`)!==-1)?(n&&n(),ko(d,l,s)):d}function Yo(t,e,n,r){let{defaultType:s}=be,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return Kt(t,e,n,r);case p.Type.QUOTE_DOUBLE:return Se(c,e);case p.Type.QUOTE_SINGLE:return Bs(c,e);case p.Type.PLAIN:return Do(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function Bo({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function $s(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function Fs(t,e){let n=e.context.src[e.range.start-1];if(n!==` -`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function qs(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function Us(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=` +`)!==-1)?(n&&n(),vo(d,l,s)):d}function Bo(t,e,n,r){let{defaultType:s}=be,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return Vt(t,e,n,r);case p.Type.QUOTE_DOUBLE:return Se(c,e);case p.Type.QUOTE_SINGLE:return Fs(c,e);case p.Type.PLAIN:return Yo(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function $o({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function qs(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function Us(t,e){let n=e.context.src[e.range.start-1];if(n!==` +`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function Ks(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function Vs(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=` `+s:i.commentBefore=s):s!==void 0&&(t.comment?t.comment+=` -`+s:t.comment=s)}}function Un(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function $o(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function Fo(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return $o(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function xs(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof W?a:new P(a)}let i=Un(t,e);return typeof i=="string"&&s.length>0?Fn(i,s,r.scalarFallback):null}function qo({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function Uo(t,e,n){try{let r=xs(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=qo(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=xs(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var Ko=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Vo(t,e){let n={before:[],after:[]},r=!1,s=!1,i=Ko(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function Wo(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new we(a);return n._cstAliases.push(c),c}let i=Fo(t,e);if(i)return Uo(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Un(t,e);return Fn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function me(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Vo(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=Wo(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(` +`+s:t.comment=s)}}function Un(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function Fo(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function qo(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return Fo(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function Ds(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof W?a:new P(a)}let i=Un(t,e);return typeof i=="string"&&s.length>0?Fn(i,s,r.scalarFallback):null}function Uo({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function Ko(t,e,n){try{let r=Ds(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=Uo(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=Ds(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var Vo=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Wo(t,e){let n={before:[],after:[]},r=!1,s=!1,i=Vo(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function jo(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new we(a);return n._cstAliases.push(c),c}let i=qo(t,e);if(i)return Ko(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Un(t,e);return Fn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function me(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Wo(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=jo(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(` `);o&&(i.commentBefore=i.commentBefore?`${i.commentBefore} ${o}`:o);let a=n.after.join(` `);a&&(i.comment=i.comment?`${i.comment} -${a}`:a)}return e.resolved=i}function jo(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?Ho(t,e):Go(t,e),s=new mt;s.items=r,Us(s,n);let i=!1;for(let o=0;o{if(f instanceof we){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,me(t,c));Jo(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(qs(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=me(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Ho(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;ai instanceof T&&i.key instanceof W)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function zo(t,e){let n=[],r=[];for(let s=0;so+1024&&t.errors.push(qs(e,i));let{src:h}=c.context;for(let g=o;g{"use strict";var j=le(),O=$e(),ea={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c1){let o="Each pair must have its own sequence indicator";throw new j.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore} +${a}`:a)}return e.resolved=i}function Qo(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?Xo(t,e):Ho(t,e),s=new mt;s.items=r,Vs(s,n);let i=!1;for(let o=0;o{if(f instanceof we){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,me(t,c));Go(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(Ks(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=me(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Xo(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;ai instanceof T&&i.key instanceof W)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function Zo(t,e){let n=[],r=[];for(let s=0;so+1024&&t.errors.push(Ks(e,i));let{src:h}=c.context;for(let g=o;g{"use strict";var j=le(),O=$e(),ta={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c1){let o="Each pair must have its own sequence indicator";throw new j.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore} ${i.commentBefore}`:s.commentBefore),s.comment&&(i.comment=i.comment?`${s.comment} -${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function Ws(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var ta={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Vs,createNode:Ws},Fe=class t extends O.YAMLSeq{constructor(){super(),j._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),j._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),j._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),j._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),j._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};j._defineProperty(Fe,"tag","tag:yaml.org,2002:omap");function na(t,e){let n=Vs(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new j.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new Fe,n)}function ra(t,e,n){let r=Ws(t,e,n),s=new Fe;return s.items=r.items,s}var sa={identify:t=>t instanceof Map,nodeClass:Fe,default:!1,tag:"tag:yaml.org,2002:omap",resolve:na,createNode:ra},qe=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};j._defineProperty(qe,"tag","tag:yaml.org,2002:set");function ia(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new j.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new qe,n)}function oa(t,e,n){let r=new qe;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var aa={identify:t=>t instanceof Set,nodeClass:qe,default:!1,tag:"tag:yaml.org,2002:set",resolve:ia,createNode:oa},Kn=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},js=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},ca={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>Kn(e,n.replace(/_/g,"")),stringify:js},la={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>Kn(e,n.replace(/_/g,"")),stringify:js},fa={identify:t=>t 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:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=Kn(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Vn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function Wn(t,e){Vn(!1)&&console.warn(e?`${e}: ${t}`:t)}function ua(t){if(Vn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Wn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var Ks={};function pa(t,e){if(!Ks[t]&&Vn(!0)){Ks[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",Wn(n,"DeprecationWarning")}}z.binary=ea;z.floatTime=la;z.intTime=ca;z.omap=sa;z.pairs=ta;z.set=aa;z.timestamp=fa;z.warn=Wn;z.warnFileDeprecation=ua;z.warnOptionDeprecation=pa});var Hn=ee(ii=>{"use strict";var Gt=le(),E=$e(),D=jn();function ma(t,e,n){let r=new E.YAMLMap(t);if(e instanceof Map)for(let[s,i]of e)r.items.push(t.createPair(s,i,n));else if(e&&typeof e=="object")for(let s of Object.keys(e))r.items.push(t.createPair(s,e[s],n));return typeof t.sortMapEntries=="function"&&r.items.sort(t.sortMapEntries),r}var gt={createNode:ma,default:!0,nodeClass:E.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:E.resolveMap};function ha(t,e,n){let r=new E.YAMLSeq(t);if(e&&e[Symbol.iterator])for(let s of e){let i=t.createNode(s,n.wrapScalars,null,n);r.items.push(i)}return r}var Ht={createNode:ha,default:!0,nodeClass:E.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:E.resolveSeq},ga={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),E.stringifyString(t,e,n,r)},options:E.strOptions},Jn=[gt,Ht,ga],Xt=t=>typeof t=="bigint"||Number.isInteger(t),Gn=(t,e,n)=>E.intOptions.asBigInt?BigInt(t):parseInt(e,n);function Gs(t,e,n){let{value:r}=t;return Xt(r)&&r>=0?n+r.toString(e):E.stringifyNumber(t)}var Hs={identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},Xs={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>t[0]==="t"||t[0]==="T",options:E.boolOptions,stringify:({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr},zs={identify:t=>Xt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(t,e)=>Gn(t,e,8),options:E.intOptions,stringify:t=>Gs(t,8,"0o")},Zs={identify:Xt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:t=>Gn(t,t,10),options:E.intOptions,stringify:E.stringifyNumber},ei={identify:t=>Xt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(t,e)=>Gn(t,e,16),options:E.intOptions,stringify:t=>Gs(t,16,"0x")},ti={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},ni={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify:({value:t})=>Number(t).toExponential()},ri={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(t,e,n){let r=e||n,s=new E.Scalar(parseFloat(t));return r&&r[r.length-1]==="0"&&(s.minFractionDigits=r.length),s},stringify:E.stringifyNumber},da=Jn.concat([Hs,Xs,zs,Zs,ei,ti,ni,ri]),Qs=t=>typeof t=="bigint"||Number.isInteger(t),Qt=({value:t})=>JSON.stringify(t),si=[gt,Ht,{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify:Qt},{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Qt},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Qt},{identify:Qs,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:t=>E.intOptions.asBigInt?BigInt(t):parseInt(t,10),stringify:({value:t})=>Qs(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Qt}];si.scalarFallback=t=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`)};var Js=({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr,ht=t=>typeof t=="bigint"||Number.isInteger(t);function Jt(t,e,n){let r=e.replace(/_/g,"");if(E.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}let i=BigInt(r);return t==="-"?BigInt(-1)*i:i}let s=parseInt(r,n);return t==="-"?-1*s:s}function Qn(t,e,n){let{value:r}=t;if(ht(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return E.stringifyNumber(t)}var ya=Jn.concat([{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:E.boolOptions,stringify:Js},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:E.boolOptions,stringify:Js},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(t,e,n)=>Jt(e,n,2),stringify:t=>Qn(t,2,"0b")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(t,e,n)=>Jt(e,n,8),stringify:t=>Qn(t,8,"0")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(t,e,n)=>Jt(e,n,10),stringify:E.stringifyNumber},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(t,e,n)=>Jt(e,n,16),stringify:t=>Qn(t,16,"0x")},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify:({value:t})=>Number(t).toExponential()},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(t,e){let n=new E.Scalar(parseFloat(t.replace(/_/g,"")));if(e){let r=e.replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:E.stringifyNumber}],D.binary,D.omap,D.pairs,D.set,D.intTime,D.floatTime,D.timestamp),Ea={core:da,failsafe:Jn,json:si,yaml11:ya},Sa={binary:D.binary,bool:Xs,float:ri,floatExp:ni,floatNaN:ti,floatTime:D.floatTime,int:Zs,intHex:ei,intOct:zs,intTime:D.intTime,map:gt,null:Hs,omap:D.omap,pairs:D.pairs,seq:Ht,set:D.set,timestamp:D.timestamp};function wa(t,e,n){if(e){let r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)||r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>(r.identify&&r.identify(t)||r.class&&t instanceof r.class)&&!r.format)}function ba(t,e,n){if(t instanceof E.Node)return t;let{defaultPrefix:r,onTagObj:s,prevObjects:i,schema:o,wrapScalars:a}=n;e&&e.startsWith("!!")&&(e=r+e.slice(2));let c=wa(t,e,o.tags);if(!c){if(typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object")return a?new E.Scalar(t):t;c=t instanceof Map?gt:t[Symbol.iterator]?Ht:gt}s&&(s(c),delete n.onTagObj);let l={value:void 0,node:void 0};if(t&&typeof t=="object"&&i){let f=i.get(t);if(f){let m=new E.Alias(f);return n.aliasNodes.push(m),m}l.value=t,i.set(t,l)}return l.node=c.createNode?c.createNode(n.schema,t,n):a?new E.Scalar(t):t,e&&l.node instanceof E.Node&&(l.node.tag=e),l.node}function Na(t,e,n,r){let s=t[r.replace(/\W/g,"")];if(!s){let i=Object.keys(t).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${i}`)}if(Array.isArray(n))for(let i of n)s=s.concat(i);else typeof n=="function"&&(s=n(s.slice()));for(let i=0;iJSON.stringify(l)).join(", ");throw new Error(`Unknown custom tag "${o}"; use one of ${c}`)}s[i]=a}}return s}var Oa=(t,e)=>t.keye.key?1:0,dt=class t{constructor({customTags:e,merge:n,schema:r,sortMapEntries:s,tags:i}){this.merge=!!n,this.name=r,this.sortMapEntries=s===!0?Oa:s||null,!e&&i&&D.warnOptionDeprecation("tags","customTags"),this.tags=Na(Ea,Sa,e||i,r)}createNode(e,n,r,s){let i={defaultPrefix:t.defaultPrefix,schema:this,wrapScalars:n},o=s?Object.assign(s,i):i;return ba(e,r,o)}createPair(e,n,r){r||(r={wrapScalars:!0});let s=this.createNode(e,r.wrapScalars,null,r),i=this.createNode(n,r.wrapScalars,null,r);return new E.Pair(s,i)}};Gt._defineProperty(dt,"defaultPrefix",Gt.defaultTagPrefix);Gt._defineProperty(dt,"defaultTags",Gt.defaultTags);ii.Schema=dt});var li=ee(tn=>{"use strict";var Y=le(),S=$e(),oi=Hn(),La={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"},Aa={get binary(){return S.binaryOptions},set binary(t){Object.assign(S.binaryOptions,t)},get bool(){return S.boolOptions},set bool(t){Object.assign(S.boolOptions,t)},get int(){return S.intOptions},set int(t){Object.assign(S.intOptions,t)},get null(){return S.nullOptions},set null(t){Object.assign(S.nullOptions,t)},get str(){return S.strOptions},set str(t){Object.assign(S.strOptions,t)}},ci={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Y.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]}};function ai(t,e){if((t.version||t.options.version)==="1.0"){let s=e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(s)return"!"+s[1];let i=e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return i?`!${i[1]}/${i[2]}`:`!${e.replace(/^tag:/,"")}`}let n=t.tagPrefixes.find(s=>e.indexOf(s.prefix)===0);if(!n){let s=t.getDefaults().tagPrefixes;n=s&&s.find(i=>e.indexOf(i.prefix)===0)}if(!n)return e[0]==="!"?e:`!<${e}>`;let r=e.substr(n.prefix.length).replace(/[!,[\]{}]/g,s=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[s]);return n.handle+r}function Ta(t,e){if(e instanceof S.Alias)return S.Alias;if(e.tag){let s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)||s[0]}let n,r;if(e instanceof S.Scalar){r=e.value;let s=t.filter(i=>i.identify&&i.identify(r)||i.class&&r instanceof i.class);n=s.find(i=>i.format===e.format)||s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${s} value`)}return n}function Ca(t,e,{anchors:n,doc:r}){let s=[],i=r.anchors.getName(t);return i&&(n[i]=t,s.push(`&${i}`)),t.tag?s.push(ai(r,t.tag)):e.default||s.push(ai(r,e.tag)),s.join(" ")}function zt(t,e,n,r){let{anchors:s,schema:i}=e.doc,o;if(!(t instanceof S.Node)){let l={aliasNodes:[],onTagObj:f=>o=f,prevObjects:new Map};t=i.createNode(t,!0,null,l);for(let f of l.aliasNodes){f.source=f.source.node;let m=s.getName(f.source);m||(m=s.newName(),s.map[m]=f.source)}}if(t instanceof S.Pair)return t.toString(e,n,r);o||(o=Ta(i.tags,t));let a=Ca(t,o,e);a.length>0&&(e.indentAtStart=(e.indentAtStart||0)+a.length+1);let c=typeof o.stringify=="function"?o.stringify(t,e,n,r):t instanceof S.Scalar?S.stringifyString(t,e,n,r):t.toString(e,n,r);return a?t instanceof S.Scalar||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a} -${e.indent}${c}`:c}var Xn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},Zt=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>Zt(r,e))):t instanceof S.Pair?(Zt(t.key,e),Zt(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},Ma=t=>Object.keys(Zt(t,{}));function ka(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(` +${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function Qs(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var na={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:js,createNode:Qs},Fe=class t extends O.YAMLSeq{constructor(){super(),j._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),j._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),j._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),j._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),j._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};j._defineProperty(Fe,"tag","tag:yaml.org,2002:omap");function ra(t,e){let n=js(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new j.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new Fe,n)}function sa(t,e,n){let r=Qs(t,e,n),s=new Fe;return s.items=r.items,s}var ia={identify:t=>t instanceof Map,nodeClass:Fe,default:!1,tag:"tag:yaml.org,2002:omap",resolve:ra,createNode:sa},qe=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};j._defineProperty(qe,"tag","tag:yaml.org,2002:set");function oa(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new j.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new qe,n)}function aa(t,e,n){let r=new qe;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var ca={identify:t=>t instanceof Set,nodeClass:qe,default:!1,tag:"tag:yaml.org,2002:set",resolve:oa,createNode:aa},Kn=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},Js=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},la={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>Kn(e,n.replace(/_/g,"")),stringify:Js},fa={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>Kn(e,n.replace(/_/g,"")),stringify:Js},ua={identify:t=>t 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:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=Kn(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Vn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function Wn(t,e){Vn(!1)&&console.warn(e?`${e}: ${t}`:t)}function pa(t){if(Vn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Wn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var Ws={};function ma(t,e){if(!Ws[t]&&Vn(!0)){Ws[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",Wn(n,"DeprecationWarning")}}z.binary=ta;z.floatTime=fa;z.intTime=la;z.omap=ia;z.pairs=na;z.set=ca;z.timestamp=ua;z.warn=Wn;z.warnFileDeprecation=pa;z.warnOptionDeprecation=ma});var Hn=ee(ai=>{"use strict";var Ht=le(),E=$e(),D=jn();function ha(t,e,n){let r=new E.YAMLMap(t);if(e instanceof Map)for(let[s,i]of e)r.items.push(t.createPair(s,i,n));else if(e&&typeof e=="object")for(let s of Object.keys(e))r.items.push(t.createPair(s,e[s],n));return typeof t.sortMapEntries=="function"&&r.items.sort(t.sortMapEntries),r}var gt={createNode:ha,default:!0,nodeClass:E.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:E.resolveMap};function ga(t,e,n){let r=new E.YAMLSeq(t);if(e&&e[Symbol.iterator])for(let s of e){let i=t.createNode(s,n.wrapScalars,null,n);r.items.push(i)}return r}var Xt={createNode:ga,default:!0,nodeClass:E.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:E.resolveSeq},da={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),E.stringifyString(t,e,n,r)},options:E.strOptions},Jn=[gt,Xt,da],zt=t=>typeof t=="bigint"||Number.isInteger(t),Gn=(t,e,n)=>E.intOptions.asBigInt?BigInt(t):parseInt(e,n);function Xs(t,e,n){let{value:r}=t;return zt(r)&&r>=0?n+r.toString(e):E.stringifyNumber(t)}var zs={identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},Zs={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>t[0]==="t"||t[0]==="T",options:E.boolOptions,stringify:({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr},ei={identify:t=>zt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(t,e)=>Gn(t,e,8),options:E.intOptions,stringify:t=>Xs(t,8,"0o")},ti={identify:zt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:t=>Gn(t,t,10),options:E.intOptions,stringify:E.stringifyNumber},ni={identify:t=>zt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(t,e)=>Gn(t,e,16),options:E.intOptions,stringify:t=>Xs(t,16,"0x")},ri={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},si={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify:({value:t})=>Number(t).toExponential()},ii={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(t,e,n){let r=e||n,s=new E.Scalar(parseFloat(t));return r&&r[r.length-1]==="0"&&(s.minFractionDigits=r.length),s},stringify:E.stringifyNumber},ya=Jn.concat([zs,Zs,ei,ti,ni,ri,si,ii]),Gs=t=>typeof t=="bigint"||Number.isInteger(t),Jt=({value:t})=>JSON.stringify(t),oi=[gt,Xt,{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify:Jt},{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Jt},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Jt},{identify:Gs,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:t=>E.intOptions.asBigInt?BigInt(t):parseInt(t,10),stringify:({value:t})=>Gs(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Jt}];oi.scalarFallback=t=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`)};var Hs=({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr,ht=t=>typeof t=="bigint"||Number.isInteger(t);function Gt(t,e,n){let r=e.replace(/_/g,"");if(E.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}let i=BigInt(r);return t==="-"?BigInt(-1)*i:i}let s=parseInt(r,n);return t==="-"?-1*s:s}function Qn(t,e,n){let{value:r}=t;if(ht(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return E.stringifyNumber(t)}var Ea=Jn.concat([{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:E.boolOptions,stringify:Hs},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:E.boolOptions,stringify:Hs},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(t,e,n)=>Gt(e,n,2),stringify:t=>Qn(t,2,"0b")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(t,e,n)=>Gt(e,n,8),stringify:t=>Qn(t,8,"0")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(t,e,n)=>Gt(e,n,10),stringify:E.stringifyNumber},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(t,e,n)=>Gt(e,n,16),stringify:t=>Qn(t,16,"0x")},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify:({value:t})=>Number(t).toExponential()},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(t,e){let n=new E.Scalar(parseFloat(t.replace(/_/g,"")));if(e){let r=e.replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:E.stringifyNumber}],D.binary,D.omap,D.pairs,D.set,D.intTime,D.floatTime,D.timestamp),Sa={core:ya,failsafe:Jn,json:oi,yaml11:Ea},wa={binary:D.binary,bool:Zs,float:ii,floatExp:si,floatNaN:ri,floatTime:D.floatTime,int:ti,intHex:ni,intOct:ei,intTime:D.intTime,map:gt,null:zs,omap:D.omap,pairs:D.pairs,seq:Xt,set:D.set,timestamp:D.timestamp};function ba(t,e,n){if(e){let r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)||r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>(r.identify&&r.identify(t)||r.class&&t instanceof r.class)&&!r.format)}function Na(t,e,n){if(t instanceof E.Node)return t;let{defaultPrefix:r,onTagObj:s,prevObjects:i,schema:o,wrapScalars:a}=n;e&&e.startsWith("!!")&&(e=r+e.slice(2));let c=ba(t,e,o.tags);if(!c){if(typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object")return a?new E.Scalar(t):t;c=t instanceof Map?gt:t[Symbol.iterator]?Xt:gt}s&&(s(c),delete n.onTagObj);let l={value:void 0,node:void 0};if(t&&typeof t=="object"&&i){let f=i.get(t);if(f){let m=new E.Alias(f);return n.aliasNodes.push(m),m}l.value=t,i.set(t,l)}return l.node=c.createNode?c.createNode(n.schema,t,n):a?new E.Scalar(t):t,e&&l.node instanceof E.Node&&(l.node.tag=e),l.node}function Oa(t,e,n,r){let s=t[r.replace(/\W/g,"")];if(!s){let i=Object.keys(t).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${i}`)}if(Array.isArray(n))for(let i of n)s=s.concat(i);else typeof n=="function"&&(s=n(s.slice()));for(let i=0;iJSON.stringify(l)).join(", ");throw new Error(`Unknown custom tag "${o}"; use one of ${c}`)}s[i]=a}}return s}var La=(t,e)=>t.keye.key?1:0,dt=class t{constructor({customTags:e,merge:n,schema:r,sortMapEntries:s,tags:i}){this.merge=!!n,this.name=r,this.sortMapEntries=s===!0?La:s||null,!e&&i&&D.warnOptionDeprecation("tags","customTags"),this.tags=Oa(Sa,wa,e||i,r)}createNode(e,n,r,s){let i={defaultPrefix:t.defaultPrefix,schema:this,wrapScalars:n},o=s?Object.assign(s,i):i;return Na(e,r,o)}createPair(e,n,r){r||(r={wrapScalars:!0});let s=this.createNode(e,r.wrapScalars,null,r),i=this.createNode(n,r.wrapScalars,null,r);return new E.Pair(s,i)}};Ht._defineProperty(dt,"defaultPrefix",Ht.defaultTagPrefix);Ht._defineProperty(dt,"defaultTags",Ht.defaultTags);ai.Schema=dt});var ui=ee(nn=>{"use strict";var Y=le(),S=$e(),ci=Hn(),Aa={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"},Ta={get binary(){return S.binaryOptions},set binary(t){Object.assign(S.binaryOptions,t)},get bool(){return S.boolOptions},set bool(t){Object.assign(S.boolOptions,t)},get int(){return S.intOptions},set int(t){Object.assign(S.intOptions,t)},get null(){return S.nullOptions},set null(t){Object.assign(S.nullOptions,t)},get str(){return S.strOptions},set str(t){Object.assign(S.strOptions,t)}},fi={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Y.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]}};function li(t,e){if((t.version||t.options.version)==="1.0"){let s=e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(s)return"!"+s[1];let i=e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return i?`!${i[1]}/${i[2]}`:`!${e.replace(/^tag:/,"")}`}let n=t.tagPrefixes.find(s=>e.indexOf(s.prefix)===0);if(!n){let s=t.getDefaults().tagPrefixes;n=s&&s.find(i=>e.indexOf(i.prefix)===0)}if(!n)return e[0]==="!"?e:`!<${e}>`;let r=e.substr(n.prefix.length).replace(/[!,[\]{}]/g,s=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[s]);return n.handle+r}function Ca(t,e){if(e instanceof S.Alias)return S.Alias;if(e.tag){let s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)||s[0]}let n,r;if(e instanceof S.Scalar){r=e.value;let s=t.filter(i=>i.identify&&i.identify(r)||i.class&&r instanceof i.class);n=s.find(i=>i.format===e.format)||s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${s} value`)}return n}function Ma(t,e,{anchors:n,doc:r}){let s=[],i=r.anchors.getName(t);return i&&(n[i]=t,s.push(`&${i}`)),t.tag?s.push(li(r,t.tag)):e.default||s.push(li(r,e.tag)),s.join(" ")}function Zt(t,e,n,r){let{anchors:s,schema:i}=e.doc,o;if(!(t instanceof S.Node)){let l={aliasNodes:[],onTagObj:f=>o=f,prevObjects:new Map};t=i.createNode(t,!0,null,l);for(let f of l.aliasNodes){f.source=f.source.node;let m=s.getName(f.source);m||(m=s.newName(),s.map[m]=f.source)}}if(t instanceof S.Pair)return t.toString(e,n,r);o||(o=Ca(i.tags,t));let a=Ma(t,o,e);a.length>0&&(e.indentAtStart=(e.indentAtStart||0)+a.length+1);let c=typeof o.stringify=="function"?o.stringify(t,e,n,r):t instanceof S.Scalar?S.stringifyString(t,e,n,r):t.toString(e,n,r);return a?t instanceof S.Scalar||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a} +${e.indent}${c}`:c}var Xn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},en=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>en(r,e))):t instanceof S.Pair?(en(t.key,e),en(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},ka=t=>Object.keys(en(t,{}));function va(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(` `),n.before=[]));if(t.contents=r||null,!r)t.comment=n.before.concat(n.after).join(` `)||null;else{let i=n.before.join(` `);if(i){let o=r instanceof S.Collection&&r.items[0]?r.items[0]:r;o.commentBefore=o.commentBefore?`${i} ${o.commentBefore}`:i}t.comment=n.after.join(` -`)||null}}function va({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function Ia(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!ci[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function Pa(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(va(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=Ia(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(` -`)||null}function Ue(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var en=class t{constructor(e){this.anchors=new Xn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Ue(this.contents),this.contents.add(e)}addIn(e,n){Ue(this.contents),this.contents.addIn(e,n)}delete(e){return Ue(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Ue(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Ue(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Ue(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new oi.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),Pa(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],ka(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return Ma(this.contents).filter(e=>e.indexOf(oi.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:zt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:zt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=zt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(zt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(` +`)||null}}function Ia({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function Pa(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!fi[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function _a(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(Ia(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=Pa(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(` +`)||null}function Ue(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var tn=class t{constructor(e){this.anchors=new Xn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Ue(this.contents),this.contents.add(e)}addIn(e,n){Ue(this.contents),this.contents.addIn(e,n)}delete(e){return Ue(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Ue(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Ue(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Ue(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new ci.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),_a(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],va(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return ka(this.contents).filter(e=>e.indexOf(ci.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:Zt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Zt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=Zt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(Zt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(` `)+` -`}};Y._defineProperty(en,"defaults",ci);tn.Document=en;tn.defaultOptions=La;tn.scalarOptions=Aa});var pi=ee(ui=>{"use strict";var zn=Is(),Ne=li(),_a=Hn(),xa=le(),Ra=jn();$e();function Da(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Ne.Document.defaults[Ne.defaultOptions.version],Ne.defaultOptions);return new _a.Schema(r).createNode(t,e,n)}var Ke=class extends Ne.Document{constructor(e){super(Object.assign({},Ne.defaultOptions,e))}};function Ya(t,e){let n=[],r;for(let s of zn.parse(t)){let i=new Ke(e);i.parse(s,r),n.push(i),r=i}return n}function fi(t,e){let n=zn.parse(t),r=new Ke(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new xa.YAMLSemanticError(n[1],s))}return r}function Ba(t,e){let n=fi(t,e);if(n.warnings.forEach(r=>Ra.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function $a(t,e){let n=new Ke(e);return n.contents=t,String(n)}var Fa={createNode:Da,defaultOptions:Ne.defaultOptions,Document:Ke,parse:Ba,parseAllDocuments:Ya,parseCST:zn.parse,parseDocument:fi,scalarOptions:Ne.scalarOptions,stringify:$a};ui.YAML=Fa});var hi=ee((Pm,mi)=>{mi.exports=pi().YAML});var gi=ee(Q=>{"use strict";var Ve=$e(),We=le();Q.findPair=Ve.findPair;Q.parseMap=Ve.resolveMap;Q.parseSeq=Ve.resolveSeq;Q.stringifyNumber=Ve.stringifyNumber;Q.stringifyString=Ve.stringifyString;Q.toJSON=Ve.toJSON;Q.Type=We.Type;Q.YAMLError=We.YAMLError;Q.YAMLReferenceError=We.YAMLReferenceError;Q.YAMLSemanticError=We.YAMLSemanticError;Q.YAMLSyntaxError=We.YAMLSyntaxError;Q.YAMLWarning=We.YAMLWarning});var Ga={};tr(Ga,{languages:()=>bi,options:()=>Ni,parsers:()=>er,printers:()=>Ja});var vi=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},Et=vi;var je="string",Qe="array",Je="cursor",Ge="indent",Oe="align",He="trim",Le="group",Ae="fill",Te="if-break",Xe="indent-if-break",Ce="line-suffix",ze="line-suffix-boundary",te="line",Ze="label",Me="break-parent",St=new Set([Je,Ge,Oe,He,Le,Ae,Te,Xe,Ce,ze,te,Ze,Me]);function Ii(t){if(typeof t=="string")return je;if(Array.isArray(t))return Qe;if(!t)return;let{type:e}=t;if(St.has(e))return e}var et=Ii;var Pi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function _i(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +`}};Y._defineProperty(tn,"defaults",fi);nn.Document=tn;nn.defaultOptions=Aa;nn.scalarOptions=Ta});var hi=ee(mi=>{"use strict";var zn=_s(),Ne=ui(),xa=Hn(),Ra=le(),Da=jn();$e();function Ya(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Ne.Document.defaults[Ne.defaultOptions.version],Ne.defaultOptions);return new xa.Schema(r).createNode(t,e,n)}var Ke=class extends Ne.Document{constructor(e){super(Object.assign({},Ne.defaultOptions,e))}};function Ba(t,e){let n=[],r;for(let s of zn.parse(t)){let i=new Ke(e);i.parse(s,r),n.push(i),r=i}return n}function pi(t,e){let n=zn.parse(t),r=new Ke(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Ra.YAMLSemanticError(n[1],s))}return r}function $a(t,e){let n=pi(t,e);if(n.warnings.forEach(r=>Da.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function Fa(t,e){let n=new Ke(e);return n.contents=t,String(n)}var qa={createNode:Ya,defaultOptions:Ne.defaultOptions,Document:Ke,parse:$a,parseAllDocuments:Ba,parseCST:zn.parse,parseDocument:pi,scalarOptions:Ne.scalarOptions,stringify:Fa};mi.YAML=qa});var di=ee((Dm,gi)=>{gi.exports=hi().YAML});var yi=ee(Q=>{"use strict";var Ve=$e(),We=le();Q.findPair=Ve.findPair;Q.parseMap=Ve.resolveMap;Q.parseSeq=Ve.resolveSeq;Q.stringifyNumber=Ve.stringifyNumber;Q.stringifyString=Ve.stringifyString;Q.toJSON=Ve.toJSON;Q.Type=We.Type;Q.YAMLError=We.YAMLError;Q.YAMLReferenceError=We.YAMLReferenceError;Q.YAMLSemanticError=We.YAMLSemanticError;Q.YAMLSyntaxError=We.YAMLSyntaxError;Q.YAMLWarning=We.YAMLWarning});var Ga={};tr(Ga,{languages:()=>Ir,options:()=>Pr,parsers:()=>er,printers:()=>Ja});var vi=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},Et=vi;var je="string",Qe="array",Je="cursor",Ge="indent",Oe="align",He="trim",Le="group",Ae="fill",Te="if-break",Xe="indent-if-break",Ce="line-suffix",ze="line-suffix-boundary",te="line",Ze="label",Me="break-parent",St=new Set([Je,Ge,Oe,He,Le,Ae,Te,Xe,Ce,ze,te,Ze,Me]);function Ii(t){if(typeof t=="string")return je;if(Array.isArray(t))return Qe;if(!t)return;let{type:e}=t;if(St.has(e))return e}var et=Ii;var Pi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function _i(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', Expected it to be 'string' or 'object'.`;if(et(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Pi([...St].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. Expected it to be ${r}.`}var rn=class extends Error{name="InvalidDocError";constructor(e){super(_i(e)),this.doc=e}},sn=rn;var sr=()=>{},he=sr,wt=sr;function tt(t,e){return he(e),{type:Oe,contents:e,n:t}}function ke(t,e={}){return he(t),wt(e.expandedStates,!0),{type:Le,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function on(t){return tt(Number.NEGATIVE_INFINITY,t)}function ir(t){return tt({type:"root"},t)}function or(t){return tt(-1,t)}function an(t,e){return ke(t[0],{...e,expandedStates:t})}function bt(t){return wt(t),{type:Ae,parts:t}}function nt(t,e="",n={}){return he(t),e!==""&&he(e),{type:Te,breakContents:t,flatContents:e,groupId:n.groupId}}function ar(t){return he(t),{type:Ce,contents:t}}var Nt={type:Me};var xi={type:te,hard:!0},Ri={type:te,hard:!0,literal:!0},ne={type:te},Ot={type:te,soft:!0},N=[xi,Nt],rt=[Ri,Nt];function v(t,e){he(t),wt(e);let n=[];for(let r=0;r{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},x=Di;function Yi(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(et(i)){case Qe:return e(i.map(r));case Ae:return e({...i,parts:i.parts.map(r)});case Te:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case Le:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case Oe:case Ge:case Xe:case Ze:case Ce:return e({...i,contents:r(i.contents)});case je:case Je:case He:case ze:case te:case Me:return e(i);default:throw new sn(i)}}}function cr(t,e=rt){return Yi(t,n=>typeof n=="string"?v(e,n.split(` -`)):n)}function Bi(t,e,n){let r=!!(n!=null&&n.backwards);if(e===!1)return!1;let s=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&s===` +`)):n)}function Lt(t){return(e,n,r)=>{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}ur.getVisitorKeys=()=>[];var pr=ur;var st=null;function it(t){if(st!==null&&typeof st.property){let e=st;return st=it.prototype=null,e}return st=it.prototype=t??Object.create(null),new it}var Fi=10;for(let t=0;t<=Fi;t++)it();function un(t){return it(t)}function qi(t,e="type"){un(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var mr=qi;var Ui=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),hr=Ui;var Ki=mr(hr),gr=Ki;function ve(t){return t.position.start.offset}function dr(t){return t.position.end.offset}function yr(t){return/^\s*@(?:prettier|format)\s*$/.test(t)}function Er(t){return/^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/.test(t)}function Sr(t){return`# @format -${t}`}function ve(t){return t.position.start.offset}function hr(t){return t.position.end.offset}function gr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(e.filepath))return async r=>{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}gr.getVisitorKeys=()=>[];var dr=gr;function Fi(t){return Array.isArray(t)&&t.length>0}var Ie=Fi;function G(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function un(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>un(r,e,t))}:t,n)}function Pe(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function Er(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;si===0&&i===o.length-1?s:i!==0&&i!==o.length-1?s.trim():i===0?s.trimEnd():s.trimStart());return n.proseWrap==="preserve"?r.map(s=>s.length===0?[]:[s]):r.map(s=>s.length===0?[]:wr(s)).reduce((s,i,o)=>o!==0&&r[o-1].length>0&&i.length>0&&!(t==="quoteDouble"&&x(!1,x(!1,s,-1),-1).endsWith("\\"))?[...s.slice(0,-1),[...x(!1,s,-1),...i]]:[...s,i],[]).map(s=>n.proseWrap==="never"?[s.join(" ")]:s)}function Nr(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1],i;if(t.indent===null){let c=s.match(/^(? *)[^\n\r ]/m);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(` -`).map(c=>c.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return a(o.map(c=>c.length===0?[]:[c]));return a(o.map(c=>c.length===0?[]:wr(c)).reduce((c,l,f)=>f!==0&&o[f-1].length>0&&l.length>0&&!/^\s/.test(l[0])&&!/^\s|\s$/.test(x(!1,c,-1))?[...c.slice(0,-1),[...x(!1,c,-1),...l]]:[...c,l],[]).map(c=>c.reduce((l,f)=>l.length>0&&/\s$/.test(x(!1,l,-1))?[...l.slice(0,-1),x(!1,l,-1)+" "+f]:[...l,f],[])).map(c=>r.proseWrap==="never"?[c.join(" ")]:c));function a(c){if(t.chomping==="keep")return x(!1,c,-1).length===0?c.slice(0,-1):c;let l=0;for(let f=c.length-1;f>=0&&c[f].length===0;f--)l++;return l===0?c:l>=2&&!n?c.slice(0,-(l-1)):c.slice(0,-l)}}function st(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var it=null;function ot(t){if(it!==null&&typeof it.property){let e=it;return it=ot.prototype=null,e}return it=ot.prototype=t??Object.create(null),new ot}var Ui=10;for(let t=0;t<=Ui;t++)ot();function mn(t){return ot(t)}function Ki(t,e="type"){mn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var Or=Ki;var Vi=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),Lr=Vi;var Wi=Or(Lr),Ar=Wi;function ji(t){return un(t,Qi)}function Qi(t){switch(t.type){case"document":Pe(t,"head",()=>t.children[0]),Pe(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Pe(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Pe(t,"key",()=>t.children[0]),Pe(t,"value",()=>t.children[1]);break}return t}var Tr=ji;var hn=new WeakMap;function Ct(t,e){let{node:n,root:r}=t,s;return hn.has(r)?s=hn.get(r):(s=new Set,hn.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),Er(n,e)&&!gn(t.parent))?Ot:""}function gn(t){return R(t)&&!G(t,["documentHead","documentBody","flowMapping","flowSequence"])}function I(t,e){return tt(" ".repeat(t),e)}function Mt(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Ot;s&&r.children.length>0&&n.bracketSpacing&&(a=ne);let c=x(!1,r.children,-1),l=(c==null?void 0:c.type)==="flowMappingItem"&&_e(c.key)&&_e(c.value);return[i,I(n.tabWidth,[a,Ji(t,e,n),n.trailingComma==="none"?"":nt(","),R(r)?[N,v(N,t.map(e,"endComments"))]:""]),l?"":a,o]}function Ji(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[e(),r?"":[",",ne,s.position.start.line!==i.position.start.line?Ct(t,n.originalText):""]],"children")}function Gi(t,e,n){var C;let{node:r,parent:s}=t,{key:i,value:o}=r,a=_e(i),c=_e(o);if(a&&c)return": ";let l=e("key"),f=Hi(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&dn(i.content,n)&&!H(i.content)&&((C=s.tag)==null?void 0:C.value)!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",I(2,l)];let m=e("value");if(a)return[": ",I(2,m)];if(Z(o)||!st(i.content))return["? ",I(2,l),N,...t.map(()=>[e(),N],"value","leadingComments"),": ",I(2,m)];if(Xi(i.content)&&!Z(i.content)&&!ie(i.content)&&!H(i.content)&&!R(i)&&!Z(o.content)&&!ie(o.content)&&!R(o)&&dn(o.content,n))return[l,f,": ",m];let d=Symbol("mappingKey"),y=ke([nt("? "),ke(I(2,l),{id:d})]),h=[N,": ",I(2,m)],g=[f,":"];Z(o.content)||R(o)&&o.content&&!G(o.content,["mapping","sequence"])||s.type==="mapping"&&H(i.content)&&st(o.content)||G(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?g.push(N):o.content&&g.push(ne),g.push(m);let w=I(n.tabWidth,g);return dn(i.content,n)&&!Z(i.content)&&!ie(i.content)&&!R(i)?an([[l,w]]):an([[y,nt(h,w,{groupId:d})]])}function dn(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(` -`);case"always":return!/[\n ]/.test(t.value);default:return!1}}function Hi(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function Xi(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Cr=Gi;function zi(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=At(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),pn(r)&&o.push(" ",e("indicatorComment"));let a=Nr(r,{parentIndent:s,isLastDescendant:i,options:n}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(bt(v(ne,f))),l!==a.length-1?c.push(f.length===0?N:ir(rt)):r.chomping==="keep"&&i&&c.push(on(f.length===0?N:rt));return r.indent===null?o.push(or(I(n.tabWidth,c))):o.push(on(I(r.indent-1+s,c))),o}var Mr=zi;function Zi(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&Z(r)&&s.push([v(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return G(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!At(t)&&(a=Ct(t,e.originalText)),(i||o)&&(G(r,["sequence","mapping"])&&!ie(r)?s.push(N):s.push(" ")),ie(r)&&s.push([r.middleComments.length===1?"":N,v(N,t.map(n,"middleComments")),N]),Sr(t)?s.push(cr(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(ke(eo(t,e,n))),H(r)&&!G(r,["document","documentHead"])&&s.push(ar([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&st(r)?"":Nt,n("trailingComment")])),gn(r)&&s.push(I(r.type==="sequenceItem"?2:0,[N,v(N,t.map(({node:c})=>[lr(e.originalText,ve(c))?N:"",n()],"endComments"))])),s.push(a),s}function eo(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=[];t.each(({node:o,next:a,isFirst:c})=>{c||s.push(N),s.push(n()),kr(o,a)?(s.push(N,"..."),H(o)&&s.push(" ",n("trailingComment"))):a&&!H(a.head)&&s.push(N,"---")},"children");let i=Tt(r);return(!G(i,["blockLiteral","blockFolded"])||i.chomping!=="keep")&&s.push(N),s}case"document":{let s=[];return no(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),H(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),to(r)&&s.push(n("body")),v(N,s)}case"documentHead":return v(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=Tt(r);G(a,["blockFolded","blockLiteral"])?a.chomping!=="keep"&&(o=[N,N]):o=N}return[v(N,t.map(n,"children")),o,v(N,t.map(n,"endComments"))]}case"directive":return["%",v(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return at(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let s="'",i='"',o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/.test(o)){let c=r.type==="quoteDouble"?i:s;return[c,at(r.type,o,e),c]}if(o.includes(i))return[s,at(r.type,r.type==="quoteDouble"?Et(!1,Et(!1,o,'\\"',i),"'",s.repeat(2)):o,e),s];if(o.includes(s))return[i,at(r.type,r.type==="quoteSingle"?Et(!1,o,"''",s):o,e),i];let a=e.singleQuote?s:i;return[a,at(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Mr(t,n,e);case"mapping":case"sequence":return v(N,t.map(n,"children"));case"sequenceItem":return["- ",I(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Cr(t,n,e);case"flowMapping":return Mt(t,n,e);case"flowSequence":return Mt(t,n,e);case"flowSequenceItem":return n("content");default:throw new fr(r,"YAML")}}function to(t){return t.body.children.length>0||R(t.body)}function kr(t,e){return H(t)||e&&(e.head.children.length>0||R(e.head))}function no(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/.test(e.originalText.slice(ve(n),ve(n)+4))||n.head.children.length>0||R(n.head)||H(n.head))return"head";let r=t.next;return kr(n,r)?!1:r?"root":!1}function at(t,e,n){let r=br(t,e,n);return v(N,r.map(s=>bt(v(ne,s))))}function ro(t,e){if(G(e))switch(delete e.position,e.type){case"comment":if(ur(e.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}var so={preprocess:Tr,embed:dr,print:Zi,massageAstNode:ro,insertPragma:mr,getVisitorKeys:Ar},vr=so;var er={};tr(er,{yaml:()=>ja});var kt=` -`,Ir="\r",Pr=function(){function t(e){this.length=e.length;for(var n=[0],r=0;rthis.length)return null;for(var n=0,r=this.offsets;r[n+1]<=e;)n++;var s=e-r[n];return{line:n,column:s}},t.prototype.indexForLocation=function(e){var n=e.line,r=e.column;return n<0||n>=this.offsets.length||r<0||r>this.lengthOfLine(n)?null:this.offsets[n]+r},t.prototype.lengthOfLine=function(e){var n=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-n},t}();function B(t,e=null){"children"in t&&t.children.forEach(n=>B(n,t)),"anchor"in t&&t.anchor&&B(t.anchor,t),"tag"in t&&t.tag&&B(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>B(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>B(n,t)),"indicatorComment"in t&&t.indicatorComment&&B(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&B(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>B(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function ge(t){return`${t.line}:${t.column}`}function _r(t){B(t);let e=io(t),n=t.children.slice();t.comments.sort((r,s)=>r.position.start.offset-s.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();oo(r,e,n[0])})}function io(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return xr(e,t),e}function xr(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:r}=t[n.line-1];(!r||n.column1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:r}=t[n.line-1];(!r||n.column>=r.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:r}=e.position,s=[r.line].concat(n.line===r.line?[]:n.line);for(let i of s){let o=t[i-1].trailingNode;(!o||r.column>=o.position.end.column)&&(t[i-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{xr(t,n)})}}function oo(t,e,n){let r=t.position.start.line,{trailingAttachableNode:s}=e[r-1];if(s){if(s.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${ge(t.position.start)}`);B(t,s),s.trailingComment=t;return}for(let o=r;o>=n.position.start.line;o--){let{trailingNode:a}=e[o-1],c;if(a)c=a;else if(o!==r&&e[o-1].comment)c=e[o-1].comment._parent;else continue;if((c.type==="sequence"||c.type==="mapping")&&(c=c.children[0]),c.type==="mappingItem"){let[l,f]=c.children;c=Rr(l)?l:f}for(;;){if(ao(c,t)){B(t,c),c.endComments.push(t);return}if(!c._parent)break;c=c._parent}break}for(let o=r+1;o<=n.position.end.line;o++){let{leadingAttachableNode:a}=e[o-1];if(a){B(t,a),a.leadingComments.push(t);return}}let i=n.children[1];B(t,i),i.endComments.push(t)}function ao(t,e){if(t.position.start.offsete.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offsett.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||Rr(t));default:return!1}}function Rr(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function b(t,e){return{type:t,position:e}}function Dr(t,e,n){return{...b("root",t),children:e,comments:n}}function ct(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):ct(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):ct(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&ct(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)}`)}}function X(){return{leadingComments:[]}}function oe(t=null){return{trailingComment:t}}function $(){return{...X(),...oe()}}function Yr(t,e,n){return{...b("alias",t),...$(),...e,value:n}}function Br(t,e){let n=t.cstNode;return Yr(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function $r(t){return{...t,type:"blockFolded"}}function Fr(t,e,n,r,s,i){return{...b("blockValue",t),...X(),...e,chomping:n,indent:r,value:s,indicatorComment:i}}var ae;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(ae||(ae={}));function qr(t,e){return{...b("anchor",t),value:e}}function xe(t,e){return{...b("comment",t),value:e}}function Ur(t,e,n){return{anchor:e,tag:t,middleComments:n}}function Kr(t,e){return{...b("tag",t),value:e}}function vt(t,e,n=()=>!1){let r=t.cstNode,s=[],i=null,o=null,a=null;for(let c of r.props){let l=e.text[c.origStart];switch(l){case ae.Tag:i=i||c,o=Kr(e.transformRange(c),t.tag);break;case ae.Anchor:i=i||c,a=qr(e.transformRange(c),r.anchor);break;case ae.Comment:{let f=xe(e.transformRange(c),e.text.slice(c.origStart+1,c.origEnd));e.comments.push(f),!n(f)&&i&&i.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&s.push(f);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return Ur(o,a,s)}var yn;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(yn||(yn={}));function It(t,e){let n=t.cstNode,r=1,s=n.chomping==="CLIP"?0:1,o=n.header.origEnd-n.header.origStart-r-s!==0,a=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),c=null,l=vt(t,e,f=>{if(!(a.start.offset=0;c--){let l=t.contents[c];if(l.type==="COMMENT"){let f=e.transformNode(l);n&&n.line===f.position.start.line?o.unshift(f):a?r.unshift(f):f.position.start.offset>=t.valueRange.origEnd?i.unshift(f):r.unshift(f)}else a=!0}if(i.length>1)throw new Error(`Unexpected multiple document trailing comments at ${ge(i[1].position.start)}`);if(o.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${ge(o[1].position.start)}`);return{comments:r,endComments:s,documentTrailingComment:q(i)||null,documentHeadTrailingComment:q(o)||null}}function lo(t,e,n){let r=Pt(n.text.slice(t.valueRange.origEnd),/^\.\.\./),s=r===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[s-1]==="\r"&&s--;let i=n.transformRange({origStart:e!==null?e.position.start.offset:s,origEnd:s}),o=r===-1?i.end:n.transformOffset(t.valueRange.origEnd+3);return{position:i,documentEndPoint:o}}function Zr(t,e,n,r){return{...b("documentHead",t),...F(n),...oe(r),children:e}}function es(t,e){let n=t.cstNode,{directives:r,comments:s,endComments:i}=fo(n,e),{position:o,endMarkerPoint:a}=uo(n,r,e);return e.comments.push(...s,...i),{createDocumentHeadWithTrailingComment:l=>(l&&e.comments.push(l),Zr(o,r,i,l)),documentHeadEndMarkerPoint:a}}function fo(t,e){let n=[],r=[],s=[],i=!1;for(let o=t.directives.length-1;o>=0;o--){let a=e.transformNode(t.directives[o]);a.type==="comment"?i?r.unshift(a):s.unshift(a):(i=!0,n.unshift(a))}return{directives:n,comments:r,endComments:s}}function uo(t,e,n){let r=Pt(n.text.slice(0,t.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let s=r===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:r,origEnd:r+3};return e.length!==0&&(s.origStart=e[0].position.start.offset),{position:n.transformRange(s),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function ts(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=es(t,e),{documentBody:s,documentEndPoint:i,documentTrailingComment:o,documentHeadTrailingComment:a}=zr(t,e,r),c=n(a);return o&&e.comments.push(o),Hr(K(c.position.start,i),c,s,o)}function _t(t,e,n){return{...b("flowCollection",t),...$(),...F(),...e,children:n}}function ns(t,e,n){return{..._t(t,e,n),type:"flowMapping"}}function xt(t,e,n){return{...b("flowMappingItem",t),...X(),children:[e,n]}}function ce(t,e){let n=[];for(let r of t)r&&"type"in r&&r.type==="COMMENT"?e.comments.push(e.transformNode(r)):n.push(r);return n}function Rt(t){let[e,n]=["?",":"].map(r=>{let s=t.find(i=>"char"in i&&i.char===r);return s?{origStart:s.origOffset,origEnd:s.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function Dt(t,e){let n=e;return r=>t.slice(n,n=r)}function Yt(t){let e=[],n=Dt(t,1),r=!1;for(let s=1;s{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=Rt(l);return De(a,e,xt,f,m)}),i=n[0],o=q(n);return ns(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function ss(t,e,n){return{..._t(t,e,n),type:"flowSequence"}}function is(t,e){return{...b("flowSequenceItem",t),children:[e]}}function os(t,e){let n=ce(t.cstNode.items,e),r=Yt(n),s=t.items.map((a,c)=>{if(a.type!=="PAIR"){let l=e.transformNode(a);return is(K(l.position.start,l.position.end),l)}else{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=Rt(l);return De(a,e,xt,f,m)}}),i=n[0],o=q(n);return ss(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function as(t,e,n){return{...b("mapping",t),...X(),...e,children:n}}function cs(t,e,n){return{...b("mappingItem",t),...X(),children:[e,n]}}function ls(t,e){let n=t.cstNode;n.items.filter(o=>o.type==="MAP_KEY"||o.type==="MAP_VALUE").forEach(o=>Re(o,e));let r=ce(n.items,e),s=po(r),i=t.items.map((o,a)=>{let c=s[a],[l,f]=c[0].type==="MAP_VALUE"?[null,c[0].range]:[c[0].range,c.length===1?null:c[1].range];return De(o,e,cs,l,f)});return as(K(i[0].position.start,q(i).position.end),e.transformContent(t),i)}function po(t){let e=[],n=Dt(t,0),r=!1;for(let s=0;s=0;r--)if(n.test(t[r]))return r;return-1}function ps(t,e){let n=t.cstNode;return fs(e.transformRange({origStart:n.valueRange.origStart,origEnd:us(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function ms(t){return{...t,type:"quoteDouble"}}function hs(t,e,n){return{...b("quoteValue",t),...e,...$(),value:n}}function Bt(t,e){let n=t.cstNode;return hs(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function gs(t,e){return ms(Bt(t,e))}function ds(t){return{...t,type:"quoteSingle"}}function ys(t,e){return ds(Bt(t,e))}function Es(t,e,n){return{...b("sequence",t),...X(),...F(),...e,children:n}}function Ss(t,e){return{...b("sequenceItem",t),...$(),...F(),children:e?[e]:[]}}function ws(t,e){let r=ce(t.cstNode.items,e).map((s,i)=>{Re(s,e);let o=e.transformNode(t.items[i]);return Ss(K(e.transformOffset(s.valueRange.origStart),o===null?e.transformOffset(s.valueRange.origStart+1):o.position.end),o)});return Es(K(r[0].position.start,q(r).position.end),e.transformContent(t),r)}function bs(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return Br(t,e);case"BLOCK_FOLDED":return Vr(t,e);case"BLOCK_LITERAL":return jr(t,e);case"COMMENT":return Qr(t,e);case"DIRECTIVE":return Gr(t,e);case"DOCUMENT":return ts(t,e);case"FLOW_MAP":return rs(t,e);case"FLOW_SEQ":return os(t,e);case"MAP":return ls(t,e);case"PLAIN":return ps(t,e);case"QUOTE_DOUBLE":return gs(t,e);case"QUOTE_SINGLE":return ys(t,e);case"SEQ":return ws(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}function Ns(t,e,n){let r=new SyntaxError(t);return r.name="YAMLSyntaxError",r.source=e,r.position=n,r}function Os(t,e){let n=t.source.range||t.source.valueRange;return Ns(t.message,e.text,e.transformRange(n))}function Ls(t,e,n){return{offset:t,line:e,column:n}}function As(t,e){t<0?t=0:t>e.text.length&&(t=e.text.length);let n=e.locator.locationForIndex(t);return Ls(t,n.line+1,n.column+1)}function Ts(t,e){return K(e.transformOffset(t.origStart),e.transformOffset(t.origEnd))}function Cs(t){if(!t.setOrigRanges()){let e=n=>{if(mo(n))return n.origStart=n.start,n.origEnd=n.end,!0;if(ho(n))return n.origOffset=n.offset,!0};t.forEach(n=>bn(n,e))}}function bn(t,e){if(!(!t||typeof t!="object")&&e(t)!==!0)for(let n of Object.keys(t)){if(n==="context"||n==="error")continue;let r=t[n];Array.isArray(r)?r.forEach(s=>bn(s,e)):bn(r,e)}}function mo(t){return typeof t.start=="number"}function ho(t){return typeof t.offset=="number"}function Nn(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(Nn)}return t}function On(t,e,n,r){let s=e(t);return i=>{r(s,i)&&n(t,s=i)}}function Ln(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(Ln),t.type==="document"){let[i,o]=t.children;i.position.start.offset===i.position.end.offset?i.position.start=i.position.end=o.position.start:o.position.start.offset===o.position.end.offset&&(o.position.start=o.position.end=i.position.end)}let n=On(t.position,go,yo,wo),r=On(t.position,Eo,So,bo);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),r(q(t.endComments).position.end));let s=e.filter(i=>i!==null);if(s.length!==0){let i=s[0],o=q(s);n(i.position.start),r(o.position.end),"leadingComments"in i&&i.leadingComments.length!==0&&n(i.leadingComments[0].position.start),"tag"in i&&i.tag&&n(i.tag.position.start),"anchor"in i&&i.anchor&&n(i.anchor.position.start),"trailingComment"in o&&o.trailingComment&&r(o.trailingComment.position.end)}}function go(t){return t.start}function yo(t,e){t.start=e}function Eo(t){return t.end}function So(t,e){t.end=e}function wo(t,e){return e.offsett.offset}var di=rr(hi(),1);var J=rr(gi(),1),xm=J.default.findPair,Rm=J.default.toJSON,Dm=J.default.parseMap,Ym=J.default.parseSeq,Bm=J.default.stringifyNumber,$m=J.default.stringifyString,Fm=J.default.Type,qa=J.default.YAMLError,qm=J.default.YAMLReferenceError,Zn=J.default.YAMLSemanticError,Ua=J.default.YAMLSyntaxError,Um=J.default.YAMLWarning;var{Document:yi,parseCST:Ei}=di.default;function Si(t){let e=Ei(t);Cs(e);let n=e.map(a=>new yi({merge:!1,keepCstNodes:!0}).parse(a)),r=new Pr(t),s=[],i={text:t,locator:r,comments:s,transformOffset:a=>As(a,i),transformRange:a=>Ts(a,i),transformNode:a=>bs(a,i),transformContent:a=>vt(a,i)};for(let a of n)for(let c of a.errors)if(!(c instanceof Zn&&c.message==='Map keys must be unique; "<<" is repeated'))throw Os(c,i);n.forEach(a=>ct(a.cstNode));let o=Dr(i.transformRange({origStart:0,origEnd:i.text.length}),n.map(i.transformNode),s);return _r(o),Ln(o),Nn(o),o}function Va(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var wi=Va;function Wa(t){try{let e=Si(t);return delete e.comments,e}catch(e){throw e!=null&&e.position?wi(e.message,{loc:e.position,cause:e}):e}}var ja={astFormat:"yaml",parse:Wa,hasPragma:pr,locStart:ve,locEnd:hr};var bi=[{linguistLanguageId:407,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","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"]}];var nn={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Qa={bracketSpacing:nn.bracketSpacing,singleQuote:nn.singleQuote,proseWrap:nn.proseWrap},Ni=Qa;var Ja={yaml:vr};return ki(Ga);}); \ No newline at end of file +${t}`}function Vi(t){return Array.isArray(t)&&t.length>0}var Ie=Vi;function G(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function pn(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>pn(r,e,t))}:t,n)}function Pe(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function br(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;si===0&&i===o.length-1?s:i!==0&&i!==o.length-1?s.trim():i===0?s.trimEnd():s.trimStart());return n.proseWrap==="preserve"?r.map(s=>s.length===0?[]:[s]):r.map(s=>s.length===0?[]:Or(s)).reduce((s,i,o)=>o!==0&&r[o-1].length>0&&i.length>0&&!(t==="quoteDouble"&&x(!1,x(!1,s,-1),-1).endsWith("\\"))?[...s.slice(0,-1),[...x(!1,s,-1),...i]]:[...s,i],[]).map(s=>n.proseWrap==="never"?[s.join(" ")]:s)}function Ar(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1],i;if(t.indent===null){let c=s.match(/^(? *)[^\n\r ]/m);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(` +`).map(c=>c.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return a(o.map(c=>c.length===0?[]:[c]));return a(o.map(c=>c.length===0?[]:Or(c)).reduce((c,l,f)=>f!==0&&o[f-1].length>0&&l.length>0&&!/^\s/.test(l[0])&&!/^\s|\s$/.test(x(!1,c,-1))?[...c.slice(0,-1),[...x(!1,c,-1),...l]]:[...c,l],[]).map(c=>c.reduce((l,f)=>l.length>0&&/\s$/.test(x(!1,l,-1))?[...l.slice(0,-1),x(!1,l,-1)+" "+f]:[...l,f],[])).map(c=>r.proseWrap==="never"?[c.join(" ")]:c));function a(c){if(t.chomping==="keep")return x(!1,c,-1).length===0?c.slice(0,-1):c;let l=0;for(let f=c.length-1;f>=0&&c[f].length===0;f--)l++;return l===0?c:l>=2&&!n?c.slice(0,-(l-1)):c.slice(0,-l)}}function ot(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var hn=new WeakMap;function Ct(t,e){let{node:n,root:r}=t,s;return hn.has(r)?s=hn.get(r):(s=new Set,hn.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),br(n,e)&&!gn(t.parent))?Ot:""}function gn(t){return R(t)&&!G(t,["documentHead","documentBody","flowMapping","flowSequence"])}function I(t,e){return tt(" ".repeat(t),e)}function ji(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=At(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),mn(r)&&o.push(" ",e("indicatorComment"));let a=Ar(r,{parentIndent:s,isLastDescendant:i,options:n}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(bt(v(ne,f))),l!==a.length-1?c.push(f.length===0?N:ir(rt)):r.chomping==="keep"&&i&&c.push(on(f.length===0?N:rt));return r.indent===null?o.push(or(I(n.tabWidth,c))):o.push(on(I(r.indent-1+s,c))),o}var Tr=ji;function Mt(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Ot;s&&r.children.length>0&&n.bracketSpacing&&(a=ne);let c=x(!1,r.children,-1),l=(c==null?void 0:c.type)==="flowMappingItem"&&_e(c.key)&&_e(c.value);return[i,I(n.tabWidth,[a,Qi(t,e,n),n.trailingComma==="none"?"":nt(","),R(r)?[N,v(N,t.map(e,"endComments"))]:""]),l?"":a,o]}function Qi(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[e(),r?"":[",",ne,s.position.start.line!==i.position.start.line?Ct(t,n.originalText):""]],"children")}function Ji(t,e,n){var C;let{node:r,parent:s}=t,{key:i,value:o}=r,a=_e(i),c=_e(o);if(a&&c)return": ";let l=e("key"),f=Gi(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&dn(i.content,n)&&!H(i.content)&&((C=s.tag)==null?void 0:C.value)!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",I(2,l)];let m=e("value");if(a)return[": ",I(2,m)];if(Z(o)||!ot(i.content))return["? ",I(2,l),N,...t.map(()=>[e(),N],"value","leadingComments"),": ",I(2,m)];if(Hi(i.content)&&!Z(i.content)&&!ie(i.content)&&!H(i.content)&&!R(i)&&!Z(o.content)&&!ie(o.content)&&!R(o)&&dn(o.content,n))return[l,f,": ",m];let d=Symbol("mappingKey"),y=ke([nt("? "),ke(I(2,l),{id:d})]),h=[N,": ",I(2,m)],g=[f,":"];Z(o.content)||R(o)&&o.content&&!G(o.content,["mapping","sequence"])||s.type==="mapping"&&H(i.content)&&ot(o.content)||G(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?g.push(N):o.content&&g.push(ne),g.push(m);let w=I(n.tabWidth,g);return dn(i.content,n)&&!Z(i.content)&&!ie(i.content)&&!R(i)?an([[l,w]]):an([[y,nt(h,w,{groupId:d})]])}function dn(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(` +`);case"always":return!/[\n ]/.test(t.value);default:return!1}}function Gi(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function Hi(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Cr=Ji;function Xi(t){return pn(t,zi)}function zi(t){switch(t.type){case"document":Pe(t,"head",()=>t.children[0]),Pe(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Pe(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Pe(t,"key",()=>t.children[0]),Pe(t,"value",()=>t.children[1]);break}return t}var Mr=Xi;function Zi(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&Z(r)&&s.push([v(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return G(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!At(t)&&(a=Ct(t,e.originalText)),(i||o)&&(G(r,["sequence","mapping"])&&!ie(r)?s.push(N):s.push(" ")),ie(r)&&s.push([r.middleComments.length===1?"":N,v(N,t.map(n,"middleComments")),N]),Nr(t)?s.push(cr(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(ke(eo(t,e,n))),H(r)&&!G(r,["document","documentHead"])&&s.push(ar([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&ot(r)?"":Nt,n("trailingComment")])),gn(r)&&s.push(I(r.type==="sequenceItem"?2:0,[N,v(N,t.map(({node:c})=>[lr(e.originalText,ve(c))?N:"",n()],"endComments"))])),s.push(a),s}function eo(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=[];t.each(({node:o,next:a,isFirst:c})=>{c||s.push(N),s.push(n()),kr(o,a)?(s.push(N,"..."),H(o)&&s.push(" ",n("trailingComment"))):a&&!H(a.head)&&s.push(N,"---")},"children");let i=Tt(r);return(!G(i,["blockLiteral","blockFolded"])||i.chomping!=="keep")&&s.push(N),s}case"document":{let s=[];return no(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),H(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),to(r)&&s.push(n("body")),v(N,s)}case"documentHead":return v(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=Tt(r);G(a,["blockFolded","blockLiteral"])?a.chomping!=="keep"&&(o=[N,N]):o=N}return[v(N,t.map(n,"children")),o,v(N,t.map(n,"endComments"))]}case"directive":return["%",v(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return at(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let s="'",i='"',o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/.test(o)){let c=r.type==="quoteDouble"?i:s;return[c,at(r.type,o,e),c]}if(o.includes(i))return[s,at(r.type,r.type==="quoteDouble"?Et(!1,Et(!1,o,'\\"',i),"'",s.repeat(2)):o,e),s];if(o.includes(s))return[i,at(r.type,r.type==="quoteSingle"?Et(!1,o,"''",s):o,e),i];let a=e.singleQuote?s:i;return[a,at(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Tr(t,n,e);case"mapping":case"sequence":return v(N,t.map(n,"children"));case"sequenceItem":return["- ",I(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Cr(t,n,e);case"flowMapping":return Mt(t,n,e);case"flowSequence":return Mt(t,n,e);case"flowSequenceItem":return n("content");default:throw new fr(r,"YAML")}}function to(t){return t.body.children.length>0||R(t.body)}function kr(t,e){return H(t)||e&&(e.head.children.length>0||R(e.head))}function no(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/.test(e.originalText.slice(ve(n),ve(n)+4))||n.head.children.length>0||R(n.head)||H(n.head))return"head";let r=t.next;return kr(n,r)?!1:r?"root":!1}function at(t,e,n){let r=Lr(t,e,n);return v(N,r.map(s=>bt(v(ne,s))))}function ro(t,e){if(G(e))switch(delete e.position,e.type){case"comment":if(yr(e.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}var so={preprocess:Mr,embed:pr,print:Zi,massageAstNode:ro,insertPragma:Sr,getVisitorKeys:gr},vr=so;var Ir=[{linguistLanguageId:407,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","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"]}];var kt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var io={bracketSpacing:kt.bracketSpacing,singleQuote:kt.singleQuote,proseWrap:kt.proseWrap},Pr=io;var er={};tr(er,{yaml:()=>Qa});var vt=` +`,_r="\r",xr=function(){function t(e){this.length=e.length;for(var n=[0],r=0;rthis.length)return null;for(var n=0,r=this.offsets;r[n+1]<=e;)n++;var s=e-r[n];return{line:n,column:s}},t.prototype.indexForLocation=function(e){var n=e.line,r=e.column;return n<0||n>=this.offsets.length||r<0||r>this.lengthOfLine(n)?null:this.offsets[n]+r},t.prototype.lengthOfLine=function(e){var n=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-n},t}();function B(t,e=null){"children"in t&&t.children.forEach(n=>B(n,t)),"anchor"in t&&t.anchor&&B(t.anchor,t),"tag"in t&&t.tag&&B(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>B(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>B(n,t)),"indicatorComment"in t&&t.indicatorComment&&B(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&B(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>B(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function ge(t){return`${t.line}:${t.column}`}function Rr(t){B(t);let e=oo(t),n=t.children.slice();t.comments.sort((r,s)=>r.position.start.offset-s.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();ao(r,e,n[0])})}function oo(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return Dr(e,t),e}function Dr(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:r}=t[n.line-1];(!r||n.column1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:r}=t[n.line-1];(!r||n.column>=r.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:r}=e.position,s=[r.line].concat(n.line===r.line?[]:n.line);for(let i of s){let o=t[i-1].trailingNode;(!o||r.column>=o.position.end.column)&&(t[i-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{Dr(t,n)})}}function ao(t,e,n){let r=t.position.start.line,{trailingAttachableNode:s}=e[r-1];if(s){if(s.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${ge(t.position.start)}`);B(t,s),s.trailingComment=t;return}for(let o=r;o>=n.position.start.line;o--){let{trailingNode:a}=e[o-1],c;if(a)c=a;else if(o!==r&&e[o-1].comment)c=e[o-1].comment._parent;else continue;if((c.type==="sequence"||c.type==="mapping")&&(c=c.children[0]),c.type==="mappingItem"){let[l,f]=c.children;c=Yr(l)?l:f}for(;;){if(co(c,t)){B(t,c),c.endComments.push(t);return}if(!c._parent)break;c=c._parent}break}for(let o=r+1;o<=n.position.end.line;o++){let{leadingAttachableNode:a}=e[o-1];if(a){B(t,a),a.leadingComments.push(t);return}}let i=n.children[1];B(t,i),i.endComments.push(t)}function co(t,e){if(t.position.start.offsete.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offsett.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||Yr(t));default:return!1}}function Yr(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function b(t,e){return{type:t,position:e}}function Br(t,e,n){return{...b("root",t),children:e,comments:n}}function ct(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):ct(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):ct(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&ct(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)}`)}}function X(){return{leadingComments:[]}}function oe(t=null){return{trailingComment:t}}function $(){return{...X(),...oe()}}function $r(t,e,n){return{...b("alias",t),...$(),...e,value:n}}function Fr(t,e){let n=t.cstNode;return $r(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function qr(t){return{...t,type:"blockFolded"}}function Ur(t,e,n,r,s,i){return{...b("blockValue",t),...X(),...e,chomping:n,indent:r,value:s,indicatorComment:i}}var ae;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(ae||(ae={}));function Kr(t,e){return{...b("anchor",t),value:e}}function xe(t,e){return{...b("comment",t),value:e}}function Vr(t,e,n){return{anchor:e,tag:t,middleComments:n}}function Wr(t,e){return{...b("tag",t),value:e}}function It(t,e,n=()=>!1){let r=t.cstNode,s=[],i=null,o=null,a=null;for(let c of r.props){let l=e.text[c.origStart];switch(l){case ae.Tag:i=i||c,o=Wr(e.transformRange(c),t.tag);break;case ae.Anchor:i=i||c,a=Kr(e.transformRange(c),r.anchor);break;case ae.Comment:{let f=xe(e.transformRange(c),e.text.slice(c.origStart+1,c.origEnd));e.comments.push(f),!n(f)&&i&&i.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&s.push(f);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return Vr(o,a,s)}var yn;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(yn||(yn={}));function Pt(t,e){let n=t.cstNode,r=1,s=n.chomping==="CLIP"?0:1,o=n.header.origEnd-n.header.origStart-r-s!==0,a=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),c=null,l=It(t,e,f=>{if(!(a.start.offset=0;c--){let l=t.contents[c];if(l.type==="COMMENT"){let f=e.transformNode(l);n&&n.line===f.position.start.line?o.unshift(f):a?r.unshift(f):f.position.start.offset>=t.valueRange.origEnd?i.unshift(f):r.unshift(f)}else a=!0}if(i.length>1)throw new Error(`Unexpected multiple document trailing comments at ${ge(i[1].position.start)}`);if(o.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${ge(o[1].position.start)}`);return{comments:r,endComments:s,documentTrailingComment:q(i)||null,documentHeadTrailingComment:q(o)||null}}function fo(t,e,n){let r=_t(n.text.slice(t.valueRange.origEnd),/^\.\.\./),s=r===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[s-1]==="\r"&&s--;let i=n.transformRange({origStart:e!==null?e.position.start.offset:s,origEnd:s}),o=r===-1?i.end:n.transformOffset(t.valueRange.origEnd+3);return{position:i,documentEndPoint:o}}function ts(t,e,n,r){return{...b("documentHead",t),...F(n),...oe(r),children:e}}function ns(t,e){let n=t.cstNode,{directives:r,comments:s,endComments:i}=uo(n,e),{position:o,endMarkerPoint:a}=po(n,r,e);return e.comments.push(...s,...i),{createDocumentHeadWithTrailingComment:l=>(l&&e.comments.push(l),ts(o,r,i,l)),documentHeadEndMarkerPoint:a}}function uo(t,e){let n=[],r=[],s=[],i=!1;for(let o=t.directives.length-1;o>=0;o--){let a=e.transformNode(t.directives[o]);a.type==="comment"?i?r.unshift(a):s.unshift(a):(i=!0,n.unshift(a))}return{directives:n,comments:r,endComments:s}}function po(t,e,n){let r=_t(n.text.slice(0,t.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let s=r===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:r,origEnd:r+3};return e.length!==0&&(s.origStart=e[0].position.start.offset),{position:n.transformRange(s),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function rs(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=ns(t,e),{documentBody:s,documentEndPoint:i,documentTrailingComment:o,documentHeadTrailingComment:a}=es(t,e,r),c=n(a);return o&&e.comments.push(o),zr(K(c.position.start,i),c,s,o)}function xt(t,e,n){return{...b("flowCollection",t),...$(),...F(),...e,children:n}}function ss(t,e,n){return{...xt(t,e,n),type:"flowMapping"}}function Rt(t,e,n){return{...b("flowMappingItem",t),...X(),children:[e,n]}}function ce(t,e){let n=[];for(let r of t)r&&"type"in r&&r.type==="COMMENT"?e.comments.push(e.transformNode(r)):n.push(r);return n}function Dt(t){let[e,n]=["?",":"].map(r=>{let s=t.find(i=>"char"in i&&i.char===r);return s?{origStart:s.origOffset,origEnd:s.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function Yt(t,e){let n=e;return r=>t.slice(n,n=r)}function Bt(t){let e=[],n=Yt(t,1),r=!1;for(let s=1;s{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=Dt(l);return De(a,e,Rt,f,m)}),i=n[0],o=q(n);return ss(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function os(t,e,n){return{...xt(t,e,n),type:"flowSequence"}}function as(t,e){return{...b("flowSequenceItem",t),children:[e]}}function cs(t,e){let n=ce(t.cstNode.items,e),r=Bt(n),s=t.items.map((a,c)=>{if(a.type!=="PAIR"){let l=e.transformNode(a);return as(K(l.position.start,l.position.end),l)}else{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=Dt(l);return De(a,e,Rt,f,m)}}),i=n[0],o=q(n);return os(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function ls(t,e,n){return{...b("mapping",t),...X(),...e,children:n}}function fs(t,e,n){return{...b("mappingItem",t),...X(),children:[e,n]}}function us(t,e){let n=t.cstNode;n.items.filter(o=>o.type==="MAP_KEY"||o.type==="MAP_VALUE").forEach(o=>Re(o,e));let r=ce(n.items,e),s=mo(r),i=t.items.map((o,a)=>{let c=s[a],[l,f]=c[0].type==="MAP_VALUE"?[null,c[0].range]:[c[0].range,c.length===1?null:c[1].range];return De(o,e,fs,l,f)});return ls(K(i[0].position.start,q(i).position.end),e.transformContent(t),i)}function mo(t){let e=[],n=Yt(t,0),r=!1;for(let s=0;s=0;r--)if(n.test(t[r]))return r;return-1}function hs(t,e){let n=t.cstNode;return ps(e.transformRange({origStart:n.valueRange.origStart,origEnd:ms(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function gs(t){return{...t,type:"quoteDouble"}}function ds(t,e,n){return{...b("quoteValue",t),...e,...$(),value:n}}function $t(t,e){let n=t.cstNode;return ds(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function ys(t,e){return gs($t(t,e))}function Es(t){return{...t,type:"quoteSingle"}}function Ss(t,e){return Es($t(t,e))}function ws(t,e,n){return{...b("sequence",t),...X(),...F(),...e,children:n}}function bs(t,e){return{...b("sequenceItem",t),...$(),...F(),children:e?[e]:[]}}function Ns(t,e){let r=ce(t.cstNode.items,e).map((s,i)=>{Re(s,e);let o=e.transformNode(t.items[i]);return bs(K(e.transformOffset(s.valueRange.origStart),o===null?e.transformOffset(s.valueRange.origStart+1):o.position.end),o)});return ws(K(r[0].position.start,q(r).position.end),e.transformContent(t),r)}function Os(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return Fr(t,e);case"BLOCK_FOLDED":return jr(t,e);case"BLOCK_LITERAL":return Jr(t,e);case"COMMENT":return Gr(t,e);case"DIRECTIVE":return Xr(t,e);case"DOCUMENT":return rs(t,e);case"FLOW_MAP":return is(t,e);case"FLOW_SEQ":return cs(t,e);case"MAP":return us(t,e);case"PLAIN":return hs(t,e);case"QUOTE_DOUBLE":return ys(t,e);case"QUOTE_SINGLE":return Ss(t,e);case"SEQ":return Ns(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}function Ls(t,e,n){let r=new SyntaxError(t);return r.name="YAMLSyntaxError",r.source=e,r.position=n,r}function As(t,e){let n=t.source.range||t.source.valueRange;return Ls(t.message,e.text,e.transformRange(n))}function Ts(t,e,n){return{offset:t,line:e,column:n}}function Cs(t,e){t<0?t=0:t>e.text.length&&(t=e.text.length);let n=e.locator.locationForIndex(t);return Ts(t,n.line+1,n.column+1)}function Ms(t,e){return K(e.transformOffset(t.origStart),e.transformOffset(t.origEnd))}function ks(t){if(!t.setOrigRanges()){let e=n=>{if(ho(n))return n.origStart=n.start,n.origEnd=n.end,!0;if(go(n))return n.origOffset=n.offset,!0};t.forEach(n=>bn(n,e))}}function bn(t,e){if(!(!t||typeof t!="object")&&e(t)!==!0)for(let n of Object.keys(t)){if(n==="context"||n==="error")continue;let r=t[n];Array.isArray(r)?r.forEach(s=>bn(s,e)):bn(r,e)}}function ho(t){return typeof t.start=="number"}function go(t){return typeof t.offset=="number"}function Nn(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(Nn)}return t}function On(t,e,n,r){let s=e(t);return i=>{r(s,i)&&n(t,s=i)}}function Ln(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(Ln),t.type==="document"){let[i,o]=t.children;i.position.start.offset===i.position.end.offset?i.position.start=i.position.end=o.position.start:o.position.start.offset===o.position.end.offset&&(o.position.start=o.position.end=i.position.end)}let n=On(t.position,yo,Eo,bo),r=On(t.position,So,wo,No);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),r(q(t.endComments).position.end));let s=e.filter(i=>i!==null);if(s.length!==0){let i=s[0],o=q(s);n(i.position.start),r(o.position.end),"leadingComments"in i&&i.leadingComments.length!==0&&n(i.leadingComments[0].position.start),"tag"in i&&i.tag&&n(i.tag.position.start),"anchor"in i&&i.anchor&&n(i.anchor.position.start),"trailingComment"in o&&o.trailingComment&&r(o.trailingComment.position.end)}}function yo(t){return t.start}function Eo(t,e){t.start=e}function So(t){return t.end}function wo(t,e){t.end=e}function bo(t,e){return e.offsett.offset}var Ei=rr(di(),1);var J=rr(yi(),1),Bm=J.default.findPair,$m=J.default.toJSON,Fm=J.default.parseMap,qm=J.default.parseSeq,Um=J.default.stringifyNumber,Km=J.default.stringifyString,Vm=J.default.Type,Ua=J.default.YAMLError,Wm=J.default.YAMLReferenceError,Zn=J.default.YAMLSemanticError,Ka=J.default.YAMLSyntaxError,jm=J.default.YAMLWarning;var{Document:Si,parseCST:wi}=Ei.default;function bi(t){let e=wi(t);ks(e);let n=e.map(a=>new Si({merge:!1,keepCstNodes:!0}).parse(a)),r=new xr(t),s=[],i={text:t,locator:r,comments:s,transformOffset:a=>Cs(a,i),transformRange:a=>Ms(a,i),transformNode:a=>Os(a,i),transformContent:a=>It(a,i)};for(let a of n)for(let c of a.errors)if(!(c instanceof Zn&&c.message==='Map keys must be unique; "<<" is repeated'))throw As(c,i);n.forEach(a=>ct(a.cstNode));let o=Br(i.transformRange({origStart:0,origEnd:i.text.length}),n.map(i.transformNode),s);return Rr(o),Ln(o),Nn(o),o}function Wa(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Ni=Wa;function ja(t){try{let e=bi(t);return delete e.comments,e}catch(e){throw e!=null&&e.position?Ni(e.message,{loc:e.position,cause:e}):e}}var Qa={astFormat:"yaml",parse:ja,hasPragma:Er,locStart:ve,locEnd:dr};var Ja={yaml:vr};return ki(Ga);}); \ No newline at end of file diff --git a/node_modules/prettier/plugins/yaml.mjs b/node_modules/prettier/plugins/yaml.mjs index 9200b5f..fd9eebf 100644 --- a/node_modules/prettier/plugins/yaml.mjs +++ b/node_modules/prettier/plugins/yaml.mjs @@ -1,7 +1,7 @@ -var Li=Object.create;var nn=Object.defineProperty;var Ai=Object.getOwnPropertyDescriptor;var Ti=Object.getOwnPropertyNames;var Ci=Object.getPrototypeOf,Mi=Object.prototype.hasOwnProperty;var ee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nr=(t,e)=>{for(var n in e)nn(t,n,{get:e[n],enumerable:!0})},ki=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ti(e))!Mi.call(t,s)&&s!==n&&nn(t,s,{get:()=>e[s],enumerable:!(r=Ai(e,s))||r.enumerable});return t};var rr=(t,e,n)=>(n=t!=null?Li(Ci(t)):{},ki(e||!t||!t.__esModule?nn(n,"default",{value:t,enumerable:!0}):n,t));var le=ee(U=>{"use strict";var re={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},lt={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"},No="tag:yaml.org,2002:",Oo={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function Ms(t){let e=[0],n=t.indexOf(` +var Li=Object.create;var nn=Object.defineProperty;var Ai=Object.getOwnPropertyDescriptor;var Ti=Object.getOwnPropertyNames;var Ci=Object.getPrototypeOf,Mi=Object.prototype.hasOwnProperty;var ee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),nr=(t,e)=>{for(var n in e)nn(t,n,{get:e[n],enumerable:!0})},ki=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ti(e))!Mi.call(t,s)&&s!==n&&nn(t,s,{get:()=>e[s],enumerable:!(r=Ai(e,s))||r.enumerable});return t};var rr=(t,e,n)=>(n=t!=null?Li(Ci(t)):{},ki(e||!t||!t.__esModule?nn(n,"default",{value:t,enumerable:!0}):n,t));var le=ee(U=>{"use strict";var re={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},lt={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"},Oo="tag:yaml.org,2002:",Lo={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function vs(t){let e=[0],n=t.indexOf(` `);for(;n!==-1;)n+=1,e.push(n),n=t.indexOf(` -`,n);return e}function ks(t){let e,n;return typeof t=="string"?(e=Ms(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=Ms(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function An(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=ks(e);if(!n||!r||t>r.length)return null;for(let i=0;i=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===` -`;)--i;return r.slice(s,i)}function Ao({start:t,end:e},n,r=80){let s=Lo(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s} +`,n);return e}function Is(t){let e,n;return typeof t=="string"?(e=vs(t),n=t):(Array.isArray(t)&&(t=t[0]),t&&t.context&&(t.lineStarts||(t.lineStarts=vs(t.context.src)),e=t.lineStarts,n=t.context.src)),{lineStarts:e,src:n}}function An(t,e){if(typeof t!="number"||t<0)return null;let{lineStarts:n,src:r}=Is(e);if(!n||!r||t>r.length)return null;for(let i=0;i=1)||t>n.length)return null;let s=n[t-1],i=n[t];for(;i&&i>s&&r[i-1]===` +`;)--i;return r.slice(s,i)}function To({start:t,end:e},n,r=80){let s=Ao(t.line,n);if(!s)return null;let{col:i}=t;if(s.length>r)if(i<=r-10)s=s.substr(0,r-1)+"\u2026";else{let f=Math.round(r/2);s.length>i+f&&(s=s.substr(0,i+f-1)+"\u2026"),i-=s.length-r,s="\u2026"+s.substr(1-r)}let o=1,a="";e&&(e.line===t.line&&i+(e.col-t.col)<=r+1?o=e.col-t.col:(o=Math.min(s.length+1,r)-i,a="\u2026"));let c=i>1?" ".repeat(i-1):"",l="^".repeat(o);return`${s} ${c}${l}${a}`}var Ye=class t{static copy(e){return new t(e.start,e.end)}constructor(e,n){this.start=e,this.end=n||e}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(e,n){let{start:r,end:s}=this;if(e.length===0||s<=e[0])return this.origStart=r,this.origEnd=s,n;let i=n;for(;ir);)++i;this.origStart=r+i;let o=i;for(;i=s);)++i;return this.origEnd=s+i,o}},se=class t{static addStringTerminator(e,n,r){if(r[r.length-1]===` `)return r;let s=t.endOfWhiteSpace(e,n);return s>=e.length||e[s]===` `?r+` @@ -21,10 +21,10 @@ ${c}${l}${a}`}var Ye=class t{static copy(e){return new t(e.start,e.end)}construc `:s=0,n+=1,o+=` `;break;case" ":s<=r&&(i=!0),n=t.endOfWhiteSpace(e,n+2)-1;break;case" ":s+=1,n+=1;break}a=e[n+1]}return o||(o=" "),a&&s<=r&&(i=!0),{fold:o,offset:n,error:i}}constructor(e,n,r){Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=e,this.value=null}getPropValue(e,n,r){if(!this.context)return null;let{src:s}=this.context,i=this.props[e];return i&&s[i.start]===n?s.slice(i.start+(r?1:0),i.end):null}get anchor(){for(let e=0;e0?e.join(` `):null}commentHasRequiredWhitespace(e){let{src:n}=this.context;if(this.header&&e===this.header.end||!this.valueRange)return!1;let{end:r}=this.valueRange;return e!==r||t.atBlank(n,r-1)}get hasComment(){if(this.context){let{src:e}=this.context;for(let n=0;nr.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},de=class extends Error{constructor(e,n,r){if(!r||!(n instanceof se))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Ye(this.offset,this.offset+1);let n=e&&An(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&Ao(this.linePos,e);s&&(this.message+=`: +`)return!0;return!1}parseComment(e){let{src:n}=this.context;if(n[e]===re.COMMENT){let r=t.endOfLine(n,e+1),s=new Ye(e,r);return this.props.push(s),r}return e}setOrigRanges(e,n){return this.range&&(n=this.range.setOrigRange(e,n)),this.valueRange&&this.valueRange.setOrigRange(e,n),this.props.forEach(r=>r.setOrigRange(e,n)),n}toString(){let{context:{src:e},range:n,value:r}=this;if(r!=null)return r;let s=e.slice(n.start,n.end);return t.addStringTerminator(e,n.end,s)}},de=class extends Error{constructor(e,n,r){if(!r||!(n instanceof se))throw new Error(`Invalid arguments for new ${e}`);super(),this.name=e,this.message=r,this.source=n}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let e=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new Ye(this.offset,this.offset+1);let n=e&&An(this.offset,e);if(n){let r={line:n.line,col:n.col+1};this.linePos={start:n,end:r}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:n,col:r}=this.linePos.start;this.message+=` at line ${n}, column ${r}`;let s=e&&To(this.linePos,e);s&&(this.message+=`: ${s} -`)}delete this.source}},Tn=class extends de{constructor(e,n){super("YAMLReferenceError",e,n)}},ft=class extends de{constructor(e,n){super("YAMLSemanticError",e,n)}},Cn=class extends de{constructor(e,n){super("YAMLSyntaxError",e,n)}},Mn=class extends de{constructor(e,n){super("YAMLWarning",e,n)}};function To(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kn=class t extends se{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==` +`)}delete this.source}},Tn=class extends de{constructor(e,n){super("YAMLReferenceError",e,n)}},ft=class extends de{constructor(e,n){super("YAMLSemanticError",e,n)}},Cn=class extends de{constructor(e,n){super("YAMLSyntaxError",e,n)}},Mn=class extends de{constructor(e,n){super("YAMLWarning",e,n)}};function Co(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var kn=class t extends se{static endOfLine(e,n,r){let s=e[n],i=n;for(;s&&s!==` `&&!(r&&(s==="["||s==="]"||s==="{"||s==="}"||s===","));){let o=e[i+1];if(s===":"&&(!o||o===` `||o===" "||o===" "||r&&o===",")||(s===" "||s===" ")&&o==="#")break;i+=1,s=o}return i}get strValue(){if(!this.valueRange||!this.context)return null;let{start:e,end:n}=this.valueRange,{src:r}=this.context,s=r[n-1];for(;el?r.slice(l,a+1):c)}else i+=c}let o=r[e];switch(o){case" ":{let a="Plain value cannot start with a tab character";return{errors:[new ft(this,a)],str:i}}case"@":case"`":{let a=`Plain value cannot start with reserved character ${o}`;return{errors:[new ft(this,a)],str:i}}default:return i}}parseBlockValue(e){let{indent:n,inFlow:r,src:s}=this.context,i=e,o=e;for(let a=s[i];a===` `&&!se.atDocumentBoundary(s,i+1);a=s[i]){let c=se.endOfBlockIndent(s,n,i+1);if(c===null||s[c]==="#")break;s[c]===` `?i=c:(o=t.endOfLine(s,c,r),i=o)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=o,o}parse(e,n){this.context=e;let{inFlow:r,src:s}=e,i=n,o=s[i];return o&&o!=="#"&&o!==` -`&&(i=t.endOfLine(s,n,r)),this.valueRange=new Ye(n,i),i=se.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};U.Char=re;U.Node=se;U.PlainValue=kn;U.Range=Ye;U.Type=lt;U.YAMLError=de;U.YAMLReferenceError=Tn;U.YAMLSemanticError=ft;U.YAMLSyntaxError=Cn;U.YAMLWarning=Mn;U._defineProperty=To;U.defaultTagPrefix=No;U.defaultTags=Oo});var Is=ee(vs=>{"use strict";var u=le(),Ee=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ut=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],d=null;for(;l===` +`&&(i=t.endOfLine(s,n,r)),this.valueRange=new Ye(n,i),i=se.endOfWhiteSpace(s,i),i=this.parseComment(i),(!this.hasComment||this.valueRange.isEmpty())&&(i=this.parseBlockValue(i)),i}};U.Char=re;U.Node=se;U.PlainValue=kn;U.Range=Ye;U.Type=lt;U.YAMLError=de;U.YAMLReferenceError=Tn;U.YAMLSemanticError=ft;U.YAMLSyntaxError=Cn;U.YAMLWarning=Mn;U._defineProperty=Co;U.defaultTagPrefix=Oo;U.defaultTags=Lo});var _s=ee(Ps=>{"use strict";var u=le(),Ee=class extends u.Node{constructor(){super(u.Type.BLANK_LINE)}get includesTrailingLines(){return!0}parse(e,n){return this.context=e,this.range=new u.Range(n,n+1),n+1}},ut=class extends u.Node{constructor(e,n){super(e,n),this.node=null}get includesTrailingLines(){return!!this.node&&this.node.includesTrailingLines}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,{atLineStart:i,lineStart:o}=e;!i&&this.type===u.Type.SEQ_ITEM&&(this.error=new u.YAMLSemanticError(this,"Sequence items must not have preceding content on the same line"));let a=i?n-o:e.indent,c=u.Node.endOfWhiteSpace(s,n+1),l=s[c],f=l==="#",m=[],d=null;for(;l===` `||l==="#";){if(l==="#"){let h=u.Node.endOfLine(s,c+1);m.push(new u.Range(c,h)),c=h}else{i=!0,o=c+1;let h=u.Node.endOfWhiteSpace(s,o);s[h]===` -`&&m.length===0&&(d=new Ee,o=d.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(d){let h=e.parent.items||e.parent.contents;h&&h.push(d)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},ye=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function vn(t){let e=t;for(;e instanceof ut;)e=e.node;if(!(e instanceof Bt))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var Bt=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==` +`&&m.length===0&&(d=new Ee,o=d.parse({src:s},o)),c=u.Node.endOfIndent(s,o)}l=s[c]}if(u.Node.nextNodeIsIndented(l,c-(o+a),this.type!==u.Type.SEQ_ITEM)?this.node=r({atLineStart:i,inCollection:!1,indent:a,lineStart:o,parent:this},c):l&&o>n+1&&(c=o-1),this.node){if(d){let h=e.parent.items||e.parent.contents;h&&h.push(d)}m.length&&Array.prototype.push.apply(this.props,m),c=this.node.range.end}else if(f){let h=m[0];this.props.push(h),c=h.end}else c=u.Node.endOfLine(s,n+1);let y=this.node?this.node.valueRange.end:c;return this.valueRange=new u.Range(n,y),c}setOrigRanges(e,n){return n=super.setOrigRanges(e,n),this.node?this.node.setOrigRanges(e,n):n}toString(){let{context:{src:e},node:n,range:r,value:s}=this;if(s!=null)return s;let i=n?e.slice(r.start,n.range.start)+String(n):e.slice(r.start,r.end);return u.Node.addStringTerminator(e,r.end,i)}},ye=class extends u.Node{constructor(){super(u.Type.COMMENT)}parse(e,n){this.context=e;let r=this.parseComment(n);return this.range=new u.Range(n,r),r}};function vn(t){let e=t;for(;e instanceof ut;)e=e.node;if(!(e instanceof $t))return null;let n=e.items.length,r=-1;for(let o=n-1;o>=0;--o){let a=e.items[o];if(a.type===u.Type.COMMENT){let{indent:c,lineStart:l}=a.context;if(c>0&&a.range.start>=l+c)break;r=o}else if(a.type===u.Type.BLANK_LINE)r=o;else break}if(r===-1)return null;let s=e.items.splice(r,n-r),i=s[0].range.start;for(;e.range.end=i,e.valueRange&&e.valueRange.end>i&&(e.valueRange.end=i),e!==t;)e=e.context.parent;return s}var $t=class t extends u.Node{static nextContentHasIndent(e,n,r){let s=u.Node.endOfLine(e,n)+1;n=u.Node.endOfWhiteSpace(e,s);let i=e[n];return i?n>=s+r?!0:i!=="#"&&i!==` `?!1:t.nextContentHasIndent(e,n,r):!1}constructor(e){super(e.type===u.Type.SEQ_ITEM?u.Type.SEQ:u.Type.MAP);for(let r=e.props.length-1;r>=0;--r)if(e.props[r].start0}parse(e,n){this.context=e;let{parseNode:r,src:s}=e,i=u.Node.startOfLine(s,n),o=this.items[0];o.context.parent=this,this.valueRange=u.Range.copy(o.valueRange);let a=o.range.start-o.context.lineStart,c=n;c=u.Node.normalizeOffset(s,c);let l=s[c],f=u.Node.endOfWhiteSpace(s,i)===c,m=!1;for(;l;){for(;l===` `||l==="#";){if(f&&l===` `&&!m){let h=new Ee;if(c=h.parse({src:s},c),this.valueRange.end=c,c>=s.length){l=null;break}this.items.push(h),c-=1}else if(l==="#"){if(c=s.length){l=null;break}}if(i=c+1,c=u.Node.endOfIndent(s,i),u.Node.atBlank(s,c)){let h=u.Node.endOfWhiteSpace(s,c),g=s[h];(!g||g===` @@ -77,85 +77,85 @@ ${s} `:for(;i[a+1]===" "||i[a+1]===" ";)a+=1;break;default:e.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${i.substr(a-1,2)}`)),o+="\\"+i[a]}else if(c===" "||c===" "){let l=a,f=i[a+1];for(;f===" "||f===" ";)a+=1,f=i[a+1];f!==` `&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parseCharCode(e,n,r){let{src:s}=this.context,i=s.substr(e,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;return isNaN(a)?(r.push(new u.YAMLSyntaxError(this,`Invalid escape sequence ${s.substr(e-2,n+2)}`)),s.substr(e-2,n+2)):String.fromCodePoint(a)}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}},Yn=class t extends u.Node{static endOfQuote(e,n){let r=e[n];for(;r;)if(r==="'"){if(e[n+1]!=="'")break;r=e[n+=2]}else r=e[n+=1];return n+1}get strValue(){if(!this.valueRange||!this.context)return null;let e=[],{start:n,end:r}=this.valueRange,{indent:s,src:i}=this.context;i[r-1]!=="'"&&e.push(new u.YAMLSyntaxError(this,"Missing closing 'quote"));let o="";for(let a=n+1;al?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function Co(t,e){switch(t){case u.Type.ALIAS:return new _n(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new xn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new Rn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ut(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new Dn(t,e);case u.Type.QUOTE_SINGLE:return new Yn(t,e);default:return null}}var Bn=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:d,valueStart:y}=f.parseProps(l),h=Co(d,m),g=h.parse(f,y);if(h.range=new u.Range(l,g),g<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=g,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new Bt(h);return g=w.parse(new t(f),g),w.range=new u.Range(l,g),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ut)return!0;let i=e.range.end;return s[i]===` +`&&(o+=a>l?i.slice(l,a+1):c)}else o+=c}return e.length>0?{errors:e,str:o}:o}parse(e,n){this.context=e;let{src:r}=e,s=t.endOfQuote(r,n+1);return this.valueRange=new u.Range(n,s),s=u.Node.endOfWhiteSpace(r,s),s=this.parseComment(s),s}};function Mo(t,e){switch(t){case u.Type.ALIAS:return new _n(t,e);case u.Type.BLOCK_FOLDED:case u.Type.BLOCK_LITERAL:return new xn(t,e);case u.Type.FLOW_MAP:case u.Type.FLOW_SEQ:return new Rn(t,e);case u.Type.MAP_KEY:case u.Type.MAP_VALUE:case u.Type.SEQ_ITEM:return new ut(t,e);case u.Type.COMMENT:case u.Type.PLAIN:return new u.PlainValue(t,e);case u.Type.QUOTE_DOUBLE:return new Dn(t,e);case u.Type.QUOTE_SINGLE:return new Yn(t,e);default:return null}}var Bn=class t{static parseType(e,n,r){switch(e[n]){case"*":return u.Type.ALIAS;case">":return u.Type.BLOCK_FOLDED;case"|":return u.Type.BLOCK_LITERAL;case"{":return u.Type.FLOW_MAP;case"[":return u.Type.FLOW_SEQ;case"?":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_KEY:u.Type.PLAIN;case":":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.MAP_VALUE:u.Type.PLAIN;case"-":return!r&&u.Node.atBlank(e,n+1,!0)?u.Type.SEQ_ITEM:u.Type.PLAIN;case'"':return u.Type.QUOTE_DOUBLE;case"'":return u.Type.QUOTE_SINGLE;default:return u.Type.PLAIN}}constructor(e={},{atLineStart:n,inCollection:r,inFlow:s,indent:i,lineStart:o,parent:a}={}){u._defineProperty(this,"parseNode",(c,l)=>{if(u.Node.atDocumentBoundary(this.src,l))return null;let f=new t(this,c),{props:m,type:d,valueStart:y}=f.parseProps(l),h=Mo(d,m),g=h.parse(f,y);if(h.range=new u.Range(l,g),g<=l&&(h.error=new Error("Node#parse consumed no characters"),h.error.parseEnd=g,h.error.source=h,h.range.end=l+1),f.nodeStartsCollection(h)){!h.error&&!f.atLineStart&&f.parent.type===u.Type.DOCUMENT&&(h.error=new u.YAMLSyntaxError(h,"Block collection must not have preceding content here (e.g. directives-end indicator)"));let w=new $t(h);return g=w.parse(new t(f),g),w.range=new u.Range(l,g),w}return h}),this.atLineStart=n??(e.atLineStart||!1),this.inCollection=r??(e.inCollection||!1),this.inFlow=s??(e.inFlow||!1),this.indent=i??e.indent,this.lineStart=o??e.lineStart,this.parent=a??(e.parent||{}),this.root=e.root,this.src=e.src}nodeStartsCollection(e){let{inCollection:n,inFlow:r,src:s}=this;if(n||r)return!1;if(e instanceof ut)return!0;let i=e.range.end;return s[i]===` `||s[i-1]===` `?!1:(i=u.Node.endOfWhiteSpace(s,i),s[i]===":")}parseProps(e){let{inFlow:n,parent:r,src:s}=this,i=[],o=!1;e=this.atLineStart?u.Node.endOfIndent(s,e):u.Node.endOfWhiteSpace(s,e);let a=s[e];for(;a===u.Char.ANCHOR||a===u.Char.COMMENT||a===u.Char.TAG||a===` `;){if(a===` `){let l=e,f;do f=l+1,l=u.Node.endOfIndent(s,f);while(s[l]===` -`);let m=l-(f+this.indent),d=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!d))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function Mo(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),` +`);let m=l-(f+this.indent),d=r.type===u.Type.SEQ_ITEM&&r.context.atLineStart;if(s[l]!=="#"&&!u.Node.nextNodeIsIndented(s[l],m,!d))break;this.atLineStart=!0,this.lineStart=f,o=!1,e=l}else if(a===u.Char.COMMENT){let l=u.Node.endOfLine(s,e+1);i.push(new u.Range(e,l)),e=l}else{let l=u.Node.endOfIdentifier(s,e+1);a===u.Char.TAG&&s[l]===","&&/^[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+,\d\d\d\d(-\d\d){0,2}\/\S/.test(s.slice(e+1,l+13))&&(l=u.Node.endOfIdentifier(s,l+5)),i.push(new u.Range(e,l)),o=!0,e=u.Node.endOfWhiteSpace(s,l)}a=s[e]}o&&a===":"&&u.Node.atBlank(s,e+1,!0)&&(e-=1);let c=t.parseType(s,e,n);return{props:i,type:c,valueStart:e}}};function ko(t){let e=[];t.indexOf("\r")!==-1&&(t=t.replace(/\r\n?/g,(s,i)=>(s.length>1&&e.push(i),` `)));let n=[],r=0;do{let s=new Pn,i=new Bn({src:t});r=s.parse(i,r),n.push(s)}while(r{if(e.length===0)return!1;for(let i=1;in.join(`... -`),n}vs.parse=Mo});var $e=ee(k=>{"use strict";var p=le();function ko(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)} +`),n}Ps.parse=ko});var $e=ee(k=>{"use strict";var p=le();function vo(t,e,n){return n?`#${n.replace(/[\s\S]^/gm,`$&${e}#`)} ${e}${t}`:t}function Be(t,e,n){return n?n.indexOf(` `)===-1?`${t} #${n}`:`${t} -`+n.replace(/^/gm,`${e||""}#`):t}var V=class{};function ue(t,e,n){if(Array.isArray(t))return t.map((r,s)=>ue(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var P=class extends V{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:ue(this.value,e,n)}toString(){return String(this.value)}};function Ps(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var Rs=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,W=class t extends V{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(Rs(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,Ps(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof P?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof P&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,Ps(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let d=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:i,inFlow:m,type:null});let y=!1,h=!1,g=this.items.reduce((C,L,M)=>{let A;L&&(!y&&L.spaceBefore&&C.push({type:"comment",str:""}),L.commentBefore&&L.commentBefore.match(/^.*$/gm).forEach(Oi=>{C.push({type:"comment",str:`#${Oi}`})}),L.comment&&(A=L.comment),m&&(!y&&L.spaceBefore||L.commentBefore||L.comment||L.key&&(L.key.commentBefore||L.key.comment)||L.value&&(L.value.commentBefore||L.value.comment))&&(h=!0)),y=!1;let _=f(L,e,()=>A=null,()=>y=!0);return m&&!h&&_.includes(` +`+n.replace(/^/gm,`${e||""}#`):t}var V=class{};function ue(t,e,n){if(Array.isArray(t))return t.map((r,s)=>ue(r,String(s),n));if(t&&typeof t.toJSON=="function"){let r=n&&n.anchors&&n.anchors.get(t);r&&(n.onCreate=i=>{r.res=i,delete n.onCreate});let s=t.toJSON(e,n);return r&&n.onCreate&&n.onCreate(s),s}return(!n||!n.keep)&&typeof t=="bigint"?Number(t):t}var P=class extends V{constructor(e){super(),this.value=e}toJSON(e,n){return n&&n.keep?this.value:ue(this.value,e,n)}toString(){return String(this.value)}};function xs(t,e,n){let r=n;for(let s=e.length-1;s>=0;--s){let i=e[s];if(Number.isInteger(i)&&i>=0){let o=[];o[i]=r,r=o}else{let o={};Object.defineProperty(o,i,{value:r,writable:!0,enumerable:!0,configurable:!0}),r=o}}return t.createNode(r,!1)}var Ys=t=>t==null||typeof t=="object"&&t[Symbol.iterator]().next().done,W=class t extends V{constructor(e){super(),p._defineProperty(this,"items",[]),this.schema=e}addIn(e,n){if(Ys(e))this.add(n);else{let[r,...s]=e,i=this.get(r,!0);if(i instanceof t)i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,xs(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn([e,...n]){if(n.length===0)return this.delete(e);let r=this.get(e,!0);if(r instanceof t)return r.deleteIn(n);throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}getIn([e,...n],r){let s=this.get(e,!0);return n.length===0?!r&&s instanceof P?s.value:s:s instanceof t?s.getIn(n,r):void 0}hasAllNullValues(){return this.items.every(e=>{if(!e||e.type!=="PAIR")return!1;let n=e.value;return n==null||n instanceof P&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn([e,...n]){if(n.length===0)return this.has(e);let r=this.get(e,!0);return r instanceof t?r.hasIn(n):!1}setIn([e,...n],r){if(n.length===0)this.set(e,r);else{let s=this.get(e,!0);if(s instanceof t)s.setIn(n,r);else if(s===void 0&&this.schema)this.set(e,xs(this.schema,n,r));else throw new Error(`Expected YAML collection at ${e}. Remaining path: ${n}`)}}toJSON(){return null}toString(e,{blockItem:n,flowChars:r,isMap:s,itemIndent:i},o,a){let{indent:c,indentStep:l,stringify:f}=e,m=this.type===p.Type.FLOW_MAP||this.type===p.Type.FLOW_SEQ||e.inFlow;m&&(i+=l);let d=s&&this.hasAllNullValues();e=Object.assign({},e,{allNullValues:d,indent:i,inFlow:m,type:null});let y=!1,h=!1,g=this.items.reduce((C,L,M)=>{let A;L&&(!y&&L.spaceBefore&&C.push({type:"comment",str:""}),L.commentBefore&&L.commentBefore.match(/^.*$/gm).forEach(Oi=>{C.push({type:"comment",str:`#${Oi}`})}),L.comment&&(A=L.comment),m&&(!y&&L.spaceBefore||L.commentBefore||L.comment||L.key&&(L.key.commentBefore||L.key.comment)||L.value&&(L.value.commentBefore||L.value.comment))&&(h=!0)),y=!1;let _=f(L,e,()=>A=null,()=>y=!0);return m&&!h&&_.includes(` `)&&(h=!0),m&&MA.str);if(h||M.reduce((A,_)=>A+_.length+2,2)>t.maxFlowStringSingleLineLength){w=C;for(let A of M)w+=A?` ${l}${c}${A}`:` `;w+=` ${c}${L}`}else w=`${C} ${M.join(" ")} ${L}`}else{let C=g.map(n);w=C.shift();for(let L of C)w+=L?` ${c}${L}`:` `}return this.comment?(w+=` -`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(W,"maxFlowStringSingleLineLength",60);function $t(t){let e=t instanceof P?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var pe=class extends W{add(e){this.items.push(e)}delete(e){let n=$t(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=$t(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof P?s.value:s}has(e){let n=$t(e);return typeof n=="number"&&ns.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},vo=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof V&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends V{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof V?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new P(null)),this.key instanceof V)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=ue(this.key,"",e);if(n instanceof Map){let s=ue(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=vo(this.key,r,e),i=ue(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof V&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof W){let _="With simple keys, collection cannot be used as a key value";throw new Error(_)}}let f=!o&&(!a||l||(a instanceof V?a instanceof W||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:d,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:d+y});let g=!1,w=h(a,e,()=>l=null,()=>g=!0);if(w=Be(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Be(w,e.indent,this.comment),n&&n()):g&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w} +`+this.comment.replace(/^/gm,`${c}#`),o&&o()):y&&a&&a(),w}};p._defineProperty(W,"maxFlowStringSingleLineLength",60);function Ft(t){let e=t instanceof P?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),Number.isInteger(e)&&e>=0?e:null}var pe=class extends W{add(e){this.items.push(e)}delete(e){let n=Ft(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let r=Ft(e);if(typeof r!="number")return;let s=this.items[r];return!n&&s instanceof P?s.value:s}has(e){let n=Ft(e);return typeof n=="number"&&ns.type==="comment"?s.str:`- ${s.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(e.indent||"")+" "},n,r):JSON.stringify(this)}},Io=(t,e,n)=>e===null?"":typeof e!="object"?String(e):t instanceof V&&n&&n.doc?t.toString({anchors:Object.create(null),doc:n.doc,indent:"",indentStep:n.indentStep,inFlow:!0,inStringifyKey:!0,stringify:n.stringify}):JSON.stringify(e),T=class t extends V{constructor(e,n=null){super(),this.key=e,this.value=n,this.type=t.Type.PAIR}get commentBefore(){return this.key instanceof V?this.key.commentBefore:void 0}set commentBefore(e){if(this.key==null&&(this.key=new P(null)),this.key instanceof V)this.key.commentBefore=e;else{let n="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(n)}}addToJSMap(e,n){let r=ue(this.key,"",e);if(n instanceof Map){let s=ue(this.value,r,e);n.set(r,s)}else if(n instanceof Set)n.add(r);else{let s=Io(this.key,r,e),i=ue(this.value,s,e);s in n?Object.defineProperty(n,s,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[s]=i}return n}toJSON(e,n){let r=n&&n.mapAsMap?new Map:{};return this.addToJSMap(n,r)}toString(e,n,r){if(!e||!e.doc)return JSON.stringify(this);let{indent:s,indentSeq:i,simpleKeys:o}=e.doc.options,{key:a,value:c}=this,l=a instanceof V&&a.comment;if(o){if(l)throw new Error("With simple keys, key nodes cannot have comments");if(a instanceof W){let _="With simple keys, collection cannot be used as a key value";throw new Error(_)}}let f=!o&&(!a||l||(a instanceof V?a instanceof W||a.type===p.Type.BLOCK_FOLDED||a.type===p.Type.BLOCK_LITERAL:typeof a=="object")),{doc:m,indent:d,indentStep:y,stringify:h}=e;e=Object.assign({},e,{implicitKey:!f,indent:d+y});let g=!1,w=h(a,e,()=>l=null,()=>g=!0);if(w=Be(w,e.indent,l),!f&&w.length>1024){if(o)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(e.allNullValues&&!o)return this.comment?(w=Be(w,e.indent,this.comment),n&&n()):g&&!l&&r&&r(),e.inFlow&&!f?w:`? ${w}`;w=f?`? ${w} ${d}:`:`${w}:`,this.comment&&(w=Be(w,e.indent,this.comment),n&&n());let C="",L=null;if(c instanceof V){if(c.spaceBefore&&(C=` `),c.commentBefore){let _=c.commentBefore.replace(/^/gm,`${e.indent}#`);C+=` ${_}`}L=c.comment}else c&&typeof c=="object"&&(c=m.schema.createNode(c,!0));e.implicitKey=!1,!f&&!this.comment&&c instanceof P&&(e.indentAtStart=w.length+1),g=!1,!i&&s>=2&&!e.inFlow&&!f&&c instanceof pe&&c.type!==p.Type.FLOW_SEQ&&!c.tag&&!m.anchors.getName(c)&&(e.indent=e.indent.substr(2));let M=h(c,e,()=>L=null,()=>g=!0),A=" ";return C||this.comment?A=`${C} ${e.indent}`:!f&&c instanceof W?(!(M[0]==="["||M[0]==="{")||M.includes(` `))&&(A=` ${e.indent}`):M[0]===` -`&&(A=""),g&&!L&&r&&r(),Be(w+A+M,e.indent,L)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Ft=(t,e)=>{if(t instanceof we){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof W){let n=0;for(let r of t.items){let s=Ft(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=Ft(t.key,e),r=Ft(t.value,e);return Math.max(n,r)}return 1},we=class t extends V{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return ue(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=Ft(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(we,"default",!0);function pt(t,e){let n=e instanceof P?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var mt=class extends W{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=pt(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=pt(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=pt(this.items,e),s=r&&r.value;return!n&&s instanceof P?s.value:s}has(e){return!!pt(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},Ds="<<",Kt=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof pe||(n=new pe,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new P(Ds),new pe);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof mt))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},Io={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},Po={trueStr:"true",falseStr:"false"},_o={asBigInt:!1},xo={nullStr:"null"},be={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Fn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof P||(a=new P(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new P(t)}var Ys="flow",$n="block",qt="quoted",_s=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==` -`);n=t[e+1]}return e};function Vt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let d,y,h=!1,g=-1,w=-1,C=-1;n===$n&&(g=_s(t,g),g!==-1&&(m=g+c));for(let M;M=t[g+=1];){if(n===qt&&M==="\\"){switch(w=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}C=g}if(M===` -`)n===$n&&(g=_s(t,g)),m=g+c,d=void 0;else{if(M===" "&&y&&y!==" "&&y!==` +`&&(A=""),g&&!L&&r&&r(),Be(w+A+M,e.indent,L)}};p._defineProperty(T,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var qt=(t,e)=>{if(t instanceof we){let n=e.get(t.source);return n.count*n.aliasCount}else if(t instanceof W){let n=0;for(let r of t.items){let s=qt(r,e);s>n&&(n=s)}return n}else if(t instanceof T){let n=qt(t.key,e),r=qt(t.value,e);return Math.max(n,r)}return 1},we=class t extends V{static stringify({range:e,source:n},{anchors:r,doc:s,implicitKey:i,inStringifyKey:o}){let a=Object.keys(r).find(l=>r[l]===n);if(!a&&o&&(a=s.anchors.getName(n)||s.anchors.newName()),a)return`*${a}${i?" ":""}`;let c=s.anchors.getName(n)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${c} [${e}]`)}constructor(e){super(),this.source=e,this.type=p.Type.ALIAS}set tag(e){throw new Error("Alias nodes cannot have tags")}toJSON(e,n){if(!n)return ue(this.source,e,n);let{anchors:r,maxAliasCount:s}=n,i=r.get(this.source);if(!i||i.res===void 0){let o="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}if(s>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=qt(this.source,r)),i.count*i.aliasCount>s)){let o="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new p.YAMLReferenceError(this.cstNode,o):new ReferenceError(o)}return i.res}toString(e){return t.stringify(this,e)}};p._defineProperty(we,"default",!0);function pt(t,e){let n=e instanceof P?e.value:e;for(let r of t)if(r instanceof T&&(r.key===e||r.key===n||r.key&&r.key.value===n))return r}var mt=class extends W{add(e,n){e?e instanceof T||(e=new T(e.key||e,e.value)):e=new T(e);let r=pt(this.items,e.key),s=this.schema&&this.schema.sortMapEntries;if(r)if(n)r.value=e.value;else throw new Error(`Key ${e.key} already set`);else if(s){let i=this.items.findIndex(o=>s(e,o)<0);i===-1?this.items.push(e):this.items.splice(i,0,e)}else this.items.push(e)}delete(e){let n=pt(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=pt(this.items,e),s=r&&r.value;return!n&&s instanceof P?s.value:s}has(e){return!!pt(this.items,e)}set(e,n){this.add(new T(e,n),!0)}toJSON(e,n,r){let s=r?new r:n&&n.mapAsMap?new Map:{};n&&n.onCreate&&n.onCreate(s);for(let i of this.items)i.addToJSMap(n,s);return s}toString(e,n,r){if(!e)return JSON.stringify(this);for(let s of this.items)if(!(s instanceof T))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return super.toString(e,{blockItem:s=>s.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:e.indent||""},n,r)}},Bs="<<",Vt=class extends T{constructor(e){if(e instanceof T){let n=e.value;n instanceof pe||(n=new pe,n.items.push(e.value),n.range=e.value.range),super(e.key,n),this.range=e.range}else super(new P(Bs),new pe);this.type=T.Type.MERGE_PAIR}addToJSMap(e,n){for(let{source:r}of this.value.items){if(!(r instanceof mt))throw new Error("Merge sources must be maps");let s=r.toJSON(null,e,Map);for(let[i,o]of s)n instanceof Map?n.has(i)||n.set(i,o):n instanceof Set?n.add(i):Object.prototype.hasOwnProperty.call(n,i)||Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}return n}toString(e,n){let r=this.value;if(r.items.length>1)return super.toString(e,n);this.value=r.items[0];let s=super.toString(e,n);return this.value=r,s}},Po={defaultType:p.Type.BLOCK_LITERAL,lineWidth:76},_o={trueStr:"true",falseStr:"false"},xo={asBigInt:!1},Ro={nullStr:"null"},be={defaultType:p.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Fn(t,e,n){for(let{format:r,test:s,resolve:i}of e)if(s){let o=t.match(s);if(o){let a=i.apply(null,o);return a instanceof P||(a=new P(a)),r&&(a.format=r),a}}return n&&(t=n(t)),new P(t)}var $s="flow",$n="block",Ut="quoted",Rs=(t,e)=>{let n=t[e+1];for(;n===" "||n===" ";){do n=t[e+=1];while(n&&n!==` +`);n=t[e+1]}return e};function Wt(t,e,n,{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:o,onOverflow:a}){if(!s||s<0)return t;let c=Math.max(1+i,1+s-e.length);if(t.length<=c)return t;let l=[],f={},m=s-e.length;typeof r=="number"&&(r>s-Math.max(2,i)?l.push(0):m=s-r);let d,y,h=!1,g=-1,w=-1,C=-1;n===$n&&(g=Rs(t,g),g!==-1&&(m=g+c));for(let M;M=t[g+=1];){if(n===Ut&&M==="\\"){switch(w=g,t[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}C=g}if(M===` +`)n===$n&&(g=Rs(t,g)),m=g+c,d=void 0;else{if(M===" "&&y&&y!==" "&&y!==` `&&y!==" "){let A=t[g+1];A&&A!==" "&&A!==` -`&&A!==" "&&(d=g)}if(g>=m)if(d)l.push(d),m=d+c,d=void 0;else if(n===qt){for(;y===" "||y===" ";)y=M,M=t[g+=1],h=!0;let A=g>C+1?g-2:w-1;if(f[A])return t;l.push(A),f[A]=!0,m=A+c,d=void 0}else h=!0}y=M}if(h&&a&&a(),l.length===0)return t;o&&o();let L=t.slice(0,l[0]);for(let M=0;Mt?Object.assign({indentAtStart:t},be.fold):be.fold,Wt=t=>/^(%|---|\.\.\.)/m.test(t);function Ro(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;ir)return!0;if(o=i+1,s-o<=r)return!1}return!0}function Se(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=be.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(Wt(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length=m)if(d)l.push(d),m=d+c,d=void 0;else if(n===Ut){for(;y===" "||y===" ";)y=M,M=t[g+=1],h=!0;let A=g>C+1?g-2:w-1;if(f[A])return t;l.push(A),f[A]=!0,m=A+c,d=void 0}else h=!0}y=M}if(h&&a&&a(),l.length===0)return t;o&&o();let L=t.slice(0,l[0]);for(let M=0;Mt?Object.assign({indentAtStart:t},be.fold):be.fold,jt=t=>/^(%|---|\.\.\.)/m.test(t);function Do(t,e,n){if(!e||e<0)return!1;let r=e-n,s=t.length;if(s<=r)return!1;for(let i=0,o=0;ir)return!0;if(o=i+1,s-o<=r)return!1}return!0}function Se(t,e){let{implicitKey:n}=e,{jsonEncoding:r,minMultiLineLength:s}=be.doubleQuoted,i=JSON.stringify(t);if(r)return i;let o=e.indent||(jt(t)?" ":""),a="",c=0;for(let l=0,f=i[l];f;f=i[++l])if(f===" "&&i[l+1]==="\\"&&i[l+2]==="n"&&(a+=i.slice(c,l)+"\\ ",l+=1,c=l,f="\\"),f==="\\")switch(i[l+1]){case"u":{a+=i.slice(c,l);let m=i.substr(l+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=i.substr(l,6)}l+=5,c=l+1}break;case"n":if(n||i[l+2]==='"'||i.length";if(!n)return l+` +`,l+=2;a+=o,i[l+2]===" "&&(a+="\\"),l+=1,c=l+1}break;default:l+=1}return a=c?a+i.slice(c):i,n?a:Wt(a,o,Ut,qn(e))}function Fs(t,e){if(e.implicitKey){if(/\n/.test(t))return Se(t,e)}else if(/[ \t]\n|\n[ \t]/.test(t))return Se(t,e);let n=e.indent||(jt(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$& +${n}`)+"'";return e.implicitKey?r:Wt(r,n,$s,qn(e))}function Kt({comment:t,type:e,value:n},r,s,i){if(/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return Se(n,r);let o=r.indent||(r.forceBlockIndent||jt(n)?" ":""),a=o?"2":"1",c=e===p.Type.BLOCK_FOLDED?!1:e===p.Type.BLOCK_LITERAL?!0:!Do(n,be.fold.lineWidth,o.length),l=c?"|":">";if(!n)return l+` `;let f="",m="";if(n=n.replace(/[\n\t ]*$/,y=>{let h=y.indexOf(` `);return h===-1?l+="-":(n===y||h!==y.length-1)&&(l+="+",i&&i()),m=y.replace(/\n$/,""),""}).replace(/^[\n ]*/,y=>{y.indexOf(" ")!==-1&&(l+=a);let h=y.match(/ +$/);return h?(f=y.slice(0,-h[0].length),h[0]):(f=y,"")}),m&&(m=m.replace(/\n+(?!\n|$)/g,`$&${o}`)),f&&(f=f.replace(/\n+/g,`$&${o}`)),t&&(l+=" #"+t.replace(/ ?[\r\n]+/g," "),s&&s()),!n)return`${l}${a} ${o}${m}`;if(c)return n=n.replace(/\n+/g,`$&${o}`),`${l} ${o}${f}${n}${m}`;n=n.replace(/\n+/g,` -$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let d=Vt(`${f}${n}${m}`,o,$n,be.fold);return`${l} -${o}${d}`}function Do(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return Se(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(` -`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?Bs(o,e):Se(o,e):Ut(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(` -`)!==-1)return Ut(t,e,n,r);if(l===""&&Wt(o))return e.forceBlockIndent=!0,Ut(t,e,n,r);let m=o.replace(/\n+/g,`$& -${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof Fn(m,y,y.scalarFallback).value!="string")return Se(o,e)}let d=c?m:Vt(m,l,Ys,qn(e));return s&&!f&&(d.indexOf(` +$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${o}`);let d=Wt(`${f}${n}${m}`,o,$n,be.fold);return`${l} +${o}${d}`}function Yo(t,e,n,r){let{comment:s,type:i,value:o}=t,{actualString:a,implicitKey:c,indent:l,inFlow:f}=e;if(c&&/[\n[\]{},]/.test(o)||f&&/[[\]{},]/.test(o))return Se(o,e);if(!o||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return c||f||o.indexOf(` +`)===-1?o.indexOf('"')!==-1&&o.indexOf("'")===-1?Fs(o,e):Se(o,e):Kt(t,e,n,r);if(!c&&!f&&i!==p.Type.PLAIN&&o.indexOf(` +`)!==-1)return Kt(t,e,n,r);if(l===""&&jt(o))return e.forceBlockIndent=!0,Kt(t,e,n,r);let m=o.replace(/\n+/g,`$& +${l}`);if(a){let{tags:y}=e.doc.schema;if(typeof Fn(m,y,y.scalarFallback).value!="string")return Se(o,e)}let d=c?m:Wt(m,l,$s,qn(e));return s&&!f&&(d.indexOf(` `)!==-1||s.indexOf(` -`)!==-1)?(n&&n(),ko(d,l,s)):d}function Yo(t,e,n,r){let{defaultType:s}=be,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return Ut(t,e,n,r);case p.Type.QUOTE_DOUBLE:return Se(c,e);case p.Type.QUOTE_SINGLE:return Bs(c,e);case p.Type.PLAIN:return Do(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function Bo({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function $s(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function Fs(t,e){let n=e.context.src[e.range.start-1];if(n!==` -`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function qs(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function Us(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=` +`)!==-1)?(n&&n(),vo(d,l,s)):d}function Bo(t,e,n,r){let{defaultType:s}=be,{implicitKey:i,inFlow:o}=e,{type:a,value:c}=t;typeof c!="string"&&(c=String(c),t=Object.assign({},t,{value:c}));let l=m=>{switch(m){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:return Kt(t,e,n,r);case p.Type.QUOTE_DOUBLE:return Se(c,e);case p.Type.QUOTE_SINGLE:return Fs(c,e);case p.Type.PLAIN:return Yo(t,e,n,r);default:return null}};(a!==p.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(c)||(i||o)&&(a===p.Type.BLOCK_FOLDED||a===p.Type.BLOCK_LITERAL))&&(a=p.Type.QUOTE_DOUBLE);let f=l(a);if(f===null&&(f=l(s),f===null))throw new Error(`Unsupported default string type ${s}`);return f}function $o({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let s=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let i=s.indexOf(".");i<0&&(i=s.length,s+=".");let o=e-(s.length-i-1);for(;o-- >0;)s+="0"}return s}function qs(t,e){let n,r;switch(e.type){case p.Type.FLOW_MAP:n="}",r="flow map";break;case p.Type.FLOW_SEQ:n="]",r="flow sequence";break;default:t.push(new p.YAMLSemanticError(e,"Not a flow collection!?"));return}let s;for(let i=e.items.length-1;i>=0;--i){let o=e.items[i];if(!o||o.type!==p.Type.COMMENT){s=o;break}}if(s&&s.char!==n){let i=`Expected ${r} to end with ${n}`,o;typeof s.offset=="number"?(o=new p.YAMLSemanticError(e,i),o.offset=s.offset+1):(o=new p.YAMLSemanticError(s,i),s.range&&s.range.end&&(o.offset=s.range.end-s.range.start)),t.push(o)}}function Us(t,e){let n=e.context.src[e.range.start-1];if(n!==` +`&&n!==" "&&n!==" "){let r="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,r))}}function Ks(t,e){let n=String(e),r=n.substr(0,8)+"..."+n.substr(-8);return new p.YAMLSemanticError(t,`The "${r}" key is too long`)}function Vs(t,e){for(let{afterKey:n,before:r,comment:s}of e){let i=t.items[r];i?(n&&i.value&&(i=i.value),s===void 0?(n||!i.commentBefore)&&(i.spaceBefore=!0):i.commentBefore?i.commentBefore+=` `+s:i.commentBefore=s):s!==void 0&&(t.comment?t.comment+=` -`+s:t.comment=s)}}function Un(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function $o(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function Fo(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return $o(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function xs(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof W?a:new P(a)}let i=Un(t,e);return typeof i=="string"&&s.length>0?Fn(i,s,r.scalarFallback):null}function qo({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function Uo(t,e,n){try{let r=xs(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=qo(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=xs(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var Ko=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Vo(t,e){let n={before:[],after:[]},r=!1,s=!1,i=Ko(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function Wo(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new we(a);return n._cstAliases.push(c),c}let i=Fo(t,e);if(i)return Uo(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Un(t,e);return Fn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function me(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Vo(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=Wo(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(` +`+s:t.comment=s)}}function Un(t,e){let n=e.strValue;return n?typeof n=="string"?n:(n.errors.forEach(r=>{r.source||(r.source=e),t.errors.push(r)}),n.str):""}function Fo(t,e){let{handle:n,suffix:r}=e.tag,s=t.tagPrefixes.find(i=>i.handle===n);if(!s){let i=t.getDefaults().tagPrefixes;if(i&&(s=i.find(o=>o.handle===n)),!s)throw new p.YAMLSemanticError(e,`The ${n} tag handle is non-default and was not declared.`)}if(!r)throw new p.YAMLSemanticError(e,`The ${n} tag has no suffix.`);if(n==="!"&&(t.version||t.options.version)==="1.0"){if(r[0]==="^")return t.warnings.push(new p.YAMLWarning(e,"YAML 1.0 ^ tag expansion is not supported")),r;if(/[:/]/.test(r)){let i=r.match(/^([a-z0-9-]+)\/(.*)/i);return i?`tag:${i[1]}.yaml.org,2002:${i[2]}`:`tag:${r}`}}return s.prefix+decodeURIComponent(r)}function qo(t,e){let{tag:n,type:r}=e,s=!1;if(n){let{handle:i,suffix:o,verbatim:a}=n;if(a){if(a!=="!"&&a!=="!!")return a;let c=`Verbatim tags aren't resolved, so ${a} is invalid.`;t.errors.push(new p.YAMLSemanticError(e,c))}else if(i==="!"&&!o)s=!0;else try{return Fo(t,e)}catch(c){t.errors.push(c)}}switch(r){case p.Type.BLOCK_FOLDED:case p.Type.BLOCK_LITERAL:case p.Type.QUOTE_DOUBLE:case p.Type.QUOTE_SINGLE:return p.defaultTags.STR;case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;case p.Type.PLAIN:return s?p.defaultTags.STR:null;default:return null}}function Ds(t,e,n){let{tags:r}=t.schema,s=[];for(let o of r)if(o.tag===n)if(o.test)s.push(o);else{let a=o.resolve(t,e);return a instanceof W?a:new P(a)}let i=Un(t,e);return typeof i=="string"&&s.length>0?Fn(i,s,r.scalarFallback):null}function Uo({type:t}){switch(t){case p.Type.FLOW_MAP:case p.Type.MAP:return p.defaultTags.MAP;case p.Type.FLOW_SEQ:case p.Type.SEQ:return p.defaultTags.SEQ;default:return p.defaultTags.STR}}function Ko(t,e,n){try{let r=Ds(t,e,n);if(r)return n&&e.tag&&(r.tag=n),r}catch(r){return r.source||(r.source=e),t.errors.push(r),null}try{let r=Uo(e);if(!r)throw new Error(`The tag ${n} is unavailable`);let s=`The tag ${n} is unavailable, falling back to ${r}`;t.warnings.push(new p.YAMLWarning(e,s));let i=Ds(t,e,r);return i.tag=n,i}catch(r){let s=new p.YAMLReferenceError(e,r.message);return s.stack=r.stack,t.errors.push(s),null}}var Vo=t=>{if(!t)return!1;let{type:e}=t;return e===p.Type.MAP_KEY||e===p.Type.MAP_VALUE||e===p.Type.SEQ_ITEM};function Wo(t,e){let n={before:[],after:[]},r=!1,s=!1,i=Vo(e.context.parent)?e.context.parent.props.concat(e.props):e.props;for(let{start:o,end:a}of i)switch(e.context.src[o]){case p.Char.COMMENT:{if(!e.commentHasRequiredWhitespace(o)){let m="Comments must be separated from other tokens by white space characters";t.push(new p.YAMLSemanticError(e,m))}let{header:c,valueRange:l}=e;(l&&(o>l.start||c&&o>c.start)?n.after:n.before).push(e.context.src.slice(o+1,a));break}case p.Char.ANCHOR:if(r){let c="A node can have at most one anchor";t.push(new p.YAMLSemanticError(e,c))}r=!0;break;case p.Char.TAG:if(s){let c="A node can have at most one tag";t.push(new p.YAMLSemanticError(e,c))}s=!0;break}return{comments:n,hasAnchor:r,hasTag:s}}function jo(t,e){let{anchors:n,errors:r,schema:s}=t;if(e.type===p.Type.ALIAS){let o=e.rawValue,a=n.getNode(o);if(!a){let l=`Aliased anchor not found: ${o}`;return r.push(new p.YAMLReferenceError(e,l)),null}let c=new we(a);return n._cstAliases.push(c),c}let i=qo(t,e);if(i)return Ko(t,e,i);if(e.type!==p.Type.PLAIN){let o=`Failed to resolve ${e.type} node here`;return r.push(new p.YAMLSyntaxError(e,o)),null}try{let o=Un(t,e);return Fn(o,s.tags,s.tags.scalarFallback)}catch(o){return o.source||(o.source=e),r.push(o),null}}function me(t,e){if(!e)return null;e.error&&t.errors.push(e.error);let{comments:n,hasAnchor:r,hasTag:s}=Wo(t.errors,e);if(r){let{anchors:o}=t,a=e.anchor,c=o.getNode(a);c&&(o.map[o.newName(a)]=c),o.map[a]=e}if(e.type===p.Type.ALIAS&&(r||s)){let o="An alias node must not specify any properties";t.errors.push(new p.YAMLSemanticError(e,o))}let i=jo(t,e);if(i){i.range=[e.range.start,e.range.end],t.options.keepCstNodes&&(i.cstNode=e),t.options.keepNodeTypes&&(i.type=e.type);let o=n.before.join(` `);o&&(i.commentBefore=i.commentBefore?`${i.commentBefore} ${o}`:o);let a=n.after.join(` `);a&&(i.comment=i.comment?`${i.comment} -${a}`:a)}return e.resolved=i}function jo(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?Ho(t,e):Go(t,e),s=new mt;s.items=r,Us(s,n);let i=!1;for(let o=0;o{if(f instanceof we){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,me(t,c));Jo(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(qs(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=me(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Ho(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;ai instanceof T&&i.key instanceof W)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function zo(t,e){let n=[],r=[];for(let s=0;so+1024&&t.errors.push(qs(e,i));let{src:h}=c.context;for(let g=o;g{"use strict";var j=le(),O=$e(),ea={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c1){let o="Each pair must have its own sequence indicator";throw new j.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore} +${a}`:a)}return e.resolved=i}function Qo(t,e){if(e.type!==p.Type.MAP&&e.type!==p.Type.FLOW_MAP){let o=`A ${e.type} node cannot be resolved as a mapping`;return t.errors.push(new p.YAMLSyntaxError(e,o)),null}let{comments:n,items:r}=e.type===p.Type.FLOW_MAP?Xo(t,e):Ho(t,e),s=new mt;s.items=r,Vs(s,n);let i=!1;for(let o=0;o{if(f instanceof we){let{type:m}=f.source;return m===p.Type.MAP||m===p.Type.FLOW_MAP?!1:l="Merge nodes aliases can only point to maps"}return l="Merge nodes can only have Alias nodes as values"}),l&&t.errors.push(new p.YAMLSemanticError(e,l))}else for(let c=o+1;c{if(r.length===0)return!1;let{start:s}=r[0];if(e&&s>e.valueRange.start||n[s]!==p.Char.COMMENT)return!1;for(let i=t;i0){c=new p.PlainValue(p.Type.PLAIN,[]),c.context={parent:a,src:a.context.src};let f=a.range.start+1;if(c.range={start:f,end:f},c.valueRange={start:f,end:f},typeof a.range.origStart=="number"){let m=a.range.origStart+1;c.range.origStart=c.range.origEnd=m,c.valueRange.origStart=c.valueRange.origEnd=m}}let l=new T(s,me(t,c));Go(a,l),r.push(l),s&&typeof i=="number"&&a.range.start>i+1024&&t.errors.push(Ks(e,s)),s=void 0,i=null}break;default:s!==void 0&&r.push(new T(s)),s=me(t,a),i=a.range.start,a.error&&t.errors.push(a.error);e:for(let c=o+1;;++c){let l=e.items[c];switch(l&&l.type){case p.Type.BLANK_LINE:case p.Type.COMMENT:continue e;case p.Type.MAP_VALUE:break e;default:{let f="Implicit map keys need to be followed by map values";t.errors.push(new p.YAMLSemanticError(a,f));break e}}}if(a.valueRangeContainsNewline){let c="Implicit map keys need to be on a single line";t.errors.push(new p.YAMLSemanticError(a,c))}}}return s!==void 0&&r.push(new T(s)),{comments:n,items:r}}function Xo(t,e){let n=[],r=[],s,i=!1,o="{";for(let a=0;ai instanceof T&&i.key instanceof W)){let i="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";t.warnings.push(new p.YAMLWarning(e,i))}return e.resolved=s,s}function Zo(t,e){let n=[],r=[];for(let s=0;so+1024&&t.errors.push(Ks(e,i));let{src:h}=c.context;for(let g=o;g{"use strict";var j=le(),O=$e(),ta={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(t,e)=>{let n=O.resolveString(t,e);if(typeof Buffer=="function")return Buffer.from(n,"base64");if(typeof atob=="function"){let r=atob(n.replace(/[\n\r]/g,"")),s=new Uint8Array(r.length);for(let i=0;i{let o;if(typeof Buffer=="function")o=n instanceof Buffer?n.toString("base64"):Buffer.from(n.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c1){let o="Each pair must have its own sequence indicator";throw new j.YAMLSemanticError(e,o)}let i=s.items[0]||new O.Pair;s.commentBefore&&(i.commentBefore=i.commentBefore?`${s.commentBefore} ${i.commentBefore}`:s.commentBefore),s.comment&&(i.comment=i.comment?`${s.comment} -${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function Ws(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var ta={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Vs,createNode:Ws},Fe=class t extends O.YAMLSeq{constructor(){super(),j._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),j._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),j._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),j._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),j._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};j._defineProperty(Fe,"tag","tag:yaml.org,2002:omap");function na(t,e){let n=Vs(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new j.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new Fe,n)}function ra(t,e,n){let r=Ws(t,e,n),s=new Fe;return s.items=r.items,s}var sa={identify:t=>t instanceof Map,nodeClass:Fe,default:!1,tag:"tag:yaml.org,2002:omap",resolve:na,createNode:ra},qe=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};j._defineProperty(qe,"tag","tag:yaml.org,2002:set");function ia(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new j.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new qe,n)}function oa(t,e,n){let r=new qe;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var aa={identify:t=>t instanceof Set,nodeClass:qe,default:!1,tag:"tag:yaml.org,2002:set",resolve:ia,createNode:oa},Kn=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},js=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},ca={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>Kn(e,n.replace(/_/g,"")),stringify:js},la={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>Kn(e,n.replace(/_/g,"")),stringify:js},fa={identify:t=>t 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:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=Kn(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Vn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function Wn(t,e){Vn(!1)&&console.warn(e?`${e}: ${t}`:t)}function ua(t){if(Vn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Wn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var Ks={};function pa(t,e){if(!Ks[t]&&Vn(!0)){Ks[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",Wn(n,"DeprecationWarning")}}z.binary=ea;z.floatTime=la;z.intTime=ca;z.omap=sa;z.pairs=ta;z.set=aa;z.timestamp=fa;z.warn=Wn;z.warnFileDeprecation=ua;z.warnOptionDeprecation=pa});var Hn=ee(ii=>{"use strict";var Jt=le(),E=$e(),D=jn();function ma(t,e,n){let r=new E.YAMLMap(t);if(e instanceof Map)for(let[s,i]of e)r.items.push(t.createPair(s,i,n));else if(e&&typeof e=="object")for(let s of Object.keys(e))r.items.push(t.createPair(s,e[s],n));return typeof t.sortMapEntries=="function"&&r.items.sort(t.sortMapEntries),r}var gt={createNode:ma,default:!0,nodeClass:E.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:E.resolveMap};function ha(t,e,n){let r=new E.YAMLSeq(t);if(e&&e[Symbol.iterator])for(let s of e){let i=t.createNode(s,n.wrapScalars,null,n);r.items.push(i)}return r}var Gt={createNode:ha,default:!0,nodeClass:E.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:E.resolveSeq},ga={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),E.stringifyString(t,e,n,r)},options:E.strOptions},Jn=[gt,Gt,ga],Ht=t=>typeof t=="bigint"||Number.isInteger(t),Gn=(t,e,n)=>E.intOptions.asBigInt?BigInt(t):parseInt(e,n);function Gs(t,e,n){let{value:r}=t;return Ht(r)&&r>=0?n+r.toString(e):E.stringifyNumber(t)}var Hs={identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},Xs={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>t[0]==="t"||t[0]==="T",options:E.boolOptions,stringify:({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr},zs={identify:t=>Ht(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(t,e)=>Gn(t,e,8),options:E.intOptions,stringify:t=>Gs(t,8,"0o")},Zs={identify:Ht,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:t=>Gn(t,t,10),options:E.intOptions,stringify:E.stringifyNumber},ei={identify:t=>Ht(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(t,e)=>Gn(t,e,16),options:E.intOptions,stringify:t=>Gs(t,16,"0x")},ti={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},ni={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify:({value:t})=>Number(t).toExponential()},ri={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(t,e,n){let r=e||n,s=new E.Scalar(parseFloat(t));return r&&r[r.length-1]==="0"&&(s.minFractionDigits=r.length),s},stringify:E.stringifyNumber},da=Jn.concat([Hs,Xs,zs,Zs,ei,ti,ni,ri]),Qs=t=>typeof t=="bigint"||Number.isInteger(t),jt=({value:t})=>JSON.stringify(t),si=[gt,Gt,{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify:jt},{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:jt},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:jt},{identify:Qs,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:t=>E.intOptions.asBigInt?BigInt(t):parseInt(t,10),stringify:({value:t})=>Qs(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:jt}];si.scalarFallback=t=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`)};var Js=({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr,ht=t=>typeof t=="bigint"||Number.isInteger(t);function Qt(t,e,n){let r=e.replace(/_/g,"");if(E.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}let i=BigInt(r);return t==="-"?BigInt(-1)*i:i}let s=parseInt(r,n);return t==="-"?-1*s:s}function Qn(t,e,n){let{value:r}=t;if(ht(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return E.stringifyNumber(t)}var ya=Jn.concat([{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:E.boolOptions,stringify:Js},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:E.boolOptions,stringify:Js},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(t,e,n)=>Qt(e,n,2),stringify:t=>Qn(t,2,"0b")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(t,e,n)=>Qt(e,n,8),stringify:t=>Qn(t,8,"0")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(t,e,n)=>Qt(e,n,10),stringify:E.stringifyNumber},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(t,e,n)=>Qt(e,n,16),stringify:t=>Qn(t,16,"0x")},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify:({value:t})=>Number(t).toExponential()},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(t,e){let n=new E.Scalar(parseFloat(t.replace(/_/g,"")));if(e){let r=e.replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:E.stringifyNumber}],D.binary,D.omap,D.pairs,D.set,D.intTime,D.floatTime,D.timestamp),Ea={core:da,failsafe:Jn,json:si,yaml11:ya},Sa={binary:D.binary,bool:Xs,float:ri,floatExp:ni,floatNaN:ti,floatTime:D.floatTime,int:Zs,intHex:ei,intOct:zs,intTime:D.intTime,map:gt,null:Hs,omap:D.omap,pairs:D.pairs,seq:Gt,set:D.set,timestamp:D.timestamp};function wa(t,e,n){if(e){let r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)||r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>(r.identify&&r.identify(t)||r.class&&t instanceof r.class)&&!r.format)}function ba(t,e,n){if(t instanceof E.Node)return t;let{defaultPrefix:r,onTagObj:s,prevObjects:i,schema:o,wrapScalars:a}=n;e&&e.startsWith("!!")&&(e=r+e.slice(2));let c=wa(t,e,o.tags);if(!c){if(typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object")return a?new E.Scalar(t):t;c=t instanceof Map?gt:t[Symbol.iterator]?Gt:gt}s&&(s(c),delete n.onTagObj);let l={value:void 0,node:void 0};if(t&&typeof t=="object"&&i){let f=i.get(t);if(f){let m=new E.Alias(f);return n.aliasNodes.push(m),m}l.value=t,i.set(t,l)}return l.node=c.createNode?c.createNode(n.schema,t,n):a?new E.Scalar(t):t,e&&l.node instanceof E.Node&&(l.node.tag=e),l.node}function Na(t,e,n,r){let s=t[r.replace(/\W/g,"")];if(!s){let i=Object.keys(t).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${i}`)}if(Array.isArray(n))for(let i of n)s=s.concat(i);else typeof n=="function"&&(s=n(s.slice()));for(let i=0;iJSON.stringify(l)).join(", ");throw new Error(`Unknown custom tag "${o}"; use one of ${c}`)}s[i]=a}}return s}var Oa=(t,e)=>t.keye.key?1:0,dt=class t{constructor({customTags:e,merge:n,schema:r,sortMapEntries:s,tags:i}){this.merge=!!n,this.name=r,this.sortMapEntries=s===!0?Oa:s||null,!e&&i&&D.warnOptionDeprecation("tags","customTags"),this.tags=Na(Ea,Sa,e||i,r)}createNode(e,n,r,s){let i={defaultPrefix:t.defaultPrefix,schema:this,wrapScalars:n},o=s?Object.assign(s,i):i;return ba(e,r,o)}createPair(e,n,r){r||(r={wrapScalars:!0});let s=this.createNode(e,r.wrapScalars,null,r),i=this.createNode(n,r.wrapScalars,null,r);return new E.Pair(s,i)}};Jt._defineProperty(dt,"defaultPrefix",Jt.defaultTagPrefix);Jt._defineProperty(dt,"defaultTags",Jt.defaultTags);ii.Schema=dt});var li=ee(en=>{"use strict";var Y=le(),S=$e(),oi=Hn(),La={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"},Aa={get binary(){return S.binaryOptions},set binary(t){Object.assign(S.binaryOptions,t)},get bool(){return S.boolOptions},set bool(t){Object.assign(S.boolOptions,t)},get int(){return S.intOptions},set int(t){Object.assign(S.intOptions,t)},get null(){return S.nullOptions},set null(t){Object.assign(S.nullOptions,t)},get str(){return S.strOptions},set str(t){Object.assign(S.strOptions,t)}},ci={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Y.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]}};function ai(t,e){if((t.version||t.options.version)==="1.0"){let s=e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(s)return"!"+s[1];let i=e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return i?`!${i[1]}/${i[2]}`:`!${e.replace(/^tag:/,"")}`}let n=t.tagPrefixes.find(s=>e.indexOf(s.prefix)===0);if(!n){let s=t.getDefaults().tagPrefixes;n=s&&s.find(i=>e.indexOf(i.prefix)===0)}if(!n)return e[0]==="!"?e:`!<${e}>`;let r=e.substr(n.prefix.length).replace(/[!,[\]{}]/g,s=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[s]);return n.handle+r}function Ta(t,e){if(e instanceof S.Alias)return S.Alias;if(e.tag){let s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)||s[0]}let n,r;if(e instanceof S.Scalar){r=e.value;let s=t.filter(i=>i.identify&&i.identify(r)||i.class&&r instanceof i.class);n=s.find(i=>i.format===e.format)||s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${s} value`)}return n}function Ca(t,e,{anchors:n,doc:r}){let s=[],i=r.anchors.getName(t);return i&&(n[i]=t,s.push(`&${i}`)),t.tag?s.push(ai(r,t.tag)):e.default||s.push(ai(r,e.tag)),s.join(" ")}function Xt(t,e,n,r){let{anchors:s,schema:i}=e.doc,o;if(!(t instanceof S.Node)){let l={aliasNodes:[],onTagObj:f=>o=f,prevObjects:new Map};t=i.createNode(t,!0,null,l);for(let f of l.aliasNodes){f.source=f.source.node;let m=s.getName(f.source);m||(m=s.newName(),s.map[m]=f.source)}}if(t instanceof S.Pair)return t.toString(e,n,r);o||(o=Ta(i.tags,t));let a=Ca(t,o,e);a.length>0&&(e.indentAtStart=(e.indentAtStart||0)+a.length+1);let c=typeof o.stringify=="function"?o.stringify(t,e,n,r):t instanceof S.Scalar?S.stringifyString(t,e,n,r):t.toString(e,n,r);return a?t instanceof S.Scalar||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a} -${e.indent}${c}`:c}var Xn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},zt=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>zt(r,e))):t instanceof S.Pair?(zt(t.key,e),zt(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},Ma=t=>Object.keys(zt(t,{}));function ka(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(` +${i.comment}`:s.comment),s=i}n.items[r]=s instanceof O.Pair?s:new O.Pair(s)}}return n}function Qs(t,e,n){let r=new O.YAMLSeq(t);r.tag="tag:yaml.org,2002:pairs";for(let s of e){let i,o;if(Array.isArray(s))if(s.length===2)i=s[0],o=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let c=Object.keys(s);if(c.length===1)i=c[0],o=s[i];else throw new TypeError(`Expected { key: value } tuple: ${s}`)}else i=s;let a=t.createPair(i,o,n);r.items.push(a)}return r}var na={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:js,createNode:Qs},Fe=class t extends O.YAMLSeq{constructor(){super(),j._defineProperty(this,"add",O.YAMLMap.prototype.add.bind(this)),j._defineProperty(this,"delete",O.YAMLMap.prototype.delete.bind(this)),j._defineProperty(this,"get",O.YAMLMap.prototype.get.bind(this)),j._defineProperty(this,"has",O.YAMLMap.prototype.has.bind(this)),j._defineProperty(this,"set",O.YAMLMap.prototype.set.bind(this)),this.tag=t.tag}toJSON(e,n){let r=new Map;n&&n.onCreate&&n.onCreate(r);for(let s of this.items){let i,o;if(s instanceof O.Pair?(i=O.toJSON(s.key,"",n),o=O.toJSON(s.value,i,n)):i=O.toJSON(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,o)}return r}};j._defineProperty(Fe,"tag","tag:yaml.org,2002:omap");function ra(t,e){let n=js(t,e),r=[];for(let{key:s}of n.items)if(s instanceof O.Scalar)if(r.includes(s.value)){let i="Ordered maps must not include duplicate keys";throw new j.YAMLSemanticError(e,i)}else r.push(s.value);return Object.assign(new Fe,n)}function sa(t,e,n){let r=Qs(t,e,n),s=new Fe;return s.items=r.items,s}var ia={identify:t=>t instanceof Map,nodeClass:Fe,default:!1,tag:"tag:yaml.org,2002:omap",resolve:ra,createNode:sa},qe=class t extends O.YAMLMap{constructor(){super(),this.tag=t.tag}add(e){let n=e instanceof O.Pair?e:new O.Pair(e);O.findPair(this.items,n.key)||this.items.push(n)}get(e,n){let r=O.findPair(this.items,e);return!n&&r instanceof O.Pair?r.key instanceof O.Scalar?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let r=O.findPair(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new O.Pair(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(e,n,r);throw new Error("Set items must all have null values")}};j._defineProperty(qe,"tag","tag:yaml.org,2002:set");function oa(t,e){let n=O.resolveMap(t,e);if(!n.hasAllNullValues())throw new j.YAMLSemanticError(e,"Set items must all have null values");return Object.assign(new qe,n)}function aa(t,e,n){let r=new qe;for(let s of e)r.items.push(t.createPair(s,null,n));return r}var ca={identify:t=>t instanceof Set,nodeClass:qe,default:!1,tag:"tag:yaml.org,2002:set",resolve:oa,createNode:aa},Kn=(t,e)=>{let n=e.split(":").reduce((r,s)=>r*60+Number(s),0);return t==="-"?-n:n},Js=({value:t})=>{if(isNaN(t)||!isFinite(t))return O.stringifyNumber(t);let e="";t<0&&(e="-",t=Math.abs(t));let n=[t%60];return t<60?n.unshift(0):(t=Math.round((t-n[0])/60),n.unshift(t%60),t>=60&&(t=Math.round((t-n[0])/60),n.unshift(t))),e+n.map(r=>r<10?"0"+String(r):String(r)).join(":").replace(/000000\d*$/,"")},la={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(t,e,n)=>Kn(e,n.replace(/_/g,"")),stringify:Js},fa={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(t,e,n)=>Kn(e,n.replace(/_/g,"")),stringify:Js},ua={identify:t=>t 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:(t,e,n,r,s,i,o,a,c)=>{a&&(a=(a+"00").substr(1,3));let l=Date.UTC(e,n-1,r,s||0,i||0,o||0,a||0);if(c&&c!=="Z"){let f=Kn(c[0],c.slice(1));Math.abs(f)<30&&(f*=60),l-=6e4*f}return new Date(l)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function Vn(t){let e={};return t?typeof YAML_SILENCE_DEPRECATION_WARNINGS<"u"?!YAML_SILENCE_DEPRECATION_WARNINGS:!e.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS<"u"?!YAML_SILENCE_WARNINGS:!e.YAML_SILENCE_WARNINGS}function Wn(t,e){Vn(!1)&&console.warn(e?`${e}: ${t}`:t)}function pa(t){if(Vn(!0)){let e=t.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");Wn(`The endpoint 'yaml/${e}' will be removed in a future release.`,"DeprecationWarning")}}var Ws={};function ma(t,e){if(!Ws[t]&&Vn(!0)){Ws[t]=!0;let n=`The option '${t}' will be removed in a future release`;n+=e?`, use '${e}' instead.`:".",Wn(n,"DeprecationWarning")}}z.binary=ta;z.floatTime=fa;z.intTime=la;z.omap=ia;z.pairs=na;z.set=ca;z.timestamp=ua;z.warn=Wn;z.warnFileDeprecation=pa;z.warnOptionDeprecation=ma});var Hn=ee(ai=>{"use strict";var Gt=le(),E=$e(),D=jn();function ha(t,e,n){let r=new E.YAMLMap(t);if(e instanceof Map)for(let[s,i]of e)r.items.push(t.createPair(s,i,n));else if(e&&typeof e=="object")for(let s of Object.keys(e))r.items.push(t.createPair(s,e[s],n));return typeof t.sortMapEntries=="function"&&r.items.sort(t.sortMapEntries),r}var gt={createNode:ha,default:!0,nodeClass:E.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:E.resolveMap};function ga(t,e,n){let r=new E.YAMLSeq(t);if(e&&e[Symbol.iterator])for(let s of e){let i=t.createNode(s,n.wrapScalars,null,n);r.items.push(i)}return r}var Ht={createNode:ga,default:!0,nodeClass:E.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:E.resolveSeq},da={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),E.stringifyString(t,e,n,r)},options:E.strOptions},Jn=[gt,Ht,da],Xt=t=>typeof t=="bigint"||Number.isInteger(t),Gn=(t,e,n)=>E.intOptions.asBigInt?BigInt(t):parseInt(e,n);function Xs(t,e,n){let{value:r}=t;return Xt(r)&&r>=0?n+r.toString(e):E.stringifyNumber(t)}var zs={identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},Zs={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>t[0]==="t"||t[0]==="T",options:E.boolOptions,stringify:({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr},ei={identify:t=>Xt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(t,e)=>Gn(t,e,8),options:E.intOptions,stringify:t=>Xs(t,8,"0o")},ti={identify:Xt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:t=>Gn(t,t,10),options:E.intOptions,stringify:E.stringifyNumber},ni={identify:t=>Xt(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(t,e)=>Gn(t,e,16),options:E.intOptions,stringify:t=>Xs(t,16,"0x")},ri={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},si={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify:({value:t})=>Number(t).toExponential()},ii={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(t,e,n){let r=e||n,s=new E.Scalar(parseFloat(t));return r&&r[r.length-1]==="0"&&(s.minFractionDigits=r.length),s},stringify:E.stringifyNumber},ya=Jn.concat([zs,Zs,ei,ti,ni,ri,si,ii]),Gs=t=>typeof t=="bigint"||Number.isInteger(t),Qt=({value:t})=>JSON.stringify(t),oi=[gt,Ht,{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:E.resolveString,stringify:Qt},{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Qt},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:Qt},{identify:Gs,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:t=>E.intOptions.asBigInt?BigInt(t):parseInt(t,10),stringify:({value:t})=>Gs(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Qt}];oi.scalarFallback=t=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(t)}`)};var Hs=({value:t})=>t?E.boolOptions.trueStr:E.boolOptions.falseStr,ht=t=>typeof t=="bigint"||Number.isInteger(t);function Jt(t,e,n){let r=e.replace(/_/g,"");if(E.intOptions.asBigInt){switch(n){case 2:r=`0b${r}`;break;case 8:r=`0o${r}`;break;case 16:r=`0x${r}`;break}let i=BigInt(r);return t==="-"?BigInt(-1)*i:i}let s=parseInt(r,n);return t==="-"?-1*s:s}function Qn(t,e,n){let{value:r}=t;if(ht(r)){let s=r.toString(e);return r<0?"-"+n+s.substr(1):n+s}return E.stringifyNumber(t)}var Ea=Jn.concat([{identify:t=>t==null,createNode:(t,e,n)=>n.wrapScalars?new E.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:E.nullOptions,stringify:()=>E.nullOptions.nullStr},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:E.boolOptions,stringify:Hs},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:E.boolOptions,stringify:Hs},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(t,e,n)=>Jt(e,n,2),stringify:t=>Qn(t,2,"0b")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(t,e,n)=>Jt(e,n,8),stringify:t=>Qn(t,8,"0")},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(t,e,n)=>Jt(e,n,10),stringify:E.stringifyNumber},{identify:ht,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(t,e,n)=>Jt(e,n,16),stringify:t=>Qn(t,16,"0x")},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(t,e)=>e?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:E.stringifyNumber},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify:({value:t})=>Number(t).toExponential()},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(t,e){let n=new E.Scalar(parseFloat(t.replace(/_/g,"")));if(e){let r=e.replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:E.stringifyNumber}],D.binary,D.omap,D.pairs,D.set,D.intTime,D.floatTime,D.timestamp),Sa={core:ya,failsafe:Jn,json:oi,yaml11:Ea},wa={binary:D.binary,bool:Zs,float:ii,floatExp:si,floatNaN:ri,floatTime:D.floatTime,int:ti,intHex:ni,intOct:ei,intTime:D.intTime,map:gt,null:zs,omap:D.omap,pairs:D.pairs,seq:Ht,set:D.set,timestamp:D.timestamp};function ba(t,e,n){if(e){let r=n.filter(i=>i.tag===e),s=r.find(i=>!i.format)||r[0];if(!s)throw new Error(`Tag ${e} not found`);return s}return n.find(r=>(r.identify&&r.identify(t)||r.class&&t instanceof r.class)&&!r.format)}function Na(t,e,n){if(t instanceof E.Node)return t;let{defaultPrefix:r,onTagObj:s,prevObjects:i,schema:o,wrapScalars:a}=n;e&&e.startsWith("!!")&&(e=r+e.slice(2));let c=ba(t,e,o.tags);if(!c){if(typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object")return a?new E.Scalar(t):t;c=t instanceof Map?gt:t[Symbol.iterator]?Ht:gt}s&&(s(c),delete n.onTagObj);let l={value:void 0,node:void 0};if(t&&typeof t=="object"&&i){let f=i.get(t);if(f){let m=new E.Alias(f);return n.aliasNodes.push(m),m}l.value=t,i.set(t,l)}return l.node=c.createNode?c.createNode(n.schema,t,n):a?new E.Scalar(t):t,e&&l.node instanceof E.Node&&(l.node.tag=e),l.node}function Oa(t,e,n,r){let s=t[r.replace(/\W/g,"")];if(!s){let i=Object.keys(t).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${i}`)}if(Array.isArray(n))for(let i of n)s=s.concat(i);else typeof n=="function"&&(s=n(s.slice()));for(let i=0;iJSON.stringify(l)).join(", ");throw new Error(`Unknown custom tag "${o}"; use one of ${c}`)}s[i]=a}}return s}var La=(t,e)=>t.keye.key?1:0,dt=class t{constructor({customTags:e,merge:n,schema:r,sortMapEntries:s,tags:i}){this.merge=!!n,this.name=r,this.sortMapEntries=s===!0?La:s||null,!e&&i&&D.warnOptionDeprecation("tags","customTags"),this.tags=Oa(Sa,wa,e||i,r)}createNode(e,n,r,s){let i={defaultPrefix:t.defaultPrefix,schema:this,wrapScalars:n},o=s?Object.assign(s,i):i;return Na(e,r,o)}createPair(e,n,r){r||(r={wrapScalars:!0});let s=this.createNode(e,r.wrapScalars,null,r),i=this.createNode(n,r.wrapScalars,null,r);return new E.Pair(s,i)}};Gt._defineProperty(dt,"defaultPrefix",Gt.defaultTagPrefix);Gt._defineProperty(dt,"defaultTags",Gt.defaultTags);ai.Schema=dt});var ui=ee(tn=>{"use strict";var Y=le(),S=$e(),ci=Hn(),Aa={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"},Ta={get binary(){return S.binaryOptions},set binary(t){Object.assign(S.binaryOptions,t)},get bool(){return S.boolOptions},set bool(t){Object.assign(S.boolOptions,t)},get int(){return S.intOptions},set int(t){Object.assign(S.intOptions,t)},get null(){return S.nullOptions},set null(t){Object.assign(S.nullOptions,t)},get str(){return S.strOptions},set str(t){Object.assign(S.strOptions,t)}},fi={"1.0":{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:Y.defaultTagPrefix},{handle:"!!",prefix:"tag:private.yaml.org,2002:"}]},1.1:{schema:"yaml-1.1",merge:!0,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]},1.2:{schema:"core",merge:!1,tagPrefixes:[{handle:"!",prefix:"!"},{handle:"!!",prefix:Y.defaultTagPrefix}]}};function li(t,e){if((t.version||t.options.version)==="1.0"){let s=e.match(/^tag:private\.yaml\.org,2002:([^:/]+)$/);if(s)return"!"+s[1];let i=e.match(/^tag:([a-zA-Z0-9-]+)\.yaml\.org,2002:(.*)/);return i?`!${i[1]}/${i[2]}`:`!${e.replace(/^tag:/,"")}`}let n=t.tagPrefixes.find(s=>e.indexOf(s.prefix)===0);if(!n){let s=t.getDefaults().tagPrefixes;n=s&&s.find(i=>e.indexOf(i.prefix)===0)}if(!n)return e[0]==="!"?e:`!<${e}>`;let r=e.substr(n.prefix.length).replace(/[!,[\]{}]/g,s=>({"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"})[s]);return n.handle+r}function Ca(t,e){if(e instanceof S.Alias)return S.Alias;if(e.tag){let s=t.filter(i=>i.tag===e.tag);if(s.length>0)return s.find(i=>i.format===e.format)||s[0]}let n,r;if(e instanceof S.Scalar){r=e.value;let s=t.filter(i=>i.identify&&i.identify(r)||i.class&&r instanceof i.class);n=s.find(i=>i.format===e.format)||s.find(i=>!i.format)}else r=e,n=t.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){let s=r&&r.constructor?r.constructor.name:typeof r;throw new Error(`Tag not resolved for ${s} value`)}return n}function Ma(t,e,{anchors:n,doc:r}){let s=[],i=r.anchors.getName(t);return i&&(n[i]=t,s.push(`&${i}`)),t.tag?s.push(li(r,t.tag)):e.default||s.push(li(r,e.tag)),s.join(" ")}function zt(t,e,n,r){let{anchors:s,schema:i}=e.doc,o;if(!(t instanceof S.Node)){let l={aliasNodes:[],onTagObj:f=>o=f,prevObjects:new Map};t=i.createNode(t,!0,null,l);for(let f of l.aliasNodes){f.source=f.source.node;let m=s.getName(f.source);m||(m=s.newName(),s.map[m]=f.source)}}if(t instanceof S.Pair)return t.toString(e,n,r);o||(o=Ca(i.tags,t));let a=Ma(t,o,e);a.length>0&&(e.indentAtStart=(e.indentAtStart||0)+a.length+1);let c=typeof o.stringify=="function"?o.stringify(t,e,n,r):t instanceof S.Scalar?S.stringifyString(t,e,n,r):t.toString(e,n,r);return a?t instanceof S.Scalar||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a} +${e.indent}${c}`:c}var Xn=class t{static validAnchorNode(e){return e instanceof S.Scalar||e instanceof S.YAMLSeq||e instanceof S.YAMLMap}constructor(e){Y._defineProperty(this,"map",Object.create(null)),this.prefix=e}createAlias(e,n){return this.setAnchor(e,n),new S.Alias(e)}createMergePair(...e){let n=new S.Merge;return n.value.items=e.map(r=>{if(r instanceof S.Alias){if(r.source instanceof S.YAMLMap)return r}else if(r instanceof S.YAMLMap)return this.createAlias(r);throw new Error("Merge sources must be Map nodes or their Aliases")}),n}getName(e){let{map:n}=this;return Object.keys(n).find(r=>n[r]===e)}getNames(){return Object.keys(this.map)}getNode(e){return this.map[e]}newName(e){e||(e=this.prefix);let n=Object.keys(this.map);for(let r=1;;++r){let s=`${e}${r}`;if(!n.includes(s))return s}}resolveNodes(){let{map:e,_cstAliases:n}=this;Object.keys(e).forEach(r=>{e[r]=e[r].resolved}),n.forEach(r=>{r.source=r.source.resolved}),delete this._cstAliases}setAnchor(e,n){if(e!=null&&!t.validAnchorNode(e))throw new Error("Anchors may only be set for Scalar, Seq and Map nodes");if(n&&/[\x00-\x19\s,[\]{}]/.test(n))throw new Error("Anchor names must not contain whitespace or control characters");let{map:r}=this,s=e&&Object.keys(r).find(i=>r[i]===e);if(s)if(n)s!==n&&(delete r[s],r[n]=e);else return s;else{if(!n){if(!e)return null;n=this.newName()}r[n]=e}return n}},Zt=(t,e)=>{if(t&&typeof t=="object"){let{tag:n}=t;t instanceof S.Collection?(n&&(e[n]=!0),t.items.forEach(r=>Zt(r,e))):t instanceof S.Pair?(Zt(t.key,e),Zt(t.value,e)):t instanceof S.Scalar&&n&&(e[n]=!0)}return e},ka=t=>Object.keys(Zt(t,{}));function va(t,e){let n={before:[],after:[]},r,s=!1;for(let i of e)if(i.valueRange){if(r!==void 0){let a="Document contains trailing content not separated by a ... or --- line";t.errors.push(new Y.YAMLSyntaxError(i,a));break}let o=S.resolveNode(t,i);s&&(o.spaceBefore=!0,s=!1),r=o}else i.comment!==null?(r===void 0?n.before:n.after).push(i.comment):i.type===Y.Type.BLANK_LINE&&(s=!0,r===void 0&&n.before.length>0&&!t.commentBefore&&(t.commentBefore=n.before.join(` `),n.before=[]));if(t.contents=r||null,!r)t.comment=n.before.concat(n.after).join(` `)||null;else{let i=n.before.join(` `);if(i){let o=r instanceof S.Collection&&r.items[0]?r.items[0]:r;o.commentBefore=o.commentBefore?`${i} ${o.commentBefore}`:i}t.comment=n.after.join(` -`)||null}}function va({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function Ia(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!ci[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function Pa(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(va(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=Ia(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(` -`)||null}function Ue(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var Zt=class t{constructor(e){this.anchors=new Xn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Ue(this.contents),this.contents.add(e)}addIn(e,n){Ue(this.contents),this.contents.addIn(e,n)}delete(e){return Ue(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Ue(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Ue(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Ue(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new oi.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),Pa(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],ka(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return Ma(this.contents).filter(e=>e.indexOf(oi.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:Xt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:Xt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=Xt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(Xt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(` +`)||null}}function Ia({tagPrefixes:t},e){let[n,r]=e.parameters;if(!n||!r){let s="Insufficient parameters given for %TAG directive";throw new Y.YAMLSemanticError(e,s)}if(t.some(s=>s.handle===n)){let s="The %TAG directive must only be given at most once per handle in the same document.";throw new Y.YAMLSemanticError(e,s)}return{handle:n,prefix:r}}function Pa(t,e){let[n]=e.parameters;if(e.name==="YAML:1.0"&&(n="1.0"),!n){let r="Insufficient parameters given for %YAML directive";throw new Y.YAMLSemanticError(e,r)}if(!fi[n]){let s=`Document will be parsed as YAML ${t.version||t.options.version} rather than YAML ${n}`;t.warnings.push(new Y.YAMLWarning(e,s))}return n}function _a(t,e,n){let r=[],s=!1;for(let i of e){let{comment:o,name:a}=i;switch(a){case"TAG":try{t.tagPrefixes.push(Ia(t,i))}catch(c){t.errors.push(c)}s=!0;break;case"YAML":case"YAML:1.0":if(t.version){let c="The %YAML directive must only be given at most once per document.";t.errors.push(new Y.YAMLSemanticError(i,c))}try{t.version=Pa(t,i)}catch(c){t.errors.push(c)}s=!0;break;default:if(a){let c=`YAML only supports %TAG and %YAML directives, and not %${a}`;t.warnings.push(new Y.YAMLWarning(i,c))}}o&&r.push(o)}if(n&&!s&&(t.version||n.version||t.options.version)==="1.1"){let i=({handle:o,prefix:a})=>({handle:o,prefix:a});t.tagPrefixes=n.tagPrefixes.map(i),t.version=n.version}t.commentBefore=r.join(` +`)||null}function Ue(t){if(t instanceof S.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var en=class t{constructor(e){this.anchors=new Xn(e.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=e,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(e){return Ue(this.contents),this.contents.add(e)}addIn(e,n){Ue(this.contents),this.contents.addIn(e,n)}delete(e){return Ue(this.contents),this.contents.delete(e)}deleteIn(e){return S.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):(Ue(this.contents),this.contents.deleteIn(e))}getDefaults(){return t.defaults[this.version]||t.defaults[this.options.version]||{}}get(e,n){return this.contents instanceof S.Collection?this.contents.get(e,n):void 0}getIn(e,n){return S.isEmptyPath(e)?!n&&this.contents instanceof S.Scalar?this.contents.value:this.contents:this.contents instanceof S.Collection?this.contents.getIn(e,n):void 0}has(e){return this.contents instanceof S.Collection?this.contents.has(e):!1}hasIn(e){return S.isEmptyPath(e)?this.contents!==void 0:this.contents instanceof S.Collection?this.contents.hasIn(e):!1}set(e,n){Ue(this.contents),this.contents.set(e,n)}setIn(e,n){S.isEmptyPath(e)?this.contents=n:(Ue(this.contents),this.contents.setIn(e,n))}setSchema(e,n){if(!e&&!n&&this.schema)return;typeof e=="number"&&(e=e.toFixed(1)),e==="1.0"||e==="1.1"||e==="1.2"?(this.version?this.version=e:this.options.version=e,delete this.options.schema):e&&typeof e=="string"&&(this.options.schema=e),Array.isArray(n)&&(this.options.customTags=n);let r=Object.assign({},this.getDefaults(),this.options);this.schema=new ci.Schema(r)}parse(e,n){this.options.keepCstNodes&&(this.cstNode=e),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:r=[],contents:s=[],directivesEndMarker:i,error:o,valueRange:a}=e;if(o&&(o.source||(o.source=this),this.errors.push(o)),_a(this,r,n),i&&(this.directivesEndMarker=!0),this.range=a?[a.start,a.end]:null,this.setSchema(),this.anchors._cstAliases=[],va(this,s),this.anchors.resolveNodes(),this.options.prettyErrors){for(let c of this.errors)c instanceof Y.YAMLError&&c.makePretty();for(let c of this.warnings)c instanceof Y.YAMLError&&c.makePretty()}return this}listNonDefaultTags(){return ka(this.contents).filter(e=>e.indexOf(ci.Schema.defaultPrefix)!==0)}setTagPrefix(e,n){if(e[0]!=="!"||e[e.length-1]!=="!")throw new Error("Handle must start and end with !");if(n){let r=this.tagPrefixes.find(s=>s.handle===e);r?r.prefix=n:this.tagPrefixes.push({handle:e,prefix:n})}else this.tagPrefixes=this.tagPrefixes.filter(r=>r.handle!==e)}toJSON(e,n){let{keepBlobsInJSON:r,mapAsMap:s,maxAliasCount:i}=this.options,o=r&&(typeof e!="string"||!(this.contents instanceof S.Scalar)),a={doc:this,indentStep:" ",keep:o,mapAsMap:o&&!!s,maxAliasCount:i,stringify:zt},c=Object.keys(this.anchors.map);c.length>0&&(a.anchors=new Map(c.map(f=>[this.anchors.map[f],{alias:[],aliasCount:0,count:1}])));let l=S.toJSON(this.contents,e,a);if(typeof n=="function"&&a.anchors)for(let{count:f,res:m}of a.anchors.values())n(m,f);return l}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let e=this.options.indent;if(!Number.isInteger(e)||e<=0){let c=JSON.stringify(e);throw new Error(`"indent" option must be a positive integer, not ${c}`)}this.setSchema();let n=[],r=!1;if(this.version){let c="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?c="%YAML:1.0":this.version==="1.1"&&(c="%YAML 1.1")),n.push(c),r=!0}let s=this.listNonDefaultTags();this.tagPrefixes.forEach(({handle:c,prefix:l})=>{s.some(f=>f.indexOf(l)===0)&&(n.push(`%TAG ${c} ${l}`),r=!0)}),(r||this.directivesEndMarker)&&n.push("---"),this.commentBefore&&((r||!this.directivesEndMarker)&&n.unshift(""),n.unshift(this.commentBefore.replace(/^/gm,"#")));let i={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(e),stringify:zt},o=!1,a=null;if(this.contents){this.contents instanceof S.Node&&(this.contents.spaceBefore&&(r||this.directivesEndMarker)&&n.push(""),this.contents.commentBefore&&n.push(this.contents.commentBefore.replace(/^/gm,"#")),i.forceBlockIndent=!!this.comment,a=this.contents.comment);let c=a?null:()=>o=!0,l=zt(this.contents,i,()=>a=null,c);n.push(S.addComment(l,"",a))}else this.contents!==void 0&&n.push(zt(this.contents,i));return this.comment&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(this.comment.replace(/^/gm,"#"))),n.join(` `)+` -`}};Y._defineProperty(Zt,"defaults",ci);en.Document=Zt;en.defaultOptions=La;en.scalarOptions=Aa});var pi=ee(ui=>{"use strict";var zn=Is(),Ne=li(),_a=Hn(),xa=le(),Ra=jn();$e();function Da(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Ne.Document.defaults[Ne.defaultOptions.version],Ne.defaultOptions);return new _a.Schema(r).createNode(t,e,n)}var Ke=class extends Ne.Document{constructor(e){super(Object.assign({},Ne.defaultOptions,e))}};function Ya(t,e){let n=[],r;for(let s of zn.parse(t)){let i=new Ke(e);i.parse(s,r),n.push(i),r=i}return n}function fi(t,e){let n=zn.parse(t),r=new Ke(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new xa.YAMLSemanticError(n[1],s))}return r}function Ba(t,e){let n=fi(t,e);if(n.warnings.forEach(r=>Ra.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function $a(t,e){let n=new Ke(e);return n.contents=t,String(n)}var Fa={createNode:Da,defaultOptions:Ne.defaultOptions,Document:Ke,parse:Ba,parseAllDocuments:Ya,parseCST:zn.parse,parseDocument:fi,scalarOptions:Ne.scalarOptions,stringify:$a};ui.YAML=Fa});var hi=ee((Im,mi)=>{mi.exports=pi().YAML});var gi=ee(Q=>{"use strict";var Ve=$e(),We=le();Q.findPair=Ve.findPair;Q.parseMap=Ve.resolveMap;Q.parseSeq=Ve.resolveSeq;Q.stringifyNumber=Ve.stringifyNumber;Q.stringifyString=Ve.stringifyString;Q.toJSON=Ve.toJSON;Q.Type=We.Type;Q.YAMLError=We.YAMLError;Q.YAMLReferenceError=We.YAMLReferenceError;Q.YAMLSemanticError=We.YAMLSemanticError;Q.YAMLSyntaxError=We.YAMLSyntaxError;Q.YAMLWarning=We.YAMLWarning});var tr={};nr(tr,{languages:()=>bi,options:()=>Ni,parsers:()=>er,printers:()=>Ja});var vi=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},yt=vi;var je="string",Qe="array",Je="cursor",Ge="indent",Oe="align",He="trim",Le="group",Ae="fill",Te="if-break",Xe="indent-if-break",Ce="line-suffix",ze="line-suffix-boundary",te="line",Ze="label",Me="break-parent",Et=new Set([Je,Ge,Oe,He,Le,Ae,Te,Xe,Ce,ze,te,Ze,Me]);function Ii(t){if(typeof t=="string")return je;if(Array.isArray(t))return Qe;if(!t)return;let{type:e}=t;if(Et.has(e))return e}var et=Ii;var Pi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function _i(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', +`}};Y._defineProperty(en,"defaults",fi);tn.Document=en;tn.defaultOptions=Aa;tn.scalarOptions=Ta});var hi=ee(mi=>{"use strict";var zn=_s(),Ne=ui(),xa=Hn(),Ra=le(),Da=jn();$e();function Ya(t,e=!0,n){n===void 0&&typeof e=="string"&&(n=e,e=!0);let r=Object.assign({},Ne.Document.defaults[Ne.defaultOptions.version],Ne.defaultOptions);return new xa.Schema(r).createNode(t,e,n)}var Ke=class extends Ne.Document{constructor(e){super(Object.assign({},Ne.defaultOptions,e))}};function Ba(t,e){let n=[],r;for(let s of zn.parse(t)){let i=new Ke(e);i.parse(s,r),n.push(i),r=i}return n}function pi(t,e){let n=zn.parse(t),r=new Ke(e).parse(n[0]);if(n.length>1){let s="Source contains multiple documents; please use YAML.parseAllDocuments()";r.errors.unshift(new Ra.YAMLSemanticError(n[1],s))}return r}function $a(t,e){let n=pi(t,e);if(n.warnings.forEach(r=>Da.warn(r)),n.errors.length>0)throw n.errors[0];return n.toJSON()}function Fa(t,e){let n=new Ke(e);return n.contents=t,String(n)}var qa={createNode:Ya,defaultOptions:Ne.defaultOptions,Document:Ke,parse:$a,parseAllDocuments:Ba,parseCST:zn.parse,parseDocument:pi,scalarOptions:Ne.scalarOptions,stringify:Fa};mi.YAML=qa});var di=ee((Rm,gi)=>{gi.exports=hi().YAML});var yi=ee(Q=>{"use strict";var Ve=$e(),We=le();Q.findPair=Ve.findPair;Q.parseMap=Ve.resolveMap;Q.parseSeq=Ve.resolveSeq;Q.stringifyNumber=Ve.stringifyNumber;Q.stringifyString=Ve.stringifyString;Q.toJSON=Ve.toJSON;Q.Type=We.Type;Q.YAMLError=We.YAMLError;Q.YAMLReferenceError=We.YAMLReferenceError;Q.YAMLSemanticError=We.YAMLSemanticError;Q.YAMLSyntaxError=We.YAMLSyntaxError;Q.YAMLWarning=We.YAMLWarning});var tr={};nr(tr,{languages:()=>Ir,options:()=>Pr,parsers:()=>er,printers:()=>Ja});var vi=(t,e,n,r)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(n,r):n.global?e.replace(n,r):e.split(n).join(r)},yt=vi;var je="string",Qe="array",Je="cursor",Ge="indent",Oe="align",He="trim",Le="group",Ae="fill",Te="if-break",Xe="indent-if-break",Ce="line-suffix",ze="line-suffix-boundary",te="line",Ze="label",Me="break-parent",Et=new Set([Je,Ge,Oe,He,Le,Ae,Te,Xe,Ce,ze,te,Ze,Me]);function Ii(t){if(typeof t=="string")return je;if(Array.isArray(t))return Qe;if(!t)return;let{type:e}=t;if(Et.has(e))return e}var et=Ii;var Pi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function _i(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}', Expected it to be 'string' or 'object'.`;if(et(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let r=Pi([...Et].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. Expected it to be ${r}.`}var rn=class extends Error{name="InvalidDocError";constructor(e){super(_i(e)),this.doc=e}},sn=rn;var sr=()=>{},he=sr,St=sr;function tt(t,e){return he(e),{type:Oe,contents:e,n:t}}function ke(t,e={}){return he(t),St(e.expandedStates,!0),{type:Le,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function on(t){return tt(Number.NEGATIVE_INFINITY,t)}function ir(t){return tt({type:"root"},t)}function or(t){return tt(-1,t)}function an(t,e){return ke(t[0],{...e,expandedStates:t})}function wt(t){return St(t),{type:Ae,parts:t}}function nt(t,e="",n={}){return he(t),e!==""&&he(e),{type:Te,breakContents:t,flatContents:e,groupId:n.groupId}}function ar(t){return he(t),{type:Ce,contents:t}}var bt={type:Me};var xi={type:te,hard:!0},Ri={type:te,hard:!0,literal:!0},ne={type:te},Nt={type:te,soft:!0},N=[xi,bt],rt=[Ri,bt];function v(t,e){he(t),St(e);let n=[];for(let r=0;r{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[n<0?e.length+n:n]:e.at(n)},x=Di;function Yi(t,e){if(typeof t=="string")return e(t);let n=new Map;return r(t);function r(i){if(n.has(i))return n.get(i);let o=s(i);return n.set(i,o),o}function s(i){switch(et(i)){case Qe:return e(i.map(r));case Ae:return e({...i,parts:i.parts.map(r)});case Te:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case Le:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(r),a=o[0]):a=r(a),e({...i,contents:a,expandedStates:o})}case Oe:case Ge:case Xe:case Ze:case Ce:return e({...i,contents:r(i.contents)});case je:case Je:case He:case ze:case te:case Me:return e(i);default:throw new sn(i)}}}function cr(t,e=rt){return Yi(t,n=>typeof n=="string"?v(e,n.split(` -`)):n)}function Bi(t,e,n){let r=!!(n!=null&&n.backwards);if(e===!1)return!1;let s=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&s===` +`)):n)}function Ot(t){return(e,n,r)=>{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o{let s=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:i}=e,o=n;for(;o>=0&&o{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}ur.getVisitorKeys=()=>[];var pr=ur;var st=null;function it(t){if(st!==null&&typeof st.property){let e=st;return st=it.prototype=null,e}return st=it.prototype=t??Object.create(null),new it}var Fi=10;for(let t=0;t<=Fi;t++)it();function un(t){return it(t)}function qi(t,e="type"){un(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var mr=qi;var Ui=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),hr=Ui;var Ki=mr(hr),gr=Ki;function ve(t){return t.position.start.offset}function dr(t){return t.position.end.offset}function yr(t){return/^\s*@(?:prettier|format)\s*$/.test(t)}function Er(t){return/^\s*#[^\S\n]*@(?:prettier|format)\s*?(?:\n|$)/.test(t)}function Sr(t){return`# @format -${t}`}function ve(t){return t.position.start.offset}function hr(t){return t.position.end.offset}function gr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(e.filepath))return async r=>{let s=await r(e.originalText,{parser:"json"});return s?[s,N]:void 0}}gr.getVisitorKeys=()=>[];var dr=gr;function Fi(t){return Array.isArray(t)&&t.length>0}var Ie=Fi;function G(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function un(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>un(r,e,t))}:t,n)}function Pe(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function Er(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;si===0&&i===o.length-1?s:i!==0&&i!==o.length-1?s.trim():i===0?s.trimEnd():s.trimStart());return n.proseWrap==="preserve"?r.map(s=>s.length===0?[]:[s]):r.map(s=>s.length===0?[]:wr(s)).reduce((s,i,o)=>o!==0&&r[o-1].length>0&&i.length>0&&!(t==="quoteDouble"&&x(!1,x(!1,s,-1),-1).endsWith("\\"))?[...s.slice(0,-1),[...x(!1,s,-1),...i]]:[...s,i],[]).map(s=>n.proseWrap==="never"?[s.join(" ")]:s)}function Nr(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1],i;if(t.indent===null){let c=s.match(/^(? *)[^\n\r ]/m);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(` -`).map(c=>c.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return a(o.map(c=>c.length===0?[]:[c]));return a(o.map(c=>c.length===0?[]:wr(c)).reduce((c,l,f)=>f!==0&&o[f-1].length>0&&l.length>0&&!/^\s/.test(l[0])&&!/^\s|\s$/.test(x(!1,c,-1))?[...c.slice(0,-1),[...x(!1,c,-1),...l]]:[...c,l],[]).map(c=>c.reduce((l,f)=>l.length>0&&/\s$/.test(x(!1,l,-1))?[...l.slice(0,-1),x(!1,l,-1)+" "+f]:[...l,f],[])).map(c=>r.proseWrap==="never"?[c.join(" ")]:c));function a(c){if(t.chomping==="keep")return x(!1,c,-1).length===0?c.slice(0,-1):c;let l=0;for(let f=c.length-1;f>=0&&c[f].length===0;f--)l++;return l===0?c:l>=2&&!n?c.slice(0,-(l-1)):c.slice(0,-l)}}function st(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var it=null;function ot(t){if(it!==null&&typeof it.property){let e=it;return it=ot.prototype=null,e}return it=ot.prototype=t??Object.create(null),new ot}var Ui=10;for(let t=0;t<=Ui;t++)ot();function mn(t){return ot(t)}function Ki(t,e="type"){mn(t);function n(r){let s=r[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return i}return n}var Or=Ki;var Vi=Object.fromEntries(Object.entries({root:["children"],document:["head","body","children"],documentHead:["children"],documentBody:["children"],directive:[],alias:[],blockLiteral:[],blockFolded:["children"],plain:["children"],quoteSingle:[],quoteDouble:[],mapping:["children"],mappingItem:["key","value","children"],mappingKey:["content","children"],mappingValue:["content","children"],sequence:["children"],sequenceItem:["content","children"],flowMapping:["children"],flowMappingItem:["key","value","children"],flowSequence:["children"],flowSequenceItem:["content","children"],comment:[],tag:[],anchor:[]}).map(([t,e])=>[t,[...e,"anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"]])),Lr=Vi;var Wi=Or(Lr),Ar=Wi;function ji(t){return un(t,Qi)}function Qi(t){switch(t.type){case"document":Pe(t,"head",()=>t.children[0]),Pe(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Pe(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Pe(t,"key",()=>t.children[0]),Pe(t,"value",()=>t.children[1]);break}return t}var Tr=ji;var hn=new WeakMap;function Tt(t,e){let{node:n,root:r}=t,s;return hn.has(r)?s=hn.get(r):(s=new Set,hn.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),Er(n,e)&&!gn(t.parent))?Nt:""}function gn(t){return R(t)&&!G(t,["documentHead","documentBody","flowMapping","flowSequence"])}function I(t,e){return tt(" ".repeat(t),e)}function Ct(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Nt;s&&r.children.length>0&&n.bracketSpacing&&(a=ne);let c=x(!1,r.children,-1),l=(c==null?void 0:c.type)==="flowMappingItem"&&_e(c.key)&&_e(c.value);return[i,I(n.tabWidth,[a,Ji(t,e,n),n.trailingComma==="none"?"":nt(","),R(r)?[N,v(N,t.map(e,"endComments"))]:""]),l?"":a,o]}function Ji(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[e(),r?"":[",",ne,s.position.start.line!==i.position.start.line?Tt(t,n.originalText):""]],"children")}function Gi(t,e,n){var C;let{node:r,parent:s}=t,{key:i,value:o}=r,a=_e(i),c=_e(o);if(a&&c)return": ";let l=e("key"),f=Hi(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&dn(i.content,n)&&!H(i.content)&&((C=s.tag)==null?void 0:C.value)!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",I(2,l)];let m=e("value");if(a)return[": ",I(2,m)];if(Z(o)||!st(i.content))return["? ",I(2,l),N,...t.map(()=>[e(),N],"value","leadingComments"),": ",I(2,m)];if(Xi(i.content)&&!Z(i.content)&&!ie(i.content)&&!H(i.content)&&!R(i)&&!Z(o.content)&&!ie(o.content)&&!R(o)&&dn(o.content,n))return[l,f,": ",m];let d=Symbol("mappingKey"),y=ke([nt("? "),ke(I(2,l),{id:d})]),h=[N,": ",I(2,m)],g=[f,":"];Z(o.content)||R(o)&&o.content&&!G(o.content,["mapping","sequence"])||s.type==="mapping"&&H(i.content)&&st(o.content)||G(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?g.push(N):o.content&&g.push(ne),g.push(m);let w=I(n.tabWidth,g);return dn(i.content,n)&&!Z(i.content)&&!ie(i.content)&&!R(i)?an([[l,w]]):an([[y,nt(h,w,{groupId:d})]])}function dn(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(` -`);case"always":return!/[\n ]/.test(t.value);default:return!1}}function Hi(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function Xi(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Cr=Gi;function zi(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=Lt(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),pn(r)&&o.push(" ",e("indicatorComment"));let a=Nr(r,{parentIndent:s,isLastDescendant:i,options:n}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(wt(v(ne,f))),l!==a.length-1?c.push(f.length===0?N:ir(rt)):r.chomping==="keep"&&i&&c.push(on(f.length===0?N:rt));return r.indent===null?o.push(or(I(n.tabWidth,c))):o.push(on(I(r.indent-1+s,c))),o}var Mr=zi;function Zi(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&Z(r)&&s.push([v(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return G(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!Lt(t)&&(a=Tt(t,e.originalText)),(i||o)&&(G(r,["sequence","mapping"])&&!ie(r)?s.push(N):s.push(" ")),ie(r)&&s.push([r.middleComments.length===1?"":N,v(N,t.map(n,"middleComments")),N]),Sr(t)?s.push(cr(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(ke(eo(t,e,n))),H(r)&&!G(r,["document","documentHead"])&&s.push(ar([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&st(r)?"":bt,n("trailingComment")])),gn(r)&&s.push(I(r.type==="sequenceItem"?2:0,[N,v(N,t.map(({node:c})=>[lr(e.originalText,ve(c))?N:"",n()],"endComments"))])),s.push(a),s}function eo(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=[];t.each(({node:o,next:a,isFirst:c})=>{c||s.push(N),s.push(n()),kr(o,a)?(s.push(N,"..."),H(o)&&s.push(" ",n("trailingComment"))):a&&!H(a.head)&&s.push(N,"---")},"children");let i=At(r);return(!G(i,["blockLiteral","blockFolded"])||i.chomping!=="keep")&&s.push(N),s}case"document":{let s=[];return no(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),H(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),to(r)&&s.push(n("body")),v(N,s)}case"documentHead":return v(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=At(r);G(a,["blockFolded","blockLiteral"])?a.chomping!=="keep"&&(o=[N,N]):o=N}return[v(N,t.map(n,"children")),o,v(N,t.map(n,"endComments"))]}case"directive":return["%",v(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return at(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let s="'",i='"',o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/.test(o)){let c=r.type==="quoteDouble"?i:s;return[c,at(r.type,o,e),c]}if(o.includes(i))return[s,at(r.type,r.type==="quoteDouble"?yt(!1,yt(!1,o,'\\"',i),"'",s.repeat(2)):o,e),s];if(o.includes(s))return[i,at(r.type,r.type==="quoteSingle"?yt(!1,o,"''",s):o,e),i];let a=e.singleQuote?s:i;return[a,at(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Mr(t,n,e);case"mapping":case"sequence":return v(N,t.map(n,"children"));case"sequenceItem":return["- ",I(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Cr(t,n,e);case"flowMapping":return Ct(t,n,e);case"flowSequence":return Ct(t,n,e);case"flowSequenceItem":return n("content");default:throw new fr(r,"YAML")}}function to(t){return t.body.children.length>0||R(t.body)}function kr(t,e){return H(t)||e&&(e.head.children.length>0||R(e.head))}function no(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/.test(e.originalText.slice(ve(n),ve(n)+4))||n.head.children.length>0||R(n.head)||H(n.head))return"head";let r=t.next;return kr(n,r)?!1:r?"root":!1}function at(t,e,n){let r=br(t,e,n);return v(N,r.map(s=>wt(v(ne,s))))}function ro(t,e){if(G(e))switch(delete e.position,e.type){case"comment":if(ur(e.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}var so={preprocess:Tr,embed:dr,print:Zi,massageAstNode:ro,insertPragma:mr,getVisitorKeys:Ar},vr=so;var er={};nr(er,{yaml:()=>ja});var Mt=` -`,Ir="\r",Pr=function(){function t(e){this.length=e.length;for(var n=[0],r=0;rthis.length)return null;for(var n=0,r=this.offsets;r[n+1]<=e;)n++;var s=e-r[n];return{line:n,column:s}},t.prototype.indexForLocation=function(e){var n=e.line,r=e.column;return n<0||n>=this.offsets.length||r<0||r>this.lengthOfLine(n)?null:this.offsets[n]+r},t.prototype.lengthOfLine=function(e){var n=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-n},t}();function B(t,e=null){"children"in t&&t.children.forEach(n=>B(n,t)),"anchor"in t&&t.anchor&&B(t.anchor,t),"tag"in t&&t.tag&&B(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>B(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>B(n,t)),"indicatorComment"in t&&t.indicatorComment&&B(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&B(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>B(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function ge(t){return`${t.line}:${t.column}`}function _r(t){B(t);let e=io(t),n=t.children.slice();t.comments.sort((r,s)=>r.position.start.offset-s.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();oo(r,e,n[0])})}function io(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return xr(e,t),e}function xr(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:r}=t[n.line-1];(!r||n.column1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:r}=t[n.line-1];(!r||n.column>=r.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:r}=e.position,s=[r.line].concat(n.line===r.line?[]:n.line);for(let i of s){let o=t[i-1].trailingNode;(!o||r.column>=o.position.end.column)&&(t[i-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{xr(t,n)})}}function oo(t,e,n){let r=t.position.start.line,{trailingAttachableNode:s}=e[r-1];if(s){if(s.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${ge(t.position.start)}`);B(t,s),s.trailingComment=t;return}for(let o=r;o>=n.position.start.line;o--){let{trailingNode:a}=e[o-1],c;if(a)c=a;else if(o!==r&&e[o-1].comment)c=e[o-1].comment._parent;else continue;if((c.type==="sequence"||c.type==="mapping")&&(c=c.children[0]),c.type==="mappingItem"){let[l,f]=c.children;c=Rr(l)?l:f}for(;;){if(ao(c,t)){B(t,c),c.endComments.push(t);return}if(!c._parent)break;c=c._parent}break}for(let o=r+1;o<=n.position.end.line;o++){let{leadingAttachableNode:a}=e[o-1];if(a){B(t,a),a.leadingComments.push(t);return}}let i=n.children[1];B(t,i),i.endComments.push(t)}function ao(t,e){if(t.position.start.offsete.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offsett.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||Rr(t));default:return!1}}function Rr(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function b(t,e){return{type:t,position:e}}function Dr(t,e,n){return{...b("root",t),children:e,comments:n}}function ct(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):ct(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):ct(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&ct(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)}`)}}function X(){return{leadingComments:[]}}function oe(t=null){return{trailingComment:t}}function $(){return{...X(),...oe()}}function Yr(t,e,n){return{...b("alias",t),...$(),...e,value:n}}function Br(t,e){let n=t.cstNode;return Yr(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function $r(t){return{...t,type:"blockFolded"}}function Fr(t,e,n,r,s,i){return{...b("blockValue",t),...X(),...e,chomping:n,indent:r,value:s,indicatorComment:i}}var ae;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(ae||(ae={}));function qr(t,e){return{...b("anchor",t),value:e}}function xe(t,e){return{...b("comment",t),value:e}}function Ur(t,e,n){return{anchor:e,tag:t,middleComments:n}}function Kr(t,e){return{...b("tag",t),value:e}}function kt(t,e,n=()=>!1){let r=t.cstNode,s=[],i=null,o=null,a=null;for(let c of r.props){let l=e.text[c.origStart];switch(l){case ae.Tag:i=i||c,o=Kr(e.transformRange(c),t.tag);break;case ae.Anchor:i=i||c,a=qr(e.transformRange(c),r.anchor);break;case ae.Comment:{let f=xe(e.transformRange(c),e.text.slice(c.origStart+1,c.origEnd));e.comments.push(f),!n(f)&&i&&i.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&s.push(f);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return Ur(o,a,s)}var yn;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(yn||(yn={}));function vt(t,e){let n=t.cstNode,r=1,s=n.chomping==="CLIP"?0:1,o=n.header.origEnd-n.header.origStart-r-s!==0,a=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),c=null,l=kt(t,e,f=>{if(!(a.start.offset=0;c--){let l=t.contents[c];if(l.type==="COMMENT"){let f=e.transformNode(l);n&&n.line===f.position.start.line?o.unshift(f):a?r.unshift(f):f.position.start.offset>=t.valueRange.origEnd?i.unshift(f):r.unshift(f)}else a=!0}if(i.length>1)throw new Error(`Unexpected multiple document trailing comments at ${ge(i[1].position.start)}`);if(o.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${ge(o[1].position.start)}`);return{comments:r,endComments:s,documentTrailingComment:q(i)||null,documentHeadTrailingComment:q(o)||null}}function lo(t,e,n){let r=It(n.text.slice(t.valueRange.origEnd),/^\.\.\./),s=r===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[s-1]==="\r"&&s--;let i=n.transformRange({origStart:e!==null?e.position.start.offset:s,origEnd:s}),o=r===-1?i.end:n.transformOffset(t.valueRange.origEnd+3);return{position:i,documentEndPoint:o}}function Zr(t,e,n,r){return{...b("documentHead",t),...F(n),...oe(r),children:e}}function es(t,e){let n=t.cstNode,{directives:r,comments:s,endComments:i}=fo(n,e),{position:o,endMarkerPoint:a}=uo(n,r,e);return e.comments.push(...s,...i),{createDocumentHeadWithTrailingComment:l=>(l&&e.comments.push(l),Zr(o,r,i,l)),documentHeadEndMarkerPoint:a}}function fo(t,e){let n=[],r=[],s=[],i=!1;for(let o=t.directives.length-1;o>=0;o--){let a=e.transformNode(t.directives[o]);a.type==="comment"?i?r.unshift(a):s.unshift(a):(i=!0,n.unshift(a))}return{directives:n,comments:r,endComments:s}}function uo(t,e,n){let r=It(n.text.slice(0,t.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let s=r===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:r,origEnd:r+3};return e.length!==0&&(s.origStart=e[0].position.start.offset),{position:n.transformRange(s),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function ts(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=es(t,e),{documentBody:s,documentEndPoint:i,documentTrailingComment:o,documentHeadTrailingComment:a}=zr(t,e,r),c=n(a);return o&&e.comments.push(o),Hr(K(c.position.start,i),c,s,o)}function Pt(t,e,n){return{...b("flowCollection",t),...$(),...F(),...e,children:n}}function ns(t,e,n){return{...Pt(t,e,n),type:"flowMapping"}}function _t(t,e,n){return{...b("flowMappingItem",t),...X(),children:[e,n]}}function ce(t,e){let n=[];for(let r of t)r&&"type"in r&&r.type==="COMMENT"?e.comments.push(e.transformNode(r)):n.push(r);return n}function xt(t){let[e,n]=["?",":"].map(r=>{let s=t.find(i=>"char"in i&&i.char===r);return s?{origStart:s.origOffset,origEnd:s.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function Rt(t,e){let n=e;return r=>t.slice(n,n=r)}function Dt(t){let e=[],n=Rt(t,1),r=!1;for(let s=1;s{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=xt(l);return De(a,e,_t,f,m)}),i=n[0],o=q(n);return ns(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function ss(t,e,n){return{...Pt(t,e,n),type:"flowSequence"}}function is(t,e){return{...b("flowSequenceItem",t),children:[e]}}function os(t,e){let n=ce(t.cstNode.items,e),r=Dt(n),s=t.items.map((a,c)=>{if(a.type!=="PAIR"){let l=e.transformNode(a);return is(K(l.position.start,l.position.end),l)}else{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=xt(l);return De(a,e,_t,f,m)}}),i=n[0],o=q(n);return ss(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function as(t,e,n){return{...b("mapping",t),...X(),...e,children:n}}function cs(t,e,n){return{...b("mappingItem",t),...X(),children:[e,n]}}function ls(t,e){let n=t.cstNode;n.items.filter(o=>o.type==="MAP_KEY"||o.type==="MAP_VALUE").forEach(o=>Re(o,e));let r=ce(n.items,e),s=po(r),i=t.items.map((o,a)=>{let c=s[a],[l,f]=c[0].type==="MAP_VALUE"?[null,c[0].range]:[c[0].range,c.length===1?null:c[1].range];return De(o,e,cs,l,f)});return as(K(i[0].position.start,q(i).position.end),e.transformContent(t),i)}function po(t){let e=[],n=Rt(t,0),r=!1;for(let s=0;s=0;r--)if(n.test(t[r]))return r;return-1}function ps(t,e){let n=t.cstNode;return fs(e.transformRange({origStart:n.valueRange.origStart,origEnd:us(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function ms(t){return{...t,type:"quoteDouble"}}function hs(t,e,n){return{...b("quoteValue",t),...e,...$(),value:n}}function Yt(t,e){let n=t.cstNode;return hs(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function gs(t,e){return ms(Yt(t,e))}function ds(t){return{...t,type:"quoteSingle"}}function ys(t,e){return ds(Yt(t,e))}function Es(t,e,n){return{...b("sequence",t),...X(),...F(),...e,children:n}}function Ss(t,e){return{...b("sequenceItem",t),...$(),...F(),children:e?[e]:[]}}function ws(t,e){let r=ce(t.cstNode.items,e).map((s,i)=>{Re(s,e);let o=e.transformNode(t.items[i]);return Ss(K(e.transformOffset(s.valueRange.origStart),o===null?e.transformOffset(s.valueRange.origStart+1):o.position.end),o)});return Es(K(r[0].position.start,q(r).position.end),e.transformContent(t),r)}function bs(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return Br(t,e);case"BLOCK_FOLDED":return Vr(t,e);case"BLOCK_LITERAL":return jr(t,e);case"COMMENT":return Qr(t,e);case"DIRECTIVE":return Gr(t,e);case"DOCUMENT":return ts(t,e);case"FLOW_MAP":return rs(t,e);case"FLOW_SEQ":return os(t,e);case"MAP":return ls(t,e);case"PLAIN":return ps(t,e);case"QUOTE_DOUBLE":return gs(t,e);case"QUOTE_SINGLE":return ys(t,e);case"SEQ":return ws(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}function Ns(t,e,n){let r=new SyntaxError(t);return r.name="YAMLSyntaxError",r.source=e,r.position=n,r}function Os(t,e){let n=t.source.range||t.source.valueRange;return Ns(t.message,e.text,e.transformRange(n))}function Ls(t,e,n){return{offset:t,line:e,column:n}}function As(t,e){t<0?t=0:t>e.text.length&&(t=e.text.length);let n=e.locator.locationForIndex(t);return Ls(t,n.line+1,n.column+1)}function Ts(t,e){return K(e.transformOffset(t.origStart),e.transformOffset(t.origEnd))}function Cs(t){if(!t.setOrigRanges()){let e=n=>{if(mo(n))return n.origStart=n.start,n.origEnd=n.end,!0;if(ho(n))return n.origOffset=n.offset,!0};t.forEach(n=>bn(n,e))}}function bn(t,e){if(!(!t||typeof t!="object")&&e(t)!==!0)for(let n of Object.keys(t)){if(n==="context"||n==="error")continue;let r=t[n];Array.isArray(r)?r.forEach(s=>bn(s,e)):bn(r,e)}}function mo(t){return typeof t.start=="number"}function ho(t){return typeof t.offset=="number"}function Nn(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(Nn)}return t}function On(t,e,n,r){let s=e(t);return i=>{r(s,i)&&n(t,s=i)}}function Ln(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(Ln),t.type==="document"){let[i,o]=t.children;i.position.start.offset===i.position.end.offset?i.position.start=i.position.end=o.position.start:o.position.start.offset===o.position.end.offset&&(o.position.start=o.position.end=i.position.end)}let n=On(t.position,go,yo,wo),r=On(t.position,Eo,So,bo);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),r(q(t.endComments).position.end));let s=e.filter(i=>i!==null);if(s.length!==0){let i=s[0],o=q(s);n(i.position.start),r(o.position.end),"leadingComments"in i&&i.leadingComments.length!==0&&n(i.leadingComments[0].position.start),"tag"in i&&i.tag&&n(i.tag.position.start),"anchor"in i&&i.anchor&&n(i.anchor.position.start),"trailingComment"in o&&o.trailingComment&&r(o.trailingComment.position.end)}}function go(t){return t.start}function yo(t,e){t.start=e}function Eo(t){return t.end}function So(t,e){t.end=e}function wo(t,e){return e.offsett.offset}var di=rr(hi(),1);var J=rr(gi(),1),_m=J.default.findPair,xm=J.default.toJSON,Rm=J.default.parseMap,Dm=J.default.parseSeq,Ym=J.default.stringifyNumber,Bm=J.default.stringifyString,$m=J.default.Type,qa=J.default.YAMLError,Fm=J.default.YAMLReferenceError,Zn=J.default.YAMLSemanticError,Ua=J.default.YAMLSyntaxError,qm=J.default.YAMLWarning;var{Document:yi,parseCST:Ei}=di.default;function Si(t){let e=Ei(t);Cs(e);let n=e.map(a=>new yi({merge:!1,keepCstNodes:!0}).parse(a)),r=new Pr(t),s=[],i={text:t,locator:r,comments:s,transformOffset:a=>As(a,i),transformRange:a=>Ts(a,i),transformNode:a=>bs(a,i),transformContent:a=>kt(a,i)};for(let a of n)for(let c of a.errors)if(!(c instanceof Zn&&c.message==='Map keys must be unique; "<<" is repeated'))throw Os(c,i);n.forEach(a=>ct(a.cstNode));let o=Dr(i.transformRange({origStart:0,origEnd:i.text.length}),n.map(i.transformNode),s);return _r(o),Ln(o),Nn(o),o}function Va(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var wi=Va;function Wa(t){try{let e=Si(t);return delete e.comments,e}catch(e){throw e!=null&&e.position?wi(e.message,{loc:e.position,cause:e}):e}}var ja={astFormat:"yaml",parse:Wa,hasPragma:pr,locStart:ve,locEnd:hr};var bi=[{linguistLanguageId:407,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","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"]}];var tn={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Qa={bracketSpacing:tn.bracketSpacing,singleQuote:tn.singleQuote,proseWrap:tn.proseWrap},Ni=Qa;var Ja={yaml:vr};var yh=tr;export{yh as default,bi as languages,Ni as options,er as parsers,Ja as printers}; +${t}`}function Vi(t){return Array.isArray(t)&&t.length>0}var Ie=Vi;function G(t,e){return typeof(t==null?void 0:t.type)=="string"&&(!e||e.includes(t.type))}function pn(t,e,n){return e("children"in t?{...t,children:t.children.map(r=>pn(r,e,t))}:t,n)}function Pe(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function br(t,e){let n=0,r=e.length;for(let s=t.position.end.offset-1;si===0&&i===o.length-1?s:i!==0&&i!==o.length-1?s.trim():i===0?s.trimEnd():s.trimStart());return n.proseWrap==="preserve"?r.map(s=>s.length===0?[]:[s]):r.map(s=>s.length===0?[]:Or(s)).reduce((s,i,o)=>o!==0&&r[o-1].length>0&&i.length>0&&!(t==="quoteDouble"&&x(!1,x(!1,s,-1),-1).endsWith("\\"))?[...s.slice(0,-1),[...x(!1,s,-1),...i]]:[...s,i],[]).map(s=>n.proseWrap==="never"?[s.join(" ")]:s)}function Ar(t,{parentIndent:e,isLastDescendant:n,options:r}){let s=t.position.start.line===t.position.end.line?"":r.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1],i;if(t.indent===null){let c=s.match(/^(? *)[^\n\r ]/m);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=s.split(` +`).map(c=>c.slice(i));if(r.proseWrap==="preserve"||t.type==="blockLiteral")return a(o.map(c=>c.length===0?[]:[c]));return a(o.map(c=>c.length===0?[]:Or(c)).reduce((c,l,f)=>f!==0&&o[f-1].length>0&&l.length>0&&!/^\s/.test(l[0])&&!/^\s|\s$/.test(x(!1,c,-1))?[...c.slice(0,-1),[...x(!1,c,-1),...l]]:[...c,l],[]).map(c=>c.reduce((l,f)=>l.length>0&&/\s$/.test(x(!1,l,-1))?[...l.slice(0,-1),x(!1,l,-1)+" "+f]:[...l,f],[])).map(c=>r.proseWrap==="never"?[c.join(" ")]:c));function a(c){if(t.chomping==="keep")return x(!1,c,-1).length===0?c.slice(0,-1):c;let l=0;for(let f=c.length-1;f>=0&&c[f].length===0;f--)l++;return l===0?c:l>=2&&!n?c.slice(0,-(l-1)):c.slice(0,-l)}}function ot(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var hn=new WeakMap;function Tt(t,e){let{node:n,root:r}=t,s;return hn.has(r)?s=hn.get(r):(s=new Set,hn.set(r,s)),!s.has(n.position.end.line)&&(s.add(n.position.end.line),br(n,e)&&!gn(t.parent))?Nt:""}function gn(t){return R(t)&&!G(t,["documentHead","documentBody","flowMapping","flowSequence"])}function I(t,e){return tt(" ".repeat(t),e)}function ji(t,e,n){let{node:r}=t,s=t.ancestors.filter(l=>l.type==="sequence"||l.type==="mapping").length,i=Lt(t),o=[r.type==="blockFolded"?">":"|"];r.indent!==null&&o.push(r.indent.toString()),r.chomping!=="clip"&&o.push(r.chomping==="keep"?"+":"-"),mn(r)&&o.push(" ",e("indicatorComment"));let a=Ar(r,{parentIndent:s,isLastDescendant:i,options:n}),c=[];for(let[l,f]of a.entries())l===0&&c.push(N),c.push(wt(v(ne,f))),l!==a.length-1?c.push(f.length===0?N:ir(rt)):r.chomping==="keep"&&i&&c.push(on(f.length===0?N:rt));return r.indent===null?o.push(or(I(n.tabWidth,c))):o.push(on(I(r.indent-1+s,c))),o}var Tr=ji;function Ct(t,e,n){let{node:r}=t,s=r.type==="flowMapping",i=s?"{":"[",o=s?"}":"]",a=Nt;s&&r.children.length>0&&n.bracketSpacing&&(a=ne);let c=x(!1,r.children,-1),l=(c==null?void 0:c.type)==="flowMappingItem"&&_e(c.key)&&_e(c.value);return[i,I(n.tabWidth,[a,Qi(t,e,n),n.trailingComma==="none"?"":nt(","),R(r)?[N,v(N,t.map(e,"endComments"))]:""]),l?"":a,o]}function Qi(t,e,n){return t.map(({isLast:r,node:s,next:i})=>[e(),r?"":[",",ne,s.position.start.line!==i.position.start.line?Tt(t,n.originalText):""]],"children")}function Ji(t,e,n){var C;let{node:r,parent:s}=t,{key:i,value:o}=r,a=_e(i),c=_e(o);if(a&&c)return": ";let l=e("key"),f=Gi(r)?" ":"";if(c)return r.type==="flowMappingItem"&&s.type==="flowMapping"?l:r.type==="mappingItem"&&dn(i.content,n)&&!H(i.content)&&((C=s.tag)==null?void 0:C.value)!=="tag:yaml.org,2002:set"?[l,f,":"]:["? ",I(2,l)];let m=e("value");if(a)return[": ",I(2,m)];if(Z(o)||!ot(i.content))return["? ",I(2,l),N,...t.map(()=>[e(),N],"value","leadingComments"),": ",I(2,m)];if(Hi(i.content)&&!Z(i.content)&&!ie(i.content)&&!H(i.content)&&!R(i)&&!Z(o.content)&&!ie(o.content)&&!R(o)&&dn(o.content,n))return[l,f,": ",m];let d=Symbol("mappingKey"),y=ke([nt("? "),ke(I(2,l),{id:d})]),h=[N,": ",I(2,m)],g=[f,":"];Z(o.content)||R(o)&&o.content&&!G(o.content,["mapping","sequence"])||s.type==="mapping"&&H(i.content)&&ot(o.content)||G(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?g.push(N):o.content&&g.push(ne),g.push(m);let w=I(n.tabWidth,g);return dn(i.content,n)&&!Z(i.content)&&!ie(i.content)&&!R(i)?an([[l,w]]):an([[y,nt(h,w,{groupId:d})]])}function dn(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(` +`);case"always":return!/[\n ]/.test(t.value);default:return!1}}function Gi(t){var e;return((e=t.key.content)==null?void 0:e.type)==="alias"}function Hi(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Cr=Ji;function Xi(t){return pn(t,zi)}function zi(t){switch(t.type){case"document":Pe(t,"head",()=>t.children[0]),Pe(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Pe(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Pe(t,"key",()=>t.children[0]),Pe(t,"value",()=>t.children[1]);break}return t}var Mr=Xi;function Zi(t,e,n){let{node:r}=t,s=[];r.type!=="mappingValue"&&Z(r)&&s.push([v(N,t.map(n,"leadingComments")),N]);let{tag:i,anchor:o}=r;i&&s.push(n("tag")),i&&o&&s.push(" "),o&&s.push(n("anchor"));let a="";return G(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!Lt(t)&&(a=Tt(t,e.originalText)),(i||o)&&(G(r,["sequence","mapping"])&&!ie(r)?s.push(N):s.push(" ")),ie(r)&&s.push([r.middleComments.length===1?"":N,v(N,t.map(n,"middleComments")),N]),Nr(t)?s.push(cr(e.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd())):s.push(ke(eo(t,e,n))),H(r)&&!G(r,["document","documentHead"])&&s.push(ar([r.type==="mappingValue"&&!r.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&ot(r)?"":bt,n("trailingComment")])),gn(r)&&s.push(I(r.type==="sequenceItem"?2:0,[N,v(N,t.map(({node:c})=>[lr(e.originalText,ve(c))?N:"",n()],"endComments"))])),s.push(a),s}function eo(t,e,n){let{node:r}=t;switch(r.type){case"root":{let s=[];t.each(({node:o,next:a,isFirst:c})=>{c||s.push(N),s.push(n()),kr(o,a)?(s.push(N,"..."),H(o)&&s.push(" ",n("trailingComment"))):a&&!H(a.head)&&s.push(N,"---")},"children");let i=At(r);return(!G(i,["blockLiteral","blockFolded"])||i.chomping!=="keep")&&s.push(N),s}case"document":{let s=[];return no(t,e)==="head"&&((r.head.children.length>0||r.head.endComments.length>0)&&s.push(n("head")),H(r.head)?s.push(["---"," ",n(["head","trailingComment"])]):s.push("---")),to(r)&&s.push(n("body")),v(N,s)}case"documentHead":return v(N,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:s,endComments:i}=r,o="";if(s.length>0&&i.length>0){let a=At(r);G(a,["blockFolded","blockLiteral"])?a.chomping!=="keep"&&(o=[N,N]):o=N}return[v(N,t.map(n,"children")),o,v(N,t.map(n,"endComments"))]}case"directive":return["%",v(" ",[r.name,...r.parameters])];case"comment":return["#",r.value];case"alias":return["*",r.value];case"tag":return e.originalText.slice(r.position.start.offset,r.position.end.offset);case"anchor":return["&",r.value];case"plain":return at(r.type,e.originalText.slice(r.position.start.offset,r.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let s="'",i='"',o=e.originalText.slice(r.position.start.offset+1,r.position.end.offset-1);if(r.type==="quoteSingle"&&o.includes("\\")||r.type==="quoteDouble"&&/\\[^"]/.test(o)){let c=r.type==="quoteDouble"?i:s;return[c,at(r.type,o,e),c]}if(o.includes(i))return[s,at(r.type,r.type==="quoteDouble"?yt(!1,yt(!1,o,'\\"',i),"'",s.repeat(2)):o,e),s];if(o.includes(s))return[i,at(r.type,r.type==="quoteSingle"?yt(!1,o,"''",s):o,e),i];let a=e.singleQuote?s:i;return[a,at(r.type,o,e),a]}case"blockFolded":case"blockLiteral":return Tr(t,n,e);case"mapping":case"sequence":return v(N,t.map(n,"children"));case"sequenceItem":return["- ",I(2,r.content?n("content"):"")];case"mappingKey":case"mappingValue":return r.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Cr(t,n,e);case"flowMapping":return Ct(t,n,e);case"flowSequence":return Ct(t,n,e);case"flowSequenceItem":return n("content");default:throw new fr(r,"YAML")}}function to(t){return t.body.children.length>0||R(t.body)}function kr(t,e){return H(t)||e&&(e.head.children.length>0||R(e.head))}function no(t,e){let n=t.node;if(t.isFirst&&/---(?:\s|$)/.test(e.originalText.slice(ve(n),ve(n)+4))||n.head.children.length>0||R(n.head)||H(n.head))return"head";let r=t.next;return kr(n,r)?!1:r?"root":!1}function at(t,e,n){let r=Lr(t,e,n);return v(N,r.map(s=>wt(v(ne,s))))}function ro(t,e){if(G(e))switch(delete e.position,e.type){case"comment":if(yr(e.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break}}var so={preprocess:Mr,embed:pr,print:Zi,massageAstNode:ro,insertPragma:Sr,getVisitorKeys:gr},vr=so;var Ir=[{linguistLanguageId:407,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","CITATION.cff","glide.lock",".prettierrc",".stylelintrc",".lintstagedrc"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"]}];var Mt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var io={bracketSpacing:Mt.bracketSpacing,singleQuote:Mt.singleQuote,proseWrap:Mt.proseWrap},Pr=io;var er={};nr(er,{yaml:()=>Qa});var kt=` +`,_r="\r",xr=function(){function t(e){this.length=e.length;for(var n=[0],r=0;rthis.length)return null;for(var n=0,r=this.offsets;r[n+1]<=e;)n++;var s=e-r[n];return{line:n,column:s}},t.prototype.indexForLocation=function(e){var n=e.line,r=e.column;return n<0||n>=this.offsets.length||r<0||r>this.lengthOfLine(n)?null:this.offsets[n]+r},t.prototype.lengthOfLine=function(e){var n=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-n},t}();function B(t,e=null){"children"in t&&t.children.forEach(n=>B(n,t)),"anchor"in t&&t.anchor&&B(t.anchor,t),"tag"in t&&t.tag&&B(t.tag,t),"leadingComments"in t&&t.leadingComments.forEach(n=>B(n,t)),"middleComments"in t&&t.middleComments.forEach(n=>B(n,t)),"indicatorComment"in t&&t.indicatorComment&&B(t.indicatorComment,t),"trailingComment"in t&&t.trailingComment&&B(t.trailingComment,t),"endComments"in t&&t.endComments.forEach(n=>B(n,t)),Object.defineProperty(t,"_parent",{value:e,enumerable:!1})}function ge(t){return`${t.line}:${t.column}`}function Rr(t){B(t);let e=oo(t),n=t.children.slice();t.comments.sort((r,s)=>r.position.start.offset-s.position.end.offset).filter(r=>!r._parent).forEach(r=>{for(;n.length>1&&r.position.start.line>n[0].position.end.line;)n.shift();ao(r,e,n[0])})}function oo(t){let e=Array.from(new Array(t.position.end.line),()=>({}));for(let n of t.comments)e[n.position.start.line-1].comment=n;return Dr(e,t),e}function Dr(t,e){if(e.position.start.offset!==e.position.end.offset){if("leadingComments"in e){let{start:n}=e.position,{leadingAttachableNode:r}=t[n.line-1];(!r||n.column1&&e.type!=="document"&&e.type!=="documentHead"){let{end:n}=e.position,{trailingAttachableNode:r}=t[n.line-1];(!r||n.column>=r.position.end.column)&&(t[n.line-1].trailingAttachableNode=e)}if(e.type!=="root"&&e.type!=="document"&&e.type!=="documentHead"&&e.type!=="documentBody"){let{start:n,end:r}=e.position,s=[r.line].concat(n.line===r.line?[]:n.line);for(let i of s){let o=t[i-1].trailingNode;(!o||r.column>=o.position.end.column)&&(t[i-1].trailingNode=e)}}"children"in e&&e.children.forEach(n=>{Dr(t,n)})}}function ao(t,e,n){let r=t.position.start.line,{trailingAttachableNode:s}=e[r-1];if(s){if(s.trailingComment)throw new Error(`Unexpected multiple trailing comment at ${ge(t.position.start)}`);B(t,s),s.trailingComment=t;return}for(let o=r;o>=n.position.start.line;o--){let{trailingNode:a}=e[o-1],c;if(a)c=a;else if(o!==r&&e[o-1].comment)c=e[o-1].comment._parent;else continue;if((c.type==="sequence"||c.type==="mapping")&&(c=c.children[0]),c.type==="mappingItem"){let[l,f]=c.children;c=Yr(l)?l:f}for(;;){if(co(c,t)){B(t,c),c.endComments.push(t);return}if(!c._parent)break;c=c._parent}break}for(let o=r+1;o<=n.position.end.line;o++){let{leadingAttachableNode:a}=e[o-1];if(a){B(t,a),a.leadingComments.push(t);return}}let i=n.children[1];B(t,i),i.endComments.push(t)}function co(t,e){if(t.position.start.offsete.position.end.offset)switch(t.type){case"flowMapping":case"flowSequence":return t.children.length===0||e.position.start.line>t.children[t.children.length-1].position.end.line}if(e.position.end.offsett.position.start.column;case"mappingKey":case"mappingValue":return e.position.start.column>t._parent.position.start.column&&(t.children.length===0||t.children.length===1&&t.children[0].type!=="blockFolded"&&t.children[0].type!=="blockLiteral")&&(t.type==="mappingValue"||Yr(t));default:return!1}}function Yr(t){return t.position.start!==t.position.end&&(t.children.length===0||t.position.start.offset!==t.children[0].position.start.offset)}function b(t,e){return{type:t,position:e}}function Br(t,e,n){return{...b("root",t),children:e,comments:n}}function ct(t){switch(t.type){case"DOCUMENT":for(let e=t.contents.length-1;e>=0;e--)t.contents[e].type==="BLANK_LINE"?t.contents.splice(e,1):ct(t.contents[e]);for(let e=t.directives.length-1;e>=0;e--)t.directives[e].type==="BLANK_LINE"&&t.directives.splice(e,1);break;case"FLOW_MAP":case"FLOW_SEQ":case"MAP":case"SEQ":for(let e=t.items.length-1;e>=0;e--){let n=t.items[e];"char"in n||(n.type==="BLANK_LINE"?t.items.splice(e,1):ct(n))}break;case"MAP_KEY":case"MAP_VALUE":case"SEQ_ITEM":t.node&&ct(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)}`)}}function X(){return{leadingComments:[]}}function oe(t=null){return{trailingComment:t}}function $(){return{...X(),...oe()}}function $r(t,e,n){return{...b("alias",t),...$(),...e,value:n}}function Fr(t,e){let n=t.cstNode;return $r(e.transformRange({origStart:n.valueRange.origStart-1,origEnd:n.valueRange.origEnd}),e.transformContent(t),n.rawValue)}function qr(t){return{...t,type:"blockFolded"}}function Ur(t,e,n,r,s,i){return{...b("blockValue",t),...X(),...e,chomping:n,indent:r,value:s,indicatorComment:i}}var ae;(function(t){t.Tag="!",t.Anchor="&",t.Comment="#"})(ae||(ae={}));function Kr(t,e){return{...b("anchor",t),value:e}}function xe(t,e){return{...b("comment",t),value:e}}function Vr(t,e,n){return{anchor:e,tag:t,middleComments:n}}function Wr(t,e){return{...b("tag",t),value:e}}function vt(t,e,n=()=>!1){let r=t.cstNode,s=[],i=null,o=null,a=null;for(let c of r.props){let l=e.text[c.origStart];switch(l){case ae.Tag:i=i||c,o=Wr(e.transformRange(c),t.tag);break;case ae.Anchor:i=i||c,a=Kr(e.transformRange(c),r.anchor);break;case ae.Comment:{let f=xe(e.transformRange(c),e.text.slice(c.origStart+1,c.origEnd));e.comments.push(f),!n(f)&&i&&i.origEnd<=c.origStart&&c.origEnd<=r.valueRange.origStart&&s.push(f);break}default:throw new Error(`Unexpected leading character ${JSON.stringify(l)}`)}}return Vr(o,a,s)}var yn;(function(t){t.CLIP="clip",t.STRIP="strip",t.KEEP="keep"})(yn||(yn={}));function It(t,e){let n=t.cstNode,r=1,s=n.chomping==="CLIP"?0:1,o=n.header.origEnd-n.header.origStart-r-s!==0,a=e.transformRange({origStart:n.header.origStart,origEnd:n.valueRange.origEnd}),c=null,l=vt(t,e,f=>{if(!(a.start.offset=0;c--){let l=t.contents[c];if(l.type==="COMMENT"){let f=e.transformNode(l);n&&n.line===f.position.start.line?o.unshift(f):a?r.unshift(f):f.position.start.offset>=t.valueRange.origEnd?i.unshift(f):r.unshift(f)}else a=!0}if(i.length>1)throw new Error(`Unexpected multiple document trailing comments at ${ge(i[1].position.start)}`);if(o.length>1)throw new Error(`Unexpected multiple documentHead trailing comments at ${ge(o[1].position.start)}`);return{comments:r,endComments:s,documentTrailingComment:q(i)||null,documentHeadTrailingComment:q(o)||null}}function fo(t,e,n){let r=Pt(n.text.slice(t.valueRange.origEnd),/^\.\.\./),s=r===-1?t.valueRange.origEnd:Math.max(0,t.valueRange.origEnd-1);n.text[s-1]==="\r"&&s--;let i=n.transformRange({origStart:e!==null?e.position.start.offset:s,origEnd:s}),o=r===-1?i.end:n.transformOffset(t.valueRange.origEnd+3);return{position:i,documentEndPoint:o}}function ts(t,e,n,r){return{...b("documentHead",t),...F(n),...oe(r),children:e}}function ns(t,e){let n=t.cstNode,{directives:r,comments:s,endComments:i}=uo(n,e),{position:o,endMarkerPoint:a}=po(n,r,e);return e.comments.push(...s,...i),{createDocumentHeadWithTrailingComment:l=>(l&&e.comments.push(l),ts(o,r,i,l)),documentHeadEndMarkerPoint:a}}function uo(t,e){let n=[],r=[],s=[],i=!1;for(let o=t.directives.length-1;o>=0;o--){let a=e.transformNode(t.directives[o]);a.type==="comment"?i?r.unshift(a):s.unshift(a):(i=!0,n.unshift(a))}return{directives:n,comments:r,endComments:s}}function po(t,e,n){let r=Pt(n.text.slice(0,t.valueRange.origStart),/---\s*$/);r>0&&!/[\r\n]/.test(n.text[r-1])&&(r=-1);let s=r===-1?{origStart:t.valueRange.origStart,origEnd:t.valueRange.origStart}:{origStart:r,origEnd:r+3};return e.length!==0&&(s.origStart=e[0].position.start.offset),{position:n.transformRange(s),endMarkerPoint:r===-1?null:n.transformOffset(r)}}function rs(t,e){let{createDocumentHeadWithTrailingComment:n,documentHeadEndMarkerPoint:r}=ns(t,e),{documentBody:s,documentEndPoint:i,documentTrailingComment:o,documentHeadTrailingComment:a}=es(t,e,r),c=n(a);return o&&e.comments.push(o),zr(K(c.position.start,i),c,s,o)}function _t(t,e,n){return{...b("flowCollection",t),...$(),...F(),...e,children:n}}function ss(t,e,n){return{..._t(t,e,n),type:"flowMapping"}}function xt(t,e,n){return{...b("flowMappingItem",t),...X(),children:[e,n]}}function ce(t,e){let n=[];for(let r of t)r&&"type"in r&&r.type==="COMMENT"?e.comments.push(e.transformNode(r)):n.push(r);return n}function Rt(t){let[e,n]=["?",":"].map(r=>{let s=t.find(i=>"char"in i&&i.char===r);return s?{origStart:s.origOffset,origEnd:s.origOffset+1}:null});return{additionalKeyRange:e,additionalValueRange:n}}function Dt(t,e){let n=e;return r=>t.slice(n,n=r)}function Yt(t){let e=[],n=Dt(t,1),r=!1;for(let s=1;s{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=Rt(l);return De(a,e,xt,f,m)}),i=n[0],o=q(n);return ss(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function os(t,e,n){return{..._t(t,e,n),type:"flowSequence"}}function as(t,e){return{...b("flowSequenceItem",t),children:[e]}}function cs(t,e){let n=ce(t.cstNode.items,e),r=Yt(n),s=t.items.map((a,c)=>{if(a.type!=="PAIR"){let l=e.transformNode(a);return as(K(l.position.start,l.position.end),l)}else{let l=r[c],{additionalKeyRange:f,additionalValueRange:m}=Rt(l);return De(a,e,xt,f,m)}}),i=n[0],o=q(n);return os(e.transformRange({origStart:i.origOffset,origEnd:o.origOffset+1}),e.transformContent(t),s)}function ls(t,e,n){return{...b("mapping",t),...X(),...e,children:n}}function fs(t,e,n){return{...b("mappingItem",t),...X(),children:[e,n]}}function us(t,e){let n=t.cstNode;n.items.filter(o=>o.type==="MAP_KEY"||o.type==="MAP_VALUE").forEach(o=>Re(o,e));let r=ce(n.items,e),s=mo(r),i=t.items.map((o,a)=>{let c=s[a],[l,f]=c[0].type==="MAP_VALUE"?[null,c[0].range]:[c[0].range,c.length===1?null:c[1].range];return De(o,e,fs,l,f)});return ls(K(i[0].position.start,q(i).position.end),e.transformContent(t),i)}function mo(t){let e=[],n=Dt(t,0),r=!1;for(let s=0;s=0;r--)if(n.test(t[r]))return r;return-1}function hs(t,e){let n=t.cstNode;return ps(e.transformRange({origStart:n.valueRange.origStart,origEnd:ms(e.text,n.valueRange.origEnd-1,/\S/)+1}),e.transformContent(t),n.strValue)}function gs(t){return{...t,type:"quoteDouble"}}function ds(t,e,n){return{...b("quoteValue",t),...e,...$(),value:n}}function Bt(t,e){let n=t.cstNode;return ds(e.transformRange(n.valueRange),e.transformContent(t),n.strValue)}function ys(t,e){return gs(Bt(t,e))}function Es(t){return{...t,type:"quoteSingle"}}function Ss(t,e){return Es(Bt(t,e))}function ws(t,e,n){return{...b("sequence",t),...X(),...F(),...e,children:n}}function bs(t,e){return{...b("sequenceItem",t),...$(),...F(),children:e?[e]:[]}}function Ns(t,e){let r=ce(t.cstNode.items,e).map((s,i)=>{Re(s,e);let o=e.transformNode(t.items[i]);return bs(K(e.transformOffset(s.valueRange.origStart),o===null?e.transformOffset(s.valueRange.origStart+1):o.position.end),o)});return ws(K(r[0].position.start,q(r).position.end),e.transformContent(t),r)}function Os(t,e){if(t===null||t.type===void 0&&t.value===null)return null;switch(t.type){case"ALIAS":return Fr(t,e);case"BLOCK_FOLDED":return jr(t,e);case"BLOCK_LITERAL":return Jr(t,e);case"COMMENT":return Gr(t,e);case"DIRECTIVE":return Xr(t,e);case"DOCUMENT":return rs(t,e);case"FLOW_MAP":return is(t,e);case"FLOW_SEQ":return cs(t,e);case"MAP":return us(t,e);case"PLAIN":return hs(t,e);case"QUOTE_DOUBLE":return ys(t,e);case"QUOTE_SINGLE":return Ss(t,e);case"SEQ":return Ns(t,e);default:throw new Error(`Unexpected node type ${t.type}`)}}function Ls(t,e,n){let r=new SyntaxError(t);return r.name="YAMLSyntaxError",r.source=e,r.position=n,r}function As(t,e){let n=t.source.range||t.source.valueRange;return Ls(t.message,e.text,e.transformRange(n))}function Ts(t,e,n){return{offset:t,line:e,column:n}}function Cs(t,e){t<0?t=0:t>e.text.length&&(t=e.text.length);let n=e.locator.locationForIndex(t);return Ts(t,n.line+1,n.column+1)}function Ms(t,e){return K(e.transformOffset(t.origStart),e.transformOffset(t.origEnd))}function ks(t){if(!t.setOrigRanges()){let e=n=>{if(ho(n))return n.origStart=n.start,n.origEnd=n.end,!0;if(go(n))return n.origOffset=n.offset,!0};t.forEach(n=>bn(n,e))}}function bn(t,e){if(!(!t||typeof t!="object")&&e(t)!==!0)for(let n of Object.keys(t)){if(n==="context"||n==="error")continue;let r=t[n];Array.isArray(r)?r.forEach(s=>bn(s,e)):bn(r,e)}}function ho(t){return typeof t.start=="number"}function go(t){return typeof t.offset=="number"}function Nn(t){if("children"in t){if(t.children.length===1){let e=t.children[0];if(e.type==="plain"&&e.tag===null&&e.anchor===null&&e.value==="")return t.children.splice(0,1),t}t.children.forEach(Nn)}return t}function On(t,e,n,r){let s=e(t);return i=>{r(s,i)&&n(t,s=i)}}function Ln(t){if(t===null||!("children"in t))return;let e=t.children;if(e.forEach(Ln),t.type==="document"){let[i,o]=t.children;i.position.start.offset===i.position.end.offset?i.position.start=i.position.end=o.position.start:o.position.start.offset===o.position.end.offset&&(o.position.start=o.position.end=i.position.end)}let n=On(t.position,yo,Eo,bo),r=On(t.position,So,wo,No);"endComments"in t&&t.endComments.length!==0&&(n(t.endComments[0].position.start),r(q(t.endComments).position.end));let s=e.filter(i=>i!==null);if(s.length!==0){let i=s[0],o=q(s);n(i.position.start),r(o.position.end),"leadingComments"in i&&i.leadingComments.length!==0&&n(i.leadingComments[0].position.start),"tag"in i&&i.tag&&n(i.tag.position.start),"anchor"in i&&i.anchor&&n(i.anchor.position.start),"trailingComment"in o&&o.trailingComment&&r(o.trailingComment.position.end)}}function yo(t){return t.start}function Eo(t,e){t.start=e}function So(t){return t.end}function wo(t,e){t.end=e}function bo(t,e){return e.offsett.offset}var Ei=rr(di(),1);var J=rr(yi(),1),Ym=J.default.findPair,Bm=J.default.toJSON,$m=J.default.parseMap,Fm=J.default.parseSeq,qm=J.default.stringifyNumber,Um=J.default.stringifyString,Km=J.default.Type,Ua=J.default.YAMLError,Vm=J.default.YAMLReferenceError,Zn=J.default.YAMLSemanticError,Ka=J.default.YAMLSyntaxError,Wm=J.default.YAMLWarning;var{Document:Si,parseCST:wi}=Ei.default;function bi(t){let e=wi(t);ks(e);let n=e.map(a=>new Si({merge:!1,keepCstNodes:!0}).parse(a)),r=new xr(t),s=[],i={text:t,locator:r,comments:s,transformOffset:a=>Cs(a,i),transformRange:a=>Ms(a,i),transformNode:a=>Os(a,i),transformContent:a=>vt(a,i)};for(let a of n)for(let c of a.errors)if(!(c instanceof Zn&&c.message==='Map keys must be unique; "<<" is repeated'))throw As(c,i);n.forEach(a=>ct(a.cstNode));let o=Br(i.transformRange({origStart:0,origEnd:i.text.length}),n.map(i.transformNode),s);return Rr(o),Ln(o),Nn(o),o}function Wa(t,e){let n=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(n,e)}var Ni=Wa;function ja(t){try{let e=bi(t);return delete e.comments,e}catch(e){throw e!=null&&e.position?Ni(e.message,{loc:e.position,cause:e}):e}}var Qa={astFormat:"yaml",parse:ja,hasPragma:Er,locStart:ve,locEnd:dr};var Ja={yaml:vr};var yh=tr;export{yh as default,Ir as languages,Pr as options,er as parsers,Ja as printers}; diff --git a/node_modules/prettier/standalone.d.ts b/node_modules/prettier/standalone.d.ts index b77367b..953ccf4 100644 --- a/node_modules/prettier/standalone.d.ts +++ b/node_modules/prettier/standalone.d.ts @@ -4,7 +4,7 @@ import { CursorOptions, CursorResult, Options, SupportInfo } from "./index.js"; * formatWithCursor both formats the code, and translates a cursor position from unformatted code to formatted code. * This is useful for editor integrations, to prevent the cursor from moving when code is formatted * - * The cursorOffset option should be provided, to specify where the cursor is. This option cannot be used with rangeStart and rangeEnd. + * The cursorOffset option should be provided, to specify where the cursor is. * * ```js * await prettier.formatWithCursor(" 1", { cursorOffset: 2, parser: "babel" }); diff --git a/node_modules/prettier/standalone.js b/node_modules/prettier/standalone.js index 6285bd6..3176376 100644 --- a/node_modules/prettier/standalone.js +++ b/node_modules/prettier/standalone.js @@ -1,37 +1,34 @@ -(function(t){function e(){var o=t();return o.default||o}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var f=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};f.prettier=e()}})(function(){"use strict";var lu=Object.create;var $e=Object.defineProperty;var fu=Object.getOwnPropertyDescriptor;var Fu=Object.getOwnPropertyNames;var pu=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty;var mu=(e,t)=>()=>(e&&(t=e(e=0)),t);var Me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),We=(e,t)=>{for(var r in t)$e(e,r,{get:t[r],enumerable:!0})},rr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Fu(t))!du.call(e,o)&&o!==r&&$e(e,o,{get:()=>t[o],enumerable:!(n=fu(t,o))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?lu(pu(e)):{},rr(t||!e||!e.__esModule?$e(r,"default",{value:e,enumerable:!0}):r,e)),nr=e=>rr($e({},"__esModule",{value:!0}),e);var Eu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var ht=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)};var ce=(e,t,r)=>(Eu(e,t,"access private method"),r);var or=Me(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.default=ur;function ur(){}ur.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.callback;typeof n=="function"&&(o=n,n={}),this.options=n;var u=this;function i(F){return o?(setTimeout(function(){o(void 0,F)},0),!0):F}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var s=r.length,D=t.length,a=1,c=s+D;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],r,t,0);if(d[0].newPos+1>=s&&f+1>=D)return i([{value:this.join(r),count:r.length}]);function p(){for(var F=-1*a;F<=a;F+=2){var m=void 0,E=d[F-1],C=d[F+1],g=(C?C.newPos:0)-F;E&&(d[F-1]=void 0);var h=E&&E.newPos+1=s&&g+1>=D)return i(hu(u,m.components,r,t,u.useLongestToken));d[F]=m}a++}if(o)(function F(){setTimeout(function(){if(a>c)return o();p()||F()},0)})();else for(;a<=c;){var l=p();if(l)return l}},pushComponent:function(t,r,n){var o=t[t.length-1];o&&o.added===r&&o.removed===n?t[t.length-1]={count:o.count+1,added:r,removed:n}:t.push({count:1,added:r,removed:n})},extractCommon:function(t,r,n,o){for(var u=r.length,i=n.length,s=t.newPos,D=s-o,a=0;s+1p.length?F:p}),a.value=e.join(c)}else a.value=e.join(r.slice(s,s+a.count));s+=a.count,a.added||(D+=a.count)}}var f=t[i-1];return i>1&&typeof f.value=="string"&&(f.added||f.removed)&&e.equals("",f.value)&&(t[i-2].value+=f.value,t.pop()),t}function gu(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var ir=Me(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.diffArrays=Bu;ye.arrayDiff=void 0;var yu=Au(or());function Au(e){return e&&e.__esModule?e:{default:e}}var ge=new yu.default;ye.arrayDiff=ge;ge.tokenize=function(e){return e.slice()};ge.join=ge.removeEmpty=function(e){return e};function Bu(e,t,r){return ge.diff(e,t,r)}});var Pe=Me((ps,jr)=>{"use strict";var Yr=new Proxy(String,{get:()=>Yr});jr.exports=Yr});var Fn={};We(Fn,{default:()=>no,shouldHighlight:()=>ro});var ro,no,pn=mu(()=>{ro=()=>!1,no=String});var yn=Me(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.codeFrameColumns=gn;Ft.default=Do;var dn=(pn(),nr(Fn)),mn=uo(Pe(),!0);function hn(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(hn=function(n){return n?r:t})(e)}function uo(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=hn(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&Object.prototype.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,r&&r.set(e,n),n}var jt;function oo(e){if(e){var t;return(t=jt)!=null||(jt=new mn.default.constructor({enabled:!0,level:1})),jt}return mn.default}var En=!1;function io(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}var Cn=/\r\n|[\n\r\u2028\u2029]/;function so(e,t,r){let n=Object.assign({column:0,line:-1},e.start),o=Object.assign({},n,e.end),{linesAbove:u=2,linesBelow:i=3}=r||{},s=n.line,D=n.column,a=o.line,c=o.column,d=Math.max(s-(u+1),0),f=Math.min(t.length,a+i);s===-1&&(d=0),a===-1&&(f=t.length);let p=a-s,l={};if(p)for(let F=0;F<=p;F++){let m=F+s;if(!D)l[m]=!0;else if(F===0){let E=t[m-1].length;l[m]=[D,E-D+1]}else if(F===p)l[m]=[0,c];else{let E=t[m-F].length;l[m]=[0,E]}}else D===c?D?l[s]=[D,0]:l[s]=!0:l[s]=[D,c-D];return{start:d,end:f,markerLines:l}}function gn(e,t,r={}){let n=(r.highlightCode||r.forceColor)&&(0,dn.shouldHighlight)(r),o=oo(r.forceColor),u=io(o),i=(F,m)=>n?F(m):m,s=e.split(Cn),{start:D,end:a,markerLines:c}=so(t,s,r),d=t.start&&typeof t.start.column=="number",f=String(a).length,l=(n?(0,dn.default)(e,r):e).split(Cn,a).slice(D,a).map((F,m)=>{let E=D+1+m,g=` ${` ${E}`.slice(-f)} |`,h=c[E],B=!c[E+1];if(h){let Z="";if(Array.isArray(h)){let $=F.slice(0,Math.max(h[0]-1,0)).replace(/[^\t]/g," "),Q=h[1]||1;Z=[` +(function(t){function e(){var o=t();return o.default||o}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var f=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};f.prettier=e()}})(function(){"use strict";var fu=Object.create;var $e=Object.defineProperty;var Fu=Object.getOwnPropertyDescriptor;var pu=Object.getOwnPropertyNames;var du=Object.getPrototypeOf,mu=Object.prototype.hasOwnProperty;var Eu=(e,t)=>()=>(e&&(t=e(e=0)),t);var Me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),We=(e,t)=>{for(var r in t)$e(e,r,{get:t[r],enumerable:!0})},nr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of pu(t))!mu.call(e,o)&&o!==r&&$e(e,o,{get:()=>t[o],enumerable:!(n=Fu(t,o))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?fu(du(e)):{},nr(t||!e||!e.__esModule?$e(r,"default",{value:e,enumerable:!0}):r,e)),ur=e=>nr($e({},"__esModule",{value:!0}),e);var Cu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var ht=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)};var ce=(e,t,r)=>(Cu(e,t,"access private method"),r);var ir=Me(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.default=or;function or(){}or.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.callback;typeof n=="function"&&(o=n,n={}),this.options=n;var u=this;function i(F){return o?(setTimeout(function(){o(void 0,F)},0),!0):F}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var s=r.length,D=t.length,a=1,c=s+D;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],r,t,0);if(d[0].newPos+1>=s&&f+1>=D)return i([{value:this.join(r),count:r.length}]);function p(){for(var F=-1*a;F<=a;F+=2){var m=void 0,E=d[F-1],C=d[F+1],g=(C?C.newPos:0)-F;E&&(d[F-1]=void 0);var h=E&&E.newPos+1=s&&g+1>=D)return i(gu(u,m.components,r,t,u.useLongestToken));d[F]=m}a++}if(o)(function F(){setTimeout(function(){if(a>c)return o();p()||F()},0)})();else for(;a<=c;){var l=p();if(l)return l}},pushComponent:function(t,r,n){var o=t[t.length-1];o&&o.added===r&&o.removed===n?t[t.length-1]={count:o.count+1,added:r,removed:n}:t.push({count:1,added:r,removed:n})},extractCommon:function(t,r,n,o){for(var u=r.length,i=n.length,s=t.newPos,D=s-o,a=0;s+1p.length?F:p}),a.value=e.join(c)}else a.value=e.join(r.slice(s,s+a.count));s+=a.count,a.added||(D+=a.count)}}var f=t[i-1];return i>1&&typeof f.value=="string"&&(f.added||f.removed)&&e.equals("",f.value)&&(t[i-2].value+=f.value,t.pop()),t}function yu(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var sr=Me(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.diffArrays=_u;ye.arrayDiff=void 0;var Au=Bu(ir());function Bu(e){return e&&e.__esModule?e:{default:e}}var ge=new Au.default;ye.arrayDiff=ge;ge.tokenize=function(e){return e.slice()};ge.join=ge.removeEmpty=function(e){return e};function _u(e,t,r){return ge.diff(e,t,r)}});var Re=Me((Xs,en)=>{"use strict";var Qr=new Proxy(String,{get:()=>Qr});en.exports=Qr});var bn={};We(bn,{default:()=>Eo,shouldHighlight:()=>mo});var mo,Eo,xn=Eu(()=>{mo=()=>!1,Eo=String});var Pn=Me(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.codeFrameColumns=vn;Et.default=Ao;var wn=(xn(),ur(bn)),On=Co(Re(),!0);function Tn(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Tn=function(n){return n?r:t})(e)}function Co(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Tn(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&Object.prototype.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,r&&r.set(e,n),n}var Ht;function ho(e){if(e){var t;return(t=Ht)!=null||(Ht=new On.default.constructor({enabled:!0,level:1})),Ht}return On.default}var Nn=!1;function go(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}var Sn=/\r\n|[\n\r\u2028\u2029]/;function yo(e,t,r){let n=Object.assign({column:0,line:-1},e.start),o=Object.assign({},n,e.end),{linesAbove:u=2,linesBelow:i=3}=r||{},s=n.line,D=n.column,a=o.line,c=o.column,d=Math.max(s-(u+1),0),f=Math.min(t.length,a+i);s===-1&&(d=0),a===-1&&(f=t.length);let p=a-s,l={};if(p)for(let F=0;F<=p;F++){let m=F+s;if(!D)l[m]=!0;else if(F===0){let E=t[m-1].length;l[m]=[D,E-D+1]}else if(F===p)l[m]=[0,c];else{let E=t[m-F].length;l[m]=[0,E]}}else D===c?D?l[s]=[D,0]:l[s]=!0:l[s]=[D,c-D];return{start:d,end:f,markerLines:l}}function vn(e,t,r={}){let n=(r.highlightCode||r.forceColor)&&(0,wn.shouldHighlight)(r),o=ho(r.forceColor),u=go(o),i=(F,m)=>n?F(m):m,s=e.split(Sn),{start:D,end:a,markerLines:c}=yo(t,s,r),d=t.start&&typeof t.start.column=="number",f=String(a).length,l=(n?(0,wn.default)(e,r):e).split(Sn,a).slice(D,a).map((F,m)=>{let E=D+1+m,g=` ${` ${E}`.slice(-f)} |`,h=c[E],B=!c[E+1];if(h){let Z="";if(Array.isArray(h)){let $=F.slice(0,Math.max(h[0]-1,0)).replace(/[^\t]/g," "),Q=h[1]||1;Z=[` `,i(u.gutter,g.replace(/\d/g," "))," ",$,i(u.marker,"^").repeat(Q)].join(""),B&&r.message&&(Z+=" "+i(u.message,r.message))}return[i(u.marker,">"),i(u.gutter,g),F.length>0?` ${F}`:"",Z].join("")}else return` ${i(u.gutter,g)}${F.length>0?` ${F}`:""}`}).join(` `);return r.message&&!d&&(l=`${" ".repeat(f+1)}${r.message} -${l}`),n?o.reset(l):l}function Do(e,t,r,n={}){if(!En){En=!0;let u="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let i=new Error(u);i.name="DeprecationWarning",console.warn(new Error(u))}}return r=Math.max(r,0),gn(e,{start:{column:r,line:t}},n)}});var ri={};We(ri,{__debug:()=>ti,check:()=>Qo,doc:()=>er,format:()=>cu,formatWithCursor:()=>au,getSupportInfo:()=>ei,util:()=>Qt,version:()=>Du});var Cu=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},ee=Cu;var Kn=he(ir(),1);var M="string",j="array",W="cursor",T="indent",S="align",v="trim",_="group",w="fill",x="if-break",P="indent-if-break",L="line-suffix",I="line-suffix-boundary",A="line",O="label",k="break-parent",Ue=new Set([W,T,S,v,_,w,x,P,L,I,A,O,k]);function _u(e){if(typeof e=="string")return M;if(Array.isArray(e))return j;if(!e)return;let{type:t}=e;if(Ue.has(t))return t}var U=_u;var xu=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function wu(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', -Expected it to be 'string' or 'object'.`;if(U(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=xu([...Ue].map(o=>`'${o}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var yt=class extends Error{name="InvalidDocError";constructor(t){super(wu(t)),this.doc=t}},q=yt;var sr={};function ku(e,t,r,n){let o=[e];for(;o.length>0;){let u=o.pop();if(u===sr){r(o.pop());continue}r&&o.push(u,sr);let i=U(u);if(!i)throw new q(u);if((t==null?void 0:t(u))!==!1)switch(i){case j:case w:{let s=i===j?u:u.parts;for(let D=s.length,a=D-1;a>=0;--a)o.push(s[a]);break}case x:o.push(u.flatContents,u.breakContents);break;case _:if(n&&u.expandedStates)for(let s=u.expandedStates.length,D=s-1;D>=0;--D)o.push(u.expandedStates[D]);else o.push(u.contents);break;case S:case T:case P:case O:case L:o.push(u.contents);break;case M:case W:case v:case I:case A:case k:break;default:throw new q(u)}}}var Ae=ku;var Dr=()=>{},z=Dr,ze=Dr;function ie(e){return z(e),{type:T,contents:e}}function oe(e,t){return z(t),{type:S,contents:t,n:e}}function At(e,t={}){return z(e),ze(t.expandedStates,!0),{type:_,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function ar(e){return oe(Number.NEGATIVE_INFINITY,e)}function cr(e){return oe({type:"root"},e)}function lr(e){return oe(-1,e)}function fr(e,t){return At(e[0],{...t,expandedStates:e})}function Ge(e){return ze(e),{type:w,parts:e}}function Fr(e,t="",r={}){return z(e),t!==""&&z(t),{type:x,breakContents:e,flatContents:t,groupId:r.groupId}}function pr(e,t){return z(e),{type:P,contents:e,groupId:t.groupId,negate:t.negate}}function Be(e){return z(e),{type:L,contents:e}}var dr={type:I},le={type:k},mr={type:v},_e={type:A,hard:!0},Bt={type:A,hard:!0,literal:!0},Ke={type:A},Er={type:A,soft:!0},G=[_e,le],He=[Bt,le],xe={type:W};function we(e,t){z(e),ze(t);let r=[];for(let n=0;n0){for(let o=0;o{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},y=bu;function hr(e){let t=e.indexOf("\r");return t>=0?e.charAt(t+1)===` -`?"crlf":"cr":"lf"}function ke(e){switch(e){case"cr":return"\r";case"crlf":return`\r +${l}`),n?o.reset(l):l}function Ao(e,t,r,n={}){if(!Nn){Nn=!0;let u="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let i=new Error(u);i.name="DeprecationWarning",console.warn(new Error(u))}}return r=Math.max(r,0),vn(e,{start:{column:r,line:t}},n)}});var ui={};We(ui,{__debug:()=>ni,check:()=>ti,doc:()=>Qt,format:()=>lu,formatWithCursor:()=>cu,getSupportInfo:()=>ri,util:()=>tr,version:()=>nu});var hu=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},ee=hu;var Hn=he(sr(),1);function Dr(e){let t=e.indexOf("\r");return t>=0?e.charAt(t+1)===` +`?"crlf":"cr":"lf"}function Ae(e){switch(e){case"cr":return"\r";case"crlf":return`\r `;default:return` -`}}function _t(e,t){let r;switch(t){case` +`}}function yt(e,t){let r;switch(t){case` `:r=/\n/g;break;case"\r":r=/\r/g;break;case`\r -`:r=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}function gr(e){return ee(!1,e,/\r\n?/g,` -`)}var yr=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Ar(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Br(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var _r=e=>!(Ar(e)||Br(e));var Ou=/[^\x20-\x7F]/;function Nu(e){if(!e)return 0;if(!Ou.test(e))return e.length;e=e.replace(yr()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=_r(n)?1:2)}return t}var be=Nu;var kr=e=>{if(Array.isArray(e))return e;if(e.type!==w)throw new Error(`Expect doc to be 'array' or '${w}'.`);return e.parts};function Ne(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=o(u);return r.set(u,i),i}function o(u){switch(U(u)){case j:return t(u.map(n));case w:return t({...u,parts:u.parts.map(n)});case x:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case _:{let{expandedStates:i,contents:s}=u;return i?(i=i.map(n),s=i[0]):s=n(s),t({...u,contents:s,expandedStates:i})}case S:case T:case P:case O:case L:return t({...u,contents:n(u.contents)});case M:case W:case v:case I:case A:case k:return t(u);default:throw new q(u)}}}function Je(e,t,r){let n=r,o=!1;function u(i){if(o)return!1;let s=t(i);s!==void 0&&(o=!0,n=s)}return Ae(e,u),n}function Tu(e){if(e.type===_&&e.break||e.type===A&&e.hard||e.type===k)return!0}function br(e){return Je(e,Tu,!1)}function xr(e){if(e.length>0){let t=y(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Or(e){let t=new Set,r=[];function n(u){if(u.type===k&&xr(r),u.type===_){if(r.push(u),t.has(u))return!1;t.add(u)}}function o(u){u.type===_&&r.pop().break&&xr(r)}Ae(e,n,o,!0)}function Su(e){return e.type===A&&!e.hard?e.soft?"":" ":e.type===x?e.flatContents:e}function Nr(e){return Ne(e,Su)}function wr(e){for(e=[...e];e.length>=2&&y(!1,e,-2).type===A&&y(!1,e,-1).type===k;)e.length-=2;if(e.length>0){let t=Oe(y(!1,e,-1));e[e.length-1]=t}return e}function Oe(e){switch(U(e)){case S:case T:case P:case _:case L:case O:{let t=Oe(e.contents);return{...e,contents:t}}case x:return{...e,breakContents:Oe(e.breakContents),flatContents:Oe(e.flatContents)};case w:return{...e,parts:wr(e.parts)};case j:return wr(e);case M:return e.replace(/[\n\r]*$/,"");case W:case v:case I:case A:case k:break;default:throw new q(e)}return e}function Xe(e){return Oe(Pu(e))}function vu(e){switch(U(e)){case w:if(e.parts.every(t=>t===""))return"";break;case _:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===_&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case S:case T:case P:case L:if(!e.contents)return"";break;case x:if(!e.flatContents&&!e.breakContents)return"";break;case j:{let t=[];for(let r of e){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof y(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...o)}return t.length===0?"":t.length===1?t[0]:t}case M:case W:case v:case I:case A:case O:case k:break;default:throw new q(e)}return e}function Pu(e){return Ne(e,t=>vu(t))}function Tr(e,t=He){return Ne(e,r=>typeof r=="string"?we(t,r.split(` -`)):r)}function Lu(e){if(e.type===A)return!0}function Sr(e){return Je(e,Lu,!1)}function Ze(e,t){return e.type===O?{...e,contents:t(e.contents)}:t(e)}var R=Symbol("MODE_BREAK"),K=Symbol("MODE_FLAT"),Te=Symbol("cursor");function vr(){return{value:"",length:0,queue:[]}}function Iu(e,t){return xt(e,{type:"indent"},t)}function Ru(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||vr():t<0?xt(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:xt(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function xt(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],o="",u=0,i=0,s=0;for(let l of n)switch(l.type){case"indent":c(),r.useTabs?D(1):a(r.tabWidth);break;case"stringAlign":c(),o+=l.n,u+=l.n.length;break;case"numberAlign":i+=1,s+=l.n;break;default:throw new Error(`Unexpected type '${l.type}'`)}return f(),{...e,value:o,length:u,queue:n};function D(l){o+=" ".repeat(l),u+=r.tabWidth*l}function a(l){o+=" ".repeat(l),u+=l}function c(){r.useTabs?d():f()}function d(){i>0&&D(i),p()}function f(){s>0&&a(s),p()}function p(){i=0,s=0}}function wt(e){let t=0,r=0,n=e.length;e:for(;n--;){let o=e[n];if(o===Te){r++;continue}for(let u=o.length-1;u>=0;u--){let i=o[u];if(i===" "||i===" ")t++;else{e[n]=o.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Te);return t}function Qe(e,t,r,n,o,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,s=[e],D=[];for(;r>=0;){if(s.length===0){if(i===0)return!0;s.push(t[--i]);continue}let{mode:a,doc:c}=s.pop();switch(U(c)){case M:D.push(c),r-=be(c);break;case j:case w:{let d=kr(c);for(let f=d.length-1;f>=0;f--)s.push({mode:a,doc:d[f]});break}case T:case S:case P:case O:s.push({mode:a,doc:c.contents});break;case v:r+=wt(D);break;case _:{if(u&&c.break)return!1;let d=c.break?R:a,f=c.expandedStates&&d===R?y(!1,c.expandedStates,-1):c.contents;s.push({mode:d,doc:f});break}case x:{let f=(c.groupId?o[c.groupId]||K:a)===R?c.breakContents:c.flatContents;f&&s.push({mode:a,doc:f});break}case A:if(a===R||c.hard)return!0;c.soft||(D.push(" "),r--);break;case L:n=!0;break;case I:if(n)return!1;break}}return!1}function fe(e,t){let r={},n=t.printWidth,o=ke(t.endOfLine),u=0,i=[{ind:vr(),mode:R,doc:e}],s=[],D=!1,a=[],c=0;for(Or(e);i.length>0;){let{ind:f,mode:p,doc:l}=i.pop();switch(U(l)){case M:{let F=o!==` +`:r=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}function ar(e){return ee(!1,e,/\r\n?/g,` +`)}var M="string",j="array",W="cursor",S="indent",T="align",v="trim",_="group",b="fill",k="if-break",P="indent-if-break",L="line-suffix",I="line-suffix-boundary",A="line",O="label",x="break-parent",Ue=new Set([W,S,T,v,_,b,k,P,L,I,A,O,x]);function ku(e){if(typeof e=="string")return M;if(Array.isArray(e))return j;if(!e)return;let{type:t}=e;if(Ue.has(t))return t}var U=ku;var bu=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function xu(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(U(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=bu([...Ue].map(o=>`'${o}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var At=class extends Error{name="InvalidDocError";constructor(t){super(xu(t)),this.doc=t}},q=At;var cr={};function wu(e,t,r,n){let o=[e];for(;o.length>0;){let u=o.pop();if(u===cr){r(o.pop());continue}r&&o.push(u,cr);let i=U(u);if(!i)throw new q(u);if((t==null?void 0:t(u))!==!1)switch(i){case j:case b:{let s=i===j?u:u.parts;for(let D=s.length,a=D-1;a>=0;--a)o.push(s[a]);break}case k:o.push(u.flatContents,u.breakContents);break;case _:if(n&&u.expandedStates)for(let s=u.expandedStates.length,D=s-1;D>=0;--D)o.push(u.expandedStates[D]);else o.push(u.contents);break;case T:case S:case P:case O:case L:o.push(u.contents);break;case M:case W:case v:case I:case A:case x:break;default:throw new q(u)}}}var Be=wu;var lr=()=>{},z=lr,ze=lr;function ie(e){return z(e),{type:S,contents:e}}function oe(e,t){return z(t),{type:T,contents:t,n:e}}function Bt(e,t={}){return z(e),ze(t.expandedStates,!0),{type:_,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function fr(e){return oe(Number.NEGATIVE_INFINITY,e)}function Fr(e){return oe({type:"root"},e)}function pr(e){return oe(-1,e)}function dr(e,t){return Bt(e[0],{...t,expandedStates:e})}function Ge(e){return ze(e),{type:b,parts:e}}function mr(e,t="",r={}){return z(e),t!==""&&z(t),{type:k,breakContents:e,flatContents:t,groupId:r.groupId}}function Er(e,t){return z(e),{type:P,contents:e,groupId:t.groupId,negate:t.negate}}function _e(e){return z(e),{type:L,contents:e}}var Cr={type:I},le={type:x},hr={type:v},ke={type:A,hard:!0},_t={type:A,hard:!0,literal:!0},Ke={type:A},gr={type:A,soft:!0},G=[ke,le],He=[_t,le],be={type:W};function xe(e,t){z(e),ze(t);let r=[];for(let n=0;n0){for(let o=0;o0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${n(u.contents)}${d})`}if(u.type===_){let c=[];u.break&&u.break!=="propagated"&&c.push("shouldBreak: true"),u.id&&c.push(`id: ${o(u.id)}`);let d=c.length>0?`, { ${c.join(", ")} }`:"";return u.expandedStates?`conditionalGroup([${u.expandedStates.map(f=>n(f)).join(",")}]${d})`:`group(${n(u.contents)}${d})`}if(u.type===b)return`fill([${u.parts.map(c=>n(c)).join(", ")}])`;if(u.type===L)return"lineSuffix("+n(u.contents)+")";if(u.type===I)return"lineSuffixBoundary";if(u.type===O)return`label(${JSON.stringify(u.label)}, ${n(u.contents)})`;throw new Error("Unknown doc type "+u.type)}function o(u){if(typeof u!="symbol")return JSON.stringify(String(u));if(u in t)return t[u];let i=u.description||"symbol";for(let s=0;;s++){let D=i+(s>0?` #${s}`:"");if(!r.has(D))return r.add(D),t[u]=`Symbol.for(${JSON.stringify(D)})`}}}var Ou=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},y=Ou;var Br=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function _r(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function kr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var br=e=>!(_r(e)||kr(e));var Nu=/[^\x20-\x7F]/;function Su(e){if(!e)return 0;if(!Nu.test(e))return e.length;e=e.replace(Br()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=br(n)?1:2)}return t}var we=Su;var Or=e=>{if(Array.isArray(e))return e;if(e.type!==b)throw new Error(`Expect doc to be 'array' or '${b}'.`);return e.parts};function Ne(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=o(u);return r.set(u,i),i}function o(u){switch(U(u)){case j:return t(u.map(n));case b:return t({...u,parts:u.parts.map(n)});case k:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case _:{let{expandedStates:i,contents:s}=u;return i?(i=i.map(n),s=i[0]):s=n(s),t({...u,contents:s,expandedStates:i})}case T:case S:case P:case O:case L:return t({...u,contents:n(u.contents)});case M:case W:case v:case I:case A:case x:return t(u);default:throw new q(u)}}}function Je(e,t,r){let n=r,o=!1;function u(i){if(o)return!1;let s=t(i);s!==void 0&&(o=!0,n=s)}return Be(e,u),n}function Tu(e){if(e.type===_&&e.break||e.type===A&&e.hard||e.type===x)return!0}function Nr(e){return Je(e,Tu,!1)}function xr(e){if(e.length>0){let t=y(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Sr(e){let t=new Set,r=[];function n(u){if(u.type===x&&xr(r),u.type===_){if(r.push(u),t.has(u))return!1;t.add(u)}}function o(u){u.type===_&&r.pop().break&&xr(r)}Be(e,n,o,!0)}function vu(e){return e.type===A&&!e.hard?e.soft?"":" ":e.type===k?e.flatContents:e}function Tr(e){return Ne(e,vu)}function wr(e){for(e=[...e];e.length>=2&&y(!1,e,-2).type===A&&y(!1,e,-1).type===x;)e.length-=2;if(e.length>0){let t=Oe(y(!1,e,-1));e[e.length-1]=t}return e}function Oe(e){switch(U(e)){case T:case S:case P:case _:case L:case O:{let t=Oe(e.contents);return{...e,contents:t}}case k:return{...e,breakContents:Oe(e.breakContents),flatContents:Oe(e.flatContents)};case b:return{...e,parts:wr(e.parts)};case j:return wr(e);case M:return e.replace(/[\n\r]*$/,"");case W:case v:case I:case A:case x:break;default:throw new q(e)}return e}function Xe(e){return Oe(Lu(e))}function Pu(e){switch(U(e)){case b:if(e.parts.every(t=>t===""))return"";break;case _:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===_&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case T:case S:case P:case L:if(!e.contents)return"";break;case k:if(!e.flatContents&&!e.breakContents)return"";break;case j:{let t=[];for(let r of e){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof y(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...o)}return t.length===0?"":t.length===1?t[0]:t}case M:case W:case v:case I:case A:case O:case x:break;default:throw new q(e)}return e}function Lu(e){return Ne(e,t=>Pu(t))}function vr(e,t=He){return Ne(e,r=>typeof r=="string"?xe(t,r.split(` +`)):r)}function Iu(e){if(e.type===A)return!0}function Pr(e){return Je(e,Iu,!1)}function Ze(e,t){return e.type===O?{...e,contents:t(e.contents)}:t(e)}var R=Symbol("MODE_BREAK"),K=Symbol("MODE_FLAT"),Se=Symbol("cursor");function Lr(){return{value:"",length:0,queue:[]}}function Ru(e,t){return kt(e,{type:"indent"},t)}function Yu(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||Lr():t<0?kt(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:kt(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function kt(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],o="",u=0,i=0,s=0;for(let l of n)switch(l.type){case"indent":c(),r.useTabs?D(1):a(r.tabWidth);break;case"stringAlign":c(),o+=l.n,u+=l.n.length;break;case"numberAlign":i+=1,s+=l.n;break;default:throw new Error(`Unexpected type '${l.type}'`)}return f(),{...e,value:o,length:u,queue:n};function D(l){o+=" ".repeat(l),u+=r.tabWidth*l}function a(l){o+=" ".repeat(l),u+=l}function c(){r.useTabs?d():f()}function d(){i>0&&D(i),p()}function f(){s>0&&a(s),p()}function p(){i=0,s=0}}function bt(e){let t=0,r=0,n=e.length;e:for(;n--;){let o=e[n];if(o===Se){r++;continue}for(let u=o.length-1;u>=0;u--){let i=o[u];if(i===" "||i===" ")t++;else{e[n]=o.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Se);return t}function Qe(e,t,r,n,o,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,s=[e],D=[];for(;r>=0;){if(s.length===0){if(i===0)return!0;s.push(t[--i]);continue}let{mode:a,doc:c}=s.pop();switch(U(c)){case M:D.push(c),r-=we(c);break;case j:case b:{let d=Or(c);for(let f=d.length-1;f>=0;f--)s.push({mode:a,doc:d[f]});break}case S:case T:case P:case O:s.push({mode:a,doc:c.contents});break;case v:r+=bt(D);break;case _:{if(u&&c.break)return!1;let d=c.break?R:a,f=c.expandedStates&&d===R?y(!1,c.expandedStates,-1):c.contents;s.push({mode:d,doc:f});break}case k:{let f=(c.groupId?o[c.groupId]||K:a)===R?c.breakContents:c.flatContents;f&&s.push({mode:a,doc:f});break}case A:if(a===R||c.hard)return!0;c.soft||(D.push(" "),r--);break;case L:n=!0;break;case I:if(n)return!1;break}}return!1}function fe(e,t){let r={},n=t.printWidth,o=Ae(t.endOfLine),u=0,i=[{ind:Lr(),mode:R,doc:e}],s=[],D=!1,a=[],c=0;for(Sr(e);i.length>0;){let{ind:f,mode:p,doc:l}=i.pop();switch(U(l)){case M:{let F=o!==` `?ee(!1,l,` -`,o):l;s.push(F),i.length>0&&(u+=be(F));break}case j:for(let F=l.length-1;F>=0;F--)i.push({ind:f,mode:p,doc:l[F]});break;case W:if(c>=2)throw new Error("There are too many 'cursor' in doc.");s.push(Te),c++;break;case T:i.push({ind:Iu(f,t),mode:p,doc:l.contents});break;case S:i.push({ind:Ru(f,l.n,t),mode:p,doc:l.contents});break;case v:u-=wt(s);break;case _:switch(p){case K:if(!D){i.push({ind:f,mode:l.break?R:K,doc:l.contents});break}case R:{D=!1;let F={ind:f,mode:K,doc:l.contents},m=n-u,E=a.length>0;if(!l.break&&Qe(F,i,m,E,r))i.push(F);else if(l.expandedStates){let C=y(!1,l.expandedStates,-1);if(l.break){i.push({ind:f,mode:R,doc:C});break}else for(let g=1;g=l.expandedStates.length){i.push({ind:f,mode:R,doc:C});break}else{let h=l.expandedStates[g],B={ind:f,mode:K,doc:h};if(Qe(B,i,m,E,r)){i.push(B);break}}}else i.push({ind:f,mode:R,doc:l.contents});break}}l.id&&(r[l.id]=y(!1,i,-1).mode);break;case w:{let F=n-u,{parts:m}=l;if(m.length===0)break;let[E,C]=m,g={ind:f,mode:K,doc:E},h={ind:f,mode:R,doc:E},B=Qe(g,[],F,a.length>0,r,!0);if(m.length===1){B?i.push(g):i.push(h);break}let Z={ind:f,mode:K,doc:C},$={ind:f,mode:R,doc:C};if(m.length===2){B?i.push(Z,g):i.push($,h);break}m.splice(0,2);let Q={ind:f,mode:p,doc:Ge(m)},tr=m[0];Qe({ind:f,mode:K,doc:[E,C,tr]},[],F,a.length>0,r,!0)?i.push(Q,Z,g):B?i.push(Q,$,g):i.push(Q,$,h);break}case x:case P:{let F=l.groupId?r[l.groupId]:p;if(F===R){let m=l.type===x?l.breakContents:l.negate?l.contents:ie(l.contents);m&&i.push({ind:f,mode:p,doc:m})}if(F===K){let m=l.type===x?l.flatContents:l.negate?ie(l.contents):l.contents;m&&i.push({ind:f,mode:p,doc:m})}break}case L:a.push({ind:f,mode:p,doc:l.contents});break;case I:a.length>0&&i.push({ind:f,mode:p,doc:_e});break;case A:switch(p){case K:if(l.hard)D=!0;else{l.soft||(s.push(" "),u+=1);break}case R:if(a.length>0){i.push({ind:f,mode:p,doc:l},...a.reverse()),a.length=0;break}l.literal?f.root?(s.push(o,f.root.value),u=f.root.length):(s.push(o),u=0):(u-=wt(s),s.push(o+f.value),u=f.length);break}break;case O:i.push({ind:f,mode:p,doc:l.contents});break;case k:break;default:throw new q(l)}i.length===0&&a.length>0&&(i.push(...a.reverse()),a.length=0)}let d=s.indexOf(Te);if(d!==-1){let f=s.indexOf(Te,d+1),p=s.slice(0,d).join(""),l=s.slice(d+1,f).join(""),F=s.slice(f+1).join("");return{formatted:p+l+F,cursorNodeStart:p.length,cursorNodeText:l}}return{formatted:s.join("")}}function J(e){var t;if(!e)return"";if(Array.isArray(e)){let r=[];for(let n of e)if(Array.isArray(n))r.push(...J(n));else{let o=J(n);o!==""&&r.push(o)}return r}return e.type===x?{...e,breakContents:J(e.breakContents),flatContents:J(e.flatContents)}:e.type===_?{...e,contents:J(e.contents),expandedStates:(t=e.expandedStates)==null?void 0:t.map(J)}:e.type===w?{type:"fill",parts:e.parts.map(J)}:e.contents?{...e,contents:J(e.contents)}:e}function Pr(e){let t=Object.create(null),r=new Set;return n(J(e));function n(u,i,s){var D,a;if(typeof u=="string")return JSON.stringify(u);if(Array.isArray(u)){let c=u.map(n).filter(Boolean);return c.length===1?c[0]:`[${c.join(", ")}]`}if(u.type===A){let c=((D=s==null?void 0:s[i+1])==null?void 0:D.type)===k;return u.literal?c?"literalline":"literallineWithoutBreakParent":u.hard?c?"hardline":"hardlineWithoutBreakParent":u.soft?"softline":"line"}if(u.type===k)return((a=s==null?void 0:s[i-1])==null?void 0:a.type)===A&&s[i-1].hard?void 0:"breakParent";if(u.type===v)return"trim";if(u.type===T)return"indent("+n(u.contents)+")";if(u.type===S)return u.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+n(u.contents)+")":u.n<0?"dedent("+n(u.contents)+")":u.n.type==="root"?"markAsRoot("+n(u.contents)+")":"align("+JSON.stringify(u.n)+", "+n(u.contents)+")";if(u.type===x)return"ifBreak("+n(u.breakContents)+(u.flatContents?", "+n(u.flatContents):"")+(u.groupId?(u.flatContents?"":', ""')+`, { groupId: ${o(u.groupId)} }`:"")+")";if(u.type===P){let c=[];u.negate&&c.push("negate: true"),u.groupId&&c.push(`groupId: ${o(u.groupId)}`);let d=c.length>0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${n(u.contents)}${d})`}if(u.type===_){let c=[];u.break&&u.break!=="propagated"&&c.push("shouldBreak: true"),u.id&&c.push(`id: ${o(u.id)}`);let d=c.length>0?`, { ${c.join(", ")} }`:"";return u.expandedStates?`conditionalGroup([${u.expandedStates.map(f=>n(f)).join(",")}]${d})`:`group(${n(u.contents)}${d})`}if(u.type===w)return`fill([${u.parts.map(c=>n(c)).join(", ")}])`;if(u.type===L)return"lineSuffix("+n(u.contents)+")";if(u.type===I)return"lineSuffixBoundary";if(u.type===O)return`label(${JSON.stringify(u.label)}, ${n(u.contents)})`;throw new Error("Unknown doc type "+u.type)}function o(u){if(typeof u!="symbol")return JSON.stringify(String(u));if(u in t)return t[u];let i=u.description||"symbol";for(let s=0;;s++){let D=i+(s>0?` #${s}`:"");if(!r.has(D))return r.add(D),t[u]=`Symbol.for(${JSON.stringify(D)})`}}}function Yu(e,t,r=0){let n=0;for(let o=r;otypeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). -The range will extend forwards to the end of the selected statement. -This option cannot be used with --cursor-offset.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. -The range will extend backwards to the start of the first line containing the selected statement. -This option cannot be used with --cursor-offset.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment -in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"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."}]}};function et({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(o=>o.languages??[]),n=[];for(let o of Vu(Object.assign({},...e.map(({options:u})=>u),Lr)))!t&&o.deprecated||(Array.isArray(o.choices)&&(t||(o.choices=o.choices.filter(u=>!u.deprecated)),o.name==="parser"&&(o.choices=[...o.choices,...ju(o.choices,r,e)])),o.pluginDefaults=Object.fromEntries(e.filter(u=>{var i;return((i=u.defaultOptions)==null?void 0:i[o.name])!==void 0}).map(u=>[u.name,u.defaultOptions[o.name]])),n.push(o));return{languages:r,options:n}}function*ju(e,t,r){let n=new Set(e.map(o=>o.value));for(let o of t)if(o.parsers){for(let u of o.parsers)if(!n.has(u)){n.add(u);let i=r.find(D=>D.parsers&&Object.prototype.hasOwnProperty.call(D.parsers,u)),s=o.name;i!=null&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:u,description:s}}}}function Vu(e){let t=[];for(let[r,n]of Object.entries(e)){let o={name:r,...n};Array.isArray(o.default)&&(o.default=y(!1,o.default,-1).value),t.push(o)}return t}var $u=e=>String(e).split(/[/\\]/).pop();function Ir(e,t){if(!t)return;let r=$u(t).toLowerCase();return e.find(n=>{var o,u;return((o=n.extensions)==null?void 0:o.some(i=>r.endsWith(i)))||((u=n.filenames)==null?void 0:u.some(i=>i.toLowerCase()===r))})}function Mu(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function Wu(e,t){let r=e.plugins.flatMap(o=>o.languages??[]),n=Mu(r,t.language)??Ir(r,t.physicalFile)??Ir(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Rr=Wu;var te={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>te.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${te.key(r)}: ${te.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>te.value({[e]:t})};var kt=he(Pe(),1),Vr=(e,t,{descriptor:r})=>{let n=[`${kt.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${kt.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."};var se=he(Pe(),1);var tt=Symbol.for("vnopts.VALUE_NOT_EXIST"),pe=Symbol.for("vnopts.VALUE_UNCHANGED");var $r=" ".repeat(2),Wr=(e,t,r)=>{let{text:n,list:o}=r.normalizeExpectedResult(r.schemas[e].expected(r)),u=[];return n&&u.push(Mr(e,t,n,r.descriptor)),o&&u.push([Mr(e,t,o.title,r.descriptor)].concat(o.values.map(i=>Ur(i,r.loggerPrintWidth))).join(` -`)),zr(u,r.loggerPrintWidth)};function Mr(e,t,r,n){return[`Invalid ${se.default.red(n.key(e))} value.`,`Expected ${se.default.blue(r)},`,`but received ${t===tt?se.default.gray("nothing"):se.default.red(n.value(t))}.`].join(" ")}function Ur({text:e,list:t},r){let n=[];return e&&n.push(`- ${se.default.blue(e)}`),t&&n.push([`- ${se.default.blue(t.title)}:`].concat(t.values.map(o=>Ur(o,r-$r.length).replace(/^|\n/g,`$&${$r}`))).join(` -`)),zr(n,r)}function zr(e,t){if(e.length===1)return e[0];let[r,n]=e,[o,u]=e.map(i=>i.split(` -`,1)[0].length);return o>t&&o>u?n:r}var Nt=he(Pe(),1);var bt=[],Gr=[];function Ot(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,o=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-o);)n--,o--;let u=0;for(;us?a>s?s+1:a:a>D?D+1:a;return s}var rt=(e,t,{descriptor:r,logger:n,schemas:o})=>{let u=[`Ignored unknown option ${Nt.default.yellow(r.pair({key:e,value:t}))}.`],i=Object.keys(o).sort().find(s=>Ot(e,s)<3);i&&u.push(`Did you mean ${Nt.default.blue(r.key(i))}?`),n.warn(u.join(" "))};var Uu=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function zu(e,t){let r=new e(t),n=Object.create(r);for(let o of Uu)o in t&&(n[o]=Gu(t[o],r,b.prototype[o].length));return n}var b=class{static create(t){return zu(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return pe}};function Gu(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var nt=class extends b{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}};var ut=class extends b{expected(){return"anything"}validate(){return!0}};var ot=class extends b{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let o of t){let u=r.normalizeValidateResult(this._valueSchema.validate(o,r),o);u!==!0&&n.push(u.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let o of t){let u=r.normalizeDeprecatedResult(this._valueSchema.deprecated(o,r),o);u!==!1&&n.push(...u.map(({value:i})=>({value:[i]})))}return n}forward(t,r){let n=[];for(let o of t){let u=r.normalizeForwardResult(this._valueSchema.forward(o,r),o);n.push(...u.map(Kr))}return n}redirect(t,r){let n=[],o=[];for(let u of t){let i=r.normalizeRedirectResult(this._valueSchema.redirect(u,r),u);"remain"in i&&n.push(i.remain),o.push(...i.redirect.map(Kr))}return n.length===0?{redirect:o}:{redirect:o,remain:n}}overlap(t,r){return t.concat(r)}};function Kr({from:e,to:t}){return{from:[e],to:t}}var it=class extends b{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function qr(e,t){let r=Object.create(null);for(let n of e){let o=n[t];if(r[o])throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r[o]=n}return r}function Jr(e,t){let r=new Map;for(let n of e){let o=n[t];if(r.has(o))throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r.set(o,n)}return r}function Xr(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function Zr(e,t){let r=[],n=[];for(let o of e)t(o)?r.push(o):n.push(o);return[r,n]}function Qr(e){return e===Math.floor(e)}function en(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,o=["undefined","object","boolean","number","string"];return r!==n?o.indexOf(r)-o.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function tn(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function Tt(e){return e===void 0?{}:e}function St(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return Ku((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(St)}}:{text:t}}function vt(e,t){return e===!0?!0:e===!1?{value:t}:e}function Pt(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function Hr(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function st(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>Hr(r,t)):[Hr(e,t)]}function Lt(e,t){let r=st(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function Ku(e,t){if(!e)throw new Error(t)}var Dt=class extends b{constructor(t){super(t),this._choices=Jr(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(en).map(t.value),n=r.slice(0,-2),o=r.slice(-2);return{text:n.concat(o.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}};var at=class extends b{expected(){return"a number"}validate(t,r){return typeof t=="number"}};var ct=class extends at{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&Qr(t)}};var Le=class extends b{expected(){return"a string"}validate(t){return typeof t=="string"}};var rn=te,nn=rt,un=Wr,on=Vr;var lt=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:o=80,descriptor:u=rn,unknown:i=nn,invalid:s=un,deprecated:D=on,missing:a=()=>!1,required:c=()=>!1,preprocess:d=p=>p,postprocess:f=()=>pe}=r||{};this._utils={descriptor:u,logger:n||{warn:()=>{}},loggerPrintWidth:o,schemas:qr(t,"name"),normalizeDefaultResult:Tt,normalizeExpectedResult:St,normalizeDeprecatedResult:Pt,normalizeForwardResult:st,normalizeRedirectResult:Lt,normalizeValidateResult:vt},this._unknownHandler=i,this._invalidHandler=tn(s),this._deprecatedHandler=D,this._identifyMissing=(p,l)=>!(p in l)||a(p,l),this._identifyRequired=c,this._preprocess=d,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Xr()}normalize(t){let r={},o=[this._preprocess(t,this._utils)],u=()=>{for(;o.length!==0;){let i=o.shift(),s=this._applyNormalization(i,r);o.push(...s)}};u();for(let i of Object.keys(this._utils.schemas)){let s=this._utils.schemas[i];if(!(i in r)){let D=Tt(s.default(this._utils));"value"in D&&o.push({[i]:D.value})}}u();for(let i of Object.keys(this._utils.schemas)){if(!(i in r))continue;let s=this._utils.schemas[i],D=r[i],a=s.postprocess(D,this._utils);a!==pe&&(this._applyValidation(a,i,s),r[i]=a)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:o,unknownKeys:u}=this._partitionOptionKeys(t);for(let i of o){let s=this._utils.schemas[i],D=s.preprocess(t[i],this._utils);this._applyValidation(D,i,s);let a=({from:p,to:l})=>{n.push(typeof l=="string"?{[l]:p}:{[l.key]:l.value})},c=({value:p,redirectTo:l})=>{let F=Pt(s.deprecated(p,this._utils),D,!0);if(F!==!1)if(F===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,l,this._utils));else for(let{value:m}of F){let E={key:i,value:m};if(!this._hasDeprecationWarned(E)){let C=typeof l=="string"?{key:l,value:m}:l;this._utils.logger.warn(this._deprecatedHandler(E,C,this._utils))}}};st(s.forward(D,this._utils),D).forEach(a);let f=Lt(s.redirect(D,this._utils),D);if(f.redirect.forEach(a),"remain"in f){let p=f.remain;r[i]=i in r?s.overlap(r[i],p,this._utils):p,c({value:p})}for(let{from:p,to:l}of f.redirect)c({value:p,redirectTo:l})}for(let i of u){let s=t[i];this._applyUnknownHandler(i,s,r,(D,a)=>{n.push({[D]:a})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,tt,this._utils)}_partitionOptionKeys(t){let[r,n]=Zr(Object.keys(t).filter(o=>!this._identifyMissing(o,t)),o=>o in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let o=vt(n.validate(t,this._utils),t);if(o!==!0)throw this._invalidHandler(r,o.value,this._utils)}_applyUnknownHandler(t,r,n,o){let u=this._unknownHandler(t,r,this._utils);if(u)for(let i of Object.keys(u)){if(this._identifyMissing(i,u))continue;let s=u[i];i in this._utils.schemas?o(i,s):n[i]=s}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==pe){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:o}=this._partitionOptionKeys(r.override);for(let u of n){let i=r.override[u];this._applyValidation(i,u,this._utils.schemas[u]),t[u]=i}for(let u of o){let i=r.override[u];this._applyUnknownHandler(u,i,t,(s,D)=>{let a=this._utils.schemas[s];this._applyValidation(D,s,a),t[s]=D})}}}}};var It;function qu(e,t,{logger:r=!1,isCLI:n=!1,passThrough:o=!1,FlagSchema:u,descriptor:i}={}){if(n){if(!u)throw new Error("'FlagSchema' option is required.");if(!i)throw new Error("'descriptor' option is required.")}else i=te;let s=o?Array.isArray(o)?(f,p)=>o.includes(f)?{[f]:p}:void 0:(f,p)=>({[f]:p}):(f,p,l)=>{let{_:F,...m}=l.schemas;return rt(f,p,{...l,schemas:m})},D=Ju(t,{isCLI:n,FlagSchema:u}),a=new lt(D,{logger:r,unknown:s,descriptor:i}),c=r!==!1;c&&It&&(a._hasDeprecationWarned=It);let d=a.normalize(e);return c&&(It=a._hasDeprecationWarned),d}function Ju(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(ut.create({name:"_"}));for(let o of e)n.push(Xu(o,{isCLI:t,optionInfos:e,FlagSchema:r})),o.alias&&t&&n.push(nt.create({name:o.alias,sourceName:o.name}));return n}function Xu(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:o}=e,u={name:o},i,s={};switch(e.type){case"int":i=ct,t&&(u.preprocess=Number);break;case"string":i=Le;break;case"choice":i=Dt,u.choices=e.choices.map(D=>D!=null&&D.redirect?{...D,redirect:{to:{key:e.name,value:D.redirect}}}:D);break;case"boolean":i=it;break;case"flag":i=n,u.flags=r.flatMap(D=>[D.alias,D.description&&D.name,D.oppositeDescription&&`no-${D.name}`].filter(Boolean));break;case"path":i=Le;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?u.validate=(D,a,c)=>e.exception(D)||a.validate(D,c):u.validate=(D,a,c)=>D===void 0||a.validate(D,c),e.redirect&&(s.redirect=D=>D?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let D=u.preprocess||(a=>a);u.preprocess=(a,c,d)=>c.preprocess(D(Array.isArray(a)?y(!1,a,-1):a),d)}return e.array?ot.create({...t?{preprocess:D=>Array.isArray(D)?D:[D]}:{},...s,valueSchema:i.create(u)}):i.create({...u,...s})}var sn=qu;function Rt(e,t){if(!t)throw new Error("parserName is required.");for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.parsers&&Object.prototype.hasOwnProperty.call(o.parsers,t))return o}let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Se(r)}function Dn(e,t){if(!t)throw new Error("astFormat is required.");for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.printers&&Object.prototype.hasOwnProperty.call(o.printers,t))return o}let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Se(r)}function ft({plugins:e,parser:t}){let r=Rt(e,t);return Yt(r,t)}function Yt(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function an(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var cn={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Zu(e,t={}){var d;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=Rr(r,{physicalFile:r.filepath}),!r.parser)throw new ve(`No parser could be inferred for file "${r.filepath}".`)}else throw new ve("No parser and no file path given, couldn't infer a parser.");let n=et({plugins:e.plugins,showDeprecated:!0}).options,o={...cn,...Object.fromEntries(n.filter(f=>f.default!==void 0).map(f=>[f.name,f.default]))},u=Rt(r.plugins,r.parser),i=await Yt(u,r.parser);r.astFormat=i.astFormat,r.locEnd=i.locEnd,r.locStart=i.locStart;let s=(d=u.printers)!=null&&d[i.astFormat]?u:Dn(r.plugins,i.astFormat),D=await an(s,i.astFormat);r.printer=D;let a=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,f])=>f!==void 0)):{},c={...o,...a};for(let[f,p]of Object.entries(c))(r[f]===null||r[f]===void 0)&&(r[f]=p);return r.parser==="json"&&(r.trailingComma="none"),sn(r,n,{passThrough:Object.keys(cn),...t})}var re=Zu;var ln=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Qu=e=>Object.keys(e).filter(t=>!ln.has(t));function eo(e){return e?t=>e(t,ln):Qu}var H=eo;function to(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let o=H(n),u=r.ignoredProperties??new Set;return i(e);function i(s,D){if(!(s!==null&&typeof s=="object"))return s;if(Array.isArray(s))return s.map(f=>i(f,D)).filter(Boolean);let a={},c=new Set(o(s));for(let f in s)!Object.prototype.hasOwnProperty.call(s,f)||u.has(f)||(c.has(f)?a[f]=i(s[f],s):a[f]=s[f]);let d=r(s,a,D);if(d!==null)return d??a}}var fn=to;var An=he(yn(),1);async function ao(e,t){let r=await ft(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let o;try{o=await r.parse(n,t,t)}catch(u){co(u,e)}return{text:n,ast:o}}function co(e,t){let{loc:r}=e;if(r){let n=(0,An.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` -`+n,e.codeFrame=n,e}throw e}var De=ao;var Ie,$t,de,pt,Vt=class{constructor(t){ht(this,Ie);ht(this,de);this.stack=[t]}get key(){let{stack:t,siblings:r}=this;return y(!1,t,r===null?-2:-4)??null}get index(){return this.siblings===null?null:y(!1,this.stack,-2)}get node(){return y(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:t}=this,r=y(!1,t,-3);return Array.isArray(r)?r:null}get next(){let{siblings:t}=this;return t===null?null:t[this.index+1]}get previous(){let{siblings:t}=this;return t===null?null:t[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:t,index:r}=this;return t!==null&&r===t.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...ce(this,de,pt).call(this)]}getName(){let{stack:t}=this,{length:r}=t;return r>1?y(!1,t,-2):null}getValue(){return y(!1,this.stack,-1)}getNode(t=0){let r=ce(this,Ie,$t).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:o}=n,u=y(!1,n,-1);for(let i of r)u=u[i],n.push(i,u);try{return t(this)}finally{n.length=o}}callParent(t,r=0){let n=ce(this,Ie,$t).call(this,r+1),o=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...o)}}each(t,...r){let{stack:n}=this,{length:o}=n,u=y(!1,n,-1);for(let i of r)u=u[i],n.push(i,u);try{for(let i=0;i{n[u]=t(o,u,i)},...r),n}match(...t){let r=this.stack.length-1,n=null,o=this.stack[r--];for(let u of t){if(o===void 0)return!1;let i=null;if(typeof n=="number"&&(i=n,n=this.stack[r--],o=this.stack[r--]),u&&!u(o,n,i))return!1;n=this.stack[r--],o=this.stack[r--]}return!0}findAncestor(t){for(let r of ce(this,de,pt).call(this))if(t(r))return r}hasAncestor(t){for(let r of ce(this,de,pt).call(this))if(t(r))return!0;return!1}};Ie=new WeakSet,$t=function(t){let{stack:r}=this;for(let n=r.length-1;n>=0;n-=2)if(!Array.isArray(r[n])&&--t<0)return n;return-1},de=new WeakSet,pt=function*(){let{stack:t}=this;for(let r=t.length-3;r>=0;r-=2){let n=t[r];Array.isArray(n)||(yield n)}};var Bn=Vt;var _n=new Proxy(()=>{},{get:()=>_n}),Re=_n;function me(e){return(t,r,n)=>{let o=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:u}=t,i=r;for(;i>=0&&i0&&(u+=we(F));break}case j:for(let F=l.length-1;F>=0;F--)i.push({ind:f,mode:p,doc:l[F]});break;case W:if(c>=2)throw new Error("There are too many 'cursor' in doc.");s.push(Se),c++;break;case S:i.push({ind:Ru(f,t),mode:p,doc:l.contents});break;case T:i.push({ind:Yu(f,l.n,t),mode:p,doc:l.contents});break;case v:u-=bt(s);break;case _:switch(p){case K:if(!D){i.push({ind:f,mode:l.break?R:K,doc:l.contents});break}case R:{D=!1;let F={ind:f,mode:K,doc:l.contents},m=n-u,E=a.length>0;if(!l.break&&Qe(F,i,m,E,r))i.push(F);else if(l.expandedStates){let C=y(!1,l.expandedStates,-1);if(l.break){i.push({ind:f,mode:R,doc:C});break}else for(let g=1;g=l.expandedStates.length){i.push({ind:f,mode:R,doc:C});break}else{let h=l.expandedStates[g],B={ind:f,mode:K,doc:h};if(Qe(B,i,m,E,r)){i.push(B);break}}}else i.push({ind:f,mode:R,doc:l.contents});break}}l.id&&(r[l.id]=y(!1,i,-1).mode);break;case b:{let F=n-u,{parts:m}=l;if(m.length===0)break;let[E,C]=m,g={ind:f,mode:K,doc:E},h={ind:f,mode:R,doc:E},B=Qe(g,[],F,a.length>0,r,!0);if(m.length===1){B?i.push(g):i.push(h);break}let Z={ind:f,mode:K,doc:C},$={ind:f,mode:R,doc:C};if(m.length===2){B?i.push(Z,g):i.push($,h);break}m.splice(0,2);let Q={ind:f,mode:p,doc:Ge(m)},rr=m[0];Qe({ind:f,mode:K,doc:[E,C,rr]},[],F,a.length>0,r,!0)?i.push(Q,Z,g):B?i.push(Q,$,g):i.push(Q,$,h);break}case k:case P:{let F=l.groupId?r[l.groupId]:p;if(F===R){let m=l.type===k?l.breakContents:l.negate?l.contents:ie(l.contents);m&&i.push({ind:f,mode:p,doc:m})}if(F===K){let m=l.type===k?l.flatContents:l.negate?ie(l.contents):l.contents;m&&i.push({ind:f,mode:p,doc:m})}break}case L:a.push({ind:f,mode:p,doc:l.contents});break;case I:a.length>0&&i.push({ind:f,mode:p,doc:ke});break;case A:switch(p){case K:if(l.hard)D=!0;else{l.soft||(s.push(" "),u+=1);break}case R:if(a.length>0){i.push({ind:f,mode:p,doc:l},...a.reverse()),a.length=0;break}l.literal?f.root?(s.push(o,f.root.value),u=f.root.length):(s.push(o),u=0):(u-=bt(s),s.push(o+f.value),u=f.length);break}break;case O:i.push({ind:f,mode:p,doc:l.contents});break;case x:break;default:throw new q(l)}i.length===0&&a.length>0&&(i.push(...a.reverse()),a.length=0)}let d=s.indexOf(Se);if(d!==-1){let f=s.indexOf(Se,d+1),p=s.slice(0,d).join(""),l=s.slice(d+1,f).join(""),F=s.slice(f+1).join("");return{formatted:p+l+F,cursorNodeStart:p.length,cursorNodeText:l}}return{formatted:s.join("")}}function ju(e,t,r=0){let n=0;for(let o=r;o1?y(!1,t,-2):null}getValue(){return y(!1,this.stack,-1)}getNode(t=0){let r=ce(this,Te,wt).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:o}=n,u=y(!1,n,-1);for(let i of r)u=u[i],n.push(i,u);try{return t(this)}finally{n.length=o}}callParent(t,r=0){let n=ce(this,Te,wt).call(this,r+1),o=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...o)}}each(t,...r){let{stack:n}=this,{length:o}=n,u=y(!1,n,-1);for(let i of r)u=u[i],n.push(i,u);try{for(let i=0;i{n[u]=t(o,u,i)},...r),n}match(...t){let r=this.stack.length-1,n=null,o=this.stack[r--];for(let u of t){if(o===void 0)return!1;let i=null;if(typeof n=="number"&&(i=n,n=this.stack[r--],o=this.stack[r--]),u&&!u(o,n,i))return!1;n=this.stack[r--],o=this.stack[r--]}return!0}findAncestor(t){for(let r of ce(this,pe,et).call(this))if(t(r))return r}hasAncestor(t){for(let r of ce(this,pe,et).call(this))if(t(r))return!0;return!1}};Te=new WeakSet,wt=function(t){let{stack:r}=this;for(let n=r.length-1;n>=0;n-=2)if(!Array.isArray(r[n])&&--t<0)return n;return-1},pe=new WeakSet,et=function*(){let{stack:t}=this;for(let r=t.length-3;r>=0;r-=2){let n=t[r];Array.isArray(n)||(yield n)}};var Ir=xt;var Rr=new Proxy(()=>{},{get:()=>Rr}),ve=Rr;function Vu(e){return e!==null&&typeof e=="object"}var Yr=Vu;function*Ot(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,o=u=>Yr(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let s of i)o(s)&&(yield s);else o(i)&&(yield i)}}function*jr(e,t){let r=[e];for(let n=0;n{let o=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:u}=t,i=r;for(;i>=0&&i0}var Mt=Fo;function po(e){return e!==null&&typeof e=="object"}var wn=po;function*Wt(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,o=u=>wn(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let s of i)o(s)&&(yield s);else o(i)&&(yield i)}}function*kn(e,t){let r=[e];for(let n=0;n20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function Ut(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=mo(e)}function ne(e,t){t.leading=!0,t.trailing=!1,Ut(e,t)}function X(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Ut(e,t)}function ue(e,t){t.leading=!1,t.trailing=!0,Ut(e,t)}var zt=new WeakMap;function Et(e,t){if(zt.has(e))return zt.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:o},locStart:u,locEnd:i}=t;if(!n)return[];let s=((r==null?void 0:r(e,t))??[...Wt(e,{getVisitorKeys:H(o)})]).flatMap(D=>n(D)?[D]:Et(D,t));return s.sort((D,a)=>u(D)-u(a)||i(D)-i(a)),zt.set(e,s),s}function On(e,t,r,n){let{locStart:o,locEnd:u}=r,i=o(t),s=u(t),D=Et(e,r),a,c,d=0,f=D.length;for(;d>1,l=D[p],F=o(l),m=u(l);if(F<=i&&s<=m)return On(l,t,r,l);if(m<=i){a=l,d=p+1;continue}if(s<=F){c=l,f=p;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:p}=n,l=Kt(p,t,r);a&&Kt(p,a,r)!==l&&(a=null),c&&Kt(p,c,r)!==l&&(c=null)}return{enclosingNode:n,precedingNode:a,followingNode:c}}var Gt=()=>!1;function Nn(e,t){let{comments:r}=e;if(delete e.comments,!Mt(r)||!t.printer.canAttachComment)return;let n=[],{locStart:o,locEnd:u,printer:{experimentalFeatures:{avoidAstMutation:i=!1}={},handleComments:s={}},originalText:D}=t,{ownLine:a=Gt,endOfLine:c=Gt,remaining:d=Gt}=s,f=r.map((p,l)=>({...On(e,p,t),comment:p,text:D,options:t,ast:e,isLastComment:r.length-1===l}));for(let[p,l]of f.entries()){let{comment:F,precedingNode:m,enclosingNode:E,followingNode:C,text:g,options:h,ast:B,isLastComment:Z}=l;if(h.parser==="json"||h.parser==="json5"||h.parser==="__js_expression"||h.parser==="__ts_expression"||h.parser==="__vue_expression"||h.parser==="__vue_ts_expression"){if(o(F)-o(B)<=0){ne(B,F);continue}if(u(F)-u(B)>=0){ue(B,F);continue}}let $;if(i?$=[l]:(F.enclosingNode=E,F.precedingNode=m,F.followingNode=C,$=[F,g,h,B,Z]),Eo(g,h,f,p))F.placement="ownLine",a(...$)||(C?ne(C,F):m?ue(m,F):E?X(E,F):X(B,F));else if(Co(g,h,f,p))F.placement="endOfLine",c(...$)||(m?ue(m,F):C?ne(C,F):E?X(E,F):X(B,F));else if(F.placement="remaining",!d(...$))if(m&&C){let Q=n.length;Q>0&&n[Q-1].followingNode!==C&&bn(n,h),n.push(l)}else m?ue(m,F):C?ne(C,F):E?X(E,F):X(B,F)}if(bn(n,t),!i)for(let p of r)delete p.precedingNode,delete p.enclosingNode,delete p.followingNode}var Tn=e=>!/[\S\n\u2028\u2029]/.test(e);function Eo(e,t,r,n){let{comment:o,precedingNode:u}=r[n],{locStart:i,locEnd:s}=t,D=i(o);if(u)for(let a=n-1;a>=0;a--){let{comment:c,precedingNode:d}=r[a];if(d!==u||!Tn(e.slice(s(c),D)))break;D=i(c)}return V(e,D,{backwards:!0})}function Co(e,t,r,n){let{comment:o,followingNode:u}=r[n],{locStart:i,locEnd:s}=t,D=s(o);if(u)for(let a=n+1;a0;--i){let{comment:a,precedingNode:c,followingNode:d}=e[i-1];Re.strictEqual(c,n),Re.strictEqual(d,o);let f=t.originalText.slice(t.locEnd(a),u);if(((D=(s=t.printer).isGap)==null?void 0:D.call(s,f,t))??/^[\s(]*$/.test(f))u=t.locStart(a);else break}for(let[a,{comment:c}]of e.entries())a1&&a.comments.sort((c,d)=>t.locStart(c)-t.locStart(d));e.length=0}function Kt(e,t,r){let n=r.locStart(t)-1;for(let o=1;o!n.has(D)).length===0)return{leading:"",trailing:""};let u=[],i=[],s;return e.each(()=>{let D=e.node;if(n!=null&&n.has(D))return;let{leading:a,trailing:c}=D;a?u.push(go(e,t)):c&&(s=yo(e,t,s),i.push(s.doc))},"comments"),{leading:u,trailing:i}}function vn(e,t,r){let{leading:n,trailing:o}=Ao(e,r);return!n&&!o?t:Ze(t,u=>[n,u,o])}function Pn(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}async function Ln(e,t,r,n,o){let{embeddedLanguageFormatting:u,printer:{embed:i,hasPrettierIgnore:s=()=>!1,getVisitorKeys:D}}=r;if(!i||u!=="auto")return;if(i.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let a=H(i.getVisitorKeys??D),c=[];p();let d=e.stack;for(let{print:l,node:F,pathStack:m}of c)try{e.stack=m;let E=await l(f,t,e,r);E&&o.set(F,E)}catch(E){if(globalThis.PRETTIER_DEBUG)throw E}e.stack=d;function f(l,F){return Bo(l,F,r,n)}function p(){let{node:l}=e;if(l===null||typeof l!="object"||s(e))return;for(let m of a(l))Array.isArray(l[m])?e.each(p,m):e.call(p,m);let F=i(e,r);if(F){if(typeof F=="function"){c.push({print:F,node:l,pathStack:[...e.stack]});return}o.set(l,F)}}}async function Bo(e,t,r,n){let o=await re({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:u}=await De(e,o),i=await n(u,o);return Xe(i)}function _o(e){return()=>{}}var In=_o;function xo(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:o,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:s}=e,D=o(s),a=u(s);for(let c of n)o(c)>=D&&u(c)<=a&&i.add(c);return r.slice(D,a)}var Rn=xo;async function je(e,t){({ast:e}=await Ht(e,t));let r=new Map,n=new Bn(e),o=In(t),u=new Map;await Ln(n,s,t,je,u);let i=await Yn(n,t,s,void 0,u);return Pn(t),i;function s(a,c){return a===void 0||a===n?D(c):Array.isArray(a)?n.call(()=>D(c),...a):n.call(()=>D(c),a)}function D(a){o(n);let c=n.node;if(c==null)return"";let d=c&&typeof c=="object"&&a===void 0;if(d&&r.has(c))return r.get(c);let f=Yn(n,t,s,a,u);return d&&r.set(c,f),f}}function Yn(e,t,r,n,o){var D;let{node:u}=e,{printer:i}=t,s;return(D=i.hasPrettierIgnore)!=null&&D.call(i,e)?s=Rn(e,t):o.has(u)?s=o.get(u):s=i.print(e,t,r,n),u===t.cursorNode&&(s=Ze(s,a=>[xe,a,xe])),i.printComment&&(!i.willPrintOwnComments||!i.willPrintOwnComments(e,t))&&(s=vn(e,s,t)),s}async function Ht(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,Nn(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}var wo=({parser:e})=>e==="json"||e==="json5"||e==="json-stringify";function ko(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(o=>$n.has(o.type)&&n.has(o))}function jn(e){let t=e.length-1;for(;;){let r=e[t];if((r==null?void 0:r.type)==="Program"||(r==null?void 0:r.type)==="File")t--;else break}return e.slice(0,t+1)}function bo(e,t,{locStart:r,locEnd:n}){let o=e.node,u=t.node;if(o===u)return{startNode:o,endNode:u};let i=r(e.node);for(let D of jn(t.parentNodes))if(r(D)>=i)u=D;else break;let s=n(t.node);for(let D of jn(e.parentNodes)){if(n(D)<=s)o=D;else break;if(o===u)break}return{startNode:o,endNode:u}}function qt(e,t,r,n,o=[],u){let{locStart:i,locEnd:s}=r,D=i(e),a=s(e);if(!(t>a||tn);let s=e.slice(n,o).search(/\S/),D=s===-1;if(!D)for(n+=s;o>n&&!/\S/.test(e[o-1]);--o);let a=qt(r,n,t,(p,l)=>Vn(t,p,l),[],"rangeStart"),c=D?a:qt(r,o,t,p=>Vn(t,p),[],"rangeEnd");if(!a||!c)return{rangeStart:0,rangeEnd:0};let d,f;if(wo(t)){let p=ko(a,c);d=p,f=p}else({startNode:d,endNode:f}=bo(a,c,t));return{rangeStart:Math.min(u(d),u(f)),rangeEnd:Math.max(i(d),i(f))}}function To(e,t){let{cursorOffset:r,locStart:n,locEnd:o}=t,u=H(t.printer.getVisitorKeys),i=D=>n(D)<=r&&o(D)>=r,s=e;for(let D of kn(e,{getVisitorKeys:u,filter:i}))s=D;return s}var Wn=To;var Hn="\uFEFF",Un=Symbol("cursor");async function qn(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:o}=await De(e,t);t.cursorOffset>=0&&(t.cursorNode=Wn(n,t));let u=await je(n,t,r);r>0&&(u=qe([G,u],r,t.tabWidth));let i=fe(u,t);if(r>0){let D=i.formatted.trim();i.cursorNodeStart!==void 0&&(i.cursorNodeStart-=i.formatted.indexOf(D)),i.formatted=D+ke(t.endOfLine)}let s=t[Symbol.for("comments")];if(t.cursorOffset>=0){let D,a,c,d,f;if(t.cursorNode&&i.cursorNodeText?(D=t.locStart(t.cursorNode),a=o.slice(D,t.locEnd(t.cursorNode)),c=t.cursorOffset-D,d=i.cursorNodeStart,f=i.cursorNodeText):(D=0,a=o,c=t.cursorOffset,d=0,f=i.formatted),a===f)return{formatted:i.formatted,cursorOffset:d+c,comments:s};let p=a.split("");p.splice(c,0,Un);let l=f.split(""),F=(0,Kn.diffArrays)(p,l),m=d;for(let E of F)if(E.removed){if(E.value.includes(Un))break}else m+=E.count;return{formatted:i.formatted,cursorOffset:m,comments:s}}return{formatted:i.formatted,cursorOffset:-1,comments:s}}async function So(e,t){let{ast:r,text:n}=await De(e,t),{rangeStart:o,rangeEnd:u}=Mn(n,t,r),i=n.slice(o,u),s=Math.min(o,n.lastIndexOf(` -`,o)+1),D=n.slice(s,o).match(/^\s*/)[0],a=Fe(D,t.tabWidth),c=await qn(i,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>o&&t.cursorOffset<=u?t.cursorOffset-o:-1,endOfLine:"lf"},a),d=c.formatted.trimEnd(),{cursorOffset:f}=t;f>u?f+=d.length-i.length:c.cursorOffset>=0&&(f=c.cursorOffset+o);let p=n.slice(0,o)+d+n.slice(u);if(t.endOfLine!=="lf"){let l=ke(t.endOfLine);f>=0&&l===`\r -`&&(f+=_t(p.slice(0,f),` +`||o==="\r"||o==="\u2028"||o==="\u2029")return t+1}return t}var Y=$u;function Mu(e,t,r={}){let n=N(e,r.backwards?t-1:t,r),o=Y(e,n,r);return n!==o}var V=Mu;function Wu(e){return Array.isArray(e)&&e.length>0}var Nt=Wu;var $r=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Uu=e=>Object.keys(e).filter(t=>!$r.has(t));function zu(e){return e?t=>e(t,$r):Uu}var H=zu;function Gu(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function St(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Gu(e)}function te(e,t){t.leading=!0,t.trailing=!1,St(e,t)}function X(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),St(e,t)}function re(e,t){t.leading=!1,t.trailing=!0,St(e,t)}var Tt=new WeakMap;function nt(e,t){if(Tt.has(e))return Tt.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:o},locStart:u,locEnd:i}=t;if(!n)return[];let s=((r==null?void 0:r(e,t))??[...Ot(e,{getVisitorKeys:H(o)})]).flatMap(D=>n(D)?[D]:nt(D,t));return s.sort((D,a)=>u(D)-u(a)||i(D)-i(a)),Tt.set(e,s),s}function Wr(e,t,r,n){let{locStart:o,locEnd:u}=r,i=o(t),s=u(t),D=nt(e,r),a,c,d=0,f=D.length;for(;d>1,l=D[p],F=o(l),m=u(l);if(F<=i&&s<=m)return Wr(l,t,r,l);if(m<=i){a=l,d=p+1;continue}if(s<=F){c=l,f=p;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:p}=n,l=Pt(p,t,r);a&&Pt(p,a,r)!==l&&(a=null),c&&Pt(p,c,r)!==l&&(c=null)}return{enclosingNode:n,precedingNode:a,followingNode:c}}var vt=()=>!1;function Ur(e,t){let{comments:r}=e;if(delete e.comments,!Nt(r)||!t.printer.canAttachComment)return;let n=[],{locStart:o,locEnd:u,printer:{experimentalFeatures:{avoidAstMutation:i=!1}={},handleComments:s={}},originalText:D}=t,{ownLine:a=vt,endOfLine:c=vt,remaining:d=vt}=s,f=r.map((p,l)=>({...Wr(e,p,t),comment:p,text:D,options:t,ast:e,isLastComment:r.length-1===l}));for(let[p,l]of f.entries()){let{comment:F,precedingNode:m,enclosingNode:E,followingNode:C,text:g,options:h,ast:B,isLastComment:Z}=l;if(h.parser==="json"||h.parser==="json5"||h.parser==="jsonc"||h.parser==="__js_expression"||h.parser==="__ts_expression"||h.parser==="__vue_expression"||h.parser==="__vue_ts_expression"){if(o(F)-o(B)<=0){te(B,F);continue}if(u(F)-u(B)>=0){re(B,F);continue}}let $;if(i?$=[l]:(F.enclosingNode=E,F.precedingNode=m,F.followingNode=C,$=[F,g,h,B,Z]),Ku(g,h,f,p))F.placement="ownLine",a(...$)||(C?te(C,F):m?re(m,F):E?X(E,F):X(B,F));else if(Hu(g,h,f,p))F.placement="endOfLine",c(...$)||(m?re(m,F):C?te(C,F):E?X(E,F):X(B,F));else if(F.placement="remaining",!d(...$))if(m&&C){let Q=n.length;Q>0&&n[Q-1].followingNode!==C&&Mr(n,h),n.push(l)}else m?re(m,F):C?te(C,F):E?X(E,F):X(B,F)}if(Mr(n,t),!i)for(let p of r)delete p.precedingNode,delete p.enclosingNode,delete p.followingNode}var zr=e=>!/[\S\n\u2028\u2029]/.test(e);function Ku(e,t,r,n){let{comment:o,precedingNode:u}=r[n],{locStart:i,locEnd:s}=t,D=i(o);if(u)for(let a=n-1;a>=0;a--){let{comment:c,precedingNode:d}=r[a];if(d!==u||!zr(e.slice(s(c),D)))break;D=i(c)}return V(e,D,{backwards:!0})}function Hu(e,t,r,n){let{comment:o,followingNode:u}=r[n],{locStart:i,locEnd:s}=t,D=s(o);if(u)for(let a=n+1;a0;--i){let{comment:a,precedingNode:c,followingNode:d}=e[i-1];ve.strictEqual(c,n),ve.strictEqual(d,o);let f=t.originalText.slice(t.locEnd(a),u);if(((D=(s=t.printer).isGap)==null?void 0:D.call(s,f,t))??/^[\s(]*$/.test(f))u=t.locStart(a);else break}for(let[a,{comment:c}]of e.entries())a1&&a.comments.sort((c,d)=>t.locStart(c)-t.locStart(d));e.length=0}function Pt(e,t,r){let n=r.locStart(t)-1;for(let o=1;o!n.has(D)).length===0)return{leading:"",trailing:""};let u=[],i=[],s;return e.each(()=>{let D=e.node;if(n!=null&&n.has(D))return;let{leading:a,trailing:c}=D;a?u.push(Ju(e,t)):c&&(s=Xu(e,t,s),i.push(s.doc))},"comments"),{leading:u,trailing:i}}function Kr(e,t,r){let{leading:n,trailing:o}=Zu(e,r);return!n&&!o?t:Ze(t,u=>[n,u,o])}function Hr(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}function Qu(e){return()=>{}}var qr=Qu;var Le=class extends Error{name="ConfigError"},Ie=class extends Error{name="UndefinedParserError"};var Jr={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"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:`Maintain existing +(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). +The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. +The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment +in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"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."}]}};function ut({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(o=>o.languages??[]),n=[];for(let o of to(Object.assign({},...e.map(({options:u})=>u),Jr)))!t&&o.deprecated||(Array.isArray(o.choices)&&(t||(o.choices=o.choices.filter(u=>!u.deprecated)),o.name==="parser"&&(o.choices=[...o.choices,...eo(o.choices,r,e)])),o.pluginDefaults=Object.fromEntries(e.filter(u=>{var i;return((i=u.defaultOptions)==null?void 0:i[o.name])!==void 0}).map(u=>[u.name,u.defaultOptions[o.name]])),n.push(o));return{languages:r,options:n}}function*eo(e,t,r){let n=new Set(e.map(o=>o.value));for(let o of t)if(o.parsers){for(let u of o.parsers)if(!n.has(u)){n.add(u);let i=r.find(D=>D.parsers&&Object.prototype.hasOwnProperty.call(D.parsers,u)),s=o.name;i!=null&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:u,description:s}}}}function to(e){let t=[];for(let[r,n]of Object.entries(e)){let o={name:r,...n};Array.isArray(o.default)&&(o.default=y(!1,o.default,-1).value),t.push(o)}return t}var ro=e=>String(e).split(/[/\\]/).pop();function Xr(e,t){if(!t)return;let r=ro(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(o=>o.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(o=>r.endsWith(o)))}function no(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function uo(e,t){let r=e.plugins.flatMap(o=>o.languages??[]),n=no(r,t.language)??Xr(r,t.physicalFile)??Xr(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Zr=uo;var ne={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>ne.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${ne.key(r)}: ${ne.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>ne.value({[e]:t})};var Lt=he(Re(),1),tn=(e,t,{descriptor:r})=>{let n=[`${Lt.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${Lt.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."};var se=he(Re(),1);var ot=Symbol.for("vnopts.VALUE_NOT_EXIST"),me=Symbol.for("vnopts.VALUE_UNCHANGED");var rn=" ".repeat(2),un=(e,t,r)=>{let{text:n,list:o}=r.normalizeExpectedResult(r.schemas[e].expected(r)),u=[];return n&&u.push(nn(e,t,n,r.descriptor)),o&&u.push([nn(e,t,o.title,r.descriptor)].concat(o.values.map(i=>on(i,r.loggerPrintWidth))).join(` +`)),sn(u,r.loggerPrintWidth)};function nn(e,t,r,n){return[`Invalid ${se.default.red(n.key(e))} value.`,`Expected ${se.default.blue(r)},`,`but received ${t===ot?se.default.gray("nothing"):se.default.red(n.value(t))}.`].join(" ")}function on({text:e,list:t},r){let n=[];return e&&n.push(`- ${se.default.blue(e)}`),t&&n.push([`- ${se.default.blue(t.title)}:`].concat(t.values.map(o=>on(o,r-rn.length).replace(/^|\n/g,`$&${rn}`))).join(` +`)),sn(n,r)}function sn(e,t){if(e.length===1)return e[0];let[r,n]=e,[o,u]=e.map(i=>i.split(` +`,1)[0].length);return o>t&&o>u?n:r}var Yt=he(Re(),1);var It=[],Dn=[];function Rt(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,o=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-o);)n--,o--;let u=0;for(;us?a>s?s+1:a:a>D?D+1:a;return s}var it=(e,t,{descriptor:r,logger:n,schemas:o})=>{let u=[`Ignored unknown option ${Yt.default.yellow(r.pair({key:e,value:t}))}.`],i=Object.keys(o).sort().find(s=>Rt(e,s)<3);i&&u.push(`Did you mean ${Yt.default.blue(r.key(i))}?`),n.warn(u.join(" "))};var oo=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function io(e,t){let r=new e(t),n=Object.create(r);for(let o of oo)o in t&&(n[o]=so(t[o],r,w.prototype[o].length));return n}var w=class{static create(t){return io(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return me}};function so(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var st=class extends w{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}};var Dt=class extends w{expected(){return"anything"}validate(){return!0}};var at=class extends w{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let o of t){let u=r.normalizeValidateResult(this._valueSchema.validate(o,r),o);u!==!0&&n.push(u.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let o of t){let u=r.normalizeDeprecatedResult(this._valueSchema.deprecated(o,r),o);u!==!1&&n.push(...u.map(({value:i})=>({value:[i]})))}return n}forward(t,r){let n=[];for(let o of t){let u=r.normalizeForwardResult(this._valueSchema.forward(o,r),o);n.push(...u.map(an))}return n}redirect(t,r){let n=[],o=[];for(let u of t){let i=r.normalizeRedirectResult(this._valueSchema.redirect(u,r),u);"remain"in i&&n.push(i.remain),o.push(...i.redirect.map(an))}return n.length===0?{redirect:o}:{redirect:o,remain:n}}overlap(t,r){return t.concat(r)}};function an({from:e,to:t}){return{from:[e],to:t}}var ct=class extends w{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function ln(e,t){let r=Object.create(null);for(let n of e){let o=n[t];if(r[o])throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r[o]=n}return r}function fn(e,t){let r=new Map;for(let n of e){let o=n[t];if(r.has(o))throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r.set(o,n)}return r}function Fn(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function pn(e,t){let r=[],n=[];for(let o of e)t(o)?r.push(o):n.push(o);return[r,n]}function dn(e){return e===Math.floor(e)}function mn(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,o=["undefined","object","boolean","number","string"];return r!==n?o.indexOf(r)-o.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function En(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function jt(e){return e===void 0?{}:e}function Vt(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return Do((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(Vt)}}:{text:t}}function $t(e,t){return e===!0?!0:e===!1?{value:t}:e}function Mt(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function cn(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function lt(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>cn(r,t)):[cn(e,t)]}function Wt(e,t){let r=lt(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function Do(e,t){if(!e)throw new Error(t)}var ft=class extends w{constructor(t){super(t),this._choices=fn(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(mn).map(t.value),n=r.slice(0,-2),o=r.slice(-2);return{text:n.concat(o.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}};var Ft=class extends w{expected(){return"a number"}validate(t,r){return typeof t=="number"}};var pt=class extends Ft{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&dn(t)}};var Ye=class extends w{expected(){return"a string"}validate(t){return typeof t=="string"}};var Cn=ne,hn=it,gn=un,yn=tn;var dt=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:o=80,descriptor:u=Cn,unknown:i=hn,invalid:s=gn,deprecated:D=yn,missing:a=()=>!1,required:c=()=>!1,preprocess:d=p=>p,postprocess:f=()=>me}=r||{};this._utils={descriptor:u,logger:n||{warn:()=>{}},loggerPrintWidth:o,schemas:ln(t,"name"),normalizeDefaultResult:jt,normalizeExpectedResult:Vt,normalizeDeprecatedResult:Mt,normalizeForwardResult:lt,normalizeRedirectResult:Wt,normalizeValidateResult:$t},this._unknownHandler=i,this._invalidHandler=En(s),this._deprecatedHandler=D,this._identifyMissing=(p,l)=>!(p in l)||a(p,l),this._identifyRequired=c,this._preprocess=d,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Fn()}normalize(t){let r={},o=[this._preprocess(t,this._utils)],u=()=>{for(;o.length!==0;){let i=o.shift(),s=this._applyNormalization(i,r);o.push(...s)}};u();for(let i of Object.keys(this._utils.schemas)){let s=this._utils.schemas[i];if(!(i in r)){let D=jt(s.default(this._utils));"value"in D&&o.push({[i]:D.value})}}u();for(let i of Object.keys(this._utils.schemas)){if(!(i in r))continue;let s=this._utils.schemas[i],D=r[i],a=s.postprocess(D,this._utils);a!==me&&(this._applyValidation(a,i,s),r[i]=a)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:o,unknownKeys:u}=this._partitionOptionKeys(t);for(let i of o){let s=this._utils.schemas[i],D=s.preprocess(t[i],this._utils);this._applyValidation(D,i,s);let a=({from:p,to:l})=>{n.push(typeof l=="string"?{[l]:p}:{[l.key]:l.value})},c=({value:p,redirectTo:l})=>{let F=Mt(s.deprecated(p,this._utils),D,!0);if(F!==!1)if(F===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,l,this._utils));else for(let{value:m}of F){let E={key:i,value:m};if(!this._hasDeprecationWarned(E)){let C=typeof l=="string"?{key:l,value:m}:l;this._utils.logger.warn(this._deprecatedHandler(E,C,this._utils))}}};lt(s.forward(D,this._utils),D).forEach(a);let f=Wt(s.redirect(D,this._utils),D);if(f.redirect.forEach(a),"remain"in f){let p=f.remain;r[i]=i in r?s.overlap(r[i],p,this._utils):p,c({value:p})}for(let{from:p,to:l}of f.redirect)c({value:p,redirectTo:l})}for(let i of u){let s=t[i];this._applyUnknownHandler(i,s,r,(D,a)=>{n.push({[D]:a})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,ot,this._utils)}_partitionOptionKeys(t){let[r,n]=pn(Object.keys(t).filter(o=>!this._identifyMissing(o,t)),o=>o in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let o=$t(n.validate(t,this._utils),t);if(o!==!0)throw this._invalidHandler(r,o.value,this._utils)}_applyUnknownHandler(t,r,n,o){let u=this._unknownHandler(t,r,this._utils);if(u)for(let i of Object.keys(u)){if(this._identifyMissing(i,u))continue;let s=u[i];i in this._utils.schemas?o(i,s):n[i]=s}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==me){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:o}=this._partitionOptionKeys(r.override);for(let u of n){let i=r.override[u];this._applyValidation(i,u,this._utils.schemas[u]),t[u]=i}for(let u of o){let i=r.override[u];this._applyUnknownHandler(u,i,t,(s,D)=>{let a=this._utils.schemas[s];this._applyValidation(D,s,a),t[s]=D})}}}}};var Ut;function co(e,t,{logger:r=!1,isCLI:n=!1,passThrough:o=!1,FlagSchema:u,descriptor:i}={}){if(n){if(!u)throw new Error("'FlagSchema' option is required.");if(!i)throw new Error("'descriptor' option is required.")}else i=ne;let s=o?Array.isArray(o)?(f,p)=>o.includes(f)?{[f]:p}:void 0:(f,p)=>({[f]:p}):(f,p,l)=>{let{_:F,...m}=l.schemas;return it(f,p,{...l,schemas:m})},D=lo(t,{isCLI:n,FlagSchema:u}),a=new dt(D,{logger:r,unknown:s,descriptor:i}),c=r!==!1;c&&Ut&&(a._hasDeprecationWarned=Ut);let d=a.normalize(e);return c&&(Ut=a._hasDeprecationWarned),d}function lo(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(Dt.create({name:"_"}));for(let o of e)n.push(fo(o,{isCLI:t,optionInfos:e,FlagSchema:r})),o.alias&&t&&n.push(st.create({name:o.alias,sourceName:o.name}));return n}function fo(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:o}=e,u={name:o},i,s={};switch(e.type){case"int":i=pt,t&&(u.preprocess=Number);break;case"string":i=Ye;break;case"choice":i=ft,u.choices=e.choices.map(D=>D!=null&&D.redirect?{...D,redirect:{to:{key:e.name,value:D.redirect}}}:D);break;case"boolean":i=ct;break;case"flag":i=n,u.flags=r.flatMap(D=>[D.alias,D.description&&D.name,D.oppositeDescription&&`no-${D.name}`].filter(Boolean));break;case"path":i=Ye;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?u.validate=(D,a,c)=>e.exception(D)||a.validate(D,c):u.validate=(D,a,c)=>D===void 0||a.validate(D,c),e.redirect&&(s.redirect=D=>D?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let D=u.preprocess||(a=>a);u.preprocess=(a,c,d)=>c.preprocess(D(Array.isArray(a)?y(!1,a,-1):a),d)}return e.array?at.create({...t?{preprocess:D=>Array.isArray(D)?D:[D]}:{},...s,valueSchema:i.create(u)}):i.create({...u,...s})}var An=co;var Fo=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let o=t[n];if(r(o,n,t))return o}}},zt=Fo;function Gt(e,t){if(!t)throw new Error("parserName is required.");let r=zt(!1,e,o=>o.parsers&&Object.prototype.hasOwnProperty.call(o.parsers,t));if(r)return r;let n=`Couldn't resolve parser "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new Le(n)}function Bn(e,t){if(!t)throw new Error("astFormat is required.");let r=zt(!1,e,o=>o.printers&&Object.prototype.hasOwnProperty.call(o.printers,t));if(r)return r;let n=`Couldn't find plugin for AST format "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new Le(n)}function mt({plugins:e,parser:t}){let r=Gt(e,t);return Kt(r,t)}function Kt(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function _n(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var kn={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function po(e,t={}){var d;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=Zr(r,{physicalFile:r.filepath}),!r.parser)throw new Ie(`No parser could be inferred for file "${r.filepath}".`)}else throw new Ie("No parser and no file path given, couldn't infer a parser.");let n=ut({plugins:e.plugins,showDeprecated:!0}).options,o={...kn,...Object.fromEntries(n.filter(f=>f.default!==void 0).map(f=>[f.name,f.default]))},u=Gt(r.plugins,r.parser),i=await Kt(u,r.parser);r.astFormat=i.astFormat,r.locEnd=i.locEnd,r.locStart=i.locStart;let s=(d=u.printers)!=null&&d[i.astFormat]?u:Bn(r.plugins,i.astFormat),D=await _n(s,i.astFormat);r.printer=D;let a=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,f])=>f!==void 0)):{},c={...o,...a};for(let[f,p]of Object.entries(c))(r[f]===null||r[f]===void 0)&&(r[f]=p);return r.parser==="json"&&(r.trailingComma="none"),An(r,n,{passThrough:Object.keys(kn),...t})}var ue=po;var Ln=he(Pn(),1);async function Bo(e,t){let r=await mt(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let o;try{o=await r.parse(n,t,t)}catch(u){_o(u,e)}return{text:n,ast:o}}function _o(e,t){let{loc:r}=e;if(r){let n=(0,Ln.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` +`+n,e.codeFrame=n,e}throw e}var De=Bo;async function In(e,t,r,n,o){let{embeddedLanguageFormatting:u,printer:{embed:i,hasPrettierIgnore:s=()=>!1,getVisitorKeys:D}}=r;if(!i||u!=="auto")return;if(i.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let a=H(i.getVisitorKeys??D),c=[];p();let d=e.stack;for(let{print:l,node:F,pathStack:m}of c)try{e.stack=m;let E=await l(f,t,e,r);E&&o.set(F,E)}catch(E){if(globalThis.PRETTIER_DEBUG)throw E}e.stack=d;function f(l,F){return ko(l,F,r,n)}function p(){let{node:l}=e;if(l===null||typeof l!="object"||s(e))return;for(let m of a(l))Array.isArray(l[m])?e.each(p,m):e.call(p,m);let F=i(e,r);if(F){if(typeof F=="function"){c.push({print:F,node:l,pathStack:[...e.stack]});return}o.set(l,F)}}}async function ko(e,t,r,n){let o=await ue({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:u}=await De(e,o),i=await n(u,o);return Xe(i)}function bo(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:o,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:s}=e,D=o(s),a=u(s);for(let c of n)o(c)>=D&&u(c)<=a&&i.add(c);return r.slice(D,a)}var Rn=bo;async function je(e,t){({ast:e}=await qt(e,t));let r=new Map,n=new Ir(e),o=qr(t),u=new Map;await In(n,s,t,je,u);let i=await Yn(n,t,s,void 0,u);return Hr(t),i;function s(a,c){return a===void 0||a===n?D(c):Array.isArray(a)?n.call(()=>D(c),...a):n.call(()=>D(c),a)}function D(a){o(n);let c=n.node;if(c==null)return"";let d=c&&typeof c=="object"&&a===void 0;if(d&&r.has(c))return r.get(c);let f=Yn(n,t,s,a,u);return d&&r.set(c,f),f}}function Yn(e,t,r,n,o){var D;let{node:u}=e,{printer:i}=t,s;return(D=i.hasPrettierIgnore)!=null&&D.call(i,e)?s=Rn(e,t):o.has(u)?s=o.get(u):s=i.print(e,t,r,n),u===t.cursorNode&&(s=Ze(s,a=>[be,a,be])),i.printComment&&(!i.willPrintOwnComments||!i.willPrintOwnComments(e,t))&&(s=Kr(e,s,t)),s}async function qt(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,Ur(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function xo(e,t){let{cursorOffset:r,locStart:n,locEnd:o}=t,u=H(t.printer.getVisitorKeys),i=D=>n(D)<=r&&o(D)>=r,s=e;for(let D of jr(e,{getVisitorKeys:u,filter:i}))s=D;return s}var jn=xo;function wo(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let o=H(n),u=r.ignoredProperties??new Set;return i(e);function i(s,D){if(!(s!==null&&typeof s=="object"))return s;if(Array.isArray(s))return s.map(f=>i(f,D)).filter(Boolean);let a={},c=new Set(o(s));for(let f in s)!Object.prototype.hasOwnProperty.call(s,f)||u.has(f)||(c.has(f)?a[f]=i(s[f],s):a[f]=s[f]);let d=r(s,a,D);if(d!==null)return d??a}}var Vn=wo;var Oo=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function No(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(o=>Wn.has(o.type)&&n.has(o))}function $n(e){let t=e.length-1;for(;;){let r=e[t];if((r==null?void 0:r.type)==="Program"||(r==null?void 0:r.type)==="File")t--;else break}return e.slice(0,t+1)}function So(e,t,{locStart:r,locEnd:n}){let o=e.node,u=t.node;if(o===u)return{startNode:o,endNode:u};let i=r(e.node);for(let D of $n(t.parentNodes))if(r(D)>=i)u=D;else break;let s=n(t.node);for(let D of $n(e.parentNodes)){if(n(D)<=s)o=D;else break;if(o===u)break}return{startNode:o,endNode:u}}function Jt(e,t,r,n,o=[],u){let{locStart:i,locEnd:s}=r,D=i(e),a=s(e);if(!(t>a||tn);let s=e.slice(n,o).search(/\S/),D=s===-1;if(!D)for(n+=s;o>n&&!/\S/.test(e[o-1]);--o);let a=Jt(r,n,t,(p,l)=>Mn(t,p,l),[],"rangeStart"),c=D?a:Jt(r,o,t,p=>Mn(t,p),[],"rangeEnd");if(!a||!c)return{rangeStart:0,rangeEnd:0};let d,f;if(Oo(t)){let p=No(a,c);d=p,f=p}else({startNode:d,endNode:f}=So(a,c,t));return{rangeStart:Math.min(u(d),u(f)),rangeEnd:Math.max(i(d),i(f))}}var qn="\uFEFF",zn=Symbol("cursor");async function Jn(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:o}=await De(e,t);t.cursorOffset>=0&&(t.cursorNode=jn(n,t));let u=await je(n,t,r);r>0&&(u=qe([G,u],r,t.tabWidth));let i=fe(u,t);if(r>0){let D=i.formatted.trim();i.cursorNodeStart!==void 0&&(i.cursorNodeStart-=i.formatted.indexOf(D)),i.formatted=D+Ae(t.endOfLine)}let s=t[Symbol.for("comments")];if(t.cursorOffset>=0){let D,a,c,d,f;if(t.cursorNode&&i.cursorNodeText?(D=t.locStart(t.cursorNode),a=o.slice(D,t.locEnd(t.cursorNode)),c=t.cursorOffset-D,d=i.cursorNodeStart,f=i.cursorNodeText):(D=0,a=o,c=t.cursorOffset,d=0,f=i.formatted),a===f)return{formatted:i.formatted,cursorOffset:d+c,comments:s};let p=a.split("");p.splice(c,0,zn);let l=f.split(""),F=(0,Hn.diffArrays)(p,l),m=d;for(let E of F)if(E.removed){if(E.value.includes(zn))break}else m+=E.count;return{formatted:i.formatted,cursorOffset:m,comments:s}}return{formatted:i.formatted,cursorOffset:-1,comments:s}}async function Po(e,t){let{ast:r,text:n}=await De(e,t),{rangeStart:o,rangeEnd:u}=Un(n,t,r),i=n.slice(o,u),s=Math.min(o,n.lastIndexOf(` +`,o)+1),D=n.slice(s,o).match(/^\s*/)[0],a=Fe(D,t.tabWidth),c=await Jn(i,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>o&&t.cursorOffset<=u?t.cursorOffset-o:-1,endOfLine:"lf"},a),d=c.formatted.trimEnd(),{cursorOffset:f}=t;f>u?f+=d.length-i.length:c.cursorOffset>=0&&(f=c.cursorOffset+o);let p=n.slice(0,o)+d+n.slice(u);if(t.endOfLine!=="lf"){let l=Ae(t.endOfLine);f>=0&&l===`\r +`&&(f+=yt(p.slice(0,f),` `)),p=ee(!1,p,` -`,l)}return{formatted:p,cursorOffset:f,comments:c.comments}}function Jt(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function zn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o}=t;return r=Jt(e,r,-1),n=Jt(e,n,0),o=Jt(e,o,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:o}}function Jn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u}=zn(e,t),i=e.charAt(0)===Hn;if(i&&(e=e.slice(1),r--,n--,o--),u==="auto"&&(u=hr(e)),e.includes("\r")){let s=D=>_t(e.slice(0,Math.max(D,0)),`\r -`);r-=s(r),n-=s(n),o-=s(o),e=gr(e)}return{hasBOM:i,text:e,options:zn(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u})}}async function Gn(e,t){let r=await ft(t);return!r.hasPragma||r.hasPragma(e)}async function Xt(e,t){let{hasBOM:r,text:n,options:o}=Jn(e,await re(t));if(o.rangeStart>=o.rangeEnd&&n!==""||o.requirePragma&&!await Gn(n,o))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let u;return o.rangeStart>0||o.rangeEnd=0&&u.cursorOffset++),u}async function Xn(e,t,r){let{text:n,options:o}=Jn(e,await re(t)),u=await De(n,o);return r&&(r.preprocessForPrint&&(u.ast=await Ht(u.ast,o)),r.massage&&(u.ast=fn(u.ast,o))),u}async function Zn(e,t){t=await re(t);let r=await je(e,t);return fe(r,t)}async function Qn(e,t){let r=Pr(e),{formatted:n}=await Xt(r,{...t,parser:"__js_expression"});return n}async function eu(e,t){t=await re(t);let{ast:r}=await De(e,t);return je(r,t)}async function tu(e,t){return fe(e,await re(t))}var Qt={};We(Qt,{addDanglingComment:()=>X,addLeadingComment:()=>ne,addTrailingComment:()=>ue,getAlignmentSize:()=>Fe,getIndentSize:()=>nu,getMaxContinuousCount:()=>ru,getNextNonSpaceNonCommentCharacter:()=>iu,getNextNonSpaceNonCommentCharacterIndex:()=>zo,getStringWidth:()=>be,hasNewline:()=>V,hasNewlineInRange:()=>uu,hasSpaces:()=>ou,isNextLineEmpty:()=>qo,isNextLineEmptyAfterIndex:()=>Ct,isPreviousLineEmpty:()=>Ko,makeString:()=>su,skip:()=>me,skipEverythingButNewLine:()=>mt,skipInlineComment:()=>Ee,skipNewline:()=>Y,skipSpaces:()=>N,skipToLineEnd:()=>dt,skipTrailingComment:()=>Ce,skipWhitespace:()=>xn});function Po(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,o.length/t.length),0)}var ru=Yo;function jo(e,t){let r=e.lastIndexOf(` -`);return r===-1?0:Fe(e.slice(r+1).match(/^[\t ]*/)[0],t)}var nu=jo;function Vo(e,t,r){for(let n=t;ns===n?s:D===t?"\\"+D:D||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(s)?s:"\\"+s));return t+u+t}var su=Wo;function Uo(e,t,r){return Ve(e,r(t))}function zo(e,t){return arguments.length===2||typeof t=="number"?Ve(e,t):Uo(...arguments)}function Go(e,t,r){return Ye(e,r(t))}function Ko(e,t){return arguments.length===2||typeof t=="number"?Ye(e,t):Go(...arguments)}function Ho(e,t,r){return Ct(e,r(t))}function qo(e,t){return arguments.length===2||typeof t=="number"?Ct(e,t):Ho(...arguments)}var er={};We(er,{builders:()=>Jo,printer:()=>Xo,utils:()=>Zo});var Jo={join:we,line:Ke,softline:Er,hardline:G,literalline:He,group:At,conditionalGroup:fr,fill:Ge,lineSuffix:Be,lineSuffixBoundary:dr,cursor:xe,breakParent:le,ifBreak:Fr,trim:mr,indent:ie,indentIfBreak:pr,align:oe,addAlignmentToDoc:qe,markAsRoot:cr,dedentToRoot:ar,dedent:lr,hardlineWithoutBreakParent:_e,literallineWithoutBreakParent:Bt,label:Cr,concat:e=>e},Xo={printDocToString:fe},Zo={willBreak:br,traverseDoc:Ae,findInDoc:Je,mapDoc:Ne,removeLines:Nr,stripTrailingHardline:Xe,replaceEndOfLine:Tr,canBreak:Sr};var Du="3.1.0";function ae(e,t=1){return async(...r)=>{let n=r[t]??{},o=n.plugins??[];return r[t]={...n,plugins:Array.isArray(o)?o:Object.values(o)},e(...r)}}var au=ae(Xt);async function cu(e,t){let{formatted:r}=await au(e,{...t,cursorOffset:-1});return r}async function Qo(e,t){return await cu(e,t)===e}var ei=ae(et,0),ti={parse:ae(Xn),formatAST:ae(Zn),formatDoc:ae(Qn),printToDoc:ae(eu),printDocToString:ae(tu)};return nr(ri);}); \ No newline at end of file +`,l)}return{formatted:p,cursorOffset:f,comments:c.comments}}function Xt(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function Gn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o}=t;return r=Xt(e,r,-1),n=Xt(e,n,0),o=Xt(e,o,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:o}}function Xn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u}=Gn(e,t),i=e.charAt(0)===qn;if(i&&(e=e.slice(1),r--,n--,o--),u==="auto"&&(u=Dr(e)),e.includes("\r")){let s=D=>yt(e.slice(0,Math.max(D,0)),`\r +`);r-=s(r),n-=s(n),o-=s(o),e=ar(e)}return{hasBOM:i,text:e,options:Gn(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u})}}async function Kn(e,t){let r=await mt(t);return!r.hasPragma||r.hasPragma(e)}async function Zt(e,t){let{hasBOM:r,text:n,options:o}=Xn(e,await ue(t));if(o.rangeStart>=o.rangeEnd&&n!==""||o.requirePragma&&!await Kn(n,o))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let u;return o.rangeStart>0||o.rangeEnd=0&&u.cursorOffset++),u}async function Zn(e,t,r){let{text:n,options:o}=Xn(e,await ue(t)),u=await De(n,o);return r&&(r.preprocessForPrint&&(u.ast=await qt(u.ast,o)),r.massage&&(u.ast=Vn(u.ast,o))),u}async function Qn(e,t){t=await ue(t);let r=await je(e,t);return fe(r,t)}async function eu(e,t){let r=Ar(e),{formatted:n}=await Zt(r,{...t,parser:"__js_expression"});return n}async function tu(e,t){t=await ue(t);let{ast:r}=await De(e,t);return je(r,t)}async function ru(e,t){return fe(e,await ue(t))}var Qt={};We(Qt,{builders:()=>Io,printer:()=>Ro,utils:()=>Yo});var Io={join:xe,line:Ke,softline:gr,hardline:G,literalline:He,group:Bt,conditionalGroup:dr,fill:Ge,lineSuffix:_e,lineSuffixBoundary:Cr,cursor:be,breakParent:le,ifBreak:mr,trim:hr,indent:ie,indentIfBreak:Er,align:oe,addAlignmentToDoc:qe,markAsRoot:Fr,dedentToRoot:fr,dedent:pr,hardlineWithoutBreakParent:ke,literallineWithoutBreakParent:_t,label:yr,concat:e=>e},Ro={printDocToString:fe},Yo={willBreak:Nr,traverseDoc:Be,findInDoc:Je,mapDoc:Ne,removeLines:Tr,stripTrailingHardline:Xe,replaceEndOfLine:vr,canBreak:Pr};var nu="3.2.5";var tr={};We(tr,{addDanglingComment:()=>X,addLeadingComment:()=>te,addTrailingComment:()=>re,getAlignmentSize:()=>Fe,getIndentSize:()=>uu,getMaxContinuousCount:()=>ou,getNextNonSpaceNonCommentCharacter:()=>iu,getNextNonSpaceNonCommentCharacterIndex:()=>Jo,getStringWidth:()=>we,hasNewline:()=>V,hasNewlineInRange:()=>su,hasSpaces:()=>Du,isNextLineEmpty:()=>ei,isNextLineEmptyAfterIndex:()=>Ct,isPreviousLineEmpty:()=>Zo,makeString:()=>au,skip:()=>de,skipEverythingButNewLine:()=>rt,skipInlineComment:()=>Ee,skipNewline:()=>Y,skipSpaces:()=>N,skipToLineEnd:()=>tt,skipTrailingComment:()=>Ce,skipWhitespace:()=>Vr});function jo(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,o.length/t.length),0)}var ou=Uo;function zo(e,t){let r=Ve(e,t);return r===!1?"":e.charAt(r)}var iu=zo;function Go(e,t,r){for(let n=t;ns===n?s:D===t?"\\"+D:D||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(s)?s:"\\"+s));return t+u+t}var au=Ho;function qo(e,t,r){return Ve(e,r(t))}function Jo(e,t){return arguments.length===2||typeof t=="number"?Ve(e,t):qo(...arguments)}function Xo(e,t,r){return Pe(e,r(t))}function Zo(e,t){return arguments.length===2||typeof t=="number"?Pe(e,t):Xo(...arguments)}function Qo(e,t,r){return Ct(e,r(t))}function ei(e,t){return arguments.length===2||typeof t=="number"?Ct(e,t):Qo(...arguments)}function ae(e,t=1){return async(...r)=>{let n=r[t]??{},o=n.plugins??[];return r[t]={...n,plugins:Array.isArray(o)?o:Object.values(o)},e(...r)}}var cu=ae(Zt);async function lu(e,t){let{formatted:r}=await cu(e,{...t,cursorOffset:-1});return r}async function ti(e,t){return await lu(e,t)===e}var ri=ae(ut,0),ni={parse:ae(Zn),formatAST:ae(Qn),formatDoc:ae(eu),printToDoc:ae(tu),printDocToString:ae(ru)};return ur(ui);}); \ No newline at end of file diff --git a/node_modules/prettier/standalone.mjs b/node_modules/prettier/standalone.mjs index e30c8e3..f5faa11 100644 --- a/node_modules/prettier/standalone.mjs +++ b/node_modules/prettier/standalone.mjs @@ -1,37 +1,34 @@ -var lu=Object.create;var $e=Object.defineProperty;var fu=Object.getOwnPropertyDescriptor;var Fu=Object.getOwnPropertyNames;var pu=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty;var mu=(e,t)=>()=>(e&&(t=e(e=0)),t);var Me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),We=(e,t)=>{for(var r in t)$e(e,r,{get:t[r],enumerable:!0})},nr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Fu(t))!du.call(e,o)&&o!==r&&$e(e,o,{get:()=>t[o],enumerable:!(n=fu(t,o))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?lu(pu(e)):{},nr(t||!e||!e.__esModule?$e(r,"default",{value:e,enumerable:!0}):r,e)),Eu=e=>nr($e({},"__esModule",{value:!0}),e);var Cu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var ht=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)};var ce=(e,t,r)=>(Cu(e,t,"access private method"),r);var or=Me(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.default=ur;function ur(){}ur.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.callback;typeof n=="function"&&(o=n,n={}),this.options=n;var u=this;function i(F){return o?(setTimeout(function(){o(void 0,F)},0),!0):F}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var s=r.length,D=t.length,a=1,c=s+D;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],r,t,0);if(d[0].newPos+1>=s&&f+1>=D)return i([{value:this.join(r),count:r.length}]);function p(){for(var F=-1*a;F<=a;F+=2){var m=void 0,E=d[F-1],C=d[F+1],g=(C?C.newPos:0)-F;E&&(d[F-1]=void 0);var h=E&&E.newPos+1=s&&g+1>=D)return i(gu(u,m.components,r,t,u.useLongestToken));d[F]=m}a++}if(o)(function F(){setTimeout(function(){if(a>c)return o();p()||F()},0)})();else for(;a<=c;){var l=p();if(l)return l}},pushComponent:function(t,r,n){var o=t[t.length-1];o&&o.added===r&&o.removed===n?t[t.length-1]={count:o.count+1,added:r,removed:n}:t.push({count:1,added:r,removed:n})},extractCommon:function(t,r,n,o){for(var u=r.length,i=n.length,s=t.newPos,D=s-o,a=0;s+1p.length?F:p}),a.value=e.join(c)}else a.value=e.join(r.slice(s,s+a.count));s+=a.count,a.added||(D+=a.count)}}var f=t[i-1];return i>1&&typeof f.value=="string"&&(f.added||f.removed)&&e.equals("",f.value)&&(t[i-2].value+=f.value,t.pop()),t}function yu(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var ir=Me(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.diffArrays=_u;ye.arrayDiff=void 0;var Au=Bu(or());function Bu(e){return e&&e.__esModule?e:{default:e}}var ge=new Au.default;ye.arrayDiff=ge;ge.tokenize=function(e){return e.slice()};ge.join=ge.removeEmpty=function(e){return e};function _u(e,t,r){return ge.diff(e,t,r)}});var Pe=Me((ps,jr)=>{"use strict";var Yr=new Proxy(String,{get:()=>Yr});jr.exports=Yr});var Fn={};We(Fn,{default:()=>uo,shouldHighlight:()=>no});var no,uo,pn=mu(()=>{no=()=>!1,uo=String});var yn=Me(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.codeFrameColumns=gn;Ft.default=ao;var dn=(pn(),Eu(Fn)),mn=oo(Pe(),!0);function hn(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(hn=function(n){return n?r:t})(e)}function oo(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=hn(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&Object.prototype.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,r&&r.set(e,n),n}var jt;function io(e){if(e){var t;return(t=jt)!=null||(jt=new mn.default.constructor({enabled:!0,level:1})),jt}return mn.default}var En=!1;function so(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}var Cn=/\r\n|[\n\r\u2028\u2029]/;function Do(e,t,r){let n=Object.assign({column:0,line:-1},e.start),o=Object.assign({},n,e.end),{linesAbove:u=2,linesBelow:i=3}=r||{},s=n.line,D=n.column,a=o.line,c=o.column,d=Math.max(s-(u+1),0),f=Math.min(t.length,a+i);s===-1&&(d=0),a===-1&&(f=t.length);let p=a-s,l={};if(p)for(let F=0;F<=p;F++){let m=F+s;if(!D)l[m]=!0;else if(F===0){let E=t[m-1].length;l[m]=[D,E-D+1]}else if(F===p)l[m]=[0,c];else{let E=t[m-F].length;l[m]=[0,E]}}else D===c?D?l[s]=[D,0]:l[s]=!0:l[s]=[D,c-D];return{start:d,end:f,markerLines:l}}function gn(e,t,r={}){let n=(r.highlightCode||r.forceColor)&&(0,dn.shouldHighlight)(r),o=io(r.forceColor),u=so(o),i=(F,m)=>n?F(m):m,s=e.split(Cn),{start:D,end:a,markerLines:c}=Do(t,s,r),d=t.start&&typeof t.start.column=="number",f=String(a).length,l=(n?(0,dn.default)(e,r):e).split(Cn,a).slice(D,a).map((F,m)=>{let E=D+1+m,g=` ${` ${E}`.slice(-f)} |`,h=c[E],B=!c[E+1];if(h){let Z="";if(Array.isArray(h)){let $=F.slice(0,Math.max(h[0]-1,0)).replace(/[^\t]/g," "),Q=h[1]||1;Z=[` +var fu=Object.create;var $e=Object.defineProperty;var Fu=Object.getOwnPropertyDescriptor;var pu=Object.getOwnPropertyNames;var du=Object.getPrototypeOf,mu=Object.prototype.hasOwnProperty;var Eu=(e,t)=>()=>(e&&(t=e(e=0)),t);var Me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),We=(e,t)=>{for(var r in t)$e(e,r,{get:t[r],enumerable:!0})},ur=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of pu(t))!mu.call(e,o)&&o!==r&&$e(e,o,{get:()=>t[o],enumerable:!(n=Fu(t,o))||n.enumerable});return e};var he=(e,t,r)=>(r=e!=null?fu(du(e)):{},ur(t||!e||!e.__esModule?$e(r,"default",{value:e,enumerable:!0}):r,e)),Cu=e=>ur($e({},"__esModule",{value:!0}),e);var hu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var ht=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)};var ce=(e,t,r)=>(hu(e,t,"access private method"),r);var ir=Me(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.default=or;function or(){}or.prototype={diff:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.callback;typeof n=="function"&&(o=n,n={}),this.options=n;var u=this;function i(F){return o?(setTimeout(function(){o(void 0,F)},0),!0):F}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var s=r.length,D=t.length,a=1,c=s+D;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],r,t,0);if(d[0].newPos+1>=s&&f+1>=D)return i([{value:this.join(r),count:r.length}]);function p(){for(var F=-1*a;F<=a;F+=2){var m=void 0,E=d[F-1],C=d[F+1],g=(C?C.newPos:0)-F;E&&(d[F-1]=void 0);var h=E&&E.newPos+1=s&&g+1>=D)return i(yu(u,m.components,r,t,u.useLongestToken));d[F]=m}a++}if(o)(function F(){setTimeout(function(){if(a>c)return o();p()||F()},0)})();else for(;a<=c;){var l=p();if(l)return l}},pushComponent:function(t,r,n){var o=t[t.length-1];o&&o.added===r&&o.removed===n?t[t.length-1]={count:o.count+1,added:r,removed:n}:t.push({count:1,added:r,removed:n})},extractCommon:function(t,r,n,o){for(var u=r.length,i=n.length,s=t.newPos,D=s-o,a=0;s+1p.length?F:p}),a.value=e.join(c)}else a.value=e.join(r.slice(s,s+a.count));s+=a.count,a.added||(D+=a.count)}}var f=t[i-1];return i>1&&typeof f.value=="string"&&(f.added||f.removed)&&e.equals("",f.value)&&(t[i-2].value+=f.value,t.pop()),t}function Au(e){return{newPos:e.newPos,components:e.components.slice(0)}}});var sr=Me(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.diffArrays=ku;ye.arrayDiff=void 0;var Bu=_u(ir());function _u(e){return e&&e.__esModule?e:{default:e}}var ge=new Bu.default;ye.arrayDiff=ge;ge.tokenize=function(e){return e.slice()};ge.join=ge.removeEmpty=function(e){return e};function ku(e,t,r){return ge.diff(e,t,r)}});var Re=Me((Xs,en)=>{"use strict";var Qr=new Proxy(String,{get:()=>Qr});en.exports=Qr});var xn={};We(xn,{default:()=>Co,shouldHighlight:()=>Eo});var Eo,Co,bn=Eu(()=>{Eo=()=>!1,Co=String});var Pn=Me(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.codeFrameColumns=vn;Et.default=Bo;var wn=(bn(),Cu(xn)),On=ho(Re(),!0);function Tn(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Tn=function(n){return n?r:t})(e)}function ho(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Tn(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&Object.prototype.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,r&&r.set(e,n),n}var Ht;function go(e){if(e){var t;return(t=Ht)!=null||(Ht=new On.default.constructor({enabled:!0,level:1})),Ht}return On.default}var Nn=!1;function yo(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}var Sn=/\r\n|[\n\r\u2028\u2029]/;function Ao(e,t,r){let n=Object.assign({column:0,line:-1},e.start),o=Object.assign({},n,e.end),{linesAbove:u=2,linesBelow:i=3}=r||{},s=n.line,D=n.column,a=o.line,c=o.column,d=Math.max(s-(u+1),0),f=Math.min(t.length,a+i);s===-1&&(d=0),a===-1&&(f=t.length);let p=a-s,l={};if(p)for(let F=0;F<=p;F++){let m=F+s;if(!D)l[m]=!0;else if(F===0){let E=t[m-1].length;l[m]=[D,E-D+1]}else if(F===p)l[m]=[0,c];else{let E=t[m-F].length;l[m]=[0,E]}}else D===c?D?l[s]=[D,0]:l[s]=!0:l[s]=[D,c-D];return{start:d,end:f,markerLines:l}}function vn(e,t,r={}){let n=(r.highlightCode||r.forceColor)&&(0,wn.shouldHighlight)(r),o=go(r.forceColor),u=yo(o),i=(F,m)=>n?F(m):m,s=e.split(Sn),{start:D,end:a,markerLines:c}=Ao(t,s,r),d=t.start&&typeof t.start.column=="number",f=String(a).length,l=(n?(0,wn.default)(e,r):e).split(Sn,a).slice(D,a).map((F,m)=>{let E=D+1+m,g=` ${` ${E}`.slice(-f)} |`,h=c[E],B=!c[E+1];if(h){let Z="";if(Array.isArray(h)){let $=F.slice(0,Math.max(h[0]-1,0)).replace(/[^\t]/g," "),Q=h[1]||1;Z=[` `,i(u.gutter,g.replace(/\d/g," "))," ",$,i(u.marker,"^").repeat(Q)].join(""),B&&r.message&&(Z+=" "+i(u.message,r.message))}return[i(u.marker,">"),i(u.gutter,g),F.length>0?` ${F}`:"",Z].join("")}else return` ${i(u.gutter,g)}${F.length>0?` ${F}`:""}`}).join(` `);return r.message&&!d&&(l=`${" ".repeat(f+1)}${r.message} -${l}`),n?o.reset(l):l}function ao(e,t,r,n={}){if(!En){En=!0;let u="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let i=new Error(u);i.name="DeprecationWarning",console.warn(new Error(u))}}return r=Math.max(r,0),gn(e,{start:{column:r,line:t}},n)}});var tr={};We(tr,{__debug:()=>ri,check:()=>ei,doc:()=>er,format:()=>cu,formatWithCursor:()=>au,getSupportInfo:()=>ti,util:()=>Qt,version:()=>Du});var hu=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},ee=hu;var Kn=he(ir(),1);var M="string",j="array",W="cursor",T="indent",S="align",v="trim",_="group",w="fill",x="if-break",P="indent-if-break",L="line-suffix",I="line-suffix-boundary",A="line",O="label",k="break-parent",Ue=new Set([W,T,S,v,_,w,x,P,L,I,A,O,k]);function xu(e){if(typeof e=="string")return M;if(Array.isArray(e))return j;if(!e)return;let{type:t}=e;if(Ue.has(t))return t}var U=xu;var wu=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function ku(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', -Expected it to be 'string' or 'object'.`;if(U(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=wu([...Ue].map(o=>`'${o}'`));return`Unexpected doc.type '${e.type}'. -Expected it to be ${n}.`}var yt=class extends Error{name="InvalidDocError";constructor(t){super(ku(t)),this.doc=t}},q=yt;var sr={};function bu(e,t,r,n){let o=[e];for(;o.length>0;){let u=o.pop();if(u===sr){r(o.pop());continue}r&&o.push(u,sr);let i=U(u);if(!i)throw new q(u);if((t==null?void 0:t(u))!==!1)switch(i){case j:case w:{let s=i===j?u:u.parts;for(let D=s.length,a=D-1;a>=0;--a)o.push(s[a]);break}case x:o.push(u.flatContents,u.breakContents);break;case _:if(n&&u.expandedStates)for(let s=u.expandedStates.length,D=s-1;D>=0;--D)o.push(u.expandedStates[D]);else o.push(u.contents);break;case S:case T:case P:case O:case L:o.push(u.contents);break;case M:case W:case v:case I:case A:case k:break;default:throw new q(u)}}}var Ae=bu;var Dr=()=>{},z=Dr,ze=Dr;function ie(e){return z(e),{type:T,contents:e}}function oe(e,t){return z(t),{type:S,contents:t,n:e}}function At(e,t={}){return z(e),ze(t.expandedStates,!0),{type:_,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function ar(e){return oe(Number.NEGATIVE_INFINITY,e)}function cr(e){return oe({type:"root"},e)}function lr(e){return oe(-1,e)}function fr(e,t){return At(e[0],{...t,expandedStates:e})}function Ge(e){return ze(e),{type:w,parts:e}}function Fr(e,t="",r={}){return z(e),t!==""&&z(t),{type:x,breakContents:e,flatContents:t,groupId:r.groupId}}function pr(e,t){return z(e),{type:P,contents:e,groupId:t.groupId,negate:t.negate}}function Be(e){return z(e),{type:L,contents:e}}var dr={type:I},le={type:k},mr={type:v},_e={type:A,hard:!0},Bt={type:A,hard:!0,literal:!0},Ke={type:A},Er={type:A,soft:!0},G=[_e,le],He=[Bt,le],xe={type:W};function we(e,t){z(e),ze(t);let r=[];for(let n=0;n0){for(let o=0;o{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},y=Ou;function hr(e){let t=e.indexOf("\r");return t>=0?e.charAt(t+1)===` -`?"crlf":"cr":"lf"}function ke(e){switch(e){case"cr":return"\r";case"crlf":return`\r +${l}`),n?o.reset(l):l}function Bo(e,t,r,n={}){if(!Nn){Nn=!0;let u="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let i=new Error(u);i.name="DeprecationWarning",console.warn(new Error(u))}}return r=Math.max(r,0),vn(e,{start:{column:r,line:t}},n)}});var rr={};We(rr,{__debug:()=>ui,check:()=>ri,doc:()=>Qt,format:()=>lu,formatWithCursor:()=>cu,getSupportInfo:()=>ni,util:()=>tr,version:()=>nu});var gu=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},ee=gu;var Hn=he(sr(),1);function Dr(e){let t=e.indexOf("\r");return t>=0?e.charAt(t+1)===` +`?"crlf":"cr":"lf"}function Ae(e){switch(e){case"cr":return"\r";case"crlf":return`\r `;default:return` -`}}function _t(e,t){let r;switch(t){case` +`}}function yt(e,t){let r;switch(t){case` `:r=/\n/g;break;case"\r":r=/\r/g;break;case`\r -`:r=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}function gr(e){return ee(!1,e,/\r\n?/g,` -`)}var yr=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Ar(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Br(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var _r=e=>!(Ar(e)||Br(e));var Nu=/[^\x20-\x7F]/;function Tu(e){if(!e)return 0;if(!Nu.test(e))return e.length;e=e.replace(yr()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=_r(n)?1:2)}return t}var be=Tu;var kr=e=>{if(Array.isArray(e))return e;if(e.type!==w)throw new Error(`Expect doc to be 'array' or '${w}'.`);return e.parts};function Ne(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=o(u);return r.set(u,i),i}function o(u){switch(U(u)){case j:return t(u.map(n));case w:return t({...u,parts:u.parts.map(n)});case x:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case _:{let{expandedStates:i,contents:s}=u;return i?(i=i.map(n),s=i[0]):s=n(s),t({...u,contents:s,expandedStates:i})}case S:case T:case P:case O:case L:return t({...u,contents:n(u.contents)});case M:case W:case v:case I:case A:case k:return t(u);default:throw new q(u)}}}function Je(e,t,r){let n=r,o=!1;function u(i){if(o)return!1;let s=t(i);s!==void 0&&(o=!0,n=s)}return Ae(e,u),n}function Su(e){if(e.type===_&&e.break||e.type===A&&e.hard||e.type===k)return!0}function br(e){return Je(e,Su,!1)}function xr(e){if(e.length>0){let t=y(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Or(e){let t=new Set,r=[];function n(u){if(u.type===k&&xr(r),u.type===_){if(r.push(u),t.has(u))return!1;t.add(u)}}function o(u){u.type===_&&r.pop().break&&xr(r)}Ae(e,n,o,!0)}function vu(e){return e.type===A&&!e.hard?e.soft?"":" ":e.type===x?e.flatContents:e}function Nr(e){return Ne(e,vu)}function wr(e){for(e=[...e];e.length>=2&&y(!1,e,-2).type===A&&y(!1,e,-1).type===k;)e.length-=2;if(e.length>0){let t=Oe(y(!1,e,-1));e[e.length-1]=t}return e}function Oe(e){switch(U(e)){case S:case T:case P:case _:case L:case O:{let t=Oe(e.contents);return{...e,contents:t}}case x:return{...e,breakContents:Oe(e.breakContents),flatContents:Oe(e.flatContents)};case w:return{...e,parts:wr(e.parts)};case j:return wr(e);case M:return e.replace(/[\n\r]*$/,"");case W:case v:case I:case A:case k:break;default:throw new q(e)}return e}function Xe(e){return Oe(Lu(e))}function Pu(e){switch(U(e)){case w:if(e.parts.every(t=>t===""))return"";break;case _:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===_&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case S:case T:case P:case L:if(!e.contents)return"";break;case x:if(!e.flatContents&&!e.breakContents)return"";break;case j:{let t=[];for(let r of e){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof y(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...o)}return t.length===0?"":t.length===1?t[0]:t}case M:case W:case v:case I:case A:case O:case k:break;default:throw new q(e)}return e}function Lu(e){return Ne(e,t=>Pu(t))}function Tr(e,t=He){return Ne(e,r=>typeof r=="string"?we(t,r.split(` -`)):r)}function Iu(e){if(e.type===A)return!0}function Sr(e){return Je(e,Iu,!1)}function Ze(e,t){return e.type===O?{...e,contents:t(e.contents)}:t(e)}var R=Symbol("MODE_BREAK"),K=Symbol("MODE_FLAT"),Te=Symbol("cursor");function vr(){return{value:"",length:0,queue:[]}}function Ru(e,t){return xt(e,{type:"indent"},t)}function Yu(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||vr():t<0?xt(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:xt(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function xt(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],o="",u=0,i=0,s=0;for(let l of n)switch(l.type){case"indent":c(),r.useTabs?D(1):a(r.tabWidth);break;case"stringAlign":c(),o+=l.n,u+=l.n.length;break;case"numberAlign":i+=1,s+=l.n;break;default:throw new Error(`Unexpected type '${l.type}'`)}return f(),{...e,value:o,length:u,queue:n};function D(l){o+=" ".repeat(l),u+=r.tabWidth*l}function a(l){o+=" ".repeat(l),u+=l}function c(){r.useTabs?d():f()}function d(){i>0&&D(i),p()}function f(){s>0&&a(s),p()}function p(){i=0,s=0}}function wt(e){let t=0,r=0,n=e.length;e:for(;n--;){let o=e[n];if(o===Te){r++;continue}for(let u=o.length-1;u>=0;u--){let i=o[u];if(i===" "||i===" ")t++;else{e[n]=o.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Te);return t}function Qe(e,t,r,n,o,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,s=[e],D=[];for(;r>=0;){if(s.length===0){if(i===0)return!0;s.push(t[--i]);continue}let{mode:a,doc:c}=s.pop();switch(U(c)){case M:D.push(c),r-=be(c);break;case j:case w:{let d=kr(c);for(let f=d.length-1;f>=0;f--)s.push({mode:a,doc:d[f]});break}case T:case S:case P:case O:s.push({mode:a,doc:c.contents});break;case v:r+=wt(D);break;case _:{if(u&&c.break)return!1;let d=c.break?R:a,f=c.expandedStates&&d===R?y(!1,c.expandedStates,-1):c.contents;s.push({mode:d,doc:f});break}case x:{let f=(c.groupId?o[c.groupId]||K:a)===R?c.breakContents:c.flatContents;f&&s.push({mode:a,doc:f});break}case A:if(a===R||c.hard)return!0;c.soft||(D.push(" "),r--);break;case L:n=!0;break;case I:if(n)return!1;break}}return!1}function fe(e,t){let r={},n=t.printWidth,o=ke(t.endOfLine),u=0,i=[{ind:vr(),mode:R,doc:e}],s=[],D=!1,a=[],c=0;for(Or(e);i.length>0;){let{ind:f,mode:p,doc:l}=i.pop();switch(U(l)){case M:{let F=o!==` +`:r=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}function ar(e){return ee(!1,e,/\r\n?/g,` +`)}var M="string",j="array",W="cursor",S="indent",T="align",v="trim",_="group",x="fill",k="if-break",P="indent-if-break",L="line-suffix",I="line-suffix-boundary",A="line",O="label",b="break-parent",Ue=new Set([W,S,T,v,_,x,k,P,L,I,A,O,b]);function xu(e){if(typeof e=="string")return M;if(Array.isArray(e))return j;if(!e)return;let{type:t}=e;if(Ue.has(t))return t}var U=xu;var bu=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function wu(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +Expected it to be 'string' or 'object'.`;if(U(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=bu([...Ue].map(o=>`'${o}'`));return`Unexpected doc.type '${e.type}'. +Expected it to be ${n}.`}var At=class extends Error{name="InvalidDocError";constructor(t){super(wu(t)),this.doc=t}},q=At;var cr={};function Ou(e,t,r,n){let o=[e];for(;o.length>0;){let u=o.pop();if(u===cr){r(o.pop());continue}r&&o.push(u,cr);let i=U(u);if(!i)throw new q(u);if((t==null?void 0:t(u))!==!1)switch(i){case j:case x:{let s=i===j?u:u.parts;for(let D=s.length,a=D-1;a>=0;--a)o.push(s[a]);break}case k:o.push(u.flatContents,u.breakContents);break;case _:if(n&&u.expandedStates)for(let s=u.expandedStates.length,D=s-1;D>=0;--D)o.push(u.expandedStates[D]);else o.push(u.contents);break;case T:case S:case P:case O:case L:o.push(u.contents);break;case M:case W:case v:case I:case A:case b:break;default:throw new q(u)}}}var Be=Ou;var lr=()=>{},z=lr,ze=lr;function ie(e){return z(e),{type:S,contents:e}}function oe(e,t){return z(t),{type:T,contents:t,n:e}}function Bt(e,t={}){return z(e),ze(t.expandedStates,!0),{type:_,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function fr(e){return oe(Number.NEGATIVE_INFINITY,e)}function Fr(e){return oe({type:"root"},e)}function pr(e){return oe(-1,e)}function dr(e,t){return Bt(e[0],{...t,expandedStates:e})}function Ge(e){return ze(e),{type:x,parts:e}}function mr(e,t="",r={}){return z(e),t!==""&&z(t),{type:k,breakContents:e,flatContents:t,groupId:r.groupId}}function Er(e,t){return z(e),{type:P,contents:e,groupId:t.groupId,negate:t.negate}}function _e(e){return z(e),{type:L,contents:e}}var Cr={type:I},le={type:b},hr={type:v},ke={type:A,hard:!0},_t={type:A,hard:!0,literal:!0},Ke={type:A},gr={type:A,soft:!0},G=[ke,le],He=[_t,le],xe={type:W};function be(e,t){z(e),ze(t);let r=[];for(let n=0;n0){for(let o=0;o0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${n(u.contents)}${d})`}if(u.type===_){let c=[];u.break&&u.break!=="propagated"&&c.push("shouldBreak: true"),u.id&&c.push(`id: ${o(u.id)}`);let d=c.length>0?`, { ${c.join(", ")} }`:"";return u.expandedStates?`conditionalGroup([${u.expandedStates.map(f=>n(f)).join(",")}]${d})`:`group(${n(u.contents)}${d})`}if(u.type===x)return`fill([${u.parts.map(c=>n(c)).join(", ")}])`;if(u.type===L)return"lineSuffix("+n(u.contents)+")";if(u.type===I)return"lineSuffixBoundary";if(u.type===O)return`label(${JSON.stringify(u.label)}, ${n(u.contents)})`;throw new Error("Unknown doc type "+u.type)}function o(u){if(typeof u!="symbol")return JSON.stringify(String(u));if(u in t)return t[u];let i=u.description||"symbol";for(let s=0;;s++){let D=i+(s>0?` #${s}`:"");if(!r.has(D))return r.add(D),t[u]=`Symbol.for(${JSON.stringify(D)})`}}}var Nu=(e,t,r)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},y=Nu;var Br=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function _r(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function kr(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var xr=e=>!(_r(e)||kr(e));var Su=/[^\x20-\x7F]/;function Tu(e){if(!e)return 0;if(!Su.test(e))return e.length;e=e.replace(Br()," ");let t=0;for(let r of e){let n=r.codePointAt(0);n<=31||n>=127&&n<=159||n>=768&&n<=879||(t+=xr(n)?1:2)}return t}var we=Tu;var Or=e=>{if(Array.isArray(e))return e;if(e.type!==x)throw new Error(`Expect doc to be 'array' or '${x}'.`);return e.parts};function Ne(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){if(r.has(u))return r.get(u);let i=o(u);return r.set(u,i),i}function o(u){switch(U(u)){case j:return t(u.map(n));case x:return t({...u,parts:u.parts.map(n)});case k:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case _:{let{expandedStates:i,contents:s}=u;return i?(i=i.map(n),s=i[0]):s=n(s),t({...u,contents:s,expandedStates:i})}case T:case S:case P:case O:case L:return t({...u,contents:n(u.contents)});case M:case W:case v:case I:case A:case b:return t(u);default:throw new q(u)}}}function Je(e,t,r){let n=r,o=!1;function u(i){if(o)return!1;let s=t(i);s!==void 0&&(o=!0,n=s)}return Be(e,u),n}function vu(e){if(e.type===_&&e.break||e.type===A&&e.hard||e.type===b)return!0}function Nr(e){return Je(e,vu,!1)}function br(e){if(e.length>0){let t=y(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Sr(e){let t=new Set,r=[];function n(u){if(u.type===b&&br(r),u.type===_){if(r.push(u),t.has(u))return!1;t.add(u)}}function o(u){u.type===_&&r.pop().break&&br(r)}Be(e,n,o,!0)}function Pu(e){return e.type===A&&!e.hard?e.soft?"":" ":e.type===k?e.flatContents:e}function Tr(e){return Ne(e,Pu)}function wr(e){for(e=[...e];e.length>=2&&y(!1,e,-2).type===A&&y(!1,e,-1).type===b;)e.length-=2;if(e.length>0){let t=Oe(y(!1,e,-1));e[e.length-1]=t}return e}function Oe(e){switch(U(e)){case T:case S:case P:case _:case L:case O:{let t=Oe(e.contents);return{...e,contents:t}}case k:return{...e,breakContents:Oe(e.breakContents),flatContents:Oe(e.flatContents)};case x:return{...e,parts:wr(e.parts)};case j:return wr(e);case M:return e.replace(/[\n\r]*$/,"");case W:case v:case I:case A:case b:break;default:throw new q(e)}return e}function Xe(e){return Oe(Iu(e))}function Lu(e){switch(U(e)){case x:if(e.parts.every(t=>t===""))return"";break;case _:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===_&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case T:case S:case P:case L:if(!e.contents)return"";break;case k:if(!e.flatContents&&!e.breakContents)return"";break;case j:{let t=[];for(let r of e){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof y(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...o)}return t.length===0?"":t.length===1?t[0]:t}case M:case W:case v:case I:case A:case O:case b:break;default:throw new q(e)}return e}function Iu(e){return Ne(e,t=>Lu(t))}function vr(e,t=He){return Ne(e,r=>typeof r=="string"?be(t,r.split(` +`)):r)}function Ru(e){if(e.type===A)return!0}function Pr(e){return Je(e,Ru,!1)}function Ze(e,t){return e.type===O?{...e,contents:t(e.contents)}:t(e)}var R=Symbol("MODE_BREAK"),K=Symbol("MODE_FLAT"),Se=Symbol("cursor");function Lr(){return{value:"",length:0,queue:[]}}function Yu(e,t){return kt(e,{type:"indent"},t)}function ju(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||Lr():t<0?kt(e,{type:"dedent"},r):t?t.type==="root"?{...e,root:e}:kt(e,{type:typeof t=="string"?"stringAlign":"numberAlign",n:t},r):e}function kt(e,t,r){let n=t.type==="dedent"?e.queue.slice(0,-1):[...e.queue,t],o="",u=0,i=0,s=0;for(let l of n)switch(l.type){case"indent":c(),r.useTabs?D(1):a(r.tabWidth);break;case"stringAlign":c(),o+=l.n,u+=l.n.length;break;case"numberAlign":i+=1,s+=l.n;break;default:throw new Error(`Unexpected type '${l.type}'`)}return f(),{...e,value:o,length:u,queue:n};function D(l){o+=" ".repeat(l),u+=r.tabWidth*l}function a(l){o+=" ".repeat(l),u+=l}function c(){r.useTabs?d():f()}function d(){i>0&&D(i),p()}function f(){s>0&&a(s),p()}function p(){i=0,s=0}}function xt(e){let t=0,r=0,n=e.length;e:for(;n--;){let o=e[n];if(o===Se){r++;continue}for(let u=o.length-1;u>=0;u--){let i=o[u];if(i===" "||i===" ")t++;else{e[n]=o.slice(0,u+1);break e}}}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Se);return t}function Qe(e,t,r,n,o,u){if(r===Number.POSITIVE_INFINITY)return!0;let i=t.length,s=[e],D=[];for(;r>=0;){if(s.length===0){if(i===0)return!0;s.push(t[--i]);continue}let{mode:a,doc:c}=s.pop();switch(U(c)){case M:D.push(c),r-=we(c);break;case j:case x:{let d=Or(c);for(let f=d.length-1;f>=0;f--)s.push({mode:a,doc:d[f]});break}case S:case T:case P:case O:s.push({mode:a,doc:c.contents});break;case v:r+=xt(D);break;case _:{if(u&&c.break)return!1;let d=c.break?R:a,f=c.expandedStates&&d===R?y(!1,c.expandedStates,-1):c.contents;s.push({mode:d,doc:f});break}case k:{let f=(c.groupId?o[c.groupId]||K:a)===R?c.breakContents:c.flatContents;f&&s.push({mode:a,doc:f});break}case A:if(a===R||c.hard)return!0;c.soft||(D.push(" "),r--);break;case L:n=!0;break;case I:if(n)return!1;break}}return!1}function fe(e,t){let r={},n=t.printWidth,o=Ae(t.endOfLine),u=0,i=[{ind:Lr(),mode:R,doc:e}],s=[],D=!1,a=[],c=0;for(Sr(e);i.length>0;){let{ind:f,mode:p,doc:l}=i.pop();switch(U(l)){case M:{let F=o!==` `?ee(!1,l,` -`,o):l;s.push(F),i.length>0&&(u+=be(F));break}case j:for(let F=l.length-1;F>=0;F--)i.push({ind:f,mode:p,doc:l[F]});break;case W:if(c>=2)throw new Error("There are too many 'cursor' in doc.");s.push(Te),c++;break;case T:i.push({ind:Ru(f,t),mode:p,doc:l.contents});break;case S:i.push({ind:Yu(f,l.n,t),mode:p,doc:l.contents});break;case v:u-=wt(s);break;case _:switch(p){case K:if(!D){i.push({ind:f,mode:l.break?R:K,doc:l.contents});break}case R:{D=!1;let F={ind:f,mode:K,doc:l.contents},m=n-u,E=a.length>0;if(!l.break&&Qe(F,i,m,E,r))i.push(F);else if(l.expandedStates){let C=y(!1,l.expandedStates,-1);if(l.break){i.push({ind:f,mode:R,doc:C});break}else for(let g=1;g=l.expandedStates.length){i.push({ind:f,mode:R,doc:C});break}else{let h=l.expandedStates[g],B={ind:f,mode:K,doc:h};if(Qe(B,i,m,E,r)){i.push(B);break}}}else i.push({ind:f,mode:R,doc:l.contents});break}}l.id&&(r[l.id]=y(!1,i,-1).mode);break;case w:{let F=n-u,{parts:m}=l;if(m.length===0)break;let[E,C]=m,g={ind:f,mode:K,doc:E},h={ind:f,mode:R,doc:E},B=Qe(g,[],F,a.length>0,r,!0);if(m.length===1){B?i.push(g):i.push(h);break}let Z={ind:f,mode:K,doc:C},$={ind:f,mode:R,doc:C};if(m.length===2){B?i.push(Z,g):i.push($,h);break}m.splice(0,2);let Q={ind:f,mode:p,doc:Ge(m)},rr=m[0];Qe({ind:f,mode:K,doc:[E,C,rr]},[],F,a.length>0,r,!0)?i.push(Q,Z,g):B?i.push(Q,$,g):i.push(Q,$,h);break}case x:case P:{let F=l.groupId?r[l.groupId]:p;if(F===R){let m=l.type===x?l.breakContents:l.negate?l.contents:ie(l.contents);m&&i.push({ind:f,mode:p,doc:m})}if(F===K){let m=l.type===x?l.flatContents:l.negate?ie(l.contents):l.contents;m&&i.push({ind:f,mode:p,doc:m})}break}case L:a.push({ind:f,mode:p,doc:l.contents});break;case I:a.length>0&&i.push({ind:f,mode:p,doc:_e});break;case A:switch(p){case K:if(l.hard)D=!0;else{l.soft||(s.push(" "),u+=1);break}case R:if(a.length>0){i.push({ind:f,mode:p,doc:l},...a.reverse()),a.length=0;break}l.literal?f.root?(s.push(o,f.root.value),u=f.root.length):(s.push(o),u=0):(u-=wt(s),s.push(o+f.value),u=f.length);break}break;case O:i.push({ind:f,mode:p,doc:l.contents});break;case k:break;default:throw new q(l)}i.length===0&&a.length>0&&(i.push(...a.reverse()),a.length=0)}let d=s.indexOf(Te);if(d!==-1){let f=s.indexOf(Te,d+1),p=s.slice(0,d).join(""),l=s.slice(d+1,f).join(""),F=s.slice(f+1).join("");return{formatted:p+l+F,cursorNodeStart:p.length,cursorNodeText:l}}return{formatted:s.join("")}}function J(e){var t;if(!e)return"";if(Array.isArray(e)){let r=[];for(let n of e)if(Array.isArray(n))r.push(...J(n));else{let o=J(n);o!==""&&r.push(o)}return r}return e.type===x?{...e,breakContents:J(e.breakContents),flatContents:J(e.flatContents)}:e.type===_?{...e,contents:J(e.contents),expandedStates:(t=e.expandedStates)==null?void 0:t.map(J)}:e.type===w?{type:"fill",parts:e.parts.map(J)}:e.contents?{...e,contents:J(e.contents)}:e}function Pr(e){let t=Object.create(null),r=new Set;return n(J(e));function n(u,i,s){var D,a;if(typeof u=="string")return JSON.stringify(u);if(Array.isArray(u)){let c=u.map(n).filter(Boolean);return c.length===1?c[0]:`[${c.join(", ")}]`}if(u.type===A){let c=((D=s==null?void 0:s[i+1])==null?void 0:D.type)===k;return u.literal?c?"literalline":"literallineWithoutBreakParent":u.hard?c?"hardline":"hardlineWithoutBreakParent":u.soft?"softline":"line"}if(u.type===k)return((a=s==null?void 0:s[i-1])==null?void 0:a.type)===A&&s[i-1].hard?void 0:"breakParent";if(u.type===v)return"trim";if(u.type===T)return"indent("+n(u.contents)+")";if(u.type===S)return u.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+n(u.contents)+")":u.n<0?"dedent("+n(u.contents)+")":u.n.type==="root"?"markAsRoot("+n(u.contents)+")":"align("+JSON.stringify(u.n)+", "+n(u.contents)+")";if(u.type===x)return"ifBreak("+n(u.breakContents)+(u.flatContents?", "+n(u.flatContents):"")+(u.groupId?(u.flatContents?"":', ""')+`, { groupId: ${o(u.groupId)} }`:"")+")";if(u.type===P){let c=[];u.negate&&c.push("negate: true"),u.groupId&&c.push(`groupId: ${o(u.groupId)}`);let d=c.length>0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${n(u.contents)}${d})`}if(u.type===_){let c=[];u.break&&u.break!=="propagated"&&c.push("shouldBreak: true"),u.id&&c.push(`id: ${o(u.id)}`);let d=c.length>0?`, { ${c.join(", ")} }`:"";return u.expandedStates?`conditionalGroup([${u.expandedStates.map(f=>n(f)).join(",")}]${d})`:`group(${n(u.contents)}${d})`}if(u.type===w)return`fill([${u.parts.map(c=>n(c)).join(", ")}])`;if(u.type===L)return"lineSuffix("+n(u.contents)+")";if(u.type===I)return"lineSuffixBoundary";if(u.type===O)return`label(${JSON.stringify(u.label)}, ${n(u.contents)})`;throw new Error("Unknown doc type "+u.type)}function o(u){if(typeof u!="symbol")return JSON.stringify(String(u));if(u in t)return t[u];let i=u.description||"symbol";for(let s=0;;s++){let D=i+(s>0?` #${s}`:"");if(!r.has(D))return r.add(D),t[u]=`Symbol.for(${JSON.stringify(D)})`}}}function ju(e,t,r=0){let n=0;for(let o=r;otypeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). -The range will extend forwards to the end of the selected statement. -This option cannot be used with --cursor-offset.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. -The range will extend backwards to the start of the first line containing the selected statement. -This option cannot be used with --cursor-offset.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment -in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"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."}]}};function et({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(o=>o.languages??[]),n=[];for(let o of $u(Object.assign({},...e.map(({options:u})=>u),Lr)))!t&&o.deprecated||(Array.isArray(o.choices)&&(t||(o.choices=o.choices.filter(u=>!u.deprecated)),o.name==="parser"&&(o.choices=[...o.choices,...Vu(o.choices,r,e)])),o.pluginDefaults=Object.fromEntries(e.filter(u=>{var i;return((i=u.defaultOptions)==null?void 0:i[o.name])!==void 0}).map(u=>[u.name,u.defaultOptions[o.name]])),n.push(o));return{languages:r,options:n}}function*Vu(e,t,r){let n=new Set(e.map(o=>o.value));for(let o of t)if(o.parsers){for(let u of o.parsers)if(!n.has(u)){n.add(u);let i=r.find(D=>D.parsers&&Object.prototype.hasOwnProperty.call(D.parsers,u)),s=o.name;i!=null&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:u,description:s}}}}function $u(e){let t=[];for(let[r,n]of Object.entries(e)){let o={name:r,...n};Array.isArray(o.default)&&(o.default=y(!1,o.default,-1).value),t.push(o)}return t}var Mu=e=>String(e).split(/[/\\]/).pop();function Ir(e,t){if(!t)return;let r=Mu(t).toLowerCase();return e.find(n=>{var o,u;return((o=n.extensions)==null?void 0:o.some(i=>r.endsWith(i)))||((u=n.filenames)==null?void 0:u.some(i=>i.toLowerCase()===r))})}function Wu(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function Uu(e,t){let r=e.plugins.flatMap(o=>o.languages??[]),n=Wu(r,t.language)??Ir(r,t.physicalFile)??Ir(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Rr=Uu;var te={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>te.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${te.key(r)}: ${te.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>te.value({[e]:t})};var kt=he(Pe(),1),Vr=(e,t,{descriptor:r})=>{let n=[`${kt.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${kt.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."};var se=he(Pe(),1);var tt=Symbol.for("vnopts.VALUE_NOT_EXIST"),pe=Symbol.for("vnopts.VALUE_UNCHANGED");var $r=" ".repeat(2),Wr=(e,t,r)=>{let{text:n,list:o}=r.normalizeExpectedResult(r.schemas[e].expected(r)),u=[];return n&&u.push(Mr(e,t,n,r.descriptor)),o&&u.push([Mr(e,t,o.title,r.descriptor)].concat(o.values.map(i=>Ur(i,r.loggerPrintWidth))).join(` -`)),zr(u,r.loggerPrintWidth)};function Mr(e,t,r,n){return[`Invalid ${se.default.red(n.key(e))} value.`,`Expected ${se.default.blue(r)},`,`but received ${t===tt?se.default.gray("nothing"):se.default.red(n.value(t))}.`].join(" ")}function Ur({text:e,list:t},r){let n=[];return e&&n.push(`- ${se.default.blue(e)}`),t&&n.push([`- ${se.default.blue(t.title)}:`].concat(t.values.map(o=>Ur(o,r-$r.length).replace(/^|\n/g,`$&${$r}`))).join(` -`)),zr(n,r)}function zr(e,t){if(e.length===1)return e[0];let[r,n]=e,[o,u]=e.map(i=>i.split(` -`,1)[0].length);return o>t&&o>u?n:r}var Nt=he(Pe(),1);var bt=[],Gr=[];function Ot(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,o=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-o);)n--,o--;let u=0;for(;us?a>s?s+1:a:a>D?D+1:a;return s}var rt=(e,t,{descriptor:r,logger:n,schemas:o})=>{let u=[`Ignored unknown option ${Nt.default.yellow(r.pair({key:e,value:t}))}.`],i=Object.keys(o).sort().find(s=>Ot(e,s)<3);i&&u.push(`Did you mean ${Nt.default.blue(r.key(i))}?`),n.warn(u.join(" "))};var zu=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function Gu(e,t){let r=new e(t),n=Object.create(r);for(let o of zu)o in t&&(n[o]=Ku(t[o],r,b.prototype[o].length));return n}var b=class{static create(t){return Gu(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return pe}};function Ku(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var nt=class extends b{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}};var ut=class extends b{expected(){return"anything"}validate(){return!0}};var ot=class extends b{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let o of t){let u=r.normalizeValidateResult(this._valueSchema.validate(o,r),o);u!==!0&&n.push(u.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let o of t){let u=r.normalizeDeprecatedResult(this._valueSchema.deprecated(o,r),o);u!==!1&&n.push(...u.map(({value:i})=>({value:[i]})))}return n}forward(t,r){let n=[];for(let o of t){let u=r.normalizeForwardResult(this._valueSchema.forward(o,r),o);n.push(...u.map(Kr))}return n}redirect(t,r){let n=[],o=[];for(let u of t){let i=r.normalizeRedirectResult(this._valueSchema.redirect(u,r),u);"remain"in i&&n.push(i.remain),o.push(...i.redirect.map(Kr))}return n.length===0?{redirect:o}:{redirect:o,remain:n}}overlap(t,r){return t.concat(r)}};function Kr({from:e,to:t}){return{from:[e],to:t}}var it=class extends b{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function qr(e,t){let r=Object.create(null);for(let n of e){let o=n[t];if(r[o])throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r[o]=n}return r}function Jr(e,t){let r=new Map;for(let n of e){let o=n[t];if(r.has(o))throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r.set(o,n)}return r}function Xr(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function Zr(e,t){let r=[],n=[];for(let o of e)t(o)?r.push(o):n.push(o);return[r,n]}function Qr(e){return e===Math.floor(e)}function en(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,o=["undefined","object","boolean","number","string"];return r!==n?o.indexOf(r)-o.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function tn(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function Tt(e){return e===void 0?{}:e}function St(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return Hu((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(St)}}:{text:t}}function vt(e,t){return e===!0?!0:e===!1?{value:t}:e}function Pt(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function Hr(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function st(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>Hr(r,t)):[Hr(e,t)]}function Lt(e,t){let r=st(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function Hu(e,t){if(!e)throw new Error(t)}var Dt=class extends b{constructor(t){super(t),this._choices=Jr(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(en).map(t.value),n=r.slice(0,-2),o=r.slice(-2);return{text:n.concat(o.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}};var at=class extends b{expected(){return"a number"}validate(t,r){return typeof t=="number"}};var ct=class extends at{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&Qr(t)}};var Le=class extends b{expected(){return"a string"}validate(t){return typeof t=="string"}};var rn=te,nn=rt,un=Wr,on=Vr;var lt=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:o=80,descriptor:u=rn,unknown:i=nn,invalid:s=un,deprecated:D=on,missing:a=()=>!1,required:c=()=>!1,preprocess:d=p=>p,postprocess:f=()=>pe}=r||{};this._utils={descriptor:u,logger:n||{warn:()=>{}},loggerPrintWidth:o,schemas:qr(t,"name"),normalizeDefaultResult:Tt,normalizeExpectedResult:St,normalizeDeprecatedResult:Pt,normalizeForwardResult:st,normalizeRedirectResult:Lt,normalizeValidateResult:vt},this._unknownHandler=i,this._invalidHandler=tn(s),this._deprecatedHandler=D,this._identifyMissing=(p,l)=>!(p in l)||a(p,l),this._identifyRequired=c,this._preprocess=d,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Xr()}normalize(t){let r={},o=[this._preprocess(t,this._utils)],u=()=>{for(;o.length!==0;){let i=o.shift(),s=this._applyNormalization(i,r);o.push(...s)}};u();for(let i of Object.keys(this._utils.schemas)){let s=this._utils.schemas[i];if(!(i in r)){let D=Tt(s.default(this._utils));"value"in D&&o.push({[i]:D.value})}}u();for(let i of Object.keys(this._utils.schemas)){if(!(i in r))continue;let s=this._utils.schemas[i],D=r[i],a=s.postprocess(D,this._utils);a!==pe&&(this._applyValidation(a,i,s),r[i]=a)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:o,unknownKeys:u}=this._partitionOptionKeys(t);for(let i of o){let s=this._utils.schemas[i],D=s.preprocess(t[i],this._utils);this._applyValidation(D,i,s);let a=({from:p,to:l})=>{n.push(typeof l=="string"?{[l]:p}:{[l.key]:l.value})},c=({value:p,redirectTo:l})=>{let F=Pt(s.deprecated(p,this._utils),D,!0);if(F!==!1)if(F===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,l,this._utils));else for(let{value:m}of F){let E={key:i,value:m};if(!this._hasDeprecationWarned(E)){let C=typeof l=="string"?{key:l,value:m}:l;this._utils.logger.warn(this._deprecatedHandler(E,C,this._utils))}}};st(s.forward(D,this._utils),D).forEach(a);let f=Lt(s.redirect(D,this._utils),D);if(f.redirect.forEach(a),"remain"in f){let p=f.remain;r[i]=i in r?s.overlap(r[i],p,this._utils):p,c({value:p})}for(let{from:p,to:l}of f.redirect)c({value:p,redirectTo:l})}for(let i of u){let s=t[i];this._applyUnknownHandler(i,s,r,(D,a)=>{n.push({[D]:a})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,tt,this._utils)}_partitionOptionKeys(t){let[r,n]=Zr(Object.keys(t).filter(o=>!this._identifyMissing(o,t)),o=>o in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let o=vt(n.validate(t,this._utils),t);if(o!==!0)throw this._invalidHandler(r,o.value,this._utils)}_applyUnknownHandler(t,r,n,o){let u=this._unknownHandler(t,r,this._utils);if(u)for(let i of Object.keys(u)){if(this._identifyMissing(i,u))continue;let s=u[i];i in this._utils.schemas?o(i,s):n[i]=s}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==pe){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:o}=this._partitionOptionKeys(r.override);for(let u of n){let i=r.override[u];this._applyValidation(i,u,this._utils.schemas[u]),t[u]=i}for(let u of o){let i=r.override[u];this._applyUnknownHandler(u,i,t,(s,D)=>{let a=this._utils.schemas[s];this._applyValidation(D,s,a),t[s]=D})}}}}};var It;function Ju(e,t,{logger:r=!1,isCLI:n=!1,passThrough:o=!1,FlagSchema:u,descriptor:i}={}){if(n){if(!u)throw new Error("'FlagSchema' option is required.");if(!i)throw new Error("'descriptor' option is required.")}else i=te;let s=o?Array.isArray(o)?(f,p)=>o.includes(f)?{[f]:p}:void 0:(f,p)=>({[f]:p}):(f,p,l)=>{let{_:F,...m}=l.schemas;return rt(f,p,{...l,schemas:m})},D=Xu(t,{isCLI:n,FlagSchema:u}),a=new lt(D,{logger:r,unknown:s,descriptor:i}),c=r!==!1;c&&It&&(a._hasDeprecationWarned=It);let d=a.normalize(e);return c&&(It=a._hasDeprecationWarned),d}function Xu(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(ut.create({name:"_"}));for(let o of e)n.push(Zu(o,{isCLI:t,optionInfos:e,FlagSchema:r})),o.alias&&t&&n.push(nt.create({name:o.alias,sourceName:o.name}));return n}function Zu(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:o}=e,u={name:o},i,s={};switch(e.type){case"int":i=ct,t&&(u.preprocess=Number);break;case"string":i=Le;break;case"choice":i=Dt,u.choices=e.choices.map(D=>D!=null&&D.redirect?{...D,redirect:{to:{key:e.name,value:D.redirect}}}:D);break;case"boolean":i=it;break;case"flag":i=n,u.flags=r.flatMap(D=>[D.alias,D.description&&D.name,D.oppositeDescription&&`no-${D.name}`].filter(Boolean));break;case"path":i=Le;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?u.validate=(D,a,c)=>e.exception(D)||a.validate(D,c):u.validate=(D,a,c)=>D===void 0||a.validate(D,c),e.redirect&&(s.redirect=D=>D?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let D=u.preprocess||(a=>a);u.preprocess=(a,c,d)=>c.preprocess(D(Array.isArray(a)?y(!1,a,-1):a),d)}return e.array?ot.create({...t?{preprocess:D=>Array.isArray(D)?D:[D]}:{},...s,valueSchema:i.create(u)}):i.create({...u,...s})}var sn=Ju;function Rt(e,t){if(!t)throw new Error("parserName is required.");for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.parsers&&Object.prototype.hasOwnProperty.call(o.parsers,t))return o}let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Se(r)}function Dn(e,t){if(!t)throw new Error("astFormat is required.");for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.printers&&Object.prototype.hasOwnProperty.call(o.printers,t))return o}let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new Se(r)}function ft({plugins:e,parser:t}){let r=Rt(e,t);return Yt(r,t)}function Yt(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function an(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var cn={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function Qu(e,t={}){var d;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=Rr(r,{physicalFile:r.filepath}),!r.parser)throw new ve(`No parser could be inferred for file "${r.filepath}".`)}else throw new ve("No parser and no file path given, couldn't infer a parser.");let n=et({plugins:e.plugins,showDeprecated:!0}).options,o={...cn,...Object.fromEntries(n.filter(f=>f.default!==void 0).map(f=>[f.name,f.default]))},u=Rt(r.plugins,r.parser),i=await Yt(u,r.parser);r.astFormat=i.astFormat,r.locEnd=i.locEnd,r.locStart=i.locStart;let s=(d=u.printers)!=null&&d[i.astFormat]?u:Dn(r.plugins,i.astFormat),D=await an(s,i.astFormat);r.printer=D;let a=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,f])=>f!==void 0)):{},c={...o,...a};for(let[f,p]of Object.entries(c))(r[f]===null||r[f]===void 0)&&(r[f]=p);return r.parser==="json"&&(r.trailingComma="none"),sn(r,n,{passThrough:Object.keys(cn),...t})}var re=Qu;var ln=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),eo=e=>Object.keys(e).filter(t=>!ln.has(t));function to(e){return e?t=>e(t,ln):eo}var H=to;function ro(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let o=H(n),u=r.ignoredProperties??new Set;return i(e);function i(s,D){if(!(s!==null&&typeof s=="object"))return s;if(Array.isArray(s))return s.map(f=>i(f,D)).filter(Boolean);let a={},c=new Set(o(s));for(let f in s)!Object.prototype.hasOwnProperty.call(s,f)||u.has(f)||(c.has(f)?a[f]=i(s[f],s):a[f]=s[f]);let d=r(s,a,D);if(d!==null)return d??a}}var fn=ro;var An=he(yn(),1);async function co(e,t){let r=await ft(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let o;try{o=await r.parse(n,t,t)}catch(u){lo(u,e)}return{text:n,ast:o}}function lo(e,t){let{loc:r}=e;if(r){let n=(0,An.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` -`+n,e.codeFrame=n,e}throw e}var De=co;var Ie,$t,de,pt,Vt=class{constructor(t){ht(this,Ie);ht(this,de);this.stack=[t]}get key(){let{stack:t,siblings:r}=this;return y(!1,t,r===null?-2:-4)??null}get index(){return this.siblings===null?null:y(!1,this.stack,-2)}get node(){return y(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:t}=this,r=y(!1,t,-3);return Array.isArray(r)?r:null}get next(){let{siblings:t}=this;return t===null?null:t[this.index+1]}get previous(){let{siblings:t}=this;return t===null?null:t[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:t,index:r}=this;return t!==null&&r===t.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...ce(this,de,pt).call(this)]}getName(){let{stack:t}=this,{length:r}=t;return r>1?y(!1,t,-2):null}getValue(){return y(!1,this.stack,-1)}getNode(t=0){let r=ce(this,Ie,$t).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:o}=n,u=y(!1,n,-1);for(let i of r)u=u[i],n.push(i,u);try{return t(this)}finally{n.length=o}}callParent(t,r=0){let n=ce(this,Ie,$t).call(this,r+1),o=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...o)}}each(t,...r){let{stack:n}=this,{length:o}=n,u=y(!1,n,-1);for(let i of r)u=u[i],n.push(i,u);try{for(let i=0;i{n[u]=t(o,u,i)},...r),n}match(...t){let r=this.stack.length-1,n=null,o=this.stack[r--];for(let u of t){if(o===void 0)return!1;let i=null;if(typeof n=="number"&&(i=n,n=this.stack[r--],o=this.stack[r--]),u&&!u(o,n,i))return!1;n=this.stack[r--],o=this.stack[r--]}return!0}findAncestor(t){for(let r of ce(this,de,pt).call(this))if(t(r))return r}hasAncestor(t){for(let r of ce(this,de,pt).call(this))if(t(r))return!0;return!1}};Ie=new WeakSet,$t=function(t){let{stack:r}=this;for(let n=r.length-1;n>=0;n-=2)if(!Array.isArray(r[n])&&--t<0)return n;return-1},de=new WeakSet,pt=function*(){let{stack:t}=this;for(let r=t.length-3;r>=0;r-=2){let n=t[r];Array.isArray(n)||(yield n)}};var Bn=Vt;var _n=new Proxy(()=>{},{get:()=>_n}),Re=_n;function me(e){return(t,r,n)=>{let o=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:u}=t,i=r;for(;i>=0&&i0&&(u+=we(F));break}case j:for(let F=l.length-1;F>=0;F--)i.push({ind:f,mode:p,doc:l[F]});break;case W:if(c>=2)throw new Error("There are too many 'cursor' in doc.");s.push(Se),c++;break;case S:i.push({ind:Yu(f,t),mode:p,doc:l.contents});break;case T:i.push({ind:ju(f,l.n,t),mode:p,doc:l.contents});break;case v:u-=xt(s);break;case _:switch(p){case K:if(!D){i.push({ind:f,mode:l.break?R:K,doc:l.contents});break}case R:{D=!1;let F={ind:f,mode:K,doc:l.contents},m=n-u,E=a.length>0;if(!l.break&&Qe(F,i,m,E,r))i.push(F);else if(l.expandedStates){let C=y(!1,l.expandedStates,-1);if(l.break){i.push({ind:f,mode:R,doc:C});break}else for(let g=1;g=l.expandedStates.length){i.push({ind:f,mode:R,doc:C});break}else{let h=l.expandedStates[g],B={ind:f,mode:K,doc:h};if(Qe(B,i,m,E,r)){i.push(B);break}}}else i.push({ind:f,mode:R,doc:l.contents});break}}l.id&&(r[l.id]=y(!1,i,-1).mode);break;case x:{let F=n-u,{parts:m}=l;if(m.length===0)break;let[E,C]=m,g={ind:f,mode:K,doc:E},h={ind:f,mode:R,doc:E},B=Qe(g,[],F,a.length>0,r,!0);if(m.length===1){B?i.push(g):i.push(h);break}let Z={ind:f,mode:K,doc:C},$={ind:f,mode:R,doc:C};if(m.length===2){B?i.push(Z,g):i.push($,h);break}m.splice(0,2);let Q={ind:f,mode:p,doc:Ge(m)},nr=m[0];Qe({ind:f,mode:K,doc:[E,C,nr]},[],F,a.length>0,r,!0)?i.push(Q,Z,g):B?i.push(Q,$,g):i.push(Q,$,h);break}case k:case P:{let F=l.groupId?r[l.groupId]:p;if(F===R){let m=l.type===k?l.breakContents:l.negate?l.contents:ie(l.contents);m&&i.push({ind:f,mode:p,doc:m})}if(F===K){let m=l.type===k?l.flatContents:l.negate?ie(l.contents):l.contents;m&&i.push({ind:f,mode:p,doc:m})}break}case L:a.push({ind:f,mode:p,doc:l.contents});break;case I:a.length>0&&i.push({ind:f,mode:p,doc:ke});break;case A:switch(p){case K:if(l.hard)D=!0;else{l.soft||(s.push(" "),u+=1);break}case R:if(a.length>0){i.push({ind:f,mode:p,doc:l},...a.reverse()),a.length=0;break}l.literal?f.root?(s.push(o,f.root.value),u=f.root.length):(s.push(o),u=0):(u-=xt(s),s.push(o+f.value),u=f.length);break}break;case O:i.push({ind:f,mode:p,doc:l.contents});break;case b:break;default:throw new q(l)}i.length===0&&a.length>0&&(i.push(...a.reverse()),a.length=0)}let d=s.indexOf(Se);if(d!==-1){let f=s.indexOf(Se,d+1),p=s.slice(0,d).join(""),l=s.slice(d+1,f).join(""),F=s.slice(f+1).join("");return{formatted:p+l+F,cursorNodeStart:p.length,cursorNodeText:l}}return{formatted:s.join("")}}function Vu(e,t,r=0){let n=0;for(let o=r;o1?y(!1,t,-2):null}getValue(){return y(!1,this.stack,-1)}getNode(t=0){let r=ce(this,Te,wt).call(this,t);return r===-1?null:this.stack[r]}getParentNode(t=0){return this.getNode(t+1)}call(t,...r){let{stack:n}=this,{length:o}=n,u=y(!1,n,-1);for(let i of r)u=u[i],n.push(i,u);try{return t(this)}finally{n.length=o}}callParent(t,r=0){let n=ce(this,Te,wt).call(this,r+1),o=this.stack.splice(n+1);try{return t(this)}finally{this.stack.push(...o)}}each(t,...r){let{stack:n}=this,{length:o}=n,u=y(!1,n,-1);for(let i of r)u=u[i],n.push(i,u);try{for(let i=0;i{n[u]=t(o,u,i)},...r),n}match(...t){let r=this.stack.length-1,n=null,o=this.stack[r--];for(let u of t){if(o===void 0)return!1;let i=null;if(typeof n=="number"&&(i=n,n=this.stack[r--],o=this.stack[r--]),u&&!u(o,n,i))return!1;n=this.stack[r--],o=this.stack[r--]}return!0}findAncestor(t){for(let r of ce(this,pe,et).call(this))if(t(r))return r}hasAncestor(t){for(let r of ce(this,pe,et).call(this))if(t(r))return!0;return!1}};Te=new WeakSet,wt=function(t){let{stack:r}=this;for(let n=r.length-1;n>=0;n-=2)if(!Array.isArray(r[n])&&--t<0)return n;return-1},pe=new WeakSet,et=function*(){let{stack:t}=this;for(let r=t.length-3;r>=0;r-=2){let n=t[r];Array.isArray(n)||(yield n)}};var Ir=bt;var Rr=new Proxy(()=>{},{get:()=>Rr}),ve=Rr;function $u(e){return e!==null&&typeof e=="object"}var Yr=$u;function*Ot(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,o=u=>Yr(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let s of i)o(s)&&(yield s);else o(i)&&(yield i)}}function*jr(e,t){let r=[e];for(let n=0;n{let o=!!(n!=null&&n.backwards);if(r===!1)return!1;let{length:u}=t,i=r;for(;i>=0&&i0}var Mt=po;function mo(e){return e!==null&&typeof e=="object"}var wn=mo;function*Wt(e,t){let{getVisitorKeys:r,filter:n=()=>!0}=t,o=u=>wn(u)&&n(u);for(let u of r(e)){let i=e[u];if(Array.isArray(i))for(let s of i)o(s)&&(yield s);else o(i)&&(yield i)}}function*kn(e,t){let r=[e];for(let n=0;n20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function Ut(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Eo(e)}function ne(e,t){t.leading=!0,t.trailing=!1,Ut(e,t)}function X(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Ut(e,t)}function ue(e,t){t.leading=!1,t.trailing=!0,Ut(e,t)}var zt=new WeakMap;function Et(e,t){if(zt.has(e))return zt.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:o},locStart:u,locEnd:i}=t;if(!n)return[];let s=((r==null?void 0:r(e,t))??[...Wt(e,{getVisitorKeys:H(o)})]).flatMap(D=>n(D)?[D]:Et(D,t));return s.sort((D,a)=>u(D)-u(a)||i(D)-i(a)),zt.set(e,s),s}function On(e,t,r,n){let{locStart:o,locEnd:u}=r,i=o(t),s=u(t),D=Et(e,r),a,c,d=0,f=D.length;for(;d>1,l=D[p],F=o(l),m=u(l);if(F<=i&&s<=m)return On(l,t,r,l);if(m<=i){a=l,d=p+1;continue}if(s<=F){c=l,f=p;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:p}=n,l=Kt(p,t,r);a&&Kt(p,a,r)!==l&&(a=null),c&&Kt(p,c,r)!==l&&(c=null)}return{enclosingNode:n,precedingNode:a,followingNode:c}}var Gt=()=>!1;function Nn(e,t){let{comments:r}=e;if(delete e.comments,!Mt(r)||!t.printer.canAttachComment)return;let n=[],{locStart:o,locEnd:u,printer:{experimentalFeatures:{avoidAstMutation:i=!1}={},handleComments:s={}},originalText:D}=t,{ownLine:a=Gt,endOfLine:c=Gt,remaining:d=Gt}=s,f=r.map((p,l)=>({...On(e,p,t),comment:p,text:D,options:t,ast:e,isLastComment:r.length-1===l}));for(let[p,l]of f.entries()){let{comment:F,precedingNode:m,enclosingNode:E,followingNode:C,text:g,options:h,ast:B,isLastComment:Z}=l;if(h.parser==="json"||h.parser==="json5"||h.parser==="__js_expression"||h.parser==="__ts_expression"||h.parser==="__vue_expression"||h.parser==="__vue_ts_expression"){if(o(F)-o(B)<=0){ne(B,F);continue}if(u(F)-u(B)>=0){ue(B,F);continue}}let $;if(i?$=[l]:(F.enclosingNode=E,F.precedingNode=m,F.followingNode=C,$=[F,g,h,B,Z]),Co(g,h,f,p))F.placement="ownLine",a(...$)||(C?ne(C,F):m?ue(m,F):E?X(E,F):X(B,F));else if(ho(g,h,f,p))F.placement="endOfLine",c(...$)||(m?ue(m,F):C?ne(C,F):E?X(E,F):X(B,F));else if(F.placement="remaining",!d(...$))if(m&&C){let Q=n.length;Q>0&&n[Q-1].followingNode!==C&&bn(n,h),n.push(l)}else m?ue(m,F):C?ne(C,F):E?X(E,F):X(B,F)}if(bn(n,t),!i)for(let p of r)delete p.precedingNode,delete p.enclosingNode,delete p.followingNode}var Tn=e=>!/[\S\n\u2028\u2029]/.test(e);function Co(e,t,r,n){let{comment:o,precedingNode:u}=r[n],{locStart:i,locEnd:s}=t,D=i(o);if(u)for(let a=n-1;a>=0;a--){let{comment:c,precedingNode:d}=r[a];if(d!==u||!Tn(e.slice(s(c),D)))break;D=i(c)}return V(e,D,{backwards:!0})}function ho(e,t,r,n){let{comment:o,followingNode:u}=r[n],{locStart:i,locEnd:s}=t,D=s(o);if(u)for(let a=n+1;a0;--i){let{comment:a,precedingNode:c,followingNode:d}=e[i-1];Re.strictEqual(c,n),Re.strictEqual(d,o);let f=t.originalText.slice(t.locEnd(a),u);if(((D=(s=t.printer).isGap)==null?void 0:D.call(s,f,t))??/^[\s(]*$/.test(f))u=t.locStart(a);else break}for(let[a,{comment:c}]of e.entries())a1&&a.comments.sort((c,d)=>t.locStart(c)-t.locStart(d));e.length=0}function Kt(e,t,r){let n=r.locStart(t)-1;for(let o=1;o!n.has(D)).length===0)return{leading:"",trailing:""};let u=[],i=[],s;return e.each(()=>{let D=e.node;if(n!=null&&n.has(D))return;let{leading:a,trailing:c}=D;a?u.push(yo(e,t)):c&&(s=Ao(e,t,s),i.push(s.doc))},"comments"),{leading:u,trailing:i}}function vn(e,t,r){let{leading:n,trailing:o}=Bo(e,r);return!n&&!o?t:Ze(t,u=>[n,u,o])}function Pn(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}async function Ln(e,t,r,n,o){let{embeddedLanguageFormatting:u,printer:{embed:i,hasPrettierIgnore:s=()=>!1,getVisitorKeys:D}}=r;if(!i||u!=="auto")return;if(i.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let a=H(i.getVisitorKeys??D),c=[];p();let d=e.stack;for(let{print:l,node:F,pathStack:m}of c)try{e.stack=m;let E=await l(f,t,e,r);E&&o.set(F,E)}catch(E){if(globalThis.PRETTIER_DEBUG)throw E}e.stack=d;function f(l,F){return _o(l,F,r,n)}function p(){let{node:l}=e;if(l===null||typeof l!="object"||s(e))return;for(let m of a(l))Array.isArray(l[m])?e.each(p,m):e.call(p,m);let F=i(e,r);if(F){if(typeof F=="function"){c.push({print:F,node:l,pathStack:[...e.stack]});return}o.set(l,F)}}}async function _o(e,t,r,n){let o=await re({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:u}=await De(e,o),i=await n(u,o);return Xe(i)}function xo(e){return()=>{}}var In=xo;function wo(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:o,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:s}=e,D=o(s),a=u(s);for(let c of n)o(c)>=D&&u(c)<=a&&i.add(c);return r.slice(D,a)}var Rn=wo;async function je(e,t){({ast:e}=await Ht(e,t));let r=new Map,n=new Bn(e),o=In(t),u=new Map;await Ln(n,s,t,je,u);let i=await Yn(n,t,s,void 0,u);return Pn(t),i;function s(a,c){return a===void 0||a===n?D(c):Array.isArray(a)?n.call(()=>D(c),...a):n.call(()=>D(c),a)}function D(a){o(n);let c=n.node;if(c==null)return"";let d=c&&typeof c=="object"&&a===void 0;if(d&&r.has(c))return r.get(c);let f=Yn(n,t,s,a,u);return d&&r.set(c,f),f}}function Yn(e,t,r,n,o){var D;let{node:u}=e,{printer:i}=t,s;return(D=i.hasPrettierIgnore)!=null&&D.call(i,e)?s=Rn(e,t):o.has(u)?s=o.get(u):s=i.print(e,t,r,n),u===t.cursorNode&&(s=Ze(s,a=>[xe,a,xe])),i.printComment&&(!i.willPrintOwnComments||!i.willPrintOwnComments(e,t))&&(s=vn(e,s,t)),s}async function Ht(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,Nn(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}var ko=({parser:e})=>e==="json"||e==="json5"||e==="json-stringify";function bo(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(o=>$n.has(o.type)&&n.has(o))}function jn(e){let t=e.length-1;for(;;){let r=e[t];if((r==null?void 0:r.type)==="Program"||(r==null?void 0:r.type)==="File")t--;else break}return e.slice(0,t+1)}function Oo(e,t,{locStart:r,locEnd:n}){let o=e.node,u=t.node;if(o===u)return{startNode:o,endNode:u};let i=r(e.node);for(let D of jn(t.parentNodes))if(r(D)>=i)u=D;else break;let s=n(t.node);for(let D of jn(e.parentNodes)){if(n(D)<=s)o=D;else break;if(o===u)break}return{startNode:o,endNode:u}}function qt(e,t,r,n,o=[],u){let{locStart:i,locEnd:s}=r,D=i(e),a=s(e);if(!(t>a||tn);let s=e.slice(n,o).search(/\S/),D=s===-1;if(!D)for(n+=s;o>n&&!/\S/.test(e[o-1]);--o);let a=qt(r,n,t,(p,l)=>Vn(t,p,l),[],"rangeStart"),c=D?a:qt(r,o,t,p=>Vn(t,p),[],"rangeEnd");if(!a||!c)return{rangeStart:0,rangeEnd:0};let d,f;if(ko(t)){let p=bo(a,c);d=p,f=p}else({startNode:d,endNode:f}=Oo(a,c,t));return{rangeStart:Math.min(u(d),u(f)),rangeEnd:Math.max(i(d),i(f))}}function So(e,t){let{cursorOffset:r,locStart:n,locEnd:o}=t,u=H(t.printer.getVisitorKeys),i=D=>n(D)<=r&&o(D)>=r,s=e;for(let D of kn(e,{getVisitorKeys:u,filter:i}))s=D;return s}var Wn=So;var Hn="\uFEFF",Un=Symbol("cursor");async function qn(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:o}=await De(e,t);t.cursorOffset>=0&&(t.cursorNode=Wn(n,t));let u=await je(n,t,r);r>0&&(u=qe([G,u],r,t.tabWidth));let i=fe(u,t);if(r>0){let D=i.formatted.trim();i.cursorNodeStart!==void 0&&(i.cursorNodeStart-=i.formatted.indexOf(D)),i.formatted=D+ke(t.endOfLine)}let s=t[Symbol.for("comments")];if(t.cursorOffset>=0){let D,a,c,d,f;if(t.cursorNode&&i.cursorNodeText?(D=t.locStart(t.cursorNode),a=o.slice(D,t.locEnd(t.cursorNode)),c=t.cursorOffset-D,d=i.cursorNodeStart,f=i.cursorNodeText):(D=0,a=o,c=t.cursorOffset,d=0,f=i.formatted),a===f)return{formatted:i.formatted,cursorOffset:d+c,comments:s};let p=a.split("");p.splice(c,0,Un);let l=f.split(""),F=(0,Kn.diffArrays)(p,l),m=d;for(let E of F)if(E.removed){if(E.value.includes(Un))break}else m+=E.count;return{formatted:i.formatted,cursorOffset:m,comments:s}}return{formatted:i.formatted,cursorOffset:-1,comments:s}}async function vo(e,t){let{ast:r,text:n}=await De(e,t),{rangeStart:o,rangeEnd:u}=Mn(n,t,r),i=n.slice(o,u),s=Math.min(o,n.lastIndexOf(` -`,o)+1),D=n.slice(s,o).match(/^\s*/)[0],a=Fe(D,t.tabWidth),c=await qn(i,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>o&&t.cursorOffset<=u?t.cursorOffset-o:-1,endOfLine:"lf"},a),d=c.formatted.trimEnd(),{cursorOffset:f}=t;f>u?f+=d.length-i.length:c.cursorOffset>=0&&(f=c.cursorOffset+o);let p=n.slice(0,o)+d+n.slice(u);if(t.endOfLine!=="lf"){let l=ke(t.endOfLine);f>=0&&l===`\r -`&&(f+=_t(p.slice(0,f),` +`||o==="\r"||o==="\u2028"||o==="\u2029")return t+1}return t}var Y=Mu;function Wu(e,t,r={}){let n=N(e,r.backwards?t-1:t,r),o=Y(e,n,r);return n!==o}var V=Wu;function Uu(e){return Array.isArray(e)&&e.length>0}var Nt=Uu;var $r=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),zu=e=>Object.keys(e).filter(t=>!$r.has(t));function Gu(e){return e?t=>e(t,$r):zu}var H=Gu;function Ku(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&(typeof e.id=="object"?e.id.name:e.id)||e.key&&(typeof e.key=="object"?e.key.name:e.key)||e.value&&(typeof e.value=="object"?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"\u2026"),t+(r?" "+r:"")}function St(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=Ku(e)}function te(e,t){t.leading=!0,t.trailing=!1,St(e,t)}function X(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),St(e,t)}function re(e,t){t.leading=!1,t.trailing=!0,St(e,t)}var Tt=new WeakMap;function nt(e,t){if(Tt.has(e))return Tt.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:o},locStart:u,locEnd:i}=t;if(!n)return[];let s=((r==null?void 0:r(e,t))??[...Ot(e,{getVisitorKeys:H(o)})]).flatMap(D=>n(D)?[D]:nt(D,t));return s.sort((D,a)=>u(D)-u(a)||i(D)-i(a)),Tt.set(e,s),s}function Wr(e,t,r,n){let{locStart:o,locEnd:u}=r,i=o(t),s=u(t),D=nt(e,r),a,c,d=0,f=D.length;for(;d>1,l=D[p],F=o(l),m=u(l);if(F<=i&&s<=m)return Wr(l,t,r,l);if(m<=i){a=l,d=p+1;continue}if(s<=F){c=l,f=p;continue}throw new Error("Comment location overlaps with node location")}if((n==null?void 0:n.type)==="TemplateLiteral"){let{quasis:p}=n,l=Pt(p,t,r);a&&Pt(p,a,r)!==l&&(a=null),c&&Pt(p,c,r)!==l&&(c=null)}return{enclosingNode:n,precedingNode:a,followingNode:c}}var vt=()=>!1;function Ur(e,t){let{comments:r}=e;if(delete e.comments,!Nt(r)||!t.printer.canAttachComment)return;let n=[],{locStart:o,locEnd:u,printer:{experimentalFeatures:{avoidAstMutation:i=!1}={},handleComments:s={}},originalText:D}=t,{ownLine:a=vt,endOfLine:c=vt,remaining:d=vt}=s,f=r.map((p,l)=>({...Wr(e,p,t),comment:p,text:D,options:t,ast:e,isLastComment:r.length-1===l}));for(let[p,l]of f.entries()){let{comment:F,precedingNode:m,enclosingNode:E,followingNode:C,text:g,options:h,ast:B,isLastComment:Z}=l;if(h.parser==="json"||h.parser==="json5"||h.parser==="jsonc"||h.parser==="__js_expression"||h.parser==="__ts_expression"||h.parser==="__vue_expression"||h.parser==="__vue_ts_expression"){if(o(F)-o(B)<=0){te(B,F);continue}if(u(F)-u(B)>=0){re(B,F);continue}}let $;if(i?$=[l]:(F.enclosingNode=E,F.precedingNode=m,F.followingNode=C,$=[F,g,h,B,Z]),Hu(g,h,f,p))F.placement="ownLine",a(...$)||(C?te(C,F):m?re(m,F):E?X(E,F):X(B,F));else if(qu(g,h,f,p))F.placement="endOfLine",c(...$)||(m?re(m,F):C?te(C,F):E?X(E,F):X(B,F));else if(F.placement="remaining",!d(...$))if(m&&C){let Q=n.length;Q>0&&n[Q-1].followingNode!==C&&Mr(n,h),n.push(l)}else m?re(m,F):C?te(C,F):E?X(E,F):X(B,F)}if(Mr(n,t),!i)for(let p of r)delete p.precedingNode,delete p.enclosingNode,delete p.followingNode}var zr=e=>!/[\S\n\u2028\u2029]/.test(e);function Hu(e,t,r,n){let{comment:o,precedingNode:u}=r[n],{locStart:i,locEnd:s}=t,D=i(o);if(u)for(let a=n-1;a>=0;a--){let{comment:c,precedingNode:d}=r[a];if(d!==u||!zr(e.slice(s(c),D)))break;D=i(c)}return V(e,D,{backwards:!0})}function qu(e,t,r,n){let{comment:o,followingNode:u}=r[n],{locStart:i,locEnd:s}=t,D=s(o);if(u)for(let a=n+1;a0;--i){let{comment:a,precedingNode:c,followingNode:d}=e[i-1];ve.strictEqual(c,n),ve.strictEqual(d,o);let f=t.originalText.slice(t.locEnd(a),u);if(((D=(s=t.printer).isGap)==null?void 0:D.call(s,f,t))??/^[\s(]*$/.test(f))u=t.locStart(a);else break}for(let[a,{comment:c}]of e.entries())a1&&a.comments.sort((c,d)=>t.locStart(c)-t.locStart(d));e.length=0}function Pt(e,t,r){let n=r.locStart(t)-1;for(let o=1;o!n.has(D)).length===0)return{leading:"",trailing:""};let u=[],i=[],s;return e.each(()=>{let D=e.node;if(n!=null&&n.has(D))return;let{leading:a,trailing:c}=D;a?u.push(Xu(e,t)):c&&(s=Zu(e,t,s),i.push(s.doc))},"comments"),{leading:u,trailing:i}}function Kr(e,t,r){let{leading:n,trailing:o}=Qu(e,r);return!n&&!o?t:Ze(t,u=>[n,u,o])}function Hr(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let n of t){if(!n.printed&&!r.has(n))throw new Error('Comment "'+n.value.trim()+'" was not printed. Please report this error!');delete n.printed}}function eo(e){return()=>{}}var qr=eo;var Le=class extends Error{name="ConfigError"},Ie=class extends Error{name="UndefinedParserError"};var Jr={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"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:`Maintain existing +(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>typeof e=="string"||typeof e=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e=="string"||typeof e=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive). +The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset. +The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment +in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"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."}]}};function ut({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap(o=>o.languages??[]),n=[];for(let o of ro(Object.assign({},...e.map(({options:u})=>u),Jr)))!t&&o.deprecated||(Array.isArray(o.choices)&&(t||(o.choices=o.choices.filter(u=>!u.deprecated)),o.name==="parser"&&(o.choices=[...o.choices,...to(o.choices,r,e)])),o.pluginDefaults=Object.fromEntries(e.filter(u=>{var i;return((i=u.defaultOptions)==null?void 0:i[o.name])!==void 0}).map(u=>[u.name,u.defaultOptions[o.name]])),n.push(o));return{languages:r,options:n}}function*to(e,t,r){let n=new Set(e.map(o=>o.value));for(let o of t)if(o.parsers){for(let u of o.parsers)if(!n.has(u)){n.add(u);let i=r.find(D=>D.parsers&&Object.prototype.hasOwnProperty.call(D.parsers,u)),s=o.name;i!=null&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:u,description:s}}}}function ro(e){let t=[];for(let[r,n]of Object.entries(e)){let o={name:r,...n};Array.isArray(o.default)&&(o.default=y(!1,o.default,-1).value),t.push(o)}return t}var no=e=>String(e).split(/[/\\]/).pop();function Xr(e,t){if(!t)return;let r=no(t).toLowerCase();return e.find(({filenames:n})=>n==null?void 0:n.some(o=>o.toLowerCase()===r))??e.find(({extensions:n})=>n==null?void 0:n.some(o=>r.endsWith(o)))}function uo(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r==null?void 0:r.includes(t))??e.find(({extensions:r})=>r==null?void 0:r.includes(`.${t}`))}function oo(e,t){let r=e.plugins.flatMap(o=>o.languages??[]),n=uo(r,t.language)??Xr(r,t.physicalFile)??Xr(r,t.file)??(t.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Zr=oo;var ne={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(e===null||typeof e!="object")return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(r=>ne.value(r)).join(", ")}]`;let t=Object.keys(e);return t.length===0?"{}":`{ ${t.map(r=>`${ne.key(r)}: ${ne.value(e[r])}`).join(", ")} }`},pair:({key:e,value:t})=>ne.value({[e]:t})};var Lt=he(Re(),1),tn=(e,t,{descriptor:r})=>{let n=[`${Lt.default.yellow(typeof e=="string"?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${Lt.default.blue(typeof t=="string"?r.key(t):r.pair(t))}`),n.join("; ")+"."};var se=he(Re(),1);var ot=Symbol.for("vnopts.VALUE_NOT_EXIST"),me=Symbol.for("vnopts.VALUE_UNCHANGED");var rn=" ".repeat(2),un=(e,t,r)=>{let{text:n,list:o}=r.normalizeExpectedResult(r.schemas[e].expected(r)),u=[];return n&&u.push(nn(e,t,n,r.descriptor)),o&&u.push([nn(e,t,o.title,r.descriptor)].concat(o.values.map(i=>on(i,r.loggerPrintWidth))).join(` +`)),sn(u,r.loggerPrintWidth)};function nn(e,t,r,n){return[`Invalid ${se.default.red(n.key(e))} value.`,`Expected ${se.default.blue(r)},`,`but received ${t===ot?se.default.gray("nothing"):se.default.red(n.value(t))}.`].join(" ")}function on({text:e,list:t},r){let n=[];return e&&n.push(`- ${se.default.blue(e)}`),t&&n.push([`- ${se.default.blue(t.title)}:`].concat(t.values.map(o=>on(o,r-rn.length).replace(/^|\n/g,`$&${rn}`))).join(` +`)),sn(n,r)}function sn(e,t){if(e.length===1)return e[0];let[r,n]=e,[o,u]=e.map(i=>i.split(` +`,1)[0].length);return o>t&&o>u?n:r}var Yt=he(Re(),1);var It=[],Dn=[];function Rt(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,o=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-o);)n--,o--;let u=0;for(;us?a>s?s+1:a:a>D?D+1:a;return s}var it=(e,t,{descriptor:r,logger:n,schemas:o})=>{let u=[`Ignored unknown option ${Yt.default.yellow(r.pair({key:e,value:t}))}.`],i=Object.keys(o).sort().find(s=>Rt(e,s)<3);i&&u.push(`Did you mean ${Yt.default.blue(r.key(i))}?`),n.warn(u.join(" "))};var io=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function so(e,t){let r=new e(t),n=Object.create(r);for(let o of io)o in t&&(n[o]=Do(t[o],r,w.prototype[o].length));return n}var w=class{static create(t){return so(this,t)}constructor(t){this.name=t.name}default(t){}expected(t){return"nothing"}validate(t,r){return!1}deprecated(t,r){return!1}forward(t,r){}redirect(t,r){}overlap(t,r,n){return t}preprocess(t,r){return t}postprocess(t,r){return me}};function Do(e,t,r){return typeof e=="function"?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var st=class extends w{constructor(t){super(t),this._sourceName=t.sourceName}expected(t){return t.schemas[this._sourceName].expected(t)}validate(t,r){return r.schemas[this._sourceName].validate(t,r)}redirect(t,r){return this._sourceName}};var Dt=class extends w{expected(){return"anything"}validate(){return!0}};var at=class extends w{constructor({valueSchema:t,name:r=t.name,...n}){super({...n,name:r}),this._valueSchema=t}expected(t){let{text:r,list:n}=t.normalizeExpectedResult(this._valueSchema.expected(t));return{text:r&&`an array of ${r}`,list:n&&{title:"an array of the following values",values:[{list:n}]}}}validate(t,r){if(!Array.isArray(t))return!1;let n=[];for(let o of t){let u=r.normalizeValidateResult(this._valueSchema.validate(o,r),o);u!==!0&&n.push(u.value)}return n.length===0?!0:{value:n}}deprecated(t,r){let n=[];for(let o of t){let u=r.normalizeDeprecatedResult(this._valueSchema.deprecated(o,r),o);u!==!1&&n.push(...u.map(({value:i})=>({value:[i]})))}return n}forward(t,r){let n=[];for(let o of t){let u=r.normalizeForwardResult(this._valueSchema.forward(o,r),o);n.push(...u.map(an))}return n}redirect(t,r){let n=[],o=[];for(let u of t){let i=r.normalizeRedirectResult(this._valueSchema.redirect(u,r),u);"remain"in i&&n.push(i.remain),o.push(...i.redirect.map(an))}return n.length===0?{redirect:o}:{redirect:o,remain:n}}overlap(t,r){return t.concat(r)}};function an({from:e,to:t}){return{from:[e],to:t}}var ct=class extends w{expected(){return"true or false"}validate(t){return typeof t=="boolean"}};function ln(e,t){let r=Object.create(null);for(let n of e){let o=n[t];if(r[o])throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r[o]=n}return r}function fn(e,t){let r=new Map;for(let n of e){let o=n[t];if(r.has(o))throw new Error(`Duplicate ${t} ${JSON.stringify(o)}`);r.set(o,n)}return r}function Fn(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return e[r]?!0:(e[r]=!0,!1)}}function pn(e,t){let r=[],n=[];for(let o of e)t(o)?r.push(o):n.push(o);return[r,n]}function dn(e){return e===Math.floor(e)}function mn(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,o=["undefined","object","boolean","number","string"];return r!==n?o.indexOf(r)-o.indexOf(n):r!=="string"?Number(e)-Number(t):e.localeCompare(t)}function En(e){return(...t)=>{let r=e(...t);return typeof r=="string"?new Error(r):r}}function jt(e){return e===void 0?{}:e}function Vt(e){if(typeof e=="string")return{text:e};let{text:t,list:r}=e;return ao((t||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map(Vt)}}:{text:t}}function $t(e,t){return e===!0?!0:e===!1?{value:t}:e}function Mt(e,t,r=!1){return e===!1?!1:e===!0?r?!0:[{value:t}]:"value"in e?[e]:e.length===0?!1:e}function cn(e,t){return typeof e=="string"||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function lt(e,t){return e===void 0?[]:Array.isArray(e)?e.map(r=>cn(r,t)):[cn(e,t)]}function Wt(e,t){let r=lt(typeof e=="object"&&"redirect"in e?e.redirect:e,t);return r.length===0?{remain:t,redirect:r}:typeof e=="object"&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}function ao(e,t){if(!e)throw new Error(t)}var ft=class extends w{constructor(t){super(t),this._choices=fn(t.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:t}){let r=Array.from(this._choices.keys()).map(i=>this._choices.get(i)).filter(({hidden:i})=>!i).map(i=>i.value).sort(mn).map(t.value),n=r.slice(0,-2),o=r.slice(-2);return{text:n.concat(o.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(t){return this._choices.has(t)}deprecated(t){let r=this._choices.get(t);return r&&r.deprecated?{value:t}:!1}forward(t){let r=this._choices.get(t);return r?r.forward:void 0}redirect(t){let r=this._choices.get(t);return r?r.redirect:void 0}};var Ft=class extends w{expected(){return"a number"}validate(t,r){return typeof t=="number"}};var pt=class extends Ft{expected(){return"an integer"}validate(t,r){return r.normalizeValidateResult(super.validate(t,r),t)===!0&&dn(t)}};var Ye=class extends w{expected(){return"a string"}validate(t){return typeof t=="string"}};var Cn=ne,hn=it,gn=un,yn=tn;var dt=class{constructor(t,r){let{logger:n=console,loggerPrintWidth:o=80,descriptor:u=Cn,unknown:i=hn,invalid:s=gn,deprecated:D=yn,missing:a=()=>!1,required:c=()=>!1,preprocess:d=p=>p,postprocess:f=()=>me}=r||{};this._utils={descriptor:u,logger:n||{warn:()=>{}},loggerPrintWidth:o,schemas:ln(t,"name"),normalizeDefaultResult:jt,normalizeExpectedResult:Vt,normalizeDeprecatedResult:Mt,normalizeForwardResult:lt,normalizeRedirectResult:Wt,normalizeValidateResult:$t},this._unknownHandler=i,this._invalidHandler=En(s),this._deprecatedHandler=D,this._identifyMissing=(p,l)=>!(p in l)||a(p,l),this._identifyRequired=c,this._preprocess=d,this._postprocess=f,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Fn()}normalize(t){let r={},o=[this._preprocess(t,this._utils)],u=()=>{for(;o.length!==0;){let i=o.shift(),s=this._applyNormalization(i,r);o.push(...s)}};u();for(let i of Object.keys(this._utils.schemas)){let s=this._utils.schemas[i];if(!(i in r)){let D=jt(s.default(this._utils));"value"in D&&o.push({[i]:D.value})}}u();for(let i of Object.keys(this._utils.schemas)){if(!(i in r))continue;let s=this._utils.schemas[i],D=r[i],a=s.postprocess(D,this._utils);a!==me&&(this._applyValidation(a,i,s),r[i]=a)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(t,r){let n=[],{knownKeys:o,unknownKeys:u}=this._partitionOptionKeys(t);for(let i of o){let s=this._utils.schemas[i],D=s.preprocess(t[i],this._utils);this._applyValidation(D,i,s);let a=({from:p,to:l})=>{n.push(typeof l=="string"?{[l]:p}:{[l.key]:l.value})},c=({value:p,redirectTo:l})=>{let F=Mt(s.deprecated(p,this._utils),D,!0);if(F!==!1)if(F===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,l,this._utils));else for(let{value:m}of F){let E={key:i,value:m};if(!this._hasDeprecationWarned(E)){let C=typeof l=="string"?{key:l,value:m}:l;this._utils.logger.warn(this._deprecatedHandler(E,C,this._utils))}}};lt(s.forward(D,this._utils),D).forEach(a);let f=Wt(s.redirect(D,this._utils),D);if(f.redirect.forEach(a),"remain"in f){let p=f.remain;r[i]=i in r?s.overlap(r[i],p,this._utils):p,c({value:p})}for(let{from:p,to:l}of f.redirect)c({value:p,redirectTo:l})}for(let i of u){let s=t[i];this._applyUnknownHandler(i,s,r,(D,a)=>{n.push({[D]:a})})}return n}_applyRequiredCheck(t){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,t)&&this._identifyRequired(r))throw this._invalidHandler(r,ot,this._utils)}_partitionOptionKeys(t){let[r,n]=pn(Object.keys(t).filter(o=>!this._identifyMissing(o,t)),o=>o in this._utils.schemas);return{knownKeys:r,unknownKeys:n}}_applyValidation(t,r,n){let o=$t(n.validate(t,this._utils),t);if(o!==!0)throw this._invalidHandler(r,o.value,this._utils)}_applyUnknownHandler(t,r,n,o){let u=this._unknownHandler(t,r,this._utils);if(u)for(let i of Object.keys(u)){if(this._identifyMissing(i,u))continue;let s=u[i];i in this._utils.schemas?o(i,s):n[i]=s}}_applyPostprocess(t){let r=this._postprocess(t,this._utils);if(r!==me){if(r.delete)for(let n of r.delete)delete t[n];if(r.override){let{knownKeys:n,unknownKeys:o}=this._partitionOptionKeys(r.override);for(let u of n){let i=r.override[u];this._applyValidation(i,u,this._utils.schemas[u]),t[u]=i}for(let u of o){let i=r.override[u];this._applyUnknownHandler(u,i,t,(s,D)=>{let a=this._utils.schemas[s];this._applyValidation(D,s,a),t[s]=D})}}}}};var Ut;function lo(e,t,{logger:r=!1,isCLI:n=!1,passThrough:o=!1,FlagSchema:u,descriptor:i}={}){if(n){if(!u)throw new Error("'FlagSchema' option is required.");if(!i)throw new Error("'descriptor' option is required.")}else i=ne;let s=o?Array.isArray(o)?(f,p)=>o.includes(f)?{[f]:p}:void 0:(f,p)=>({[f]:p}):(f,p,l)=>{let{_:F,...m}=l.schemas;return it(f,p,{...l,schemas:m})},D=fo(t,{isCLI:n,FlagSchema:u}),a=new dt(D,{logger:r,unknown:s,descriptor:i}),c=r!==!1;c&&Ut&&(a._hasDeprecationWarned=Ut);let d=a.normalize(e);return c&&(Ut=a._hasDeprecationWarned),d}function fo(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(Dt.create({name:"_"}));for(let o of e)n.push(Fo(o,{isCLI:t,optionInfos:e,FlagSchema:r})),o.alias&&t&&n.push(st.create({name:o.alias,sourceName:o.name}));return n}function Fo(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let{name:o}=e,u={name:o},i,s={};switch(e.type){case"int":i=pt,t&&(u.preprocess=Number);break;case"string":i=Ye;break;case"choice":i=ft,u.choices=e.choices.map(D=>D!=null&&D.redirect?{...D,redirect:{to:{key:e.name,value:D.redirect}}}:D);break;case"boolean":i=ct;break;case"flag":i=n,u.flags=r.flatMap(D=>[D.alias,D.description&&D.name,D.oppositeDescription&&`no-${D.name}`].filter(Boolean));break;case"path":i=Ye;break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?u.validate=(D,a,c)=>e.exception(D)||a.validate(D,c):u.validate=(D,a,c)=>D===void 0||a.validate(D,c),e.redirect&&(s.redirect=D=>D?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let D=u.preprocess||(a=>a);u.preprocess=(a,c,d)=>c.preprocess(D(Array.isArray(a)?y(!1,a,-1):a),d)}return e.array?at.create({...t?{preprocess:D=>Array.isArray(D)?D:[D]}:{},...s,valueSchema:i.create(u)}):i.create({...u,...s})}var An=lo;var po=(e,t,r)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(r);for(let n=t.length-1;n>=0;n--){let o=t[n];if(r(o,n,t))return o}}},zt=po;function Gt(e,t){if(!t)throw new Error("parserName is required.");let r=zt(!1,e,o=>o.parsers&&Object.prototype.hasOwnProperty.call(o.parsers,t));if(r)return r;let n=`Couldn't resolve parser "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new Le(n)}function Bn(e,t){if(!t)throw new Error("astFormat is required.");let r=zt(!1,e,o=>o.printers&&Object.prototype.hasOwnProperty.call(o.printers,t));if(r)return r;let n=`Couldn't find plugin for AST format "${t}".`;throw n+=" Plugins must be explicitly added to the standalone bundle.",new Le(n)}function mt({plugins:e,parser:t}){let r=Gt(e,t);return Kt(r,t)}function Kt(e,t){let r=e.parsers[t];return typeof r=="function"?r():r}function _n(e,t){let r=e.printers[t];return typeof r=="function"?r():r}var kn={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};async function mo(e,t={}){var d;let r={...e};if(!r.parser)if(r.filepath){if(r.parser=Zr(r,{physicalFile:r.filepath}),!r.parser)throw new Ie(`No parser could be inferred for file "${r.filepath}".`)}else throw new Ie("No parser and no file path given, couldn't infer a parser.");let n=ut({plugins:e.plugins,showDeprecated:!0}).options,o={...kn,...Object.fromEntries(n.filter(f=>f.default!==void 0).map(f=>[f.name,f.default]))},u=Gt(r.plugins,r.parser),i=await Kt(u,r.parser);r.astFormat=i.astFormat,r.locEnd=i.locEnd,r.locStart=i.locStart;let s=(d=u.printers)!=null&&d[i.astFormat]?u:Bn(r.plugins,i.astFormat),D=await _n(s,i.astFormat);r.printer=D;let a=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,f])=>f!==void 0)):{},c={...o,...a};for(let[f,p]of Object.entries(c))(r[f]===null||r[f]===void 0)&&(r[f]=p);return r.parser==="json"&&(r.trailingComma="none"),An(r,n,{passThrough:Object.keys(kn),...t})}var ue=mo;var Ln=he(Pn(),1);async function _o(e,t){let r=await mt(t),n=r.preprocess?r.preprocess(e,t):e;t.originalText=n;let o;try{o=await r.parse(n,t,t)}catch(u){ko(u,e)}return{text:n,ast:o}}function ko(e,t){let{loc:r}=e;if(r){let n=(0,Ln.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+=` +`+n,e.codeFrame=n,e}throw e}var De=_o;async function In(e,t,r,n,o){let{embeddedLanguageFormatting:u,printer:{embed:i,hasPrettierIgnore:s=()=>!1,getVisitorKeys:D}}=r;if(!i||u!=="auto")return;if(i.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let a=H(i.getVisitorKeys??D),c=[];p();let d=e.stack;for(let{print:l,node:F,pathStack:m}of c)try{e.stack=m;let E=await l(f,t,e,r);E&&o.set(F,E)}catch(E){if(globalThis.PRETTIER_DEBUG)throw E}e.stack=d;function f(l,F){return xo(l,F,r,n)}function p(){let{node:l}=e;if(l===null||typeof l!="object"||s(e))return;for(let m of a(l))Array.isArray(l[m])?e.each(p,m):e.call(p,m);let F=i(e,r);if(F){if(typeof F=="function"){c.push({print:F,node:l,pathStack:[...e.stack]});return}o.set(l,F)}}}async function xo(e,t,r,n){let o=await ue({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:u}=await De(e,o),i=await n(u,o);return Xe(i)}function bo(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:o,locEnd:u,[Symbol.for("printedComments")]:i}=t,{node:s}=e,D=o(s),a=u(s);for(let c of n)o(c)>=D&&u(c)<=a&&i.add(c);return r.slice(D,a)}var Rn=bo;async function je(e,t){({ast:e}=await qt(e,t));let r=new Map,n=new Ir(e),o=qr(t),u=new Map;await In(n,s,t,je,u);let i=await Yn(n,t,s,void 0,u);return Hr(t),i;function s(a,c){return a===void 0||a===n?D(c):Array.isArray(a)?n.call(()=>D(c),...a):n.call(()=>D(c),a)}function D(a){o(n);let c=n.node;if(c==null)return"";let d=c&&typeof c=="object"&&a===void 0;if(d&&r.has(c))return r.get(c);let f=Yn(n,t,s,a,u);return d&&r.set(c,f),f}}function Yn(e,t,r,n,o){var D;let{node:u}=e,{printer:i}=t,s;return(D=i.hasPrettierIgnore)!=null&&D.call(i,e)?s=Rn(e,t):o.has(u)?s=o.get(u):s=i.print(e,t,r,n),u===t.cursorNode&&(s=Ze(s,a=>[xe,a,xe])),i.printComment&&(!i.willPrintOwnComments||!i.willPrintOwnComments(e,t))&&(s=Kr(e,s,t)),s}async function qt(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,Ur(e,t);let{printer:{preprocess:n}}=t;return e=n?await n(e,t):e,{ast:e,comments:r}}function wo(e,t){let{cursorOffset:r,locStart:n,locEnd:o}=t,u=H(t.printer.getVisitorKeys),i=D=>n(D)<=r&&o(D)>=r,s=e;for(let D of jr(e,{getVisitorKeys:u,filter:i}))s=D;return s}var jn=wo;function Oo(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let o=H(n),u=r.ignoredProperties??new Set;return i(e);function i(s,D){if(!(s!==null&&typeof s=="object"))return s;if(Array.isArray(s))return s.map(f=>i(f,D)).filter(Boolean);let a={},c=new Set(o(s));for(let f in s)!Object.prototype.hasOwnProperty.call(s,f)||u.has(f)||(c.has(f)?a[f]=i(s[f],s):a[f]=s[f]);let d=r(s,a,D);if(d!==null)return d??a}}var Vn=Oo;var No=({parser:e})=>e==="json"||e==="json5"||e==="jsonc"||e==="json-stringify";function So(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find(o=>Wn.has(o.type)&&n.has(o))}function $n(e){let t=e.length-1;for(;;){let r=e[t];if((r==null?void 0:r.type)==="Program"||(r==null?void 0:r.type)==="File")t--;else break}return e.slice(0,t+1)}function To(e,t,{locStart:r,locEnd:n}){let o=e.node,u=t.node;if(o===u)return{startNode:o,endNode:u};let i=r(e.node);for(let D of $n(t.parentNodes))if(r(D)>=i)u=D;else break;let s=n(t.node);for(let D of $n(e.parentNodes)){if(n(D)<=s)o=D;else break;if(o===u)break}return{startNode:o,endNode:u}}function Jt(e,t,r,n,o=[],u){let{locStart:i,locEnd:s}=r,D=i(e),a=s(e);if(!(t>a||tn);let s=e.slice(n,o).search(/\S/),D=s===-1;if(!D)for(n+=s;o>n&&!/\S/.test(e[o-1]);--o);let a=Jt(r,n,t,(p,l)=>Mn(t,p,l),[],"rangeStart"),c=D?a:Jt(r,o,t,p=>Mn(t,p),[],"rangeEnd");if(!a||!c)return{rangeStart:0,rangeEnd:0};let d,f;if(No(t)){let p=So(a,c);d=p,f=p}else({startNode:d,endNode:f}=To(a,c,t));return{rangeStart:Math.min(u(d),u(f)),rangeEnd:Math.max(i(d),i(f))}}var qn="\uFEFF",zn=Symbol("cursor");async function Jn(e,t,r=0){if(!e||e.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:o}=await De(e,t);t.cursorOffset>=0&&(t.cursorNode=jn(n,t));let u=await je(n,t,r);r>0&&(u=qe([G,u],r,t.tabWidth));let i=fe(u,t);if(r>0){let D=i.formatted.trim();i.cursorNodeStart!==void 0&&(i.cursorNodeStart-=i.formatted.indexOf(D)),i.formatted=D+Ae(t.endOfLine)}let s=t[Symbol.for("comments")];if(t.cursorOffset>=0){let D,a,c,d,f;if(t.cursorNode&&i.cursorNodeText?(D=t.locStart(t.cursorNode),a=o.slice(D,t.locEnd(t.cursorNode)),c=t.cursorOffset-D,d=i.cursorNodeStart,f=i.cursorNodeText):(D=0,a=o,c=t.cursorOffset,d=0,f=i.formatted),a===f)return{formatted:i.formatted,cursorOffset:d+c,comments:s};let p=a.split("");p.splice(c,0,zn);let l=f.split(""),F=(0,Hn.diffArrays)(p,l),m=d;for(let E of F)if(E.removed){if(E.value.includes(zn))break}else m+=E.count;return{formatted:i.formatted,cursorOffset:m,comments:s}}return{formatted:i.formatted,cursorOffset:-1,comments:s}}async function Lo(e,t){let{ast:r,text:n}=await De(e,t),{rangeStart:o,rangeEnd:u}=Un(n,t,r),i=n.slice(o,u),s=Math.min(o,n.lastIndexOf(` +`,o)+1),D=n.slice(s,o).match(/^\s*/)[0],a=Fe(D,t.tabWidth),c=await Jn(i,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>o&&t.cursorOffset<=u?t.cursorOffset-o:-1,endOfLine:"lf"},a),d=c.formatted.trimEnd(),{cursorOffset:f}=t;f>u?f+=d.length-i.length:c.cursorOffset>=0&&(f=c.cursorOffset+o);let p=n.slice(0,o)+d+n.slice(u);if(t.endOfLine!=="lf"){let l=Ae(t.endOfLine);f>=0&&l===`\r +`&&(f+=yt(p.slice(0,f),` `)),p=ee(!1,p,` -`,l)}return{formatted:p,cursorOffset:f,comments:c.comments}}function Jt(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function zn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o}=t;return r=Jt(e,r,-1),n=Jt(e,n,0),o=Jt(e,o,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:o}}function Jn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u}=zn(e,t),i=e.charAt(0)===Hn;if(i&&(e=e.slice(1),r--,n--,o--),u==="auto"&&(u=hr(e)),e.includes("\r")){let s=D=>_t(e.slice(0,Math.max(D,0)),`\r -`);r-=s(r),n-=s(n),o-=s(o),e=gr(e)}return{hasBOM:i,text:e,options:zn(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u})}}async function Gn(e,t){let r=await ft(t);return!r.hasPragma||r.hasPragma(e)}async function Xt(e,t){let{hasBOM:r,text:n,options:o}=Jn(e,await re(t));if(o.rangeStart>=o.rangeEnd&&n!==""||o.requirePragma&&!await Gn(n,o))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let u;return o.rangeStart>0||o.rangeEnd=0&&u.cursorOffset++),u}async function Xn(e,t,r){let{text:n,options:o}=Jn(e,await re(t)),u=await De(n,o);return r&&(r.preprocessForPrint&&(u.ast=await Ht(u.ast,o)),r.massage&&(u.ast=fn(u.ast,o))),u}async function Zn(e,t){t=await re(t);let r=await je(e,t);return fe(r,t)}async function Qn(e,t){let r=Pr(e),{formatted:n}=await Xt(r,{...t,parser:"__js_expression"});return n}async function eu(e,t){t=await re(t);let{ast:r}=await De(e,t);return je(r,t)}async function tu(e,t){return fe(e,await re(t))}var Qt={};We(Qt,{addDanglingComment:()=>X,addLeadingComment:()=>ne,addTrailingComment:()=>ue,getAlignmentSize:()=>Fe,getIndentSize:()=>nu,getMaxContinuousCount:()=>ru,getNextNonSpaceNonCommentCharacter:()=>iu,getNextNonSpaceNonCommentCharacterIndex:()=>Go,getStringWidth:()=>be,hasNewline:()=>V,hasNewlineInRange:()=>uu,hasSpaces:()=>ou,isNextLineEmpty:()=>Jo,isNextLineEmptyAfterIndex:()=>Ct,isPreviousLineEmpty:()=>Ho,makeString:()=>su,skip:()=>me,skipEverythingButNewLine:()=>mt,skipInlineComment:()=>Ee,skipNewline:()=>Y,skipSpaces:()=>N,skipToLineEnd:()=>dt,skipTrailingComment:()=>Ce,skipWhitespace:()=>xn});function Lo(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,o.length/t.length),0)}var ru=jo;function Vo(e,t){let r=e.lastIndexOf(` -`);return r===-1?0:Fe(e.slice(r+1).match(/^[\t ]*/)[0],t)}var nu=Vo;function $o(e,t,r){for(let n=t;ns===n?s:D===t?"\\"+D:D||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(s)?s:"\\"+s));return t+u+t}var su=Uo;function zo(e,t,r){return Ve(e,r(t))}function Go(e,t){return arguments.length===2||typeof t=="number"?Ve(e,t):zo(...arguments)}function Ko(e,t,r){return Ye(e,r(t))}function Ho(e,t){return arguments.length===2||typeof t=="number"?Ye(e,t):Ko(...arguments)}function qo(e,t,r){return Ct(e,r(t))}function Jo(e,t){return arguments.length===2||typeof t=="number"?Ct(e,t):qo(...arguments)}var er={};We(er,{builders:()=>Xo,printer:()=>Zo,utils:()=>Qo});var Xo={join:we,line:Ke,softline:Er,hardline:G,literalline:He,group:At,conditionalGroup:fr,fill:Ge,lineSuffix:Be,lineSuffixBoundary:dr,cursor:xe,breakParent:le,ifBreak:Fr,trim:mr,indent:ie,indentIfBreak:pr,align:oe,addAlignmentToDoc:qe,markAsRoot:cr,dedentToRoot:ar,dedent:lr,hardlineWithoutBreakParent:_e,literallineWithoutBreakParent:Bt,label:Cr,concat:e=>e},Zo={printDocToString:fe},Qo={willBreak:br,traverseDoc:Ae,findInDoc:Je,mapDoc:Ne,removeLines:Nr,stripTrailingHardline:Xe,replaceEndOfLine:Tr,canBreak:Sr};var Du="3.1.0";function ae(e,t=1){return async(...r)=>{let n=r[t]??{},o=n.plugins??[];return r[t]={...n,plugins:Array.isArray(o)?o:Object.values(o)},e(...r)}}var au=ae(Xt);async function cu(e,t){let{formatted:r}=await au(e,{...t,cursorOffset:-1});return r}async function ei(e,t){return await cu(e,t)===e}var ti=ae(et,0),ri={parse:ae(Xn),formatAST:ae(Zn),formatDoc:ae(Qn),printToDoc:ae(eu),printDocToString:ae(tu)};var qc=tr;export{ri as __debug,ei as check,qc as default,er as doc,cu as format,au as formatWithCursor,ti as getSupportInfo,Qt as util,Du as version}; +`,l)}return{formatted:p,cursorOffset:f,comments:c.comments}}function Xt(e,t,r){return typeof t!="number"||Number.isNaN(t)||t<0||t>e.length?r:t}function Gn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o}=t;return r=Xt(e,r,-1),n=Xt(e,n,0),o=Xt(e,o,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:o}}function Xn(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u}=Gn(e,t),i=e.charAt(0)===qn;if(i&&(e=e.slice(1),r--,n--,o--),u==="auto"&&(u=Dr(e)),e.includes("\r")){let s=D=>yt(e.slice(0,Math.max(D,0)),`\r +`);r-=s(r),n-=s(n),o-=s(o),e=ar(e)}return{hasBOM:i,text:e,options:Gn(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:o,endOfLine:u})}}async function Kn(e,t){let r=await mt(t);return!r.hasPragma||r.hasPragma(e)}async function Zt(e,t){let{hasBOM:r,text:n,options:o}=Xn(e,await ue(t));if(o.rangeStart>=o.rangeEnd&&n!==""||o.requirePragma&&!await Kn(n,o))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let u;return o.rangeStart>0||o.rangeEnd=0&&u.cursorOffset++),u}async function Zn(e,t,r){let{text:n,options:o}=Xn(e,await ue(t)),u=await De(n,o);return r&&(r.preprocessForPrint&&(u.ast=await qt(u.ast,o)),r.massage&&(u.ast=Vn(u.ast,o))),u}async function Qn(e,t){t=await ue(t);let r=await je(e,t);return fe(r,t)}async function eu(e,t){let r=Ar(e),{formatted:n}=await Zt(r,{...t,parser:"__js_expression"});return n}async function tu(e,t){t=await ue(t);let{ast:r}=await De(e,t);return je(r,t)}async function ru(e,t){return fe(e,await ue(t))}var Qt={};We(Qt,{builders:()=>Ro,printer:()=>Yo,utils:()=>jo});var Ro={join:be,line:Ke,softline:gr,hardline:G,literalline:He,group:Bt,conditionalGroup:dr,fill:Ge,lineSuffix:_e,lineSuffixBoundary:Cr,cursor:xe,breakParent:le,ifBreak:mr,trim:hr,indent:ie,indentIfBreak:Er,align:oe,addAlignmentToDoc:qe,markAsRoot:Fr,dedentToRoot:fr,dedent:pr,hardlineWithoutBreakParent:ke,literallineWithoutBreakParent:_t,label:yr,concat:e=>e},Yo={printDocToString:fe},jo={willBreak:Nr,traverseDoc:Be,findInDoc:Je,mapDoc:Ne,removeLines:Tr,stripTrailingHardline:Xe,replaceEndOfLine:vr,canBreak:Pr};var nu="3.2.5";var tr={};We(tr,{addDanglingComment:()=>X,addLeadingComment:()=>te,addTrailingComment:()=>re,getAlignmentSize:()=>Fe,getIndentSize:()=>uu,getMaxContinuousCount:()=>ou,getNextNonSpaceNonCommentCharacter:()=>iu,getNextNonSpaceNonCommentCharacterIndex:()=>Xo,getStringWidth:()=>we,hasNewline:()=>V,hasNewlineInRange:()=>su,hasSpaces:()=>Du,isNextLineEmpty:()=>ti,isNextLineEmptyAfterIndex:()=>Ct,isPreviousLineEmpty:()=>Qo,makeString:()=>au,skip:()=>de,skipEverythingButNewLine:()=>rt,skipInlineComment:()=>Ee,skipNewline:()=>Y,skipSpaces:()=>N,skipToLineEnd:()=>tt,skipTrailingComment:()=>Ce,skipWhitespace:()=>Vr});function Vo(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let r=t+2;rMath.max(n,o.length/t.length),0)}var ou=zo;function Go(e,t){let r=Ve(e,t);return r===!1?"":e.charAt(r)}var iu=Go;function Ko(e,t,r){for(let n=t;ns===n?s:D===t?"\\"+D:D||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(s)?s:"\\"+s));return t+u+t}var au=qo;function Jo(e,t,r){return Ve(e,r(t))}function Xo(e,t){return arguments.length===2||typeof t=="number"?Ve(e,t):Jo(...arguments)}function Zo(e,t,r){return Pe(e,r(t))}function Qo(e,t){return arguments.length===2||typeof t=="number"?Pe(e,t):Zo(...arguments)}function ei(e,t,r){return Ct(e,r(t))}function ti(e,t){return arguments.length===2||typeof t=="number"?Ct(e,t):ei(...arguments)}function ae(e,t=1){return async(...r)=>{let n=r[t]??{},o=n.plugins??[];return r[t]={...n,plugins:Array.isArray(o)?o:Object.values(o)},e(...r)}}var cu=ae(Zt);async function lu(e,t){let{formatted:r}=await cu(e,{...t,cursorOffset:-1});return r}async function ri(e,t){return await lu(e,t)===e}var ni=ae(ut,0),ui={parse:ae(Zn),formatAST:ae(Qn),formatDoc:ae(eu),printToDoc:ae(tu),printDocToString:ae(ru)};var Qc=rr;export{ui as __debug,ri as check,Qc as default,Qt as doc,lu as format,cu as formatWithCursor,ni as getSupportInfo,tr as util,nu as version}; diff --git a/node_modules/typescript/lib/lib.decorators.d.ts b/node_modules/typescript/lib/lib.decorators.d.ts index 11a8ca6..5ac09b8 100644 --- a/node_modules/typescript/lib/lib.decorators.d.ts +++ b/node_modules/typescript/lib/lib.decorators.d.ts @@ -24,21 +24,18 @@ type ClassMemberDecoratorContext = | ClassGetterDecoratorContext | ClassSetterDecoratorContext | ClassFieldDecoratorContext - | ClassAccessorDecoratorContext - ; + | ClassAccessorDecoratorContext; /** * The decorator context types provided to any decorator. */ type DecoratorContext = | ClassDecoratorContext - | ClassMemberDecoratorContext - ; + | ClassMemberDecoratorContext; type DecoratorMetadataObject = Record & object; -type DecoratorMetadata = - typeof globalThis extends { Symbol: { readonly metadata: symbol } } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined; +type DecoratorMetadata = typeof globalThis extends { Symbol: { readonly metadata: symbol; }; } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined; /** * Context provided to a class decorator. diff --git a/node_modules/typescript/lib/lib.dom.d.ts b/node_modules/typescript/lib/lib.dom.d.ts index 91596a0..ac946ba 100644 --- a/node_modules/typescript/lib/lib.dom.d.ts +++ b/node_modules/typescript/lib/lib.dom.d.ts @@ -1435,6 +1435,7 @@ interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats { keyFramesDecoded?: number; kind: string; lastPacketReceivedTimestamp?: DOMHighResTimeStamp; + mid?: string; nackCount?: number; packetsDiscarded?: number; pliCount?: number; @@ -1449,6 +1450,7 @@ interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats { totalSamplesDuration?: number; totalSamplesReceived?: number; totalSquaredInterFrameDelay?: number; + trackIdentifier: string; } interface RTCLocalSessionDescriptionInit { @@ -21843,7 +21845,9 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */ exportKey(format: "jwk", key: CryptoKey): Promise; exportKey(format: Exclude, key: CryptoKey): Promise; + exportKey(format: KeyFormat, key: CryptoKey): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */ + generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; diff --git a/node_modules/typescript/lib/lib.es2015.collection.d.ts b/node_modules/typescript/lib/lib.es2015.collection.d.ts index f94c485..abeb66b 100644 --- a/node_modules/typescript/lib/lib.es2015.collection.d.ts +++ b/node_modules/typescript/lib/lib.es2015.collection.d.ts @@ -17,7 +17,6 @@ and limitations under the License. /// interface Map { - clear(): void; /** * @returns true if an element in the Map existed and has been removed, or false if the element does not exist. @@ -47,7 +46,7 @@ interface Map { } interface MapConstructor { - new(): Map; + new (): Map; new (entries?: readonly (readonly [K, V])[] | null): Map; readonly prototype: Map; } diff --git a/node_modules/typescript/lib/lib.es2015.core.d.ts b/node_modules/typescript/lib/lib.es2015.core.d.ts index ecd2e02..ab37bc4 100644 --- a/node_modules/typescript/lib/lib.es2015.core.d.ts +++ b/node_modules/typescript/lib/lib.es2015.core.d.ts @@ -553,5 +553,5 @@ interface StringConstructor { * @param template A well-formed template string call site representation. * @param substitutions A set of substitution values. */ - raw(template: { raw: readonly string[] | ArrayLike}, ...substitutions: any[]): string; + raw(template: { raw: readonly string[] | ArrayLike; }, ...substitutions: any[]): string; } diff --git a/node_modules/typescript/lib/lib.es2015.iterable.d.ts b/node_modules/typescript/lib/lib.es2015.iterable.d.ts index 7aa2601..3ad043c 100644 --- a/node_modules/typescript/lib/lib.es2015.iterable.d.ts +++ b/node_modules/typescript/lib/lib.es2015.iterable.d.ts @@ -155,11 +155,11 @@ interface ReadonlyMap { } interface MapConstructor { - new(): Map; + new (): Map; new (iterable?: Iterable | null): Map; } -interface WeakMap { } +interface WeakMap {} interface WeakMapConstructor { new (iterable: Iterable): WeakMap; @@ -207,13 +207,13 @@ interface SetConstructor { new (iterable?: Iterable | null): Set; } -interface WeakSet { } +interface WeakSet {} interface WeakSetConstructor { new (iterable: Iterable): WeakSet; } -interface Promise { } +interface Promise {} interface PromiseConstructor { /** @@ -315,7 +315,6 @@ interface Uint8ClampedArray { interface Uint8ClampedArrayConstructor { new (elements: Iterable): Uint8ClampedArray; - /** * Creates an array from an array-like or iterable object. * @param arrayLike An array-like or iterable object to convert to an array. diff --git a/node_modules/typescript/lib/lib.es2020.bigint.d.ts b/node_modules/typescript/lib/lib.es2020.bigint.d.ts index 73df22e..d6b04d7 100644 --- a/node_modules/typescript/lib/lib.es2020.bigint.d.ts +++ b/node_modules/typescript/lib/lib.es2020.bigint.d.ts @@ -389,9 +389,9 @@ interface BigInt64Array { interface BigInt64ArrayConstructor { readonly prototype: BigInt64Array; - new(length?: number): BigInt64Array; - new(array: Iterable): BigInt64Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array; + new (length?: number): BigInt64Array; + new (array: Iterable): BigInt64Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array; /** The size in bytes of each element in the array. */ readonly BYTES_PER_ELEMENT: number; @@ -661,9 +661,9 @@ interface BigUint64Array { interface BigUint64ArrayConstructor { readonly prototype: BigUint64Array; - new(length?: number): BigUint64Array; - new(array: Iterable): BigUint64Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array; + new (length?: number): BigUint64Array; + new (array: Iterable): BigUint64Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array; /** The size in bytes of each element in the array. */ readonly BYTES_PER_ELEMENT: number; @@ -720,7 +720,7 @@ interface DataView { setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; } -declare namespace Intl{ +declare namespace Intl { interface NumberFormat { format(value: number | bigint): string; resolvedOptions(): ResolvedNumberFormatOptions; diff --git a/node_modules/typescript/lib/lib.es2021.weakref.d.ts b/node_modules/typescript/lib/lib.es2021.weakref.d.ts index 3a8be26..986af60 100644 --- a/node_modules/typescript/lib/lib.es2021.weakref.d.ts +++ b/node_modules/typescript/lib/lib.es2021.weakref.d.ts @@ -35,7 +35,7 @@ interface WeakRefConstructor { * In es2023 the value can be either a symbol or an object, in previous versions only object is permissible. * @param target The target value for the WeakRef instance. */ - new(target: T): WeakRef; + new (target: T): WeakRef; } declare var WeakRef: WeakRefConstructor; @@ -70,7 +70,7 @@ interface FinalizationRegistryConstructor { * Creates a finalization registry with an associated cleanup callback * @param cleanupCallback The callback to call after a value in the registry has been reclaimed. */ - new(cleanupCallback: (heldValue: T) => void): FinalizationRegistry; + new (cleanupCallback: (heldValue: T) => void): FinalizationRegistry; } declare var FinalizationRegistry: FinalizationRegistryConstructor; diff --git a/node_modules/typescript/lib/lib.es2023.array.d.ts b/node_modules/typescript/lib/lib.es2023.array.d.ts index d8d5cc9..bd4db2c 100644 --- a/node_modules/typescript/lib/lib.es2023.array.d.ts +++ b/node_modules/typescript/lib/lib.es2023.array.d.ts @@ -97,11 +97,11 @@ interface ReadonlyArray { */ findLast( predicate: (value: T, index: number, array: readonly T[]) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any + thisArg?: any, ): T | undefined; /** @@ -115,7 +115,7 @@ interface ReadonlyArray { */ findLastIndex( predicate: (value: T, index: number, array: readonly T[]) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -177,13 +177,13 @@ interface Int8Array { predicate: ( value: number, index: number, - array: Int8Array + array: Int8Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: (value: number, index: number, array: Int8Array) => unknown, - thisArg?: any + thisArg?: any, ): number | undefined; /** @@ -197,7 +197,7 @@ interface Int8Array { */ findLastIndex( predicate: (value: number, index: number, array: Int8Array) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -209,7 +209,7 @@ interface Int8Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = Uint8Array.from([11, 2, 22, 1]); * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] @@ -241,13 +241,13 @@ interface Uint8Array { predicate: ( value: number, index: number, - array: Uint8Array + array: Uint8Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: (value: number, index: number, array: Uint8Array) => unknown, - thisArg?: any + thisArg?: any, ): number | undefined; /** @@ -261,7 +261,7 @@ interface Uint8Array { */ findLastIndex( predicate: (value: number, index: number, array: Uint8Array) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -273,7 +273,7 @@ interface Uint8Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = Uint8Array.from([11, 2, 22, 1]); * myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22] @@ -305,17 +305,17 @@ interface Uint8ClampedArray { predicate: ( value: number, index: number, - array: Uint8ClampedArray + array: Uint8ClampedArray, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: ( value: number, index: number, - array: Uint8ClampedArray + array: Uint8ClampedArray, ) => unknown, - thisArg?: any + thisArg?: any, ): number | undefined; /** @@ -331,9 +331,9 @@ interface Uint8ClampedArray { predicate: ( value: number, index: number, - array: Uint8ClampedArray + array: Uint8ClampedArray, ) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -345,7 +345,7 @@ interface Uint8ClampedArray { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = Uint8ClampedArray.from([11, 2, 22, 1]); * myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22] @@ -377,13 +377,13 @@ interface Int16Array { predicate: ( value: number, index: number, - array: Int16Array + array: Int16Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: (value: number, index: number, array: Int16Array) => unknown, - thisArg?: any + thisArg?: any, ): number | undefined; /** @@ -397,7 +397,7 @@ interface Int16Array { */ findLastIndex( predicate: (value: number, index: number, array: Int16Array) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -409,7 +409,7 @@ interface Int16Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = Int16Array.from([11, 2, -22, 1]); * myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11] @@ -441,17 +441,17 @@ interface Uint16Array { predicate: ( value: number, index: number, - array: Uint16Array + array: Uint16Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: ( value: number, index: number, - array: Uint16Array + array: Uint16Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number | undefined; /** @@ -467,9 +467,9 @@ interface Uint16Array { predicate: ( value: number, index: number, - array: Uint16Array + array: Uint16Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -481,7 +481,7 @@ interface Uint16Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = Uint16Array.from([11, 2, 22, 1]); * myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22] @@ -513,13 +513,13 @@ interface Int32Array { predicate: ( value: number, index: number, - array: Int32Array + array: Int32Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: (value: number, index: number, array: Int32Array) => unknown, - thisArg?: any + thisArg?: any, ): number | undefined; /** @@ -533,7 +533,7 @@ interface Int32Array { */ findLastIndex( predicate: (value: number, index: number, array: Int32Array) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -545,7 +545,7 @@ interface Int32Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = Int32Array.from([11, 2, -22, 1]); * myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11] @@ -577,17 +577,17 @@ interface Uint32Array { predicate: ( value: number, index: number, - array: Uint32Array + array: Uint32Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: ( value: number, index: number, - array: Uint32Array + array: Uint32Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number | undefined; /** @@ -603,9 +603,9 @@ interface Uint32Array { predicate: ( value: number, index: number, - array: Uint32Array + array: Uint32Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -617,7 +617,7 @@ interface Uint32Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = Uint32Array.from([11, 2, 22, 1]); * myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22] @@ -649,17 +649,17 @@ interface Float32Array { predicate: ( value: number, index: number, - array: Float32Array + array: Float32Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: ( value: number, index: number, - array: Float32Array + array: Float32Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number | undefined; /** @@ -675,9 +675,9 @@ interface Float32Array { predicate: ( value: number, index: number, - array: Float32Array + array: Float32Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -689,7 +689,7 @@ interface Float32Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = Float32Array.from([11.25, 2, -22.5, 1]); * myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5] @@ -721,17 +721,17 @@ interface Float64Array { predicate: ( value: number, index: number, - array: Float64Array + array: Float64Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: ( value: number, index: number, - array: Float64Array + array: Float64Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number | undefined; /** @@ -747,9 +747,9 @@ interface Float64Array { predicate: ( value: number, index: number, - array: Float64Array + array: Float64Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -761,7 +761,7 @@ interface Float64Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = Float64Array.from([11.25, 2, -22.5, 1]); * myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5] @@ -793,17 +793,17 @@ interface BigInt64Array { predicate: ( value: bigint, index: number, - array: BigInt64Array + array: BigInt64Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: ( value: bigint, index: number, - array: BigInt64Array + array: BigInt64Array, ) => unknown, - thisArg?: any + thisArg?: any, ): bigint | undefined; /** @@ -819,9 +819,9 @@ interface BigInt64Array { predicate: ( value: bigint, index: number, - array: BigInt64Array + array: BigInt64Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -833,7 +833,7 @@ interface BigInt64Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]); * myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n] @@ -865,17 +865,17 @@ interface BigUint64Array { predicate: ( value: bigint, index: number, - array: BigUint64Array + array: BigUint64Array, ) => value is S, - thisArg?: any + thisArg?: any, ): S | undefined; findLast( predicate: ( value: bigint, index: number, - array: BigUint64Array + array: BigUint64Array, ) => unknown, - thisArg?: any + thisArg?: any, ): bigint | undefined; /** @@ -891,9 +891,9 @@ interface BigUint64Array { predicate: ( value: bigint, index: number, - array: BigUint64Array + array: BigUint64Array, ) => unknown, - thisArg?: any + thisArg?: any, ): number; /** @@ -905,7 +905,7 @@ interface BigUint64Array { * Copies and sorts the array. * @param compareFn Function used to determine the order of the elements. It is expected to return * a negative value if the first argument is less than the second argument, zero if they're equal, and a positive - * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order. + * value otherwise. If omitted, the elements are sorted in ascending order. * ```ts * const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]); * myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n] diff --git a/node_modules/typescript/lib/lib.es5.d.ts b/node_modules/typescript/lib/lib.es5.d.ts index a88d3b6..55ce47c 100644 --- a/node_modules/typescript/lib/lib.es5.d.ts +++ b/node_modules/typescript/lib/lib.es5.d.ts @@ -153,7 +153,7 @@ interface Object { } interface ObjectConstructor { - new(value?: any): Object; + new (value?: any): Object; (): any; (value: any): any; @@ -225,7 +225,7 @@ interface ObjectConstructor { * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. * @param o Object on which to lock the attributes. */ - freeze(o: T): Readonly; + freeze(o: T): Readonly; /** * Prevents the modification of existing property attributes and values, and prevents the addition of new properties. @@ -311,7 +311,7 @@ interface FunctionConstructor { * Creates a new function. * @param args A list of arguments the function accepts. */ - new(...args: string[]): Function; + new (...args: string[]): Function; (...args: string[]): Function; readonly prototype: Function; } @@ -532,7 +532,7 @@ interface String { } interface StringConstructor { - new(value?: any): String; + new (value?: any): String; (value?: any): string; readonly prototype: String; fromCharCode(...codes: number[]): string; @@ -549,7 +549,7 @@ interface Boolean { } interface BooleanConstructor { - new(value?: any): Boolean; + new (value?: any): Boolean; (value?: T): boolean; readonly prototype: Boolean; } @@ -586,7 +586,7 @@ interface Number { } interface NumberConstructor { - new(value?: any): Number; + new (value?: any): Number; (value?: any): number; readonly prototype: Number; @@ -638,7 +638,8 @@ interface ImportMeta { * augmented via interface merging. */ interface ImportCallOptions { - assert?: ImportAssertions; + /** @deprecated*/ assert?: ImportAssertions; + with?: ImportAttributes; } /** @@ -648,6 +649,13 @@ interface ImportAssertions { [key: string]: string; } +/** + * The type for the `with` property of the optional second argument to `import()`. + */ +interface ImportAttributes { + [key: string]: string; +} + interface Math { /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */ readonly E: number; @@ -914,8 +922,8 @@ interface Date { } interface DateConstructor { - new(): Date; - new(value: number | string): Date; + new (): Date; + new (value: number | string): Date; /** * Creates a new Date. * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year. @@ -926,7 +934,7 @@ interface DateConstructor { * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds. * @param ms A number from 0 to 999 that specifies the milliseconds. */ - new(year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; + new (year: number, monthIndex: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; (): string; readonly prototype: Date; /** @@ -1014,49 +1022,49 @@ interface RegExp { } interface RegExpConstructor { - new(pattern: RegExp | string): RegExp; - new(pattern: string, flags?: string): RegExp; + new (pattern: RegExp | string): RegExp; + new (pattern: string, flags?: string): RegExp; (pattern: RegExp | string): RegExp; (pattern: string, flags?: string): RegExp; - readonly prototype: RegExp; + readonly "prototype": RegExp; // Non-standard extensions /** @deprecated A legacy feature for browser compatibility */ - $1: string; + "$1": string; /** @deprecated A legacy feature for browser compatibility */ - $2: string; + "$2": string; /** @deprecated A legacy feature for browser compatibility */ - $3: string; + "$3": string; /** @deprecated A legacy feature for browser compatibility */ - $4: string; + "$4": string; /** @deprecated A legacy feature for browser compatibility */ - $5: string; + "$5": string; /** @deprecated A legacy feature for browser compatibility */ - $6: string; + "$6": string; /** @deprecated A legacy feature for browser compatibility */ - $7: string; + "$7": string; /** @deprecated A legacy feature for browser compatibility */ - $8: string; + "$8": string; /** @deprecated A legacy feature for browser compatibility */ - $9: string; + "$9": string; /** @deprecated A legacy feature for browser compatibility */ - input: string; + "input": string; /** @deprecated A legacy feature for browser compatibility */ - $_: string; + "$_": string; /** @deprecated A legacy feature for browser compatibility */ - lastMatch: string; + "lastMatch": string; /** @deprecated A legacy feature for browser compatibility */ "$&": string; /** @deprecated A legacy feature for browser compatibility */ - lastParen: string; + "lastParen": string; /** @deprecated A legacy feature for browser compatibility */ "$+": string; /** @deprecated A legacy feature for browser compatibility */ - leftContext: string; + "leftContext": string; /** @deprecated A legacy feature for browser compatibility */ "$`": string; /** @deprecated A legacy feature for browser compatibility */ - rightContext: string; + "rightContext": string; /** @deprecated A legacy feature for browser compatibility */ "$'": string; } @@ -1070,7 +1078,7 @@ interface Error { } interface ErrorConstructor { - new(message?: string): Error; + new (message?: string): Error; (message?: string): Error; readonly prototype: Error; } @@ -1081,7 +1089,7 @@ interface EvalError extends Error { } interface EvalErrorConstructor extends ErrorConstructor { - new(message?: string): EvalError; + new (message?: string): EvalError; (message?: string): EvalError; readonly prototype: EvalError; } @@ -1092,7 +1100,7 @@ interface RangeError extends Error { } interface RangeErrorConstructor extends ErrorConstructor { - new(message?: string): RangeError; + new (message?: string): RangeError; (message?: string): RangeError; readonly prototype: RangeError; } @@ -1103,7 +1111,7 @@ interface ReferenceError extends Error { } interface ReferenceErrorConstructor extends ErrorConstructor { - new(message?: string): ReferenceError; + new (message?: string): ReferenceError; (message?: string): ReferenceError; readonly prototype: ReferenceError; } @@ -1114,7 +1122,7 @@ interface SyntaxError extends Error { } interface SyntaxErrorConstructor extends ErrorConstructor { - new(message?: string): SyntaxError; + new (message?: string): SyntaxError; (message?: string): SyntaxError; readonly prototype: SyntaxError; } @@ -1125,7 +1133,7 @@ interface TypeError extends Error { } interface TypeErrorConstructor extends ErrorConstructor { - new(message?: string): TypeError; + new (message?: string): TypeError; (message?: string): TypeError; readonly prototype: TypeError; } @@ -1136,7 +1144,7 @@ interface URIError extends Error { } interface URIErrorConstructor extends ErrorConstructor { - new(message?: string): URIError; + new (message?: string): URIError; (message?: string): URIError; readonly prototype: URIError; } @@ -1172,7 +1180,6 @@ interface JSON { */ declare var JSON: JSON; - ///////////////////////////// /// ECMAScript Array API (specially handled by compiler) ///////////////////////////// @@ -1496,7 +1503,7 @@ interface Array { } interface ArrayConstructor { - new(arrayLength?: number): any[]; + new (arrayLength?: number): any[]; new (arrayLength: number): T[]; new (...items: T[]): T[]; (arrayLength?: number): any[]; @@ -1552,13 +1559,12 @@ interface Promise { /** * Recursively unwraps the "awaited type" of a type. Non-promise "thenables" should resolve to `never`. This emulates the behavior of `await`. */ -type Awaited = - T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode - T extends object & { then(onfulfilled: infer F, ...args: infer _): any } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped - F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument - Awaited : // recursively unwrap the value - never : // the argument to `then` was not callable - T; // non-object or non-thenable +type Awaited = T extends null | undefined ? T : // special case for `null | undefined` when not in `--strictNullChecks` mode + T extends object & { then(onfulfilled: infer F, ...args: infer _): any; } ? // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped + F extends ((value: infer V, ...args: infer _) => any) ? // if the argument to `then` is callable, extracts the first argument + Awaited : // recursively unwrap the value + never : // the argument to `then` was not callable + T; // non-object or non-thenable interface ArrayLike { readonly length: number; @@ -1663,7 +1669,7 @@ type Uncapitalize = intrinsic; /** * Marker for contextual 'this' type */ -interface ThisType { } +interface ThisType {} /** * Stores types to be used with WeakSet, WeakMap, WeakRef, and FinalizationRegistry @@ -1702,7 +1708,7 @@ type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes]; interface ArrayBufferConstructor { readonly prototype: ArrayBuffer; - new(byteLength: number): ArrayBuffer; + new (byteLength: number): ArrayBuffer; isView(arg: any): arg is ArrayBufferView; } declare var ArrayBuffer: ArrayBufferConstructor; @@ -1854,7 +1860,7 @@ interface DataView { interface DataViewConstructor { readonly prototype: DataView; - new(buffer: ArrayBufferLike & { BYTES_PER_ELEMENT?: never }, byteOffset?: number, byteLength?: number): DataView; + new (buffer: ArrayBufferLike & { BYTES_PER_ELEMENT?: never; }, byteOffset?: number, byteLength?: number): DataView; } declare var DataView: DataViewConstructor; @@ -2107,9 +2113,9 @@ interface Int8Array { } interface Int8ArrayConstructor { readonly prototype: Int8Array; - new(length: number): Int8Array; - new(array: ArrayLike | ArrayBufferLike): Int8Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array; + new (length: number): Int8Array; + new (array: ArrayLike | ArrayBufferLike): Int8Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array; /** * The size in bytes of each element in the array. @@ -2135,8 +2141,6 @@ interface Int8ArrayConstructor { * @param thisArg Value of 'this' used to invoke the mapfn. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array; - - } declare var Int8Array: Int8ArrayConstructor; @@ -2390,9 +2394,9 @@ interface Uint8Array { interface Uint8ArrayConstructor { readonly prototype: Uint8Array; - new(length: number): Uint8Array; - new(array: ArrayLike | ArrayBufferLike): Uint8Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array; + new (length: number): Uint8Array; + new (array: ArrayLike | ArrayBufferLike): Uint8Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array; /** * The size in bytes of each element in the array. @@ -2418,7 +2422,6 @@ interface Uint8ArrayConstructor { * @param thisArg Value of 'this' used to invoke the mapfn. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array; - } declare var Uint8Array: Uint8ArrayConstructor; @@ -2672,9 +2675,9 @@ interface Uint8ClampedArray { interface Uint8ClampedArrayConstructor { readonly prototype: Uint8ClampedArray; - new(length: number): Uint8ClampedArray; - new(array: ArrayLike | ArrayBufferLike): Uint8ClampedArray; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray; + new (length: number): Uint8ClampedArray; + new (array: ArrayLike | ArrayBufferLike): Uint8ClampedArray; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray; /** * The size in bytes of each element in the array. @@ -2952,9 +2955,9 @@ interface Int16Array { interface Int16ArrayConstructor { readonly prototype: Int16Array; - new(length: number): Int16Array; - new(array: ArrayLike | ArrayBufferLike): Int16Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array; + new (length: number): Int16Array; + new (array: ArrayLike | ArrayBufferLike): Int16Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array; /** * The size in bytes of each element in the array. @@ -2980,8 +2983,6 @@ interface Int16ArrayConstructor { * @param thisArg Value of 'this' used to invoke the mapfn. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array; - - } declare var Int16Array: Int16ArrayConstructor; @@ -3235,9 +3236,9 @@ interface Uint16Array { interface Uint16ArrayConstructor { readonly prototype: Uint16Array; - new(length: number): Uint16Array; - new(array: ArrayLike | ArrayBufferLike): Uint16Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array; + new (length: number): Uint16Array; + new (array: ArrayLike | ArrayBufferLike): Uint16Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array; /** * The size in bytes of each element in the array. @@ -3263,8 +3264,6 @@ interface Uint16ArrayConstructor { * @param thisArg Value of 'this' used to invoke the mapfn. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array; - - } declare var Uint16Array: Uint16ArrayConstructor; /** @@ -3517,9 +3516,9 @@ interface Int32Array { interface Int32ArrayConstructor { readonly prototype: Int32Array; - new(length: number): Int32Array; - new(array: ArrayLike | ArrayBufferLike): Int32Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array; + new (length: number): Int32Array; + new (array: ArrayLike | ArrayBufferLike): Int32Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array; /** * The size in bytes of each element in the array. @@ -3545,7 +3544,6 @@ interface Int32ArrayConstructor { * @param thisArg Value of 'this' used to invoke the mapfn. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array; - } declare var Int32Array: Int32ArrayConstructor; @@ -3798,9 +3796,9 @@ interface Uint32Array { interface Uint32ArrayConstructor { readonly prototype: Uint32Array; - new(length: number): Uint32Array; - new(array: ArrayLike | ArrayBufferLike): Uint32Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array; + new (length: number): Uint32Array; + new (array: ArrayLike | ArrayBufferLike): Uint32Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array; /** * The size in bytes of each element in the array. @@ -3826,7 +3824,6 @@ interface Uint32ArrayConstructor { * @param thisArg Value of 'this' used to invoke the mapfn. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array; - } declare var Uint32Array: Uint32ArrayConstructor; @@ -4080,9 +4077,9 @@ interface Float32Array { interface Float32ArrayConstructor { readonly prototype: Float32Array; - new(length: number): Float32Array; - new(array: ArrayLike | ArrayBufferLike): Float32Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array; + new (length: number): Float32Array; + new (array: ArrayLike | ArrayBufferLike): Float32Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array; /** * The size in bytes of each element in the array. @@ -4108,8 +4105,6 @@ interface Float32ArrayConstructor { * @param thisArg Value of 'this' used to invoke the mapfn. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array; - - } declare var Float32Array: Float32ArrayConstructor; @@ -4363,9 +4358,9 @@ interface Float64Array { interface Float64ArrayConstructor { readonly prototype: Float64Array; - new(length: number): Float64Array; - new(array: ArrayLike | ArrayBufferLike): Float64Array; - new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array; + new (length: number): Float64Array; + new (array: ArrayLike | ArrayBufferLike): Float64Array; + new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array; /** * The size in bytes of each element in the array. @@ -4391,7 +4386,6 @@ interface Float64ArrayConstructor { * @param thisArg Value of 'this' used to invoke the mapfn. */ from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array; - } declare var Float64Array: Float64ArrayConstructor; @@ -4425,7 +4419,7 @@ declare namespace Intl { resolvedOptions(): ResolvedCollatorOptions; } var Collator: { - new(locales?: string | string[], options?: CollatorOptions): Collator; + new (locales?: string | string[], options?: CollatorOptions): Collator; (locales?: string | string[], options?: CollatorOptions): Collator; supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[]; }; @@ -4461,7 +4455,7 @@ declare namespace Intl { resolvedOptions(): ResolvedNumberFormatOptions; } var NumberFormat: { - new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat; + new (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; (locales?: string | string[], options?: NumberFormatOptions): NumberFormat; supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[]; readonly prototype: NumberFormat; @@ -4505,7 +4499,7 @@ declare namespace Intl { resolvedOptions(): ResolvedDateTimeFormatOptions; } var DateTimeFormat: { - new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; + new (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat; supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[]; readonly prototype: DateTimeFormat; diff --git a/node_modules/typescript/lib/lib.webworker.d.ts b/node_modules/typescript/lib/lib.webworker.d.ts index e371b06..82f0b0b 100644 --- a/node_modules/typescript/lib/lib.webworker.d.ts +++ b/node_modules/typescript/lib/lib.webworker.d.ts @@ -5340,7 +5340,9 @@ interface SubtleCrypto { /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */ exportKey(format: "jwk", key: CryptoKey): Promise; exportKey(format: Exclude, key: CryptoKey): Promise; + exportKey(format: KeyFormat, key: CryptoKey): Promise; /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */ + generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray): Promise; generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; diff --git a/node_modules/typescript/lib/tsc.js b/node_modules/typescript/lib/tsc.js index 8c0c6bf..d98c47c 100644 --- a/node_modules/typescript/lib/tsc.js +++ b/node_modules/typescript/lib/tsc.js @@ -17,8 +17,8 @@ and limitations under the License. "use strict"; // src/compiler/corePublic.ts -var versionMajorMinor = "5.2"; -var version = "5.2.2"; +var versionMajorMinor = "5.3"; +var version = "5.3.3"; // src/compiler/core.ts var emptyArray = []; @@ -973,10 +973,7 @@ function getStringComparer(ignoreCase) { return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive; } var createUIStringComparer = (() => { - let defaultComparer; - let enUSComparer; - const stringComparerFactory = getStringComparerFactory(); - return createStringComparer; + return createIntlCollatorStringComparer; function compareWithCallback(a, b, comparer) { if (a === b) return 0 /* EqualTo */; @@ -991,41 +988,6 @@ var createUIStringComparer = (() => { const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare; return (a, b) => compareWithCallback(a, b, comparer); } - function createLocaleCompareStringComparer(locale) { - if (locale !== void 0) - return createFallbackStringComparer(); - return (a, b) => compareWithCallback(a, b, compareStrings); - function compareStrings(a, b) { - return a.localeCompare(b); - } - } - function createFallbackStringComparer() { - return (a, b) => compareWithCallback(a, b, compareDictionaryOrder); - function compareDictionaryOrder(a, b) { - return compareStrings(a.toUpperCase(), b.toUpperCase()) || compareStrings(a, b); - } - function compareStrings(a, b) { - return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */; - } - } - function getStringComparerFactory() { - if (typeof Intl === "object" && typeof Intl.Collator === "function") { - return createIntlCollatorStringComparer; - } - if (typeof String.prototype.localeCompare === "function" && typeof String.prototype.toLocaleUpperCase === "function" && "a".localeCompare("B") < 0) { - return createLocaleCompareStringComparer; - } - return createFallbackStringComparer; - } - function createStringComparer(locale) { - if (locale === void 0) { - return defaultComparer || (defaultComparer = stringComparerFactory(locale)); - } else if (locale === "en-US") { - return enUSComparer || (enUSComparer = stringComparerFactory(locale)); - } else { - return stringComparerFactory(locale); - } - } })(); var uiComparerCaseSensitive; var uiLocale; @@ -1111,9 +1073,6 @@ function endsWith(str, suffix) { function removeSuffix(str, suffix) { return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : str; } -function stringContains(str, substring) { - return str.indexOf(substring) !== -1; -} function orderedRemoveItem(array, item) { for (let i = 0; i < array.length; i++) { if (array[i] === item) { @@ -1261,12 +1220,6 @@ function cartesianProductWorker(arrays, result, outer, index) { } } } -function padLeft(s, length2, padString = " ") { - return length2 <= s.length ? s : padString.repeat(length2 - s.length) + s; -} -function padRight(s, length2, padString = " ") { - return length2 <= s.length ? s : s + padString.repeat(length2 - s.length); -} function takeWhile(array, predicate) { if (array) { const len = array.length; @@ -1287,18 +1240,6 @@ function skipWhile(array, predicate) { return array.slice(index); } } -var trimString = !!String.prototype.trim ? (s) => s.trim() : (s) => trimStringEnd(trimStringStart(s)); -var trimStringEnd = !!String.prototype.trimEnd ? (s) => s.trimEnd() : trimEndImpl; -var trimStringStart = !!String.prototype.trimStart ? (s) => s.trimStart() : (s) => s.replace(/^\s+/g, ""); -function trimEndImpl(s) { - let end = s.length - 1; - while (end >= 0) { - if (!isWhiteSpaceLike(s.charCodeAt(end))) - break; - end--; - } - return s.slice(0, end + 1); -} function isNodeLikeSystem() { return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object"; } @@ -1739,17 +1680,21 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${flowHeader}${remainingFlags ? ` (${formatFlowFlags(remainingFlags)})` : ""}`; } }, - __debugFlowFlags: { get() { - return formatEnum( - this.flags, - FlowFlags, - /*isFlags*/ - true - ); - } }, - __debugToString: { value() { - return formatControlFlowGraph(this); - } } + __debugFlowFlags: { + get() { + return formatEnum( + this.flags, + FlowFlags, + /*isFlags*/ + true + ); + } + }, + __debugToString: { + value() { + return formatControlFlowGraph(this); + } + } }); } } @@ -1808,25 +1753,31 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${symbolHeader} '${symbolName(this)}'${remainingSymbolFlags ? ` (${formatSymbolFlags(remainingSymbolFlags)})` : ""}`; } }, - __debugFlags: { get() { - return formatSymbolFlags(this.flags); - } } + __debugFlags: { + get() { + return formatSymbolFlags(this.flags); + } + } }); Object.defineProperties(objectAllocator.getTypeConstructor().prototype, { // for use with vscode-js-debug's new customDescriptionGenerator in launch.json __tsDebuggerDisplay: { value() { - const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}` : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type"; + const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type"; const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0; return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`; } }, - __debugFlags: { get() { - return formatTypeFlags(this.flags); - } }, - __debugObjectFlags: { get() { - return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : ""; - } }, + __debugFlags: { + get() { + return formatTypeFlags(this.flags); + } + }, + __debugObjectFlags: { + get() { + return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : ""; + } + }, __debugTypeToString: { value() { let text = weakTypeTextMap.get(this); @@ -1839,13 +1790,17 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, } }); Object.defineProperties(objectAllocator.getSignatureConstructor().prototype, { - __debugFlags: { get() { - return formatSignatureFlags(this.flags); - } }, - __debugSignatureToString: { value() { - var _a; - return (_a = this.checker) == null ? void 0 : _a.signatureToString(this); - } } + __debugFlags: { + get() { + return formatSignatureFlags(this.flags); + } + }, + __debugSignatureToString: { + value() { + var _a; + return (_a = this.checker) == null ? void 0 : _a.signatureToString(this); + } + } }); const nodeConstructors = [ objectAllocator.getNodeConstructor(), @@ -1863,24 +1818,36 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${nodeHeader}${this.flags ? ` (${formatNodeFlags(this.flags)})` : ""}`; } }, - __debugKind: { get() { - return formatSyntaxKind(this.kind); - } }, - __debugNodeFlags: { get() { - return formatNodeFlags(this.flags); - } }, - __debugModifierFlags: { get() { - return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); - } }, - __debugTransformFlags: { get() { - return formatTransformFlags(this.transformFlags); - } }, - __debugIsParseTreeNode: { get() { - return isParseTreeNode(this); - } }, - __debugEmitFlags: { get() { - return formatEmitFlags(getEmitFlags(this)); - } }, + __debugKind: { + get() { + return formatSyntaxKind(this.kind); + } + }, + __debugNodeFlags: { + get() { + return formatNodeFlags(this.flags); + } + }, + __debugModifierFlags: { + get() { + return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); + } + }, + __debugTransformFlags: { + get() { + return formatTransformFlags(this.transformFlags); + } + }, + __debugIsParseTreeNode: { + get() { + return isParseTreeNode(this); + } + }, + __debugEmitFlags: { + get() { + return formatEmitFlags(getEmitFlags(this)); + } + }, __debugGetText: { value(includeTrivia) { if (nodeIsSynthesized(this)) @@ -2460,18 +2427,18 @@ var hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i; var rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i; function parseRange(text) { const alternatives = []; - for (let range of trimString(text).split(logicalOrRegExp)) { + for (let range of text.trim().split(logicalOrRegExp)) { if (!range) continue; const comparators = []; - range = trimString(range); + range = range.trim(); const match = hyphenRegExp.exec(range); if (match) { if (!parseHyphen(match[1], match[2], comparators)) return void 0; } else { for (const simple of range.split(whitespaceRegExp)) { - const match2 = rangeRegExp.exec(trimString(simple)); + const match2 = rangeRegExp.exec(simple.trim()); if (!match2 || !parseComparator(match2[1], match2[2], comparators)) return void 0; } @@ -2520,15 +2487,21 @@ function parseComparator(operator, text, comparators) { switch (operator) { case "~": comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - isWildcard(minor) ? "major" : "minor" - ))); + comparators.push(createComparator( + "<", + version2.increment( + isWildcard(minor) ? "major" : "minor" + ) + )); break; case "^": comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch" - ))); + comparators.push(createComparator( + "<", + version2.increment( + version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch" + ) + )); break; case "<": case ">=": @@ -2807,11 +2780,7 @@ var tracingEnabled; const meta = { cat: "__metadata", ph: "M", ts: 1e3 * timestamp(), pid: 1, tid: 1 }; fs.writeSync( traceFd, - "[\n" + [ - { name: "process_name", args: { name: "tsc" }, ...meta }, - { name: "thread_name", args: { name: "Main" }, ...meta }, - { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" } - ].map((v) => JSON.stringify(v)).join(",\n") + "[\n" + [{ name: "process_name", args: { name: "tsc" }, ...meta }, { name: "thread_name", args: { name: "Main" }, ...meta }, { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" }].map((v) => JSON.stringify(v)).join(",\n") ); } tracingEnabled2.startTracing = startTracing2; @@ -3343,8 +3312,10 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["DefaultClause"] = 297] = "DefaultClause"; SyntaxKind4[SyntaxKind4["HeritageClause"] = 298] = "HeritageClause"; SyntaxKind4[SyntaxKind4["CatchClause"] = 299] = "CatchClause"; - SyntaxKind4[SyntaxKind4["AssertClause"] = 300] = "AssertClause"; - SyntaxKind4[SyntaxKind4["AssertEntry"] = 301] = "AssertEntry"; + SyntaxKind4[SyntaxKind4["ImportAttributes"] = 300] = "ImportAttributes"; + SyntaxKind4[SyntaxKind4["ImportAttribute"] = 301] = "ImportAttribute"; + SyntaxKind4[SyntaxKind4["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause"; + SyntaxKind4[SyntaxKind4["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry"; SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 303] = "PropertyAssignment"; SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; @@ -3489,32 +3460,43 @@ var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { })(NodeFlags || {}); var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { ModifierFlags3[ModifierFlags3["None"] = 0] = "None"; - ModifierFlags3[ModifierFlags3["Export"] = 1] = "Export"; - ModifierFlags3[ModifierFlags3["Ambient"] = 2] = "Ambient"; - ModifierFlags3[ModifierFlags3["Public"] = 4] = "Public"; - ModifierFlags3[ModifierFlags3["Private"] = 8] = "Private"; - ModifierFlags3[ModifierFlags3["Protected"] = 16] = "Protected"; - ModifierFlags3[ModifierFlags3["Static"] = 32] = "Static"; - ModifierFlags3[ModifierFlags3["Readonly"] = 64] = "Readonly"; - ModifierFlags3[ModifierFlags3["Accessor"] = 128] = "Accessor"; - ModifierFlags3[ModifierFlags3["Abstract"] = 256] = "Abstract"; - ModifierFlags3[ModifierFlags3["Async"] = 512] = "Async"; - ModifierFlags3[ModifierFlags3["Default"] = 1024] = "Default"; - ModifierFlags3[ModifierFlags3["Const"] = 2048] = "Const"; - ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 4096] = "HasComputedJSDocModifiers"; - ModifierFlags3[ModifierFlags3["Deprecated"] = 8192] = "Deprecated"; - ModifierFlags3[ModifierFlags3["Override"] = 16384] = "Override"; - ModifierFlags3[ModifierFlags3["In"] = 32768] = "In"; - ModifierFlags3[ModifierFlags3["Out"] = 65536] = "Out"; - ModifierFlags3[ModifierFlags3["Decorator"] = 131072] = "Decorator"; + ModifierFlags3[ModifierFlags3["Public"] = 1] = "Public"; + ModifierFlags3[ModifierFlags3["Private"] = 2] = "Private"; + ModifierFlags3[ModifierFlags3["Protected"] = 4] = "Protected"; + ModifierFlags3[ModifierFlags3["Readonly"] = 8] = "Readonly"; + ModifierFlags3[ModifierFlags3["Override"] = 16] = "Override"; + ModifierFlags3[ModifierFlags3["Export"] = 32] = "Export"; + ModifierFlags3[ModifierFlags3["Abstract"] = 64] = "Abstract"; + ModifierFlags3[ModifierFlags3["Ambient"] = 128] = "Ambient"; + ModifierFlags3[ModifierFlags3["Static"] = 256] = "Static"; + ModifierFlags3[ModifierFlags3["Accessor"] = 512] = "Accessor"; + ModifierFlags3[ModifierFlags3["Async"] = 1024] = "Async"; + ModifierFlags3[ModifierFlags3["Default"] = 2048] = "Default"; + ModifierFlags3[ModifierFlags3["Const"] = 4096] = "Const"; + ModifierFlags3[ModifierFlags3["In"] = 8192] = "In"; + ModifierFlags3[ModifierFlags3["Out"] = 16384] = "Out"; + ModifierFlags3[ModifierFlags3["Decorator"] = 32768] = "Decorator"; + ModifierFlags3[ModifierFlags3["Deprecated"] = 65536] = "Deprecated"; + ModifierFlags3[ModifierFlags3["JSDocPublic"] = 8388608] = "JSDocPublic"; + ModifierFlags3[ModifierFlags3["JSDocPrivate"] = 16777216] = "JSDocPrivate"; + ModifierFlags3[ModifierFlags3["JSDocProtected"] = 33554432] = "JSDocProtected"; + ModifierFlags3[ModifierFlags3["JSDocReadonly"] = 67108864] = "JSDocReadonly"; + ModifierFlags3[ModifierFlags3["JSDocOverride"] = 134217728] = "JSDocOverride"; + ModifierFlags3[ModifierFlags3["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers"; + ModifierFlags3[ModifierFlags3["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers"; + ModifierFlags3[ModifierFlags3["SyntacticModifiers"] = 65535] = "SyntacticModifiers"; + ModifierFlags3[ModifierFlags3["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers"; + ModifierFlags3[ModifierFlags3["JSDocOnlyModifiers"] = 65536 /* Deprecated */] = "JSDocOnlyModifiers"; + ModifierFlags3[ModifierFlags3["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers"; + ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers"; ModifierFlags3[ModifierFlags3["HasComputedFlags"] = 536870912] = "HasComputedFlags"; - ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 28] = "AccessibilityModifier"; - ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 16476] = "ParameterPropertyModifier"; - ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 24] = "NonPublicAccessibilityModifier"; - ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 117086] = "TypeScriptModifier"; - ModifierFlags3[ModifierFlags3["ExportDefault"] = 1025] = "ExportDefault"; - ModifierFlags3[ModifierFlags3["All"] = 258047] = "All"; - ModifierFlags3[ModifierFlags3["Modifier"] = 126975] = "Modifier"; + ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 7] = "AccessibilityModifier"; + ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier"; + ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier"; + ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 28895] = "TypeScriptModifier"; + ModifierFlags3[ModifierFlags3["ExportDefault"] = 2080] = "ExportDefault"; + ModifierFlags3[ModifierFlags3["All"] = 131071] = "All"; + ModifierFlags3[ModifierFlags3["Modifier"] = 98303] = "Modifier"; return ModifierFlags3; })(ModifierFlags || {}); var RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => { @@ -3696,7 +3678,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => { TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive"; TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable"; TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable"; - TypeFlags2[TypeFlags2["ObjectFlagsType"] = 138117121] = "ObjectFlagsType"; + TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType"; TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; @@ -3735,6 +3717,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => { ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface"; ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening"; ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags"; + ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped"; ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask"; ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread"; ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType"; @@ -4489,11 +4472,11 @@ function createDirectoryWatcherSupportingRecursive({ return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory); } function isInPath(path, searchPath) { - if (stringContains(path, searchPath)) + if (path.includes(searchPath)) return true; if (useCaseSensitiveFileNames2) return false; - return stringContains(toCanonicalFilePath(path), searchPath); + return toCanonicalFilePath(path).includes(searchPath); } } function createFileWatcherCallback(callback) { @@ -5297,7 +5280,9 @@ var sys = (() => { })(); if (sys && sys.getEnvironmentVariable) { setCustomPollingValues(sys); - Debug.setAssertionLevel(/^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */); + Debug.setAssertionLevel( + /^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */ + ); } if (sys && sys.debugMode) { Debug.isDebugging = true; @@ -5328,7 +5313,7 @@ function pathIsBareSpecifier(path) { return !pathIsAbsolute(path) && !pathIsRelative(path); } function hasExtension(fileName) { - return stringContains(getBaseFileName(fileName), "."); + return getBaseFileName(fileName).includes("."); } function fileExtensionIs(path, extension) { return path.length > extension.length && endsWith(path, extension); @@ -5473,7 +5458,7 @@ function getPathFromPathComponents(pathComponents2, length2) { return root + pathComponents2.slice(1, length2).join(directorySeparator); } function normalizeSlashes(path) { - return path.indexOf("\\") !== -1 ? path.replace(backslashRegExp, directorySeparator) : path; + return path.includes("\\") ? path.replace(backslashRegExp, directorySeparator) : path; } function reducePathComponents(components) { if (!some(components)) @@ -6082,9 +6067,8 @@ var Diagnostics = { _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: diag(1448, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."), Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, 3 /* Message */, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), - Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"), + Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"), Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, 1 /* Error */, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), - resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, 1 /* Error */, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."), resolution_mode_should_be_either_require_or_import: diag(1453, 1 /* Error */, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, 1 /* Error */, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), @@ -6094,6 +6078,8 @@ var Diagnostics = { File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, 3 /* Message */, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`), File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, 3 /* Message */, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`), File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, 3 /* Message */, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), + resolution_mode_is_the_only_valid_key_for_type_import_attributes: diag(1463, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", "'resolution-mode' is the only valid key for type import attributes."), + Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1464, 1 /* Error */, "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", "Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."), The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, 1 /* Error */, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, 1 /* Error */, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), @@ -6120,6 +6106,7 @@ var Diagnostics = { The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), + Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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: diag(2201, 1 /* 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: diag( @@ -6226,7 +6213,7 @@ var Diagnostics = { An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, 1 /* 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: diag(2357, 1 /* 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: diag(2358, 1 /* 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: diag(2359, 1 /* 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_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: diag(2359, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."), The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, 1 /* 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: diag(2363, 1 /* 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: diag(2364, 1 /* 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."), @@ -6649,15 +6636,15 @@ var Diagnostics = { Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), + Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2823, 1 /* Error */, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2823", "Import attributes are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), - Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), + Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."), Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), - An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"), - The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, 1 /* Error */, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."), _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), @@ -6670,6 +6657,16 @@ var Diagnostics = { await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), await_using_statements_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: diag(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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."), Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), + Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."), + Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."), + Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."), + Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."), + Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."), + The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."), + An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."), + Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."), + A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."), + A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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: diag(4002, 1 /* 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: diag(4004, 1 /* 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}'."), @@ -6778,7 +6775,6 @@ var Diagnostics = { This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, 1 /* Error */, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), The_current_host_does_not_support_the_0_option: diag(5001, 1 /* 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: diag(5009, 1 /* 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: diag(5010, 1 /* 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}'."), @@ -7511,6 +7507,7 @@ var Diagnostics = { Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, 1 /* Error */, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), _0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17019, 1 /* Error */, "_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019", "'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), _0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17020, 1 /* Error */, "_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020", "'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + Unicode_escape_sequence_cannot_appear_here: diag(17021, 1 /* Error */, "Unicode_escape_sequence_cannot_appear_here_17021", "Unicode escape sequence cannot appear here."), Circularity_detected_while_resolving_configuration_Colon_0: diag(18e3, 1 /* Error */, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), The_files_list_in_config_file_0_is_empty: diag(18002, 1 /* 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: diag(18003, 1 /* 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}'."), @@ -7716,7 +7713,7 @@ var Diagnostics = { Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), - Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"), + Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"), Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), @@ -7960,6 +7957,7 @@ var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 18 var unicodeESNextIdentifierPart = [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]; var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/; var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/; +var jsDocSeeOrLink = /@(?:see|link)/i; function lookupInUnicodeMap(code, map2) { if (code < map2[0]) { return false; @@ -8445,6 +8443,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan var tokenFlags; var commentDirectives; var inJSDocType = 0; + var scriptKind = 0 /* Unknown */; + var jsDocParsingMode = 0 /* ParseAll */; setText(text, start, length2); var scanner = { getTokenFullStart: () => fullStartPos, @@ -8488,6 +8488,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan setText, setScriptTarget, setLanguageVariant, + setScriptKind, + setJSDocParsingMode, setOnError, resetTokenState, setTextPos: resetTokenState, @@ -8741,7 +8743,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan start2 = pos; continue; } - if (isLineBreak(ch) && !jsxAttributeString) { + if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) { result += text.substring(start2, pos); tokenFlags |= 4 /* Unterminated */; error(Diagnostics.Unterminated_string_literal); @@ -8830,7 +8832,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { const code = parseInt(text.substring(start2 + 1, pos), 8); - error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0")); + error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + code.toString(16).padStart(2, "0")); return String.fromCharCode(code); } return text.substring(start2, pos); @@ -9266,9 +9268,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { pos += 2; - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */) { - tokenFlags |= 2 /* PrecedingJSDocComment */; - } + const isJSDoc2 = text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */; let commentClosed = false; let lastLineStart = tokenStart; while (pos < end) { @@ -9284,6 +9284,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan tokenFlags |= 1 /* PrecedingLineBreak */; } } + if (isJSDoc2 && shouldParseJSDoc()) { + tokenFlags |= 2 /* PrecedingJSDocComment */; + } commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); if (!commentClosed) { error(Diagnostics.Asterisk_Slash_expected); @@ -9540,6 +9543,21 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } } } + function shouldParseJSDoc() { + switch (jsDocParsingMode) { + case 0 /* ParseAll */: + return true; + case 1 /* ParseNone */: + return false; + } + if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) { + return true; + } + if (jsDocParsingMode === 3 /* ParseForTypeInfo */) { + return false; + } + return jsDocSeeOrLink.test(text.slice(fullStartPos, pos)); + } function reScanInvalidIdentifier() { Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); pos = tokenStart = fullStartPos; @@ -9633,7 +9651,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token; } function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) { - const type = getDirectiveFromComment(trimStringStart(text2), commentDirectiveRegEx); + const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx); if (type === void 0) { return commentDirectives2; } @@ -9954,6 +9972,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan function setLanguageVariant(variant) { languageVariant = variant; } + function setScriptKind(kind) { + scriptKind = kind; + } + function setJSDocParsingMode(kind) { + jsDocParsingMode = kind; + } function resetTokenState(position) { Debug.assert(position >= 0); pos = position; @@ -9967,20 +9991,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan inJSDocType += inType ? 1 : -1; } } -var codePointAt = String.prototype.codePointAt ? (s, i) => s.codePointAt(i) : function codePointAt2(str, i) { - const size = str.length; - if (i < 0 || i >= size) { - return void 0; - } - const first2 = str.charCodeAt(i); - if (first2 >= 55296 && first2 <= 56319 && size > i + 1) { - const second = str.charCodeAt(i + 1); - if (second >= 56320 && second <= 57343) { - return (first2 - 55296) * 1024 + second - 56320 + 65536; - } - } - return first2; -}; +function codePointAt(s, i) { + return s.codePointAt(i); +} function charSize(ch) { if (ch >= 65536) { return 2; @@ -10070,7 +10083,7 @@ function createTextChangeRange(span, newLength) { } var unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); function isParameterPropertyDeclaration(node, parent) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent.kind === 176 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) && parent.kind === 176 /* Constructor */; } function walkUpBindingElementsAndPatterns(binding) { let node = binding.parent; @@ -10345,7 +10358,7 @@ function getDecorators(node) { } } function getModifiers(node) { - if (hasSyntacticModifier(node, 126975 /* Modifier */)) { + if (hasSyntacticModifier(node, 98303 /* Modifier */)) { return filter(node.modifiers, isModifier); } } @@ -10696,7 +10709,7 @@ function isTypeOnlyExportDeclaration(node) { function isTypeOnlyImportOrExportDeclaration(node) { return isTypeOnlyImportDeclaration(node) || isTypeOnlyExportDeclaration(node); } -function isAssertionKey(node) { +function isImportAttributeName(node) { return isStringLiteral(node) || isIdentifier(node); } function isGeneratedIdentifier(node) { @@ -10739,7 +10752,7 @@ function isModifierKind(token) { return false; } function isParameterPropertyModifier(kind) { - return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); + return !!(modifierToFlag(kind) & 31 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; @@ -10816,6 +10829,16 @@ function isAccessor(node) { function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } +function isClassInstanceProperty(node) { + if (isInJSFile(node) && isExpandoPropertyDeclaration(node)) { + return (!isBindableStaticAccessExpression(node) || !isPrototypeAccess(node.expression)) && !isBindableStaticNameExpression( + node, + /*excludeThisKeyword*/ + true + ); + } + return node.parent && isClassLike(node.parent) && isPropertyDeclaration(node) && !hasAccessorModifier(node); +} function isMethodOrAccessor(node) { switch (node.kind) { case 174 /* MethodDeclaration */: @@ -10937,6 +10960,9 @@ function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { const kind = node.kind; return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */; } +function isCallLikeOrFunctionLikeExpression(node) { + return isCallLikeExpression(node) || isFunctionExpressionOrArrowFunction(node); +} function isCallLikeExpression(node) { switch (node.kind) { case 286 /* JsxOpeningElement */: @@ -11070,10 +11096,10 @@ function hasScopeMarker(statements) { return some(statements, isScopeMarker); } function needsScopeMarker(result) { - return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 1 /* Export */) && !isAmbientModule(result); + return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 32 /* Export */) && !isAmbientModule(result); } function isExternalModuleIndicator(result) { - return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); + return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 32 /* Export */); } function isForInOrOfStatement(node) { return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */; @@ -11462,22 +11488,6 @@ function usingSingleLineStringWriter(action) { function getFullWidth(node) { return node.end - node.pos; } -function getResolvedModule(sourceFile, moduleNameText, mode) { - var _a, _b; - return (_b = (_a = sourceFile == null ? void 0 : sourceFile.resolvedModules) == null ? void 0 : _a.get(moduleNameText, mode)) == null ? void 0 : _b.resolvedModule; -} -function setResolvedModule(sourceFile, moduleNameText, resolvedModule, mode) { - if (!sourceFile.resolvedModules) { - sourceFile.resolvedModules = createModeAwareCache(); - } - sourceFile.resolvedModules.set(moduleNameText, mode, resolvedModule); -} -function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective, mode) { - if (!sourceFile.resolvedTypeReferenceDirectiveNames) { - sourceFile.resolvedTypeReferenceDirectiveNames = createModeAwareCache(); - } - sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, mode, resolvedTypeReferenceDirective); -} function projectReferenceIsEqualTo(oldRef, newRef) { return oldRef.path === newRef.path && !oldRef.prepend === !newRef.prepend && !oldRef.circular === !newRef.circular; } @@ -11485,14 +11495,14 @@ function moduleResolutionIsEqualTo(oldResolution, newResolution) { return oldResolution === newResolution || oldResolution.resolvedModule === newResolution.resolvedModule || !!oldResolution.resolvedModule && !!newResolution.resolvedModule && oldResolution.resolvedModule.isExternalLibraryImport === newResolution.resolvedModule.isExternalLibraryImport && oldResolution.resolvedModule.extension === newResolution.resolvedModule.extension && oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName && oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath && packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId) && oldResolution.node10Result === newResolution.node10Result; } function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageName) { - var _a, _b; - const node10Result = (_b = (_a = sourceFile.resolvedModules) == null ? void 0 : _a.get(moduleReference, mode)) == null ? void 0 : _b.node10Result; + var _a; + const node10Result = (_a = host.getResolvedModule(sourceFile, moduleReference, mode)) == null ? void 0 : _a.node10Result; const result = node10Result ? chainDiagnosticMessages( /*details*/ void 0, Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings, node10Result, - node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageName)}` : packageName + node10Result.includes(nodeModulesPathPart + "@types/") ? `@types/${mangleScopedPackageName(packageName)}` : packageName ) : host.typesPackageExists(packageName) ? chainDiagnosticMessages( /*details*/ void 0, @@ -11528,14 +11538,14 @@ function packageIdToString(packageId) { function typeDirectiveIsEqualTo(oldResolution, newResolution) { return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath; } -function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolutions, comparer, nameAndModeGetter) { +function hasChangesInResolutions(names, newSourceFile, newResolutions, getOldResolution, comparer, nameAndModeGetter) { Debug.assert(names.length === newResolutions.length); for (let i = 0; i < names.length; i++) { const newResolution = newResolutions[i]; const entry = names[i]; const name = nameAndModeGetter.getName(entry); const mode = nameAndModeGetter.getMode(entry, newSourceFile); - const oldResolution = oldResolutions && oldResolutions.get(name, mode); + const oldResolution = getOldResolution(name, mode); const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution; if (changed) { return true; @@ -11719,7 +11729,7 @@ function getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) { } let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end); if (isJSDocTypeExpressionOrChild(node)) { - text = text.split(/\r\n|\n|\r/).map((line) => trimStringStart(line.replace(/^\s*\*/, ""))).join("\n"); + text = text.split(/\r\n|\n|\r/).map((line) => line.replace(/^\s*\*/, "").trimStart()).join("\n"); } return text; } @@ -11740,8 +11750,8 @@ function getInternalEmitFlags(node) { const emitNode = node.emitNode; return emitNode && emitNode.internalFlags || 0; } -function getScriptTargetFeatures() { - return new Map(Object.entries({ +var getScriptTargetFeatures = /* @__PURE__ */ memoize( + () => new Map(Object.entries({ Array: new Map(Object.entries({ es2015: [ "find", @@ -11808,7 +11818,7 @@ function getScriptTargetFeatures() { "defineProperty", "deleteProperty", "get", - " getOwnPropertyDescriptor", + "getOwnPropertyDescriptor", "getPrototypeOf", "has", "isExtensible", @@ -12134,8 +12144,8 @@ function getScriptTargetFeatures() { "cause" ] })) - })); -} + })) +); function getLiteralText(node, sourceFile, flags) { if (sourceFile && canUseOriginalText(node, flags)) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); @@ -12276,7 +12286,7 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) { return false; } function isAmbientPropertyDeclaration(node) { - return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); + return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 128 /* Ambient */); } function isBlockScope(node, parentNode) { switch (node.kind) { @@ -12421,16 +12431,14 @@ function createDiagnosticForNodeArrayFromMessageChain(sourceFile, nodes, message const start = skipTrivia(sourceFile.text, nodes.pos); return createFileDiagnosticFromMessageChain(sourceFile, start, nodes.end - start, messageChain, relatedInformation); } -function assertDiagnosticLocation(file, start, length2) { +function assertDiagnosticLocation(sourceText, start, length2) { Debug.assertGreaterThanOrEqual(start, 0); Debug.assertGreaterThanOrEqual(length2, 0); - if (file) { - Debug.assertLessThanOrEqual(start, file.text.length); - Debug.assertLessThanOrEqual(start + length2, file.text.length); - } + Debug.assertLessThanOrEqual(start, sourceText.length); + Debug.assertLessThanOrEqual(start + length2, sourceText.length); } function createFileDiagnosticFromMessageChain(file, start, length2, messageChain, relatedInformation) { - assertDiagnosticLocation(file, start, length2); + assertDiagnosticLocation(file.text, start, length2); return { file, start, @@ -12588,10 +12596,10 @@ function isJsonSourceFile(file) { return file.scriptKind === 6 /* JSON */; } function isEnumConst(node) { - return !!(getCombinedModifierFlags(node) & 2048 /* Const */); + return !!(getCombinedModifierFlags(node) & 4096 /* Const */); } function isDeclarationReadonly(declaration) { - return !!(getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); + return !!(getCombinedModifierFlags(declaration) & 8 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); } function isVarAwaitUsing(node) { return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */; @@ -12674,10 +12682,7 @@ function isPartOfTypeNode(node) { } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } - Debug.assert( - node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, - "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." - ); + Debug.assert(node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); case 166 /* QualifiedName */: case 211 /* PropertyAccessExpression */: case 110 /* ThisKeyword */: { @@ -12880,11 +12885,7 @@ function forEachPropertyAssignment(objectLiteral, key, callback, key2) { }); } function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) { - return forEachPropertyAssignment( - objectLiteral, - propKey, - (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0 - ); + return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0); } function getTsConfigObjectLiteralExpression(tsConfigSourceFile) { if (tsConfigSourceFile && tsConfigSourceFile.statements.length) { @@ -13098,6 +13099,8 @@ function getInvokedExpression(node) { case 286 /* JsxOpeningElement */: case 285 /* JsxSelfClosingElement */: return node.tagName; + case 226 /* BinaryExpression */: + return node.right; default: return node.expression; } @@ -13287,8 +13290,8 @@ function isInExpressionContext(node) { return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; case 249 /* ForInStatement */: case 250 /* ForOfStatement */: - const forInStatement = parent; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInStatement.expression === node; + const forInOrOfStatement = parent; + return forInOrOfStatement.initializer === node && forInOrOfStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInOrOfStatement.expression === node; case 216 /* TypeAssertionExpression */: case 234 /* AsExpression */: return node === parent.expression; @@ -13648,6 +13651,7 @@ function tryGetModuleSpecifierFromDeclaration(node) { true ))) == null ? void 0 : _a.arguments[0]; case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); case 271 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); @@ -13659,6 +13663,8 @@ function tryGetModuleSpecifierFromDeclaration(node) { return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); case 276 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); + case 205 /* ImportType */: + return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; default: Debug.assertNever(node); } @@ -13886,9 +13892,9 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent = node.parent; - if (parent.kind === 303 /* PropertyAssignment */ || parent.kind === 277 /* ExportAssignment */ || parent.kind === 172 /* PropertyDeclaration */ || parent.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { + if (parent.kind === 303 /* PropertyAssignment */ || parent.kind === 277 /* ExportAssignment */ || parent.kind === 172 /* PropertyDeclaration */ || parent.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isAssignmentExpression(node)) { return parent; - } else if (parent.parent && (getSingleVariableOfVariableStatement(parent.parent) === node || isBinaryExpression(parent) && parent.operatorToken.kind === 64 /* EqualsToken */)) { + } else if (parent.parent && (getSingleVariableOfVariableStatement(parent.parent) === node || isAssignmentExpression(parent))) { return parent.parent; } else if (parent.parent && parent.parent.parent && (getSingleVariableOfVariableStatement(parent.parent.parent) || getSingleInitializerOfVariableStatementOrPropertyDeclaration(parent.parent.parent) === node || getSourceOfDefaultedAssignment(parent.parent.parent))) { return parent.parent.parent; @@ -13949,20 +13955,23 @@ function getTypeParameterFromJsDoc(node) { const { typeParameters } = node.parent.parent.parent; return typeParameters && find(typeParameters, (p) => p.name.escapedText === name); } -function getAssignmentTargetKind(node) { +function getAssignmentTarget(node) { let parent = node.parent; while (true) { switch (parent.kind) { case 226 /* BinaryExpression */: - const binaryOperator = parent.operatorToken.kind; - return isAssignmentOperator(binaryOperator) && parent.left === node ? binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; + const binaryExpression = parent; + const binaryOperator = binaryExpression.operatorToken.kind; + return isAssignmentOperator(binaryOperator) && binaryExpression.left === node ? binaryExpression : void 0; case 224 /* PrefixUnaryExpression */: case 225 /* PostfixUnaryExpression */: - const unaryOperator = parent.operator; - return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; + const unaryExpression = parent; + const unaryOperator = unaryExpression.operator; + return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? unaryExpression : void 0; case 249 /* ForInStatement */: case 250 /* ForOfStatement */: - return parent.initializer === node ? 1 /* Definite */ : 0 /* None */; + const forInOrOfStatement = parent; + return forInOrOfStatement.initializer === node ? forInOrOfStatement : void 0; case 217 /* ParenthesizedExpression */: case 209 /* ArrayLiteralExpression */: case 230 /* SpreadElement */: @@ -13974,24 +13983,53 @@ function getAssignmentTargetKind(node) { break; case 304 /* ShorthandPropertyAssignment */: if (parent.name !== node) { - return 0 /* None */; + return void 0; } node = parent.parent; break; case 303 /* PropertyAssignment */: if (parent.name === node) { - return 0 /* None */; + return void 0; } node = parent.parent; break; default: - return 0 /* None */; + return void 0; } parent = node.parent; } } +function getAssignmentTargetKind(node) { + const target = getAssignmentTarget(node); + if (!target) { + return 0 /* None */; + } + switch (target.kind) { + case 226 /* BinaryExpression */: + const binaryOperator = target.operatorToken.kind; + return binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */; + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + return 2 /* Compound */; + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + return 1 /* Definite */; + } +} function isAssignmentTarget(node) { - return getAssignmentTargetKind(node) !== 0 /* None */; + return !!getAssignmentTarget(node); +} +function isCompoundLikeAssignment(assignment) { + const right = skipParentheses(assignment.right); + return right.kind === 226 /* BinaryExpression */ && isShiftOperatorOrHigher(right.operatorToken.kind); +} +function isInCompoundLikeAssignment(node) { + const target = getAssignmentTarget(node); + return !!target && isAssignmentExpression( + target, + /*excludeCompoundAssignment*/ + true + ) && isCompoundLikeAssignment(target); } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { @@ -14206,7 +14244,7 @@ function getFunctionFlags(node) { flags |= 1 /* Generator */; } case 219 /* ArrowFunction */: - if (hasSyntacticModifier(node, 512 /* Async */)) { + if (hasSyntacticModifier(node, 1024 /* Async */)) { flags |= 2 /* Async */; } break; @@ -14222,7 +14260,7 @@ function isAsyncFunction(node) { case 218 /* FunctionExpression */: case 219 /* ArrowFunction */: case 174 /* MethodDeclaration */: - return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); + return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 1024 /* Async */); } return false; } @@ -14249,6 +14287,7 @@ function getPropertyNameForPropertyNameNode(name) { case 81 /* PrivateIdentifier */: return name.escapedText; case 11 /* StringLiteral */: + case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); case 167 /* ComputedPropertyName */: @@ -14641,8 +14680,11 @@ var templateSubstitutionRegExp = /\$\{/g; function escapeTemplateSubstitution(str) { return str.replace(templateSubstitutionRegExp, "\\${"); } +function containsInvalidEscapeFlag(node) { + return !!((node.templateFlags || 0) & 2048 /* ContainsInvalidEscape */); +} function hasInvalidEscape(template) { - return template && !!(isNoSubstitutionTemplateLiteral(template) ? template.templateFlags : template.head.templateFlags || some(template.templateSpans, (span) => !!span.literal.templateFlags)); + return template && !!(isNoSubstitutionTemplateLiteral(template) ? containsInvalidEscapeFlag(template) : containsInvalidEscapeFlag(template.head) || some(template.templateSpans, (span) => containsInvalidEscapeFlag(span.literal))); } var doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; var singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; @@ -14723,7 +14765,7 @@ function isQuoteOrBacktick(charCode) { } function isIntrinsicJsxName(name) { const ch = name.charCodeAt(0); - return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-"); + return ch >= 97 /* a */ && ch <= 122 /* z */ || name.includes("-"); } var indentStrings = ["", " "]; function getIndentString(level) { @@ -14736,9 +14778,6 @@ function getIndentString(level) { function getIndentSize() { return indentStrings[1].length; } -function isNightly() { - return stringContains(version, "-dev") || stringContains(version, "-insiders"); -} function createTextWriter(newLine) { var output; var indent2; @@ -14927,7 +14966,7 @@ function getExternalModuleNameFromDeclaration(host, resolver, declaration) { return void 0; } const specifier = getExternalModuleName(declaration); - if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && getCanonicalAbsolutePath(host, file.path).indexOf(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory()))) === -1) { + if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && !getCanonicalAbsolutePath(host, file.path).includes(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory())))) { return void 0; } return getResolvedExternalModuleName(host, file); @@ -15003,7 +15042,31 @@ function getSourceFilesToEmit(host, targetSourceFile, forceDtsEmit) { } function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) { const options = host.getCompilerOptions(); - return !(options.noEmitForJsFiles && isSourceFileJS(sourceFile)) && !sourceFile.isDeclarationFile && !host.isSourceFileFromExternalLibrary(sourceFile) && (forceDtsEmit || !(isJsonSourceFile(sourceFile) && host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) && !host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)); + if (options.noEmitForJsFiles && isSourceFileJS(sourceFile)) + return false; + if (sourceFile.isDeclarationFile) + return false; + if (host.isSourceFileFromExternalLibrary(sourceFile)) + return false; + if (forceDtsEmit) + return true; + if (host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) + return false; + if (!isJsonSourceFile(sourceFile)) + return true; + if (host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) + return false; + if (outFile(options)) + return true; + if (!options.outDir) + return false; + if (options.rootDir || options.composite && options.configFilePath) { + const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory()); + const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName); + if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) + return false; + } + return true; } function getSourceFilePathInNewDir(fileName, host, newDirPath) { return getSourceFilePathInNewDirWorker(fileName, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)); @@ -15015,9 +15078,16 @@ function getSourceFilePathInNewDirWorker(fileName, newDirPath, currentDirectory, return combinePaths(newDirPath, sourceFilePath); } function writeFile(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) { - host.writeFile(fileName, text, writeByteOrderMark, (hostErrorMessage) => { - diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); - }, sourceFiles, data); + host.writeFile( + fileName, + text, + writeByteOrderMark, + (hostErrorMessage) => { + diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); + }, + sourceFiles, + data + ); } function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { @@ -15265,7 +15335,7 @@ function writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLin } function writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart) { const end = Math.min(commentEnd, nextLineStart - 1); - const currentLineText = trimString(text.substring(pos, end)); + const currentLineText = text.substring(pos, end).trim(); if (currentLineText) { writer.writeComment(currentLineText); if (end !== commentEnd) { @@ -15302,25 +15372,25 @@ function isStatic(node) { return isClassElement(node) && hasStaticModifier(node) || isClassStaticBlockDeclaration(node); } function hasStaticModifier(node) { - return hasSyntacticModifier(node, 32 /* Static */); + return hasSyntacticModifier(node, 256 /* Static */); } function hasOverrideModifier(node) { - return hasEffectiveModifier(node, 16384 /* Override */); + return hasEffectiveModifier(node, 16 /* Override */); } function hasAbstractModifier(node) { - return hasSyntacticModifier(node, 256 /* Abstract */); + return hasSyntacticModifier(node, 64 /* Abstract */); } function hasAmbientModifier(node) { - return hasSyntacticModifier(node, 2 /* Ambient */); + return hasSyntacticModifier(node, 128 /* Ambient */); } function hasAccessorModifier(node) { - return hasSyntacticModifier(node, 128 /* Accessor */); + return hasSyntacticModifier(node, 512 /* Accessor */); } function hasEffectiveReadonlyModifier(node) { - return hasEffectiveModifier(node, 64 /* Readonly */); + return hasEffectiveModifier(node, 8 /* Readonly */); } function hasDecorators(node) { - return hasSyntacticModifier(node, 131072 /* Decorator */); + return hasSyntacticModifier(node, 32768 /* Decorator */); } function getSelectedEffectiveModifierFlags(node, flags) { return getEffectiveModifierFlags(node) & flags; @@ -15335,10 +15405,13 @@ function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | 536870912 /* HasComputedFlags */; } - if (includeJSDoc && !(node.modifierFlagsCache & 4096 /* HasComputedJSDocModifiers */) && (alwaysIncludeJSDoc || isInJSFile(node)) && node.parent) { - node.modifierFlagsCache |= getJSDocModifierFlagsNoCache(node) | 4096 /* HasComputedJSDocModifiers */; + if (alwaysIncludeJSDoc || includeJSDoc && isInJSFile(node)) { + if (!(node.modifierFlagsCache & 268435456 /* HasComputedJSDocModifiers */) && node.parent) { + node.modifierFlagsCache |= getRawJSDocModifierFlagsNoCache(node) | 268435456 /* HasComputedJSDocModifiers */; + } + return selectEffectiveModifierFlags(node.modifierFlagsCache); } - return node.modifierFlagsCache & ~(536870912 /* HasComputedFlags */ | 4096 /* HasComputedJSDocModifiers */); + return selectSyntacticModifierFlags(node.modifierFlagsCache); } function getEffectiveModifierFlags(node) { return getModifierFlagsWorker( @@ -15354,33 +15427,42 @@ function getSyntacticModifierFlags(node) { false ); } -function getJSDocModifierFlagsNoCache(node) { +function getRawJSDocModifierFlagsNoCache(node) { let flags = 0 /* None */; if (!!node.parent && !isParameter(node)) { if (isInJSFile(node)) { if (getJSDocPublicTagNoCache(node)) - flags |= 4 /* Public */; + flags |= 8388608 /* JSDocPublic */; if (getJSDocPrivateTagNoCache(node)) - flags |= 8 /* Private */; + flags |= 16777216 /* JSDocPrivate */; if (getJSDocProtectedTagNoCache(node)) - flags |= 16 /* Protected */; + flags |= 33554432 /* JSDocProtected */; if (getJSDocReadonlyTagNoCache(node)) - flags |= 64 /* Readonly */; + flags |= 67108864 /* JSDocReadonly */; if (getJSDocOverrideTagNoCache(node)) - flags |= 16384 /* Override */; + flags |= 134217728 /* JSDocOverride */; } if (getJSDocDeprecatedTagNoCache(node)) - flags |= 8192 /* Deprecated */; + flags |= 65536 /* Deprecated */; } return flags; } +function selectSyntacticModifierFlags(flags) { + return flags & 65535 /* SyntacticModifiers */; +} +function selectEffectiveModifierFlags(flags) { + return flags & 131071 /* NonCacheOnlyModifiers */ | (flags & 260046848 /* JSDocCacheOnlyModifiers */) >>> 23; +} +function getJSDocModifierFlagsNoCache(node) { + return selectEffectiveModifierFlags(getRawJSDocModifierFlagsNoCache(node)); +} function getEffectiveModifierFlagsNoCache(node) { return getSyntacticModifierFlagsNoCache(node) | getJSDocModifierFlagsNoCache(node); } function getSyntacticModifierFlagsNoCache(node) { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { - flags |= 1 /* Export */; + flags |= 32 /* Export */; } return flags; } @@ -15396,37 +15478,37 @@ function modifiersToFlags(modifiers) { function modifierToFlag(token) { switch (token) { case 126 /* StaticKeyword */: - return 32 /* Static */; + return 256 /* Static */; case 125 /* PublicKeyword */: - return 4 /* Public */; + return 1 /* Public */; case 124 /* ProtectedKeyword */: - return 16 /* Protected */; + return 4 /* Protected */; case 123 /* PrivateKeyword */: - return 8 /* Private */; + return 2 /* Private */; case 128 /* AbstractKeyword */: - return 256 /* Abstract */; + return 64 /* Abstract */; case 129 /* AccessorKeyword */: - return 128 /* Accessor */; + return 512 /* Accessor */; case 95 /* ExportKeyword */: - return 1 /* Export */; + return 32 /* Export */; case 138 /* DeclareKeyword */: - return 2 /* Ambient */; + return 128 /* Ambient */; case 87 /* ConstKeyword */: - return 2048 /* Const */; + return 4096 /* Const */; case 90 /* DefaultKeyword */: - return 1024 /* Default */; + return 2048 /* Default */; case 134 /* AsyncKeyword */: - return 512 /* Async */; + return 1024 /* Async */; case 148 /* ReadonlyKeyword */: - return 64 /* Readonly */; + return 8 /* Readonly */; case 164 /* OverrideKeyword */: - return 16384 /* Override */; + return 16 /* Override */; case 103 /* InKeyword */: - return 32768 /* In */; + return 8192 /* In */; case 147 /* OutKeyword */: - return 65536 /* Out */; + return 16384 /* Out */; case 170 /* Decorator */: - return 131072 /* Decorator */; + return 32768 /* Decorator */; } return 0 /* None */; } @@ -15535,9 +15617,18 @@ function isPrototypeAccess(node) { function isRightSideOfQualifiedNameOrPropertyAccess(node) { return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node; } +function isRightSideOfAccessExpression(node) { + return !!node.parent && (isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node); +} function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } +function isInstanceOfExpression(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 104 /* InstanceOfKeyword */; +} +function isRightSideOfInstanceofExpression(node) { + return isInstanceOfExpression(node.parent) && node === node.parent.right; +} function isEmptyObjectLiteral(expression) { return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; } @@ -15554,7 +15645,7 @@ function getLocalSymbolForExportDefault(symbol) { return void 0; } function isExportDefaultSymbol(symbol) { - return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 1024 /* Default */); + return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 2048 /* Default */); } function tryExtractTSExtension(fileName) { return find(supportedTSExtensionsForExtractExtension, (extension) => fileExtensionIs(fileName, extension)); @@ -15773,16 +15864,16 @@ function getDeclarationModifierFlagsFromSymbol(s, isWrite = false) { if (s.valueDeclaration) { const declaration = isWrite && s.declarations && find(s.declarations, isSetAccessorDeclaration) || s.flags & 32768 /* GetAccessor */ && find(s.declarations, isGetAccessorDeclaration) || s.valueDeclaration; const flags = getCombinedModifierFlags(declaration); - return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~28 /* AccessibilityModifier */; + return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~7 /* AccessibilityModifier */; } if (getCheckFlags(s) & 6 /* Synthetic */) { const checkFlags = s.links.checkFlags; - const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 8 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 4 /* Public */ : 16 /* Protected */; - const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 32 /* Static */ : 0; + const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 2 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 1 /* Public */ : 4 /* Protected */; + const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 256 /* Static */ : 0; return accessModifier | staticModifier; } if (s.flags & 4194304 /* Prototype */) { - return 4 /* Public */ | 32 /* Static */; + return 1 /* Public */ | 256 /* Static */; } return 0; } @@ -15880,28 +15971,24 @@ function getClassLikeDeclarationOfSymbol(symbol) { return (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike); } function getObjectFlags(type) { - return type.flags & 138117121 /* ObjectFlagsType */ ? type.objectFlags : 0; + return type.flags & 3899393 /* ObjectFlagsType */ ? type.objectFlags : 0; } function isUMDExportSymbol(symbol) { return !!symbol && !!symbol.declarations && !!symbol.declarations[0] && isNamespaceExportDeclaration(symbol.declarations[0]); } function getLastChild(node) { let lastChild; - forEachChild( - node, - (child) => { - if (nodeIsPresent(child)) - lastChild = child; - }, - (children) => { - for (let i = children.length - 1; i >= 0; i--) { - if (nodeIsPresent(children[i])) { - lastChild = children[i]; - break; - } + forEachChild(node, (child) => { + if (nodeIsPresent(child)) + lastChild = child; + }, (children) => { + for (let i = children.length - 1; i >= 0; i--) { + if (nodeIsPresent(children[i])) { + lastChild = children[i]; + break; } } - ); + }); return lastChild; } function isTypeNodeKind(kind) { @@ -16033,8 +16120,8 @@ var objectAllocator = { getSignatureConstructor: () => Signature2, getSourceMapSourceConstructor: () => SourceMapSource }; -function formatStringFromArgs(text, args, baseIndex = 0) { - return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex])); +function formatStringFromArgs(text, args) { + return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index])); } var localizedDiagnosticMessages; function setLocalizedDiagnosticMessages(messages) { @@ -16043,16 +16130,14 @@ function setLocalizedDiagnosticMessages(messages) { function getLocaleSpecificMessage(message) { return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message; } -function createDetachedDiagnostic(fileName, start, length2, message) { - assertDiagnosticLocation( - /*file*/ - void 0, - start, - length2 - ); +function createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args) { + if (start + length2 > sourceText.length) { + length2 = sourceText.length - start; + } + assertDiagnosticLocation(sourceText, start, length2); let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file: void 0, @@ -16104,11 +16189,11 @@ function attachFileToDiagnostics(diagnostics, file) { } return diagnosticsWithLocation; } -function createFileDiagnostic(file, start, length2, message) { - assertDiagnosticLocation(file, start, length2); +function createFileDiagnostic(file, start, length2, message, ...args) { + assertDiagnosticLocation(file.text, start, length2); let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file, @@ -16121,17 +16206,17 @@ function createFileDiagnostic(file, start, length2, message) { reportsDeprecated: message.reportsDeprecated }; } -function formatMessage(_dummy, message) { +function formatMessage(message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); + if (some(args)) { + text = formatStringFromArgs(text, args); } return text; } -function createCompilerDiagnostic(message) { +function createCompilerDiagnostic(message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 1) { - text = formatStringFromArgs(text, arguments, 1); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file: void 0, @@ -16155,10 +16240,10 @@ function createCompilerDiagnosticFromMessageChain(chain, relatedInformation) { relatedInformation }; } -function chainDiagnosticMessages(details, message) { +function chainDiagnosticMessages(details, message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { messageText: text, @@ -16400,7 +16485,7 @@ function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) { return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations); } function getCompilerOptionValue(options, option) { - return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name]; + return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name]; } function getJSXTransformEnabled(options) { const jsx = options.jsx; @@ -16442,19 +16527,16 @@ function createSymlinkCache(cwd, getCanonicalFileName) { if (!containsIgnoredPath(symlinkPath)) { symlinkPath = ensureTrailingDirectorySeparator(symlinkPath); if (real !== false && !(symlinkedDirectories == null ? void 0 : symlinkedDirectories.has(symlinkPath))) { - (symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(ensureTrailingDirectorySeparator(real.realPath), symlink); + (symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(real.realPath, symlink); } (symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real); } }, - setSymlinksFromResolutions(files, typeReferenceDirectives) { - var _a, _b; + setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, typeReferenceDirectives) { Debug.assert(!hasProcessedResolutions); hasProcessedResolutions = true; - for (const file of files) { - (_a = file.resolvedModules) == null ? void 0 : _a.forEach((resolution) => processResolution(this, resolution.resolvedModule)); - (_b = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _b.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); - } + forEachResolvedModule((resolution) => processResolution(this, resolution.resolvedModule)); + forEachResolvedTypeReferenceDirective((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); typeReferenceDirectives.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); }, hasProcessedResolutions: () => hasProcessedResolutions @@ -16468,7 +16550,10 @@ function createSymlinkCache(cwd, getCanonicalFileName) { if (commonResolved && commonOriginal) { cache.setSymlinkedDirectory( commonOriginal, - { real: commonResolved, realPath: toPath(commonResolved, cwd, getCanonicalFileName) } + { + real: ensureTrailingDirectorySeparator(commonResolved), + realPath: ensureTrailingDirectorySeparator(toPath(commonResolved, cwd, getCanonicalFileName)) + } ); } } @@ -16734,7 +16819,7 @@ function getSupportedExtensions(options, extraFileExtensions) { const flatBuiltins = flatten(builtins); const extensions = [ ...builtins, - ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension) === -1 ? [x.extension] : void 0) + ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && !flatBuiltins.includes(x.extension) ? [x.extension] : void 0) ]; return extensions; } @@ -17050,7 +17135,7 @@ function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { if (node.kind !== 167 /* ComputedPropertyName */) { return false; } - if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { + if (hasSyntacticModifier(node.parent, 64 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; @@ -17176,7 +17261,7 @@ function expressionResultIsUnused(node) { } } function containsIgnoredPath(path) { - return some(ignoredPaths, (p) => stringContains(path, p)); + return some(ignoredPaths, (p) => path.includes(p)); } function getContainingNodeArray(node) { if (!node.parent) @@ -17273,8 +17358,9 @@ function isFunctionExpressionOrArrowFunction(node) { function isNumericLiteralName(name) { return (+name).toString() === name; } -function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed) { - return isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote); +function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed, isMethod) { + const isMethodNamedNew = isMethod && name === "new"; + return !isMethodNamedNew && isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && !isMethodNamedNew && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote); } function isThisTypeParameter(type) { return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType); @@ -17426,6 +17512,15 @@ function getPropertyNameFromType(type) { } return Debug.fail(); } +function isExpandoPropertyDeclaration(declaration) { + return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration)); +} +function hasResolutionModeOverride(node) { + if (node === void 0) { + return false; + } + return !!getResolutionModeOverride(node.attributes); +} // src/compiler/factory/baseNodeFactory.ts function createBaseNodeFactory() { @@ -18297,6 +18392,10 @@ function createNodeFactory(flags, baseFactory2) { updateAssertEntry, createImportTypeAssertionContainer, updateImportTypeAssertionContainer, + createImportAttributes, + updateImportAttributes, + createImportAttribute, + updateImportAttribute, createNamespaceImport, updateNamespaceImport, createNamespaceExport, @@ -18673,8 +18772,9 @@ function createNodeFactory(flags, baseFactory2) { ensureUseStrict, liftToBlock, mergeLexicalEnvironment, - updateModifiers, - updateModifierLike + replaceModifiers, + replaceDecoratorsAndModifiers, + replacePropertyName }; forEach(nodeFactoryPatchers, (fn) => fn(factory2)); return factory2; @@ -19007,35 +19107,35 @@ function createNodeFactory(flags, baseFactory2) { } function createModifiersFromModifierFlags(flags2) { const result = []; - if (flags2 & 1 /* Export */) + if (flags2 & 32 /* Export */) result.push(createModifier(95 /* ExportKeyword */)); - if (flags2 & 2 /* Ambient */) + if (flags2 & 128 /* Ambient */) result.push(createModifier(138 /* DeclareKeyword */)); - if (flags2 & 1024 /* Default */) + if (flags2 & 2048 /* Default */) result.push(createModifier(90 /* DefaultKeyword */)); - if (flags2 & 2048 /* Const */) + if (flags2 & 4096 /* Const */) result.push(createModifier(87 /* ConstKeyword */)); - if (flags2 & 4 /* Public */) + if (flags2 & 1 /* Public */) result.push(createModifier(125 /* PublicKeyword */)); - if (flags2 & 8 /* Private */) + if (flags2 & 2 /* Private */) result.push(createModifier(123 /* PrivateKeyword */)); - if (flags2 & 16 /* Protected */) + if (flags2 & 4 /* Protected */) result.push(createModifier(124 /* ProtectedKeyword */)); - if (flags2 & 256 /* Abstract */) + if (flags2 & 64 /* Abstract */) result.push(createModifier(128 /* AbstractKeyword */)); - if (flags2 & 32 /* Static */) + if (flags2 & 256 /* Static */) result.push(createModifier(126 /* StaticKeyword */)); - if (flags2 & 16384 /* Override */) + if (flags2 & 16 /* Override */) result.push(createModifier(164 /* OverrideKeyword */)); - if (flags2 & 64 /* Readonly */) + if (flags2 & 8 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */)); - if (flags2 & 128 /* Accessor */) + if (flags2 & 512 /* Accessor */) result.push(createModifier(129 /* AccessorKeyword */)); - if (flags2 & 512 /* Async */) + if (flags2 & 1024 /* Async */) result.push(createModifier(134 /* AsyncKeyword */)); - if (flags2 & 32768 /* In */) + if (flags2 & 8192 /* In */) result.push(createModifier(103 /* InKeyword */)); - if (flags2 & 65536 /* Out */) + if (flags2 & 16384 /* Out */) result.push(createModifier(147 /* OutKeyword */)); return result.length ? result : void 0; } @@ -19084,7 +19184,7 @@ function createNodeFactory(flags, baseFactory2) { if (isThisIdentifier(node.name)) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */); + node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 31 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */); } node.jsDoc = void 0; return node; @@ -19133,8 +19233,8 @@ function createNodeFactory(flags, baseFactory2) { node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.type = type; node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; + const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 128 /* Ambient */; + node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 256 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; node.jsDoc = void 0; return node; } @@ -19173,7 +19273,7 @@ function createNodeFactory(flags, baseFactory2) { if (!node.body) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; @@ -19563,18 +19663,21 @@ function createNodeFactory(flags, baseFactory2) { function updateTemplateLiteralType(node, head, templateSpans) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } - function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { + function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) { const node = createBaseNode(205 /* ImportType */); node.argument = argument; - node.assertions = assertions; + node.attributes = attributes; + if (node.assertions && node.assertions.assertClause && node.attributes) { + node.assertions.assertClause = node.attributes; + } node.qualifier = qualifier; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.isTypeOf = isTypeOf; node.transformFlags = 1 /* ContainsTypeScript */; return node; } - function updateImportTypeNode(node, argument, assertions, qualifier, typeArguments, isTypeOf = node.isTypeOf) { - return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; + function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) { + return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { const node = createBaseNode(196 /* ParenthesizedType */); @@ -19913,7 +20016,7 @@ function createNodeFactory(flags, baseFactory2) { node.parameters = createNodeArray(parameters); node.type = type; node.body = body; - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -19937,7 +20040,7 @@ function createNodeFactory(flags, baseFactory2) { node.type = type; node.equalsGreaterThanToken = equalsGreaterThanToken ?? createToken(39 /* EqualsGreaterThanToken */); node.body = parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body); - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */; node.typeArguments = void 0; node.jsDoc = void 0; @@ -20289,7 +20392,7 @@ function createNodeFactory(flags, baseFactory2) { node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } node.jsDoc = void 0; @@ -20539,10 +20642,10 @@ function createNodeFactory(flags, baseFactory2) { node.parameters = createNodeArray(parameters); node.type = type; node.body = body; - if (!node.body || modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (!node.body || modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -20573,7 +20676,7 @@ function createNodeFactory(flags, baseFactory2) { node.typeParameters = asNodeArray(typeParameters); node.heritageClauses = asNodeArray(heritageClauses); node.members = createNodeArray(members); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; @@ -20635,7 +20738,7 @@ function createNodeFactory(flags, baseFactory2) { node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; node.body = body; - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */; @@ -20704,19 +20807,19 @@ function createNodeFactory(flags, baseFactory2) { function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) { return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } - function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { + function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) { const node = createBaseNode(272 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; + node.attributes = node.assertClause = attributes; node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; node.jsDoc = void 0; return node; } - function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; + function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { const node = createBaseDeclaration(273 /* ImportClause */); @@ -20737,6 +20840,7 @@ function createNodeFactory(flags, baseFactory2) { const node = createBaseNode(300 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; + node.token = 132 /* AssertKeyword */; node.transformFlags |= 4 /* ContainsESNext */; return node; } @@ -20762,6 +20866,27 @@ function createNodeFactory(flags, baseFactory2) { function updateImportTypeAssertionContainer(node, clause, multiLine) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } + function createImportAttributes(elements, multiLine, token) { + const node = createBaseNode(300 /* ImportAttributes */); + node.token = token ?? 118 /* WithKeyword */; + node.elements = createNodeArray(elements); + node.multiLine = multiLine; + node.transformFlags |= 4 /* ContainsESNext */; + return node; + } + function updateImportAttributes(node, elements, multiLine) { + return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node; + } + function createImportAttribute(name, value) { + const node = createBaseNode(301 /* ImportAttribute */); + node.name = name; + node.value = value; + node.transformFlags |= 4 /* ContainsESNext */; + return node; + } + function updateImportAttribute(node, name, value) { + return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node; + } function createNamespaceImport(name) { const node = createBaseDeclaration(274 /* NamespaceImport */); node.name = name; @@ -20822,20 +20947,20 @@ function createNodeFactory(flags, baseFactory2) { function updateExportAssignment(node, modifiers, expression) { return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node; } - function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { + function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { const node = createBaseDeclaration(278 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; + node.attributes = node.assertClause = attributes; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; node.jsDoc = void 0; return node; } - function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause), node) : node; + function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes), node) : node; } function finishUpdateExportDeclaration(updated, original) { if (updated !== original) { @@ -21433,7 +21558,6 @@ function createNodeFactory(flags, baseFactory2) { node.imports = void 0; node.moduleAugmentations = void 0; node.ambientModuleNames = void 0; - node.resolvedModules = void 0; node.classifiableNames = void 0; node.impliedNodeFormat = void 0; return node; @@ -22045,7 +22169,7 @@ function createNodeFactory(flags, baseFactory2) { return qualifiedName; } function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) { - if (ns && hasSyntacticModifier(node, 1 /* Export */)) { + if (ns && hasSyntacticModifier(node, 32 /* Export */)) { return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps); } return getExportName(node, allowComments, allowSourceMaps); @@ -22156,18 +22280,36 @@ function createNodeFactory(flags, baseFactory2) { } return statements; } - function updateModifiers(node, modifiers) { + function replaceModifiers(node, modifiers) { let modifierArray; if (typeof modifiers === "number") { modifierArray = createModifiersFromModifierFlags(modifiers); } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.attributes) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.attributes) : Debug.assertNever(node); } - function updateModifierLike(node, modifierArray) { + function replaceDecoratorsAndModifiers(node, modifierArray) { return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); } + function replacePropertyName(node, name) { + switch (node.kind) { + case 177 /* GetAccessor */: + return updateGetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.type, node.body); + case 178 /* SetAccessor */: + return updateSetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.body); + case 174 /* MethodDeclaration */: + return updateMethodDeclaration(node, node.modifiers, node.asteriskToken, name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body); + case 173 /* MethodSignature */: + return updateMethodSignature(node, node.modifiers, name, node.questionToken, node.typeParameters, node.parameters, node.type); + case 172 /* PropertyDeclaration */: + return updatePropertyDeclaration(node, node.modifiers, name, node.questionToken ?? node.exclamationToken, node.type, node.initializer); + case 171 /* PropertySignature */: + return updatePropertySignature(node, node.modifiers, name, node.questionToken, node.type); + case 303 /* PropertyAssignment */: + return updatePropertyAssignment(node, name, node.initializer); + } + } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; } @@ -23594,17 +23736,18 @@ var asyncGeneratorHelper = { scoped: false, dependencies: [awaitHelper], text: ` - var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - 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); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - };` + var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + };` }; var asyncDelegator = { name: "typescript:asyncDelegator", @@ -24387,14 +24530,14 @@ function isImportDeclaration(node) { function isImportClause(node) { return node.kind === 273 /* ImportClause */; } -function isImportTypeAssertionContainer(node) { - return node.kind === 302 /* ImportTypeAssertionContainer */; -} function isAssertClause(node) { return node.kind === 300 /* AssertClause */; } -function isAssertEntry(node) { - return node.kind === 301 /* AssertEntry */; +function isImportAttributes(node) { + return node.kind === 300 /* ImportAttributes */; +} +function isImportAttribute(node) { + return node.kind === 301 /* ImportAttribute */; } function isNamespaceImport(node) { return node.kind === 274 /* NamespaceImport */; @@ -25034,21 +25177,18 @@ function createExternalHelpersImportDeclarationIfNeeded(nodeFactory, helperFacto if (some(helperNames)) { helperNames.sort(compareStringsCaseSensitive); namedBindings = nodeFactory.createNamedImports( - map( - helperNames, - (name) => isFileLevelUniqueName(sourceFile, name) ? nodeFactory.createImportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ - void 0, - nodeFactory.createIdentifier(name) - ) : nodeFactory.createImportSpecifier( - /*isTypeOnly*/ - false, - nodeFactory.createIdentifier(name), - helperFactory.getUnscopedHelperName(name) - ) - ) + map(helperNames, (name) => isFileLevelUniqueName(sourceFile, name) ? nodeFactory.createImportSpecifier( + /*isTypeOnly*/ + false, + /*propertyName*/ + void 0, + nodeFactory.createIdentifier(name) + ) : nodeFactory.createImportSpecifier( + /*isTypeOnly*/ + false, + nodeFactory.createIdentifier(name), + helperFactory.getUnscopedHelperName(name) + )) ); const parseNode = getOriginalNode(sourceFile, isSourceFile); const emitNode = getOrCreateEmitNode(parseNode); @@ -25073,7 +25213,7 @@ function createExternalHelpersImportDeclarationIfNeeded(nodeFactory, helperFacto namedBindings ), nodeFactory.createStringLiteral(externalHelpersModuleNameText), - /*assertClause*/ + /*attributes*/ void 0 ); addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */); @@ -25827,7 +25967,7 @@ var forEachChildTable = { return visitNode2(cbNode, node.typeParameter); }, [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); + return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); @@ -26001,15 +26141,15 @@ var forEachChildTable = { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { @@ -26024,7 +26164,7 @@ var forEachChildTable = { [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, @@ -26278,7 +26418,8 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar const { languageVersion, setExternalModuleIndicator: overrideSetExternalModuleIndicator, - impliedNodeFormat: format + impliedNodeFormat: format, + jsDocParsingMode } = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { languageVersion: languageVersionOrOptions }; if (languageVersion === 100 /* JSON */) { result = Parser.parseSourceFile( @@ -26289,7 +26430,8 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar void 0, setParentNodes, 6 /* JSON */, - noop + noop, + jsDocParsingMode ); } else { const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => { @@ -26304,7 +26446,8 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar void 0, setParentNodes, scriptKind, - setIndicator + setIndicator, + jsDocParsingMode ); } (_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile(); @@ -26423,7 +26566,7 @@ var Parser; var contextFlags; var topLevel = true; var parseErrorBeforeNextFinishedNode = false; - function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride) { + function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) { var _a; scriptKind2 = ensureScriptKind(fileName2, scriptKind2); if (scriptKind2 === 6 /* JSON */) { @@ -26445,8 +26588,8 @@ var Parser; result2.pragmas = emptyMap; return result2; } - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2); - const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator); + initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode); + const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode); clearState(); return result; } @@ -26458,20 +26601,21 @@ var Parser; languageVersion2, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); nextToken(); const entityName = parseEntityName( /*allowReservedWords*/ true ); - const isInvalid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length; + const isValid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length; clearState(); - return isInvalid ? entityName : void 0; + return isValid ? entityName : void 0; } Parser2.parseIsolatedEntityName = parseIsolatedEntityName2; function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) { - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */); + initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */); sourceFlags = contextFlags; nextToken(); const pos = getNodePos(); @@ -26552,7 +26696,7 @@ var Parser; return result; } Parser2.parseJsonText = parseJsonText2; - function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind) { + function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) { NodeConstructor2 = objectAllocator.getNodeConstructor(); TokenConstructor2 = objectAllocator.getTokenConstructor(); IdentifierConstructor2 = objectAllocator.getIdentifierConstructor(); @@ -26588,11 +26732,15 @@ var Parser; scanner.setOnError(scanError); scanner.setScriptTarget(languageVersion); scanner.setLanguageVariant(languageVariant); + scanner.setScriptKind(scriptKind); + scanner.setJSDocParsingMode(_jsDocParsingMode); } function clearState() { scanner.clearCommentDirectives(); scanner.setText(""); scanner.setOnError(void 0); + scanner.setScriptKind(0 /* Unknown */); + scanner.setJSDocParsingMode(0 /* ParseAll */); sourceText = void 0; languageVersion = void 0; syntaxCursor = void 0; @@ -26606,7 +26754,7 @@ var Parser; notParenthesizedArrow = void 0; topLevel = true; } - function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { + function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) { const isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { contextFlags |= 33554432 /* Ambient */; @@ -26625,6 +26773,7 @@ var Parser; sourceFile.identifierCount = identifierCount; sourceFile.identifiers = identifiers; sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); + sourceFile.jsDocParsingMode = jsDocParsingMode; if (jsDocDiagnostics) { sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile); } @@ -26633,7 +26782,7 @@ var Parser; } return sourceFile; function reportPragmaDiagnostic(pos, end, diagnostic) { - parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); + parseDiagnostics.push(createDetachedDiagnostic(fileName, sourceText, pos, end, diagnostic)); } } let hasDeprecatedTag = false; @@ -26873,7 +27022,7 @@ var Parser; const lastError = lastOrUndefined(parseDiagnostics); let result; if (!lastError || start !== lastError.start) { - result = createDetachedDiagnostic(fileName, start, length2, message, ...args); + result = createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args); parseDiagnostics.push(result); } parseErrorBeforeNextFinishedNode = true; @@ -27101,7 +27250,7 @@ var Parser; if (lastError) { addRelatedInfo( lastError, - createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) + createDetachedDiagnostic(fileName, sourceText, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) ); } } @@ -27271,10 +27420,16 @@ var Parser; function parseIdentifierName(diagnosticMessage) { return createIdentifier(tokenIsIdentifierOrKeyword(token()), diagnosticMessage); } + function parseIdentifierNameErrorOnUnicodeEscapeSequence() { + if (scanner.hasUnicodeEscape() || scanner.hasExtendedUnicodeEscape()) { + parseErrorAtCurrentToken(Diagnostics.Unicode_escape_sequence_cannot_appear_here); + } + return createIdentifier(tokenIsIdentifierOrKeyword(token())); + } function isLiteralPropertyName() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */; } - function isAssertionKey2() { + function isImportAttributeName2() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */; } function parsePropertyNameWorker(allowComputedPropertyNames) { @@ -27393,8 +27548,8 @@ var Parser; return isLiteralPropertyName(); case 9 /* ObjectBindingElements */: return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName(); - case 24 /* AssertEntries */: - return isAssertionKey2(); + case 24 /* ImportAttributes */: + return isImportAttributeName2(); case 7 /* HeritageClauseElement */: if (token() === 19 /* OpenBraceToken */) { return lookAhead(isValidHeritageClauseObjectLiteral); @@ -27497,7 +27652,7 @@ var Parser; case 12 /* ObjectLiteralMembers */: case 9 /* ObjectBindingElements */: case 23 /* ImportOrExportSpecifiers */: - case 24 /* AssertEntries */: + case 24 /* ImportAttributes */: return token() === 20 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */; @@ -27803,7 +27958,7 @@ var Parser; return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 14 /* JsxChildren */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); - case 24 /* AssertEntries */: + case 24 /* ImportAttributes */: return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected); case 25 /* JSDocComment */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); @@ -27897,7 +28052,9 @@ var Parser; parseRightSideOfDot( allowReservedWords, /*allowPrivateIdentifiers*/ - false + false, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + true ) ), pos @@ -27908,7 +28065,7 @@ var Parser; function createQualifiedName(entity, name) { return finishNode(factory2.createQualifiedName(entity, name), entity.pos); } - function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers) { + function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers, allowUnicodeEscapeSequenceInIdentifierName) { if (scanner.hasPrecedingLineBreak() && tokenIsIdentifierOrKeyword(token())) { const matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); if (matchesPattern) { @@ -27929,7 +28086,10 @@ var Parser; Diagnostics.Identifier_expected ); } - return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); + if (allowIdentifierNames) { + return allowUnicodeEscapeSequenceInIdentifierName ? parseIdentifierName() : parseIdentifierNameErrorOnUnicodeEscapeSequence(); + } + return parseIdentifier(); } function parseTemplateSpans(isTaggedTemplate) { const pos = getNodePos(); @@ -28673,28 +28833,6 @@ var Parser; nextToken(); return token() === 102 /* ImportKeyword */; } - function parseImportTypeAssertions() { - const pos = getNodePos(); - const openBracePosition = scanner.getTokenStart(); - parseExpected(19 /* OpenBraceToken */); - const multiLine = scanner.hasPrecedingLineBreak(); - parseExpected(132 /* AssertKeyword */); - parseExpected(59 /* ColonToken */); - const clause = parseAssertClause( - /*skipAssertKeyword*/ - true - ); - if (!parseExpected(20 /* CloseBraceToken */)) { - const lastError = lastOrUndefined(parseDiagnostics); - if (lastError && lastError.code === Diagnostics._0_expected.code) { - addRelatedInfo( - lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") - ); - } - } - return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); - } function parseImportType() { sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); @@ -28702,14 +28840,36 @@ var Parser; parseExpected(102 /* ImportKeyword */); parseExpected(21 /* OpenParenToken */); const type = parseType(); - let assertions; + let attributes; if (parseOptional(28 /* CommaToken */)) { - assertions = parseImportTypeAssertions(); + const openBracePosition = scanner.getTokenStart(); + parseExpected(19 /* OpenBraceToken */); + const currentToken2 = token(); + if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) { + nextToken(); + } else { + parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */)); + } + parseExpected(59 /* ColonToken */); + attributes = parseImportAttributes( + currentToken2, + /*skipKeyword*/ + true + ); + if (!parseExpected(20 /* CloseBraceToken */)) { + const lastError = lastOrUndefined(parseDiagnostics); + if (lastError && lastError.code === Diagnostics._0_expected.code) { + addRelatedInfo( + lastError, + createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + ); + } + } } parseExpected(22 /* CloseParenToken */); const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0; const typeArguments = parseTypeArgumentsOfTypeReference(); - return finishNode(factory2.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos); + return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos); } function nextTokenIsNumericOrBigIntLiteral() { nextToken(); @@ -29704,6 +29864,8 @@ var Parser; /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + true, + /*allowUnicodeEscapeSequenceInIdentifierName*/ true )), pos); } @@ -29871,6 +30033,8 @@ var Parser; /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + false, + /*allowUnicodeEscapeSequenceInIdentifierName*/ false )), pos); } @@ -29880,10 +30044,10 @@ var Parser; const pos = getNodePos(); scanJsxIdentifier(); const isThis = token() === 110 /* ThisKeyword */; - const tagName = parseIdentifierName(); + const tagName = parseIdentifierNameErrorOnUnicodeEscapeSequence(); if (parseOptional(59 /* ColonToken */)) { scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierName()), pos); + return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos); } return isThis ? finishNode(factory2.createToken(110 /* ThisKeyword */), pos) : tagName; } @@ -29895,7 +30059,9 @@ var Parser; let dotDotDotToken; let expression; if (token() !== 20 /* CloseBraceToken */) { - dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); + if (!inExpressionContext) { + dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); + } expression = parseExpression(); } if (inExpressionContext) { @@ -29944,10 +30110,10 @@ var Parser; function parseJsxAttributeName() { const pos = getNodePos(); scanJsxIdentifier(); - const attrName = parseIdentifierName(); + const attrName = parseIdentifierNameErrorOnUnicodeEscapeSequence(); if (parseOptional(59 /* ColonToken */)) { scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierName()), pos); + return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos); } return attrName; } @@ -30035,6 +30201,8 @@ var Parser; /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + true, + /*allowUnicodeEscapeSequenceInIdentifierName*/ true ); const isOptionalChain2 = questionDotToken || tryReparseOptionalChain(expression); @@ -30519,7 +30687,8 @@ var Parser; parseExpected(21 /* OpenParenToken */); let initializer; if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { + if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || // this one is meant to allow of + token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine)) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -30840,12 +31009,6 @@ var Parser; function isUsingDeclaration() { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); } - function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { - return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( - /*disallowOf*/ - true - ); - } function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { if (nextToken() === 160 /* UsingKeyword */) { return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); @@ -31202,11 +31365,11 @@ var Parser; const modifierFlags = modifiersToFlags(modifiers); parseExpected(100 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); - const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); + const name = modifierFlags & 2048 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; - const isAsync = modifierFlags & 512 /* Async */ ? 2 /* Await */ : 0 /* None */; + const isAsync = modifierFlags & 1024 /* Async */ ? 2 /* Await */ : 0 /* None */; const typeParameters = parseTypeParameters(); - if (modifierFlags & 1 /* Export */) + if (modifierFlags & 32 /* Export */) setAwaitContext( /*value*/ true @@ -31674,7 +31837,7 @@ var Parser; } function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { const namespaceFlag = flags & 32 /* Namespace */; - const name = parseIdentifier(); + const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier(); const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( getNodePos(), /*hasJSDoc*/ @@ -31763,15 +31926,16 @@ var Parser; parseExpected(161 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); - let assertClause; - if (token() === 132 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); + const currentToken2 = token(); + let attributes; + if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) { + attributes = parseImportAttributes(currentToken2); } parseSemicolon(); - const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause); + const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes); return withJSDoc(finishNode(node, pos), hasJSDoc); } - function parseAssertEntry() { + function parseImportAttribute() { const pos = getNodePos(); const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */); parseExpected(59 /* ColonToken */); @@ -31779,19 +31943,19 @@ var Parser; /*allowReturnTypeInArrowFunction*/ true ); - return finishNode(factory2.createAssertEntry(name, value), pos); + return finishNode(factory2.createImportAttribute(name, value), pos); } - function parseAssertClause(skipAssertKeyword) { + function parseImportAttributes(token2, skipKeyword) { const pos = getNodePos(); - if (!skipAssertKeyword) { - parseExpected(132 /* AssertKeyword */); + if (!skipKeyword) { + parseExpected(token2); } const openBracePosition = scanner.getTokenStart(); if (parseExpected(19 /* OpenBraceToken */)) { const multiLine = scanner.hasPrecedingLineBreak(); const elements = parseDelimitedList( - 24 /* AssertEntries */, - parseAssertEntry, + 24 /* ImportAttributes */, + parseImportAttribute, /*considerSemicolonAsDelimiter*/ true ); @@ -31800,11 +31964,11 @@ var Parser; if (lastError && lastError.code === Diagnostics._0_expected.code) { addRelatedInfo( lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") ); } } - return finishNode(factory2.createAssertClause(elements, multiLine), pos); + return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos); } else { const elements = createNodeArray( [], @@ -31814,10 +31978,11 @@ var Parser; /*hasTrailingComma*/ false ); - return finishNode(factory2.createAssertClause( + return finishNode(factory2.createImportAttributes( elements, /*multiLine*/ - false + false, + token2 ), pos); } } @@ -31949,7 +32114,7 @@ var Parser; ); let exportClause; let moduleSpecifier; - let assertClause; + let attributes; const isTypeOnly = parseOptional(156 /* TypeKeyword */); const namespaceExportPos = getNodePos(); if (parseOptional(42 /* AsteriskToken */)) { @@ -31965,12 +32130,13 @@ var Parser; moduleSpecifier = parseModuleSpecifier(); } } - if (moduleSpecifier && token() === 132 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); + const currentToken2 = token(); + if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) { + attributes = parseImportAttributes(currentToken2); } parseSemicolon(); setAwaitContext(savedAwaitContext); - const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); + const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseExportAssignment(pos, hasJSDoc, modifiers) { @@ -32020,7 +32186,7 @@ var Parser; ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes"; ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses"; ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers"; - ParsingContext2[ParsingContext2["AssertEntries"] = 24] = "AssertEntries"; + ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes"; ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment"; ParsingContext2[ParsingContext2["Count"] = 26] = "Count"; })(ParsingContext || (ParsingContext = {})); @@ -32039,7 +32205,8 @@ var Parser; 99 /* Latest */, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); scanner.setText(content, start, length2); currentToken = scanner.scan(); @@ -32103,7 +32270,8 @@ var Parser; 99 /* Latest */, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); const sourceFile = { languageVariant: 0 /* Standard */, text: content }; @@ -32144,8 +32312,6 @@ var Parser; PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter"; })(PropertyLikeParse || (PropertyLikeParse = {})); function parseJSDocCommentWorker(start = 0, length2) { - const saveParsingContext = parsingContext; - parsingContext |= 1 << 25 /* JSDocComment */; const content = sourceText; const end = length2 === void 0 ? content.length : start + length2; length2 = end - start; @@ -32162,6 +32328,8 @@ var Parser; let commentsPos; let comments = []; const parts = []; + const saveParsingContext = parsingContext; + parsingContext |= 1 << 25 /* JSDocComment */; const result = scanner.scanRange(start + 3, length2 - 5, doJSDocScan); parsingContext = saveParsingContext; return result; @@ -32253,7 +32421,7 @@ var Parser; nextTokenJSDoc(); } } - const trimmedComments = trimStringEnd(comments.join("")); + const trimmedComments = comments.join("").trimEnd(); if (parts.length && trimmedComments.length) { parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start, commentsPos)); } @@ -32269,7 +32437,7 @@ var Parser; } function removeTrailingWhitespace(comments2) { while (comments2.length) { - const trimmed = trimStringEnd(comments2[comments2.length - 1]); + const trimmed = comments2[comments2.length - 1].trimEnd(); if (trimmed === "") { comments2.pop(); } else if (trimmed.length < comments2[comments2.length - 1].length) { @@ -32509,7 +32677,7 @@ var Parser; } } removeLeadingNewlines(comments2); - const trimmedComments = trimStringEnd(comments2.join("")); + const trimmedComments = comments2.join("").trimEnd(); if (parts2.length) { if (trimmedComments.length) { parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2)); @@ -32779,7 +32947,7 @@ var Parser; if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { - addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here)); + addRelatedInfo(lastError, createDetachedDiagnostic(fileName, sourceText, 0, 0, Diagnostics.The_tag_was_first_specified_here)); } break; } else { @@ -33059,7 +33227,8 @@ var IncrementalParser; /*setParentNodes*/ true, sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator + sourceFile.setExternalModuleIndicator, + sourceFile.jsDocParsingMode ); } const incrementalSourceFile = sourceFile; @@ -33074,16 +33243,7 @@ var IncrementalParser; Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span)); Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange))); const delta = textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - updateTokenPositionsAndMarkElements( - incrementalSourceFile, - changeRange.span.start, - textSpanEnd(changeRange.span), - textSpanEnd(textChangeRangeNewSpan(changeRange)), - delta, - oldText, - newText, - aggressiveChecks - ); + updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, textSpanEnd(changeRange.span), textSpanEnd(textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); const result = Parser.parseSourceFile( sourceFile.fileName, newText, @@ -33092,7 +33252,8 @@ var IncrementalParser; /*setParentNodes*/ true, sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator + sourceFile.setExternalModuleIndicator, + sourceFile.jsDocParsingMode ); result.commentDirectives = getNewCommentDirectives( sourceFile.commentDirectives, @@ -33416,7 +33577,7 @@ var IncrementalParser; })(InvalidPosition || (InvalidPosition = {})); })(IncrementalParser || (IncrementalParser = {})); function isDeclarationFileName(fileName) { - return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && stringContains(getBaseFileName(fileName), ".d."); + return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d."); } function parseResolutionMode(mode, pos, end, reportDiagnostic) { if (!mode) { @@ -33602,7 +33763,7 @@ function getNamedPragmaArguments(pragma, text) { return {}; if (!pragma.args) return {}; - const args = trimString(text).split(/\s+/); + const args = text.trim().split(/\s+/); const argMap = {}; for (let i = 0; i < pragma.args.length; i++) { const argument = pragma.args[i]; @@ -34033,6 +34194,7 @@ var moduleOptionDeclaration = { node16: 100 /* Node16 */, nodenext: 199 /* NodeNext */ })), + affectsSourceFile: true, affectsModuleResolution: true, affectsEmit: true, affectsBuildInfo: true, @@ -34125,7 +34287,8 @@ var commandOptionsWithoutBuild = [ { name: "allowJs", type: "boolean", - affectsModuleResolution: true, + allowJsFlag: true, + affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, @@ -34135,6 +34298,8 @@ var commandOptionsWithoutBuild = [ name: "checkJs", type: "boolean", affectsModuleResolution: true, + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, @@ -34147,6 +34312,10 @@ var commandOptionsWithoutBuild = [ affectsEmit: true, affectsBuildInfo: true, affectsModuleResolution: true, + // The checker emits an error when it sees JSX but this option is not set in compilerOptions. + // This is effectively a semantic error, so mark this option as affecting semantic diagnostics + // so we know to refresh errors when this option is changed. + affectsSemanticDiagnostics: true, paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, category: Diagnostics.Language_and_Environment, @@ -34462,6 +34631,7 @@ var commandOptionsWithoutBuild = [ bundler: 100 /* Bundler */ })), deprecatedKeys: /* @__PURE__ */ new Set(["node"]), + affectsSourceFile: true, affectsModuleResolution: true, paramType: Diagnostics.STRATEGY, category: Diagnostics.Modules, @@ -34712,7 +34882,7 @@ var commandOptionsWithoutBuild = [ affectsBuildInfo: true, affectsDeclarationPath: true, isFilePath: false, - // This is intentionally broken to support compatability with existing tsconfig files + // This is intentionally broken to support compatibility with existing tsconfig files // for correct behaviour, please use outFile category: Diagnostics.Backwards_Compatibility, paramType: Diagnostics.FILE, @@ -35004,6 +35174,7 @@ var commandOptionsWithoutBuild = [ legacy: 1 /* Legacy */, force: 3 /* Force */ })), + affectsSourceFile: true, affectsModuleResolution: true, description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files, category: Diagnostics.Language_and_Environment, @@ -35023,7 +35194,7 @@ var semanticDiagnosticsOptionDeclarations = optionDeclarations.filter((option) = var affectsEmitOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsEmit); var affectsDeclarationPathOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsDeclarationPath); var moduleResolutionOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsModuleResolution); -var sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics); +var sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsBindDiagnostics); var optionsAffectingProgramStructure = optionDeclarations.filter((option) => !!option.affectsProgramStructure); var transpileOptionValueCompilerOptions = optionDeclarations.filter((option) => hasProperty(option, "transpileOptionValue")); var optionsForBuild = [ @@ -35124,14 +35295,14 @@ function createDiagnosticForInvalidCustomType(opt, createDiagnostic) { return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames); } function parseCustomTypeOption(opt, value, errors) { - return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors); + return convertJsonOptionOfCustomType(opt, (value ?? "").trim(), errors); } function parseListTypeOption(opt, value = "", errors) { - value = trimString(value); + value = value.trim(); if (startsWith(value, "-")) { return void 0; } - if (opt.type === "listOrElement" && !stringContains(value, ",")) { + if (opt.type === "listOrElement" && !value.includes(",")) { return validateJsonOptionValue(opt, value, errors); } if (value === "") { @@ -35370,9 +35541,8 @@ function parseBuildCommand(args) { } return { buildOptions, watchOptions, projects, errors }; } -function getDiagnosticText(_message, ..._args) { - const diagnostic = createCompilerDiagnostic.apply(void 0, arguments); - return diagnostic.messageText; +function getDiagnosticText(message, ...args) { + return cast(createCompilerDiagnostic(message, ...args).messageText, isString); } function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) { const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName)); @@ -36156,7 +36326,7 @@ function parseConfig(json, sourceFile, host, basePath, configFileName, resolutio var _a; basePath = normalizeSlashes(basePath); const resolvedPath = getNormalizedAbsolutePath(configFileName || "", basePath); - if (resolutionStack.indexOf(resolvedPath) >= 0) { + if (resolutionStack.includes(resolvedPath)) { errors.push(createCompilerDiagnostic(Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, [...resolutionStack, resolvedPath].join(" -> "))); return { raw: json || convertToObject(sourceFile, errors) }; } @@ -36238,14 +36408,17 @@ function getExtendsConfigPathOrArray(value, host, basePath, configFileName, erro for (let index = 0; index < value.length; index++) { const fileName = value[index]; if (isString(fileName)) { - extendedConfigPath = append(extendedConfigPath, getExtendsConfigPath( - fileName, - host, - newBase, - errors, - valueExpression == null ? void 0 : valueExpression.elements[index], - sourceFile - )); + extendedConfigPath = append( + extendedConfigPath, + getExtendsConfigPath( + fileName, + host, + newBase, + errors, + valueExpression == null ? void 0 : valueExpression.elements[index], + sourceFile + ) + ); } else { convertJsonOption(extendsOptionDeclaration.element, value, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile); } @@ -36667,7 +36840,7 @@ function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, e return false; } for (const ext of extensionGroup) { - if (fileExtensionIs(file, ext)) { + if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) { return false; } const higherPriorityPath = keyMapper(changeExtension(file, ext)); @@ -36718,8 +36891,8 @@ function getDefaultValueForOption(option) { } // src/compiler/moduleNameResolver.ts -function trace(host) { - host.trace(formatMessage.apply(void 0, arguments)); +function trace(host, message, ...args) { + host.trace(formatMessage(message, ...args)); } function isTraceEnabled(compilerOptions, host) { return !!compilerOptions.traceResolution && host.trace !== void 0; @@ -36770,7 +36943,7 @@ function resolvedTypeScriptOnly(resolved) { Debug.assert(extensionIsTS(resolved.extension)); return { fileName: resolved.path, packageId: resolved.packageId }; } -function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, legacyResult) { +function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, cache, legacyResult) { if (!state.resultFromCache && !state.compilerOptions.preserveSymlinks && resolved && isExternalLibraryImport && !resolved.originalPath && !isExternalModuleNameRelative(moduleName)) { const { resolvedFileName, originalPath } = getOriginalAndResolvedFileName(resolved.path, state.host, state.traceEnabled); if (originalPath) @@ -36783,15 +36956,25 @@ function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName affectingLocations, diagnostics, state.resultFromCache, + cache, legacyResult ); } -function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) { +function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, cache, legacyResult) { if (resultFromCache) { - resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations); - resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations); - resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics); - return resultFromCache; + if (!(cache == null ? void 0 : cache.isReadonly)) { + resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations); + resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations); + resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics); + return resultFromCache; + } else { + return { + ...resultFromCache, + failedLookupLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.failedLookupLocations, failedLookupLocations), + affectingLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.affectingLocations, affectingLocations), + resolutionDiagnostics: initializeResolutionFieldForReadonlyCache(resultFromCache.resolutionDiagnostics, diagnostics) + }; + } } return { resolvedModule: resolved && { @@ -36819,6 +37002,13 @@ function updateResolutionField(to, value) { to.push(...value); return to; } +function initializeResolutionFieldForReadonlyCache(fromCache, value) { + if (!(fromCache == null ? void 0 : fromCache.length)) + return initializeResolutionField(value); + if (!value.length) + return fromCache.slice(); + return [...fromCache, ...value]; +} function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) { if (!hasProperty(jsonContent, fieldName)) { if (state.traceEnabled) { @@ -36996,10 +37186,14 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil const failedLookupLocations = []; const affectingLocations = []; let features = getNodeResolutionFeatures(options); - if (resolutionMode === 99 /* ESNext */ && (getEmitModuleResolutionKind(options) === 3 /* Node16 */ || getEmitModuleResolutionKind(options) === 99 /* NodeNext */)) { + if (resolutionMode !== void 0) { + features |= 30 /* AllFeatures */; + } + const moduleResolution = getEmitModuleResolutionKind(options); + if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) { features |= 32 /* EsmMode */; } - const conditions = features & 8 /* Exports */ ? getConditions(options, !!(features & 32 /* EsmMode */)) : []; + const conditions = features & 8 /* Exports */ ? getConditions(options, resolutionMode) : []; const diagnostics = []; const moduleResolutionState = { compilerOptions: options, @@ -37041,15 +37235,15 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil affectingLocations: initializeResolutionField(affectingLocations), resolutionDiagnostics: initializeResolutionField(diagnostics) }; - if (containingDirectory) { - cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set( + if (containingDirectory && cache && !cache.isReadonly) { + cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set( typeReferenceDirectiveName, /*mode*/ resolutionMode, result ); if (!isExternalModuleNameRelative(typeReferenceDirectiveName)) { - cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(typeReferenceDirectiveName, resolutionMode, redirectedReference).set(containingDirectory, result); + cache.getOrCreateCacheForNonRelativeName(typeReferenceDirectiveName, resolutionMode, redirectedReference).set(containingDirectory, result); } } if (traceEnabled) @@ -37090,12 +37284,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil } } return resolvedTypeScriptOnly( - loadNodeModuleFromDirectory( - 4 /* Declaration */, - candidate, - !directoryExists, - moduleResolutionState - ) + loadNodeModuleFromDirectory(4 /* Declaration */, candidate, !directoryExists, moduleResolutionState) ); }); } else { @@ -37172,12 +37361,20 @@ function getNodeResolutionFeatures(options) { } return features; } -function getConditions(options, esmMode) { - const conditions = esmMode || getEmitModuleResolutionKind(options) === 100 /* Bundler */ ? ["import"] : ["require"]; +function getConditions(options, resolutionMode) { + const moduleResolution = getEmitModuleResolutionKind(options); + if (resolutionMode === void 0) { + if (moduleResolution === 100 /* Bundler */) { + resolutionMode = 99 /* ESNext */; + } else if (moduleResolution === 2 /* Node10 */) { + return []; + } + } + const conditions = resolutionMode === 99 /* ESNext */ ? ["import"] : ["require"]; if (!options.noDtsResolution) { conditions.push("types"); } - if (getEmitModuleResolutionKind(options) !== 100 /* Bundler */) { + if (moduleResolution !== 100 /* Bundler */) { conditions.push("node"); } return concatenate(conditions, options.customConditions); @@ -37228,9 +37425,8 @@ function compilerOptionValueToString(value) { function getKeyForCompilerOptions(options, affectingOptionDeclarations) { return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + `|${options.pathsBasePath}`; } -function createCacheWithRedirects(ownOptions) { +function createCacheWithRedirects(ownOptions, optionsToRedirectsKey) { const redirectsMap = /* @__PURE__ */ new Map(); - const optionsToRedirectsKey = /* @__PURE__ */ new Map(); const redirectsKeyToMap = /* @__PURE__ */ new Map(); let ownMap = /* @__PURE__ */ new Map(); if (ownOptions) @@ -37239,7 +37435,8 @@ function createCacheWithRedirects(ownOptions) { getMapOfCacheRedirects, getOrCreateMapOfCacheRedirects, update, - clear: clear2 + clear: clear2, + getOwnMap: () => ownMap }; function getMapOfCacheRedirects(redirectedReference) { return redirectedReference ? getOrCreateMap( @@ -37340,13 +37537,14 @@ function getOrCreateCache(cacheWithRedirects, redirectedReference, key, create) } return result; } -function createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options) { - const directoryToModuleNameMap = createCacheWithRedirects(options); +function createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options, optionsToRedirectsKey) { + const directoryToModuleNameMap = createCacheWithRedirects(options, optionsToRedirectsKey); return { getFromDirectoryCache, getOrCreateCacheForDirectory, clear: clear2, - update + update, + directoryToModuleNameMap }; function clear2() { directoryToModuleNameMap.clear(); @@ -37402,23 +37600,14 @@ function createModeAwareCache() { return result; } } -function zipToModeAwareCache(file, keys, values, nameAndModeGetter) { - Debug.assert(keys.length === values.length); - const map2 = createModeAwareCache(); - for (let i = 0; i < keys.length; ++i) { - const entry = keys[i]; - map2.set(nameAndModeGetter.getName(entry), nameAndModeGetter.getMode(entry, file), values[i]); - } - return map2; -} function getOriginalOrResolvedModuleFileName(result) { return result.resolvedModule && (result.resolvedModule.originalPath || result.resolvedModule.resolvedFileName); } function getOriginalOrResolvedTypeReferenceFileName(result) { return result.resolvedTypeReferenceDirective && (result.resolvedTypeReferenceDirective.originalPath || result.resolvedTypeReferenceDirective.resolvedFileName); } -function createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFileName, options, getResolvedFileName) { - const moduleNameToDirectoryMap = createCacheWithRedirects(options); +function createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFileName, options, getResolvedFileName, optionsToRedirectsKey) { + const moduleNameToDirectoryMap = createCacheWithRedirects(options, optionsToRedirectsKey); return { getFromNonRelativeNameCache, getOrCreateCacheForNonRelativeName, @@ -37486,13 +37675,20 @@ function createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFile } } } -function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, getResolvedFileName) { - const perDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options); +function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, getResolvedFileName, optionsToRedirectsKey) { + optionsToRedirectsKey ?? (optionsToRedirectsKey = /* @__PURE__ */ new Map()); + const perDirectoryResolutionCache = createPerDirectoryResolutionCache( + currentDirectory, + getCanonicalFileName, + options, + optionsToRedirectsKey + ); const nonRelativeNameResolutionCache = createNonRelativeNameResolutionCache( currentDirectory, getCanonicalFileName, options, - getResolvedFileName + getResolvedFileName, + optionsToRedirectsKey ); packageJsonInfoCache ?? (packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName)); return { @@ -37502,7 +37698,8 @@ function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonic clear: clear2, update, getPackageJsonInfoCache: () => packageJsonInfoCache, - clearAllExceptPackageJsonInfoCache + clearAllExceptPackageJsonInfoCache, + optionsToRedirectsKey }; function clear2() { clearAllExceptPackageJsonInfoCache(); @@ -37517,24 +37714,26 @@ function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonic nonRelativeNameResolutionCache.update(options2); } } -function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache) { +function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, optionsToRedirectsKey) { const result = createModuleOrTypeReferenceResolutionCache( currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, - getOriginalOrResolvedModuleFileName + getOriginalOrResolvedModuleFileName, + optionsToRedirectsKey ); result.getOrCreateCacheForModuleName = (nonRelativeName, mode, redirectedReference) => result.getOrCreateCacheForNonRelativeName(nonRelativeName, mode, redirectedReference); return result; } -function createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache) { +function createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, optionsToRedirectsKey) { return createModuleOrTypeReferenceResolutionCache( currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, - getOriginalOrResolvedTypeReferenceFileName + getOriginalOrResolvedTypeReferenceFileName, + optionsToRedirectsKey ); } function getOptionsForLibraryResolution(options) { @@ -37595,13 +37794,13 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); break; case 2 /* Node10 */: - result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); + result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0); break; case 1 /* Classic */: result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); break; case 100 /* Bundler */: - result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); + result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0); break; default: return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`); @@ -37609,9 +37808,11 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca if (result && result.resolvedModule) (_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`); (_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null"); - cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); - if (!isExternalModuleNameRelative(moduleName)) { - cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); + if (cache && !cache.isReadonly) { + cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); + if (!isExternalModuleNameRelative(moduleName)) { + cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); + } } } if (traceEnabled) { @@ -37766,7 +37967,7 @@ function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, resolutionMode ); } -function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) { +function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) { const containingDirectory = getDirectoryPath(containingFile); const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0; let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; @@ -37783,7 +37984,8 @@ function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + conditions ); } function tryResolveJSModuleWorker(moduleName, initialDir, host) { @@ -37799,10 +38001,12 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) { /*isConfigLookup*/ false, /*redirectedReference*/ + void 0, + /*conditions*/ void 0 ); } -function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) { +function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) { const containingDirectory = getDirectoryPath(containingFile); let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; if (getResolveJsonModule(compilerOptions)) { @@ -37818,10 +38022,11 @@ function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + conditions ); } -function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) { +function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) { let extensions; if (isConfigLookup) { extensions = 8 /* Json */; @@ -37832,7 +38037,7 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos } else { extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; } - return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference); + return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions); } function nodeNextJsonConfigResolver(moduleName, containingFile, host) { return nodeModuleNameResolverWorker( @@ -37847,15 +38052,21 @@ function nodeNextJsonConfigResolver(moduleName, containingFile, host) { /*isConfigLookup*/ true, /*redirectedReference*/ + void 0, + /*conditions*/ void 0 ); } -function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) { +function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) { var _a, _b, _c, _d; const traceEnabled = isTraceEnabled(compilerOptions, host); const failedLookupLocations = []; const affectingLocations = []; - const conditions = getConditions(compilerOptions, !!(features & 32 /* EsmMode */)); + const moduleResolution = getEmitModuleResolutionKind(compilerOptions); + conditions ?? (conditions = getConditions( + compilerOptions, + moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */ + )); const diagnostics = []; const state = { compilerOptions, @@ -37865,17 +38076,17 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, affectingLocations, packageJsonInfoCache: cache, features, - conditions, + conditions: conditions ?? emptyArray, requestContainingDirectory: containingDirectory, reportDiagnostic: (diag2) => void diagnostics.push(diag2), isConfigLookup, candidateIsFromPackageJsonField: false }; - if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(compilerOptions))) { - trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", ")); + if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { + trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", ")); } let result; - if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) { + if (moduleResolution === 2 /* Node10 */) { const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0; @@ -37883,7 +38094,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, result = tryResolve(extensions, state); } let legacyResult; - if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.indexOf("import") > -1) { + if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && (conditions == null ? void 0 : conditions.includes("import"))) { traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update); const diagnosticState = { ...state, @@ -37903,6 +38114,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, affectingLocations, diagnostics, state, + cache, legacyResult ); function tryResolve(extensions2, state2) { @@ -37927,7 +38139,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); } if (!resolved2) { - if (moduleName.indexOf(":") > -1) { + if (moduleName.includes(":")) { if (traceEnabled) { trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); } @@ -37972,7 +38184,6 @@ function realPath(path, host, traceEnabled) { if (traceEnabled) { trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real); } - Debug.assert(host.fileExists(real), `${path} linked to nonexistent file ${real}`); return real; } function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) { @@ -38017,7 +38228,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, } var nodeModulesPathPart = "/node_modules/"; function pathContainsNodeModules(path) { - return stringContains(path, nodeModulesPathPart); + return path.includes(nodeModulesPathPart); } function parseNodeModuleFromPath(resolved, isFolder) { const path = normalizePath(resolved); @@ -38053,7 +38264,7 @@ function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) { } function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) { const filename = getBaseFileName(candidate); - if (filename.indexOf(".") === -1) { + if (!filename.includes(".")) { return void 0; } let extensionless = removeFileExtension(candidate); @@ -38183,7 +38394,7 @@ function getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) { return packageJsonInfo.contents.versionPaths || void 0; } function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { - var _a, _b, _c, _d, _e, _f, _g, _h; + var _a, _b, _c, _d, _e, _f; const { host, traceEnabled } = state; const packageJsonPath = combinePaths(packageDirectory, "package.json"); if (onlyRecordFailures) { @@ -38211,15 +38422,17 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath); } const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0 } }; - (_e = state.packageJsonInfoCache) == null ? void 0 : _e.setPackageJsonInfo(packageJsonPath, result); - (_f = state.affectingLocations) == null ? void 0 : _f.push(packageJsonPath); + if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) + state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, result); + (_e = state.affectingLocations) == null ? void 0 : _e.push(packageJsonPath); return result; } else { if (directoryExists && traceEnabled) { trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath); } - (_g = state.packageJsonInfoCache) == null ? void 0 : _g.setPackageJsonInfo(packageJsonPath, directoryExists); - (_h = state.failedLookupLocations) == null ? void 0 : _h.push(packageJsonPath); + if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) + state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, directoryExists); + (_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath); } } function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) { @@ -38477,7 +38690,7 @@ function comparePatternKeys(a, b) { } function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) { const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports); - if (!endsWith(moduleName, directorySeparator) && moduleName.indexOf("*") === -1 && hasProperty(lookupTable, moduleName)) { + if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) { const target = lookupTable[moduleName]; return loadModuleFromTargetImportOrExport( target, @@ -38488,7 +38701,7 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe moduleName ); } - const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.indexOf("*") !== -1 || endsWith(k, "/")), comparePatternKeys); + const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys); for (const potentialTarget of expandingKeys) { if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) { const target = lookupTable[potentialTarget]; @@ -38560,15 +38773,18 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + state.conditions + ); + return toSearchResult( + result.resolvedModule ? { + path: result.resolvedModule.resolvedFileName, + extension: result.resolvedModule.extension, + packageId: result.resolvedModule.packageId, + originalPath: result.resolvedModule.originalPath, + resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension + } : void 0 ); - return toSearchResult(result.resolvedModule ? { - path: result.resolvedModule.resolvedFileName, - extension: result.resolvedModule.extension, - packageId: result.resolvedModule.packageId, - originalPath: result.resolvedModule.originalPath, - resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension - } : void 0); } if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); @@ -38580,7 +38796,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target); const partsAfterFirst = parts.slice(1); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) { if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); } @@ -38591,7 +38807,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } const resolvedTarget = combinePaths(scope.packageDirectory, target); const subpathParts = getPathComponents(subpath); - if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) { + if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) { if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); } @@ -38601,13 +38817,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec ); } if (state.traceEnabled) { - trace( - state.host, - Diagnostics.Using_0_subpath_1_with_target_2, - isImports ? "imports" : "exports", - key, - pattern ? target.replace(/\*/g, subpath) : target + subpath - ); + trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports", key, pattern ? target.replace(/\*/g, subpath) : target + subpath); } const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath); const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports); @@ -38624,7 +38834,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec if (!Array.isArray(target)) { traceIfEnabled(state, Diagnostics.Entering_conditional_exports); for (const condition of getOwnKeys(target)) { - if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) { + if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) { traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition); const subTarget = target[condition]; const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key); @@ -38685,7 +38895,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { + if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { @@ -38759,7 +38969,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } } function isApplicableVersionedTypesKey(conditions, key) { - if (conditions.indexOf("types") === -1) + if (!conditions.includes("types")) return false; if (!startsWith(key, "types@")) return false; @@ -38964,7 +39174,7 @@ function getPackageNameFromTypesPackageName(mangledName) { return mangledName; } function unmangleScopedPackageName(typesPackageName) { - return stringContains(typesPackageName, mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName; + return typesPackageName.includes(mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName; } function tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containingDirectory, redirectedReference, state) { const result = cache && cache.getFromNonRelativeNameCache(moduleName, mode, containingDirectory, redirectedReference); @@ -39012,7 +39222,8 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host, failedLookupLocations, affectingLocations, diagnostics, - state + state, + cache ); function tryResolve(extensions) { const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state); @@ -39131,7 +39342,9 @@ function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, hos failedLookupLocations, affectingLocations, diagnostics, - state.resultFromCache + state.resultFromCache, + /*cache*/ + void 0 ); } function toSearchResult(value) { @@ -39180,7 +39393,7 @@ function getModuleInstanceStateWorker(node, visited) { break; case 272 /* ImportDeclaration */: case 271 /* ImportEqualsDeclaration */: - if (!hasSyntacticModifier(node, 1 /* Export */)) { + if (!hasSyntacticModifier(node, 32 /* Export */)) { return 0 /* NonInstantiated */; } break; @@ -39458,7 +39671,7 @@ function createBinder() { } function declareSymbol(symbolTable, parent2, node, includes, excludes, isReplaceableByMethod, isComputedName) { Debug.assert(isComputedName || !hasDynamicName(node)); - const isDefaultExport = hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default"; + const isDefaultExport = hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default"; const name = isComputedName ? "__computed" /* Computed */ : isDefaultExport && parent2 ? "default" /* Default */ : getDeclarationName(node); let symbol; if (name === void 0) { @@ -39502,7 +39715,7 @@ function createBinder() { } } const relatedInformation = []; - if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) { + if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 32 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) { relatedInformation.push(createDiagnosticForNode2(node, Diagnostics.Did_you_mean_0, `export type { ${unescapeLeadingUnderscores(node.name.escapedText)} }`)); } const declarationName = getNameOfDeclaration(node) || node; @@ -39531,7 +39744,7 @@ function createBinder() { return symbol; } function declareModuleMember(node, symbolFlags, symbolExcludes) { - const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); + const hasExportModifier = !!(getCombinedModifierFlags(node) & 32 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); @@ -39550,7 +39763,7 @@ function createBinder() { if (isJSDocTypeAlias(node)) Debug.assert(isInJSFile(node)); if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) { - if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) { + if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 2048 /* Default */) && !getDeclarationName(node)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } const exportKind = symbolFlags & 111551 /* Value */ ? 1048576 /* ExportValue */ : 0; @@ -39591,7 +39804,7 @@ function createBinder() { return false; if (isPropertyAccessEntityNameExpression(declName.parent) && isTopLevelNamespaceAssignment(declName.parent)) return true; - if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 1 /* Export */) + if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 32 /* Export */) return true; return false; } @@ -39622,7 +39835,7 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { @@ -39863,7 +40076,7 @@ function createBinder() { case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); + return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right) || (isBooleanLiteral(expr.right) && isNarrowingExpression(expr.left) || isBooleanLiteral(expr.left) && isNarrowingExpression(expr.right)); case 104 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); case 103 /* InKeyword */: @@ -40183,7 +40396,7 @@ function createBinder() { } function bindCaseBlock(node) { const clauses = node.clauses; - const isNarrowingSwitch = isNarrowingExpression(node.parent.expression); + const isNarrowingSwitch = node.parent.expression.kind === 112 /* TrueKeyword */ || isNarrowingExpression(node.parent.expression); let fallthroughFlow = unreachableFlow; for (let i = 0; i < clauses.length; i++) { const clauseStart = i; @@ -40669,7 +40882,7 @@ function createBinder() { function bindModuleDeclaration(node) { setExportContextFlag(node); if (isAmbientModule(node)) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { errorOnFirstToken(node, Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); } if (isModuleAugmentationExternal(node)) { @@ -40830,31 +41043,15 @@ function createBinder() { return; } if (inStrictMode && originalKeywordKind >= 119 /* FirstFutureReservedWord */ && originalKeywordKind <= 127 /* LastFutureReservedWord */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - getStrictModeIdentifierMessage(node), - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, getStrictModeIdentifierMessage(node), declarationNameToString(node))); } else if (originalKeywordKind === 135 /* AwaitKeyword */) { if (isExternalModule(file) && isInTopLevelContext(node)) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, declarationNameToString(node))); } else if (node.flags & 65536 /* AwaitContext */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node))); } } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 16384 /* YieldContext */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node))); } } } @@ -40870,11 +41067,7 @@ function createBinder() { function checkPrivateIdentifier(node) { if (node.escapedText === "#constructor") { if (!file.parseDiagnostics.length) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.constructor_is_a_reserved_word, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.constructor_is_a_reserved_word, declarationNameToString(node))); } } } @@ -40902,13 +41095,7 @@ function createBinder() { const identifier = name; if (isEvalOrArgumentsIdentifier(identifier)) { const span = getErrorSpanForNode(file, name); - file.bindDiagnostics.push(createFileDiagnostic( - file, - span.start, - span.length, - getStrictModeEvalOrArgumentsMessage(contextNode), - idText(identifier) - )); + file.bindDiagnostics.push(createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), idText(identifier))); } } } @@ -40939,12 +41126,7 @@ function createBinder() { if (languageVersion < 2 /* ES2015 */) { if (blockScopeContainer.kind !== 312 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); - file.bindDiagnostics.push(createFileDiagnostic( - file, - errorSpan.start, - errorSpan.length, - getStrictModeBlockScopeFunctionDeclarationMessage(node) - )); + file.bindDiagnostics.push(createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node))); } } } @@ -41175,11 +41357,7 @@ function createBinder() { return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); case 174 /* MethodDeclaration */: case 173 /* MethodSignature */: - return bindPropertyOrMethodOrAccessor( - node, - 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), - isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ - ); + return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */); case 262 /* FunctionDeclaration */: return bindFunctionDeclaration(node); case 176 /* Constructor */: @@ -41765,7 +41943,7 @@ function createBinder() { } if (!isBindingPattern(node.name)) { const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent; - if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { + if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 32 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 111551 /* BlockScopedVariableExcludes */); @@ -41917,7 +42095,7 @@ function isPurelyTypeDeclaration(s) { case 267 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; case 266 /* EnumDeclaration */: - return hasSyntacticModifier(s, 2048 /* Const */); + return hasSyntacticModifier(s, 4096 /* Const */); default: return false; } @@ -42251,10 +42429,12 @@ function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSo importingSourceFile, host, userPreferences, - options + options, + /*forAutoImport*/ + false ).moduleSpecifiers; } -function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) { +function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) { let computedWithoutCache = false; const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker); if (ambient) @@ -42272,11 +42452,19 @@ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions return { moduleSpecifiers: emptyArray, computedWithoutCache }; computedWithoutCache = true; modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host)); - const result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options); + const result = computeModuleSpecifiers( + modulePaths, + compilerOptions, + importingSourceFile, + host, + userPreferences, + options, + forAutoImport + ); cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result); return { moduleSpecifiers: result, computedWithoutCache }; } -function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) { +function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) { const info = getInfo(importingSourceFile.path, host); const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile); const existingSpecifier = forEach(modulePaths, (modulePath) => forEach( @@ -42333,7 +42521,7 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi redirectPathsSpecifiers = append(redirectPathsSpecifiers, local); } else if (pathIsBareSpecifier(local)) { pathsSpecifiers = append(pathsSpecifiers, local); - } else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) { + } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) { relativeSpecifiers = append(relativeSpecifiers, local); } } @@ -42516,32 +42704,29 @@ function tryGetModuleNameFromAmbientModule(moduleSymbol, checker) { if (decl) { return decl.name.text; } - const ambientModuleDeclareCandidates = mapDefined( - moduleSymbol.declarations, - (d) => { - var _a2, _b, _c, _d; - if (!isModuleDeclaration(d)) - return; - const topNamespace = getTopNamespace(d); - if (!(((_a2 = topNamespace == null ? void 0 : topNamespace.parent) == null ? void 0 : _a2.parent) && isModuleBlock(topNamespace.parent) && isAmbientModule(topNamespace.parent.parent) && isSourceFile(topNamespace.parent.parent.parent))) - return; - const exportAssignment = (_d = (_c = (_b = topNamespace.parent.parent.symbol.exports) == null ? void 0 : _b.get("export=")) == null ? void 0 : _c.valueDeclaration) == null ? void 0 : _d.expression; - if (!exportAssignment) - return; - const exportSymbol = checker.getSymbolAtLocation(exportAssignment); - if (!exportSymbol) - return; - const originalExportSymbol = (exportSymbol == null ? void 0 : exportSymbol.flags) & 2097152 /* Alias */ ? checker.getAliasedSymbol(exportSymbol) : exportSymbol; - if (originalExportSymbol === d.symbol) - return topNamespace.parent.parent; - function getTopNamespace(namespaceDeclaration) { - while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { - namespaceDeclaration = namespaceDeclaration.parent; - } - return namespaceDeclaration; + const ambientModuleDeclareCandidates = mapDefined(moduleSymbol.declarations, (d) => { + var _a2, _b, _c, _d; + if (!isModuleDeclaration(d)) + return; + const topNamespace = getTopNamespace(d); + if (!(((_a2 = topNamespace == null ? void 0 : topNamespace.parent) == null ? void 0 : _a2.parent) && isModuleBlock(topNamespace.parent) && isAmbientModule(topNamespace.parent.parent) && isSourceFile(topNamespace.parent.parent.parent))) + return; + const exportAssignment = (_d = (_c = (_b = topNamespace.parent.parent.symbol.exports) == null ? void 0 : _b.get("export=")) == null ? void 0 : _c.valueDeclaration) == null ? void 0 : _d.expression; + if (!exportAssignment) + return; + const exportSymbol = checker.getSymbolAtLocation(exportAssignment); + if (!exportSymbol) + return; + const originalExportSymbol = (exportSymbol == null ? void 0 : exportSymbol.flags) & 2097152 /* Alias */ ? checker.getAliasedSymbol(exportSymbol) : exportSymbol; + if (originalExportSymbol === d.symbol) + return topNamespace.parent.parent; + function getTopNamespace(namespaceDeclaration) { + while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { + namespaceDeclaration = namespaceDeclaration.parent; } + return namespaceDeclaration; } - ); + }); const ambientModuleDeclare = ambientModuleDeclareCandidates[0]; if (ambientModuleDeclare) { return ambientModuleDeclare.name.text; @@ -42632,12 +42817,12 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, /*currentDirectory*/ void 0 ); - const mode2 = endsWith(k, "/") ? 1 /* Directory */ : stringContains(k, "*") ? 2 /* Pattern */ : 0 /* Exact */; + const mode2 = endsWith(k, "/") ? 1 /* Directory */ : k.includes("*") ? 2 /* Pattern */ : 0 /* Exact */; return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode2); }); } else { for (const key of getOwnKeys(exports)) { - if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { + if (key === "default" || conditions.includes(key) || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = exports[key]; const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode); if (result) { @@ -42727,7 +42912,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa if (getResolvePackageJsonExports(options)) { const nodeModulesDirectoryName2 = packageRootPath.substring(parts.topLevelPackageNameIndex + 1); const packageName2 = getPackageNameFromTypesPackageName(nodeModulesDirectoryName2); - const conditions = getConditions(options, importMode === 99 /* ESNext */); + const conditions = getConditions(options, importMode); const fromExports = packageJsonContent.exports ? tryGetModuleNameFromExports(options, path, packageRootPath, packageName2, packageJsonContent.exports, conditions) : void 0; if (fromExports) { const withJsExtension = !hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) }; @@ -42803,7 +42988,7 @@ function processEnding(fileName, allowedEndings, options, host) { return fileName; } else if (fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".d.cts" /* Dcts */, ".cts" /* Cts */])) { return noExtension + getJSExtensionForFile(fileName, options); - } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && stringContains(fileName, ".d.")) { + } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && fileName.includes(".d.")) { return tryGetRealFileNameForNonJsDeclarationFileName(fileName); } switch (allowedEndings[0]) { @@ -42829,7 +43014,7 @@ function processEnding(fileName, allowedEndings, options, host) { } function tryGetRealFileNameForNonJsDeclarationFileName(fileName) { const baseName = getBaseFileName(fileName); - if (!endsWith(fileName, ".ts" /* Ts */) || !stringContains(baseName, ".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */])) + if (!endsWith(fileName, ".ts" /* Ts */) || !baseName.includes(".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */])) return void 0; const noExtension = removeExtension(fileName, ".ts" /* Ts */); const ext = noExtension.substring(noExtension.lastIndexOf(".")); @@ -42980,9 +43165,8 @@ var CheckMode = /* @__PURE__ */ ((CheckMode3) => { CheckMode3[CheckMode3["SkipContextSensitive"] = 4] = "SkipContextSensitive"; CheckMode3[CheckMode3["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; - CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; - CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; - CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; + CheckMode3[CheckMode3["RestBindingElement"] = 32] = "RestBindingElement"; + CheckMode3[CheckMode3["TypeOnly"] = 64] = "TypeOnly"; return CheckMode3; })(CheckMode || {}); var SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { @@ -43262,24 +43446,7 @@ function createTypeChecker(host) { getTypeOfPropertyOfContextualType, getFullyQualifiedName, getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */), - getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) => { - if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) { - return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ - )); - } - return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ - )); - }, + getCandidateSignaturesForStringLiteralCompletions, getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)), getExpandedParameters, hasEffectiveRestParameter, @@ -43478,22 +43645,59 @@ function createTypeChecker(host) { isTypeParameterPossiblyReferenced, typeHasCallOrConstructSignatures }; + function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) { + const candidatesSet = /* @__PURE__ */ new Set(); + const candidates = []; + runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( + call, + candidates, + /*argumentCount*/ + void 0, + 0 /* Normal */ + )); + for (const candidate of candidates) { + candidatesSet.add(candidate); + } + candidates.length = 0; + runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( + call, + candidates, + /*argumentCount*/ + void 0, + 0 /* Normal */ + )); + for (const candidate of candidates) { + candidatesSet.add(candidate); + } + return arrayFrom(candidatesSet); + } function runWithoutResolvedSignatureCaching(node, fn) { - const cachedSignatures = []; - while (node) { - if (isCallLikeExpression(node)) { + node = findAncestor(node, isCallLikeOrFunctionLikeExpression); + if (node) { + const cachedResolvedSignatures = []; + const cachedTypes2 = []; + while (node) { const nodeLinks2 = getNodeLinks(node); - const resolvedSignature = nodeLinks2.resolvedSignature; - cachedSignatures.push([nodeLinks2, resolvedSignature]); + cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]); nodeLinks2.resolvedSignature = void 0; + if (isFunctionExpressionOrArrowFunction(node)) { + const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node)); + const type = symbolLinks2.type; + cachedTypes2.push([symbolLinks2, type]); + symbolLinks2.type = void 0; + } + node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression); } - node = node.parent; - } - const result = fn(); - for (const [nodeLinks2, resolvedSignature] of cachedSignatures) { - nodeLinks2.resolvedSignature = resolvedSignature; + const result = fn(); + for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) { + nodeLinks2.resolvedSignature = resolvedSignature; + } + for (const [symbolLinks2, type] of cachedTypes2) { + symbolLinks2.type = type; + } + return result; } - return result; + return fn(); } function runWithInferenceBlockedFromSourceNode(node, fn) { const containingCall = findAncestor(node, isCallLikeExpression); @@ -43545,28 +43749,72 @@ function createTypeChecker(host) { var resolvingSymbol = createSymbol(0, "__resolving__" /* Resolving */); var unresolvedSymbols = /* @__PURE__ */ new Map(); var errorTypes = /* @__PURE__ */ new Map(); + var seenIntrinsicNames = /* @__PURE__ */ new Set(); var anyType = createIntrinsicType(1 /* Any */, "any"); - var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */); - var wildcardType = createIntrinsicType(1 /* Any */, "any"); + var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */, "auto"); + var wildcardType = createIntrinsicType( + 1 /* Any */, + "any", + /*objectFlags*/ + void 0, + "wildcard" + ); + var blockedStringType = createIntrinsicType( + 1 /* Any */, + "any", + /*objectFlags*/ + void 0, + "blocked string" + ); var errorType = createIntrinsicType(1 /* Any */, "error"); var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved"); - var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */); + var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable"); var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic"); var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); - var nonNullUnknownType = createIntrinsicType(2 /* Unknown */, "unknown"); + var nonNullUnknownType = createIntrinsicType( + 2 /* Unknown */, + "unknown", + /*objectFlags*/ + void 0, + "non-null" + ); var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */); - var missingType = createIntrinsicType(32768 /* Undefined */, "undefined"); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening"); + var missingType = createIntrinsicType( + 32768 /* Undefined */, + "undefined", + /*objectFlags*/ + void 0, + "missing" + ); var undefinedOrMissingType = exactOptionalPropertyTypes ? missingType : undefinedType; - var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined"); + var optionalType = createIntrinsicType( + 32768 /* Undefined */, + "undefined", + /*objectFlags*/ + void 0, + "optional" + ); var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */, "widening"); var stringType = createIntrinsicType(4 /* String */, "string"); var numberType = createIntrinsicType(8 /* Number */, "number"); var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); - var falseType = createIntrinsicType(512 /* BooleanLiteral */, "false"); + var falseType = createIntrinsicType( + 512 /* BooleanLiteral */, + "false", + /*objectFlags*/ + void 0, + "fresh" + ); var regularFalseType = createIntrinsicType(512 /* BooleanLiteral */, "false"); - var trueType = createIntrinsicType(512 /* BooleanLiteral */, "true"); + var trueType = createIntrinsicType( + 512 /* BooleanLiteral */, + "true", + /*objectFlags*/ + void 0, + "fresh" + ); var regularTrueType = createIntrinsicType(512 /* BooleanLiteral */, "true"); trueType.regularType = regularTrueType; trueType.freshType = trueType; @@ -43580,9 +43828,21 @@ function createTypeChecker(host) { var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, "symbol"); var voidType = createIntrinsicType(16384 /* Void */, "void"); var neverType = createIntrinsicType(131072 /* Never */, "never"); - var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */); - var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); - var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never"); + var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */, "silent"); + var implicitNeverType = createIntrinsicType( + 131072 /* Never */, + "never", + /*objectFlags*/ + void 0, + "implicit" + ); + var unreachableNeverType = createIntrinsicType( + 131072 /* Never */, + "never", + /*objectFlags*/ + void 0, + "unreachable" + ); var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); var stringOrNumberType = getUnionType([stringType, numberType]); var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]); @@ -43592,7 +43852,13 @@ function createTypeChecker(host) { var numericStringType = getTemplateLiteralType(["", ""], [numberType]); var restrictiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t, () => "(restrictive mapper)"); var permissiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? wildcardType : t, () => "(permissive mapper)"); - var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never"); + var uniqueLiteralType = createIntrinsicType( + 131072 /* Never */, + "never", + /*objectFlags*/ + void 0, + "unique literal" + ); var uniqueLiteralMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t, () => "(unique literal mapper)"); var outofbandVarianceMarkerHandler; var reportUnreliableMapper = makeFunctionTypeMapper((t) => { @@ -44389,6 +44655,9 @@ function createTypeChecker(host) { const sourceFiles = host.getSourceFiles(); return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } + if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { + return true; + } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { if (declaration.kind === 208 /* BindingElement */) { const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); @@ -44418,9 +44687,6 @@ function createTypeChecker(host) { if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) { return true; } - if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { - return true; - } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { return !isPropertyImmediatelyReferencedWithinDeclaration( @@ -44935,7 +45201,7 @@ function createTypeChecker(host) { if (lastLocation && lastLocation === location.name) { return false; } - if (location.asteriskToken || hasSyntacticModifier(location, 512 /* Async */)) { + if (location.asteriskToken || hasSyntacticModifier(location, 1024 /* Async */)) { return true; } return !getImmediatelyInvokedFunctionExpression(location); @@ -45099,8 +45365,17 @@ function createTypeChecker(host) { function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { if (meaning & 111551 /* Value */) { if (isPrimitiveTypeName(name)) { - if (isExtendedByInterface(errorLocation)) { - error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); + const grandparent = errorLocation.parent.parent; + if (grandparent && grandparent.parent && isHeritageClause(grandparent)) { + const heritageKind = grandparent.token; + const containerKind = grandparent.parent.kind; + if (containerKind === 264 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) { + error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name)); + } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) { + error(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name)); + } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 119 /* ImplementsKeyword */) { + error(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name)); + } } else { error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); } @@ -45132,16 +45407,6 @@ function createTypeChecker(host) { } return false; } - function isExtendedByInterface(node) { - const grandparent = node.parent.parent; - const parentOfGrandparent = grandparent.parent; - if (grandparent && parentOfGrandparent) { - const isExtending = isHeritageClause(grandparent) && grandparent.token === 96 /* ExtendsKeyword */; - const isInterface = isInterfaceDeclaration(parentOfGrandparent); - return isExtending && isInterface; - } - return false; - } function maybeMappedType(node, symbol) { const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || "quit"); if (container && container.members.length === 1) { @@ -45229,15 +45494,12 @@ function createTypeChecker(host) { diagnosticMessage = error(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { - addRelatedInfo( - diagnosticMessage, - createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName) - ); + addRelatedInfo(diagnosticMessage, createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName)); } } } function isSameScopeDescendentOf(initial, parent, stopAt) { - return !!parent && !!findAncestor(initial, (n) => n === parent || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || isAsyncFunction(n)) ? "quit" : false)); + return !!parent && !!findAncestor(initial, (n) => n === parent || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || getFunctionFlags(n) & 3 /* AsyncGenerator */) ? "quit" : false)); } function getAnyImportSyntax(node) { switch (node.kind) { @@ -45323,7 +45585,7 @@ function createTypeChecker(host) { return resolved; } function isSyntacticDefault(node) { - return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node); + return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node); } function getUsageModeForExpression(usage) { return isStringLiteralLike(usage) ? getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0; @@ -45408,11 +45670,14 @@ function createTypeChecker(host) { const exportAssignment = exportEqualsSymbol.valueDeclaration; const err = error(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); if (exportAssignment) { - addRelatedInfo(err, createDiagnosticForNode( - exportAssignment, - Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, - compilerOptionName - )); + addRelatedInfo( + err, + createDiagnosticForNode( + exportAssignment, + Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, + compilerOptionName + ) + ); } } else if (isImportClause(node)) { reportNonDefaultExport(moduleSymbol, node); @@ -45469,10 +45734,12 @@ function createTypeChecker(host) { const diagnostic = error(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); const exportStar = (_b = moduleSymbol.exports) == null ? void 0 : _b.get("__export" /* ExportStar */); if (exportStar) { - const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find((decl) => { - var _a2, _b2; - return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a2 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a2.exports) == null ? void 0 : _b2.has("default" /* Default */))); - }); + const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find( + (decl) => { + var _a2, _b2; + return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a2 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a2.exports) == null ? void 0 : _b2.has("default" /* Default */))); + } + ); if (defaultExport) { addRelatedInfo(diagnostic, createDiagnosticForNode(defaultExport, Diagnostics.export_Asterisk_does_not_re_export_a_default)); } @@ -45619,10 +45886,7 @@ function createTypeChecker(host) { const suggestionName = symbolToString(suggestion); const diagnostic = error(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); if (suggestion.valueDeclaration) { - addRelatedInfo( - diagnostic, - createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName) - ); + addRelatedInfo(diagnostic, createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)); } } else { if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has("default" /* Default */)) { @@ -45649,10 +45913,7 @@ function createTypeChecker(host) { const exportedSymbol = exports ? find(symbolsToArray(exports), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0; const diagnostic = exportedSymbol ? error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); if (localSymbol.declarations) { - addRelatedInfo( - diagnostic, - ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)) - ); + addRelatedInfo(diagnostic, ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName))); } } } else { @@ -46235,7 +46496,7 @@ function createTypeChecker(host) { const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = findAncestor(location, isImportCall)) == null ? void 0 : _a.arguments[0]) || ((_b = findAncestor(location, isImportDeclaration)) == null ? void 0 : _b.moduleSpecifier) || ((_c = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _c.moduleReference.expression) || ((_d = findAncestor(location, isExportDeclaration)) == null ? void 0 : _d.moduleSpecifier) || ((_e = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _e.name) || ((_f = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _f.argument.literal); const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat; const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); - const resolvedModule = getResolvedModule(currentSourceFile, moduleReference, mode); + const resolvedModule = (_g = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _g.resolvedModule; const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile); const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { @@ -46243,7 +46504,7 @@ function createTypeChecker(host) { error(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) { - const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { error( errorNode, @@ -46252,7 +46513,7 @@ function createTypeChecker(host) { ); } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + const importOrExport = ((_i = findAncestor(location, isImportDeclaration)) == null ? void 0 : _i.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); error(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); @@ -46272,9 +46533,8 @@ function createTypeChecker(host) { } if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) { const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); - const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); - const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_i = overrideClauseHost.assertions) == null ? void 0 : _i.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; - if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) { + const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); + if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) { if (findAncestor(location, isImportEqualsDeclaration)) { error(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); } else { @@ -46317,11 +46577,15 @@ function createTypeChecker(host) { } } } - diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorNode), errorNode, chainDiagnosticMessages( - diagnosticDetails, - Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead, - moduleReference - ))); + diagnostics.add(createDiagnosticForNodeFromMessageChain( + getSourceFileOfNode(errorNode), + errorNode, + chainDiagnosticMessages( + diagnosticDetails, + Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead, + moduleReference + ) + )); } } } @@ -46378,13 +46642,9 @@ function createTypeChecker(host) { const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1]; if (suggestedExt) { - error( - errorNode, - Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, - moduleReference + suggestedExt - ); + error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt); } else { - error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); + error(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); } } else { error(errorNode, moduleNotFoundError, moduleReference); @@ -46407,12 +46667,16 @@ function createTypeChecker(host) { if (!isExternalModuleNameRelative(moduleReference) && packageId) { errorInfo = createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageId.name); } - errorOrSuggestion(isError, errorNode, chainDiagnosticMessages( - errorInfo, - Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, - moduleReference, - resolvedFileName - )); + errorOrSuggestion( + isError, + errorNode, + chainDiagnosticMessages( + errorInfo, + Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, + moduleReference, + resolvedFileName + ) + ); } function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) { if (moduleSymbol == null ? void 0 : moduleSymbol.exports) { @@ -46649,10 +46913,12 @@ function createTypeChecker(host) { } if (exportStar == null ? void 0 : exportStar.isTypeOnly) { typeOnlyExportStarMap ?? (typeOnlyExportStarMap = /* @__PURE__ */ new Map()); - symbols.forEach((_, escapedName) => typeOnlyExportStarMap.set( - escapedName, - exportStar - )); + symbols.forEach( + (_, escapedName) => typeOnlyExportStarMap.set( + escapedName, + exportStar + ) + ); } return symbols; } @@ -46834,12 +47100,21 @@ function createTypeChecker(host) { function createOriginType(flags) { return new Type7(checker, flags); } - function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) { + function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) { + checkIntrinsicName(intrinsicName, debugIntrinsicName); const type = createType(kind); type.intrinsicName = intrinsicName; + type.debugIntrinsicName = debugIntrinsicName; type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */; return type; } + function checkIntrinsicName(name, debug) { + const key = `${name},${debug ?? ""}`; + if (seenIntrinsicNames.has(key)) { + Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : ""}; you may need to pass a name to createIntrinsicType.`); + } + seenIntrinsicNames.add(key); + } function createObjectType(objectFlags, symbol) { const type = createTypeWithSymbol(524288 /* Object */, symbol); type.objectFlags = objectFlags; @@ -46888,13 +47163,7 @@ function createTypeChecker(host) { return resolved; } function createAnonymousType(symbol, members, callSignatures, constructSignatures, indexInfos) { - return setStructuredTypeMembers( - createObjectType(16 /* Anonymous */, symbol), - members, - callSignatures, - constructSignatures, - indexInfos - ); + return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, indexInfos); } function getResolvedTypeWithoutAbstractConstructSignatures(type) { if (type.constructSignatures.length === 0) @@ -47242,20 +47511,20 @@ function createTypeChecker(host) { var _a, _b; if (!isDeclarationVisible(declaration)) { const anyImportSyntax = getAnyImportSyntax(declaration); - if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 1 /* Export */) && // import clause without export + if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 32 /* Export */) && // import clause without export isDeclarationVisible(anyImportSyntax.parent)) { return addVisibleAlias(declaration, anyImportSyntax); - } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 1 /* Export */) && // unexported variable statement + } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 32 /* Export */) && // unexported variable statement isDeclarationVisible(declaration.parent.parent.parent)) { return addVisibleAlias(declaration, declaration.parent.parent); - } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 1 /* Export */) && isDeclarationVisible(declaration.parent)) { + } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 32 /* Export */) && isDeclarationVisible(declaration.parent)) { return addVisibleAlias(declaration, declaration); } else if (isBindingElement(declaration)) { - if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 1 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) { + if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 32 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) { return addVisibleAlias(declaration, declaration.parent.parent.parent.parent); } else if (symbol.flags & 2 /* BlockScopedVariable */) { const variableStatement = findAncestor(declaration, isVariableStatement); - if (hasSyntacticModifier(variableStatement, 1 /* Export */)) { + if (hasSyntacticModifier(variableStatement, 32 /* Export */)) { return true; } if (!isDeclarationVisible(variableStatement.parent)) { @@ -47478,7 +47747,8 @@ function createTypeChecker(host) { visitedTypes: void 0, symbolDepth: void 0, inferTypeParameters: void 0, - approximateLength: 0 + approximateLength: 0, + trackedSymbols: void 0 }; context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost); const resultingNode = cb(context); @@ -47932,7 +48202,7 @@ function createTypeChecker(host) { } } function visitAndTransformType(type2, transform) { - var _a2, _b2; + var _a2, _b2, _c; const typeId = type2.id; const isConstructorObject = getObjectFlags(type2) & 16 /* Anonymous */ && type2.symbol && type2.symbol.flags & 32 /* Class */; const id = getObjectFlags(type2) & 4 /* Reference */ && type2.node ? "N" + getNodeId(type2.node) : type2.flags & 16777216 /* Conditional */ ? "N" + getNodeId(type2.root.node) : type2.symbol ? (isConstructorObject ? "+" : "") + getSymbolId(type2.symbol) : void 0; @@ -47949,6 +48219,13 @@ function createTypeChecker(host) { } const cachedResult = (_a2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a2.get(key); if (cachedResult) { + (_b2 = cachedResult.trackedSymbols) == null ? void 0 : _b2.forEach( + ([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol( + symbol, + enclosingDeclaration, + meaning + ) + ); if (cachedResult.truncating) { context.truncating = true; } @@ -47964,16 +48241,24 @@ function createTypeChecker(host) { context.symbolDepth.set(id, depth + 1); } context.visitedTypes.add(typeId); + const prevTrackedSymbols = context.trackedSymbols; + context.trackedSymbols = void 0; const startLength = context.approximateLength; const result = transform(type2); const addedLength = context.approximateLength - startLength; if (!context.reportedDiagnostic && !context.encounteredError) { - (_b2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _b2.set(key, { node: result, truncating: context.truncating, addedLength }); + (_c = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _c.set(key, { + node: result, + truncating: context.truncating, + addedLength, + trackedSymbols: context.trackedSymbols + }); } context.visitedTypes.delete(typeId); if (id) { context.symbolDepth.set(id, depth); } + context.trackedSymbols = prevTrackedSymbols; return result; function deepCloneOrReuseNode(node) { if (!nodeIsSynthesized(node) && getParseTreeNode(node) === node) { @@ -48124,11 +48409,7 @@ function createTypeChecker(host) { } } else { if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) { - qualifier = factory.updateQualifiedName( - qualifier, - qualifier.left, - setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments) - ); + qualifier = factory.updateQualifiedName(qualifier, qualifier.left, setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments)); } } } @@ -48140,7 +48421,7 @@ function createTypeChecker(host) { return factory.updateImportTypeNode( root, root.argument, - root.assertions, + root.attributes, qualifier, typeArguments, root.isTypeOf @@ -48154,11 +48435,7 @@ function createTypeChecker(host) { } } else { if (typeArguments !== getIdentifierTypeArguments(typeName.right)) { - typeName = factory.updateQualifiedName( - typeName, - typeName.left, - setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments) - ); + typeName = factory.updateQualifiedName(typeName, typeName.left, setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments)); } } typeArguments = ref.typeArguments; @@ -48218,7 +48495,7 @@ function createTypeChecker(host) { if (propertySymbol.flags & 4194304 /* Prototype */) { continue; } - if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (8 /* Private */ | 16 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) { + if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (2 /* Private */ | 4 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) { context.tracker.reportPrivateInBaseOfClassExpression(unescapeLeadingUnderscores(propertySymbol.escapedName)); } } @@ -48282,6 +48559,28 @@ function createTypeChecker(host) { const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); context.enclosingDeclaration = saveEnclosingDeclaration; context.approximateLength += symbolName(propertySymbol).length + 1; + if (propertySymbol.flags & 98304 /* Accessor */) { + const writeType = getWriteTypeOfSymbol(propertySymbol); + if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) { + const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */); + const getterSignature = getSignatureFromDeclaration(getterDeclaration); + typeElements.push( + setCommentRange( + signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }), + getterDeclaration + ) + ); + const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */); + const setterSignature = getSignatureFromDeclaration(setterDeclaration); + typeElements.push( + setCommentRange( + signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }), + setterDeclaration + ) + ); + return; + } + } const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); @@ -48319,9 +48618,9 @@ function createTypeChecker(host) { typeElements.push(preserveCommentsOn(propertySignature)); function preserveCommentsOn(node) { var _a2; - if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) { - const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */); - const commentText = getTextOfJSDocComment(d.comment); + const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 355 /* JSDocPropertyTag */); + if (jsdocPropertyTag) { + const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); } @@ -48499,7 +48798,7 @@ function createTypeChecker(host) { let modifiers = options == null ? void 0 : options.modifiers; if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); - modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); + modifiers = factory.createModifiersFromModifierFlags(flags | 64 /* Abstract */); } const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, @@ -48613,11 +48912,17 @@ function createTypeChecker(host) { const constraintNode = constraint && typeToTypeNodeHelper(constraint, context); return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } - function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); - if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); + function getEffectiveParameterDeclaration(parameterSymbol) { + const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); + if (parameterDeclaration) { + return parameterDeclaration; } + if (!isTransientSymbol(parameterSymbol)) { + return getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); + } + } + function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { + const parameterDeclaration = getEffectiveParameterDeclaration(parameterSymbol); let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { parameterType = getOptionalType(parameterType); @@ -48626,7 +48931,7 @@ function createTypeChecker(host) { const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -48640,6 +48945,9 @@ function createTypeChecker(host) { ); context.approximateLength += symbolName(parameterSymbol).length + 3; return parameterNode; + } + function parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context) { + return parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); function cloneBindingName(node) { return elideInitializerAndSetEmitFlags(node); function elideInitializerAndSetEmitFlags(node2) { @@ -48715,7 +49023,9 @@ function createTypeChecker(host) { if (!accessibleSymbolChain || needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning2 : getQualifiedLeftMeaning(meaning2))) { const parents = getContainersOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol2, context.enclosingDeclaration, meaning2); if (length(parents)) { - parentSpecifiers = parents.map((symbol3) => some(symbol3.declarations, hasNonGlobalAugmentationExternalModuleSymbol) ? getSpecifierForModuleSymbol(symbol3, context) : void 0); + parentSpecifiers = parents.map( + (symbol3) => some(symbol3.declarations, hasNonGlobalAugmentationExternalModuleSymbol) ? getSpecifierForModuleSymbol(symbol3, context) : void 0 + ); const indices = parents.map((_, i) => i); indices.sort(sortByBestName); const sortedParents = indices.map((i) => parents[i]); @@ -48866,7 +49176,6 @@ function createTypeChecker(host) { return symbol.parent ? factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier; } function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) { - var _a, _b, _c, _d; const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */)); const isTypeOf = meaning === 111551 /* Value */; if (some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { @@ -48875,40 +49184,42 @@ function createTypeChecker(host) { const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration)); const targetFile = getSourceFileOfModule(chain[0]); let specifier; - let assertion; + let attributes; if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) { if ((targetFile == null ? void 0 : targetFile.impliedNodeFormat) === 99 /* ESNext */ && targetFile.impliedNodeFormat !== (contextFile == null ? void 0 : contextFile.impliedNodeFormat)) { specifier = getSpecifierForModuleSymbol(chain[0], context, 99 /* ESNext */); - assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([ - factory.createAssertEntry( - factory.createStringLiteral("resolution-mode"), - factory.createStringLiteral("import") - ) - ]))); - (_b = (_a = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _b.call(_a); + attributes = factory.createImportAttributes( + factory.createNodeArray([ + factory.createImportAttribute( + factory.createStringLiteral("resolution-mode"), + factory.createStringLiteral("import") + ) + ]) + ); } } if (!specifier) { specifier = getSpecifierForModuleSymbol(chain[0], context); } - if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.indexOf("/node_modules/") >= 0) { + if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.includes("/node_modules/")) { const oldSpecifier = specifier; if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) { const swappedMode = (contextFile == null ? void 0 : contextFile.impliedNodeFormat) === 99 /* ESNext */ ? 1 /* CommonJS */ : 99 /* ESNext */; specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode); - if (specifier.indexOf("/node_modules/") >= 0) { + if (specifier.includes("/node_modules/")) { specifier = oldSpecifier; } else { - assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([ - factory.createAssertEntry( - factory.createStringLiteral("resolution-mode"), - factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require") - ) - ]))); - (_d = (_c = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _d.call(_c); + attributes = factory.createImportAttributes( + factory.createNodeArray([ + factory.createImportAttribute( + factory.createStringLiteral("resolution-mode"), + factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require") + ) + ]) + ); } } - if (!assertion) { + if (!attributes) { context.encounteredError = true; if (context.tracker.reportLikelyUnsafeImportRequiredError) { context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier); @@ -48928,11 +49239,11 @@ function createTypeChecker(host) { void 0 ); } - return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf); + return factory.createImportTypeNode(lit, attributes, nonRootParts, typeParameterNodes, isTypeOf); } else { const splitNode = getTopmostIndexedAccessType(nonRootParts); const qualifier = splitNode.objectType.typeName; - return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, assertion, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType); + return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType); } } const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0); @@ -49132,7 +49443,18 @@ function createTypeChecker(host) { } function isStringNamed(d) { const name = getNameOfDeclaration(d); - return !!name && isStringLiteral(name); + if (!name) { + return false; + } + if (isComputedPropertyName(name)) { + const type = checkExpression(name.expression); + return !!(type.flags & 402653316 /* StringLike */); + } + if (isElementAccessExpression(name)) { + const type = checkExpression(name.argumentExpression); + return !!(type.flags & 402653316 /* StringLike */); + } + return isStringLiteral(name); } function isSingleQuotedStringNamed(d) { const name = getNameOfDeclaration(d); @@ -49145,14 +49467,15 @@ function createTypeChecker(host) { function getPropertyNameNodeForSymbol(symbol, context) { const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); - const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed); + const isMethod = !!(symbol.flags & 8192 /* Method */); + const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod); if (fromNameType) { return fromNameType; } const rawName = unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod); } - function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed) { + function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod) { const nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { @@ -49163,7 +49486,7 @@ function createTypeChecker(host) { if (isNumericLiteralName(name) && startsWith(name, "-")) { return factory.createComputedPropertyName(factory.createNumericLiteral(+name)); } - return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions)); + return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod); } if (nameType.flags & 8192 /* UniqueESSymbol */) { return factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, 111551 /* Value */)); @@ -49396,7 +49719,7 @@ function createTypeChecker(host) { return factory.updateImportTypeNode( node, factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), - node.assertions, + node.attributes, node.qualifier, visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode), node.isTypeOf @@ -49452,6 +49775,7 @@ function createTypeChecker(host) { } } function symbolTableToDeclarationStatements(symbolTable, context, bundled) { + var _a; const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, 174 /* MethodDeclaration */, @@ -49473,12 +49797,15 @@ function createTypeChecker(host) { ...oldcontext, usedSymbolNames: new Set(oldcontext.usedSymbolNames), remappedSymbolNames: /* @__PURE__ */ new Map(), + remappedSymbolReferences: new Map((_a = oldcontext.remappedSymbolReferences) == null ? void 0 : _a.entries()), tracker: void 0 }; const tracker = { ...oldcontext.tracker.inner, trackSymbol: (sym, decl, meaning) => { - var _a; + var _a2, _b; + if ((_a2 = context.remappedSymbolNames) == null ? void 0 : _a2.has(getSymbolId(sym))) + return false; const accessibleResult = isSymbolAccessible( sym, decl, @@ -49489,9 +49816,13 @@ function createTypeChecker(host) { if (accessibleResult.accessibility === 0 /* Accessible */) { const chain = lookupSymbolChainWorker(sym, context, meaning); if (!(sym.flags & 4 /* Property */)) { - includePrivateSymbol(chain[0]); + const root = chain[0]; + const contextFile = getSourceFileOfNode(oldcontext.enclosingDeclaration); + if (some(root.declarations, (d) => getSourceFileOfNode(d) === contextFile)) { + includePrivateSymbol(root); + } } - } else if ((_a = oldcontext.tracker.inner) == null ? void 0 : _a.trackSymbol) { + } else if ((_b = oldcontext.tracker.inner) == null ? void 0 : _b.trackSymbol) { return oldcontext.tracker.inner.trackSymbol(sym, decl, meaning); } return false; @@ -49524,7 +49855,7 @@ function createTypeChecker(host) { const nsIndex = findIndex(statements, isModuleDeclaration); let ns = nsIndex !== -1 ? statements[nsIndex] : void 0; if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier(exportAssignment.expression) && isIdentifier(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) { - const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 1 /* Export */)); + const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 32 /* Export */)); const name = ns.name; let body = ns.body; if (length(excessExports)) { @@ -49534,30 +49865,33 @@ function createTypeChecker(host) { ns.name, body = factory.updateModuleBlock( body, - factory.createNodeArray([...ns.body.statements, factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier( + factory.createNodeArray([ + ...ns.body.statements, + factory.createExportDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - /*propertyName*/ - void 0, - id - ))), - /*moduleSpecifier*/ - void 0 - )]) + factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier( + /*isTypeOnly*/ + false, + /*propertyName*/ + void 0, + id + ))), + /*moduleSpecifier*/ + void 0 + ) + ]) ) ); statements = [...statements.slice(0, nsIndex), ns, ...statements.slice(nsIndex + 1)]; } if (!find(statements, (s) => s !== ns && nodeHasName(s, name))) { results = []; - const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 1 /* Export */) || isExportAssignment(s) || isExportDeclaration(s)); + const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 32 /* Export */) || isExportAssignment(s) || isExportDeclaration(s)); forEach(body.statements, (s) => { - addResult(s, mixinExportFlag ? 1 /* Export */ : 0 /* None */); + addResult(s, mixinExportFlag ? 32 /* Export */ : 0 /* None */); }); statements = [...filter(statements, (s) => s !== ns && s !== exportAssignment), ...results]; } @@ -49568,15 +49902,18 @@ function createTypeChecker(host) { const exports = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); if (length(exports) > 1) { const nonExports = filter(statements, (d) => !isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause); - statements = [...nonExports, factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(flatMap(exports, (e) => cast(e.exportClause, isNamedExports).elements)), - /*moduleSpecifier*/ - void 0 - )]; + statements = [ + ...nonExports, + factory.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createNamedExports(flatMap(exports, (e) => cast(e.exportClause, isNamedExports).elements)), + /*moduleSpecifier*/ + void 0 + ) + ]; } const reexports = filter(statements, (d) => isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); if (length(reexports) > 1) { @@ -49585,7 +49922,7 @@ function createTypeChecker(host) { for (const group2 of groups) { if (group2.length > 1) { statements = [ - ...filter(statements, (s) => group2.indexOf(s) === -1), + ...filter(statements, (s) => !group2.includes(s)), factory.createExportDeclaration( /*modifiers*/ void 0, @@ -49602,7 +49939,7 @@ function createTypeChecker(host) { return statements; } function inlineExportModifiers(statements) { - const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.assertClause && !!d.exportClause && isNamedExports(d.exportClause)); + const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports(d.exportClause)); if (index >= 0) { const exportDecl = statements[index]; const replacements = mapDefined(exportDecl.exportClause.elements, (e) => { @@ -49630,7 +49967,7 @@ function createTypeChecker(host) { replacements ), exportDecl.moduleSpecifier, - exportDecl.assertClause + exportDecl.attributes ); } } @@ -49646,12 +49983,12 @@ function createTypeChecker(host) { return statements; } function addExportModifier(node) { - const flags = (getEffectiveModifierFlags(node) | 1 /* Export */) & ~2 /* Ambient */; - return factory.updateModifiers(node, flags); + const flags = (getEffectiveModifierFlags(node) | 32 /* Export */) & ~128 /* Ambient */; + return factory.replaceModifiers(node, flags); } function removeExportModifier(node) { - const flags = getEffectiveModifierFlags(node) & ~1 /* Export */; - return factory.updateModifiers(node, flags); + const flags = getEffectiveModifierFlags(node) & ~32 /* Export */; + return factory.replaceModifiers(node, flags); } function visitSymbolTable(symbolTable2, suppressNewPrivateContext, propertyAsAlias) { if (!suppressNewPrivateContext) { @@ -49691,13 +50028,19 @@ function createTypeChecker(host) { if (context.reportedDiagnostic) { oldcontext.reportedDiagnostic = context.reportedDiagnostic; } + if (context.trackedSymbols) { + if (!oldContext.trackedSymbols) + oldContext.trackedSymbols = context.trackedSymbols; + else + Debug.assert(context.trackedSymbols === oldContext.trackedSymbols); + } context = oldContext; } } - function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias) { - var _a, _b, _c, _d; - const symbolName2 = unescapeLeadingUnderscores(symbol.escapedName); - const isDefault = symbol.escapedName === "default" /* Default */; + function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias, escapedSymbolName = symbol.escapedName) { + var _a2, _b, _c, _d, _e, _f; + const symbolName2 = unescapeLeadingUnderscores(escapedSymbolName); + const isDefault = escapedSymbolName === "default" /* Default */; if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && isStringANonContextualKeyword(symbolName2) && !isDefault) { context.encounteredError = true; return; @@ -49707,8 +50050,8 @@ function createTypeChecker(host) { if (needsPostExportDefault || needsExportDeclaration) { isPrivate = true; } - const modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 1024 /* Default */ : 0); - const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */; + const modifierFlags = (!isPrivate ? 32 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 2048 /* Default */ : 0); + const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && escapedSymbolName !== "export=" /* ExportEquals */; const isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags); @@ -49716,7 +50059,7 @@ function createTypeChecker(host) { if (symbol.flags & 524288 /* TypeAlias */) { serializeTypeAlias(symbol, symbolName2, modifierFlags); } - if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) { + if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && escapedSymbolName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) { if (propertyAsAlias) { const createdExport = serializeMaybeAliasAssignment(symbol); if (createdExport) { @@ -49726,17 +50069,24 @@ function createTypeChecker(host) { } else { const type = getTypeOfSymbol(symbol); const localName = getInternalSymbolName(symbol, symbolName2); - if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { + if (type.symbol && type.symbol !== symbol && type.symbol.flags & 16 /* Function */ && some(type.symbol.declarations, isFunctionExpressionOrArrowFunction) && (((_a2 = type.symbol.members) == null ? void 0 : _a2.size) || ((_b = type.symbol.exports) == null ? void 0 : _b.size))) { + if (!context.remappedSymbolReferences) { + context.remappedSymbolReferences = /* @__PURE__ */ new Map(); + } + context.remappedSymbolReferences.set(getSymbolId(type.symbol), symbol); + serializeSymbolWorker(type.symbol, isPrivate, propertyAsAlias, escapedSymbolName); + context.remappedSymbolReferences.delete(getSymbolId(type.symbol)); + } else if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags); } else { - const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; + const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_c = symbol.parent) == null ? void 0 : _c.valueDeclaration) && isSourceFile((_d = symbol.parent) == null ? void 0 : _d.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol); let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d)); if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { textRange = textRange.parent.parent; } - const propertyAccessRequire = (_c = symbol.declarations) == null ? void 0 : _c.find(isPropertyAccessExpression); - if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_d = type.symbol) == null ? void 0 : _d.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { + const propertyAccessRequire = (_e = symbol.declarations) == null ? void 0 : _e.find(isPropertyAccessExpression); + if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_f = type.symbol) == null ? void 0 : _f.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { const alias = localName === propertyAccessRequire.parent.right.escapedText ? void 0 : propertyAccessRequire.parent.right; addResult( factory.createExportDeclaration( @@ -49755,19 +50105,22 @@ function createTypeChecker(host) { ); context.tracker.trackSymbol(type.symbol, context.enclosingDeclaration, 111551 /* Value */); } else { - const statement = setTextRange(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([ - factory.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) - ) - ], flags) - ), textRange); - addResult(statement, name !== localName ? modifierFlags & ~1 /* Export */ : modifierFlags); + const statement = setTextRange( + factory.createVariableStatement( + /*modifiers*/ + void 0, + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + name, + /*exclamationToken*/ + void 0, + serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) + ) + ], flags) + ), + textRange + ); + addResult(statement, name !== localName ? modifierFlags & ~32 /* Export */ : modifierFlags); if (name !== localName && !isPrivate) { addResult( factory.createExportDeclaration( @@ -49840,18 +50193,21 @@ function createTypeChecker(host) { factory.createIdentifier(getInternalSymbolName(symbol, symbolName2)) ), 0 /* None */); } else if (needsExportDeclaration) { - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( + addResult( + factory.createExportDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - getInternalSymbolName(symbol, symbolName2), - symbolName2 - )]) - ), 0 /* None */); + factory.createNamedExports([factory.createExportSpecifier( + /*isTypeOnly*/ + false, + getInternalSymbolName(symbol, symbolName2), + symbolName2 + )]) + ), + 0 /* None */ + ); } } function includePrivateSymbol(symbol) { @@ -49859,10 +50215,7 @@ function createTypeChecker(host) { return; Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]); getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol); - const isExternalImportAlias = !!(symbol.flags & 2097152 /* Alias */) && !some( - symbol.declarations, - (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference) - ); + const isExternalImportAlias = !!(symbol.flags & 2097152 /* Alias */) && !some(symbol.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference)); deferredPrivatesStack[isExternalImportAlias ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration2) { @@ -49872,43 +50225,46 @@ function createTypeChecker(host) { if (canHaveModifiers(node)) { let newModifierFlags = 0 /* None */; const enclosingDeclaration2 = context.enclosingDeclaration && (isJSDocTypeAlias(context.enclosingDeclaration) ? getSourceFileOfNode(context.enclosingDeclaration) : context.enclosingDeclaration); - if (additionalModifierFlags & 1 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { - newModifierFlags |= 1 /* Export */; + if (additionalModifierFlags & 32 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { + newModifierFlags |= 32 /* Export */; } - if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { - newModifierFlags |= 2 /* Ambient */; + if (addingDeclare && !(newModifierFlags & 32 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { + newModifierFlags |= 128 /* Ambient */; } - if (additionalModifierFlags & 1024 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { - newModifierFlags |= 1024 /* Default */; + if (additionalModifierFlags & 2048 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { + newModifierFlags |= 2048 /* Default */; } if (newModifierFlags) { - node = factory.updateModifiers(node, newModifierFlags | getEffectiveModifierFlags(node)); + node = factory.replaceModifiers(node, newModifierFlags | getEffectiveModifierFlags(node)); } } results.push(node); } function serializeTypeAlias(symbol, symbolName2, modifierFlags) { - var _a; + var _a2; const aliasType = getDeclaredTypeOfTypeAlias(symbol); const typeParams = getSymbolLinks(symbol).typeParameters; const typeParamDecls = map(typeParams, (p) => typeParameterToDeclaration(p, context)); - const jsdocAliasDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isJSDocTypeAlias); + const jsdocAliasDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isJSDocTypeAlias); const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0); const oldFlags = context.flags; context.flags |= 8388608 /* InTypeAlias */; const oldEnclosingDecl = context.enclosingDeclaration; context.enclosingDeclaration = jsdocAliasDecl; const typeNode = jsdocAliasDecl && jsdocAliasDecl.typeExpression && isJSDocTypeExpression(jsdocAliasDecl.typeExpression) && serializeExistingTypeNode(context, jsdocAliasDecl.typeExpression.type, includePrivateSymbol, bundled) || typeToTypeNodeHelper(aliasType, context); - addResult(setSyntheticLeadingComments( - factory.createTypeAliasDeclaration( - /*modifiers*/ - void 0, - getInternalSymbolName(symbol, symbolName2), - typeParamDecls, - typeNode + addResult( + setSyntheticLeadingComments( + factory.createTypeAliasDeclaration( + /*modifiers*/ + void 0, + getInternalSymbolName(symbol, symbolName2), + typeParamDecls, + typeNode + ), + !commentText ? [] : [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }] ), - !commentText ? [] : [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }] - ), modifierFlags); + modifierFlags + ); context.flags = oldFlags; context.enclosingDeclaration = oldEnclosingDecl; } @@ -49923,14 +50279,17 @@ function createTypeChecker(host) { const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; - addResult(factory.createInterfaceDeclaration( - /*modifiers*/ - void 0, - getInternalSymbolName(symbol, symbolName2), - typeParamDecls, - heritageClauses, - [...indexSignatures, ...constructSignatures, ...callSignatures, ...members] - ), modifierFlags); + addResult( + factory.createInterfaceDeclaration( + /*modifiers*/ + void 0, + getInternalSymbolName(symbol, symbolName2), + typeParamDecls, + heritageClauses, + [...indexSignatures, ...constructSignatures, ...callSignatures, ...members] + ), + modifierFlags + ); } function getNamespaceMembersForSerialization(symbol) { const exports = getExportsOfSymbol(symbol); @@ -49957,12 +50316,12 @@ function createTypeChecker(host) { /*isTypeOnly*/ false, factory.createNamedExports(mapDefined(filter(mergedMembers, (n) => n.escapedName !== "export=" /* ExportEquals */), (s) => { - var _a, _b; + var _a2, _b; const name = unescapeLeadingUnderscores(s.escapedName); const localName2 = getInternalSymbolName(s, name); const aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); if (containingFile && (aliasDecl ? containingFile !== getSourceFileOfNode(aliasDecl) : !some(s.declarations, (d) => getSourceFileOfNode(d) === containingFile))) { - (_b = (_a = context.tracker) == null ? void 0 : _a.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a, containingFile, symbol, s); + (_b = (_a2 = context.tracker) == null ? void 0 : _a2.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a2, containingFile, symbol, s); return void 0; } const target = aliasDecl && getTargetOfAliasDeclaration( @@ -49980,24 +50339,33 @@ function createTypeChecker(host) { ); })) )]); - addResult(factory.createModuleDeclaration( - /*modifiers*/ - void 0, - factory.createIdentifier(localName), - nsBody, - 32 /* Namespace */ - ), 0 /* None */); + addResult( + factory.createModuleDeclaration( + /*modifiers*/ + void 0, + factory.createIdentifier(localName), + nsBody, + 32 /* Namespace */ + ), + 0 /* None */ + ); } } function serializeEnum(symbol, symbolName2, modifierFlags) { - addResult(factory.createEnumDeclaration( - factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 2048 /* Const */ : 0), - getInternalSymbolName(symbol, symbolName2), - map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => { - const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0; - return factory.createEnumMember(unescapeLeadingUnderscores(p.escapedName), initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue)); - }) - ), modifierFlags); + addResult( + factory.createEnumDeclaration( + factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 4096 /* Const */ : 0), + getInternalSymbolName(symbol, symbolName2), + map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => { + const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0; + return factory.createEnumMember( + unescapeLeadingUnderscores(p.escapedName), + initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue) + ); + }) + ), + modifierFlags + ); } function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); @@ -50029,13 +50397,7 @@ function createTypeChecker(host) { } function serializeAsNamespaceDeclaration(props, localName, modifierFlags, suppressNewPrivateContext) { if (length(props)) { - const localVsRemoteMap = arrayToMultiMap( - props, - (p) => !length(p.declarations) || some( - p.declarations, - (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration) - ) ? "local" : "remote" - ); + const localVsRemoteMap = arrayToMultiMap(props, (p) => !length(p.declarations) || some(p.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)) ? "local" : "remote"); const localProps = localVsRemoteMap.get("local") || emptyArray; let fakespace = parseNodeFactory.createModuleDeclaration( /*modifiers*/ @@ -50076,7 +50438,7 @@ function createTypeChecker(host) { factory.createIdentifier("default" /* Default */) )]) ) : d); - const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 1 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced; + const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 32 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced; fakespace = factory.updateModuleDeclaration( fakespace, fakespace.modifiers, @@ -50112,10 +50474,7 @@ function createTypeChecker(host) { } return cleanup(factory.createExpressionWithTypeArguments( expr, - map( - e.typeArguments, - (a) => serializeExistingTypeNode(context, a, includePrivateSymbol, bundled) || typeToTypeNodeHelper(getTypeFromTypeNode(a), context) - ) + map(e.typeArguments, (a) => serializeExistingTypeNode(context, a, includePrivateSymbol, bundled) || typeToTypeNodeHelper(getTypeFromTypeNode(a), context)) )); function cleanup(result2) { context.enclosingDeclaration = oldEnclosing; @@ -50128,8 +50487,8 @@ function createTypeChecker(host) { return void 0; } function serializeAsClass(symbol, localName, modifierFlags) { - var _a, _b; - const originalDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike); + var _a2, _b; + const originalDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isClassLike); const oldEnclosing = context.enclosingDeclaration; context.enclosingDeclaration = originalDecl || oldEnclosing; const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); @@ -50182,21 +50541,27 @@ function createTypeChecker(host) { ); const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */)); const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration( - factory.createModifiersFromModifierFlags(8 /* Private */), + factory.createModifiersFromModifierFlags(2 /* Private */), [], /*body*/ void 0 )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; - addResult(setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - localName, - typeParamDecls, - heritageClauses, - [...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties] - ), symbol.declarations && filter(symbol.declarations, (d) => isClassDeclaration(d) || isClassExpression(d))[0]), modifierFlags); + addResult( + setTextRange( + factory.createClassDeclaration( + /*modifiers*/ + void 0, + localName, + typeParamDecls, + heritageClauses, + [...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties] + ), + symbol.declarations && filter(symbol.declarations, (d) => isClassDeclaration(d) || isClassExpression(d))[0] + ), + modifierFlags + ); } function getSomeTargetNameFromDeclarations(declarations) { return firstDefined(declarations, (d) => { @@ -50219,7 +50584,7 @@ function createTypeChecker(host) { }); } function serializeAsAlias(symbol, localName, modifierFlags) { - var _a, _b, _c, _d, _e; + var _a2, _b, _c, _d, _e; const node = getDeclarationOfAliasSymbol(symbol); if (!node) return Debug.fail(); @@ -50239,28 +50604,31 @@ function createTypeChecker(host) { includePrivateSymbol(target); switch (node.kind) { case 208 /* BindingElement */: - if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ + addResult( + factory.createImportDeclaration( + /*modifiers*/ void 0, - factory.createNamedImports([factory.createImportSpecifier( + factory.createImportClause( /*isTypeOnly*/ false, - propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : void 0, - factory.createIdentifier(localName) - )]) + /*name*/ + void 0, + factory.createNamedImports([factory.createImportSpecifier( + /*isTypeOnly*/ + false, + propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : void 0, + factory.createIdentifier(localName) + )]) + ), + factory.createStringLiteral(specifier2), + /*attributes*/ + void 0 ), - factory.createStringLiteral(specifier2), - /*assertClause*/ - void 0 - ), 0 /* None */); + 0 /* None */ + ); break; } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); @@ -50278,22 +50646,28 @@ function createTypeChecker(host) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - uniqueName, - factory.createExternalModuleReference(factory.createStringLiteral(specifier2)) - ), 0 /* None */); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - factory.createQualifiedName(uniqueName, initializer.name) - ), modifierFlags); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + uniqueName, + factory.createExternalModuleReference(factory.createStringLiteral(specifier2)) + ), + 0 /* None */ + ); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createIdentifier(localName), + factory.createQualifiedName(uniqueName, initializer.name) + ), + modifierFlags + ); break; } case 271 /* ImportEqualsDeclaration */: @@ -50302,20 +50676,23 @@ function createTypeChecker(host) { break; } const isLocalImport = !(target.flags & 512 /* ValueModule */) && !isVariableDeclaration(node); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - isLocalImport ? symbolToName( - target, - context, - 67108863 /* All */, - /*expectsIdentifier*/ - false - ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) - ), isLocalImport ? modifierFlags : 0 /* None */); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createIdentifier(localName), + isLocalImport ? symbolToName( + target, + context, + 67108863 /* All */, + /*expectsIdentifier*/ + false + ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) + ), + isLocalImport ? modifierFlags : 0 /* None */ + ); break; case 270 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); @@ -50323,72 +50700,84 @@ function createTypeChecker(host) { case 273 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - /*namedBindings*/ - void 0 + addResult( + factory.createImportDeclaration( + /*modifiers*/ + void 0, + factory.createImportClause( + /*isTypeOnly*/ + false, + factory.createIdentifier(localName), + /*namedBindings*/ + void 0 + ), + specifier2, + node.parent.attributes ), - specifier2, - node.parent.assertClause - ), 0 /* None */); + 0 /* None */ + ); break; } case 274 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ + addResult( + factory.createImportDeclaration( + /*modifiers*/ void 0, - factory.createNamespaceImport(factory.createIdentifier(localName)) + factory.createImportClause( + /*isTypeOnly*/ + false, + /*name*/ + void 0, + factory.createNamespaceImport(factory.createIdentifier(localName)) + ), + specifier2, + node.parent.attributes ), - specifier2, - node.parent.parent.assertClause - ), 0 /* None */); + 0 /* None */ + ); break; } case 280 /* NamespaceExport */: - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamespaceExport(factory.createIdentifier(localName)), - factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) - ), 0 /* None */); + addResult( + factory.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createNamespaceExport(factory.createIdentifier(localName)), + factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) + ), + 0 /* None */ + ); break; case 276 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ + addResult( + factory.createImportDeclaration( + /*modifiers*/ void 0, - factory.createNamedImports([ - factory.createImportSpecifier( - /*isTypeOnly*/ - false, - localName !== verbatimTargetName ? factory.createIdentifier(verbatimTargetName) : void 0, - factory.createIdentifier(localName) - ) - ]) + factory.createImportClause( + /*isTypeOnly*/ + false, + /*name*/ + void 0, + factory.createNamedImports([ + factory.createImportSpecifier( + /*isTypeOnly*/ + false, + localName !== verbatimTargetName ? factory.createIdentifier(verbatimTargetName) : void 0, + factory.createIdentifier(localName) + ) + ]) + ), + specifier2, + node.parent.parent.parent.attributes ), - specifier2, - node.parent.parent.parent.assertClause - ), 0 /* None */); + 0 /* None */ + ); break; } case 281 /* ExportSpecifier */: @@ -50416,22 +50805,25 @@ function createTypeChecker(host) { } } function serializeExportSpecifier(localName, targetName, specifier) { - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( + addResult( + factory.createExportDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - localName !== targetName ? targetName : void 0, - localName - )]), - specifier - ), 0 /* None */); + factory.createNamedExports([factory.createExportSpecifier( + /*isTypeOnly*/ + false, + localName !== targetName ? targetName : void 0, + localName + )]), + specifier + ), + 0 /* None */ + ); } function serializeMaybeAliasAssignment(symbol) { - var _a; + var _a2; if (symbol.flags & 4194304 /* Prototype */) { return false; } @@ -50476,20 +50868,23 @@ function createTypeChecker(host) { serializeExportSpecifier(name, getInternalSymbolName(target, symbolName(target))); } else { const varName = getUnusedName(name, symbol); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(varName), - symbolToName( - target, - context, - 67108863 /* All */, - /*expectsIdentifier*/ - false - ) - ), 0 /* None */); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createIdentifier(varName), + symbolToName( + target, + context, + 67108863 /* All */, + /*expectsIdentifier*/ + false + ) + ), + 0 /* None */ + ); serializeExportSpecifier(name, varName); } } @@ -50499,8 +50894,9 @@ function createTypeChecker(host) { const varName = getUnusedName(name, symbol); const typeToSerialize = getWidenedType(getTypeOfSymbol(getMergedSymbol(symbol))); if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) { - serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 1 /* Export */); + serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 32 /* Export */); } else { + const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */; const statement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -50511,11 +50907,11 @@ function createTypeChecker(host) { void 0, serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled) ) - ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) + ], flags) ); addResult( statement, - target && target.flags & 4 /* Property */ && target.escapedName === "export=" /* ExportEquals */ ? 2 /* Ambient */ : name === varName ? 1 /* Export */ : 0 /* None */ + target && target.flags & 4 /* Property */ && target.escapedName === "export=" /* ExportEquals */ ? 128 /* Ambient */ : name === varName ? 32 /* Export */ : 0 /* None */ ); } if (isExportAssignmentCompatibleSymbolName) { @@ -50537,79 +50933,114 @@ function createTypeChecker(host) { const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration); return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK - !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => isIdentifierText(symbolName(p), languageVersion)); + !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => { + if (!isIdentifierText(symbolName(p), languageVersion)) { + return false; + } + if (!(p.flags & 98304 /* Accessor */)) { + return true; + } + return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p); + }); } function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) { return function serializePropertySymbol(p, isStatic2, baseType) { - var _a, _b, _c, _d, _e; + var _a2, _b, _c, _d, _e; const modifierFlags = getDeclarationModifierFlagsFromSymbol(p); - const isPrivate = !!(modifierFlags & 8 /* Private */); + const isPrivate = !!(modifierFlags & 2 /* Private */); if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) { return []; } if (p.flags & 4194304 /* Prototype */ || p.escapedName === "constructor" || baseType && getPropertyOfType(baseType, p.escapedName) && isReadonlySymbol(getPropertyOfType(baseType, p.escapedName)) === isReadonlySymbol(p) && (p.flags & 16777216 /* Optional */) === (getPropertyOfType(baseType, p.escapedName).flags & 16777216 /* Optional */) && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName))) { return []; } - const flag = modifierFlags & ~512 /* Async */ | (isStatic2 ? 32 /* Static */ : 0); + const flag = modifierFlags & ~1024 /* Async */ | (isStatic2 ? 256 /* Static */ : 0); const name = getPropertyNameNodeForSymbol(p, context); - const firstPropertyLikeDecl = (_a = p.declarations) == null ? void 0 : _a.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression)); + const firstPropertyLikeDecl = (_a2 = p.declarations) == null ? void 0 : _a2.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression)); if (p.flags & 98304 /* Accessor */ && useAccessors) { const result = []; if (p.flags & 65536 /* SetAccessor */) { - result.push(setTextRange(factory.createSetAccessorDeclaration( - factory.createModifiersFromModifierFlags(flag), - name, - [factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "arg", - /*questionToken*/ - void 0, - isPrivate ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled) - )], - /*body*/ - void 0 - ), ((_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor)) || firstPropertyLikeDecl)); + const setter = p.declarations && forEach(p.declarations, (d) => { + if (d.kind === 178 /* SetAccessor */) { + return d; + } + if (isCallExpression(d) && isBindableObjectDefinePropertyCall(d)) { + return forEach(d.arguments[2].properties, (propDecl) => { + const id = getNameOfDeclaration(propDecl); + if (!!id && isIdentifier(id) && idText(id) === "set") { + return propDecl; + } + }); + } + }); + Debug.assert(!!setter); + const paramSymbol = isFunctionLikeDeclaration(setter) ? getSignatureFromDeclaration(setter).parameters[0] : void 0; + result.push(setTextRange( + factory.createSetAccessorDeclaration( + factory.createModifiersFromModifierFlags(flag), + name, + [factory.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + paramSymbol ? parameterToParameterDeclarationName(paramSymbol, getEffectiveParameterDeclaration(paramSymbol), context) : "value", + /*questionToken*/ + void 0, + isPrivate ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled) + )], + /*body*/ + void 0 + ), + ((_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor)) || firstPropertyLikeDecl + )); } if (p.flags & 32768 /* GetAccessor */) { - const isPrivate2 = modifierFlags & 8 /* Private */; - result.push(setTextRange(factory.createGetAccessorDeclaration( - factory.createModifiersFromModifierFlags(flag), - name, - [], - isPrivate2 ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), - /*body*/ - void 0 - ), ((_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor)) || firstPropertyLikeDecl)); + const isPrivate2 = modifierFlags & 2 /* Private */; + result.push(setTextRange( + factory.createGetAccessorDeclaration( + factory.createModifiersFromModifierFlags(flag), + name, + [], + isPrivate2 ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), + /*body*/ + void 0 + ), + ((_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor)) || firstPropertyLikeDecl + )); } return result; } else if (p.flags & (4 /* Property */ | 3 /* Variable */ | 98304 /* Accessor */)) { - return setTextRange(createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), - name, - p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - isPrivate ? void 0 : serializeTypeForDeclaration(context, getWriteTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), - // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 - // interface members can't have initializers, however class members _can_ - /*initializer*/ - void 0 - ), ((_d = p.declarations) == null ? void 0 : _d.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl); - } - if (p.flags & (8192 /* Method */ | 16 /* Function */)) { - const type = getTypeOfSymbol(p); - const signatures = getSignaturesOfType(type, 0 /* Call */); - if (flag & 8 /* Private */) { - return setTextRange(createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), + return setTextRange( + createProperty2( + factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag), name, p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - /*type*/ - void 0, + isPrivate ? void 0 : serializeTypeForDeclaration(context, getWriteTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), + // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 + // interface members can't have initializers, however class members _can_ /*initializer*/ void 0 - ), ((_e = p.declarations) == null ? void 0 : _e.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0]); + ), + ((_d = p.declarations) == null ? void 0 : _d.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl + ); + } + if (p.flags & (8192 /* Method */ | 16 /* Function */)) { + const type = getTypeOfSymbol(p); + const signatures = getSignaturesOfType(type, 0 /* Call */); + if (flag & 2 /* Private */) { + return setTextRange( + createProperty2( + factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag), + name, + p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + ((_e = p.declarations) == null ? void 0 : _e.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0] + ); } const results2 = []; for (const sig of signatures) { @@ -50676,17 +51107,20 @@ function createTypeChecker(host) { let privateProtected = 0; for (const s of signatures) { if (s.declaration) { - privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 8 /* Private */ | 16 /* Protected */); + privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 2 /* Private */ | 4 /* Protected */); } } if (privateProtected) { - return [setTextRange(factory.createConstructorDeclaration( - factory.createModifiersFromModifierFlags(privateProtected), - /*parameters*/ - [], - /*body*/ - void 0 - ), signatures[0].declaration)]; + return [setTextRange( + factory.createConstructorDeclaration( + factory.createModifiersFromModifierFlags(privateProtected), + /*parameters*/ + [], + /*body*/ + void 0 + ), + signatures[0].declaration + )]; } } const results2 = []; @@ -50768,7 +51202,7 @@ function createTypeChecker(host) { } } function getUnusedName(input, symbol) { - var _a, _b; + var _a2, _b; const id = symbol ? getSymbolId(symbol) : void 0; if (id) { if (context.remappedSymbolNames.has(id)) { @@ -50780,7 +51214,7 @@ function createTypeChecker(host) { } let i = 0; const original = input; - while ((_a = context.usedSymbolNames) == null ? void 0 : _a.has(input)) { + while ((_a2 = context.usedSymbolNames) == null ? void 0 : _a2.has(input)) { i++; input = `${original}_${i}`; } @@ -50866,10 +51300,10 @@ function createTypeChecker(host) { return result || types; } function visibilityToString(flags) { - if (flags === 8 /* Private */) { + if (flags === 2 /* Private */) { return "private"; } - if (flags === 16 /* Protected */) { + if (flags === 4 /* Protected */) { return "protected"; } return "public"; @@ -50908,6 +51342,10 @@ function createTypeChecker(host) { } } function getNameOfSymbolAsWritten(symbol, context) { + var _a; + if ((_a = context == null ? void 0 : context.remappedSymbolReferences) == null ? void 0 : _a.has(getSymbolId(symbol))) { + symbol = context.remappedSymbolReferences.get(getSymbolId(symbol)); + } if (context && symbol.escapedName === "default" /* Default */ && !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */) && // If it's not the first part of an entity name, it must print as `default` (!(context.flags & 16777216 /* InInitialEntityName */) || // if the symbol is synthesized, it will only be referenced externally it must print as `default` !symbol.declarations || // if not in the same binding context (source file, module declaration), it must print as `default` @@ -50983,7 +51421,7 @@ function createTypeChecker(host) { return true; } const parent = getDeclarationContainer(node); - if (!(getCombinedModifierFlagsCached(node) & 1 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent.kind !== 312 /* SourceFile */ && parent.flags & 33554432 /* Ambient */)) { + if (!(getCombinedModifierFlagsCached(node) & 32 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent.kind !== 312 /* SourceFile */ && parent.flags & 33554432 /* Ambient */)) { return isGlobalSourceFile(parent); } return isDeclarationVisible(parent); @@ -50993,7 +51431,7 @@ function createTypeChecker(host) { case 178 /* SetAccessor */: case 174 /* MethodDeclaration */: case 173 /* MethodSignature */: - if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { + if (hasEffectiveModifier(node, 2 /* Private */ | 4 /* Protected */)) { return false; } case 176 /* Constructor */: @@ -51165,10 +51603,6 @@ function createTypeChecker(host) { const prop = getPropertyOfType(type, name); return prop ? getTypeOfSymbol(prop) : void 0; } - function getTypeOfPropertyOrIndexSignature(type, name) { - var _a; - return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType; - } function getTypeOfPropertyOrIndexSignatureOfType(type, name) { var _a; let propType; @@ -51216,7 +51650,7 @@ function createTypeChecker(host) { const unspreadableToRestKeys = []; for (const prop of getPropertiesOfType(source)) { const literalTypeFromProperty = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */); - if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) && isSpreadableProperty(prop)) { + if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) && isSpreadableProperty(prop)) { spreadableProperties.push(prop); } else { unspreadableToRestKeys.push(literalTypeFromProperty); @@ -51305,18 +51739,23 @@ function createTypeChecker(host) { return type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */) ? "" + type.value : void 0; } function getTypeForBindingElement(declaration) { - const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */; + const checkMode = declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */; const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode); - return parentType && getBindingElementTypeFromParentType(declaration, parentType); + return parentType && getBindingElementTypeFromParentType( + declaration, + parentType, + /*noTupleBoundsCheck*/ + false + ); } - function getBindingElementTypeFromParentType(declaration, parentType) { + function getBindingElementTypeFromParentType(declaration, parentType, noTupleBoundsCheck) { if (isTypeAny(parentType)) { return parentType; } const pattern = declaration.parent; if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) { parentType = getNonNullableType(parentType); - } else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) { + } else if (strictNullChecks && pattern.parent.initializer && !hasTypeFacts(getTypeOfInitializer(pattern.parent.initializer), 65536 /* EQUndefined */)) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; @@ -51348,7 +51787,7 @@ function createTypeChecker(host) { type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType); } else if (isArrayLikeType(parentType)) { const indexType = getNumberLiteralType(index); - const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0); + const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0); const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType; type = getFlowTypeOfDestructuring(declaration, declaredType); } else { @@ -51359,7 +51798,7 @@ function createTypeChecker(host) { return type; } if (getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration))) { - return strictNullChecks && !(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type; + return strictNullChecks && !hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type; } return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0 /* Normal */)], 2 /* Subtype */)); } @@ -51417,7 +51856,7 @@ function createTypeChecker(host) { if (declaredType) { return addOptionality(declaredType, isProperty, isOptional); } - if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 1 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { + if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 32 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined2(declaration.initializer))) { return autoType; } @@ -51465,7 +51904,7 @@ function createTypeChecker(host) { if (isPropertyDeclaration(declaration) && (noImplicitAny || isInJSFile(declaration))) { if (!hasStaticModifier(declaration)) { const constructor = findConstructorDeclaration(declaration.parent); - const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; + const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; return type && addOptionality( type, /*isProperty*/ @@ -51474,7 +51913,7 @@ function createTypeChecker(host) { ); } else { const staticBlocks = filter(declaration.parent.members, isClassStaticBlockDeclaration); - const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; + const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; return type && addOptionality( type, /*isProperty*/ @@ -51578,7 +52017,7 @@ function createTypeChecker(host) { return everyType(flowType, isNullableType) ? void 0 : convertAutoToAny(flowType); } function getFlowTypeOfProperty(reference, prop) { - const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 2 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType; + const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 128 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType; return getFlowTypeOfReference(reference, autoType, initialType); } function getWidenedTypeForAssignmentDeclaration(symbol, resolvedSymbol) { @@ -52202,6 +52641,9 @@ function createTypeChecker(host) { function getTypeOfAlias(symbol) { const links = getSymbolLinks(symbol); if (!links.type) { + if (!pushTypeResolution(symbol, 0 /* Type */)) { + return errorType; + } const targetSymbol = resolveAlias(symbol); const exportSymbol = symbol.declarations && getTargetOfAliasDeclaration( getDeclarationOfAliasSymbol(symbol), @@ -52210,6 +52652,10 @@ function createTypeChecker(host) { ); const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; + if (!popTypeResolution()) { + reportCircularityError(exportSymbol ?? symbol); + return links.type = errorType; + } } return links.type; } @@ -52223,20 +52669,19 @@ function createTypeChecker(host) { } function reportCircularityError(symbol) { const declaration = symbol.valueDeclaration; - if (getEffectiveTypeAnnotationNode(declaration)) { - error( - symbol.valueDeclaration, - Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, - symbolToString(symbol) - ); - return errorType; - } - if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { - error( - symbol.valueDeclaration, - Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, - symbolToString(symbol) - ); + if (declaration) { + if (getEffectiveTypeAnnotationNode(declaration)) { + error(symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + return errorType; + } + if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { + error(symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol)); + } + } else if (symbol.flags & 2097152 /* Alias */) { + const node = getDeclarationOfAliasSymbol(symbol); + if (node) { + error(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); + } } return anyType; } @@ -52264,7 +52709,7 @@ function createTypeChecker(host) { return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : ( // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty symbol.links.writeType || symbol.links.type - ) : getTypeOfSymbol(symbol); + ) : removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */)); } if (symbol.flags & 98304 /* Accessor */) { return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol); @@ -52447,10 +52892,7 @@ function createTypeChecker(host) { function getConstructorsForTypeArguments(type, typeArgumentNodes, location) { const typeArgCount = length(typeArgumentNodes); const isJavascript = isInJSFile(location); - return filter( - getSignaturesOfType(type, 1 /* Construct */), - (sig) => (isJavascript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= length(sig.typeParameters) - ); + return filter(getSignaturesOfType(type, 1 /* Construct */), (sig) => (isJavascript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= length(sig.typeParameters)); } function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) { const signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location); @@ -52597,16 +53039,12 @@ function createTypeChecker(host) { return type.resolvedBaseTypes = emptyArray; } if (type === reducedBaseType || hasBaseType(reducedBaseType, type)) { - error( - type.symbol.valueDeclaration, - Diagnostics.Type_0_recursively_references_itself_as_a_base_type, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 2 /* WriteArrayAsGenericType */ - ) - ); + error(type.symbol.valueDeclaration, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( + type, + /*enclosingDeclaration*/ + void 0, + 2 /* WriteArrayAsGenericType */ + )); return type.resolvedBaseTypes = emptyArray; } if (type.resolvedBaseTypes === resolvingEmptyArray) { @@ -52760,7 +53198,9 @@ function createTypeChecker(host) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); const value = getEnumMemberValue(member); - const memberType = getFreshTypeOfLiteralType(value !== void 0 ? getEnumLiteralType(value, getSymbolId(symbol), memberSymbol) : createComputedEnumType(memberSymbol)); + const memberType = getFreshTypeOfLiteralType( + value !== void 0 ? getEnumLiteralType(value, getSymbolId(symbol), memberSymbol) : createComputedEnumType(memberSymbol) + ); getSymbolLinks(memberSymbol).declaredType = memberType; memberTypeList.push(getRegularTypeOfLiteralType(memberType)); } @@ -52973,7 +53413,7 @@ function createTypeChecker(host) { if (!lateSymbol) lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */)); const earlySymbol = earlySymbols && earlySymbols.get(memberName); - if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) { + if (!(parent.flags & 32 /* Class */) && (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol)) { const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations; const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName); forEach(declarations, (declaration) => error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); @@ -53025,7 +53465,28 @@ function createTypeChecker(host) { } } } - links[resolutionKind] = combineSymbolTables(earlySymbols, lateSymbols) || emptySymbols; + let resolved = combineSymbolTables(earlySymbols, lateSymbols); + if (symbol.flags & 33554432 /* Transient */ && links.cjsExportMerged && symbol.declarations) { + for (const decl of symbol.declarations) { + const original = getSymbolLinks(decl.symbol)[resolutionKind]; + if (!resolved) { + resolved = original; + continue; + } + if (!original) + continue; + original.forEach((s, name) => { + const existing = resolved.get(name); + if (!existing) + resolved.set(name, s); + else if (existing === s) + return; + else + resolved.set(name, mergeSymbol(existing, s)); + }); + } + } + links[resolutionKind] = resolved || emptySymbols; } return links[resolutionKind]; } @@ -53084,7 +53545,13 @@ function createTypeChecker(host) { const baseTypes = getBaseTypes(source); if (baseTypes.length) { if (source.symbol && members === getMembersOfSymbol(source.symbol)) { - members = createSymbolTable(source.declaredProperties); + const symbolTable = createSymbolTable(); + for (const symbol of members.values()) { + if (!(symbol.flags & 262144 /* TypeParameter */)) { + symbolTable.set(symbol.escapedName, symbol); + } + } + members = symbolTable; } setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos); const thisArgument = lastOrUndefined(typeArguments); @@ -53168,10 +53635,7 @@ function createTypeChecker(host) { return signature.optionalCallSignatureCache[key] || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); } function createOptionalCallSignature(signature, callChainFlags) { - Debug.assert( - callChainFlags === 8 /* IsInnerCallChain */ || callChainFlags === 16 /* IsOuterCallChain */, - "An optional call signature can either be for an inner call chain or an outer call chain, but not both." - ); + Debug.assert(callChainFlags === 8 /* IsInnerCallChain */ || callChainFlags === 16 /* IsOuterCallChain */, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); const result = cloneSignature(signature); result.flags |= callChainFlags; return result; @@ -53220,7 +53684,7 @@ function createTypeChecker(host) { const baseConstructorType = getBaseConstructorTypeOfClass(classType); const baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); const declaration = getClassLikeDeclarationOfSymbol(classType.symbol); - const isAbstract = !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */); + const isAbstract = !!declaration && hasSyntacticModifier(declaration, 64 /* Abstract */); if (baseSignatures.length === 0) { return [createSignature( /*declaration*/ @@ -53407,13 +53871,14 @@ function createTypeChecker(host) { const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0; const paramSymbol = createSymbol( 1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), - paramName || `arg${i}` + paramName || `arg${i}`, + isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0 ); paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType; params[i] = paramSymbol; } if (needsExtraRestElement) { - const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args"); + const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */); restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount)); if (shorter === right) { restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper); @@ -53458,11 +53923,7 @@ function createTypeChecker(host) { for (const info of sourceInfos) { const indexType = info.keyType; if (every(types, (t) => !!getIndexInfoOfType(t, indexType))) { - result.push(createIndexInfo( - indexType, - getUnionType(map(types, (t) => getIndexTypeOfType(t, indexType))), - some(types, (t) => getIndexInfoOfType(t, indexType).isReadonly) - )); + result.push(createIndexInfo(indexType, getUnionType(map(types, (t) => getIndexTypeOfType(t, indexType))), some(types, (t) => getIndexInfoOfType(t, indexType).isReadonly))); } } return result; @@ -53554,11 +54015,7 @@ function createTypeChecker(host) { for (let i = 0; i < indexInfos.length; i++) { const info = indexInfos[i]; if (info.keyType === newInfo.keyType) { - indexInfos[i] = createIndexInfo( - info.keyType, - union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), - union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly - ); + indexInfos[i] = createIndexInfo(info.keyType, union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly); return indexInfos; } } @@ -53638,20 +54095,23 @@ function createTypeChecker(host) { const classType = getDeclaredTypeOfClassOrInterface(symbol); let constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : emptyArray; if (symbol.flags & 16 /* Function */) { - constructSignatures = addRange(constructSignatures.slice(), mapDefined( - type.callSignatures, - (sig) => isJSConstructor(sig.declaration) ? createSignature( - sig.declaration, - sig.typeParameters, - sig.thisParameter, - sig.parameters, - classType, - /*resolvedTypePredicate*/ - void 0, - sig.minArgumentCount, - sig.flags & 167 /* PropagatingFlags */ - ) : void 0 - )); + constructSignatures = addRange( + constructSignatures.slice(), + mapDefined( + type.callSignatures, + (sig) => isJSConstructor(sig.declaration) ? createSignature( + sig.declaration, + sig.typeParameters, + sig.thisParameter, + sig.parameters, + classType, + /*resolvedTypePredicate*/ + void 0, + sig.minArgumentCount, + sig.flags & 167 /* PropagatingFlags */ + ) : void 0 + ) + ); } if (!constructSignatures.length) { constructSignatures = getDefaultConstructSignatures(classType); @@ -53773,11 +54233,7 @@ function createTypeChecker(host) { const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && modifiersProp && isReadonlySymbol(modifiersProp)); const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */; const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0; - const prop = createSymbol( - 4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), - propName, - lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0) - ); + const prop = createSymbol(4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), propName, lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0)); prop.links.mappedType = type; prop.links.nameType = propNameType; prop.links.keyType = keyType; @@ -53790,7 +54246,9 @@ function createTypeChecker(host) { } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) { const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType; const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType)); - const indexInfo = createIndexInfo(indexKeyType, propType, !!(templateModifiers & 1 /* IncludeReadonly */)); + const modifiersIndexInfo = getApplicableIndexInfo(modifiersType, propNameType); + const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && (modifiersIndexInfo == null ? void 0 : modifiersIndexInfo.isReadonly)); + const indexInfo = createIndexInfo(indexKeyType, propType, isReadonly); indexInfos = appendIndexInfo( indexInfos, indexInfo, @@ -54002,7 +54460,7 @@ function createTypeChecker(host) { } function isConstTypeVariable(type, depth = 0) { var _a; - return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); + return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 4096 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); } function getConstraintOfIndexedAccess(type) { return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0; @@ -54328,7 +54786,7 @@ function createTypeChecker(host) { } else if (!isUnion && !isReadonlySymbol(prop)) { checkFlags &= ~8 /* Readonly */; } - checkFlags |= (!(modifiers & 24 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 16 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 8 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 32 /* Static */ ? 2048 /* ContainsStatic */ : 0); + checkFlags |= (!(modifiers & 6 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 4 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 2 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 256 /* Static */ ? 2048 /* ContainsStatic */ : 0); if (!isPrototypeProperty(prop)) { syntheticFlag = 2 /* SyntheticProperty */; } @@ -54384,7 +54842,8 @@ function createTypeChecker(host) { const writeType = getWriteTypeOfSymbol(prop); if (writeTypes || writeType !== type) { writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType); - } else if (type !== firstType) { + } + if (type !== firstType) { checkFlags |= 64 /* HasNonUniformType */; } if (isLiteralType(type) || isPatternLiteralType(type)) { @@ -54498,31 +54957,21 @@ function createTypeChecker(host) { if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 33554432 /* IsNeverIntersection */) { const neverProp = find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType); if (neverProp) { - return chainDiagnosticMessages( - errorInfo, - Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 536870912 /* NoTypeReduction */ - ), - symbolToString(neverProp) - ); + return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, typeToString( + type, + /*enclosingDeclaration*/ + void 0, + 536870912 /* NoTypeReduction */ + ), symbolToString(neverProp)); } const privateProp = find(getPropertiesOfUnionOrIntersectionType(type), isConflictingPrivateProperty); if (privateProp) { - return chainDiagnosticMessages( - errorInfo, - Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 536870912 /* NoTypeReduction */ - ), - symbolToString(privateProp) - ); + return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, typeToString( + type, + /*enclosingDeclaration*/ + void 0, + 536870912 /* NoTypeReduction */ + ), symbolToString(privateProp)); } } return errorInfo; @@ -54607,16 +55056,12 @@ function createTypeChecker(host) { } } } - return applicableInfos ? createIndexInfo( - unknownType, - getIntersectionType(map(applicableInfos, (info) => info.type)), - reduceLeft( - applicableInfos, - (isReadonly, info) => isReadonly && info.isReadonly, - /*initial*/ - true - ) - ) : applicableInfo ? applicableInfo : stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo : void 0; + return applicableInfos ? createIndexInfo(unknownType, getIntersectionType(map(applicableInfos, (info) => info.type)), reduceLeft( + applicableInfos, + (isReadonly, info) => isReadonly && info.isReadonly, + /*initial*/ + true + )) : applicableInfo ? applicableInfo : stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo : void 0; } function isApplicableIndexType(source, target) { return isTypeAssignableTo(source, target) || target === stringType && isTypeAssignableTo(source, numberType) || target === numberType && (source === numericStringType || !!(source.flags & 128 /* StringLiteral */) && isNumericLiteralName(source.value)); @@ -54683,7 +55128,7 @@ function createTypeChecker(host) { } const iife = getImmediatelyInvokedFunctionExpression(node.parent); if (iife) { - return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.arguments.length; + return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length; } return false; } @@ -54793,7 +55238,7 @@ function createTypeChecker(host) { if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { flags |= 1 /* HasRestParameter */; } - if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 256 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 256 /* Abstract */)) { + if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 64 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 64 /* Abstract */)) { flags |= 4 /* Abstract */; } links.resolvedSignature = createSignature( @@ -54968,12 +55413,7 @@ function createTypeChecker(host) { /*parameterIndex*/ void 0, type - ) : createTypePredicate( - node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, - parameterName.escapedText, - findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), - type - ); + ) : createTypePredicate(node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, parameterName.escapedText, findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), type); } function getUnionOrIntersectionType(types, kind, unionReduction) { return kind !== 2097152 /* Intersection */ ? getUnionType(types, unionReduction) : getIntersectionType(types); @@ -55168,12 +55608,7 @@ function createTypeChecker(host) { if (parameter.type) { forEachType(getTypeFromTypeNode(parameter.type), (keyType) => { if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos, keyType)) { - indexInfos.push(createIndexInfo( - keyType, - declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, - hasEffectiveModifier(declaration, 64 /* Readonly */), - declaration - )); + indexInfos.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, hasEffectiveModifier(declaration, 8 /* Readonly */), declaration)); } }); } @@ -55204,9 +55639,12 @@ function createTypeChecker(host) { if (index < typeParameters.length) { const declaredConstraint = getConstraintOfTypeParameter(typeParameters[index]); if (declaredConstraint) { - const mapper = makeDeferredTypeMapper(typeParameters, typeParameters.map((_, index2) => () => { - return getEffectiveTypeArgumentAtIndex(typeReference, typeParameters, index2); - })); + const mapper = makeDeferredTypeMapper( + typeParameters, + typeParameters.map((_, index2) => () => { + return getEffectiveTypeArgumentAtIndex(typeReference, typeParameters, index2); + }) + ); const constraint = instantiateType(declaredConstraint, mapper); if (constraint !== typeParameter) { inferences = append(inferences, constraint); @@ -55223,10 +55661,7 @@ function createTypeChecker(host) { } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); - inferences = append(inferences, instantiateType( - nodeType, - makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(checkMappedType2.typeParameter)), checkMappedType2.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType2.typeParameter.constraint) : keyofConstraintType) - )); + inferences = append(inferences, instantiateType(nodeType, makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(checkMappedType2.typeParameter)), checkMappedType2.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType2.typeParameter.constraint) : keyofConstraintType))); } } } @@ -55401,12 +55836,7 @@ function createTypeChecker(host) { const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments); let instantiation = links.instantiations.get(id); if (!instantiation) { - links.instantiations.set(id, instantiation = instantiateTypeWithAlias( - type, - createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), - aliasSymbol, - aliasTypeArguments - )); + links.instantiations.set(id, instantiation = instantiateTypeWithAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), aliasSymbol, aliasTypeArguments)); } return instantiation; } @@ -55416,7 +55846,13 @@ function createTypeChecker(host) { const id = getAliasId(symbol, typeArguments); let errorType2 = errorTypes.get(id); if (!errorType2) { - errorType2 = createIntrinsicType(1 /* Any */, "error"); + errorType2 = createIntrinsicType( + 1 /* Any */, + "error", + /*objectFlags*/ + void 0, + `alias ${id}` + ); errorType2.aliasSymbol = symbol; errorType2.aliasTypeArguments = typeArguments; errorTypes.set(id, errorType2); @@ -56221,8 +56657,7 @@ function createTypeChecker(host) { if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) { return readonly ? globalReadonlyArrayType : globalArrayType; } - const memberIds = mapDefined(namedMemberDeclarations, (node) => node ? getNodeId(node) : void 0); - const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : ""); + const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : ""); let type = tupleTypes.get(key); if (!type) { tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations)); @@ -56242,11 +56677,7 @@ function createTypeChecker(host) { const flags = elementFlags[i]; combinedFlags |= flags; if (!(combinedFlags & 12 /* Variable */)) { - const property = createSymbol( - 4 /* Property */ | (flags & 2 /* Optional */ ? 16777216 /* Optional */ : 0), - "" + i, - readonly ? 8 /* Readonly */ : 0 - ); + const property = createSymbol(4 /* Property */ | (flags & 2 /* Optional */ ? 16777216 /* Optional */ : 0), "" + i, readonly ? 8 /* Readonly */ : 0); property.links.tupleLabelDeclaration = namedMemberDeclarations == null ? void 0 : namedMemberDeclarations[i]; property.links.type = typeParameter; properties.push(property); @@ -56317,7 +56748,10 @@ function createTypeChecker(host) { } else if (isTupleType(type)) { const elements = getElementTypes(type); if (elements.length + expandedTypes.length >= 1e4) { - error(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); + error( + currentNode, + isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent + ); return errorType; } forEach(elements, (t, n) => { @@ -56336,10 +56770,7 @@ function createTypeChecker(host) { expandedFlags[i] = 1 /* Required */; } if (firstRestIndex >= 0 && firstRestIndex < lastOptionalOrRestIndex) { - expandedTypes[firstRestIndex] = getUnionType(sameMap( - expandedTypes.slice(firstRestIndex, lastOptionalOrRestIndex + 1), - (t, i) => expandedFlags[firstRestIndex + i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t - )); + expandedTypes[firstRestIndex] = getUnionType(sameMap(expandedTypes.slice(firstRestIndex, lastOptionalOrRestIndex + 1), (t, i) => expandedFlags[firstRestIndex + i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t)); expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); @@ -56377,10 +56808,7 @@ function createTypeChecker(host) { ); } function getKnownKeysOfTupleType(type) { - return getUnionType(append( - arrayOf(type.target.fixedLength, (i) => getStringLiteralType("" + i)), - getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType) - )); + return getUnionType(append(arrayOf(type.target.fixedLength, (i) => getStringLiteralType("" + i)), getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType))); } function getStartElementCount(type, flags) { const index = findIndex(type.elementFlags, (f) => !(f & flags)); @@ -56686,12 +57114,7 @@ function createTypeChecker(host) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); - links.resolvedType = getUnionType( - map(node.types, getTypeFromTypeNode), - 1 /* Literal */, - aliasSymbol, - getTypeArgumentsForAliasSymbol(aliasSymbol) - ); + links.resolvedType = getUnionType(map(node.types, getTypeFromTypeNode), 1 /* Literal */, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol)); } return links.resolvedType; } @@ -56921,15 +57344,14 @@ function createTypeChecker(host) { function getConstituentCountOfTypes(types) { return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0); } - function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) { - return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType; - } function getTypeFromIntersectionTypeNode(node) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); const types = map(node.types, getTypeFromTypeNode); - const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0])); + const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1; + const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType; + const noSupertypeReduction = !!(t.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || t.flags & 134217728 /* TemplateLiteral */ && isPatternLiteralType(t)); links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction); } return links.resolvedType; @@ -57006,7 +57428,7 @@ function createTypeChecker(host) { return neverType; } function getLiteralTypeFromProperty(prop, include, includeNonPublic) { - if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) { + if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 6 /* NonPublicAccessibilityModifier */)) { let type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type) { const name = getNameOfDeclaration(prop.valueDeclaration); @@ -57040,11 +57462,7 @@ function createTypeChecker(host) { } function getIndexType(type, indexFlags = defaultIndexFlags) { type = getReducedType(type); - return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties( - type, - (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), - indexFlags === defaultIndexFlags - ); + return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags); } function getExtractStringType(type) { if (keyofStringsOnly) { @@ -57145,11 +57563,6 @@ function createTypeChecker(host) { } function createTemplateLiteralType(texts, types) { const type = createType(134217728 /* TemplateLiteral */); - type.objectFlags = getPropagatingFlagsOfTypes( - types, - /*excludeKinds*/ - 98304 /* Nullable */ - ); type.texts = texts; type.types = types; return type; @@ -57272,7 +57685,7 @@ function createTypeChecker(host) { return autoType; } } - const propType = getTypeOfSymbol(prop); + const propType = accessFlags & 4 /* Writing */ ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 /* Definite */ ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType; } if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) { @@ -57284,13 +57697,7 @@ function createTypeChecker(host) { error(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); return undefinedType; } - error( - indexNode, - Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, - typeToString(objectType), - getTypeReferenceArity(objectType), - unescapeLeadingUnderscores(propName) - ); + error(indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), getTypeReferenceArity(objectType), unescapeLeadingUnderscores(propName)); } else { error(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } @@ -57309,7 +57716,11 @@ function createTypeChecker(host) { if (indexInfo) { if (accessFlags & 2 /* NoIndexSignatures */ && indexInfo.keyType !== numberType) { if (accessExpression) { - error(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); + if (accessFlags & 4 /* Writing */) { + error(accessExpression, Diagnostics.Type_0_is_generic_and_can_only_be_indexed_for_reading, typeToString(originalObjectType)); + } else { + error(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); + } } return void 0; } @@ -57446,7 +57857,15 @@ function createTypeChecker(host) { } function isPatternLiteralPlaceholderType(type) { if (type.flags & 2097152 /* Intersection */) { - return some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) || isPatternLiteralPlaceholderType(t)); + let seenPlaceholder = false; + for (const t of type.types) { + if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) { + seenPlaceholder = true; + } else if (!(t.flags & 524288 /* Object */)) { + return false; + } + } + return seenPlaceholder; } return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); } @@ -57463,7 +57882,7 @@ function createTypeChecker(host) { return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericIndexType */); } function getGenericObjectFlags(type) { - if (type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */)) { + if (type.flags & 3145728 /* UnionOrIntersection */) { if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) { type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0); } @@ -57475,7 +57894,7 @@ function createTypeChecker(host) { } return type.objectFlags & 12582912 /* IsGenericType */; } - return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0); + return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0); } function getSimplifiedType(type, writing) { return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type; @@ -57957,7 +58376,7 @@ function createTypeChecker(host) { function getAnonymousPartialType(type2) { const members = createSymbolTable(); for (const prop of getPropertiesOfType(type2)) { - if (getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) { + if (getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) { } else if (isSpreadableProperty(prop)) { const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); const flags = 4 /* Property */ | 16777216 /* Optional */; @@ -58019,7 +58438,7 @@ function createTypeChecker(host) { const skippedPrivateMembers = /* @__PURE__ */ new Set(); const indexInfos = left === emptyObjectType ? getIndexInfosOfType(right) : getUnionIndexInfos([left, right]); for (const rightProp of getPropertiesOfType(right)) { - if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) { + if (getDeclarationModifierFlagsFromSymbol(rightProp) & (2 /* Private */ | 4 /* Protected */)) { skippedPrivateMembers.add(rightProp.escapedName); } else if (isSpreadableProperty(rightProp)) { members.set(rightProp.escapedName, getSpreadSymbol(rightProp, readonly)); @@ -58441,7 +58860,12 @@ function createTypeChecker(host) { function instantiateSymbol(symbol, mapper) { const links = getSymbolLinks(symbol); if (links.type && !couldContainTypeVariables(links.type)) { - return symbol; + if (!(symbol.flags & 65536 /* SetAccessor */)) { + return symbol; + } + if (links.writeType && !couldContainTypeVariables(links.writeType)) { + return symbol; + } } if (getCheckFlags(symbol) & 1 /* Instantiated */) { symbol = links.target; @@ -58496,7 +58920,7 @@ function createTypeChecker(host) { result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); target.instantiations.set(id, result); const resultObjectFlags = getObjectFlags(result); - if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { + if (result.flags & 3899393 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables); if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) { if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) { @@ -58571,24 +58995,29 @@ function createTypeChecker(host) { if (typeVariable) { const mappedTypeVariable = instantiateType(typeVariable, mapper); if (typeVariable !== mappedTypeVariable) { - return mapTypeWithAlias(getReducedType(mappedTypeVariable), (t) => { - if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) { - if (!type.declaration.nameType) { - let constraint; - if (isArrayType(t) || t.flags & 1 /* Any */ && findResolutionCycleStartIndex(typeVariable, 4 /* ImmediateBaseConstraint */) < 0 && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) { - return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper)); - } - if (isGenericTupleType(t)) { - return instantiateMappedGenericTupleType(t, type, typeVariable, mapper); - } - if (isTupleType(t)) { - return instantiateMappedTupleType(t, type, prependTypeMapping(typeVariable, t, mapper)); + return mapTypeWithAlias( + getReducedType(mappedTypeVariable), + (t) => { + if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) { + if (!type.declaration.nameType) { + let constraint; + if (isArrayType(t) || t.flags & 1 /* Any */ && findResolutionCycleStartIndex(typeVariable, 4 /* ImmediateBaseConstraint */) < 0 && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) { + return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper)); + } + if (isGenericTupleType(t)) { + return instantiateMappedGenericTupleType(t, type, typeVariable, mapper); + } + if (isTupleType(t)) { + return instantiateMappedTupleType(t, type, prependTypeMapping(typeVariable, t, mapper)); + } } + return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t, mapper)); } - return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t, mapper)); - } - return t; - }, aliasSymbol, aliasTypeArguments); + return t; + }, + aliasSymbol, + aliasTypeArguments + ); } } return instantiateType(getConstraintTypeFromMappedType(type), mapper) === wildcardType ? wildcardType : instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments); @@ -58982,10 +59411,13 @@ function createTypeChecker(host) { const resultObj = errorOutputContainer || {}; checkTypeAssignableTo(source, target, node, headMessage, containingMessageChain, resultObj); const diagnostic = resultObj.errors[resultObj.errors.length - 1]; - addRelatedInfo(diagnostic, createDiagnosticForNode( - node, - signatures === constructSignatures ? Diagnostics.Did_you_mean_to_use_new_with_this_expression : Diagnostics.Did_you_mean_to_call_this_expression - )); + addRelatedInfo( + diagnostic, + createDiagnosticForNode( + node, + signatures === constructSignatures ? Diagnostics.Did_you_mean_to_use_new_with_this_expression : Diagnostics.Did_you_mean_to_call_this_expression + ) + ); return true; } } @@ -59042,10 +59474,13 @@ function createTypeChecker(host) { ); if (resultObj.errors) { if (target.symbol && length(target.symbol.declarations)) { - addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], createDiagnosticForNode( - target.symbol.declarations[0], - Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature - )); + addRelatedInfo( + resultObj.errors[resultObj.errors.length - 1], + createDiagnosticForNode( + target.symbol.declarations[0], + Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature + ) + ); } if ((getFunctionFlags(node) & 2 /* Async */) === 0 && !getTypeOfPropertyOfType(sourceReturn, "then") && checkTypeRelatedTo( createPromiseType(sourceReturn), @@ -59054,10 +59489,13 @@ function createTypeChecker(host) { /*errorNode*/ void 0 )) { - addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], createDiagnosticForNode( - node, - Diagnostics.Did_you_mean_to_mark_this_function_as_async - )); + addRelatedInfo( + resultObj.errors[resultObj.errors.length - 1], + createDiagnosticForNode( + node, + Diagnostics.Did_you_mean_to_mark_this_function_as_async + ) + ); } return true; } @@ -59152,12 +59590,15 @@ function createTypeChecker(host) { if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) { const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0]; if (!getSourceFileOfNode(targetNode).hasNoDefaultLib) { - addRelatedInfo(reportedDiag, createDiagnosticForNode( - targetNode, - Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1, - propertyName && !(nameType.flags & 8192 /* UniqueESSymbol */) ? unescapeLeadingUnderscores(propertyName) : typeToString(nameType), - typeToString(target) - )); + addRelatedInfo( + reportedDiag, + createDiagnosticForNode( + targetNode, + Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1, + propertyName && !(nameType.flags & 8192 /* UniqueESSymbol */) ? unescapeLeadingUnderscores(propertyName) : typeToString(nameType), + typeToString(target) + ) + ); } } } @@ -59358,14 +59799,7 @@ function createTypeChecker(host) { const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName); const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName)); const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2; - invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage( - /*dummy*/ - void 0, - diagnostic, - tagNameText, - childrenPropName, - typeToString(childrenTargetType) - ) }; + invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) }; } return invalidTextDiagnostic; } @@ -59529,7 +59963,7 @@ function createTypeChecker(host) { if (sourceType && targetType) { const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType)); const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType)); - const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && (getTypeFacts(sourceType) & 50331648 /* IsUndefinedOrNull */) === (getTypeFacts(targetType) & 50331648 /* IsUndefinedOrNull */); + const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && getTypeFacts(sourceType, 50331648 /* IsUndefinedOrNull */) === getTypeFacts(targetType, 50331648 /* IsUndefinedOrNull */); let related = callbacks ? compareSignaturesRelated(targetSig, sourceSig, checkMode & 8 /* StrictArity */ | (strictVariance ? 2 /* StrictCallback */ : 1 /* BivariantCallback */), reportErrors2, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !(checkMode & 3 /* Callback */) && !strictVariance && compareTypes( sourceType, targetType, @@ -59546,11 +59980,7 @@ function createTypeChecker(host) { } if (!related) { if (reportErrors2) { - errorReporter( - Diagnostics.Types_of_parameters_0_and_1_are_incompatible, - unescapeLeadingUnderscores(getParameterNameAtPosition(source, i)), - unescapeLeadingUnderscores(getParameterNameAtPosition(target, i)) - ); + errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, unescapeLeadingUnderscores(getParameterNameAtPosition(source, i)), unescapeLeadingUnderscores(getParameterNameAtPosition(target, i))); } return 0 /* False */; } @@ -59671,16 +60101,12 @@ function createTypeChecker(host) { const targetProperty = getPropertyOfType(targetEnumType, property.escapedName); if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) { if (errorReporter) { - errorReporter( - Diagnostics.Property_0_is_missing_in_type_1, - symbolName(property), - typeToString( - getDeclaredTypeOfSymbol(targetSymbol), - /*enclosingDeclaration*/ - void 0, - 64 /* UseFullyQualifiedType */ - ) - ); + errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property), typeToString( + getDeclaredTypeOfSymbol(targetSymbol), + /*enclosingDeclaration*/ + void 0, + 64 /* UseFullyQualifiedType */ + )); enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */); } else { enumRelation.set(id, 2 /* Failed */); @@ -59828,8 +60254,10 @@ function createTypeChecker(host) { let expandingFlags = 0 /* None */; let overflow = false; let overrideNextErrorInfo = 0; + let skipParentCounter = 0; let lastSkippedInfo; let incompatibleStack; + let relationCount = 16e6 - relation.size >> 3; Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); const result = isRelatedTo( source, @@ -59843,8 +60271,19 @@ function createTypeChecker(host) { reportIncompatibleStack(); } if (overflow) { + const id = getRelationKey( + source, + target, + /*intersectionState*/ + 0 /* None */, + relation, + /*ignoreConstraints*/ + false + ); + relation.set(id, 4 /* Reported */ | 2 /* Failed */); (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth }); - const diag2 = error(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); + const message = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1; + const diag2 = error(errorNode || currentNode, message, typeToString(source), typeToString(target)); if (errorOutputContainer) { (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); } @@ -59893,6 +60332,7 @@ function createTypeChecker(host) { lastSkippedInfo = saved.lastSkippedInfo; incompatibleStack = saved.incompatibleStack; overrideNextErrorInfo = saved.overrideNextErrorInfo; + skipParentCounter = saved.skipParentCounter; relatedInfo = saved.relatedInfo; } function captureErrorCalculationState() { @@ -59901,6 +60341,7 @@ function createTypeChecker(host) { lastSkippedInfo, incompatibleStack: incompatibleStack == null ? void 0 : incompatibleStack.slice(), overrideNextErrorInfo, + skipParentCounter, relatedInfo: relatedInfo == null ? void 0 : relatedInfo.slice() }; } @@ -60005,7 +60446,15 @@ function createTypeChecker(host) { reportIncompatibleStack(); if (message.elidedInCompatabilityPyramid) return; - errorInfo = chainDiagnosticMessages(errorInfo, message, ...args); + if (skipParentCounter === 0) { + errorInfo = chainDiagnosticMessages(errorInfo, message, ...args); + } else { + skipParentCounter--; + } + } + function reportParentSkippedError(message, ...args) { + reportError(message, ...args); + skipParentCounter++; } function associateRelatedInfo(info) { Debug.assert(!!errorInfo); @@ -60342,18 +60791,9 @@ function createTypeChecker(host) { } } if (suggestion !== void 0) { - reportError( - Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, - symbolToString(prop), - typeToString(errorTarget), - suggestion - ); + reportParentSkippedError(Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, symbolToString(prop), typeToString(errorTarget), suggestion); } else { - reportError( - Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, - symbolToString(prop), - typeToString(errorTarget) - ); + reportParentSkippedError(Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(errorTarget)); } } } @@ -60374,6 +60814,16 @@ function createTypeChecker(host) { } function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) { if (source2.flags & 1048576 /* Union */) { + if (target2.flags & 1048576 /* Union */) { + const sourceOrigin = source2.origin; + if (sourceOrigin && sourceOrigin.flags & 2097152 /* Intersection */ && target2.aliasSymbol && contains(sourceOrigin.types, target2)) { + return -1 /* True */; + } + const targetOrigin = target2.origin; + if (targetOrigin && targetOrigin.flags & 1048576 /* Union */ && source2.aliasSymbol && contains(targetOrigin.types, source2)) { + return -1 /* True */; + } + } return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState); } if (target2.flags & 1048576 /* Union */) { @@ -60687,6 +61137,10 @@ function createTypeChecker(host) { return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */; } } + if (relationCount <= 0) { + overflow = true; + return 0 /* False */; + } if (!maybeKeys) { maybeKeys = []; maybeKeysSet = /* @__PURE__ */ new Set(); @@ -60780,6 +61234,7 @@ function createTypeChecker(host) { } } else { relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags); + relationCount--; resetMaybeStack( /*markAllAsSucceeded*/ false @@ -60791,6 +61246,7 @@ function createTypeChecker(host) { maybeKeysSet.delete(maybeKeys[i]); if (markAllAsSucceeded) { relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); + relationCount--; } } maybeCount = maybeStart; @@ -61549,42 +62005,27 @@ function createTypeChecker(host) { function propertyRelatedTo(source2, target2, sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState, skipOptional) { const sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp); const targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp); - if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) { + if (sourcePropFlags & 2 /* Private */ || targetPropFlags & 2 /* Private */) { if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { if (reportErrors2) { - if (sourcePropFlags & 8 /* Private */ && targetPropFlags & 8 /* Private */) { + if (sourcePropFlags & 2 /* Private */ && targetPropFlags & 2 /* Private */) { reportError(Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp)); } else { - reportError( - Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, - symbolToString(targetProp), - typeToString(sourcePropFlags & 8 /* Private */ ? source2 : target2), - typeToString(sourcePropFlags & 8 /* Private */ ? target2 : source2) - ); + reportError(Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourcePropFlags & 2 /* Private */ ? source2 : target2), typeToString(sourcePropFlags & 2 /* Private */ ? target2 : source2)); } } return 0 /* False */; } - } else if (targetPropFlags & 16 /* Protected */) { + } else if (targetPropFlags & 4 /* Protected */) { if (!isValidOverrideOf(sourceProp, targetProp)) { if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, - symbolToString(targetProp), - typeToString(getDeclaringClass(sourceProp) || source2), - typeToString(getDeclaringClass(targetProp) || target2) - ); + reportError(Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source2), typeToString(getDeclaringClass(targetProp) || target2)); } return 0 /* False */; } - } else if (sourcePropFlags & 16 /* Protected */) { + } else if (sourcePropFlags & 4 /* Protected */) { if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, - symbolToString(targetProp), - typeToString(source2), - typeToString(target2) - ); + reportError(Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, symbolToString(targetProp), typeToString(source2), typeToString(target2)); } return 0 /* False */; } @@ -61600,12 +62041,7 @@ function createTypeChecker(host) { } if (!skipOptional && sourceProp.flags & 16777216 /* Optional */ && targetProp.flags & 106500 /* ClassMember */ && !(targetProp.flags & 16777216 /* Optional */)) { if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, - symbolToString(targetProp), - typeToString(source2), - typeToString(target2) - ); + reportError(Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source2), typeToString(target2)); } return 0 /* False */; } @@ -61851,8 +62287,14 @@ function createTypeChecker(host) { } const sourceIsJSConstructor = source2.symbol && isJSConstructor(source2.symbol.valueDeclaration); const targetIsJSConstructor = target2.symbol && isJSConstructor(target2.symbol.valueDeclaration); - const sourceSignatures = getSignaturesOfType(source2, sourceIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind); - const targetSignatures = getSignaturesOfType(target2, targetIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind); + const sourceSignatures = getSignaturesOfType( + source2, + sourceIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind + ); + const targetSignatures = getSignaturesOfType( + target2, + targetIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind + ); if (kind === 1 /* Construct */ && sourceSignatures.length && targetSignatures.length) { const sourceIsAbstract = !!(sourceSignatures[0].flags & 4 /* Abstract */); const targetIsAbstract = !!(targetSignatures[0].flags & 4 /* Abstract */); @@ -61926,18 +62368,14 @@ function createTypeChecker(host) { shouldElaborateErrors = false; } if (shouldElaborateErrors) { - reportError( - Diagnostics.Type_0_provides_no_match_for_the_signature_1, - typeToString(source2), - signatureToString( - t, - /*enclosingDeclaration*/ - void 0, - /*flags*/ - void 0, - kind - ) - ); + reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source2), signatureToString( + t, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + void 0, + kind + )); } return 0 /* False */; } @@ -61970,16 +62408,7 @@ function createTypeChecker(host) { } function signatureRelatedTo(source2, target2, erase, reportErrors2, intersectionState, incompatibleReporter) { const checkMode = relation === subtypeRelation ? 16 /* StrictTopSignature */ : relation === strictSubtypeRelation ? 16 /* StrictTopSignature */ | 8 /* StrictArity */ : 0 /* None */; - return compareSignaturesRelated( - erase ? getErasedSignature(source2) : source2, - erase ? getErasedSignature(target2) : target2, - checkMode, - reportErrors2, - reportError, - incompatibleReporter, - isRelatedToWorker2, - reportUnreliableMapper - ); + return compareSignaturesRelated(erase ? getErasedSignature(source2) : source2, erase ? getErasedSignature(target2) : target2, checkMode, reportErrors2, reportError, incompatibleReporter, isRelatedToWorker2, reportUnreliableMapper); function isRelatedToWorker2(source3, target3, reportErrors3) { return isRelatedTo( source3, @@ -62124,15 +62553,15 @@ function createTypeChecker(host) { if (!sourceSignature.declaration || !targetSignature.declaration) { return true; } - const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 24 /* NonPublicAccessibilityModifier */); - const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 24 /* NonPublicAccessibilityModifier */); - if (targetAccessibility === 8 /* Private */) { + const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 6 /* NonPublicAccessibilityModifier */); + const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 6 /* NonPublicAccessibilityModifier */); + if (targetAccessibility === 2 /* Private */) { return true; } - if (targetAccessibility === 16 /* Protected */ && sourceAccessibility !== 8 /* Private */) { + if (targetAccessibility === 4 /* Protected */ && sourceAccessibility !== 2 /* Private */) { return true; } - if (targetAccessibility !== 16 /* Protected */ && !sourceAccessibility) { + if (targetAccessibility !== 4 /* Protected */ && !sourceAccessibility) { return true; } if (reportErrors2) { @@ -62232,7 +62661,7 @@ function createTypeChecker(host) { const variances = []; for (const tp of typeParameters) { const modifiers = getTypeParameterModifiers(tp); - let variance = modifiers & 65536 /* Out */ ? modifiers & 32768 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 32768 /* In */ ? 2 /* Contravariant */ : void 0; + let variance = modifiers & 16384 /* Out */ ? modifiers & 8192 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 8192 /* In */ ? 2 /* Contravariant */ : void 0; if (variance === void 0) { let unmeasurable = false; let unreliable = false; @@ -62280,7 +62709,7 @@ function createTypeChecker(host) { } function getTypeParameterModifiers(tp) { var _a; - return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (32768 /* In */ | 65536 /* Out */ | 2048 /* Const */); + return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (8192 /* In */ | 16384 /* Out */ | 4096 /* Const */); } function hasCovariantVoidArgument(typeArguments, variances) { for (let i = 0; i < variances.length; i++) { @@ -62365,13 +62794,16 @@ function createTypeChecker(host) { }); } function isValidOverrideOf(sourceProp, targetProp) { - return !forEachProperty(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 16 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false); + return !forEachProperty(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 4 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false); } function isClassDerivedFromDeclaringClasses(checkClass, prop, writing) { - return forEachProperty(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 16 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass; + return forEachProperty(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 4 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass; } function isDeeplyNestedType(type, stack, depth, maxDepth = 3) { if (depth >= maxDepth) { + if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) { + type = getMappedTargetWithSymbol(type); + } if (type.flags & 2097152 /* Intersection */) { return some(type.types, (t) => isDeeplyNestedType(t, stack, depth, maxDepth)); } @@ -62380,7 +62812,7 @@ function createTypeChecker(host) { let lastTypeId = 0; for (let i = 0; i < depth; i++) { const t = stack[i]; - if (t.flags & 2097152 /* Intersection */ ? some(t.types, (u) => getRecursionIdentity(u) === identity2) : getRecursionIdentity(t) === identity2) { + if (hasMatchingRecursionIdentity(t, identity2)) { if (t.id >= lastTypeId) { count++; if (count >= maxDepth) { @@ -62393,6 +62825,22 @@ function createTypeChecker(host) { } return false; } + function getMappedTargetWithSymbol(type) { + let target; + while ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && (target = getModifiersTypeFromMappedType(type)) && (target.symbol || target.flags & 2097152 /* Intersection */ && some(target.types, (t) => !!t.symbol))) { + type = target; + } + return type; + } + function hasMatchingRecursionIdentity(type, identity2) { + if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) { + type = getMappedTargetWithSymbol(type); + } + if (type.flags & 2097152 /* Intersection */) { + return some(type.types, (t) => hasMatchingRecursionIdentity(t, identity2)); + } + return getRecursionIdentity(type) === identity2; + } function getRecursionIdentity(type) { if (type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { if (getObjectFlags(type) & 4 /* Reference */ && type.node) { @@ -62426,8 +62874,8 @@ function createTypeChecker(host) { if (sourceProp === targetProp) { return -1 /* True */; } - const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24 /* NonPublicAccessibilityModifier */; - const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24 /* NonPublicAccessibilityModifier */; + const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 6 /* NonPublicAccessibilityModifier */; + const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 6 /* NonPublicAccessibilityModifier */; if (sourcePropAccessibility !== targetPropAccessibility) { return 0 /* False */; } @@ -62565,6 +63013,9 @@ function createTypeChecker(host) { function isArrayLikeType(type) { return isArrayType(type) || !(type.flags & 98304 /* Nullable */) && isTypeAssignableTo(type, anyReadonlyArrayType); } + function isMutableArrayLikeType(type) { + return isMutableArrayOrTuple(type) || !(type.flags & (1 /* Any */ | 98304 /* Nullable */)) && isTypeAssignableTo(type, anyArrayType); + } function getSingleBaseForNonAugmentingSubtype(type) { if (!(getObjectFlags(type) & 4 /* Reference */) || !(getObjectFlags(type.target) & 3 /* ClassOrInterface */)) { return void 0; @@ -62719,7 +63170,7 @@ function createTypeChecker(host) { return value.base10Value === "0"; } function removeDefinitelyFalsyTypes(type) { - return filterType(type, (t) => !!(getTypeFacts(t) & 4194304 /* Truthy */)); + return filterType(type, (t) => hasTypeFacts(t, 4194304 /* Truthy */)); } function extractDefinitelyFalsyTypes(type) { return mapType(type, getDefinitelyFalsyPartOfType); @@ -62888,13 +63339,7 @@ function createTypeChecker(host) { } } } - const result = createAnonymousType( - type.symbol, - members, - emptyArray, - emptyArray, - sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly)) - ); + const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly))); result.objectFlags |= getObjectFlags(type) & (4096 /* JSLiteral */ | 262144 /* NonInferrableType */); return result; } @@ -62988,7 +63433,7 @@ function createTypeChecker(host) { const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); - if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName( + if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.includes(param) && (resolveName( param, param.name.escapedText, 788968 /* Type */, @@ -63074,7 +63519,12 @@ function createTypeChecker(host) { callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i)); } if (targetRestType) { - callback(getRestTypeAtPosition(source, paramCount), targetRestType); + callback(getRestTypeAtPosition( + source, + paramCount, + /*readonly*/ + isConstTypeVariable(targetRestType) && !someType(targetRestType, isMutableArrayLikeType) + ), targetRestType); } } function applyToReturnTypes(source, target, callback) { @@ -63107,19 +63557,25 @@ function createTypeChecker(host) { return context; } function makeFixingMapperForContext(context) { - return makeDeferredTypeMapper(map(context.inferences, (i) => i.typeParameter), map(context.inferences, (inference, i) => () => { - if (!inference.isFixed) { - inferFromIntraExpressionSites(context); - clearCachedInferences(context.inferences); - inference.isFixed = true; - } - return getInferredType(context, i); - })); + return makeDeferredTypeMapper( + map(context.inferences, (i) => i.typeParameter), + map(context.inferences, (inference, i) => () => { + if (!inference.isFixed) { + inferFromIntraExpressionSites(context); + clearCachedInferences(context.inferences); + inference.isFixed = true; + } + return getInferredType(context, i); + }) + ); } function makeNonFixingMapperForContext(context) { - return makeDeferredTypeMapper(map(context.inferences, (i) => i.typeParameter), map(context.inferences, (_, i) => () => { - return getInferredType(context, i); - })); + return makeDeferredTypeMapper( + map(context.inferences, (i) => i.typeParameter), + map(context.inferences, (_, i) => () => { + return getInferredType(context, i); + }) + ); } function clearCachedInferences(inferences) { for (const inference of inferences) { @@ -63178,8 +63634,8 @@ function createTypeChecker(host) { if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) { return !!(objectFlags & 1048576 /* CouldContainTypeVariables */); } - const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables)); - if (type.flags & 138117121 /* ObjectFlagsType */) { + const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables)); + if (type.flags & 3899393 /* ObjectFlagsType */) { type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0); } return result; @@ -63376,6 +63832,9 @@ function createTypeChecker(host) { if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) { return true; } + if (target.flags & 2097152 /* Intersection */) { + return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t)); + } if (source.flags & 128 /* StringLiteral */) { const value = source.value; return !!(target.flags & 8 /* Number */ && isValidNumberString( @@ -63386,7 +63845,7 @@ function createTypeChecker(host) { value, /*roundTripOnly*/ false - ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target)); + ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target)); } if (source.flags & 134217728 /* TemplateLiteral */) { const texts = source.texts; @@ -63461,7 +63920,6 @@ function createTypeChecker(host) { let bivariant = false; let propagationType; let inferencePriority = 2048 /* MaxValue */; - let allowComplexConstraintInference = true; let visited; let sourceStack; let targetStack; @@ -63471,7 +63929,7 @@ function createTypeChecker(host) { if (!couldContainTypeVariables(target)) { return; } - if (source === wildcardType) { + if (source === wildcardType || source === blockedStringType) { const savePropagationType = propagationType; propagationType = source; inferFromTypes(target, target); @@ -63528,6 +63986,10 @@ function createTypeChecker(host) { return; } if (!inference.isFixed) { + const candidate = propagationType || source; + if (candidate === blockedStringType) { + return; + } if (inference.priority === void 0 || priority < inference.priority) { inference.candidates = void 0; inference.contraCandidates = void 0; @@ -63535,7 +63997,6 @@ function createTypeChecker(host) { inference.priority = priority; } if (priority === inference.priority) { - const candidate = propagationType || source; if (contravariant && !bivariant) { if (!contains(inference.contraCandidates, candidate)) { inference.contraCandidates = append(inference.contraCandidates, candidate); @@ -63616,8 +64077,7 @@ function createTypeChecker(host) { source = getReducedType(source); if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) { const apparentSource = getApparentType(source); - if (apparentSource !== source && allowComplexConstraintInference && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) { - allowComplexConstraintInference = false; + if (apparentSource !== source && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) { return inferFromTypes(apparentSource, target); } source = apparentSource; @@ -63866,11 +64326,7 @@ function createTypeChecker(host) { )) { allTypeFlags &= ~2112 /* BigIntLike */; } - const matchingType = reduceLeft( - constraintTypes, - (left, right) => !(right.flags & allTypeFlags) ? left : left.flags & 4 /* String */ ? left : right.flags & 4 /* String */ ? source2 : left.flags & 134217728 /* TemplateLiteral */ ? left : right.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source2, right) ? source2 : left.flags & 268435456 /* StringMapping */ ? left : right.flags & 268435456 /* StringMapping */ && str === applyStringMapping(right.symbol, str) ? source2 : left.flags & 128 /* StringLiteral */ ? left : right.flags & 128 /* StringLiteral */ && right.value === str ? right : left.flags & 8 /* Number */ ? left : right.flags & 8 /* Number */ ? getNumberLiteralType(+str) : left.flags & 32 /* Enum */ ? left : right.flags & 32 /* Enum */ ? getNumberLiteralType(+str) : left.flags & 256 /* NumberLiteral */ ? left : right.flags & 256 /* NumberLiteral */ && right.value === +str ? right : left.flags & 64 /* BigInt */ ? left : right.flags & 64 /* BigInt */ ? parseBigIntLiteralType(str) : left.flags & 2048 /* BigIntLiteral */ ? left : right.flags & 2048 /* BigIntLiteral */ && pseudoBigIntToString(right.value) === str ? right : left.flags & 16 /* Boolean */ ? left : right.flags & 16 /* Boolean */ ? str === "true" ? trueType : str === "false" ? falseType : booleanType : left.flags & 512 /* BooleanLiteral */ ? left : right.flags & 512 /* BooleanLiteral */ && right.intrinsicName === str ? right : left.flags & 32768 /* Undefined */ ? left : right.flags & 32768 /* Undefined */ && right.intrinsicName === str ? right : left.flags & 65536 /* Null */ ? left : right.flags & 65536 /* Null */ && right.intrinsicName === str ? right : left, - neverType - ); + const matchingType = reduceLeft(constraintTypes, (left, right) => !(right.flags & allTypeFlags) ? left : left.flags & 4 /* String */ ? left : right.flags & 4 /* String */ ? source2 : left.flags & 134217728 /* TemplateLiteral */ ? left : right.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source2, right) ? source2 : left.flags & 268435456 /* StringMapping */ ? left : right.flags & 268435456 /* StringMapping */ && str === applyStringMapping(right.symbol, str) ? source2 : left.flags & 128 /* StringLiteral */ ? left : right.flags & 128 /* StringLiteral */ && right.value === str ? right : left.flags & 8 /* Number */ ? left : right.flags & 8 /* Number */ ? getNumberLiteralType(+str) : left.flags & 32 /* Enum */ ? left : right.flags & 32 /* Enum */ ? getNumberLiteralType(+str) : left.flags & 256 /* NumberLiteral */ ? left : right.flags & 256 /* NumberLiteral */ && right.value === +str ? right : left.flags & 64 /* BigInt */ ? left : right.flags & 64 /* BigInt */ ? parseBigIntLiteralType(str) : left.flags & 2048 /* BigIntLiteral */ ? left : right.flags & 2048 /* BigIntLiteral */ && pseudoBigIntToString(right.value) === str ? right : left.flags & 16 /* Boolean */ ? left : right.flags & 16 /* Boolean */ ? str === "true" ? trueType : str === "false" ? falseType : booleanType : left.flags & 512 /* BooleanLiteral */ ? left : right.flags & 512 /* BooleanLiteral */ && right.intrinsicName === str ? right : left.flags & 32768 /* Undefined */ ? left : right.flags & 32768 /* Undefined */ && right.intrinsicName === str ? right : left.flags & 65536 /* Null */ ? left : right.flags & 65536 /* Null */ && right.intrinsicName === str ? right : left, neverType); if (!(matchingType.flags & 131072 /* Never */)) { inferFromTypes(matchingType, target2); continue; @@ -63916,10 +64372,7 @@ function createTypeChecker(host) { return; } const startLength = isTupleType(source) ? Math.min(source.target.fixedLength, target.target.fixedLength) : 0; - const endLength = Math.min( - isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, - target.target.hasRestElement ? getEndElementCount(target.target, 3 /* Fixed */) : 0 - ); + const endLength = Math.min(isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, target.target.hasRestElement ? getEndElementCount(target.target, 3 /* Fixed */) : 0); for (let i = 0; i < startLength; i++) { inferFromTypes(getTypeArguments(source)[i], elementTypes[i]); } @@ -64001,12 +64454,14 @@ function createTypeChecker(host) { } function inferFromSignatures(source, target, kind) { const sourceSignatures = getSignaturesOfType(source, kind); - const targetSignatures = getSignaturesOfType(target, kind); const sourceLen = sourceSignatures.length; - const targetLen = targetSignatures.length; - const len = sourceLen < targetLen ? sourceLen : targetLen; - for (let i = 0; i < len; i++) { - inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i])); + if (sourceLen > 0) { + const targetSignatures = getSignaturesOfType(target, kind); + const targetLen = targetSignatures.length; + for (let i = 0; i < targetLen; i++) { + const sourceIndex = Math.max(sourceLen - targetLen + i, 0); + inferFromSignature(getBaseSignature(sourceSignatures[sourceIndex]), getErasedSignature(targetSignatures[i])); + } } } function inferFromSignature(source, target) { @@ -64113,7 +64568,7 @@ function createTypeChecker(host) { const constraint = getConstraintOfTypeParameter(inference.typeParameter); if (constraint) { const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper); - if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { + if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } } @@ -64421,7 +64876,7 @@ function createTypeChecker(host) { function hasMatchingArgument(expression, reference) { if (expression.arguments) { for (const argument of expression.arguments) { - if (isOrContainsMatchingReference(reference, argument)) { + if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) { return true; } } @@ -64468,7 +64923,13 @@ function createTypeChecker(host) { const resolved = resolveStructuredTypeMembers(type); return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType)); } - function getTypeFacts(type) { + function getTypeFacts(type, mask) { + return getTypeFactsWorker(type, mask) & mask; + } + function hasTypeFacts(type, mask) { + return getTypeFacts(type, mask) !== 0; + } + function getTypeFactsWorker(type, callerOnlyNeeds) { if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) { type = getBaseConstraintOfType(type) || unknownType; } @@ -64501,6 +64962,10 @@ function createTypeChecker(host) { return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */; } if (flags & 524288 /* Object */) { + const possibleFacts = strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ | 7880640 /* FunctionStrictFacts */ | 7888800 /* ObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ | 16728e3 /* FunctionFacts */ | 16736160 /* ObjectFacts */; + if ((callerOnlyNeeds & possibleFacts) === 0) { + return 0; + } return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */; } if (flags & 16384 /* Void */) { @@ -64522,20 +64987,20 @@ function createTypeChecker(host) { return 0 /* None */; } if (flags & 1048576 /* Union */) { - return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */); + return reduceLeft(type.types, (facts, t) => facts | getTypeFactsWorker(t, callerOnlyNeeds), 0 /* None */); } if (flags & 2097152 /* Intersection */) { - return getIntersectionTypeFacts(type); + return getIntersectionTypeFacts(type, callerOnlyNeeds); } return 83886079 /* UnknownFacts */; } - function getIntersectionTypeFacts(type) { + function getIntersectionTypeFacts(type, callerOnlyNeeds) { const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */); let oredFacts = 0 /* None */; let andedFacts = 134217727 /* All */; for (const t of type.types) { if (!(ignoreObjects && t.flags & 524288 /* Object */)) { - const f = getTypeFacts(t); + const f = getTypeFactsWorker(t, callerOnlyNeeds); oredFacts |= f; andedFacts &= f; } @@ -64543,19 +65008,19 @@ function createTypeChecker(host) { return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */; } function getTypeWithFacts(type, include) { - return filterType(type, (t) => (getTypeFacts(t) & include) !== 0); + return filterType(type, (t) => hasTypeFacts(t, include)); } function getAdjustedTypeWithFacts(type, facts) { const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts)); if (strictNullChecks) { switch (facts) { case 524288 /* NEUndefined */: - return mapType(reduced, (t) => getTypeFacts(t) & 65536 /* EQUndefined */ ? getIntersectionType([t, getTypeFacts(t) & 131072 /* EQNull */ && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t); + return mapType(reduced, (t) => hasTypeFacts(t, 65536 /* EQUndefined */) ? getIntersectionType([t, hasTypeFacts(t, 131072 /* EQNull */) && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t); case 1048576 /* NENull */: - return mapType(reduced, (t) => getTypeFacts(t) & 131072 /* EQNull */ ? getIntersectionType([t, getTypeFacts(t) & 65536 /* EQUndefined */ && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t); + return mapType(reduced, (t) => hasTypeFacts(t, 131072 /* EQNull */) ? getIntersectionType([t, hasTypeFacts(t, 65536 /* EQUndefined */) && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t); case 2097152 /* NEUndefinedOrNull */: case 4194304 /* Truthy */: - return mapType(reduced, (t) => getTypeFacts(t) & 262144 /* EQUndefinedOrNull */ ? getGlobalNonNullableTypeInstantiation(t) : t); + return mapType(reduced, (t) => hasTypeFacts(t, 262144 /* EQUndefinedOrNull */) ? getGlobalNonNullableTypeInstantiation(t) : t); } } return reduced; @@ -64841,7 +65306,9 @@ function createTypeChecker(host) { return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType])); } function createFinalArrayType(elementType) { - return elementType.flags & 131072 /* Never */ ? autoArrayType : createArrayType(elementType.flags & 1048576 /* Union */ ? getUnionType(elementType.types, 2 /* Subtype */) : elementType); + return elementType.flags & 131072 /* Never */ ? autoArrayType : createArrayType( + elementType.flags & 1048576 /* Union */ ? getUnionType(elementType.types, 2 /* Subtype */) : elementType + ); } function getFinalArrayType(evolvingArrayType) { return evolvingArrayType.finalArrayType || (evolvingArrayType.finalArrayType = createFinalArrayType(evolvingArrayType.elementType)); @@ -64952,7 +65419,10 @@ function createTypeChecker(host) { let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 244 /* ExpressionStatement */) { + if (isBinaryExpression(node)) { + const rightType = checkNonNullExpression(node.right); + funcType = getSymbolHasInstanceMethodOfObjectType(rightType); + } else if (node.parent.kind === 244 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ @@ -65242,7 +65712,10 @@ function createTypeChecker(host) { } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference( + node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), + reference + ); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -65261,10 +65734,11 @@ function createTypeChecker(host) { const assignedType = getWidenedLiteralType(getInitialOrAssignedType(flow)); return isTypeAssignableTo(assignedType, declaredType) ? assignedType : anyArrayType; } - if (declaredType.flags & 1048576 /* Union */) { - return getAssignmentReducedType(declaredType, getInitialOrAssignedType(flow)); + const t = isInCompoundLikeAssignment(node) ? getBaseTypeOfLiteralType(declaredType) : declaredType; + if (t.flags & 1048576 /* Union */) { + return getAssignmentReducedType(t, getInitialOrAssignedType(flow)); } - return declaredType; + return t; } if (containsMatchingReference(reference, node)) { if (!isReachableFlowNode(flow)) { @@ -65370,31 +65844,21 @@ function createTypeChecker(host) { return createFlowType(narrowedType, isIncomplete(flowType)); } function getTypeAtSwitchClause(flow) { - const expr = flow.switchStatement.expression; + const expr = skipParentheses(flow.switchStatement.expression); const flowType = getTypeAtFlowNode(flow.antecedent); let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); + } else if (expr.kind === 112 /* TrueKeyword */) { + type = narrowTypeBySwitchOnTrue(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { if (optionalChainContainsReference(expr, reference)) { - type = narrowTypeBySwitchOptionalChainContainment( - type, - flow.switchStatement, - flow.clauseStart, - flow.clauseEnd, - (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) - ); + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */))); } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { - type = narrowTypeBySwitchOptionalChainContainment( - type, - flow.switchStatement, - flow.clauseStart, - flow.clauseEnd, - (t) => !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined") - ); + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, (t) => !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined")); } } const access = getDiscriminantPropertyAccess(expr, type); @@ -65548,13 +66012,15 @@ function createTypeChecker(host) { return void 0; } function getDiscriminantPropertyAccess(expr, computedType) { - const type = declaredType.flags & 1048576 /* Union */ ? declaredType : computedType; - if (type.flags & 1048576 /* Union */) { + if (declaredType.flags & 1048576 /* Union */ || computedType.flags & 1048576 /* Union */) { const access = getCandidateDiscriminantPropertyAccess(expr); if (access) { const name = getAccessedPropertyName(access); - if (name && isDiscriminantProperty(type, name)) { - return access; + if (name) { + const type = declaredType.flags & 1048576 /* Union */ && isTypeSubsetOf(computedType, declaredType) ? declaredType : computedType; + if (isDiscriminantProperty(type, name)) { + return access; + } } } } @@ -65574,7 +66040,7 @@ function createTypeChecker(host) { propType = removeNullable && optionalChain ? getOptionalType(propType) : propType; const narrowedPropType = narrowType2(propType); return filterType(type, (t) => { - const discriminantType = getTypeOfPropertyOrIndexSignature(t, propName); + const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType; return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType); }); } @@ -65636,6 +66102,10 @@ function createTypeChecker(host) { } return type; } + function narrowTypeByBooleanComparison(type, expr, bool, operator, assumeTrue) { + assumeTrue = assumeTrue !== (bool.kind === 112 /* TrueKeyword */) !== (operator !== 38 /* ExclamationEqualsEqualsToken */ && operator !== 36 /* ExclamationEqualsToken */); + return narrowType(type, expr, assumeTrue); + } function narrowTypeByBinaryExpression(type, expr, assumeTrue) { switch (expr.operatorToken.kind) { case 64 /* EqualsToken */: @@ -65683,6 +66153,12 @@ function createTypeChecker(host) { if (isMatchingConstructorReference(right)) { return narrowTypeByConstructor(type, operator, left, assumeTrue); } + if (isBooleanLiteral(right) && !isAccessExpression(left)) { + return narrowTypeByBooleanComparison(type, left, right, operator, assumeTrue); + } + if (isBooleanLiteral(left) && !isAccessExpression(right)) { + return narrowTypeByBooleanComparison(type, right, left, operator, assumeTrue); + } break; case 104 /* InstanceOfKeyword */: return narrowTypeByInstanceof(type, expr, assumeTrue); @@ -65898,14 +66374,14 @@ function createTypeChecker(host) { // the constituent based on its type facts. We use the strict subtype relation because it treats `object` // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`, // but are classified as "function" according to `typeof`. - isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? getTypeFacts(t) & facts ? t : neverType : ( + isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? hasTypeFacts(t, facts) ? t : neverType : ( // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`. isTypeSubtypeOf(impliedType, t) ? impliedType : ( // Neither the constituent nor the implied type is a subtype of the other, however their domains may still // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate // possible overlap, we form an intersection. Otherwise, we eliminate the constituent. - getTypeFacts(t) & facts ? getIntersectionType([t, impliedType]) : neverType + hasTypeFacts(t, facts) ? getIntersectionType([t, impliedType]) : neverType ) ) )); @@ -65919,11 +66395,47 @@ function createTypeChecker(host) { const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); - return filterType(type, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts); + return filterType(type, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts); } const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd); return getUnionType(map(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType)); } + function narrowTypeBySwitchOnTrue(type, switchStatement, clauseStart, clauseEnd) { + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); + const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; + for (let i = 0; i < clauseStart; i++) { + const clause = switchStatement.caseBlock.clauses[i]; + if (clause.kind === 296 /* CaseClause */) { + type = narrowType( + type, + clause.expression, + /*assumeTrue*/ + false + ); + } + } + if (hasDefaultClause) { + for (let i = clauseEnd; i < switchStatement.caseBlock.clauses.length; i++) { + const clause = switchStatement.caseBlock.clauses[i]; + if (clause.kind === 296 /* CaseClause */) { + type = narrowType( + type, + clause.expression, + /*assumeTrue*/ + false + ); + } + } + return type; + } + const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd); + return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType( + type, + clause.expression, + /*assumeTrue*/ + true + ) : neverType)); + } function isMatchingConstructorReference(expr) { return (isPropertyAccessExpression(expr) && idText(expr.name) === "constructor" || isElementAccessExpression(expr) && isStringLiteralLike(expr.argumentExpression) && expr.argumentExpression.text === "constructor") && isMatchingReference(reference, expr.expression); } @@ -65963,7 +66475,22 @@ function createTypeChecker(host) { } return type; } - const rightType = getTypeOfExpression(expr.right); + const right = expr.right; + const rightType = getTypeOfExpression(right); + if (!isTypeDerivedFrom(rightType, globalObjectType)) { + return type; + } + const signature = getEffectsSignature(expr); + const predicate = signature && getTypePredicateOfSignature(signature); + if (predicate && predicate.kind === 1 /* Identifier */ && predicate.parameterIndex === 0) { + return getNarrowedType( + type, + predicate.type, + assumeTrue, + /*checkDerived*/ + true + ); + } if (!isTypeDerivedFrom(rightType, globalFunctionType)) { return type; } @@ -66017,7 +66544,10 @@ function createTypeChecker(host) { const narrowedType = mapType(candidate, (c) => { const discriminant = keyPropertyName && getTypeOfPropertyOfType(c, keyPropertyName); const matching = discriminant && getConstituentTypeForKeyType(type, discriminant); - const directlyRelated = mapType(matching || type, checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType); + const directlyRelated = mapType( + matching || type, + checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType + ); return directlyRelated.flags & 131072 /* Never */ ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : directlyRelated; }); return !(narrowedType.flags & 131072 /* Never */) ? narrowedType : isTypeSubtypeOf(candidate, type) ? candidate : isTypeAssignableTo(type, candidate) ? type : isTypeAssignableTo(candidate, type) ? candidate : getIntersectionType([type, candidate]); @@ -66054,7 +66584,7 @@ function createTypeChecker(host) { false ); } - if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) { + if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) { type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); } const access = getDiscriminantPropertyAccess(predicateArgument, type); @@ -66127,7 +66657,15 @@ function createTypeChecker(host) { location = location.parent; } if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { - const type = removeOptionalTypeMarker(getTypeOfExpression(location)); + const type = removeOptionalTypeMarker( + isWriteAccess(location) && location.kind === 211 /* PropertyAccessExpression */ ? checkPropertyAccessExpression( + location, + /*checkMode*/ + void 0, + /*writeOnly*/ + true + ) : getTypeOfExpression(location) + ); if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { return type; } @@ -66136,7 +66674,7 @@ function createTypeChecker(host) { if (isDeclarationName(location) && isSetAccessor(location.parent) && getAnnotatedAccessorTypeNode(location.parent)) { return getWriteTypeOfAccessors(location.parent.symbol); } - return getNonMissingTypeOfSymbol(symbol); + return isRightSideOfAccessExpression(location) && isWriteAccess(location.parent) ? getWriteTypeOfSymbol(symbol) : getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */); @@ -66180,7 +66718,7 @@ function createTypeChecker(host) { reportCircularityError(declaration.symbol); return true; } - const containsUndefined = !!(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */); + const containsUndefined = !!hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */); if (!popTypeResolution()) { reportCircularityError(declaration.symbol); return true; @@ -66190,7 +66728,7 @@ function createTypeChecker(host) { return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && hasTypeFacts(declaredType, 16777216 /* IsUndefined */) && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { @@ -66204,7 +66742,7 @@ function createTypeChecker(host) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithoutNullableConstraint) : !!(type.flags & 465829888 /* Instantiable */ && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304 /* Nullable */)); } function hasContextualTypeWithNoGenericTypes(node, checkMode) { - const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 64 /* RestBindingElement */ ? getContextualType(node, 8 /* SkipBindingPatterns */) : getContextualType( + const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 32 /* RestBindingElement */ ? getContextualType(node, 8 /* SkipBindingPatterns */) : getContextualType( node, /*contextFlags*/ void 0 @@ -66280,7 +66818,12 @@ function createTypeChecker(host) { if (narrowedType.flags & 131072 /* Never */) { return neverType; } - return getBindingElementTypeFromParentType(declaration, narrowedType); + return getBindingElementTypeFromParentType( + declaration, + narrowedType, + /*noTupleBoundsCheck*/ + true + ); } } } @@ -66326,7 +66869,7 @@ function createTypeChecker(host) { if (languageVersion < 2 /* ES2015 */) { if (container.kind === 219 /* ArrowFunction */) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); - } else if (hasSyntacticModifier(container, 512 /* Async */)) { + } else if (hasSyntacticModifier(container, 1024 /* Async */)) { error(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); } } @@ -66388,7 +66931,7 @@ function createTypeChecker(host) { const isAlias = localOrExportSymbol.flags & 2097152 /* Alias */; if (localOrExportSymbol.flags & 3 /* Variable */) { if (assignmentKind === 1 /* Definite */) { - return type; + return isInCompoundLikeAssignment(node) ? getBaseTypeOfLiteralType(type) : type; } } else if (isAlias) { declaration = getDeclarationOfAliasSymbol(symbol); @@ -66739,7 +67282,7 @@ function createTypeChecker(host) { let inAsyncFunction = false; if (!isCallExpression2) { while (container && container.kind === 219 /* ArrowFunction */) { - if (hasSyntacticModifier(container, 512 /* Async */)) + if (hasSyntacticModifier(container, 1024 /* Async */)) inAsyncFunction = true; container = getSuperContainer( container, @@ -66748,7 +67291,7 @@ function createTypeChecker(host) { ); needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */; } - if (container && hasSyntacticModifier(container, 512 /* Async */)) + if (container && hasSyntacticModifier(container, 1024 /* Async */)) inAsyncFunction = true; } let nodeCheckFlag = 0; @@ -66804,6 +67347,9 @@ function createTypeChecker(host) { error(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); return errorType; } + if (classDeclarationExtendsNull(classLikeDeclaration)) { + return isCallExpression2 ? errorType : nullWideningType; + } const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration)); const baseClassType = classType && getBaseTypes(classType)[0]; if (!baseClassType) { @@ -66888,7 +67434,7 @@ function createTypeChecker(host) { return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent = walkUpParenthesizedExpressions(func.parent); - if (parent.kind === 226 /* BinaryExpression */ && parent.operatorToken.kind === 64 /* EqualsToken */) { + if (isAssignmentExpression(parent)) { const target = parent.left; if (isAccessExpression(target)) { const { expression } = target; @@ -66956,7 +67502,7 @@ function createTypeChecker(host) { function getContextualTypeForBindingElement(declaration, contextFlags) { const parent = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent, contextFlags) || parent.kind !== 208 /* BindingElement */ && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent, contextFlags) || parent.kind !== 208 /* BindingElement */ && parent.initializer && checkDeclarationInitializer(parent, declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; if (parent.name.kind === 207 /* ArrayBindingPattern */) { @@ -67077,7 +67623,24 @@ function createTypeChecker(host) { } const signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); if (signature && !isResolvingReturnTypeOfSignature(signature)) { - return getReturnTypeOfSignature(signature); + const returnType2 = getReturnTypeOfSignature(signature); + const functionFlags = getFunctionFlags(functionDecl); + if (functionFlags & 1 /* Generator */) { + return filterType(returnType2, (t) => { + return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || checkGeneratorInstantiationAssignabilityToReturnType( + t, + functionFlags, + /*errorNode*/ + void 0 + ); + }); + } + if (functionFlags & 2 /* Async */) { + return filterType(returnType2, (t) => { + return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || !!getAwaitedTypeOfPromise(t); + }); + } + return returnType2; } const iife = getImmediatelyInvokedFunctionExpression(functionDecl); if (iife) { @@ -67300,7 +67863,7 @@ function createTypeChecker(host) { } else if (t.flags & 3670016 /* StructuredType */) { const prop = getPropertyOfType(t, name); if (prop) { - return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop); + return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop && prop.flags & 16777216 /* Optional */)); } if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) { const restType = getElementTypeOfSliceOfTupleType( @@ -67385,7 +67948,7 @@ function createTypeChecker(host) { (t) => { if (isTupleType(t)) { if ((firstSpreadIndex === void 0 || index < firstSpreadIndex) && index < t.target.fixedLength) { - return getTypeArguments(t)[index]; + return removeMissingType(getTypeArguments(t)[index], !!(t.target.elementFlags[index] && 2 /* Optional */)); } const offset = length2 !== void 0 && (lastSpreadIndex === void 0 || index > lastSpreadIndex) ? length2 - index : 0; const fixedEndLength = offset > 0 && t.target.hasRestElement ? getEndElementCount(t.target, 3 /* Fixed */) : 0; @@ -67483,8 +68046,19 @@ function createTypeChecker(host) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 303 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), - (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] + filter(node.properties, (p) => { + if (!p.symbol) { + return false; + } + if (p.kind === 303 /* PropertyAssignment */) { + return isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); + } + if (p.kind === 304 /* ShorthandPropertyAssignment */) { + return isDiscriminantProperty(contextualType, p.symbol.escapedName); + } + return false; + }), + (prop) => [() => getContextFreeTypeOfExpression(prop.kind === 303 /* PropertyAssignment */ ? prop.initializer : prop.name), prop.symbol.escapedName] ), map( filter(getPropertiesOfType(contextualType), (s) => { @@ -68032,10 +68606,13 @@ function createTypeChecker(host) { elementTypes, elementFlags, /*readonly*/ - inConstContext + inConstContext && !(contextualType && someType(contextualType, isMutableArrayLikeType)) )); } - return createArrayLiteralType(createArrayType(elementTypes.length ? getUnionType(sameMap(elementTypes, (t, i) => elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessTypeOrUndefined(t, numberType) || anyType : t), 2 /* Subtype */) : strictNullChecks ? implicitNeverType : undefinedWideningType, inConstContext)); + return createArrayLiteralType(createArrayType( + elementTypes.length ? getUnionType(sameMap(elementTypes, (t, i) => elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessTypeOrUndefined(t, numberType) || anyType : t), 2 /* Subtype */) : strictNullChecks ? implicitNeverType : undefinedWideningType, + inConstContext + )); } function createArrayLiteralType(type) { if (!(getObjectFlags(type) & 4 /* Reference */)) { @@ -68188,12 +68765,7 @@ function createTypeChecker(host) { if (impliedProp) { prop.flags |= impliedProp.flags & 16777216 /* Optional */; } else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, stringType)) { - error( - memberDecl.name, - Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, - symbolToString(member), - typeToString(contextualType) - ); + error(memberDecl.name, Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType)); } } prop.declarations = member.declarations; @@ -68263,22 +68835,13 @@ function createTypeChecker(host) { } popContextualType(); if (contextualTypeHasPattern) { - const rootPatternParent = findAncestor( - contextualType.pattern.parent, - (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */ - ); - const spreadOrOutsideRootObject = findAncestor( - node, - (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */ - ); + const rootPatternParent = findAncestor(contextualType.pattern.parent, (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */); + const spreadOrOutsideRootObject = findAncestor(node, (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */); if (spreadOrOutsideRootObject.kind !== 305 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { - error( - prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), - Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value - ); + error(prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } propertiesTable.set(prop.escapedName, prop); propertiesArray.push(prop); @@ -68350,13 +68913,16 @@ function createTypeChecker(host) { checkJsxOpeningLikeElementOrOpeningFragment(node.openingFragment); const nodeSourceFile = getSourceFileOfNode(node); if (getJSXTransformEnabled(compilerOptions) && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has("jsx")) && !compilerOptions.jsxFragmentFactory && !nodeSourceFile.pragmas.has("jsxfrag")) { - error(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); + error( + node, + compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments + ); } checkJsxChildren(node); return getJsxElementTypeAt(node) || anyType; } function isHyphenatedJsxName(name) { - return stringContains(name, "-"); + return name.includes("-"); } function isJsxIntrinsicTagName(tagName) { return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName); @@ -68453,7 +69019,7 @@ function createTypeChecker(host) { } } const parent = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0; - if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) { + if (parent && parent.openingElement === openingLikeElement && getSemanticJsxChildren(parent.children).length > 0) { const childrenTypes = checkJsxChildren(parent, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { if (explicitlySpecifyChildrenAttribute) { @@ -68546,13 +69112,18 @@ function createTypeChecker(host) { if (!isErrorType(intrinsicElementsType)) { if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName)) return Debug.fail(); - const intrinsicProp = getPropertyOfType(intrinsicElementsType, isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText); + const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; + const intrinsicProp = getPropertyOfType(intrinsicElementsType, propName); if (intrinsicProp) { links.jsxFlags |= 1 /* IntrinsicNamedElement */; return links.resolvedSymbol = intrinsicProp; } - const indexSignatureType = getIndexTypeOfType(intrinsicElementsType, stringType); - if (indexSignatureType) { + const indexSymbol = getApplicableIndexSymbol(intrinsicElementsType, getStringLiteralType(unescapeLeadingUnderscores(propName))); + if (indexSymbol) { + links.jsxFlags |= 2 /* IntrinsicIndexedElement */; + return links.resolvedSymbol = indexSymbol; + } + if (getTypeOfPropertyOrIndexSignatureOfType(intrinsicElementsType, propName)) { links.jsxFlags |= 2 /* IntrinsicIndexedElement */; return links.resolvedSymbol = intrinsicElementsType.symbol; } @@ -68730,6 +69301,7 @@ function createTypeChecker(host) { } } function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) { + var _a; Debug.assert(isJsxIntrinsicTagName(node.tagName)); const links = getNodeLinks(node); if (!links.resolvedJsxElementAttributesType) { @@ -68737,7 +69309,8 @@ function createTypeChecker(host) { if (links.jsxFlags & 1 /* IntrinsicNamedElement */) { return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol) || errorType; } else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) { - return links.resolvedJsxElementAttributesType = getIndexTypeOfType(getJsxType(JsxNames.IntrinsicElements, node), stringType) || errorType; + const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; + return links.resolvedJsxElementAttributesType = ((_a = getApplicableIndexInfoForName(getJsxType(JsxNames.IntrinsicElements, node), propName)) == null ? void 0 : _a.type) || errorType; } else { return links.resolvedJsxElementAttributesType = errorType; } @@ -68912,6 +69485,7 @@ function createTypeChecker(host) { return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { + var _a; const flags = getDeclarationModifierFlagsFromSymbol(prop, writing); if (isSuper) { if (languageVersion < 2 /* ES2015 */) { @@ -68922,45 +69496,36 @@ function createTypeChecker(host) { return false; } } - if (flags & 256 /* Abstract */) { + if (flags & 64 /* Abstract */) { if (errorNode) { - error( - errorNode, - Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, - symbolToString(prop), - typeToString(getDeclaringClass(prop)) - ); + error(errorNode, Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop))); + } + return false; + } + if (!(flags & 256 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(isClassInstanceProperty))) { + if (errorNode) { + error(errorNode, Diagnostics.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, symbolToString(prop)); } return false; } } - if (flags & 256 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) { + if (flags & 64 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) { const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) { if (errorNode) { - error( - errorNode, - Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, - symbolToString(prop), - getTextOfIdentifierOrLiteral(declaringClassDeclaration.name) - ); + error(errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), getTextOfIdentifierOrLiteral(declaringClassDeclaration.name)); } return false; } } - if (!(flags & 24 /* NonPublicAccessibilityModifier */)) { + if (!(flags & 6 /* NonPublicAccessibilityModifier */)) { return true; } - if (flags & 8 /* Private */) { + if (flags & 2 /* Private */) { const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (!isNodeWithinClass(location, declaringClassDeclaration)) { if (errorNode) { - error( - errorNode, - Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, - symbolToString(prop), - typeToString(getDeclaringClass(prop)) - ); + error(errorNode, Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop))); } return false; } @@ -68976,19 +69541,14 @@ function createTypeChecker(host) { if (!enclosingClass) { enclosingClass = getEnclosingClassFromThisParameter(location); enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing); - if (flags & 32 /* Static */ || !enclosingClass) { + if (flags & 256 /* Static */ || !enclosingClass) { if (errorNode) { - error( - errorNode, - Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, - symbolToString(prop), - typeToString(getDeclaringClass(prop) || containingType) - ); + error(errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || containingType)); } return false; } } - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return true; } if (containingType.flags & 262144 /* TypeParameter */) { @@ -68996,13 +69556,7 @@ function createTypeChecker(host) { } if (!containingType || !hasBaseType(containingType, enclosingClass)) { if (errorNode) { - error( - errorNode, - Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, - symbolToString(prop), - typeToString(enclosingClass), - typeToString(containingType) - ); + error(errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, symbolToString(prop), typeToString(enclosingClass), typeToString(containingType)); } return false; } @@ -69036,7 +69590,7 @@ function createTypeChecker(host) { return checkNonNullType(checkExpression(node), node); } function isNullableType(type) { - return !!(getTypeFacts(type) & 50331648 /* IsUndefinedOrNull */); + return hasTypeFacts(type, 50331648 /* IsUndefinedOrNull */); } function getNonNullableTypeIfNeeded(type) { return isNullableType(type) ? getNonNullableType(type) : type; @@ -69082,7 +69636,7 @@ function createTypeChecker(host) { error(node, Diagnostics.Object_is_of_type_unknown); return errorType; } - const facts = getTypeFacts(type); + const facts = getTypeFacts(type, 50331648 /* IsUndefinedOrNull */); if (facts & 50331648 /* IsUndefinedOrNull */) { reportError(node, facts); const t = getNonNullableType(type); @@ -69297,7 +69851,7 @@ function createTypeChecker(host) { apparentType, right.escapedText, /*skipObjectFunctionPropertyAugment*/ - false, + isConstEnumObjectType(apparentType), /*includeTypeOnlyMembers*/ node.kind === 166 /* QualifiedName */ ); @@ -69359,11 +69913,17 @@ function createTypeChecker(host) { return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode); } function isUncheckedJSSuggestion(node, suggestion, excludeClasses) { + var _a; const file = getSourceFileOfNode(node); if (file) { if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) { const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode); - return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */); + const suggestionHasNoExtendsOrDecorators = !(suggestion == null ? void 0 : suggestion.valueDeclaration) || !isClassLike(suggestion.valueDeclaration) || ((_a = suggestion.valueDeclaration.heritageClauses) == null ? void 0 : _a.length) || classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + suggestion.valueDeclaration + ); + return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */ && suggestionHasNoExtendsOrDecorators) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */ && suggestionHasNoExtendsOrDecorators); } } return false; @@ -69408,16 +69968,13 @@ function createTypeChecker(host) { } let diagnosticMessage; const declarationName = idText(right); - if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { + if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 256 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { - addRelatedInfo( - diagnosticMessage, - createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName) - ); + addRelatedInfo(diagnosticMessage, createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName)); } } function isInPropertyInitializerOrClassStaticBlock(node) { @@ -69665,7 +70222,7 @@ function createTypeChecker(host) { if (!valueDeclaration) { return; } - const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 8 /* Private */); + const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 2 /* Private */); const hasPrivateIdentifier = prop.valueDeclaration && isNamedDeclaration(prop.valueDeclaration) && isPrivateIdentifier(prop.valueDeclaration.name); if (!hasPrivateModifier && !hasPrivateIdentifier) { return; @@ -69808,7 +70365,9 @@ function createTypeChecker(host) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 170 /* Decorator */) { + } else if (isBinaryExpression(node)) { + checkExpression(node.left); + } else if (isCallOrNewExpression(node)) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -69881,6 +70440,8 @@ function createTypeChecker(host) { } } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); + } else if (node.kind === 226 /* BinaryExpression */) { + argCount = 1; } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; if (callIsIncomplete) { @@ -69980,13 +70541,13 @@ function createTypeChecker(host) { return voidType; } const thisArgumentType = checkExpression(thisArgumentNode); - return isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType; + return isRightSideOfInstanceofExpression(thisArgumentNode) ? thisArgumentType : isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType; } function inferTypeArguments(node, signature, args, checkMode, context) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 170 /* Decorator */) { + if (node.kind !== 170 /* Decorator */ && node.kind !== 226 /* BinaryExpression */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -70081,9 +70642,11 @@ function createTypeChecker(host) { } if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); + } else { + names.push(void 0); } } - return createTupleType(types, flags, inConstContext, length(names) === length(types) ? names : void 0); + return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names); } function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) { const isJavascript = isInJSFile(signature.declaration); @@ -70315,6 +70878,9 @@ function createTypeChecker(host) { } } function getThisArgumentOfCall(node) { + if (node.kind === 226 /* BinaryExpression */) { + return node.right; + } const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0; if (expression) { const callee = skipOuterExpressions(expression); @@ -70343,6 +70909,9 @@ function createTypeChecker(host) { if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } + if (node.kind === 226 /* BinaryExpression */) { + return [node.left]; + } if (isJsxOpeningLikeElement(node)) { return node.attributes.properties.length > 0 || isJsxOpeningElement(node) && node.parent.children.length > 0 ? [node.attributes] : emptyArray; } @@ -70357,12 +70926,7 @@ function createTypeChecker(host) { forEach(getElementTypes(spreadType), (t, i2) => { var _a; const flags = spreadType.target.elementFlags[i2]; - const syntheticArg = createSyntheticExpression( - arg, - flags & 4 /* Rest */ ? createArrayType(t) : t, - !!(flags & 12 /* Variable */), - (_a = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a[i2] - ); + const syntheticArg = createSyntheticExpression(arg, flags & 4 /* Rest */ ? createArrayType(t) : t, !!(flags & 12 /* Variable */), (_a = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a[i2]); effectiveArgs.push(syntheticArg); }); } else { @@ -70617,9 +71181,10 @@ function createTypeChecker(host) { const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); + const isInstanceof = node.kind === 226 /* BinaryExpression */; const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; - if (!isDecorator2 && !isSuperCall(node)) { + if (!isDecorator2 && !isInstanceof && !isSuperCall(node)) { typeArguments = node.typeArguments; if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 108 /* SuperKeyword */) { forEach(typeArguments, checkSourceElement); @@ -70648,6 +71213,9 @@ function createTypeChecker(host) { result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode); getNodeLinks(node).resolvedSignature = result; if (reportErrors2) { + if (!headMessage && isInstanceof) { + headMessage = Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method; + } if (candidatesForArgumentError) { if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) { const last2 = candidatesForArgumentError[candidatesForArgumentError.length - 1]; @@ -71099,7 +71667,7 @@ function createTypeChecker(host) { return resolveErrorCall(node); } const valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol); - if (valueDecl && hasSyntacticModifier(valueDecl, 256 /* Abstract */)) { + if (valueDecl && hasSyntacticModifier(valueDecl, 64 /* Abstract */)) { error(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } @@ -71162,7 +71730,7 @@ function createTypeChecker(host) { return true; } const declaration = signature.declaration; - const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); + const modifiers = getSelectedEffectiveModifierFlags(declaration, 6 /* NonPublicAccessibilityModifier */); if (!modifiers || declaration.kind !== 176 /* Constructor */) { return true; } @@ -71170,16 +71738,16 @@ function createTypeChecker(host) { const declaringClass = getDeclaredTypeOfSymbol(declaration.parent.symbol); if (!isNodeWithinClass(node, declaringClassDeclaration)) { const containingClass = getContainingClass(node); - if (containingClass && modifiers & 16 /* Protected */) { + if (containingClass && modifiers & 4 /* Protected */) { const containingType = getTypeOfNode(containingClass); if (typeHasProtectedAccessibleBase(declaration.parent.symbol, containingType)) { return true; } } - if (modifiers & 8 /* Private */) { + if (modifiers & 2 /* Private */) { error(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } - if (modifiers & 16 /* Protected */) { + if (modifiers & 4 /* Protected */) { error(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } return false; @@ -71280,10 +71848,7 @@ function createTypeChecker(host) { const sigs = getSignaturesOfType(getTypeOfSymbol(getSymbolLinks(apparentType.symbol).target), kind); if (!sigs || !sigs.length) return; - addRelatedInfo( - diagnostic, - createDiagnosticForNode(importNode, Diagnostics.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) - ); + addRelatedInfo(diagnostic, createDiagnosticForNode(importNode, Diagnostics.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)); } } function resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode) { @@ -71437,6 +72002,30 @@ function createTypeChecker(host) { } return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); } + function resolveInstanceofExpression(node, candidatesOutArray, checkMode) { + const rightType = checkExpression(node.right); + if (!isTypeAny(rightType)) { + const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(rightType); + if (hasInstanceMethodType) { + const apparentType = getApparentType(hasInstanceMethodType); + if (isErrorType(apparentType)) { + return resolveErrorCall(node); + } + const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); + const constructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */); + if (isUntypedFunctionCall(hasInstanceMethodType, apparentType, callSignatures.length, constructSignatures.length)) { + return resolveUntypedCall(node); + } + if (callSignatures.length) { + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); + } + } else if (!(typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { + error(node.right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method); + return resolveErrorCall(node); + } + } + return anySignature; + } function isPotentiallyUncalledDecorator(decorator, signatures) { return signatures.length && every(signatures, (signature) => signature.minArgumentCount === 0 && !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature)); } @@ -71453,6 +72042,8 @@ function createTypeChecker(host) { case 286 /* JsxOpeningElement */: case 285 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); + case 226 /* BinaryExpression */: + return resolveInstanceofExpression(node, candidatesOutArray, checkMode); } Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); } @@ -71910,12 +72501,7 @@ function createTypeChecker(host) { addLazyDiagnostic(() => { const widenedType = getWidenedType(exprType); if (!isTypeComparableTo(targetType, widenedType)) { - checkTypeComparableTo( - exprType, - targetType, - errNode, - 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 - ); + checkTypeComparableTo(exprType, targetType, errNode, 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); } }); } @@ -72072,14 +72658,14 @@ function createTypeChecker(host) { return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType; } function getTypeOfParameter(symbol) { - const type = getTypeOfSymbol(symbol); - if (strictNullChecks) { - const declaration = symbol.valueDeclaration; - if (declaration && hasInitializer(declaration)) { - return getOptionalType(type); - } - } - return type; + const declaration = symbol.valueDeclaration; + return addOptionality( + getTypeOfSymbol(symbol), + /*isProperty*/ + false, + /*isOptional*/ + !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration)) + ); } function getTupleElementLabel(d, index, restParameterName = "arg") { if (!d) { @@ -72177,7 +72763,7 @@ function createTypeChecker(host) { } return void 0; } - function getRestTypeAtPosition(source, pos) { + function getRestTypeAtPosition(source, pos, readonly) { const parameterCount = getParameterCount(source); const minArgumentCount = getMinArgumentCount(source); const restType = getEffectiveRestType(source); @@ -72195,18 +72781,9 @@ function createTypeChecker(host) { types.push(restType); flags.push(8 /* Variadic */); } - const name = getNameableDeclarationAtPosition(source, i); - if (name) { - names.push(name); - } + names.push(getNameableDeclarationAtPosition(source, i)); } - return createTupleType( - types, - flags, - /*readonly*/ - false, - length(names) === length(types) ? names : void 0 - ); + return createTupleType(types, flags, readonly, names); } function getParameterCount(signature) { const length2 = signature.parameters.length; @@ -72286,11 +72863,16 @@ function createTypeChecker(host) { const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (let i = 0; i < len; i++) { const declaration = signature.parameters[i].valueDeclaration; - if (declaration.type) { - const typeNode = getEffectiveTypeAnnotationNode(declaration); - if (typeNode) { - inferTypes(inferenceContext.inferences, getTypeFromTypeNode(typeNode), getTypeAtPosition(context, i)); - } + const typeNode = getEffectiveTypeAnnotationNode(declaration); + if (typeNode) { + const source = addOptionality( + getTypeFromTypeNode(typeNode), + /*isProperty*/ + false, + isOptionalDeclaration(declaration) + ); + const target = getTypeAtPosition(context, i); + inferTypes(inferenceContext.inferences, source, target); } } } @@ -72339,29 +72921,40 @@ function createTypeChecker(host) { assignParameterType(parameter); } } - function assignParameterType(parameter, type) { + function assignParameterType(parameter, contextualType) { const links = getSymbolLinks(parameter); if (!links.type) { const declaration = parameter.valueDeclaration; - links.type = type || (declaration ? getWidenedTypeForVariableLikeDeclaration( - declaration, - /*reportErrors*/ - true - ) : getTypeOfSymbol(parameter)); + links.type = addOptionality( + contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration( + declaration, + /*reportErrors*/ + true + ) : getTypeOfSymbol(parameter)), + /*isProperty*/ + false, + /*isOptional*/ + !!declaration && !declaration.initializer && isOptionalDeclaration(declaration) + ); if (declaration && declaration.name.kind !== 80 /* Identifier */) { if (links.type === unknownType) { links.type = getTypeFromBindingPattern(declaration.name); } assignBindingElementTypes(declaration.name, links.type); } - } else if (type) { - Debug.assertEqual(links.type, type, "Parameter symbol already has a cached type which differs from newly assigned type"); + } else if (contextualType) { + Debug.assertEqual(links.type, contextualType, "Parameter symbol already has a cached type which differs from newly assigned type"); } } function assignBindingElementTypes(pattern, parentType) { for (const element of pattern.elements) { if (!isOmittedExpression(element)) { - const type = getBindingElementTypeFromParentType(element, parentType); + const type = getBindingElementTypeFromParentType( + element, + parentType, + /*noTupleBoundsCheck*/ + false + ); if (element.name.kind === 80 /* Identifier */) { getSymbolLinks(getSymbolOfDeclaration(element)).type = type; } else { @@ -72632,13 +73225,19 @@ function createTypeChecker(host) { function createPromiseReturnType(func, promisedType) { const promiseType = createPromiseType(promisedType); if (promiseType === unknownType) { - error(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); + error( + func, + isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option + ); return errorType; } else if (!getGlobalPromiseConstructorSymbol( /*reportErrors*/ true )) { - error(func, isImportCall(func) ? Diagnostics.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 : 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); + error( + func, + isImportCall(func) ? Diagnostics.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 : 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 + ); } return promiseType; } @@ -72821,7 +73420,11 @@ function createTypeChecker(host) { function getYieldedTypeOfYieldExpression(node, expressionType, sentType, isAsync) { const errorNode = node.expression || node; const yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, expressionType, sentType, errorNode) : expressionType; - return !isAsync ? yieldedType : getAwaitedType(yieldedType, errorNode, node.asteriskToken ? Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); + return !isAsync ? yieldedType : getAwaitedType( + yieldedType, + errorNode, + node.asteriskToken ? Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ); } function getNotEqualFactsFromTypeofSwitch(start, end, witnesses) { let facts = 0 /* None */; @@ -72855,7 +73458,7 @@ function createTypeChecker(host) { if (operandConstraint.flags & 3 /* AnyOrUnknown */) { return (556800 /* AllTypeofNE */ & notEqualFacts) === 556800 /* AllTypeofNE */; } - return !someType(operandConstraint, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts); + return !someType(operandConstraint, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts); } const type = checkExpressionCached(node.expression); if (!isLiteralType(type)) { @@ -72876,8 +73479,20 @@ function createTypeChecker(host) { let hasReturnWithNoExpression = functionHasImplicitReturn(func); let hasReturnOfTypeNever = false; forEachReturnStatement(func.body, (returnStatement) => { - const expr = returnStatement.expression; + let expr = returnStatement.expression; if (expr) { + expr = skipParentheses( + expr, + /*excludeJSDocTypeAssertions*/ + true + ); + if (functionFlags & 2 /* Async */ && expr.kind === 223 /* AwaitExpression */) { + expr = skipParentheses( + expr.expression, + /*excludeJSDocTypeAssertions*/ + true + ); + } if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { hasReturnOfTypeNever = true; return; @@ -73109,7 +73724,7 @@ function createTypeChecker(host) { return !setProp; } function isReadonlySymbol(symbol) { - return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); + return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 8 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); } function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) { var _a, _b; @@ -73173,14 +73788,15 @@ function createTypeChecker(host) { if (symbol) { if (isReadonlySymbol(symbol)) { error(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); + } else { + checkDeleteExpressionMustBeOptional(expr, symbol); } - checkDeleteExpressionMustBeOptional(expr, symbol); } return booleanType; } function checkDeleteExpressionMustBeOptional(expr, symbol) { const type = getTypeOfSymbol(symbol); - if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : getTypeFacts(type) & 16777216 /* IsUndefined */)) { + if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : hasTypeFacts(type, 16777216 /* IsUndefined */))) { error(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); } } @@ -73189,7 +73805,7 @@ function createTypeChecker(host) { return typeofType; } function checkVoidExpression(node) { - checkExpression(node.expression); + checkNodeDeferred(node); return undefinedWideningType; } function checkAwaitGrammar(node) { @@ -73315,15 +73931,11 @@ function createTypeChecker(host) { return getUnaryResultType(operandType); case 54 /* ExclamationToken */: checkTruthinessOfType(operandType, node.operand); - const facts = getTypeFacts(operandType) & (4194304 /* Truthy */ | 8388608 /* Falsy */); + const facts = getTypeFacts(operandType, 4194304 /* Truthy */ | 8388608 /* Falsy */); return facts === 4194304 /* Truthy */ ? falseType : facts === 8388608 /* Falsy */ ? trueType : booleanType; case 46 /* PlusPlusToken */: case 47 /* MinusMinusToken */: - const ok = checkArithmeticOperandType( - node.operand, - checkNonNullType(operandType, node.operand), - Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type - ); + const ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type); if (ok) { checkReferenceExpression( node.operand, @@ -73399,16 +74011,35 @@ function createTypeChecker(host) { function isConstEnumSymbol(symbol) { return (symbol.flags & 128 /* ConstEnum */) !== 0; } - function checkInstanceOfExpression(left, right, leftType, rightType) { + function getSymbolHasInstanceMethodOfObjectType(type) { + const hasInstancePropertyName = getPropertyNameForKnownSymbolName("hasInstance"); + const hasInstanceProperty = getPropertyOfObjectType(type, hasInstancePropertyName); + if (hasInstanceProperty) { + const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty); + if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) { + return hasInstancePropertyType; + } + } + } + function checkInstanceOfExpression(left, right, leftType, rightType, checkMode) { if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { error(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } - if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); + Debug.assert(isInstanceOfExpression(left.parent)); + const signature = getResolvedSignature( + left.parent, + /*candidatesOutArray*/ + void 0, + checkMode + ); + if (signature === resolvingSignature) { + return silentNeverType; } + const returnType = getReturnTypeOfSignature(signature); + checkTypeAssignableTo(returnType, booleanType, right, Diagnostics.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression); return booleanType; } function hasEmptyObjectIntersection(type) { @@ -73550,7 +74181,7 @@ function createTypeChecker(host) { if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { - if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { + if (strictNullChecks && !hasTypeFacts(checkExpression(prop.objectAssignmentInitializer), 16777216 /* IsUndefined */)) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode); @@ -73916,7 +74547,9 @@ function createTypeChecker(host) { } if (!resultType) { const closeEnoughKind = 296 /* NumberLike */ | 2112 /* BigIntLike */ | 402653316 /* StringLike */ | 3 /* AnyOrUnknown */; - reportOperatorError((left2, right2) => isTypeAssignableToKind(left2, closeEnoughKind) && isTypeAssignableToKind(right2, closeEnoughKind)); + reportOperatorError( + (left2, right2) => isTypeAssignableToKind(left2, closeEnoughKind) && isTypeAssignableToKind(right2, closeEnoughKind) + ); return anyType; } if (operator === 65 /* PlusEqualsToken */) { @@ -73944,7 +74577,7 @@ function createTypeChecker(host) { case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - if (!(checkMode && checkMode & 128 /* TypeOnly */)) { + if (!(checkMode && checkMode & 64 /* TypeOnly */)) { if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or != (!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) { const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; @@ -73955,12 +74588,12 @@ function createTypeChecker(host) { } return booleanType; case 104 /* InstanceOfKeyword */: - return checkInstanceOfExpression(left, right, leftType, rightType); + return checkInstanceOfExpression(left, right, leftType, rightType, checkMode); case 103 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); case 56 /* AmpersandAmpersandToken */: case 77 /* AmpersandAmpersandEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 4194304 /* Truthy */ ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType; + const resultType2 = hasTypeFacts(leftType, 4194304 /* Truthy */) ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType; if (operator === 77 /* AmpersandAmpersandEqualsToken */) { checkAssignmentOperator(rightType); } @@ -73968,7 +74601,7 @@ function createTypeChecker(host) { } case 57 /* BarBarToken */: case 76 /* BarBarEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 8388608 /* Falsy */ ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType; + const resultType2 = hasTypeFacts(leftType, 8388608 /* Falsy */) ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType; if (operator === 76 /* BarBarEqualsToken */) { checkAssignmentOperator(rightType); } @@ -73976,7 +74609,7 @@ function createTypeChecker(host) { } case 61 /* QuestionQuestionToken */: case 78 /* QuestionQuestionEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 262144 /* EQUndefinedOrNull */ ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType; + const resultType2 = hasTypeFacts(leftType, 262144 /* EQUndefinedOrNull */) ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType; if (operator === 78 /* QuestionQuestionEqualsToken */) { checkAssignmentOperator(rightType); } @@ -74080,11 +74713,7 @@ function createTypeChecker(host) { true ); } - if (checkReferenceExpression( - left, - Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, - Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access - )) { + if (checkReferenceExpression(left, Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)) { let headMessage; if (exactOptionalPropertyTypes && isPropertyAccessExpression(left) && maybeTypeOfKind(valueType, 32768 /* Undefined */)) { const target = getTypeOfPropertyOfType(getTypeOfExpression(left.expression), left.name.escapedText); @@ -74166,21 +74795,13 @@ function createTypeChecker(host) { const isLeftNaN = isGlobalNaN(skipParentheses(left2)); const isRightNaN = isGlobalNaN(skipParentheses(right2)); if (isLeftNaN || isRightNaN) { - const err = error( - errorNode2, - Diagnostics.This_condition_will_always_return_0, - tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */) - ); + const err = error(errorNode2, Diagnostics.This_condition_will_always_return_0, tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */)); if (isLeftNaN && isRightNaN) return; const operatorString = operator2 === 38 /* ExclamationEqualsEqualsToken */ || operator2 === 36 /* ExclamationEqualsToken */ ? tokenToString(54 /* ExclamationToken */) : ""; const location = isLeftNaN ? right2 : left2; const expression = skipParentheses(location); - addRelatedInfo(err, createDiagnosticForNode( - location, - Diagnostics.Did_you_mean_0, - `${operatorString}Number.isNaN(${isEntityNameExpression(expression) ? entityNameToString(expression) : "..."})` - )); + addRelatedInfo(err, createDiagnosticForNode(location, Diagnostics.Did_you_mean_0, `${operatorString}Number.isNaN(${isEntityNameExpression(expression) ? entityNameToString(expression) : "..."})`)); } } function isGlobalNaN(expr) { @@ -74220,7 +74841,15 @@ function createTypeChecker(host) { checkExternalEmitHelpers(node, 256 /* Values */); } } - const returnType = getReturnTypeFromAnnotation(func); + let returnType = getReturnTypeFromAnnotation(func); + if (returnType && returnType.flags & 1048576 /* Union */) { + returnType = filterType(returnType, (t) => checkGeneratorInstantiationAssignabilityToReturnType( + t, + functionFlags, + /*errorNode*/ + void 0 + )); + } const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync); const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType; const signatureNextType = iterationTypes && iterationTypes.nextType || anyType; @@ -74604,7 +75233,7 @@ function createTypeChecker(host) { } } const startInvocationCount = flowInvocationCount; - const type = checkExpression(node, 128 /* TypeOnly */); + const type = checkExpression(node, 64 /* TypeOnly */); if (flowInvocationCount !== startInvocationCount) { const cache = flowTypeCache || (flowTypeCache = []); cache[getNodeId(node)] = type; @@ -74719,7 +75348,7 @@ function createTypeChecker(host) { return nullWideningType; case 15 /* NoSubstitutionTemplateLiteral */: case 11 /* StringLiteral */: - return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? blockedStringType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -74836,15 +75465,15 @@ function createTypeChecker(host) { var _a, _b; if (isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent)) { const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node)); - const modifiers = getTypeParameterModifiers(typeParameter) & (32768 /* In */ | 65536 /* Out */); + const modifiers = getTypeParameterModifiers(typeParameter) & (8192 /* In */ | 16384 /* Out */); if (modifiers) { const symbol = getSymbolOfDeclaration(node.parent); if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) { error(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); - } else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) { + } else if (modifiers === 8192 /* In */ || modifiers === 16384 /* Out */) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) }); - const source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); - const target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck); + const source = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); + const target = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck); const saveVarianceTypeParameter = typeParameter; varianceTypeParameter = typeParameter; checkTypeAssignableTo(source, target, node, Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation); @@ -74858,7 +75487,7 @@ function createTypeChecker(host) { checkGrammarModifiers(node); checkVariableLikeDeclaration(node); const func = getContainingFunction(node); - if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { + if (hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) { if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { error(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } @@ -74959,11 +75588,7 @@ function createTypeChecker(host) { } const name = element.name; if (name.kind === 80 /* Identifier */ && name.escapedText === predicateVariableName) { - error( - predicateVariableNode, - Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, - predicateVariableName - ); + error(predicateVariableNode, Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( @@ -75032,11 +75657,7 @@ function createTypeChecker(host) { if (returnType === voidType) { error(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation); } else { - const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType; - const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType; - const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType; - const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */)); - checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation); + checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags2, returnTypeErrorLocation); } } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) { checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation); @@ -75047,6 +75668,13 @@ function createTypeChecker(host) { } } } + function checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags, errorNode) { + const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags & 2 /* Async */) !== 0) || anyType; + const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags & 2 /* Async */) !== 0) || generatorYieldType; + const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags & 2 /* Async */) !== 0) || unknownType; + const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags & 2 /* Async */)); + return checkTypeAssignableTo(generatorInstantiation, returnType, errorNode); + } function checkClassForDuplicateDeclarations(node) { const instanceNames = /* @__PURE__ */ new Map(); const staticNames = /* @__PURE__ */ new Map(); @@ -75067,7 +75695,7 @@ function createTypeChecker(host) { const isPrivate = isPrivateIdentifier(name); const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0; const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames; - const memberName = name && getPropertyNameForPropertyNameNode(name); + const memberName = name && getEffectivePropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { case 177 /* GetAccessor */: @@ -75114,7 +75742,7 @@ function createTypeChecker(host) { const memberNameNode = member.name; const isStaticMember = isStatic(member); if (isStaticMember && memberNameNode) { - const memberName = getPropertyNameForPropertyNameNode(memberNameNode); + const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode); switch (memberName) { case "name": case "length": @@ -75194,7 +75822,7 @@ function createTypeChecker(host) { checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { error(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } @@ -75211,7 +75839,7 @@ function createTypeChecker(host) { error(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { error(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { @@ -75268,7 +75896,7 @@ function createTypeChecker(host) { if (classExtendsNull) { error(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); } - const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); + const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 31 /* ParameterPropertyModifier */))); if (superCallShouldBeRootLevel) { if (!superCallIsRootLevelInConstructor(superCall, node.body)) { error(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); @@ -75337,11 +75965,11 @@ function createTypeChecker(host) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); const setterFlags = getEffectiveModifierFlags(setter); - if ((getterFlags & 256 /* Abstract */) !== (setterFlags & 256 /* Abstract */)) { + if ((getterFlags & 64 /* Abstract */) !== (setterFlags & 64 /* Abstract */)) { error(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); error(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); } - if (getterFlags & 16 /* Protected */ && !(setterFlags & (16 /* Protected */ | 8 /* Private */)) || getterFlags & 8 /* Private */ && !(setterFlags & 8 /* Private */)) { + if (getterFlags & 4 /* Protected */ && !(setterFlags & (4 /* Protected */ | 2 /* Private */)) || getterFlags & 2 /* Private */ && !(setterFlags & 2 /* Private */)) { error(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); error(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); } @@ -75363,12 +75991,7 @@ function createTypeChecker(host) { return getEffectiveTypeArguments(node, typeParameters)[index]; } function getEffectiveTypeArguments(node, typeParameters) { - return fillMissingTypeArguments( - map(node.typeArguments, getTypeFromTypeNode), - typeParameters, - getMinTypeArgumentCount(typeParameters), - isInJSFile(node) - ); + return fillMissingTypeArguments(map(node.typeArguments, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(node)); } function checkTypeArgumentConstraints(node, typeParameters) { let typeArguments; @@ -75526,7 +76149,7 @@ function createTypeChecker(host) { const propertyName = getPropertyNameFromIndex(indexType, accessNode); if (propertyName) { const propertySymbol = forEachType(apparentObjectType, (t) => getPropertyOfType(t, propertyName)); - if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 24 /* NonPublicAccessibilityModifier */) { + if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 6 /* NonPublicAccessibilityModifier */) { error(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); return errorType; } @@ -75605,16 +76228,8 @@ function createTypeChecker(host) { } function checkImportType(node) { checkSourceElement(node.argument); - if (node.assertions) { - const override = getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode); - if (override) { - if (!isNightly()) { - grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next); - } - if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) { - grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext); - } - } + if (node.attributes) { + getResolutionModeOverride(node.attributes, grammarErrorOnNode); } checkTypeReferenceOrImport(node); } @@ -75632,16 +76247,16 @@ function createTypeChecker(host) { getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); + return (hasEffectiveModifier(node, 2 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlagsCached(n); if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { const container = getEnclosingContainer(n); - if (container && container.flags & 128 /* ExportContext */ && !(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { - flags |= 1 /* Export */; + if (container && container.flags & 128 /* ExportContext */ && !(flags & 128 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { + flags |= 32 /* Export */; } - flags |= 2 /* Ambient */; + flags |= 128 /* Ambient */; } return flags & flagsToCheck; } @@ -75659,13 +76274,13 @@ function createTypeChecker(host) { const canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck2); forEach(overloads, (o) => { const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags; - if (deviation & 1 /* Export */) { + if (deviation & 32 /* Export */) { error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); - } else if (deviation & 2 /* Ambient */) { + } else if (deviation & 128 /* Ambient */) { error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); - } else if (deviation & (8 /* Private */ | 16 /* Protected */)) { + } else if (deviation & (2 /* Private */ | 4 /* Protected */)) { error(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); - } else if (deviation & 256 /* Abstract */) { + } else if (deviation & 64 /* Abstract */) { error(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); } }); @@ -75682,7 +76297,7 @@ function createTypeChecker(host) { }); } } - const flagsToCheck = 1 /* Export */ | 2 /* Ambient */ | 8 /* Private */ | 16 /* Protected */ | 256 /* Abstract */; + const flagsToCheck = 32 /* Export */ | 128 /* Ambient */ | 2 /* Private */ | 4 /* Protected */ | 64 /* Abstract */; let someNodeFlags = 0 /* None */; let allNodeFlags = flagsToCheck; let someHaveQuestionToken = false; @@ -75730,7 +76345,7 @@ function createTypeChecker(host) { if (isConstructor) { error(errorNode, Diagnostics.Constructor_implementation_is_missing); } else { - if (hasSyntacticModifier(node, 256 /* Abstract */)) { + if (hasSyntacticModifier(node, 64 /* Abstract */)) { error(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); } else { error(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); @@ -75816,7 +76431,7 @@ function createTypeChecker(host) { } }); } - if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 256 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) { + if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 64 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) { reportImplementationExpectedError(lastSeenNonAmbientDeclaration); } if (hasOverloads) { @@ -75859,9 +76474,9 @@ function createTypeChecker(host) { let defaultExportedDeclarationSpaces = 0 /* None */; for (const d of symbol.declarations) { const declarationSpaces = getDeclarationSpaces(d); - const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 1 /* Export */ | 1024 /* Default */); - if (effectiveDeclarationFlags & 1 /* Export */) { - if (effectiveDeclarationFlags & 1024 /* Default */) { + const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 32 /* Export */ | 2048 /* Default */); + if (effectiveDeclarationFlags & 32 /* Export */) { + if (effectiveDeclarationFlags & 2048 /* Default */) { defaultExportedDeclarationSpaces |= declarationSpaces; } else { exportedDeclarationSpaces |= declarationSpaces; @@ -76183,12 +76798,7 @@ function createTypeChecker(host) { const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); const collidingSymbol = getSymbol(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { - error( - collidingSymbol.valueDeclaration, - Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, - idText(rootName), - entityNameToString(promiseConstructorName) - ); + error(collidingSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, idText(rootName), entityNameToString(promiseConstructorName)); return; } } @@ -76507,6 +77117,12 @@ function createTypeChecker(host) { } } } + function checkJSDocThisTag(node) { + const host2 = getEffectiveJSDocHost(node); + if (host2 && isArrowFunction(host2)) { + error(node.tagName, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); + } + } function checkJSDocImplementsTag(node) { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { @@ -76669,13 +77285,13 @@ function createTypeChecker(host) { break; } const symbol = getSymbolOfDeclaration(member); - if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { + if (!symbol.isReferenced && (hasEffectiveModifier(member, 2 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; case 176 /* Constructor */: for (const parameter of member.parameters) { - if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { + if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 2 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } @@ -76791,7 +77407,11 @@ function createTypeChecker(host) { const importDecl = importClause.parent; const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { - addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); + addDiagnostic( + importDecl, + 0 /* Local */, + unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused) + ); } else { for (const unused of unuseds) errorUnusedLocal(unused, idText(unused.name), addDiagnostic); @@ -76803,7 +77423,11 @@ function createTypeChecker(host) { if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { - addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); + addDiagnostic( + bindingPattern, + kind, + bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused) + ); } } else { for (const e of bindingElements) { @@ -76813,7 +77437,11 @@ function createTypeChecker(host) { }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic( + declarationList, + 0 /* Local */, + declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused) + ); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -76941,13 +77569,7 @@ function createTypeChecker(host) { } const parent = getDeclarationContainer(node); if (parent.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent)) { - errorSkippedOn( - "noEmit", - name, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, - declarationNameToString(name), - declarationNameToString(name) - ); + errorSkippedOn("noEmit", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, declarationNameToString(name), declarationNameToString(name)); } } function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) { @@ -76959,13 +77581,7 @@ function createTypeChecker(host) { } const parent = getDeclarationContainer(node); if (parent.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent) && parent.flags & 4096 /* HasAsyncFunctions */) { - errorSkippedOn( - "noEmit", - name, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, - declarationNameToString(name), - declarationNameToString(name) - ); + errorSkippedOn("noEmit", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, declarationNameToString(name), declarationNameToString(name)); } } function recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name) { @@ -77006,13 +77622,7 @@ function createTypeChecker(host) { } if (hasCollision) { Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name), "The target of a Reflect collision check should be an identifier"); - errorSkippedOn( - "noEmit", - node, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, - declarationNameToString(node.name), - "Reflect" - ); + errorSkippedOn("noEmit", node, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, declarationNameToString(node.name), "Reflect"); } } function checkCollisionsForDeclarationName(node, name) { @@ -77093,7 +77703,7 @@ function createTypeChecker(host) { checkComputedPropertyName(node.propertyName); } const parent = node.parent.parent; - const parentCheckMode = node.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */; + const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */; const parentType = getTypeForBindingElementParent(parent, parentCheckMode); const name = node.propertyName || node.name; if (parentType && !isBindingPattern(name)) { @@ -77127,7 +77737,7 @@ function createTypeChecker(host) { } forEach(node.name.elements, checkSourceElement); } - if (isParameter(node) && node.initializer && nodeIsMissing(getContainingFunction(node).body)) { + if (node.initializer && isParameterDeclaration(node) && nodeIsMissing(getContainingFunction(node).body)) { error(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } @@ -77247,10 +77857,7 @@ function createTypeChecker(host) { typeToString(nextType) ); if (firstDeclaration) { - addRelatedInfo( - err, - createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName) - ); + addRelatedInfo(err, createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName)); } } function areDeclarationFlagsIdentical(left, right) { @@ -77260,7 +77867,7 @@ function createTypeChecker(host) { if (hasQuestionToken(left) !== hasQuestionToken(right)) { return false; } - const interestingFlags = 8 /* Private */ | 16 /* Protected */ | 512 /* Async */ | 256 /* Abstract */ | 64 /* Readonly */ | 32 /* Static */; + const interestingFlags = 2 /* Private */ | 4 /* Protected */ | 1024 /* Async */ | 64 /* Abstract */ | 8 /* Readonly */ | 256 /* Static */; return getSelectedEffectiveModifierFlags(left, interestingFlags) === getSelectedEffectiveModifierFlags(right, interestingFlags); } function checkVariableDeclaration(node) { @@ -77323,7 +77930,7 @@ function createTypeChecker(host) { } const type = location === condExpr2 ? condType : checkTruthinessExpression(location); const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression); - if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast) + if (!hasTypeFacts(type, 4194304 /* Truthy */) || isPropertyExpressionCast) return; const callSignatures = getSignaturesOfType(type, 0 /* Call */); const isPromise = !!getAwaitedTypeOfPromise(type); @@ -77887,13 +78494,10 @@ function createTypeChecker(host) { !!getAwaitedTypeOfPromise(type) || !allowAsyncIterables && isForOfStatement(errorNode.parent) && errorNode.parent.expression === errorNode && getGlobalAsyncIterableType( /*reportErrors*/ false - ) !== emptyGenericType && isTypeAssignableTo( - type, - getGlobalAsyncIterableType( - /*reportErrors*/ - false - ) - ) + ) !== emptyGenericType && isTypeAssignableTo(type, getGlobalAsyncIterableType( + /*reportErrors*/ + false + )) ); return errorAndMaybeSuggestAwait(errorNode, suggestAwait, message, typeToString(type)); } @@ -78350,14 +78954,7 @@ function createTypeChecker(host) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; const errorNode = localPropDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); if (errorNode && !isTypeAssignableTo(propType, info.type)) { - const diagnostic = createError( - errorNode, - Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, - symbolToString(prop), - typeToString(propType), - typeToString(info.keyType), - typeToString(info.type) - ); + const diagnostic = createError(errorNode, Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type)); if (propDeclaration && errorNode !== propDeclaration) { addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here, symbolToString(prop))); } @@ -78376,14 +78973,7 @@ function createTypeChecker(host) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; const errorNode = localCheckDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getIndexInfoOfType(base, checkInfo.keyType) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); if (errorNode && !isTypeAssignableTo(checkInfo.type, info.type)) { - error( - errorNode, - Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, - typeToString(checkInfo.keyType), - typeToString(checkInfo.type), - typeToString(info.keyType), - typeToString(info.type) - ); + error(errorNode, Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), typeToString(checkInfo.type), typeToString(info.keyType), typeToString(info.type)); } } } @@ -78605,7 +79195,7 @@ function createTypeChecker(host) { if (legacyDecorators && firstDecorator && some(node.members, (p) => hasStaticModifier(p) && isPrivateIdentifierClassElementDeclaration(p))) { grammarErrorOnNode(firstDecorator, Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator); } - if (!node.name && !hasSyntacticModifier(node, 1024 /* Default */)) { + if (!node.name && !hasSyntacticModifier(node, 2048 /* Default */)) { grammarErrorOnFirstToken(node, Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name); } checkClassLikeDeclaration(node); @@ -78664,19 +79254,14 @@ function createTypeChecker(host) { )) { issueMemberSpecificError(node, typeWithThis, baseWithThis, Diagnostics.Class_0_incorrectly_extends_base_class_1); } else { - checkTypeAssignableTo( - staticType, - getTypeWithoutSignatures(staticBaseType), - node.name || node, - Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1 - ); + checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); } if (baseConstructorType.flags & 8650752 /* TypeVariable */) { if (!isMixinConstructorType(staticType)) { error(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); } else { const constructSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); - if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 256 /* Abstract */)) { + if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 64 /* Abstract */)) { error(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); } } @@ -78890,7 +79475,7 @@ function createTypeChecker(host) { const signatures = getSignaturesOfType(type, 1 /* Construct */); if (signatures.length) { const declaration = signatures[0].declaration; - if (declaration && hasEffectiveModifier(declaration, 8 /* Private */)) { + if (declaration && hasEffectiveModifier(declaration, 2 /* Private */)) { const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); if (!isNodeWithinClass(node, typeClassDeclaration)) { error(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); @@ -78910,7 +79495,7 @@ function createTypeChecker(host) { const baseTypes = baseTypeNode && getBaseTypes(type); const baseWithThis = (baseTypes == null ? void 0 : baseTypes.length) ? getTypeWithThisArgument(first(baseTypes), type.thisType) : void 0; const baseStaticType = getBaseConstructorTypeOfClass(type); - const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16384 /* Override */); + const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16 /* Override */); return checkMemberForOverrideModifier( node, staticType, @@ -78951,7 +79536,7 @@ function createTypeChecker(host) { Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration."); if (derived === base) { const derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol); - if (baseDeclarationFlags & 256 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 256 /* Abstract */))) { + if (baseDeclarationFlags & 64 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 64 /* Abstract */))) { for (const otherBaseType of getBaseTypes(type)) { if (otherBaseType === baseType) continue; @@ -78994,7 +79579,7 @@ function createTypeChecker(host) { } } else { const derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived); - if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) { + if (baseDeclarationFlags & 2 /* Private */ || derivedDeclarationFlags & 2 /* Private */) { continue; } let errorMessage; @@ -79011,7 +79596,7 @@ function createTypeChecker(host) { error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer); - if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { + if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { @@ -79038,7 +79623,7 @@ function createTypeChecker(host) { } } function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) { - return baseDeclarationFlags & 256 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent); + return baseDeclarationFlags & 64 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent); } function getNonInheritedProperties(type, baseTypes, properties) { if (!length(baseTypes)) { @@ -79103,7 +79688,7 @@ function createTypeChecker(host) { } const constructor = findConstructorDeclaration(node); for (const member of node.members) { - if (getEffectiveModifierFlags(member) & 2 /* Ambient */) { + if (getEffectiveModifierFlags(member) & 128 /* Ambient */) { continue; } if (!isStatic(member) && isPropertyWithoutInitializer(member)) { @@ -79232,7 +79817,10 @@ function createTypeChecker(host) { const value = evaluate(initializer, member); if (value !== void 0) { if (isConstEnum && typeof value === "number" && !isFinite(value)) { - error(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); + error( + initializer, + isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value + ); } } else if (isConstEnum) { error(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); @@ -79332,7 +79920,7 @@ function createTypeChecker(host) { } if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; - if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { + if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { return evaluate(declaration.initializer, declaration); } } @@ -79599,7 +80187,10 @@ function createTypeChecker(host) { } const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + error( + moduleName, + node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module + ); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -79608,12 +80199,13 @@ function createTypeChecker(host) { return false; } } - if (!isImportEqualsDeclaration(node) && node.assertClause) { + if (!isImportEqualsDeclaration(node) && node.attributes) { + const diagnostic = node.attributes.token === 118 /* WithKeyword */ ? Diagnostics.Import_attribute_values_must_be_string_literal_expressions : Diagnostics.Import_assertion_values_must_be_string_literal_expressions; let hasError = false; - for (const clause of node.assertClause.elements) { - if (!isStringLiteral(clause.value)) { + for (const attr of node.attributes.elements) { + if (!isStringLiteral(attr.value)) { hasError = true; - error(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); + error(attr.value, diagnostic); } } return !hasError; @@ -79635,11 +80227,14 @@ function createTypeChecker(host) { if (alreadyExportedSymbol === target) { const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode); if (exportingDeclaration) { - addRelatedInfo(diag2, createDiagnosticForNode( - exportingDeclaration, - Diagnostics._0_is_automatically_exported_here, - unescapeLeadingUnderscores(alreadyExportedSymbol.escapedName) - )); + addRelatedInfo( + diag2, + createDiagnosticForNode( + exportingDeclaration, + Diagnostics._0_is_automatically_exported_here, + unescapeLeadingUnderscores(alreadyExportedSymbol.escapedName) + ) + ); } } } else { @@ -79680,7 +80275,7 @@ function createTypeChecker(host) { name ); } - if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 32 /* Export */)) { error(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; @@ -79742,32 +80337,26 @@ function createTypeChecker(host) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } - function checkAssertClause(declaration) { + function checkImportAttributes(declaration) { var _a; - if (declaration.assertClause) { - const validForTypeAssertions = isExclusivelyTypeOnlyImportOrExport(declaration); - const override = getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : void 0); - if (validForTypeAssertions && override) { - if (!isNightly()) { - grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next); - } - if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext); - } + const node = declaration.attributes; + if (node) { + const validForTypeAttributes = isExclusivelyTypeOnlyImportOrExport(declaration); + const override = getResolutionModeOverride(node, validForTypeAttributes ? grammarErrorOnNode : void 0); + const isImportAttributes2 = declaration.attributes.token === 118 /* WithKeyword */; + if (validForTypeAttributes && override) { return; } const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier); if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */) { - return grammarErrorOnNode( - declaration.assertClause, - moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext - ); + const message = isImportAttributes2 ? moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext : moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext; + return grammarErrorOnNode(node, message); } if (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); + return grammarErrorOnNode(node, isImportAttributes2 ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); } if (override) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports); + return grammarErrorOnNode(node, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports); } } } @@ -79799,7 +80388,7 @@ function createTypeChecker(host) { } } } - checkAssertClause(node); + checkImportAttributes(node); } function checkImportEqualsDeclaration(node) { if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { @@ -79808,7 +80397,7 @@ function createTypeChecker(host) { checkGrammarModifiers(node); if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { markExportAsReferenced(node); } if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { @@ -79872,7 +80461,7 @@ function createTypeChecker(host) { } } } - checkAssertClause(node); + checkImportAttributes(node); } function checkGrammarExportDeclaration(node) { var _a; @@ -80220,6 +80809,8 @@ function createTypeChecker(host) { return checkJSDocAccessibilityModifiers(node); case 357 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); + case 350 /* JSDocThisTag */: + return checkJSDocThisTag(node); case 199 /* IndexedAccessType */: return checkIndexedAccessType(node); case 200 /* MappedType */: @@ -80306,9 +80897,14 @@ function createTypeChecker(host) { const diagnostic = node.postfix ? Diagnostics._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1 : Diagnostics._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1; const typeNode = node.type; const type = getTypeFromTypeNode(typeNode); - grammarErrorOnNode(node, diagnostic, token, typeToString( - isJSDocNullableType(node) && !(type === neverType || type === voidType) ? getUnionType(append([type, undefinedType], node.postfix ? void 0 : nullType)) : type - )); + grammarErrorOnNode( + node, + diagnostic, + token, + typeToString( + isJSDocNullableType(node) && !(type === neverType || type === voidType) ? getUnionType(append([type, undefinedType], node.postfix ? void 0 : nullType)) : type + ) + ); } else { grammarErrorOnNode(node, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); } @@ -80418,6 +81014,15 @@ function createTypeChecker(host) { case 234 /* AsExpression */: case 217 /* ParenthesizedExpression */: checkAssertionDeferred(node); + break; + case 222 /* VoidExpression */: + checkExpression(node.expression); + break; + case 226 /* BinaryExpression */: + if (isInstanceOfExpression(node)) { + resolveUntypedCall(node); + } + break; } currentNode = saveCurrentNode; (_b = tracing) == null ? void 0 : _b.pop(); @@ -80854,31 +81459,7 @@ function createTypeChecker(host) { if (name.kind === 211 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { - const expressionType = checkExpressionCached(name.expression); - const infos = getApplicableIndexInfos(expressionType, getLiteralTypeFromPropertyName(name.name)); - if (infos.length && expressionType.members) { - const resolved = resolveStructuredTypeMembers(expressionType); - const symbol = resolved.members.get("__index" /* Index */); - if (infos === getIndexInfosOfType(expressionType)) { - links.resolvedSymbol = symbol; - } else if (symbol) { - const symbolLinks2 = getSymbolLinks(symbol); - const declarationList = mapDefined(infos, (i) => i.declaration); - const nodeListId = map(declarationList, getNodeId).join(","); - if (!symbolLinks2.filteredIndexSymbolCache) { - symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map(); - } - if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) { - links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId); - } else { - const copy = createSymbol(131072 /* Signature */, "__index" /* Index */); - copy.declarations = mapDefined(infos, (i) => i.declaration); - copy.parent = expressionType.aliasSymbol ? expressionType.aliasSymbol : expressionType.symbol ? expressionType.symbol : getSymbolAtLocation(copy.declarations[0].parent); - symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy); - links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId); - } - } - } + links.resolvedSymbol = getApplicableIndexSymbol(checkExpressionCached(name.expression), getLiteralTypeFromPropertyName(name.name)); } } else { checkQualifiedName(name, 0 /* Normal */); @@ -80911,6 +81492,31 @@ function createTypeChecker(host) { } return void 0; } + function getApplicableIndexSymbol(type, keyType) { + const infos = getApplicableIndexInfos(type, keyType); + if (infos.length && type.members) { + const symbol = getIndexSymbolFromSymbolTable(resolveStructuredTypeMembers(type).members); + if (infos === getIndexInfosOfType(type)) { + return symbol; + } else if (symbol) { + const symbolLinks2 = getSymbolLinks(symbol); + const declarationList = mapDefined(infos, (i) => i.declaration); + const nodeListId = map(declarationList, getNodeId).join(","); + if (!symbolLinks2.filteredIndexSymbolCache) { + symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map(); + } + if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) { + return symbolLinks2.filteredIndexSymbolCache.get(nodeListId); + } else { + const copy = createSymbol(131072 /* Signature */, "__index" /* Index */); + copy.declarations = mapDefined(infos, (i) => i.declaration); + copy.parent = type.aliasSymbol ? type.aliasSymbol : type.symbol ? type.symbol : getSymbolAtLocation(copy.declarations[0].parent); + symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy); + return copy; + } + } + } + } function resolveJSDocMemberName(name, ignoreErrors, container) { if (isEntityName(name)) { const meaning = 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */; @@ -81033,6 +81639,13 @@ function createTypeChecker(host) { case 102 /* ImportKeyword */: case 105 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; + case 104 /* InstanceOfKeyword */: + if (isBinaryExpression(node.parent)) { + const type = getTypeOfExpression(node.parent.right); + const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(type); + return (hasInstanceMethodType == null ? void 0 : hasInstanceMethodType.symbol) ?? type.symbol; + } + return void 0; case 236 /* MetaProperty */: return checkExpression(node).symbol; case 295 /* JsxNamespacedName */: @@ -81403,7 +82016,7 @@ function createTypeChecker(host) { } const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol)); if (target === unknownSymbol) { - return true; + return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol); } return !!(getSymbolFlags( symbol, @@ -81424,7 +82037,7 @@ function createTypeChecker(host) { return true; } const target = getSymbolLinks(symbol).aliasTarget; - if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { + if (target && getEffectiveModifierFlags(node) & 32 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { return true; } } @@ -81449,10 +82062,10 @@ function createTypeChecker(host) { return false; } function isRequiredInitializedParameter(parameter) { - return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */); + return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */); } function isOptionalUninitializedParameterProperty(parameter) { - return strictNullChecks && isOptionalParameter(parameter) && !parameter.initializer && hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */); + return strictNullChecks && isOptionalParameter(parameter) && !parameter.initializer && hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */); } function isExpandoFunctionDeclaration(node) { const declaration = getParseTreeNode(node, isFunctionDeclaration); @@ -81463,7 +82076,7 @@ function createTypeChecker(host) { if (!symbol || !(symbol.flags & 16 /* Function */)) { return false; } - return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && p.valueDeclaration && isPropertyAccessExpression(p.valueDeclaration)); + return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && isExpandoPropertyDeclaration(p.valueDeclaration)); } function getPropertiesOfContainerFunction(node) { const declaration = getParseTreeNode(node, isFunctionDeclaration); @@ -81873,7 +82486,16 @@ function createTypeChecker(host) { } return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker, bundled); }, - isImportRequiredByAugmentation + isImportRequiredByAugmentation, + tryFindAmbientModule: (moduleReferenceExpression) => { + const node = getParseTreeNode(moduleReferenceExpression); + const moduleSpecifier = node && isStringLiteralLike(node) ? node.text : void 0; + return moduleSpecifier !== void 0 ? tryFindAmbientModule( + moduleSpecifier, + /*withAugmentations*/ + true + ) : void 0; + } }; function isImportRequiredByAugmentation(node) { const file = getSourceFileOfNode(node); @@ -81970,11 +82592,11 @@ function createTypeChecker(host) { if (fileToDirective.has(file.path)) return; fileToDirective.set(file.path, [key, mode]); - for (const { fileName, resolutionMode } of file.referencedFiles) { + for (const { fileName } of file.referencedFiles) { const resolvedFile = resolveTripleslashReference(fileName, file.fileName); const referencedFile = host.getSourceFile(resolvedFile); if (referencedFile) { - addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat); + addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat); } } } @@ -82297,10 +82919,10 @@ function createTypeChecker(host) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); } } - if (flags & ~(1025 /* ExportDefault */ | 131072 /* Decorator */)) { + if (flags & ~(2080 /* ExportDefault */ | 32768 /* Decorator */)) { return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here); } - if (hasLeadingDecorators && flags & 126975 /* Modifier */) { + if (hasLeadingDecorators && flags & 98303 /* Modifier */) { Debug.assertIsDefined(firstDecorator); const sourceFile = getSourceFileOfNode(modifier); if (!hasParseDiagnostics(sourceFile)) { @@ -82312,10 +82934,10 @@ function createTypeChecker(host) { } return false; } - flags |= 131072 /* Decorator */; - if (!(flags & 126975 /* Modifier */)) { + flags |= 32768 /* Decorator */; + if (!(flags & 98303 /* Modifier */)) { hasLeadingDecorators = true; - } else if (flags & 1 /* Export */) { + } else if (flags & 32 /* Export */) { sawExportBeforeDecorators = true; } firstDecorator ?? (firstDecorator = modifier); @@ -82344,39 +82966,39 @@ function createTypeChecker(host) { } break; case 164 /* OverrideKeyword */: - if (flags & 16384 /* Override */) { + if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); - } else if (flags & 2 /* Ambient */) { + } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "override", "declare"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "readonly"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "accessor"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "async"); } - flags |= 16384 /* Override */; + flags |= 16 /* Override */; lastOverride = modifier; break; case 125 /* PublicKeyword */: case 124 /* ProtectedKeyword */: case 123 /* PrivateKeyword */: const text = visibilityToString(modifierToFlag(modifier.kind)); - if (flags & 28 /* AccessibilityModifier */) { + if (flags & 7 /* AccessibilityModifier */) { return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen); - } else if (flags & 16384 /* Override */) { + } else if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "override"); - } else if (flags & 32 /* Static */) { + } else if (flags & 256 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "accessor"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); - } else if (flags & 256 /* Abstract */) { + } else if (flags & 64 /* Abstract */) { if (modifier.kind === 123 /* PrivateKeyword */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { @@ -82388,60 +83010,60 @@ function createTypeChecker(host) { flags |= modifierToFlag(modifier.kind); break; case 126 /* StaticKeyword */: - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "readonly"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); - } else if (flags & 256 /* Abstract */) { + } else if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); - } else if (flags & 16384 /* Override */) { + } else if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "override"); } - flags |= 32 /* Static */; + flags |= 256 /* Static */; lastStatic = modifier; break; case 129 /* AccessorKeyword */: - if (flags & 128 /* Accessor */) { + if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "accessor"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); - } else if (flags & 2 /* Ambient */) { + } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } - flags |= 128 /* Accessor */; + flags |= 512 /* Accessor */; break; case 148 /* ReadonlyKeyword */: - if (flags & 64 /* Readonly */) { + if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); } - flags |= 64 /* Readonly */; + flags |= 8 /* Readonly */; break; case 95 /* ExportKeyword */: if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } - if (flags & 1 /* Export */) { + if (flags & 32 /* Export */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "export"); - } else if (flags & 2 /* Ambient */) { + } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare"); - } else if (flags & 256 /* Abstract */) { + } else if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "abstract"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); @@ -82452,7 +83074,7 @@ function createTypeChecker(host) { } else if (blockScopeKind === 6 /* AwaitUsing */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); } - flags |= 1 /* Export */; + flags |= 32 /* Export */; break; case 90 /* DefaultKeyword */: const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; @@ -82462,19 +83084,19 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); } else if (blockScopeKind === 6 /* AwaitUsing */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); - } else if (!(flags & 1 /* Export */)) { + } else if (!(flags & 32 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); } else if (sawExportBeforeDecorators) { return grammarErrorOnNode(firstDecorator, Diagnostics.Decorators_are_not_valid_here); } - flags |= 1024 /* Default */; + flags |= 2048 /* Default */; break; case 138 /* DeclareKeyword */: - if (flags & 2 /* Ambient */) { + if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (flags & 16384 /* Override */) { + } else if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); @@ -82488,62 +83110,62 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "declare", "accessor"); } - flags |= 2 /* Ambient */; + flags |= 128 /* Ambient */; lastDeclare = modifier; break; case 128 /* AbstractKeyword */: - if (flags & 256 /* Abstract */) { + if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 64 /* Abstract */))) { const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; return grammarErrorOnNode(modifier, message); } - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); } - if (flags & 8 /* Private */) { + if (flags & 2 /* Private */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract"); } - if (flags & 512 /* Async */ && lastAsync) { + if (flags & 1024 /* Async */ && lastAsync) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); } - if (flags & 16384 /* Override */) { + if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "override"); } - if (flags & 128 /* Accessor */) { + if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "accessor"); } } if (isNamedDeclaration(node) && node.name.kind === 81 /* PrivateIdentifier */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); } - flags |= 256 /* Abstract */; + flags |= 64 /* Abstract */; break; case 134 /* AsyncKeyword */: - if (flags & 512 /* Async */) { + if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); - } else if (flags & 2 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { + } else if (flags & 128 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } - if (flags & 256 /* Abstract */) { + if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); } - flags |= 512 /* Async */; + flags |= 1024 /* Async */; lastAsync = modifier; break; case 103 /* InKeyword */: case 147 /* OutKeyword */: - const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; + const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 8192 /* In */ : 16384 /* Out */; const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out"; if (node.kind !== 168 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); @@ -82551,7 +83173,7 @@ function createTypeChecker(host) { if (flags & inOutFlag) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, inOutText); } - if (inOutFlag & 32768 /* In */ && flags & 65536 /* Out */) { + if (inOutFlag & 8192 /* In */ && flags & 16384 /* Out */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "in", "out"); } flags |= inOutFlag; @@ -82560,24 +83182,24 @@ function createTypeChecker(host) { } } if (node.kind === 176 /* Constructor */) { - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } - if (flags & 16384 /* Override */) { + if (flags & 16 /* Override */) { return grammarErrorOnNode(lastOverride, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "override"); } - if (flags & 512 /* Async */) { + if (flags & 1024 /* Async */) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 128 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } - if (flags & 512 /* Async */) { + if (flags & 1024 /* Async */) { return checkGrammarAsyncModifier(node, lastAsync); } return false; @@ -83021,10 +83643,7 @@ function createTypeChecker(host) { if (isInTopLevelContext(forInOrOfStatement)) { if (!hasParseDiagnostics(sourceFile)) { if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { - diagnostics.add(createDiagnosticForNode( - forInOrOfStatement.awaitModifier, - Diagnostics.for_await_loops_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 - )); + diagnostics.add(createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_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)); } switch (moduleKind) { case 100 /* Node16 */: @@ -83043,10 +83662,7 @@ function createTypeChecker(host) { } default: diagnostics.add( - createDiagnosticForNode( - forInOrOfStatement.awaitModifier, - Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher - ) + createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher) ); break; } @@ -83103,12 +83719,12 @@ function createTypeChecker(host) { if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(accessor.name)) { return grammarErrorOnNode(accessor.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); } - if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 256 /* Abstract */)) { + if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 64 /* Abstract */)) { return grammarErrorAtPos(accessor, accessor.end - 1, ";".length, Diagnostics._0_expected, "{"); } } if (accessor.body) { - if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { + if (hasSyntacticModifier(accessor, 64 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) { @@ -83180,7 +83796,7 @@ function createTypeChecker(host) { } break; case 171 /* PropertySignature */: - if (!hasSyntacticModifier(parent, 64 /* Readonly */)) { + if (!hasSyntacticModifier(parent, 8 /* Readonly */)) { return grammarErrorOnNode(parent.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } break; @@ -83350,7 +83966,7 @@ function createTypeChecker(host) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } - if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { + if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 32 /* Export */)) { checkESModuleMarker(node.name); } return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); @@ -83540,7 +84156,7 @@ function createTypeChecker(host) { } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 128 /* Ambient */ | 32 /* Export */ | 2048 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); @@ -83575,7 +84191,7 @@ function createTypeChecker(host) { return false; } function checkGrammarNumericLiteral(node) { - const isFractional = getTextOfNode(node).indexOf(".") !== -1; + const isFractional = getTextOfNode(node).includes("."); const isScientific = node.numericLiteralFlags & 16 /* Scientific */; if (isFractional || isScientific) { return; @@ -83662,12 +84278,12 @@ function createTypeChecker(host) { if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */) { checkGrammarForDisallowedTrailingComma(nodeArguments); if (nodeArguments.length > 1) { - const assertionArgument = nodeArguments[1]; - return grammarErrorOnNode(assertionArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); + const importAttributesArgument = nodeArguments[1]; + return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); } } if (nodeArguments.length === 0 || nodeArguments.length > 2) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments); + return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments); } const spreadElement = find(nodeArguments, isSpreadElement); if (spreadElement) { @@ -83755,7 +84371,7 @@ function createTypeChecker(host) { } function getEffectivePropertyNameForPropertyNameNode(node) { const name = getPropertyNameForPropertyNameNode(node); - return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0; + return name ? name : isComputedPropertyName(node) ? tryGetNameFromType(getTypeOfExpression(node.expression)) : void 0; } function getCombinedModifierFlagsCached(node) { if (lastGetCombinedModifierFlagsNode === node) { @@ -83855,12 +84471,14 @@ var SymbolTrackerImpl = class _SymbolTrackerImpl { this.canTrackSymbol = !!((_a = this.inner) == null ? void 0 : _a.trackSymbol); } trackSymbol(symbol, enclosingDeclaration, meaning) { - var _a; + var _a, _b; if (((_a = this.inner) == null ? void 0 : _a.trackSymbol) && !this.disableTrackSymbol) { if (this.inner.trackSymbol(symbol, enclosingDeclaration, meaning)) { this.onDiagnosticReported(); return true; } + if (!(symbol.flags & 262144 /* TypeParameter */)) + ((_b = this.context).trackedSymbols ?? (_b.trackedSymbols = [])).push([symbol, enclosingDeclaration, meaning]); } return false; } @@ -83934,13 +84552,6 @@ var SymbolTrackerImpl = class _SymbolTrackerImpl { this.inner.reportNonSerializableProperty(propertyName); } } - reportImportTypeNodeResolutionModeOverride() { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportImportTypeNodeResolutionModeOverride) { - this.onDiagnosticReported(); - this.inner.reportImportTypeNodeResolutionModeOverride(); - } - } onDiagnosticReported() { this.context.reportedDiagnostic = true; } @@ -84449,7 +85060,7 @@ var visitEachChildTable = { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), - nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer), + nodeVisitor(node.attributes, visitor, isImportAttributes), nodeVisitor(node.qualifier, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode), node.isTypeOf @@ -85000,20 +85611,20 @@ var visitEachChildTable = { nodesVisitor(node.modifiers, visitor, isModifierLike), nodeVisitor(node.importClause, visitor, isImportClause), Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)), - nodeVisitor(node.assertClause, visitor, isAssertClause) + nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, - [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertClause( + [300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + return context.factory.updateImportAttributes( node, - nodesVisitor(node.elements, visitor, isAssertEntry), + nodesVisitor(node.elements, visitor, isImportAttribute), node.multiLine ); }, - [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertEntry( + [301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateImportAttribute( node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, @@ -85065,7 +85676,7 @@ var visitEachChildTable = { node.isTypeOnly, nodeVisitor(node.exportClause, visitor, isNamedExportBindings), nodeVisitor(node.moduleSpecifier, visitor, isExpression), - nodeVisitor(node.assertClause, visitor, isAssertClause) + nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { @@ -85752,15 +86363,15 @@ function collectExternalModuleInfo(context, sourceFile) { } break; case 243 /* VariableStatement */: - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings); } } break; case 262 /* FunctionDeclaration */: - if (hasSyntacticModifier(node, 1 /* Export */)) { - if (hasSyntacticModifier(node, 1024 /* Default */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { + if (hasSyntacticModifier(node, 2048 /* Default */)) { if (!hasExportDefault) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node)); hasExportDefault = true; @@ -85776,8 +86387,8 @@ function collectExternalModuleInfo(context, sourceFile) { } break; case 263 /* ClassDeclaration */: - if (hasSyntacticModifier(node, 1 /* Export */)) { - if (hasSyntacticModifier(node, 1024 /* Default */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { + if (hasSyntacticModifier(node, 2048 /* Default */)) { if (!hasExportDefault) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node)); hasExportDefault = true; @@ -86642,7 +87253,7 @@ function injectClassThisAssignmentIfMissing(factory2, node, classThis, thisExpre // src/compiler/transformers/namedEvaluation.ts function getAssignedNameOfIdentifier(factory2, name, expression) { const original = getOriginalNode(skipOuterExpressions(expression)); - if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 1024 /* Default */)) { + if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 2048 /* Default */)) { return factory2.createStringLiteral("default"); } return factory2.createStringLiteralFromNode(name); @@ -86904,10 +87515,7 @@ function createTemplateCooked(factory2, template) { function getRawLiteral(factory2, node, currentSourceFile) { let text = node.rawText; if (text === void 0) { - Debug.assertIsDefined( - currentSourceFile, - "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform." - ); + Debug.assertIsDefined(currentSourceFile, "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."); text = getSourceTextOfNodeFromSourceFile(currentSourceFile, node); const isLast = node.kind === 15 /* NoSubstitutionTemplateLiteral */ || node.kind === 18 /* TemplateTail */; text = text.substring(1, text.length - (isLast ? 1 : 2)); @@ -86955,12 +87563,15 @@ function transformTypeScript(context) { return transformSourceFile(node); } function transformBundle(node) { - return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 315 /* InputFiles */) { - return createUnparsedSourceFile(prepend, "js"); - } - return prepend; - })); + return factory2.createBundle( + node.sourceFiles.map(transformSourceFile), + mapDefined(node.prepends, (prepend) => { + if (prepend.kind === 315 /* InputFiles */) { + return createUnparsedSourceFile(prepend, "js"); + } + return prepend; + }) + ); } function transformSourceFile(node) { if (node.isDeclarationFile) { @@ -86996,13 +87607,13 @@ function transformTypeScript(context) { break; case 263 /* ClassDeclaration */: case 262 /* FunctionDeclaration */: - if (hasSyntacticModifier(node, 2 /* Ambient */)) { + if (hasSyntacticModifier(node, 128 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 2048 /* Default */)); } break; } @@ -87057,7 +87668,7 @@ function transformTypeScript(context) { function namespaceElementVisitorWorker(node) { if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) { return void 0; - } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { + } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 32 /* Export */)) { return visitTypeScript(node); } return node; @@ -87115,7 +87726,7 @@ function transformTypeScript(context) { function modifierVisitor(node) { if (isDecorator(node)) return void 0; - if (modifierToFlag(node.kind) & 117086 /* TypeScriptModifier */) { + if (modifierToFlag(node.kind) & 28895 /* TypeScriptModifier */) { return void 0; } else if (currentNamespace && node.kind === 95 /* ExportKeyword */) { return void 0; @@ -87123,7 +87734,7 @@ function transformTypeScript(context) { return node; } function visitTypeScript(node) { - if (isStatement(node) && hasSyntacticModifier(node, 2 /* Ambient */)) { + if (isStatement(node) && hasSyntacticModifier(node, 128 /* Ambient */)) { return factory2.createNotEmittedStatement(node); } switch (node.kind) { @@ -87613,7 +88224,7 @@ function transformTypeScript(context) { return !nodeIsMissing(node.body); } function visitPropertyDeclaration(node, parent) { - const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); + const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 64 /* Abstract */); if (isAmbient && !(legacyDecorators && hasDecorators(node))) { return void 0; } @@ -87622,7 +88233,7 @@ function transformTypeScript(context) { if (isAmbient) { return factory2.updatePropertyDeclaration( node, - concatenate(modifiers, factory2.createModifiersFromModifierFlags(2 /* Ambient */)), + concatenate(modifiers, factory2.createModifiersFromModifierFlags(128 /* Ambient */)), Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), /*questionOrExclamationToken*/ void 0, @@ -87785,7 +88396,7 @@ function transformTypeScript(context) { ); } function shouldEmitAccessorDeclaration(node) { - return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 256 /* Abstract */)); + return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 64 /* Abstract */)); } function visitGetAccessor(node, parent) { if (!(node.transformFlags & 1 /* ContainsTypeScript */)) { @@ -88384,7 +88995,7 @@ function transformTypeScript(context) { void 0, importClause, node.moduleSpecifier, - node.assertClause + node.attributes ) : void 0; } function visitImportClause(node) { @@ -88434,7 +89045,7 @@ function transformTypeScript(context) { node.isTypeOnly, exportClause, node.moduleSpecifier, - node.assertClause + node.attributes ) : void 0; } function visitNamedExports(node, allowEmpty) { @@ -88468,7 +89079,7 @@ function transformTypeScript(context) { /*importClause*/ void 0, node.moduleReference.expression, - /*assertClause*/ + /*attributes*/ void 0 ), node @@ -88518,16 +89129,16 @@ function transformTypeScript(context) { } } function isExportOfNamespace(node) { - return currentNamespace !== void 0 && hasSyntacticModifier(node, 1 /* Export */); + return currentNamespace !== void 0 && hasSyntacticModifier(node, 32 /* Export */); } function isExternalModuleExport(node) { - return currentNamespace === void 0 && hasSyntacticModifier(node, 1 /* Export */); + return currentNamespace === void 0 && hasSyntacticModifier(node, 32 /* Export */); } function isNamedExternalModuleExport(node) { - return isExternalModuleExport(node) && !hasSyntacticModifier(node, 1024 /* Default */); + return isExternalModuleExport(node) && !hasSyntacticModifier(node, 2048 /* Default */); } function isDefaultExternalModuleExport(node) { - return isExternalModuleExport(node) && hasSyntacticModifier(node, 1024 /* Default */); + return isExternalModuleExport(node) && hasSyntacticModifier(node, 2048 /* Default */); } function createExportMemberAssignmentStatement(node) { const expression = factory2.createAssignment( @@ -89860,8 +90471,8 @@ function transformClassFields(context) { getClassLexicalEnvironment().classThis = node.emitNode.classThis; } const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */; - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExport = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause); const { members, prologue } = transformClassMembers(node); @@ -90407,7 +91018,7 @@ function transformClassFields(context) { return void 0; } const propertyOriginalNode = getOriginalNode(property); - if (hasSyntacticModifier(propertyOriginalNode, 256 /* Abstract */)) { + if (hasSyntacticModifier(propertyOriginalNode, 64 /* Abstract */)) { return void 0; } let initializer = visitNode(property.initializer, visitor, isExpression); @@ -91408,16 +92019,19 @@ function transformLegacyDecorators(context) { true ); if (hasClassElementWithDecoratorContainingPrivateIdentifierInExpression(node)) { - members = setTextRange(factory2.createNodeArray([ - ...members, - factory2.createClassStaticBlockDeclaration( - factory2.createBlock( - decorationStatements, - /*multiLine*/ - true + members = setTextRange( + factory2.createNodeArray([ + ...members, + factory2.createClassStaticBlockDeclaration( + factory2.createBlock( + decorationStatements, + /*multiLine*/ + true + ) ) - ) - ]), members); + ]), + members + ); decorationStatements = void 0; } return { decorationStatements, members }; @@ -91440,8 +92054,8 @@ function transformLegacyDecorators(context) { return addRange([updated], decorationStatements); } function transformClassDeclarationWithClassDecorators(node, name) { - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExport = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); const modifiers = visitNodes2(node.modifiers, (node2) => isExportOrDefaultModifier(node2) || isDecorator(node2) ? void 0 : node2, isModifierLike); const location = moveRangePastModifiers(node); const classAlias = getClassAliasIfNeeded(node); @@ -91462,18 +92076,21 @@ function transformLegacyDecorators(context) { let members = visitNodes2(node.members, visitor, isClassElement); let decorationStatements = []; ({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members)); - const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 32 /* Static */) || isClassStaticBlockDeclaration(member)); + const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 256 /* Static */) || isClassStaticBlockDeclaration(member)); if (assignClassAliasInStaticBlock) { - members = setTextRange(factory2.createNodeArray([ - factory2.createClassStaticBlockDeclaration( - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createAssignment(classAlias, factory2.createThis()) - ) - ]) - ), - ...members - ]), members); + members = setTextRange( + factory2.createNodeArray([ + factory2.createClassStaticBlockDeclaration( + factory2.createBlock([ + factory2.createExpressionStatement( + factory2.createAssignment(classAlias, factory2.createThis()) + ) + ]) + ), + ...members + ]), + members + ); } const classExpression = factory2.createClassExpression( modifiers, @@ -91545,55 +92162,67 @@ function transformLegacyDecorators(context) { return updated; } function visitMethodDeclaration(node) { - return finishClassElement(factory2.updateMethodDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - node.asteriskToken, - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitNode(node.body, visitor, isBlock) - ), node); + return finishClassElement( + factory2.updateMethodDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + node.asteriskToken, + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + visitNodes2(node.parameters, visitor, isParameter), + /*type*/ + void 0, + visitNode(node.body, visitor, isBlock) + ), + node + ); } function visitGetAccessorDeclaration(node) { - return finishClassElement(factory2.updateGetAccessorDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitNode(node.body, visitor, isBlock) - ), node); + return finishClassElement( + factory2.updateGetAccessorDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + visitNodes2(node.parameters, visitor, isParameter), + /*type*/ + void 0, + visitNode(node.body, visitor, isBlock) + ), + node + ); } function visitSetAccessorDeclaration(node) { - return finishClassElement(factory2.updateSetAccessorDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock) - ), node); + return finishClassElement( + factory2.updateSetAccessorDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + visitNodes2(node.parameters, visitor, isParameter), + visitNode(node.body, visitor, isBlock) + ), + node + ); } function visitPropertyDeclaration(node) { - if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { + if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 128 /* Ambient */)) { return void 0; } - return finishClassElement(factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ), node); + return finishClassElement( + factory2.updatePropertyDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + visitNode(node.initializer, visitor, isExpression) + ), + node + ); } function visitParameterDeclaration(node) { const updated = factory2.updateParameterDeclaration( @@ -91666,7 +92295,7 @@ function transformLegacyDecorators(context) { const memberName = getExpressionForPropertyName( member, /*generateNameForComputedPropertyName*/ - !hasSyntacticModifier(member, 2 /* Ambient */) + !hasSyntacticModifier(member, 128 /* Ambient */) ); const descriptor = languageVersion > 0 /* ES3 */ ? isPropertyDeclaration(member) && !hasAccessorModifier(member) ? factory2.createVoidZero() : factory2.createNull() : void 0; const helper = emitHelpers().createDecorateHelper( @@ -92176,7 +92805,10 @@ function transformESDecorators(context) { classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */); classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */); const needsUniqueClassThis = some(node.members, (member) => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)); - classInfo2.classThis = factory2.createUniqueName("_classThis", needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classThis = factory2.createUniqueName( + "_classThis", + needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */ + ); classDefinitionStatements.push( createLet(classInfo2.classDecoratorsName, factory2.createArrayLiteralExpression(classDecorators)), createLet(classInfo2.classDescriptorName), @@ -92446,8 +93078,8 @@ function transformESDecorators(context) { const statements = []; const originalClass = getOriginalNode(node, isClassLike) ?? node; const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExport = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); if (!node.name) { node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className); } @@ -94583,9 +95215,12 @@ function transformES2018(context) { } function visitReturnStatement(node) { if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) { - return factory2.updateReturnStatement(node, createDownlevelAwait( - node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero() - )); + return factory2.updateReturnStatement( + node, + createDownlevelAwait( + node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero() + ) + ); } return visitEachChild(node, visitor, context); } @@ -94611,7 +95246,10 @@ function transformES2018(context) { const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append( + chunkObject, + e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike) + ); } } if (chunkObject) { @@ -94650,13 +95288,16 @@ function transformES2018(context) { ); exportedVariableStatement = false; const visited = visitEachChild(node, visitor, context); - const statement = concatenate(visited.statements, taggedTemplateStringDeclarations && [ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList(taggedTemplateStringDeclarations) - ) - ]); + const statement = concatenate( + visited.statements, + taggedTemplateStringDeclarations && [ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList(taggedTemplateStringDeclarations) + ) + ] + ); const result = factory2.updateSourceFile(visited, setTextRange(factory2.createNodeArray(statement), node.statements)); exitSubtree(ancestorFacts); return result; @@ -94749,7 +95390,7 @@ function transformES2018(context) { return visitEachChild(node, visitor, context); } function visitVariableStatement(node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { const savedExportedVariableStatement = exportedVariableStatement; exportedVariableStatement = true; const visited = visitEachChild(node, visitor, context); @@ -95782,15 +96423,18 @@ function transformES2020(context) { right = factory2.createTempVariable(hoistVariableDeclaration); left = factory2.createAssignment(right, left); } - return setTextRange(factory2.createConditionalExpression( - createNotNullCondition(left, right), - /*questionToken*/ - void 0, - right, - /*colonToken*/ - void 0, - visitNode(node.right, visitor, isExpression) - ), node); + return setTextRange( + factory2.createConditionalExpression( + createNotNullCondition(left, right), + /*questionToken*/ + void 0, + right, + /*colonToken*/ + void 0, + visitNode(node.right, visitor, isExpression) + ), + node + ); } function visitDeleteExpression(node) { return isOptionalChain(skipParentheses(node.expression)) ? setOriginalNode(visitNonOptionalExpression( @@ -95944,18 +96588,21 @@ function transformESNext(context) { const envBinding = createEnvBinding(); const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements); if (exportBindings.size) { - append(topLevelStatements, factory2.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory2.createNamedExports(arrayFrom(exportBindings.values())) - )); + append( + topLevelStatements, + factory2.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory2.createNamedExports(arrayFrom(exportBindings.values())) + ) + ); } addRange(topLevelStatements, endLexicalEnvironment()); if (exportVars.length) { topLevelStatements.push(factory2.createVariableStatement( - factory2.createModifiersFromModifierFlags(1 /* Export */), + factory2.createModifiersFromModifierFlags(32 /* Export */), factory2.createVariableDeclarationList( exportVars, 1 /* Let */ @@ -96252,8 +96899,8 @@ function transformESNext(context) { if (!node.name && defaultExportBinding) { return node; } - const isExported = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExported = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); let expression = factory2.converters.convertToClassExpression(node); if (node.name) { hoistBindingIdentifier( @@ -96301,7 +96948,7 @@ function transformESNext(context) { } function hoistVariableStatement(node) { let expressions; - const isExported = hasSyntacticModifier(node, 1 /* Export */); + const isExported = hasSyntacticModifier(node, 32 /* Export */); for (const variable of node.declarationList.declarations) { hoistBindingElement(variable, isExported, variable); if (variable.initializer) { @@ -96602,7 +97249,7 @@ function transformJsx(context) { factory2.createNamedImports(arrayFrom(importSpecifiersMap.values())) ), factory2.createStringLiteral(importSource), - /*assertClause*/ + /*attributes*/ void 0 ); setParentRecursive( @@ -96714,7 +97361,9 @@ function transformJsx(context) { } } function hasProto(obj) { - return obj.properties.some((p) => isPropertyAssignment(p) && (isIdentifier(p.name) && idText(p.name) === "__proto__" || isStringLiteral(p.name) && p.name.text === "__proto__")); + return obj.properties.some( + (p) => isPropertyAssignment(p) && (isIdentifier(p.name) && idText(p.name) === "__proto__" || isStringLiteral(p.name) && p.name.text === "__proto__") + ); } function hasKeyAfterPropsSpread(node) { let spread = false; @@ -96887,7 +97536,7 @@ function transformJsx(context) { } function transformJsxSpreadAttributeToProps(node) { if (isObjectLiteralExpression(node.expression) && !hasProto(node.expression)) { - return node.expression.properties; + return sameMap(node.expression.properties, (p) => Debug.checkDefined(visitNode(p, visitor, isObjectLiteralElementLike))); } return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))); } @@ -97455,7 +98104,7 @@ function transformES2015(context) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithSuperCall */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -97465,7 +98114,7 @@ function transformES2015(context) { ) || isBlock(node)); } function shouldVisitNode(node) { - return (node.transformFlags & 1024 /* ContainsES2015 */) !== 0 || convertedLoopState !== void 0 || hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */ && isOrMayContainReturnCompletion(node) || isIterationStatement( + return (node.transformFlags & 1024 /* ContainsES2015 */) !== 0 || convertedLoopState !== void 0 || hierarchyFacts & 8192 /* ConstructorWithSuperCall */ && isOrMayContainReturnCompletion(node) || isIterationStatement( node, /*lookInLabeledStatements*/ false @@ -97498,7 +98147,7 @@ function transformES2015(context) { /*expressionResultIsUnused*/ false ); - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); return result; } return visitorWorker( @@ -97512,6 +98161,7 @@ function transformES2015(context) { function callExpressionVisitor(node) { if (node.kind === 108 /* SuperKeyword */) { return visitSuperKeyword( + node, /*isExpressionOfCall*/ true ); @@ -97621,6 +98271,7 @@ function transformES2015(context) { return visitSpreadElement(node); case 108 /* SuperKeyword */: return visitSuperKeyword( + node, /*isExpressionOfCall*/ false ); @@ -97690,7 +98341,10 @@ function transformES2015(context) { return updated; } function returnCapturedThis(node) { - return setOriginalNode(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */)), node); + return setOriginalNode(factory2.createReturnStatement(createCapturedThis()), node); + } + function createCapturedThis() { + return factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */); } function visitReturnStatement(node) { if (convertedLoopState) { @@ -97714,8 +98368,9 @@ function transformES2015(context) { return visitEachChild(node, visitor, context); } function visitThisKeyword(node) { + hierarchyFacts |= 65536 /* LexicalThis */; if (hierarchyFacts & 2 /* ArrowFunction */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) { - hierarchyFacts |= 65536 /* CapturedLexicalThis */; + hierarchyFacts |= 131072 /* CapturedLexicalThis */; } if (convertedLoopState) { if (hierarchyFacts & 2 /* ArrowFunction */) { @@ -97736,10 +98391,13 @@ function transformES2015(context) { } } if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { - return setOriginalNode(setTextRange( - factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), + return setOriginalNode( + setTextRange( + factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), + node + ), node - ), node); + ); } return node; } @@ -97822,8 +98480,8 @@ function transformES2015(context) { setTextRange(statement, node); startOnNewLine(statement); statements.push(statement); - if (hasSyntacticModifier(node, 1 /* Export */)) { - const exportStatement = hasSyntacticModifier(node, 1024 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node)); + if (hasSyntacticModifier(node, 32 /* Export */)) { + const exportStatement = hasSyntacticModifier(node, 2048 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node)); setOriginalNode(exportStatement, statement); statements.push(exportStatement); } @@ -97851,7 +98509,7 @@ function transformES2015(context) { void 0, /*dotDotDotToken*/ void 0, - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */) + createSyntheticSuper() )] : [], /*type*/ void 0, @@ -97941,7 +98599,7 @@ function transformES2015(context) { setEmitFlags(constructorFunction, 16 /* CapturesThis */); } statements.push(constructorFunction); - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; } function transformConstructorParameters(constructor, hasSynthesizedSuper) { @@ -97965,103 +98623,35 @@ function transformES2015(context) { setEmitFlags(block, 3072 /* NoComments */); return block; } - function transformConstructorBodyWorker(prologueOut, statementsOut, statementsIn, statementOffset, superPath, superPathDepth, constructor, isDerivedClass, hasSynthesizedSuper, isFirstStatement) { - let mayReplaceThis = false; - const superStatementIndex = superPathDepth < superPath.length ? superPath[superPathDepth] : -1; - const leadingStatementsEnd = superStatementIndex >= 0 ? superStatementIndex : statementsIn.length; - if (isFirstStatement && superStatementIndex >= 0) { - let firstMaterialIndex = statementOffset; - while (isFirstStatement && firstMaterialIndex < superStatementIndex) { - const statement = constructor.body.statements[firstMaterialIndex]; - if (!isUninitializedVariableStatement(statement) && !isUsingDeclarationStateVariableStatement(statement)) - break; - firstMaterialIndex++; - } - isFirstStatement = superStatementIndex === firstMaterialIndex; - } - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, leadingStatementsEnd - statementOffset)); - const superStatement = superStatementIndex >= 0 ? statementsIn[superStatementIndex] : void 0; - if (superStatement && isTryStatement(superStatement)) { - const tryBlockStatements = []; - mayReplaceThis = transformConstructorBodyWorker( - prologueOut, - tryBlockStatements, - superStatement.tryBlock.statements, - /*statementOffset*/ - 0, - superPath, - superPathDepth + 1, - constructor, - isDerivedClass, - hasSynthesizedSuper, - isFirstStatement - ); - const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); - setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); - statementsOut.push(factory2.updateTryStatement( - superStatement, - factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), - visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock) - )); - } else { - const superCall = superStatement && getSuperCallFromStatement(superStatement); - let superCallExpression; - if (hasSynthesizedSuper) { - superCallExpression = createDefaultSuperCallOrThis(); - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; - } else if (superCall) { - superCallExpression = visitSuperCallInBody(superCall); - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; - } - if (isDerivedClass || superCallExpression) { - if (superCallExpression && superStatementIndex === statementsIn.length - 1 && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { - const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); - const returnStatement = factory2.createReturnStatement(superCallExpression); - setCommentRange(returnStatement, getCommentRange(superCall2)); - setEmitFlags(superCall2, 3072 /* NoComments */); - statementsOut.push(returnStatement); - return false; - } else { - if (isFirstStatement) { - insertCaptureThisForNode(statementsOut, constructor, superCallExpression || createActualThis()); - } else { - insertCaptureThisForNode(prologueOut, constructor, createActualThis()); - if (superCallExpression) { - addSuperThisCaptureThisForNode(statementsOut, superCallExpression); - } - } - mayReplaceThis = true; - } - } else { - insertCaptureThisForNodeIfNeeded(prologueOut, constructor); - } - } - if (superStatementIndex >= 0) { - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); - } - return mayReplaceThis; - } function isUninitializedVariableStatement(node) { return isVariableStatement(node) && every(node.declarationList.declarations, (decl) => isIdentifier(decl.name) && !decl.initializer); } - function isUsingDeclarationStateVariableStatement(node) { - if (!isVariableStatement(node) || node.declarationList.declarations.length !== 1) - return false; - const varDecl = node.declarationList.declarations[0]; - if (!isIdentifier(varDecl.name) || !varDecl.initializer) - return false; - const initializer = varDecl.initializer; - if (!isObjectLiteralExpression(initializer) || initializer.properties.length !== 3) - return false; - const [stackProp, errorProp, hasErrorProp] = initializer.properties; - if (!isPropertyAssignment(stackProp) || !isIdentifier(stackProp.name) || idText(stackProp.name) !== "stack" || !isArrayLiteralExpression(stackProp.initializer)) - return false; - if (!isPropertyAssignment(errorProp) || !isIdentifier(errorProp.name) || idText(errorProp.name) !== "error" || !isVoidExpression(errorProp.initializer) || !isNumericLiteral(errorProp.initializer.expression)) - return false; - if (!isPropertyAssignment(hasErrorProp) || !isIdentifier(hasErrorProp.name) || idText(hasErrorProp.name) !== "hasError" || hasErrorProp.initializer.kind !== 97 /* FalseKeyword */) + function containsSuperCall(node) { + if (isSuperCall(node)) { + return true; + } + if (!(node.transformFlags & 134217728 /* ContainsLexicalSuper */)) { return false; - return true; + } + switch (node.kind) { + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: + return false; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { + const named = node; + if (isComputedPropertyName(named.name)) { + return !!forEachChild(named.name, containsSuperCall); + } + return false; + } + } + return !!forEachChild(node, containsSuperCall); } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */; @@ -98076,31 +98666,22 @@ function transformES2015(context) { /*statementOffset*/ 0 ); - const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, standardPrologueEnd); - if (hasSynthesizedSuper || superStatementIndices.length > 0) { - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + if (hasSynthesizedSuper || containsSuperCall(constructor.body)) { + hierarchyFacts |= 8192 /* ConstructorWithSuperCall */; } - const mayReplaceThis = transformConstructorBodyWorker( - prologue, - statements, - constructor.body.statements, - standardPrologueEnd, - superStatementIndices, - /*superPathDepth*/ - 0, - constructor, - isDerivedClass, - hasSynthesizedSuper, - /*isFirstStatement*/ - true - // NOTE: this will be recalculated inside of transformConstructorBodyWorker - ); + addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, standardPrologueEnd)); + const mayReplaceThis = isDerivedClass || hierarchyFacts & 8192 /* ConstructorWithSuperCall */; addDefaultValueAssignmentsIfNeeded2(prologue, constructor); addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); insertCaptureNewTargetIfNeeded(prologue, constructor); + if (mayReplaceThis) { + insertCaptureThisForNode(prologue, constructor, createActualThis()); + } else { + insertCaptureThisForNodeIfNeeded(prologue, constructor); + } factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) { - statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); + statements.push(factory2.createReturnStatement(createCapturedThis())); } const body = factory2.createBlock( setTextRange( @@ -98117,6 +98698,230 @@ function transformES2015(context) { true ); setTextRange(body, constructor.body); + return simplifyConstructor(body, constructor.body, hasSynthesizedSuper); + } + function isCapturedThis(node) { + return isGeneratedIdentifier(node) && idText(node) === "_this"; + } + function isSyntheticSuper(node) { + return isGeneratedIdentifier(node) && idText(node) === "_super"; + } + function isThisCapturingVariableStatement(node) { + return isVariableStatement(node) && node.declarationList.declarations.length === 1 && isThisCapturingVariableDeclaration(node.declarationList.declarations[0]); + } + function isThisCapturingVariableDeclaration(node) { + return isVariableDeclaration(node) && isCapturedThis(node.name) && !!node.initializer; + } + function isThisCapturingAssignment(node) { + return isAssignmentExpression( + node, + /*excludeCompoundAssignment*/ + true + ) && isCapturedThis(node.left); + } + function isTransformedSuperCall(node) { + return isCallExpression(node) && isPropertyAccessExpression(node.expression) && isSyntheticSuper(node.expression.expression) && isIdentifier(node.expression.name) && (idText(node.expression.name) === "call" || idText(node.expression.name) === "apply") && node.arguments.length >= 1 && node.arguments[0].kind === 110 /* ThisKeyword */; + } + function isTransformedSuperCallWithFallback(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 57 /* BarBarToken */ && node.right.kind === 110 /* ThisKeyword */ && isTransformedSuperCall(node.left); + } + function isImplicitSuperCall(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && isBinaryExpression(node.left) && node.left.operatorToken.kind === 38 /* ExclamationEqualsEqualsToken */ && isSyntheticSuper(node.left.left) && node.left.right.kind === 106 /* NullKeyword */ && isTransformedSuperCall(node.right) && idText(node.right.expression.name) === "apply"; + } + function isImplicitSuperCallWithFallback(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 57 /* BarBarToken */ && node.right.kind === 110 /* ThisKeyword */ && isImplicitSuperCall(node.left); + } + function isThisCapturingTransformedSuperCallWithFallback(node) { + return isThisCapturingAssignment(node) && isTransformedSuperCallWithFallback(node.right); + } + function isThisCapturingImplicitSuperCallWithFallback(node) { + return isThisCapturingAssignment(node) && isImplicitSuperCallWithFallback(node.right); + } + function isTransformedSuperCallLike(node) { + return isTransformedSuperCall(node) || isTransformedSuperCallWithFallback(node) || isThisCapturingTransformedSuperCallWithFallback(node) || isImplicitSuperCall(node) || isImplicitSuperCallWithFallback(node) || isThisCapturingImplicitSuperCallWithFallback(node); + } + function simplifyConstructorInlineSuperInThisCaptureVariable(body) { + for (let i = 0; i < body.statements.length - 1; i++) { + const statement = body.statements[i]; + if (!isThisCapturingVariableStatement(statement)) { + continue; + } + const varDecl = statement.declarationList.declarations[0]; + if (varDecl.initializer.kind !== 110 /* ThisKeyword */) { + continue; + } + const thisCaptureStatementIndex = i; + let superCallIndex = i + 1; + while (superCallIndex < body.statements.length) { + const statement2 = body.statements[superCallIndex]; + if (isExpressionStatement(statement2)) { + if (isTransformedSuperCallLike(skipOuterExpressions(statement2.expression))) { + break; + } + } + if (isUninitializedVariableStatement(statement2)) { + superCallIndex++; + continue; + } + return body; + } + const following = body.statements[superCallIndex]; + let expression = following.expression; + if (isThisCapturingAssignment(expression)) { + expression = expression.right; + } + const newVarDecl = factory2.updateVariableDeclaration( + varDecl, + varDecl.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + expression + ); + const newDeclList = factory2.updateVariableDeclarationList(statement.declarationList, [newVarDecl]); + const newVarStatement = factory2.createVariableStatement(statement.modifiers, newDeclList); + setOriginalNode(newVarStatement, following); + setTextRange(newVarStatement, following); + const newStatements = factory2.createNodeArray([ + ...body.statements.slice(0, thisCaptureStatementIndex), + // copy statements preceding to `var _this` + ...body.statements.slice(thisCaptureStatementIndex + 1, superCallIndex), + // copy intervening temp variables + newVarStatement, + ...body.statements.slice(superCallIndex + 1) + // copy statements following `super.call(this, ...)` + ]); + setTextRange(newStatements, body.statements); + return factory2.updateBlock(body, newStatements); + } + return body; + } + function simplifyConstructorInlineSuperReturn(body, original) { + for (const statement of original.statements) { + if (statement.transformFlags & 134217728 /* ContainsLexicalSuper */ && !getSuperCallFromStatement(statement)) { + return body; + } + } + const canElideThisCapturingVariable = !(original.transformFlags & 16384 /* ContainsLexicalThis */) && !(hierarchyFacts & 65536 /* LexicalThis */) && !(hierarchyFacts & 131072 /* CapturedLexicalThis */); + for (let i = body.statements.length - 1; i > 0; i--) { + const statement = body.statements[i]; + if (isReturnStatement(statement) && statement.expression && isCapturedThis(statement.expression)) { + const preceding = body.statements[i - 1]; + let expression; + if (isExpressionStatement(preceding) && isThisCapturingTransformedSuperCallWithFallback(skipOuterExpressions(preceding.expression))) { + expression = preceding.expression; + } else if (canElideThisCapturingVariable && isThisCapturingVariableStatement(preceding)) { + const varDecl = preceding.declarationList.declarations[0]; + if (isTransformedSuperCallLike(skipOuterExpressions(varDecl.initializer))) { + expression = factory2.createAssignment( + createCapturedThis(), + varDecl.initializer + ); + } + } + if (!expression) { + break; + } + const newReturnStatement = factory2.createReturnStatement(expression); + setOriginalNode(newReturnStatement, preceding); + setTextRange(newReturnStatement, preceding); + const newStatements = factory2.createNodeArray([ + ...body.statements.slice(0, i - 1), + // copy all statements preceding `_super.call(this, ...)` + newReturnStatement, + ...body.statements.slice(i + 1) + // copy all statements following `return _this;` + ]); + setTextRange(newStatements, body.statements); + return factory2.updateBlock(body, newStatements); + } + } + return body; + } + function elideUnusedThisCaptureWorker(node) { + if (isThisCapturingVariableStatement(node)) { + const varDecl = node.declarationList.declarations[0]; + if (varDecl.initializer.kind === 110 /* ThisKeyword */) { + return void 0; + } + } else if (isThisCapturingAssignment(node)) { + return factory2.createPartiallyEmittedExpression(node.right, node); + } + switch (node.kind) { + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: + return node; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { + const named = node; + if (isComputedPropertyName(named.name)) { + return factory2.replacePropertyName(named, visitEachChild(named.name, elideUnusedThisCaptureWorker, nullTransformationContext)); + } + return node; + } + } + return visitEachChild(node, elideUnusedThisCaptureWorker, nullTransformationContext); + } + function simplifyConstructorElideUnusedThisCapture(body, original) { + if (original.transformFlags & 16384 /* ContainsLexicalThis */ || hierarchyFacts & 65536 /* LexicalThis */ || hierarchyFacts & 131072 /* CapturedLexicalThis */) { + return body; + } + for (const statement of original.statements) { + if (statement.transformFlags & 134217728 /* ContainsLexicalSuper */ && !getSuperCallFromStatement(statement)) { + return body; + } + } + return factory2.updateBlock(body, visitNodes2(body.statements, elideUnusedThisCaptureWorker, isStatement)); + } + function injectSuperPresenceCheckWorker(node) { + if (isTransformedSuperCall(node) && node.arguments.length === 2 && isIdentifier(node.arguments[1]) && idText(node.arguments[1]) === "arguments") { + return factory2.createLogicalAnd( + factory2.createStrictInequality( + createSyntheticSuper(), + factory2.createNull() + ), + node + ); + } + switch (node.kind) { + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: + return node; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { + const named = node; + if (isComputedPropertyName(named.name)) { + return factory2.replacePropertyName(named, visitEachChild(named.name, injectSuperPresenceCheckWorker, nullTransformationContext)); + } + return node; + } + } + return visitEachChild(node, injectSuperPresenceCheckWorker, nullTransformationContext); + } + function complicateConstructorInjectSuperPresenceCheck(body) { + return factory2.updateBlock(body, visitNodes2(body.statements, injectSuperPresenceCheckWorker, isStatement)); + } + function simplifyConstructor(body, original, hasSynthesizedSuper) { + const inputBody = body; + body = simplifyConstructorInlineSuperInThisCaptureVariable(body); + body = simplifyConstructorInlineSuperReturn(body, original); + if (body !== inputBody) { + body = simplifyConstructorElideUnusedThisCapture(body, original); + } + if (hasSynthesizedSuper) { + body = complicateConstructorInjectSuperPresenceCheck(body); + } return body; } function isSufficientlyCoveredByReturnStatements(statement) { @@ -98142,11 +98947,11 @@ function transformES2015(context) { return factory2.createLogicalOr( factory2.createLogicalAnd( factory2.createStrictInequality( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), + createSyntheticSuper(), factory2.createNull() ), factory2.createFunctionApplyCall( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), + createSyntheticSuper(), createActualThis(), factory2.createIdentifier("arguments") ) @@ -98401,24 +99206,12 @@ function transformES2015(context) { return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { + if (hierarchyFacts & 131072 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } return false; } - function addSuperThisCaptureThisForNode(statements, superExpression) { - enableSubstitutionsForCapturedThis(); - const assignSuperExpression = factory2.createExpressionStatement( - factory2.createBinaryExpression( - factory2.createThis(), - 64 /* EqualsToken */, - superExpression - ) - ); - statements.push(assignSuperExpression); - setCommentRange(assignSuperExpression, getOriginalNode(superExpression).parent); - } function insertCaptureThisForNode(statements, node, initializer) { enableSubstitutionsForCapturedThis(); const captureThisStatement = factory2.createVariableStatement( @@ -98426,7 +99219,7 @@ function transformES2015(context) { void 0, factory2.createVariableDeclarationList([ factory2.createVariableDeclaration( - factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), + createCapturedThis(), /*exclamationToken*/ void 0, /*type*/ @@ -98647,7 +99440,7 @@ function transformES2015(context) { } function visitArrowFunction(node) { if (node.transformFlags & 16384 /* ContainsLexicalThis */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) { - hierarchyFacts |= 65536 /* CapturedLexicalThis */; + hierarchyFacts |= 131072 /* CapturedLexicalThis */; } const savedConvertedLoopState = convertedLoopState; convertedLoopState = void 0; @@ -98680,7 +99473,7 @@ function transformES2015(context) { const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody(node); const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name; - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return factory2.updateFunctionExpression( node, @@ -98703,7 +99496,7 @@ function transformES2015(context) { const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody(node); const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name; - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return factory2.updateFunctionDeclaration( node, @@ -98727,7 +99520,7 @@ function transformES2015(context) { if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return setOriginalNode( setTextRange( @@ -98880,7 +99673,7 @@ function transformES2015(context) { return node.declarationList.declarations.length === 1 && !!node.declarationList.declarations[0].initializer && !!(getInternalEmitFlags(node.declarationList.declarations[0].initializer) & 1 /* TypeScriptClassWrapper */); } function visitVariableStatement(node) { - const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); + const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 32 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); let updated; if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { let assignments; @@ -98918,7 +99711,11 @@ function transformES2015(context) { if (node.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } - const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration); + const declarations = visitNodes2( + node.declarations, + node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, + isVariableDeclaration + ); const declarationList = factory2.createVariableDeclarationList(declarations); setOriginalNode(declarationList, node); setTextRange(declarationList, node); @@ -100132,7 +100929,7 @@ function transformES2015(context) { } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); } - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return updated; } @@ -100282,13 +101079,6 @@ function transformES2015(context) { ) ); } - function visitSuperCallInBody(node) { - return visitCallExpressionWithPotentialCapturedThisAssignment( - node, - /*assignToCapturedThis*/ - false - ); - } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 108 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { const { target, thisArg } = factory2.createCallBinding(node.expression, hoistVariableDeclaration); @@ -100325,10 +101115,13 @@ function transformES2015(context) { resultingCall, createActualThis() ); - resultingCall = assignToCapturedThis ? factory2.createAssignment(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), initializer) : initializer; + resultingCall = assignToCapturedThis ? factory2.createAssignment(createCapturedThis(), initializer) : initializer; } return setOriginalNode(resultingCall, node); } + if (isSuperCall(node)) { + hierarchyFacts |= 131072 /* CapturedLexicalThis */; + } return visitEachChild(node, visitor, context); } function visitNewExpression(node) { @@ -100361,11 +101154,7 @@ function transformES2015(context) { // As we visit each element, we return one of two functions to use as the "key": // - `visitSpanOfSpreads` for one or more contiguous `...` spread expressions, i.e. `...a, ...b` in `[1, 2, ...a, ...b]` // - `visitSpanOfNonSpreads` for one or more contiguous non-spread elements, i.e. `1, 2`, in `[1, 2, ...a, ...b]` - spanMap( - elements, - partitionSpread, - (partition, visitPartition, _start, end) => visitPartition(partition, multiLine, hasTrailingComma && end === numElements) - ) + spanMap(elements, partitionSpread, (partition, visitPartition, _start, end) => visitPartition(partition, multiLine, hasTrailingComma && end === numElements)) ); if (segments.length === 1) { const firstSegment = segments[0]; @@ -100459,8 +101248,15 @@ function transformES2015(context) { } return setTextRange(expression, node); } - function visitSuperKeyword(isExpressionOfCall) { - return hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), "prototype") : factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); + function createSyntheticSuper() { + return factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); + } + function visitSuperKeyword(node, isExpressionOfCall) { + const expression = hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(setOriginalNode(createSyntheticSuper(), node), "prototype") : createSyntheticSuper(); + setOriginalNode(expression, node); + setCommentRange(expression, node); + setSourceMapRange(expression, node); + return expression; } function visitMetaProperty(node) { if (node.keywordToken === 105 /* NewKeyword */ && node.name.escapedText === "target") { @@ -100566,7 +101362,7 @@ function transformES2015(context) { } function substituteThisKeyword(node) { if (enabledSubstitutions & 1 /* CapturedThis */ && hierarchyFacts & 16 /* CapturesThis */) { - return setTextRange(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), node); + return setTextRange(createCapturedThis(), node); } return node; } @@ -101017,11 +101813,7 @@ function transformGenerators(context) { ); break; case 212 /* ElementAccessExpression */: - target = factory2.updateElementAccessExpression( - left, - cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), - cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression))) - ); + target = factory2.updateElementAccessExpression(left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))); break; default: target = Debug.checkDefined(visitNode(left, visitor, isExpression)); @@ -101056,12 +101848,7 @@ function transformGenerators(context) { } else if (node.operatorToken.kind === 28 /* CommaToken */) { return visitCommaExpression(node); } - return factory2.updateBinaryExpression( - node, - cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))), - node.operatorToken, - Debug.checkDefined(visitNode(node.right, visitor, isExpression)) - ); + return factory2.updateBinaryExpression(node, cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))), node.operatorToken, Debug.checkDefined(visitNode(node.right, visitor, isExpression))); } return visitEachChild(node, visitor, context); } @@ -101269,11 +102056,7 @@ function transformGenerators(context) { } function visitElementAccessExpression(node) { if (containsYield(node.argumentExpression)) { - return factory2.updateElementAccessExpression( - node, - cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))), - Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)) - ); + return factory2.updateElementAccessExpression(node, cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))), Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))); } return visitEachChild(node, visitor, context); } @@ -101631,12 +102414,7 @@ function transformGenerators(context) { for (const variable of initializer.declarations) { hoistVariableDeclaration(variable.name); } - node = factory2.updateForInStatement( - node, - initializer.declarations[0].name, - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)) - ); + node = factory2.updateForInStatement(node, initializer.declarations[0].name, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))); } else { node = visitEachChild(node, visitor, context); } @@ -102797,12 +103575,14 @@ function transformModule(context) { // Add the dependency array argument: // // ["require", "exports", module1", "module2", ...] - factory2.createArrayLiteralExpression(jsonSourceFile ? emptyArray : [ - factory2.createStringLiteral("require"), - factory2.createStringLiteral("exports"), - ...aliasedModuleNames, - ...unaliasedModuleNames - ]), + factory2.createArrayLiteralExpression( + jsonSourceFile ? emptyArray : [ + factory2.createStringLiteral("require"), + factory2.createStringLiteral("exports"), + ...aliasedModuleNames, + ...unaliasedModuleNames + ] + ), // Add the module body function argument: // // function (require, exports, module1, module2) ... @@ -103528,22 +104308,25 @@ function transformModule(context) { ); } else { const temp = factory2.createTempVariable(hoistVariableDeclaration); - return factory2.createComma(factory2.createAssignment(temp, arg), factory2.createConditionalExpression( - /*condition*/ - factory2.createIdentifier("__syncRequire"), - /*questionToken*/ - void 0, - /*whenTrue*/ - createImportCallExpressionCommonJS( - temp, - /*isInlineable*/ - true - ), - /*colonToken*/ - void 0, - /*whenFalse*/ - createImportCallExpressionAMD(temp, containsLexicalThis) - )); + return factory2.createComma( + factory2.createAssignment(temp, arg), + factory2.createConditionalExpression( + /*condition*/ + factory2.createIdentifier("__syncRequire"), + /*questionToken*/ + void 0, + /*whenTrue*/ + createImportCallExpressionCommonJS( + temp, + /*isInlineable*/ + true + ), + /*colonToken*/ + void 0, + /*whenFalse*/ + createImportCallExpressionAMD(temp, containsLexicalThis) + ) + ); } } function createImportCallExpressionAMD(arg, containsLexicalThis) { @@ -103839,7 +104622,7 @@ function transformModule(context) { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); let statements; if (moduleKind !== 2 /* AMD */) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -103885,7 +104668,7 @@ function transformModule(context) { ); } } else { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -103984,7 +104767,10 @@ function transformModule(context) { factory2.createExpressionStatement( createExportExpression( factory2.cloneNode(node.exportClause.name), - getHelperExpressionForExport(node, moduleKind !== 2 /* AMD */ ? createRequireCall(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : factory2.createIdentifier(idText(node.exportClause.name))) + getHelperExpressionForExport( + node, + moduleKind !== 2 /* AMD */ ? createRequireCall(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : factory2.createIdentifier(idText(node.exportClause.name)) + ) ) ), node @@ -104020,7 +104806,7 @@ function transformModule(context) { } function visitFunctionDeclaration(node) { let statements; - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -104057,7 +104843,7 @@ function transformModule(context) { } function visitClassDeclaration(node) { let statements; - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -104091,7 +104877,7 @@ function transformModule(context) { let statements; let variables; let expressions; - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { let modifiers; let removeCommentsOnExpressions = false; for (const variable of node.declarationList.declarations) { @@ -104277,8 +105063,8 @@ function transformModule(context) { return statements; } const seen = new IdentifierNameMap(); - if (hasSyntacticModifier(decl, 1 /* Export */)) { - const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); + if (hasSyntacticModifier(decl, 32 /* Export */)) { + const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); statements = appendExportStatement( statements, seen, @@ -104376,21 +105162,24 @@ function transformModule(context) { factory2.createStringLiteralFromNode(name), factory2.createObjectLiteralExpression([ factory2.createPropertyAssignment("enumerable", factory2.createTrue()), - factory2.createPropertyAssignment("get", factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - [], - /*type*/ - void 0, - factory2.createBlock([factory2.createReturnStatement(value)]) - )) + factory2.createPropertyAssignment( + "get", + factory2.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + [], + /*type*/ + void 0, + factory2.createBlock([factory2.createReturnStatement(value)]) + ) + ) ]) ] ) : factory2.createAssignment( @@ -104762,13 +105551,10 @@ function transformSystemModule(context) { addRange(statements, hoistedStatements); insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); const exportStarFunction = addExportStarIfNeeded(statements); - const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(512 /* Async */) : void 0; + const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(1024 /* Async */) : void 0; const moduleObject = factory2.createObjectLiteralExpression( [ - factory2.createPropertyAssignment( - "setters", - createSettersArray(exportStarFunction, dependencyGroups) - ), + factory2.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)), factory2.createPropertyAssignment( "execute", factory2.createFunctionExpression( @@ -104967,7 +105753,7 @@ function transformSystemModule(context) { factory2.createAssignment(importVariableName, parameterName) ) ); - if (hasSyntacticModifier(entry, 1 /* Export */)) { + if (hasSyntacticModifier(entry, 32 /* Export */)) { statements.push( factory2.createExpressionStatement( factory2.createCallExpression( @@ -105120,7 +105906,7 @@ function transformSystemModule(context) { ); } function visitFunctionDeclaration(node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { hoistedStatements = append( hoistedStatements, factory2.updateFunctionDeclaration( @@ -105207,7 +105993,7 @@ function transformSystemModule(context) { statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList)); } else { let expressions; - const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); + const isExportedDeclaration = hasSyntacticModifier(node, 32 /* Export */); for (const variable of node.declarationList.declarations) { if (variable.initializer) { expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); @@ -105343,8 +106129,8 @@ function transformSystemModule(context) { return statements; } let excludeName; - if (hasSyntacticModifier(decl, 1 /* Export */)) { - const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createStringLiteral("default") : decl.name; + if (hasSyntacticModifier(decl, 32 /* Export */)) { + const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createStringLiteral("default") : decl.name; statements = appendExportStatement(statements, exportName, factory2.getLocalName(decl)); excludeName = getTextOfIdentifierOrLiteral(exportName); } @@ -106014,7 +106800,9 @@ function transformECMAScriptModule(context) { ) ]) ), - factory2.createStringLiteral("module") + factory2.createStringLiteral("module"), + /*attributes*/ + void 0 ); const requireHelperName = factory2.createUniqueName("__require", 16 /* Optimistic */ | 32 /* FileLevel */); const requireStatement = factory2.createVariableStatement( @@ -106087,19 +106875,22 @@ function transformECMAScriptModule(context) { return singleOrMany(statements); } function appendExportsOfImportEqualsDeclaration(statements, node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { - statements = append(statements, factory2.createExportDeclaration( - /*modifiers*/ - void 0, - node.isTypeOnly, - factory2.createNamedExports([factory2.createExportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ + if (hasSyntacticModifier(node, 32 /* Export */)) { + statements = append( + statements, + factory2.createExportDeclaration( + /*modifiers*/ void 0, - idText(node.name) - )]) - )); + node.isTypeOnly, + factory2.createNamedExports([factory2.createExportSpecifier( + /*isTypeOnly*/ + false, + /*propertyName*/ + void 0, + idText(node.name) + )]) + ) + ); } return statements; } @@ -106128,7 +106919,7 @@ function transformECMAScriptModule(context) { ) ), node.moduleSpecifier, - node.assertClause + node.attributes ); setOriginalNode(importDecl, node.exportClause); const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory2.createExportDefault(synthName) : factory2.createExportDeclaration( @@ -106294,7 +107085,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } else if (isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isIndexSignatureDeclaration(node)) { return getReturnTypeVisibilityError; } else if (isParameter(node)) { - if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 8 /* Private */)) { + if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 2 /* Private */)) { return getVariableDeclarationTypeVisibilityError; } return getParameterDeclarationTypeVisibilityError; @@ -106312,7 +107103,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 2 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) { @@ -106516,7 +107307,7 @@ function getDeclarationDiagnostics(host, resolver, file) { } function hasInternalAnnotation(range, currentSourceFile) { const comment = currentSourceFile.text.substring(range.pos, range.end); - return stringContains(comment, "@internal"); + return comment.includes("@internal"); } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); @@ -106581,8 +107372,7 @@ function transformDeclarations(context) { trackReferencedAmbientModule, trackExternalModuleSymbolOfImportTypeNode, reportNonlocalAugmentation, - reportNonSerializableProperty, - reportImportTypeNodeResolutionModeOverride + reportNonSerializableProperty }; let errorNameNode; let errorFallbackNode; @@ -106611,6 +107401,17 @@ function transformDeclarations(context) { const container = getSourceFileOfNode(node); refs.set(getOriginalNodeId(container), container); } + function trackReferencedAmbientModuleFromImport(node) { + const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(node); + const symbol = moduleSpecifier && resolver.tryFindAmbientModule(moduleSpecifier); + if (symbol == null ? void 0 : symbol.declarations) { + for (const decl of symbol.declarations) { + if (isAmbientModule(decl) && getSourceFileOfNode(decl) !== currentSourceFile) { + trackReferencedAmbientModule(decl, symbol); + } + } + } + } function handleSymbolAccessibilityError(symbolAccessibilityResult) { if (symbolAccessibilityResult.accessibility === 0 /* Accessible */) { if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) { @@ -106626,20 +107427,9 @@ function transformDeclarations(context) { const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); if (errorInfo) { if (errorInfo.typeName) { - context.addDiagnostic(createDiagnosticForNode( - symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - getTextOfNode(errorInfo.typeName), - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName - )); + context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, getTextOfNode(errorInfo.typeName), symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName)); } else { - context.addDiagnostic(createDiagnosticForNode( - symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName - )); + context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName)); } return true; } @@ -106676,41 +107466,22 @@ function transformDeclarations(context) { } function reportInaccessibleUniqueSymbolError() { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - "unique symbol" - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "unique symbol")); } } function reportCyclicStructureError() { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback() - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, errorDeclarationNameWithFallback())); } } function reportInaccessibleThisError() { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - "this" - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "this")); } } function reportLikelyUnsafeImportRequiredError(specifier) { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - specifier - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier)); } } function reportTruncationError() { @@ -106736,11 +107507,6 @@ function transformDeclarations(context) { context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName)); } } - function reportImportTypeNodeResolutionModeOverride() { - if (!isNightly() && (errorNameNode || errorFallbackNode)) { - context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - } function transformDeclarationsForJS(sourceFile, bundled) { const oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = (s) => s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : { @@ -106760,9 +107526,8 @@ function transformDeclarations(context) { refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); let hasNoDefaultLib = false; - const bundle = factory2.createBundle(map( - node.sourceFiles, - (sourceFile) => { + const bundle = factory2.createBundle( + map(node.sourceFiles, (sourceFile) => { if (sourceFile.isDeclarationFile) return void 0; hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib; @@ -106820,18 +107585,19 @@ function transformDeclarations(context) { /*libReferences*/ [] ); - } - ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 315 /* InputFiles */) { - const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); - hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; - collectReferences(sourceFile, refs); - recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, (ref) => [ref.fileName, ref.resolutionMode])); - collectLibs(sourceFile, libs2); - return sourceFile; - } - return prepend; - })); + }), + mapDefined(node.prepends, (prepend) => { + if (prepend.kind === 315 /* InputFiles */) { + const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); + hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; + collectReferences(sourceFile, refs); + recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, (ref) => [ref.fileName, ref.resolutionMode])); + collectLibs(sourceFile, libs2); + return sourceFile; + } + return prepend; + }) + ); bundle.syntheticFileReferences = []; bundle.syntheticTypeReferences = getFileReferencesForUsedTypeReferences(); bundle.syntheticLibReferences = getLibReferences(); @@ -107000,6 +107766,9 @@ function transformDeclarations(context) { if (elem.kind === 232 /* OmittedExpression */) { return elem; } + if (elem.propertyName && isComputedPropertyName(elem.propertyName) && isEntityNameExpression(elem.propertyName.expression)) { + checkEntityNameVisibility(elem.propertyName.expression, enclosingDeclaration); + } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { return factory2.updateBindingElement( elem, @@ -107055,7 +107824,7 @@ function transformDeclarations(context) { return void 0; } function ensureType(node, type, ignorePrivate) { - if (!ignorePrivate && hasEffectiveModifier(node, 8 /* Private */)) { + if (!ignorePrivate && hasEffectiveModifier(node, 2 /* Private */)) { return; } if (shouldPrintWithInitializer(node)) { @@ -107135,7 +107904,7 @@ function transformDeclarations(context) { } } function updateParamsList(node, params, modifierMask) { - if (hasEffectiveModifier(node, 8 /* Private */)) { + if (hasEffectiveModifier(node, 2 /* Private */)) { return factory2.createNodeArray(); } const newParams = map(params, (p) => ensureParameter(p, modifierMask)); @@ -107180,7 +107949,7 @@ function transformDeclarations(context) { return factory2.createNodeArray(newParams || emptyArray); } function ensureTypeParams(node, params) { - return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration); + return hasEffectiveModifier(node, 2 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration); } function isEnclosingDeclaration(node) { return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); @@ -107242,30 +108011,42 @@ function transformDeclarations(context) { decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) + tryGetResolutionModeOverride(decl.attributes) ); } const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0; if (!decl.importClause.namedBindings) { - return visibleDefaultBinding && factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - /*namedBindings*/ - void 0 - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); + return visibleDefaultBinding && factory2.updateImportDeclaration( + decl, + decl.modifiers, + factory2.updateImportClause( + decl.importClause, + decl.importClause.isTypeOnly, + visibleDefaultBinding, + /*namedBindings*/ + void 0 + ), + rewriteModuleSpecifier(decl, decl.moduleSpecifier), + tryGetResolutionModeOverride(decl.attributes) + ); } if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 ); - return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - namedBindings - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : void 0; + return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration( + decl, + decl.modifiers, + factory2.updateImportClause( + decl.importClause, + decl.importClause.isTypeOnly, + visibleDefaultBinding, + namedBindings + ), + rewriteModuleSpecifier(decl, decl.moduleSpecifier), + tryGetResolutionModeOverride(decl.attributes) + ) : void 0; } const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver.isDeclarationVisible(b) ? b : void 0); if (bindingList && bindingList.length || visibleDefaultBinding) { @@ -107279,7 +108060,7 @@ function transformDeclarations(context) { bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) + tryGetResolutionModeOverride(decl.attributes) ); } if (resolver.isImportRequiredByAugmentation(decl)) { @@ -107289,19 +108070,13 @@ function transformDeclarations(context) { /*importClause*/ void 0, rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) + tryGetResolutionModeOverride(decl.attributes) ); } } - function getResolutionModeOverrideForClauseInNightly(assertClause) { - const mode = getResolutionModeOverrideForClause(assertClause); - if (mode !== void 0) { - if (!isNightly()) { - context.addDiagnostic(createDiagnosticForNode(assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - return assertClause; - } - return void 0; + function tryGetResolutionModeOverride(node) { + const mode = getResolutionModeOverride(node); + return node && mode !== void 0 ? node : void 0; } function transformAndReplaceLatePaintedStatements(statements) { while (length(lateMarkedStatements)) { @@ -107360,7 +108135,7 @@ function transformDeclarations(context) { const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { - if (hasEffectiveModifier(input, 8 /* Private */)) { + if (hasEffectiveModifier(input, 2 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) return; return cleanup(factory2.createPropertyDeclaration( @@ -107448,7 +108223,7 @@ function transformDeclarations(context) { input, ensureModifiers(input), input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)), + updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)), ensureType(input, accessorType), /*body*/ void 0 @@ -107465,7 +108240,7 @@ function transformDeclarations(context) { input, ensureModifiers(input), input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)), + updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)), /*body*/ void 0 )); @@ -107584,10 +108359,11 @@ function transformDeclarations(context) { case 205 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); + trackReferencedAmbientModuleFromImport(input); return cleanup(factory2.updateImportTypeNode( input, factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), - input.assertions, + input.attributes, input.qualifier, visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode), input.isTypeOf @@ -107621,7 +108397,7 @@ function transformDeclarations(context) { } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 2 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -107635,13 +108411,14 @@ function transformDeclarations(context) { resultHasExternalModuleIndicator = true; } resultHasScopeMarker = true; + trackReferencedAmbientModuleFromImport(input); return factory2.updateExportDeclaration( input, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), - getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 + tryGetResolutionModeOverride(input.attributes) ); } case 277 /* ExportAssignment */: { @@ -107679,11 +108456,11 @@ function transformDeclarations(context) { return input; } function stripExportModifiers(statement) { - if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 1024 /* Default */) || !canHaveModifiers(statement)) { + if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 2048 /* Default */) || !canHaveModifiers(statement)) { return statement; } - const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (258047 /* All */ ^ 1 /* Export */)); - return factory2.updateModifiers(statement, modifiers); + const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (131071 /* All */ ^ 32 /* Export */)); + return factory2.replaceModifiers(statement, modifiers); } function updateModuleDeclarationAndKeyword(node, modifiers, name, body) { const updated = factory2.updateModuleDeclaration(node, modifiers, name, body); @@ -107709,10 +108486,18 @@ function transformDeclarations(context) { return; switch (input.kind) { case 271 /* ImportEqualsDeclaration */: { - return transformImportEqualsDeclaration(input); + const transformed = transformImportEqualsDeclaration(input); + if (transformed) { + trackReferencedAmbientModuleFromImport(input); + } + return transformed; } case 272 /* ImportDeclaration */: { - return transformImportDeclaration(input); + const transformed = transformImportDeclaration(input); + if (transformed) { + trackReferencedAmbientModuleFromImport(input); + } + return transformed; } } if (isDeclaration(input) && isDeclarationAndNotVisible(input)) @@ -107780,7 +108565,7 @@ function transformDeclarations(context) { fakespace.symbol = props[0].parent; const exportMappings = []; let declarations = mapDefined(props, (p) => { - if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) { + if (!isExpandoPropertyDeclaration(p.valueDeclaration)) { return void 0; } const nameStr = unescapeLeadingUnderscores(p.escapedName); @@ -107806,7 +108591,7 @@ function transformDeclarations(context) { return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(95 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); }); if (!exportMappings.length) { - declarations = mapDefined(declarations, (declaration) => factory2.updateModifiers(declaration, 0 /* None */)); + declarations = mapDefined(declarations, (declaration) => factory2.replaceModifiers(declaration, 0 /* None */)); } else { declarations.push(factory2.createExportDeclaration( /*modifiers*/ @@ -107824,10 +108609,10 @@ function transformDeclarations(context) { )); } const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */); - if (!hasEffectiveModifier(clean2, 1024 /* Default */)) { + if (!hasEffectiveModifier(clean2, 2048 /* Default */)) { return [clean2, namespaceDecl]; } - const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~1025 /* ExportDefault */ | 2 /* Ambient */); + const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~2080 /* ExportDefault */ | 128 /* Ambient */); const cleanDeclaration = factory2.updateFunctionDeclaration( clean2, modifiers, @@ -107919,17 +108704,20 @@ function transformDeclarations(context) { if (ctor) { const oldDiag2 = getSymbolAccessibilityDiagnostic; parameterProperties = compact(flatMap(ctor.parameters, (param) => { - if (!hasSyntacticModifier(param, 16476 /* ParameterPropertyModifier */) || shouldStripInternal(param)) + if (!hasSyntacticModifier(param, 31 /* ParameterPropertyModifier */) || shouldStripInternal(param)) return; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(param); if (param.name.kind === 80 /* Identifier */) { - return preserveJsDoc(factory2.createPropertyDeclaration( - ensureModifiers(param), - param.name, - param.questionToken, - ensureType(param, param.type), - ensureNoInitializer(param) - ), param); + return preserveJsDoc( + factory2.createPropertyDeclaration( + ensureModifiers(param), + param.name, + param.questionToken, + ensureType(param, param.type), + ensureNoInitializer(param) + ), + param + ); } else { return walkBindingPattern(param.name); } @@ -108005,14 +108793,17 @@ function transformDeclarations(context) { } return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 106 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); })); - return [statement, cleanup(factory2.updateClassDeclaration( - input, - modifiers, - input.name, - typeParameters, - heritageClauses, - members - ))]; + return [ + statement, + cleanup(factory2.updateClassDeclaration( + input, + modifiers, + input.name, + typeParameters, + heritageClauses, + members + )) + ]; } else { const heritageClauses = transformHeritageClauses(input.heritageClauses); return cleanup(factory2.updateClassDeclaration( @@ -108029,12 +108820,17 @@ function transformDeclarations(context) { return cleanup(transformVariableStatement(input)); } case 266 /* EnumDeclaration */: { - return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { - if (shouldStripInternal(m)) - return; - const constValue = resolver.getConstantValue(m); - return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m); - })))); + return cleanup(factory2.updateEnumDeclaration( + input, + factory2.createNodeArray(ensureModifiers(input)), + input.name, + factory2.createNodeArray(mapDefined(input.members, (m) => { + if (shouldStripInternal(m)) + return; + const constValue = resolver.getConstantValue(m); + return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m); + })) + )); } } return Debug.assertNever(input, `Unhandled top-level node in declaration emit: ${Debug.formatSyntaxKind(input.kind)}`); @@ -108136,11 +108932,11 @@ function transformDeclarations(context) { return factory2.createModifiersFromModifierFlags(newFlags); } function ensureModifierFlags(node) { - let mask = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); - let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; + let mask = 131071 /* All */ ^ (1 /* Public */ | 1024 /* Async */ | 16 /* Override */); + let additions = needsDeclare && !isAlwaysType(node) ? 128 /* Ambient */ : 0 /* None */; const parentIsFile = node.parent.kind === 312 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { - mask ^= 2 /* Ambient */; + mask ^= 128 /* Ambient */; additions = 0 /* None */; } return maskModifierFlags(node, mask, additions); @@ -108158,9 +108954,19 @@ function transformDeclarations(context) { return accessorType; } function transformHeritageClauses(nodes) { - return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => { - return isEntityNameExpression(t.expression) || clause.token === 96 /* ExtendsKeyword */ && t.expression.kind === 106 /* NullKeyword */; - })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length)); + return factory2.createNodeArray(filter( + map(nodes, (clause) => factory2.updateHeritageClause( + clause, + visitNodes2( + factory2.createNodeArray(filter(clause.types, (t) => { + return isEntityNameExpression(t.expression) || clause.token === 96 /* ExtendsKeyword */ && t.expression.kind === 106 /* NullKeyword */; + })), + visitDeclarationSubtree, + isExpressionWithTypeArguments + ) + )), + (clause) => clause.types && !!clause.types.length + )); } } function isAlwaysType(node) { @@ -108172,13 +108978,13 @@ function isAlwaysType(node) { function maskModifiers(factory2, node, modifierMask, modifierAdditions) { return factory2.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions)); } -function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public */, modifierAdditions = 0 /* None */) { +function maskModifierFlags(node, modifierMask = 131071 /* All */ ^ 1 /* Public */, modifierAdditions = 0 /* None */) { let flags = getEffectiveModifierFlags(node) & modifierMask | modifierAdditions; - if (flags & 1024 /* Default */ && !(flags & 1 /* Export */)) { - flags ^= 1 /* Export */; + if (flags & 2048 /* Default */ && !(flags & 32 /* Export */)) { + flags ^= 32 /* Export */; } - if (flags & 1024 /* Default */ && flags & 2 /* Ambient */) { - flags ^= 2 /* Ambient */; + if (flags & 2048 /* Default */ && flags & 128 /* Ambient */) { + flags ^= 128 /* Ambient */; } return flags; } @@ -108191,7 +108997,7 @@ function canHaveLiteralInitializer(node) { switch (node.kind) { case 172 /* PropertyDeclaration */: case 171 /* PropertySignature */: - return !hasEffectiveModifier(node, 8 /* Private */); + return !hasEffectiveModifier(node, 2 /* Private */); case 169 /* Parameter */: case 260 /* VariableDeclaration */: return true; @@ -109068,6 +109874,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla inlineSourceMap: compilerOptions.inlineSourceMap, extendedDiagnostics: compilerOptions.extendedDiagnostics, onlyPrintJsDocStyle: true, + omitBraceSourceMapPositions: true, writeBundleFileInfo: !!bundleBuildInfo, recordInternalSection: !!bundleBuildInfo, relativeToBuildInfo @@ -109292,7 +110099,8 @@ var notImplementedResolver = { getSymbolOfExternalModuleSpecifier: notImplemented, isBindingCapturedByNode: notImplemented, getDeclarationStatementsForSourceFile: notImplemented, - isImportRequiredByAugmentation: notImplemented + isImportRequiredByAugmentation: notImplemented, + tryFindAmbientModule: notImplemented }; function createSourceFilesFromBundleBuildInfo(bundle, buildInfoDirectory, host) { var _a; @@ -109478,6 +110286,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { onAfterEmitToken } = handlers; var extendedDiagnostics = !!printerOptions.extendedDiagnostics; + var omitBraceSourcePositions = !!printerOptions.omitBraceSourceMapPositions; var newLine = getNewLineCharacter(printerOptions); var moduleKind = getEmitModuleKind(printerOptions); var bundledHelpers = /* @__PURE__ */ new Map(); @@ -110112,10 +110921,10 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitNamedExports(node); case 281 /* ExportSpecifier */: return emitExportSpecifier(node); - case 300 /* AssertClause */: - return emitAssertClause(node); - case 301 /* AssertEntry */: - return emitAssertEntry(node); + case 300 /* ImportAttributes */: + return emitImportAttributes(node); + case 301 /* ImportAttribute */: + return emitImportAttribute(node); case 282 /* MissingDeclaration */: return; case 283 /* ExternalModuleReference */: @@ -110497,14 +111306,8 @@ function createPrinter(printerOptions = {}, handlers = {}) { nonEscapingWrite(`}`); } function emitTabStop(hint, node, snippet) { - Debug.assert( - node.kind === 242 /* EmptyStatement */, - `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` - ); - Debug.assert( - hint !== 5 /* EmbeddedStatement */, - `A tab stop cannot be attached to an embedded statement.` - ); + Debug.assert(node.kind === 242 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.`); + Debug.assert(hint !== 5 /* EmbeddedStatement */, `A tab stop cannot be attached to an embedded statement.`); nonEscapingWrite(`$${snippet.order}`); } function emitIdentifier(node) { @@ -110896,16 +111699,16 @@ function createPrinter(printerOptions = {}, handlers = {}) { writeKeyword("import"); writePunctuation("("); emit(node.argument); - if (node.assertions) { + if (node.attributes) { writePunctuation(","); writeSpace(); writePunctuation("{"); writeSpace(); - writeKeyword("assert"); + writeKeyword(node.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with"); writePunctuation(":"); writeSpace(); - const elements = node.assertions.assertClause.elements; - emitList(node.assertions.assertClause, elements, 526226 /* ImportClauseEntries */); + const elements = node.attributes.elements; + emitList(node.attributes, elements, 526226 /* ImportAttributes */); writeSpace(); writePunctuation("}"); } @@ -110997,7 +111800,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { /*jsxAttributeEscape*/ false ); - return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */)); + return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !text.includes(tokenToString(25 /* DotToken */)) && !text.includes(String.fromCharCode(69 /* E */)) && !text.includes(String.fromCharCode(101 /* e */)); } else if (isAccessExpression(expression)) { const constantValue = getConstantValue(expression); return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue; @@ -111479,7 +112282,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { decreaseIndent(); } } - pos = writeTokenText(token, writer2, pos); + if (!omitBraceSourcePositions && (token === 19 /* OpenBraceToken */ || token === 20 /* CloseBraceToken */)) { + pos = writeToken(token, pos, writer2, contextNode); + } else { + pos = writeTokenText(token, writer2, pos); + } if (isSimilarNode && contextNode.end !== pos) { const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */; emitTrailingCommentsOfPosition( @@ -111890,8 +112697,8 @@ function createPrinter(printerOptions = {}, handlers = {}) { writeSpace(); } emitExpression(node.moduleSpecifier); - if (node.assertClause) { - emitWithLeadingSpace(node.assertClause); + if (node.attributes) { + emitWithLeadingSpace(node.attributes); } writeTrailingSemicolon(); } @@ -111929,7 +112736,10 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTokenWithComment(90 /* DefaultKeyword */, nextPos, writeKeyword, node); } writeSpace(); - emitExpression(node.expression, node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(64 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault); + emitExpression( + node.expression, + node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(64 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault + ); writeTrailingSemicolon(); } function emitExportDeclaration(node) { @@ -111957,18 +112767,18 @@ function createPrinter(printerOptions = {}, handlers = {}) { writeSpace(); emitExpression(node.moduleSpecifier); } - if (node.assertClause) { - emitWithLeadingSpace(node.assertClause); + if (node.attributes) { + emitWithLeadingSpace(node.attributes); } writeTrailingSemicolon(); } - function emitAssertClause(node) { - emitTokenWithComment(132 /* AssertKeyword */, node.pos, writeKeyword, node); + function emitImportAttributes(node) { + emitTokenWithComment(node.token, node.pos, writeKeyword, node); writeSpace(); const elements = node.elements; - emitList(node, elements, 526226 /* ImportClauseEntries */); + emitList(node, elements, 526226 /* ImportAttributes */); } - function emitAssertEntry(node) { + function emitImportAttribute(node) { emit(node.name); writePunctuation(":"); writeSpace(); @@ -112827,6 +113637,16 @@ function createPrinter(printerOptions = {}, handlers = {}) { increaseIndent(); shouldDecreaseIndentAfterEmit = true; } + if (shouldEmitInterveningComments && format & 60 /* DelimitersMask */ && !positionIsSynthesized(child.pos)) { + const commentRange = getCommentRange(child); + emitTrailingCommentsOfPosition( + commentRange.pos, + /*prefixSpace*/ + !!(format & 512 /* SpaceBetweenSiblings */), + /*forceNoNewline*/ + true + ); + } writeLine(separatingLineTerminatorCount); shouldEmitInterveningComments = false; } else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) { @@ -114452,7 +115272,8 @@ function isIgnoredFileFromWildCardWatching({ currentDirectory, useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, - toPath: toPath3 + toPath: toPath3, + getScriptKind }) { const newPath = removeIgnoredPath(fileOrDirectoryPath); if (!newPath) { @@ -114462,7 +115283,7 @@ function isIgnoredFileFromWildCardWatching({ fileOrDirectoryPath = newPath; if (fileOrDirectoryPath === watchedDirPath) return false; - if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) { + if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) { writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`); return true; } @@ -114491,6 +115312,25 @@ function isIgnoredFileFromWildCardWatching({ function hasSourceFile(file) { return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file); } + function isSupportedScriptKind() { + if (!getScriptKind) + return false; + const scriptKind = getScriptKind(fileOrDirectory); + switch (scriptKind) { + case 3 /* TS */: + case 4 /* TSX */: + case 7 /* Deferred */: + case 5 /* External */: + return true; + case 1 /* JS */: + case 2 /* JSX */: + return getAllowJSCompilerOption(options); + case 6 /* JSON */: + return getResolveJsonModule(options); + case 0 /* Unknown */: + return false; + } + } } function isBuilderProgram(program) { return !!program.getState; @@ -114882,17 +115722,17 @@ function formatCodeSpan(file, start, length2, indent2, squiggleColor, host) { for (let i = firstLine; i <= lastLine; i++) { context += host.getNewLine(); if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent2 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); + context += indent2 + formatColorAndReset(ellipsis.padStart(gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); i = lastLine - 1; } const lineStart = getPositionOfLineAndCharacter(file, i, 0); const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length; let lineContent = file.text.slice(lineStart, lineEnd); - lineContent = trimStringEnd(lineContent); + lineContent = lineContent.trimEnd(); lineContent = lineContent.replace(/\t/g, " "); - context += indent2 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent2 + formatColorAndReset((i + 1 + "").padStart(gutterWidth), gutterStyleSequence) + gutterSeparator; context += lineContent + host.getNewLine(); - context += indent2 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent2 + formatColorAndReset("".padStart(gutterWidth), gutterStyleSequence) + gutterSeparator; context += squiggleColor; if (i === firstLine) { const lastCharForLine = i === lastLine ? lastLineChar : void 0; @@ -114975,8 +115815,6 @@ function getModeForFileReference(ref, containingFileMode) { return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode; } function getModeForResolutionAtIndex(file, index) { - if (file.impliedNodeFormat === void 0) - return void 0; return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index)); } function isExclusivelyTypeOnlyImportOrExport(decl) { @@ -114990,42 +115828,48 @@ function isExclusivelyTypeOnlyImportOrExport(decl) { return false; } function getModeForUsageLocation(file, usage) { - var _a, _b; - if (file.impliedNodeFormat === void 0) - return void 0; + var _a; if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent)) { const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent); if (isTypeOnly) { - const override = getResolutionModeOverrideForClause(usage.parent.assertClause); + const override = getResolutionModeOverride(usage.parent.attributes); if (override) { return override; } } } if (usage.parent.parent && isImportTypeNode(usage.parent.parent)) { - const override = getResolutionModeOverrideForClause((_a = usage.parent.parent.assertions) == null ? void 0 : _a.assertClause); + const override = getResolutionModeOverride(usage.parent.parent.attributes); if (override) { return override; } } + if (file.impliedNodeFormat === void 0) + return void 0; if (file.impliedNodeFormat !== 99 /* ESNext */) { return isImportCall(walkUpParenthesizedExpressions(usage.parent)) ? 99 /* ESNext */ : 1 /* CommonJS */; } - const exprParentParent = (_b = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _b.parent; + const exprParentParent = (_a = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _a.parent; return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? 1 /* CommonJS */ : 99 /* ESNext */; } -function getResolutionModeOverrideForClause(clause, grammarErrorOnNode) { - if (!clause) +function getResolutionModeOverride(node, grammarErrorOnNode) { + if (!node) return void 0; - if (length(clause.elements) !== 1) { - grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(clause, Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require); + if (length(node.elements) !== 1) { + grammarErrorOnNode == null ? void 0 : grammarErrorOnNode( + node, + node.token === 118 /* WithKeyword */ ? Diagnostics.Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require : Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require + ); return void 0; } - const elem = clause.elements[0]; + const elem = node.elements[0]; if (!isStringLiteralLike(elem.name)) return void 0; if (elem.name.text !== "resolution-mode") { - grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(elem.name, Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions); + grammarErrorOnNode == null ? void 0 : grammarErrorOnNode( + elem.name, + node.token === 118 /* WithKeyword */ ? Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_attributes : Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions + ); return void 0; } if (!isStringLiteralLike(elem.value)) @@ -115168,15 +116012,15 @@ function isReferencedFile(reason) { function isReferenceFileLocation(location) { return location.pos !== void 0; } -function getReferencedFileLocation(getSourceFileByPath, ref) { - var _a, _b, _c, _d, _e, _f; - const file = Debug.checkDefined(getSourceFileByPath(ref.file)); +function getReferencedFileLocation(program, ref) { + var _a, _b, _c, _d; + const file = Debug.checkDefined(program.getSourceFileByPath(ref.file)); const { kind, index } = ref; let pos, end, packageId, resolutionMode; switch (kind) { case 3 /* Import */: const importLiteral = getModuleNameStringLiteralAt(file, index); - packageId = (_c = (_b = (_a = file.resolvedModules) == null ? void 0 : _a.get(importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.packageId; + packageId = (_b = (_a = program.getResolvedModule(file, importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.packageId; if (importLiteral.pos === -1) return { file, packageId, text: importLiteral.text }; pos = skipTrivia(file.text, importLiteral.pos); @@ -115187,7 +116031,7 @@ function getReferencedFileLocation(getSourceFileByPath, ref) { break; case 5 /* TypeReferenceDirective */: ({ pos, end, resolutionMode } = file.typeReferenceDirectives[index]); - packageId = (_f = (_e = (_d = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _d.get(toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _e.resolvedTypeReferenceDirective) == null ? void 0 : _f.packageId; + packageId = (_d = (_c = program.getResolvedTypeReferenceDirective(file, toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _c.resolvedTypeReferenceDirective) == null ? void 0 : _d.packageId; break; case 7 /* LibReferenceDirective */: ({ pos, end } = file.libReferenceDirectives[index]); @@ -115320,7 +116164,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([ Diagnostics.Classes_may_not_have_a_field_named_constructor.code, 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, Diagnostics.Duplicate_label_0.code, - Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, + Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, @@ -115401,6 +116245,10 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config let automaticTypeDirectiveResolutions; let resolvedLibReferences; let resolvedLibProcessing; + let resolvedModules; + let resolvedModulesProcessing; + let resolvedTypeReferenceDirectiveNames; + let resolvedTypeReferenceDirectiveNamesProcessing; let packageMap; const maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0; let currentNodeModulesDepth = 0; @@ -115476,7 +116324,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config getCanonicalFileName, /*options*/ void 0, - moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache() + moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(), + moduleResolutionCache == null ? void 0 : moduleResolutionCache.optionsToRedirectsKey ); actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( typeDirectiveNames, @@ -115664,6 +116513,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } oldProgram = void 0; resolvedLibProcessing = void 0; + resolvedModulesProcessing = void 0; + resolvedTypeReferenceDirectiveNamesProcessing = void 0; const program = { getRootFileNames: () => rootNames, getSourceFile, @@ -115705,7 +116556,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config sourceFileToPackageName, redirectTargetsMap, usesUriStyleNodeCoreModules, + resolvedModules, + resolvedTypeReferenceDirectiveNames, resolvedLibReferences, + getResolvedModule, + getResolvedTypeReferenceDirective, + forEachResolvedModule, + forEachResolvedTypeReferenceDirective, getCurrentPackagesMap: () => packageMap, typesPackageExists, packageBundlesTypes, @@ -115736,7 +116593,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config case 1 /* FilePreprocessingFileExplainingDiagnostic */: return programDiagnostics.add(createDiagnosticExplainingFile(diagnostic.file && getSourceFileByPath(diagnostic.file), diagnostic.fileProcessingReason, diagnostic.diagnostic, diagnostic.args || emptyArray)); case 0 /* FilePreprocessingReferencedDiagnostic */: - const { file, pos, end } = getReferencedFileLocation(getSourceFileByPath, diagnostic.reason); + const { file, pos, end } = getReferencedFileLocation(program, diagnostic.reason); return programDiagnostics.add(createFileDiagnostic(file, Debug.checkDefined(pos), Debug.checkDefined(end) - pos, diagnostic.diagnostic, ...diagnostic.args || emptyArray)); case 2 /* ResolutionDiagnostics */: return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d)); @@ -115749,17 +116606,34 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config measure("Program", "beforeProgram", "afterProgram"); (_p = tracing) == null ? void 0 : _p.pop(); return program; + function getResolvedModule(file, moduleName, mode) { + var _a2; + return (_a2 = resolvedModules == null ? void 0 : resolvedModules.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode); + } + function getResolvedTypeReferenceDirective(file, typeDirectiveName, mode) { + var _a2; + return (_a2 = resolvedTypeReferenceDirectiveNames == null ? void 0 : resolvedTypeReferenceDirectiveNames.get(file.path)) == null ? void 0 : _a2.get(typeDirectiveName, mode); + } + function forEachResolvedModule(callback, file) { + forEachResolution(resolvedModules, callback, file); + } + function forEachResolvedTypeReferenceDirective(callback, file) { + forEachResolution(resolvedTypeReferenceDirectiveNames, callback, file); + } + function forEachResolution(resolutionCache, callback, file) { + var _a2; + if (file) + (_a2 = resolutionCache == null ? void 0 : resolutionCache.get(file.path)) == null ? void 0 : _a2.forEach((resolution, name, mode) => callback(resolution, name, mode, file.path)); + else + resolutionCache == null ? void 0 : resolutionCache.forEach((resolutions, filePath) => resolutions.forEach((resolution, name, mode) => callback(resolution, name, mode, filePath))); + } function getPackagesMap() { if (packageMap) return packageMap; packageMap = /* @__PURE__ */ new Map(); - files.forEach((sf) => { - if (!sf.resolvedModules) - return; - sf.resolvedModules.forEach(({ resolvedModule }) => { - if (resolvedModule == null ? void 0 : resolvedModule.packageId) - packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name)); - }); + forEachResolvedModule(({ resolvedModule }) => { + if (resolvedModule == null ? void 0 : resolvedModule.packageId) + packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name)); }); return packageMap; } @@ -115826,7 +116700,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path); if (resultFromDts) return resultFromDts; - if (!host.realpath || !options.preserveSymlinks || !stringContains(file.originalFileName, nodeModulesPathPart)) + if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart)) return void 0; const realDeclarationPath = toPath3(host.realpath(file.originalFileName)); return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath); @@ -115892,7 +116766,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return classifiableNames; } function resolveModuleNamesReusingOldState(moduleNames, file) { - var _a2; if (structureIsReused === 0 /* Not */ && !file.ambientModuleNames.length) { return resolveModuleNamesWorker( moduleNames, @@ -115901,24 +116774,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config void 0 ); } - const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName); - if (oldSourceFile !== file && file.resolvedModules) { - const result2 = []; - for (const moduleName of moduleNames) { - const resolvedModule = file.resolvedModules.get(moduleName.text, getModeForUsageLocation(file, moduleName)); - result2.push(resolvedModule); - } - return result2; - } let unknownModuleNames; let result; let reusedNames; const predictedToResolveToAmbientModuleMarker = emptyResolution; + const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName); for (let i = 0; i < moduleNames.length; i++) { const moduleName = moduleNames[i]; - if (file === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path)) { + if (file === oldSourceFile && !hasInvalidatedResolutions(file.path)) { const mode = getModeForUsageLocation(file, moduleName); - const oldResolution = (_a2 = oldSourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleName.text, mode); + const oldResolution = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, mode); if (oldResolution == null ? void 0 : oldResolution.resolvedModule) { if (isTraceEnabled(options, host)) { trace( @@ -115965,7 +116830,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config Debug.assert(j === resolutions.length); return result; function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) { - const resolutionToFile = getResolvedModule(oldSourceFile, moduleName.text, getModeForUsageLocation(file, moduleName)); + var _a2; + const resolutionToFile = (_a2 = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, getModeForUsageLocation(file, moduleName))) == null ? void 0 : _a2.resolvedModule; const resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName); if (resolutionToFile && resolvedFile) { return false; @@ -115990,28 +116856,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config void 0 ); } - const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0; - if (!isString(containingFile)) { - if (oldSourceFile !== containingFile && containingFile.resolvedTypeReferenceDirectiveNames) { - const result2 = []; - for (const typeDirectiveName of typeDirectiveNames) { - const resolvedTypeReferenceDirective = containingFile.resolvedTypeReferenceDirectiveNames.get(getTypeReferenceResolutionName(typeDirectiveName), getModeForFileReference(typeDirectiveName, containingFile.impliedNodeFormat)); - result2.push(resolvedTypeReferenceDirective); - } - return result2; - } - } let unknownTypeReferenceDirectiveNames; let result; let reusedNames; const containingSourceFile = !isString(containingFile) ? containingFile : void 0; - const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path) : !hasInvalidatedResolutions(toPath3(containingFile)); + const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0; + const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(containingFile.path) : !hasInvalidatedResolutions(toPath3(containingFile)); for (let i = 0; i < typeDirectiveNames.length; i++) { const entry = typeDirectiveNames[i]; if (canReuseResolutions) { const typeDirectiveName = getTypeReferenceResolutionName(entry); const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat); - const oldResolution = (_a2 = !isString(containingFile) ? oldSourceFile == null ? void 0 : oldSourceFile.resolvedTypeReferenceDirectiveNames : oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(typeDirectiveName, mode); + const oldResolution = !isString(containingFile) ? oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(containingFile, typeDirectiveName, mode) : (_a2 = oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(typeDirectiveName, mode); if (oldResolution == null ? void 0 : oldResolution.resolvedTypeReferenceDirective) { if (isTraceEnabled(options, host)) { trace( @@ -116173,43 +117029,47 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config structureIsReused = 1 /* SafeModules */; } } - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); + modifiedSourceFiles.push(newSourceFile); } else if (hasInvalidatedResolutions(oldSourceFile.path)) { structureIsReused = 1 /* SafeModules */; - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); + modifiedSourceFiles.push(newSourceFile); + } else { + for (const moduleName of oldSourceFile.ambientModuleNames) { + ambientModuleNameToUnmodifiedFileName.set(moduleName, oldSourceFile.fileName); + } } newSourceFiles.push(newSourceFile); } if (structureIsReused !== 2 /* Completely */) { return structureIsReused; } - const modifiedFiles = modifiedSourceFiles.map((f) => f.oldFile); - for (const oldFile of oldSourceFiles) { - if (!contains(modifiedFiles, oldFile)) { - for (const moduleName of oldFile.ambientModuleNames) { - ambientModuleNameToUnmodifiedFileName.set(moduleName, oldFile.fileName); - } - } - } - for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) { + for (const newSourceFile of modifiedSourceFiles) { const moduleNames = getModuleNames(newSourceFile); const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile); - const resolutionsChanged = hasChangesInResolutions(moduleNames, newSourceFile, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo, moduleResolutionNameAndModeGetter); - if (resolutionsChanged) { + (resolvedModulesProcessing ?? (resolvedModulesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, resolutions); + const resolutionsChanged = hasChangesInResolutions( + moduleNames, + newSourceFile, + resolutions, + (name, mode) => oldProgram.getResolvedModule(newSourceFile, name, mode), + moduleResolutionIsEqualTo, + moduleResolutionNameAndModeGetter + ); + if (resolutionsChanged) structureIsReused = 1 /* SafeModules */; - newSourceFile.resolvedModules = zipToModeAwareCache(newSourceFile, moduleNames, resolutions, moduleResolutionNameAndModeGetter); - } else { - newSourceFile.resolvedModules = oldSourceFile.resolvedModules; - } const typesReferenceDirectives = newSourceFile.typeReferenceDirectives; const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile); - const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, newSourceFile, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, typeDirectiveIsEqualTo, typeReferenceResolutionNameAndModeGetter); - if (typeReferenceResolutionsChanged) { + (resolvedTypeReferenceDirectiveNamesProcessing ?? (resolvedTypeReferenceDirectiveNamesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, typeReferenceResolutions); + const typeReferenceResolutionsChanged = hasChangesInResolutions( + typesReferenceDirectives, + newSourceFile, + typeReferenceResolutions, + (name, mode) => oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(newSourceFile, name, mode), + typeDirectiveIsEqualTo, + typeReferenceResolutionNameAndModeGetter + ); + if (typeReferenceResolutionsChanged) structureIsReused = 1 /* SafeModules */; - newSourceFile.resolvedTypeReferenceDirectiveNames = zipToModeAwareCache(newSourceFile, typesReferenceDirectives, typeReferenceResolutions, typeReferenceResolutionNameAndModeGetter); - } else { - newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames; - } } if (structureIsReused !== 2 /* Completely */) { return structureIsReused; @@ -116256,6 +117116,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config sourceFileToPackageName = oldProgram.sourceFileToPackageName; redirectTargetsMap = oldProgram.redirectTargetsMap; usesUriStyleNodeCoreModules = oldProgram.usesUriStyleNodeCoreModules; + resolvedModules = oldProgram.resolvedModules; + resolvedTypeReferenceDirectiveNames = oldProgram.resolvedTypeReferenceDirectiveNames; resolvedLibReferences = oldProgram.resolvedLibReferences; packageMap = oldProgram.getCurrentPackagesMap(); return 2 /* Completely */; @@ -116836,7 +117698,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config /*importClause*/ void 0, externalHelpersModuleReference, - /*assertClause*/ + /*attributes*/ void 0 ); addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */); @@ -116894,7 +117756,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } } } else if (isModuleDeclaration(node)) { - if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 2 /* Ambient */) || file.isDeclarationFile)) { + if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 128 /* Ambient */) || file.isDeclarationFile)) { node.name.parent = node; const nameText = getTextOfIdentifierOrLiteral(node.name); if (isExternalModuleFile || inAmbientModule && !isExternalModuleNameRelative(nameText)) { @@ -117077,14 +117939,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const result = getImpliedNodeFormatForFileWorker(getNormalizedAbsolutePath(fileName, currentDirectory), moduleResolutionCache2 == null ? void 0 : moduleResolutionCache2.getPackageJsonInfoCache(), host2, options2); const languageVersion = getEmitScriptTarget(options2); const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2); - return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 }; + return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode }; } function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { var _a2; const path = toPath3(fileName); if (useSourceOfProjectReferenceRedirect) { let source = getSourceOfProjectReferenceRedirect(path); - if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && stringContains(fileName, nodeModulesPathPart)) { + if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) { const realPath2 = toPath3(host.realpath(fileName)); if (realPath2 !== path) source = getSourceOfProjectReferenceRedirect(realPath2); @@ -117301,25 +118163,17 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } function processTypeReferenceDirectives(file) { const typeDirectives = file.typeReferenceDirectives; - if (!typeDirectives.length) { - file.resolvedTypeReferenceDirectiveNames = void 0; + if (!typeDirectives.length) return; - } - const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file); + const resolutions = (resolvedTypeReferenceDirectiveNamesProcessing == null ? void 0 : resolvedTypeReferenceDirectiveNamesProcessing.get(file.path)) || resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file); + const resolutionsInFile = createModeAwareCache(); + (resolvedTypeReferenceDirectiveNames ?? (resolvedTypeReferenceDirectiveNames = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile); for (let index = 0; index < typeDirectives.length; index++) { const ref = file.typeReferenceDirectives[index]; const resolvedTypeReferenceDirective = resolutions[index]; const fileName = toFileNameLowerCase(ref.fileName); - setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective, getModeForFileReference(ref, file.impliedNodeFormat)); + resolutionsInFile.set(fileName, getModeForFileReference(ref, file.impliedNodeFormat), resolvedTypeReferenceDirective); const mode = ref.resolutionMode || file.impliedNodeFormat; - if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) { - (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({ - kind: 2 /* ResolutionDiagnostics */, - diagnostics: [ - createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext) - ] - }); - } processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index }); } } @@ -117474,14 +118328,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config collectExternalModuleReferences(file); if (file.imports.length || file.moduleAugmentations.length) { const moduleNames = getModuleNames(file); - const resolutions = resolveModuleNamesReusingOldState(moduleNames, file); + const resolutions = (resolvedModulesProcessing == null ? void 0 : resolvedModulesProcessing.get(file.path)) || resolveModuleNamesReusingOldState(moduleNames, file); Debug.assert(resolutions.length === moduleNames.length); const optionsForFile = (useSourceOfProjectReferenceRedirect ? (_a2 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a2.commandLine.options : void 0) || options; + const resolutionsInFile = createModeAwareCache(); + (resolvedModules ?? (resolvedModules = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile); for (let index = 0; index < moduleNames.length; index++) { const resolution = resolutions[index].resolvedModule; const moduleName = moduleNames[index].text; const mode = getModeForUsageLocation(file, moduleNames[index]); - setResolvedModule(file, moduleName, resolutions[index], mode); + resolutionsInFile.set(moduleName, mode, resolutions[index]); addResolutionDiagnosticsFromResolutionOrCache(file, moduleName, resolutions[index], mode); if (!resolution) { continue; @@ -117512,8 +118368,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config currentNodeModulesDepth--; } } - } else { - file.resolvedModules = void 0; } } function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { @@ -118028,7 +118882,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config processReason(fileProcessingReason); if (locationReason && (fileIncludeReasons == null ? void 0 : fileIncludeReasons.length) === 1) fileIncludeReasons = void 0; - const location = locationReason && getReferencedFileLocation(getSourceFileByPath, locationReason); + const location = locationReason && getReferencedFileLocation(program, locationReason); const fileIncludeReasonDetails = fileIncludeReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon); const redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file); const chain = chainDiagnosticMessages(redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails, diagnostic, ...args || emptyArray); @@ -118064,7 +118918,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } function fileIncludeReasonToRelatedInformation(reason) { if (isReferencedFile(reason)) { - const referenceLocation = getReferencedFileLocation(getSourceFileByPath, reason); + const referenceLocation = getReferencedFileLocation(program, reason); let message2; switch (reason.kind) { case 3 /* Import */: @@ -118113,19 +118967,11 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config case 1 /* SourceFromProjectReference */: case 2 /* OutputFromProjectReference */: const referencedResolvedRef = Debug.checkDefined(resolvedProjectReferences == null ? void 0 : resolvedProjectReferences[reason.index]); - const referenceInfo = forEachProjectReference( - projectReferences, - resolvedProjectReferences, - (resolvedRef, parent, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent == null ? void 0 : parent.sourceFile) || options.configFile, index: index2 } : void 0 - ); + const referenceInfo = forEachProjectReference(projectReferences, resolvedProjectReferences, (resolvedRef, parent, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent == null ? void 0 : parent.sourceFile) || options.configFile, index: index2 } : void 0); if (!referenceInfo) return void 0; const { sourceFile, index } = referenceInfo; - const referencesSyntax = forEachTsConfigPropArray( - sourceFile, - "references", - (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 - ); + const referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0); return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile( sourceFile, referencesSyntax.elements[index], @@ -118265,11 +119111,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config ); } function createDiagnosticForReference(sourceFile, index, message, ...args) { - const referencesSyntax = forEachTsConfigPropArray( - sourceFile || options.configFile, - "references", - (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 - ); + const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0); if (referencesSyntax && referencesSyntax.elements.length > index) { programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args)); } else { @@ -118365,8 +119207,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (!symlinks) { symlinks = createSymlinkCache(currentDirectory, getCanonicalFileName); } - if (files && automaticTypeDirectiveResolutions && !symlinks.hasProcessedResolutions()) { - symlinks.setSymlinksFromResolutions(files, automaticTypeDirectiveResolutions); + if (files && !symlinks.hasProcessedResolutions()) { + symlinks.setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, automaticTypeDirectiveResolutions); } return symlinks; } @@ -118456,7 +119298,7 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) { var _a; if (!host.getResolvedProjectReferences() || containsIgnoredPath(directory)) return; - if (!originalRealpath || !stringContains(directory, nodeModulesPathPart)) + if (!originalRealpath || !directory.includes(nodeModulesPathPart)) return; const symlinkCache = host.getSymlinkCache(); const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory)); @@ -118484,7 +119326,7 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) { if (!symlinkedDirectories) return false; const fileOrDirectoryPath = host.toPath(fileOrDirectory); - if (!stringContains(fileOrDirectoryPath, nodeModulesPathPart)) + if (!fileOrDirectoryPath.includes(nodeModulesPathPart)) return false; if (isFile && ((_a = symlinkCache.getSymlinkedFiles()) == null ? void 0 : _a.has(fileOrDirectoryPath))) return true; @@ -118735,16 +119577,14 @@ var BuilderState; addReferencedFile(referencedPath); } } - if (sourceFile.resolvedTypeReferenceDirectiveNames) { - sourceFile.resolvedTypeReferenceDirectiveNames.forEach(({ resolvedTypeReferenceDirective }) => { - if (!resolvedTypeReferenceDirective) { - return; - } - const fileName = resolvedTypeReferenceDirective.resolvedFileName; - const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName); - addReferencedFile(typeFilePath); - }); - } + program.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective }) => { + if (!resolvedTypeReferenceDirective) { + return; + } + const fileName = resolvedTypeReferenceDirective.resolvedFileName; + const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName); + addReferencedFile(typeFilePath); + }, sourceFile); if (sourceFile.moduleAugmentations.length) { const checker = program.getTypeChecker(); for (const moduleName of sourceFile.moduleAugmentations) { @@ -118863,13 +119703,16 @@ var BuilderState; sourceFile, (fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => { Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`); - onNewSignature(computeSignatureWithDiagnostics( - programOfThisState, - sourceFile, - text, - host, - data - ), sourceFiles); + onNewSignature( + computeSignatureWithDiagnostics( + programOfThisState, + sourceFile, + text, + host, + data + ), + sourceFiles + ); }, cancellationToken, /*emitOnly*/ @@ -119381,10 +120224,7 @@ function removeDiagnosticsOfLibraryFiles(state) { state.cleanedDiagnosticsOfLibFiles = true; const program = Debug.checkDefined(state.program); const options = program.getCompilerOptions(); - forEach( - program.getSourceFiles(), - (f) => program.isSourceFileDefaultLibrary(f) && !skipTypeChecking(f, options, program) && removeSemanticDiagnosticsOf(state, f.resolvedPath) - ); + forEach(program.getSourceFiles(), (f) => program.isSourceFileDefaultLibrary(f) && !skipTypeChecking(f, options, program) && removeSemanticDiagnosticsOf(state, f.resolvedPath)); } } function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, host) { @@ -119452,12 +120292,14 @@ function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, hos state.program, /*firstSourceFile*/ void 0 - ).forEach((file) => handleDtsMayChangeOf( - state, - file.resolvedPath, - cancellationToken, - host - )); + ).forEach( + (file) => handleDtsMayChangeOf( + state, + file.resolvedPath, + cancellationToken, + host + ) + ); removeDiagnosticsOfLibraryFiles(state); return true; } @@ -119490,16 +120332,13 @@ function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, host)) return true; const references = state.referencedMap.getKeys(exportedFromPath); - return references && forEachKey( - references, - (filePath) => handleDtsMayChangeOfFileAndExportsOfFile( - state, - filePath, - seenFileAndExportsOfFile, - cancellationToken, - host - ) - ); + return references && forEachKey(references, (filePath) => handleDtsMayChangeOfFileAndExportsOfFile( + state, + filePath, + seenFileAndExportsOfFile, + cancellationToken, + host + )); }); } function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, host) { @@ -119607,11 +120446,13 @@ function getBuildInfo2(state, bundle) { if (!isJsonSourceFile(file) && sourceFileMayBeEmitted(file, state.program)) { const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(key); if (emitSignature !== actualSignature) { - (emitSignatures || (emitSignatures = [])).push(emitSignature === void 0 ? fileId : ( - // There is no emit, encode as false - // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature - [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature] - )); + (emitSignatures || (emitSignatures = [])).push( + emitSignature === void 0 ? fileId : ( + // There is no emit, encode as false + // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature + [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature] + ) + ); } } } @@ -119865,9 +120706,7 @@ function computeSignatureWithDiagnostics(program, sourceFile, text, host, data) text = getTextHandlingSourceMapForSignature(text, data); let sourceFileDirectory; if ((_a = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a.length) { - text += data.diagnostics.map( - (diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}` - ).join("\n"); + text += data.diagnostics.map((diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}`).join("\n"); } return (host.createHash ?? generateDjb2Hash)(text); function flattenDiagnosticMessageText2(diagnostic) { @@ -120274,9 +121113,7 @@ function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, hos return void 0; } const map2 = BuilderState.createManyToManyPathMap(); - referenceMap.forEach( - ([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId)) - ); + referenceMap.forEach(([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId))); return map2; } } @@ -120345,24 +121182,27 @@ function removeIgnoredPath(path) { if (endsWith(path, "/node_modules/.staging")) { return removeSuffix(path, "/.staging"); } - return some(ignoredPaths, (searchPath) => stringContains(path, searchPath)) ? void 0 : path; + return some(ignoredPaths, (searchPath) => path.includes(searchPath)) ? void 0 : path; } function perceivedOsRootLengthForWatching(pathComponents2, length2) { if (length2 <= 1) return 1; - let userCheckIndex = 1; + let indexAfterOsRoot = 1; let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0; if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) { if (length2 === 2) return 2; - userCheckIndex = 2; + indexAfterOsRoot = 2; isDosStyle = true; } - if (isDosStyle && !pathComponents2[userCheckIndex].match(/^users$/i)) { - return userCheckIndex; + if (isDosStyle && !pathComponents2[indexAfterOsRoot].match(/^users$/i)) { + return indexAfterOsRoot; + } + if (pathComponents2[indexAfterOsRoot].match(/^workspaces$/i)) { + return indexAfterOsRoot + 1; } - return userCheckIndex + 2; + return indexAfterOsRoot + 2; } function canWatchDirectoryOrFile(pathComponents2, length2) { if (length2 === void 0) @@ -120462,6 +121302,50 @@ function getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirec const normalized = getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()); return !isDiskPathRoot(normalized) ? removeTrailingDirectorySeparator(normalized) : normalized; } +function getModuleResolutionHost(resolutionHost) { + var _a; + return ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; +} +function createModuleResolutionLoaderUsingGlobalCache(containingFile, redirectedReference, options, resolutionHost, moduleResolutionCache) { + return { + nameAndMode: moduleResolutionNameAndModeGetter, + resolve: (moduleName, resoluionMode) => resolveModuleNameUsingGlobalCache( + resolutionHost, + moduleResolutionCache, + moduleName, + containingFile, + options, + redirectedReference, + resoluionMode + ) + }; +} +function resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, compilerOptions, redirectedReference, mode) { + const host = getModuleResolutionHost(resolutionHost); + const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); + if (!resolutionHost.getGlobalCache) { + return primaryResult; + } + const globalCache = resolutionHost.getGlobalCache(); + if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { + const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( + Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), + resolutionHost.projectName, + compilerOptions, + host, + globalCache, + moduleResolutionCache + ); + if (resolvedModule) { + primaryResult.resolvedModule = resolvedModule; + primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations); + primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations); + primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics); + return primaryResult; + } + } + return primaryResult; +} function createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) { let filesWithChangedSetOfUnresolvedImports; let filesWithInvalidatedResolutions; @@ -120491,7 +121375,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW getCurrentDirectory(), resolutionHost.getCanonicalFileName, resolutionHost.getCompilationSettings(), - moduleResolutionCache.getPackageJsonInfoCache() + moduleResolutionCache.getPackageJsonInfoCache(), + moduleResolutionCache.optionsToRedirectsKey ); const resolvedLibraries = /* @__PURE__ */ new Map(); const libraryResolutionCache = createModuleResolutionCache( @@ -120507,6 +121392,16 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW const rootPathComponents = getPathComponents(rootPath); const typeRootsWatches = /* @__PURE__ */ new Map(); return { + rootDirForResolution, + resolvedModuleNames, + resolvedTypeReferenceDirectives, + resolvedLibraries, + resolvedFileToResolution, + resolutionsWithFailedLookups, + resolutionsWithOnlyAffectingLocations, + directoryWatchesOfFailedLookups, + fileWatchesOfAffectingLocations, + watchFailedLookupLocationsOfExternalModuleResolutions, getModuleResolutionCache: () => moduleResolutionCache, startRecordingFilesWithChangedResolutions, finishRecordingFilesWithChangedResolutions, @@ -120531,7 +121426,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW clear: clear2, onChangesAffectModuleResolution }; - function getResolvedModule2(resolution) { + function getResolvedModule(resolution) { return resolution.resolvedModule; } function getResolvedTypeReferenceDirective(resolution) { @@ -120597,6 +121492,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW }; } function startCachingPerDirectoryResolution() { + moduleResolutionCache.isReadonly = void 0; + typeReferenceDirectiveResolutionCache.isReadonly = void 0; + libraryResolutionCache.isReadonly = void 0; + moduleResolutionCache.getPackageJsonInfoCache().isReadonly = void 0; moduleResolutionCache.clearAllExceptPackageJsonInfoCache(); typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache(); libraryResolutionCache.clearAllExceptPackageJsonInfoCache(); @@ -120609,8 +121508,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW if (!((_a = newProgram == null ? void 0 : newProgram.resolvedLibReferences) == null ? void 0 : _a.has(libFileName))) { stopWatchFailedLookupLocationOfResolution( resolution, - resolutionHost.toPath(getInferredLibraryNameResolveFrom(newProgram.getCompilerOptions(), getCurrentDirectory(), libFileName)), - getResolvedModule2 + resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)), + getResolvedModule ); resolvedLibraries.delete(libFileName); } @@ -120651,58 +121550,26 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW } }); } - directoryWatchesOfFailedLookups.forEach((watcher, path) => { - if (watcher.refCount === 0) { - directoryWatchesOfFailedLookups.delete(path); - watcher.watcher.close(); - } - }); - fileWatchesOfAffectingLocations.forEach((watcher, path) => { - if (watcher.files === 0 && watcher.resolutions === 0) { - fileWatchesOfAffectingLocations.delete(path); - watcher.watcher.close(); - } - }); + directoryWatchesOfFailedLookups.forEach(closeDirectoryWatchesOfFailedLookup); + fileWatchesOfAffectingLocations.forEach(closeFileWatcherOfAffectingLocation); hasChangedAutomaticTypeDirectiveNames = false; + moduleResolutionCache.isReadonly = true; + typeReferenceDirectiveResolutionCache.isReadonly = true; + libraryResolutionCache.isReadonly = true; + moduleResolutionCache.getPackageJsonInfoCache().isReadonly = true; } - function resolveModuleName2(moduleName, containingFile, compilerOptions, redirectedReference, mode) { - var _a; - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; - const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); - if (!resolutionHost.getGlobalCache) { - return primaryResult; + function closeDirectoryWatchesOfFailedLookup(watcher, path) { + if (watcher.refCount === 0) { + directoryWatchesOfFailedLookups.delete(path); + watcher.watcher.close(); } - const globalCache = resolutionHost.getGlobalCache(); - if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { - const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( - Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), - resolutionHost.projectName, - compilerOptions, - host, - globalCache, - moduleResolutionCache - ); - if (resolvedModule) { - primaryResult.resolvedModule = resolvedModule; - primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations); - primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations); - primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics); - return primaryResult; - } - } - return primaryResult; } - function createModuleResolutionLoader2(containingFile, redirectedReference, options) { - return { - nameAndMode: moduleResolutionNameAndModeGetter, - resolve: (moduleName, resoluionMode) => resolveModuleName2( - moduleName, - containingFile, - options, - redirectedReference, - resoluionMode - ) - }; + function closeFileWatcherOfAffectingLocation(watcher, path) { + var _a; + if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) { + fileWatchesOfAffectingLocations.delete(path); + watcher.watcher.close(); + } } function resolveNamesWithLocalCache({ entries, @@ -120718,7 +121585,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW shouldRetryResolution, logChanges }) { - var _a; const path = resolutionHost.toPath(containingFile); const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path); const resolvedModules = []; @@ -120739,16 +121605,18 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW resolutionHost.onDiscoveredSymlink(); } resolutionsInFile.set(name, mode, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); - if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); + if (resolution !== existingResolution) { + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); + if (existingResolution) { + stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); + } } if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) { filesWithChangedSetOfUnresolvedImports.push(path); logChanges = false; } } else { - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; + const host = getModuleResolutionHost(resolutionHost); if (isTraceEnabled(options, host) && !seenNamesInFile.has(name, mode)) { const resolved = getResolutionWithResolvedFileName(resolution); trace( @@ -120765,11 +121633,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW seenNamesInFile.set(name, mode, true); resolvedModules.push(resolution); } - reusedNames == null ? void 0 : reusedNames.forEach((entry) => seenNamesInFile.set( - loader.nameAndMode.getName(entry), - loader.nameAndMode.getMode(entry, containingSourceFile), - true - )); + reusedNames == null ? void 0 : reusedNames.forEach( + (entry) => seenNamesInFile.set( + loader.nameAndMode.getName(entry), + loader.nameAndMode.getMode(entry, containingSourceFile), + true + ) + ); if (resolutionsInFile.size() !== seenNamesInFile.size()) { resolutionsInFile.forEach((resolution, name, mode) => { if (!seenNamesInFile.has(name, mode)) { @@ -120798,7 +121668,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW } } function resolveTypeReferenceDirectiveReferences(typeDirectiveReferences, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { - var _a; return resolveNamesWithLocalCache({ entries: typeDirectiveReferences, containingFile, @@ -120811,7 +121680,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW containingFile, redirectedReference, options, - ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost, + getModuleResolutionHost(resolutionHost), typeReferenceDirectiveResolutionCache ), getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective, @@ -120828,12 +121697,14 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW options, reusedNames, perFileCache: resolvedModuleNames, - loader: createModuleResolutionLoader2( + loader: createModuleResolutionLoaderUsingGlobalCache( containingFile, redirectedReference, - options + options, + resolutionHost, + moduleResolutionCache ), - getResolutionWithResolvedFileName: getResolvedModule2, + getResolutionWithResolvedFileName: getResolvedModule, shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension), logChanges: logChangesWhenResolvingModule, deferWatchingNonRelativeResolution: true @@ -120841,8 +121712,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW }); } function resolveLibrary2(libraryName, resolveFrom, options, libFileName) { - var _a; - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; + const host = getModuleResolutionHost(resolutionHost); let resolution = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName); if (!resolution || resolution.isInvalidated) { const existingResolution = resolution; @@ -120852,17 +121722,17 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW libraryName, resolution, path, - getResolvedModule2, + getResolvedModule, /*deferWatchingNonRelativeResolution*/ false ); resolvedLibraries.set(libFileName, resolution); if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModule2); + stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModule); } } else { if (isTraceEnabled(options, host)) { - const resolved = getResolvedModule2(resolution); + const resolved = getResolvedModule(resolution); trace( host, (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, @@ -120876,6 +121746,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW return resolution; } function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) { + var _a, _b; const path = resolutionHost.toPath(containingFile); const resolutionsInFile = resolvedModuleNames.get(path); const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get( @@ -120885,7 +121756,17 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW ); if (resolution && !resolution.isInvalidated) return resolution; - return resolveModuleName2(moduleName, containingFile, resolutionHost.getCompilationSettings()); + const data = (_a = resolutionHost.beforeResolveSingleModuleNameWithoutWatching) == null ? void 0 : _a.call(resolutionHost, moduleResolutionCache); + const host = getModuleResolutionHost(resolutionHost); + const result = resolveModuleName( + moduleName, + containingFile, + resolutionHost.getCompilationSettings(), + host, + moduleResolutionCache + ); + (_b = resolutionHost.afterResolveSingleModuleNameWithoutWatching) == null ? void 0 : _b.call(resolutionHost, moduleResolutionCache, moduleName, containingFile, result, data); + return result; } function isNodeModulesAtTypesDirectory(dirPath) { return endsWith(dirPath, "/node_modules/@types"); @@ -120985,52 +121866,63 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW return; } let locationToWatch = affectingLocation; + let isSymlink = false; + let symlinkWatcher; if (resolutionHost.realpath) { locationToWatch = resolutionHost.realpath(affectingLocation); if (affectingLocation !== locationToWatch) { - const fileWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch); - if (fileWatcher2) { - if (forResolution) - fileWatcher2.resolutions++; - else - fileWatcher2.files++; - fileWatcher2.paths.add(affectingLocation); - fileWatchesOfAffectingLocations.set(affectingLocation, fileWatcher2); - return; - } - } - } - const paths = /* @__PURE__ */ new Set(); - paths.add(locationToWatch); - let actualWatcher = canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => { - cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind); - const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap(); - paths.forEach((path) => { - if (watcher.resolutions) - (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path); - if (watcher.files) - (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path); - packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path)); - }); - resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); - }) : noopFileWatcher; - const watcher = { - watcher: actualWatcher !== noopFileWatcher ? { - close: () => { - actualWatcher.close(); - actualWatcher = noopFileWatcher; - } - } : actualWatcher, - resolutions: forResolution ? 1 : 0, - files: forResolution ? 0 : 1, - paths - }; - fileWatchesOfAffectingLocations.set(locationToWatch, watcher); - if (affectingLocation !== locationToWatch) { + isSymlink = true; + symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch); + } + } + const resolutions = forResolution ? 1 : 0; + const files = forResolution ? 0 : 1; + if (!isSymlink || !symlinkWatcher) { + const watcher = { + watcher: canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => { + cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind); + invalidateAffectingFileWatcher(locationToWatch, moduleResolutionCache.getPackageJsonInfoCache().getInternalMap()); + resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); + }) : noopFileWatcher, + resolutions: isSymlink ? 0 : resolutions, + files: isSymlink ? 0 : files, + symlinks: void 0 + }; + fileWatchesOfAffectingLocations.set(locationToWatch, watcher); + if (isSymlink) + symlinkWatcher = watcher; + } + if (isSymlink) { + Debug.assert(!!symlinkWatcher); + const watcher = { + watcher: { + close: () => { + var _a; + const symlinkWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch); + if (((_a = symlinkWatcher2 == null ? void 0 : symlinkWatcher2.symlinks) == null ? void 0 : _a.delete(affectingLocation)) && !symlinkWatcher2.symlinks.size && !symlinkWatcher2.resolutions && !symlinkWatcher2.files) { + fileWatchesOfAffectingLocations.delete(locationToWatch); + symlinkWatcher2.watcher.close(); + } + } + }, + resolutions, + files, + symlinks: void 0 + }; fileWatchesOfAffectingLocations.set(affectingLocation, watcher); - paths.add(affectingLocation); + (symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation); } } + function invalidateAffectingFileWatcher(path, packageJsonMap) { + var _a; + const watcher = fileWatchesOfAffectingLocations.get(path); + if (watcher == null ? void 0 : watcher.resolutions) + (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path); + if (watcher == null ? void 0 : watcher.files) + (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path); + (_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path2) => invalidateAffectingFileWatcher(path2, packageJsonMap)); + packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path)); + } function watchFailedLookupLocationOfNonRelativeModuleResolutions(resolutions, name) { const program = resolutionHost.getCurrentProgram(); if (!program || !program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(name)) { @@ -121052,7 +121944,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW directoryWatchesOfFailedLookups.set(dirPath, { watcher: createDirectoryWatcher(dir, dirPath, nonRecursive), refCount: 1, nonRecursive }); } } - function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot) { + function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove) { const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); const toWatch = getDirectoryToWatchFailedLookupLocation( failedLookupLocation, @@ -121067,12 +121959,12 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW if (dirPath === rootPath) { removeAtRoot = true; } else { - removeDirectoryWatcher(dirPath); + removeDirectoryWatcher(dirPath, syncDirWatcherRemove); } } return removeAtRoot; } - function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) { + function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) { Debug.checkDefined(resolution.files).delete(filePath); resolution.refCount--; if (resolution.refCount) { @@ -121090,13 +121982,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW let removeAtRoot = false; if (failedLookupLocations) { for (const failedLookupLocation of failedLookupLocations) { - removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot); + removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove); } } if (node10Result) - removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot); + removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot, syncDirWatcherRemove); if (removeAtRoot) - removeDirectoryWatcher(rootPath); + removeDirectoryWatcher(rootPath, syncDirWatcherRemove); } else if (affectingLocations == null ? void 0 : affectingLocations.length) { resolutionsWithOnlyAffectingLocations.delete(resolution); } @@ -121104,12 +121996,16 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW for (const affectingLocation of affectingLocations) { const watcher = fileWatchesOfAffectingLocations.get(affectingLocation); watcher.resolutions--; + if (syncDirWatcherRemove) + closeFileWatcherOfAffectingLocation(watcher, affectingLocation); } } } - function removeDirectoryWatcher(dirPath) { + function removeDirectoryWatcher(dirPath, syncDirWatcherRemove) { const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath); dirWatcher.refCount--; + if (syncDirWatcherRemove) + closeDirectoryWatchesOfFailedLookup(dirWatcher, dirPath); } function createDirectoryWatcher(directory, dirPath, nonRecursive) { return resolutionHost.watchDirectoryOfFailedLookupLocation(directory, (fileOrDirectory) => { @@ -121120,10 +122016,17 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath); }, nonRecursive ? 0 /* None */ : 1 /* Recursive */); } - function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) { + function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) { const resolutions = cache.get(filePath); if (resolutions) { - resolutions.forEach((resolution) => stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName)); + resolutions.forEach( + (resolution) => stopWatchFailedLookupLocationOfResolution( + resolution, + filePath, + getResolutionWithResolvedFileName, + syncDirWatcherRemove + ) + ); cache.delete(filePath); } } @@ -121138,9 +122041,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW return; resolvedProjectReference.commandLine.fileNames.forEach((f) => removeResolutionsOfFile(resolutionHost.toPath(f))); } - function removeResolutionsOfFile(filePath) { - removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule2); - removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective); + function removeResolutionsOfFile(filePath, syncDirWatcherRemove) { + removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule, syncDirWatcherRemove); + removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective, syncDirWatcherRemove); } function invalidateResolutions(resolutions, canInvalidate) { if (!resolutions) @@ -121398,10 +122301,7 @@ function getFilesInErrorForSummary(diagnostics) { if (fileName === void 0) { return void 0; } - const diagnosticForFileName = find( - diagnostics, - (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName - ); + const diagnosticForFileName = find(diagnostics, (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName); if (diagnosticForFileName !== void 0) { const { line } = getLineAndCharacterOfPosition(diagnosticForFileName.file, diagnosticForFileName.start); return { @@ -121569,7 +122469,7 @@ function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) { var _a, _b; const options = program.getCompilerOptions(); if (isReferencedFile(reason)) { - const referenceLocation = getReferencedFileLocation((path) => program.getSourceFileByPath(path), reason); + const referenceLocation = getReferencedFileLocation(program, reason); const referenceText = isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : `"${referenceLocation.text}"`; let message; Debug.assert(isReferenceFileLocation(referenceLocation) || reason.kind === 3 /* Import */, "Only synthetic references are imports"); @@ -121819,7 +122719,8 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt getEnvironmentVariable: maybeBind(host, host.getEnvironmentVariable) || (() => ""), createHash: maybeBind(host, host.createHash), readDirectory: maybeBind(host, host.readDirectory), - storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit + storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit, + jsDocParsingMode: host.jsDocParsingMode }; return compilerHost; } @@ -122011,7 +122912,7 @@ function createIncrementalProgram({ } function createWatchProgram(host) { let builderProgram; - let reloadLevel; + let updateLevel; let missingFilesMap; let watchedWildcardDirectories; let timerToUpdateProgram; @@ -122104,7 +123005,7 @@ function createWatchProgram(host) { watchConfigFileWildCardDirectories(); if (configFileName) updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile); - return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close }; + return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close, getResolutionCache } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close, getResolutionCache }; function close() { clearInvalidateResolutionsOfFailedLookupLocations(); resolutionCache.clear(); @@ -122144,6 +123045,9 @@ function createWatchProgram(host) { parsedConfigs = void 0; } } + function getResolutionCache() { + return resolutionCache; + } function getCurrentBuilderProgram() { return builderProgram; } @@ -122367,7 +123271,7 @@ function createWatchProgram(host) { } function scheduleProgramReload() { Debug.assert(!!configFileName); - reloadLevel = 2 /* Full */; + updateLevel = 2 /* Full */; scheduleProgramUpdate(); } function updateProgramWithWatchStatus() { @@ -122377,8 +123281,8 @@ function createWatchProgram(host) { } function updateProgram() { var _a, _b, _c, _d; - switch (reloadLevel) { - case 1 /* Partial */: + switch (updateLevel) { + case 1 /* RootNamesAndUpdate */: (_a = perfLogger) == null ? void 0 : _a.logStartUpdateProgram("PartialConfigReload"); reloadFileNamesFromConfigFile(); break; @@ -122398,7 +123302,7 @@ function createWatchProgram(host) { writeLog("Reloading new file names and options"); Debug.assert(compilerOptions); Debug.assert(configFileName); - reloadLevel = 0 /* None */; + updateLevel = 0 /* Update */; rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions); if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) { hasChangedConfigFileParsingErrors = true; @@ -122408,7 +123312,7 @@ function createWatchProgram(host) { function reloadConfigFile() { Debug.assert(configFileName); writeLog(`Reloading config file: ${configFileName}`); - reloadLevel = 0 /* None */; + updateLevel = 0 /* Update */; if (cachedDirectoryStructureHost) { cachedDirectoryStructureHost.clearCache(); } @@ -122420,14 +123324,16 @@ function createWatchProgram(host) { } function parseConfigFile2() { Debug.assert(configFileName); - setConfigFileParsingResult(getParsedCommandLineOfConfigFile( - configFileName, - optionsToExtendForConfigFile, - parseConfigFileHost, - extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()), - watchOptionsToExtend, - extraFileExtensions - )); + setConfigFileParsingResult( + getParsedCommandLineOfConfigFile( + configFileName, + optionsToExtendForConfigFile, + parseConfigFileHost, + extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()), + watchOptionsToExtend, + extraFileExtensions + ) + ); } function setConfigFileParsingResult(configFileParseResult) { rootFileNames = configFileParseResult.fileNames; @@ -122443,9 +123349,9 @@ function createWatchProgram(host) { const configPath = toPath3(configFileName2); let config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); if (config) { - if (!config.reloadLevel) + if (!config.updateLevel) return config.parsedCommandLine; - if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) { + if (config.parsedCommandLine && config.updateLevel === 1 /* RootNamesAndUpdate */ && !host.getParsedCommandLine) { writeLog("Reloading new file names and options"); Debug.assert(compilerOptions); const fileNames = getFileNamesFromConfigSpecs( @@ -122455,7 +123361,7 @@ function createWatchProgram(host) { parseConfigFileHost ); config.parsedCommandLine = { ...config.parsedCommandLine, fileNames }; - config.reloadLevel = void 0; + config.updateLevel = void 0; return config.parsedCommandLine; } } @@ -122463,7 +123369,7 @@ function createWatchProgram(host) { const parsedCommandLine = host.getParsedCommandLine ? host.getParsedCommandLine(configFileName2) : getParsedCommandLineFromConfigFileHost(configFileName2); if (config) { config.parsedCommandLine = parsedCommandLine; - config.reloadLevel = void 0; + config.updateLevel = void 0; } else { (parsedConfigs || (parsedConfigs = /* @__PURE__ */ new Map())).set(configPath, config = { parsedCommandLine }); } @@ -122560,8 +123466,8 @@ function createWatchProgram(host) { toPath: toPath3 })) return; - if (reloadLevel !== 2 /* Full */) { - reloadLevel = 1 /* Partial */; + if (updateLevel !== 2 /* Full */) { + updateLevel = 1 /* RootNamesAndUpdate */; scheduleProgramUpdate(); } }, @@ -122587,11 +123493,11 @@ function createWatchProgram(host) { return; projects.forEach((projectPath) => { if (configFileName && toPath3(configFileName) === projectPath) { - reloadLevel = 2 /* Full */; + updateLevel = 2 /* Full */; } else { const config = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath); if (config) - config.reloadLevel = 2 /* Full */; + config.updateLevel = 2 /* Full */; resolutionCache.removeResolutionsFromProjectReferenceRedirects(projectPath); } scheduleProgramUpdate(); @@ -122612,7 +123518,7 @@ function createWatchProgram(host) { updateCachedSystemWithFile(configFileName2, configPath, eventKind); const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); if (config) - config.reloadLevel = 2 /* Full */; + config.updateLevel = 2 /* Full */; resolutionCache.removeResolutionsFromProjectReferenceRedirects(configPath); scheduleProgramUpdate(); }, @@ -122650,8 +123556,8 @@ function createWatchProgram(host) { toPath: toPath3 })) return; - if (config.reloadLevel !== 2 /* Full */) { - config.reloadLevel = 1 /* Partial */; + if (config.updateLevel !== 2 /* Full */) { + config.updateLevel = 1 /* RootNamesAndUpdate */; scheduleProgramUpdate(); } }, @@ -122795,7 +123701,8 @@ function createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, optio compilerHost.getCanonicalFileName, /*options*/ void 0, - moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache() + moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(), + moduleResolutionCache == null ? void 0 : moduleResolutionCache.optionsToRedirectsKey ); compilerHost.resolveTypeReferenceDirectiveReferences = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( typeDirectiveNames, @@ -123092,12 +123999,12 @@ function clearProjectStatus(state, resolved) { state.projectStatus.delete(resolved); state.diagnostics.delete(resolved); } -function addProjToQueue({ projectPendingBuild }, proj, reloadLevel) { +function addProjToQueue({ projectPendingBuild }, proj, updateLevel) { const value = projectPendingBuild.get(proj); if (value === void 0) { - projectPendingBuild.set(proj, reloadLevel); - } else if (value < reloadLevel) { - projectPendingBuild.set(proj, reloadLevel); + projectPendingBuild.set(proj, updateLevel); + } else if (value < updateLevel) { + projectPendingBuild.set(proj, updateLevel); } } function setupInitialBuild(state, cancellationToken) { @@ -123111,7 +124018,7 @@ function setupInitialBuild(state, cancellationToken) { buildOrder.forEach( (configFileName) => state.projectPendingBuild.set( toResolvedConfigFilePath(state, configFileName), - 0 /* None */ + 0 /* Update */ ) ); if (cancellationToken) { @@ -123264,10 +124171,13 @@ function createBuildOrUpdateInvalidedProject(kind, state, project, projectPath, config.projectReferences ); if (state.watch) { - state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && map( - state.moduleResolutionCache.getPackageJsonInfoCache().entries(), - ([path, data]) => [state.host.realpath && data ? toPath2(state, state.host.realpath(path)) : path, data] - )); + state.lastCachedPackageJsonLookups.set( + projectPath, + state.moduleResolutionCache && map( + state.moduleResolutionCache.getPackageJsonInfoCache().entries(), + ([path, data]) => [state.host.realpath && data ? toPath2(state, state.host.realpath(path)) : path, data] + ) + ); state.builderPrograms.set(projectPath, program); } step++; @@ -123544,8 +124454,8 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) { for (let projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) { const project = buildOrder[projectIndex]; const projectPath = toResolvedConfigFilePath(state, project); - const reloadLevel = state.projectPendingBuild.get(projectPath); - if (reloadLevel === void 0) + const updateLevel = state.projectPendingBuild.get(projectPath); + if (updateLevel === void 0) continue; if (reportQueue) { reportQueue = false; @@ -123557,13 +124467,13 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) { projectPendingBuild.delete(projectPath); continue; } - if (reloadLevel === 2 /* Full */) { + if (updateLevel === 2 /* Full */) { watchConfigFile(state, project, projectPath, config); watchExtendedConfigFiles(state, projectPath, config); watchWildCardDirectories(state, project, projectPath, config); watchInputFiles(state, project, projectPath, config); watchPackageJsonFiles(state, project, projectPath, config); - } else if (reloadLevel === 1 /* Partial */) { + } else if (updateLevel === 1 /* RootNamesAndUpdate */) { config.fileNames = getFileNamesFromConfigSpecs(config.options.configFile.configFileSpecs, getDirectoryPath(project), config.options, state.parseConfigFileHost); updateErrorForNoInputFiles(config.fileNames, project, config.options.configFile.configFileSpecs, config.errors, canJsonReportNoInputFiles(config.raw)); watchInputFiles(state, project, projectPath, config); @@ -124150,7 +125060,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con break; } } - addProjToQueue(state, nextProjectPath, 0 /* None */); + addProjToQueue(state, nextProjectPath, 0 /* Update */); break; } } @@ -124219,7 +125129,7 @@ function cleanWorker(state, project, onlyReferences) { filesToDelete.push(output); } else { host.deleteFile(output); - invalidateProject(state, resolvedPath, 0 /* None */); + invalidateProject(state, resolvedPath, 0 /* Update */); } } } @@ -124230,22 +125140,22 @@ function cleanWorker(state, project, onlyReferences) { } return 0 /* Success */; } -function invalidateProject(state, resolved, reloadLevel) { - if (state.host.getParsedCommandLine && reloadLevel === 1 /* Partial */) { - reloadLevel = 2 /* Full */; +function invalidateProject(state, resolved, updateLevel) { + if (state.host.getParsedCommandLine && updateLevel === 1 /* RootNamesAndUpdate */) { + updateLevel = 2 /* Full */; } - if (reloadLevel === 2 /* Full */) { + if (updateLevel === 2 /* Full */) { state.configFileCache.delete(resolved); state.buildOrder = void 0; } state.needsSummary = true; clearProjectStatus(state, resolved); - addProjToQueue(state, resolved, reloadLevel); + addProjToQueue(state, resolved, updateLevel); enableCache(state); } -function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) { +function invalidateProjectAndScheduleBuilds(state, resolvedPath, updateLevel) { state.reportFileChangeDetected = true; - invalidateProject(state, resolvedPath, reloadLevel); + invalidateProject(state, resolvedPath, updateLevel); scheduleBuildInvalidatedProject( state, 250, @@ -124321,15 +125231,18 @@ function buildNextInvalidatedProjectWorker(state, changeDetected) { function watchConfigFile(state, resolved, resolvedPath, parsed) { if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath)) return; - state.allWatchedConfigFiles.set(resolvedPath, watchFile( - state, - resolved, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 2 /* Full */), - 2e3 /* High */, - parsed == null ? void 0 : parsed.watchOptions, - WatchType.ConfigFile, - resolved - )); + state.allWatchedConfigFiles.set( + resolvedPath, + watchFile( + state, + resolved, + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 2 /* Full */), + 2e3 /* High */, + parsed == null ? void 0 : parsed.watchOptions, + WatchType.ConfigFile, + resolved + ) + ); } function watchExtendedConfigFiles(state, resolvedPath, parsed) { updateSharedExtendedConfigFileWatcher( @@ -124373,7 +125286,7 @@ function watchWildCardDirectories(state, resolved, resolvedPath, parsed) { toPath: (fileName) => toPath2(state, fileName) })) return; - invalidateProjectAndScheduleBuilds(state, resolvedPath, 1 /* Partial */); + invalidateProjectAndScheduleBuilds(state, resolvedPath, 1 /* RootNamesAndUpdate */); }, flags, parsed == null ? void 0 : parsed.watchOptions, @@ -124392,7 +125305,7 @@ function watchInputFiles(state, resolved, resolvedPath, parsed) { createNewValue: (_path, input) => watchFile( state, input, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* None */), + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* Update */), 250 /* Low */, parsed == null ? void 0 : parsed.watchOptions, WatchType.SourceFile, @@ -124412,7 +125325,7 @@ function watchPackageJsonFiles(state, resolved, resolvedPath, parsed) { createNewValue: (path, _input) => watchFile( state, path, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* None */), + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* Update */), 2e3 /* High */, parsed == null ? void 0 : parsed.watchOptions, WatchType.PackageJson, @@ -124483,7 +125396,7 @@ function createSolutionBuilderWorker(watch, hostOrHostWithWatch, rootNames, opti const configFilePath = toResolvedConfigFilePath(state, configFileName); return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath); }, - invalidateProject: (configFilePath, reloadLevel) => invalidateProject(state, configFilePath, reloadLevel || 0 /* None */), + invalidateProject: (configFilePath, updateLevel) => invalidateProject(state, configFilePath, updateLevel || 0 /* Update */), close: () => stopWatching(state) }; } @@ -124752,7 +125665,7 @@ function createColors(sys2) { function bold(str) { return `\x1B[1m${str}\x1B[22m`; } - const isWindows = sys2.getEnvironmentVariable("OS") && stringContains(sys2.getEnvironmentVariable("OS").toLowerCase(), "windows"); + const isWindows = sys2.getEnvironmentVariable("OS") && sys2.getEnvironmentVariable("OS").toLowerCase().includes("windows"); const isWindowsTerminal = sys2.getEnvironmentVariable("WT_SESSION"); const isVSCode = sys2.getEnvironmentVariable("TERM_PROGRAM") && sys2.getEnvironmentVariable("TERM_PROGRAM") === "vscode"; function blue(str) { @@ -124876,11 +125789,11 @@ function generateOptionOutput(sys2, option, rightAlignOfLeft, leftAlignOfRight) while (remainRight.length > 0) { let curLeft = ""; if (isFirstLine) { - curLeft = padLeft(left, rightAlignOfLeft2); - curLeft = padRight(curLeft, leftAlignOfRight2); + curLeft = left.padStart(rightAlignOfLeft2); + curLeft = curLeft.padEnd(leftAlignOfRight2); curLeft = colorLeft ? colors.blue(curLeft) : curLeft; } else { - curLeft = padLeft("", leftAlignOfRight2); + curLeft = "".padStart(leftAlignOfRight2); } const curRight = remainRight.substr(0, rightCharacterNumber); remainRight = remainRight.slice(rightCharacterNumber); @@ -125020,12 +125933,7 @@ function printEasyHelp(sys2, simpleOptions) { false, /*beforeOptionsDescription*/ void 0, - formatMessage( - /*dummy*/ - void 0, - Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, - "https://aka.ms/tsc" - ) + formatMessage(Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc") ) ]; for (const line of output) { @@ -125049,12 +125957,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) { true, /*beforeOptionsDescription*/ void 0, - formatMessage( - /*dummy*/ - void 0, - Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, - "https://aka.ms/tsc" - ) + formatMessage(Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsc") )]; output = [...output, ...generateSectionOptionsOutput( sys2, @@ -125070,12 +125973,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) { buildOptions, /*subCategory*/ false, - formatMessage( - /*dummy*/ - void 0, - Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, - "https://aka.ms/tsc-composite-builds" - ) + formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds") )]; for (const line of output) { sys2.write(line); @@ -125089,12 +125987,7 @@ function printBuildHelp(sys2, buildOptions) { buildOptions, /*subCategory*/ false, - formatMessage( - /*dummy*/ - void 0, - Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, - "https://aka.ms/tsc-composite-builds" - ) + formatMessage(Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0, "https://aka.ms/tsc-composite-builds") )]; for (const line of output) { sys2.write(line); @@ -125106,13 +125999,13 @@ function getHeader(sys2, message) { const header = []; const terminalWidth = ((_a = sys2.getWidthOfTerminal) == null ? void 0 : _a.call(sys2)) ?? 0; const tsIconLength = 5; - const tsIconFirstLine = colors.blueBackground(padLeft("", tsIconLength)); - const tsIconSecondLine = colors.blueBackground(colors.brightWhite(padLeft("TS ", tsIconLength))); + const tsIconFirstLine = colors.blueBackground("".padStart(tsIconLength)); + const tsIconSecondLine = colors.blueBackground(colors.brightWhite("TS ".padStart(tsIconLength))); if (terminalWidth >= message.length + tsIconLength) { const rightAlign = terminalWidth > 120 ? 120 : terminalWidth; const leftAlign = rightAlign - tsIconLength; - header.push(padRight(message, leftAlign) + tsIconFirstLine + sys2.newLine); - header.push(padLeft("", leftAlign) + tsIconSecondLine + sys2.newLine); + header.push(message.padEnd(leftAlign) + tsIconFirstLine + sys2.newLine); + header.push("".padStart(leftAlign) + tsIconSecondLine + sys2.newLine); } else { header.push(message + sys2.newLine); header.push(sys2.newLine); @@ -125328,6 +126221,7 @@ function reportWatchModeWithoutSysSupport(sys2, reportDiagnostic) { } return false; } +var defaultJSDocParsingMode = 2 /* ParseForTypeErrors */; function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) { const reportDiagnostic = updateReportDiagnostic( sys2, @@ -125366,6 +126260,7 @@ function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) { createBuilderStatusReporter(sys2, shouldBePretty(sys2, buildOptions)), createWatchStatusReporter2(sys2, buildOptions) ); + buildHost2.jsDocParsingMode = defaultJSDocParsingMode; const solutionPerformance2 = enableSolutionPerformance(sys2, buildOptions); updateSolutionBuilderHost(sys2, cb, buildHost2, solutionPerformance2); const onWatchStatusChange = buildHost2.onWatchStatusChange; @@ -125390,6 +126285,7 @@ function performBuild(sys2, cb, buildOptions, watchOptions, projects, errors) { createBuilderStatusReporter(sys2, shouldBePretty(sys2, buildOptions)), createReportErrorSummary(sys2, buildOptions) ); + buildHost.jsDocParsingMode = defaultJSDocParsingMode; const solutionPerformance = enableSolutionPerformance(sys2, buildOptions); updateSolutionBuilderHost(sys2, cb, buildHost, solutionPerformance); const builder = createSolutionBuilder(buildHost, projects, buildOptions); @@ -125409,6 +126305,7 @@ function performCompilation(sys2, cb, reportDiagnostic, config) { void 0, sys2 ); + host.jsDocParsingMode = defaultJSDocParsingMode; const currentDirectory = host.getCurrentDirectory(); const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); changeCompilerHostLikeToUseCache(host, (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName)); @@ -125450,6 +126347,7 @@ function performIncrementalCompilation2(sys2, cb, reportDiagnostic, config) { false ); const host = createIncrementalCompilerHost(options, sys2); + host.jsDocParsingMode = defaultJSDocParsingMode; const exitStatus = performIncrementalCompilation({ host, system: sys2, @@ -125504,6 +126402,7 @@ function updateCreateProgram(sys2, host, isBuildMode) { }; } function updateWatchCompilationHost(sys2, cb, watchCompilerHost) { + watchCompilerHost.jsDocParsingMode = defaultJSDocParsingMode; updateCreateProgram( sys2, watchCompilerHost, @@ -125629,11 +126528,7 @@ function enableStatisticsAndTracing(system, compilerOptions, isBuildMode) { enable(system); } if (canTrace(system, compilerOptions)) { - startTracing( - isBuildMode ? "build" : "project", - compilerOptions.generateTrace, - compilerOptions.configFilePath - ); + startTracing(isBuildMode ? "build" : "project", compilerOptions.generateTrace, compilerOptions.configFilePath); } } function isSolutionMarkOrMeasure(name) { @@ -125793,7 +126688,7 @@ function reportAllStatistics(sys2, statistics) { } } for (const s of statistics) { - sys2.write(padRight(s.name + ":", nameSize + 2) + padLeft(statisticValue(s).toString(), valueSize) + sys2.newLine); + sys2.write(`${s.name}:`.padEnd(nameSize + 2) + statisticValue(s).toString().padStart(valueSize) + sys2.newLine); } } function statisticValue(s) { diff --git a/node_modules/typescript/lib/tsserver.js b/node_modules/typescript/lib/tsserver.js index 382e1e2..dd6b532 100644 --- a/node_modules/typescript/lib/tsserver.js +++ b/node_modules/typescript/lib/tsserver.js @@ -58,10 +58,8 @@ __export(server_exports, { CompletionInfoFlags: () => CompletionInfoFlags, CompletionTriggerKind: () => CompletionTriggerKind, Completions: () => ts_Completions_exports, - ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, ContainerFlags: () => ContainerFlags, ContextFlags: () => ContextFlags, - CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, DiagnosticCategory: () => DiagnosticCategory, Diagnostics: () => Diagnostics, @@ -103,13 +101,13 @@ __export(server_exports, { InternalEmitFlags: () => InternalEmitFlags, InternalSymbolName: () => InternalSymbolName, InvalidatedProjectKind: () => InvalidatedProjectKind, + JSDocParsingMode: () => JSDocParsingMode, JsDoc: () => ts_JsDoc_exports, JsTyping: () => ts_JsTyping_exports, JsxEmit: () => JsxEmit, JsxFlags: () => JsxFlags, JsxReferenceKind: () => JsxReferenceKind, LanguageServiceMode: () => LanguageServiceMode, - LanguageServiceShimHostAdapter: () => LanguageServiceShimHostAdapter, LanguageVariant: () => LanguageVariant, LexicalEnvironmentFlags: () => LexicalEnvironmentFlags, ListFormat: () => ListFormat, @@ -146,6 +144,7 @@ __export(server_exports, { PragmaKindFlags: () => PragmaKindFlags, PrivateIdentifierKind: () => PrivateIdentifierKind, ProcessLevel: () => ProcessLevel, + ProgramUpdateLevel: () => ProgramUpdateLevel, QuotePreference: () => QuotePreference, RelationComparisonResult: () => RelationComparisonResult, Rename: () => ts_Rename_exports, @@ -183,7 +182,6 @@ __export(server_exports, { TypeMapKind: () => TypeMapKind, TypePredicateKind: () => TypePredicateKind, TypeReferenceSerializationKind: () => TypeReferenceSerializationKind, - TypeScriptServicesFactory: () => TypeScriptServicesFactory, UnionReduction: () => UnionReduction, UpToDateStatusType: () => UpToDateStatusType, VarianceFlags: () => VarianceFlags, @@ -430,6 +428,7 @@ __export(server_exports, { createModuleNotFoundChain: () => createModuleNotFoundChain, createModuleResolutionCache: () => createModuleResolutionCache, createModuleResolutionLoader: () => createModuleResolutionLoader, + createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache, createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost, createMultiMap: () => createMultiMap, createNodeConverters: () => createNodeConverters, @@ -858,6 +857,7 @@ __export(server_exports, { getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode, getLeftmostAccessExpression: () => getLeftmostAccessExpression, getLeftmostExpression: () => getLeftmostExpression, + getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName, getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition, getLineInfo: () => getLineInfo, getLineOfLocalPosition: () => getLineOfLocalPosition, @@ -989,13 +989,11 @@ __export(server_exports, { getRenameLocation: () => getRenameLocation, getReplacementSpanForContextToken: () => getReplacementSpanForContextToken, getResolutionDiagnostic: () => getResolutionDiagnostic, - getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause, + getResolutionModeOverride: () => getResolutionModeOverride, getResolveJsonModule: () => getResolveJsonModule, getResolvePackageJsonExports: () => getResolvePackageJsonExports, getResolvePackageJsonImports: () => getResolvePackageJsonImports, getResolvedExternalModuleName: () => getResolvedExternalModuleName, - getResolvedModule: () => getResolvedModule, - getResolvedTypeReferenceDirective: () => getResolvedTypeReferenceDirective, getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement, getRestParameterElementType: () => getRestParameterElementType, getRightMostAssignedExpression: () => getRightMostAssignedExpression, @@ -1123,6 +1121,7 @@ __export(server_exports, { hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName, hasQuestionToken: () => hasQuestionToken, hasRecordedExternalHelpers: () => hasRecordedExternalHelpers, + hasResolutionModeOverride: () => hasResolutionModeOverride, hasRestParameter: () => hasRestParameter, hasScopeMarker: () => hasScopeMarker, hasStaticModifier: () => hasStaticModifier, @@ -1196,7 +1195,6 @@ __export(server_exports, { isAssertClause: () => isAssertClause, isAssertEntry: () => isAssertEntry, isAssertionExpression: () => isAssertionExpression, - isAssertionKey: () => isAssertionKey, isAssertsKeyword: () => isAssertsKeyword, isAssignmentDeclaration: () => isAssignmentDeclaration, isAssignmentExpression: () => isAssignmentExpression, @@ -1237,6 +1235,7 @@ __export(server_exports, { isCallExpression: () => isCallExpression, isCallExpressionTarget: () => isCallExpressionTarget, isCallLikeExpression: () => isCallLikeExpression, + isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression, isCallOrNewExpression: () => isCallOrNewExpression, isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget, isCallSignatureDeclaration: () => isCallSignatureDeclaration, @@ -1254,6 +1253,7 @@ __export(server_exports, { isClassDeclaration: () => isClassDeclaration, isClassElement: () => isClassElement, isClassExpression: () => isClassExpression, + isClassInstanceProperty: () => isClassInstanceProperty, isClassLike: () => isClassLike, isClassMemberModifier: () => isClassMemberModifier, isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, @@ -1332,6 +1332,7 @@ __export(server_exports, { isExclamationToken: () => isExclamationToken, isExcludedFile: () => isExcludedFile, isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport, + isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration, isExportAssignment: () => isExportAssignment, isExportDeclaration: () => isExportDeclaration, isExportModifier: () => isExportModifier, @@ -1403,6 +1404,9 @@ __export(server_exports, { isIfStatement: () => isIfStatement, isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching, isImplicitGlob: () => isImplicitGlob, + isImportAttribute: () => isImportAttribute, + isImportAttributeName: () => isImportAttributeName, + isImportAttributes: () => isImportAttributes, isImportCall: () => isImportCall, isImportClause: () => isImportClause, isImportDeclaration: () => isImportDeclaration, @@ -1416,6 +1420,7 @@ __export(server_exports, { isImportTypeNode: () => isImportTypeNode, isImportableFile: () => isImportableFile, isInComment: () => isInComment, + isInCompoundLikeAssignment: () => isInCompoundLikeAssignment, isInExpressionContext: () => isInExpressionContext, isInJSDoc: () => isInJSDoc, isInJSFile: () => isInJSFile, @@ -1439,6 +1444,7 @@ __export(server_exports, { isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute, isInsideNodeModules: () => isInsideNodeModules, isInsideTemplateLiteral: () => isInsideTemplateLiteral, + isInstanceOfExpression: () => isInstanceOfExpression, isInstantiatedModule: () => isInstantiatedModule, isInterfaceDeclaration: () => isInterfaceDeclaration, isInternalDeclaration: () => isInternalDeclaration, @@ -1593,7 +1599,6 @@ __export(server_exports, { isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, isNewExpression: () => isNewExpression, isNewExpressionTarget: () => isNewExpressionTarget, - isNightly: () => isNightly, isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral, isNode: () => isNode, isNodeArray: () => isNodeArray, @@ -1697,6 +1702,7 @@ __export(server_exports, { isReturnStatement: () => isReturnStatement, isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler, isRightSideOfAccessExpression: () => isRightSideOfAccessExpression, + isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression, isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess, isRightSideOfQualifiedName: () => isRightSideOfQualifiedName, isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess, @@ -1709,6 +1715,7 @@ __export(server_exports, { isSetAccessor: () => isSetAccessor, isSetAccessorDeclaration: () => isSetAccessorDeclaration, isShebangTrivia: () => isShebangTrivia, + isShiftOperatorOrHigher: () => isShiftOperatorOrHigher, isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, isShorthandPropertyAssignment: () => isShorthandPropertyAssignment, isSignedNumericLiteral: () => isSignedNumericLiteral, @@ -1947,8 +1954,6 @@ __export(server_exports, { outFile: () => outFile, packageIdToPackageName: () => packageIdToPackageName, packageIdToString: () => packageIdToString, - padLeft: () => padLeft, - padRight: () => padRight, paramHelper: () => paramHelper, parameterIsThisKeyword: () => parameterIsThisKeyword, parameterNamePart: () => parameterNamePart, @@ -2022,7 +2027,6 @@ __export(server_exports, { readJson: () => readJson, readJsonConfigFile: () => readJsonConfigFile, readJsonOrUndefined: () => readJsonOrUndefined, - realizeDiagnostics: () => realizeDiagnostics, reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange, reduceEachTrailingCommentRange: () => reduceEachTrailingCommentRange, reduceLeft: () => reduceLeft, @@ -2092,8 +2096,6 @@ __export(server_exports, { setParent: () => setParent, setParentRecursive: () => setParentRecursive, setPrivateIdentifier: () => setPrivateIdentifier, - setResolvedModule: () => setResolvedModule, - setResolvedTypeReferenceDirective: () => setResolvedTypeReferenceDirective, setSnippetElement: () => setSnippetElement, setSourceMapRange: () => setSourceMapRange, setStackTraceLimit: () => setStackTraceLimit, @@ -2155,7 +2157,6 @@ __export(server_exports, { startsWithDirectory: () => startsWithDirectory, startsWithUnderscore: () => startsWithUnderscore, startsWithUseStrict: () => startsWithUseStrict, - stringContains: () => stringContains, stringContainsAt: () => stringContainsAt, stringToToken: () => stringToToken, stripQuotes: () => stripQuotes, @@ -2242,9 +2243,6 @@ __export(server_exports, { transpile: () => transpile, transpileModule: () => transpileModule, transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions, - trimString: () => trimString, - trimStringEnd: () => trimStringEnd, - trimStringStart: () => trimStringStart, tryAddToSet: () => tryAddToSet, tryAndIgnoreErrors: () => tryAndIgnoreErrors, tryCast: () => tryCast, @@ -2324,14 +2322,13 @@ __export(server_exports, { writeCommentRange: () => writeCommentRange, writeFile: () => writeFile, writeFileEnsuringDirectories: () => writeFileEnsuringDirectories, - zipToModeAwareCache: () => zipToModeAwareCache, zipWith: () => zipWith }); module.exports = __toCommonJS(server_exports); // src/compiler/corePublic.ts -var versionMajorMinor = "5.2"; -var version = "5.2.2"; +var versionMajorMinor = "5.3"; +var version = "5.3.3"; var Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -3626,10 +3623,7 @@ function getStringComparer(ignoreCase) { return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive; } var createUIStringComparer = (() => { - let defaultComparer; - let enUSComparer; - const stringComparerFactory = getStringComparerFactory(); - return createStringComparer; + return createIntlCollatorStringComparer; function compareWithCallback(a, b, comparer) { if (a === b) return 0 /* EqualTo */; @@ -3644,41 +3638,6 @@ var createUIStringComparer = (() => { const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare; return (a, b) => compareWithCallback(a, b, comparer); } - function createLocaleCompareStringComparer(locale) { - if (locale !== void 0) - return createFallbackStringComparer(); - return (a, b) => compareWithCallback(a, b, compareStrings); - function compareStrings(a, b) { - return a.localeCompare(b); - } - } - function createFallbackStringComparer() { - return (a, b) => compareWithCallback(a, b, compareDictionaryOrder); - function compareDictionaryOrder(a, b) { - return compareStrings(a.toUpperCase(), b.toUpperCase()) || compareStrings(a, b); - } - function compareStrings(a, b) { - return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */; - } - } - function getStringComparerFactory() { - if (typeof Intl === "object" && typeof Intl.Collator === "function") { - return createIntlCollatorStringComparer; - } - if (typeof String.prototype.localeCompare === "function" && typeof String.prototype.toLocaleUpperCase === "function" && "a".localeCompare("B") < 0) { - return createLocaleCompareStringComparer; - } - return createFallbackStringComparer; - } - function createStringComparer(locale) { - if (locale === void 0) { - return defaultComparer || (defaultComparer = stringComparerFactory(locale)); - } else if (locale === "en-US") { - return enUSComparer || (enUSComparer = stringComparerFactory(locale)); - } else { - return stringComparerFactory(locale); - } - } })(); var uiComparerCaseSensitive; var uiLocale; @@ -3777,9 +3736,6 @@ function removeSuffix(str, suffix) { function tryRemoveSuffix(str, suffix) { return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : void 0; } -function stringContains(str, substring) { - return str.indexOf(substring) !== -1; -} function removeMinAndVersionNumbers(fileName) { let end = fileName.length; for (let pos = end - 1; pos > 0; pos--) { @@ -3962,12 +3918,6 @@ function cartesianProductWorker(arrays, result, outer, index) { } } } -function padLeft(s, length2, padString = " ") { - return length2 <= s.length ? s : padString.repeat(length2 - s.length) + s; -} -function padRight(s, length2, padString = " ") { - return length2 <= s.length ? s : s + padString.repeat(length2 - s.length); -} function takeWhile(array, predicate) { if (array) { const len = array.length; @@ -3988,18 +3938,6 @@ function skipWhile(array, predicate) { return array.slice(index); } } -var trimString = !!String.prototype.trim ? (s) => s.trim() : (s) => trimStringEnd(trimStringStart(s)); -var trimStringEnd = !!String.prototype.trimEnd ? (s) => s.trimEnd() : trimEndImpl; -var trimStringStart = !!String.prototype.trimStart ? (s) => s.trimStart() : (s) => s.replace(/^\s+/g, ""); -function trimEndImpl(s) { - let end = s.length - 1; - while (end >= 0) { - if (!isWhiteSpaceLike(s.charCodeAt(end))) - break; - end--; - } - return s.slice(0, end + 1); -} function isNodeLikeSystem() { return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object"; } @@ -4448,17 +4386,21 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${flowHeader}${remainingFlags ? ` (${formatFlowFlags(remainingFlags)})` : ""}`; } }, - __debugFlowFlags: { get() { - return formatEnum( - this.flags, - FlowFlags, - /*isFlags*/ - true - ); - } }, - __debugToString: { value() { - return formatControlFlowGraph(this); - } } + __debugFlowFlags: { + get() { + return formatEnum( + this.flags, + FlowFlags, + /*isFlags*/ + true + ); + } + }, + __debugToString: { + value() { + return formatControlFlowGraph(this); + } + } }); } } @@ -4517,25 +4459,31 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${symbolHeader} '${symbolName(this)}'${remainingSymbolFlags ? ` (${formatSymbolFlags(remainingSymbolFlags)})` : ""}`; } }, - __debugFlags: { get() { - return formatSymbolFlags(this.flags); - } } + __debugFlags: { + get() { + return formatSymbolFlags(this.flags); + } + } }); Object.defineProperties(objectAllocator.getTypeConstructor().prototype, { // for use with vscode-js-debug's new customDescriptionGenerator in launch.json __tsDebuggerDisplay: { value() { - const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}` : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type"; + const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type"; const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0; return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`; } }, - __debugFlags: { get() { - return formatTypeFlags(this.flags); - } }, - __debugObjectFlags: { get() { - return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : ""; - } }, + __debugFlags: { + get() { + return formatTypeFlags(this.flags); + } + }, + __debugObjectFlags: { + get() { + return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : ""; + } + }, __debugTypeToString: { value() { let text = weakTypeTextMap.get(this); @@ -4548,13 +4496,17 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, } }); Object.defineProperties(objectAllocator.getSignatureConstructor().prototype, { - __debugFlags: { get() { - return formatSignatureFlags(this.flags); - } }, - __debugSignatureToString: { value() { - var _a; - return (_a = this.checker) == null ? void 0 : _a.signatureToString(this); - } } + __debugFlags: { + get() { + return formatSignatureFlags(this.flags); + } + }, + __debugSignatureToString: { + value() { + var _a; + return (_a = this.checker) == null ? void 0 : _a.signatureToString(this); + } + } }); const nodeConstructors = [ objectAllocator.getNodeConstructor(), @@ -4572,24 +4524,36 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${nodeHeader}${this.flags ? ` (${formatNodeFlags(this.flags)})` : ""}`; } }, - __debugKind: { get() { - return formatSyntaxKind(this.kind); - } }, - __debugNodeFlags: { get() { - return formatNodeFlags(this.flags); - } }, - __debugModifierFlags: { get() { - return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); - } }, - __debugTransformFlags: { get() { - return formatTransformFlags(this.transformFlags); - } }, - __debugIsParseTreeNode: { get() { - return isParseTreeNode(this); - } }, - __debugEmitFlags: { get() { - return formatEmitFlags(getEmitFlags(this)); - } }, + __debugKind: { + get() { + return formatSyntaxKind(this.kind); + } + }, + __debugNodeFlags: { + get() { + return formatNodeFlags(this.flags); + } + }, + __debugModifierFlags: { + get() { + return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); + } + }, + __debugTransformFlags: { + get() { + return formatTransformFlags(this.transformFlags); + } + }, + __debugIsParseTreeNode: { + get() { + return isParseTreeNode(this); + } + }, + __debugEmitFlags: { + get() { + return formatEmitFlags(getEmitFlags(this)); + } + }, __debugGetText: { value(includeTrivia) { if (nodeIsSynthesized(this)) @@ -5169,18 +5133,18 @@ var hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i; var rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i; function parseRange(text) { const alternatives = []; - for (let range of trimString(text).split(logicalOrRegExp)) { + for (let range of text.trim().split(logicalOrRegExp)) { if (!range) continue; const comparators = []; - range = trimString(range); + range = range.trim(); const match = hyphenRegExp.exec(range); if (match) { if (!parseHyphen(match[1], match[2], comparators)) return void 0; } else { for (const simple of range.split(whitespaceRegExp)) { - const match2 = rangeRegExp.exec(trimString(simple)); + const match2 = rangeRegExp.exec(simple.trim()); if (!match2 || !parseComparator(match2[1], match2[2], comparators)) return void 0; } @@ -5229,15 +5193,21 @@ function parseComparator(operator, text, comparators) { switch (operator) { case "~": comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - isWildcard(minor) ? "major" : "minor" - ))); + comparators.push(createComparator( + "<", + version2.increment( + isWildcard(minor) ? "major" : "minor" + ) + )); break; case "^": comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch" - ))); + comparators.push(createComparator( + "<", + version2.increment( + version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch" + ) + )); break; case "<": case ">=": @@ -5535,11 +5505,7 @@ var tracingEnabled; const meta = { cat: "__metadata", ph: "M", ts: 1e3 * timestamp(), pid: 1, tid: 1 }; fs.writeSync( traceFd, - "[\n" + [ - { name: "process_name", args: { name: "tsc" }, ...meta }, - { name: "thread_name", args: { name: "Main" }, ...meta }, - { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" } - ].map((v) => JSON.stringify(v)).join(",\n") + "[\n" + [{ name: "process_name", args: { name: "tsc" }, ...meta }, { name: "thread_name", args: { name: "Main" }, ...meta }, { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" }].map((v) => JSON.stringify(v)).join(",\n") ); } tracingEnabled2.startTracing = startTracing2; @@ -6071,8 +6037,10 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause"; SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause"; SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 300] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 301] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportAttributes"] = 300] = "ImportAttributes"; + SyntaxKind5[SyntaxKind5["ImportAttribute"] = 301] = "ImportAttribute"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry"; SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment"; SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; @@ -6217,32 +6185,43 @@ var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { })(NodeFlags || {}); var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { ModifierFlags3[ModifierFlags3["None"] = 0] = "None"; - ModifierFlags3[ModifierFlags3["Export"] = 1] = "Export"; - ModifierFlags3[ModifierFlags3["Ambient"] = 2] = "Ambient"; - ModifierFlags3[ModifierFlags3["Public"] = 4] = "Public"; - ModifierFlags3[ModifierFlags3["Private"] = 8] = "Private"; - ModifierFlags3[ModifierFlags3["Protected"] = 16] = "Protected"; - ModifierFlags3[ModifierFlags3["Static"] = 32] = "Static"; - ModifierFlags3[ModifierFlags3["Readonly"] = 64] = "Readonly"; - ModifierFlags3[ModifierFlags3["Accessor"] = 128] = "Accessor"; - ModifierFlags3[ModifierFlags3["Abstract"] = 256] = "Abstract"; - ModifierFlags3[ModifierFlags3["Async"] = 512] = "Async"; - ModifierFlags3[ModifierFlags3["Default"] = 1024] = "Default"; - ModifierFlags3[ModifierFlags3["Const"] = 2048] = "Const"; - ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 4096] = "HasComputedJSDocModifiers"; - ModifierFlags3[ModifierFlags3["Deprecated"] = 8192] = "Deprecated"; - ModifierFlags3[ModifierFlags3["Override"] = 16384] = "Override"; - ModifierFlags3[ModifierFlags3["In"] = 32768] = "In"; - ModifierFlags3[ModifierFlags3["Out"] = 65536] = "Out"; - ModifierFlags3[ModifierFlags3["Decorator"] = 131072] = "Decorator"; + ModifierFlags3[ModifierFlags3["Public"] = 1] = "Public"; + ModifierFlags3[ModifierFlags3["Private"] = 2] = "Private"; + ModifierFlags3[ModifierFlags3["Protected"] = 4] = "Protected"; + ModifierFlags3[ModifierFlags3["Readonly"] = 8] = "Readonly"; + ModifierFlags3[ModifierFlags3["Override"] = 16] = "Override"; + ModifierFlags3[ModifierFlags3["Export"] = 32] = "Export"; + ModifierFlags3[ModifierFlags3["Abstract"] = 64] = "Abstract"; + ModifierFlags3[ModifierFlags3["Ambient"] = 128] = "Ambient"; + ModifierFlags3[ModifierFlags3["Static"] = 256] = "Static"; + ModifierFlags3[ModifierFlags3["Accessor"] = 512] = "Accessor"; + ModifierFlags3[ModifierFlags3["Async"] = 1024] = "Async"; + ModifierFlags3[ModifierFlags3["Default"] = 2048] = "Default"; + ModifierFlags3[ModifierFlags3["Const"] = 4096] = "Const"; + ModifierFlags3[ModifierFlags3["In"] = 8192] = "In"; + ModifierFlags3[ModifierFlags3["Out"] = 16384] = "Out"; + ModifierFlags3[ModifierFlags3["Decorator"] = 32768] = "Decorator"; + ModifierFlags3[ModifierFlags3["Deprecated"] = 65536] = "Deprecated"; + ModifierFlags3[ModifierFlags3["JSDocPublic"] = 8388608] = "JSDocPublic"; + ModifierFlags3[ModifierFlags3["JSDocPrivate"] = 16777216] = "JSDocPrivate"; + ModifierFlags3[ModifierFlags3["JSDocProtected"] = 33554432] = "JSDocProtected"; + ModifierFlags3[ModifierFlags3["JSDocReadonly"] = 67108864] = "JSDocReadonly"; + ModifierFlags3[ModifierFlags3["JSDocOverride"] = 134217728] = "JSDocOverride"; + ModifierFlags3[ModifierFlags3["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers"; + ModifierFlags3[ModifierFlags3["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers"; + ModifierFlags3[ModifierFlags3["SyntacticModifiers"] = 65535] = "SyntacticModifiers"; + ModifierFlags3[ModifierFlags3["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers"; + ModifierFlags3[ModifierFlags3["JSDocOnlyModifiers"] = 65536 /* Deprecated */] = "JSDocOnlyModifiers"; + ModifierFlags3[ModifierFlags3["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers"; + ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers"; ModifierFlags3[ModifierFlags3["HasComputedFlags"] = 536870912] = "HasComputedFlags"; - ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 28] = "AccessibilityModifier"; - ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 16476] = "ParameterPropertyModifier"; - ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 24] = "NonPublicAccessibilityModifier"; - ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 117086] = "TypeScriptModifier"; - ModifierFlags3[ModifierFlags3["ExportDefault"] = 1025] = "ExportDefault"; - ModifierFlags3[ModifierFlags3["All"] = 258047] = "All"; - ModifierFlags3[ModifierFlags3["Modifier"] = 126975] = "Modifier"; + ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 7] = "AccessibilityModifier"; + ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier"; + ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier"; + ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 28895] = "TypeScriptModifier"; + ModifierFlags3[ModifierFlags3["ExportDefault"] = 2080] = "ExportDefault"; + ModifierFlags3[ModifierFlags3["All"] = 131071] = "All"; + ModifierFlags3[ModifierFlags3["Modifier"] = 98303] = "Modifier"; return ModifierFlags3; })(ModifierFlags || {}); var JsxFlags = /* @__PURE__ */ ((JsxFlags2) => { @@ -6691,7 +6670,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => { TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive"; TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable"; TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable"; - TypeFlags2[TypeFlags2["ObjectFlagsType"] = 138117121] = "ObjectFlagsType"; + TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType"; TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; @@ -6730,6 +6709,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => { ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface"; ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening"; ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags"; + ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped"; ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask"; ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread"; ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType"; @@ -7374,7 +7354,8 @@ var ListFormat = /* @__PURE__ */ ((ListFormat2) => { ListFormat2[ListFormat2["ObjectBindingPatternElements"] = 525136] = "ObjectBindingPatternElements"; ListFormat2[ListFormat2["ArrayBindingPatternElements"] = 524880] = "ArrayBindingPatternElements"; ListFormat2[ListFormat2["ObjectLiteralExpressionProperties"] = 526226] = "ObjectLiteralExpressionProperties"; - ListFormat2[ListFormat2["ImportClauseEntries"] = 526226] = "ImportClauseEntries"; + ListFormat2[ListFormat2["ImportAttributes"] = 526226] = "ImportAttributes"; + ListFormat2[ListFormat2["ImportClauseEntries"] = 526226 /* ImportAttributes */] = "ImportClauseEntries"; ListFormat2[ListFormat2["ArrayLiteralExpressionElements"] = 8914] = "ArrayLiteralExpressionElements"; ListFormat2[ListFormat2["CommaListElements"] = 528] = "CommaListElements"; ListFormat2[ListFormat2["CallExpressionArguments"] = 2576] = "CallExpressionArguments"; @@ -7455,6 +7436,13 @@ var commentPragmas = { kind: 4 /* MultiLine */ } }; +var JSDocParsingMode = /* @__PURE__ */ ((JSDocParsingMode6) => { + JSDocParsingMode6[JSDocParsingMode6["ParseAll"] = 0] = "ParseAll"; + JSDocParsingMode6[JSDocParsingMode6["ParseNone"] = 1] = "ParseNone"; + JSDocParsingMode6[JSDocParsingMode6["ParseForTypeErrors"] = 2] = "ParseForTypeErrors"; + JSDocParsingMode6[JSDocParsingMode6["ParseForTypeInfo"] = 3] = "ParseForTypeInfo"; + return JSDocParsingMode6; +})(JSDocParsingMode || {}); // src/compiler/sys.ts function generateDjb2Hash(data) { @@ -7995,11 +7983,11 @@ function createDirectoryWatcherSupportingRecursive({ return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory); } function isInPath(path, searchPath) { - if (stringContains(path, searchPath)) + if (path.includes(searchPath)) return true; if (useCaseSensitiveFileNames2) return false; - return stringContains(toCanonicalFilePath(path), searchPath); + return toCanonicalFilePath(path).includes(searchPath); } } var FileSystemEntryKind = /* @__PURE__ */ ((FileSystemEntryKind2) => { @@ -8811,7 +8799,9 @@ function setSys(s) { } if (sys && sys.getEnvironmentVariable) { setCustomPollingValues(sys); - Debug.setAssertionLevel(/^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */); + Debug.setAssertionLevel( + /^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */ + ); } if (sys && sys.debugMode) { Debug.isDebugging = true; @@ -8845,7 +8835,7 @@ function pathIsBareSpecifier(path) { return !pathIsAbsolute(path) && !pathIsRelative(path); } function hasExtension(fileName) { - return stringContains(getBaseFileName(fileName), "."); + return getBaseFileName(fileName).includes("."); } function fileExtensionIs(path, extension) { return path.length > extension.length && endsWith(path, extension); @@ -8990,7 +8980,7 @@ function getPathFromPathComponents(pathComponents2, length2) { return root + pathComponents2.slice(1, length2).join(directorySeparator); } function normalizeSlashes(path) { - return path.indexOf("\\") !== -1 ? path.replace(backslashRegExp, directorySeparator) : path; + return path.includes("\\") ? path.replace(backslashRegExp, directorySeparator) : path; } function reducePathComponents(components) { if (!some(components)) @@ -9605,9 +9595,8 @@ var Diagnostics = { _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: diag(1448, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."), Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, 3 /* Message */, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), - Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"), + Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"), Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, 1 /* Error */, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), - resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, 1 /* Error */, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."), resolution_mode_should_be_either_require_or_import: diag(1453, 1 /* Error */, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, 1 /* Error */, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), @@ -9617,6 +9606,8 @@ var Diagnostics = { File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, 3 /* Message */, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`), File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, 3 /* Message */, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`), File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, 3 /* Message */, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), + resolution_mode_is_the_only_valid_key_for_type_import_attributes: diag(1463, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", "'resolution-mode' is the only valid key for type import attributes."), + Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1464, 1 /* Error */, "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", "Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."), The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, 1 /* Error */, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, 1 /* Error */, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), @@ -9643,6 +9634,7 @@ var Diagnostics = { The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), + Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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: diag(2201, 1 /* 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: diag( @@ -9749,7 +9741,7 @@ var Diagnostics = { An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, 1 /* 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: diag(2357, 1 /* 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: diag(2358, 1 /* 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: diag(2359, 1 /* 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_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: diag(2359, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."), The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, 1 /* 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: diag(2363, 1 /* 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: diag(2364, 1 /* 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."), @@ -10172,15 +10164,15 @@ var Diagnostics = { Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), + Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2823, 1 /* Error */, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2823", "Import attributes are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), - Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), + Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."), Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), - An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"), - The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, 1 /* Error */, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."), _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), @@ -10193,6 +10185,16 @@ var Diagnostics = { await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), await_using_statements_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: diag(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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."), Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), + Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."), + Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."), + Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."), + Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."), + Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."), + The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."), + An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."), + Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."), + A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."), + A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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: diag(4002, 1 /* 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: diag(4004, 1 /* 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}'."), @@ -10301,7 +10303,6 @@ var Diagnostics = { This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, 1 /* Error */, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), The_current_host_does_not_support_the_0_option: diag(5001, 1 /* 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: diag(5009, 1 /* 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: diag(5010, 1 /* 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}'."), @@ -11034,6 +11035,7 @@ var Diagnostics = { Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, 1 /* Error */, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), _0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17019, 1 /* Error */, "_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019", "'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), _0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17020, 1 /* Error */, "_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020", "'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + Unicode_escape_sequence_cannot_appear_here: diag(17021, 1 /* Error */, "Unicode_escape_sequence_cannot_appear_here_17021", "Unicode escape sequence cannot appear here."), Circularity_detected_while_resolving_configuration_Colon_0: diag(18e3, 1 /* Error */, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), The_files_list_in_config_file_0_is_empty: diag(18002, 1 /* 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: diag(18003, 1 /* 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}'."), @@ -11239,7 +11241,7 @@ var Diagnostics = { Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), - Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"), + Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"), Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), @@ -11483,6 +11485,7 @@ var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 18 var unicodeESNextIdentifierPart = [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]; var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/; var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/; +var jsDocSeeOrLink = /@(?:see|link)/i; function lookupInUnicodeMap(code, map2) { if (code < map2[0]) { return false; @@ -11989,6 +11992,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan var tokenFlags; var commentDirectives; var inJSDocType = 0; + var scriptKind = 0 /* Unknown */; + var jsDocParsingMode = 0 /* ParseAll */; setText(text, start2, length2); var scanner2 = { getTokenFullStart: () => fullStartPos, @@ -12032,6 +12037,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan setText, setScriptTarget, setLanguageVariant, + setScriptKind, + setJSDocParsingMode, setOnError, resetTokenState, setTextPos: resetTokenState, @@ -12285,7 +12292,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan start3 = pos; continue; } - if (isLineBreak(ch) && !jsxAttributeString) { + if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) { result += text.substring(start3, pos); tokenFlags |= 4 /* Unterminated */; error2(Diagnostics.Unterminated_string_literal); @@ -12374,7 +12381,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { const code = parseInt(text.substring(start3 + 1, pos), 8); - error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start3, pos - start3, "\\x" + padLeft(code.toString(16), 2, "0")); + error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start3, pos - start3, "\\x" + code.toString(16).padStart(2, "0")); return String.fromCharCode(code); } return text.substring(start3, pos); @@ -12810,9 +12817,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { pos += 2; - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */) { - tokenFlags |= 2 /* PrecedingJSDocComment */; - } + const isJSDoc2 = text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */; let commentClosed = false; let lastLineStart = tokenStart; while (pos < end) { @@ -12828,6 +12833,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan tokenFlags |= 1 /* PrecedingLineBreak */; } } + if (isJSDoc2 && shouldParseJSDoc()) { + tokenFlags |= 2 /* PrecedingJSDocComment */; + } commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); if (!commentClosed) { error2(Diagnostics.Asterisk_Slash_expected); @@ -13084,6 +13092,21 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } } } + function shouldParseJSDoc() { + switch (jsDocParsingMode) { + case 0 /* ParseAll */: + return true; + case 1 /* ParseNone */: + return false; + } + if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) { + return true; + } + if (jsDocParsingMode === 3 /* ParseForTypeInfo */) { + return false; + } + return jsDocSeeOrLink.test(text.slice(fullStartPos, pos)); + } function reScanInvalidIdentifier() { Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); pos = tokenStart = fullStartPos; @@ -13177,7 +13200,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token; } function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) { - const type = getDirectiveFromComment(trimStringStart(text2), commentDirectiveRegEx); + const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx); if (type === void 0) { return commentDirectives2; } @@ -13498,6 +13521,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan function setLanguageVariant(variant) { languageVariant = variant; } + function setScriptKind(kind) { + scriptKind = kind; + } + function setJSDocParsingMode(kind) { + jsDocParsingMode = kind; + } function resetTokenState(position) { Debug.assert(position >= 0); pos = position; @@ -13511,20 +13540,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan inJSDocType += inType ? 1 : -1; } } -var codePointAt = String.prototype.codePointAt ? (s, i) => s.codePointAt(i) : function codePointAt2(str, i) { - const size = str.length; - if (i < 0 || i >= size) { - return void 0; - } - const first2 = str.charCodeAt(i); - if (first2 >= 55296 && first2 <= 56319 && size > i + 1) { - const second = str.charCodeAt(i + 1); - if (second >= 56320 && second <= 57343) { - return (first2 - 55296) * 1024 + second - 56320 + 65536; - } - } - return first2; -}; +function codePointAt(s, i) { + return s.codePointAt(i); +} function charSize(ch) { if (ch >= 65536) { return 2; @@ -13681,7 +13699,7 @@ function getTypeParameterOwner(d) { } } function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -13971,7 +13989,7 @@ function getDecorators(node) { } } function getModifiers(node) { - if (hasSyntacticModifier(node, 126975 /* Modifier */)) { + if (hasSyntacticModifier(node, 98303 /* Modifier */)) { return filter(node.modifiers, isModifier); } } @@ -14359,12 +14377,12 @@ function isTypeOnlyExportDeclaration(node) { function isTypeOnlyImportOrExportDeclaration(node) { return isTypeOnlyImportDeclaration(node) || isTypeOnlyExportDeclaration(node); } -function isAssertionKey(node) { - return isStringLiteral(node) || isIdentifier(node); -} function isStringTextContainingNode(node) { return node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind); } +function isImportAttributeName(node) { + return isStringLiteral(node) || isIdentifier(node); +} function isGeneratedIdentifier(node) { var _a; return isIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0; @@ -14405,7 +14423,7 @@ function isModifierKind(token) { return false; } function isParameterPropertyModifier(kind) { - return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); + return !!(modifierToFlag(kind) & 31 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; @@ -14482,6 +14500,16 @@ function isAccessor(node) { function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } +function isClassInstanceProperty(node) { + if (isInJSFile(node) && isExpandoPropertyDeclaration(node)) { + return (!isBindableStaticAccessExpression(node) || !isPrototypeAccess(node.expression)) && !isBindableStaticNameExpression( + node, + /*excludeThisKeyword*/ + true + ); + } + return node.parent && isClassLike(node.parent) && isPropertyDeclaration(node) && !hasAccessorModifier(node); +} function isMethodOrAccessor(node) { switch (node.kind) { case 174 /* MethodDeclaration */: @@ -14610,6 +14638,9 @@ function isPropertyAccessOrQualifiedName(node) { const kind = node.kind; return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; } +function isCallLikeOrFunctionLikeExpression(node) { + return isCallLikeExpression(node) || isFunctionExpressionOrArrowFunction(node); +} function isCallLikeExpression(node) { switch (node.kind) { case 286 /* JsxOpeningElement */: @@ -14756,10 +14787,10 @@ function hasScopeMarker(statements) { return some(statements, isScopeMarker); } function needsScopeMarker(result) { - return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 1 /* Export */) && !isAmbientModule(result); + return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 32 /* Export */) && !isAmbientModule(result); } function isExternalModuleIndicator(result) { - return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); + return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 32 /* Export */); } function isForInOrOfStatement(node) { return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */; @@ -15177,26 +15208,6 @@ function usingSingleLineStringWriter(action) { function getFullWidth(node) { return node.end - node.pos; } -function getResolvedModule(sourceFile, moduleNameText, mode) { - var _a, _b; - return (_b = (_a = sourceFile == null ? void 0 : sourceFile.resolvedModules) == null ? void 0 : _a.get(moduleNameText, mode)) == null ? void 0 : _b.resolvedModule; -} -function setResolvedModule(sourceFile, moduleNameText, resolvedModule, mode) { - if (!sourceFile.resolvedModules) { - sourceFile.resolvedModules = createModeAwareCache(); - } - sourceFile.resolvedModules.set(moduleNameText, mode, resolvedModule); -} -function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective, mode) { - if (!sourceFile.resolvedTypeReferenceDirectiveNames) { - sourceFile.resolvedTypeReferenceDirectiveNames = createModeAwareCache(); - } - sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, mode, resolvedTypeReferenceDirective); -} -function getResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, mode) { - var _a, _b; - return (_b = (_a = sourceFile == null ? void 0 : sourceFile.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _a.get(typeReferenceDirectiveName, mode)) == null ? void 0 : _b.resolvedTypeReferenceDirective; -} function projectReferenceIsEqualTo(oldRef, newRef) { return oldRef.path === newRef.path && !oldRef.prepend === !newRef.prepend && !oldRef.circular === !newRef.circular; } @@ -15204,14 +15215,14 @@ function moduleResolutionIsEqualTo(oldResolution, newResolution) { return oldResolution === newResolution || oldResolution.resolvedModule === newResolution.resolvedModule || !!oldResolution.resolvedModule && !!newResolution.resolvedModule && oldResolution.resolvedModule.isExternalLibraryImport === newResolution.resolvedModule.isExternalLibraryImport && oldResolution.resolvedModule.extension === newResolution.resolvedModule.extension && oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName && oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath && packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId) && oldResolution.node10Result === newResolution.node10Result; } function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageName) { - var _a, _b; - const node10Result = (_b = (_a = sourceFile.resolvedModules) == null ? void 0 : _a.get(moduleReference, mode)) == null ? void 0 : _b.node10Result; + var _a; + const node10Result = (_a = host.getResolvedModule(sourceFile, moduleReference, mode)) == null ? void 0 : _a.node10Result; const result = node10Result ? chainDiagnosticMessages( /*details*/ void 0, Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings, node10Result, - node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageName)}` : packageName + node10Result.includes(nodeModulesPathPart + "@types/") ? `@types/${mangleScopedPackageName(packageName)}` : packageName ) : host.typesPackageExists(packageName) ? chainDiagnosticMessages( /*details*/ void 0, @@ -15247,14 +15258,14 @@ function packageIdToString(packageId) { function typeDirectiveIsEqualTo(oldResolution, newResolution) { return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath; } -function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolutions, comparer, nameAndModeGetter) { +function hasChangesInResolutions(names, newSourceFile, newResolutions, getOldResolution, comparer, nameAndModeGetter) { Debug.assert(names.length === newResolutions.length); for (let i = 0; i < names.length; i++) { const newResolution = newResolutions[i]; const entry = names[i]; const name = nameAndModeGetter.getName(entry); const mode = nameAndModeGetter.getMode(entry, newSourceFile); - const oldResolution = oldResolutions && oldResolutions.get(name, mode); + const oldResolution = getOldResolution(name, mode); const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution; if (changed) { return true; @@ -15487,7 +15498,7 @@ function getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) { } let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end); if (isJSDocTypeExpressionOrChild(node)) { - text = text.split(/\r\n|\n|\r/).map((line) => trimStringStart(line.replace(/^\s*\*/, ""))).join("\n"); + text = text.split(/\r\n|\n|\r/).map((line) => line.replace(/^\s*\*/, "").trimStart()).join("\n"); } return text; } @@ -15508,8 +15519,8 @@ function getInternalEmitFlags(node) { const emitNode = node.emitNode; return emitNode && emitNode.internalFlags || 0; } -function getScriptTargetFeatures() { - return new Map(Object.entries({ +var getScriptTargetFeatures = /* @__PURE__ */ memoize( + () => new Map(Object.entries({ Array: new Map(Object.entries({ es2015: [ "find", @@ -15576,7 +15587,7 @@ function getScriptTargetFeatures() { "defineProperty", "deleteProperty", "get", - " getOwnPropertyDescriptor", + "getOwnPropertyDescriptor", "getPrototypeOf", "has", "isExtensible", @@ -15902,8 +15913,8 @@ function getScriptTargetFeatures() { "cause" ] })) - })); -} + })) +); var GetLiteralTextFlags = /* @__PURE__ */ ((GetLiteralTextFlags2) => { GetLiteralTextFlags2[GetLiteralTextFlags2["None"] = 0] = "None"; GetLiteralTextFlags2[GetLiteralTextFlags2["NeverAsciiEscape"] = 1] = "NeverAsciiEscape"; @@ -16055,7 +16066,7 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) { return false; } function isAmbientPropertyDeclaration(node) { - return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); + return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 128 /* Ambient */); } function isBlockScope(node, parentNode) { switch (node.kind) { @@ -16243,16 +16254,14 @@ function createDiagnosticForNodeArrayFromMessageChain(sourceFile, nodes, message const start2 = skipTrivia(sourceFile.text, nodes.pos); return createFileDiagnosticFromMessageChain(sourceFile, start2, nodes.end - start2, messageChain, relatedInformation); } -function assertDiagnosticLocation(file, start2, length2) { +function assertDiagnosticLocation(sourceText, start2, length2) { Debug.assertGreaterThanOrEqual(start2, 0); Debug.assertGreaterThanOrEqual(length2, 0); - if (file) { - Debug.assertLessThanOrEqual(start2, file.text.length); - Debug.assertLessThanOrEqual(start2 + length2, file.text.length); - } + Debug.assertLessThanOrEqual(start2, sourceText.length); + Debug.assertLessThanOrEqual(start2 + length2, sourceText.length); } function createFileDiagnosticFromMessageChain(file, start2, length2, messageChain, relatedInformation) { - assertDiagnosticLocation(file, start2, length2); + assertDiagnosticLocation(file.text, start2, length2); return { file, start: start2, @@ -16410,10 +16419,10 @@ function isJsonSourceFile(file) { return file.scriptKind === 6 /* JSON */; } function isEnumConst(node) { - return !!(getCombinedModifierFlags(node) & 2048 /* Const */); + return !!(getCombinedModifierFlags(node) & 4096 /* Const */); } function isDeclarationReadonly(declaration) { - return !!(getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); + return !!(getCombinedModifierFlags(declaration) & 8 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); } function isVarAwaitUsing(node) { return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */; @@ -16496,10 +16505,7 @@ function isPartOfTypeNode(node) { } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } - Debug.assert( - node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, - "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." - ); + Debug.assert(node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); case 166 /* QualifiedName */: case 211 /* PropertyAccessExpression */: case 110 /* ThisKeyword */: { @@ -16714,11 +16720,7 @@ function forEachPropertyAssignment(objectLiteral, key, callback, key2) { }); } function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) { - return forEachPropertyAssignment( - objectLiteral, - propKey, - (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0 - ); + return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0); } function getTsConfigObjectLiteralExpression(tsConfigSourceFile) { if (tsConfigSourceFile && tsConfigSourceFile.statements.length) { @@ -16938,6 +16940,8 @@ function getInvokedExpression(node) { case 286 /* JsxOpeningElement */: case 285 /* JsxSelfClosingElement */: return node.tagName; + case 226 /* BinaryExpression */: + return node.right; default: return node.expression; } @@ -17127,8 +17131,8 @@ function isInExpressionContext(node) { return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; case 249 /* ForInStatement */: case 250 /* ForOfStatement */: - const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInStatement.expression === node; + const forInOrOfStatement = parent2; + return forInOrOfStatement.initializer === node && forInOrOfStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInOrOfStatement.expression === node; case 216 /* TypeAssertionExpression */: case 234 /* AsExpression */: return node === parent2.expression; @@ -17491,6 +17495,7 @@ function tryGetModuleSpecifierFromDeclaration(node) { true ))) == null ? void 0 : _a.arguments[0]; case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); case 271 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); @@ -17502,6 +17507,8 @@ function tryGetModuleSpecifierFromDeclaration(node) { return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); case 276 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); + case 205 /* ImportType */: + return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; default: Debug.assertNever(node); } @@ -17752,9 +17759,9 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { + if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isAssignmentExpression(node)) { return parent2; - } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */)) { + } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isAssignmentExpression(parent2))) { return parent2.parent; } else if (parent2.parent && parent2.parent.parent && (getSingleVariableOfVariableStatement(parent2.parent.parent) || getSingleInitializerOfVariableStatementOrPropertyDeclaration(parent2.parent.parent) === node || getSourceOfDefaultedAssignment(parent2.parent.parent))) { return parent2.parent.parent; @@ -17824,20 +17831,23 @@ var AssignmentKind = /* @__PURE__ */ ((AssignmentKind2) => { AssignmentKind2[AssignmentKind2["Compound"] = 2] = "Compound"; return AssignmentKind2; })(AssignmentKind || {}); -function getAssignmentTargetKind(node) { +function getAssignmentTarget(node) { let parent2 = node.parent; while (true) { switch (parent2.kind) { case 226 /* BinaryExpression */: - const binaryOperator = parent2.operatorToken.kind; - return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; + const binaryExpression = parent2; + const binaryOperator = binaryExpression.operatorToken.kind; + return isAssignmentOperator(binaryOperator) && binaryExpression.left === node ? binaryExpression : void 0; case 224 /* PrefixUnaryExpression */: case 225 /* PostfixUnaryExpression */: - const unaryOperator = parent2.operator; - return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; + const unaryExpression = parent2; + const unaryOperator = unaryExpression.operator; + return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? unaryExpression : void 0; case 249 /* ForInStatement */: case 250 /* ForOfStatement */: - return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; + const forInOrOfStatement = parent2; + return forInOrOfStatement.initializer === node ? forInOrOfStatement : void 0; case 217 /* ParenthesizedExpression */: case 209 /* ArrayLiteralExpression */: case 230 /* SpreadElement */: @@ -17849,24 +17859,53 @@ function getAssignmentTargetKind(node) { break; case 304 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { - return 0 /* None */; + return void 0; } node = parent2.parent; break; case 303 /* PropertyAssignment */: if (parent2.name === node) { - return 0 /* None */; + return void 0; } node = parent2.parent; break; default: - return 0 /* None */; + return void 0; } parent2 = node.parent; } } +function getAssignmentTargetKind(node) { + const target = getAssignmentTarget(node); + if (!target) { + return 0 /* None */; + } + switch (target.kind) { + case 226 /* BinaryExpression */: + const binaryOperator = target.operatorToken.kind; + return binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */; + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + return 2 /* Compound */; + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + return 1 /* Definite */; + } +} function isAssignmentTarget(node) { - return getAssignmentTargetKind(node) !== 0 /* None */; + return !!getAssignmentTarget(node); +} +function isCompoundLikeAssignment(assignment) { + const right = skipParentheses(assignment.right); + return right.kind === 226 /* BinaryExpression */ && isShiftOperatorOrHigher(right.operatorToken.kind); +} +function isInCompoundLikeAssignment(node) { + const target = getAssignmentTarget(node); + return !!target && isAssignmentExpression( + target, + /*excludeCompoundAssignment*/ + true + ) && isCompoundLikeAssignment(target); } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { @@ -18132,7 +18171,7 @@ function getFunctionFlags(node) { flags |= 1 /* Generator */; } case 219 /* ArrowFunction */: - if (hasSyntacticModifier(node, 512 /* Async */)) { + if (hasSyntacticModifier(node, 1024 /* Async */)) { flags |= 2 /* Async */; } break; @@ -18148,7 +18187,7 @@ function isAsyncFunction(node) { case 218 /* FunctionExpression */: case 219 /* ArrowFunction */: case 174 /* MethodDeclaration */: - return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); + return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 1024 /* Async */); } return false; } @@ -18175,6 +18214,7 @@ function getPropertyNameForPropertyNameNode(name) { case 81 /* PrivateIdentifier */: return name.escapedText; case 11 /* StringLiteral */: + case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); case 167 /* ComputedPropertyName */: @@ -18612,8 +18652,11 @@ var templateSubstitutionRegExp = /\$\{/g; function escapeTemplateSubstitution(str) { return str.replace(templateSubstitutionRegExp, "\\${"); } +function containsInvalidEscapeFlag(node) { + return !!((node.templateFlags || 0) & 2048 /* ContainsInvalidEscape */); +} function hasInvalidEscape(template) { - return template && !!(isNoSubstitutionTemplateLiteral(template) ? template.templateFlags : template.head.templateFlags || some(template.templateSpans, (span) => !!span.literal.templateFlags)); + return template && !!(isNoSubstitutionTemplateLiteral(template) ? containsInvalidEscapeFlag(template) : containsInvalidEscapeFlag(template.head) || some(template.templateSpans, (span) => containsInvalidEscapeFlag(span.literal))); } var doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; var singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; @@ -18694,7 +18737,7 @@ function isQuoteOrBacktick(charCode) { } function isIntrinsicJsxName(name) { const ch = name.charCodeAt(0); - return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-"); + return ch >= 97 /* a */ && ch <= 122 /* z */ || name.includes("-"); } var indentStrings = ["", " "]; function getIndentString(level) { @@ -18707,9 +18750,6 @@ function getIndentString(level) { function getIndentSize() { return indentStrings[1].length; } -function isNightly() { - return stringContains(version, "-dev") || stringContains(version, "-insiders"); -} function createTextWriter(newLine) { var output; var indent3; @@ -18898,7 +18938,7 @@ function getExternalModuleNameFromDeclaration(host, resolver, declaration) { return void 0; } const specifier = getExternalModuleName(declaration); - if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && getCanonicalAbsolutePath(host, file.path).indexOf(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory()))) === -1) { + if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && !getCanonicalAbsolutePath(host, file.path).includes(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory())))) { return void 0; } return getResolvedExternalModuleName(host, file); @@ -18974,7 +19014,31 @@ function getSourceFilesToEmit(host, targetSourceFile, forceDtsEmit) { } function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) { const options = host.getCompilerOptions(); - return !(options.noEmitForJsFiles && isSourceFileJS(sourceFile)) && !sourceFile.isDeclarationFile && !host.isSourceFileFromExternalLibrary(sourceFile) && (forceDtsEmit || !(isJsonSourceFile(sourceFile) && host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) && !host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)); + if (options.noEmitForJsFiles && isSourceFileJS(sourceFile)) + return false; + if (sourceFile.isDeclarationFile) + return false; + if (host.isSourceFileFromExternalLibrary(sourceFile)) + return false; + if (forceDtsEmit) + return true; + if (host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) + return false; + if (!isJsonSourceFile(sourceFile)) + return true; + if (host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) + return false; + if (outFile(options)) + return true; + if (!options.outDir) + return false; + if (options.rootDir || options.composite && options.configFilePath) { + const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory()); + const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName); + if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) + return false; + } + return true; } function getSourceFilePathInNewDir(fileName, host, newDirPath) { return getSourceFilePathInNewDirWorker(fileName, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)); @@ -18986,9 +19050,16 @@ function getSourceFilePathInNewDirWorker(fileName, newDirPath, currentDirectory, return combinePaths(newDirPath, sourceFilePath); } function writeFile(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) { - host.writeFile(fileName, text, writeByteOrderMark, (hostErrorMessage) => { - diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); - }, sourceFiles, data); + host.writeFile( + fileName, + text, + writeByteOrderMark, + (hostErrorMessage) => { + diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); + }, + sourceFiles, + data + ); } function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { @@ -19243,7 +19314,7 @@ function writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLin } function writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart) { const end = Math.min(commentEnd, nextLineStart - 1); - const currentLineText = trimString(text.substring(pos, end)); + const currentLineText = text.substring(pos, end).trim(); if (currentLineText) { writer.writeComment(currentLineText); if (end !== commentEnd) { @@ -19280,25 +19351,25 @@ function isStatic(node) { return isClassElement(node) && hasStaticModifier(node) || isClassStaticBlockDeclaration(node); } function hasStaticModifier(node) { - return hasSyntacticModifier(node, 32 /* Static */); + return hasSyntacticModifier(node, 256 /* Static */); } function hasOverrideModifier(node) { - return hasEffectiveModifier(node, 16384 /* Override */); + return hasEffectiveModifier(node, 16 /* Override */); } function hasAbstractModifier(node) { - return hasSyntacticModifier(node, 256 /* Abstract */); + return hasSyntacticModifier(node, 64 /* Abstract */); } function hasAmbientModifier(node) { - return hasSyntacticModifier(node, 2 /* Ambient */); + return hasSyntacticModifier(node, 128 /* Ambient */); } function hasAccessorModifier(node) { - return hasSyntacticModifier(node, 128 /* Accessor */); + return hasSyntacticModifier(node, 512 /* Accessor */); } function hasEffectiveReadonlyModifier(node) { - return hasEffectiveModifier(node, 64 /* Readonly */); + return hasEffectiveModifier(node, 8 /* Readonly */); } function hasDecorators(node) { - return hasSyntacticModifier(node, 131072 /* Decorator */); + return hasSyntacticModifier(node, 32768 /* Decorator */); } function getSelectedEffectiveModifierFlags(node, flags) { return getEffectiveModifierFlags(node) & flags; @@ -19313,10 +19384,13 @@ function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | 536870912 /* HasComputedFlags */; } - if (includeJSDoc && !(node.modifierFlagsCache & 4096 /* HasComputedJSDocModifiers */) && (alwaysIncludeJSDoc || isInJSFile(node)) && node.parent) { - node.modifierFlagsCache |= getJSDocModifierFlagsNoCache(node) | 4096 /* HasComputedJSDocModifiers */; + if (alwaysIncludeJSDoc || includeJSDoc && isInJSFile(node)) { + if (!(node.modifierFlagsCache & 268435456 /* HasComputedJSDocModifiers */) && node.parent) { + node.modifierFlagsCache |= getRawJSDocModifierFlagsNoCache(node) | 268435456 /* HasComputedJSDocModifiers */; + } + return selectEffectiveModifierFlags(node.modifierFlagsCache); } - return node.modifierFlagsCache & ~(536870912 /* HasComputedFlags */ | 4096 /* HasComputedJSDocModifiers */); + return selectSyntacticModifierFlags(node.modifierFlagsCache); } function getEffectiveModifierFlags(node) { return getModifierFlagsWorker( @@ -19341,33 +19415,42 @@ function getSyntacticModifierFlags(node) { false ); } -function getJSDocModifierFlagsNoCache(node) { +function getRawJSDocModifierFlagsNoCache(node) { let flags = 0 /* None */; if (!!node.parent && !isParameter(node)) { if (isInJSFile(node)) { if (getJSDocPublicTagNoCache(node)) - flags |= 4 /* Public */; + flags |= 8388608 /* JSDocPublic */; if (getJSDocPrivateTagNoCache(node)) - flags |= 8 /* Private */; + flags |= 16777216 /* JSDocPrivate */; if (getJSDocProtectedTagNoCache(node)) - flags |= 16 /* Protected */; + flags |= 33554432 /* JSDocProtected */; if (getJSDocReadonlyTagNoCache(node)) - flags |= 64 /* Readonly */; + flags |= 67108864 /* JSDocReadonly */; if (getJSDocOverrideTagNoCache(node)) - flags |= 16384 /* Override */; + flags |= 134217728 /* JSDocOverride */; } if (getJSDocDeprecatedTagNoCache(node)) - flags |= 8192 /* Deprecated */; + flags |= 65536 /* Deprecated */; } return flags; } +function selectSyntacticModifierFlags(flags) { + return flags & 65535 /* SyntacticModifiers */; +} +function selectEffectiveModifierFlags(flags) { + return flags & 131071 /* NonCacheOnlyModifiers */ | (flags & 260046848 /* JSDocCacheOnlyModifiers */) >>> 23; +} +function getJSDocModifierFlagsNoCache(node) { + return selectEffectiveModifierFlags(getRawJSDocModifierFlagsNoCache(node)); +} function getEffectiveModifierFlagsNoCache(node) { return getSyntacticModifierFlagsNoCache(node) | getJSDocModifierFlagsNoCache(node); } function getSyntacticModifierFlagsNoCache(node) { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { - flags |= 1 /* Export */; + flags |= 32 /* Export */; } return flags; } @@ -19383,37 +19466,37 @@ function modifiersToFlags(modifiers) { function modifierToFlag(token) { switch (token) { case 126 /* StaticKeyword */: - return 32 /* Static */; + return 256 /* Static */; case 125 /* PublicKeyword */: - return 4 /* Public */; + return 1 /* Public */; case 124 /* ProtectedKeyword */: - return 16 /* Protected */; + return 4 /* Protected */; case 123 /* PrivateKeyword */: - return 8 /* Private */; + return 2 /* Private */; case 128 /* AbstractKeyword */: - return 256 /* Abstract */; + return 64 /* Abstract */; case 129 /* AccessorKeyword */: - return 128 /* Accessor */; + return 512 /* Accessor */; case 95 /* ExportKeyword */: - return 1 /* Export */; + return 32 /* Export */; case 138 /* DeclareKeyword */: - return 2 /* Ambient */; + return 128 /* Ambient */; case 87 /* ConstKeyword */: - return 2048 /* Const */; + return 4096 /* Const */; case 90 /* DefaultKeyword */: - return 1024 /* Default */; + return 2048 /* Default */; case 134 /* AsyncKeyword */: - return 512 /* Async */; + return 1024 /* Async */; case 148 /* ReadonlyKeyword */: - return 64 /* Readonly */; + return 8 /* Readonly */; case 164 /* OverrideKeyword */: - return 16384 /* Override */; + return 16 /* Override */; case 103 /* InKeyword */: - return 32768 /* In */; + return 8192 /* In */; case 147 /* OutKeyword */: - return 65536 /* Out */; + return 16384 /* Out */; case 170 /* Decorator */: - return 131072 /* Decorator */; + return 32768 /* Decorator */; } return 0 /* None */; } @@ -19526,11 +19609,17 @@ function isRightSideOfQualifiedNameOrPropertyAccess(node) { return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { - return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; + return !!node.parent && (isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node); } function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } +function isInstanceOfExpression(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 104 /* InstanceOfKeyword */; +} +function isRightSideOfInstanceofExpression(node) { + return isInstanceOfExpression(node.parent) && node === node.parent.right; +} function isEmptyObjectLiteral(expression) { return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; } @@ -19547,7 +19636,7 @@ function getLocalSymbolForExportDefault(symbol) { return void 0; } function isExportDefaultSymbol(symbol) { - return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 1024 /* Default */); + return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 2048 /* Default */); } function tryExtractTSExtension(fileName) { return find(supportedTSExtensionsForExtractExtension, (extension) => fileExtensionIs(fileName, extension)); @@ -19830,16 +19919,16 @@ function getDeclarationModifierFlagsFromSymbol(s, isWrite = false) { if (s.valueDeclaration) { const declaration = isWrite && s.declarations && find(s.declarations, isSetAccessorDeclaration) || s.flags & 32768 /* GetAccessor */ && find(s.declarations, isGetAccessorDeclaration) || s.valueDeclaration; const flags = getCombinedModifierFlags(declaration); - return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~28 /* AccessibilityModifier */; + return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~7 /* AccessibilityModifier */; } if (getCheckFlags(s) & 6 /* Synthetic */) { const checkFlags = s.links.checkFlags; - const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 8 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 4 /* Public */ : 16 /* Protected */; - const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 32 /* Static */ : 0; + const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 2 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 1 /* Public */ : 4 /* Protected */; + const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 256 /* Static */ : 0; return accessModifier | staticModifier; } if (s.flags & 4194304 /* Prototype */) { - return 4 /* Public */ | 32 /* Static */; + return 1 /* Public */ | 256 /* Static */; } return 0; } @@ -19938,7 +20027,7 @@ function mutateMap(map2, newMap, options) { function isAbstractConstructorSymbol(symbol) { if (symbol.flags & 32 /* Class */) { const declaration = getClassLikeDeclarationOfSymbol(symbol); - return !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */); + return !!declaration && hasSyntacticModifier(declaration, 64 /* Abstract */); } return false; } @@ -19947,7 +20036,7 @@ function getClassLikeDeclarationOfSymbol(symbol) { return (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike); } function getObjectFlags(type) { - return type.flags & 138117121 /* ObjectFlagsType */ ? type.objectFlags : 0; + return type.flags & 3899393 /* ObjectFlagsType */ ? type.objectFlags : 0; } function forSomeAncestorDirectory(directory, callback) { return !!forEachAncestorDirectory(directory, (d) => callback(d) ? true : void 0); @@ -19960,21 +20049,17 @@ function showModuleSpecifier({ moduleSpecifier }) { } function getLastChild(node) { let lastChild; - forEachChild( - node, - (child) => { - if (nodeIsPresent(child)) - lastChild = child; - }, - (children) => { - for (let i = children.length - 1; i >= 0; i--) { - if (nodeIsPresent(children[i])) { - lastChild = children[i]; - break; - } + forEachChild(node, (child) => { + if (nodeIsPresent(child)) + lastChild = child; + }, (children) => { + for (let i = children.length - 1; i >= 0; i--) { + if (nodeIsPresent(children[i])) { + lastChild = children[i]; + break; } } - ); + }); return lastChild; } function addToSeen(seen, key, value = true) { @@ -20164,8 +20249,8 @@ function setObjectAllocator(alloc) { Object.assign(objectAllocator, alloc); forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator)); } -function formatStringFromArgs(text, args, baseIndex = 0) { - return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex])); +function formatStringFromArgs(text, args) { + return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index])); } var localizedDiagnosticMessages; function setLocalizedDiagnosticMessages(messages) { @@ -20179,16 +20264,14 @@ function maybeSetLocalizedDiagnosticMessages(getMessages) { function getLocaleSpecificMessage(message) { return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message; } -function createDetachedDiagnostic(fileName, start2, length2, message) { - assertDiagnosticLocation( - /*file*/ - void 0, - start2, - length2 - ); +function createDetachedDiagnostic(fileName, sourceText, start2, length2, message, ...args) { + if (start2 + length2 > sourceText.length) { + length2 = sourceText.length - start2; + } + assertDiagnosticLocation(sourceText, start2, length2); let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file: void 0, @@ -20240,11 +20323,11 @@ function attachFileToDiagnostics(diagnostics, file) { } return diagnosticsWithLocation; } -function createFileDiagnostic(file, start2, length2, message) { - assertDiagnosticLocation(file, start2, length2); +function createFileDiagnostic(file, start2, length2, message, ...args) { + assertDiagnosticLocation(file.text, start2, length2); let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file, @@ -20257,17 +20340,17 @@ function createFileDiagnostic(file, start2, length2, message) { reportsDeprecated: message.reportsDeprecated }; } -function formatMessage(_dummy, message) { +function formatMessage(message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); + if (some(args)) { + text = formatStringFromArgs(text, args); } return text; } -function createCompilerDiagnostic(message) { +function createCompilerDiagnostic(message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 1) { - text = formatStringFromArgs(text, arguments, 1); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file: void 0, @@ -20291,10 +20374,10 @@ function createCompilerDiagnosticFromMessageChain(chain, relatedInformation) { relatedInformation }; } -function chainDiagnosticMessages(details, message) { +function chainDiagnosticMessages(details, message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { messageText: text, @@ -20555,7 +20638,7 @@ function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) { return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations); } function getCompilerOptionValue(options, option) { - return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name]; + return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name]; } function getJSXTransformEnabled(options) { const jsx = options.jsx; @@ -20597,19 +20680,16 @@ function createSymlinkCache(cwd, getCanonicalFileName) { if (!containsIgnoredPath(symlinkPath)) { symlinkPath = ensureTrailingDirectorySeparator(symlinkPath); if (real !== false && !(symlinkedDirectories == null ? void 0 : symlinkedDirectories.has(symlinkPath))) { - (symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(ensureTrailingDirectorySeparator(real.realPath), symlink); + (symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(real.realPath, symlink); } (symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real); } }, - setSymlinksFromResolutions(files, typeReferenceDirectives) { - var _a, _b; + setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, typeReferenceDirectives) { Debug.assert(!hasProcessedResolutions); hasProcessedResolutions = true; - for (const file of files) { - (_a = file.resolvedModules) == null ? void 0 : _a.forEach((resolution) => processResolution(this, resolution.resolvedModule)); - (_b = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _b.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); - } + forEachResolvedModule((resolution) => processResolution(this, resolution.resolvedModule)); + forEachResolvedTypeReferenceDirective((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); typeReferenceDirectives.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); }, hasProcessedResolutions: () => hasProcessedResolutions @@ -20623,7 +20703,10 @@ function createSymlinkCache(cwd, getCanonicalFileName) { if (commonResolved && commonOriginal) { cache.setSymlinkedDirectory( commonOriginal, - { real: commonResolved, realPath: toPath(commonResolved, cwd, getCanonicalFileName) } + { + real: ensureTrailingDirectorySeparator(commonResolved), + realPath: ensureTrailingDirectorySeparator(toPath(commonResolved, cwd, getCanonicalFileName)) + } ); } } @@ -20902,7 +20985,7 @@ function getSupportedExtensions(options, extraFileExtensions) { const flatBuiltins = flatten(builtins); const extensions = [ ...builtins, - ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension) === -1 ? [x.extension] : void 0) + ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && !flatBuiltins.includes(x.extension) ? [x.extension] : void 0) ]; return extensions; } @@ -21238,7 +21321,7 @@ function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { if (node.kind !== 167 /* ComputedPropertyName */) { return false; } - if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { + if (hasSyntacticModifier(node.parent, 64 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; @@ -21364,7 +21447,7 @@ function expressionResultIsUnused(node) { } } function containsIgnoredPath(path) { - return some(ignoredPaths, (p) => stringContains(path, p)); + return some(ignoredPaths, (p) => path.includes(p)); } function getContainingNodeArray(node) { if (!node.parent) @@ -21464,8 +21547,9 @@ function escapeSnippetText(text) { function isNumericLiteralName(name) { return (+name).toString() === name; } -function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed) { - return isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote); +function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed, isMethod) { + const isMethodNamedNew = isMethod && name === "new"; + return !isMethodNamedNew && isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && !isMethodNamedNew && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote); } function isThisTypeParameter(type) { return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType); @@ -21625,6 +21709,15 @@ function getPropertyNameFromType(type) { } return Debug.fail(); } +function isExpandoPropertyDeclaration(declaration) { + return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration)); +} +function hasResolutionModeOverride(node) { + if (node === void 0) { + return false; + } + return !!getResolutionModeOverride(node.attributes); +} // src/compiler/factory/baseNodeFactory.ts function createBaseNodeFactory() { @@ -22507,6 +22600,10 @@ function createNodeFactory(flags, baseFactory2) { updateAssertEntry, createImportTypeAssertionContainer, updateImportTypeAssertionContainer, + createImportAttributes, + updateImportAttributes, + createImportAttribute, + updateImportAttribute, createNamespaceImport, updateNamespaceImport, createNamespaceExport, @@ -22883,8 +22980,9 @@ function createNodeFactory(flags, baseFactory2) { ensureUseStrict, liftToBlock, mergeLexicalEnvironment, - updateModifiers, - updateModifierLike + replaceModifiers, + replaceDecoratorsAndModifiers, + replacePropertyName }; forEach(nodeFactoryPatchers, (fn) => fn(factory2)); return factory2; @@ -23217,35 +23315,35 @@ function createNodeFactory(flags, baseFactory2) { } function createModifiersFromModifierFlags(flags2) { const result = []; - if (flags2 & 1 /* Export */) + if (flags2 & 32 /* Export */) result.push(createModifier(95 /* ExportKeyword */)); - if (flags2 & 2 /* Ambient */) + if (flags2 & 128 /* Ambient */) result.push(createModifier(138 /* DeclareKeyword */)); - if (flags2 & 1024 /* Default */) + if (flags2 & 2048 /* Default */) result.push(createModifier(90 /* DefaultKeyword */)); - if (flags2 & 2048 /* Const */) + if (flags2 & 4096 /* Const */) result.push(createModifier(87 /* ConstKeyword */)); - if (flags2 & 4 /* Public */) + if (flags2 & 1 /* Public */) result.push(createModifier(125 /* PublicKeyword */)); - if (flags2 & 8 /* Private */) + if (flags2 & 2 /* Private */) result.push(createModifier(123 /* PrivateKeyword */)); - if (flags2 & 16 /* Protected */) + if (flags2 & 4 /* Protected */) result.push(createModifier(124 /* ProtectedKeyword */)); - if (flags2 & 256 /* Abstract */) + if (flags2 & 64 /* Abstract */) result.push(createModifier(128 /* AbstractKeyword */)); - if (flags2 & 32 /* Static */) + if (flags2 & 256 /* Static */) result.push(createModifier(126 /* StaticKeyword */)); - if (flags2 & 16384 /* Override */) + if (flags2 & 16 /* Override */) result.push(createModifier(164 /* OverrideKeyword */)); - if (flags2 & 64 /* Readonly */) + if (flags2 & 8 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */)); - if (flags2 & 128 /* Accessor */) + if (flags2 & 512 /* Accessor */) result.push(createModifier(129 /* AccessorKeyword */)); - if (flags2 & 512 /* Async */) + if (flags2 & 1024 /* Async */) result.push(createModifier(134 /* AsyncKeyword */)); - if (flags2 & 32768 /* In */) + if (flags2 & 8192 /* In */) result.push(createModifier(103 /* InKeyword */)); - if (flags2 & 65536 /* Out */) + if (flags2 & 16384 /* Out */) result.push(createModifier(147 /* OutKeyword */)); return result.length ? result : void 0; } @@ -23294,7 +23392,7 @@ function createNodeFactory(flags, baseFactory2) { if (isThisIdentifier(node.name)) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */); + node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 31 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */); } node.jsDoc = void 0; return node; @@ -23343,8 +23441,8 @@ function createNodeFactory(flags, baseFactory2) { node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.type = type; node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; + const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 128 /* Ambient */; + node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 256 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; node.jsDoc = void 0; return node; } @@ -23383,7 +23481,7 @@ function createNodeFactory(flags, baseFactory2) { if (!node.body) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; @@ -23773,18 +23871,21 @@ function createNodeFactory(flags, baseFactory2) { function updateTemplateLiteralType(node, head, templateSpans) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } - function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { + function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) { const node = createBaseNode(205 /* ImportType */); node.argument = argument; - node.assertions = assertions; + node.attributes = attributes; + if (node.assertions && node.assertions.assertClause && node.attributes) { + node.assertions.assertClause = node.attributes; + } node.qualifier = qualifier; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.isTypeOf = isTypeOf; node.transformFlags = 1 /* ContainsTypeScript */; return node; } - function updateImportTypeNode(node, argument, assertions, qualifier, typeArguments, isTypeOf = node.isTypeOf) { - return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; + function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) { + return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { const node = createBaseNode(196 /* ParenthesizedType */); @@ -24123,7 +24224,7 @@ function createNodeFactory(flags, baseFactory2) { node.parameters = createNodeArray(parameters); node.type = type; node.body = body; - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -24147,7 +24248,7 @@ function createNodeFactory(flags, baseFactory2) { node.type = type; node.equalsGreaterThanToken = equalsGreaterThanToken ?? createToken(39 /* EqualsGreaterThanToken */); node.body = parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body); - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */; node.typeArguments = void 0; node.jsDoc = void 0; @@ -24499,7 +24600,7 @@ function createNodeFactory(flags, baseFactory2) { node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } node.jsDoc = void 0; @@ -24749,10 +24850,10 @@ function createNodeFactory(flags, baseFactory2) { node.parameters = createNodeArray(parameters); node.type = type; node.body = body; - if (!node.body || modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (!node.body || modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -24783,7 +24884,7 @@ function createNodeFactory(flags, baseFactory2) { node.typeParameters = asNodeArray(typeParameters); node.heritageClauses = asNodeArray(heritageClauses); node.members = createNodeArray(members); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; @@ -24845,7 +24946,7 @@ function createNodeFactory(flags, baseFactory2) { node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; node.body = body; - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */; @@ -24914,19 +25015,19 @@ function createNodeFactory(flags, baseFactory2) { function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) { return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } - function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { + function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) { const node = createBaseNode(272 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; + node.attributes = node.assertClause = attributes; node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; node.jsDoc = void 0; return node; } - function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; + function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { const node = createBaseDeclaration(273 /* ImportClause */); @@ -24947,6 +25048,7 @@ function createNodeFactory(flags, baseFactory2) { const node = createBaseNode(300 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; + node.token = 132 /* AssertKeyword */; node.transformFlags |= 4 /* ContainsESNext */; return node; } @@ -24972,6 +25074,27 @@ function createNodeFactory(flags, baseFactory2) { function updateImportTypeAssertionContainer(node, clause, multiLine) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } + function createImportAttributes(elements, multiLine, token) { + const node = createBaseNode(300 /* ImportAttributes */); + node.token = token ?? 118 /* WithKeyword */; + node.elements = createNodeArray(elements); + node.multiLine = multiLine; + node.transformFlags |= 4 /* ContainsESNext */; + return node; + } + function updateImportAttributes(node, elements, multiLine) { + return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node; + } + function createImportAttribute(name, value) { + const node = createBaseNode(301 /* ImportAttribute */); + node.name = name; + node.value = value; + node.transformFlags |= 4 /* ContainsESNext */; + return node; + } + function updateImportAttribute(node, name, value) { + return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node; + } function createNamespaceImport(name) { const node = createBaseDeclaration(274 /* NamespaceImport */); node.name = name; @@ -25032,20 +25155,20 @@ function createNodeFactory(flags, baseFactory2) { function updateExportAssignment(node, modifiers, expression) { return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; } - function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { + function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { const node = createBaseDeclaration(278 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; + node.attributes = node.assertClause = attributes; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; node.jsDoc = void 0; return node; } - function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause), node) : node; + function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes), node) : node; } function finishUpdateExportDeclaration(updated, original) { if (updated !== original) { @@ -25643,7 +25766,6 @@ function createNodeFactory(flags, baseFactory2) { node.imports = void 0; node.moduleAugmentations = void 0; node.ambientModuleNames = void 0; - node.resolvedModules = void 0; node.classifiableNames = void 0; node.impliedNodeFormat = void 0; return node; @@ -26255,7 +26377,7 @@ function createNodeFactory(flags, baseFactory2) { return qualifiedName; } function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) { - if (ns && hasSyntacticModifier(node, 1 /* Export */)) { + if (ns && hasSyntacticModifier(node, 32 /* Export */)) { return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps); } return getExportName(node, allowComments, allowSourceMaps); @@ -26366,18 +26488,36 @@ function createNodeFactory(flags, baseFactory2) { } return statements; } - function updateModifiers(node, modifiers) { + function replaceModifiers(node, modifiers) { let modifierArray; if (typeof modifiers === "number") { modifierArray = createModifiersFromModifierFlags(modifiers); } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.attributes) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.attributes) : Debug.assertNever(node); } - function updateModifierLike(node, modifierArray) { + function replaceDecoratorsAndModifiers(node, modifierArray) { return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); } + function replacePropertyName(node, name) { + switch (node.kind) { + case 177 /* GetAccessor */: + return updateGetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.type, node.body); + case 178 /* SetAccessor */: + return updateSetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.body); + case 174 /* MethodDeclaration */: + return updateMethodDeclaration(node, node.modifiers, node.asteriskToken, name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body); + case 173 /* MethodSignature */: + return updateMethodSignature(node, node.modifiers, name, node.questionToken, node.typeParameters, node.parameters, node.type); + case 172 /* PropertyDeclaration */: + return updatePropertyDeclaration2(node, node.modifiers, name, node.questionToken ?? node.exclamationToken, node.type, node.initializer); + case 171 /* PropertySignature */: + return updatePropertySignature(node, node.modifiers, name, node.questionToken, node.type); + case 303 /* PropertyAssignment */: + return updatePropertyAssignment(node, name, node.initializer); + } + } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; } @@ -27860,17 +28000,18 @@ var asyncGeneratorHelper = { scoped: false, dependencies: [awaitHelper], text: ` - var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - 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); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - };` + var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + };` }; var asyncDelegator = { name: "typescript:asyncDelegator", @@ -28722,6 +28863,12 @@ function isAssertClause(node) { function isAssertEntry(node) { return node.kind === 301 /* AssertEntry */; } +function isImportAttributes(node) { + return node.kind === 300 /* ImportAttributes */; +} +function isImportAttribute(node) { + return node.kind === 301 /* ImportAttribute */; +} function isNamespaceImport(node) { return node.kind === 274 /* NamespaceImport */; } @@ -29407,21 +29554,18 @@ function createExternalHelpersImportDeclarationIfNeeded(nodeFactory, helperFacto if (some(helperNames)) { helperNames.sort(compareStringsCaseSensitive); namedBindings = nodeFactory.createNamedImports( - map( - helperNames, - (name) => isFileLevelUniqueName(sourceFile, name) ? nodeFactory.createImportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ - void 0, - nodeFactory.createIdentifier(name) - ) : nodeFactory.createImportSpecifier( - /*isTypeOnly*/ - false, - nodeFactory.createIdentifier(name), - helperFactory.getUnscopedHelperName(name) - ) - ) + map(helperNames, (name) => isFileLevelUniqueName(sourceFile, name) ? nodeFactory.createImportSpecifier( + /*isTypeOnly*/ + false, + /*propertyName*/ + void 0, + nodeFactory.createIdentifier(name) + ) : nodeFactory.createImportSpecifier( + /*isTypeOnly*/ + false, + nodeFactory.createIdentifier(name), + helperFactory.getUnscopedHelperName(name) + )) ); const parseNode = getOriginalNode(sourceFile, isSourceFile); const emitNode = getOrCreateEmitNode(parseNode); @@ -29446,7 +29590,7 @@ function createExternalHelpersImportDeclarationIfNeeded(nodeFactory, helperFacto namedBindings ), nodeFactory.createStringLiteral(externalHelpersModuleNameText), - /*assertClause*/ + /*attributes*/ void 0 ); addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */); @@ -30212,7 +30356,7 @@ var forEachChildTable = { return visitNode2(cbNode, node.typeParameter); }, [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); + return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); @@ -30386,15 +30530,15 @@ var forEachChildTable = { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { @@ -30409,7 +30553,7 @@ var forEachChildTable = { [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, @@ -30663,7 +30807,8 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar const { languageVersion, setExternalModuleIndicator: overrideSetExternalModuleIndicator, - impliedNodeFormat: format + impliedNodeFormat: format, + jsDocParsingMode } = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { languageVersion: languageVersionOrOptions }; if (languageVersion === 100 /* JSON */) { result = Parser.parseSourceFile( @@ -30674,7 +30819,8 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar void 0, setParentNodes, 6 /* JSON */, - noop + noop, + jsDocParsingMode ); } else { const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => { @@ -30689,7 +30835,8 @@ function createSourceFile(fileName, sourceText, languageVersionOrOptions, setPar void 0, setParentNodes, scriptKind, - setIndicator + setIndicator, + jsDocParsingMode ); } (_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile(); @@ -30823,7 +30970,7 @@ var Parser; var contextFlags; var topLevel = true; var parseErrorBeforeNextFinishedNode = false; - function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride) { + function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) { var _a; scriptKind2 = ensureScriptKind(fileName2, scriptKind2); if (scriptKind2 === 6 /* JSON */) { @@ -30845,8 +30992,8 @@ var Parser; result2.pragmas = emptyMap; return result2; } - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2); - const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator); + initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode); + const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode); clearState(); return result; } @@ -30858,20 +31005,21 @@ var Parser; languageVersion2, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); nextToken(); const entityName = parseEntityName( /*allowReservedWords*/ true ); - const isInvalid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length; + const isValid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length; clearState(); - return isInvalid ? entityName : void 0; + return isValid ? entityName : void 0; } Parser2.parseIsolatedEntityName = parseIsolatedEntityName2; function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) { - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */); + initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */); sourceFlags = contextFlags; nextToken(); const pos = getNodePos(); @@ -30952,7 +31100,7 @@ var Parser; return result; } Parser2.parseJsonText = parseJsonText2; - function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind) { + function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) { NodeConstructor2 = objectAllocator.getNodeConstructor(); TokenConstructor2 = objectAllocator.getTokenConstructor(); IdentifierConstructor2 = objectAllocator.getIdentifierConstructor(); @@ -30988,11 +31136,15 @@ var Parser; scanner2.setOnError(scanError); scanner2.setScriptTarget(languageVersion); scanner2.setLanguageVariant(languageVariant); + scanner2.setScriptKind(scriptKind); + scanner2.setJSDocParsingMode(_jsDocParsingMode); } function clearState() { scanner2.clearCommentDirectives(); scanner2.setText(""); scanner2.setOnError(void 0); + scanner2.setScriptKind(0 /* Unknown */); + scanner2.setJSDocParsingMode(0 /* ParseAll */); sourceText = void 0; languageVersion = void 0; syntaxCursor = void 0; @@ -31006,7 +31158,7 @@ var Parser; notParenthesizedArrow = void 0; topLevel = true; } - function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { + function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) { const isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { contextFlags |= 33554432 /* Ambient */; @@ -31025,6 +31177,7 @@ var Parser; sourceFile.identifierCount = identifierCount; sourceFile.identifiers = identifiers; sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); + sourceFile.jsDocParsingMode = jsDocParsingMode; if (jsDocDiagnostics) { sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile); } @@ -31033,7 +31186,7 @@ var Parser; } return sourceFile; function reportPragmaDiagnostic(pos, end, diagnostic) { - parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); + parseDiagnostics.push(createDetachedDiagnostic(fileName, sourceText, pos, end, diagnostic)); } } let hasDeprecatedTag = false; @@ -31273,7 +31426,7 @@ var Parser; const lastError = lastOrUndefined(parseDiagnostics); let result; if (!lastError || start2 !== lastError.start) { - result = createDetachedDiagnostic(fileName, start2, length2, message, ...args); + result = createDetachedDiagnostic(fileName, sourceText, start2, length2, message, ...args); parseDiagnostics.push(result); } parseErrorBeforeNextFinishedNode = true; @@ -31501,7 +31654,7 @@ var Parser; if (lastError) { addRelatedInfo( lastError, - createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) + createDetachedDiagnostic(fileName, sourceText, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) ); } } @@ -31671,10 +31824,16 @@ var Parser; function parseIdentifierName(diagnosticMessage) { return createIdentifier(tokenIsIdentifierOrKeyword(token()), diagnosticMessage); } + function parseIdentifierNameErrorOnUnicodeEscapeSequence() { + if (scanner2.hasUnicodeEscape() || scanner2.hasExtendedUnicodeEscape()) { + parseErrorAtCurrentToken(Diagnostics.Unicode_escape_sequence_cannot_appear_here); + } + return createIdentifier(tokenIsIdentifierOrKeyword(token())); + } function isLiteralPropertyName() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */; } - function isAssertionKey2() { + function isImportAttributeName2() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */; } function parsePropertyNameWorker(allowComputedPropertyNames) { @@ -31793,8 +31952,8 @@ var Parser; return isLiteralPropertyName(); case 9 /* ObjectBindingElements */: return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName(); - case 24 /* AssertEntries */: - return isAssertionKey2(); + case 24 /* ImportAttributes */: + return isImportAttributeName2(); case 7 /* HeritageClauseElement */: if (token() === 19 /* OpenBraceToken */) { return lookAhead(isValidHeritageClauseObjectLiteral); @@ -31897,7 +32056,7 @@ var Parser; case 12 /* ObjectLiteralMembers */: case 9 /* ObjectBindingElements */: case 23 /* ImportOrExportSpecifiers */: - case 24 /* AssertEntries */: + case 24 /* ImportAttributes */: return token() === 20 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */; @@ -32203,7 +32362,7 @@ var Parser; return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 14 /* JsxChildren */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); - case 24 /* AssertEntries */: + case 24 /* ImportAttributes */: return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected); case 25 /* JSDocComment */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); @@ -32297,7 +32456,9 @@ var Parser; parseRightSideOfDot( allowReservedWords, /*allowPrivateIdentifiers*/ - false + false, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + true ) ), pos @@ -32308,7 +32469,7 @@ var Parser; function createQualifiedName(entity, name) { return finishNode(factory2.createQualifiedName(entity, name), entity.pos); } - function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers) { + function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers, allowUnicodeEscapeSequenceInIdentifierName) { if (scanner2.hasPrecedingLineBreak() && tokenIsIdentifierOrKeyword(token())) { const matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); if (matchesPattern) { @@ -32329,7 +32490,10 @@ var Parser; Diagnostics.Identifier_expected ); } - return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); + if (allowIdentifierNames) { + return allowUnicodeEscapeSequenceInIdentifierName ? parseIdentifierName() : parseIdentifierNameErrorOnUnicodeEscapeSequence(); + } + return parseIdentifier(); } function parseTemplateSpans(isTaggedTemplate) { const pos = getNodePos(); @@ -33073,28 +33237,6 @@ var Parser; nextToken(); return token() === 102 /* ImportKeyword */; } - function parseImportTypeAssertions() { - const pos = getNodePos(); - const openBracePosition = scanner2.getTokenStart(); - parseExpected(19 /* OpenBraceToken */); - const multiLine = scanner2.hasPrecedingLineBreak(); - parseExpected(132 /* AssertKeyword */); - parseExpected(59 /* ColonToken */); - const clause = parseAssertClause( - /*skipAssertKeyword*/ - true - ); - if (!parseExpected(20 /* CloseBraceToken */)) { - const lastError = lastOrUndefined(parseDiagnostics); - if (lastError && lastError.code === Diagnostics._0_expected.code) { - addRelatedInfo( - lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") - ); - } - } - return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); - } function parseImportType() { sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); @@ -33102,14 +33244,36 @@ var Parser; parseExpected(102 /* ImportKeyword */); parseExpected(21 /* OpenParenToken */); const type = parseType(); - let assertions; + let attributes; if (parseOptional(28 /* CommaToken */)) { - assertions = parseImportTypeAssertions(); + const openBracePosition = scanner2.getTokenStart(); + parseExpected(19 /* OpenBraceToken */); + const currentToken2 = token(); + if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) { + nextToken(); + } else { + parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */)); + } + parseExpected(59 /* ColonToken */); + attributes = parseImportAttributes( + currentToken2, + /*skipKeyword*/ + true + ); + if (!parseExpected(20 /* CloseBraceToken */)) { + const lastError = lastOrUndefined(parseDiagnostics); + if (lastError && lastError.code === Diagnostics._0_expected.code) { + addRelatedInfo( + lastError, + createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + ); + } + } } parseExpected(22 /* CloseParenToken */); const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0; const typeArguments = parseTypeArgumentsOfTypeReference(); - return finishNode(factory2.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos); + return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos); } function nextTokenIsNumericOrBigIntLiteral() { nextToken(); @@ -34104,6 +34268,8 @@ var Parser; /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + true, + /*allowUnicodeEscapeSequenceInIdentifierName*/ true )), pos); } @@ -34271,6 +34437,8 @@ var Parser; /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + false, + /*allowUnicodeEscapeSequenceInIdentifierName*/ false )), pos); } @@ -34280,10 +34448,10 @@ var Parser; const pos = getNodePos(); scanJsxIdentifier(); const isThis2 = token() === 110 /* ThisKeyword */; - const tagName = parseIdentifierName(); + const tagName = parseIdentifierNameErrorOnUnicodeEscapeSequence(); if (parseOptional(59 /* ColonToken */)) { scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierName()), pos); + return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos); } return isThis2 ? finishNode(factory2.createToken(110 /* ThisKeyword */), pos) : tagName; } @@ -34295,7 +34463,9 @@ var Parser; let dotDotDotToken; let expression; if (token() !== 20 /* CloseBraceToken */) { - dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); + if (!inExpressionContext) { + dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); + } expression = parseExpression(); } if (inExpressionContext) { @@ -34344,10 +34514,10 @@ var Parser; function parseJsxAttributeName() { const pos = getNodePos(); scanJsxIdentifier(); - const attrName = parseIdentifierName(); + const attrName = parseIdentifierNameErrorOnUnicodeEscapeSequence(); if (parseOptional(59 /* ColonToken */)) { scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierName()), pos); + return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos); } return attrName; } @@ -34435,6 +34605,8 @@ var Parser; /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + true, + /*allowUnicodeEscapeSequenceInIdentifierName*/ true ); const isOptionalChain2 = questionDotToken || tryReparseOptionalChain(expression); @@ -34919,7 +35091,8 @@ var Parser; parseExpected(21 /* OpenParenToken */); let initializer; if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { + if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || // this one is meant to allow of + token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine)) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -35240,12 +35413,6 @@ var Parser; function isUsingDeclaration() { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); } - function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { - return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( - /*disallowOf*/ - true - ); - } function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { if (nextToken() === 160 /* UsingKeyword */) { return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); @@ -35602,11 +35769,11 @@ var Parser; const modifierFlags = modifiersToFlags(modifiers); parseExpected(100 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); - const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); + const name = modifierFlags & 2048 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; - const isAsync = modifierFlags & 512 /* Async */ ? 2 /* Await */ : 0 /* None */; + const isAsync = modifierFlags & 1024 /* Async */ ? 2 /* Await */ : 0 /* None */; const typeParameters = parseTypeParameters(); - if (modifierFlags & 1 /* Export */) + if (modifierFlags & 32 /* Export */) setAwaitContext( /*value*/ true @@ -36074,7 +36241,7 @@ var Parser; } function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { const namespaceFlag = flags & 32 /* Namespace */; - const name = parseIdentifier(); + const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier(); const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( getNodePos(), /*hasJSDoc*/ @@ -36163,15 +36330,16 @@ var Parser; parseExpected(161 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); - let assertClause; - if (token() === 132 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); + const currentToken2 = token(); + let attributes; + if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) { + attributes = parseImportAttributes(currentToken2); } parseSemicolon(); - const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause); + const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes); return withJSDoc(finishNode(node, pos), hasJSDoc); } - function parseAssertEntry() { + function parseImportAttribute() { const pos = getNodePos(); const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */); parseExpected(59 /* ColonToken */); @@ -36179,19 +36347,19 @@ var Parser; /*allowReturnTypeInArrowFunction*/ true ); - return finishNode(factory2.createAssertEntry(name, value), pos); + return finishNode(factory2.createImportAttribute(name, value), pos); } - function parseAssertClause(skipAssertKeyword) { + function parseImportAttributes(token2, skipKeyword) { const pos = getNodePos(); - if (!skipAssertKeyword) { - parseExpected(132 /* AssertKeyword */); + if (!skipKeyword) { + parseExpected(token2); } const openBracePosition = scanner2.getTokenStart(); if (parseExpected(19 /* OpenBraceToken */)) { const multiLine = scanner2.hasPrecedingLineBreak(); const elements = parseDelimitedList( - 24 /* AssertEntries */, - parseAssertEntry, + 24 /* ImportAttributes */, + parseImportAttribute, /*considerSemicolonAsDelimiter*/ true ); @@ -36200,11 +36368,11 @@ var Parser; if (lastError && lastError.code === Diagnostics._0_expected.code) { addRelatedInfo( lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") ); } } - return finishNode(factory2.createAssertClause(elements, multiLine), pos); + return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos); } else { const elements = createNodeArray( [], @@ -36214,10 +36382,11 @@ var Parser; /*hasTrailingComma*/ false ); - return finishNode(factory2.createAssertClause( + return finishNode(factory2.createImportAttributes( elements, /*multiLine*/ - false + false, + token2 ), pos); } } @@ -36349,7 +36518,7 @@ var Parser; ); let exportClause; let moduleSpecifier; - let assertClause; + let attributes; const isTypeOnly = parseOptional(156 /* TypeKeyword */); const namespaceExportPos = getNodePos(); if (parseOptional(42 /* AsteriskToken */)) { @@ -36365,12 +36534,13 @@ var Parser; moduleSpecifier = parseModuleSpecifier(); } } - if (moduleSpecifier && token() === 132 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); + const currentToken2 = token(); + if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) { + attributes = parseImportAttributes(currentToken2); } parseSemicolon(); setAwaitContext(savedAwaitContext); - const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); + const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseExportAssignment(pos, hasJSDoc, modifiers) { @@ -36420,7 +36590,7 @@ var Parser; ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes"; ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses"; ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers"; - ParsingContext2[ParsingContext2["AssertEntries"] = 24] = "AssertEntries"; + ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes"; ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment"; ParsingContext2[ParsingContext2["Count"] = 26] = "Count"; })(ParsingContext || (ParsingContext = {})); @@ -36439,7 +36609,8 @@ var Parser; 99 /* Latest */, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); scanner2.setText(content, start2, length2); currentToken = scanner2.scan(); @@ -36503,7 +36674,8 @@ var Parser; 99 /* Latest */, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start2, length2)); const sourceFile = { languageVariant: 0 /* Standard */, text: content }; @@ -36544,8 +36716,6 @@ var Parser; PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter"; })(PropertyLikeParse || (PropertyLikeParse = {})); function parseJSDocCommentWorker(start2 = 0, length2) { - const saveParsingContext = parsingContext; - parsingContext |= 1 << 25 /* JSDocComment */; const content = sourceText; const end = length2 === void 0 ? content.length : start2 + length2; length2 = end - start2; @@ -36562,6 +36732,8 @@ var Parser; let commentsPos; let comments = []; const parts = []; + const saveParsingContext = parsingContext; + parsingContext |= 1 << 25 /* JSDocComment */; const result = scanner2.scanRange(start2 + 3, length2 - 5, doJSDocScan); parsingContext = saveParsingContext; return result; @@ -36653,7 +36825,7 @@ var Parser; nextTokenJSDoc(); } } - const trimmedComments = trimStringEnd(comments.join("")); + const trimmedComments = comments.join("").trimEnd(); if (parts.length && trimmedComments.length) { parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start2, commentsPos)); } @@ -36669,7 +36841,7 @@ var Parser; } function removeTrailingWhitespace(comments2) { while (comments2.length) { - const trimmed = trimStringEnd(comments2[comments2.length - 1]); + const trimmed = comments2[comments2.length - 1].trimEnd(); if (trimmed === "") { comments2.pop(); } else if (trimmed.length < comments2[comments2.length - 1].length) { @@ -36909,7 +37081,7 @@ var Parser; } } removeLeadingNewlines(comments2); - const trimmedComments = trimStringEnd(comments2.join("")); + const trimmedComments = comments2.join("").trimEnd(); if (parts2.length) { if (trimmedComments.length) { parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2)); @@ -37179,7 +37351,7 @@ var Parser; if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { - addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here)); + addRelatedInfo(lastError, createDetachedDiagnostic(fileName, sourceText, 0, 0, Diagnostics.The_tag_was_first_specified_here)); } break; } else { @@ -37459,7 +37631,8 @@ var IncrementalParser; /*setParentNodes*/ true, sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator + sourceFile.setExternalModuleIndicator, + sourceFile.jsDocParsingMode ); } const incrementalSourceFile = sourceFile; @@ -37474,16 +37647,7 @@ var IncrementalParser; Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span)); Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange))); const delta = textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - updateTokenPositionsAndMarkElements( - incrementalSourceFile, - changeRange.span.start, - textSpanEnd(changeRange.span), - textSpanEnd(textChangeRangeNewSpan(changeRange)), - delta, - oldText, - newText, - aggressiveChecks - ); + updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, textSpanEnd(changeRange.span), textSpanEnd(textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); const result = Parser.parseSourceFile( sourceFile.fileName, newText, @@ -37492,7 +37656,8 @@ var IncrementalParser; /*setParentNodes*/ true, sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator + sourceFile.setExternalModuleIndicator, + sourceFile.jsDocParsingMode ); result.commentDirectives = getNewCommentDirectives( sourceFile.commentDirectives, @@ -37816,7 +37981,7 @@ var IncrementalParser; })(InvalidPosition || (InvalidPosition = {})); })(IncrementalParser || (IncrementalParser = {})); function isDeclarationFileName(fileName) { - return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && stringContains(getBaseFileName(fileName), ".d."); + return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d."); } function parseResolutionMode(mode, pos, end, reportDiagnostic) { if (!mode) { @@ -38002,7 +38167,7 @@ function getNamedPragmaArguments(pragma, text) { return {}; if (!pragma.args) return {}; - const args = trimString(text).split(/\s+/); + const args = text.trim().split(/\s+/); const argMap = {}; for (let i = 0; i < pragma.args.length; i++) { const argument = pragma.args[i]; @@ -38433,6 +38598,7 @@ var moduleOptionDeclaration = { node16: 100 /* Node16 */, nodenext: 199 /* NodeNext */ })), + affectsSourceFile: true, affectsModuleResolution: true, affectsEmit: true, affectsBuildInfo: true, @@ -38525,7 +38691,8 @@ var commandOptionsWithoutBuild = [ { name: "allowJs", type: "boolean", - affectsModuleResolution: true, + allowJsFlag: true, + affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, @@ -38535,6 +38702,8 @@ var commandOptionsWithoutBuild = [ name: "checkJs", type: "boolean", affectsModuleResolution: true, + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, @@ -38547,6 +38716,10 @@ var commandOptionsWithoutBuild = [ affectsEmit: true, affectsBuildInfo: true, affectsModuleResolution: true, + // The checker emits an error when it sees JSX but this option is not set in compilerOptions. + // This is effectively a semantic error, so mark this option as affecting semantic diagnostics + // so we know to refresh errors when this option is changed. + affectsSemanticDiagnostics: true, paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, category: Diagnostics.Language_and_Environment, @@ -38862,6 +39035,7 @@ var commandOptionsWithoutBuild = [ bundler: 100 /* Bundler */ })), deprecatedKeys: /* @__PURE__ */ new Set(["node"]), + affectsSourceFile: true, affectsModuleResolution: true, paramType: Diagnostics.STRATEGY, category: Diagnostics.Modules, @@ -39112,7 +39286,7 @@ var commandOptionsWithoutBuild = [ affectsBuildInfo: true, affectsDeclarationPath: true, isFilePath: false, - // This is intentionally broken to support compatability with existing tsconfig files + // This is intentionally broken to support compatibility with existing tsconfig files // for correct behaviour, please use outFile category: Diagnostics.Backwards_Compatibility, paramType: Diagnostics.FILE, @@ -39404,6 +39578,7 @@ var commandOptionsWithoutBuild = [ legacy: 1 /* Legacy */, force: 3 /* Force */ })), + affectsSourceFile: true, affectsModuleResolution: true, description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files, category: Diagnostics.Language_and_Environment, @@ -39423,7 +39598,7 @@ var semanticDiagnosticsOptionDeclarations = optionDeclarations.filter((option) = var affectsEmitOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsEmit); var affectsDeclarationPathOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsDeclarationPath); var moduleResolutionOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsModuleResolution); -var sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics); +var sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsBindDiagnostics); var optionsAffectingProgramStructure = optionDeclarations.filter((option) => !!option.affectsProgramStructure); var transpileOptionValueCompilerOptions = optionDeclarations.filter((option) => hasProperty(option, "transpileOptionValue")); var optionsForBuild = [ @@ -39527,14 +39702,14 @@ function createDiagnosticForInvalidCustomType(opt, createDiagnostic) { return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames); } function parseCustomTypeOption(opt, value, errors) { - return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors); + return convertJsonOptionOfCustomType(opt, (value ?? "").trim(), errors); } function parseListTypeOption(opt, value = "", errors) { - value = trimString(value); + value = value.trim(); if (startsWith(value, "-")) { return void 0; } - if (opt.type === "listOrElement" && !stringContains(value, ",")) { + if (opt.type === "listOrElement" && !value.includes(",")) { return validateJsonOptionValue(opt, value, errors); } if (value === "") { @@ -39776,9 +39951,8 @@ function parseBuildCommand(args) { } return { buildOptions, watchOptions, projects, errors }; } -function getDiagnosticText(_message, ..._args) { - const diagnostic = createCompilerDiagnostic.apply(void 0, arguments); - return diagnostic.messageText; +function getDiagnosticText(message, ...args) { + return cast(createCompilerDiagnostic(message, ...args).messageText, isString); } function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) { const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName)); @@ -40581,7 +40755,7 @@ function parseConfig(json, sourceFile, host, basePath, configFileName, resolutio var _a; basePath = normalizeSlashes(basePath); const resolvedPath = getNormalizedAbsolutePath(configFileName || "", basePath); - if (resolutionStack.indexOf(resolvedPath) >= 0) { + if (resolutionStack.includes(resolvedPath)) { errors.push(createCompilerDiagnostic(Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, [...resolutionStack, resolvedPath].join(" -> "))); return { raw: json || convertToObject(sourceFile, errors) }; } @@ -40663,14 +40837,17 @@ function getExtendsConfigPathOrArray(value, host, basePath, configFileName, erro for (let index = 0; index < value.length; index++) { const fileName = value[index]; if (isString(fileName)) { - extendedConfigPath = append(extendedConfigPath, getExtendsConfigPath( - fileName, - host, - newBase, - errors, - valueExpression == null ? void 0 : valueExpression.elements[index], - sourceFile - )); + extendedConfigPath = append( + extendedConfigPath, + getExtendsConfigPath( + fileName, + host, + newBase, + errors, + valueExpression == null ? void 0 : valueExpression.elements[index], + sourceFile + ) + ); } else { convertJsonOption(extendsOptionDeclaration.element, value, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile); } @@ -41102,7 +41279,7 @@ function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, e return false; } for (const ext of extensionGroup) { - if (fileExtensionIs(file, ext)) { + if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) { return false; } const higherPriorityPath = keyMapper(changeExtension(file, ext)); @@ -41191,8 +41368,8 @@ function getDefaultValueForOption(option) { } // src/compiler/moduleNameResolver.ts -function trace(host) { - host.trace(formatMessage.apply(void 0, arguments)); +function trace(host, message, ...args) { + host.trace(formatMessage(message, ...args)); } function isTraceEnabled(compilerOptions, host) { return !!compilerOptions.traceResolution && host.trace !== void 0; @@ -41255,7 +41432,7 @@ function resolvedTypeScriptOnly(resolved) { Debug.assert(extensionIsTS(resolved.extension)); return { fileName: resolved.path, packageId: resolved.packageId }; } -function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, legacyResult) { +function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, cache, legacyResult) { if (!state.resultFromCache && !state.compilerOptions.preserveSymlinks && resolved && isExternalLibraryImport && !resolved.originalPath && !isExternalModuleNameRelative(moduleName)) { const { resolvedFileName, originalPath } = getOriginalAndResolvedFileName(resolved.path, state.host, state.traceEnabled); if (originalPath) @@ -41268,15 +41445,25 @@ function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName affectingLocations, diagnostics, state.resultFromCache, + cache, legacyResult ); } -function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) { +function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, cache, legacyResult) { if (resultFromCache) { - resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations); - resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations); - resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics); - return resultFromCache; + if (!(cache == null ? void 0 : cache.isReadonly)) { + resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations); + resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations); + resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics); + return resultFromCache; + } else { + return { + ...resultFromCache, + failedLookupLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.failedLookupLocations, failedLookupLocations), + affectingLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.affectingLocations, affectingLocations), + resolutionDiagnostics: initializeResolutionFieldForReadonlyCache(resultFromCache.resolutionDiagnostics, diagnostics) + }; + } } return { resolvedModule: resolved && { @@ -41304,6 +41491,13 @@ function updateResolutionField(to, value) { to.push(...value); return to; } +function initializeResolutionFieldForReadonlyCache(fromCache, value) { + if (!(fromCache == null ? void 0 : fromCache.length)) + return initializeResolutionField(value); + if (!value.length) + return fromCache.slice(); + return [...fromCache, ...value]; +} function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) { if (!hasProperty(jsonContent, fieldName)) { if (state.traceEnabled) { @@ -41481,10 +41675,14 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil const failedLookupLocations = []; const affectingLocations = []; let features = getNodeResolutionFeatures(options); - if (resolutionMode === 99 /* ESNext */ && (getEmitModuleResolutionKind(options) === 3 /* Node16 */ || getEmitModuleResolutionKind(options) === 99 /* NodeNext */)) { + if (resolutionMode !== void 0) { + features |= 30 /* AllFeatures */; + } + const moduleResolution = getEmitModuleResolutionKind(options); + if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) { features |= 32 /* EsmMode */; } - const conditions = features & 8 /* Exports */ ? getConditions(options, !!(features & 32 /* EsmMode */)) : []; + const conditions = features & 8 /* Exports */ ? getConditions(options, resolutionMode) : []; const diagnostics = []; const moduleResolutionState = { compilerOptions: options, @@ -41526,15 +41724,15 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil affectingLocations: initializeResolutionField(affectingLocations), resolutionDiagnostics: initializeResolutionField(diagnostics) }; - if (containingDirectory) { - cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set( + if (containingDirectory && cache && !cache.isReadonly) { + cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set( typeReferenceDirectiveName, /*mode*/ resolutionMode, result ); if (!isExternalModuleNameRelative(typeReferenceDirectiveName)) { - cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(typeReferenceDirectiveName, resolutionMode, redirectedReference).set(containingDirectory, result); + cache.getOrCreateCacheForNonRelativeName(typeReferenceDirectiveName, resolutionMode, redirectedReference).set(containingDirectory, result); } } if (traceEnabled) @@ -41575,12 +41773,7 @@ function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFil } } return resolvedTypeScriptOnly( - loadNodeModuleFromDirectory( - 4 /* Declaration */, - candidate, - !directoryExists, - moduleResolutionState - ) + loadNodeModuleFromDirectory(4 /* Declaration */, candidate, !directoryExists, moduleResolutionState) ); }); } else { @@ -41657,12 +41850,20 @@ function getNodeResolutionFeatures(options) { } return features; } -function getConditions(options, esmMode) { - const conditions = esmMode || getEmitModuleResolutionKind(options) === 100 /* Bundler */ ? ["import"] : ["require"]; +function getConditions(options, resolutionMode) { + const moduleResolution = getEmitModuleResolutionKind(options); + if (resolutionMode === void 0) { + if (moduleResolution === 100 /* Bundler */) { + resolutionMode = 99 /* ESNext */; + } else if (moduleResolution === 2 /* Node10 */) { + return []; + } + } + const conditions = resolutionMode === 99 /* ESNext */ ? ["import"] : ["require"]; if (!options.noDtsResolution) { conditions.push("types"); } - if (getEmitModuleResolutionKind(options) !== 100 /* Bundler */) { + if (moduleResolution !== 100 /* Bundler */) { conditions.push("node"); } return concatenate(conditions, options.customConditions); @@ -41728,9 +41929,8 @@ function compilerOptionValueToString(value) { function getKeyForCompilerOptions(options, affectingOptionDeclarations) { return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + `|${options.pathsBasePath}`; } -function createCacheWithRedirects(ownOptions) { +function createCacheWithRedirects(ownOptions, optionsToRedirectsKey) { const redirectsMap = /* @__PURE__ */ new Map(); - const optionsToRedirectsKey = /* @__PURE__ */ new Map(); const redirectsKeyToMap = /* @__PURE__ */ new Map(); let ownMap = /* @__PURE__ */ new Map(); if (ownOptions) @@ -41739,7 +41939,8 @@ function createCacheWithRedirects(ownOptions) { getMapOfCacheRedirects, getOrCreateMapOfCacheRedirects, update, - clear: clear2 + clear: clear2, + getOwnMap: () => ownMap }; function getMapOfCacheRedirects(redirectedReference) { return redirectedReference ? getOrCreateMap( @@ -41840,13 +42041,14 @@ function getOrCreateCache(cacheWithRedirects, redirectedReference, key, create) } return result; } -function createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options) { - const directoryToModuleNameMap = createCacheWithRedirects(options); +function createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options, optionsToRedirectsKey) { + const directoryToModuleNameMap = createCacheWithRedirects(options, optionsToRedirectsKey); return { getFromDirectoryCache, getOrCreateCacheForDirectory, clear: clear2, - update + update, + directoryToModuleNameMap }; function clear2() { directoryToModuleNameMap.clear(); @@ -41902,23 +42104,14 @@ function createModeAwareCache() { return result; } } -function zipToModeAwareCache(file, keys, values, nameAndModeGetter) { - Debug.assert(keys.length === values.length); - const map2 = createModeAwareCache(); - for (let i = 0; i < keys.length; ++i) { - const entry = keys[i]; - map2.set(nameAndModeGetter.getName(entry), nameAndModeGetter.getMode(entry, file), values[i]); - } - return map2; -} function getOriginalOrResolvedModuleFileName(result) { return result.resolvedModule && (result.resolvedModule.originalPath || result.resolvedModule.resolvedFileName); } function getOriginalOrResolvedTypeReferenceFileName(result) { return result.resolvedTypeReferenceDirective && (result.resolvedTypeReferenceDirective.originalPath || result.resolvedTypeReferenceDirective.resolvedFileName); } -function createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFileName, options, getResolvedFileName) { - const moduleNameToDirectoryMap = createCacheWithRedirects(options); +function createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFileName, options, getResolvedFileName, optionsToRedirectsKey) { + const moduleNameToDirectoryMap = createCacheWithRedirects(options, optionsToRedirectsKey); return { getFromNonRelativeNameCache, getOrCreateCacheForNonRelativeName, @@ -41986,13 +42179,20 @@ function createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFile } } } -function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, getResolvedFileName) { - const perDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options); +function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, getResolvedFileName, optionsToRedirectsKey) { + optionsToRedirectsKey ?? (optionsToRedirectsKey = /* @__PURE__ */ new Map()); + const perDirectoryResolutionCache = createPerDirectoryResolutionCache( + currentDirectory, + getCanonicalFileName, + options, + optionsToRedirectsKey + ); const nonRelativeNameResolutionCache = createNonRelativeNameResolutionCache( currentDirectory, getCanonicalFileName, options, - getResolvedFileName + getResolvedFileName, + optionsToRedirectsKey ); packageJsonInfoCache ?? (packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName)); return { @@ -42002,7 +42202,8 @@ function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonic clear: clear2, update, getPackageJsonInfoCache: () => packageJsonInfoCache, - clearAllExceptPackageJsonInfoCache + clearAllExceptPackageJsonInfoCache, + optionsToRedirectsKey }; function clear2() { clearAllExceptPackageJsonInfoCache(); @@ -42017,24 +42218,26 @@ function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonic nonRelativeNameResolutionCache.update(options2); } } -function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache) { +function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, optionsToRedirectsKey) { const result = createModuleOrTypeReferenceResolutionCache( currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, - getOriginalOrResolvedModuleFileName + getOriginalOrResolvedModuleFileName, + optionsToRedirectsKey ); result.getOrCreateCacheForModuleName = (nonRelativeName, mode, redirectedReference) => result.getOrCreateCacheForNonRelativeName(nonRelativeName, mode, redirectedReference); return result; } -function createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache) { +function createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, optionsToRedirectsKey) { return createModuleOrTypeReferenceResolutionCache( currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, - getOriginalOrResolvedTypeReferenceFileName + getOriginalOrResolvedTypeReferenceFileName, + optionsToRedirectsKey ); } function getOptionsForLibraryResolution(options) { @@ -42105,13 +42308,13 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); break; case 2 /* Node10 */: - result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); + result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0); break; case 1 /* Classic */: result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); break; case 100 /* Bundler */: - result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); + result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0); break; default: return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`); @@ -42119,9 +42322,11 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca if (result && result.resolvedModule) (_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`); (_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null"); - cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); - if (!isExternalModuleNameRelative(moduleName)) { - cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); + if (cache && !cache.isReadonly) { + cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); + if (!isExternalModuleNameRelative(moduleName)) { + cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); + } } } if (traceEnabled) { @@ -42289,7 +42494,7 @@ function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, resolutionMode ); } -function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) { +function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) { const containingDirectory = getDirectoryPath(containingFile); const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0; let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; @@ -42306,7 +42511,8 @@ function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + conditions ); } function tryResolveJSModuleWorker(moduleName, initialDir, host) { @@ -42322,10 +42528,12 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) { /*isConfigLookup*/ false, /*redirectedReference*/ + void 0, + /*conditions*/ void 0 ); } -function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) { +function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) { const containingDirectory = getDirectoryPath(containingFile); let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; if (getResolveJsonModule(compilerOptions)) { @@ -42341,10 +42549,11 @@ function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + conditions ); } -function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) { +function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) { let extensions; if (isConfigLookup) { extensions = 8 /* Json */; @@ -42355,7 +42564,7 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos } else { extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; } - return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference); + return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions); } function nodeNextJsonConfigResolver(moduleName, containingFile, host) { return nodeModuleNameResolverWorker( @@ -42370,15 +42579,21 @@ function nodeNextJsonConfigResolver(moduleName, containingFile, host) { /*isConfigLookup*/ true, /*redirectedReference*/ + void 0, + /*conditions*/ void 0 ); } -function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) { +function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) { var _a, _b, _c, _d; const traceEnabled = isTraceEnabled(compilerOptions, host); const failedLookupLocations = []; const affectingLocations = []; - const conditions = getConditions(compilerOptions, !!(features & 32 /* EsmMode */)); + const moduleResolution = getEmitModuleResolutionKind(compilerOptions); + conditions ?? (conditions = getConditions( + compilerOptions, + moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */ + )); const diagnostics = []; const state = { compilerOptions, @@ -42388,17 +42603,17 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, affectingLocations, packageJsonInfoCache: cache, features, - conditions, + conditions: conditions ?? emptyArray, requestContainingDirectory: containingDirectory, reportDiagnostic: (diag2) => void diagnostics.push(diag2), isConfigLookup, candidateIsFromPackageJsonField: false }; - if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(compilerOptions))) { - trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", ")); + if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { + trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", ")); } let result; - if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) { + if (moduleResolution === 2 /* Node10 */) { const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0; @@ -42406,7 +42621,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, result = tryResolve(extensions, state); } let legacyResult; - if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.indexOf("import") > -1) { + if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && (conditions == null ? void 0 : conditions.includes("import"))) { traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update); const diagnosticState = { ...state, @@ -42426,6 +42641,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, affectingLocations, diagnostics, state, + cache, legacyResult ); function tryResolve(extensions2, state2) { @@ -42450,7 +42666,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); } if (!resolved2) { - if (moduleName.indexOf(":") > -1) { + if (moduleName.includes(":")) { if (traceEnabled) { trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); } @@ -42495,7 +42711,6 @@ function realPath(path, host, traceEnabled) { if (traceEnabled) { trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real); } - Debug.assert(host.fileExists(real), `${path} linked to nonexistent file ${real}`); return real; } function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) { @@ -42540,7 +42755,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, } var nodeModulesPathPart = "/node_modules/"; function pathContainsNodeModules(path) { - return stringContains(path, nodeModulesPathPart); + return path.includes(nodeModulesPathPart); } function parseNodeModuleFromPath(resolved, isFolder) { const path = normalizePath(resolved); @@ -42576,7 +42791,7 @@ function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) { } function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) { const filename = getBaseFileName(candidate); - if (filename.indexOf(".") === -1) { + if (!filename.includes(".")) { return void 0; } let extensionless = removeFileExtension(candidate); @@ -42688,15 +42903,7 @@ function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache entrypoints = append(entrypoints, mainResolution == null ? void 0 : mainResolution.path); if (features & 8 /* Exports */ && packageJsonInfo.contents.packageJsonContent.exports) { const conditionSets = deduplicate( - [getConditions( - options, - /*esmMode*/ - true - ), getConditions( - options, - /*esmMode*/ - false - )], + [getConditions(options, 99 /* ESNext */), getConditions(options, 1 /* CommonJS */)], arrayIsEqualTo ); for (const conditions of conditionSets) { @@ -42733,7 +42940,7 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) { function loadEntrypointsFromTargetExports(target) { var _a, _b; if (typeof target === "string" && startsWith(target, "./")) { - if (target.indexOf("*") >= 0 && state.host.readDirectory) { + if (target.includes("*") && state.host.readDirectory) { if (target.indexOf("*") !== target.lastIndexOf("*")) { return false; } @@ -42742,7 +42949,9 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) { extensionsToExtensionsArray(extensions), /*excludes*/ void 0, - [changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))] + [ + isDeclarationFileName(target) ? target.replace("*", "**/*") : changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target)) + ] ).forEach((entry) => { entrypoints = appendIfUnique(entrypoints, { path: entry, @@ -42752,7 +42961,7 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) { }); } else { const partsAfterFirst = getPathComponents(target).slice(2); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) { return false; } const resolvedTarget = combinePaths(scope.packageDirectory, target); @@ -42826,7 +43035,7 @@ function getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) { return packageJsonInfo.contents.versionPaths || void 0; } function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { - var _a, _b, _c, _d, _e, _f, _g, _h; + var _a, _b, _c, _d, _e, _f; const { host, traceEnabled } = state; const packageJsonPath = combinePaths(packageDirectory, "package.json"); if (onlyRecordFailures) { @@ -42854,15 +43063,17 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath); } const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0 } }; - (_e = state.packageJsonInfoCache) == null ? void 0 : _e.setPackageJsonInfo(packageJsonPath, result); - (_f = state.affectingLocations) == null ? void 0 : _f.push(packageJsonPath); + if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) + state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, result); + (_e = state.affectingLocations) == null ? void 0 : _e.push(packageJsonPath); return result; } else { if (directoryExists && traceEnabled) { trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath); } - (_g = state.packageJsonInfoCache) == null ? void 0 : _g.setPackageJsonInfo(packageJsonPath, directoryExists); - (_h = state.failedLookupLocations) == null ? void 0 : _h.push(packageJsonPath); + if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) + state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, directoryExists); + (_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath); } } function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) { @@ -43120,7 +43331,7 @@ function comparePatternKeys(a, b) { } function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) { const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports); - if (!endsWith(moduleName, directorySeparator) && moduleName.indexOf("*") === -1 && hasProperty(lookupTable, moduleName)) { + if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) { const target = lookupTable[moduleName]; return loadModuleFromTargetImportOrExport( target, @@ -43131,7 +43342,7 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe moduleName ); } - const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.indexOf("*") !== -1 || endsWith(k, "/")), comparePatternKeys); + const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys); for (const potentialTarget of expandingKeys) { if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) { const target = lookupTable[potentialTarget]; @@ -43203,15 +43414,18 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + state.conditions + ); + return toSearchResult( + result.resolvedModule ? { + path: result.resolvedModule.resolvedFileName, + extension: result.resolvedModule.extension, + packageId: result.resolvedModule.packageId, + originalPath: result.resolvedModule.originalPath, + resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension + } : void 0 ); - return toSearchResult(result.resolvedModule ? { - path: result.resolvedModule.resolvedFileName, - extension: result.resolvedModule.extension, - packageId: result.resolvedModule.packageId, - originalPath: result.resolvedModule.originalPath, - resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension - } : void 0); } if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); @@ -43223,7 +43437,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target); const partsAfterFirst = parts.slice(1); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) { if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); } @@ -43234,7 +43448,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } const resolvedTarget = combinePaths(scope.packageDirectory, target); const subpathParts = getPathComponents(subpath); - if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) { + if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) { if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); } @@ -43244,13 +43458,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec ); } if (state.traceEnabled) { - trace( - state.host, - Diagnostics.Using_0_subpath_1_with_target_2, - isImports ? "imports" : "exports", - key, - pattern ? target.replace(/\*/g, subpath) : target + subpath - ); + trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports", key, pattern ? target.replace(/\*/g, subpath) : target + subpath); } const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath); const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports); @@ -43267,7 +43475,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec if (!Array.isArray(target)) { traceIfEnabled(state, Diagnostics.Entering_conditional_exports); for (const condition of getOwnKeys(target)) { - if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) { + if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) { traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition); const subTarget = target[condition]; const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key); @@ -43328,7 +43536,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { + if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { @@ -43402,7 +43610,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } } function isApplicableVersionedTypesKey(conditions, key) { - if (conditions.indexOf("types") === -1) + if (!conditions.includes("types")) return false; if (!startsWith(key, "types@")) return false; @@ -43607,7 +43815,7 @@ function getPackageNameFromTypesPackageName(mangledName) { return mangledName; } function unmangleScopedPackageName(typesPackageName) { - return stringContains(typesPackageName, mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName; + return typesPackageName.includes(mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName; } function tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containingDirectory, redirectedReference, state) { const result = cache && cache.getFromNonRelativeNameCache(moduleName, mode, containingDirectory, redirectedReference); @@ -43655,7 +43863,8 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host, failedLookupLocations, affectingLocations, diagnostics, - state + state, + cache ); function tryResolve(extensions) { const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state); @@ -43774,7 +43983,9 @@ function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, hos failedLookupLocations, affectingLocations, diagnostics, - state.resultFromCache + state.resultFromCache, + /*cache*/ + void 0 ); } function toSearchResult(value) { @@ -43829,7 +44040,7 @@ function getModuleInstanceStateWorker(node, visited) { break; case 272 /* ImportDeclaration */: case 271 /* ImportEqualsDeclaration */: - if (!hasSyntacticModifier(node, 1 /* Export */)) { + if (!hasSyntacticModifier(node, 32 /* Export */)) { return 0 /* NonInstantiated */; } break; @@ -44119,7 +44330,7 @@ function createBinder() { } function declareSymbol(symbolTable, parent3, node, includes, excludes, isReplaceableByMethod, isComputedName) { Debug.assert(isComputedName || !hasDynamicName(node)); - const isDefaultExport = hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default"; + const isDefaultExport = hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default"; const name = isComputedName ? "__computed" /* Computed */ : isDefaultExport && parent3 ? "default" /* Default */ : getDeclarationName(node); let symbol; if (name === void 0) { @@ -44163,7 +44374,7 @@ function createBinder() { } } const relatedInformation = []; - if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) { + if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 32 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) { relatedInformation.push(createDiagnosticForNode2(node, Diagnostics.Did_you_mean_0, `export type { ${unescapeLeadingUnderscores(node.name.escapedText)} }`)); } const declarationName = getNameOfDeclaration(node) || node; @@ -44192,7 +44403,7 @@ function createBinder() { return symbol; } function declareModuleMember(node, symbolFlags, symbolExcludes) { - const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); + const hasExportModifier = !!(getCombinedModifierFlags(node) & 32 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); @@ -44211,7 +44422,7 @@ function createBinder() { if (isJSDocTypeAlias(node)) Debug.assert(isInJSFile(node)); if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) { - if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) { + if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 2048 /* Default */) && !getDeclarationName(node)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } const exportKind = symbolFlags & 111551 /* Value */ ? 1048576 /* ExportValue */ : 0; @@ -44252,7 +44463,7 @@ function createBinder() { return false; if (isPropertyAccessEntityNameExpression(declName.parent) && isTopLevelNamespaceAssignment(declName.parent)) return true; - if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 1 /* Export */) + if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 32 /* Export */) return true; return false; } @@ -44283,7 +44494,7 @@ function createBinder() { const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { @@ -44524,7 +44735,7 @@ function createBinder() { case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); + return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right) || (isBooleanLiteral(expr.right) && isNarrowingExpression(expr.left) || isBooleanLiteral(expr.left) && isNarrowingExpression(expr.right)); case 104 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); case 103 /* InKeyword */: @@ -44844,7 +45055,7 @@ function createBinder() { } function bindCaseBlock(node) { const clauses = node.clauses; - const isNarrowingSwitch = isNarrowingExpression(node.parent.expression); + const isNarrowingSwitch = node.parent.expression.kind === 112 /* TrueKeyword */ || isNarrowingExpression(node.parent.expression); let fallthroughFlow = unreachableFlow; for (let i = 0; i < clauses.length; i++) { const clauseStart = i; @@ -45330,7 +45541,7 @@ function createBinder() { function bindModuleDeclaration(node) { setExportContextFlag(node); if (isAmbientModule(node)) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { errorOnFirstToken(node, Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); } if (isModuleAugmentationExternal(node)) { @@ -45491,31 +45702,15 @@ function createBinder() { return; } if (inStrictMode && originalKeywordKind >= 119 /* FirstFutureReservedWord */ && originalKeywordKind <= 127 /* LastFutureReservedWord */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - getStrictModeIdentifierMessage(node), - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, getStrictModeIdentifierMessage(node), declarationNameToString(node))); } else if (originalKeywordKind === 135 /* AwaitKeyword */) { if (isExternalModule(file) && isInTopLevelContext(node)) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, declarationNameToString(node))); } else if (node.flags & 65536 /* AwaitContext */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node))); } } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 16384 /* YieldContext */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node))); } } } @@ -45531,11 +45726,7 @@ function createBinder() { function checkPrivateIdentifier(node) { if (node.escapedText === "#constructor") { if (!file.parseDiagnostics.length) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.constructor_is_a_reserved_word, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.constructor_is_a_reserved_word, declarationNameToString(node))); } } } @@ -45563,13 +45754,7 @@ function createBinder() { const identifier = name; if (isEvalOrArgumentsIdentifier(identifier)) { const span = getErrorSpanForNode(file, name); - file.bindDiagnostics.push(createFileDiagnostic( - file, - span.start, - span.length, - getStrictModeEvalOrArgumentsMessage(contextNode), - idText(identifier) - )); + file.bindDiagnostics.push(createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), idText(identifier))); } } } @@ -45600,12 +45785,7 @@ function createBinder() { if (languageVersion < 2 /* ES2015 */) { if (blockScopeContainer.kind !== 312 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); - file.bindDiagnostics.push(createFileDiagnostic( - file, - errorSpan.start, - errorSpan.length, - getStrictModeBlockScopeFunctionDeclarationMessage(node) - )); + file.bindDiagnostics.push(createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node))); } } } @@ -45836,11 +46016,7 @@ function createBinder() { return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); case 174 /* MethodDeclaration */: case 173 /* MethodSignature */: - return bindPropertyOrMethodOrAccessor( - node, - 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), - isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ - ); + return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */); case 262 /* FunctionDeclaration */: return bindFunctionDeclaration(node); case 176 /* Constructor */: @@ -46426,7 +46602,7 @@ function createBinder() { } if (!isBindingPattern(node.name)) { const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent; - if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { + if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 32 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 111551 /* BlockScopedVariableExcludes */); @@ -46578,7 +46754,7 @@ function isPurelyTypeDeclaration(s) { case 267 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; case 266 /* EnumDeclaration */: - return hasSyntacticModifier(s, 2048 /* Const */); + return hasSyntacticModifier(s, 4096 /* Const */); default: return false; } @@ -46903,20 +47079,17 @@ function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourc function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options = {}) { const info = getInfo(importingSourceFile.path, host); const modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options); - return firstDefined( - modulePaths, - (modulePath) => tryGetModuleNameAsNodeModule( - modulePath, - info, - importingSourceFile, - host, - compilerOptions, - preferences, - /*packageNameOnly*/ - true, - options.overrideImportMode - ) - ); + return firstDefined(modulePaths, (modulePath) => tryGetModuleNameAsNodeModule( + modulePath, + info, + importingSourceFile, + host, + compilerOptions, + preferences, + /*packageNameOnly*/ + true, + options.overrideImportMode + )); } function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, preferences, userPreferences, options = {}) { const info = getInfo(importingSourceFileName, host); @@ -46960,10 +47133,12 @@ function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSo importingSourceFile, host, userPreferences, - options + options, + /*forAutoImport*/ + false ).moduleSpecifiers; } -function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) { +function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) { let computedWithoutCache = false; const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker); if (ambient) @@ -46981,11 +47156,19 @@ function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions return { moduleSpecifiers: emptyArray, computedWithoutCache }; computedWithoutCache = true; modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host)); - const result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options); + const result = computeModuleSpecifiers( + modulePaths, + compilerOptions, + importingSourceFile, + host, + userPreferences, + options, + forAutoImport + ); cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result); return { moduleSpecifiers: result, computedWithoutCache }; } -function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) { +function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) { const info = getInfo(importingSourceFile.path, host); const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile); const existingSpecifier = forEach(modulePaths, (modulePath) => forEach( @@ -47042,7 +47225,7 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi redirectPathsSpecifiers = append(redirectPathsSpecifiers, local); } else if (pathIsBareSpecifier(local)) { pathsSpecifiers = append(pathsSpecifiers, local); - } else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) { + } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) { relativeSpecifiers = append(relativeSpecifiers, local); } } @@ -47225,32 +47408,29 @@ function tryGetModuleNameFromAmbientModule(moduleSymbol, checker) { if (decl) { return decl.name.text; } - const ambientModuleDeclareCandidates = mapDefined( - moduleSymbol.declarations, - (d) => { - var _a2, _b, _c, _d; - if (!isModuleDeclaration(d)) - return; - const topNamespace = getTopNamespace(d); - if (!(((_a2 = topNamespace == null ? void 0 : topNamespace.parent) == null ? void 0 : _a2.parent) && isModuleBlock(topNamespace.parent) && isAmbientModule(topNamespace.parent.parent) && isSourceFile(topNamespace.parent.parent.parent))) - return; - const exportAssignment = (_d = (_c = (_b = topNamespace.parent.parent.symbol.exports) == null ? void 0 : _b.get("export=")) == null ? void 0 : _c.valueDeclaration) == null ? void 0 : _d.expression; - if (!exportAssignment) - return; - const exportSymbol = checker.getSymbolAtLocation(exportAssignment); - if (!exportSymbol) - return; - const originalExportSymbol = (exportSymbol == null ? void 0 : exportSymbol.flags) & 2097152 /* Alias */ ? checker.getAliasedSymbol(exportSymbol) : exportSymbol; - if (originalExportSymbol === d.symbol) - return topNamespace.parent.parent; - function getTopNamespace(namespaceDeclaration) { - while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { - namespaceDeclaration = namespaceDeclaration.parent; - } - return namespaceDeclaration; + const ambientModuleDeclareCandidates = mapDefined(moduleSymbol.declarations, (d) => { + var _a2, _b, _c, _d; + if (!isModuleDeclaration(d)) + return; + const topNamespace = getTopNamespace(d); + if (!(((_a2 = topNamespace == null ? void 0 : topNamespace.parent) == null ? void 0 : _a2.parent) && isModuleBlock(topNamespace.parent) && isAmbientModule(topNamespace.parent.parent) && isSourceFile(topNamespace.parent.parent.parent))) + return; + const exportAssignment = (_d = (_c = (_b = topNamespace.parent.parent.symbol.exports) == null ? void 0 : _b.get("export=")) == null ? void 0 : _c.valueDeclaration) == null ? void 0 : _d.expression; + if (!exportAssignment) + return; + const exportSymbol = checker.getSymbolAtLocation(exportAssignment); + if (!exportSymbol) + return; + const originalExportSymbol = (exportSymbol == null ? void 0 : exportSymbol.flags) & 2097152 /* Alias */ ? checker.getAliasedSymbol(exportSymbol) : exportSymbol; + if (originalExportSymbol === d.symbol) + return topNamespace.parent.parent; + function getTopNamespace(namespaceDeclaration) { + while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { + namespaceDeclaration = namespaceDeclaration.parent; } + return namespaceDeclaration; } - ); + }); const ambientModuleDeclare = ambientModuleDeclareCandidates[0]; if (ambientModuleDeclare) { return ambientModuleDeclare.name.text; @@ -47341,12 +47521,12 @@ function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, /*currentDirectory*/ void 0 ); - const mode2 = endsWith(k, "/") ? 1 /* Directory */ : stringContains(k, "*") ? 2 /* Pattern */ : 0 /* Exact */; + const mode2 = endsWith(k, "/") ? 1 /* Directory */ : k.includes("*") ? 2 /* Pattern */ : 0 /* Exact */; return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode2); }); } else { for (const key of getOwnKeys(exports)) { - if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { + if (key === "default" || conditions.includes(key) || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = exports[key]; const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode); if (result) { @@ -47436,7 +47616,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileNa if (getResolvePackageJsonExports(options)) { const nodeModulesDirectoryName2 = packageRootPath.substring(parts.topLevelPackageNameIndex + 1); const packageName2 = getPackageNameFromTypesPackageName(nodeModulesDirectoryName2); - const conditions = getConditions(options, importMode === 99 /* ESNext */); + const conditions = getConditions(options, importMode); const fromExports = packageJsonContent.exports ? tryGetModuleNameFromExports(options, path, packageRootPath, packageName2, packageJsonContent.exports, conditions) : void 0; if (fromExports) { const withJsExtension = !hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) }; @@ -47512,7 +47692,7 @@ function processEnding(fileName, allowedEndings, options, host) { return fileName; } else if (fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".d.cts" /* Dcts */, ".cts" /* Cts */])) { return noExtension + getJSExtensionForFile(fileName, options); - } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && stringContains(fileName, ".d.")) { + } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && fileName.includes(".d.")) { return tryGetRealFileNameForNonJsDeclarationFileName(fileName); } switch (allowedEndings[0]) { @@ -47538,7 +47718,7 @@ function processEnding(fileName, allowedEndings, options, host) { } function tryGetRealFileNameForNonJsDeclarationFileName(fileName) { const baseName = getBaseFileName(fileName); - if (!endsWith(fileName, ".ts" /* Ts */) || !stringContains(baseName, ".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */])) + if (!endsWith(fileName, ".ts" /* Ts */) || !baseName.includes(".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */])) return void 0; const noExtension = removeExtension(fileName, ".ts" /* Ts */); const ext = noExtension.substring(noExtension.lastIndexOf(".")); @@ -47689,9 +47869,8 @@ var CheckMode = /* @__PURE__ */ ((CheckMode3) => { CheckMode3[CheckMode3["SkipContextSensitive"] = 4] = "SkipContextSensitive"; CheckMode3[CheckMode3["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; - CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; - CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; - CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; + CheckMode3[CheckMode3["RestBindingElement"] = 32] = "RestBindingElement"; + CheckMode3[CheckMode3["TypeOnly"] = 64] = "TypeOnly"; return CheckMode3; })(CheckMode || {}); var SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { @@ -47745,7 +47924,7 @@ function createTypeChecker(host) { var externalHelpersModule; var Symbol47 = objectAllocator.getSymbolConstructor(); var Type27 = objectAllocator.getTypeConstructor(); - var Signature15 = objectAllocator.getSignatureConstructor(); + var Signature14 = objectAllocator.getSignatureConstructor(); var typeCount = 0; var symbolCount = 0; var totalInstantiationCount = 0; @@ -47971,24 +48150,7 @@ function createTypeChecker(host) { getTypeOfPropertyOfContextualType, getFullyQualifiedName, getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */), - getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) => { - if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) { - return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ - )); - } - return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ - )); - }, + getCandidateSignaturesForStringLiteralCompletions, getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)), getExpandedParameters, hasEffectiveRestParameter, @@ -48187,22 +48349,59 @@ function createTypeChecker(host) { isTypeParameterPossiblyReferenced, typeHasCallOrConstructSignatures }; + function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) { + const candidatesSet = /* @__PURE__ */ new Set(); + const candidates = []; + runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( + call, + candidates, + /*argumentCount*/ + void 0, + 0 /* Normal */ + )); + for (const candidate of candidates) { + candidatesSet.add(candidate); + } + candidates.length = 0; + runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( + call, + candidates, + /*argumentCount*/ + void 0, + 0 /* Normal */ + )); + for (const candidate of candidates) { + candidatesSet.add(candidate); + } + return arrayFrom(candidatesSet); + } function runWithoutResolvedSignatureCaching(node, fn) { - const cachedSignatures = []; - while (node) { - if (isCallLikeExpression(node)) { + node = findAncestor(node, isCallLikeOrFunctionLikeExpression); + if (node) { + const cachedResolvedSignatures = []; + const cachedTypes2 = []; + while (node) { const nodeLinks2 = getNodeLinks(node); - const resolvedSignature = nodeLinks2.resolvedSignature; - cachedSignatures.push([nodeLinks2, resolvedSignature]); + cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]); nodeLinks2.resolvedSignature = void 0; + if (isFunctionExpressionOrArrowFunction(node)) { + const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node)); + const type = symbolLinks2.type; + cachedTypes2.push([symbolLinks2, type]); + symbolLinks2.type = void 0; + } + node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression); } - node = node.parent; - } - const result = fn(); - for (const [nodeLinks2, resolvedSignature] of cachedSignatures) { - nodeLinks2.resolvedSignature = resolvedSignature; + const result = fn(); + for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) { + nodeLinks2.resolvedSignature = resolvedSignature; + } + for (const [symbolLinks2, type] of cachedTypes2) { + symbolLinks2.type = type; + } + return result; } - return result; + return fn(); } function runWithInferenceBlockedFromSourceNode(node, fn) { const containingCall = findAncestor(node, isCallLikeExpression); @@ -48254,28 +48453,72 @@ function createTypeChecker(host) { var resolvingSymbol = createSymbol(0, "__resolving__" /* Resolving */); var unresolvedSymbols = /* @__PURE__ */ new Map(); var errorTypes = /* @__PURE__ */ new Map(); + var seenIntrinsicNames = /* @__PURE__ */ new Set(); var anyType = createIntrinsicType(1 /* Any */, "any"); - var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */); - var wildcardType = createIntrinsicType(1 /* Any */, "any"); + var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */, "auto"); + var wildcardType = createIntrinsicType( + 1 /* Any */, + "any", + /*objectFlags*/ + void 0, + "wildcard" + ); + var blockedStringType = createIntrinsicType( + 1 /* Any */, + "any", + /*objectFlags*/ + void 0, + "blocked string" + ); var errorType = createIntrinsicType(1 /* Any */, "error"); var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved"); - var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */); + var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable"); var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic"); var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); - var nonNullUnknownType = createIntrinsicType(2 /* Unknown */, "unknown"); + var nonNullUnknownType = createIntrinsicType( + 2 /* Unknown */, + "unknown", + /*objectFlags*/ + void 0, + "non-null" + ); var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */); - var missingType = createIntrinsicType(32768 /* Undefined */, "undefined"); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening"); + var missingType = createIntrinsicType( + 32768 /* Undefined */, + "undefined", + /*objectFlags*/ + void 0, + "missing" + ); var undefinedOrMissingType = exactOptionalPropertyTypes ? missingType : undefinedType; - var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined"); + var optionalType = createIntrinsicType( + 32768 /* Undefined */, + "undefined", + /*objectFlags*/ + void 0, + "optional" + ); var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */, "widening"); var stringType = createIntrinsicType(4 /* String */, "string"); var numberType = createIntrinsicType(8 /* Number */, "number"); var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); - var falseType = createIntrinsicType(512 /* BooleanLiteral */, "false"); + var falseType = createIntrinsicType( + 512 /* BooleanLiteral */, + "false", + /*objectFlags*/ + void 0, + "fresh" + ); var regularFalseType = createIntrinsicType(512 /* BooleanLiteral */, "false"); - var trueType = createIntrinsicType(512 /* BooleanLiteral */, "true"); + var trueType = createIntrinsicType( + 512 /* BooleanLiteral */, + "true", + /*objectFlags*/ + void 0, + "fresh" + ); var regularTrueType = createIntrinsicType(512 /* BooleanLiteral */, "true"); trueType.regularType = regularTrueType; trueType.freshType = trueType; @@ -48289,9 +48532,21 @@ function createTypeChecker(host) { var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, "symbol"); var voidType = createIntrinsicType(16384 /* Void */, "void"); var neverType = createIntrinsicType(131072 /* Never */, "never"); - var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */); - var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); - var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never"); + var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */, "silent"); + var implicitNeverType = createIntrinsicType( + 131072 /* Never */, + "never", + /*objectFlags*/ + void 0, + "implicit" + ); + var unreachableNeverType = createIntrinsicType( + 131072 /* Never */, + "never", + /*objectFlags*/ + void 0, + "unreachable" + ); var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); var stringOrNumberType = getUnionType([stringType, numberType]); var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]); @@ -48301,7 +48556,13 @@ function createTypeChecker(host) { var numericStringType = getTemplateLiteralType(["", ""], [numberType]); var restrictiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t, () => "(restrictive mapper)"); var permissiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? wildcardType : t, () => "(permissive mapper)"); - var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never"); + var uniqueLiteralType = createIntrinsicType( + 131072 /* Never */, + "never", + /*objectFlags*/ + void 0, + "unique literal" + ); var uniqueLiteralMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t, () => "(unique literal mapper)"); var outofbandVarianceMarkerHandler; var reportUnreliableMapper = makeFunctionTypeMapper((t) => { @@ -49098,6 +49359,9 @@ function createTypeChecker(host) { const sourceFiles = host.getSourceFiles(); return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } + if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { + return true; + } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { if (declaration.kind === 208 /* BindingElement */) { const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); @@ -49127,9 +49391,6 @@ function createTypeChecker(host) { if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) { return true; } - if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { - return true; - } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { return !isPropertyImmediatelyReferencedWithinDeclaration( @@ -49644,7 +49905,7 @@ function createTypeChecker(host) { if (lastLocation && lastLocation === location.name) { return false; } - if (location.asteriskToken || hasSyntacticModifier(location, 512 /* Async */)) { + if (location.asteriskToken || hasSyntacticModifier(location, 1024 /* Async */)) { return true; } return !getImmediatelyInvokedFunctionExpression(location); @@ -49808,8 +50069,17 @@ function createTypeChecker(host) { function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { if (meaning & 111551 /* Value */) { if (isPrimitiveTypeName(name)) { - if (isExtendedByInterface(errorLocation)) { - error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); + const grandparent = errorLocation.parent.parent; + if (grandparent && grandparent.parent && isHeritageClause(grandparent)) { + const heritageKind = grandparent.token; + const containerKind = grandparent.parent.kind; + if (containerKind === 264 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) { + error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name)); + } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) { + error2(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name)); + } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 119 /* ImplementsKeyword */) { + error2(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name)); + } } else { error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); } @@ -49841,16 +50111,6 @@ function createTypeChecker(host) { } return false; } - function isExtendedByInterface(node) { - const grandparent = node.parent.parent; - const parentOfGrandparent = grandparent.parent; - if (grandparent && parentOfGrandparent) { - const isExtending = isHeritageClause(grandparent) && grandparent.token === 96 /* ExtendsKeyword */; - const isInterface = isInterfaceDeclaration(parentOfGrandparent); - return isExtending && isInterface; - } - return false; - } function maybeMappedType(node, symbol) { const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || "quit"); if (container && container.members.length === 1) { @@ -49938,15 +50198,12 @@ function createTypeChecker(host) { diagnosticMessage = error2(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { - addRelatedInfo( - diagnosticMessage, - createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName) - ); + addRelatedInfo(diagnosticMessage, createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName)); } } } function isSameScopeDescendentOf(initial, parent2, stopAt) { - return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || isAsyncFunction(n)) ? "quit" : false)); + return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || getFunctionFlags(n) & 3 /* AsyncGenerator */) ? "quit" : false)); } function getAnyImportSyntax(node) { switch (node.kind) { @@ -50032,7 +50289,7 @@ function createTypeChecker(host) { return resolved; } function isSyntacticDefault(node) { - return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node); + return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node); } function getUsageModeForExpression(usage) { return isStringLiteralLike(usage) ? getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0; @@ -50117,11 +50374,14 @@ function createTypeChecker(host) { const exportAssignment = exportEqualsSymbol.valueDeclaration; const err = error2(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); if (exportAssignment) { - addRelatedInfo(err, createDiagnosticForNode( - exportAssignment, - Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, - compilerOptionName - )); + addRelatedInfo( + err, + createDiagnosticForNode( + exportAssignment, + Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, + compilerOptionName + ) + ); } } else if (isImportClause(node)) { reportNonDefaultExport(moduleSymbol, node); @@ -50178,10 +50438,12 @@ function createTypeChecker(host) { const diagnostic = error2(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); const exportStar = (_b = moduleSymbol.exports) == null ? void 0 : _b.get("__export" /* ExportStar */); if (exportStar) { - const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find((decl) => { - var _a2, _b2; - return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a2 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a2.exports) == null ? void 0 : _b2.has("default" /* Default */))); - }); + const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find( + (decl) => { + var _a2, _b2; + return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a2 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a2.exports) == null ? void 0 : _b2.has("default" /* Default */))); + } + ); if (defaultExport) { addRelatedInfo(diagnostic, createDiagnosticForNode(defaultExport, Diagnostics.export_Asterisk_does_not_re_export_a_default)); } @@ -50328,10 +50590,7 @@ function createTypeChecker(host) { const suggestionName = symbolToString(suggestion); const diagnostic = error2(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); if (suggestion.valueDeclaration) { - addRelatedInfo( - diagnostic, - createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName) - ); + addRelatedInfo(diagnostic, createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)); } } else { if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has("default" /* Default */)) { @@ -50358,10 +50617,7 @@ function createTypeChecker(host) { const exportedSymbol = exports ? find(symbolsToArray(exports), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0; const diagnostic = exportedSymbol ? error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); if (localSymbol.declarations) { - addRelatedInfo( - diagnostic, - ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)) - ); + addRelatedInfo(diagnostic, ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName))); } } } else { @@ -50944,7 +51200,7 @@ function createTypeChecker(host) { const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = findAncestor(location, isImportCall)) == null ? void 0 : _a.arguments[0]) || ((_b = findAncestor(location, isImportDeclaration)) == null ? void 0 : _b.moduleSpecifier) || ((_c = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _c.moduleReference.expression) || ((_d = findAncestor(location, isExportDeclaration)) == null ? void 0 : _d.moduleSpecifier) || ((_e = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _e.name) || ((_f = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _f.argument.literal); const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat; const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); - const resolvedModule = getResolvedModule(currentSourceFile, moduleReference, mode); + const resolvedModule = (_g = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _g.resolvedModule; const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile); const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { @@ -50952,7 +51208,7 @@ function createTypeChecker(host) { error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) { - const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { error2( errorNode, @@ -50961,7 +51217,7 @@ function createTypeChecker(host) { ); } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + const importOrExport = ((_i = findAncestor(location, isImportDeclaration)) == null ? void 0 : _i.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); @@ -50981,9 +51237,8 @@ function createTypeChecker(host) { } if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) { const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); - const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); - const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_i = overrideClauseHost.assertions) == null ? void 0 : _i.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; - if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) { + const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); + if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) { if (findAncestor(location, isImportEqualsDeclaration)) { error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); } else { @@ -51026,11 +51281,15 @@ function createTypeChecker(host) { } } } - diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorNode), errorNode, chainDiagnosticMessages( - diagnosticDetails, - Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead, - moduleReference - ))); + diagnostics.add(createDiagnosticForNodeFromMessageChain( + getSourceFileOfNode(errorNode), + errorNode, + chainDiagnosticMessages( + diagnosticDetails, + Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead, + moduleReference + ) + )); } } } @@ -51087,13 +51346,9 @@ function createTypeChecker(host) { const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1]; if (suggestedExt) { - error2( - errorNode, - Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, - moduleReference + suggestedExt - ); + error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt); } else { - error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); + error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); } } else { error2(errorNode, moduleNotFoundError, moduleReference); @@ -51116,12 +51371,16 @@ function createTypeChecker(host) { if (!isExternalModuleNameRelative(moduleReference) && packageId) { errorInfo = createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageId.name); } - errorOrSuggestion(isError, errorNode, chainDiagnosticMessages( - errorInfo, - Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, - moduleReference, - resolvedFileName - )); + errorOrSuggestion( + isError, + errorNode, + chainDiagnosticMessages( + errorInfo, + Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, + moduleReference, + resolvedFileName + ) + ); } function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) { if (moduleSymbol == null ? void 0 : moduleSymbol.exports) { @@ -51358,10 +51617,12 @@ function createTypeChecker(host) { } if (exportStar == null ? void 0 : exportStar.isTypeOnly) { typeOnlyExportStarMap ?? (typeOnlyExportStarMap = /* @__PURE__ */ new Map()); - symbols.forEach((_, escapedName) => typeOnlyExportStarMap.set( - escapedName, - exportStar - )); + symbols.forEach( + (_, escapedName) => typeOnlyExportStarMap.set( + escapedName, + exportStar + ) + ); } return symbols; } @@ -51543,12 +51804,21 @@ function createTypeChecker(host) { function createOriginType(flags) { return new Type27(checker, flags); } - function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) { + function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) { + checkIntrinsicName(intrinsicName, debugIntrinsicName); const type = createType(kind); type.intrinsicName = intrinsicName; + type.debugIntrinsicName = debugIntrinsicName; type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */; return type; } + function checkIntrinsicName(name, debug) { + const key = `${name},${debug ?? ""}`; + if (seenIntrinsicNames.has(key)) { + Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : ""}; you may need to pass a name to createIntrinsicType.`); + } + seenIntrinsicNames.add(key); + } function createObjectType(objectFlags, symbol) { const type = createTypeWithSymbol(524288 /* Object */, symbol); type.objectFlags = objectFlags; @@ -51597,13 +51867,7 @@ function createTypeChecker(host) { return resolved; } function createAnonymousType(symbol, members, callSignatures, constructSignatures, indexInfos) { - return setStructuredTypeMembers( - createObjectType(16 /* Anonymous */, symbol), - members, - callSignatures, - constructSignatures, - indexInfos - ); + return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, indexInfos); } function getResolvedTypeWithoutAbstractConstructSignatures(type) { if (type.constructSignatures.length === 0) @@ -51951,20 +52215,20 @@ function createTypeChecker(host) { var _a, _b; if (!isDeclarationVisible(declaration)) { const anyImportSyntax = getAnyImportSyntax(declaration); - if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 1 /* Export */) && // import clause without export + if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 32 /* Export */) && // import clause without export isDeclarationVisible(anyImportSyntax.parent)) { return addVisibleAlias(declaration, anyImportSyntax); - } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 1 /* Export */) && // unexported variable statement + } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 32 /* Export */) && // unexported variable statement isDeclarationVisible(declaration.parent.parent.parent)) { return addVisibleAlias(declaration, declaration.parent.parent); - } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 1 /* Export */) && isDeclarationVisible(declaration.parent)) { + } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 32 /* Export */) && isDeclarationVisible(declaration.parent)) { return addVisibleAlias(declaration, declaration); } else if (isBindingElement(declaration)) { - if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 1 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) { + if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 32 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) { return addVisibleAlias(declaration, declaration.parent.parent.parent.parent); } else if (symbol.flags & 2 /* BlockScopedVariable */) { const variableStatement = findAncestor(declaration, isVariableStatement); - if (hasSyntacticModifier(variableStatement, 1 /* Export */)) { + if (hasSyntacticModifier(variableStatement, 32 /* Export */)) { return true; } if (!isDeclarationVisible(variableStatement.parent)) { @@ -52187,7 +52451,8 @@ function createTypeChecker(host) { visitedTypes: void 0, symbolDepth: void 0, inferTypeParameters: void 0, - approximateLength: 0 + approximateLength: 0, + trackedSymbols: void 0 }; context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost); const resultingNode = cb(context); @@ -52641,7 +52906,7 @@ function createTypeChecker(host) { } } function visitAndTransformType(type2, transform2) { - var _a2, _b2; + var _a2, _b2, _c; const typeId = type2.id; const isConstructorObject = getObjectFlags(type2) & 16 /* Anonymous */ && type2.symbol && type2.symbol.flags & 32 /* Class */; const id = getObjectFlags(type2) & 4 /* Reference */ && type2.node ? "N" + getNodeId(type2.node) : type2.flags & 16777216 /* Conditional */ ? "N" + getNodeId(type2.root.node) : type2.symbol ? (isConstructorObject ? "+" : "") + getSymbolId(type2.symbol) : void 0; @@ -52658,6 +52923,13 @@ function createTypeChecker(host) { } const cachedResult = (_a2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a2.get(key); if (cachedResult) { + (_b2 = cachedResult.trackedSymbols) == null ? void 0 : _b2.forEach( + ([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol( + symbol, + enclosingDeclaration, + meaning + ) + ); if (cachedResult.truncating) { context.truncating = true; } @@ -52673,16 +52945,24 @@ function createTypeChecker(host) { context.symbolDepth.set(id, depth + 1); } context.visitedTypes.add(typeId); + const prevTrackedSymbols = context.trackedSymbols; + context.trackedSymbols = void 0; const startLength = context.approximateLength; const result = transform2(type2); const addedLength = context.approximateLength - startLength; if (!context.reportedDiagnostic && !context.encounteredError) { - (_b2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _b2.set(key, { node: result, truncating: context.truncating, addedLength }); + (_c = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _c.set(key, { + node: result, + truncating: context.truncating, + addedLength, + trackedSymbols: context.trackedSymbols + }); } context.visitedTypes.delete(typeId); if (id) { context.symbolDepth.set(id, depth); } + context.trackedSymbols = prevTrackedSymbols; return result; function deepCloneOrReuseNode(node) { if (!nodeIsSynthesized(node) && getParseTreeNode(node) === node) { @@ -52833,11 +53113,7 @@ function createTypeChecker(host) { } } else { if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) { - qualifier = factory.updateQualifiedName( - qualifier, - qualifier.left, - setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments) - ); + qualifier = factory.updateQualifiedName(qualifier, qualifier.left, setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments)); } } } @@ -52849,7 +53125,7 @@ function createTypeChecker(host) { return factory.updateImportTypeNode( root, root.argument, - root.assertions, + root.attributes, qualifier, typeArguments, root.isTypeOf @@ -52863,11 +53139,7 @@ function createTypeChecker(host) { } } else { if (typeArguments !== getIdentifierTypeArguments(typeName.right)) { - typeName = factory.updateQualifiedName( - typeName, - typeName.left, - setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments) - ); + typeName = factory.updateQualifiedName(typeName, typeName.left, setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments)); } } typeArguments = ref.typeArguments; @@ -52927,7 +53199,7 @@ function createTypeChecker(host) { if (propertySymbol.flags & 4194304 /* Prototype */) { continue; } - if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (8 /* Private */ | 16 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) { + if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (2 /* Private */ | 4 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) { context.tracker.reportPrivateInBaseOfClassExpression(unescapeLeadingUnderscores(propertySymbol.escapedName)); } } @@ -52991,6 +53263,28 @@ function createTypeChecker(host) { const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); context.enclosingDeclaration = saveEnclosingDeclaration; context.approximateLength += symbolName(propertySymbol).length + 1; + if (propertySymbol.flags & 98304 /* Accessor */) { + const writeType = getWriteTypeOfSymbol(propertySymbol); + if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) { + const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */); + const getterSignature = getSignatureFromDeclaration(getterDeclaration); + typeElements.push( + setCommentRange( + signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }), + getterDeclaration + ) + ); + const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */); + const setterSignature = getSignatureFromDeclaration(setterDeclaration); + typeElements.push( + setCommentRange( + signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }), + setterDeclaration + ) + ); + return; + } + } const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); @@ -53028,9 +53322,9 @@ function createTypeChecker(host) { typeElements.push(preserveCommentsOn(propertySignature)); function preserveCommentsOn(node) { var _a2; - if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) { - const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */); - const commentText = getTextOfJSDocComment(d.comment); + const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 355 /* JSDocPropertyTag */); + if (jsdocPropertyTag) { + const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); } @@ -53208,7 +53502,7 @@ function createTypeChecker(host) { let modifiers = options == null ? void 0 : options.modifiers; if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); - modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); + modifiers = factory.createModifiersFromModifierFlags(flags | 64 /* Abstract */); } const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, @@ -53322,11 +53616,17 @@ function createTypeChecker(host) { const constraintNode = constraint && typeToTypeNodeHelper(constraint, context); return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } - function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); - if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); + function getEffectiveParameterDeclaration(parameterSymbol) { + const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); + if (parameterDeclaration) { + return parameterDeclaration; } + if (!isTransientSymbol(parameterSymbol)) { + return getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); + } + } + function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { + const parameterDeclaration = getEffectiveParameterDeclaration(parameterSymbol); let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { parameterType = getOptionalType(parameterType); @@ -53335,7 +53635,7 @@ function createTypeChecker(host) { const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -53349,6 +53649,9 @@ function createTypeChecker(host) { ); context.approximateLength += symbolName(parameterSymbol).length + 3; return parameterNode; + } + function parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context) { + return parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); function cloneBindingName(node) { return elideInitializerAndSetEmitFlags(node); function elideInitializerAndSetEmitFlags(node2) { @@ -53424,7 +53727,9 @@ function createTypeChecker(host) { if (!accessibleSymbolChain || needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning2 : getQualifiedLeftMeaning(meaning2))) { const parents = getContainersOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol2, context.enclosingDeclaration, meaning2); if (length(parents)) { - parentSpecifiers = parents.map((symbol3) => some(symbol3.declarations, hasNonGlobalAugmentationExternalModuleSymbol) ? getSpecifierForModuleSymbol(symbol3, context) : void 0); + parentSpecifiers = parents.map( + (symbol3) => some(symbol3.declarations, hasNonGlobalAugmentationExternalModuleSymbol) ? getSpecifierForModuleSymbol(symbol3, context) : void 0 + ); const indices = parents.map((_, i) => i); indices.sort(sortByBestName); const sortedParents = indices.map((i) => parents[i]); @@ -53575,7 +53880,6 @@ function createTypeChecker(host) { return symbol.parent ? factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier; } function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) { - var _a, _b, _c, _d; const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */)); const isTypeOf = meaning === 111551 /* Value */; if (some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { @@ -53584,40 +53888,42 @@ function createTypeChecker(host) { const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration)); const targetFile = getSourceFileOfModule(chain[0]); let specifier; - let assertion; + let attributes; if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) { if ((targetFile == null ? void 0 : targetFile.impliedNodeFormat) === 99 /* ESNext */ && targetFile.impliedNodeFormat !== (contextFile == null ? void 0 : contextFile.impliedNodeFormat)) { specifier = getSpecifierForModuleSymbol(chain[0], context, 99 /* ESNext */); - assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([ - factory.createAssertEntry( - factory.createStringLiteral("resolution-mode"), - factory.createStringLiteral("import") - ) - ]))); - (_b = (_a = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _b.call(_a); + attributes = factory.createImportAttributes( + factory.createNodeArray([ + factory.createImportAttribute( + factory.createStringLiteral("resolution-mode"), + factory.createStringLiteral("import") + ) + ]) + ); } } if (!specifier) { specifier = getSpecifierForModuleSymbol(chain[0], context); } - if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.indexOf("/node_modules/") >= 0) { + if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.includes("/node_modules/")) { const oldSpecifier = specifier; if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) { const swappedMode = (contextFile == null ? void 0 : contextFile.impliedNodeFormat) === 99 /* ESNext */ ? 1 /* CommonJS */ : 99 /* ESNext */; specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode); - if (specifier.indexOf("/node_modules/") >= 0) { + if (specifier.includes("/node_modules/")) { specifier = oldSpecifier; } else { - assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([ - factory.createAssertEntry( - factory.createStringLiteral("resolution-mode"), - factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require") - ) - ]))); - (_d = (_c = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _d.call(_c); + attributes = factory.createImportAttributes( + factory.createNodeArray([ + factory.createImportAttribute( + factory.createStringLiteral("resolution-mode"), + factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require") + ) + ]) + ); } } - if (!assertion) { + if (!attributes) { context.encounteredError = true; if (context.tracker.reportLikelyUnsafeImportRequiredError) { context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier); @@ -53637,11 +53943,11 @@ function createTypeChecker(host) { void 0 ); } - return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf); + return factory.createImportTypeNode(lit, attributes, nonRootParts, typeParameterNodes, isTypeOf); } else { const splitNode = getTopmostIndexedAccessType(nonRootParts); const qualifier = splitNode.objectType.typeName; - return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, assertion, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType); + return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType); } } const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0); @@ -53841,7 +54147,18 @@ function createTypeChecker(host) { } function isStringNamed(d) { const name = getNameOfDeclaration(d); - return !!name && isStringLiteral(name); + if (!name) { + return false; + } + if (isComputedPropertyName(name)) { + const type = checkExpression(name.expression); + return !!(type.flags & 402653316 /* StringLike */); + } + if (isElementAccessExpression(name)) { + const type = checkExpression(name.argumentExpression); + return !!(type.flags & 402653316 /* StringLike */); + } + return isStringLiteral(name); } function isSingleQuotedStringNamed(d) { const name = getNameOfDeclaration(d); @@ -53854,14 +54171,15 @@ function createTypeChecker(host) { function getPropertyNameNodeForSymbol(symbol, context) { const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); - const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed); + const isMethod = !!(symbol.flags & 8192 /* Method */); + const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod); if (fromNameType) { return fromNameType; } const rawName = unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod); } - function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed) { + function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod) { const nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { @@ -53872,7 +54190,7 @@ function createTypeChecker(host) { if (isNumericLiteralName(name) && startsWith(name, "-")) { return factory.createComputedPropertyName(factory.createNumericLiteral(+name)); } - return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions)); + return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod); } if (nameType.flags & 8192 /* UniqueESSymbol */) { return factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, 111551 /* Value */)); @@ -54105,7 +54423,7 @@ function createTypeChecker(host) { return factory.updateImportTypeNode( node, factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), - node.assertions, + node.attributes, node.qualifier, visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode), node.isTypeOf @@ -54161,6 +54479,7 @@ function createTypeChecker(host) { } } function symbolTableToDeclarationStatements(symbolTable, context, bundled) { + var _a; const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, 174 /* MethodDeclaration */, @@ -54182,12 +54501,15 @@ function createTypeChecker(host) { ...oldcontext, usedSymbolNames: new Set(oldcontext.usedSymbolNames), remappedSymbolNames: /* @__PURE__ */ new Map(), + remappedSymbolReferences: new Map((_a = oldcontext.remappedSymbolReferences) == null ? void 0 : _a.entries()), tracker: void 0 }; const tracker = { ...oldcontext.tracker.inner, trackSymbol: (sym, decl, meaning) => { - var _a; + var _a2, _b; + if ((_a2 = context.remappedSymbolNames) == null ? void 0 : _a2.has(getSymbolId(sym))) + return false; const accessibleResult = isSymbolAccessible( sym, decl, @@ -54198,9 +54520,13 @@ function createTypeChecker(host) { if (accessibleResult.accessibility === 0 /* Accessible */) { const chain = lookupSymbolChainWorker(sym, context, meaning); if (!(sym.flags & 4 /* Property */)) { - includePrivateSymbol(chain[0]); + const root = chain[0]; + const contextFile = getSourceFileOfNode(oldcontext.enclosingDeclaration); + if (some(root.declarations, (d) => getSourceFileOfNode(d) === contextFile)) { + includePrivateSymbol(root); + } } - } else if ((_a = oldcontext.tracker.inner) == null ? void 0 : _a.trackSymbol) { + } else if ((_b = oldcontext.tracker.inner) == null ? void 0 : _b.trackSymbol) { return oldcontext.tracker.inner.trackSymbol(sym, decl, meaning); } return false; @@ -54233,7 +54559,7 @@ function createTypeChecker(host) { const nsIndex = findIndex(statements, isModuleDeclaration); let ns = nsIndex !== -1 ? statements[nsIndex] : void 0; if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier(exportAssignment.expression) && isIdentifier(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) { - const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 1 /* Export */)); + const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 32 /* Export */)); const name = ns.name; let body = ns.body; if (length(excessExports)) { @@ -54243,30 +54569,33 @@ function createTypeChecker(host) { ns.name, body = factory.updateModuleBlock( body, - factory.createNodeArray([...ns.body.statements, factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier( + factory.createNodeArray([ + ...ns.body.statements, + factory.createExportDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - /*propertyName*/ - void 0, - id - ))), - /*moduleSpecifier*/ - void 0 - )]) + factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier( + /*isTypeOnly*/ + false, + /*propertyName*/ + void 0, + id + ))), + /*moduleSpecifier*/ + void 0 + ) + ]) ) ); statements = [...statements.slice(0, nsIndex), ns, ...statements.slice(nsIndex + 1)]; } if (!find(statements, (s) => s !== ns && nodeHasName(s, name))) { results = []; - const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 1 /* Export */) || isExportAssignment(s) || isExportDeclaration(s)); + const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 32 /* Export */) || isExportAssignment(s) || isExportDeclaration(s)); forEach(body.statements, (s) => { - addResult(s, mixinExportFlag ? 1 /* Export */ : 0 /* None */); + addResult(s, mixinExportFlag ? 32 /* Export */ : 0 /* None */); }); statements = [...filter(statements, (s) => s !== ns && s !== exportAssignment), ...results]; } @@ -54277,15 +54606,18 @@ function createTypeChecker(host) { const exports = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); if (length(exports) > 1) { const nonExports = filter(statements, (d) => !isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause); - statements = [...nonExports, factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(flatMap(exports, (e) => cast(e.exportClause, isNamedExports).elements)), - /*moduleSpecifier*/ - void 0 - )]; + statements = [ + ...nonExports, + factory.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createNamedExports(flatMap(exports, (e) => cast(e.exportClause, isNamedExports).elements)), + /*moduleSpecifier*/ + void 0 + ) + ]; } const reexports = filter(statements, (d) => isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); if (length(reexports) > 1) { @@ -54294,7 +54626,7 @@ function createTypeChecker(host) { for (const group2 of groups) { if (group2.length > 1) { statements = [ - ...filter(statements, (s) => group2.indexOf(s) === -1), + ...filter(statements, (s) => !group2.includes(s)), factory.createExportDeclaration( /*modifiers*/ void 0, @@ -54311,7 +54643,7 @@ function createTypeChecker(host) { return statements; } function inlineExportModifiers(statements) { - const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.assertClause && !!d.exportClause && isNamedExports(d.exportClause)); + const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports(d.exportClause)); if (index >= 0) { const exportDecl = statements[index]; const replacements = mapDefined(exportDecl.exportClause.elements, (e) => { @@ -54339,7 +54671,7 @@ function createTypeChecker(host) { replacements ), exportDecl.moduleSpecifier, - exportDecl.assertClause + exportDecl.attributes ); } } @@ -54355,12 +54687,12 @@ function createTypeChecker(host) { return statements; } function addExportModifier(node) { - const flags = (getEffectiveModifierFlags(node) | 1 /* Export */) & ~2 /* Ambient */; - return factory.updateModifiers(node, flags); + const flags = (getEffectiveModifierFlags(node) | 32 /* Export */) & ~128 /* Ambient */; + return factory.replaceModifiers(node, flags); } function removeExportModifier(node) { - const flags = getEffectiveModifierFlags(node) & ~1 /* Export */; - return factory.updateModifiers(node, flags); + const flags = getEffectiveModifierFlags(node) & ~32 /* Export */; + return factory.replaceModifiers(node, flags); } function visitSymbolTable(symbolTable2, suppressNewPrivateContext, propertyAsAlias) { if (!suppressNewPrivateContext) { @@ -54400,13 +54732,19 @@ function createTypeChecker(host) { if (context.reportedDiagnostic) { oldcontext.reportedDiagnostic = context.reportedDiagnostic; } + if (context.trackedSymbols) { + if (!oldContext.trackedSymbols) + oldContext.trackedSymbols = context.trackedSymbols; + else + Debug.assert(context.trackedSymbols === oldContext.trackedSymbols); + } context = oldContext; } } - function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias) { - var _a, _b, _c, _d; - const symbolName2 = unescapeLeadingUnderscores(symbol.escapedName); - const isDefault = symbol.escapedName === "default" /* Default */; + function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias, escapedSymbolName = symbol.escapedName) { + var _a2, _b, _c, _d, _e, _f; + const symbolName2 = unescapeLeadingUnderscores(escapedSymbolName); + const isDefault = escapedSymbolName === "default" /* Default */; if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && isStringANonContextualKeyword(symbolName2) && !isDefault) { context.encounteredError = true; return; @@ -54416,8 +54754,8 @@ function createTypeChecker(host) { if (needsPostExportDefault || needsExportDeclaration) { isPrivate = true; } - const modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 1024 /* Default */ : 0); - const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */; + const modifierFlags = (!isPrivate ? 32 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 2048 /* Default */ : 0); + const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && escapedSymbolName !== "export=" /* ExportEquals */; const isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags); @@ -54425,7 +54763,7 @@ function createTypeChecker(host) { if (symbol.flags & 524288 /* TypeAlias */) { serializeTypeAlias(symbol, symbolName2, modifierFlags); } - if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) { + if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && escapedSymbolName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) { if (propertyAsAlias) { const createdExport = serializeMaybeAliasAssignment(symbol); if (createdExport) { @@ -54435,17 +54773,24 @@ function createTypeChecker(host) { } else { const type = getTypeOfSymbol(symbol); const localName = getInternalSymbolName(symbol, symbolName2); - if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { + if (type.symbol && type.symbol !== symbol && type.symbol.flags & 16 /* Function */ && some(type.symbol.declarations, isFunctionExpressionOrArrowFunction) && (((_a2 = type.symbol.members) == null ? void 0 : _a2.size) || ((_b = type.symbol.exports) == null ? void 0 : _b.size))) { + if (!context.remappedSymbolReferences) { + context.remappedSymbolReferences = /* @__PURE__ */ new Map(); + } + context.remappedSymbolReferences.set(getSymbolId(type.symbol), symbol); + serializeSymbolWorker(type.symbol, isPrivate, propertyAsAlias, escapedSymbolName); + context.remappedSymbolReferences.delete(getSymbolId(type.symbol)); + } else if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags); } else { - const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; + const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_c = symbol.parent) == null ? void 0 : _c.valueDeclaration) && isSourceFile((_d = symbol.parent) == null ? void 0 : _d.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol); let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d)); if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { textRange = textRange.parent.parent; } - const propertyAccessRequire = (_c = symbol.declarations) == null ? void 0 : _c.find(isPropertyAccessExpression); - if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_d = type.symbol) == null ? void 0 : _d.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { + const propertyAccessRequire = (_e = symbol.declarations) == null ? void 0 : _e.find(isPropertyAccessExpression); + if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_f = type.symbol) == null ? void 0 : _f.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { const alias = localName === propertyAccessRequire.parent.right.escapedText ? void 0 : propertyAccessRequire.parent.right; addResult( factory.createExportDeclaration( @@ -54464,19 +54809,22 @@ function createTypeChecker(host) { ); context.tracker.trackSymbol(type.symbol, context.enclosingDeclaration, 111551 /* Value */); } else { - const statement = setTextRange(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([ - factory.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) - ) - ], flags) - ), textRange); - addResult(statement, name !== localName ? modifierFlags & ~1 /* Export */ : modifierFlags); + const statement = setTextRange( + factory.createVariableStatement( + /*modifiers*/ + void 0, + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + name, + /*exclamationToken*/ + void 0, + serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) + ) + ], flags) + ), + textRange + ); + addResult(statement, name !== localName ? modifierFlags & ~32 /* Export */ : modifierFlags); if (name !== localName && !isPrivate) { addResult( factory.createExportDeclaration( @@ -54549,18 +54897,21 @@ function createTypeChecker(host) { factory.createIdentifier(getInternalSymbolName(symbol, symbolName2)) ), 0 /* None */); } else if (needsExportDeclaration) { - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( + addResult( + factory.createExportDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - getInternalSymbolName(symbol, symbolName2), - symbolName2 - )]) - ), 0 /* None */); + factory.createNamedExports([factory.createExportSpecifier( + /*isTypeOnly*/ + false, + getInternalSymbolName(symbol, symbolName2), + symbolName2 + )]) + ), + 0 /* None */ + ); } } function includePrivateSymbol(symbol) { @@ -54568,10 +54919,7 @@ function createTypeChecker(host) { return; Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]); getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol); - const isExternalImportAlias = !!(symbol.flags & 2097152 /* Alias */) && !some( - symbol.declarations, - (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference) - ); + const isExternalImportAlias = !!(symbol.flags & 2097152 /* Alias */) && !some(symbol.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference)); deferredPrivatesStack[isExternalImportAlias ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration2) { @@ -54581,43 +54929,46 @@ function createTypeChecker(host) { if (canHaveModifiers(node)) { let newModifierFlags = 0 /* None */; const enclosingDeclaration2 = context.enclosingDeclaration && (isJSDocTypeAlias(context.enclosingDeclaration) ? getSourceFileOfNode(context.enclosingDeclaration) : context.enclosingDeclaration); - if (additionalModifierFlags & 1 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { - newModifierFlags |= 1 /* Export */; + if (additionalModifierFlags & 32 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { + newModifierFlags |= 32 /* Export */; } - if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { - newModifierFlags |= 2 /* Ambient */; + if (addingDeclare && !(newModifierFlags & 32 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { + newModifierFlags |= 128 /* Ambient */; } - if (additionalModifierFlags & 1024 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { - newModifierFlags |= 1024 /* Default */; + if (additionalModifierFlags & 2048 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { + newModifierFlags |= 2048 /* Default */; } if (newModifierFlags) { - node = factory.updateModifiers(node, newModifierFlags | getEffectiveModifierFlags(node)); + node = factory.replaceModifiers(node, newModifierFlags | getEffectiveModifierFlags(node)); } } results.push(node); } function serializeTypeAlias(symbol, symbolName2, modifierFlags) { - var _a; + var _a2; const aliasType = getDeclaredTypeOfTypeAlias(symbol); const typeParams = getSymbolLinks(symbol).typeParameters; const typeParamDecls = map(typeParams, (p) => typeParameterToDeclaration(p, context)); - const jsdocAliasDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isJSDocTypeAlias); + const jsdocAliasDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isJSDocTypeAlias); const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0); const oldFlags = context.flags; context.flags |= 8388608 /* InTypeAlias */; const oldEnclosingDecl = context.enclosingDeclaration; context.enclosingDeclaration = jsdocAliasDecl; const typeNode = jsdocAliasDecl && jsdocAliasDecl.typeExpression && isJSDocTypeExpression(jsdocAliasDecl.typeExpression) && serializeExistingTypeNode(context, jsdocAliasDecl.typeExpression.type, includePrivateSymbol, bundled) || typeToTypeNodeHelper(aliasType, context); - addResult(setSyntheticLeadingComments( - factory.createTypeAliasDeclaration( - /*modifiers*/ - void 0, - getInternalSymbolName(symbol, symbolName2), - typeParamDecls, - typeNode + addResult( + setSyntheticLeadingComments( + factory.createTypeAliasDeclaration( + /*modifiers*/ + void 0, + getInternalSymbolName(symbol, symbolName2), + typeParamDecls, + typeNode + ), + !commentText ? [] : [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }] ), - !commentText ? [] : [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }] - ), modifierFlags); + modifierFlags + ); context.flags = oldFlags; context.enclosingDeclaration = oldEnclosingDecl; } @@ -54632,14 +54983,17 @@ function createTypeChecker(host) { const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; - addResult(factory.createInterfaceDeclaration( - /*modifiers*/ - void 0, - getInternalSymbolName(symbol, symbolName2), - typeParamDecls, - heritageClauses, - [...indexSignatures, ...constructSignatures, ...callSignatures, ...members] - ), modifierFlags); + addResult( + factory.createInterfaceDeclaration( + /*modifiers*/ + void 0, + getInternalSymbolName(symbol, symbolName2), + typeParamDecls, + heritageClauses, + [...indexSignatures, ...constructSignatures, ...callSignatures, ...members] + ), + modifierFlags + ); } function getNamespaceMembersForSerialization(symbol) { const exports = getExportsOfSymbol(symbol); @@ -54666,12 +55020,12 @@ function createTypeChecker(host) { /*isTypeOnly*/ false, factory.createNamedExports(mapDefined(filter(mergedMembers, (n) => n.escapedName !== "export=" /* ExportEquals */), (s) => { - var _a, _b; + var _a2, _b; const name = unescapeLeadingUnderscores(s.escapedName); const localName2 = getInternalSymbolName(s, name); const aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); if (containingFile && (aliasDecl ? containingFile !== getSourceFileOfNode(aliasDecl) : !some(s.declarations, (d) => getSourceFileOfNode(d) === containingFile))) { - (_b = (_a = context.tracker) == null ? void 0 : _a.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a, containingFile, symbol, s); + (_b = (_a2 = context.tracker) == null ? void 0 : _a2.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a2, containingFile, symbol, s); return void 0; } const target = aliasDecl && getTargetOfAliasDeclaration( @@ -54689,24 +55043,33 @@ function createTypeChecker(host) { ); })) )]); - addResult(factory.createModuleDeclaration( - /*modifiers*/ - void 0, - factory.createIdentifier(localName), - nsBody, - 32 /* Namespace */ - ), 0 /* None */); + addResult( + factory.createModuleDeclaration( + /*modifiers*/ + void 0, + factory.createIdentifier(localName), + nsBody, + 32 /* Namespace */ + ), + 0 /* None */ + ); } } function serializeEnum(symbol, symbolName2, modifierFlags) { - addResult(factory.createEnumDeclaration( - factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 2048 /* Const */ : 0), - getInternalSymbolName(symbol, symbolName2), - map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => { - const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0; - return factory.createEnumMember(unescapeLeadingUnderscores(p.escapedName), initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue)); - }) - ), modifierFlags); + addResult( + factory.createEnumDeclaration( + factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 4096 /* Const */ : 0), + getInternalSymbolName(symbol, symbolName2), + map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => { + const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0; + return factory.createEnumMember( + unescapeLeadingUnderscores(p.escapedName), + initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue) + ); + }) + ), + modifierFlags + ); } function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); @@ -54738,13 +55101,7 @@ function createTypeChecker(host) { } function serializeAsNamespaceDeclaration(props, localName, modifierFlags, suppressNewPrivateContext) { if (length(props)) { - const localVsRemoteMap = arrayToMultiMap( - props, - (p) => !length(p.declarations) || some( - p.declarations, - (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration) - ) ? "local" : "remote" - ); + const localVsRemoteMap = arrayToMultiMap(props, (p) => !length(p.declarations) || some(p.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)) ? "local" : "remote"); const localProps = localVsRemoteMap.get("local") || emptyArray; let fakespace = parseNodeFactory.createModuleDeclaration( /*modifiers*/ @@ -54785,7 +55142,7 @@ function createTypeChecker(host) { factory.createIdentifier("default" /* Default */) )]) ) : d); - const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 1 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced; + const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 32 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced; fakespace = factory.updateModuleDeclaration( fakespace, fakespace.modifiers, @@ -54821,10 +55178,7 @@ function createTypeChecker(host) { } return cleanup(factory.createExpressionWithTypeArguments( expr, - map( - e.typeArguments, - (a) => serializeExistingTypeNode(context, a, includePrivateSymbol, bundled) || typeToTypeNodeHelper(getTypeFromTypeNode(a), context) - ) + map(e.typeArguments, (a) => serializeExistingTypeNode(context, a, includePrivateSymbol, bundled) || typeToTypeNodeHelper(getTypeFromTypeNode(a), context)) )); function cleanup(result2) { context.enclosingDeclaration = oldEnclosing; @@ -54837,8 +55191,8 @@ function createTypeChecker(host) { return void 0; } function serializeAsClass(symbol, localName, modifierFlags) { - var _a, _b; - const originalDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike); + var _a2, _b; + const originalDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isClassLike); const oldEnclosing = context.enclosingDeclaration; context.enclosingDeclaration = originalDecl || oldEnclosing; const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); @@ -54891,21 +55245,27 @@ function createTypeChecker(host) { ); const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */)); const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration( - factory.createModifiersFromModifierFlags(8 /* Private */), + factory.createModifiersFromModifierFlags(2 /* Private */), [], /*body*/ void 0 )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; - addResult(setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - localName, - typeParamDecls, - heritageClauses, - [...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties] - ), symbol.declarations && filter(symbol.declarations, (d) => isClassDeclaration(d) || isClassExpression(d))[0]), modifierFlags); + addResult( + setTextRange( + factory.createClassDeclaration( + /*modifiers*/ + void 0, + localName, + typeParamDecls, + heritageClauses, + [...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties] + ), + symbol.declarations && filter(symbol.declarations, (d) => isClassDeclaration(d) || isClassExpression(d))[0] + ), + modifierFlags + ); } function getSomeTargetNameFromDeclarations(declarations) { return firstDefined(declarations, (d) => { @@ -54928,7 +55288,7 @@ function createTypeChecker(host) { }); } function serializeAsAlias(symbol, localName, modifierFlags) { - var _a, _b, _c, _d, _e; + var _a2, _b, _c, _d, _e; const node = getDeclarationOfAliasSymbol(symbol); if (!node) return Debug.fail(); @@ -54948,28 +55308,31 @@ function createTypeChecker(host) { includePrivateSymbol(target); switch (node.kind) { case 208 /* BindingElement */: - if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ + addResult( + factory.createImportDeclaration( + /*modifiers*/ void 0, - factory.createNamedImports([factory.createImportSpecifier( + factory.createImportClause( /*isTypeOnly*/ false, - propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : void 0, - factory.createIdentifier(localName) - )]) + /*name*/ + void 0, + factory.createNamedImports([factory.createImportSpecifier( + /*isTypeOnly*/ + false, + propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : void 0, + factory.createIdentifier(localName) + )]) + ), + factory.createStringLiteral(specifier2), + /*attributes*/ + void 0 ), - factory.createStringLiteral(specifier2), - /*assertClause*/ - void 0 - ), 0 /* None */); + 0 /* None */ + ); break; } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); @@ -54987,22 +55350,28 @@ function createTypeChecker(host) { const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - uniqueName, - factory.createExternalModuleReference(factory.createStringLiteral(specifier2)) - ), 0 /* None */); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - factory.createQualifiedName(uniqueName, initializer.name) - ), modifierFlags); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + uniqueName, + factory.createExternalModuleReference(factory.createStringLiteral(specifier2)) + ), + 0 /* None */ + ); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createIdentifier(localName), + factory.createQualifiedName(uniqueName, initializer.name) + ), + modifierFlags + ); break; } case 271 /* ImportEqualsDeclaration */: @@ -55011,20 +55380,23 @@ function createTypeChecker(host) { break; } const isLocalImport = !(target.flags & 512 /* ValueModule */) && !isVariableDeclaration(node); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - isLocalImport ? symbolToName( - target, - context, - 67108863 /* All */, - /*expectsIdentifier*/ - false - ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) - ), isLocalImport ? modifierFlags : 0 /* None */); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createIdentifier(localName), + isLocalImport ? symbolToName( + target, + context, + 67108863 /* All */, + /*expectsIdentifier*/ + false + ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) + ), + isLocalImport ? modifierFlags : 0 /* None */ + ); break; case 270 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); @@ -55032,72 +55404,84 @@ function createTypeChecker(host) { case 273 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - /*namedBindings*/ - void 0 + addResult( + factory.createImportDeclaration( + /*modifiers*/ + void 0, + factory.createImportClause( + /*isTypeOnly*/ + false, + factory.createIdentifier(localName), + /*namedBindings*/ + void 0 + ), + specifier2, + node.parent.attributes ), - specifier2, - node.parent.assertClause - ), 0 /* None */); + 0 /* None */ + ); break; } case 274 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ + addResult( + factory.createImportDeclaration( + /*modifiers*/ void 0, - factory.createNamespaceImport(factory.createIdentifier(localName)) + factory.createImportClause( + /*isTypeOnly*/ + false, + /*name*/ + void 0, + factory.createNamespaceImport(factory.createIdentifier(localName)) + ), + specifier2, + node.parent.attributes ), - specifier2, - node.parent.parent.assertClause - ), 0 /* None */); + 0 /* None */ + ); break; } case 280 /* NamespaceExport */: - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamespaceExport(factory.createIdentifier(localName)), - factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) - ), 0 /* None */); + addResult( + factory.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createNamespaceExport(factory.createIdentifier(localName)), + factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) + ), + 0 /* None */ + ); break; case 276 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ + addResult( + factory.createImportDeclaration( + /*modifiers*/ void 0, - factory.createNamedImports([ - factory.createImportSpecifier( - /*isTypeOnly*/ - false, - localName !== verbatimTargetName ? factory.createIdentifier(verbatimTargetName) : void 0, - factory.createIdentifier(localName) - ) - ]) + factory.createImportClause( + /*isTypeOnly*/ + false, + /*name*/ + void 0, + factory.createNamedImports([ + factory.createImportSpecifier( + /*isTypeOnly*/ + false, + localName !== verbatimTargetName ? factory.createIdentifier(verbatimTargetName) : void 0, + factory.createIdentifier(localName) + ) + ]) + ), + specifier2, + node.parent.parent.parent.attributes ), - specifier2, - node.parent.parent.parent.assertClause - ), 0 /* None */); + 0 /* None */ + ); break; } case 281 /* ExportSpecifier */: @@ -55125,22 +55509,25 @@ function createTypeChecker(host) { } } function serializeExportSpecifier(localName, targetName, specifier) { - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( + addResult( + factory.createExportDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - localName !== targetName ? targetName : void 0, - localName - )]), - specifier - ), 0 /* None */); + factory.createNamedExports([factory.createExportSpecifier( + /*isTypeOnly*/ + false, + localName !== targetName ? targetName : void 0, + localName + )]), + specifier + ), + 0 /* None */ + ); } function serializeMaybeAliasAssignment(symbol) { - var _a; + var _a2; if (symbol.flags & 4194304 /* Prototype */) { return false; } @@ -55185,20 +55572,23 @@ function createTypeChecker(host) { serializeExportSpecifier(name, getInternalSymbolName(target, symbolName(target))); } else { const varName = getUnusedName(name, symbol); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(varName), - symbolToName( - target, - context, - 67108863 /* All */, - /*expectsIdentifier*/ - false - ) - ), 0 /* None */); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createIdentifier(varName), + symbolToName( + target, + context, + 67108863 /* All */, + /*expectsIdentifier*/ + false + ) + ), + 0 /* None */ + ); serializeExportSpecifier(name, varName); } } @@ -55208,8 +55598,9 @@ function createTypeChecker(host) { const varName = getUnusedName(name, symbol); const typeToSerialize = getWidenedType(getTypeOfSymbol(getMergedSymbol(symbol))); if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) { - serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 1 /* Export */); + serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 32 /* Export */); } else { + const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */; const statement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -55220,11 +55611,11 @@ function createTypeChecker(host) { void 0, serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled) ) - ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) + ], flags) ); addResult( statement, - target && target.flags & 4 /* Property */ && target.escapedName === "export=" /* ExportEquals */ ? 2 /* Ambient */ : name === varName ? 1 /* Export */ : 0 /* None */ + target && target.flags & 4 /* Property */ && target.escapedName === "export=" /* ExportEquals */ ? 128 /* Ambient */ : name === varName ? 32 /* Export */ : 0 /* None */ ); } if (isExportAssignmentCompatibleSymbolName) { @@ -55246,79 +55637,114 @@ function createTypeChecker(host) { const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration); return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK - !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => isIdentifierText(symbolName(p), languageVersion)); + !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => { + if (!isIdentifierText(symbolName(p), languageVersion)) { + return false; + } + if (!(p.flags & 98304 /* Accessor */)) { + return true; + } + return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p); + }); } function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) { return function serializePropertySymbol(p, isStatic2, baseType) { - var _a, _b, _c, _d, _e; + var _a2, _b, _c, _d, _e; const modifierFlags = getDeclarationModifierFlagsFromSymbol(p); - const isPrivate = !!(modifierFlags & 8 /* Private */); + const isPrivate = !!(modifierFlags & 2 /* Private */); if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) { return []; } if (p.flags & 4194304 /* Prototype */ || p.escapedName === "constructor" || baseType && getPropertyOfType(baseType, p.escapedName) && isReadonlySymbol(getPropertyOfType(baseType, p.escapedName)) === isReadonlySymbol(p) && (p.flags & 16777216 /* Optional */) === (getPropertyOfType(baseType, p.escapedName).flags & 16777216 /* Optional */) && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName))) { return []; } - const flag = modifierFlags & ~512 /* Async */ | (isStatic2 ? 32 /* Static */ : 0); + const flag = modifierFlags & ~1024 /* Async */ | (isStatic2 ? 256 /* Static */ : 0); const name = getPropertyNameNodeForSymbol(p, context); - const firstPropertyLikeDecl = (_a = p.declarations) == null ? void 0 : _a.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression)); + const firstPropertyLikeDecl = (_a2 = p.declarations) == null ? void 0 : _a2.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression)); if (p.flags & 98304 /* Accessor */ && useAccessors) { const result = []; if (p.flags & 65536 /* SetAccessor */) { - result.push(setTextRange(factory.createSetAccessorDeclaration( - factory.createModifiersFromModifierFlags(flag), - name, - [factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "arg", - /*questionToken*/ - void 0, - isPrivate ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled) - )], - /*body*/ - void 0 - ), ((_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor)) || firstPropertyLikeDecl)); + const setter = p.declarations && forEach(p.declarations, (d) => { + if (d.kind === 178 /* SetAccessor */) { + return d; + } + if (isCallExpression(d) && isBindableObjectDefinePropertyCall(d)) { + return forEach(d.arguments[2].properties, (propDecl) => { + const id = getNameOfDeclaration(propDecl); + if (!!id && isIdentifier(id) && idText(id) === "set") { + return propDecl; + } + }); + } + }); + Debug.assert(!!setter); + const paramSymbol = isFunctionLikeDeclaration(setter) ? getSignatureFromDeclaration(setter).parameters[0] : void 0; + result.push(setTextRange( + factory.createSetAccessorDeclaration( + factory.createModifiersFromModifierFlags(flag), + name, + [factory.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + paramSymbol ? parameterToParameterDeclarationName(paramSymbol, getEffectiveParameterDeclaration(paramSymbol), context) : "value", + /*questionToken*/ + void 0, + isPrivate ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled) + )], + /*body*/ + void 0 + ), + ((_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor)) || firstPropertyLikeDecl + )); } if (p.flags & 32768 /* GetAccessor */) { - const isPrivate2 = modifierFlags & 8 /* Private */; - result.push(setTextRange(factory.createGetAccessorDeclaration( - factory.createModifiersFromModifierFlags(flag), - name, - [], - isPrivate2 ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), - /*body*/ - void 0 - ), ((_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor)) || firstPropertyLikeDecl)); + const isPrivate2 = modifierFlags & 2 /* Private */; + result.push(setTextRange( + factory.createGetAccessorDeclaration( + factory.createModifiersFromModifierFlags(flag), + name, + [], + isPrivate2 ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), + /*body*/ + void 0 + ), + ((_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor)) || firstPropertyLikeDecl + )); } return result; } else if (p.flags & (4 /* Property */ | 3 /* Variable */ | 98304 /* Accessor */)) { - return setTextRange(createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), - name, - p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - isPrivate ? void 0 : serializeTypeForDeclaration(context, getWriteTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), - // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 - // interface members can't have initializers, however class members _can_ - /*initializer*/ - void 0 - ), ((_d = p.declarations) == null ? void 0 : _d.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl); - } - if (p.flags & (8192 /* Method */ | 16 /* Function */)) { - const type = getTypeOfSymbol(p); - const signatures = getSignaturesOfType(type, 0 /* Call */); - if (flag & 8 /* Private */) { - return setTextRange(createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), + return setTextRange( + createProperty2( + factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag), name, p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - /*type*/ - void 0, + isPrivate ? void 0 : serializeTypeForDeclaration(context, getWriteTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), + // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 + // interface members can't have initializers, however class members _can_ /*initializer*/ void 0 - ), ((_e = p.declarations) == null ? void 0 : _e.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0]); + ), + ((_d = p.declarations) == null ? void 0 : _d.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl + ); + } + if (p.flags & (8192 /* Method */ | 16 /* Function */)) { + const type = getTypeOfSymbol(p); + const signatures = getSignaturesOfType(type, 0 /* Call */); + if (flag & 2 /* Private */) { + return setTextRange( + createProperty2( + factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag), + name, + p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + ((_e = p.declarations) == null ? void 0 : _e.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0] + ); } const results2 = []; for (const sig of signatures) { @@ -55385,17 +55811,20 @@ function createTypeChecker(host) { let privateProtected = 0; for (const s of signatures) { if (s.declaration) { - privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 8 /* Private */ | 16 /* Protected */); + privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 2 /* Private */ | 4 /* Protected */); } } if (privateProtected) { - return [setTextRange(factory.createConstructorDeclaration( - factory.createModifiersFromModifierFlags(privateProtected), - /*parameters*/ - [], - /*body*/ - void 0 - ), signatures[0].declaration)]; + return [setTextRange( + factory.createConstructorDeclaration( + factory.createModifiersFromModifierFlags(privateProtected), + /*parameters*/ + [], + /*body*/ + void 0 + ), + signatures[0].declaration + )]; } } const results2 = []; @@ -55477,7 +55906,7 @@ function createTypeChecker(host) { } } function getUnusedName(input, symbol) { - var _a, _b; + var _a2, _b; const id = symbol ? getSymbolId(symbol) : void 0; if (id) { if (context.remappedSymbolNames.has(id)) { @@ -55489,7 +55918,7 @@ function createTypeChecker(host) { } let i = 0; const original = input; - while ((_a = context.usedSymbolNames) == null ? void 0 : _a.has(input)) { + while ((_a2 = context.usedSymbolNames) == null ? void 0 : _a2.has(input)) { i++; input = `${original}_${i}`; } @@ -55575,10 +56004,10 @@ function createTypeChecker(host) { return result || types; } function visibilityToString(flags) { - if (flags === 8 /* Private */) { + if (flags === 2 /* Private */) { return "private"; } - if (flags === 16 /* Protected */) { + if (flags === 4 /* Protected */) { return "protected"; } return "public"; @@ -55617,6 +56046,10 @@ function createTypeChecker(host) { } } function getNameOfSymbolAsWritten(symbol, context) { + var _a; + if ((_a = context == null ? void 0 : context.remappedSymbolReferences) == null ? void 0 : _a.has(getSymbolId(symbol))) { + symbol = context.remappedSymbolReferences.get(getSymbolId(symbol)); + } if (context && symbol.escapedName === "default" /* Default */ && !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */) && // If it's not the first part of an entity name, it must print as `default` (!(context.flags & 16777216 /* InInitialEntityName */) || // if the symbol is synthesized, it will only be referenced externally it must print as `default` !symbol.declarations || // if not in the same binding context (source file, module declaration), it must print as `default` @@ -55692,7 +56125,7 @@ function createTypeChecker(host) { return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlagsCached(node) & 1 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 312 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { + if (!(getCombinedModifierFlagsCached(node) & 32 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 312 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); @@ -55702,7 +56135,7 @@ function createTypeChecker(host) { case 178 /* SetAccessor */: case 174 /* MethodDeclaration */: case 173 /* MethodSignature */: - if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { + if (hasEffectiveModifier(node, 2 /* Private */ | 4 /* Protected */)) { return false; } case 176 /* Constructor */: @@ -55874,10 +56307,6 @@ function createTypeChecker(host) { const prop = getPropertyOfType(type, name); return prop ? getTypeOfSymbol(prop) : void 0; } - function getTypeOfPropertyOrIndexSignature(type, name) { - var _a; - return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType; - } function getTypeOfPropertyOrIndexSignatureOfType(type, name) { var _a; let propType; @@ -55925,7 +56354,7 @@ function createTypeChecker(host) { const unspreadableToRestKeys = []; for (const prop of getPropertiesOfType(source)) { const literalTypeFromProperty = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */); - if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) && isSpreadableProperty(prop)) { + if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) && isSpreadableProperty(prop)) { spreadableProperties.push(prop); } else { unspreadableToRestKeys.push(literalTypeFromProperty); @@ -56014,18 +56443,23 @@ function createTypeChecker(host) { return type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */) ? "" + type.value : void 0; } function getTypeForBindingElement(declaration) { - const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */; + const checkMode = declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */; const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode); - return parentType && getBindingElementTypeFromParentType(declaration, parentType); + return parentType && getBindingElementTypeFromParentType( + declaration, + parentType, + /*noTupleBoundsCheck*/ + false + ); } - function getBindingElementTypeFromParentType(declaration, parentType) { + function getBindingElementTypeFromParentType(declaration, parentType, noTupleBoundsCheck) { if (isTypeAny(parentType)) { return parentType; } const pattern = declaration.parent; if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) { parentType = getNonNullableType(parentType); - } else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) { + } else if (strictNullChecks && pattern.parent.initializer && !hasTypeFacts(getTypeOfInitializer(pattern.parent.initializer), 65536 /* EQUndefined */)) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; @@ -56057,7 +56491,7 @@ function createTypeChecker(host) { type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType); } else if (isArrayLikeType(parentType)) { const indexType = getNumberLiteralType(index); - const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0); + const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0); const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType; type = getFlowTypeOfDestructuring(declaration, declaredType); } else { @@ -56068,7 +56502,7 @@ function createTypeChecker(host) { return type; } if (getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration))) { - return strictNullChecks && !(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type; + return strictNullChecks && !hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type; } return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0 /* Normal */)], 2 /* Subtype */)); } @@ -56126,7 +56560,7 @@ function createTypeChecker(host) { if (declaredType) { return addOptionality(declaredType, isProperty, isOptional); } - if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 1 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { + if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 32 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) { return autoType; } @@ -56174,7 +56608,7 @@ function createTypeChecker(host) { if (isPropertyDeclaration(declaration) && (noImplicitAny || isInJSFile(declaration))) { if (!hasStaticModifier(declaration)) { const constructor = findConstructorDeclaration(declaration.parent); - const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; + const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; return type && addOptionality( type, /*isProperty*/ @@ -56183,7 +56617,7 @@ function createTypeChecker(host) { ); } else { const staticBlocks = filter(declaration.parent.members, isClassStaticBlockDeclaration); - const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; + const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; return type && addOptionality( type, /*isProperty*/ @@ -56287,7 +56721,7 @@ function createTypeChecker(host) { return everyType(flowType, isNullableType) ? void 0 : convertAutoToAny(flowType); } function getFlowTypeOfProperty(reference, prop) { - const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 2 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType; + const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 128 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType; return getFlowTypeOfReference(reference, autoType, initialType); } function getWidenedTypeForAssignmentDeclaration(symbol, resolvedSymbol) { @@ -56911,6 +57345,9 @@ function createTypeChecker(host) { function getTypeOfAlias(symbol) { const links = getSymbolLinks(symbol); if (!links.type) { + if (!pushTypeResolution(symbol, 0 /* Type */)) { + return errorType; + } const targetSymbol = resolveAlias(symbol); const exportSymbol = symbol.declarations && getTargetOfAliasDeclaration( getDeclarationOfAliasSymbol(symbol), @@ -56919,6 +57356,10 @@ function createTypeChecker(host) { ); const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; + if (!popTypeResolution()) { + reportCircularityError(exportSymbol ?? symbol); + return links.type = errorType; + } } return links.type; } @@ -56932,20 +57373,19 @@ function createTypeChecker(host) { } function reportCircularityError(symbol) { const declaration = symbol.valueDeclaration; - if (getEffectiveTypeAnnotationNode(declaration)) { - error2( - symbol.valueDeclaration, - Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, - symbolToString(symbol) - ); - return errorType; - } - if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { - error2( - symbol.valueDeclaration, - Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, - symbolToString(symbol) - ); + if (declaration) { + if (getEffectiveTypeAnnotationNode(declaration)) { + error2(symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + return errorType; + } + if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { + error2(symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol)); + } + } else if (symbol.flags & 2097152 /* Alias */) { + const node = getDeclarationOfAliasSymbol(symbol); + if (node) { + error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); + } } return anyType; } @@ -56973,7 +57413,7 @@ function createTypeChecker(host) { return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : ( // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty symbol.links.writeType || symbol.links.type - ) : getTypeOfSymbol(symbol); + ) : removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */)); } if (symbol.flags & 98304 /* Accessor */) { return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol); @@ -57156,10 +57596,7 @@ function createTypeChecker(host) { function getConstructorsForTypeArguments(type, typeArgumentNodes, location) { const typeArgCount = length(typeArgumentNodes); const isJavascript = isInJSFile(location); - return filter( - getSignaturesOfType(type, 1 /* Construct */), - (sig) => (isJavascript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= length(sig.typeParameters) - ); + return filter(getSignaturesOfType(type, 1 /* Construct */), (sig) => (isJavascript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= length(sig.typeParameters)); } function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) { const signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location); @@ -57306,16 +57743,12 @@ function createTypeChecker(host) { return type.resolvedBaseTypes = emptyArray; } if (type === reducedBaseType || hasBaseType(reducedBaseType, type)) { - error2( - type.symbol.valueDeclaration, - Diagnostics.Type_0_recursively_references_itself_as_a_base_type, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 2 /* WriteArrayAsGenericType */ - ) - ); + error2(type.symbol.valueDeclaration, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( + type, + /*enclosingDeclaration*/ + void 0, + 2 /* WriteArrayAsGenericType */ + )); return type.resolvedBaseTypes = emptyArray; } if (type.resolvedBaseTypes === resolvingEmptyArray) { @@ -57469,7 +57902,9 @@ function createTypeChecker(host) { if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); const value = getEnumMemberValue(member); - const memberType = getFreshTypeOfLiteralType(value !== void 0 ? getEnumLiteralType(value, getSymbolId(symbol), memberSymbol) : createComputedEnumType(memberSymbol)); + const memberType = getFreshTypeOfLiteralType( + value !== void 0 ? getEnumLiteralType(value, getSymbolId(symbol), memberSymbol) : createComputedEnumType(memberSymbol) + ); getSymbolLinks(memberSymbol).declaredType = memberType; memberTypeList.push(getRegularTypeOfLiteralType(memberType)); } @@ -57682,7 +58117,7 @@ function createTypeChecker(host) { if (!lateSymbol) lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */)); const earlySymbol = earlySymbols && earlySymbols.get(memberName); - if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) { + if (!(parent2.flags & 32 /* Class */) && (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol)) { const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations; const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName); forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); @@ -57734,7 +58169,28 @@ function createTypeChecker(host) { } } } - links[resolutionKind] = combineSymbolTables(earlySymbols, lateSymbols) || emptySymbols; + let resolved = combineSymbolTables(earlySymbols, lateSymbols); + if (symbol.flags & 33554432 /* Transient */ && links.cjsExportMerged && symbol.declarations) { + for (const decl of symbol.declarations) { + const original = getSymbolLinks(decl.symbol)[resolutionKind]; + if (!resolved) { + resolved = original; + continue; + } + if (!original) + continue; + original.forEach((s, name) => { + const existing = resolved.get(name); + if (!existing) + resolved.set(name, s); + else if (existing === s) + return; + else + resolved.set(name, mergeSymbol(existing, s)); + }); + } + } + links[resolutionKind] = resolved || emptySymbols; } return links[resolutionKind]; } @@ -57793,7 +58249,13 @@ function createTypeChecker(host) { const baseTypes = getBaseTypes(source); if (baseTypes.length) { if (source.symbol && members === getMembersOfSymbol(source.symbol)) { - members = createSymbolTable(source.declaredProperties); + const symbolTable = createSymbolTable(); + for (const symbol of members.values()) { + if (!(symbol.flags & 262144 /* TypeParameter */)) { + symbolTable.set(symbol.escapedName, symbol); + } + } + members = symbolTable; } setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos); const thisArgument = lastOrUndefined(typeArguments); @@ -57824,7 +58286,7 @@ function createTypeChecker(host) { resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); } function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { - const sig = new Signature15(checker, flags); + const sig = new Signature14(checker, flags); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -57877,10 +58339,7 @@ function createTypeChecker(host) { return signature.optionalCallSignatureCache[key] || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); } function createOptionalCallSignature(signature, callChainFlags) { - Debug.assert( - callChainFlags === 8 /* IsInnerCallChain */ || callChainFlags === 16 /* IsOuterCallChain */, - "An optional call signature can either be for an inner call chain or an outer call chain, but not both." - ); + Debug.assert(callChainFlags === 8 /* IsInnerCallChain */ || callChainFlags === 16 /* IsOuterCallChain */, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); const result = cloneSignature(signature); result.flags |= callChainFlags; return result; @@ -57929,7 +58388,7 @@ function createTypeChecker(host) { const baseConstructorType = getBaseConstructorTypeOfClass(classType); const baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); const declaration = getClassLikeDeclarationOfSymbol(classType.symbol); - const isAbstract = !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */); + const isAbstract = !!declaration && hasSyntacticModifier(declaration, 64 /* Abstract */); if (baseSignatures.length === 0) { return [createSignature( /*declaration*/ @@ -58116,13 +58575,14 @@ function createTypeChecker(host) { const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0; const paramSymbol = createSymbol( 1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), - paramName || `arg${i}` + paramName || `arg${i}`, + isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0 ); paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType; params[i] = paramSymbol; } if (needsExtraRestElement) { - const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args"); + const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */); restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount)); if (shorter === right) { restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper); @@ -58167,11 +58627,7 @@ function createTypeChecker(host) { for (const info of sourceInfos) { const indexType = info.keyType; if (every(types, (t) => !!getIndexInfoOfType(t, indexType))) { - result.push(createIndexInfo( - indexType, - getUnionType(map(types, (t) => getIndexTypeOfType(t, indexType))), - some(types, (t) => getIndexInfoOfType(t, indexType).isReadonly) - )); + result.push(createIndexInfo(indexType, getUnionType(map(types, (t) => getIndexTypeOfType(t, indexType))), some(types, (t) => getIndexInfoOfType(t, indexType).isReadonly))); } } return result; @@ -58263,11 +58719,7 @@ function createTypeChecker(host) { for (let i = 0; i < indexInfos.length; i++) { const info = indexInfos[i]; if (info.keyType === newInfo.keyType) { - indexInfos[i] = createIndexInfo( - info.keyType, - union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), - union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly - ); + indexInfos[i] = createIndexInfo(info.keyType, union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly); return indexInfos; } } @@ -58347,20 +58799,23 @@ function createTypeChecker(host) { const classType = getDeclaredTypeOfClassOrInterface(symbol); let constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : emptyArray; if (symbol.flags & 16 /* Function */) { - constructSignatures = addRange(constructSignatures.slice(), mapDefined( - type.callSignatures, - (sig) => isJSConstructor(sig.declaration) ? createSignature( - sig.declaration, - sig.typeParameters, - sig.thisParameter, - sig.parameters, - classType, - /*resolvedTypePredicate*/ - void 0, - sig.minArgumentCount, - sig.flags & 167 /* PropagatingFlags */ - ) : void 0 - )); + constructSignatures = addRange( + constructSignatures.slice(), + mapDefined( + type.callSignatures, + (sig) => isJSConstructor(sig.declaration) ? createSignature( + sig.declaration, + sig.typeParameters, + sig.thisParameter, + sig.parameters, + classType, + /*resolvedTypePredicate*/ + void 0, + sig.minArgumentCount, + sig.flags & 167 /* PropagatingFlags */ + ) : void 0 + ) + ); } if (!constructSignatures.length) { constructSignatures = getDefaultConstructSignatures(classType); @@ -58482,11 +58937,7 @@ function createTypeChecker(host) { const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && modifiersProp && isReadonlySymbol(modifiersProp)); const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */; const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0; - const prop = createSymbol( - 4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), - propName, - lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0) - ); + const prop = createSymbol(4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), propName, lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0)); prop.links.mappedType = type; prop.links.nameType = propNameType; prop.links.keyType = keyType; @@ -58499,7 +58950,9 @@ function createTypeChecker(host) { } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) { const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType; const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType)); - const indexInfo = createIndexInfo(indexKeyType, propType, !!(templateModifiers & 1 /* IncludeReadonly */)); + const modifiersIndexInfo = getApplicableIndexInfo(modifiersType, propNameType); + const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && (modifiersIndexInfo == null ? void 0 : modifiersIndexInfo.isReadonly)); + const indexInfo = createIndexInfo(indexKeyType, propType, isReadonly); indexInfos = appendIndexInfo( indexInfos, indexInfo, @@ -58711,7 +59164,7 @@ function createTypeChecker(host) { } function isConstTypeVariable(type, depth = 0) { var _a; - return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); + return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 4096 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); } function getConstraintOfIndexedAccess(type) { return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0; @@ -59037,7 +59490,7 @@ function createTypeChecker(host) { } else if (!isUnion && !isReadonlySymbol(prop)) { checkFlags &= ~8 /* Readonly */; } - checkFlags |= (!(modifiers & 24 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 16 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 8 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 32 /* Static */ ? 2048 /* ContainsStatic */ : 0); + checkFlags |= (!(modifiers & 6 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 4 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 2 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 256 /* Static */ ? 2048 /* ContainsStatic */ : 0); if (!isPrototypeProperty(prop)) { syntheticFlag = 2 /* SyntheticProperty */; } @@ -59093,7 +59546,8 @@ function createTypeChecker(host) { const writeType = getWriteTypeOfSymbol(prop); if (writeTypes || writeType !== type) { writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType); - } else if (type !== firstType) { + } + if (type !== firstType) { checkFlags |= 64 /* HasNonUniformType */; } if (isLiteralType(type) || isPatternLiteralType(type)) { @@ -59207,31 +59661,21 @@ function createTypeChecker(host) { if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 33554432 /* IsNeverIntersection */) { const neverProp = find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType); if (neverProp) { - return chainDiagnosticMessages( - errorInfo, - Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 536870912 /* NoTypeReduction */ - ), - symbolToString(neverProp) - ); + return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, typeToString( + type, + /*enclosingDeclaration*/ + void 0, + 536870912 /* NoTypeReduction */ + ), symbolToString(neverProp)); } const privateProp = find(getPropertiesOfUnionOrIntersectionType(type), isConflictingPrivateProperty); if (privateProp) { - return chainDiagnosticMessages( - errorInfo, - Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 536870912 /* NoTypeReduction */ - ), - symbolToString(privateProp) - ); + return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, typeToString( + type, + /*enclosingDeclaration*/ + void 0, + 536870912 /* NoTypeReduction */ + ), symbolToString(privateProp)); } } return errorInfo; @@ -59316,16 +59760,12 @@ function createTypeChecker(host) { } } } - return applicableInfos ? createIndexInfo( - unknownType, - getIntersectionType(map(applicableInfos, (info) => info.type)), - reduceLeft( - applicableInfos, - (isReadonly, info) => isReadonly && info.isReadonly, - /*initial*/ - true - ) - ) : applicableInfo ? applicableInfo : stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo : void 0; + return applicableInfos ? createIndexInfo(unknownType, getIntersectionType(map(applicableInfos, (info) => info.type)), reduceLeft( + applicableInfos, + (isReadonly, info) => isReadonly && info.isReadonly, + /*initial*/ + true + )) : applicableInfo ? applicableInfo : stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo : void 0; } function isApplicableIndexType(source, target) { return isTypeAssignableTo(source, target) || target === stringType && isTypeAssignableTo(source, numberType) || target === numberType && (source === numericStringType || !!(source.flags & 128 /* StringLiteral */) && isNumericLiteralName(source.value)); @@ -59392,7 +59832,7 @@ function createTypeChecker(host) { } const iife = getImmediatelyInvokedFunctionExpression(node.parent); if (iife) { - return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.arguments.length; + return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length; } return false; } @@ -59502,7 +59942,7 @@ function createTypeChecker(host) { if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { flags |= 1 /* HasRestParameter */; } - if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 256 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 256 /* Abstract */)) { + if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 64 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 64 /* Abstract */)) { flags |= 4 /* Abstract */; } links.resolvedSignature = createSignature( @@ -59677,12 +60117,7 @@ function createTypeChecker(host) { /*parameterIndex*/ void 0, type - ) : createTypePredicate( - node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, - parameterName.escapedText, - findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), - type - ); + ) : createTypePredicate(node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, parameterName.escapedText, findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), type); } function getUnionOrIntersectionType(types, kind, unionReduction) { return kind !== 2097152 /* Intersection */ ? getUnionType(types, unionReduction) : getIntersectionType(types); @@ -59877,12 +60312,7 @@ function createTypeChecker(host) { if (parameter.type) { forEachType(getTypeFromTypeNode(parameter.type), (keyType) => { if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos, keyType)) { - indexInfos.push(createIndexInfo( - keyType, - declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, - hasEffectiveModifier(declaration, 64 /* Readonly */), - declaration - )); + indexInfos.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, hasEffectiveModifier(declaration, 8 /* Readonly */), declaration)); } }); } @@ -59913,9 +60343,12 @@ function createTypeChecker(host) { if (index < typeParameters.length) { const declaredConstraint = getConstraintOfTypeParameter(typeParameters[index]); if (declaredConstraint) { - const mapper = makeDeferredTypeMapper(typeParameters, typeParameters.map((_, index2) => () => { - return getEffectiveTypeArgumentAtIndex(typeReference, typeParameters, index2); - })); + const mapper = makeDeferredTypeMapper( + typeParameters, + typeParameters.map((_, index2) => () => { + return getEffectiveTypeArgumentAtIndex(typeReference, typeParameters, index2); + }) + ); const constraint = instantiateType(declaredConstraint, mapper); if (constraint !== typeParameter) { inferences = append(inferences, constraint); @@ -59932,10 +60365,7 @@ function createTypeChecker(host) { } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); - inferences = append(inferences, instantiateType( - nodeType, - makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(checkMappedType2.typeParameter)), checkMappedType2.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType2.typeParameter.constraint) : keyofConstraintType) - )); + inferences = append(inferences, instantiateType(nodeType, makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(checkMappedType2.typeParameter)), checkMappedType2.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType2.typeParameter.constraint) : keyofConstraintType))); } } } @@ -60110,12 +60540,7 @@ function createTypeChecker(host) { const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments); let instantiation = links.instantiations.get(id); if (!instantiation) { - links.instantiations.set(id, instantiation = instantiateTypeWithAlias( - type, - createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), - aliasSymbol, - aliasTypeArguments - )); + links.instantiations.set(id, instantiation = instantiateTypeWithAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), aliasSymbol, aliasTypeArguments)); } return instantiation; } @@ -60125,7 +60550,13 @@ function createTypeChecker(host) { const id = getAliasId(symbol, typeArguments); let errorType2 = errorTypes.get(id); if (!errorType2) { - errorType2 = createIntrinsicType(1 /* Any */, "error"); + errorType2 = createIntrinsicType( + 1 /* Any */, + "error", + /*objectFlags*/ + void 0, + `alias ${id}` + ); errorType2.aliasSymbol = symbol; errorType2.aliasTypeArguments = typeArguments; errorTypes.set(id, errorType2); @@ -60930,8 +61361,7 @@ function createTypeChecker(host) { if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) { return readonly ? globalReadonlyArrayType : globalArrayType; } - const memberIds = mapDefined(namedMemberDeclarations, (node) => node ? getNodeId(node) : void 0); - const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : ""); + const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : ""); let type = tupleTypes.get(key); if (!type) { tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations)); @@ -60951,11 +61381,7 @@ function createTypeChecker(host) { const flags = elementFlags[i]; combinedFlags |= flags; if (!(combinedFlags & 12 /* Variable */)) { - const property = createSymbol( - 4 /* Property */ | (flags & 2 /* Optional */ ? 16777216 /* Optional */ : 0), - "" + i, - readonly ? 8 /* Readonly */ : 0 - ); + const property = createSymbol(4 /* Property */ | (flags & 2 /* Optional */ ? 16777216 /* Optional */ : 0), "" + i, readonly ? 8 /* Readonly */ : 0); property.links.tupleLabelDeclaration = namedMemberDeclarations == null ? void 0 : namedMemberDeclarations[i]; property.links.type = typeParameter; properties.push(property); @@ -61026,7 +61452,10 @@ function createTypeChecker(host) { } else if (isTupleType(type)) { const elements = getElementTypes(type); if (elements.length + expandedTypes.length >= 1e4) { - error2(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); + error2( + currentNode, + isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent + ); return errorType; } forEach(elements, (t, n) => { @@ -61045,10 +61474,7 @@ function createTypeChecker(host) { expandedFlags[i] = 1 /* Required */; } if (firstRestIndex >= 0 && firstRestIndex < lastOptionalOrRestIndex) { - expandedTypes[firstRestIndex] = getUnionType(sameMap( - expandedTypes.slice(firstRestIndex, lastOptionalOrRestIndex + 1), - (t, i) => expandedFlags[firstRestIndex + i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t - )); + expandedTypes[firstRestIndex] = getUnionType(sameMap(expandedTypes.slice(firstRestIndex, lastOptionalOrRestIndex + 1), (t, i) => expandedFlags[firstRestIndex + i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t)); expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); @@ -61086,10 +61512,7 @@ function createTypeChecker(host) { ); } function getKnownKeysOfTupleType(type) { - return getUnionType(append( - arrayOf(type.target.fixedLength, (i) => getStringLiteralType("" + i)), - getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType) - )); + return getUnionType(append(arrayOf(type.target.fixedLength, (i) => getStringLiteralType("" + i)), getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType))); } function getStartElementCount(type, flags) { const index = findIndex(type.elementFlags, (f) => !(f & flags)); @@ -61395,12 +61818,7 @@ function createTypeChecker(host) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); - links.resolvedType = getUnionType( - map(node.types, getTypeFromTypeNode), - 1 /* Literal */, - aliasSymbol, - getTypeArgumentsForAliasSymbol(aliasSymbol) - ); + links.resolvedType = getUnionType(map(node.types, getTypeFromTypeNode), 1 /* Literal */, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol)); } return links.resolvedType; } @@ -61630,15 +62048,14 @@ function createTypeChecker(host) { function getConstituentCountOfTypes(types) { return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0); } - function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) { - return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType; - } function getTypeFromIntersectionTypeNode(node) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); const types = map(node.types, getTypeFromTypeNode); - const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0])); + const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1; + const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType; + const noSupertypeReduction = !!(t.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || t.flags & 134217728 /* TemplateLiteral */ && isPatternLiteralType(t)); links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction); } return links.resolvedType; @@ -61715,7 +62132,7 @@ function createTypeChecker(host) { return neverType; } function getLiteralTypeFromProperty(prop, include, includeNonPublic) { - if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) { + if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 6 /* NonPublicAccessibilityModifier */)) { let type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type) { const name = getNameOfDeclaration(prop.valueDeclaration); @@ -61749,11 +62166,7 @@ function createTypeChecker(host) { } function getIndexType(type, indexFlags = defaultIndexFlags) { type = getReducedType(type); - return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties( - type, - (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), - indexFlags === defaultIndexFlags - ); + return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags); } function getExtractStringType(type) { if (keyofStringsOnly) { @@ -61854,11 +62267,6 @@ function createTypeChecker(host) { } function createTemplateLiteralType(texts, types) { const type = createType(134217728 /* TemplateLiteral */); - type.objectFlags = getPropagatingFlagsOfTypes( - types, - /*excludeKinds*/ - 98304 /* Nullable */ - ); type.texts = texts; type.types = types; return type; @@ -61981,7 +62389,7 @@ function createTypeChecker(host) { return autoType; } } - const propType = getTypeOfSymbol(prop); + const propType = accessFlags & 4 /* Writing */ ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 /* Definite */ ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType; } if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) { @@ -61993,13 +62401,7 @@ function createTypeChecker(host) { error2(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); return undefinedType; } - error2( - indexNode, - Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, - typeToString(objectType), - getTypeReferenceArity(objectType), - unescapeLeadingUnderscores(propName) - ); + error2(indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), getTypeReferenceArity(objectType), unescapeLeadingUnderscores(propName)); } else { error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } @@ -62018,7 +62420,11 @@ function createTypeChecker(host) { if (indexInfo) { if (accessFlags & 2 /* NoIndexSignatures */ && indexInfo.keyType !== numberType) { if (accessExpression) { - error2(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); + if (accessFlags & 4 /* Writing */) { + error2(accessExpression, Diagnostics.Type_0_is_generic_and_can_only_be_indexed_for_reading, typeToString(originalObjectType)); + } else { + error2(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); + } } return void 0; } @@ -62155,7 +62561,15 @@ function createTypeChecker(host) { } function isPatternLiteralPlaceholderType(type) { if (type.flags & 2097152 /* Intersection */) { - return some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) || isPatternLiteralPlaceholderType(t)); + let seenPlaceholder = false; + for (const t of type.types) { + if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) { + seenPlaceholder = true; + } else if (!(t.flags & 524288 /* Object */)) { + return false; + } + } + return seenPlaceholder; } return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); } @@ -62172,7 +62586,7 @@ function createTypeChecker(host) { return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericIndexType */); } function getGenericObjectFlags(type) { - if (type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */)) { + if (type.flags & 3145728 /* UnionOrIntersection */) { if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) { type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0); } @@ -62184,7 +62598,7 @@ function createTypeChecker(host) { } return type.objectFlags & 12582912 /* IsGenericType */; } - return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0); + return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0); } function getSimplifiedType(type, writing) { return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type; @@ -62666,7 +63080,7 @@ function createTypeChecker(host) { function getAnonymousPartialType(type2) { const members = createSymbolTable(); for (const prop of getPropertiesOfType(type2)) { - if (getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) { + if (getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) { } else if (isSpreadableProperty(prop)) { const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); const flags = 4 /* Property */ | 16777216 /* Optional */; @@ -62728,7 +63142,7 @@ function createTypeChecker(host) { const skippedPrivateMembers = /* @__PURE__ */ new Set(); const indexInfos = left === emptyObjectType ? getIndexInfosOfType(right) : getUnionIndexInfos([left, right]); for (const rightProp of getPropertiesOfType(right)) { - if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) { + if (getDeclarationModifierFlagsFromSymbol(rightProp) & (2 /* Private */ | 4 /* Protected */)) { skippedPrivateMembers.add(rightProp.escapedName); } else if (isSpreadableProperty(rightProp)) { members.set(rightProp.escapedName, getSpreadSymbol(rightProp, readonly)); @@ -63150,7 +63564,12 @@ function createTypeChecker(host) { function instantiateSymbol(symbol, mapper) { const links = getSymbolLinks(symbol); if (links.type && !couldContainTypeVariables(links.type)) { - return symbol; + if (!(symbol.flags & 65536 /* SetAccessor */)) { + return symbol; + } + if (links.writeType && !couldContainTypeVariables(links.writeType)) { + return symbol; + } } if (getCheckFlags(symbol) & 1 /* Instantiated */) { symbol = links.target; @@ -63205,7 +63624,7 @@ function createTypeChecker(host) { result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); target.instantiations.set(id, result); const resultObjectFlags = getObjectFlags(result); - if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { + if (result.flags & 3899393 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables); if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) { if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) { @@ -63280,24 +63699,29 @@ function createTypeChecker(host) { if (typeVariable) { const mappedTypeVariable = instantiateType(typeVariable, mapper); if (typeVariable !== mappedTypeVariable) { - return mapTypeWithAlias(getReducedType(mappedTypeVariable), (t) => { - if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) { - if (!type.declaration.nameType) { - let constraint; - if (isArrayType(t) || t.flags & 1 /* Any */ && findResolutionCycleStartIndex(typeVariable, 4 /* ImmediateBaseConstraint */) < 0 && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) { - return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper)); - } - if (isGenericTupleType(t)) { - return instantiateMappedGenericTupleType(t, type, typeVariable, mapper); - } - if (isTupleType(t)) { - return instantiateMappedTupleType(t, type, prependTypeMapping(typeVariable, t, mapper)); + return mapTypeWithAlias( + getReducedType(mappedTypeVariable), + (t) => { + if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) { + if (!type.declaration.nameType) { + let constraint; + if (isArrayType(t) || t.flags & 1 /* Any */ && findResolutionCycleStartIndex(typeVariable, 4 /* ImmediateBaseConstraint */) < 0 && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) { + return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper)); + } + if (isGenericTupleType(t)) { + return instantiateMappedGenericTupleType(t, type, typeVariable, mapper); + } + if (isTupleType(t)) { + return instantiateMappedTupleType(t, type, prependTypeMapping(typeVariable, t, mapper)); + } } + return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t, mapper)); } - return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t, mapper)); - } - return t; - }, aliasSymbol, aliasTypeArguments); + return t; + }, + aliasSymbol, + aliasTypeArguments + ); } } return instantiateType(getConstraintTypeFromMappedType(type), mapper) === wildcardType ? wildcardType : instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments); @@ -63691,10 +64115,13 @@ function createTypeChecker(host) { const resultObj = errorOutputContainer || {}; checkTypeAssignableTo(source, target, node, headMessage, containingMessageChain, resultObj); const diagnostic = resultObj.errors[resultObj.errors.length - 1]; - addRelatedInfo(diagnostic, createDiagnosticForNode( - node, - signatures === constructSignatures ? Diagnostics.Did_you_mean_to_use_new_with_this_expression : Diagnostics.Did_you_mean_to_call_this_expression - )); + addRelatedInfo( + diagnostic, + createDiagnosticForNode( + node, + signatures === constructSignatures ? Diagnostics.Did_you_mean_to_use_new_with_this_expression : Diagnostics.Did_you_mean_to_call_this_expression + ) + ); return true; } } @@ -63751,10 +64178,13 @@ function createTypeChecker(host) { ); if (resultObj.errors) { if (target.symbol && length(target.symbol.declarations)) { - addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], createDiagnosticForNode( - target.symbol.declarations[0], - Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature - )); + addRelatedInfo( + resultObj.errors[resultObj.errors.length - 1], + createDiagnosticForNode( + target.symbol.declarations[0], + Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature + ) + ); } if ((getFunctionFlags(node) & 2 /* Async */) === 0 && !getTypeOfPropertyOfType(sourceReturn, "then") && checkTypeRelatedTo( createPromiseType(sourceReturn), @@ -63763,10 +64193,13 @@ function createTypeChecker(host) { /*errorNode*/ void 0 )) { - addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], createDiagnosticForNode( - node, - Diagnostics.Did_you_mean_to_mark_this_function_as_async - )); + addRelatedInfo( + resultObj.errors[resultObj.errors.length - 1], + createDiagnosticForNode( + node, + Diagnostics.Did_you_mean_to_mark_this_function_as_async + ) + ); } return true; } @@ -63861,12 +64294,15 @@ function createTypeChecker(host) { if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) { const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0]; if (!getSourceFileOfNode(targetNode).hasNoDefaultLib) { - addRelatedInfo(reportedDiag, createDiagnosticForNode( - targetNode, - Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1, - propertyName && !(nameType.flags & 8192 /* UniqueESSymbol */) ? unescapeLeadingUnderscores(propertyName) : typeToString(nameType), - typeToString(target) - )); + addRelatedInfo( + reportedDiag, + createDiagnosticForNode( + targetNode, + Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1, + propertyName && !(nameType.flags & 8192 /* UniqueESSymbol */) ? unescapeLeadingUnderscores(propertyName) : typeToString(nameType), + typeToString(target) + ) + ); } } } @@ -64067,14 +64503,7 @@ function createTypeChecker(host) { const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName); const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName)); const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2; - invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage( - /*dummy*/ - void 0, - diagnostic, - tagNameText, - childrenPropName, - typeToString(childrenTargetType) - ) }; + invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) }; } return invalidTextDiagnostic; } @@ -64238,7 +64667,7 @@ function createTypeChecker(host) { if (sourceType && targetType) { const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType)); const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType)); - const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && (getTypeFacts(sourceType) & 50331648 /* IsUndefinedOrNull */) === (getTypeFacts(targetType) & 50331648 /* IsUndefinedOrNull */); + const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && getTypeFacts(sourceType, 50331648 /* IsUndefinedOrNull */) === getTypeFacts(targetType, 50331648 /* IsUndefinedOrNull */); let related = callbacks ? compareSignaturesRelated(targetSig, sourceSig, checkMode & 8 /* StrictArity */ | (strictVariance ? 2 /* StrictCallback */ : 1 /* BivariantCallback */), reportErrors2, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !(checkMode & 3 /* Callback */) && !strictVariance && compareTypes( sourceType, targetType, @@ -64255,11 +64684,7 @@ function createTypeChecker(host) { } if (!related) { if (reportErrors2) { - errorReporter( - Diagnostics.Types_of_parameters_0_and_1_are_incompatible, - unescapeLeadingUnderscores(getParameterNameAtPosition(source, i)), - unescapeLeadingUnderscores(getParameterNameAtPosition(target, i)) - ); + errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, unescapeLeadingUnderscores(getParameterNameAtPosition(source, i)), unescapeLeadingUnderscores(getParameterNameAtPosition(target, i))); } return 0 /* False */; } @@ -64380,16 +64805,12 @@ function createTypeChecker(host) { const targetProperty = getPropertyOfType(targetEnumType, property.escapedName); if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) { if (errorReporter) { - errorReporter( - Diagnostics.Property_0_is_missing_in_type_1, - symbolName(property), - typeToString( - getDeclaredTypeOfSymbol(targetSymbol), - /*enclosingDeclaration*/ - void 0, - 64 /* UseFullyQualifiedType */ - ) - ); + errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property), typeToString( + getDeclaredTypeOfSymbol(targetSymbol), + /*enclosingDeclaration*/ + void 0, + 64 /* UseFullyQualifiedType */ + )); enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */); } else { enumRelation.set(id, 2 /* Failed */); @@ -64537,8 +64958,10 @@ function createTypeChecker(host) { let expandingFlags = 0 /* None */; let overflow = false; let overrideNextErrorInfo = 0; + let skipParentCounter = 0; let lastSkippedInfo; let incompatibleStack; + let relationCount = 16e6 - relation.size >> 3; Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); const result = isRelatedTo( source, @@ -64552,8 +64975,19 @@ function createTypeChecker(host) { reportIncompatibleStack(); } if (overflow) { + const id = getRelationKey( + source, + target, + /*intersectionState*/ + 0 /* None */, + relation, + /*ignoreConstraints*/ + false + ); + relation.set(id, 4 /* Reported */ | 2 /* Failed */); (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth }); - const diag2 = error2(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); + const message = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1; + const diag2 = error2(errorNode || currentNode, message, typeToString(source), typeToString(target)); if (errorOutputContainer) { (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); } @@ -64602,6 +65036,7 @@ function createTypeChecker(host) { lastSkippedInfo = saved.lastSkippedInfo; incompatibleStack = saved.incompatibleStack; overrideNextErrorInfo = saved.overrideNextErrorInfo; + skipParentCounter = saved.skipParentCounter; relatedInfo = saved.relatedInfo; } function captureErrorCalculationState() { @@ -64610,6 +65045,7 @@ function createTypeChecker(host) { lastSkippedInfo, incompatibleStack: incompatibleStack == null ? void 0 : incompatibleStack.slice(), overrideNextErrorInfo, + skipParentCounter, relatedInfo: relatedInfo == null ? void 0 : relatedInfo.slice() }; } @@ -64714,7 +65150,15 @@ function createTypeChecker(host) { reportIncompatibleStack(); if (message.elidedInCompatabilityPyramid) return; - errorInfo = chainDiagnosticMessages(errorInfo, message, ...args); + if (skipParentCounter === 0) { + errorInfo = chainDiagnosticMessages(errorInfo, message, ...args); + } else { + skipParentCounter--; + } + } + function reportParentSkippedError(message, ...args) { + reportError(message, ...args); + skipParentCounter++; } function associateRelatedInfo(info) { Debug.assert(!!errorInfo); @@ -65051,18 +65495,9 @@ function createTypeChecker(host) { } } if (suggestion !== void 0) { - reportError( - Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, - symbolToString(prop), - typeToString(errorTarget), - suggestion - ); + reportParentSkippedError(Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, symbolToString(prop), typeToString(errorTarget), suggestion); } else { - reportError( - Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, - symbolToString(prop), - typeToString(errorTarget) - ); + reportParentSkippedError(Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(errorTarget)); } } } @@ -65083,6 +65518,16 @@ function createTypeChecker(host) { } function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) { if (source2.flags & 1048576 /* Union */) { + if (target2.flags & 1048576 /* Union */) { + const sourceOrigin = source2.origin; + if (sourceOrigin && sourceOrigin.flags & 2097152 /* Intersection */ && target2.aliasSymbol && contains(sourceOrigin.types, target2)) { + return -1 /* True */; + } + const targetOrigin = target2.origin; + if (targetOrigin && targetOrigin.flags & 1048576 /* Union */ && source2.aliasSymbol && contains(targetOrigin.types, source2)) { + return -1 /* True */; + } + } return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState); } if (target2.flags & 1048576 /* Union */) { @@ -65396,6 +65841,10 @@ function createTypeChecker(host) { return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */; } } + if (relationCount <= 0) { + overflow = true; + return 0 /* False */; + } if (!maybeKeys) { maybeKeys = []; maybeKeysSet = /* @__PURE__ */ new Set(); @@ -65489,6 +65938,7 @@ function createTypeChecker(host) { } } else { relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags); + relationCount--; resetMaybeStack( /*markAllAsSucceeded*/ false @@ -65500,6 +65950,7 @@ function createTypeChecker(host) { maybeKeysSet.delete(maybeKeys[i]); if (markAllAsSucceeded) { relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); + relationCount--; } } maybeCount = maybeStart; @@ -66258,42 +66709,27 @@ function createTypeChecker(host) { function propertyRelatedTo(source2, target2, sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState, skipOptional) { const sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp); const targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp); - if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) { + if (sourcePropFlags & 2 /* Private */ || targetPropFlags & 2 /* Private */) { if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { if (reportErrors2) { - if (sourcePropFlags & 8 /* Private */ && targetPropFlags & 8 /* Private */) { + if (sourcePropFlags & 2 /* Private */ && targetPropFlags & 2 /* Private */) { reportError(Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp)); } else { - reportError( - Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, - symbolToString(targetProp), - typeToString(sourcePropFlags & 8 /* Private */ ? source2 : target2), - typeToString(sourcePropFlags & 8 /* Private */ ? target2 : source2) - ); + reportError(Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourcePropFlags & 2 /* Private */ ? source2 : target2), typeToString(sourcePropFlags & 2 /* Private */ ? target2 : source2)); } } return 0 /* False */; } - } else if (targetPropFlags & 16 /* Protected */) { + } else if (targetPropFlags & 4 /* Protected */) { if (!isValidOverrideOf(sourceProp, targetProp)) { if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, - symbolToString(targetProp), - typeToString(getDeclaringClass(sourceProp) || source2), - typeToString(getDeclaringClass(targetProp) || target2) - ); + reportError(Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source2), typeToString(getDeclaringClass(targetProp) || target2)); } return 0 /* False */; } - } else if (sourcePropFlags & 16 /* Protected */) { + } else if (sourcePropFlags & 4 /* Protected */) { if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, - symbolToString(targetProp), - typeToString(source2), - typeToString(target2) - ); + reportError(Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, symbolToString(targetProp), typeToString(source2), typeToString(target2)); } return 0 /* False */; } @@ -66309,12 +66745,7 @@ function createTypeChecker(host) { } if (!skipOptional && sourceProp.flags & 16777216 /* Optional */ && targetProp.flags & 106500 /* ClassMember */ && !(targetProp.flags & 16777216 /* Optional */)) { if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, - symbolToString(targetProp), - typeToString(source2), - typeToString(target2) - ); + reportError(Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source2), typeToString(target2)); } return 0 /* False */; } @@ -66560,8 +66991,14 @@ function createTypeChecker(host) { } const sourceIsJSConstructor = source2.symbol && isJSConstructor(source2.symbol.valueDeclaration); const targetIsJSConstructor = target2.symbol && isJSConstructor(target2.symbol.valueDeclaration); - const sourceSignatures = getSignaturesOfType(source2, sourceIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind); - const targetSignatures = getSignaturesOfType(target2, targetIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind); + const sourceSignatures = getSignaturesOfType( + source2, + sourceIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind + ); + const targetSignatures = getSignaturesOfType( + target2, + targetIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind + ); if (kind === 1 /* Construct */ && sourceSignatures.length && targetSignatures.length) { const sourceIsAbstract = !!(sourceSignatures[0].flags & 4 /* Abstract */); const targetIsAbstract = !!(targetSignatures[0].flags & 4 /* Abstract */); @@ -66635,18 +67072,14 @@ function createTypeChecker(host) { shouldElaborateErrors = false; } if (shouldElaborateErrors) { - reportError( - Diagnostics.Type_0_provides_no_match_for_the_signature_1, - typeToString(source2), - signatureToString( - t, - /*enclosingDeclaration*/ - void 0, - /*flags*/ - void 0, - kind - ) - ); + reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source2), signatureToString( + t, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + void 0, + kind + )); } return 0 /* False */; } @@ -66679,16 +67112,7 @@ function createTypeChecker(host) { } function signatureRelatedTo(source2, target2, erase, reportErrors2, intersectionState, incompatibleReporter) { const checkMode = relation === subtypeRelation ? 16 /* StrictTopSignature */ : relation === strictSubtypeRelation ? 16 /* StrictTopSignature */ | 8 /* StrictArity */ : 0 /* None */; - return compareSignaturesRelated( - erase ? getErasedSignature(source2) : source2, - erase ? getErasedSignature(target2) : target2, - checkMode, - reportErrors2, - reportError, - incompatibleReporter, - isRelatedToWorker2, - reportUnreliableMapper - ); + return compareSignaturesRelated(erase ? getErasedSignature(source2) : source2, erase ? getErasedSignature(target2) : target2, checkMode, reportErrors2, reportError, incompatibleReporter, isRelatedToWorker2, reportUnreliableMapper); function isRelatedToWorker2(source3, target3, reportErrors3) { return isRelatedTo( source3, @@ -66833,15 +67257,15 @@ function createTypeChecker(host) { if (!sourceSignature.declaration || !targetSignature.declaration) { return true; } - const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 24 /* NonPublicAccessibilityModifier */); - const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 24 /* NonPublicAccessibilityModifier */); - if (targetAccessibility === 8 /* Private */) { + const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 6 /* NonPublicAccessibilityModifier */); + const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 6 /* NonPublicAccessibilityModifier */); + if (targetAccessibility === 2 /* Private */) { return true; } - if (targetAccessibility === 16 /* Protected */ && sourceAccessibility !== 8 /* Private */) { + if (targetAccessibility === 4 /* Protected */ && sourceAccessibility !== 2 /* Private */) { return true; } - if (targetAccessibility !== 16 /* Protected */ && !sourceAccessibility) { + if (targetAccessibility !== 4 /* Protected */ && !sourceAccessibility) { return true; } if (reportErrors2) { @@ -66941,7 +67365,7 @@ function createTypeChecker(host) { const variances = []; for (const tp of typeParameters) { const modifiers = getTypeParameterModifiers(tp); - let variance = modifiers & 65536 /* Out */ ? modifiers & 32768 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 32768 /* In */ ? 2 /* Contravariant */ : void 0; + let variance = modifiers & 16384 /* Out */ ? modifiers & 8192 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 8192 /* In */ ? 2 /* Contravariant */ : void 0; if (variance === void 0) { let unmeasurable = false; let unreliable = false; @@ -66989,7 +67413,7 @@ function createTypeChecker(host) { } function getTypeParameterModifiers(tp) { var _a; - return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (32768 /* In */ | 65536 /* Out */ | 2048 /* Const */); + return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (8192 /* In */ | 16384 /* Out */ | 4096 /* Const */); } function hasCovariantVoidArgument(typeArguments, variances) { for (let i = 0; i < variances.length; i++) { @@ -67074,13 +67498,16 @@ function createTypeChecker(host) { }); } function isValidOverrideOf(sourceProp, targetProp) { - return !forEachProperty2(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 16 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false); + return !forEachProperty2(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 4 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false); } function isClassDerivedFromDeclaringClasses(checkClass, prop, writing) { - return forEachProperty2(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 16 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass; + return forEachProperty2(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 4 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass; } function isDeeplyNestedType(type, stack, depth, maxDepth = 3) { if (depth >= maxDepth) { + if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) { + type = getMappedTargetWithSymbol(type); + } if (type.flags & 2097152 /* Intersection */) { return some(type.types, (t) => isDeeplyNestedType(t, stack, depth, maxDepth)); } @@ -67089,7 +67516,7 @@ function createTypeChecker(host) { let lastTypeId = 0; for (let i = 0; i < depth; i++) { const t = stack[i]; - if (t.flags & 2097152 /* Intersection */ ? some(t.types, (u) => getRecursionIdentity(u) === identity2) : getRecursionIdentity(t) === identity2) { + if (hasMatchingRecursionIdentity(t, identity2)) { if (t.id >= lastTypeId) { count++; if (count >= maxDepth) { @@ -67102,6 +67529,22 @@ function createTypeChecker(host) { } return false; } + function getMappedTargetWithSymbol(type) { + let target; + while ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && (target = getModifiersTypeFromMappedType(type)) && (target.symbol || target.flags & 2097152 /* Intersection */ && some(target.types, (t) => !!t.symbol))) { + type = target; + } + return type; + } + function hasMatchingRecursionIdentity(type, identity2) { + if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) { + type = getMappedTargetWithSymbol(type); + } + if (type.flags & 2097152 /* Intersection */) { + return some(type.types, (t) => hasMatchingRecursionIdentity(t, identity2)); + } + return getRecursionIdentity(type) === identity2; + } function getRecursionIdentity(type) { if (type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { if (getObjectFlags(type) & 4 /* Reference */ && type.node) { @@ -67135,8 +67578,8 @@ function createTypeChecker(host) { if (sourceProp === targetProp) { return -1 /* True */; } - const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24 /* NonPublicAccessibilityModifier */; - const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24 /* NonPublicAccessibilityModifier */; + const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 6 /* NonPublicAccessibilityModifier */; + const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 6 /* NonPublicAccessibilityModifier */; if (sourcePropAccessibility !== targetPropAccessibility) { return 0 /* False */; } @@ -67274,6 +67717,9 @@ function createTypeChecker(host) { function isArrayLikeType(type) { return isArrayType(type) || !(type.flags & 98304 /* Nullable */) && isTypeAssignableTo(type, anyReadonlyArrayType); } + function isMutableArrayLikeType(type) { + return isMutableArrayOrTuple(type) || !(type.flags & (1 /* Any */ | 98304 /* Nullable */)) && isTypeAssignableTo(type, anyArrayType); + } function getSingleBaseForNonAugmentingSubtype(type) { if (!(getObjectFlags(type) & 4 /* Reference */) || !(getObjectFlags(type.target) & 3 /* ClassOrInterface */)) { return void 0; @@ -67428,7 +67874,7 @@ function createTypeChecker(host) { return value.base10Value === "0"; } function removeDefinitelyFalsyTypes(type) { - return filterType(type, (t) => !!(getTypeFacts(t) & 4194304 /* Truthy */)); + return filterType(type, (t) => hasTypeFacts(t, 4194304 /* Truthy */)); } function extractDefinitelyFalsyTypes(type) { return mapType(type, getDefinitelyFalsyPartOfType); @@ -67597,13 +68043,7 @@ function createTypeChecker(host) { } } } - const result = createAnonymousType( - type.symbol, - members, - emptyArray, - emptyArray, - sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly)) - ); + const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly))); result.objectFlags |= getObjectFlags(type) & (4096 /* JSLiteral */ | 262144 /* NonInferrableType */); return result; } @@ -67697,7 +68137,7 @@ function createTypeChecker(host) { const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); - if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName( + if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.includes(param) && (resolveName( param, param.name.escapedText, 788968 /* Type */, @@ -67783,7 +68223,12 @@ function createTypeChecker(host) { callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i)); } if (targetRestType) { - callback(getRestTypeAtPosition(source, paramCount), targetRestType); + callback(getRestTypeAtPosition( + source, + paramCount, + /*readonly*/ + isConstTypeVariable(targetRestType) && !someType(targetRestType, isMutableArrayLikeType) + ), targetRestType); } } function applyToReturnTypes(source, target, callback) { @@ -67816,19 +68261,25 @@ function createTypeChecker(host) { return context; } function makeFixingMapperForContext(context) { - return makeDeferredTypeMapper(map(context.inferences, (i) => i.typeParameter), map(context.inferences, (inference, i) => () => { - if (!inference.isFixed) { - inferFromIntraExpressionSites(context); - clearCachedInferences(context.inferences); - inference.isFixed = true; - } - return getInferredType(context, i); - })); + return makeDeferredTypeMapper( + map(context.inferences, (i) => i.typeParameter), + map(context.inferences, (inference, i) => () => { + if (!inference.isFixed) { + inferFromIntraExpressionSites(context); + clearCachedInferences(context.inferences); + inference.isFixed = true; + } + return getInferredType(context, i); + }) + ); } function makeNonFixingMapperForContext(context) { - return makeDeferredTypeMapper(map(context.inferences, (i) => i.typeParameter), map(context.inferences, (_, i) => () => { - return getInferredType(context, i); - })); + return makeDeferredTypeMapper( + map(context.inferences, (i) => i.typeParameter), + map(context.inferences, (_, i) => () => { + return getInferredType(context, i); + }) + ); } function clearCachedInferences(inferences) { for (const inference of inferences) { @@ -67887,8 +68338,8 @@ function createTypeChecker(host) { if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) { return !!(objectFlags & 1048576 /* CouldContainTypeVariables */); } - const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables)); - if (type.flags & 138117121 /* ObjectFlagsType */) { + const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables)); + if (type.flags & 3899393 /* ObjectFlagsType */) { type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0); } return result; @@ -68085,6 +68536,9 @@ function createTypeChecker(host) { if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) { return true; } + if (target.flags & 2097152 /* Intersection */) { + return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t)); + } if (source.flags & 128 /* StringLiteral */) { const value = source.value; return !!(target.flags & 8 /* Number */ && isValidNumberString( @@ -68095,7 +68549,7 @@ function createTypeChecker(host) { value, /*roundTripOnly*/ false - ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target)); + ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target)); } if (source.flags & 134217728 /* TemplateLiteral */) { const texts = source.texts; @@ -68170,7 +68624,6 @@ function createTypeChecker(host) { let bivariant = false; let propagationType; let inferencePriority = 2048 /* MaxValue */; - let allowComplexConstraintInference = true; let visited; let sourceStack; let targetStack; @@ -68180,7 +68633,7 @@ function createTypeChecker(host) { if (!couldContainTypeVariables(target)) { return; } - if (source === wildcardType) { + if (source === wildcardType || source === blockedStringType) { const savePropagationType = propagationType; propagationType = source; inferFromTypes(target, target); @@ -68237,6 +68690,10 @@ function createTypeChecker(host) { return; } if (!inference.isFixed) { + const candidate = propagationType || source; + if (candidate === blockedStringType) { + return; + } if (inference.priority === void 0 || priority < inference.priority) { inference.candidates = void 0; inference.contraCandidates = void 0; @@ -68244,7 +68701,6 @@ function createTypeChecker(host) { inference.priority = priority; } if (priority === inference.priority) { - const candidate = propagationType || source; if (contravariant && !bivariant) { if (!contains(inference.contraCandidates, candidate)) { inference.contraCandidates = append(inference.contraCandidates, candidate); @@ -68325,8 +68781,7 @@ function createTypeChecker(host) { source = getReducedType(source); if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) { const apparentSource = getApparentType(source); - if (apparentSource !== source && allowComplexConstraintInference && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) { - allowComplexConstraintInference = false; + if (apparentSource !== source && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) { return inferFromTypes(apparentSource, target); } source = apparentSource; @@ -68575,11 +69030,7 @@ function createTypeChecker(host) { )) { allTypeFlags &= ~2112 /* BigIntLike */; } - const matchingType = reduceLeft( - constraintTypes, - (left, right) => !(right.flags & allTypeFlags) ? left : left.flags & 4 /* String */ ? left : right.flags & 4 /* String */ ? source2 : left.flags & 134217728 /* TemplateLiteral */ ? left : right.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source2, right) ? source2 : left.flags & 268435456 /* StringMapping */ ? left : right.flags & 268435456 /* StringMapping */ && str === applyStringMapping(right.symbol, str) ? source2 : left.flags & 128 /* StringLiteral */ ? left : right.flags & 128 /* StringLiteral */ && right.value === str ? right : left.flags & 8 /* Number */ ? left : right.flags & 8 /* Number */ ? getNumberLiteralType(+str) : left.flags & 32 /* Enum */ ? left : right.flags & 32 /* Enum */ ? getNumberLiteralType(+str) : left.flags & 256 /* NumberLiteral */ ? left : right.flags & 256 /* NumberLiteral */ && right.value === +str ? right : left.flags & 64 /* BigInt */ ? left : right.flags & 64 /* BigInt */ ? parseBigIntLiteralType(str) : left.flags & 2048 /* BigIntLiteral */ ? left : right.flags & 2048 /* BigIntLiteral */ && pseudoBigIntToString(right.value) === str ? right : left.flags & 16 /* Boolean */ ? left : right.flags & 16 /* Boolean */ ? str === "true" ? trueType : str === "false" ? falseType : booleanType : left.flags & 512 /* BooleanLiteral */ ? left : right.flags & 512 /* BooleanLiteral */ && right.intrinsicName === str ? right : left.flags & 32768 /* Undefined */ ? left : right.flags & 32768 /* Undefined */ && right.intrinsicName === str ? right : left.flags & 65536 /* Null */ ? left : right.flags & 65536 /* Null */ && right.intrinsicName === str ? right : left, - neverType - ); + const matchingType = reduceLeft(constraintTypes, (left, right) => !(right.flags & allTypeFlags) ? left : left.flags & 4 /* String */ ? left : right.flags & 4 /* String */ ? source2 : left.flags & 134217728 /* TemplateLiteral */ ? left : right.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source2, right) ? source2 : left.flags & 268435456 /* StringMapping */ ? left : right.flags & 268435456 /* StringMapping */ && str === applyStringMapping(right.symbol, str) ? source2 : left.flags & 128 /* StringLiteral */ ? left : right.flags & 128 /* StringLiteral */ && right.value === str ? right : left.flags & 8 /* Number */ ? left : right.flags & 8 /* Number */ ? getNumberLiteralType(+str) : left.flags & 32 /* Enum */ ? left : right.flags & 32 /* Enum */ ? getNumberLiteralType(+str) : left.flags & 256 /* NumberLiteral */ ? left : right.flags & 256 /* NumberLiteral */ && right.value === +str ? right : left.flags & 64 /* BigInt */ ? left : right.flags & 64 /* BigInt */ ? parseBigIntLiteralType(str) : left.flags & 2048 /* BigIntLiteral */ ? left : right.flags & 2048 /* BigIntLiteral */ && pseudoBigIntToString(right.value) === str ? right : left.flags & 16 /* Boolean */ ? left : right.flags & 16 /* Boolean */ ? str === "true" ? trueType : str === "false" ? falseType : booleanType : left.flags & 512 /* BooleanLiteral */ ? left : right.flags & 512 /* BooleanLiteral */ && right.intrinsicName === str ? right : left.flags & 32768 /* Undefined */ ? left : right.flags & 32768 /* Undefined */ && right.intrinsicName === str ? right : left.flags & 65536 /* Null */ ? left : right.flags & 65536 /* Null */ && right.intrinsicName === str ? right : left, neverType); if (!(matchingType.flags & 131072 /* Never */)) { inferFromTypes(matchingType, target2); continue; @@ -68625,10 +69076,7 @@ function createTypeChecker(host) { return; } const startLength = isTupleType(source) ? Math.min(source.target.fixedLength, target.target.fixedLength) : 0; - const endLength = Math.min( - isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, - target.target.hasRestElement ? getEndElementCount(target.target, 3 /* Fixed */) : 0 - ); + const endLength = Math.min(isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, target.target.hasRestElement ? getEndElementCount(target.target, 3 /* Fixed */) : 0); for (let i = 0; i < startLength; i++) { inferFromTypes(getTypeArguments(source)[i], elementTypes[i]); } @@ -68710,12 +69158,14 @@ function createTypeChecker(host) { } function inferFromSignatures(source, target, kind) { const sourceSignatures = getSignaturesOfType(source, kind); - const targetSignatures = getSignaturesOfType(target, kind); const sourceLen = sourceSignatures.length; - const targetLen = targetSignatures.length; - const len = sourceLen < targetLen ? sourceLen : targetLen; - for (let i = 0; i < len; i++) { - inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i])); + if (sourceLen > 0) { + const targetSignatures = getSignaturesOfType(target, kind); + const targetLen = targetSignatures.length; + for (let i = 0; i < targetLen; i++) { + const sourceIndex = Math.max(sourceLen - targetLen + i, 0); + inferFromSignature(getBaseSignature(sourceSignatures[sourceIndex]), getErasedSignature(targetSignatures[i])); + } } } function inferFromSignature(source, target) { @@ -68822,7 +69272,7 @@ function createTypeChecker(host) { const constraint = getConstraintOfTypeParameter(inference.typeParameter); if (constraint) { const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper); - if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { + if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } } @@ -69130,7 +69580,7 @@ function createTypeChecker(host) { function hasMatchingArgument(expression, reference) { if (expression.arguments) { for (const argument of expression.arguments) { - if (isOrContainsMatchingReference(reference, argument)) { + if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) { return true; } } @@ -69177,7 +69627,13 @@ function createTypeChecker(host) { const resolved = resolveStructuredTypeMembers(type); return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType)); } - function getTypeFacts(type) { + function getTypeFacts(type, mask2) { + return getTypeFactsWorker(type, mask2) & mask2; + } + function hasTypeFacts(type, mask2) { + return getTypeFacts(type, mask2) !== 0; + } + function getTypeFactsWorker(type, callerOnlyNeeds) { if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) { type = getBaseConstraintOfType(type) || unknownType; } @@ -69210,6 +69666,10 @@ function createTypeChecker(host) { return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */; } if (flags & 524288 /* Object */) { + const possibleFacts = strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ | 7880640 /* FunctionStrictFacts */ | 7888800 /* ObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ | 16728e3 /* FunctionFacts */ | 16736160 /* ObjectFacts */; + if ((callerOnlyNeeds & possibleFacts) === 0) { + return 0; + } return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */; } if (flags & 16384 /* Void */) { @@ -69231,20 +69691,20 @@ function createTypeChecker(host) { return 0 /* None */; } if (flags & 1048576 /* Union */) { - return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */); + return reduceLeft(type.types, (facts, t) => facts | getTypeFactsWorker(t, callerOnlyNeeds), 0 /* None */); } if (flags & 2097152 /* Intersection */) { - return getIntersectionTypeFacts(type); + return getIntersectionTypeFacts(type, callerOnlyNeeds); } return 83886079 /* UnknownFacts */; } - function getIntersectionTypeFacts(type) { + function getIntersectionTypeFacts(type, callerOnlyNeeds) { const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */); let oredFacts = 0 /* None */; let andedFacts = 134217727 /* All */; for (const t of type.types) { if (!(ignoreObjects && t.flags & 524288 /* Object */)) { - const f = getTypeFacts(t); + const f = getTypeFactsWorker(t, callerOnlyNeeds); oredFacts |= f; andedFacts &= f; } @@ -69252,19 +69712,19 @@ function createTypeChecker(host) { return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */; } function getTypeWithFacts(type, include) { - return filterType(type, (t) => (getTypeFacts(t) & include) !== 0); + return filterType(type, (t) => hasTypeFacts(t, include)); } function getAdjustedTypeWithFacts(type, facts) { const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts)); if (strictNullChecks) { switch (facts) { case 524288 /* NEUndefined */: - return mapType(reduced, (t) => getTypeFacts(t) & 65536 /* EQUndefined */ ? getIntersectionType([t, getTypeFacts(t) & 131072 /* EQNull */ && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t); + return mapType(reduced, (t) => hasTypeFacts(t, 65536 /* EQUndefined */) ? getIntersectionType([t, hasTypeFacts(t, 131072 /* EQNull */) && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t); case 1048576 /* NENull */: - return mapType(reduced, (t) => getTypeFacts(t) & 131072 /* EQNull */ ? getIntersectionType([t, getTypeFacts(t) & 65536 /* EQUndefined */ && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t); + return mapType(reduced, (t) => hasTypeFacts(t, 131072 /* EQNull */) ? getIntersectionType([t, hasTypeFacts(t, 65536 /* EQUndefined */) && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t); case 2097152 /* NEUndefinedOrNull */: case 4194304 /* Truthy */: - return mapType(reduced, (t) => getTypeFacts(t) & 262144 /* EQUndefinedOrNull */ ? getGlobalNonNullableTypeInstantiation(t) : t); + return mapType(reduced, (t) => hasTypeFacts(t, 262144 /* EQUndefinedOrNull */) ? getGlobalNonNullableTypeInstantiation(t) : t); } } return reduced; @@ -69550,7 +70010,9 @@ function createTypeChecker(host) { return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType])); } function createFinalArrayType(elementType) { - return elementType.flags & 131072 /* Never */ ? autoArrayType : createArrayType(elementType.flags & 1048576 /* Union */ ? getUnionType(elementType.types, 2 /* Subtype */) : elementType); + return elementType.flags & 131072 /* Never */ ? autoArrayType : createArrayType( + elementType.flags & 1048576 /* Union */ ? getUnionType(elementType.types, 2 /* Subtype */) : elementType + ); } function getFinalArrayType(evolvingArrayType) { return evolvingArrayType.finalArrayType || (evolvingArrayType.finalArrayType = createFinalArrayType(evolvingArrayType.elementType)); @@ -69661,7 +70123,10 @@ function createTypeChecker(host) { let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 244 /* ExpressionStatement */) { + if (isBinaryExpression(node)) { + const rightType = checkNonNullExpression(node.right); + funcType = getSymbolHasInstanceMethodOfObjectType(rightType); + } else if (node.parent.kind === 244 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ @@ -69951,7 +70416,10 @@ function createTypeChecker(host) { } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference( + node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), + reference + ); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -69970,10 +70438,11 @@ function createTypeChecker(host) { const assignedType = getWidenedLiteralType(getInitialOrAssignedType(flow)); return isTypeAssignableTo(assignedType, declaredType) ? assignedType : anyArrayType; } - if (declaredType.flags & 1048576 /* Union */) { - return getAssignmentReducedType(declaredType, getInitialOrAssignedType(flow)); + const t = isInCompoundLikeAssignment(node) ? getBaseTypeOfLiteralType(declaredType) : declaredType; + if (t.flags & 1048576 /* Union */) { + return getAssignmentReducedType(t, getInitialOrAssignedType(flow)); } - return declaredType; + return t; } if (containsMatchingReference(reference, node)) { if (!isReachableFlowNode(flow)) { @@ -70079,31 +70548,21 @@ function createTypeChecker(host) { return createFlowType(narrowedType, isIncomplete(flowType)); } function getTypeAtSwitchClause(flow) { - const expr = flow.switchStatement.expression; + const expr = skipParentheses(flow.switchStatement.expression); const flowType = getTypeAtFlowNode(flow.antecedent); let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); + } else if (expr.kind === 112 /* TrueKeyword */) { + type = narrowTypeBySwitchOnTrue(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { if (optionalChainContainsReference(expr, reference)) { - type = narrowTypeBySwitchOptionalChainContainment( - type, - flow.switchStatement, - flow.clauseStart, - flow.clauseEnd, - (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) - ); + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */))); } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { - type = narrowTypeBySwitchOptionalChainContainment( - type, - flow.switchStatement, - flow.clauseStart, - flow.clauseEnd, - (t) => !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined") - ); + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, (t) => !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined")); } } const access = getDiscriminantPropertyAccess(expr, type); @@ -70257,13 +70716,15 @@ function createTypeChecker(host) { return void 0; } function getDiscriminantPropertyAccess(expr, computedType) { - const type = declaredType.flags & 1048576 /* Union */ ? declaredType : computedType; - if (type.flags & 1048576 /* Union */) { + if (declaredType.flags & 1048576 /* Union */ || computedType.flags & 1048576 /* Union */) { const access = getCandidateDiscriminantPropertyAccess(expr); if (access) { const name = getAccessedPropertyName(access); - if (name && isDiscriminantProperty(type, name)) { - return access; + if (name) { + const type = declaredType.flags & 1048576 /* Union */ && isTypeSubsetOf(computedType, declaredType) ? declaredType : computedType; + if (isDiscriminantProperty(type, name)) { + return access; + } } } } @@ -70283,7 +70744,7 @@ function createTypeChecker(host) { propType = removeNullable && optionalChain ? getOptionalType(propType) : propType; const narrowedPropType = narrowType2(propType); return filterType(type, (t) => { - const discriminantType = getTypeOfPropertyOrIndexSignature(t, propName); + const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType; return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType); }); } @@ -70345,6 +70806,10 @@ function createTypeChecker(host) { } return type; } + function narrowTypeByBooleanComparison(type, expr, bool, operator, assumeTrue) { + assumeTrue = assumeTrue !== (bool.kind === 112 /* TrueKeyword */) !== (operator !== 38 /* ExclamationEqualsEqualsToken */ && operator !== 36 /* ExclamationEqualsToken */); + return narrowType(type, expr, assumeTrue); + } function narrowTypeByBinaryExpression(type, expr, assumeTrue) { switch (expr.operatorToken.kind) { case 64 /* EqualsToken */: @@ -70392,6 +70857,12 @@ function createTypeChecker(host) { if (isMatchingConstructorReference(right)) { return narrowTypeByConstructor(type, operator, left, assumeTrue); } + if (isBooleanLiteral(right) && !isAccessExpression(left)) { + return narrowTypeByBooleanComparison(type, left, right, operator, assumeTrue); + } + if (isBooleanLiteral(left) && !isAccessExpression(right)) { + return narrowTypeByBooleanComparison(type, right, left, operator, assumeTrue); + } break; case 104 /* InstanceOfKeyword */: return narrowTypeByInstanceof(type, expr, assumeTrue); @@ -70607,14 +71078,14 @@ function createTypeChecker(host) { // the constituent based on its type facts. We use the strict subtype relation because it treats `object` // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`, // but are classified as "function" according to `typeof`. - isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? getTypeFacts(t) & facts ? t : neverType : ( + isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? hasTypeFacts(t, facts) ? t : neverType : ( // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`. isTypeSubtypeOf(impliedType, t) ? impliedType : ( // Neither the constituent nor the implied type is a subtype of the other, however their domains may still // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate // possible overlap, we form an intersection. Otherwise, we eliminate the constituent. - getTypeFacts(t) & facts ? getIntersectionType([t, impliedType]) : neverType + hasTypeFacts(t, facts) ? getIntersectionType([t, impliedType]) : neverType ) ) )); @@ -70628,11 +71099,47 @@ function createTypeChecker(host) { const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); - return filterType(type, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts); + return filterType(type, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts); } const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd); return getUnionType(map(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType)); } + function narrowTypeBySwitchOnTrue(type, switchStatement, clauseStart, clauseEnd) { + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); + const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; + for (let i = 0; i < clauseStart; i++) { + const clause = switchStatement.caseBlock.clauses[i]; + if (clause.kind === 296 /* CaseClause */) { + type = narrowType( + type, + clause.expression, + /*assumeTrue*/ + false + ); + } + } + if (hasDefaultClause) { + for (let i = clauseEnd; i < switchStatement.caseBlock.clauses.length; i++) { + const clause = switchStatement.caseBlock.clauses[i]; + if (clause.kind === 296 /* CaseClause */) { + type = narrowType( + type, + clause.expression, + /*assumeTrue*/ + false + ); + } + } + return type; + } + const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd); + return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType( + type, + clause.expression, + /*assumeTrue*/ + true + ) : neverType)); + } function isMatchingConstructorReference(expr) { return (isPropertyAccessExpression(expr) && idText(expr.name) === "constructor" || isElementAccessExpression(expr) && isStringLiteralLike(expr.argumentExpression) && expr.argumentExpression.text === "constructor") && isMatchingReference(reference, expr.expression); } @@ -70672,7 +71179,22 @@ function createTypeChecker(host) { } return type; } - const rightType = getTypeOfExpression(expr.right); + const right = expr.right; + const rightType = getTypeOfExpression(right); + if (!isTypeDerivedFrom(rightType, globalObjectType)) { + return type; + } + const signature = getEffectsSignature(expr); + const predicate = signature && getTypePredicateOfSignature(signature); + if (predicate && predicate.kind === 1 /* Identifier */ && predicate.parameterIndex === 0) { + return getNarrowedType( + type, + predicate.type, + assumeTrue, + /*checkDerived*/ + true + ); + } if (!isTypeDerivedFrom(rightType, globalFunctionType)) { return type; } @@ -70726,7 +71248,10 @@ function createTypeChecker(host) { const narrowedType = mapType(candidate, (c) => { const discriminant = keyPropertyName && getTypeOfPropertyOfType(c, keyPropertyName); const matching = discriminant && getConstituentTypeForKeyType(type, discriminant); - const directlyRelated = mapType(matching || type, checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType); + const directlyRelated = mapType( + matching || type, + checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType + ); return directlyRelated.flags & 131072 /* Never */ ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : directlyRelated; }); return !(narrowedType.flags & 131072 /* Never */) ? narrowedType : isTypeSubtypeOf(candidate, type) ? candidate : isTypeAssignableTo(type, candidate) ? type : isTypeAssignableTo(candidate, type) ? candidate : getIntersectionType([type, candidate]); @@ -70763,7 +71288,7 @@ function createTypeChecker(host) { false ); } - if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) { + if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) { type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); } const access = getDiscriminantPropertyAccess(predicateArgument, type); @@ -70836,7 +71361,15 @@ function createTypeChecker(host) { location = location.parent; } if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { - const type = removeOptionalTypeMarker(getTypeOfExpression(location)); + const type = removeOptionalTypeMarker( + isWriteAccess(location) && location.kind === 211 /* PropertyAccessExpression */ ? checkPropertyAccessExpression( + location, + /*checkMode*/ + void 0, + /*writeOnly*/ + true + ) : getTypeOfExpression(location) + ); if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { return type; } @@ -70845,7 +71378,7 @@ function createTypeChecker(host) { if (isDeclarationName(location) && isSetAccessor(location.parent) && getAnnotatedAccessorTypeNode(location.parent)) { return getWriteTypeOfAccessors(location.parent.symbol); } - return getNonMissingTypeOfSymbol(symbol); + return isRightSideOfAccessExpression(location) && isWriteAccess(location.parent) ? getWriteTypeOfSymbol(symbol) : getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */); @@ -70889,7 +71422,7 @@ function createTypeChecker(host) { reportCircularityError(declaration.symbol); return true; } - const containsUndefined = !!(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */); + const containsUndefined = !!hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */); if (!popTypeResolution()) { reportCircularityError(declaration.symbol); return true; @@ -70899,7 +71432,7 @@ function createTypeChecker(host) { return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && hasTypeFacts(declaredType, 16777216 /* IsUndefined */) && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { @@ -70913,7 +71446,7 @@ function createTypeChecker(host) { return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithoutNullableConstraint) : !!(type.flags & 465829888 /* Instantiable */ && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304 /* Nullable */)); } function hasContextualTypeWithNoGenericTypes(node, checkMode) { - const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 64 /* RestBindingElement */ ? getContextualType2(node, 8 /* SkipBindingPatterns */) : getContextualType2( + const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 32 /* RestBindingElement */ ? getContextualType2(node, 8 /* SkipBindingPatterns */) : getContextualType2( node, /*contextFlags*/ void 0 @@ -70989,7 +71522,12 @@ function createTypeChecker(host) { if (narrowedType.flags & 131072 /* Never */) { return neverType; } - return getBindingElementTypeFromParentType(declaration, narrowedType); + return getBindingElementTypeFromParentType( + declaration, + narrowedType, + /*noTupleBoundsCheck*/ + true + ); } } } @@ -71035,7 +71573,7 @@ function createTypeChecker(host) { if (languageVersion < 2 /* ES2015 */) { if (container.kind === 219 /* ArrowFunction */) { error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); - } else if (hasSyntacticModifier(container, 512 /* Async */)) { + } else if (hasSyntacticModifier(container, 1024 /* Async */)) { error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); } } @@ -71097,7 +71635,7 @@ function createTypeChecker(host) { const isAlias = localOrExportSymbol.flags & 2097152 /* Alias */; if (localOrExportSymbol.flags & 3 /* Variable */) { if (assignmentKind === 1 /* Definite */) { - return type; + return isInCompoundLikeAssignment(node) ? getBaseTypeOfLiteralType(type) : type; } } else if (isAlias) { declaration = getDeclarationOfAliasSymbol(symbol); @@ -71448,7 +71986,7 @@ function createTypeChecker(host) { let inAsyncFunction = false; if (!isCallExpression2) { while (container && container.kind === 219 /* ArrowFunction */) { - if (hasSyntacticModifier(container, 512 /* Async */)) + if (hasSyntacticModifier(container, 1024 /* Async */)) inAsyncFunction = true; container = getSuperContainer( container, @@ -71457,7 +71995,7 @@ function createTypeChecker(host) { ); needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */; } - if (container && hasSyntacticModifier(container, 512 /* Async */)) + if (container && hasSyntacticModifier(container, 1024 /* Async */)) inAsyncFunction = true; } let nodeCheckFlag = 0; @@ -71513,6 +72051,9 @@ function createTypeChecker(host) { error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); return errorType; } + if (classDeclarationExtendsNull(classLikeDeclaration)) { + return isCallExpression2 ? errorType : nullWideningType; + } const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration)); const baseClassType = classType && getBaseTypes(classType)[0]; if (!baseClassType) { @@ -71597,7 +72138,7 @@ function createTypeChecker(host) { return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */) { + if (isAssignmentExpression(parent2)) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -71665,7 +72206,7 @@ function createTypeChecker(host) { function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; if (parent2.name.kind === 207 /* ArrayBindingPattern */) { @@ -71786,7 +72327,24 @@ function createTypeChecker(host) { } const signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); if (signature && !isResolvingReturnTypeOfSignature(signature)) { - return getReturnTypeOfSignature(signature); + const returnType2 = getReturnTypeOfSignature(signature); + const functionFlags = getFunctionFlags(functionDecl); + if (functionFlags & 1 /* Generator */) { + return filterType(returnType2, (t) => { + return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || checkGeneratorInstantiationAssignabilityToReturnType( + t, + functionFlags, + /*errorNode*/ + void 0 + ); + }); + } + if (functionFlags & 2 /* Async */) { + return filterType(returnType2, (t) => { + return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || !!getAwaitedTypeOfPromise(t); + }); + } + return returnType2; } const iife = getImmediatelyInvokedFunctionExpression(functionDecl); if (iife) { @@ -72009,7 +72567,7 @@ function createTypeChecker(host) { } else if (t.flags & 3670016 /* StructuredType */) { const prop = getPropertyOfType(t, name); if (prop) { - return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop); + return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop && prop.flags & 16777216 /* Optional */)); } if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) { const restType = getElementTypeOfSliceOfTupleType( @@ -72094,7 +72652,7 @@ function createTypeChecker(host) { (t) => { if (isTupleType(t)) { if ((firstSpreadIndex === void 0 || index < firstSpreadIndex) && index < t.target.fixedLength) { - return getTypeArguments(t)[index]; + return removeMissingType(getTypeArguments(t)[index], !!(t.target.elementFlags[index] && 2 /* Optional */)); } const offset = length2 !== void 0 && (lastSpreadIndex === void 0 || index > lastSpreadIndex) ? length2 - index : 0; const fixedEndLength = offset > 0 && t.target.hasRestElement ? getEndElementCount(t.target, 3 /* Fixed */) : 0; @@ -72192,8 +72750,19 @@ function createTypeChecker(host) { contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 303 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), - (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] + filter(node.properties, (p) => { + if (!p.symbol) { + return false; + } + if (p.kind === 303 /* PropertyAssignment */) { + return isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); + } + if (p.kind === 304 /* ShorthandPropertyAssignment */) { + return isDiscriminantProperty(contextualType, p.symbol.escapedName); + } + return false; + }), + (prop) => [() => getContextFreeTypeOfExpression(prop.kind === 303 /* PropertyAssignment */ ? prop.initializer : prop.name), prop.symbol.escapedName] ), map( filter(getPropertiesOfType(contextualType), (s) => { @@ -72741,10 +73310,13 @@ function createTypeChecker(host) { elementTypes, elementFlags, /*readonly*/ - inConstContext + inConstContext && !(contextualType && someType(contextualType, isMutableArrayLikeType)) )); } - return createArrayLiteralType(createArrayType(elementTypes.length ? getUnionType(sameMap(elementTypes, (t, i) => elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessTypeOrUndefined(t, numberType) || anyType : t), 2 /* Subtype */) : strictNullChecks ? implicitNeverType : undefinedWideningType, inConstContext)); + return createArrayLiteralType(createArrayType( + elementTypes.length ? getUnionType(sameMap(elementTypes, (t, i) => elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessTypeOrUndefined(t, numberType) || anyType : t), 2 /* Subtype */) : strictNullChecks ? implicitNeverType : undefinedWideningType, + inConstContext + )); } function createArrayLiteralType(type) { if (!(getObjectFlags(type) & 4 /* Reference */)) { @@ -72897,12 +73469,7 @@ function createTypeChecker(host) { if (impliedProp) { prop.flags |= impliedProp.flags & 16777216 /* Optional */; } else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, stringType)) { - error2( - memberDecl.name, - Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, - symbolToString(member), - typeToString(contextualType) - ); + error2(memberDecl.name, Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType)); } } prop.declarations = member.declarations; @@ -72972,22 +73539,13 @@ function createTypeChecker(host) { } popContextualType(); if (contextualTypeHasPattern) { - const rootPatternParent = findAncestor( - contextualType.pattern.parent, - (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */ - ); - const spreadOrOutsideRootObject = findAncestor( - node, - (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */ - ); + const rootPatternParent = findAncestor(contextualType.pattern.parent, (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */); + const spreadOrOutsideRootObject = findAncestor(node, (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */); if (spreadOrOutsideRootObject.kind !== 305 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { - error2( - prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), - Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value - ); + error2(prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } propertiesTable.set(prop.escapedName, prop); propertiesArray.push(prop); @@ -73059,13 +73617,16 @@ function createTypeChecker(host) { checkJsxOpeningLikeElementOrOpeningFragment(node.openingFragment); const nodeSourceFile = getSourceFileOfNode(node); if (getJSXTransformEnabled(compilerOptions) && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has("jsx")) && !compilerOptions.jsxFragmentFactory && !nodeSourceFile.pragmas.has("jsxfrag")) { - error2(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); + error2( + node, + compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments + ); } checkJsxChildren(node); return getJsxElementTypeAt(node) || anyType; } function isHyphenatedJsxName(name) { - return stringContains(name, "-"); + return name.includes("-"); } function isJsxIntrinsicTagName(tagName) { return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName); @@ -73162,7 +73723,7 @@ function createTypeChecker(host) { } } const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0; - if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { + if (parent2 && parent2.openingElement === openingLikeElement && getSemanticJsxChildren(parent2.children).length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { if (explicitlySpecifyChildrenAttribute) { @@ -73255,13 +73816,18 @@ function createTypeChecker(host) { if (!isErrorType(intrinsicElementsType)) { if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName)) return Debug.fail(); - const intrinsicProp = getPropertyOfType(intrinsicElementsType, isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText); + const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; + const intrinsicProp = getPropertyOfType(intrinsicElementsType, propName); if (intrinsicProp) { links.jsxFlags |= 1 /* IntrinsicNamedElement */; return links.resolvedSymbol = intrinsicProp; } - const indexSignatureType = getIndexTypeOfType(intrinsicElementsType, stringType); - if (indexSignatureType) { + const indexSymbol = getApplicableIndexSymbol(intrinsicElementsType, getStringLiteralType(unescapeLeadingUnderscores(propName))); + if (indexSymbol) { + links.jsxFlags |= 2 /* IntrinsicIndexedElement */; + return links.resolvedSymbol = indexSymbol; + } + if (getTypeOfPropertyOrIndexSignatureOfType(intrinsicElementsType, propName)) { links.jsxFlags |= 2 /* IntrinsicIndexedElement */; return links.resolvedSymbol = intrinsicElementsType.symbol; } @@ -73439,6 +74005,7 @@ function createTypeChecker(host) { } } function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) { + var _a; Debug.assert(isJsxIntrinsicTagName(node.tagName)); const links = getNodeLinks(node); if (!links.resolvedJsxElementAttributesType) { @@ -73446,7 +74013,8 @@ function createTypeChecker(host) { if (links.jsxFlags & 1 /* IntrinsicNamedElement */) { return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol) || errorType; } else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) { - return links.resolvedJsxElementAttributesType = getIndexTypeOfType(getJsxType(JsxNames.IntrinsicElements, node), stringType) || errorType; + const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; + return links.resolvedJsxElementAttributesType = ((_a = getApplicableIndexInfoForName(getJsxType(JsxNames.IntrinsicElements, node), propName)) == null ? void 0 : _a.type) || errorType; } else { return links.resolvedJsxElementAttributesType = errorType; } @@ -73621,6 +74189,7 @@ function createTypeChecker(host) { return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { + var _a; const flags = getDeclarationModifierFlagsFromSymbol(prop, writing); if (isSuper) { if (languageVersion < 2 /* ES2015 */) { @@ -73631,45 +74200,36 @@ function createTypeChecker(host) { return false; } } - if (flags & 256 /* Abstract */) { + if (flags & 64 /* Abstract */) { if (errorNode) { - error2( - errorNode, - Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, - symbolToString(prop), - typeToString(getDeclaringClass(prop)) - ); + error2(errorNode, Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop))); + } + return false; + } + if (!(flags & 256 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(isClassInstanceProperty))) { + if (errorNode) { + error2(errorNode, Diagnostics.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, symbolToString(prop)); } return false; } } - if (flags & 256 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) { + if (flags & 64 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) { const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) { if (errorNode) { - error2( - errorNode, - Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, - symbolToString(prop), - getTextOfIdentifierOrLiteral(declaringClassDeclaration.name) - ); + error2(errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), getTextOfIdentifierOrLiteral(declaringClassDeclaration.name)); } return false; } } - if (!(flags & 24 /* NonPublicAccessibilityModifier */)) { + if (!(flags & 6 /* NonPublicAccessibilityModifier */)) { return true; } - if (flags & 8 /* Private */) { + if (flags & 2 /* Private */) { const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (!isNodeWithinClass(location, declaringClassDeclaration)) { if (errorNode) { - error2( - errorNode, - Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, - symbolToString(prop), - typeToString(getDeclaringClass(prop)) - ); + error2(errorNode, Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop))); } return false; } @@ -73685,19 +74245,14 @@ function createTypeChecker(host) { if (!enclosingClass) { enclosingClass = getEnclosingClassFromThisParameter(location); enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing); - if (flags & 32 /* Static */ || !enclosingClass) { + if (flags & 256 /* Static */ || !enclosingClass) { if (errorNode) { - error2( - errorNode, - Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, - symbolToString(prop), - typeToString(getDeclaringClass(prop) || containingType) - ); + error2(errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || containingType)); } return false; } } - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return true; } if (containingType.flags & 262144 /* TypeParameter */) { @@ -73705,13 +74260,7 @@ function createTypeChecker(host) { } if (!containingType || !hasBaseType(containingType, enclosingClass)) { if (errorNode) { - error2( - errorNode, - Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, - symbolToString(prop), - typeToString(enclosingClass), - typeToString(containingType) - ); + error2(errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, symbolToString(prop), typeToString(enclosingClass), typeToString(containingType)); } return false; } @@ -73745,7 +74294,7 @@ function createTypeChecker(host) { return checkNonNullType(checkExpression(node), node); } function isNullableType(type) { - return !!(getTypeFacts(type) & 50331648 /* IsUndefinedOrNull */); + return hasTypeFacts(type, 50331648 /* IsUndefinedOrNull */); } function getNonNullableTypeIfNeeded(type) { return isNullableType(type) ? getNonNullableType(type) : type; @@ -73791,7 +74340,7 @@ function createTypeChecker(host) { error2(node, Diagnostics.Object_is_of_type_unknown); return errorType; } - const facts = getTypeFacts(type); + const facts = getTypeFacts(type, 50331648 /* IsUndefinedOrNull */); if (facts & 50331648 /* IsUndefinedOrNull */) { reportError(node, facts); const t = getNonNullableType(type); @@ -74006,7 +74555,7 @@ function createTypeChecker(host) { apparentType, right.escapedText, /*skipObjectFunctionPropertyAugment*/ - false, + isConstEnumObjectType(apparentType), /*includeTypeOnlyMembers*/ node.kind === 166 /* QualifiedName */ ); @@ -74068,11 +74617,17 @@ function createTypeChecker(host) { return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode); } function isUncheckedJSSuggestion(node, suggestion, excludeClasses) { + var _a; const file = getSourceFileOfNode(node); if (file) { if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) { const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode); - return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */); + const suggestionHasNoExtendsOrDecorators = !(suggestion == null ? void 0 : suggestion.valueDeclaration) || !isClassLike(suggestion.valueDeclaration) || ((_a = suggestion.valueDeclaration.heritageClauses) == null ? void 0 : _a.length) || classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + suggestion.valueDeclaration + ); + return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */ && suggestionHasNoExtendsOrDecorators) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */ && suggestionHasNoExtendsOrDecorators); } } return false; @@ -74117,16 +74672,13 @@ function createTypeChecker(host) { } let diagnosticMessage; const declarationName = idText(right); - if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { + if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 256 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error2(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error2(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { - addRelatedInfo( - diagnosticMessage, - createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName) - ); + addRelatedInfo(diagnosticMessage, createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName)); } } function isInPropertyInitializerOrClassStaticBlock(node) { @@ -74374,7 +74926,7 @@ function createTypeChecker(host) { if (!valueDeclaration) { return; } - const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 8 /* Private */); + const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 2 /* Private */); const hasPrivateIdentifier = prop.valueDeclaration && isNamedDeclaration(prop.valueDeclaration) && isPrivateIdentifier(prop.valueDeclaration.name); if (!hasPrivateModifier && !hasPrivateIdentifier) { return; @@ -74517,7 +75069,9 @@ function createTypeChecker(host) { checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 170 /* Decorator */) { + } else if (isBinaryExpression(node)) { + checkExpression(node.left); + } else if (isCallOrNewExpression(node)) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -74590,6 +75144,8 @@ function createTypeChecker(host) { } } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); + } else if (node.kind === 226 /* BinaryExpression */) { + argCount = 1; } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; if (callIsIncomplete) { @@ -74689,13 +75245,13 @@ function createTypeChecker(host) { return voidType; } const thisArgumentType = checkExpression(thisArgumentNode); - return isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType; + return isRightSideOfInstanceofExpression(thisArgumentNode) ? thisArgumentType : isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType; } function inferTypeArguments(node, signature, args, checkMode, context) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 170 /* Decorator */) { + if (node.kind !== 170 /* Decorator */ && node.kind !== 226 /* BinaryExpression */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -74790,9 +75346,11 @@ function createTypeChecker(host) { } if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); + } else { + names.push(void 0); } } - return createTupleType(types, flags, inConstContext, length(names) === length(types) ? names : void 0); + return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names); } function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) { const isJavascript = isInJSFile(signature.declaration); @@ -75024,6 +75582,9 @@ function createTypeChecker(host) { } } function getThisArgumentOfCall(node) { + if (node.kind === 226 /* BinaryExpression */) { + return node.right; + } const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0; if (expression) { const callee = skipOuterExpressions(expression); @@ -75052,6 +75613,9 @@ function createTypeChecker(host) { if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } + if (node.kind === 226 /* BinaryExpression */) { + return [node.left]; + } if (isJsxOpeningLikeElement(node)) { return node.attributes.properties.length > 0 || isJsxOpeningElement(node) && node.parent.children.length > 0 ? [node.attributes] : emptyArray; } @@ -75066,12 +75630,7 @@ function createTypeChecker(host) { forEach(getElementTypes(spreadType), (t, i2) => { var _a; const flags = spreadType.target.elementFlags[i2]; - const syntheticArg = createSyntheticExpression( - arg, - flags & 4 /* Rest */ ? createArrayType(t) : t, - !!(flags & 12 /* Variable */), - (_a = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a[i2] - ); + const syntheticArg = createSyntheticExpression(arg, flags & 4 /* Rest */ ? createArrayType(t) : t, !!(flags & 12 /* Variable */), (_a = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a[i2]); effectiveArgs.push(syntheticArg); }); } else { @@ -75326,9 +75885,10 @@ function createTypeChecker(host) { const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); + const isInstanceof = node.kind === 226 /* BinaryExpression */; const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; - if (!isDecorator2 && !isSuperCall(node)) { + if (!isDecorator2 && !isInstanceof && !isSuperCall(node)) { typeArguments = node.typeArguments; if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 108 /* SuperKeyword */) { forEach(typeArguments, checkSourceElement); @@ -75357,6 +75917,9 @@ function createTypeChecker(host) { result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode); getNodeLinks(node).resolvedSignature = result; if (reportErrors2) { + if (!headMessage && isInstanceof) { + headMessage = Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method; + } if (candidatesForArgumentError) { if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) { const last2 = candidatesForArgumentError[candidatesForArgumentError.length - 1]; @@ -75808,7 +76371,7 @@ function createTypeChecker(host) { return resolveErrorCall(node); } const valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol); - if (valueDecl && hasSyntacticModifier(valueDecl, 256 /* Abstract */)) { + if (valueDecl && hasSyntacticModifier(valueDecl, 64 /* Abstract */)) { error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } @@ -75871,7 +76434,7 @@ function createTypeChecker(host) { return true; } const declaration = signature.declaration; - const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); + const modifiers = getSelectedEffectiveModifierFlags(declaration, 6 /* NonPublicAccessibilityModifier */); if (!modifiers || declaration.kind !== 176 /* Constructor */) { return true; } @@ -75879,16 +76442,16 @@ function createTypeChecker(host) { const declaringClass = getDeclaredTypeOfSymbol(declaration.parent.symbol); if (!isNodeWithinClass(node, declaringClassDeclaration)) { const containingClass = getContainingClass(node); - if (containingClass && modifiers & 16 /* Protected */) { + if (containingClass && modifiers & 4 /* Protected */) { const containingType = getTypeOfNode(containingClass); if (typeHasProtectedAccessibleBase(declaration.parent.symbol, containingType)) { return true; } } - if (modifiers & 8 /* Private */) { + if (modifiers & 2 /* Private */) { error2(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } - if (modifiers & 16 /* Protected */) { + if (modifiers & 4 /* Protected */) { error2(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } return false; @@ -75989,10 +76552,7 @@ function createTypeChecker(host) { const sigs = getSignaturesOfType(getTypeOfSymbol(getSymbolLinks(apparentType.symbol).target), kind); if (!sigs || !sigs.length) return; - addRelatedInfo( - diagnostic, - createDiagnosticForNode(importNode, Diagnostics.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) - ); + addRelatedInfo(diagnostic, createDiagnosticForNode(importNode, Diagnostics.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)); } } function resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode) { @@ -76146,6 +76706,30 @@ function createTypeChecker(host) { } return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); } + function resolveInstanceofExpression(node, candidatesOutArray, checkMode) { + const rightType = checkExpression(node.right); + if (!isTypeAny(rightType)) { + const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(rightType); + if (hasInstanceMethodType) { + const apparentType = getApparentType(hasInstanceMethodType); + if (isErrorType(apparentType)) { + return resolveErrorCall(node); + } + const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); + const constructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */); + if (isUntypedFunctionCall(hasInstanceMethodType, apparentType, callSignatures.length, constructSignatures.length)) { + return resolveUntypedCall(node); + } + if (callSignatures.length) { + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); + } + } else if (!(typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { + error2(node.right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method); + return resolveErrorCall(node); + } + } + return anySignature; + } function isPotentiallyUncalledDecorator(decorator, signatures) { return signatures.length && every(signatures, (signature) => signature.minArgumentCount === 0 && !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature)); } @@ -76162,6 +76746,8 @@ function createTypeChecker(host) { case 286 /* JsxOpeningElement */: case 285 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); + case 226 /* BinaryExpression */: + return resolveInstanceofExpression(node, candidatesOutArray, checkMode); } Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); } @@ -76619,12 +77205,7 @@ function createTypeChecker(host) { addLazyDiagnostic(() => { const widenedType = getWidenedType(exprType); if (!isTypeComparableTo(targetType, widenedType)) { - checkTypeComparableTo( - exprType, - targetType, - errNode, - 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 - ); + checkTypeComparableTo(exprType, targetType, errNode, 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); } }); } @@ -76781,14 +77362,14 @@ function createTypeChecker(host) { return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType; } function getTypeOfParameter(symbol) { - const type = getTypeOfSymbol(symbol); - if (strictNullChecks) { - const declaration = symbol.valueDeclaration; - if (declaration && hasInitializer(declaration)) { - return getOptionalType(type); - } - } - return type; + const declaration = symbol.valueDeclaration; + return addOptionality( + getTypeOfSymbol(symbol), + /*isProperty*/ + false, + /*isOptional*/ + !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration)) + ); } function getTupleElementLabel(d, index, restParameterName = "arg") { if (!d) { @@ -76886,7 +77467,7 @@ function createTypeChecker(host) { } return void 0; } - function getRestTypeAtPosition(source, pos) { + function getRestTypeAtPosition(source, pos, readonly) { const parameterCount = getParameterCount(source); const minArgumentCount = getMinArgumentCount(source); const restType = getEffectiveRestType(source); @@ -76904,18 +77485,9 @@ function createTypeChecker(host) { types.push(restType); flags.push(8 /* Variadic */); } - const name = getNameableDeclarationAtPosition(source, i); - if (name) { - names.push(name); - } + names.push(getNameableDeclarationAtPosition(source, i)); } - return createTupleType( - types, - flags, - /*readonly*/ - false, - length(names) === length(types) ? names : void 0 - ); + return createTupleType(types, flags, readonly, names); } function getParameterCount(signature) { const length2 = signature.parameters.length; @@ -76995,11 +77567,16 @@ function createTypeChecker(host) { const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (let i = 0; i < len; i++) { const declaration = signature.parameters[i].valueDeclaration; - if (declaration.type) { - const typeNode = getEffectiveTypeAnnotationNode(declaration); - if (typeNode) { - inferTypes(inferenceContext.inferences, getTypeFromTypeNode(typeNode), getTypeAtPosition(context, i)); - } + const typeNode = getEffectiveTypeAnnotationNode(declaration); + if (typeNode) { + const source = addOptionality( + getTypeFromTypeNode(typeNode), + /*isProperty*/ + false, + isOptionalDeclaration(declaration) + ); + const target = getTypeAtPosition(context, i); + inferTypes(inferenceContext.inferences, source, target); } } } @@ -77048,29 +77625,40 @@ function createTypeChecker(host) { assignParameterType(parameter); } } - function assignParameterType(parameter, type) { + function assignParameterType(parameter, contextualType) { const links = getSymbolLinks(parameter); if (!links.type) { const declaration = parameter.valueDeclaration; - links.type = type || (declaration ? getWidenedTypeForVariableLikeDeclaration( - declaration, - /*reportErrors*/ - true - ) : getTypeOfSymbol(parameter)); + links.type = addOptionality( + contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration( + declaration, + /*reportErrors*/ + true + ) : getTypeOfSymbol(parameter)), + /*isProperty*/ + false, + /*isOptional*/ + !!declaration && !declaration.initializer && isOptionalDeclaration(declaration) + ); if (declaration && declaration.name.kind !== 80 /* Identifier */) { if (links.type === unknownType) { links.type = getTypeFromBindingPattern(declaration.name); } assignBindingElementTypes(declaration.name, links.type); } - } else if (type) { - Debug.assertEqual(links.type, type, "Parameter symbol already has a cached type which differs from newly assigned type"); + } else if (contextualType) { + Debug.assertEqual(links.type, contextualType, "Parameter symbol already has a cached type which differs from newly assigned type"); } } function assignBindingElementTypes(pattern, parentType) { for (const element of pattern.elements) { if (!isOmittedExpression(element)) { - const type = getBindingElementTypeFromParentType(element, parentType); + const type = getBindingElementTypeFromParentType( + element, + parentType, + /*noTupleBoundsCheck*/ + false + ); if (element.name.kind === 80 /* Identifier */) { getSymbolLinks(getSymbolOfDeclaration(element)).type = type; } else { @@ -77341,13 +77929,19 @@ function createTypeChecker(host) { function createPromiseReturnType(func, promisedType) { const promiseType = createPromiseType(promisedType); if (promiseType === unknownType) { - error2(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); + error2( + func, + isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option + ); return errorType; } else if (!getGlobalPromiseConstructorSymbol( /*reportErrors*/ true )) { - error2(func, isImportCall(func) ? Diagnostics.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 : 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); + error2( + func, + isImportCall(func) ? Diagnostics.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 : 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 + ); } return promiseType; } @@ -77530,7 +78124,11 @@ function createTypeChecker(host) { function getYieldedTypeOfYieldExpression(node, expressionType, sentType, isAsync) { const errorNode = node.expression || node; const yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, expressionType, sentType, errorNode) : expressionType; - return !isAsync ? yieldedType : getAwaitedType(yieldedType, errorNode, node.asteriskToken ? Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); + return !isAsync ? yieldedType : getAwaitedType( + yieldedType, + errorNode, + node.asteriskToken ? Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ); } function getNotEqualFactsFromTypeofSwitch(start2, end, witnesses) { let facts = 0 /* None */; @@ -77564,7 +78162,7 @@ function createTypeChecker(host) { if (operandConstraint.flags & 3 /* AnyOrUnknown */) { return (556800 /* AllTypeofNE */ & notEqualFacts) === 556800 /* AllTypeofNE */; } - return !someType(operandConstraint, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts); + return !someType(operandConstraint, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts); } const type = checkExpressionCached(node.expression); if (!isLiteralType(type)) { @@ -77585,8 +78183,20 @@ function createTypeChecker(host) { let hasReturnWithNoExpression = functionHasImplicitReturn(func); let hasReturnOfTypeNever = false; forEachReturnStatement(func.body, (returnStatement) => { - const expr = returnStatement.expression; + let expr = returnStatement.expression; if (expr) { + expr = skipParentheses( + expr, + /*excludeJSDocTypeAssertions*/ + true + ); + if (functionFlags & 2 /* Async */ && expr.kind === 223 /* AwaitExpression */) { + expr = skipParentheses( + expr.expression, + /*excludeJSDocTypeAssertions*/ + true + ); + } if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { hasReturnOfTypeNever = true; return; @@ -77818,7 +78428,7 @@ function createTypeChecker(host) { return !setProp; } function isReadonlySymbol(symbol) { - return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); + return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 8 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); } function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) { var _a, _b; @@ -77882,14 +78492,15 @@ function createTypeChecker(host) { if (symbol) { if (isReadonlySymbol(symbol)) { error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); + } else { + checkDeleteExpressionMustBeOptional(expr, symbol); } - checkDeleteExpressionMustBeOptional(expr, symbol); } return booleanType; } function checkDeleteExpressionMustBeOptional(expr, symbol) { const type = getTypeOfSymbol(symbol); - if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : getTypeFacts(type) & 16777216 /* IsUndefined */)) { + if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : hasTypeFacts(type, 16777216 /* IsUndefined */))) { error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); } } @@ -77898,7 +78509,7 @@ function createTypeChecker(host) { return typeofType; } function checkVoidExpression(node) { - checkExpression(node.expression); + checkNodeDeferred(node); return undefinedWideningType; } function checkAwaitGrammar(node) { @@ -78024,15 +78635,11 @@ function createTypeChecker(host) { return getUnaryResultType(operandType); case 54 /* ExclamationToken */: checkTruthinessOfType(operandType, node.operand); - const facts = getTypeFacts(operandType) & (4194304 /* Truthy */ | 8388608 /* Falsy */); + const facts = getTypeFacts(operandType, 4194304 /* Truthy */ | 8388608 /* Falsy */); return facts === 4194304 /* Truthy */ ? falseType : facts === 8388608 /* Falsy */ ? trueType : booleanType; case 46 /* PlusPlusToken */: case 47 /* MinusMinusToken */: - const ok = checkArithmeticOperandType( - node.operand, - checkNonNullType(operandType, node.operand), - Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type - ); + const ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type); if (ok) { checkReferenceExpression( node.operand, @@ -78108,16 +78715,35 @@ function createTypeChecker(host) { function isConstEnumSymbol(symbol) { return (symbol.flags & 128 /* ConstEnum */) !== 0; } - function checkInstanceOfExpression(left, right, leftType, rightType) { + function getSymbolHasInstanceMethodOfObjectType(type) { + const hasInstancePropertyName = getPropertyNameForKnownSymbolName("hasInstance"); + const hasInstanceProperty = getPropertyOfObjectType(type, hasInstancePropertyName); + if (hasInstanceProperty) { + const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty); + if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) { + return hasInstancePropertyType; + } + } + } + function checkInstanceOfExpression(left, right, leftType, rightType, checkMode) { if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { error2(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } - if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error2(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); + Debug.assert(isInstanceOfExpression(left.parent)); + const signature = getResolvedSignature( + left.parent, + /*candidatesOutArray*/ + void 0, + checkMode + ); + if (signature === resolvingSignature) { + return silentNeverType; } + const returnType = getReturnTypeOfSignature(signature); + checkTypeAssignableTo(returnType, booleanType, right, Diagnostics.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression); return booleanType; } function hasEmptyObjectIntersection(type) { @@ -78259,7 +78885,7 @@ function createTypeChecker(host) { if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { - if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { + if (strictNullChecks && !hasTypeFacts(checkExpression(prop.objectAssignmentInitializer), 16777216 /* IsUndefined */)) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode); @@ -78625,7 +79251,9 @@ function createTypeChecker(host) { } if (!resultType) { const closeEnoughKind = 296 /* NumberLike */ | 2112 /* BigIntLike */ | 402653316 /* StringLike */ | 3 /* AnyOrUnknown */; - reportOperatorError((left2, right2) => isTypeAssignableToKind(left2, closeEnoughKind) && isTypeAssignableToKind(right2, closeEnoughKind)); + reportOperatorError( + (left2, right2) => isTypeAssignableToKind(left2, closeEnoughKind) && isTypeAssignableToKind(right2, closeEnoughKind) + ); return anyType; } if (operator === 65 /* PlusEqualsToken */) { @@ -78653,7 +79281,7 @@ function createTypeChecker(host) { case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - if (!(checkMode && checkMode & 128 /* TypeOnly */)) { + if (!(checkMode && checkMode & 64 /* TypeOnly */)) { if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or != (!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) { const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; @@ -78664,12 +79292,12 @@ function createTypeChecker(host) { } return booleanType; case 104 /* InstanceOfKeyword */: - return checkInstanceOfExpression(left, right, leftType, rightType); + return checkInstanceOfExpression(left, right, leftType, rightType, checkMode); case 103 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); case 56 /* AmpersandAmpersandToken */: case 77 /* AmpersandAmpersandEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 4194304 /* Truthy */ ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType; + const resultType2 = hasTypeFacts(leftType, 4194304 /* Truthy */) ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType; if (operator === 77 /* AmpersandAmpersandEqualsToken */) { checkAssignmentOperator(rightType); } @@ -78677,7 +79305,7 @@ function createTypeChecker(host) { } case 57 /* BarBarToken */: case 76 /* BarBarEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 8388608 /* Falsy */ ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType; + const resultType2 = hasTypeFacts(leftType, 8388608 /* Falsy */) ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType; if (operator === 76 /* BarBarEqualsToken */) { checkAssignmentOperator(rightType); } @@ -78685,7 +79313,7 @@ function createTypeChecker(host) { } case 61 /* QuestionQuestionToken */: case 78 /* QuestionQuestionEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 262144 /* EQUndefinedOrNull */ ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType; + const resultType2 = hasTypeFacts(leftType, 262144 /* EQUndefinedOrNull */) ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType; if (operator === 78 /* QuestionQuestionEqualsToken */) { checkAssignmentOperator(rightType); } @@ -78789,11 +79417,7 @@ function createTypeChecker(host) { true ); } - if (checkReferenceExpression( - left, - Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, - Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access - )) { + if (checkReferenceExpression(left, Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)) { let headMessage; if (exactOptionalPropertyTypes && isPropertyAccessExpression(left) && maybeTypeOfKind(valueType, 32768 /* Undefined */)) { const target = getTypeOfPropertyOfType(getTypeOfExpression(left.expression), left.name.escapedText); @@ -78875,21 +79499,13 @@ function createTypeChecker(host) { const isLeftNaN = isGlobalNaN(skipParentheses(left2)); const isRightNaN = isGlobalNaN(skipParentheses(right2)); if (isLeftNaN || isRightNaN) { - const err = error2( - errorNode2, - Diagnostics.This_condition_will_always_return_0, - tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */) - ); + const err = error2(errorNode2, Diagnostics.This_condition_will_always_return_0, tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */)); if (isLeftNaN && isRightNaN) return; const operatorString = operator2 === 38 /* ExclamationEqualsEqualsToken */ || operator2 === 36 /* ExclamationEqualsToken */ ? tokenToString(54 /* ExclamationToken */) : ""; const location = isLeftNaN ? right2 : left2; const expression = skipParentheses(location); - addRelatedInfo(err, createDiagnosticForNode( - location, - Diagnostics.Did_you_mean_0, - `${operatorString}Number.isNaN(${isEntityNameExpression(expression) ? entityNameToString(expression) : "..."})` - )); + addRelatedInfo(err, createDiagnosticForNode(location, Diagnostics.Did_you_mean_0, `${operatorString}Number.isNaN(${isEntityNameExpression(expression) ? entityNameToString(expression) : "..."})`)); } } function isGlobalNaN(expr) { @@ -78929,7 +79545,15 @@ function createTypeChecker(host) { checkExternalEmitHelpers(node, 256 /* Values */); } } - const returnType = getReturnTypeFromAnnotation(func); + let returnType = getReturnTypeFromAnnotation(func); + if (returnType && returnType.flags & 1048576 /* Union */) { + returnType = filterType(returnType, (t) => checkGeneratorInstantiationAssignabilityToReturnType( + t, + functionFlags, + /*errorNode*/ + void 0 + )); + } const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync); const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType; const signatureNextType = iterationTypes && iterationTypes.nextType || anyType; @@ -79313,7 +79937,7 @@ function createTypeChecker(host) { } } const startInvocationCount = flowInvocationCount; - const type = checkExpression(node, 128 /* TypeOnly */); + const type = checkExpression(node, 64 /* TypeOnly */); if (flowInvocationCount !== startInvocationCount) { const cache = flowTypeCache || (flowTypeCache = []); cache[getNodeId(node)] = type; @@ -79428,7 +80052,7 @@ function createTypeChecker(host) { return nullWideningType; case 15 /* NoSubstitutionTemplateLiteral */: case 11 /* StringLiteral */: - return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? blockedStringType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -79545,15 +80169,15 @@ function createTypeChecker(host) { var _a, _b; if (isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent)) { const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node)); - const modifiers = getTypeParameterModifiers(typeParameter) & (32768 /* In */ | 65536 /* Out */); + const modifiers = getTypeParameterModifiers(typeParameter) & (8192 /* In */ | 16384 /* Out */); if (modifiers) { const symbol = getSymbolOfDeclaration(node.parent); if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) { error2(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); - } else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) { + } else if (modifiers === 8192 /* In */ || modifiers === 16384 /* Out */) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) }); - const source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); - const target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck); + const source = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); + const target = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck); const saveVarianceTypeParameter = typeParameter; varianceTypeParameter = typeParameter; checkTypeAssignableTo(source, target, node, Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation); @@ -79567,7 +80191,7 @@ function createTypeChecker(host) { checkGrammarModifiers(node); checkVariableLikeDeclaration(node); const func = getContainingFunction(node); - if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { + if (hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) { if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } @@ -79668,11 +80292,7 @@ function createTypeChecker(host) { } const name = element.name; if (name.kind === 80 /* Identifier */ && name.escapedText === predicateVariableName) { - error2( - predicateVariableNode, - Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, - predicateVariableName - ); + error2(predicateVariableNode, Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( @@ -79741,11 +80361,7 @@ function createTypeChecker(host) { if (returnType === voidType) { error2(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation); } else { - const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType; - const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType; - const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType; - const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */)); - checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation); + checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags2, returnTypeErrorLocation); } } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) { checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation); @@ -79756,6 +80372,13 @@ function createTypeChecker(host) { } } } + function checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags, errorNode) { + const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags & 2 /* Async */) !== 0) || anyType; + const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags & 2 /* Async */) !== 0) || generatorYieldType; + const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags & 2 /* Async */) !== 0) || unknownType; + const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags & 2 /* Async */)); + return checkTypeAssignableTo(generatorInstantiation, returnType, errorNode); + } function checkClassForDuplicateDeclarations(node) { const instanceNames = /* @__PURE__ */ new Map(); const staticNames = /* @__PURE__ */ new Map(); @@ -79776,7 +80399,7 @@ function createTypeChecker(host) { const isPrivate = isPrivateIdentifier(name); const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0; const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames; - const memberName = name && getPropertyNameForPropertyNameNode(name); + const memberName = name && getEffectivePropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { case 177 /* GetAccessor */: @@ -79823,7 +80446,7 @@ function createTypeChecker(host) { const memberNameNode = member.name; const isStaticMember = isStatic(member); if (isStaticMember && memberNameNode) { - const memberName = getPropertyNameForPropertyNameNode(memberNameNode); + const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode); switch (memberName) { case "name": case "length": @@ -79903,7 +80526,7 @@ function createTypeChecker(host) { checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { error2(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } @@ -79920,7 +80543,7 @@ function createTypeChecker(host) { error2(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { error2(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { @@ -79977,7 +80600,7 @@ function createTypeChecker(host) { if (classExtendsNull) { error2(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); } - const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); + const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 31 /* ParameterPropertyModifier */))); if (superCallShouldBeRootLevel) { if (!superCallIsRootLevelInConstructor(superCall, node.body)) { error2(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); @@ -80046,11 +80669,11 @@ function createTypeChecker(host) { getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); const setterFlags = getEffectiveModifierFlags(setter); - if ((getterFlags & 256 /* Abstract */) !== (setterFlags & 256 /* Abstract */)) { + if ((getterFlags & 64 /* Abstract */) !== (setterFlags & 64 /* Abstract */)) { error2(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); error2(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); } - if (getterFlags & 16 /* Protected */ && !(setterFlags & (16 /* Protected */ | 8 /* Private */)) || getterFlags & 8 /* Private */ && !(setterFlags & 8 /* Private */)) { + if (getterFlags & 4 /* Protected */ && !(setterFlags & (4 /* Protected */ | 2 /* Private */)) || getterFlags & 2 /* Private */ && !(setterFlags & 2 /* Private */)) { error2(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); error2(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); } @@ -80072,12 +80695,7 @@ function createTypeChecker(host) { return getEffectiveTypeArguments2(node, typeParameters)[index]; } function getEffectiveTypeArguments2(node, typeParameters) { - return fillMissingTypeArguments( - map(node.typeArguments, getTypeFromTypeNode), - typeParameters, - getMinTypeArgumentCount(typeParameters), - isInJSFile(node) - ); + return fillMissingTypeArguments(map(node.typeArguments, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(node)); } function checkTypeArgumentConstraints(node, typeParameters) { let typeArguments; @@ -80235,7 +80853,7 @@ function createTypeChecker(host) { const propertyName = getPropertyNameFromIndex(indexType, accessNode); if (propertyName) { const propertySymbol = forEachType(apparentObjectType, (t) => getPropertyOfType(t, propertyName)); - if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 24 /* NonPublicAccessibilityModifier */) { + if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 6 /* NonPublicAccessibilityModifier */) { error2(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); return errorType; } @@ -80314,16 +80932,8 @@ function createTypeChecker(host) { } function checkImportType(node) { checkSourceElement(node.argument); - if (node.assertions) { - const override = getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode); - if (override) { - if (!isNightly()) { - grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next); - } - if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) { - grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext); - } - } + if (node.attributes) { + getResolutionModeOverride(node.attributes, grammarErrorOnNode); } checkTypeReferenceOrImport(node); } @@ -80341,16 +80951,16 @@ function createTypeChecker(host) { getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); + return (hasEffectiveModifier(node, 2 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlagsCached(n); if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { const container = getEnclosingContainer(n); - if (container && container.flags & 128 /* ExportContext */ && !(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { - flags |= 1 /* Export */; + if (container && container.flags & 128 /* ExportContext */ && !(flags & 128 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { + flags |= 32 /* Export */; } - flags |= 2 /* Ambient */; + flags |= 128 /* Ambient */; } return flags & flagsToCheck; } @@ -80368,13 +80978,13 @@ function createTypeChecker(host) { const canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck2); forEach(overloads, (o) => { const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags; - if (deviation & 1 /* Export */) { + if (deviation & 32 /* Export */) { error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); - } else if (deviation & 2 /* Ambient */) { + } else if (deviation & 128 /* Ambient */) { error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); - } else if (deviation & (8 /* Private */ | 16 /* Protected */)) { + } else if (deviation & (2 /* Private */ | 4 /* Protected */)) { error2(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); - } else if (deviation & 256 /* Abstract */) { + } else if (deviation & 64 /* Abstract */) { error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); } }); @@ -80391,7 +81001,7 @@ function createTypeChecker(host) { }); } } - const flagsToCheck = 1 /* Export */ | 2 /* Ambient */ | 8 /* Private */ | 16 /* Protected */ | 256 /* Abstract */; + const flagsToCheck = 32 /* Export */ | 128 /* Ambient */ | 2 /* Private */ | 4 /* Protected */ | 64 /* Abstract */; let someNodeFlags = 0 /* None */; let allNodeFlags = flagsToCheck; let someHaveQuestionToken = false; @@ -80439,7 +81049,7 @@ function createTypeChecker(host) { if (isConstructor) { error2(errorNode, Diagnostics.Constructor_implementation_is_missing); } else { - if (hasSyntacticModifier(node, 256 /* Abstract */)) { + if (hasSyntacticModifier(node, 64 /* Abstract */)) { error2(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); } else { error2(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); @@ -80525,7 +81135,7 @@ function createTypeChecker(host) { } }); } - if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 256 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) { + if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 64 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) { reportImplementationExpectedError(lastSeenNonAmbientDeclaration); } if (hasOverloads) { @@ -80568,9 +81178,9 @@ function createTypeChecker(host) { let defaultExportedDeclarationSpaces = 0 /* None */; for (const d of symbol.declarations) { const declarationSpaces = getDeclarationSpaces(d); - const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 1 /* Export */ | 1024 /* Default */); - if (effectiveDeclarationFlags & 1 /* Export */) { - if (effectiveDeclarationFlags & 1024 /* Default */) { + const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 32 /* Export */ | 2048 /* Default */); + if (effectiveDeclarationFlags & 32 /* Export */) { + if (effectiveDeclarationFlags & 2048 /* Default */) { defaultExportedDeclarationSpaces |= declarationSpaces; } else { exportedDeclarationSpaces |= declarationSpaces; @@ -80892,12 +81502,7 @@ function createTypeChecker(host) { const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); const collidingSymbol = getSymbol2(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { - error2( - collidingSymbol.valueDeclaration, - Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, - idText(rootName), - entityNameToString(promiseConstructorName) - ); + error2(collidingSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, idText(rootName), entityNameToString(promiseConstructorName)); return; } } @@ -81216,6 +81821,12 @@ function createTypeChecker(host) { } } } + function checkJSDocThisTag(node) { + const host2 = getEffectiveJSDocHost(node); + if (host2 && isArrowFunction(host2)) { + error2(node.tagName, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); + } + } function checkJSDocImplementsTag(node) { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { @@ -81378,13 +81989,13 @@ function createTypeChecker(host) { break; } const symbol = getSymbolOfDeclaration(member); - if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { + if (!symbol.isReferenced && (hasEffectiveModifier(member, 2 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; case 176 /* Constructor */: for (const parameter of member.parameters) { - if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { + if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 2 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } @@ -81500,7 +82111,11 @@ function createTypeChecker(host) { const importDecl = importClause.parent; const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { - addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); + addDiagnostic( + importDecl, + 0 /* Local */, + unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused) + ); } else { for (const unused of unuseds) errorUnusedLocal(unused, idText(unused.name), addDiagnostic); @@ -81512,7 +82127,11 @@ function createTypeChecker(host) { if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { - addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); + addDiagnostic( + bindingPattern, + kind, + bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused) + ); } } else { for (const e of bindingElements) { @@ -81522,7 +82141,11 @@ function createTypeChecker(host) { }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic( + declarationList, + 0 /* Local */, + declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused) + ); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -81650,13 +82273,7 @@ function createTypeChecker(host) { } const parent2 = getDeclarationContainer(node); if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { - errorSkippedOn( - "noEmit", - name, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, - declarationNameToString(name), - declarationNameToString(name) - ); + errorSkippedOn("noEmit", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, declarationNameToString(name), declarationNameToString(name)); } } function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) { @@ -81668,13 +82285,7 @@ function createTypeChecker(host) { } const parent2 = getDeclarationContainer(node); if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 4096 /* HasAsyncFunctions */) { - errorSkippedOn( - "noEmit", - name, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, - declarationNameToString(name), - declarationNameToString(name) - ); + errorSkippedOn("noEmit", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, declarationNameToString(name), declarationNameToString(name)); } } function recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name) { @@ -81715,13 +82326,7 @@ function createTypeChecker(host) { } if (hasCollision) { Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name), "The target of a Reflect collision check should be an identifier"); - errorSkippedOn( - "noEmit", - node, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, - declarationNameToString(node.name), - "Reflect" - ); + errorSkippedOn("noEmit", node, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, declarationNameToString(node.name), "Reflect"); } } function checkCollisionsForDeclarationName(node, name) { @@ -81802,7 +82407,7 @@ function createTypeChecker(host) { checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; - const parentCheckMode = node.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */; + const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */; const parentType = getTypeForBindingElementParent(parent2, parentCheckMode); const name = node.propertyName || node.name; if (parentType && !isBindingPattern(name)) { @@ -81836,7 +82441,7 @@ function createTypeChecker(host) { } forEach(node.name.elements, checkSourceElement); } - if (isParameter(node) && node.initializer && nodeIsMissing(getContainingFunction(node).body)) { + if (node.initializer && isParameterDeclaration(node) && nodeIsMissing(getContainingFunction(node).body)) { error2(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } @@ -81956,10 +82561,7 @@ function createTypeChecker(host) { typeToString(nextType) ); if (firstDeclaration) { - addRelatedInfo( - err, - createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName) - ); + addRelatedInfo(err, createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName)); } } function areDeclarationFlagsIdentical(left, right) { @@ -81969,7 +82571,7 @@ function createTypeChecker(host) { if (hasQuestionToken(left) !== hasQuestionToken(right)) { return false; } - const interestingFlags = 8 /* Private */ | 16 /* Protected */ | 512 /* Async */ | 256 /* Abstract */ | 64 /* Readonly */ | 32 /* Static */; + const interestingFlags = 2 /* Private */ | 4 /* Protected */ | 1024 /* Async */ | 64 /* Abstract */ | 8 /* Readonly */ | 256 /* Static */; return getSelectedEffectiveModifierFlags(left, interestingFlags) === getSelectedEffectiveModifierFlags(right, interestingFlags); } function checkVariableDeclaration(node) { @@ -82032,7 +82634,7 @@ function createTypeChecker(host) { } const type = location === condExpr2 ? condType : checkTruthinessExpression(location); const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression); - if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast) + if (!hasTypeFacts(type, 4194304 /* Truthy */) || isPropertyExpressionCast) return; const callSignatures = getSignaturesOfType(type, 0 /* Call */); const isPromise = !!getAwaitedTypeOfPromise(type); @@ -82596,13 +83198,10 @@ function createTypeChecker(host) { !!getAwaitedTypeOfPromise(type) || !allowAsyncIterables && isForOfStatement(errorNode.parent) && errorNode.parent.expression === errorNode && getGlobalAsyncIterableType( /*reportErrors*/ false - ) !== emptyGenericType && isTypeAssignableTo( - type, - getGlobalAsyncIterableType( - /*reportErrors*/ - false - ) - ) + ) !== emptyGenericType && isTypeAssignableTo(type, getGlobalAsyncIterableType( + /*reportErrors*/ + false + )) ); return errorAndMaybeSuggestAwait(errorNode, suggestAwait, message, typeToString(type)); } @@ -83059,14 +83658,7 @@ function createTypeChecker(host) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; const errorNode = localPropDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); if (errorNode && !isTypeAssignableTo(propType, info.type)) { - const diagnostic = createError( - errorNode, - Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, - symbolToString(prop), - typeToString(propType), - typeToString(info.keyType), - typeToString(info.type) - ); + const diagnostic = createError(errorNode, Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type)); if (propDeclaration && errorNode !== propDeclaration) { addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here, symbolToString(prop))); } @@ -83085,14 +83677,7 @@ function createTypeChecker(host) { const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; const errorNode = localCheckDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getIndexInfoOfType(base, checkInfo.keyType) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); if (errorNode && !isTypeAssignableTo(checkInfo.type, info.type)) { - error2( - errorNode, - Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, - typeToString(checkInfo.keyType), - typeToString(checkInfo.type), - typeToString(info.keyType), - typeToString(info.type) - ); + error2(errorNode, Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), typeToString(checkInfo.type), typeToString(info.keyType), typeToString(info.type)); } } } @@ -83314,7 +83899,7 @@ function createTypeChecker(host) { if (legacyDecorators && firstDecorator && some(node.members, (p) => hasStaticModifier(p) && isPrivateIdentifierClassElementDeclaration(p))) { grammarErrorOnNode(firstDecorator, Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator); } - if (!node.name && !hasSyntacticModifier(node, 1024 /* Default */)) { + if (!node.name && !hasSyntacticModifier(node, 2048 /* Default */)) { grammarErrorOnFirstToken(node, Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name); } checkClassLikeDeclaration(node); @@ -83373,19 +83958,14 @@ function createTypeChecker(host) { )) { issueMemberSpecificError(node, typeWithThis, baseWithThis, Diagnostics.Class_0_incorrectly_extends_base_class_1); } else { - checkTypeAssignableTo( - staticType, - getTypeWithoutSignatures(staticBaseType), - node.name || node, - Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1 - ); + checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); } if (baseConstructorType.flags & 8650752 /* TypeVariable */) { if (!isMixinConstructorType(staticType)) { error2(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); } else { const constructSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); - if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 256 /* Abstract */)) { + if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 64 /* Abstract */)) { error2(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); } } @@ -83599,7 +84179,7 @@ function createTypeChecker(host) { const signatures = getSignaturesOfType(type, 1 /* Construct */); if (signatures.length) { const declaration = signatures[0].declaration; - if (declaration && hasEffectiveModifier(declaration, 8 /* Private */)) { + if (declaration && hasEffectiveModifier(declaration, 2 /* Private */)) { const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); if (!isNodeWithinClass(node, typeClassDeclaration)) { error2(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); @@ -83619,7 +84199,7 @@ function createTypeChecker(host) { const baseTypes = baseTypeNode && getBaseTypes(type); const baseWithThis = (baseTypes == null ? void 0 : baseTypes.length) ? getTypeWithThisArgument(first(baseTypes), type.thisType) : void 0; const baseStaticType = getBaseConstructorTypeOfClass(type); - const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16384 /* Override */); + const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16 /* Override */); return checkMemberForOverrideModifier( node, staticType, @@ -83660,7 +84240,7 @@ function createTypeChecker(host) { Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration."); if (derived === base) { const derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol); - if (baseDeclarationFlags & 256 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 256 /* Abstract */))) { + if (baseDeclarationFlags & 64 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 64 /* Abstract */))) { for (const otherBaseType of getBaseTypes(type)) { if (otherBaseType === baseType) continue; @@ -83703,7 +84283,7 @@ function createTypeChecker(host) { } } else { const derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived); - if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) { + if (baseDeclarationFlags & 2 /* Private */ || derivedDeclarationFlags & 2 /* Private */) { continue; } let errorMessage; @@ -83720,7 +84300,7 @@ function createTypeChecker(host) { error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer); - if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { + if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { @@ -83747,7 +84327,7 @@ function createTypeChecker(host) { } } function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) { - return baseDeclarationFlags & 256 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent); + return baseDeclarationFlags & 64 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent); } function getNonInheritedProperties(type, baseTypes, properties) { if (!length(baseTypes)) { @@ -83812,7 +84392,7 @@ function createTypeChecker(host) { } const constructor = findConstructorDeclaration(node); for (const member of node.members) { - if (getEffectiveModifierFlags(member) & 2 /* Ambient */) { + if (getEffectiveModifierFlags(member) & 128 /* Ambient */) { continue; } if (!isStatic(member) && isPropertyWithoutInitializer(member)) { @@ -83941,7 +84521,10 @@ function createTypeChecker(host) { const value = evaluate(initializer, member); if (value !== void 0) { if (isConstEnum && typeof value === "number" && !isFinite(value)) { - error2(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); + error2( + initializer, + isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value + ); } } else if (isConstEnum) { error2(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); @@ -84041,7 +84624,7 @@ function createTypeChecker(host) { } if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; - if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { + if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { return evaluate(declaration.initializer, declaration); } } @@ -84308,7 +84891,10 @@ function createTypeChecker(host) { } const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule) { - error2(moduleName, node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + error2( + moduleName, + node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module + ); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -84317,12 +84903,13 @@ function createTypeChecker(host) { return false; } } - if (!isImportEqualsDeclaration(node) && node.assertClause) { + if (!isImportEqualsDeclaration(node) && node.attributes) { + const diagnostic = node.attributes.token === 118 /* WithKeyword */ ? Diagnostics.Import_attribute_values_must_be_string_literal_expressions : Diagnostics.Import_assertion_values_must_be_string_literal_expressions; let hasError = false; - for (const clause of node.assertClause.elements) { - if (!isStringLiteral(clause.value)) { + for (const attr of node.attributes.elements) { + if (!isStringLiteral(attr.value)) { hasError = true; - error2(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); + error2(attr.value, diagnostic); } } return !hasError; @@ -84344,11 +84931,14 @@ function createTypeChecker(host) { if (alreadyExportedSymbol === target) { const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode); if (exportingDeclaration) { - addRelatedInfo(diag2, createDiagnosticForNode( - exportingDeclaration, - Diagnostics._0_is_automatically_exported_here, - unescapeLeadingUnderscores(alreadyExportedSymbol.escapedName) - )); + addRelatedInfo( + diag2, + createDiagnosticForNode( + exportingDeclaration, + Diagnostics._0_is_automatically_exported_here, + unescapeLeadingUnderscores(alreadyExportedSymbol.escapedName) + ) + ); } } } else { @@ -84389,7 +84979,7 @@ function createTypeChecker(host) { name ); } - if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 32 /* Export */)) { error2(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; @@ -84451,32 +85041,26 @@ function createTypeChecker(host) { checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } - function checkAssertClause(declaration) { + function checkImportAttributes(declaration) { var _a; - if (declaration.assertClause) { - const validForTypeAssertions = isExclusivelyTypeOnlyImportOrExport(declaration); - const override = getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : void 0); - if (validForTypeAssertions && override) { - if (!isNightly()) { - grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next); - } - if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext); - } + const node = declaration.attributes; + if (node) { + const validForTypeAttributes = isExclusivelyTypeOnlyImportOrExport(declaration); + const override = getResolutionModeOverride(node, validForTypeAttributes ? grammarErrorOnNode : void 0); + const isImportAttributes2 = declaration.attributes.token === 118 /* WithKeyword */; + if (validForTypeAttributes && override) { return; } const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier); if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */) { - return grammarErrorOnNode( - declaration.assertClause, - moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext - ); + const message = isImportAttributes2 ? moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext : moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext; + return grammarErrorOnNode(node, message); } if (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); + return grammarErrorOnNode(node, isImportAttributes2 ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); } if (override) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports); + return grammarErrorOnNode(node, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports); } } } @@ -84508,7 +85092,7 @@ function createTypeChecker(host) { } } } - checkAssertClause(node); + checkImportAttributes(node); } function checkImportEqualsDeclaration(node) { if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { @@ -84517,7 +85101,7 @@ function createTypeChecker(host) { checkGrammarModifiers(node); if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { markExportAsReferenced(node); } if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { @@ -84581,7 +85165,7 @@ function createTypeChecker(host) { } } } - checkAssertClause(node); + checkImportAttributes(node); } function checkGrammarExportDeclaration(node) { var _a; @@ -84929,6 +85513,8 @@ function createTypeChecker(host) { return checkJSDocAccessibilityModifiers(node); case 357 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); + case 350 /* JSDocThisTag */: + return checkJSDocThisTag(node); case 199 /* IndexedAccessType */: return checkIndexedAccessType(node); case 200 /* MappedType */: @@ -85015,9 +85601,14 @@ function createTypeChecker(host) { const diagnostic = node.postfix ? Diagnostics._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1 : Diagnostics._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1; const typeNode = node.type; const type = getTypeFromTypeNode(typeNode); - grammarErrorOnNode(node, diagnostic, token, typeToString( - isJSDocNullableType(node) && !(type === neverType || type === voidType) ? getUnionType(append([type, undefinedType], node.postfix ? void 0 : nullType)) : type - )); + grammarErrorOnNode( + node, + diagnostic, + token, + typeToString( + isJSDocNullableType(node) && !(type === neverType || type === voidType) ? getUnionType(append([type, undefinedType], node.postfix ? void 0 : nullType)) : type + ) + ); } else { grammarErrorOnNode(node, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); } @@ -85127,6 +85718,15 @@ function createTypeChecker(host) { case 234 /* AsExpression */: case 217 /* ParenthesizedExpression */: checkAssertionDeferred(node); + break; + case 222 /* VoidExpression */: + checkExpression(node.expression); + break; + case 226 /* BinaryExpression */: + if (isInstanceOfExpression(node)) { + resolveUntypedCall(node); + } + break; } currentNode = saveCurrentNode; (_b = tracing) == null ? void 0 : _b.pop(); @@ -85563,31 +86163,7 @@ function createTypeChecker(host) { if (name.kind === 211 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { - const expressionType = checkExpressionCached(name.expression); - const infos = getApplicableIndexInfos(expressionType, getLiteralTypeFromPropertyName(name.name)); - if (infos.length && expressionType.members) { - const resolved = resolveStructuredTypeMembers(expressionType); - const symbol = resolved.members.get("__index" /* Index */); - if (infos === getIndexInfosOfType(expressionType)) { - links.resolvedSymbol = symbol; - } else if (symbol) { - const symbolLinks2 = getSymbolLinks(symbol); - const declarationList = mapDefined(infos, (i) => i.declaration); - const nodeListId = map(declarationList, getNodeId).join(","); - if (!symbolLinks2.filteredIndexSymbolCache) { - symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map(); - } - if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) { - links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId); - } else { - const copy = createSymbol(131072 /* Signature */, "__index" /* Index */); - copy.declarations = mapDefined(infos, (i) => i.declaration); - copy.parent = expressionType.aliasSymbol ? expressionType.aliasSymbol : expressionType.symbol ? expressionType.symbol : getSymbolAtLocation(copy.declarations[0].parent); - symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy); - links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId); - } - } - } + links.resolvedSymbol = getApplicableIndexSymbol(checkExpressionCached(name.expression), getLiteralTypeFromPropertyName(name.name)); } } else { checkQualifiedName(name, 0 /* Normal */); @@ -85620,6 +86196,31 @@ function createTypeChecker(host) { } return void 0; } + function getApplicableIndexSymbol(type, keyType) { + const infos = getApplicableIndexInfos(type, keyType); + if (infos.length && type.members) { + const symbol = getIndexSymbolFromSymbolTable(resolveStructuredTypeMembers(type).members); + if (infos === getIndexInfosOfType(type)) { + return symbol; + } else if (symbol) { + const symbolLinks2 = getSymbolLinks(symbol); + const declarationList = mapDefined(infos, (i) => i.declaration); + const nodeListId = map(declarationList, getNodeId).join(","); + if (!symbolLinks2.filteredIndexSymbolCache) { + symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map(); + } + if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) { + return symbolLinks2.filteredIndexSymbolCache.get(nodeListId); + } else { + const copy = createSymbol(131072 /* Signature */, "__index" /* Index */); + copy.declarations = mapDefined(infos, (i) => i.declaration); + copy.parent = type.aliasSymbol ? type.aliasSymbol : type.symbol ? type.symbol : getSymbolAtLocation(copy.declarations[0].parent); + symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy); + return copy; + } + } + } + } function resolveJSDocMemberName(name, ignoreErrors, container) { if (isEntityName(name)) { const meaning = 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */; @@ -85742,6 +86343,13 @@ function createTypeChecker(host) { case 102 /* ImportKeyword */: case 105 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; + case 104 /* InstanceOfKeyword */: + if (isBinaryExpression(node.parent)) { + const type = getTypeOfExpression(node.parent.right); + const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(type); + return (hasInstanceMethodType == null ? void 0 : hasInstanceMethodType.symbol) ?? type.symbol; + } + return void 0; case 236 /* MetaProperty */: return checkExpression(node).symbol; case 295 /* JsxNamespacedName */: @@ -86112,7 +86720,7 @@ function createTypeChecker(host) { } const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol)); if (target === unknownSymbol) { - return true; + return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol); } return !!(getSymbolFlags( symbol, @@ -86133,7 +86741,7 @@ function createTypeChecker(host) { return true; } const target = getSymbolLinks(symbol).aliasTarget; - if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { + if (target && getEffectiveModifierFlags(node) & 32 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { return true; } } @@ -86158,10 +86766,10 @@ function createTypeChecker(host) { return false; } function isRequiredInitializedParameter(parameter) { - return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */); + return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */); } function isOptionalUninitializedParameterProperty(parameter) { - return strictNullChecks && isOptionalParameter(parameter) && !parameter.initializer && hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */); + return strictNullChecks && isOptionalParameter(parameter) && !parameter.initializer && hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */); } function isExpandoFunctionDeclaration(node) { const declaration = getParseTreeNode(node, isFunctionDeclaration); @@ -86172,7 +86780,7 @@ function createTypeChecker(host) { if (!symbol || !(symbol.flags & 16 /* Function */)) { return false; } - return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && p.valueDeclaration && isPropertyAccessExpression(p.valueDeclaration)); + return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && isExpandoPropertyDeclaration(p.valueDeclaration)); } function getPropertiesOfContainerFunction(node) { const declaration = getParseTreeNode(node, isFunctionDeclaration); @@ -86582,7 +87190,16 @@ function createTypeChecker(host) { } return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker, bundled); }, - isImportRequiredByAugmentation + isImportRequiredByAugmentation, + tryFindAmbientModule: (moduleReferenceExpression) => { + const node = getParseTreeNode(moduleReferenceExpression); + const moduleSpecifier = node && isStringLiteralLike(node) ? node.text : void 0; + return moduleSpecifier !== void 0 ? tryFindAmbientModule( + moduleSpecifier, + /*withAugmentations*/ + true + ) : void 0; + } }; function isImportRequiredByAugmentation(node) { const file = getSourceFileOfNode(node); @@ -86679,11 +87296,11 @@ function createTypeChecker(host) { if (fileToDirective.has(file.path)) return; fileToDirective.set(file.path, [key, mode]); - for (const { fileName, resolutionMode } of file.referencedFiles) { + for (const { fileName } of file.referencedFiles) { const resolvedFile = resolveTripleslashReference(fileName, file.fileName); const referencedFile = host.getSourceFile(resolvedFile); if (referencedFile) { - addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat); + addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat); } } } @@ -87006,10 +87623,10 @@ function createTypeChecker(host) { return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); } } - if (flags & ~(1025 /* ExportDefault */ | 131072 /* Decorator */)) { + if (flags & ~(2080 /* ExportDefault */ | 32768 /* Decorator */)) { return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here); } - if (hasLeadingDecorators && flags & 126975 /* Modifier */) { + if (hasLeadingDecorators && flags & 98303 /* Modifier */) { Debug.assertIsDefined(firstDecorator); const sourceFile = getSourceFileOfNode(modifier); if (!hasParseDiagnostics(sourceFile)) { @@ -87021,10 +87638,10 @@ function createTypeChecker(host) { } return false; } - flags |= 131072 /* Decorator */; - if (!(flags & 126975 /* Modifier */)) { + flags |= 32768 /* Decorator */; + if (!(flags & 98303 /* Modifier */)) { hasLeadingDecorators = true; - } else if (flags & 1 /* Export */) { + } else if (flags & 32 /* Export */) { sawExportBeforeDecorators = true; } firstDecorator ?? (firstDecorator = modifier); @@ -87053,39 +87670,39 @@ function createTypeChecker(host) { } break; case 164 /* OverrideKeyword */: - if (flags & 16384 /* Override */) { + if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); - } else if (flags & 2 /* Ambient */) { + } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "override", "declare"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "readonly"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "accessor"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "async"); } - flags |= 16384 /* Override */; + flags |= 16 /* Override */; lastOverride = modifier; break; case 125 /* PublicKeyword */: case 124 /* ProtectedKeyword */: case 123 /* PrivateKeyword */: const text = visibilityToString(modifierToFlag(modifier.kind)); - if (flags & 28 /* AccessibilityModifier */) { + if (flags & 7 /* AccessibilityModifier */) { return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen); - } else if (flags & 16384 /* Override */) { + } else if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "override"); - } else if (flags & 32 /* Static */) { + } else if (flags & 256 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "accessor"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); - } else if (flags & 256 /* Abstract */) { + } else if (flags & 64 /* Abstract */) { if (modifier.kind === 123 /* PrivateKeyword */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { @@ -87097,60 +87714,60 @@ function createTypeChecker(host) { flags |= modifierToFlag(modifier.kind); break; case 126 /* StaticKeyword */: - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "readonly"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); - } else if (flags & 256 /* Abstract */) { + } else if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); - } else if (flags & 16384 /* Override */) { + } else if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "override"); } - flags |= 32 /* Static */; + flags |= 256 /* Static */; lastStatic = modifier; break; case 129 /* AccessorKeyword */: - if (flags & 128 /* Accessor */) { + if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "accessor"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); - } else if (flags & 2 /* Ambient */) { + } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } - flags |= 128 /* Accessor */; + flags |= 512 /* Accessor */; break; case 148 /* ReadonlyKeyword */: - if (flags & 64 /* Readonly */) { + if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); } - flags |= 64 /* Readonly */; + flags |= 8 /* Readonly */; break; case 95 /* ExportKeyword */: if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } - if (flags & 1 /* Export */) { + if (flags & 32 /* Export */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "export"); - } else if (flags & 2 /* Ambient */) { + } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare"); - } else if (flags & 256 /* Abstract */) { + } else if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "abstract"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); @@ -87161,7 +87778,7 @@ function createTypeChecker(host) { } else if (blockScopeKind === 6 /* AwaitUsing */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); } - flags |= 1 /* Export */; + flags |= 32 /* Export */; break; case 90 /* DefaultKeyword */: const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; @@ -87171,19 +87788,19 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); } else if (blockScopeKind === 6 /* AwaitUsing */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); - } else if (!(flags & 1 /* Export */)) { + } else if (!(flags & 32 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); } else if (sawExportBeforeDecorators) { return grammarErrorOnNode(firstDecorator, Diagnostics.Decorators_are_not_valid_here); } - flags |= 1024 /* Default */; + flags |= 2048 /* Default */; break; case 138 /* DeclareKeyword */: - if (flags & 2 /* Ambient */) { + if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (flags & 16384 /* Override */) { + } else if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); @@ -87197,62 +87814,62 @@ function createTypeChecker(host) { return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "declare", "accessor"); } - flags |= 2 /* Ambient */; + flags |= 128 /* Ambient */; lastDeclare = modifier; break; case 128 /* AbstractKeyword */: - if (flags & 256 /* Abstract */) { + if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 64 /* Abstract */))) { const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; return grammarErrorOnNode(modifier, message); } - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); } - if (flags & 8 /* Private */) { + if (flags & 2 /* Private */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract"); } - if (flags & 512 /* Async */ && lastAsync) { + if (flags & 1024 /* Async */ && lastAsync) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); } - if (flags & 16384 /* Override */) { + if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "override"); } - if (flags & 128 /* Accessor */) { + if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "accessor"); } } if (isNamedDeclaration(node) && node.name.kind === 81 /* PrivateIdentifier */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); } - flags |= 256 /* Abstract */; + flags |= 64 /* Abstract */; break; case 134 /* AsyncKeyword */: - if (flags & 512 /* Async */) { + if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); - } else if (flags & 2 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { + } else if (flags & 128 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } - if (flags & 256 /* Abstract */) { + if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); } - flags |= 512 /* Async */; + flags |= 1024 /* Async */; lastAsync = modifier; break; case 103 /* InKeyword */: case 147 /* OutKeyword */: - const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; + const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 8192 /* In */ : 16384 /* Out */; const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out"; if (node.kind !== 168 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); @@ -87260,7 +87877,7 @@ function createTypeChecker(host) { if (flags & inOutFlag) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, inOutText); } - if (inOutFlag & 32768 /* In */ && flags & 65536 /* Out */) { + if (inOutFlag & 8192 /* In */ && flags & 16384 /* Out */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "in", "out"); } flags |= inOutFlag; @@ -87269,24 +87886,24 @@ function createTypeChecker(host) { } } if (node.kind === 176 /* Constructor */) { - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } - if (flags & 16384 /* Override */) { + if (flags & 16 /* Override */) { return grammarErrorOnNode(lastOverride, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "override"); } - if (flags & 512 /* Async */) { + if (flags & 1024 /* Async */) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 128 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } - if (flags & 512 /* Async */) { + if (flags & 1024 /* Async */) { return checkGrammarAsyncModifier(node, lastAsync); } return false; @@ -87730,10 +88347,7 @@ function createTypeChecker(host) { if (isInTopLevelContext(forInOrOfStatement)) { if (!hasParseDiagnostics(sourceFile)) { if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { - diagnostics.add(createDiagnosticForNode( - forInOrOfStatement.awaitModifier, - Diagnostics.for_await_loops_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 - )); + diagnostics.add(createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_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)); } switch (moduleKind) { case 100 /* Node16 */: @@ -87752,10 +88366,7 @@ function createTypeChecker(host) { } default: diagnostics.add( - createDiagnosticForNode( - forInOrOfStatement.awaitModifier, - Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher - ) + createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher) ); break; } @@ -87812,12 +88423,12 @@ function createTypeChecker(host) { if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(accessor.name)) { return grammarErrorOnNode(accessor.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); } - if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 256 /* Abstract */)) { + if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 64 /* Abstract */)) { return grammarErrorAtPos(accessor, accessor.end - 1, ";".length, Diagnostics._0_expected, "{"); } } if (accessor.body) { - if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { + if (hasSyntacticModifier(accessor, 64 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) { @@ -87889,7 +88500,7 @@ function createTypeChecker(host) { } break; case 171 /* PropertySignature */: - if (!hasSyntacticModifier(parent2, 64 /* Readonly */)) { + if (!hasSyntacticModifier(parent2, 8 /* Readonly */)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } break; @@ -88059,7 +88670,7 @@ function createTypeChecker(host) { const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } - if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { + if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 32 /* Export */)) { checkESModuleMarker(node.name); } return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); @@ -88249,7 +88860,7 @@ function createTypeChecker(host) { } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 128 /* Ambient */ | 32 /* Export */ | 2048 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); @@ -88284,7 +88895,7 @@ function createTypeChecker(host) { return false; } function checkGrammarNumericLiteral(node) { - const isFractional = getTextOfNode(node).indexOf(".") !== -1; + const isFractional = getTextOfNode(node).includes("."); const isScientific = node.numericLiteralFlags & 16 /* Scientific */; if (isFractional || isScientific) { return; @@ -88371,12 +88982,12 @@ function createTypeChecker(host) { if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */) { checkGrammarForDisallowedTrailingComma(nodeArguments); if (nodeArguments.length > 1) { - const assertionArgument = nodeArguments[1]; - return grammarErrorOnNode(assertionArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); + const importAttributesArgument = nodeArguments[1]; + return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); } } if (nodeArguments.length === 0 || nodeArguments.length > 2) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments); + return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments); } const spreadElement = find(nodeArguments, isSpreadElement); if (spreadElement) { @@ -88464,7 +89075,7 @@ function createTypeChecker(host) { } function getEffectivePropertyNameForPropertyNameNode(node) { const name = getPropertyNameForPropertyNameNode(node); - return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0; + return name ? name : isComputedPropertyName(node) ? tryGetNameFromType(getTypeOfExpression(node.expression)) : void 0; } function getCombinedModifierFlagsCached(node) { if (lastGetCombinedModifierFlagsNode === node) { @@ -88564,12 +89175,14 @@ var SymbolTrackerImpl = class _SymbolTrackerImpl { this.canTrackSymbol = !!((_a = this.inner) == null ? void 0 : _a.trackSymbol); } trackSymbol(symbol, enclosingDeclaration, meaning) { - var _a; + var _a, _b; if (((_a = this.inner) == null ? void 0 : _a.trackSymbol) && !this.disableTrackSymbol) { if (this.inner.trackSymbol(symbol, enclosingDeclaration, meaning)) { this.onDiagnosticReported(); return true; } + if (!(symbol.flags & 262144 /* TypeParameter */)) + ((_b = this.context).trackedSymbols ?? (_b.trackedSymbols = [])).push([symbol, enclosingDeclaration, meaning]); } return false; } @@ -88643,13 +89256,6 @@ var SymbolTrackerImpl = class _SymbolTrackerImpl { this.inner.reportNonSerializableProperty(propertyName); } } - reportImportTypeNodeResolutionModeOverride() { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportImportTypeNodeResolutionModeOverride) { - this.onDiagnosticReported(); - this.inner.reportImportTypeNodeResolutionModeOverride(); - } - } onDiagnosticReported() { this.context.reportedDiagnostic = true; } @@ -89158,7 +89764,7 @@ var visitEachChildTable = { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), - nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer), + nodeVisitor(node.attributes, visitor, isImportAttributes), nodeVisitor(node.qualifier, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode), node.isTypeOf @@ -89709,20 +90315,20 @@ var visitEachChildTable = { nodesVisitor(node.modifiers, visitor, isModifierLike), nodeVisitor(node.importClause, visitor, isImportClause), Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)), - nodeVisitor(node.assertClause, visitor, isAssertClause) + nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, - [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertClause( + [300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + return context.factory.updateImportAttributes( node, - nodesVisitor(node.elements, visitor, isAssertEntry), + nodesVisitor(node.elements, visitor, isImportAttribute), node.multiLine ); }, - [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertEntry( + [301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateImportAttribute( node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, @@ -89774,7 +90380,7 @@ var visitEachChildTable = { node.isTypeOnly, nodeVisitor(node.exportClause, visitor, isNamedExportBindings), nodeVisitor(node.moduleSpecifier, visitor, isExpression), - nodeVisitor(node.assertClause, visitor, isAssertClause) + nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { @@ -90206,7 +90812,7 @@ function tryGetSourceMappingURL(lineInfo) { const line = lineInfo.getLineText(index); const comment = sourceMapCommentRegExp.exec(line); if (comment) { - return trimStringEnd(comment[1]); + return comment[1].trimEnd(); } else if (!line.match(whitespaceOrMapCommentRegExp)) { break; } @@ -90622,15 +91228,15 @@ function collectExternalModuleInfo(context, sourceFile) { } break; case 243 /* VariableStatement */: - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings); } } break; case 262 /* FunctionDeclaration */: - if (hasSyntacticModifier(node, 1 /* Export */)) { - if (hasSyntacticModifier(node, 1024 /* Default */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { + if (hasSyntacticModifier(node, 2048 /* Default */)) { if (!hasExportDefault) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node)); hasExportDefault = true; @@ -90646,8 +91252,8 @@ function collectExternalModuleInfo(context, sourceFile) { } break; case 263 /* ClassDeclaration */: - if (hasSyntacticModifier(node, 1 /* Export */)) { - if (hasSyntacticModifier(node, 1024 /* Default */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { + if (hasSyntacticModifier(node, 2048 /* Default */)) { if (!hasExportDefault) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node)); hasExportDefault = true; @@ -91517,7 +92123,7 @@ function injectClassThisAssignmentIfMissing(factory2, node, classThis, thisExpre // src/compiler/transformers/namedEvaluation.ts function getAssignedNameOfIdentifier(factory2, name, expression) { const original = getOriginalNode(skipOuterExpressions(expression)); - if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 1024 /* Default */)) { + if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 2048 /* Default */)) { return factory2.createStringLiteral("default"); } return factory2.createStringLiteralFromNode(name); @@ -91784,10 +92390,7 @@ function createTemplateCooked(factory2, template) { function getRawLiteral(factory2, node, currentSourceFile) { let text = node.rawText; if (text === void 0) { - Debug.assertIsDefined( - currentSourceFile, - "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform." - ); + Debug.assertIsDefined(currentSourceFile, "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."); text = getSourceTextOfNodeFromSourceFile(currentSourceFile, node); const isLast = node.kind === 15 /* NoSubstitutionTemplateLiteral */ || node.kind === 18 /* TemplateTail */; text = text.substring(1, text.length - (isLast ? 1 : 2)); @@ -91835,12 +92438,15 @@ function transformTypeScript(context) { return transformSourceFile(node); } function transformBundle(node) { - return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 315 /* InputFiles */) { - return createUnparsedSourceFile(prepend, "js"); - } - return prepend; - })); + return factory2.createBundle( + node.sourceFiles.map(transformSourceFile), + mapDefined(node.prepends, (prepend) => { + if (prepend.kind === 315 /* InputFiles */) { + return createUnparsedSourceFile(prepend, "js"); + } + return prepend; + }) + ); } function transformSourceFile(node) { if (node.isDeclarationFile) { @@ -91876,13 +92482,13 @@ function transformTypeScript(context) { break; case 263 /* ClassDeclaration */: case 262 /* FunctionDeclaration */: - if (hasSyntacticModifier(node, 2 /* Ambient */)) { + if (hasSyntacticModifier(node, 128 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 2048 /* Default */)); } break; } @@ -91937,7 +92543,7 @@ function transformTypeScript(context) { function namespaceElementVisitorWorker(node) { if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) { return void 0; - } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { + } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 32 /* Export */)) { return visitTypeScript(node); } return node; @@ -91995,7 +92601,7 @@ function transformTypeScript(context) { function modifierVisitor(node) { if (isDecorator(node)) return void 0; - if (modifierToFlag(node.kind) & 117086 /* TypeScriptModifier */) { + if (modifierToFlag(node.kind) & 28895 /* TypeScriptModifier */) { return void 0; } else if (currentNamespace && node.kind === 95 /* ExportKeyword */) { return void 0; @@ -92003,7 +92609,7 @@ function transformTypeScript(context) { return node; } function visitTypeScript(node) { - if (isStatement(node) && hasSyntacticModifier(node, 2 /* Ambient */)) { + if (isStatement(node) && hasSyntacticModifier(node, 128 /* Ambient */)) { return factory2.createNotEmittedStatement(node); } switch (node.kind) { @@ -92493,7 +93099,7 @@ function transformTypeScript(context) { return !nodeIsMissing(node.body); } function visitPropertyDeclaration(node, parent2) { - const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); + const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 64 /* Abstract */); if (isAmbient && !(legacyDecorators && hasDecorators(node))) { return void 0; } @@ -92502,7 +93108,7 @@ function transformTypeScript(context) { if (isAmbient) { return factory2.updatePropertyDeclaration( node, - concatenate(modifiers, factory2.createModifiersFromModifierFlags(2 /* Ambient */)), + concatenate(modifiers, factory2.createModifiersFromModifierFlags(128 /* Ambient */)), Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), /*questionOrExclamationToken*/ void 0, @@ -92665,7 +93271,7 @@ function transformTypeScript(context) { ); } function shouldEmitAccessorDeclaration(node) { - return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 256 /* Abstract */)); + return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 64 /* Abstract */)); } function visitGetAccessor(node, parent2) { if (!(node.transformFlags & 1 /* ContainsTypeScript */)) { @@ -93264,7 +93870,7 @@ function transformTypeScript(context) { void 0, importClause, node.moduleSpecifier, - node.assertClause + node.attributes ) : void 0; } function visitImportClause(node) { @@ -93314,7 +93920,7 @@ function transformTypeScript(context) { node.isTypeOnly, exportClause, node.moduleSpecifier, - node.assertClause + node.attributes ) : void 0; } function visitNamedExports(node, allowEmpty) { @@ -93348,7 +93954,7 @@ function transformTypeScript(context) { /*importClause*/ void 0, node.moduleReference.expression, - /*assertClause*/ + /*attributes*/ void 0 ), node @@ -93398,16 +94004,16 @@ function transformTypeScript(context) { } } function isExportOfNamespace(node) { - return currentNamespace !== void 0 && hasSyntacticModifier(node, 1 /* Export */); + return currentNamespace !== void 0 && hasSyntacticModifier(node, 32 /* Export */); } function isExternalModuleExport(node) { - return currentNamespace === void 0 && hasSyntacticModifier(node, 1 /* Export */); + return currentNamespace === void 0 && hasSyntacticModifier(node, 32 /* Export */); } function isNamedExternalModuleExport(node) { - return isExternalModuleExport(node) && !hasSyntacticModifier(node, 1024 /* Default */); + return isExternalModuleExport(node) && !hasSyntacticModifier(node, 2048 /* Default */); } function isDefaultExternalModuleExport(node) { - return isExternalModuleExport(node) && hasSyntacticModifier(node, 1024 /* Default */); + return isExternalModuleExport(node) && hasSyntacticModifier(node, 2048 /* Default */); } function createExportMemberAssignmentStatement(node) { const expression = factory2.createAssignment( @@ -94740,8 +95346,8 @@ function transformClassFields(context) { getClassLexicalEnvironment().classThis = node.emitNode.classThis; } const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */; - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExport = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause); const { members, prologue } = transformClassMembers(node); @@ -95287,7 +95893,7 @@ function transformClassFields(context) { return void 0; } const propertyOriginalNode = getOriginalNode(property); - if (hasSyntacticModifier(propertyOriginalNode, 256 /* Abstract */)) { + if (hasSyntacticModifier(propertyOriginalNode, 64 /* Abstract */)) { return void 0; } let initializer = visitNode(property.initializer, visitor, isExpression); @@ -96288,16 +96894,19 @@ function transformLegacyDecorators(context) { true ); if (hasClassElementWithDecoratorContainingPrivateIdentifierInExpression(node)) { - members = setTextRange(factory2.createNodeArray([ - ...members, - factory2.createClassStaticBlockDeclaration( - factory2.createBlock( - decorationStatements, - /*multiLine*/ - true + members = setTextRange( + factory2.createNodeArray([ + ...members, + factory2.createClassStaticBlockDeclaration( + factory2.createBlock( + decorationStatements, + /*multiLine*/ + true + ) ) - ) - ]), members); + ]), + members + ); decorationStatements = void 0; } return { decorationStatements, members }; @@ -96320,8 +96929,8 @@ function transformLegacyDecorators(context) { return addRange([updated], decorationStatements); } function transformClassDeclarationWithClassDecorators(node, name) { - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExport = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); const modifiers = visitNodes2(node.modifiers, (node2) => isExportOrDefaultModifier(node2) || isDecorator(node2) ? void 0 : node2, isModifierLike); const location = moveRangePastModifiers(node); const classAlias = getClassAliasIfNeeded(node); @@ -96342,18 +96951,21 @@ function transformLegacyDecorators(context) { let members = visitNodes2(node.members, visitor, isClassElement); let decorationStatements = []; ({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members)); - const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 32 /* Static */) || isClassStaticBlockDeclaration(member)); + const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 256 /* Static */) || isClassStaticBlockDeclaration(member)); if (assignClassAliasInStaticBlock) { - members = setTextRange(factory2.createNodeArray([ - factory2.createClassStaticBlockDeclaration( - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createAssignment(classAlias, factory2.createThis()) - ) - ]) - ), - ...members - ]), members); + members = setTextRange( + factory2.createNodeArray([ + factory2.createClassStaticBlockDeclaration( + factory2.createBlock([ + factory2.createExpressionStatement( + factory2.createAssignment(classAlias, factory2.createThis()) + ) + ]) + ), + ...members + ]), + members + ); } const classExpression = factory2.createClassExpression( modifiers, @@ -96425,55 +97037,67 @@ function transformLegacyDecorators(context) { return updated; } function visitMethodDeclaration(node) { - return finishClassElement(factory2.updateMethodDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - node.asteriskToken, - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitNode(node.body, visitor, isBlock) - ), node); + return finishClassElement( + factory2.updateMethodDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + node.asteriskToken, + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + visitNodes2(node.parameters, visitor, isParameter), + /*type*/ + void 0, + visitNode(node.body, visitor, isBlock) + ), + node + ); } function visitGetAccessorDeclaration(node) { - return finishClassElement(factory2.updateGetAccessorDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitNode(node.body, visitor, isBlock) - ), node); + return finishClassElement( + factory2.updateGetAccessorDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + visitNodes2(node.parameters, visitor, isParameter), + /*type*/ + void 0, + visitNode(node.body, visitor, isBlock) + ), + node + ); } function visitSetAccessorDeclaration(node) { - return finishClassElement(factory2.updateSetAccessorDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock) - ), node); + return finishClassElement( + factory2.updateSetAccessorDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + visitNodes2(node.parameters, visitor, isParameter), + visitNode(node.body, visitor, isBlock) + ), + node + ); } function visitPropertyDeclaration(node) { - if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { + if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 128 /* Ambient */)) { return void 0; } - return finishClassElement(factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ), node); + return finishClassElement( + factory2.updatePropertyDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + visitNode(node.initializer, visitor, isExpression) + ), + node + ); } function visitParameterDeclaration(node) { const updated = factory2.updateParameterDeclaration( @@ -96546,7 +97170,7 @@ function transformLegacyDecorators(context) { const memberName = getExpressionForPropertyName( member, /*generateNameForComputedPropertyName*/ - !hasSyntacticModifier(member, 2 /* Ambient */) + !hasSyntacticModifier(member, 128 /* Ambient */) ); const descriptor = languageVersion > 0 /* ES3 */ ? isPropertyDeclaration(member) && !hasAccessorModifier(member) ? factory2.createVoidZero() : factory2.createNull() : void 0; const helper = emitHelpers().createDecorateHelper( @@ -97056,7 +97680,10 @@ function transformESDecorators(context) { classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */); classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */); const needsUniqueClassThis = some(node.members, (member) => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)); - classInfo2.classThis = factory2.createUniqueName("_classThis", needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classThis = factory2.createUniqueName( + "_classThis", + needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */ + ); classDefinitionStatements.push( createLet(classInfo2.classDecoratorsName, factory2.createArrayLiteralExpression(classDecorators)), createLet(classInfo2.classDescriptorName), @@ -97326,8 +97953,8 @@ function transformESDecorators(context) { const statements = []; const originalClass = getOriginalNode(node, isClassLike) ?? node; const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExport = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); if (!node.name) { node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className); } @@ -99463,9 +100090,12 @@ function transformES2018(context) { } function visitReturnStatement(node) { if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) { - return factory2.updateReturnStatement(node, createDownlevelAwait( - node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero() - )); + return factory2.updateReturnStatement( + node, + createDownlevelAwait( + node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero() + ) + ); } return visitEachChild(node, visitor, context); } @@ -99491,7 +100121,10 @@ function transformES2018(context) { const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append( + chunkObject, + e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike) + ); } } if (chunkObject) { @@ -99530,13 +100163,16 @@ function transformES2018(context) { ); exportedVariableStatement = false; const visited = visitEachChild(node, visitor, context); - const statement = concatenate(visited.statements, taggedTemplateStringDeclarations && [ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList(taggedTemplateStringDeclarations) - ) - ]); + const statement = concatenate( + visited.statements, + taggedTemplateStringDeclarations && [ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList(taggedTemplateStringDeclarations) + ) + ] + ); const result = factory2.updateSourceFile(visited, setTextRange(factory2.createNodeArray(statement), node.statements)); exitSubtree(ancestorFacts); return result; @@ -99629,7 +100265,7 @@ function transformES2018(context) { return visitEachChild(node, visitor, context); } function visitVariableStatement(node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { const savedExportedVariableStatement = exportedVariableStatement; exportedVariableStatement = true; const visited = visitEachChild(node, visitor, context); @@ -100662,15 +101298,18 @@ function transformES2020(context) { right = factory2.createTempVariable(hoistVariableDeclaration); left = factory2.createAssignment(right, left); } - return setTextRange(factory2.createConditionalExpression( - createNotNullCondition(left, right), - /*questionToken*/ - void 0, - right, - /*colonToken*/ - void 0, - visitNode(node.right, visitor, isExpression) - ), node); + return setTextRange( + factory2.createConditionalExpression( + createNotNullCondition(left, right), + /*questionToken*/ + void 0, + right, + /*colonToken*/ + void 0, + visitNode(node.right, visitor, isExpression) + ), + node + ); } function visitDeleteExpression(node) { return isOptionalChain(skipParentheses(node.expression)) ? setOriginalNode(visitNonOptionalExpression( @@ -100824,18 +101463,21 @@ function transformESNext(context) { const envBinding = createEnvBinding(); const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements); if (exportBindings.size) { - append(topLevelStatements, factory2.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory2.createNamedExports(arrayFrom(exportBindings.values())) - )); + append( + topLevelStatements, + factory2.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory2.createNamedExports(arrayFrom(exportBindings.values())) + ) + ); } addRange(topLevelStatements, endLexicalEnvironment()); if (exportVars.length) { topLevelStatements.push(factory2.createVariableStatement( - factory2.createModifiersFromModifierFlags(1 /* Export */), + factory2.createModifiersFromModifierFlags(32 /* Export */), factory2.createVariableDeclarationList( exportVars, 1 /* Let */ @@ -101132,8 +101774,8 @@ function transformESNext(context) { if (!node.name && defaultExportBinding) { return node; } - const isExported2 = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExported2 = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); let expression = factory2.converters.convertToClassExpression(node); if (node.name) { hoistBindingIdentifier( @@ -101181,7 +101823,7 @@ function transformESNext(context) { } function hoistVariableStatement(node) { let expressions; - const isExported2 = hasSyntacticModifier(node, 1 /* Export */); + const isExported2 = hasSyntacticModifier(node, 32 /* Export */); for (const variable of node.declarationList.declarations) { hoistBindingElement(variable, isExported2, variable); if (variable.initializer) { @@ -101482,7 +102124,7 @@ function transformJsx(context) { factory2.createNamedImports(arrayFrom(importSpecifiersMap.values())) ), factory2.createStringLiteral(importSource), - /*assertClause*/ + /*attributes*/ void 0 ); setParentRecursive( @@ -101594,7 +102236,9 @@ function transformJsx(context) { } } function hasProto(obj) { - return obj.properties.some((p) => isPropertyAssignment(p) && (isIdentifier(p.name) && idText(p.name) === "__proto__" || isStringLiteral(p.name) && p.name.text === "__proto__")); + return obj.properties.some( + (p) => isPropertyAssignment(p) && (isIdentifier(p.name) && idText(p.name) === "__proto__" || isStringLiteral(p.name) && p.name.text === "__proto__") + ); } function hasKeyAfterPropsSpread(node) { let spread = false; @@ -101767,7 +102411,7 @@ function transformJsx(context) { } function transformJsxSpreadAttributeToProps(node) { if (isObjectLiteralExpression(node.expression) && !hasProto(node.expression)) { - return node.expression.properties; + return sameMap(node.expression.properties, (p) => Debug.checkDefined(visitNode(p, visitor, isObjectLiteralElementLike))); } return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))); } @@ -102335,7 +102979,7 @@ function transformES2015(context) { hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithSuperCall */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -102345,7 +102989,7 @@ function transformES2015(context) { ) || isBlock(node)); } function shouldVisitNode(node) { - return (node.transformFlags & 1024 /* ContainsES2015 */) !== 0 || convertedLoopState !== void 0 || hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */ && isOrMayContainReturnCompletion(node) || isIterationStatement( + return (node.transformFlags & 1024 /* ContainsES2015 */) !== 0 || convertedLoopState !== void 0 || hierarchyFacts & 8192 /* ConstructorWithSuperCall */ && isOrMayContainReturnCompletion(node) || isIterationStatement( node, /*lookInLabeledStatements*/ false @@ -102378,7 +103022,7 @@ function transformES2015(context) { /*expressionResultIsUnused*/ false ); - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); return result; } return visitorWorker( @@ -102392,6 +103036,7 @@ function transformES2015(context) { function callExpressionVisitor(node) { if (node.kind === 108 /* SuperKeyword */) { return visitSuperKeyword( + node, /*isExpressionOfCall*/ true ); @@ -102501,6 +103146,7 @@ function transformES2015(context) { return visitSpreadElement(node); case 108 /* SuperKeyword */: return visitSuperKeyword( + node, /*isExpressionOfCall*/ false ); @@ -102570,7 +103216,10 @@ function transformES2015(context) { return updated; } function returnCapturedThis(node) { - return setOriginalNode(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */)), node); + return setOriginalNode(factory2.createReturnStatement(createCapturedThis()), node); + } + function createCapturedThis() { + return factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */); } function visitReturnStatement(node) { if (convertedLoopState) { @@ -102594,8 +103243,9 @@ function transformES2015(context) { return visitEachChild(node, visitor, context); } function visitThisKeyword(node) { + hierarchyFacts |= 65536 /* LexicalThis */; if (hierarchyFacts & 2 /* ArrowFunction */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) { - hierarchyFacts |= 65536 /* CapturedLexicalThis */; + hierarchyFacts |= 131072 /* CapturedLexicalThis */; } if (convertedLoopState) { if (hierarchyFacts & 2 /* ArrowFunction */) { @@ -102616,10 +103266,13 @@ function transformES2015(context) { } } if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { - return setOriginalNode(setTextRange( - factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), + return setOriginalNode( + setTextRange( + factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), + node + ), node - ), node); + ); } return node; } @@ -102702,8 +103355,8 @@ function transformES2015(context) { setTextRange(statement, node); startOnNewLine(statement); statements.push(statement); - if (hasSyntacticModifier(node, 1 /* Export */)) { - const exportStatement = hasSyntacticModifier(node, 1024 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node)); + if (hasSyntacticModifier(node, 32 /* Export */)) { + const exportStatement = hasSyntacticModifier(node, 2048 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node)); setOriginalNode(exportStatement, statement); statements.push(exportStatement); } @@ -102731,7 +103384,7 @@ function transformES2015(context) { void 0, /*dotDotDotToken*/ void 0, - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */) + createSyntheticSuper() )] : [], /*type*/ void 0, @@ -102821,7 +103474,7 @@ function transformES2015(context) { setEmitFlags(constructorFunction, 16 /* CapturesThis */); } statements.push(constructorFunction); - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; } function transformConstructorParameters(constructor, hasSynthesizedSuper) { @@ -102845,103 +103498,35 @@ function transformES2015(context) { setEmitFlags(block, 3072 /* NoComments */); return block; } - function transformConstructorBodyWorker(prologueOut, statementsOut, statementsIn, statementOffset, superPath, superPathDepth, constructor, isDerivedClass, hasSynthesizedSuper, isFirstStatement) { - let mayReplaceThis = false; - const superStatementIndex = superPathDepth < superPath.length ? superPath[superPathDepth] : -1; - const leadingStatementsEnd = superStatementIndex >= 0 ? superStatementIndex : statementsIn.length; - if (isFirstStatement && superStatementIndex >= 0) { - let firstMaterialIndex = statementOffset; - while (isFirstStatement && firstMaterialIndex < superStatementIndex) { - const statement = constructor.body.statements[firstMaterialIndex]; - if (!isUninitializedVariableStatement(statement) && !isUsingDeclarationStateVariableStatement(statement)) - break; - firstMaterialIndex++; - } - isFirstStatement = superStatementIndex === firstMaterialIndex; - } - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, leadingStatementsEnd - statementOffset)); - const superStatement = superStatementIndex >= 0 ? statementsIn[superStatementIndex] : void 0; - if (superStatement && isTryStatement(superStatement)) { - const tryBlockStatements = []; - mayReplaceThis = transformConstructorBodyWorker( - prologueOut, - tryBlockStatements, - superStatement.tryBlock.statements, - /*statementOffset*/ - 0, - superPath, - superPathDepth + 1, - constructor, - isDerivedClass, - hasSynthesizedSuper, - isFirstStatement - ); - const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); - setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); - statementsOut.push(factory2.updateTryStatement( - superStatement, - factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), - visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock) - )); - } else { - const superCall = superStatement && getSuperCallFromStatement(superStatement); - let superCallExpression; - if (hasSynthesizedSuper) { - superCallExpression = createDefaultSuperCallOrThis(); - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; - } else if (superCall) { - superCallExpression = visitSuperCallInBody(superCall); - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; - } - if (isDerivedClass || superCallExpression) { - if (superCallExpression && superStatementIndex === statementsIn.length - 1 && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { - const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); - const returnStatement = factory2.createReturnStatement(superCallExpression); - setCommentRange(returnStatement, getCommentRange(superCall2)); - setEmitFlags(superCall2, 3072 /* NoComments */); - statementsOut.push(returnStatement); - return false; - } else { - if (isFirstStatement) { - insertCaptureThisForNode(statementsOut, constructor, superCallExpression || createActualThis()); - } else { - insertCaptureThisForNode(prologueOut, constructor, createActualThis()); - if (superCallExpression) { - addSuperThisCaptureThisForNode(statementsOut, superCallExpression); - } - } - mayReplaceThis = true; - } - } else { - insertCaptureThisForNodeIfNeeded(prologueOut, constructor); - } - } - if (superStatementIndex >= 0) { - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); - } - return mayReplaceThis; - } function isUninitializedVariableStatement(node) { return isVariableStatement(node) && every(node.declarationList.declarations, (decl) => isIdentifier(decl.name) && !decl.initializer); } - function isUsingDeclarationStateVariableStatement(node) { - if (!isVariableStatement(node) || node.declarationList.declarations.length !== 1) - return false; - const varDecl = node.declarationList.declarations[0]; - if (!isIdentifier(varDecl.name) || !varDecl.initializer) - return false; - const initializer = varDecl.initializer; - if (!isObjectLiteralExpression(initializer) || initializer.properties.length !== 3) - return false; - const [stackProp, errorProp, hasErrorProp] = initializer.properties; - if (!isPropertyAssignment(stackProp) || !isIdentifier(stackProp.name) || idText(stackProp.name) !== "stack" || !isArrayLiteralExpression(stackProp.initializer)) - return false; - if (!isPropertyAssignment(errorProp) || !isIdentifier(errorProp.name) || idText(errorProp.name) !== "error" || !isVoidExpression(errorProp.initializer) || !isNumericLiteral(errorProp.initializer.expression)) - return false; - if (!isPropertyAssignment(hasErrorProp) || !isIdentifier(hasErrorProp.name) || idText(hasErrorProp.name) !== "hasError" || hasErrorProp.initializer.kind !== 97 /* FalseKeyword */) + function containsSuperCall(node) { + if (isSuperCall(node)) { + return true; + } + if (!(node.transformFlags & 134217728 /* ContainsLexicalSuper */)) { return false; - return true; + } + switch (node.kind) { + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: + return false; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { + const named = node; + if (isComputedPropertyName(named.name)) { + return !!forEachChild(named.name, containsSuperCall); + } + return false; + } + } + return !!forEachChild(node, containsSuperCall); } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */; @@ -102956,31 +103541,22 @@ function transformES2015(context) { /*statementOffset*/ 0 ); - const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, standardPrologueEnd); - if (hasSynthesizedSuper || superStatementIndices.length > 0) { - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + if (hasSynthesizedSuper || containsSuperCall(constructor.body)) { + hierarchyFacts |= 8192 /* ConstructorWithSuperCall */; } - const mayReplaceThis = transformConstructorBodyWorker( - prologue, - statements, - constructor.body.statements, - standardPrologueEnd, - superStatementIndices, - /*superPathDepth*/ - 0, - constructor, - isDerivedClass, - hasSynthesizedSuper, - /*isFirstStatement*/ - true - // NOTE: this will be recalculated inside of transformConstructorBodyWorker - ); + addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, standardPrologueEnd)); + const mayReplaceThis = isDerivedClass || hierarchyFacts & 8192 /* ConstructorWithSuperCall */; addDefaultValueAssignmentsIfNeeded2(prologue, constructor); addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); insertCaptureNewTargetIfNeeded(prologue, constructor); + if (mayReplaceThis) { + insertCaptureThisForNode(prologue, constructor, createActualThis()); + } else { + insertCaptureThisForNodeIfNeeded(prologue, constructor); + } factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) { - statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); + statements.push(factory2.createReturnStatement(createCapturedThis())); } const body = factory2.createBlock( setTextRange( @@ -102997,6 +103573,230 @@ function transformES2015(context) { true ); setTextRange(body, constructor.body); + return simplifyConstructor(body, constructor.body, hasSynthesizedSuper); + } + function isCapturedThis(node) { + return isGeneratedIdentifier(node) && idText(node) === "_this"; + } + function isSyntheticSuper(node) { + return isGeneratedIdentifier(node) && idText(node) === "_super"; + } + function isThisCapturingVariableStatement(node) { + return isVariableStatement(node) && node.declarationList.declarations.length === 1 && isThisCapturingVariableDeclaration(node.declarationList.declarations[0]); + } + function isThisCapturingVariableDeclaration(node) { + return isVariableDeclaration(node) && isCapturedThis(node.name) && !!node.initializer; + } + function isThisCapturingAssignment(node) { + return isAssignmentExpression( + node, + /*excludeCompoundAssignment*/ + true + ) && isCapturedThis(node.left); + } + function isTransformedSuperCall(node) { + return isCallExpression(node) && isPropertyAccessExpression(node.expression) && isSyntheticSuper(node.expression.expression) && isIdentifier(node.expression.name) && (idText(node.expression.name) === "call" || idText(node.expression.name) === "apply") && node.arguments.length >= 1 && node.arguments[0].kind === 110 /* ThisKeyword */; + } + function isTransformedSuperCallWithFallback(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 57 /* BarBarToken */ && node.right.kind === 110 /* ThisKeyword */ && isTransformedSuperCall(node.left); + } + function isImplicitSuperCall(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && isBinaryExpression(node.left) && node.left.operatorToken.kind === 38 /* ExclamationEqualsEqualsToken */ && isSyntheticSuper(node.left.left) && node.left.right.kind === 106 /* NullKeyword */ && isTransformedSuperCall(node.right) && idText(node.right.expression.name) === "apply"; + } + function isImplicitSuperCallWithFallback(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 57 /* BarBarToken */ && node.right.kind === 110 /* ThisKeyword */ && isImplicitSuperCall(node.left); + } + function isThisCapturingTransformedSuperCallWithFallback(node) { + return isThisCapturingAssignment(node) && isTransformedSuperCallWithFallback(node.right); + } + function isThisCapturingImplicitSuperCallWithFallback(node) { + return isThisCapturingAssignment(node) && isImplicitSuperCallWithFallback(node.right); + } + function isTransformedSuperCallLike(node) { + return isTransformedSuperCall(node) || isTransformedSuperCallWithFallback(node) || isThisCapturingTransformedSuperCallWithFallback(node) || isImplicitSuperCall(node) || isImplicitSuperCallWithFallback(node) || isThisCapturingImplicitSuperCallWithFallback(node); + } + function simplifyConstructorInlineSuperInThisCaptureVariable(body) { + for (let i = 0; i < body.statements.length - 1; i++) { + const statement = body.statements[i]; + if (!isThisCapturingVariableStatement(statement)) { + continue; + } + const varDecl = statement.declarationList.declarations[0]; + if (varDecl.initializer.kind !== 110 /* ThisKeyword */) { + continue; + } + const thisCaptureStatementIndex = i; + let superCallIndex = i + 1; + while (superCallIndex < body.statements.length) { + const statement2 = body.statements[superCallIndex]; + if (isExpressionStatement(statement2)) { + if (isTransformedSuperCallLike(skipOuterExpressions(statement2.expression))) { + break; + } + } + if (isUninitializedVariableStatement(statement2)) { + superCallIndex++; + continue; + } + return body; + } + const following = body.statements[superCallIndex]; + let expression = following.expression; + if (isThisCapturingAssignment(expression)) { + expression = expression.right; + } + const newVarDecl = factory2.updateVariableDeclaration( + varDecl, + varDecl.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + expression + ); + const newDeclList = factory2.updateVariableDeclarationList(statement.declarationList, [newVarDecl]); + const newVarStatement = factory2.createVariableStatement(statement.modifiers, newDeclList); + setOriginalNode(newVarStatement, following); + setTextRange(newVarStatement, following); + const newStatements = factory2.createNodeArray([ + ...body.statements.slice(0, thisCaptureStatementIndex), + // copy statements preceding to `var _this` + ...body.statements.slice(thisCaptureStatementIndex + 1, superCallIndex), + // copy intervening temp variables + newVarStatement, + ...body.statements.slice(superCallIndex + 1) + // copy statements following `super.call(this, ...)` + ]); + setTextRange(newStatements, body.statements); + return factory2.updateBlock(body, newStatements); + } + return body; + } + function simplifyConstructorInlineSuperReturn(body, original) { + for (const statement of original.statements) { + if (statement.transformFlags & 134217728 /* ContainsLexicalSuper */ && !getSuperCallFromStatement(statement)) { + return body; + } + } + const canElideThisCapturingVariable = !(original.transformFlags & 16384 /* ContainsLexicalThis */) && !(hierarchyFacts & 65536 /* LexicalThis */) && !(hierarchyFacts & 131072 /* CapturedLexicalThis */); + for (let i = body.statements.length - 1; i > 0; i--) { + const statement = body.statements[i]; + if (isReturnStatement(statement) && statement.expression && isCapturedThis(statement.expression)) { + const preceding = body.statements[i - 1]; + let expression; + if (isExpressionStatement(preceding) && isThisCapturingTransformedSuperCallWithFallback(skipOuterExpressions(preceding.expression))) { + expression = preceding.expression; + } else if (canElideThisCapturingVariable && isThisCapturingVariableStatement(preceding)) { + const varDecl = preceding.declarationList.declarations[0]; + if (isTransformedSuperCallLike(skipOuterExpressions(varDecl.initializer))) { + expression = factory2.createAssignment( + createCapturedThis(), + varDecl.initializer + ); + } + } + if (!expression) { + break; + } + const newReturnStatement = factory2.createReturnStatement(expression); + setOriginalNode(newReturnStatement, preceding); + setTextRange(newReturnStatement, preceding); + const newStatements = factory2.createNodeArray([ + ...body.statements.slice(0, i - 1), + // copy all statements preceding `_super.call(this, ...)` + newReturnStatement, + ...body.statements.slice(i + 1) + // copy all statements following `return _this;` + ]); + setTextRange(newStatements, body.statements); + return factory2.updateBlock(body, newStatements); + } + } + return body; + } + function elideUnusedThisCaptureWorker(node) { + if (isThisCapturingVariableStatement(node)) { + const varDecl = node.declarationList.declarations[0]; + if (varDecl.initializer.kind === 110 /* ThisKeyword */) { + return void 0; + } + } else if (isThisCapturingAssignment(node)) { + return factory2.createPartiallyEmittedExpression(node.right, node); + } + switch (node.kind) { + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: + return node; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { + const named = node; + if (isComputedPropertyName(named.name)) { + return factory2.replacePropertyName(named, visitEachChild(named.name, elideUnusedThisCaptureWorker, nullTransformationContext)); + } + return node; + } + } + return visitEachChild(node, elideUnusedThisCaptureWorker, nullTransformationContext); + } + function simplifyConstructorElideUnusedThisCapture(body, original) { + if (original.transformFlags & 16384 /* ContainsLexicalThis */ || hierarchyFacts & 65536 /* LexicalThis */ || hierarchyFacts & 131072 /* CapturedLexicalThis */) { + return body; + } + for (const statement of original.statements) { + if (statement.transformFlags & 134217728 /* ContainsLexicalSuper */ && !getSuperCallFromStatement(statement)) { + return body; + } + } + return factory2.updateBlock(body, visitNodes2(body.statements, elideUnusedThisCaptureWorker, isStatement)); + } + function injectSuperPresenceCheckWorker(node) { + if (isTransformedSuperCall(node) && node.arguments.length === 2 && isIdentifier(node.arguments[1]) && idText(node.arguments[1]) === "arguments") { + return factory2.createLogicalAnd( + factory2.createStrictInequality( + createSyntheticSuper(), + factory2.createNull() + ), + node + ); + } + switch (node.kind) { + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: + return node; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { + const named = node; + if (isComputedPropertyName(named.name)) { + return factory2.replacePropertyName(named, visitEachChild(named.name, injectSuperPresenceCheckWorker, nullTransformationContext)); + } + return node; + } + } + return visitEachChild(node, injectSuperPresenceCheckWorker, nullTransformationContext); + } + function complicateConstructorInjectSuperPresenceCheck(body) { + return factory2.updateBlock(body, visitNodes2(body.statements, injectSuperPresenceCheckWorker, isStatement)); + } + function simplifyConstructor(body, original, hasSynthesizedSuper) { + const inputBody = body; + body = simplifyConstructorInlineSuperInThisCaptureVariable(body); + body = simplifyConstructorInlineSuperReturn(body, original); + if (body !== inputBody) { + body = simplifyConstructorElideUnusedThisCapture(body, original); + } + if (hasSynthesizedSuper) { + body = complicateConstructorInjectSuperPresenceCheck(body); + } return body; } function isSufficientlyCoveredByReturnStatements(statement) { @@ -103022,11 +103822,11 @@ function transformES2015(context) { return factory2.createLogicalOr( factory2.createLogicalAnd( factory2.createStrictInequality( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), + createSyntheticSuper(), factory2.createNull() ), factory2.createFunctionApplyCall( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), + createSyntheticSuper(), createActualThis(), factory2.createIdentifier("arguments") ) @@ -103281,24 +104081,12 @@ function transformES2015(context) { return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { + if (hierarchyFacts & 131072 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } return false; } - function addSuperThisCaptureThisForNode(statements, superExpression) { - enableSubstitutionsForCapturedThis(); - const assignSuperExpression = factory2.createExpressionStatement( - factory2.createBinaryExpression( - factory2.createThis(), - 64 /* EqualsToken */, - superExpression - ) - ); - statements.push(assignSuperExpression); - setCommentRange(assignSuperExpression, getOriginalNode(superExpression).parent); - } function insertCaptureThisForNode(statements, node, initializer) { enableSubstitutionsForCapturedThis(); const captureThisStatement = factory2.createVariableStatement( @@ -103306,7 +104094,7 @@ function transformES2015(context) { void 0, factory2.createVariableDeclarationList([ factory2.createVariableDeclaration( - factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), + createCapturedThis(), /*exclamationToken*/ void 0, /*type*/ @@ -103527,7 +104315,7 @@ function transformES2015(context) { } function visitArrowFunction(node) { if (node.transformFlags & 16384 /* ContainsLexicalThis */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) { - hierarchyFacts |= 65536 /* CapturedLexicalThis */; + hierarchyFacts |= 131072 /* CapturedLexicalThis */; } const savedConvertedLoopState = convertedLoopState; convertedLoopState = void 0; @@ -103560,7 +104348,7 @@ function transformES2015(context) { const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name; - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return factory2.updateFunctionExpression( node, @@ -103583,7 +104371,7 @@ function transformES2015(context) { const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name; - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return factory2.updateFunctionDeclaration( node, @@ -103607,7 +104395,7 @@ function transformES2015(context) { if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return setOriginalNode( setTextRange( @@ -103760,7 +104548,7 @@ function transformES2015(context) { return node.declarationList.declarations.length === 1 && !!node.declarationList.declarations[0].initializer && !!(getInternalEmitFlags(node.declarationList.declarations[0].initializer) & 1 /* TypeScriptClassWrapper */); } function visitVariableStatement(node) { - const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); + const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 32 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); let updated; if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { let assignments; @@ -103798,7 +104586,11 @@ function transformES2015(context) { if (node.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } - const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration); + const declarations = visitNodes2( + node.declarations, + node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, + isVariableDeclaration + ); const declarationList = factory2.createVariableDeclarationList(declarations); setOriginalNode(declarationList, node); setTextRange(declarationList, node); @@ -105012,7 +105804,7 @@ function transformES2015(context) { } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); } - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return updated; } @@ -105162,13 +105954,6 @@ function transformES2015(context) { ) ); } - function visitSuperCallInBody(node) { - return visitCallExpressionWithPotentialCapturedThisAssignment( - node, - /*assignToCapturedThis*/ - false - ); - } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 108 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { const { target, thisArg } = factory2.createCallBinding(node.expression, hoistVariableDeclaration); @@ -105205,10 +105990,13 @@ function transformES2015(context) { resultingCall, createActualThis() ); - resultingCall = assignToCapturedThis ? factory2.createAssignment(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), initializer) : initializer; + resultingCall = assignToCapturedThis ? factory2.createAssignment(createCapturedThis(), initializer) : initializer; } return setOriginalNode(resultingCall, node); } + if (isSuperCall(node)) { + hierarchyFacts |= 131072 /* CapturedLexicalThis */; + } return visitEachChild(node, visitor, context); } function visitNewExpression(node) { @@ -105241,11 +106029,7 @@ function transformES2015(context) { // As we visit each element, we return one of two functions to use as the "key": // - `visitSpanOfSpreads` for one or more contiguous `...` spread expressions, i.e. `...a, ...b` in `[1, 2, ...a, ...b]` // - `visitSpanOfNonSpreads` for one or more contiguous non-spread elements, i.e. `1, 2`, in `[1, 2, ...a, ...b]` - spanMap( - elements, - partitionSpread, - (partition, visitPartition, _start, end) => visitPartition(partition, multiLine, hasTrailingComma && end === numElements) - ) + spanMap(elements, partitionSpread, (partition, visitPartition, _start, end) => visitPartition(partition, multiLine, hasTrailingComma && end === numElements)) ); if (segments.length === 1) { const firstSegment = segments[0]; @@ -105339,8 +106123,15 @@ function transformES2015(context) { } return setTextRange(expression, node); } - function visitSuperKeyword(isExpressionOfCall) { - return hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), "prototype") : factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); + function createSyntheticSuper() { + return factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); + } + function visitSuperKeyword(node, isExpressionOfCall) { + const expression = hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(setOriginalNode(createSyntheticSuper(), node), "prototype") : createSyntheticSuper(); + setOriginalNode(expression, node); + setCommentRange(expression, node); + setSourceMapRange(expression, node); + return expression; } function visitMetaProperty(node) { if (node.keywordToken === 105 /* NewKeyword */ && node.name.escapedText === "target") { @@ -105446,7 +106237,7 @@ function transformES2015(context) { } function substituteThisKeyword(node) { if (enabledSubstitutions & 1 /* CapturedThis */ && hierarchyFacts & 16 /* CapturesThis */) { - return setTextRange(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), node); + return setTextRange(createCapturedThis(), node); } return node; } @@ -105897,11 +106688,7 @@ function transformGenerators(context) { ); break; case 212 /* ElementAccessExpression */: - target = factory2.updateElementAccessExpression( - left, - cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), - cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression))) - ); + target = factory2.updateElementAccessExpression(left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))); break; default: target = Debug.checkDefined(visitNode(left, visitor, isExpression)); @@ -105936,12 +106723,7 @@ function transformGenerators(context) { } else if (node.operatorToken.kind === 28 /* CommaToken */) { return visitCommaExpression(node); } - return factory2.updateBinaryExpression( - node, - cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))), - node.operatorToken, - Debug.checkDefined(visitNode(node.right, visitor, isExpression)) - ); + return factory2.updateBinaryExpression(node, cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))), node.operatorToken, Debug.checkDefined(visitNode(node.right, visitor, isExpression))); } return visitEachChild(node, visitor, context); } @@ -106149,11 +106931,7 @@ function transformGenerators(context) { } function visitElementAccessExpression(node) { if (containsYield(node.argumentExpression)) { - return factory2.updateElementAccessExpression( - node, - cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))), - Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)) - ); + return factory2.updateElementAccessExpression(node, cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))), Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))); } return visitEachChild(node, visitor, context); } @@ -106511,12 +107289,7 @@ function transformGenerators(context) { for (const variable of initializer.declarations) { hoistVariableDeclaration(variable.name); } - node = factory2.updateForInStatement( - node, - initializer.declarations[0].name, - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)) - ); + node = factory2.updateForInStatement(node, initializer.declarations[0].name, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))); } else { node = visitEachChild(node, visitor, context); } @@ -107677,12 +108450,14 @@ function transformModule(context) { // Add the dependency array argument: // // ["require", "exports", module1", "module2", ...] - factory2.createArrayLiteralExpression(jsonSourceFile ? emptyArray : [ - factory2.createStringLiteral("require"), - factory2.createStringLiteral("exports"), - ...aliasedModuleNames, - ...unaliasedModuleNames - ]), + factory2.createArrayLiteralExpression( + jsonSourceFile ? emptyArray : [ + factory2.createStringLiteral("require"), + factory2.createStringLiteral("exports"), + ...aliasedModuleNames, + ...unaliasedModuleNames + ] + ), // Add the module body function argument: // // function (require, exports, module1, module2) ... @@ -108408,22 +109183,25 @@ function transformModule(context) { ); } else { const temp = factory2.createTempVariable(hoistVariableDeclaration); - return factory2.createComma(factory2.createAssignment(temp, arg), factory2.createConditionalExpression( - /*condition*/ - factory2.createIdentifier("__syncRequire"), - /*questionToken*/ - void 0, - /*whenTrue*/ - createImportCallExpressionCommonJS( - temp, - /*isInlineable*/ - true - ), - /*colonToken*/ - void 0, - /*whenFalse*/ - createImportCallExpressionAMD(temp, containsLexicalThis) - )); + return factory2.createComma( + factory2.createAssignment(temp, arg), + factory2.createConditionalExpression( + /*condition*/ + factory2.createIdentifier("__syncRequire"), + /*questionToken*/ + void 0, + /*whenTrue*/ + createImportCallExpressionCommonJS( + temp, + /*isInlineable*/ + true + ), + /*colonToken*/ + void 0, + /*whenFalse*/ + createImportCallExpressionAMD(temp, containsLexicalThis) + ) + ); } } function createImportCallExpressionAMD(arg, containsLexicalThis) { @@ -108719,7 +109497,7 @@ function transformModule(context) { Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); let statements; if (moduleKind !== 2 /* AMD */) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -108765,7 +109543,7 @@ function transformModule(context) { ); } } else { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -108864,7 +109642,10 @@ function transformModule(context) { factory2.createExpressionStatement( createExportExpression( factory2.cloneNode(node.exportClause.name), - getHelperExpressionForExport(node, moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : factory2.createIdentifier(idText(node.exportClause.name))) + getHelperExpressionForExport( + node, + moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : factory2.createIdentifier(idText(node.exportClause.name)) + ) ) ), node @@ -108900,7 +109681,7 @@ function transformModule(context) { } function visitFunctionDeclaration(node) { let statements; - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -108937,7 +109718,7 @@ function transformModule(context) { } function visitClassDeclaration(node) { let statements; - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -108971,7 +109752,7 @@ function transformModule(context) { let statements; let variables; let expressions; - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { let modifiers; let removeCommentsOnExpressions = false; for (const variable of node.declarationList.declarations) { @@ -109157,8 +109938,8 @@ function transformModule(context) { return statements; } const seen = new IdentifierNameMap(); - if (hasSyntacticModifier(decl, 1 /* Export */)) { - const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); + if (hasSyntacticModifier(decl, 32 /* Export */)) { + const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); statements = appendExportStatement( statements, seen, @@ -109256,21 +110037,24 @@ function transformModule(context) { factory2.createStringLiteralFromNode(name), factory2.createObjectLiteralExpression([ factory2.createPropertyAssignment("enumerable", factory2.createTrue()), - factory2.createPropertyAssignment("get", factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - [], - /*type*/ - void 0, - factory2.createBlock([factory2.createReturnStatement(value)]) - )) + factory2.createPropertyAssignment( + "get", + factory2.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + [], + /*type*/ + void 0, + factory2.createBlock([factory2.createReturnStatement(value)]) + ) + ) ]) ] ) : factory2.createAssignment( @@ -109642,13 +110426,10 @@ function transformSystemModule(context) { addRange(statements, hoistedStatements); insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); const exportStarFunction = addExportStarIfNeeded(statements); - const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(512 /* Async */) : void 0; + const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(1024 /* Async */) : void 0; const moduleObject = factory2.createObjectLiteralExpression( [ - factory2.createPropertyAssignment( - "setters", - createSettersArray(exportStarFunction, dependencyGroups) - ), + factory2.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)), factory2.createPropertyAssignment( "execute", factory2.createFunctionExpression( @@ -109847,7 +110628,7 @@ function transformSystemModule(context) { factory2.createAssignment(importVariableName, parameterName) ) ); - if (hasSyntacticModifier(entry, 1 /* Export */)) { + if (hasSyntacticModifier(entry, 32 /* Export */)) { statements.push( factory2.createExpressionStatement( factory2.createCallExpression( @@ -110000,7 +110781,7 @@ function transformSystemModule(context) { ); } function visitFunctionDeclaration(node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { hoistedStatements = append( hoistedStatements, factory2.updateFunctionDeclaration( @@ -110087,7 +110868,7 @@ function transformSystemModule(context) { statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList)); } else { let expressions; - const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); + const isExportedDeclaration = hasSyntacticModifier(node, 32 /* Export */); for (const variable of node.declarationList.declarations) { if (variable.initializer) { expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); @@ -110223,8 +111004,8 @@ function transformSystemModule(context) { return statements; } let excludeName; - if (hasSyntacticModifier(decl, 1 /* Export */)) { - const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createStringLiteral("default") : decl.name; + if (hasSyntacticModifier(decl, 32 /* Export */)) { + const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createStringLiteral("default") : decl.name; statements = appendExportStatement(statements, exportName, factory2.getLocalName(decl)); excludeName = getTextOfIdentifierOrLiteral(exportName); } @@ -110894,7 +111675,9 @@ function transformECMAScriptModule(context) { ) ]) ), - factory2.createStringLiteral("module") + factory2.createStringLiteral("module"), + /*attributes*/ + void 0 ); const requireHelperName = factory2.createUniqueName("__require", 16 /* Optimistic */ | 32 /* FileLevel */); const requireStatement = factory2.createVariableStatement( @@ -110967,19 +111750,22 @@ function transformECMAScriptModule(context) { return singleOrMany(statements); } function appendExportsOfImportEqualsDeclaration(statements, node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { - statements = append(statements, factory2.createExportDeclaration( - /*modifiers*/ - void 0, - node.isTypeOnly, - factory2.createNamedExports([factory2.createExportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ + if (hasSyntacticModifier(node, 32 /* Export */)) { + statements = append( + statements, + factory2.createExportDeclaration( + /*modifiers*/ void 0, - idText(node.name) - )]) - )); + node.isTypeOnly, + factory2.createNamedExports([factory2.createExportSpecifier( + /*isTypeOnly*/ + false, + /*propertyName*/ + void 0, + idText(node.name) + )]) + ) + ); } return statements; } @@ -111008,7 +111794,7 @@ function transformECMAScriptModule(context) { ) ), node.moduleSpecifier, - node.assertClause + node.attributes ); setOriginalNode(importDecl, node.exportClause); const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory2.createExportDefault(synthName) : factory2.createExportDeclaration( @@ -111174,7 +111960,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { } else if (isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isIndexSignatureDeclaration(node)) { return getReturnTypeVisibilityError; } else if (isParameter(node)) { - if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 8 /* Private */)) { + if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 2 /* Private */)) { return getVariableDeclarationTypeVisibilityError; } return getParameterDeclarationTypeVisibilityError; @@ -111192,7 +111978,7 @@ function createGetSymbolAccessibilityDiagnosticForNode(node) { function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 2 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) { @@ -111396,7 +112182,7 @@ function getDeclarationDiagnostics(host, resolver, file) { } function hasInternalAnnotation(range, currentSourceFile) { const comment = currentSourceFile.text.substring(range.pos, range.end); - return stringContains(comment, "@internal"); + return comment.includes("@internal"); } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); @@ -111461,8 +112247,7 @@ function transformDeclarations(context) { trackReferencedAmbientModule, trackExternalModuleSymbolOfImportTypeNode, reportNonlocalAugmentation, - reportNonSerializableProperty, - reportImportTypeNodeResolutionModeOverride + reportNonSerializableProperty }; let errorNameNode; let errorFallbackNode; @@ -111491,6 +112276,17 @@ function transformDeclarations(context) { const container = getSourceFileOfNode(node); refs.set(getOriginalNodeId(container), container); } + function trackReferencedAmbientModuleFromImport(node) { + const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(node); + const symbol = moduleSpecifier && resolver.tryFindAmbientModule(moduleSpecifier); + if (symbol == null ? void 0 : symbol.declarations) { + for (const decl of symbol.declarations) { + if (isAmbientModule(decl) && getSourceFileOfNode(decl) !== currentSourceFile) { + trackReferencedAmbientModule(decl, symbol); + } + } + } + } function handleSymbolAccessibilityError(symbolAccessibilityResult) { if (symbolAccessibilityResult.accessibility === 0 /* Accessible */) { if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) { @@ -111506,20 +112302,9 @@ function transformDeclarations(context) { const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); if (errorInfo) { if (errorInfo.typeName) { - context.addDiagnostic(createDiagnosticForNode( - symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - getTextOfNode(errorInfo.typeName), - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName - )); + context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, getTextOfNode(errorInfo.typeName), symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName)); } else { - context.addDiagnostic(createDiagnosticForNode( - symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName - )); + context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName)); } return true; } @@ -111556,41 +112341,22 @@ function transformDeclarations(context) { } function reportInaccessibleUniqueSymbolError() { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - "unique symbol" - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "unique symbol")); } } function reportCyclicStructureError() { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback() - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, errorDeclarationNameWithFallback())); } } function reportInaccessibleThisError() { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - "this" - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "this")); } } function reportLikelyUnsafeImportRequiredError(specifier) { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - specifier - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier)); } } function reportTruncationError() { @@ -111616,11 +112382,6 @@ function transformDeclarations(context) { context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName)); } } - function reportImportTypeNodeResolutionModeOverride() { - if (!isNightly() && (errorNameNode || errorFallbackNode)) { - context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - } function transformDeclarationsForJS(sourceFile, bundled) { const oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = (s) => s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : { @@ -111640,9 +112401,8 @@ function transformDeclarations(context) { refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); let hasNoDefaultLib = false; - const bundle = factory2.createBundle(map( - node.sourceFiles, - (sourceFile) => { + const bundle = factory2.createBundle( + map(node.sourceFiles, (sourceFile) => { if (sourceFile.isDeclarationFile) return void 0; hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib; @@ -111700,18 +112460,19 @@ function transformDeclarations(context) { /*libReferences*/ [] ); - } - ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 315 /* InputFiles */) { - const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); - hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; - collectReferences(sourceFile, refs); - recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, (ref) => [ref.fileName, ref.resolutionMode])); - collectLibs(sourceFile, libs2); - return sourceFile; - } - return prepend; - })); + }), + mapDefined(node.prepends, (prepend) => { + if (prepend.kind === 315 /* InputFiles */) { + const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); + hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; + collectReferences(sourceFile, refs); + recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, (ref) => [ref.fileName, ref.resolutionMode])); + collectLibs(sourceFile, libs2); + return sourceFile; + } + return prepend; + }) + ); bundle.syntheticFileReferences = []; bundle.syntheticTypeReferences = getFileReferencesForUsedTypeReferences(); bundle.syntheticLibReferences = getLibReferences(); @@ -111880,6 +112641,9 @@ function transformDeclarations(context) { if (elem.kind === 232 /* OmittedExpression */) { return elem; } + if (elem.propertyName && isComputedPropertyName(elem.propertyName) && isEntityNameExpression(elem.propertyName.expression)) { + checkEntityNameVisibility(elem.propertyName.expression, enclosingDeclaration); + } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { return factory2.updateBindingElement( elem, @@ -111935,7 +112699,7 @@ function transformDeclarations(context) { return void 0; } function ensureType(node, type, ignorePrivate) { - if (!ignorePrivate && hasEffectiveModifier(node, 8 /* Private */)) { + if (!ignorePrivate && hasEffectiveModifier(node, 2 /* Private */)) { return; } if (shouldPrintWithInitializer(node)) { @@ -112015,7 +112779,7 @@ function transformDeclarations(context) { } } function updateParamsList(node, params, modifierMask) { - if (hasEffectiveModifier(node, 8 /* Private */)) { + if (hasEffectiveModifier(node, 2 /* Private */)) { return factory2.createNodeArray(); } const newParams = map(params, (p) => ensureParameter(p, modifierMask)); @@ -112060,7 +112824,7 @@ function transformDeclarations(context) { return factory2.createNodeArray(newParams || emptyArray); } function ensureTypeParams(node, params) { - return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration); + return hasEffectiveModifier(node, 2 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration); } function isEnclosingDeclaration(node) { return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); @@ -112122,30 +112886,42 @@ function transformDeclarations(context) { decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) + tryGetResolutionModeOverride(decl.attributes) ); } const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0; if (!decl.importClause.namedBindings) { - return visibleDefaultBinding && factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - /*namedBindings*/ - void 0 - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); + return visibleDefaultBinding && factory2.updateImportDeclaration( + decl, + decl.modifiers, + factory2.updateImportClause( + decl.importClause, + decl.importClause.isTypeOnly, + visibleDefaultBinding, + /*namedBindings*/ + void 0 + ), + rewriteModuleSpecifier(decl, decl.moduleSpecifier), + tryGetResolutionModeOverride(decl.attributes) + ); } if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 ); - return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - namedBindings - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : void 0; + return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration( + decl, + decl.modifiers, + factory2.updateImportClause( + decl.importClause, + decl.importClause.isTypeOnly, + visibleDefaultBinding, + namedBindings + ), + rewriteModuleSpecifier(decl, decl.moduleSpecifier), + tryGetResolutionModeOverride(decl.attributes) + ) : void 0; } const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver.isDeclarationVisible(b) ? b : void 0); if (bindingList && bindingList.length || visibleDefaultBinding) { @@ -112159,7 +112935,7 @@ function transformDeclarations(context) { bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) + tryGetResolutionModeOverride(decl.attributes) ); } if (resolver.isImportRequiredByAugmentation(decl)) { @@ -112169,19 +112945,13 @@ function transformDeclarations(context) { /*importClause*/ void 0, rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) + tryGetResolutionModeOverride(decl.attributes) ); } } - function getResolutionModeOverrideForClauseInNightly(assertClause) { - const mode = getResolutionModeOverrideForClause(assertClause); - if (mode !== void 0) { - if (!isNightly()) { - context.addDiagnostic(createDiagnosticForNode(assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - return assertClause; - } - return void 0; + function tryGetResolutionModeOverride(node) { + const mode = getResolutionModeOverride(node); + return node && mode !== void 0 ? node : void 0; } function transformAndReplaceLatePaintedStatements(statements) { while (length(lateMarkedStatements)) { @@ -112240,7 +113010,7 @@ function transformDeclarations(context) { const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { - if (hasEffectiveModifier(input, 8 /* Private */)) { + if (hasEffectiveModifier(input, 2 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) return; return cleanup(factory2.createPropertyDeclaration( @@ -112328,7 +113098,7 @@ function transformDeclarations(context) { input, ensureModifiers(input), input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)), + updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)), ensureType(input, accessorType), /*body*/ void 0 @@ -112345,7 +113115,7 @@ function transformDeclarations(context) { input, ensureModifiers(input), input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)), + updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)), /*body*/ void 0 )); @@ -112464,10 +113234,11 @@ function transformDeclarations(context) { case 205 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); + trackReferencedAmbientModuleFromImport(input); return cleanup(factory2.updateImportTypeNode( input, factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), - input.assertions, + input.attributes, input.qualifier, visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode), input.isTypeOf @@ -112501,7 +113272,7 @@ function transformDeclarations(context) { } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 2 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -112515,13 +113286,14 @@ function transformDeclarations(context) { resultHasExternalModuleIndicator = true; } resultHasScopeMarker = true; + trackReferencedAmbientModuleFromImport(input); return factory2.updateExportDeclaration( input, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), - getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 + tryGetResolutionModeOverride(input.attributes) ); } case 277 /* ExportAssignment */: { @@ -112559,11 +113331,11 @@ function transformDeclarations(context) { return input; } function stripExportModifiers(statement) { - if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 1024 /* Default */) || !canHaveModifiers(statement)) { + if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 2048 /* Default */) || !canHaveModifiers(statement)) { return statement; } - const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (258047 /* All */ ^ 1 /* Export */)); - return factory2.updateModifiers(statement, modifiers); + const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (131071 /* All */ ^ 32 /* Export */)); + return factory2.replaceModifiers(statement, modifiers); } function updateModuleDeclarationAndKeyword(node, modifiers, name, body) { const updated = factory2.updateModuleDeclaration(node, modifiers, name, body); @@ -112589,10 +113361,18 @@ function transformDeclarations(context) { return; switch (input.kind) { case 271 /* ImportEqualsDeclaration */: { - return transformImportEqualsDeclaration(input); + const transformed = transformImportEqualsDeclaration(input); + if (transformed) { + trackReferencedAmbientModuleFromImport(input); + } + return transformed; } case 272 /* ImportDeclaration */: { - return transformImportDeclaration(input); + const transformed = transformImportDeclaration(input); + if (transformed) { + trackReferencedAmbientModuleFromImport(input); + } + return transformed; } } if (isDeclaration(input) && isDeclarationAndNotVisible(input)) @@ -112660,7 +113440,7 @@ function transformDeclarations(context) { fakespace.symbol = props[0].parent; const exportMappings = []; let declarations = mapDefined(props, (p) => { - if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) { + if (!isExpandoPropertyDeclaration(p.valueDeclaration)) { return void 0; } const nameStr = unescapeLeadingUnderscores(p.escapedName); @@ -112686,7 +113466,7 @@ function transformDeclarations(context) { return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(95 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); }); if (!exportMappings.length) { - declarations = mapDefined(declarations, (declaration) => factory2.updateModifiers(declaration, 0 /* None */)); + declarations = mapDefined(declarations, (declaration) => factory2.replaceModifiers(declaration, 0 /* None */)); } else { declarations.push(factory2.createExportDeclaration( /*modifiers*/ @@ -112704,10 +113484,10 @@ function transformDeclarations(context) { )); } const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */); - if (!hasEffectiveModifier(clean2, 1024 /* Default */)) { + if (!hasEffectiveModifier(clean2, 2048 /* Default */)) { return [clean2, namespaceDecl]; } - const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~1025 /* ExportDefault */ | 2 /* Ambient */); + const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~2080 /* ExportDefault */ | 128 /* Ambient */); const cleanDeclaration = factory2.updateFunctionDeclaration( clean2, modifiers, @@ -112799,17 +113579,20 @@ function transformDeclarations(context) { if (ctor) { const oldDiag2 = getSymbolAccessibilityDiagnostic; parameterProperties = compact(flatMap(ctor.parameters, (param) => { - if (!hasSyntacticModifier(param, 16476 /* ParameterPropertyModifier */) || shouldStripInternal(param)) + if (!hasSyntacticModifier(param, 31 /* ParameterPropertyModifier */) || shouldStripInternal(param)) return; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(param); if (param.name.kind === 80 /* Identifier */) { - return preserveJsDoc(factory2.createPropertyDeclaration( - ensureModifiers(param), - param.name, - param.questionToken, - ensureType(param, param.type), - ensureNoInitializer(param) - ), param); + return preserveJsDoc( + factory2.createPropertyDeclaration( + ensureModifiers(param), + param.name, + param.questionToken, + ensureType(param, param.type), + ensureNoInitializer(param) + ), + param + ); } else { return walkBindingPattern(param.name); } @@ -112885,14 +113668,17 @@ function transformDeclarations(context) { } return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 106 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); })); - return [statement, cleanup(factory2.updateClassDeclaration( - input, - modifiers, - input.name, - typeParameters, - heritageClauses, - members - ))]; + return [ + statement, + cleanup(factory2.updateClassDeclaration( + input, + modifiers, + input.name, + typeParameters, + heritageClauses, + members + )) + ]; } else { const heritageClauses = transformHeritageClauses(input.heritageClauses); return cleanup(factory2.updateClassDeclaration( @@ -112909,12 +113695,17 @@ function transformDeclarations(context) { return cleanup(transformVariableStatement(input)); } case 266 /* EnumDeclaration */: { - return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { - if (shouldStripInternal(m)) - return; - const constValue = resolver.getConstantValue(m); - return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m); - })))); + return cleanup(factory2.updateEnumDeclaration( + input, + factory2.createNodeArray(ensureModifiers(input)), + input.name, + factory2.createNodeArray(mapDefined(input.members, (m) => { + if (shouldStripInternal(m)) + return; + const constValue = resolver.getConstantValue(m); + return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m); + })) + )); } } return Debug.assertNever(input, `Unhandled top-level node in declaration emit: ${Debug.formatSyntaxKind(input.kind)}`); @@ -113016,11 +113807,11 @@ function transformDeclarations(context) { return factory2.createModifiersFromModifierFlags(newFlags); } function ensureModifierFlags(node) { - let mask2 = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); - let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; + let mask2 = 131071 /* All */ ^ (1 /* Public */ | 1024 /* Async */ | 16 /* Override */); + let additions = needsDeclare && !isAlwaysType(node) ? 128 /* Ambient */ : 0 /* None */; const parentIsFile = node.parent.kind === 312 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { - mask2 ^= 2 /* Ambient */; + mask2 ^= 128 /* Ambient */; additions = 0 /* None */; } return maskModifierFlags(node, mask2, additions); @@ -113038,9 +113829,19 @@ function transformDeclarations(context) { return accessorType; } function transformHeritageClauses(nodes) { - return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => { - return isEntityNameExpression(t.expression) || clause.token === 96 /* ExtendsKeyword */ && t.expression.kind === 106 /* NullKeyword */; - })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length)); + return factory2.createNodeArray(filter( + map(nodes, (clause) => factory2.updateHeritageClause( + clause, + visitNodes2( + factory2.createNodeArray(filter(clause.types, (t) => { + return isEntityNameExpression(t.expression) || clause.token === 96 /* ExtendsKeyword */ && t.expression.kind === 106 /* NullKeyword */; + })), + visitDeclarationSubtree, + isExpressionWithTypeArguments + ) + )), + (clause) => clause.types && !!clause.types.length + )); } } function isAlwaysType(node) { @@ -113052,13 +113853,13 @@ function isAlwaysType(node) { function maskModifiers(factory2, node, modifierMask, modifierAdditions) { return factory2.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions)); } -function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public */, modifierAdditions = 0 /* None */) { +function maskModifierFlags(node, modifierMask = 131071 /* All */ ^ 1 /* Public */, modifierAdditions = 0 /* None */) { let flags = getEffectiveModifierFlags(node) & modifierMask | modifierAdditions; - if (flags & 1024 /* Default */ && !(flags & 1 /* Export */)) { - flags ^= 1 /* Export */; + if (flags & 2048 /* Default */ && !(flags & 32 /* Export */)) { + flags ^= 32 /* Export */; } - if (flags & 1024 /* Default */ && flags & 2 /* Ambient */) { - flags ^= 2 /* Ambient */; + if (flags & 2048 /* Default */ && flags & 128 /* Ambient */) { + flags ^= 128 /* Ambient */; } return flags; } @@ -113071,7 +113872,7 @@ function canHaveLiteralInitializer(node) { switch (node.kind) { case 172 /* PropertyDeclaration */: case 171 /* PropertySignature */: - return !hasEffectiveModifier(node, 8 /* Private */); + return !hasEffectiveModifier(node, 2 /* Private */); case 169 /* Parameter */: case 260 /* VariableDeclaration */: return true; @@ -113959,6 +114760,7 @@ function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, decla inlineSourceMap: compilerOptions.inlineSourceMap, extendedDiagnostics: compilerOptions.extendedDiagnostics, onlyPrintJsDocStyle: true, + omitBraceSourceMapPositions: true, writeBundleFileInfo: !!bundleBuildInfo, recordInternalSection: !!bundleBuildInfo, relativeToBuildInfo @@ -114183,7 +114985,8 @@ var notImplementedResolver = { getSymbolOfExternalModuleSpecifier: notImplemented, isBindingCapturedByNode: notImplemented, getDeclarationStatementsForSourceFile: notImplemented, - isImportRequiredByAugmentation: notImplemented + isImportRequiredByAugmentation: notImplemented, + tryFindAmbientModule: notImplemented }; function createSourceFilesFromBundleBuildInfo(bundle, buildInfoDirectory, host) { var _a; @@ -114369,6 +115172,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { onAfterEmitToken } = handlers; var extendedDiagnostics = !!printerOptions.extendedDiagnostics; + var omitBraceSourcePositions = !!printerOptions.omitBraceSourceMapPositions; var newLine = getNewLineCharacter(printerOptions); var moduleKind = getEmitModuleKind(printerOptions); var bundledHelpers = /* @__PURE__ */ new Map(); @@ -115003,10 +115807,10 @@ function createPrinter(printerOptions = {}, handlers = {}) { return emitNamedExports(node); case 281 /* ExportSpecifier */: return emitExportSpecifier(node); - case 300 /* AssertClause */: - return emitAssertClause(node); - case 301 /* AssertEntry */: - return emitAssertEntry(node); + case 300 /* ImportAttributes */: + return emitImportAttributes(node); + case 301 /* ImportAttribute */: + return emitImportAttribute(node); case 282 /* MissingDeclaration */: return; case 283 /* ExternalModuleReference */: @@ -115388,14 +116192,8 @@ function createPrinter(printerOptions = {}, handlers = {}) { nonEscapingWrite(`}`); } function emitTabStop(hint, node, snippet) { - Debug.assert( - node.kind === 242 /* EmptyStatement */, - `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` - ); - Debug.assert( - hint !== 5 /* EmbeddedStatement */, - `A tab stop cannot be attached to an embedded statement.` - ); + Debug.assert(node.kind === 242 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.`); + Debug.assert(hint !== 5 /* EmbeddedStatement */, `A tab stop cannot be attached to an embedded statement.`); nonEscapingWrite(`$${snippet.order}`); } function emitIdentifier(node) { @@ -115787,16 +116585,16 @@ function createPrinter(printerOptions = {}, handlers = {}) { writeKeyword("import"); writePunctuation("("); emit(node.argument); - if (node.assertions) { + if (node.attributes) { writePunctuation(","); writeSpace(); writePunctuation("{"); writeSpace(); - writeKeyword("assert"); + writeKeyword(node.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with"); writePunctuation(":"); writeSpace(); - const elements = node.assertions.assertClause.elements; - emitList(node.assertions.assertClause, elements, 526226 /* ImportClauseEntries */); + const elements = node.attributes.elements; + emitList(node.attributes, elements, 526226 /* ImportAttributes */); writeSpace(); writePunctuation("}"); } @@ -115888,7 +116686,7 @@ function createPrinter(printerOptions = {}, handlers = {}) { /*jsxAttributeEscape*/ false ); - return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */)); + return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !text.includes(tokenToString(25 /* DotToken */)) && !text.includes(String.fromCharCode(69 /* E */)) && !text.includes(String.fromCharCode(101 /* e */)); } else if (isAccessExpression(expression)) { const constantValue = getConstantValue(expression); return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue; @@ -116370,7 +117168,11 @@ function createPrinter(printerOptions = {}, handlers = {}) { decreaseIndent(); } } - pos = writeTokenText(token, writer2, pos); + if (!omitBraceSourcePositions && (token === 19 /* OpenBraceToken */ || token === 20 /* CloseBraceToken */)) { + pos = writeToken(token, pos, writer2, contextNode); + } else { + pos = writeTokenText(token, writer2, pos); + } if (isSimilarNode && contextNode.end !== pos) { const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */; emitTrailingCommentsOfPosition( @@ -116781,8 +117583,8 @@ function createPrinter(printerOptions = {}, handlers = {}) { writeSpace(); } emitExpression(node.moduleSpecifier); - if (node.assertClause) { - emitWithLeadingSpace(node.assertClause); + if (node.attributes) { + emitWithLeadingSpace(node.attributes); } writeTrailingSemicolon(); } @@ -116820,7 +117622,10 @@ function createPrinter(printerOptions = {}, handlers = {}) { emitTokenWithComment(90 /* DefaultKeyword */, nextPos, writeKeyword, node); } writeSpace(); - emitExpression(node.expression, node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(64 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault); + emitExpression( + node.expression, + node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(64 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault + ); writeTrailingSemicolon(); } function emitExportDeclaration(node) { @@ -116848,18 +117653,18 @@ function createPrinter(printerOptions = {}, handlers = {}) { writeSpace(); emitExpression(node.moduleSpecifier); } - if (node.assertClause) { - emitWithLeadingSpace(node.assertClause); + if (node.attributes) { + emitWithLeadingSpace(node.attributes); } writeTrailingSemicolon(); } - function emitAssertClause(node) { - emitTokenWithComment(132 /* AssertKeyword */, node.pos, writeKeyword, node); + function emitImportAttributes(node) { + emitTokenWithComment(node.token, node.pos, writeKeyword, node); writeSpace(); const elements = node.elements; - emitList(node, elements, 526226 /* ImportClauseEntries */); + emitList(node, elements, 526226 /* ImportAttributes */); } - function emitAssertEntry(node) { + function emitImportAttribute(node) { emit(node.name); writePunctuation(":"); writeSpace(); @@ -117718,6 +118523,16 @@ function createPrinter(printerOptions = {}, handlers = {}) { increaseIndent(); shouldDecreaseIndentAfterEmit = true; } + if (shouldEmitInterveningComments && format & 60 /* DelimitersMask */ && !positionIsSynthesized(child.pos)) { + const commentRange = getCommentRange(child); + emitTrailingCommentsOfPosition( + commentRange.pos, + /*prefixSpace*/ + !!(format & 512 /* SpaceBetweenSiblings */), + /*forceNoNewline*/ + true + ); + } writeLine(separatingLineTerminatorCount); shouldEmitInterveningComments = false; } else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) { @@ -119246,12 +120061,12 @@ function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensi cachedReadDirectoryResult.clear(); } } -var ConfigFileProgramReloadLevel = /* @__PURE__ */ ((ConfigFileProgramReloadLevel2) => { - ConfigFileProgramReloadLevel2[ConfigFileProgramReloadLevel2["None"] = 0] = "None"; - ConfigFileProgramReloadLevel2[ConfigFileProgramReloadLevel2["Partial"] = 1] = "Partial"; - ConfigFileProgramReloadLevel2[ConfigFileProgramReloadLevel2["Full"] = 2] = "Full"; - return ConfigFileProgramReloadLevel2; -})(ConfigFileProgramReloadLevel || {}); +var ProgramUpdateLevel = /* @__PURE__ */ ((ProgramUpdateLevel2) => { + ProgramUpdateLevel2[ProgramUpdateLevel2["Update"] = 0] = "Update"; + ProgramUpdateLevel2[ProgramUpdateLevel2["RootNamesAndUpdate"] = 1] = "RootNamesAndUpdate"; + ProgramUpdateLevel2[ProgramUpdateLevel2["Full"] = 2] = "Full"; + return ProgramUpdateLevel2; +})(ProgramUpdateLevel || {}); function updateSharedExtendedConfigFileWatcher(projectPath, options, extendedConfigFilesMap, createExtendedConfigFileWatch, toPath3) { var _a; const extendedConfigs = arrayToMap(((_a = options == null ? void 0 : options.configFile) == null ? void 0 : _a.extendedSourceFiles) || emptyArray, toPath3); @@ -119360,7 +120175,8 @@ function isIgnoredFileFromWildCardWatching({ currentDirectory, useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, - toPath: toPath3 + toPath: toPath3, + getScriptKind: getScriptKind2 }) { const newPath = removeIgnoredPath(fileOrDirectoryPath); if (!newPath) { @@ -119370,7 +120186,7 @@ function isIgnoredFileFromWildCardWatching({ fileOrDirectoryPath = newPath; if (fileOrDirectoryPath === watchedDirPath) return false; - if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) { + if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) { writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`); return true; } @@ -119399,6 +120215,25 @@ function isIgnoredFileFromWildCardWatching({ function hasSourceFile(file) { return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file); } + function isSupportedScriptKind() { + if (!getScriptKind2) + return false; + const scriptKind = getScriptKind2(fileOrDirectory); + switch (scriptKind) { + case 3 /* TS */: + case 4 /* TSX */: + case 7 /* Deferred */: + case 5 /* External */: + return true; + case 1 /* JS */: + case 2 /* JSX */: + return getAllowJSCompilerOption(options); + case 6 /* JSON */: + return getResolveJsonModule(options); + case 0 /* Unknown */: + return false; + } + } } function isBuilderProgram(program) { return !!program.getState; @@ -119823,17 +120658,17 @@ function formatCodeSpan(file, start2, length2, indent3, squiggleColor, host) { for (let i = firstLine; i <= lastLine; i++) { context += host.getNewLine(); if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent3 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); + context += indent3 + formatColorAndReset(ellipsis.padStart(gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); i = lastLine - 1; } const lineStart = getPositionOfLineAndCharacter(file, i, 0); const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length; let lineContent = file.text.slice(lineStart, lineEnd); - lineContent = trimStringEnd(lineContent); + lineContent = lineContent.trimEnd(); lineContent = lineContent.replace(/\t/g, " "); - context += indent3 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent3 + formatColorAndReset((i + 1 + "").padStart(gutterWidth), gutterStyleSequence) + gutterSeparator; context += lineContent + host.getNewLine(); - context += indent3 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent3 + formatColorAndReset("".padStart(gutterWidth), gutterStyleSequence) + gutterSeparator; context += squiggleColor; if (i === firstLine) { const lastCharForLine = i === lastLine ? lastLineChar : void 0; @@ -119916,8 +120751,6 @@ function getModeForFileReference(ref, containingFileMode) { return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode; } function getModeForResolutionAtIndex(file, index) { - if (file.impliedNodeFormat === void 0) - return void 0; return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index)); } function isExclusivelyTypeOnlyImportOrExport(decl) { @@ -119931,42 +120764,48 @@ function isExclusivelyTypeOnlyImportOrExport(decl) { return false; } function getModeForUsageLocation(file, usage) { - var _a, _b; - if (file.impliedNodeFormat === void 0) - return void 0; + var _a; if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent)) { const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent); if (isTypeOnly) { - const override = getResolutionModeOverrideForClause(usage.parent.assertClause); + const override = getResolutionModeOverride(usage.parent.attributes); if (override) { return override; } } } if (usage.parent.parent && isImportTypeNode(usage.parent.parent)) { - const override = getResolutionModeOverrideForClause((_a = usage.parent.parent.assertions) == null ? void 0 : _a.assertClause); + const override = getResolutionModeOverride(usage.parent.parent.attributes); if (override) { return override; } } + if (file.impliedNodeFormat === void 0) + return void 0; if (file.impliedNodeFormat !== 99 /* ESNext */) { return isImportCall(walkUpParenthesizedExpressions(usage.parent)) ? 99 /* ESNext */ : 1 /* CommonJS */; } - const exprParentParent = (_b = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _b.parent; + const exprParentParent = (_a = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _a.parent; return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? 1 /* CommonJS */ : 99 /* ESNext */; } -function getResolutionModeOverrideForClause(clause, grammarErrorOnNode) { - if (!clause) +function getResolutionModeOverride(node, grammarErrorOnNode) { + if (!node) return void 0; - if (length(clause.elements) !== 1) { - grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(clause, Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require); + if (length(node.elements) !== 1) { + grammarErrorOnNode == null ? void 0 : grammarErrorOnNode( + node, + node.token === 118 /* WithKeyword */ ? Diagnostics.Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require : Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require + ); return void 0; } - const elem = clause.elements[0]; + const elem = node.elements[0]; if (!isStringLiteralLike(elem.name)) return void 0; if (elem.name.text !== "resolution-mode") { - grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(elem.name, Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions); + grammarErrorOnNode == null ? void 0 : grammarErrorOnNode( + elem.name, + node.token === 118 /* WithKeyword */ ? Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_attributes : Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions + ); return void 0; } if (!isStringLiteralLike(elem.value)) @@ -120109,15 +120948,15 @@ function isReferencedFile(reason) { function isReferenceFileLocation(location) { return location.pos !== void 0; } -function getReferencedFileLocation(getSourceFileByPath, ref) { - var _a, _b, _c, _d, _e, _f; - const file = Debug.checkDefined(getSourceFileByPath(ref.file)); +function getReferencedFileLocation(program, ref) { + var _a, _b, _c, _d; + const file = Debug.checkDefined(program.getSourceFileByPath(ref.file)); const { kind, index } = ref; let pos, end, packageId, resolutionMode; switch (kind) { case 3 /* Import */: const importLiteral = getModuleNameStringLiteralAt(file, index); - packageId = (_c = (_b = (_a = file.resolvedModules) == null ? void 0 : _a.get(importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.packageId; + packageId = (_b = (_a = program.getResolvedModule(file, importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.packageId; if (importLiteral.pos === -1) return { file, packageId, text: importLiteral.text }; pos = skipTrivia(file.text, importLiteral.pos); @@ -120128,7 +120967,7 @@ function getReferencedFileLocation(getSourceFileByPath, ref) { break; case 5 /* TypeReferenceDirective */: ({ pos, end, resolutionMode } = file.typeReferenceDirectives[index]); - packageId = (_f = (_e = (_d = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _d.get(toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _e.resolvedTypeReferenceDirective) == null ? void 0 : _f.packageId; + packageId = (_d = (_c = program.getResolvedTypeReferenceDirective(file, toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _c.resolvedTypeReferenceDirective) == null ? void 0 : _d.packageId; break; case 7 /* LibReferenceDirective */: ({ pos, end } = file.libReferenceDirectives[index]); @@ -120265,7 +121104,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([ Diagnostics.Classes_may_not_have_a_field_named_constructor.code, 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, Diagnostics.Duplicate_label_0.code, - Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, + Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, @@ -120346,6 +121185,10 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config let automaticTypeDirectiveResolutions; let resolvedLibReferences; let resolvedLibProcessing; + let resolvedModules; + let resolvedModulesProcessing; + let resolvedTypeReferenceDirectiveNames; + let resolvedTypeReferenceDirectiveNamesProcessing; let packageMap; const maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0; let currentNodeModulesDepth = 0; @@ -120421,7 +121264,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config getCanonicalFileName, /*options*/ void 0, - moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache() + moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(), + moduleResolutionCache == null ? void 0 : moduleResolutionCache.optionsToRedirectsKey ); actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( typeDirectiveNames, @@ -120609,6 +121453,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } oldProgram = void 0; resolvedLibProcessing = void 0; + resolvedModulesProcessing = void 0; + resolvedTypeReferenceDirectiveNamesProcessing = void 0; const program = { getRootFileNames: () => rootNames, getSourceFile, @@ -120650,7 +121496,13 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config sourceFileToPackageName, redirectTargetsMap, usesUriStyleNodeCoreModules, + resolvedModules, + resolvedTypeReferenceDirectiveNames, resolvedLibReferences, + getResolvedModule, + getResolvedTypeReferenceDirective, + forEachResolvedModule, + forEachResolvedTypeReferenceDirective, getCurrentPackagesMap: () => packageMap, typesPackageExists, packageBundlesTypes, @@ -120681,7 +121533,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config case 1 /* FilePreprocessingFileExplainingDiagnostic */: return programDiagnostics.add(createDiagnosticExplainingFile(diagnostic.file && getSourceFileByPath(diagnostic.file), diagnostic.fileProcessingReason, diagnostic.diagnostic, diagnostic.args || emptyArray)); case 0 /* FilePreprocessingReferencedDiagnostic */: - const { file, pos, end } = getReferencedFileLocation(getSourceFileByPath, diagnostic.reason); + const { file, pos, end } = getReferencedFileLocation(program, diagnostic.reason); return programDiagnostics.add(createFileDiagnostic(file, Debug.checkDefined(pos), Debug.checkDefined(end) - pos, diagnostic.diagnostic, ...diagnostic.args || emptyArray)); case 2 /* ResolutionDiagnostics */: return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d)); @@ -120694,17 +121546,34 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config measure("Program", "beforeProgram", "afterProgram"); (_p = tracing) == null ? void 0 : _p.pop(); return program; + function getResolvedModule(file, moduleName, mode) { + var _a2; + return (_a2 = resolvedModules == null ? void 0 : resolvedModules.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode); + } + function getResolvedTypeReferenceDirective(file, typeDirectiveName, mode) { + var _a2; + return (_a2 = resolvedTypeReferenceDirectiveNames == null ? void 0 : resolvedTypeReferenceDirectiveNames.get(file.path)) == null ? void 0 : _a2.get(typeDirectiveName, mode); + } + function forEachResolvedModule(callback, file) { + forEachResolution(resolvedModules, callback, file); + } + function forEachResolvedTypeReferenceDirective(callback, file) { + forEachResolution(resolvedTypeReferenceDirectiveNames, callback, file); + } + function forEachResolution(resolutionCache, callback, file) { + var _a2; + if (file) + (_a2 = resolutionCache == null ? void 0 : resolutionCache.get(file.path)) == null ? void 0 : _a2.forEach((resolution, name, mode) => callback(resolution, name, mode, file.path)); + else + resolutionCache == null ? void 0 : resolutionCache.forEach((resolutions, filePath) => resolutions.forEach((resolution, name, mode) => callback(resolution, name, mode, filePath))); + } function getPackagesMap() { if (packageMap) return packageMap; packageMap = /* @__PURE__ */ new Map(); - files.forEach((sf) => { - if (!sf.resolvedModules) - return; - sf.resolvedModules.forEach(({ resolvedModule }) => { - if (resolvedModule == null ? void 0 : resolvedModule.packageId) - packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name)); - }); + forEachResolvedModule(({ resolvedModule }) => { + if (resolvedModule == null ? void 0 : resolvedModule.packageId) + packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name)); }); return packageMap; } @@ -120771,7 +121640,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path); if (resultFromDts) return resultFromDts; - if (!host.realpath || !options.preserveSymlinks || !stringContains(file.originalFileName, nodeModulesPathPart)) + if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart)) return void 0; const realDeclarationPath = toPath3(host.realpath(file.originalFileName)); return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath); @@ -120837,7 +121706,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config return classifiableNames; } function resolveModuleNamesReusingOldState(moduleNames, file) { - var _a2; if (structureIsReused === 0 /* Not */ && !file.ambientModuleNames.length) { return resolveModuleNamesWorker( moduleNames, @@ -120846,24 +121714,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config void 0 ); } - const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName); - if (oldSourceFile !== file && file.resolvedModules) { - const result2 = []; - for (const moduleName of moduleNames) { - const resolvedModule = file.resolvedModules.get(moduleName.text, getModeForUsageLocation(file, moduleName)); - result2.push(resolvedModule); - } - return result2; - } let unknownModuleNames; let result; let reusedNames; const predictedToResolveToAmbientModuleMarker = emptyResolution; + const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName); for (let i = 0; i < moduleNames.length; i++) { const moduleName = moduleNames[i]; - if (file === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path)) { + if (file === oldSourceFile && !hasInvalidatedResolutions(file.path)) { const mode = getModeForUsageLocation(file, moduleName); - const oldResolution = (_a2 = oldSourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleName.text, mode); + const oldResolution = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, mode); if (oldResolution == null ? void 0 : oldResolution.resolvedModule) { if (isTraceEnabled(options, host)) { trace( @@ -120910,7 +121770,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config Debug.assert(j === resolutions.length); return result; function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) { - const resolutionToFile = getResolvedModule(oldSourceFile, moduleName.text, getModeForUsageLocation(file, moduleName)); + var _a2; + const resolutionToFile = (_a2 = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, getModeForUsageLocation(file, moduleName))) == null ? void 0 : _a2.resolvedModule; const resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName); if (resolutionToFile && resolvedFile) { return false; @@ -120935,28 +121796,18 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config void 0 ); } - const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0; - if (!isString(containingFile)) { - if (oldSourceFile !== containingFile && containingFile.resolvedTypeReferenceDirectiveNames) { - const result2 = []; - for (const typeDirectiveName of typeDirectiveNames) { - const resolvedTypeReferenceDirective = containingFile.resolvedTypeReferenceDirectiveNames.get(getTypeReferenceResolutionName(typeDirectiveName), getModeForFileReference(typeDirectiveName, containingFile.impliedNodeFormat)); - result2.push(resolvedTypeReferenceDirective); - } - return result2; - } - } let unknownTypeReferenceDirectiveNames; let result; let reusedNames; const containingSourceFile = !isString(containingFile) ? containingFile : void 0; - const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path) : !hasInvalidatedResolutions(toPath3(containingFile)); + const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0; + const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(containingFile.path) : !hasInvalidatedResolutions(toPath3(containingFile)); for (let i = 0; i < typeDirectiveNames.length; i++) { const entry = typeDirectiveNames[i]; if (canReuseResolutions) { const typeDirectiveName = getTypeReferenceResolutionName(entry); const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat); - const oldResolution = (_a2 = !isString(containingFile) ? oldSourceFile == null ? void 0 : oldSourceFile.resolvedTypeReferenceDirectiveNames : oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(typeDirectiveName, mode); + const oldResolution = !isString(containingFile) ? oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(containingFile, typeDirectiveName, mode) : (_a2 = oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(typeDirectiveName, mode); if (oldResolution == null ? void 0 : oldResolution.resolvedTypeReferenceDirective) { if (isTraceEnabled(options, host)) { trace( @@ -121118,43 +121969,47 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config structureIsReused = 1 /* SafeModules */; } } - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); + modifiedSourceFiles.push(newSourceFile); } else if (hasInvalidatedResolutions(oldSourceFile.path)) { structureIsReused = 1 /* SafeModules */; - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); + modifiedSourceFiles.push(newSourceFile); + } else { + for (const moduleName of oldSourceFile.ambientModuleNames) { + ambientModuleNameToUnmodifiedFileName.set(moduleName, oldSourceFile.fileName); + } } newSourceFiles.push(newSourceFile); } if (structureIsReused !== 2 /* Completely */) { return structureIsReused; } - const modifiedFiles = modifiedSourceFiles.map((f) => f.oldFile); - for (const oldFile of oldSourceFiles) { - if (!contains(modifiedFiles, oldFile)) { - for (const moduleName of oldFile.ambientModuleNames) { - ambientModuleNameToUnmodifiedFileName.set(moduleName, oldFile.fileName); - } - } - } - for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) { + for (const newSourceFile of modifiedSourceFiles) { const moduleNames = getModuleNames(newSourceFile); const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile); - const resolutionsChanged = hasChangesInResolutions(moduleNames, newSourceFile, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo, moduleResolutionNameAndModeGetter); - if (resolutionsChanged) { + (resolvedModulesProcessing ?? (resolvedModulesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, resolutions); + const resolutionsChanged = hasChangesInResolutions( + moduleNames, + newSourceFile, + resolutions, + (name, mode) => oldProgram.getResolvedModule(newSourceFile, name, mode), + moduleResolutionIsEqualTo, + moduleResolutionNameAndModeGetter + ); + if (resolutionsChanged) structureIsReused = 1 /* SafeModules */; - newSourceFile.resolvedModules = zipToModeAwareCache(newSourceFile, moduleNames, resolutions, moduleResolutionNameAndModeGetter); - } else { - newSourceFile.resolvedModules = oldSourceFile.resolvedModules; - } const typesReferenceDirectives = newSourceFile.typeReferenceDirectives; const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile); - const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, newSourceFile, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, typeDirectiveIsEqualTo, typeReferenceResolutionNameAndModeGetter); - if (typeReferenceResolutionsChanged) { + (resolvedTypeReferenceDirectiveNamesProcessing ?? (resolvedTypeReferenceDirectiveNamesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, typeReferenceResolutions); + const typeReferenceResolutionsChanged = hasChangesInResolutions( + typesReferenceDirectives, + newSourceFile, + typeReferenceResolutions, + (name, mode) => oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(newSourceFile, name, mode), + typeDirectiveIsEqualTo, + typeReferenceResolutionNameAndModeGetter + ); + if (typeReferenceResolutionsChanged) structureIsReused = 1 /* SafeModules */; - newSourceFile.resolvedTypeReferenceDirectiveNames = zipToModeAwareCache(newSourceFile, typesReferenceDirectives, typeReferenceResolutions, typeReferenceResolutionNameAndModeGetter); - } else { - newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames; - } } if (structureIsReused !== 2 /* Completely */) { return structureIsReused; @@ -121201,6 +122056,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config sourceFileToPackageName = oldProgram.sourceFileToPackageName; redirectTargetsMap = oldProgram.redirectTargetsMap; usesUriStyleNodeCoreModules = oldProgram.usesUriStyleNodeCoreModules; + resolvedModules = oldProgram.resolvedModules; + resolvedTypeReferenceDirectiveNames = oldProgram.resolvedTypeReferenceDirectiveNames; resolvedLibReferences = oldProgram.resolvedLibReferences; packageMap = oldProgram.getCurrentPackagesMap(); return 2 /* Completely */; @@ -121781,7 +122638,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config /*importClause*/ void 0, externalHelpersModuleReference, - /*assertClause*/ + /*attributes*/ void 0 ); addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */); @@ -121839,7 +122696,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } } } else if (isModuleDeclaration(node)) { - if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 2 /* Ambient */) || file.isDeclarationFile)) { + if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 128 /* Ambient */) || file.isDeclarationFile)) { node.name.parent = node; const nameText = getTextOfIdentifierOrLiteral(node.name); if (isExternalModuleFile || inAmbientModule && !isExternalModuleNameRelative(nameText)) { @@ -122022,14 +122879,14 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config const result = getImpliedNodeFormatForFileWorker(getNormalizedAbsolutePath(fileName, currentDirectory), moduleResolutionCache2 == null ? void 0 : moduleResolutionCache2.getPackageJsonInfoCache(), host2, options2); const languageVersion = getEmitScriptTarget(options2); const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2); - return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 }; + return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode }; } function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { var _a2; const path = toPath3(fileName); if (useSourceOfProjectReferenceRedirect) { let source = getSourceOfProjectReferenceRedirect(path); - if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && stringContains(fileName, nodeModulesPathPart)) { + if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) { const realPath2 = toPath3(host.realpath(fileName)); if (realPath2 !== path) source = getSourceOfProjectReferenceRedirect(realPath2); @@ -122246,25 +123103,17 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } function processTypeReferenceDirectives(file) { const typeDirectives = file.typeReferenceDirectives; - if (!typeDirectives.length) { - file.resolvedTypeReferenceDirectiveNames = void 0; + if (!typeDirectives.length) return; - } - const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file); + const resolutions = (resolvedTypeReferenceDirectiveNamesProcessing == null ? void 0 : resolvedTypeReferenceDirectiveNamesProcessing.get(file.path)) || resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file); + const resolutionsInFile = createModeAwareCache(); + (resolvedTypeReferenceDirectiveNames ?? (resolvedTypeReferenceDirectiveNames = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile); for (let index = 0; index < typeDirectives.length; index++) { const ref = file.typeReferenceDirectives[index]; const resolvedTypeReferenceDirective = resolutions[index]; const fileName = toFileNameLowerCase(ref.fileName); - setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective, getModeForFileReference(ref, file.impliedNodeFormat)); + resolutionsInFile.set(fileName, getModeForFileReference(ref, file.impliedNodeFormat), resolvedTypeReferenceDirective); const mode = ref.resolutionMode || file.impliedNodeFormat; - if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) { - (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({ - kind: 2 /* ResolutionDiagnostics */, - diagnostics: [ - createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext) - ] - }); - } processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index }); } } @@ -122419,14 +123268,16 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config collectExternalModuleReferences(file); if (file.imports.length || file.moduleAugmentations.length) { const moduleNames = getModuleNames(file); - const resolutions = resolveModuleNamesReusingOldState(moduleNames, file); + const resolutions = (resolvedModulesProcessing == null ? void 0 : resolvedModulesProcessing.get(file.path)) || resolveModuleNamesReusingOldState(moduleNames, file); Debug.assert(resolutions.length === moduleNames.length); const optionsForFile = (useSourceOfProjectReferenceRedirect ? (_a2 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a2.commandLine.options : void 0) || options; + const resolutionsInFile = createModeAwareCache(); + (resolvedModules ?? (resolvedModules = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile); for (let index = 0; index < moduleNames.length; index++) { const resolution = resolutions[index].resolvedModule; const moduleName = moduleNames[index].text; const mode = getModeForUsageLocation(file, moduleNames[index]); - setResolvedModule(file, moduleName, resolutions[index], mode); + resolutionsInFile.set(moduleName, mode, resolutions[index]); addResolutionDiagnosticsFromResolutionOrCache(file, moduleName, resolutions[index], mode); if (!resolution) { continue; @@ -122457,8 +123308,6 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config currentNodeModulesDepth--; } } - } else { - file.resolvedModules = void 0; } } function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { @@ -122973,7 +123822,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config processReason(fileProcessingReason); if (locationReason && (fileIncludeReasons == null ? void 0 : fileIncludeReasons.length) === 1) fileIncludeReasons = void 0; - const location = locationReason && getReferencedFileLocation(getSourceFileByPath, locationReason); + const location = locationReason && getReferencedFileLocation(program, locationReason); const fileIncludeReasonDetails = fileIncludeReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon); const redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file); const chain = chainDiagnosticMessages(redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails, diagnostic, ...args || emptyArray); @@ -123009,7 +123858,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config } function fileIncludeReasonToRelatedInformation(reason) { if (isReferencedFile(reason)) { - const referenceLocation = getReferencedFileLocation(getSourceFileByPath, reason); + const referenceLocation = getReferencedFileLocation(program, reason); let message2; switch (reason.kind) { case 3 /* Import */: @@ -123058,19 +123907,11 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config case 1 /* SourceFromProjectReference */: case 2 /* OutputFromProjectReference */: const referencedResolvedRef = Debug.checkDefined(resolvedProjectReferences == null ? void 0 : resolvedProjectReferences[reason.index]); - const referenceInfo = forEachProjectReference( - projectReferences, - resolvedProjectReferences, - (resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent2 == null ? void 0 : parent2.sourceFile) || options.configFile, index: index2 } : void 0 - ); + const referenceInfo = forEachProjectReference(projectReferences, resolvedProjectReferences, (resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent2 == null ? void 0 : parent2.sourceFile) || options.configFile, index: index2 } : void 0); if (!referenceInfo) return void 0; const { sourceFile, index } = referenceInfo; - const referencesSyntax = forEachTsConfigPropArray( - sourceFile, - "references", - (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 - ); + const referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0); return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile( sourceFile, referencesSyntax.elements[index], @@ -123210,11 +124051,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config ); } function createDiagnosticForReference(sourceFile, index, message, ...args) { - const referencesSyntax = forEachTsConfigPropArray( - sourceFile || options.configFile, - "references", - (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 - ); + const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0); if (referencesSyntax && referencesSyntax.elements.length > index) { programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args)); } else { @@ -123310,8 +124147,8 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config if (!symlinks) { symlinks = createSymlinkCache(currentDirectory, getCanonicalFileName); } - if (files && automaticTypeDirectiveResolutions && !symlinks.hasProcessedResolutions()) { - symlinks.setSymlinksFromResolutions(files, automaticTypeDirectiveResolutions); + if (files && !symlinks.hasProcessedResolutions()) { + symlinks.setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, automaticTypeDirectiveResolutions); } return symlinks; } @@ -123401,7 +124238,7 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) { var _a; if (!host.getResolvedProjectReferences() || containsIgnoredPath(directory)) return; - if (!originalRealpath || !stringContains(directory, nodeModulesPathPart)) + if (!originalRealpath || !directory.includes(nodeModulesPathPart)) return; const symlinkCache = host.getSymlinkCache(); const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory)); @@ -123429,7 +124266,7 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host) { if (!symlinkedDirectories) return false; const fileOrDirectoryPath = host.toPath(fileOrDirectory); - if (!stringContains(fileOrDirectoryPath, nodeModulesPathPart)) + if (!fileOrDirectoryPath.includes(nodeModulesPathPart)) return false; if (isFile && ((_a = symlinkCache.getSymlinkedFiles()) == null ? void 0 : _a.has(fileOrDirectoryPath))) return true; @@ -123688,16 +124525,14 @@ var BuilderState; addReferencedFile(referencedPath); } } - if (sourceFile.resolvedTypeReferenceDirectiveNames) { - sourceFile.resolvedTypeReferenceDirectiveNames.forEach(({ resolvedTypeReferenceDirective }) => { - if (!resolvedTypeReferenceDirective) { - return; - } - const fileName = resolvedTypeReferenceDirective.resolvedFileName; - const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName); - addReferencedFile(typeFilePath); - }); - } + program.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective }) => { + if (!resolvedTypeReferenceDirective) { + return; + } + const fileName = resolvedTypeReferenceDirective.resolvedFileName; + const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName); + addReferencedFile(typeFilePath); + }, sourceFile); if (sourceFile.moduleAugmentations.length) { const checker = program.getTypeChecker(); for (const moduleName of sourceFile.moduleAugmentations) { @@ -123816,13 +124651,16 @@ var BuilderState; sourceFile, (fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => { Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`); - onNewSignature(computeSignatureWithDiagnostics( - programOfThisState, - sourceFile, - text, - host, - data - ), sourceFiles); + onNewSignature( + computeSignatureWithDiagnostics( + programOfThisState, + sourceFile, + text, + host, + data + ), + sourceFiles + ); }, cancellationToken, /*emitOnly*/ @@ -124346,10 +125184,7 @@ function removeDiagnosticsOfLibraryFiles(state) { state.cleanedDiagnosticsOfLibFiles = true; const program = Debug.checkDefined(state.program); const options = program.getCompilerOptions(); - forEach( - program.getSourceFiles(), - (f) => program.isSourceFileDefaultLibrary(f) && !skipTypeChecking(f, options, program) && removeSemanticDiagnosticsOf(state, f.resolvedPath) - ); + forEach(program.getSourceFiles(), (f) => program.isSourceFileDefaultLibrary(f) && !skipTypeChecking(f, options, program) && removeSemanticDiagnosticsOf(state, f.resolvedPath)); } } function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, host) { @@ -124417,12 +125252,14 @@ function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, hos state.program, /*firstSourceFile*/ void 0 - ).forEach((file) => handleDtsMayChangeOf( - state, - file.resolvedPath, - cancellationToken, - host - )); + ).forEach( + (file) => handleDtsMayChangeOf( + state, + file.resolvedPath, + cancellationToken, + host + ) + ); removeDiagnosticsOfLibraryFiles(state); return true; } @@ -124455,16 +125292,13 @@ function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, host)) return true; const references = state.referencedMap.getKeys(exportedFromPath); - return references && forEachKey( - references, - (filePath) => handleDtsMayChangeOfFileAndExportsOfFile( - state, - filePath, - seenFileAndExportsOfFile, - cancellationToken, - host - ) - ); + return references && forEachKey(references, (filePath) => handleDtsMayChangeOfFileAndExportsOfFile( + state, + filePath, + seenFileAndExportsOfFile, + cancellationToken, + host + )); }); } function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, host) { @@ -124572,11 +125406,13 @@ function getBuildInfo2(state, bundle) { if (!isJsonSourceFile(file) && sourceFileMayBeEmitted(file, state.program)) { const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(key); if (emitSignature !== actualSignature) { - (emitSignatures || (emitSignatures = [])).push(emitSignature === void 0 ? fileId : ( - // There is no emit, encode as false - // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature - [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature] - )); + (emitSignatures || (emitSignatures = [])).push( + emitSignature === void 0 ? fileId : ( + // There is no emit, encode as false + // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature + [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature] + ) + ); } } } @@ -124835,9 +125671,7 @@ function computeSignatureWithDiagnostics(program, sourceFile, text, host, data) text = getTextHandlingSourceMapForSignature(text, data); let sourceFileDirectory; if ((_a = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a.length) { - text += data.diagnostics.map( - (diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}` - ).join("\n"); + text += data.diagnostics.map((diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}`).join("\n"); } return (host.createHash ?? generateDjb2Hash)(text); function flattenDiagnosticMessageText2(diagnostic) { @@ -125244,9 +126078,7 @@ function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, hos return void 0; } const map2 = BuilderState.createManyToManyPathMap(); - referenceMap.forEach( - ([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId)) - ); + referenceMap.forEach(([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId))); return map2; } } @@ -125322,24 +126154,27 @@ function removeIgnoredPath(path) { if (endsWith(path, "/node_modules/.staging")) { return removeSuffix(path, "/.staging"); } - return some(ignoredPaths, (searchPath) => stringContains(path, searchPath)) ? void 0 : path; + return some(ignoredPaths, (searchPath) => path.includes(searchPath)) ? void 0 : path; } function perceivedOsRootLengthForWatching(pathComponents2, length2) { if (length2 <= 1) return 1; - let userCheckIndex = 1; + let indexAfterOsRoot = 1; let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0; if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) { if (length2 === 2) return 2; - userCheckIndex = 2; + indexAfterOsRoot = 2; isDosStyle = true; } - if (isDosStyle && !pathComponents2[userCheckIndex].match(/^users$/i)) { - return userCheckIndex; + if (isDosStyle && !pathComponents2[indexAfterOsRoot].match(/^users$/i)) { + return indexAfterOsRoot; + } + if (pathComponents2[indexAfterOsRoot].match(/^workspaces$/i)) { + return indexAfterOsRoot + 1; } - return userCheckIndex + 2; + return indexAfterOsRoot + 2; } function canWatchDirectoryOrFile(pathComponents2, length2) { if (length2 === void 0) @@ -125442,6 +126277,50 @@ function getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirec function getRootPathSplitLength(rootPath) { return rootPath.split(directorySeparator).length - (hasTrailingDirectorySeparator(rootPath) ? 1 : 0); } +function getModuleResolutionHost(resolutionHost) { + var _a; + return ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; +} +function createModuleResolutionLoaderUsingGlobalCache(containingFile, redirectedReference, options, resolutionHost, moduleResolutionCache) { + return { + nameAndMode: moduleResolutionNameAndModeGetter, + resolve: (moduleName, resoluionMode) => resolveModuleNameUsingGlobalCache( + resolutionHost, + moduleResolutionCache, + moduleName, + containingFile, + options, + redirectedReference, + resoluionMode + ) + }; +} +function resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, compilerOptions, redirectedReference, mode) { + const host = getModuleResolutionHost(resolutionHost); + const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); + if (!resolutionHost.getGlobalCache) { + return primaryResult; + } + const globalCache = resolutionHost.getGlobalCache(); + if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { + const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( + Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), + resolutionHost.projectName, + compilerOptions, + host, + globalCache, + moduleResolutionCache + ); + if (resolvedModule) { + primaryResult.resolvedModule = resolvedModule; + primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations); + primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations); + primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics); + return primaryResult; + } + } + return primaryResult; +} function createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) { let filesWithChangedSetOfUnresolvedImports; let filesWithInvalidatedResolutions; @@ -125471,7 +126350,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW getCurrentDirectory(), resolutionHost.getCanonicalFileName, resolutionHost.getCompilationSettings(), - moduleResolutionCache.getPackageJsonInfoCache() + moduleResolutionCache.getPackageJsonInfoCache(), + moduleResolutionCache.optionsToRedirectsKey ); const resolvedLibraries = /* @__PURE__ */ new Map(); const libraryResolutionCache = createModuleResolutionCache( @@ -125487,6 +126367,16 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW const rootPathComponents = getPathComponents(rootPath); const typeRootsWatches = /* @__PURE__ */ new Map(); return { + rootDirForResolution, + resolvedModuleNames, + resolvedTypeReferenceDirectives, + resolvedLibraries, + resolvedFileToResolution, + resolutionsWithFailedLookups, + resolutionsWithOnlyAffectingLocations, + directoryWatchesOfFailedLookups, + fileWatchesOfAffectingLocations, + watchFailedLookupLocationsOfExternalModuleResolutions, getModuleResolutionCache: () => moduleResolutionCache, startRecordingFilesWithChangedResolutions, finishRecordingFilesWithChangedResolutions, @@ -125511,10 +126401,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW clear: clear2, onChangesAffectModuleResolution }; - function getResolvedModule2(resolution) { + function getResolvedModule(resolution) { return resolution.resolvedModule; } - function getResolvedTypeReferenceDirective2(resolution) { + function getResolvedTypeReferenceDirective(resolution) { return resolution.resolvedTypeReferenceDirective; } function clear2() { @@ -125577,6 +126467,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW }; } function startCachingPerDirectoryResolution() { + moduleResolutionCache.isReadonly = void 0; + typeReferenceDirectiveResolutionCache.isReadonly = void 0; + libraryResolutionCache.isReadonly = void 0; + moduleResolutionCache.getPackageJsonInfoCache().isReadonly = void 0; moduleResolutionCache.clearAllExceptPackageJsonInfoCache(); typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache(); libraryResolutionCache.clearAllExceptPackageJsonInfoCache(); @@ -125589,8 +126483,8 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW if (!((_a = newProgram == null ? void 0 : newProgram.resolvedLibReferences) == null ? void 0 : _a.has(libFileName))) { stopWatchFailedLookupLocationOfResolution( resolution, - resolutionHost.toPath(getInferredLibraryNameResolveFrom(newProgram.getCompilerOptions(), getCurrentDirectory(), libFileName)), - getResolvedModule2 + resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)), + getResolvedModule ); resolvedLibraries.delete(libFileName); } @@ -125631,58 +126525,26 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW } }); } - directoryWatchesOfFailedLookups.forEach((watcher, path) => { - if (watcher.refCount === 0) { - directoryWatchesOfFailedLookups.delete(path); - watcher.watcher.close(); - } - }); - fileWatchesOfAffectingLocations.forEach((watcher, path) => { - if (watcher.files === 0 && watcher.resolutions === 0) { - fileWatchesOfAffectingLocations.delete(path); - watcher.watcher.close(); - } - }); + directoryWatchesOfFailedLookups.forEach(closeDirectoryWatchesOfFailedLookup); + fileWatchesOfAffectingLocations.forEach(closeFileWatcherOfAffectingLocation); hasChangedAutomaticTypeDirectiveNames = false; + moduleResolutionCache.isReadonly = true; + typeReferenceDirectiveResolutionCache.isReadonly = true; + libraryResolutionCache.isReadonly = true; + moduleResolutionCache.getPackageJsonInfoCache().isReadonly = true; } - function resolveModuleName2(moduleName, containingFile, compilerOptions, redirectedReference, mode) { - var _a; - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; - const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); - if (!resolutionHost.getGlobalCache) { - return primaryResult; + function closeDirectoryWatchesOfFailedLookup(watcher, path) { + if (watcher.refCount === 0) { + directoryWatchesOfFailedLookups.delete(path); + watcher.watcher.close(); } - const globalCache = resolutionHost.getGlobalCache(); - if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { - const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( - Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), - resolutionHost.projectName, - compilerOptions, - host, - globalCache, - moduleResolutionCache - ); - if (resolvedModule) { - primaryResult.resolvedModule = resolvedModule; - primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations); - primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations); - primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics); - return primaryResult; - } - } - return primaryResult; } - function createModuleResolutionLoader2(containingFile, redirectedReference, options) { - return { - nameAndMode: moduleResolutionNameAndModeGetter, - resolve: (moduleName, resoluionMode) => resolveModuleName2( - moduleName, - containingFile, - options, - redirectedReference, - resoluionMode - ) - }; + function closeFileWatcherOfAffectingLocation(watcher, path) { + var _a; + if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) { + fileWatchesOfAffectingLocations.delete(path); + watcher.watcher.close(); + } } function resolveNamesWithLocalCache({ entries, @@ -125698,7 +126560,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW shouldRetryResolution, logChanges }) { - var _a; const path = resolutionHost.toPath(containingFile); const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path); const resolvedModules = []; @@ -125719,16 +126580,18 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW resolutionHost.onDiscoveredSymlink(); } resolutionsInFile.set(name, mode, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); - if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); + if (resolution !== existingResolution) { + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); + if (existingResolution) { + stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); + } } if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) { filesWithChangedSetOfUnresolvedImports.push(path); logChanges = false; } } else { - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; + const host = getModuleResolutionHost(resolutionHost); if (isTraceEnabled(options, host) && !seenNamesInFile.has(name, mode)) { const resolved = getResolutionWithResolvedFileName(resolution); trace( @@ -125745,11 +126608,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW seenNamesInFile.set(name, mode, true); resolvedModules.push(resolution); } - reusedNames == null ? void 0 : reusedNames.forEach((entry) => seenNamesInFile.set( - loader.nameAndMode.getName(entry), - loader.nameAndMode.getMode(entry, containingSourceFile), - true - )); + reusedNames == null ? void 0 : reusedNames.forEach( + (entry) => seenNamesInFile.set( + loader.nameAndMode.getName(entry), + loader.nameAndMode.getMode(entry, containingSourceFile), + true + ) + ); if (resolutionsInFile.size() !== seenNamesInFile.size()) { resolutionsInFile.forEach((resolution, name, mode) => { if (!seenNamesInFile.has(name, mode)) { @@ -125778,7 +126643,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW } } function resolveTypeReferenceDirectiveReferences(typeDirectiveReferences, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { - var _a; return resolveNamesWithLocalCache({ entries: typeDirectiveReferences, containingFile, @@ -125791,10 +126655,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW containingFile, redirectedReference, options, - ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost, + getModuleResolutionHost(resolutionHost), typeReferenceDirectiveResolutionCache ), - getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective2, + getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective, shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0, deferWatchingNonRelativeResolution: false }); @@ -125808,12 +126672,14 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW options, reusedNames, perFileCache: resolvedModuleNames, - loader: createModuleResolutionLoader2( + loader: createModuleResolutionLoaderUsingGlobalCache( containingFile, redirectedReference, - options + options, + resolutionHost, + moduleResolutionCache ), - getResolutionWithResolvedFileName: getResolvedModule2, + getResolutionWithResolvedFileName: getResolvedModule, shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension), logChanges: logChangesWhenResolvingModule, deferWatchingNonRelativeResolution: true @@ -125821,8 +126687,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW }); } function resolveLibrary2(libraryName, resolveFrom, options, libFileName) { - var _a; - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; + const host = getModuleResolutionHost(resolutionHost); let resolution = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName); if (!resolution || resolution.isInvalidated) { const existingResolution = resolution; @@ -125832,17 +126697,17 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW libraryName, resolution, path, - getResolvedModule2, + getResolvedModule, /*deferWatchingNonRelativeResolution*/ false ); resolvedLibraries.set(libFileName, resolution); if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModule2); + stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModule); } } else { if (isTraceEnabled(options, host)) { - const resolved = getResolvedModule2(resolution); + const resolved = getResolvedModule(resolution); trace( host, (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, @@ -125856,6 +126721,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW return resolution; } function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) { + var _a, _b; const path = resolutionHost.toPath(containingFile); const resolutionsInFile = resolvedModuleNames.get(path); const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get( @@ -125865,7 +126731,17 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW ); if (resolution && !resolution.isInvalidated) return resolution; - return resolveModuleName2(moduleName, containingFile, resolutionHost.getCompilationSettings()); + const data = (_a = resolutionHost.beforeResolveSingleModuleNameWithoutWatching) == null ? void 0 : _a.call(resolutionHost, moduleResolutionCache); + const host = getModuleResolutionHost(resolutionHost); + const result = resolveModuleName( + moduleName, + containingFile, + resolutionHost.getCompilationSettings(), + host, + moduleResolutionCache + ); + (_b = resolutionHost.afterResolveSingleModuleNameWithoutWatching) == null ? void 0 : _b.call(resolutionHost, moduleResolutionCache, moduleName, containingFile, result, data); + return result; } function isNodeModulesAtTypesDirectory(dirPath) { return endsWith(dirPath, "/node_modules/@types"); @@ -125965,52 +126841,63 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW return; } let locationToWatch = affectingLocation; + let isSymlink = false; + let symlinkWatcher; if (resolutionHost.realpath) { locationToWatch = resolutionHost.realpath(affectingLocation); if (affectingLocation !== locationToWatch) { - const fileWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch); - if (fileWatcher2) { - if (forResolution) - fileWatcher2.resolutions++; - else - fileWatcher2.files++; - fileWatcher2.paths.add(affectingLocation); - fileWatchesOfAffectingLocations.set(affectingLocation, fileWatcher2); - return; - } - } + isSymlink = true; + symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch); + } + } + const resolutions = forResolution ? 1 : 0; + const files = forResolution ? 0 : 1; + if (!isSymlink || !symlinkWatcher) { + const watcher = { + watcher: canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => { + cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind); + invalidateAffectingFileWatcher(locationToWatch, moduleResolutionCache.getPackageJsonInfoCache().getInternalMap()); + resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); + }) : noopFileWatcher, + resolutions: isSymlink ? 0 : resolutions, + files: isSymlink ? 0 : files, + symlinks: void 0 + }; + fileWatchesOfAffectingLocations.set(locationToWatch, watcher); + if (isSymlink) + symlinkWatcher = watcher; } - const paths = /* @__PURE__ */ new Set(); - paths.add(locationToWatch); - let actualWatcher = canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => { - cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind); - const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap(); - paths.forEach((path) => { - if (watcher.resolutions) - (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path); - if (watcher.files) - (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path); - packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path)); - }); - resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); - }) : noopFileWatcher; - const watcher = { - watcher: actualWatcher !== noopFileWatcher ? { - close: () => { - actualWatcher.close(); - actualWatcher = noopFileWatcher; - } - } : actualWatcher, - resolutions: forResolution ? 1 : 0, - files: forResolution ? 0 : 1, - paths - }; - fileWatchesOfAffectingLocations.set(locationToWatch, watcher); - if (affectingLocation !== locationToWatch) { + if (isSymlink) { + Debug.assert(!!symlinkWatcher); + const watcher = { + watcher: { + close: () => { + var _a; + const symlinkWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch); + if (((_a = symlinkWatcher2 == null ? void 0 : symlinkWatcher2.symlinks) == null ? void 0 : _a.delete(affectingLocation)) && !symlinkWatcher2.symlinks.size && !symlinkWatcher2.resolutions && !symlinkWatcher2.files) { + fileWatchesOfAffectingLocations.delete(locationToWatch); + symlinkWatcher2.watcher.close(); + } + } + }, + resolutions, + files, + symlinks: void 0 + }; fileWatchesOfAffectingLocations.set(affectingLocation, watcher); - paths.add(affectingLocation); + (symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation); } } + function invalidateAffectingFileWatcher(path, packageJsonMap) { + var _a; + const watcher = fileWatchesOfAffectingLocations.get(path); + if (watcher == null ? void 0 : watcher.resolutions) + (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path); + if (watcher == null ? void 0 : watcher.files) + (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path); + (_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path2) => invalidateAffectingFileWatcher(path2, packageJsonMap)); + packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path)); + } function watchFailedLookupLocationOfNonRelativeModuleResolutions(resolutions, name) { const program = resolutionHost.getCurrentProgram(); if (!program || !program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(name)) { @@ -126032,7 +126919,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW directoryWatchesOfFailedLookups.set(dirPath, { watcher: createDirectoryWatcher(dir, dirPath, nonRecursive), refCount: 1, nonRecursive }); } } - function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot) { + function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove) { const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); const toWatch = getDirectoryToWatchFailedLookupLocation( failedLookupLocation, @@ -126047,12 +126934,12 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW if (dirPath === rootPath) { removeAtRoot = true; } else { - removeDirectoryWatcher(dirPath); + removeDirectoryWatcher(dirPath, syncDirWatcherRemove); } } return removeAtRoot; } - function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) { + function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) { Debug.checkDefined(resolution.files).delete(filePath); resolution.refCount--; if (resolution.refCount) { @@ -126070,13 +126957,13 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW let removeAtRoot = false; if (failedLookupLocations) { for (const failedLookupLocation of failedLookupLocations) { - removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot); + removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove); } } if (node10Result) - removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot); + removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot, syncDirWatcherRemove); if (removeAtRoot) - removeDirectoryWatcher(rootPath); + removeDirectoryWatcher(rootPath, syncDirWatcherRemove); } else if (affectingLocations == null ? void 0 : affectingLocations.length) { resolutionsWithOnlyAffectingLocations.delete(resolution); } @@ -126084,12 +126971,16 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW for (const affectingLocation of affectingLocations) { const watcher = fileWatchesOfAffectingLocations.get(affectingLocation); watcher.resolutions--; + if (syncDirWatcherRemove) + closeFileWatcherOfAffectingLocation(watcher, affectingLocation); } } } - function removeDirectoryWatcher(dirPath) { + function removeDirectoryWatcher(dirPath, syncDirWatcherRemove) { const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath); dirWatcher.refCount--; + if (syncDirWatcherRemove) + closeDirectoryWatchesOfFailedLookup(dirWatcher, dirPath); } function createDirectoryWatcher(directory, dirPath, nonRecursive) { return resolutionHost.watchDirectoryOfFailedLookupLocation(directory, (fileOrDirectory) => { @@ -126100,10 +126991,17 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath); }, nonRecursive ? 0 /* None */ : 1 /* Recursive */); } - function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) { + function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) { const resolutions = cache.get(filePath); if (resolutions) { - resolutions.forEach((resolution) => stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName)); + resolutions.forEach( + (resolution) => stopWatchFailedLookupLocationOfResolution( + resolution, + filePath, + getResolutionWithResolvedFileName, + syncDirWatcherRemove + ) + ); cache.delete(filePath); } } @@ -126118,9 +127016,9 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW return; resolvedProjectReference.commandLine.fileNames.forEach((f) => removeResolutionsOfFile(resolutionHost.toPath(f))); } - function removeResolutionsOfFile(filePath) { - removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule2); - removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective2); + function removeResolutionsOfFile(filePath, syncDirWatcherRemove) { + removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule, syncDirWatcherRemove); + removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective, syncDirWatcherRemove); } function invalidateResolutions(resolutions, canInvalidate) { if (!resolutions) @@ -126378,10 +127276,7 @@ function getFilesInErrorForSummary(diagnostics) { if (fileName === void 0) { return void 0; } - const diagnosticForFileName = find( - diagnostics, - (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName - ); + const diagnosticForFileName = find(diagnostics, (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName); if (diagnosticForFileName !== void 0) { const { line } = getLineAndCharacterOfPosition(diagnosticForFileName.file, diagnosticForFileName.start); return { @@ -126549,7 +127444,7 @@ function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) { var _a, _b; const options = program.getCompilerOptions(); if (isReferencedFile(reason)) { - const referenceLocation = getReferencedFileLocation((path) => program.getSourceFileByPath(path), reason); + const referenceLocation = getReferencedFileLocation(program, reason); const referenceText = isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : `"${referenceLocation.text}"`; let message; Debug.assert(isReferenceFileLocation(referenceLocation) || reason.kind === 3 /* Import */, "Only synthetic references are imports"); @@ -126799,7 +127694,8 @@ function createCompilerHostFromProgramHost(host, getCompilerOptions, directorySt getEnvironmentVariable: maybeBind(host, host.getEnvironmentVariable) || (() => ""), createHash: maybeBind(host, host.createHash), readDirectory: maybeBind(host, host.readDirectory), - storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit + storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit, + jsDocParsingMode: host.jsDocParsingMode }; return compilerHost; } @@ -127016,7 +127912,7 @@ function createWatchCompilerHost2(rootFilesOrConfigFileName, options, system, cr } function createWatchProgram(host) { let builderProgram; - let reloadLevel; + let updateLevel; let missingFilesMap; let watchedWildcardDirectories; let timerToUpdateProgram; @@ -127109,7 +128005,7 @@ function createWatchProgram(host) { watchConfigFileWildCardDirectories(); if (configFileName) updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile); - return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close }; + return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close, getResolutionCache } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close, getResolutionCache }; function close() { clearInvalidateResolutionsOfFailedLookupLocations(); resolutionCache.clear(); @@ -127149,6 +128045,9 @@ function createWatchProgram(host) { parsedConfigs = void 0; } } + function getResolutionCache() { + return resolutionCache; + } function getCurrentBuilderProgram() { return builderProgram; } @@ -127372,7 +128271,7 @@ function createWatchProgram(host) { } function scheduleProgramReload() { Debug.assert(!!configFileName); - reloadLevel = 2 /* Full */; + updateLevel = 2 /* Full */; scheduleProgramUpdate(); } function updateProgramWithWatchStatus() { @@ -127382,8 +128281,8 @@ function createWatchProgram(host) { } function updateProgram() { var _a, _b, _c, _d; - switch (reloadLevel) { - case 1 /* Partial */: + switch (updateLevel) { + case 1 /* RootNamesAndUpdate */: (_a = perfLogger) == null ? void 0 : _a.logStartUpdateProgram("PartialConfigReload"); reloadFileNamesFromConfigFile(); break; @@ -127403,7 +128302,7 @@ function createWatchProgram(host) { writeLog("Reloading new file names and options"); Debug.assert(compilerOptions); Debug.assert(configFileName); - reloadLevel = 0 /* None */; + updateLevel = 0 /* Update */; rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions); if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) { hasChangedConfigFileParsingErrors = true; @@ -127413,7 +128312,7 @@ function createWatchProgram(host) { function reloadConfigFile() { Debug.assert(configFileName); writeLog(`Reloading config file: ${configFileName}`); - reloadLevel = 0 /* None */; + updateLevel = 0 /* Update */; if (cachedDirectoryStructureHost) { cachedDirectoryStructureHost.clearCache(); } @@ -127425,14 +128324,16 @@ function createWatchProgram(host) { } function parseConfigFile2() { Debug.assert(configFileName); - setConfigFileParsingResult(getParsedCommandLineOfConfigFile( - configFileName, - optionsToExtendForConfigFile, - parseConfigFileHost, - extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()), - watchOptionsToExtend, - extraFileExtensions - )); + setConfigFileParsingResult( + getParsedCommandLineOfConfigFile( + configFileName, + optionsToExtendForConfigFile, + parseConfigFileHost, + extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()), + watchOptionsToExtend, + extraFileExtensions + ) + ); } function setConfigFileParsingResult(configFileParseResult) { rootFileNames = configFileParseResult.fileNames; @@ -127448,9 +128349,9 @@ function createWatchProgram(host) { const configPath = toPath3(configFileName2); let config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); if (config) { - if (!config.reloadLevel) + if (!config.updateLevel) return config.parsedCommandLine; - if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) { + if (config.parsedCommandLine && config.updateLevel === 1 /* RootNamesAndUpdate */ && !host.getParsedCommandLine) { writeLog("Reloading new file names and options"); Debug.assert(compilerOptions); const fileNames = getFileNamesFromConfigSpecs( @@ -127460,7 +128361,7 @@ function createWatchProgram(host) { parseConfigFileHost ); config.parsedCommandLine = { ...config.parsedCommandLine, fileNames }; - config.reloadLevel = void 0; + config.updateLevel = void 0; return config.parsedCommandLine; } } @@ -127468,7 +128369,7 @@ function createWatchProgram(host) { const parsedCommandLine = host.getParsedCommandLine ? host.getParsedCommandLine(configFileName2) : getParsedCommandLineFromConfigFileHost(configFileName2); if (config) { config.parsedCommandLine = parsedCommandLine; - config.reloadLevel = void 0; + config.updateLevel = void 0; } else { (parsedConfigs || (parsedConfigs = /* @__PURE__ */ new Map())).set(configPath, config = { parsedCommandLine }); } @@ -127565,8 +128466,8 @@ function createWatchProgram(host) { toPath: toPath3 })) return; - if (reloadLevel !== 2 /* Full */) { - reloadLevel = 1 /* Partial */; + if (updateLevel !== 2 /* Full */) { + updateLevel = 1 /* RootNamesAndUpdate */; scheduleProgramUpdate(); } }, @@ -127592,11 +128493,11 @@ function createWatchProgram(host) { return; projects.forEach((projectPath) => { if (configFileName && toPath3(configFileName) === projectPath) { - reloadLevel = 2 /* Full */; + updateLevel = 2 /* Full */; } else { const config = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath); if (config) - config.reloadLevel = 2 /* Full */; + config.updateLevel = 2 /* Full */; resolutionCache.removeResolutionsFromProjectReferenceRedirects(projectPath); } scheduleProgramUpdate(); @@ -127617,7 +128518,7 @@ function createWatchProgram(host) { updateCachedSystemWithFile(configFileName2, configPath, eventKind); const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); if (config) - config.reloadLevel = 2 /* Full */; + config.updateLevel = 2 /* Full */; resolutionCache.removeResolutionsFromProjectReferenceRedirects(configPath); scheduleProgramUpdate(); }, @@ -127655,8 +128556,8 @@ function createWatchProgram(host) { toPath: toPath3 })) return; - if (config.reloadLevel !== 2 /* Full */) { - config.reloadLevel = 1 /* Partial */; + if (config.updateLevel !== 2 /* Full */) { + config.updateLevel = 1 /* RootNamesAndUpdate */; scheduleProgramUpdate(); } }, @@ -127821,7 +128722,8 @@ function createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, optio compilerHost.getCanonicalFileName, /*options*/ void 0, - moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache() + moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(), + moduleResolutionCache == null ? void 0 : moduleResolutionCache.optionsToRedirectsKey ); compilerHost.resolveTypeReferenceDirectiveReferences = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( typeDirectiveNames, @@ -128118,12 +129020,12 @@ function clearProjectStatus(state, resolved) { state.projectStatus.delete(resolved); state.diagnostics.delete(resolved); } -function addProjToQueue({ projectPendingBuild }, proj, reloadLevel) { +function addProjToQueue({ projectPendingBuild }, proj, updateLevel) { const value = projectPendingBuild.get(proj); if (value === void 0) { - projectPendingBuild.set(proj, reloadLevel); - } else if (value < reloadLevel) { - projectPendingBuild.set(proj, reloadLevel); + projectPendingBuild.set(proj, updateLevel); + } else if (value < updateLevel) { + projectPendingBuild.set(proj, updateLevel); } } function setupInitialBuild(state, cancellationToken) { @@ -128137,7 +129039,7 @@ function setupInitialBuild(state, cancellationToken) { buildOrder.forEach( (configFileName) => state.projectPendingBuild.set( toResolvedConfigFilePath(state, configFileName), - 0 /* None */ + 0 /* Update */ ) ); if (cancellationToken) { @@ -128296,10 +129198,13 @@ function createBuildOrUpdateInvalidedProject(kind, state, project, projectPath, config.projectReferences ); if (state.watch) { - state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && map( - state.moduleResolutionCache.getPackageJsonInfoCache().entries(), - ([path, data]) => [state.host.realpath && data ? toPath2(state, state.host.realpath(path)) : path, data] - )); + state.lastCachedPackageJsonLookups.set( + projectPath, + state.moduleResolutionCache && map( + state.moduleResolutionCache.getPackageJsonInfoCache().entries(), + ([path, data]) => [state.host.realpath && data ? toPath2(state, state.host.realpath(path)) : path, data] + ) + ); state.builderPrograms.set(projectPath, program); } step++; @@ -128576,8 +129481,8 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) { for (let projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) { const project = buildOrder[projectIndex]; const projectPath = toResolvedConfigFilePath(state, project); - const reloadLevel = state.projectPendingBuild.get(projectPath); - if (reloadLevel === void 0) + const updateLevel = state.projectPendingBuild.get(projectPath); + if (updateLevel === void 0) continue; if (reportQueue) { reportQueue = false; @@ -128589,13 +129494,13 @@ function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) { projectPendingBuild.delete(projectPath); continue; } - if (reloadLevel === 2 /* Full */) { + if (updateLevel === 2 /* Full */) { watchConfigFile(state, project, projectPath, config); watchExtendedConfigFiles(state, projectPath, config); watchWildCardDirectories(state, project, projectPath, config); watchInputFiles(state, project, projectPath, config); watchPackageJsonFiles(state, project, projectPath, config); - } else if (reloadLevel === 1 /* Partial */) { + } else if (updateLevel === 1 /* RootNamesAndUpdate */) { config.fileNames = getFileNamesFromConfigSpecs(config.options.configFile.configFileSpecs, getDirectoryPath(project), config.options, state.parseConfigFileHost); updateErrorForNoInputFiles(config.fileNames, project, config.options.configFile.configFileSpecs, config.errors, canJsonReportNoInputFiles(config.raw)); watchInputFiles(state, project, projectPath, config); @@ -129182,7 +130087,7 @@ function queueReferencingProjects(state, project, projectPath, projectIndex, con break; } } - addProjToQueue(state, nextProjectPath, 0 /* None */); + addProjToQueue(state, nextProjectPath, 0 /* Update */); break; } } @@ -129251,7 +130156,7 @@ function cleanWorker(state, project, onlyReferences) { filesToDelete.push(output); } else { host.deleteFile(output); - invalidateProject(state, resolvedPath, 0 /* None */); + invalidateProject(state, resolvedPath, 0 /* Update */); } } } @@ -129262,22 +130167,22 @@ function cleanWorker(state, project, onlyReferences) { } return 0 /* Success */; } -function invalidateProject(state, resolved, reloadLevel) { - if (state.host.getParsedCommandLine && reloadLevel === 1 /* Partial */) { - reloadLevel = 2 /* Full */; +function invalidateProject(state, resolved, updateLevel) { + if (state.host.getParsedCommandLine && updateLevel === 1 /* RootNamesAndUpdate */) { + updateLevel = 2 /* Full */; } - if (reloadLevel === 2 /* Full */) { + if (updateLevel === 2 /* Full */) { state.configFileCache.delete(resolved); state.buildOrder = void 0; } state.needsSummary = true; clearProjectStatus(state, resolved); - addProjToQueue(state, resolved, reloadLevel); + addProjToQueue(state, resolved, updateLevel); enableCache(state); } -function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) { +function invalidateProjectAndScheduleBuilds(state, resolvedPath, updateLevel) { state.reportFileChangeDetected = true; - invalidateProject(state, resolvedPath, reloadLevel); + invalidateProject(state, resolvedPath, updateLevel); scheduleBuildInvalidatedProject( state, 250, @@ -129353,15 +130258,18 @@ function buildNextInvalidatedProjectWorker(state, changeDetected) { function watchConfigFile(state, resolved, resolvedPath, parsed) { if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath)) return; - state.allWatchedConfigFiles.set(resolvedPath, watchFile( - state, - resolved, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 2 /* Full */), - 2e3 /* High */, - parsed == null ? void 0 : parsed.watchOptions, - WatchType.ConfigFile, - resolved - )); + state.allWatchedConfigFiles.set( + resolvedPath, + watchFile( + state, + resolved, + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 2 /* Full */), + 2e3 /* High */, + parsed == null ? void 0 : parsed.watchOptions, + WatchType.ConfigFile, + resolved + ) + ); } function watchExtendedConfigFiles(state, resolvedPath, parsed) { updateSharedExtendedConfigFileWatcher( @@ -129405,7 +130313,7 @@ function watchWildCardDirectories(state, resolved, resolvedPath, parsed) { toPath: (fileName) => toPath2(state, fileName) })) return; - invalidateProjectAndScheduleBuilds(state, resolvedPath, 1 /* Partial */); + invalidateProjectAndScheduleBuilds(state, resolvedPath, 1 /* RootNamesAndUpdate */); }, flags, parsed == null ? void 0 : parsed.watchOptions, @@ -129424,7 +130332,7 @@ function watchInputFiles(state, resolved, resolvedPath, parsed) { createNewValue: (_path, input) => watchFile( state, input, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* None */), + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* Update */), 250 /* Low */, parsed == null ? void 0 : parsed.watchOptions, WatchType.SourceFile, @@ -129444,7 +130352,7 @@ function watchPackageJsonFiles(state, resolved, resolvedPath, parsed) { createNewValue: (path, _input) => watchFile( state, path, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* None */), + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* Update */), 2e3 /* High */, parsed == null ? void 0 : parsed.watchOptions, WatchType.PackageJson, @@ -129515,7 +130423,7 @@ function createSolutionBuilderWorker(watch, hostOrHostWithWatch, rootNames, opti const configFilePath = toResolvedConfigFilePath(state, configFileName); return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath); }, - invalidateProject: (configFilePath, reloadLevel) => invalidateProject(state, configFilePath, reloadLevel || 0 /* None */), + invalidateProject: (configFilePath, updateLevel) => invalidateProject(state, configFilePath, updateLevel || 0 /* Update */), close: () => stopWatching(state) }; } @@ -129728,6 +130636,44 @@ __export(ts_JsTyping_exports, { validatePackageName: () => validatePackageName }); +// src/jsTyping/shared.ts +var ActionSet = "action::set"; +var ActionInvalidate = "action::invalidate"; +var ActionPackageInstalled = "action::packageInstalled"; +var EventTypesRegistry = "event::typesRegistry"; +var EventBeginInstallTypes = "event::beginInstallTypes"; +var EventEndInstallTypes = "event::endInstallTypes"; +var EventInitializationFailed = "event::initializationFailed"; +var ActionWatchTypingLocations = "action::watchTypingLocations"; +var Arguments; +((Arguments2) => { + Arguments2.GlobalCacheLocation = "--globalTypingsCacheLocation"; + Arguments2.LogFile = "--logFile"; + Arguments2.EnableTelemetry = "--enableTelemetry"; + Arguments2.TypingSafeListLocation = "--typingSafeListLocation"; + Arguments2.TypesMapLocation = "--typesMapLocation"; + Arguments2.NpmLocation = "--npmLocation"; + Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation"; +})(Arguments || (Arguments = {})); +function hasArgument(argumentName) { + return sys.args.includes(argumentName); +} +function findArgument(argumentName) { + const index = sys.args.indexOf(argumentName); + return index >= 0 && index < sys.args.length - 1 ? sys.args[index + 1] : void 0; +} +function nowString() { + const d = /* @__PURE__ */ new Date(); + return `${d.getHours().toString().padStart(2, "0")}:${d.getMinutes().toString().padStart(2, "0")}:${d.getSeconds().toString().padStart(2, "0")}.${d.getMilliseconds().toString().padStart(3, "0")}`; +} +var indentStr = "\n "; +function indent2(str) { + return indentStr + str.replace(/\n/g, indentStr); +} +function stringifyIndented(json) { + return indent2(JSON.stringify(json, void 0, 2)); +} + // src/jsTyping/jsTyping.ts function isTypingUpToDate(cachedTyping, availableTypingVersions) { const availableVersion = new Version(getProperty(availableTypingVersions, `ts${versionMajorMinor}`) || getProperty(availableTypingVersions, "latest")); @@ -129834,21 +130780,21 @@ function discoverTypings(host, log, fileNames, projectRootPath, safeList, packag ); addInferredTypings(module2, "Inferred typings from unresolved imports"); } - packageNameToTypingLocation.forEach((typing, name) => { - const registryEntry = typesRegistry.get(name); - if (inferredTypings.has(name) && inferredTypings.get(name) === void 0 && registryEntry !== void 0 && isTypingUpToDate(typing, registryEntry)) { - inferredTypings.set(name, typing.typingLocation); - } - }); for (const excludeTypingName of exclude) { const didDelete = inferredTypings.delete(excludeTypingName); if (didDelete && log) log(`Typing for ${excludeTypingName} is in exclude list, will be ignored.`); } + packageNameToTypingLocation.forEach((typing, name) => { + const registryEntry = typesRegistry.get(name); + if (inferredTypings.get(name) === false && registryEntry !== void 0 && isTypingUpToDate(typing, registryEntry)) { + inferredTypings.set(name, typing.typingLocation); + } + }); const newTypingNames = []; const cachedTypingPaths = []; inferredTypings.forEach((inferred, typing) => { - if (inferred !== void 0) { + if (inferred) { cachedTypingPaths.push(inferred); } else { newTypingNames.push(typing); @@ -129856,11 +130802,11 @@ function discoverTypings(host, log, fileNames, projectRootPath, safeList, packag }); const result = { cachedTypingPaths, newTypingNames, filesToWatch }; if (log) - log(`Result: ${JSON.stringify(result)}`); + log(`Finished typings discovery:${stringifyIndented(result)}`); return result; function addInferredTyping(typingName) { if (!inferredTypings.has(typingName)) { - inferredTypings.set(typingName, void 0); + inferredTypings.set(typingName, false); } } function addInferredTypings(typingNames, message) { @@ -130033,37 +130979,6 @@ function renderPackageNameValidationFailureWorker(typing, result, name, isScopeN } } -// src/jsTyping/shared.ts -var ActionSet = "action::set"; -var ActionInvalidate = "action::invalidate"; -var ActionPackageInstalled = "action::packageInstalled"; -var EventTypesRegistry = "event::typesRegistry"; -var EventBeginInstallTypes = "event::beginInstallTypes"; -var EventEndInstallTypes = "event::endInstallTypes"; -var EventInitializationFailed = "event::initializationFailed"; -var ActionWatchTypingLocations = "action::watchTypingLocations"; -var Arguments; -((Arguments2) => { - Arguments2.GlobalCacheLocation = "--globalTypingsCacheLocation"; - Arguments2.LogFile = "--logFile"; - Arguments2.EnableTelemetry = "--enableTelemetry"; - Arguments2.TypingSafeListLocation = "--typingSafeListLocation"; - Arguments2.TypesMapLocation = "--typesMapLocation"; - Arguments2.NpmLocation = "--npmLocation"; - Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation"; -})(Arguments || (Arguments = {})); -function hasArgument(argumentName) { - return sys.args.indexOf(argumentName) >= 0; -} -function findArgument(argumentName) { - const index = sys.args.indexOf(argumentName); - return index >= 0 && index < sys.args.length - 1 ? sys.args[index + 1] : void 0; -} -function nowString() { - const d = /* @__PURE__ */ new Date(); - return `${padLeft(d.getHours().toString(), 2, "0")}:${padLeft(d.getMinutes().toString(), 2, "0")}:${padLeft(d.getSeconds().toString(), 2, "0")}.${padLeft(d.getMilliseconds().toString(), 3, "0")}`; -} - // src/services/types.ts var ScriptSnapshot; ((ScriptSnapshot2) => { @@ -130107,10 +131022,10 @@ var LanguageServiceMode = /* @__PURE__ */ ((LanguageServiceMode2) => { return LanguageServiceMode2; })(LanguageServiceMode || {}); var emptyOptions = {}; -var SemanticClassificationFormat = /* @__PURE__ */ ((SemanticClassificationFormat3) => { - SemanticClassificationFormat3["Original"] = "original"; - SemanticClassificationFormat3["TwentyTwenty"] = "2020"; - return SemanticClassificationFormat3; +var SemanticClassificationFormat = /* @__PURE__ */ ((SemanticClassificationFormat2) => { + SemanticClassificationFormat2["Original"] = "original"; + SemanticClassificationFormat2["TwentyTwenty"] = "2020"; + return SemanticClassificationFormat2; })(SemanticClassificationFormat || {}); var OrganizeImportsMode = /* @__PURE__ */ ((OrganizeImportsMode3) => { OrganizeImportsMode3["All"] = "All"; @@ -130227,15 +131142,15 @@ var OutputFileType = /* @__PURE__ */ ((OutputFileType2) => { OutputFileType2[OutputFileType2["Declaration"] = 2] = "Declaration"; return OutputFileType2; })(OutputFileType || {}); -var EndOfLineState = /* @__PURE__ */ ((EndOfLineState3) => { - EndOfLineState3[EndOfLineState3["None"] = 0] = "None"; - EndOfLineState3[EndOfLineState3["InMultiLineCommentTrivia"] = 1] = "InMultiLineCommentTrivia"; - EndOfLineState3[EndOfLineState3["InSingleQuoteStringLiteral"] = 2] = "InSingleQuoteStringLiteral"; - EndOfLineState3[EndOfLineState3["InDoubleQuoteStringLiteral"] = 3] = "InDoubleQuoteStringLiteral"; - EndOfLineState3[EndOfLineState3["InTemplateHeadOrNoSubstitutionTemplate"] = 4] = "InTemplateHeadOrNoSubstitutionTemplate"; - EndOfLineState3[EndOfLineState3["InTemplateMiddleOrTail"] = 5] = "InTemplateMiddleOrTail"; - EndOfLineState3[EndOfLineState3["InTemplateSubstitutionPosition"] = 6] = "InTemplateSubstitutionPosition"; - return EndOfLineState3; +var EndOfLineState = /* @__PURE__ */ ((EndOfLineState2) => { + EndOfLineState2[EndOfLineState2["None"] = 0] = "None"; + EndOfLineState2[EndOfLineState2["InMultiLineCommentTrivia"] = 1] = "InMultiLineCommentTrivia"; + EndOfLineState2[EndOfLineState2["InSingleQuoteStringLiteral"] = 2] = "InSingleQuoteStringLiteral"; + EndOfLineState2[EndOfLineState2["InDoubleQuoteStringLiteral"] = 3] = "InDoubleQuoteStringLiteral"; + EndOfLineState2[EndOfLineState2["InTemplateHeadOrNoSubstitutionTemplate"] = 4] = "InTemplateHeadOrNoSubstitutionTemplate"; + EndOfLineState2[EndOfLineState2["InTemplateMiddleOrTail"] = 5] = "InTemplateMiddleOrTail"; + EndOfLineState2[EndOfLineState2["InTemplateSubstitutionPosition"] = 6] = "InTemplateSubstitutionPosition"; + return EndOfLineState2; })(EndOfLineState || {}); var TokenClass = /* @__PURE__ */ ((TokenClass2) => { TokenClass2[TokenClass2["Punctuation"] = 0] = "Punctuation"; @@ -130719,7 +131634,7 @@ function getNodeKind(node) { case 306 /* EnumMember */: return "enum member" /* enumMemberElement */; case 169 /* Parameter */: - return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; + return hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; case 271 /* ImportEqualsDeclaration */: case 276 /* ImportSpecifier */: case 281 /* ExportSpecifier */: @@ -131623,19 +132538,19 @@ function nodeHasTokens(n, sourceFile) { function getNodeModifiers(node, excludeFlags = 0 /* None */) { const result = []; const flags = isDeclaration(node) ? getCombinedNodeFlagsAlwaysIncludeJSDoc(node) & ~excludeFlags : 0 /* None */; - if (flags & 8 /* Private */) + if (flags & 2 /* Private */) result.push("private" /* privateMemberModifier */); - if (flags & 16 /* Protected */) + if (flags & 4 /* Protected */) result.push("protected" /* protectedMemberModifier */); - if (flags & 4 /* Public */) + if (flags & 1 /* Public */) result.push("public" /* publicMemberModifier */); - if (flags & 32 /* Static */ || isClassStaticBlockDeclaration(node)) + if (flags & 256 /* Static */ || isClassStaticBlockDeclaration(node)) result.push("static" /* staticModifier */); - if (flags & 256 /* Abstract */) + if (flags & 64 /* Abstract */) result.push("abstract" /* abstractModifier */); - if (flags & 1 /* Export */) + if (flags & 32 /* Export */) result.push("export" /* exportedModifier */); - if (flags & 8192 /* Deprecated */) + if (flags & 65536 /* Deprecated */) result.push("deprecated" /* deprecatedModifier */); if (node.flags & 33554432 /* Ambient */) result.push("declare" /* ambientModifier */); @@ -131865,7 +132780,7 @@ function makeImport(defaultImport, namedImports, moduleSpecifier, quotePreferenc void 0, defaultImport || namedImports ? factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0, typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); } @@ -132510,7 +133425,7 @@ function indexInTextChange(change, name) { return idx === -1 ? -1 : idx + 1; } function needsParentheses(expression) { - return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || isAsExpression(expression) && isObjectLiteralExpression(expression.expression); + return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || (isAsExpression(expression) || isSatisfiesExpression(expression)) && isObjectLiteralExpression(expression.expression); } function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); @@ -132876,7 +133791,7 @@ function createPackageJsonImportFilter(fromFile, preferences, host) { return false; } function getNodeModulesPackageNameFromFileName(importedFileName, moduleSpecifierResolutionHost) { - if (!stringContains(importedFileName, "node_modules")) { + if (!importedFileName.includes("node_modules")) { return void 0; } const specifier = ts_moduleSpecifiers_exports.getNodeModulesPackageName( @@ -133049,7 +133964,7 @@ function isNonGlobalDeclaration(declaration) { return isInJSFile(declaration) || !findAncestor(declaration, (d) => isModuleDeclaration(d) && isGlobalScopeAugmentation(d)); } function isDeprecatedDeclaration(decl) { - return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 8192 /* Deprecated */); + return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 65536 /* Deprecated */); } function shouldUseUriStyleNodeCoreModules(file, program) { const decisionFromFile = firstDefined(file.imports, (node) => { @@ -133299,7 +134214,7 @@ function createCacheableExportInfoMap(host) { } }; if (Debug.isDebugging) { - Object.defineProperty(cache, "__cache", { get: () => exportInfo }); + Object.defineProperty(cache, "__cache", { value: exportInfo }); } return cache; function rehydrateCachedInfo(info) { @@ -133318,7 +134233,9 @@ function createCacheableExportInfoMap(host) { }; } const checker = (isFromPackageJson ? host.getPackageJsonAutoImportProvider() : host.getCurrentProgram()).getTypeChecker(); - const moduleSymbol = info.moduleSymbol || cachedModuleSymbol || Debug.checkDefined(info.moduleFile ? checker.getMergedSymbol(info.moduleFile.symbol) : checker.tryFindAmbientModule(info.moduleName)); + const moduleSymbol = info.moduleSymbol || cachedModuleSymbol || Debug.checkDefined( + info.moduleFile ? checker.getMergedSymbol(info.moduleFile.symbol) : checker.tryFindAmbientModule(info.moduleName) + ); const symbol = info.symbol || cachedSymbol || Debug.checkDefined( exportKind === 2 /* ExportEquals */ ? checker.resolveExternalModuleSymbol(moduleSymbol) : checker.tryGetMemberInModuleExportsAndProperties(unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), `Could not find symbol '${info.symbolName}' by key '${info.symbolTableKey}' in module ${moduleSymbol.name}` @@ -133335,11 +134252,15 @@ function createCacheableExportInfoMap(host) { } function key(importedName, symbol, ambientModuleName, checker) { const moduleKey = ambientModuleName || ""; - return `${importedName}|${getSymbolId(skipAlias(symbol, checker))}|${moduleKey}`; + return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`; } function parseKey(key2) { - const symbolName2 = key2.substring(0, key2.indexOf("|")); - const moduleKey = key2.substring(key2.lastIndexOf("|") + 1); + const firstSpace = key2.indexOf(" "); + const secondSpace = key2.indexOf(" ", firstSpace + 1); + const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10); + const data = key2.substring(secondSpace + 1); + const symbolName2 = data.substring(0, symbolNameLength); + const moduleKey = data.substring(symbolNameLength + 1); const ambientModuleName = moduleKey === "" ? void 0 : moduleKey; return { symbolName: symbolName2, ambientModuleName }; } @@ -133448,7 +134369,7 @@ function forEachExternalModule(checker, allSourceFiles, excludePatterns, cb) { var _a; const isExcluded = excludePatterns && ((fileName) => excludePatterns.some((p) => p.test(fileName))); for (const ambient of checker.getAmbientModules()) { - if (!stringContains(ambient.name, "*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) { + if (!ambient.name.includes("*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) { cb( ambient, /*sourceFile*/ @@ -133689,21 +134610,25 @@ function createClassifier() { } return { getClassificationsForLine, getEncodedLexicalClassifications }; } -var noRegexTable = arrayToNumericMap([ - 80 /* Identifier */, - 11 /* StringLiteral */, - 9 /* NumericLiteral */, - 10 /* BigIntLiteral */, - 14 /* RegularExpressionLiteral */, - 110 /* ThisKeyword */, - 46 /* PlusPlusToken */, - 47 /* MinusMinusToken */, - 22 /* CloseParenToken */, - 24 /* CloseBracketToken */, - 20 /* CloseBraceToken */, - 112 /* TrueKeyword */, - 97 /* FalseKeyword */ -], (token) => token, () => true); +var noRegexTable = arrayToNumericMap( + [ + 80 /* Identifier */, + 11 /* StringLiteral */, + 9 /* NumericLiteral */, + 10 /* BigIntLiteral */, + 14 /* RegularExpressionLiteral */, + 110 /* ThisKeyword */, + 46 /* PlusPlusToken */, + 47 /* MinusMinusToken */, + 22 /* CloseParenToken */, + 24 /* CloseBracketToken */, + 20 /* CloseBraceToken */, + 112 /* TrueKeyword */, + 97 /* FalseKeyword */ + ], + (token) => token, + () => true +); function getNewEndOfLineState(scanner2, token, lastOnTemplateStack) { switch (token) { case 11 /* StringLiteral */: { @@ -134648,7 +135573,7 @@ var DocumentHighlights; case 241 /* Block */: case 296 /* CaseClause */: case 297 /* DefaultClause */: - if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { + if (modifierFlag & 64 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; @@ -134662,12 +135587,12 @@ var DocumentHighlights; case 264 /* InterfaceDeclaration */: case 187 /* TypeLiteral */: const nodes = container.members; - if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { + if (modifierFlag & (7 /* AccessibilityModifier */ | 8 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); if (constructor) { return [...nodes, ...constructor.parameters]; } - } else if (modifierFlag & 256 /* Abstract */) { + } else if (modifierFlag & 64 /* Abstract */) { return [...nodes, container]; } return nodes; @@ -134872,10 +135797,10 @@ var DocumentHighlights; function isDocumentRegistryEntry(entry) { return !!entry.sourceFile; } -function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) { - return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory); +function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode) { + return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode); } -function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) { +function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", jsDocParsingMode, externalCache) { const buckets = /* @__PURE__ */ new Map(); const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2); function reportStats() { @@ -134959,9 +135884,11 @@ function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirec const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { languageVersion: scriptTarget, impliedNodeFormat: host && getImpliedNodeFormatForFile(path, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings), - setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings) + setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings), + jsDocParsingMode }; sourceFileOptions.languageVersion = scriptTarget; + Debug.assertEqual(jsDocParsingMode, sourceFileOptions.jsDocParsingMode); const oldBucketCount = buckets.size; const keyWithMode = getDocumentRegistryBucketKeyWithMode(key, sourceFileOptions.impliedNodeFormat); const bucket = getOrUpdate(buckets, keyWithMode, () => /* @__PURE__ */ new Map()); @@ -135007,12 +135934,7 @@ function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirec setBucketEntry(); } else { if (entry.sourceFile.version !== version2) { - entry.sourceFile = updateLanguageServiceSourceFile( - entry.sourceFile, - scriptSnapshot, - version2, - scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot) - ); + entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version2, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot)); if (externalCache) { externalCache.setDocument(keyWithMode, path, entry.sourceFile); } @@ -135196,29 +136118,19 @@ function updateImports(program, changeTracker, oldToNew, newToOld, host, getCano const oldImportFromPath = oldFromNew || sourceFile.fileName; const oldImportFromDirectory = getDirectoryPath(oldImportFromPath); const importingSourceFileMoved = newFromOld !== void 0 || oldFromNew !== void 0; - updateImportsWorker( - sourceFile, - changeTracker, - (referenceText) => { - if (!pathIsRelative(referenceText)) - return void 0; - const oldAbsolute = combinePathsSafe(oldImportFromDirectory, referenceText); - const newAbsolute = oldToNew(oldAbsolute); - return newAbsolute === void 0 ? void 0 : ensurePathIsNonModuleName(getRelativePathFromDirectory(newImportFromDirectory, newAbsolute, getCanonicalFileName)); - }, - (importLiteral) => { - const importedModuleSymbol = program.getTypeChecker().getSymbolAtLocation(importLiteral); - if ((importedModuleSymbol == null ? void 0 : importedModuleSymbol.declarations) && importedModuleSymbol.declarations.some((d) => isAmbientModule(d))) - return void 0; - const toImport = oldFromNew !== void 0 ? getSourceFileToImportFromResolved( - importLiteral, - resolveModuleName(importLiteral.text, oldImportFromPath, program.getCompilerOptions(), host), - oldToNew, - allFiles - ) : getSourceFileToImport(importedModuleSymbol, importLiteral, sourceFile, program, host, oldToNew); - return toImport !== void 0 && (toImport.updated || importingSourceFileMoved && pathIsRelative(importLiteral.text)) ? ts_moduleSpecifiers_exports.updateModuleSpecifier(program.getCompilerOptions(), sourceFile, getCanonicalFileName(newImportFromPath), toImport.newFileName, createModuleSpecifierResolutionHost(program, host), importLiteral.text) : void 0; - } - ); + updateImportsWorker(sourceFile, changeTracker, (referenceText) => { + if (!pathIsRelative(referenceText)) + return void 0; + const oldAbsolute = combinePathsSafe(oldImportFromDirectory, referenceText); + const newAbsolute = oldToNew(oldAbsolute); + return newAbsolute === void 0 ? void 0 : ensurePathIsNonModuleName(getRelativePathFromDirectory(newImportFromDirectory, newAbsolute, getCanonicalFileName)); + }, (importLiteral) => { + const importedModuleSymbol = program.getTypeChecker().getSymbolAtLocation(importLiteral); + if ((importedModuleSymbol == null ? void 0 : importedModuleSymbol.declarations) && importedModuleSymbol.declarations.some((d) => isAmbientModule(d))) + return void 0; + const toImport = oldFromNew !== void 0 ? getSourceFileToImportFromResolved(importLiteral, resolveModuleName(importLiteral.text, oldImportFromPath, program.getCompilerOptions(), host), oldToNew, allFiles) : getSourceFileToImport(importedModuleSymbol, importLiteral, sourceFile, program, host, oldToNew); + return toImport !== void 0 && (toImport.updated || importingSourceFileMoved && pathIsRelative(importLiteral.text)) ? ts_moduleSpecifiers_exports.updateModuleSpecifier(program.getCompilerOptions(), sourceFile, getCanonicalFileName(newImportFromPath), toImport.newFileName, createModuleSpecifierResolutionHost(program, host), importLiteral.text) : void 0; + }); } } function combineNormal(pathA, pathB) { @@ -135228,14 +136140,13 @@ function combinePathsSafe(pathA, pathB) { return ensurePathIsNonModuleName(combineNormal(pathA, pathB)); } function getSourceFileToImport(importedModuleSymbol, importLiteral, importingSourceFile, program, host, oldToNew) { - var _a; if (importedModuleSymbol) { const oldFileName = find(importedModuleSymbol.declarations, isSourceFile).fileName; const newFileName = oldToNew(oldFileName); return newFileName === void 0 ? { newFileName: oldFileName, updated: false } : { newFileName, updated: true }; } else { const mode = getModeForUsageLocation(importingSourceFile, importLiteral); - const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ? (_a = importingSourceFile.resolvedModules) == null ? void 0 : _a.get(importLiteral.text, mode) : host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName, mode); + const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ? program.getResolvedModule(importingSourceFile, importLiteral.text, mode) : host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName, mode); return getSourceFileToImportFromResolved(importLiteral, resolved, oldToNew, program.getSourceFiles()); } } @@ -135305,6 +136216,21 @@ function createPatternMatch(kind, isCaseSensitive) { function createPatternMatcher(pattern) { const stringToWordSpans = /* @__PURE__ */ new Map(); const dotSeparatedSegments = pattern.trim().split(".").map((p) => createSegment(p.trim())); + if (dotSeparatedSegments.length === 1 && dotSeparatedSegments[0].totalTextChunk.text === "") { + return { + getMatchForLastSegmentOfPattern: () => createPatternMatch( + 2 /* substring */, + /*isCaseSensitive*/ + true + ), + getFullMatch: () => createPatternMatch( + 2 /* substring */, + /*isCaseSensitive*/ + true + ), + patternContainsDots: false + }; + } if (dotSeparatedSegments.some((segment) => !segment.subWordTextChunks.length)) return void 0; return { @@ -136115,6 +137041,7 @@ function createSourceFileLike(text, lineMap) { // src/services/suggestionDiagnostics.ts var visitedNestedConvertibleFunctions = /* @__PURE__ */ new Map(); function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { + var _a; program.getSemanticDiagnostics(sourceFile, cancellationToken); const diags = []; const checker = program.getTypeChecker(); @@ -136131,7 +137058,7 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { const name = importNameForConvertToDefaultImport(importNode); if (!name) continue; - const module2 = getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); + const module2 = (_a = program.getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule; const resolvedFile = module2 && program.getSourceFile(module2.resolvedFileName); if (resolvedFile && resolvedFile.externalModuleIndicator && resolvedFile.externalModuleIndicator !== true && isExportAssignment(resolvedFile.externalModuleIndicator) && resolvedFile.externalModuleIndicator.isExportEquals) { diags.push(createDiagnosticForNode(name, Diagnostics.Import_may_be_converted_to_a_default_import)); @@ -136381,7 +137308,8 @@ function transpileModule(input, transpileOptions) { compilerHost, options ), - setExternalModuleIndicator: getSetExternalModuleIndicator(options) + setExternalModuleIndicator: getSetExternalModuleIndicator(options), + jsDocParsingMode: transpileOptions.jsDocParsingMode ?? 0 /* ParseAll */ } ); if (transpileOptions.moduleName) { @@ -136454,30 +137382,37 @@ __export(ts_NavigateTo_exports, { }); // src/services/navigateTo.ts -function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) { +function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles) { const patternMatcher = createPatternMatcher(searchValue); if (!patternMatcher) return emptyArray; const rawItems = []; + const singleCurrentFile = sourceFiles.length === 1 ? sourceFiles[0] : void 0; for (const sourceFile of sourceFiles) { cancellationToken.throwIfCancellationRequested(); if (excludeDtsFiles && sourceFile.isDeclarationFile) { continue; } + if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile)) { + continue; + } sourceFile.getNamedDeclarations().forEach((declarations, name) => { - getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, rawItems); + getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems); }); } rawItems.sort(compareNavigateToItems); return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem); } -function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, rawItems) { +function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile) { + return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || file.hasNoDefaultLib); +} +function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems) { const match = patternMatcher.getMatchForLastSegmentOfPattern(name); if (!match) { return; } for (const declaration of declarations) { - if (!shouldKeepItem(declaration, checker)) + if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile)) continue; if (patternMatcher.patternContainsDots) { const fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name); @@ -136489,14 +137424,15 @@ function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checke } } } -function shouldKeepItem(declaration, checker) { +function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile) { + var _a; switch (declaration.kind) { case 273 /* ImportClause */: case 276 /* ImportSpecifier */: case 271 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); - return importer.escapedName !== imported.escapedName; + return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile))); default: return true; } @@ -136685,7 +137621,14 @@ function addNodeWithRecursiveInitializer(node) { } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 226 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + const name = getNameOfDeclaration(node); + if (name === void 0) + return false; + if (isComputedPropertyName(name)) { + const expression = name.expression; + return isEntityNameExpression(expression) || isNumericLiteral(expression) || isStringOrNumericLiteralLike(expression); + } + return !!name; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -136836,11 +137779,7 @@ function addChildrenRecursively(node) { } } } else if (isFunctionExpression(binaryExpression.right) || isArrowFunction(binaryExpression.right)) { - addNodeWithRecursiveChild( - node, - binaryExpression.right, - className - ); + addNodeWithRecursiveChild(node, binaryExpression.right, className); } else { startNode(binaryExpression, className); addNodeWithRecursiveChild(node, binaryExpression.right, assignmentTarget.name); @@ -136977,16 +137916,19 @@ function tryMergeEs5Class(a, b, bIndex, parent2) { } } } - lastANode = a.node = setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - a.name || factory.createIdentifier("__class__"), - /*typeParameters*/ - void 0, - /*heritageClauses*/ - void 0, - [] - ), a.node); + lastANode = a.node = setTextRange( + factory.createClassDeclaration( + /*modifiers*/ + void 0, + a.name || factory.createIdentifier("__class__"), + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + [] + ), + a.node + ); } else { a.children = concatenate(a.children, b.children); if (a.children) { @@ -136999,16 +137941,19 @@ function tryMergeEs5Class(a, b, bIndex, parent2) { } else { if (!a.additionalNodes) a.additionalNodes = []; - a.additionalNodes.push(setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - a.name || factory.createIdentifier("__class__"), - /*typeParameters*/ - void 0, - /*heritageClauses*/ - void 0, - [] - ), b.node)); + a.additionalNodes.push(setTextRange( + factory.createClassDeclaration( + /*modifiers*/ + void 0, + a.name || factory.createIdentifier("__class__"), + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + [] + ), + b.node + )); } return true; } @@ -137110,7 +138055,7 @@ function getItemName(node, name) { case 218 /* FunctionExpression */: case 263 /* ClassDeclaration */: case 231 /* ClassExpression */: - if (getSyntacticModifierFlags(node) & 1024 /* Default */) { + if (getSyntacticModifierFlags(node) & 2048 /* Default */) { return "default"; } return getFunctionOrClassName(node); @@ -137260,7 +138205,7 @@ function getFunctionOrClassName(node) { return nodeText(parent2.left).replace(whiteSpaceRegex, ""); } else if (isPropertyAssignment(parent2)) { return nodeText(parent2.name); - } else if (getSyntacticModifierFlags(node) & 1024 /* Default */) { + } else if (getSyntacticModifierFlags(node) & 2048 /* Default */) { return "default"; } else if (isClassLike(node)) { return ""; @@ -137383,10 +138328,14 @@ registerRefactor(refactorName, { } if (context.preferences.provideRefactorNotApplicableReason) { return [ - { name: refactorName, description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), actions: [ - { ...defaultToNamedAction, notApplicableReason: info.error }, - { ...namedToDefaultAction, notApplicableReason: info.error } - ] } + { + name: refactorName, + description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), + actions: [ + { ...defaultToNamedAction, notApplicableReason: info.error }, + { ...namedToDefaultAction, notApplicableReason: info.error } + ] + } ]; } return emptyArray; @@ -137403,15 +138352,15 @@ function getInfo2(context, considerPartialSpans = true) { const { file, program } = context; const span = getRefactorContextSpan(context); const token = getTokenAtPosition(file, span.start); - const exportNode = !!(token.parent && getSyntacticModifierFlags(token.parent) & 1 /* Export */) && considerPartialSpans ? token.parent : getParentNodeInSpan(token, file, span); + const exportNode = !!(token.parent && getSyntacticModifierFlags(token.parent) & 32 /* Export */) && considerPartialSpans ? token.parent : getParentNodeInSpan(token, file, span); if (!exportNode || !isSourceFile(exportNode.parent) && !(isModuleBlock(exportNode.parent) && isAmbientModule(exportNode.parent.parent))) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_export_statement) }; } const checker = program.getTypeChecker(); const exportingModuleSymbol = getExportingModuleSymbol(exportNode.parent, checker); - const flags = getSyntacticModifierFlags(exportNode) || (isExportAssignment(exportNode) && !exportNode.isExportEquals ? 1025 /* ExportDefault */ : 0 /* None */); - const wasDefault = !!(flags & 1024 /* Default */); - if (!(flags & 1 /* Export */) || !wasDefault && exportingModuleSymbol.exports.has("default" /* Default */)) { + const flags = getSyntacticModifierFlags(exportNode) || (isExportAssignment(exportNode) && !exportNode.isExportEquals ? 2080 /* ExportDefault */ : 0 /* None */); + const wasDefault = !!(flags & 2048 /* Default */); + if (!(flags & 32 /* Export */) || !wasDefault && exportingModuleSymbol.exports.has("default" /* Default */)) { return { error: getLocaleSpecificMessage(Diagnostics.This_file_already_has_a_default_export) }; } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; @@ -137544,7 +138493,7 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam } case 205 /* ImportType */: const importTypeNode = parent2; - changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); + changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.attributes, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; default: Debug.failBadSyntaxKind(parent2); @@ -137786,7 +138735,11 @@ function doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, toConve } }); } - changes.replaceNode(sourceFile, toConvert, shouldUseDefault ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName))); + changes.replaceNode( + sourceFile, + toConvert, + shouldUseDefault ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName)) + ); if (neededNamedImports.size) { const newNamedImports = arrayFrom(neededNamedImports.values(), (element) => factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.createIdentifier(element.propertyName.text), factory.createIdentifier(element.name.text))); changes.insertNodeAfter(sourceFile, toConvert.parent.parent, updateImport( @@ -137815,7 +138768,7 @@ function updateImport(old, defaultImportName, elements) { elements && elements.length ? factory.createNamedImports(elements) : void 0 ), old.moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); } @@ -137904,26 +138857,50 @@ function getRangeToExtract(context, considerEmptySpans = true) { const current = getTokenAtPosition(file, startPosition); const range = createTextRangeFromSpan(getRefactorContextSpan(context)); const cursorRequest = range.pos === range.end && considerEmptySpans; - const selection = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (cursorRequest || nodeOverlapsWithStartEnd(current, file, range.pos, range.end))); - if (!selection || !isTypeNode(selection)) + const overlappingRange = nodeOverlapsWithStartEnd(current, file, range.pos, range.end); + const firstType = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (cursorRequest || overlappingRange)); + if (!firstType || !isTypeNode(firstType)) return { error: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_type_node) }; const checker = context.program.getTypeChecker(); - const enclosingNode = getEnclosingNode(selection, isJS); + const enclosingNode = getEnclosingNode(firstType, isJS); if (enclosingNode === void 0) return { error: getLocaleSpecificMessage(Diagnostics.No_type_could_be_extracted_from_this_type_node) }; + const expandedFirstType = getExpandedSelectionNode(firstType, enclosingNode); + if (!isTypeNode(expandedFirstType)) + return { error: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_type_node) }; + const typeList = []; + if ((isUnionTypeNode(expandedFirstType.parent) || isIntersectionTypeNode(expandedFirstType.parent)) && range.end > firstType.end) { + addRange( + typeList, + expandedFirstType.parent.types.filter((type) => { + return nodeOverlapsWithStartEnd(type, file, range.pos, range.end); + }) + ); + } + const selection = typeList.length > 1 ? typeList : expandedFirstType; const typeParameters = collectTypeParameters(checker, selection, enclosingNode, file); if (!typeParameters) return { error: getLocaleSpecificMessage(Diagnostics.No_type_could_be_extracted_from_this_type_node) }; const typeElements = flattenTypeLiteralNodeReference(checker, selection); return { isJS, selection, enclosingNode, typeParameters, typeElements }; } -function flattenTypeLiteralNodeReference(checker, node) { - if (!node) +function flattenTypeLiteralNodeReference(checker, selection) { + if (!selection) return void 0; - if (isIntersectionTypeNode(node)) { + if (isArray(selection)) { + const result = []; + for (const type of selection) { + const flattenedTypeMembers = flattenTypeLiteralNodeReference(checker, type); + if (!flattenedTypeMembers) + return void 0; + addRange(result, flattenedTypeMembers); + } + return result; + } + if (isIntersectionTypeNode(selection)) { const result = []; const seen = /* @__PURE__ */ new Map(); - for (const type of node.types) { + for (const type of selection.types) { const flattenedTypeMembers = flattenTypeLiteralNodeReference(checker, type); if (!flattenedTypeMembers || !flattenedTypeMembers.every((type2) => type2.name && addToSeen(seen, getNameFromPropertyName(type2.name)))) { return void 0; @@ -137931,10 +138908,10 @@ function flattenTypeLiteralNodeReference(checker, node) { addRange(result, flattenedTypeMembers); } return result; - } else if (isParenthesizedTypeNode(node)) { - return flattenTypeLiteralNodeReference(checker, node.type); - } else if (isTypeLiteralNode(node)) { - return node.members; + } else if (isParenthesizedTypeNode(selection)) { + return flattenTypeLiteralNodeReference(checker, selection.type); + } else if (isTypeLiteralNode(selection)) { + return selection.members; } return void 0; } @@ -137943,7 +138920,13 @@ function rangeContainsSkipTrivia(r1, node, file) { } function collectTypeParameters(checker, selection, enclosingNode, file) { const result = []; - return visitor(selection) ? void 0 : result; + const selectionArray = toArray(selection); + const selectionRange = { pos: selectionArray[0].pos, end: selectionArray[selectionArray.length - 1].end }; + for (const t of selectionArray) { + if (visitor(t)) + return void 0; + } + return result; function visitor(node) { if (isTypeReferenceNode(node)) { if (isIdentifier(node.typeName)) { @@ -137957,10 +138940,10 @@ function collectTypeParameters(checker, selection, enclosingNode, file) { ); for (const decl of (symbol == null ? void 0 : symbol.declarations) || emptyArray) { if (isTypeParameterDeclaration(decl) && decl.getSourceFile() === file) { - if (decl.name.escapedText === typeName.escapedText && rangeContainsSkipTrivia(decl, selection, file)) { + if (decl.name.escapedText === typeName.escapedText && rangeContainsSkipTrivia(decl, selectionRange, file)) { return true; } - if (rangeContainsSkipTrivia(enclosingNode, decl, file) && !rangeContainsSkipTrivia(selection, decl, file)) { + if (rangeContainsSkipTrivia(enclosingNode, decl, file) && !rangeContainsSkipTrivia(selectionRange, decl, file)) { pushIfUnique(result, decl); break; } @@ -137969,12 +138952,12 @@ function collectTypeParameters(checker, selection, enclosingNode, file) { } } else if (isInferTypeNode(node)) { const conditionalTypeNode = findAncestor(node, (n) => isConditionalTypeNode(n) && rangeContainsSkipTrivia(n.extendsType, node, file)); - if (!conditionalTypeNode || !rangeContainsSkipTrivia(selection, conditionalTypeNode, file)) { + if (!conditionalTypeNode || !rangeContainsSkipTrivia(selectionRange, conditionalTypeNode, file)) { return true; } } else if (isTypePredicateNode(node) || isThisTypeNode(node)) { const functionLikeNode = findAncestor(node.parent, isFunctionLike); - if (functionLikeNode && functionLikeNode.type && rangeContainsSkipTrivia(functionLikeNode.type, node, file) && !rangeContainsSkipTrivia(selection, functionLikeNode, file)) { + if (functionLikeNode && functionLikeNode.type && rangeContainsSkipTrivia(functionLikeNode.type, node, file) && !rangeContainsSkipTrivia(selectionRange, functionLikeNode, file)) { return true; } } else if (isTypeQueryNode(node)) { @@ -137986,11 +138969,11 @@ function collectTypeParameters(checker, selection, enclosingNode, file) { /*excludeGlobals*/ false ); - if ((symbol == null ? void 0 : symbol.valueDeclaration) && rangeContainsSkipTrivia(enclosingNode, symbol.valueDeclaration, file) && !rangeContainsSkipTrivia(selection, symbol.valueDeclaration, file)) { + if ((symbol == null ? void 0 : symbol.valueDeclaration) && rangeContainsSkipTrivia(enclosingNode, symbol.valueDeclaration, file) && !rangeContainsSkipTrivia(selectionRange, symbol.valueDeclaration, file)) { return true; } } else { - if (isThisIdentifier(node.exprName.left) && !rangeContainsSkipTrivia(selection, node.parent, file)) { + if (isThisIdentifier(node.exprName.left) && !rangeContainsSkipTrivia(selectionRange, node.parent, file)) { return true; } } @@ -138002,8 +138985,9 @@ function collectTypeParameters(checker, selection, enclosingNode, file) { } } function doTypeAliasChange(changes, file, name, info) { - const { enclosingNode, selection, typeParameters } = info; - const newTypeNode = factory.createTypeAliasDeclaration( + const { enclosingNode, typeParameters } = info; + const { firstTypeNode, lastTypeNode, newTypeNode } = getNodesToEdit(info); + const newTypeDeclaration = factory.createTypeAliasDeclaration( /*modifiers*/ void 0, name, @@ -138015,16 +138999,16 @@ function doTypeAliasChange(changes, file, name, info) { /*defaultType*/ void 0 )), - selection + newTypeNode ); changes.insertNodeBefore( file, enclosingNode, - ignoreSourceNewlines(newTypeNode), + ignoreSourceNewlines(newTypeDeclaration), /*blankLineBetween*/ true ); - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( + changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( id.name, /*typeArguments*/ void 0 @@ -138032,7 +139016,7 @@ function doTypeAliasChange(changes, file, name, info) { } function doInterfaceChange(changes, file, name, info) { var _a; - const { enclosingNode, selection, typeParameters, typeElements } = info; + const { enclosingNode, typeParameters, typeElements } = info; const newTypeNode = factory.createInterfaceDeclaration( /*modifiers*/ void 0, @@ -138050,7 +139034,8 @@ function doInterfaceChange(changes, file, name, info) { /*blankLineBetween*/ true ); - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( + const { firstTypeNode, lastTypeNode } = getNodesToEdit(info); + changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( id.name, /*typeArguments*/ void 0 @@ -138058,11 +139043,14 @@ function doInterfaceChange(changes, file, name, info) { } function doTypedefChange(changes, context, file, name, info) { var _a; - const { enclosingNode, selection, typeParameters } = info; - setEmitFlags(selection, 3072 /* NoComments */ | 4096 /* NoNestedComments */); + toArray(info.selection).forEach((typeNode) => { + setEmitFlags(typeNode, 3072 /* NoComments */ | 4096 /* NoNestedComments */); + }); + const { enclosingNode, typeParameters } = info; + const { firstTypeNode, lastTypeNode, newTypeNode } = getNodesToEdit(info); const node = factory.createJSDocTypedefTag( factory.createIdentifier("typedef"), - factory.createJSDocTypeExpression(selection), + factory.createJSDocTypeExpression(newTypeNode), factory.createIdentifier(name) ); const templates = []; @@ -138100,15 +139088,39 @@ function doTypedefChange(changes, context, file, name, info) { true ); } - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( + changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( id.name, /*typeArguments*/ void 0 )))); } +function getNodesToEdit(info) { + if (isArray(info.selection)) { + return { + firstTypeNode: info.selection[0], + lastTypeNode: info.selection[info.selection.length - 1], + newTypeNode: isUnionTypeNode(info.selection[0].parent) ? factory.createUnionTypeNode(info.selection) : factory.createIntersectionTypeNode(info.selection) + }; + } + return { + firstTypeNode: info.selection, + lastTypeNode: info.selection, + newTypeNode: info.selection + }; +} function getEnclosingNode(node, isJS) { return findAncestor(node, isStatement) || (isJS ? findAncestor(node, isJSDoc) : void 0); } +function getExpandedSelectionNode(firstType, enclosingNode) { + return findAncestor(firstType, (node) => { + if (node === enclosingNode) + return "quit"; + if (isUnionTypeNode(node.parent) || isIntersectionTypeNode(node.parent)) { + return true; + } + return false; + }) ?? firstType; +} // src/services/refactors/helpers.ts function isRefactorErrorInfo(info) { @@ -138280,11 +139292,7 @@ registerRefactor(refactorName5, { return [{ name: refactorName5, description, actions: [moveToNewFileAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorName5, - description, - actions: [{ ...moveToNewFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] - }]; + return [{ name: refactorName5, description, actions: [{ ...moveToNewFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] }]; } return emptyArray; }, @@ -138365,7 +139373,7 @@ function getNewFileImportsAndAddExportInOldFile(oldFile, importsToCopy, newFileI if (markSeenTop(top)) { addExportToChanges(oldFile, top, name, changes, useEsModuleSyntax); } - if (hasSyntacticModifier(decl, 1024 /* Default */)) { + if (hasSyntacticModifier(decl, 2048 /* Default */)) { oldFileDefault = name; } else { oldFileNamedImports.push(name.text); @@ -138395,11 +139403,7 @@ registerRefactor(refactorNameForMoveToFile, { return [{ name: refactorNameForMoveToFile, description: description2, actions: [moveToFileAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorNameForMoveToFile, - description: description2, - actions: [{ ...moveToFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] - }]; + return [{ name: refactorNameForMoveToFile, description: description2, actions: [{ ...moveToFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] }]; } return emptyArray; }, @@ -138424,14 +139428,13 @@ function error(notApplicableReason) { } function doChange4(context, oldFile, targetFile, program, toMove, changes, host, preferences) { const checker = program.getTypeChecker(); - const usage = getUsageInfo(oldFile, toMove.all, checker); if (!host.fileExists(targetFile)) { - changes.createNewFile(oldFile, targetFile, getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, usage, changes, toMove, program, host, preferences)); + changes.createNewFile(oldFile, targetFile, getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, getUsageInfo(oldFile, toMove.all, checker), changes, toMove, program, host, preferences)); addNewFileToTsconfig(program, changes, oldFile.fileName, targetFile, hostGetCanonicalFileName(host)); } else { const targetSourceFile = Debug.checkDefined(program.getSourceFile(targetFile)); const importAdder = ts_codefix_exports.createImportAdder(targetSourceFile, context.program, context.preferences, context.host); - getNewStatementsAndRemoveFromOldFile2(oldFile, targetSourceFile, usage, changes, toMove, program, host, preferences, importAdder); + getNewStatementsAndRemoveFromOldFile2(oldFile, targetSourceFile, getUsageInfo(oldFile, toMove.all, checker, getExistingImports(targetSourceFile, checker)), changes, toMove, program, host, preferences, importAdder); } } function getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, usage, changes, toMove, program, host, preferences, importAdder) { @@ -138517,10 +139520,10 @@ function getTargetFileImportsAndAddExportInOldFile(oldFile, targetFile, importsT const targetSourceFile = program.getSourceFile(targetFile); for (const oldStatement of oldFile.statements) { forEachImportInStatement(oldStatement, (i) => { - var _a, _b; + var _a; const moduleSpecifier = moduleSpecifierFromImport(i); - const resolved = (_a = oldFile.resolvedModules) == null ? void 0 : _a.get(moduleSpecifier.text, getModeForUsageLocation(oldFile, moduleSpecifier)); - const fileName = (_b = resolved == null ? void 0 : resolved.resolvedModule) == null ? void 0 : _b.resolvedFileName; + const resolved = program.getResolvedModule(oldFile, moduleSpecifier.text, getModeForUsageLocation(oldFile, moduleSpecifier)); + const fileName = (_a = resolved == null ? void 0 : resolved.resolvedModule) == null ? void 0 : _a.resolvedFileName; if (fileName && targetSourceFile) { const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), targetSourceFile, targetSourceFile.path, fileName, createModuleSpecifierResolutionHost(program, host)); append(copiedOldImports, filterImport(i, makeStringLiteral(newModuleSpecifier, quotePreference), (name) => importsToCopy.has(checker.getSymbolAtLocation(name)))); @@ -138551,7 +139554,7 @@ function getTargetFileImportsAndAddExportInOldFile(oldFile, targetFile, importsT if (importAdder && checker.isUnknownSymbol(symbol)) { importAdder.addImportFromExportedSymbol(skipAlias(symbol, checker)); } else { - if (hasSyntacticModifier(decl, 1024 /* Default */)) { + if (hasSyntacticModifier(decl, 2048 /* Default */)) { oldFileDefault = name; } else { oldFileNamedImports.push(name.text); @@ -138665,7 +139668,7 @@ function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifie factory.createNamespaceImport(newNamespaceId) ), newModuleString, - /*assertClause*/ + /*attributes*/ void 0 ); case 271 /* ImportEqualsDeclaration */: @@ -138791,7 +139794,7 @@ function addExports(sourceFile, toMove, needExport, useEs6Exports) { function isExported(sourceFile, decl, useEs6Exports, name) { var _a; if (useEs6Exports) { - return !isExpressionStatement(decl) && hasSyntacticModifier(decl, 1 /* Export */) || !!(name && sourceFile.symbol && ((_a = sourceFile.symbol.exports) == null ? void 0 : _a.has(name.escapedText))); + return !isExpressionStatement(decl) && hasSyntacticModifier(decl, 32 /* Export */) || !!(name && sourceFile.symbol && ((_a = sourceFile.symbol.exports) == null ? void 0 : _a.has(name.escapedText))); } return !!sourceFile.symbol && !!sourceFile.symbol.exports && getNamesToExportInCommonJS(decl).some((name2) => sourceFile.symbol.exports.has(escapeLeadingUnderscores(name2))); } @@ -138856,10 +139859,7 @@ function deleteUnusedImportsInVariableDeclaration(sourceFile, varDecl, changes, /*requireStringLiteralLikeArgument*/ true )) { - changes.delete( - sourceFile, - isVariableDeclarationList(varDecl.parent) && length(varDecl.parent.declarations) === 1 ? varDecl.parent.parent : varDecl - ); + changes.delete(sourceFile, isVariableDeclarationList(varDecl.parent) && length(varDecl.parent.declarations) === 1 ? varDecl.parent.parent : varDecl); } else { changes.delete(sourceFile, name); } @@ -138869,10 +139869,7 @@ function deleteUnusedImportsInVariableDeclaration(sourceFile, varDecl, changes, break; case 206 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { - changes.delete( - sourceFile, - isVariableDeclarationList(varDecl.parent) && varDecl.parent.declarations.length === 1 ? varDecl.parent.parent : varDecl - ); + changes.delete(sourceFile, isVariableDeclarationList(varDecl.parent) && varDecl.parent.declarations.length === 1 ? varDecl.parent.parent : varDecl); } else { for (const element of name.elements) { if (isIdentifier(element.name) && isUnused(element.name)) { @@ -138960,7 +139957,7 @@ function filterImport(i, moduleSpecifier, keep) { void 0, factory.createImportClause(clause.isTypeOnly, defaultImport, namedBindings), getSynthesizedDeepClone(moduleSpecifier), - /*assertClause*/ + /*attributes*/ void 0 ) : void 0; } @@ -139092,7 +140089,7 @@ function isPureImport(node) { case 272 /* ImportDeclaration */: return true; case 271 /* ImportEqualsDeclaration */: - return !hasSyntacticModifier(node, 1 /* Export */); + return !hasSyntacticModifier(node, 32 /* Export */); case 243 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( d.initializer, @@ -139103,7 +140100,7 @@ function isPureImport(node) { return false; } } -function getUsageInfo(oldFile, toMove, checker) { +function getUsageInfo(oldFile, toMove, checker, existingTargetImports = /* @__PURE__ */ new Set()) { const movedSymbols = /* @__PURE__ */ new Set(); const oldImportsNeededByTargetFile = /* @__PURE__ */ new Map(); const targetFileImportsFromOldFile = /* @__PURE__ */ new Set(); @@ -139117,10 +140114,16 @@ function getUsageInfo(oldFile, toMove, checker) { movedSymbols.add(Debug.checkDefined(isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); }); } + const unusedImportsFromOldFile = /* @__PURE__ */ new Set(); for (const statement of toMove) { forEachReference(statement, checker, (symbol, isValidTypeOnlyUseSite) => { - if (!symbol.declarations) + if (!symbol.declarations) { return; + } + if (existingTargetImports.has(skipAlias(symbol, checker))) { + unusedImportsFromOldFile.add(symbol); + return; + } for (const decl of symbol.declarations) { if (isInImport(decl)) { const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol); @@ -139131,7 +140134,9 @@ function getUsageInfo(oldFile, toMove, checker) { } }); } - const unusedImportsFromOldFile = new Set(oldImportsNeededByTargetFile.keys()); + for (const unusedImport of oldImportsNeededByTargetFile.keys()) { + unusedImportsFromOldFile.add(unusedImport); + } const oldFileImportsFromTargetFile = /* @__PURE__ */ new Set(); for (const statement of oldFile.statements) { if (contains(toMove, statement)) @@ -139263,16 +140268,13 @@ function moveStatementsToTargetFile(changes, program, statements, targetFile, to const checker = program.getTypeChecker(); const targetToSourceExports = /* @__PURE__ */ new Map(); for (const node of toMove.all) { - if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 1 /* Export */)) { + if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 32 /* Export */)) { forEachTopLevelDeclaration(node, (declaration) => { var _a2; const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0; const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0); if (exportDeclaration && exportDeclaration.moduleSpecifier) { - targetToSourceExports.set( - exportDeclaration, - (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration) - ); + targetToSourceExports.set(exportDeclaration, (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration)); } }); } @@ -139287,18 +140289,7 @@ function moveStatementsToTargetFile(changes, program, statements, targetFile, to continue; } if (length(updatedElements) < length(elements)) { - changes.replaceNode( - targetFile, - exportDeclaration, - factory.updateExportDeclaration( - exportDeclaration, - exportDeclaration.modifiers, - exportDeclaration.isTypeOnly, - factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), - exportDeclaration.moduleSpecifier, - exportDeclaration.assertClause - ) - ); + changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.attributes)); } } } @@ -139331,6 +140322,29 @@ function getOverloadRangeToMove(sourceFile, statement) { } return void 0; } +function getExistingImports(sourceFile, checker) { + const imports = /* @__PURE__ */ new Set(); + for (const moduleSpecifier of sourceFile.imports) { + const declaration = importFromModuleSpecifier(moduleSpecifier); + if (isImportDeclaration(declaration) && declaration.importClause && declaration.importClause.namedBindings && isNamedImports(declaration.importClause.namedBindings)) { + for (const e of declaration.importClause.namedBindings.elements) { + const symbol = checker.getSymbolAtLocation(e.propertyName || e.name); + if (symbol) { + imports.add(skipAlias(symbol, checker)); + } + } + } + if (isVariableDeclarationInitializedToRequire(declaration.parent) && isObjectBindingPattern(declaration.parent.name)) { + for (const e of declaration.parent.name.elements) { + const symbol = checker.getSymbolAtLocation(e.propertyName || e.name); + if (symbol) { + imports.add(skipAlias(symbol, checker)); + } + } + } + } + return imports; +} // src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts var ts_refactor_addOrRemoveBracesToArrowFunction_exports = {}; @@ -139467,12 +140481,15 @@ function getRefactorEditsToConvertOverloadsToOneSignature(context) { } function convertParameterToNamedTupleMember(p) { Debug.assert(isIdentifier(p.name)); - const result = setTextRange(factory.createNamedTupleMember( - p.dotDotDotToken, - p.name, - p.questionToken, - p.type || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ), p); + const result = setTextRange( + factory.createNamedTupleMember( + p.dotDotDotToken, + p.name, + p.questionToken, + p.type || factory.createKeywordTypeNode(133 /* AnyKeyword */) + ), + p + ); const parameterDocComment = p.symbol && p.symbol.getDocumentationComment(checker); if (parameterDocComment) { const newComment = displayPartsToString(parameterDocComment); @@ -139668,7 +140685,12 @@ function getConvertibleArrowFunctionAtPosition(file, startPosition, considerFunc } else if (refactorKindBeginsWith(removeBracesAction.kind, kind) && isBlock(func.body) && func.body.statements.length === 1) { const firstStatement = first(func.body.statements); if (isReturnStatement(firstStatement)) { - return { func, addBraces: false, expression: firstStatement.expression, returnStatement: firstStatement }; + const expression = firstStatement.expression && isObjectLiteralExpression(getLeftmostExpression( + firstStatement.expression, + /*stopAtCallExpressions*/ + false + )) ? factory.createParenthesizedExpression(firstStatement.expression) : firstStatement.expression; + return { func, addBraces: false, expression, returnStatement: firstStatement }; } } return void 0; @@ -139865,7 +140887,7 @@ function getEditInfoForConvertToNamedFunction(context, func, variableInfo) { const body = convertToBlock(func.body); const { variableDeclaration, variableDeclarationList, statement, name } = variableInfo; suppressLeadingTrivia(statement); - const modifiersFlags = getCombinedModifierFlags(variableDeclaration) & 1 /* Export */ | getEffectiveModifierFlags(func); + const modifiersFlags = getCombinedModifierFlags(variableDeclaration) & 32 /* Export */ | getEffectiveModifierFlags(func); const modifiers = factory.createModifiersFromModifierFlags(modifiersFlags); const newNode = factory.createFunctionDeclaration(length(modifiers) ? modifiers : void 0, func.asteriskToken, name, func.typeParameters, func.parameters, func.type, body); if (variableDeclarationList.declarations.length === 1) { @@ -140462,15 +141484,16 @@ function getRefactorActionsToConvertToTemplateString(context) { const { file, startPosition } = context; const node = getNodeOrParentOfParentheses(file, startPosition); const maybeBinary = getParentBinaryExpression(node); + const nodeIsStringLiteral = isStringLiteral(maybeBinary); const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] }; - if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) { + if (nodeIsStringLiteral && context.triggerReason !== "invoked") { + return emptyArray; + } + if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) { refactorInfo.actions.push(convertStringAction); return [refactorInfo]; } else if (context.preferences.provideRefactorNotApplicableReason) { - refactorInfo.actions.push({ - ...convertStringAction, - notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation) - }); + refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenations_and_string_literals) }); return [refactorInfo]; } return emptyArray; @@ -140531,12 +141554,7 @@ function getParentBinaryExpression(expr) { function treeToArray(current) { const loop = (current2) => { if (!isBinaryExpression(current2)) { - return { - nodes: [current2], - operators: [], - validOperators: true, - hasString: isStringLiteral(current2) || isNoSubstitutionTemplateLiteral(current2) - }; + return { nodes: [current2], operators: [], validOperators: true, hasString: isStringLiteral(current2) || isNoSubstitutionTemplateLiteral(current2) }; } const { nodes: nodes2, operators: operators2, hasString: leftHasString, validOperators: leftOperatorValid } = loop(current2.left); if (!(leftHasString || isStringLiteral(current2.right) || isTemplateExpression(current2.right))) { @@ -140628,7 +141646,10 @@ function nodesToTemplate({ nodes, operators }, file) { const isLastSpan = index === currentNode.templateSpans.length - 1; const text = span.literal.text + (isLastSpan ? subsequentText : ""); const rawText = getRawTextOfTemplate(span.literal) + (isLastSpan ? rawSubsequentText : ""); - return factory.createTemplateSpan(span.expression, isLast && isLastSpan ? factory.createTemplateTail(text, rawText) : factory.createTemplateMiddle(text, rawText)); + return factory.createTemplateSpan( + span.expression, + isLast && isLastSpan ? factory.createTemplateTail(text, rawText) : factory.createTemplateMiddle(text, rawText) + ); }); templateSpans.push(...spans); } else { @@ -140705,10 +141726,7 @@ function getRefactorActionsToConvertToOptionalChain(context) { function getRefactorEditsToConvertToOptionalChain(context, actionName2) { const info = getInfo3(context); Debug.assert(info && !isRefactorErrorInfo(info), "Expected applicable refactor info"); - const edits = ts_textChanges_exports.ChangeTracker.with( - context, - (t) => doChange6(context.file, context.program.getTypeChecker(), t, info, actionName2) - ); + const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange6(context.file, context.program.getTypeChecker(), t, info, actionName2)); return { edits, renameFilename: void 0, renameLocation: void 0 }; } function isValidExpression(node) { @@ -140871,11 +141889,7 @@ function doChange6(sourceFile, checker, changes, info, _actionName) { if (isBinaryExpression(expression)) { changes.replaceNodeRange(sourceFile, firstOccurrence, finalExpression, convertedChain); } else if (isConditionalExpression(expression)) { - changes.replaceNode( - sourceFile, - expression, - factory.createBinaryExpression(convertedChain, factory.createToken(61 /* QuestionQuestionToken */), expression.whenFalse) - ); + changes.replaceNode(sourceFile, expression, factory.createBinaryExpression(convertedChain, factory.createToken(61 /* QuestionQuestionToken */), expression.whenFalse)); } } } @@ -141230,7 +142244,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) { } if (isDeclaration(node2)) { const declaringNode = node2.kind === 260 /* VariableDeclaration */ ? node2.parent.parent : node2; - if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { + if (hasSyntacticModifier(declaringNode, 32 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } @@ -141942,57 +142956,36 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont const paramType = checker.getTypeAtLocation(p); if (paramType === checker.getAnyType()) hasAny = true; - parameters.push(factory.updateParameterDeclaration( - p, - p.modifiers, - p.dotDotDotToken, - p.name, - p.questionToken, - p.type || checker.typeToTypeNode(paramType, scope, 1 /* NoTruncation */), - p.initializer - )); + parameters.push(factory.updateParameterDeclaration(p, p.modifiers, p.dotDotDotToken, p.name, p.questionToken, p.type || checker.typeToTypeNode(paramType, scope, 1 /* NoTruncation */), p.initializer)); } } if (hasAny) return { variableType: variableType2, initializer: initializer2 }; variableType2 = void 0; if (isArrowFunction(initializer2)) { - initializer2 = factory.updateArrowFunction( - initializer2, - canHaveModifiers(node) ? getModifiers(node) : void 0, - initializer2.typeParameters, - parameters, - initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), - initializer2.equalsGreaterThanToken, - initializer2.body - ); + initializer2 = factory.updateArrowFunction(initializer2, canHaveModifiers(node) ? getModifiers(node) : void 0, initializer2.typeParameters, parameters, initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), initializer2.equalsGreaterThanToken, initializer2.body); } else { if (functionSignature && !!functionSignature.thisParameter) { const firstParameter = firstOrUndefined(parameters); if (!firstParameter || isIdentifier(firstParameter.name) && firstParameter.name.escapedText !== "this") { const thisType = checker.getTypeOfSymbolAtLocation(functionSignature.thisParameter, node); - parameters.splice(0, 0, factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "this", - /*questionToken*/ - void 0, - checker.typeToTypeNode(thisType, scope, 1 /* NoTruncation */) - )); + parameters.splice( + 0, + 0, + factory.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "this", + /*questionToken*/ + void 0, + checker.typeToTypeNode(thisType, scope, 1 /* NoTruncation */) + ) + ); } } - initializer2 = factory.updateFunctionExpression( - initializer2, - canHaveModifiers(node) ? getModifiers(node) : void 0, - initializer2.asteriskToken, - initializer2.name, - initializer2.typeParameters, - parameters, - initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), - initializer2.body - ); + initializer2 = factory.updateFunctionExpression(initializer2, canHaveModifiers(node) ? getModifiers(node) : void 0, initializer2.asteriskToken, initializer2.name, initializer2.typeParameters, parameters, initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), initializer2.body); } return { variableType: variableType2, initializer: initializer2 }; } @@ -142259,7 +143252,7 @@ function collectReadsAndWrites(targetRange, scopes, enclosingTextRange, sourceFi usagesPerScope[i].usages.forEach((value) => { if (value.usage === 2 /* Write */) { hasWrite = true; - if (value.symbol.flags & 106500 /* ClassMember */ && value.symbol.valueDeclaration && hasEffectiveModifier(value.symbol.valueDeclaration, 64 /* Readonly */)) { + if (value.symbol.flags & 106500 /* ClassMember */ && value.symbol.valueDeclaration && hasEffectiveModifier(value.symbol.valueDeclaration, 8 /* Readonly */)) { readonlyClassPropertyWrite = value.symbol.valueDeclaration; } } @@ -142405,7 +143398,7 @@ function collectReadsAndWrites(targetRange, scopes, enclosingTextRange, sourceFi return symbolId; } function checkForUsedDeclarations(node) { - if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.indexOf(node) >= 0) { + if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.includes(node)) { return; } const sym = isIdentifier(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node); @@ -142598,7 +143591,7 @@ function doChange7(sourceFile, changes, declaration, typeNode) { function getInfo4(context) { if (isInJSFile(context.file) || !refactorKindBeginsWith(inferReturnTypeAction.kind, context.kind)) return; - const token = getTokenAtPosition(context.file, context.startPosition); + const token = getTouchingPropertyName(context.file, context.startPosition); const declaration = findAncestor(token, (n) => isBlock(n) || n.parent && isArrowFunction(n.parent) && (n.kind === 39 /* EqualsGreaterThanToken */ || n.parent.body === n) ? "quit" : isConvertibleDeclaration(n)); if (!declaration || !declaration.body || declaration.type) { return { error: getLocaleSpecificMessage(Diagnostics.Return_type_must_be_inferred_from_a_function) }; @@ -142743,14 +143736,14 @@ function collectTokens(program, sourceFile, span, collector, cancellationToken) if (decl) { const modifiers = getCombinedModifierFlags(decl); const nodeFlags = getCombinedNodeFlags(decl); - if (modifiers & 32 /* Static */) { + if (modifiers & 256 /* Static */) { modifierSet |= 1 << 1 /* static */; } - if (modifiers & 512 /* Async */) { + if (modifiers & 1024 /* Async */) { modifierSet |= 1 << 2 /* async */; } if (typeIdx !== 0 /* class */ && typeIdx !== 2 /* interface */) { - if (modifiers & 64 /* Readonly */ || nodeFlags & 2 /* Const */ || symbol.getFlags() & 8 /* EnumMember */) { + if (modifiers & 8 /* Readonly */ || nodeFlags & 2 /* Const */ || symbol.getFlags() & 8 /* EnumMember */) { modifierSet |= 1 << 3 /* readonly */; } } @@ -143468,7 +144461,7 @@ var SourceFileObject = class extends NodeObject { forEachChild(node, visit); break; case 169 /* Parameter */: - if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { + if (!hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) { break; } case 260 /* VariableDeclaration */: @@ -143605,7 +144598,9 @@ var SyntaxTreeCache = class { this.host, this.host.getCompilationSettings() ), - setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings()) + setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings()), + // These files are used to produce syntax-based highlighting, which reads JSDoc, so we must use ParseAll. + jsDocParsingMode: 0 /* ParseAll */ }; sourceFile = createLanguageServiceSourceFile( fileName, @@ -143665,7 +144660,8 @@ function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version2, t const options = { languageVersion: sourceFile.languageVersion, impliedNodeFormat: sourceFile.impliedNodeFormat, - setExternalModuleIndicator: sourceFile.setExternalModuleIndicator + setExternalModuleIndicator: sourceFile.setExternalModuleIndicator, + jsDocParsingMode: sourceFile.jsDocParsingMode }; return createLanguageServiceSourceFile( sourceFile.fileName, @@ -143867,7 +144863,8 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h resolveTypeReferenceDirectiveReferences: maybeBind(host, host.resolveTypeReferenceDirectiveReferences), resolveLibrary: maybeBind(host, host.resolveLibrary), useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect), - getParsedCommandLine + getParsedCommandLine, + jsDocParsingMode: host.jsDocParsingMode }; const originalGetSourceFile = compilerHost.getSourceFile; const { getSourceFileWithCache } = changeCompilerHostLikeToUseCache( @@ -144130,10 +145127,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h tags: type.symbol ? type.symbol.getJsDocTags(typeChecker) : void 0 }; } - const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken( - cancellationToken, - (typeChecker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker2, symbol, sourceFile, getContainerNode(nodeForQuickInfo), nodeForQuickInfo) - ); + const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker2, symbol, sourceFile, getContainerNode(nodeForQuickInfo), nodeForQuickInfo)); return { kind: symbolKind, kindModifiers: ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), @@ -144219,12 +145213,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h } else { const quotePreference = getQuotePreference(sourceFile, preferences ?? emptyOptions); const providePrefixAndSuffixTextForRename = typeof preferences === "boolean" ? preferences : preferences == null ? void 0 : preferences.providePrefixAndSuffixTextForRename; - return getReferencesWorker2( - node, - position, - { findInStrings, findInComments, providePrefixAndSuffixTextForRename, use: ts_FindAllReferences_exports.FindReferencesUse.Rename }, - (entry, originalNode, checker) => ts_FindAllReferences_exports.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false, quotePreference) - ); + return getReferencesWorker2(node, position, { findInStrings, findInComments, providePrefixAndSuffixTextForRename, use: ts_FindAllReferences_exports.FindReferencesUse.Rename }, (entry, originalNode, checker) => ts_FindAllReferences_exports.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false, quotePreference)); } } function getReferencesAtPosition(fileName, position) { @@ -144244,10 +145233,10 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h synchronizeHostData(); return ts_FindAllReferences_exports.Core.getReferencesForFileName(fileName, program, program.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry); } - function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false) { + function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false, excludeLibFiles = false) { synchronizeHostData(); const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles(); - return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles); + return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles); } function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) { synchronizeHostData(); @@ -144483,15 +145472,12 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h wordPattern: jsxTagWordPattern }; } else { - const tag = findAncestor( - token.parent, - (n) => { - if (isJsxOpeningElement(n) || isJsxClosingElement(n)) { - return true; - } - return false; + const tag = findAncestor(token.parent, (n) => { + if (isJsxOpeningElement(n) || isJsxClosingElement(n)) { + return true; } - ); + return false; + }); if (!tag) return void 0; Debug.assert(isJsxOpeningElement(tag) || isJsxClosingElement(tag), "tag should be opening or closing element"); @@ -144547,7 +145533,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h const lineTextStart = lineTextStarts.get(i.toString()); if (lineTextStart !== void 0) { if (isJsx) { - textChanges2.push.apply(textChanges2, toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx)); + textChanges2.push(...toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx)); } else if (isCommenting) { textChanges2.push({ newText: openComment, @@ -144690,7 +145676,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h if (commentRange) { switch (commentRange.kind) { case 2 /* SingleLineCommentTrivia */: - textChanges2.push.apply(textChanges2, toggleLineComment( + textChanges2.push(...toggleLineComment( fileName, { end: commentRange.end, pos: commentRange.pos + 1 }, /*insertComment*/ @@ -144698,7 +145684,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h )); break; case 3 /* MultiLineCommentTrivia */: - textChanges2.push.apply(textChanges2, toggleMultilineComment( + textChanges2.push(...toggleMultilineComment( fileName, { end: commentRange.end, pos: commentRange.pos + 1 }, /*insertComment*/ @@ -144774,7 +145760,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h return char >= 97 /* a */ && char <= 122 /* z */ || char >= 65 /* A */ && char <= 90 /* Z */ || char >= 48 /* _0 */ && char <= 57 /* _9 */; } function isNodeModulesFile(path) { - return stringContains(path, "/node_modules/"); + return path.includes("/node_modules/"); } } function getRenameInfo2(fileName, position, preferences) { @@ -145062,940 +146048,6 @@ function transform(source, transformers, compilerOptions) { return result; } -// src/services/shims.ts -var debugObjectHost = function() { - return this; -}(); -function logInternalError(logger, err) { - if (logger) { - logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message); - } -} -var ScriptSnapshotShimAdapter = class { - constructor(scriptSnapshotShim) { - this.scriptSnapshotShim = scriptSnapshotShim; - } - getText(start2, end) { - return this.scriptSnapshotShim.getText(start2, end); - } - getLength() { - return this.scriptSnapshotShim.getLength(); - } - getChangeRange(oldSnapshot) { - const oldSnapshotShim = oldSnapshot; - const encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim); - if (encoded === null) { - return null; - } - const decoded = JSON.parse(encoded); - return createTextChangeRange( - createTextSpan(decoded.span.start, decoded.span.length), - decoded.newLength - ); - } - dispose() { - if ("dispose" in this.scriptSnapshotShim) { - this.scriptSnapshotShim.dispose(); - } - } -}; -var LanguageServiceShimHostAdapter = class { - constructor(shimHost) { - this.shimHost = shimHost; - this.loggingEnabled = false; - this.tracingEnabled = false; - if ("getModuleResolutionsForFile" in this.shimHost) { - this.resolveModuleNames = (moduleNames, containingFile) => { - const resolutionsInFile = JSON.parse(this.shimHost.getModuleResolutionsForFile(containingFile)); - return map(moduleNames, (name) => { - const result = getProperty(resolutionsInFile, name); - return result ? { resolvedFileName: result, extension: extensionFromPath(result), isExternalLibraryImport: false } : void 0; - }); - }; - } - if ("directoryExists" in this.shimHost) { - this.directoryExists = (directoryName) => this.shimHost.directoryExists(directoryName); - } - if ("getTypeReferenceDirectiveResolutionsForFile" in this.shimHost) { - this.resolveTypeReferenceDirectives = (typeDirectiveNames, containingFile) => { - const typeDirectivesForFile = JSON.parse(this.shimHost.getTypeReferenceDirectiveResolutionsForFile(containingFile)); - return map(typeDirectiveNames, (name) => getProperty(typeDirectivesForFile, isString(name) ? name : toFileNameLowerCase(name.fileName))); - }; - } - } - log(s) { - if (this.loggingEnabled) { - this.shimHost.log(s); - } - } - trace(s) { - if (this.tracingEnabled) { - this.shimHost.trace(s); - } - } - error(s) { - this.shimHost.error(s); - } - getProjectVersion() { - if (!this.shimHost.getProjectVersion) { - return void 0; - } - return this.shimHost.getProjectVersion(); - } - getTypeRootsVersion() { - if (!this.shimHost.getTypeRootsVersion) { - return 0; - } - return this.shimHost.getTypeRootsVersion(); - } - useCaseSensitiveFileNames() { - return this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false; - } - getCompilationSettings() { - const settingsJson = this.shimHost.getCompilationSettings(); - if (settingsJson === null || settingsJson === "") { - throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); - } - const compilerOptions = JSON.parse(settingsJson); - compilerOptions.allowNonTsExtensions = true; - return compilerOptions; - } - getScriptFileNames() { - const encoded = this.shimHost.getScriptFileNames(); - return JSON.parse(encoded); - } - getScriptSnapshot(fileName) { - const scriptSnapshot = this.shimHost.getScriptSnapshot(fileName); - return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot); - } - getScriptKind(fileName) { - if ("getScriptKind" in this.shimHost) { - return this.shimHost.getScriptKind(fileName); - } else { - return 0 /* Unknown */; - } - } - getScriptVersion(fileName) { - return this.shimHost.getScriptVersion(fileName); - } - getLocalizedDiagnosticMessages() { - const diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages(); - if (diagnosticMessagesJson === null || diagnosticMessagesJson === "") { - return null; - } - try { - return JSON.parse(diagnosticMessagesJson); - } catch (e) { - this.log(e.description || "diagnosticMessages.generated.json has invalid JSON format"); - return null; - } - } - getCancellationToken() { - const hostCancellationToken = this.shimHost.getCancellationToken(); - return new ThrottledCancellationToken(hostCancellationToken); - } - getCurrentDirectory() { - return this.shimHost.getCurrentDirectory(); - } - getDirectories(path) { - return JSON.parse(this.shimHost.getDirectories(path)); - } - getDefaultLibFileName(options) { - return this.shimHost.getDefaultLibFileName(JSON.stringify(options)); - } - readDirectory(path, extensions, exclude, include, depth) { - const pattern = getFileMatcherPatterns( - path, - exclude, - include, - this.shimHost.useCaseSensitiveFileNames(), - this.shimHost.getCurrentDirectory() - ); - return JSON.parse(this.shimHost.readDirectory( - path, - JSON.stringify(extensions), - JSON.stringify(pattern.basePaths), - pattern.excludePattern, - pattern.includeFilePattern, - pattern.includeDirectoryPattern, - depth - )); - } - readFile(path, encoding) { - return this.shimHost.readFile(path, encoding); - } - fileExists(path) { - return this.shimHost.fileExists(path); - } -}; -var CoreServicesShimHostAdapter = class { - constructor(shimHost) { - this.shimHost = shimHost; - this.useCaseSensitiveFileNames = this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false; - if ("directoryExists" in this.shimHost) { - this.directoryExists = (directoryName) => this.shimHost.directoryExists(directoryName); - } else { - this.directoryExists = void 0; - } - if ("realpath" in this.shimHost) { - this.realpath = (path) => this.shimHost.realpath(path); - } else { - this.realpath = void 0; - } - } - readDirectory(rootDir, extensions, exclude, include, depth) { - const pattern = getFileMatcherPatterns( - rootDir, - exclude, - include, - this.shimHost.useCaseSensitiveFileNames(), - this.shimHost.getCurrentDirectory() - ); - return JSON.parse(this.shimHost.readDirectory( - rootDir, - JSON.stringify(extensions), - JSON.stringify(pattern.basePaths), - pattern.excludePattern, - pattern.includeFilePattern, - pattern.includeDirectoryPattern, - depth - )); - } - fileExists(fileName) { - return this.shimHost.fileExists(fileName); - } - readFile(fileName) { - return this.shimHost.readFile(fileName); - } - getDirectories(path) { - return JSON.parse(this.shimHost.getDirectories(path)); - } -}; -function simpleForwardCall(logger, actionDescription2, action, logPerformance) { - let start2; - if (logPerformance) { - logger.log(actionDescription2); - start2 = timestamp(); - } - const result = action(); - if (logPerformance) { - const end = timestamp(); - logger.log(`${actionDescription2} completed in ${end - start2} msec`); - if (isString(result)) { - let str = result; - if (str.length > 128) { - str = str.substring(0, 128) + "..."; - } - logger.log(` result.length=${str.length}, result='${JSON.stringify(str)}'`); - } - } - return result; -} -function forwardJSONCall(logger, actionDescription2, action, logPerformance) { - return forwardCall( - logger, - actionDescription2, - /*returnJson*/ - true, - action, - logPerformance - ); -} -function forwardCall(logger, actionDescription2, returnJson, action, logPerformance) { - try { - const result = simpleForwardCall(logger, actionDescription2, action, logPerformance); - return returnJson ? JSON.stringify({ result }) : result; - } catch (err) { - if (err instanceof OperationCanceledException) { - return JSON.stringify({ canceled: true }); - } - logInternalError(logger, err); - err.description = actionDescription2; - return JSON.stringify({ error: err }); - } -} -var ShimBase = class { - constructor(factory2) { - this.factory = factory2; - factory2.registerShim(this); - } - dispose(_dummy) { - this.factory.unregisterShim(this); - } -}; -function realizeDiagnostics(diagnostics, newLine) { - return diagnostics.map((d) => realizeDiagnostic(d, newLine)); -} -function realizeDiagnostic(diagnostic, newLine) { - return { - message: flattenDiagnosticMessageText(diagnostic.messageText, newLine), - start: diagnostic.start, - // TODO: GH#18217 - length: diagnostic.length, - // TODO: GH#18217 - category: diagnosticCategoryName(diagnostic), - code: diagnostic.code, - reportsUnnecessary: diagnostic.reportsUnnecessary, - reportsDeprecated: diagnostic.reportsDeprecated - }; -} -var LanguageServiceShimObject = class extends ShimBase { - constructor(factory2, host, languageService) { - super(factory2); - this.host = host; - this.languageService = languageService; - this.logPerformance = false; - this.logger = this.host; - } - forwardJSONCall(actionDescription2, action) { - return forwardJSONCall(this.logger, actionDescription2, action, this.logPerformance); - } - /// DISPOSE - /** - * Ensure (almost) deterministic release of internal Javascript resources when - * some external native objects holds onto us (e.g. Com/Interop). - */ - dispose(dummy) { - this.logger.log("dispose()"); - this.languageService.dispose(); - this.languageService = null; - if (debugObjectHost && debugObjectHost.CollectGarbage) { - debugObjectHost.CollectGarbage(); - this.logger.log("CollectGarbage()"); - } - this.logger = null; - super.dispose(dummy); - } - /// REFRESH - /** - * Update the list of scripts known to the compiler - */ - refresh(throwOnError) { - this.forwardJSONCall( - `refresh(${throwOnError})`, - () => null - // eslint-disable-line no-null/no-null - ); - } - cleanupSemanticCache() { - this.forwardJSONCall( - "cleanupSemanticCache()", - () => { - this.languageService.cleanupSemanticCache(); - return null; - } - ); - } - realizeDiagnostics(diagnostics) { - const newLine = getNewLineOrDefaultFromHost( - this.host, - /*formatSettings*/ - void 0 - ); - return realizeDiagnostics(diagnostics, newLine); - } - getSyntacticClassifications(fileName, start2, length2) { - return this.forwardJSONCall( - `getSyntacticClassifications('${fileName}', ${start2}, ${length2})`, - () => this.languageService.getSyntacticClassifications(fileName, createTextSpan(start2, length2)) - ); - } - getSemanticClassifications(fileName, start2, length2) { - return this.forwardJSONCall( - `getSemanticClassifications('${fileName}', ${start2}, ${length2})`, - () => this.languageService.getSemanticClassifications(fileName, createTextSpan(start2, length2)) - ); - } - getEncodedSyntacticClassifications(fileName, start2, length2) { - return this.forwardJSONCall( - `getEncodedSyntacticClassifications('${fileName}', ${start2}, ${length2})`, - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - () => convertClassifications(this.languageService.getEncodedSyntacticClassifications(fileName, createTextSpan(start2, length2))) - ); - } - getEncodedSemanticClassifications(fileName, start2, length2) { - return this.forwardJSONCall( - `getEncodedSemanticClassifications('${fileName}', ${start2}, ${length2})`, - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - () => convertClassifications(this.languageService.getEncodedSemanticClassifications(fileName, createTextSpan(start2, length2))) - ); - } - getSyntacticDiagnostics(fileName) { - return this.forwardJSONCall( - `getSyntacticDiagnostics('${fileName}')`, - () => { - const diagnostics = this.languageService.getSyntacticDiagnostics(fileName); - return this.realizeDiagnostics(diagnostics); - } - ); - } - getSemanticDiagnostics(fileName) { - return this.forwardJSONCall( - `getSemanticDiagnostics('${fileName}')`, - () => { - const diagnostics = this.languageService.getSemanticDiagnostics(fileName); - return this.realizeDiagnostics(diagnostics); - } - ); - } - getSuggestionDiagnostics(fileName) { - return this.forwardJSONCall(`getSuggestionDiagnostics('${fileName}')`, () => this.realizeDiagnostics(this.languageService.getSuggestionDiagnostics(fileName))); - } - getCompilerOptionsDiagnostics() { - return this.forwardJSONCall( - "getCompilerOptionsDiagnostics()", - () => { - const diagnostics = this.languageService.getCompilerOptionsDiagnostics(); - return this.realizeDiagnostics(diagnostics); - } - ); - } - /// QUICKINFO - /** - * Computes a string representation of the type at the requested position - * in the active file. - */ - getQuickInfoAtPosition(fileName, position) { - return this.forwardJSONCall( - `getQuickInfoAtPosition('${fileName}', ${position})`, - () => this.languageService.getQuickInfoAtPosition(fileName, position) - ); - } - /// NAMEORDOTTEDNAMESPAN - /** - * Computes span information of the name or dotted name at the requested position - * in the active file. - */ - getNameOrDottedNameSpan(fileName, startPos, endPos) { - return this.forwardJSONCall( - `getNameOrDottedNameSpan('${fileName}', ${startPos}, ${endPos})`, - () => this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos) - ); - } - /** - * STATEMENTSPAN - * Computes span information of statement at the requested position in the active file. - */ - getBreakpointStatementAtPosition(fileName, position) { - return this.forwardJSONCall( - `getBreakpointStatementAtPosition('${fileName}', ${position})`, - () => this.languageService.getBreakpointStatementAtPosition(fileName, position) - ); - } - /// SIGNATUREHELP - getSignatureHelpItems(fileName, position, options) { - return this.forwardJSONCall( - `getSignatureHelpItems('${fileName}', ${position})`, - () => this.languageService.getSignatureHelpItems(fileName, position, options) - ); - } - /// GOTO DEFINITION - /** - * Computes the definition location and file for the symbol - * at the requested position. - */ - getDefinitionAtPosition(fileName, position) { - return this.forwardJSONCall( - `getDefinitionAtPosition('${fileName}', ${position})`, - () => this.languageService.getDefinitionAtPosition(fileName, position) - ); - } - /** - * Computes the definition location and file for the symbol - * at the requested position. - */ - getDefinitionAndBoundSpan(fileName, position) { - return this.forwardJSONCall( - `getDefinitionAndBoundSpan('${fileName}', ${position})`, - () => this.languageService.getDefinitionAndBoundSpan(fileName, position) - ); - } - /// GOTO Type - /** - * Computes the definition location of the type of the symbol - * at the requested position. - */ - getTypeDefinitionAtPosition(fileName, position) { - return this.forwardJSONCall( - `getTypeDefinitionAtPosition('${fileName}', ${position})`, - () => this.languageService.getTypeDefinitionAtPosition(fileName, position) - ); - } - /// GOTO Implementation - /** - * Computes the implementation location of the symbol - * at the requested position. - */ - getImplementationAtPosition(fileName, position) { - return this.forwardJSONCall( - `getImplementationAtPosition('${fileName}', ${position})`, - () => this.languageService.getImplementationAtPosition(fileName, position) - ); - } - getRenameInfo(fileName, position, preferences) { - return this.forwardJSONCall( - `getRenameInfo('${fileName}', ${position})`, - () => this.languageService.getRenameInfo(fileName, position, preferences) - ); - } - getSmartSelectionRange(fileName, position) { - return this.forwardJSONCall( - `getSmartSelectionRange('${fileName}', ${position})`, - () => this.languageService.getSmartSelectionRange(fileName, position) - ); - } - findRenameLocations(fileName, position, findInStrings, findInComments, preferences) { - return this.forwardJSONCall( - `findRenameLocations('${fileName}', ${position}, ${findInStrings}, ${findInComments})`, - () => this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments, preferences) - ); - } - /// GET BRACE MATCHING - getBraceMatchingAtPosition(fileName, position) { - return this.forwardJSONCall( - `getBraceMatchingAtPosition('${fileName}', ${position})`, - () => this.languageService.getBraceMatchingAtPosition(fileName, position) - ); - } - isValidBraceCompletionAtPosition(fileName, position, openingBrace) { - return this.forwardJSONCall( - `isValidBraceCompletionAtPosition('${fileName}', ${position}, ${openingBrace})`, - () => this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace) - ); - } - getSpanOfEnclosingComment(fileName, position, onlyMultiLine) { - return this.forwardJSONCall( - `getSpanOfEnclosingComment('${fileName}', ${position})`, - () => this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine) - ); - } - /// GET SMART INDENT - getIndentationAtPosition(fileName, position, options) { - return this.forwardJSONCall( - `getIndentationAtPosition('${fileName}', ${position})`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getIndentationAtPosition(fileName, position, localOptions); - } - ); - } - /// GET REFERENCES - getReferencesAtPosition(fileName, position) { - return this.forwardJSONCall( - `getReferencesAtPosition('${fileName}', ${position})`, - () => this.languageService.getReferencesAtPosition(fileName, position) - ); - } - findReferences(fileName, position) { - return this.forwardJSONCall( - `findReferences('${fileName}', ${position})`, - () => this.languageService.findReferences(fileName, position) - ); - } - getFileReferences(fileName) { - return this.forwardJSONCall( - `getFileReferences('${fileName})`, - () => this.languageService.getFileReferences(fileName) - ); - } - getDocumentHighlights(fileName, position, filesToSearch) { - return this.forwardJSONCall( - `getDocumentHighlights('${fileName}', ${position})`, - () => { - const results = this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); - const normalizedName = toFileNameLowerCase(normalizeSlashes(fileName)); - return filter(results, (r) => toFileNameLowerCase(normalizeSlashes(r.fileName)) === normalizedName); - } - ); - } - /// COMPLETION LISTS - /** - * Get a string based representation of the completions - * to provide at the given source position and providing a member completion - * list if requested. - */ - getCompletionsAtPosition(fileName, position, preferences, formattingSettings) { - return this.forwardJSONCall( - `getCompletionsAtPosition('${fileName}', ${position}, ${preferences}, ${formattingSettings})`, - () => this.languageService.getCompletionsAtPosition(fileName, position, preferences, formattingSettings) - ); - } - /** Get a string based representation of a completion list entry details */ - getCompletionEntryDetails(fileName, position, entryName, formatOptions, source, preferences, data) { - return this.forwardJSONCall( - `getCompletionEntryDetails('${fileName}', ${position}, '${entryName}')`, - () => { - const localOptions = formatOptions === void 0 ? void 0 : JSON.parse(formatOptions); - return this.languageService.getCompletionEntryDetails(fileName, position, entryName, localOptions, source, preferences, data); - } - ); - } - getFormattingEditsForRange(fileName, start2, end, options) { - return this.forwardJSONCall( - `getFormattingEditsForRange('${fileName}', ${start2}, ${end})`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getFormattingEditsForRange(fileName, start2, end, localOptions); - } - ); - } - getFormattingEditsForDocument(fileName, options) { - return this.forwardJSONCall( - `getFormattingEditsForDocument('${fileName}')`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getFormattingEditsForDocument(fileName, localOptions); - } - ); - } - getFormattingEditsAfterKeystroke(fileName, position, key, options) { - return this.forwardJSONCall( - `getFormattingEditsAfterKeystroke('${fileName}', ${position}, '${key}')`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions); - } - ); - } - getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) { - return this.forwardJSONCall( - `getDocCommentTemplateAtPosition('${fileName}', ${position})`, - () => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) - ); - } - /// NAVIGATE TO - /** Return a list of symbols that are interesting to navigate to */ - getNavigateToItems(searchValue, maxResultCount, fileName) { - return this.forwardJSONCall( - `getNavigateToItems('${searchValue}', ${maxResultCount}, ${fileName})`, - () => this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName) - ); - } - getNavigationBarItems(fileName) { - return this.forwardJSONCall( - `getNavigationBarItems('${fileName}')`, - () => this.languageService.getNavigationBarItems(fileName) - ); - } - getNavigationTree(fileName) { - return this.forwardJSONCall( - `getNavigationTree('${fileName}')`, - () => this.languageService.getNavigationTree(fileName) - ); - } - getOutliningSpans(fileName) { - return this.forwardJSONCall( - `getOutliningSpans('${fileName}')`, - () => this.languageService.getOutliningSpans(fileName) - ); - } - getTodoComments(fileName, descriptors) { - return this.forwardJSONCall( - `getTodoComments('${fileName}')`, - () => this.languageService.getTodoComments(fileName, JSON.parse(descriptors)) - ); - } - /// CALL HIERARCHY - prepareCallHierarchy(fileName, position) { - return this.forwardJSONCall( - `prepareCallHierarchy('${fileName}', ${position})`, - () => this.languageService.prepareCallHierarchy(fileName, position) - ); - } - provideCallHierarchyIncomingCalls(fileName, position) { - return this.forwardJSONCall( - `provideCallHierarchyIncomingCalls('${fileName}', ${position})`, - () => this.languageService.provideCallHierarchyIncomingCalls(fileName, position) - ); - } - provideCallHierarchyOutgoingCalls(fileName, position) { - return this.forwardJSONCall( - `provideCallHierarchyOutgoingCalls('${fileName}', ${position})`, - () => this.languageService.provideCallHierarchyOutgoingCalls(fileName, position) - ); - } - provideInlayHints(fileName, span, preference) { - return this.forwardJSONCall( - `provideInlayHints('${fileName}', '${JSON.stringify(span)}', ${JSON.stringify(preference)})`, - () => this.languageService.provideInlayHints(fileName, span, preference) - ); - } - /// Emit - getEmitOutput(fileName) { - return this.forwardJSONCall( - `getEmitOutput('${fileName}')`, - () => { - const { diagnostics, ...rest } = this.languageService.getEmitOutput(fileName); - return { ...rest, diagnostics: this.realizeDiagnostics(diagnostics) }; - } - ); - } - getEmitOutputObject(fileName) { - return forwardCall( - this.logger, - `getEmitOutput('${fileName}')`, - /*returnJson*/ - false, - () => this.languageService.getEmitOutput(fileName), - this.logPerformance - ); - } - toggleLineComment(fileName, textRange) { - return this.forwardJSONCall( - `toggleLineComment('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.toggleLineComment(fileName, textRange) - ); - } - toggleMultilineComment(fileName, textRange) { - return this.forwardJSONCall( - `toggleMultilineComment('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.toggleMultilineComment(fileName, textRange) - ); - } - commentSelection(fileName, textRange) { - return this.forwardJSONCall( - `commentSelection('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.commentSelection(fileName, textRange) - ); - } - uncommentSelection(fileName, textRange) { - return this.forwardJSONCall( - `uncommentSelection('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.uncommentSelection(fileName, textRange) - ); - } -}; -function convertClassifications(classifications) { - return { spans: classifications.spans.join(","), endOfLineState: classifications.endOfLineState }; -} -var ClassifierShimObject = class extends ShimBase { - constructor(factory2, logger) { - super(factory2); - this.logger = logger; - this.logPerformance = false; - this.classifier = createClassifier(); - } - getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent = false) { - return forwardJSONCall( - this.logger, - "getEncodedLexicalClassifications", - () => convertClassifications(this.classifier.getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent)), - this.logPerformance - ); - } - /// COLORIZATION - getClassificationsForLine(text, lexState, classifyKeywordsInGenerics = false) { - const classification = this.classifier.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics); - let result = ""; - for (const item of classification.entries) { - result += item.length + "\n"; - result += item.classification + "\n"; - } - result += classification.finalLexState; - return result; - } -}; -var CoreServicesShimObject = class extends ShimBase { - constructor(factory2, logger, host) { - super(factory2); - this.logger = logger; - this.host = host; - this.logPerformance = false; - } - forwardJSONCall(actionDescription2, action) { - return forwardJSONCall(this.logger, actionDescription2, action, this.logPerformance); - } - resolveModuleName(fileName, moduleName, compilerOptionsJson) { - return this.forwardJSONCall(`resolveModuleName('${fileName}')`, () => { - const compilerOptions = JSON.parse(compilerOptionsJson); - const result = resolveModuleName(moduleName, normalizeSlashes(fileName), compilerOptions, this.host); - let resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : void 0; - if (result.resolvedModule && result.resolvedModule.extension !== ".ts" /* Ts */ && result.resolvedModule.extension !== ".tsx" /* Tsx */ && result.resolvedModule.extension !== ".d.ts" /* Dts */) { - resolvedFileName = void 0; - } - return { - resolvedFileName, - failedLookupLocations: result.failedLookupLocations, - affectingLocations: result.affectingLocations - }; - }); - } - resolveTypeReferenceDirective(fileName, typeReferenceDirective, compilerOptionsJson) { - return this.forwardJSONCall(`resolveTypeReferenceDirective(${fileName})`, () => { - const compilerOptions = JSON.parse(compilerOptionsJson); - const result = resolveTypeReferenceDirective(typeReferenceDirective, normalizeSlashes(fileName), compilerOptions, this.host); - return { - resolvedFileName: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.resolvedFileName : void 0, - primary: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.primary : true, - failedLookupLocations: result.failedLookupLocations - }; - }); - } - getPreProcessedFileInfo(fileName, sourceTextSnapshot) { - return this.forwardJSONCall( - `getPreProcessedFileInfo('${fileName}')`, - () => { - const result = preProcessFile( - getSnapshotText(sourceTextSnapshot), - /*readImportFiles*/ - true, - /*detectJavaScriptImports*/ - true - ); - return { - referencedFiles: this.convertFileReferences(result.referencedFiles), - importedFiles: this.convertFileReferences(result.importedFiles), - ambientExternalModules: result.ambientExternalModules, - isLibFile: result.isLibFile, - typeReferenceDirectives: this.convertFileReferences(result.typeReferenceDirectives), - libReferenceDirectives: this.convertFileReferences(result.libReferenceDirectives) - }; - } - ); - } - getAutomaticTypeDirectiveNames(compilerOptionsJson) { - return this.forwardJSONCall( - `getAutomaticTypeDirectiveNames('${compilerOptionsJson}')`, - () => { - const compilerOptions = JSON.parse(compilerOptionsJson); - return getAutomaticTypeDirectiveNames(compilerOptions, this.host); - } - ); - } - convertFileReferences(refs) { - if (!refs) { - return void 0; - } - const result = []; - for (const ref of refs) { - result.push({ - path: normalizeSlashes(ref.fileName), - position: ref.pos, - length: ref.end - ref.pos - }); - } - return result; - } - getTSConfigFileInfo(fileName, sourceTextSnapshot) { - return this.forwardJSONCall( - `getTSConfigFileInfo('${fileName}')`, - () => { - const result = parseJsonText(fileName, getSnapshotText(sourceTextSnapshot)); - const normalizedFileName = normalizeSlashes(fileName); - const configFile = parseJsonSourceFileConfigFileContent( - result, - this.host, - getDirectoryPath(normalizedFileName), - /*existingOptions*/ - {}, - normalizedFileName - ); - return { - options: configFile.options, - typeAcquisition: configFile.typeAcquisition, - files: configFile.fileNames, - raw: configFile.raw, - errors: realizeDiagnostics([...result.parseDiagnostics, ...configFile.errors], "\r\n") - }; - } - ); - } - getDefaultCompilationSettings() { - return this.forwardJSONCall( - "getDefaultCompilationSettings()", - () => getDefaultCompilerOptions2() - ); - } - discoverTypings(discoverTypingsJson) { - const getCanonicalFileName = createGetCanonicalFileName( - /*useCaseSensitiveFileNames*/ - false - ); - return this.forwardJSONCall("discoverTypings()", () => { - const info = JSON.parse(discoverTypingsJson); - if (this.safeList === void 0) { - this.safeList = ts_JsTyping_exports.loadSafeList(this.host, toPath(info.safeListPath, info.safeListPath, getCanonicalFileName)); - } - return ts_JsTyping_exports.discoverTypings( - this.host, - (msg) => this.logger.log(msg), - info.fileNames, - toPath(info.projectRootPath, info.projectRootPath, getCanonicalFileName), - this.safeList, - info.packageNameToTypingLocation, - info.typeAcquisition, - info.unresolvedImports, - info.typesRegistry, - emptyOptions - ); - }); - } -}; -var TypeScriptServicesFactory = class { - constructor() { - this._shims = []; - } - /* - * Returns script API version. - */ - getServicesVersion() { - return servicesVersion; - } - createLanguageServiceShim(host) { - try { - if (this.documentRegistry === void 0) { - this.documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); - } - const hostAdapter = new LanguageServiceShimHostAdapter(host); - const languageService = createLanguageService( - hostAdapter, - this.documentRegistry, - /*syntaxOnlyOrLanguageServiceMode*/ - false - ); - return new LanguageServiceShimObject(this, host, languageService); - } catch (err) { - logInternalError(host, err); - throw err; - } - } - createClassifierShim(logger) { - try { - return new ClassifierShimObject(this, logger); - } catch (err) { - logInternalError(logger, err); - throw err; - } - } - createCoreServicesShim(host) { - try { - const adapter = new CoreServicesShimHostAdapter(host); - return new CoreServicesShimObject(this, host, adapter); - } catch (err) { - logInternalError(host, err); - throw err; - } - } - close() { - clear(this._shims); - this.documentRegistry = void 0; - } - registerShim(shim) { - this._shims.push(shim); - } - unregisterShim(shim) { - for (let i = 0; i < this._shims.length; i++) { - if (this._shims[i] === shim) { - delete this._shims[i]; - return; - } - } - throw new Error("Invalid operation"); - } -}; - // src/services/_namespaces/ts.BreakpointResolver.ts var ts_BreakpointResolver_exports = {}; __export(ts_BreakpointResolver_exports, { @@ -146262,7 +146314,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 32 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -146270,7 +146322,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function canHaveSpanInParameterDeclaration(parameter) { - return !!parameter.initializer || parameter.dotDotDotToken !== void 0 || hasSyntacticModifier(parameter, 4 /* Public */ | 8 /* Private */); + return !!parameter.initializer || parameter.dotDotDotToken !== void 0 || hasSyntacticModifier(parameter, 1 /* Public */ | 2 /* Private */); } function spanInParameterDeclaration(parameter) { if (isBindingPattern(parameter.name)) { @@ -146289,7 +146341,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 32 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -146345,10 +146397,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { } } function spanInBindingPattern(bindingPattern) { - const firstBindingElement = forEach( - bindingPattern.elements, - (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 - ); + const firstBindingElement = forEach(bindingPattern.elements, (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0); if (firstBindingElement) { return spanInNode(firstBindingElement); } @@ -146360,10 +146409,7 @@ function spanInSourceFileAtLocation(sourceFile, position) { function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; - const firstBindingElement = forEach( - elements, - (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 - ); + const firstBindingElement = forEach(elements, (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0); if (firstBindingElement) { return spanInNode(firstBindingElement); } @@ -146857,7 +146903,7 @@ function collectCallSitesOfSourceFile(node, collect) { forEach(node.statements, collect); } function collectCallSitesOfModuleDeclaration(node, collect) { - if (!hasSyntacticModifier(node, 2 /* Ambient */) && node.body && isModuleBlock(node.body)) { + if (!hasSyntacticModifier(node, 128 /* Ambient */) && node.body && isModuleBlock(node.body)) { forEach(node.body.statements, collect); } } @@ -147183,13 +147229,13 @@ function makeChange2(changeTracker, sourceFile, insertionSite, fixedDeclarations } } fixedDeclarations == null ? void 0 : fixedDeclarations.add(getNodeId(insertionSite)); - const cloneWithModifier = factory.updateModifiers( + const cloneWithModifier = factory.replaceModifiers( getSynthesizedDeepClone( insertionSite, /*includeTrivia*/ true ), - factory.createNodeArray(factory.createModifiersFromModifierFlags(getSyntacticModifierFlags(insertionSite) | 512 /* Async */)) + factory.createNodeArray(factory.createModifiersFromModifierFlags(getSyntacticModifierFlags(insertionSite) | 1024 /* Async */)) ); changeTracker.replaceNode( sourceFile, @@ -147314,7 +147360,7 @@ function findAwaitableInitializers(expression, sourceFile, cancellationToken, pr const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); const variableStatement = getAncestor(declaration, 243 /* VariableStatement */); - if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { + if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 32 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; } @@ -147372,7 +147418,7 @@ function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, c checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; } function isInsideAwaitableBody(node) { - return node.kind & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); + return node.flags & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -147457,10 +147503,7 @@ registerCodeFix({ }); function makeChange4(changeTracker, sourceFile, pos, program, fixedNodes) { const token = getTokenAtPosition(sourceFile, pos); - const forInitializer = findAncestor( - token, - (node) => isForInOrOfStatement(node.parent) ? node.parent.initializer === node : isPossiblyPartOfDestructuring(node) ? false : "quit" - ); + const forInitializer = findAncestor(token, (node) => isForInOrOfStatement(node.parent) ? node.parent.initializer === node : isPossiblyPartOfDestructuring(node) ? false : "quit"); if (forInitializer) return applyChange(changeTracker, forInitializer, sourceFile, fixedNodes); const parent2 = token.parent; @@ -147474,10 +147517,7 @@ function makeChange4(changeTracker, sourceFile, pos, program, fixedNodes) { } return applyChange(changeTracker, parent2, sourceFile, fixedNodes); } - const commaExpression = findAncestor( - token, - (node) => isExpressionStatement(node.parent) ? true : isPossiblyPartOfCommaSeperatedInitializer(node) ? false : "quit" - ); + const commaExpression = findAncestor(token, (node) => isExpressionStatement(node.parent) ? true : isPossiblyPartOfCommaSeperatedInitializer(node) ? false : "quit"); if (commaExpression) { const checker = program.getTypeChecker(); if (!expressionCouldBeVariableDeclaration(commaExpression, checker)) { @@ -147599,8 +147639,8 @@ registerCodeFix({ fixIds: [fixId7], getAllCodeActions: (context) => codeFixAll(context, errorCodes7, (changes, diag2) => makeChange7(changes, diag2.file, diag2.start)) }); -function makeChange7(changeTracker, sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); +function makeChange7(changeTracker, sourceFile, start2) { + const token = getTokenAtPosition(sourceFile, start2); const param = token.parent; if (!isParameter(param)) { return Debug.fail("Tried to add a parameter name to a non-parameter: " + Debug.formatSyntaxKind(token.kind)); @@ -147608,20 +147648,34 @@ function makeChange7(changeTracker, sourceFile, pos) { const i = param.parent.parameters.indexOf(param); Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one."); Debug.assert(i > -1, "Parameter not found in parent parameter list."); - const typeNode = factory.createTypeReferenceNode( + let end = param.name.getEnd(); + let typeNode = factory.createTypeReferenceNode( param.name, /*typeArguments*/ void 0 ); + let nextParam = tryGetNextParam(sourceFile, param); + while (nextParam) { + typeNode = factory.createArrayTypeNode(typeNode); + end = nextParam.getEnd(); + nextParam = tryGetNextParam(sourceFile, nextParam); + } const replacement = factory.createParameterDeclaration( param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, - param.dotDotDotToken ? factory.createArrayTypeNode(typeNode) : typeNode, + param.dotDotDotToken && !isArrayTypeNode(typeNode) ? factory.createArrayTypeNode(typeNode) : typeNode, param.initializer ); - changeTracker.replaceNode(sourceFile, param, replacement); + changeTracker.replaceRange(sourceFile, createRange(param.getStart(sourceFile), end), replacement); +} +function tryGetNextParam(sourceFile, param) { + const nextToken = findNextToken(param.name, param.parent, sourceFile); + if (nextToken && nextToken.kind === 23 /* OpenBracketToken */ && isArrayBindingPattern(nextToken.parent) && isParameter(nextToken.parent.parent)) { + return nextToken.parent.parent; + } + return void 0; } // src/services/codefixes/addOptionalPropertyUndefined.ts @@ -148451,19 +148505,16 @@ function finishCatchOrFinallyTransform(node, transformer, tryStatement, possible statements.push(factory.createVariableStatement( /*modifiers*/ void 0, - factory.createVariableDeclarationList( - [ - factory.createVariableDeclaration( - getSynthesizedDeepClone(declareSynthBindingPattern(continuationArgName)), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - varDeclIdentifier - ) - ], - 2 /* Const */ - ) + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + getSynthesizedDeepClone(declareSynthBindingPattern(continuationArgName)), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + varDeclIdentifier + ) + ], 2 /* Const */) )); } return statements; @@ -148599,18 +148650,15 @@ function createVariableOrAssignmentOrExpressionStatement(variableName, rightHand factory.createVariableStatement( /*modifiers*/ void 0, - factory.createVariableDeclarationList( - [ - factory.createVariableDeclaration( - getSynthesizedDeepClone(declareSynthBindingName(variableName)), - /*exclamationToken*/ - void 0, - typeAnnotation, - rightHandSide - ) - ], - 2 /* Const */ - ) + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + getSynthesizedDeepClone(declareSynthBindingName(variableName)), + /*exclamationToken*/ + void 0, + typeAnnotation, + rightHandSide + ) + ], 2 /* Const */) ) ]; } @@ -148876,16 +148924,17 @@ registerCodeFix({ const moduleExportsChangedToDefault = convertFileToEsModule(sourceFile, program.getTypeChecker(), changes2, getEmitScriptTarget(program.getCompilerOptions()), getQuotePreference(sourceFile, preferences)); if (moduleExportsChangedToDefault) { for (const importingFile of program.getSourceFiles()) { - fixImportOfModuleExports(importingFile, sourceFile, changes2, getQuotePreference(importingFile, preferences)); + fixImportOfModuleExports(importingFile, sourceFile, program, changes2, getQuotePreference(importingFile, preferences)); } } }); return [createCodeFixActionWithoutFixAll("convertToEsModule", changes, Diagnostics.Convert_to_ES_module)]; } }); -function fixImportOfModuleExports(importingFile, exportingFile, changes, quotePreference) { +function fixImportOfModuleExports(importingFile, exportingFile, program, changes, quotePreference) { + var _a; for (const moduleSpecifier of importingFile.imports) { - const imported = getResolvedModule(importingFile, moduleSpecifier.text, getModeForUsageLocation(importingFile, moduleSpecifier)); + const imported = (_a = program.getResolvedModule(importingFile, moduleSpecifier.text, getModeForUsageLocation(importingFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule; if (!imported || imported.resolvedFileName !== exportingFile.fileName) { continue; } @@ -149168,13 +149217,7 @@ function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sour if (semi) changes.delete(sourceFile, semi); } else { - changes.replaceNodeRangeWithNodes( - sourceFile, - left.expression, - findChildOfKind(left, 25 /* DotToken */, sourceFile), - [factory.createToken(95 /* ExportKeyword */), factory.createToken(87 /* ConstKeyword */)], - { joiner: " ", suffix: " " } - ); + changes.replaceNodeRangeWithNodes(sourceFile, left.expression, findChildOfKind(left, 25 /* DotToken */, sourceFile), [factory.createToken(95 /* ExportKeyword */), factory.createToken(87 /* ConstKeyword */)], { joiner: " ", suffix: " " }); } } function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { @@ -149488,7 +149531,7 @@ function fixSingleExportDeclaration(changes, exportSpecifier, context) { false, factory.updateNamedExports(exportClause, filter(exportClause.elements, (e) => !contains(typeExportSpecifiers, e))), exportDeclaration.moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); const typeExportDeclaration = factory.createExportDeclaration( @@ -149498,7 +149541,7 @@ function fixSingleExportDeclaration(changes, exportSpecifier, context) { true, factory.createNamedExports(typeExportSpecifiers), exportDeclaration.moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); changes.replaceNode(context.sourceFile, exportDeclaration, valueExportDeclaration, { @@ -149631,7 +149674,7 @@ function doChange11(changes, sourceFile, declaration) { true ), getSynthesizedDeepClone( - declaration.assertClause, + declaration.attributes, /*includeTrivia*/ true ) @@ -149659,7 +149702,7 @@ function doChange11(changes, sourceFile, declaration) { true ), getSynthesizedDeepClone( - declaration.assertClause, + declaration.attributes, /*includeTrivia*/ true ) @@ -149676,19 +149719,13 @@ function doChange11(changes, sourceFile, declaration) { e.name )) ) : importClause.namedBindings; - const importDeclaration = factory.updateImportDeclaration( - declaration, - declaration.modifiers, - factory.updateImportClause( - importClause, - /*isTypeOnly*/ - true, - importClause.name, - newNamedBindings - ), - declaration.moduleSpecifier, - declaration.assertClause - ); + const importDeclaration = factory.updateImportDeclaration(declaration, declaration.modifiers, factory.updateImportClause( + importClause, + /*isTypeOnly*/ + true, + importClause.name, + newNamedBindings + ), declaration.moduleSpecifier, declaration.attributes); changes.replaceNode(sourceFile, declaration, importDeclaration); } } @@ -149911,23 +149948,27 @@ function getInfo5(sourceFile, pos) { return void 0; } function doChange13(changes, sourceFile, { container, typeNode, constraint, name }) { - changes.replaceNode(sourceFile, container, factory.createMappedTypeNode( - /*readonlyToken*/ - void 0, - factory.createTypeParameterDeclaration( - /*modifiers*/ + changes.replaceNode( + sourceFile, + container, + factory.createMappedTypeNode( + /*readonlyToken*/ void 0, - name, - factory.createTypeReferenceNode(constraint) - ), - /*nameType*/ - void 0, - /*questionToken*/ - void 0, - typeNode, - /*members*/ - void 0 - )); + factory.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + name, + factory.createTypeReferenceNode(constraint) + ), + /*nameType*/ + void 0, + /*questionToken*/ + void 0, + typeNode, + /*members*/ + void 0 + ) + ); } // src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts @@ -149963,7 +150004,7 @@ function getClass(sourceFile, pos) { return Debug.checkDefined(getContainingClass(getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); } function symbolPointsToNonPrivateMember(symbol) { - return !symbol.valueDeclaration || !(getEffectiveModifierFlags(symbol.valueDeclaration) & 8 /* Private */); + return !symbol.valueDeclaration || !(getEffectiveModifierFlags(symbol.valueDeclaration) & 2 /* Private */); } function addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, changeTracker, preferences) { const checker = context.program.getTypeChecker(); @@ -150038,16 +150079,18 @@ registerCodeFix({ ); if (!info) return void 0; - return info.map(({ fix, symbolName: symbolName2, errorIdentifierText }) => codeActionForFix( - context, - sourceFile, - symbolName2, - fix, - /*includeSymbolNameInDescription*/ - symbolName2 !== errorIdentifierText, - program.getCompilerOptions(), - preferences - )); + return info.map( + ({ fix, symbolName: symbolName2, errorIdentifierText }) => codeActionForFix( + context, + sourceFile, + symbolName2, + fix, + /*includeSymbolNameInDescription*/ + symbolName2 !== errorIdentifierText, + program, + preferences + ) + ); }, fixIds: [importFixId], getAllCodeActions: (context) => { @@ -150251,7 +150294,8 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre defaultImport, namedImports && arrayFrom(namedImports.entries(), ([name, addAsTypeOnly]) => ({ addAsTypeOnly, name })), namespaceLikeImport, - compilerOptions + compilerOptions, + preferences ); newDeclarations = combine(newDeclarations, declarations); }); @@ -150293,7 +150337,6 @@ function createImportSpecifierResolver(importingFile, program, host, preferences } } function getImportCompletionAction(targetSymbol, moduleSymbol, exportMapKey, sourceFile, symbolName2, isJsxTagName, host, program, formatContext, position, preferences, cancellationToken) { - const compilerOptions = program.getCompilerOptions(); let exportInfos; if (exportMapKey) { exportInfos = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken).get(sourceFile.path, exportMapKey); @@ -150314,7 +150357,7 @@ function getImportCompletionAction(targetSymbol, moduleSymbol, exportMapKey, sou fix, /*includeSymbolNameInDescription*/ false, - compilerOptions, + program, preferences )) }; @@ -150324,7 +150367,15 @@ function getPromoteTypeOnlyCompletionAction(sourceFile, symbolToken, program, ho const symbolName2 = single(getSymbolNamesToImport(sourceFile, program.getTypeChecker(), symbolToken, compilerOptions)); const fix = getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName2, program); const includeSymbolNameInDescription = symbolName2 !== symbolToken.text; - return fix && codeFixActionToCodeAction(codeActionForFix({ host, formatContext, preferences }, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences)); + return fix && codeFixActionToCodeAction(codeActionForFix( + { host, formatContext, preferences }, + sourceFile, + symbolName2, + fix, + includeSymbolNameInDescription, + program, + preferences + )); } function getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences) { const packageJsonImportFilter = createPackageJsonImportFilter(sourceFile, preferences, host); @@ -150551,7 +150602,18 @@ function getNewImportFixes(program, sourceFile, usagePosition, isValidTypeOnlyUs const getChecker = createGetChecker(program, host); const moduleResolution = getEmitModuleResolutionKind(compilerOptions); const rejectNodeModulesRelativePaths = moduleResolutionUsesNodeModules(moduleResolution); - const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences); + const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo( + moduleSymbol, + checker, + compilerOptions, + sourceFile, + moduleSpecifierResolutionHost, + preferences, + /*options*/ + void 0, + /*forAutoImport*/ + true + ); let computedWithoutCacheCount = 0; const fixes = flatMap(exportInfo, (exportInfo2, i) => { const checker = getChecker(exportInfo2.isFromPackageJson); @@ -150894,14 +150956,14 @@ function getExportEqualsImportKind(importingFile, compilerOptions, forceImportKe } return allowSyntheticDefaults ? 1 /* Default */ : 3 /* CommonJS */; } -function codeActionForFix(context, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences) { +function codeActionForFix(context, sourceFile, symbolName2, fix, includeSymbolNameInDescription, program, preferences) { let diag2; const changes = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { - diag2 = codeActionForFixWorker(tracker, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences); + diag2 = codeActionForFixWorker(tracker, sourceFile, symbolName2, fix, includeSymbolNameInDescription, program, preferences); }); return createCodeFixAction(importFixName, changes, diag2, importFixId, Diagnostics.Add_all_missing_imports); } -function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences) { +function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSymbolNameInDescription, program, preferences) { const quotePreference = getQuotePreference(sourceFile, preferences); switch (fix.kind) { case 0 /* UseNamespace */: @@ -150938,7 +151000,8 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy defaultImport, namedImports, namespaceLikeImport, - compilerOptions + program.getCompilerOptions(), + preferences ), /*blankLineBetween*/ true, @@ -150951,7 +151014,7 @@ function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSy } case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; - const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile, preferences); + const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, program, sourceFile, preferences); return promotedDeclaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; } default: @@ -150962,14 +151025,14 @@ function getModuleSpecifierText(promotedDeclaration) { var _a, _b; return promotedDeclaration.kind === 271 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; } -function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceFile, preferences) { +function promoteFromTypeOnly(changes, aliasDeclaration, program, sourceFile, preferences) { + const compilerOptions = program.getCompilerOptions(); const convertExistingToTypeOnly = importNameElisionDisabled(compilerOptions); switch (aliasDeclaration.kind) { case 276 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences); if (aliasDeclaration.parent.elements.length > 1 && sortKind) { - changes.delete(sourceFile, aliasDeclaration); const newSpecifier = factory.updateImportSpecifier( aliasDeclaration, /*isTypeOnly*/ @@ -150979,10 +151042,13 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF ); const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); const insertionIndex = ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(aliasDeclaration.parent.elements, newSpecifier, comparer); - changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex); - } else { - changes.deleteRange(sourceFile, aliasDeclaration.getFirstToken()); + if (aliasDeclaration.parent.elements.indexOf(aliasDeclaration) !== insertionIndex) { + changes.delete(sourceFile, aliasDeclaration); + changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex); + return aliasDeclaration; + } } + changes.deleteRange(sourceFile, aliasDeclaration.getFirstToken()); return aliasDeclaration; } else { Debug.assert(aliasDeclaration.parent.parent.isTypeOnly); @@ -151002,10 +151068,11 @@ function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceF Debug.failBadSyntaxKind(aliasDeclaration); } function promoteImportClause(importClause) { + var _a; changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile)); if (!compilerOptions.allowImportingTsExtensions) { const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent); - const resolvedModule = moduleSpecifier && getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); + const resolvedModule = moduleSpecifier && ((_a = program.getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule); if (resolvedModule == null ? void 0 : resolvedModule.resolvedUsingTsExtension) { const changedExtension = changeAnyExtension(moduleSpecifier.text, getOutputExtension(moduleSpecifier.text, compilerOptions)); changes.replaceNode(sourceFile, moduleSpecifier, factory.createStringLiteral(changedExtension)); @@ -151064,12 +151131,14 @@ function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImpor } const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, ignoreCaseForSorting); const newSpecifiers = stableSort( - namedImports.map((namedImport) => factory.createImportSpecifier( - (!clause.isTypeOnly || promoteFromTypeOnly2) && needsTypeOnly(namedImport), - /*propertyName*/ - void 0, - factory.createIdentifier(namedImport.name) - )), + namedImports.map( + (namedImport) => factory.createImportSpecifier( + (!clause.isTypeOnly || promoteFromTypeOnly2) && shouldUseTypeOnly(namedImport, preferences), + /*propertyName*/ + void 0, + factory.createIdentifier(namedImport.name) + ) + ), (s1, s2) => ts_OrganizeImports_exports.compareImportOrExportSpecifiers(s1, s2, comparer) ); const specifierSort = (existingSpecifiers == null ? void 0 : existingSpecifiers.length) && ts_OrganizeImports_exports.detectImportSpecifierSorting(existingSpecifiers, preferences); @@ -151128,42 +151197,50 @@ function getImportTypePrefix(moduleSpecifier, quotePreference) { function needsTypeOnly({ addAsTypeOnly }) { return addAsTypeOnly === 2 /* Required */; } -function getNewImports(moduleSpecifier, quotePreference, defaultImport, namedImports, namespaceLikeImport, compilerOptions) { +function shouldUseTypeOnly(info, preferences) { + return needsTypeOnly(info) || !!preferences.preferTypeOnlyAutoImports && info.addAsTypeOnly !== 4 /* NotAllowed */; +} +function getNewImports(moduleSpecifier, quotePreference, defaultImport, namedImports, namespaceLikeImport, compilerOptions, preferences) { const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference); let statements; if (defaultImport !== void 0 || (namedImports == null ? void 0 : namedImports.length)) { - const topLevelTypeOnly = (!defaultImport || needsTypeOnly(defaultImport)) && every(namedImports, needsTypeOnly) || compilerOptions.verbatimModuleSyntax && (defaultImport == null ? void 0 : defaultImport.addAsTypeOnly) !== 4 /* NotAllowed */ && !some(namedImports, (i) => i.addAsTypeOnly === 4 /* NotAllowed */); - statements = combine(statements, makeImport( - defaultImport && factory.createIdentifier(defaultImport.name), - namedImports == null ? void 0 : namedImports.map(({ addAsTypeOnly, name }) => factory.createImportSpecifier( - !topLevelTypeOnly && addAsTypeOnly === 2 /* Required */, - /*propertyName*/ - void 0, - factory.createIdentifier(name) - )), - moduleSpecifier, - quotePreference, - topLevelTypeOnly - )); + const topLevelTypeOnly = (!defaultImport || needsTypeOnly(defaultImport)) && every(namedImports, needsTypeOnly) || (compilerOptions.verbatimModuleSyntax || preferences.preferTypeOnlyAutoImports) && (defaultImport == null ? void 0 : defaultImport.addAsTypeOnly) !== 4 /* NotAllowed */ && !some(namedImports, (i) => i.addAsTypeOnly === 4 /* NotAllowed */); + statements = combine( + statements, + makeImport( + defaultImport && factory.createIdentifier(defaultImport.name), + namedImports == null ? void 0 : namedImports.map( + (namedImport) => factory.createImportSpecifier( + !topLevelTypeOnly && shouldUseTypeOnly(namedImport, preferences), + /*propertyName*/ + void 0, + factory.createIdentifier(namedImport.name) + ) + ), + moduleSpecifier, + quotePreference, + topLevelTypeOnly + ) + ); } if (namespaceLikeImport) { const declaration = namespaceLikeImport.importKind === 3 /* CommonJS */ ? factory.createImportEqualsDeclaration( /*modifiers*/ void 0, - needsTypeOnly(namespaceLikeImport), + shouldUseTypeOnly(namespaceLikeImport, preferences), factory.createIdentifier(namespaceLikeImport.name), factory.createExternalModuleReference(quotedModuleSpecifier) ) : factory.createImportDeclaration( /*modifiers*/ void 0, factory.createImportClause( - needsTypeOnly(namespaceLikeImport), + shouldUseTypeOnly(namespaceLikeImport, preferences), /*name*/ void 0, factory.createNamespaceImport(factory.createIdentifier(namespaceLikeImport.name)) ), quotedModuleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); statements = combine(statements, declaration); @@ -151202,24 +151279,21 @@ function createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) { return factory.createVariableStatement( /*modifiers*/ void 0, - factory.createVariableDeclarationList( - [ - factory.createVariableDeclaration( - typeof name === "string" ? factory.createIdentifier(name) : name, - /*exclamationToken*/ - void 0, - /*type*/ + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + typeof name === "string" ? factory.createIdentifier(name) : name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + factory.createCallExpression( + factory.createIdentifier("require"), + /*typeArguments*/ void 0, - factory.createCallExpression( - factory.createIdentifier("require"), - /*typeArguments*/ - void 0, - [quotedModuleSpecifier] - ) + [quotedModuleSpecifier] ) - ], - 2 /* Const */ - ) + ) + ], 2 /* Const */) ); } function symbolHasMeaning({ declarations }, meaning) { @@ -151669,7 +151743,7 @@ registerCodeFix({ } }); function getInfo7(sourceFile, pos, program) { - var _a; + var _a, _b; const token = getTokenAtPosition(sourceFile, pos); if (isIdentifier(token)) { const importDeclaration = findAncestor(token, isImportDeclaration); @@ -151678,19 +151752,19 @@ function getInfo7(sourceFile, pos, program) { const moduleSpecifier = isStringLiteral(importDeclaration.moduleSpecifier) ? importDeclaration.moduleSpecifier.text : void 0; if (moduleSpecifier === void 0) return void 0; - const resolvedModule = getResolvedModule( + const resolvedModule = (_a = program.getResolvedModule( sourceFile, moduleSpecifier, /*mode*/ void 0 - ); + )) == null ? void 0 : _a.resolvedModule; if (resolvedModule === void 0) return void 0; const moduleSourceFile = program.getSourceFile(resolvedModule.resolvedFileName); if (moduleSourceFile === void 0 || isSourceFileFromLibrary(program, moduleSourceFile)) return void 0; const moduleSymbol = moduleSourceFile.symbol; - const locals = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals; + const locals = (_b = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _b.locals; if (locals === void 0) return void 0; const localSymbol = locals.get(token.escapedText); @@ -151745,30 +151819,26 @@ function updateExport(changes, program, sourceFile, node, names) { ) ), node.moduleSpecifier, - node.assertClause + node.attributes ) ); } function createExport(changes, program, sourceFile, names) { - changes.insertNodeAtEndOfScope( - sourceFile, - sourceFile, - factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(createExportSpecifiers( - names, - /*allowTypeModifier*/ - getIsolatedModules(program.getCompilerOptions()) - )), - /*moduleSpecifier*/ - void 0, - /*assertClause*/ - void 0 - ) - ); + changes.insertNodeAtEndOfScope(sourceFile, sourceFile, factory.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createNamedExports(createExportSpecifiers( + names, + /*allowTypeModifier*/ + getIsolatedModules(program.getCompilerOptions()) + )), + /*moduleSpecifier*/ + void 0, + /*attributes*/ + void 0 + )); } function createExportSpecifiers(names, allowTypeModifier) { return factory.createNodeArray(map(names, (n) => factory.createExportSpecifier( @@ -151907,7 +151977,7 @@ function getInfo8(sourceFile, pos, context, errorCode) { const tag = findAncestor(node, isJsxOpeningLikeElement); const props = checker.getContextualTypeForArgumentAtIndex(tag, 0); suggestedSymbol = checker.getSuggestedSymbolForNonexistentJSXAttribute(node, props); - } else if (hasSyntacticModifier(parent2, 16384 /* Override */) && isClassElement(parent2) && parent2.name === node) { + } else if (hasOverrideModifier(parent2) && isClassElement(parent2) && parent2.name === node) { const baseDeclaration = findAncestor(node, isClassLike); const baseTypeNode = baseDeclaration ? getEffectiveBaseTypeNode(baseDeclaration) : void 0; const baseType = baseTypeNode ? checker.getTypeAtLocation(baseTypeNode) : void 0; @@ -151949,9 +152019,10 @@ function convertSemanticMeaningToSymbolFlags(meaning) { return flags; } function getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration) { + var _a; if (!importDeclaration || !isStringLiteralLike(importDeclaration.moduleSpecifier)) return void 0; - const resolvedModule = getResolvedModule(sourceFile, importDeclaration.moduleSpecifier.text, getModeForUsageLocation(sourceFile, importDeclaration.moduleSpecifier)); + const resolvedModule = (_a = context.program.getResolvedModule(sourceFile, importDeclaration.moduleSpecifier.text, getModeForUsageLocation(sourceFile, importDeclaration.moduleSpecifier))) == null ? void 0 : _a.resolvedModule; if (!resolvedModule) return void 0; return context.program.getSourceFile(resolvedModule.resolvedFileName); @@ -152080,7 +152151,7 @@ function checkFixedAssignableTo(checker, declaration, exprType, type, isFunction if (isFunctionType) { const sig = checker.getSignatureFromDeclaration(declaration); if (sig) { - if (hasSyntacticModifier(declaration, 512 /* Async */)) { + if (hasSyntacticModifier(declaration, 1024 /* Async */)) { exprType = checker.createPromiseType(exprType); } const newSig = checker.createSignature( @@ -152294,13 +152365,13 @@ registerCodeFix({ continue; const { parentDeclaration, declSourceFile, modifierFlags, token, call, isJSFile } = info; if (call && !isPrivateIdentifier(token)) { - addMethodDeclaration(context, changes, call, token, modifierFlags & 32 /* Static */, parentDeclaration, declSourceFile); + addMethodDeclaration(context, changes, call, token, modifierFlags & 256 /* Static */, parentDeclaration, declSourceFile); } else { if (isJSFile && !isInterfaceDeclaration(parentDeclaration) && !isTypeLiteralNode(parentDeclaration)) { - addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, !!(modifierFlags & 32 /* Static */)); + addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, !!(modifierFlags & 256 /* Static */)); } else { const typeNode = getTypeNode2(checker, parentDeclaration, token); - addPropertyDeclaration(changes, declSourceFile, parentDeclaration, token.text, typeNode, modifierFlags & 32 /* Static */); + addPropertyDeclaration(changes, declSourceFile, parentDeclaration, token.text, typeNode, modifierFlags & 256 /* Static */); } } } @@ -152381,13 +152452,13 @@ function getInfo10(sourceFile, tokenPos, errorCode, checker, program) { const moduleDeclaration = find(symbol.declarations, isModuleDeclaration); const moduleDeclarationSourceFile = moduleDeclaration == null ? void 0 : moduleDeclaration.getSourceFile(); if (moduleDeclaration && moduleDeclarationSourceFile && !isSourceFileFromLibrary(program, moduleDeclarationSourceFile)) { - return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile, modifierFlags: 1 /* Export */, parentDeclaration: moduleDeclaration }; + return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile, modifierFlags: 32 /* Export */, parentDeclaration: moduleDeclaration }; } const moduleSourceFile = find(symbol.declarations, isSourceFile); if (sourceFile.commonJsModuleIndicator) return void 0; if (moduleSourceFile && !isSourceFileFromLibrary(program, moduleSourceFile)) { - return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile: moduleSourceFile, modifierFlags: 1 /* Export */, parentDeclaration: moduleSourceFile }; + return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile: moduleSourceFile, modifierFlags: 32 /* Export */, parentDeclaration: moduleSourceFile }; } } const classDeclaration = find(symbol.declarations, isClassLike); @@ -152399,7 +152470,7 @@ function getInfo10(sourceFile, tokenPos, errorCode, checker, program) { if (makeStatic && (isPrivateIdentifier(token) || isInterfaceDeclaration(declaration))) return void 0; const declSourceFile = declaration.getSourceFile(); - const modifierFlags = isTypeLiteralNode(declaration) ? 0 /* None */ : (makeStatic ? 32 /* Static */ : 0 /* None */) | (startsWithUnderscore(token.text) ? 8 /* Private */ : 0 /* None */); + const modifierFlags = isTypeLiteralNode(declaration) ? 0 /* None */ : (makeStatic ? 256 /* Static */ : 0 /* None */) | (startsWithUnderscore(token.text) ? 2 /* Private */ : 0 /* None */); const isJSFile = isSourceFileJS(declSourceFile); const call = tryCast(parent2.parent, isCallExpression); return { kind: 0 /* TypeLikeDeclaration */, token, call, modifierFlags, parentDeclaration: declaration, declSourceFile, isJSFile }; @@ -152417,11 +152488,11 @@ function createActionForAddMissingMemberInJavascriptFile(context, { parentDeclar if (isInterfaceDeclaration(parentDeclaration) || isTypeLiteralNode(parentDeclaration)) { return void 0; } - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMemberInJs(t, declSourceFile, parentDeclaration, token, !!(modifierFlags & 32 /* Static */))); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMemberInJs(t, declSourceFile, parentDeclaration, token, !!(modifierFlags & 256 /* Static */))); if (changes.length === 0) { return void 0; } - const diagnostic = modifierFlags & 32 /* Static */ ? Diagnostics.Initialize_static_property_0 : isPrivateIdentifier(token) ? Diagnostics.Declare_a_private_field_named_0 : Diagnostics.Initialize_property_0_in_the_constructor; + const diagnostic = modifierFlags & 256 /* Static */ ? Diagnostics.Initialize_static_property_0 : isPrivateIdentifier(token) ? Diagnostics.Declare_a_private_field_named_0 : Diagnostics.Initialize_property_0_in_the_constructor; return createCodeFixAction(fixMissingMember, changes, [diagnostic, token.text], fixMissingMember, Diagnostics.Add_all_missing_members); } function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { @@ -152465,15 +152536,15 @@ function initializePropertyToUndefined(obj, propertyName) { } function createActionsForAddMissingMemberInTypeScriptFile(context, { parentDeclaration, declSourceFile, modifierFlags, token }) { const memberName = token.text; - const isStatic2 = modifierFlags & 32 /* Static */; + const isStatic2 = modifierFlags & 256 /* Static */; const typeNode = getTypeNode2(context.program.getTypeChecker(), parentDeclaration, token); const addPropertyDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addPropertyDeclaration(t, declSourceFile, parentDeclaration, memberName, typeNode, modifierFlags2)); - const actions2 = [createCodeFixAction(fixMissingMember, addPropertyDeclarationChanges(modifierFlags & 32 /* Static */), [isStatic2 ? Diagnostics.Declare_static_property_0 : Diagnostics.Declare_property_0, memberName], fixMissingMember, Diagnostics.Add_all_missing_members)]; + const actions2 = [createCodeFixAction(fixMissingMember, addPropertyDeclarationChanges(modifierFlags & 256 /* Static */), [isStatic2 ? Diagnostics.Declare_static_property_0 : Diagnostics.Declare_property_0, memberName], fixMissingMember, Diagnostics.Add_all_missing_members)]; if (isStatic2 || isPrivateIdentifier(token)) { return actions2; } - if (modifierFlags & 8 /* Private */) { - actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addPropertyDeclarationChanges(8 /* Private */), [Diagnostics.Declare_private_property_0, memberName])); + if (modifierFlags & 2 /* Private */) { + actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addPropertyDeclarationChanges(2 /* Private */), [Diagnostics.Declare_private_property_0, memberName])); } actions2.push(createAddIndexSignatureAction(context, declSourceFile, parentDeclaration, token.text, typeNode)); return actions2; @@ -152560,9 +152631,9 @@ function getActionsForMissingMethodDeclaration(context, info) { } const methodName = token.text; const addMethodDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addMethodDeclaration(context, t, call, token, modifierFlags2, parentDeclaration, declSourceFile)); - const actions2 = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & 32 /* Static */), [modifierFlags & 32 /* Static */ ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)]; - if (modifierFlags & 8 /* Private */) { - actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addMethodDeclarationChanges(8 /* Private */), [Diagnostics.Declare_private_method_0, methodName])); + const actions2 = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & 256 /* Static */), [modifierFlags & 256 /* Static */ ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)]; + if (modifierFlags & 2 /* Private */) { + actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addMethodDeclarationChanges(2 /* Private */), [Diagnostics.Declare_private_method_0, methodName])); } return actions2; } @@ -152584,15 +152655,20 @@ function addEnumMemberDeclaration(changes, checker, { token, parentDeclaration } return !!(type && type.flags & 402653316 /* StringLike */); }); const enumMember = factory.createEnumMember(token, hasStringInitializer ? factory.createStringLiteral(token.text) : void 0); - changes.replaceNode(parentDeclaration.getSourceFile(), parentDeclaration, factory.updateEnumDeclaration( + changes.replaceNode( + parentDeclaration.getSourceFile(), parentDeclaration, - parentDeclaration.modifiers, - parentDeclaration.name, - concatenate(parentDeclaration.members, singleElementArray(enumMember)) - ), { - leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll, - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude - }); + factory.updateEnumDeclaration( + parentDeclaration, + parentDeclaration.modifiers, + parentDeclaration.name, + concatenate(parentDeclaration.members, singleElementArray(enumMember)) + ), + { + leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll, + trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude + } + ); } function addFunctionDeclaration(changes, context, info) { const quotePreference = getQuotePreference(context.sourceFile, context.preferences); @@ -152827,7 +152903,15 @@ function createPropertyNameFromSymbol(symbol, target, quotePreference, checker) if (prop && isComputedPropertyName(prop)) return prop; } - return createPropertyNameNodeForIdentifierOrLiteral(symbol.name, target, quotePreference === 0 /* Single */); + return createPropertyNameNodeForIdentifierOrLiteral( + symbol.name, + target, + quotePreference === 0 /* Single */, + /*stringNamed*/ + false, + /*isMethod*/ + false + ); } function findScope(node) { if (findAncestor(node, isJsxExpression)) { @@ -152965,7 +153049,7 @@ function addMissingMembers(classDeclaration, sourceFile, context, changeTracker, } function symbolPointsToNonPrivateAndAbstractMember(symbol) { const flags = getSyntacticModifierFlags(first(symbol.getDeclarations())); - return !(flags & 8 /* Private */) && !!(flags & 256 /* Abstract */); + return !(flags & 2 /* Private */) && !!(flags & 64 /* Abstract */); } // src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts @@ -153053,10 +153137,7 @@ registerCodeFix({ if (configFile === void 0) { return void 0; } - const changes = ts_textChanges_exports.ChangeTracker.with( - context, - (changeTracker) => doChange21(changeTracker, configFile) - ); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => doChange21(changeTracker, configFile)); return [ createCodeFixActionWithoutFixAll(fixID, changes, Diagnostics.Enable_the_jsx_flag_in_your_configuration_file) ]; @@ -153794,7 +153875,7 @@ function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program } } function isCallbackLike(checker, sourceFile, name) { - return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.indexOf(reference) >= 0); + return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.includes(reference)); } function isLastParameter(func, parameter, isFixAll) { const parameters = func.parameters; @@ -155174,11 +155255,7 @@ registerCodeFix({ return [createCodeFixAction( fixId39, changes, - [ - Diagnostics.Replace_0_with_Promise_1, - checker.typeToString(returnType), - checker.typeToString(promisedType) - ], + [Diagnostics.Replace_0_with_Promise_1, checker.typeToString(returnType), checker.typeToString(promisedType)], fixId39, Diagnostics.Fix_all_incorrect_return_type_of_an_async_functions )]; @@ -155237,7 +155314,10 @@ registerCodeFix({ createCodeFixActionWithoutFixAll( fixName4, [createFileTextChanges(sourceFile.fileName, [ - createTextChange(sourceFile.checkJsDirective ? createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end) : createTextSpan(0, 0), `// @ts-nocheck${newLineCharacter}`) + createTextChange( + sourceFile.checkJsDirective ? createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end) : createTextSpan(0, 0), + `// @ts-nocheck${newLineCharacter}` + ) ])], Diagnostics.Disable_checking_for_this_file ) @@ -155303,10 +155383,10 @@ function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, con const kind = (declaration == null ? void 0 : declaration.kind) ?? 171 /* PropertySignature */; const declarationName = createDeclarationName(symbol, declaration); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; - let modifierFlags = effectiveModifierFlags & 32 /* Static */; - modifierFlags |= effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; + let modifierFlags = effectiveModifierFlags & 256 /* Static */; + modifierFlags |= effectiveModifierFlags & 1 /* Public */ ? 1 /* Public */ : effectiveModifierFlags & 4 /* Protected */ ? 4 /* Protected */ : 0 /* None */; if (declaration && isAutoAccessorPropertyDeclaration(declaration)) { - modifierFlags |= 128 /* Accessor */; + modifierFlags |= 512 /* Accessor */; } const modifiers = createModifiers(); const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); @@ -155839,14 +155919,18 @@ function setJsonCompilerOptionValues(changeTracker, configFile, options) { return void 0; const compilerOptionsProperty = findJsonProperty(tsconfigObjectLiteral, "compilerOptions"); if (compilerOptionsProperty === void 0) { - changeTracker.insertNodeAtObjectStart(configFile, tsconfigObjectLiteral, createJsonPropertyAssignment( - "compilerOptions", - factory.createObjectLiteralExpression( - options.map(([optionName, optionValue]) => createJsonPropertyAssignment(optionName, optionValue)), - /*multiLine*/ - true + changeTracker.insertNodeAtObjectStart( + configFile, + tsconfigObjectLiteral, + createJsonPropertyAssignment( + "compilerOptions", + factory.createObjectLiteralExpression( + options.map(([optionName, optionValue]) => createJsonPropertyAssignment(optionName, optionValue)), + /*multiLine*/ + true + ) ) - )); + ); return; } const compilerOptions = compilerOptionsProperty.initializer; @@ -155968,24 +156052,24 @@ function createAccessorAccessExpression(fieldName, isStatic2, container) { return isIdentifier(fieldName) ? factory.createPropertyAccessExpression(leftHead, fieldName) : factory.createElementAccessExpression(leftHead, factory.createStringLiteralFromNode(fieldName)); } function prepareModifierFlagsForAccessor(modifierFlags) { - modifierFlags &= ~64 /* Readonly */; - modifierFlags &= ~8 /* Private */; - if (!(modifierFlags & 16 /* Protected */)) { - modifierFlags |= 4 /* Public */; + modifierFlags &= ~8 /* Readonly */; + modifierFlags &= ~2 /* Private */; + if (!(modifierFlags & 4 /* Protected */)) { + modifierFlags |= 1 /* Public */; } return modifierFlags; } function prepareModifierFlagsForField(modifierFlags) { - modifierFlags &= ~4 /* Public */; - modifierFlags &= ~16 /* Protected */; - modifierFlags |= 8 /* Private */; + modifierFlags &= ~1 /* Public */; + modifierFlags &= ~4 /* Protected */; + modifierFlags |= 2 /* Private */; return modifierFlags; } function getAccessorConvertiblePropertyAtPosition(file, program, start2, end, considerEmptySpans = true) { const node = getTokenAtPosition(file, start2); const cursorRequest = start2 === end && considerEmptySpans; const declaration = findAncestor(node.parent, isAcceptedDeclaration); - const meaning = 28 /* AccessibilityModifier */ | 32 /* Static */ | 64 /* Readonly */; + const meaning = 7 /* AccessibilityModifier */ | 256 /* Static */ | 8 /* Readonly */; if (!declaration || !(nodeOverlapsWithStartEnd(declaration.name, file, start2, end) || cursorRequest)) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_property_for_which_to_generate_accessor) @@ -155996,7 +156080,7 @@ function getAccessorConvertiblePropertyAtPosition(file, program, start2, end, co error: getLocaleSpecificMessage(Diagnostics.Name_is_not_valid) }; } - if ((getEffectiveModifierFlags(declaration) & 126975 /* Modifier */ | meaning) !== meaning) { + if ((getEffectiveModifierFlags(declaration) & 98303 /* Modifier */ | meaning) !== meaning) { return { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_property_with_modifier) }; @@ -156090,11 +156174,7 @@ function updateFieldDeclaration(changeTracker, file, declaration, type, fieldNam } else if (isPropertyAssignment(declaration)) { updatePropertyAssignmentDeclaration(changeTracker, file, declaration, fieldName); } else { - changeTracker.replaceNode( - file, - declaration, - factory.updateParameterDeclaration(declaration, modifiers, declaration.dotDotDotToken, cast(fieldName, isIdentifier), declaration.questionToken, declaration.type, declaration.initializer) - ); + changeTracker.replaceNode(file, declaration, factory.updateParameterDeclaration(declaration, modifiers, declaration.dotDotDotToken, cast(fieldName, isIdentifier), declaration.questionToken, declaration.type, declaration.initializer)); } } function insertAccessor(changeTracker, file, accessor, declaration, container) { @@ -156159,14 +156239,19 @@ function getCodeFixesForImportDeclaration(context, node) { getQuotePreference(sourceFile, context.preferences) ))); if (getEmitModuleKind(opts) === 1 /* CommonJS */) { - variations.push(createAction(context, sourceFile, node, factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - namespace.name, - factory.createExternalModuleReference(node.moduleSpecifier) - ))); + variations.push(createAction( + context, + sourceFile, + node, + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + namespace.name, + factory.createExternalModuleReference(node.moduleSpecifier) + ) + )); } return variations; } @@ -156365,7 +156450,7 @@ function getDefaultValueFromType(checker, type) { return firstDefined(type.types, (t) => getDefaultValueFromType(checker, t)); } else if (type.isClass()) { const classDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); - if (!classDeclaration || hasSyntacticModifier(classDeclaration, 256 /* Abstract */)) + if (!classDeclaration || hasSyntacticModifier(classDeclaration, 64 /* Abstract */)) return void 0; const constructorDeclaration = getFirstConstructorWithBody(classDeclaration); if (constructorDeclaration && constructorDeclaration.parameters.length) @@ -156406,26 +156491,30 @@ registerCodeFix({ }); function doChange34(changes, sourceFile, info) { const { allowSyntheticDefaults, defaultImportName, namedImports, statement, required } = info; - changes.replaceNode(sourceFile, statement, defaultImportName && !allowSyntheticDefaults ? factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - defaultImportName, - factory.createExternalModuleReference(required) - ) : factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( + changes.replaceNode( + sourceFile, + statement, + defaultImportName && !allowSyntheticDefaults ? factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, defaultImportName, - namedImports - ), - required, - /*assertClause*/ - void 0 - )); + factory.createExternalModuleReference(required) + ) : factory.createImportDeclaration( + /*modifiers*/ + void 0, + factory.createImportClause( + /*isTypeOnly*/ + false, + defaultImportName, + namedImports + ), + required, + /*attributes*/ + void 0 + ) + ); } function getInfo17(sourceFile, program, pos) { const { parent: parent2 } = getTokenAtPosition(sourceFile, pos); @@ -156561,7 +156650,7 @@ function doChange36(changes, sourceFile, importType) { const newTypeNode = factory.updateImportTypeNode( importType, importType.argument, - importType.assertions, + importType.attributes, importType.qualifier, importType.typeArguments, /*isTypeOf*/ @@ -156778,32 +156867,40 @@ function splitTypeOnlyImport(changes, importDeclaration, context) { return; } const importClause = Debug.checkDefined(importDeclaration.importClause); - changes.replaceNode(context.sourceFile, importDeclaration, factory.updateImportDeclaration( + changes.replaceNode( + context.sourceFile, importDeclaration, - importDeclaration.modifiers, - factory.updateImportClause( - importClause, - importClause.isTypeOnly, - importClause.name, - /*namedBindings*/ - void 0 - ), - importDeclaration.moduleSpecifier, - importDeclaration.assertClause - )); - changes.insertNodeAfter(context.sourceFile, importDeclaration, factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.updateImportClause( - importClause, - importClause.isTypeOnly, - /*name*/ + factory.updateImportDeclaration( + importDeclaration, + importDeclaration.modifiers, + factory.updateImportClause( + importClause, + importClause.isTypeOnly, + importClause.name, + /*namedBindings*/ + void 0 + ), + importDeclaration.moduleSpecifier, + importDeclaration.attributes + ) + ); + changes.insertNodeAfter( + context.sourceFile, + importDeclaration, + factory.createImportDeclaration( + /*modifiers*/ void 0, - importClause.namedBindings - ), - importDeclaration.moduleSpecifier, - importDeclaration.assertClause - )); + factory.updateImportClause( + importClause, + importClause.isTypeOnly, + /*name*/ + void 0, + importClause.namedBindings + ), + importDeclaration.moduleSpecifier, + importDeclaration.attributes + ) + ); } // src/services/codefixes/convertConstToLet.ts @@ -157643,7 +157740,7 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log, ); if (keywordFilters !== 0 /* None */) { for (const keywordEntry of getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile))) { - if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !uniqueNames.has(keywordEntry.name)) { + if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !isTypeOnlyLocation && isContextualKeywordInAutoImportableExpressionSpace(keywordEntry.name) || !uniqueNames.has(keywordEntry.name)) { uniqueNames.add(keywordEntry.name); insertSorted( entries, @@ -158070,7 +158167,7 @@ function getEntryForMemberCompletion(host, program, options, preferences, name, } let modifiers = 0 /* None */; const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators } = getPresentModifiers(contextToken, sourceFile, position); - const isAbstract = presentModifiers & 256 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 256 /* Abstract */; + const isAbstract = presentModifiers & 64 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 64 /* Abstract */; let completionNodes = []; ts_codefix_exports.addNewNodeForMemberSymbol( symbol, @@ -158089,15 +158186,15 @@ function getEntryForMemberCompletion(host, program, options, preferences, name, (node) => { let requiredModifiers = 0 /* None */; if (isAbstract) { - requiredModifiers |= 256 /* Abstract */; + requiredModifiers |= 64 /* Abstract */; } if (isClassElement(node) && checker.getMemberOverrideModifierStatus(classLikeDeclaration, node, symbol) === 1 /* NeedsOverride */) { - requiredModifiers |= 16384 /* Override */; + requiredModifiers |= 16 /* Override */; } if (!completionNodes.length) { modifiers = node.modifierFlagsCache | requiredModifiers; } - node = factory.updateModifiers(node, modifiers); + node = factory.replaceModifiers(node, modifiers); completionNodes.push(node); }, body, @@ -158106,28 +158203,28 @@ function getEntryForMemberCompletion(host, program, options, preferences, name, ); if (completionNodes.length) { const isMethod = symbol.flags & 8192 /* Method */; - let allowedModifiers = modifiers | 16384 /* Override */ | 4 /* Public */; + let allowedModifiers = modifiers | 16 /* Override */ | 1 /* Public */; if (!isMethod) { - allowedModifiers |= 2 /* Ambient */ | 64 /* Readonly */; + allowedModifiers |= 128 /* Ambient */ | 8 /* Readonly */; } else { - allowedModifiers |= 512 /* Async */; + allowedModifiers |= 1024 /* Async */; } const allowedAndPresent = presentModifiers & allowedModifiers; if (presentModifiers & ~allowedModifiers) { return void 0; } - if (modifiers & 16 /* Protected */ && allowedAndPresent & 4 /* Public */) { - modifiers &= ~16 /* Protected */; + if (modifiers & 4 /* Protected */ && allowedAndPresent & 1 /* Public */) { + modifiers &= ~4 /* Protected */; } - if (allowedAndPresent !== 0 /* None */ && !(allowedAndPresent & 4 /* Public */)) { - modifiers &= ~4 /* Public */; + if (allowedAndPresent !== 0 /* None */ && !(allowedAndPresent & 1 /* Public */)) { + modifiers &= ~1 /* Public */; } modifiers |= allowedAndPresent; - completionNodes = completionNodes.map((node) => factory.updateModifiers(node, modifiers)); + completionNodes = completionNodes.map((node) => factory.replaceModifiers(node, modifiers)); if (presentDecorators == null ? void 0 : presentDecorators.length) { const lastNode = completionNodes[completionNodes.length - 1]; if (canHaveDecorators(lastNode)) { - completionNodes[completionNodes.length - 1] = factory.updateModifierLike(lastNode, presentDecorators.concat(getModifiers(lastNode) || [])); + completionNodes[completionNodes.length - 1] = factory.replaceDecoratorsAndModifiers(lastNode, presentDecorators.concat(getModifiers(lastNode) || [])); } } const format = 1 /* MultiLine */ | 131072 /* NoTrailingNewLine */; @@ -158157,7 +158254,7 @@ function getPresentModifiers(contextToken, sourceFile, position) { let contextMod; const range = { pos: position, end: position }; if (isPropertyDeclaration(contextToken.parent) && contextToken.parent.modifiers) { - modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 126975 /* Modifier */; + modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 98303 /* Modifier */; decorators = contextToken.parent.modifiers.filter(isDecorator) || []; range.pos = Math.min(range.pos, contextToken.parent.modifiers.pos); } @@ -158282,17 +158379,19 @@ function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, pro true ); } - const parameters = typeNode.parameters.map((typedParam) => factory.createParameterDeclaration( - /*modifiers*/ - void 0, - typedParam.dotDotDotToken, - typedParam.name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - typedParam.initializer - )); + const parameters = typeNode.parameters.map( + (typedParam) => factory.createParameterDeclaration( + /*modifiers*/ + void 0, + typedParam.dotDotDotToken, + typedParam.name, + /*questionToken*/ + void 0, + /*type*/ + void 0, + typedParam.initializer + ) + ); return factory.createMethodDeclaration( /*modifiers*/ void 0, @@ -158730,7 +158829,7 @@ function getCompletionEntryDetails(program, log, sourceFile, position, entryId, return createSimpleDetails(completionNameForLiteral(sourceFile, preferences, literal), "string" /* string */, typeof literal === "string" ? 8 /* stringLiteral */ : 7 /* numericLiteral */); } case "cases": { - const { entry, importAdder } = getExhaustiveCaseSnippets( + const snippets = getExhaustiveCaseSnippets( contextToken.parent, sourceFile, preferences, @@ -158740,7 +158839,8 @@ function getCompletionEntryDetails(program, log, sourceFile, position, entryId, /*formatContext*/ void 0 ); - if (importAdder.hasFixes()) { + if (snippets == null ? void 0 : snippets.importAdder.hasFixes()) { + const { entry, importAdder } = snippets; const changes = ts_textChanges_exports.ChangeTracker.with( { host, formatContext, preferences }, importAdder.writeFixes @@ -158758,7 +158858,7 @@ function getCompletionEntryDetails(program, log, sourceFile, position, entryId, }; } return { - name: entry.name, + name, kind: "" /* unknown */, kindModifiers: "", displayParts: [], @@ -158775,10 +158875,7 @@ function createSimpleDetails(name, kind, kind2) { return createCompletionDetails(name, "" /* none */, kind, [displayPart(name, kind2)]); } function createCompletionDetailsForSymbol(symbol, name, checker, sourceFile, location, cancellationToken, codeActions, sourceDisplay) { - const { displayParts, documentation, symbolKind, tags } = checker.runWithCancellationToken( - cancellationToken, - (checker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(checker2, symbol, sourceFile, location, location, 7 /* All */) - ); + const { displayParts, documentation, symbolKind, tags } = checker.runWithCancellationToken(cancellationToken, (checker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(checker2, symbol, sourceFile, location, location, 7 /* All */)); return createCompletionDetails(name, ts_SymbolDisplay_exports.getSymbolModifiers(checker, symbol), symbolKind, displayParts, documentation, tags, codeActions, sourceDisplay); } function createCompletionDetails(name, kindModifiers, kind, displayParts, documentation, tags, codeActions, source) { @@ -159343,14 +159440,18 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) }; } else { const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0; - const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo([{ - exportKind: 0 /* Named */, - moduleFileName: fileName, - isFromPackageJson: false, - moduleSymbol, - symbol: firstAccessibleSymbol, - targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags - }], position, isValidTypeOnlyAliasUseSite(location)) || {}; + const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo( + [{ + exportKind: 0 /* Named */, + moduleFileName: fileName, + isFromPackageJson: false, + moduleSymbol, + symbol: firstAccessibleSymbol, + targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags + }], + position, + isValidTypeOnlyAliasUseSite(location) + ) || {}; if (moduleSpecifier) { const origin = { kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */), @@ -159903,24 +160004,24 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (contextToken.kind === 80 /* Identifier */ && !isCurrentlyEditingNode(contextToken)) { switch (contextToken.getText()) { case "private": - classElementModifierFlags = classElementModifierFlags | 8 /* Private */; + classElementModifierFlags = classElementModifierFlags | 2 /* Private */; break; case "static": - classElementModifierFlags = classElementModifierFlags | 32 /* Static */; + classElementModifierFlags = classElementModifierFlags | 256 /* Static */; break; case "override": - classElementModifierFlags = classElementModifierFlags | 16384 /* Override */; + classElementModifierFlags = classElementModifierFlags | 16 /* Override */; break; } } if (isClassStaticBlockDeclaration(classElement)) { - classElementModifierFlags |= 32 /* Static */; + classElementModifierFlags |= 256 /* Static */; } - if (!(classElementModifierFlags & 8 /* Private */)) { - const baseTypeNodes = isClassLike(decl) && classElementModifierFlags & 16384 /* Override */ ? singleElementArray(getEffectiveBaseTypeNode(decl)) : getAllSuperTypeNodes(decl); + if (!(classElementModifierFlags & 2 /* Private */)) { + const baseTypeNodes = isClassLike(decl) && classElementModifierFlags & 16 /* Override */ ? singleElementArray(getEffectiveBaseTypeNode(decl)) : getAllSuperTypeNodes(decl); const baseSymbols = flatMap(baseTypeNodes, (baseTypeNode) => { const type = typeChecker.getTypeAtLocation(baseTypeNode); - return classElementModifierFlags & 32 /* Static */ ? (type == null ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : type && typeChecker.getPropertiesOfType(type); + return classElementModifierFlags & 256 /* Static */ ? (type == null ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : type && typeChecker.getPropertiesOfType(type); }); symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags)); forEach(symbols, (symbol, index) => { @@ -160223,10 +160324,10 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, if (isCurrentlyEditingNode(m)) { continue; } - if (hasEffectiveModifier(m, 8 /* Private */)) { + if (hasEffectiveModifier(m, 2 /* Private */)) { continue; } - if (isStatic(m) !== !!(currentClassElementModifierFlags & 32 /* Static */)) { + if (isStatic(m) !== !!(currentClassElementModifierFlags & 256 /* Static */)) { continue; } const existingName = getPropertyNameForPropertyNameNode(m.name); @@ -160234,7 +160335,9 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position, existingMemberNames.add(existingName); } } - return baseSymbols.filter((propertySymbol) => !existingMemberNames.has(propertySymbol.escapedName) && !!propertySymbol.declarations && !(getDeclarationModifierFlagsFromSymbol(propertySymbol) & 8 /* Private */) && !(propertySymbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(propertySymbol.valueDeclaration))); + return baseSymbols.filter( + (propertySymbol) => !existingMemberNames.has(propertySymbol.escapedName) && !!propertySymbol.declarations && !(getDeclarationModifierFlagsFromSymbol(propertySymbol) & 2 /* Private */) && !(propertySymbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(propertySymbol.valueDeclaration)) + ); } function filterJsxAttributes(symbols2, attributes) { const seenNames = /* @__PURE__ */ new Set(); @@ -160495,7 +160598,7 @@ function getApparentProperties(type, node, checker) { return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 402784252 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties())))); } function containsNonPublicProperties(props) { - return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 24 /* NonPublicAccessibilityModifier */)); + return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 6 /* NonPublicAccessibilityModifier */)); } function getPropertiesForCompletion(type, checker) { return type.isUnion() ? Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") : Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); @@ -160655,7 +160758,7 @@ function isProbablyGlobalType(type, sourceFile, checker) { return false; } function isStaticProperty(symbol) { - return !!(symbol.valueDeclaration && getEffectiveModifierFlags(symbol.valueDeclaration) & 32 /* Static */ && isClassLike(symbol.valueDeclaration.parent)); + return !!(symbol.valueDeclaration && getEffectiveModifierFlags(symbol.valueDeclaration) & 256 /* Static */ && isClassLike(symbol.valueDeclaration.parent)); } function tryGetObjectLiteralContextualType(node, typeChecker) { const type = typeChecker.getContextualType(node); @@ -160826,6 +160929,9 @@ function toUpperCharCode(charCode) { } return charCode; } +function isContextualKeywordInAutoImportableExpressionSpace(keyword) { + return keyword === "abstract" || keyword === "async" || keyword === "await" || keyword === "declare" || keyword === "module" || keyword === "namespace" || keyword === "type"; +} // src/services/_namespaces/ts.Completions.StringCompletions.ts var ts_Completions_StringCompletions_exports = {}; @@ -160918,8 +161024,9 @@ function convertStringLiteralCompletions(completion, contextToken, sourceFile, h return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan, entries }; } case 2 /* Types */: { + const quoteChar = contextToken.kind === 15 /* NoSubstitutionTemplateLiteral */ ? 96 /* backtick */ : startsWith(getTextOfNode(contextToken), "'") ? 39 /* singleQuote */ : 34 /* doubleQuote */; const entries = completion.types.map((type) => ({ - name: type.value, + name: escapeString(type.value, quoteChar), kindModifiers: "" /* none */, kind: "string" /* string */, sortText: SortText.LocationPriority, @@ -161020,7 +161127,7 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck case 291 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); - return argumentInfo && (getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker, 0 /* Normal */)) || fromContextualType(0 /* None */); + return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */); } case 272 /* ImportDeclaration */: case 278 /* ExportDeclaration */: @@ -161089,12 +161196,11 @@ function walkUpParentheses(node) { function getAlreadyUsedTypesInStringLiteralUnion(union, current) { return mapDefined(union.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : void 0); } -function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) { +function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) { let isNewIdentifier = false; const uniques = /* @__PURE__ */ new Map(); - const candidates = []; const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg; - checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates, checkMode); + const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument); const types = flatMap(candidates, (candidate) => { if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; @@ -161154,7 +161260,7 @@ function directoryResult(name) { function addReplacementSpans(text, textStart, names) { const span = getDirectoryFragmentTextSpan(text, textStart); const wholeSpan = text.length === 0 ? void 0 : createTextSpan(textStart, text.length); - return names.map(({ name, kind, extension }) => Math.max(name.indexOf(directorySeparator), name.indexOf(altDirectorySeparator)) !== -1 ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span }); + return names.map(({ name, kind, extension }) => name.includes(directorySeparator) || name.includes(altDirectorySeparator) ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span }); } function getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) { return addReplacementSpans(node.text, node.getStart(sourceFile) + 1, getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, compilerOptions, host, typeChecker, preferences)); @@ -161200,24 +161306,21 @@ function getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, c } } function getSupportedExtensionsForModuleResolution(compilerOptions, typeChecker) { - const ambientModulesExtensions = !typeChecker ? [] : mapDefined( - typeChecker.getAmbientModules(), - (module2) => { - const name = module2.name.slice(1, -1); - if (!name.startsWith("*.") || name.includes("/")) - return; - return name.slice(1); - } - ); + const ambientModulesExtensions = !typeChecker ? [] : mapDefined(typeChecker.getAmbientModules(), (module2) => { + const name = module2.name.slice(1, -1); + if (!name.startsWith("*.") || name.includes("/")) + return; + return name.slice(1); + }); const extensions = [...getSupportedExtensions(compilerOptions), ambientModulesExtensions]; const moduleResolution = getEmitModuleResolutionKind(compilerOptions); return moduleResolutionUsesNodeModules(moduleResolution) ? getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, extensions) : extensions; } function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase) { - rootDirs = rootDirs.map((rootDirectory) => normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory))); + rootDirs = rootDirs.map((rootDirectory) => ensureTrailingDirectorySeparator(normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory)))); const relativeDirectory = firstDefined(rootDirs, (rootDirectory) => containsPath(rootDirectory, scriptDirectory, basePath, ignoreCase) ? scriptDirectory.substr(rootDirectory.length) : void 0); return deduplicate( - [...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory], + [...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory].map((baseDir) => removeTrailingDirectorySeparator(baseDir)), equateStringsCaseSensitive, compareStringsCaseSensitive ); @@ -161455,7 +161558,7 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c } const keys = getOwnKeys(exports); const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); - const conditions = getConditions(compilerOptions, mode === 99 /* ESNext */); + const conditions = getConditions(compilerOptions, mode); addCompletionEntriesFromPathsOrExports( result, fragmentSubpath, @@ -161483,7 +161586,7 @@ function getPatternFromFirstMatchingCondition(target, conditions) { } if (target && typeof target === "object" && !isArray(target)) { for (const condition in target) { - if (condition === "default" || conditions.indexOf(condition) > -1 || isApplicableVersionedTypesKey(conditions, condition)) { + if (condition === "default" || conditions.includes(condition) || isApplicableVersionedTypesKey(conditions, condition)) { const pattern = target[condition]; return getPatternFromFirstMatchingCondition(pattern, conditions); } @@ -161495,7 +161598,7 @@ function getFragmentDirectory(fragment) { } function getCompletionsForPathMapping(path, patterns, fragment, packageDirectory, extensionOptions, host) { if (!endsWith(path, "*")) { - return !stringContains(path, "*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray; + return !path.includes("*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray; } const pathPrefix = path.slice(0, path.length - 1); const remainingFragment = tryRemovePrefix(fragment, pathPrefix); @@ -161565,7 +161668,7 @@ function removeLeadingDirectorySeparator(path) { } function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) { const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name)); - const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0); + const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && !moduleName.includes("*")); if (fragmentDirectory !== void 0) { const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory); return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator)); @@ -161681,7 +161784,7 @@ function isPathRelativeToScript(path) { var tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s* isDeclaration(node2) || isStatement(node2) || isJSDocTag(node2) - ); + const declOrStatement = findAncestor(validImport, (node2) => isDeclaration(node2) || isStatement(node2) || isJSDocTag(node2)); return isDeclaration(declOrStatement) ? getContextNode(declOrStatement) : declOrStatement; } } @@ -162326,7 +162426,7 @@ function getContextNodeForNodeEntry(node) { if (node.parent.name === node || // node is name of declaration, use parent isConstructorDeclaration(node.parent) || isExportAssignment(node.parent) || // Property name of the import export specifier or binding pattern, use parent (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || // Is default export - node.kind === 90 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) { + node.kind === 90 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 2080 /* ExportDefault */)) { return getContextNode(node.parent); } return void 0; @@ -162358,10 +162458,7 @@ function getContextNode(node) { case 303 /* PropertyAssignment */: case 304 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( - findAncestor( - node.parent, - (node2) => isBinaryExpression(node2) || isForInOrOfStatement(node2) - ) + findAncestor(node.parent, (node2) => isBinaryExpression(node2) || isForInOrOfStatement(node2)) ) : node; default: return node; @@ -162732,7 +162829,7 @@ function declarationIsWriteAccess(decl) { var Core; ((Core2) => { function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) { - var _a, _b, _c; + var _a, _b; node = getAdjustedNode2(node, options); if (isSourceFile(node)) { const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program); @@ -162771,7 +162868,7 @@ var Core; if (!options.implementations && isStringLiteralLike(node)) { if (isModuleSpecifierLike(node)) { const fileIncludeReasons = program.getFileIncludeReasons(); - const referencedFileName = (_c = (_b = (_a = node.getSourceFile().resolvedModules) == null ? void 0 : _a.get(node.text, getModeForUsageLocation(node.getSourceFile(), node))) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.resolvedFileName; + const referencedFileName = (_b = (_a = program.getResolvedModule(node.getSourceFile(), node.text, getModeForUsageLocation(node.getSourceFile(), node))) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.resolvedFileName; const referencedFile = referencedFileName ? program.getSourceFile(referencedFileName) : void 0; if (referencedFile) { return [{ definition: { type: 4 /* String */, node }, references: getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || emptyArray }]; @@ -162834,7 +162931,7 @@ var Core; for (const ref of references) { if (isReferencedFile(ref)) { const referencingFile = program.getSourceFileByPath(ref.file); - const location = getReferencedFileLocation(program.getSourceFileByPath, ref); + const location = getReferencedFileLocation(program, ref); if (isReferenceFileLocation(location)) { entries = append(entries, { kind: 0 /* Span */, @@ -163290,7 +163387,7 @@ var Core; return void 0; } if (flags & (4 /* Property */ | 8192 /* Method */)) { - const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); + const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 2 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { return getAncestor(privateDeclaration, 263 /* ClassDeclaration */); } @@ -163782,10 +163879,12 @@ var Core; return cached; } cachedResults.set(key, false); - const inherits = !!symbol.declarations && symbol.declarations.some((declaration) => getAllSuperTypeNodes(declaration).some((typeReference) => { - const type = checker.getTypeAtLocation(typeReference); - return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent2, cachedResults, checker); - })); + const inherits = !!symbol.declarations && symbol.declarations.some( + (declaration) => getAllSuperTypeNodes(declaration).some((typeReference) => { + const type = checker.getTypeAtLocation(typeReference); + return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent2, cachedResults, checker); + }) + ); cachedResults.set(key, inherits); return inherits; } @@ -163798,7 +163897,7 @@ var Core; if (!searchSpaceNode) { return void 0; } - let staticFlag = 32 /* Static */; + let staticFlag = 256 /* Static */; switch (searchSpaceNode.kind) { case 172 /* PropertyDeclaration */: case 171 /* PropertySignature */: @@ -163838,7 +163937,7 @@ var Core; /*includeClassComputedPropertyName*/ false ); - let staticFlag = 32 /* Static */; + let staticFlag = 256 /* Static */; switch (searchSpaceNode.kind) { case 174 /* MethodDeclaration */: case 173 /* MethodSignature */: @@ -164080,7 +164179,7 @@ var Core; if (!symbol.valueDeclaration) return false; const modifierFlags = getEffectiveModifierFlags(symbol.valueDeclaration); - return !!(modifierFlags & 32 /* Static */); + return !!(modifierFlags & 256 /* Static */); } function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) { const { checker } = state; @@ -164172,7 +164271,7 @@ __export(ts_GoToDefinition_exports, { // src/services/goToDefinition.ts function getDefinitionAtPosition(program, sourceFile, position, searchOtherFilesOnly, stopAtAlias) { - var _a, _b; + var _a; const resolvedRef = getReferenceAtPosition(sourceFile, position, program); const fileReferenceDefinition = resolvedRef && [getDefinitionInfoForFileReference(resolvedRef.reference.fileName, resolvedRef.fileName, resolvedRef.unverified)] || emptyArray; if (resolvedRef == null ? void 0 : resolvedRef.file) { @@ -164245,7 +164344,7 @@ function getDefinitionAtPosition(program, sourceFile, position, searchOtherFiles } } if (!symbol && isModuleSpecifierLike(fallbackNode)) { - const ref = (_b = (_a = sourceFile.resolvedModules) == null ? void 0 : _a.get(fallbackNode.text, getModeForUsageLocation(sourceFile, fallbackNode))) == null ? void 0 : _b.resolvedModule; + const ref = (_a = program.getResolvedModule(sourceFile, fallbackNode.text, getModeForUsageLocation(sourceFile, fallbackNode))) == null ? void 0 : _a.resolvedModule; if (ref) { return [{ name: fallbackNode.text, @@ -164340,7 +164439,7 @@ function getDefinitionFromOverriddenMember(typeChecker, node) { return getDefinitionFromSymbol(typeChecker, symbol, node); } function getReferenceAtPosition(sourceFile, position, program) { - var _a, _b, _c, _d; + var _a, _b; const referencePath = findReferenceInPosition(sourceFile.referencedFiles, position); if (referencePath) { const file = program.getSourceFileFromReference(sourceFile, referencePath); @@ -164357,10 +164456,11 @@ function getReferenceAtPosition(sourceFile, position, program) { const file = program.getLibFileFromReference(libReferenceDirective); return file && { reference: libReferenceDirective, fileName: file.fileName, file, unverified: false }; } - if ((_b = sourceFile.resolvedModules) == null ? void 0 : _b.size()) { + if (sourceFile.imports.length || sourceFile.moduleAugmentations.length) { const node = getTouchingToken(sourceFile, position); - if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && sourceFile.resolvedModules.has(node.text, getModeForUsageLocation(sourceFile, node))) { - const verifiedFileName = (_d = (_c = sourceFile.resolvedModules.get(node.text, getModeForUsageLocation(sourceFile, node))) == null ? void 0 : _c.resolvedModule) == null ? void 0 : _d.resolvedFileName; + let resolution; + if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && (resolution = program.getResolvedModule(sourceFile, node.text, getModeForUsageLocation(sourceFile, node)))) { + const verifiedFileName = (_b = resolution.resolvedModule) == null ? void 0 : _b.resolvedFileName; const fileName = verifiedFileName || resolvePath(getDirectoryPath(sourceFile.fileName), node.text); return { file: program.getSourceFile(fileName), @@ -164629,7 +164729,7 @@ function isDefinitionVisible(checker, declaration) { case 177 /* GetAccessor */: case 178 /* SetAccessor */: case 174 /* MethodDeclaration */: - if (hasEffectiveModifier(declaration, 8 /* Private */)) + if (hasEffectiveModifier(declaration, 2 /* Private */)) return false; case 176 /* Constructor */: case 303 /* PropertyAssignment */: @@ -164697,7 +164797,6 @@ __export(ts_InlayHints_exports, { }); // src/services/inlayHints.ts -var maxTypeHintLength = 30; var leadingParameterNameCommentRegexFactory = (name) => { return new RegExp(`^\\s?/\\*\\*?\\s?${name}\\s?\\*\\/\\s?$`); }; @@ -164714,6 +164813,7 @@ function provideInlayHints(context) { const { file, program, span, cancellationToken, preferences } = context; const sourceFileText = file.text; const compilerOptions = program.getCompilerOptions(); + const quotePreference = getQuotePreference(file, preferences); const checker = program.getTypeChecker(); const result = []; visitor(file); @@ -164777,9 +164877,10 @@ function provideInlayHints(context) { displayParts }); } - function addTypeHints(text, position) { + function addTypeHints(hintText, position) { result.push({ - text: `: ${text.length > maxTypeHintLength ? text.substr(0, maxTypeHintLength - "...".length) + "..." : text}`, + text: typeof hintText === "string" ? `: ${hintText}` : "", + displayParts: typeof hintText === "string" ? void 0 : [{ text: ": " }, ...hintText], position, kind: "Type" /* Type */, whitespaceBefore: true @@ -164817,13 +164918,14 @@ function provideInlayHints(context) { if (isModuleReferenceType(declarationType)) { return; } - const typeDisplayString = printTypeInSingleLine(declarationType); - if (typeDisplayString) { - const isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && equateStringsCaseInsensitive(decl.name.getText(), typeDisplayString); + const hintParts = typeToInlayHintParts(declarationType); + if (hintParts) { + const hintText = typeof hintParts === "string" ? hintParts : hintParts.map((part) => part.text).join(""); + const isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && equateStringsCaseInsensitive(decl.name.getText(), hintText); if (isVariableNameMatchesType) { return; } - addTypeHints(typeDisplayString, decl.name.end); + addTypeHints(hintParts, decl.name.end); } } function visitCallOrNewExpression(expr) { @@ -164840,6 +164942,7 @@ function provideInlayHints(context) { for (const originalArg of args) { const arg = skipParentheses(originalArg); if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) { + signatureParamPos++; continue; } let spreadArgs = 0; @@ -164930,11 +165033,10 @@ function provideInlayHints(context) { if (isModuleReferenceType(returnType)) { return; } - const typeDisplayString = printTypeInSingleLine(returnType); - if (!typeDisplayString) { - return; + const hintParts = typeToInlayHintParts(returnType); + if (hintParts) { + addTypeHints(hintParts, getTypeAnnotationPosition(decl)); } - addTypeHints(typeDisplayString, getTypeAnnotationPosition(decl)); } function getTypeAnnotationPosition(decl) { const closeParenToken = findChildOfKind(decl, 22 /* CloseParenToken */, file); @@ -164957,14 +165059,14 @@ function provideInlayHints(context) { if (effectiveTypeAnnotation) { continue; } - const typeDisplayString = getParameterDeclarationTypeDisplayString(signature.parameters[i]); - if (!typeDisplayString) { + const typeHints = getParameterDeclarationTypeHints(signature.parameters[i]); + if (!typeHints) { continue; } - addTypeHints(typeDisplayString, param.questionToken ? param.questionToken.end : param.name.end); + addTypeHints(typeHints, param.questionToken ? param.questionToken.end : param.name.end); } } - function getParameterDeclarationTypeDisplayString(symbol) { + function getParameterDeclarationTypeHints(symbol) { const valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || !isParameter(valueDeclaration)) { return void 0; @@ -164973,7 +165075,7 @@ function provideInlayHints(context) { if (isModuleReferenceType(signatureParamType)) { return void 0; } - return printTypeInSingleLine(signatureParamType); + return typeToInlayHintParts(signatureParamType); } function printTypeInSingleLine(type) { const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; @@ -164995,6 +165097,307 @@ function provideInlayHints(context) { ); }); } + function typeToInlayHintParts(type) { + if (!shouldUseInteractiveInlayHints(preferences)) { + return printTypeInSingleLine(type); + } + const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; + const typeNode = checker.typeToTypeNode( + type, + /*enclosingDeclaration*/ + void 0, + flags + ); + Debug.assertIsDefined(typeNode, "should always get typenode"); + const parts = []; + visitForDisplayParts(typeNode); + return parts; + function visitForDisplayParts(node) { + if (!node) { + return; + } + const tokenString = tokenToString(node.kind); + if (tokenString) { + parts.push({ text: tokenString }); + return; + } + if (isLiteralExpression(node)) { + parts.push({ text: getLiteralText2(node) }); + return; + } + switch (node.kind) { + case 80 /* Identifier */: + const identifier = node; + const identifierText = idText(identifier); + const name = identifier.symbol && identifier.symbol.declarations && identifier.symbol.declarations.length && getNameOfDeclaration(identifier.symbol.declarations[0]); + if (name) { + parts.push(getNodeDisplayPart(identifierText, name)); + } else { + parts.push({ text: identifierText }); + } + break; + case 166 /* QualifiedName */: + const qualifiedName = node; + visitForDisplayParts(qualifiedName.left); + parts.push({ text: "." }); + visitForDisplayParts(qualifiedName.right); + break; + case 182 /* TypePredicate */: + const predicate = node; + if (predicate.assertsModifier) { + parts.push({ text: "asserts " }); + } + visitForDisplayParts(predicate.parameterName); + if (predicate.type) { + parts.push({ text: " is " }); + visitForDisplayParts(predicate.type); + } + break; + case 183 /* TypeReference */: + const typeReference = node; + visitForDisplayParts(typeReference.typeName); + if (typeReference.typeArguments) { + parts.push({ text: "<" }); + visitDisplayPartList(typeReference.typeArguments, ", "); + parts.push({ text: ">" }); + } + break; + case 168 /* TypeParameter */: + const typeParameter = node; + if (typeParameter.modifiers) { + visitDisplayPartList(typeParameter.modifiers, " "); + } + visitForDisplayParts(typeParameter.name); + if (typeParameter.constraint) { + parts.push({ text: " extends " }); + visitForDisplayParts(typeParameter.constraint); + } + if (typeParameter.default) { + parts.push({ text: " = " }); + visitForDisplayParts(typeParameter.default); + } + break; + case 169 /* Parameter */: + const parameter = node; + if (parameter.modifiers) { + visitDisplayPartList(parameter.modifiers, " "); + } + if (parameter.dotDotDotToken) { + parts.push({ text: "..." }); + } + visitForDisplayParts(parameter.name); + if (parameter.questionToken) { + parts.push({ text: "?" }); + } + if (parameter.type) { + parts.push({ text: ": " }); + visitForDisplayParts(parameter.type); + } + break; + case 185 /* ConstructorType */: + const constructorType = node; + parts.push({ text: "new " }); + if (constructorType.typeParameters) { + parts.push({ text: "<" }); + visitDisplayPartList(constructorType.typeParameters, ", "); + parts.push({ text: ">" }); + } + parts.push({ text: "(" }); + visitDisplayPartList(constructorType.parameters, ", "); + parts.push({ text: ")" }); + parts.push({ text: " => " }); + visitForDisplayParts(constructorType.type); + break; + case 186 /* TypeQuery */: + const typeQuery = node; + parts.push({ text: "typeof " }); + visitForDisplayParts(typeQuery.exprName); + if (typeQuery.typeArguments) { + parts.push({ text: "<" }); + visitDisplayPartList(typeQuery.typeArguments, ", "); + parts.push({ text: ">" }); + } + break; + case 187 /* TypeLiteral */: + const typeLiteral = node; + parts.push({ text: "{" }); + if (typeLiteral.members.length) { + parts.push({ text: " " }); + visitDisplayPartList(typeLiteral.members, "; "); + parts.push({ text: " " }); + } + parts.push({ text: "}" }); + break; + case 188 /* ArrayType */: + visitForDisplayParts(node.elementType); + parts.push({ text: "[]" }); + break; + case 189 /* TupleType */: + parts.push({ text: "[" }); + visitDisplayPartList(node.elements, ", "); + parts.push({ text: "]" }); + break; + case 202 /* NamedTupleMember */: + const member = node; + if (member.dotDotDotToken) { + parts.push({ text: "..." }); + } + visitForDisplayParts(member.name); + if (member.questionToken) { + parts.push({ text: "?" }); + } + parts.push({ text: ": " }); + visitForDisplayParts(member.type); + break; + case 190 /* OptionalType */: + visitForDisplayParts(node.type); + parts.push({ text: "?" }); + break; + case 191 /* RestType */: + parts.push({ text: "..." }); + visitForDisplayParts(node.type); + break; + case 192 /* UnionType */: + visitDisplayPartList(node.types, " | "); + break; + case 193 /* IntersectionType */: + visitDisplayPartList(node.types, " & "); + break; + case 194 /* ConditionalType */: + const conditionalType = node; + visitForDisplayParts(conditionalType.checkType); + parts.push({ text: " extends " }); + visitForDisplayParts(conditionalType.extendsType); + parts.push({ text: " ? " }); + visitForDisplayParts(conditionalType.trueType); + parts.push({ text: " : " }); + visitForDisplayParts(conditionalType.falseType); + break; + case 195 /* InferType */: + parts.push({ text: "infer " }); + visitForDisplayParts(node.typeParameter); + break; + case 196 /* ParenthesizedType */: + parts.push({ text: "(" }); + visitForDisplayParts(node.type); + parts.push({ text: ")" }); + break; + case 198 /* TypeOperator */: + const typeOperator = node; + parts.push({ text: `${tokenToString(typeOperator.operator)} ` }); + visitForDisplayParts(typeOperator.type); + break; + case 199 /* IndexedAccessType */: + const indexedAccess = node; + visitForDisplayParts(indexedAccess.objectType); + parts.push({ text: "[" }); + visitForDisplayParts(indexedAccess.indexType); + parts.push({ text: "]" }); + break; + case 200 /* MappedType */: + const mappedType = node; + parts.push({ text: "{ " }); + if (mappedType.readonlyToken) { + if (mappedType.readonlyToken.kind === 40 /* PlusToken */) { + parts.push({ text: "+" }); + } else if (mappedType.readonlyToken.kind === 41 /* MinusToken */) { + parts.push({ text: "-" }); + } + parts.push({ text: "readonly " }); + } + parts.push({ text: "[" }); + visitForDisplayParts(mappedType.typeParameter); + if (mappedType.nameType) { + parts.push({ text: " as " }); + visitForDisplayParts(mappedType.nameType); + } + parts.push({ text: "]" }); + if (mappedType.questionToken) { + if (mappedType.questionToken.kind === 40 /* PlusToken */) { + parts.push({ text: "+" }); + } else if (mappedType.questionToken.kind === 41 /* MinusToken */) { + parts.push({ text: "-" }); + } + parts.push({ text: "?" }); + } + parts.push({ text: ": " }); + if (mappedType.type) { + visitForDisplayParts(mappedType.type); + } + parts.push({ text: "; }" }); + break; + case 201 /* LiteralType */: + visitForDisplayParts(node.literal); + break; + case 184 /* FunctionType */: + const functionType = node; + if (functionType.typeParameters) { + parts.push({ text: "<" }); + visitDisplayPartList(functionType.typeParameters, ", "); + parts.push({ text: ">" }); + } + parts.push({ text: "(" }); + visitDisplayPartList(functionType.parameters, ", "); + parts.push({ text: ")" }); + parts.push({ text: " => " }); + visitForDisplayParts(functionType.type); + break; + case 205 /* ImportType */: + const importType = node; + if (importType.isTypeOf) { + parts.push({ text: "typeof " }); + } + parts.push({ text: "import(" }); + visitForDisplayParts(importType.argument); + if (importType.assertions) { + parts.push({ text: ", { assert: " }); + visitDisplayPartList(importType.assertions.assertClause.elements, ", "); + parts.push({ text: " }" }); + } + parts.push({ text: ")" }); + if (importType.qualifier) { + parts.push({ text: "." }); + visitForDisplayParts(importType.qualifier); + } + if (importType.typeArguments) { + parts.push({ text: "<" }); + visitDisplayPartList(importType.typeArguments, ", "); + parts.push({ text: ">" }); + } + break; + case 171 /* PropertySignature */: + const propertySignature = node; + if (propertySignature.modifiers) { + visitDisplayPartList(propertySignature.modifiers, " "); + } + visitForDisplayParts(propertySignature.name); + if (propertySignature.questionToken) { + parts.push({ text: "?" }); + } + if (propertySignature.type) { + parts.push({ text: ": " }); + visitForDisplayParts(propertySignature.type); + } + break; + default: + Debug.failBadSyntaxKind(node); + } + } + function visitDisplayPartList(nodes, separator) { + nodes.forEach((node, index) => { + if (index > 0) { + parts.push({ text: separator }); + } + visitForDisplayParts(node); + }); + } + function getLiteralText2(node) { + if (isStringLiteral(node)) { + return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`; + } + return node.text; + } + } function isUndefined(name) { return name === "undefined"; } @@ -165147,6 +165550,10 @@ function getCommentHavingNodes(declaration) { case 345 /* JSDocCallbackTag */: case 353 /* JSDocTypedefTag */: return [declaration, declaration.parent]; + case 330 /* JSDocSignature */: + if (isJSDocOverloadTag(declaration.parent)) { + return [declaration.parent.parent]; + } default: return getJSDocCommentsAndTags(declaration); } @@ -165160,6 +165567,11 @@ function getJsDocTagsFromDeclarations(declarations, checker) { } for (const tag of tags) { infos.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) }); + if (isJSDocPropertyLikeTag(tag) && tag.isNameFirst && tag.typeExpression && isJSDocTypeLiteral(tag.typeExpression.type)) { + forEach(tag.typeExpression.type.jsDocPropertyTags, (propTag) => { + infos.push({ name: propTag.tagName.text, text: getCommentDisplayParts(propTag, checker) }); + }); + } } }); return infos; @@ -165588,7 +166000,7 @@ function removeUnusedImports(oldImports, sourceFile, program) { /*importClause*/ void 0, moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 )); } else { @@ -165754,7 +166166,7 @@ function coalesceExportsWorker(exportGroup, comparer) { exportDecl.isTypeOnly, exportDecl.exportClause && (isNamedExports(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, - exportDecl.assertClause + exportDecl.attributes ) ); } @@ -165786,7 +166198,7 @@ function updateImportDeclarationAndClause(importDeclaration, name, namedBindings factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.isTypeOnly, name, namedBindings), // TODO: GH#18217 importDeclaration.moduleSpecifier, - importDeclaration.assertClause + importDeclaration.attributes ); } function sortSpecifiers(specifiers, comparer) { @@ -165964,19 +166376,13 @@ function getImportKindOrder(s1) { } } function getNewImportSpecifiers(namedImports) { - return flatMap( - namedImports, - (namedImport) => map( - tryGetNamedBindingElements(namedImport), - (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && importSpecifier.name.escapedText === importSpecifier.propertyName.escapedText ? factory.updateImportSpecifier( - importSpecifier, - importSpecifier.isTypeOnly, - /*propertyName*/ - void 0, - importSpecifier.name - ) : importSpecifier - ) - ); + return flatMap(namedImports, (namedImport) => map(tryGetNamedBindingElements(namedImport), (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && importSpecifier.name.escapedText === importSpecifier.propertyName.escapedText ? factory.updateImportSpecifier( + importSpecifier, + importSpecifier.isTypeOnly, + /*propertyName*/ + void 0, + importSpecifier.name + ) : importSpecifier)); } function tryGetNamedBindingElements(namedImport) { var _a; @@ -166151,11 +166557,11 @@ function addRegionOutliningSpans(sourceFile, out) { } var regionDelimiterRegExp = /^#(end)?region(?:\s+(.*))?(?:\r)?$/; function isRegionDelimiter(lineText) { - lineText = trimStringStart(lineText); + lineText = lineText.trimStart(); if (!startsWith(lineText, "//")) { return null; } - lineText = trimString(lineText.slice(2)); + lineText = lineText.slice(2).trim(); return regionDelimiterRegExp.exec(lineText); } function addOutliningForLeadingCommentsForPos(pos, sourceFile, cancellationToken, out) { @@ -166287,10 +166693,10 @@ function getOutliningSpanForNode(n, sourceFile) { return spanForParenthesizedExpression(n); case 275 /* NamedImports */: case 279 /* NamedExports */: - case 300 /* AssertClause */: - return spanForNamedImportsOrExportsOrAssertClause(n); + case 300 /* ImportAttributes */: + return spanForImportExportElements(n); } - function spanForNamedImportsOrExportsOrAssertClause(node) { + function spanForImportExportElements(node) { if (!node.elements.length) { return void 0; } @@ -167213,10 +167619,7 @@ function getSelectionChildren(node) { Debug.assertEqual(openBraceToken.kind, 19 /* OpenBraceToken */); Debug.assertEqual(closeBraceToken.kind, 20 /* CloseBraceToken */); const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 148 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 58 /* QuestionToken */); - const groupedWithBrackets = groupChildren( - groupedWithPlusMinusTokens, - ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */ - ); + const groupedWithBrackets = groupChildren(groupedWithPlusMinusTokens, ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */); return [ openBraceToken, // Pivot on `:` @@ -167406,7 +167809,7 @@ function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeCheck function getNormalizedSymbolModifiers(symbol) { if (symbol.declarations && symbol.declarations.length) { const [declaration, ...declarations] = symbol.declarations; - const excludeFlags = length(declarations) && isDeprecatedDeclaration(declaration) && some(declarations, (d) => !isDeprecatedDeclaration(d)) ? 8192 /* Deprecated */ : 0 /* None */; + const excludeFlags = length(declarations) && isDeprecatedDeclaration(declaration) && some(declarations, (d) => !isDeprecatedDeclaration(d)) ? 65536 /* Deprecated */ : 0 /* None */; const modifiers = getNodeModifiers(declaration, excludeFlags); if (modifiers) { return modifiers.split(","); @@ -167563,7 +167966,10 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar( + functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, + symbolKind + ); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -167667,10 +168073,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb displayParts.push(spacePart()); displayParts.push(operatorPart(64 /* EqualsToken */)); displayParts.push(spacePart()); - displayParts.push(displayPart( - getTextOfConstantValue(constantValue), - typeof constantValue === "number" ? 7 /* numericLiteral */ : 8 /* stringLiteral */ - )); + displayParts.push(displayPart(getTextOfConstantValue(constantValue), typeof constantValue === "number" ? 7 /* numericLiteral */ : 8 /* stringLiteral */)); } } } @@ -167682,7 +168085,7 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb const resolvedNode = resolvedSymbol.declarations[0]; const declarationName = getNameOfDeclaration(resolvedNode); if (declarationName && !hasAddedSymbolInfo) { - const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, 2 /* Ambient */); + const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, 128 /* Ambient */); const shouldUseAliasName = symbol.name !== "default" && !isExternalModuleDeclaration; const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKindWorker( typeChecker, @@ -167814,11 +168217,12 @@ function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symb if (documentation.length === 0 && isIdentifier(location) && symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration)) { const declaration = symbol.valueDeclaration; const parent2 = declaration.parent; - if (isIdentifier(declaration.name) && isObjectBindingPattern(parent2)) { - const name = getTextOfIdentifierOrLiteral(declaration.name); + const name = declaration.propertyName || declaration.name; + if (isIdentifier(name) && isObjectBindingPattern(parent2)) { + const propertyName = getTextOfIdentifierOrLiteral(name); const objectType = typeChecker.getTypeAtLocation(parent2); documentation = firstDefined(objectType.isUnion() ? objectType.types : [objectType], (t) => { - const prop = t.getProperty(name); + const prop = t.getProperty(propertyName); return prop ? prop.getDocumentationComment(typeChecker) : void 0; }) || emptyArray; } @@ -168354,12 +168758,14 @@ var ChangeTracker = class _ChangeTracker { } addJSDocTags(sourceFile, parent2, newTags) { const oldTags = flatMapToMutable(parent2.jsDoc, (j) => j.tags); - const unmergedNewTags = newTags.filter((newTag) => !oldTags.some((tag, i) => { - const merged = tryMergeJsdocTags(tag, newTag); - if (merged) - oldTags[i] = merged; - return !!merged; - })); + const unmergedNewTags = newTags.filter( + (newTag) => !oldTags.some((tag, i) => { + const merged = tryMergeJsdocTags(tag, newTag); + if (merged) + oldTags[i] = merged; + return !!merged; + }) + ); this.replaceJSDocComment(sourceFile, parent2, [...oldTags, ...unmergedNewTags]); } filterJSDocTags(sourceFile, parent2, predicate) { @@ -168825,7 +169231,7 @@ var changesToText; const sourceFile = createSourceFile( "any file name", nonFormattedText, - 99 /* ESNext */, + { languageVersion: 99 /* ESNext */, jsDocParsingMode: 1 /* ParseNone */ }, /*setParentNodes*/ true, scriptKind @@ -169746,12 +170152,12 @@ function getAllRules() { rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */), rule("IgnoreAfterLineComment", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */), rule("NotSpaceBeforeColon", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */), - rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 4 /* InsertSpace */), + rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName], 4 /* InsertSpace */), rule("NoSpaceBeforeQuestionMark", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */), // insert space after '?' only when it is used in conditional operator rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */), // in other cases there should be no space between '?' and next token - rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isNonOptionalPropertyContext], 16 /* DeleteSpace */), rule("NoSpaceBeforeDot", anyToken, [25 /* DotToken */, 29 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */), rule("NoSpaceAfterDot", [25 /* DotToken */, 29 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBetweenImportParenInImportType", 102 /* ImportKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), @@ -169817,6 +170223,8 @@ function getAllRules() { rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceAfterEqualInJsxAttribute", 64 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceBeforeJsxNamespaceColon", 80 /* Identifier */, 59 /* ColonToken */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */), + rule("NoSpaceAfterJsxNamespaceColon", 59 /* ColonToken */, 80 /* Identifier */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */), // TypeScript-specific rules // Use of module as a function call. e.g.: import m2 = module("m2"); rule("NoSpaceAfterModuleImport", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), @@ -169879,6 +170287,7 @@ function getAllRules() { isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext, isNotFunctionDeclContext, + /*To prevent an interference with the SpaceBeforeOpenParenInFuncDecl rule*/ isNonTypeAssertionContext ], 16 /* DeleteSpace */), // decorators @@ -170093,6 +170502,12 @@ function isTypeAnnotationContext(context) { const contextKind = context.contextNode.kind; return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } +function isOptionalPropertyContext(context) { + return isPropertyDeclaration(context.contextNode) && context.contextNode.questionToken; +} +function isNonOptionalPropertyContext(context) { + return !isOptionalPropertyContext(context); +} function isConditionalOperatorContext(context) { return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; } @@ -170246,11 +170661,17 @@ function isJsxExpressionContext(context) { return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 291 /* JsxAttribute */; + return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */; } function isJsxAttributeContext(context) { return context.contextNode.kind === 291 /* JsxAttribute */; } +function isNextTokenParentNotJsxNamespacedName(context) { + return context.nextTokenParent.kind !== 295 /* JsxNamespacedName */; +} +function isNextTokenParentJsxNamespacedName(context) { + return context.nextTokenParent.kind === 295 /* JsxNamespacedName */; +} function isJsxSelfClosingElementContext(context) { return context.contextNode.kind === 285 /* JsxSelfClosingElement */; } @@ -170376,7 +170797,7 @@ function isSemicolonInsertionContext(context) { return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); } function isNotPropertyAccessOnIntegerLiteral(context) { - return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().indexOf(".") !== -1; + return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().includes("."); } // src/services/formatting/rulesMap.ts @@ -171092,17 +171513,12 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt let indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { const commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation, container); - indentNextTokenOrTrivia = indentTriviaItems( - currentTokenInfo.leadingTrivia, + indentNextTokenOrTrivia = indentTriviaItems(currentTokenInfo.leadingTrivia, commentIndentation, indentNextTokenOrTrivia, (item) => insertIndentation( + item.pos, commentIndentation, - indentNextTokenOrTrivia, - (item) => insertIndentation( - item.pos, - commentIndentation, - /*lineAdded*/ - false - ) - ); + /*lineAdded*/ + false + )); } if (tokenIndentation !== -1 /* Unknown */ && indentNextTokenOrTrivia) { insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAction === 1 /* LineAdded */); @@ -171553,7 +171969,7 @@ var SmartIndenter; } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].includes(currentToken.parent.kind); const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -172055,10 +172471,8 @@ __export(ts_exports2, { CompletionInfoFlags: () => CompletionInfoFlags, CompletionTriggerKind: () => CompletionTriggerKind, Completions: () => ts_Completions_exports, - ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, ContainerFlags: () => ContainerFlags, ContextFlags: () => ContextFlags, - CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, Debug: () => Debug, DiagnosticCategory: () => DiagnosticCategory, Diagnostics: () => Diagnostics, @@ -172100,13 +172514,13 @@ __export(ts_exports2, { InternalEmitFlags: () => InternalEmitFlags, InternalSymbolName: () => InternalSymbolName, InvalidatedProjectKind: () => InvalidatedProjectKind, + JSDocParsingMode: () => JSDocParsingMode, JsDoc: () => ts_JsDoc_exports, JsTyping: () => ts_JsTyping_exports, JsxEmit: () => JsxEmit, JsxFlags: () => JsxFlags, JsxReferenceKind: () => JsxReferenceKind, LanguageServiceMode: () => LanguageServiceMode, - LanguageServiceShimHostAdapter: () => LanguageServiceShimHostAdapter, LanguageVariant: () => LanguageVariant, LexicalEnvironmentFlags: () => LexicalEnvironmentFlags, ListFormat: () => ListFormat, @@ -172143,6 +172557,7 @@ __export(ts_exports2, { PragmaKindFlags: () => PragmaKindFlags, PrivateIdentifierKind: () => PrivateIdentifierKind, ProcessLevel: () => ProcessLevel, + ProgramUpdateLevel: () => ProgramUpdateLevel, QuotePreference: () => QuotePreference, RelationComparisonResult: () => RelationComparisonResult, Rename: () => ts_Rename_exports, @@ -172180,7 +172595,6 @@ __export(ts_exports2, { TypeMapKind: () => TypeMapKind, TypePredicateKind: () => TypePredicateKind, TypeReferenceSerializationKind: () => TypeReferenceSerializationKind, - TypeScriptServicesFactory: () => TypeScriptServicesFactory, UnionReduction: () => UnionReduction, UpToDateStatusType: () => UpToDateStatusType, VarianceFlags: () => VarianceFlags, @@ -172427,6 +172841,7 @@ __export(ts_exports2, { createModuleNotFoundChain: () => createModuleNotFoundChain, createModuleResolutionCache: () => createModuleResolutionCache, createModuleResolutionLoader: () => createModuleResolutionLoader, + createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache, createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost, createMultiMap: () => createMultiMap, createNodeConverters: () => createNodeConverters, @@ -172855,6 +173270,7 @@ __export(ts_exports2, { getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode, getLeftmostAccessExpression: () => getLeftmostAccessExpression, getLeftmostExpression: () => getLeftmostExpression, + getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName, getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition, getLineInfo: () => getLineInfo, getLineOfLocalPosition: () => getLineOfLocalPosition, @@ -172986,13 +173402,11 @@ __export(ts_exports2, { getRenameLocation: () => getRenameLocation, getReplacementSpanForContextToken: () => getReplacementSpanForContextToken, getResolutionDiagnostic: () => getResolutionDiagnostic, - getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause, + getResolutionModeOverride: () => getResolutionModeOverride, getResolveJsonModule: () => getResolveJsonModule, getResolvePackageJsonExports: () => getResolvePackageJsonExports, getResolvePackageJsonImports: () => getResolvePackageJsonImports, getResolvedExternalModuleName: () => getResolvedExternalModuleName, - getResolvedModule: () => getResolvedModule, - getResolvedTypeReferenceDirective: () => getResolvedTypeReferenceDirective, getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement, getRestParameterElementType: () => getRestParameterElementType, getRightMostAssignedExpression: () => getRightMostAssignedExpression, @@ -173120,6 +173534,7 @@ __export(ts_exports2, { hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName, hasQuestionToken: () => hasQuestionToken, hasRecordedExternalHelpers: () => hasRecordedExternalHelpers, + hasResolutionModeOverride: () => hasResolutionModeOverride, hasRestParameter: () => hasRestParameter, hasScopeMarker: () => hasScopeMarker, hasStaticModifier: () => hasStaticModifier, @@ -173193,7 +173608,6 @@ __export(ts_exports2, { isAssertClause: () => isAssertClause, isAssertEntry: () => isAssertEntry, isAssertionExpression: () => isAssertionExpression, - isAssertionKey: () => isAssertionKey, isAssertsKeyword: () => isAssertsKeyword, isAssignmentDeclaration: () => isAssignmentDeclaration, isAssignmentExpression: () => isAssignmentExpression, @@ -173234,6 +173648,7 @@ __export(ts_exports2, { isCallExpression: () => isCallExpression, isCallExpressionTarget: () => isCallExpressionTarget, isCallLikeExpression: () => isCallLikeExpression, + isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression, isCallOrNewExpression: () => isCallOrNewExpression, isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget, isCallSignatureDeclaration: () => isCallSignatureDeclaration, @@ -173251,6 +173666,7 @@ __export(ts_exports2, { isClassDeclaration: () => isClassDeclaration, isClassElement: () => isClassElement, isClassExpression: () => isClassExpression, + isClassInstanceProperty: () => isClassInstanceProperty, isClassLike: () => isClassLike, isClassMemberModifier: () => isClassMemberModifier, isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, @@ -173329,6 +173745,7 @@ __export(ts_exports2, { isExclamationToken: () => isExclamationToken, isExcludedFile: () => isExcludedFile, isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport, + isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration, isExportAssignment: () => isExportAssignment, isExportDeclaration: () => isExportDeclaration, isExportModifier: () => isExportModifier, @@ -173400,6 +173817,9 @@ __export(ts_exports2, { isIfStatement: () => isIfStatement, isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching, isImplicitGlob: () => isImplicitGlob, + isImportAttribute: () => isImportAttribute, + isImportAttributeName: () => isImportAttributeName, + isImportAttributes: () => isImportAttributes, isImportCall: () => isImportCall, isImportClause: () => isImportClause, isImportDeclaration: () => isImportDeclaration, @@ -173413,6 +173833,7 @@ __export(ts_exports2, { isImportTypeNode: () => isImportTypeNode, isImportableFile: () => isImportableFile, isInComment: () => isInComment, + isInCompoundLikeAssignment: () => isInCompoundLikeAssignment, isInExpressionContext: () => isInExpressionContext, isInJSDoc: () => isInJSDoc, isInJSFile: () => isInJSFile, @@ -173436,6 +173857,7 @@ __export(ts_exports2, { isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute, isInsideNodeModules: () => isInsideNodeModules, isInsideTemplateLiteral: () => isInsideTemplateLiteral, + isInstanceOfExpression: () => isInstanceOfExpression, isInstantiatedModule: () => isInstantiatedModule, isInterfaceDeclaration: () => isInterfaceDeclaration, isInternalDeclaration: () => isInternalDeclaration, @@ -173590,7 +174012,6 @@ __export(ts_exports2, { isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, isNewExpression: () => isNewExpression, isNewExpressionTarget: () => isNewExpressionTarget, - isNightly: () => isNightly, isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral, isNode: () => isNode, isNodeArray: () => isNodeArray, @@ -173694,6 +174115,7 @@ __export(ts_exports2, { isReturnStatement: () => isReturnStatement, isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler, isRightSideOfAccessExpression: () => isRightSideOfAccessExpression, + isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression, isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess, isRightSideOfQualifiedName: () => isRightSideOfQualifiedName, isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess, @@ -173706,6 +174128,7 @@ __export(ts_exports2, { isSetAccessor: () => isSetAccessor, isSetAccessorDeclaration: () => isSetAccessorDeclaration, isShebangTrivia: () => isShebangTrivia, + isShiftOperatorOrHigher: () => isShiftOperatorOrHigher, isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, isShorthandPropertyAssignment: () => isShorthandPropertyAssignment, isSignedNumericLiteral: () => isSignedNumericLiteral, @@ -173944,8 +174367,6 @@ __export(ts_exports2, { outFile: () => outFile, packageIdToPackageName: () => packageIdToPackageName, packageIdToString: () => packageIdToString, - padLeft: () => padLeft, - padRight: () => padRight, paramHelper: () => paramHelper, parameterIsThisKeyword: () => parameterIsThisKeyword, parameterNamePart: () => parameterNamePart, @@ -174019,7 +174440,6 @@ __export(ts_exports2, { readJson: () => readJson, readJsonConfigFile: () => readJsonConfigFile, readJsonOrUndefined: () => readJsonOrUndefined, - realizeDiagnostics: () => realizeDiagnostics, reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange, reduceEachTrailingCommentRange: () => reduceEachTrailingCommentRange, reduceLeft: () => reduceLeft, @@ -174089,8 +174509,6 @@ __export(ts_exports2, { setParent: () => setParent, setParentRecursive: () => setParentRecursive, setPrivateIdentifier: () => setPrivateIdentifier, - setResolvedModule: () => setResolvedModule, - setResolvedTypeReferenceDirective: () => setResolvedTypeReferenceDirective, setSnippetElement: () => setSnippetElement, setSourceMapRange: () => setSourceMapRange, setStackTraceLimit: () => setStackTraceLimit, @@ -174152,7 +174570,6 @@ __export(ts_exports2, { startsWithDirectory: () => startsWithDirectory, startsWithUnderscore: () => startsWithUnderscore, startsWithUseStrict: () => startsWithUseStrict, - stringContains: () => stringContains, stringContainsAt: () => stringContainsAt, stringToToken: () => stringToToken, stripQuotes: () => stripQuotes, @@ -174239,9 +174656,6 @@ __export(ts_exports2, { transpile: () => transpile, transpileModule: () => transpileModule, transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions, - trimString: () => trimString, - trimStringEnd: () => trimStringEnd, - trimStringStart: () => trimStringStart, tryAddToSet: () => tryAddToSet, tryAndIgnoreErrors: () => tryAndIgnoreErrors, tryCast: () => tryCast, @@ -174321,7 +174735,6 @@ __export(ts_exports2, { writeCommentRange: () => writeCommentRange, writeFile: () => writeFile, writeFileEnsuringDirectories: () => writeFileEnsuringDirectories, - zipToModeAwareCache: () => zipToModeAwareCache, zipWith: () => zipWith }); @@ -174336,7 +174749,7 @@ function formatDeprecationMessage(name, error2, errorAfter, since, message) { deprecationMessage += `'${name}' `; deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated"; deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : "."; - deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : ""; + deprecationMessage += message ? ` ${formatStringFromArgs(message, [name])}` : ""; return deprecationMessage; } function createErrorDeprecation(name, errorAfter, since, message) { @@ -174475,9 +174888,12 @@ __export(ts_server_exports3, { AutoImportProviderProject: () => AutoImportProviderProject, AuxiliaryProject: () => AuxiliaryProject, CharRangeSection: () => CharRangeSection, + CloseFileWatcherEvent: () => CloseFileWatcherEvent, CommandNames: () => CommandNames, ConfigFileDiagEvent: () => ConfigFileDiagEvent, ConfiguredProject: () => ConfiguredProject2, + CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent, + CreateFileWatcherEvent: () => CreateFileWatcherEvent, Errors: () => Errors, EventBeginInstallTypes: () => EventBeginInstallTypes, EventEndInstallTypes: () => EventEndInstallTypes, @@ -174533,6 +174949,7 @@ __export(ts_server_exports3, { hasArgument: () => hasArgument, hasNoTypeScriptSource: () => hasNoTypeScriptSource, indent: () => indent2, + isBackgroundProject: () => isBackgroundProject, isConfigFile: () => isConfigFile, isConfiguredProject: () => isConfiguredProject, isDynamicFileName: () => isDynamicFileName, @@ -174650,7 +175067,7 @@ var TypingsInstaller = class { } install(req) { if (this.log.isEnabled()) { - this.log.writeLine(`Got install request ${JSON.stringify(req)}`); + this.log.writeLine(`Got install request${stringifyIndented(req)}`); } if (req.cachePath) { if (this.log.isEnabled()) { @@ -174673,9 +175090,6 @@ var TypingsInstaller = class { this.typesRegistry, req.compilerOptions ); - if (this.log.isEnabled()) { - this.log.writeLine(`Finished typings discovery: ${JSON.stringify(discoverTypingsResult)}`); - } this.watchFiles(req.projectName, discoverTypingsResult.filesToWatch); if (discoverTypingsResult.newTypingNames.length) { this.installTypings(req, req.cachePath || this.globalCachePath, discoverTypingsResult.cachedTypingPaths, discoverTypingsResult.newTypingNames); @@ -174717,8 +175131,8 @@ var TypingsInstaller = class { const npmConfig = JSON.parse(this.installTypingHost.readFile(packageJson)); const npmLock = JSON.parse(this.installTypingHost.readFile(packageLockJson)); if (this.log.isEnabled()) { - this.log.writeLine(`Loaded content of '${packageJson}': ${JSON.stringify(npmConfig)}`); - this.log.writeLine(`Loaded content of '${packageLockJson}'`); + this.log.writeLine(`Loaded content of '${packageJson}':${stringifyIndented(npmConfig)}`); + this.log.writeLine(`Loaded content of '${packageLockJson}':${stringifyIndented(npmLock)}`); } if (npmConfig.devDependencies && npmLock.dependencies) { for (const key in npmConfig.devDependencies) { @@ -175095,13 +175509,6 @@ function removeSorted(array, remove, compare) { array.splice(removeIndex, 1); } } -var indentStr = "\n "; -function indent2(str) { - return indentStr + str.replace(/\n/g, indentStr); -} -function stringifyIndented(json) { - return indentStr + JSON.stringify(json); -} // src/server/_namespaces/ts.server.protocol.ts var ts_server_protocol_exports = {}; @@ -175233,6 +175640,7 @@ var CommandTypes = /* @__PURE__ */ ((CommandTypes2) => { CommandTypes2["ProvideCallHierarchyIncomingCalls"] = "provideCallHierarchyIncomingCalls"; CommandTypes2["ProvideCallHierarchyOutgoingCalls"] = "provideCallHierarchyOutgoingCalls"; CommandTypes2["ProvideInlayHints"] = "provideInlayHints"; + CommandTypes2["WatchChange"] = "watchChange"; return CommandTypes2; })(CommandTypes || {}); var OrganizeImportsMode2 = /* @__PURE__ */ ((OrganizeImportsMode3) => { @@ -175560,7 +175968,7 @@ var TextStorage = class { } }; function isDynamicFileName(fileName) { - return fileName[0] === "^" || (stringContains(fileName, "walkThroughSnippet:/") || stringContains(fileName, "untitled:/")) && getBaseFileName(fileName)[0] === "^" || stringContains(fileName, ":^") && !stringContains(fileName, directorySeparator); + return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator); } var ScriptInfo = class { constructor(host, fileName, scriptKind, hasMixedContent, path, initialVersion) { @@ -175737,7 +176145,9 @@ var ScriptInfo = class { firstInferredProject = project; } } - return ensurePrimaryProjectKind(defaultConfiguredProject || firstNonSourceOfProjectReferenceRedirect || firstConfiguredProject || firstExternalProject || firstInferredProject); + return ensurePrimaryProjectKind( + defaultConfiguredProject || firstNonSourceOfProjectReferenceRedirect || firstConfiguredProject || firstExternalProject || firstInferredProject + ); } } registerFileUpdate() { @@ -175797,7 +176207,7 @@ var ScriptInfo = class { isContainedByBackgroundProject() { return some( this.containingProjects, - (p) => p.projectKind === 3 /* AutoImportProvider */ || p.projectKind === 4 /* Auxiliary */ + isBackgroundProject ); } /** @@ -175828,7 +176238,7 @@ var ScriptInfo = class { } }; function ensurePrimaryProjectKind(project) { - if (!project || project.projectKind === 3 /* AutoImportProvider */ || project.projectKind === 4 /* Auxiliary */) { + if (!project || isBackgroundProject(project)) { return Errors.ThrowNoProject(); } return project; @@ -176069,6 +176479,7 @@ var Project3 = class _Project { this.directoryStructureHost = directoryStructureHost; this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory); this.getCanonicalFileName = this.projectService.toCanonicalFileName; + this.jsDocParsingMode = this.projectService.jsDocParsingMode; this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds); if (!this.compilerOptions) { this.compilerOptions = getDefaultCompilerOptions2(); @@ -176113,9 +176524,10 @@ var Project3 = class _Project { this.disableLanguageService(lastFileExceededProgramSize); } this.markAsDirty(); - if (projectKind !== 3 /* AutoImportProvider */) { + if (!isBackgroundProject(this)) { this.projectService.pendingEnsureProjectForOpenFiles = true; } + this.projectService.onProjectCreation(this); } /** @internal */ getResolvedProjectReferenceToRedirect(_fileName) { @@ -176193,7 +176605,8 @@ var Project3 = class _Project { } if (this.program && !this.symlinks.hasProcessedResolutions()) { this.symlinks.setSymlinksFromResolutions( - this.program.getSourceFiles(), + this.program.forEachResolvedModule, + this.program.forEachResolvedTypeReferenceDirective, this.program.getAutomaticTypeDirectiveResolutions() ); } @@ -176241,7 +176654,7 @@ var Project3 = class _Project { return scriptInfo; } getScriptKind(fileName) { - const info = this.getOrCreateScriptInfoAndAttachToProject(fileName); + const info = this.projectService.getScriptInfoForPath(this.toPath(fileName)); return info && info.scriptKind; } getScriptVersion(filename) { @@ -176284,6 +176697,7 @@ var Project3 = class _Project { resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { return this.resolutionCache.resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames); } + /** @internal */ getModuleResolutionCache() { return this.resolutionCache.getModuleResolutionCache(); } @@ -176549,12 +176963,12 @@ var Project3 = class _Project { } return { ...newTypeAcquisition, include: this.removeExistingTypings(newTypeAcquisition.include) }; } - getExternalFiles() { + getExternalFiles(updateLevel) { return sort(flatMap(this.plugins, (plugin) => { if (typeof plugin.module.getExternalFiles !== "function") return; try { - return plugin.module.getExternalFiles(this); + return plugin.module.getExternalFiles(this, updateLevel || 0 /* Update */); } catch (e) { this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`); if (e.stack) { @@ -176950,7 +177364,7 @@ var Project3 = class _Project { } removeExistingTypings(include) { const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this.directoryStructureHost); - return include.filter((i) => existing.indexOf(i) < 0); + return include.filter((i) => !existing.includes(i)); } updateGraphWorker() { var _a, _b; @@ -176976,12 +177390,23 @@ var Project3 = class _Project { for (const f of oldProgram.getSourceFiles()) { const newFile = this.program.getSourceFileByPath(f.resolvedPath); if (!newFile || f.resolvedPath === f.path && newFile.resolvedPath !== f.path) { - this.detachScriptInfoFromProject(f.fileName, !!this.program.getSourceFileByPath(f.path)); + this.detachScriptInfoFromProject( + f.fileName, + !!this.program.getSourceFileByPath(f.path), + /*syncDirWatcherRemove*/ + true + ); } } oldProgram.forEachResolvedProjectReference((resolvedProjectReference) => { if (!this.program.getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) { - this.detachScriptInfoFromProject(resolvedProjectReference.sourceFile.fileName); + this.detachScriptInfoFromProject( + resolvedProjectReference.sourceFile.fileName, + /*noRemoveResolution*/ + void 0, + /*syncDirWatcherRemove*/ + true + ); } }); } @@ -177021,6 +177446,7 @@ var Project3 = class _Project { this.resolutionCache.updateTypeRootsWatch(); } } + this.projectService.verifyProgram(this); if (this.exportMapCache && !this.exportMapCache.isEmpty()) { this.exportMapCache.releaseSymbols(); if (this.hasAddedorRemovedFiles || oldProgram && !this.program.structureIsReused) { @@ -177093,12 +177519,12 @@ var Project3 = class _Project { sendPerformanceEvent(kind, durationMs) { this.projectService.sendPerformanceEvent(kind, durationMs); } - detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution) { + detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution, syncDirWatcherRemove) { const scriptInfoToDetach = this.projectService.getScriptInfo(uncheckedFileName); if (scriptInfoToDetach) { scriptInfoToDetach.detachFromProject(this); if (!noRemoveResolution) { - this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path); + this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path, syncDirWatcherRemove); } } } @@ -177277,6 +177703,7 @@ var Project3 = class _Project { } /** @internal */ getChangesSinceVersion(lastKnownVersion, includeProjectReferenceRedirectInfo) { + var _a, _b; const includeProjectReferenceRedirectInfoIfRequested = includeProjectReferenceRedirectInfo ? (files) => arrayFrom(files.entries(), ([fileName, isSourceOfProjectReferenceRedirect]) => ({ fileName, isSourceOfProjectReferenceRedirect @@ -177299,10 +177726,10 @@ var Project3 = class _Project { return { info, projectErrors: this.getGlobalProjectErrors() }; } const lastReportedFileNames = this.lastReportedFileNames; - const externalFiles = this.getExternalFiles().map((f) => ({ + const externalFiles = ((_a = this.externalFiles) == null ? void 0 : _a.map((f) => ({ fileName: toNormalizedPath(f), isSourceOfProjectReferenceRedirect: false - })); + }))) || emptyArray2; const currentFiles = arrayToMap( this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo).concat(externalFiles), (info2) => info2.fileName, @@ -177344,10 +177771,10 @@ var Project3 = class _Project { }; } else { const projectFileNames = this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo); - const externalFiles = this.getExternalFiles().map((f) => ({ + const externalFiles = ((_b = this.externalFiles) == null ? void 0 : _b.map((f) => ({ fileName: toNormalizedPath(f), isSourceOfProjectReferenceRedirect: false - })); + }))) || emptyArray2; const allFiles = projectFileNames.concat(externalFiles); this.lastReportedFileNames = arrayToMap( allFiles, @@ -177549,32 +177976,15 @@ var Project3 = class _Project { return this.projectService.getIncompleteCompletionsCache(); } /** @internal */ - getNoDtsResolutionProject(rootFileNames) { + getNoDtsResolutionProject(rootFile) { Debug.assert(this.projectService.serverMode === 0 /* Semantic */); if (!this.noDtsResolutionProject) { this.noDtsResolutionProject = new AuxiliaryProject(this.projectService, this.documentRegistry, this.getCompilerOptionsForNoDtsResolutionProject(), this.currentDirectory); } - enumerateInsertsAndDeletes( - rootFileNames.map(toNormalizedPath), - this.noDtsResolutionProject.getRootFiles(), - getStringComparer(!this.useCaseSensitiveFileNames()), - (pathToAdd) => { - const info = this.projectService.getOrCreateScriptInfoNotOpenedByClient( - pathToAdd, - this.currentDirectory, - this.noDtsResolutionProject.directoryStructureHost - ); - if (info) { - this.noDtsResolutionProject.addRoot(info, pathToAdd); - } - }, - (pathToRemove) => { - const info = this.noDtsResolutionProject.getScriptInfo(pathToRemove); - if (info) { - this.noDtsResolutionProject.removeRoot(info); - } - } - ); + if (this.noDtsResolutionProject.rootFile !== rootFile) { + this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this.noDtsResolutionProject, [rootFile]); + this.noDtsResolutionProject.rootFile = rootFile; + } return this.noDtsResolutionProject; } /** @internal */ @@ -177598,20 +178008,23 @@ function getUnresolvedImports(program, cachedUnresolvedImportsPerFile) { const sourceFiles = program.getSourceFiles(); (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getUnresolvedImports", { count: sourceFiles.length }); const ambientModules = program.getTypeChecker().getAmbientModules().map((mod) => stripQuotes(mod.getName())); - const result = sortAndDeduplicate(flatMap(sourceFiles, (sourceFile) => extractUnresolvedImportsFromSourceFile(sourceFile, ambientModules, cachedUnresolvedImportsPerFile))); + const result = sortAndDeduplicate(flatMap(sourceFiles, (sourceFile) => extractUnresolvedImportsFromSourceFile( + program, + sourceFile, + ambientModules, + cachedUnresolvedImportsPerFile + ))); (_b = tracing) == null ? void 0 : _b.pop(); return result; } -function extractUnresolvedImportsFromSourceFile(file, ambientModules, cachedUnresolvedImportsPerFile) { +function extractUnresolvedImportsFromSourceFile(program, file, ambientModules, cachedUnresolvedImportsPerFile) { return getOrUpdate(cachedUnresolvedImportsPerFile, file.path, () => { - if (!file.resolvedModules) - return emptyArray2; let unresolvedImports; - file.resolvedModules.forEach(({ resolvedModule }, name) => { + program.forEachResolvedModule(({ resolvedModule }, name) => { if ((!resolvedModule || !resolutionExtensionIsTSOrJson(resolvedModule.extension)) && !isExternalModuleNameRelative(name) && !ambientModules.some((m) => m === name)) { unresolvedImports = append(unresolvedImports, parsePackageName(name).packageName); } - }); + }, file); return unresolvedImports || emptyArray2; }); } @@ -177854,11 +178267,12 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec ); if (entrypoints) { const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory); - const isSymlink = real && real !== packageJson.packageDirectory; + const realPath2 = real ? hostProject.toPath(real) : void 0; + const isSymlink = realPath2 && realPath2 !== hostProject.toPath(packageJson.packageDirectory); if (isSymlink) { symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, { - real, - realPath: hostProject.toPath(real) + real: ensureTrailingDirectorySeparator(real), + realPath: ensureTrailingDirectorySeparator(realPath2) }); } return mapDefined(entrypoints, (entrypoint) => { @@ -177902,7 +178316,7 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec this.getCompilationSettings() ); } - this.projectService.setFileNamesOfAutoImportProviderProject(this, rootFileNames); + this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this, rootFileNames); this.rootFileNames = rootFileNames; const oldProgram = this.getCurrentProgram(); const hasSameSetOfFiles = super.updateGraph(); @@ -177947,9 +178361,6 @@ var _AutoImportProviderProject = class _AutoImportProviderProject extends Projec includePackageJsonAutoImports() { return 0 /* Off */; } - getTypeAcquisition() { - return { enable: false }; - } /** @internal */ getSymlinkCache() { return this.hostProject.getSymlinkCache(); @@ -178047,18 +178458,18 @@ var ConfiguredProject2 = class extends Project3 { updateGraph() { const isInitialLoad = this.isInitialLoadPending(); this.isInitialLoadPending = returnFalse; - const reloadLevel = this.pendingReload; - this.pendingReload = 0 /* None */; + const updateLevel = this.pendingUpdateLevel; + this.pendingUpdateLevel = 0 /* Update */; let result; - switch (reloadLevel) { - case 1 /* Partial */: + switch (updateLevel) { + case 1 /* RootNamesAndUpdate */: this.openFileWatchTriggered.clear(); result = this.projectService.reloadFileNamesOfConfiguredProject(this); break; case 2 /* Full */: this.openFileWatchTriggered.clear(); - const reason = Debug.checkDefined(this.pendingReloadReason); - this.pendingReloadReason = void 0; + const reason = Debug.checkDefined(this.pendingUpdateReason); + this.pendingUpdateReason = void 0; this.projectService.reloadConfiguredProject( this, reason, @@ -178258,6 +178669,9 @@ function isConfiguredProject(project) { function isExternalProject(project) { return project.projectKind === 2 /* External */; } +function isBackgroundProject(project) { + return project.projectKind === 3 /* AutoImportProvider */ || project.projectKind === 4 /* Auxiliary */; +} // src/server/editorServices.ts var maxProgramSizeForNonTsFiles = 20 * 1024 * 1024; @@ -178270,6 +178684,9 @@ var ConfigFileDiagEvent = "configFileDiag"; var ProjectLanguageServiceStateEvent = "projectLanguageServiceState"; var ProjectInfoTelemetryEvent = "projectInfo"; var OpenFileInfoTelemetryEvent = "openFileInfo"; +var CreateFileWatcherEvent = "createFileWatcher"; +var CreateDirectoryWatcherEvent = "createDirectoryWatcher"; +var CloseFileWatcherEvent = "closeFileWatcher"; var ensureProjectForOpenFileSchedule = "*ensureProjectForOpenFiles*"; function prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) { const map2 = /* @__PURE__ */ new Map(); @@ -178533,6 +178950,87 @@ function createProjectNameFactoryWithCounter(nameFactory) { let nextId = 1; return () => nameFactory(nextId++); } +function getHostWatcherMap() { + return { idToCallbacks: /* @__PURE__ */ new Map(), pathToId: /* @__PURE__ */ new Map() }; +} +function createWatchFactoryHostUsingWatchEvents(service, canUseWatchEvents) { + if (!canUseWatchEvents || !service.eventHandler || !service.session) + return void 0; + const watchedFiles = getHostWatcherMap(); + const watchedDirectories = getHostWatcherMap(); + const watchedDirectoriesRecursive = getHostWatcherMap(); + let ids = 1; + service.session.addProtocolHandler("watchChange" /* WatchChange */, (req) => { + onWatchChange(req.arguments); + return { responseRequired: false }; + }); + return { + watchFile: watchFile2, + watchDirectory, + getCurrentDirectory: () => service.host.getCurrentDirectory(), + useCaseSensitiveFileNames: service.host.useCaseSensitiveFileNames + }; + function watchFile2(path, callback) { + return getOrCreateFileWatcher( + watchedFiles, + path, + callback, + (id) => ({ eventName: CreateFileWatcherEvent, data: { id, path } }) + ); + } + function watchDirectory(path, callback, recursive) { + return getOrCreateFileWatcher( + recursive ? watchedDirectoriesRecursive : watchedDirectories, + path, + callback, + (id) => ({ eventName: CreateDirectoryWatcherEvent, data: { id, path, recursive: !!recursive } }) + ); + } + function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path, callback, event) { + const key = service.toPath(path); + let id = pathToId.get(key); + if (!id) + pathToId.set(key, id = ids++); + let callbacks = idToCallbacks.get(id); + if (!callbacks) { + idToCallbacks.set(id, callbacks = /* @__PURE__ */ new Set()); + service.eventHandler(event(id)); + } + callbacks.add(callback); + return { + close() { + const callbacks2 = idToCallbacks.get(id); + if (!(callbacks2 == null ? void 0 : callbacks2.delete(callback))) + return; + if (callbacks2.size) + return; + idToCallbacks.delete(id); + pathToId.delete(key); + service.eventHandler({ eventName: CloseFileWatcherEvent, data: { id } }); + } + }; + } + function onWatchChange({ id, path, eventType }) { + onFileWatcherCallback(id, path, eventType); + onDirectoryWatcherCallback(watchedDirectories, id, path, eventType); + onDirectoryWatcherCallback(watchedDirectoriesRecursive, id, path, eventType); + } + function onFileWatcherCallback(id, eventPath, eventType) { + var _a; + (_a = watchedFiles.idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => { + const eventKind = eventType === "create" ? 0 /* Created */ : eventType === "delete" ? 2 /* Deleted */ : 1 /* Changed */; + callback(eventPath, eventKind); + }); + } + function onDirectoryWatcherCallback({ idToCallbacks }, id, eventPath, eventType) { + var _a; + if (eventType === "update") + return; + (_a = idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => { + callback(eventPath); + }); + } +} var _ProjectService = class _ProjectService { constructor(opts) { /** @@ -178596,7 +179094,6 @@ var _ProjectService = class _ProjectService { * - Or it is present if we have configured project open with config file at that location * In this case the exists property is always true * - * * @internal */ this.configFileExistenceInfoCache = /* @__PURE__ */ new Map(); @@ -178613,6 +179110,10 @@ var _ProjectService = class _ProjectService { this.extendedConfigCache = /* @__PURE__ */ new Map(); /** @internal */ this.verifyDocumentRegistry = noop; + /** @internal */ + this.verifyProgram = noop; + /** @internal */ + this.onProjectCreation = noop; var _a; this.host = opts.host; this.logger = opts.logger; @@ -178628,6 +179129,7 @@ var _ProjectService = class _ProjectService { this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads; this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation; this.session = opts.session; + this.jsDocParsingMode = opts.jsDocParsingMode; if (opts.serverMode !== void 0) { this.serverMode = opts.serverMode; } else { @@ -178653,14 +179155,19 @@ var _ProjectService = class _ProjectService { hostInfo: "Unknown host", extraFileExtensions: [] }; - this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this); + this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this.jsDocParsingMode, this); const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */; const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop; this.packageJsonCache = createPackageJsonCache(this); this.watchFactory = this.serverMode !== 0 /* Semantic */ ? { watchFile: returnNoopFileWatcher, watchDirectory: returnNoopFileWatcher - } : getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); + } : getWatchFactory( + createWatchFactoryHostUsingWatchEvents(this, opts.canUseWatchEvents) || this.host, + watchLogLevel, + log, + getDetailWatchInfo + ); (_a = opts.incrementalVerifier) == null ? void 0 : _a.call(opts, this); } toPath(fileName) { @@ -178774,20 +179281,20 @@ var _ProjectService = class _ProjectService { } delayUpdateProjectGraph(project) { project.markAsDirty(); - if (project.projectKind !== 3 /* AutoImportProvider */ && project.projectKind !== 4 /* Auxiliary */) { - const projectName = project.getProjectName(); - this.pendingProjectUpdates.set(projectName, project); - this.throttledOperations.schedule( - projectName, - /*delay*/ - 250, - () => { - if (this.pendingProjectUpdates.delete(projectName)) { - updateProjectIfDirty(project); - } + if (isBackgroundProject(project)) + return; + const projectName = project.getProjectName(); + this.pendingProjectUpdates.set(projectName, project); + this.throttledOperations.schedule( + projectName, + /*delay*/ + 250, + () => { + if (this.pendingProjectUpdates.delete(projectName)) { + updateProjectIfDirty(project); } - ); - } + } + ); } /** @internal */ hasPendingProjectUpdate(project) { @@ -179059,31 +179566,32 @@ var _ProjectService = class _ProjectService { program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames, useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames, writeLog: (s) => this.logger.info(s), - toPath: (s) => this.toPath(s) + toPath: (s) => this.toPath(s), + getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0 })) return; - if (config.reloadLevel !== 2 /* Full */) - config.reloadLevel = 1 /* Partial */; + if (config.updateLevel !== 2 /* Full */) + config.updateLevel = 1 /* RootNamesAndUpdate */; config.projects.forEach((watchWildcardDirectories, projectCanonicalPath) => { if (!watchWildcardDirectories) return; const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath); if (!project) return; - const reloadLevel = configuredProjectForConfig === project ? 1 /* Partial */ : 0 /* None */; - if (project.pendingReload !== void 0 && project.pendingReload > reloadLevel) + const updateLevel = configuredProjectForConfig === project ? 1 /* RootNamesAndUpdate */ : 0 /* Update */; + if (project.pendingUpdateLevel !== void 0 && project.pendingUpdateLevel > updateLevel) return; if (this.openFiles.has(fileOrDirectoryPath)) { const info = Debug.checkDefined(this.getScriptInfoForPath(fileOrDirectoryPath)); if (info.isAttached(project)) { - const loadLevelToSet = Math.max(reloadLevel, project.openFileWatchTriggered.get(fileOrDirectoryPath) || 0 /* None */); + const loadLevelToSet = Math.max(updateLevel, project.openFileWatchTriggered.get(fileOrDirectoryPath) || 0 /* Update */); project.openFileWatchTriggered.set(fileOrDirectoryPath, loadLevelToSet); } else { - project.pendingReload = reloadLevel; + project.pendingUpdateLevel = updateLevel; this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); } } else { - project.pendingReload = reloadLevel; + project.pendingUpdateLevel = updateLevel; this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); } }); @@ -179095,12 +179603,12 @@ var _ProjectService = class _ProjectService { ); } /** @internal */ - delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, reloadReason) { + delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, loadReason) { const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); if (!(configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config)) return false; let scheduledAnyProjectUpdate = false; - configFileExistenceInfo.config.reloadLevel = 2 /* Full */; + configFileExistenceInfo.config.updateLevel = 2 /* Full */; configFileExistenceInfo.config.projects.forEach((_watchWildcardDirectories, projectCanonicalPath) => { const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath); if (!project) @@ -179109,8 +179617,8 @@ var _ProjectService = class _ProjectService { if (projectCanonicalPath === canonicalConfigFilePath) { if (project.isInitialLoadPending()) return; - project.pendingReload = 2 /* Full */; - project.pendingReloadReason = reloadReason; + project.pendingUpdateLevel = 2 /* Full */; + project.pendingUpdateReason = loadReason; this.delayUpdateProjectGraph(project); } else { project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(this.toPath(canonicalConfigFilePath)); @@ -179159,25 +179667,27 @@ var _ProjectService = class _ProjectService { ); project.close(); if (Debug.shouldAssert(1 /* Normal */)) { - this.filenameToScriptInfo.forEach((info) => Debug.assert( - !info.isAttached(project), - "Found script Info still attached to project", - () => `${project.projectName}: ScriptInfos still attached: ${JSON.stringify( - arrayFrom( - mapDefinedIterator( - this.filenameToScriptInfo.values(), - (info2) => info2.isAttached(project) ? { - fileName: info2.fileName, - projects: info2.containingProjects.map((p) => p.projectName), - hasMixedContent: info2.hasMixedContent - } : void 0 - ) - ), - /*replacer*/ - void 0, - " " - )}` - )); + this.filenameToScriptInfo.forEach( + (info) => Debug.assert( + !info.isAttached(project), + "Found script Info still attached to project", + () => `${project.projectName}: ScriptInfos still attached: ${JSON.stringify( + arrayFrom( + mapDefinedIterator( + this.filenameToScriptInfo.values(), + (info2) => info2.isAttached(project) ? { + fileName: info2.fileName, + projects: info2.containingProjects.map((p) => p.projectName), + hasMixedContent: info2.hasMixedContent + } : void 0 + ) + ), + /*replacer*/ + void 0, + " " + )}` + ) + ); } this.pendingProjectUpdates.delete(project.getProjectName()); switch (project.projectKind) { @@ -179257,11 +179767,11 @@ var _ProjectService = class _ProjectService { if (info.hasMixedContent) { info.registerFileUpdate(); } - const reloadLevel = p.openFileWatchTriggered.get(info.path); - if (reloadLevel !== void 0) { + const updateLevel = p.openFileWatchTriggered.get(info.path); + if (updateLevel !== void 0) { p.openFileWatchTriggered.delete(info.path); - if (p.pendingReload !== void 0 && p.pendingReload < reloadLevel) { - p.pendingReload = reloadLevel; + if (p.pendingUpdateLevel !== void 0 && p.pendingUpdateLevel < updateLevel) { + p.pendingUpdateLevel = updateLevel; p.markFileAsDirty(info.path); } } @@ -179641,6 +180151,7 @@ var _ProjectService = class _ProjectService { addFilesToNonInferredProject(project, files, propertyReader, typeAcquisition) { this.updateNonInferredProjectFiles(project, files, propertyReader); project.setTypeAcquisition(typeAcquisition); + project.markAsDirty(); } /** @internal */ createConfiguredProject(configFileName) { @@ -179658,7 +180169,7 @@ var _ProjectService = class _ProjectService { configFileExistenceInfo.config = { cachedDirectoryStructureHost: createCachedDirectoryStructureHost(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames), projects: /* @__PURE__ */ new Map(), - reloadLevel: 2 /* Full */ + updateLevel: 2 /* Full */ }; } const project = new ConfiguredProject2( @@ -179675,8 +180186,8 @@ var _ProjectService = class _ProjectService { /** @internal */ createConfiguredProjectWithDelayLoad(configFileName, reason) { const project = this.createConfiguredProject(configFileName); - project.pendingReload = 2 /* Full */; - project.pendingReloadReason = reason; + project.pendingUpdateLevel = 2 /* Full */; + project.pendingUpdateReason = reason; return project; } /** @internal */ @@ -179732,7 +180243,7 @@ var _ProjectService = class _ProjectService { this.watchWildcards(configFilename, configFileExistenceInfo, project); } project.enablePluginsWithOptions(compilerOptions); - const filesToAdd = parsedCommandLine.fileNames.concat(project.getExternalFiles()); + const filesToAdd = parsedCommandLine.fileNames.concat(project.getExternalFiles(2 /* Full */)); this.updateRootAndOptionsOfNonInferredProject(project, filesToAdd, fileNamePropertyReader, compilerOptions, parsedCommandLine.typeAcquisition, parsedCommandLine.compileOnSave, parsedCommandLine.watchOptions); (_b = tracing) == null ? void 0 : _b.pop(); } @@ -179740,9 +180251,9 @@ var _ProjectService = class _ProjectService { ensureParsedConfigUptoDate(configFilename, canonicalConfigFilePath, configFileExistenceInfo, forProject) { var _a, _b, _c; if (configFileExistenceInfo.config) { - if (!configFileExistenceInfo.config.reloadLevel) + if (!configFileExistenceInfo.config.updateLevel) return configFileExistenceInfo; - if (configFileExistenceInfo.config.reloadLevel === 1 /* Partial */) { + if (configFileExistenceInfo.config.updateLevel === 1 /* RootNamesAndUpdate */) { this.reloadFileNamesOfParsedConfig(configFilename, configFileExistenceInfo.config); return configFileExistenceInfo; } @@ -179785,7 +180296,7 @@ var _ProjectService = class _ProjectService { } else { configFileExistenceInfo.config.parsedCommandLine = parsedCommandLine; configFileExistenceInfo.config.watchedDirectoriesStale = true; - configFileExistenceInfo.config.reloadLevel = void 0; + configFileExistenceInfo.config.updateLevel = void 0; } if (!oldCommandLine && !isJsonEqual( // Old options @@ -179926,7 +180437,6 @@ var _ProjectService = class _ProjectService { } }); } - project.markAsDirty(); } updateRootAndOptionsOfNonInferredProject(project, newUncheckedFiles, propertyReader, newOptions, newTypeAcquisition, compileOnSave, watchOptions) { project.setCompilerOptions(newOptions); @@ -179944,14 +180454,15 @@ var _ProjectService = class _ProjectService { reloadFileNamesOfConfiguredProject(project) { const fileNames = this.reloadFileNamesOfParsedConfig(project.getConfigFilePath(), this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath).config); project.updateErrorOnNoInputFiles(fileNames); - this.updateNonInferredProjectFiles(project, fileNames.concat(project.getExternalFiles()), fileNamePropertyReader); + this.updateNonInferredProjectFiles(project, fileNames.concat(project.getExternalFiles(1 /* RootNamesAndUpdate */)), fileNamePropertyReader); + project.markAsDirty(); return project.updateGraph(); } /** @internal */ reloadFileNamesOfParsedConfig(configFileName, config) { - if (config.reloadLevel === void 0) + if (config.updateLevel === void 0) return config.parsedCommandLine.fileNames; - Debug.assert(config.reloadLevel === 1 /* Partial */); + Debug.assert(config.updateLevel === 1 /* RootNamesAndUpdate */); const configFileSpecs = config.parsedCommandLine.options.configFile.configFileSpecs; const fileNames = getFileNamesFromConfigSpecs( configFileSpecs, @@ -179964,7 +180475,7 @@ var _ProjectService = class _ProjectService { return fileNames; } /** @internal */ - setFileNamesOfAutoImportProviderProject(project, fileNames) { + setFileNamesOfAutpImportProviderOrAuxillaryProject(project, fileNames) { this.updateNonInferredProjectFiles(project, fileNames, fileNamePropertyReader); } /** @@ -179999,10 +180510,12 @@ var _ProjectService = class _ProjectService { } const diagnostics = project.getLanguageService().getCompilerOptionsDiagnostics(); diagnostics.push(...project.getAllProjectErrors()); - this.eventHandler({ - eventName: ConfigFileDiagEvent, - data: { configFileName: project.getConfigFilePath(), diagnostics, triggerFile } - }); + this.eventHandler( + { + eventName: ConfigFileDiagEvent, + data: { configFileName: project.getConfigFilePath(), diagnostics, triggerFile } + } + ); } getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) { if (!this.useInferredProjectPerProjectRoot || // Its a dynamic info opened without project root @@ -180491,7 +181004,7 @@ Dynamic files must always be opened with service's current directory or service this.hostConfiguration.preferences = { ...this.hostConfiguration.preferences, ...args.preferences }; if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) { this.configuredProjects.forEach((project) => { - if (project.hasExternalProjectRef() && project.pendingReload === 2 /* Full */ && !this.pendingProjectUpdates.has(project.getProjectName())) { + if (project.hasExternalProjectRef() && project.pendingUpdateLevel === 2 /* Full */ && !this.pendingProjectUpdates.has(project.getProjectName())) { project.updateGraph(); } }); @@ -180546,7 +181059,7 @@ Dynamic files must always be opened with service's current directory or service this.pendingEnsureProjectForOpenFiles = false; this.configFileExistenceInfoCache.forEach((info) => { if (info.config) - info.config.reloadLevel = 2 /* Full */; + info.config.updateLevel = 2 /* Full */; }); this.reloadConfiguredProjectForFiles( this.openFiles, @@ -180598,8 +181111,8 @@ Dynamic files must always be opened with service's current directory or service if (!updatedProjects.has(project.canonicalConfigFilePath)) { updatedProjects.set(project.canonicalConfigFilePath, true); if (delayReload) { - project.pendingReload = 2 /* Full */; - project.pendingReloadReason = reason; + project.pendingUpdateLevel = 2 /* Full */; + project.pendingUpdateReason = reason; if (clearSemanticCache) this.clearSemanticCache(project); this.delayUpdateProjectGraph(project); @@ -181140,7 +181653,7 @@ Dynamic files must always be opened with service's current directory or service this.logger.info(`Excluding files based on rule ${name} matching file '${root}'`); if (rule2.types) { for (const type of rule2.types) { - if (typeAcqInclude.indexOf(type) < 0) { + if (!typeAcqInclude.includes(type)) { typeAcqInclude.push(type); } } @@ -181159,13 +181672,13 @@ Dynamic files must always be opened with service's current directory or service return groupNumberOrString; }).join(""); }); - if (excludeRules.indexOf(processedRule) === -1) { + if (!excludeRules.includes(processedRule)) { excludeRules.push(processedRule); } } } else { const escaped = _ProjectService.escapeFilenameForRegex(root); - if (excludeRules.indexOf(escaped) < 0) { + if (!excludeRules.includes(escaped)) { excludeRules.push(escaped); } } @@ -181189,7 +181702,7 @@ Dynamic files must always be opened with service's current directory or service this.logger.info(`Excluded '${normalizedNames[i]}' because it matched ${cleanedTypingName} from the legacy safelist`); excludedFiles.push(normalizedNames[i]); exclude = true; - if (typeAcqInclude.indexOf(typeName) < 0) { + if (!typeAcqInclude.includes(typeName)) { typeAcqInclude.push(typeName); } } @@ -181328,12 +181841,15 @@ Dynamic files must always be opened with service's current directory or service promises.push(importPromise); return; } - this.endEnablePlugin(project, Project3.importServicePluginSync( - pluginConfigEntry, - searchPaths, - this.host, - (s) => this.logger.info(s) - )); + this.endEnablePlugin( + project, + Project3.importServicePluginSync( + pluginConfigEntry, + searchPaths, + this.host, + (s) => this.logger.info(s) + ) + ); } /** * Performs the remaining steps of enabling a plugin after its module has been instantiated. @@ -181458,28 +181974,31 @@ Dynamic files must always be opened with service's current directory or service const watchers = this.packageJsonFilesMap || (this.packageJsonFilesMap = /* @__PURE__ */ new Map()); if (!watchers.has(path)) { this.invalidateProjectPackageJson(path); - watchers.set(path, this.watchFactory.watchFile( + watchers.set( path, - (fileName, eventKind) => { - const path2 = this.toPath(fileName); - switch (eventKind) { - case 0 /* Created */: - return Debug.fail(); - case 1 /* Changed */: - this.packageJsonCache.addOrUpdate(path2); - this.invalidateProjectPackageJson(path2); - break; - case 2 /* Deleted */: - this.packageJsonCache.delete(path2); - this.invalidateProjectPackageJson(path2); - watchers.get(path2).close(); - watchers.delete(path2); - } - }, - 250 /* Low */, - this.hostConfiguration.watchOptions, - WatchType.PackageJson - )); + this.watchFactory.watchFile( + path, + (fileName, eventKind) => { + const path2 = this.toPath(fileName); + switch (eventKind) { + case 0 /* Created */: + return Debug.fail(); + case 1 /* Changed */: + this.packageJsonCache.addOrUpdate(path2); + this.invalidateProjectPackageJson(path2); + break; + case 2 /* Deleted */: + this.packageJsonCache.delete(path2); + this.invalidateProjectPackageJson(path2); + watchers.get(path2).close(); + watchers.delete(path2); + } + }, + 250 /* Low */, + this.hostConfiguration.watchOptions, + WatchType.PackageJson + ) + ); } } /** @internal */ @@ -181765,7 +182284,7 @@ function formatMessage2(msg, logger, byteLength, newLine) { const verboseLogging = logger.hasLevel(3 /* verbose */); const json = JSON.stringify(msg); if (verboseLogging) { - logger.info(`${msg.type}:${indent2(JSON.stringify(msg, void 0, " "))}`); + logger.info(`${msg.type}:${stringifyIndented(msg)}`); } const len = byteLength(json, "utf8"); return `Content-Length: ${1 + len}\r @@ -181792,18 +182311,26 @@ var MultistepOperation = class { immediate(actionType, action) { const requestId = this.requestId; Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "immediate: incorrect request id"); - this.setImmediateId(this.operationHost.getServerHost().setImmediate(() => { - this.immediateId = void 0; - this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); - }, actionType)); + this.setImmediateId( + this.operationHost.getServerHost().setImmediate(() => { + this.immediateId = void 0; + this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); + }, actionType) + ); } delay(actionType, ms, action) { const requestId = this.requestId; Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "delay: incorrect request id"); - this.setTimerHandle(this.operationHost.getServerHost().setTimeout(() => { - this.timerHandle = void 0; - this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); - }, ms, actionType)); + this.setTimerHandle( + this.operationHost.getServerHost().setTimeout( + () => { + this.timerHandle = void 0; + this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); + }, + ms, + actionType + ) + ); } executeAction(action) { var _a, _b, _c, _d, _e, _f; @@ -182021,8 +182548,12 @@ function getPerProjectReferences(projects, defaultProject, initialLocation, isFo const projectService = defaultProject.projectService; const cancellationToken = defaultProject.getCancellationToken(); const defaultDefinition = getDefinitionLocation(defaultProject, initialLocation, isForRename); - const getGeneratedDefinition = memoize(() => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetGeneratedPosition(defaultDefinition)); - const getSourceDefinition = memoize(() => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetSourcePosition(defaultDefinition)); + const getGeneratedDefinition = memoize( + () => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetGeneratedPosition(defaultDefinition) + ); + const getSourceDefinition = memoize( + () => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetSourcePosition(defaultDefinition) + ); const searchedProjectKeys = /* @__PURE__ */ new Set(); onCancellation: while (!queue.isEmpty()) { @@ -182861,6 +183392,7 @@ var Session3 = class _Session { typesMapLocation: opts.typesMapLocation, serverMode: opts.serverMode, session: this, + canUseWatchEvents: opts.canUseWatchEvents, incrementalVerifier: opts.incrementalVerifier }; this.projectService = new ProjectService3(settings); @@ -182914,43 +183446,41 @@ var Session3 = class _Session { defaultEventHandler(event) { switch (event.eventName) { case ProjectsUpdatedInBackgroundEvent: - const { openFiles } = event.data; - this.projectsUpdatedInBackgroundEvent(openFiles); + this.projectsUpdatedInBackgroundEvent(event.data.openFiles); break; case ProjectLoadingStartEvent: - const { project, reason } = event.data; - this.event( - { projectName: project.getProjectName(), reason }, - ProjectLoadingStartEvent - ); + this.event({ + projectName: event.data.project.getProjectName(), + reason: event.data.reason + }, event.eventName); break; case ProjectLoadingFinishEvent: - const { project: finishProject } = event.data; - this.event({ projectName: finishProject.getProjectName() }, ProjectLoadingFinishEvent); + this.event({ + projectName: event.data.project.getProjectName() + }, event.eventName); break; case LargeFileReferencedEvent: - const { file, fileSize, maxFileSize: maxFileSize2 } = event.data; - this.event({ file, fileSize, maxFileSize: maxFileSize2 }, LargeFileReferencedEvent); + case CreateFileWatcherEvent: + case CreateDirectoryWatcherEvent: + case CloseFileWatcherEvent: + this.event(event.data, event.eventName); break; case ConfigFileDiagEvent: - const { triggerFile, configFileName: configFile, diagnostics } = event.data; - const bakedDiags = map(diagnostics, (diagnostic) => formatDiagnosticToProtocol( - diagnostic, - /*includeFileName*/ - true - )); this.event({ - triggerFile, - configFile, - diagnostics: bakedDiags - }, ConfigFileDiagEvent); + triggerFile: event.data.triggerFile, + configFile: event.data.configFileName, + diagnostics: map(event.data.diagnostics, (diagnostic) => formatDiagnosticToProtocol( + diagnostic, + /*includeFileName*/ + true + )) + }, event.eventName); break; case ProjectLanguageServiceStateEvent: { - const eventName = ProjectLanguageServiceStateEvent; this.event({ projectName: event.data.project.getProjectName(), languageServiceEnabled: event.data.languageServiceEnabled - }, eventName); + }, event.eventName); break; } case ProjectInfoTelemetryEvent: { @@ -183260,20 +183790,22 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter ); } convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo) { - return diagnostics.map((d) => ({ - message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), - start: d.start, - length: d.length, - category: diagnosticCategoryName(d), - code: d.code, - source: d.source, - startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start), - // TODO: GH#18217 - endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length), - reportsUnnecessary: d.reportsUnnecessary, - reportsDeprecated: d.reportsDeprecated, - relatedInformation: map(d.relatedInformation, formatRelatedInformation) - })); + return diagnostics.map( + (d) => ({ + message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), + start: d.start, + length: d.length, + category: diagnosticCategoryName(d), + code: d.code, + source: d.source, + startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start), + // TODO: GH#18217 + endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length), + reportsUnnecessary: d.reportsUnnecessary, + reportsDeprecated: d.reportsDeprecated, + relatedInformation: map(d.relatedInformation, formatRelatedInformation) + }) + ); } getDiagnosticsWorker(args, isSemantic, selector, includeLinePosition) { const { project, file } = this.getFileAndProject(args); @@ -183339,7 +183871,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter if (needsJsResolution) { const definitionSet = createSet((d) => d.textSpan.start, documentSpansEqual); definitions == null ? void 0 : definitions.forEach((d) => definitionSet.add(d)); - const noDtsProject = project.getNoDtsResolutionProject([file]); + const noDtsProject = project.getNoDtsResolutionProject(file); const ls = noDtsProject.getLanguageService(); const jsDefinitions = (_a = ls.getDefinitionAtPosition( file, @@ -183366,8 +183898,18 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const ambientCandidates = definitions.filter((d) => toNormalizedPath(d.fileName) !== file && d.isAmbient); for (const candidate of some(ambientCandidates) ? ambientCandidates : getAmbientCandidatesByClimbingAccessChain()) { const fileNameToSearch = findImplementationFileFromDtsFileName(candidate.fileName, file, noDtsProject); - if (!fileNameToSearch || !ensureRoot(noDtsProject, fileNameToSearch)) { + if (!fileNameToSearch) + continue; + const info = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + fileNameToSearch, + noDtsProject.currentDirectory, + noDtsProject.directoryStructureHost + ); + if (!info) continue; + if (!noDtsProject.containsScriptInfo(info)) { + noDtsProject.addRoot(info); + noDtsProject.updateGraph(); } const noDtsProgram = ls.getProgram(); const fileToSearch = Debug.checkDefined(noDtsProgram.getSourceFile(fileNameToSearch)); @@ -183470,16 +184012,6 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter } }); } - function ensureRoot(project2, fileName) { - const info = project2.getScriptInfo(fileName); - if (!info) - return false; - if (!project2.containsScriptInfo(info)) { - project2.addRoot(info); - project2.updateGraph(); - } - return true; - } } getEmitOutput(args) { const { file, project } = this.getFileAndProject(args); @@ -183509,10 +184041,12 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter if (!parts) { return []; } - return parts.map((part) => part.kind !== "linkName" ? part : { - ...part, - target: this.toFileSpan(part.target.fileName, part.target.textSpan, project) - }); + return parts.map( + (part) => part.kind !== "linkName" ? part : { + ...part, + target: this.toFileSpan(part.target.fileName, part.target.textSpan, project) + } + ); } mapSignatureHelpItems(items, project, richResponse) { return items.map((item) => ({ @@ -183531,7 +184065,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter * This retains the existing behavior for the "simplified" (VS Code) protocol but stores the .d.ts location in a * set of additional fields, and does the reverse for VS (store the .d.ts location where * it used to be and stores the .ts location in the additional fields). - */ + */ static mapToOriginalLocation(def) { if (def.originalFileName) { Debug.assert(def.originalTextSpan !== void 0, "originalTextSpan should be present if originalFileName is"); @@ -184014,12 +184548,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); const position = scriptInfo.lineOffsetToPosition(args.line, args.offset); const formatOptions = this.getFormatOptions(file); - const edits = languageService.getFormattingEditsAfterKeystroke( - file, - position, - args.key, - formatOptions - ); + const edits = languageService.getFormattingEditsAfterKeystroke(file, position, args.key, formatOptions); if (args.key === "\n" && (!edits || edits.length === 0 || allEditsBeforePos(edits, position))) { const { lineText, absolutePosition } = scriptInfo.textStorage.getAbsolutePositionAndLineText(args.line); if (lineText && lineText.search("\\S") < 0) { @@ -184253,11 +184782,14 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const end = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset); if (start2 >= 0) { this.changeSeq++; - this.projectService.applyChangesToFile(scriptInfo, singleIterator({ - span: { start: start2, length: end - start2 }, - newText: args.insertString - // TODO: GH#18217 - })); + this.projectService.applyChangesToFile( + scriptInfo, + singleIterator({ + span: { start: start2, length: end - start2 }, + newText: args.insertString + // TODO: GH#18217 + }) + ); } } reload(args, reqSeq) { @@ -184357,6 +184889,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter const { file, project } = this.getFileAndProject(args); return [{ project, navigateToItems: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }]; } + const preferences = this.getHostPreferences(); const outputs = []; const seenItems = /* @__PURE__ */ new Map(); if (!args.file && !projectFileName) { @@ -184379,7 +184912,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter /*fileName*/ void 0, /*excludeDts*/ - project.isNonTsProject() + project.isNonTsProject(), + /*excludeLibFiles*/ + preferences.excludeLibrarySymbolsInNavTo ); const unseenItems = filter(projectItems, (item) => tryAddSeenItem(item) && !getMappedLocationForProject(documentSpanLocation(item), project)); if (unseenItems.length) { @@ -184540,7 +185075,9 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter ...ls.getSyntacticDiagnostics(file), ...ls.getSemanticDiagnostics(file), ...ls.getSuggestionDiagnostics(file) - ].map((d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length) && d.code); + ].map( + (d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length) && d.code + ); const badCode = args.errorCodes.find((c) => !existingDiagCodes.includes(c)); if (badCode !== void 0) { e.message = `BADCLIENT: Bad error code, ${badCode} not found in range ${startPosition}..${endPosition} (found: ${existingDiagCodes.join(", ")}); could have caused this error: @@ -184638,7 +185175,7 @@ ${e.message}`; if (languageServiceDisabled) { return; } - const fileNamesInProject = fileNames.filter((value) => !stringContains(value, "lib.d.ts")); + const fileNamesInProject = fileNames.filter((value) => !value.includes("lib.d.ts")); if (fileNamesInProject.length === 0) { return; } @@ -185219,10 +185756,7 @@ var TextChange9 = class { this.insertedText = insertedText; } getTextChangeRange() { - return createTextChangeRange( - createTextSpan(this.pos, this.deleteLen), - this.insertedText ? this.insertedText.length : 0 - ); + return createTextChangeRange(createTextSpan(this.pos, this.deleteLen), this.insertedText ? this.insertedText.length : 0); } }; var _ScriptVersionCache = class _ScriptVersionCache { @@ -185741,9 +186275,12 @@ __export(ts_server_exports4, { AutoImportProviderProject: () => AutoImportProviderProject, AuxiliaryProject: () => AuxiliaryProject, CharRangeSection: () => CharRangeSection, + CloseFileWatcherEvent: () => CloseFileWatcherEvent, CommandNames: () => CommandNames, ConfigFileDiagEvent: () => ConfigFileDiagEvent, ConfiguredProject: () => ConfiguredProject2, + CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent, + CreateFileWatcherEvent: () => CreateFileWatcherEvent, Errors: () => Errors, EventBeginInstallTypes: () => EventBeginInstallTypes, EventEndInstallTypes: () => EventEndInstallTypes, @@ -185801,6 +186338,7 @@ __export(ts_server_exports4, { hasNoTypeScriptSource: () => hasNoTypeScriptSource, indent: () => indent2, initializeNodeSystem: () => initializeNodeSystem, + isBackgroundProject: () => isBackgroundProject, isConfigFile: () => isConfigFile, isConfiguredProject: () => isConfiguredProject, isDynamicFileName: () => isDynamicFileName, @@ -186560,6 +187098,7 @@ function start({ args, logger, cancellationToken, serverMode, unknownServerMode, useInferredProjectPerProjectRoot: hasArgument("--useInferredProjectPerProjectRoot"), suppressDiagnosticEvents: hasArgument("--suppressDiagnosticEvents"), noGetErrOnBackgroundUpdate: hasArgument("--noGetErrOnBackgroundUpdate"), + canUseWatchEvents: hasArgument("--canUseWatchEvents"), serverMode }, logger, @@ -186592,10 +187131,8 @@ start(initializeNodeSystem(), require("os").platform()); CompletionInfoFlags, CompletionTriggerKind, Completions, - ConfigFileProgramReloadLevel, ContainerFlags, ContextFlags, - CoreServicesShimHostAdapter, Debug, DiagnosticCategory, Diagnostics, @@ -186637,13 +187174,13 @@ start(initializeNodeSystem(), require("os").platform()); InternalEmitFlags, InternalSymbolName, InvalidatedProjectKind, + JSDocParsingMode, JsDoc, JsTyping, JsxEmit, JsxFlags, JsxReferenceKind, LanguageServiceMode, - LanguageServiceShimHostAdapter, LanguageVariant, LexicalEnvironmentFlags, ListFormat, @@ -186680,6 +187217,7 @@ start(initializeNodeSystem(), require("os").platform()); PragmaKindFlags, PrivateIdentifierKind, ProcessLevel, + ProgramUpdateLevel, QuotePreference, RelationComparisonResult, Rename, @@ -186717,7 +187255,6 @@ start(initializeNodeSystem(), require("os").platform()); TypeMapKind, TypePredicateKind, TypeReferenceSerializationKind, - TypeScriptServicesFactory, UnionReduction, UpToDateStatusType, VarianceFlags, @@ -186964,6 +187501,7 @@ start(initializeNodeSystem(), require("os").platform()); createModuleNotFoundChain, createModuleResolutionCache, createModuleResolutionLoader, + createModuleResolutionLoaderUsingGlobalCache, createModuleSpecifierResolutionHost, createMultiMap, createNodeConverters, @@ -187392,6 +187930,7 @@ start(initializeNodeSystem(), require("os").platform()); getLeadingCommentRangesOfNode, getLeftmostAccessExpression, getLeftmostExpression, + getLibraryNameFromLibFileName, getLineAndCharacterOfPosition, getLineInfo, getLineOfLocalPosition, @@ -187523,13 +188062,11 @@ start(initializeNodeSystem(), require("os").platform()); getRenameLocation, getReplacementSpanForContextToken, getResolutionDiagnostic, - getResolutionModeOverrideForClause, + getResolutionModeOverride, getResolveJsonModule, getResolvePackageJsonExports, getResolvePackageJsonImports, getResolvedExternalModuleName, - getResolvedModule, - getResolvedTypeReferenceDirective, getRestIndicatorOfBindingOrAssignmentElement, getRestParameterElementType, getRightMostAssignedExpression, @@ -187657,6 +188194,7 @@ start(initializeNodeSystem(), require("os").platform()); hasPropertyAccessExpressionWithName, hasQuestionToken, hasRecordedExternalHelpers, + hasResolutionModeOverride, hasRestParameter, hasScopeMarker, hasStaticModifier, @@ -187730,7 +188268,6 @@ start(initializeNodeSystem(), require("os").platform()); isAssertClause, isAssertEntry, isAssertionExpression, - isAssertionKey, isAssertsKeyword, isAssignmentDeclaration, isAssignmentExpression, @@ -187771,6 +188308,7 @@ start(initializeNodeSystem(), require("os").platform()); isCallExpression, isCallExpressionTarget, isCallLikeExpression, + isCallLikeOrFunctionLikeExpression, isCallOrNewExpression, isCallOrNewExpressionTarget, isCallSignatureDeclaration, @@ -187788,6 +188326,7 @@ start(initializeNodeSystem(), require("os").platform()); isClassDeclaration, isClassElement, isClassExpression, + isClassInstanceProperty, isClassLike, isClassMemberModifier, isClassNamedEvaluationHelperBlock, @@ -187866,6 +188405,7 @@ start(initializeNodeSystem(), require("os").platform()); isExclamationToken, isExcludedFile, isExclusivelyTypeOnlyImportOrExport, + isExpandoPropertyDeclaration, isExportAssignment, isExportDeclaration, isExportModifier, @@ -187937,6 +188477,9 @@ start(initializeNodeSystem(), require("os").platform()); isIfStatement, isIgnoredFileFromWildCardWatching, isImplicitGlob, + isImportAttribute, + isImportAttributeName, + isImportAttributes, isImportCall, isImportClause, isImportDeclaration, @@ -187950,6 +188493,7 @@ start(initializeNodeSystem(), require("os").platform()); isImportTypeNode, isImportableFile, isInComment, + isInCompoundLikeAssignment, isInExpressionContext, isInJSDoc, isInJSFile, @@ -187973,6 +188517,7 @@ start(initializeNodeSystem(), require("os").platform()); isInsideJsxElementOrAttribute, isInsideNodeModules, isInsideTemplateLiteral, + isInstanceOfExpression, isInstantiatedModule, isInterfaceDeclaration, isInternalDeclaration, @@ -188127,7 +188672,6 @@ start(initializeNodeSystem(), require("os").platform()); isNamespaceReexportDeclaration, isNewExpression, isNewExpressionTarget, - isNightly, isNoSubstitutionTemplateLiteral, isNode, isNodeArray, @@ -188231,6 +188775,7 @@ start(initializeNodeSystem(), require("os").platform()); isReturnStatement, isReturnStatementWithFixablePromiseHandler, isRightSideOfAccessExpression, + isRightSideOfInstanceofExpression, isRightSideOfPropertyAccess, isRightSideOfQualifiedName, isRightSideOfQualifiedNameOrPropertyAccess, @@ -188243,6 +188788,7 @@ start(initializeNodeSystem(), require("os").platform()); isSetAccessor, isSetAccessorDeclaration, isShebangTrivia, + isShiftOperatorOrHigher, isShorthandAmbientModuleSymbol, isShorthandPropertyAssignment, isSignedNumericLiteral, @@ -188481,8 +189027,6 @@ start(initializeNodeSystem(), require("os").platform()); outFile, packageIdToPackageName, packageIdToString, - padLeft, - padRight, paramHelper, parameterIsThisKeyword, parameterNamePart, @@ -188556,7 +189100,6 @@ start(initializeNodeSystem(), require("os").platform()); readJson, readJsonConfigFile, readJsonOrUndefined, - realizeDiagnostics, reduceEachLeadingCommentRange, reduceEachTrailingCommentRange, reduceLeft, @@ -188626,8 +189169,6 @@ start(initializeNodeSystem(), require("os").platform()); setParent, setParentRecursive, setPrivateIdentifier, - setResolvedModule, - setResolvedTypeReferenceDirective, setSnippetElement, setSourceMapRange, setStackTraceLimit, @@ -188689,7 +189230,6 @@ start(initializeNodeSystem(), require("os").platform()); startsWithDirectory, startsWithUnderscore, startsWithUseStrict, - stringContains, stringContainsAt, stringToToken, stripQuotes, @@ -188776,9 +189316,6 @@ start(initializeNodeSystem(), require("os").platform()); transpile, transpileModule, transpileOptionValueCompilerOptions, - trimString, - trimStringEnd, - trimStringStart, tryAddToSet, tryAndIgnoreErrors, tryCast, @@ -188858,7 +189395,6 @@ start(initializeNodeSystem(), require("os").platform()); writeCommentRange, writeFile, writeFileEnsuringDirectories, - zipToModeAwareCache, zipWith }); //# sourceMappingURL=tsserver.js.map diff --git a/node_modules/typescript/lib/tsserverlibrary.d.ts b/node_modules/typescript/lib/tsserverlibrary.d.ts index 4b9d52e..3db5faa 100644 --- a/node_modules/typescript/lib/tsserverlibrary.d.ts +++ b/node_modules/typescript/lib/tsserverlibrary.d.ts @@ -13,11262 +13,5 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ -declare namespace ts { - namespace server { - type ActionSet = "action::set"; - type ActionInvalidate = "action::invalidate"; - type ActionPackageInstalled = "action::packageInstalled"; - type EventTypesRegistry = "event::typesRegistry"; - type EventBeginInstallTypes = "event::beginInstallTypes"; - type EventEndInstallTypes = "event::endInstallTypes"; - type EventInitializationFailed = "event::initializationFailed"; - type ActionWatchTypingLocations = "action::watchTypingLocations"; - interface TypingInstallerResponse { - readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed | ActionWatchTypingLocations; - } - interface TypingInstallerRequestWithProjectName { - readonly projectName: string; - } - interface DiscoverTypings extends TypingInstallerRequestWithProjectName { - readonly fileNames: string[]; - readonly projectRootPath: Path; - readonly compilerOptions: CompilerOptions; - readonly typeAcquisition: TypeAcquisition; - readonly unresolvedImports: SortedReadonlyArray; - readonly cachePath?: string; - readonly kind: "discover"; - } - interface CloseProject extends TypingInstallerRequestWithProjectName { - readonly kind: "closeProject"; - } - interface TypesRegistryRequest { - readonly kind: "typesRegistry"; - } - interface InstallPackageRequest extends TypingInstallerRequestWithProjectName { - readonly kind: "installPackage"; - readonly fileName: Path; - readonly packageName: string; - readonly projectRootPath: Path; - } - interface PackageInstalledResponse extends ProjectResponse { - readonly kind: ActionPackageInstalled; - readonly success: boolean; - readonly message: string; - } - interface InitializationFailedResponse extends TypingInstallerResponse { - readonly kind: EventInitializationFailed; - readonly message: string; - readonly stack?: string; - } - interface ProjectResponse extends TypingInstallerResponse { - readonly projectName: string; - } - interface InvalidateCachedTypings extends ProjectResponse { - readonly kind: ActionInvalidate; - } - interface InstallTypes extends ProjectResponse { - readonly kind: EventBeginInstallTypes | EventEndInstallTypes; - readonly eventId: number; - readonly typingsInstallerVersion: string; - readonly packagesToInstall: readonly string[]; - } - interface BeginInstallTypes extends InstallTypes { - readonly kind: EventBeginInstallTypes; - } - interface EndInstallTypes extends InstallTypes { - readonly kind: EventEndInstallTypes; - readonly installSuccess: boolean; - } - interface InstallTypingHost extends JsTyping.TypingResolutionHost { - useCaseSensitiveFileNames: boolean; - writeFile(path: string, content: string): void; - createDirectory(path: string): void; - getCurrentDirectory?(): string; - } - interface SetTypings extends ProjectResponse { - readonly typeAcquisition: TypeAcquisition; - readonly compilerOptions: CompilerOptions; - readonly typings: string[]; - readonly unresolvedImports: SortedReadonlyArray; - readonly kind: ActionSet; - } - interface WatchTypingLocations extends ProjectResponse { - /** if files is undefined, retain same set of watchers */ - readonly files: readonly string[] | undefined; - readonly kind: ActionWatchTypingLocations; - } - namespace protocol { - enum CommandTypes { - JsxClosingTag = "jsxClosingTag", - LinkedEditingRange = "linkedEditingRange", - Brace = "brace", - BraceCompletion = "braceCompletion", - GetSpanOfEnclosingComment = "getSpanOfEnclosingComment", - Change = "change", - Close = "close", - /** @deprecated Prefer CompletionInfo -- see comment on CompletionsResponse */ - Completions = "completions", - CompletionInfo = "completionInfo", - CompletionDetails = "completionEntryDetails", - CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList", - CompileOnSaveEmitFile = "compileOnSaveEmitFile", - Configure = "configure", - Definition = "definition", - DefinitionAndBoundSpan = "definitionAndBoundSpan", - Implementation = "implementation", - Exit = "exit", - FileReferences = "fileReferences", - Format = "format", - Formatonkey = "formatonkey", - Geterr = "geterr", - GeterrForProject = "geterrForProject", - SemanticDiagnosticsSync = "semanticDiagnosticsSync", - SyntacticDiagnosticsSync = "syntacticDiagnosticsSync", - SuggestionDiagnosticsSync = "suggestionDiagnosticsSync", - NavBar = "navbar", - Navto = "navto", - NavTree = "navtree", - NavTreeFull = "navtree-full", - DocumentHighlights = "documentHighlights", - Open = "open", - Quickinfo = "quickinfo", - References = "references", - Reload = "reload", - Rename = "rename", - Saveto = "saveto", - SignatureHelp = "signatureHelp", - FindSourceDefinition = "findSourceDefinition", - Status = "status", - TypeDefinition = "typeDefinition", - ProjectInfo = "projectInfo", - ReloadProjects = "reloadProjects", - Unknown = "unknown", - OpenExternalProject = "openExternalProject", - OpenExternalProjects = "openExternalProjects", - CloseExternalProject = "closeExternalProject", - UpdateOpen = "updateOpen", - GetOutliningSpans = "getOutliningSpans", - TodoComments = "todoComments", - Indentation = "indentation", - DocCommentTemplate = "docCommentTemplate", - CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects", - GetCodeFixes = "getCodeFixes", - GetCombinedCodeFix = "getCombinedCodeFix", - ApplyCodeActionCommand = "applyCodeActionCommand", - GetSupportedCodeFixes = "getSupportedCodeFixes", - GetApplicableRefactors = "getApplicableRefactors", - GetEditsForRefactor = "getEditsForRefactor", - GetMoveToRefactoringFileSuggestions = "getMoveToRefactoringFileSuggestions", - OrganizeImports = "organizeImports", - GetEditsForFileRename = "getEditsForFileRename", - ConfigurePlugin = "configurePlugin", - SelectionRange = "selectionRange", - ToggleLineComment = "toggleLineComment", - ToggleMultilineComment = "toggleMultilineComment", - CommentSelection = "commentSelection", - UncommentSelection = "uncommentSelection", - PrepareCallHierarchy = "prepareCallHierarchy", - ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls", - ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls", - ProvideInlayHints = "provideInlayHints" - } - /** - * A TypeScript Server message - */ - interface Message { - /** - * Sequence number of the message - */ - seq: number; - /** - * One of "request", "response", or "event" - */ - type: "request" | "response" | "event"; - } - /** - * Client-initiated request message - */ - interface Request extends Message { - type: "request"; - /** - * The command to execute - */ - command: string; - /** - * Object containing arguments for the command - */ - arguments?: any; - } - /** - * Request to reload the project structure for all the opened files - */ - interface ReloadProjectsRequest extends Message { - command: CommandTypes.ReloadProjects; - } - /** - * Server-initiated event message - */ - interface Event extends Message { - type: "event"; - /** - * Name of event - */ - event: string; - /** - * Event-specific information - */ - body?: any; - } - /** - * Response by server to client request message. - */ - interface Response extends Message { - type: "response"; - /** - * Sequence number of the request message. - */ - request_seq: number; - /** - * Outcome of the request. - */ - success: boolean; - /** - * The command requested. - */ - command: string; - /** - * If success === false, this should always be provided. - * Otherwise, may (or may not) contain a success message. - */ - message?: string; - /** - * Contains message body if success === true. - */ - body?: any; - /** - * Contains extra information that plugin can include to be passed on - */ - metadata?: unknown; - /** - * Exposes information about the performance of this request-response pair. - */ - performanceData?: PerformanceData; - } - interface PerformanceData { - /** - * Time spent updating the program graph, in milliseconds. - */ - updateGraphDurationMs?: number; - /** - * The time spent creating or updating the auto-import program, in milliseconds. - */ - createAutoImportProviderProgramDurationMs?: number; - } - /** - * Arguments for FileRequest messages. - */ - interface FileRequestArgs { - /** - * The file for the request (absolute pathname required). - */ - file: string; - projectFileName?: string; - } - interface StatusRequest extends Request { - command: CommandTypes.Status; - } - interface StatusResponseBody { - /** - * The TypeScript version (`ts.version`). - */ - version: string; - } - /** - * Response to StatusRequest - */ - interface StatusResponse extends Response { - body: StatusResponseBody; - } - /** - * Requests a JS Doc comment template for a given position - */ - interface DocCommentTemplateRequest extends FileLocationRequest { - command: CommandTypes.DocCommentTemplate; - } - /** - * Response to DocCommentTemplateRequest - */ - interface DocCommandTemplateResponse extends Response { - body?: TextInsertion; - } - /** - * A request to get TODO comments from the file - */ - interface TodoCommentRequest extends FileRequest { - command: CommandTypes.TodoComments; - arguments: TodoCommentRequestArgs; - } - /** - * Arguments for TodoCommentRequest request. - */ - interface TodoCommentRequestArgs extends FileRequestArgs { - /** - * Array of target TodoCommentDescriptors that describes TODO comments to be found - */ - descriptors: TodoCommentDescriptor[]; - } - /** - * Response for TodoCommentRequest request. - */ - interface TodoCommentsResponse extends Response { - body?: TodoComment[]; - } - /** - * A request to determine if the caret is inside a comment. - */ - interface SpanOfEnclosingCommentRequest extends FileLocationRequest { - command: CommandTypes.GetSpanOfEnclosingComment; - arguments: SpanOfEnclosingCommentRequestArgs; - } - interface SpanOfEnclosingCommentRequestArgs extends FileLocationRequestArgs { - /** - * Requires that the enclosing span be a multi-line comment, or else the request returns undefined. - */ - onlyMultiLine: boolean; - } - /** - * Request to obtain outlining spans in file. - */ - interface OutliningSpansRequest extends FileRequest { - command: CommandTypes.GetOutliningSpans; - } - interface OutliningSpan { - /** The span of the document to actually collapse. */ - textSpan: TextSpan; - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; - /** The text to display in the editor for the collapsed region. */ - bannerText: string; - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; - /** - * Classification of the contents of the span - */ - kind: OutliningSpanKind; - } - /** - * Response to OutliningSpansRequest request. - */ - interface OutliningSpansResponse extends Response { - body?: OutliningSpan[]; - } - /** - * A request to get indentation for a location in file - */ - interface IndentationRequest extends FileLocationRequest { - command: CommandTypes.Indentation; - arguments: IndentationRequestArgs; - } - /** - * Response for IndentationRequest request. - */ - interface IndentationResponse extends Response { - body?: IndentationResult; - } - /** - * Indentation result representing where indentation should be placed - */ - interface IndentationResult { - /** - * The base position in the document that the indent should be relative to - */ - position: number; - /** - * The number of columns the indent should be at relative to the position's column. - */ - indentation: number; - } - /** - * Arguments for IndentationRequest request. - */ - interface IndentationRequestArgs extends FileLocationRequestArgs { - /** - * An optional set of settings to be used when computing indentation. - * If argument is omitted - then it will use settings for file that were previously set via 'configure' request or global settings. - */ - options?: EditorSettings; - } - /** - * Arguments for ProjectInfoRequest request. - */ - interface ProjectInfoRequestArgs extends FileRequestArgs { - /** - * Indicate if the file name list of the project is needed - */ - needFileNameList: boolean; - } - /** - * A request to get the project information of the current file. - */ - interface ProjectInfoRequest extends Request { - command: CommandTypes.ProjectInfo; - arguments: ProjectInfoRequestArgs; - } - /** - * A request to retrieve compiler options diagnostics for a project - */ - interface CompilerOptionsDiagnosticsRequest extends Request { - arguments: CompilerOptionsDiagnosticsRequestArgs; - } - /** - * Arguments for CompilerOptionsDiagnosticsRequest request. - */ - interface CompilerOptionsDiagnosticsRequestArgs { - /** - * Name of the project to retrieve compiler options diagnostics. - */ - projectFileName: string; - } - /** - * Response message body for "projectInfo" request - */ - interface ProjectInfo { - /** - * For configured project, this is the normalized path of the 'tsconfig.json' file - * For inferred project, this is undefined - */ - configFileName: string; - /** - * The list of normalized file name in the project, including 'lib.d.ts' - */ - fileNames?: string[]; - /** - * Indicates if the project has a active language service instance - */ - languageServiceDisabled?: boolean; - } - /** - * Represents diagnostic info that includes location of diagnostic in two forms - * - start position and length of the error span - * - startLocation and endLocation - a pair of Location objects that store start/end line and offset of the error span. - */ - interface DiagnosticWithLinePosition { - message: string; - start: number; - length: number; - startLocation: Location; - endLocation: Location; - category: string; - code: number; - /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ - reportsUnnecessary?: {}; - reportsDeprecated?: {}; - relatedInformation?: DiagnosticRelatedInformation[]; - } - /** - * Response message for "projectInfo" request - */ - interface ProjectInfoResponse extends Response { - body?: ProjectInfo; - } - /** - * Request whose sole parameter is a file name. - */ - interface FileRequest extends Request { - arguments: FileRequestArgs; - } - /** - * Instances of this interface specify a location in a source file: - * (file, line, character offset), where line and character offset are 1-based. - */ - interface FileLocationRequestArgs extends FileRequestArgs { - /** - * The line number for the request (1-based). - */ - line: number; - /** - * The character offset (on the line) for the request (1-based). - */ - offset: number; - } - type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs; - /** - * Request refactorings at a given position or selection area. - */ - interface GetApplicableRefactorsRequest extends Request { - command: CommandTypes.GetApplicableRefactors; - arguments: GetApplicableRefactorsRequestArgs; - } - type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & { - triggerReason?: RefactorTriggerReason; - kind?: string; - /** - * Include refactor actions that require additional arguments to be passed when - * calling 'GetEditsForRefactor'. When true, clients should inspect the - * `isInteractive` property of each returned `RefactorActionInfo` - * and ensure they are able to collect the appropriate arguments for any - * interactive refactor before offering it. - */ - includeInteractiveActions?: boolean; - }; - type RefactorTriggerReason = "implicit" | "invoked"; - /** - * Response is a list of available refactorings. - * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring - */ - interface GetApplicableRefactorsResponse extends Response { - body?: ApplicableRefactorInfo[]; - } - /** - * Request refactorings at a given position or selection area to move to an existing file. - */ - interface GetMoveToRefactoringFileSuggestionsRequest extends Request { - command: CommandTypes.GetMoveToRefactoringFileSuggestions; - arguments: GetMoveToRefactoringFileSuggestionsRequestArgs; - } - type GetMoveToRefactoringFileSuggestionsRequestArgs = FileLocationOrRangeRequestArgs & { - kind?: string; - }; - /** - * Response is a list of available files. - * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring - */ - interface GetMoveToRefactoringFileSuggestions extends Response { - body: { - newFileName: string; - files: string[]; - }; - } - /** - * A set of one or more available refactoring actions, grouped under a parent refactoring. - */ - interface ApplicableRefactorInfo { - /** - * The programmatic name of the refactoring - */ - name: string; - /** - * A description of this refactoring category to show to the user. - * If the refactoring gets inlined (see below), this text will not be visible. - */ - description: string; - /** - * Inlineable refactorings can have their actions hoisted out to the top level - * of a context menu. Non-inlineanable refactorings should always be shown inside - * their parent grouping. - * - * If not specified, this value is assumed to be 'true' - */ - inlineable?: boolean; - actions: RefactorActionInfo[]; - } - /** - * Represents a single refactoring action - for example, the "Extract Method..." refactor might - * offer several actions, each corresponding to a surround class or closure to extract into. - */ - interface RefactorActionInfo { - /** - * The programmatic name of the refactoring action - */ - name: string; - /** - * A description of this refactoring action to show to the user. - * If the parent refactoring is inlined away, this will be the only text shown, - * so this description should make sense by itself if the parent is inlineable=true - */ - description: string; - /** - * A message to show to the user if the refactoring cannot be applied in - * the current context. - */ - notApplicableReason?: string; - /** - * The hierarchical dotted name of the refactor action. - */ - kind?: string; - /** - * Indicates that the action requires additional arguments to be passed - * when calling 'GetEditsForRefactor'. - */ - isInteractive?: boolean; - } - interface GetEditsForRefactorRequest extends Request { - command: CommandTypes.GetEditsForRefactor; - arguments: GetEditsForRefactorRequestArgs; - } - /** - * Request the edits that a particular refactoring action produces. - * Callers must specify the name of the refactor and the name of the action. - */ - type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & { - refactor: string; - action: string; - interactiveRefactorArguments?: InteractiveRefactorArguments; - }; - interface GetEditsForRefactorResponse extends Response { - body?: RefactorEditInfo; - } - interface RefactorEditInfo { - edits: FileCodeEdits[]; - /** - * An optional location where the editor should start a rename operation once - * the refactoring edits have been applied - */ - renameLocation?: Location; - renameFilename?: string; - notApplicableReason?: string; - } - /** - * Organize imports by: - * 1) Removing unused imports - * 2) Coalescing imports from the same module - * 3) Sorting imports - */ - interface OrganizeImportsRequest extends Request { - command: CommandTypes.OrganizeImports; - arguments: OrganizeImportsRequestArgs; - } - type OrganizeImportsScope = GetCombinedCodeFixScope; - enum OrganizeImportsMode { - All = "All", - SortAndCombine = "SortAndCombine", - RemoveUnused = "RemoveUnused" - } - interface OrganizeImportsRequestArgs { - scope: OrganizeImportsScope; - /** @deprecated Use `mode` instead */ - skipDestructiveCodeActions?: boolean; - mode?: OrganizeImportsMode; - } - interface OrganizeImportsResponse extends Response { - body: readonly FileCodeEdits[]; - } - interface GetEditsForFileRenameRequest extends Request { - command: CommandTypes.GetEditsForFileRename; - arguments: GetEditsForFileRenameRequestArgs; - } - /** Note: Paths may also be directories. */ - interface GetEditsForFileRenameRequestArgs { - readonly oldFilePath: string; - readonly newFilePath: string; - } - interface GetEditsForFileRenameResponse extends Response { - body: readonly FileCodeEdits[]; - } - /** - * Request for the available codefixes at a specific position. - */ - interface CodeFixRequest extends Request { - command: CommandTypes.GetCodeFixes; - arguments: CodeFixRequestArgs; - } - interface GetCombinedCodeFixRequest extends Request { - command: CommandTypes.GetCombinedCodeFix; - arguments: GetCombinedCodeFixRequestArgs; - } - interface GetCombinedCodeFixResponse extends Response { - body: CombinedCodeActions; - } - interface ApplyCodeActionCommandRequest extends Request { - command: CommandTypes.ApplyCodeActionCommand; - arguments: ApplyCodeActionCommandRequestArgs; - } - interface ApplyCodeActionCommandResponse extends Response { - } - interface FileRangeRequestArgs extends FileRequestArgs { - /** - * The line number for the request (1-based). - */ - startLine: number; - /** - * The character offset (on the line) for the request (1-based). - */ - startOffset: number; - /** - * The line number for the request (1-based). - */ - endLine: number; - /** - * The character offset (on the line) for the request (1-based). - */ - endOffset: number; - } - /** - * Instances of this interface specify errorcodes on a specific location in a sourcefile. - */ - interface CodeFixRequestArgs extends FileRangeRequestArgs { - /** - * Errorcodes we want to get the fixes for. - */ - errorCodes: readonly number[]; - } - interface GetCombinedCodeFixRequestArgs { - scope: GetCombinedCodeFixScope; - fixId: {}; - } - interface GetCombinedCodeFixScope { - type: "file"; - args: FileRequestArgs; - } - interface ApplyCodeActionCommandRequestArgs { - /** May also be an array of commands. */ - command: {}; - } - /** - * Response for GetCodeFixes request. - */ - interface GetCodeFixesResponse extends Response { - body?: CodeAction[]; - } - /** - * A request whose arguments specify a file location (file, line, col). - */ - interface FileLocationRequest extends FileRequest { - arguments: FileLocationRequestArgs; - } - /** - * A request to get codes of supported code fixes. - */ - interface GetSupportedCodeFixesRequest extends Request { - command: CommandTypes.GetSupportedCodeFixes; - arguments?: Partial; - } - /** - * A response for GetSupportedCodeFixesRequest request. - */ - interface GetSupportedCodeFixesResponse extends Response { - /** - * List of error codes supported by the server. - */ - body?: string[]; - } - /** - * A request to get encoded semantic classifications for a span in the file - */ - interface EncodedSemanticClassificationsRequest extends FileRequest { - arguments: EncodedSemanticClassificationsRequestArgs; - } - /** - * Arguments for EncodedSemanticClassificationsRequest request. - */ - interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs { - /** - * Start position of the span. - */ - start: number; - /** - * Length of the span. - */ - length: number; - /** - * Optional parameter for the semantic highlighting response, if absent it - * defaults to "original". - */ - format?: "original" | "2020"; - } - /** The response for a EncodedSemanticClassificationsRequest */ - interface EncodedSemanticClassificationsResponse extends Response { - body?: EncodedSemanticClassificationsResponseBody; - } - /** - * Implementation response message. Gives series of text spans depending on the format ar. - */ - interface EncodedSemanticClassificationsResponseBody { - endOfLineState: EndOfLineState; - spans: number[]; - } - /** - * Arguments in document highlight request; include: filesToSearch, file, - * line, offset. - */ - interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs { - /** - * List of files to search for document highlights. - */ - filesToSearch: string[]; - } - /** - * Go to definition request; value of command field is - * "definition". Return response giving the file locations that - * define the symbol found in file at location line, col. - */ - interface DefinitionRequest extends FileLocationRequest { - command: CommandTypes.Definition; - } - interface DefinitionAndBoundSpanRequest extends FileLocationRequest { - readonly command: CommandTypes.DefinitionAndBoundSpan; - } - interface FindSourceDefinitionRequest extends FileLocationRequest { - readonly command: CommandTypes.FindSourceDefinition; - } - interface DefinitionAndBoundSpanResponse extends Response { - readonly body: DefinitionInfoAndBoundSpan; - } - /** - * Go to type request; value of command field is - * "typeDefinition". Return response giving the file locations that - * define the type for the symbol found in file at location line, col. - */ - interface TypeDefinitionRequest extends FileLocationRequest { - command: CommandTypes.TypeDefinition; - } - /** - * Go to implementation request; value of command field is - * "implementation". Return response giving the file locations that - * implement the symbol found in file at location line, col. - */ - interface ImplementationRequest extends FileLocationRequest { - command: CommandTypes.Implementation; - } - /** - * Location in source code expressed as (one-based) line and (one-based) column offset. - */ - interface Location { - line: number; - offset: number; - } - /** - * Object found in response messages defining a span of text in source code. - */ - interface TextSpan { - /** - * First character of the definition. - */ - start: Location; - /** - * One character past last character of the definition. - */ - end: Location; - } - /** - * Object found in response messages defining a span of text in a specific source file. - */ - interface FileSpan extends TextSpan { - /** - * File containing text span. - */ - file: string; - } - interface JSDocTagInfo { - /** Name of the JSDoc tag */ - name: string; - /** - * Comment text after the JSDoc tag -- the text after the tag name until the next tag or end of comment - * Display parts when UserPreferences.displayPartsForJSDoc is true, flattened to string otherwise. - */ - text?: string | SymbolDisplayPart[]; - } - interface TextSpanWithContext extends TextSpan { - contextStart?: Location; - contextEnd?: Location; - } - interface FileSpanWithContext extends FileSpan, TextSpanWithContext { - } - interface DefinitionInfo extends FileSpanWithContext { - /** - * When true, the file may or may not exist. - */ - unverified?: boolean; - } - interface DefinitionInfoAndBoundSpan { - definitions: readonly DefinitionInfo[]; - textSpan: TextSpan; - } - /** - * Definition response message. Gives text range for definition. - */ - interface DefinitionResponse extends Response { - body?: DefinitionInfo[]; - } - interface DefinitionInfoAndBoundSpanResponse extends Response { - body?: DefinitionInfoAndBoundSpan; - } - /** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */ - type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse; - /** - * Definition response message. Gives text range for definition. - */ - interface TypeDefinitionResponse extends Response { - body?: FileSpanWithContext[]; - } - /** - * Implementation response message. Gives text range for implementations. - */ - interface ImplementationResponse extends Response { - body?: FileSpanWithContext[]; - } - /** - * Request to get brace completion for a location in the file. - */ - interface BraceCompletionRequest extends FileLocationRequest { - command: CommandTypes.BraceCompletion; - arguments: BraceCompletionRequestArgs; - } - /** - * Argument for BraceCompletionRequest request. - */ - interface BraceCompletionRequestArgs extends FileLocationRequestArgs { - /** - * Kind of opening brace - */ - openingBrace: string; - } - interface JsxClosingTagRequest extends FileLocationRequest { - readonly command: CommandTypes.JsxClosingTag; - readonly arguments: JsxClosingTagRequestArgs; - } - interface JsxClosingTagRequestArgs extends FileLocationRequestArgs { - } - interface JsxClosingTagResponse extends Response { - readonly body: TextInsertion; - } - interface LinkedEditingRangeRequest extends FileLocationRequest { - readonly command: CommandTypes.LinkedEditingRange; - } - interface LinkedEditingRangesBody { - ranges: TextSpan[]; - wordPattern?: string; - } - interface LinkedEditingRangeResponse extends Response { - readonly body: LinkedEditingRangesBody; - } - /** - * Get document highlights request; value of command field is - * "documentHighlights". Return response giving spans that are relevant - * in the file at a given line and column. - */ - interface DocumentHighlightsRequest extends FileLocationRequest { - command: CommandTypes.DocumentHighlights; - arguments: DocumentHighlightsRequestArgs; - } - /** - * Span augmented with extra information that denotes the kind of the highlighting to be used for span. - */ - interface HighlightSpan extends TextSpanWithContext { - kind: HighlightSpanKind; - } - /** - * Represents a set of highligh spans for a give name - */ - interface DocumentHighlightsItem { - /** - * File containing highlight spans. - */ - file: string; - /** - * Spans to highlight in file. - */ - highlightSpans: HighlightSpan[]; - } - /** - * Response for a DocumentHighlightsRequest request. - */ - interface DocumentHighlightsResponse extends Response { - body?: DocumentHighlightsItem[]; - } - /** - * Find references request; value of command field is - * "references". Return response giving the file locations that - * reference the symbol found in file at location line, col. - */ - interface ReferencesRequest extends FileLocationRequest { - command: CommandTypes.References; - } - interface ReferencesResponseItem extends FileSpanWithContext { - /** - * Text of line containing the reference. Including this - * with the response avoids latency of editor loading files - * to show text of reference line (the server already has loaded the referencing files). - * - * If {@link UserPreferences.disableLineTextInReferences} is enabled, the property won't be filled - */ - lineText?: string; - /** - * True if reference is a write location, false otherwise. - */ - isWriteAccess: boolean; - /** - * Present only if the search was triggered from a declaration. - * True indicates that the references refers to the same symbol - * (i.e. has the same meaning) as the declaration that began the - * search. - */ - isDefinition?: boolean; - } - /** - * The body of a "references" response message. - */ - interface ReferencesResponseBody { - /** - * The file locations referencing the symbol. - */ - refs: readonly ReferencesResponseItem[]; - /** - * The name of the symbol. - */ - symbolName: string; - /** - * The start character offset of the symbol (on the line provided by the references request). - */ - symbolStartOffset: number; - /** - * The full display name of the symbol. - */ - symbolDisplayString: string; - } - /** - * Response to "references" request. - */ - interface ReferencesResponse extends Response { - body?: ReferencesResponseBody; - } - interface FileReferencesRequest extends FileRequest { - command: CommandTypes.FileReferences; - } - interface FileReferencesResponseBody { - /** - * The file locations referencing the symbol. - */ - refs: readonly ReferencesResponseItem[]; - /** - * The name of the symbol. - */ - symbolName: string; - } - interface FileReferencesResponse extends Response { - body?: FileReferencesResponseBody; - } - /** - * Argument for RenameRequest request. - */ - interface RenameRequestArgs extends FileLocationRequestArgs { - /** - * Should text at specified location be found/changed in comments? - */ - findInComments?: boolean; - /** - * Should text at specified location be found/changed in strings? - */ - findInStrings?: boolean; - } - /** - * Rename request; value of command field is "rename". Return - * response giving the file locations that reference the symbol - * found in file at location line, col. Also return full display - * name of the symbol so that client can print it unambiguously. - */ - interface RenameRequest extends FileLocationRequest { - command: CommandTypes.Rename; - arguments: RenameRequestArgs; - } - /** - * Information about the item to be renamed. - */ - type RenameInfo = RenameInfoSuccess | RenameInfoFailure; - interface RenameInfoSuccess { - /** - * True if item can be renamed. - */ - canRename: true; - /** - * File or directory to rename. - * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. - */ - fileToRename?: string; - /** - * Display name of the item to be renamed. - */ - displayName: string; - /** - * Full display name of item to be renamed. - */ - fullDisplayName: string; - /** - * The items's kind (such as 'className' or 'parameterName' or plain 'text'). - */ - kind: ScriptElementKind; - /** - * Optional modifiers for the kind (such as 'public'). - */ - kindModifiers: string; - /** Span of text to rename. */ - triggerSpan: TextSpan; - } - interface RenameInfoFailure { - canRename: false; - /** - * Error message if item can not be renamed. - */ - localizedErrorMessage: string; - } - /** - * A group of text spans, all in 'file'. - */ - interface SpanGroup { - /** The file to which the spans apply */ - file: string; - /** The text spans in this group */ - locs: RenameTextSpan[]; - } - interface RenameTextSpan extends TextSpanWithContext { - readonly prefixText?: string; - readonly suffixText?: string; - } - interface RenameResponseBody { - /** - * Information about the item to be renamed. - */ - info: RenameInfo; - /** - * An array of span groups (one per file) that refer to the item to be renamed. - */ - locs: readonly SpanGroup[]; - } - /** - * Rename response message. - */ - interface RenameResponse extends Response { - body?: RenameResponseBody; - } - /** - * Represents a file in external project. - * External project is project whose set of files, compilation options and open\close state - * is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio). - * External project will exist even if all files in it are closed and should be closed explicitly. - * If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will - * create configured project for every config file but will maintain a link that these projects were created - * as a result of opening external project so they should be removed once external project is closed. - */ - interface ExternalFile { - /** - * Name of file file - */ - fileName: string; - /** - * Script kind of the file - */ - scriptKind?: ScriptKindName | ScriptKind; - /** - * Whether file has mixed content (i.e. .cshtml file that combines html markup with C#/JavaScript) - */ - hasMixedContent?: boolean; - /** - * Content of the file - */ - content?: string; - } - /** - * Represent an external project - */ - interface ExternalProject { - /** - * Project name - */ - projectFileName: string; - /** - * List of root files in project - */ - rootFiles: ExternalFile[]; - /** - * Compiler options for the project - */ - options: ExternalProjectCompilerOptions; - /** - * Explicitly specified type acquisition for the project - */ - typeAcquisition?: TypeAcquisition; - } - interface CompileOnSaveMixin { - /** - * If compile on save is enabled for the project - */ - compileOnSave?: boolean; - } - /** - * For external projects, some of the project settings are sent together with - * compiler settings. - */ - type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions; - interface FileWithProjectReferenceRedirectInfo { - /** - * Name of file - */ - fileName: string; - /** - * True if the file is primarily included in a referenced project - */ - isSourceOfProjectReferenceRedirect: boolean; - } - /** - * Represents a set of changes that happen in project - */ - interface ProjectChanges { - /** - * List of added files - */ - added: string[] | FileWithProjectReferenceRedirectInfo[]; - /** - * List of removed files - */ - removed: string[] | FileWithProjectReferenceRedirectInfo[]; - /** - * List of updated files - */ - updated: string[] | FileWithProjectReferenceRedirectInfo[]; - /** - * List of files that have had their project reference redirect status updated - * Only provided when the synchronizeProjectList request has includeProjectReferenceRedirectInfo set to true - */ - updatedRedirects?: FileWithProjectReferenceRedirectInfo[]; - } - /** - * Information found in a configure request. - */ - interface ConfigureRequestArguments { - /** - * Information about the host, for example 'Emacs 24.4' or - * 'Sublime Text version 3075' - */ - hostInfo?: string; - /** - * If present, tab settings apply only to this file. - */ - file?: string; - /** - * The format options to use during formatting and other code editing features. - */ - formatOptions?: FormatCodeSettings; - preferences?: UserPreferences; - /** - * The host's additional supported .js file extensions - */ - extraFileExtensions?: FileExtensionInfo[]; - watchOptions?: WatchOptions; - } - enum WatchFileKind { - FixedPollingInterval = "FixedPollingInterval", - PriorityPollingInterval = "PriorityPollingInterval", - DynamicPriorityPolling = "DynamicPriorityPolling", - FixedChunkSizePolling = "FixedChunkSizePolling", - UseFsEvents = "UseFsEvents", - UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory" - } - enum WatchDirectoryKind { - UseFsEvents = "UseFsEvents", - FixedPollingInterval = "FixedPollingInterval", - DynamicPriorityPolling = "DynamicPriorityPolling", - FixedChunkSizePolling = "FixedChunkSizePolling" - } - enum PollingWatchKind { - FixedInterval = "FixedInterval", - PriorityInterval = "PriorityInterval", - DynamicPriority = "DynamicPriority", - FixedChunkSize = "FixedChunkSize" - } - interface WatchOptions { - watchFile?: WatchFileKind | ts.WatchFileKind; - watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind; - fallbackPolling?: PollingWatchKind | ts.PollingWatchKind; - synchronousWatchDirectory?: boolean; - excludeDirectories?: string[]; - excludeFiles?: string[]; - [option: string]: CompilerOptionsValue | undefined; - } - /** - * Configure request; value of command field is "configure". Specifies - * host information, such as host type, tab size, and indent size. - */ - interface ConfigureRequest extends Request { - command: CommandTypes.Configure; - arguments: ConfigureRequestArguments; - } - /** - * Response to "configure" request. This is just an acknowledgement, so - * no body field is required. - */ - interface ConfigureResponse extends Response { - } - interface ConfigurePluginRequestArguments { - pluginName: string; - configuration: any; - } - interface ConfigurePluginRequest extends Request { - command: CommandTypes.ConfigurePlugin; - arguments: ConfigurePluginRequestArguments; - } - interface ConfigurePluginResponse extends Response { - } - interface SelectionRangeRequest extends FileRequest { - command: CommandTypes.SelectionRange; - arguments: SelectionRangeRequestArgs; - } - interface SelectionRangeRequestArgs extends FileRequestArgs { - locations: Location[]; - } - interface SelectionRangeResponse extends Response { - body?: SelectionRange[]; - } - interface SelectionRange { - textSpan: TextSpan; - parent?: SelectionRange; - } - interface ToggleLineCommentRequest extends FileRequest { - command: CommandTypes.ToggleLineComment; - arguments: FileRangeRequestArgs; - } - interface ToggleMultilineCommentRequest extends FileRequest { - command: CommandTypes.ToggleMultilineComment; - arguments: FileRangeRequestArgs; - } - interface CommentSelectionRequest extends FileRequest { - command: CommandTypes.CommentSelection; - arguments: FileRangeRequestArgs; - } - interface UncommentSelectionRequest extends FileRequest { - command: CommandTypes.UncommentSelection; - arguments: FileRangeRequestArgs; - } - /** - * Information found in an "open" request. - */ - interface OpenRequestArgs extends FileRequestArgs { - /** - * Used when a version of the file content is known to be more up to date than the one on disk. - * Then the known content will be used upon opening instead of the disk copy - */ - fileContent?: string; - /** - * Used to specify the script kind of the file explicitly. It could be one of the following: - * "TS", "JS", "TSX", "JSX" - */ - scriptKindName?: ScriptKindName; - /** - * Used to limit the searching for project config file. If given the searching will stop at this - * root path; otherwise it will go all the way up to the dist root path. - */ - projectRootPath?: string; - } - type ScriptKindName = "TS" | "JS" | "TSX" | "JSX"; - /** - * Open request; value of command field is "open". Notify the - * server that the client has file open. The server will not - * monitor the filesystem for changes in this file and will assume - * that the client is updating the server (using the change and/or - * reload messages) when the file changes. Server does not currently - * send a response to an open request. - */ - interface OpenRequest extends Request { - command: CommandTypes.Open; - arguments: OpenRequestArgs; - } - /** - * Request to open or update external project - */ - interface OpenExternalProjectRequest extends Request { - command: CommandTypes.OpenExternalProject; - arguments: OpenExternalProjectArgs; - } - /** - * Arguments to OpenExternalProjectRequest request - */ - type OpenExternalProjectArgs = ExternalProject; - /** - * Request to open multiple external projects - */ - interface OpenExternalProjectsRequest extends Request { - command: CommandTypes.OpenExternalProjects; - arguments: OpenExternalProjectsArgs; - } - /** - * Arguments to OpenExternalProjectsRequest - */ - interface OpenExternalProjectsArgs { - /** - * List of external projects to open or update - */ - projects: ExternalProject[]; - } - /** - * Response to OpenExternalProjectRequest request. This is just an acknowledgement, so - * no body field is required. - */ - interface OpenExternalProjectResponse extends Response { - } - /** - * Response to OpenExternalProjectsRequest request. This is just an acknowledgement, so - * no body field is required. - */ - interface OpenExternalProjectsResponse extends Response { - } - /** - * Request to close external project. - */ - interface CloseExternalProjectRequest extends Request { - command: CommandTypes.CloseExternalProject; - arguments: CloseExternalProjectRequestArgs; - } - /** - * Arguments to CloseExternalProjectRequest request - */ - interface CloseExternalProjectRequestArgs { - /** - * Name of the project to close - */ - projectFileName: string; - } - /** - * Response to CloseExternalProjectRequest request. This is just an acknowledgement, so - * no body field is required. - */ - interface CloseExternalProjectResponse extends Response { - } - /** - * Request to synchronize list of open files with the client - */ - interface UpdateOpenRequest extends Request { - command: CommandTypes.UpdateOpen; - arguments: UpdateOpenRequestArgs; - } - /** - * Arguments to UpdateOpenRequest - */ - interface UpdateOpenRequestArgs { - /** - * List of newly open files - */ - openFiles?: OpenRequestArgs[]; - /** - * List of open files files that were changes - */ - changedFiles?: FileCodeEdits[]; - /** - * List of files that were closed - */ - closedFiles?: string[]; - } - /** - * External projects have a typeAcquisition option so they need to be added separately to compiler options for inferred projects. - */ - type InferredProjectCompilerOptions = ExternalProjectCompilerOptions & TypeAcquisition; - /** - * Request to set compiler options for inferred projects. - * External projects are opened / closed explicitly. - * Configured projects are opened when user opens loose file that has 'tsconfig.json' or 'jsconfig.json' anywhere in one of containing folders. - * This configuration file will be used to obtain a list of files and configuration settings for the project. - * Inferred projects are created when user opens a loose file that is not the part of external project - * or configured project and will contain only open file and transitive closure of referenced files if 'useOneInferredProject' is false, - * or all open loose files and its transitive closure of referenced files if 'useOneInferredProject' is true. - */ - interface SetCompilerOptionsForInferredProjectsRequest extends Request { - command: CommandTypes.CompilerOptionsForInferredProjects; - arguments: SetCompilerOptionsForInferredProjectsArgs; - } - /** - * Argument for SetCompilerOptionsForInferredProjectsRequest request. - */ - interface SetCompilerOptionsForInferredProjectsArgs { - /** - * Compiler options to be used with inferred projects. - */ - options: InferredProjectCompilerOptions; - /** - * Specifies the project root path used to scope compiler options. - * It is an error to provide this property if the server has not been started with - * `useInferredProjectPerProjectRoot` enabled. - */ - projectRootPath?: string; - } - /** - * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so - * no body field is required. - */ - interface SetCompilerOptionsForInferredProjectsResponse extends Response { - } - /** - * Exit request; value of command field is "exit". Ask the server process - * to exit. - */ - interface ExitRequest extends Request { - command: CommandTypes.Exit; - } - /** - * Close request; value of command field is "close". Notify the - * server that the client has closed a previously open file. If - * file is still referenced by open files, the server will resume - * monitoring the filesystem for changes to file. Server does not - * currently send a response to a close request. - */ - interface CloseRequest extends FileRequest { - command: CommandTypes.Close; - } - /** - * Request to obtain the list of files that should be regenerated if target file is recompiled. - * NOTE: this us query-only operation and does not generate any output on disk. - */ - interface CompileOnSaveAffectedFileListRequest extends FileRequest { - command: CommandTypes.CompileOnSaveAffectedFileList; - } - /** - * Contains a list of files that should be regenerated in a project - */ - interface CompileOnSaveAffectedFileListSingleProject { - /** - * Project name - */ - projectFileName: string; - /** - * List of files names that should be recompiled - */ - fileNames: string[]; - /** - * true if project uses outFile or out compiler option - */ - projectUsesOutFile: boolean; - } - /** - * Response for CompileOnSaveAffectedFileListRequest request; - */ - interface CompileOnSaveAffectedFileListResponse extends Response { - body: CompileOnSaveAffectedFileListSingleProject[]; - } - /** - * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk. - */ - interface CompileOnSaveEmitFileRequest extends FileRequest { - command: CommandTypes.CompileOnSaveEmitFile; - arguments: CompileOnSaveEmitFileRequestArgs; - } - /** - * Arguments for CompileOnSaveEmitFileRequest - */ - interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs { - /** - * if true - then file should be recompiled even if it does not have any changes. - */ - forced?: boolean; - includeLinePosition?: boolean; - /** if true - return response as object with emitSkipped and diagnostics */ - richResponse?: boolean; - } - interface CompileOnSaveEmitFileResponse extends Response { - body: boolean | EmitResult; - } - interface EmitResult { - emitSkipped: boolean; - diagnostics: Diagnostic[] | DiagnosticWithLinePosition[]; - } - /** - * Quickinfo request; value of command field is - * "quickinfo". Return response giving a quick type and - * documentation string for the symbol found in file at location - * line, col. - */ - interface QuickInfoRequest extends FileLocationRequest { - command: CommandTypes.Quickinfo; - arguments: FileLocationRequestArgs; - } - /** - * Body of QuickInfoResponse. - */ - interface QuickInfoResponseBody { - /** - * The symbol's kind (such as 'className' or 'parameterName' or plain 'text'). - */ - kind: ScriptElementKind; - /** - * Optional modifiers for the kind (such as 'public'). - */ - kindModifiers: string; - /** - * Starting file location of symbol. - */ - start: Location; - /** - * One past last character of symbol. - */ - end: Location; - /** - * Type and kind of symbol. - */ - displayString: string; - /** - * Documentation associated with symbol. - * Display parts when UserPreferences.displayPartsForJSDoc is true, flattened to string otherwise. - */ - documentation: string | SymbolDisplayPart[]; - /** - * JSDoc tags associated with symbol. - */ - tags: JSDocTagInfo[]; - } - /** - * Quickinfo response message. - */ - interface QuickInfoResponse extends Response { - body?: QuickInfoResponseBody; - } - /** - * Arguments for format messages. - */ - interface FormatRequestArgs extends FileLocationRequestArgs { - /** - * Last line of range for which to format text in file. - */ - endLine: number; - /** - * Character offset on last line of range for which to format text in file. - */ - endOffset: number; - /** - * Format options to be used. - */ - options?: FormatCodeSettings; - } - /** - * Format request; value of command field is "format". Return - * response giving zero or more edit instructions. The edit - * instructions will be sorted in file order. Applying the edit - * instructions in reverse to file will result in correctly - * reformatted text. - */ - interface FormatRequest extends FileLocationRequest { - command: CommandTypes.Format; - arguments: FormatRequestArgs; - } - /** - * Object found in response messages defining an editing - * instruction for a span of text in source code. The effect of - * this instruction is to replace the text starting at start and - * ending one character before end with newText. For an insertion, - * the text span is empty. For a deletion, newText is empty. - */ - interface CodeEdit { - /** - * First character of the text span to edit. - */ - start: Location; - /** - * One character past last character of the text span to edit. - */ - end: Location; - /** - * Replace the span defined above with this string (may be - * the empty string). - */ - newText: string; - } - interface FileCodeEdits { - fileName: string; - textChanges: CodeEdit[]; - } - interface CodeFixResponse extends Response { - /** The code actions that are available */ - body?: CodeFixAction[]; - } - interface CodeAction { - /** Description of the code action to display in the UI of the editor */ - description: string; - /** Text changes to apply to each file as part of the code action */ - changes: FileCodeEdits[]; - /** A command is an opaque object that should be passed to `ApplyCodeActionCommandRequestArgs` without modification. */ - commands?: {}[]; - } - interface CombinedCodeActions { - changes: readonly FileCodeEdits[]; - commands?: readonly {}[]; - } - interface CodeFixAction extends CodeAction { - /** Short name to identify the fix, for use by telemetry. */ - fixName: string; - /** - * If present, one may call 'getCombinedCodeFix' with this fixId. - * This may be omitted to indicate that the code fix can't be applied in a group. - */ - fixId?: {}; - /** Should be present if and only if 'fixId' is. */ - fixAllDescription?: string; - } - /** - * Format and format on key response message. - */ - interface FormatResponse extends Response { - body?: CodeEdit[]; - } - /** - * Arguments for format on key messages. - */ - interface FormatOnKeyRequestArgs extends FileLocationRequestArgs { - /** - * Key pressed (';', '\n', or '}'). - */ - key: string; - options?: FormatCodeSettings; - } - /** - * Format on key request; value of command field is - * "formatonkey". Given file location and key typed (as string), - * return response giving zero or more edit instructions. The - * edit instructions will be sorted in file order. Applying the - * edit instructions in reverse to file will result in correctly - * reformatted text. - */ - interface FormatOnKeyRequest extends FileLocationRequest { - command: CommandTypes.Formatonkey; - arguments: FormatOnKeyRequestArgs; - } - type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " "; - enum CompletionTriggerKind { - /** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */ - Invoked = 1, - /** Completion was triggered by a trigger character. */ - TriggerCharacter = 2, - /** Completion was re-triggered as the current completion list is incomplete. */ - TriggerForIncompleteCompletions = 3 - } - /** - * Arguments for completions messages. - */ - interface CompletionsRequestArgs extends FileLocationRequestArgs { - /** - * Optional prefix to apply to possible completions. - */ - prefix?: string; - /** - * Character that was responsible for triggering completion. - * Should be `undefined` if a user manually requested completion. - */ - triggerCharacter?: CompletionsTriggerCharacter; - triggerKind?: CompletionTriggerKind; - /** - * @deprecated Use UserPreferences.includeCompletionsForModuleExports - */ - includeExternalModuleExports?: boolean; - /** - * @deprecated Use UserPreferences.includeCompletionsWithInsertText - */ - includeInsertTextCompletions?: boolean; - } - /** - * Completions request; value of command field is "completions". - * Given a file location (file, line, col) and a prefix (which may - * be the empty string), return the possible completions that - * begin with prefix. - */ - interface CompletionsRequest extends FileLocationRequest { - command: CommandTypes.Completions | CommandTypes.CompletionInfo; - arguments: CompletionsRequestArgs; - } - /** - * Arguments for completion details request. - */ - interface CompletionDetailsRequestArgs extends FileLocationRequestArgs { - /** - * Names of one or more entries for which to obtain details. - */ - entryNames: (string | CompletionEntryIdentifier)[]; - } - interface CompletionEntryIdentifier { - name: string; - source?: string; - data?: unknown; - } - /** - * Completion entry details request; value of command field is - * "completionEntryDetails". Given a file location (file, line, - * col) and an array of completion entry names return more - * detailed information for each completion entry. - */ - interface CompletionDetailsRequest extends FileLocationRequest { - command: CommandTypes.CompletionDetails; - arguments: CompletionDetailsRequestArgs; - } - /** - * Part of a symbol description. - */ - interface SymbolDisplayPart { - /** - * Text of an item describing the symbol. - */ - text: string; - /** - * The symbol's kind (such as 'className' or 'parameterName' or plain 'text'). - */ - kind: string; - } - /** A part of a symbol description that links from a jsdoc @link tag to a declaration */ - interface JSDocLinkDisplayPart extends SymbolDisplayPart { - /** The location of the declaration that the @link tag links to. */ - target: FileSpan; - } - /** - * An item found in a completion response. - */ - interface CompletionEntry { - /** - * The symbol's name. - */ - name: string; - /** - * The symbol's kind (such as 'className' or 'parameterName'). - */ - kind: ScriptElementKind; - /** - * Optional modifiers for the kind (such as 'public'). - */ - kindModifiers?: string; - /** - * A string that is used for comparing completion items so that they can be ordered. This - * is often the same as the name but may be different in certain circumstances. - */ - sortText: string; - /** - * Text to insert instead of `name`. - * This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`, - * coupled with `replacementSpan` to replace a dotted access with a bracket access. - */ - insertText?: string; - /** - * A string that should be used when filtering a set of - * completion items. - */ - filterText?: string; - /** - * `insertText` should be interpreted as a snippet if true. - */ - isSnippet?: true; - /** - * An optional span that indicates the text to be replaced by this completion item. - * If present, this span should be used instead of the default one. - * It will be set if the required span differs from the one generated by the default replacement behavior. - */ - replacementSpan?: TextSpan; - /** - * Indicates whether commiting this completion entry will require additional code actions to be - * made to avoid errors. The CompletionEntryDetails will have these actions. - */ - hasAction?: true; - /** - * Identifier (not necessarily human-readable) identifying where this completion came from. - */ - source?: string; - /** - * Human-readable description of the `source`. - */ - sourceDisplay?: SymbolDisplayPart[]; - /** - * Additional details for the label. - */ - labelDetails?: CompletionEntryLabelDetails; - /** - * If true, this completion should be highlighted as recommended. There will only be one of these. - * This will be set when we know the user should write an expression with a certain type and that type is an enum or constructable class. - * Then either that enum/class or a namespace containing it will be the recommended symbol. - */ - isRecommended?: true; - /** - * If true, this completion was generated from traversing the name table of an unchecked JS file, - * and therefore may not be accurate. - */ - isFromUncheckedFile?: true; - /** - * If true, this completion was for an auto-import of a module not yet in the program, but listed - * in the project package.json. Used for telemetry reporting. - */ - isPackageJsonImport?: true; - /** - * If true, this completion was an auto-import-style completion of an import statement (i.e., the - * module specifier was inserted along with the imported identifier). Used for telemetry reporting. - */ - isImportStatementCompletion?: true; - /** - * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`, - * that allows TS Server to look up the symbol represented by the completion item, disambiguating - * items with the same name. - */ - data?: unknown; - } - interface CompletionEntryLabelDetails { - /** - * An optional string which is rendered less prominently directly after - * {@link CompletionEntry.name name}, without any spacing. Should be - * used for function signatures or type annotations. - */ - detail?: string; - /** - * An optional string which is rendered less prominently after - * {@link CompletionEntryLabelDetails.detail}. Should be used for fully qualified - * names or file path. - */ - description?: string; - } - /** - * Additional completion entry details, available on demand - */ - interface CompletionEntryDetails { - /** - * The symbol's name. - */ - name: string; - /** - * The symbol's kind (such as 'className' or 'parameterName'). - */ - kind: ScriptElementKind; - /** - * Optional modifiers for the kind (such as 'public'). - */ - kindModifiers: string; - /** - * Display parts of the symbol (similar to quick info). - */ - displayParts: SymbolDisplayPart[]; - /** - * Documentation strings for the symbol. - */ - documentation?: SymbolDisplayPart[]; - /** - * JSDoc tags for the symbol. - */ - tags?: JSDocTagInfo[]; - /** - * The associated code actions for this entry - */ - codeActions?: CodeAction[]; - /** - * @deprecated Use `sourceDisplay` instead. - */ - source?: SymbolDisplayPart[]; - /** - * Human-readable description of the `source` from the CompletionEntry. - */ - sourceDisplay?: SymbolDisplayPart[]; - } - /** @deprecated Prefer CompletionInfoResponse, which supports several top-level fields in addition to the array of entries. */ - interface CompletionsResponse extends Response { - body?: CompletionEntry[]; - } - interface CompletionInfoResponse extends Response { - body?: CompletionInfo; - } - interface CompletionInfo { - readonly flags?: number; - readonly isGlobalCompletion: boolean; - readonly isMemberCompletion: boolean; - readonly isNewIdentifierLocation: boolean; - /** - * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use - * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span - * must be used to commit that completion entry. - */ - readonly optionalReplacementSpan?: TextSpan; - readonly isIncomplete?: boolean; - readonly entries: readonly CompletionEntry[]; - } - interface CompletionDetailsResponse extends Response { - body?: CompletionEntryDetails[]; - } - /** - * Signature help information for a single parameter - */ - interface SignatureHelpParameter { - /** - * The parameter's name - */ - name: string; - /** - * Documentation of the parameter. - */ - documentation: SymbolDisplayPart[]; - /** - * Display parts of the parameter. - */ - displayParts: SymbolDisplayPart[]; - /** - * Whether the parameter is optional or not. - */ - isOptional: boolean; - } - /** - * Represents a single signature to show in signature help. - */ - interface SignatureHelpItem { - /** - * Whether the signature accepts a variable number of arguments. - */ - isVariadic: boolean; - /** - * The prefix display parts. - */ - prefixDisplayParts: SymbolDisplayPart[]; - /** - * The suffix display parts. - */ - suffixDisplayParts: SymbolDisplayPart[]; - /** - * The separator display parts. - */ - separatorDisplayParts: SymbolDisplayPart[]; - /** - * The signature helps items for the parameters. - */ - parameters: SignatureHelpParameter[]; - /** - * The signature's documentation - */ - documentation: SymbolDisplayPart[]; - /** - * The signature's JSDoc tags - */ - tags: JSDocTagInfo[]; - } - /** - * Signature help items found in the response of a signature help request. - */ - interface SignatureHelpItems { - /** - * The signature help items. - */ - items: SignatureHelpItem[]; - /** - * The span for which signature help should appear on a signature - */ - applicableSpan: TextSpan; - /** - * The item selected in the set of available help items. - */ - selectedItemIndex: number; - /** - * The argument selected in the set of parameters. - */ - argumentIndex: number; - /** - * The argument count - */ - argumentCount: number; - } - type SignatureHelpTriggerCharacter = "," | "(" | "<"; - type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")"; - /** - * Arguments of a signature help request. - */ - interface SignatureHelpRequestArgs extends FileLocationRequestArgs { - /** - * Reason why signature help was invoked. - * See each individual possible - */ - triggerReason?: SignatureHelpTriggerReason; - } - type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason; - /** - * Signals that the user manually requested signature help. - * The language service will unconditionally attempt to provide a result. - */ - interface SignatureHelpInvokedReason { - kind: "invoked"; - triggerCharacter?: undefined; - } - /** - * Signals that the signature help request came from a user typing a character. - * Depending on the character and the syntactic context, the request may or may not be served a result. - */ - interface SignatureHelpCharacterTypedReason { - kind: "characterTyped"; - /** - * Character that was responsible for triggering signature help. - */ - triggerCharacter: SignatureHelpTriggerCharacter; - } - /** - * Signals that this signature help request came from typing a character or moving the cursor. - * This should only occur if a signature help session was already active and the editor needs to see if it should adjust. - * The language service will unconditionally attempt to provide a result. - * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move. - */ - interface SignatureHelpRetriggeredReason { - kind: "retrigger"; - /** - * Character that was responsible for triggering signature help. - */ - triggerCharacter?: SignatureHelpRetriggerCharacter; - } - /** - * Signature help request; value of command field is "signatureHelp". - * Given a file location (file, line, col), return the signature - * help. - */ - interface SignatureHelpRequest extends FileLocationRequest { - command: CommandTypes.SignatureHelp; - arguments: SignatureHelpRequestArgs; - } - /** - * Response object for a SignatureHelpRequest. - */ - interface SignatureHelpResponse extends Response { - body?: SignatureHelpItems; - } - type InlayHintKind = "Type" | "Parameter" | "Enum"; - interface InlayHintsRequestArgs extends FileRequestArgs { - /** - * Start position of the span. - */ - start: number; - /** - * Length of the span. - */ - length: number; - } - interface InlayHintsRequest extends Request { - command: CommandTypes.ProvideInlayHints; - arguments: InlayHintsRequestArgs; - } - interface InlayHintItem { - /** This property will be the empty string when displayParts is set. */ - text: string; - position: Location; - kind: InlayHintKind; - whitespaceBefore?: boolean; - whitespaceAfter?: boolean; - displayParts?: InlayHintItemDisplayPart[]; - } - interface InlayHintItemDisplayPart { - text: string; - span?: FileSpan; - } - interface InlayHintsResponse extends Response { - body?: InlayHintItem[]; - } - /** - * Synchronous request for semantic diagnostics of one file. - */ - interface SemanticDiagnosticsSyncRequest extends FileRequest { - command: CommandTypes.SemanticDiagnosticsSync; - arguments: SemanticDiagnosticsSyncRequestArgs; - } - interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs { - includeLinePosition?: boolean; - } - /** - * Response object for synchronous sematic diagnostics request. - */ - interface SemanticDiagnosticsSyncResponse extends Response { - body?: Diagnostic[] | DiagnosticWithLinePosition[]; - } - interface SuggestionDiagnosticsSyncRequest extends FileRequest { - command: CommandTypes.SuggestionDiagnosticsSync; - arguments: SuggestionDiagnosticsSyncRequestArgs; - } - type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs; - type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse; - /** - * Synchronous request for syntactic diagnostics of one file. - */ - interface SyntacticDiagnosticsSyncRequest extends FileRequest { - command: CommandTypes.SyntacticDiagnosticsSync; - arguments: SyntacticDiagnosticsSyncRequestArgs; - } - interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs { - includeLinePosition?: boolean; - } - /** - * Response object for synchronous syntactic diagnostics request. - */ - interface SyntacticDiagnosticsSyncResponse extends Response { - body?: Diagnostic[] | DiagnosticWithLinePosition[]; - } - /** - * Arguments for GeterrForProject request. - */ - interface GeterrForProjectRequestArgs { - /** - * the file requesting project error list - */ - file: string; - /** - * Delay in milliseconds to wait before starting to compute - * errors for the files in the file list - */ - delay: number; - } - /** - * GeterrForProjectRequest request; value of command field is - * "geterrForProject". It works similarly with 'Geterr', only - * it request for every file in this project. - */ - interface GeterrForProjectRequest extends Request { - command: CommandTypes.GeterrForProject; - arguments: GeterrForProjectRequestArgs; - } - /** - * Arguments for geterr messages. - */ - interface GeterrRequestArgs { - /** - * List of file names for which to compute compiler errors. - * The files will be checked in list order. - */ - files: string[]; - /** - * Delay in milliseconds to wait before starting to compute - * errors for the files in the file list - */ - delay: number; - } - /** - * Geterr request; value of command field is "geterr". Wait for - * delay milliseconds and then, if during the wait no change or - * reload messages have arrived for the first file in the files - * list, get the syntactic errors for the file, field requests, - * and then get the semantic errors for the file. Repeat with a - * smaller delay for each subsequent file on the files list. Best - * practice for an editor is to send a file list containing each - * file that is currently visible, in most-recently-used order. - */ - interface GeterrRequest extends Request { - command: CommandTypes.Geterr; - arguments: GeterrRequestArgs; - } - type RequestCompletedEventName = "requestCompleted"; - /** - * Event that is sent when server have finished processing request with specified id. - */ - interface RequestCompletedEvent extends Event { - event: RequestCompletedEventName; - body: RequestCompletedEventBody; - } - interface RequestCompletedEventBody { - request_seq: number; - } - /** - * Item of diagnostic information found in a DiagnosticEvent message. - */ - interface Diagnostic { - /** - * Starting file location at which text applies. - */ - start: Location; - /** - * The last file location at which the text applies. - */ - end: Location; - /** - * Text of diagnostic message. - */ - text: string; - /** - * The category of the diagnostic message, e.g. "error", "warning", or "suggestion". - */ - category: string; - reportsUnnecessary?: {}; - reportsDeprecated?: {}; - /** - * Any related spans the diagnostic may have, such as other locations relevant to an error, such as declarartion sites - */ - relatedInformation?: DiagnosticRelatedInformation[]; - /** - * The error code of the diagnostic message. - */ - code?: number; - /** - * The name of the plugin reporting the message. - */ - source?: string; - } - interface DiagnosticWithFileName extends Diagnostic { - /** - * Name of the file the diagnostic is in - */ - fileName: string; - } - /** - * Represents additional spans returned with a diagnostic which are relevant to it - */ - interface DiagnosticRelatedInformation { - /** - * The category of the related information message, e.g. "error", "warning", or "suggestion". - */ - category: string; - /** - * The code used ot identify the related information - */ - code: number; - /** - * Text of related or additional information. - */ - message: string; - /** - * Associated location - */ - span?: FileSpan; - } - interface DiagnosticEventBody { - /** - * The file for which diagnostic information is reported. - */ - file: string; - /** - * An array of diagnostic information items. - */ - diagnostics: Diagnostic[]; - } - type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag"; - /** - * Event message for DiagnosticEventKind event types. - * These events provide syntactic and semantic errors for a file. - */ - interface DiagnosticEvent extends Event { - body?: DiagnosticEventBody; - event: DiagnosticEventKind; - } - interface ConfigFileDiagnosticEventBody { - /** - * The file which trigged the searching and error-checking of the config file - */ - triggerFile: string; - /** - * The name of the found config file. - */ - configFile: string; - /** - * An arry of diagnostic information items for the found config file. - */ - diagnostics: DiagnosticWithFileName[]; - } - /** - * Event message for "configFileDiag" event type. - * This event provides errors for a found config file. - */ - interface ConfigFileDiagnosticEvent extends Event { - body?: ConfigFileDiagnosticEventBody; - event: "configFileDiag"; - } - type ProjectLanguageServiceStateEventName = "projectLanguageServiceState"; - interface ProjectLanguageServiceStateEvent extends Event { - event: ProjectLanguageServiceStateEventName; - body?: ProjectLanguageServiceStateEventBody; - } - interface ProjectLanguageServiceStateEventBody { - /** - * Project name that has changes in the state of language service. - * For configured projects this will be the config file path. - * For external projects this will be the name of the projects specified when project was open. - * For inferred projects this event is not raised. - */ - projectName: string; - /** - * True if language service state switched from disabled to enabled - * and false otherwise. - */ - languageServiceEnabled: boolean; - } - type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground"; - interface ProjectsUpdatedInBackgroundEvent extends Event { - event: ProjectsUpdatedInBackgroundEventName; - body: ProjectsUpdatedInBackgroundEventBody; - } - interface ProjectsUpdatedInBackgroundEventBody { - /** - * Current set of open files - */ - openFiles: string[]; - } - type ProjectLoadingStartEventName = "projectLoadingStart"; - interface ProjectLoadingStartEvent extends Event { - event: ProjectLoadingStartEventName; - body: ProjectLoadingStartEventBody; - } - interface ProjectLoadingStartEventBody { - /** name of the project */ - projectName: string; - /** reason for loading */ - reason: string; - } - type ProjectLoadingFinishEventName = "projectLoadingFinish"; - interface ProjectLoadingFinishEvent extends Event { - event: ProjectLoadingFinishEventName; - body: ProjectLoadingFinishEventBody; - } - interface ProjectLoadingFinishEventBody { - /** name of the project */ - projectName: string; - } - type SurveyReadyEventName = "surveyReady"; - interface SurveyReadyEvent extends Event { - event: SurveyReadyEventName; - body: SurveyReadyEventBody; - } - interface SurveyReadyEventBody { - /** Name of the survey. This is an internal machine- and programmer-friendly name */ - surveyId: string; - } - type LargeFileReferencedEventName = "largeFileReferenced"; - interface LargeFileReferencedEvent extends Event { - event: LargeFileReferencedEventName; - body: LargeFileReferencedEventBody; - } - interface LargeFileReferencedEventBody { - /** - * name of the large file being loaded - */ - file: string; - /** - * size of the file - */ - fileSize: number; - /** - * max file size allowed on the server - */ - maxFileSize: number; - } - /** - * Arguments for reload request. - */ - interface ReloadRequestArgs extends FileRequestArgs { - /** - * Name of temporary file from which to reload file - * contents. May be same as file. - */ - tmpfile: string; - } - /** - * Reload request message; value of command field is "reload". - * Reload contents of file with name given by the 'file' argument - * from temporary file with name given by the 'tmpfile' argument. - * The two names can be identical. - */ - interface ReloadRequest extends FileRequest { - command: CommandTypes.Reload; - arguments: ReloadRequestArgs; - } - /** - * Response to "reload" request. This is just an acknowledgement, so - * no body field is required. - */ - interface ReloadResponse extends Response { - } - /** - * Arguments for saveto request. - */ - interface SavetoRequestArgs extends FileRequestArgs { - /** - * Name of temporary file into which to save server's view of - * file contents. - */ - tmpfile: string; - } - /** - * Saveto request message; value of command field is "saveto". - * For debugging purposes, save to a temporaryfile (named by - * argument 'tmpfile') the contents of file named by argument - * 'file'. The server does not currently send a response to a - * "saveto" request. - */ - interface SavetoRequest extends FileRequest { - command: CommandTypes.Saveto; - arguments: SavetoRequestArgs; - } - /** - * Arguments for navto request message. - */ - interface NavtoRequestArgs { - /** - * Search term to navigate to from current location; term can - * be '.*' or an identifier prefix. - */ - searchValue: string; - /** - * Optional limit on the number of items to return. - */ - maxResultCount?: number; - /** - * The file for the request (absolute pathname required). - */ - file?: string; - /** - * Optional flag to indicate we want results for just the current file - * or the entire project. - */ - currentFileOnly?: boolean; - projectFileName?: string; - } - /** - * Navto request message; value of command field is "navto". - * Return list of objects giving file locations and symbols that - * match the search term given in argument 'searchTerm'. The - * context for the search is given by the named file. - */ - interface NavtoRequest extends Request { - command: CommandTypes.Navto; - arguments: NavtoRequestArgs; - } - /** - * An item found in a navto response. - */ - interface NavtoItem extends FileSpan { - /** - * The symbol's name. - */ - name: string; - /** - * The symbol's kind (such as 'className' or 'parameterName'). - */ - kind: ScriptElementKind; - /** - * exact, substring, or prefix. - */ - matchKind: string; - /** - * If this was a case sensitive or insensitive match. - */ - isCaseSensitive: boolean; - /** - * Optional modifiers for the kind (such as 'public'). - */ - kindModifiers?: string; - /** - * Name of symbol's container symbol (if any); for example, - * the class name if symbol is a class member. - */ - containerName?: string; - /** - * Kind of symbol's container symbol (if any). - */ - containerKind?: ScriptElementKind; - } - /** - * Navto response message. Body is an array of navto items. Each - * item gives a symbol that matched the search term. - */ - interface NavtoResponse extends Response { - body?: NavtoItem[]; - } - /** - * Arguments for change request message. - */ - interface ChangeRequestArgs extends FormatRequestArgs { - /** - * Optional string to insert at location (file, line, offset). - */ - insertString?: string; - } - /** - * Change request message; value of command field is "change". - * Update the server's view of the file named by argument 'file'. - * Server does not currently send a response to a change request. - */ - interface ChangeRequest extends FileLocationRequest { - command: CommandTypes.Change; - arguments: ChangeRequestArgs; - } - /** - * Response to "brace" request. - */ - interface BraceResponse extends Response { - body?: TextSpan[]; - } - /** - * Brace matching request; value of command field is "brace". - * Return response giving the file locations of matching braces - * found in file at location line, offset. - */ - interface BraceRequest extends FileLocationRequest { - command: CommandTypes.Brace; - } - /** - * NavBar items request; value of command field is "navbar". - * Return response giving the list of navigation bar entries - * extracted from the requested file. - */ - interface NavBarRequest extends FileRequest { - command: CommandTypes.NavBar; - } - /** - * NavTree request; value of command field is "navtree". - * Return response giving the navigation tree of the requested file. - */ - interface NavTreeRequest extends FileRequest { - command: CommandTypes.NavTree; - } - interface NavigationBarItem { - /** - * The item's display text. - */ - text: string; - /** - * The symbol's kind (such as 'className' or 'parameterName'). - */ - kind: ScriptElementKind; - /** - * Optional modifiers for the kind (such as 'public'). - */ - kindModifiers?: string; - /** - * The definition locations of the item. - */ - spans: TextSpan[]; - /** - * Optional children. - */ - childItems?: NavigationBarItem[]; - /** - * Number of levels deep this item should appear. - */ - indent: number; - } - /** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */ - interface NavigationTree { - text: string; - kind: ScriptElementKind; - kindModifiers: string; - spans: TextSpan[]; - nameSpan: TextSpan | undefined; - childItems?: NavigationTree[]; - } - type TelemetryEventName = "telemetry"; - interface TelemetryEvent extends Event { - event: TelemetryEventName; - body: TelemetryEventBody; - } - interface TelemetryEventBody { - telemetryEventName: string; - payload: any; - } - type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed"; - interface TypesInstallerInitializationFailedEvent extends Event { - event: TypesInstallerInitializationFailedEventName; - body: TypesInstallerInitializationFailedEventBody; - } - interface TypesInstallerInitializationFailedEventBody { - message: string; - } - type TypingsInstalledTelemetryEventName = "typingsInstalled"; - interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody { - telemetryEventName: TypingsInstalledTelemetryEventName; - payload: TypingsInstalledTelemetryEventPayload; - } - interface TypingsInstalledTelemetryEventPayload { - /** - * Comma separated list of installed typing packages - */ - installedPackages: string; - /** - * true if install request succeeded, otherwise - false - */ - installSuccess: boolean; - /** - * version of typings installer - */ - typingsInstallerVersion: string; - } - type BeginInstallTypesEventName = "beginInstallTypes"; - type EndInstallTypesEventName = "endInstallTypes"; - interface BeginInstallTypesEvent extends Event { - event: BeginInstallTypesEventName; - body: BeginInstallTypesEventBody; - } - interface EndInstallTypesEvent extends Event { - event: EndInstallTypesEventName; - body: EndInstallTypesEventBody; - } - interface InstallTypesEventBody { - /** - * correlation id to match begin and end events - */ - eventId: number; - /** - * list of packages to install - */ - packages: readonly string[]; - } - interface BeginInstallTypesEventBody extends InstallTypesEventBody { - } - interface EndInstallTypesEventBody extends InstallTypesEventBody { - /** - * true if installation succeeded, otherwise false - */ - success: boolean; - } - interface NavBarResponse extends Response { - body?: NavigationBarItem[]; - } - interface NavTreeResponse extends Response { - body?: NavigationTree; - } - interface CallHierarchyItem { - name: string; - kind: ScriptElementKind; - kindModifiers?: string; - file: string; - span: TextSpan; - selectionSpan: TextSpan; - containerName?: string; - } - interface CallHierarchyIncomingCall { - from: CallHierarchyItem; - fromSpans: TextSpan[]; - } - interface CallHierarchyOutgoingCall { - to: CallHierarchyItem; - fromSpans: TextSpan[]; - } - interface PrepareCallHierarchyRequest extends FileLocationRequest { - command: CommandTypes.PrepareCallHierarchy; - } - interface PrepareCallHierarchyResponse extends Response { - readonly body: CallHierarchyItem | CallHierarchyItem[]; - } - interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest { - command: CommandTypes.ProvideCallHierarchyIncomingCalls; - } - interface ProvideCallHierarchyIncomingCallsResponse extends Response { - readonly body: CallHierarchyIncomingCall[]; - } - interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest { - command: CommandTypes.ProvideCallHierarchyOutgoingCalls; - } - interface ProvideCallHierarchyOutgoingCallsResponse extends Response { - readonly body: CallHierarchyOutgoingCall[]; - } - enum IndentStyle { - None = "None", - Block = "Block", - Smart = "Smart" - } - enum SemicolonPreference { - Ignore = "ignore", - Insert = "insert", - Remove = "remove" - } - interface EditorSettings { - baseIndentSize?: number; - indentSize?: number; - tabSize?: number; - newLineCharacter?: string; - convertTabsToSpaces?: boolean; - indentStyle?: IndentStyle | ts.IndentStyle; - trimTrailingWhitespace?: boolean; - } - interface FormatCodeSettings extends EditorSettings { - insertSpaceAfterCommaDelimiter?: boolean; - insertSpaceAfterSemicolonInForStatements?: boolean; - insertSpaceBeforeAndAfterBinaryOperators?: boolean; - insertSpaceAfterConstructor?: boolean; - insertSpaceAfterKeywordsInControlFlowStatements?: boolean; - insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean; - insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean; - insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean; - insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean; - insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; - insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean; - insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; - insertSpaceAfterTypeAssertion?: boolean; - insertSpaceBeforeFunctionParenthesis?: boolean; - placeOpenBraceOnNewLineForFunctions?: boolean; - placeOpenBraceOnNewLineForControlBlocks?: boolean; - insertSpaceBeforeTypeAnnotation?: boolean; - semicolons?: SemicolonPreference; - indentSwitchCase?: boolean; - } - interface UserPreferences { - readonly disableSuggestions?: boolean; - readonly quotePreference?: "auto" | "double" | "single"; - /** - * If enabled, TypeScript will search through all external modules' exports and add them to the completions list. - * This affects lone identifier completions but not completions on the right hand side of `obj.`. - */ - readonly includeCompletionsForModuleExports?: boolean; - /** - * Enables auto-import-style completions on partially-typed import statements. E.g., allows - * `import write|` to be completed to `import { writeFile } from "fs"`. - */ - readonly includeCompletionsForImportStatements?: boolean; - /** - * Allows completions to be formatted with snippet text, indicated by `CompletionItem["isSnippet"]`. - */ - readonly includeCompletionsWithSnippetText?: boolean; - /** - * If enabled, the completion list will include completions with invalid identifier names. - * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`. - */ - readonly includeCompletionsWithInsertText?: boolean; - /** - * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled, - * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined - * values, with insertion text to replace preceding `.` tokens with `?.`. - */ - readonly includeAutomaticOptionalChainCompletions?: boolean; - /** - * If enabled, completions for class members (e.g. methods and properties) will include - * a whole declaration for the member. - * E.g., `class A { f| }` could be completed to `class A { foo(): number {} }`, instead of - * `class A { foo }`. - */ - readonly includeCompletionsWithClassMemberSnippets?: boolean; - /** - * If enabled, object literal methods will have a method declaration completion entry in addition - * to the regular completion entry containing just the method name. - * E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`, - * in addition to `const objectLiteral: T = { foo }`. - */ - readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; - /** - * Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported. - * If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property. - */ - readonly useLabelDetailsInCompletionEntries?: boolean; - readonly allowIncompleteCompletions?: boolean; - readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative"; - /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ - readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; - readonly allowTextChangesInNewFiles?: boolean; - readonly lazyConfiguredProjectsFromExternalProject?: boolean; - readonly providePrefixAndSuffixTextForRename?: boolean; - readonly provideRefactorNotApplicableReason?: boolean; - readonly allowRenameOfImportPath?: boolean; - readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; - readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none"; - readonly displayPartsForJSDoc?: boolean; - readonly generateReturnInDocTemplate?: boolean; - readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; - readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; - readonly includeInlayFunctionParameterTypeHints?: boolean; - readonly includeInlayVariableTypeHints?: boolean; - readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean; - readonly includeInlayPropertyDeclarationTypeHints?: boolean; - readonly includeInlayFunctionLikeReturnTypeHints?: boolean; - readonly includeInlayEnumMemberValueHints?: boolean; - readonly interactiveInlayHints?: boolean; - readonly autoImportFileExcludePatterns?: string[]; - /** - * Indicates whether imports should be organized in a case-insensitive manner. - */ - readonly organizeImportsIgnoreCase?: "auto" | boolean; - /** - * Indicates whether imports should be organized via an "ordinal" (binary) comparison using the numeric value - * of their code points, or via "unicode" collation (via the - * [Unicode Collation Algorithm](https://unicode.org/reports/tr10/#Scope)) using rules associated with the locale - * specified in {@link organizeImportsCollationLocale}. - * - * Default: `"ordinal"`. - */ - readonly organizeImportsCollation?: "ordinal" | "unicode"; - /** - * Indicates the locale to use for "unicode" collation. If not specified, the locale `"en"` is used as an invariant - * for the sake of consistent sorting. Use `"auto"` to use the detected UI locale. - * - * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. - * - * Default: `"en"` - */ - readonly organizeImportsCollationLocale?: string; - /** - * Indicates whether numeric collation should be used for digit sequences in strings. When `true`, will collate - * strings such that `a1z < a2z < a100z`. When `false`, will collate strings such that `a1z < a100z < a2z`. - * - * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. - * - * Default: `false` - */ - readonly organizeImportsNumericCollation?: boolean; - /** - * Indicates whether accents and other diacritic marks are considered unequal for the purpose of collation. When - * `true`, characters with accents and other diacritics will be collated in the order defined by the locale specified - * in {@link organizeImportsCollationLocale}. - * - * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. - * - * Default: `true` - */ - readonly organizeImportsAccentCollation?: boolean; - /** - * Indicates whether upper case or lower case should sort first. When `false`, the default order for the locale - * specified in {@link organizeImportsCollationLocale} is used. - * - * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. This preference is also - * ignored if we are using case-insensitive sorting, which occurs when {@link organizeImportsIgnoreCase} is `true`, - * or if {@link organizeImportsIgnoreCase} is `"auto"` and the auto-detected case sensitivity is determined to be - * case-insensitive. - * - * Default: `false` - */ - readonly organizeImportsCaseFirst?: "upper" | "lower" | false; - /** - * Indicates whether {@link ReferencesResponseItem.lineText} is supported. - */ - readonly disableLineTextInReferences?: boolean; - } - interface CompilerOptions { - allowJs?: boolean; - allowSyntheticDefaultImports?: boolean; - allowUnreachableCode?: boolean; - allowUnusedLabels?: boolean; - alwaysStrict?: boolean; - baseUrl?: string; - charset?: string; - checkJs?: boolean; - declaration?: boolean; - declarationDir?: string; - disableSizeLimit?: boolean; - downlevelIteration?: boolean; - emitBOM?: boolean; - emitDecoratorMetadata?: boolean; - experimentalDecorators?: boolean; - forceConsistentCasingInFileNames?: boolean; - importHelpers?: boolean; - inlineSourceMap?: boolean; - inlineSources?: boolean; - isolatedModules?: boolean; - jsx?: JsxEmit | ts.JsxEmit; - lib?: string[]; - locale?: string; - mapRoot?: string; - maxNodeModuleJsDepth?: number; - module?: ModuleKind | ts.ModuleKind; - moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind; - newLine?: NewLineKind | ts.NewLineKind; - noEmit?: boolean; - noEmitHelpers?: boolean; - noEmitOnError?: boolean; - noErrorTruncation?: boolean; - noFallthroughCasesInSwitch?: boolean; - noImplicitAny?: boolean; - noImplicitReturns?: boolean; - noImplicitThis?: boolean; - noUnusedLocals?: boolean; - noUnusedParameters?: boolean; - noImplicitUseStrict?: boolean; - noLib?: boolean; - noResolve?: boolean; - out?: string; - outDir?: string; - outFile?: string; - paths?: MapLike; - plugins?: PluginImport[]; - preserveConstEnums?: boolean; - preserveSymlinks?: boolean; - project?: string; - reactNamespace?: string; - removeComments?: boolean; - references?: ProjectReference[]; - rootDir?: string; - rootDirs?: string[]; - skipLibCheck?: boolean; - skipDefaultLibCheck?: boolean; - sourceMap?: boolean; - sourceRoot?: string; - strict?: boolean; - strictNullChecks?: boolean; - suppressExcessPropertyErrors?: boolean; - suppressImplicitAnyIndexErrors?: boolean; - useDefineForClassFields?: boolean; - target?: ScriptTarget | ts.ScriptTarget; - traceResolution?: boolean; - resolveJsonModule?: boolean; - types?: string[]; - /** Paths used to used to compute primary types search locations */ - typeRoots?: string[]; - [option: string]: CompilerOptionsValue | undefined; - } - enum JsxEmit { - None = "None", - Preserve = "Preserve", - ReactNative = "ReactNative", - React = "React" - } - enum ModuleKind { - None = "None", - CommonJS = "CommonJS", - AMD = "AMD", - UMD = "UMD", - System = "System", - ES6 = "ES6", - ES2015 = "ES2015", - ESNext = "ESNext" - } - enum ModuleResolutionKind { - Classic = "Classic", - Node = "Node" - } - enum NewLineKind { - Crlf = "Crlf", - Lf = "Lf" - } - enum ScriptTarget { - ES3 = "ES3", - ES5 = "ES5", - ES6 = "ES6", - ES2015 = "ES2015", - ES2016 = "ES2016", - ES2017 = "ES2017", - ES2018 = "ES2018", - ES2019 = "ES2019", - ES2020 = "ES2020", - ES2021 = "ES2021", - ES2022 = "ES2022", - ESNext = "ESNext" - } - enum ClassificationType { - comment = 1, - identifier = 2, - keyword = 3, - numericLiteral = 4, - operator = 5, - stringLiteral = 6, - regularExpressionLiteral = 7, - whiteSpace = 8, - text = 9, - punctuation = 10, - className = 11, - enumName = 12, - interfaceName = 13, - moduleName = 14, - typeParameterName = 15, - typeAliasName = 16, - parameterName = 17, - docCommentTagName = 18, - jsxOpenTagName = 19, - jsxCloseTagName = 20, - jsxSelfClosingTagName = 21, - jsxAttribute = 22, - jsxText = 23, - jsxAttributeStringLiteralValue = 24, - bigintLiteral = 25 - } - } - namespace typingsInstaller { - interface Log { - isEnabled(): boolean; - writeLine(text: string): void; - } - type RequestCompletedAction = (success: boolean) => void; - interface PendingRequest { - requestId: number; - packageNames: string[]; - cwd: string; - onRequestCompleted: RequestCompletedAction; - } - abstract class TypingsInstaller { - protected readonly installTypingHost: InstallTypingHost; - private readonly globalCachePath; - private readonly safeListPath; - private readonly typesMapLocation; - private readonly throttleLimit; - protected readonly log: Log; - private readonly packageNameToTypingLocation; - private readonly missingTypingsSet; - private readonly knownCachesSet; - private readonly projectWatchers; - private safeList; - private installRunCount; - private inFlightRequestCount; - abstract readonly typesRegistry: Map>; - constructor(installTypingHost: InstallTypingHost, globalCachePath: string, safeListPath: Path, typesMapLocation: Path, throttleLimit: number, log?: Log); - closeProject(req: CloseProject): void; - private closeWatchers; - install(req: DiscoverTypings): void; - private initializeSafeList; - private processCacheLocation; - private filterTypings; - protected ensurePackageDirectoryExists(directory: string): void; - private installTypings; - private ensureDirectoryExists; - private watchFiles; - private createSetTypings; - private installTypingsAsync; - private executeWithThrottling; - protected abstract installWorker(requestId: number, packageNames: string[], cwd: string, onRequestCompleted: RequestCompletedAction): void; - protected abstract sendResponse(response: SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes | WatchTypingLocations): void; - protected readonly latestDistTag = "latest"; - } - } - interface CompressedData { - length: number; - compressionKind: string; - data: any; - } - type ModuleImportResult = { - module: {}; - error: undefined; - } | { - module: undefined; - error: { - stack?: string; - message?: string; - }; - }; - /** @deprecated Use {@link ModuleImportResult} instead. */ - type RequireResult = ModuleImportResult; - interface ServerHost extends System { - watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; - watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; - setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; - clearTimeout(timeoutId: any): void; - setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; - clearImmediate(timeoutId: any): void; - gc?(): void; - trace?(s: string): void; - require?(initialPath: string, moduleName: string): ModuleImportResult; - } - function createInstallTypingsRequest(project: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray, cachePath?: string): DiscoverTypings; - function toNormalizedPath(fileName: string): NormalizedPath; - function normalizedPathToPath(normalizedPath: NormalizedPath, currentDirectory: string, getCanonicalFileName: (f: string) => string): Path; - function asNormalizedPath(fileName: string): NormalizedPath; - function createNormalizedPathMap(): NormalizedPathMap; - function isInferredProjectName(name: string): boolean; - function makeInferredProjectName(counter: number): string; - function createSortedArray(): SortedArray; - enum LogLevel { - terse = 0, - normal = 1, - requestTime = 2, - verbose = 3 - } - const emptyArray: SortedReadonlyArray; - interface Logger { - close(): void; - hasLevel(level: LogLevel): boolean; - loggingEnabled(): boolean; - perftrc(s: string): void; - info(s: string): void; - startGroup(): void; - endGroup(): void; - msg(s: string, type?: Msg): void; - getLogFileName(): string | undefined; - } - enum Msg { - Err = "Err", - Info = "Info", - Perf = "Perf" - } - namespace Errors { - function ThrowNoProject(): never; - function ThrowProjectLanguageServiceDisabled(): never; - function ThrowProjectDoesNotContainDocument(fileName: string, project: Project): never; - } - type NormalizedPath = string & { - __normalizedPathTag: any; - }; - interface NormalizedPathMap { - get(path: NormalizedPath): T | undefined; - set(path: NormalizedPath, value: T): void; - contains(path: NormalizedPath): boolean; - remove(path: NormalizedPath): void; - } - function isDynamicFileName(fileName: NormalizedPath): boolean; - class ScriptInfo { - private readonly host; - readonly fileName: NormalizedPath; - readonly scriptKind: ScriptKind; - readonly hasMixedContent: boolean; - readonly path: Path; - /** - * All projects that include this file - */ - readonly containingProjects: Project[]; - private formatSettings; - private preferences; - constructor(host: ServerHost, fileName: NormalizedPath, scriptKind: ScriptKind, hasMixedContent: boolean, path: Path, initialVersion?: number); - isScriptOpen(): boolean; - open(newText: string | undefined): void; - close(fileExists?: boolean): void; - getSnapshot(): IScriptSnapshot; - private ensureRealPath; - getFormatCodeSettings(): FormatCodeSettings | undefined; - getPreferences(): protocol.UserPreferences | undefined; - attachToProject(project: Project): boolean; - isAttached(project: Project): boolean; - detachFromProject(project: Project): void; - detachAllProjects(): void; - getDefaultProject(): Project; - registerFileUpdate(): void; - setOptions(formatSettings: FormatCodeSettings, preferences: protocol.UserPreferences | undefined): void; - getLatestVersion(): string; - saveTo(fileName: string): void; - reloadFromFile(tempFileName?: NormalizedPath): boolean; - editContent(start: number, end: number, newText: string): void; - markContainingProjectsAsDirty(): void; - isOrphan(): boolean; - /** - * @param line 1 based index - */ - lineToTextSpan(line: number): TextSpan; - /** - * @param line 1 based index - * @param offset 1 based index - */ - lineOffsetToPosition(line: number, offset: number): number; - positionToLineOffset(position: number): protocol.Location; - isJavaScript(): boolean; - } - interface InstallPackageOptionsWithProject extends InstallPackageOptions { - projectName: string; - projectRootPath: Path; - } - interface ITypingsInstaller { - isKnownTypesPackageName(name: string): boolean; - installPackage(options: InstallPackageOptionsWithProject): Promise; - enqueueInstallTypingsRequest(p: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray | undefined): void; - attach(projectService: ProjectService): void; - onProjectClosed(p: Project): void; - readonly globalTypingsCacheLocation: string | undefined; - } - const nullTypingsInstaller: ITypingsInstaller; - function allRootFilesAreJsOrDts(project: Project): boolean; - function allFilesAreJsOrDts(project: Project): boolean; - enum ProjectKind { - Inferred = 0, - Configured = 1, - External = 2, - AutoImportProvider = 3, - Auxiliary = 4 - } - interface PluginCreateInfo { - project: Project; - languageService: LanguageService; - languageServiceHost: LanguageServiceHost; - serverHost: ServerHost; - session?: Session; - config: any; - } - interface PluginModule { - create(createInfo: PluginCreateInfo): LanguageService; - getExternalFiles?(proj: Project): string[]; - onConfigurationChanged?(config: any): void; - } - interface PluginModuleWithName { - name: string; - module: PluginModule; - } - type PluginModuleFactory = (mod: { - typescript: typeof ts; - }) => PluginModule; - abstract class Project implements LanguageServiceHost, ModuleResolutionHost { - readonly projectKind: ProjectKind; - readonly projectService: ProjectService; - private documentRegistry; - private compilerOptions; - compileOnSaveEnabled: boolean; - protected watchOptions: WatchOptions | undefined; - private rootFiles; - private rootFilesMap; - private program; - private externalFiles; - private missingFilesMap; - private generatedFilesMap; - protected languageService: LanguageService; - languageServiceEnabled: boolean; - readonly trace?: (s: string) => void; - readonly realpath?: (path: string) => string; - private builderState; - /** - * Set of files names that were updated since the last call to getChangesSinceVersion. - */ - private updatedFileNames; - /** - * Set of files that was returned from the last call to getChangesSinceVersion. - */ - private lastReportedFileNames; - /** - * Last version that was reported. - */ - private lastReportedVersion; - /** - * Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one) - * This property is changed in 'updateGraph' based on the set of files in program - */ - private projectProgramVersion; - /** - * Current version of the project state. It is changed when: - * - new root file was added/removed - * - edit happen in some file that is currently included in the project. - * This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project - */ - private projectStateVersion; - protected projectErrors: Diagnostic[] | undefined; - protected isInitialLoadPending: () => boolean; - private readonly cancellationToken; - isNonTsProject(): boolean; - isJsOnlyProject(): boolean; - static resolveModule(moduleName: string, initialDir: string, host: ServerHost, log: (message: string) => void): {} | undefined; - isKnownTypesPackageName(name: string): boolean; - installPackage(options: InstallPackageOptions): Promise; - private get typingsCache(); - getCompilationSettings(): ts.CompilerOptions; - getCompilerOptions(): ts.CompilerOptions; - getNewLine(): string; - getProjectVersion(): string; - getProjectReferences(): readonly ProjectReference[] | undefined; - getScriptFileNames(): string[]; - private getOrCreateScriptInfoAndAttachToProject; - getScriptKind(fileName: string): ts.ScriptKind; - getScriptVersion(filename: string): string; - getScriptSnapshot(filename: string): IScriptSnapshot | undefined; - getCancellationToken(): HostCancellationToken; - getCurrentDirectory(): string; - getDefaultLibFileName(): string; - useCaseSensitiveFileNames(): boolean; - readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; - readFile(fileName: string): string | undefined; - writeFile(fileName: string, content: string): void; - fileExists(file: string): boolean; - getModuleResolutionCache(): ModuleResolutionCache | undefined; - directoryExists(path: string): boolean; - getDirectories(path: string): string[]; - log(s: string): void; - error(s: string): void; - private setInternalCompilerOptionsForEmittingJsFiles; - /** - * Get the errors that dont have any file name associated - */ - getGlobalProjectErrors(): readonly Diagnostic[]; - /** - * Get all the project errors - */ - getAllProjectErrors(): readonly Diagnostic[]; - setProjectErrors(projectErrors: Diagnostic[] | undefined): void; - getLanguageService(ensureSynchronized?: boolean): LanguageService; - getCompileOnSaveAffectedFileList(scriptInfo: ScriptInfo): string[]; - /** - * Returns true if emit was conducted - */ - emitFile(scriptInfo: ScriptInfo, writeFile: (path: string, data: string, writeByteOrderMark?: boolean) => void): EmitResult; - enableLanguageService(): void; - disableLanguageService(lastFileExceededProgramSize?: string): void; - getProjectName(): string; - protected removeLocalTypingsFromTypeAcquisition(newTypeAcquisition: TypeAcquisition): TypeAcquisition; - getExternalFiles(): SortedReadonlyArray; - getSourceFile(path: Path): ts.SourceFile | undefined; - close(): void; - private detachScriptInfoIfNotRoot; - isClosed(): boolean; - hasRoots(): boolean; - getRootFiles(): ts.server.NormalizedPath[]; - getRootScriptInfos(): ts.server.ScriptInfo[]; - getScriptInfos(): ScriptInfo[]; - getExcludedFiles(): readonly NormalizedPath[]; - getFileNames(excludeFilesFromExternalLibraries?: boolean, excludeConfigFiles?: boolean): ts.server.NormalizedPath[]; - hasConfigFile(configFilePath: NormalizedPath): boolean; - containsScriptInfo(info: ScriptInfo): boolean; - containsFile(filename: NormalizedPath, requireOpen?: boolean): boolean; - isRoot(info: ScriptInfo): boolean; - addRoot(info: ScriptInfo, fileName?: NormalizedPath): void; - addMissingFileRoot(fileName: NormalizedPath): void; - removeFile(info: ScriptInfo, fileExists: boolean, detachFromProject: boolean): void; - registerFileUpdate(fileName: string): void; - markAsDirty(): void; - /** - * Updates set of files that contribute to this project - * @returns: true if set of files in the project stays the same and false - otherwise. - */ - updateGraph(): boolean; - protected removeExistingTypings(include: string[]): string[]; - private updateGraphWorker; - private detachScriptInfoFromProject; - private addMissingFileWatcher; - private isWatchedMissingFile; - private createGeneratedFileWatcher; - private isValidGeneratedFileWatcher; - private clearGeneratedFileWatch; - getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined; - getScriptInfo(uncheckedFileName: string): ts.server.ScriptInfo | undefined; - filesToString(writeProjectFileNames: boolean): string; - setCompilerOptions(compilerOptions: CompilerOptions): void; - setTypeAcquisition(newTypeAcquisition: TypeAcquisition | undefined): void; - getTypeAcquisition(): ts.TypeAcquisition; - protected removeRoot(info: ScriptInfo): void; - protected enableGlobalPlugins(options: CompilerOptions): void; - protected enablePlugin(pluginConfigEntry: PluginImport, searchPaths: string[]): void; - /** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */ - refreshDiagnostics(): void; - } - /** - * If a file is opened and no tsconfig (or jsconfig) is found, - * the file and its imports/references are put into an InferredProject. - */ - class InferredProject extends Project { - private _isJsInferredProject; - toggleJsInferredProject(isJsInferredProject: boolean): void; - setCompilerOptions(options?: CompilerOptions): void; - /** this is canonical project root path */ - readonly projectRootPath: string | undefined; - addRoot(info: ScriptInfo): void; - removeRoot(info: ScriptInfo): void; - isProjectWithSingleRoot(): boolean; - close(): void; - getTypeAcquisition(): TypeAcquisition; - } - class AutoImportProviderProject extends Project { - private hostProject; - private rootFileNames; - isOrphan(): boolean; - updateGraph(): boolean; - hasRoots(): boolean; - markAsDirty(): void; - getScriptFileNames(): string[]; - getLanguageService(): never; - getHostForAutoImportProvider(): never; - getProjectReferences(): readonly ts.ProjectReference[] | undefined; - getTypeAcquisition(): TypeAcquisition; - } - /** - * If a file is opened, the server will look for a tsconfig (or jsconfig) - * and if successful create a ConfiguredProject for it. - * Otherwise it will create an InferredProject. - */ - class ConfiguredProject extends Project { - readonly canonicalConfigFilePath: NormalizedPath; - /** Ref count to the project when opened from external project */ - private externalProjectRefCount; - private projectReferences; - /** - * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph - * @returns: true if set of files in the project stays the same and false - otherwise. - */ - updateGraph(): boolean; - getConfigFilePath(): ts.server.NormalizedPath; - getProjectReferences(): readonly ProjectReference[] | undefined; - updateReferences(refs: readonly ProjectReference[] | undefined): void; - /** - * Get the errors that dont have any file name associated - */ - getGlobalProjectErrors(): readonly Diagnostic[]; - /** - * Get all the project errors - */ - getAllProjectErrors(): readonly Diagnostic[]; - setProjectErrors(projectErrors: Diagnostic[]): void; - close(): void; - getEffectiveTypeRoots(): string[]; - } - /** - * Project whose configuration is handled externally, such as in a '.csproj'. - * These are created only if a host explicitly calls `openExternalProject`. - */ - class ExternalProject extends Project { - externalProjectName: string; - compileOnSaveEnabled: boolean; - excludedFiles: readonly NormalizedPath[]; - updateGraph(): boolean; - getExcludedFiles(): readonly ts.server.NormalizedPath[]; - } - function convertFormatOptions(protocolOptions: protocol.FormatCodeSettings): FormatCodeSettings; - function convertCompilerOptions(protocolOptions: protocol.ExternalProjectCompilerOptions): CompilerOptions & protocol.CompileOnSaveMixin; - function convertWatchOptions(protocolOptions: protocol.ExternalProjectCompilerOptions, currentDirectory?: string): WatchOptionsAndErrors | undefined; - function convertTypeAcquisition(protocolOptions: protocol.InferredProjectCompilerOptions): TypeAcquisition | undefined; - function tryConvertScriptKindName(scriptKindName: protocol.ScriptKindName | ScriptKind): ScriptKind; - function convertScriptKindName(scriptKindName: protocol.ScriptKindName): ScriptKind.Unknown | ScriptKind.JS | ScriptKind.JSX | ScriptKind.TS | ScriptKind.TSX; - const maxProgramSizeForNonTsFiles: number; - const ProjectsUpdatedInBackgroundEvent = "projectsUpdatedInBackground"; - interface ProjectsUpdatedInBackgroundEvent { - eventName: typeof ProjectsUpdatedInBackgroundEvent; - data: { - openFiles: string[]; - }; - } - const ProjectLoadingStartEvent = "projectLoadingStart"; - interface ProjectLoadingStartEvent { - eventName: typeof ProjectLoadingStartEvent; - data: { - project: Project; - reason: string; - }; - } - const ProjectLoadingFinishEvent = "projectLoadingFinish"; - interface ProjectLoadingFinishEvent { - eventName: typeof ProjectLoadingFinishEvent; - data: { - project: Project; - }; - } - const LargeFileReferencedEvent = "largeFileReferenced"; - interface LargeFileReferencedEvent { - eventName: typeof LargeFileReferencedEvent; - data: { - file: string; - fileSize: number; - maxFileSize: number; - }; - } - const ConfigFileDiagEvent = "configFileDiag"; - interface ConfigFileDiagEvent { - eventName: typeof ConfigFileDiagEvent; - data: { - triggerFile: string; - configFileName: string; - diagnostics: readonly Diagnostic[]; - }; - } - const ProjectLanguageServiceStateEvent = "projectLanguageServiceState"; - interface ProjectLanguageServiceStateEvent { - eventName: typeof ProjectLanguageServiceStateEvent; - data: { - project: Project; - languageServiceEnabled: boolean; - }; - } - const ProjectInfoTelemetryEvent = "projectInfo"; - /** This will be converted to the payload of a protocol.TelemetryEvent in session.defaultEventHandler. */ - interface ProjectInfoTelemetryEvent { - readonly eventName: typeof ProjectInfoTelemetryEvent; - readonly data: ProjectInfoTelemetryEventData; - } - const OpenFileInfoTelemetryEvent = "openFileInfo"; - /** - * Info that we may send about a file that was just opened. - * Info about a file will only be sent once per session, even if the file changes in ways that might affect the info. - * Currently this is only sent for '.js' files. - */ - interface OpenFileInfoTelemetryEvent { - readonly eventName: typeof OpenFileInfoTelemetryEvent; - readonly data: OpenFileInfoTelemetryEventData; - } - interface ProjectInfoTelemetryEventData { - /** Cryptographically secure hash of project file location. */ - readonly projectId: string; - /** Count of file extensions seen in the project. */ - readonly fileStats: FileStats; - /** - * Any compiler options that might contain paths will be taken out. - * Enum compiler options will be converted to strings. - */ - readonly compilerOptions: CompilerOptions; - readonly extends: boolean | undefined; - readonly files: boolean | undefined; - readonly include: boolean | undefined; - readonly exclude: boolean | undefined; - readonly compileOnSave: boolean; - readonly typeAcquisition: ProjectInfoTypeAcquisitionData; - readonly configFileName: "tsconfig.json" | "jsconfig.json" | "other"; - readonly projectType: "external" | "configured"; - readonly languageServiceEnabled: boolean; - /** TypeScript version used by the server. */ - readonly version: string; - } - interface OpenFileInfoTelemetryEventData { - readonly info: OpenFileInfo; - } - interface ProjectInfoTypeAcquisitionData { - readonly enable: boolean | undefined; - readonly include: boolean; - readonly exclude: boolean; - } - interface FileStats { - readonly js: number; - readonly jsSize?: number; - readonly jsx: number; - readonly jsxSize?: number; - readonly ts: number; - readonly tsSize?: number; - readonly tsx: number; - readonly tsxSize?: number; - readonly dts: number; - readonly dtsSize?: number; - readonly deferred: number; - readonly deferredSize?: number; - } - interface OpenFileInfo { - readonly checkJs: boolean; - } - type ProjectServiceEvent = LargeFileReferencedEvent | ProjectsUpdatedInBackgroundEvent | ProjectLoadingStartEvent | ProjectLoadingFinishEvent | ConfigFileDiagEvent | ProjectLanguageServiceStateEvent | ProjectInfoTelemetryEvent | OpenFileInfoTelemetryEvent; - type ProjectServiceEventHandler = (event: ProjectServiceEvent) => void; - interface SafeList { - [name: string]: { - match: RegExp; - exclude?: (string | number)[][]; - types?: string[]; - }; - } - interface TypesMapFile { - typesMap: SafeList; - simpleMap: { - [libName: string]: string; - }; - } - interface HostConfiguration { - formatCodeOptions: FormatCodeSettings; - preferences: protocol.UserPreferences; - hostInfo: string; - extraFileExtensions?: FileExtensionInfo[]; - watchOptions?: WatchOptions; - } - interface OpenConfiguredProjectResult { - configFileName?: NormalizedPath; - configFileErrors?: readonly Diagnostic[]; - } - interface ProjectServiceOptions { - host: ServerHost; - logger: Logger; - cancellationToken: HostCancellationToken; - useSingleInferredProject: boolean; - useInferredProjectPerProjectRoot: boolean; - typingsInstaller?: ITypingsInstaller; - eventHandler?: ProjectServiceEventHandler; - suppressDiagnosticEvents?: boolean; - throttleWaitMilliseconds?: number; - globalPlugins?: readonly string[]; - pluginProbeLocations?: readonly string[]; - allowLocalPluginLoads?: boolean; - typesMapLocation?: string; - serverMode?: LanguageServiceMode; - session: Session | undefined; - } - interface WatchOptionsAndErrors { - watchOptions: WatchOptions; - errors: Diagnostic[] | undefined; - } - class ProjectService { - private readonly nodeModulesWatchers; - /** - * Contains all the deleted script info's version information so that - * it does not reset when creating script info again - * (and could have potentially collided with version where contents mismatch) - */ - private readonly filenameToScriptInfoVersion; - private readonly allJsFilesForOpenFileTelemetry; - /** - * maps external project file name to list of config files that were the part of this project - */ - private readonly externalProjectToConfiguredProjectMap; - /** - * external projects (configuration and list of root files is not controlled by tsserver) - */ - readonly externalProjects: ExternalProject[]; - /** - * projects built from openFileRoots - */ - readonly inferredProjects: InferredProject[]; - /** - * projects specified by a tsconfig.json file - */ - readonly configuredProjects: Map; - /** - * Open files: with value being project root path, and key being Path of the file that is open - */ - readonly openFiles: Map; - /** - * Map of open files that are opened without complete path but have projectRoot as current directory - */ - private readonly openFilesWithNonRootedDiskPath; - private compilerOptionsForInferredProjects; - private compilerOptionsForInferredProjectsPerProjectRoot; - private watchOptionsForInferredProjects; - private watchOptionsForInferredProjectsPerProjectRoot; - private typeAcquisitionForInferredProjects; - private typeAcquisitionForInferredProjectsPerProjectRoot; - /** - * Project size for configured or external projects - */ - private readonly projectToSizeMap; - private readonly hostConfiguration; - private safelist; - private readonly legacySafelist; - private pendingProjectUpdates; - readonly currentDirectory: NormalizedPath; - readonly toCanonicalFileName: (f: string) => string; - readonly host: ServerHost; - readonly logger: Logger; - readonly cancellationToken: HostCancellationToken; - readonly useSingleInferredProject: boolean; - readonly useInferredProjectPerProjectRoot: boolean; - readonly typingsInstaller: ITypingsInstaller; - private readonly globalCacheLocationDirectoryPath; - readonly throttleWaitMilliseconds?: number; - private readonly eventHandler?; - private readonly suppressDiagnosticEvents?; - readonly globalPlugins: readonly string[]; - readonly pluginProbeLocations: readonly string[]; - readonly allowLocalPluginLoads: boolean; - readonly typesMapLocation: string | undefined; - readonly serverMode: LanguageServiceMode; - /** Tracks projects that we have already sent telemetry for. */ - private readonly seenProjects; - private performanceEventHandler?; - private pendingPluginEnablements?; - private currentPluginEnablementPromise?; - constructor(opts: ProjectServiceOptions); - toPath(fileName: string): Path; - private loadTypesMap; - updateTypingsForProject(response: SetTypings | InvalidateCachedTypings | PackageInstalledResponse): void; - private delayUpdateProjectGraph; - private delayUpdateProjectGraphs; - setCompilerOptionsForInferredProjects(projectCompilerOptions: protocol.InferredProjectCompilerOptions, projectRootPath?: string): void; - findProject(projectName: string): Project | undefined; - getDefaultProjectForFile(fileName: NormalizedPath, ensureProject: boolean): Project | undefined; - private doEnsureDefaultProjectForFile; - getScriptInfoEnsuringProjectsUptoDate(uncheckedFileName: string): ScriptInfo | undefined; - /** - * Ensures the project structures are upto date - * This means, - * - we go through all the projects and update them if they are dirty - * - if updates reflect some change in structure or there was pending request to ensure projects for open files - * ensure that each open script info has project - */ - private ensureProjectStructuresUptoDate; - getFormatCodeOptions(file: NormalizedPath): FormatCodeSettings; - getPreferences(file: NormalizedPath): protocol.UserPreferences; - getHostFormatCodeOptions(): FormatCodeSettings; - getHostPreferences(): protocol.UserPreferences; - private onSourceFileChanged; - private handleSourceMapProjects; - private delayUpdateSourceInfoProjects; - private delayUpdateProjectsOfScriptInfoPath; - private handleDeletedFile; - private removeProject; - private assignOrphanScriptInfosToInferredProject; - /** - * Remove this file from the set of open, non-configured files. - * @param info The file that has been closed or newly configured - */ - private closeOpenFile; - private deleteScriptInfo; - private configFileExists; - /** - * Returns true if the configFileExistenceInfo is needed/impacted by open files that are root of inferred project - */ - private configFileExistenceImpactsRootOfInferredProject; - /** - * This is called on file close, so that we stop watching the config file for this script info - */ - private stopWatchingConfigFilesForClosedScriptInfo; - /** - * This function tries to search for a tsconfig.json for the given file. - * This is different from the method the compiler uses because - * the compiler can assume it will always start searching in the - * current directory (the directory in which tsc was invoked). - * The server must start searching from the directory containing - * the newly opened file. - */ - private forEachConfigFileLocation; - /** - * This function tries to search for a tsconfig.json for the given file. - * This is different from the method the compiler uses because - * the compiler can assume it will always start searching in the - * current directory (the directory in which tsc was invoked). - * The server must start searching from the directory containing - * the newly opened file. - * If script info is passed in, it is asserted to be open script info - * otherwise just file name - */ - private getConfigFileNameForFile; - private printProjects; - private getConfiguredProjectByCanonicalConfigFilePath; - private findExternalProjectByProjectName; - /** Get a filename if the language service exceeds the maximum allowed program size; otherwise returns undefined. */ - private getFilenameForExceededTotalSizeLimitForNonTsFiles; - private createExternalProject; - private addFilesToNonInferredProject; - private updateNonInferredProjectFiles; - private updateRootAndOptionsOfNonInferredProject; - private sendConfigFileDiagEvent; - private getOrCreateInferredProjectForProjectRootPathIfEnabled; - private getOrCreateSingleInferredProjectIfEnabled; - private getOrCreateSingleInferredWithoutProjectRoot; - private createInferredProject; - getScriptInfo(uncheckedFileName: string): ScriptInfo | undefined; - private watchClosedScriptInfo; - private createNodeModulesWatcher; - private watchClosedScriptInfoInNodeModules; - private getModifiedTime; - private refreshScriptInfo; - private refreshScriptInfosInDirectory; - private stopWatchingScriptInfo; - private getOrCreateScriptInfoNotOpenedByClientForNormalizedPath; - private getOrCreateScriptInfoOpenedByClientForNormalizedPath; - getOrCreateScriptInfoForNormalizedPath(fileName: NormalizedPath, openedByClient: boolean, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, hostToQueryFileExistsOn?: { - fileExists(path: string): boolean; - }): ScriptInfo | undefined; - private getOrCreateScriptInfoWorker; - /** - * This gets the script info for the normalized path. If the path is not rooted disk path then the open script info with project root context is preferred - */ - getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined; - getScriptInfoForPath(fileName: Path): ScriptInfo | undefined; - private addSourceInfoToSourceMap; - private addMissingSourceMapFile; - setHostConfiguration(args: protocol.ConfigureRequestArguments): void; - closeLog(): void; - /** - * This function rebuilds the project for every file opened by the client - * This does not reload contents of open files from disk. But we could do that if needed - */ - reloadProjects(): void; - /** - * This function goes through all the openFiles and tries to file the config file for them. - * If the config file is found and it refers to existing project, it reloads it either immediately - * or schedules it for reload depending on delayReload option - * If there is no existing project it just opens the configured project for the config file - * reloadForInfo provides a way to filter out files to reload configured project for - */ - private reloadConfiguredProjectForFiles; - /** - * Remove the root of inferred project if script info is part of another project - */ - private removeRootOfInferredProjectIfNowPartOfOtherProject; - /** - * This function is to update the project structure for every inferred project. - * It is called on the premise that all the configured projects are - * up to date. - * This will go through open files and assign them to inferred project if open file is not part of any other project - * After that all the inferred project graphs are updated - */ - private ensureProjectForOpenFiles; - /** - * Open file whose contents is managed by the client - * @param filename is absolute pathname - * @param fileContent is a known version of the file content that is more up to date than the one on disk - */ - openClientFile(fileName: string, fileContent?: string, scriptKind?: ScriptKind, projectRootPath?: string): OpenConfiguredProjectResult; - private findExternalProjectContainingOpenScriptInfo; - private getOrCreateOpenScriptInfo; - private assignProjectToOpenedScriptInfo; - private createAncestorProjects; - private ensureProjectChildren; - private cleanupAfterOpeningFile; - openClientFileWithNormalizedPath(fileName: NormalizedPath, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, projectRootPath?: NormalizedPath): OpenConfiguredProjectResult; - private removeOrphanConfiguredProjects; - private removeOrphanScriptInfos; - private telemetryOnOpenFile; - /** - * Close file whose contents is managed by the client - * @param filename is absolute pathname - */ - closeClientFile(uncheckedFileName: string): void; - private collectChanges; - private closeConfiguredProjectReferencedFromExternalProject; - closeExternalProject(uncheckedFileName: string): void; - openExternalProjects(projects: protocol.ExternalProject[]): void; - /** Makes a filename safe to insert in a RegExp */ - private static readonly filenameEscapeRegexp; - private static escapeFilenameForRegex; - resetSafeList(): void; - applySafeList(proj: protocol.ExternalProject): NormalizedPath[]; - openExternalProject(proj: protocol.ExternalProject): void; - hasDeferredExtension(): boolean; - private enableRequestedPluginsAsync; - private enableRequestedPluginsWorker; - private enableRequestedPluginsForProjectAsync; - configurePlugin(args: protocol.ConfigurePluginRequestArguments): void; - } - function formatMessage(msg: T, logger: Logger, byteLength: (s: string, encoding: BufferEncoding) => number, newLine: string): string; - interface ServerCancellationToken extends HostCancellationToken { - setRequest(requestId: number): void; - resetRequest(requestId: number): void; - } - const nullCancellationToken: ServerCancellationToken; - interface PendingErrorCheck { - fileName: NormalizedPath; - project: Project; - } - /** @deprecated use ts.server.protocol.CommandTypes */ - type CommandNames = protocol.CommandTypes; - /** @deprecated use ts.server.protocol.CommandTypes */ - const CommandNames: any; - type Event = (body: T, eventName: string) => void; - interface EventSender { - event: Event; - } - interface SessionOptions { - host: ServerHost; - cancellationToken: ServerCancellationToken; - useSingleInferredProject: boolean; - useInferredProjectPerProjectRoot: boolean; - typingsInstaller?: ITypingsInstaller; - byteLength: (buf: string, encoding?: BufferEncoding) => number; - hrtime: (start?: [ - number, - number - ]) => [ - number, - number - ]; - logger: Logger; - /** - * If falsy, all events are suppressed. - */ - canUseEvents: boolean; - eventHandler?: ProjectServiceEventHandler; - /** Has no effect if eventHandler is also specified. */ - suppressDiagnosticEvents?: boolean; - serverMode?: LanguageServiceMode; - throttleWaitMilliseconds?: number; - noGetErrOnBackgroundUpdate?: boolean; - globalPlugins?: readonly string[]; - pluginProbeLocations?: readonly string[]; - allowLocalPluginLoads?: boolean; - typesMapLocation?: string; - } - class Session implements EventSender { - private readonly gcTimer; - protected projectService: ProjectService; - private changeSeq; - private performanceData; - private currentRequestId; - private errorCheck; - protected host: ServerHost; - private readonly cancellationToken; - protected readonly typingsInstaller: ITypingsInstaller; - protected byteLength: (buf: string, encoding?: BufferEncoding) => number; - private hrtime; - protected logger: Logger; - protected canUseEvents: boolean; - private suppressDiagnosticEvents?; - private eventHandler; - private readonly noGetErrOnBackgroundUpdate?; - constructor(opts: SessionOptions); - private sendRequestCompletedEvent; - private addPerformanceData; - private performanceEventHandler; - private defaultEventHandler; - private projectsUpdatedInBackgroundEvent; - logError(err: Error, cmd: string): void; - private logErrorWorker; - send(msg: protocol.Message): void; - protected writeMessage(msg: protocol.Message): void; - event(body: T, eventName: string): void; - private semanticCheck; - private syntacticCheck; - private suggestionCheck; - private sendDiagnosticsEvent; - /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */ - private updateErrorCheck; - private cleanProjects; - private cleanup; - private getEncodedSyntacticClassifications; - private getEncodedSemanticClassifications; - private getProject; - private getConfigFileAndProject; - private getConfigFileDiagnostics; - private convertToDiagnosticsWithLinePositionFromDiagnosticFile; - private getCompilerOptionsDiagnostics; - private convertToDiagnosticsWithLinePosition; - private getDiagnosticsWorker; - private getDefinition; - private mapDefinitionInfoLocations; - private getDefinitionAndBoundSpan; - private findSourceDefinition; - private getEmitOutput; - private mapJSDocTagInfo; - private mapDisplayParts; - private mapSignatureHelpItems; - private mapDefinitionInfo; - private static mapToOriginalLocation; - private toFileSpan; - private toFileSpanWithContext; - private getTypeDefinition; - private mapImplementationLocations; - private getImplementation; - private getSyntacticDiagnosticsSync; - private getSemanticDiagnosticsSync; - private getSuggestionDiagnosticsSync; - private getJsxClosingTag; - private getLinkedEditingRange; - private getDocumentHighlights; - private provideInlayHints; - private setCompilerOptionsForInferredProjects; - private getProjectInfo; - private getProjectInfoWorker; - private getRenameInfo; - private getProjects; - private getDefaultProject; - private getRenameLocations; - private mapRenameInfo; - private toSpanGroups; - private getReferences; - private getFileReferences; - /** - * @param fileName is the name of the file to be opened - * @param fileContent is a version of the file content that is known to be more up to date than the one on disk - */ - private openClientFile; - private getPosition; - private getPositionInFile; - private getFileAndProject; - private getFileAndLanguageServiceForSyntacticOperation; - private getFileAndProjectWorker; - private getOutliningSpans; - private getTodoComments; - private getDocCommentTemplate; - private getSpanOfEnclosingComment; - private getIndentation; - private getBreakpointStatement; - private getNameOrDottedNameSpan; - private isValidBraceCompletion; - private getQuickInfoWorker; - private getFormattingEditsForRange; - private getFormattingEditsForRangeFull; - private getFormattingEditsForDocumentFull; - private getFormattingEditsAfterKeystrokeFull; - private getFormattingEditsAfterKeystroke; - private getCompletions; - private getCompletionEntryDetails; - private getCompileOnSaveAffectedFileList; - private emitFile; - private getSignatureHelpItems; - private toPendingErrorCheck; - private getDiagnostics; - private change; - private reload; - private saveToTmp; - private closeClientFile; - private mapLocationNavigationBarItems; - private getNavigationBarItems; - private toLocationNavigationTree; - private getNavigationTree; - private getNavigateToItems; - private getFullNavigateToItems; - private getSupportedCodeFixes; - private isLocation; - private extractPositionOrRange; - private getRange; - private getApplicableRefactors; - private getEditsForRefactor; - private getMoveToRefactoringFileSuggestions; - private organizeImports; - private getEditsForFileRename; - private getCodeFixes; - private getCombinedCodeFix; - private applyCodeActionCommand; - private getStartAndEndPosition; - private mapCodeAction; - private mapCodeFixAction; - private mapTextChangesToCodeEdits; - private mapTextChangeToCodeEdit; - private convertTextChangeToCodeEdit; - private getBraceMatching; - private getDiagnosticsForProject; - private configurePlugin; - private getSmartSelectionRange; - private toggleLineComment; - private toggleMultilineComment; - private commentSelection; - private uncommentSelection; - private mapSelectionRange; - private getScriptInfoFromProjectService; - private toProtocolCallHierarchyItem; - private toProtocolCallHierarchyIncomingCall; - private toProtocolCallHierarchyOutgoingCall; - private prepareCallHierarchy; - private provideCallHierarchyIncomingCalls; - private provideCallHierarchyOutgoingCalls; - getCanonicalFileName(fileName: string): string; - exit(): void; - private notRequired; - private requiredResponse; - private handlers; - addProtocolHandler(command: string, handler: (request: protocol.Request) => HandlerResponse): void; - private setCurrentRequest; - private resetCurrentRequest; - executeWithRequestId(requestId: number, f: () => T): T; - executeCommand(request: protocol.Request): HandlerResponse; - onMessage(message: TMessage): void; - protected parseMessage(message: TMessage): protocol.Request; - protected toStringMessage(message: TMessage): string; - private getFormatOptions; - private getPreferences; - private getHostFormatOptions; - private getHostPreferences; - } - interface HandlerResponse { - response?: {}; - responseRequired?: boolean; - } - } - const versionMajorMinor = "5.2"; - /** The version of the TypeScript compiler release */ - const version: string; - /** - * Type of objects whose values are all of the same type. - * The `in` and `for-in` operators can *not* be safely used, - * since `Object.prototype` may be modified by outside code. - */ - interface MapLike { - [index: string]: T; - } - interface SortedReadonlyArray extends ReadonlyArray { - " __sortedArrayBrand": any; - } - interface SortedArray extends Array { - " __sortedArrayBrand": any; - } - type Path = string & { - __pathBrand: any; - }; - interface TextRange { - pos: number; - end: number; - } - interface ReadonlyTextRange { - readonly pos: number; - readonly end: number; - } - enum SyntaxKind { - Unknown = 0, - EndOfFileToken = 1, - SingleLineCommentTrivia = 2, - MultiLineCommentTrivia = 3, - NewLineTrivia = 4, - WhitespaceTrivia = 5, - ShebangTrivia = 6, - ConflictMarkerTrivia = 7, - NonTextFileMarkerTrivia = 8, - NumericLiteral = 9, - BigIntLiteral = 10, - StringLiteral = 11, - JsxText = 12, - JsxTextAllWhiteSpaces = 13, - RegularExpressionLiteral = 14, - NoSubstitutionTemplateLiteral = 15, - TemplateHead = 16, - TemplateMiddle = 17, - TemplateTail = 18, - OpenBraceToken = 19, - CloseBraceToken = 20, - OpenParenToken = 21, - CloseParenToken = 22, - OpenBracketToken = 23, - CloseBracketToken = 24, - DotToken = 25, - DotDotDotToken = 26, - SemicolonToken = 27, - CommaToken = 28, - QuestionDotToken = 29, - LessThanToken = 30, - LessThanSlashToken = 31, - GreaterThanToken = 32, - LessThanEqualsToken = 33, - GreaterThanEqualsToken = 34, - EqualsEqualsToken = 35, - ExclamationEqualsToken = 36, - EqualsEqualsEqualsToken = 37, - ExclamationEqualsEqualsToken = 38, - EqualsGreaterThanToken = 39, - PlusToken = 40, - MinusToken = 41, - AsteriskToken = 42, - AsteriskAsteriskToken = 43, - SlashToken = 44, - PercentToken = 45, - PlusPlusToken = 46, - MinusMinusToken = 47, - LessThanLessThanToken = 48, - GreaterThanGreaterThanToken = 49, - GreaterThanGreaterThanGreaterThanToken = 50, - AmpersandToken = 51, - BarToken = 52, - CaretToken = 53, - ExclamationToken = 54, - TildeToken = 55, - AmpersandAmpersandToken = 56, - BarBarToken = 57, - QuestionToken = 58, - ColonToken = 59, - AtToken = 60, - QuestionQuestionToken = 61, - /** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */ - BacktickToken = 62, - /** Only the JSDoc scanner produces HashToken. The normal scanner produces PrivateIdentifier. */ - HashToken = 63, - EqualsToken = 64, - PlusEqualsToken = 65, - MinusEqualsToken = 66, - AsteriskEqualsToken = 67, - AsteriskAsteriskEqualsToken = 68, - SlashEqualsToken = 69, - PercentEqualsToken = 70, - LessThanLessThanEqualsToken = 71, - GreaterThanGreaterThanEqualsToken = 72, - GreaterThanGreaterThanGreaterThanEqualsToken = 73, - AmpersandEqualsToken = 74, - BarEqualsToken = 75, - BarBarEqualsToken = 76, - AmpersandAmpersandEqualsToken = 77, - QuestionQuestionEqualsToken = 78, - CaretEqualsToken = 79, - Identifier = 80, - PrivateIdentifier = 81, - BreakKeyword = 83, - CaseKeyword = 84, - CatchKeyword = 85, - ClassKeyword = 86, - ConstKeyword = 87, - ContinueKeyword = 88, - DebuggerKeyword = 89, - DefaultKeyword = 90, - DeleteKeyword = 91, - DoKeyword = 92, - ElseKeyword = 93, - EnumKeyword = 94, - ExportKeyword = 95, - ExtendsKeyword = 96, - FalseKeyword = 97, - FinallyKeyword = 98, - ForKeyword = 99, - FunctionKeyword = 100, - IfKeyword = 101, - ImportKeyword = 102, - InKeyword = 103, - InstanceOfKeyword = 104, - NewKeyword = 105, - NullKeyword = 106, - ReturnKeyword = 107, - SuperKeyword = 108, - SwitchKeyword = 109, - ThisKeyword = 110, - ThrowKeyword = 111, - TrueKeyword = 112, - TryKeyword = 113, - TypeOfKeyword = 114, - VarKeyword = 115, - VoidKeyword = 116, - WhileKeyword = 117, - WithKeyword = 118, - ImplementsKeyword = 119, - InterfaceKeyword = 120, - LetKeyword = 121, - PackageKeyword = 122, - PrivateKeyword = 123, - ProtectedKeyword = 124, - PublicKeyword = 125, - StaticKeyword = 126, - YieldKeyword = 127, - AbstractKeyword = 128, - AccessorKeyword = 129, - AsKeyword = 130, - AssertsKeyword = 131, - AssertKeyword = 132, - AnyKeyword = 133, - AsyncKeyword = 134, - AwaitKeyword = 135, - BooleanKeyword = 136, - ConstructorKeyword = 137, - DeclareKeyword = 138, - GetKeyword = 139, - InferKeyword = 140, - IntrinsicKeyword = 141, - IsKeyword = 142, - KeyOfKeyword = 143, - ModuleKeyword = 144, - NamespaceKeyword = 145, - NeverKeyword = 146, - OutKeyword = 147, - ReadonlyKeyword = 148, - RequireKeyword = 149, - NumberKeyword = 150, - ObjectKeyword = 151, - SatisfiesKeyword = 152, - SetKeyword = 153, - StringKeyword = 154, - SymbolKeyword = 155, - TypeKeyword = 156, - UndefinedKeyword = 157, - UniqueKeyword = 158, - UnknownKeyword = 159, - UsingKeyword = 160, - FromKeyword = 161, - GlobalKeyword = 162, - BigIntKeyword = 163, - OverrideKeyword = 164, - OfKeyword = 165, - QualifiedName = 166, - ComputedPropertyName = 167, - TypeParameter = 168, - Parameter = 169, - Decorator = 170, - PropertySignature = 171, - PropertyDeclaration = 172, - MethodSignature = 173, - MethodDeclaration = 174, - ClassStaticBlockDeclaration = 175, - Constructor = 176, - GetAccessor = 177, - SetAccessor = 178, - CallSignature = 179, - ConstructSignature = 180, - IndexSignature = 181, - TypePredicate = 182, - TypeReference = 183, - FunctionType = 184, - ConstructorType = 185, - TypeQuery = 186, - TypeLiteral = 187, - ArrayType = 188, - TupleType = 189, - OptionalType = 190, - RestType = 191, - UnionType = 192, - IntersectionType = 193, - ConditionalType = 194, - InferType = 195, - ParenthesizedType = 196, - ThisType = 197, - TypeOperator = 198, - IndexedAccessType = 199, - MappedType = 200, - LiteralType = 201, - NamedTupleMember = 202, - TemplateLiteralType = 203, - TemplateLiteralTypeSpan = 204, - ImportType = 205, - ObjectBindingPattern = 206, - ArrayBindingPattern = 207, - BindingElement = 208, - ArrayLiteralExpression = 209, - ObjectLiteralExpression = 210, - PropertyAccessExpression = 211, - ElementAccessExpression = 212, - CallExpression = 213, - NewExpression = 214, - TaggedTemplateExpression = 215, - TypeAssertionExpression = 216, - ParenthesizedExpression = 217, - FunctionExpression = 218, - ArrowFunction = 219, - DeleteExpression = 220, - TypeOfExpression = 221, - VoidExpression = 222, - AwaitExpression = 223, - PrefixUnaryExpression = 224, - PostfixUnaryExpression = 225, - BinaryExpression = 226, - ConditionalExpression = 227, - TemplateExpression = 228, - YieldExpression = 229, - SpreadElement = 230, - ClassExpression = 231, - OmittedExpression = 232, - ExpressionWithTypeArguments = 233, - AsExpression = 234, - NonNullExpression = 235, - MetaProperty = 236, - SyntheticExpression = 237, - SatisfiesExpression = 238, - TemplateSpan = 239, - SemicolonClassElement = 240, - Block = 241, - EmptyStatement = 242, - VariableStatement = 243, - ExpressionStatement = 244, - IfStatement = 245, - DoStatement = 246, - WhileStatement = 247, - ForStatement = 248, - ForInStatement = 249, - ForOfStatement = 250, - ContinueStatement = 251, - BreakStatement = 252, - ReturnStatement = 253, - WithStatement = 254, - SwitchStatement = 255, - LabeledStatement = 256, - ThrowStatement = 257, - TryStatement = 258, - DebuggerStatement = 259, - VariableDeclaration = 260, - VariableDeclarationList = 261, - FunctionDeclaration = 262, - ClassDeclaration = 263, - InterfaceDeclaration = 264, - TypeAliasDeclaration = 265, - EnumDeclaration = 266, - ModuleDeclaration = 267, - ModuleBlock = 268, - CaseBlock = 269, - NamespaceExportDeclaration = 270, - ImportEqualsDeclaration = 271, - ImportDeclaration = 272, - ImportClause = 273, - NamespaceImport = 274, - NamedImports = 275, - ImportSpecifier = 276, - ExportAssignment = 277, - ExportDeclaration = 278, - NamedExports = 279, - NamespaceExport = 280, - ExportSpecifier = 281, - MissingDeclaration = 282, - ExternalModuleReference = 283, - JsxElement = 284, - JsxSelfClosingElement = 285, - JsxOpeningElement = 286, - JsxClosingElement = 287, - JsxFragment = 288, - JsxOpeningFragment = 289, - JsxClosingFragment = 290, - JsxAttribute = 291, - JsxAttributes = 292, - JsxSpreadAttribute = 293, - JsxExpression = 294, - JsxNamespacedName = 295, - CaseClause = 296, - DefaultClause = 297, - HeritageClause = 298, - CatchClause = 299, - AssertClause = 300, - AssertEntry = 301, - ImportTypeAssertionContainer = 302, - PropertyAssignment = 303, - ShorthandPropertyAssignment = 304, - SpreadAssignment = 305, - EnumMember = 306, - /** @deprecated */ UnparsedPrologue = 307, - /** @deprecated */ UnparsedPrepend = 308, - /** @deprecated */ UnparsedText = 309, - /** @deprecated */ UnparsedInternalText = 310, - /** @deprecated */ UnparsedSyntheticReference = 311, - SourceFile = 312, - Bundle = 313, - /** @deprecated */ UnparsedSource = 314, - /** @deprecated */ InputFiles = 315, - JSDocTypeExpression = 316, - JSDocNameReference = 317, - JSDocMemberName = 318, - JSDocAllType = 319, - JSDocUnknownType = 320, - JSDocNullableType = 321, - JSDocNonNullableType = 322, - JSDocOptionalType = 323, - JSDocFunctionType = 324, - JSDocVariadicType = 325, - JSDocNamepathType = 326, - JSDoc = 327, - /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 327, - JSDocText = 328, - JSDocTypeLiteral = 329, - JSDocSignature = 330, - JSDocLink = 331, - JSDocLinkCode = 332, - JSDocLinkPlain = 333, - JSDocTag = 334, - JSDocAugmentsTag = 335, - JSDocImplementsTag = 336, - JSDocAuthorTag = 337, - JSDocDeprecatedTag = 338, - JSDocClassTag = 339, - JSDocPublicTag = 340, - JSDocPrivateTag = 341, - JSDocProtectedTag = 342, - JSDocReadonlyTag = 343, - JSDocOverrideTag = 344, - JSDocCallbackTag = 345, - JSDocOverloadTag = 346, - JSDocEnumTag = 347, - JSDocParameterTag = 348, - JSDocReturnTag = 349, - JSDocThisTag = 350, - JSDocTypeTag = 351, - JSDocTemplateTag = 352, - JSDocTypedefTag = 353, - JSDocSeeTag = 354, - JSDocPropertyTag = 355, - JSDocThrowsTag = 356, - JSDocSatisfiesTag = 357, - SyntaxList = 358, - NotEmittedStatement = 359, - PartiallyEmittedExpression = 360, - CommaListExpression = 361, - SyntheticReferenceExpression = 362, - Count = 363, - FirstAssignment = 64, - LastAssignment = 79, - FirstCompoundAssignment = 65, - LastCompoundAssignment = 79, - FirstReservedWord = 83, - LastReservedWord = 118, - FirstKeyword = 83, - LastKeyword = 165, - FirstFutureReservedWord = 119, - LastFutureReservedWord = 127, - FirstTypeNode = 182, - LastTypeNode = 205, - FirstPunctuation = 19, - LastPunctuation = 79, - FirstToken = 0, - LastToken = 165, - FirstTriviaToken = 2, - LastTriviaToken = 7, - FirstLiteralToken = 9, - LastLiteralToken = 15, - FirstTemplateToken = 15, - LastTemplateToken = 18, - FirstBinaryOperator = 30, - LastBinaryOperator = 79, - FirstStatement = 243, - LastStatement = 259, - FirstNode = 166, - FirstJSDocNode = 316, - LastJSDocNode = 357, - FirstJSDocTagNode = 334, - LastJSDocTagNode = 357 - } - type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; - type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; - type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; - type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; - type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; - type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; - type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; - type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; - type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; - type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.Unknown | KeywordSyntaxKind; - enum NodeFlags { - None = 0, - Let = 1, - Const = 2, - Using = 4, - AwaitUsing = 6, - NestedNamespace = 8, - Synthesized = 16, - Namespace = 32, - OptionalChain = 64, - ExportContext = 128, - ContainsThis = 256, - HasImplicitReturn = 512, - HasExplicitReturn = 1024, - GlobalAugmentation = 2048, - HasAsyncFunctions = 4096, - DisallowInContext = 8192, - YieldContext = 16384, - DecoratorContext = 32768, - AwaitContext = 65536, - DisallowConditionalTypesContext = 131072, - ThisNodeHasError = 262144, - JavaScriptFile = 524288, - ThisNodeOrAnySubNodesHasError = 1048576, - HasAggregatedChildData = 2097152, - JSDoc = 16777216, - JsonFile = 134217728, - BlockScoped = 7, - Constant = 6, - ReachabilityCheckFlags = 1536, - ReachabilityAndEmitFlags = 5632, - ContextFlags = 101441536, - TypeExcludesFlags = 81920 - } - enum ModifierFlags { - None = 0, - Export = 1, - Ambient = 2, - Public = 4, - Private = 8, - Protected = 16, - Static = 32, - Readonly = 64, - Accessor = 128, - Abstract = 256, - Async = 512, - Default = 1024, - Const = 2048, - HasComputedJSDocModifiers = 4096, - Deprecated = 8192, - Override = 16384, - In = 32768, - Out = 65536, - Decorator = 131072, - HasComputedFlags = 536870912, - AccessibilityModifier = 28, - ParameterPropertyModifier = 16476, - NonPublicAccessibilityModifier = 24, - TypeScriptModifier = 117086, - ExportDefault = 1025, - All = 258047, - Modifier = 126975 - } - enum JsxFlags { - None = 0, - /** An element from a named property of the JSX.IntrinsicElements interface */ - IntrinsicNamedElement = 1, - /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */ - IntrinsicIndexedElement = 2, - IntrinsicElement = 3 - } - interface Node extends ReadonlyTextRange { - readonly kind: SyntaxKind; - readonly flags: NodeFlags; - readonly parent: Node; - } - interface Node { - getSourceFile(): SourceFile; - getChildCount(sourceFile?: SourceFile): number; - getChildAt(index: number, sourceFile?: SourceFile): Node; - getChildren(sourceFile?: SourceFile): Node[]; - getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; - getFullStart(): number; - getEnd(): number; - getWidth(sourceFile?: SourceFileLike): number; - getFullWidth(): number; - getLeadingTriviaWidth(sourceFile?: SourceFile): number; - getFullText(sourceFile?: SourceFile): string; - getText(sourceFile?: SourceFile): string; - getFirstToken(sourceFile?: SourceFile): Node | undefined; - getLastToken(sourceFile?: SourceFile): Node | undefined; - forEachChild(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray) => T | undefined): T | undefined; - } - interface JSDocContainer extends Node { - _jsdocContainerBrand: any; - } - interface LocalsContainer extends Node { - _localsContainerBrand: any; - } - interface FlowContainer extends Node { - _flowContainerBrand: any; - } - type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | SemicolonClassElement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement; - type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; - type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement; - type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute; - type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | EnumMember; - type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration; - type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration; - interface NodeArray extends ReadonlyArray, ReadonlyTextRange { - readonly hasTrailingComma: boolean; - } - interface Token extends Node { - readonly kind: TKind; - } - type EndOfFileToken = Token & JSDocContainer; - interface PunctuationToken extends Token { - } - type DotToken = PunctuationToken; - type DotDotDotToken = PunctuationToken; - type QuestionToken = PunctuationToken; - type ExclamationToken = PunctuationToken; - type ColonToken = PunctuationToken; - type EqualsToken = PunctuationToken; - type AmpersandAmpersandEqualsToken = PunctuationToken; - type BarBarEqualsToken = PunctuationToken; - type QuestionQuestionEqualsToken = PunctuationToken; - type AsteriskToken = PunctuationToken; - type EqualsGreaterThanToken = PunctuationToken; - type PlusToken = PunctuationToken; - type MinusToken = PunctuationToken; - type QuestionDotToken = PunctuationToken; - interface KeywordToken extends Token { - } - type AssertsKeyword = KeywordToken; - type AssertKeyword = KeywordToken; - type AwaitKeyword = KeywordToken; - type CaseKeyword = KeywordToken; - interface ModifierToken extends KeywordToken { - } - type AbstractKeyword = ModifierToken; - type AccessorKeyword = ModifierToken; - type AsyncKeyword = ModifierToken; - type ConstKeyword = ModifierToken; - type DeclareKeyword = ModifierToken; - type DefaultKeyword = ModifierToken; - type ExportKeyword = ModifierToken; - type InKeyword = ModifierToken; - type PrivateKeyword = ModifierToken; - type ProtectedKeyword = ModifierToken; - type PublicKeyword = ModifierToken; - type ReadonlyKeyword = ModifierToken; - type OutKeyword = ModifierToken; - type OverrideKeyword = ModifierToken; - type StaticKeyword = ModifierToken; - type Modifier = AbstractKeyword | AccessorKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OutKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword; - type ModifierLike = Modifier | Decorator; - type AccessibilityModifier = PublicKeyword | PrivateKeyword | ProtectedKeyword; - type ParameterPropertyModifier = AccessibilityModifier | ReadonlyKeyword; - type ClassMemberModifier = AccessibilityModifier | ReadonlyKeyword | StaticKeyword | AccessorKeyword; - type ModifiersArray = NodeArray; - enum GeneratedIdentifierFlags { - None = 0, - ReservedInNestedScopes = 8, - Optimistic = 16, - FileLevel = 32, - AllowNameSubstitution = 64 - } - interface Identifier extends PrimaryExpression, Declaration, JSDocContainer, FlowContainer { - readonly kind: SyntaxKind.Identifier; - /** - * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.) - * Text of identifier, but if the identifier begins with two underscores, this will begin with three. - */ - readonly escapedText: __String; - } - interface Identifier { - readonly text: string; - } - interface Identifier { - /** @deprecated Use `idKeyword(identifier)` instead. */ - readonly originalKeywordKind?: SyntaxKind; - /** @deprecated Use `.parent` or the surrounding context to determine this instead. */ - readonly isInJSDocNamespace?: boolean; - } - interface TransientIdentifier extends Identifier { - resolvedSymbol: Symbol; - } - interface QualifiedName extends Node, FlowContainer { - readonly kind: SyntaxKind.QualifiedName; - readonly left: EntityName; - readonly right: Identifier; - } - type EntityName = Identifier | QualifiedName; - type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier; - type MemberName = Identifier | PrivateIdentifier; - type DeclarationName = PropertyName | JsxAttributeName | StringLiteralLike | ElementAccessExpression | BindingPattern | EntityNameExpression; - interface Declaration extends Node { - _declarationBrand: any; - } - interface NamedDeclaration extends Declaration { - readonly name?: DeclarationName; - } - interface DeclarationStatement extends NamedDeclaration, Statement { - readonly name?: Identifier | StringLiteral | NumericLiteral; - } - interface ComputedPropertyName extends Node { - readonly kind: SyntaxKind.ComputedPropertyName; - readonly parent: Declaration; - readonly expression: Expression; - } - interface PrivateIdentifier extends PrimaryExpression { - readonly kind: SyntaxKind.PrivateIdentifier; - readonly escapedText: __String; - } - interface PrivateIdentifier { - readonly text: string; - } - interface Decorator extends Node { - readonly kind: SyntaxKind.Decorator; - readonly parent: NamedDeclaration; - readonly expression: LeftHandSideExpression; - } - interface TypeParameterDeclaration extends NamedDeclaration, JSDocContainer { - readonly kind: SyntaxKind.TypeParameter; - readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode; - readonly modifiers?: NodeArray; - readonly name: Identifier; - /** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */ - readonly constraint?: TypeNode; - readonly default?: TypeNode; - expression?: Expression; - } - interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer { - readonly kind: SignatureDeclaration["kind"]; - readonly name?: PropertyName; - readonly typeParameters?: NodeArray | undefined; - readonly parameters: NodeArray; - readonly type?: TypeNode | undefined; - } - type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction; - interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement, LocalsContainer { - readonly kind: SyntaxKind.CallSignature; - } - interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement, LocalsContainer { - readonly kind: SyntaxKind.ConstructSignature; - } - type BindingName = Identifier | BindingPattern; - interface VariableDeclaration extends NamedDeclaration, JSDocContainer { - readonly kind: SyntaxKind.VariableDeclaration; - readonly parent: VariableDeclarationList | CatchClause; - readonly name: BindingName; - readonly exclamationToken?: ExclamationToken; - readonly type?: TypeNode; - readonly initializer?: Expression; - } - interface VariableDeclarationList extends Node { - readonly kind: SyntaxKind.VariableDeclarationList; - readonly parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement; - readonly declarations: NodeArray; - } - interface ParameterDeclaration extends NamedDeclaration, JSDocContainer { - readonly kind: SyntaxKind.Parameter; - readonly parent: SignatureDeclaration; - readonly modifiers?: NodeArray; - readonly dotDotDotToken?: DotDotDotToken; - readonly name: BindingName; - readonly questionToken?: QuestionToken; - readonly type?: TypeNode; - readonly initializer?: Expression; - } - interface BindingElement extends NamedDeclaration, FlowContainer { - readonly kind: SyntaxKind.BindingElement; - readonly parent: BindingPattern; - readonly propertyName?: PropertyName; - readonly dotDotDotToken?: DotDotDotToken; - readonly name: BindingName; - readonly initializer?: Expression; - } - interface PropertySignature extends TypeElement, JSDocContainer { - readonly kind: SyntaxKind.PropertySignature; - readonly parent: TypeLiteralNode | InterfaceDeclaration; - readonly modifiers?: NodeArray; - readonly name: PropertyName; - readonly questionToken?: QuestionToken; - readonly type?: TypeNode; - } - interface PropertyDeclaration extends ClassElement, JSDocContainer { - readonly kind: SyntaxKind.PropertyDeclaration; - readonly parent: ClassLikeDeclaration; - readonly modifiers?: NodeArray; - readonly name: PropertyName; - readonly questionToken?: QuestionToken; - readonly exclamationToken?: ExclamationToken; - readonly type?: TypeNode; - readonly initializer?: Expression; - } - interface AutoAccessorPropertyDeclaration extends PropertyDeclaration { - _autoAccessorBrand: any; - } - interface ObjectLiteralElement extends NamedDeclaration { - _objectLiteralBrand: any; - readonly name?: PropertyName; - } - /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */ - type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration; - interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer { - readonly kind: SyntaxKind.PropertyAssignment; - readonly parent: ObjectLiteralExpression; - readonly name: PropertyName; - readonly initializer: Expression; - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer { - readonly kind: SyntaxKind.ShorthandPropertyAssignment; - readonly parent: ObjectLiteralExpression; - readonly name: Identifier; - readonly equalsToken?: EqualsToken; - readonly objectAssignmentInitializer?: Expression; - } - interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer { - readonly kind: SyntaxKind.SpreadAssignment; - readonly parent: ObjectLiteralExpression; - readonly expression: Expression; - } - type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag; - interface ObjectBindingPattern extends Node { - readonly kind: SyntaxKind.ObjectBindingPattern; - readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement; - readonly elements: NodeArray; - } - interface ArrayBindingPattern extends Node { - readonly kind: SyntaxKind.ArrayBindingPattern; - readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement; - readonly elements: NodeArray; - } - type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; - type ArrayBindingElement = BindingElement | OmittedExpression; - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclarationBase. - * Examples: - * - FunctionDeclaration - * - MethodDeclaration - * - AccessorDeclaration - */ - interface FunctionLikeDeclarationBase extends SignatureDeclarationBase { - _functionLikeDeclarationBrand: any; - readonly asteriskToken?: AsteriskToken | undefined; - readonly questionToken?: QuestionToken | undefined; - readonly exclamationToken?: ExclamationToken | undefined; - readonly body?: Block | Expression | undefined; - } - type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction; - /** @deprecated Use SignatureDeclaration */ - type FunctionLike = SignatureDeclaration; - interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement, LocalsContainer { - readonly kind: SyntaxKind.FunctionDeclaration; - readonly modifiers?: NodeArray; - readonly name?: Identifier; - readonly body?: FunctionBody; - } - interface MethodSignature extends SignatureDeclarationBase, TypeElement, LocalsContainer { - readonly kind: SyntaxKind.MethodSignature; - readonly parent: TypeLiteralNode | InterfaceDeclaration; - readonly modifiers?: NodeArray; - readonly name: PropertyName; - } - interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer { - readonly kind: SyntaxKind.MethodDeclaration; - readonly parent: ClassLikeDeclaration | ObjectLiteralExpression; - readonly modifiers?: NodeArray | undefined; - readonly name: PropertyName; - readonly body?: FunctionBody | undefined; - } - interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer, LocalsContainer { - readonly kind: SyntaxKind.Constructor; - readonly parent: ClassLikeDeclaration; - readonly modifiers?: NodeArray | undefined; - readonly body?: FunctionBody | undefined; - } - /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */ - interface SemicolonClassElement extends ClassElement, JSDocContainer { - readonly kind: SyntaxKind.SemicolonClassElement; - readonly parent: ClassLikeDeclaration; - } - interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer { - readonly kind: SyntaxKind.GetAccessor; - readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration; - readonly modifiers?: NodeArray; - readonly name: PropertyName; - readonly body?: FunctionBody; - } - interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer { - readonly kind: SyntaxKind.SetAccessor; - readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration; - readonly modifiers?: NodeArray; - readonly name: PropertyName; - readonly body?: FunctionBody; - } - type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration; - interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement, LocalsContainer { - readonly kind: SyntaxKind.IndexSignature; - readonly parent: ObjectTypeDeclaration; - readonly modifiers?: NodeArray; - readonly type: TypeNode; - } - interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer, LocalsContainer { - readonly kind: SyntaxKind.ClassStaticBlockDeclaration; - readonly parent: ClassDeclaration | ClassExpression; - readonly body: Block; - } - interface TypeNode extends Node { - _typeNodeBrand: any; - } - interface KeywordTypeNode extends KeywordToken, TypeNode { - readonly kind: TKind; - } - interface ImportTypeAssertionContainer extends Node { - readonly kind: SyntaxKind.ImportTypeAssertionContainer; - readonly parent: ImportTypeNode; - readonly assertClause: AssertClause; - readonly multiLine?: boolean; - } - interface ImportTypeNode extends NodeWithTypeArguments { - readonly kind: SyntaxKind.ImportType; - readonly isTypeOf: boolean; - readonly argument: TypeNode; - readonly assertions?: ImportTypeAssertionContainer; - readonly qualifier?: EntityName; - } - interface ThisTypeNode extends TypeNode { - readonly kind: SyntaxKind.ThisType; - } - type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode; - interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase { - readonly kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType; - readonly type: TypeNode; - } - interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { - readonly kind: SyntaxKind.FunctionType; - } - interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { - readonly kind: SyntaxKind.ConstructorType; - readonly modifiers?: NodeArray; - } - interface NodeWithTypeArguments extends TypeNode { - readonly typeArguments?: NodeArray; - } - type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments; - interface TypeReferenceNode extends NodeWithTypeArguments { - readonly kind: SyntaxKind.TypeReference; - readonly typeName: EntityName; - } - interface TypePredicateNode extends TypeNode { - readonly kind: SyntaxKind.TypePredicate; - readonly parent: SignatureDeclaration | JSDocTypeExpression; - readonly assertsModifier?: AssertsKeyword; - readonly parameterName: Identifier | ThisTypeNode; - readonly type?: TypeNode; - } - interface TypeQueryNode extends NodeWithTypeArguments { - readonly kind: SyntaxKind.TypeQuery; - readonly exprName: EntityName; - } - interface TypeLiteralNode extends TypeNode, Declaration { - readonly kind: SyntaxKind.TypeLiteral; - readonly members: NodeArray; - } - interface ArrayTypeNode extends TypeNode { - readonly kind: SyntaxKind.ArrayType; - readonly elementType: TypeNode; - } - interface TupleTypeNode extends TypeNode { - readonly kind: SyntaxKind.TupleType; - readonly elements: NodeArray; - } - interface NamedTupleMember extends TypeNode, Declaration, JSDocContainer { - readonly kind: SyntaxKind.NamedTupleMember; - readonly dotDotDotToken?: Token; - readonly name: Identifier; - readonly questionToken?: Token; - readonly type: TypeNode; - } - interface OptionalTypeNode extends TypeNode { - readonly kind: SyntaxKind.OptionalType; - readonly type: TypeNode; - } - interface RestTypeNode extends TypeNode { - readonly kind: SyntaxKind.RestType; - readonly type: TypeNode; - } - type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode; - interface UnionTypeNode extends TypeNode { - readonly kind: SyntaxKind.UnionType; - readonly types: NodeArray; - } - interface IntersectionTypeNode extends TypeNode { - readonly kind: SyntaxKind.IntersectionType; - readonly types: NodeArray; - } - interface ConditionalTypeNode extends TypeNode, LocalsContainer { - readonly kind: SyntaxKind.ConditionalType; - readonly checkType: TypeNode; - readonly extendsType: TypeNode; - readonly trueType: TypeNode; - readonly falseType: TypeNode; - } - interface InferTypeNode extends TypeNode { - readonly kind: SyntaxKind.InferType; - readonly typeParameter: TypeParameterDeclaration; - } - interface ParenthesizedTypeNode extends TypeNode { - readonly kind: SyntaxKind.ParenthesizedType; - readonly type: TypeNode; - } - interface TypeOperatorNode extends TypeNode { - readonly kind: SyntaxKind.TypeOperator; - readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword; - readonly type: TypeNode; - } - interface IndexedAccessTypeNode extends TypeNode { - readonly kind: SyntaxKind.IndexedAccessType; - readonly objectType: TypeNode; - readonly indexType: TypeNode; - } - interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer { - readonly kind: SyntaxKind.MappedType; - readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken; - readonly typeParameter: TypeParameterDeclaration; - readonly nameType?: TypeNode; - readonly questionToken?: QuestionToken | PlusToken | MinusToken; - readonly type?: TypeNode; - /** Used only to produce grammar errors */ - readonly members?: NodeArray; - } - interface LiteralTypeNode extends TypeNode { - readonly kind: SyntaxKind.LiteralType; - readonly literal: NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression; - } - interface StringLiteral extends LiteralExpression, Declaration { - readonly kind: SyntaxKind.StringLiteral; - } - type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; - type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral | JsxNamespacedName; - interface TemplateLiteralTypeNode extends TypeNode { - kind: SyntaxKind.TemplateLiteralType; - readonly head: TemplateHead; - readonly templateSpans: NodeArray; - } - interface TemplateLiteralTypeSpan extends TypeNode { - readonly kind: SyntaxKind.TemplateLiteralTypeSpan; - readonly parent: TemplateLiteralTypeNode; - readonly type: TypeNode; - readonly literal: TemplateMiddle | TemplateTail; - } - interface Expression extends Node { - _expressionBrand: any; - } - interface OmittedExpression extends Expression { - readonly kind: SyntaxKind.OmittedExpression; - } - interface PartiallyEmittedExpression extends LeftHandSideExpression { - readonly kind: SyntaxKind.PartiallyEmittedExpression; - readonly expression: Expression; - } - interface UnaryExpression extends Expression { - _unaryExpressionBrand: any; - } - /** Deprecated, please use UpdateExpression */ - type IncrementExpression = UpdateExpression; - interface UpdateExpression extends UnaryExpression { - _updateExpressionBrand: any; - } - type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken; - interface PrefixUnaryExpression extends UpdateExpression { - readonly kind: SyntaxKind.PrefixUnaryExpression; - readonly operator: PrefixUnaryOperator; - readonly operand: UnaryExpression; - } - type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; - interface PostfixUnaryExpression extends UpdateExpression { - readonly kind: SyntaxKind.PostfixUnaryExpression; - readonly operand: LeftHandSideExpression; - readonly operator: PostfixUnaryOperator; - } - interface LeftHandSideExpression extends UpdateExpression { - _leftHandSideExpressionBrand: any; - } - interface MemberExpression extends LeftHandSideExpression { - _memberExpressionBrand: any; - } - interface PrimaryExpression extends MemberExpression { - _primaryExpressionBrand: any; - } - interface NullLiteral extends PrimaryExpression { - readonly kind: SyntaxKind.NullKeyword; - } - interface TrueLiteral extends PrimaryExpression { - readonly kind: SyntaxKind.TrueKeyword; - } - interface FalseLiteral extends PrimaryExpression { - readonly kind: SyntaxKind.FalseKeyword; - } - type BooleanLiteral = TrueLiteral | FalseLiteral; - interface ThisExpression extends PrimaryExpression, FlowContainer { - readonly kind: SyntaxKind.ThisKeyword; - } - interface SuperExpression extends PrimaryExpression, FlowContainer { - readonly kind: SyntaxKind.SuperKeyword; - } - interface ImportExpression extends PrimaryExpression { - readonly kind: SyntaxKind.ImportKeyword; - } - interface DeleteExpression extends UnaryExpression { - readonly kind: SyntaxKind.DeleteExpression; - readonly expression: UnaryExpression; - } - interface TypeOfExpression extends UnaryExpression { - readonly kind: SyntaxKind.TypeOfExpression; - readonly expression: UnaryExpression; - } - interface VoidExpression extends UnaryExpression { - readonly kind: SyntaxKind.VoidExpression; - readonly expression: UnaryExpression; - } - interface AwaitExpression extends UnaryExpression { - readonly kind: SyntaxKind.AwaitExpression; - readonly expression: UnaryExpression; - } - interface YieldExpression extends Expression { - readonly kind: SyntaxKind.YieldExpression; - readonly asteriskToken?: AsteriskToken; - readonly expression?: Expression; - } - interface SyntheticExpression extends Expression { - readonly kind: SyntaxKind.SyntheticExpression; - readonly isSpread: boolean; - readonly type: Type; - readonly tupleNameSource?: ParameterDeclaration | NamedTupleMember; - } - type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken; - type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken; - type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator; - type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken; - type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator; - type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken; - type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator; - type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword; - type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator; - type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken; - type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator; - type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken; - type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator; - type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken; - type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator; - type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; - type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator; - type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator; - type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken; - type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; - type BinaryOperatorToken = Token; - interface BinaryExpression extends Expression, Declaration, JSDocContainer { - readonly kind: SyntaxKind.BinaryExpression; - readonly left: Expression; - readonly operatorToken: BinaryOperatorToken; - readonly right: Expression; - } - type AssignmentOperatorToken = Token; - interface AssignmentExpression extends BinaryExpression { - readonly left: LeftHandSideExpression; - readonly operatorToken: TOperator; - } - interface ObjectDestructuringAssignment extends AssignmentExpression { - readonly left: ObjectLiteralExpression; - } - interface ArrayDestructuringAssignment extends AssignmentExpression { - readonly left: ArrayLiteralExpression; - } - type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment; - type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | ObjectBindingOrAssignmentElement | ArrayBindingOrAssignmentElement; - type ObjectBindingOrAssignmentElement = BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment; - type ArrayBindingOrAssignmentElement = BindingElement | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression | Identifier | PropertyAccessExpression | ElementAccessExpression; - type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment; - type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression; - type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression; - type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression; - type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression; - type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern; - interface ConditionalExpression extends Expression { - readonly kind: SyntaxKind.ConditionalExpression; - readonly condition: Expression; - readonly questionToken: QuestionToken; - readonly whenTrue: Expression; - readonly colonToken: ColonToken; - readonly whenFalse: Expression; - } - type FunctionBody = Block; - type ConciseBody = FunctionBody | Expression; - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer { - readonly kind: SyntaxKind.FunctionExpression; - readonly modifiers?: NodeArray; - readonly name?: Identifier; - readonly body: FunctionBody; - } - interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer { - readonly kind: SyntaxKind.ArrowFunction; - readonly modifiers?: NodeArray; - readonly equalsGreaterThanToken: EqualsGreaterThanToken; - readonly body: ConciseBody; - readonly name: never; - } - interface LiteralLikeNode extends Node { - text: string; - isUnterminated?: boolean; - hasExtendedUnicodeEscape?: boolean; - } - interface TemplateLiteralLikeNode extends LiteralLikeNode { - rawText?: string; - } - interface LiteralExpression extends LiteralLikeNode, PrimaryExpression { - _literalExpressionBrand: any; - } - interface RegularExpressionLiteral extends LiteralExpression { - readonly kind: SyntaxKind.RegularExpressionLiteral; - } - interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration { - readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral; - } - enum TokenFlags { - None = 0, - Scientific = 16, - Octal = 32, - HexSpecifier = 64, - BinarySpecifier = 128, - OctalSpecifier = 256 - } - interface NumericLiteral extends LiteralExpression, Declaration { - readonly kind: SyntaxKind.NumericLiteral; - } - interface BigIntLiteral extends LiteralExpression { - readonly kind: SyntaxKind.BigIntLiteral; - } - type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; - interface TemplateHead extends TemplateLiteralLikeNode { - readonly kind: SyntaxKind.TemplateHead; - readonly parent: TemplateExpression | TemplateLiteralTypeNode; - } - interface TemplateMiddle extends TemplateLiteralLikeNode { - readonly kind: SyntaxKind.TemplateMiddle; - readonly parent: TemplateSpan | TemplateLiteralTypeSpan; - } - interface TemplateTail extends TemplateLiteralLikeNode { - readonly kind: SyntaxKind.TemplateTail; - readonly parent: TemplateSpan | TemplateLiteralTypeSpan; - } - type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail; - type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken; - interface TemplateExpression extends PrimaryExpression { - readonly kind: SyntaxKind.TemplateExpression; - readonly head: TemplateHead; - readonly templateSpans: NodeArray; - } - type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; - interface TemplateSpan extends Node { - readonly kind: SyntaxKind.TemplateSpan; - readonly parent: TemplateExpression; - readonly expression: Expression; - readonly literal: TemplateMiddle | TemplateTail; - } - interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer { - readonly kind: SyntaxKind.ParenthesizedExpression; - readonly expression: Expression; - } - interface ArrayLiteralExpression extends PrimaryExpression { - readonly kind: SyntaxKind.ArrayLiteralExpression; - readonly elements: NodeArray; - } - interface SpreadElement extends Expression { - readonly kind: SyntaxKind.SpreadElement; - readonly parent: ArrayLiteralExpression | CallExpression | NewExpression; - readonly expression: Expression; - } - /** - * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to - * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be - * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type - * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.) - */ - interface ObjectLiteralExpressionBase extends PrimaryExpression, Declaration { - readonly properties: NodeArray; - } - interface ObjectLiteralExpression extends ObjectLiteralExpressionBase, JSDocContainer { - readonly kind: SyntaxKind.ObjectLiteralExpression; - } - type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression; - type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression; - type AccessExpression = PropertyAccessExpression | ElementAccessExpression; - interface PropertyAccessExpression extends MemberExpression, NamedDeclaration, JSDocContainer, FlowContainer { - readonly kind: SyntaxKind.PropertyAccessExpression; - readonly expression: LeftHandSideExpression; - readonly questionDotToken?: QuestionDotToken; - readonly name: MemberName; - } - interface PropertyAccessChain extends PropertyAccessExpression { - _optionalChainBrand: any; - readonly name: MemberName; - } - interface SuperPropertyAccessExpression extends PropertyAccessExpression { - readonly expression: SuperExpression; - } - /** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */ - interface PropertyAccessEntityNameExpression extends PropertyAccessExpression { - _propertyAccessExpressionLikeQualifiedNameBrand?: any; - readonly expression: EntityNameExpression; - readonly name: Identifier; - } - interface ElementAccessExpression extends MemberExpression, Declaration, JSDocContainer, FlowContainer { - readonly kind: SyntaxKind.ElementAccessExpression; - readonly expression: LeftHandSideExpression; - readonly questionDotToken?: QuestionDotToken; - readonly argumentExpression: Expression; - } - interface ElementAccessChain extends ElementAccessExpression { - _optionalChainBrand: any; - } - interface SuperElementAccessExpression extends ElementAccessExpression { - readonly expression: SuperExpression; - } - type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression; - interface CallExpression extends LeftHandSideExpression, Declaration { - readonly kind: SyntaxKind.CallExpression; - readonly expression: LeftHandSideExpression; - readonly questionDotToken?: QuestionDotToken; - readonly typeArguments?: NodeArray; - readonly arguments: NodeArray; - } - interface CallChain extends CallExpression { - _optionalChainBrand: any; - } - type OptionalChain = PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain; - interface SuperCall extends CallExpression { - readonly expression: SuperExpression; - } - interface ImportCall extends CallExpression { - readonly expression: ImportExpression; - } - interface ExpressionWithTypeArguments extends MemberExpression, NodeWithTypeArguments { - readonly kind: SyntaxKind.ExpressionWithTypeArguments; - readonly expression: LeftHandSideExpression; - } - interface NewExpression extends PrimaryExpression, Declaration { - readonly kind: SyntaxKind.NewExpression; - readonly expression: LeftHandSideExpression; - readonly typeArguments?: NodeArray; - readonly arguments?: NodeArray; - } - interface TaggedTemplateExpression extends MemberExpression { - readonly kind: SyntaxKind.TaggedTemplateExpression; - readonly tag: LeftHandSideExpression; - readonly typeArguments?: NodeArray; - readonly template: TemplateLiteral; - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement; - interface AsExpression extends Expression { - readonly kind: SyntaxKind.AsExpression; - readonly expression: Expression; - readonly type: TypeNode; - } - interface TypeAssertion extends UnaryExpression { - readonly kind: SyntaxKind.TypeAssertionExpression; - readonly type: TypeNode; - readonly expression: UnaryExpression; - } - interface SatisfiesExpression extends Expression { - readonly kind: SyntaxKind.SatisfiesExpression; - readonly expression: Expression; - readonly type: TypeNode; - } - type AssertionExpression = TypeAssertion | AsExpression; - interface NonNullExpression extends LeftHandSideExpression { - readonly kind: SyntaxKind.NonNullExpression; - readonly expression: Expression; - } - interface NonNullChain extends NonNullExpression { - _optionalChainBrand: any; - } - interface MetaProperty extends PrimaryExpression, FlowContainer { - readonly kind: SyntaxKind.MetaProperty; - readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword; - readonly name: Identifier; - } - interface JsxElement extends PrimaryExpression { - readonly kind: SyntaxKind.JsxElement; - readonly openingElement: JsxOpeningElement; - readonly children: NodeArray; - readonly closingElement: JsxClosingElement; - } - type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement; - type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute; - type JsxAttributeName = Identifier | JsxNamespacedName; - type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName; - interface JsxTagNamePropertyAccess extends PropertyAccessExpression { - readonly expression: Identifier | ThisExpression | JsxTagNamePropertyAccess; - } - interface JsxAttributes extends PrimaryExpression, Declaration { - readonly properties: NodeArray; - readonly kind: SyntaxKind.JsxAttributes; - readonly parent: JsxOpeningLikeElement; - } - interface JsxNamespacedName extends Node { - readonly kind: SyntaxKind.JsxNamespacedName; - readonly name: Identifier; - readonly namespace: Identifier; - } - interface JsxOpeningElement extends Expression { - readonly kind: SyntaxKind.JsxOpeningElement; - readonly parent: JsxElement; - readonly tagName: JsxTagNameExpression; - readonly typeArguments?: NodeArray; - readonly attributes: JsxAttributes; - } - interface JsxSelfClosingElement extends PrimaryExpression { - readonly kind: SyntaxKind.JsxSelfClosingElement; - readonly tagName: JsxTagNameExpression; - readonly typeArguments?: NodeArray; - readonly attributes: JsxAttributes; - } - interface JsxFragment extends PrimaryExpression { - readonly kind: SyntaxKind.JsxFragment; - readonly openingFragment: JsxOpeningFragment; - readonly children: NodeArray; - readonly closingFragment: JsxClosingFragment; - } - interface JsxOpeningFragment extends Expression { - readonly kind: SyntaxKind.JsxOpeningFragment; - readonly parent: JsxFragment; - } - interface JsxClosingFragment extends Expression { - readonly kind: SyntaxKind.JsxClosingFragment; - readonly parent: JsxFragment; - } - interface JsxAttribute extends Declaration { - readonly kind: SyntaxKind.JsxAttribute; - readonly parent: JsxAttributes; - readonly name: JsxAttributeName; - readonly initializer?: JsxAttributeValue; - } - type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; - interface JsxSpreadAttribute extends ObjectLiteralElement { - readonly kind: SyntaxKind.JsxSpreadAttribute; - readonly parent: JsxAttributes; - readonly expression: Expression; - } - interface JsxClosingElement extends Node { - readonly kind: SyntaxKind.JsxClosingElement; - readonly parent: JsxElement; - readonly tagName: JsxTagNameExpression; - } - interface JsxExpression extends Expression { - readonly kind: SyntaxKind.JsxExpression; - readonly parent: JsxElement | JsxFragment | JsxAttributeLike; - readonly dotDotDotToken?: Token; - readonly expression?: Expression; - } - interface JsxText extends LiteralLikeNode { - readonly kind: SyntaxKind.JsxText; - readonly parent: JsxElement | JsxFragment; - readonly containsOnlyTriviaWhiteSpaces: boolean; - } - type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; - interface Statement extends Node, JSDocContainer { - _statementBrand: any; - } - interface NotEmittedStatement extends Statement { - readonly kind: SyntaxKind.NotEmittedStatement; - } - /** - * A list of comma-separated expressions. This node is only created by transformations. - */ - interface CommaListExpression extends Expression { - readonly kind: SyntaxKind.CommaListExpression; - readonly elements: NodeArray; - } - interface EmptyStatement extends Statement { - readonly kind: SyntaxKind.EmptyStatement; - } - interface DebuggerStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.DebuggerStatement; - } - interface MissingDeclaration extends DeclarationStatement, PrimaryExpression { - readonly kind: SyntaxKind.MissingDeclaration; - readonly name?: Identifier; - } - type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause; - interface Block extends Statement, LocalsContainer { - readonly kind: SyntaxKind.Block; - readonly statements: NodeArray; - } - interface VariableStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.VariableStatement; - readonly modifiers?: NodeArray; - readonly declarationList: VariableDeclarationList; - } - interface ExpressionStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.ExpressionStatement; - readonly expression: Expression; - } - interface IfStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.IfStatement; - readonly expression: Expression; - readonly thenStatement: Statement; - readonly elseStatement?: Statement; - } - interface IterationStatement extends Statement { - readonly statement: Statement; - } - interface DoStatement extends IterationStatement, FlowContainer { - readonly kind: SyntaxKind.DoStatement; - readonly expression: Expression; - } - interface WhileStatement extends IterationStatement, FlowContainer { - readonly kind: SyntaxKind.WhileStatement; - readonly expression: Expression; - } - type ForInitializer = VariableDeclarationList | Expression; - interface ForStatement extends IterationStatement, LocalsContainer, FlowContainer { - readonly kind: SyntaxKind.ForStatement; - readonly initializer?: ForInitializer; - readonly condition?: Expression; - readonly incrementor?: Expression; - } - type ForInOrOfStatement = ForInStatement | ForOfStatement; - interface ForInStatement extends IterationStatement, LocalsContainer, FlowContainer { - readonly kind: SyntaxKind.ForInStatement; - readonly initializer: ForInitializer; - readonly expression: Expression; - } - interface ForOfStatement extends IterationStatement, LocalsContainer, FlowContainer { - readonly kind: SyntaxKind.ForOfStatement; - readonly awaitModifier?: AwaitKeyword; - readonly initializer: ForInitializer; - readonly expression: Expression; - } - interface BreakStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.BreakStatement; - readonly label?: Identifier; - } - interface ContinueStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.ContinueStatement; - readonly label?: Identifier; - } - type BreakOrContinueStatement = BreakStatement | ContinueStatement; - interface ReturnStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.ReturnStatement; - readonly expression?: Expression; - } - interface WithStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.WithStatement; - readonly expression: Expression; - readonly statement: Statement; - } - interface SwitchStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.SwitchStatement; - readonly expression: Expression; - readonly caseBlock: CaseBlock; - possiblyExhaustive?: boolean; - } - interface CaseBlock extends Node, LocalsContainer { - readonly kind: SyntaxKind.CaseBlock; - readonly parent: SwitchStatement; - readonly clauses: NodeArray; - } - interface CaseClause extends Node, JSDocContainer { - readonly kind: SyntaxKind.CaseClause; - readonly parent: CaseBlock; - readonly expression: Expression; - readonly statements: NodeArray; - } - interface DefaultClause extends Node { - readonly kind: SyntaxKind.DefaultClause; - readonly parent: CaseBlock; - readonly statements: NodeArray; - } - type CaseOrDefaultClause = CaseClause | DefaultClause; - interface LabeledStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.LabeledStatement; - readonly label: Identifier; - readonly statement: Statement; - } - interface ThrowStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.ThrowStatement; - readonly expression: Expression; - } - interface TryStatement extends Statement, FlowContainer { - readonly kind: SyntaxKind.TryStatement; - readonly tryBlock: Block; - readonly catchClause?: CatchClause; - readonly finallyBlock?: Block; - } - interface CatchClause extends Node, LocalsContainer { - readonly kind: SyntaxKind.CatchClause; - readonly parent: TryStatement; - readonly variableDeclaration?: VariableDeclaration; - readonly block: Block; - } - type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode; - type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature; - type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag; - interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer { - readonly kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression; - readonly name?: Identifier; - readonly typeParameters?: NodeArray; - readonly heritageClauses?: NodeArray; - readonly members: NodeArray; - } - interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement { - readonly kind: SyntaxKind.ClassDeclaration; - readonly modifiers?: NodeArray; - /** May be undefined in `export default class { ... }`. */ - readonly name?: Identifier; - } - interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression { - readonly kind: SyntaxKind.ClassExpression; - readonly modifiers?: NodeArray; - } - type ClassLikeDeclaration = ClassDeclaration | ClassExpression; - interface ClassElement extends NamedDeclaration { - _classElementBrand: any; - readonly name?: PropertyName; - } - interface TypeElement extends NamedDeclaration { - _typeElementBrand: any; - readonly name?: PropertyName; - readonly questionToken?: QuestionToken | undefined; - } - interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer { - readonly kind: SyntaxKind.InterfaceDeclaration; - readonly modifiers?: NodeArray; - readonly name: Identifier; - readonly typeParameters?: NodeArray; - readonly heritageClauses?: NodeArray; - readonly members: NodeArray; - } - interface HeritageClause extends Node { - readonly kind: SyntaxKind.HeritageClause; - readonly parent: InterfaceDeclaration | ClassLikeDeclaration; - readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword; - readonly types: NodeArray; - } - interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer { - readonly kind: SyntaxKind.TypeAliasDeclaration; - readonly modifiers?: NodeArray; - readonly name: Identifier; - readonly typeParameters?: NodeArray; - readonly type: TypeNode; - } - interface EnumMember extends NamedDeclaration, JSDocContainer { - readonly kind: SyntaxKind.EnumMember; - readonly parent: EnumDeclaration; - readonly name: PropertyName; - readonly initializer?: Expression; - } - interface EnumDeclaration extends DeclarationStatement, JSDocContainer { - readonly kind: SyntaxKind.EnumDeclaration; - readonly modifiers?: NodeArray; - readonly name: Identifier; - readonly members: NodeArray; - } - type ModuleName = Identifier | StringLiteral; - type ModuleBody = NamespaceBody | JSDocNamespaceBody; - interface ModuleDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer { - readonly kind: SyntaxKind.ModuleDeclaration; - readonly parent: ModuleBody | SourceFile; - readonly modifiers?: NodeArray; - readonly name: ModuleName; - readonly body?: ModuleBody | JSDocNamespaceDeclaration; - } - type NamespaceBody = ModuleBlock | NamespaceDeclaration; - interface NamespaceDeclaration extends ModuleDeclaration { - readonly name: Identifier; - readonly body: NamespaceBody; - } - type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration; - interface JSDocNamespaceDeclaration extends ModuleDeclaration { - readonly name: Identifier; - readonly body?: JSDocNamespaceBody; - } - interface ModuleBlock extends Node, Statement { - readonly kind: SyntaxKind.ModuleBlock; - readonly parent: ModuleDeclaration; - readonly statements: NodeArray; - } - type ModuleReference = EntityName | ExternalModuleReference; - /** - * One of: - * - import x = require("mod"); - * - import x = M.x; - */ - interface ImportEqualsDeclaration extends DeclarationStatement, JSDocContainer { - readonly kind: SyntaxKind.ImportEqualsDeclaration; - readonly parent: SourceFile | ModuleBlock; - readonly modifiers?: NodeArray; - readonly name: Identifier; - readonly isTypeOnly: boolean; - readonly moduleReference: ModuleReference; - } - interface ExternalModuleReference extends Node { - readonly kind: SyntaxKind.ExternalModuleReference; - readonly parent: ImportEqualsDeclaration; - readonly expression: Expression; - } - interface ImportDeclaration extends Statement { - readonly kind: SyntaxKind.ImportDeclaration; - readonly parent: SourceFile | ModuleBlock; - readonly modifiers?: NodeArray; - readonly importClause?: ImportClause; - /** If this is not a StringLiteral it will be a grammar error. */ - readonly moduleSpecifier: Expression; - readonly assertClause?: AssertClause; - } - type NamedImportBindings = NamespaceImport | NamedImports; - type NamedExportBindings = NamespaceExport | NamedExports; - interface ImportClause extends NamedDeclaration { - readonly kind: SyntaxKind.ImportClause; - readonly parent: ImportDeclaration; - readonly isTypeOnly: boolean; - readonly name?: Identifier; - readonly namedBindings?: NamedImportBindings; - } - type AssertionKey = Identifier | StringLiteral; - interface AssertEntry extends Node { - readonly kind: SyntaxKind.AssertEntry; - readonly parent: AssertClause; - readonly name: AssertionKey; - readonly value: Expression; - } - interface AssertClause extends Node { - readonly kind: SyntaxKind.AssertClause; - readonly parent: ImportDeclaration | ExportDeclaration; - readonly elements: NodeArray; - readonly multiLine?: boolean; - } - interface NamespaceImport extends NamedDeclaration { - readonly kind: SyntaxKind.NamespaceImport; - readonly parent: ImportClause; - readonly name: Identifier; - } - interface NamespaceExport extends NamedDeclaration { - readonly kind: SyntaxKind.NamespaceExport; - readonly parent: ExportDeclaration; - readonly name: Identifier; - } - interface NamespaceExportDeclaration extends DeclarationStatement, JSDocContainer { - readonly kind: SyntaxKind.NamespaceExportDeclaration; - readonly name: Identifier; - } - interface ExportDeclaration extends DeclarationStatement, JSDocContainer { - readonly kind: SyntaxKind.ExportDeclaration; - readonly parent: SourceFile | ModuleBlock; - readonly modifiers?: NodeArray; - readonly isTypeOnly: boolean; - /** Will not be assigned in the case of `export * from "foo";` */ - readonly exportClause?: NamedExportBindings; - /** If this is not a StringLiteral it will be a grammar error. */ - readonly moduleSpecifier?: Expression; - readonly assertClause?: AssertClause; - } - interface NamedImports extends Node { - readonly kind: SyntaxKind.NamedImports; - readonly parent: ImportClause; - readonly elements: NodeArray; - } - interface NamedExports extends Node { - readonly kind: SyntaxKind.NamedExports; - readonly parent: ExportDeclaration; - readonly elements: NodeArray; - } - type NamedImportsOrExports = NamedImports | NamedExports; - interface ImportSpecifier extends NamedDeclaration { - readonly kind: SyntaxKind.ImportSpecifier; - readonly parent: NamedImports; - readonly propertyName?: Identifier; - readonly name: Identifier; - readonly isTypeOnly: boolean; - } - interface ExportSpecifier extends NamedDeclaration, JSDocContainer { - readonly kind: SyntaxKind.ExportSpecifier; - readonly parent: NamedExports; - readonly isTypeOnly: boolean; - readonly propertyName?: Identifier; - readonly name: Identifier; - } - type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; - type TypeOnlyCompatibleAliasDeclaration = ImportClause | ImportEqualsDeclaration | NamespaceImport | ImportOrExportSpecifier | ExportDeclaration | NamespaceExport; - type TypeOnlyImportDeclaration = ImportClause & { - readonly isTypeOnly: true; - readonly name: Identifier; - } | ImportEqualsDeclaration & { - readonly isTypeOnly: true; - } | NamespaceImport & { - readonly parent: ImportClause & { - readonly isTypeOnly: true; - }; - } | ImportSpecifier & ({ - readonly isTypeOnly: true; - } | { - readonly parent: NamedImports & { - readonly parent: ImportClause & { - readonly isTypeOnly: true; - }; - }; - }); - type TypeOnlyExportDeclaration = ExportSpecifier & ({ - readonly isTypeOnly: true; - } | { - readonly parent: NamedExports & { - readonly parent: ExportDeclaration & { - readonly isTypeOnly: true; - }; - }; - }) | ExportDeclaration & { - readonly isTypeOnly: true; - readonly moduleSpecifier: Expression; - } | NamespaceExport & { - readonly parent: ExportDeclaration & { - readonly isTypeOnly: true; - readonly moduleSpecifier: Expression; - }; - }; - type TypeOnlyAliasDeclaration = TypeOnlyImportDeclaration | TypeOnlyExportDeclaration; - /** - * This is either an `export =` or an `export default` declaration. - * Unless `isExportEquals` is set, this node was parsed as an `export default`. - */ - interface ExportAssignment extends DeclarationStatement, JSDocContainer { - readonly kind: SyntaxKind.ExportAssignment; - readonly parent: SourceFile; - readonly modifiers?: NodeArray; - readonly isExportEquals?: boolean; - readonly expression: Expression; - } - interface FileReference extends TextRange { - fileName: string; - resolutionMode?: ResolutionMode; - } - interface CheckJsDirective extends TextRange { - enabled: boolean; - } - type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia; - interface CommentRange extends TextRange { - hasTrailingNewLine?: boolean; - kind: CommentKind; - } - interface SynthesizedComment extends CommentRange { - text: string; - pos: -1; - end: -1; - hasLeadingNewline?: boolean; - } - interface JSDocTypeExpression extends TypeNode { - readonly kind: SyntaxKind.JSDocTypeExpression; - readonly type: TypeNode; - } - interface JSDocNameReference extends Node { - readonly kind: SyntaxKind.JSDocNameReference; - readonly name: EntityName | JSDocMemberName; - } - /** Class#method reference in JSDoc */ - interface JSDocMemberName extends Node { - readonly kind: SyntaxKind.JSDocMemberName; - readonly left: EntityName | JSDocMemberName; - readonly right: Identifier; - } - interface JSDocType extends TypeNode { - _jsDocTypeBrand: any; - } - interface JSDocAllType extends JSDocType { - readonly kind: SyntaxKind.JSDocAllType; - } - interface JSDocUnknownType extends JSDocType { - readonly kind: SyntaxKind.JSDocUnknownType; - } - interface JSDocNonNullableType extends JSDocType { - readonly kind: SyntaxKind.JSDocNonNullableType; - readonly type: TypeNode; - readonly postfix: boolean; - } - interface JSDocNullableType extends JSDocType { - readonly kind: SyntaxKind.JSDocNullableType; - readonly type: TypeNode; - readonly postfix: boolean; - } - interface JSDocOptionalType extends JSDocType { - readonly kind: SyntaxKind.JSDocOptionalType; - readonly type: TypeNode; - } - interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase, LocalsContainer { - readonly kind: SyntaxKind.JSDocFunctionType; - } - interface JSDocVariadicType extends JSDocType { - readonly kind: SyntaxKind.JSDocVariadicType; - readonly type: TypeNode; - } - interface JSDocNamepathType extends JSDocType { - readonly kind: SyntaxKind.JSDocNamepathType; - readonly type: TypeNode; - } - type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType; - interface JSDoc extends Node { - readonly kind: SyntaxKind.JSDoc; - readonly parent: HasJSDoc; - readonly tags?: NodeArray; - readonly comment?: string | NodeArray; - } - interface JSDocTag extends Node { - readonly parent: JSDoc | JSDocTypeLiteral; - readonly tagName: Identifier; - readonly comment?: string | NodeArray; - } - interface JSDocLink extends Node { - readonly kind: SyntaxKind.JSDocLink; - readonly name?: EntityName | JSDocMemberName; - text: string; - } - interface JSDocLinkCode extends Node { - readonly kind: SyntaxKind.JSDocLinkCode; - readonly name?: EntityName | JSDocMemberName; - text: string; - } - interface JSDocLinkPlain extends Node { - readonly kind: SyntaxKind.JSDocLinkPlain; - readonly name?: EntityName | JSDocMemberName; - text: string; - } - type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain; - interface JSDocText extends Node { - readonly kind: SyntaxKind.JSDocText; - text: string; - } - interface JSDocUnknownTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocTag; - } - /** - * Note that `@extends` is a synonym of `@augments`. - * Both tags are represented by this interface. - */ - interface JSDocAugmentsTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocAugmentsTag; - readonly class: ExpressionWithTypeArguments & { - readonly expression: Identifier | PropertyAccessEntityNameExpression; - }; - } - interface JSDocImplementsTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocImplementsTag; - readonly class: ExpressionWithTypeArguments & { - readonly expression: Identifier | PropertyAccessEntityNameExpression; - }; - } - interface JSDocAuthorTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocAuthorTag; - } - interface JSDocDeprecatedTag extends JSDocTag { - kind: SyntaxKind.JSDocDeprecatedTag; - } - interface JSDocClassTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocClassTag; - } - interface JSDocPublicTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocPublicTag; - } - interface JSDocPrivateTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocPrivateTag; - } - interface JSDocProtectedTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocProtectedTag; - } - interface JSDocReadonlyTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocReadonlyTag; - } - interface JSDocOverrideTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocOverrideTag; - } - interface JSDocEnumTag extends JSDocTag, Declaration, LocalsContainer { - readonly kind: SyntaxKind.JSDocEnumTag; - readonly parent: JSDoc; - readonly typeExpression: JSDocTypeExpression; - } - interface JSDocThisTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocThisTag; - readonly typeExpression: JSDocTypeExpression; - } - interface JSDocTemplateTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocTemplateTag; - readonly constraint: JSDocTypeExpression | undefined; - readonly typeParameters: NodeArray; - } - interface JSDocSeeTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocSeeTag; - readonly name?: JSDocNameReference; - } - interface JSDocReturnTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocReturnTag; - readonly typeExpression?: JSDocTypeExpression; - } - interface JSDocTypeTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocTypeTag; - readonly typeExpression: JSDocTypeExpression; - } - interface JSDocTypedefTag extends JSDocTag, NamedDeclaration, LocalsContainer { - readonly kind: SyntaxKind.JSDocTypedefTag; - readonly parent: JSDoc; - readonly fullName?: JSDocNamespaceDeclaration | Identifier; - readonly name?: Identifier; - readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral; - } - interface JSDocCallbackTag extends JSDocTag, NamedDeclaration, LocalsContainer { - readonly kind: SyntaxKind.JSDocCallbackTag; - readonly parent: JSDoc; - readonly fullName?: JSDocNamespaceDeclaration | Identifier; - readonly name?: Identifier; - readonly typeExpression: JSDocSignature; - } - interface JSDocOverloadTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocOverloadTag; - readonly parent: JSDoc; - readonly typeExpression: JSDocSignature; - } - interface JSDocThrowsTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocThrowsTag; - readonly typeExpression?: JSDocTypeExpression; - } - interface JSDocSignature extends JSDocType, Declaration, JSDocContainer, LocalsContainer { - readonly kind: SyntaxKind.JSDocSignature; - readonly typeParameters?: readonly JSDocTemplateTag[]; - readonly parameters: readonly JSDocParameterTag[]; - readonly type: JSDocReturnTag | undefined; - } - interface JSDocPropertyLikeTag extends JSDocTag, Declaration { - readonly parent: JSDoc; - readonly name: EntityName; - readonly typeExpression?: JSDocTypeExpression; - /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */ - readonly isNameFirst: boolean; - readonly isBracketed: boolean; - } - interface JSDocPropertyTag extends JSDocPropertyLikeTag { - readonly kind: SyntaxKind.JSDocPropertyTag; - } - interface JSDocParameterTag extends JSDocPropertyLikeTag { - readonly kind: SyntaxKind.JSDocParameterTag; - } - interface JSDocTypeLiteral extends JSDocType, Declaration { - readonly kind: SyntaxKind.JSDocTypeLiteral; - readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[]; - /** If true, then this type literal represents an *array* of its type. */ - readonly isArrayType: boolean; - } - interface JSDocSatisfiesTag extends JSDocTag { - readonly kind: SyntaxKind.JSDocSatisfiesTag; - readonly typeExpression: JSDocTypeExpression; - } - enum FlowFlags { - Unreachable = 1, - Start = 2, - BranchLabel = 4, - LoopLabel = 8, - Assignment = 16, - TrueCondition = 32, - FalseCondition = 64, - SwitchClause = 128, - ArrayMutation = 256, - Call = 512, - ReduceLabel = 1024, - Referenced = 2048, - Shared = 4096, - Label = 12, - Condition = 96 - } - type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel; - interface FlowNodeBase { - flags: FlowFlags; - id?: number; - } - interface FlowStart extends FlowNodeBase { - node?: FunctionExpression | ArrowFunction | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration; - } - interface FlowLabel extends FlowNodeBase { - antecedents: FlowNode[] | undefined; - } - interface FlowAssignment extends FlowNodeBase { - node: Expression | VariableDeclaration | BindingElement; - antecedent: FlowNode; - } - interface FlowCall extends FlowNodeBase { - node: CallExpression; - antecedent: FlowNode; - } - interface FlowCondition extends FlowNodeBase { - node: Expression; - antecedent: FlowNode; - } - interface FlowSwitchClause extends FlowNodeBase { - switchStatement: SwitchStatement; - clauseStart: number; - clauseEnd: number; - antecedent: FlowNode; - } - interface FlowArrayMutation extends FlowNodeBase { - node: CallExpression | BinaryExpression; - antecedent: FlowNode; - } - interface FlowReduceLabel extends FlowNodeBase { - target: FlowLabel; - antecedents: FlowNode[]; - antecedent: FlowNode; - } - type FlowType = Type | IncompleteType; - interface IncompleteType { - flags: TypeFlags | 0; - type: Type; - } - interface AmdDependency { - path: string; - name?: string; - } - /** - * Subset of properties from SourceFile that are used in multiple utility functions - */ - interface SourceFileLike { - readonly text: string; - } - interface SourceFileLike { - getLineAndCharacterOfPosition(pos: number): LineAndCharacter; - } - type ResolutionMode = ModuleKind.ESNext | ModuleKind.CommonJS | undefined; - interface SourceFile extends Declaration, LocalsContainer { - readonly kind: SyntaxKind.SourceFile; - readonly statements: NodeArray; - readonly endOfFileToken: Token; - fileName: string; - text: string; - amdDependencies: readonly AmdDependency[]; - moduleName?: string; - referencedFiles: readonly FileReference[]; - typeReferenceDirectives: readonly FileReference[]; - libReferenceDirectives: readonly FileReference[]; - languageVariant: LanguageVariant; - isDeclarationFile: boolean; - /** - * lib.d.ts should have a reference comment like - * - * /// - * - * If any other file has this comment, it signals not to include lib.d.ts - * because this containing file is intended to act as a default library. - */ - hasNoDefaultLib: boolean; - languageVersion: ScriptTarget; - /** - * When `module` is `Node16` or `NodeNext`, this field controls whether the - * source file in question is an ESNext-output-format file, or a CommonJS-output-format - * module. This is derived by the module resolver as it looks up the file, since - * it is derived from either the file extension of the module, or the containing - * `package.json` context, and affects both checking and emit. - * - * It is _public_ so that (pre)transformers can set this field, - * since it switches the builtin `node` module transform. Generally speaking, if unset, - * the field is treated as though it is `ModuleKind.CommonJS`. - * - * Note that this field is only set by the module resolution process when - * `moduleResolution` is `Node16` or `NodeNext`, which is implied by the `module` setting - * of `Node16` or `NodeNext`, respectively, but may be overriden (eg, by a `moduleResolution` - * of `node`). If so, this field will be unset and source files will be considered to be - * CommonJS-output-format by the node module transformer and type checker, regardless of extension or context. - */ - impliedNodeFormat?: ResolutionMode; - } - interface SourceFile { - getLineAndCharacterOfPosition(pos: number): LineAndCharacter; - getLineEndOfPosition(pos: number): number; - getLineStarts(): readonly number[]; - getPositionOfLineAndCharacter(line: number, character: number): number; - update(newText: string, textChangeRange: TextChangeRange): SourceFile; - } - interface Bundle extends Node { - readonly kind: SyntaxKind.Bundle; - /** @deprecated */ readonly prepends: readonly (InputFiles | UnparsedSource)[]; - readonly sourceFiles: readonly SourceFile[]; - } - /** @deprecated */ - interface InputFiles extends Node { - readonly kind: SyntaxKind.InputFiles; - javascriptPath?: string; - javascriptText: string; - javascriptMapPath?: string; - javascriptMapText?: string; - declarationPath?: string; - declarationText: string; - declarationMapPath?: string; - declarationMapText?: string; - } - /** @deprecated */ - interface UnparsedSource extends Node { - readonly kind: SyntaxKind.UnparsedSource; - fileName: string; - text: string; - readonly prologues: readonly UnparsedPrologue[]; - helpers: readonly UnscopedEmitHelper[] | undefined; - referencedFiles: readonly FileReference[]; - typeReferenceDirectives: readonly FileReference[] | undefined; - libReferenceDirectives: readonly FileReference[]; - hasNoDefaultLib?: boolean; - sourceMapPath?: string; - sourceMapText?: string; - readonly syntheticReferences?: readonly UnparsedSyntheticReference[]; - readonly texts: readonly UnparsedSourceText[]; - } - /** @deprecated */ - type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike; - /** @deprecated */ - type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference; - /** @deprecated */ - interface UnparsedSection extends Node { - readonly kind: SyntaxKind; - readonly parent: UnparsedSource; - readonly data?: string; - } - /** @deprecated */ - interface UnparsedPrologue extends UnparsedSection { - readonly kind: SyntaxKind.UnparsedPrologue; - readonly parent: UnparsedSource; - readonly data: string; - } - /** @deprecated */ - interface UnparsedPrepend extends UnparsedSection { - readonly kind: SyntaxKind.UnparsedPrepend; - readonly parent: UnparsedSource; - readonly data: string; - readonly texts: readonly UnparsedTextLike[]; - } - /** @deprecated */ - interface UnparsedTextLike extends UnparsedSection { - readonly kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText; - readonly parent: UnparsedSource; - } - /** @deprecated */ - interface UnparsedSyntheticReference extends UnparsedSection { - readonly kind: SyntaxKind.UnparsedSyntheticReference; - readonly parent: UnparsedSource; - } - interface JsonSourceFile extends SourceFile { - readonly statements: NodeArray; - } - interface TsConfigSourceFile extends JsonSourceFile { - extendedSourceFiles?: string[]; - } - interface JsonMinusNumericLiteral extends PrefixUnaryExpression { - readonly kind: SyntaxKind.PrefixUnaryExpression; - readonly operator: SyntaxKind.MinusToken; - readonly operand: NumericLiteral; - } - type JsonObjectExpression = ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral; - interface JsonObjectExpressionStatement extends ExpressionStatement { - readonly expression: JsonObjectExpression; - } - interface ScriptReferenceHost { - getCompilerOptions(): CompilerOptions; - getSourceFile(fileName: string): SourceFile | undefined; - getSourceFileByPath(path: Path): SourceFile | undefined; - getCurrentDirectory(): string; - } - interface ParseConfigHost extends ModuleResolutionHost { - useCaseSensitiveFileNames: boolean; - readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; - /** - * Gets a value indicating whether the specified path exists and is a file. - * @param path The path to test. - */ - fileExists(path: string): boolean; - readFile(path: string): string | undefined; - trace?(s: string): void; - } - /** - * Branded string for keeping track of when we've turned an ambiguous path - * specified like "./blah" to an absolute path to an actual - * tsconfig file, e.g. "/root/blah/tsconfig.json" - */ - type ResolvedConfigFileName = string & { - _isResolvedConfigFileName: never; - }; - interface WriteFileCallbackData { - } - type WriteFileCallback = (fileName: string, text: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[], data?: WriteFileCallbackData) => void; - class OperationCanceledException { - } - interface CancellationToken { - isCancellationRequested(): boolean; - /** @throws OperationCanceledException if isCancellationRequested is true */ - throwIfCancellationRequested(): void; - } - interface Program extends ScriptReferenceHost { - getCurrentDirectory(): string; - /** - * Get a list of root file names that were passed to a 'createProgram' - */ - getRootFileNames(): readonly string[]; - /** - * Get a list of files in the program - */ - getSourceFiles(): readonly SourceFile[]; - /** - * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then - * the JavaScript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the JavaScript and declaration for that - * specific file will be generated. - * - * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the JavaScript and declaration files. - */ - emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult; - getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; - getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; - getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; - /** The first time this is called, it will return global diagnostics (no location). */ - getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; - getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; - getConfigFileParsingDiagnostics(): readonly Diagnostic[]; - /** - * Gets a type checker that can be used to semantically analyze source files in the program. - */ - getTypeChecker(): TypeChecker; - getNodeCount(): number; - getIdentifierCount(): number; - getSymbolCount(): number; - getTypeCount(): number; - getInstantiationCount(): number; - getRelationCacheSizes(): { - assignable: number; - identity: number; - subtype: number; - strictSubtype: number; - }; - isSourceFileFromExternalLibrary(file: SourceFile): boolean; - isSourceFileDefaultLibrary(file: SourceFile): boolean; - getProjectReferences(): readonly ProjectReference[] | undefined; - getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined; - } - interface ResolvedProjectReference { - commandLine: ParsedCommandLine; - sourceFile: SourceFile; - references?: readonly (ResolvedProjectReference | undefined)[]; - } - type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer; - interface CustomTransformer { - transformSourceFile(node: SourceFile): SourceFile; - transformBundle(node: Bundle): Bundle; - } - interface CustomTransformers { - /** Custom transformers to evaluate before built-in .js transformations. */ - before?: (TransformerFactory | CustomTransformerFactory)[]; - /** Custom transformers to evaluate after built-in .js transformations. */ - after?: (TransformerFactory | CustomTransformerFactory)[]; - /** Custom transformers to evaluate after built-in .d.ts transformations. */ - afterDeclarations?: (TransformerFactory | CustomTransformerFactory)[]; - } - interface SourceMapSpan { - /** Line number in the .js file. */ - emittedLine: number; - /** Column number in the .js file. */ - emittedColumn: number; - /** Line number in the .ts file. */ - sourceLine: number; - /** Column number in the .ts file. */ - sourceColumn: number; - /** Optional name (index into names array) associated with this span. */ - nameIndex?: number; - /** .ts file (index into sources array) associated with this span */ - sourceIndex: number; - } - /** Return code used by getEmitOutput function to indicate status of the function */ - enum ExitStatus { - Success = 0, - DiagnosticsPresent_OutputsSkipped = 1, - DiagnosticsPresent_OutputsGenerated = 2, - InvalidProject_OutputsSkipped = 3, - ProjectReferenceCycle_OutputsSkipped = 4 - } - interface EmitResult { - emitSkipped: boolean; - /** Contains declaration emit diagnostics */ - diagnostics: readonly Diagnostic[]; - emittedFiles?: string[]; - } - interface TypeChecker { - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; - getTypeOfSymbol(symbol: Symbol): Type; - getDeclaredTypeOfSymbol(symbol: Symbol): Type; - getPropertiesOfType(type: Type): Symbol[]; - getPropertyOfType(type: Type, propertyName: string): Symbol | undefined; - getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined; - getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined; - getIndexInfosOfType(type: Type): readonly IndexInfo[]; - getIndexInfosOfIndexSymbol: (indexSymbol: Symbol) => IndexInfo[]; - getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[]; - getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined; - getBaseTypes(type: InterfaceType): BaseType[]; - getBaseTypeOfLiteralType(type: Type): Type; - getWidenedType(type: Type): Type; - getReturnTypeOfSignature(signature: Signature): Type; - getNullableType(type: Type, flags: TypeFlags): Type; - getNonNullableType(type: Type): Type; - getTypeArguments(type: TypeReference): readonly Type[]; - /** Note that the resulting nodes cannot be checked. */ - typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined; - /** Note that the resulting nodes cannot be checked. */ - signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): SignatureDeclaration & { - typeArguments?: NodeArray; - } | undefined; - /** Note that the resulting nodes cannot be checked. */ - indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined; - /** Note that the resulting nodes cannot be checked. */ - symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): EntityName | undefined; - /** Note that the resulting nodes cannot be checked. */ - symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): Expression | undefined; - /** Note that the resulting nodes cannot be checked. */ - symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): NodeArray | undefined; - /** Note that the resulting nodes cannot be checked. */ - symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): ParameterDeclaration | undefined; - /** Note that the resulting nodes cannot be checked. */ - typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeParameterDeclaration | undefined; - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolAtLocation(node: Node): Symbol | undefined; - getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[]; - /** - * The function returns the value (local variable) symbol of an identifier in the short-hand property assignment. - * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value. - */ - getShorthandAssignmentValueSymbol(location: Node | undefined): Symbol | undefined; - getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined; - /** - * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. - * Otherwise returns its input. - * For example, at `export type T = number;`: - * - `getSymbolAtLocation` at the location `T` will return the exported symbol for `T`. - * - But the result of `getSymbolsInScope` will contain the *local* symbol for `T`, not the exported symbol. - * - Calling `getExportSymbolOfSymbol` on that local symbol will return the exported symbol. - */ - getExportSymbolOfSymbol(symbol: Symbol): Symbol; - getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined; - getTypeOfAssignmentPattern(pattern: AssignmentPattern): Type; - getTypeAtLocation(node: Node): Type; - getTypeFromTypeNode(node: TypeNode): Type; - signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string; - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string; - typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; - getFullyQualifiedName(symbol: Symbol): string; - getAugmentedPropertiesOfType(type: Type): Symbol[]; - getRootSymbols(symbol: Symbol): readonly Symbol[]; - getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined; - getContextualType(node: Expression): Type | undefined; - /** - * returns unknownSignature in the case of an error. - * returns undefined if the node is not valid. - * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`. - */ - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined; - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined; - isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; - isUndefinedSymbol(symbol: Symbol): boolean; - isArgumentsSymbol(symbol: Symbol): boolean; - isUnknownSymbol(symbol: Symbol): boolean; - getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName | ImportTypeNode, propertyName: string): boolean; - /** Follow all aliases to get the original symbol. */ - getAliasedSymbol(symbol: Symbol): Symbol; - /** Follow a *single* alias to get the immediately aliased symbol. */ - getImmediateAliasedSymbol(symbol: Symbol): Symbol | undefined; - getExportsOfModule(moduleSymbol: Symbol): Symbol[]; - getJsxIntrinsicTagNamesAt(location: Node): Symbol[]; - isOptionalParameter(node: ParameterDeclaration): boolean; - getAmbientModules(): Symbol[]; - tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined; - getApparentType(type: Type): Type; - getBaseConstraintOfType(type: Type): Type | undefined; - getDefaultFromTypeParameter(type: Type): Type | undefined; - /** - * Gets the intrinsic `any` type. There are multiple types that act as `any` used internally in the compiler, - * so the type returned by this function should not be used in equality checks to determine if another type - * is `any`. Instead, use `type.flags & TypeFlags.Any`. - */ - getAnyType(): Type; - getStringType(): Type; - getStringLiteralType(value: string): StringLiteralType; - getNumberType(): Type; - getNumberLiteralType(value: number): NumberLiteralType; - getBigIntType(): Type; - getBooleanType(): Type; - getFalseType(): Type; - getTrueType(): Type; - getVoidType(): Type; - /** - * Gets the intrinsic `undefined` type. There are multiple types that act as `undefined` used internally in the compiler - * depending on compiler options, so the type returned by this function should not be used in equality checks to determine - * if another type is `undefined`. Instead, use `type.flags & TypeFlags.Undefined`. - */ - getUndefinedType(): Type; - /** - * Gets the intrinsic `null` type. There are multiple types that act as `null` used internally in the compiler, - * so the type returned by this function should not be used in equality checks to determine if another type - * is `null`. Instead, use `type.flags & TypeFlags.Null`. - */ - getNullType(): Type; - getESSymbolType(): Type; - /** - * Gets the intrinsic `never` type. There are multiple types that act as `never` used internally in the compiler, - * so the type returned by this function should not be used in equality checks to determine if another type - * is `never`. Instead, use `type.flags & TypeFlags.Never`. - */ - getNeverType(): Type; - /** - * True if this type is the `Array` or `ReadonlyArray` type from lib.d.ts. - * This function will _not_ return true if passed a type which - * extends `Array` (for example, the TypeScript AST's `NodeArray` type). - */ - isArrayType(type: Type): boolean; - /** - * True if this type is a tuple type. This function will _not_ return true if - * passed a type which extends from a tuple. - */ - isTupleType(type: Type): boolean; - /** - * True if this type is assignable to `ReadonlyArray`. - */ - isArrayLikeType(type: Type): boolean; - getTypePredicateOfSignature(signature: Signature): TypePredicate | undefined; - /** - * Depending on the operation performed, it may be appropriate to throw away the checker - * if the cancellation token is triggered. Typically, if it is used for error checking - * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep. - */ - runWithCancellationToken(token: CancellationToken, cb: (checker: TypeChecker) => T): T; - } - enum NodeBuilderFlags { - None = 0, - NoTruncation = 1, - WriteArrayAsGenericType = 2, - GenerateNamesForShadowedTypeParams = 4, - UseStructuralFallback = 8, - ForbidIndexedAccessSymbolReferences = 16, - WriteTypeArgumentsOfSignature = 32, - UseFullyQualifiedType = 64, - UseOnlyExternalAliasing = 128, - SuppressAnyReturnType = 256, - WriteTypeParametersInQualifiedName = 512, - MultilineObjectLiterals = 1024, - WriteClassExpressionAsTypeLiteral = 2048, - UseTypeOfFunction = 4096, - OmitParameterModifiers = 8192, - UseAliasDefinedOutsideCurrentScope = 16384, - UseSingleQuotesForStringLiteralType = 268435456, - NoTypeReduction = 536870912, - OmitThisParameter = 33554432, - AllowThisInObjectLiteral = 32768, - AllowQualifiedNameInPlaceOfIdentifier = 65536, - AllowAnonymousIdentifier = 131072, - AllowEmptyUnionOrIntersection = 262144, - AllowEmptyTuple = 524288, - AllowUniqueESSymbolType = 1048576, - AllowEmptyIndexInfoType = 2097152, - AllowNodeModulesRelativePaths = 67108864, - IgnoreErrors = 70221824, - InObjectTypeLiteral = 4194304, - InTypeAlias = 8388608, - InInitialEntityName = 16777216 - } - enum TypeFormatFlags { - None = 0, - NoTruncation = 1, - WriteArrayAsGenericType = 2, - UseStructuralFallback = 8, - WriteTypeArgumentsOfSignature = 32, - UseFullyQualifiedType = 64, - SuppressAnyReturnType = 256, - MultilineObjectLiterals = 1024, - WriteClassExpressionAsTypeLiteral = 2048, - UseTypeOfFunction = 4096, - OmitParameterModifiers = 8192, - UseAliasDefinedOutsideCurrentScope = 16384, - UseSingleQuotesForStringLiteralType = 268435456, - NoTypeReduction = 536870912, - OmitThisParameter = 33554432, - AllowUniqueESSymbolType = 1048576, - AddUndefined = 131072, - WriteArrowStyleSignature = 262144, - InArrayType = 524288, - InElementType = 2097152, - InFirstTypeArgument = 4194304, - InTypeAlias = 8388608, - NodeBuilderFlagsMask = 848330091 - } - enum SymbolFormatFlags { - None = 0, - WriteTypeParametersOrArguments = 1, - UseOnlyExternalAliasing = 2, - AllowAnyNodeKind = 4, - UseAliasDefinedOutsideCurrentScope = 8 - } - enum TypePredicateKind { - This = 0, - Identifier = 1, - AssertsThis = 2, - AssertsIdentifier = 3 - } - interface TypePredicateBase { - kind: TypePredicateKind; - type: Type | undefined; - } - interface ThisTypePredicate extends TypePredicateBase { - kind: TypePredicateKind.This; - parameterName: undefined; - parameterIndex: undefined; - type: Type; - } - interface IdentifierTypePredicate extends TypePredicateBase { - kind: TypePredicateKind.Identifier; - parameterName: string; - parameterIndex: number; - type: Type; - } - interface AssertsThisTypePredicate extends TypePredicateBase { - kind: TypePredicateKind.AssertsThis; - parameterName: undefined; - parameterIndex: undefined; - type: Type | undefined; - } - interface AssertsIdentifierTypePredicate extends TypePredicateBase { - kind: TypePredicateKind.AssertsIdentifier; - parameterName: string; - parameterIndex: number; - type: Type | undefined; - } - type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate; - enum SymbolFlags { - None = 0, - FunctionScopedVariable = 1, - BlockScopedVariable = 2, - Property = 4, - EnumMember = 8, - Function = 16, - Class = 32, - Interface = 64, - ConstEnum = 128, - RegularEnum = 256, - ValueModule = 512, - NamespaceModule = 1024, - TypeLiteral = 2048, - ObjectLiteral = 4096, - Method = 8192, - Constructor = 16384, - GetAccessor = 32768, - SetAccessor = 65536, - Signature = 131072, - TypeParameter = 262144, - TypeAlias = 524288, - ExportValue = 1048576, - Alias = 2097152, - Prototype = 4194304, - ExportStar = 8388608, - Optional = 16777216, - Transient = 33554432, - Assignment = 67108864, - ModuleExports = 134217728, - Enum = 384, - Variable = 3, - Value = 111551, - Type = 788968, - Namespace = 1920, - Module = 1536, - Accessor = 98304, - FunctionScopedVariableExcludes = 111550, - BlockScopedVariableExcludes = 111551, - ParameterExcludes = 111551, - PropertyExcludes = 0, - EnumMemberExcludes = 900095, - FunctionExcludes = 110991, - ClassExcludes = 899503, - InterfaceExcludes = 788872, - RegularEnumExcludes = 899327, - ConstEnumExcludes = 899967, - ValueModuleExcludes = 110735, - NamespaceModuleExcludes = 0, - MethodExcludes = 103359, - GetAccessorExcludes = 46015, - SetAccessorExcludes = 78783, - AccessorExcludes = 13247, - TypeParameterExcludes = 526824, - TypeAliasExcludes = 788968, - AliasExcludes = 2097152, - ModuleMember = 2623475, - ExportHasLocal = 944, - BlockScoped = 418, - PropertyOrAccessor = 98308, - ClassMember = 106500 - } - interface Symbol { - flags: SymbolFlags; - escapedName: __String; - declarations?: Declaration[]; - valueDeclaration?: Declaration; - members?: SymbolTable; - exports?: SymbolTable; - globalExports?: SymbolTable; - } - interface Symbol { - readonly name: string; - getFlags(): SymbolFlags; - getEscapedName(): __String; - getName(): string; - getDeclarations(): Declaration[] | undefined; - getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[]; - getJsDocTags(checker?: TypeChecker): JSDocTagInfo[]; - } - enum InternalSymbolName { - Call = "__call", - Constructor = "__constructor", - New = "__new", - Index = "__index", - ExportStar = "__export", - Global = "__global", - Missing = "__missing", - Type = "__type", - Object = "__object", - JSXAttributes = "__jsxAttributes", - Class = "__class", - Function = "__function", - Computed = "__computed", - Resolving = "__resolving__", - ExportEquals = "export=", - Default = "default", - This = "this" - } - /** - * This represents a string whose leading underscore have been escaped by adding extra leading underscores. - * The shape of this brand is rather unique compared to others we've used. - * Instead of just an intersection of a string and an object, it is that union-ed - * with an intersection of void and an object. This makes it wholly incompatible - * with a normal string (which is good, it cannot be misused on assignment or on usage), - * while still being comparable with a normal string via === (also good) and castable from a string. - */ - type __String = (string & { - __escapedIdentifier: void; - }) | (void & { - __escapedIdentifier: void; - }) | InternalSymbolName; - /** @deprecated Use ReadonlyMap<__String, T> instead. */ - type ReadonlyUnderscoreEscapedMap = ReadonlyMap<__String, T>; - /** @deprecated Use Map<__String, T> instead. */ - type UnderscoreEscapedMap = Map<__String, T>; - /** SymbolTable based on ES6 Map interface. */ - type SymbolTable = Map<__String, Symbol>; - enum TypeFlags { - Any = 1, - Unknown = 2, - String = 4, - Number = 8, - Boolean = 16, - Enum = 32, - BigInt = 64, - StringLiteral = 128, - NumberLiteral = 256, - BooleanLiteral = 512, - EnumLiteral = 1024, - BigIntLiteral = 2048, - ESSymbol = 4096, - UniqueESSymbol = 8192, - Void = 16384, - Undefined = 32768, - Null = 65536, - Never = 131072, - TypeParameter = 262144, - Object = 524288, - Union = 1048576, - Intersection = 2097152, - Index = 4194304, - IndexedAccess = 8388608, - Conditional = 16777216, - Substitution = 33554432, - NonPrimitive = 67108864, - TemplateLiteral = 134217728, - StringMapping = 268435456, - Literal = 2944, - Unit = 109472, - Freshable = 2976, - StringOrNumberLiteral = 384, - PossiblyFalsy = 117724, - StringLike = 402653316, - NumberLike = 296, - BigIntLike = 2112, - BooleanLike = 528, - EnumLike = 1056, - ESSymbolLike = 12288, - VoidLike = 49152, - UnionOrIntersection = 3145728, - StructuredType = 3670016, - TypeVariable = 8650752, - InstantiableNonPrimitive = 58982400, - InstantiablePrimitive = 406847488, - Instantiable = 465829888, - StructuredOrInstantiable = 469499904, - Narrowable = 536624127 - } - type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; - interface Type { - flags: TypeFlags; - symbol: Symbol; - pattern?: DestructuringPattern; - aliasSymbol?: Symbol; - aliasTypeArguments?: readonly Type[]; - } - interface Type { - getFlags(): TypeFlags; - getSymbol(): Symbol | undefined; - getProperties(): Symbol[]; - getProperty(propertyName: string): Symbol | undefined; - getApparentProperties(): Symbol[]; - getCallSignatures(): readonly Signature[]; - getConstructSignatures(): readonly Signature[]; - getStringIndexType(): Type | undefined; - getNumberIndexType(): Type | undefined; - getBaseTypes(): BaseType[] | undefined; - getNonNullableType(): Type; - getConstraint(): Type | undefined; - getDefault(): Type | undefined; - isUnion(): this is UnionType; - isIntersection(): this is IntersectionType; - isUnionOrIntersection(): this is UnionOrIntersectionType; - isLiteral(): this is LiteralType; - isStringLiteral(): this is StringLiteralType; - isNumberLiteral(): this is NumberLiteralType; - isTypeParameter(): this is TypeParameter; - isClassOrInterface(): this is InterfaceType; - isClass(): this is InterfaceType; - isIndexType(): this is IndexType; - } - interface FreshableType extends Type { - freshType: FreshableType; - regularType: FreshableType; - } - interface LiteralType extends FreshableType { - value: string | number | PseudoBigInt; - } - interface UniqueESSymbolType extends Type { - symbol: Symbol; - escapedName: __String; - } - interface StringLiteralType extends LiteralType { - value: string; - } - interface NumberLiteralType extends LiteralType { - value: number; - } - interface BigIntLiteralType extends LiteralType { - value: PseudoBigInt; - } - interface EnumType extends FreshableType { - } - enum ObjectFlags { - None = 0, - Class = 1, - Interface = 2, - Reference = 4, - Tuple = 8, - Anonymous = 16, - Mapped = 32, - Instantiated = 64, - ObjectLiteral = 128, - EvolvingArray = 256, - ObjectLiteralPatternWithComputedProperties = 512, - ReverseMapped = 1024, - JsxAttributes = 2048, - JSLiteral = 4096, - FreshLiteral = 8192, - ArrayLiteral = 16384, - ClassOrInterface = 3, - ContainsSpread = 2097152, - ObjectRestType = 4194304, - InstantiationExpressionType = 8388608 - } - interface ObjectType extends Type { - objectFlags: ObjectFlags; - } - /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */ - interface InterfaceType extends ObjectType { - typeParameters: TypeParameter[] | undefined; - outerTypeParameters: TypeParameter[] | undefined; - localTypeParameters: TypeParameter[] | undefined; - thisType: TypeParameter | undefined; - } - type BaseType = ObjectType | IntersectionType | TypeVariable; - interface InterfaceTypeWithDeclaredMembers extends InterfaceType { - declaredProperties: Symbol[]; - declaredCallSignatures: Signature[]; - declaredConstructSignatures: Signature[]; - declaredIndexInfos: IndexInfo[]; - } - /** - * Type references (ObjectFlags.Reference). When a class or interface has type parameters or - * a "this" type, references to the class or interface are made using type references. The - * typeArguments property specifies the types to substitute for the type parameters of the - * class or interface and optionally includes an extra element that specifies the type to - * substitute for "this" in the resulting instantiation. When no extra argument is present, - * the type reference itself is substituted for "this". The typeArguments property is undefined - * if the class or interface has no type parameters and the reference isn't specifying an - * explicit "this" argument. - */ - interface TypeReference extends ObjectType { - target: GenericType; - node?: TypeReferenceNode | ArrayTypeNode | TupleTypeNode; - } - interface TypeReference { - typeArguments?: readonly Type[]; - } - interface DeferredTypeReference extends TypeReference { - } - interface GenericType extends InterfaceType, TypeReference { - } - enum ElementFlags { - Required = 1, - Optional = 2, - Rest = 4, - Variadic = 8, - Fixed = 3, - Variable = 12, - NonRequired = 14, - NonRest = 11 - } - interface TupleType extends GenericType { - elementFlags: readonly ElementFlags[]; - /** Number of required or variadic elements */ - minLength: number; - /** Number of initial required or optional elements */ - fixedLength: number; - /** True if tuple has any rest or variadic elements */ - hasRestElement: boolean; - combinedFlags: ElementFlags; - readonly: boolean; - labeledElementDeclarations?: readonly (NamedTupleMember | ParameterDeclaration | undefined)[]; - } - interface TupleTypeReference extends TypeReference { - target: TupleType; - } - interface UnionOrIntersectionType extends Type { - types: Type[]; - } - interface UnionType extends UnionOrIntersectionType { - } - interface IntersectionType extends UnionOrIntersectionType { - } - type StructuredType = ObjectType | UnionType | IntersectionType; - interface EvolvingArrayType extends ObjectType { - elementType: Type; - finalArrayType?: Type; - } - interface InstantiableType extends Type { - } - interface TypeParameter extends InstantiableType { - } - interface IndexedAccessType extends InstantiableType { - objectType: Type; - indexType: Type; - constraint?: Type; - simplifiedForReading?: Type; - simplifiedForWriting?: Type; - } - type TypeVariable = TypeParameter | IndexedAccessType; - interface IndexType extends InstantiableType { - type: InstantiableType | UnionOrIntersectionType; - } - interface ConditionalRoot { - node: ConditionalTypeNode; - checkType: Type; - extendsType: Type; - isDistributive: boolean; - inferTypeParameters?: TypeParameter[]; - outerTypeParameters?: TypeParameter[]; - instantiations?: Map; - aliasSymbol?: Symbol; - aliasTypeArguments?: Type[]; - } - interface ConditionalType extends InstantiableType { - root: ConditionalRoot; - checkType: Type; - extendsType: Type; - resolvedTrueType?: Type; - resolvedFalseType?: Type; - } - interface TemplateLiteralType extends InstantiableType { - texts: readonly string[]; - types: readonly Type[]; - } - interface StringMappingType extends InstantiableType { - symbol: Symbol; - type: Type; - } - interface SubstitutionType extends InstantiableType { - objectFlags: ObjectFlags; - baseType: Type; - constraint: Type; - } - enum SignatureKind { - Call = 0, - Construct = 1 - } - interface Signature { - declaration?: SignatureDeclaration | JSDocSignature; - typeParameters?: readonly TypeParameter[]; - parameters: readonly Symbol[]; - } - interface Signature { - getDeclaration(): SignatureDeclaration; - getTypeParameters(): TypeParameter[] | undefined; - getParameters(): Symbol[]; - getTypeParameterAtPosition(pos: number): Type; - getReturnType(): Type; - getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[]; - getJsDocTags(): JSDocTagInfo[]; - } - enum IndexKind { - String = 0, - Number = 1 - } - interface IndexInfo { - keyType: Type; - type: Type; - isReadonly: boolean; - declaration?: IndexSignatureDeclaration; - } - enum InferencePriority { - None = 0, - NakedTypeVariable = 1, - SpeculativeTuple = 2, - SubstituteSource = 4, - HomomorphicMappedType = 8, - PartialHomomorphicMappedType = 16, - MappedTypeConstraint = 32, - ContravariantConditional = 64, - ReturnType = 128, - LiteralKeyof = 256, - NoConstraints = 512, - AlwaysStrict = 1024, - MaxValue = 2048, - PriorityImpliesCombination = 416, - Circularity = -1 - } - interface FileExtensionInfo { - extension: string; - isMixedContent: boolean; - scriptKind?: ScriptKind; - } - interface DiagnosticMessage { - key: string; - category: DiagnosticCategory; - code: number; - message: string; - reportsUnnecessary?: {}; - reportsDeprecated?: {}; - } - /** - * A linked list of formatted diagnostic messages to be used as part of a multiline message. - * It is built from the bottom up, leaving the head to be the "main" diagnostic. - * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, - * the difference is that messages are all preformatted in DMC. - */ - interface DiagnosticMessageChain { - messageText: string; - category: DiagnosticCategory; - code: number; - next?: DiagnosticMessageChain[]; - } - interface Diagnostic extends DiagnosticRelatedInformation { - /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ - reportsUnnecessary?: {}; - reportsDeprecated?: {}; - source?: string; - relatedInformation?: DiagnosticRelatedInformation[]; - } - interface DiagnosticRelatedInformation { - category: DiagnosticCategory; - code: number; - file: SourceFile | undefined; - start: number | undefined; - length: number | undefined; - messageText: string | DiagnosticMessageChain; - } - interface DiagnosticWithLocation extends Diagnostic { - file: SourceFile; - start: number; - length: number; - } - enum DiagnosticCategory { - Warning = 0, - Error = 1, - Suggestion = 2, - Message = 3 - } - enum ModuleResolutionKind { - Classic = 1, - /** - * @deprecated - * `NodeJs` was renamed to `Node10` to better reflect the version of Node that it targets. - * Use the new name or consider switching to a modern module resolution target. - */ - NodeJs = 2, - Node10 = 2, - Node16 = 3, - NodeNext = 99, - Bundler = 100 - } - enum ModuleDetectionKind { - /** - * Files with imports, exports and/or import.meta are considered modules - */ - Legacy = 1, - /** - * Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+ - */ - Auto = 2, - /** - * Consider all non-declaration files modules, regardless of present syntax - */ - Force = 3 - } - interface PluginImport { - name: string; - } - interface ProjectReference { - /** A normalized path on disk */ - path: string; - /** The path as the user originally wrote it */ - originalPath?: string; - /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */ - prepend?: boolean; - /** True if it is intended that this reference form a circularity */ - circular?: boolean; - } - enum WatchFileKind { - FixedPollingInterval = 0, - PriorityPollingInterval = 1, - DynamicPriorityPolling = 2, - FixedChunkSizePolling = 3, - UseFsEvents = 4, - UseFsEventsOnParentDirectory = 5 - } - enum WatchDirectoryKind { - UseFsEvents = 0, - FixedPollingInterval = 1, - DynamicPriorityPolling = 2, - FixedChunkSizePolling = 3 - } - enum PollingWatchKind { - FixedInterval = 0, - PriorityInterval = 1, - DynamicPriority = 2, - FixedChunkSize = 3 - } - type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike | PluginImport[] | ProjectReference[] | null | undefined; - interface CompilerOptions { - allowImportingTsExtensions?: boolean; - allowJs?: boolean; - allowArbitraryExtensions?: boolean; - allowSyntheticDefaultImports?: boolean; - allowUmdGlobalAccess?: boolean; - allowUnreachableCode?: boolean; - allowUnusedLabels?: boolean; - alwaysStrict?: boolean; - baseUrl?: string; - charset?: string; - checkJs?: boolean; - customConditions?: string[]; - declaration?: boolean; - declarationMap?: boolean; - emitDeclarationOnly?: boolean; - declarationDir?: string; - disableSizeLimit?: boolean; - disableSourceOfProjectReferenceRedirect?: boolean; - disableSolutionSearching?: boolean; - disableReferencedProjectLoad?: boolean; - downlevelIteration?: boolean; - emitBOM?: boolean; - emitDecoratorMetadata?: boolean; - exactOptionalPropertyTypes?: boolean; - experimentalDecorators?: boolean; - forceConsistentCasingInFileNames?: boolean; - ignoreDeprecations?: string; - importHelpers?: boolean; - importsNotUsedAsValues?: ImportsNotUsedAsValues; - inlineSourceMap?: boolean; - inlineSources?: boolean; - isolatedModules?: boolean; - jsx?: JsxEmit; - keyofStringsOnly?: boolean; - lib?: string[]; - locale?: string; - mapRoot?: string; - maxNodeModuleJsDepth?: number; - module?: ModuleKind; - moduleResolution?: ModuleResolutionKind; - moduleSuffixes?: string[]; - moduleDetection?: ModuleDetectionKind; - newLine?: NewLineKind; - noEmit?: boolean; - noEmitHelpers?: boolean; - noEmitOnError?: boolean; - noErrorTruncation?: boolean; - noFallthroughCasesInSwitch?: boolean; - noImplicitAny?: boolean; - noImplicitReturns?: boolean; - noImplicitThis?: boolean; - noStrictGenericChecks?: boolean; - noUnusedLocals?: boolean; - noUnusedParameters?: boolean; - noImplicitUseStrict?: boolean; - noPropertyAccessFromIndexSignature?: boolean; - assumeChangesOnlyAffectDirectDependencies?: boolean; - noLib?: boolean; - noResolve?: boolean; - noUncheckedIndexedAccess?: boolean; - out?: string; - outDir?: string; - outFile?: string; - paths?: MapLike; - preserveConstEnums?: boolean; - noImplicitOverride?: boolean; - preserveSymlinks?: boolean; - preserveValueImports?: boolean; - project?: string; - reactNamespace?: string; - jsxFactory?: string; - jsxFragmentFactory?: string; - jsxImportSource?: string; - composite?: boolean; - incremental?: boolean; - tsBuildInfoFile?: string; - removeComments?: boolean; - resolvePackageJsonExports?: boolean; - resolvePackageJsonImports?: boolean; - rootDir?: string; - rootDirs?: string[]; - skipLibCheck?: boolean; - skipDefaultLibCheck?: boolean; - sourceMap?: boolean; - sourceRoot?: string; - strict?: boolean; - strictFunctionTypes?: boolean; - strictBindCallApply?: boolean; - strictNullChecks?: boolean; - strictPropertyInitialization?: boolean; - stripInternal?: boolean; - suppressExcessPropertyErrors?: boolean; - suppressImplicitAnyIndexErrors?: boolean; - target?: ScriptTarget; - traceResolution?: boolean; - useUnknownInCatchVariables?: boolean; - resolveJsonModule?: boolean; - types?: string[]; - /** Paths used to compute primary types search locations */ - typeRoots?: string[]; - verbatimModuleSyntax?: boolean; - esModuleInterop?: boolean; - useDefineForClassFields?: boolean; - [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; - } - interface WatchOptions { - watchFile?: WatchFileKind; - watchDirectory?: WatchDirectoryKind; - fallbackPolling?: PollingWatchKind; - synchronousWatchDirectory?: boolean; - excludeDirectories?: string[]; - excludeFiles?: string[]; - [option: string]: CompilerOptionsValue | undefined; - } - interface TypeAcquisition { - enable?: boolean; - include?: string[]; - exclude?: string[]; - disableFilenameBasedTypeAcquisition?: boolean; - [option: string]: CompilerOptionsValue | undefined; - } - enum ModuleKind { - None = 0, - CommonJS = 1, - AMD = 2, - UMD = 3, - System = 4, - ES2015 = 5, - ES2020 = 6, - ES2022 = 7, - ESNext = 99, - Node16 = 100, - NodeNext = 199 - } - enum JsxEmit { - None = 0, - Preserve = 1, - React = 2, - ReactNative = 3, - ReactJSX = 4, - ReactJSXDev = 5 - } - enum ImportsNotUsedAsValues { - Remove = 0, - Preserve = 1, - Error = 2 - } - enum NewLineKind { - CarriageReturnLineFeed = 0, - LineFeed = 1 - } - interface LineAndCharacter { - /** 0-based. */ - line: number; - character: number; - } - enum ScriptKind { - Unknown = 0, - JS = 1, - JSX = 2, - TS = 3, - TSX = 4, - External = 5, - JSON = 6, - /** - * Used on extensions that doesn't define the ScriptKind but the content defines it. - * Deferred extensions are going to be included in all project contexts. - */ - Deferred = 7 - } - enum ScriptTarget { - ES3 = 0, - ES5 = 1, - ES2015 = 2, - ES2016 = 3, - ES2017 = 4, - ES2018 = 5, - ES2019 = 6, - ES2020 = 7, - ES2021 = 8, - ES2022 = 9, - ESNext = 99, - JSON = 100, - Latest = 99 - } - enum LanguageVariant { - Standard = 0, - JSX = 1 - } - /** Either a parsed command line or a parsed tsconfig.json */ - interface ParsedCommandLine { - options: CompilerOptions; - typeAcquisition?: TypeAcquisition; - fileNames: string[]; - projectReferences?: readonly ProjectReference[]; - watchOptions?: WatchOptions; - raw?: any; - errors: Diagnostic[]; - wildcardDirectories?: MapLike; - compileOnSave?: boolean; - } - enum WatchDirectoryFlags { - None = 0, - Recursive = 1 - } - interface CreateProgramOptions { - rootNames: readonly string[]; - options: CompilerOptions; - projectReferences?: readonly ProjectReference[]; - host?: CompilerHost; - oldProgram?: Program; - configFileParsingDiagnostics?: readonly Diagnostic[]; - } - interface ModuleResolutionHost { - fileExists(fileName: string): boolean; - readFile(fileName: string): string | undefined; - trace?(s: string): void; - directoryExists?(directoryName: string): boolean; - /** - * Resolve a symbolic link. - * @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options - */ - realpath?(path: string): string; - getCurrentDirectory?(): string; - getDirectories?(path: string): string[]; - useCaseSensitiveFileNames?: boolean | (() => boolean) | undefined; - } - /** - * Used by services to specify the minimum host area required to set up source files under any compilation settings - */ - interface MinimalResolutionCacheHost extends ModuleResolutionHost { - getCompilationSettings(): CompilerOptions; - getCompilerHost?(): CompilerHost | undefined; - } - /** - * Represents the result of module resolution. - * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off. - * The Program will then filter results based on these flags. - * - * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred. - */ - interface ResolvedModule { - /** Path of the file the module was resolved to. */ - resolvedFileName: string; - /** True if `resolvedFileName` comes from `node_modules`. */ - isExternalLibraryImport?: boolean; - /** - * True if the original module reference used a .ts extension to refer directly to a .ts file, - * which should produce an error during checking if emit is enabled. - */ - resolvedUsingTsExtension?: boolean; - } - /** - * ResolvedModule with an explicitly provided `extension` property. - * Prefer this over `ResolvedModule`. - * If changing this, remember to change `moduleResolutionIsEqualTo`. - */ - interface ResolvedModuleFull extends ResolvedModule { - /** - * Extension of resolvedFileName. This must match what's at the end of resolvedFileName. - * This is optional for backwards-compatibility, but will be added if not provided. - */ - extension: string; - packageId?: PackageId; - } - /** - * Unique identifier with a package name and version. - * If changing this, remember to change `packageIdIsEqual`. - */ - interface PackageId { - /** - * Name of the package. - * Should not include `@types`. - * If accessing a non-index file, this should include its name e.g. "foo/bar". - */ - name: string; - /** - * Name of a submodule within this package. - * May be "". - */ - subModuleName: string; - /** Version of the package, e.g. "1.2.3" */ - version: string; - } - enum Extension { - Ts = ".ts", - Tsx = ".tsx", - Dts = ".d.ts", - Js = ".js", - Jsx = ".jsx", - Json = ".json", - TsBuildInfo = ".tsbuildinfo", - Mjs = ".mjs", - Mts = ".mts", - Dmts = ".d.mts", - Cjs = ".cjs", - Cts = ".cts", - Dcts = ".d.cts" - } - interface ResolvedModuleWithFailedLookupLocations { - readonly resolvedModule: ResolvedModuleFull | undefined; - } - interface ResolvedTypeReferenceDirective { - primary: boolean; - resolvedFileName: string | undefined; - packageId?: PackageId; - /** True if `resolvedFileName` comes from `node_modules`. */ - isExternalLibraryImport?: boolean; - } - interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations { - readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined; - } - interface CompilerHost extends ModuleResolutionHost { - getSourceFile(fileName: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; - getSourceFileByPath?(fileName: string, path: Path, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined; - getCancellationToken?(): CancellationToken; - getDefaultLibFileName(options: CompilerOptions): string; - getDefaultLibLocation?(): string; - writeFile: WriteFileCallback; - getCurrentDirectory(): string; - getCanonicalFileName(fileName: string): string; - useCaseSensitiveFileNames(): boolean; - getNewLine(): string; - readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[]; - /** @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext */ - resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; - /** - * Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it - */ - getModuleResolutionCache?(): ModuleResolutionCache | undefined; - /** - * @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext - * - * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files - */ - resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[]; - resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; - resolveTypeReferenceDirectiveReferences?(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; - getEnvironmentVariable?(name: string): string | undefined; - /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ - hasInvalidatedResolutions?(filePath: Path): boolean; - createHash?(data: string): string; - getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; - } - interface SourceMapRange extends TextRange { - source?: SourceMapSource; - } - interface SourceMapSource { - fileName: string; - text: string; - skipTrivia?: (pos: number) => number; - } - interface SourceMapSource { - getLineAndCharacterOfPosition(pos: number): LineAndCharacter; - } - enum EmitFlags { - None = 0, - SingleLine = 1, - MultiLine = 2, - AdviseOnEmitNode = 4, - NoSubstitution = 8, - CapturesThis = 16, - NoLeadingSourceMap = 32, - NoTrailingSourceMap = 64, - NoSourceMap = 96, - NoNestedSourceMaps = 128, - NoTokenLeadingSourceMaps = 256, - NoTokenTrailingSourceMaps = 512, - NoTokenSourceMaps = 768, - NoLeadingComments = 1024, - NoTrailingComments = 2048, - NoComments = 3072, - NoNestedComments = 4096, - HelperName = 8192, - ExportName = 16384, - LocalName = 32768, - InternalName = 65536, - Indented = 131072, - NoIndentation = 262144, - AsyncFunctionBody = 524288, - ReuseTempVariableScope = 1048576, - CustomPrologue = 2097152, - NoHoisting = 4194304, - Iterator = 8388608, - NoAsciiEscaping = 16777216 - } - interface EmitHelperBase { - readonly name: string; - readonly scoped: boolean; - readonly text: string | ((node: EmitHelperUniqueNameCallback) => string); - readonly priority?: number; - readonly dependencies?: EmitHelper[]; - } - interface ScopedEmitHelper extends EmitHelperBase { - readonly scoped: true; - } - interface UnscopedEmitHelper extends EmitHelperBase { - readonly scoped: false; - readonly text: string; - } - type EmitHelper = ScopedEmitHelper | UnscopedEmitHelper; - type EmitHelperUniqueNameCallback = (name: string) => string; - enum EmitHint { - SourceFile = 0, - Expression = 1, - IdentifierName = 2, - MappedTypeParameter = 3, - Unspecified = 4, - EmbeddedStatement = 5, - JsxAttributeValue = 6 - } - enum OuterExpressionKinds { - Parentheses = 1, - TypeAssertions = 2, - NonNullAssertions = 4, - PartiallyEmittedExpressions = 8, - Assertions = 6, - All = 15, - ExcludeJSDocTypeAssertion = 16 - } - type ImmediatelyInvokedFunctionExpression = CallExpression & { - readonly expression: FunctionExpression; - }; - type ImmediatelyInvokedArrowFunction = CallExpression & { - readonly expression: ParenthesizedExpression & { - readonly expression: ArrowFunction; - }; - }; - interface NodeFactory { - createNodeArray(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray; - createNumericLiteral(value: string | number, numericLiteralFlags?: TokenFlags): NumericLiteral; - createBigIntLiteral(value: string | PseudoBigInt): BigIntLiteral; - createStringLiteral(text: string, isSingleQuote?: boolean): StringLiteral; - createStringLiteralFromNode(sourceNode: PropertyNameLiteral | PrivateIdentifier, isSingleQuote?: boolean): StringLiteral; - createRegularExpressionLiteral(text: string): RegularExpressionLiteral; - createIdentifier(text: string): Identifier; - /** - * Create a unique temporary variable. - * @param recordTempVariable An optional callback used to record the temporary variable name. This - * should usually be a reference to `hoistVariableDeclaration` from a `TransformationContext`, but - * can be `undefined` if you plan to record the temporary variable manually. - * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes - * during emit so that the variable can be referenced in a nested function body. This is an alternative to - * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. - */ - createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined, reservedInNestedScopes?: boolean): Identifier; - /** - * Create a unique temporary variable for use in a loop. - * @param reservedInNestedScopes When `true`, reserves the temporary variable name in all nested scopes - * during emit so that the variable can be referenced in a nested function body. This is an alternative to - * setting `EmitFlags.ReuseTempVariableScope` on the nested function itself. - */ - createLoopVariable(reservedInNestedScopes?: boolean): Identifier; - /** Create a unique name based on the supplied text. */ - createUniqueName(text: string, flags?: GeneratedIdentifierFlags): Identifier; - /** Create a unique name generated for a node. */ - getGeneratedNameForNode(node: Node | undefined, flags?: GeneratedIdentifierFlags): Identifier; - createPrivateIdentifier(text: string): PrivateIdentifier; - createUniquePrivateName(text?: string): PrivateIdentifier; - getGeneratedPrivateNameForNode(node: Node): PrivateIdentifier; - createToken(token: SyntaxKind.SuperKeyword): SuperExpression; - createToken(token: SyntaxKind.ThisKeyword): ThisExpression; - createToken(token: SyntaxKind.NullKeyword): NullLiteral; - createToken(token: SyntaxKind.TrueKeyword): TrueLiteral; - createToken(token: SyntaxKind.FalseKeyword): FalseLiteral; - createToken(token: SyntaxKind.EndOfFileToken): EndOfFileToken; - createToken(token: SyntaxKind.Unknown): Token; - createToken(token: TKind): PunctuationToken; - createToken(token: TKind): KeywordTypeNode; - createToken(token: TKind): ModifierToken; - createToken(token: TKind): KeywordToken; - createSuper(): SuperExpression; - createThis(): ThisExpression; - createNull(): NullLiteral; - createTrue(): TrueLiteral; - createFalse(): FalseLiteral; - createModifier(kind: T): ModifierToken; - createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[] | undefined; - createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName; - updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName; - createComputedPropertyName(expression: Expression): ComputedPropertyName; - updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName; - createTypeParameterDeclaration(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; - updateTypeParameterDeclaration(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; - createParameterDeclaration(modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; - updateParameterDeclaration(node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; - createDecorator(expression: Expression): Decorator; - updateDecorator(node: Decorator, expression: Expression): Decorator; - createPropertySignature(modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature; - updatePropertySignature(node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined): PropertySignature; - createPropertyDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; - updatePropertyDeclaration(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; - createMethodSignature(modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): MethodSignature; - updateMethodSignature(node: MethodSignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined): MethodSignature; - createMethodDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; - updateMethodDeclaration(node: MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; - createConstructorDeclaration(modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; - updateConstructorDeclaration(node: ConstructorDeclaration, modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; - createGetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; - updateGetAccessorDeclaration(node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; - createSetAccessorDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; - updateSetAccessorDeclaration(node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; - createCallSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration; - updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined): CallSignatureDeclaration; - createConstructSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration; - updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined): ConstructSignatureDeclaration; - createIndexSignature(modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; - updateIndexSignature(node: IndexSignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; - createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; - updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; - createClassStaticBlockDeclaration(body: Block): ClassStaticBlockDeclaration; - updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, body: Block): ClassStaticBlockDeclaration; - createKeywordTypeNode(kind: TKind): KeywordTypeNode; - createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode; - updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode; - createTypeReferenceNode(typeName: string | EntityName, typeArguments?: readonly TypeNode[]): TypeReferenceNode; - updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray | undefined): TypeReferenceNode; - createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): FunctionTypeNode; - updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode): FunctionTypeNode; - createConstructorTypeNode(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; - updateConstructorTypeNode(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode): ConstructorTypeNode; - createTypeQueryNode(exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; - updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName, typeArguments?: readonly TypeNode[]): TypeQueryNode; - createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode; - updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray): TypeLiteralNode; - createArrayTypeNode(elementType: TypeNode): ArrayTypeNode; - updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode; - createTupleTypeNode(elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode; - updateTupleTypeNode(node: TupleTypeNode, elements: readonly (TypeNode | NamedTupleMember)[]): TupleTypeNode; - createNamedTupleMember(dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; - updateNamedTupleMember(node: NamedTupleMember, dotDotDotToken: DotDotDotToken | undefined, name: Identifier, questionToken: QuestionToken | undefined, type: TypeNode): NamedTupleMember; - createOptionalTypeNode(type: TypeNode): OptionalTypeNode; - updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode; - createRestTypeNode(type: TypeNode): RestTypeNode; - updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode; - createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode; - updateUnionTypeNode(node: UnionTypeNode, types: NodeArray): UnionTypeNode; - createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode; - updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray): IntersectionTypeNode; - createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; - updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; - createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode; - updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode; - createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; - createParenthesizedType(type: TypeNode): ParenthesizedTypeNode; - updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode; - createThisTypeNode(): ThisTypeNode; - createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; - updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; - createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; - updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; - createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray | undefined): MappedTypeNode; - updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined, members: NodeArray | undefined): MappedTypeNode; - createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; - updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; - createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; - updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; - createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; - updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; - createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern; - updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]): ArrayBindingPattern; - createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement; - updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement; - createArrayLiteralExpression(elements?: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression; - updateArrayLiteralExpression(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression; - createObjectLiteralExpression(properties?: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression; - updateObjectLiteralExpression(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression; - createPropertyAccessExpression(expression: Expression, name: string | MemberName): PropertyAccessExpression; - updatePropertyAccessExpression(node: PropertyAccessExpression, expression: Expression, name: MemberName): PropertyAccessExpression; - createPropertyAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | MemberName): PropertyAccessChain; - updatePropertyAccessChain(node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: MemberName): PropertyAccessChain; - createElementAccessExpression(expression: Expression, index: number | Expression): ElementAccessExpression; - updateElementAccessExpression(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression; - createElementAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression): ElementAccessChain; - updateElementAccessChain(node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessChain; - createCallExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallExpression; - updateCallExpression(node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallExpression; - createCallChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallChain; - updateCallChain(node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallChain; - createNewExpression(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression; - updateNewExpression(node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression; - createTaggedTemplateExpression(tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; - updateTaggedTemplateExpression(node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; - createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion; - updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion; - createParenthesizedExpression(expression: Expression): ParenthesizedExpression; - updateParenthesizedExpression(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression; - createFunctionExpression(modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block): FunctionExpression; - updateFunctionExpression(node: FunctionExpression, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression; - createArrowFunction(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; - updateArrowFunction(node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; - createDeleteExpression(expression: Expression): DeleteExpression; - updateDeleteExpression(node: DeleteExpression, expression: Expression): DeleteExpression; - createTypeOfExpression(expression: Expression): TypeOfExpression; - updateTypeOfExpression(node: TypeOfExpression, expression: Expression): TypeOfExpression; - createVoidExpression(expression: Expression): VoidExpression; - updateVoidExpression(node: VoidExpression, expression: Expression): VoidExpression; - createAwaitExpression(expression: Expression): AwaitExpression; - updateAwaitExpression(node: AwaitExpression, expression: Expression): AwaitExpression; - createPrefixUnaryExpression(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression; - updatePrefixUnaryExpression(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression; - createPostfixUnaryExpression(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression; - updatePostfixUnaryExpression(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression; - createBinaryExpression(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression; - updateBinaryExpression(node: BinaryExpression, left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression; - createConditionalExpression(condition: Expression, questionToken: QuestionToken | undefined, whenTrue: Expression, colonToken: ColonToken | undefined, whenFalse: Expression): ConditionalExpression; - updateConditionalExpression(node: ConditionalExpression, condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; - createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; - updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression; - createTemplateHead(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateHead; - createTemplateHead(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateHead; - createTemplateMiddle(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateMiddle; - createTemplateMiddle(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateMiddle; - createTemplateTail(text: string, rawText?: string, templateFlags?: TokenFlags): TemplateTail; - createTemplateTail(text: string | undefined, rawText: string, templateFlags?: TokenFlags): TemplateTail; - createNoSubstitutionTemplateLiteral(text: string, rawText?: string): NoSubstitutionTemplateLiteral; - createNoSubstitutionTemplateLiteral(text: string | undefined, rawText: string): NoSubstitutionTemplateLiteral; - createYieldExpression(asteriskToken: AsteriskToken, expression: Expression): YieldExpression; - createYieldExpression(asteriskToken: undefined, expression: Expression | undefined): YieldExpression; - updateYieldExpression(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression | undefined): YieldExpression; - createSpreadElement(expression: Expression): SpreadElement; - updateSpreadElement(node: SpreadElement, expression: Expression): SpreadElement; - createClassExpression(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; - updateClassExpression(node: ClassExpression, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; - createOmittedExpression(): OmittedExpression; - createExpressionWithTypeArguments(expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments; - updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, expression: Expression, typeArguments: readonly TypeNode[] | undefined): ExpressionWithTypeArguments; - createAsExpression(expression: Expression, type: TypeNode): AsExpression; - updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression; - createNonNullExpression(expression: Expression): NonNullExpression; - updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression; - createNonNullChain(expression: Expression): NonNullChain; - updateNonNullChain(node: NonNullChain, expression: Expression): NonNullChain; - createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty; - updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty; - createSatisfiesExpression(expression: Expression, type: TypeNode): SatisfiesExpression; - updateSatisfiesExpression(node: SatisfiesExpression, expression: Expression, type: TypeNode): SatisfiesExpression; - createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan; - updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan; - createSemicolonClassElement(): SemicolonClassElement; - createBlock(statements: readonly Statement[], multiLine?: boolean): Block; - updateBlock(node: Block, statements: readonly Statement[]): Block; - createVariableStatement(modifiers: readonly ModifierLike[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]): VariableStatement; - updateVariableStatement(node: VariableStatement, modifiers: readonly ModifierLike[] | undefined, declarationList: VariableDeclarationList): VariableStatement; - createEmptyStatement(): EmptyStatement; - createExpressionStatement(expression: Expression): ExpressionStatement; - updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement; - createIfStatement(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement; - updateIfStatement(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement; - createDoStatement(statement: Statement, expression: Expression): DoStatement; - updateDoStatement(node: DoStatement, statement: Statement, expression: Expression): DoStatement; - createWhileStatement(expression: Expression, statement: Statement): WhileStatement; - updateWhileStatement(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement; - createForStatement(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; - updateForStatement(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement; - createForInStatement(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; - updateForInStatement(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement; - createForOfStatement(awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; - updateForOfStatement(node: ForOfStatement, awaitModifier: AwaitKeyword | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement; - createContinueStatement(label?: string | Identifier): ContinueStatement; - updateContinueStatement(node: ContinueStatement, label: Identifier | undefined): ContinueStatement; - createBreakStatement(label?: string | Identifier): BreakStatement; - updateBreakStatement(node: BreakStatement, label: Identifier | undefined): BreakStatement; - createReturnStatement(expression?: Expression): ReturnStatement; - updateReturnStatement(node: ReturnStatement, expression: Expression | undefined): ReturnStatement; - createWithStatement(expression: Expression, statement: Statement): WithStatement; - updateWithStatement(node: WithStatement, expression: Expression, statement: Statement): WithStatement; - createSwitchStatement(expression: Expression, caseBlock: CaseBlock): SwitchStatement; - updateSwitchStatement(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement; - createLabeledStatement(label: string | Identifier, statement: Statement): LabeledStatement; - updateLabeledStatement(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement; - createThrowStatement(expression: Expression): ThrowStatement; - updateThrowStatement(node: ThrowStatement, expression: Expression): ThrowStatement; - createTryStatement(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement; - updateTryStatement(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement; - createDebuggerStatement(): DebuggerStatement; - createVariableDeclaration(name: string | BindingName, exclamationToken?: ExclamationToken, type?: TypeNode, initializer?: Expression): VariableDeclaration; - updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; - createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList; - updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList; - createFunctionDeclaration(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; - updateFunctionDeclaration(node: FunctionDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; - createClassDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; - updateClassDeclaration(node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; - createInterfaceDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; - updateInterfaceDeclaration(node: InterfaceDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; - createTypeAliasDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; - updateTypeAliasDeclaration(node: TypeAliasDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; - createEnumDeclaration(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; - updateEnumDeclaration(node: EnumDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; - createModuleDeclaration(modifiers: readonly ModifierLike[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; - updateModuleDeclaration(node: ModuleDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; - createModuleBlock(statements: readonly Statement[]): ModuleBlock; - updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock; - createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock; - updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock; - createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration; - updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration; - createImportEqualsDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; - updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; - createImportDeclaration(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; - updateImportDeclaration(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; - createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; - updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; - createAssertClause(elements: NodeArray, multiLine?: boolean): AssertClause; - updateAssertClause(node: AssertClause, elements: NodeArray, multiLine?: boolean): AssertClause; - createAssertEntry(name: AssertionKey, value: Expression): AssertEntry; - updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry; - createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; - updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; - createNamespaceImport(name: Identifier): NamespaceImport; - updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport; - createNamespaceExport(name: Identifier): NamespaceExport; - updateNamespaceExport(node: NamespaceExport, name: Identifier): NamespaceExport; - createNamedImports(elements: readonly ImportSpecifier[]): NamedImports; - updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports; - createImportSpecifier(isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier; - updateImportSpecifier(node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier; - createExportAssignment(modifiers: readonly ModifierLike[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; - updateExportAssignment(node: ExportAssignment, modifiers: readonly ModifierLike[] | undefined, expression: Expression): ExportAssignment; - createExportDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; - updateExportDeclaration(node: ExportDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; - createNamedExports(elements: readonly ExportSpecifier[]): NamedExports; - updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports; - createExportSpecifier(isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier; - updateExportSpecifier(node: ExportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier; - createExternalModuleReference(expression: Expression): ExternalModuleReference; - updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference; - createJSDocAllType(): JSDocAllType; - createJSDocUnknownType(): JSDocUnknownType; - createJSDocNonNullableType(type: TypeNode, postfix?: boolean): JSDocNonNullableType; - updateJSDocNonNullableType(node: JSDocNonNullableType, type: TypeNode): JSDocNonNullableType; - createJSDocNullableType(type: TypeNode, postfix?: boolean): JSDocNullableType; - updateJSDocNullableType(node: JSDocNullableType, type: TypeNode): JSDocNullableType; - createJSDocOptionalType(type: TypeNode): JSDocOptionalType; - updateJSDocOptionalType(node: JSDocOptionalType, type: TypeNode): JSDocOptionalType; - createJSDocFunctionType(parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType; - updateJSDocFunctionType(node: JSDocFunctionType, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): JSDocFunctionType; - createJSDocVariadicType(type: TypeNode): JSDocVariadicType; - updateJSDocVariadicType(node: JSDocVariadicType, type: TypeNode): JSDocVariadicType; - createJSDocNamepathType(type: TypeNode): JSDocNamepathType; - updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType; - createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; - updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; - createJSDocNameReference(name: EntityName | JSDocMemberName): JSDocNameReference; - updateJSDocNameReference(node: JSDocNameReference, name: EntityName | JSDocMemberName): JSDocNameReference; - createJSDocMemberName(left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName; - updateJSDocMemberName(node: JSDocMemberName, left: EntityName | JSDocMemberName, right: Identifier): JSDocMemberName; - createJSDocLink(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink; - updateJSDocLink(node: JSDocLink, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLink; - createJSDocLinkCode(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode; - updateJSDocLinkCode(node: JSDocLinkCode, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkCode; - createJSDocLinkPlain(name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain; - updateJSDocLinkPlain(node: JSDocLinkPlain, name: EntityName | JSDocMemberName | undefined, text: string): JSDocLinkPlain; - createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral; - updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral; - createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature; - updateJSDocSignature(node: JSDocSignature, typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type: JSDocReturnTag | undefined): JSDocSignature; - createJSDocTemplateTag(tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | NodeArray): JSDocTemplateTag; - updateJSDocTemplateTag(node: JSDocTemplateTag, tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment: string | NodeArray | undefined): JSDocTemplateTag; - createJSDocTypedefTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | JSDocTypeLiteral, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray): JSDocTypedefTag; - updateJSDocTypedefTag(node: JSDocTypedefTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | JSDocTypeLiteral | undefined, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray | undefined): JSDocTypedefTag; - createJSDocParameterTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray): JSDocParameterTag; - updateJSDocParameterTag(node: JSDocParameterTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray | undefined): JSDocParameterTag; - createJSDocPropertyTag(tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression, isNameFirst?: boolean, comment?: string | NodeArray): JSDocPropertyTag; - updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | NodeArray | undefined): JSDocPropertyTag; - createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray): JSDocTypeTag; - updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray | undefined): JSDocTypeTag; - createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray): JSDocSeeTag; - updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string | NodeArray): JSDocSeeTag; - createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string | NodeArray): JSDocReturnTag; - updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray | undefined): JSDocReturnTag; - createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray): JSDocThisTag; - updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | NodeArray | undefined): JSDocThisTag; - createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray): JSDocEnumTag; - updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray | undefined): JSDocEnumTag; - createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray): JSDocCallbackTag; - updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray | undefined): JSDocCallbackTag; - createJSDocOverloadTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, comment?: string | NodeArray): JSDocOverloadTag; - updateJSDocOverloadTag(node: JSDocOverloadTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, comment: string | NodeArray | undefined): JSDocOverloadTag; - createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray): JSDocAugmentsTag; - updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray | undefined): JSDocAugmentsTag; - createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray): JSDocImplementsTag; - updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment: string | NodeArray | undefined): JSDocImplementsTag; - createJSDocAuthorTag(tagName: Identifier | undefined, comment?: string | NodeArray): JSDocAuthorTag; - updateJSDocAuthorTag(node: JSDocAuthorTag, tagName: Identifier | undefined, comment: string | NodeArray | undefined): JSDocAuthorTag; - createJSDocClassTag(tagName: Identifier | undefined, comment?: string | NodeArray): JSDocClassTag; - updateJSDocClassTag(node: JSDocClassTag, tagName: Identifier | undefined, comment: string | NodeArray | undefined): JSDocClassTag; - createJSDocPublicTag(tagName: Identifier | undefined, comment?: string | NodeArray): JSDocPublicTag; - updateJSDocPublicTag(node: JSDocPublicTag, tagName: Identifier | undefined, comment: string | NodeArray | undefined): JSDocPublicTag; - createJSDocPrivateTag(tagName: Identifier | undefined, comment?: string | NodeArray): JSDocPrivateTag; - updateJSDocPrivateTag(node: JSDocPrivateTag, tagName: Identifier | undefined, comment: string | NodeArray | undefined): JSDocPrivateTag; - createJSDocProtectedTag(tagName: Identifier | undefined, comment?: string | NodeArray): JSDocProtectedTag; - updateJSDocProtectedTag(node: JSDocProtectedTag, tagName: Identifier | undefined, comment: string | NodeArray | undefined): JSDocProtectedTag; - createJSDocReadonlyTag(tagName: Identifier | undefined, comment?: string | NodeArray): JSDocReadonlyTag; - updateJSDocReadonlyTag(node: JSDocReadonlyTag, tagName: Identifier | undefined, comment: string | NodeArray | undefined): JSDocReadonlyTag; - createJSDocUnknownTag(tagName: Identifier, comment?: string | NodeArray): JSDocUnknownTag; - updateJSDocUnknownTag(node: JSDocUnknownTag, tagName: Identifier, comment: string | NodeArray | undefined): JSDocUnknownTag; - createJSDocDeprecatedTag(tagName: Identifier | undefined, comment?: string | NodeArray): JSDocDeprecatedTag; - updateJSDocDeprecatedTag(node: JSDocDeprecatedTag, tagName: Identifier | undefined, comment?: string | NodeArray): JSDocDeprecatedTag; - createJSDocOverrideTag(tagName: Identifier | undefined, comment?: string | NodeArray): JSDocOverrideTag; - updateJSDocOverrideTag(node: JSDocOverrideTag, tagName: Identifier | undefined, comment?: string | NodeArray): JSDocOverrideTag; - createJSDocThrowsTag(tagName: Identifier, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray): JSDocThrowsTag; - updateJSDocThrowsTag(node: JSDocThrowsTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment?: string | NodeArray | undefined): JSDocThrowsTag; - createJSDocSatisfiesTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | NodeArray): JSDocSatisfiesTag; - updateJSDocSatisfiesTag(node: JSDocSatisfiesTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray | undefined): JSDocSatisfiesTag; - createJSDocText(text: string): JSDocText; - updateJSDocText(node: JSDocText, text: string): JSDocText; - createJSDocComment(comment?: string | NodeArray | undefined, tags?: readonly JSDocTag[] | undefined): JSDoc; - updateJSDocComment(node: JSDoc, comment: string | NodeArray | undefined, tags: readonly JSDocTag[] | undefined): JSDoc; - createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; - updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement; - createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; - updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement; - createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; - updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement; - createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement; - updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement; - createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; - createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; - updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText; - createJsxOpeningFragment(): JsxOpeningFragment; - createJsxJsxClosingFragment(): JsxClosingFragment; - updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment; - createJsxAttribute(name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute; - updateJsxAttribute(node: JsxAttribute, name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute; - createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes; - updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes; - createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute; - updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute; - createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression; - updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression; - createJsxNamespacedName(namespace: Identifier, name: Identifier): JsxNamespacedName; - updateJsxNamespacedName(node: JsxNamespacedName, namespace: Identifier, name: Identifier): JsxNamespacedName; - createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause; - updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause; - createDefaultClause(statements: readonly Statement[]): DefaultClause; - updateDefaultClause(node: DefaultClause, statements: readonly Statement[]): DefaultClause; - createHeritageClause(token: HeritageClause["token"], types: readonly ExpressionWithTypeArguments[]): HeritageClause; - updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause; - createCatchClause(variableDeclaration: string | BindingName | VariableDeclaration | undefined, block: Block): CatchClause; - updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause; - createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment; - updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment; - createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment; - updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment; - createSpreadAssignment(expression: Expression): SpreadAssignment; - updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment; - createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember; - updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember; - createSourceFile(statements: readonly Statement[], endOfFileToken: EndOfFileToken, flags: NodeFlags): SourceFile; - updateSourceFile(node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean, referencedFiles?: readonly FileReference[], typeReferences?: readonly FileReference[], hasNoDefaultLib?: boolean, libReferences?: readonly FileReference[]): SourceFile; - createNotEmittedStatement(original: Node): NotEmittedStatement; - createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression; - updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression; - createCommaListExpression(elements: readonly Expression[]): CommaListExpression; - updateCommaListExpression(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression; - createBundle(sourceFiles: readonly SourceFile[]): Bundle; - /** @deprecated*/ createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; - updateBundle(node: Bundle, sourceFiles: readonly SourceFile[]): Bundle; - /** @deprecated*/ updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle; - createComma(left: Expression, right: Expression): BinaryExpression; - createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment; - createAssignment(left: Expression, right: Expression): AssignmentExpression; - createLogicalOr(left: Expression, right: Expression): BinaryExpression; - createLogicalAnd(left: Expression, right: Expression): BinaryExpression; - createBitwiseOr(left: Expression, right: Expression): BinaryExpression; - createBitwiseXor(left: Expression, right: Expression): BinaryExpression; - createBitwiseAnd(left: Expression, right: Expression): BinaryExpression; - createStrictEquality(left: Expression, right: Expression): BinaryExpression; - createStrictInequality(left: Expression, right: Expression): BinaryExpression; - createEquality(left: Expression, right: Expression): BinaryExpression; - createInequality(left: Expression, right: Expression): BinaryExpression; - createLessThan(left: Expression, right: Expression): BinaryExpression; - createLessThanEquals(left: Expression, right: Expression): BinaryExpression; - createGreaterThan(left: Expression, right: Expression): BinaryExpression; - createGreaterThanEquals(left: Expression, right: Expression): BinaryExpression; - createLeftShift(left: Expression, right: Expression): BinaryExpression; - createRightShift(left: Expression, right: Expression): BinaryExpression; - createUnsignedRightShift(left: Expression, right: Expression): BinaryExpression; - createAdd(left: Expression, right: Expression): BinaryExpression; - createSubtract(left: Expression, right: Expression): BinaryExpression; - createMultiply(left: Expression, right: Expression): BinaryExpression; - createDivide(left: Expression, right: Expression): BinaryExpression; - createModulo(left: Expression, right: Expression): BinaryExpression; - createExponent(left: Expression, right: Expression): BinaryExpression; - createPrefixPlus(operand: Expression): PrefixUnaryExpression; - createPrefixMinus(operand: Expression): PrefixUnaryExpression; - createPrefixIncrement(operand: Expression): PrefixUnaryExpression; - createPrefixDecrement(operand: Expression): PrefixUnaryExpression; - createBitwiseNot(operand: Expression): PrefixUnaryExpression; - createLogicalNot(operand: Expression): PrefixUnaryExpression; - createPostfixIncrement(operand: Expression): PostfixUnaryExpression; - createPostfixDecrement(operand: Expression): PostfixUnaryExpression; - createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression; - createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): ImmediatelyInvokedArrowFunction; - createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): ImmediatelyInvokedArrowFunction; - createVoidZero(): VoidExpression; - createExportDefault(expression: Expression): ExportAssignment; - createExternalModuleExport(exportName: Identifier): ExportDeclaration; - restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression; - } - interface CoreTransformationContext { - readonly factory: NodeFactory; - /** Gets the compiler options supplied to the transformer. */ - getCompilerOptions(): CompilerOptions; - /** Starts a new lexical environment. */ - startLexicalEnvironment(): void; - /** Suspends the current lexical environment, usually after visiting a parameter list. */ - suspendLexicalEnvironment(): void; - /** Resumes a suspended lexical environment, usually before visiting a function body. */ - resumeLexicalEnvironment(): void; - /** Ends a lexical environment, returning any declarations. */ - endLexicalEnvironment(): Statement[] | undefined; - /** Hoists a function declaration to the containing scope. */ - hoistFunctionDeclaration(node: FunctionDeclaration): void; - /** Hoists a variable declaration to the containing scope. */ - hoistVariableDeclaration(node: Identifier): void; - } - interface TransformationContext extends CoreTransformationContext { - /** Records a request for a non-scoped emit helper in the current context. */ - requestEmitHelper(helper: EmitHelper): void; - /** Gets and resets the requested non-scoped emit helpers. */ - readEmitHelpers(): EmitHelper[] | undefined; - /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */ - enableSubstitution(kind: SyntaxKind): void; - /** Determines whether expression substitutions are enabled for the provided node. */ - isSubstitutionEnabled(node: Node): boolean; - /** - * Hook used by transformers to substitute expressions just before they - * are emitted by the pretty printer. - * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, - * before returning the `NodeTransformer` callback. - */ - onSubstituteNode: (hint: EmitHint, node: Node) => Node; - /** - * Enables before/after emit notifications in the pretty printer for the provided - * SyntaxKind. - */ - enableEmitNotification(kind: SyntaxKind): void; - /** - * Determines whether before/after emit notifications should be raised in the pretty - * printer when it emits a node. - */ - isEmitNotificationEnabled(node: Node): boolean; - /** - * Hook used to allow transformers to capture state before or after - * the printer emits a node. - * - * NOTE: Transformation hooks should only be modified during `Transformer` initialization, - * before returning the `NodeTransformer` callback. - */ - onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void; - } - interface TransformationResult { - /** Gets the transformed source files. */ - transformed: T[]; - /** Gets diagnostics for the transformation. */ - diagnostics?: DiagnosticWithLocation[]; - /** - * Gets a substitute for a node, if one is available; otherwise, returns the original node. - * - * @param hint A hint as to the intended usage of the node. - * @param node The node to substitute. - */ - substituteNode(hint: EmitHint, node: Node): Node; - /** - * Emits a node with possible notification. - * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback A callback used to emit the node. - */ - emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; - /** - * Indicates if a given node needs an emit notification - * - * @param node The node to emit. - */ - isEmitNotificationEnabled?(node: Node): boolean; - /** - * Clean up EmitNode entries on any parse-tree nodes. - */ - dispose(): void; - } - /** - * A function that is used to initialize and return a `Transformer` callback, which in turn - * will be used to transform one or more nodes. - */ - type TransformerFactory = (context: TransformationContext) => Transformer; - /** - * A function that transforms a node. - */ - type Transformer = (node: T) => T; - /** - * A function that accepts and possibly transforms a node. - */ - type Visitor = (node: TIn) => VisitResult; - /** - * A function that walks a node using the given visitor, lifting node arrays into single nodes, - * returning an node which satisfies the test. - * - * - If the input node is undefined, then the output is undefined. - * - If the visitor returns undefined, then the output is undefined. - * - If the output node is not undefined, then it will satisfy the test function. - * - In order to obtain a return type that is more specific than `Node`, a test - * function _must_ be provided, and that function must be a type predicate. - * - * For the canonical implementation of this type, @see {visitNode}. - */ - interface NodeVisitor { - (node: TIn, visitor: Visitor, TVisited>, test: (node: Node) => node is TOut, lift?: (node: readonly Node[]) => Node): TOut | (TIn & undefined) | (TVisited & undefined); - (node: TIn, visitor: Visitor, TVisited>, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => Node): Node | (TIn & undefined) | (TVisited & undefined); - } - /** - * A function that walks a node array using the given visitor, returning an array whose contents satisfy the test. - * - * - If the input node array is undefined, the output is undefined. - * - If the visitor can return undefined, the node it visits in the array will be reused. - * - If the output node array is not undefined, then its contents will satisfy the test. - * - In order to obtain a return type that is more specific than `NodeArray`, a test - * function _must_ be provided, and that function must be a type predicate. - * - * For the canonical implementation of this type, @see {visitNodes}. - */ - interface NodesVisitor { - | undefined, TOut extends Node>(nodes: TInArray, visitor: Visitor, test: (node: Node) => node is TOut, start?: number, count?: number): NodeArray | (TInArray & undefined); - | undefined>(nodes: TInArray, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray | (TInArray & undefined); - } - type VisitResult = T | readonly Node[]; - interface Printer { - /** - * Print a node and its subtree as-is, without any emit transformations. - * @param hint A value indicating the purpose of a node. This is primarily used to - * distinguish between an `Identifier` used in an expression position, versus an - * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you - * should just pass `Unspecified`. - * @param node The node to print. The node and its subtree are printed as-is, without any - * emit transformations. - * @param sourceFile A source file that provides context for the node. The source text of - * the file is used to emit the original source content for literals and identifiers, while - * the identifiers of the source file are used when generating unique names to avoid - * collisions. - */ - printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string; - /** - * Prints a list of nodes using the given format flags - */ - printList(format: ListFormat, list: NodeArray, sourceFile: SourceFile): string; - /** - * Prints a source file as-is, without any emit transformations. - */ - printFile(sourceFile: SourceFile): string; - /** - * Prints a bundle of source files as-is, without any emit transformations. - */ - printBundle(bundle: Bundle): string; - } - interface PrintHandlers { - /** - * A hook used by the Printer when generating unique names to avoid collisions with - * globally defined names that exist outside of the current source file. - */ - hasGlobalName?(name: string): boolean; - /** - * A hook used by the Printer to provide notifications prior to emitting a node. A - * compatible implementation **must** invoke `emitCallback` with the provided `hint` and - * `node` values. - * @param hint A hint indicating the intended purpose of the node. - * @param node The node to emit. - * @param emitCallback A callback that, when invoked, will emit the node. - * @example - * ```ts - * var printer = createPrinter(printerOptions, { - * onEmitNode(hint, node, emitCallback) { - * // set up or track state prior to emitting the node... - * emitCallback(hint, node); - * // restore state after emitting the node... - * } - * }); - * ``` - */ - onEmitNode?(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void; - /** - * A hook used to check if an emit notification is required for a node. - * @param node The node to emit. - */ - isEmitNotificationEnabled?(node: Node): boolean; - /** - * A hook used by the Printer to perform just-in-time substitution of a node. This is - * primarily used by node transformations that need to substitute one node for another, - * such as replacing `myExportedVar` with `exports.myExportedVar`. - * @param hint A hint indicating the intended purpose of the node. - * @param node The node to emit. - * @example - * ```ts - * var printer = createPrinter(printerOptions, { - * substituteNode(hint, node) { - * // perform substitution if necessary... - * return node; - * } - * }); - * ``` - */ - substituteNode?(hint: EmitHint, node: Node): Node; - } - interface PrinterOptions { - removeComments?: boolean; - newLine?: NewLineKind; - omitTrailingSemicolon?: boolean; - noEmitHelpers?: boolean; - } - interface GetEffectiveTypeRootsHost { - getCurrentDirectory?(): string; - } - interface TextSpan { - start: number; - length: number; - } - interface TextChangeRange { - span: TextSpan; - newLength: number; - } - interface SyntaxList extends Node { - kind: SyntaxKind.SyntaxList; - _children: Node[]; - } - enum ListFormat { - None = 0, - SingleLine = 0, - MultiLine = 1, - PreserveLines = 2, - LinesMask = 3, - NotDelimited = 0, - BarDelimited = 4, - AmpersandDelimited = 8, - CommaDelimited = 16, - AsteriskDelimited = 32, - DelimitersMask = 60, - AllowTrailingComma = 64, - Indented = 128, - SpaceBetweenBraces = 256, - SpaceBetweenSiblings = 512, - Braces = 1024, - Parenthesis = 2048, - AngleBrackets = 4096, - SquareBrackets = 8192, - BracketsMask = 15360, - OptionalIfUndefined = 16384, - OptionalIfEmpty = 32768, - Optional = 49152, - PreferNewLine = 65536, - NoTrailingNewLine = 131072, - NoInterveningComments = 262144, - NoSpaceIfEmpty = 524288, - SingleElement = 1048576, - SpaceAfterList = 2097152, - Modifiers = 2359808, - HeritageClauses = 512, - SingleLineTypeLiteralMembers = 768, - MultiLineTypeLiteralMembers = 32897, - SingleLineTupleTypeElements = 528, - MultiLineTupleTypeElements = 657, - UnionTypeConstituents = 516, - IntersectionTypeConstituents = 520, - ObjectBindingPatternElements = 525136, - ArrayBindingPatternElements = 524880, - ObjectLiteralExpressionProperties = 526226, - ImportClauseEntries = 526226, - ArrayLiteralExpressionElements = 8914, - CommaListElements = 528, - CallExpressionArguments = 2576, - NewExpressionArguments = 18960, - TemplateExpressionSpans = 262144, - SingleLineBlockStatements = 768, - MultiLineBlockStatements = 129, - VariableDeclarationList = 528, - SingleLineFunctionBodyStatements = 768, - MultiLineFunctionBodyStatements = 1, - ClassHeritageClauses = 0, - ClassMembers = 129, - InterfaceMembers = 129, - EnumMembers = 145, - CaseBlockClauses = 129, - NamedImportsOrExportsElements = 525136, - JsxElementOrFragmentChildren = 262144, - JsxElementAttributes = 262656, - CaseOrDefaultClauseStatements = 163969, - HeritageClauseTypes = 528, - SourceFileStatements = 131073, - Decorators = 2146305, - TypeArguments = 53776, - TypeParameters = 53776, - Parameters = 2576, - IndexSignatureParameters = 8848, - JSDocComment = 33 - } - interface UserPreferences { - readonly disableSuggestions?: boolean; - readonly quotePreference?: "auto" | "double" | "single"; - readonly includeCompletionsForModuleExports?: boolean; - readonly includeCompletionsForImportStatements?: boolean; - readonly includeCompletionsWithSnippetText?: boolean; - readonly includeAutomaticOptionalChainCompletions?: boolean; - readonly includeCompletionsWithInsertText?: boolean; - readonly includeCompletionsWithClassMemberSnippets?: boolean; - readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; - readonly useLabelDetailsInCompletionEntries?: boolean; - readonly allowIncompleteCompletions?: boolean; - readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative"; - /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ - readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; - readonly allowTextChangesInNewFiles?: boolean; - readonly providePrefixAndSuffixTextForRename?: boolean; - readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; - readonly provideRefactorNotApplicableReason?: boolean; - readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none"; - readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; - readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; - readonly includeInlayFunctionParameterTypeHints?: boolean; - readonly includeInlayVariableTypeHints?: boolean; - readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean; - readonly includeInlayPropertyDeclarationTypeHints?: boolean; - readonly includeInlayFunctionLikeReturnTypeHints?: boolean; - readonly includeInlayEnumMemberValueHints?: boolean; - readonly interactiveInlayHints?: boolean; - readonly allowRenameOfImportPath?: boolean; - readonly autoImportFileExcludePatterns?: string[]; - readonly organizeImportsIgnoreCase?: "auto" | boolean; - readonly organizeImportsCollation?: "ordinal" | "unicode"; - readonly organizeImportsLocale?: string; - readonly organizeImportsNumericCollation?: boolean; - readonly organizeImportsAccentCollation?: boolean; - readonly organizeImportsCaseFirst?: "upper" | "lower" | false; - } - /** Represents a bigint literal value without requiring bigint support */ - interface PseudoBigInt { - negative: boolean; - base10Value: string; - } - enum FileWatcherEventKind { - Created = 0, - Changed = 1, - Deleted = 2 - } - type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind, modifiedTime?: Date) => void; - type DirectoryWatcherCallback = (fileName: string) => void; - type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"; - interface System { - args: string[]; - newLine: string; - useCaseSensitiveFileNames: boolean; - write(s: string): void; - writeOutputIsTTY?(): boolean; - getWidthOfTerminal?(): number; - readFile(path: string, encoding?: string): string | undefined; - getFileSize?(path: string): number; - writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - /** - * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that - * use native OS file watching - */ - watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; - watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; - resolvePath(path: string): string; - fileExists(path: string): boolean; - directoryExists(path: string): boolean; - createDirectory(path: string): void; - getExecutingFilePath(): string; - getCurrentDirectory(): string; - getDirectories(path: string): string[]; - readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; - getModifiedTime?(path: string): Date | undefined; - setModifiedTime?(path: string, time: Date): void; - deleteFile?(path: string): void; - /** - * A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm) - */ - createHash?(data: string): string; - /** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */ - createSHA256Hash?(data: string): string; - getMemoryUsage?(): number; - exit(exitCode?: number): void; - realpath?(path: string): string; - setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; - clearTimeout?(timeoutId: any): void; - clearScreen?(): void; - base64decode?(input: string): string; - base64encode?(input: string): string; - } - interface FileWatcher { - close(): void; - } - let sys: System; - function tokenToString(t: SyntaxKind): string | undefined; - function getPositionOfLineAndCharacter(sourceFile: SourceFileLike, line: number, character: number): number; - function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter; - function isWhiteSpaceLike(ch: number): boolean; - /** Does not include line breaks. For that, see isWhiteSpaceLike. */ - function isWhiteSpaceSingleLine(ch: number): boolean; - function isLineBreak(ch: number): boolean; - function couldStartTrivia(text: string, pos: number): boolean; - function forEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; - function forEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; - function forEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined; - function forEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined; - function reduceEachLeadingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined; - function reduceEachTrailingCommentRange(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T, initial: U): U | undefined; - function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined; - function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined; - /** Optionally, get the shebang */ - function getShebang(text: string): string | undefined; - function isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean; - function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean; - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner; - type ErrorCallback = (message: DiagnosticMessage, length: number, arg0?: any) => void; - interface Scanner { - /** @deprecated use {@link getTokenFullStart} */ - getStartPos(): number; - getToken(): SyntaxKind; - getTokenFullStart(): number; - getTokenStart(): number; - getTokenEnd(): number; - /** @deprecated use {@link getTokenEnd} */ - getTextPos(): number; - /** @deprecated use {@link getTokenStart} */ - getTokenPos(): number; - getTokenText(): string; - getTokenValue(): string; - hasUnicodeEscape(): boolean; - hasExtendedUnicodeEscape(): boolean; - hasPrecedingLineBreak(): boolean; - isIdentifier(): boolean; - isReservedWord(): boolean; - isUnterminated(): boolean; - reScanGreaterToken(): SyntaxKind; - reScanSlashToken(): SyntaxKind; - reScanAsteriskEqualsToken(): SyntaxKind; - reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind; - /** @deprecated use {@link reScanTemplateToken}(false) */ - reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind; - scanJsxIdentifier(): SyntaxKind; - scanJsxAttributeValue(): SyntaxKind; - reScanJsxAttributeValue(): SyntaxKind; - reScanJsxToken(allowMultilineJsxText?: boolean): JsxTokenSyntaxKind; - reScanLessThanToken(): SyntaxKind; - reScanHashToken(): SyntaxKind; - reScanQuestionToken(): SyntaxKind; - reScanInvalidIdentifier(): SyntaxKind; - scanJsxToken(): JsxTokenSyntaxKind; - scanJsDocToken(): JSDocSyntaxKind; - scan(): SyntaxKind; - getText(): string; - setText(text: string | undefined, start?: number, length?: number): void; - setOnError(onError: ErrorCallback | undefined): void; - setScriptTarget(scriptTarget: ScriptTarget): void; - setLanguageVariant(variant: LanguageVariant): void; - /** @deprecated use {@link resetTokenState} */ - setTextPos(textPos: number): void; - resetTokenState(pos: number): void; - lookAhead(callback: () => T): T; - scanRange(start: number, length: number, callback: () => T): T; - tryScan(callback: () => T): T; - } - function isExternalModuleNameRelative(moduleName: string): boolean; - function sortAndDeduplicateDiagnostics(diagnostics: readonly T[]): SortedReadonlyArray; - function getDefaultLibFileName(options: CompilerOptions): string; - function textSpanEnd(span: TextSpan): number; - function textSpanIsEmpty(span: TextSpan): boolean; - function textSpanContainsPosition(span: TextSpan, position: number): boolean; - function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean; - function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean; - function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined; - function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean; - function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean; - function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean; - function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean; - function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined; - function createTextSpan(start: number, length: number): TextSpan; - function createTextSpanFromBounds(start: number, end: number): TextSpan; - function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; - function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; - function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - function collapseTextChangeRangesAcrossMultipleVersions(changes: readonly TextChangeRange[]): TextChangeRange; - function getTypeParameterOwner(d: Declaration): Declaration | undefined; - function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration; - function isEmptyBindingPattern(node: BindingName): node is BindingPattern; - function isEmptyBindingElement(node: BindingElement | ArrayBindingElement): boolean; - function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration; - function getCombinedModifierFlags(node: Declaration): ModifierFlags; - function getCombinedNodeFlags(node: Node): NodeFlags; - /** - * Checks to see if the locale is in the appropriate format, - * and if it is, attempts to set the appropriate language. - */ - function validateLocaleAndSetLanguage(locale: string, sys: { - getExecutingFilePath(): string; - resolvePath(path: string): string; - fileExists(fileName: string): boolean; - readFile(fileName: string): string | undefined; - }, errors?: Diagnostic[]): void; - function getOriginalNode(node: Node): Node; - function getOriginalNode(node: Node, nodeTest: (node: Node) => node is T): T; - function getOriginalNode(node: Node | undefined): Node | undefined; - function getOriginalNode(node: Node | undefined, nodeTest: (node: Node) => node is T): T | undefined; - /** - * Iterates through the parent chain of a node and performs the callback on each parent until the callback - * returns a truthy value, then returns that value. - * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" - * At that point findAncestor returns undefined. - */ - function findAncestor(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; - function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; - /** - * Gets a value indicating whether a node originated in the parse tree. - * - * @param node The node to test. - */ - function isParseTreeNode(node: Node): boolean; - /** - * Gets the original parse tree node for a node. - * - * @param node The original node. - * @returns The original parse tree node if found; otherwise, undefined. - */ - function getParseTreeNode(node: Node | undefined): Node | undefined; - /** - * Gets the original parse tree node for a node. - * - * @param node The original node. - * @param nodeTest A callback used to ensure the correct type of parse tree node is returned. - * @returns The original parse tree node if found; otherwise, undefined. - */ - function getParseTreeNode(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined; - /** Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' */ - function escapeLeadingUnderscores(identifier: string): __String; - /** - * Remove extra underscore from escaped identifier text content. - * - * @param identifier The escaped identifier text. - * @returns The unescaped identifier text. - */ - function unescapeLeadingUnderscores(identifier: __String): string; - function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string; - /** - * If the text of an Identifier matches a keyword (including contextual and TypeScript-specific keywords), returns the - * SyntaxKind for the matching keyword. - */ - function identifierToKeywordKind(node: Identifier): KeywordSyntaxKind | undefined; - function symbolName(symbol: Symbol): string; - function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; - function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; - function getDecorators(node: HasDecorators): readonly Decorator[] | undefined; - function getModifiers(node: HasModifiers): readonly Modifier[] | undefined; - /** - * Gets the JSDoc parameter tags for the node if present. - * - * @remarks Returns any JSDoc param tag whose name matches the provided - * parameter, whether a param tag on a containing function - * expression, or a param tag on a variable declaration whose - * initializer is the containing function. The tags closest to the - * node are returned first, so in the previous example, the param - * tag on the containing function expression would be first. - * - * For binding patterns, parameter tags are matched by position. - */ - function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[]; - /** - * Gets the JSDoc type parameter tags for the node if present. - * - * @remarks Returns any JSDoc template tag whose names match the provided - * parameter, whether a template tag on a containing function - * expression, or a template tag on a variable declaration whose - * initializer is the containing function. The tags closest to the - * node are returned first, so in the previous example, the template - * tag on the containing function expression would be first. - */ - function getJSDocTypeParameterTags(param: TypeParameterDeclaration): readonly JSDocTemplateTag[]; - /** - * Return true if the node has JSDoc parameter tags. - * - * @remarks Includes parameter tags that are not directly on the node, - * for example on a variable declaration whose initializer is a function expression. - */ - function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean; - /** Gets the JSDoc augments tag for the node if present */ - function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined; - /** Gets the JSDoc implements tags for the node if present */ - function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[]; - /** Gets the JSDoc class tag for the node if present */ - function getJSDocClassTag(node: Node): JSDocClassTag | undefined; - /** Gets the JSDoc public tag for the node if present */ - function getJSDocPublicTag(node: Node): JSDocPublicTag | undefined; - /** Gets the JSDoc private tag for the node if present */ - function getJSDocPrivateTag(node: Node): JSDocPrivateTag | undefined; - /** Gets the JSDoc protected tag for the node if present */ - function getJSDocProtectedTag(node: Node): JSDocProtectedTag | undefined; - /** Gets the JSDoc protected tag for the node if present */ - function getJSDocReadonlyTag(node: Node): JSDocReadonlyTag | undefined; - function getJSDocOverrideTagNoCache(node: Node): JSDocOverrideTag | undefined; - /** Gets the JSDoc deprecated tag for the node if present */ - function getJSDocDeprecatedTag(node: Node): JSDocDeprecatedTag | undefined; - /** Gets the JSDoc enum tag for the node if present */ - function getJSDocEnumTag(node: Node): JSDocEnumTag | undefined; - /** Gets the JSDoc this tag for the node if present */ - function getJSDocThisTag(node: Node): JSDocThisTag | undefined; - /** Gets the JSDoc return tag for the node if present */ - function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined; - /** Gets the JSDoc template tag for the node if present */ - function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined; - function getJSDocSatisfiesTag(node: Node): JSDocSatisfiesTag | undefined; - /** Gets the JSDoc type tag for the node if present and valid */ - function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined; - /** - * Gets the type node for the node if provided via JSDoc. - * - * @remarks The search includes any JSDoc param tag that relates - * to the provided parameter, for example a type tag on the - * parameter itself, or a param tag on a containing function - * expression, or a param tag on a variable declaration whose - * initializer is the containing function. The tags closest to the - * node are examined first, so in the previous example, the type - * tag directly on the node would be returned. - */ - function getJSDocType(node: Node): TypeNode | undefined; - /** - * Gets the return type node for the node if provided via JSDoc return tag or type tag. - * - * @remarks `getJSDocReturnTag` just gets the whole JSDoc tag. This function - * gets the type from inside the braces, after the fat arrow, etc. - */ - function getJSDocReturnType(node: Node): TypeNode | undefined; - /** Get all JSDoc tags related to a node, including those on parent nodes. */ - function getJSDocTags(node: Node): readonly JSDocTag[]; - /** Gets all JSDoc tags that match a specified predicate */ - function getAllJSDocTags(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[]; - /** Gets all JSDoc tags of a specified kind */ - function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[]; - /** Gets the text of a jsdoc comment, flattening links to their text. */ - function getTextOfJSDocComment(comment?: string | NodeArray): string | undefined; - /** - * Gets the effective type parameters. If the node was parsed in a - * JavaScript file, gets the type parameters from the `@template` tag from JSDoc. - * - * This does *not* return type parameters from a jsdoc reference to a generic type, eg - * - * type Id = (x: T) => T - * /** @type {Id} / - * function id(x) { return x } - */ - function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[]; - function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined; - function isMemberName(node: Node): node is MemberName; - function isPropertyAccessChain(node: Node): node is PropertyAccessChain; - function isElementAccessChain(node: Node): node is ElementAccessChain; - function isCallChain(node: Node): node is CallChain; - function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain; - function isNullishCoalesce(node: Node): boolean; - function isConstTypeReference(node: Node): boolean; - function skipPartiallyEmittedExpressions(node: Expression): Expression; - function skipPartiallyEmittedExpressions(node: Node): Node; - function isNonNullChain(node: Node): node is NonNullChain; - function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement; - function isNamedExportBindings(node: Node): node is NamedExportBindings; - /** @deprecated */ - function isUnparsedTextLike(node: Node): node is UnparsedTextLike; - /** @deprecated */ - function isUnparsedNode(node: Node): node is UnparsedNode; - function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag; - /** - * True if kind is of some token syntax kind. - * For example, this is true for an IfKeyword but not for an IfStatement. - * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail. - */ - function isTokenKind(kind: SyntaxKind): boolean; - /** - * True if node is of some token syntax kind. - * For example, this is true for an IfKeyword but not for an IfStatement. - * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail. - */ - function isToken(n: Node): boolean; - function isLiteralExpression(node: Node): node is LiteralExpression; - function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken; - function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail; - function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier; - function isTypeOnlyImportDeclaration(node: Node): node is TypeOnlyImportDeclaration; - function isTypeOnlyExportDeclaration(node: Node): node is TypeOnlyExportDeclaration; - function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyAliasDeclaration; - function isAssertionKey(node: Node): node is AssertionKey; - function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken; - function isModifier(node: Node): node is Modifier; - function isEntityName(node: Node): node is EntityName; - function isPropertyName(node: Node): node is PropertyName; - function isBindingName(node: Node): node is BindingName; - function isFunctionLike(node: Node | undefined): node is SignatureDeclaration; - function isClassElement(node: Node): node is ClassElement; - function isClassLike(node: Node): node is ClassLikeDeclaration; - function isAccessor(node: Node): node is AccessorDeclaration; - function isAutoAccessorPropertyDeclaration(node: Node): node is AutoAccessorPropertyDeclaration; - function isModifierLike(node: Node): node is ModifierLike; - function isTypeElement(node: Node): node is TypeElement; - function isClassOrTypeElement(node: Node): node is ClassElement | TypeElement; - function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike; - /** - * Node test that determines whether a node is a valid type node. - * This differs from the `isPartOfTypeNode` function which determines whether a node is *part* - * of a TypeNode. - */ - function isTypeNode(node: Node): node is TypeNode; - function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode; - function isArrayBindingElement(node: Node): node is ArrayBindingElement; - function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName; - function isCallLikeExpression(node: Node): node is CallLikeExpression; - function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression; - function isTemplateLiteral(node: Node): node is TemplateLiteral; - function isLeftHandSideExpression(node: Node): node is LeftHandSideExpression; - function isLiteralTypeLiteral(node: Node): node is NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression; - /** - * Determines whether a node is an expression based only on its kind. - */ - function isExpression(node: Node): node is Expression; - function isAssertionExpression(node: Node): node is AssertionExpression; - function isIterationStatement(node: Node, lookInLabeledStatements: false): node is IterationStatement; - function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement | LabeledStatement; - function isConciseBody(node: Node): node is ConciseBody; - function isForInitializer(node: Node): node is ForInitializer; - function isModuleBody(node: Node): node is ModuleBody; - function isNamedImportBindings(node: Node): node is NamedImportBindings; - function isStatement(node: Node): node is Statement; - function isModuleReference(node: Node): node is ModuleReference; - function isJsxTagNameExpression(node: Node): node is JsxTagNameExpression; - function isJsxChild(node: Node): node is JsxChild; - function isJsxAttributeLike(node: Node): node is JsxAttributeLike; - function isStringLiteralOrJsxExpression(node: Node): node is StringLiteral | JsxExpression; - function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement; - function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause; - /** True if node is of a kind that may contain comment text. */ - function isJSDocCommentContainingNode(node: Node): boolean; - function isSetAccessor(node: Node): node is SetAccessorDeclaration; - function isGetAccessor(node: Node): node is GetAccessorDeclaration; - /** True if has initializer node attached to it. */ - function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer; - function isObjectLiteralElement(node: Node): node is ObjectLiteralElement; - function isStringLiteralLike(node: Node | FileReference): node is StringLiteralLike; - function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain; - function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean; - function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean; - let unchangedTextChangeRange: TextChangeRange; - type ParameterPropertyDeclaration = ParameterDeclaration & { - parent: ConstructorDeclaration; - name: Identifier; - }; - /** - * This function checks multiple locations for JSDoc comments that apply to a host node. - * At each location, the whole comment may apply to the node, or only a specific tag in - * the comment. In the first case, location adds the entire {@link JSDoc} object. In the - * second case, it adds the applicable {@link JSDocTag}. - * - * For example, a JSDoc comment before a parameter adds the entire {@link JSDoc}. But a - * `@param` tag on the parent function only adds the {@link JSDocTag} for the `@param`. - * - * ```ts - * /** JSDoc will be returned for `a` *\/ - * const a = 0 - * /** - * * Entire JSDoc will be returned for `b` - * * @param c JSDocTag will be returned for `c` - * *\/ - * function b(/** JSDoc will be returned for `c` *\/ c) {} - * ``` - */ - function getJSDocCommentsAndTags(hostNode: Node): readonly (JSDoc | JSDocTag)[]; - /** @deprecated */ - function createUnparsedSourceFile(text: string): UnparsedSource; - /** @deprecated */ - function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource; - /** @deprecated */ - function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource; - /** @deprecated */ - function createInputFiles(javascriptText: string, declarationText: string): InputFiles; - /** @deprecated */ - function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles; - /** @deprecated */ - function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles; - /** - * Create an external source map source file reference - */ - function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource; - function setOriginalNode(node: T, original: Node | undefined): T; - const factory: NodeFactory; - /** - * Clears any `EmitNode` entries from parse-tree nodes. - * @param sourceFile A source file. - */ - function disposeEmitNodes(sourceFile: SourceFile | undefined): void; - /** - * Sets flags that control emit behavior of a node. - */ - function setEmitFlags(node: T, emitFlags: EmitFlags): T; - /** - * Gets a custom text range to use when emitting source maps. - */ - function getSourceMapRange(node: Node): SourceMapRange; - /** - * Sets a custom text range to use when emitting source maps. - */ - function setSourceMapRange(node: T, range: SourceMapRange | undefined): T; - /** - * Gets the TextRange to use for source maps for a token of a node. - */ - function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | undefined; - /** - * Sets the TextRange to use for source maps for a token of a node. - */ - function setTokenSourceMapRange(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T; - /** - * Gets a custom text range to use when emitting comments. - */ - function getCommentRange(node: Node): TextRange; - /** - * Sets a custom text range to use when emitting comments. - */ - function setCommentRange(node: T, range: TextRange): T; - function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined; - function setSyntheticLeadingComments(node: T, comments: SynthesizedComment[] | undefined): T; - function addSyntheticLeadingComment(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T; - function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined; - function setSyntheticTrailingComments(node: T, comments: SynthesizedComment[] | undefined): T; - function addSyntheticTrailingComment(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T; - function moveSyntheticComments(node: T, original: Node): T; - /** - * Gets the constant value to emit for an expression representing an enum. - */ - function getConstantValue(node: AccessExpression): string | number | undefined; - /** - * Sets the constant value to emit for an expression. - */ - function setConstantValue(node: AccessExpression, value: string | number): AccessExpression; - /** - * Adds an EmitHelper to a node. - */ - function addEmitHelper(node: T, helper: EmitHelper): T; - /** - * Add EmitHelpers to a node. - */ - function addEmitHelpers(node: T, helpers: EmitHelper[] | undefined): T; - /** - * Removes an EmitHelper from a node. - */ - function removeEmitHelper(node: Node, helper: EmitHelper): boolean; - /** - * Gets the EmitHelpers of a node. - */ - function getEmitHelpers(node: Node): EmitHelper[] | undefined; - /** - * Moves matching emit helpers from a source node to a target node. - */ - function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void; - function isNumericLiteral(node: Node): node is NumericLiteral; - function isBigIntLiteral(node: Node): node is BigIntLiteral; - function isStringLiteral(node: Node): node is StringLiteral; - function isJsxText(node: Node): node is JsxText; - function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral; - function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral; - function isTemplateHead(node: Node): node is TemplateHead; - function isTemplateMiddle(node: Node): node is TemplateMiddle; - function isTemplateTail(node: Node): node is TemplateTail; - function isDotDotDotToken(node: Node): node is DotDotDotToken; - function isPlusToken(node: Node): node is PlusToken; - function isMinusToken(node: Node): node is MinusToken; - function isAsteriskToken(node: Node): node is AsteriskToken; - function isExclamationToken(node: Node): node is ExclamationToken; - function isQuestionToken(node: Node): node is QuestionToken; - function isColonToken(node: Node): node is ColonToken; - function isQuestionDotToken(node: Node): node is QuestionDotToken; - function isEqualsGreaterThanToken(node: Node): node is EqualsGreaterThanToken; - function isIdentifier(node: Node): node is Identifier; - function isPrivateIdentifier(node: Node): node is PrivateIdentifier; - function isAssertsKeyword(node: Node): node is AssertsKeyword; - function isAwaitKeyword(node: Node): node is AwaitKeyword; - function isQualifiedName(node: Node): node is QualifiedName; - function isComputedPropertyName(node: Node): node is ComputedPropertyName; - function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration; - function isParameter(node: Node): node is ParameterDeclaration; - function isDecorator(node: Node): node is Decorator; - function isPropertySignature(node: Node): node is PropertySignature; - function isPropertyDeclaration(node: Node): node is PropertyDeclaration; - function isMethodSignature(node: Node): node is MethodSignature; - function isMethodDeclaration(node: Node): node is MethodDeclaration; - function isClassStaticBlockDeclaration(node: Node): node is ClassStaticBlockDeclaration; - function isConstructorDeclaration(node: Node): node is ConstructorDeclaration; - function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration; - function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration; - function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration; - function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration; - function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration; - function isTypePredicateNode(node: Node): node is TypePredicateNode; - function isTypeReferenceNode(node: Node): node is TypeReferenceNode; - function isFunctionTypeNode(node: Node): node is FunctionTypeNode; - function isConstructorTypeNode(node: Node): node is ConstructorTypeNode; - function isTypeQueryNode(node: Node): node is TypeQueryNode; - function isTypeLiteralNode(node: Node): node is TypeLiteralNode; - function isArrayTypeNode(node: Node): node is ArrayTypeNode; - function isTupleTypeNode(node: Node): node is TupleTypeNode; - function isNamedTupleMember(node: Node): node is NamedTupleMember; - function isOptionalTypeNode(node: Node): node is OptionalTypeNode; - function isRestTypeNode(node: Node): node is RestTypeNode; - function isUnionTypeNode(node: Node): node is UnionTypeNode; - function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode; - function isConditionalTypeNode(node: Node): node is ConditionalTypeNode; - function isInferTypeNode(node: Node): node is InferTypeNode; - function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode; - function isThisTypeNode(node: Node): node is ThisTypeNode; - function isTypeOperatorNode(node: Node): node is TypeOperatorNode; - function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode; - function isMappedTypeNode(node: Node): node is MappedTypeNode; - function isLiteralTypeNode(node: Node): node is LiteralTypeNode; - function isImportTypeNode(node: Node): node is ImportTypeNode; - function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan; - function isTemplateLiteralTypeNode(node: Node): node is TemplateLiteralTypeNode; - function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; - function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; - function isBindingElement(node: Node): node is BindingElement; - function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression; - function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression; - function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression; - function isElementAccessExpression(node: Node): node is ElementAccessExpression; - function isCallExpression(node: Node): node is CallExpression; - function isNewExpression(node: Node): node is NewExpression; - function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression; - function isTypeAssertionExpression(node: Node): node is TypeAssertion; - function isParenthesizedExpression(node: Node): node is ParenthesizedExpression; - function isFunctionExpression(node: Node): node is FunctionExpression; - function isArrowFunction(node: Node): node is ArrowFunction; - function isDeleteExpression(node: Node): node is DeleteExpression; - function isTypeOfExpression(node: Node): node is TypeOfExpression; - function isVoidExpression(node: Node): node is VoidExpression; - function isAwaitExpression(node: Node): node is AwaitExpression; - function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression; - function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression; - function isBinaryExpression(node: Node): node is BinaryExpression; - function isConditionalExpression(node: Node): node is ConditionalExpression; - function isTemplateExpression(node: Node): node is TemplateExpression; - function isYieldExpression(node: Node): node is YieldExpression; - function isSpreadElement(node: Node): node is SpreadElement; - function isClassExpression(node: Node): node is ClassExpression; - function isOmittedExpression(node: Node): node is OmittedExpression; - function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments; - function isAsExpression(node: Node): node is AsExpression; - function isSatisfiesExpression(node: Node): node is SatisfiesExpression; - function isNonNullExpression(node: Node): node is NonNullExpression; - function isMetaProperty(node: Node): node is MetaProperty; - function isSyntheticExpression(node: Node): node is SyntheticExpression; - function isPartiallyEmittedExpression(node: Node): node is PartiallyEmittedExpression; - function isCommaListExpression(node: Node): node is CommaListExpression; - function isTemplateSpan(node: Node): node is TemplateSpan; - function isSemicolonClassElement(node: Node): node is SemicolonClassElement; - function isBlock(node: Node): node is Block; - function isVariableStatement(node: Node): node is VariableStatement; - function isEmptyStatement(node: Node): node is EmptyStatement; - function isExpressionStatement(node: Node): node is ExpressionStatement; - function isIfStatement(node: Node): node is IfStatement; - function isDoStatement(node: Node): node is DoStatement; - function isWhileStatement(node: Node): node is WhileStatement; - function isForStatement(node: Node): node is ForStatement; - function isForInStatement(node: Node): node is ForInStatement; - function isForOfStatement(node: Node): node is ForOfStatement; - function isContinueStatement(node: Node): node is ContinueStatement; - function isBreakStatement(node: Node): node is BreakStatement; - function isReturnStatement(node: Node): node is ReturnStatement; - function isWithStatement(node: Node): node is WithStatement; - function isSwitchStatement(node: Node): node is SwitchStatement; - function isLabeledStatement(node: Node): node is LabeledStatement; - function isThrowStatement(node: Node): node is ThrowStatement; - function isTryStatement(node: Node): node is TryStatement; - function isDebuggerStatement(node: Node): node is DebuggerStatement; - function isVariableDeclaration(node: Node): node is VariableDeclaration; - function isVariableDeclarationList(node: Node): node is VariableDeclarationList; - function isFunctionDeclaration(node: Node): node is FunctionDeclaration; - function isClassDeclaration(node: Node): node is ClassDeclaration; - function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration; - function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration; - function isEnumDeclaration(node: Node): node is EnumDeclaration; - function isModuleDeclaration(node: Node): node is ModuleDeclaration; - function isModuleBlock(node: Node): node is ModuleBlock; - function isCaseBlock(node: Node): node is CaseBlock; - function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration; - function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration; - function isImportDeclaration(node: Node): node is ImportDeclaration; - function isImportClause(node: Node): node is ImportClause; - function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer; - function isAssertClause(node: Node): node is AssertClause; - function isAssertEntry(node: Node): node is AssertEntry; - function isNamespaceImport(node: Node): node is NamespaceImport; - function isNamespaceExport(node: Node): node is NamespaceExport; - function isNamedImports(node: Node): node is NamedImports; - function isImportSpecifier(node: Node): node is ImportSpecifier; - function isExportAssignment(node: Node): node is ExportAssignment; - function isExportDeclaration(node: Node): node is ExportDeclaration; - function isNamedExports(node: Node): node is NamedExports; - function isExportSpecifier(node: Node): node is ExportSpecifier; - function isMissingDeclaration(node: Node): node is MissingDeclaration; - function isNotEmittedStatement(node: Node): node is NotEmittedStatement; - function isExternalModuleReference(node: Node): node is ExternalModuleReference; - function isJsxElement(node: Node): node is JsxElement; - function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement; - function isJsxOpeningElement(node: Node): node is JsxOpeningElement; - function isJsxClosingElement(node: Node): node is JsxClosingElement; - function isJsxFragment(node: Node): node is JsxFragment; - function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment; - function isJsxClosingFragment(node: Node): node is JsxClosingFragment; - function isJsxAttribute(node: Node): node is JsxAttribute; - function isJsxAttributes(node: Node): node is JsxAttributes; - function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute; - function isJsxExpression(node: Node): node is JsxExpression; - function isJsxNamespacedName(node: Node): node is JsxNamespacedName; - function isCaseClause(node: Node): node is CaseClause; - function isDefaultClause(node: Node): node is DefaultClause; - function isHeritageClause(node: Node): node is HeritageClause; - function isCatchClause(node: Node): node is CatchClause; - function isPropertyAssignment(node: Node): node is PropertyAssignment; - function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment; - function isSpreadAssignment(node: Node): node is SpreadAssignment; - function isEnumMember(node: Node): node is EnumMember; - /** @deprecated */ - function isUnparsedPrepend(node: Node): node is UnparsedPrepend; - function isSourceFile(node: Node): node is SourceFile; - function isBundle(node: Node): node is Bundle; - /** @deprecated */ - function isUnparsedSource(node: Node): node is UnparsedSource; - function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; - function isJSDocNameReference(node: Node): node is JSDocNameReference; - function isJSDocMemberName(node: Node): node is JSDocMemberName; - function isJSDocLink(node: Node): node is JSDocLink; - function isJSDocLinkCode(node: Node): node is JSDocLinkCode; - function isJSDocLinkPlain(node: Node): node is JSDocLinkPlain; - function isJSDocAllType(node: Node): node is JSDocAllType; - function isJSDocUnknownType(node: Node): node is JSDocUnknownType; - function isJSDocNullableType(node: Node): node is JSDocNullableType; - function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType; - function isJSDocOptionalType(node: Node): node is JSDocOptionalType; - function isJSDocFunctionType(node: Node): node is JSDocFunctionType; - function isJSDocVariadicType(node: Node): node is JSDocVariadicType; - function isJSDocNamepathType(node: Node): node is JSDocNamepathType; - function isJSDoc(node: Node): node is JSDoc; - function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral; - function isJSDocSignature(node: Node): node is JSDocSignature; - function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag; - function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag; - function isJSDocClassTag(node: Node): node is JSDocClassTag; - function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag; - function isJSDocPublicTag(node: Node): node is JSDocPublicTag; - function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag; - function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag; - function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag; - function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag; - function isJSDocOverloadTag(node: Node): node is JSDocOverloadTag; - function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag; - function isJSDocSeeTag(node: Node): node is JSDocSeeTag; - function isJSDocEnumTag(node: Node): node is JSDocEnumTag; - function isJSDocParameterTag(node: Node): node is JSDocParameterTag; - function isJSDocReturnTag(node: Node): node is JSDocReturnTag; - function isJSDocThisTag(node: Node): node is JSDocThisTag; - function isJSDocTypeTag(node: Node): node is JSDocTypeTag; - function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag; - function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag; - function isJSDocUnknownTag(node: Node): node is JSDocUnknownTag; - function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag; - function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag; - function isJSDocSatisfiesTag(node: Node): node is JSDocSatisfiesTag; - function isJSDocThrowsTag(node: Node): node is JSDocThrowsTag; - function isQuestionOrExclamationToken(node: Node): node is QuestionToken | ExclamationToken; - function isIdentifierOrThisTypeNode(node: Node): node is Identifier | ThisTypeNode; - function isReadonlyKeywordOrPlusOrMinusToken(node: Node): node is ReadonlyKeyword | PlusToken | MinusToken; - function isQuestionOrPlusOrMinusToken(node: Node): node is QuestionToken | PlusToken | MinusToken; - function isModuleName(node: Node): node is ModuleName; - function isBinaryOperatorToken(node: Node): node is BinaryOperatorToken; - function setTextRange(range: T, location: TextRange | undefined): T; - function canHaveModifiers(node: Node): node is HasModifiers; - function canHaveDecorators(node: Node): node is HasDecorators; - /** - * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes - * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, - * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns - * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. - * - * @param node a given node to visit its children - * @param cbNode a callback to be invoked for all child nodes - * @param cbNodes a callback to be invoked for embedded array - * - * @remarks `forEachChild` must visit the children of a node in the order - * that they appear in the source code. The language service depends on this property to locate nodes by position. - */ - function forEachChild(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray) => T | undefined): T | undefined; - function createSourceFile(fileName: string, sourceText: string, languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile; - function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined; - /** - * Parse json text into SyntaxTree and return node and parse errors if any - * @param fileName - * @param sourceText - */ - function parseJsonText(fileName: string, sourceText: string): JsonSourceFile; - function isExternalModule(file: SourceFile): boolean; - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; - interface CreateSourceFileOptions { - languageVersion: ScriptTarget; - /** - * Controls the format the file is detected as - this can be derived from only the path - * and files on disk, but needs to be done with a module resolution cache in scope to be performant. - * This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`. - */ - impliedNodeFormat?: ResolutionMode; - /** - * Controls how module-y-ness is set for the given file. Usually the result of calling - * `getSetExternalModuleIndicator` on a valid `CompilerOptions` object. If not present, the default - * check specified by `isFileProbablyExternalModule` will be used to set the field. - */ - setExternalModuleIndicator?: (file: SourceFile) => void; - } - function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine; - /** - * Reads the config file, reports errors if any and exits if the config file cannot be found - */ - function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions | undefined, host: ParseConfigFileHost, extendedConfigCache?: Map, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined; - /** - * Read tsconfig.json file - * @param fileName The path to the config file - */ - function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): { - config?: any; - error?: Diagnostic; - }; - /** - * Parse the text of the tsconfig.json file - * @param fileName The path to the config file - * @param jsonText The text of the config file - */ - function parseConfigFileTextToJson(fileName: string, jsonText: string): { - config?: any; - error?: Diagnostic; - }; - /** - * Read tsconfig.json file - * @param fileName The path to the config file - */ - function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile; - /** - * Convert the json syntax tree into the json value - */ - function convertToObject(sourceFile: JsonSourceFile, errors: Diagnostic[]): any; - /** - * Parse the contents of a config file (tsconfig.json). - * @param json The contents of the config file to parse - * @param host Instance of ParseConfigHost used to enumerate files in folder. - * @param basePath A root directory to resolve relative path entries in the config - * file to. e.g. outDir - */ - function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map, existingWatchOptions?: WatchOptions): ParsedCommandLine; - /** - * Parse the contents of a config file (tsconfig.json). - * @param jsonNode The contents of the config file to parse - * @param host Instance of ParseConfigHost used to enumerate files in folder. - * @param basePath A root directory to resolve relative path entries in the config - * file to. e.g. outDir - */ - function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map, existingWatchOptions?: WatchOptions): ParsedCommandLine; - function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): { - options: CompilerOptions; - errors: Diagnostic[]; - }; - function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): { - options: TypeAcquisition; - errors: Diagnostic[]; - }; - type DiagnosticReporter = (diagnostic: Diagnostic) => void; - /** - * Reports config file diagnostics - */ - interface ConfigFileDiagnosticsReporter { - /** - * Reports unrecoverable error when parsing config file - */ - onUnRecoverableConfigFileDiagnostic: DiagnosticReporter; - } - /** - * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors - */ - interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter { - getCurrentDirectory(): string; - } - interface ParsedTsconfig { - raw: any; - options?: CompilerOptions; - watchOptions?: WatchOptions; - typeAcquisition?: TypeAcquisition; - /** - * Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet - */ - extendedConfigPath?: string | string[]; - } - interface ExtendedConfigCacheEntry { - extendedResult: TsConfigSourceFile; - extendedConfig: ParsedTsconfig | undefined; - } - function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; - /** - * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. - * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups - * is assumed to be the same as root directory of the project. - */ - function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference, cache?: TypeReferenceDirectiveResolutionCache, resolutionMode?: ResolutionMode): ResolvedTypeReferenceDirectiveWithFailedLookupLocations; - /** - * Given a set of options, returns the set of type directive names - * that should be included for this program automatically. - * This list could either come from the config file, - * or from enumerating the types root + initial secondary types lookup location. - * More type directives might appear in the program later as a result of loading actual source files; - * this list is only the set of defaults that are implicitly included. - */ - function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[]; - function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): ModuleResolutionCache; - function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache; - function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined; - function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations; - function bundlerModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations; - function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations; - function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations; - interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache, NonRelativeNameResolutionCache, PackageJsonInfoCache { - } - interface ModeAwareCache { - get(key: string, mode: ResolutionMode): T | undefined; - set(key: string, mode: ResolutionMode, value: T): this; - delete(key: string, mode: ResolutionMode): this; - has(key: string, mode: ResolutionMode): boolean; - forEach(cb: (elem: T, key: string, mode: ResolutionMode) => void): void; - size(): number; - } - /** - * Cached resolutions per containing directory. - * This assumes that any module id will have the same resolution for sibling files located in the same folder. - */ - interface PerDirectoryResolutionCache { - getFromDirectoryCache(name: string, mode: ResolutionMode, directoryName: string, redirectedReference: ResolvedProjectReference | undefined): T | undefined; - getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): ModeAwareCache; - clear(): void; - /** - * Updates with the current compilerOptions the cache will operate with. - * This updates the redirects map as well if needed so module resolutions are cached if they can across the projects - */ - update(options: CompilerOptions): void; - } - interface NonRelativeNameResolutionCache { - getFromNonRelativeNameCache(nonRelativeName: string, mode: ResolutionMode, directoryName: string, redirectedReference: ResolvedProjectReference | undefined): T | undefined; - getOrCreateCacheForNonRelativeName(nonRelativeName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerNonRelativeNameCache; - clear(): void; - /** - * Updates with the current compilerOptions the cache will operate with. - * This updates the redirects map as well if needed so module resolutions are cached if they can across the projects - */ - update(options: CompilerOptions): void; - } - interface PerNonRelativeNameCache { - get(directory: string): T | undefined; - set(directory: string, result: T): void; - } - interface ModuleResolutionCache extends PerDirectoryResolutionCache, NonRelativeModuleNameResolutionCache, PackageJsonInfoCache { - getPackageJsonInfoCache(): PackageJsonInfoCache; - } - /** - * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory - * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive. - */ - interface NonRelativeModuleNameResolutionCache extends NonRelativeNameResolutionCache, PackageJsonInfoCache { - /** @deprecated Use getOrCreateCacheForNonRelativeName */ - getOrCreateCacheForModuleName(nonRelativeModuleName: string, mode: ResolutionMode, redirectedReference?: ResolvedProjectReference): PerModuleNameCache; - } - interface PackageJsonInfoCache { - clear(): void; - } - type PerModuleNameCache = PerNonRelativeNameCache; - /** - * Visits a Node using the supplied visitor, possibly returning a new Node in its place. - * - * - If the input node is undefined, then the output is undefined. - * - If the visitor returns undefined, then the output is undefined. - * - If the output node is not undefined, then it will satisfy the test function. - * - In order to obtain a return type that is more specific than `Node`, a test - * function _must_ be provided, and that function must be a type predicate. - * - * @param node The Node to visit. - * @param visitor The callback used to visit the Node. - * @param test A callback to execute to verify the Node is valid. - * @param lift An optional callback to execute to lift a NodeArray into a valid Node. - */ - function visitNode(node: TIn, visitor: Visitor, TVisited>, test: (node: Node) => node is TOut, lift?: (node: readonly Node[]) => Node): TOut | (TIn & undefined) | (TVisited & undefined); - /** - * Visits a Node using the supplied visitor, possibly returning a new Node in its place. - * - * - If the input node is undefined, then the output is undefined. - * - If the visitor returns undefined, then the output is undefined. - * - If the output node is not undefined, then it will satisfy the test function. - * - In order to obtain a return type that is more specific than `Node`, a test - * function _must_ be provided, and that function must be a type predicate. - * - * @param node The Node to visit. - * @param visitor The callback used to visit the Node. - * @param test A callback to execute to verify the Node is valid. - * @param lift An optional callback to execute to lift a NodeArray into a valid Node. - */ - function visitNode(node: TIn, visitor: Visitor, TVisited>, test?: (node: Node) => boolean, lift?: (node: readonly Node[]) => Node): Node | (TIn & undefined) | (TVisited & undefined); - /** - * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. - * - * - If the input node array is undefined, the output is undefined. - * - If the visitor can return undefined, the node it visits in the array will be reused. - * - If the output node array is not undefined, then its contents will satisfy the test. - * - In order to obtain a return type that is more specific than `NodeArray`, a test - * function _must_ be provided, and that function must be a type predicate. - * - * @param nodes The NodeArray to visit. - * @param visitor The callback used to visit a Node. - * @param test A node test to execute for each node. - * @param start An optional value indicating the starting offset at which to start visiting. - * @param count An optional value indicating the maximum number of nodes to visit. - */ - function visitNodes | undefined, TOut extends Node>(nodes: TInArray, visitor: Visitor, test: (node: Node) => node is TOut, start?: number, count?: number): NodeArray | (TInArray & undefined); - /** - * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place. - * - * - If the input node array is undefined, the output is undefined. - * - If the visitor can return undefined, the node it visits in the array will be reused. - * - If the output node array is not undefined, then its contents will satisfy the test. - * - In order to obtain a return type that is more specific than `NodeArray`, a test - * function _must_ be provided, and that function must be a type predicate. - * - * @param nodes The NodeArray to visit. - * @param visitor The callback used to visit a Node. - * @param test A node test to execute for each node. - * @param start An optional value indicating the starting offset at which to start visiting. - * @param count An optional value indicating the maximum number of nodes to visit. - */ - function visitNodes | undefined>(nodes: TInArray, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray | (TInArray & undefined); - /** - * Starts a new lexical environment and visits a statement list, ending the lexical environment - * and merging hoisted declarations upon completion. - */ - function visitLexicalEnvironment(statements: NodeArray, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean, nodesVisitor?: NodesVisitor): NodeArray; - /** - * Starts a new lexical environment and visits a parameter list, suspending the lexical - * environment upon completion. - */ - function visitParameterList(nodes: NodeArray, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray; - function visitParameterList(nodes: NodeArray | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor): NodeArray | undefined; - /** - * Resumes a suspended lexical environment and visits a function body, ending the lexical - * environment and merging hoisted declarations upon completion. - */ - function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody; - /** - * Resumes a suspended lexical environment and visits a function body, ending the lexical - * environment and merging hoisted declarations upon completion. - */ - function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined; - /** - * Resumes a suspended lexical environment and visits a concise body, ending the lexical - * environment and merging hoisted declarations upon completion. - */ - function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody; - /** - * Visits an iteration body, adding any block-scoped variables required by the transformation. - */ - function visitIterationBody(body: Statement, visitor: Visitor, context: TransformationContext): Statement; - /** - * Visits the elements of a {@link CommaListExpression}. - * @param visitor The visitor to use when visiting expressions whose result will not be discarded at runtime. - * @param discardVisitor The visitor to use when visiting expressions whose result will be discarded at runtime. Defaults to {@link visitor}. - */ - function visitCommaListElements(elements: NodeArray, visitor: Visitor, discardVisitor?: Visitor): NodeArray; - /** - * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. - * - * @param node The Node whose children will be visited. - * @param visitor The callback used to visit each child. - * @param context A lexical environment context for the visitor. - */ - function visitEachChild(node: T, visitor: Visitor, context: TransformationContext): T; - /** - * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. - * - * @param node The Node whose children will be visited. - * @param visitor The callback used to visit each child. - * @param context A lexical environment context for the visitor. - */ - function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; - function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; - function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; - function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer; - function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined; - function resolveTripleslashReference(moduleName: string, containingFile: string): string; - function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; - function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; - function formatDiagnostics(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string; - function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string; - function formatDiagnosticsWithColorAndContext(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string; - function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string; - /** - * Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly - * provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file. - */ - function getModeForFileReference(ref: FileReference | string, containingFileMode: ResolutionMode): ResolutionMode; - /** - * Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly - * defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm). - * If you have an actual import node, prefer using getModeForUsageLocation on the reference string node. - * @param file File to fetch the resolution mode within - * @param index Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations - */ - function getModeForResolutionAtIndex(file: SourceFile, index: number): ResolutionMode; - /** - * Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if - * one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm). - * Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when - * `moduleResolution` is `node16`+. - * @param file The file the import or import-like reference is contained within - * @param usage The module reference string - * @returns The final resolution mode of the import - */ - function getModeForUsageLocation(file: { - impliedNodeFormat?: ResolutionMode; - }, usage: StringLiteralLike): ModuleKind.CommonJS | ModuleKind.ESNext | undefined; - function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[]; - /** - * A function for determining if a given file is esm or cjs format, assuming modern node module resolution rules, as configured by the - * `options` parameter. - * - * @param fileName The normalized absolute path to check the format of (it need not exist on disk) - * @param [packageJsonInfoCache] A cache for package file lookups - it's best to have a cache when this function is called often - * @param host The ModuleResolutionHost which can perform the filesystem lookups for package json data - * @param options The compiler options to perform the analysis under - relevant options are `moduleResolution` and `traceResolution` - * @returns `undefined` if the path has no relevant implied format, `ModuleKind.ESNext` for esm format, and `ModuleKind.CommonJS` for cjs format - */ - function getImpliedNodeFormatForFile(fileName: Path, packageJsonInfoCache: PackageJsonInfoCache | undefined, host: ModuleResolutionHost, options: CompilerOptions): ResolutionMode; - /** - * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' - * that represent a compilation unit. - * - * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and - * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. - * - * @param createProgramOptions - The options for creating a program. - * @returns A 'Program' object. - */ - function createProgram(createProgramOptions: CreateProgramOptions): Program; - /** - * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions' - * that represent a compilation unit. - * - * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and - * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in. - * - * @param rootNames - A set of root files. - * @param options - The compiler options which should be used. - * @param host - The host interacts with the underlying file system. - * @param oldProgram - Reuses an old program structure. - * @param configFileParsingDiagnostics - error during config file parsing - * @returns A 'Program' object. - */ - function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program; - /** - * Returns the target config filename of a project reference. - * Note: The file might not exist. - */ - function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName; - interface FormatDiagnosticsHost { - getCurrentDirectory(): string; - getCanonicalFileName(fileName: string): string; - getNewLine(): string; - } - interface EmitOutput { - outputFiles: OutputFile[]; - emitSkipped: boolean; - } - interface OutputFile { - name: string; - writeByteOrderMark: boolean; - text: string; - } - /** - * Create the builder to manage semantic diagnostics and cache them - */ - function createSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): SemanticDiagnosticsBuilderProgram; - function createSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): SemanticDiagnosticsBuilderProgram; - /** - * Create the builder that can handle the changes in program and iterate through changed files - * to emit the those files and manage semantic diagnostics cache as well - */ - function createEmitAndSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): EmitAndSemanticDiagnosticsBuilderProgram; - function createEmitAndSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): EmitAndSemanticDiagnosticsBuilderProgram; - /** - * Creates a builder thats just abstraction over program and can be used with watch - */ - function createAbstractBuilder(newProgram: Program, host: BuilderProgramHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): BuilderProgram; - function createAbstractBuilder(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): BuilderProgram; - type AffectedFileResult = { - result: T; - affected: SourceFile | Program; - } | undefined; - interface BuilderProgramHost { - /** - * If provided this would be used this hash instead of actual file shape text for detecting changes - */ - createHash?: (data: string) => string; - /** - * When emit or emitNextAffectedFile are called without writeFile, - * this callback if present would be used to write files - */ - writeFile?: WriteFileCallback; - } - /** - * Builder to manage the program state changes - */ - interface BuilderProgram { - /** - * Returns current program - */ - getProgram(): Program; - /** - * Get compiler options of the program - */ - getCompilerOptions(): CompilerOptions; - /** - * Get the source file in the program with file name - */ - getSourceFile(fileName: string): SourceFile | undefined; - /** - * Get a list of files in the program - */ - getSourceFiles(): readonly SourceFile[]; - /** - * Get the diagnostics for compiler options - */ - getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; - /** - * Get the diagnostics that dont belong to any file - */ - getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; - /** - * Get the diagnostics from config file parsing - */ - getConfigFileParsingDiagnostics(): readonly Diagnostic[]; - /** - * Get the syntax diagnostics, for all source files if source file is not supplied - */ - getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; - /** - * Get the declaration diagnostics, for all source files if source file is not supplied - */ - getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[]; - /** - * Get all the dependencies of the file - */ - getAllDependencies(sourceFile: SourceFile): readonly string[]; - /** - * Gets the semantic diagnostics from the program corresponding to this state of file (if provided) or whole program - * The semantic diagnostics are cached and managed here - * Note that it is assumed that when asked about semantic diagnostics through this API, - * the file has been taken out of affected files so it is safe to use cache or get from program and cache the diagnostics - * In case of SemanticDiagnosticsBuilderProgram if the source file is not provided, - * it will iterate through all the affected files, to ensure that cache stays valid and yet provide a way to get all semantic diagnostics - */ - getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; - /** - * Emits the JavaScript and declaration files. - * When targetSource file is specified, emits the files corresponding to that source file, - * otherwise for the whole program. - * In case of EmitAndSemanticDiagnosticsBuilderProgram, when targetSourceFile is specified, - * it is assumed that that file is handled from affected file list. If targetSourceFile is not specified, - * it will only emit all the affected files instead of whole program - * - * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host - * in that order would be used to write the files - */ - emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult; - /** - * Get the current directory of the program - */ - getCurrentDirectory(): string; - } - /** - * The builder that caches the semantic diagnostics for the program and handles the changed files and affected files - */ - interface SemanticDiagnosticsBuilderProgram extends BuilderProgram { - /** - * Gets the semantic diagnostics from the program for the next affected file and caches it - * Returns undefined if the iteration is complete - */ - getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult; - } - /** - * The builder that can handle the changes in program and iterate through changed file to emit the files - * The semantic diagnostics are cached per file and managed by clearing for the changed/affected files - */ - interface EmitAndSemanticDiagnosticsBuilderProgram extends SemanticDiagnosticsBuilderProgram { - /** - * Emits the next affected file's emit result (EmitResult and sourceFiles emitted) or returns undefined if iteration is complete - * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host - * in that order would be used to write the files - */ - emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult; - } - function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost): EmitAndSemanticDiagnosticsBuilderProgram | undefined; - function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost; - function createIncrementalProgram({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions): T; - /** - * Create the watch compiler host for either configFile or fileNames and its options - */ - function createWatchCompilerHost(configFileName: string, optionsToExtend: CompilerOptions | undefined, system: System, createProgram?: CreateProgram, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): WatchCompilerHostOfConfigFile; - function createWatchCompilerHost(rootFiles: string[], options: CompilerOptions, system: System, createProgram?: CreateProgram, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, projectReferences?: readonly ProjectReference[], watchOptions?: WatchOptions): WatchCompilerHostOfFilesAndCompilerOptions; - /** - * Creates the watch from the host for root files and compiler options - */ - function createWatchProgram(host: WatchCompilerHostOfFilesAndCompilerOptions): WatchOfFilesAndCompilerOptions; - /** - * Creates the watch from the host for config file - */ - function createWatchProgram(host: WatchCompilerHostOfConfigFile): WatchOfConfigFile; - interface ReadBuildProgramHost { - useCaseSensitiveFileNames(): boolean; - getCurrentDirectory(): string; - readFile(fileName: string): string | undefined; - } - interface IncrementalProgramOptions { - rootNames: readonly string[]; - options: CompilerOptions; - configFileParsingDiagnostics?: readonly Diagnostic[]; - projectReferences?: readonly ProjectReference[]; - host?: CompilerHost; - createProgram?: CreateProgram; - } - type WatchStatusReporter = (diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number) => void; - /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */ - type CreateProgram = (rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[] | undefined) => T; - /** Host that has watch functionality used in --watch mode */ - interface WatchHost { - /** If provided, called with Diagnostic message that informs about change in watch status */ - onWatchStatusChange?(diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number): void; - /** Used to watch changes in source files, missing files needed to update the program or config file */ - watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; - /** Used to watch resolved module's failed lookup locations, config file specs, type roots where auto type reference directives are added */ - watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; - /** If provided, will be used to set delayed compilation, so that multiple changes in short span are compiled together */ - setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; - /** If provided, will be used to reset existing delayed compilation */ - clearTimeout?(timeoutId: any): void; - } - interface ProgramHost { - /** - * Used to create the program when need for program creation or recreation detected - */ - createProgram: CreateProgram; - useCaseSensitiveFileNames(): boolean; - getNewLine(): string; - getCurrentDirectory(): string; - getDefaultLibFileName(options: CompilerOptions): string; - getDefaultLibLocation?(): string; - createHash?(data: string): string; - /** - * Use to check file presence for source files and - * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well - */ - fileExists(path: string): boolean; - /** - * Use to read file text for source files and - * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well - */ - readFile(path: string, encoding?: string): string | undefined; - /** If provided, used for module resolution as well as to handle directory structure */ - directoryExists?(path: string): boolean; - /** If provided, used in resolutions as well as handling directory structure */ - getDirectories?(path: string): string[]; - /** If provided, used to cache and handle directory structure modifications */ - readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; - /** Symbol links resolution */ - realpath?(path: string): string; - /** If provided would be used to write log about compilation */ - trace?(s: string): void; - /** If provided is used to get the environment variable */ - getEnvironmentVariable?(name: string): string | undefined; - /** - * @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext - * - * If provided, used to resolve the module names, otherwise typescript's default module resolution - */ - resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; - /** - * @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext - * - * If provided, used to resolve type reference directives, otherwise typescript's default resolution - */ - resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[] | readonly FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[]; - resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; - resolveTypeReferenceDirectiveReferences?(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; - /** If provided along with custom resolveModuleNames or resolveTypeReferenceDirectives, used to determine if unchanged file path needs to re-resolve modules/type reference directives */ - hasInvalidatedResolutions?(filePath: Path): boolean; - /** - * Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it - */ - getModuleResolutionCache?(): ModuleResolutionCache | undefined; - } - interface WatchCompilerHost extends ProgramHost, WatchHost { - /** Instead of using output d.ts file from project reference, use its source file */ - useSourceOfProjectReferenceRedirect?(): boolean; - /** If provided, use this method to get parsed command lines for referenced projects */ - getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; - /** If provided, callback to invoke after every new program creation */ - afterProgramCreate?(program: T): void; - } - /** - * Host to create watch with root files and options - */ - interface WatchCompilerHostOfFilesAndCompilerOptions extends WatchCompilerHost { - /** root files to use to generate program */ - rootFiles: string[]; - /** Compiler options */ - options: CompilerOptions; - watchOptions?: WatchOptions; - /** Project References */ - projectReferences?: readonly ProjectReference[]; - } - /** - * Host to create watch with config file - */ - interface WatchCompilerHostOfConfigFile extends WatchCompilerHost, ConfigFileDiagnosticsReporter { - /** Name of the config file to compile */ - configFileName: string; - /** Options to extend */ - optionsToExtend?: CompilerOptions; - watchOptionsToExtend?: WatchOptions; - extraFileExtensions?: readonly FileExtensionInfo[]; - /** - * Used to generate source file names from the config file and its include, exclude, files rules - * and also to cache the directory stucture - */ - readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; - } - interface Watch { - /** Synchronize with host and get updated program */ - getProgram(): T; - /** Closes the watch */ - close(): void; - } - /** - * Creates the watch what generates program using the config file - */ - interface WatchOfConfigFile extends Watch { - } - /** - * Creates the watch that generates program using the root files and compiler options - */ - interface WatchOfFilesAndCompilerOptions extends Watch { - /** Updates the root files in the program, only if this is not config file compilation */ - updateRootFileNames(fileNames: string[]): void; - } - /** - * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic - */ - function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter; - function createSolutionBuilderHost(system?: System, createProgram?: CreateProgram, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): SolutionBuilderHost; - function createSolutionBuilderWithWatchHost(system?: System, createProgram?: CreateProgram, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): SolutionBuilderWithWatchHost; - function createSolutionBuilder(host: SolutionBuilderHost, rootNames: readonly string[], defaultOptions: BuildOptions): SolutionBuilder; - function createSolutionBuilderWithWatch(host: SolutionBuilderWithWatchHost, rootNames: readonly string[], defaultOptions: BuildOptions, baseWatchOptions?: WatchOptions): SolutionBuilder; - interface BuildOptions { - dry?: boolean; - force?: boolean; - verbose?: boolean; - incremental?: boolean; - assumeChangesOnlyAffectDirectDependencies?: boolean; - declaration?: boolean; - declarationMap?: boolean; - emitDeclarationOnly?: boolean; - sourceMap?: boolean; - inlineSourceMap?: boolean; - traceResolution?: boolean; - [option: string]: CompilerOptionsValue | undefined; - } - type ReportEmitErrorSummary = (errorCount: number, filesInError: (ReportFileInError | undefined)[]) => void; - interface ReportFileInError { - fileName: string; - line: number; - } - interface SolutionBuilderHostBase extends ProgramHost { - createDirectory?(path: string): void; - /** - * Should provide create directory and writeFile if done of invalidatedProjects is not invoked with - * writeFileCallback - */ - writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void; - getCustomTransformers?: (project: string) => CustomTransformers | undefined; - getModifiedTime(fileName: string): Date | undefined; - setModifiedTime(fileName: string, date: Date): void; - deleteFile(fileName: string): void; - getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; - reportDiagnostic: DiagnosticReporter; - reportSolutionBuilderStatus: DiagnosticReporter; - afterProgramEmitAndDiagnostics?(program: T): void; - } - interface SolutionBuilderHost extends SolutionBuilderHostBase { - reportErrorSummary?: ReportEmitErrorSummary; - } - interface SolutionBuilderWithWatchHost extends SolutionBuilderHostBase, WatchHost { - } - interface SolutionBuilder { - build(project?: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus; - clean(project?: string): ExitStatus; - buildReferences(project: string, cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, getCustomTransformers?: (project: string) => CustomTransformers): ExitStatus; - cleanReferences(project?: string): ExitStatus; - getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject | undefined; - } - enum InvalidatedProjectKind { - Build = 0, - /** @deprecated */ UpdateBundle = 1, - UpdateOutputFileStamps = 2 - } - interface InvalidatedProjectBase { - readonly kind: InvalidatedProjectKind; - readonly project: ResolvedConfigFileName; - /** - * To dispose this project and ensure that all the necessary actions are taken and state is updated accordingly - */ - done(cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): ExitStatus; - getCompilerOptions(): CompilerOptions; - getCurrentDirectory(): string; - } - interface UpdateOutputFileStampsProject extends InvalidatedProjectBase { - readonly kind: InvalidatedProjectKind.UpdateOutputFileStamps; - updateOutputFileStatmps(): void; - } - interface BuildInvalidedProject extends InvalidatedProjectBase { - readonly kind: InvalidatedProjectKind.Build; - getBuilderProgram(): T | undefined; - getProgram(): Program | undefined; - getSourceFile(fileName: string): SourceFile | undefined; - getSourceFiles(): readonly SourceFile[]; - getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; - getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[]; - getConfigFileParsingDiagnostics(): readonly Diagnostic[]; - getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; - getAllDependencies(sourceFile: SourceFile): readonly string[]; - getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[]; - getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult; - emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined; - } - /** @deprecated */ - interface UpdateBundleProject extends InvalidatedProjectBase { - readonly kind: InvalidatedProjectKind.UpdateBundle; - emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject | undefined; - } - type InvalidatedProject = UpdateOutputFileStampsProject | BuildInvalidedProject | UpdateBundleProject; - namespace JsTyping { - interface TypingResolutionHost { - directoryExists(path: string): boolean; - fileExists(fileName: string): boolean; - readFile(path: string, encoding?: string): string | undefined; - readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[]; - } - } - function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings; - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; - /** Gets the length of this script snapshot. */ - getLength(): number; - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined; - /** Releases all resources held by this script snapshot */ - dispose?(): void; - } - namespace ScriptSnapshot { - function fromString(text: string): IScriptSnapshot; - } - interface PreProcessedFileInfo { - referencedFiles: FileReference[]; - typeReferenceDirectives: FileReference[]; - libReferenceDirectives: FileReference[]; - importedFiles: FileReference[]; - ambientExternalModules?: string[]; - isLibFile: boolean; - } - interface HostCancellationToken { - isCancellationRequested(): boolean; - } - interface InstallPackageOptions { - fileName: Path; - packageName: string; - } - interface PerformanceEvent { - kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider"; - durationMs: number; - } - enum LanguageServiceMode { - Semantic = 0, - PartialSemantic = 1, - Syntactic = 2 - } - interface IncompleteCompletionsCache { - get(): CompletionInfo | undefined; - set(response: CompletionInfo): void; - clear(): void; - } - interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalResolutionCacheHost { - getCompilationSettings(): CompilerOptions; - getNewLine?(): string; - getProjectVersion?(): string; - getScriptFileNames(): string[]; - getScriptKind?(fileName: string): ScriptKind; - getScriptVersion(fileName: string): string; - getScriptSnapshot(fileName: string): IScriptSnapshot | undefined; - getProjectReferences?(): readonly ProjectReference[] | undefined; - getLocalizedDiagnosticMessages?(): any; - getCancellationToken?(): HostCancellationToken; - getCurrentDirectory(): string; - getDefaultLibFileName(options: CompilerOptions): string; - log?(s: string): void; - trace?(s: string): void; - error?(s: string): void; - useCaseSensitiveFileNames?(): boolean; - readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; - realpath?(path: string): string; - readFile(path: string, encoding?: string): string | undefined; - fileExists(path: string): boolean; - getTypeRootsVersion?(): number; - /** @deprecated supply resolveModuleNameLiterals instead for resolution that can handle newer resolution modes like nodenext */ - resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile?: SourceFile): (ResolvedModule | undefined)[]; - getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined; - /** @deprecated supply resolveTypeReferenceDirectiveReferences instead for resolution that can handle newer resolution modes like nodenext */ - resolveTypeReferenceDirectives?(typeDirectiveNames: string[] | FileReference[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingFileMode?: ResolutionMode): (ResolvedTypeReferenceDirective | undefined)[]; - resolveModuleNameLiterals?(moduleLiterals: readonly StringLiteralLike[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile, reusedNames: readonly StringLiteralLike[] | undefined): readonly ResolvedModuleWithFailedLookupLocations[]; - resolveTypeReferenceDirectiveReferences?(typeDirectiveReferences: readonly T[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions, containingSourceFile: SourceFile | undefined, reusedNames: readonly T[] | undefined): readonly ResolvedTypeReferenceDirectiveWithFailedLookupLocations[]; - getDirectories?(directoryName: string): string[]; - /** - * Gets a set of custom transformers to use during emit. - */ - getCustomTransformers?(): CustomTransformers | undefined; - isKnownTypesPackageName?(name: string): boolean; - installPackage?(options: InstallPackageOptions): Promise; - writeFile?(fileName: string, content: string): void; - getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; - } - type WithMetadata = T & { - metadata?: unknown; - }; - enum SemanticClassificationFormat { - Original = "original", - TwentyTwenty = "2020" - } - interface LanguageService { - /** This is used as a part of restarting the language service. */ - cleanupSemanticCache(): void; - /** - * Gets errors indicating invalid syntax in a file. - * - * In English, "this cdeo have, erorrs" is syntactically invalid because it has typos, - * grammatical errors, and misplaced punctuation. Likewise, examples of syntax - * errors in TypeScript are missing parentheses in an `if` statement, mismatched - * curly braces, and using a reserved keyword as a variable name. - * - * These diagnostics are inexpensive to compute and don't require knowledge of - * other files. Note that a non-empty result increases the likelihood of false positives - * from `getSemanticDiagnostics`. - * - * While these represent the majority of syntax-related diagnostics, there are some - * that require the type system, which will be present in `getSemanticDiagnostics`. - * - * @param fileName A path to the file you want syntactic diagnostics for - */ - getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[]; - /** - * Gets warnings or errors indicating type system issues in a given file. - * Requesting semantic diagnostics may start up the type system and - * run deferred work, so the first call may take longer than subsequent calls. - * - * Unlike the other get*Diagnostics functions, these diagnostics can potentially not - * include a reference to a source file. Specifically, the first time this is called, - * it will return global diagnostics with no associated location. - * - * To contrast the differences between semantic and syntactic diagnostics, consider the - * sentence: "The sun is green." is syntactically correct; those are real English words with - * correct sentence structure. However, it is semantically invalid, because it is not true. - * - * @param fileName A path to the file you want semantic diagnostics for - */ - getSemanticDiagnostics(fileName: string): Diagnostic[]; - /** - * Gets suggestion diagnostics for a specific file. These diagnostics tend to - * proactively suggest refactors, as opposed to diagnostics that indicate - * potentially incorrect runtime behavior. - * - * @param fileName A path to the file you want semantic diagnostics for - */ - getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[]; - /** - * Gets global diagnostics related to the program configuration and compiler options. - */ - getCompilerOptionsDiagnostics(): Diagnostic[]; - /** @deprecated Use getEncodedSyntacticClassifications instead. */ - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; - /** @deprecated Use getEncodedSemanticClassifications instead. */ - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; - /** Encoded as triples of [start, length, ClassificationType]. */ - getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; - /** - * Gets semantic highlights information for a particular file. Has two formats, an older - * version used by VS and a format used by VS Code. - * - * @param fileName The path to the file - * @param position A text span to return results within - * @param format Which format to use, defaults to "original" - * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. - */ - getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; - /** - * Gets completion entries at a particular position in a file. - * - * @param fileName The path to the file - * @param position A zero-based index of the character where you want the entries - * @param options An object describing how the request was triggered and what kinds - * of code actions can be returned with the completions. - * @param formattingSettings settings needed for calling formatting functions. - */ - getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined, formattingSettings?: FormatCodeSettings): WithMetadata | undefined; - /** - * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`. - * - * @param fileName The path to the file - * @param position A zero based index of the character where you want the entries - * @param entryName The `name` from an existing completion which came from `getCompletionsAtPosition` - * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility - * @param source `source` property from the completion entry - * @param preferences User settings, can be undefined for backwards compatibility - * @param data `data` property from the completion entry - */ - getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined, data: CompletionEntryData | undefined): CompletionEntryDetails | undefined; - getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined; - /** - * Gets semantic information about the identifier at a particular position in a - * file. Quick info is what you typically see when you hover in an editor. - * - * @param fileName The path to the file - * @param position A zero-based index of the character where you want the quick info - */ - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined; - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined; - getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined; - getRenameInfo(fileName: string, position: number, preferences: UserPreferences): RenameInfo; - /** @deprecated Use the signature with `UserPreferences` instead. */ - getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo; - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, preferences: UserPreferences): readonly RenameLocation[] | undefined; - /** @deprecated Pass `providePrefixAndSuffixTextForRename` as part of a `UserPreferences` parameter. */ - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined; - getSmartSelectionRange(fileName: string, position: number): SelectionRange; - getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; - getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined; - getTypeDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined; - getImplementationAtPosition(fileName: string, position: number): readonly ImplementationLocation[] | undefined; - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined; - findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined; - getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined; - getFileReferences(fileName: string): ReferenceEntry[]; - getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[]; - getNavigationBarItems(fileName: string): NavigationBarItem[]; - getNavigationTree(fileName: string): NavigationTree; - prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined; - provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[]; - provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[]; - provideInlayHints(fileName: string, span: TextSpan, preferences: UserPreferences | undefined): InlayHint[]; - getOutliningSpans(fileName: string): OutliningSpan[]; - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions | EditorSettings): number; - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[]; - getDocCommentTemplateAtPosition(fileName: string, position: number, options?: DocCommentTemplateOptions, formatOptions?: FormatCodeSettings): TextInsertion | undefined; - isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean; - /** - * This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag. - * Editors should call this after `>` is typed. - */ - getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined; - getLinkedEditingRangeAtPosition(fileName: string, position: number): LinkedEditingInfo | undefined; - getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined; - toLineColumnOffset?(fileName: string, position: number): LineAndCharacter; - getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[]; - getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions; - applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise; - applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise; - applyCodeActionCommand(action: CodeActionCommand | CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise; - /** @deprecated `fileName` will be ignored */ - applyCodeActionCommand(fileName: string, action: CodeActionCommand): Promise; - /** @deprecated `fileName` will be ignored */ - applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise; - /** @deprecated `fileName` will be ignored */ - applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise; - /** - * @param includeInteractiveActions Include refactor actions that require additional arguments to be - * passed when calling `getEditsForRefactor`. When true, clients should inspect the `isInteractive` - * property of each returned `RefactorActionInfo` and ensure they are able to collect the appropriate - * arguments for any interactive action before offering it. - */ - getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string, includeInteractiveActions?: boolean): ApplicableRefactorInfo[]; - getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined, interactiveRefactorArguments?: InteractiveRefactorArguments): RefactorEditInfo | undefined; - getMoveToRefactoringFileSuggestions(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): { - newFileName: string; - files: string[]; - }; - organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; - getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[]; - getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput; - getProgram(): Program | undefined; - toggleLineComment(fileName: string, textRange: TextRange): TextChange[]; - toggleMultilineComment(fileName: string, textRange: TextRange): TextChange[]; - commentSelection(fileName: string, textRange: TextRange): TextChange[]; - uncommentSelection(fileName: string, textRange: TextRange): TextChange[]; - getSupportedCodeFixes(fileName?: string): readonly string[]; - dispose(): void; - } - interface JsxClosingTagInfo { - readonly newText: string; - } - interface LinkedEditingInfo { - readonly ranges: TextSpan[]; - wordPattern?: string; - } - interface CombinedCodeFixScope { - type: "file"; - fileName: string; - } - enum OrganizeImportsMode { - All = "All", - SortAndCombine = "SortAndCombine", - RemoveUnused = "RemoveUnused" - } - interface OrganizeImportsArgs extends CombinedCodeFixScope { - /** @deprecated Use `mode` instead */ - skipDestructiveCodeActions?: boolean; - mode?: OrganizeImportsMode; - } - type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " "; - enum CompletionTriggerKind { - /** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */ - Invoked = 1, - /** Completion was triggered by a trigger character. */ - TriggerCharacter = 2, - /** Completion was re-triggered as the current completion list is incomplete. */ - TriggerForIncompleteCompletions = 3 - } - interface GetCompletionsAtPositionOptions extends UserPreferences { - /** - * If the editor is asking for completions because a certain character was typed - * (as opposed to when the user explicitly requested them) this should be set. - */ - triggerCharacter?: CompletionsTriggerCharacter; - triggerKind?: CompletionTriggerKind; - /** - * Include a `symbol` property on each completion entry object. - * Symbols reference cyclic data structures and sometimes an entire TypeChecker instance, - * so use caution when serializing or retaining completion entries retrieved with this option. - * @default false - */ - includeSymbol?: boolean; - /** @deprecated Use includeCompletionsForModuleExports */ - includeExternalModuleExports?: boolean; - /** @deprecated Use includeCompletionsWithInsertText */ - includeInsertTextCompletions?: boolean; - } - type SignatureHelpTriggerCharacter = "," | "(" | "<"; - type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")"; - interface SignatureHelpItemsOptions { - triggerReason?: SignatureHelpTriggerReason; - } - type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason; - /** - * Signals that the user manually requested signature help. - * The language service will unconditionally attempt to provide a result. - */ - interface SignatureHelpInvokedReason { - kind: "invoked"; - triggerCharacter?: undefined; - } - /** - * Signals that the signature help request came from a user typing a character. - * Depending on the character and the syntactic context, the request may or may not be served a result. - */ - interface SignatureHelpCharacterTypedReason { - kind: "characterTyped"; - /** - * Character that was responsible for triggering signature help. - */ - triggerCharacter: SignatureHelpTriggerCharacter; - } - /** - * Signals that this signature help request came from typing a character or moving the cursor. - * This should only occur if a signature help session was already active and the editor needs to see if it should adjust. - * The language service will unconditionally attempt to provide a result. - * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move. - */ - interface SignatureHelpRetriggeredReason { - kind: "retrigger"; - /** - * Character that was responsible for triggering signature help. - */ - triggerCharacter?: SignatureHelpRetriggerCharacter; - } - interface ApplyCodeActionCommandResult { - successMessage: string; - } - interface Classifications { - spans: number[]; - endOfLineState: EndOfLineState; - } - interface ClassifiedSpan { - textSpan: TextSpan; - classificationType: ClassificationTypeNames; - } - interface ClassifiedSpan2020 { - textSpan: TextSpan; - classificationType: number; - } - /** - * Navigation bar interface designed for visual studio's dual-column layout. - * This does not form a proper tree. - * The navbar is returned as a list of top-level items, each of which has a list of child items. - * Child items always have an empty array for their `childItems`. - */ - interface NavigationBarItem { - text: string; - kind: ScriptElementKind; - kindModifiers: string; - spans: TextSpan[]; - childItems: NavigationBarItem[]; - indent: number; - bolded: boolean; - grayed: boolean; - } - /** - * Node in a tree of nested declarations in a file. - * The top node is always a script or module node. - */ - interface NavigationTree { - /** Name of the declaration, or a short description, e.g. "". */ - text: string; - kind: ScriptElementKind; - /** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */ - kindModifiers: string; - /** - * Spans of the nodes that generated this declaration. - * There will be more than one if this is the result of merging. - */ - spans: TextSpan[]; - nameSpan: TextSpan | undefined; - /** Present if non-empty */ - childItems?: NavigationTree[]; - } - interface CallHierarchyItem { - name: string; - kind: ScriptElementKind; - kindModifiers?: string; - file: string; - span: TextSpan; - selectionSpan: TextSpan; - containerName?: string; - } - interface CallHierarchyIncomingCall { - from: CallHierarchyItem; - fromSpans: TextSpan[]; - } - interface CallHierarchyOutgoingCall { - to: CallHierarchyItem; - fromSpans: TextSpan[]; - } - enum InlayHintKind { - Type = "Type", - Parameter = "Parameter", - Enum = "Enum" - } - interface InlayHint { - /** This property will be the empty string when displayParts is set. */ - text: string; - position: number; - kind: InlayHintKind; - whitespaceBefore?: boolean; - whitespaceAfter?: boolean; - displayParts?: InlayHintDisplayPart[]; - } - interface InlayHintDisplayPart { - text: string; - span?: TextSpan; - file?: string; - } - interface TodoCommentDescriptor { - text: string; - priority: number; - } - interface TodoComment { - descriptor: TodoCommentDescriptor; - message: string; - position: number; - } - interface TextChange { - span: TextSpan; - newText: string; - } - interface FileTextChanges { - fileName: string; - textChanges: readonly TextChange[]; - isNewFile?: boolean; - } - interface CodeAction { - /** Description of the code action to display in the UI of the editor */ - description: string; - /** Text changes to apply to each file as part of the code action */ - changes: FileTextChanges[]; - /** - * If the user accepts the code fix, the editor should send the action back in a `applyAction` request. - * This allows the language service to have side effects (e.g. installing dependencies) upon a code fix. - */ - commands?: CodeActionCommand[]; - } - interface CodeFixAction extends CodeAction { - /** Short name to identify the fix, for use by telemetry. */ - fixName: string; - /** - * If present, one may call 'getCombinedCodeFix' with this fixId. - * This may be omitted to indicate that the code fix can't be applied in a group. - */ - fixId?: {}; - fixAllDescription?: string; - } - interface CombinedCodeActions { - changes: readonly FileTextChanges[]; - commands?: readonly CodeActionCommand[]; - } - type CodeActionCommand = InstallPackageAction; - interface InstallPackageAction { - } - /** - * A set of one or more available refactoring actions, grouped under a parent refactoring. - */ - interface ApplicableRefactorInfo { - /** - * The programmatic name of the refactoring - */ - name: string; - /** - * A description of this refactoring category to show to the user. - * If the refactoring gets inlined (see below), this text will not be visible. - */ - description: string; - /** - * Inlineable refactorings can have their actions hoisted out to the top level - * of a context menu. Non-inlineanable refactorings should always be shown inside - * their parent grouping. - * - * If not specified, this value is assumed to be 'true' - */ - inlineable?: boolean; - actions: RefactorActionInfo[]; - } - /** - * Represents a single refactoring action - for example, the "Extract Method..." refactor might - * offer several actions, each corresponding to a surround class or closure to extract into. - */ - interface RefactorActionInfo { - /** - * The programmatic name of the refactoring action - */ - name: string; - /** - * A description of this refactoring action to show to the user. - * If the parent refactoring is inlined away, this will be the only text shown, - * so this description should make sense by itself if the parent is inlineable=true - */ - description: string; - /** - * A message to show to the user if the refactoring cannot be applied in - * the current context. - */ - notApplicableReason?: string; - /** - * The hierarchical dotted name of the refactor action. - */ - kind?: string; - /** - * Indicates that the action requires additional arguments to be passed - * when calling `getEditsForRefactor`. - */ - isInteractive?: boolean; - } - /** - * A set of edits to make in response to a refactor action, plus an optional - * location where renaming should be invoked from - */ - interface RefactorEditInfo { - edits: FileTextChanges[]; - renameFilename?: string; - renameLocation?: number; - commands?: CodeActionCommand[]; - notApplicableReason?: string; - } - type RefactorTriggerReason = "implicit" | "invoked"; - interface TextInsertion { - newText: string; - /** The position in newText the caret should point to after the insertion. */ - caretOffset: number; - } - interface DocumentSpan { - textSpan: TextSpan; - fileName: string; - /** - * If the span represents a location that was remapped (e.g. via a .d.ts.map file), - * then the original filename and span will be specified here - */ - originalTextSpan?: TextSpan; - originalFileName?: string; - /** - * If DocumentSpan.textSpan is the span for name of the declaration, - * then this is the span for relevant declaration - */ - contextSpan?: TextSpan; - originalContextSpan?: TextSpan; - } - interface RenameLocation extends DocumentSpan { - readonly prefixText?: string; - readonly suffixText?: string; - } - interface ReferenceEntry extends DocumentSpan { - isWriteAccess: boolean; - isInString?: true; - } - interface ImplementationLocation extends DocumentSpan { - kind: ScriptElementKind; - displayParts: SymbolDisplayPart[]; - } - enum HighlightSpanKind { - none = "none", - definition = "definition", - reference = "reference", - writtenReference = "writtenReference" - } - interface HighlightSpan { - fileName?: string; - isInString?: true; - textSpan: TextSpan; - contextSpan?: TextSpan; - kind: HighlightSpanKind; - } - interface NavigateToItem { - name: string; - kind: ScriptElementKind; - kindModifiers: string; - matchKind: "exact" | "prefix" | "substring" | "camelCase"; - isCaseSensitive: boolean; - fileName: string; - textSpan: TextSpan; - containerName: string; - containerKind: ScriptElementKind; - } - enum IndentStyle { - None = 0, - Block = 1, - Smart = 2 - } - enum SemicolonPreference { - Ignore = "ignore", - Insert = "insert", - Remove = "remove" - } - /** @deprecated - consider using EditorSettings instead */ - interface EditorOptions { - BaseIndentSize?: number; - IndentSize: number; - TabSize: number; - NewLineCharacter: string; - ConvertTabsToSpaces: boolean; - IndentStyle: IndentStyle; - } - interface EditorSettings { - baseIndentSize?: number; - indentSize?: number; - tabSize?: number; - newLineCharacter?: string; - convertTabsToSpaces?: boolean; - indentStyle?: IndentStyle; - trimTrailingWhitespace?: boolean; - } - /** @deprecated - consider using FormatCodeSettings instead */ - interface FormatCodeOptions extends EditorOptions { - InsertSpaceAfterCommaDelimiter: boolean; - InsertSpaceAfterSemicolonInForStatements: boolean; - InsertSpaceBeforeAndAfterBinaryOperators: boolean; - InsertSpaceAfterConstructor?: boolean; - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; - InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean; - InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; - InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean; - InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; - InsertSpaceAfterTypeAssertion?: boolean; - InsertSpaceBeforeFunctionParenthesis?: boolean; - PlaceOpenBraceOnNewLineForFunctions: boolean; - PlaceOpenBraceOnNewLineForControlBlocks: boolean; - insertSpaceBeforeTypeAnnotation?: boolean; - } - interface FormatCodeSettings extends EditorSettings { - readonly insertSpaceAfterCommaDelimiter?: boolean; - readonly insertSpaceAfterSemicolonInForStatements?: boolean; - readonly insertSpaceBeforeAndAfterBinaryOperators?: boolean; - readonly insertSpaceAfterConstructor?: boolean; - readonly insertSpaceAfterKeywordsInControlFlowStatements?: boolean; - readonly insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean; - readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean; - readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean; - readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; - readonly insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean; - readonly insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean; - readonly insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; - readonly insertSpaceAfterTypeAssertion?: boolean; - readonly insertSpaceBeforeFunctionParenthesis?: boolean; - readonly placeOpenBraceOnNewLineForFunctions?: boolean; - readonly placeOpenBraceOnNewLineForControlBlocks?: boolean; - readonly insertSpaceBeforeTypeAnnotation?: boolean; - readonly indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean; - readonly semicolons?: SemicolonPreference; - readonly indentSwitchCase?: boolean; - } - interface DefinitionInfo extends DocumentSpan { - kind: ScriptElementKind; - name: string; - containerKind: ScriptElementKind; - containerName: string; - unverified?: boolean; - } - interface DefinitionInfoAndBoundSpan { - definitions?: readonly DefinitionInfo[]; - textSpan: TextSpan; - } - interface ReferencedSymbolDefinitionInfo extends DefinitionInfo { - displayParts: SymbolDisplayPart[]; - } - interface ReferencedSymbol { - definition: ReferencedSymbolDefinitionInfo; - references: ReferencedSymbolEntry[]; - } - interface ReferencedSymbolEntry extends ReferenceEntry { - isDefinition?: boolean; - } - enum SymbolDisplayPartKind { - aliasName = 0, - className = 1, - enumName = 2, - fieldName = 3, - interfaceName = 4, - keyword = 5, - lineBreak = 6, - numericLiteral = 7, - stringLiteral = 8, - localName = 9, - methodName = 10, - moduleName = 11, - operator = 12, - parameterName = 13, - propertyName = 14, - punctuation = 15, - space = 16, - text = 17, - typeParameterName = 18, - enumMemberName = 19, - functionName = 20, - regularExpressionLiteral = 21, - link = 22, - linkName = 23, - linkText = 24 - } - interface SymbolDisplayPart { - text: string; - kind: string; - } - interface JSDocLinkDisplayPart extends SymbolDisplayPart { - target: DocumentSpan; - } - interface JSDocTagInfo { - name: string; - text?: SymbolDisplayPart[]; - } - interface QuickInfo { - kind: ScriptElementKind; - kindModifiers: string; - textSpan: TextSpan; - displayParts?: SymbolDisplayPart[]; - documentation?: SymbolDisplayPart[]; - tags?: JSDocTagInfo[]; - } - type RenameInfo = RenameInfoSuccess | RenameInfoFailure; - interface RenameInfoSuccess { - canRename: true; - /** - * File or directory to rename. - * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. - */ - fileToRename?: string; - displayName: string; - fullDisplayName: string; - kind: ScriptElementKind; - kindModifiers: string; - triggerSpan: TextSpan; - } - interface RenameInfoFailure { - canRename: false; - localizedErrorMessage: string; - } - /** - * @deprecated Use `UserPreferences` instead. - */ - interface RenameInfoOptions { - readonly allowRenameOfImportPath?: boolean; - } - interface DocCommentTemplateOptions { - readonly generateReturnInDocTemplate?: boolean; - } - interface InteractiveRefactorArguments { - targetFile: string; - } - interface SignatureHelpParameter { - name: string; - documentation: SymbolDisplayPart[]; - displayParts: SymbolDisplayPart[]; - isOptional: boolean; - isRest?: boolean; - } - interface SelectionRange { - textSpan: TextSpan; - parent?: SelectionRange; - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { - isVariadic: boolean; - prefixDisplayParts: SymbolDisplayPart[]; - suffixDisplayParts: SymbolDisplayPart[]; - separatorDisplayParts: SymbolDisplayPart[]; - parameters: SignatureHelpParameter[]; - documentation: SymbolDisplayPart[]; - tags: JSDocTagInfo[]; - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { - items: SignatureHelpItem[]; - applicableSpan: TextSpan; - selectedItemIndex: number; - argumentIndex: number; - argumentCount: number; - } - enum CompletionInfoFlags { - None = 0, - MayIncludeAutoImports = 1, - IsImportStatementCompletion = 2, - IsContinuation = 4, - ResolvedModuleSpecifiers = 8, - ResolvedModuleSpecifiersBeyondLimit = 16, - MayIncludeMethodSnippets = 32 - } - interface CompletionInfo { - /** For performance telemetry. */ - flags?: CompletionInfoFlags; - /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ - isGlobalCompletion: boolean; - isMemberCompletion: boolean; - /** - * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use - * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span - * must be used to commit that completion entry. - */ - optionalReplacementSpan?: TextSpan; - /** - * true when the current location also allows for a new identifier - */ - isNewIdentifierLocation: boolean; - /** - * Indicates to client to continue requesting completions on subsequent keystrokes. - */ - isIncomplete?: true; - entries: CompletionEntry[]; - } - interface CompletionEntryDataAutoImport { - /** - * The name of the property or export in the module's symbol table. Differs from the completion name - * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default. - */ - exportName: string; - exportMapKey?: string; - moduleSpecifier?: string; - /** The file name declaring the export's module symbol, if it was an external module */ - fileName?: string; - /** The module name (with quotes stripped) of the export's module symbol, if it was an ambient module */ - ambientModuleName?: string; - /** True if the export was found in the package.json AutoImportProvider */ - isPackageJsonImport?: true; - } - interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport { - exportMapKey: string; - } - interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport { - moduleSpecifier: string; - } - type CompletionEntryData = CompletionEntryDataUnresolved | CompletionEntryDataResolved; - interface CompletionEntry { - name: string; - kind: ScriptElementKind; - kindModifiers?: string; - sortText: string; - insertText?: string; - filterText?: string; - isSnippet?: true; - /** - * An optional span that indicates the text to be replaced by this completion item. - * If present, this span should be used instead of the default one. - * It will be set if the required span differs from the one generated by the default replacement behavior. - */ - replacementSpan?: TextSpan; - hasAction?: true; - source?: string; - sourceDisplay?: SymbolDisplayPart[]; - labelDetails?: CompletionEntryLabelDetails; - isRecommended?: true; - isFromUncheckedFile?: true; - isPackageJsonImport?: true; - isImportStatementCompletion?: true; - /** - * For API purposes. - * Included for non-string completions only when `includeSymbol: true` option is passed to `getCompletionsAtPosition`. - * @example Get declaration of completion: `symbol.valueDeclaration` - */ - symbol?: Symbol; - /** - * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`, - * that allows TS Server to look up the symbol represented by the completion item, disambiguating - * items with the same name. Currently only defined for auto-import completions, but the type is - * `unknown` in the protocol, so it can be changed as needed to support other kinds of completions. - * The presence of this property should generally not be used to assume that this completion entry - * is an auto-import. - */ - data?: CompletionEntryData; - } - interface CompletionEntryLabelDetails { - detail?: string; - description?: string; - } - interface CompletionEntryDetails { - name: string; - kind: ScriptElementKind; - kindModifiers: string; - displayParts: SymbolDisplayPart[]; - documentation?: SymbolDisplayPart[]; - tags?: JSDocTagInfo[]; - codeActions?: CodeAction[]; - /** @deprecated Use `sourceDisplay` instead. */ - source?: SymbolDisplayPart[]; - sourceDisplay?: SymbolDisplayPart[]; - } - interface OutliningSpan { - /** The span of the document to actually collapse. */ - textSpan: TextSpan; - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; - /** The text to display in the editor for the collapsed region. */ - bannerText: string; - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; - /** - * Classification of the contents of the span - */ - kind: OutliningSpanKind; - } - enum OutliningSpanKind { - /** Single or multi-line comments */ - Comment = "comment", - /** Sections marked by '// #region' and '// #endregion' comments */ - Region = "region", - /** Declarations and expressions */ - Code = "code", - /** Contiguous blocks of import declarations */ - Imports = "imports" - } - enum OutputFileType { - JavaScript = 0, - SourceMap = 1, - Declaration = 2 - } - enum EndOfLineState { - None = 0, - InMultiLineCommentTrivia = 1, - InSingleQuoteStringLiteral = 2, - InDoubleQuoteStringLiteral = 3, - InTemplateHeadOrNoSubstitutionTemplate = 4, - InTemplateMiddleOrTail = 5, - InTemplateSubstitutionPosition = 6 - } - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - NumberLiteral = 6, - BigIntLiteral = 7, - StringLiteral = 8, - RegExpLiteral = 9 - } - interface ClassificationResult { - finalLexState: EndOfLineState; - entries: ClassificationInfo[]; - } - interface ClassificationInfo { - length: number; - classification: TokenClass; - } - interface Classifier { - /** - * Gives lexical classifications of tokens on a line without any syntactic context. - * For instance, a token consisting of the text 'string' can be either an identifier - * named 'string' or the keyword 'string', however, because this classifier is not aware, - * it relies on certain heuristics to give acceptable results. For classifications where - * speed trumps accuracy, this function is preferable; however, for true accuracy, the - * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the - * lexical, syntactic, and semantic classifiers may issue the best user experience. - * - * @param text The text of a line to classify. - * @param lexState The state of the lexical classifier at the end of the previous line. - * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. - * If there is no syntactic classifier (syntacticClassifierAbsent=true), - * certain heuristics may be used in its place; however, if there is a - * syntactic classifier (syntacticClassifierAbsent=false), certain - * classifications which may be incorrectly categorized will be given - * back as Identifiers in order to allow the syntactic classifier to - * subsume the classification. - * @deprecated Use getLexicalClassifications instead. - */ - getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; - getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications; - } - enum ScriptElementKind { - unknown = "", - warning = "warning", - /** predefined type (void) or keyword (class) */ - keyword = "keyword", - /** top level script node */ - scriptElement = "script", - /** module foo {} */ - moduleElement = "module", - /** class X {} */ - classElement = "class", - /** var x = class X {} */ - localClassElement = "local class", - /** interface Y {} */ - interfaceElement = "interface", - /** type T = ... */ - typeElement = "type", - /** enum E */ - enumElement = "enum", - enumMemberElement = "enum member", - /** - * Inside module and script only - * const v = .. - */ - variableElement = "var", - /** Inside function */ - localVariableElement = "local var", - /** using foo = ... */ - variableUsingElement = "using", - /** await using foo = ... */ - variableAwaitUsingElement = "await using", - /** - * Inside module and script only - * function f() { } - */ - functionElement = "function", - /** Inside function */ - localFunctionElement = "local function", - /** class X { [public|private]* foo() {} } */ - memberFunctionElement = "method", - /** class X { [public|private]* [get|set] foo:number; } */ - memberGetAccessorElement = "getter", - memberSetAccessorElement = "setter", - /** - * class X { [public|private]* foo:number; } - * interface Y { foo:number; } - */ - memberVariableElement = "property", - /** class X { [public|private]* accessor foo: number; } */ - memberAccessorVariableElement = "accessor", - /** - * class X { constructor() { } } - * class X { static { } } - */ - constructorImplementationElement = "constructor", - /** interface Y { ():number; } */ - callSignatureElement = "call", - /** interface Y { []:number; } */ - indexSignatureElement = "index", - /** interface Y { new():Y; } */ - constructSignatureElement = "construct", - /** function foo(*Y*: string) */ - parameterElement = "parameter", - typeParameterElement = "type parameter", - primitiveType = "primitive type", - label = "label", - alias = "alias", - constElement = "const", - letElement = "let", - directory = "directory", - externalModuleName = "external module name", - /** - * - * @deprecated - */ - jsxAttribute = "JSX attribute", - /** String literal */ - string = "string", - /** Jsdoc @link: in `{@link C link text}`, the before and after text "{@link " and "}" */ - link = "link", - /** Jsdoc @link: in `{@link C link text}`, the entity name "C" */ - linkName = "link name", - /** Jsdoc @link: in `{@link C link text}`, the link text "link text" */ - linkText = "link text" - } - enum ScriptElementKindModifier { - none = "", - publicMemberModifier = "public", - privateMemberModifier = "private", - protectedMemberModifier = "protected", - exportedModifier = "export", - ambientModifier = "declare", - staticModifier = "static", - abstractModifier = "abstract", - optionalModifier = "optional", - deprecatedModifier = "deprecated", - dtsModifier = ".d.ts", - tsModifier = ".ts", - tsxModifier = ".tsx", - jsModifier = ".js", - jsxModifier = ".jsx", - jsonModifier = ".json", - dmtsModifier = ".d.mts", - mtsModifier = ".mts", - mjsModifier = ".mjs", - dctsModifier = ".d.cts", - ctsModifier = ".cts", - cjsModifier = ".cjs" - } - enum ClassificationTypeNames { - comment = "comment", - identifier = "identifier", - keyword = "keyword", - numericLiteral = "number", - bigintLiteral = "bigint", - operator = "operator", - stringLiteral = "string", - whiteSpace = "whitespace", - text = "text", - punctuation = "punctuation", - className = "class name", - enumName = "enum name", - interfaceName = "interface name", - moduleName = "module name", - typeParameterName = "type parameter name", - typeAliasName = "type alias name", - parameterName = "parameter name", - docCommentTagName = "doc comment tag name", - jsxOpenTagName = "jsx open tag name", - jsxCloseTagName = "jsx close tag name", - jsxSelfClosingTagName = "jsx self closing tag name", - jsxAttribute = "jsx attribute", - jsxText = "jsx text", - jsxAttributeStringLiteralValue = "jsx attribute string literal value" - } - enum ClassificationType { - comment = 1, - identifier = 2, - keyword = 3, - numericLiteral = 4, - operator = 5, - stringLiteral = 6, - regularExpressionLiteral = 7, - whiteSpace = 8, - text = 9, - punctuation = 10, - className = 11, - enumName = 12, - interfaceName = 13, - moduleName = 14, - typeParameterName = 15, - typeAliasName = 16, - parameterName = 17, - docCommentTagName = 18, - jsxOpenTagName = 19, - jsxCloseTagName = 20, - jsxSelfClosingTagName = 21, - jsxAttribute = 22, - jsxText = 23, - jsxAttributeStringLiteralValue = 24, - bigintLiteral = 25 - } - interface InlayHintsContext { - file: SourceFile; - program: Program; - cancellationToken: CancellationToken; - host: LanguageServiceHost; - span: TextSpan; - preferences: UserPreferences; - } - /** The classifier is used for syntactic highlighting in editors via the TSServer */ - function createClassifier(): Classifier; - interface DocumentHighlights { - fileName: string; - highlightSpans: HighlightSpan[]; - } - function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry; - /** - * The document registry represents a store of SourceFile objects that can be shared between - * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) - * of files in the context. - * SourceFile objects account for most of the memory usage by the language service. Sharing - * the same DocumentRegistry instance between different instances of LanguageService allow - * for more efficient memory utilization since all projects will share at least the library - * file (lib.d.ts). - * - * A more advanced use of the document registry is to serialize sourceFile objects to disk - * and re-hydrate them when needed. - * - * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it - * to all subsequent createLanguageService calls. - */ - interface DocumentRegistry { - /** - * Request a stored SourceFile with a given fileName and compilationSettings. - * The first call to acquire will call createLanguageServiceSourceFile to generate - * the SourceFile if was not found in the registry. - * - * @param fileName The name of the file requested - * @param compilationSettingsOrHost Some compilation settings like target affects the - * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. A minimal - * resolution cache is needed to fully define a source file's shape when - * the compilation settings include `module: node16`+, so providing a cache host - * object should be preferred. A common host is a language service `ConfiguredProject`. - * @param scriptSnapshot Text of the file. Only used if the file was not found - * in the registry and a new one was created. - * @param version Current version of the file. Only used if the file was not found - * in the registry and a new one was created. - */ - acquireDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; - acquireDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; - /** - * Request an updated version of an already existing SourceFile with a given fileName - * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile - * to get an updated SourceFile. - * - * @param fileName The name of the file requested - * @param compilationSettingsOrHost Some compilation settings like target affects the - * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. A minimal - * resolution cache is needed to fully define a source file's shape when - * the compilation settings include `module: node16`+, so providing a cache host - * object should be preferred. A common host is a language service `ConfiguredProject`. - * @param scriptSnapshot Text of the file. - * @param version Current version of the file. - */ - updateDocument(fileName: string, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; - updateDocumentWithKey(fileName: string, path: Path, compilationSettingsOrHost: CompilerOptions | MinimalResolutionCacheHost, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind, sourceFileOptions?: CreateSourceFileOptions | ScriptTarget): SourceFile; - getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey; - /** - * Informs the DocumentRegistry that a file is not needed any longer. - * - * Note: It is not allowed to call release on a SourceFile that was not acquired from - * this registry originally. - * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - * @param scriptKind The script kind of the file to be released - * - * @deprecated pass scriptKind and impliedNodeFormat for correctness - */ - releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind?: ScriptKind): void; - /** - * Informs the DocumentRegistry that a file is not needed any longer. - * - * Note: It is not allowed to call release on a SourceFile that was not acquired from - * this registry originally. - * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - * @param scriptKind The script kind of the file to be released - * @param impliedNodeFormat The implied source file format of the file to be released - */ - releaseDocument(fileName: string, compilationSettings: CompilerOptions, scriptKind: ScriptKind, impliedNodeFormat: ResolutionMode): void; - /** - * @deprecated pass scriptKind for and impliedNodeFormat correctness */ - releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind?: ScriptKind): void; - releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey, scriptKind: ScriptKind, impliedNodeFormat: ResolutionMode): void; - reportStats(): string; - } - type DocumentRegistryBucketKey = string & { - __bucketKey: any; - }; - function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo; - function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput; - function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; - interface TranspileOptions { - compilerOptions?: CompilerOptions; - fileName?: string; - reportDiagnostics?: boolean; - moduleName?: string; - renamedDependencies?: MapLike; - transformers?: CustomTransformers; - } - interface TranspileOutput { - outputText: string; - diagnostics?: Diagnostic[]; - sourceMapText?: string; - } - function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings; - function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string; - function getDefaultCompilerOptions(): CompilerOptions; - function getSupportedCodeFixes(): readonly string[]; - function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTargetOrOptions: ScriptTarget | CreateSourceFileOptions, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile; - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile; - function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService; - /** - * Get the path of the default library files (lib.d.ts) as distributed with the typescript - * node package. - * The functionality is not supported if the ts module is consumed outside of a node module. - */ - function getDefaultLibFilePath(options: CompilerOptions): string; - /** The version of the language service API */ - const servicesVersion = "0.8"; - /** - * Transform one or more nodes using the supplied transformers. - * @param source A single `Node` or an array of `Node` objects. - * @param transformers An array of `TransformerFactory` callbacks used to process the transformation. - * @param compilerOptions Optional compiler options. - */ - function transform(source: T | T[], transformers: TransformerFactory[], compilerOptions?: CompilerOptions): TransformationResult; -} -export = ts; \ No newline at end of file +import ts = require("./typescript.js"); +export = ts; diff --git a/node_modules/typescript/lib/tsserverlibrary.js b/node_modules/typescript/lib/tsserverlibrary.js index d53fe81..49b9ad8 100644 --- a/node_modules/typescript/lib/tsserverlibrary.js +++ b/node_modules/typescript/lib/tsserverlibrary.js @@ -13,187900 +13,9 @@ See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ - -"use strict"; -var ts = (() => { - var __defProp = Object.defineProperty; - var __getOwnPropNames = Object.getOwnPropertyNames; - var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; - }; - var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; - }; - var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); - }; - - // src/compiler/corePublic.ts - var versionMajorMinor, version, Comparison; - var init_corePublic = __esm({ - "src/compiler/corePublic.ts"() { - "use strict"; - versionMajorMinor = "5.2"; - version = "5.2.2"; - Comparison = /* @__PURE__ */ ((Comparison3) => { - Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; - Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; - Comparison3[Comparison3["GreaterThan"] = 1] = "GreaterThan"; - return Comparison3; - })(Comparison || {}); - } - }); - - // src/compiler/core.ts - function length(array) { - return array ? array.length : 0; - } - function forEach(array, callback) { - if (array) { - for (let i = 0; i < array.length; i++) { - const result = callback(array[i], i); - if (result) { - return result; - } - } - } - return void 0; - } - function forEachRight(array, callback) { - if (array) { - for (let i = array.length - 1; i >= 0; i--) { - const result = callback(array[i], i); - if (result) { - return result; - } - } - } - return void 0; - } - function firstDefined(array, callback) { - if (array === void 0) { - return void 0; - } - for (let i = 0; i < array.length; i++) { - const result = callback(array[i], i); - if (result !== void 0) { - return result; - } - } - return void 0; - } - function firstDefinedIterator(iter, callback) { - for (const value of iter) { - const result = callback(value); - if (result !== void 0) { - return result; - } - } - return void 0; - } - function reduceLeftIterator(iterator, f, initial) { - let result = initial; - if (iterator) { - let pos = 0; - for (const value of iterator) { - result = f(result, value, pos); - pos++; - } - } - return result; - } - function zipWith(arrayA, arrayB, callback) { - const result = []; - Debug.assertEqual(arrayA.length, arrayB.length); - for (let i = 0; i < arrayA.length; i++) { - result.push(callback(arrayA[i], arrayB[i], i)); - } - return result; - } - function intersperse(input, element) { - if (input.length <= 1) { - return input; - } - const result = []; - for (let i = 0, n = input.length; i < n; i++) { - if (i) - result.push(element); - result.push(input[i]); - } - return result; - } - function every(array, callback) { - if (array) { - for (let i = 0; i < array.length; i++) { - if (!callback(array[i], i)) { - return false; - } - } - } - return true; - } - function find(array, predicate, startIndex) { - if (array === void 0) - return void 0; - for (let i = startIndex ?? 0; i < array.length; i++) { - const value = array[i]; - if (predicate(value, i)) { - return value; - } - } - return void 0; - } - function findLast(array, predicate, startIndex) { - if (array === void 0) - return void 0; - for (let i = startIndex ?? array.length - 1; i >= 0; i--) { - const value = array[i]; - if (predicate(value, i)) { - return value; - } - } - return void 0; - } - function findIndex(array, predicate, startIndex) { - if (array === void 0) - return -1; - for (let i = startIndex ?? 0; i < array.length; i++) { - if (predicate(array[i], i)) { - return i; - } - } - return -1; - } - function findLastIndex(array, predicate, startIndex) { - if (array === void 0) - return -1; - for (let i = startIndex ?? array.length - 1; i >= 0; i--) { - if (predicate(array[i], i)) { - return i; - } - } - return -1; - } - function findMap(array, callback) { - for (let i = 0; i < array.length; i++) { - const result = callback(array[i], i); - if (result) { - return result; - } - } - return Debug.fail(); - } - function contains(array, value, equalityComparer = equateValues) { - if (array) { - for (const v of array) { - if (equalityComparer(v, value)) { - return true; - } - } - } - return false; - } - function arraysEqual(a, b, equalityComparer = equateValues) { - return a.length === b.length && a.every((x, i) => equalityComparer(x, b[i])); - } - function indexOfAnyCharCode(text, charCodes, start) { - for (let i = start || 0; i < text.length; i++) { - if (contains(charCodes, text.charCodeAt(i))) { - return i; - } - } - return -1; - } - function countWhere(array, predicate) { - let count = 0; - if (array) { - for (let i = 0; i < array.length; i++) { - const v = array[i]; - if (predicate(v, i)) { - count++; - } - } - } - return count; - } - function filter(array, f) { - if (array) { - const len = array.length; - let i = 0; - while (i < len && f(array[i])) - i++; - if (i < len) { - const result = array.slice(0, i); - i++; - while (i < len) { - const item = array[i]; - if (f(item)) { - result.push(item); - } - i++; - } - return result; - } - } - return array; - } - function filterMutate(array, f) { - let outIndex = 0; - for (let i = 0; i < array.length; i++) { - if (f(array[i], i, array)) { - array[outIndex] = array[i]; - outIndex++; - } - } - array.length = outIndex; - } - function clear(array) { - array.length = 0; - } - function map(array, f) { - let result; - if (array) { - result = []; - for (let i = 0; i < array.length; i++) { - result.push(f(array[i], i)); - } - } - return result; - } - function* mapIterator(iter, mapFn) { - for (const x of iter) { - yield mapFn(x); - } - } - function sameMap(array, f) { - if (array) { - for (let i = 0; i < array.length; i++) { - const item = array[i]; - const mapped = f(item, i); - if (item !== mapped) { - const result = array.slice(0, i); - result.push(mapped); - for (i++; i < array.length; i++) { - result.push(f(array[i], i)); - } - return result; - } - } - } - return array; - } - function flatten(array) { - const result = []; - for (const v of array) { - if (v) { - if (isArray(v)) { - addRange(result, v); - } else { - result.push(v); - } - } - } - return result; - } - function flatMap(array, mapfn) { - let result; - if (array) { - for (let i = 0; i < array.length; i++) { - const v = mapfn(array[i], i); - if (v) { - if (isArray(v)) { - result = addRange(result, v); - } else { - result = append(result, v); - } - } - } - } - return result || emptyArray; - } - function flatMapToMutable(array, mapfn) { - const result = []; - if (array) { - for (let i = 0; i < array.length; i++) { - const v = mapfn(array[i], i); - if (v) { - if (isArray(v)) { - addRange(result, v); - } else { - result.push(v); - } - } - } - } - return result; - } - function* flatMapIterator(iter, mapfn) { - for (const x of iter) { - const iter2 = mapfn(x); - if (!iter2) - continue; - yield* iter2; - } - } - function sameFlatMap(array, mapfn) { - let result; - if (array) { - for (let i = 0; i < array.length; i++) { - const item = array[i]; - const mapped = mapfn(item, i); - if (result || item !== mapped || isArray(mapped)) { - if (!result) { - result = array.slice(0, i); - } - if (isArray(mapped)) { - addRange(result, mapped); - } else { - result.push(mapped); - } - } - } - } - return result || array; - } - function mapAllOrFail(array, mapFn) { - const result = []; - for (let i = 0; i < array.length; i++) { - const mapped = mapFn(array[i], i); - if (mapped === void 0) { - return void 0; - } - result.push(mapped); - } - return result; - } - function mapDefined(array, mapFn) { - const result = []; - if (array) { - for (let i = 0; i < array.length; i++) { - const mapped = mapFn(array[i], i); - if (mapped !== void 0) { - result.push(mapped); - } - } - } - return result; - } - function* mapDefinedIterator(iter, mapFn) { - for (const x of iter) { - const value = mapFn(x); - if (value !== void 0) { - yield value; - } - } - } - function mapDefinedEntries(map2, f) { - if (!map2) { - return void 0; - } - const result = /* @__PURE__ */ new Map(); - map2.forEach((value, key) => { - const entry = f(key, value); - if (entry !== void 0) { - const [newKey, newValue] = entry; - if (newKey !== void 0 && newValue !== void 0) { - result.set(newKey, newValue); - } - } - }); - return result; - } - function getOrUpdate(map2, key, callback) { - if (map2.has(key)) { - return map2.get(key); - } - const value = callback(); - map2.set(key, value); - return value; - } - function tryAddToSet(set, value) { - if (!set.has(value)) { - set.add(value); - return true; - } - return false; - } - function* singleIterator(value) { - yield value; - } - function spanMap(array, keyfn, mapfn) { - let result; - if (array) { - result = []; - const len = array.length; - let previousKey; - let key; - let start = 0; - let pos = 0; - while (start < len) { - while (pos < len) { - const value = array[pos]; - key = keyfn(value, pos); - if (pos === 0) { - previousKey = key; - } else if (key !== previousKey) { - break; - } - pos++; - } - if (start < pos) { - const v = mapfn(array.slice(start, pos), previousKey, start, pos); - if (v) { - result.push(v); - } - start = pos; - } - previousKey = key; - pos++; - } - } - return result; - } - function mapEntries(map2, f) { - if (!map2) { - return void 0; - } - const result = /* @__PURE__ */ new Map(); - map2.forEach((value, key) => { - const [newKey, newValue] = f(key, value); - result.set(newKey, newValue); - }); - return result; - } - function some(array, predicate) { - if (array) { - if (predicate) { - for (const v of array) { - if (predicate(v)) { - return true; - } - } - } else { - return array.length > 0; - } - } - return false; - } - function getRangesWhere(arr, pred, cb) { - let start; - for (let i = 0; i < arr.length; i++) { - if (pred(arr[i])) { - start = start === void 0 ? i : start; - } else { - if (start !== void 0) { - cb(start, i); - start = void 0; - } - } - } - if (start !== void 0) - cb(start, arr.length); - } - function concatenate(array1, array2) { - if (!some(array2)) - return array1; - if (!some(array1)) - return array2; - return [...array1, ...array2]; - } - function selectIndex(_, i) { - return i; - } - function indicesOf(array) { - return array.map(selectIndex); - } - function deduplicateRelational(array, equalityComparer, comparer) { - const indices = indicesOf(array); - stableSortIndices(array, indices, comparer); - let last2 = array[indices[0]]; - const deduplicated = [indices[0]]; - for (let i = 1; i < indices.length; i++) { - const index = indices[i]; - const item = array[index]; - if (!equalityComparer(last2, item)) { - deduplicated.push(index); - last2 = item; - } - } - deduplicated.sort(); - return deduplicated.map((i) => array[i]); - } - function deduplicateEquality(array, equalityComparer) { - const result = []; - for (const item of array) { - pushIfUnique(result, item, equalityComparer); - } - return result; - } - function deduplicate(array, equalityComparer, comparer) { - return array.length === 0 ? [] : array.length === 1 ? array.slice() : comparer ? deduplicateRelational(array, equalityComparer, comparer) : deduplicateEquality(array, equalityComparer); - } - function deduplicateSorted(array, comparer) { - if (array.length === 0) - return emptyArray; - let last2 = array[0]; - const deduplicated = [last2]; - for (let i = 1; i < array.length; i++) { - const next = array[i]; - switch (comparer(next, last2)) { - case true: - case 0 /* EqualTo */: - continue; - case -1 /* LessThan */: - return Debug.fail("Array is unsorted."); - } - deduplicated.push(last2 = next); - } - return deduplicated; - } - function createSortedArray() { - return []; - } - function insertSorted(array, insert, compare, allowDuplicates) { - if (array.length === 0) { - array.push(insert); - return true; - } - const insertIndex = binarySearch(array, insert, identity, compare); - if (insertIndex < 0) { - array.splice(~insertIndex, 0, insert); - return true; - } - if (allowDuplicates) { - array.splice(insertIndex, 0, insert); - return true; - } - return false; - } - function sortAndDeduplicate(array, comparer, equalityComparer) { - return deduplicateSorted(sort(array, comparer), equalityComparer || comparer || compareStringsCaseSensitive); - } - function arrayIsSorted(array, comparer) { - if (array.length < 2) - return true; - for (let i = 1, len = array.length; i < len; i++) { - if (comparer(array[i - 1], array[i]) === 1 /* GreaterThan */) { - return false; - } - } - return true; - } - function detectSortCaseSensitivity(array, getString, compareStringsCaseSensitive2, compareStringsCaseInsensitive2) { - let kind = 3 /* Both */; - if (array.length < 2) - return kind; - let prevElement = getString(array[0]); - for (let i = 1, len = array.length; i < len && kind !== 0 /* None */; i++) { - const element = getString(array[i]); - if (kind & 1 /* CaseSensitive */ && compareStringsCaseSensitive2(prevElement, element) > 0) { - kind &= ~1 /* CaseSensitive */; - } - if (kind & 2 /* CaseInsensitive */ && compareStringsCaseInsensitive2(prevElement, element) > 0) { - kind &= ~2 /* CaseInsensitive */; - } - prevElement = element; - } - return kind; - } - function arrayIsEqualTo(array1, array2, equalityComparer = equateValues) { - if (!array1 || !array2) { - return array1 === array2; - } - if (array1.length !== array2.length) { - return false; - } - for (let i = 0; i < array1.length; i++) { - if (!equalityComparer(array1[i], array2[i], i)) { - return false; - } - } - return true; - } - function compact(array) { - let result; - if (array) { - for (let i = 0; i < array.length; i++) { - const v = array[i]; - if (result || !v) { - if (!result) { - result = array.slice(0, i); - } - if (v) { - result.push(v); - } - } - } - } - return result || array; - } - function relativeComplement(arrayA, arrayB, comparer) { - if (!arrayB || !arrayA || arrayB.length === 0 || arrayA.length === 0) - return arrayB; - const result = []; - loopB: - for (let offsetA = 0, offsetB = 0; offsetB < arrayB.length; offsetB++) { - if (offsetB > 0) { - Debug.assertGreaterThanOrEqual(comparer(arrayB[offsetB], arrayB[offsetB - 1]), 0 /* EqualTo */); - } - loopA: - for (const startA = offsetA; offsetA < arrayA.length; offsetA++) { - if (offsetA > startA) { - Debug.assertGreaterThanOrEqual(comparer(arrayA[offsetA], arrayA[offsetA - 1]), 0 /* EqualTo */); - } - switch (comparer(arrayB[offsetB], arrayA[offsetA])) { - case -1 /* LessThan */: - result.push(arrayB[offsetB]); - continue loopB; - case 0 /* EqualTo */: - continue loopB; - case 1 /* GreaterThan */: - continue loopA; - } - } - } - return result; - } - function append(to, value) { - if (value === void 0) - return to; - if (to === void 0) - return [value]; - to.push(value); - return to; - } - function combine(xs, ys) { - if (xs === void 0) - return ys; - if (ys === void 0) - return xs; - if (isArray(xs)) - return isArray(ys) ? concatenate(xs, ys) : append(xs, ys); - if (isArray(ys)) - return append(ys, xs); - return [xs, ys]; - } - function toOffset(array, offset) { - return offset < 0 ? array.length + offset : offset; - } - function addRange(to, from, start, end) { - if (from === void 0 || from.length === 0) - return to; - if (to === void 0) - return from.slice(start, end); - start = start === void 0 ? 0 : toOffset(from, start); - end = end === void 0 ? from.length : toOffset(from, end); - for (let i = start; i < end && i < from.length; i++) { - if (from[i] !== void 0) { - to.push(from[i]); - } - } - return to; - } - function pushIfUnique(array, toAdd, equalityComparer) { - if (contains(array, toAdd, equalityComparer)) { - return false; - } else { - array.push(toAdd); - return true; - } - } - function appendIfUnique(array, toAdd, equalityComparer) { - if (array) { - pushIfUnique(array, toAdd, equalityComparer); - return array; - } else { - return [toAdd]; - } - } - function stableSortIndices(array, indices, comparer) { - indices.sort((x, y) => comparer(array[x], array[y]) || compareValues(x, y)); - } - function sort(array, comparer) { - return array.length === 0 ? array : array.slice().sort(comparer); - } - function* arrayReverseIterator(array) { - for (let i = array.length - 1; i >= 0; i--) { - yield array[i]; - } - } - function stableSort(array, comparer) { - const indices = indicesOf(array); - stableSortIndices(array, indices, comparer); - return indices.map((i) => array[i]); - } - function rangeEquals(array1, array2, pos, end) { - while (pos < end) { - if (array1[pos] !== array2[pos]) { - return false; - } - pos++; - } - return true; - } - function firstOrUndefined(array) { - return array === void 0 || array.length === 0 ? void 0 : array[0]; - } - function firstOrUndefinedIterator(iter) { - if (iter) { - for (const value of iter) { - return value; - } - } - return void 0; - } - function first(array) { - Debug.assert(array.length !== 0); - return array[0]; - } - function firstIterator(iter) { - for (const value of iter) { - return value; - } - Debug.fail("iterator is empty"); - } - function lastOrUndefined(array) { - return array === void 0 || array.length === 0 ? void 0 : array[array.length - 1]; - } - function last(array) { - Debug.assert(array.length !== 0); - return array[array.length - 1]; - } - function singleOrUndefined(array) { - return array && array.length === 1 ? array[0] : void 0; - } - function single(array) { - return Debug.checkDefined(singleOrUndefined(array)); - } - function singleOrMany(array) { - return array && array.length === 1 ? array[0] : array; - } - function replaceElement(array, index, value) { - const result = array.slice(0); - result[index] = value; - return result; - } - function binarySearch(array, value, keySelector, keyComparer, offset) { - return binarySearchKey(array, keySelector(value), keySelector, keyComparer, offset); - } - function binarySearchKey(array, key, keySelector, keyComparer, offset) { - if (!some(array)) { - return -1; - } - let low = offset || 0; - let high = array.length - 1; - while (low <= high) { - const middle = low + (high - low >> 1); - const midKey = keySelector(array[middle], middle); - switch (keyComparer(midKey, key)) { - case -1 /* LessThan */: - low = middle + 1; - break; - case 0 /* EqualTo */: - return middle; - case 1 /* GreaterThan */: - high = middle - 1; - break; - } - } - return ~low; - } - function reduceLeft(array, f, initial, start, count) { - if (array && array.length > 0) { - const size = array.length; - if (size > 0) { - let pos = start === void 0 || start < 0 ? 0 : start; - const end = count === void 0 || pos + count > size - 1 ? size - 1 : pos + count; - let result; - if (arguments.length <= 2) { - result = array[pos]; - pos++; - } else { - result = initial; - } - while (pos <= end) { - result = f(result, array[pos], pos); - pos++; - } - return result; - } - } - return initial; - } - function hasProperty(map2, key) { - return hasOwnProperty.call(map2, key); - } - function getProperty(map2, key) { - return hasOwnProperty.call(map2, key) ? map2[key] : void 0; - } - function getOwnKeys(map2) { - const keys = []; - for (const key in map2) { - if (hasOwnProperty.call(map2, key)) { - keys.push(key); - } - } - return keys; - } - function getAllKeys(obj) { - const result = []; - do { - const names = Object.getOwnPropertyNames(obj); - for (const name of names) { - pushIfUnique(result, name); - } - } while (obj = Object.getPrototypeOf(obj)); - return result; - } - function getOwnValues(collection) { - const values = []; - for (const key in collection) { - if (hasOwnProperty.call(collection, key)) { - values.push(collection[key]); - } - } - return values; - } - function arrayOf(count, f) { - const result = new Array(count); - for (let i = 0; i < count; i++) { - result[i] = f(i); - } - return result; - } - function arrayFrom(iterator, map2) { - const result = []; - for (const value of iterator) { - result.push(map2 ? map2(value) : value); - } - return result; - } - function assign(t, ...args) { - for (const arg of args) { - if (arg === void 0) - continue; - for (const p in arg) { - if (hasProperty(arg, p)) { - t[p] = arg[p]; - } - } - } - return t; - } - function equalOwnProperties(left, right, equalityComparer = equateValues) { - if (left === right) - return true; - if (!left || !right) - return false; - for (const key in left) { - if (hasOwnProperty.call(left, key)) { - if (!hasOwnProperty.call(right, key)) - return false; - if (!equalityComparer(left[key], right[key])) - return false; - } - } - for (const key in right) { - if (hasOwnProperty.call(right, key)) { - if (!hasOwnProperty.call(left, key)) - return false; - } - } - return true; - } - function arrayToMap(array, makeKey, makeValue = identity) { - const result = /* @__PURE__ */ new Map(); - for (const value of array) { - const key = makeKey(value); - if (key !== void 0) - result.set(key, makeValue(value)); - } - return result; - } - function arrayToNumericMap(array, makeKey, makeValue = identity) { - const result = []; - for (const value of array) { - result[makeKey(value)] = makeValue(value); - } - return result; - } - function arrayToMultiMap(values, makeKey, makeValue = identity) { - const result = createMultiMap(); - for (const value of values) { - result.add(makeKey(value), makeValue(value)); - } - return result; - } - function group(values, getGroupId, resultSelector = identity) { - return arrayFrom(arrayToMultiMap(values, getGroupId).values(), resultSelector); - } - function groupBy(values, keySelector) { - const result = {}; - if (values) { - for (const value of values) { - const key = `${keySelector(value)}`; - const array = result[key] ?? (result[key] = []); - array.push(value); - } - } - return result; - } - function clone(object) { - const result = {}; - for (const id in object) { - if (hasOwnProperty.call(object, id)) { - result[id] = object[id]; - } - } - return result; - } - function extend(first2, second) { - const result = {}; - for (const id in second) { - if (hasOwnProperty.call(second, id)) { - result[id] = second[id]; - } - } - for (const id in first2) { - if (hasOwnProperty.call(first2, id)) { - result[id] = first2[id]; - } - } - return result; - } - function copyProperties(first2, second) { - for (const id in second) { - if (hasOwnProperty.call(second, id)) { - first2[id] = second[id]; - } - } - } - function maybeBind(obj, fn) { - return fn ? fn.bind(obj) : void 0; - } - function createMultiMap() { - const map2 = /* @__PURE__ */ new Map(); - map2.add = multiMapAdd; - map2.remove = multiMapRemove; - return map2; - } - function multiMapAdd(key, value) { - let values = this.get(key); - if (values) { - values.push(value); - } else { - this.set(key, values = [value]); - } - return values; - } - function multiMapRemove(key, value) { - const values = this.get(key); - if (values) { - unorderedRemoveItem(values, value); - if (!values.length) { - this.delete(key); - } - } - } - function createQueue(items) { - const elements = (items == null ? void 0 : items.slice()) || []; - let headIndex = 0; - function isEmpty() { - return headIndex === elements.length; - } - function enqueue(...items2) { - elements.push(...items2); - } - function dequeue() { - if (isEmpty()) { - throw new Error("Queue is empty"); - } - const result = elements[headIndex]; - elements[headIndex] = void 0; - headIndex++; - if (headIndex > 100 && headIndex > elements.length >> 1) { - const newLength = elements.length - headIndex; - elements.copyWithin( - /*target*/ - 0, - /*start*/ - headIndex - ); - elements.length = newLength; - headIndex = 0; - } - return result; - } - return { - enqueue, - dequeue, - isEmpty - }; - } - function createSet(getHashCode, equals) { - const multiMap = /* @__PURE__ */ new Map(); - let size = 0; - function* getElementIterator() { - for (const value of multiMap.values()) { - if (isArray(value)) { - yield* value; - } else { - yield value; - } - } - } - const set = { - has(element) { - const hash = getHashCode(element); - if (!multiMap.has(hash)) - return false; - const candidates = multiMap.get(hash); - if (!isArray(candidates)) - return equals(candidates, element); - for (const candidate of candidates) { - if (equals(candidate, element)) { - return true; - } - } - return false; - }, - add(element) { - const hash = getHashCode(element); - if (multiMap.has(hash)) { - const values = multiMap.get(hash); - if (isArray(values)) { - if (!contains(values, element, equals)) { - values.push(element); - size++; - } - } else { - const value = values; - if (!equals(value, element)) { - multiMap.set(hash, [value, element]); - size++; - } - } - } else { - multiMap.set(hash, element); - size++; - } - return this; - }, - delete(element) { - const hash = getHashCode(element); - if (!multiMap.has(hash)) - return false; - const candidates = multiMap.get(hash); - if (isArray(candidates)) { - for (let i = 0; i < candidates.length; i++) { - if (equals(candidates[i], element)) { - if (candidates.length === 1) { - multiMap.delete(hash); - } else if (candidates.length === 2) { - multiMap.set(hash, candidates[1 - i]); - } else { - unorderedRemoveItemAt(candidates, i); - } - size--; - return true; - } - } - } else { - const candidate = candidates; - if (equals(candidate, element)) { - multiMap.delete(hash); - size--; - return true; - } - } - return false; - }, - clear() { - multiMap.clear(); - size = 0; - }, - get size() { - return size; - }, - forEach(action) { - for (const elements of arrayFrom(multiMap.values())) { - if (isArray(elements)) { - for (const element of elements) { - action(element, element, set); - } - } else { - const element = elements; - action(element, element, set); - } - } - }, - keys() { - return getElementIterator(); - }, - values() { - return getElementIterator(); - }, - *entries() { - for (const value of getElementIterator()) { - yield [value, value]; - } - }, - [Symbol.iterator]: () => { - return getElementIterator(); - }, - [Symbol.toStringTag]: multiMap[Symbol.toStringTag] - }; - return set; - } - function isArray(value) { - return Array.isArray(value); - } - function toArray(value) { - return isArray(value) ? value : [value]; - } - function isString(text) { - return typeof text === "string"; - } - function isNumber(x) { - return typeof x === "number"; - } - function tryCast(value, test) { - return value !== void 0 && test(value) ? value : void 0; - } - function cast(value, test) { - if (value !== void 0 && test(value)) - return value; - return Debug.fail(`Invalid cast. The supplied value ${value} did not pass the test '${Debug.getFunctionName(test)}'.`); - } - function noop(_) { - } - function returnFalse() { - return false; - } - function returnTrue() { - return true; - } - function returnUndefined() { - return void 0; - } - function identity(x) { - return x; - } - function toLowerCase(x) { - return x.toLowerCase(); - } - function toFileNameLowerCase(x) { - return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x; - } - function notImplemented() { - throw new Error("Not implemented"); - } - function memoize(callback) { - let value; - return () => { - if (callback) { - value = callback(); - callback = void 0; - } - return value; - }; - } - function memoizeOne(callback) { - const map2 = /* @__PURE__ */ new Map(); - return (arg) => { - const key = `${typeof arg}:${arg}`; - let value = map2.get(key); - if (value === void 0 && !map2.has(key)) { - value = callback(arg); - map2.set(key, value); - } - return value; - }; - } - function memoizeWeak(callback) { - const map2 = /* @__PURE__ */ new WeakMap(); - return (arg) => { - let value = map2.get(arg); - if (value === void 0 && !map2.has(arg)) { - value = callback(arg); - map2.set(arg, value); - } - return value; - }; - } - function memoizeCached(callback, cache) { - return (...args) => { - let value = cache.get(args); - if (value === void 0 && !cache.has(args)) { - value = callback(...args); - cache.set(args, value); - } - return value; - }; - } - function compose(a, b, c, d, e) { - if (!!e) { - const args = []; - for (let i = 0; i < arguments.length; i++) { - args[i] = arguments[i]; - } - return (t) => reduceLeft(args, (u, f) => f(u), t); - } else if (d) { - return (t) => d(c(b(a(t)))); - } else if (c) { - return (t) => c(b(a(t))); - } else if (b) { - return (t) => b(a(t)); - } else if (a) { - return (t) => a(t); - } else { - return (t) => t; - } - } - function equateValues(a, b) { - return a === b; - } - function equateStringsCaseInsensitive(a, b) { - return a === b || a !== void 0 && b !== void 0 && a.toUpperCase() === b.toUpperCase(); - } - function equateStringsCaseSensitive(a, b) { - return equateValues(a, b); - } - function compareComparableValues(a, b) { - return a === b ? 0 /* EqualTo */ : a === void 0 ? -1 /* LessThan */ : b === void 0 ? 1 /* GreaterThan */ : a < b ? -1 /* LessThan */ : 1 /* GreaterThan */; - } - function compareValues(a, b) { - return compareComparableValues(a, b); - } - function compareTextSpans(a, b) { - return compareValues(a == null ? void 0 : a.start, b == null ? void 0 : b.start) || compareValues(a == null ? void 0 : a.length, b == null ? void 0 : b.length); - } - function min(items, compare) { - return reduceLeft(items, (x, y) => compare(x, y) === -1 /* LessThan */ ? x : y); - } - function compareStringsCaseInsensitive(a, b) { - if (a === b) - return 0 /* EqualTo */; - if (a === void 0) - return -1 /* LessThan */; - if (b === void 0) - return 1 /* GreaterThan */; - a = a.toUpperCase(); - b = b.toUpperCase(); - return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */; - } - function compareStringsCaseInsensitiveEslintCompatible(a, b) { - if (a === b) - return 0 /* EqualTo */; - if (a === void 0) - return -1 /* LessThan */; - if (b === void 0) - return 1 /* GreaterThan */; - a = a.toLowerCase(); - b = b.toLowerCase(); - return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */; - } - function compareStringsCaseSensitive(a, b) { - return compareComparableValues(a, b); - } - function getStringComparer(ignoreCase) { - return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive; - } - function getUILocale() { - return uiLocale; - } - function setUILocale(value) { - if (uiLocale !== value) { - uiLocale = value; - uiComparerCaseSensitive = void 0; - } - } - function compareStringsCaseSensitiveUI(a, b) { - const comparer = uiComparerCaseSensitive || (uiComparerCaseSensitive = createUIStringComparer(uiLocale)); - return comparer(a, b); - } - function compareProperties(a, b, key, comparer) { - return a === b ? 0 /* EqualTo */ : a === void 0 ? -1 /* LessThan */ : b === void 0 ? 1 /* GreaterThan */ : comparer(a[key], b[key]); - } - function compareBooleans(a, b) { - return compareValues(a ? 1 : 0, b ? 1 : 0); - } - function getSpellingSuggestion(name, candidates, getName) { - const maximumLengthDifference = Math.max(2, Math.floor(name.length * 0.34)); - let bestDistance = Math.floor(name.length * 0.4) + 1; - let bestCandidate; - for (const candidate of candidates) { - const candidateName = getName(candidate); - if (candidateName !== void 0 && Math.abs(candidateName.length - name.length) <= maximumLengthDifference) { - if (candidateName === name) { - continue; - } - if (candidateName.length < 3 && candidateName.toLowerCase() !== name.toLowerCase()) { - continue; - } - const distance = levenshteinWithMax(name, candidateName, bestDistance - 0.1); - if (distance === void 0) { - continue; - } - Debug.assert(distance < bestDistance); - bestDistance = distance; - bestCandidate = candidate; - } - } - return bestCandidate; - } - function levenshteinWithMax(s1, s2, max) { - let previous = new Array(s2.length + 1); - let current = new Array(s2.length + 1); - const big = max + 0.01; - for (let i = 0; i <= s2.length; i++) { - previous[i] = i; - } - for (let i = 1; i <= s1.length; i++) { - const c1 = s1.charCodeAt(i - 1); - const minJ = Math.ceil(i > max ? i - max : 1); - const maxJ = Math.floor(s2.length > max + i ? max + i : s2.length); - current[0] = i; - let colMin = i; - for (let j = 1; j < minJ; j++) { - current[j] = big; - } - for (let j = minJ; j <= maxJ; j++) { - const substitutionDistance = s1[i - 1].toLowerCase() === s2[j - 1].toLowerCase() ? previous[j - 1] + 0.1 : previous[j - 1] + 2; - const dist = c1 === s2.charCodeAt(j - 1) ? previous[j - 1] : Math.min( - /*delete*/ - previous[j] + 1, - /*insert*/ - current[j - 1] + 1, - /*substitute*/ - substitutionDistance - ); - current[j] = dist; - colMin = Math.min(colMin, dist); - } - for (let j = maxJ + 1; j <= s2.length; j++) { - current[j] = big; - } - if (colMin > max) { - return void 0; - } - const temp = previous; - previous = current; - current = temp; - } - const res = previous[s2.length]; - return res > max ? void 0 : res; - } - function endsWith(str, suffix) { - const expectedPos = str.length - suffix.length; - return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; - } - function removeSuffix(str, suffix) { - return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : str; - } - function tryRemoveSuffix(str, suffix) { - return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : void 0; - } - function stringContains(str, substring) { - return str.indexOf(substring) !== -1; - } - function removeMinAndVersionNumbers(fileName) { - let end = fileName.length; - for (let pos = end - 1; pos > 0; pos--) { - let ch = fileName.charCodeAt(pos); - if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) { - do { - --pos; - ch = fileName.charCodeAt(pos); - } while (pos > 0 && ch >= 48 /* _0 */ && ch <= 57 /* _9 */); - } else if (pos > 4 && (ch === 110 /* n */ || ch === 78 /* N */)) { - --pos; - ch = fileName.charCodeAt(pos); - if (ch !== 105 /* i */ && ch !== 73 /* I */) { - break; - } - --pos; - ch = fileName.charCodeAt(pos); - if (ch !== 109 /* m */ && ch !== 77 /* M */) { - break; - } - --pos; - ch = fileName.charCodeAt(pos); - } else { - break; - } - if (ch !== 45 /* minus */ && ch !== 46 /* dot */) { - break; - } - end = pos; - } - return end === fileName.length ? fileName : fileName.slice(0, end); - } - function orderedRemoveItem(array, item) { - for (let i = 0; i < array.length; i++) { - if (array[i] === item) { - orderedRemoveItemAt(array, i); - return true; - } - } - return false; - } - function orderedRemoveItemAt(array, index) { - for (let i = index; i < array.length - 1; i++) { - array[i] = array[i + 1]; - } - array.pop(); - } - function unorderedRemoveItemAt(array, index) { - array[index] = array[array.length - 1]; - array.pop(); - } - function unorderedRemoveItem(array, item) { - return unorderedRemoveFirstItemWhere(array, (element) => element === item); - } - function unorderedRemoveFirstItemWhere(array, predicate) { - for (let i = 0; i < array.length; i++) { - if (predicate(array[i])) { - unorderedRemoveItemAt(array, i); - return true; - } - } - return false; - } - function createGetCanonicalFileName(useCaseSensitiveFileNames2) { - return useCaseSensitiveFileNames2 ? identity : toFileNameLowerCase; - } - function patternText({ prefix, suffix }) { - return `${prefix}*${suffix}`; - } - function matchedText(pattern, candidate) { - Debug.assert(isPatternMatch(pattern, candidate)); - return candidate.substring(pattern.prefix.length, candidate.length - pattern.suffix.length); - } - function findBestPatternMatch(values, getPattern, candidate) { - let matchedValue; - let longestMatchPrefixLength = -1; - for (const v of values) { - const pattern = getPattern(v); - if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) { - longestMatchPrefixLength = pattern.prefix.length; - matchedValue = v; - } - } - return matchedValue; - } - function startsWith(str, prefix) { - return str.lastIndexOf(prefix, 0) === 0; - } - function removePrefix(str, prefix) { - return startsWith(str, prefix) ? str.substr(prefix.length) : str; - } - function tryRemovePrefix(str, prefix, getCanonicalFileName = identity) { - return startsWith(getCanonicalFileName(str), getCanonicalFileName(prefix)) ? str.substring(prefix.length) : void 0; - } - function isPatternMatch({ prefix, suffix }, candidate) { - return candidate.length >= prefix.length + suffix.length && startsWith(candidate, prefix) && endsWith(candidate, suffix); - } - function and(f, g) { - return (arg) => f(arg) && g(arg); - } - function or(...fs) { - return (...args) => { - let lastResult; - for (const f of fs) { - lastResult = f(...args); - if (lastResult) { - return lastResult; - } - } - return lastResult; - }; - } - function not(fn) { - return (...args) => !fn(...args); - } - function assertType(_) { - } - function singleElementArray(t) { - return t === void 0 ? void 0 : [t]; - } - function enumerateInsertsAndDeletes(newItems, oldItems, comparer, inserted, deleted, unchanged) { - unchanged = unchanged || noop; - let newIndex = 0; - let oldIndex = 0; - const newLen = newItems.length; - const oldLen = oldItems.length; - let hasChanges = false; - while (newIndex < newLen && oldIndex < oldLen) { - const newItem = newItems[newIndex]; - const oldItem = oldItems[oldIndex]; - const compareResult = comparer(newItem, oldItem); - if (compareResult === -1 /* LessThan */) { - inserted(newItem); - newIndex++; - hasChanges = true; - } else if (compareResult === 1 /* GreaterThan */) { - deleted(oldItem); - oldIndex++; - hasChanges = true; - } else { - unchanged(oldItem, newItem); - newIndex++; - oldIndex++; - } - } - while (newIndex < newLen) { - inserted(newItems[newIndex++]); - hasChanges = true; - } - while (oldIndex < oldLen) { - deleted(oldItems[oldIndex++]); - hasChanges = true; - } - return hasChanges; - } - function cartesianProduct(arrays) { - const result = []; - cartesianProductWorker( - arrays, - result, - /*outer*/ - void 0, - 0 - ); - return result; - } - function cartesianProductWorker(arrays, result, outer, index) { - for (const element of arrays[index]) { - let inner; - if (outer) { - inner = outer.slice(); - inner.push(element); - } else { - inner = [element]; - } - if (index === arrays.length - 1) { - result.push(inner); - } else { - cartesianProductWorker(arrays, result, inner, index + 1); - } - } - } - function padLeft(s, length2, padString = " ") { - return length2 <= s.length ? s : padString.repeat(length2 - s.length) + s; - } - function padRight(s, length2, padString = " ") { - return length2 <= s.length ? s : s + padString.repeat(length2 - s.length); - } - function takeWhile(array, predicate) { - if (array) { - const len = array.length; - let index = 0; - while (index < len && predicate(array[index])) { - index++; - } - return array.slice(0, index); - } - } - function skipWhile(array, predicate) { - if (array) { - const len = array.length; - let index = 0; - while (index < len && predicate(array[index])) { - index++; - } - return array.slice(index); - } - } - function trimEndImpl(s) { - let end = s.length - 1; - while (end >= 0) { - if (!isWhiteSpaceLike(s.charCodeAt(end))) - break; - end--; - } - return s.slice(0, end + 1); - } - function isNodeLikeSystem() { - return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object"; - } - var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale, trimString, trimStringEnd, trimStringStart; - var init_core = __esm({ - "src/compiler/core.ts"() { - "use strict"; - init_ts2(); - emptyArray = []; - emptyMap = /* @__PURE__ */ new Map(); - emptySet = /* @__PURE__ */ new Set(); - SortKind = /* @__PURE__ */ ((SortKind2) => { - SortKind2[SortKind2["None"] = 0] = "None"; - SortKind2[SortKind2["CaseSensitive"] = 1] = "CaseSensitive"; - SortKind2[SortKind2["CaseInsensitive"] = 2] = "CaseInsensitive"; - SortKind2[SortKind2["Both"] = 3] = "Both"; - return SortKind2; - })(SortKind || {}); - elementAt = !!Array.prototype.at ? (array, offset) => array == null ? void 0 : array.at(offset) : (array, offset) => { - if (array) { - offset = toOffset(array, offset); - if (offset < array.length) { - return array[offset]; - } - } - return void 0; - }; - hasOwnProperty = Object.prototype.hasOwnProperty; - fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; - AssertionLevel = /* @__PURE__ */ ((AssertionLevel2) => { - AssertionLevel2[AssertionLevel2["None"] = 0] = "None"; - AssertionLevel2[AssertionLevel2["Normal"] = 1] = "Normal"; - AssertionLevel2[AssertionLevel2["Aggressive"] = 2] = "Aggressive"; - AssertionLevel2[AssertionLevel2["VeryAggressive"] = 3] = "VeryAggressive"; - return AssertionLevel2; - })(AssertionLevel || {}); - createUIStringComparer = (() => { - let defaultComparer; - let enUSComparer; - const stringComparerFactory = getStringComparerFactory(); - return createStringComparer; - function compareWithCallback(a, b, comparer) { - if (a === b) - return 0 /* EqualTo */; - if (a === void 0) - return -1 /* LessThan */; - if (b === void 0) - return 1 /* GreaterThan */; - const value = comparer(a, b); - return value < 0 ? -1 /* LessThan */ : value > 0 ? 1 /* GreaterThan */ : 0 /* EqualTo */; - } - function createIntlCollatorStringComparer(locale) { - const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare; - return (a, b) => compareWithCallback(a, b, comparer); - } - function createLocaleCompareStringComparer(locale) { - if (locale !== void 0) - return createFallbackStringComparer(); - return (a, b) => compareWithCallback(a, b, compareStrings); - function compareStrings(a, b) { - return a.localeCompare(b); - } - } - function createFallbackStringComparer() { - return (a, b) => compareWithCallback(a, b, compareDictionaryOrder); - function compareDictionaryOrder(a, b) { - return compareStrings(a.toUpperCase(), b.toUpperCase()) || compareStrings(a, b); - } - function compareStrings(a, b) { - return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */; - } - } - function getStringComparerFactory() { - if (typeof Intl === "object" && typeof Intl.Collator === "function") { - return createIntlCollatorStringComparer; - } - if (typeof String.prototype.localeCompare === "function" && typeof String.prototype.toLocaleUpperCase === "function" && "a".localeCompare("B") < 0) { - return createLocaleCompareStringComparer; - } - return createFallbackStringComparer; - } - function createStringComparer(locale) { - if (locale === void 0) { - return defaultComparer || (defaultComparer = stringComparerFactory(locale)); - } else if (locale === "en-US") { - return enUSComparer || (enUSComparer = stringComparerFactory(locale)); - } else { - return stringComparerFactory(locale); - } - } - })(); - trimString = !!String.prototype.trim ? (s) => s.trim() : (s) => trimStringEnd(trimStringStart(s)); - trimStringEnd = !!String.prototype.trimEnd ? (s) => s.trimEnd() : trimEndImpl; - trimStringStart = !!String.prototype.trimStart ? (s) => s.trimStart() : (s) => s.replace(/^\s+/g, ""); - } - }); - - // src/compiler/debug.ts - var LogLevel, Debug; - var init_debug = __esm({ - "src/compiler/debug.ts"() { - "use strict"; - init_ts2(); - init_ts2(); - LogLevel = /* @__PURE__ */ ((LogLevel3) => { - LogLevel3[LogLevel3["Off"] = 0] = "Off"; - LogLevel3[LogLevel3["Error"] = 1] = "Error"; - LogLevel3[LogLevel3["Warning"] = 2] = "Warning"; - LogLevel3[LogLevel3["Info"] = 3] = "Info"; - LogLevel3[LogLevel3["Verbose"] = 4] = "Verbose"; - return LogLevel3; - })(LogLevel || {}); - ((Debug2) => { - let currentAssertionLevel = 0 /* None */; - Debug2.currentLogLevel = 2 /* Warning */; - Debug2.isDebugging = false; - function shouldLog(level) { - return Debug2.currentLogLevel <= level; - } - Debug2.shouldLog = shouldLog; - function logMessage(level, s) { - if (Debug2.loggingHost && shouldLog(level)) { - Debug2.loggingHost.log(level, s); - } - } - function log(s) { - logMessage(3 /* Info */, s); - } - Debug2.log = log; - ((_log) => { - function error2(s) { - logMessage(1 /* Error */, s); - } - _log.error = error2; - function warn(s) { - logMessage(2 /* Warning */, s); - } - _log.warn = warn; - function log2(s) { - logMessage(3 /* Info */, s); - } - _log.log = log2; - function trace2(s) { - logMessage(4 /* Verbose */, s); - } - _log.trace = trace2; - })(log = Debug2.log || (Debug2.log = {})); - const assertionCache = {}; - function getAssertionLevel() { - return currentAssertionLevel; - } - Debug2.getAssertionLevel = getAssertionLevel; - function setAssertionLevel(level) { - const prevAssertionLevel = currentAssertionLevel; - currentAssertionLevel = level; - if (level > prevAssertionLevel) { - for (const key of getOwnKeys(assertionCache)) { - const cachedFunc = assertionCache[key]; - if (cachedFunc !== void 0 && Debug2[key] !== cachedFunc.assertion && level >= cachedFunc.level) { - Debug2[key] = cachedFunc; - assertionCache[key] = void 0; - } - } - } - } - Debug2.setAssertionLevel = setAssertionLevel; - function shouldAssert(level) { - return currentAssertionLevel >= level; - } - Debug2.shouldAssert = shouldAssert; - function shouldAssertFunction(level, name) { - if (!shouldAssert(level)) { - assertionCache[name] = { level, assertion: Debug2[name] }; - Debug2[name] = noop; - return false; - } - return true; - } - function fail(message, stackCrawlMark) { - debugger; - const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); - if (Error.captureStackTrace) { - Error.captureStackTrace(e, stackCrawlMark || fail); - } - throw e; - } - Debug2.fail = fail; - function failBadSyntaxKind(node, message, stackCrawlMark) { - return fail( - `${message || "Unexpected node."}\r -Node ${formatSyntaxKind(node.kind)} was unexpected.`, - stackCrawlMark || failBadSyntaxKind - ); - } - Debug2.failBadSyntaxKind = failBadSyntaxKind; - function assert(expression, message, verboseDebugInfo, stackCrawlMark) { - if (!expression) { - message = message ? `False expression: ${message}` : "False expression."; - if (verboseDebugInfo) { - message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); - } - fail(message, stackCrawlMark || assert); - } - } - Debug2.assert = assert; - function assertEqual(a, b, msg, msg2, stackCrawlMark) { - if (a !== b) { - const message = msg ? msg2 ? `${msg} ${msg2}` : msg : ""; - fail(`Expected ${a} === ${b}. ${message}`, stackCrawlMark || assertEqual); - } - } - Debug2.assertEqual = assertEqual; - function assertLessThan(a, b, msg, stackCrawlMark) { - if (a >= b) { - fail(`Expected ${a} < ${b}. ${msg || ""}`, stackCrawlMark || assertLessThan); - } - } - Debug2.assertLessThan = assertLessThan; - function assertLessThanOrEqual(a, b, stackCrawlMark) { - if (a > b) { - fail(`Expected ${a} <= ${b}`, stackCrawlMark || assertLessThanOrEqual); - } - } - Debug2.assertLessThanOrEqual = assertLessThanOrEqual; - function assertGreaterThanOrEqual(a, b, stackCrawlMark) { - if (a < b) { - fail(`Expected ${a} >= ${b}`, stackCrawlMark || assertGreaterThanOrEqual); - } - } - Debug2.assertGreaterThanOrEqual = assertGreaterThanOrEqual; - function assertIsDefined(value, message, stackCrawlMark) { - if (value === void 0 || value === null) { - fail(message, stackCrawlMark || assertIsDefined); - } - } - Debug2.assertIsDefined = assertIsDefined; - function checkDefined(value, message, stackCrawlMark) { - assertIsDefined(value, message, stackCrawlMark || checkDefined); - return value; - } - Debug2.checkDefined = checkDefined; - function assertEachIsDefined(value, message, stackCrawlMark) { - for (const v of value) { - assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); - } - } - Debug2.assertEachIsDefined = assertEachIsDefined; - function checkEachDefined(value, message, stackCrawlMark) { - assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); - return value; - } - Debug2.checkEachDefined = checkEachDefined; - function assertNever(member, message = "Illegal value:", stackCrawlMark) { - const detail = typeof member === "object" && hasProperty(member, "kind") && hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member); - return fail(`${message} ${detail}`, stackCrawlMark || assertNever); - } - Debug2.assertNever = assertNever; - function assertEachNode(nodes, test, message, stackCrawlMark) { - if (shouldAssertFunction(1 /* Normal */, "assertEachNode")) { - assert( - test === void 0 || every(nodes, test), - message || "Unexpected node.", - () => `Node array did not pass test '${getFunctionName(test)}'.`, - stackCrawlMark || assertEachNode - ); - } - } - Debug2.assertEachNode = assertEachNode; - function assertNode(node, test, message, stackCrawlMark) { - if (shouldAssertFunction(1 /* Normal */, "assertNode")) { - assert( - node !== void 0 && (test === void 0 || test(node)), - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node == null ? void 0 : node.kind)} did not pass test '${getFunctionName(test)}'.`, - stackCrawlMark || assertNode - ); - } - } - Debug2.assertNode = assertNode; - function assertNotNode(node, test, message, stackCrawlMark) { - if (shouldAssertFunction(1 /* Normal */, "assertNotNode")) { - assert( - node === void 0 || test === void 0 || !test(node), - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node.kind)} should not have passed test '${getFunctionName(test)}'.`, - stackCrawlMark || assertNotNode - ); - } - } - Debug2.assertNotNode = assertNotNode; - function assertOptionalNode(node, test, message, stackCrawlMark) { - if (shouldAssertFunction(1 /* Normal */, "assertOptionalNode")) { - assert( - test === void 0 || node === void 0 || test(node), - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node == null ? void 0 : node.kind)} did not pass test '${getFunctionName(test)}'.`, - stackCrawlMark || assertOptionalNode - ); - } - } - Debug2.assertOptionalNode = assertOptionalNode; - function assertOptionalToken(node, kind, message, stackCrawlMark) { - if (shouldAssertFunction(1 /* Normal */, "assertOptionalToken")) { - assert( - kind === void 0 || node === void 0 || node.kind === kind, - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node == null ? void 0 : node.kind)} was not a '${formatSyntaxKind(kind)}' token.`, - stackCrawlMark || assertOptionalToken - ); - } - } - Debug2.assertOptionalToken = assertOptionalToken; - function assertMissingNode(node, message, stackCrawlMark) { - if (shouldAssertFunction(1 /* Normal */, "assertMissingNode")) { - assert( - node === void 0, - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node.kind)} was unexpected'.`, - stackCrawlMark || assertMissingNode - ); - } - } - Debug2.assertMissingNode = assertMissingNode; - function type(_value) { - } - Debug2.type = type; - function getFunctionName(func) { - if (typeof func !== "function") { - return ""; - } else if (hasProperty(func, "name")) { - return func.name; - } else { - const text = Function.prototype.toString.call(func); - const match = /^function\s+([\w$]+)\s*\(/.exec(text); - return match ? match[1] : ""; - } - } - Debug2.getFunctionName = getFunctionName; - function formatSymbol(symbol) { - return `{ name: ${unescapeLeadingUnderscores(symbol.escapedName)}; flags: ${formatSymbolFlags(symbol.flags)}; declarations: ${map(symbol.declarations, (node) => formatSyntaxKind(node.kind))} }`; - } - Debug2.formatSymbol = formatSymbol; - function formatEnum(value = 0, enumObject, isFlags) { - const members = getEnumMembers(enumObject); - if (value === 0) { - return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0"; - } - if (isFlags) { - const result = []; - let remainingFlags = value; - for (const [enumValue, enumName] of members) { - if (enumValue > value) { - break; - } - if (enumValue !== 0 && enumValue & value) { - result.push(enumName); - remainingFlags &= ~enumValue; - } - } - if (remainingFlags === 0) { - return result.join("|"); - } - } else { - for (const [enumValue, enumName] of members) { - if (enumValue === value) { - return enumName; - } - } - } - return value.toString(); - } - Debug2.formatEnum = formatEnum; - const enumMemberCache = /* @__PURE__ */ new Map(); - function getEnumMembers(enumObject) { - const existing = enumMemberCache.get(enumObject); - if (existing) { - return existing; - } - const result = []; - for (const name in enumObject) { - const value = enumObject[name]; - if (typeof value === "number") { - result.push([value, name]); - } - } - const sorted = stableSort(result, (x, y) => compareValues(x[0], y[0])); - enumMemberCache.set(enumObject, sorted); - return sorted; - } - function formatSyntaxKind(kind) { - return formatEnum( - kind, - SyntaxKind, - /*isFlags*/ - false - ); - } - Debug2.formatSyntaxKind = formatSyntaxKind; - function formatSnippetKind(kind) { - return formatEnum( - kind, - SnippetKind, - /*isFlags*/ - false - ); - } - Debug2.formatSnippetKind = formatSnippetKind; - function formatScriptKind(kind) { - return formatEnum( - kind, - ScriptKind, - /*isFlags*/ - false - ); - } - Debug2.formatScriptKind = formatScriptKind; - function formatNodeFlags(flags) { - return formatEnum( - flags, - NodeFlags, - /*isFlags*/ - true - ); - } - Debug2.formatNodeFlags = formatNodeFlags; - function formatModifierFlags(flags) { - return formatEnum( - flags, - ModifierFlags, - /*isFlags*/ - true - ); - } - Debug2.formatModifierFlags = formatModifierFlags; - function formatTransformFlags(flags) { - return formatEnum( - flags, - TransformFlags, - /*isFlags*/ - true - ); - } - Debug2.formatTransformFlags = formatTransformFlags; - function formatEmitFlags(flags) { - return formatEnum( - flags, - EmitFlags, - /*isFlags*/ - true - ); - } - Debug2.formatEmitFlags = formatEmitFlags; - function formatSymbolFlags(flags) { - return formatEnum( - flags, - SymbolFlags, - /*isFlags*/ - true - ); - } - Debug2.formatSymbolFlags = formatSymbolFlags; - function formatTypeFlags(flags) { - return formatEnum( - flags, - TypeFlags, - /*isFlags*/ - true - ); - } - Debug2.formatTypeFlags = formatTypeFlags; - function formatSignatureFlags(flags) { - return formatEnum( - flags, - SignatureFlags, - /*isFlags*/ - true - ); - } - Debug2.formatSignatureFlags = formatSignatureFlags; - function formatObjectFlags(flags) { - return formatEnum( - flags, - ObjectFlags, - /*isFlags*/ - true - ); - } - Debug2.formatObjectFlags = formatObjectFlags; - function formatFlowFlags(flags) { - return formatEnum( - flags, - FlowFlags, - /*isFlags*/ - true - ); - } - Debug2.formatFlowFlags = formatFlowFlags; - function formatRelationComparisonResult(result) { - return formatEnum( - result, - RelationComparisonResult, - /*isFlags*/ - true - ); - } - Debug2.formatRelationComparisonResult = formatRelationComparisonResult; - function formatCheckMode(mode) { - return formatEnum( - mode, - CheckMode, - /*isFlags*/ - true - ); - } - Debug2.formatCheckMode = formatCheckMode; - function formatSignatureCheckMode(mode) { - return formatEnum( - mode, - SignatureCheckMode, - /*isFlags*/ - true - ); - } - Debug2.formatSignatureCheckMode = formatSignatureCheckMode; - function formatTypeFacts(facts) { - return formatEnum( - facts, - TypeFacts, - /*isFlags*/ - true - ); - } - Debug2.formatTypeFacts = formatTypeFacts; - let isDebugInfoEnabled = false; - let flowNodeProto; - function attachFlowNodeDebugInfoWorker(flowNode) { - if (!("__debugFlowFlags" in flowNode)) { - Object.defineProperties(flowNode, { - // for use with vscode-js-debug's new customDescriptionGenerator in launch.json - __tsDebuggerDisplay: { - value() { - const flowHeader = this.flags & 2 /* Start */ ? "FlowStart" : this.flags & 4 /* BranchLabel */ ? "FlowBranchLabel" : this.flags & 8 /* LoopLabel */ ? "FlowLoopLabel" : this.flags & 16 /* Assignment */ ? "FlowAssignment" : this.flags & 32 /* TrueCondition */ ? "FlowTrueCondition" : this.flags & 64 /* FalseCondition */ ? "FlowFalseCondition" : this.flags & 128 /* SwitchClause */ ? "FlowSwitchClause" : this.flags & 256 /* ArrayMutation */ ? "FlowArrayMutation" : this.flags & 512 /* Call */ ? "FlowCall" : this.flags & 1024 /* ReduceLabel */ ? "FlowReduceLabel" : this.flags & 1 /* Unreachable */ ? "FlowUnreachable" : "UnknownFlow"; - const remainingFlags = this.flags & ~(2048 /* Referenced */ - 1); - return `${flowHeader}${remainingFlags ? ` (${formatFlowFlags(remainingFlags)})` : ""}`; - } - }, - __debugFlowFlags: { get() { - return formatEnum( - this.flags, - FlowFlags, - /*isFlags*/ - true - ); - } }, - __debugToString: { value() { - return formatControlFlowGraph(this); - } } - }); - } - } - function attachFlowNodeDebugInfo(flowNode) { - if (isDebugInfoEnabled) { - if (typeof Object.setPrototypeOf === "function") { - if (!flowNodeProto) { - flowNodeProto = Object.create(Object.prototype); - attachFlowNodeDebugInfoWorker(flowNodeProto); - } - Object.setPrototypeOf(flowNode, flowNodeProto); - } else { - attachFlowNodeDebugInfoWorker(flowNode); - } - } - } - Debug2.attachFlowNodeDebugInfo = attachFlowNodeDebugInfo; - let nodeArrayProto; - function attachNodeArrayDebugInfoWorker(array) { - if (!("__tsDebuggerDisplay" in array)) { - Object.defineProperties(array, { - __tsDebuggerDisplay: { - value(defaultValue) { - defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]"); - return `NodeArray ${defaultValue}`; - } - } - }); - } - } - function attachNodeArrayDebugInfo(array) { - if (isDebugInfoEnabled) { - if (typeof Object.setPrototypeOf === "function") { - if (!nodeArrayProto) { - nodeArrayProto = Object.create(Array.prototype); - attachNodeArrayDebugInfoWorker(nodeArrayProto); - } - Object.setPrototypeOf(array, nodeArrayProto); - } else { - attachNodeArrayDebugInfoWorker(array); - } - } - } - Debug2.attachNodeArrayDebugInfo = attachNodeArrayDebugInfo; - function enableDebugInfo() { - if (isDebugInfoEnabled) - return; - const weakTypeTextMap = /* @__PURE__ */ new WeakMap(); - const weakNodeTextMap = /* @__PURE__ */ new WeakMap(); - Object.defineProperties(objectAllocator.getSymbolConstructor().prototype, { - // for use with vscode-js-debug's new customDescriptionGenerator in launch.json - __tsDebuggerDisplay: { - value() { - const symbolHeader = this.flags & 33554432 /* Transient */ ? "TransientSymbol" : "Symbol"; - const remainingSymbolFlags = this.flags & ~33554432 /* Transient */; - return `${symbolHeader} '${symbolName(this)}'${remainingSymbolFlags ? ` (${formatSymbolFlags(remainingSymbolFlags)})` : ""}`; - } - }, - __debugFlags: { get() { - return formatSymbolFlags(this.flags); - } } - }); - Object.defineProperties(objectAllocator.getTypeConstructor().prototype, { - // for use with vscode-js-debug's new customDescriptionGenerator in launch.json - __tsDebuggerDisplay: { - value() { - const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}` : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type"; - const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0; - return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`; - } - }, - __debugFlags: { get() { - return formatTypeFlags(this.flags); - } }, - __debugObjectFlags: { get() { - return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : ""; - } }, - __debugTypeToString: { - value() { - let text = weakTypeTextMap.get(this); - if (text === void 0) { - text = this.checker.typeToString(this); - weakTypeTextMap.set(this, text); - } - return text; - } - } - }); - Object.defineProperties(objectAllocator.getSignatureConstructor().prototype, { - __debugFlags: { get() { - return formatSignatureFlags(this.flags); - } }, - __debugSignatureToString: { value() { - var _a; - return (_a = this.checker) == null ? void 0 : _a.signatureToString(this); - } } - }); - const nodeConstructors = [ - objectAllocator.getNodeConstructor(), - objectAllocator.getIdentifierConstructor(), - objectAllocator.getTokenConstructor(), - objectAllocator.getSourceFileConstructor() - ]; - for (const ctor of nodeConstructors) { - if (!hasProperty(ctor.prototype, "__debugKind")) { - Object.defineProperties(ctor.prototype, { - // for use with vscode-js-debug's new customDescriptionGenerator in launch.json - __tsDebuggerDisplay: { - value() { - const nodeHeader = isGeneratedIdentifier(this) ? "GeneratedIdentifier" : isIdentifier(this) ? `Identifier '${idText(this)}'` : isPrivateIdentifier(this) ? `PrivateIdentifier '${idText(this)}'` : isStringLiteral(this) ? `StringLiteral ${JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")}` : isNumericLiteral(this) ? `NumericLiteral ${this.text}` : isBigIntLiteral(this) ? `BigIntLiteral ${this.text}n` : isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" : isParameter(this) ? "ParameterDeclaration" : isConstructorDeclaration(this) ? "ConstructorDeclaration" : isGetAccessorDeclaration(this) ? "GetAccessorDeclaration" : isSetAccessorDeclaration(this) ? "SetAccessorDeclaration" : isCallSignatureDeclaration(this) ? "CallSignatureDeclaration" : isConstructSignatureDeclaration(this) ? "ConstructSignatureDeclaration" : isIndexSignatureDeclaration(this) ? "IndexSignatureDeclaration" : isTypePredicateNode(this) ? "TypePredicateNode" : isTypeReferenceNode(this) ? "TypeReferenceNode" : isFunctionTypeNode(this) ? "FunctionTypeNode" : isConstructorTypeNode(this) ? "ConstructorTypeNode" : isTypeQueryNode(this) ? "TypeQueryNode" : isTypeLiteralNode(this) ? "TypeLiteralNode" : isArrayTypeNode(this) ? "ArrayTypeNode" : isTupleTypeNode(this) ? "TupleTypeNode" : isOptionalTypeNode(this) ? "OptionalTypeNode" : isRestTypeNode(this) ? "RestTypeNode" : isUnionTypeNode(this) ? "UnionTypeNode" : isIntersectionTypeNode(this) ? "IntersectionTypeNode" : isConditionalTypeNode(this) ? "ConditionalTypeNode" : isInferTypeNode(this) ? "InferTypeNode" : isParenthesizedTypeNode(this) ? "ParenthesizedTypeNode" : isThisTypeNode(this) ? "ThisTypeNode" : isTypeOperatorNode(this) ? "TypeOperatorNode" : isIndexedAccessTypeNode(this) ? "IndexedAccessTypeNode" : isMappedTypeNode(this) ? "MappedTypeNode" : isLiteralTypeNode(this) ? "LiteralTypeNode" : isNamedTupleMember(this) ? "NamedTupleMember" : isImportTypeNode(this) ? "ImportTypeNode" : formatSyntaxKind(this.kind); - return `${nodeHeader}${this.flags ? ` (${formatNodeFlags(this.flags)})` : ""}`; - } - }, - __debugKind: { get() { - return formatSyntaxKind(this.kind); - } }, - __debugNodeFlags: { get() { - return formatNodeFlags(this.flags); - } }, - __debugModifierFlags: { get() { - return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); - } }, - __debugTransformFlags: { get() { - return formatTransformFlags(this.transformFlags); - } }, - __debugIsParseTreeNode: { get() { - return isParseTreeNode(this); - } }, - __debugEmitFlags: { get() { - return formatEmitFlags(getEmitFlags(this)); - } }, - __debugGetText: { - value(includeTrivia) { - if (nodeIsSynthesized(this)) - return ""; - let text = weakNodeTextMap.get(this); - if (text === void 0) { - const parseNode = getParseTreeNode(this); - const sourceFile = parseNode && getSourceFileOfNode(parseNode); - text = sourceFile ? getSourceTextOfNodeFromSourceFile(sourceFile, parseNode, includeTrivia) : ""; - weakNodeTextMap.set(this, text); - } - return text; - } - } - }); - } - } - isDebugInfoEnabled = true; - } - Debug2.enableDebugInfo = enableDebugInfo; - function formatVariance(varianceFlags) { - const variance = varianceFlags & 7 /* VarianceMask */; - let result = variance === 0 /* Invariant */ ? "in out" : variance === 3 /* Bivariant */ ? "[bivariant]" : variance === 2 /* Contravariant */ ? "in" : variance === 1 /* Covariant */ ? "out" : variance === 4 /* Independent */ ? "[independent]" : ""; - if (varianceFlags & 8 /* Unmeasurable */) { - result += " (unmeasurable)"; - } else if (varianceFlags & 16 /* Unreliable */) { - result += " (unreliable)"; - } - return result; - } - Debug2.formatVariance = formatVariance; - class DebugTypeMapper { - __debugToString() { - var _a; - type(this); - switch (this.kind) { - case 3 /* Function */: - return ((_a = this.debugInfo) == null ? void 0 : _a.call(this)) || "(function mapper)"; - case 0 /* Simple */: - return `${this.source.__debugTypeToString()} -> ${this.target.__debugTypeToString()}`; - case 1 /* Array */: - return zipWith( - this.sources, - this.targets || map(this.sources, () => "any"), - (s, t) => `${s.__debugTypeToString()} -> ${typeof t === "string" ? t : t.__debugTypeToString()}` - ).join(", "); - case 2 /* Deferred */: - return zipWith( - this.sources, - this.targets, - (s, t) => `${s.__debugTypeToString()} -> ${t().__debugTypeToString()}` - ).join(", "); - case 5 /* Merged */: - case 4 /* Composite */: - return `m1: ${this.mapper1.__debugToString().split("\n").join("\n ")} -m2: ${this.mapper2.__debugToString().split("\n").join("\n ")}`; - default: - return assertNever(this); - } - } - } - Debug2.DebugTypeMapper = DebugTypeMapper; - function attachDebugPrototypeIfDebug(mapper) { - if (Debug2.isDebugging) { - return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype); - } - return mapper; - } - Debug2.attachDebugPrototypeIfDebug = attachDebugPrototypeIfDebug; - function printControlFlowGraph(flowNode) { - return console.log(formatControlFlowGraph(flowNode)); - } - Debug2.printControlFlowGraph = printControlFlowGraph; - function formatControlFlowGraph(flowNode) { - let nextDebugFlowId = -1; - function getDebugFlowNodeId(f) { - if (!f.id) { - f.id = nextDebugFlowId; - nextDebugFlowId--; - } - return f.id; - } - let BoxCharacter; - ((BoxCharacter2) => { - BoxCharacter2["lr"] = "\u2500"; - BoxCharacter2["ud"] = "\u2502"; - BoxCharacter2["dr"] = "\u256D"; - BoxCharacter2["dl"] = "\u256E"; - BoxCharacter2["ul"] = "\u256F"; - BoxCharacter2["ur"] = "\u2570"; - BoxCharacter2["udr"] = "\u251C"; - BoxCharacter2["udl"] = "\u2524"; - BoxCharacter2["dlr"] = "\u252C"; - BoxCharacter2["ulr"] = "\u2534"; - BoxCharacter2["udlr"] = "\u256B"; - })(BoxCharacter || (BoxCharacter = {})); - let Connection; - ((Connection2) => { - Connection2[Connection2["None"] = 0] = "None"; - Connection2[Connection2["Up"] = 1] = "Up"; - Connection2[Connection2["Down"] = 2] = "Down"; - Connection2[Connection2["Left"] = 4] = "Left"; - Connection2[Connection2["Right"] = 8] = "Right"; - Connection2[Connection2["UpDown"] = 3] = "UpDown"; - Connection2[Connection2["LeftRight"] = 12] = "LeftRight"; - Connection2[Connection2["UpLeft"] = 5] = "UpLeft"; - Connection2[Connection2["UpRight"] = 9] = "UpRight"; - Connection2[Connection2["DownLeft"] = 6] = "DownLeft"; - Connection2[Connection2["DownRight"] = 10] = "DownRight"; - Connection2[Connection2["UpDownLeft"] = 7] = "UpDownLeft"; - Connection2[Connection2["UpDownRight"] = 11] = "UpDownRight"; - Connection2[Connection2["UpLeftRight"] = 13] = "UpLeftRight"; - Connection2[Connection2["DownLeftRight"] = 14] = "DownLeftRight"; - Connection2[Connection2["UpDownLeftRight"] = 15] = "UpDownLeftRight"; - Connection2[Connection2["NoChildren"] = 16] = "NoChildren"; - })(Connection || (Connection = {})); - const hasAntecedentFlags = 16 /* Assignment */ | 96 /* Condition */ | 128 /* SwitchClause */ | 256 /* ArrayMutation */ | 512 /* Call */ | 1024 /* ReduceLabel */; - const hasNodeFlags = 2 /* Start */ | 16 /* Assignment */ | 512 /* Call */ | 96 /* Condition */ | 256 /* ArrayMutation */; - const links = /* @__PURE__ */ Object.create( - /*o*/ - null - ); - const nodes = []; - const edges = []; - const root = buildGraphNode(flowNode, /* @__PURE__ */ new Set()); - for (const node of nodes) { - node.text = renderFlowNode(node.flowNode, node.circular); - computeLevel(node); - } - const height = computeHeight(root); - const columnWidths = computeColumnWidths(height); - computeLanes(root, 0); - return renderGraph(); - function isFlowSwitchClause(f) { - return !!(f.flags & 128 /* SwitchClause */); - } - function hasAntecedents(f) { - return !!(f.flags & 12 /* Label */) && !!f.antecedents; - } - function hasAntecedent(f) { - return !!(f.flags & hasAntecedentFlags); - } - function hasNode(f) { - return !!(f.flags & hasNodeFlags); - } - function getChildren(node) { - const children = []; - for (const edge of node.edges) { - if (edge.source === node) { - children.push(edge.target); - } - } - return children; - } - function getParents(node) { - const parents = []; - for (const edge of node.edges) { - if (edge.target === node) { - parents.push(edge.source); - } - } - return parents; - } - function buildGraphNode(flowNode2, seen) { - const id = getDebugFlowNodeId(flowNode2); - let graphNode = links[id]; - if (graphNode && seen.has(flowNode2)) { - graphNode.circular = true; - graphNode = { - id: -1, - flowNode: flowNode2, - edges: [], - text: "", - lane: -1, - endLane: -1, - level: -1, - circular: "circularity" - }; - nodes.push(graphNode); - return graphNode; - } - seen.add(flowNode2); - if (!graphNode) { - links[id] = graphNode = { id, flowNode: flowNode2, edges: [], text: "", lane: -1, endLane: -1, level: -1, circular: false }; - nodes.push(graphNode); - if (hasAntecedents(flowNode2)) { - for (const antecedent of flowNode2.antecedents) { - buildGraphEdge(graphNode, antecedent, seen); - } - } else if (hasAntecedent(flowNode2)) { - buildGraphEdge(graphNode, flowNode2.antecedent, seen); - } - } - seen.delete(flowNode2); - return graphNode; - } - function buildGraphEdge(source, antecedent, seen) { - const target = buildGraphNode(antecedent, seen); - const edge = { source, target }; - edges.push(edge); - source.edges.push(edge); - target.edges.push(edge); - } - function computeLevel(node) { - if (node.level !== -1) { - return node.level; - } - let level = 0; - for (const parent2 of getParents(node)) { - level = Math.max(level, computeLevel(parent2) + 1); - } - return node.level = level; - } - function computeHeight(node) { - let height2 = 0; - for (const child of getChildren(node)) { - height2 = Math.max(height2, computeHeight(child)); - } - return height2 + 1; - } - function computeColumnWidths(height2) { - const columns = fill(Array(height2), 0); - for (const node of nodes) { - columns[node.level] = Math.max(columns[node.level], node.text.length); - } - return columns; - } - function computeLanes(node, lane) { - if (node.lane === -1) { - node.lane = lane; - node.endLane = lane; - const children = getChildren(node); - for (let i = 0; i < children.length; i++) { - if (i > 0) - lane++; - const child = children[i]; - computeLanes(child, lane); - if (child.endLane > node.endLane) { - lane = child.endLane; - } - } - node.endLane = lane; - } - } - function getHeader(flags) { - if (flags & 2 /* Start */) - return "Start"; - if (flags & 4 /* BranchLabel */) - return "Branch"; - if (flags & 8 /* LoopLabel */) - return "Loop"; - if (flags & 16 /* Assignment */) - return "Assignment"; - if (flags & 32 /* TrueCondition */) - return "True"; - if (flags & 64 /* FalseCondition */) - return "False"; - if (flags & 128 /* SwitchClause */) - return "SwitchClause"; - if (flags & 256 /* ArrayMutation */) - return "ArrayMutation"; - if (flags & 512 /* Call */) - return "Call"; - if (flags & 1024 /* ReduceLabel */) - return "ReduceLabel"; - if (flags & 1 /* Unreachable */) - return "Unreachable"; - throw new Error(); - } - function getNodeText(node) { - const sourceFile = getSourceFileOfNode(node); - return getSourceTextOfNodeFromSourceFile( - sourceFile, - node, - /*includeTrivia*/ - false - ); - } - function renderFlowNode(flowNode2, circular) { - let text = getHeader(flowNode2.flags); - if (circular) { - text = `${text}#${getDebugFlowNodeId(flowNode2)}`; - } - if (hasNode(flowNode2)) { - if (flowNode2.node) { - text += ` (${getNodeText(flowNode2.node)})`; - } - } else if (isFlowSwitchClause(flowNode2)) { - const clauses = []; - for (let i = flowNode2.clauseStart; i < flowNode2.clauseEnd; i++) { - const clause = flowNode2.switchStatement.caseBlock.clauses[i]; - if (isDefaultClause(clause)) { - clauses.push("default"); - } else { - clauses.push(getNodeText(clause.expression)); - } - } - text += ` (${clauses.join(", ")})`; - } - return circular === "circularity" ? `Circular(${text})` : text; - } - function renderGraph() { - const columnCount = columnWidths.length; - const laneCount = nodes.reduce((x, n) => Math.max(x, n.lane), 0) + 1; - const lanes = fill(Array(laneCount), ""); - const grid = columnWidths.map(() => Array(laneCount)); - const connectors = columnWidths.map(() => fill(Array(laneCount), 0)); - for (const node of nodes) { - grid[node.level][node.lane] = node; - const children = getChildren(node); - for (let i = 0; i < children.length; i++) { - const child = children[i]; - let connector = 8 /* Right */; - if (child.lane === node.lane) - connector |= 4 /* Left */; - if (i > 0) - connector |= 1 /* Up */; - if (i < children.length - 1) - connector |= 2 /* Down */; - connectors[node.level][child.lane] |= connector; - } - if (children.length === 0) { - connectors[node.level][node.lane] |= 16 /* NoChildren */; - } - const parents = getParents(node); - for (let i = 0; i < parents.length; i++) { - const parent2 = parents[i]; - let connector = 4 /* Left */; - if (i > 0) - connector |= 1 /* Up */; - if (i < parents.length - 1) - connector |= 2 /* Down */; - connectors[node.level - 1][parent2.lane] |= connector; - } - } - for (let column = 0; column < columnCount; column++) { - for (let lane = 0; lane < laneCount; lane++) { - const left = column > 0 ? connectors[column - 1][lane] : 0; - const above = lane > 0 ? connectors[column][lane - 1] : 0; - let connector = connectors[column][lane]; - if (!connector) { - if (left & 8 /* Right */) - connector |= 12 /* LeftRight */; - if (above & 2 /* Down */) - connector |= 3 /* UpDown */; - connectors[column][lane] = connector; - } - } - } - for (let column = 0; column < columnCount; column++) { - for (let lane = 0; lane < lanes.length; lane++) { - const connector = connectors[column][lane]; - const fill2 = connector & 4 /* Left */ ? "\u2500" /* lr */ : " "; - const node = grid[column][lane]; - if (!node) { - if (column < columnCount - 1) { - writeLane(lane, repeat(fill2, columnWidths[column] + 1)); - } - } else { - writeLane(lane, node.text); - if (column < columnCount - 1) { - writeLane(lane, " "); - writeLane(lane, repeat(fill2, columnWidths[column] - node.text.length)); - } - } - writeLane(lane, getBoxCharacter(connector)); - writeLane(lane, connector & 8 /* Right */ && column < columnCount - 1 && !grid[column + 1][lane] ? "\u2500" /* lr */ : " "); - } - } - return ` -${lanes.join("\n")} -`; - function writeLane(lane, text) { - lanes[lane] += text; - } - } - function getBoxCharacter(connector) { - switch (connector) { - case 3 /* UpDown */: - return "\u2502" /* ud */; - case 12 /* LeftRight */: - return "\u2500" /* lr */; - case 5 /* UpLeft */: - return "\u256F" /* ul */; - case 9 /* UpRight */: - return "\u2570" /* ur */; - case 6 /* DownLeft */: - return "\u256E" /* dl */; - case 10 /* DownRight */: - return "\u256D" /* dr */; - case 7 /* UpDownLeft */: - return "\u2524" /* udl */; - case 11 /* UpDownRight */: - return "\u251C" /* udr */; - case 13 /* UpLeftRight */: - return "\u2534" /* ulr */; - case 14 /* DownLeftRight */: - return "\u252C" /* dlr */; - case 15 /* UpDownLeftRight */: - return "\u256B" /* udlr */; - } - return " "; - } - function fill(array, value) { - if (array.fill) { - array.fill(value); - } else { - for (let i = 0; i < array.length; i++) { - array[i] = value; - } - } - return array; - } - function repeat(ch, length2) { - if (ch.repeat) { - return length2 > 0 ? ch.repeat(length2) : ""; - } - let s = ""; - while (s.length < length2) { - s += ch; - } - return s; - } - } - Debug2.formatControlFlowGraph = formatControlFlowGraph; - })(Debug || (Debug = {})); - } - }); - - // src/compiler/semver.ts - function tryParseComponents(text) { - const match = versionRegExp.exec(text); - if (!match) - return void 0; - const [, major, minor = "0", patch = "0", prerelease = "", build2 = ""] = match; - if (prerelease && !prereleaseRegExp.test(prerelease)) - return void 0; - if (build2 && !buildRegExp.test(build2)) - return void 0; - return { - major: parseInt(major, 10), - minor: parseInt(minor, 10), - patch: parseInt(patch, 10), - prerelease, - build: build2 - }; - } - function comparePrereleaseIdentifiers(left, right) { - if (left === right) - return 0 /* EqualTo */; - if (left.length === 0) - return right.length === 0 ? 0 /* EqualTo */ : 1 /* GreaterThan */; - if (right.length === 0) - return -1 /* LessThan */; - const length2 = Math.min(left.length, right.length); - for (let i = 0; i < length2; i++) { - const leftIdentifier = left[i]; - const rightIdentifier = right[i]; - if (leftIdentifier === rightIdentifier) - continue; - const leftIsNumeric = numericIdentifierRegExp.test(leftIdentifier); - const rightIsNumeric = numericIdentifierRegExp.test(rightIdentifier); - if (leftIsNumeric || rightIsNumeric) { - if (leftIsNumeric !== rightIsNumeric) - return leftIsNumeric ? -1 /* LessThan */ : 1 /* GreaterThan */; - const result = compareValues(+leftIdentifier, +rightIdentifier); - if (result) - return result; - } else { - const result = compareStringsCaseSensitive(leftIdentifier, rightIdentifier); - if (result) - return result; - } - } - return compareValues(left.length, right.length); - } - function parseRange(text) { - const alternatives = []; - for (let range of trimString(text).split(logicalOrRegExp)) { - if (!range) - continue; - const comparators = []; - range = trimString(range); - const match = hyphenRegExp.exec(range); - if (match) { - if (!parseHyphen(match[1], match[2], comparators)) - return void 0; - } else { - for (const simple of range.split(whitespaceRegExp)) { - const match2 = rangeRegExp.exec(trimString(simple)); - if (!match2 || !parseComparator(match2[1], match2[2], comparators)) - return void 0; - } - } - alternatives.push(comparators); - } - return alternatives; - } - function parsePartial(text) { - const match = partialRegExp.exec(text); - if (!match) - return void 0; - const [, major, minor = "*", patch = "*", prerelease, build2] = match; - const version2 = new Version( - isWildcard(major) ? 0 : parseInt(major, 10), - isWildcard(major) || isWildcard(minor) ? 0 : parseInt(minor, 10), - isWildcard(major) || isWildcard(minor) || isWildcard(patch) ? 0 : parseInt(patch, 10), - prerelease, - build2 - ); - return { version: version2, major, minor, patch }; - } - function parseHyphen(left, right, comparators) { - const leftResult = parsePartial(left); - if (!leftResult) - return false; - const rightResult = parsePartial(right); - if (!rightResult) - return false; - if (!isWildcard(leftResult.major)) { - comparators.push(createComparator(">=", leftResult.version)); - } - if (!isWildcard(rightResult.major)) { - comparators.push( - isWildcard(rightResult.minor) ? createComparator("<", rightResult.version.increment("major")) : isWildcard(rightResult.patch) ? createComparator("<", rightResult.version.increment("minor")) : createComparator("<=", rightResult.version) - ); - } - return true; - } - function parseComparator(operator, text, comparators) { - const result = parsePartial(text); - if (!result) - return false; - const { version: version2, major, minor, patch } = result; - if (!isWildcard(major)) { - switch (operator) { - case "~": - comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - isWildcard(minor) ? "major" : "minor" - ))); - break; - case "^": - comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch" - ))); - break; - case "<": - case ">=": - comparators.push( - isWildcard(minor) || isWildcard(patch) ? createComparator(operator, version2.with({ prerelease: "0" })) : createComparator(operator, version2) - ); - break; - case "<=": - case ">": - comparators.push( - isWildcard(minor) ? createComparator(operator === "<=" ? "<" : ">=", version2.increment("major").with({ prerelease: "0" })) : isWildcard(patch) ? createComparator(operator === "<=" ? "<" : ">=", version2.increment("minor").with({ prerelease: "0" })) : createComparator(operator, version2) - ); - break; - case "=": - case void 0: - if (isWildcard(minor) || isWildcard(patch)) { - comparators.push(createComparator(">=", version2.with({ prerelease: "0" }))); - comparators.push(createComparator("<", version2.increment(isWildcard(minor) ? "major" : "minor").with({ prerelease: "0" }))); - } else { - comparators.push(createComparator("=", version2)); - } - break; - default: - return false; - } - } else if (operator === "<" || operator === ">") { - comparators.push(createComparator("<", Version.zero)); - } - return true; - } - function isWildcard(part) { - return part === "*" || part === "x" || part === "X"; - } - function createComparator(operator, operand) { - return { operator, operand }; - } - function testDisjunction(version2, alternatives) { - if (alternatives.length === 0) - return true; - for (const alternative of alternatives) { - if (testAlternative(version2, alternative)) - return true; - } - return false; - } - function testAlternative(version2, comparators) { - for (const comparator of comparators) { - if (!testComparator(version2, comparator.operator, comparator.operand)) - return false; - } - return true; - } - function testComparator(version2, operator, operand) { - const cmp = version2.compareTo(operand); - switch (operator) { - case "<": - return cmp < 0; - case "<=": - return cmp <= 0; - case ">": - return cmp > 0; - case ">=": - return cmp >= 0; - case "=": - return cmp === 0; - default: - return Debug.assertNever(operator); - } - } - function formatDisjunction(alternatives) { - return map(alternatives, formatAlternative).join(" || ") || "*"; - } - function formatAlternative(comparators) { - return map(comparators, formatComparator).join(" "); - } - function formatComparator(comparator) { - return `${comparator.operator}${comparator.operand}`; - } - var versionRegExp, prereleaseRegExp, prereleasePartRegExp, buildRegExp, buildPartRegExp, numericIdentifierRegExp, _Version, Version, VersionRange, logicalOrRegExp, whitespaceRegExp, partialRegExp, hyphenRegExp, rangeRegExp; - var init_semver = __esm({ - "src/compiler/semver.ts"() { - "use strict"; - init_ts2(); - versionRegExp = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; - prereleaseRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)(?:\.(?:0|[1-9]\d*|[a-z-][a-z0-9-]*))*$/i; - prereleasePartRegExp = /^(?:0|[1-9]\d*|[a-z-][a-z0-9-]*)$/i; - buildRegExp = /^[a-z0-9-]+(?:\.[a-z0-9-]+)*$/i; - buildPartRegExp = /^[a-z0-9-]+$/i; - numericIdentifierRegExp = /^(0|[1-9]\d*)$/; - _Version = class _Version { - constructor(major, minor = 0, patch = 0, prerelease = "", build2 = "") { - if (typeof major === "string") { - const result = Debug.checkDefined(tryParseComponents(major), "Invalid version"); - ({ major, minor, patch, prerelease, build: build2 } = result); - } - Debug.assert(major >= 0, "Invalid argument: major"); - Debug.assert(minor >= 0, "Invalid argument: minor"); - Debug.assert(patch >= 0, "Invalid argument: patch"); - const prereleaseArray = prerelease ? isArray(prerelease) ? prerelease : prerelease.split(".") : emptyArray; - const buildArray = build2 ? isArray(build2) ? build2 : build2.split(".") : emptyArray; - Debug.assert(every(prereleaseArray, (s) => prereleasePartRegExp.test(s)), "Invalid argument: prerelease"); - Debug.assert(every(buildArray, (s) => buildPartRegExp.test(s)), "Invalid argument: build"); - this.major = major; - this.minor = minor; - this.patch = patch; - this.prerelease = prereleaseArray; - this.build = buildArray; - } - static tryParse(text) { - const result = tryParseComponents(text); - if (!result) - return void 0; - const { major, minor, patch, prerelease, build: build2 } = result; - return new _Version(major, minor, patch, prerelease, build2); - } - compareTo(other) { - if (this === other) - return 0 /* EqualTo */; - if (other === void 0) - return 1 /* GreaterThan */; - return compareValues(this.major, other.major) || compareValues(this.minor, other.minor) || compareValues(this.patch, other.patch) || comparePrereleaseIdentifiers(this.prerelease, other.prerelease); - } - increment(field) { - switch (field) { - case "major": - return new _Version(this.major + 1, 0, 0); - case "minor": - return new _Version(this.major, this.minor + 1, 0); - case "patch": - return new _Version(this.major, this.minor, this.patch + 1); - default: - return Debug.assertNever(field); - } - } - with(fields) { - const { - major = this.major, - minor = this.minor, - patch = this.patch, - prerelease = this.prerelease, - build: build2 = this.build - } = fields; - return new _Version(major, minor, patch, prerelease, build2); - } - toString() { - let result = `${this.major}.${this.minor}.${this.patch}`; - if (some(this.prerelease)) - result += `-${this.prerelease.join(".")}`; - if (some(this.build)) - result += `+${this.build.join(".")}`; - return result; - } - }; - _Version.zero = new _Version(0, 0, 0, ["0"]); - Version = _Version; - VersionRange = class _VersionRange { - constructor(spec) { - this._alternatives = spec ? Debug.checkDefined(parseRange(spec), "Invalid range spec.") : emptyArray; - } - static tryParse(text) { - const sets = parseRange(text); - if (sets) { - const range = new _VersionRange(""); - range._alternatives = sets; - return range; - } - return void 0; - } - /** - * Tests whether a version matches the range. This is equivalent to `satisfies(version, range, { includePrerelease: true })`. - * in `node-semver`. - */ - test(version2) { - if (typeof version2 === "string") - version2 = new Version(version2); - return testDisjunction(version2, this._alternatives); - } - toString() { - return formatDisjunction(this._alternatives); - } - }; - logicalOrRegExp = /\|\|/g; - whitespaceRegExp = /\s+/g; - partialRegExp = /^([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i; - hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i; - rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i; - } - }); - - // src/compiler/performanceCore.ts - function hasRequiredAPI(performance2, PerformanceObserver2) { - return typeof performance2 === "object" && typeof performance2.timeOrigin === "number" && typeof performance2.mark === "function" && typeof performance2.measure === "function" && typeof performance2.now === "function" && typeof performance2.clearMarks === "function" && typeof performance2.clearMeasures === "function" && typeof PerformanceObserver2 === "function"; - } - function tryGetWebPerformanceHooks() { - if (typeof performance === "object" && typeof PerformanceObserver === "function" && hasRequiredAPI(performance, PerformanceObserver)) { - return { - // For now we always write native performance events when running in the browser. We may - // make this conditional in the future if we find that native web performance hooks - // in the browser also slow down compilation. - shouldWriteNativeEvents: true, - performance, - PerformanceObserver - }; - } - } - function tryGetNodePerformanceHooks() { - if (isNodeLikeSystem()) { - try { - const { performance: performance2, PerformanceObserver: PerformanceObserver2 } = require("perf_hooks"); - if (hasRequiredAPI(performance2, PerformanceObserver2)) { - return { - // By default, only write native events when generating a cpu profile or using the v8 profiler. - shouldWriteNativeEvents: false, - performance: performance2, - PerformanceObserver: PerformanceObserver2 - }; - } - } catch { - } - } - } - function tryGetNativePerformanceHooks() { - return nativePerformanceHooks; - } - var nativePerformanceHooks, nativePerformance, timestamp; - var init_performanceCore = __esm({ - "src/compiler/performanceCore.ts"() { - "use strict"; - init_ts2(); - nativePerformanceHooks = tryGetWebPerformanceHooks() || tryGetNodePerformanceHooks(); - nativePerformance = nativePerformanceHooks == null ? void 0 : nativePerformanceHooks.performance; - timestamp = nativePerformance ? () => nativePerformance.now() : Date.now ? Date.now : () => +/* @__PURE__ */ new Date(); - } - }); - - // src/compiler/perfLogger.ts - var etwModule, perfLogger; - var init_perfLogger = __esm({ - "src/compiler/perfLogger.ts"() { - "use strict"; - try { - const etwModulePath = process.env.TS_ETW_MODULE_PATH ?? "./node_modules/@microsoft/typescript-etw"; - etwModule = require(etwModulePath); - } catch (e) { - etwModule = void 0; - } - perfLogger = (etwModule == null ? void 0 : etwModule.logEvent) ? etwModule : void 0; - } - }); - - // src/compiler/performance.ts - function createTimerIf(condition, measureName, startMarkName, endMarkName) { - return condition ? createTimer(measureName, startMarkName, endMarkName) : nullTimer; - } - function createTimer(measureName, startMarkName, endMarkName) { - let enterCount = 0; - return { - enter, - exit - }; - function enter() { - if (++enterCount === 1) { - mark(startMarkName); - } - } - function exit() { - if (--enterCount === 0) { - mark(endMarkName); - measure(measureName, startMarkName, endMarkName); - } else if (enterCount < 0) { - Debug.fail("enter/exit count does not match."); - } - } - } - function mark(markName) { - if (enabled) { - const count = counts.get(markName) ?? 0; - counts.set(markName, count + 1); - marks.set(markName, timestamp()); - performanceImpl == null ? void 0 : performanceImpl.mark(markName); - if (typeof onProfilerEvent === "function") { - onProfilerEvent(markName); - } - } - } - function measure(measureName, startMarkName, endMarkName) { - if (enabled) { - const end = (endMarkName !== void 0 ? marks.get(endMarkName) : void 0) ?? timestamp(); - const start = (startMarkName !== void 0 ? marks.get(startMarkName) : void 0) ?? timeorigin; - const previousDuration = durations.get(measureName) || 0; - durations.set(measureName, previousDuration + (end - start)); - performanceImpl == null ? void 0 : performanceImpl.measure(measureName, startMarkName, endMarkName); - } - } - function getCount(markName) { - return counts.get(markName) || 0; - } - function getDuration(measureName) { - return durations.get(measureName) || 0; - } - function forEachMeasure(cb) { - durations.forEach((duration, measureName) => cb(measureName, duration)); - } - function forEachMark(cb) { - marks.forEach((_time, markName) => cb(markName)); - } - function clearMeasures(name) { - if (name !== void 0) - durations.delete(name); - else - durations.clear(); - performanceImpl == null ? void 0 : performanceImpl.clearMeasures(name); - } - function clearMarks(name) { - if (name !== void 0) { - counts.delete(name); - marks.delete(name); - } else { - counts.clear(); - marks.clear(); - } - performanceImpl == null ? void 0 : performanceImpl.clearMarks(name); - } - function isEnabled() { - return enabled; - } - function enable(system = sys) { - var _a; - if (!enabled) { - enabled = true; - perfHooks || (perfHooks = tryGetNativePerformanceHooks()); - if (perfHooks) { - timeorigin = perfHooks.performance.timeOrigin; - if (perfHooks.shouldWriteNativeEvents || ((_a = system == null ? void 0 : system.cpuProfilingEnabled) == null ? void 0 : _a.call(system)) || (system == null ? void 0 : system.debugMode)) { - performanceImpl = perfHooks.performance; - } - } - } - return true; - } - function disable() { - if (enabled) { - marks.clear(); - counts.clear(); - durations.clear(); - performanceImpl = void 0; - enabled = false; - } - } - var perfHooks, performanceImpl, nullTimer, enabled, timeorigin, marks, counts, durations; - var init_performance = __esm({ - "src/compiler/performance.ts"() { - "use strict"; - init_ts2(); - nullTimer = { enter: noop, exit: noop }; - enabled = false; - timeorigin = timestamp(); - marks = /* @__PURE__ */ new Map(); - counts = /* @__PURE__ */ new Map(); - durations = /* @__PURE__ */ new Map(); - } - }); - - // src/compiler/_namespaces/ts.performance.ts - var ts_performance_exports = {}; - __export(ts_performance_exports, { - clearMarks: () => clearMarks, - clearMeasures: () => clearMeasures, - createTimer: () => createTimer, - createTimerIf: () => createTimerIf, - disable: () => disable, - enable: () => enable, - forEachMark: () => forEachMark, - forEachMeasure: () => forEachMeasure, - getCount: () => getCount, - getDuration: () => getDuration, - isEnabled: () => isEnabled, - mark: () => mark, - measure: () => measure, - nullTimer: () => nullTimer - }); - var init_ts_performance = __esm({ - "src/compiler/_namespaces/ts.performance.ts"() { - "use strict"; - init_performance(); - } - }); - - // src/compiler/tracing.ts - var tracing, tracingEnabled, startTracing, dumpTracingLegend; - var init_tracing = __esm({ - "src/compiler/tracing.ts"() { - "use strict"; - init_ts2(); - init_ts_performance(); - ((tracingEnabled2) => { - let fs; - let traceCount = 0; - let traceFd = 0; - let mode; - const typeCatalog = []; - let legendPath; - const legend = []; - function startTracing2(tracingMode, traceDir, configFilePath) { - Debug.assert(!tracing, "Tracing already started"); - if (fs === void 0) { - try { - fs = require("fs"); - } catch (e) { - throw new Error(`tracing requires having fs -(original error: ${e.message || e})`); - } - } - mode = tracingMode; - typeCatalog.length = 0; - if (legendPath === void 0) { - legendPath = combinePaths(traceDir, "legend.json"); - } - if (!fs.existsSync(traceDir)) { - fs.mkdirSync(traceDir, { recursive: true }); - } - const countPart = mode === "build" ? `.${process.pid}-${++traceCount}` : mode === "server" ? `.${process.pid}` : ``; - const tracePath = combinePaths(traceDir, `trace${countPart}.json`); - const typesPath = combinePaths(traceDir, `types${countPart}.json`); - legend.push({ - configFilePath, - tracePath, - typesPath - }); - traceFd = fs.openSync(tracePath, "w"); - tracing = tracingEnabled2; - const meta = { cat: "__metadata", ph: "M", ts: 1e3 * timestamp(), pid: 1, tid: 1 }; - fs.writeSync( - traceFd, - "[\n" + [ - { name: "process_name", args: { name: "tsc" }, ...meta }, - { name: "thread_name", args: { name: "Main" }, ...meta }, - { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" } - ].map((v) => JSON.stringify(v)).join(",\n") - ); - } - tracingEnabled2.startTracing = startTracing2; - function stopTracing() { - Debug.assert(tracing, "Tracing is not in progress"); - Debug.assert(!!typeCatalog.length === (mode !== "server")); - fs.writeSync(traceFd, ` -] -`); - fs.closeSync(traceFd); - tracing = void 0; - if (typeCatalog.length) { - dumpTypes(typeCatalog); - } else { - legend[legend.length - 1].typesPath = void 0; - } - } - tracingEnabled2.stopTracing = stopTracing; - function recordType(type) { - if (mode !== "server") { - typeCatalog.push(type); - } - } - tracingEnabled2.recordType = recordType; - let Phase; - ((Phase2) => { - Phase2["Parse"] = "parse"; - Phase2["Program"] = "program"; - Phase2["Bind"] = "bind"; - Phase2["Check"] = "check"; - Phase2["CheckTypes"] = "checkTypes"; - Phase2["Emit"] = "emit"; - Phase2["Session"] = "session"; - })(Phase = tracingEnabled2.Phase || (tracingEnabled2.Phase = {})); - function instant(phase, name, args) { - writeEvent("I", phase, name, args, `"s":"g"`); - } - tracingEnabled2.instant = instant; - const eventStack = []; - function push(phase, name, args, separateBeginAndEnd = false) { - if (separateBeginAndEnd) { - writeEvent("B", phase, name, args); - } - eventStack.push({ phase, name, args, time: 1e3 * timestamp(), separateBeginAndEnd }); - } - tracingEnabled2.push = push; - function pop(results) { - Debug.assert(eventStack.length > 0); - writeStackEvent(eventStack.length - 1, 1e3 * timestamp(), results); - eventStack.length--; - } - tracingEnabled2.pop = pop; - function popAll() { - const endTime = 1e3 * timestamp(); - for (let i = eventStack.length - 1; i >= 0; i--) { - writeStackEvent(i, endTime); - } - eventStack.length = 0; - } - tracingEnabled2.popAll = popAll; - const sampleInterval = 1e3 * 10; - function writeStackEvent(index, endTime, results) { - const { phase, name, args, time, separateBeginAndEnd } = eventStack[index]; - if (separateBeginAndEnd) { - Debug.assert(!results, "`results` are not supported for events with `separateBeginAndEnd`"); - writeEvent( - "E", - phase, - name, - args, - /*extras*/ - void 0, - endTime - ); - } else if (sampleInterval - time % sampleInterval <= endTime - time) { - writeEvent("X", phase, name, { ...args, results }, `"dur":${endTime - time}`, time); - } - } - function writeEvent(eventType, phase, name, args, extras, time = 1e3 * timestamp()) { - if (mode === "server" && phase === "checkTypes" /* CheckTypes */) - return; - mark("beginTracing"); - fs.writeSync(traceFd, `, -{"pid":1,"tid":1,"ph":"${eventType}","cat":"${phase}","ts":${time},"name":"${name}"`); - if (extras) - fs.writeSync(traceFd, `,${extras}`); - if (args) - fs.writeSync(traceFd, `,"args":${JSON.stringify(args)}`); - fs.writeSync(traceFd, `}`); - mark("endTracing"); - measure("Tracing", "beginTracing", "endTracing"); - } - function getLocation(node) { - const file = getSourceFileOfNode(node); - return !file ? void 0 : { - path: file.path, - start: indexFromOne(getLineAndCharacterOfPosition(file, node.pos)), - end: indexFromOne(getLineAndCharacterOfPosition(file, node.end)) - }; - function indexFromOne(lc) { - return { - line: lc.line + 1, - character: lc.character + 1 - }; - } - } - function dumpTypes(types) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s; - mark("beginDumpTypes"); - const typesPath = legend[legend.length - 1].typesPath; - const typesFd = fs.openSync(typesPath, "w"); - const recursionIdentityMap = /* @__PURE__ */ new Map(); - fs.writeSync(typesFd, "["); - const numTypes = types.length; - for (let i = 0; i < numTypes; i++) { - const type = types[i]; - const objectFlags = type.objectFlags; - const symbol = type.aliasSymbol ?? type.symbol; - let display; - if (objectFlags & 16 /* Anonymous */ | type.flags & 2944 /* Literal */) { - try { - display = (_a = type.checker) == null ? void 0 : _a.typeToString(type); - } catch { - display = void 0; - } - } - let indexedAccessProperties = {}; - if (type.flags & 8388608 /* IndexedAccess */) { - const indexedAccessType = type; - indexedAccessProperties = { - indexedAccessObjectType: (_b = indexedAccessType.objectType) == null ? void 0 : _b.id, - indexedAccessIndexType: (_c = indexedAccessType.indexType) == null ? void 0 : _c.id - }; - } - let referenceProperties = {}; - if (objectFlags & 4 /* Reference */) { - const referenceType = type; - referenceProperties = { - instantiatedType: (_d = referenceType.target) == null ? void 0 : _d.id, - typeArguments: (_e = referenceType.resolvedTypeArguments) == null ? void 0 : _e.map((t) => t.id), - referenceLocation: getLocation(referenceType.node) - }; - } - let conditionalProperties = {}; - if (type.flags & 16777216 /* Conditional */) { - const conditionalType = type; - conditionalProperties = { - conditionalCheckType: (_f = conditionalType.checkType) == null ? void 0 : _f.id, - conditionalExtendsType: (_g = conditionalType.extendsType) == null ? void 0 : _g.id, - conditionalTrueType: ((_h = conditionalType.resolvedTrueType) == null ? void 0 : _h.id) ?? -1, - conditionalFalseType: ((_i = conditionalType.resolvedFalseType) == null ? void 0 : _i.id) ?? -1 - }; - } - let substitutionProperties = {}; - if (type.flags & 33554432 /* Substitution */) { - const substitutionType = type; - substitutionProperties = { - substitutionBaseType: (_j = substitutionType.baseType) == null ? void 0 : _j.id, - constraintType: (_k = substitutionType.constraint) == null ? void 0 : _k.id - }; - } - let reverseMappedProperties = {}; - if (objectFlags & 1024 /* ReverseMapped */) { - const reverseMappedType = type; - reverseMappedProperties = { - reverseMappedSourceType: (_l = reverseMappedType.source) == null ? void 0 : _l.id, - reverseMappedMappedType: (_m = reverseMappedType.mappedType) == null ? void 0 : _m.id, - reverseMappedConstraintType: (_n = reverseMappedType.constraintType) == null ? void 0 : _n.id - }; - } - let evolvingArrayProperties = {}; - if (objectFlags & 256 /* EvolvingArray */) { - const evolvingArrayType = type; - evolvingArrayProperties = { - evolvingArrayElementType: evolvingArrayType.elementType.id, - evolvingArrayFinalType: (_o = evolvingArrayType.finalArrayType) == null ? void 0 : _o.id - }; - } - let recursionToken; - const recursionIdentity = type.checker.getRecursionIdentity(type); - if (recursionIdentity) { - recursionToken = recursionIdentityMap.get(recursionIdentity); - if (!recursionToken) { - recursionToken = recursionIdentityMap.size; - recursionIdentityMap.set(recursionIdentity, recursionToken); - } - } - const descriptor = { - id: type.id, - intrinsicName: type.intrinsicName, - symbolName: (symbol == null ? void 0 : symbol.escapedName) && unescapeLeadingUnderscores(symbol.escapedName), - recursionId: recursionToken, - isTuple: objectFlags & 8 /* Tuple */ ? true : void 0, - unionTypes: type.flags & 1048576 /* Union */ ? (_p = type.types) == null ? void 0 : _p.map((t) => t.id) : void 0, - intersectionTypes: type.flags & 2097152 /* Intersection */ ? type.types.map((t) => t.id) : void 0, - aliasTypeArguments: (_q = type.aliasTypeArguments) == null ? void 0 : _q.map((t) => t.id), - keyofType: type.flags & 4194304 /* Index */ ? (_r = type.type) == null ? void 0 : _r.id : void 0, - ...indexedAccessProperties, - ...referenceProperties, - ...conditionalProperties, - ...substitutionProperties, - ...reverseMappedProperties, - ...evolvingArrayProperties, - destructuringPattern: getLocation(type.pattern), - firstDeclaration: getLocation((_s = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _s[0]), - flags: Debug.formatTypeFlags(type.flags).split("|"), - display - }; - fs.writeSync(typesFd, JSON.stringify(descriptor)); - if (i < numTypes - 1) { - fs.writeSync(typesFd, ",\n"); - } - } - fs.writeSync(typesFd, "]\n"); - fs.closeSync(typesFd); - mark("endDumpTypes"); - measure("Dump types", "beginDumpTypes", "endDumpTypes"); - } - function dumpLegend() { - if (!legendPath) { - return; - } - fs.writeFileSync(legendPath, JSON.stringify(legend)); - } - tracingEnabled2.dumpLegend = dumpLegend; - })(tracingEnabled || (tracingEnabled = {})); - startTracing = tracingEnabled.startTracing; - dumpTracingLegend = tracingEnabled.dumpLegend; - } - }); - - // src/compiler/types.ts - function diagnosticCategoryName(d, lowerCase = true) { - const name = DiagnosticCategory[d.category]; - return lowerCase ? name.toLowerCase() : name; - } - var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas; - var init_types = __esm({ - "src/compiler/types.ts"() { - "use strict"; - SyntaxKind = /* @__PURE__ */ ((SyntaxKind5) => { - SyntaxKind5[SyntaxKind5["Unknown"] = 0] = "Unknown"; - SyntaxKind5[SyntaxKind5["EndOfFileToken"] = 1] = "EndOfFileToken"; - SyntaxKind5[SyntaxKind5["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia"; - SyntaxKind5[SyntaxKind5["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia"; - SyntaxKind5[SyntaxKind5["NewLineTrivia"] = 4] = "NewLineTrivia"; - SyntaxKind5[SyntaxKind5["WhitespaceTrivia"] = 5] = "WhitespaceTrivia"; - SyntaxKind5[SyntaxKind5["ShebangTrivia"] = 6] = "ShebangTrivia"; - SyntaxKind5[SyntaxKind5["ConflictMarkerTrivia"] = 7] = "ConflictMarkerTrivia"; - SyntaxKind5[SyntaxKind5["NonTextFileMarkerTrivia"] = 8] = "NonTextFileMarkerTrivia"; - SyntaxKind5[SyntaxKind5["NumericLiteral"] = 9] = "NumericLiteral"; - SyntaxKind5[SyntaxKind5["BigIntLiteral"] = 10] = "BigIntLiteral"; - SyntaxKind5[SyntaxKind5["StringLiteral"] = 11] = "StringLiteral"; - SyntaxKind5[SyntaxKind5["JsxText"] = 12] = "JsxText"; - SyntaxKind5[SyntaxKind5["JsxTextAllWhiteSpaces"] = 13] = "JsxTextAllWhiteSpaces"; - SyntaxKind5[SyntaxKind5["RegularExpressionLiteral"] = 14] = "RegularExpressionLiteral"; - SyntaxKind5[SyntaxKind5["NoSubstitutionTemplateLiteral"] = 15] = "NoSubstitutionTemplateLiteral"; - SyntaxKind5[SyntaxKind5["TemplateHead"] = 16] = "TemplateHead"; - SyntaxKind5[SyntaxKind5["TemplateMiddle"] = 17] = "TemplateMiddle"; - SyntaxKind5[SyntaxKind5["TemplateTail"] = 18] = "TemplateTail"; - SyntaxKind5[SyntaxKind5["OpenBraceToken"] = 19] = "OpenBraceToken"; - SyntaxKind5[SyntaxKind5["CloseBraceToken"] = 20] = "CloseBraceToken"; - SyntaxKind5[SyntaxKind5["OpenParenToken"] = 21] = "OpenParenToken"; - SyntaxKind5[SyntaxKind5["CloseParenToken"] = 22] = "CloseParenToken"; - SyntaxKind5[SyntaxKind5["OpenBracketToken"] = 23] = "OpenBracketToken"; - SyntaxKind5[SyntaxKind5["CloseBracketToken"] = 24] = "CloseBracketToken"; - SyntaxKind5[SyntaxKind5["DotToken"] = 25] = "DotToken"; - SyntaxKind5[SyntaxKind5["DotDotDotToken"] = 26] = "DotDotDotToken"; - SyntaxKind5[SyntaxKind5["SemicolonToken"] = 27] = "SemicolonToken"; - SyntaxKind5[SyntaxKind5["CommaToken"] = 28] = "CommaToken"; - SyntaxKind5[SyntaxKind5["QuestionDotToken"] = 29] = "QuestionDotToken"; - SyntaxKind5[SyntaxKind5["LessThanToken"] = 30] = "LessThanToken"; - SyntaxKind5[SyntaxKind5["LessThanSlashToken"] = 31] = "LessThanSlashToken"; - SyntaxKind5[SyntaxKind5["GreaterThanToken"] = 32] = "GreaterThanToken"; - SyntaxKind5[SyntaxKind5["LessThanEqualsToken"] = 33] = "LessThanEqualsToken"; - SyntaxKind5[SyntaxKind5["GreaterThanEqualsToken"] = 34] = "GreaterThanEqualsToken"; - SyntaxKind5[SyntaxKind5["EqualsEqualsToken"] = 35] = "EqualsEqualsToken"; - SyntaxKind5[SyntaxKind5["ExclamationEqualsToken"] = 36] = "ExclamationEqualsToken"; - SyntaxKind5[SyntaxKind5["EqualsEqualsEqualsToken"] = 37] = "EqualsEqualsEqualsToken"; - SyntaxKind5[SyntaxKind5["ExclamationEqualsEqualsToken"] = 38] = "ExclamationEqualsEqualsToken"; - SyntaxKind5[SyntaxKind5["EqualsGreaterThanToken"] = 39] = "EqualsGreaterThanToken"; - SyntaxKind5[SyntaxKind5["PlusToken"] = 40] = "PlusToken"; - SyntaxKind5[SyntaxKind5["MinusToken"] = 41] = "MinusToken"; - SyntaxKind5[SyntaxKind5["AsteriskToken"] = 42] = "AsteriskToken"; - SyntaxKind5[SyntaxKind5["AsteriskAsteriskToken"] = 43] = "AsteriskAsteriskToken"; - SyntaxKind5[SyntaxKind5["SlashToken"] = 44] = "SlashToken"; - SyntaxKind5[SyntaxKind5["PercentToken"] = 45] = "PercentToken"; - SyntaxKind5[SyntaxKind5["PlusPlusToken"] = 46] = "PlusPlusToken"; - SyntaxKind5[SyntaxKind5["MinusMinusToken"] = 47] = "MinusMinusToken"; - SyntaxKind5[SyntaxKind5["LessThanLessThanToken"] = 48] = "LessThanLessThanToken"; - SyntaxKind5[SyntaxKind5["GreaterThanGreaterThanToken"] = 49] = "GreaterThanGreaterThanToken"; - SyntaxKind5[SyntaxKind5["GreaterThanGreaterThanGreaterThanToken"] = 50] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind5[SyntaxKind5["AmpersandToken"] = 51] = "AmpersandToken"; - SyntaxKind5[SyntaxKind5["BarToken"] = 52] = "BarToken"; - SyntaxKind5[SyntaxKind5["CaretToken"] = 53] = "CaretToken"; - SyntaxKind5[SyntaxKind5["ExclamationToken"] = 54] = "ExclamationToken"; - SyntaxKind5[SyntaxKind5["TildeToken"] = 55] = "TildeToken"; - SyntaxKind5[SyntaxKind5["AmpersandAmpersandToken"] = 56] = "AmpersandAmpersandToken"; - SyntaxKind5[SyntaxKind5["BarBarToken"] = 57] = "BarBarToken"; - SyntaxKind5[SyntaxKind5["QuestionToken"] = 58] = "QuestionToken"; - SyntaxKind5[SyntaxKind5["ColonToken"] = 59] = "ColonToken"; - SyntaxKind5[SyntaxKind5["AtToken"] = 60] = "AtToken"; - SyntaxKind5[SyntaxKind5["QuestionQuestionToken"] = 61] = "QuestionQuestionToken"; - SyntaxKind5[SyntaxKind5["BacktickToken"] = 62] = "BacktickToken"; - SyntaxKind5[SyntaxKind5["HashToken"] = 63] = "HashToken"; - SyntaxKind5[SyntaxKind5["EqualsToken"] = 64] = "EqualsToken"; - SyntaxKind5[SyntaxKind5["PlusEqualsToken"] = 65] = "PlusEqualsToken"; - SyntaxKind5[SyntaxKind5["MinusEqualsToken"] = 66] = "MinusEqualsToken"; - SyntaxKind5[SyntaxKind5["AsteriskEqualsToken"] = 67] = "AsteriskEqualsToken"; - SyntaxKind5[SyntaxKind5["AsteriskAsteriskEqualsToken"] = 68] = "AsteriskAsteriskEqualsToken"; - SyntaxKind5[SyntaxKind5["SlashEqualsToken"] = 69] = "SlashEqualsToken"; - SyntaxKind5[SyntaxKind5["PercentEqualsToken"] = 70] = "PercentEqualsToken"; - SyntaxKind5[SyntaxKind5["LessThanLessThanEqualsToken"] = 71] = "LessThanLessThanEqualsToken"; - SyntaxKind5[SyntaxKind5["GreaterThanGreaterThanEqualsToken"] = 72] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind5[SyntaxKind5["GreaterThanGreaterThanGreaterThanEqualsToken"] = 73] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind5[SyntaxKind5["AmpersandEqualsToken"] = 74] = "AmpersandEqualsToken"; - SyntaxKind5[SyntaxKind5["BarEqualsToken"] = 75] = "BarEqualsToken"; - SyntaxKind5[SyntaxKind5["BarBarEqualsToken"] = 76] = "BarBarEqualsToken"; - SyntaxKind5[SyntaxKind5["AmpersandAmpersandEqualsToken"] = 77] = "AmpersandAmpersandEqualsToken"; - SyntaxKind5[SyntaxKind5["QuestionQuestionEqualsToken"] = 78] = "QuestionQuestionEqualsToken"; - SyntaxKind5[SyntaxKind5["CaretEqualsToken"] = 79] = "CaretEqualsToken"; - SyntaxKind5[SyntaxKind5["Identifier"] = 80] = "Identifier"; - SyntaxKind5[SyntaxKind5["PrivateIdentifier"] = 81] = "PrivateIdentifier"; - SyntaxKind5[SyntaxKind5["JSDocCommentTextToken"] = 82] = "JSDocCommentTextToken"; - SyntaxKind5[SyntaxKind5["BreakKeyword"] = 83] = "BreakKeyword"; - SyntaxKind5[SyntaxKind5["CaseKeyword"] = 84] = "CaseKeyword"; - SyntaxKind5[SyntaxKind5["CatchKeyword"] = 85] = "CatchKeyword"; - SyntaxKind5[SyntaxKind5["ClassKeyword"] = 86] = "ClassKeyword"; - SyntaxKind5[SyntaxKind5["ConstKeyword"] = 87] = "ConstKeyword"; - SyntaxKind5[SyntaxKind5["ContinueKeyword"] = 88] = "ContinueKeyword"; - SyntaxKind5[SyntaxKind5["DebuggerKeyword"] = 89] = "DebuggerKeyword"; - SyntaxKind5[SyntaxKind5["DefaultKeyword"] = 90] = "DefaultKeyword"; - SyntaxKind5[SyntaxKind5["DeleteKeyword"] = 91] = "DeleteKeyword"; - SyntaxKind5[SyntaxKind5["DoKeyword"] = 92] = "DoKeyword"; - SyntaxKind5[SyntaxKind5["ElseKeyword"] = 93] = "ElseKeyword"; - SyntaxKind5[SyntaxKind5["EnumKeyword"] = 94] = "EnumKeyword"; - SyntaxKind5[SyntaxKind5["ExportKeyword"] = 95] = "ExportKeyword"; - SyntaxKind5[SyntaxKind5["ExtendsKeyword"] = 96] = "ExtendsKeyword"; - SyntaxKind5[SyntaxKind5["FalseKeyword"] = 97] = "FalseKeyword"; - SyntaxKind5[SyntaxKind5["FinallyKeyword"] = 98] = "FinallyKeyword"; - SyntaxKind5[SyntaxKind5["ForKeyword"] = 99] = "ForKeyword"; - SyntaxKind5[SyntaxKind5["FunctionKeyword"] = 100] = "FunctionKeyword"; - SyntaxKind5[SyntaxKind5["IfKeyword"] = 101] = "IfKeyword"; - SyntaxKind5[SyntaxKind5["ImportKeyword"] = 102] = "ImportKeyword"; - SyntaxKind5[SyntaxKind5["InKeyword"] = 103] = "InKeyword"; - SyntaxKind5[SyntaxKind5["InstanceOfKeyword"] = 104] = "InstanceOfKeyword"; - SyntaxKind5[SyntaxKind5["NewKeyword"] = 105] = "NewKeyword"; - SyntaxKind5[SyntaxKind5["NullKeyword"] = 106] = "NullKeyword"; - SyntaxKind5[SyntaxKind5["ReturnKeyword"] = 107] = "ReturnKeyword"; - SyntaxKind5[SyntaxKind5["SuperKeyword"] = 108] = "SuperKeyword"; - SyntaxKind5[SyntaxKind5["SwitchKeyword"] = 109] = "SwitchKeyword"; - SyntaxKind5[SyntaxKind5["ThisKeyword"] = 110] = "ThisKeyword"; - SyntaxKind5[SyntaxKind5["ThrowKeyword"] = 111] = "ThrowKeyword"; - SyntaxKind5[SyntaxKind5["TrueKeyword"] = 112] = "TrueKeyword"; - SyntaxKind5[SyntaxKind5["TryKeyword"] = 113] = "TryKeyword"; - SyntaxKind5[SyntaxKind5["TypeOfKeyword"] = 114] = "TypeOfKeyword"; - SyntaxKind5[SyntaxKind5["VarKeyword"] = 115] = "VarKeyword"; - SyntaxKind5[SyntaxKind5["VoidKeyword"] = 116] = "VoidKeyword"; - SyntaxKind5[SyntaxKind5["WhileKeyword"] = 117] = "WhileKeyword"; - SyntaxKind5[SyntaxKind5["WithKeyword"] = 118] = "WithKeyword"; - SyntaxKind5[SyntaxKind5["ImplementsKeyword"] = 119] = "ImplementsKeyword"; - SyntaxKind5[SyntaxKind5["InterfaceKeyword"] = 120] = "InterfaceKeyword"; - SyntaxKind5[SyntaxKind5["LetKeyword"] = 121] = "LetKeyword"; - SyntaxKind5[SyntaxKind5["PackageKeyword"] = 122] = "PackageKeyword"; - SyntaxKind5[SyntaxKind5["PrivateKeyword"] = 123] = "PrivateKeyword"; - SyntaxKind5[SyntaxKind5["ProtectedKeyword"] = 124] = "ProtectedKeyword"; - SyntaxKind5[SyntaxKind5["PublicKeyword"] = 125] = "PublicKeyword"; - SyntaxKind5[SyntaxKind5["StaticKeyword"] = 126] = "StaticKeyword"; - SyntaxKind5[SyntaxKind5["YieldKeyword"] = 127] = "YieldKeyword"; - SyntaxKind5[SyntaxKind5["AbstractKeyword"] = 128] = "AbstractKeyword"; - SyntaxKind5[SyntaxKind5["AccessorKeyword"] = 129] = "AccessorKeyword"; - SyntaxKind5[SyntaxKind5["AsKeyword"] = 130] = "AsKeyword"; - SyntaxKind5[SyntaxKind5["AssertsKeyword"] = 131] = "AssertsKeyword"; - SyntaxKind5[SyntaxKind5["AssertKeyword"] = 132] = "AssertKeyword"; - SyntaxKind5[SyntaxKind5["AnyKeyword"] = 133] = "AnyKeyword"; - SyntaxKind5[SyntaxKind5["AsyncKeyword"] = 134] = "AsyncKeyword"; - SyntaxKind5[SyntaxKind5["AwaitKeyword"] = 135] = "AwaitKeyword"; - SyntaxKind5[SyntaxKind5["BooleanKeyword"] = 136] = "BooleanKeyword"; - SyntaxKind5[SyntaxKind5["ConstructorKeyword"] = 137] = "ConstructorKeyword"; - SyntaxKind5[SyntaxKind5["DeclareKeyword"] = 138] = "DeclareKeyword"; - SyntaxKind5[SyntaxKind5["GetKeyword"] = 139] = "GetKeyword"; - SyntaxKind5[SyntaxKind5["InferKeyword"] = 140] = "InferKeyword"; - SyntaxKind5[SyntaxKind5["IntrinsicKeyword"] = 141] = "IntrinsicKeyword"; - SyntaxKind5[SyntaxKind5["IsKeyword"] = 142] = "IsKeyword"; - SyntaxKind5[SyntaxKind5["KeyOfKeyword"] = 143] = "KeyOfKeyword"; - SyntaxKind5[SyntaxKind5["ModuleKeyword"] = 144] = "ModuleKeyword"; - SyntaxKind5[SyntaxKind5["NamespaceKeyword"] = 145] = "NamespaceKeyword"; - SyntaxKind5[SyntaxKind5["NeverKeyword"] = 146] = "NeverKeyword"; - SyntaxKind5[SyntaxKind5["OutKeyword"] = 147] = "OutKeyword"; - SyntaxKind5[SyntaxKind5["ReadonlyKeyword"] = 148] = "ReadonlyKeyword"; - SyntaxKind5[SyntaxKind5["RequireKeyword"] = 149] = "RequireKeyword"; - SyntaxKind5[SyntaxKind5["NumberKeyword"] = 150] = "NumberKeyword"; - SyntaxKind5[SyntaxKind5["ObjectKeyword"] = 151] = "ObjectKeyword"; - SyntaxKind5[SyntaxKind5["SatisfiesKeyword"] = 152] = "SatisfiesKeyword"; - SyntaxKind5[SyntaxKind5["SetKeyword"] = 153] = "SetKeyword"; - SyntaxKind5[SyntaxKind5["StringKeyword"] = 154] = "StringKeyword"; - SyntaxKind5[SyntaxKind5["SymbolKeyword"] = 155] = "SymbolKeyword"; - SyntaxKind5[SyntaxKind5["TypeKeyword"] = 156] = "TypeKeyword"; - SyntaxKind5[SyntaxKind5["UndefinedKeyword"] = 157] = "UndefinedKeyword"; - SyntaxKind5[SyntaxKind5["UniqueKeyword"] = 158] = "UniqueKeyword"; - SyntaxKind5[SyntaxKind5["UnknownKeyword"] = 159] = "UnknownKeyword"; - SyntaxKind5[SyntaxKind5["UsingKeyword"] = 160] = "UsingKeyword"; - SyntaxKind5[SyntaxKind5["FromKeyword"] = 161] = "FromKeyword"; - SyntaxKind5[SyntaxKind5["GlobalKeyword"] = 162] = "GlobalKeyword"; - SyntaxKind5[SyntaxKind5["BigIntKeyword"] = 163] = "BigIntKeyword"; - SyntaxKind5[SyntaxKind5["OverrideKeyword"] = 164] = "OverrideKeyword"; - SyntaxKind5[SyntaxKind5["OfKeyword"] = 165] = "OfKeyword"; - SyntaxKind5[SyntaxKind5["QualifiedName"] = 166] = "QualifiedName"; - SyntaxKind5[SyntaxKind5["ComputedPropertyName"] = 167] = "ComputedPropertyName"; - SyntaxKind5[SyntaxKind5["TypeParameter"] = 168] = "TypeParameter"; - SyntaxKind5[SyntaxKind5["Parameter"] = 169] = "Parameter"; - SyntaxKind5[SyntaxKind5["Decorator"] = 170] = "Decorator"; - SyntaxKind5[SyntaxKind5["PropertySignature"] = 171] = "PropertySignature"; - SyntaxKind5[SyntaxKind5["PropertyDeclaration"] = 172] = "PropertyDeclaration"; - SyntaxKind5[SyntaxKind5["MethodSignature"] = 173] = "MethodSignature"; - SyntaxKind5[SyntaxKind5["MethodDeclaration"] = 174] = "MethodDeclaration"; - SyntaxKind5[SyntaxKind5["ClassStaticBlockDeclaration"] = 175] = "ClassStaticBlockDeclaration"; - SyntaxKind5[SyntaxKind5["Constructor"] = 176] = "Constructor"; - SyntaxKind5[SyntaxKind5["GetAccessor"] = 177] = "GetAccessor"; - SyntaxKind5[SyntaxKind5["SetAccessor"] = 178] = "SetAccessor"; - SyntaxKind5[SyntaxKind5["CallSignature"] = 179] = "CallSignature"; - SyntaxKind5[SyntaxKind5["ConstructSignature"] = 180] = "ConstructSignature"; - SyntaxKind5[SyntaxKind5["IndexSignature"] = 181] = "IndexSignature"; - SyntaxKind5[SyntaxKind5["TypePredicate"] = 182] = "TypePredicate"; - SyntaxKind5[SyntaxKind5["TypeReference"] = 183] = "TypeReference"; - SyntaxKind5[SyntaxKind5["FunctionType"] = 184] = "FunctionType"; - SyntaxKind5[SyntaxKind5["ConstructorType"] = 185] = "ConstructorType"; - SyntaxKind5[SyntaxKind5["TypeQuery"] = 186] = "TypeQuery"; - SyntaxKind5[SyntaxKind5["TypeLiteral"] = 187] = "TypeLiteral"; - SyntaxKind5[SyntaxKind5["ArrayType"] = 188] = "ArrayType"; - SyntaxKind5[SyntaxKind5["TupleType"] = 189] = "TupleType"; - SyntaxKind5[SyntaxKind5["OptionalType"] = 190] = "OptionalType"; - SyntaxKind5[SyntaxKind5["RestType"] = 191] = "RestType"; - SyntaxKind5[SyntaxKind5["UnionType"] = 192] = "UnionType"; - SyntaxKind5[SyntaxKind5["IntersectionType"] = 193] = "IntersectionType"; - SyntaxKind5[SyntaxKind5["ConditionalType"] = 194] = "ConditionalType"; - SyntaxKind5[SyntaxKind5["InferType"] = 195] = "InferType"; - SyntaxKind5[SyntaxKind5["ParenthesizedType"] = 196] = "ParenthesizedType"; - SyntaxKind5[SyntaxKind5["ThisType"] = 197] = "ThisType"; - SyntaxKind5[SyntaxKind5["TypeOperator"] = 198] = "TypeOperator"; - SyntaxKind5[SyntaxKind5["IndexedAccessType"] = 199] = "IndexedAccessType"; - SyntaxKind5[SyntaxKind5["MappedType"] = 200] = "MappedType"; - SyntaxKind5[SyntaxKind5["LiteralType"] = 201] = "LiteralType"; - SyntaxKind5[SyntaxKind5["NamedTupleMember"] = 202] = "NamedTupleMember"; - SyntaxKind5[SyntaxKind5["TemplateLiteralType"] = 203] = "TemplateLiteralType"; - SyntaxKind5[SyntaxKind5["TemplateLiteralTypeSpan"] = 204] = "TemplateLiteralTypeSpan"; - SyntaxKind5[SyntaxKind5["ImportType"] = 205] = "ImportType"; - SyntaxKind5[SyntaxKind5["ObjectBindingPattern"] = 206] = "ObjectBindingPattern"; - SyntaxKind5[SyntaxKind5["ArrayBindingPattern"] = 207] = "ArrayBindingPattern"; - SyntaxKind5[SyntaxKind5["BindingElement"] = 208] = "BindingElement"; - SyntaxKind5[SyntaxKind5["ArrayLiteralExpression"] = 209] = "ArrayLiteralExpression"; - SyntaxKind5[SyntaxKind5["ObjectLiteralExpression"] = 210] = "ObjectLiteralExpression"; - SyntaxKind5[SyntaxKind5["PropertyAccessExpression"] = 211] = "PropertyAccessExpression"; - SyntaxKind5[SyntaxKind5["ElementAccessExpression"] = 212] = "ElementAccessExpression"; - SyntaxKind5[SyntaxKind5["CallExpression"] = 213] = "CallExpression"; - SyntaxKind5[SyntaxKind5["NewExpression"] = 214] = "NewExpression"; - SyntaxKind5[SyntaxKind5["TaggedTemplateExpression"] = 215] = "TaggedTemplateExpression"; - SyntaxKind5[SyntaxKind5["TypeAssertionExpression"] = 216] = "TypeAssertionExpression"; - SyntaxKind5[SyntaxKind5["ParenthesizedExpression"] = 217] = "ParenthesizedExpression"; - SyntaxKind5[SyntaxKind5["FunctionExpression"] = 218] = "FunctionExpression"; - SyntaxKind5[SyntaxKind5["ArrowFunction"] = 219] = "ArrowFunction"; - SyntaxKind5[SyntaxKind5["DeleteExpression"] = 220] = "DeleteExpression"; - SyntaxKind5[SyntaxKind5["TypeOfExpression"] = 221] = "TypeOfExpression"; - SyntaxKind5[SyntaxKind5["VoidExpression"] = 222] = "VoidExpression"; - SyntaxKind5[SyntaxKind5["AwaitExpression"] = 223] = "AwaitExpression"; - SyntaxKind5[SyntaxKind5["PrefixUnaryExpression"] = 224] = "PrefixUnaryExpression"; - SyntaxKind5[SyntaxKind5["PostfixUnaryExpression"] = 225] = "PostfixUnaryExpression"; - SyntaxKind5[SyntaxKind5["BinaryExpression"] = 226] = "BinaryExpression"; - SyntaxKind5[SyntaxKind5["ConditionalExpression"] = 227] = "ConditionalExpression"; - SyntaxKind5[SyntaxKind5["TemplateExpression"] = 228] = "TemplateExpression"; - SyntaxKind5[SyntaxKind5["YieldExpression"] = 229] = "YieldExpression"; - SyntaxKind5[SyntaxKind5["SpreadElement"] = 230] = "SpreadElement"; - SyntaxKind5[SyntaxKind5["ClassExpression"] = 231] = "ClassExpression"; - SyntaxKind5[SyntaxKind5["OmittedExpression"] = 232] = "OmittedExpression"; - SyntaxKind5[SyntaxKind5["ExpressionWithTypeArguments"] = 233] = "ExpressionWithTypeArguments"; - SyntaxKind5[SyntaxKind5["AsExpression"] = 234] = "AsExpression"; - SyntaxKind5[SyntaxKind5["NonNullExpression"] = 235] = "NonNullExpression"; - SyntaxKind5[SyntaxKind5["MetaProperty"] = 236] = "MetaProperty"; - SyntaxKind5[SyntaxKind5["SyntheticExpression"] = 237] = "SyntheticExpression"; - SyntaxKind5[SyntaxKind5["SatisfiesExpression"] = 238] = "SatisfiesExpression"; - SyntaxKind5[SyntaxKind5["TemplateSpan"] = 239] = "TemplateSpan"; - SyntaxKind5[SyntaxKind5["SemicolonClassElement"] = 240] = "SemicolonClassElement"; - SyntaxKind5[SyntaxKind5["Block"] = 241] = "Block"; - SyntaxKind5[SyntaxKind5["EmptyStatement"] = 242] = "EmptyStatement"; - SyntaxKind5[SyntaxKind5["VariableStatement"] = 243] = "VariableStatement"; - SyntaxKind5[SyntaxKind5["ExpressionStatement"] = 244] = "ExpressionStatement"; - SyntaxKind5[SyntaxKind5["IfStatement"] = 245] = "IfStatement"; - SyntaxKind5[SyntaxKind5["DoStatement"] = 246] = "DoStatement"; - SyntaxKind5[SyntaxKind5["WhileStatement"] = 247] = "WhileStatement"; - SyntaxKind5[SyntaxKind5["ForStatement"] = 248] = "ForStatement"; - SyntaxKind5[SyntaxKind5["ForInStatement"] = 249] = "ForInStatement"; - SyntaxKind5[SyntaxKind5["ForOfStatement"] = 250] = "ForOfStatement"; - SyntaxKind5[SyntaxKind5["ContinueStatement"] = 251] = "ContinueStatement"; - SyntaxKind5[SyntaxKind5["BreakStatement"] = 252] = "BreakStatement"; - SyntaxKind5[SyntaxKind5["ReturnStatement"] = 253] = "ReturnStatement"; - SyntaxKind5[SyntaxKind5["WithStatement"] = 254] = "WithStatement"; - SyntaxKind5[SyntaxKind5["SwitchStatement"] = 255] = "SwitchStatement"; - SyntaxKind5[SyntaxKind5["LabeledStatement"] = 256] = "LabeledStatement"; - SyntaxKind5[SyntaxKind5["ThrowStatement"] = 257] = "ThrowStatement"; - SyntaxKind5[SyntaxKind5["TryStatement"] = 258] = "TryStatement"; - SyntaxKind5[SyntaxKind5["DebuggerStatement"] = 259] = "DebuggerStatement"; - SyntaxKind5[SyntaxKind5["VariableDeclaration"] = 260] = "VariableDeclaration"; - SyntaxKind5[SyntaxKind5["VariableDeclarationList"] = 261] = "VariableDeclarationList"; - SyntaxKind5[SyntaxKind5["FunctionDeclaration"] = 262] = "FunctionDeclaration"; - SyntaxKind5[SyntaxKind5["ClassDeclaration"] = 263] = "ClassDeclaration"; - SyntaxKind5[SyntaxKind5["InterfaceDeclaration"] = 264] = "InterfaceDeclaration"; - SyntaxKind5[SyntaxKind5["TypeAliasDeclaration"] = 265] = "TypeAliasDeclaration"; - SyntaxKind5[SyntaxKind5["EnumDeclaration"] = 266] = "EnumDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleDeclaration"] = 267] = "ModuleDeclaration"; - SyntaxKind5[SyntaxKind5["ModuleBlock"] = 268] = "ModuleBlock"; - SyntaxKind5[SyntaxKind5["CaseBlock"] = 269] = "CaseBlock"; - SyntaxKind5[SyntaxKind5["NamespaceExportDeclaration"] = 270] = "NamespaceExportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportEqualsDeclaration"] = 271] = "ImportEqualsDeclaration"; - SyntaxKind5[SyntaxKind5["ImportDeclaration"] = 272] = "ImportDeclaration"; - SyntaxKind5[SyntaxKind5["ImportClause"] = 273] = "ImportClause"; - SyntaxKind5[SyntaxKind5["NamespaceImport"] = 274] = "NamespaceImport"; - SyntaxKind5[SyntaxKind5["NamedImports"] = 275] = "NamedImports"; - SyntaxKind5[SyntaxKind5["ImportSpecifier"] = 276] = "ImportSpecifier"; - SyntaxKind5[SyntaxKind5["ExportAssignment"] = 277] = "ExportAssignment"; - SyntaxKind5[SyntaxKind5["ExportDeclaration"] = 278] = "ExportDeclaration"; - SyntaxKind5[SyntaxKind5["NamedExports"] = 279] = "NamedExports"; - SyntaxKind5[SyntaxKind5["NamespaceExport"] = 280] = "NamespaceExport"; - SyntaxKind5[SyntaxKind5["ExportSpecifier"] = 281] = "ExportSpecifier"; - SyntaxKind5[SyntaxKind5["MissingDeclaration"] = 282] = "MissingDeclaration"; - SyntaxKind5[SyntaxKind5["ExternalModuleReference"] = 283] = "ExternalModuleReference"; - SyntaxKind5[SyntaxKind5["JsxElement"] = 284] = "JsxElement"; - SyntaxKind5[SyntaxKind5["JsxSelfClosingElement"] = 285] = "JsxSelfClosingElement"; - SyntaxKind5[SyntaxKind5["JsxOpeningElement"] = 286] = "JsxOpeningElement"; - SyntaxKind5[SyntaxKind5["JsxClosingElement"] = 287] = "JsxClosingElement"; - SyntaxKind5[SyntaxKind5["JsxFragment"] = 288] = "JsxFragment"; - SyntaxKind5[SyntaxKind5["JsxOpeningFragment"] = 289] = "JsxOpeningFragment"; - SyntaxKind5[SyntaxKind5["JsxClosingFragment"] = 290] = "JsxClosingFragment"; - SyntaxKind5[SyntaxKind5["JsxAttribute"] = 291] = "JsxAttribute"; - SyntaxKind5[SyntaxKind5["JsxAttributes"] = 292] = "JsxAttributes"; - SyntaxKind5[SyntaxKind5["JsxSpreadAttribute"] = 293] = "JsxSpreadAttribute"; - SyntaxKind5[SyntaxKind5["JsxExpression"] = 294] = "JsxExpression"; - SyntaxKind5[SyntaxKind5["JsxNamespacedName"] = 295] = "JsxNamespacedName"; - SyntaxKind5[SyntaxKind5["CaseClause"] = 296] = "CaseClause"; - SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause"; - SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause"; - SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 300] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 301] = "AssertEntry"; - SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; - SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment"; - SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; - SyntaxKind5[SyntaxKind5["SpreadAssignment"] = 305] = "SpreadAssignment"; - SyntaxKind5[SyntaxKind5["EnumMember"] = 306] = "EnumMember"; - SyntaxKind5[SyntaxKind5["UnparsedPrologue"] = 307] = "UnparsedPrologue"; - SyntaxKind5[SyntaxKind5["UnparsedPrepend"] = 308] = "UnparsedPrepend"; - SyntaxKind5[SyntaxKind5["UnparsedText"] = 309] = "UnparsedText"; - SyntaxKind5[SyntaxKind5["UnparsedInternalText"] = 310] = "UnparsedInternalText"; - SyntaxKind5[SyntaxKind5["UnparsedSyntheticReference"] = 311] = "UnparsedSyntheticReference"; - SyntaxKind5[SyntaxKind5["SourceFile"] = 312] = "SourceFile"; - SyntaxKind5[SyntaxKind5["Bundle"] = 313] = "Bundle"; - SyntaxKind5[SyntaxKind5["UnparsedSource"] = 314] = "UnparsedSource"; - SyntaxKind5[SyntaxKind5["InputFiles"] = 315] = "InputFiles"; - SyntaxKind5[SyntaxKind5["JSDocTypeExpression"] = 316] = "JSDocTypeExpression"; - SyntaxKind5[SyntaxKind5["JSDocNameReference"] = 317] = "JSDocNameReference"; - SyntaxKind5[SyntaxKind5["JSDocMemberName"] = 318] = "JSDocMemberName"; - SyntaxKind5[SyntaxKind5["JSDocAllType"] = 319] = "JSDocAllType"; - SyntaxKind5[SyntaxKind5["JSDocUnknownType"] = 320] = "JSDocUnknownType"; - SyntaxKind5[SyntaxKind5["JSDocNullableType"] = 321] = "JSDocNullableType"; - SyntaxKind5[SyntaxKind5["JSDocNonNullableType"] = 322] = "JSDocNonNullableType"; - SyntaxKind5[SyntaxKind5["JSDocOptionalType"] = 323] = "JSDocOptionalType"; - SyntaxKind5[SyntaxKind5["JSDocFunctionType"] = 324] = "JSDocFunctionType"; - SyntaxKind5[SyntaxKind5["JSDocVariadicType"] = 325] = "JSDocVariadicType"; - SyntaxKind5[SyntaxKind5["JSDocNamepathType"] = 326] = "JSDocNamepathType"; - SyntaxKind5[SyntaxKind5["JSDoc"] = 327] = "JSDoc"; - SyntaxKind5[SyntaxKind5["JSDocComment"] = 327 /* JSDoc */] = "JSDocComment"; - SyntaxKind5[SyntaxKind5["JSDocText"] = 328] = "JSDocText"; - SyntaxKind5[SyntaxKind5["JSDocTypeLiteral"] = 329] = "JSDocTypeLiteral"; - SyntaxKind5[SyntaxKind5["JSDocSignature"] = 330] = "JSDocSignature"; - SyntaxKind5[SyntaxKind5["JSDocLink"] = 331] = "JSDocLink"; - SyntaxKind5[SyntaxKind5["JSDocLinkCode"] = 332] = "JSDocLinkCode"; - SyntaxKind5[SyntaxKind5["JSDocLinkPlain"] = 333] = "JSDocLinkPlain"; - SyntaxKind5[SyntaxKind5["JSDocTag"] = 334] = "JSDocTag"; - SyntaxKind5[SyntaxKind5["JSDocAugmentsTag"] = 335] = "JSDocAugmentsTag"; - SyntaxKind5[SyntaxKind5["JSDocImplementsTag"] = 336] = "JSDocImplementsTag"; - SyntaxKind5[SyntaxKind5["JSDocAuthorTag"] = 337] = "JSDocAuthorTag"; - SyntaxKind5[SyntaxKind5["JSDocDeprecatedTag"] = 338] = "JSDocDeprecatedTag"; - SyntaxKind5[SyntaxKind5["JSDocClassTag"] = 339] = "JSDocClassTag"; - SyntaxKind5[SyntaxKind5["JSDocPublicTag"] = 340] = "JSDocPublicTag"; - SyntaxKind5[SyntaxKind5["JSDocPrivateTag"] = 341] = "JSDocPrivateTag"; - SyntaxKind5[SyntaxKind5["JSDocProtectedTag"] = 342] = "JSDocProtectedTag"; - SyntaxKind5[SyntaxKind5["JSDocReadonlyTag"] = 343] = "JSDocReadonlyTag"; - SyntaxKind5[SyntaxKind5["JSDocOverrideTag"] = 344] = "JSDocOverrideTag"; - SyntaxKind5[SyntaxKind5["JSDocCallbackTag"] = 345] = "JSDocCallbackTag"; - SyntaxKind5[SyntaxKind5["JSDocOverloadTag"] = 346] = "JSDocOverloadTag"; - SyntaxKind5[SyntaxKind5["JSDocEnumTag"] = 347] = "JSDocEnumTag"; - SyntaxKind5[SyntaxKind5["JSDocParameterTag"] = 348] = "JSDocParameterTag"; - SyntaxKind5[SyntaxKind5["JSDocReturnTag"] = 349] = "JSDocReturnTag"; - SyntaxKind5[SyntaxKind5["JSDocThisTag"] = 350] = "JSDocThisTag"; - SyntaxKind5[SyntaxKind5["JSDocTypeTag"] = 351] = "JSDocTypeTag"; - SyntaxKind5[SyntaxKind5["JSDocTemplateTag"] = 352] = "JSDocTemplateTag"; - SyntaxKind5[SyntaxKind5["JSDocTypedefTag"] = 353] = "JSDocTypedefTag"; - SyntaxKind5[SyntaxKind5["JSDocSeeTag"] = 354] = "JSDocSeeTag"; - SyntaxKind5[SyntaxKind5["JSDocPropertyTag"] = 355] = "JSDocPropertyTag"; - SyntaxKind5[SyntaxKind5["JSDocThrowsTag"] = 356] = "JSDocThrowsTag"; - SyntaxKind5[SyntaxKind5["JSDocSatisfiesTag"] = 357] = "JSDocSatisfiesTag"; - SyntaxKind5[SyntaxKind5["SyntaxList"] = 358] = "SyntaxList"; - SyntaxKind5[SyntaxKind5["NotEmittedStatement"] = 359] = "NotEmittedStatement"; - SyntaxKind5[SyntaxKind5["PartiallyEmittedExpression"] = 360] = "PartiallyEmittedExpression"; - SyntaxKind5[SyntaxKind5["CommaListExpression"] = 361] = "CommaListExpression"; - SyntaxKind5[SyntaxKind5["SyntheticReferenceExpression"] = 362] = "SyntheticReferenceExpression"; - SyntaxKind5[SyntaxKind5["Count"] = 363] = "Count"; - SyntaxKind5[SyntaxKind5["FirstAssignment"] = 64 /* EqualsToken */] = "FirstAssignment"; - SyntaxKind5[SyntaxKind5["LastAssignment"] = 79 /* CaretEqualsToken */] = "LastAssignment"; - SyntaxKind5[SyntaxKind5["FirstCompoundAssignment"] = 65 /* PlusEqualsToken */] = "FirstCompoundAssignment"; - SyntaxKind5[SyntaxKind5["LastCompoundAssignment"] = 79 /* CaretEqualsToken */] = "LastCompoundAssignment"; - SyntaxKind5[SyntaxKind5["FirstReservedWord"] = 83 /* BreakKeyword */] = "FirstReservedWord"; - SyntaxKind5[SyntaxKind5["LastReservedWord"] = 118 /* WithKeyword */] = "LastReservedWord"; - SyntaxKind5[SyntaxKind5["FirstKeyword"] = 83 /* BreakKeyword */] = "FirstKeyword"; - SyntaxKind5[SyntaxKind5["LastKeyword"] = 165 /* OfKeyword */] = "LastKeyword"; - SyntaxKind5[SyntaxKind5["FirstFutureReservedWord"] = 119 /* ImplementsKeyword */] = "FirstFutureReservedWord"; - SyntaxKind5[SyntaxKind5["LastFutureReservedWord"] = 127 /* YieldKeyword */] = "LastFutureReservedWord"; - SyntaxKind5[SyntaxKind5["FirstTypeNode"] = 182 /* TypePredicate */] = "FirstTypeNode"; - SyntaxKind5[SyntaxKind5["LastTypeNode"] = 205 /* ImportType */] = "LastTypeNode"; - SyntaxKind5[SyntaxKind5["FirstPunctuation"] = 19 /* OpenBraceToken */] = "FirstPunctuation"; - SyntaxKind5[SyntaxKind5["LastPunctuation"] = 79 /* CaretEqualsToken */] = "LastPunctuation"; - SyntaxKind5[SyntaxKind5["FirstToken"] = 0 /* Unknown */] = "FirstToken"; - SyntaxKind5[SyntaxKind5["LastToken"] = 165 /* LastKeyword */] = "LastToken"; - SyntaxKind5[SyntaxKind5["FirstTriviaToken"] = 2 /* SingleLineCommentTrivia */] = "FirstTriviaToken"; - SyntaxKind5[SyntaxKind5["LastTriviaToken"] = 7 /* ConflictMarkerTrivia */] = "LastTriviaToken"; - SyntaxKind5[SyntaxKind5["FirstLiteralToken"] = 9 /* NumericLiteral */] = "FirstLiteralToken"; - SyntaxKind5[SyntaxKind5["LastLiteralToken"] = 15 /* NoSubstitutionTemplateLiteral */] = "LastLiteralToken"; - SyntaxKind5[SyntaxKind5["FirstTemplateToken"] = 15 /* NoSubstitutionTemplateLiteral */] = "FirstTemplateToken"; - SyntaxKind5[SyntaxKind5["LastTemplateToken"] = 18 /* TemplateTail */] = "LastTemplateToken"; - SyntaxKind5[SyntaxKind5["FirstBinaryOperator"] = 30 /* LessThanToken */] = "FirstBinaryOperator"; - SyntaxKind5[SyntaxKind5["LastBinaryOperator"] = 79 /* CaretEqualsToken */] = "LastBinaryOperator"; - SyntaxKind5[SyntaxKind5["FirstStatement"] = 243 /* VariableStatement */] = "FirstStatement"; - SyntaxKind5[SyntaxKind5["LastStatement"] = 259 /* DebuggerStatement */] = "LastStatement"; - SyntaxKind5[SyntaxKind5["FirstNode"] = 166 /* QualifiedName */] = "FirstNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocNode"] = 316 /* JSDocTypeExpression */] = "FirstJSDocNode"; - SyntaxKind5[SyntaxKind5["LastJSDocNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocNode"; - SyntaxKind5[SyntaxKind5["FirstJSDocTagNode"] = 334 /* JSDocTag */] = "FirstJSDocTagNode"; - SyntaxKind5[SyntaxKind5["LastJSDocTagNode"] = 357 /* JSDocSatisfiesTag */] = "LastJSDocTagNode"; - SyntaxKind5[SyntaxKind5["FirstContextualKeyword"] = 128 /* AbstractKeyword */] = "FirstContextualKeyword"; - SyntaxKind5[SyntaxKind5["LastContextualKeyword"] = 165 /* OfKeyword */] = "LastContextualKeyword"; - return SyntaxKind5; - })(SyntaxKind || {}); - NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { - NodeFlags3[NodeFlags3["None"] = 0] = "None"; - NodeFlags3[NodeFlags3["Let"] = 1] = "Let"; - NodeFlags3[NodeFlags3["Const"] = 2] = "Const"; - NodeFlags3[NodeFlags3["Using"] = 4] = "Using"; - NodeFlags3[NodeFlags3["AwaitUsing"] = 6] = "AwaitUsing"; - NodeFlags3[NodeFlags3["NestedNamespace"] = 8] = "NestedNamespace"; - NodeFlags3[NodeFlags3["Synthesized"] = 16] = "Synthesized"; - NodeFlags3[NodeFlags3["Namespace"] = 32] = "Namespace"; - NodeFlags3[NodeFlags3["OptionalChain"] = 64] = "OptionalChain"; - NodeFlags3[NodeFlags3["ExportContext"] = 128] = "ExportContext"; - NodeFlags3[NodeFlags3["ContainsThis"] = 256] = "ContainsThis"; - NodeFlags3[NodeFlags3["HasImplicitReturn"] = 512] = "HasImplicitReturn"; - NodeFlags3[NodeFlags3["HasExplicitReturn"] = 1024] = "HasExplicitReturn"; - NodeFlags3[NodeFlags3["GlobalAugmentation"] = 2048] = "GlobalAugmentation"; - NodeFlags3[NodeFlags3["HasAsyncFunctions"] = 4096] = "HasAsyncFunctions"; - NodeFlags3[NodeFlags3["DisallowInContext"] = 8192] = "DisallowInContext"; - NodeFlags3[NodeFlags3["YieldContext"] = 16384] = "YieldContext"; - NodeFlags3[NodeFlags3["DecoratorContext"] = 32768] = "DecoratorContext"; - NodeFlags3[NodeFlags3["AwaitContext"] = 65536] = "AwaitContext"; - NodeFlags3[NodeFlags3["DisallowConditionalTypesContext"] = 131072] = "DisallowConditionalTypesContext"; - NodeFlags3[NodeFlags3["ThisNodeHasError"] = 262144] = "ThisNodeHasError"; - NodeFlags3[NodeFlags3["JavaScriptFile"] = 524288] = "JavaScriptFile"; - NodeFlags3[NodeFlags3["ThisNodeOrAnySubNodesHasError"] = 1048576] = "ThisNodeOrAnySubNodesHasError"; - NodeFlags3[NodeFlags3["HasAggregatedChildData"] = 2097152] = "HasAggregatedChildData"; - NodeFlags3[NodeFlags3["PossiblyContainsDynamicImport"] = 4194304] = "PossiblyContainsDynamicImport"; - NodeFlags3[NodeFlags3["PossiblyContainsImportMeta"] = 8388608] = "PossiblyContainsImportMeta"; - NodeFlags3[NodeFlags3["JSDoc"] = 16777216] = "JSDoc"; - NodeFlags3[NodeFlags3["Ambient"] = 33554432] = "Ambient"; - NodeFlags3[NodeFlags3["InWithStatement"] = 67108864] = "InWithStatement"; - NodeFlags3[NodeFlags3["JsonFile"] = 134217728] = "JsonFile"; - NodeFlags3[NodeFlags3["TypeCached"] = 268435456] = "TypeCached"; - NodeFlags3[NodeFlags3["Deprecated"] = 536870912] = "Deprecated"; - NodeFlags3[NodeFlags3["BlockScoped"] = 7] = "BlockScoped"; - NodeFlags3[NodeFlags3["Constant"] = 6] = "Constant"; - NodeFlags3[NodeFlags3["ReachabilityCheckFlags"] = 1536] = "ReachabilityCheckFlags"; - NodeFlags3[NodeFlags3["ReachabilityAndEmitFlags"] = 5632] = "ReachabilityAndEmitFlags"; - NodeFlags3[NodeFlags3["ContextFlags"] = 101441536] = "ContextFlags"; - NodeFlags3[NodeFlags3["TypeExcludesFlags"] = 81920] = "TypeExcludesFlags"; - NodeFlags3[NodeFlags3["PermanentlySetIncrementalFlags"] = 12582912] = "PermanentlySetIncrementalFlags"; - NodeFlags3[NodeFlags3["IdentifierHasExtendedUnicodeEscape"] = 256 /* ContainsThis */] = "IdentifierHasExtendedUnicodeEscape"; - NodeFlags3[NodeFlags3["IdentifierIsInJSDocNamespace"] = 4096 /* HasAsyncFunctions */] = "IdentifierIsInJSDocNamespace"; - return NodeFlags3; - })(NodeFlags || {}); - ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { - ModifierFlags3[ModifierFlags3["None"] = 0] = "None"; - ModifierFlags3[ModifierFlags3["Export"] = 1] = "Export"; - ModifierFlags3[ModifierFlags3["Ambient"] = 2] = "Ambient"; - ModifierFlags3[ModifierFlags3["Public"] = 4] = "Public"; - ModifierFlags3[ModifierFlags3["Private"] = 8] = "Private"; - ModifierFlags3[ModifierFlags3["Protected"] = 16] = "Protected"; - ModifierFlags3[ModifierFlags3["Static"] = 32] = "Static"; - ModifierFlags3[ModifierFlags3["Readonly"] = 64] = "Readonly"; - ModifierFlags3[ModifierFlags3["Accessor"] = 128] = "Accessor"; - ModifierFlags3[ModifierFlags3["Abstract"] = 256] = "Abstract"; - ModifierFlags3[ModifierFlags3["Async"] = 512] = "Async"; - ModifierFlags3[ModifierFlags3["Default"] = 1024] = "Default"; - ModifierFlags3[ModifierFlags3["Const"] = 2048] = "Const"; - ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 4096] = "HasComputedJSDocModifiers"; - ModifierFlags3[ModifierFlags3["Deprecated"] = 8192] = "Deprecated"; - ModifierFlags3[ModifierFlags3["Override"] = 16384] = "Override"; - ModifierFlags3[ModifierFlags3["In"] = 32768] = "In"; - ModifierFlags3[ModifierFlags3["Out"] = 65536] = "Out"; - ModifierFlags3[ModifierFlags3["Decorator"] = 131072] = "Decorator"; - ModifierFlags3[ModifierFlags3["HasComputedFlags"] = 536870912] = "HasComputedFlags"; - ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 28] = "AccessibilityModifier"; - ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 16476] = "ParameterPropertyModifier"; - ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 24] = "NonPublicAccessibilityModifier"; - ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 117086] = "TypeScriptModifier"; - ModifierFlags3[ModifierFlags3["ExportDefault"] = 1025] = "ExportDefault"; - ModifierFlags3[ModifierFlags3["All"] = 258047] = "All"; - ModifierFlags3[ModifierFlags3["Modifier"] = 126975] = "Modifier"; - return ModifierFlags3; - })(ModifierFlags || {}); - JsxFlags = /* @__PURE__ */ ((JsxFlags2) => { - JsxFlags2[JsxFlags2["None"] = 0] = "None"; - JsxFlags2[JsxFlags2["IntrinsicNamedElement"] = 1] = "IntrinsicNamedElement"; - JsxFlags2[JsxFlags2["IntrinsicIndexedElement"] = 2] = "IntrinsicIndexedElement"; - JsxFlags2[JsxFlags2["IntrinsicElement"] = 3] = "IntrinsicElement"; - return JsxFlags2; - })(JsxFlags || {}); - RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => { - RelationComparisonResult3[RelationComparisonResult3["Succeeded"] = 1] = "Succeeded"; - RelationComparisonResult3[RelationComparisonResult3["Failed"] = 2] = "Failed"; - RelationComparisonResult3[RelationComparisonResult3["Reported"] = 4] = "Reported"; - RelationComparisonResult3[RelationComparisonResult3["ReportsUnmeasurable"] = 8] = "ReportsUnmeasurable"; - RelationComparisonResult3[RelationComparisonResult3["ReportsUnreliable"] = 16] = "ReportsUnreliable"; - RelationComparisonResult3[RelationComparisonResult3["ReportsMask"] = 24] = "ReportsMask"; - return RelationComparisonResult3; - })(RelationComparisonResult || {}); - GeneratedIdentifierFlags = /* @__PURE__ */ ((GeneratedIdentifierFlags2) => { - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["None"] = 0] = "None"; - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Auto"] = 1] = "Auto"; - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Loop"] = 2] = "Loop"; - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Unique"] = 3] = "Unique"; - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Node"] = 4] = "Node"; - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["KindMask"] = 7] = "KindMask"; - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["ReservedInNestedScopes"] = 8] = "ReservedInNestedScopes"; - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["Optimistic"] = 16] = "Optimistic"; - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["FileLevel"] = 32] = "FileLevel"; - GeneratedIdentifierFlags2[GeneratedIdentifierFlags2["AllowNameSubstitution"] = 64] = "AllowNameSubstitution"; - return GeneratedIdentifierFlags2; - })(GeneratedIdentifierFlags || {}); - TokenFlags = /* @__PURE__ */ ((TokenFlags2) => { - TokenFlags2[TokenFlags2["None"] = 0] = "None"; - TokenFlags2[TokenFlags2["PrecedingLineBreak"] = 1] = "PrecedingLineBreak"; - TokenFlags2[TokenFlags2["PrecedingJSDocComment"] = 2] = "PrecedingJSDocComment"; - TokenFlags2[TokenFlags2["Unterminated"] = 4] = "Unterminated"; - TokenFlags2[TokenFlags2["ExtendedUnicodeEscape"] = 8] = "ExtendedUnicodeEscape"; - TokenFlags2[TokenFlags2["Scientific"] = 16] = "Scientific"; - TokenFlags2[TokenFlags2["Octal"] = 32] = "Octal"; - TokenFlags2[TokenFlags2["HexSpecifier"] = 64] = "HexSpecifier"; - TokenFlags2[TokenFlags2["BinarySpecifier"] = 128] = "BinarySpecifier"; - TokenFlags2[TokenFlags2["OctalSpecifier"] = 256] = "OctalSpecifier"; - TokenFlags2[TokenFlags2["ContainsSeparator"] = 512] = "ContainsSeparator"; - TokenFlags2[TokenFlags2["UnicodeEscape"] = 1024] = "UnicodeEscape"; - TokenFlags2[TokenFlags2["ContainsInvalidEscape"] = 2048] = "ContainsInvalidEscape"; - TokenFlags2[TokenFlags2["HexEscape"] = 4096] = "HexEscape"; - TokenFlags2[TokenFlags2["ContainsLeadingZero"] = 8192] = "ContainsLeadingZero"; - TokenFlags2[TokenFlags2["ContainsInvalidSeparator"] = 16384] = "ContainsInvalidSeparator"; - TokenFlags2[TokenFlags2["BinaryOrOctalSpecifier"] = 384] = "BinaryOrOctalSpecifier"; - TokenFlags2[TokenFlags2["WithSpecifier"] = 448] = "WithSpecifier"; - TokenFlags2[TokenFlags2["StringLiteralFlags"] = 7176] = "StringLiteralFlags"; - TokenFlags2[TokenFlags2["NumericLiteralFlags"] = 25584] = "NumericLiteralFlags"; - TokenFlags2[TokenFlags2["TemplateLiteralLikeFlags"] = 7176] = "TemplateLiteralLikeFlags"; - TokenFlags2[TokenFlags2["IsInvalid"] = 26656] = "IsInvalid"; - return TokenFlags2; - })(TokenFlags || {}); - FlowFlags = /* @__PURE__ */ ((FlowFlags2) => { - FlowFlags2[FlowFlags2["Unreachable"] = 1] = "Unreachable"; - FlowFlags2[FlowFlags2["Start"] = 2] = "Start"; - FlowFlags2[FlowFlags2["BranchLabel"] = 4] = "BranchLabel"; - FlowFlags2[FlowFlags2["LoopLabel"] = 8] = "LoopLabel"; - FlowFlags2[FlowFlags2["Assignment"] = 16] = "Assignment"; - FlowFlags2[FlowFlags2["TrueCondition"] = 32] = "TrueCondition"; - FlowFlags2[FlowFlags2["FalseCondition"] = 64] = "FalseCondition"; - FlowFlags2[FlowFlags2["SwitchClause"] = 128] = "SwitchClause"; - FlowFlags2[FlowFlags2["ArrayMutation"] = 256] = "ArrayMutation"; - FlowFlags2[FlowFlags2["Call"] = 512] = "Call"; - FlowFlags2[FlowFlags2["ReduceLabel"] = 1024] = "ReduceLabel"; - FlowFlags2[FlowFlags2["Referenced"] = 2048] = "Referenced"; - FlowFlags2[FlowFlags2["Shared"] = 4096] = "Shared"; - FlowFlags2[FlowFlags2["Label"] = 12] = "Label"; - FlowFlags2[FlowFlags2["Condition"] = 96] = "Condition"; - return FlowFlags2; - })(FlowFlags || {}); - CommentDirectiveType = /* @__PURE__ */ ((CommentDirectiveType2) => { - CommentDirectiveType2[CommentDirectiveType2["ExpectError"] = 0] = "ExpectError"; - CommentDirectiveType2[CommentDirectiveType2["Ignore"] = 1] = "Ignore"; - return CommentDirectiveType2; - })(CommentDirectiveType || {}); - OperationCanceledException = class { - }; - FileIncludeKind = /* @__PURE__ */ ((FileIncludeKind2) => { - FileIncludeKind2[FileIncludeKind2["RootFile"] = 0] = "RootFile"; - FileIncludeKind2[FileIncludeKind2["SourceFromProjectReference"] = 1] = "SourceFromProjectReference"; - FileIncludeKind2[FileIncludeKind2["OutputFromProjectReference"] = 2] = "OutputFromProjectReference"; - FileIncludeKind2[FileIncludeKind2["Import"] = 3] = "Import"; - FileIncludeKind2[FileIncludeKind2["ReferenceFile"] = 4] = "ReferenceFile"; - FileIncludeKind2[FileIncludeKind2["TypeReferenceDirective"] = 5] = "TypeReferenceDirective"; - FileIncludeKind2[FileIncludeKind2["LibFile"] = 6] = "LibFile"; - FileIncludeKind2[FileIncludeKind2["LibReferenceDirective"] = 7] = "LibReferenceDirective"; - FileIncludeKind2[FileIncludeKind2["AutomaticTypeDirectiveFile"] = 8] = "AutomaticTypeDirectiveFile"; - return FileIncludeKind2; - })(FileIncludeKind || {}); - FilePreprocessingDiagnosticsKind = /* @__PURE__ */ ((FilePreprocessingDiagnosticsKind2) => { - FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingReferencedDiagnostic"] = 0] = "FilePreprocessingReferencedDiagnostic"; - FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["FilePreprocessingFileExplainingDiagnostic"] = 1] = "FilePreprocessingFileExplainingDiagnostic"; - FilePreprocessingDiagnosticsKind2[FilePreprocessingDiagnosticsKind2["ResolutionDiagnostics"] = 2] = "ResolutionDiagnostics"; - return FilePreprocessingDiagnosticsKind2; - })(FilePreprocessingDiagnosticsKind || {}); - EmitOnly = /* @__PURE__ */ ((EmitOnly4) => { - EmitOnly4[EmitOnly4["Js"] = 0] = "Js"; - EmitOnly4[EmitOnly4["Dts"] = 1] = "Dts"; - return EmitOnly4; - })(EmitOnly || {}); - StructureIsReused = /* @__PURE__ */ ((StructureIsReused2) => { - StructureIsReused2[StructureIsReused2["Not"] = 0] = "Not"; - StructureIsReused2[StructureIsReused2["SafeModules"] = 1] = "SafeModules"; - StructureIsReused2[StructureIsReused2["Completely"] = 2] = "Completely"; - return StructureIsReused2; - })(StructureIsReused || {}); - ExitStatus = /* @__PURE__ */ ((ExitStatus2) => { - ExitStatus2[ExitStatus2["Success"] = 0] = "Success"; - ExitStatus2[ExitStatus2["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped"; - ExitStatus2[ExitStatus2["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated"; - ExitStatus2[ExitStatus2["InvalidProject_OutputsSkipped"] = 3] = "InvalidProject_OutputsSkipped"; - ExitStatus2[ExitStatus2["ProjectReferenceCycle_OutputsSkipped"] = 4] = "ProjectReferenceCycle_OutputsSkipped"; - return ExitStatus2; - })(ExitStatus || {}); - MemberOverrideStatus = /* @__PURE__ */ ((MemberOverrideStatus2) => { - MemberOverrideStatus2[MemberOverrideStatus2["Ok"] = 0] = "Ok"; - MemberOverrideStatus2[MemberOverrideStatus2["NeedsOverride"] = 1] = "NeedsOverride"; - MemberOverrideStatus2[MemberOverrideStatus2["HasInvalidOverride"] = 2] = "HasInvalidOverride"; - return MemberOverrideStatus2; - })(MemberOverrideStatus || {}); - UnionReduction = /* @__PURE__ */ ((UnionReduction2) => { - UnionReduction2[UnionReduction2["None"] = 0] = "None"; - UnionReduction2[UnionReduction2["Literal"] = 1] = "Literal"; - UnionReduction2[UnionReduction2["Subtype"] = 2] = "Subtype"; - return UnionReduction2; - })(UnionReduction || {}); - ContextFlags = /* @__PURE__ */ ((ContextFlags3) => { - ContextFlags3[ContextFlags3["None"] = 0] = "None"; - ContextFlags3[ContextFlags3["Signature"] = 1] = "Signature"; - ContextFlags3[ContextFlags3["NoConstraints"] = 2] = "NoConstraints"; - ContextFlags3[ContextFlags3["Completions"] = 4] = "Completions"; - ContextFlags3[ContextFlags3["SkipBindingPatterns"] = 8] = "SkipBindingPatterns"; - return ContextFlags3; - })(ContextFlags || {}); - NodeBuilderFlags = /* @__PURE__ */ ((NodeBuilderFlags2) => { - NodeBuilderFlags2[NodeBuilderFlags2["None"] = 0] = "None"; - NodeBuilderFlags2[NodeBuilderFlags2["NoTruncation"] = 1] = "NoTruncation"; - NodeBuilderFlags2[NodeBuilderFlags2["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType"; - NodeBuilderFlags2[NodeBuilderFlags2["GenerateNamesForShadowedTypeParams"] = 4] = "GenerateNamesForShadowedTypeParams"; - NodeBuilderFlags2[NodeBuilderFlags2["UseStructuralFallback"] = 8] = "UseStructuralFallback"; - NodeBuilderFlags2[NodeBuilderFlags2["ForbidIndexedAccessSymbolReferences"] = 16] = "ForbidIndexedAccessSymbolReferences"; - NodeBuilderFlags2[NodeBuilderFlags2["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; - NodeBuilderFlags2[NodeBuilderFlags2["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType"; - NodeBuilderFlags2[NodeBuilderFlags2["UseOnlyExternalAliasing"] = 128] = "UseOnlyExternalAliasing"; - NodeBuilderFlags2[NodeBuilderFlags2["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType"; - NodeBuilderFlags2[NodeBuilderFlags2["WriteTypeParametersInQualifiedName"] = 512] = "WriteTypeParametersInQualifiedName"; - NodeBuilderFlags2[NodeBuilderFlags2["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals"; - NodeBuilderFlags2[NodeBuilderFlags2["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral"; - NodeBuilderFlags2[NodeBuilderFlags2["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; - NodeBuilderFlags2[NodeBuilderFlags2["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; - NodeBuilderFlags2[NodeBuilderFlags2["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; - NodeBuilderFlags2[NodeBuilderFlags2["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; - NodeBuilderFlags2[NodeBuilderFlags2["NoTypeReduction"] = 536870912] = "NoTypeReduction"; - NodeBuilderFlags2[NodeBuilderFlags2["OmitThisParameter"] = 33554432] = "OmitThisParameter"; - NodeBuilderFlags2[NodeBuilderFlags2["AllowThisInObjectLiteral"] = 32768] = "AllowThisInObjectLiteral"; - NodeBuilderFlags2[NodeBuilderFlags2["AllowQualifiedNameInPlaceOfIdentifier"] = 65536] = "AllowQualifiedNameInPlaceOfIdentifier"; - NodeBuilderFlags2[NodeBuilderFlags2["AllowAnonymousIdentifier"] = 131072] = "AllowAnonymousIdentifier"; - NodeBuilderFlags2[NodeBuilderFlags2["AllowEmptyUnionOrIntersection"] = 262144] = "AllowEmptyUnionOrIntersection"; - NodeBuilderFlags2[NodeBuilderFlags2["AllowEmptyTuple"] = 524288] = "AllowEmptyTuple"; - NodeBuilderFlags2[NodeBuilderFlags2["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; - NodeBuilderFlags2[NodeBuilderFlags2["AllowEmptyIndexInfoType"] = 2097152] = "AllowEmptyIndexInfoType"; - NodeBuilderFlags2[NodeBuilderFlags2["WriteComputedProps"] = 1073741824] = "WriteComputedProps"; - NodeBuilderFlags2[NodeBuilderFlags2["AllowNodeModulesRelativePaths"] = 67108864] = "AllowNodeModulesRelativePaths"; - NodeBuilderFlags2[NodeBuilderFlags2["DoNotIncludeSymbolChain"] = 134217728] = "DoNotIncludeSymbolChain"; - NodeBuilderFlags2[NodeBuilderFlags2["IgnoreErrors"] = 70221824] = "IgnoreErrors"; - NodeBuilderFlags2[NodeBuilderFlags2["InObjectTypeLiteral"] = 4194304] = "InObjectTypeLiteral"; - NodeBuilderFlags2[NodeBuilderFlags2["InTypeAlias"] = 8388608] = "InTypeAlias"; - NodeBuilderFlags2[NodeBuilderFlags2["InInitialEntityName"] = 16777216] = "InInitialEntityName"; - return NodeBuilderFlags2; - })(NodeBuilderFlags || {}); - TypeFormatFlags = /* @__PURE__ */ ((TypeFormatFlags2) => { - TypeFormatFlags2[TypeFormatFlags2["None"] = 0] = "None"; - TypeFormatFlags2[TypeFormatFlags2["NoTruncation"] = 1] = "NoTruncation"; - TypeFormatFlags2[TypeFormatFlags2["WriteArrayAsGenericType"] = 2] = "WriteArrayAsGenericType"; - TypeFormatFlags2[TypeFormatFlags2["UseStructuralFallback"] = 8] = "UseStructuralFallback"; - TypeFormatFlags2[TypeFormatFlags2["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; - TypeFormatFlags2[TypeFormatFlags2["UseFullyQualifiedType"] = 64] = "UseFullyQualifiedType"; - TypeFormatFlags2[TypeFormatFlags2["SuppressAnyReturnType"] = 256] = "SuppressAnyReturnType"; - TypeFormatFlags2[TypeFormatFlags2["MultilineObjectLiterals"] = 1024] = "MultilineObjectLiterals"; - TypeFormatFlags2[TypeFormatFlags2["WriteClassExpressionAsTypeLiteral"] = 2048] = "WriteClassExpressionAsTypeLiteral"; - TypeFormatFlags2[TypeFormatFlags2["UseTypeOfFunction"] = 4096] = "UseTypeOfFunction"; - TypeFormatFlags2[TypeFormatFlags2["OmitParameterModifiers"] = 8192] = "OmitParameterModifiers"; - TypeFormatFlags2[TypeFormatFlags2["UseAliasDefinedOutsideCurrentScope"] = 16384] = "UseAliasDefinedOutsideCurrentScope"; - TypeFormatFlags2[TypeFormatFlags2["UseSingleQuotesForStringLiteralType"] = 268435456] = "UseSingleQuotesForStringLiteralType"; - TypeFormatFlags2[TypeFormatFlags2["NoTypeReduction"] = 536870912] = "NoTypeReduction"; - TypeFormatFlags2[TypeFormatFlags2["OmitThisParameter"] = 33554432] = "OmitThisParameter"; - TypeFormatFlags2[TypeFormatFlags2["AllowUniqueESSymbolType"] = 1048576] = "AllowUniqueESSymbolType"; - TypeFormatFlags2[TypeFormatFlags2["AddUndefined"] = 131072] = "AddUndefined"; - TypeFormatFlags2[TypeFormatFlags2["WriteArrowStyleSignature"] = 262144] = "WriteArrowStyleSignature"; - TypeFormatFlags2[TypeFormatFlags2["InArrayType"] = 524288] = "InArrayType"; - TypeFormatFlags2[TypeFormatFlags2["InElementType"] = 2097152] = "InElementType"; - TypeFormatFlags2[TypeFormatFlags2["InFirstTypeArgument"] = 4194304] = "InFirstTypeArgument"; - TypeFormatFlags2[TypeFormatFlags2["InTypeAlias"] = 8388608] = "InTypeAlias"; - TypeFormatFlags2[TypeFormatFlags2["NodeBuilderFlagsMask"] = 848330091] = "NodeBuilderFlagsMask"; - return TypeFormatFlags2; - })(TypeFormatFlags || {}); - SymbolFormatFlags = /* @__PURE__ */ ((SymbolFormatFlags2) => { - SymbolFormatFlags2[SymbolFormatFlags2["None"] = 0] = "None"; - SymbolFormatFlags2[SymbolFormatFlags2["WriteTypeParametersOrArguments"] = 1] = "WriteTypeParametersOrArguments"; - SymbolFormatFlags2[SymbolFormatFlags2["UseOnlyExternalAliasing"] = 2] = "UseOnlyExternalAliasing"; - SymbolFormatFlags2[SymbolFormatFlags2["AllowAnyNodeKind"] = 4] = "AllowAnyNodeKind"; - SymbolFormatFlags2[SymbolFormatFlags2["UseAliasDefinedOutsideCurrentScope"] = 8] = "UseAliasDefinedOutsideCurrentScope"; - SymbolFormatFlags2[SymbolFormatFlags2["WriteComputedProps"] = 16] = "WriteComputedProps"; - SymbolFormatFlags2[SymbolFormatFlags2["DoNotIncludeSymbolChain"] = 32] = "DoNotIncludeSymbolChain"; - return SymbolFormatFlags2; - })(SymbolFormatFlags || {}); - SymbolAccessibility = /* @__PURE__ */ ((SymbolAccessibility2) => { - SymbolAccessibility2[SymbolAccessibility2["Accessible"] = 0] = "Accessible"; - SymbolAccessibility2[SymbolAccessibility2["NotAccessible"] = 1] = "NotAccessible"; - SymbolAccessibility2[SymbolAccessibility2["CannotBeNamed"] = 2] = "CannotBeNamed"; - return SymbolAccessibility2; - })(SymbolAccessibility || {}); - SyntheticSymbolKind = /* @__PURE__ */ ((SyntheticSymbolKind2) => { - SyntheticSymbolKind2[SyntheticSymbolKind2["UnionOrIntersection"] = 0] = "UnionOrIntersection"; - SyntheticSymbolKind2[SyntheticSymbolKind2["Spread"] = 1] = "Spread"; - return SyntheticSymbolKind2; - })(SyntheticSymbolKind || {}); - TypePredicateKind = /* @__PURE__ */ ((TypePredicateKind2) => { - TypePredicateKind2[TypePredicateKind2["This"] = 0] = "This"; - TypePredicateKind2[TypePredicateKind2["Identifier"] = 1] = "Identifier"; - TypePredicateKind2[TypePredicateKind2["AssertsThis"] = 2] = "AssertsThis"; - TypePredicateKind2[TypePredicateKind2["AssertsIdentifier"] = 3] = "AssertsIdentifier"; - return TypePredicateKind2; - })(TypePredicateKind || {}); - TypeReferenceSerializationKind = /* @__PURE__ */ ((TypeReferenceSerializationKind2) => { - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["Unknown"] = 0] = "Unknown"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["TypeWithConstructSignatureAndValue"] = 1] = "TypeWithConstructSignatureAndValue"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["VoidNullableOrNeverType"] = 2] = "VoidNullableOrNeverType"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["NumberLikeType"] = 3] = "NumberLikeType"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["BigIntLikeType"] = 4] = "BigIntLikeType"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["StringLikeType"] = 5] = "StringLikeType"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["BooleanType"] = 6] = "BooleanType"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["ArrayLikeType"] = 7] = "ArrayLikeType"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["ESSymbolType"] = 8] = "ESSymbolType"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["Promise"] = 9] = "Promise"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["TypeWithCallSignature"] = 10] = "TypeWithCallSignature"; - TypeReferenceSerializationKind2[TypeReferenceSerializationKind2["ObjectType"] = 11] = "ObjectType"; - return TypeReferenceSerializationKind2; - })(TypeReferenceSerializationKind || {}); - SymbolFlags = /* @__PURE__ */ ((SymbolFlags3) => { - SymbolFlags3[SymbolFlags3["None"] = 0] = "None"; - SymbolFlags3[SymbolFlags3["FunctionScopedVariable"] = 1] = "FunctionScopedVariable"; - SymbolFlags3[SymbolFlags3["BlockScopedVariable"] = 2] = "BlockScopedVariable"; - SymbolFlags3[SymbolFlags3["Property"] = 4] = "Property"; - SymbolFlags3[SymbolFlags3["EnumMember"] = 8] = "EnumMember"; - SymbolFlags3[SymbolFlags3["Function"] = 16] = "Function"; - SymbolFlags3[SymbolFlags3["Class"] = 32] = "Class"; - SymbolFlags3[SymbolFlags3["Interface"] = 64] = "Interface"; - SymbolFlags3[SymbolFlags3["ConstEnum"] = 128] = "ConstEnum"; - SymbolFlags3[SymbolFlags3["RegularEnum"] = 256] = "RegularEnum"; - SymbolFlags3[SymbolFlags3["ValueModule"] = 512] = "ValueModule"; - SymbolFlags3[SymbolFlags3["NamespaceModule"] = 1024] = "NamespaceModule"; - SymbolFlags3[SymbolFlags3["TypeLiteral"] = 2048] = "TypeLiteral"; - SymbolFlags3[SymbolFlags3["ObjectLiteral"] = 4096] = "ObjectLiteral"; - SymbolFlags3[SymbolFlags3["Method"] = 8192] = "Method"; - SymbolFlags3[SymbolFlags3["Constructor"] = 16384] = "Constructor"; - SymbolFlags3[SymbolFlags3["GetAccessor"] = 32768] = "GetAccessor"; - SymbolFlags3[SymbolFlags3["SetAccessor"] = 65536] = "SetAccessor"; - SymbolFlags3[SymbolFlags3["Signature"] = 131072] = "Signature"; - SymbolFlags3[SymbolFlags3["TypeParameter"] = 262144] = "TypeParameter"; - SymbolFlags3[SymbolFlags3["TypeAlias"] = 524288] = "TypeAlias"; - SymbolFlags3[SymbolFlags3["ExportValue"] = 1048576] = "ExportValue"; - SymbolFlags3[SymbolFlags3["Alias"] = 2097152] = "Alias"; - SymbolFlags3[SymbolFlags3["Prototype"] = 4194304] = "Prototype"; - SymbolFlags3[SymbolFlags3["ExportStar"] = 8388608] = "ExportStar"; - SymbolFlags3[SymbolFlags3["Optional"] = 16777216] = "Optional"; - SymbolFlags3[SymbolFlags3["Transient"] = 33554432] = "Transient"; - SymbolFlags3[SymbolFlags3["Assignment"] = 67108864] = "Assignment"; - SymbolFlags3[SymbolFlags3["ModuleExports"] = 134217728] = "ModuleExports"; - SymbolFlags3[SymbolFlags3["All"] = 67108863] = "All"; - SymbolFlags3[SymbolFlags3["Enum"] = 384] = "Enum"; - SymbolFlags3[SymbolFlags3["Variable"] = 3] = "Variable"; - SymbolFlags3[SymbolFlags3["Value"] = 111551] = "Value"; - SymbolFlags3[SymbolFlags3["Type"] = 788968] = "Type"; - SymbolFlags3[SymbolFlags3["Namespace"] = 1920] = "Namespace"; - SymbolFlags3[SymbolFlags3["Module"] = 1536] = "Module"; - SymbolFlags3[SymbolFlags3["Accessor"] = 98304] = "Accessor"; - SymbolFlags3[SymbolFlags3["FunctionScopedVariableExcludes"] = 111550] = "FunctionScopedVariableExcludes"; - SymbolFlags3[SymbolFlags3["BlockScopedVariableExcludes"] = 111551 /* Value */] = "BlockScopedVariableExcludes"; - SymbolFlags3[SymbolFlags3["ParameterExcludes"] = 111551 /* Value */] = "ParameterExcludes"; - SymbolFlags3[SymbolFlags3["PropertyExcludes"] = 0 /* None */] = "PropertyExcludes"; - SymbolFlags3[SymbolFlags3["EnumMemberExcludes"] = 900095] = "EnumMemberExcludes"; - SymbolFlags3[SymbolFlags3["FunctionExcludes"] = 110991] = "FunctionExcludes"; - SymbolFlags3[SymbolFlags3["ClassExcludes"] = 899503] = "ClassExcludes"; - SymbolFlags3[SymbolFlags3["InterfaceExcludes"] = 788872] = "InterfaceExcludes"; - SymbolFlags3[SymbolFlags3["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes"; - SymbolFlags3[SymbolFlags3["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes"; - SymbolFlags3[SymbolFlags3["ValueModuleExcludes"] = 110735] = "ValueModuleExcludes"; - SymbolFlags3[SymbolFlags3["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes"; - SymbolFlags3[SymbolFlags3["MethodExcludes"] = 103359] = "MethodExcludes"; - SymbolFlags3[SymbolFlags3["GetAccessorExcludes"] = 46015] = "GetAccessorExcludes"; - SymbolFlags3[SymbolFlags3["SetAccessorExcludes"] = 78783] = "SetAccessorExcludes"; - SymbolFlags3[SymbolFlags3["AccessorExcludes"] = 13247] = "AccessorExcludes"; - SymbolFlags3[SymbolFlags3["TypeParameterExcludes"] = 526824] = "TypeParameterExcludes"; - SymbolFlags3[SymbolFlags3["TypeAliasExcludes"] = 788968 /* Type */] = "TypeAliasExcludes"; - SymbolFlags3[SymbolFlags3["AliasExcludes"] = 2097152 /* Alias */] = "AliasExcludes"; - SymbolFlags3[SymbolFlags3["ModuleMember"] = 2623475] = "ModuleMember"; - SymbolFlags3[SymbolFlags3["ExportHasLocal"] = 944] = "ExportHasLocal"; - SymbolFlags3[SymbolFlags3["BlockScoped"] = 418] = "BlockScoped"; - SymbolFlags3[SymbolFlags3["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; - SymbolFlags3[SymbolFlags3["ClassMember"] = 106500] = "ClassMember"; - SymbolFlags3[SymbolFlags3["ExportSupportsDefaultModifier"] = 112] = "ExportSupportsDefaultModifier"; - SymbolFlags3[SymbolFlags3["ExportDoesNotSupportDefaultModifier"] = -113] = "ExportDoesNotSupportDefaultModifier"; - SymbolFlags3[SymbolFlags3["Classifiable"] = 2885600] = "Classifiable"; - SymbolFlags3[SymbolFlags3["LateBindingContainer"] = 6256] = "LateBindingContainer"; - return SymbolFlags3; - })(SymbolFlags || {}); - EnumKind = /* @__PURE__ */ ((EnumKind2) => { - EnumKind2[EnumKind2["Numeric"] = 0] = "Numeric"; - EnumKind2[EnumKind2["Literal"] = 1] = "Literal"; - return EnumKind2; - })(EnumKind || {}); - CheckFlags = /* @__PURE__ */ ((CheckFlags2) => { - CheckFlags2[CheckFlags2["None"] = 0] = "None"; - CheckFlags2[CheckFlags2["Instantiated"] = 1] = "Instantiated"; - CheckFlags2[CheckFlags2["SyntheticProperty"] = 2] = "SyntheticProperty"; - CheckFlags2[CheckFlags2["SyntheticMethod"] = 4] = "SyntheticMethod"; - CheckFlags2[CheckFlags2["Readonly"] = 8] = "Readonly"; - CheckFlags2[CheckFlags2["ReadPartial"] = 16] = "ReadPartial"; - CheckFlags2[CheckFlags2["WritePartial"] = 32] = "WritePartial"; - CheckFlags2[CheckFlags2["HasNonUniformType"] = 64] = "HasNonUniformType"; - CheckFlags2[CheckFlags2["HasLiteralType"] = 128] = "HasLiteralType"; - CheckFlags2[CheckFlags2["ContainsPublic"] = 256] = "ContainsPublic"; - CheckFlags2[CheckFlags2["ContainsProtected"] = 512] = "ContainsProtected"; - CheckFlags2[CheckFlags2["ContainsPrivate"] = 1024] = "ContainsPrivate"; - CheckFlags2[CheckFlags2["ContainsStatic"] = 2048] = "ContainsStatic"; - CheckFlags2[CheckFlags2["Late"] = 4096] = "Late"; - CheckFlags2[CheckFlags2["ReverseMapped"] = 8192] = "ReverseMapped"; - CheckFlags2[CheckFlags2["OptionalParameter"] = 16384] = "OptionalParameter"; - CheckFlags2[CheckFlags2["RestParameter"] = 32768] = "RestParameter"; - CheckFlags2[CheckFlags2["DeferredType"] = 65536] = "DeferredType"; - CheckFlags2[CheckFlags2["HasNeverType"] = 131072] = "HasNeverType"; - CheckFlags2[CheckFlags2["Mapped"] = 262144] = "Mapped"; - CheckFlags2[CheckFlags2["StripOptional"] = 524288] = "StripOptional"; - CheckFlags2[CheckFlags2["Unresolved"] = 1048576] = "Unresolved"; - CheckFlags2[CheckFlags2["Synthetic"] = 6] = "Synthetic"; - CheckFlags2[CheckFlags2["Discriminant"] = 192] = "Discriminant"; - CheckFlags2[CheckFlags2["Partial"] = 48] = "Partial"; - return CheckFlags2; - })(CheckFlags || {}); - InternalSymbolName = /* @__PURE__ */ ((InternalSymbolName2) => { - InternalSymbolName2["Call"] = "__call"; - InternalSymbolName2["Constructor"] = "__constructor"; - InternalSymbolName2["New"] = "__new"; - InternalSymbolName2["Index"] = "__index"; - InternalSymbolName2["ExportStar"] = "__export"; - InternalSymbolName2["Global"] = "__global"; - InternalSymbolName2["Missing"] = "__missing"; - InternalSymbolName2["Type"] = "__type"; - InternalSymbolName2["Object"] = "__object"; - InternalSymbolName2["JSXAttributes"] = "__jsxAttributes"; - InternalSymbolName2["Class"] = "__class"; - InternalSymbolName2["Function"] = "__function"; - InternalSymbolName2["Computed"] = "__computed"; - InternalSymbolName2["Resolving"] = "__resolving__"; - InternalSymbolName2["ExportEquals"] = "export="; - InternalSymbolName2["Default"] = "default"; - InternalSymbolName2["This"] = "this"; - return InternalSymbolName2; - })(InternalSymbolName || {}); - NodeCheckFlags = /* @__PURE__ */ ((NodeCheckFlags2) => { - NodeCheckFlags2[NodeCheckFlags2["None"] = 0] = "None"; - NodeCheckFlags2[NodeCheckFlags2["TypeChecked"] = 1] = "TypeChecked"; - NodeCheckFlags2[NodeCheckFlags2["LexicalThis"] = 2] = "LexicalThis"; - NodeCheckFlags2[NodeCheckFlags2["CaptureThis"] = 4] = "CaptureThis"; - NodeCheckFlags2[NodeCheckFlags2["CaptureNewTarget"] = 8] = "CaptureNewTarget"; - NodeCheckFlags2[NodeCheckFlags2["SuperInstance"] = 16] = "SuperInstance"; - NodeCheckFlags2[NodeCheckFlags2["SuperStatic"] = 32] = "SuperStatic"; - NodeCheckFlags2[NodeCheckFlags2["ContextChecked"] = 64] = "ContextChecked"; - NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAccessInAsync"] = 128] = "MethodWithSuperPropertyAccessInAsync"; - NodeCheckFlags2[NodeCheckFlags2["MethodWithSuperPropertyAssignmentInAsync"] = 256] = "MethodWithSuperPropertyAssignmentInAsync"; - NodeCheckFlags2[NodeCheckFlags2["CaptureArguments"] = 512] = "CaptureArguments"; - NodeCheckFlags2[NodeCheckFlags2["EnumValuesComputed"] = 1024] = "EnumValuesComputed"; - NodeCheckFlags2[NodeCheckFlags2["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass"; - NodeCheckFlags2[NodeCheckFlags2["LoopWithCapturedBlockScopedBinding"] = 4096] = "LoopWithCapturedBlockScopedBinding"; - NodeCheckFlags2[NodeCheckFlags2["ContainsCapturedBlockScopeBinding"] = 8192] = "ContainsCapturedBlockScopeBinding"; - NodeCheckFlags2[NodeCheckFlags2["CapturedBlockScopedBinding"] = 16384] = "CapturedBlockScopedBinding"; - NodeCheckFlags2[NodeCheckFlags2["BlockScopedBindingInLoop"] = 32768] = "BlockScopedBindingInLoop"; - NodeCheckFlags2[NodeCheckFlags2["NeedsLoopOutParameter"] = 65536] = "NeedsLoopOutParameter"; - NodeCheckFlags2[NodeCheckFlags2["AssignmentsMarked"] = 131072] = "AssignmentsMarked"; - NodeCheckFlags2[NodeCheckFlags2["ContainsConstructorReference"] = 262144] = "ContainsConstructorReference"; - NodeCheckFlags2[NodeCheckFlags2["ConstructorReference"] = 536870912] = "ConstructorReference"; - NodeCheckFlags2[NodeCheckFlags2["ContainsClassWithPrivateIdentifiers"] = 1048576] = "ContainsClassWithPrivateIdentifiers"; - NodeCheckFlags2[NodeCheckFlags2["ContainsSuperPropertyInStaticInitializer"] = 2097152] = "ContainsSuperPropertyInStaticInitializer"; - NodeCheckFlags2[NodeCheckFlags2["InCheckIdentifier"] = 4194304] = "InCheckIdentifier"; - return NodeCheckFlags2; - })(NodeCheckFlags || {}); - TypeFlags = /* @__PURE__ */ ((TypeFlags2) => { - TypeFlags2[TypeFlags2["Any"] = 1] = "Any"; - TypeFlags2[TypeFlags2["Unknown"] = 2] = "Unknown"; - TypeFlags2[TypeFlags2["String"] = 4] = "String"; - TypeFlags2[TypeFlags2["Number"] = 8] = "Number"; - TypeFlags2[TypeFlags2["Boolean"] = 16] = "Boolean"; - TypeFlags2[TypeFlags2["Enum"] = 32] = "Enum"; - TypeFlags2[TypeFlags2["BigInt"] = 64] = "BigInt"; - TypeFlags2[TypeFlags2["StringLiteral"] = 128] = "StringLiteral"; - TypeFlags2[TypeFlags2["NumberLiteral"] = 256] = "NumberLiteral"; - TypeFlags2[TypeFlags2["BooleanLiteral"] = 512] = "BooleanLiteral"; - TypeFlags2[TypeFlags2["EnumLiteral"] = 1024] = "EnumLiteral"; - TypeFlags2[TypeFlags2["BigIntLiteral"] = 2048] = "BigIntLiteral"; - TypeFlags2[TypeFlags2["ESSymbol"] = 4096] = "ESSymbol"; - TypeFlags2[TypeFlags2["UniqueESSymbol"] = 8192] = "UniqueESSymbol"; - TypeFlags2[TypeFlags2["Void"] = 16384] = "Void"; - TypeFlags2[TypeFlags2["Undefined"] = 32768] = "Undefined"; - TypeFlags2[TypeFlags2["Null"] = 65536] = "Null"; - TypeFlags2[TypeFlags2["Never"] = 131072] = "Never"; - TypeFlags2[TypeFlags2["TypeParameter"] = 262144] = "TypeParameter"; - TypeFlags2[TypeFlags2["Object"] = 524288] = "Object"; - TypeFlags2[TypeFlags2["Union"] = 1048576] = "Union"; - TypeFlags2[TypeFlags2["Intersection"] = 2097152] = "Intersection"; - TypeFlags2[TypeFlags2["Index"] = 4194304] = "Index"; - TypeFlags2[TypeFlags2["IndexedAccess"] = 8388608] = "IndexedAccess"; - TypeFlags2[TypeFlags2["Conditional"] = 16777216] = "Conditional"; - TypeFlags2[TypeFlags2["Substitution"] = 33554432] = "Substitution"; - TypeFlags2[TypeFlags2["NonPrimitive"] = 67108864] = "NonPrimitive"; - TypeFlags2[TypeFlags2["TemplateLiteral"] = 134217728] = "TemplateLiteral"; - TypeFlags2[TypeFlags2["StringMapping"] = 268435456] = "StringMapping"; - TypeFlags2[TypeFlags2["AnyOrUnknown"] = 3] = "AnyOrUnknown"; - TypeFlags2[TypeFlags2["Nullable"] = 98304] = "Nullable"; - TypeFlags2[TypeFlags2["Literal"] = 2944] = "Literal"; - TypeFlags2[TypeFlags2["Unit"] = 109472] = "Unit"; - TypeFlags2[TypeFlags2["Freshable"] = 2976] = "Freshable"; - TypeFlags2[TypeFlags2["StringOrNumberLiteral"] = 384] = "StringOrNumberLiteral"; - TypeFlags2[TypeFlags2["StringOrNumberLiteralOrUnique"] = 8576] = "StringOrNumberLiteralOrUnique"; - TypeFlags2[TypeFlags2["DefinitelyFalsy"] = 117632] = "DefinitelyFalsy"; - TypeFlags2[TypeFlags2["PossiblyFalsy"] = 117724] = "PossiblyFalsy"; - TypeFlags2[TypeFlags2["Intrinsic"] = 67359327] = "Intrinsic"; - TypeFlags2[TypeFlags2["StringLike"] = 402653316] = "StringLike"; - TypeFlags2[TypeFlags2["NumberLike"] = 296] = "NumberLike"; - TypeFlags2[TypeFlags2["BigIntLike"] = 2112] = "BigIntLike"; - TypeFlags2[TypeFlags2["BooleanLike"] = 528] = "BooleanLike"; - TypeFlags2[TypeFlags2["EnumLike"] = 1056] = "EnumLike"; - TypeFlags2[TypeFlags2["ESSymbolLike"] = 12288] = "ESSymbolLike"; - TypeFlags2[TypeFlags2["VoidLike"] = 49152] = "VoidLike"; - TypeFlags2[TypeFlags2["Primitive"] = 402784252] = "Primitive"; - TypeFlags2[TypeFlags2["DefinitelyNonNullable"] = 470302716] = "DefinitelyNonNullable"; - TypeFlags2[TypeFlags2["DisjointDomains"] = 469892092] = "DisjointDomains"; - TypeFlags2[TypeFlags2["UnionOrIntersection"] = 3145728] = "UnionOrIntersection"; - TypeFlags2[TypeFlags2["StructuredType"] = 3670016] = "StructuredType"; - TypeFlags2[TypeFlags2["TypeVariable"] = 8650752] = "TypeVariable"; - TypeFlags2[TypeFlags2["InstantiableNonPrimitive"] = 58982400] = "InstantiableNonPrimitive"; - TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive"; - TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable"; - TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable"; - TypeFlags2[TypeFlags2["ObjectFlagsType"] = 138117121] = "ObjectFlagsType"; - TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; - TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; - TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; - TypeFlags2[TypeFlags2["IncludesMask"] = 473694207] = "IncludesMask"; - TypeFlags2[TypeFlags2["IncludesMissingType"] = 262144 /* TypeParameter */] = "IncludesMissingType"; - TypeFlags2[TypeFlags2["IncludesNonWideningType"] = 4194304 /* Index */] = "IncludesNonWideningType"; - TypeFlags2[TypeFlags2["IncludesWildcard"] = 8388608 /* IndexedAccess */] = "IncludesWildcard"; - TypeFlags2[TypeFlags2["IncludesEmptyObject"] = 16777216 /* Conditional */] = "IncludesEmptyObject"; - TypeFlags2[TypeFlags2["IncludesInstantiable"] = 33554432 /* Substitution */] = "IncludesInstantiable"; - TypeFlags2[TypeFlags2["NotPrimitiveUnion"] = 36323331] = "NotPrimitiveUnion"; - return TypeFlags2; - })(TypeFlags || {}); - ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => { - ObjectFlags3[ObjectFlags3["None"] = 0] = "None"; - ObjectFlags3[ObjectFlags3["Class"] = 1] = "Class"; - ObjectFlags3[ObjectFlags3["Interface"] = 2] = "Interface"; - ObjectFlags3[ObjectFlags3["Reference"] = 4] = "Reference"; - ObjectFlags3[ObjectFlags3["Tuple"] = 8] = "Tuple"; - ObjectFlags3[ObjectFlags3["Anonymous"] = 16] = "Anonymous"; - ObjectFlags3[ObjectFlags3["Mapped"] = 32] = "Mapped"; - ObjectFlags3[ObjectFlags3["Instantiated"] = 64] = "Instantiated"; - ObjectFlags3[ObjectFlags3["ObjectLiteral"] = 128] = "ObjectLiteral"; - ObjectFlags3[ObjectFlags3["EvolvingArray"] = 256] = "EvolvingArray"; - ObjectFlags3[ObjectFlags3["ObjectLiteralPatternWithComputedProperties"] = 512] = "ObjectLiteralPatternWithComputedProperties"; - ObjectFlags3[ObjectFlags3["ReverseMapped"] = 1024] = "ReverseMapped"; - ObjectFlags3[ObjectFlags3["JsxAttributes"] = 2048] = "JsxAttributes"; - ObjectFlags3[ObjectFlags3["JSLiteral"] = 4096] = "JSLiteral"; - ObjectFlags3[ObjectFlags3["FreshLiteral"] = 8192] = "FreshLiteral"; - ObjectFlags3[ObjectFlags3["ArrayLiteral"] = 16384] = "ArrayLiteral"; - ObjectFlags3[ObjectFlags3["PrimitiveUnion"] = 32768] = "PrimitiveUnion"; - ObjectFlags3[ObjectFlags3["ContainsWideningType"] = 65536] = "ContainsWideningType"; - ObjectFlags3[ObjectFlags3["ContainsObjectOrArrayLiteral"] = 131072] = "ContainsObjectOrArrayLiteral"; - ObjectFlags3[ObjectFlags3["NonInferrableType"] = 262144] = "NonInferrableType"; - ObjectFlags3[ObjectFlags3["CouldContainTypeVariablesComputed"] = 524288] = "CouldContainTypeVariablesComputed"; - ObjectFlags3[ObjectFlags3["CouldContainTypeVariables"] = 1048576] = "CouldContainTypeVariables"; - ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface"; - ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening"; - ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags"; - ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask"; - ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread"; - ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType"; - ObjectFlags3[ObjectFlags3["InstantiationExpressionType"] = 8388608] = "InstantiationExpressionType"; - ObjectFlags3[ObjectFlags3["IsClassInstanceClone"] = 16777216] = "IsClassInstanceClone"; - ObjectFlags3[ObjectFlags3["IdenticalBaseTypeCalculated"] = 33554432] = "IdenticalBaseTypeCalculated"; - ObjectFlags3[ObjectFlags3["IdenticalBaseTypeExists"] = 67108864] = "IdenticalBaseTypeExists"; - ObjectFlags3[ObjectFlags3["IsGenericTypeComputed"] = 2097152] = "IsGenericTypeComputed"; - ObjectFlags3[ObjectFlags3["IsGenericObjectType"] = 4194304] = "IsGenericObjectType"; - ObjectFlags3[ObjectFlags3["IsGenericIndexType"] = 8388608] = "IsGenericIndexType"; - ObjectFlags3[ObjectFlags3["IsGenericType"] = 12582912] = "IsGenericType"; - ObjectFlags3[ObjectFlags3["ContainsIntersections"] = 16777216] = "ContainsIntersections"; - ObjectFlags3[ObjectFlags3["IsUnknownLikeUnionComputed"] = 33554432] = "IsUnknownLikeUnionComputed"; - ObjectFlags3[ObjectFlags3["IsUnknownLikeUnion"] = 67108864] = "IsUnknownLikeUnion"; - ObjectFlags3[ObjectFlags3["IsNeverIntersectionComputed"] = 16777216] = "IsNeverIntersectionComputed"; - ObjectFlags3[ObjectFlags3["IsNeverIntersection"] = 33554432] = "IsNeverIntersection"; - return ObjectFlags3; - })(ObjectFlags || {}); - VarianceFlags = /* @__PURE__ */ ((VarianceFlags2) => { - VarianceFlags2[VarianceFlags2["Invariant"] = 0] = "Invariant"; - VarianceFlags2[VarianceFlags2["Covariant"] = 1] = "Covariant"; - VarianceFlags2[VarianceFlags2["Contravariant"] = 2] = "Contravariant"; - VarianceFlags2[VarianceFlags2["Bivariant"] = 3] = "Bivariant"; - VarianceFlags2[VarianceFlags2["Independent"] = 4] = "Independent"; - VarianceFlags2[VarianceFlags2["VarianceMask"] = 7] = "VarianceMask"; - VarianceFlags2[VarianceFlags2["Unmeasurable"] = 8] = "Unmeasurable"; - VarianceFlags2[VarianceFlags2["Unreliable"] = 16] = "Unreliable"; - VarianceFlags2[VarianceFlags2["AllowsStructuralFallback"] = 24] = "AllowsStructuralFallback"; - return VarianceFlags2; - })(VarianceFlags || {}); - ElementFlags = /* @__PURE__ */ ((ElementFlags2) => { - ElementFlags2[ElementFlags2["Required"] = 1] = "Required"; - ElementFlags2[ElementFlags2["Optional"] = 2] = "Optional"; - ElementFlags2[ElementFlags2["Rest"] = 4] = "Rest"; - ElementFlags2[ElementFlags2["Variadic"] = 8] = "Variadic"; - ElementFlags2[ElementFlags2["Fixed"] = 3] = "Fixed"; - ElementFlags2[ElementFlags2["Variable"] = 12] = "Variable"; - ElementFlags2[ElementFlags2["NonRequired"] = 14] = "NonRequired"; - ElementFlags2[ElementFlags2["NonRest"] = 11] = "NonRest"; - return ElementFlags2; - })(ElementFlags || {}); - AccessFlags = /* @__PURE__ */ ((AccessFlags2) => { - AccessFlags2[AccessFlags2["None"] = 0] = "None"; - AccessFlags2[AccessFlags2["IncludeUndefined"] = 1] = "IncludeUndefined"; - AccessFlags2[AccessFlags2["NoIndexSignatures"] = 2] = "NoIndexSignatures"; - AccessFlags2[AccessFlags2["Writing"] = 4] = "Writing"; - AccessFlags2[AccessFlags2["CacheSymbol"] = 8] = "CacheSymbol"; - AccessFlags2[AccessFlags2["NoTupleBoundsCheck"] = 16] = "NoTupleBoundsCheck"; - AccessFlags2[AccessFlags2["ExpressionPosition"] = 32] = "ExpressionPosition"; - AccessFlags2[AccessFlags2["ReportDeprecated"] = 64] = "ReportDeprecated"; - AccessFlags2[AccessFlags2["SuppressNoImplicitAnyError"] = 128] = "SuppressNoImplicitAnyError"; - AccessFlags2[AccessFlags2["Contextual"] = 256] = "Contextual"; - AccessFlags2[AccessFlags2["Persistent"] = 1 /* IncludeUndefined */] = "Persistent"; - return AccessFlags2; - })(AccessFlags || {}); - IndexFlags = /* @__PURE__ */ ((IndexFlags2) => { - IndexFlags2[IndexFlags2["None"] = 0] = "None"; - IndexFlags2[IndexFlags2["StringsOnly"] = 1] = "StringsOnly"; - IndexFlags2[IndexFlags2["NoIndexSignatures"] = 2] = "NoIndexSignatures"; - IndexFlags2[IndexFlags2["NoReducibleCheck"] = 4] = "NoReducibleCheck"; - return IndexFlags2; - })(IndexFlags || {}); - JsxReferenceKind = /* @__PURE__ */ ((JsxReferenceKind2) => { - JsxReferenceKind2[JsxReferenceKind2["Component"] = 0] = "Component"; - JsxReferenceKind2[JsxReferenceKind2["Function"] = 1] = "Function"; - JsxReferenceKind2[JsxReferenceKind2["Mixed"] = 2] = "Mixed"; - return JsxReferenceKind2; - })(JsxReferenceKind || {}); - SignatureKind = /* @__PURE__ */ ((SignatureKind2) => { - SignatureKind2[SignatureKind2["Call"] = 0] = "Call"; - SignatureKind2[SignatureKind2["Construct"] = 1] = "Construct"; - return SignatureKind2; - })(SignatureKind || {}); - SignatureFlags = /* @__PURE__ */ ((SignatureFlags5) => { - SignatureFlags5[SignatureFlags5["None"] = 0] = "None"; - SignatureFlags5[SignatureFlags5["HasRestParameter"] = 1] = "HasRestParameter"; - SignatureFlags5[SignatureFlags5["HasLiteralTypes"] = 2] = "HasLiteralTypes"; - SignatureFlags5[SignatureFlags5["Abstract"] = 4] = "Abstract"; - SignatureFlags5[SignatureFlags5["IsInnerCallChain"] = 8] = "IsInnerCallChain"; - SignatureFlags5[SignatureFlags5["IsOuterCallChain"] = 16] = "IsOuterCallChain"; - SignatureFlags5[SignatureFlags5["IsUntypedSignatureInJSFile"] = 32] = "IsUntypedSignatureInJSFile"; - SignatureFlags5[SignatureFlags5["IsNonInferrable"] = 64] = "IsNonInferrable"; - SignatureFlags5[SignatureFlags5["IsSignatureCandidateForOverloadFailure"] = 128] = "IsSignatureCandidateForOverloadFailure"; - SignatureFlags5[SignatureFlags5["PropagatingFlags"] = 167] = "PropagatingFlags"; - SignatureFlags5[SignatureFlags5["CallChainFlags"] = 24] = "CallChainFlags"; - return SignatureFlags5; - })(SignatureFlags || {}); - IndexKind = /* @__PURE__ */ ((IndexKind2) => { - IndexKind2[IndexKind2["String"] = 0] = "String"; - IndexKind2[IndexKind2["Number"] = 1] = "Number"; - return IndexKind2; - })(IndexKind || {}); - TypeMapKind = /* @__PURE__ */ ((TypeMapKind2) => { - TypeMapKind2[TypeMapKind2["Simple"] = 0] = "Simple"; - TypeMapKind2[TypeMapKind2["Array"] = 1] = "Array"; - TypeMapKind2[TypeMapKind2["Deferred"] = 2] = "Deferred"; - TypeMapKind2[TypeMapKind2["Function"] = 3] = "Function"; - TypeMapKind2[TypeMapKind2["Composite"] = 4] = "Composite"; - TypeMapKind2[TypeMapKind2["Merged"] = 5] = "Merged"; - return TypeMapKind2; - })(TypeMapKind || {}); - InferencePriority = /* @__PURE__ */ ((InferencePriority2) => { - InferencePriority2[InferencePriority2["None"] = 0] = "None"; - InferencePriority2[InferencePriority2["NakedTypeVariable"] = 1] = "NakedTypeVariable"; - InferencePriority2[InferencePriority2["SpeculativeTuple"] = 2] = "SpeculativeTuple"; - InferencePriority2[InferencePriority2["SubstituteSource"] = 4] = "SubstituteSource"; - InferencePriority2[InferencePriority2["HomomorphicMappedType"] = 8] = "HomomorphicMappedType"; - InferencePriority2[InferencePriority2["PartialHomomorphicMappedType"] = 16] = "PartialHomomorphicMappedType"; - InferencePriority2[InferencePriority2["MappedTypeConstraint"] = 32] = "MappedTypeConstraint"; - InferencePriority2[InferencePriority2["ContravariantConditional"] = 64] = "ContravariantConditional"; - InferencePriority2[InferencePriority2["ReturnType"] = 128] = "ReturnType"; - InferencePriority2[InferencePriority2["LiteralKeyof"] = 256] = "LiteralKeyof"; - InferencePriority2[InferencePriority2["NoConstraints"] = 512] = "NoConstraints"; - InferencePriority2[InferencePriority2["AlwaysStrict"] = 1024] = "AlwaysStrict"; - InferencePriority2[InferencePriority2["MaxValue"] = 2048] = "MaxValue"; - InferencePriority2[InferencePriority2["PriorityImpliesCombination"] = 416] = "PriorityImpliesCombination"; - InferencePriority2[InferencePriority2["Circularity"] = -1] = "Circularity"; - return InferencePriority2; - })(InferencePriority || {}); - InferenceFlags = /* @__PURE__ */ ((InferenceFlags2) => { - InferenceFlags2[InferenceFlags2["None"] = 0] = "None"; - InferenceFlags2[InferenceFlags2["NoDefault"] = 1] = "NoDefault"; - InferenceFlags2[InferenceFlags2["AnyDefault"] = 2] = "AnyDefault"; - InferenceFlags2[InferenceFlags2["SkippedGenericFunction"] = 4] = "SkippedGenericFunction"; - return InferenceFlags2; - })(InferenceFlags || {}); - Ternary = /* @__PURE__ */ ((Ternary2) => { - Ternary2[Ternary2["False"] = 0] = "False"; - Ternary2[Ternary2["Unknown"] = 1] = "Unknown"; - Ternary2[Ternary2["Maybe"] = 3] = "Maybe"; - Ternary2[Ternary2["True"] = -1] = "True"; - return Ternary2; - })(Ternary || {}); - AssignmentDeclarationKind = /* @__PURE__ */ ((AssignmentDeclarationKind2) => { - AssignmentDeclarationKind2[AssignmentDeclarationKind2["None"] = 0] = "None"; - AssignmentDeclarationKind2[AssignmentDeclarationKind2["ExportsProperty"] = 1] = "ExportsProperty"; - AssignmentDeclarationKind2[AssignmentDeclarationKind2["ModuleExports"] = 2] = "ModuleExports"; - AssignmentDeclarationKind2[AssignmentDeclarationKind2["PrototypeProperty"] = 3] = "PrototypeProperty"; - AssignmentDeclarationKind2[AssignmentDeclarationKind2["ThisProperty"] = 4] = "ThisProperty"; - AssignmentDeclarationKind2[AssignmentDeclarationKind2["Property"] = 5] = "Property"; - AssignmentDeclarationKind2[AssignmentDeclarationKind2["Prototype"] = 6] = "Prototype"; - AssignmentDeclarationKind2[AssignmentDeclarationKind2["ObjectDefinePropertyValue"] = 7] = "ObjectDefinePropertyValue"; - AssignmentDeclarationKind2[AssignmentDeclarationKind2["ObjectDefinePropertyExports"] = 8] = "ObjectDefinePropertyExports"; - AssignmentDeclarationKind2[AssignmentDeclarationKind2["ObjectDefinePrototypeProperty"] = 9] = "ObjectDefinePrototypeProperty"; - return AssignmentDeclarationKind2; - })(AssignmentDeclarationKind || {}); - DiagnosticCategory = /* @__PURE__ */ ((DiagnosticCategory2) => { - DiagnosticCategory2[DiagnosticCategory2["Warning"] = 0] = "Warning"; - DiagnosticCategory2[DiagnosticCategory2["Error"] = 1] = "Error"; - DiagnosticCategory2[DiagnosticCategory2["Suggestion"] = 2] = "Suggestion"; - DiagnosticCategory2[DiagnosticCategory2["Message"] = 3] = "Message"; - return DiagnosticCategory2; - })(DiagnosticCategory || {}); - ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind3) => { - ModuleResolutionKind3[ModuleResolutionKind3["Classic"] = 1] = "Classic"; - ModuleResolutionKind3[ModuleResolutionKind3["NodeJs"] = 2] = "NodeJs"; - ModuleResolutionKind3[ModuleResolutionKind3["Node10"] = 2] = "Node10"; - ModuleResolutionKind3[ModuleResolutionKind3["Node16"] = 3] = "Node16"; - ModuleResolutionKind3[ModuleResolutionKind3["NodeNext"] = 99] = "NodeNext"; - ModuleResolutionKind3[ModuleResolutionKind3["Bundler"] = 100] = "Bundler"; - return ModuleResolutionKind3; - })(ModuleResolutionKind || {}); - ModuleDetectionKind = /* @__PURE__ */ ((ModuleDetectionKind2) => { - ModuleDetectionKind2[ModuleDetectionKind2["Legacy"] = 1] = "Legacy"; - ModuleDetectionKind2[ModuleDetectionKind2["Auto"] = 2] = "Auto"; - ModuleDetectionKind2[ModuleDetectionKind2["Force"] = 3] = "Force"; - return ModuleDetectionKind2; - })(ModuleDetectionKind || {}); - WatchFileKind = /* @__PURE__ */ ((WatchFileKind3) => { - WatchFileKind3[WatchFileKind3["FixedPollingInterval"] = 0] = "FixedPollingInterval"; - WatchFileKind3[WatchFileKind3["PriorityPollingInterval"] = 1] = "PriorityPollingInterval"; - WatchFileKind3[WatchFileKind3["DynamicPriorityPolling"] = 2] = "DynamicPriorityPolling"; - WatchFileKind3[WatchFileKind3["FixedChunkSizePolling"] = 3] = "FixedChunkSizePolling"; - WatchFileKind3[WatchFileKind3["UseFsEvents"] = 4] = "UseFsEvents"; - WatchFileKind3[WatchFileKind3["UseFsEventsOnParentDirectory"] = 5] = "UseFsEventsOnParentDirectory"; - return WatchFileKind3; - })(WatchFileKind || {}); - WatchDirectoryKind = /* @__PURE__ */ ((WatchDirectoryKind3) => { - WatchDirectoryKind3[WatchDirectoryKind3["UseFsEvents"] = 0] = "UseFsEvents"; - WatchDirectoryKind3[WatchDirectoryKind3["FixedPollingInterval"] = 1] = "FixedPollingInterval"; - WatchDirectoryKind3[WatchDirectoryKind3["DynamicPriorityPolling"] = 2] = "DynamicPriorityPolling"; - WatchDirectoryKind3[WatchDirectoryKind3["FixedChunkSizePolling"] = 3] = "FixedChunkSizePolling"; - return WatchDirectoryKind3; - })(WatchDirectoryKind || {}); - PollingWatchKind = /* @__PURE__ */ ((PollingWatchKind3) => { - PollingWatchKind3[PollingWatchKind3["FixedInterval"] = 0] = "FixedInterval"; - PollingWatchKind3[PollingWatchKind3["PriorityInterval"] = 1] = "PriorityInterval"; - PollingWatchKind3[PollingWatchKind3["DynamicPriority"] = 2] = "DynamicPriority"; - PollingWatchKind3[PollingWatchKind3["FixedChunkSize"] = 3] = "FixedChunkSize"; - return PollingWatchKind3; - })(PollingWatchKind || {}); - ModuleKind = /* @__PURE__ */ ((ModuleKind3) => { - ModuleKind3[ModuleKind3["None"] = 0] = "None"; - ModuleKind3[ModuleKind3["CommonJS"] = 1] = "CommonJS"; - ModuleKind3[ModuleKind3["AMD"] = 2] = "AMD"; - ModuleKind3[ModuleKind3["UMD"] = 3] = "UMD"; - ModuleKind3[ModuleKind3["System"] = 4] = "System"; - ModuleKind3[ModuleKind3["ES2015"] = 5] = "ES2015"; - ModuleKind3[ModuleKind3["ES2020"] = 6] = "ES2020"; - ModuleKind3[ModuleKind3["ES2022"] = 7] = "ES2022"; - ModuleKind3[ModuleKind3["ESNext"] = 99] = "ESNext"; - ModuleKind3[ModuleKind3["Node16"] = 100] = "Node16"; - ModuleKind3[ModuleKind3["NodeNext"] = 199] = "NodeNext"; - return ModuleKind3; - })(ModuleKind || {}); - JsxEmit = /* @__PURE__ */ ((JsxEmit3) => { - JsxEmit3[JsxEmit3["None"] = 0] = "None"; - JsxEmit3[JsxEmit3["Preserve"] = 1] = "Preserve"; - JsxEmit3[JsxEmit3["React"] = 2] = "React"; - JsxEmit3[JsxEmit3["ReactNative"] = 3] = "ReactNative"; - JsxEmit3[JsxEmit3["ReactJSX"] = 4] = "ReactJSX"; - JsxEmit3[JsxEmit3["ReactJSXDev"] = 5] = "ReactJSXDev"; - return JsxEmit3; - })(JsxEmit || {}); - ImportsNotUsedAsValues = /* @__PURE__ */ ((ImportsNotUsedAsValues2) => { - ImportsNotUsedAsValues2[ImportsNotUsedAsValues2["Remove"] = 0] = "Remove"; - ImportsNotUsedAsValues2[ImportsNotUsedAsValues2["Preserve"] = 1] = "Preserve"; - ImportsNotUsedAsValues2[ImportsNotUsedAsValues2["Error"] = 2] = "Error"; - return ImportsNotUsedAsValues2; - })(ImportsNotUsedAsValues || {}); - NewLineKind = /* @__PURE__ */ ((NewLineKind3) => { - NewLineKind3[NewLineKind3["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; - NewLineKind3[NewLineKind3["LineFeed"] = 1] = "LineFeed"; - return NewLineKind3; - })(NewLineKind || {}); - ScriptKind = /* @__PURE__ */ ((ScriptKind7) => { - ScriptKind7[ScriptKind7["Unknown"] = 0] = "Unknown"; - ScriptKind7[ScriptKind7["JS"] = 1] = "JS"; - ScriptKind7[ScriptKind7["JSX"] = 2] = "JSX"; - ScriptKind7[ScriptKind7["TS"] = 3] = "TS"; - ScriptKind7[ScriptKind7["TSX"] = 4] = "TSX"; - ScriptKind7[ScriptKind7["External"] = 5] = "External"; - ScriptKind7[ScriptKind7["JSON"] = 6] = "JSON"; - ScriptKind7[ScriptKind7["Deferred"] = 7] = "Deferred"; - return ScriptKind7; - })(ScriptKind || {}); - ScriptTarget = /* @__PURE__ */ ((ScriptTarget11) => { - ScriptTarget11[ScriptTarget11["ES3"] = 0] = "ES3"; - ScriptTarget11[ScriptTarget11["ES5"] = 1] = "ES5"; - ScriptTarget11[ScriptTarget11["ES2015"] = 2] = "ES2015"; - ScriptTarget11[ScriptTarget11["ES2016"] = 3] = "ES2016"; - ScriptTarget11[ScriptTarget11["ES2017"] = 4] = "ES2017"; - ScriptTarget11[ScriptTarget11["ES2018"] = 5] = "ES2018"; - ScriptTarget11[ScriptTarget11["ES2019"] = 6] = "ES2019"; - ScriptTarget11[ScriptTarget11["ES2020"] = 7] = "ES2020"; - ScriptTarget11[ScriptTarget11["ES2021"] = 8] = "ES2021"; - ScriptTarget11[ScriptTarget11["ES2022"] = 9] = "ES2022"; - ScriptTarget11[ScriptTarget11["ESNext"] = 99] = "ESNext"; - ScriptTarget11[ScriptTarget11["JSON"] = 100] = "JSON"; - ScriptTarget11[ScriptTarget11["Latest"] = 99 /* ESNext */] = "Latest"; - return ScriptTarget11; - })(ScriptTarget || {}); - LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => { - LanguageVariant4[LanguageVariant4["Standard"] = 0] = "Standard"; - LanguageVariant4[LanguageVariant4["JSX"] = 1] = "JSX"; - return LanguageVariant4; - })(LanguageVariant || {}); - WatchDirectoryFlags = /* @__PURE__ */ ((WatchDirectoryFlags3) => { - WatchDirectoryFlags3[WatchDirectoryFlags3["None"] = 0] = "None"; - WatchDirectoryFlags3[WatchDirectoryFlags3["Recursive"] = 1] = "Recursive"; - return WatchDirectoryFlags3; - })(WatchDirectoryFlags || {}); - CharacterCodes = /* @__PURE__ */ ((CharacterCodes2) => { - CharacterCodes2[CharacterCodes2["nullCharacter"] = 0] = "nullCharacter"; - CharacterCodes2[CharacterCodes2["maxAsciiCharacter"] = 127] = "maxAsciiCharacter"; - CharacterCodes2[CharacterCodes2["lineFeed"] = 10] = "lineFeed"; - CharacterCodes2[CharacterCodes2["carriageReturn"] = 13] = "carriageReturn"; - CharacterCodes2[CharacterCodes2["lineSeparator"] = 8232] = "lineSeparator"; - CharacterCodes2[CharacterCodes2["paragraphSeparator"] = 8233] = "paragraphSeparator"; - CharacterCodes2[CharacterCodes2["nextLine"] = 133] = "nextLine"; - CharacterCodes2[CharacterCodes2["space"] = 32] = "space"; - CharacterCodes2[CharacterCodes2["nonBreakingSpace"] = 160] = "nonBreakingSpace"; - CharacterCodes2[CharacterCodes2["enQuad"] = 8192] = "enQuad"; - CharacterCodes2[CharacterCodes2["emQuad"] = 8193] = "emQuad"; - CharacterCodes2[CharacterCodes2["enSpace"] = 8194] = "enSpace"; - CharacterCodes2[CharacterCodes2["emSpace"] = 8195] = "emSpace"; - CharacterCodes2[CharacterCodes2["threePerEmSpace"] = 8196] = "threePerEmSpace"; - CharacterCodes2[CharacterCodes2["fourPerEmSpace"] = 8197] = "fourPerEmSpace"; - CharacterCodes2[CharacterCodes2["sixPerEmSpace"] = 8198] = "sixPerEmSpace"; - CharacterCodes2[CharacterCodes2["figureSpace"] = 8199] = "figureSpace"; - CharacterCodes2[CharacterCodes2["punctuationSpace"] = 8200] = "punctuationSpace"; - CharacterCodes2[CharacterCodes2["thinSpace"] = 8201] = "thinSpace"; - CharacterCodes2[CharacterCodes2["hairSpace"] = 8202] = "hairSpace"; - CharacterCodes2[CharacterCodes2["zeroWidthSpace"] = 8203] = "zeroWidthSpace"; - CharacterCodes2[CharacterCodes2["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace"; - CharacterCodes2[CharacterCodes2["ideographicSpace"] = 12288] = "ideographicSpace"; - CharacterCodes2[CharacterCodes2["mathematicalSpace"] = 8287] = "mathematicalSpace"; - CharacterCodes2[CharacterCodes2["ogham"] = 5760] = "ogham"; - CharacterCodes2[CharacterCodes2["replacementCharacter"] = 65533] = "replacementCharacter"; - CharacterCodes2[CharacterCodes2["_"] = 95] = "_"; - CharacterCodes2[CharacterCodes2["$"] = 36] = "$"; - CharacterCodes2[CharacterCodes2["_0"] = 48] = "_0"; - CharacterCodes2[CharacterCodes2["_1"] = 49] = "_1"; - CharacterCodes2[CharacterCodes2["_2"] = 50] = "_2"; - CharacterCodes2[CharacterCodes2["_3"] = 51] = "_3"; - CharacterCodes2[CharacterCodes2["_4"] = 52] = "_4"; - CharacterCodes2[CharacterCodes2["_5"] = 53] = "_5"; - CharacterCodes2[CharacterCodes2["_6"] = 54] = "_6"; - CharacterCodes2[CharacterCodes2["_7"] = 55] = "_7"; - CharacterCodes2[CharacterCodes2["_8"] = 56] = "_8"; - CharacterCodes2[CharacterCodes2["_9"] = 57] = "_9"; - CharacterCodes2[CharacterCodes2["a"] = 97] = "a"; - CharacterCodes2[CharacterCodes2["b"] = 98] = "b"; - CharacterCodes2[CharacterCodes2["c"] = 99] = "c"; - CharacterCodes2[CharacterCodes2["d"] = 100] = "d"; - CharacterCodes2[CharacterCodes2["e"] = 101] = "e"; - CharacterCodes2[CharacterCodes2["f"] = 102] = "f"; - CharacterCodes2[CharacterCodes2["g"] = 103] = "g"; - CharacterCodes2[CharacterCodes2["h"] = 104] = "h"; - CharacterCodes2[CharacterCodes2["i"] = 105] = "i"; - CharacterCodes2[CharacterCodes2["j"] = 106] = "j"; - CharacterCodes2[CharacterCodes2["k"] = 107] = "k"; - CharacterCodes2[CharacterCodes2["l"] = 108] = "l"; - CharacterCodes2[CharacterCodes2["m"] = 109] = "m"; - CharacterCodes2[CharacterCodes2["n"] = 110] = "n"; - CharacterCodes2[CharacterCodes2["o"] = 111] = "o"; - CharacterCodes2[CharacterCodes2["p"] = 112] = "p"; - CharacterCodes2[CharacterCodes2["q"] = 113] = "q"; - CharacterCodes2[CharacterCodes2["r"] = 114] = "r"; - CharacterCodes2[CharacterCodes2["s"] = 115] = "s"; - CharacterCodes2[CharacterCodes2["t"] = 116] = "t"; - CharacterCodes2[CharacterCodes2["u"] = 117] = "u"; - CharacterCodes2[CharacterCodes2["v"] = 118] = "v"; - CharacterCodes2[CharacterCodes2["w"] = 119] = "w"; - CharacterCodes2[CharacterCodes2["x"] = 120] = "x"; - CharacterCodes2[CharacterCodes2["y"] = 121] = "y"; - CharacterCodes2[CharacterCodes2["z"] = 122] = "z"; - CharacterCodes2[CharacterCodes2["A"] = 65] = "A"; - CharacterCodes2[CharacterCodes2["B"] = 66] = "B"; - CharacterCodes2[CharacterCodes2["C"] = 67] = "C"; - CharacterCodes2[CharacterCodes2["D"] = 68] = "D"; - CharacterCodes2[CharacterCodes2["E"] = 69] = "E"; - CharacterCodes2[CharacterCodes2["F"] = 70] = "F"; - CharacterCodes2[CharacterCodes2["G"] = 71] = "G"; - CharacterCodes2[CharacterCodes2["H"] = 72] = "H"; - CharacterCodes2[CharacterCodes2["I"] = 73] = "I"; - CharacterCodes2[CharacterCodes2["J"] = 74] = "J"; - CharacterCodes2[CharacterCodes2["K"] = 75] = "K"; - CharacterCodes2[CharacterCodes2["L"] = 76] = "L"; - CharacterCodes2[CharacterCodes2["M"] = 77] = "M"; - CharacterCodes2[CharacterCodes2["N"] = 78] = "N"; - CharacterCodes2[CharacterCodes2["O"] = 79] = "O"; - CharacterCodes2[CharacterCodes2["P"] = 80] = "P"; - CharacterCodes2[CharacterCodes2["Q"] = 81] = "Q"; - CharacterCodes2[CharacterCodes2["R"] = 82] = "R"; - CharacterCodes2[CharacterCodes2["S"] = 83] = "S"; - CharacterCodes2[CharacterCodes2["T"] = 84] = "T"; - CharacterCodes2[CharacterCodes2["U"] = 85] = "U"; - CharacterCodes2[CharacterCodes2["V"] = 86] = "V"; - CharacterCodes2[CharacterCodes2["W"] = 87] = "W"; - CharacterCodes2[CharacterCodes2["X"] = 88] = "X"; - CharacterCodes2[CharacterCodes2["Y"] = 89] = "Y"; - CharacterCodes2[CharacterCodes2["Z"] = 90] = "Z"; - CharacterCodes2[CharacterCodes2["ampersand"] = 38] = "ampersand"; - CharacterCodes2[CharacterCodes2["asterisk"] = 42] = "asterisk"; - CharacterCodes2[CharacterCodes2["at"] = 64] = "at"; - CharacterCodes2[CharacterCodes2["backslash"] = 92] = "backslash"; - CharacterCodes2[CharacterCodes2["backtick"] = 96] = "backtick"; - CharacterCodes2[CharacterCodes2["bar"] = 124] = "bar"; - CharacterCodes2[CharacterCodes2["caret"] = 94] = "caret"; - CharacterCodes2[CharacterCodes2["closeBrace"] = 125] = "closeBrace"; - CharacterCodes2[CharacterCodes2["closeBracket"] = 93] = "closeBracket"; - CharacterCodes2[CharacterCodes2["closeParen"] = 41] = "closeParen"; - CharacterCodes2[CharacterCodes2["colon"] = 58] = "colon"; - CharacterCodes2[CharacterCodes2["comma"] = 44] = "comma"; - CharacterCodes2[CharacterCodes2["dot"] = 46] = "dot"; - CharacterCodes2[CharacterCodes2["doubleQuote"] = 34] = "doubleQuote"; - CharacterCodes2[CharacterCodes2["equals"] = 61] = "equals"; - CharacterCodes2[CharacterCodes2["exclamation"] = 33] = "exclamation"; - CharacterCodes2[CharacterCodes2["greaterThan"] = 62] = "greaterThan"; - CharacterCodes2[CharacterCodes2["hash"] = 35] = "hash"; - CharacterCodes2[CharacterCodes2["lessThan"] = 60] = "lessThan"; - CharacterCodes2[CharacterCodes2["minus"] = 45] = "minus"; - CharacterCodes2[CharacterCodes2["openBrace"] = 123] = "openBrace"; - CharacterCodes2[CharacterCodes2["openBracket"] = 91] = "openBracket"; - CharacterCodes2[CharacterCodes2["openParen"] = 40] = "openParen"; - CharacterCodes2[CharacterCodes2["percent"] = 37] = "percent"; - CharacterCodes2[CharacterCodes2["plus"] = 43] = "plus"; - CharacterCodes2[CharacterCodes2["question"] = 63] = "question"; - CharacterCodes2[CharacterCodes2["semicolon"] = 59] = "semicolon"; - CharacterCodes2[CharacterCodes2["singleQuote"] = 39] = "singleQuote"; - CharacterCodes2[CharacterCodes2["slash"] = 47] = "slash"; - CharacterCodes2[CharacterCodes2["tilde"] = 126] = "tilde"; - CharacterCodes2[CharacterCodes2["backspace"] = 8] = "backspace"; - CharacterCodes2[CharacterCodes2["formFeed"] = 12] = "formFeed"; - CharacterCodes2[CharacterCodes2["byteOrderMark"] = 65279] = "byteOrderMark"; - CharacterCodes2[CharacterCodes2["tab"] = 9] = "tab"; - CharacterCodes2[CharacterCodes2["verticalTab"] = 11] = "verticalTab"; - return CharacterCodes2; - })(CharacterCodes || {}); - Extension = /* @__PURE__ */ ((Extension2) => { - Extension2["Ts"] = ".ts"; - Extension2["Tsx"] = ".tsx"; - Extension2["Dts"] = ".d.ts"; - Extension2["Js"] = ".js"; - Extension2["Jsx"] = ".jsx"; - Extension2["Json"] = ".json"; - Extension2["TsBuildInfo"] = ".tsbuildinfo"; - Extension2["Mjs"] = ".mjs"; - Extension2["Mts"] = ".mts"; - Extension2["Dmts"] = ".d.mts"; - Extension2["Cjs"] = ".cjs"; - Extension2["Cts"] = ".cts"; - Extension2["Dcts"] = ".d.cts"; - return Extension2; - })(Extension || {}); - TransformFlags = /* @__PURE__ */ ((TransformFlags3) => { - TransformFlags3[TransformFlags3["None"] = 0] = "None"; - TransformFlags3[TransformFlags3["ContainsTypeScript"] = 1] = "ContainsTypeScript"; - TransformFlags3[TransformFlags3["ContainsJsx"] = 2] = "ContainsJsx"; - TransformFlags3[TransformFlags3["ContainsESNext"] = 4] = "ContainsESNext"; - TransformFlags3[TransformFlags3["ContainsES2022"] = 8] = "ContainsES2022"; - TransformFlags3[TransformFlags3["ContainsES2021"] = 16] = "ContainsES2021"; - TransformFlags3[TransformFlags3["ContainsES2020"] = 32] = "ContainsES2020"; - TransformFlags3[TransformFlags3["ContainsES2019"] = 64] = "ContainsES2019"; - TransformFlags3[TransformFlags3["ContainsES2018"] = 128] = "ContainsES2018"; - TransformFlags3[TransformFlags3["ContainsES2017"] = 256] = "ContainsES2017"; - TransformFlags3[TransformFlags3["ContainsES2016"] = 512] = "ContainsES2016"; - TransformFlags3[TransformFlags3["ContainsES2015"] = 1024] = "ContainsES2015"; - TransformFlags3[TransformFlags3["ContainsGenerator"] = 2048] = "ContainsGenerator"; - TransformFlags3[TransformFlags3["ContainsDestructuringAssignment"] = 4096] = "ContainsDestructuringAssignment"; - TransformFlags3[TransformFlags3["ContainsTypeScriptClassSyntax"] = 8192] = "ContainsTypeScriptClassSyntax"; - TransformFlags3[TransformFlags3["ContainsLexicalThis"] = 16384] = "ContainsLexicalThis"; - TransformFlags3[TransformFlags3["ContainsRestOrSpread"] = 32768] = "ContainsRestOrSpread"; - TransformFlags3[TransformFlags3["ContainsObjectRestOrSpread"] = 65536] = "ContainsObjectRestOrSpread"; - TransformFlags3[TransformFlags3["ContainsComputedPropertyName"] = 131072] = "ContainsComputedPropertyName"; - TransformFlags3[TransformFlags3["ContainsBlockScopedBinding"] = 262144] = "ContainsBlockScopedBinding"; - TransformFlags3[TransformFlags3["ContainsBindingPattern"] = 524288] = "ContainsBindingPattern"; - TransformFlags3[TransformFlags3["ContainsYield"] = 1048576] = "ContainsYield"; - TransformFlags3[TransformFlags3["ContainsAwait"] = 2097152] = "ContainsAwait"; - TransformFlags3[TransformFlags3["ContainsHoistedDeclarationOrCompletion"] = 4194304] = "ContainsHoistedDeclarationOrCompletion"; - TransformFlags3[TransformFlags3["ContainsDynamicImport"] = 8388608] = "ContainsDynamicImport"; - TransformFlags3[TransformFlags3["ContainsClassFields"] = 16777216] = "ContainsClassFields"; - TransformFlags3[TransformFlags3["ContainsDecorators"] = 33554432] = "ContainsDecorators"; - TransformFlags3[TransformFlags3["ContainsPossibleTopLevelAwait"] = 67108864] = "ContainsPossibleTopLevelAwait"; - TransformFlags3[TransformFlags3["ContainsLexicalSuper"] = 134217728] = "ContainsLexicalSuper"; - TransformFlags3[TransformFlags3["ContainsUpdateExpressionForIdentifier"] = 268435456] = "ContainsUpdateExpressionForIdentifier"; - TransformFlags3[TransformFlags3["ContainsPrivateIdentifierInExpression"] = 536870912] = "ContainsPrivateIdentifierInExpression"; - TransformFlags3[TransformFlags3["HasComputedFlags"] = -2147483648] = "HasComputedFlags"; - TransformFlags3[TransformFlags3["AssertTypeScript"] = 1 /* ContainsTypeScript */] = "AssertTypeScript"; - TransformFlags3[TransformFlags3["AssertJsx"] = 2 /* ContainsJsx */] = "AssertJsx"; - TransformFlags3[TransformFlags3["AssertESNext"] = 4 /* ContainsESNext */] = "AssertESNext"; - TransformFlags3[TransformFlags3["AssertES2022"] = 8 /* ContainsES2022 */] = "AssertES2022"; - TransformFlags3[TransformFlags3["AssertES2021"] = 16 /* ContainsES2021 */] = "AssertES2021"; - TransformFlags3[TransformFlags3["AssertES2020"] = 32 /* ContainsES2020 */] = "AssertES2020"; - TransformFlags3[TransformFlags3["AssertES2019"] = 64 /* ContainsES2019 */] = "AssertES2019"; - TransformFlags3[TransformFlags3["AssertES2018"] = 128 /* ContainsES2018 */] = "AssertES2018"; - TransformFlags3[TransformFlags3["AssertES2017"] = 256 /* ContainsES2017 */] = "AssertES2017"; - TransformFlags3[TransformFlags3["AssertES2016"] = 512 /* ContainsES2016 */] = "AssertES2016"; - TransformFlags3[TransformFlags3["AssertES2015"] = 1024 /* ContainsES2015 */] = "AssertES2015"; - TransformFlags3[TransformFlags3["AssertGenerator"] = 2048 /* ContainsGenerator */] = "AssertGenerator"; - TransformFlags3[TransformFlags3["AssertDestructuringAssignment"] = 4096 /* ContainsDestructuringAssignment */] = "AssertDestructuringAssignment"; - TransformFlags3[TransformFlags3["OuterExpressionExcludes"] = -2147483648 /* HasComputedFlags */] = "OuterExpressionExcludes"; - TransformFlags3[TransformFlags3["PropertyAccessExcludes"] = -2147483648 /* OuterExpressionExcludes */] = "PropertyAccessExcludes"; - TransformFlags3[TransformFlags3["NodeExcludes"] = -2147483648 /* PropertyAccessExcludes */] = "NodeExcludes"; - TransformFlags3[TransformFlags3["ArrowFunctionExcludes"] = -2072174592] = "ArrowFunctionExcludes"; - TransformFlags3[TransformFlags3["FunctionExcludes"] = -1937940480] = "FunctionExcludes"; - TransformFlags3[TransformFlags3["ConstructorExcludes"] = -1937948672] = "ConstructorExcludes"; - TransformFlags3[TransformFlags3["MethodOrAccessorExcludes"] = -2005057536] = "MethodOrAccessorExcludes"; - TransformFlags3[TransformFlags3["PropertyExcludes"] = -2013249536] = "PropertyExcludes"; - TransformFlags3[TransformFlags3["ClassExcludes"] = -2147344384] = "ClassExcludes"; - TransformFlags3[TransformFlags3["ModuleExcludes"] = -1941676032] = "ModuleExcludes"; - TransformFlags3[TransformFlags3["TypeExcludes"] = -2] = "TypeExcludes"; - TransformFlags3[TransformFlags3["ObjectLiteralExcludes"] = -2147278848] = "ObjectLiteralExcludes"; - TransformFlags3[TransformFlags3["ArrayLiteralOrCallOrNewExcludes"] = -2147450880] = "ArrayLiteralOrCallOrNewExcludes"; - TransformFlags3[TransformFlags3["VariableDeclarationListExcludes"] = -2146893824] = "VariableDeclarationListExcludes"; - TransformFlags3[TransformFlags3["ParameterExcludes"] = -2147483648 /* NodeExcludes */] = "ParameterExcludes"; - TransformFlags3[TransformFlags3["CatchClauseExcludes"] = -2147418112] = "CatchClauseExcludes"; - TransformFlags3[TransformFlags3["BindingPatternExcludes"] = -2147450880] = "BindingPatternExcludes"; - TransformFlags3[TransformFlags3["ContainsLexicalThisOrSuper"] = 134234112] = "ContainsLexicalThisOrSuper"; - TransformFlags3[TransformFlags3["PropertyNamePropagatingFlags"] = 134234112] = "PropertyNamePropagatingFlags"; - return TransformFlags3; - })(TransformFlags || {}); - SnippetKind = /* @__PURE__ */ ((SnippetKind3) => { - SnippetKind3[SnippetKind3["TabStop"] = 0] = "TabStop"; - SnippetKind3[SnippetKind3["Placeholder"] = 1] = "Placeholder"; - SnippetKind3[SnippetKind3["Choice"] = 2] = "Choice"; - SnippetKind3[SnippetKind3["Variable"] = 3] = "Variable"; - return SnippetKind3; - })(SnippetKind || {}); - EmitFlags = /* @__PURE__ */ ((EmitFlags3) => { - EmitFlags3[EmitFlags3["None"] = 0] = "None"; - EmitFlags3[EmitFlags3["SingleLine"] = 1] = "SingleLine"; - EmitFlags3[EmitFlags3["MultiLine"] = 2] = "MultiLine"; - EmitFlags3[EmitFlags3["AdviseOnEmitNode"] = 4] = "AdviseOnEmitNode"; - EmitFlags3[EmitFlags3["NoSubstitution"] = 8] = "NoSubstitution"; - EmitFlags3[EmitFlags3["CapturesThis"] = 16] = "CapturesThis"; - EmitFlags3[EmitFlags3["NoLeadingSourceMap"] = 32] = "NoLeadingSourceMap"; - EmitFlags3[EmitFlags3["NoTrailingSourceMap"] = 64] = "NoTrailingSourceMap"; - EmitFlags3[EmitFlags3["NoSourceMap"] = 96] = "NoSourceMap"; - EmitFlags3[EmitFlags3["NoNestedSourceMaps"] = 128] = "NoNestedSourceMaps"; - EmitFlags3[EmitFlags3["NoTokenLeadingSourceMaps"] = 256] = "NoTokenLeadingSourceMaps"; - EmitFlags3[EmitFlags3["NoTokenTrailingSourceMaps"] = 512] = "NoTokenTrailingSourceMaps"; - EmitFlags3[EmitFlags3["NoTokenSourceMaps"] = 768] = "NoTokenSourceMaps"; - EmitFlags3[EmitFlags3["NoLeadingComments"] = 1024] = "NoLeadingComments"; - EmitFlags3[EmitFlags3["NoTrailingComments"] = 2048] = "NoTrailingComments"; - EmitFlags3[EmitFlags3["NoComments"] = 3072] = "NoComments"; - EmitFlags3[EmitFlags3["NoNestedComments"] = 4096] = "NoNestedComments"; - EmitFlags3[EmitFlags3["HelperName"] = 8192] = "HelperName"; - EmitFlags3[EmitFlags3["ExportName"] = 16384] = "ExportName"; - EmitFlags3[EmitFlags3["LocalName"] = 32768] = "LocalName"; - EmitFlags3[EmitFlags3["InternalName"] = 65536] = "InternalName"; - EmitFlags3[EmitFlags3["Indented"] = 131072] = "Indented"; - EmitFlags3[EmitFlags3["NoIndentation"] = 262144] = "NoIndentation"; - EmitFlags3[EmitFlags3["AsyncFunctionBody"] = 524288] = "AsyncFunctionBody"; - EmitFlags3[EmitFlags3["ReuseTempVariableScope"] = 1048576] = "ReuseTempVariableScope"; - EmitFlags3[EmitFlags3["CustomPrologue"] = 2097152] = "CustomPrologue"; - EmitFlags3[EmitFlags3["NoHoisting"] = 4194304] = "NoHoisting"; - EmitFlags3[EmitFlags3["Iterator"] = 8388608] = "Iterator"; - EmitFlags3[EmitFlags3["NoAsciiEscaping"] = 16777216] = "NoAsciiEscaping"; - return EmitFlags3; - })(EmitFlags || {}); - InternalEmitFlags = /* @__PURE__ */ ((InternalEmitFlags3) => { - InternalEmitFlags3[InternalEmitFlags3["None"] = 0] = "None"; - InternalEmitFlags3[InternalEmitFlags3["TypeScriptClassWrapper"] = 1] = "TypeScriptClassWrapper"; - InternalEmitFlags3[InternalEmitFlags3["NeverApplyImportHelper"] = 2] = "NeverApplyImportHelper"; - InternalEmitFlags3[InternalEmitFlags3["IgnoreSourceNewlines"] = 4] = "IgnoreSourceNewlines"; - InternalEmitFlags3[InternalEmitFlags3["Immutable"] = 8] = "Immutable"; - InternalEmitFlags3[InternalEmitFlags3["IndirectCall"] = 16] = "IndirectCall"; - InternalEmitFlags3[InternalEmitFlags3["TransformPrivateStaticElements"] = 32] = "TransformPrivateStaticElements"; - return InternalEmitFlags3; - })(InternalEmitFlags || {}); - ExternalEmitHelpers = /* @__PURE__ */ ((ExternalEmitHelpers2) => { - ExternalEmitHelpers2[ExternalEmitHelpers2["Extends"] = 1] = "Extends"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Assign"] = 2] = "Assign"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Rest"] = 4] = "Rest"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Decorate"] = 8] = "Decorate"; - ExternalEmitHelpers2[ExternalEmitHelpers2["ESDecorateAndRunInitializers"] = 8 /* Decorate */] = "ESDecorateAndRunInitializers"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Metadata"] = 16] = "Metadata"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Param"] = 32] = "Param"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Awaiter"] = 64] = "Awaiter"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Generator"] = 128] = "Generator"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Values"] = 256] = "Values"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Read"] = 512] = "Read"; - ExternalEmitHelpers2[ExternalEmitHelpers2["SpreadArray"] = 1024] = "SpreadArray"; - ExternalEmitHelpers2[ExternalEmitHelpers2["Await"] = 2048] = "Await"; - ExternalEmitHelpers2[ExternalEmitHelpers2["AsyncGenerator"] = 4096] = "AsyncGenerator"; - ExternalEmitHelpers2[ExternalEmitHelpers2["AsyncDelegator"] = 8192] = "AsyncDelegator"; - ExternalEmitHelpers2[ExternalEmitHelpers2["AsyncValues"] = 16384] = "AsyncValues"; - ExternalEmitHelpers2[ExternalEmitHelpers2["ExportStar"] = 32768] = "ExportStar"; - ExternalEmitHelpers2[ExternalEmitHelpers2["ImportStar"] = 65536] = "ImportStar"; - ExternalEmitHelpers2[ExternalEmitHelpers2["ImportDefault"] = 131072] = "ImportDefault"; - ExternalEmitHelpers2[ExternalEmitHelpers2["MakeTemplateObject"] = 262144] = "MakeTemplateObject"; - ExternalEmitHelpers2[ExternalEmitHelpers2["ClassPrivateFieldGet"] = 524288] = "ClassPrivateFieldGet"; - ExternalEmitHelpers2[ExternalEmitHelpers2["ClassPrivateFieldSet"] = 1048576] = "ClassPrivateFieldSet"; - ExternalEmitHelpers2[ExternalEmitHelpers2["ClassPrivateFieldIn"] = 2097152] = "ClassPrivateFieldIn"; - ExternalEmitHelpers2[ExternalEmitHelpers2["CreateBinding"] = 4194304] = "CreateBinding"; - ExternalEmitHelpers2[ExternalEmitHelpers2["SetFunctionName"] = 8388608] = "SetFunctionName"; - ExternalEmitHelpers2[ExternalEmitHelpers2["PropKey"] = 16777216] = "PropKey"; - ExternalEmitHelpers2[ExternalEmitHelpers2["AddDisposableResourceAndDisposeResources"] = 33554432] = "AddDisposableResourceAndDisposeResources"; - ExternalEmitHelpers2[ExternalEmitHelpers2["FirstEmitHelper"] = 1 /* Extends */] = "FirstEmitHelper"; - ExternalEmitHelpers2[ExternalEmitHelpers2["LastEmitHelper"] = 33554432 /* AddDisposableResourceAndDisposeResources */] = "LastEmitHelper"; - ExternalEmitHelpers2[ExternalEmitHelpers2["ForOfIncludes"] = 256 /* Values */] = "ForOfIncludes"; - ExternalEmitHelpers2[ExternalEmitHelpers2["ForAwaitOfIncludes"] = 16384 /* AsyncValues */] = "ForAwaitOfIncludes"; - ExternalEmitHelpers2[ExternalEmitHelpers2["AsyncGeneratorIncludes"] = 6144] = "AsyncGeneratorIncludes"; - ExternalEmitHelpers2[ExternalEmitHelpers2["AsyncDelegatorIncludes"] = 26624] = "AsyncDelegatorIncludes"; - ExternalEmitHelpers2[ExternalEmitHelpers2["SpreadIncludes"] = 1536] = "SpreadIncludes"; - return ExternalEmitHelpers2; - })(ExternalEmitHelpers || {}); - EmitHint = /* @__PURE__ */ ((EmitHint6) => { - EmitHint6[EmitHint6["SourceFile"] = 0] = "SourceFile"; - EmitHint6[EmitHint6["Expression"] = 1] = "Expression"; - EmitHint6[EmitHint6["IdentifierName"] = 2] = "IdentifierName"; - EmitHint6[EmitHint6["MappedTypeParameter"] = 3] = "MappedTypeParameter"; - EmitHint6[EmitHint6["Unspecified"] = 4] = "Unspecified"; - EmitHint6[EmitHint6["EmbeddedStatement"] = 5] = "EmbeddedStatement"; - EmitHint6[EmitHint6["JsxAttributeValue"] = 6] = "JsxAttributeValue"; - return EmitHint6; - })(EmitHint || {}); - OuterExpressionKinds = /* @__PURE__ */ ((OuterExpressionKinds2) => { - OuterExpressionKinds2[OuterExpressionKinds2["Parentheses"] = 1] = "Parentheses"; - OuterExpressionKinds2[OuterExpressionKinds2["TypeAssertions"] = 2] = "TypeAssertions"; - OuterExpressionKinds2[OuterExpressionKinds2["NonNullAssertions"] = 4] = "NonNullAssertions"; - OuterExpressionKinds2[OuterExpressionKinds2["PartiallyEmittedExpressions"] = 8] = "PartiallyEmittedExpressions"; - OuterExpressionKinds2[OuterExpressionKinds2["Assertions"] = 6] = "Assertions"; - OuterExpressionKinds2[OuterExpressionKinds2["All"] = 15] = "All"; - OuterExpressionKinds2[OuterExpressionKinds2["ExcludeJSDocTypeAssertion"] = 16] = "ExcludeJSDocTypeAssertion"; - return OuterExpressionKinds2; - })(OuterExpressionKinds || {}); - LexicalEnvironmentFlags = /* @__PURE__ */ ((LexicalEnvironmentFlags2) => { - LexicalEnvironmentFlags2[LexicalEnvironmentFlags2["None"] = 0] = "None"; - LexicalEnvironmentFlags2[LexicalEnvironmentFlags2["InParameters"] = 1] = "InParameters"; - LexicalEnvironmentFlags2[LexicalEnvironmentFlags2["VariablesHoistedInParameters"] = 2] = "VariablesHoistedInParameters"; - return LexicalEnvironmentFlags2; - })(LexicalEnvironmentFlags || {}); - BundleFileSectionKind = /* @__PURE__ */ ((BundleFileSectionKind2) => { - BundleFileSectionKind2["Prologue"] = "prologue"; - BundleFileSectionKind2["EmitHelpers"] = "emitHelpers"; - BundleFileSectionKind2["NoDefaultLib"] = "no-default-lib"; - BundleFileSectionKind2["Reference"] = "reference"; - BundleFileSectionKind2["Type"] = "type"; - BundleFileSectionKind2["TypeResolutionModeRequire"] = "type-require"; - BundleFileSectionKind2["TypeResolutionModeImport"] = "type-import"; - BundleFileSectionKind2["Lib"] = "lib"; - BundleFileSectionKind2["Prepend"] = "prepend"; - BundleFileSectionKind2["Text"] = "text"; - BundleFileSectionKind2["Internal"] = "internal"; - return BundleFileSectionKind2; - })(BundleFileSectionKind || {}); - ListFormat = /* @__PURE__ */ ((ListFormat2) => { - ListFormat2[ListFormat2["None"] = 0] = "None"; - ListFormat2[ListFormat2["SingleLine"] = 0] = "SingleLine"; - ListFormat2[ListFormat2["MultiLine"] = 1] = "MultiLine"; - ListFormat2[ListFormat2["PreserveLines"] = 2] = "PreserveLines"; - ListFormat2[ListFormat2["LinesMask"] = 3] = "LinesMask"; - ListFormat2[ListFormat2["NotDelimited"] = 0] = "NotDelimited"; - ListFormat2[ListFormat2["BarDelimited"] = 4] = "BarDelimited"; - ListFormat2[ListFormat2["AmpersandDelimited"] = 8] = "AmpersandDelimited"; - ListFormat2[ListFormat2["CommaDelimited"] = 16] = "CommaDelimited"; - ListFormat2[ListFormat2["AsteriskDelimited"] = 32] = "AsteriskDelimited"; - ListFormat2[ListFormat2["DelimitersMask"] = 60] = "DelimitersMask"; - ListFormat2[ListFormat2["AllowTrailingComma"] = 64] = "AllowTrailingComma"; - ListFormat2[ListFormat2["Indented"] = 128] = "Indented"; - ListFormat2[ListFormat2["SpaceBetweenBraces"] = 256] = "SpaceBetweenBraces"; - ListFormat2[ListFormat2["SpaceBetweenSiblings"] = 512] = "SpaceBetweenSiblings"; - ListFormat2[ListFormat2["Braces"] = 1024] = "Braces"; - ListFormat2[ListFormat2["Parenthesis"] = 2048] = "Parenthesis"; - ListFormat2[ListFormat2["AngleBrackets"] = 4096] = "AngleBrackets"; - ListFormat2[ListFormat2["SquareBrackets"] = 8192] = "SquareBrackets"; - ListFormat2[ListFormat2["BracketsMask"] = 15360] = "BracketsMask"; - ListFormat2[ListFormat2["OptionalIfUndefined"] = 16384] = "OptionalIfUndefined"; - ListFormat2[ListFormat2["OptionalIfEmpty"] = 32768] = "OptionalIfEmpty"; - ListFormat2[ListFormat2["Optional"] = 49152] = "Optional"; - ListFormat2[ListFormat2["PreferNewLine"] = 65536] = "PreferNewLine"; - ListFormat2[ListFormat2["NoTrailingNewLine"] = 131072] = "NoTrailingNewLine"; - ListFormat2[ListFormat2["NoInterveningComments"] = 262144] = "NoInterveningComments"; - ListFormat2[ListFormat2["NoSpaceIfEmpty"] = 524288] = "NoSpaceIfEmpty"; - ListFormat2[ListFormat2["SingleElement"] = 1048576] = "SingleElement"; - ListFormat2[ListFormat2["SpaceAfterList"] = 2097152] = "SpaceAfterList"; - ListFormat2[ListFormat2["Modifiers"] = 2359808] = "Modifiers"; - ListFormat2[ListFormat2["HeritageClauses"] = 512] = "HeritageClauses"; - ListFormat2[ListFormat2["SingleLineTypeLiteralMembers"] = 768] = "SingleLineTypeLiteralMembers"; - ListFormat2[ListFormat2["MultiLineTypeLiteralMembers"] = 32897] = "MultiLineTypeLiteralMembers"; - ListFormat2[ListFormat2["SingleLineTupleTypeElements"] = 528] = "SingleLineTupleTypeElements"; - ListFormat2[ListFormat2["MultiLineTupleTypeElements"] = 657] = "MultiLineTupleTypeElements"; - ListFormat2[ListFormat2["UnionTypeConstituents"] = 516] = "UnionTypeConstituents"; - ListFormat2[ListFormat2["IntersectionTypeConstituents"] = 520] = "IntersectionTypeConstituents"; - ListFormat2[ListFormat2["ObjectBindingPatternElements"] = 525136] = "ObjectBindingPatternElements"; - ListFormat2[ListFormat2["ArrayBindingPatternElements"] = 524880] = "ArrayBindingPatternElements"; - ListFormat2[ListFormat2["ObjectLiteralExpressionProperties"] = 526226] = "ObjectLiteralExpressionProperties"; - ListFormat2[ListFormat2["ImportClauseEntries"] = 526226] = "ImportClauseEntries"; - ListFormat2[ListFormat2["ArrayLiteralExpressionElements"] = 8914] = "ArrayLiteralExpressionElements"; - ListFormat2[ListFormat2["CommaListElements"] = 528] = "CommaListElements"; - ListFormat2[ListFormat2["CallExpressionArguments"] = 2576] = "CallExpressionArguments"; - ListFormat2[ListFormat2["NewExpressionArguments"] = 18960] = "NewExpressionArguments"; - ListFormat2[ListFormat2["TemplateExpressionSpans"] = 262144] = "TemplateExpressionSpans"; - ListFormat2[ListFormat2["SingleLineBlockStatements"] = 768] = "SingleLineBlockStatements"; - ListFormat2[ListFormat2["MultiLineBlockStatements"] = 129] = "MultiLineBlockStatements"; - ListFormat2[ListFormat2["VariableDeclarationList"] = 528] = "VariableDeclarationList"; - ListFormat2[ListFormat2["SingleLineFunctionBodyStatements"] = 768] = "SingleLineFunctionBodyStatements"; - ListFormat2[ListFormat2["MultiLineFunctionBodyStatements"] = 1 /* MultiLine */] = "MultiLineFunctionBodyStatements"; - ListFormat2[ListFormat2["ClassHeritageClauses"] = 0 /* SingleLine */] = "ClassHeritageClauses"; - ListFormat2[ListFormat2["ClassMembers"] = 129] = "ClassMembers"; - ListFormat2[ListFormat2["InterfaceMembers"] = 129] = "InterfaceMembers"; - ListFormat2[ListFormat2["EnumMembers"] = 145] = "EnumMembers"; - ListFormat2[ListFormat2["CaseBlockClauses"] = 129] = "CaseBlockClauses"; - ListFormat2[ListFormat2["NamedImportsOrExportsElements"] = 525136] = "NamedImportsOrExportsElements"; - ListFormat2[ListFormat2["JsxElementOrFragmentChildren"] = 262144] = "JsxElementOrFragmentChildren"; - ListFormat2[ListFormat2["JsxElementAttributes"] = 262656] = "JsxElementAttributes"; - ListFormat2[ListFormat2["CaseOrDefaultClauseStatements"] = 163969] = "CaseOrDefaultClauseStatements"; - ListFormat2[ListFormat2["HeritageClauseTypes"] = 528] = "HeritageClauseTypes"; - ListFormat2[ListFormat2["SourceFileStatements"] = 131073] = "SourceFileStatements"; - ListFormat2[ListFormat2["Decorators"] = 2146305] = "Decorators"; - ListFormat2[ListFormat2["TypeArguments"] = 53776] = "TypeArguments"; - ListFormat2[ListFormat2["TypeParameters"] = 53776] = "TypeParameters"; - ListFormat2[ListFormat2["Parameters"] = 2576] = "Parameters"; - ListFormat2[ListFormat2["IndexSignatureParameters"] = 8848] = "IndexSignatureParameters"; - ListFormat2[ListFormat2["JSDocComment"] = 33] = "JSDocComment"; - return ListFormat2; - })(ListFormat || {}); - PragmaKindFlags = /* @__PURE__ */ ((PragmaKindFlags2) => { - PragmaKindFlags2[PragmaKindFlags2["None"] = 0] = "None"; - PragmaKindFlags2[PragmaKindFlags2["TripleSlashXML"] = 1] = "TripleSlashXML"; - PragmaKindFlags2[PragmaKindFlags2["SingleLine"] = 2] = "SingleLine"; - PragmaKindFlags2[PragmaKindFlags2["MultiLine"] = 4] = "MultiLine"; - PragmaKindFlags2[PragmaKindFlags2["All"] = 7] = "All"; - PragmaKindFlags2[PragmaKindFlags2["Default"] = 7 /* All */] = "Default"; - return PragmaKindFlags2; - })(PragmaKindFlags || {}); - commentPragmas = { - "reference": { - args: [ - { name: "types", optional: true, captureSpan: true }, - { name: "lib", optional: true, captureSpan: true }, - { name: "path", optional: true, captureSpan: true }, - { name: "no-default-lib", optional: true }, - { name: "resolution-mode", optional: true } - ], - kind: 1 /* TripleSlashXML */ - }, - "amd-dependency": { - args: [{ name: "path" }, { name: "name", optional: true }], - kind: 1 /* TripleSlashXML */ - }, - "amd-module": { - args: [{ name: "name" }], - kind: 1 /* TripleSlashXML */ - }, - "ts-check": { - kind: 2 /* SingleLine */ - }, - "ts-nocheck": { - kind: 2 /* SingleLine */ - }, - "jsx": { - args: [{ name: "factory" }], - kind: 4 /* MultiLine */ - }, - "jsxfrag": { - args: [{ name: "factory" }], - kind: 4 /* MultiLine */ - }, - "jsximportsource": { - args: [{ name: "factory" }], - kind: 4 /* MultiLine */ - }, - "jsxruntime": { - args: [{ name: "factory" }], - kind: 4 /* MultiLine */ - } - }; - } - }); - - // src/compiler/sys.ts - function generateDjb2Hash(data) { - let acc = 5381; - for (let i = 0; i < data.length; i++) { - acc = (acc << 5) + acc + data.charCodeAt(i); - } - return acc.toString(); - } - function setStackTraceLimit() { - if (Error.stackTraceLimit < 100) { - Error.stackTraceLimit = 100; - } - } - function getModifiedTime(host, fileName) { - return host.getModifiedTime(fileName) || missingFileModifiedTime; - } - function createPollingIntervalBasedLevels(levels) { - return { - [250 /* Low */]: levels.Low, - [500 /* Medium */]: levels.Medium, - [2e3 /* High */]: levels.High - }; - } - function setCustomPollingValues(system) { - if (!system.getEnvironmentVariable) { - return; - } - const pollingIntervalChanged = setCustomLevels("TSC_WATCH_POLLINGINTERVAL", PollingInterval); - pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize; - unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || unchangedPollThresholds; - function getLevel(envVar, level) { - return system.getEnvironmentVariable(`${envVar}_${level.toUpperCase()}`); - } - function getCustomLevels(baseVariable) { - let customLevels; - setCustomLevel("Low"); - setCustomLevel("Medium"); - setCustomLevel("High"); - return customLevels; - function setCustomLevel(level) { - const customLevel = getLevel(baseVariable, level); - if (customLevel) { - (customLevels || (customLevels = {}))[level] = Number(customLevel); - } - } - } - function setCustomLevels(baseVariable, levels) { - const customLevels = getCustomLevels(baseVariable); - if (customLevels) { - setLevel("Low"); - setLevel("Medium"); - setLevel("High"); - return true; - } - return false; - function setLevel(level) { - levels[level] = customLevels[level] || levels[level]; - } - } - function getCustomPollingBasedLevels(baseVariable, defaultLevels) { - const customLevels = getCustomLevels(baseVariable); - return (pollingIntervalChanged || customLevels) && createPollingIntervalBasedLevels(customLevels ? { ...defaultLevels, ...customLevels } : defaultLevels); - } - } - function pollWatchedFileQueue(host, queue, pollIndex, chunkSize, callbackOnWatchFileStat) { - let definedValueCopyToIndex = pollIndex; - for (let canVisit = queue.length; chunkSize && canVisit; nextPollIndex(), canVisit--) { - const watchedFile = queue[pollIndex]; - if (!watchedFile) { - continue; - } else if (watchedFile.isClosed) { - queue[pollIndex] = void 0; - continue; - } - chunkSize--; - const fileChanged = onWatchedFileStat(watchedFile, getModifiedTime(host, watchedFile.fileName)); - if (watchedFile.isClosed) { - queue[pollIndex] = void 0; - continue; - } - callbackOnWatchFileStat == null ? void 0 : callbackOnWatchFileStat(watchedFile, pollIndex, fileChanged); - if (queue[pollIndex]) { - if (definedValueCopyToIndex < pollIndex) { - queue[definedValueCopyToIndex] = watchedFile; - queue[pollIndex] = void 0; - } - definedValueCopyToIndex++; - } - } - return pollIndex; - function nextPollIndex() { - pollIndex++; - if (pollIndex === queue.length) { - if (definedValueCopyToIndex < pollIndex) { - queue.length = definedValueCopyToIndex; - } - pollIndex = 0; - definedValueCopyToIndex = 0; - } - } - } - function createDynamicPriorityPollingWatchFile(host) { - const watchedFiles = []; - const changedFilesInLastPoll = []; - const lowPollingIntervalQueue = createPollingIntervalQueue(250 /* Low */); - const mediumPollingIntervalQueue = createPollingIntervalQueue(500 /* Medium */); - const highPollingIntervalQueue = createPollingIntervalQueue(2e3 /* High */); - return watchFile2; - function watchFile2(fileName, callback, defaultPollingInterval) { - const file = { - fileName, - callback, - unchangedPolls: 0, - mtime: getModifiedTime(host, fileName) - }; - watchedFiles.push(file); - addToPollingIntervalQueue(file, defaultPollingInterval); - return { - close: () => { - file.isClosed = true; - unorderedRemoveItem(watchedFiles, file); - } - }; - } - function createPollingIntervalQueue(pollingInterval) { - const queue = []; - queue.pollingInterval = pollingInterval; - queue.pollIndex = 0; - queue.pollScheduled = false; - return queue; - } - function pollPollingIntervalQueue(_timeoutType, queue) { - queue.pollIndex = pollQueue(queue, queue.pollingInterval, queue.pollIndex, pollingChunkSize[queue.pollingInterval]); - if (queue.length) { - scheduleNextPoll(queue.pollingInterval); - } else { - Debug.assert(queue.pollIndex === 0); - queue.pollScheduled = false; - } - } - function pollLowPollingIntervalQueue(_timeoutType, queue) { - pollQueue( - changedFilesInLastPoll, - 250 /* Low */, - /*pollIndex*/ - 0, - changedFilesInLastPoll.length - ); - pollPollingIntervalQueue(_timeoutType, queue); - if (!queue.pollScheduled && changedFilesInLastPoll.length) { - scheduleNextPoll(250 /* Low */); - } - } - function pollQueue(queue, pollingInterval, pollIndex, chunkSize) { - return pollWatchedFileQueue( - host, - queue, - pollIndex, - chunkSize, - onWatchFileStat - ); - function onWatchFileStat(watchedFile, pollIndex2, fileChanged) { - if (fileChanged) { - watchedFile.unchangedPolls = 0; - if (queue !== changedFilesInLastPoll) { - queue[pollIndex2] = void 0; - addChangedFileToLowPollingIntervalQueue(watchedFile); - } - } else if (watchedFile.unchangedPolls !== unchangedPollThresholds[pollingInterval]) { - watchedFile.unchangedPolls++; - } else if (queue === changedFilesInLastPoll) { - watchedFile.unchangedPolls = 1; - queue[pollIndex2] = void 0; - addToPollingIntervalQueue(watchedFile, 250 /* Low */); - } else if (pollingInterval !== 2e3 /* High */) { - watchedFile.unchangedPolls++; - queue[pollIndex2] = void 0; - addToPollingIntervalQueue(watchedFile, pollingInterval === 250 /* Low */ ? 500 /* Medium */ : 2e3 /* High */); - } - } - } - function pollingIntervalQueue(pollingInterval) { - switch (pollingInterval) { - case 250 /* Low */: - return lowPollingIntervalQueue; - case 500 /* Medium */: - return mediumPollingIntervalQueue; - case 2e3 /* High */: - return highPollingIntervalQueue; - } - } - function addToPollingIntervalQueue(file, pollingInterval) { - pollingIntervalQueue(pollingInterval).push(file); - scheduleNextPollIfNotAlreadyScheduled(pollingInterval); - } - function addChangedFileToLowPollingIntervalQueue(file) { - changedFilesInLastPoll.push(file); - scheduleNextPollIfNotAlreadyScheduled(250 /* Low */); - } - function scheduleNextPollIfNotAlreadyScheduled(pollingInterval) { - if (!pollingIntervalQueue(pollingInterval).pollScheduled) { - scheduleNextPoll(pollingInterval); - } - } - function scheduleNextPoll(pollingInterval) { - pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 /* Low */ ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 /* Low */ ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval)); - } - } - function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2) { - const fileWatcherCallbacks = createMultiMap(); - const dirWatchers = /* @__PURE__ */ new Map(); - const toCanonicalName = createGetCanonicalFileName(useCaseSensitiveFileNames2); - return nonPollingWatchFile; - function nonPollingWatchFile(fileName, callback, _pollingInterval, fallbackOptions) { - const filePath = toCanonicalName(fileName); - fileWatcherCallbacks.add(filePath, callback); - const dirPath = getDirectoryPath(filePath) || "."; - const watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(getDirectoryPath(fileName) || ".", dirPath, fallbackOptions); - watcher.referenceCount++; - return { - close: () => { - if (watcher.referenceCount === 1) { - watcher.close(); - dirWatchers.delete(dirPath); - } else { - watcher.referenceCount--; - } - fileWatcherCallbacks.remove(filePath, callback); - } - }; - } - function createDirectoryWatcher(dirName, dirPath, fallbackOptions) { - const watcher = fsWatch( - dirName, - 1 /* Directory */, - (_eventName, relativeFileName, modifiedTime) => { - if (!isString(relativeFileName)) - return; - const fileName = getNormalizedAbsolutePath(relativeFileName, dirName); - const callbacks = fileName && fileWatcherCallbacks.get(toCanonicalName(fileName)); - if (callbacks) { - for (const fileCallback of callbacks) { - fileCallback(fileName, 1 /* Changed */, modifiedTime); - } - } - }, - /*recursive*/ - false, - 500 /* Medium */, - fallbackOptions - ); - watcher.referenceCount = 0; - dirWatchers.set(dirPath, watcher); - return watcher; - } - } - function createFixedChunkSizePollingWatchFile(host) { - const watchedFiles = []; - let pollIndex = 0; - let pollScheduled; - return watchFile2; - function watchFile2(fileName, callback) { - const file = { - fileName, - callback, - mtime: getModifiedTime(host, fileName) - }; - watchedFiles.push(file); - scheduleNextPoll(); - return { - close: () => { - file.isClosed = true; - unorderedRemoveItem(watchedFiles, file); - } - }; - } - function pollQueue() { - pollScheduled = void 0; - pollIndex = pollWatchedFileQueue(host, watchedFiles, pollIndex, pollingChunkSize[250 /* Low */]); - scheduleNextPoll(); - } - function scheduleNextPoll() { - if (!watchedFiles.length || pollScheduled) - return; - pollScheduled = host.setTimeout(pollQueue, 2e3 /* High */, "pollQueue"); - } - } - function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) { - const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); - const path = toCanonicalFileName(name); - const existing = cache.get(path); - if (existing) { - existing.callbacks.push(callback); - } else { - cache.set(path, { - watcher: createWatcher( - // Cant infer types correctly so lets satisfy checker - (param1, param2, param3) => { - var _a; - return (_a = cache.get(path)) == null ? void 0 : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3)); - } - ), - callbacks: [callback] - }); - } - return { - close: () => { - const watcher = cache.get(path); - if (!watcher) - return; - if (!orderedRemoveItem(watcher.callbacks, callback) || watcher.callbacks.length) - return; - cache.delete(path); - closeFileWatcherOf(watcher); - } - }; - } - function onWatchedFileStat(watchedFile, modifiedTime) { - const oldTime = watchedFile.mtime.getTime(); - const newTime = modifiedTime.getTime(); - if (oldTime !== newTime) { - watchedFile.mtime = modifiedTime; - watchedFile.callback(watchedFile.fileName, getFileWatcherEventKind(oldTime, newTime), modifiedTime); - return true; - } - return false; - } - function getFileWatcherEventKind(oldTime, newTime) { - return oldTime === 0 ? 0 /* Created */ : newTime === 0 ? 2 /* Deleted */ : 1 /* Changed */; - } - function sysLog(s) { - return curSysLog(s); - } - function setSysLog(logger) { - curSysLog = logger; - } - function createDirectoryWatcherSupportingRecursive({ - watchDirectory, - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - getCurrentDirectory, - getAccessibleSortedChildDirectories, - fileSystemEntryExists, - realpath, - setTimeout: setTimeout2, - clearTimeout: clearTimeout2 - }) { - const cache = /* @__PURE__ */ new Map(); - const callbackCache = createMultiMap(); - const cacheToUpdateChildWatches = /* @__PURE__ */ new Map(); - let timerToUpdateChildWatches; - const filePathComparer = getStringComparer(!useCaseSensitiveFileNames2); - const toCanonicalFilePath = createGetCanonicalFileName(useCaseSensitiveFileNames2); - return (dirName, callback, recursive, options) => recursive ? createDirectoryWatcher(dirName, options, callback) : watchDirectory(dirName, callback, recursive, options); - function createDirectoryWatcher(dirName, options, callback) { - const dirPath = toCanonicalFilePath(dirName); - let directoryWatcher = cache.get(dirPath); - if (directoryWatcher) { - directoryWatcher.refCount++; - } else { - directoryWatcher = { - watcher: watchDirectory( - dirName, - (fileName) => { - if (isIgnoredPath(fileName, options)) - return; - if (options == null ? void 0 : options.synchronousWatchDirectory) { - invokeCallbacks(dirPath, fileName); - updateChildWatches(dirName, dirPath, options); - } else { - nonSyncUpdateChildWatches(dirName, dirPath, fileName, options); - } - }, - /*recursive*/ - false, - options - ), - refCount: 1, - childWatches: emptyArray - }; - cache.set(dirPath, directoryWatcher); - updateChildWatches(dirName, dirPath, options); - } - const callbackToAdd = callback && { dirName, callback }; - if (callbackToAdd) { - callbackCache.add(dirPath, callbackToAdd); - } - return { - dirName, - close: () => { - const directoryWatcher2 = Debug.checkDefined(cache.get(dirPath)); - if (callbackToAdd) - callbackCache.remove(dirPath, callbackToAdd); - directoryWatcher2.refCount--; - if (directoryWatcher2.refCount) - return; - cache.delete(dirPath); - closeFileWatcherOf(directoryWatcher2); - directoryWatcher2.childWatches.forEach(closeFileWatcher); - } - }; - } - function invokeCallbacks(dirPath, fileNameOrInvokeMap, fileNames) { - let fileName; - let invokeMap; - if (isString(fileNameOrInvokeMap)) { - fileName = fileNameOrInvokeMap; - } else { - invokeMap = fileNameOrInvokeMap; - } - callbackCache.forEach((callbacks, rootDirName) => { - if (invokeMap && invokeMap.get(rootDirName) === true) - return; - if (rootDirName === dirPath || startsWith(dirPath, rootDirName) && dirPath[rootDirName.length] === directorySeparator) { - if (invokeMap) { - if (fileNames) { - const existing = invokeMap.get(rootDirName); - if (existing) { - existing.push(...fileNames); - } else { - invokeMap.set(rootDirName, fileNames.slice()); - } - } else { - invokeMap.set(rootDirName, true); - } - } else { - callbacks.forEach(({ callback }) => callback(fileName)); - } - } - }); - } - function nonSyncUpdateChildWatches(dirName, dirPath, fileName, options) { - const parentWatcher = cache.get(dirPath); - if (parentWatcher && fileSystemEntryExists(dirName, 1 /* Directory */)) { - scheduleUpdateChildWatches(dirName, dirPath, fileName, options); - return; - } - invokeCallbacks(dirPath, fileName); - removeChildWatches(parentWatcher); - } - function scheduleUpdateChildWatches(dirName, dirPath, fileName, options) { - const existing = cacheToUpdateChildWatches.get(dirPath); - if (existing) { - existing.fileNames.push(fileName); - } else { - cacheToUpdateChildWatches.set(dirPath, { dirName, options, fileNames: [fileName] }); - } - if (timerToUpdateChildWatches) { - clearTimeout2(timerToUpdateChildWatches); - timerToUpdateChildWatches = void 0; - } - timerToUpdateChildWatches = setTimeout2(onTimerToUpdateChildWatches, 1e3, "timerToUpdateChildWatches"); - } - function onTimerToUpdateChildWatches() { - timerToUpdateChildWatches = void 0; - sysLog(`sysLog:: onTimerToUpdateChildWatches:: ${cacheToUpdateChildWatches.size}`); - const start = timestamp(); - const invokeMap = /* @__PURE__ */ new Map(); - while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) { - const result = cacheToUpdateChildWatches.entries().next(); - Debug.assert(!result.done); - const { value: [dirPath, { dirName, options, fileNames }] } = result; - cacheToUpdateChildWatches.delete(dirPath); - const hasChanges = updateChildWatches(dirName, dirPath, options); - invokeCallbacks(dirPath, invokeMap, hasChanges ? void 0 : fileNames); - } - sysLog(`sysLog:: invokingWatchers:: Elapsed:: ${timestamp() - start}ms:: ${cacheToUpdateChildWatches.size}`); - callbackCache.forEach((callbacks, rootDirName) => { - const existing = invokeMap.get(rootDirName); - if (existing) { - callbacks.forEach(({ callback, dirName }) => { - if (isArray(existing)) { - existing.forEach(callback); - } else { - callback(dirName); - } - }); - } - }); - const elapsed = timestamp() - start; - sysLog(`sysLog:: Elapsed:: ${elapsed}ms:: onTimerToUpdateChildWatches:: ${cacheToUpdateChildWatches.size} ${timerToUpdateChildWatches}`); - } - function removeChildWatches(parentWatcher) { - if (!parentWatcher) - return; - const existingChildWatches = parentWatcher.childWatches; - parentWatcher.childWatches = emptyArray; - for (const childWatcher of existingChildWatches) { - childWatcher.close(); - removeChildWatches(cache.get(toCanonicalFilePath(childWatcher.dirName))); - } - } - function updateChildWatches(parentDir, parentDirPath, options) { - const parentWatcher = cache.get(parentDirPath); - if (!parentWatcher) - return false; - let newChildWatches; - const hasChanges = enumerateInsertsAndDeletes( - fileSystemEntryExists(parentDir, 1 /* Directory */) ? mapDefined(getAccessibleSortedChildDirectories(parentDir), (child) => { - const childFullName = getNormalizedAbsolutePath(child, parentDir); - return !isIgnoredPath(childFullName, options) && filePathComparer(childFullName, normalizePath(realpath(childFullName))) === 0 /* EqualTo */ ? childFullName : void 0; - }) : emptyArray, - parentWatcher.childWatches, - (child, childWatcher) => filePathComparer(child, childWatcher.dirName), - createAndAddChildDirectoryWatcher, - closeFileWatcher, - addChildDirectoryWatcher - ); - parentWatcher.childWatches = newChildWatches || emptyArray; - return hasChanges; - function createAndAddChildDirectoryWatcher(childName) { - const result = createDirectoryWatcher(childName, options); - addChildDirectoryWatcher(result); - } - function addChildDirectoryWatcher(childWatcher) { - (newChildWatches || (newChildWatches = [])).push(childWatcher); - } - } - function isIgnoredPath(path, options) { - return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory); - } - function isInPath(path, searchPath) { - if (stringContains(path, searchPath)) - return true; - if (useCaseSensitiveFileNames2) - return false; - return stringContains(toCanonicalFilePath(path), searchPath); - } - } - function createFileWatcherCallback(callback) { - return (_fileName, eventKind, modifiedTime) => callback(eventKind === 1 /* Changed */ ? "change" : "rename", "", modifiedTime); - } - function createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime3) { - return (eventName, _relativeFileName, modifiedTime) => { - if (eventName === "rename") { - modifiedTime || (modifiedTime = getModifiedTime3(fileName) || missingFileModifiedTime); - callback(fileName, modifiedTime !== missingFileModifiedTime ? 0 /* Created */ : 2 /* Deleted */, modifiedTime); - } else { - callback(fileName, 1 /* Changed */, modifiedTime); - } - }; - } - function isIgnoredByWatchOptions(pathToCheck, options, useCaseSensitiveFileNames2, getCurrentDirectory) { - return ((options == null ? void 0 : options.excludeDirectories) || (options == null ? void 0 : options.excludeFiles)) && (matchesExclude(pathToCheck, options == null ? void 0 : options.excludeFiles, useCaseSensitiveFileNames2, getCurrentDirectory()) || matchesExclude(pathToCheck, options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2, getCurrentDirectory())); - } - function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) { - return (eventName, relativeFileName) => { - if (eventName === "rename") { - const fileName = !relativeFileName ? directoryName : normalizePath(combinePaths(directoryName, relativeFileName)); - if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) { - callback(fileName); - } - } - }; - } - function createSystemWatchFunctions({ - pollingWatchFileWorker, - getModifiedTime: getModifiedTime3, - setTimeout: setTimeout2, - clearTimeout: clearTimeout2, - fsWatchWorker, - fileSystemEntryExists, - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - getCurrentDirectory, - fsSupportsRecursiveFsWatch, - getAccessibleSortedChildDirectories, - realpath, - tscWatchFile, - useNonPollingWatchers, - tscWatchDirectory, - inodeWatching, - sysLog: sysLog2 - }) { - const pollingWatches = /* @__PURE__ */ new Map(); - const fsWatches = /* @__PURE__ */ new Map(); - const fsWatchesRecursive = /* @__PURE__ */ new Map(); - let dynamicPollingWatchFile; - let fixedChunkSizePollingWatchFile; - let nonPollingWatchFile; - let hostRecursiveDirectoryWatcher; - let hitSystemWatcherLimit = false; - return { - watchFile: watchFile2, - watchDirectory - }; - function watchFile2(fileName, callback, pollingInterval, options) { - options = updateOptionsForWatchFile(options, useNonPollingWatchers); - const watchFileKind = Debug.checkDefined(options.watchFile); - switch (watchFileKind) { - case 0 /* FixedPollingInterval */: - return pollingWatchFile( - fileName, - callback, - 250 /* Low */, - /*options*/ - void 0 - ); - case 1 /* PriorityPollingInterval */: - return pollingWatchFile( - fileName, - callback, - pollingInterval, - /*options*/ - void 0 - ); - case 2 /* DynamicPriorityPolling */: - return ensureDynamicPollingWatchFile()( - fileName, - callback, - pollingInterval, - /*options*/ - void 0 - ); - case 3 /* FixedChunkSizePolling */: - return ensureFixedChunkSizePollingWatchFile()( - fileName, - callback, - /* pollingInterval */ - void 0, - /*options*/ - void 0 - ); - case 4 /* UseFsEvents */: - return fsWatch( - fileName, - 0 /* File */, - createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime3), - /*recursive*/ - false, - pollingInterval, - getFallbackOptions(options) - ); - case 5 /* UseFsEventsOnParentDirectory */: - if (!nonPollingWatchFile) { - nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames2); - } - return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options)); - default: - Debug.assertNever(watchFileKind); - } - } - function ensureDynamicPollingWatchFile() { - return dynamicPollingWatchFile || (dynamicPollingWatchFile = createDynamicPriorityPollingWatchFile({ getModifiedTime: getModifiedTime3, setTimeout: setTimeout2 })); - } - function ensureFixedChunkSizePollingWatchFile() { - return fixedChunkSizePollingWatchFile || (fixedChunkSizePollingWatchFile = createFixedChunkSizePollingWatchFile({ getModifiedTime: getModifiedTime3, setTimeout: setTimeout2 })); - } - function updateOptionsForWatchFile(options, useNonPollingWatchers2) { - if (options && options.watchFile !== void 0) - return options; - switch (tscWatchFile) { - case "PriorityPollingInterval": - return { watchFile: 1 /* PriorityPollingInterval */ }; - case "DynamicPriorityPolling": - return { watchFile: 2 /* DynamicPriorityPolling */ }; - case "UseFsEvents": - return generateWatchFileOptions(4 /* UseFsEvents */, 1 /* PriorityInterval */, options); - case "UseFsEventsWithFallbackDynamicPolling": - return generateWatchFileOptions(4 /* UseFsEvents */, 2 /* DynamicPriority */, options); - case "UseFsEventsOnParentDirectory": - useNonPollingWatchers2 = true; - default: - return useNonPollingWatchers2 ? ( - // Use notifications from FS to watch with falling back to fs.watchFile - generateWatchFileOptions(5 /* UseFsEventsOnParentDirectory */, 1 /* PriorityInterval */, options) - ) : ( - // Default to using fs events - { watchFile: 4 /* UseFsEvents */ } - ); - } - } - function generateWatchFileOptions(watchFile3, fallbackPolling, options) { - const defaultFallbackPolling = options == null ? void 0 : options.fallbackPolling; - return { - watchFile: watchFile3, - fallbackPolling: defaultFallbackPolling === void 0 ? fallbackPolling : defaultFallbackPolling - }; - } - function watchDirectory(directoryName, callback, recursive, options) { - if (fsSupportsRecursiveFsWatch) { - return fsWatch( - directoryName, - 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), - recursive, - 500 /* Medium */, - getFallbackOptions(options) - ); - } - if (!hostRecursiveDirectoryWatcher) { - hostRecursiveDirectoryWatcher = createDirectoryWatcherSupportingRecursive({ - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - getCurrentDirectory, - fileSystemEntryExists, - getAccessibleSortedChildDirectories, - watchDirectory: nonRecursiveWatchDirectory, - realpath, - setTimeout: setTimeout2, - clearTimeout: clearTimeout2 - }); - } - return hostRecursiveDirectoryWatcher(directoryName, callback, recursive, options); - } - function nonRecursiveWatchDirectory(directoryName, callback, recursive, options) { - Debug.assert(!recursive); - const watchDirectoryOptions = updateOptionsForWatchDirectory(options); - const watchDirectoryKind = Debug.checkDefined(watchDirectoryOptions.watchDirectory); - switch (watchDirectoryKind) { - case 1 /* FixedPollingInterval */: - return pollingWatchFile( - directoryName, - () => callback(directoryName), - 500 /* Medium */, - /*options*/ - void 0 - ); - case 2 /* DynamicPriorityPolling */: - return ensureDynamicPollingWatchFile()( - directoryName, - () => callback(directoryName), - 500 /* Medium */, - /*options*/ - void 0 - ); - case 3 /* FixedChunkSizePolling */: - return ensureFixedChunkSizePollingWatchFile()( - directoryName, - () => callback(directoryName), - /* pollingInterval */ - void 0, - /*options*/ - void 0 - ); - case 0 /* UseFsEvents */: - return fsWatch( - directoryName, - 1 /* Directory */, - createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory), - recursive, - 500 /* Medium */, - getFallbackOptions(watchDirectoryOptions) - ); - default: - Debug.assertNever(watchDirectoryKind); - } - } - function updateOptionsForWatchDirectory(options) { - if (options && options.watchDirectory !== void 0) - return options; - switch (tscWatchDirectory) { - case "RecursiveDirectoryUsingFsWatchFile": - return { watchDirectory: 1 /* FixedPollingInterval */ }; - case "RecursiveDirectoryUsingDynamicPriorityPolling": - return { watchDirectory: 2 /* DynamicPriorityPolling */ }; - default: - const defaultFallbackPolling = options == null ? void 0 : options.fallbackPolling; - return { - watchDirectory: 0 /* UseFsEvents */, - fallbackPolling: defaultFallbackPolling !== void 0 ? defaultFallbackPolling : void 0 - }; - } - } - function pollingWatchFile(fileName, callback, pollingInterval, options) { - return createSingleWatcherPerName( - pollingWatches, - useCaseSensitiveFileNames2, - fileName, - callback, - (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options) - ); - } - function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) { - return createSingleWatcherPerName( - recursive ? fsWatchesRecursive : fsWatches, - useCaseSensitiveFileNames2, - fileOrDirectory, - callback, - (cb) => fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, cb, recursive, fallbackPollingInterval, fallbackOptions) - ); - } - function fsWatchHandlingExistenceOnHost(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) { - let lastDirectoryPartWithDirectorySeparator; - let lastDirectoryPart; - if (inodeWatching) { - lastDirectoryPartWithDirectorySeparator = fileOrDirectory.substring(fileOrDirectory.lastIndexOf(directorySeparator)); - lastDirectoryPart = lastDirectoryPartWithDirectorySeparator.slice(directorySeparator.length); - } - let watcher = !fileSystemEntryExists(fileOrDirectory, entryKind) ? watchMissingFileSystemEntry() : watchPresentFileSystemEntry(); - return { - close: () => { - if (watcher) { - watcher.close(); - watcher = void 0; - } - } - }; - function updateWatcher(createWatcher) { - if (watcher) { - sysLog2(`sysLog:: ${fileOrDirectory}:: Changing watcher to ${createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing"}FileSystemEntryWatcher`); - watcher.close(); - watcher = createWatcher(); - } - } - function watchPresentFileSystemEntry() { - if (hitSystemWatcherLimit) { - sysLog2(`sysLog:: ${fileOrDirectory}:: Defaulting to watchFile`); - return watchPresentFileSystemEntryWithFsWatchFile(); - } - try { - const presentWatcher = fsWatchWorker( - fileOrDirectory, - recursive, - inodeWatching ? callbackChangingToMissingFileSystemEntry : callback - ); - presentWatcher.on("error", () => { - callback("rename", ""); - updateWatcher(watchMissingFileSystemEntry); - }); - return presentWatcher; - } catch (e) { - hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC"); - sysLog2(`sysLog:: ${fileOrDirectory}:: Changing to watchFile`); - return watchPresentFileSystemEntryWithFsWatchFile(); - } - } - function callbackChangingToMissingFileSystemEntry(event, relativeName) { - let originalRelativeName; - if (relativeName && endsWith(relativeName, "~")) { - originalRelativeName = relativeName; - relativeName = relativeName.slice(0, relativeName.length - 1); - } - if (event === "rename" && (!relativeName || relativeName === lastDirectoryPart || endsWith(relativeName, lastDirectoryPartWithDirectorySeparator))) { - const modifiedTime = getModifiedTime3(fileOrDirectory) || missingFileModifiedTime; - if (originalRelativeName) - callback(event, originalRelativeName, modifiedTime); - callback(event, relativeName, modifiedTime); - if (inodeWatching) { - updateWatcher(modifiedTime === missingFileModifiedTime ? watchMissingFileSystemEntry : watchPresentFileSystemEntry); - } else if (modifiedTime === missingFileModifiedTime) { - updateWatcher(watchMissingFileSystemEntry); - } - } else { - if (originalRelativeName) - callback(event, originalRelativeName); - callback(event, relativeName); - } - } - function watchPresentFileSystemEntryWithFsWatchFile() { - return watchFile2( - fileOrDirectory, - createFileWatcherCallback(callback), - fallbackPollingInterval, - fallbackOptions - ); - } - function watchMissingFileSystemEntry() { - return watchFile2( - fileOrDirectory, - (_fileName, eventKind, modifiedTime) => { - if (eventKind === 0 /* Created */) { - modifiedTime || (modifiedTime = getModifiedTime3(fileOrDirectory) || missingFileModifiedTime); - if (modifiedTime !== missingFileModifiedTime) { - callback("rename", "", modifiedTime); - updateWatcher(watchPresentFileSystemEntry); - } - } - }, - fallbackPollingInterval, - fallbackOptions - ); - } - } - } - function patchWriteFileEnsuringDirectory(sys2) { - const originalWriteFile = sys2.writeFile; - sys2.writeFile = (path, data, writeBom) => writeFileEnsuringDirectories( - path, - data, - !!writeBom, - (path2, data2, writeByteOrderMark) => originalWriteFile.call(sys2, path2, data2, writeByteOrderMark), - (path2) => sys2.createDirectory(path2), - (path2) => sys2.directoryExists(path2) - ); - } - function setSys(s) { - sys = s; - } - var FileWatcherEventKind, PollingInterval, missingFileModifiedTime, defaultChunkLevels, pollingChunkSize, unchangedPollThresholds, ignoredPaths, curSysLog, FileSystemEntryKind, sys; - var init_sys = __esm({ - "src/compiler/sys.ts"() { - "use strict"; - init_ts2(); - FileWatcherEventKind = /* @__PURE__ */ ((FileWatcherEventKind2) => { - FileWatcherEventKind2[FileWatcherEventKind2["Created"] = 0] = "Created"; - FileWatcherEventKind2[FileWatcherEventKind2["Changed"] = 1] = "Changed"; - FileWatcherEventKind2[FileWatcherEventKind2["Deleted"] = 2] = "Deleted"; - return FileWatcherEventKind2; - })(FileWatcherEventKind || {}); - PollingInterval = /* @__PURE__ */ ((PollingInterval3) => { - PollingInterval3[PollingInterval3["High"] = 2e3] = "High"; - PollingInterval3[PollingInterval3["Medium"] = 500] = "Medium"; - PollingInterval3[PollingInterval3["Low"] = 250] = "Low"; - return PollingInterval3; - })(PollingInterval || {}); - missingFileModifiedTime = /* @__PURE__ */ new Date(0); - defaultChunkLevels = { Low: 32, Medium: 64, High: 256 }; - pollingChunkSize = createPollingIntervalBasedLevels(defaultChunkLevels); - unchangedPollThresholds = createPollingIntervalBasedLevels(defaultChunkLevels); - ignoredPaths = ["/node_modules/.", "/.git", "/.#"]; - curSysLog = noop; - FileSystemEntryKind = /* @__PURE__ */ ((FileSystemEntryKind2) => { - FileSystemEntryKind2[FileSystemEntryKind2["File"] = 0] = "File"; - FileSystemEntryKind2[FileSystemEntryKind2["Directory"] = 1] = "Directory"; - return FileSystemEntryKind2; - })(FileSystemEntryKind || {}); - sys = (() => { - const byteOrderMarkIndicator = "\uFEFF"; - function getNodeSystem() { - const nativePattern = /^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/; - const _fs = require("fs"); - const _path = require("path"); - const _os = require("os"); - let _crypto; - try { - _crypto = require("crypto"); - } catch { - _crypto = void 0; - } - let activeSession; - let profilePath = "./profile.cpuprofile"; - const Buffer2 = require("buffer").Buffer; - const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin"; - const platform = _os.platform(); - const useCaseSensitiveFileNames2 = isFileSystemCaseSensitive(); - const fsRealpath = !!_fs.realpathSync.native ? process.platform === "win32" ? fsRealPathHandlingLongPath : _fs.realpathSync.native : _fs.realpathSync; - const executingFilePath = __filename.endsWith("sys.js") ? _path.join(_path.dirname(__dirname), "__fake__.js") : __filename; - const fsSupportsRecursiveFsWatch = process.platform === "win32" || process.platform === "darwin"; - const getCurrentDirectory = memoize(() => process.cwd()); - const { watchFile: watchFile2, watchDirectory } = createSystemWatchFunctions({ - pollingWatchFileWorker: fsWatchFileWorker, - getModifiedTime: getModifiedTime3, - setTimeout, - clearTimeout, - fsWatchWorker, - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - getCurrentDirectory, - fileSystemEntryExists, - // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows - // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643) - fsSupportsRecursiveFsWatch, - getAccessibleSortedChildDirectories: (path) => getAccessibleFileSystemEntries(path).directories, - realpath, - tscWatchFile: process.env.TSC_WATCHFILE, - useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER, - tscWatchDirectory: process.env.TSC_WATCHDIRECTORY, - inodeWatching: isLinuxOrMacOs, - sysLog - }); - const nodeSystem = { - args: process.argv.slice(2), - newLine: _os.EOL, - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - write(s) { - process.stdout.write(s); - }, - getWidthOfTerminal() { - return process.stdout.columns; - }, - writeOutputIsTTY() { - return process.stdout.isTTY; - }, - readFile, - writeFile: writeFile2, - watchFile: watchFile2, - watchDirectory, - resolvePath: (path) => _path.resolve(path), - fileExists, - directoryExists, - createDirectory(directoryName) { - if (!nodeSystem.directoryExists(directoryName)) { - try { - _fs.mkdirSync(directoryName); - } catch (e) { - if (e.code !== "EEXIST") { - throw e; - } - } - } - }, - getExecutingFilePath() { - return executingFilePath; - }, - getCurrentDirectory, - getDirectories, - getEnvironmentVariable(name) { - return process.env[name] || ""; - }, - readDirectory, - getModifiedTime: getModifiedTime3, - setModifiedTime, - deleteFile, - createHash: _crypto ? createSHA256Hash : generateDjb2Hash, - createSHA256Hash: _crypto ? createSHA256Hash : void 0, - getMemoryUsage() { - if (global.gc) { - global.gc(); - } - return process.memoryUsage().heapUsed; - }, - getFileSize(path) { - try { - const stat = statSync(path); - if (stat == null ? void 0 : stat.isFile()) { - return stat.size; - } - } catch { - } - return 0; - }, - exit(exitCode) { - disableCPUProfiler(() => process.exit(exitCode)); - }, - enableCPUProfiler, - disableCPUProfiler, - cpuProfilingEnabled: () => !!activeSession || contains(process.execArgv, "--cpu-prof") || contains(process.execArgv, "--prof"), - realpath, - debugMode: !!process.env.NODE_INSPECTOR_IPC || !!process.env.VSCODE_INSPECTOR_OPTIONS || some(process.execArgv, (arg) => /^--(inspect|debug)(-brk)?(=\d+)?$/i.test(arg)) || !!process.recordreplay, - tryEnableSourceMapsForHost() { - try { - require("source-map-support").install(); - } catch { - } - }, - setTimeout, - clearTimeout, - clearScreen: () => { - process.stdout.write("\x1Bc"); - }, - setBlocking: () => { - var _a; - const handle = (_a = process.stdout) == null ? void 0 : _a._handle; - if (handle && handle.setBlocking) { - handle.setBlocking(true); - } - }, - bufferFrom, - base64decode: (input) => bufferFrom(input, "base64").toString("utf8"), - base64encode: (input) => bufferFrom(input).toString("base64"), - require: (baseDir, moduleName) => { - try { - const modulePath = resolveJSModule(moduleName, baseDir, nodeSystem); - return { module: require(modulePath), modulePath, error: void 0 }; - } catch (error2) { - return { module: void 0, modulePath: void 0, error: error2 }; - } - } - }; - return nodeSystem; - function statSync(path) { - return _fs.statSync(path, { throwIfNoEntry: false }); - } - function enableCPUProfiler(path, cb) { - if (activeSession) { - cb(); - return false; - } - const inspector = require("inspector"); - if (!inspector || !inspector.Session) { - cb(); - return false; - } - const session = new inspector.Session(); - session.connect(); - session.post("Profiler.enable", () => { - session.post("Profiler.start", () => { - activeSession = session; - profilePath = path; - cb(); - }); - }); - return true; - } - function cleanupPaths(profile) { - let externalFileCounter = 0; - const remappedPaths = /* @__PURE__ */ new Map(); - const normalizedDir = normalizeSlashes(_path.dirname(executingFilePath)); - const fileUrlRoot = `file://${getRootLength(normalizedDir) === 1 ? "" : "/"}${normalizedDir}`; - for (const node of profile.nodes) { - if (node.callFrame.url) { - const url = normalizeSlashes(node.callFrame.url); - if (containsPath(fileUrlRoot, url, useCaseSensitiveFileNames2)) { - node.callFrame.url = getRelativePathToDirectoryOrUrl( - fileUrlRoot, - url, - fileUrlRoot, - createGetCanonicalFileName(useCaseSensitiveFileNames2), - /*isAbsolutePathAnUrl*/ - true - ); - } else if (!nativePattern.test(url)) { - node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, `external${externalFileCounter}.js`)).get(url); - externalFileCounter++; - } - } - } - return profile; - } - function disableCPUProfiler(cb) { - if (activeSession && activeSession !== "stopping") { - const s = activeSession; - activeSession.post("Profiler.stop", (err, { profile }) => { - var _a; - if (!err) { - try { - if ((_a = statSync(profilePath)) == null ? void 0 : _a.isDirectory()) { - profilePath = _path.join(profilePath, `${(/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-")}+P${process.pid}.cpuprofile`); - } - } catch { - } - try { - _fs.mkdirSync(_path.dirname(profilePath), { recursive: true }); - } catch { - } - _fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile))); - } - activeSession = void 0; - s.disconnect(); - cb(); - }); - activeSession = "stopping"; - return true; - } else { - cb(); - return false; - } - } - function bufferFrom(input, encoding) { - return Buffer2.from && Buffer2.from !== Int8Array.from ? Buffer2.from(input, encoding) : new Buffer2(input, encoding); - } - function isFileSystemCaseSensitive() { - if (platform === "win32" || platform === "win64") { - return false; - } - return !fileExists(swapCase(__filename)); - } - function swapCase(s) { - return s.replace(/\w/g, (ch) => { - const up = ch.toUpperCase(); - return ch === up ? ch.toLowerCase() : up; - }); - } - function fsWatchFileWorker(fileName, callback, pollingInterval) { - _fs.watchFile(fileName, { persistent: true, interval: pollingInterval }, fileChanged); - let eventKind; - return { - close: () => _fs.unwatchFile(fileName, fileChanged) - }; - function fileChanged(curr, prev) { - const isPreviouslyDeleted = +prev.mtime === 0 || eventKind === 2 /* Deleted */; - if (+curr.mtime === 0) { - if (isPreviouslyDeleted) { - return; - } - eventKind = 2 /* Deleted */; - } else if (isPreviouslyDeleted) { - eventKind = 0 /* Created */; - } else if (+curr.mtime === +prev.mtime) { - return; - } else { - eventKind = 1 /* Changed */; - } - callback(fileName, eventKind, curr.mtime); - } - } - function fsWatchWorker(fileOrDirectory, recursive, callback) { - return _fs.watch( - fileOrDirectory, - fsSupportsRecursiveFsWatch ? { persistent: true, recursive: !!recursive } : { persistent: true }, - callback - ); - } - function readFileWorker(fileName, _encoding) { - let buffer; - try { - buffer = _fs.readFileSync(fileName); - } catch (e) { - return void 0; - } - let len = buffer.length; - if (len >= 2 && buffer[0] === 254 && buffer[1] === 255) { - len &= ~1; - for (let i = 0; i < len; i += 2) { - const temp = buffer[i]; - buffer[i] = buffer[i + 1]; - buffer[i + 1] = temp; - } - return buffer.toString("utf16le", 2); - } - if (len >= 2 && buffer[0] === 255 && buffer[1] === 254) { - return buffer.toString("utf16le", 2); - } - if (len >= 3 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { - return buffer.toString("utf8", 3); - } - return buffer.toString("utf8"); - } - function readFile(fileName, _encoding) { - var _a, _b; - (_a = perfLogger) == null ? void 0 : _a.logStartReadFile(fileName); - const file = readFileWorker(fileName, _encoding); - (_b = perfLogger) == null ? void 0 : _b.logStopReadFile(); - return file; - } - function writeFile2(fileName, data, writeByteOrderMark) { - var _a; - (_a = perfLogger) == null ? void 0 : _a.logEvent("WriteFile: " + fileName); - if (writeByteOrderMark) { - data = byteOrderMarkIndicator + data; - } - let fd; - try { - fd = _fs.openSync(fileName, "w"); - _fs.writeSync( - fd, - data, - /*position*/ - void 0, - "utf8" - ); - } finally { - if (fd !== void 0) { - _fs.closeSync(fd); - } - } - } - function getAccessibleFileSystemEntries(path) { - var _a; - (_a = perfLogger) == null ? void 0 : _a.logEvent("ReadDir: " + (path || ".")); - try { - const entries = _fs.readdirSync(path || ".", { withFileTypes: true }); - const files = []; - const directories = []; - for (const dirent of entries) { - const entry = typeof dirent === "string" ? dirent : dirent.name; - if (entry === "." || entry === "..") { - continue; - } - let stat; - if (typeof dirent === "string" || dirent.isSymbolicLink()) { - const name = combinePaths(path, entry); - try { - stat = statSync(name); - if (!stat) { - continue; - } - } catch (e) { - continue; - } - } else { - stat = dirent; - } - if (stat.isFile()) { - files.push(entry); - } else if (stat.isDirectory()) { - directories.push(entry); - } - } - files.sort(); - directories.sort(); - return { files, directories }; - } catch (e) { - return emptyFileSystemEntries; - } - } - function readDirectory(path, extensions, excludes, includes, depth) { - return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath); - } - function fileSystemEntryExists(path, entryKind) { - const originalStackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - try { - const stat = statSync(path); - if (!stat) { - return false; - } - switch (entryKind) { - case 0 /* File */: - return stat.isFile(); - case 1 /* Directory */: - return stat.isDirectory(); - default: - return false; - } - } catch (e) { - return false; - } finally { - Error.stackTraceLimit = originalStackTraceLimit; - } - } - function fileExists(path) { - return fileSystemEntryExists(path, 0 /* File */); - } - function directoryExists(path) { - return fileSystemEntryExists(path, 1 /* Directory */); - } - function getDirectories(path) { - return getAccessibleFileSystemEntries(path).directories.slice(); - } - function fsRealPathHandlingLongPath(path) { - return path.length < 260 ? _fs.realpathSync.native(path) : _fs.realpathSync(path); - } - function realpath(path) { - try { - return fsRealpath(path); - } catch { - return path; - } - } - function getModifiedTime3(path) { - var _a; - const originalStackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = 0; - try { - return (_a = statSync(path)) == null ? void 0 : _a.mtime; - } catch (e) { - return void 0; - } finally { - Error.stackTraceLimit = originalStackTraceLimit; - } - } - function setModifiedTime(path, time) { - try { - _fs.utimesSync(path, time, time); - } catch (e) { - return; - } - } - function deleteFile(path) { - try { - return _fs.unlinkSync(path); - } catch (e) { - return; - } - } - function createSHA256Hash(data) { - const hash = _crypto.createHash("sha256"); - hash.update(data); - return hash.digest("hex"); - } - } - let sys2; - if (isNodeLikeSystem()) { - sys2 = getNodeSystem(); - } - if (sys2) { - patchWriteFileEnsuringDirectory(sys2); - } - return sys2; - })(); - if (sys && sys.getEnvironmentVariable) { - setCustomPollingValues(sys); - Debug.setAssertionLevel(/^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */); - } - if (sys && sys.debugMode) { - Debug.isDebugging = true; - } - } - }); - - // src/compiler/path.ts - function isAnyDirectorySeparator(charCode) { - return charCode === 47 /* slash */ || charCode === 92 /* backslash */; - } - function isUrl(path) { - return getEncodedRootLength(path) < 0; - } - function isRootedDiskPath(path) { - return getEncodedRootLength(path) > 0; - } - function isDiskPathRoot(path) { - const rootLength = getEncodedRootLength(path); - return rootLength > 0 && rootLength === path.length; - } - function pathIsAbsolute(path) { - return getEncodedRootLength(path) !== 0; - } - function pathIsRelative(path) { - return /^\.\.?($|[\\/])/.test(path); - } - function pathIsBareSpecifier(path) { - return !pathIsAbsolute(path) && !pathIsRelative(path); - } - function hasExtension(fileName) { - return stringContains(getBaseFileName(fileName), "."); - } - function fileExtensionIs(path, extension) { - return path.length > extension.length && endsWith(path, extension); - } - function fileExtensionIsOneOf(path, extensions) { - for (const extension of extensions) { - if (fileExtensionIs(path, extension)) { - return true; - } - } - return false; - } - function hasTrailingDirectorySeparator(path) { - return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); - } - function isVolumeCharacter(charCode) { - return charCode >= 97 /* a */ && charCode <= 122 /* z */ || charCode >= 65 /* A */ && charCode <= 90 /* Z */; - } - function getFileUrlVolumeSeparatorEnd(url, start) { - const ch0 = url.charCodeAt(start); - if (ch0 === 58 /* colon */) - return start + 1; - if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) { - const ch2 = url.charCodeAt(start + 2); - if (ch2 === 97 /* a */ || ch2 === 65 /* A */) - return start + 3; - } - return -1; - } - function getEncodedRootLength(path) { - if (!path) - return 0; - const ch0 = path.charCodeAt(0); - if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) { - if (path.charCodeAt(1) !== ch0) - return 1; - const p1 = path.indexOf(ch0 === 47 /* slash */ ? directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) - return path.length; - return p1 + 1; - } - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) { - const ch2 = path.charCodeAt(2); - if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) - return 3; - if (path.length === 2) - return 2; - } - const schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - const authorityStart = schemeEnd + urlSchemeSeparator.length; - const authorityEnd = path.indexOf(directorySeparator, authorityStart); - if (authorityEnd !== -1) { - const scheme = path.slice(0, schemeEnd); - const authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { - const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === 47 /* slash */) { - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); - } - return ~path.length; - } - return 0; - } - function getRootLength(path) { - const rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; - } - function getDirectoryPath(path) { - path = normalizeSlashes(path); - const rootLength = getRootLength(path); - if (rootLength === path.length) - return path; - path = removeTrailingDirectorySeparator(path); - return path.slice(0, Math.max(rootLength, path.lastIndexOf(directorySeparator))); - } - function getBaseFileName(path, extensions, ignoreCase) { - path = normalizeSlashes(path); - const rootLength = getRootLength(path); - if (rootLength === path.length) - return ""; - path = removeTrailingDirectorySeparator(path); - const name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(directorySeparator) + 1)); - const extension = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(name, extensions, ignoreCase) : void 0; - return extension ? name.slice(0, name.length - extension.length) : name; - } - function tryGetExtensionFromPath(path, extension, stringEqualityComparer) { - if (!startsWith(extension, ".")) - extension = "." + extension; - if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === 46 /* dot */) { - const pathExtension = path.slice(path.length - extension.length); - if (stringEqualityComparer(pathExtension, extension)) { - return pathExtension; - } - } - } - function getAnyExtensionFromPathWorker(path, extensions, stringEqualityComparer) { - if (typeof extensions === "string") { - return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || ""; - } - for (const extension of extensions) { - const result = tryGetExtensionFromPath(path, extension, stringEqualityComparer); - if (result) - return result; - } - return ""; - } - function getAnyExtensionFromPath(path, extensions, ignoreCase) { - if (extensions) { - return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive); - } - const baseFileName = getBaseFileName(path); - const extensionIndex = baseFileName.lastIndexOf("."); - if (extensionIndex >= 0) { - return baseFileName.substring(extensionIndex); - } - return ""; - } - function pathComponents(path, rootLength) { - const root = path.substring(0, rootLength); - const rest = path.substring(rootLength).split(directorySeparator); - if (rest.length && !lastOrUndefined(rest)) - rest.pop(); - return [root, ...rest]; - } - function getPathComponents(path, currentDirectory = "") { - path = combinePaths(currentDirectory, path); - return pathComponents(path, getRootLength(path)); - } - function getPathFromPathComponents(pathComponents2, length2) { - if (pathComponents2.length === 0) - return ""; - const root = pathComponents2[0] && ensureTrailingDirectorySeparator(pathComponents2[0]); - return root + pathComponents2.slice(1, length2).join(directorySeparator); - } - function normalizeSlashes(path) { - return path.indexOf("\\") !== -1 ? path.replace(backslashRegExp, directorySeparator) : path; - } - function reducePathComponents(components) { - if (!some(components)) - return []; - const reduced = [components[0]]; - for (let i = 1; i < components.length; i++) { - const component = components[i]; - if (!component) - continue; - if (component === ".") - continue; - if (component === "..") { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== "..") { - reduced.pop(); - continue; - } - } else if (reduced[0]) - continue; - } - reduced.push(component); - } - return reduced; - } - function combinePaths(path, ...paths) { - if (path) - path = normalizeSlashes(path); - for (let relativePath of paths) { - if (!relativePath) - continue; - relativePath = normalizeSlashes(relativePath); - if (!path || getRootLength(relativePath) !== 0) { - path = relativePath; - } else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; - } - function resolvePath(path, ...paths) { - return normalizePath(some(paths) ? combinePaths(path, ...paths) : normalizeSlashes(path)); - } - function getNormalizedPathComponents(path, currentDirectory) { - return reducePathComponents(getPathComponents(path, currentDirectory)); - } - function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - function normalizePath(path) { - path = normalizeSlashes(path); - if (!relativePathSegmentRegExp.test(path)) { - return path; - } - const simplified = path.replace(/\/\.\//g, "/").replace(/^\.\//, ""); - if (simplified !== path) { - path = simplified; - if (!relativePathSegmentRegExp.test(path)) { - return path; - } - } - const normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); - return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; - } - function getPathWithoutRoot(pathComponents2) { - if (pathComponents2.length === 0) - return ""; - return pathComponents2.slice(1).join(directorySeparator); - } - function getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory) { - return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); - } - function toPath(fileName, basePath, getCanonicalFileName) { - const nonCanonicalizedPath = isRootedDiskPath(fileName) ? normalizePath(fileName) : getNormalizedAbsolutePath(fileName, basePath); - return getCanonicalFileName(nonCanonicalizedPath); - } - function removeTrailingDirectorySeparator(path) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - return path; - } - function ensureTrailingDirectorySeparator(path) { - if (!hasTrailingDirectorySeparator(path)) { - return path + directorySeparator; - } - return path; - } - function ensurePathIsNonModuleName(path) { - return !pathIsAbsolute(path) && !pathIsRelative(path) ? "./" + path : path; - } - function changeAnyExtension(path, ext, extensions, ignoreCase) { - const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); - return pathext ? path.slice(0, path.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path; - } - function comparePathsWorker(a, b, componentComparer) { - if (a === b) - return 0 /* EqualTo */; - if (a === void 0) - return -1 /* LessThan */; - if (b === void 0) - return 1 /* GreaterThan */; - const aRoot = a.substring(0, getRootLength(a)); - const bRoot = b.substring(0, getRootLength(b)); - const result = compareStringsCaseInsensitive(aRoot, bRoot); - if (result !== 0 /* EqualTo */) { - return result; - } - const aRest = a.substring(aRoot.length); - const bRest = b.substring(bRoot.length); - if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { - return componentComparer(aRest, bRest); - } - const aComponents = reducePathComponents(getPathComponents(a)); - const bComponents = reducePathComponents(getPathComponents(b)); - const sharedLength = Math.min(aComponents.length, bComponents.length); - for (let i = 1; i < sharedLength; i++) { - const result2 = componentComparer(aComponents[i], bComponents[i]); - if (result2 !== 0 /* EqualTo */) { - return result2; - } - } - return compareValues(aComponents.length, bComponents.length); - } - function comparePathsCaseSensitive(a, b) { - return comparePathsWorker(a, b, compareStringsCaseSensitive); - } - function comparePathsCaseInsensitive(a, b) { - return comparePathsWorker(a, b, compareStringsCaseInsensitive); - } - function comparePaths(a, b, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - a = combinePaths(currentDirectory, a); - b = combinePaths(currentDirectory, b); - } else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - return comparePathsWorker(a, b, getStringComparer(ignoreCase)); - } - function containsPath(parent2, child, currentDirectory, ignoreCase) { - if (typeof currentDirectory === "string") { - parent2 = combinePaths(currentDirectory, parent2); - child = combinePaths(currentDirectory, child); - } else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - if (parent2 === void 0 || child === void 0) - return false; - if (parent2 === child) - return true; - const parentComponents = reducePathComponents(getPathComponents(parent2)); - const childComponents = reducePathComponents(getPathComponents(child)); - if (childComponents.length < parentComponents.length) { - return false; - } - const componentEqualityComparer = ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive; - for (let i = 0; i < parentComponents.length; i++) { - const equalityComparer = i === 0 ? equateStringsCaseInsensitive : componentEqualityComparer; - if (!equalityComparer(parentComponents[i], childComponents[i])) { - return false; - } - } - return true; - } - function startsWithDirectory(fileName, directoryName, getCanonicalFileName) { - const canonicalFileName = getCanonicalFileName(fileName); - const canonicalDirectoryName = getCanonicalFileName(directoryName); - return startsWith(canonicalFileName, canonicalDirectoryName + "/") || startsWith(canonicalFileName, canonicalDirectoryName + "\\"); - } - function getPathComponentsRelativeTo(from, to, stringEqualityComparer, getCanonicalFileName) { - const fromComponents = reducePathComponents(getPathComponents(from)); - const toComponents = reducePathComponents(getPathComponents(to)); - let start; - for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { - const fromComponent = getCanonicalFileName(fromComponents[start]); - const toComponent = getCanonicalFileName(toComponents[start]); - const comparer = start === 0 ? equateStringsCaseInsensitive : stringEqualityComparer; - if (!comparer(fromComponent, toComponent)) - break; - } - if (start === 0) { - return toComponents; - } - const components = toComponents.slice(start); - const relative = []; - for (; start < fromComponents.length; start++) { - relative.push(".."); - } - return ["", ...relative, ...components]; - } - function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) { - Debug.assert(getRootLength(fromDirectory) > 0 === getRootLength(to) > 0, "Paths must either both be absolute or both be relative"); - const getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : identity; - const ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; - const pathComponents2 = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive, getCanonicalFileName); - return getPathFromPathComponents(pathComponents2); - } - function convertToRelativePath(absoluteOrRelativePath, basePath, getCanonicalFileName) { - return !isRootedDiskPath(absoluteOrRelativePath) ? absoluteOrRelativePath : getRelativePathToDirectoryOrUrl( - basePath, - absoluteOrRelativePath, - basePath, - getCanonicalFileName, - /*isAbsolutePathAnUrl*/ - false - ); - } - function getRelativePathFromFile(from, to, getCanonicalFileName) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); - } - function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { - const pathComponents2 = getPathComponentsRelativeTo( - resolvePath(currentDirectory, directoryPathOrUrl), - resolvePath(currentDirectory, relativeOrAbsolutePath), - equateStringsCaseSensitive, - getCanonicalFileName - ); - const firstComponent = pathComponents2[0]; - if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { - const prefix = firstComponent.charAt(0) === directorySeparator ? "file://" : "file:///"; - pathComponents2[0] = prefix + firstComponent; - } - return getPathFromPathComponents(pathComponents2); - } - function forEachAncestorDirectory(directory, callback) { - while (true) { - const result = callback(directory); - if (result !== void 0) { - return result; - } - const parentPath = getDirectoryPath(directory); - if (parentPath === directory) { - return void 0; - } - directory = parentPath; - } - } - function isNodeModulesDirectory(dirPath) { - return endsWith(dirPath, "/node_modules"); - } - var directorySeparator, altDirectorySeparator, urlSchemeSeparator, backslashRegExp, relativePathSegmentRegExp; - var init_path = __esm({ - "src/compiler/path.ts"() { - "use strict"; - init_ts2(); - directorySeparator = "/"; - altDirectorySeparator = "\\"; - urlSchemeSeparator = "://"; - backslashRegExp = /\\/g; - relativePathSegmentRegExp = /(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/; - } - }); - - // src/compiler/diagnosticInformationMap.generated.ts - function diag(code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated) { - return { code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated }; - } - var Diagnostics; - var init_diagnosticInformationMap_generated = __esm({ - "src/compiler/diagnosticInformationMap.generated.ts"() { - "use strict"; - init_types(); - Diagnostics = { - Unterminated_string_literal: diag(1002, 1 /* Error */, "Unterminated_string_literal_1002", "Unterminated string literal."), - Identifier_expected: diag(1003, 1 /* Error */, "Identifier_expected_1003", "Identifier expected."), - _0_expected: diag(1005, 1 /* Error */, "_0_expected_1005", "'{0}' expected."), - A_file_cannot_have_a_reference_to_itself: diag(1006, 1 /* Error */, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."), - The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, 1 /* Error */, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."), - Trailing_comma_not_allowed: diag(1009, 1 /* Error */, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."), - Asterisk_Slash_expected: diag(1010, 1 /* Error */, "Asterisk_Slash_expected_1010", "'*/' expected."), - An_element_access_expression_should_take_an_argument: diag(1011, 1 /* Error */, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."), - Unexpected_token: diag(1012, 1 /* Error */, "Unexpected_token_1012", "Unexpected token."), - A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: diag(1013, 1 /* Error */, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."), - A_rest_parameter_must_be_last_in_a_parameter_list: diag(1014, 1 /* Error */, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."), - Parameter_cannot_have_question_mark_and_initializer: diag(1015, 1 /* Error */, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."), - A_required_parameter_cannot_follow_an_optional_parameter: diag(1016, 1 /* Error */, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."), - An_index_signature_cannot_have_a_rest_parameter: diag(1017, 1 /* Error */, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."), - An_index_signature_parameter_cannot_have_an_accessibility_modifier: diag(1018, 1 /* Error */, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."), - An_index_signature_parameter_cannot_have_a_question_mark: diag(1019, 1 /* Error */, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."), - An_index_signature_parameter_cannot_have_an_initializer: diag(1020, 1 /* Error */, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), - An_index_signature_must_have_a_type_annotation: diag(1021, 1 /* Error */, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), - An_index_signature_parameter_must_have_a_type_annotation: diag(1022, 1 /* Error */, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), - readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, 1 /* Error */, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), - An_index_signature_cannot_have_a_trailing_comma: diag(1025, 1 /* Error */, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."), - Accessibility_modifier_already_seen: diag(1028, 1 /* Error */, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), - _0_modifier_must_precede_1_modifier: diag(1029, 1 /* Error */, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), - _0_modifier_already_seen: diag(1030, 1 /* Error */, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."), - _0_modifier_cannot_appear_on_class_elements_of_this_kind: diag(1031, 1 /* Error */, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."), - super_must_be_followed_by_an_argument_list_or_member_access: diag(1034, 1 /* Error */, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."), - Only_ambient_modules_can_use_quoted_names: diag(1035, 1 /* Error */, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."), - Statements_are_not_allowed_in_ambient_contexts: diag(1036, 1 /* Error */, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."), - A_declare_modifier_cannot_be_used_in_an_already_ambient_context: diag(1038, 1 /* Error */, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."), - Initializers_are_not_allowed_in_ambient_contexts: diag(1039, 1 /* Error */, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."), - _0_modifier_cannot_be_used_in_an_ambient_context: diag(1040, 1 /* Error */, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."), - _0_modifier_cannot_be_used_here: diag(1042, 1 /* Error */, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."), - _0_modifier_cannot_appear_on_a_module_or_namespace_element: diag(1044, 1 /* Error */, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."), - Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: diag(1046, 1 /* Error */, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."), - A_rest_parameter_cannot_be_optional: diag(1047, 1 /* Error */, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."), - A_rest_parameter_cannot_have_an_initializer: diag(1048, 1 /* Error */, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."), - A_set_accessor_must_have_exactly_one_parameter: diag(1049, 1 /* Error */, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."), - A_set_accessor_cannot_have_an_optional_parameter: diag(1051, 1 /* Error */, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."), - A_set_accessor_parameter_cannot_have_an_initializer: diag(1052, 1 /* Error */, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."), - A_set_accessor_cannot_have_rest_parameter: diag(1053, 1 /* Error */, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."), - A_get_accessor_cannot_have_parameters: diag(1054, 1 /* Error */, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."), - Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: diag(1055, 1 /* Error */, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."), - Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: diag(1056, 1 /* Error */, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."), - The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1058, 1 /* Error */, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."), - A_promise_must_have_a_then_method: diag(1059, 1 /* Error */, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."), - The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: diag(1060, 1 /* Error */, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."), - Enum_member_must_have_initializer: diag(1061, 1 /* Error */, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."), - Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, 1 /* Error */, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), - An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, 1 /* Error */, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), - The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), - The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type: diag(1065, 1 /* Error */, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1065", "The return type of an async function or method must be the global Promise type."), - In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, 1 /* 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: diag(1068, 1 /* 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: diag(1069, 1 /* 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: diag(1070, 1 /* 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: diag(1071, 1 /* 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: diag(1079, 1 /* 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: diag(1084, 1 /* Error */, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), - _0_modifier_cannot_appear_on_a_constructor_declaration: diag(1089, 1 /* 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: diag(1090, 1 /* 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: diag(1091, 1 /* 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: diag(1092, 1 /* 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: diag(1093, 1 /* Error */, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."), - An_accessor_cannot_have_type_parameters: diag(1094, 1 /* Error */, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."), - A_set_accessor_cannot_have_a_return_type_annotation: diag(1095, 1 /* 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: diag(1096, 1 /* Error */, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."), - _0_list_cannot_be_empty: diag(1097, 1 /* Error */, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."), - Type_parameter_list_cannot_be_empty: diag(1098, 1 /* Error */, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."), - Type_argument_list_cannot_be_empty: diag(1099, 1 /* Error */, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."), - Invalid_use_of_0_in_strict_mode: diag(1100, 1 /* Error */, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."), - with_statements_are_not_allowed_in_strict_mode: diag(1101, 1 /* 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: diag(1102, 1 /* Error */, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."), - for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1103, 1 /* Error */, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."), - A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: diag(1104, 1 /* 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: diag(1105, 1 /* 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."), - The_left_hand_side_of_a_for_of_statement_may_not_be_async: diag(1106, 1 /* Error */, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."), - Jump_target_cannot_cross_function_boundary: diag(1107, 1 /* 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: diag(1108, 1 /* 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: diag(1109, 1 /* Error */, "Expression_expected_1109", "Expression expected."), - Type_expected: diag(1110, 1 /* Error */, "Type_expected_1110", "Type expected."), - Private_field_0_must_be_declared_in_an_enclosing_class: diag(1111, 1 /* Error */, "Private_field_0_must_be_declared_in_an_enclosing_class_1111", "Private field '{0}' must be declared in an enclosing class."), - A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, 1 /* 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: diag(1114, 1 /* Error */, "Duplicate_label_0_1114", "Duplicate label '{0}'."), - A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, 1 /* 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: diag(1116, 1 /* 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: diag(1117, 1 /* Error */, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", "An object literal cannot have multiple properties with the same name."), - An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: diag(1118, 1 /* 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: diag(1119, 1 /* 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: diag(1120, 1 /* Error */, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."), - Octal_literals_are_not_allowed_Use_the_syntax_0: diag(1121, 1 /* Error */, "Octal_literals_are_not_allowed_Use_the_syntax_0_1121", "Octal literals are not allowed. Use the syntax '{0}'."), - Variable_declaration_list_cannot_be_empty: diag(1123, 1 /* Error */, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."), - Digit_expected: diag(1124, 1 /* Error */, "Digit_expected_1124", "Digit expected."), - Hexadecimal_digit_expected: diag(1125, 1 /* Error */, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."), - Unexpected_end_of_text: diag(1126, 1 /* Error */, "Unexpected_end_of_text_1126", "Unexpected end of text."), - Invalid_character: diag(1127, 1 /* Error */, "Invalid_character_1127", "Invalid character."), - Declaration_or_statement_expected: diag(1128, 1 /* Error */, "Declaration_or_statement_expected_1128", "Declaration or statement expected."), - Statement_expected: diag(1129, 1 /* Error */, "Statement_expected_1129", "Statement expected."), - case_or_default_expected: diag(1130, 1 /* Error */, "case_or_default_expected_1130", "'case' or 'default' expected."), - Property_or_signature_expected: diag(1131, 1 /* Error */, "Property_or_signature_expected_1131", "Property or signature expected."), - Enum_member_expected: diag(1132, 1 /* Error */, "Enum_member_expected_1132", "Enum member expected."), - Variable_declaration_expected: diag(1134, 1 /* Error */, "Variable_declaration_expected_1134", "Variable declaration expected."), - Argument_expression_expected: diag(1135, 1 /* Error */, "Argument_expression_expected_1135", "Argument expression expected."), - Property_assignment_expected: diag(1136, 1 /* Error */, "Property_assignment_expected_1136", "Property assignment expected."), - Expression_or_comma_expected: diag(1137, 1 /* Error */, "Expression_or_comma_expected_1137", "Expression or comma expected."), - Parameter_declaration_expected: diag(1138, 1 /* Error */, "Parameter_declaration_expected_1138", "Parameter declaration expected."), - Type_parameter_declaration_expected: diag(1139, 1 /* Error */, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."), - Type_argument_expected: diag(1140, 1 /* Error */, "Type_argument_expected_1140", "Type argument expected."), - String_literal_expected: diag(1141, 1 /* Error */, "String_literal_expected_1141", "String literal expected."), - Line_break_not_permitted_here: diag(1142, 1 /* Error */, "Line_break_not_permitted_here_1142", "Line break not permitted here."), - or_expected: diag(1144, 1 /* Error */, "or_expected_1144", "'{' or ';' expected."), - or_JSX_element_expected: diag(1145, 1 /* Error */, "or_JSX_element_expected_1145", "'{' or JSX element expected."), - Declaration_expected: diag(1146, 1 /* Error */, "Declaration_expected_1146", "Declaration expected."), - Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, 1 /* 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: diag(1148, 1 /* 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: diag(1149, 1 /* 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."), - _0_declarations_must_be_initialized: diag(1155, 1 /* Error */, "_0_declarations_must_be_initialized_1155", "'{0}' declarations must be initialized."), - _0_declarations_can_only_be_declared_inside_a_block: diag(1156, 1 /* Error */, "_0_declarations_can_only_be_declared_inside_a_block_1156", "'{0}' declarations can only be declared inside a block."), - Unterminated_template_literal: diag(1160, 1 /* Error */, "Unterminated_template_literal_1160", "Unterminated template literal."), - Unterminated_regular_expression_literal: diag(1161, 1 /* Error */, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), - An_object_member_cannot_be_declared_optional: diag(1162, 1 /* 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: diag(1163, 1 /* 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: diag(1164, 1 /* 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: diag(1165, 1 /* 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_have_a_simple_literal_type_or_a_unique_symbol_type: diag(1166, 1 /* Error */, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple 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: diag(1168, 1 /* 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: diag(1169, 1 /* 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: diag(1170, 1 /* 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: diag(1171, 1 /* 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: diag(1172, 1 /* Error */, "extends_clause_already_seen_1172", "'extends' clause already seen."), - extends_clause_must_precede_implements_clause: diag(1173, 1 /* Error */, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."), - Classes_can_only_extend_a_single_class: diag(1174, 1 /* Error */, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."), - implements_clause_already_seen: diag(1175, 1 /* Error */, "implements_clause_already_seen_1175", "'implements' clause already seen."), - Interface_declaration_cannot_have_implements_clause: diag(1176, 1 /* Error */, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."), - Binary_digit_expected: diag(1177, 1 /* Error */, "Binary_digit_expected_1177", "Binary digit expected."), - Octal_digit_expected: diag(1178, 1 /* Error */, "Octal_digit_expected_1178", "Octal digit expected."), - Unexpected_token_expected: diag(1179, 1 /* Error */, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."), - Property_destructuring_pattern_expected: diag(1180, 1 /* Error */, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."), - Array_element_destructuring_pattern_expected: diag(1181, 1 /* Error */, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."), - A_destructuring_declaration_must_have_an_initializer: diag(1182, 1 /* Error */, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."), - An_implementation_cannot_be_declared_in_ambient_contexts: diag(1183, 1 /* Error */, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."), - Modifiers_cannot_appear_here: diag(1184, 1 /* Error */, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."), - Merge_conflict_marker_encountered: diag(1185, 1 /* Error */, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."), - A_rest_element_cannot_have_an_initializer: diag(1186, 1 /* 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: diag(1187, 1 /* 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: diag(1188, 1 /* 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: diag(1189, 1 /* 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: diag(1190, 1 /* 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: diag(1191, 1 /* Error */, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."), - Module_0_has_no_default_export: diag(1192, 1 /* Error */, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."), - An_export_declaration_cannot_have_modifiers: diag(1193, 1 /* Error */, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."), - Export_declarations_are_not_permitted_in_a_namespace: diag(1194, 1 /* 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: diag(1195, 1 /* 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: diag(1196, 1 /* 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: diag(1197, 1 /* 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: diag(1198, 1 /* 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: diag(1199, 1 /* Error */, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."), - Line_terminator_not_permitted_before_arrow: diag(1200, 1 /* 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: diag(1202, 1 /* 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: diag(1203, 1 /* 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_0_is_enabled_requires_using_export_type: diag(1205, 1 /* Error */, "Re_exporting_a_type_when_0_is_enabled_requires_using_export_type_1205", "Re-exporting a type when '{0}' is enabled requires using 'export type'."), - Decorators_are_not_valid_here: diag(1206, 1 /* 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: diag(1207, 1 /* 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."), - Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: diag(1209, 1 /* Error */, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"), - Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, 1 /* Error */, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."), - A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, 1 /* 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: diag(1212, 1 /* 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: diag(1213, 1 /* 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: diag(1214, 1 /* 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: diag(1215, 1 /* 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: diag(1216, 1 /* 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: diag(1218, 1 /* Error */, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."), - Generators_are_not_allowed_in_an_ambient_context: diag(1221, 1 /* 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: diag(1222, 1 /* Error */, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."), - _0_tag_already_specified: diag(1223, 1 /* Error */, "_0_tag_already_specified_1223", "'{0}' tag already specified."), - Signature_0_must_be_a_type_predicate: diag(1224, 1 /* Error */, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."), - Cannot_find_parameter_0: diag(1225, 1 /* Error */, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."), - Type_predicate_0_is_not_assignable_to_1: diag(1226, 1 /* 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: diag(1227, 1 /* 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: diag(1228, 1 /* 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: diag(1229, 1 /* 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: diag(1230, 1 /* 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_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1231, 1 /* Error */, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."), - An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1232, 1 /* Error */, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", "An import declaration can only be used at the top level of a namespace or module."), - An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1233, 1 /* Error */, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", "An export declaration can only be used at the top level of a namespace or module."), - An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: diag(1234, 1 /* 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_at_the_top_level_of_a_namespace_or_module: diag(1235, 1 /* Error */, "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", "A namespace declaration is only allowed at the top level of a namespace or module."), - The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: diag(1236, 1 /* 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: diag(1237, 1 /* 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: diag(1238, 1 /* 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: diag(1239, 1 /* 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: diag(1240, 1 /* 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: diag(1241, 1 /* 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: diag(1242, 1 /* 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: diag(1243, 1 /* 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: diag(1244, 1 /* 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: diag(1245, 1 /* 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: diag(1246, 1 /* Error */, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."), - A_type_literal_property_cannot_have_an_initializer: diag(1247, 1 /* 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: diag(1248, 1 /* 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: diag(1249, 1 /* 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: diag(1250, 1 /* 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: diag(1251, 1 /* 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: diag(1252, 1 /* 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."), - Abstract_properties_can_only_appear_within_an_abstract_class: diag(1253, 1 /* Error */, "Abstract_properties_can_only_appear_within_an_abstract_class_1253", "Abstract properties can only appear within an abstract class."), - A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: diag(1254, 1 /* 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: diag(1255, 1 /* Error */, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."), - A_required_element_cannot_follow_an_optional_element: diag(1257, 1 /* Error */, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."), - A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1258, 1 /* Error */, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."), - Module_0_can_only_be_default_imported_using_the_1_flag: diag(1259, 1 /* 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: diag(1260, 1 /* 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: diag(1261, 1 /* 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: diag(1262, 1 /* 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: diag(1263, 1 /* 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: diag(1264, 1 /* Error */, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."), - A_rest_element_cannot_follow_another_rest_element: diag(1265, 1 /* Error */, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."), - An_optional_element_cannot_follow_a_rest_element: diag(1266, 1 /* Error */, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."), - Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: diag(1267, 1 /* Error */, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."), - An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: diag(1268, 1 /* Error */, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."), - Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled: diag(1269, 1 /* Error */, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled_1269", "Cannot use 'export import' on a type or type-only namespace when '{0}' is enabled."), - Decorator_function_return_type_0_is_not_assignable_to_type_1: diag(1270, 1 /* Error */, "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", "Decorator function return type '{0}' is not assignable to type '{1}'."), - Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: diag(1271, 1 /* Error */, "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."), - A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: diag(1272, 1 /* Error */, "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."), - _0_modifier_cannot_appear_on_a_type_parameter: diag(1273, 1 /* Error */, "_0_modifier_cannot_appear_on_a_type_parameter_1273", "'{0}' modifier cannot appear on a type parameter"), - _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, 1 /* Error */, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"), - accessor_modifier_can_only_appear_on_a_property_declaration: diag(1275, 1 /* Error */, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."), - An_accessor_property_cannot_be_declared_optional: diag(1276, 1 /* Error */, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."), - _0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class: diag(1277, 1 /* Error */, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class_1277", "'{0}' modifier can only appear on a type parameter of a function, method or class"), - The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0: diag(1278, 1 /* Error */, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0_1278", "The runtime will invoke the decorator with {1} arguments, but the decorator expects {0}."), - The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0: diag(1279, 1 /* Error */, "The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0_1279", "The runtime will invoke the decorator with {1} arguments, but the decorator expects at least {0}."), - Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement: diag(1280, 1 /* Error */, "Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to__1280", "Namespaces are not allowed in global script files when '{0}' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement."), - Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead: diag(1281, 1 /* Error */, "Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead_1281", "Cannot access '{0}' from another file without qualification when '{1}' is enabled. Use '{2}' instead."), - An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: diag(1282, 1 /* Error */, "An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers__1282", "An 'export =' declaration must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."), - An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1283, 1 /* Error */, "An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283", "An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), - An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: diag(1284, 1 /* Error */, "An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284", "An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."), - An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1285, 1 /* Error */, "An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285", "An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."), - ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."), - A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."), - An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."), - with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* 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: diag(1308, 1 /* 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."), - The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."), - 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: diag(1312, 1 /* 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: diag(1313, 1 /* 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: diag(1314, 1 /* 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: diag(1315, 1 /* 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: diag(1316, 1 /* 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: diag(1317, 1 /* 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: diag(1318, 1 /* 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: diag(1319, 1 /* 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: diag(1320, 1 /* 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: diag(1321, 1 /* 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: diag(1322, 1 /* 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_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, 1 /* Error */, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."), - Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: diag(1324, 1 /* Error */, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."), - Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, 1 /* Error */, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."), - This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, 1 /* Error */, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."), - String_literal_with_double_quotes_expected: diag(1327, 1 /* 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: diag(1328, 1 /* 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: diag(1329, 1 /* 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: diag(1330, 1 /* 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: diag(1331, 1 /* 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: diag(1332, 1 /* 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: diag(1333, 1 /* 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: diag(1334, 1 /* 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: diag(1335, 1 /* Error */, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."), - An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, 1 /* Error */, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."), - infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, 1 /* 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: diag(1339, 1 /* 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: diag(1340, 1 /* 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}')'?"), - Class_constructor_may_not_be_an_accessor: diag(1341, 1 /* Error */, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."), - The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, 1 /* Error */, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."), - A_label_is_not_allowed_here: diag(1344, 1 /* Error */, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), - An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, 1 /* 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: diag(1346, 1 /* 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: diag(1347, 1 /* 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: diag(1348, 1 /* Error */, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."), - use_strict_directive_used_here: diag(1349, 1 /* Error */, "use_strict_directive_used_here_1349", "'use strict' directive used here."), - Print_the_final_configuration_instead_of_building: diag(1350, 3 /* 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: diag(1351, 1 /* 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: diag(1352, 1 /* Error */, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."), - A_bigint_literal_must_be_an_integer: diag(1353, 1 /* 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: diag(1354, 1 /* 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: diag(1355, 1 /* 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: diag(1356, 1 /* 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: diag(1357, 1 /* 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: diag(1358, 1 /* 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: diag(1359, 1 /* 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."), - Type_0_does_not_satisfy_the_expected_type_1: diag(1360, 1 /* Error */, "Type_0_does_not_satisfy_the_expected_type_1_1360", "Type '{0}' does not satisfy the expected type '{1}'."), - _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, 1 /* 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: diag(1362, 1 /* 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: diag(1363, 1 /* 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: diag(1364, 3 /* Message */, "Convert_to_type_only_export_1364", "Convert to type-only export"), - Convert_all_re_exported_types_to_type_only_exports: diag(1365, 3 /* 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: diag(1366, 3 /* Message */, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"), - Split_all_invalid_type_only_imports: diag(1367, 3 /* Message */, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"), - Class_constructor_may_not_be_a_generator: diag(1368, 1 /* Error */, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), - Did_you_mean_0: diag(1369, 3 /* Message */, "Did_you_mean_0_1369", "Did you mean '{0}'?"), - This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, 1 /* Error */, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), - 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: diag(1375, 1 /* 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: diag(1376, 3 /* Message */, "_0_was_imported_here_1376", "'{0}' was imported here."), - _0_was_exported_here: diag(1377, 3 /* Message */, "_0_was_exported_here_1377", "'{0}' was exported here."), - Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, 1 /* Error */, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), - An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, 1 /* 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: diag(1380, 1 /* 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: diag(1381, 1 /* Error */, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), - Unexpected_token_Did_you_mean_or_gt: diag(1382, 1 /* Error */, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), - Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, 1 /* 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: diag(1386, 1 /* 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: diag(1387, 1 /* 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: diag(1388, 1 /* 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: diag(1389, 1 /* Error */, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."), - _0_is_not_allowed_as_a_parameter_name: diag(1390, 1 /* Error */, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."), - An_import_alias_cannot_use_import_type: diag(1392, 1 /* Error */, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"), - Imported_via_0_from_file_1: diag(1393, 3 /* Message */, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"), - Imported_via_0_from_file_1_with_packageId_2: diag(1394, 3 /* Message */, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"), - Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions: diag(1395, 3 /* Message */, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"), - Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: diag(1396, 3 /* Message */, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"), - Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: diag(1397, 3 /* Message */, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"), - Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: diag(1398, 3 /* Message */, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"), - File_is_included_via_import_here: diag(1399, 3 /* Message */, "File_is_included_via_import_here_1399", "File is included via import here."), - Referenced_via_0_from_file_1: diag(1400, 3 /* Message */, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"), - File_is_included_via_reference_here: diag(1401, 3 /* Message */, "File_is_included_via_reference_here_1401", "File is included via reference here."), - Type_library_referenced_via_0_from_file_1: diag(1402, 3 /* Message */, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"), - Type_library_referenced_via_0_from_file_1_with_packageId_2: diag(1403, 3 /* Message */, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"), - File_is_included_via_type_library_reference_here: diag(1404, 3 /* Message */, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."), - Library_referenced_via_0_from_file_1: diag(1405, 3 /* Message */, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"), - File_is_included_via_library_reference_here: diag(1406, 3 /* Message */, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."), - Matched_by_include_pattern_0_in_1: diag(1407, 3 /* Message */, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"), - File_is_matched_by_include_pattern_specified_here: diag(1408, 3 /* Message */, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."), - Part_of_files_list_in_tsconfig_json: diag(1409, 3 /* Message */, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"), - File_is_matched_by_files_list_specified_here: diag(1410, 3 /* Message */, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."), - Output_from_referenced_project_0_included_because_1_specified: diag(1411, 3 /* Message */, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"), - Output_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1412, 3 /* Message */, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"), - File_is_output_from_referenced_project_specified_here: diag(1413, 3 /* Message */, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."), - Source_from_referenced_project_0_included_because_1_specified: diag(1414, 3 /* Message */, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"), - Source_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1415, 3 /* Message */, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"), - File_is_source_from_referenced_project_specified_here: diag(1416, 3 /* Message */, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."), - Entry_point_of_type_library_0_specified_in_compilerOptions: diag(1417, 3 /* Message */, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"), - Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: diag(1418, 3 /* Message */, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"), - File_is_entry_point_of_type_library_specified_here: diag(1419, 3 /* Message */, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."), - Entry_point_for_implicit_type_library_0: diag(1420, 3 /* Message */, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"), - Entry_point_for_implicit_type_library_0_with_packageId_1: diag(1421, 3 /* Message */, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"), - Library_0_specified_in_compilerOptions: diag(1422, 3 /* Message */, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"), - File_is_library_specified_here: diag(1423, 3 /* Message */, "File_is_library_specified_here_1423", "File is library specified here."), - Default_library: diag(1424, 3 /* Message */, "Default_library_1424", "Default library"), - Default_library_for_target_0: diag(1425, 3 /* Message */, "Default_library_for_target_0_1425", "Default library for target '{0}'"), - File_is_default_library_for_target_specified_here: diag(1426, 3 /* Message */, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."), - Root_file_specified_for_compilation: diag(1427, 3 /* Message */, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"), - File_is_output_of_project_reference_source_0: diag(1428, 3 /* Message */, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"), - File_redirects_to_file_0: diag(1429, 3 /* Message */, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"), - The_file_is_in_the_program_because_Colon: diag(1430, 3 /* Message */, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"), - for_await_loops_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: diag(1431, 1 /* Error */, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops 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."), - Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, 1 /* Error */, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), - Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters: diag(1433, 1 /* Error */, "Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters_1433", "Neither decorators nor modifiers may be applied to 'this' parameters."), - Unexpected_keyword_or_identifier: diag(1434, 1 /* Error */, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."), - Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, 1 /* Error */, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"), - Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: diag(1436, 1 /* Error */, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."), - Namespace_must_be_given_a_name: diag(1437, 1 /* Error */, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."), - Interface_must_be_given_a_name: diag(1438, 1 /* Error */, "Interface_must_be_given_a_name_1438", "Interface must be given a name."), - Type_alias_must_be_given_a_name: diag(1439, 1 /* Error */, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."), - Variable_declaration_not_allowed_at_this_location: diag(1440, 1 /* Error */, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."), - Cannot_start_a_function_call_in_a_type_annotation: diag(1441, 1 /* Error */, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."), - Expected_for_property_initializer: diag(1442, 1 /* Error */, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."), - Module_declaration_names_may_only_use_or_quoted_strings: diag(1443, 1 /* Error */, "Module_declaration_names_may_only_use_or_quoted_strings_1443", `Module declaration names may only use ' or " quoted strings.`), - _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1444, 1 /* Error */, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444", "'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), - _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), - _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: diag(1448, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."), - Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, 3 /* Message */, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), - Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"), - Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, 1 /* Error */, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), - resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, 1 /* Error */, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."), - resolution_mode_should_be_either_require_or_import: diag(1453, 1 /* Error */, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), - resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, 1 /* Error */, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), - resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), - Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, 1 /* Error */, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."), - Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: diag(1457, 3 /* Message */, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"), - File_is_ECMAScript_module_because_0_has_field_type_with_value_module: diag(1458, 3 /* Message */, "File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458", `File is ECMAScript module because '{0}' has field "type" with value "module"`), - File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, 3 /* Message */, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`), - File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, 3 /* Message */, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`), - File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, 3 /* Message */, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), - The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, 1 /* Error */, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), - Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, 1 /* Error */, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), - catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), - An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, 1 /* Error */, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."), - An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, 1 /* Error */, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."), - Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, 3 /* Message */, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."), - auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, 3 /* Message */, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", '"auto": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules.'), - An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, 1 /* Error */, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."), - Identifier_or_string_literal_expected: diag(1478, 1 /* Error */, "Identifier_or_string_literal_expected_1478", "Identifier or string literal expected."), - The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead: diag(1479, 1 /* Error */, "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479", `The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("{0}")' call instead.`), - To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module: diag(1480, 3 /* Message */, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480", 'To convert this file to an ECMAScript module, change its file extension to \'{0}\' or create a local package.json file with `{ "type": "module" }`.'), - To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: diag(1481, 3 /* Message */, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", `To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field \`"type": "module"\` to '{1}'.`), - To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: diag(1482, 3 /* Message */, "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", 'To convert this file to an ECMAScript module, add the field `"type": "module"` to \'{0}\'.'), - To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: diag(1483, 3 /* Message */, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", 'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'), - _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1484, 1 /* Error */, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484", "'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."), - _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1485, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."), - Decorator_used_before_export_here: diag(1486, 1 /* Error */, "Decorator_used_before_export_here_1486", "Decorator used before 'export' here."), - Octal_escape_sequences_are_not_allowed_Use_the_syntax_0: diag(1487, 1 /* Error */, "Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487", "Octal escape sequences are not allowed. Use the syntax '{0}'."), - Escape_sequence_0_is_not_allowed: diag(1488, 1 /* Error */, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."), - Decimals_with_leading_zeros_are_not_allowed: diag(1489, 1 /* Error */, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."), - File_appears_to_be_binary: diag(1490, 1 /* Error */, "File_appears_to_be_binary_1490", "File appears to be binary."), - _0_modifier_cannot_appear_on_a_using_declaration: diag(1491, 1 /* Error */, "_0_modifier_cannot_appear_on_a_using_declaration_1491", "'{0}' modifier cannot appear on a 'using' declaration."), - _0_declarations_may_not_have_binding_patterns: diag(1492, 1 /* Error */, "_0_declarations_may_not_have_binding_patterns_1492", "'{0}' declarations may not have binding patterns."), - The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), - The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), - _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), - The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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: diag(2201, 1 /* 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: diag( - 2202, - 1 /* Error */, - "Call_signature_return_types_0_and_1_are_incompatible_2202", - "Call signature return types '{0}' and '{1}' are incompatible.", - /*reportsUnnecessary*/ - void 0, - /*elidedInCompatabilityPyramid*/ - true - ), - Construct_signature_return_types_0_and_1_are_incompatible: diag( - 2203, - 1 /* Error */, - "Construct_signature_return_types_0_and_1_are_incompatible_2203", - "Construct signature return types '{0}' and '{1}' are incompatible.", - /*reportsUnnecessary*/ - void 0, - /*elidedInCompatabilityPyramid*/ - true - ), - Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag( - 2204, - 1 /* 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}'.", - /*reportsUnnecessary*/ - void 0, - /*elidedInCompatabilityPyramid*/ - true - ), - Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag( - 2205, - 1 /* 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}'.", - /*reportsUnnecessary*/ - void 0, - /*elidedInCompatabilityPyramid*/ - true - ), - The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, 1 /* Error */, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."), - The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, 1 /* Error */, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."), - This_type_parameter_might_need_an_extends_0_constraint: diag(2208, 1 /* Error */, "This_type_parameter_might_need_an_extends_0_constraint_2208", "This type parameter might need an `extends {0}` constraint."), - The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, 1 /* Error */, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), - The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, 1 /* Error */, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), - Add_extends_constraint: diag(2211, 3 /* Message */, "Add_extends_constraint_2211", "Add `extends` constraint."), - Add_extends_constraint_to_all_type_parameters: diag(2212, 3 /* Message */, "Add_extends_constraint_to_all_type_parameters_2212", "Add `extends` constraint to all type parameters"), - Duplicate_identifier_0: diag(2300, 1 /* Error */, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."), - Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, 1 /* 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: diag(2302, 1 /* Error */, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."), - Circular_definition_of_import_alias_0: diag(2303, 1 /* Error */, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."), - Cannot_find_name_0: diag(2304, 1 /* Error */, "Cannot_find_name_0_2304", "Cannot find name '{0}'."), - Module_0_has_no_exported_member_1: diag(2305, 1 /* Error */, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."), - File_0_is_not_a_module: diag(2306, 1 /* Error */, "File_0_is_not_a_module_2306", "File '{0}' is not a module."), - Cannot_find_module_0_or_its_corresponding_type_declarations: diag(2307, 1 /* 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: diag(2308, 1 /* 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: diag(2309, 1 /* 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: diag(2310, 1 /* Error */, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."), - Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: diag(2311, 1 /* Error */, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"), - An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, 1 /* 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: diag(2313, 1 /* Error */, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."), - Generic_type_0_requires_1_type_argument_s: diag(2314, 1 /* Error */, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."), - Type_0_is_not_generic: diag(2315, 1 /* Error */, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."), - Global_type_0_must_be_a_class_or_interface_type: diag(2316, 1 /* 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: diag(2317, 1 /* 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: diag(2318, 1 /* Error */, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."), - Named_property_0_of_types_1_and_2_are_not_identical: diag(2319, 1 /* 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: diag(2320, 1 /* 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: diag(2321, 1 /* 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: diag(2322, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."), - Cannot_redeclare_exported_variable_0: diag(2323, 1 /* Error */, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."), - Property_0_is_missing_in_type_1: diag(2324, 1 /* 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: diag(2325, 1 /* 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: diag(2326, 1 /* 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: diag(2327, 1 /* 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: diag(2328, 1 /* Error */, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."), - Index_signature_for_type_0_is_missing_in_type_1: diag(2329, 1 /* Error */, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."), - _0_and_1_index_signatures_are_incompatible: diag(2330, 1 /* Error */, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."), - this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, 1 /* 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: diag(2332, 1 /* Error */, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."), - this_cannot_be_referenced_in_constructor_arguments: diag(2333, 1 /* 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: diag(2334, 1 /* 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: diag(2335, 1 /* 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: diag(2336, 1 /* 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: diag(2337, 1 /* 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: diag(2338, 1 /* 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: diag(2339, 1 /* 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: diag(2340, 1 /* 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: diag(2341, 1 /* Error */, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."), - This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, 1 /* 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: diag(2344, 1 /* 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: diag(2345, 1 /* 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}'."), - Untyped_function_calls_may_not_accept_type_arguments: diag(2347, 1 /* 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: diag(2348, 1 /* 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: diag(2349, 1 /* Error */, "This_expression_is_not_callable_2349", "This expression is not callable."), - Only_a_void_function_can_be_called_with_the_new_keyword: diag(2350, 1 /* 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: diag(2351, 1 /* 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: diag(2352, 1 /* 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: diag(2353, 1 /* 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: diag(2354, 1 /* 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_undefined_void_nor_any_must_return_a_value: diag(2355, 1 /* Error */, "A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value."), - An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, 1 /* 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: diag(2357, 1 /* 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: diag(2358, 1 /* 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: diag(2359, 1 /* 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_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, 1 /* 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: diag(2363, 1 /* 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: diag(2364, 1 /* 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: diag(2365, 1 /* 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: diag(2366, 1 /* 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_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap: diag(2367, 1 /* Error */, "This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367", "This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."), - Type_parameter_name_cannot_be_0: diag(2368, 1 /* Error */, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."), - A_parameter_property_is_only_allowed_in_a_constructor_implementation: diag(2369, 1 /* 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: diag(2370, 1 /* 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: diag(2371, 1 /* 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: diag(2372, 1 /* Error */, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."), - Parameter_0_cannot_reference_identifier_1_declared_after_it: diag(2373, 1 /* Error */, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."), - Duplicate_index_signature_for_type_0: diag(2374, 1 /* Error */, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."), - Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2375, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), - A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2376, 1 /* Error */, "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376", "A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."), - Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, 1 /* 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: diag(2378, 1 /* Error */, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."), - Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2379, 1 /* Error */, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), - Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, 1 /* 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: diag(2384, 1 /* 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: diag(2385, 1 /* 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: diag(2386, 1 /* Error */, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."), - Function_overload_must_be_static: diag(2387, 1 /* Error */, "Function_overload_must_be_static_2387", "Function overload must be static."), - Function_overload_must_not_be_static: diag(2388, 1 /* Error */, "Function_overload_must_not_be_static_2388", "Function overload must not be static."), - Function_implementation_name_must_be_0: diag(2389, 1 /* Error */, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."), - Constructor_implementation_is_missing: diag(2390, 1 /* Error */, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."), - Function_implementation_is_missing_or_not_immediately_following_the_declaration: diag(2391, 1 /* 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: diag(2392, 1 /* Error */, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."), - Duplicate_function_implementation: diag(2393, 1 /* Error */, "Duplicate_function_implementation_2393", "Duplicate function implementation."), - This_overload_signature_is_not_compatible_with_its_implementation_signature: diag(2394, 1 /* 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: diag(2395, 1 /* 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: diag(2396, 1 /* 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: diag(2397, 1 /* 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: diag(2398, 1 /* 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: diag(2399, 1 /* 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: diag(2400, 1 /* 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."), - A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2401, 1 /* Error */, "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401", "A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."), - Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: diag(2402, 1 /* 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: diag(2403, 1 /* 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: diag(2404, 1 /* 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: diag(2405, 1 /* 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: diag(2406, 1 /* 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: diag(2407, 1 /* 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: diag(2408, 1 /* 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: diag(2409, 1 /* 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: diag(2410, 1 /* 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'."), - Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: diag(2412, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."), - Property_0_of_type_1_is_not_assignable_to_2_index_type_3: diag(2411, 1 /* Error */, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."), - _0_index_type_1_is_not_assignable_to_2_index_type_3: diag(2413, 1 /* Error */, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."), - Class_name_cannot_be_0: diag(2414, 1 /* Error */, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."), - Class_0_incorrectly_extends_base_class_1: diag(2415, 1 /* 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: diag(2416, 1 /* 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: diag(2417, 1 /* 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: diag(2418, 1 /* 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: diag(2419, 1 /* Error */, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."), - Class_0_incorrectly_implements_interface_1: diag(2420, 1 /* 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: diag(2422, 1 /* 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: diag(2423, 1 /* 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: diag(2425, 1 /* 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: diag(2426, 1 /* 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: diag(2427, 1 /* Error */, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), - All_declarations_of_0_must_have_identical_type_parameters: diag(2428, 1 /* 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: diag(2430, 1 /* Error */, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."), - Enum_name_cannot_be_0: diag(2431, 1 /* 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: diag(2432, 1 /* 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: diag(2433, 1 /* 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: diag(2434, 1 /* 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: diag(2435, 1 /* 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: diag(2436, 1 /* 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: diag(2437, 1 /* 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: diag(2438, 1 /* 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: diag(2439, 1 /* 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: diag(2440, 1 /* 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: diag(2441, 1 /* 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: diag(2442, 1 /* 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: diag(2443, 1 /* 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: diag(2444, 1 /* 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: diag(2445, 1 /* 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_This_is_an_instance_of_class_2: diag(2446, 1 /* Error */, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."), - The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: diag(2447, 1 /* 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: diag(2448, 1 /* Error */, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."), - Class_0_used_before_its_declaration: diag(2449, 1 /* Error */, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."), - Enum_0_used_before_its_declaration: diag(2450, 1 /* Error */, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."), - Cannot_redeclare_block_scoped_variable_0: diag(2451, 1 /* Error */, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."), - An_enum_member_cannot_have_a_numeric_name: diag(2452, 1 /* Error */, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."), - Variable_0_is_used_before_being_assigned: diag(2454, 1 /* Error */, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."), - Type_alias_0_circularly_references_itself: diag(2456, 1 /* Error */, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), - Type_alias_name_cannot_be_0: diag(2457, 1 /* Error */, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), - An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, 1 /* 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: diag(2459, 1 /* 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: diag(2460, 1 /* 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: diag(2461, 1 /* 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: diag(2462, 1 /* 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: diag(2463, 1 /* 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: diag(2464, 1 /* 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: diag(2465, 1 /* 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: diag(2466, 1 /* 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: diag(2467, 1 /* 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: diag(2468, 1 /* Error */, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."), - The_0_operator_cannot_be_applied_to_type_symbol: diag(2469, 1 /* Error */, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."), - Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: diag(2472, 1 /* 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: diag(2473, 1 /* Error */, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."), - const_enum_member_initializers_must_be_constant_expressions: diag(2474, 1 /* Error */, "const_enum_member_initializers_must_be_constant_expressions_2474", "const enum member initializers must be constant expressions."), - 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: diag(2475, 1 /* 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: diag(2476, 1 /* 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: diag(2477, 1 /* 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: diag(2478, 1 /* Error */, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."), - let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: diag(2480, 1 /* 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: diag(2481, 1 /* 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: diag(2483, 1 /* 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: diag(2484, 1 /* 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: diag(2487, 1 /* 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: diag(2488, 1 /* 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: diag(2489, 1 /* 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: diag(2490, 1 /* 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: diag(2491, 1 /* 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: diag(2492, 1 /* 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: diag(2493, 1 /* 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: diag(2494, 1 /* 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: diag(2495, 1 /* 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: diag(2496, 1 /* 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: diag(2497, 1 /* 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: diag(2498, 1 /* 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: diag(2499, 1 /* 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: diag(2500, 1 /* 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: diag(2501, 1 /* 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: diag(2502, 1 /* 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: diag(2503, 1 /* Error */, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."), - Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: diag(2504, 1 /* 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: diag(2505, 1 /* 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: diag(2506, 1 /* 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: diag(2507, 1 /* 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: diag(2508, 1 /* 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: diag(2509, 1 /* 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: diag(2510, 1 /* 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: diag(2511, 1 /* 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: diag(2512, 1 /* 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: diag(2513, 1 /* 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."), - A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, 1 /* Error */, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."), - Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* 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: diag(2516, 1 /* 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: diag(2517, 1 /* 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: diag(2518, 1 /* 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: diag(2519, 1 /* 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: diag(2520, 1 /* Error */, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' 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: diag(2522, 1 /* 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: diag(2523, 1 /* 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: diag(2524, 1 /* 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: diag(2525, 1 /* 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: diag(2526, 1 /* 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: diag(2527, 1 /* 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: diag(2528, 1 /* 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: diag(2529, 1 /* 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: diag(2530, 1 /* Error */, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."), - Object_is_possibly_null: diag(2531, 1 /* Error */, "Object_is_possibly_null_2531", "Object is possibly 'null'."), - Object_is_possibly_undefined: diag(2532, 1 /* Error */, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."), - Object_is_possibly_null_or_undefined: diag(2533, 1 /* Error */, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."), - A_function_returning_never_cannot_have_a_reachable_end_point: diag(2534, 1 /* Error */, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."), - Type_0_cannot_be_used_to_index_type_1: diag(2536, 1 /* 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: diag(2537, 1 /* 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: diag(2538, 1 /* 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: diag(2539, 1 /* 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: diag(2540, 1 /* Error */, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."), - Index_signature_in_type_0_only_permits_reading: diag(2542, 1 /* 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: diag(2543, 1 /* 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: diag(2544, 1 /* 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: diag(2545, 1 /* 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: diag(2547, 1 /* 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: diag(2548, 1 /* 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: diag(2549, 1 /* 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: diag(2550, 1 /* 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: diag(2551, 1 /* 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: diag(2552, 1 /* 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: diag(2553, 1 /* 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: diag(2554, 1 /* Error */, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."), - Expected_at_least_0_arguments_but_got_1: diag(2555, 1 /* Error */, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."), - A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: diag(2556, 1 /* Error */, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."), - Expected_0_type_arguments_but_got_1: diag(2558, 1 /* 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: diag(2559, 1 /* 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: diag(2560, 1 /* 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: diag(2561, 1 /* 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: diag(2562, 1 /* 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: diag(2563, 1 /* 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: diag(2564, 1 /* 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: diag(2565, 1 /* Error */, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."), - A_rest_element_cannot_have_a_property_name: diag(2566, 1 /* 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: diag(2567, 1 /* Error */, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), - Property_0_may_not_exist_on_type_1_Did_you_mean_2: diag(2568, 1 /* Error */, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"), - Could_not_find_name_0_Did_you_mean_1: diag(2570, 1 /* Error */, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"), - Object_is_of_type_unknown: diag(2571, 1 /* Error */, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), - A_rest_element_type_must_be_an_array_type: diag(2574, 1 /* 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: diag(2575, 1 /* 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_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: diag(2576, 1 /* Error */, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"), - Return_type_annotation_circularly_references_itself: diag(2577, 1 /* Error */, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."), - Unused_ts_expect_error_directive: diag(2578, 1 /* 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: diag(2580, 1 /* 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: diag(2581, 1 /* 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: diag(2582, 1 /* 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: diag(2583, 1 /* 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: diag(2584, 1 /* 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: diag(2585, 1 /* 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."), - Cannot_assign_to_0_because_it_is_a_constant: diag(2588, 1 /* 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: diag(2589, 1 /* 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: diag(2590, 1 /* 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: diag(2591, 1 /* 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: diag(2592, 1 /* 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: diag(2593, 1 /* 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_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: diag(2594, 1 /* Error */, "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", "This module is declared with '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: diag(2595, 1 /* 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: diag(2596, 1 /* 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: diag(2597, 1 /* 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: diag(2598, 1 /* 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_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: diag(2602, 1 /* 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: diag(2603, 1 /* 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: diag(2604, 1 /* 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."), - Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: diag(2606, 1 /* 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: diag(2607, 1 /* 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: diag(2608, 1 /* 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: diag(2609, 1 /* 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: diag(2610, 1 /* 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: diag(2611, 1 /* 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: diag(2612, 1 /* 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: diag(2613, 1 /* 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: diag(2614, 1 /* 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: diag(2615, 1 /* 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: diag(2616, 1 /* 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: diag(2617, 1 /* 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: diag(2618, 1 /* 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: diag(2619, 1 /* 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: diag(2620, 1 /* 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: diag(2621, 1 /* Error */, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."), - Source_provides_no_match_for_required_element_at_position_0_in_target: diag(2623, 1 /* Error */, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."), - Source_provides_no_match_for_variadic_element_at_position_0_in_target: diag(2624, 1 /* Error */, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."), - Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: diag(2625, 1 /* Error */, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."), - Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: diag(2626, 1 /* Error */, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."), - Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: diag(2627, 1 /* Error */, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."), - Cannot_assign_to_0_because_it_is_an_enum: diag(2628, 1 /* Error */, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."), - Cannot_assign_to_0_because_it_is_a_class: diag(2629, 1 /* Error */, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."), - Cannot_assign_to_0_because_it_is_a_function: diag(2630, 1 /* Error */, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."), - Cannot_assign_to_0_because_it_is_a_namespace: diag(2631, 1 /* Error */, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."), - Cannot_assign_to_0_because_it_is_an_import: diag(2632, 1 /* Error */, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."), - JSX_property_access_expressions_cannot_include_JSX_namespace_names: diag(2633, 1 /* Error */, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"), - _0_index_signatures_are_incompatible: diag(2634, 1 /* Error */, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."), - Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: diag(2635, 1 /* Error */, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."), - Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: diag(2636, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."), - Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: diag(2637, 1 /* Error */, "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."), - Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, 1 /* Error */, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."), - React_components_cannot_include_JSX_namespace_names: diag(2639, 1 /* Error */, "React_components_cannot_include_JSX_namespace_names_2639", "React components cannot include JSX namespace names"), - Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, 1 /* 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: diag(2651, 1 /* 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: diag(2652, 1 /* 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: diag(2653, 1 /* 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}'."), - JSX_expressions_must_have_one_parent_element: diag(2657, 1 /* 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: diag(2658, 1 /* 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: diag(2659, 1 /* 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: diag(2660, 1 /* 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: diag(2661, 1 /* 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: diag(2662, 1 /* 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: diag(2663, 1 /* 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: diag(2664, 1 /* 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: diag(2665, 1 /* 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: diag(2666, 1 /* 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: diag(2667, 1 /* 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: diag(2668, 1 /* 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: diag(2669, 1 /* 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: diag(2670, 1 /* 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: diag(2671, 1 /* 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: diag(2672, 1 /* 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: diag(2673, 1 /* 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: diag(2674, 1 /* 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: diag(2675, 1 /* 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: diag(2676, 1 /* 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: diag(2677, 1 /* 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: diag(2678, 1 /* 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: diag(2679, 1 /* 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: diag(2680, 1 /* 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: diag(2681, 1 /* Error */, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."), - this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: diag(2683, 1 /* 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: diag(2684, 1 /* 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: diag(2685, 1 /* 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: diag(2686, 1 /* 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: diag(2687, 1 /* 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: diag(2688, 1 /* 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: diag(2689, 1 /* 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: diag(2690, 1 /* 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}'?"), - _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, 1 /* 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: diag(2693, 1 /* 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: diag(2694, 1 /* 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: diag( - 2695, - 1 /* 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.", - /*reportsUnnecessary*/ - true - ), - The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: diag(2696, 1 /* 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: diag(2697, 1 /* 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: diag(2698, 1 /* 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: diag(2699, 1 /* 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: diag(2700, 1 /* 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: diag(2701, 1 /* 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: diag(2702, 1 /* 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: diag(2703, 1 /* 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: diag(2704, 1 /* 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: diag(2705, 1 /* 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: diag(2706, 1 /* 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: diag(2707, 1 /* 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: diag(2708, 1 /* Error */, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."), - Cannot_use_namespace_0_as_a_type: diag(2709, 1 /* 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: diag(2710, 1 /* 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: diag(2711, 1 /* 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: diag(2712, 1 /* 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: diag(2713, 1 /* 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: diag(2714, 1 /* 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: diag(2715, 1 /* 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: diag(2716, 1 /* 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: diag(2717, 1 /* 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: diag(2718, 1 /* 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: diag(2719, 1 /* 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: diag(2720, 1 /* 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: diag(2721, 1 /* 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: diag(2722, 1 /* 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: diag(2723, 1 /* 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: diag(2724, 1 /* 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: diag(2725, 1 /* 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: diag(2726, 1 /* Error */, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), - Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, 1 /* 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: diag(2728, 3 /* Message */, "_0_is_declared_here_2728", "'{0}' is declared here."), - Property_0_is_used_before_its_initialization: diag(2729, 1 /* Error */, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."), - An_arrow_function_cannot_have_a_this_parameter: diag(2730, 1 /* 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: diag(2731, 1 /* 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: diag(2732, 1 /* 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: diag(2733, 1 /* Error */, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), - Are_you_missing_a_semicolon: diag(2734, 1 /* 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: diag(2735, 1 /* 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: diag(2736, 1 /* 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: diag(2737, 1 /* 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: diag(2738, 3 /* 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: diag(2739, 1 /* 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: diag(2740, 1 /* 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: diag(2741, 1 /* 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: diag(2742, 1 /* 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: diag(2743, 1 /* 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: diag(2744, 1 /* 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: diag(2745, 1 /* 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: diag(2746, 1 /* 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: diag(2747, 1 /* 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_0_is_enabled: diag(2748, 1 /* Error */, "Cannot_access_ambient_const_enums_when_0_is_enabled_2748", "Cannot access ambient const enums when '{0}' is enabled."), - _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, 1 /* 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: diag(2750, 1 /* Error */, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."), - Circularity_originates_in_type_at_this_location: diag(2751, 1 /* Error */, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."), - The_first_export_default_is_here: diag(2752, 1 /* Error */, "The_first_export_default_is_here_2752", "The first export default is here."), - Another_export_default_is_here: diag(2753, 1 /* Error */, "Another_export_default_is_here_2753", "Another export default is here."), - super_may_not_use_type_arguments: diag(2754, 1 /* Error */, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."), - No_constituent_of_type_0_is_callable: diag(2755, 1 /* Error */, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."), - Not_all_constituents_of_type_0_are_callable: diag(2756, 1 /* Error */, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."), - Type_0_has_no_call_signatures: diag(2757, 1 /* 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: diag(2758, 1 /* 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: diag(2759, 1 /* Error */, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."), - Not_all_constituents_of_type_0_are_constructable: diag(2760, 1 /* Error */, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."), - Type_0_has_no_construct_signatures: diag(2761, 1 /* 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: diag(2762, 1 /* 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: diag(2763, 1 /* 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: diag(2764, 1 /* 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: diag(2765, 1 /* 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: diag(2766, 1 /* 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: diag(2767, 1 /* 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: diag(2768, 1 /* 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: diag(2769, 1 /* Error */, "No_overload_matches_this_call_2769", "No overload matches this call."), - The_last_overload_gave_the_following_error: diag(2770, 1 /* Error */, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."), - The_last_overload_is_declared_here: diag(2771, 1 /* Error */, "The_last_overload_is_declared_here_2771", "The last overload is declared here."), - Overload_0_of_1_2_gave_the_following_error: diag(2772, 1 /* 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: diag(2773, 1 /* Error */, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"), - This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, 1 /* Error */, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this 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: diag(2775, 1 /* 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: diag(2776, 1 /* 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: diag(2777, 1 /* 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: diag(2778, 1 /* 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: diag(2779, 1 /* 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: diag(2780, 1 /* 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: diag(2781, 1 /* 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: diag(2782, 3 /* 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: diag(2783, 1 /* 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: diag(2784, 1 /* Error */, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."), - This_spread_always_overwrites_this_property: diag(2785, 1 /* Error */, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."), - _0_cannot_be_used_as_a_JSX_component: diag(2786, 1 /* 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: diag(2787, 1 /* 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: diag(2788, 1 /* 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: diag(2789, 1 /* 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: diag(2790, 1 /* 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: diag(2791, 1 /* 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_nodenext_or_to_add_aliases_to_the_paths_option: diag(2792, 1 /* Error */, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_t_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'nodenext', 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: diag(2793, 1 /* 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: diag(2794, 1 /* 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: diag(2795, 1 /* 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: diag(2796, 1 /* 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."), - A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: diag(2797, 1 /* Error */, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."), - The_declaration_was_marked_as_deprecated_here: diag(2798, 1 /* Error */, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."), - Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, 1 /* Error */, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."), - Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, 1 /* Error */, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."), - This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, 1 /* Error */, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."), - Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: diag(2802, 1 /* Error */, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."), - Cannot_assign_to_private_method_0_Private_methods_are_not_writable: diag(2803, 1 /* Error */, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."), - Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: diag(2804, 1 /* Error */, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."), - Private_accessor_was_defined_without_a_getter: diag(2806, 1 /* Error */, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."), - This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, 1 /* Error */, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."), - A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, 1 /* Error */, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"), - Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses: diag(2809, 1 /* Error */, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses."), - Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, 1 /* Error */, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."), - Initializer_for_property_0: diag(2811, 1 /* Error */, "Initializer_for_property_0_2811", "Initializer for property '{0}'"), - Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, 1 /* Error */, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."), - Class_declaration_cannot_implement_overload_list_for_0: diag(2813, 1 /* Error */, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."), - Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, 1 /* Error */, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."), - arguments_cannot_be_referenced_in_property_initializers: diag(2815, 1 /* Error */, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."), - Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, 1 /* Error */, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."), - Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, 1 /* Error */, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."), - Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, 1 /* Error */, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."), - Namespace_name_cannot_be_0: diag(2819, 1 /* Error */, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."), - Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), - Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), - Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), - Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), - Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."), - Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), - All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), - This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), - An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"), - The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, 1 /* Error */, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), - We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), - Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), - This_condition_will_always_return_0: diag(2845, 1 /* Error */, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."), - A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead: diag(2846, 1 /* Error */, "A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_f_2846", "A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file '{0}' instead?"), - The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression: diag(2848, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression_2848", "The right-hand side of an 'instanceof' expression must not be an instantiation expression."), - Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1: diag(2849, 1 /* Error */, "Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1_2849", "Target signature provides too few arguments. Expected {0} or more, but got {1}."), - The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined: diag(2850, 1 /* Error */, "The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_n_2850", "The initializer of a 'using' declaration must be either an object with a '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), - The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined: diag(2851, 1 /* Error */, "The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_2851", "The initializer of an 'await using' declaration must be either an object with a '[Symbol.asyncDispose]()' or '[Symbol.dispose]()' method, or be 'null' or 'undefined'."), - await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), - await_using_statements_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: diag(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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."), - Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), - Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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: diag(4002, 1 /* 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: diag(4004, 1 /* 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: diag(4006, 1 /* 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: diag(4008, 1 /* 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: diag(4010, 1 /* 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: diag(4012, 1 /* 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: diag(4014, 1 /* 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: diag(4016, 1 /* 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: diag(4019, 1 /* 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: diag(4020, 1 /* 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: diag(4021, 1 /* 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: diag(4022, 1 /* 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: diag(4023, 1 /* 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: diag(4024, 1 /* 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: diag(4025, 1 /* 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: diag(4026, 1 /* 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: diag(4027, 1 /* 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: diag(4028, 1 /* 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: diag(4029, 1 /* 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: diag(4030, 1 /* 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: diag(4031, 1 /* 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: diag(4032, 1 /* 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: diag(4033, 1 /* 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: diag(4034, 1 /* 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: diag(4035, 1 /* 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: diag(4036, 1 /* 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: diag(4037, 1 /* 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: diag(4038, 1 /* 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: diag(4039, 1 /* 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: diag(4040, 1 /* 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: diag(4041, 1 /* 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: diag(4042, 1 /* 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: diag(4043, 1 /* 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: diag(4044, 1 /* 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: diag(4045, 1 /* 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: diag(4046, 1 /* 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: diag(4047, 1 /* 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: diag(4048, 1 /* 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: diag(4049, 1 /* 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: diag(4050, 1 /* 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: diag(4051, 1 /* 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: diag(4052, 1 /* 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: diag(4053, 1 /* 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: diag(4054, 1 /* 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: diag(4055, 1 /* 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: diag(4056, 1 /* 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: diag(4057, 1 /* 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: diag(4058, 1 /* 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: diag(4059, 1 /* 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: diag(4060, 1 /* 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: diag(4061, 1 /* 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: diag(4062, 1 /* 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: diag(4063, 1 /* 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: diag(4064, 1 /* 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: diag(4065, 1 /* 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: diag(4066, 1 /* 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: diag(4067, 1 /* 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: diag(4068, 1 /* 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: diag(4069, 1 /* 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: diag(4070, 1 /* 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: diag(4071, 1 /* 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: diag(4072, 1 /* 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: diag(4073, 1 /* 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: diag(4074, 1 /* 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: diag(4075, 1 /* 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: diag(4076, 1 /* 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: diag(4077, 1 /* 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: diag(4078, 1 /* 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: diag(4081, 1 /* 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: diag(4082, 1 /* 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: diag(4083, 1 /* 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}'."), - Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: diag(4084, 1 /* Error */, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."), - Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1: diag(4085, 1 /* Error */, "Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1_4085", "Extends clause for inferred type '{0}' 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: diag(4090, 1 /* 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: diag(4091, 1 /* 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: diag(4092, 1 /* 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: diag(4094, 1 /* 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: diag(4095, 1 /* 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: diag(4096, 1 /* 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: diag(4097, 1 /* 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: diag(4098, 1 /* 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: diag(4099, 1 /* 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: diag(4100, 1 /* 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: diag(4101, 1 /* 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: diag(4102, 1 /* 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: diag(4103, 1 /* 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: diag(4104, 1 /* 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: diag(4105, 1 /* 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: diag(4106, 1 /* 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: diag(4107, 1 /* 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: diag(4108, 1 /* 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: diag(4109, 1 /* Error */, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), - Tuple_type_arguments_circularly_reference_themselves: diag(4110, 1 /* Error */, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), - Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: diag(4111, 1 /* Error */, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."), - This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: diag(4112, 1 /* Error */, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."), - This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: diag(4113, 1 /* Error */, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."), - This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: diag(4114, 1 /* Error */, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."), - This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: diag(4115, 1 /* Error */, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."), - This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: diag(4116, 1 /* Error */, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."), - This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4117, 1 /* Error */, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"), - The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: diag(4118, 1 /* Error */, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."), - This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4119, 1 /* Error */, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), - This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4120, 1 /* Error */, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), - This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: diag(4121, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."), - This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), - This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), - Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, 1 /* Error */, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - The_current_host_does_not_support_the_0_option: diag(5001, 1 /* 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: diag(5009, 1 /* 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: diag(5010, 1 /* 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: diag(5012, 1 /* Error */, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), - Failed_to_parse_file_0_Colon_1: diag(5014, 1 /* Error */, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), - Unknown_compiler_option_0: diag(5023, 1 /* Error */, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), - Compiler_option_0_requires_a_value_of_type_1: diag(5024, 1 /* 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: diag(5025, 1 /* 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: diag(5033, 1 /* 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: diag(5042, 1 /* 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: diag(5047, 1 /* 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: diag(5048, 1 /* 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: diag(5051, 1 /* 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: diag(5052, 1 /* 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: diag(5053, 1 /* 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: diag(5054, 1 /* 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: diag(5055, 1 /* 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: diag(5056, 1 /* 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: diag(5057, 1 /* 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: diag(5058, 1 /* 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: diag(5059, 1 /* 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: diag(5061, 1 /* 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: diag(5062, 1 /* 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: diag(5063, 1 /* 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: diag(5064, 1 /* 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: diag(5065, 1 /* 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: diag(5066, 1 /* 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: diag(5067, 1 /* 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: diag(5068, 1 /* 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: diag(5069, 1 /* 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_when_moduleResolution_is_set_to_classic: diag(5070, 1 /* Error */, "Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic_5070", "Option '--resolveJsonModule' cannot be specified when 'moduleResolution' is set to 'classic'."), - Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext: diag(5071, 1 /* 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: diag(5072, 1 /* Error */, "Unknown_build_option_0_5072", "Unknown build option '{0}'."), - Build_option_0_requires_a_value_of_type_1: diag(5073, 1 /* 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: diag(5074, 1 /* 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: diag(5075, 1 /* 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: diag(5076, 1 /* 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: diag(5077, 1 /* Error */, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), - Unknown_watch_option_0: diag(5078, 1 /* Error */, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."), - Unknown_watch_option_0_Did_you_mean_1: diag(5079, 1 /* 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: diag(5080, 1 /* 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: diag(5081, 1 /* 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: diag(5082, 1 /* 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: diag(5083, 1 /* Error */, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), - A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, 1 /* 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: diag(5086, 1 /* 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: diag(5087, 1 /* 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: diag(5088, 1 /* 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: diag(5089, 1 /* 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: diag(5090, 1 /* 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 './'?"), - Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled: diag(5091, 1 /* Error */, "Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when '{0}' is enabled."), - The_root_value_of_a_0_file_must_be_an_object: diag(5092, 1 /* Error */, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."), - Compiler_option_0_may_only_be_used_with_build: diag(5093, 1 /* Error */, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."), - Compiler_option_0_may_not_be_used_with_build: diag(5094, 1 /* Error */, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."), - Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, 1 /* Error */, "Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option '{0}' can only be used when 'module' is set to 'es2015' or later."), - Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set: diag(5096, 1 /* Error */, "Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set_5096", "Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set."), - An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled: diag(5097, 1 /* Error */, "An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled_5097", "An import path can only end with a '{0}' extension when 'allowImportingTsExtensions' is enabled."), - Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler: diag(5098, 1 /* Error */, "Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler_5098", "Option '{0}' can only be used when 'moduleResolution' is set to 'node16', 'nodenext', or 'bundler'."), - Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error: diag(5101, 1 /* Error */, "Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprec_5101", `Option '{0}' is deprecated and will stop functioning in TypeScript {1}. Specify compilerOption '"ignoreDeprecations": "{2}"' to silence this error.`), - Option_0_has_been_removed_Please_remove_it_from_your_configuration: diag(5102, 1 /* Error */, "Option_0_has_been_removed_Please_remove_it_from_your_configuration_5102", "Option '{0}' has been removed. Please remove it from your configuration."), - Invalid_value_for_ignoreDeprecations: diag(5103, 1 /* Error */, "Invalid_value_for_ignoreDeprecations_5103", "Invalid value for '--ignoreDeprecations'."), - Option_0_is_redundant_and_cannot_be_specified_with_option_1: diag(5104, 1 /* Error */, "Option_0_is_redundant_and_cannot_be_specified_with_option_1_5104", "Option '{0}' is redundant and cannot be specified with option '{1}'."), - Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System: diag(5105, 1 /* Error */, "Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System_5105", "Option 'verbatimModuleSyntax' cannot be used when 'module' is set to 'UMD', 'AMD', or 'System'."), - Use_0_instead: diag(5106, 3 /* Message */, "Use_0_instead_5106", "Use '{0}' instead."), - Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error: diag(5107, 1 /* Error */, "Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDepr_5107", `Option '{0}={1}' is deprecated and will stop functioning in TypeScript {2}. Specify compilerOption '"ignoreDeprecations": "{3}"' to silence this error.`), - Option_0_1_has_been_removed_Please_remove_it_from_your_configuration: diag(5108, 1 /* Error */, "Option_0_1_has_been_removed_Please_remove_it_from_your_configuration_5108", "Option '{0}={1}' has been removed. Please remove it from your configuration."), - Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1: diag(5109, 1 /* Error */, "Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1_5109", "Option 'moduleResolution' must be set to '{0}' (or left unspecified) when option 'module' is set to '{1}'."), - Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1: diag(5110, 1 /* Error */, "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."), - Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6e3, 3 /* 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: diag(6001, 3 /* Message */, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), - Generates_corresponding_d_ts_file: diag(6002, 3 /* Message */, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), - Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: diag(6004, 3 /* 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: diag(6005, 3 /* Message */, "Watch_input_files_6005", "Watch input files."), - Redirect_output_structure_to_the_directory: diag(6006, 3 /* Message */, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."), - Do_not_erase_const_enum_declarations_in_generated_code: diag(6007, 3 /* 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: diag(6008, 3 /* 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: diag(6009, 3 /* Message */, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."), - Do_not_emit_outputs: diag(6010, 3 /* 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: diag(6011, 3 /* 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: diag(6012, 3 /* Message */, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."), - Do_not_resolve_the_real_path_of_symlinks: diag(6013, 3 /* Message */, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."), - Only_emit_d_ts_declaration_files: diag(6014, 3 /* Message */, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."), - Specify_ECMAScript_target_version: diag(6015, 3 /* Message */, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."), - Specify_module_code_generation: diag(6016, 3 /* Message */, "Specify_module_code_generation_6016", "Specify module code generation."), - Print_this_message: diag(6017, 3 /* Message */, "Print_this_message_6017", "Print this message."), - Print_the_compiler_s_version: diag(6019, 3 /* 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: diag(6020, 3 /* 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: diag(6023, 3 /* Message */, "Syntax_Colon_0_6023", "Syntax: {0}"), - options: diag(6024, 3 /* Message */, "options_6024", "options"), - file: diag(6025, 3 /* Message */, "file_6025", "file"), - Examples_Colon_0: diag(6026, 3 /* Message */, "Examples_Colon_0_6026", "Examples: {0}"), - Options_Colon: diag(6027, 3 /* Message */, "Options_Colon_6027", "Options:"), - Version_0: diag(6029, 3 /* Message */, "Version_0_6029", "Version {0}"), - Insert_command_line_options_and_files_from_a_file: diag(6030, 3 /* 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: diag(6031, 3 /* Message */, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."), - File_change_detected_Starting_incremental_compilation: diag(6032, 3 /* Message */, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."), - KIND: diag(6034, 3 /* Message */, "KIND_6034", "KIND"), - FILE: diag(6035, 3 /* Message */, "FILE_6035", "FILE"), - VERSION: diag(6036, 3 /* Message */, "VERSION_6036", "VERSION"), - LOCATION: diag(6037, 3 /* Message */, "LOCATION_6037", "LOCATION"), - DIRECTORY: diag(6038, 3 /* Message */, "DIRECTORY_6038", "DIRECTORY"), - STRATEGY: diag(6039, 3 /* Message */, "STRATEGY_6039", "STRATEGY"), - FILE_OR_DIRECTORY: diag(6040, 3 /* Message */, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"), - Errors_Files: diag(6041, 3 /* Message */, "Errors_Files_6041", "Errors Files"), - Generates_corresponding_map_file: diag(6043, 3 /* Message */, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."), - Compiler_option_0_expects_an_argument: diag(6044, 1 /* Error */, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."), - Unterminated_quoted_string_in_response_file_0: diag(6045, 1 /* Error */, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."), - Argument_for_0_option_must_be_Colon_1: diag(6046, 1 /* 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: diag(6048, 1 /* 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}'."), - Unable_to_open_file_0: diag(6050, 1 /* Error */, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."), - Corrupted_locale_file_0: diag(6051, 1 /* Error */, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), - Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, 3 /* 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: diag(6053, 1 /* Error */, "File_0_not_found_6053", "File '{0}' not found."), - File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, 1 /* 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: diag(6055, 3 /* 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: diag(6056, 3 /* 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: diag(6058, 3 /* 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: diag(6059, 1 /* 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: diag(6060, 3 /* 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: diag(6061, 3 /* Message */, "NEWLINE_6061", "NEWLINE"), - Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, 1 /* 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: diag(6065, 3 /* Message */, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), - Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, 3 /* Message */, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), - Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: diag(6070, 3 /* 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: diag(6071, 3 /* Message */, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."), - Suppress_excess_property_checks_for_object_literals: diag(6072, 3 /* 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: diag(6073, 3 /* 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: diag(6074, 3 /* 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: diag(6075, 3 /* 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: diag(6076, 3 /* 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: diag(6077, 3 /* Message */, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."), - Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, 3 /* 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: diag(6079, 3 /* Message */, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."), - Specify_JSX_code_generation: diag(6080, 3 /* Message */, "Specify_JSX_code_generation_6080", "Specify JSX code generation."), - File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, 3 /* 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: diag(6082, 1 /* 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: diag(6083, 3 /* 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: diag(6084, 3 /* 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: diag(6085, 3 /* Message */, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."), - Resolving_module_0_from_1: diag(6086, 3 /* Message */, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"), - Explicitly_specified_module_resolution_kind_Colon_0: diag(6087, 3 /* Message */, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."), - Module_resolution_kind_is_not_specified_using_0: diag(6088, 3 /* 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: diag(6089, 3 /* Message */, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"), - Module_name_0_was_not_resolved: diag(6090, 3 /* 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: diag(6091, 3 /* 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: diag(6092, 3 /* Message */, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."), - Trying_substitution_0_candidate_module_location_Colon_1: diag(6093, 3 /* 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: diag(6094, 3 /* 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_types_Colon_1: diag(6095, 3 /* Message */, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."), - File_0_does_not_exist: diag(6096, 3 /* Message */, "File_0_does_not_exist_6096", "File '{0}' does not exist."), - File_0_exists_use_it_as_a_name_resolution_result: diag(6097, 3 /* Message */, "File_0_exists_use_it_as_a_name_resolution_result_6097", "File '{0}' exists - use it as a name resolution result."), - Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: diag(6098, 3 /* Message */, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."), - Found_package_json_at_0: diag(6099, 3 /* Message */, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."), - package_json_does_not_have_a_0_field: diag(6100, 3 /* 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: diag(6101, 3 /* 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: diag(6102, 3 /* Message */, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."), - Checking_if_0_is_the_longest_matching_prefix_for_1_2: diag(6104, 3 /* 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: diag(6105, 3 /* 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: diag(6106, 3 /* 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: diag(6107, 3 /* 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: diag(6108, 3 /* 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: diag(6109, 3 /* 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: diag(6110, 3 /* Message */, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."), - Module_resolution_using_rootDirs_has_failed: diag(6111, 3 /* Message */, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."), - Do_not_emit_use_strict_directives_in_module_output: diag(6112, 3 /* Message */, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."), - Enable_strict_null_checks: diag(6113, 3 /* Message */, "Enable_strict_null_checks_6113", "Enable strict null checks."), - Unknown_option_excludes_Did_you_mean_exclude: diag(6114, 1 /* 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: diag(6115, 3 /* 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: diag(6116, 3 /* Message */, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"), - Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: diag(6119, 3 /* 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: diag(6120, 3 /* Message */, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"), - Resolving_with_primary_search_path_0: diag(6121, 3 /* Message */, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."), - Root_directory_cannot_be_determined_skipping_primary_search_paths: diag(6122, 3 /* 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: diag(6123, 3 /* 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: diag(6124, 3 /* 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: diag(6125, 3 /* 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: diag(6126, 3 /* 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: diag(6127, 3 /* 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: diag(6128, 3 /* 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: diag(6130, 3 /* 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: diag(6131, 1 /* 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: diag(6132, 3 /* 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: diag( - 6133, - 1 /* Error */, - "_0_is_declared_but_its_value_is_never_read_6133", - "'{0}' is declared but its value is never read.", - /*reportsUnnecessary*/ - true - ), - Report_errors_on_unused_locals: diag(6134, 3 /* Message */, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."), - Report_errors_on_unused_parameters: diag(6135, 3 /* 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: diag(6136, 3 /* 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: diag(6137, 1 /* 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: diag( - 6138, - 1 /* Error */, - "Property_0_is_declared_but_its_value_is_never_read_6138", - "Property '{0}' is declared but its value is never read.", - /*reportsUnnecessary*/ - true - ), - Import_emit_helpers_from_tslib: diag(6139, 3 /* 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: diag(6140, 1 /* 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: diag(6141, 3 /* 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: diag(6142, 1 /* 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: diag(6144, 3 /* 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: diag(6145, 3 /* 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: diag(6146, 3 /* 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: diag(6147, 3 /* 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: diag(6148, 3 /* 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: diag(6149, 3 /* Message */, "Show_diagnostic_information_6149", "Show diagnostic information."), - Show_verbose_diagnostic_information: diag(6150, 3 /* Message */, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."), - Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: diag(6151, 3 /* 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: diag(6152, 3 /* 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: diag(6153, 3 /* 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: diag(6154, 3 /* 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: diag(6155, 3 /* 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: diag(6156, 3 /* 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: diag(6157, 3 /* 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: diag(6158, 3 /* 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: diag(6159, 3 /* 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: diag(6160, 3 /* 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: diag(6161, 3 /* Message */, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."), - Disable_size_limitations_on_JavaScript_projects: diag(6162, 3 /* Message */, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."), - The_character_set_of_the_input_files: diag(6163, 3 /* Message */, "The_character_set_of_the_input_files_6163", "The character set of the input files."), - Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1: diag(6164, 3 /* Message */, "Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1_6164", "Skipping module '{0}' that looks like an absolute URI, target file types: {1}."), - Do_not_truncate_error_messages: diag(6165, 3 /* Message */, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."), - Output_directory_for_generated_declaration_files: diag(6166, 3 /* 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: diag(6167, 3 /* 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: diag(6168, 3 /* 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: diag(6169, 3 /* Message */, "Show_all_compiler_options_6169", "Show all compiler options."), - Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: diag(6170, 3 /* 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: diag(6171, 3 /* Message */, "Command_line_Options_6171", "Command-line Options"), - Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: diag(6179, 3 /* 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: diag(6180, 3 /* Message */, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."), - Scoped_package_detected_looking_in_0: diag(6182, 3 /* Message */, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"), - Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6183, 3 /* Message */, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), - Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6184, 3 /* Message */, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), - Enable_strict_checking_of_function_types: diag(6186, 3 /* Message */, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."), - Enable_strict_checking_of_property_initialization_in_classes: diag(6187, 3 /* Message */, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."), - Numeric_separators_are_not_allowed_here: diag(6188, 1 /* Error */, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."), - Multiple_consecutive_numeric_separators_are_not_permitted: diag(6189, 1 /* 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: diag(6191, 3 /* 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: diag( - 6192, - 1 /* Error */, - "All_imports_in_import_declaration_are_unused_6192", - "All imports in import declaration are unused.", - /*reportsUnnecessary*/ - true - ), - Found_1_error_Watching_for_file_changes: diag(6193, 3 /* Message */, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."), - Found_0_errors_Watching_for_file_changes: diag(6194, 3 /* 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: diag(6195, 3 /* 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: diag( - 6196, - 1 /* Error */, - "_0_is_declared_but_never_used_6196", - "'{0}' is declared but never used.", - /*reportsUnnecessary*/ - true - ), - Include_modules_imported_with_json_extension: diag(6197, 3 /* Message */, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"), - All_destructured_elements_are_unused: diag( - 6198, - 1 /* Error */, - "All_destructured_elements_are_unused_6198", - "All destructured elements are unused.", - /*reportsUnnecessary*/ - true - ), - All_variables_are_unused: diag( - 6199, - 1 /* Error */, - "All_variables_are_unused_6199", - "All variables are unused.", - /*reportsUnnecessary*/ - true - ), - Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: diag(6200, 1 /* 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: diag(6201, 3 /* Message */, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."), - Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, 1 /* 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: diag(6203, 3 /* Message */, "_0_was_also_declared_here_6203", "'{0}' was also declared here."), - and_here: diag(6204, 3 /* Message */, "and_here_6204", "and here."), - All_type_parameters_are_unused: diag(6205, 1 /* Error */, "All_type_parameters_are_unused_6205", "All type parameters are unused."), - package_json_has_a_typesVersions_field_with_version_specific_path_mappings: diag(6206, 3 /* 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: diag(6207, 3 /* 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: diag(6208, 3 /* 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: diag(6209, 3 /* 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: diag(6210, 3 /* 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: diag(6211, 3 /* 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: diag(6212, 3 /* 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: diag(6213, 3 /* 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: diag(6214, 3 /* 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: diag(6215, 3 /* Message */, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."), - Found_1_error: diag(6216, 3 /* Message */, "Found_1_error_6216", "Found 1 error."), - Found_0_errors: diag(6217, 3 /* Message */, "Found_0_errors_6217", "Found {0} errors."), - Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2: diag(6218, 3 /* 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: diag(6219, 3 /* 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: diag(6220, 3 /* 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: diag(6221, 3 /* 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: diag(6222, 3 /* Message */, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."), - Generates_a_CPU_profile: diag(6223, 3 /* Message */, "Generates_a_CPU_profile_6223", "Generates a CPU profile."), - Disable_solution_searching_for_this_project: diag(6224, 3 /* Message */, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."), - Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: diag(6225, 3 /* Message */, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."), - Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: diag(6226, 3 /* 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', 'FixedChunkSizePolling'."), - Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: diag(6227, 3 /* 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', 'FixedChunkSize'."), - Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, 1 /* 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: diag(6230, 1 /* 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: diag(6231, 1 /* 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: diag(6232, 1 /* 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: diag(6233, 1 /* 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: diag(6234, 1 /* 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: diag(6235, 3 /* Message */, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."), - Arguments_for_the_rest_parameter_0_were_not_provided: diag(6236, 1 /* 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: diag(6237, 3 /* 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: diag(6238, 1 /* 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"), - File_0_exists_according_to_earlier_cached_lookups: diag(6239, 3 /* Message */, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."), - File_0_does_not_exist_according_to_earlier_cached_lookups: diag(6240, 3 /* Message */, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."), - Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: diag(6241, 3 /* Message */, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."), - Resolving_type_reference_directive_0_containing_file_1: diag(6242, 3 /* Message */, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"), - Interpret_optional_property_types_as_written_rather_than_adding_undefined: diag(6243, 3 /* Message */, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."), - Modules: diag(6244, 3 /* Message */, "Modules_6244", "Modules"), - File_Management: diag(6245, 3 /* Message */, "File_Management_6245", "File Management"), - Emit: diag(6246, 3 /* Message */, "Emit_6246", "Emit"), - JavaScript_Support: diag(6247, 3 /* Message */, "JavaScript_Support_6247", "JavaScript Support"), - Type_Checking: diag(6248, 3 /* Message */, "Type_Checking_6248", "Type Checking"), - Editor_Support: diag(6249, 3 /* Message */, "Editor_Support_6249", "Editor Support"), - Watch_and_Build_Modes: diag(6250, 3 /* Message */, "Watch_and_Build_Modes_6250", "Watch and Build Modes"), - Compiler_Diagnostics: diag(6251, 3 /* Message */, "Compiler_Diagnostics_6251", "Compiler Diagnostics"), - Interop_Constraints: diag(6252, 3 /* Message */, "Interop_Constraints_6252", "Interop Constraints"), - Backwards_Compatibility: diag(6253, 3 /* Message */, "Backwards_Compatibility_6253", "Backwards Compatibility"), - Language_and_Environment: diag(6254, 3 /* Message */, "Language_and_Environment_6254", "Language and Environment"), - Projects: diag(6255, 3 /* Message */, "Projects_6255", "Projects"), - Output_Formatting: diag(6256, 3 /* Message */, "Output_Formatting_6256", "Output Formatting"), - Completeness: diag(6257, 3 /* Message */, "Completeness_6257", "Completeness"), - _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: diag(6258, 1 /* Error */, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"), - Found_1_error_in_0: diag(6259, 3 /* Message */, "Found_1_error_in_0_6259", "Found 1 error in {0}"), - Found_0_errors_in_the_same_file_starting_at_Colon_1: diag(6260, 3 /* Message */, "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", "Found {0} errors in the same file, starting at: {1}"), - Found_0_errors_in_1_files: diag(6261, 3 /* Message */, "Found_0_errors_in_1_files_6261", "Found {0} errors in {1} files."), - File_name_0_has_a_1_extension_looking_up_2_instead: diag(6262, 3 /* Message */, "File_name_0_has_a_1_extension_looking_up_2_instead_6262", "File name '{0}' has a '{1}' extension - looking up '{2}' instead."), - Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set: diag(6263, 1 /* Error */, "Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set_6263", "Module '{0}' was resolved to '{1}', but '--allowArbitraryExtensions' is not set."), - Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present: diag(6264, 3 /* Message */, "Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present_6264", "Enable importing files with any extension, provided a declaration file is present."), - Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder: diag(6265, 3 /* Message */, "Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_no_6265", "Resolving type reference directive for program that specifies custom typeRoots, skipping lookup in 'node_modules' folder."), - Option_0_can_only_be_specified_on_command_line: diag(6266, 1 /* Error */, "Option_0_can_only_be_specified_on_command_line_6266", "Option '{0}' can only be specified on command line."), - Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: diag(6270, 3 /* Message */, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."), - Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6271, 3 /* Message */, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."), - Invalid_import_specifier_0_has_no_possible_resolutions: diag(6272, 3 /* Message */, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."), - package_json_scope_0_has_no_imports_defined: diag(6273, 3 /* Message */, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."), - package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, 3 /* Message */, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."), - package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, 3 /* Message */, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"), - Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, 3 /* Message */, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."), - Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update: diag(6277, 3 /* Message */, "Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_i_6277", "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update."), - There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings: diag(6278, 3 /* Message */, "There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The__6278", `There are types at '{0}', but this result could not be resolved when respecting package.json "exports". The '{1}' library may need to update its package.json or typings.`), - Enable_project_compilation: diag(6302, 3 /* Message */, "Enable_project_compilation_6302", "Enable project compilation"), - Composite_projects_may_not_disable_declaration_emit: diag(6304, 1 /* 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: diag(6305, 1 /* 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: diag(6306, 1 /* 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: diag(6307, 1 /* 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: diag(6308, 1 /* 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: diag(6309, 1 /* 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: diag(6310, 1 /* Error */, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."), - Project_0_is_out_of_date_because_output_1_is_older_than_input_2: diag(6350, 3 /* Message */, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"), - Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: diag(6351, 3 /* Message */, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"), - Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, 3 /* 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: diag(6353, 3 /* 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: diag(6354, 3 /* 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: diag(6355, 3 /* Message */, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"), - A_non_dry_build_would_delete_the_following_files_Colon_0: diag(6356, 3 /* 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: diag(6357, 3 /* Message */, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"), - Building_project_0: diag(6358, 3 /* Message */, "Building_project_0_6358", "Building project '{0}'..."), - Updating_output_timestamps_of_project_0: diag(6359, 3 /* Message */, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."), - Project_0_is_up_to_date: diag(6361, 3 /* 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: diag(6362, 3 /* 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: diag(6363, 3 /* 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: diag(6364, 3 /* 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: diag(6365, 3 /* Message */, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."), - Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, 3 /* Message */, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"), - Option_build_must_be_the_first_command_line_argument: diag(6369, 1 /* 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: diag(6370, 1 /* Error */, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."), - Updating_unchanged_output_timestamps_of_project_0: diag(6371, 3 /* 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: diag(6372, 3 /* 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: diag(6373, 3 /* Message */, "Updating_output_of_project_0_6373", "Updating output of project '{0}'..."), - A_non_dry_build_would_update_timestamps_for_output_of_project_0: diag(6374, 3 /* 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: diag(6375, 3 /* 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: diag(6376, 3 /* 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: diag(6377, 1 /* 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}'"), - Composite_projects_may_not_disable_incremental_compilation: diag(6379, 1 /* Error */, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."), - Specify_file_to_store_incremental_compilation_information: diag(6380, 3 /* 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: diag(6381, 3 /* 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: diag(6382, 3 /* 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: diag(6383, 3 /* 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: diag(6384, 3 /* 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: diag( - 6385, - 2 /* Suggestion */, - "_0_is_deprecated_6385", - "'{0}' is deprecated.", - /*reportsUnnecessary*/ - void 0, - /*elidedInCompatabilityPyramid*/ - void 0, - /*reportsDeprecated*/ - true - ), - Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: diag(6386, 3 /* 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_signature_0_of_1_is_deprecated: diag( - 6387, - 2 /* Suggestion */, - "The_signature_0_of_1_is_deprecated_6387", - "The signature '{0}' of '{1}' is deprecated.", - /*reportsUnnecessary*/ - void 0, - /*elidedInCompatabilityPyramid*/ - void 0, - /*reportsDeprecated*/ - true - ), - Project_0_is_being_forcibly_rebuilt: diag(6388, 3 /* Message */, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"), - Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: diag(6389, 3 /* Message */, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."), - Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6390, 3 /* Message */, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6391, 3 /* Message */, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: diag(6392, 3 /* Message */, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."), - Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6393, 3 /* Message */, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), - Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6394, 3 /* Message */, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), - Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6395, 3 /* Message */, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), - Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, 3 /* Message */, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, 3 /* Message */, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, 3 /* Message */, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), - Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: diag(6399, 3 /* Message */, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"), - Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, 3 /* Message */, "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"), - Project_0_is_out_of_date_because_there_was_error_reading_file_1: diag(6401, 3 /* Message */, "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", "Project '{0}' is out of date because there was error reading file '{1}'"), - Resolving_in_0_mode_with_conditions_1: diag(6402, 3 /* Message */, "Resolving_in_0_mode_with_conditions_1_6402", "Resolving in {0} mode with conditions {1}."), - Matched_0_condition_1: diag(6403, 3 /* Message */, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."), - Using_0_subpath_1_with_target_2: diag(6404, 3 /* Message */, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."), - Saw_non_matching_condition_0: diag(6405, 3 /* Message */, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."), - Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: diag(6406, 3 /* Message */, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"), - Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set: diag(6407, 3 /* Message */, "Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noE_6407", "Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set."), - Use_the_package_json_exports_field_when_resolving_package_imports: diag(6408, 3 /* Message */, "Use_the_package_json_exports_field_when_resolving_package_imports_6408", "Use the package.json 'exports' field when resolving package imports."), - Use_the_package_json_imports_field_when_resolving_imports: diag(6409, 3 /* Message */, "Use_the_package_json_imports_field_when_resolving_imports_6409", "Use the package.json 'imports' field when resolving imports."), - Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports: diag(6410, 3 /* Message */, "Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports_6410", "Conditions to set in addition to the resolver-specific defaults when resolving imports."), - true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false: diag(6411, 3 /* Message */, "true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false_6411", "`true` when 'moduleResolution' is 'node16', 'nodenext', or 'bundler'; otherwise `false`."), - Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more: diag(6412, 3 /* Message */, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_6412", "Project '{0}' is out of date because buildinfo file '{1}' indicates that file '{2}' was root file of compilation but not any more."), - Entering_conditional_exports: diag(6413, 3 /* Message */, "Entering_conditional_exports_6413", "Entering conditional exports."), - Resolved_under_condition_0: diag(6414, 3 /* Message */, "Resolved_under_condition_0_6414", "Resolved under condition '{0}'."), - Failed_to_resolve_under_condition_0: diag(6415, 3 /* Message */, "Failed_to_resolve_under_condition_0_6415", "Failed to resolve under condition '{0}'."), - Exiting_conditional_exports: diag(6416, 3 /* Message */, "Exiting_conditional_exports_6416", "Exiting conditional exports."), - Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0: diag(6417, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0_6417", "Searching all ancestor node_modules directories for preferred extensions: {0}."), - Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0: diag(6418, 3 /* Message */, "Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0_6418", "Searching all ancestor node_modules directories for fallback extensions: {0}."), - The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, 3 /* 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: diag(6501, 3 /* 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: diag(6502, 3 /* 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: diag(6503, 3 /* 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: diag(6504, 1 /* 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?"), - Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, 3 /* Message */, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."), - Consider_adding_a_declare_modifier_to_this_class: diag(6506, 3 /* Message */, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."), - Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, 3 /* Message */, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."), - Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, 3 /* Message */, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."), - Allow_accessing_UMD_globals_from_modules: diag(6602, 3 /* Message */, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."), - Disable_error_reporting_for_unreachable_code: diag(6603, 3 /* Message */, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."), - Disable_error_reporting_for_unused_labels: diag(6604, 3 /* Message */, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."), - Ensure_use_strict_is_always_emitted: diag(6605, 3 /* Message */, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."), - Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6606, 3 /* Message */, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."), - Specify_the_base_directory_to_resolve_non_relative_module_names: diag(6607, 3 /* Message */, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."), - No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: diag(6608, 3 /* Message */, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."), - Enable_error_reporting_in_type_checked_JavaScript_files: diag(6609, 3 /* Message */, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."), - Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: diag(6611, 3 /* Message */, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."), - Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: diag(6612, 3 /* Message */, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."), - Specify_the_output_directory_for_generated_declaration_files: diag(6613, 3 /* Message */, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."), - Create_sourcemaps_for_d_ts_files: diag(6614, 3 /* Message */, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."), - Output_compiler_performance_information_after_building: diag(6615, 3 /* Message */, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."), - Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: diag(6616, 3 /* Message */, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."), - Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: diag(6617, 3 /* Message */, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."), - Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: diag(6618, 3 /* Message */, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."), - Opt_a_project_out_of_multi_project_reference_checking_when_editing: diag(6619, 3 /* Message */, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."), - Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: diag(6620, 3 /* Message */, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects."), - Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: diag(6621, 3 /* Message */, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."), - Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6622, 3 /* Message */, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."), - Only_output_d_ts_files_and_not_JavaScript_files: diag(6623, 3 /* Message */, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."), - Emit_design_type_metadata_for_decorated_declarations_in_source_files: diag(6624, 3 /* Message */, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."), - Disable_the_type_acquisition_for_JavaScript_projects: diag(6625, 3 /* Message */, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"), - Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: diag(6626, 3 /* Message */, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."), - Filters_results_from_the_include_option: diag(6627, 3 /* Message */, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."), - Remove_a_list_of_directories_from_the_watch_process: diag(6628, 3 /* Message */, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."), - Remove_a_list_of_files_from_the_watch_mode_s_processing: diag(6629, 3 /* Message */, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."), - Enable_experimental_support_for_legacy_experimental_decorators: diag(6630, 3 /* Message */, "Enable_experimental_support_for_legacy_experimental_decorators_6630", "Enable experimental support for legacy experimental decorators."), - Print_files_read_during_the_compilation_including_why_it_was_included: diag(6631, 3 /* Message */, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."), - Output_more_detailed_compiler_performance_information_after_building: diag(6632, 3 /* Message */, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."), - Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: diag(6633, 3 /* Message */, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."), - Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: diag(6634, 3 /* Message */, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."), - Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: diag(6635, 3 /* Message */, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."), - Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6636, 3 /* Message */, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date."), - Ensure_that_casing_is_correct_in_imports: diag(6637, 3 /* Message */, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."), - Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, 3 /* Message */, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."), - Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, 3 /* Message */, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."), - Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, 3 /* Message */, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."), - Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, 3 /* Message */, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."), - Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, 3 /* Message */, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."), - Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: diag(6644, 3 /* Message */, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."), - Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: diag(6645, 3 /* Message */, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."), - Specify_what_JSX_code_is_generated: diag(6646, 3 /* Message */, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."), - Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: diag(6647, 3 /* Message */, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."), - Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: diag(6648, 3 /* Message */, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."), - Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: diag(6649, 3 /* Message */, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."), - Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: diag(6650, 3 /* Message */, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."), - Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: diag(6651, 3 /* Message */, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."), - Print_the_names_of_emitted_files_after_a_compilation: diag(6652, 3 /* Message */, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."), - Print_all_of_the_files_read_during_the_compilation: diag(6653, 3 /* Message */, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."), - Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: diag(6654, 3 /* Message */, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."), - Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6655, 3 /* Message */, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."), - Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: diag(6656, 3 /* Message */, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."), - Specify_what_module_code_is_generated: diag(6657, 3 /* Message */, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."), - Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: diag(6658, 3 /* Message */, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."), - Set_the_newline_character_for_emitting_files: diag(6659, 3 /* Message */, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."), - Disable_emitting_files_from_a_compilation: diag(6660, 3 /* Message */, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."), - Disable_generating_custom_helper_functions_like_extends_in_compiled_output: diag(6661, 3 /* Message */, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like '__extends' in compiled output."), - Disable_emitting_files_if_any_type_checking_errors_are_reported: diag(6662, 3 /* Message */, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."), - Disable_truncating_types_in_error_messages: diag(6663, 3 /* Message */, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."), - Enable_error_reporting_for_fallthrough_cases_in_switch_statements: diag(6664, 3 /* Message */, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."), - Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: diag(6665, 3 /* Message */, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied 'any' type."), - Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: diag(6666, 3 /* Message */, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."), - Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: diag(6667, 3 /* Message */, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."), - Enable_error_reporting_when_this_is_given_the_type_any: diag(6668, 3 /* Message */, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when 'this' is given the type 'any'."), - Disable_adding_use_strict_directives_in_emitted_JavaScript_files: diag(6669, 3 /* Message */, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."), - Disable_including_any_library_files_including_the_default_lib_d_ts: diag(6670, 3 /* Message */, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."), - Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: diag(6671, 3 /* Message */, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type."), - Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: diag(6672, 3 /* Message */, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."), - Disable_strict_checking_of_generic_signatures_in_function_types: diag(6673, 3 /* Message */, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."), - Add_undefined_to_a_type_when_accessed_using_an_index: diag(6674, 3 /* Message */, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add 'undefined' to a type when accessed using an index."), - Enable_error_reporting_when_local_variables_aren_t_read: diag(6675, 3 /* Message */, "Enable_error_reporting_when_local_variables_aren_t_read_6675", "Enable error reporting when local variables aren't read."), - Raise_an_error_when_a_function_parameter_isn_t_read: diag(6676, 3 /* Message */, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read."), - Deprecated_setting_Use_outFile_instead: diag(6677, 3 /* Message */, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."), - Specify_an_output_folder_for_all_emitted_files: diag(6678, 3 /* Message */, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."), - Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: diag(6679, 3 /* Message */, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."), - Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: diag(6680, 3 /* Message */, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."), - Specify_a_list_of_language_service_plugins_to_include: diag(6681, 3 /* Message */, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."), - Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, 3 /* Message */, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing 'const enum' declarations in generated code."), - Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: diag(6683, 3 /* Message */, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."), - Disable_wiping_the_console_in_watch_mode: diag(6684, 3 /* Message */, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode."), - Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: diag(6685, 3 /* Message */, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read."), - Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: diag(6686, 3 /* Message */, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."), - Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: diag(6687, 3 /* Message */, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."), - Disable_emitting_comments: diag(6688, 3 /* Message */, "Disable_emitting_comments_6688", "Disable emitting comments."), - Enable_importing_json_files: diag(6689, 3 /* Message */, "Enable_importing_json_files_6689", "Enable importing .json files."), - Specify_the_root_folder_within_your_source_files: diag(6690, 3 /* Message */, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."), - Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: diag(6691, 3 /* Message */, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."), - Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: diag(6692, 3 /* Message */, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."), - Skip_type_checking_all_d_ts_files: diag(6693, 3 /* Message */, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."), - Create_source_map_files_for_emitted_JavaScript_files: diag(6694, 3 /* Message */, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."), - Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: diag(6695, 3 /* Message */, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."), - Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: diag(6697, 3 /* Message */, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."), - When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: diag(6698, 3 /* Message */, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."), - When_type_checking_take_into_account_null_and_undefined: diag(6699, 3 /* Message */, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account 'null' and 'undefined'."), - Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: diag(6700, 3 /* Message */, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."), - Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: diag(6701, 3 /* Message */, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have '@internal' in their JSDoc comments."), - Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: diag(6702, 3 /* Message */, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."), - Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: diag(6703, 3 /* Message */, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."), - Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6704, 3 /* Message */, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."), - Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: diag(6705, 3 /* Message */, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."), - Log_paths_used_during_the_moduleResolution_process: diag(6706, 3 /* Message */, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the 'moduleResolution' process."), - Specify_the_path_to_tsbuildinfo_incremental_compilation_file: diag(6707, 3 /* Message */, "Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707", "Specify the path to .tsbuildinfo incremental compilation file."), - Specify_options_for_automatic_acquisition_of_declaration_files: diag(6709, 3 /* Message */, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."), - Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: diag(6710, 3 /* Message */, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like './node_modules/@types'."), - Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: diag(6711, 3 /* Message */, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."), - Emit_ECMAScript_standard_compliant_class_fields: diag(6712, 3 /* Message */, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."), - Enable_verbose_logging: diag(6713, 3 /* Message */, "Enable_verbose_logging_6713", "Enable verbose logging."), - Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: diag(6714, 3 /* Message */, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."), - Specify_how_the_TypeScript_watch_mode_works: diag(6715, 3 /* Message */, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."), - Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, 3 /* Message */, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."), - Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, 3 /* Message */, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."), - Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."), - Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."), - one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"), - one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"), - type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"), - default_Colon: diag(6903, 3 /* Message */, "default_Colon_6903", "default:"), - module_system_or_esModuleInterop: diag(6904, 3 /* Message */, "module_system_or_esModuleInterop_6904", 'module === "system" or esModuleInterop'), - false_unless_strict_is_set: diag(6905, 3 /* Message */, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"), - false_unless_composite_is_set: diag(6906, 3 /* Message */, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"), - node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: diag(6907, 3 /* Message */, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", '`["node_modules", "bower_components", "jspm_packages"]`, plus the value of `outDir` if one is specified.'), - if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: diag(6908, 3 /* Message */, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", '`[]` if `files` is specified, otherwise `["**/*"]`'), - true_if_composite_false_otherwise: diag(6909, 3 /* Message */, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"), - module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: diag(69010, 3 /* Message */, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"), - Computed_from_the_list_of_input_files: diag(6911, 3 /* Message */, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"), - Platform_specific: diag(6912, 3 /* Message */, "Platform_specific_6912", "Platform specific"), - You_can_learn_about_all_of_the_compiler_options_at_0: diag(6913, 3 /* Message */, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"), - Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: diag(6914, 3 /* Message */, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"), - Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0: diag(6915, 3 /* Message */, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"), - COMMON_COMMANDS: diag(6916, 3 /* Message */, "COMMON_COMMANDS_6916", "COMMON COMMANDS"), - ALL_COMPILER_OPTIONS: diag(6917, 3 /* Message */, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"), - WATCH_OPTIONS: diag(6918, 3 /* Message */, "WATCH_OPTIONS_6918", "WATCH OPTIONS"), - BUILD_OPTIONS: diag(6919, 3 /* Message */, "BUILD_OPTIONS_6919", "BUILD OPTIONS"), - COMMON_COMPILER_OPTIONS: diag(6920, 3 /* Message */, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"), - COMMAND_LINE_FLAGS: diag(6921, 3 /* Message */, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"), - tsc_Colon_The_TypeScript_Compiler: diag(6922, 3 /* Message */, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"), - Compiles_the_current_project_tsconfig_json_in_the_working_directory: diag(6923, 3 /* Message */, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"), - Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: diag(6924, 3 /* Message */, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."), - Build_a_composite_project_in_the_working_directory: diag(6925, 3 /* Message */, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."), - Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: diag(6926, 3 /* Message */, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."), - Compiles_the_TypeScript_project_located_at_the_specified_path: diag(6927, 3 /* Message */, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."), - An_expanded_version_of_this_information_showing_all_possible_compiler_options: diag(6928, 3 /* Message */, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"), - Compiles_the_current_project_with_additional_settings: diag(6929, 3 /* Message */, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."), - true_for_ES2022_and_above_including_ESNext: diag(6930, 3 /* Message */, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."), - List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, 1 /* Error */, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."), - Variable_0_implicitly_has_an_1_type: diag(7005, 1 /* Error */, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), - Parameter_0_implicitly_has_an_1_type: diag(7006, 1 /* Error */, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), - Member_0_implicitly_has_an_1_type: diag(7008, 1 /* 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: diag(7009, 1 /* 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: diag(7010, 1 /* 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: diag(7011, 1 /* 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."), - This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation: diag(7012, 1 /* Error */, "This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation_7012", "This overload implicitly returns the type '{0}' because it lacks a return type annotation."), - Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, 1 /* 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: diag(7014, 1 /* 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: diag(7015, 1 /* 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: diag(7016, 1 /* 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: diag(7017, 1 /* 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: diag(7018, 1 /* 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: diag(7019, 1 /* 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: diag(7020, 1 /* 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: diag(7022, 1 /* 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: diag(7023, 1 /* 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: diag(7024, 1 /* 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: diag(7025, 1 /* 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: diag(7026, 1 /* 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: diag( - 7027, - 1 /* Error */, - "Unreachable_code_detected_7027", - "Unreachable code detected.", - /*reportsUnnecessary*/ - true - ), - Unused_label: diag( - 7028, - 1 /* Error */, - "Unused_label_7028", - "Unused label.", - /*reportsUnnecessary*/ - true - ), - Fallthrough_case_in_switch: diag(7029, 1 /* Error */, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."), - Not_all_code_paths_return_a_value: diag(7030, 1 /* Error */, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."), - Binding_element_0_implicitly_has_an_1_type: diag(7031, 1 /* 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: diag(7032, 1 /* 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: diag(7033, 1 /* 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: diag(7034, 1 /* 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: diag(7035, 1 /* 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: diag(7036, 1 /* 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: diag(7037, 3 /* 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: diag(7038, 3 /* 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: diag(7039, 1 /* 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: diag(7040, 1 /* 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: diag(7041, 1 /* 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: diag(7042, 1 /* 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: diag(7043, 2 /* 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: diag(7044, 2 /* 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: diag(7045, 2 /* 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: diag(7046, 2 /* 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: diag(7047, 2 /* 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: diag(7048, 2 /* 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: diag(7049, 2 /* 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: diag(7050, 2 /* 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: diag(7051, 1 /* 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: diag(7052, 1 /* 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: diag(7053, 1 /* 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: diag(7054, 1 /* 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: diag(7055, 1 /* 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: diag(7056, 1 /* 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."), - yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: diag(7057, 1 /* Error */, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."), - If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, 1 /* Error */, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"), - This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, 1 /* Error */, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."), - This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, 1 /* Error */, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."), - A_mapped_type_may_not_declare_properties_or_methods: diag(7061, 1 /* Error */, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."), - You_cannot_rename_this_element: diag(8e3, 1 /* Error */, "You_cannot_rename_this_element_8000", "You cannot rename this element."), - You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, 1 /* 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: diag(8002, 1 /* 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: diag(8003, 1 /* 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: diag(8004, 1 /* 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: diag(8005, 1 /* 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: diag(8006, 1 /* 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: diag(8008, 1 /* 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: diag(8009, 1 /* 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: diag(8010, 1 /* 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: diag(8011, 1 /* 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: diag(8012, 1 /* 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: diag(8013, 1 /* 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: diag(8016, 1 /* Error */, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), - Signature_declarations_can_only_be_used_in_TypeScript_files: diag(8017, 1 /* Error */, "Signature_declarations_can_only_be_used_in_TypeScript_files_8017", "Signature declarations can only be used in TypeScript files."), - Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."), - JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* 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: diag(8021, 1 /* 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: diag(8022, 1 /* 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: diag(8023, 1 /* 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: diag(8024, 1 /* 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: diag(8025, 1 /* 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: diag(8026, 1 /* 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: diag(8027, 1 /* 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: diag(8028, 1 /* 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: diag(8029, 1 /* 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: diag(8030, 1 /* 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: diag(8031, 1 /* 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: diag(8032, 1 /* 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: diag(8033, 1 /* 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: diag(8034, 1 /* Error */, "The_tag_was_first_specified_here_8034", "The tag was first specified here."), - You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."), - You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."), - Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, 1 /* Error */, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."), - Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export: diag(8038, 1 /* Error */, "Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038", "Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."), - A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag: diag(8039, 1 /* Error */, "A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag_8039", "A JSDoc '@template' tag may not follow a '@typedef', '@callback', or '@overload' tag"), - Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, 1 /* 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: diag(9006, 1 /* 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: diag(17e3, 1 /* 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: diag(17001, 1 /* 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: diag(17002, 1 /* Error */, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."), - Cannot_use_JSX_unless_the_jsx_flag_is_provided: diag(17004, 1 /* 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: diag(17005, 1 /* 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: diag(17006, 1 /* 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: diag(17007, 1 /* 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: diag(17008, 1 /* 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: diag(17009, 1 /* 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: diag(17010, 1 /* 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: diag(17011, 1 /* 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: diag(17012, 1 /* 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: diag(17013, 1 /* 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: diag(17014, 1 /* Error */, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."), - Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, 1 /* 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: diag(17016, 1 /* 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: diag(17017, 1 /* 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: diag(17018, 1 /* Error */, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), - _0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17019, 1 /* Error */, "_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019", "'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), - _0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17020, 1 /* Error */, "_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020", "'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), - Circularity_detected_while_resolving_configuration_Colon_0: diag(18e3, 1 /* Error */, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), - The_files_list_in_config_file_0_is_empty: diag(18002, 1 /* 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: diag(18003, 1 /* 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_ES_module: diag(80001, 2 /* Suggestion */, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."), - This_constructor_function_may_be_converted_to_a_class_declaration: diag(80002, 2 /* 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: diag(80003, 2 /* 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: diag(80004, 2 /* 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: diag(80005, 2 /* 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: diag(80006, 2 /* 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: diag(80007, 2 /* 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: diag(80008, 2 /* 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."), - JSDoc_typedef_may_be_converted_to_TypeScript_type: diag(80009, 2 /* Suggestion */, "JSDoc_typedef_may_be_converted_to_TypeScript_type_80009", "JSDoc typedef may be converted to TypeScript type."), - JSDoc_typedefs_may_be_converted_to_TypeScript_types: diag(80010, 2 /* Suggestion */, "JSDoc_typedefs_may_be_converted_to_TypeScript_types_80010", "JSDoc typedefs may be converted to TypeScript types."), - Add_missing_super_call: diag(90001, 3 /* Message */, "Add_missing_super_call_90001", "Add missing 'super()' call"), - Make_super_call_the_first_statement_in_the_constructor: diag(90002, 3 /* Message */, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), - Change_extends_to_implements: diag(90003, 3 /* Message */, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), - Remove_unused_declaration_for_Colon_0: diag(90004, 3 /* Message */, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"), - Remove_import_from_0: diag(90005, 3 /* Message */, "Remove_import_from_0_90005", "Remove import from '{0}'"), - Implement_interface_0: diag(90006, 3 /* Message */, "Implement_interface_0_90006", "Implement interface '{0}'"), - Implement_inherited_abstract_class: diag(90007, 3 /* Message */, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"), - Add_0_to_unresolved_variable: diag(90008, 3 /* Message */, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"), - Remove_variable_statement: diag(90010, 3 /* Message */, "Remove_variable_statement_90010", "Remove variable statement"), - Remove_template_tag: diag(90011, 3 /* Message */, "Remove_template_tag_90011", "Remove template tag"), - Remove_type_parameters: diag(90012, 3 /* Message */, "Remove_type_parameters_90012", "Remove type parameters"), - Import_0_from_1: diag(90013, 3 /* Message */, "Import_0_from_1_90013", `Import '{0}' from "{1}"`), - Change_0_to_1: diag(90014, 3 /* Message */, "Change_0_to_1_90014", "Change '{0}' to '{1}'"), - Declare_property_0: diag(90016, 3 /* Message */, "Declare_property_0_90016", "Declare property '{0}'"), - Add_index_signature_for_property_0: diag(90017, 3 /* Message */, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"), - Disable_checking_for_this_file: diag(90018, 3 /* Message */, "Disable_checking_for_this_file_90018", "Disable checking for this file"), - Ignore_this_error_message: diag(90019, 3 /* Message */, "Ignore_this_error_message_90019", "Ignore this error message"), - Initialize_property_0_in_the_constructor: diag(90020, 3 /* Message */, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"), - Initialize_static_property_0: diag(90021, 3 /* Message */, "Initialize_static_property_0_90021", "Initialize static property '{0}'"), - Change_spelling_to_0: diag(90022, 3 /* Message */, "Change_spelling_to_0_90022", "Change spelling to '{0}'"), - Declare_method_0: diag(90023, 3 /* Message */, "Declare_method_0_90023", "Declare method '{0}'"), - Declare_static_method_0: diag(90024, 3 /* Message */, "Declare_static_method_0_90024", "Declare static method '{0}'"), - Prefix_0_with_an_underscore: diag(90025, 3 /* Message */, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"), - Rewrite_as_the_indexed_access_type_0: diag(90026, 3 /* Message */, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"), - Declare_static_property_0: diag(90027, 3 /* Message */, "Declare_static_property_0_90027", "Declare static property '{0}'"), - Call_decorator_expression: diag(90028, 3 /* Message */, "Call_decorator_expression_90028", "Call decorator expression"), - Add_async_modifier_to_containing_function: diag(90029, 3 /* Message */, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"), - Replace_infer_0_with_unknown: diag(90030, 3 /* Message */, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"), - Replace_all_unused_infer_with_unknown: diag(90031, 3 /* Message */, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"), - Add_parameter_name: diag(90034, 3 /* Message */, "Add_parameter_name_90034", "Add parameter name"), - Declare_private_property_0: diag(90035, 3 /* Message */, "Declare_private_property_0_90035", "Declare private property '{0}'"), - Replace_0_with_Promise_1: diag(90036, 3 /* Message */, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"), - Fix_all_incorrect_return_type_of_an_async_functions: diag(90037, 3 /* Message */, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"), - Declare_private_method_0: diag(90038, 3 /* Message */, "Declare_private_method_0_90038", "Declare private method '{0}'"), - Remove_unused_destructuring_declaration: diag(90039, 3 /* Message */, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"), - Remove_unused_declarations_for_Colon_0: diag(90041, 3 /* Message */, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"), - Declare_a_private_field_named_0: diag(90053, 3 /* Message */, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), - Includes_imports_of_types_referenced_by_0: diag(90054, 3 /* Message */, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"), - Remove_type_from_import_declaration_from_0: diag(90055, 3 /* Message */, "Remove_type_from_import_declaration_from_0_90055", `Remove 'type' from import declaration from "{0}"`), - Remove_type_from_import_of_0_from_1: diag(90056, 3 /* Message */, "Remove_type_from_import_of_0_from_1_90056", `Remove 'type' from import of '{0}' from "{1}"`), - Add_import_from_0: diag(90057, 3 /* Message */, "Add_import_from_0_90057", 'Add import from "{0}"'), - Update_import_from_0: diag(90058, 3 /* Message */, "Update_import_from_0_90058", 'Update import from "{0}"'), - Export_0_from_module_1: diag(90059, 3 /* Message */, "Export_0_from_module_1_90059", "Export '{0}' from module '{1}'"), - Export_all_referenced_locals: diag(90060, 3 /* Message */, "Export_all_referenced_locals_90060", "Export all referenced locals"), - Convert_function_to_an_ES2015_class: diag(95001, 3 /* Message */, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), - Convert_0_to_1_in_0: diag(95003, 3 /* Message */, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"), - Extract_to_0_in_1: diag(95004, 3 /* Message */, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), - Extract_function: diag(95005, 3 /* Message */, "Extract_function_95005", "Extract function"), - Extract_constant: diag(95006, 3 /* Message */, "Extract_constant_95006", "Extract constant"), - Extract_to_0_in_enclosing_scope: diag(95007, 3 /* Message */, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"), - Extract_to_0_in_1_scope: diag(95008, 3 /* Message */, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"), - Annotate_with_type_from_JSDoc: diag(95009, 3 /* Message */, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"), - Infer_type_of_0_from_usage: diag(95011, 3 /* Message */, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"), - Infer_parameter_types_from_usage: diag(95012, 3 /* Message */, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"), - Convert_to_default_import: diag(95013, 3 /* Message */, "Convert_to_default_import_95013", "Convert to default import"), - Install_0: diag(95014, 3 /* Message */, "Install_0_95014", "Install '{0}'"), - Replace_import_with_0: diag(95015, 3 /* Message */, "Replace_import_with_0_95015", "Replace import with '{0}'."), - Use_synthetic_default_member: diag(95016, 3 /* Message */, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."), - Convert_to_ES_module: diag(95017, 3 /* Message */, "Convert_to_ES_module_95017", "Convert to ES module"), - Add_undefined_type_to_property_0: diag(95018, 3 /* Message */, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"), - Add_initializer_to_property_0: diag(95019, 3 /* Message */, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"), - Add_definite_assignment_assertion_to_property_0: diag(95020, 3 /* Message */, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"), - Convert_all_type_literals_to_mapped_type: diag(95021, 3 /* Message */, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"), - Add_all_missing_members: diag(95022, 3 /* Message */, "Add_all_missing_members_95022", "Add all missing members"), - Infer_all_types_from_usage: diag(95023, 3 /* Message */, "Infer_all_types_from_usage_95023", "Infer all types from usage"), - Delete_all_unused_declarations: diag(95024, 3 /* Message */, "Delete_all_unused_declarations_95024", "Delete all unused declarations"), - Prefix_all_unused_declarations_with_where_possible: diag(95025, 3 /* Message */, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"), - Fix_all_detected_spelling_errors: diag(95026, 3 /* Message */, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"), - Add_initializers_to_all_uninitialized_properties: diag(95027, 3 /* Message */, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"), - Add_definite_assignment_assertions_to_all_uninitialized_properties: diag(95028, 3 /* 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: diag(95029, 3 /* Message */, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"), - Change_all_jsdoc_style_types_to_TypeScript: diag(95030, 3 /* 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: diag(95031, 3 /* 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: diag(95032, 3 /* Message */, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"), - Install_all_missing_types_packages: diag(95033, 3 /* Message */, "Install_all_missing_types_packages_95033", "Install all missing types packages"), - Rewrite_all_as_indexed_access_types: diag(95034, 3 /* Message */, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"), - Convert_all_to_default_imports: diag(95035, 3 /* Message */, "Convert_all_to_default_imports_95035", "Convert all to default imports"), - Make_all_super_calls_the_first_statement_in_their_constructor: diag(95036, 3 /* 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: diag(95037, 3 /* 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: diag(95038, 3 /* Message */, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"), - Add_all_missing_super_calls: diag(95039, 3 /* Message */, "Add_all_missing_super_calls_95039", "Add all missing super calls"), - Implement_all_inherited_abstract_classes: diag(95040, 3 /* Message */, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"), - Add_all_missing_async_modifiers: diag(95041, 3 /* Message */, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"), - Add_ts_ignore_to_all_error_messages: diag(95042, 3 /* Message */, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"), - Annotate_everything_with_types_from_JSDoc: diag(95043, 3 /* Message */, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"), - Add_to_all_uncalled_decorators: diag(95044, 3 /* Message */, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"), - Convert_all_constructor_functions_to_classes: diag(95045, 3 /* Message */, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"), - Generate_get_and_set_accessors: diag(95046, 3 /* Message */, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"), - Convert_require_to_import: diag(95047, 3 /* Message */, "Convert_require_to_import_95047", "Convert 'require' to 'import'"), - Convert_all_require_to_import: diag(95048, 3 /* Message */, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"), - Move_to_a_new_file: diag(95049, 3 /* Message */, "Move_to_a_new_file_95049", "Move to a new file"), - Remove_unreachable_code: diag(95050, 3 /* Message */, "Remove_unreachable_code_95050", "Remove unreachable code"), - Remove_all_unreachable_code: diag(95051, 3 /* Message */, "Remove_all_unreachable_code_95051", "Remove all unreachable code"), - Add_missing_typeof: diag(95052, 3 /* Message */, "Add_missing_typeof_95052", "Add missing 'typeof'"), - Remove_unused_label: diag(95053, 3 /* Message */, "Remove_unused_label_95053", "Remove unused label"), - Remove_all_unused_labels: diag(95054, 3 /* Message */, "Remove_all_unused_labels_95054", "Remove all unused labels"), - Convert_0_to_mapped_object_type: diag(95055, 3 /* Message */, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"), - Convert_namespace_import_to_named_imports: diag(95056, 3 /* Message */, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"), - Convert_named_imports_to_namespace_import: diag(95057, 3 /* Message */, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"), - Add_or_remove_braces_in_an_arrow_function: diag(95058, 3 /* Message */, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"), - Add_braces_to_arrow_function: diag(95059, 3 /* Message */, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"), - Remove_braces_from_arrow_function: diag(95060, 3 /* Message */, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"), - Convert_default_export_to_named_export: diag(95061, 3 /* Message */, "Convert_default_export_to_named_export_95061", "Convert default export to named export"), - Convert_named_export_to_default_export: diag(95062, 3 /* Message */, "Convert_named_export_to_default_export_95062", "Convert named export to default export"), - Add_missing_enum_member_0: diag(95063, 3 /* Message */, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"), - Add_all_missing_imports: diag(95064, 3 /* Message */, "Add_all_missing_imports_95064", "Add all missing imports"), - Convert_to_async_function: diag(95065, 3 /* Message */, "Convert_to_async_function_95065", "Convert to async function"), - Convert_all_to_async_functions: diag(95066, 3 /* Message */, "Convert_all_to_async_functions_95066", "Convert all to async functions"), - Add_missing_call_parentheses: diag(95067, 3 /* Message */, "Add_missing_call_parentheses_95067", "Add missing call parentheses"), - Add_all_missing_call_parentheses: diag(95068, 3 /* Message */, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"), - Add_unknown_conversion_for_non_overlapping_types: diag(95069, 3 /* 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: diag(95070, 3 /* 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: diag(95071, 3 /* Message */, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"), - Add_missing_new_operator_to_all_calls: diag(95072, 3 /* Message */, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"), - Add_names_to_all_parameters_without_names: diag(95073, 3 /* Message */, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"), - Enable_the_experimentalDecorators_option_in_your_configuration_file: diag(95074, 3 /* Message */, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"), - Convert_parameters_to_destructured_object: diag(95075, 3 /* Message */, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"), - Extract_type: diag(95077, 3 /* Message */, "Extract_type_95077", "Extract type"), - Extract_to_type_alias: diag(95078, 3 /* Message */, "Extract_to_type_alias_95078", "Extract to type alias"), - Extract_to_typedef: diag(95079, 3 /* Message */, "Extract_to_typedef_95079", "Extract to typedef"), - Infer_this_type_of_0_from_usage: diag(95080, 3 /* Message */, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"), - Add_const_to_unresolved_variable: diag(95081, 3 /* Message */, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"), - Add_const_to_all_unresolved_variables: diag(95082, 3 /* Message */, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"), - Add_await: diag(95083, 3 /* Message */, "Add_await_95083", "Add 'await'"), - Add_await_to_initializer_for_0: diag(95084, 3 /* Message */, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"), - Fix_all_expressions_possibly_missing_await: diag(95085, 3 /* Message */, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"), - Remove_unnecessary_await: diag(95086, 3 /* Message */, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"), - Remove_all_unnecessary_uses_of_await: diag(95087, 3 /* Message */, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"), - Enable_the_jsx_flag_in_your_configuration_file: diag(95088, 3 /* Message */, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"), - Add_await_to_initializers: diag(95089, 3 /* Message */, "Add_await_to_initializers_95089", "Add 'await' to initializers"), - Extract_to_interface: diag(95090, 3 /* Message */, "Extract_to_interface_95090", "Extract to interface"), - Convert_to_a_bigint_numeric_literal: diag(95091, 3 /* Message */, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"), - Convert_all_to_bigint_numeric_literals: diag(95092, 3 /* Message */, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"), - Convert_const_to_let: diag(95093, 3 /* Message */, "Convert_const_to_let_95093", "Convert 'const' to 'let'"), - Prefix_with_declare: diag(95094, 3 /* Message */, "Prefix_with_declare_95094", "Prefix with 'declare'"), - Prefix_all_incorrect_property_declarations_with_declare: diag(95095, 3 /* Message */, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"), - Convert_to_template_string: diag(95096, 3 /* Message */, "Convert_to_template_string_95096", "Convert to template string"), - Add_export_to_make_this_file_into_a_module: diag(95097, 3 /* 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: diag(95098, 3 /* 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: diag(95099, 3 /* 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: diag(95100, 3 /* 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: diag(95101, 3 /* Message */, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"), - Convert_all_const_to_let: diag(95102, 3 /* Message */, "Convert_all_const_to_let_95102", "Convert all 'const' to 'let'"), - Convert_function_expression_0_to_arrow_function: diag(95105, 3 /* Message */, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"), - Convert_function_declaration_0_to_arrow_function: diag(95106, 3 /* Message */, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"), - Fix_all_implicit_this_errors: diag(95107, 3 /* Message */, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"), - Wrap_invalid_character_in_an_expression_container: diag(95108, 3 /* Message */, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"), - Wrap_all_invalid_characters_in_an_expression_container: diag(95109, 3 /* 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_to_read_more_about_this_file: diag(95110, 3 /* Message */, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"), - Add_a_return_statement: diag(95111, 3 /* Message */, "Add_a_return_statement_95111", "Add a return statement"), - Remove_braces_from_arrow_function_body: diag(95112, 3 /* 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: diag(95113, 3 /* 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: diag(95114, 3 /* Message */, "Add_all_missing_return_statement_95114", "Add all missing return statement"), - Remove_braces_from_all_arrow_function_bodies_with_relevant_issues: diag(95115, 3 /* 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: diag(95116, 3 /* Message */, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"), - Move_labeled_tuple_element_modifiers_to_labels: diag(95117, 3 /* Message */, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"), - Convert_overload_list_to_single_signature: diag(95118, 3 /* Message */, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"), - Generate_get_and_set_accessors_for_all_overriding_properties: diag(95119, 3 /* Message */, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"), - Wrap_in_JSX_fragment: diag(95120, 3 /* Message */, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"), - Wrap_all_unparented_JSX_in_JSX_fragment: diag(95121, 3 /* Message */, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"), - Convert_arrow_function_or_function_expression: diag(95122, 3 /* Message */, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"), - Convert_to_anonymous_function: diag(95123, 3 /* Message */, "Convert_to_anonymous_function_95123", "Convert to anonymous function"), - Convert_to_named_function: diag(95124, 3 /* Message */, "Convert_to_named_function_95124", "Convert to named function"), - Convert_to_arrow_function: diag(95125, 3 /* Message */, "Convert_to_arrow_function_95125", "Convert to arrow function"), - Remove_parentheses: diag(95126, 3 /* Message */, "Remove_parentheses_95126", "Remove parentheses"), - Could_not_find_a_containing_arrow_function: diag(95127, 3 /* Message */, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"), - Containing_function_is_not_an_arrow_function: diag(95128, 3 /* Message */, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"), - Could_not_find_export_statement: diag(95129, 3 /* Message */, "Could_not_find_export_statement_95129", "Could not find export statement"), - This_file_already_has_a_default_export: diag(95130, 3 /* Message */, "This_file_already_has_a_default_export_95130", "This file already has a default export"), - Could_not_find_import_clause: diag(95131, 3 /* Message */, "Could_not_find_import_clause_95131", "Could not find import clause"), - Could_not_find_namespace_import_or_named_imports: diag(95132, 3 /* 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: diag(95133, 3 /* 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: diag(95134, 3 /* 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: diag(95135, 3 /* Message */, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"), - Name_is_not_valid: diag(95136, 3 /* Message */, "Name_is_not_valid_95136", "Name is not valid"), - Can_only_convert_property_with_modifier: diag(95137, 3 /* Message */, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"), - Switch_each_misused_0_to_1: diag(95138, 3 /* Message */, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"), - Convert_to_optional_chain_expression: diag(95139, 3 /* Message */, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"), - Could_not_find_convertible_access_expression: diag(95140, 3 /* Message */, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"), - Could_not_find_matching_access_expressions: diag(95141, 3 /* Message */, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"), - Can_only_convert_logical_AND_access_chains: diag(95142, 3 /* Message */, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"), - Add_void_to_Promise_resolved_without_a_value: diag(95143, 3 /* 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: diag(95144, 3 /* Message */, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"), - Use_element_access_for_0: diag(95145, 3 /* Message */, "Use_element_access_for_0_95145", "Use element access for '{0}'"), - Use_element_access_for_all_undeclared_properties: diag(95146, 3 /* Message */, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."), - Delete_all_unused_imports: diag(95147, 3 /* Message */, "Delete_all_unused_imports_95147", "Delete all unused imports"), - Infer_function_return_type: diag(95148, 3 /* Message */, "Infer_function_return_type_95148", "Infer function return type"), - Return_type_must_be_inferred_from_a_function: diag(95149, 3 /* Message */, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"), - Could_not_determine_function_return_type: diag(95150, 3 /* Message */, "Could_not_determine_function_return_type_95150", "Could not determine function return type"), - Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), - Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), - Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), - Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"), - Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), - Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), - Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), - Method_not_implemented: diag(95158, 3 /* Message */, "Method_not_implemented_95158", "Method not implemented."), - Function_not_implemented: diag(95159, 3 /* Message */, "Function_not_implemented_95159", "Function not implemented."), - Add_override_modifier: diag(95160, 3 /* Message */, "Add_override_modifier_95160", "Add 'override' modifier"), - Remove_override_modifier: diag(95161, 3 /* Message */, "Remove_override_modifier_95161", "Remove 'override' modifier"), - Add_all_missing_override_modifiers: diag(95162, 3 /* Message */, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"), - Remove_all_unnecessary_override_modifiers: diag(95163, 3 /* Message */, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"), - Can_only_convert_named_export: diag(95164, 3 /* Message */, "Can_only_convert_named_export_95164", "Can only convert named export"), - Add_missing_properties: diag(95165, 3 /* Message */, "Add_missing_properties_95165", "Add missing properties"), - Add_all_missing_properties: diag(95166, 3 /* Message */, "Add_all_missing_properties_95166", "Add all missing properties"), - Add_missing_attributes: diag(95167, 3 /* Message */, "Add_missing_attributes_95167", "Add missing attributes"), - Add_all_missing_attributes: diag(95168, 3 /* Message */, "Add_all_missing_attributes_95168", "Add all missing attributes"), - Add_undefined_to_optional_property_type: diag(95169, 3 /* Message */, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"), - Convert_named_imports_to_default_import: diag(95170, 3 /* Message */, "Convert_named_imports_to_default_import_95170", "Convert named imports to default import"), - Delete_unused_param_tag_0: diag(95171, 3 /* Message */, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"), - Delete_all_unused_param_tags: diag(95172, 3 /* Message */, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"), - Rename_param_tag_name_0_to_1: diag(95173, 3 /* Message */, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"), - Use_0: diag(95174, 3 /* Message */, "Use_0_95174", "Use `{0}`."), - Use_Number_isNaN_in_all_conditions: diag(95175, 3 /* Message */, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."), - Convert_typedef_to_TypeScript_type: diag(95176, 3 /* Message */, "Convert_typedef_to_TypeScript_type_95176", "Convert typedef to TypeScript type."), - Convert_all_typedef_to_TypeScript_types: diag(95177, 3 /* Message */, "Convert_all_typedef_to_TypeScript_types_95177", "Convert all typedef to TypeScript types."), - Move_to_file: diag(95178, 3 /* Message */, "Move_to_file_95178", "Move to file"), - Cannot_move_to_file_selected_file_is_invalid: diag(95179, 3 /* Message */, "Cannot_move_to_file_selected_file_is_invalid_95179", "Cannot move to file, selected file is invalid"), - Use_import_type: diag(95180, 3 /* Message */, "Use_import_type_95180", "Use 'import type'"), - Use_type_0: diag(95181, 3 /* Message */, "Use_type_0_95181", "Use 'type {0}'"), - Fix_all_with_type_only_imports: diag(95182, 3 /* Message */, "Fix_all_with_type_only_imports_95182", "Fix all with type-only imports"), - Cannot_move_statements_to_the_selected_file: diag(95183, 3 /* Message */, "Cannot_move_statements_to_the_selected_file_95183", "Cannot move statements to the selected file"), - Inline_variable: diag(95184, 3 /* Message */, "Inline_variable_95184", "Inline variable"), - Could_not_find_variable_to_inline: diag(95185, 3 /* Message */, "Could_not_find_variable_to_inline_95185", "Could not find variable to inline."), - Variables_with_multiple_declarations_cannot_be_inlined: diag(95186, 3 /* Message */, "Variables_with_multiple_declarations_cannot_be_inlined_95186", "Variables with multiple declarations cannot be inlined."), - Add_missing_comma_for_object_member_completion_0: diag(95187, 3 /* Message */, "Add_missing_comma_for_object_member_completion_0_95187", "Add missing comma for object member completion '{0}'."), - No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, 1 /* 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: diag(18006, 1 /* 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: diag(18007, 1 /* 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: diag(18009, 1 /* 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: diag(18010, 1 /* 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: diag(18011, 1 /* 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: diag(18012, 1 /* 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: diag(18013, 1 /* 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: diag(18014, 1 /* 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: diag(18015, 1 /* 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: diag(18016, 1 /* 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: diag(18017, 1 /* 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: diag(18018, 1 /* 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: diag(18019, 1 /* Error */, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."), - An_enum_member_cannot_be_named_with_a_private_identifier: diag(18024, 1 /* 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: diag(18026, 1 /* 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: diag(18027, 1 /* 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: diag(18028, 1 /* 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: diag(18029, 1 /* 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: diag(18030, 1 /* 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: diag(18031, 1 /* 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: diag(18032, 1 /* 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."), - Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values: diag(18033, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033", "Type '{0}' is not assignable to type '{1}' as required for computed enum member values."), - Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, 3 /* 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: diag(18035, 1 /* 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."), - Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, 1 /* Error */, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), - await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, 1 /* Error */, "await_expression_cannot_be_used_inside_a_class_static_block_18037", "'await' expression cannot be used inside a class static block."), - for_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, 1 /* Error */, "for_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'for await' loops cannot be used inside a class static block."), - Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, 1 /* Error */, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), - A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, 1 /* Error */, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), - _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, 1 /* Error */, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), - Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, 1 /* Error */, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."), - _0_is_automatically_exported_here: diag(18044, 3 /* Message */, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."), - Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, 1 /* Error */, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."), - _0_is_of_type_unknown: diag(18046, 1 /* Error */, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."), - _0_is_possibly_null: diag(18047, 1 /* Error */, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."), - _0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."), - _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."), - The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), - Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."), - Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"), - Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."), - await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.") - }; - } - }); - - // src/compiler/scanner.ts - function tokenIsIdentifierOrKeyword(token) { - return token >= 80 /* Identifier */; - } - function tokenIsIdentifierOrKeywordOrGreaterThan(token) { - return token === 32 /* GreaterThanToken */ || tokenIsIdentifierOrKeyword(token); - } - function lookupInUnicodeMap(code, map2) { - if (code < map2[0]) { - return false; - } - let lo = 0; - let hi = map2.length; - let mid; - while (lo + 1 < hi) { - mid = lo + (hi - lo) / 2; - mid -= mid % 2; - if (map2[mid] <= code && code <= map2[mid + 1]) { - return true; - } - if (code < map2[mid]) { - hi = mid; - } else { - lo = mid + 2; - } - } - return false; - } - function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion >= 2 /* ES2015 */ ? lookupInUnicodeMap(code, unicodeESNextIdentifierStart) : languageVersion === 1 /* ES5 */ ? lookupInUnicodeMap(code, unicodeES5IdentifierStart) : lookupInUnicodeMap(code, unicodeES3IdentifierStart); - } - function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion >= 2 /* ES2015 */ ? lookupInUnicodeMap(code, unicodeESNextIdentifierPart) : languageVersion === 1 /* ES5 */ ? lookupInUnicodeMap(code, unicodeES5IdentifierPart) : lookupInUnicodeMap(code, unicodeES3IdentifierPart); - } - function makeReverseMap(source) { - const result = []; - source.forEach((value, name) => { - result[value] = name; - }); - return result; - } - function tokenToString(t) { - return tokenStrings[t]; - } - function stringToToken(s) { - return textToToken.get(s); - } - function computeLineStarts(text) { - const result = []; - let pos = 0; - let lineStart = 0; - while (pos < text.length) { - const ch = text.charCodeAt(pos); - pos++; - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - result.push(lineStart); - lineStart = pos; - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) { - result.push(lineStart); - lineStart = pos; - } - break; - } - } - result.push(lineStart); - return result; - } - function getPositionOfLineAndCharacter(sourceFile, line, character, allowEdits) { - return sourceFile.getPositionOfLineAndCharacter ? sourceFile.getPositionOfLineAndCharacter(line, character, allowEdits) : computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character, sourceFile.text, allowEdits); - } - function computePositionOfLineAndCharacter(lineStarts, line, character, debugText, allowEdits) { - if (line < 0 || line >= lineStarts.length) { - if (allowEdits) { - line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line; - } else { - Debug.fail(`Bad line number. Line: ${line}, lineStarts.length: ${lineStarts.length} , line map is correct? ${debugText !== void 0 ? arraysEqual(lineStarts, computeLineStarts(debugText)) : "unknown"}`); - } - } - const res = lineStarts[line] + character; - if (allowEdits) { - return res > lineStarts[line + 1] ? lineStarts[line + 1] : typeof debugText === "string" && res > debugText.length ? debugText.length : res; - } - if (line < lineStarts.length - 1) { - Debug.assert(res < lineStarts[line + 1]); - } else if (debugText !== void 0) { - Debug.assert(res <= debugText.length); - } - return res; - } - function getLineStarts(sourceFile) { - return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text)); - } - function computeLineAndCharacterOfPosition(lineStarts, position) { - const lineNumber = computeLineOfPosition(lineStarts, position); - return { - line: lineNumber, - character: position - lineStarts[lineNumber] - }; - } - function computeLineOfPosition(lineStarts, position, lowerBound) { - let lineNumber = binarySearch(lineStarts, position, identity, compareValues, lowerBound); - if (lineNumber < 0) { - lineNumber = ~lineNumber - 1; - Debug.assert(lineNumber !== -1, "position cannot precede the beginning of the file"); - } - return lineNumber; - } - function getLinesBetweenPositions(sourceFile, pos1, pos2) { - if (pos1 === pos2) - return 0; - const lineStarts = getLineStarts(sourceFile); - const lower = Math.min(pos1, pos2); - const isNegative = lower === pos2; - const upper = isNegative ? pos1 : pos2; - const lowerLine = computeLineOfPosition(lineStarts, lower); - const upperLine = computeLineOfPosition(lineStarts, upper, lowerLine); - return isNegative ? lowerLine - upperLine : upperLine - lowerLine; - } - function getLineAndCharacterOfPosition(sourceFile, position) { - return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); - } - function isWhiteSpaceLike(ch) { - return isWhiteSpaceSingleLine(ch) || isLineBreak(ch); - } - function isWhiteSpaceSingleLine(ch) { - return ch === 32 /* space */ || ch === 9 /* tab */ || ch === 11 /* verticalTab */ || ch === 12 /* formFeed */ || ch === 160 /* nonBreakingSpace */ || ch === 133 /* nextLine */ || ch === 5760 /* ogham */ || ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ || ch === 8239 /* narrowNoBreakSpace */ || ch === 8287 /* mathematicalSpace */ || ch === 12288 /* ideographicSpace */ || ch === 65279 /* byteOrderMark */; - } - function isLineBreak(ch) { - return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || ch === 8233 /* paragraphSeparator */; - } - function isDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; - } - function isHexDigit(ch) { - return isDigit(ch) || ch >= 65 /* A */ && ch <= 70 /* F */ || ch >= 97 /* a */ && ch <= 102 /* f */; - } - function isCodePoint(code) { - return code <= 1114111; - } - function isOctalDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; - } - function couldStartTrivia(text, pos) { - const ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - case 10 /* lineFeed */: - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - case 47 /* slash */: - case 60 /* lessThan */: - case 124 /* bar */: - case 61 /* equals */: - case 62 /* greaterThan */: - return true; - case 35 /* hash */: - return pos === 0; - default: - return ch > 127 /* maxAsciiCharacter */; - } - } - function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) { - if (positionIsSynthesized(pos)) { - return pos; - } - let canConsumeStar = false; - while (true) { - const ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - pos++; - if (stopAfterLineBreak) { - return pos; - } - canConsumeStar = !!inJSDoc; - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - if (stopAtComments) { - break; - } - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - canConsumeStar = false; - continue; - } - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - canConsumeStar = false; - continue; - } - break; - case 60 /* lessThan */: - case 124 /* bar */: - case 61 /* equals */: - case 62 /* greaterThan */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos); - canConsumeStar = false; - continue; - } - break; - case 35 /* hash */: - if (pos === 0 && isShebangTrivia(text, pos)) { - pos = scanShebangTrivia(text, pos); - canConsumeStar = false; - continue; - } - break; - case 42 /* asterisk */: - if (canConsumeStar) { - pos++; - canConsumeStar = false; - continue; - } - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && isWhiteSpaceLike(ch)) { - pos++; - continue; - } - break; - } - return pos; - } - } - function isConflictMarkerTrivia(text, pos) { - Debug.assert(pos >= 0); - if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) { - const ch = text.charCodeAt(pos); - if (pos + mergeConflictMarkerLength < text.length) { - for (let i = 0; i < mergeConflictMarkerLength; i++) { - if (text.charCodeAt(pos + i) !== ch) { - return false; - } - } - return ch === 61 /* equals */ || text.charCodeAt(pos + mergeConflictMarkerLength) === 32 /* space */; - } - } - return false; - } - function scanConflictMarkerTrivia(text, pos, error2) { - if (error2) { - error2(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength); - } - const ch = text.charCodeAt(pos); - const len = text.length; - if (ch === 60 /* lessThan */ || ch === 62 /* greaterThan */) { - while (pos < len && !isLineBreak(text.charCodeAt(pos))) { - pos++; - } - } else { - Debug.assert(ch === 124 /* bar */ || ch === 61 /* equals */); - while (pos < len) { - const currentChar = text.charCodeAt(pos); - if ((currentChar === 61 /* equals */ || currentChar === 62 /* greaterThan */) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) { - break; - } - pos++; - } - } - return pos; - } - function isShebangTrivia(text, pos) { - Debug.assert(pos === 0); - return shebangTriviaRegex.test(text); - } - function scanShebangTrivia(text, pos) { - const shebang = shebangTriviaRegex.exec(text)[0]; - pos = pos + shebang.length; - return pos; - } - function iterateCommentRanges(reduce, text, pos, trailing, cb, state, initial) { - let pendingPos; - let pendingEnd; - let pendingKind; - let pendingHasTrailingNewLine; - let hasPendingCommentRange = false; - let collecting = trailing; - let accumulator = initial; - if (pos === 0) { - collecting = true; - const shebang = getShebang(text); - if (shebang) { - pos = shebang.length; - } - } - scan: - while (pos >= 0 && pos < text.length) { - const ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - pos++; - if (trailing) { - break scan; - } - collecting = true; - if (hasPendingCommentRange) { - pendingHasTrailingNewLine = true; - } - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - const nextChar = text.charCodeAt(pos + 1); - let hasTrailingNewLine = false; - if (nextChar === 47 /* slash */ || nextChar === 42 /* asterisk */) { - const kind = nextChar === 47 /* slash */ ? 2 /* SingleLineCommentTrivia */ : 3 /* MultiLineCommentTrivia */; - const startPos = pos; - pos += 2; - if (nextChar === 47 /* slash */) { - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - hasTrailingNewLine = true; - break; - } - pos++; - } - } else { - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - } - if (collecting) { - if (hasPendingCommentRange) { - accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator); - if (!reduce && accumulator) { - return accumulator; - } - } - pendingPos = startPos; - pendingEnd = pos; - pendingKind = kind; - pendingHasTrailingNewLine = hasTrailingNewLine; - hasPendingCommentRange = true; - } - continue; - } - break scan; - default: - if (ch > 127 /* maxAsciiCharacter */ && isWhiteSpaceLike(ch)) { - if (hasPendingCommentRange && isLineBreak(ch)) { - pendingHasTrailingNewLine = true; - } - pos++; - continue; - } - break scan; - } - } - if (hasPendingCommentRange) { - accumulator = cb(pendingPos, pendingEnd, pendingKind, pendingHasTrailingNewLine, state, accumulator); - } - return accumulator; - } - function forEachLeadingCommentRange(text, pos, cb, state) { - return iterateCommentRanges( - /*reduce*/ - false, - text, - pos, - /*trailing*/ - false, - cb, - state - ); - } - function forEachTrailingCommentRange(text, pos, cb, state) { - return iterateCommentRanges( - /*reduce*/ - false, - text, - pos, - /*trailing*/ - true, - cb, - state - ); - } - function reduceEachLeadingCommentRange(text, pos, cb, state, initial) { - return iterateCommentRanges( - /*reduce*/ - true, - text, - pos, - /*trailing*/ - false, - cb, - state, - initial - ); - } - function reduceEachTrailingCommentRange(text, pos, cb, state, initial) { - return iterateCommentRanges( - /*reduce*/ - true, - text, - pos, - /*trailing*/ - true, - cb, - state, - initial - ); - } - function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments = []) { - comments.push({ kind, pos, end, hasTrailingNewLine }); - return comments; - } - function getLeadingCommentRanges(text, pos) { - return reduceEachLeadingCommentRange( - text, - pos, - appendCommentRange, - /*state*/ - void 0, - /*initial*/ - void 0 - ); - } - function getTrailingCommentRanges(text, pos) { - return reduceEachTrailingCommentRange( - text, - pos, - appendCommentRange, - /*state*/ - void 0, - /*initial*/ - void 0 - ); - } - function getShebang(text) { - const match = shebangTriviaRegex.exec(text); - if (match) { - return match[0]; - } - } - function isIdentifierStart(ch, languageVersion) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch === 36 /* $ */ || ch === 95 /* _ */ || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); - } - function isIdentifierPart(ch, languageVersion, identifierVariant) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || // "-" and ":" are valid in JSX Identifiers - (identifierVariant === 1 /* JSX */ ? ch === 45 /* minus */ || ch === 58 /* colon */ : false) || ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); - } - function isIdentifierText(name, languageVersion, identifierVariant) { - let ch = codePointAt(name, 0); - if (!isIdentifierStart(ch, languageVersion)) { - return false; - } - for (let i = charSize(ch); i < name.length; i += charSize(ch)) { - if (!isIdentifierPart(ch = codePointAt(name, i), languageVersion, identifierVariant)) { - return false; - } - } - return true; - } - function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Standard */, textInitial, onError, start, length2) { - var text = textInitial; - var pos; - var end; - var fullStartPos; - var tokenStart; - var token; - var tokenValue; - var tokenFlags; - var commentDirectives; - var inJSDocType = 0; - setText(text, start, length2); - var scanner2 = { - getTokenFullStart: () => fullStartPos, - getStartPos: () => fullStartPos, - getTokenEnd: () => pos, - getTextPos: () => pos, - getToken: () => token, - getTokenStart: () => tokenStart, - getTokenPos: () => tokenStart, - getTokenText: () => text.substring(tokenStart, pos), - getTokenValue: () => tokenValue, - hasUnicodeEscape: () => (tokenFlags & 1024 /* UnicodeEscape */) !== 0, - hasExtendedUnicodeEscape: () => (tokenFlags & 8 /* ExtendedUnicodeEscape */) !== 0, - hasPrecedingLineBreak: () => (tokenFlags & 1 /* PrecedingLineBreak */) !== 0, - hasPrecedingJSDocComment: () => (tokenFlags & 2 /* PrecedingJSDocComment */) !== 0, - isIdentifier: () => token === 80 /* Identifier */ || token > 118 /* LastReservedWord */, - isReservedWord: () => token >= 83 /* FirstReservedWord */ && token <= 118 /* LastReservedWord */, - isUnterminated: () => (tokenFlags & 4 /* Unterminated */) !== 0, - getCommentDirectives: () => commentDirectives, - getNumericLiteralFlags: () => tokenFlags & 25584 /* NumericLiteralFlags */, - getTokenFlags: () => tokenFlags, - reScanGreaterToken, - reScanAsteriskEqualsToken, - reScanSlashToken, - reScanTemplateToken, - reScanTemplateHeadOrNoSubstitutionTemplate, - scanJsxIdentifier, - scanJsxAttributeValue, - reScanJsxAttributeValue, - reScanJsxToken, - reScanLessThanToken, - reScanHashToken, - reScanQuestionToken, - reScanInvalidIdentifier, - scanJsxToken, - scanJsDocToken, - scanJSDocCommentTextToken, - scan, - getText, - clearCommentDirectives, - setText, - setScriptTarget, - setLanguageVariant, - setOnError, - resetTokenState, - setTextPos: resetTokenState, - setInJSDocType, - tryScan, - lookAhead, - scanRange - }; - if (Debug.isDebugging) { - Object.defineProperty(scanner2, "__debugShowCurrentPositionInText", { - get: () => { - const text2 = scanner2.getText(); - return text2.slice(0, scanner2.getTokenFullStart()) + "\u2551" + text2.slice(scanner2.getTokenFullStart()); - } - }); - } - return scanner2; - function error2(message, errPos = pos, length3, arg0) { - if (onError) { - const oldPos = pos; - pos = errPos; - onError(message, length3 || 0, arg0); - pos = oldPos; - } - } - function scanNumberFragment() { - let start2 = pos; - let allowSeparator = false; - let isPreviousTokenSeparator = false; - let result = ""; - while (true) { - const ch = text.charCodeAt(pos); - if (ch === 95 /* _ */) { - tokenFlags |= 512 /* ContainsSeparator */; - if (allowSeparator) { - allowSeparator = false; - isPreviousTokenSeparator = true; - result += text.substring(start2, pos); - } else { - tokenFlags |= 16384 /* ContainsInvalidSeparator */; - if (isPreviousTokenSeparator) { - error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); - } else { - error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); - } - } - pos++; - start2 = pos; - continue; - } - if (isDigit(ch)) { - allowSeparator = true; - isPreviousTokenSeparator = false; - pos++; - continue; - } - break; - } - if (text.charCodeAt(pos - 1) === 95 /* _ */) { - tokenFlags |= 16384 /* ContainsInvalidSeparator */; - error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); - } - return result + text.substring(start2, pos); - } - function scanNumber() { - let start2 = pos; - let mainFragment; - if (text.charCodeAt(pos) === 48 /* _0 */) { - pos++; - if (text.charCodeAt(pos) === 95 /* _ */) { - tokenFlags |= 512 /* ContainsSeparator */ | 16384 /* ContainsInvalidSeparator */; - error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); - pos--; - mainFragment = scanNumberFragment(); - } else if (!scanDigits()) { - tokenFlags |= 8192 /* ContainsLeadingZero */; - mainFragment = "" + +tokenValue; - } else if (!tokenValue) { - mainFragment = "0"; - } else { - tokenValue = "" + parseInt(tokenValue, 8); - tokenFlags |= 32 /* Octal */; - const withMinus = token === 41 /* MinusToken */; - const literal = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8); - if (withMinus) - start2--; - error2(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal); - return 9 /* NumericLiteral */; - } - } else { - mainFragment = scanNumberFragment(); - } - let decimalFragment; - let scientificFragment; - if (text.charCodeAt(pos) === 46 /* dot */) { - pos++; - decimalFragment = scanNumberFragment(); - } - let end2 = pos; - if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) { - pos++; - tokenFlags |= 16 /* Scientific */; - if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) - pos++; - const preNumericPart = pos; - const finalFragment = scanNumberFragment(); - if (!finalFragment) { - error2(Diagnostics.Digit_expected); - } else { - scientificFragment = text.substring(end2, preNumericPart) + finalFragment; - end2 = pos; - } - } - let result; - if (tokenFlags & 512 /* ContainsSeparator */) { - result = mainFragment; - if (decimalFragment) { - result += "." + decimalFragment; - } - if (scientificFragment) { - result += scientificFragment; - } - } else { - result = text.substring(start2, end2); - } - if (tokenFlags & 8192 /* ContainsLeadingZero */) { - error2(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2); - tokenValue = "" + +result; - return 9 /* NumericLiteral */; - } - if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) { - checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */)); - tokenValue = "" + +result; - return 9 /* NumericLiteral */; - } else { - tokenValue = result; - const type = checkBigIntSuffix(); - checkForIdentifierStartAfterNumericLiteral(start2); - return type; - } - } - function checkForIdentifierStartAfterNumericLiteral(numericStart, isScientific) { - if (!isIdentifierStart(codePointAt(text, pos), languageVersion)) { - return; - } - const identifierStart = pos; - const { length: length3 } = scanIdentifierParts(); - if (length3 === 1 && text[identifierStart] === "n") { - if (isScientific) { - error2(Diagnostics.A_bigint_literal_cannot_use_exponential_notation, numericStart, identifierStart - numericStart + 1); - } else { - error2(Diagnostics.A_bigint_literal_must_be_an_integer, numericStart, identifierStart - numericStart + 1); - } - } else { - error2(Diagnostics.An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal, identifierStart, length3); - pos = identifierStart; - } - } - function scanDigits() { - const start2 = pos; - let isOctal = true; - while (isDigit(text.charCodeAt(pos))) { - if (!isOctalDigit(text.charCodeAt(pos))) { - isOctal = false; - } - pos++; - } - tokenValue = text.substring(start2, pos); - return isOctal; - } - function scanExactNumberOfHexDigits(count, canHaveSeparators) { - const valueString = scanHexDigits( - /*minCount*/ - count, - /*scanAsManyAsPossible*/ - false, - canHaveSeparators - ); - return valueString ? parseInt(valueString, 16) : -1; - } - function scanMinimumNumberOfHexDigits(count, canHaveSeparators) { - return scanHexDigits( - /*minCount*/ - count, - /*scanAsManyAsPossible*/ - true, - canHaveSeparators - ); - } - function scanHexDigits(minCount, scanAsManyAsPossible, canHaveSeparators) { - let valueChars = []; - let allowSeparator = false; - let isPreviousTokenSeparator = false; - while (valueChars.length < minCount || scanAsManyAsPossible) { - let ch = text.charCodeAt(pos); - if (canHaveSeparators && ch === 95 /* _ */) { - tokenFlags |= 512 /* ContainsSeparator */; - if (allowSeparator) { - allowSeparator = false; - isPreviousTokenSeparator = true; - } else if (isPreviousTokenSeparator) { - error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); - } else { - error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); - } - pos++; - continue; - } - allowSeparator = canHaveSeparators; - if (ch >= 65 /* A */ && ch <= 70 /* F */) { - ch += 97 /* a */ - 65 /* A */; - } else if (!(ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch >= 97 /* a */ && ch <= 102 /* f */)) { - break; - } - valueChars.push(ch); - pos++; - isPreviousTokenSeparator = false; - } - if (valueChars.length < minCount) { - valueChars = []; - } - if (text.charCodeAt(pos - 1) === 95 /* _ */) { - error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); - } - return String.fromCharCode(...valueChars); - } - function scanString(jsxAttributeString = false) { - const quote2 = text.charCodeAt(pos); - pos++; - let result = ""; - let start2 = pos; - while (true) { - if (pos >= end) { - result += text.substring(start2, pos); - tokenFlags |= 4 /* Unterminated */; - error2(Diagnostics.Unterminated_string_literal); - break; - } - const ch = text.charCodeAt(pos); - if (ch === quote2) { - result += text.substring(start2, pos); - pos++; - break; - } - if (ch === 92 /* backslash */ && !jsxAttributeString) { - result += text.substring(start2, pos); - result += scanEscapeSequence( - /*shouldEmitInvalidEscapeError*/ - true - ); - start2 = pos; - continue; - } - if (isLineBreak(ch) && !jsxAttributeString) { - result += text.substring(start2, pos); - tokenFlags |= 4 /* Unterminated */; - error2(Diagnostics.Unterminated_string_literal); - break; - } - pos++; - } - return result; - } - function scanTemplateAndSetTokenValue(shouldEmitInvalidEscapeError) { - const startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; - pos++; - let start2 = pos; - let contents = ""; - let resultingToken; - while (true) { - if (pos >= end) { - contents += text.substring(start2, pos); - tokenFlags |= 4 /* Unterminated */; - error2(Diagnostics.Unterminated_template_literal); - resultingToken = startedWithBacktick ? 15 /* NoSubstitutionTemplateLiteral */ : 18 /* TemplateTail */; - break; - } - const currChar = text.charCodeAt(pos); - if (currChar === 96 /* backtick */) { - contents += text.substring(start2, pos); - pos++; - resultingToken = startedWithBacktick ? 15 /* NoSubstitutionTemplateLiteral */ : 18 /* TemplateTail */; - break; - } - if (currChar === 36 /* $ */ && pos + 1 < end && text.charCodeAt(pos + 1) === 123 /* openBrace */) { - contents += text.substring(start2, pos); - pos += 2; - resultingToken = startedWithBacktick ? 16 /* TemplateHead */ : 17 /* TemplateMiddle */; - break; - } - if (currChar === 92 /* backslash */) { - contents += text.substring(start2, pos); - contents += scanEscapeSequence(shouldEmitInvalidEscapeError); - start2 = pos; - continue; - } - if (currChar === 13 /* carriageReturn */) { - contents += text.substring(start2, pos); - pos++; - if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - contents += "\n"; - start2 = pos; - continue; - } - pos++; - } - Debug.assert(resultingToken !== void 0); - tokenValue = contents; - return resultingToken; - } - function scanEscapeSequence(shouldEmitInvalidEscapeError) { - const start2 = pos; - pos++; - if (pos >= end) { - error2(Diagnostics.Unexpected_end_of_text); - return ""; - } - const ch = text.charCodeAt(pos); - pos++; - switch (ch) { - case 48 /* _0 */: - if (pos >= end || !isDigit(text.charCodeAt(pos))) { - return "\0"; - } - case 49 /* _1 */: - case 50 /* _2 */: - case 51 /* _3 */: - if (pos < end && isOctalDigit(text.charCodeAt(pos))) { - pos++; - } - case 52 /* _4 */: - case 53 /* _5 */: - case 54 /* _6 */: - case 55 /* _7 */: - if (pos < end && isOctalDigit(text.charCodeAt(pos))) { - pos++; - } - tokenFlags |= 2048 /* ContainsInvalidEscape */; - if (shouldEmitInvalidEscapeError) { - const code = parseInt(text.substring(start2 + 1, pos), 8); - error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0")); - return String.fromCharCode(code); - } - return text.substring(start2, pos); - case 56 /* _8 */: - case 57 /* _9 */: - tokenFlags |= 2048 /* ContainsInvalidEscape */; - if (shouldEmitInvalidEscapeError) { - error2(Diagnostics.Escape_sequence_0_is_not_allowed, start2, pos - start2, text.substring(start2, pos)); - return String.fromCharCode(ch); - } - return text.substring(start2, pos); - case 98 /* b */: - return "\b"; - case 116 /* t */: - return " "; - case 110 /* n */: - return "\n"; - case 118 /* v */: - return "\v"; - case 102 /* f */: - return "\f"; - case 114 /* r */: - return "\r"; - case 39 /* singleQuote */: - return "'"; - case 34 /* doubleQuote */: - return '"'; - case 117 /* u */: - if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) { - pos++; - const escapedValueString = scanMinimumNumberOfHexDigits( - 1, - /*canHaveSeparators*/ - false - ); - const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; - if (escapedValue < 0) { - tokenFlags |= 2048 /* ContainsInvalidEscape */; - if (shouldEmitInvalidEscapeError) { - error2(Diagnostics.Hexadecimal_digit_expected); - } - return text.substring(start2, pos); - } - if (!isCodePoint(escapedValue)) { - tokenFlags |= 2048 /* ContainsInvalidEscape */; - if (shouldEmitInvalidEscapeError) { - error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); - } - return text.substring(start2, pos); - } - if (pos >= end) { - tokenFlags |= 2048 /* ContainsInvalidEscape */; - if (shouldEmitInvalidEscapeError) { - error2(Diagnostics.Unexpected_end_of_text); - } - return text.substring(start2, pos); - } - if (text.charCodeAt(pos) !== 125 /* closeBrace */) { - tokenFlags |= 2048 /* ContainsInvalidEscape */; - if (shouldEmitInvalidEscapeError) { - error2(Diagnostics.Unterminated_Unicode_escape_sequence); - } - return text.substring(start2, pos); - } - pos++; - tokenFlags |= 8 /* ExtendedUnicodeEscape */; - return utf16EncodeAsString(escapedValue); - } - for (; pos < start2 + 6; pos++) { - if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) { - tokenFlags |= 2048 /* ContainsInvalidEscape */; - if (shouldEmitInvalidEscapeError) { - error2(Diagnostics.Hexadecimal_digit_expected); - } - return text.substring(start2, pos); - } - } - tokenFlags |= 1024 /* UnicodeEscape */; - return String.fromCharCode(parseInt(text.substring(start2 + 2, pos), 16)); - case 120 /* x */: - for (; pos < start2 + 4; pos++) { - if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) { - tokenFlags |= 2048 /* ContainsInvalidEscape */; - if (shouldEmitInvalidEscapeError) { - error2(Diagnostics.Hexadecimal_digit_expected); - } - return text.substring(start2, pos); - } - } - tokenFlags |= 4096 /* HexEscape */; - return String.fromCharCode(parseInt(text.substring(start2 + 2, pos), 16)); - case 13 /* carriageReturn */: - if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - case 8232 /* lineSeparator */: - case 8233 /* paragraphSeparator */: - return ""; - default: - return String.fromCharCode(ch); - } - } - function scanExtendedUnicodeEscape() { - const escapedValueString = scanMinimumNumberOfHexDigits( - 1, - /*canHaveSeparators*/ - false - ); - const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; - let isInvalidExtendedEscape = false; - if (escapedValue < 0) { - error2(Diagnostics.Hexadecimal_digit_expected); - isInvalidExtendedEscape = true; - } else if (escapedValue > 1114111) { - error2(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); - isInvalidExtendedEscape = true; - } - if (pos >= end) { - error2(Diagnostics.Unexpected_end_of_text); - isInvalidExtendedEscape = true; - } else if (text.charCodeAt(pos) === 125 /* closeBrace */) { - pos++; - } else { - error2(Diagnostics.Unterminated_Unicode_escape_sequence); - isInvalidExtendedEscape = true; - } - if (isInvalidExtendedEscape) { - return ""; - } - return utf16EncodeAsString(escapedValue); - } - function peekUnicodeEscape() { - if (pos + 5 < end && text.charCodeAt(pos + 1) === 117 /* u */) { - const start2 = pos; - pos += 2; - const value = scanExactNumberOfHexDigits( - 4, - /*canHaveSeparators*/ - false - ); - pos = start2; - return value; - } - return -1; - } - function peekExtendedUnicodeEscape() { - if (codePointAt(text, pos + 1) === 117 /* u */ && codePointAt(text, pos + 2) === 123 /* openBrace */) { - const start2 = pos; - pos += 3; - const escapedValueString = scanMinimumNumberOfHexDigits( - 1, - /*canHaveSeparators*/ - false - ); - const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1; - pos = start2; - return escapedValue; - } - return -1; - } - function scanIdentifierParts() { - let result = ""; - let start2 = pos; - while (pos < end) { - let ch = codePointAt(text, pos); - if (isIdentifierPart(ch, languageVersion)) { - pos += charSize(ch); - } else if (ch === 92 /* backslash */) { - ch = peekExtendedUnicodeEscape(); - if (ch >= 0 && isIdentifierPart(ch, languageVersion)) { - pos += 3; - tokenFlags |= 8 /* ExtendedUnicodeEscape */; - result += scanExtendedUnicodeEscape(); - start2 = pos; - continue; - } - ch = peekUnicodeEscape(); - if (!(ch >= 0 && isIdentifierPart(ch, languageVersion))) { - break; - } - tokenFlags |= 1024 /* UnicodeEscape */; - result += text.substring(start2, pos); - result += utf16EncodeAsString(ch); - pos += 6; - start2 = pos; - } else { - break; - } - } - result += text.substring(start2, pos); - return result; - } - function getIdentifierToken() { - const len = tokenValue.length; - if (len >= 2 && len <= 12) { - const ch = tokenValue.charCodeAt(0); - if (ch >= 97 /* a */ && ch <= 122 /* z */) { - const keyword = textToKeyword.get(tokenValue); - if (keyword !== void 0) { - return token = keyword; - } - } - } - return token = 80 /* Identifier */; - } - function scanBinaryOrOctalDigits(base) { - let value = ""; - let separatorAllowed = false; - let isPreviousTokenSeparator = false; - while (true) { - const ch = text.charCodeAt(pos); - if (ch === 95 /* _ */) { - tokenFlags |= 512 /* ContainsSeparator */; - if (separatorAllowed) { - separatorAllowed = false; - isPreviousTokenSeparator = true; - } else if (isPreviousTokenSeparator) { - error2(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1); - } else { - error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1); - } - pos++; - continue; - } - separatorAllowed = true; - if (!isDigit(ch) || ch - 48 /* _0 */ >= base) { - break; - } - value += text[pos]; - pos++; - isPreviousTokenSeparator = false; - } - if (text.charCodeAt(pos - 1) === 95 /* _ */) { - error2(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1); - } - return value; - } - function checkBigIntSuffix() { - if (text.charCodeAt(pos) === 110 /* n */) { - tokenValue += "n"; - if (tokenFlags & 384 /* BinaryOrOctalSpecifier */) { - tokenValue = parsePseudoBigInt(tokenValue) + "n"; - } - pos++; - return 10 /* BigIntLiteral */; - } else { - const numericValue = tokenFlags & 128 /* BinarySpecifier */ ? parseInt(tokenValue.slice(2), 2) : tokenFlags & 256 /* OctalSpecifier */ ? parseInt(tokenValue.slice(2), 8) : +tokenValue; - tokenValue = "" + numericValue; - return 9 /* NumericLiteral */; - } - } - function scan() { - fullStartPos = pos; - tokenFlags = 0 /* None */; - let asteriskSeen = false; - while (true) { - tokenStart = pos; - if (pos >= end) { - return token = 1 /* EndOfFileToken */; - } - const ch = codePointAt(text, pos); - if (pos === 0) { - if (ch === 65533 /* replacementCharacter */) { - error2(Diagnostics.File_appears_to_be_binary); - pos = end; - return token = 8 /* NonTextFileMarkerTrivia */; - } - if (ch === 35 /* hash */ && isShebangTrivia(text, pos)) { - pos = scanShebangTrivia(text, pos); - if (skipTrivia2) { - continue; - } else { - return token = 6 /* ShebangTrivia */; - } - } - } - switch (ch) { - case 10 /* lineFeed */: - case 13 /* carriageReturn */: - tokenFlags |= 1 /* PrecedingLineBreak */; - if (skipTrivia2) { - pos++; - continue; - } else { - if (ch === 13 /* carriageReturn */ && pos + 1 < end && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos += 2; - } else { - pos++; - } - return token = 4 /* NewLineTrivia */; - } - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - case 160 /* nonBreakingSpace */: - case 5760 /* ogham */: - case 8192 /* enQuad */: - case 8193 /* emQuad */: - case 8194 /* enSpace */: - case 8195 /* emSpace */: - case 8196 /* threePerEmSpace */: - case 8197 /* fourPerEmSpace */: - case 8198 /* sixPerEmSpace */: - case 8199 /* figureSpace */: - case 8200 /* punctuationSpace */: - case 8201 /* thinSpace */: - case 8202 /* hairSpace */: - case 8203 /* zeroWidthSpace */: - case 8239 /* narrowNoBreakSpace */: - case 8287 /* mathematicalSpace */: - case 12288 /* ideographicSpace */: - case 65279 /* byteOrderMark */: - if (skipTrivia2) { - pos++; - continue; - } else { - while (pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos))) { - pos++; - } - return token = 5 /* WhitespaceTrivia */; - } - case 33 /* exclamation */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 38 /* ExclamationEqualsEqualsToken */; - } - return pos += 2, token = 36 /* ExclamationEqualsToken */; - } - pos++; - return token = 54 /* ExclamationToken */; - case 34 /* doubleQuote */: - case 39 /* singleQuote */: - tokenValue = scanString(); - return token = 11 /* StringLiteral */; - case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue( - /*shouldEmitInvalidEscapeError*/ - false - ); - case 37 /* percent */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 70 /* PercentEqualsToken */; - } - pos++; - return token = 45 /* PercentToken */; - case 38 /* ampersand */: - if (text.charCodeAt(pos + 1) === 38 /* ampersand */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 77 /* AmpersandAmpersandEqualsToken */; - } - return pos += 2, token = 56 /* AmpersandAmpersandToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 74 /* AmpersandEqualsToken */; - } - pos++; - return token = 51 /* AmpersandToken */; - case 40 /* openParen */: - pos++; - return token = 21 /* OpenParenToken */; - case 41 /* closeParen */: - pos++; - return token = 22 /* CloseParenToken */; - case 42 /* asterisk */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 67 /* AsteriskEqualsToken */; - } - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 68 /* AsteriskAsteriskEqualsToken */; - } - return pos += 2, token = 43 /* AsteriskAsteriskToken */; - } - pos++; - if (inJSDocType && !asteriskSeen && tokenFlags & 1 /* PrecedingLineBreak */) { - asteriskSeen = true; - continue; - } - return token = 42 /* AsteriskToken */; - case 43 /* plus */: - if (text.charCodeAt(pos + 1) === 43 /* plus */) { - return pos += 2, token = 46 /* PlusPlusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 65 /* PlusEqualsToken */; - } - pos++; - return token = 40 /* PlusToken */; - case 44 /* comma */: - pos++; - return token = 28 /* CommaToken */; - case 45 /* minus */: - if (text.charCodeAt(pos + 1) === 45 /* minus */) { - return pos += 2, token = 47 /* MinusMinusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 66 /* MinusEqualsToken */; - } - pos++; - return token = 41 /* MinusToken */; - case 46 /* dot */: - if (isDigit(text.charCodeAt(pos + 1))) { - scanNumber(); - return token = 9 /* NumericLiteral */; - } - if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { - return pos += 3, token = 26 /* DotDotDotToken */; - } - pos++; - return token = 25 /* DotToken */; - case 47 /* slash */: - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < end) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - commentDirectives = appendIfCommentDirective( - commentDirectives, - text.slice(tokenStart, pos), - commentDirectiveRegExSingleLine, - tokenStart - ); - if (skipTrivia2) { - continue; - } else { - return token = 2 /* SingleLineCommentTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */) { - tokenFlags |= 2 /* PrecedingJSDocComment */; - } - let commentClosed = false; - let lastLineStart = tokenStart; - while (pos < end) { - const ch2 = text.charCodeAt(pos); - if (ch2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - commentClosed = true; - break; - } - pos++; - if (isLineBreak(ch2)) { - lastLineStart = pos; - tokenFlags |= 1 /* PrecedingLineBreak */; - } - } - commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); - if (!commentClosed) { - error2(Diagnostics.Asterisk_Slash_expected); - } - if (skipTrivia2) { - continue; - } else { - if (!commentClosed) { - tokenFlags |= 4 /* Unterminated */; - } - return token = 3 /* MultiLineCommentTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 69 /* SlashEqualsToken */; - } - pos++; - return token = 44 /* SlashToken */; - case 48 /* _0 */: - if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) { - pos += 2; - tokenValue = scanMinimumNumberOfHexDigits( - 1, - /*canHaveSeparators*/ - true - ); - if (!tokenValue) { - error2(Diagnostics.Hexadecimal_digit_expected); - tokenValue = "0"; - } - tokenValue = "0x" + tokenValue; - tokenFlags |= 64 /* HexSpecifier */; - return token = checkBigIntSuffix(); - } else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 /* B */ || text.charCodeAt(pos + 1) === 98 /* b */)) { - pos += 2; - tokenValue = scanBinaryOrOctalDigits( - /* base */ - 2 - ); - if (!tokenValue) { - error2(Diagnostics.Binary_digit_expected); - tokenValue = "0"; - } - tokenValue = "0b" + tokenValue; - tokenFlags |= 128 /* BinarySpecifier */; - return token = checkBigIntSuffix(); - } else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 /* O */ || text.charCodeAt(pos + 1) === 111 /* o */)) { - pos += 2; - tokenValue = scanBinaryOrOctalDigits( - /* base */ - 8 - ); - if (!tokenValue) { - error2(Diagnostics.Octal_digit_expected); - tokenValue = "0"; - } - tokenValue = "0o" + tokenValue; - tokenFlags |= 256 /* OctalSpecifier */; - return token = checkBigIntSuffix(); - } - case 49 /* _1 */: - case 50 /* _2 */: - case 51 /* _3 */: - case 52 /* _4 */: - case 53 /* _5 */: - case 54 /* _6 */: - case 55 /* _7 */: - case 56 /* _8 */: - case 57 /* _9 */: - return token = scanNumber(); - case 58 /* colon */: - pos++; - return token = 59 /* ColonToken */; - case 59 /* semicolon */: - pos++; - return token = 27 /* SemicolonToken */; - case 60 /* lessThan */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error2); - if (skipTrivia2) { - continue; - } else { - return token = 7 /* ConflictMarkerTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 60 /* lessThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 71 /* LessThanLessThanEqualsToken */; - } - return pos += 2, token = 48 /* LessThanLessThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 33 /* LessThanEqualsToken */; - } - if (languageVariant === 1 /* JSX */ && text.charCodeAt(pos + 1) === 47 /* slash */ && text.charCodeAt(pos + 2) !== 42 /* asterisk */) { - return pos += 2, token = 31 /* LessThanSlashToken */; - } - pos++; - return token = 30 /* LessThanToken */; - case 61 /* equals */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error2); - if (skipTrivia2) { - continue; - } else { - return token = 7 /* ConflictMarkerTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 37 /* EqualsEqualsEqualsToken */; - } - return pos += 2, token = 35 /* EqualsEqualsToken */; - } - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - return pos += 2, token = 39 /* EqualsGreaterThanToken */; - } - pos++; - return token = 64 /* EqualsToken */; - case 62 /* greaterThan */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error2); - if (skipTrivia2) { - continue; - } else { - return token = 7 /* ConflictMarkerTrivia */; - } - } - pos++; - return token = 32 /* GreaterThanToken */; - case 63 /* question */: - if (text.charCodeAt(pos + 1) === 46 /* dot */ && !isDigit(text.charCodeAt(pos + 2))) { - return pos += 2, token = 29 /* QuestionDotToken */; - } - if (text.charCodeAt(pos + 1) === 63 /* question */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 78 /* QuestionQuestionEqualsToken */; - } - return pos += 2, token = 61 /* QuestionQuestionToken */; - } - pos++; - return token = 58 /* QuestionToken */; - case 91 /* openBracket */: - pos++; - return token = 23 /* OpenBracketToken */; - case 93 /* closeBracket */: - pos++; - return token = 24 /* CloseBracketToken */; - case 94 /* caret */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 79 /* CaretEqualsToken */; - } - pos++; - return token = 53 /* CaretToken */; - case 123 /* openBrace */: - pos++; - return token = 19 /* OpenBraceToken */; - case 124 /* bar */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error2); - if (skipTrivia2) { - continue; - } else { - return token = 7 /* ConflictMarkerTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 124 /* bar */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 76 /* BarBarEqualsToken */; - } - return pos += 2, token = 57 /* BarBarToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 75 /* BarEqualsToken */; - } - pos++; - return token = 52 /* BarToken */; - case 125 /* closeBrace */: - pos++; - return token = 20 /* CloseBraceToken */; - case 126 /* tilde */: - pos++; - return token = 55 /* TildeToken */; - case 64 /* at */: - pos++; - return token = 60 /* AtToken */; - case 92 /* backslash */: - const extendedCookedChar = peekExtendedUnicodeEscape(); - if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) { - pos += 3; - tokenFlags |= 8 /* ExtendedUnicodeEscape */; - tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts(); - return token = getIdentifierToken(); - } - const cookedChar = peekUnicodeEscape(); - if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { - pos += 6; - tokenFlags |= 1024 /* UnicodeEscape */; - tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); - return token = getIdentifierToken(); - } - error2(Diagnostics.Invalid_character); - pos++; - return token = 0 /* Unknown */; - case 35 /* hash */: - if (pos !== 0 && text[pos + 1] === "!") { - error2(Diagnostics.can_only_be_used_at_the_start_of_a_file); - pos++; - return token = 0 /* Unknown */; - } - const charAfterHash = codePointAt(text, pos + 1); - if (charAfterHash === 92 /* backslash */) { - pos++; - const extendedCookedChar2 = peekExtendedUnicodeEscape(); - if (extendedCookedChar2 >= 0 && isIdentifierStart(extendedCookedChar2, languageVersion)) { - pos += 3; - tokenFlags |= 8 /* ExtendedUnicodeEscape */; - tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts(); - return token = 81 /* PrivateIdentifier */; - } - const cookedChar2 = peekUnicodeEscape(); - if (cookedChar2 >= 0 && isIdentifierStart(cookedChar2, languageVersion)) { - pos += 6; - tokenFlags |= 1024 /* UnicodeEscape */; - tokenValue = "#" + String.fromCharCode(cookedChar2) + scanIdentifierParts(); - return token = 81 /* PrivateIdentifier */; - } - pos--; - } - if (isIdentifierStart(charAfterHash, languageVersion)) { - pos++; - scanIdentifier(charAfterHash, languageVersion); - } else { - tokenValue = "#"; - error2(Diagnostics.Invalid_character, pos++, charSize(ch)); - } - return token = 81 /* PrivateIdentifier */; - default: - const identifierKind = scanIdentifier(ch, languageVersion); - if (identifierKind) { - return token = identifierKind; - } else if (isWhiteSpaceSingleLine(ch)) { - pos += charSize(ch); - continue; - } else if (isLineBreak(ch)) { - tokenFlags |= 1 /* PrecedingLineBreak */; - pos += charSize(ch); - continue; - } - const size = charSize(ch); - error2(Diagnostics.Invalid_character, pos, size); - pos += size; - return token = 0 /* Unknown */; - } - } - } - function reScanInvalidIdentifier() { - Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); - pos = tokenStart = fullStartPos; - tokenFlags = 0; - const ch = codePointAt(text, pos); - const identifierKind = scanIdentifier(ch, 99 /* ESNext */); - if (identifierKind) { - return token = identifierKind; - } - pos += charSize(ch); - return token; - } - function scanIdentifier(startCharacter, languageVersion2) { - let ch = startCharacter; - if (isIdentifierStart(ch, languageVersion2)) { - pos += charSize(ch); - while (pos < end && isIdentifierPart(ch = codePointAt(text, pos), languageVersion2)) - pos += charSize(ch); - tokenValue = text.substring(tokenStart, pos); - if (ch === 92 /* backslash */) { - tokenValue += scanIdentifierParts(); - } - return getIdentifierToken(); - } - } - function reScanGreaterToken() { - if (token === 32 /* GreaterThanToken */) { - if (text.charCodeAt(pos) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */; - } - return pos += 2, token = 50 /* GreaterThanGreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 72 /* GreaterThanGreaterThanEqualsToken */; - } - pos++; - return token = 49 /* GreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos) === 61 /* equals */) { - pos++; - return token = 34 /* GreaterThanEqualsToken */; - } - } - return token; - } - function reScanAsteriskEqualsToken() { - Debug.assert(token === 67 /* AsteriskEqualsToken */, "'reScanAsteriskEqualsToken' should only be called on a '*='"); - pos = tokenStart + 1; - return token = 64 /* EqualsToken */; - } - function reScanSlashToken() { - if (token === 44 /* SlashToken */ || token === 69 /* SlashEqualsToken */) { - let p = tokenStart + 1; - let inEscape = false; - let inCharacterClass = false; - while (true) { - if (p >= end) { - tokenFlags |= 4 /* Unterminated */; - error2(Diagnostics.Unterminated_regular_expression_literal); - break; - } - const ch = text.charCodeAt(p); - if (isLineBreak(ch)) { - tokenFlags |= 4 /* Unterminated */; - error2(Diagnostics.Unterminated_regular_expression_literal); - break; - } - if (inEscape) { - inEscape = false; - } else if (ch === 47 /* slash */ && !inCharacterClass) { - p++; - break; - } else if (ch === 91 /* openBracket */) { - inCharacterClass = true; - } else if (ch === 92 /* backslash */) { - inEscape = true; - } else if (ch === 93 /* closeBracket */) { - inCharacterClass = false; - } - p++; - } - while (p < end && isIdentifierPart(text.charCodeAt(p), languageVersion)) { - p++; - } - pos = p; - tokenValue = text.substring(tokenStart, pos); - token = 14 /* RegularExpressionLiteral */; - } - return token; - } - function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) { - const type = getDirectiveFromComment(trimStringStart(text2), commentDirectiveRegEx); - if (type === void 0) { - return commentDirectives2; - } - return append( - commentDirectives2, - { - range: { pos: lineStart, end: pos }, - type - } - ); - } - function getDirectiveFromComment(text2, commentDirectiveRegEx) { - const match = commentDirectiveRegEx.exec(text2); - if (!match) { - return void 0; - } - switch (match[1]) { - case "ts-expect-error": - return 0 /* ExpectError */; - case "ts-ignore": - return 1 /* Ignore */; - } - return void 0; - } - function reScanTemplateToken(isTaggedTemplate) { - pos = tokenStart; - return token = scanTemplateAndSetTokenValue(!isTaggedTemplate); - } - function reScanTemplateHeadOrNoSubstitutionTemplate() { - pos = tokenStart; - return token = scanTemplateAndSetTokenValue( - /*shouldEmitInvalidEscapeError*/ - true - ); - } - function reScanJsxToken(allowMultilineJsxText = true) { - pos = tokenStart = fullStartPos; - return token = scanJsxToken(allowMultilineJsxText); - } - function reScanLessThanToken() { - if (token === 48 /* LessThanLessThanToken */) { - pos = tokenStart + 1; - return token = 30 /* LessThanToken */; - } - return token; - } - function reScanHashToken() { - if (token === 81 /* PrivateIdentifier */) { - pos = tokenStart + 1; - return token = 63 /* HashToken */; - } - return token; - } - function reScanQuestionToken() { - Debug.assert(token === 61 /* QuestionQuestionToken */, "'reScanQuestionToken' should only be called on a '??'"); - pos = tokenStart + 1; - return token = 58 /* QuestionToken */; - } - function scanJsxToken(allowMultilineJsxText = true) { - fullStartPos = tokenStart = pos; - if (pos >= end) { - return token = 1 /* EndOfFileToken */; - } - let char = text.charCodeAt(pos); - if (char === 60 /* lessThan */) { - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - return token = 31 /* LessThanSlashToken */; - } - pos++; - return token = 30 /* LessThanToken */; - } - if (char === 123 /* openBrace */) { - pos++; - return token = 19 /* OpenBraceToken */; - } - let firstNonWhitespace = 0; - while (pos < end) { - char = text.charCodeAt(pos); - if (char === 123 /* openBrace */) { - break; - } - if (char === 60 /* lessThan */) { - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error2); - return token = 7 /* ConflictMarkerTrivia */; - } - break; - } - if (char === 62 /* greaterThan */) { - error2(Diagnostics.Unexpected_token_Did_you_mean_or_gt, pos, 1); - } - if (char === 125 /* closeBrace */) { - error2(Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1); - } - if (isLineBreak(char) && firstNonWhitespace === 0) { - firstNonWhitespace = -1; - } else if (!allowMultilineJsxText && isLineBreak(char) && firstNonWhitespace > 0) { - break; - } else if (!isWhiteSpaceLike(char)) { - firstNonWhitespace = pos; - } - pos++; - } - tokenValue = text.substring(fullStartPos, pos); - return firstNonWhitespace === -1 ? 13 /* JsxTextAllWhiteSpaces */ : 12 /* JsxText */; - } - function scanJsxIdentifier() { - if (tokenIsIdentifierOrKeyword(token)) { - while (pos < end) { - const ch = text.charCodeAt(pos); - if (ch === 45 /* minus */) { - tokenValue += "-"; - pos++; - continue; - } - const oldPos = pos; - tokenValue += scanIdentifierParts(); - if (pos === oldPos) { - break; - } - } - return getIdentifierToken(); - } - return token; - } - function scanJsxAttributeValue() { - fullStartPos = pos; - switch (text.charCodeAt(pos)) { - case 34 /* doubleQuote */: - case 39 /* singleQuote */: - tokenValue = scanString( - /*jsxAttributeString*/ - true - ); - return token = 11 /* StringLiteral */; - default: - return scan(); - } - } - function reScanJsxAttributeValue() { - pos = tokenStart = fullStartPos; - return scanJsxAttributeValue(); - } - function scanJSDocCommentTextToken(inBackticks) { - fullStartPos = tokenStart = pos; - tokenFlags = 0 /* None */; - if (pos >= end) { - return token = 1 /* EndOfFileToken */; - } - for (let ch = text.charCodeAt(pos); pos < end && (!isLineBreak(ch) && ch !== 96 /* backtick */); ch = codePointAt(text, ++pos)) { - if (!inBackticks) { - if (ch === 123 /* openBrace */) { - break; - } else if (ch === 64 /* at */ && pos - 1 >= 0 && isWhiteSpaceSingleLine(text.charCodeAt(pos - 1)) && !(pos + 1 < end && isWhiteSpaceLike(text.charCodeAt(pos + 1)))) { - break; - } - } - } - if (pos === tokenStart) { - return scanJsDocToken(); - } - tokenValue = text.substring(tokenStart, pos); - return token = 82 /* JSDocCommentTextToken */; - } - function scanJsDocToken() { - fullStartPos = tokenStart = pos; - tokenFlags = 0 /* None */; - if (pos >= end) { - return token = 1 /* EndOfFileToken */; - } - const ch = codePointAt(text, pos); - pos += charSize(ch); - switch (ch) { - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - while (pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos))) { - pos++; - } - return token = 5 /* WhitespaceTrivia */; - case 64 /* at */: - return token = 60 /* AtToken */; - case 13 /* carriageReturn */: - if (text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - tokenFlags |= 1 /* PrecedingLineBreak */; - return token = 4 /* NewLineTrivia */; - case 42 /* asterisk */: - return token = 42 /* AsteriskToken */; - case 123 /* openBrace */: - return token = 19 /* OpenBraceToken */; - case 125 /* closeBrace */: - return token = 20 /* CloseBraceToken */; - case 91 /* openBracket */: - return token = 23 /* OpenBracketToken */; - case 93 /* closeBracket */: - return token = 24 /* CloseBracketToken */; - case 60 /* lessThan */: - return token = 30 /* LessThanToken */; - case 62 /* greaterThan */: - return token = 32 /* GreaterThanToken */; - case 61 /* equals */: - return token = 64 /* EqualsToken */; - case 44 /* comma */: - return token = 28 /* CommaToken */; - case 46 /* dot */: - return token = 25 /* DotToken */; - case 96 /* backtick */: - return token = 62 /* BacktickToken */; - case 35 /* hash */: - return token = 63 /* HashToken */; - case 92 /* backslash */: - pos--; - const extendedCookedChar = peekExtendedUnicodeEscape(); - if (extendedCookedChar >= 0 && isIdentifierStart(extendedCookedChar, languageVersion)) { - pos += 3; - tokenFlags |= 8 /* ExtendedUnicodeEscape */; - tokenValue = scanExtendedUnicodeEscape() + scanIdentifierParts(); - return token = getIdentifierToken(); - } - const cookedChar = peekUnicodeEscape(); - if (cookedChar >= 0 && isIdentifierStart(cookedChar, languageVersion)) { - pos += 6; - tokenFlags |= 1024 /* UnicodeEscape */; - tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); - return token = getIdentifierToken(); - } - pos++; - return token = 0 /* Unknown */; - } - if (isIdentifierStart(ch, languageVersion)) { - let char = ch; - while (pos < end && isIdentifierPart(char = codePointAt(text, pos), languageVersion) || text.charCodeAt(pos) === 45 /* minus */) - pos += charSize(char); - tokenValue = text.substring(tokenStart, pos); - if (char === 92 /* backslash */) { - tokenValue += scanIdentifierParts(); - } - return token = getIdentifierToken(); - } else { - return token = 0 /* Unknown */; - } - } - function speculationHelper(callback, isLookahead) { - const savePos = pos; - const saveStartPos = fullStartPos; - const saveTokenPos = tokenStart; - const saveToken = token; - const saveTokenValue = tokenValue; - const saveTokenFlags = tokenFlags; - const result = callback(); - if (!result || isLookahead) { - pos = savePos; - fullStartPos = saveStartPos; - tokenStart = saveTokenPos; - token = saveToken; - tokenValue = saveTokenValue; - tokenFlags = saveTokenFlags; - } - return result; - } - function scanRange(start2, length3, callback) { - const saveEnd = end; - const savePos = pos; - const saveStartPos = fullStartPos; - const saveTokenPos = tokenStart; - const saveToken = token; - const saveTokenValue = tokenValue; - const saveTokenFlags = tokenFlags; - const saveErrorExpectations = commentDirectives; - setText(text, start2, length3); - const result = callback(); - end = saveEnd; - pos = savePos; - fullStartPos = saveStartPos; - tokenStart = saveTokenPos; - token = saveToken; - tokenValue = saveTokenValue; - tokenFlags = saveTokenFlags; - commentDirectives = saveErrorExpectations; - return result; - } - function lookAhead(callback) { - return speculationHelper( - callback, - /*isLookahead*/ - true - ); - } - function tryScan(callback) { - return speculationHelper( - callback, - /*isLookahead*/ - false - ); - } - function getText() { - return text; - } - function clearCommentDirectives() { - commentDirectives = void 0; - } - function setText(newText, start2, length3) { - text = newText || ""; - end = length3 === void 0 ? text.length : start2 + length3; - resetTokenState(start2 || 0); - } - function setOnError(errorCallback) { - onError = errorCallback; - } - function setScriptTarget(scriptTarget) { - languageVersion = scriptTarget; - } - function setLanguageVariant(variant) { - languageVariant = variant; - } - function resetTokenState(position) { - Debug.assert(position >= 0); - pos = position; - fullStartPos = position; - tokenStart = position; - token = 0 /* Unknown */; - tokenValue = void 0; - tokenFlags = 0 /* None */; - } - function setInJSDocType(inType) { - inJSDocType += inType ? 1 : -1; - } - } - function charSize(ch) { - if (ch >= 65536) { - return 2; - } - return 1; - } - function utf16EncodeAsStringFallback(codePoint) { - Debug.assert(0 <= codePoint && codePoint <= 1114111); - if (codePoint <= 65535) { - return String.fromCharCode(codePoint); - } - const codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 55296; - const codeUnit2 = (codePoint - 65536) % 1024 + 56320; - return String.fromCharCode(codeUnit1, codeUnit2); - } - function utf16EncodeAsString(codePoint) { - return utf16EncodeAsStringWorker(codePoint); - } - var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, codePointAt, utf16EncodeAsStringWorker; - var init_scanner = __esm({ - "src/compiler/scanner.ts"() { - "use strict"; - init_ts2(); - textToKeywordObj = { - abstract: 128 /* AbstractKeyword */, - accessor: 129 /* AccessorKeyword */, - any: 133 /* AnyKeyword */, - as: 130 /* AsKeyword */, - asserts: 131 /* AssertsKeyword */, - assert: 132 /* AssertKeyword */, - bigint: 163 /* BigIntKeyword */, - boolean: 136 /* BooleanKeyword */, - break: 83 /* BreakKeyword */, - case: 84 /* CaseKeyword */, - catch: 85 /* CatchKeyword */, - class: 86 /* ClassKeyword */, - continue: 88 /* ContinueKeyword */, - const: 87 /* ConstKeyword */, - ["constructor"]: 137 /* ConstructorKeyword */, - debugger: 89 /* DebuggerKeyword */, - declare: 138 /* DeclareKeyword */, - default: 90 /* DefaultKeyword */, - delete: 91 /* DeleteKeyword */, - do: 92 /* DoKeyword */, - else: 93 /* ElseKeyword */, - enum: 94 /* EnumKeyword */, - export: 95 /* ExportKeyword */, - extends: 96 /* ExtendsKeyword */, - false: 97 /* FalseKeyword */, - finally: 98 /* FinallyKeyword */, - for: 99 /* ForKeyword */, - from: 161 /* FromKeyword */, - function: 100 /* FunctionKeyword */, - get: 139 /* GetKeyword */, - if: 101 /* IfKeyword */, - implements: 119 /* ImplementsKeyword */, - import: 102 /* ImportKeyword */, - in: 103 /* InKeyword */, - infer: 140 /* InferKeyword */, - instanceof: 104 /* InstanceOfKeyword */, - interface: 120 /* InterfaceKeyword */, - intrinsic: 141 /* IntrinsicKeyword */, - is: 142 /* IsKeyword */, - keyof: 143 /* KeyOfKeyword */, - let: 121 /* LetKeyword */, - module: 144 /* ModuleKeyword */, - namespace: 145 /* NamespaceKeyword */, - never: 146 /* NeverKeyword */, - new: 105 /* NewKeyword */, - null: 106 /* NullKeyword */, - number: 150 /* NumberKeyword */, - object: 151 /* ObjectKeyword */, - package: 122 /* PackageKeyword */, - private: 123 /* PrivateKeyword */, - protected: 124 /* ProtectedKeyword */, - public: 125 /* PublicKeyword */, - override: 164 /* OverrideKeyword */, - out: 147 /* OutKeyword */, - readonly: 148 /* ReadonlyKeyword */, - require: 149 /* RequireKeyword */, - global: 162 /* GlobalKeyword */, - return: 107 /* ReturnKeyword */, - satisfies: 152 /* SatisfiesKeyword */, - set: 153 /* SetKeyword */, - static: 126 /* StaticKeyword */, - string: 154 /* StringKeyword */, - super: 108 /* SuperKeyword */, - switch: 109 /* SwitchKeyword */, - symbol: 155 /* SymbolKeyword */, - this: 110 /* ThisKeyword */, - throw: 111 /* ThrowKeyword */, - true: 112 /* TrueKeyword */, - try: 113 /* TryKeyword */, - type: 156 /* TypeKeyword */, - typeof: 114 /* TypeOfKeyword */, - undefined: 157 /* UndefinedKeyword */, - unique: 158 /* UniqueKeyword */, - unknown: 159 /* UnknownKeyword */, - using: 160 /* UsingKeyword */, - var: 115 /* VarKeyword */, - void: 116 /* VoidKeyword */, - while: 117 /* WhileKeyword */, - with: 118 /* WithKeyword */, - yield: 127 /* YieldKeyword */, - async: 134 /* AsyncKeyword */, - await: 135 /* AwaitKeyword */, - of: 165 /* OfKeyword */ - }; - textToKeyword = new Map(Object.entries(textToKeywordObj)); - textToToken = new Map(Object.entries({ - ...textToKeywordObj, - "{": 19 /* OpenBraceToken */, - "}": 20 /* CloseBraceToken */, - "(": 21 /* OpenParenToken */, - ")": 22 /* CloseParenToken */, - "[": 23 /* OpenBracketToken */, - "]": 24 /* CloseBracketToken */, - ".": 25 /* DotToken */, - "...": 26 /* DotDotDotToken */, - ";": 27 /* SemicolonToken */, - ",": 28 /* CommaToken */, - "<": 30 /* LessThanToken */, - ">": 32 /* GreaterThanToken */, - "<=": 33 /* LessThanEqualsToken */, - ">=": 34 /* GreaterThanEqualsToken */, - "==": 35 /* EqualsEqualsToken */, - "!=": 36 /* ExclamationEqualsToken */, - "===": 37 /* EqualsEqualsEqualsToken */, - "!==": 38 /* ExclamationEqualsEqualsToken */, - "=>": 39 /* EqualsGreaterThanToken */, - "+": 40 /* PlusToken */, - "-": 41 /* MinusToken */, - "**": 43 /* AsteriskAsteriskToken */, - "*": 42 /* AsteriskToken */, - "/": 44 /* SlashToken */, - "%": 45 /* PercentToken */, - "++": 46 /* PlusPlusToken */, - "--": 47 /* MinusMinusToken */, - "<<": 48 /* LessThanLessThanToken */, - ">": 49 /* GreaterThanGreaterThanToken */, - ">>>": 50 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 51 /* AmpersandToken */, - "|": 52 /* BarToken */, - "^": 53 /* CaretToken */, - "!": 54 /* ExclamationToken */, - "~": 55 /* TildeToken */, - "&&": 56 /* AmpersandAmpersandToken */, - "||": 57 /* BarBarToken */, - "?": 58 /* QuestionToken */, - "??": 61 /* QuestionQuestionToken */, - "?.": 29 /* QuestionDotToken */, - ":": 59 /* ColonToken */, - "=": 64 /* EqualsToken */, - "+=": 65 /* PlusEqualsToken */, - "-=": 66 /* MinusEqualsToken */, - "*=": 67 /* AsteriskEqualsToken */, - "**=": 68 /* AsteriskAsteriskEqualsToken */, - "/=": 69 /* SlashEqualsToken */, - "%=": 70 /* PercentEqualsToken */, - "<<=": 71 /* LessThanLessThanEqualsToken */, - ">>=": 72 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 74 /* AmpersandEqualsToken */, - "|=": 75 /* BarEqualsToken */, - "^=": 79 /* CaretEqualsToken */, - "||=": 76 /* BarBarEqualsToken */, - "&&=": 77 /* AmpersandAmpersandEqualsToken */, - "??=": 78 /* QuestionQuestionEqualsToken */, - "@": 60 /* AtToken */, - "#": 63 /* HashToken */, - "`": 62 /* BacktickToken */ - })); - unicodeES3IdentifierStart = [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]; - unicodeES3IdentifierPart = [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]; - unicodeES5IdentifierStart = [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]; - unicodeES5IdentifierPart = [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]; - unicodeESNextIdentifierStart = [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]; - unicodeESNextIdentifierPart = [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]; - commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/; - commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/; - tokenStrings = makeReverseMap(textToToken); - mergeConflictMarkerLength = "<<<<<<<".length; - shebangTriviaRegex = /^#!.*/; - codePointAt = String.prototype.codePointAt ? (s, i) => s.codePointAt(i) : function codePointAt2(str, i) { - const size = str.length; - if (i < 0 || i >= size) { - return void 0; - } - const first2 = str.charCodeAt(i); - if (first2 >= 55296 && first2 <= 56319 && size > i + 1) { - const second = str.charCodeAt(i + 1); - if (second >= 56320 && second <= 57343) { - return (first2 - 55296) * 1024 + second - 56320 + 65536; - } - } - return first2; - }; - utf16EncodeAsStringWorker = String.fromCodePoint ? (codePoint) => String.fromCodePoint(codePoint) : utf16EncodeAsStringFallback; - } - }); - - // src/compiler/utilitiesPublic.ts - function isExternalModuleNameRelative(moduleName) { - return pathIsRelative(moduleName) || isRootedDiskPath(moduleName); - } - function sortAndDeduplicateDiagnostics(diagnostics) { - return sortAndDeduplicate(diagnostics, compareDiagnostics); - } - function getDefaultLibFileName(options) { - switch (getEmitScriptTarget(options)) { - case 99 /* ESNext */: - return "lib.esnext.full.d.ts"; - case 9 /* ES2022 */: - return "lib.es2022.full.d.ts"; - case 8 /* ES2021 */: - return "lib.es2021.full.d.ts"; - case 7 /* ES2020 */: - return "lib.es2020.full.d.ts"; - case 6 /* ES2019 */: - return "lib.es2019.full.d.ts"; - case 5 /* ES2018 */: - return "lib.es2018.full.d.ts"; - case 4 /* ES2017 */: - return "lib.es2017.full.d.ts"; - case 3 /* ES2016 */: - return "lib.es2016.full.d.ts"; - case 2 /* ES2015 */: - return "lib.es6.d.ts"; - default: - return "lib.d.ts"; - } - } - function textSpanEnd(span) { - return span.start + span.length; - } - function textSpanIsEmpty(span) { - return span.length === 0; - } - function textSpanContainsPosition(span, position) { - return position >= span.start && position < textSpanEnd(span); - } - function textRangeContainsPositionInclusive(span, position) { - return position >= span.pos && position <= span.end; - } - function textSpanContainsTextSpan(span, other) { - return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span); - } - function textSpanOverlapsWith(span, other) { - return textSpanOverlap(span, other) !== void 0; - } - function textSpanOverlap(span1, span2) { - const overlap = textSpanIntersection(span1, span2); - return overlap && overlap.length === 0 ? void 0 : overlap; - } - function textSpanIntersectsWithTextSpan(span, other) { - return decodedTextSpanIntersectsWith(span.start, span.length, other.start, other.length); - } - function textSpanIntersectsWith(span, start, length2) { - return decodedTextSpanIntersectsWith(span.start, span.length, start, length2); - } - function decodedTextSpanIntersectsWith(start1, length1, start2, length2) { - const end1 = start1 + length1; - const end2 = start2 + length2; - return start2 <= end1 && end2 >= start1; - } - function textSpanIntersectsWithPosition(span, position) { - return position <= textSpanEnd(span) && position >= span.start; - } - function textSpanIntersection(span1, span2) { - const start = Math.max(span1.start, span2.start); - const end = Math.min(textSpanEnd(span1), textSpanEnd(span2)); - return start <= end ? createTextSpanFromBounds(start, end) : void 0; - } - function createTextSpan(start, length2) { - if (start < 0) { - throw new Error("start < 0"); - } - if (length2 < 0) { - throw new Error("length < 0"); - } - return { start, length: length2 }; - } - function createTextSpanFromBounds(start, end) { - return createTextSpan(start, end - start); - } - function textChangeRangeNewSpan(range) { - return createTextSpan(range.span.start, range.newLength); - } - function textChangeRangeIsUnchanged(range) { - return textSpanIsEmpty(range.span) && range.newLength === 0; - } - function createTextChangeRange(span, newLength) { - if (newLength < 0) { - throw new Error("newLength < 0"); - } - return { span, newLength }; - } - function collapseTextChangeRangesAcrossMultipleVersions(changes) { - if (changes.length === 0) { - return unchangedTextChangeRange; - } - if (changes.length === 1) { - return changes[0]; - } - const change0 = changes[0]; - let oldStartN = change0.span.start; - let oldEndN = textSpanEnd(change0.span); - let newEndN = oldStartN + change0.newLength; - for (let i = 1; i < changes.length; i++) { - const nextChange = changes[i]; - const oldStart1 = oldStartN; - const oldEnd1 = oldEndN; - const newEnd1 = newEndN; - const oldStart2 = nextChange.span.start; - const oldEnd2 = textSpanEnd(nextChange.span); - const newEnd2 = oldStart2 + nextChange.newLength; - oldStartN = Math.min(oldStart1, oldStart2); - oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); - newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); - } - return createTextChangeRange( - createTextSpanFromBounds(oldStartN, oldEndN), - /*newLength*/ - newEndN - oldStartN - ); - } - function getTypeParameterOwner(d) { - if (d && d.kind === 168 /* TypeParameter */) { - for (let current = d; current; current = current.parent) { - if (isFunctionLike(current) || isClassLike(current) || current.kind === 264 /* InterfaceDeclaration */) { - return current; - } - } - } - } - function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; - } - function isEmptyBindingPattern(node) { - if (isBindingPattern(node)) { - return every(node.elements, isEmptyBindingElement); - } - return false; - } - function isEmptyBindingElement(node) { - if (isOmittedExpression(node)) { - return true; - } - return isEmptyBindingPattern(node.name); - } - function walkUpBindingElementsAndPatterns(binding) { - let node = binding.parent; - while (isBindingElement(node.parent)) { - node = node.parent.parent; - } - return node.parent; - } - function getCombinedFlags(node, getFlags) { - if (isBindingElement(node)) { - node = walkUpBindingElementsAndPatterns(node); - } - let flags = getFlags(node); - if (node.kind === 260 /* VariableDeclaration */) { - node = node.parent; - } - if (node && node.kind === 261 /* VariableDeclarationList */) { - flags |= getFlags(node); - node = node.parent; - } - if (node && node.kind === 243 /* VariableStatement */) { - flags |= getFlags(node); - } - return flags; - } - function getCombinedModifierFlags(node) { - return getCombinedFlags(node, getEffectiveModifierFlags); - } - function getCombinedNodeFlagsAlwaysIncludeJSDoc(node) { - return getCombinedFlags(node, getEffectiveModifierFlagsAlwaysIncludeJSDoc); - } - function getCombinedNodeFlags(node) { - return getCombinedFlags(node, getNodeFlags); - } - function getNodeFlags(node) { - return node.flags; - } - function validateLocaleAndSetLanguage(locale, sys2, errors) { - const lowerCaseLocale = locale.toLowerCase(); - const matchResult = /^([a-z]+)([_-]([a-z]+))?$/.exec(lowerCaseLocale); - if (!matchResult) { - if (errors) { - errors.push(createCompilerDiagnostic(Diagnostics.Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1, "en", "ja-jp")); - } - return; - } - const language = matchResult[1]; - const territory = matchResult[3]; - if (contains(supportedLocaleDirectories, lowerCaseLocale) && !trySetLanguageAndTerritory(language, territory, errors)) { - trySetLanguageAndTerritory( - language, - /*territory*/ - void 0, - errors - ); - } - setUILocale(locale); - function trySetLanguageAndTerritory(language2, territory2, errors2) { - const compilerFilePath = normalizePath(sys2.getExecutingFilePath()); - const containingDirectoryPath = getDirectoryPath(compilerFilePath); - let filePath = combinePaths(containingDirectoryPath, language2); - if (territory2) { - filePath = filePath + "-" + territory2; - } - filePath = sys2.resolvePath(combinePaths(filePath, "diagnosticMessages.generated.json")); - if (!sys2.fileExists(filePath)) { - return false; - } - let fileContents = ""; - try { - fileContents = sys2.readFile(filePath); - } catch (e) { - if (errors2) { - errors2.push(createCompilerDiagnostic(Diagnostics.Unable_to_open_file_0, filePath)); - } - return false; - } - try { - setLocalizedDiagnosticMessages(JSON.parse(fileContents)); - } catch { - if (errors2) { - errors2.push(createCompilerDiagnostic(Diagnostics.Corrupted_locale_file_0, filePath)); - } - return false; - } - return true; - } - } - function getOriginalNode(node, nodeTest) { - if (node) { - while (node.original !== void 0) { - node = node.original; - } - } - if (!node || !nodeTest) { - return node; - } - return nodeTest(node) ? node : void 0; - } - function findAncestor(node, callback) { - while (node) { - const result = callback(node); - if (result === "quit") { - return void 0; - } else if (result) { - return node; - } - node = node.parent; - } - return void 0; - } - function isParseTreeNode(node) { - return (node.flags & 16 /* Synthesized */) === 0; - } - function getParseTreeNode(node, nodeTest) { - if (node === void 0 || isParseTreeNode(node)) { - return node; - } - node = node.original; - while (node) { - if (isParseTreeNode(node)) { - return !nodeTest || nodeTest(node) ? node : void 0; - } - node = node.original; - } - } - function escapeLeadingUnderscores(identifier) { - return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier; - } - function unescapeLeadingUnderscores(identifier) { - const id = identifier; - return id.length >= 3 && id.charCodeAt(0) === 95 /* _ */ && id.charCodeAt(1) === 95 /* _ */ && id.charCodeAt(2) === 95 /* _ */ ? id.substr(1) : id; - } - function idText(identifierOrPrivateName) { - return unescapeLeadingUnderscores(identifierOrPrivateName.escapedText); - } - function identifierToKeywordKind(node) { - const token = stringToToken(node.escapedText); - return token ? tryCast(token, isKeyword) : void 0; - } - function symbolName(symbol) { - if (symbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(symbol.valueDeclaration)) { - return idText(symbol.valueDeclaration.name); - } - return unescapeLeadingUnderscores(symbol.escapedName); - } - function nameForNamelessJSDocTypedef(declaration) { - const hostNode = declaration.parent.parent; - if (!hostNode) { - return void 0; - } - if (isDeclaration(hostNode)) { - return getDeclarationIdentifier(hostNode); - } - switch (hostNode.kind) { - case 243 /* VariableStatement */: - if (hostNode.declarationList && hostNode.declarationList.declarations[0]) { - return getDeclarationIdentifier(hostNode.declarationList.declarations[0]); - } - break; - case 244 /* ExpressionStatement */: - let expr = hostNode.expression; - if (expr.kind === 226 /* BinaryExpression */ && expr.operatorToken.kind === 64 /* EqualsToken */) { - expr = expr.left; - } - switch (expr.kind) { - case 211 /* PropertyAccessExpression */: - return expr.name; - case 212 /* ElementAccessExpression */: - const arg = expr.argumentExpression; - if (isIdentifier(arg)) { - return arg; - } - } - break; - case 217 /* ParenthesizedExpression */: { - return getDeclarationIdentifier(hostNode.expression); - } - case 256 /* LabeledStatement */: { - if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) { - return getDeclarationIdentifier(hostNode.statement); - } - break; - } - } - } - function getDeclarationIdentifier(node) { - const name = getNameOfDeclaration(node); - return name && isIdentifier(name) ? name : void 0; - } - function nodeHasName(statement, name) { - if (isNamedDeclaration(statement) && isIdentifier(statement.name) && idText(statement.name) === idText(name)) { - return true; - } - if (isVariableStatement(statement) && some(statement.declarationList.declarations, (d) => nodeHasName(d, name))) { - return true; - } - return false; - } - function getNameOfJSDocTypedef(declaration) { - return declaration.name || nameForNamelessJSDocTypedef(declaration); - } - function isNamedDeclaration(node) { - return !!node.name; - } - function getNonAssignedNameOfDeclaration(declaration) { - switch (declaration.kind) { - case 80 /* Identifier */: - return declaration; - case 355 /* JSDocPropertyTag */: - case 348 /* JSDocParameterTag */: { - const { name } = declaration; - if (name.kind === 166 /* QualifiedName */) { - return name.right; - } - break; - } - case 213 /* CallExpression */: - case 226 /* BinaryExpression */: { - const expr2 = declaration; - switch (getAssignmentDeclarationKind(expr2)) { - case 1 /* ExportsProperty */: - case 4 /* ThisProperty */: - case 5 /* Property */: - case 3 /* PrototypeProperty */: - return getElementOrPropertyAccessArgumentExpressionOrName(expr2.left); - case 7 /* ObjectDefinePropertyValue */: - case 8 /* ObjectDefinePropertyExports */: - case 9 /* ObjectDefinePrototypeProperty */: - return expr2.arguments[1]; - default: - return void 0; - } - } - case 353 /* JSDocTypedefTag */: - return getNameOfJSDocTypedef(declaration); - case 347 /* JSDocEnumTag */: - return nameForNamelessJSDocTypedef(declaration); - case 277 /* ExportAssignment */: { - const { expression } = declaration; - return isIdentifier(expression) ? expression : void 0; - } - case 212 /* ElementAccessExpression */: - const expr = declaration; - if (isBindableStaticElementAccessExpression(expr)) { - return expr.argumentExpression; - } - } - return declaration.name; - } - function getNameOfDeclaration(declaration) { - if (declaration === void 0) - return void 0; - return getNonAssignedNameOfDeclaration(declaration) || (isFunctionExpression(declaration) || isArrowFunction(declaration) || isClassExpression(declaration) ? getAssignedName(declaration) : void 0); - } - function getAssignedName(node) { - if (!node.parent) { - return void 0; - } else if (isPropertyAssignment(node.parent) || isBindingElement(node.parent)) { - return node.parent.name; - } else if (isBinaryExpression(node.parent) && node === node.parent.right) { - if (isIdentifier(node.parent.left)) { - return node.parent.left; - } else if (isAccessExpression(node.parent.left)) { - return getElementOrPropertyAccessArgumentExpressionOrName(node.parent.left); - } - } else if (isVariableDeclaration(node.parent) && isIdentifier(node.parent.name)) { - return node.parent.name; - } - } - function getDecorators(node) { - if (hasDecorators(node)) { - return filter(node.modifiers, isDecorator); - } - } - function getModifiers(node) { - if (hasSyntacticModifier(node, 126975 /* Modifier */)) { - return filter(node.modifiers, isModifier); - } - } - function getJSDocParameterTagsWorker(param, noCache) { - if (param.name) { - if (isIdentifier(param.name)) { - const name = param.name.escapedText; - return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocParameterTag(tag) && isIdentifier(tag.name) && tag.name.escapedText === name); - } else { - const i = param.parent.parameters.indexOf(param); - Debug.assert(i > -1, "Parameters should always be in their parents' parameter list"); - const paramTags = getJSDocTagsWorker(param.parent, noCache).filter(isJSDocParameterTag); - if (i < paramTags.length) { - return [paramTags[i]]; - } - } - } - return emptyArray; - } - function getJSDocParameterTags(param) { - return getJSDocParameterTagsWorker( - param, - /*noCache*/ - false - ); - } - function getJSDocParameterTagsNoCache(param) { - return getJSDocParameterTagsWorker( - param, - /*noCache*/ - true - ); - } - function getJSDocTypeParameterTagsWorker(param, noCache) { - const name = param.name.escapedText; - return getJSDocTagsWorker(param.parent, noCache).filter((tag) => isJSDocTemplateTag(tag) && tag.typeParameters.some((tp) => tp.name.escapedText === name)); - } - function getJSDocTypeParameterTags(param) { - return getJSDocTypeParameterTagsWorker( - param, - /*noCache*/ - false - ); - } - function getJSDocTypeParameterTagsNoCache(param) { - return getJSDocTypeParameterTagsWorker( - param, - /*noCache*/ - true - ); - } - function hasJSDocParameterTags(node) { - return !!getFirstJSDocTag(node, isJSDocParameterTag); - } - function getJSDocAugmentsTag(node) { - return getFirstJSDocTag(node, isJSDocAugmentsTag); - } - function getJSDocImplementsTags(node) { - return getAllJSDocTags(node, isJSDocImplementsTag); - } - function getJSDocClassTag(node) { - return getFirstJSDocTag(node, isJSDocClassTag); - } - function getJSDocPublicTag(node) { - return getFirstJSDocTag(node, isJSDocPublicTag); - } - function getJSDocPublicTagNoCache(node) { - return getFirstJSDocTag( - node, - isJSDocPublicTag, - /*noCache*/ - true - ); - } - function getJSDocPrivateTag(node) { - return getFirstJSDocTag(node, isJSDocPrivateTag); - } - function getJSDocPrivateTagNoCache(node) { - return getFirstJSDocTag( - node, - isJSDocPrivateTag, - /*noCache*/ - true - ); - } - function getJSDocProtectedTag(node) { - return getFirstJSDocTag(node, isJSDocProtectedTag); - } - function getJSDocProtectedTagNoCache(node) { - return getFirstJSDocTag( - node, - isJSDocProtectedTag, - /*noCache*/ - true - ); - } - function getJSDocReadonlyTag(node) { - return getFirstJSDocTag(node, isJSDocReadonlyTag); - } - function getJSDocReadonlyTagNoCache(node) { - return getFirstJSDocTag( - node, - isJSDocReadonlyTag, - /*noCache*/ - true - ); - } - function getJSDocOverrideTagNoCache(node) { - return getFirstJSDocTag( - node, - isJSDocOverrideTag, - /*noCache*/ - true - ); - } - function getJSDocDeprecatedTag(node) { - return getFirstJSDocTag(node, isJSDocDeprecatedTag); - } - function getJSDocDeprecatedTagNoCache(node) { - return getFirstJSDocTag( - node, - isJSDocDeprecatedTag, - /*noCache*/ - true - ); - } - function getJSDocEnumTag(node) { - return getFirstJSDocTag(node, isJSDocEnumTag); - } - function getJSDocThisTag(node) { - return getFirstJSDocTag(node, isJSDocThisTag); - } - function getJSDocReturnTag(node) { - return getFirstJSDocTag(node, isJSDocReturnTag); - } - function getJSDocTemplateTag(node) { - return getFirstJSDocTag(node, isJSDocTemplateTag); - } - function getJSDocSatisfiesTag(node) { - return getFirstJSDocTag(node, isJSDocSatisfiesTag); - } - function getJSDocTypeTag(node) { - const tag = getFirstJSDocTag(node, isJSDocTypeTag); - if (tag && tag.typeExpression && tag.typeExpression.type) { - return tag; - } - return void 0; - } - function getJSDocType(node) { - let tag = getFirstJSDocTag(node, isJSDocTypeTag); - if (!tag && isParameter(node)) { - tag = find(getJSDocParameterTags(node), (tag2) => !!tag2.typeExpression); - } - return tag && tag.typeExpression && tag.typeExpression.type; - } - function getJSDocReturnType(node) { - const returnTag = getJSDocReturnTag(node); - if (returnTag && returnTag.typeExpression) { - return returnTag.typeExpression.type; - } - const typeTag = getJSDocTypeTag(node); - if (typeTag && typeTag.typeExpression) { - const type = typeTag.typeExpression.type; - if (isTypeLiteralNode(type)) { - const sig = find(type.members, isCallSignatureDeclaration); - return sig && sig.type; - } - if (isFunctionTypeNode(type) || isJSDocFunctionType(type)) { - return type.type; - } - } - } - function getJSDocTagsWorker(node, noCache) { - var _a; - if (!canHaveJSDoc(node)) - return emptyArray; - let tags = (_a = node.jsDoc) == null ? void 0 : _a.jsDocCache; - if (tags === void 0 || noCache) { - const comments = getJSDocCommentsAndTags(node, noCache); - Debug.assert(comments.length < 2 || comments[0] !== comments[1]); - tags = flatMap(comments, (j) => isJSDoc(j) ? j.tags : j); - if (!noCache) { - node.jsDoc ?? (node.jsDoc = []); - node.jsDoc.jsDocCache = tags; - } - } - return tags; - } - function getJSDocTags(node) { - return getJSDocTagsWorker( - node, - /*noCache*/ - false - ); - } - function getJSDocTagsNoCache(node) { - return getJSDocTagsWorker( - node, - /*noCache*/ - true - ); - } - function getFirstJSDocTag(node, predicate, noCache) { - return find(getJSDocTagsWorker(node, noCache), predicate); - } - function getAllJSDocTags(node, predicate) { - return getJSDocTags(node).filter(predicate); - } - function getAllJSDocTagsOfKind(node, kind) { - return getJSDocTags(node).filter((doc) => doc.kind === kind); - } - function getTextOfJSDocComment(comment) { - return typeof comment === "string" ? comment : comment == null ? void 0 : comment.map((c) => c.kind === 328 /* JSDocText */ ? c.text : formatJSDocLink(c)).join(""); - } - function formatJSDocLink(link) { - const kind = link.kind === 331 /* JSDocLink */ ? "link" : link.kind === 332 /* JSDocLinkCode */ ? "linkcode" : "linkplain"; - const name = link.name ? entityNameToString(link.name) : ""; - const space = link.name && link.text.startsWith("://") ? "" : " "; - return `{@${kind} ${name}${space}${link.text}}`; - } - function getEffectiveTypeParameterDeclarations(node) { - if (isJSDocSignature(node)) { - if (isJSDocOverloadTag(node.parent)) { - const jsDoc = getJSDocRoot(node.parent); - if (jsDoc && length(jsDoc.tags)) { - return flatMap(jsDoc.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); - } - } - return emptyArray; - } - if (isJSDocTypeAlias(node)) { - Debug.assert(node.parent.kind === 327 /* JSDoc */); - return flatMap(node.parent.tags, (tag) => isJSDocTemplateTag(tag) ? tag.typeParameters : void 0); - } - if (node.typeParameters) { - return node.typeParameters; - } - if (canHaveIllegalTypeParameters(node) && node.typeParameters) { - return node.typeParameters; - } - if (isInJSFile(node)) { - const decls = getJSDocTypeParameterDeclarations(node); - if (decls.length) { - return decls; - } - const typeTag = getJSDocType(node); - if (typeTag && isFunctionTypeNode(typeTag) && typeTag.typeParameters) { - return typeTag.typeParameters; - } - } - return emptyArray; - } - function getEffectiveConstraintOfTypeParameter(node) { - return node.constraint ? node.constraint : isJSDocTemplateTag(node.parent) && node === node.parent.typeParameters[0] ? node.parent.constraint : void 0; - } - function isMemberName(node) { - return node.kind === 80 /* Identifier */ || node.kind === 81 /* PrivateIdentifier */; - } - function isGetOrSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */ || node.kind === 177 /* GetAccessor */; - } - function isPropertyAccessChain(node) { - return isPropertyAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); - } - function isElementAccessChain(node) { - return isElementAccessExpression(node) && !!(node.flags & 64 /* OptionalChain */); - } - function isCallChain(node) { - return isCallExpression(node) && !!(node.flags & 64 /* OptionalChain */); - } - function isOptionalChain(node) { - const kind = node.kind; - return !!(node.flags & 64 /* OptionalChain */) && (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */ || kind === 213 /* CallExpression */ || kind === 235 /* NonNullExpression */); - } - function isOptionalChainRoot(node) { - return isOptionalChain(node) && !isNonNullExpression(node) && !!node.questionDotToken; - } - function isExpressionOfOptionalChainRoot(node) { - return isOptionalChainRoot(node.parent) && node.parent.expression === node; - } - function isOutermostOptionalChain(node) { - return !isOptionalChain(node.parent) || isOptionalChainRoot(node.parent) || node !== node.parent.expression; - } - function isNullishCoalesce(node) { - return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 61 /* QuestionQuestionToken */; - } - function isConstTypeReference(node) { - return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "const" && !node.typeArguments; - } - function skipPartiallyEmittedExpressions(node) { - return skipOuterExpressions(node, 8 /* PartiallyEmittedExpressions */); - } - function isNonNullChain(node) { - return isNonNullExpression(node) && !!(node.flags & 64 /* OptionalChain */); - } - function isBreakOrContinueStatement(node) { - return node.kind === 252 /* BreakStatement */ || node.kind === 251 /* ContinueStatement */; - } - function isNamedExportBindings(node) { - return node.kind === 280 /* NamespaceExport */ || node.kind === 279 /* NamedExports */; - } - function isUnparsedTextLike(node) { - switch (node.kind) { - case 309 /* UnparsedText */: - case 310 /* UnparsedInternalText */: - return true; - default: - return false; - } - } - function isUnparsedNode(node) { - return isUnparsedTextLike(node) || node.kind === 307 /* UnparsedPrologue */ || node.kind === 311 /* UnparsedSyntheticReference */; - } - function isJSDocPropertyLikeTag(node) { - return node.kind === 355 /* JSDocPropertyTag */ || node.kind === 348 /* JSDocParameterTag */; - } - function isNode(node) { - return isNodeKind(node.kind); - } - function isNodeKind(kind) { - return kind >= 166 /* FirstNode */; - } - function isTokenKind(kind) { - return kind >= 0 /* FirstToken */ && kind <= 165 /* LastToken */; - } - function isToken(n) { - return isTokenKind(n.kind); - } - function isNodeArray(array) { - return hasProperty(array, "pos") && hasProperty(array, "end"); - } - function isLiteralKind(kind) { - return 9 /* FirstLiteralToken */ <= kind && kind <= 15 /* LastLiteralToken */; - } - function isLiteralExpression(node) { - return isLiteralKind(node.kind); - } - function isLiteralExpressionOfObject(node) { - switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: - case 14 /* RegularExpressionLiteral */: - case 218 /* FunctionExpression */: - case 231 /* ClassExpression */: - return true; - } - return false; - } - function isTemplateLiteralKind(kind) { - return 15 /* FirstTemplateToken */ <= kind && kind <= 18 /* LastTemplateToken */; - } - function isTemplateLiteralToken(node) { - return isTemplateLiteralKind(node.kind); - } - function isTemplateMiddleOrTemplateTail(node) { - const kind = node.kind; - return kind === 17 /* TemplateMiddle */ || kind === 18 /* TemplateTail */; - } - function isImportOrExportSpecifier(node) { - return isImportSpecifier(node) || isExportSpecifier(node); - } - function isTypeOnlyImportDeclaration(node) { - switch (node.kind) { - case 276 /* ImportSpecifier */: - return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 274 /* NamespaceImport */: - return node.parent.isTypeOnly; - case 273 /* ImportClause */: - case 271 /* ImportEqualsDeclaration */: - return node.isTypeOnly; - } - return false; - } - function isTypeOnlyExportDeclaration(node) { - switch (node.kind) { - case 281 /* ExportSpecifier */: - return node.isTypeOnly || node.parent.parent.isTypeOnly; - case 278 /* ExportDeclaration */: - return node.isTypeOnly && !!node.moduleSpecifier && !node.exportClause; - case 280 /* NamespaceExport */: - return node.parent.isTypeOnly; - } - return false; - } - function isTypeOnlyImportOrExportDeclaration(node) { - return isTypeOnlyImportDeclaration(node) || isTypeOnlyExportDeclaration(node); - } - function isAssertionKey(node) { - return isStringLiteral(node) || isIdentifier(node); - } - function isStringTextContainingNode(node) { - return node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind); - } - function isGeneratedIdentifier(node) { - var _a; - return isIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0; - } - function isGeneratedPrivateIdentifier(node) { - var _a; - return isPrivateIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0; - } - function isFileLevelReservedGeneratedIdentifier(node) { - const flags = node.emitNode.autoGenerate.flags; - return !!(flags & 32 /* FileLevel */) && !!(flags & 16 /* Optimistic */) && !!(flags & 8 /* ReservedInNestedScopes */); - } - function isPrivateIdentifierClassElementDeclaration(node) { - return (isPropertyDeclaration(node) || isMethodOrAccessor(node)) && isPrivateIdentifier(node.name); - } - function isPrivateIdentifierPropertyAccessExpression(node) { - return isPropertyAccessExpression(node) && isPrivateIdentifier(node.name); - } - function isModifierKind(token) { - switch (token) { - case 128 /* AbstractKeyword */: - case 129 /* AccessorKeyword */: - case 134 /* AsyncKeyword */: - case 87 /* ConstKeyword */: - case 138 /* DeclareKeyword */: - case 90 /* DefaultKeyword */: - case 95 /* ExportKeyword */: - case 103 /* InKeyword */: - case 125 /* PublicKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - case 148 /* ReadonlyKeyword */: - case 126 /* StaticKeyword */: - case 147 /* OutKeyword */: - case 164 /* OverrideKeyword */: - return true; - } - return false; - } - function isParameterPropertyModifier(kind) { - return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); - } - function isClassMemberModifier(idToken) { - return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; - } - function isModifier(node) { - return isModifierKind(node.kind); - } - function isEntityName(node) { - const kind = node.kind; - return kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; - } - function isPropertyName(node) { - const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 81 /* PrivateIdentifier */ || kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */ || kind === 167 /* ComputedPropertyName */; - } - function isBindingName(node) { - const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 206 /* ObjectBindingPattern */ || kind === 207 /* ArrayBindingPattern */; - } - function isFunctionLike(node) { - return !!node && isFunctionLikeKind(node.kind); - } - function isFunctionLikeOrClassStaticBlockDeclaration(node) { - return !!node && (isFunctionLikeKind(node.kind) || isClassStaticBlockDeclaration(node)); - } - function isFunctionLikeDeclaration(node) { - return node && isFunctionLikeDeclarationKind(node.kind); - } - function isBooleanLiteral(node) { - return node.kind === 112 /* TrueKeyword */ || node.kind === 97 /* FalseKeyword */; - } - function isFunctionLikeDeclarationKind(kind) { - switch (kind) { - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return true; - default: - return false; - } - } - function isFunctionLikeKind(kind) { - switch (kind) { - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 330 /* JSDocSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 324 /* JSDocFunctionType */: - case 185 /* ConstructorType */: - return true; - default: - return isFunctionLikeDeclarationKind(kind); - } - } - function isFunctionOrModuleBlock(node) { - return isSourceFile(node) || isModuleBlock(node) || isBlock(node) && isFunctionLike(node.parent); - } - function isClassElement(node) { - const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 240 /* SemicolonClassElement */; - } - function isClassLike(node) { - return node && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */); - } - function isAccessor(node) { - return node && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */); - } - function isAutoAccessorPropertyDeclaration(node) { - return isPropertyDeclaration(node) && hasAccessorModifier(node); - } - function isMethodOrAccessor(node) { - switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return true; - default: - return false; - } - } - function isNamedClassElement(node) { - switch (node.kind) { - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 172 /* PropertyDeclaration */: - return true; - default: - return false; - } - } - function isModifierLike(node) { - return isModifier(node) || isDecorator(node); - } - function isTypeElement(node) { - const kind = node.kind; - return kind === 180 /* ConstructSignature */ || kind === 179 /* CallSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */ || kind === 181 /* IndexSignature */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; - } - function isClassOrTypeElement(node) { - return isTypeElement(node) || isClassElement(node); - } - function isObjectLiteralElementLike(node) { - const kind = node.kind; - return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 305 /* SpreadAssignment */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; - } - function isTypeNode(node) { - return isTypeNodeKind(node.kind); - } - function isFunctionOrConstructorTypeNode(node) { - switch (node.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - return true; - } - return false; - } - function isBindingPattern(node) { - if (node) { - const kind = node.kind; - return kind === 207 /* ArrayBindingPattern */ || kind === 206 /* ObjectBindingPattern */; - } - return false; - } - function isAssignmentPattern(node) { - const kind = node.kind; - return kind === 209 /* ArrayLiteralExpression */ || kind === 210 /* ObjectLiteralExpression */; - } - function isArrayBindingElement(node) { - const kind = node.kind; - return kind === 208 /* BindingElement */ || kind === 232 /* OmittedExpression */; - } - function isDeclarationBindingElement(bindingElement) { - switch (bindingElement.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - return true; - } - return false; - } - function isBindingOrAssignmentElement(node) { - return isVariableDeclaration(node) || isParameter(node) || isObjectBindingOrAssignmentElement(node) || isArrayBindingOrAssignmentElement(node); - } - function isBindingOrAssignmentPattern(node) { - return isObjectBindingOrAssignmentPattern(node) || isArrayBindingOrAssignmentPattern(node); - } - function isObjectBindingOrAssignmentPattern(node) { - switch (node.kind) { - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: - return true; - } - return false; - } - function isObjectBindingOrAssignmentElement(node) { - switch (node.kind) { - case 208 /* BindingElement */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: - return true; - } - return false; - } - function isArrayBindingOrAssignmentPattern(node) { - switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: - return true; - } - return false; - } - function isArrayBindingOrAssignmentElement(node) { - switch (node.kind) { - case 208 /* BindingElement */: - case 232 /* OmittedExpression */: - case 230 /* SpreadElement */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - return true; - } - return isAssignmentExpression( - node, - /*excludeCompoundAssignment*/ - true - ); - } - function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) { - const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */ || kind === 205 /* ImportType */; - } - function isPropertyAccessOrQualifiedName(node) { - const kind = node.kind; - return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; - } - function isCallLikeExpression(node) { - switch (node.kind) { - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 170 /* Decorator */: - return true; - default: - return false; - } - } - function isCallOrNewExpression(node) { - return node.kind === 213 /* CallExpression */ || node.kind === 214 /* NewExpression */; - } - function isTemplateLiteral(node) { - const kind = node.kind; - return kind === 228 /* TemplateExpression */ || kind === 15 /* NoSubstitutionTemplateLiteral */; - } - function isLeftHandSideExpression(node) { - return isLeftHandSideExpressionKind(skipPartiallyEmittedExpressions(node).kind); - } - function isLeftHandSideExpressionKind(kind) { - switch (kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 214 /* NewExpression */: - case 213 /* CallExpression */: - case 284 /* JsxElement */: - case 285 /* JsxSelfClosingElement */: - case 288 /* JsxFragment */: - case 215 /* TaggedTemplateExpression */: - case 209 /* ArrayLiteralExpression */: - case 217 /* ParenthesizedExpression */: - case 210 /* ObjectLiteralExpression */: - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 80 /* Identifier */: - case 81 /* PrivateIdentifier */: - case 14 /* RegularExpressionLiteral */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: - case 97 /* FalseKeyword */: - case 106 /* NullKeyword */: - case 110 /* ThisKeyword */: - case 112 /* TrueKeyword */: - case 108 /* SuperKeyword */: - case 235 /* NonNullExpression */: - case 233 /* ExpressionWithTypeArguments */: - case 236 /* MetaProperty */: - case 102 /* ImportKeyword */: - case 282 /* MissingDeclaration */: - return true; - default: - return false; - } - } - function isUnaryExpression(node) { - return isUnaryExpressionKind(skipPartiallyEmittedExpressions(node).kind); - } - function isUnaryExpressionKind(kind) { - switch (kind) { - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - case 220 /* DeleteExpression */: - case 221 /* TypeOfExpression */: - case 222 /* VoidExpression */: - case 223 /* AwaitExpression */: - case 216 /* TypeAssertionExpression */: - return true; - default: - return isLeftHandSideExpressionKind(kind); - } - } - function isUnaryExpressionWithWrite(expr) { - switch (expr.kind) { - case 225 /* PostfixUnaryExpression */: - return true; - case 224 /* PrefixUnaryExpression */: - return expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; - default: - return false; - } - } - function isLiteralTypeLiteral(node) { - switch (node.kind) { - case 106 /* NullKeyword */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 224 /* PrefixUnaryExpression */: - return true; - default: - return isLiteralExpression(node); - } - } - function isExpression(node) { - return isExpressionKind(skipPartiallyEmittedExpressions(node).kind); - } - function isExpressionKind(kind) { - switch (kind) { - case 227 /* ConditionalExpression */: - case 229 /* YieldExpression */: - case 219 /* ArrowFunction */: - case 226 /* BinaryExpression */: - case 230 /* SpreadElement */: - case 234 /* AsExpression */: - case 232 /* OmittedExpression */: - case 361 /* CommaListExpression */: - case 360 /* PartiallyEmittedExpression */: - case 238 /* SatisfiesExpression */: - return true; - default: - return isUnaryExpressionKind(kind); - } - } - function isAssertionExpression(node) { - const kind = node.kind; - return kind === 216 /* TypeAssertionExpression */ || kind === 234 /* AsExpression */; - } - function isNotEmittedOrPartiallyEmittedNode(node) { - return isNotEmittedStatement(node) || isPartiallyEmittedExpression(node); - } - function isIterationStatement(node, lookInLabeledStatements) { - switch (node.kind) { - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - return true; - case 256 /* LabeledStatement */: - return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); - } - return false; - } - function isScopeMarker(node) { - return isExportAssignment(node) || isExportDeclaration(node); - } - function hasScopeMarker(statements) { - return some(statements, isScopeMarker); - } - function needsScopeMarker(result) { - return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 1 /* Export */) && !isAmbientModule(result); - } - function isExternalModuleIndicator(result) { - return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); - } - function isForInOrOfStatement(node) { - return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */; - } - function isConciseBody(node) { - return isBlock(node) || isExpression(node); - } - function isFunctionBody(node) { - return isBlock(node); - } - function isForInitializer(node) { - return isVariableDeclarationList(node) || isExpression(node); - } - function isModuleBody(node) { - const kind = node.kind; - return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */ || kind === 80 /* Identifier */; - } - function isNamespaceBody(node) { - const kind = node.kind; - return kind === 268 /* ModuleBlock */ || kind === 267 /* ModuleDeclaration */; - } - function isJSDocNamespaceBody(node) { - const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 267 /* ModuleDeclaration */; - } - function isNamedImportBindings(node) { - const kind = node.kind; - return kind === 275 /* NamedImports */ || kind === 274 /* NamespaceImport */; - } - function isModuleOrEnumDeclaration(node) { - return node.kind === 267 /* ModuleDeclaration */ || node.kind === 266 /* EnumDeclaration */; - } - function canHaveSymbol(node) { - switch (node.kind) { - case 219 /* ArrowFunction */: - case 226 /* BinaryExpression */: - case 208 /* BindingElement */: - case 213 /* CallExpression */: - case 179 /* CallSignature */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 175 /* ClassStaticBlockDeclaration */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - case 212 /* ElementAccessExpression */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: - case 281 /* ExportSpecifier */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 177 /* GetAccessor */: - case 80 /* Identifier */: - case 273 /* ImportClause */: - case 271 /* ImportEqualsDeclaration */: - case 276 /* ImportSpecifier */: - case 181 /* IndexSignature */: - case 264 /* InterfaceDeclaration */: - case 345 /* JSDocCallbackTag */: - case 347 /* JSDocEnumTag */: - case 324 /* JSDocFunctionType */: - case 348 /* JSDocParameterTag */: - case 355 /* JSDocPropertyTag */: - case 330 /* JSDocSignature */: - case 353 /* JSDocTypedefTag */: - case 329 /* JSDocTypeLiteral */: - case 291 /* JsxAttribute */: - case 292 /* JsxAttributes */: - case 293 /* JsxSpreadAttribute */: - case 200 /* MappedType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 267 /* ModuleDeclaration */: - case 202 /* NamedTupleMember */: - case 280 /* NamespaceExport */: - case 270 /* NamespaceExportDeclaration */: - case 274 /* NamespaceImport */: - case 214 /* NewExpression */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 9 /* NumericLiteral */: - case 210 /* ObjectLiteralExpression */: - case 169 /* Parameter */: - case 211 /* PropertyAccessExpression */: - case 303 /* PropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 178 /* SetAccessor */: - case 304 /* ShorthandPropertyAssignment */: - case 312 /* SourceFile */: - case 305 /* SpreadAssignment */: - case 11 /* StringLiteral */: - case 265 /* TypeAliasDeclaration */: - case 187 /* TypeLiteral */: - case 168 /* TypeParameter */: - case 260 /* VariableDeclaration */: - return true; - default: - return false; - } - } - function canHaveLocals(node) { - switch (node.kind) { - case 219 /* ArrowFunction */: - case 241 /* Block */: - case 179 /* CallSignature */: - case 269 /* CaseBlock */: - case 299 /* CatchClause */: - case 175 /* ClassStaticBlockDeclaration */: - case 194 /* ConditionalType */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 177 /* GetAccessor */: - case 181 /* IndexSignature */: - case 345 /* JSDocCallbackTag */: - case 347 /* JSDocEnumTag */: - case 324 /* JSDocFunctionType */: - case 330 /* JSDocSignature */: - case 353 /* JSDocTypedefTag */: - case 200 /* MappedType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 267 /* ModuleDeclaration */: - case 178 /* SetAccessor */: - case 312 /* SourceFile */: - case 265 /* TypeAliasDeclaration */: - return true; - default: - return false; - } - } - function isDeclarationKind(kind) { - return kind === 219 /* ArrowFunction */ || kind === 208 /* BindingElement */ || kind === 263 /* ClassDeclaration */ || kind === 231 /* ClassExpression */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 176 /* Constructor */ || kind === 266 /* EnumDeclaration */ || kind === 306 /* EnumMember */ || kind === 281 /* ExportSpecifier */ || kind === 262 /* FunctionDeclaration */ || kind === 218 /* FunctionExpression */ || kind === 177 /* GetAccessor */ || kind === 273 /* ImportClause */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 276 /* ImportSpecifier */ || kind === 264 /* InterfaceDeclaration */ || kind === 291 /* JsxAttribute */ || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 267 /* ModuleDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 274 /* NamespaceImport */ || kind === 280 /* NamespaceExport */ || kind === 169 /* Parameter */ || kind === 303 /* PropertyAssignment */ || kind === 172 /* PropertyDeclaration */ || kind === 171 /* PropertySignature */ || kind === 178 /* SetAccessor */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 265 /* TypeAliasDeclaration */ || kind === 168 /* TypeParameter */ || kind === 260 /* VariableDeclaration */ || kind === 353 /* JSDocTypedefTag */ || kind === 345 /* JSDocCallbackTag */ || kind === 355 /* JSDocPropertyTag */; - } - function isDeclarationStatementKind(kind) { - return kind === 262 /* FunctionDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 270 /* NamespaceExportDeclaration */; - } - function isStatementKindButNotDeclarationKind(kind) { - return kind === 252 /* BreakStatement */ || kind === 251 /* ContinueStatement */ || kind === 259 /* DebuggerStatement */ || kind === 246 /* DoStatement */ || kind === 244 /* ExpressionStatement */ || kind === 242 /* EmptyStatement */ || kind === 249 /* ForInStatement */ || kind === 250 /* ForOfStatement */ || kind === 248 /* ForStatement */ || kind === 245 /* IfStatement */ || kind === 256 /* LabeledStatement */ || kind === 253 /* ReturnStatement */ || kind === 255 /* SwitchStatement */ || kind === 257 /* ThrowStatement */ || kind === 258 /* TryStatement */ || kind === 243 /* VariableStatement */ || kind === 247 /* WhileStatement */ || kind === 254 /* WithStatement */ || kind === 359 /* NotEmittedStatement */; - } - function isDeclaration(node) { - if (node.kind === 168 /* TypeParameter */) { - return node.parent && node.parent.kind !== 352 /* JSDocTemplateTag */ || isInJSFile(node); - } - return isDeclarationKind(node.kind); - } - function isDeclarationStatement(node) { - return isDeclarationStatementKind(node.kind); - } - function isStatementButNotDeclaration(node) { - return isStatementKindButNotDeclarationKind(node.kind); - } - function isStatement(node) { - const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || isBlockStatement(node); - } - function isBlockStatement(node) { - if (node.kind !== 241 /* Block */) - return false; - if (node.parent !== void 0) { - if (node.parent.kind === 258 /* TryStatement */ || node.parent.kind === 299 /* CatchClause */) { - return false; - } - } - return !isFunctionBlock(node); - } - function isStatementOrBlock(node) { - const kind = node.kind; - return isStatementKindButNotDeclarationKind(kind) || isDeclarationStatementKind(kind) || kind === 241 /* Block */; - } - function isModuleReference(node) { - const kind = node.kind; - return kind === 283 /* ExternalModuleReference */ || kind === 166 /* QualifiedName */ || kind === 80 /* Identifier */; - } - function isJsxTagNameExpression(node) { - const kind = node.kind; - return kind === 110 /* ThisKeyword */ || kind === 80 /* Identifier */ || kind === 211 /* PropertyAccessExpression */ || kind === 295 /* JsxNamespacedName */; - } - function isJsxChild(node) { - const kind = node.kind; - return kind === 284 /* JsxElement */ || kind === 294 /* JsxExpression */ || kind === 285 /* JsxSelfClosingElement */ || kind === 12 /* JsxText */ || kind === 288 /* JsxFragment */; - } - function isJsxAttributeLike(node) { - const kind = node.kind; - return kind === 291 /* JsxAttribute */ || kind === 293 /* JsxSpreadAttribute */; - } - function isStringLiteralOrJsxExpression(node) { - const kind = node.kind; - return kind === 11 /* StringLiteral */ || kind === 294 /* JsxExpression */; - } - function isJsxOpeningLikeElement(node) { - const kind = node.kind; - return kind === 286 /* JsxOpeningElement */ || kind === 285 /* JsxSelfClosingElement */; - } - function isCaseOrDefaultClause(node) { - const kind = node.kind; - return kind === 296 /* CaseClause */ || kind === 297 /* DefaultClause */; - } - function isJSDocNode(node) { - return node.kind >= 316 /* FirstJSDocNode */ && node.kind <= 357 /* LastJSDocNode */; - } - function isJSDocCommentContainingNode(node) { - return node.kind === 327 /* JSDoc */ || node.kind === 326 /* JSDocNamepathType */ || node.kind === 328 /* JSDocText */ || isJSDocLinkLike(node) || isJSDocTag(node) || isJSDocTypeLiteral(node) || isJSDocSignature(node); - } - function isJSDocTag(node) { - return node.kind >= 334 /* FirstJSDocTagNode */ && node.kind <= 357 /* LastJSDocTagNode */; - } - function isSetAccessor(node) { - return node.kind === 178 /* SetAccessor */; - } - function isGetAccessor(node) { - return node.kind === 177 /* GetAccessor */; - } - function hasJSDocNodes(node) { - if (!canHaveJSDoc(node)) - return false; - const { jsDoc } = node; - return !!jsDoc && jsDoc.length > 0; - } - function hasType(node) { - return !!node.type; - } - function hasInitializer(node) { - return !!node.initializer; - } - function hasOnlyExpressionInitializer(node) { - switch (node.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: - case 303 /* PropertyAssignment */: - case 306 /* EnumMember */: - return true; - default: - return false; - } - } - function isObjectLiteralElement(node) { - return node.kind === 291 /* JsxAttribute */ || node.kind === 293 /* JsxSpreadAttribute */ || isObjectLiteralElementLike(node); - } - function isTypeReferenceType(node) { - return node.kind === 183 /* TypeReference */ || node.kind === 233 /* ExpressionWithTypeArguments */; - } - function guessIndentation(lines) { - let indentation = MAX_SMI_X86; - for (const line of lines) { - if (!line.length) { - continue; - } - let i = 0; - for (; i < line.length && i < indentation; i++) { - if (!isWhiteSpaceLike(line.charCodeAt(i))) { - break; - } - } - if (i < indentation) { - indentation = i; - } - if (indentation === 0) { - return 0; - } - } - return indentation === MAX_SMI_X86 ? void 0 : indentation; - } - function isStringLiteralLike(node) { - return node.kind === 11 /* StringLiteral */ || node.kind === 15 /* NoSubstitutionTemplateLiteral */; - } - function isJSDocLinkLike(node) { - return node.kind === 331 /* JSDocLink */ || node.kind === 332 /* JSDocLinkCode */ || node.kind === 333 /* JSDocLinkPlain */; - } - function hasRestParameter(s) { - const last2 = lastOrUndefined(s.parameters); - return !!last2 && isRestParameter(last2); - } - function isRestParameter(node) { - const type = isJSDocParameterTag(node) ? node.typeExpression && node.typeExpression.type : node.type; - return node.dotDotDotToken !== void 0 || !!type && type.kind === 325 /* JSDocVariadicType */; - } - var unchangedTextChangeRange, supportedLocaleDirectories, MAX_SMI_X86; - var init_utilitiesPublic = __esm({ - "src/compiler/utilitiesPublic.ts"() { - "use strict"; - init_ts2(); - unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); - supportedLocaleDirectories = ["cs", "de", "es", "fr", "it", "ja", "ko", "pl", "pt-br", "ru", "tr", "zh-cn", "zh-tw"]; - MAX_SMI_X86 = 1073741823; - } - }); - - // src/compiler/utilities.ts - function getDeclarationOfKind(symbol, kind) { - const declarations = symbol.declarations; - if (declarations) { - for (const declaration of declarations) { - if (declaration.kind === kind) { - return declaration; - } - } - } - return void 0; - } - function getDeclarationsOfKind(symbol, kind) { - return filter(symbol.declarations || emptyArray, (d) => d.kind === kind); - } - function createSymbolTable(symbols) { - const result = /* @__PURE__ */ new Map(); - if (symbols) { - for (const symbol of symbols) { - result.set(symbol.escapedName, symbol); - } - } - return result; - } - function isTransientSymbol(symbol) { - return (symbol.flags & 33554432 /* Transient */) !== 0; - } - function createSingleLineStringWriter() { - var str = ""; - const writeText = (text) => str += text; - return { - getText: () => str, - write: writeText, - rawWrite: writeText, - writeKeyword: writeText, - writeOperator: writeText, - writePunctuation: writeText, - writeSpace: writeText, - writeStringLiteral: writeText, - writeLiteral: writeText, - writeParameter: writeText, - writeProperty: writeText, - writeSymbol: (s, _) => writeText(s), - writeTrailingSemicolon: writeText, - writeComment: writeText, - getTextPos: () => str.length, - getLine: () => 0, - getColumn: () => 0, - getIndent: () => 0, - isAtStartOfLine: () => false, - hasTrailingComment: () => false, - hasTrailingWhitespace: () => !!str.length && isWhiteSpaceLike(str.charCodeAt(str.length - 1)), - // Completely ignore indentation for string writers. And map newlines to - // a single space. - writeLine: () => str += " ", - increaseIndent: noop, - decreaseIndent: noop, - clear: () => str = "" - }; - } - function changesAffectModuleResolution(oldOptions, newOptions) { - return oldOptions.configFilePath !== newOptions.configFilePath || optionsHaveModuleResolutionChanges(oldOptions, newOptions); - } - function optionsHaveModuleResolutionChanges(oldOptions, newOptions) { - return optionsHaveChanges(oldOptions, newOptions, moduleResolutionOptionDeclarations); - } - function changesAffectingProgramStructure(oldOptions, newOptions) { - return optionsHaveChanges(oldOptions, newOptions, optionsAffectingProgramStructure); - } - function optionsHaveChanges(oldOptions, newOptions, optionDeclarations2) { - return oldOptions !== newOptions && optionDeclarations2.some((o) => !isJsonEqual(getCompilerOptionValue(oldOptions, o), getCompilerOptionValue(newOptions, o))); - } - function forEachAncestor(node, callback) { - while (true) { - const res = callback(node); - if (res === "quit") - return void 0; - if (res !== void 0) - return res; - if (isSourceFile(node)) - return void 0; - node = node.parent; - } - } - function forEachEntry(map2, callback) { - const iterator = map2.entries(); - for (const [key, value] of iterator) { - const result = callback(value, key); - if (result) { - return result; - } - } - return void 0; - } - function forEachKey(map2, callback) { - const iterator = map2.keys(); - for (const key of iterator) { - const result = callback(key); - if (result) { - return result; - } - } - return void 0; - } - function copyEntries(source, target) { - source.forEach((value, key) => { - target.set(key, value); - }); - } - function usingSingleLineStringWriter(action) { - const oldString = stringWriter.getText(); - try { - action(stringWriter); - return stringWriter.getText(); - } finally { - stringWriter.clear(); - stringWriter.writeKeyword(oldString); - } - } - function getFullWidth(node) { - return node.end - node.pos; - } - function getResolvedModule(sourceFile, moduleNameText, mode) { - var _a, _b; - return (_b = (_a = sourceFile == null ? void 0 : sourceFile.resolvedModules) == null ? void 0 : _a.get(moduleNameText, mode)) == null ? void 0 : _b.resolvedModule; - } - function setResolvedModule(sourceFile, moduleNameText, resolvedModule, mode) { - if (!sourceFile.resolvedModules) { - sourceFile.resolvedModules = createModeAwareCache(); - } - sourceFile.resolvedModules.set(moduleNameText, mode, resolvedModule); - } - function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective, mode) { - if (!sourceFile.resolvedTypeReferenceDirectiveNames) { - sourceFile.resolvedTypeReferenceDirectiveNames = createModeAwareCache(); - } - sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, mode, resolvedTypeReferenceDirective); - } - function getResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, mode) { - var _a, _b; - return (_b = (_a = sourceFile == null ? void 0 : sourceFile.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _a.get(typeReferenceDirectiveName, mode)) == null ? void 0 : _b.resolvedTypeReferenceDirective; - } - function projectReferenceIsEqualTo(oldRef, newRef) { - return oldRef.path === newRef.path && !oldRef.prepend === !newRef.prepend && !oldRef.circular === !newRef.circular; - } - function moduleResolutionIsEqualTo(oldResolution, newResolution) { - return oldResolution === newResolution || oldResolution.resolvedModule === newResolution.resolvedModule || !!oldResolution.resolvedModule && !!newResolution.resolvedModule && oldResolution.resolvedModule.isExternalLibraryImport === newResolution.resolvedModule.isExternalLibraryImport && oldResolution.resolvedModule.extension === newResolution.resolvedModule.extension && oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName && oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath && packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId) && oldResolution.node10Result === newResolution.node10Result; - } - function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageName) { - var _a, _b; - const node10Result = (_b = (_a = sourceFile.resolvedModules) == null ? void 0 : _a.get(moduleReference, mode)) == null ? void 0 : _b.node10Result; - const result = node10Result ? chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings, - node10Result, - node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageName)}` : packageName - ) : host.typesPackageExists(packageName) ? chainDiagnosticMessages( - /*details*/ - void 0, - 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, - packageName, - mangleScopedPackageName(packageName) - ) : host.packageBundlesTypes(packageName) ? chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1, - packageName, - moduleReference - ) : chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, - moduleReference, - mangleScopedPackageName(packageName) - ); - if (result) - result.repopulateInfo = () => ({ moduleReference, mode, packageName: packageName === moduleReference ? void 0 : packageName }); - return result; - } - function packageIdIsEqual(a, b) { - return a === b || !!a && !!b && a.name === b.name && a.subModuleName === b.subModuleName && a.version === b.version; - } - function packageIdToPackageName({ name, subModuleName }) { - return subModuleName ? `${name}/${subModuleName}` : name; - } - function packageIdToString(packageId) { - return `${packageIdToPackageName(packageId)}@${packageId.version}`; - } - function typeDirectiveIsEqualTo(oldResolution, newResolution) { - return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath; - } - function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolutions, comparer, nameAndModeGetter) { - Debug.assert(names.length === newResolutions.length); - for (let i = 0; i < names.length; i++) { - const newResolution = newResolutions[i]; - const entry = names[i]; - const name = nameAndModeGetter.getName(entry); - const mode = nameAndModeGetter.getMode(entry, newSourceFile); - const oldResolution = oldResolutions && oldResolutions.get(name, mode); - const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution; - if (changed) { - return true; - } - } - return false; - } - function containsParseError(node) { - aggregateChildData(node); - return (node.flags & 1048576 /* ThisNodeOrAnySubNodesHasError */) !== 0; - } - function aggregateChildData(node) { - if (!(node.flags & 2097152 /* HasAggregatedChildData */)) { - const thisNodeOrAnySubNodesHasError = (node.flags & 262144 /* ThisNodeHasError */) !== 0 || forEachChild(node, containsParseError); - if (thisNodeOrAnySubNodesHasError) { - node.flags |= 1048576 /* ThisNodeOrAnySubNodesHasError */; - } - node.flags |= 2097152 /* HasAggregatedChildData */; - } - } - function getSourceFileOfNode(node) { - while (node && node.kind !== 312 /* SourceFile */) { - node = node.parent; - } - return node; - } - function getSourceFileOfModule(module2) { - return getSourceFileOfNode(module2.valueDeclaration || getNonAugmentationDeclaration(module2)); - } - function isPlainJsFile(file, checkJs) { - return !!file && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */) && !file.checkJsDirective && checkJs === void 0; - } - function isStatementWithLocals(node) { - switch (node.kind) { - case 241 /* Block */: - case 269 /* CaseBlock */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - return true; - } - return false; - } - function getStartPositionOfLine(line, sourceFile) { - Debug.assert(line >= 0); - return getLineStarts(sourceFile)[line]; - } - function nodePosToString(node) { - const file = getSourceFileOfNode(node); - const loc = getLineAndCharacterOfPosition(file, node.pos); - return `${file.fileName}(${loc.line + 1},${loc.character + 1})`; - } - function getEndLinePosition(line, sourceFile) { - Debug.assert(line >= 0); - const lineStarts = getLineStarts(sourceFile); - const lineIndex = line; - const sourceText = sourceFile.text; - if (lineIndex + 1 === lineStarts.length) { - return sourceText.length - 1; - } else { - const start = lineStarts[lineIndex]; - let pos = lineStarts[lineIndex + 1] - 1; - Debug.assert(isLineBreak(sourceText.charCodeAt(pos))); - while (start <= pos && isLineBreak(sourceText.charCodeAt(pos))) { - pos--; - } - return pos; - } - } - function isFileLevelUniqueName(sourceFile, name, hasGlobalName) { - return !(hasGlobalName && hasGlobalName(name)) && !sourceFile.identifiers.has(name); - } - function nodeIsMissing(node) { - if (node === void 0) { - return true; - } - return node.pos === node.end && node.pos >= 0 && node.kind !== 1 /* EndOfFileToken */; - } - function nodeIsPresent(node) { - return !nodeIsMissing(node); - } - function isGrammarError(parent2, child) { - if (isTypeParameterDeclaration(parent2)) - return child === parent2.expression; - if (isClassStaticBlockDeclaration(parent2)) - return child === parent2.modifiers; - if (isPropertySignature(parent2)) - return child === parent2.initializer; - if (isPropertyDeclaration(parent2)) - return child === parent2.questionToken && isAutoAccessorPropertyDeclaration(parent2); - if (isPropertyAssignment(parent2)) - return child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike); - if (isShorthandPropertyAssignment(parent2)) - return child === parent2.equalsToken || child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike); - if (isMethodDeclaration(parent2)) - return child === parent2.exclamationToken; - if (isConstructorDeclaration(parent2)) - return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration); - if (isGetAccessorDeclaration(parent2)) - return child === parent2.typeParameters || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration); - if (isSetAccessorDeclaration(parent2)) - return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration); - if (isNamespaceExportDeclaration(parent2)) - return child === parent2.modifiers || isGrammarErrorElement(parent2.modifiers, child, isModifierLike); - return false; - } - function isGrammarErrorElement(nodeArray, child, isElement) { - if (!nodeArray || isArray(child) || !isElement(child)) - return false; - return contains(nodeArray, child); - } - function insertStatementsAfterPrologue(to, from, isPrologueDirective2) { - if (from === void 0 || from.length === 0) - return to; - let statementIndex = 0; - for (; statementIndex < to.length; ++statementIndex) { - if (!isPrologueDirective2(to[statementIndex])) { - break; - } - } - to.splice(statementIndex, 0, ...from); - return to; - } - function insertStatementAfterPrologue(to, statement, isPrologueDirective2) { - if (statement === void 0) - return to; - let statementIndex = 0; - for (; statementIndex < to.length; ++statementIndex) { - if (!isPrologueDirective2(to[statementIndex])) { - break; - } - } - to.splice(statementIndex, 0, statement); - return to; - } - function isAnyPrologueDirective(node) { - return isPrologueDirective(node) || !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); - } - function insertStatementsAfterStandardPrologue(to, from) { - return insertStatementsAfterPrologue(to, from, isPrologueDirective); - } - function insertStatementsAfterCustomPrologue(to, from) { - return insertStatementsAfterPrologue(to, from, isAnyPrologueDirective); - } - function insertStatementAfterStandardPrologue(to, statement) { - return insertStatementAfterPrologue(to, statement, isPrologueDirective); - } - function insertStatementAfterCustomPrologue(to, statement) { - return insertStatementAfterPrologue(to, statement, isAnyPrologueDirective); - } - function isRecognizedTripleSlashComment(text, commentPos, commentEnd) { - if (text.charCodeAt(commentPos + 1) === 47 /* slash */ && commentPos + 2 < commentEnd && text.charCodeAt(commentPos + 2) === 47 /* slash */) { - const textSubStr = text.substring(commentPos, commentEnd); - return fullTripleSlashReferencePathRegEx.test(textSubStr) || fullTripleSlashAMDReferencePathRegEx.test(textSubStr) || fullTripleSlashAMDModuleRegEx.test(textSubStr) || fullTripleSlashReferenceTypeReferenceDirectiveRegEx.test(textSubStr) || fullTripleSlashLibReferenceRegEx.test(textSubStr) || defaultLibReferenceRegEx.test(textSubStr) ? true : false; - } - return false; - } - function isPinnedComment(text, start) { - return text.charCodeAt(start + 1) === 42 /* asterisk */ && text.charCodeAt(start + 2) === 33 /* exclamation */; - } - function createCommentDirectivesMap(sourceFile, commentDirectives) { - const directivesByLine = new Map( - commentDirectives.map((commentDirective) => [ - `${getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line}`, - commentDirective - ]) - ); - const usedLines = /* @__PURE__ */ new Map(); - return { getUnusedExpectations, markUsed }; - function getUnusedExpectations() { - return arrayFrom(directivesByLine.entries()).filter(([line, directive]) => directive.type === 0 /* ExpectError */ && !usedLines.get(line)).map(([_, directive]) => directive); - } - function markUsed(line) { - if (!directivesByLine.has(`${line}`)) { - return false; - } - usedLines.set(`${line}`, true); - return true; - } - } - function getTokenPosOfNode(node, sourceFile, includeJsDoc) { - if (nodeIsMissing(node)) { - return node.pos; - } - if (isJSDocNode(node) || node.kind === 12 /* JsxText */) { - return skipTrivia( - (sourceFile || getSourceFileOfNode(node)).text, - node.pos, - /*stopAfterLineBreak*/ - false, - /*stopAtComments*/ - true - ); - } - if (includeJsDoc && hasJSDocNodes(node)) { - return getTokenPosOfNode(node.jsDoc[0], sourceFile); - } - if (node.kind === 358 /* SyntaxList */ && node._children.length > 0) { - return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc); - } - return skipTrivia( - (sourceFile || getSourceFileOfNode(node)).text, - node.pos, - /*stopAfterLineBreak*/ - false, - /*stopAtComments*/ - false, - isInJSDoc(node) - ); - } - function getNonDecoratorTokenPosOfNode(node, sourceFile) { - const lastDecorator = !nodeIsMissing(node) && canHaveModifiers(node) ? findLast(node.modifiers, isDecorator) : void 0; - if (!lastDecorator) { - return getTokenPosOfNode(node, sourceFile); - } - return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, lastDecorator.end); - } - function getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia = false) { - return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia); - } - function isJSDocTypeExpressionOrChild(node) { - return !!findAncestor(node, isJSDocTypeExpression); - } - function isExportNamespaceAsDefaultDeclaration(node) { - return !!(isExportDeclaration(node) && node.exportClause && isNamespaceExport(node.exportClause) && node.exportClause.name.escapedText === "default"); - } - function getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) { - if (nodeIsMissing(node)) { - return ""; - } - let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end); - if (isJSDocTypeExpressionOrChild(node)) { - text = text.split(/\r\n|\n|\r/).map((line) => trimStringStart(line.replace(/^\s*\*/, ""))).join("\n"); - } - return text; - } - function getTextOfNode(node, includeTrivia = false) { - return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); - } - function getPos(range) { - return range.pos; - } - function indexOfNode(nodeArray, node) { - return binarySearch(nodeArray, node, getPos, compareValues); - } - function getEmitFlags(node) { - const emitNode = node.emitNode; - return emitNode && emitNode.flags || 0; - } - function getInternalEmitFlags(node) { - const emitNode = node.emitNode; - return emitNode && emitNode.internalFlags || 0; - } - function getScriptTargetFeatures() { - return new Map(Object.entries({ - Array: new Map(Object.entries({ - es2015: [ - "find", - "findIndex", - "fill", - "copyWithin", - "entries", - "keys", - "values" - ], - es2016: [ - "includes" - ], - es2019: [ - "flat", - "flatMap" - ], - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Iterator: new Map(Object.entries({ - es2015: emptyArray - })), - AsyncIterator: new Map(Object.entries({ - es2015: emptyArray - })), - Atomics: new Map(Object.entries({ - es2017: emptyArray - })), - SharedArrayBuffer: new Map(Object.entries({ - es2017: emptyArray - })), - AsyncIterable: new Map(Object.entries({ - es2018: emptyArray - })), - AsyncIterableIterator: new Map(Object.entries({ - es2018: emptyArray - })), - AsyncGenerator: new Map(Object.entries({ - es2018: emptyArray - })), - AsyncGeneratorFunction: new Map(Object.entries({ - es2018: emptyArray - })), - RegExp: new Map(Object.entries({ - es2015: [ - "flags", - "sticky", - "unicode" - ], - es2018: [ - "dotAll" - ] - })), - Reflect: new Map(Object.entries({ - es2015: [ - "apply", - "construct", - "defineProperty", - "deleteProperty", - "get", - " getOwnPropertyDescriptor", - "getPrototypeOf", - "has", - "isExtensible", - "ownKeys", - "preventExtensions", - "set", - "setPrototypeOf" - ] - })), - ArrayConstructor: new Map(Object.entries({ - es2015: [ - "from", - "of" - ] - })), - ObjectConstructor: new Map(Object.entries({ - es2015: [ - "assign", - "getOwnPropertySymbols", - "keys", - "is", - "setPrototypeOf" - ], - es2017: [ - "values", - "entries", - "getOwnPropertyDescriptors" - ], - es2019: [ - "fromEntries" - ], - es2022: [ - "hasOwn" - ] - })), - NumberConstructor: new Map(Object.entries({ - es2015: [ - "isFinite", - "isInteger", - "isNaN", - "isSafeInteger", - "parseFloat", - "parseInt" - ] - })), - Math: new Map(Object.entries({ - es2015: [ - "clz32", - "imul", - "sign", - "log10", - "log2", - "log1p", - "expm1", - "cosh", - "sinh", - "tanh", - "acosh", - "asinh", - "atanh", - "hypot", - "trunc", - "fround", - "cbrt" - ] - })), - Map: new Map(Object.entries({ - es2015: [ - "entries", - "keys", - "values" - ] - })), - Set: new Map(Object.entries({ - es2015: [ - "entries", - "keys", - "values" - ] - })), - PromiseConstructor: new Map(Object.entries({ - es2015: [ - "all", - "race", - "reject", - "resolve" - ], - es2020: [ - "allSettled" - ], - es2021: [ - "any" - ] - })), - Symbol: new Map(Object.entries({ - es2015: [ - "for", - "keyFor" - ], - es2019: [ - "description" - ] - })), - WeakMap: new Map(Object.entries({ - es2015: [ - "entries", - "keys", - "values" - ] - })), - WeakSet: new Map(Object.entries({ - es2015: [ - "entries", - "keys", - "values" - ] - })), - String: new Map(Object.entries({ - es2015: [ - "codePointAt", - "includes", - "endsWith", - "normalize", - "repeat", - "startsWith", - "anchor", - "big", - "blink", - "bold", - "fixed", - "fontcolor", - "fontsize", - "italics", - "link", - "small", - "strike", - "sub", - "sup" - ], - es2017: [ - "padStart", - "padEnd" - ], - es2019: [ - "trimStart", - "trimEnd", - "trimLeft", - "trimRight" - ], - es2020: [ - "matchAll" - ], - es2021: [ - "replaceAll" - ], - es2022: [ - "at" - ] - })), - StringConstructor: new Map(Object.entries({ - es2015: [ - "fromCodePoint", - "raw" - ] - })), - DateTimeFormat: new Map(Object.entries({ - es2017: [ - "formatToParts" - ] - })), - Promise: new Map(Object.entries({ - es2015: emptyArray, - es2018: [ - "finally" - ] - })), - RegExpMatchArray: new Map(Object.entries({ - es2018: [ - "groups" - ] - })), - RegExpExecArray: new Map(Object.entries({ - es2018: [ - "groups" - ] - })), - Intl: new Map(Object.entries({ - es2018: [ - "PluralRules" - ] - })), - NumberFormat: new Map(Object.entries({ - es2018: [ - "formatToParts" - ] - })), - SymbolConstructor: new Map(Object.entries({ - es2020: [ - "matchAll" - ] - })), - DataView: new Map(Object.entries({ - es2020: [ - "setBigInt64", - "setBigUint64", - "getBigInt64", - "getBigUint64" - ] - })), - BigInt: new Map(Object.entries({ - es2020: emptyArray - })), - RelativeTimeFormat: new Map(Object.entries({ - es2020: [ - "format", - "formatToParts", - "resolvedOptions" - ] - })), - Int8Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Uint8Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Uint8ClampedArray: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Int16Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Uint16Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Int32Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Uint32Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Float32Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Float64Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - BigInt64Array: new Map(Object.entries({ - es2020: emptyArray, - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - BigUint64Array: new Map(Object.entries({ - es2020: emptyArray, - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Error: new Map(Object.entries({ - es2022: [ - "cause" - ] - })) - })); - } - function getLiteralText(node, sourceFile, flags) { - if (sourceFile && canUseOriginalText(node, flags)) { - return getSourceTextOfNodeFromSourceFile(sourceFile, node); - } - switch (node.kind) { - case 11 /* StringLiteral */: { - const escapeText = flags & 2 /* JsxAttributeEscape */ ? escapeJsxAttributeString : flags & 1 /* NeverAsciiEscape */ || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? escapeString : escapeNonAsciiString; - if (node.singleQuote) { - return "'" + escapeText(node.text, 39 /* singleQuote */) + "'"; - } else { - return '"' + escapeText(node.text, 34 /* doubleQuote */) + '"'; - } - } - case 15 /* NoSubstitutionTemplateLiteral */: - case 16 /* TemplateHead */: - case 17 /* TemplateMiddle */: - case 18 /* TemplateTail */: { - const escapeText = flags & 1 /* NeverAsciiEscape */ || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? escapeString : escapeNonAsciiString; - const rawText = node.rawText ?? escapeTemplateSubstitution(escapeText(node.text, 96 /* backtick */)); - switch (node.kind) { - case 15 /* NoSubstitutionTemplateLiteral */: - return "`" + rawText + "`"; - case 16 /* TemplateHead */: - return "`" + rawText + "${"; - case 17 /* TemplateMiddle */: - return "}" + rawText + "${"; - case 18 /* TemplateTail */: - return "}" + rawText + "`"; - } - break; - } - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - return node.text; - case 14 /* RegularExpressionLiteral */: - if (flags & 4 /* TerminateUnterminatedLiterals */ && node.isUnterminated) { - return node.text + (node.text.charCodeAt(node.text.length - 1) === 92 /* backslash */ ? " /" : "/"); - } - return node.text; - } - return Debug.fail(`Literal kind '${node.kind}' not accounted for.`); - } - function canUseOriginalText(node, flags) { - if (nodeIsSynthesized(node) || !node.parent || flags & 4 /* TerminateUnterminatedLiterals */ && node.isUnterminated) { - return false; - } - if (isNumericLiteral(node)) { - if (node.numericLiteralFlags & 26656 /* IsInvalid */) { - return false; - } - if (node.numericLiteralFlags & 512 /* ContainsSeparator */) { - return !!(flags & 8 /* AllowNumericSeparator */); - } - } - return !isBigIntLiteral(node); - } - function getTextOfConstantValue(value) { - return isString(value) ? '"' + escapeNonAsciiString(value) + '"' : "" + value; - } - function makeIdentifierFromModuleName(moduleName) { - return getBaseFileName(moduleName).replace(/^(\d)/, "_$1").replace(/\W/g, "_"); - } - function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 7 /* BlockScoped */) !== 0 || isCatchClauseVariableDeclarationOrBindingElement(declaration); - } - function isCatchClauseVariableDeclarationOrBindingElement(declaration) { - const node = getRootDeclaration(declaration); - return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; - } - function isAmbientModule(node) { - return isModuleDeclaration(node) && (node.name.kind === 11 /* StringLiteral */ || isGlobalScopeAugmentation(node)); - } - function isModuleWithStringLiteralName(node) { - return isModuleDeclaration(node) && node.name.kind === 11 /* StringLiteral */; - } - function isNonGlobalAmbientModule(node) { - return isModuleDeclaration(node) && isStringLiteral(node.name); - } - function isEffectiveModuleDeclaration(node) { - return isModuleDeclaration(node) || isIdentifier(node); - } - function isShorthandAmbientModuleSymbol(moduleSymbol) { - return isShorthandAmbientModule(moduleSymbol.valueDeclaration); - } - function isShorthandAmbientModule(node) { - return !!node && node.kind === 267 /* ModuleDeclaration */ && !node.body; - } - function isBlockScopedContainerTopLevel(node) { - return node.kind === 312 /* SourceFile */ || node.kind === 267 /* ModuleDeclaration */ || isFunctionLikeOrClassStaticBlockDeclaration(node); - } - function isGlobalScopeAugmentation(module2) { - return !!(module2.flags & 2048 /* GlobalAugmentation */); - } - function isExternalModuleAugmentation(node) { - return isAmbientModule(node) && isModuleAugmentationExternal(node); - } - function isModuleAugmentationExternal(node) { - switch (node.parent.kind) { - case 312 /* SourceFile */: - return isExternalModule(node.parent); - case 268 /* ModuleBlock */: - return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); - } - return false; - } - function getNonAugmentationDeclaration(symbol) { - var _a; - return (_a = symbol.declarations) == null ? void 0 : _a.find((d) => !isExternalModuleAugmentation(d) && !(isModuleDeclaration(d) && isGlobalScopeAugmentation(d))); - } - function isCommonJSContainingModuleKind(kind) { - return kind === 1 /* CommonJS */ || kind === 100 /* Node16 */ || kind === 199 /* NodeNext */; - } - function isEffectiveExternalModule(node, compilerOptions) { - return isExternalModule(node) || isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator; - } - function isEffectiveStrictModeSourceFile(node, compilerOptions) { - switch (node.scriptKind) { - case 1 /* JS */: - case 3 /* TS */: - case 2 /* JSX */: - case 4 /* TSX */: - break; - default: - return false; - } - if (node.isDeclarationFile) { - return false; - } - if (getStrictOptionValue(compilerOptions, "alwaysStrict")) { - return true; - } - if (startsWithUseStrict(node.statements)) { - return true; - } - if (isExternalModule(node) || getIsolatedModules(compilerOptions)) { - if (getEmitModuleKind(compilerOptions) >= 5 /* ES2015 */) { - return true; - } - return !compilerOptions.noImplicitUseStrict; - } - return false; - } - function isAmbientPropertyDeclaration(node) { - return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); - } - function isBlockScope(node, parentNode) { - switch (node.kind) { - case 312 /* SourceFile */: - case 269 /* CaseBlock */: - case 299 /* CatchClause */: - case 267 /* ModuleDeclaration */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 172 /* PropertyDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: - return true; - case 241 /* Block */: - return !isFunctionLikeOrClassStaticBlockDeclaration(parentNode); - } - return false; - } - function isDeclarationWithTypeParameters(node) { - Debug.type(node); - switch (node.kind) { - case 345 /* JSDocCallbackTag */: - case 353 /* JSDocTypedefTag */: - case 330 /* JSDocSignature */: - return true; - default: - assertType(node); - return isDeclarationWithTypeParameterChildren(node); - } - } - function isDeclarationWithTypeParameterChildren(node) { - Debug.type(node); - switch (node.kind) { - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 324 /* JSDocFunctionType */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 352 /* JSDocTemplateTag */: - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return true; - default: - assertType(node); - return false; - } - } - function isAnyImportSyntax(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - return true; - default: - return false; - } - } - function isAnyImportOrBareOrAccessedRequire(node) { - return isAnyImportSyntax(node) || isVariableDeclarationInitializedToBareOrAccessedRequire(node); - } - function isLateVisibilityPaintedStatement(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 243 /* VariableStatement */: - case 263 /* ClassDeclaration */: - case 262 /* FunctionDeclaration */: - case 267 /* ModuleDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - return true; - default: - return false; - } - } - function hasPossibleExternalModuleReference(node) { - return isAnyImportOrReExport(node) || isModuleDeclaration(node) || isImportTypeNode(node) || isImportCall(node); - } - function isAnyImportOrReExport(node) { - return isAnyImportSyntax(node) || isExportDeclaration(node); - } - function getEnclosingContainer(node) { - return findAncestor(node.parent, (n) => !!(getContainerFlags(n) & 1 /* IsContainer */)); - } - function getEnclosingBlockScopeContainer(node) { - return findAncestor(node.parent, (current) => isBlockScope(current, current.parent)); - } - function forEachEnclosingBlockScopeContainer(node, cb) { - let container = getEnclosingBlockScopeContainer(node); - while (container) { - cb(container); - container = getEnclosingBlockScopeContainer(container); - } - } - function declarationNameToString(name) { - return !name || getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); - } - function getNameFromIndexInfo(info) { - return info.declaration ? declarationNameToString(info.declaration.parameters[0].name) : void 0; - } - function isComputedNonLiteralName(name) { - return name.kind === 167 /* ComputedPropertyName */ && !isStringOrNumericLiteralLike(name.expression); - } - function tryGetTextOfPropertyName(name) { - var _a; - switch (name.kind) { - case 80 /* Identifier */: - case 81 /* PrivateIdentifier */: - return ((_a = name.emitNode) == null ? void 0 : _a.autoGenerate) ? void 0 : name.escapedText; - case 11 /* StringLiteral */: - case 9 /* NumericLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - return escapeLeadingUnderscores(name.text); - case 167 /* ComputedPropertyName */: - if (isStringOrNumericLiteralLike(name.expression)) - return escapeLeadingUnderscores(name.expression.text); - return void 0; - case 295 /* JsxNamespacedName */: - return getEscapedTextOfJsxNamespacedName(name); - default: - return Debug.assertNever(name); - } - } - function getTextOfPropertyName(name) { - return Debug.checkDefined(tryGetTextOfPropertyName(name)); - } - function entityNameToString(name) { - switch (name.kind) { - case 110 /* ThisKeyword */: - return "this"; - case 81 /* PrivateIdentifier */: - case 80 /* Identifier */: - return getFullWidth(name) === 0 ? idText(name) : getTextOfNode(name); - case 166 /* QualifiedName */: - return entityNameToString(name.left) + "." + entityNameToString(name.right); - case 211 /* PropertyAccessExpression */: - if (isIdentifier(name.name) || isPrivateIdentifier(name.name)) { - return entityNameToString(name.expression) + "." + entityNameToString(name.name); - } else { - return Debug.assertNever(name.name); - } - case 318 /* JSDocMemberName */: - return entityNameToString(name.left) + entityNameToString(name.right); - case 295 /* JsxNamespacedName */: - return entityNameToString(name.namespace) + ":" + entityNameToString(name.name); - default: - return Debug.assertNever(name); - } - } - function createDiagnosticForNode(node, message, ...args) { - const sourceFile = getSourceFileOfNode(node); - return createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args); - } - function createDiagnosticForNodeArray(sourceFile, nodes, message, ...args) { - const start = skipTrivia(sourceFile.text, nodes.pos); - return createFileDiagnostic(sourceFile, start, nodes.end - start, message, ...args); - } - function createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args) { - const span = getErrorSpanForNode(sourceFile, node); - return createFileDiagnostic(sourceFile, span.start, span.length, message, ...args); - } - function createDiagnosticForNodeFromMessageChain(sourceFile, node, messageChain, relatedInformation) { - const span = getErrorSpanForNode(sourceFile, node); - return createFileDiagnosticFromMessageChain(sourceFile, span.start, span.length, messageChain, relatedInformation); - } - function createDiagnosticForNodeArrayFromMessageChain(sourceFile, nodes, messageChain, relatedInformation) { - const start = skipTrivia(sourceFile.text, nodes.pos); - return createFileDiagnosticFromMessageChain(sourceFile, start, nodes.end - start, messageChain, relatedInformation); - } - function assertDiagnosticLocation(file, start, length2) { - Debug.assertGreaterThanOrEqual(start, 0); - Debug.assertGreaterThanOrEqual(length2, 0); - if (file) { - Debug.assertLessThanOrEqual(start, file.text.length); - Debug.assertLessThanOrEqual(start + length2, file.text.length); - } - } - function createFileDiagnosticFromMessageChain(file, start, length2, messageChain, relatedInformation) { - assertDiagnosticLocation(file, start, length2); - return { - file, - start, - length: length2, - code: messageChain.code, - category: messageChain.category, - messageText: messageChain.next ? messageChain : messageChain.messageText, - relatedInformation - }; - } - function createDiagnosticForFileFromMessageChain(sourceFile, messageChain, relatedInformation) { - return { - file: sourceFile, - start: 0, - length: 0, - code: messageChain.code, - category: messageChain.category, - messageText: messageChain.next ? messageChain : messageChain.messageText, - relatedInformation - }; - } - function createDiagnosticMessageChainFromDiagnostic(diagnostic) { - return typeof diagnostic.messageText === "string" ? { - code: diagnostic.code, - category: diagnostic.category, - messageText: diagnostic.messageText, - next: diagnostic.next - } : diagnostic.messageText; - } - function createDiagnosticForRange(sourceFile, range, message) { - return { - file: sourceFile, - start: range.pos, - length: range.end - range.pos, - code: message.code, - category: message.category, - messageText: message.message - }; - } - function getSpanOfTokenAtPosition(sourceFile, pos) { - const scanner2 = createScanner( - sourceFile.languageVersion, - /*skipTrivia*/ - true, - sourceFile.languageVariant, - sourceFile.text, - /*onError*/ - void 0, - pos - ); - scanner2.scan(); - const start = scanner2.getTokenStart(); - return createTextSpanFromBounds(start, scanner2.getTokenEnd()); - } - function scanTokenAtPosition(sourceFile, pos) { - const scanner2 = createScanner( - sourceFile.languageVersion, - /*skipTrivia*/ - true, - sourceFile.languageVariant, - sourceFile.text, - /*onError*/ - void 0, - pos - ); - scanner2.scan(); - return scanner2.getToken(); - } - function getErrorSpanForArrowFunction(sourceFile, node) { - const pos = skipTrivia(sourceFile.text, node.pos); - if (node.body && node.body.kind === 241 /* Block */) { - const { line: startLine } = getLineAndCharacterOfPosition(sourceFile, node.body.pos); - const { line: endLine } = getLineAndCharacterOfPosition(sourceFile, node.body.end); - if (startLine < endLine) { - return createTextSpan(pos, getEndLinePosition(startLine, sourceFile) - pos + 1); - } - } - return createTextSpanFromBounds(pos, node.end); - } - function getErrorSpanForNode(sourceFile, node) { - let errorNode = node; - switch (node.kind) { - case 312 /* SourceFile */: { - const pos2 = skipTrivia( - sourceFile.text, - 0, - /*stopAfterLineBreak*/ - false - ); - if (pos2 === sourceFile.text.length) { - return createTextSpan(0, 0); - } - return getSpanOfTokenAtPosition(sourceFile, pos2); - } - case 260 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 265 /* TypeAliasDeclaration */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 274 /* NamespaceImport */: - errorNode = node.name; - break; - case 219 /* ArrowFunction */: - return getErrorSpanForArrowFunction(sourceFile, node); - case 296 /* CaseClause */: - case 297 /* DefaultClause */: { - const start = skipTrivia(sourceFile.text, node.pos); - const end = node.statements.length > 0 ? node.statements[0].pos : node.end; - return createTextSpanFromBounds(start, end); - } - case 253 /* ReturnStatement */: - case 229 /* YieldExpression */: { - const pos2 = skipTrivia(sourceFile.text, node.pos); - return getSpanOfTokenAtPosition(sourceFile, pos2); - } - case 238 /* SatisfiesExpression */: { - const pos2 = skipTrivia(sourceFile.text, node.expression.end); - return getSpanOfTokenAtPosition(sourceFile, pos2); - } - case 357 /* JSDocSatisfiesTag */: { - const pos2 = skipTrivia(sourceFile.text, node.tagName.pos); - return getSpanOfTokenAtPosition(sourceFile, pos2); - } - } - if (errorNode === void 0) { - return getSpanOfTokenAtPosition(sourceFile, node.pos); - } - Debug.assert(!isJSDoc(errorNode)); - const isMissing = nodeIsMissing(errorNode); - const pos = isMissing || isJsxText(node) ? errorNode.pos : skipTrivia(sourceFile.text, errorNode.pos); - if (isMissing) { - Debug.assert(pos === errorNode.pos, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"); - Debug.assert(pos === errorNode.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"); - } else { - Debug.assert(pos >= errorNode.pos, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"); - Debug.assert(pos <= errorNode.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809"); - } - return createTextSpanFromBounds(pos, errorNode.end); - } - function isExternalOrCommonJsModule(file) { - return (file.externalModuleIndicator || file.commonJsModuleIndicator) !== void 0; - } - function isJsonSourceFile(file) { - return file.scriptKind === 6 /* JSON */; - } - function isEnumConst(node) { - return !!(getCombinedModifierFlags(node) & 2048 /* Const */); - } - function isDeclarationReadonly(declaration) { - return !!(getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); - } - function isVarAwaitUsing(node) { - return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */; - } - function isVarUsing(node) { - return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 4 /* Using */; - } - function isVarConst(node) { - return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 2 /* Const */; - } - function isLet(node) { - return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 1 /* Let */; - } - function isSuperCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 108 /* SuperKeyword */; - } - function isImportCall(n) { - return n.kind === 213 /* CallExpression */ && n.expression.kind === 102 /* ImportKeyword */; - } - function isImportMeta(n) { - return isMetaProperty(n) && n.keywordToken === 102 /* ImportKeyword */ && n.name.escapedText === "meta"; - } - function isLiteralImportTypeNode(n) { - return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); - } - function isPrologueDirective(node) { - return node.kind === 244 /* ExpressionStatement */ && node.expression.kind === 11 /* StringLiteral */; - } - function isCustomPrologue(node) { - return !!(getEmitFlags(node) & 2097152 /* CustomPrologue */); - } - function isHoistedFunction(node) { - return isCustomPrologue(node) && isFunctionDeclaration(node); - } - function isHoistedVariable(node) { - return isIdentifier(node.name) && !node.initializer; - } - function isHoistedVariableStatement(node) { - return isCustomPrologue(node) && isVariableStatement(node) && every(node.declarationList.declarations, isHoistedVariable); - } - function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { - return node.kind !== 12 /* JsxText */ ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : void 0; - } - function getJSDocCommentRanges(node, text) { - const commentRanges = node.kind === 169 /* Parameter */ || node.kind === 168 /* TypeParameter */ || node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */ || node.kind === 217 /* ParenthesizedExpression */ || node.kind === 260 /* VariableDeclaration */ || node.kind === 281 /* ExportSpecifier */ ? concatenate(getTrailingCommentRanges(text, node.pos), getLeadingCommentRanges(text, node.pos)) : getLeadingCommentRanges(text, node.pos); - return filter(commentRanges, (comment) => text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && text.charCodeAt(comment.pos + 3) !== 47 /* slash */); - } - function isPartOfTypeNode(node) { - if (182 /* FirstTypeNode */ <= node.kind && node.kind <= 205 /* LastTypeNode */) { - return true; - } - switch (node.kind) { - case 133 /* AnyKeyword */: - case 159 /* UnknownKeyword */: - case 150 /* NumberKeyword */: - case 163 /* BigIntKeyword */: - case 154 /* StringKeyword */: - case 136 /* BooleanKeyword */: - case 155 /* SymbolKeyword */: - case 151 /* ObjectKeyword */: - case 157 /* UndefinedKeyword */: - case 106 /* NullKeyword */: - case 146 /* NeverKeyword */: - return true; - case 116 /* VoidKeyword */: - return node.parent.kind !== 222 /* VoidExpression */; - case 233 /* ExpressionWithTypeArguments */: - return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case 168 /* TypeParameter */: - return node.parent.kind === 200 /* MappedType */ || node.parent.kind === 195 /* InferType */; - case 80 /* Identifier */: - if (node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node) { - node = node.parent; - } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { - node = node.parent; - } - Debug.assert( - node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, - "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." - ); - case 166 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: - case 110 /* ThisKeyword */: { - const { parent: parent2 } = node; - if (parent2.kind === 186 /* TypeQuery */) { - return false; - } - if (parent2.kind === 205 /* ImportType */) { - return !parent2.isTypeOf; - } - if (182 /* FirstTypeNode */ <= parent2.kind && parent2.kind <= 205 /* LastTypeNode */) { - return true; - } - switch (parent2.kind) { - case 233 /* ExpressionWithTypeArguments */: - return isHeritageClause(parent2.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent2); - case 168 /* TypeParameter */: - return node === parent2.constraint; - case 352 /* JSDocTemplateTag */: - return node === parent2.constraint; - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 169 /* Parameter */: - case 260 /* VariableDeclaration */: - return node === parent2.type; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return node === parent2.type; - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - return node === parent2.type; - case 216 /* TypeAssertionExpression */: - return node === parent2.type; - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - return contains(parent2.typeArguments, node); - } - } - } - return false; - } - function isChildOfNodeWithKind(node, kind) { - while (node) { - if (node.kind === kind) { - return true; - } - node = node.parent; - } - return false; - } - function forEachReturnStatement(body, visitor) { - return traverse(body); - function traverse(node) { - switch (node.kind) { - case 253 /* ReturnStatement */: - return visitor(node); - case 269 /* CaseBlock */: - case 241 /* Block */: - case 245 /* IfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 254 /* WithStatement */: - case 255 /* SwitchStatement */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - case 256 /* LabeledStatement */: - case 258 /* TryStatement */: - case 299 /* CatchClause */: - return forEachChild(node, traverse); - } - } - } - function forEachYieldExpression(body, visitor) { - return traverse(body); - function traverse(node) { - switch (node.kind) { - case 229 /* YieldExpression */: - visitor(node); - const operand = node.expression; - if (operand) { - traverse(operand); - } - return; - case 266 /* EnumDeclaration */: - case 264 /* InterfaceDeclaration */: - case 267 /* ModuleDeclaration */: - case 265 /* TypeAliasDeclaration */: - return; - default: - if (isFunctionLike(node)) { - if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { - traverse(node.name.expression); - return; - } - } else if (!isPartOfTypeNode(node)) { - forEachChild(node, traverse); - } - } - } - } - function getRestParameterElementType(node) { - if (node && node.kind === 188 /* ArrayType */) { - return node.elementType; - } else if (node && node.kind === 183 /* TypeReference */) { - return singleOrUndefined(node.typeArguments); - } else { - return void 0; - } - } - function getMembersOfDeclaration(node) { - switch (node.kind) { - case 264 /* InterfaceDeclaration */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 187 /* TypeLiteral */: - return node.members; - case 210 /* ObjectLiteralExpression */: - return node.properties; - } - } - function isVariableLike(node) { - if (node) { - switch (node.kind) { - case 208 /* BindingElement */: - case 306 /* EnumMember */: - case 169 /* Parameter */: - case 303 /* PropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 304 /* ShorthandPropertyAssignment */: - case 260 /* VariableDeclaration */: - return true; - } - } - return false; - } - function isVariableLikeOrAccessor(node) { - return isVariableLike(node) || isAccessor(node); - } - function isVariableDeclarationInVariableStatement(node) { - return node.parent.kind === 261 /* VariableDeclarationList */ && node.parent.parent.kind === 243 /* VariableStatement */; - } - function isCommonJsExportedExpression(node) { - if (!isInJSFile(node)) - return false; - return isObjectLiteralExpression(node.parent) && isBinaryExpression(node.parent.parent) && getAssignmentDeclarationKind(node.parent.parent) === 2 /* ModuleExports */ || isCommonJsExportPropertyAssignment(node.parent); - } - function isCommonJsExportPropertyAssignment(node) { - if (!isInJSFile(node)) - return false; - return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 1 /* ExportsProperty */; - } - function isValidESSymbolDeclaration(node) { - return (isVariableDeclaration(node) ? isVarConst(node) && isIdentifier(node.name) && isVariableDeclarationInVariableStatement(node) : isPropertyDeclaration(node) ? hasEffectiveReadonlyModifier(node) && hasStaticModifier(node) : isPropertySignature(node) && hasEffectiveReadonlyModifier(node)) || isCommonJsExportPropertyAssignment(node); - } - function introducesArgumentsExoticObject(node) { - switch (node.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - return true; - } - return false; - } - function unwrapInnermostStatementOfLabel(node, beforeUnwrapLabelCallback) { - while (true) { - if (beforeUnwrapLabelCallback) { - beforeUnwrapLabelCallback(node); - } - if (node.statement.kind !== 256 /* LabeledStatement */) { - return node.statement; - } - node = node.statement; - } - } - function isFunctionBlock(node) { - return node && node.kind === 241 /* Block */ && isFunctionLike(node.parent); - } - function isObjectLiteralMethod(node) { - return node && node.kind === 174 /* MethodDeclaration */ && node.parent.kind === 210 /* ObjectLiteralExpression */; - } - function isObjectLiteralOrClassExpressionMethodOrAccessor(node) { - return (node.kind === 174 /* MethodDeclaration */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */) && (node.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.kind === 231 /* ClassExpression */); - } - function isIdentifierTypePredicate(predicate) { - return predicate && predicate.kind === 1 /* Identifier */; - } - function isThisTypePredicate(predicate) { - return predicate && predicate.kind === 0 /* This */; - } - function forEachPropertyAssignment(objectLiteral, key, callback, key2) { - return forEach(objectLiteral == null ? void 0 : objectLiteral.properties, (property) => { - if (!isPropertyAssignment(property)) - return void 0; - const propName = tryGetTextOfPropertyName(property.name); - return key === propName || key2 && key2 === propName ? callback(property) : void 0; - }); - } - function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) { - return forEachPropertyAssignment( - objectLiteral, - propKey, - (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0 - ); - } - function getTsConfigObjectLiteralExpression(tsConfigSourceFile) { - if (tsConfigSourceFile && tsConfigSourceFile.statements.length) { - const expression = tsConfigSourceFile.statements[0].expression; - return tryCast(expression, isObjectLiteralExpression); - } - } - function getTsConfigPropArrayElementValue(tsConfigSourceFile, propKey, elementValue) { - return forEachTsConfigPropArray(tsConfigSourceFile, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0); - } - function forEachTsConfigPropArray(tsConfigSourceFile, propKey, callback) { - return forEachPropertyAssignment(getTsConfigObjectLiteralExpression(tsConfigSourceFile), propKey, callback); - } - function getContainingFunction(node) { - return findAncestor(node.parent, isFunctionLike); - } - function getContainingFunctionDeclaration(node) { - return findAncestor(node.parent, isFunctionLikeDeclaration); - } - function getContainingClass(node) { - return findAncestor(node.parent, isClassLike); - } - function getContainingClassStaticBlock(node) { - return findAncestor(node.parent, (n) => { - if (isClassLike(n) || isFunctionLike(n)) { - return "quit"; - } - return isClassStaticBlockDeclaration(n); - }); - } - function getContainingFunctionOrClassStaticBlock(node) { - return findAncestor(node.parent, isFunctionLikeOrClassStaticBlockDeclaration); - } - function getContainingClassExcludingClassDecorators(node) { - const decorator = findAncestor(node.parent, (n) => isClassLike(n) ? "quit" : isDecorator(n)); - return decorator && isClassLike(decorator.parent) ? getContainingClass(decorator.parent) : getContainingClass(decorator ?? node); - } - function getThisContainer(node, includeArrowFunctions, includeClassComputedPropertyName) { - Debug.assert(node.kind !== 312 /* SourceFile */); - while (true) { - node = node.parent; - if (!node) { - return Debug.fail(); - } - switch (node.kind) { - case 167 /* ComputedPropertyName */: - if (includeClassComputedPropertyName && isClassLike(node.parent.parent)) { - return node; - } - node = node.parent.parent; - break; - case 170 /* Decorator */: - if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { - node = node.parent.parent; - } else if (isClassElement(node.parent)) { - node = node.parent; - } - break; - case 219 /* ArrowFunction */: - if (!includeArrowFunctions) { - continue; - } - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 267 /* ModuleDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 266 /* EnumDeclaration */: - case 312 /* SourceFile */: - return node; - } - } - } - function isThisContainerOrFunctionBlock(node) { - switch (node.kind) { - case 219 /* ArrowFunction */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 172 /* PropertyDeclaration */: - return true; - case 241 /* Block */: - switch (node.parent.kind) { - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return true; - default: - return false; - } - default: - return false; - } - } - function isInTopLevelContext(node) { - if (isIdentifier(node) && (isClassDeclaration(node.parent) || isFunctionDeclaration(node.parent)) && node.parent.name === node) { - node = node.parent; - } - const container = getThisContainer( - node, - /*includeArrowFunctions*/ - true, - /*includeClassComputedPropertyName*/ - false - ); - return isSourceFile(container); - } - function getNewTargetContainer(node) { - const container = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - if (container) { - switch (container.kind) { - case 176 /* Constructor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - return container; - } - } - return void 0; - } - function getSuperContainer(node, stopOnFunctions) { - while (true) { - node = node.parent; - if (!node) { - return void 0; - } - switch (node.kind) { - case 167 /* ComputedPropertyName */: - node = node.parent; - break; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - if (!stopOnFunctions) { - continue; - } - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: - return node; - case 170 /* Decorator */: - if (node.parent.kind === 169 /* Parameter */ && isClassElement(node.parent.parent)) { - node = node.parent.parent; - } else if (isClassElement(node.parent)) { - node = node.parent; - } - break; - } - } - } - function getImmediatelyInvokedFunctionExpression(func) { - if (func.kind === 218 /* FunctionExpression */ || func.kind === 219 /* ArrowFunction */) { - let prev = func; - let parent2 = func.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */) { - prev = parent2; - parent2 = parent2.parent; - } - if (parent2.kind === 213 /* CallExpression */ && parent2.expression === prev) { - return parent2; - } - } - } - function isSuperOrSuperProperty(node) { - return node.kind === 108 /* SuperKeyword */ || isSuperProperty(node); - } - function isSuperProperty(node) { - const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 108 /* SuperKeyword */; - } - function isThisProperty(node) { - const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && node.expression.kind === 110 /* ThisKeyword */; - } - function isThisInitializedDeclaration(node) { - var _a; - return !!node && isVariableDeclaration(node) && ((_a = node.initializer) == null ? void 0 : _a.kind) === 110 /* ThisKeyword */; - } - function isThisInitializedObjectBindingExpression(node) { - return !!node && (isShorthandPropertyAssignment(node) || isPropertyAssignment(node)) && isBinaryExpression(node.parent.parent) && node.parent.parent.operatorToken.kind === 64 /* EqualsToken */ && node.parent.parent.right.kind === 110 /* ThisKeyword */; - } - function getEntityNameFromTypeNode(node) { - switch (node.kind) { - case 183 /* TypeReference */: - return node.typeName; - case 233 /* ExpressionWithTypeArguments */: - return isEntityNameExpression(node.expression) ? node.expression : void 0; - case 80 /* Identifier */: - case 166 /* QualifiedName */: - return node; - } - return void 0; - } - function getInvokedExpression(node) { - switch (node.kind) { - case 215 /* TaggedTemplateExpression */: - return node.tag; - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: - return node.tagName; - default: - return node.expression; - } - } - function nodeCanBeDecorated(useLegacyDecorators, node, parent2, grandparent) { - if (useLegacyDecorators && isNamedDeclaration(node) && isPrivateIdentifier(node.name)) { - return false; - } - switch (node.kind) { - case 263 /* ClassDeclaration */: - return true; - case 231 /* ClassExpression */: - return !useLegacyDecorators; - case 172 /* PropertyDeclaration */: - return parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2) && !hasAbstractModifier(node) && !hasAmbientModifier(node)); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - return node.body !== void 0 && parent2 !== void 0 && (useLegacyDecorators ? isClassDeclaration(parent2) : isClassLike(parent2)); - case 169 /* Parameter */: - if (!useLegacyDecorators) - return false; - return parent2 !== void 0 && parent2.body !== void 0 && (parent2.kind === 176 /* Constructor */ || parent2.kind === 174 /* MethodDeclaration */ || parent2.kind === 178 /* SetAccessor */) && getThisParameter(parent2) !== node && grandparent !== void 0 && grandparent.kind === 263 /* ClassDeclaration */; - } - return false; - } - function nodeIsDecorated(useLegacyDecorators, node, parent2, grandparent) { - return hasDecorators(node) && nodeCanBeDecorated(useLegacyDecorators, node, parent2, grandparent); - } - function nodeOrChildIsDecorated(useLegacyDecorators, node, parent2, grandparent) { - return nodeIsDecorated(useLegacyDecorators, node, parent2, grandparent) || childIsDecorated(useLegacyDecorators, node, parent2); - } - function childIsDecorated(useLegacyDecorators, node, parent2) { - switch (node.kind) { - case 263 /* ClassDeclaration */: - return some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 231 /* ClassExpression */: - return !useLegacyDecorators && some(node.members, (m) => nodeOrChildIsDecorated(useLegacyDecorators, m, node, parent2)); - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - return some(node.parameters, (p) => nodeIsDecorated(useLegacyDecorators, p, node, parent2)); - default: - return false; - } - } - function classOrConstructorParameterIsDecorated(useLegacyDecorators, node) { - if (nodeIsDecorated(useLegacyDecorators, node)) - return true; - const constructor = getFirstConstructorWithBody(node); - return !!constructor && childIsDecorated(useLegacyDecorators, constructor, node); - } - function classElementOrClassElementParameterIsDecorated(useLegacyDecorators, node, parent2) { - let parameters; - if (isAccessor(node)) { - const { firstAccessor, secondAccessor, setAccessor } = getAllAccessorDeclarations(parent2.members, node); - const firstAccessorWithDecorators = hasDecorators(firstAccessor) ? firstAccessor : secondAccessor && hasDecorators(secondAccessor) ? secondAccessor : void 0; - if (!firstAccessorWithDecorators || node !== firstAccessorWithDecorators) { - return false; - } - parameters = setAccessor == null ? void 0 : setAccessor.parameters; - } else if (isMethodDeclaration(node)) { - parameters = node.parameters; - } - if (nodeIsDecorated(useLegacyDecorators, node, parent2)) { - return true; - } - if (parameters) { - for (const parameter of parameters) { - if (parameterIsThisKeyword(parameter)) - continue; - if (nodeIsDecorated(useLegacyDecorators, parameter, node, parent2)) - return true; - } - } - return false; - } - function isEmptyStringLiteral(node) { - if (node.textSourceNode) { - switch (node.textSourceNode.kind) { - case 11 /* StringLiteral */: - return isEmptyStringLiteral(node.textSourceNode); - case 15 /* NoSubstitutionTemplateLiteral */: - return node.text === ""; - } - return false; - } - return node.text === ""; - } - function isJSXTagName(node) { - const { parent: parent2 } = node; - if (parent2.kind === 286 /* JsxOpeningElement */ || parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 287 /* JsxClosingElement */) { - return parent2.tagName === node; - } - return false; - } - function isExpressionNode(node) { - switch (node.kind) { - case 108 /* SuperKeyword */: - case 106 /* NullKeyword */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 14 /* RegularExpressionLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 234 /* AsExpression */: - case 216 /* TypeAssertionExpression */: - case 238 /* SatisfiesExpression */: - case 235 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: - case 218 /* FunctionExpression */: - case 231 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 222 /* VoidExpression */: - case 220 /* DeleteExpression */: - case 221 /* TypeOfExpression */: - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - case 226 /* BinaryExpression */: - case 227 /* ConditionalExpression */: - case 230 /* SpreadElement */: - case 228 /* TemplateExpression */: - case 232 /* OmittedExpression */: - case 284 /* JsxElement */: - case 285 /* JsxSelfClosingElement */: - case 288 /* JsxFragment */: - case 229 /* YieldExpression */: - case 223 /* AwaitExpression */: - case 236 /* MetaProperty */: - return true; - case 233 /* ExpressionWithTypeArguments */: - return !isHeritageClause(node.parent) && !isJSDocAugmentsTag(node.parent); - case 166 /* QualifiedName */: - while (node.parent.kind === 166 /* QualifiedName */) { - node = node.parent; - } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 318 /* JSDocMemberName */: - while (isJSDocMemberName(node.parent)) { - node = node.parent; - } - return node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node); - case 81 /* PrivateIdentifier */: - return isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 103 /* InKeyword */; - case 80 /* Identifier */: - if (node.parent.kind === 186 /* TypeQuery */ || isJSDocLinkLike(node.parent) || isJSDocNameReference(node.parent) || isJSDocMemberName(node.parent) || isJSXTagName(node)) { - return true; - } - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 110 /* ThisKeyword */: - return isInExpressionContext(node); - default: - return false; - } - } - function isInExpressionContext(node) { - const { parent: parent2 } = node; - switch (parent2.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 306 /* EnumMember */: - case 303 /* PropertyAssignment */: - case 208 /* BindingElement */: - return parent2.initializer === node; - case 244 /* ExpressionStatement */: - case 245 /* IfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 253 /* ReturnStatement */: - case 254 /* WithStatement */: - case 255 /* SwitchStatement */: - case 296 /* CaseClause */: - case 257 /* ThrowStatement */: - return parent2.expression === node; - case 248 /* ForStatement */: - const forStatement = parent2; - return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInStatement.expression === node; - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - return node === parent2.expression; - case 239 /* TemplateSpan */: - return node === parent2.expression; - case 167 /* ComputedPropertyName */: - return node === parent2.expression; - case 170 /* Decorator */: - case 294 /* JsxExpression */: - case 293 /* JsxSpreadAttribute */: - case 305 /* SpreadAssignment */: - return true; - case 233 /* ExpressionWithTypeArguments */: - return parent2.expression === node && !isPartOfTypeNode(parent2); - case 304 /* ShorthandPropertyAssignment */: - return parent2.objectAssignmentInitializer === node; - case 238 /* SatisfiesExpression */: - return node === parent2.expression; - default: - return isExpressionNode(parent2); - } - } - function isPartOfTypeQuery(node) { - while (node.kind === 166 /* QualifiedName */ || node.kind === 80 /* Identifier */) { - node = node.parent; - } - return node.kind === 186 /* TypeQuery */; - } - function isNamespaceReexportDeclaration(node) { - return isNamespaceExport(node) && !!node.parent.moduleSpecifier; - } - function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */; - } - function getExternalModuleImportEqualsDeclarationExpression(node) { - Debug.assert(isExternalModuleImportEqualsDeclaration(node)); - return node.moduleReference.expression; - } - function getExternalModuleRequireArgument(node) { - return isVariableDeclarationInitializedToBareOrAccessedRequire(node) && getLeftmostAccessExpression(node.initializer).arguments[0]; - } - function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 283 /* ExternalModuleReference */; - } - function isSourceFileJS(file) { - return isInJSFile(file); - } - function isSourceFileNotJS(file) { - return !isInJSFile(file); - } - function isInJSFile(node) { - return !!node && !!(node.flags & 524288 /* JavaScriptFile */); - } - function isInJsonFile(node) { - return !!node && !!(node.flags & 134217728 /* JsonFile */); - } - function isSourceFileNotJson(file) { - return !isJsonSourceFile(file); - } - function isInJSDoc(node) { - return !!node && !!(node.flags & 16777216 /* JSDoc */); - } - function isJSDocIndexSignature(node) { - return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && node.typeArguments && node.typeArguments.length === 2 && (node.typeArguments[0].kind === 154 /* StringKeyword */ || node.typeArguments[0].kind === 150 /* NumberKeyword */); - } - function isRequireCall(callExpression, requireStringLiteralLikeArgument) { - if (callExpression.kind !== 213 /* CallExpression */) { - return false; - } - const { expression, arguments: args } = callExpression; - if (expression.kind !== 80 /* Identifier */ || expression.escapedText !== "require") { - return false; - } - if (args.length !== 1) { - return false; - } - const arg = args[0]; - return !requireStringLiteralLikeArgument || isStringLiteralLike(arg); - } - function isVariableDeclarationInitializedToRequire(node) { - return isVariableDeclarationInitializedWithRequireHelper( - node, - /*allowAccessedRequire*/ - false - ); - } - function isVariableDeclarationInitializedToBareOrAccessedRequire(node) { - return isVariableDeclarationInitializedWithRequireHelper( - node, - /*allowAccessedRequire*/ - true - ); - } - function isBindingElementOfBareOrAccessedRequire(node) { - return isBindingElement(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); - } - function isVariableDeclarationInitializedWithRequireHelper(node, allowAccessedRequire) { - return isVariableDeclaration(node) && !!node.initializer && isRequireCall( - allowAccessedRequire ? getLeftmostAccessExpression(node.initializer) : node.initializer, - /*requireStringLiteralLikeArgument*/ - true - ); - } - function isRequireVariableStatement(node) { - return isVariableStatement(node) && node.declarationList.declarations.length > 0 && every(node.declarationList.declarations, (decl) => isVariableDeclarationInitializedToRequire(decl)); - } - function isSingleOrDoubleQuote(charCode) { - return charCode === 39 /* singleQuote */ || charCode === 34 /* doubleQuote */; - } - function isStringDoubleQuoted(str, sourceFile) { - return getSourceTextOfNodeFromSourceFile(sourceFile, str).charCodeAt(0) === 34 /* doubleQuote */; - } - function isAssignmentDeclaration(decl) { - return isBinaryExpression(decl) || isAccessExpression(decl) || isIdentifier(decl) || isCallExpression(decl); - } - function getEffectiveInitializer(node) { - if (isInJSFile(node) && node.initializer && isBinaryExpression(node.initializer) && (node.initializer.operatorToken.kind === 57 /* BarBarToken */ || node.initializer.operatorToken.kind === 61 /* QuestionQuestionToken */) && node.name && isEntityNameExpression(node.name) && isSameEntityName(node.name, node.initializer.left)) { - return node.initializer.right; - } - return node.initializer; - } - function getDeclaredExpandoInitializer(node) { - const init = getEffectiveInitializer(node); - return init && getExpandoInitializer(init, isPrototypeAccess(node.name)); - } - function hasExpandoValueProperty(node, isPrototypeAssignment) { - return forEach(node.properties, (p) => isPropertyAssignment(p) && isIdentifier(p.name) && p.name.escapedText === "value" && p.initializer && getExpandoInitializer(p.initializer, isPrototypeAssignment)); - } - function getAssignedExpandoInitializer(node) { - if (node && node.parent && isBinaryExpression(node.parent) && node.parent.operatorToken.kind === 64 /* EqualsToken */) { - const isPrototypeAssignment = isPrototypeAccess(node.parent.left); - return getExpandoInitializer(node.parent.right, isPrototypeAssignment) || getDefaultedExpandoInitializer(node.parent.left, node.parent.right, isPrototypeAssignment); - } - if (node && isCallExpression(node) && isBindableObjectDefinePropertyCall(node)) { - const result = hasExpandoValueProperty(node.arguments[2], node.arguments[1].text === "prototype"); - if (result) { - return result; - } - } - } - function getExpandoInitializer(initializer, isPrototypeAssignment) { - if (isCallExpression(initializer)) { - const e = skipParentheses(initializer.expression); - return e.kind === 218 /* FunctionExpression */ || e.kind === 219 /* ArrowFunction */ ? initializer : void 0; - } - if (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 231 /* ClassExpression */ || initializer.kind === 219 /* ArrowFunction */) { - return initializer; - } - if (isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) { - return initializer; - } - } - function getDefaultedExpandoInitializer(name, initializer, isPrototypeAssignment) { - const e = isBinaryExpression(initializer) && (initializer.operatorToken.kind === 57 /* BarBarToken */ || initializer.operatorToken.kind === 61 /* QuestionQuestionToken */) && getExpandoInitializer(initializer.right, isPrototypeAssignment); - if (e && isSameEntityName(name, initializer.left)) { - return e; - } - } - function isDefaultedExpandoInitializer(node) { - const name = isVariableDeclaration(node.parent) ? node.parent.name : isBinaryExpression(node.parent) && node.parent.operatorToken.kind === 64 /* EqualsToken */ ? node.parent.left : void 0; - return name && getExpandoInitializer(node.right, isPrototypeAccess(name)) && isEntityNameExpression(name) && isSameEntityName(name, node.left); - } - function getNameOfExpando(node) { - if (isBinaryExpression(node.parent)) { - const parent2 = (node.parent.operatorToken.kind === 57 /* BarBarToken */ || node.parent.operatorToken.kind === 61 /* QuestionQuestionToken */) && isBinaryExpression(node.parent.parent) ? node.parent.parent : node.parent; - if (parent2.operatorToken.kind === 64 /* EqualsToken */ && isIdentifier(parent2.left)) { - return parent2.left; - } - } else if (isVariableDeclaration(node.parent)) { - return node.parent.name; - } - } - function isSameEntityName(name, initializer) { - if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer)) { - return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer); - } - if (isMemberName(name) && isLiteralLikeAccess(initializer) && (initializer.expression.kind === 110 /* ThisKeyword */ || isIdentifier(initializer.expression) && (initializer.expression.escapedText === "window" || initializer.expression.escapedText === "self" || initializer.expression.escapedText === "global"))) { - return isSameEntityName(name, getNameOrArgument(initializer)); - } - if (isLiteralLikeAccess(name) && isLiteralLikeAccess(initializer)) { - return getElementOrPropertyAccessName(name) === getElementOrPropertyAccessName(initializer) && isSameEntityName(name.expression, initializer.expression); - } - return false; - } - function getRightMostAssignedExpression(node) { - while (isAssignmentExpression( - node, - /*excludeCompoundAssignment*/ - true - )) { - node = node.right; - } - return node; - } - function isExportsIdentifier(node) { - return isIdentifier(node) && node.escapedText === "exports"; - } - function isModuleIdentifier(node) { - return isIdentifier(node) && node.escapedText === "module"; - } - function isModuleExportsAccessExpression(node) { - return (isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node)) && isModuleIdentifier(node.expression) && getElementOrPropertyAccessName(node) === "exports"; - } - function getAssignmentDeclarationKind(expr) { - const special = getAssignmentDeclarationKindWorker(expr); - return special === 5 /* Property */ || isInJSFile(expr) ? special : 0 /* None */; - } - function isBindableObjectDefinePropertyCall(expr) { - return length(expr.arguments) === 3 && isPropertyAccessExpression(expr.expression) && isIdentifier(expr.expression.expression) && idText(expr.expression.expression) === "Object" && idText(expr.expression.name) === "defineProperty" && isStringOrNumericLiteralLike(expr.arguments[1]) && isBindableStaticNameExpression( - expr.arguments[0], - /*excludeThisKeyword*/ - true - ); - } - function isLiteralLikeAccess(node) { - return isPropertyAccessExpression(node) || isLiteralLikeElementAccess(node); - } - function isLiteralLikeElementAccess(node) { - return isElementAccessExpression(node) && isStringOrNumericLiteralLike(node.argumentExpression); - } - function isBindableStaticAccessExpression(node, excludeThisKeyword) { - return isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 110 /* ThisKeyword */ || isIdentifier(node.name) && isBindableStaticNameExpression( - node.expression, - /*excludeThisKeyword*/ - true - )) || isBindableStaticElementAccessExpression(node, excludeThisKeyword); - } - function isBindableStaticElementAccessExpression(node, excludeThisKeyword) { - return isLiteralLikeElementAccess(node) && (!excludeThisKeyword && node.expression.kind === 110 /* ThisKeyword */ || isEntityNameExpression(node.expression) || isBindableStaticAccessExpression( - node.expression, - /*excludeThisKeyword*/ - true - )); - } - function isBindableStaticNameExpression(node, excludeThisKeyword) { - return isEntityNameExpression(node) || isBindableStaticAccessExpression(node, excludeThisKeyword); - } - function getNameOrArgument(expr) { - if (isPropertyAccessExpression(expr)) { - return expr.name; - } - return expr.argumentExpression; - } - function getAssignmentDeclarationKindWorker(expr) { - if (isCallExpression(expr)) { - if (!isBindableObjectDefinePropertyCall(expr)) { - return 0 /* None */; - } - const entityName = expr.arguments[0]; - if (isExportsIdentifier(entityName) || isModuleExportsAccessExpression(entityName)) { - return 8 /* ObjectDefinePropertyExports */; - } - if (isBindableStaticAccessExpression(entityName) && getElementOrPropertyAccessName(entityName) === "prototype") { - return 9 /* ObjectDefinePrototypeProperty */; - } - return 7 /* ObjectDefinePropertyValue */; - } - if (expr.operatorToken.kind !== 64 /* EqualsToken */ || !isAccessExpression(expr.left) || isVoidZero(getRightMostAssignedExpression(expr))) { - return 0 /* None */; - } - if (isBindableStaticNameExpression( - expr.left.expression, - /*excludeThisKeyword*/ - true - ) && getElementOrPropertyAccessName(expr.left) === "prototype" && isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) { - return 6 /* Prototype */; - } - return getAssignmentDeclarationPropertyAccessKind(expr.left); - } - function isVoidZero(node) { - return isVoidExpression(node) && isNumericLiteral(node.expression) && node.expression.text === "0"; - } - function getElementOrPropertyAccessArgumentExpressionOrName(node) { - if (isPropertyAccessExpression(node)) { - return node.name; - } - const arg = skipParentheses(node.argumentExpression); - if (isNumericLiteral(arg) || isStringLiteralLike(arg)) { - return arg; - } - return node; - } - function getElementOrPropertyAccessName(node) { - const name = getElementOrPropertyAccessArgumentExpressionOrName(node); - if (name) { - if (isIdentifier(name)) { - return name.escapedText; - } - if (isStringLiteralLike(name) || isNumericLiteral(name)) { - return escapeLeadingUnderscores(name.text); - } - } - return void 0; - } - function getAssignmentDeclarationPropertyAccessKind(lhs) { - if (lhs.expression.kind === 110 /* ThisKeyword */) { - return 4 /* ThisProperty */; - } else if (isModuleExportsAccessExpression(lhs)) { - return 2 /* ModuleExports */; - } else if (isBindableStaticNameExpression( - lhs.expression, - /*excludeThisKeyword*/ - true - )) { - if (isPrototypeAccess(lhs.expression)) { - return 3 /* PrototypeProperty */; - } - let nextToLast = lhs; - while (!isIdentifier(nextToLast.expression)) { - nextToLast = nextToLast.expression; - } - const id = nextToLast.expression; - if ((id.escapedText === "exports" || id.escapedText === "module" && getElementOrPropertyAccessName(nextToLast) === "exports") && // ExportsProperty does not support binding with computed names - isBindableStaticAccessExpression(lhs)) { - return 1 /* ExportsProperty */; - } - if (isBindableStaticNameExpression( - lhs, - /*excludeThisKeyword*/ - true - ) || isElementAccessExpression(lhs) && isDynamicName(lhs)) { - return 5 /* Property */; - } - } - return 0 /* None */; - } - function getInitializerOfBinaryExpression(expr) { - while (isBinaryExpression(expr.right)) { - expr = expr.right; - } - return expr.right; - } - function isPrototypePropertyAssignment(node) { - return isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 3 /* PrototypeProperty */; - } - function isSpecialPropertyDeclaration(expr) { - return isInJSFile(expr) && expr.parent && expr.parent.kind === 244 /* ExpressionStatement */ && (!isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) && !!getJSDocTypeTag(expr.parent); - } - function setValueDeclaration(symbol, node) { - const { valueDeclaration } = symbol; - if (!valueDeclaration || !(node.flags & 33554432 /* Ambient */ && !isInJSFile(node) && !(valueDeclaration.flags & 33554432 /* Ambient */)) && (isAssignmentDeclaration(valueDeclaration) && !isAssignmentDeclaration(node)) || valueDeclaration.kind !== node.kind && isEffectiveModuleDeclaration(valueDeclaration)) { - symbol.valueDeclaration = node; - } - } - function isFunctionSymbol(symbol) { - if (!symbol || !symbol.valueDeclaration) { - return false; - } - const decl = symbol.valueDeclaration; - return decl.kind === 262 /* FunctionDeclaration */ || isVariableDeclaration(decl) && decl.initializer && isFunctionLike(decl.initializer); - } - function tryGetModuleSpecifierFromDeclaration(node) { - var _a, _b; - switch (node.kind) { - case 260 /* VariableDeclaration */: - case 208 /* BindingElement */: - return (_a = findAncestor(node.initializer, (node2) => isRequireCall( - node2, - /*requireStringLiteralLikeArgument*/ - true - ))) == null ? void 0 : _a.arguments[0]; - case 272 /* ImportDeclaration */: - return tryCast(node.moduleSpecifier, isStringLiteralLike); - case 271 /* ImportEqualsDeclaration */: - return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); - case 273 /* ImportClause */: - case 280 /* NamespaceExport */: - return tryCast(node.parent.moduleSpecifier, isStringLiteralLike); - case 274 /* NamespaceImport */: - case 281 /* ExportSpecifier */: - return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); - case 276 /* ImportSpecifier */: - return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); - default: - Debug.assertNever(node); - } - } - function importFromModuleSpecifier(node) { - return tryGetImportFromModuleSpecifier(node) || Debug.failBadSyntaxKind(node.parent); - } - function tryGetImportFromModuleSpecifier(node) { - switch (node.parent.kind) { - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - return node.parent; - case 283 /* ExternalModuleReference */: - return node.parent.parent; - case 213 /* CallExpression */: - return isImportCall(node.parent) || isRequireCall( - node.parent, - /*requireStringLiteralLikeArgument*/ - false - ) ? node.parent : void 0; - case 201 /* LiteralType */: - Debug.assert(isStringLiteral(node)); - return tryCast(node.parent.parent, isImportTypeNode); - default: - return void 0; - } - } - function getExternalModuleName(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - return node.moduleSpecifier; - case 271 /* ImportEqualsDeclaration */: - return node.moduleReference.kind === 283 /* ExternalModuleReference */ ? node.moduleReference.expression : void 0; - case 205 /* ImportType */: - return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; - case 213 /* CallExpression */: - return node.arguments[0]; - case 267 /* ModuleDeclaration */: - return node.name.kind === 11 /* StringLiteral */ ? node.name : void 0; - default: - return Debug.assertNever(node); - } - } - function getNamespaceDeclarationNode(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - return node.importClause && tryCast(node.importClause.namedBindings, isNamespaceImport); - case 271 /* ImportEqualsDeclaration */: - return node; - case 278 /* ExportDeclaration */: - return node.exportClause && tryCast(node.exportClause, isNamespaceExport); - default: - return Debug.assertNever(node); - } - } - function isDefaultImport(node) { - return node.kind === 272 /* ImportDeclaration */ && !!node.importClause && !!node.importClause.name; - } - function forEachImportClauseDeclaration(node, action) { - if (node.name) { - const result = action(node); - if (result) - return result; - } - if (node.namedBindings) { - const result = isNamespaceImport(node.namedBindings) ? action(node.namedBindings) : forEach(node.namedBindings.elements, action); - if (result) - return result; - } - } - function hasQuestionToken(node) { - if (node) { - switch (node.kind) { - case 169 /* Parameter */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 304 /* ShorthandPropertyAssignment */: - case 303 /* PropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - return node.questionToken !== void 0; - } - } - return false; - } - function isJSDocConstructSignature(node) { - const param = isJSDocFunctionType(node) ? firstOrUndefined(node.parameters) : void 0; - const name = tryCast(param && param.name, isIdentifier); - return !!name && name.escapedText === "new"; - } - function isJSDocTypeAlias(node) { - return node.kind === 353 /* JSDocTypedefTag */ || node.kind === 345 /* JSDocCallbackTag */ || node.kind === 347 /* JSDocEnumTag */; - } - function isTypeAlias(node) { - return isJSDocTypeAlias(node) || isTypeAliasDeclaration(node); - } - function getSourceOfAssignment(node) { - return isExpressionStatement(node) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 64 /* EqualsToken */ ? getRightMostAssignedExpression(node.expression) : void 0; - } - function getSourceOfDefaultedAssignment(node) { - return isExpressionStatement(node) && isBinaryExpression(node.expression) && getAssignmentDeclarationKind(node.expression) !== 0 /* None */ && isBinaryExpression(node.expression.right) && (node.expression.right.operatorToken.kind === 57 /* BarBarToken */ || node.expression.right.operatorToken.kind === 61 /* QuestionQuestionToken */) ? node.expression.right.right : void 0; - } - function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) { - switch (node.kind) { - case 243 /* VariableStatement */: - const v = getSingleVariableOfVariableStatement(node); - return v && v.initializer; - case 172 /* PropertyDeclaration */: - return node.initializer; - case 303 /* PropertyAssignment */: - return node.initializer; - } - } - function getSingleVariableOfVariableStatement(node) { - return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : void 0; - } - function getNestedModuleDeclaration(node) { - return isModuleDeclaration(node) && node.body && node.body.kind === 267 /* ModuleDeclaration */ ? node.body : void 0; - } - function canHaveFlowNode(node) { - if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */) { - return true; - } - switch (node.kind) { - case 80 /* Identifier */: - case 110 /* ThisKeyword */: - case 108 /* SuperKeyword */: - case 166 /* QualifiedName */: - case 236 /* MetaProperty */: - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - case 208 /* BindingElement */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return true; - default: - return false; - } - } - function canHaveJSDoc(node) { - switch (node.kind) { - case 219 /* ArrowFunction */: - case 226 /* BinaryExpression */: - case 241 /* Block */: - case 252 /* BreakStatement */: - case 179 /* CallSignature */: - case 296 /* CaseClause */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 175 /* ClassStaticBlockDeclaration */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - case 251 /* ContinueStatement */: - case 259 /* DebuggerStatement */: - case 246 /* DoStatement */: - case 212 /* ElementAccessExpression */: - case 242 /* EmptyStatement */: - case 1 /* EndOfFileToken */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: - case 281 /* ExportSpecifier */: - case 244 /* ExpressionStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 248 /* ForStatement */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 177 /* GetAccessor */: - case 80 /* Identifier */: - case 245 /* IfStatement */: - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 181 /* IndexSignature */: - case 264 /* InterfaceDeclaration */: - case 324 /* JSDocFunctionType */: - case 330 /* JSDocSignature */: - case 256 /* LabeledStatement */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 267 /* ModuleDeclaration */: - case 202 /* NamedTupleMember */: - case 270 /* NamespaceExportDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 169 /* Parameter */: - case 217 /* ParenthesizedExpression */: - case 211 /* PropertyAccessExpression */: - case 303 /* PropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 253 /* ReturnStatement */: - case 240 /* SemicolonClassElement */: - case 178 /* SetAccessor */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: - case 255 /* SwitchStatement */: - case 257 /* ThrowStatement */: - case 258 /* TryStatement */: - case 265 /* TypeAliasDeclaration */: - case 168 /* TypeParameter */: - case 260 /* VariableDeclaration */: - case 243 /* VariableStatement */: - case 247 /* WhileStatement */: - case 254 /* WithStatement */: - return true; - default: - return false; - } - } - function getJSDocCommentsAndTags(hostNode, noCache) { - let result; - if (isVariableLike(hostNode) && hasInitializer(hostNode) && hasJSDocNodes(hostNode.initializer)) { - result = addRange(result, filterOwnedJSDocTags(hostNode, last(hostNode.initializer.jsDoc))); - } - let node = hostNode; - while (node && node.parent) { - if (hasJSDocNodes(node)) { - result = addRange(result, filterOwnedJSDocTags(hostNode, last(node.jsDoc))); - } - if (node.kind === 169 /* Parameter */) { - result = addRange(result, (noCache ? getJSDocParameterTagsNoCache : getJSDocParameterTags)(node)); - break; - } - if (node.kind === 168 /* TypeParameter */) { - result = addRange(result, (noCache ? getJSDocTypeParameterTagsNoCache : getJSDocTypeParameterTags)(node)); - break; - } - node = getNextJSDocCommentLocation(node); - } - return result || emptyArray; - } - function filterOwnedJSDocTags(hostNode, jsDoc) { - if (isJSDoc(jsDoc)) { - const ownedTags = filter(jsDoc.tags, (tag) => ownsJSDocTag(hostNode, tag)); - return jsDoc.tags === ownedTags ? [jsDoc] : ownedTags; - } - return ownsJSDocTag(hostNode, jsDoc) ? [jsDoc] : void 0; - } - function ownsJSDocTag(hostNode, tag) { - return !(isJSDocTypeTag(tag) || isJSDocSatisfiesTag(tag)) || !tag.parent || !isJSDoc(tag.parent) || !isParenthesizedExpression(tag.parent.parent) || tag.parent.parent === hostNode; - } - function getNextJSDocCommentLocation(node) { - const parent2 = node.parent; - if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { - return parent2; - } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */)) { - return parent2.parent; - } else if (parent2.parent && parent2.parent.parent && (getSingleVariableOfVariableStatement(parent2.parent.parent) || getSingleInitializerOfVariableStatementOrPropertyDeclaration(parent2.parent.parent) === node || getSourceOfDefaultedAssignment(parent2.parent.parent))) { - return parent2.parent.parent; - } - } - function getParameterSymbolFromJSDoc(node) { - if (node.symbol) { - return node.symbol; - } - if (!isIdentifier(node.name)) { - return void 0; - } - const name = node.name.escapedText; - const decl = getHostSignatureFromJSDoc(node); - if (!decl) { - return void 0; - } - const parameter = find(decl.parameters, (p) => p.name.kind === 80 /* Identifier */ && p.name.escapedText === name); - return parameter && parameter.symbol; - } - function getEffectiveContainerForJSDocTemplateTag(node) { - if (isJSDoc(node.parent) && node.parent.tags) { - const typeAlias = find(node.parent.tags, isJSDocTypeAlias); - if (typeAlias) { - return typeAlias; - } - } - return getHostSignatureFromJSDoc(node); - } - function getHostSignatureFromJSDoc(node) { - const host = getEffectiveJSDocHost(node); - if (host) { - return isPropertySignature(host) && host.type && isFunctionLike(host.type) ? host.type : isFunctionLike(host) ? host : void 0; - } - return void 0; - } - function getEffectiveJSDocHost(node) { - const host = getJSDocHost(node); - if (host) { - return getSourceOfDefaultedAssignment(host) || getSourceOfAssignment(host) || getSingleInitializerOfVariableStatementOrPropertyDeclaration(host) || getSingleVariableOfVariableStatement(host) || getNestedModuleDeclaration(host) || host; - } - } - function getJSDocHost(node) { - const jsDoc = getJSDocRoot(node); - if (!jsDoc) { - return void 0; - } - const host = jsDoc.parent; - if (host && host.jsDoc && jsDoc === lastOrUndefined(host.jsDoc)) { - return host; - } - } - function getJSDocRoot(node) { - return findAncestor(node.parent, isJSDoc); - } - function getTypeParameterFromJsDoc(node) { - const name = node.name.escapedText; - const { typeParameters } = node.parent.parent.parent; - return typeParameters && find(typeParameters, (p) => p.name.escapedText === name); - } - function hasTypeArguments(node) { - return !!node.typeArguments; - } - function getAssignmentTargetKind(node) { - let parent2 = node.parent; - while (true) { - switch (parent2.kind) { - case 226 /* BinaryExpression */: - const binaryOperator = parent2.operatorToken.kind; - return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - const unaryOperator = parent2.operator; - return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; - case 217 /* ParenthesizedExpression */: - case 209 /* ArrayLiteralExpression */: - case 230 /* SpreadElement */: - case 235 /* NonNullExpression */: - node = parent2; - break; - case 305 /* SpreadAssignment */: - node = parent2.parent; - break; - case 304 /* ShorthandPropertyAssignment */: - if (parent2.name !== node) { - return 0 /* None */; - } - node = parent2.parent; - break; - case 303 /* PropertyAssignment */: - if (parent2.name === node) { - return 0 /* None */; - } - node = parent2.parent; - break; - default: - return 0 /* None */; - } - parent2 = node.parent; - } - } - function isAssignmentTarget(node) { - return getAssignmentTargetKind(node) !== 0 /* None */; - } - function isNodeWithPossibleHoistedDeclaration(node) { - switch (node.kind) { - case 241 /* Block */: - case 243 /* VariableStatement */: - case 254 /* WithStatement */: - case 245 /* IfStatement */: - case 255 /* SwitchStatement */: - case 269 /* CaseBlock */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - case 256 /* LabeledStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 258 /* TryStatement */: - case 299 /* CatchClause */: - return true; - } - return false; - } - function isValueSignatureDeclaration(node) { - return isFunctionExpression(node) || isArrowFunction(node) || isMethodOrAccessor(node) || isFunctionDeclaration(node) || isConstructorDeclaration(node); - } - function walkUp(node, kind) { - while (node && node.kind === kind) { - node = node.parent; - } - return node; - } - function walkUpParenthesizedTypes(node) { - return walkUp(node, 196 /* ParenthesizedType */); - } - function walkUpParenthesizedExpressions(node) { - return walkUp(node, 217 /* ParenthesizedExpression */); - } - function walkUpParenthesizedTypesAndGetParentAndChild(node) { - let child; - while (node && node.kind === 196 /* ParenthesizedType */) { - child = node; - node = node.parent; - } - return [child, node]; - } - function skipTypeParentheses(node) { - while (isParenthesizedTypeNode(node)) - node = node.type; - return node; - } - function skipParentheses(node, excludeJSDocTypeAssertions) { - const flags = excludeJSDocTypeAssertions ? 1 /* Parentheses */ | 16 /* ExcludeJSDocTypeAssertion */ : 1 /* Parentheses */; - return skipOuterExpressions(node, flags); - } - function isDeleteTarget(node) { - if (node.kind !== 211 /* PropertyAccessExpression */ && node.kind !== 212 /* ElementAccessExpression */) { - return false; - } - node = walkUpParenthesizedExpressions(node.parent); - return node && node.kind === 220 /* DeleteExpression */; - } - function isNodeDescendantOf(node, ancestor) { - while (node) { - if (node === ancestor) - return true; - node = node.parent; - } - return false; - } - function isDeclarationName(name) { - return !isSourceFile(name) && !isBindingPattern(name) && isDeclaration(name.parent) && name.parent.name === name; - } - function getDeclarationFromName(name) { - const parent2 = name.parent; - switch (name.kind) { - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 9 /* NumericLiteral */: - if (isComputedPropertyName(parent2)) - return parent2.parent; - case 80 /* Identifier */: - if (isDeclaration(parent2)) { - return parent2.name === name ? parent2 : void 0; - } else if (isQualifiedName(parent2)) { - const tag = parent2.parent; - return isJSDocParameterTag(tag) && tag.name === parent2 ? tag : void 0; - } else { - const binExp = parent2.parent; - return isBinaryExpression(binExp) && getAssignmentDeclarationKind(binExp) !== 0 /* None */ && (binExp.left.symbol || binExp.symbol) && getNameOfDeclaration(binExp) === name ? binExp : void 0; - } - case 81 /* PrivateIdentifier */: - return isDeclaration(parent2) && parent2.name === name ? parent2 : void 0; - default: - return void 0; - } - } - function isLiteralComputedPropertyDeclarationName(node) { - return isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ && isDeclaration(node.parent.parent); - } - function isIdentifierName(node) { - const parent2 = node.parent; - switch (parent2.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 306 /* EnumMember */: - case 303 /* PropertyAssignment */: - case 211 /* PropertyAccessExpression */: - return parent2.name === node; - case 166 /* QualifiedName */: - return parent2.right === node; - case 208 /* BindingElement */: - case 276 /* ImportSpecifier */: - return parent2.propertyName === node; - case 281 /* ExportSpecifier */: - case 291 /* JsxAttribute */: - case 285 /* JsxSelfClosingElement */: - case 286 /* JsxOpeningElement */: - case 287 /* JsxClosingElement */: - return true; - } - return false; - } - function isAliasSymbolDeclaration(node) { - if (node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node)) { - return true; - } - return isInJSFile(node) && (isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isPropertyAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableExpression(node.parent.right)); - } - function getAliasDeclarationFromName(node) { - switch (node.parent.kind) { - case 273 /* ImportClause */: - case 276 /* ImportSpecifier */: - case 274 /* NamespaceImport */: - case 281 /* ExportSpecifier */: - case 277 /* ExportAssignment */: - case 271 /* ImportEqualsDeclaration */: - case 280 /* NamespaceExport */: - return node.parent; - case 166 /* QualifiedName */: - do { - node = node.parent; - } while (node.parent.kind === 166 /* QualifiedName */); - return getAliasDeclarationFromName(node); - } - } - function isAliasableExpression(e) { - return isEntityNameExpression(e) || isClassExpression(e); - } - function exportAssignmentIsAlias(node) { - const e = getExportAssignmentExpression(node); - return isAliasableExpression(e); - } - function getExportAssignmentExpression(node) { - return isExportAssignment(node) ? node.expression : node.right; - } - function getPropertyAssignmentAliasLikeExpression(node) { - return node.kind === 304 /* ShorthandPropertyAssignment */ ? node.name : node.kind === 303 /* PropertyAssignment */ ? node.initializer : node.parent.right; - } - function getEffectiveBaseTypeNode(node) { - const baseType = getClassExtendsHeritageElement(node); - if (baseType && isInJSFile(node)) { - const tag = getJSDocAugmentsTag(node); - if (tag) { - return tag.class; - } - } - return baseType; - } - function getClassExtendsHeritageElement(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); - return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : void 0; - } - function getEffectiveImplementsTypeNodes(node) { - if (isInJSFile(node)) { - return getJSDocImplementsTags(node).map((n) => n.class); - } else { - const heritageClause = getHeritageClause(node.heritageClauses, 119 /* ImplementsKeyword */); - return heritageClause == null ? void 0 : heritageClause.types; - } - } - function getAllSuperTypeNodes(node) { - return isInterfaceDeclaration(node) ? getInterfaceBaseTypeNodes(node) || emptyArray : isClassLike(node) ? concatenate(singleElementArray(getEffectiveBaseTypeNode(node)), getEffectiveImplementsTypeNodes(node)) || emptyArray : emptyArray; - } - function getInterfaceBaseTypeNodes(node) { - const heritageClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); - return heritageClause ? heritageClause.types : void 0; - } - function getHeritageClause(clauses, kind) { - if (clauses) { - for (const clause of clauses) { - if (clause.token === kind) { - return clause; - } - } - } - return void 0; - } - function getAncestor(node, kind) { - while (node) { - if (node.kind === kind) { - return node; - } - node = node.parent; - } - return void 0; - } - function isKeyword(token) { - return 83 /* FirstKeyword */ <= token && token <= 165 /* LastKeyword */; - } - function isPunctuation(token) { - return 19 /* FirstPunctuation */ <= token && token <= 79 /* LastPunctuation */; - } - function isKeywordOrPunctuation(token) { - return isKeyword(token) || isPunctuation(token); - } - function isContextualKeyword(token) { - return 128 /* FirstContextualKeyword */ <= token && token <= 165 /* LastContextualKeyword */; - } - function isNonContextualKeyword(token) { - return isKeyword(token) && !isContextualKeyword(token); - } - function isFutureReservedKeyword(token) { - return 119 /* FirstFutureReservedWord */ <= token && token <= 127 /* LastFutureReservedWord */; - } - function isStringANonContextualKeyword(name) { - const token = stringToToken(name); - return token !== void 0 && isNonContextualKeyword(token); - } - function isStringAKeyword(name) { - const token = stringToToken(name); - return token !== void 0 && isKeyword(token); - } - function isIdentifierANonContextualKeyword(node) { - const originalKeywordKind = identifierToKeywordKind(node); - return !!originalKeywordKind && !isContextualKeyword(originalKeywordKind); - } - function isTrivia(token) { - return 2 /* FirstTriviaToken */ <= token && token <= 7 /* LastTriviaToken */; - } - function getFunctionFlags(node) { - if (!node) { - return 4 /* Invalid */; - } - let flags = 0 /* Normal */; - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - if (node.asteriskToken) { - flags |= 1 /* Generator */; - } - case 219 /* ArrowFunction */: - if (hasSyntacticModifier(node, 512 /* Async */)) { - flags |= 2 /* Async */; - } - break; - } - if (!node.body) { - flags |= 4 /* Invalid */; - } - return flags; - } - function isAsyncFunction(node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); - } - return false; - } - function isStringOrNumericLiteralLike(node) { - return isStringLiteralLike(node) || isNumericLiteral(node); - } - function isSignedNumericLiteral(node) { - return isPrefixUnaryExpression(node) && (node.operator === 40 /* PlusToken */ || node.operator === 41 /* MinusToken */) && isNumericLiteral(node.operand); - } - function hasDynamicName(declaration) { - const name = getNameOfDeclaration(declaration); - return !!name && isDynamicName(name); - } - function isDynamicName(name) { - if (!(name.kind === 167 /* ComputedPropertyName */ || name.kind === 212 /* ElementAccessExpression */)) { - return false; - } - const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; - return !isStringOrNumericLiteralLike(expr) && !isSignedNumericLiteral(expr); - } - function getPropertyNameForPropertyNameNode(name) { - switch (name.kind) { - case 80 /* Identifier */: - case 81 /* PrivateIdentifier */: - return name.escapedText; - case 11 /* StringLiteral */: - case 9 /* NumericLiteral */: - return escapeLeadingUnderscores(name.text); - case 167 /* ComputedPropertyName */: - const nameExpression = name.expression; - if (isStringOrNumericLiteralLike(nameExpression)) { - return escapeLeadingUnderscores(nameExpression.text); - } else if (isSignedNumericLiteral(nameExpression)) { - if (nameExpression.operator === 41 /* MinusToken */) { - return tokenToString(nameExpression.operator) + nameExpression.operand.text; - } - return nameExpression.operand.text; - } - return void 0; - case 295 /* JsxNamespacedName */: - return getEscapedTextOfJsxNamespacedName(name); - default: - return Debug.assertNever(name); - } - } - function isPropertyNameLiteral(node) { - switch (node.kind) { - case 80 /* Identifier */: - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 9 /* NumericLiteral */: - return true; - default: - return false; - } - } - function getTextOfIdentifierOrLiteral(node) { - return isMemberName(node) ? idText(node) : isJsxNamespacedName(node) ? getTextOfJsxNamespacedName(node) : node.text; - } - function getEscapedTextOfIdentifierOrLiteral(node) { - return isMemberName(node) ? node.escapedText : isJsxNamespacedName(node) ? getEscapedTextOfJsxNamespacedName(node) : escapeLeadingUnderscores(node.text); - } - function getPropertyNameForUniqueESSymbol(symbol) { - return `__@${getSymbolId(symbol)}@${symbol.escapedName}`; - } - function getSymbolNameForPrivateIdentifier(containingClassSymbol, description3) { - return `__#${getSymbolId(containingClassSymbol)}@${description3}`; - } - function isKnownSymbol(symbol) { - return startsWith(symbol.escapedName, "__@"); - } - function isPrivateIdentifierSymbol(symbol) { - return startsWith(symbol.escapedName, "__#"); - } - function isESSymbolIdentifier(node) { - return node.kind === 80 /* Identifier */ && node.escapedText === "Symbol"; - } - function isProtoSetter(node) { - return isIdentifier(node) ? idText(node) === "__proto__" : isStringLiteral(node) && node.text === "__proto__"; - } - function isAnonymousFunctionDefinition(node, cb) { - node = skipOuterExpressions(node); - switch (node.kind) { - case 231 /* ClassExpression */: - if (classHasDeclaredOrExplicitlyAssignedName(node)) { - return false; - } - break; - case 218 /* FunctionExpression */: - if (node.name) { - return false; - } - break; - case 219 /* ArrowFunction */: - break; - default: - return false; - } - return typeof cb === "function" ? cb(node) : true; - } - function isNamedEvaluationSource(node) { - switch (node.kind) { - case 303 /* PropertyAssignment */: - return !isProtoSetter(node.name); - case 304 /* ShorthandPropertyAssignment */: - return !!node.objectAssignmentInitializer; - case 260 /* VariableDeclaration */: - return isIdentifier(node.name) && !!node.initializer; - case 169 /* Parameter */: - return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 208 /* BindingElement */: - return isIdentifier(node.name) && !!node.initializer && !node.dotDotDotToken; - case 172 /* PropertyDeclaration */: - return !!node.initializer; - case 226 /* BinaryExpression */: - switch (node.operatorToken.kind) { - case 64 /* EqualsToken */: - case 77 /* AmpersandAmpersandEqualsToken */: - case 76 /* BarBarEqualsToken */: - case 78 /* QuestionQuestionEqualsToken */: - return isIdentifier(node.left); - } - break; - case 277 /* ExportAssignment */: - return true; - } - return false; - } - function isNamedEvaluation(node, cb) { - if (!isNamedEvaluationSource(node)) - return false; - switch (node.kind) { - case 303 /* PropertyAssignment */: - return isAnonymousFunctionDefinition(node.initializer, cb); - case 304 /* ShorthandPropertyAssignment */: - return isAnonymousFunctionDefinition(node.objectAssignmentInitializer, cb); - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: - return isAnonymousFunctionDefinition(node.initializer, cb); - case 226 /* BinaryExpression */: - return isAnonymousFunctionDefinition(node.right, cb); - case 277 /* ExportAssignment */: - return isAnonymousFunctionDefinition(node.expression, cb); - } - } - function isPushOrUnshiftIdentifier(node) { - return node.escapedText === "push" || node.escapedText === "unshift"; - } - function isParameterDeclaration(node) { - const root = getRootDeclaration(node); - return root.kind === 169 /* Parameter */; - } - function getRootDeclaration(node) { - while (node.kind === 208 /* BindingElement */) { - node = node.parent.parent; - } - return node; - } - function nodeStartsNewLexicalEnvironment(node) { - const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 218 /* FunctionExpression */ || kind === 262 /* FunctionDeclaration */ || kind === 219 /* ArrowFunction */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 267 /* ModuleDeclaration */ || kind === 312 /* SourceFile */; - } - function nodeIsSynthesized(range) { - return positionIsSynthesized(range.pos) || positionIsSynthesized(range.end); - } - function getOriginalSourceFile(sourceFile) { - return getParseTreeNode(sourceFile, isSourceFile) || sourceFile; - } - function getExpressionAssociativity(expression) { - const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; - return getOperatorAssociativity(expression.kind, operator, hasArguments); - } - function getOperatorAssociativity(kind, operator, hasArguments) { - switch (kind) { - case 214 /* NewExpression */: - return hasArguments ? 0 /* Left */ : 1 /* Right */; - case 224 /* PrefixUnaryExpression */: - case 221 /* TypeOfExpression */: - case 222 /* VoidExpression */: - case 220 /* DeleteExpression */: - case 223 /* AwaitExpression */: - case 227 /* ConditionalExpression */: - case 229 /* YieldExpression */: - return 1 /* Right */; - case 226 /* BinaryExpression */: - switch (operator) { - case 43 /* AsteriskAsteriskToken */: - case 64 /* EqualsToken */: - case 65 /* PlusEqualsToken */: - case 66 /* MinusEqualsToken */: - case 68 /* AsteriskAsteriskEqualsToken */: - case 67 /* AsteriskEqualsToken */: - case 69 /* SlashEqualsToken */: - case 70 /* PercentEqualsToken */: - case 71 /* LessThanLessThanEqualsToken */: - case 72 /* GreaterThanGreaterThanEqualsToken */: - case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 74 /* AmpersandEqualsToken */: - case 79 /* CaretEqualsToken */: - case 75 /* BarEqualsToken */: - case 76 /* BarBarEqualsToken */: - case 77 /* AmpersandAmpersandEqualsToken */: - case 78 /* QuestionQuestionEqualsToken */: - return 1 /* Right */; - } - } - return 0 /* Left */; - } - function getExpressionPrecedence(expression) { - const operator = getOperator(expression); - const hasArguments = expression.kind === 214 /* NewExpression */ && expression.arguments !== void 0; - return getOperatorPrecedence(expression.kind, operator, hasArguments); - } - function getOperator(expression) { - if (expression.kind === 226 /* BinaryExpression */) { - return expression.operatorToken.kind; - } else if (expression.kind === 224 /* PrefixUnaryExpression */ || expression.kind === 225 /* PostfixUnaryExpression */) { - return expression.operator; - } else { - return expression.kind; - } - } - function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) { - switch (nodeKind) { - case 361 /* CommaListExpression */: - return 0 /* Comma */; - case 230 /* SpreadElement */: - return 1 /* Spread */; - case 229 /* YieldExpression */: - return 2 /* Yield */; - case 227 /* ConditionalExpression */: - return 4 /* Conditional */; - case 226 /* BinaryExpression */: - switch (operatorKind) { - case 28 /* CommaToken */: - return 0 /* Comma */; - case 64 /* EqualsToken */: - case 65 /* PlusEqualsToken */: - case 66 /* MinusEqualsToken */: - case 68 /* AsteriskAsteriskEqualsToken */: - case 67 /* AsteriskEqualsToken */: - case 69 /* SlashEqualsToken */: - case 70 /* PercentEqualsToken */: - case 71 /* LessThanLessThanEqualsToken */: - case 72 /* GreaterThanGreaterThanEqualsToken */: - case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 74 /* AmpersandEqualsToken */: - case 79 /* CaretEqualsToken */: - case 75 /* BarEqualsToken */: - case 76 /* BarBarEqualsToken */: - case 77 /* AmpersandAmpersandEqualsToken */: - case 78 /* QuestionQuestionEqualsToken */: - return 3 /* Assignment */; - default: - return getBinaryOperatorPrecedence(operatorKind); - } - case 216 /* TypeAssertionExpression */: - case 235 /* NonNullExpression */: - case 224 /* PrefixUnaryExpression */: - case 221 /* TypeOfExpression */: - case 222 /* VoidExpression */: - case 220 /* DeleteExpression */: - case 223 /* AwaitExpression */: - return 16 /* Unary */; - case 225 /* PostfixUnaryExpression */: - return 17 /* Update */; - case 213 /* CallExpression */: - return 18 /* LeftHandSide */; - case 214 /* NewExpression */: - return hasArguments ? 19 /* Member */ : 18 /* LeftHandSide */; - case 215 /* TaggedTemplateExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - case 236 /* MetaProperty */: - return 19 /* Member */; - case 234 /* AsExpression */: - case 238 /* SatisfiesExpression */: - return 11 /* Relational */; - case 110 /* ThisKeyword */: - case 108 /* SuperKeyword */: - case 80 /* Identifier */: - case 81 /* PrivateIdentifier */: - case 106 /* NullKeyword */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 11 /* StringLiteral */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 231 /* ClassExpression */: - case 14 /* RegularExpressionLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: - case 217 /* ParenthesizedExpression */: - case 232 /* OmittedExpression */: - case 284 /* JsxElement */: - case 285 /* JsxSelfClosingElement */: - case 288 /* JsxFragment */: - return 20 /* Primary */; - default: - return -1 /* Invalid */; - } - } - function getBinaryOperatorPrecedence(kind) { - switch (kind) { - case 61 /* QuestionQuestionToken */: - return 4 /* Coalesce */; - case 57 /* BarBarToken */: - return 5 /* LogicalOR */; - case 56 /* AmpersandAmpersandToken */: - return 6 /* LogicalAND */; - case 52 /* BarToken */: - return 7 /* BitwiseOR */; - case 53 /* CaretToken */: - return 8 /* BitwiseXOR */; - case 51 /* AmpersandToken */: - return 9 /* BitwiseAND */; - case 35 /* EqualsEqualsToken */: - case 36 /* ExclamationEqualsToken */: - case 37 /* EqualsEqualsEqualsToken */: - case 38 /* ExclamationEqualsEqualsToken */: - return 10 /* Equality */; - case 30 /* LessThanToken */: - case 32 /* GreaterThanToken */: - case 33 /* LessThanEqualsToken */: - case 34 /* GreaterThanEqualsToken */: - case 104 /* InstanceOfKeyword */: - case 103 /* InKeyword */: - case 130 /* AsKeyword */: - case 152 /* SatisfiesKeyword */: - return 11 /* Relational */; - case 48 /* LessThanLessThanToken */: - case 49 /* GreaterThanGreaterThanToken */: - case 50 /* GreaterThanGreaterThanGreaterThanToken */: - return 12 /* Shift */; - case 40 /* PlusToken */: - case 41 /* MinusToken */: - return 13 /* Additive */; - case 42 /* AsteriskToken */: - case 44 /* SlashToken */: - case 45 /* PercentToken */: - return 14 /* Multiplicative */; - case 43 /* AsteriskAsteriskToken */: - return 15 /* Exponentiation */; - } - return -1; - } - function getSemanticJsxChildren(children) { - return filter(children, (i) => { - switch (i.kind) { - case 294 /* JsxExpression */: - return !!i.expression; - case 12 /* JsxText */: - return !i.containsOnlyTriviaWhiteSpaces; - default: - return true; - } - }); - } - function createDiagnosticCollection() { - let nonFileDiagnostics = []; - const filesWithDiagnostics = []; - const fileDiagnostics = /* @__PURE__ */ new Map(); - let hasReadNonFileDiagnostics = false; - return { - add, - lookup, - getGlobalDiagnostics, - getDiagnostics: getDiagnostics2 - }; - function lookup(diagnostic) { - let diagnostics; - if (diagnostic.file) { - diagnostics = fileDiagnostics.get(diagnostic.file.fileName); - } else { - diagnostics = nonFileDiagnostics; - } - if (!diagnostics) { - return void 0; - } - const result = binarySearch(diagnostics, diagnostic, identity, compareDiagnosticsSkipRelatedInformation); - if (result >= 0) { - return diagnostics[result]; - } - return void 0; - } - function add(diagnostic) { - let diagnostics; - if (diagnostic.file) { - diagnostics = fileDiagnostics.get(diagnostic.file.fileName); - if (!diagnostics) { - diagnostics = []; - fileDiagnostics.set(diagnostic.file.fileName, diagnostics); - insertSorted(filesWithDiagnostics, diagnostic.file.fileName, compareStringsCaseSensitive); - } - } else { - if (hasReadNonFileDiagnostics) { - hasReadNonFileDiagnostics = false; - nonFileDiagnostics = nonFileDiagnostics.slice(); - } - diagnostics = nonFileDiagnostics; - } - insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation); - } - function getGlobalDiagnostics() { - hasReadNonFileDiagnostics = true; - return nonFileDiagnostics; - } - function getDiagnostics2(fileName) { - if (fileName) { - return fileDiagnostics.get(fileName) || []; - } - const fileDiags = flatMapToMutable(filesWithDiagnostics, (f) => fileDiagnostics.get(f)); - if (!nonFileDiagnostics.length) { - return fileDiags; - } - fileDiags.unshift(...nonFileDiagnostics); - return fileDiags; - } - } - function escapeTemplateSubstitution(str) { - return str.replace(templateSubstitutionRegExp, "\\${"); - } - function hasInvalidEscape(template) { - return template && !!(isNoSubstitutionTemplateLiteral(template) ? template.templateFlags : template.head.templateFlags || some(template.templateSpans, (span) => !!span.literal.templateFlags)); - } - function encodeUtf16EscapeSequence(charCode) { - const hexCharCode = charCode.toString(16).toUpperCase(); - const paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - function getReplacement(c, offset, input) { - if (c.charCodeAt(0) === 0 /* nullCharacter */) { - const lookAhead = input.charCodeAt(offset + c.length); - if (lookAhead >= 48 /* _0 */ && lookAhead <= 57 /* _9 */) { - return "\\x00"; - } - return "\\0"; - } - return escapedCharsMap.get(c) || encodeUtf16EscapeSequence(c.charCodeAt(0)); - } - function escapeString(s, quoteChar) { - const escapedCharsRegExp = quoteChar === 96 /* backtick */ ? backtickQuoteEscapedCharsRegExp : quoteChar === 39 /* singleQuote */ ? singleQuoteEscapedCharsRegExp : doubleQuoteEscapedCharsRegExp; - return s.replace(escapedCharsRegExp, getReplacement); - } - function escapeNonAsciiString(s, quoteChar) { - s = escapeString(s, quoteChar); - return nonAsciiCharacters.test(s) ? s.replace(nonAsciiCharacters, (c) => encodeUtf16EscapeSequence(c.charCodeAt(0))) : s; - } - function encodeJsxCharacterEntity(charCode) { - const hexCharCode = charCode.toString(16).toUpperCase(); - return "&#x" + hexCharCode + ";"; - } - function getJsxAttributeStringReplacement(c) { - if (c.charCodeAt(0) === 0 /* nullCharacter */) { - return "�"; - } - return jsxEscapedCharsMap.get(c) || encodeJsxCharacterEntity(c.charCodeAt(0)); - } - function escapeJsxAttributeString(s, quoteChar) { - const escapedCharsRegExp = quoteChar === 39 /* singleQuote */ ? jsxSingleQuoteEscapedCharsRegExp : jsxDoubleQuoteEscapedCharsRegExp; - return s.replace(escapedCharsRegExp, getJsxAttributeStringReplacement); - } - function stripQuotes(name) { - const length2 = name.length; - if (length2 >= 2 && name.charCodeAt(0) === name.charCodeAt(length2 - 1) && isQuoteOrBacktick(name.charCodeAt(0))) { - return name.substring(1, length2 - 1); - } - return name; - } - function isQuoteOrBacktick(charCode) { - return charCode === 39 /* singleQuote */ || charCode === 34 /* doubleQuote */ || charCode === 96 /* backtick */; - } - function isIntrinsicJsxName(name) { - const ch = name.charCodeAt(0); - return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-"); - } - function getIndentString(level) { - const singleLevel = indentStrings[1]; - for (let current = indentStrings.length; current <= level; current++) { - indentStrings.push(indentStrings[current - 1] + singleLevel); - } - return indentStrings[level]; - } - function getIndentSize() { - return indentStrings[1].length; - } - function isNightly() { - return stringContains(version, "-dev") || stringContains(version, "-insiders"); - } - function createTextWriter(newLine) { - var output; - var indent3; - var lineStart; - var lineCount; - var linePos; - var hasTrailingComment = false; - function updateLineCountAndPosFor(s) { - const lineStartsOfS = computeLineStarts(s); - if (lineStartsOfS.length > 1) { - lineCount = lineCount + lineStartsOfS.length - 1; - linePos = output.length - s.length + last(lineStartsOfS); - lineStart = linePos - output.length === 0; - } else { - lineStart = false; - } - } - function writeText(s) { - if (s && s.length) { - if (lineStart) { - s = getIndentString(indent3) + s; - lineStart = false; - } - output += s; - updateLineCountAndPosFor(s); - } - } - function write(s) { - if (s) - hasTrailingComment = false; - writeText(s); - } - function writeComment(s) { - if (s) - hasTrailingComment = true; - writeText(s); - } - function reset2() { - output = ""; - indent3 = 0; - lineStart = true; - lineCount = 0; - linePos = 0; - hasTrailingComment = false; - } - function rawWrite(s) { - if (s !== void 0) { - output += s; - updateLineCountAndPosFor(s); - hasTrailingComment = false; - } - } - function writeLiteral(s) { - if (s && s.length) { - write(s); - } - } - function writeLine(force) { - if (!lineStart || force) { - output += newLine; - lineCount++; - linePos = output.length; - lineStart = true; - hasTrailingComment = false; - } - } - function getTextPosWithWriteLine() { - return lineStart ? output.length : output.length + newLine.length; - } - reset2(); - return { - write, - rawWrite, - writeLiteral, - writeLine, - increaseIndent: () => { - indent3++; - }, - decreaseIndent: () => { - indent3--; - }, - getIndent: () => indent3, - getTextPos: () => output.length, - getLine: () => lineCount, - getColumn: () => lineStart ? indent3 * getIndentSize() : output.length - linePos, - getText: () => output, - isAtStartOfLine: () => lineStart, - hasTrailingComment: () => hasTrailingComment, - hasTrailingWhitespace: () => !!output.length && isWhiteSpaceLike(output.charCodeAt(output.length - 1)), - clear: reset2, - writeKeyword: write, - writeOperator: write, - writeParameter: write, - writeProperty: write, - writePunctuation: write, - writeSpace: write, - writeStringLiteral: write, - writeSymbol: (s, _) => write(s), - writeTrailingSemicolon: write, - writeComment, - getTextPosWithWriteLine - }; - } - function getTrailingSemicolonDeferringWriter(writer) { - let pendingTrailingSemicolon = false; - function commitPendingTrailingSemicolon() { - if (pendingTrailingSemicolon) { - writer.writeTrailingSemicolon(";"); - pendingTrailingSemicolon = false; - } - } - return { - ...writer, - writeTrailingSemicolon() { - pendingTrailingSemicolon = true; - }, - writeLiteral(s) { - commitPendingTrailingSemicolon(); - writer.writeLiteral(s); - }, - writeStringLiteral(s) { - commitPendingTrailingSemicolon(); - writer.writeStringLiteral(s); - }, - writeSymbol(s, sym) { - commitPendingTrailingSemicolon(); - writer.writeSymbol(s, sym); - }, - writePunctuation(s) { - commitPendingTrailingSemicolon(); - writer.writePunctuation(s); - }, - writeKeyword(s) { - commitPendingTrailingSemicolon(); - writer.writeKeyword(s); - }, - writeOperator(s) { - commitPendingTrailingSemicolon(); - writer.writeOperator(s); - }, - writeParameter(s) { - commitPendingTrailingSemicolon(); - writer.writeParameter(s); - }, - writeSpace(s) { - commitPendingTrailingSemicolon(); - writer.writeSpace(s); - }, - writeProperty(s) { - commitPendingTrailingSemicolon(); - writer.writeProperty(s); - }, - writeComment(s) { - commitPendingTrailingSemicolon(); - writer.writeComment(s); - }, - writeLine() { - commitPendingTrailingSemicolon(); - writer.writeLine(); - }, - increaseIndent() { - commitPendingTrailingSemicolon(); - writer.increaseIndent(); - }, - decreaseIndent() { - commitPendingTrailingSemicolon(); - writer.decreaseIndent(); - } - }; - } - function hostUsesCaseSensitiveFileNames(host) { - return host.useCaseSensitiveFileNames ? host.useCaseSensitiveFileNames() : false; - } - function hostGetCanonicalFileName(host) { - return createGetCanonicalFileName(hostUsesCaseSensitiveFileNames(host)); - } - function getResolvedExternalModuleName(host, file, referenceFile) { - return file.moduleName || getExternalModuleNameFromPath(host, file.fileName, referenceFile && referenceFile.fileName); - } - function getCanonicalAbsolutePath(host, path) { - return host.getCanonicalFileName(getNormalizedAbsolutePath(path, host.getCurrentDirectory())); - } - function getExternalModuleNameFromDeclaration(host, resolver, declaration) { - const file = resolver.getExternalModuleFileFromDeclaration(declaration); - if (!file || file.isDeclarationFile) { - return void 0; - } - const specifier = getExternalModuleName(declaration); - if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && getCanonicalAbsolutePath(host, file.path).indexOf(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory()))) === -1) { - return void 0; - } - return getResolvedExternalModuleName(host, file); - } - function getExternalModuleNameFromPath(host, fileName, referencePath) { - const getCanonicalFileName = (f) => host.getCanonicalFileName(f); - const dir = toPath(referencePath ? getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName); - const filePath = getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); - const relativePath = getRelativePathToDirectoryOrUrl( - dir, - filePath, - dir, - getCanonicalFileName, - /*isAbsolutePathAnUrl*/ - false - ); - const extensionless = removeFileExtension(relativePath); - return referencePath ? ensurePathIsNonModuleName(extensionless) : extensionless; - } - function getOwnEmitOutputFilePath(fileName, host, extension) { - const compilerOptions = host.getCompilerOptions(); - let emitOutputFilePathWithoutExtension; - if (compilerOptions.outDir) { - emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(fileName, host, compilerOptions.outDir)); - } else { - emitOutputFilePathWithoutExtension = removeFileExtension(fileName); - } - return emitOutputFilePathWithoutExtension + extension; - } - function getDeclarationEmitOutputFilePath(fileName, host) { - return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)); - } - function getDeclarationEmitOutputFilePathWorker(fileName, options, currentDirectory, commonSourceDirectory, getCanonicalFileName) { - const outputDir = options.declarationDir || options.outDir; - const path = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName) : fileName; - const declarationExtension = getDeclarationEmitExtensionForPath(path); - return removeFileExtension(path) + declarationExtension; - } - function getDeclarationEmitExtensionForPath(path) { - return fileExtensionIsOneOf(path, [".mjs" /* Mjs */, ".mts" /* Mts */]) ? ".d.mts" /* Dmts */ : fileExtensionIsOneOf(path, [".cjs" /* Cjs */, ".cts" /* Cts */]) ? ".d.cts" /* Dcts */ : fileExtensionIsOneOf(path, [".json" /* Json */]) ? `.d.json.ts` : ( - // Drive-by redefinition of json declaration file output name so if it's ever enabled, it behaves well - ".d.ts" /* Dts */ - ); - } - function getPossibleOriginalInputExtensionForExtension(path) { - return fileExtensionIsOneOf(path, [".d.mts" /* Dmts */, ".mjs" /* Mjs */, ".mts" /* Mts */]) ? [".mts" /* Mts */, ".mjs" /* Mjs */] : fileExtensionIsOneOf(path, [".d.cts" /* Dcts */, ".cjs" /* Cjs */, ".cts" /* Cts */]) ? [".cts" /* Cts */, ".cjs" /* Cjs */] : fileExtensionIsOneOf(path, [`.d.json.ts`]) ? [".json" /* Json */] : [".tsx" /* Tsx */, ".ts" /* Ts */, ".jsx" /* Jsx */, ".js" /* Js */]; - } - function outFile(options) { - return options.outFile || options.out; - } - function getPathsBasePath(options, host) { - var _a; - if (!options.paths) - return void 0; - return options.baseUrl ?? Debug.checkDefined(options.pathsBasePath || ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)), "Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'."); - } - function getSourceFilesToEmit(host, targetSourceFile, forceDtsEmit) { - const options = host.getCompilerOptions(); - if (outFile(options)) { - const moduleKind = getEmitModuleKind(options); - const moduleEmitEnabled = options.emitDeclarationOnly || moduleKind === 2 /* AMD */ || moduleKind === 4 /* System */; - return filter( - host.getSourceFiles(), - (sourceFile) => (moduleEmitEnabled || !isExternalModule(sourceFile)) && sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) - ); - } else { - const sourceFiles = targetSourceFile === void 0 ? host.getSourceFiles() : [targetSourceFile]; - return filter( - sourceFiles, - (sourceFile) => sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) - ); - } - } - function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) { - const options = host.getCompilerOptions(); - return !(options.noEmitForJsFiles && isSourceFileJS(sourceFile)) && !sourceFile.isDeclarationFile && !host.isSourceFileFromExternalLibrary(sourceFile) && (forceDtsEmit || !(isJsonSourceFile(sourceFile) && host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) && !host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)); - } - function getSourceFilePathInNewDir(fileName, host, newDirPath) { - return getSourceFilePathInNewDirWorker(fileName, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)); - } - function getSourceFilePathInNewDirWorker(fileName, newDirPath, currentDirectory, commonSourceDirectory, getCanonicalFileName) { - let sourceFilePath = getNormalizedAbsolutePath(fileName, currentDirectory); - const isSourceFileInCommonSourceDirectory = getCanonicalFileName(sourceFilePath).indexOf(getCanonicalFileName(commonSourceDirectory)) === 0; - sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath; - return combinePaths(newDirPath, sourceFilePath); - } - function writeFile(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) { - host.writeFile(fileName, text, writeByteOrderMark, (hostErrorMessage) => { - diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); - }, sourceFiles, data); - } - function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { - if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { - const parentDirectory = getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory, createDirectory, directoryExists); - createDirectory(directoryPath); - } - } - function writeFileEnsuringDirectories(path, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) { - try { - writeFile2(path, data, writeByteOrderMark); - } catch { - ensureDirectoriesExist(getDirectoryPath(normalizePath(path)), createDirectory, directoryExists); - writeFile2(path, data, writeByteOrderMark); - } - } - function getLineOfLocalPosition(sourceFile, pos) { - const lineStarts = getLineStarts(sourceFile); - return computeLineOfPosition(lineStarts, pos); - } - function getLineOfLocalPositionFromLineMap(lineMap, pos) { - return computeLineOfPosition(lineMap, pos); - } - function getFirstConstructorWithBody(node) { - return find(node.members, (member) => isConstructorDeclaration(member) && nodeIsPresent(member.body)); - } - function getSetAccessorValueParameter(accessor) { - if (accessor && accessor.parameters.length > 0) { - const hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]); - return accessor.parameters[hasThis ? 1 : 0]; - } - } - function getSetAccessorTypeAnnotationNode(accessor) { - const parameter = getSetAccessorValueParameter(accessor); - return parameter && parameter.type; - } - function getThisParameter(signature) { - if (signature.parameters.length && !isJSDocSignature(signature)) { - const thisParameter = signature.parameters[0]; - if (parameterIsThisKeyword(thisParameter)) { - return thisParameter; - } - } - } - function parameterIsThisKeyword(parameter) { - return isThisIdentifier(parameter.name); - } - function isThisIdentifier(node) { - return !!node && node.kind === 80 /* Identifier */ && identifierIsThisKeyword(node); - } - function isInTypeQuery(node) { - return !!findAncestor( - node, - (n) => n.kind === 186 /* TypeQuery */ ? true : n.kind === 80 /* Identifier */ || n.kind === 166 /* QualifiedName */ ? false : "quit" - ); - } - function isThisInTypeQuery(node) { - if (!isThisIdentifier(node)) { - return false; - } - while (isQualifiedName(node.parent) && node.parent.left === node) { - node = node.parent; - } - return node.parent.kind === 186 /* TypeQuery */; - } - function identifierIsThisKeyword(id) { - return id.escapedText === "this"; - } - function getAllAccessorDeclarations(declarations, accessor) { - let firstAccessor; - let secondAccessor; - let getAccessor; - let setAccessor; - if (hasDynamicName(accessor)) { - firstAccessor = accessor; - if (accessor.kind === 177 /* GetAccessor */) { - getAccessor = accessor; - } else if (accessor.kind === 178 /* SetAccessor */) { - setAccessor = accessor; - } else { - Debug.fail("Accessor has wrong kind"); - } - } else { - forEach(declarations, (member) => { - if (isAccessor(member) && isStatic(member) === isStatic(accessor)) { - const memberName = getPropertyNameForPropertyNameNode(member.name); - const accessorName = getPropertyNameForPropertyNameNode(accessor.name); - if (memberName === accessorName) { - if (!firstAccessor) { - firstAccessor = member; - } else if (!secondAccessor) { - secondAccessor = member; - } - if (member.kind === 177 /* GetAccessor */ && !getAccessor) { - getAccessor = member; - } - if (member.kind === 178 /* SetAccessor */ && !setAccessor) { - setAccessor = member; - } - } - } - }); - } - return { - firstAccessor, - secondAccessor, - getAccessor, - setAccessor - }; - } - function getEffectiveTypeAnnotationNode(node) { - if (!isInJSFile(node) && isFunctionDeclaration(node)) - return void 0; - const type = node.type; - if (type || !isInJSFile(node)) - return type; - return isJSDocPropertyLikeTag(node) ? node.typeExpression && node.typeExpression.type : getJSDocType(node); - } - function getTypeAnnotationNode(node) { - return node.type; - } - function getEffectiveReturnTypeNode(node) { - return isJSDocSignature(node) ? node.type && node.type.typeExpression && node.type.typeExpression.type : node.type || (isInJSFile(node) ? getJSDocReturnType(node) : void 0); - } - function getJSDocTypeParameterDeclarations(node) { - return flatMap(getJSDocTags(node), (tag) => isNonTypeAliasTemplate(tag) ? tag.typeParameters : void 0); - } - function isNonTypeAliasTemplate(tag) { - return isJSDocTemplateTag(tag) && !(tag.parent.kind === 327 /* JSDoc */ && (tag.parent.tags.some(isJSDocTypeAlias) || tag.parent.tags.some(isJSDocOverloadTag))); - } - function getEffectiveSetAccessorTypeAnnotationNode(node) { - const parameter = getSetAccessorValueParameter(node); - return parameter && getEffectiveTypeAnnotationNode(parameter); - } - function emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments) { - emitNewLineBeforeLeadingCommentsOfPosition(lineMap, writer, node.pos, leadingComments); - } - function emitNewLineBeforeLeadingCommentsOfPosition(lineMap, writer, pos, leadingComments) { - if (leadingComments && leadingComments.length && pos !== leadingComments[0].pos && getLineOfLocalPositionFromLineMap(lineMap, pos) !== getLineOfLocalPositionFromLineMap(lineMap, leadingComments[0].pos)) { - writer.writeLine(); - } - } - function emitNewLineBeforeLeadingCommentOfPosition(lineMap, writer, pos, commentPos) { - if (pos !== commentPos && getLineOfLocalPositionFromLineMap(lineMap, pos) !== getLineOfLocalPositionFromLineMap(lineMap, commentPos)) { - writer.writeLine(); - } - } - function emitComments(text, lineMap, writer, comments, leadingSeparator, trailingSeparator, newLine, writeComment) { - if (comments && comments.length > 0) { - if (leadingSeparator) { - writer.writeSpace(" "); - } - let emitInterveningSeparator = false; - for (const comment of comments) { - if (emitInterveningSeparator) { - writer.writeSpace(" "); - emitInterveningSeparator = false; - } - writeComment(text, lineMap, writer, comment.pos, comment.end, newLine); - if (comment.hasTrailingNewLine) { - writer.writeLine(); - } else { - emitInterveningSeparator = true; - } - } - if (emitInterveningSeparator && trailingSeparator) { - writer.writeSpace(" "); - } - } - } - function emitDetachedComments(text, lineMap, writer, writeComment, node, newLine, removeComments) { - let leadingComments; - let currentDetachedCommentInfo; - if (removeComments) { - if (node.pos === 0) { - leadingComments = filter(getLeadingCommentRanges(text, node.pos), isPinnedCommentLocal); - } - } else { - leadingComments = getLeadingCommentRanges(text, node.pos); - } - if (leadingComments) { - const detachedComments = []; - let lastComment; - for (const comment of leadingComments) { - if (lastComment) { - const lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, lastComment.end); - const commentLine = getLineOfLocalPositionFromLineMap(lineMap, comment.pos); - if (commentLine >= lastCommentLine + 2) { - break; - } - } - detachedComments.push(comment); - lastComment = comment; - } - if (detachedComments.length) { - const lastCommentLine = getLineOfLocalPositionFromLineMap(lineMap, last(detachedComments).end); - const nodeLine = getLineOfLocalPositionFromLineMap(lineMap, skipTrivia(text, node.pos)); - if (nodeLine >= lastCommentLine + 2) { - emitNewLineBeforeLeadingComments(lineMap, writer, node, leadingComments); - emitComments( - text, - lineMap, - writer, - detachedComments, - /*leadingSeparator*/ - false, - /*trailingSeparator*/ - true, - newLine, - writeComment - ); - currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: last(detachedComments).end }; - } - } - } - return currentDetachedCommentInfo; - function isPinnedCommentLocal(comment) { - return isPinnedComment(text, comment.pos); - } - } - function writeCommentRange(text, lineMap, writer, commentPos, commentEnd, newLine) { - if (text.charCodeAt(commentPos + 1) === 42 /* asterisk */) { - const firstCommentLineAndCharacter = computeLineAndCharacterOfPosition(lineMap, commentPos); - const lineCount = lineMap.length; - let firstCommentLineIndent; - for (let pos = commentPos, currentLine = firstCommentLineAndCharacter.line; pos < commentEnd; currentLine++) { - const nextLineStart = currentLine + 1 === lineCount ? text.length + 1 : lineMap[currentLine + 1]; - if (pos !== commentPos) { - if (firstCommentLineIndent === void 0) { - firstCommentLineIndent = calculateIndent(text, lineMap[firstCommentLineAndCharacter.line], commentPos); - } - const currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); - const spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(text, pos, nextLineStart); - if (spacesToEmit > 0) { - let numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); - const indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); - writer.rawWrite(indentSizeSpaceString); - while (numberOfSingleSpacesToEmit) { - writer.rawWrite(" "); - numberOfSingleSpacesToEmit--; - } - } else { - writer.rawWrite(""); - } - } - writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart); - pos = nextLineStart; - } - } else { - writer.writeComment(text.substring(commentPos, commentEnd)); - } - } - function writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart) { - const end = Math.min(commentEnd, nextLineStart - 1); - const currentLineText = trimString(text.substring(pos, end)); - if (currentLineText) { - writer.writeComment(currentLineText); - if (end !== commentEnd) { - writer.writeLine(); - } - } else { - writer.rawWrite(newLine); - } - } - function calculateIndent(text, pos, end) { - let currentLineIndent = 0; - for (; pos < end && isWhiteSpaceSingleLine(text.charCodeAt(pos)); pos++) { - if (text.charCodeAt(pos) === 9 /* tab */) { - currentLineIndent += getIndentSize() - currentLineIndent % getIndentSize(); - } else { - currentLineIndent++; - } - } - return currentLineIndent; - } - function hasEffectiveModifiers(node) { - return getEffectiveModifierFlags(node) !== 0 /* None */; - } - function hasSyntacticModifiers(node) { - return getSyntacticModifierFlags(node) !== 0 /* None */; - } - function hasEffectiveModifier(node, flags) { - return !!getSelectedEffectiveModifierFlags(node, flags); - } - function hasSyntacticModifier(node, flags) { - return !!getSelectedSyntacticModifierFlags(node, flags); - } - function isStatic(node) { - return isClassElement(node) && hasStaticModifier(node) || isClassStaticBlockDeclaration(node); - } - function hasStaticModifier(node) { - return hasSyntacticModifier(node, 32 /* Static */); - } - function hasOverrideModifier(node) { - return hasEffectiveModifier(node, 16384 /* Override */); - } - function hasAbstractModifier(node) { - return hasSyntacticModifier(node, 256 /* Abstract */); - } - function hasAmbientModifier(node) { - return hasSyntacticModifier(node, 2 /* Ambient */); - } - function hasAccessorModifier(node) { - return hasSyntacticModifier(node, 128 /* Accessor */); - } - function hasEffectiveReadonlyModifier(node) { - return hasEffectiveModifier(node, 64 /* Readonly */); - } - function hasDecorators(node) { - return hasSyntacticModifier(node, 131072 /* Decorator */); - } - function getSelectedEffectiveModifierFlags(node, flags) { - return getEffectiveModifierFlags(node) & flags; - } - function getSelectedSyntacticModifierFlags(node, flags) { - return getSyntacticModifierFlags(node) & flags; - } - function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { - if (node.kind >= 0 /* FirstToken */ && node.kind <= 165 /* LastToken */) { - return 0 /* None */; - } - if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { - node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | 536870912 /* HasComputedFlags */; - } - if (includeJSDoc && !(node.modifierFlagsCache & 4096 /* HasComputedJSDocModifiers */) && (alwaysIncludeJSDoc || isInJSFile(node)) && node.parent) { - node.modifierFlagsCache |= getJSDocModifierFlagsNoCache(node) | 4096 /* HasComputedJSDocModifiers */; - } - return node.modifierFlagsCache & ~(536870912 /* HasComputedFlags */ | 4096 /* HasComputedJSDocModifiers */); - } - function getEffectiveModifierFlags(node) { - return getModifierFlagsWorker( - node, - /*includeJSDoc*/ - true - ); - } - function getEffectiveModifierFlagsAlwaysIncludeJSDoc(node) { - return getModifierFlagsWorker( - node, - /*includeJSDoc*/ - true, - /*alwaysIncludeJSDoc*/ - true - ); - } - function getSyntacticModifierFlags(node) { - return getModifierFlagsWorker( - node, - /*includeJSDoc*/ - false - ); - } - function getJSDocModifierFlagsNoCache(node) { - let flags = 0 /* None */; - if (!!node.parent && !isParameter(node)) { - if (isInJSFile(node)) { - if (getJSDocPublicTagNoCache(node)) - flags |= 4 /* Public */; - if (getJSDocPrivateTagNoCache(node)) - flags |= 8 /* Private */; - if (getJSDocProtectedTagNoCache(node)) - flags |= 16 /* Protected */; - if (getJSDocReadonlyTagNoCache(node)) - flags |= 64 /* Readonly */; - if (getJSDocOverrideTagNoCache(node)) - flags |= 16384 /* Override */; - } - if (getJSDocDeprecatedTagNoCache(node)) - flags |= 8192 /* Deprecated */; - } - return flags; - } - function getEffectiveModifierFlagsNoCache(node) { - return getSyntacticModifierFlagsNoCache(node) | getJSDocModifierFlagsNoCache(node); - } - function getSyntacticModifierFlagsNoCache(node) { - let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; - if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { - flags |= 1 /* Export */; - } - return flags; - } - function modifiersToFlags(modifiers) { - let flags = 0 /* None */; - if (modifiers) { - for (const modifier of modifiers) { - flags |= modifierToFlag(modifier.kind); - } - } - return flags; - } - function modifierToFlag(token) { - switch (token) { - case 126 /* StaticKeyword */: - return 32 /* Static */; - case 125 /* PublicKeyword */: - return 4 /* Public */; - case 124 /* ProtectedKeyword */: - return 16 /* Protected */; - case 123 /* PrivateKeyword */: - return 8 /* Private */; - case 128 /* AbstractKeyword */: - return 256 /* Abstract */; - case 129 /* AccessorKeyword */: - return 128 /* Accessor */; - case 95 /* ExportKeyword */: - return 1 /* Export */; - case 138 /* DeclareKeyword */: - return 2 /* Ambient */; - case 87 /* ConstKeyword */: - return 2048 /* Const */; - case 90 /* DefaultKeyword */: - return 1024 /* Default */; - case 134 /* AsyncKeyword */: - return 512 /* Async */; - case 148 /* ReadonlyKeyword */: - return 64 /* Readonly */; - case 164 /* OverrideKeyword */: - return 16384 /* Override */; - case 103 /* InKeyword */: - return 32768 /* In */; - case 147 /* OutKeyword */: - return 65536 /* Out */; - case 170 /* Decorator */: - return 131072 /* Decorator */; - } - return 0 /* None */; - } - function isBinaryLogicalOperator(token) { - return token === 57 /* BarBarToken */ || token === 56 /* AmpersandAmpersandToken */; - } - function isLogicalOperator(token) { - return isBinaryLogicalOperator(token) || token === 54 /* ExclamationToken */; - } - function isLogicalOrCoalescingAssignmentOperator(token) { - return token === 76 /* BarBarEqualsToken */ || token === 77 /* AmpersandAmpersandEqualsToken */ || token === 78 /* QuestionQuestionEqualsToken */; - } - function isLogicalOrCoalescingAssignmentExpression(expr) { - return isBinaryExpression(expr) && isLogicalOrCoalescingAssignmentOperator(expr.operatorToken.kind); - } - function isLogicalOrCoalescingBinaryOperator(token) { - return isBinaryLogicalOperator(token) || token === 61 /* QuestionQuestionToken */; - } - function isLogicalOrCoalescingBinaryExpression(expr) { - return isBinaryExpression(expr) && isLogicalOrCoalescingBinaryOperator(expr.operatorToken.kind); - } - function isAssignmentOperator(token) { - return token >= 64 /* FirstAssignment */ && token <= 79 /* LastAssignment */; - } - function tryGetClassExtendingExpressionWithTypeArguments(node) { - const cls = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); - return cls && !cls.isImplements ? cls.class : void 0; - } - function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node) { - if (isExpressionWithTypeArguments(node)) { - if (isHeritageClause(node.parent) && isClassLike(node.parent.parent)) { - return { class: node.parent.parent, isImplements: node.parent.token === 119 /* ImplementsKeyword */ }; - } - if (isJSDocAugmentsTag(node.parent)) { - const host = getEffectiveJSDocHost(node.parent); - if (host && isClassLike(host)) { - return { class: host, isImplements: false }; - } - } - } - return void 0; - } - function isAssignmentExpression(node, excludeCompoundAssignment) { - return isBinaryExpression(node) && (excludeCompoundAssignment ? node.operatorToken.kind === 64 /* EqualsToken */ : isAssignmentOperator(node.operatorToken.kind)) && isLeftHandSideExpression(node.left); - } - function isLeftHandSideOfAssignment(node) { - return isAssignmentExpression(node.parent) && node.parent.left === node; - } - function isDestructuringAssignment(node) { - if (isAssignmentExpression( - node, - /*excludeCompoundAssignment*/ - true - )) { - const kind = node.left.kind; - return kind === 210 /* ObjectLiteralExpression */ || kind === 209 /* ArrayLiteralExpression */; - } - return false; - } - function isExpressionWithTypeArgumentsInClassExtendsClause(node) { - return tryGetClassExtendingExpressionWithTypeArguments(node) !== void 0; - } - function isEntityNameExpression(node) { - return node.kind === 80 /* Identifier */ || isPropertyAccessEntityNameExpression(node); - } - function getFirstIdentifier(node) { - switch (node.kind) { - case 80 /* Identifier */: - return node; - case 166 /* QualifiedName */: - do { - node = node.left; - } while (node.kind !== 80 /* Identifier */); - return node; - case 211 /* PropertyAccessExpression */: - do { - node = node.expression; - } while (node.kind !== 80 /* Identifier */); - return node; - } - } - function isDottedName(node) { - return node.kind === 80 /* Identifier */ || node.kind === 110 /* ThisKeyword */ || node.kind === 108 /* SuperKeyword */ || node.kind === 236 /* MetaProperty */ || node.kind === 211 /* PropertyAccessExpression */ && isDottedName(node.expression) || node.kind === 217 /* ParenthesizedExpression */ && isDottedName(node.expression); - } - function isPropertyAccessEntityNameExpression(node) { - return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); - } - function tryGetPropertyAccessOrIdentifierToString(expr) { - if (isPropertyAccessExpression(expr)) { - const baseStr = tryGetPropertyAccessOrIdentifierToString(expr.expression); - if (baseStr !== void 0) { - return baseStr + "." + entityNameToString(expr.name); - } - } else if (isElementAccessExpression(expr)) { - const baseStr = tryGetPropertyAccessOrIdentifierToString(expr.expression); - if (baseStr !== void 0 && isPropertyName(expr.argumentExpression)) { - return baseStr + "." + getPropertyNameForPropertyNameNode(expr.argumentExpression); - } - } else if (isIdentifier(expr)) { - return unescapeLeadingUnderscores(expr.escapedText); - } else if (isJsxNamespacedName(expr)) { - return getTextOfJsxNamespacedName(expr); - } - return void 0; - } - function isPrototypeAccess(node) { - return isBindableStaticAccessExpression(node) && getElementOrPropertyAccessName(node) === "prototype"; - } - function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node; - } - function isRightSideOfAccessExpression(node) { - return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; - } - function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) { - return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; - } - function isEmptyObjectLiteral(expression) { - return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; - } - function isEmptyArrayLiteral(expression) { - return expression.kind === 209 /* ArrayLiteralExpression */ && expression.elements.length === 0; - } - function getLocalSymbolForExportDefault(symbol) { - if (!isExportDefaultSymbol(symbol) || !symbol.declarations) - return void 0; - for (const decl of symbol.declarations) { - if (decl.localSymbol) - return decl.localSymbol; - } - return void 0; - } - function isExportDefaultSymbol(symbol) { - return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 1024 /* Default */); - } - function tryExtractTSExtension(fileName) { - return find(supportedTSExtensionsForExtractExtension, (extension) => fileExtensionIs(fileName, extension)); - } - function getExpandedCharCodes(input) { - const output = []; - const length2 = input.length; - for (let i = 0; i < length2; i++) { - const charCode = input.charCodeAt(i); - if (charCode < 128) { - output.push(charCode); - } else if (charCode < 2048) { - output.push(charCode >> 6 | 192); - output.push(charCode & 63 | 128); - } else if (charCode < 65536) { - output.push(charCode >> 12 | 224); - output.push(charCode >> 6 & 63 | 128); - output.push(charCode & 63 | 128); - } else if (charCode < 131072) { - output.push(charCode >> 18 | 240); - output.push(charCode >> 12 & 63 | 128); - output.push(charCode >> 6 & 63 | 128); - output.push(charCode & 63 | 128); - } else { - Debug.assert(false, "Unexpected code point"); - } - } - return output; - } - function convertToBase64(input) { - let result = ""; - const charCodes = getExpandedCharCodes(input); - let i = 0; - const length2 = charCodes.length; - let byte1, byte2, byte3, byte4; - while (i < length2) { - byte1 = charCodes[i] >> 2; - byte2 = (charCodes[i] & 3) << 4 | charCodes[i + 1] >> 4; - byte3 = (charCodes[i + 1] & 15) << 2 | charCodes[i + 2] >> 6; - byte4 = charCodes[i + 2] & 63; - if (i + 1 >= length2) { - byte3 = byte4 = 64; - } else if (i + 2 >= length2) { - byte4 = 64; - } - result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4); - i += 3; - } - return result; - } - function getStringFromExpandedCharCodes(codes) { - let output = ""; - let i = 0; - const length2 = codes.length; - while (i < length2) { - const charCode = codes[i]; - if (charCode < 128) { - output += String.fromCharCode(charCode); - i++; - } else if ((charCode & 192) === 192) { - let value = charCode & 63; - i++; - let nextCode = codes[i]; - while ((nextCode & 192) === 128) { - value = value << 6 | nextCode & 63; - i++; - nextCode = codes[i]; - } - output += String.fromCharCode(value); - } else { - output += String.fromCharCode(charCode); - i++; - } - } - return output; - } - function base64encode(host, input) { - if (host && host.base64encode) { - return host.base64encode(input); - } - return convertToBase64(input); - } - function base64decode(host, input) { - if (host && host.base64decode) { - return host.base64decode(input); - } - const length2 = input.length; - const expandedCharCodes = []; - let i = 0; - while (i < length2) { - if (input.charCodeAt(i) === base64Digits.charCodeAt(64)) { - break; - } - const ch1 = base64Digits.indexOf(input[i]); - const ch2 = base64Digits.indexOf(input[i + 1]); - const ch3 = base64Digits.indexOf(input[i + 2]); - const ch4 = base64Digits.indexOf(input[i + 3]); - const code1 = (ch1 & 63) << 2 | ch2 >> 4 & 3; - const code2 = (ch2 & 15) << 4 | ch3 >> 2 & 15; - const code3 = (ch3 & 3) << 6 | ch4 & 63; - if (code2 === 0 && ch3 !== 0) { - expandedCharCodes.push(code1); - } else if (code3 === 0 && ch4 !== 0) { - expandedCharCodes.push(code1, code2); - } else { - expandedCharCodes.push(code1, code2, code3); - } - i += 4; - } - return getStringFromExpandedCharCodes(expandedCharCodes); - } - function readJsonOrUndefined(path, hostOrText) { - const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path); - if (!jsonText) - return void 0; - const result = parseConfigFileTextToJson(path, jsonText); - return !result.error ? result.config : void 0; - } - function readJson(path, host) { - return readJsonOrUndefined(path, host) || {}; - } - function directoryProbablyExists(directoryName, host) { - return !host.directoryExists || host.directoryExists(directoryName); - } - function getNewLineCharacter(options) { - switch (options.newLine) { - case 0 /* CarriageReturnLineFeed */: - return carriageReturnLineFeed; - case 1 /* LineFeed */: - case void 0: - return lineFeed; - } - } - function createRange(pos, end = pos) { - Debug.assert(end >= pos || end === -1); - return { pos, end }; - } - function moveRangeEnd(range, end) { - return createRange(range.pos, end); - } - function moveRangePos(range, pos) { - return createRange(pos, range.end); - } - function moveRangePastDecorators(node) { - const lastDecorator = canHaveModifiers(node) ? findLast(node.modifiers, isDecorator) : void 0; - return lastDecorator && !positionIsSynthesized(lastDecorator.end) ? moveRangePos(node, lastDecorator.end) : node; - } - function moveRangePastModifiers(node) { - if (isPropertyDeclaration(node) || isMethodDeclaration(node)) { - return moveRangePos(node, node.name.pos); - } - const lastModifier = canHaveModifiers(node) ? lastOrUndefined(node.modifiers) : void 0; - return lastModifier && !positionIsSynthesized(lastModifier.end) ? moveRangePos(node, lastModifier.end) : moveRangePastDecorators(node); - } - function isCollapsedRange(range) { - return range.pos === range.end; - } - function createTokenRange(pos, token) { - return createRange(pos, pos + tokenToString(token).length); - } - function rangeIsOnSingleLine(range, sourceFile) { - return rangeStartIsOnSameLineAsRangeEnd(range, range, sourceFile); - } - function rangeStartPositionsAreOnSameLine(range1, range2, sourceFile) { - return positionsAreOnSameLine( - getStartPositionOfRange( - range1, - sourceFile, - /*includeComments*/ - false - ), - getStartPositionOfRange( - range2, - sourceFile, - /*includeComments*/ - false - ), - sourceFile - ); - } - function rangeEndPositionsAreOnSameLine(range1, range2, sourceFile) { - return positionsAreOnSameLine(range1.end, range2.end, sourceFile); - } - function rangeStartIsOnSameLineAsRangeEnd(range1, range2, sourceFile) { - return positionsAreOnSameLine(getStartPositionOfRange( - range1, - sourceFile, - /*includeComments*/ - false - ), range2.end, sourceFile); - } - function rangeEndIsOnSameLineAsRangeStart(range1, range2, sourceFile) { - return positionsAreOnSameLine(range1.end, getStartPositionOfRange( - range2, - sourceFile, - /*includeComments*/ - false - ), sourceFile); - } - function getLinesBetweenRangeEndAndRangeStart(range1, range2, sourceFile, includeSecondRangeComments) { - const range2Start = getStartPositionOfRange(range2, sourceFile, includeSecondRangeComments); - return getLinesBetweenPositions(sourceFile, range1.end, range2Start); - } - function getLinesBetweenRangeEndPositions(range1, range2, sourceFile) { - return getLinesBetweenPositions(sourceFile, range1.end, range2.end); - } - function isNodeArrayMultiLine(list, sourceFile) { - return !positionsAreOnSameLine(list.pos, list.end, sourceFile); - } - function positionsAreOnSameLine(pos1, pos2, sourceFile) { - return getLinesBetweenPositions(sourceFile, pos1, pos2) === 0; - } - function getStartPositionOfRange(range, sourceFile, includeComments) { - return positionIsSynthesized(range.pos) ? -1 : skipTrivia( - sourceFile.text, - range.pos, - /*stopAfterLineBreak*/ - false, - includeComments - ); - } - function getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter(pos, stopPos, sourceFile, includeComments) { - const startPos = skipTrivia( - sourceFile.text, - pos, - /*stopAfterLineBreak*/ - false, - includeComments - ); - const prevPos = getPreviousNonWhitespacePosition(startPos, stopPos, sourceFile); - return getLinesBetweenPositions(sourceFile, prevPos ?? stopPos, startPos); - } - function getLinesBetweenPositionAndNextNonWhitespaceCharacter(pos, stopPos, sourceFile, includeComments) { - const nextPos = skipTrivia( - sourceFile.text, - pos, - /*stopAfterLineBreak*/ - false, - includeComments - ); - return getLinesBetweenPositions(sourceFile, pos, Math.min(stopPos, nextPos)); - } - function getPreviousNonWhitespacePosition(pos, stopPos = 0, sourceFile) { - while (pos-- > stopPos) { - if (!isWhiteSpaceLike(sourceFile.text.charCodeAt(pos))) { - return pos; - } - } - } - function isDeclarationNameOfEnumOrNamespace(node) { - const parseNode = getParseTreeNode(node); - if (parseNode) { - switch (parseNode.parent.kind) { - case 266 /* EnumDeclaration */: - case 267 /* ModuleDeclaration */: - return parseNode === parseNode.parent.name; - } - } - return false; - } - function getInitializedVariables(node) { - return filter(node.declarations, isInitializedVariable); - } - function isInitializedVariable(node) { - return isVariableDeclaration(node) && node.initializer !== void 0; - } - function isWatchSet(options) { - return options.watch && hasProperty(options, "watch"); - } - function closeFileWatcher(watcher) { - watcher.close(); - } - function getCheckFlags(symbol) { - return symbol.flags & 33554432 /* Transient */ ? symbol.links.checkFlags : 0; - } - function getDeclarationModifierFlagsFromSymbol(s, isWrite = false) { - if (s.valueDeclaration) { - const declaration = isWrite && s.declarations && find(s.declarations, isSetAccessorDeclaration) || s.flags & 32768 /* GetAccessor */ && find(s.declarations, isGetAccessorDeclaration) || s.valueDeclaration; - const flags = getCombinedModifierFlags(declaration); - return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~28 /* AccessibilityModifier */; - } - if (getCheckFlags(s) & 6 /* Synthetic */) { - const checkFlags = s.links.checkFlags; - const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 8 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 4 /* Public */ : 16 /* Protected */; - const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 32 /* Static */ : 0; - return accessModifier | staticModifier; - } - if (s.flags & 4194304 /* Prototype */) { - return 4 /* Public */ | 32 /* Static */; - } - return 0; - } - function skipAlias(symbol, checker) { - return symbol.flags & 2097152 /* Alias */ ? checker.getAliasedSymbol(symbol) : symbol; - } - function getCombinedLocalAndExportSymbolFlags(symbol) { - return symbol.exportSymbol ? symbol.exportSymbol.flags | symbol.flags : symbol.flags; - } - function isWriteOnlyAccess(node) { - return accessKind(node) === 1 /* Write */; - } - function isWriteAccess(node) { - return accessKind(node) !== 0 /* Read */; - } - function accessKind(node) { - const { parent: parent2 } = node; - switch (parent2 == null ? void 0 : parent2.kind) { - case 217 /* ParenthesizedExpression */: - return accessKind(parent2); - case 225 /* PostfixUnaryExpression */: - case 224 /* PrefixUnaryExpression */: - const { operator } = parent2; - return operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */; - case 226 /* BinaryExpression */: - const { left, operatorToken } = parent2; - return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 64 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */; - case 211 /* PropertyAccessExpression */: - return parent2.name !== node ? 0 /* Read */ : accessKind(parent2); - case 303 /* PropertyAssignment */: { - const parentAccess = accessKind(parent2.parent); - return node === parent2.name ? reverseAccessKind(parentAccess) : parentAccess; - } - case 304 /* ShorthandPropertyAssignment */: - return node === parent2.objectAssignmentInitializer ? 0 /* Read */ : accessKind(parent2.parent); - case 209 /* ArrayLiteralExpression */: - return accessKind(parent2); - default: - return 0 /* Read */; - } - } - function reverseAccessKind(a) { - switch (a) { - case 0 /* Read */: - return 1 /* Write */; - case 1 /* Write */: - return 0 /* Read */; - case 2 /* ReadWrite */: - return 2 /* ReadWrite */; - default: - return Debug.assertNever(a); - } - } - function compareDataObjects(dst, src) { - if (!dst || !src || Object.keys(dst).length !== Object.keys(src).length) { - return false; - } - for (const e in dst) { - if (typeof dst[e] === "object") { - if (!compareDataObjects(dst[e], src[e])) { - return false; - } - } else if (typeof dst[e] !== "function") { - if (dst[e] !== src[e]) { - return false; - } - } - } - return true; - } - function clearMap(map2, onDeleteValue) { - map2.forEach(onDeleteValue); - map2.clear(); - } - function mutateMapSkippingNewValues(map2, newMap, options) { - const { onDeleteValue, onExistingValue } = options; - map2.forEach((existingValue, key) => { - const valueInNewMap = newMap.get(key); - if (valueInNewMap === void 0) { - map2.delete(key); - onDeleteValue(existingValue, key); - } else if (onExistingValue) { - onExistingValue(existingValue, valueInNewMap, key); - } - }); - } - function mutateMap(map2, newMap, options) { - mutateMapSkippingNewValues(map2, newMap, options); - const { createNewValue } = options; - newMap.forEach((valueInNewMap, key) => { - if (!map2.has(key)) { - map2.set(key, createNewValue(key, valueInNewMap)); - } - }); - } - function isAbstractConstructorSymbol(symbol) { - if (symbol.flags & 32 /* Class */) { - const declaration = getClassLikeDeclarationOfSymbol(symbol); - return !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */); - } - return false; - } - function getClassLikeDeclarationOfSymbol(symbol) { - var _a; - return (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike); - } - function getObjectFlags(type) { - return type.flags & 138117121 /* ObjectFlagsType */ ? type.objectFlags : 0; - } - function forSomeAncestorDirectory(directory, callback) { - return !!forEachAncestorDirectory(directory, (d) => callback(d) ? true : void 0); - } - function isUMDExportSymbol(symbol) { - return !!symbol && !!symbol.declarations && !!symbol.declarations[0] && isNamespaceExportDeclaration(symbol.declarations[0]); - } - function showModuleSpecifier({ moduleSpecifier }) { - return isStringLiteral(moduleSpecifier) ? moduleSpecifier.text : getTextOfNode(moduleSpecifier); - } - function getLastChild(node) { - let lastChild; - forEachChild( - node, - (child) => { - if (nodeIsPresent(child)) - lastChild = child; - }, - (children) => { - for (let i = children.length - 1; i >= 0; i--) { - if (nodeIsPresent(children[i])) { - lastChild = children[i]; - break; - } - } - } - ); - return lastChild; - } - function addToSeen(seen, key, value = true) { - if (seen.has(key)) { - return false; - } - seen.set(key, value); - return true; - } - function isObjectTypeDeclaration(node) { - return isClassLike(node) || isInterfaceDeclaration(node) || isTypeLiteralNode(node); - } - function isTypeNodeKind(kind) { - return kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */ || kind === 133 /* AnyKeyword */ || kind === 159 /* UnknownKeyword */ || kind === 150 /* NumberKeyword */ || kind === 163 /* BigIntKeyword */ || kind === 151 /* ObjectKeyword */ || kind === 136 /* BooleanKeyword */ || kind === 154 /* StringKeyword */ || kind === 155 /* SymbolKeyword */ || kind === 116 /* VoidKeyword */ || kind === 157 /* UndefinedKeyword */ || kind === 146 /* NeverKeyword */ || kind === 141 /* IntrinsicKeyword */ || kind === 233 /* ExpressionWithTypeArguments */ || kind === 319 /* JSDocAllType */ || kind === 320 /* JSDocUnknownType */ || kind === 321 /* JSDocNullableType */ || kind === 322 /* JSDocNonNullableType */ || kind === 323 /* JSDocOptionalType */ || kind === 324 /* JSDocFunctionType */ || kind === 325 /* JSDocVariadicType */; - } - function isAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */; - } - function getNameOfAccessExpression(node) { - if (node.kind === 211 /* PropertyAccessExpression */) { - return node.name; - } - Debug.assert(node.kind === 212 /* ElementAccessExpression */); - return node.argumentExpression; - } - function isBundleFileTextLike(section) { - switch (section.kind) { - case "text" /* Text */: - case "internal" /* Internal */: - return true; - default: - return false; - } - } - function isNamedImportsOrExports(node) { - return node.kind === 275 /* NamedImports */ || node.kind === 279 /* NamedExports */; - } - function getLeftmostAccessExpression(expr) { - while (isAccessExpression(expr)) { - expr = expr.expression; - } - return expr; - } - function forEachNameInAccessChainWalkingLeft(name, action) { - if (isAccessExpression(name.parent) && isRightSideOfAccessExpression(name)) { - return walkAccessExpression(name.parent); - } - function walkAccessExpression(access) { - if (access.kind === 211 /* PropertyAccessExpression */) { - const res = action(access.name); - if (res !== void 0) { - return res; - } - } else if (access.kind === 212 /* ElementAccessExpression */) { - if (isIdentifier(access.argumentExpression) || isStringLiteralLike(access.argumentExpression)) { - const res = action(access.argumentExpression); - if (res !== void 0) { - return res; - } - } else { - return void 0; - } - } - if (isAccessExpression(access.expression)) { - return walkAccessExpression(access.expression); - } - if (isIdentifier(access.expression)) { - return action(access.expression); - } - return void 0; - } - } - function getLeftmostExpression(node, stopAtCallExpressions) { - while (true) { - switch (node.kind) { - case 225 /* PostfixUnaryExpression */: - node = node.operand; - continue; - case 226 /* BinaryExpression */: - node = node.left; - continue; - case 227 /* ConditionalExpression */: - node = node.condition; - continue; - case 215 /* TaggedTemplateExpression */: - node = node.tag; - continue; - case 213 /* CallExpression */: - if (stopAtCallExpressions) { - return node; - } - case 234 /* AsExpression */: - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - case 235 /* NonNullExpression */: - case 360 /* PartiallyEmittedExpression */: - case 238 /* SatisfiesExpression */: - node = node.expression; - continue; - } - return node; - } - } - function Symbol4(flags, name) { - this.flags = flags; - this.escapedName = name; - this.declarations = void 0; - this.valueDeclaration = void 0; - this.id = 0; - this.mergeId = 0; - this.parent = void 0; - this.members = void 0; - this.exports = void 0; - this.exportSymbol = void 0; - this.constEnumOnlyModule = void 0; - this.isReferenced = void 0; - this.isAssigned = void 0; - this.links = void 0; - } - function Type3(checker, flags) { - this.flags = flags; - if (Debug.isDebugging || tracing) { - this.checker = checker; - } - } - function Signature2(checker, flags) { - this.flags = flags; - if (Debug.isDebugging) { - this.checker = checker; - } - } - function Node4(kind, pos, end) { - this.pos = pos; - this.end = end; - this.kind = kind; - this.id = 0; - this.flags = 0 /* None */; - this.modifierFlagsCache = 0 /* None */; - this.transformFlags = 0 /* None */; - this.parent = void 0; - this.original = void 0; - this.emitNode = void 0; - } - function Token(kind, pos, end) { - this.pos = pos; - this.end = end; - this.kind = kind; - this.id = 0; - this.flags = 0 /* None */; - this.transformFlags = 0 /* None */; - this.parent = void 0; - this.emitNode = void 0; - } - function Identifier2(kind, pos, end) { - this.pos = pos; - this.end = end; - this.kind = kind; - this.id = 0; - this.flags = 0 /* None */; - this.transformFlags = 0 /* None */; - this.parent = void 0; - this.original = void 0; - this.emitNode = void 0; - } - function SourceMapSource(fileName, text, skipTrivia2) { - this.fileName = fileName; - this.text = text; - this.skipTrivia = skipTrivia2 || ((pos) => pos); - } - function addObjectAllocatorPatcher(fn) { - objectAllocatorPatchers.push(fn); - fn(objectAllocator); - } - function setObjectAllocator(alloc) { - Object.assign(objectAllocator, alloc); - forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator)); - } - function formatStringFromArgs(text, args, baseIndex = 0) { - return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex])); - } - function setLocalizedDiagnosticMessages(messages) { - localizedDiagnosticMessages = messages; - } - function maybeSetLocalizedDiagnosticMessages(getMessages) { - if (!localizedDiagnosticMessages && getMessages) { - localizedDiagnosticMessages = getMessages(); - } - } - function getLocaleSpecificMessage(message) { - return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message; - } - function createDetachedDiagnostic(fileName, start, length2, message) { - assertDiagnosticLocation( - /*file*/ - void 0, - start, - length2 - ); - let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); - } - return { - file: void 0, - start, - length: length2, - messageText: text, - category: message.category, - code: message.code, - reportsUnnecessary: message.reportsUnnecessary, - fileName - }; - } - function isDiagnosticWithDetachedLocation(diagnostic) { - return diagnostic.file === void 0 && diagnostic.start !== void 0 && diagnostic.length !== void 0 && typeof diagnostic.fileName === "string"; - } - function attachFileToDiagnostic(diagnostic, file) { - const fileName = file.fileName || ""; - const length2 = file.text.length; - Debug.assertEqual(diagnostic.fileName, fileName); - Debug.assertLessThanOrEqual(diagnostic.start, length2); - Debug.assertLessThanOrEqual(diagnostic.start + diagnostic.length, length2); - const diagnosticWithLocation = { - file, - start: diagnostic.start, - length: diagnostic.length, - messageText: diagnostic.messageText, - category: diagnostic.category, - code: diagnostic.code, - reportsUnnecessary: diagnostic.reportsUnnecessary - }; - if (diagnostic.relatedInformation) { - diagnosticWithLocation.relatedInformation = []; - for (const related of diagnostic.relatedInformation) { - if (isDiagnosticWithDetachedLocation(related) && related.fileName === fileName) { - Debug.assertLessThanOrEqual(related.start, length2); - Debug.assertLessThanOrEqual(related.start + related.length, length2); - diagnosticWithLocation.relatedInformation.push(attachFileToDiagnostic(related, file)); - } else { - diagnosticWithLocation.relatedInformation.push(related); - } - } - } - return diagnosticWithLocation; - } - function attachFileToDiagnostics(diagnostics, file) { - const diagnosticsWithLocation = []; - for (const diagnostic of diagnostics) { - diagnosticsWithLocation.push(attachFileToDiagnostic(diagnostic, file)); - } - return diagnosticsWithLocation; - } - function createFileDiagnostic(file, start, length2, message) { - assertDiagnosticLocation(file, start, length2); - let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); - } - return { - file, - start, - length: length2, - messageText: text, - category: message.category, - code: message.code, - reportsUnnecessary: message.reportsUnnecessary, - reportsDeprecated: message.reportsDeprecated - }; - } - function formatMessage(_dummy, message) { - let text = getLocaleSpecificMessage(message); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); - } - return text; - } - function createCompilerDiagnostic(message) { - let text = getLocaleSpecificMessage(message); - if (arguments.length > 1) { - text = formatStringFromArgs(text, arguments, 1); - } - return { - file: void 0, - start: void 0, - length: void 0, - messageText: text, - category: message.category, - code: message.code, - reportsUnnecessary: message.reportsUnnecessary, - reportsDeprecated: message.reportsDeprecated - }; - } - function createCompilerDiagnosticFromMessageChain(chain, relatedInformation) { - return { - file: void 0, - start: void 0, - length: void 0, - code: chain.code, - category: chain.category, - messageText: chain.next ? chain : chain.messageText, - relatedInformation - }; - } - function chainDiagnosticMessages(details, message) { - let text = getLocaleSpecificMessage(message); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); - } - return { - messageText: text, - category: message.category, - code: message.code, - next: details === void 0 || Array.isArray(details) ? details : [details] - }; - } - function concatenateDiagnosticMessageChains(headChain, tailChain) { - let lastChain = headChain; - while (lastChain.next) { - lastChain = lastChain.next[0]; - } - lastChain.next = [tailChain]; - } - function getDiagnosticFilePath(diagnostic) { - return diagnostic.file ? diagnostic.file.path : void 0; - } - function compareDiagnostics(d1, d2) { - return compareDiagnosticsSkipRelatedInformation(d1, d2) || compareRelatedInformation(d1, d2) || 0 /* EqualTo */; - } - function compareDiagnosticsSkipRelatedInformation(d1, d2) { - return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) || compareValues(d1.start, d2.start) || compareValues(d1.length, d2.length) || compareValues(d1.code, d2.code) || compareMessageText(d1.messageText, d2.messageText) || 0 /* EqualTo */; - } - function compareRelatedInformation(d1, d2) { - if (!d1.relatedInformation && !d2.relatedInformation) { - return 0 /* EqualTo */; - } - if (d1.relatedInformation && d2.relatedInformation) { - return compareValues(d1.relatedInformation.length, d2.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => { - const d2i = d2.relatedInformation[index]; - return compareDiagnostics(d1i, d2i); - }) || 0 /* EqualTo */; - } - return d1.relatedInformation ? -1 /* LessThan */ : 1 /* GreaterThan */; - } - function compareMessageText(t1, t2) { - if (typeof t1 === "string" && typeof t2 === "string") { - return compareStringsCaseSensitive(t1, t2); - } else if (typeof t1 === "string") { - return -1 /* LessThan */; - } else if (typeof t2 === "string") { - return 1 /* GreaterThan */; - } - let res = compareStringsCaseSensitive(t1.messageText, t2.messageText); - if (res) { - return res; - } - if (!t1.next && !t2.next) { - return 0 /* EqualTo */; - } - if (!t1.next) { - return -1 /* LessThan */; - } - if (!t2.next) { - return 1 /* GreaterThan */; - } - const len = Math.min(t1.next.length, t2.next.length); - for (let i = 0; i < len; i++) { - res = compareMessageText(t1.next[i], t2.next[i]); - if (res) { - return res; - } - } - if (t1.next.length < t2.next.length) { - return -1 /* LessThan */; - } else if (t1.next.length > t2.next.length) { - return 1 /* GreaterThan */; - } - return 0 /* EqualTo */; - } - function getLanguageVariant(scriptKind) { - return scriptKind === 4 /* TSX */ || scriptKind === 2 /* JSX */ || scriptKind === 1 /* JS */ || scriptKind === 6 /* JSON */ ? 1 /* JSX */ : 0 /* Standard */; - } - function walkTreeForJSXTags(node) { - if (!(node.transformFlags & 2 /* ContainsJsx */)) - return void 0; - return isJsxOpeningLikeElement(node) || isJsxFragment(node) ? node : forEachChild(node, walkTreeForJSXTags); - } - function isFileModuleFromUsingJSXTag(file) { - return !file.isDeclarationFile ? walkTreeForJSXTags(file) : void 0; - } - function isFileForcedToBeModuleByFormat(file) { - return (file.impliedNodeFormat === 99 /* ESNext */ || fileExtensionIsOneOf(file.fileName, [".cjs" /* Cjs */, ".cts" /* Cts */, ".mjs" /* Mjs */, ".mts" /* Mts */])) && !file.isDeclarationFile ? true : void 0; - } - function getSetExternalModuleIndicator(options) { - switch (getEmitModuleDetectionKind(options)) { - case 3 /* Force */: - return (file) => { - file.externalModuleIndicator = isFileProbablyExternalModule(file) || !file.isDeclarationFile || void 0; - }; - case 1 /* Legacy */: - return (file) => { - file.externalModuleIndicator = isFileProbablyExternalModule(file); - }; - case 2 /* Auto */: - const checks = [isFileProbablyExternalModule]; - if (options.jsx === 4 /* ReactJSX */ || options.jsx === 5 /* ReactJSXDev */) { - checks.push(isFileModuleFromUsingJSXTag); - } - checks.push(isFileForcedToBeModuleByFormat); - const combined = or(...checks); - const callback = (file) => void (file.externalModuleIndicator = combined(file)); - return callback; - } - } - function getEmitScriptTarget(compilerOptions) { - return compilerOptions.target ?? (compilerOptions.module === 100 /* Node16 */ && 9 /* ES2022 */ || compilerOptions.module === 199 /* NodeNext */ && 99 /* ESNext */ || 1 /* ES5 */); - } - function getEmitModuleKind(compilerOptions) { - return typeof compilerOptions.module === "number" ? compilerOptions.module : getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */ ? 5 /* ES2015 */ : 1 /* CommonJS */; - } - function emitModuleKindIsNonNodeESM(moduleKind) { - return moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */; - } - function getEmitModuleResolutionKind(compilerOptions) { - let moduleResolution = compilerOptions.moduleResolution; - if (moduleResolution === void 0) { - switch (getEmitModuleKind(compilerOptions)) { - case 1 /* CommonJS */: - moduleResolution = 2 /* Node10 */; - break; - case 100 /* Node16 */: - moduleResolution = 3 /* Node16 */; - break; - case 199 /* NodeNext */: - moduleResolution = 99 /* NodeNext */; - break; - default: - moduleResolution = 1 /* Classic */; - break; - } - } - return moduleResolution; - } - function getEmitModuleDetectionKind(options) { - return options.moduleDetection || (getEmitModuleKind(options) === 100 /* Node16 */ || getEmitModuleKind(options) === 199 /* NodeNext */ ? 3 /* Force */ : 2 /* Auto */); - } - function hasJsonModuleEmitEnabled(options) { - switch (getEmitModuleKind(options)) { - case 1 /* CommonJS */: - case 2 /* AMD */: - case 5 /* ES2015 */: - case 6 /* ES2020 */: - case 7 /* ES2022 */: - case 99 /* ESNext */: - case 100 /* Node16 */: - case 199 /* NodeNext */: - return true; - default: - return false; - } - } - function getIsolatedModules(options) { - return !!(options.isolatedModules || options.verbatimModuleSyntax); - } - function importNameElisionDisabled(options) { - return options.verbatimModuleSyntax || options.isolatedModules && options.preserveValueImports; - } - function unreachableCodeIsError(options) { - return options.allowUnreachableCode === false; - } - function unusedLabelIsError(options) { - return options.allowUnusedLabels === false; - } - function getAreDeclarationMapsEnabled(options) { - return !!(getEmitDeclarations(options) && options.declarationMap); - } - function getESModuleInterop(compilerOptions) { - if (compilerOptions.esModuleInterop !== void 0) { - return compilerOptions.esModuleInterop; - } - switch (getEmitModuleKind(compilerOptions)) { - case 100 /* Node16 */: - case 199 /* NodeNext */: - return true; - } - return void 0; - } - function getAllowSyntheticDefaultImports(compilerOptions) { - if (compilerOptions.allowSyntheticDefaultImports !== void 0) { - return compilerOptions.allowSyntheticDefaultImports; - } - return getESModuleInterop(compilerOptions) || getEmitModuleKind(compilerOptions) === 4 /* System */ || getEmitModuleResolutionKind(compilerOptions) === 100 /* Bundler */; - } - function moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution) { - return moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */; - } - function shouldResolveJsRequire(compilerOptions) { - return !!compilerOptions.noDtsResolution || getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */; - } - function getResolvePackageJsonExports(compilerOptions) { - const moduleResolution = getEmitModuleResolutionKind(compilerOptions); - if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { - return false; - } - if (compilerOptions.resolvePackageJsonExports !== void 0) { - return compilerOptions.resolvePackageJsonExports; - } - switch (moduleResolution) { - case 3 /* Node16 */: - case 99 /* NodeNext */: - case 100 /* Bundler */: - return true; - } - return false; - } - function getResolvePackageJsonImports(compilerOptions) { - const moduleResolution = getEmitModuleResolutionKind(compilerOptions); - if (!moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { - return false; - } - if (compilerOptions.resolvePackageJsonExports !== void 0) { - return compilerOptions.resolvePackageJsonExports; - } - switch (moduleResolution) { - case 3 /* Node16 */: - case 99 /* NodeNext */: - case 100 /* Bundler */: - return true; - } - return false; - } - function getResolveJsonModule(compilerOptions) { - if (compilerOptions.resolveJsonModule !== void 0) { - return compilerOptions.resolveJsonModule; - } - return getEmitModuleResolutionKind(compilerOptions) === 100 /* Bundler */; - } - function getEmitDeclarations(compilerOptions) { - return !!(compilerOptions.declaration || compilerOptions.composite); - } - function shouldPreserveConstEnums(compilerOptions) { - return !!(compilerOptions.preserveConstEnums || getIsolatedModules(compilerOptions)); - } - function isIncrementalCompilation(options) { - return !!(options.incremental || options.composite); - } - function getStrictOptionValue(compilerOptions, flag) { - return compilerOptions[flag] === void 0 ? !!compilerOptions.strict : !!compilerOptions[flag]; - } - function getAllowJSCompilerOption(compilerOptions) { - return compilerOptions.allowJs === void 0 ? !!compilerOptions.checkJs : compilerOptions.allowJs; - } - function getUseDefineForClassFields(compilerOptions) { - return compilerOptions.useDefineForClassFields === void 0 ? getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */ : compilerOptions.useDefineForClassFields; - } - function getEmitStandardClassFields(compilerOptions) { - return compilerOptions.useDefineForClassFields !== false && getEmitScriptTarget(compilerOptions) >= 9 /* ES2022 */; - } - function compilerOptionsAffectSemanticDiagnostics(newOptions, oldOptions) { - return optionsHaveChanges(oldOptions, newOptions, semanticDiagnosticsOptionDeclarations); - } - function compilerOptionsAffectEmit(newOptions, oldOptions) { - return optionsHaveChanges(oldOptions, newOptions, affectsEmitOptionDeclarations); - } - function compilerOptionsAffectDeclarationPath(newOptions, oldOptions) { - return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations); - } - function getCompilerOptionValue(options, option) { - return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name]; - } - function getJSXTransformEnabled(options) { - const jsx = options.jsx; - return jsx === 2 /* React */ || jsx === 4 /* ReactJSX */ || jsx === 5 /* ReactJSXDev */; - } - function getJSXImplicitImportBase(compilerOptions, file) { - const jsxImportSourcePragmas = file == null ? void 0 : file.pragmas.get("jsximportsource"); - const jsxImportSourcePragma = isArray(jsxImportSourcePragmas) ? jsxImportSourcePragmas[jsxImportSourcePragmas.length - 1] : jsxImportSourcePragmas; - return compilerOptions.jsx === 4 /* ReactJSX */ || compilerOptions.jsx === 5 /* ReactJSXDev */ || compilerOptions.jsxImportSource || jsxImportSourcePragma ? (jsxImportSourcePragma == null ? void 0 : jsxImportSourcePragma.arguments.factory) || compilerOptions.jsxImportSource || "react" : void 0; - } - function getJSXRuntimeImport(base, options) { - return base ? `${base}/${options.jsx === 5 /* ReactJSXDev */ ? "jsx-dev-runtime" : "jsx-runtime"}` : void 0; - } - function hasZeroOrOneAsteriskCharacter(str) { - let seenAsterisk = false; - for (let i = 0; i < str.length; i++) { - if (str.charCodeAt(i) === 42 /* asterisk */) { - if (!seenAsterisk) { - seenAsterisk = true; - } else { - return false; - } - } - } - return true; - } - function createSymlinkCache(cwd, getCanonicalFileName) { - let symlinkedDirectories; - let symlinkedDirectoriesByRealpath; - let symlinkedFiles; - let hasProcessedResolutions = false; - return { - getSymlinkedFiles: () => symlinkedFiles, - getSymlinkedDirectories: () => symlinkedDirectories, - getSymlinkedDirectoriesByRealpath: () => symlinkedDirectoriesByRealpath, - setSymlinkedFile: (path, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map())).set(path, real), - setSymlinkedDirectory: (symlink, real) => { - let symlinkPath = toPath(symlink, cwd, getCanonicalFileName); - if (!containsIgnoredPath(symlinkPath)) { - symlinkPath = ensureTrailingDirectorySeparator(symlinkPath); - if (real !== false && !(symlinkedDirectories == null ? void 0 : symlinkedDirectories.has(symlinkPath))) { - (symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(ensureTrailingDirectorySeparator(real.realPath), symlink); - } - (symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real); - } - }, - setSymlinksFromResolutions(files, typeReferenceDirectives) { - var _a, _b; - Debug.assert(!hasProcessedResolutions); - hasProcessedResolutions = true; - for (const file of files) { - (_a = file.resolvedModules) == null ? void 0 : _a.forEach((resolution) => processResolution(this, resolution.resolvedModule)); - (_b = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _b.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); - } - typeReferenceDirectives.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); - }, - hasProcessedResolutions: () => hasProcessedResolutions - }; - function processResolution(cache, resolution) { - if (!resolution || !resolution.originalPath || !resolution.resolvedFileName) - return; - const { resolvedFileName, originalPath } = resolution; - cache.setSymlinkedFile(toPath(originalPath, cwd, getCanonicalFileName), resolvedFileName); - const [commonResolved, commonOriginal] = guessDirectorySymlink(resolvedFileName, originalPath, cwd, getCanonicalFileName) || emptyArray; - if (commonResolved && commonOriginal) { - cache.setSymlinkedDirectory( - commonOriginal, - { real: commonResolved, realPath: toPath(commonResolved, cwd, getCanonicalFileName) } - ); - } - } - } - function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) { - const aParts = getPathComponents(getNormalizedAbsolutePath(a, cwd)); - const bParts = getPathComponents(getNormalizedAbsolutePath(b, cwd)); - let isDirectory = false; - while (aParts.length >= 2 && bParts.length >= 2 && !isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) { - aParts.pop(); - bParts.pop(); - isDirectory = true; - } - return isDirectory ? [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)] : void 0; - } - function isNodeModulesOrScopedPackageDirectory(s, getCanonicalFileName) { - return s !== void 0 && (getCanonicalFileName(s) === "node_modules" || startsWith(s, "@")); - } - function stripLeadingDirectorySeparator(s) { - return isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : void 0; - } - function tryRemoveDirectoryPrefix(path, dirPath, getCanonicalFileName) { - const withoutPrefix = tryRemovePrefix(path, dirPath, getCanonicalFileName); - return withoutPrefix === void 0 ? void 0 : stripLeadingDirectorySeparator(withoutPrefix); - } - function regExpEscape(text) { - return text.replace(reservedCharacterPattern, escapeRegExpCharacter); - } - function escapeRegExpCharacter(match) { - return "\\" + match; - } - function getRegularExpressionForWildcard(specs, basePath, usage) { - const patterns = getRegularExpressionsForWildcards(specs, basePath, usage); - if (!patterns || !patterns.length) { - return void 0; - } - const pattern = patterns.map((pattern2) => `(${pattern2})`).join("|"); - const terminator = usage === "exclude" ? "($|/)" : "$"; - return `^(${pattern})${terminator}`; - } - function getRegularExpressionsForWildcards(specs, basePath, usage) { - if (specs === void 0 || specs.length === 0) { - return void 0; - } - return flatMap(specs, (spec) => spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage])); - } - function isImplicitGlob(lastPathComponent) { - return !/[.*?]/.test(lastPathComponent); - } - function getPatternFromSpec(spec, basePath, usage) { - const pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]); - return pattern && `^(${pattern})${usage === "exclude" ? "($|/)" : "$"}`; - } - function getSubPatternFromSpec(spec, basePath, usage, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 }) { - let subpattern = ""; - let hasWrittenComponent = false; - const components = getNormalizedPathComponents(spec, basePath); - const lastComponent = last(components); - if (usage !== "exclude" && lastComponent === "**") { - return void 0; - } - components[0] = removeTrailingDirectorySeparator(components[0]); - if (isImplicitGlob(lastComponent)) { - components.push("**", "*"); - } - let optionalCount = 0; - for (let component of components) { - if (component === "**") { - subpattern += doubleAsteriskRegexFragment; - } else { - if (usage === "directories") { - subpattern += "("; - optionalCount++; - } - if (hasWrittenComponent) { - subpattern += directorySeparator; - } - if (usage !== "exclude") { - let componentPattern = ""; - if (component.charCodeAt(0) === 42 /* asterisk */) { - componentPattern += "([^./]" + singleAsteriskRegexFragment + ")?"; - component = component.substr(1); - } else if (component.charCodeAt(0) === 63 /* question */) { - componentPattern += "[^./]"; - component = component.substr(1); - } - componentPattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter2); - if (componentPattern !== component) { - subpattern += implicitExcludePathRegexPattern; - } - subpattern += componentPattern; - } else { - subpattern += component.replace(reservedCharacterPattern, replaceWildcardCharacter2); - } - } - hasWrittenComponent = true; - } - while (optionalCount > 0) { - subpattern += ")?"; - optionalCount--; - } - return subpattern; - } - function replaceWildcardCharacter(match, singleAsteriskRegexFragment) { - return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match; - } - function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) { - path = normalizePath(path); - currentDirectory = normalizePath(currentDirectory); - const absolutePath = combinePaths(currentDirectory, path); - return { - includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`), - includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"), - includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"), - excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"), - basePaths: getBasePaths(path, includes, useCaseSensitiveFileNames2) - }; - } - function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) { - return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i"); - } - function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) { - path = normalizePath(path); - currentDirectory = normalizePath(currentDirectory); - const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory); - const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2)); - const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2); - const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2); - const results = includeFileRegexes ? includeFileRegexes.map(() => []) : [[]]; - const visited = /* @__PURE__ */ new Map(); - const toCanonical = createGetCanonicalFileName(useCaseSensitiveFileNames2); - for (const basePath of patterns.basePaths) { - visitDirectory(basePath, combinePaths(currentDirectory, basePath), depth); - } - return flatten(results); - function visitDirectory(path2, absolutePath, depth2) { - const canonicalPath = toCanonical(realpath(absolutePath)); - if (visited.has(canonicalPath)) - return; - visited.set(canonicalPath, true); - const { files, directories } = getFileSystemEntries(path2); - for (const current of sort(files, compareStringsCaseSensitive)) { - const name = combinePaths(path2, current); - const absoluteName = combinePaths(absolutePath, current); - if (extensions && !fileExtensionIsOneOf(name, extensions)) - continue; - if (excludeRegex && excludeRegex.test(absoluteName)) - continue; - if (!includeFileRegexes) { - results[0].push(name); - } else { - const includeIndex = findIndex(includeFileRegexes, (re) => re.test(absoluteName)); - if (includeIndex !== -1) { - results[includeIndex].push(name); - } - } - } - if (depth2 !== void 0) { - depth2--; - if (depth2 === 0) { - return; - } - } - for (const current of sort(directories, compareStringsCaseSensitive)) { - const name = combinePaths(path2, current); - const absoluteName = combinePaths(absolutePath, current); - if ((!includeDirectoryRegex || includeDirectoryRegex.test(absoluteName)) && (!excludeRegex || !excludeRegex.test(absoluteName))) { - visitDirectory(name, absoluteName, depth2); - } - } - } - } - function getBasePaths(path, includes, useCaseSensitiveFileNames2) { - const basePaths = [path]; - if (includes) { - const includeBasePaths = []; - for (const include of includes) { - const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path, include)); - includeBasePaths.push(getIncludeBasePath(absolute)); - } - includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2)); - for (const includeBasePath of includeBasePaths) { - if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path, !useCaseSensitiveFileNames2))) { - basePaths.push(includeBasePath); - } - } - } - return basePaths; - } - function getIncludeBasePath(absolute) { - const wildcardOffset = indexOfAnyCharCode(absolute, wildcardCharCodes); - if (wildcardOffset < 0) { - return !hasExtension(absolute) ? absolute : removeTrailingDirectorySeparator(getDirectoryPath(absolute)); - } - return absolute.substring(0, absolute.lastIndexOf(directorySeparator, wildcardOffset)); - } - function ensureScriptKind(fileName, scriptKind) { - return scriptKind || getScriptKindFromFileName(fileName) || 3 /* TS */; - } - function getScriptKindFromFileName(fileName) { - const ext = fileName.substr(fileName.lastIndexOf(".")); - switch (ext.toLowerCase()) { - case ".js" /* Js */: - case ".cjs" /* Cjs */: - case ".mjs" /* Mjs */: - return 1 /* JS */; - case ".jsx" /* Jsx */: - return 2 /* JSX */; - case ".ts" /* Ts */: - case ".cts" /* Cts */: - case ".mts" /* Mts */: - return 3 /* TS */; - case ".tsx" /* Tsx */: - return 4 /* TSX */; - case ".json" /* Json */: - return 6 /* JSON */; - default: - return 0 /* Unknown */; - } - } - function getSupportedExtensions(options, extraFileExtensions) { - const needJsExtensions = options && getAllowJSCompilerOption(options); - if (!extraFileExtensions || extraFileExtensions.length === 0) { - return needJsExtensions ? allSupportedExtensions : supportedTSExtensions; - } - const builtins = needJsExtensions ? allSupportedExtensions : supportedTSExtensions; - const flatBuiltins = flatten(builtins); - const extensions = [ - ...builtins, - ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension) === -1 ? [x.extension] : void 0) - ]; - return extensions; - } - function getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions) { - if (!options || !getResolveJsonModule(options)) - return supportedExtensions; - if (supportedExtensions === allSupportedExtensions) - return allSupportedExtensionsWithJson; - if (supportedExtensions === supportedTSExtensions) - return supportedTSExtensionsWithJson; - return [...supportedExtensions, [".json" /* Json */]]; - } - function isJSLike(scriptKind) { - return scriptKind === 1 /* JS */ || scriptKind === 2 /* JSX */; - } - function hasJSFileExtension(fileName) { - return some(supportedJSExtensionsFlat, (extension) => fileExtensionIs(fileName, extension)); - } - function hasTSFileExtension(fileName) { - return some(supportedTSExtensionsFlat, (extension) => fileExtensionIs(fileName, extension)); - } - function usesExtensionsOnImports({ imports }, hasExtension2 = or(hasJSFileExtension, hasTSFileExtension)) { - return firstDefined(imports, ({ text }) => pathIsRelative(text) && !fileExtensionIsOneOf(text, extensionsNotSupportingExtensionlessResolution) ? hasExtension2(text) : void 0) || false; - } - function getModuleSpecifierEndingPreference(preference, resolutionMode, compilerOptions, sourceFile) { - if (preference === "js" || resolutionMode === 99 /* ESNext */) { - if (!shouldAllowImportingTsExtension(compilerOptions)) { - return 2 /* JsExtension */; - } - return inferPreference() !== 2 /* JsExtension */ ? 3 /* TsExtension */ : 2 /* JsExtension */; - } - if (preference === "minimal") { - return 0 /* Minimal */; - } - if (preference === "index") { - return 1 /* Index */; - } - if (!shouldAllowImportingTsExtension(compilerOptions)) { - return usesExtensionsOnImports(sourceFile) ? 2 /* JsExtension */ : 0 /* Minimal */; - } - return inferPreference(); - function inferPreference() { - let usesJsExtensions = false; - const specifiers = sourceFile.imports.length ? sourceFile.imports.map((i) => i.text) : isSourceFileJS(sourceFile) ? getRequiresAtTopOfFile(sourceFile).map((r) => r.arguments[0].text) : emptyArray; - for (const specifier of specifiers) { - if (pathIsRelative(specifier)) { - if (fileExtensionIsOneOf(specifier, extensionsNotSupportingExtensionlessResolution)) { - continue; - } - if (hasTSFileExtension(specifier)) { - return 3 /* TsExtension */; - } - if (hasJSFileExtension(specifier)) { - usesJsExtensions = true; - } - } - } - return usesJsExtensions ? 2 /* JsExtension */ : 0 /* Minimal */; - } - } - function getRequiresAtTopOfFile(sourceFile) { - let nonRequireStatementCount = 0; - let requires; - for (const statement of sourceFile.statements) { - if (nonRequireStatementCount > 3) { - break; - } - if (isRequireVariableStatement(statement)) { - requires = concatenate(requires, statement.declarationList.declarations.map((d) => d.initializer)); - } else if (isExpressionStatement(statement) && isRequireCall( - statement.expression, - /*requireStringLiteralLikeArgument*/ - true - )) { - requires = append(requires, statement.expression); - } else { - nonRequireStatementCount++; - } - } - return requires || emptyArray; - } - function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) { - if (!fileName) - return false; - const supportedExtensions = getSupportedExtensions(compilerOptions, extraFileExtensions); - for (const extension of flatten(getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, supportedExtensions))) { - if (fileExtensionIs(fileName, extension)) { - return true; - } - } - return false; - } - function numberOfDirectorySeparators(str) { - const match = str.match(/\//g); - return match ? match.length : 0; - } - function compareNumberOfDirectorySeparators(path1, path2) { - return compareValues( - numberOfDirectorySeparators(path1), - numberOfDirectorySeparators(path2) - ); - } - function removeFileExtension(path) { - for (const ext of extensionsToRemove) { - const extensionless = tryRemoveExtension(path, ext); - if (extensionless !== void 0) { - return extensionless; - } - } - return path; - } - function tryRemoveExtension(path, extension) { - return fileExtensionIs(path, extension) ? removeExtension(path, extension) : void 0; - } - function removeExtension(path, extension) { - return path.substring(0, path.length - extension.length); - } - function changeExtension(path, newExtension) { - return changeAnyExtension( - path, - newExtension, - extensionsToRemove, - /*ignoreCase*/ - false - ); - } - function tryParsePattern(pattern) { - const indexOfStar = pattern.indexOf("*"); - if (indexOfStar === -1) { - return pattern; - } - return pattern.indexOf("*", indexOfStar + 1) !== -1 ? void 0 : { - prefix: pattern.substr(0, indexOfStar), - suffix: pattern.substr(indexOfStar + 1) - }; - } - function tryParsePatterns(paths) { - return mapDefined(getOwnKeys(paths), (path) => tryParsePattern(path)); - } - function positionIsSynthesized(pos) { - return !(pos >= 0); - } - function extensionIsTS(ext) { - return ext === ".ts" /* Ts */ || ext === ".tsx" /* Tsx */ || ext === ".d.ts" /* Dts */ || ext === ".cts" /* Cts */ || ext === ".mts" /* Mts */ || ext === ".d.mts" /* Dmts */ || ext === ".d.cts" /* Dcts */ || startsWith(ext, ".d.") && endsWith(ext, ".ts"); - } - function resolutionExtensionIsTSOrJson(ext) { - return extensionIsTS(ext) || ext === ".json" /* Json */; - } - function extensionFromPath(path) { - const ext = tryGetExtensionFromPath2(path); - return ext !== void 0 ? ext : Debug.fail(`File ${path} has unknown extension.`); - } - function isAnySupportedFileExtension(path) { - return tryGetExtensionFromPath2(path) !== void 0; - } - function tryGetExtensionFromPath2(path) { - return find(extensionsToRemove, (e) => fileExtensionIs(path, e)); - } - function isCheckJsEnabledForFile(sourceFile, compilerOptions) { - return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs; - } - function matchPatternOrExact(patternOrStrings, candidate) { - const patterns = []; - for (const patternOrString of patternOrStrings) { - if (patternOrString === candidate) { - return candidate; - } - if (!isString(patternOrString)) { - patterns.push(patternOrString); - } - } - return findBestPatternMatch(patterns, (_) => _, candidate); - } - function sliceAfter(arr, value) { - const index = arr.indexOf(value); - Debug.assert(index !== -1); - return arr.slice(index); - } - function addRelatedInfo(diagnostic, ...relatedInformation) { - if (!relatedInformation.length) { - return diagnostic; - } - if (!diagnostic.relatedInformation) { - diagnostic.relatedInformation = []; - } - Debug.assert(diagnostic.relatedInformation !== emptyArray, "Diagnostic had empty array singleton for related info, but is still being constructed!"); - diagnostic.relatedInformation.push(...relatedInformation); - return diagnostic; - } - function minAndMax(arr, getValue) { - Debug.assert(arr.length !== 0); - let min2 = getValue(arr[0]); - let max = min2; - for (let i = 1; i < arr.length; i++) { - const value = getValue(arr[i]); - if (value < min2) { - min2 = value; - } else if (value > max) { - max = value; - } - } - return { min: min2, max }; - } - function rangeOfNode(node) { - return { pos: getTokenPosOfNode(node), end: node.end }; - } - function rangeOfTypeParameters(sourceFile, typeParameters) { - const pos = typeParameters.pos - 1; - const end = Math.min(sourceFile.text.length, skipTrivia(sourceFile.text, typeParameters.end) + 1); - return { pos, end }; - } - function skipTypeChecking(sourceFile, options, host) { - return options.skipLibCheck && sourceFile.isDeclarationFile || options.skipDefaultLibCheck && sourceFile.hasNoDefaultLib || host.isSourceOfProjectReferenceRedirect(sourceFile.fileName); - } - function isJsonEqual(a, b) { - return a === b || typeof a === "object" && a !== null && typeof b === "object" && b !== null && equalOwnProperties(a, b, isJsonEqual); - } - function parsePseudoBigInt(stringValue) { - let log2Base; - switch (stringValue.charCodeAt(1)) { - case 98 /* b */: - case 66 /* B */: - log2Base = 1; - break; - case 111 /* o */: - case 79 /* O */: - log2Base = 3; - break; - case 120 /* x */: - case 88 /* X */: - log2Base = 4; - break; - default: - const nIndex = stringValue.length - 1; - let nonZeroStart = 0; - while (stringValue.charCodeAt(nonZeroStart) === 48 /* _0 */) { - nonZeroStart++; - } - return stringValue.slice(nonZeroStart, nIndex) || "0"; - } - const startIndex = 2, endIndex = stringValue.length - 1; - const bitsNeeded = (endIndex - startIndex) * log2Base; - const segments = new Uint16Array((bitsNeeded >>> 4) + (bitsNeeded & 15 ? 1 : 0)); - for (let i = endIndex - 1, bitOffset = 0; i >= startIndex; i--, bitOffset += log2Base) { - const segment = bitOffset >>> 4; - const digitChar = stringValue.charCodeAt(i); - const digit = digitChar <= 57 /* _9 */ ? digitChar - 48 /* _0 */ : 10 + digitChar - (digitChar <= 70 /* F */ ? 65 /* A */ : 97 /* a */); - const shiftedDigit = digit << (bitOffset & 15); - segments[segment] |= shiftedDigit; - const residual = shiftedDigit >>> 16; - if (residual) - segments[segment + 1] |= residual; - } - let base10Value = ""; - let firstNonzeroSegment = segments.length - 1; - let segmentsRemaining = true; - while (segmentsRemaining) { - let mod10 = 0; - segmentsRemaining = false; - for (let segment = firstNonzeroSegment; segment >= 0; segment--) { - const newSegment = mod10 << 16 | segments[segment]; - const segmentValue = newSegment / 10 | 0; - segments[segment] = segmentValue; - mod10 = newSegment - segmentValue * 10; - if (segmentValue && !segmentsRemaining) { - firstNonzeroSegment = segment; - segmentsRemaining = true; - } - } - base10Value = mod10 + base10Value; - } - return base10Value; - } - function pseudoBigIntToString({ negative, base10Value }) { - return (negative && base10Value !== "0" ? "-" : "") + base10Value; - } - function parseBigInt(text) { - if (!isValidBigIntString( - text, - /*roundTripOnly*/ - false - )) { - return void 0; - } - return parseValidBigInt(text); - } - function parseValidBigInt(text) { - const negative = text.startsWith("-"); - const base10Value = parsePseudoBigInt(`${negative ? text.slice(1) : text}n`); - return { negative, base10Value }; - } - function isValidBigIntString(s, roundTripOnly) { - if (s === "") - return false; - const scanner2 = createScanner( - 99 /* ESNext */, - /*skipTrivia*/ - false - ); - let success = true; - scanner2.setOnError(() => success = false); - scanner2.setText(s + "n"); - let result = scanner2.scan(); - const negative = result === 41 /* MinusToken */; - if (negative) { - result = scanner2.scan(); - } - const flags = scanner2.getTokenFlags(); - return success && result === 10 /* BigIntLiteral */ && scanner2.getTokenEnd() === s.length + 1 && !(flags & 512 /* ContainsSeparator */) && (!roundTripOnly || s === pseudoBigIntToString({ negative, base10Value: parsePseudoBigInt(scanner2.getTokenValue()) })); - } - function isValidTypeOnlyAliasUseSite(useSite) { - return !!(useSite.flags & 33554432 /* Ambient */) || isPartOfTypeQuery(useSite) || isIdentifierInNonEmittingHeritageClause(useSite) || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite) || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite)); - } - function isShorthandPropertyNameUseSite(useSite) { - return isIdentifier(useSite) && isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite; - } - function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) { - while (node.kind === 80 /* Identifier */ || node.kind === 211 /* PropertyAccessExpression */) { - node = node.parent; - } - if (node.kind !== 167 /* ComputedPropertyName */) { - return false; - } - if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { - return true; - } - const containerKind = node.parent.parent.kind; - return containerKind === 264 /* InterfaceDeclaration */ || containerKind === 187 /* TypeLiteral */; - } - function isIdentifierInNonEmittingHeritageClause(node) { - if (node.kind !== 80 /* Identifier */) - return false; - const heritageClause = findAncestor(node.parent, (parent2) => { - switch (parent2.kind) { - case 298 /* HeritageClause */: - return true; - case 211 /* PropertyAccessExpression */: - case 233 /* ExpressionWithTypeArguments */: - return false; - default: - return "quit"; - } - }); - return (heritageClause == null ? void 0 : heritageClause.token) === 119 /* ImplementsKeyword */ || (heritageClause == null ? void 0 : heritageClause.parent.kind) === 264 /* InterfaceDeclaration */; - } - function isIdentifierTypeReference(node) { - return isTypeReferenceNode(node) && isIdentifier(node.typeName); - } - function arrayIsHomogeneous(array, comparer = equateValues) { - if (array.length < 2) - return true; - const first2 = array[0]; - for (let i = 1, length2 = array.length; i < length2; i++) { - const target = array[i]; - if (!comparer(first2, target)) - return false; - } - return true; - } - function setTextRangePos(range, pos) { - range.pos = pos; - return range; - } - function setTextRangeEnd(range, end) { - range.end = end; - return range; - } - function setTextRangePosEnd(range, pos, end) { - return setTextRangeEnd(setTextRangePos(range, pos), end); - } - function setTextRangePosWidth(range, pos, width) { - return setTextRangePosEnd(range, pos, pos + width); - } - function setNodeFlags(node, newFlags) { - if (node) { - node.flags = newFlags; - } - return node; - } - function setParent(child, parent2) { - if (child && parent2) { - child.parent = parent2; - } - return child; - } - function setEachParent(children, parent2) { - if (children) { - for (const child of children) { - setParent(child, parent2); - } - } - return children; - } - function setParentRecursive(rootNode, incremental) { - if (!rootNode) - return rootNode; - forEachChildRecursively(rootNode, isJSDocNode(rootNode) ? bindParentToChildIgnoringJSDoc : bindParentToChild); - return rootNode; - function bindParentToChildIgnoringJSDoc(child, parent2) { - if (incremental && child.parent === parent2) { - return "skip"; - } - setParent(child, parent2); - } - function bindJSDoc(child) { - if (hasJSDocNodes(child)) { - for (const doc of child.jsDoc) { - bindParentToChildIgnoringJSDoc(doc, child); - forEachChildRecursively(doc, bindParentToChildIgnoringJSDoc); - } - } - } - function bindParentToChild(child, parent2) { - return bindParentToChildIgnoringJSDoc(child, parent2) || bindJSDoc(child); - } - } - function isPackedElement(node) { - return !isOmittedExpression(node); - } - function isPackedArrayLiteral(node) { - return isArrayLiteralExpression(node) && every(node.elements, isPackedElement); - } - function expressionResultIsUnused(node) { - Debug.assertIsDefined(node.parent); - while (true) { - const parent2 = node.parent; - if (isParenthesizedExpression(parent2)) { - node = parent2; - continue; - } - if (isExpressionStatement(parent2) || isVoidExpression(parent2) || isForStatement(parent2) && (parent2.initializer === node || parent2.incrementor === node)) { - return true; - } - if (isCommaListExpression(parent2)) { - if (node !== last(parent2.elements)) - return true; - node = parent2; - continue; - } - if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 28 /* CommaToken */) { - if (node === parent2.left) - return true; - node = parent2; - continue; - } - return false; - } - } - function containsIgnoredPath(path) { - return some(ignoredPaths, (p) => stringContains(path, p)); - } - function getContainingNodeArray(node) { - if (!node.parent) - return void 0; - switch (node.kind) { - case 168 /* TypeParameter */: - const { parent: parent3 } = node; - return parent3.kind === 195 /* InferType */ ? void 0 : parent3.typeParameters; - case 169 /* Parameter */: - return node.parent.parameters; - case 204 /* TemplateLiteralTypeSpan */: - return node.parent.templateSpans; - case 239 /* TemplateSpan */: - return node.parent.templateSpans; - case 170 /* Decorator */: { - const { parent: parent4 } = node; - return canHaveDecorators(parent4) ? parent4.modifiers : void 0; - } - case 298 /* HeritageClause */: - return node.parent.heritageClauses; - } - const { parent: parent2 } = node; - if (isJSDocTag(node)) { - return isJSDocTypeLiteral(node.parent) ? void 0 : node.parent.tags; - } - switch (parent2.kind) { - case 187 /* TypeLiteral */: - case 264 /* InterfaceDeclaration */: - return isTypeElement(node) ? parent2.members : void 0; - case 192 /* UnionType */: - case 193 /* IntersectionType */: - return parent2.types; - case 189 /* TupleType */: - case 209 /* ArrayLiteralExpression */: - case 361 /* CommaListExpression */: - case 275 /* NamedImports */: - case 279 /* NamedExports */: - return parent2.elements; - case 210 /* ObjectLiteralExpression */: - case 292 /* JsxAttributes */: - return parent2.properties; - case 213 /* CallExpression */: - case 214 /* NewExpression */: - return isTypeNode(node) ? parent2.typeArguments : parent2.expression === node ? void 0 : parent2.arguments; - case 284 /* JsxElement */: - case 288 /* JsxFragment */: - return isJsxChild(node) ? parent2.children : void 0; - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: - return isTypeNode(node) ? parent2.typeArguments : void 0; - case 241 /* Block */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - case 268 /* ModuleBlock */: - return parent2.statements; - case 269 /* CaseBlock */: - return parent2.clauses; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - return isClassElement(node) ? parent2.members : void 0; - case 266 /* EnumDeclaration */: - return isEnumMember(node) ? parent2.members : void 0; - case 312 /* SourceFile */: - return parent2.statements; - } - } - function hasContextSensitiveParameters(node) { - if (!node.typeParameters) { - if (some(node.parameters, (p) => !getEffectiveTypeAnnotationNode(p))) { - return true; - } - if (node.kind !== 219 /* ArrowFunction */) { - const parameter = firstOrUndefined(node.parameters); - if (!(parameter && parameterIsThisKeyword(parameter))) { - return true; - } - } - } - return false; - } - function isInfinityOrNaNString(name) { - return name === "Infinity" || name === "-Infinity" || name === "NaN"; - } - function isCatchClauseVariableDeclaration(node) { - return node.kind === 260 /* VariableDeclaration */ && node.parent.kind === 299 /* CatchClause */; - } - function isParameterOrCatchClauseVariable(symbol) { - const declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration); - return !!declaration && (isParameter(declaration) || isCatchClauseVariableDeclaration(declaration)); - } - function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 218 /* FunctionExpression */ || node.kind === 219 /* ArrowFunction */; - } - function escapeSnippetText(text) { - return text.replace(/\$/gm, () => "\\$"); - } - function isNumericLiteralName(name) { - return (+name).toString() === name; - } - function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed) { - return isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote); - } - function isThisTypeParameter(type) { - return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType); - } - function getNodeModulePathParts(fullPath) { - let topLevelNodeModulesIndex = 0; - let topLevelPackageNameIndex = 0; - let packageRootIndex = 0; - let fileNameIndex = 0; - let States; - ((States2) => { - States2[States2["BeforeNodeModules"] = 0] = "BeforeNodeModules"; - States2[States2["NodeModules"] = 1] = "NodeModules"; - States2[States2["Scope"] = 2] = "Scope"; - States2[States2["PackageContent"] = 3] = "PackageContent"; - })(States || (States = {})); - let partStart = 0; - let partEnd = 0; - let state = 0 /* BeforeNodeModules */; - while (partEnd >= 0) { - partStart = partEnd; - partEnd = fullPath.indexOf("/", partStart + 1); - switch (state) { - case 0 /* BeforeNodeModules */: - if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) { - topLevelNodeModulesIndex = partStart; - topLevelPackageNameIndex = partEnd; - state = 1 /* NodeModules */; - } - break; - case 1 /* NodeModules */: - case 2 /* Scope */: - if (state === 1 /* NodeModules */ && fullPath.charAt(partStart + 1) === "@") { - state = 2 /* Scope */; - } else { - packageRootIndex = partEnd; - state = 3 /* PackageContent */; - } - break; - case 3 /* PackageContent */: - if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) { - state = 1 /* NodeModules */; - } else { - state = 3 /* PackageContent */; - } - break; - } - } - fileNameIndex = partStart; - return state > 1 /* NodeModules */ ? { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex, fileNameIndex } : void 0; - } - function getParameterTypeNode(parameter) { - var _a; - return parameter.kind === 348 /* JSDocParameterTag */ ? (_a = parameter.typeExpression) == null ? void 0 : _a.type : parameter.type; - } - function isTypeDeclaration(node) { - switch (node.kind) { - case 168 /* TypeParameter */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 266 /* EnumDeclaration */: - case 353 /* JSDocTypedefTag */: - case 345 /* JSDocCallbackTag */: - case 347 /* JSDocEnumTag */: - return true; - case 273 /* ImportClause */: - return node.isTypeOnly; - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: - return node.parent.parent.isTypeOnly; - default: - return false; - } - } - function canHaveExportModifier(node) { - return isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isTypeDeclaration(node) || isModuleDeclaration(node) && !isExternalModuleAugmentation(node) && !isGlobalScopeAugmentation(node); - } - function isOptionalJSDocPropertyLikeTag(node) { - if (!isJSDocPropertyLikeTag(node)) { - return false; - } - const { isBracketed, typeExpression } = node; - return isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */; - } - function canUsePropertyAccess(name, languageVersion) { - if (name.length === 0) { - return false; - } - const firstChar = name.charCodeAt(0); - return firstChar === 35 /* hash */ ? name.length > 1 && isIdentifierStart(name.charCodeAt(1), languageVersion) : isIdentifierStart(firstChar, languageVersion); - } - function hasTabstop(node) { - var _a; - return ((_a = getSnippetElement(node)) == null ? void 0 : _a.kind) === 0 /* TabStop */; - } - function isJSDocOptionalParameter(node) { - return isInJSFile(node) && // node.type should only be a JSDocOptionalType when node is a parameter of a JSDocFunctionType - (node.type && node.type.kind === 323 /* JSDocOptionalType */ || getJSDocParameterTags(node).some(({ isBracketed, typeExpression }) => isBracketed || !!typeExpression && typeExpression.type.kind === 323 /* JSDocOptionalType */)); - } - function isOptionalDeclaration(declaration) { - switch (declaration.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - return !!declaration.questionToken; - case 169 /* Parameter */: - return !!declaration.questionToken || isJSDocOptionalParameter(declaration); - case 355 /* JSDocPropertyTag */: - case 348 /* JSDocParameterTag */: - return isOptionalJSDocPropertyLikeTag(declaration); - default: - return false; - } - } - function isNonNullAccess(node) { - const kind = node.kind; - return (kind === 211 /* PropertyAccessExpression */ || kind === 212 /* ElementAccessExpression */) && isNonNullExpression(node.expression); - } - function isJSDocSatisfiesExpression(node) { - return isInJSFile(node) && isParenthesizedExpression(node) && hasJSDocNodes(node) && !!getJSDocSatisfiesTag(node); - } - function getJSDocSatisfiesExpressionType(node) { - return Debug.checkDefined(tryGetJSDocSatisfiesTypeNode(node)); - } - function tryGetJSDocSatisfiesTypeNode(node) { - const tag = getJSDocSatisfiesTag(node); - return tag && tag.typeExpression && tag.typeExpression.type; - } - function getEscapedTextOfJsxAttributeName(node) { - return isIdentifier(node) ? node.escapedText : getEscapedTextOfJsxNamespacedName(node); - } - function getTextOfJsxAttributeName(node) { - return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node); - } - function isJsxAttributeName(node) { - const kind = node.kind; - return kind === 80 /* Identifier */ || kind === 295 /* JsxNamespacedName */; - } - function getEscapedTextOfJsxNamespacedName(node) { - return `${node.namespace.escapedText}:${idText(node.name)}`; - } - function getTextOfJsxNamespacedName(node) { - return `${idText(node.namespace)}:${idText(node.name)}`; - } - function intrinsicTagNameToString(node) { - return isIdentifier(node) ? idText(node) : getTextOfJsxNamespacedName(node); - } - function isTypeUsableAsPropertyName(type) { - return !!(type.flags & 8576 /* StringOrNumberLiteralOrUnique */); - } - function getPropertyNameFromType(type) { - if (type.flags & 8192 /* UniqueESSymbol */) { - return type.escapedName; - } - if (type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - return escapeLeadingUnderscores("" + type.value); - } - return Debug.fail(); - } - var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries; - var init_utilities = __esm({ - "src/compiler/utilities.ts"() { - "use strict"; - init_ts2(); - resolvingEmptyArray = []; - externalHelpersModuleNameText = "tslib"; - defaultMaximumTruncationLength = 160; - noTruncationMaximumTruncationLength = 1e6; - stringWriter = createSingleLineStringWriter(); - GetLiteralTextFlags = /* @__PURE__ */ ((GetLiteralTextFlags2) => { - GetLiteralTextFlags2[GetLiteralTextFlags2["None"] = 0] = "None"; - GetLiteralTextFlags2[GetLiteralTextFlags2["NeverAsciiEscape"] = 1] = "NeverAsciiEscape"; - GetLiteralTextFlags2[GetLiteralTextFlags2["JsxAttributeEscape"] = 2] = "JsxAttributeEscape"; - GetLiteralTextFlags2[GetLiteralTextFlags2["TerminateUnterminatedLiterals"] = 4] = "TerminateUnterminatedLiterals"; - GetLiteralTextFlags2[GetLiteralTextFlags2["AllowNumericSeparator"] = 8] = "AllowNumericSeparator"; - return GetLiteralTextFlags2; - })(GetLiteralTextFlags || {}); - fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; - fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*/; - fullTripleSlashLibReferenceRegEx = /^(\/\/\/\s*/; - fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*/; - fullTripleSlashAMDModuleRegEx = /^\/\/\/\s*/; - defaultLibReferenceRegEx = /^(\/\/\/\s*/; - AssignmentKind = /* @__PURE__ */ ((AssignmentKind2) => { - AssignmentKind2[AssignmentKind2["None"] = 0] = "None"; - AssignmentKind2[AssignmentKind2["Definite"] = 1] = "Definite"; - AssignmentKind2[AssignmentKind2["Compound"] = 2] = "Compound"; - return AssignmentKind2; - })(AssignmentKind || {}); - FunctionFlags = /* @__PURE__ */ ((FunctionFlags2) => { - FunctionFlags2[FunctionFlags2["Normal"] = 0] = "Normal"; - FunctionFlags2[FunctionFlags2["Generator"] = 1] = "Generator"; - FunctionFlags2[FunctionFlags2["Async"] = 2] = "Async"; - FunctionFlags2[FunctionFlags2["Invalid"] = 4] = "Invalid"; - FunctionFlags2[FunctionFlags2["AsyncGenerator"] = 3] = "AsyncGenerator"; - return FunctionFlags2; - })(FunctionFlags || {}); - Associativity = /* @__PURE__ */ ((Associativity2) => { - Associativity2[Associativity2["Left"] = 0] = "Left"; - Associativity2[Associativity2["Right"] = 1] = "Right"; - return Associativity2; - })(Associativity || {}); - OperatorPrecedence = /* @__PURE__ */ ((OperatorPrecedence2) => { - OperatorPrecedence2[OperatorPrecedence2["Comma"] = 0] = "Comma"; - OperatorPrecedence2[OperatorPrecedence2["Spread"] = 1] = "Spread"; - OperatorPrecedence2[OperatorPrecedence2["Yield"] = 2] = "Yield"; - OperatorPrecedence2[OperatorPrecedence2["Assignment"] = 3] = "Assignment"; - OperatorPrecedence2[OperatorPrecedence2["Conditional"] = 4] = "Conditional"; - OperatorPrecedence2[OperatorPrecedence2["Coalesce"] = 4 /* Conditional */] = "Coalesce"; - OperatorPrecedence2[OperatorPrecedence2["LogicalOR"] = 5] = "LogicalOR"; - OperatorPrecedence2[OperatorPrecedence2["LogicalAND"] = 6] = "LogicalAND"; - OperatorPrecedence2[OperatorPrecedence2["BitwiseOR"] = 7] = "BitwiseOR"; - OperatorPrecedence2[OperatorPrecedence2["BitwiseXOR"] = 8] = "BitwiseXOR"; - OperatorPrecedence2[OperatorPrecedence2["BitwiseAND"] = 9] = "BitwiseAND"; - OperatorPrecedence2[OperatorPrecedence2["Equality"] = 10] = "Equality"; - OperatorPrecedence2[OperatorPrecedence2["Relational"] = 11] = "Relational"; - OperatorPrecedence2[OperatorPrecedence2["Shift"] = 12] = "Shift"; - OperatorPrecedence2[OperatorPrecedence2["Additive"] = 13] = "Additive"; - OperatorPrecedence2[OperatorPrecedence2["Multiplicative"] = 14] = "Multiplicative"; - OperatorPrecedence2[OperatorPrecedence2["Exponentiation"] = 15] = "Exponentiation"; - OperatorPrecedence2[OperatorPrecedence2["Unary"] = 16] = "Unary"; - OperatorPrecedence2[OperatorPrecedence2["Update"] = 17] = "Update"; - OperatorPrecedence2[OperatorPrecedence2["LeftHandSide"] = 18] = "LeftHandSide"; - OperatorPrecedence2[OperatorPrecedence2["Member"] = 19] = "Member"; - OperatorPrecedence2[OperatorPrecedence2["Primary"] = 20] = "Primary"; - OperatorPrecedence2[OperatorPrecedence2["Highest"] = 20 /* Primary */] = "Highest"; - OperatorPrecedence2[OperatorPrecedence2["Lowest"] = 0 /* Comma */] = "Lowest"; - OperatorPrecedence2[OperatorPrecedence2["Invalid"] = -1] = "Invalid"; - return OperatorPrecedence2; - })(OperatorPrecedence || {}); - templateSubstitutionRegExp = /\$\{/g; - doubleQuoteEscapedCharsRegExp = /[\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - singleQuoteEscapedCharsRegExp = /[\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - backtickQuoteEscapedCharsRegExp = /\r\n|[\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g; - escapedCharsMap = new Map(Object.entries({ - " ": "\\t", - "\v": "\\v", - "\f": "\\f", - "\b": "\\b", - "\r": "\\r", - "\n": "\\n", - "\\": "\\\\", - '"': '\\"', - "'": "\\'", - "`": "\\`", - "\u2028": "\\u2028", - // lineSeparator - "\u2029": "\\u2029", - // paragraphSeparator - "\x85": "\\u0085", - // nextLine - "\r\n": "\\r\\n" - // special case for CRLFs in backticks - })); - nonAsciiCharacters = /[^\u0000-\u007F]/g; - jsxDoubleQuoteEscapedCharsRegExp = /["\u0000-\u001f\u2028\u2029\u0085]/g; - jsxSingleQuoteEscapedCharsRegExp = /['\u0000-\u001f\u2028\u2029\u0085]/g; - jsxEscapedCharsMap = new Map(Object.entries({ - '"': """, - "'": "'" - })); - indentStrings = ["", " "]; - base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - carriageReturnLineFeed = "\r\n"; - lineFeed = "\n"; - objectAllocator = { - getNodeConstructor: () => Node4, - getTokenConstructor: () => Token, - getIdentifierConstructor: () => Identifier2, - getPrivateIdentifierConstructor: () => Node4, - getSourceFileConstructor: () => Node4, - getSymbolConstructor: () => Symbol4, - getTypeConstructor: () => Type3, - getSignatureConstructor: () => Signature2, - getSourceMapSourceConstructor: () => SourceMapSource - }; - objectAllocatorPatchers = []; - reservedCharacterPattern = /[^\w\s/]/g; - wildcardCharCodes = [42 /* asterisk */, 63 /* question */]; - commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"]; - implicitExcludePathRegexPattern = `(?!(${commonPackageFolders.join("|")})(/|$))`; - filesMatcher = { - /** - * Matches any single directory segment unless it is the last segment and a .min.js file - * Breakdown: - * [^./] # matches everything up to the first . character (excluding directory separators) - * (\\.(?!min\\.js$))? # matches . characters but not if they are part of the .min.js file extension - */ - singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*", - /** - * Regex for the ** wildcard. Matches any number of subdirectories. When used for including - * files or directories, does not match subdirectories that start with a . character - */ - doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, - replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment) - }; - directoriesMatcher = { - singleAsteriskRegexFragment: "[^/]*", - /** - * Regex for the ** wildcard. Matches any number of subdirectories. When used for including - * files or directories, does not match subdirectories that start with a . character - */ - doubleAsteriskRegexFragment: `(/${implicitExcludePathRegexPattern}[^/.][^/]*)*?`, - replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment) - }; - excludeMatcher = { - singleAsteriskRegexFragment: "[^/]*", - doubleAsteriskRegexFragment: "(/.+?)?", - replaceWildcardCharacter: (match) => replaceWildcardCharacter(match, excludeMatcher.singleAsteriskRegexFragment) - }; - wildcardMatchers = { - files: filesMatcher, - directories: directoriesMatcher, - exclude: excludeMatcher - }; - supportedTSExtensions = [[".ts" /* Ts */, ".tsx" /* Tsx */, ".d.ts" /* Dts */], [".cts" /* Cts */, ".d.cts" /* Dcts */], [".mts" /* Mts */, ".d.mts" /* Dmts */]]; - supportedTSExtensionsFlat = flatten(supportedTSExtensions); - supportedTSExtensionsWithJson = [...supportedTSExtensions, [".json" /* Json */]]; - supportedTSExtensionsForExtractExtension = [".d.ts" /* Dts */, ".d.cts" /* Dcts */, ".d.mts" /* Dmts */, ".cts" /* Cts */, ".mts" /* Mts */, ".ts" /* Ts */, ".tsx" /* Tsx */]; - supportedJSExtensions = [[".js" /* Js */, ".jsx" /* Jsx */], [".mjs" /* Mjs */], [".cjs" /* Cjs */]]; - supportedJSExtensionsFlat = flatten(supportedJSExtensions); - allSupportedExtensions = [[".ts" /* Ts */, ".tsx" /* Tsx */, ".d.ts" /* Dts */, ".js" /* Js */, ".jsx" /* Jsx */], [".cts" /* Cts */, ".d.cts" /* Dcts */, ".cjs" /* Cjs */], [".mts" /* Mts */, ".d.mts" /* Dmts */, ".mjs" /* Mjs */]]; - allSupportedExtensionsWithJson = [...allSupportedExtensions, [".json" /* Json */]]; - supportedDeclarationExtensions = [".d.ts" /* Dts */, ".d.cts" /* Dcts */, ".d.mts" /* Dmts */]; - supportedTSImplementationExtensions = [".ts" /* Ts */, ".cts" /* Cts */, ".mts" /* Mts */, ".tsx" /* Tsx */]; - extensionsNotSupportingExtensionlessResolution = [".mts" /* Mts */, ".d.mts" /* Dmts */, ".mjs" /* Mjs */, ".cts" /* Cts */, ".d.cts" /* Dcts */, ".cjs" /* Cjs */]; - ModuleSpecifierEnding = /* @__PURE__ */ ((ModuleSpecifierEnding2) => { - ModuleSpecifierEnding2[ModuleSpecifierEnding2["Minimal"] = 0] = "Minimal"; - ModuleSpecifierEnding2[ModuleSpecifierEnding2["Index"] = 1] = "Index"; - ModuleSpecifierEnding2[ModuleSpecifierEnding2["JsExtension"] = 2] = "JsExtension"; - ModuleSpecifierEnding2[ModuleSpecifierEnding2["TsExtension"] = 3] = "TsExtension"; - return ModuleSpecifierEnding2; - })(ModuleSpecifierEnding || {}); - extensionsToRemove = [".d.ts" /* Dts */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".mjs" /* Mjs */, ".mts" /* Mts */, ".cjs" /* Cjs */, ".cts" /* Cts */, ".ts" /* Ts */, ".js" /* Js */, ".tsx" /* Tsx */, ".jsx" /* Jsx */, ".json" /* Json */]; - emptyFileSystemEntries = { - files: emptyArray, - directories: emptyArray - }; - } - }); - - // src/compiler/factory/baseNodeFactory.ts - function createBaseNodeFactory() { - let NodeConstructor2; - let TokenConstructor2; - let IdentifierConstructor2; - let PrivateIdentifierConstructor2; - let SourceFileConstructor2; - return { - createBaseSourceFileNode, - createBaseIdentifierNode, - createBasePrivateIdentifierNode, - createBaseTokenNode, - createBaseNode - }; - function createBaseSourceFileNode(kind) { - return new (SourceFileConstructor2 || (SourceFileConstructor2 = objectAllocator.getSourceFileConstructor()))( - kind, - /*pos*/ - -1, - /*end*/ - -1 - ); - } - function createBaseIdentifierNode(kind) { - return new (IdentifierConstructor2 || (IdentifierConstructor2 = objectAllocator.getIdentifierConstructor()))( - kind, - /*pos*/ - -1, - /*end*/ - -1 - ); - } - function createBasePrivateIdentifierNode(kind) { - return new (PrivateIdentifierConstructor2 || (PrivateIdentifierConstructor2 = objectAllocator.getPrivateIdentifierConstructor()))( - kind, - /*pos*/ - -1, - /*end*/ - -1 - ); - } - function createBaseTokenNode(kind) { - return new (TokenConstructor2 || (TokenConstructor2 = objectAllocator.getTokenConstructor()))( - kind, - /*pos*/ - -1, - /*end*/ - -1 - ); - } - function createBaseNode(kind) { - return new (NodeConstructor2 || (NodeConstructor2 = objectAllocator.getNodeConstructor()))( - kind, - /*pos*/ - -1, - /*end*/ - -1 - ); - } - } - var init_baseNodeFactory = __esm({ - "src/compiler/factory/baseNodeFactory.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/factory/parenthesizerRules.ts - function createParenthesizerRules(factory2) { - let binaryLeftOperandParenthesizerCache; - let binaryRightOperandParenthesizerCache; - return { - getParenthesizeLeftSideOfBinaryForOperator, - getParenthesizeRightSideOfBinaryForOperator, - parenthesizeLeftSideOfBinary, - parenthesizeRightSideOfBinary, - parenthesizeExpressionOfComputedPropertyName, - parenthesizeConditionOfConditionalExpression, - parenthesizeBranchOfConditionalExpression, - parenthesizeExpressionOfExportDefault, - parenthesizeExpressionOfNew, - parenthesizeLeftSideOfAccess, - parenthesizeOperandOfPostfixUnary, - parenthesizeOperandOfPrefixUnary, - parenthesizeExpressionsOfCommaDelimitedList, - parenthesizeExpressionForDisallowedComma, - parenthesizeExpressionOfExpressionStatement, - parenthesizeConciseBodyOfArrowFunction, - parenthesizeCheckTypeOfConditionalType, - parenthesizeExtendsTypeOfConditionalType, - parenthesizeConstituentTypesOfUnionType, - parenthesizeConstituentTypeOfUnionType, - parenthesizeConstituentTypesOfIntersectionType, - parenthesizeConstituentTypeOfIntersectionType, - parenthesizeOperandOfTypeOperator, - parenthesizeOperandOfReadonlyTypeOperator, - parenthesizeNonArrayTypeOfPostfixType, - parenthesizeElementTypesOfTupleType, - parenthesizeElementTypeOfTupleType, - parenthesizeTypeOfOptionalType, - parenthesizeTypeArguments, - parenthesizeLeadingTypeArgument - }; - function getParenthesizeLeftSideOfBinaryForOperator(operatorKind) { - binaryLeftOperandParenthesizerCache || (binaryLeftOperandParenthesizerCache = /* @__PURE__ */ new Map()); - let parenthesizerRule = binaryLeftOperandParenthesizerCache.get(operatorKind); - if (!parenthesizerRule) { - parenthesizerRule = (node) => parenthesizeLeftSideOfBinary(operatorKind, node); - binaryLeftOperandParenthesizerCache.set(operatorKind, parenthesizerRule); - } - return parenthesizerRule; - } - function getParenthesizeRightSideOfBinaryForOperator(operatorKind) { - binaryRightOperandParenthesizerCache || (binaryRightOperandParenthesizerCache = /* @__PURE__ */ new Map()); - let parenthesizerRule = binaryRightOperandParenthesizerCache.get(operatorKind); - if (!parenthesizerRule) { - parenthesizerRule = (node) => parenthesizeRightSideOfBinary( - operatorKind, - /*leftSide*/ - void 0, - node - ); - binaryRightOperandParenthesizerCache.set(operatorKind, parenthesizerRule); - } - return parenthesizerRule; - } - function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const binaryOperatorPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, binaryOperator); - const binaryOperatorAssociativity = getOperatorAssociativity(226 /* BinaryExpression */, binaryOperator); - const emittedOperand = skipPartiallyEmittedExpressions(operand); - if (!isLeftSideOfBinary && operand.kind === 219 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) { - return true; - } - const operandPrecedence = getExpressionPrecedence(emittedOperand); - switch (compareValues(operandPrecedence, binaryOperatorPrecedence)) { - case -1 /* LessThan */: - if (!isLeftSideOfBinary && binaryOperatorAssociativity === 1 /* Right */ && operand.kind === 229 /* YieldExpression */) { - return false; - } - return true; - case 1 /* GreaterThan */: - return false; - case 0 /* EqualTo */: - if (isLeftSideOfBinary) { - return binaryOperatorAssociativity === 1 /* Right */; - } else { - if (isBinaryExpression(emittedOperand) && emittedOperand.operatorToken.kind === binaryOperator) { - if (operatorHasAssociativeProperty(binaryOperator)) { - return false; - } - if (binaryOperator === 40 /* PlusToken */) { - const leftKind = leftOperand ? getLiteralKindOfBinaryPlusOperand(leftOperand) : 0 /* Unknown */; - if (isLiteralKind(leftKind) && leftKind === getLiteralKindOfBinaryPlusOperand(emittedOperand)) { - return false; - } - } - } - const operandAssociativity = getExpressionAssociativity(emittedOperand); - return operandAssociativity === 0 /* Left */; - } - } - } - function operatorHasAssociativeProperty(binaryOperator) { - return binaryOperator === 42 /* AsteriskToken */ || binaryOperator === 52 /* BarToken */ || binaryOperator === 51 /* AmpersandToken */ || binaryOperator === 53 /* CaretToken */ || binaryOperator === 28 /* CommaToken */; - } - function getLiteralKindOfBinaryPlusOperand(node) { - node = skipPartiallyEmittedExpressions(node); - if (isLiteralKind(node.kind)) { - return node.kind; - } - if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 40 /* PlusToken */) { - if (node.cachedLiteralKind !== void 0) { - return node.cachedLiteralKind; - } - const leftKind = getLiteralKindOfBinaryPlusOperand(node.left); - const literalKind = isLiteralKind(leftKind) && leftKind === getLiteralKindOfBinaryPlusOperand(node.right) ? leftKind : 0 /* Unknown */; - node.cachedLiteralKind = literalKind; - return literalKind; - } - return 0 /* Unknown */; - } - function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) { - const skipped = skipPartiallyEmittedExpressions(operand); - if (skipped.kind === 217 /* ParenthesizedExpression */) { - return operand; - } - return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) ? factory2.createParenthesizedExpression(operand) : operand; - } - function parenthesizeLeftSideOfBinary(binaryOperator, leftSide) { - return parenthesizeBinaryOperand( - binaryOperator, - leftSide, - /*isLeftSideOfBinary*/ - true - ); - } - function parenthesizeRightSideOfBinary(binaryOperator, leftSide, rightSide) { - return parenthesizeBinaryOperand( - binaryOperator, - rightSide, - /*isLeftSideOfBinary*/ - false, - leftSide - ); - } - function parenthesizeExpressionOfComputedPropertyName(expression) { - return isCommaSequence(expression) ? factory2.createParenthesizedExpression(expression) : expression; - } - function parenthesizeConditionOfConditionalExpression(condition) { - const conditionalPrecedence = getOperatorPrecedence(227 /* ConditionalExpression */, 58 /* QuestionToken */); - const emittedCondition = skipPartiallyEmittedExpressions(condition); - const conditionPrecedence = getExpressionPrecedence(emittedCondition); - if (compareValues(conditionPrecedence, conditionalPrecedence) !== 1 /* GreaterThan */) { - return factory2.createParenthesizedExpression(condition); - } - return condition; - } - function parenthesizeBranchOfConditionalExpression(branch) { - const emittedExpression = skipPartiallyEmittedExpressions(branch); - return isCommaSequence(emittedExpression) ? factory2.createParenthesizedExpression(branch) : branch; - } - function parenthesizeExpressionOfExportDefault(expression) { - const check = skipPartiallyEmittedExpressions(expression); - let needsParens = isCommaSequence(check); - if (!needsParens) { - switch (getLeftmostExpression( - check, - /*stopAtCallExpressions*/ - false - ).kind) { - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - needsParens = true; - } - } - return needsParens ? factory2.createParenthesizedExpression(expression) : expression; - } - function parenthesizeExpressionOfNew(expression) { - const leftmostExpr = getLeftmostExpression( - expression, - /*stopAtCallExpressions*/ - true - ); - switch (leftmostExpr.kind) { - case 213 /* CallExpression */: - return factory2.createParenthesizedExpression(expression); - case 214 /* NewExpression */: - return !leftmostExpr.arguments ? factory2.createParenthesizedExpression(expression) : expression; - } - return parenthesizeLeftSideOfAccess(expression); - } - function parenthesizeLeftSideOfAccess(expression, optionalChain) { - const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isLeftHandSideExpression(emittedExpression) && (emittedExpression.kind !== 214 /* NewExpression */ || emittedExpression.arguments) && (optionalChain || !isOptionalChain(emittedExpression))) { - return expression; - } - return setTextRange(factory2.createParenthesizedExpression(expression), expression); - } - function parenthesizeOperandOfPostfixUnary(operand) { - return isLeftHandSideExpression(operand) ? operand : setTextRange(factory2.createParenthesizedExpression(operand), operand); - } - function parenthesizeOperandOfPrefixUnary(operand) { - return isUnaryExpression(operand) ? operand : setTextRange(factory2.createParenthesizedExpression(operand), operand); - } - function parenthesizeExpressionsOfCommaDelimitedList(elements) { - const result = sameMap(elements, parenthesizeExpressionForDisallowedComma); - return setTextRange(factory2.createNodeArray(result, elements.hasTrailingComma), elements); - } - function parenthesizeExpressionForDisallowedComma(expression) { - const emittedExpression = skipPartiallyEmittedExpressions(expression); - const expressionPrecedence = getExpressionPrecedence(emittedExpression); - const commaPrecedence = getOperatorPrecedence(226 /* BinaryExpression */, 28 /* CommaToken */); - return expressionPrecedence > commaPrecedence ? expression : setTextRange(factory2.createParenthesizedExpression(expression), expression); - } - function parenthesizeExpressionOfExpressionStatement(expression) { - const emittedExpression = skipPartiallyEmittedExpressions(expression); - if (isCallExpression(emittedExpression)) { - const callee = emittedExpression.expression; - const kind = skipPartiallyEmittedExpressions(callee).kind; - if (kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */) { - const updated = factory2.updateCallExpression( - emittedExpression, - setTextRange(factory2.createParenthesizedExpression(callee), callee), - emittedExpression.typeArguments, - emittedExpression.arguments - ); - return factory2.restoreOuterExpressions(expression, updated, 8 /* PartiallyEmittedExpressions */); - } - } - const leftmostExpressionKind = getLeftmostExpression( - emittedExpression, - /*stopAtCallExpressions*/ - false - ).kind; - if (leftmostExpressionKind === 210 /* ObjectLiteralExpression */ || leftmostExpressionKind === 218 /* FunctionExpression */) { - return setTextRange(factory2.createParenthesizedExpression(expression), expression); - } - return expression; - } - function parenthesizeConciseBodyOfArrowFunction(body) { - if (!isBlock(body) && (isCommaSequence(body) || getLeftmostExpression( - body, - /*stopAtCallExpressions*/ - false - ).kind === 210 /* ObjectLiteralExpression */)) { - return setTextRange(factory2.createParenthesizedExpression(body), body); - } - return body; - } - function parenthesizeCheckTypeOfConditionalType(checkType) { - switch (checkType.kind) { - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 194 /* ConditionalType */: - return factory2.createParenthesizedType(checkType); - } - return checkType; - } - function parenthesizeExtendsTypeOfConditionalType(extendsType) { - switch (extendsType.kind) { - case 194 /* ConditionalType */: - return factory2.createParenthesizedType(extendsType); - } - return extendsType; - } - function parenthesizeConstituentTypeOfUnionType(type) { - switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: - return factory2.createParenthesizedType(type); - } - return parenthesizeCheckTypeOfConditionalType(type); - } - function parenthesizeConstituentTypesOfUnionType(members) { - return factory2.createNodeArray(sameMap(members, parenthesizeConstituentTypeOfUnionType)); - } - function parenthesizeConstituentTypeOfIntersectionType(type) { - switch (type.kind) { - case 192 /* UnionType */: - case 193 /* IntersectionType */: - return factory2.createParenthesizedType(type); - } - return parenthesizeConstituentTypeOfUnionType(type); - } - function parenthesizeConstituentTypesOfIntersectionType(members) { - return factory2.createNodeArray(sameMap(members, parenthesizeConstituentTypeOfIntersectionType)); - } - function parenthesizeOperandOfTypeOperator(type) { - switch (type.kind) { - case 193 /* IntersectionType */: - return factory2.createParenthesizedType(type); - } - return parenthesizeConstituentTypeOfIntersectionType(type); - } - function parenthesizeOperandOfReadonlyTypeOperator(type) { - switch (type.kind) { - case 198 /* TypeOperator */: - return factory2.createParenthesizedType(type); - } - return parenthesizeOperandOfTypeOperator(type); - } - function parenthesizeNonArrayTypeOfPostfixType(type) { - switch (type.kind) { - case 195 /* InferType */: - case 198 /* TypeOperator */: - case 186 /* TypeQuery */: - return factory2.createParenthesizedType(type); - } - return parenthesizeOperandOfTypeOperator(type); - } - function parenthesizeElementTypesOfTupleType(types) { - return factory2.createNodeArray(sameMap(types, parenthesizeElementTypeOfTupleType)); - } - function parenthesizeElementTypeOfTupleType(type) { - if (hasJSDocPostfixQuestion(type)) - return factory2.createParenthesizedType(type); - return type; - } - function hasJSDocPostfixQuestion(type) { - if (isJSDocNullableType(type)) - return type.postfix; - if (isNamedTupleMember(type)) - return hasJSDocPostfixQuestion(type.type); - if (isFunctionTypeNode(type) || isConstructorTypeNode(type) || isTypeOperatorNode(type)) - return hasJSDocPostfixQuestion(type.type); - if (isConditionalTypeNode(type)) - return hasJSDocPostfixQuestion(type.falseType); - if (isUnionTypeNode(type)) - return hasJSDocPostfixQuestion(last(type.types)); - if (isIntersectionTypeNode(type)) - return hasJSDocPostfixQuestion(last(type.types)); - if (isInferTypeNode(type)) - return !!type.typeParameter.constraint && hasJSDocPostfixQuestion(type.typeParameter.constraint); - return false; - } - function parenthesizeTypeOfOptionalType(type) { - if (hasJSDocPostfixQuestion(type)) - return factory2.createParenthesizedType(type); - return parenthesizeNonArrayTypeOfPostfixType(type); - } - function parenthesizeLeadingTypeArgument(node) { - return isFunctionOrConstructorTypeNode(node) && node.typeParameters ? factory2.createParenthesizedType(node) : node; - } - function parenthesizeOrdinalTypeArgument(node, i) { - return i === 0 ? parenthesizeLeadingTypeArgument(node) : node; - } - function parenthesizeTypeArguments(typeArguments) { - if (some(typeArguments)) { - return factory2.createNodeArray(sameMap(typeArguments, parenthesizeOrdinalTypeArgument)); - } - } - } - var nullParenthesizerRules; - var init_parenthesizerRules = __esm({ - "src/compiler/factory/parenthesizerRules.ts"() { - "use strict"; - init_ts2(); - nullParenthesizerRules = { - getParenthesizeLeftSideOfBinaryForOperator: (_) => identity, - getParenthesizeRightSideOfBinaryForOperator: (_) => identity, - parenthesizeLeftSideOfBinary: (_binaryOperator, leftSide) => leftSide, - parenthesizeRightSideOfBinary: (_binaryOperator, _leftSide, rightSide) => rightSide, - parenthesizeExpressionOfComputedPropertyName: identity, - parenthesizeConditionOfConditionalExpression: identity, - parenthesizeBranchOfConditionalExpression: identity, - parenthesizeExpressionOfExportDefault: identity, - parenthesizeExpressionOfNew: (expression) => cast(expression, isLeftHandSideExpression), - parenthesizeLeftSideOfAccess: (expression) => cast(expression, isLeftHandSideExpression), - parenthesizeOperandOfPostfixUnary: (operand) => cast(operand, isLeftHandSideExpression), - parenthesizeOperandOfPrefixUnary: (operand) => cast(operand, isUnaryExpression), - parenthesizeExpressionsOfCommaDelimitedList: (nodes) => cast(nodes, isNodeArray), - parenthesizeExpressionForDisallowedComma: identity, - parenthesizeExpressionOfExpressionStatement: identity, - parenthesizeConciseBodyOfArrowFunction: identity, - parenthesizeCheckTypeOfConditionalType: identity, - parenthesizeExtendsTypeOfConditionalType: identity, - parenthesizeConstituentTypesOfUnionType: (nodes) => cast(nodes, isNodeArray), - parenthesizeConstituentTypeOfUnionType: identity, - parenthesizeConstituentTypesOfIntersectionType: (nodes) => cast(nodes, isNodeArray), - parenthesizeConstituentTypeOfIntersectionType: identity, - parenthesizeOperandOfTypeOperator: identity, - parenthesizeOperandOfReadonlyTypeOperator: identity, - parenthesizeNonArrayTypeOfPostfixType: identity, - parenthesizeElementTypesOfTupleType: (nodes) => cast(nodes, isNodeArray), - parenthesizeElementTypeOfTupleType: identity, - parenthesizeTypeOfOptionalType: identity, - parenthesizeTypeArguments: (nodes) => nodes && cast(nodes, isNodeArray), - parenthesizeLeadingTypeArgument: identity - }; - } - }); - - // src/compiler/factory/nodeConverters.ts - function createNodeConverters(factory2) { - return { - convertToFunctionBlock, - convertToFunctionExpression, - convertToClassExpression, - convertToArrayAssignmentElement, - convertToObjectAssignmentElement, - convertToAssignmentPattern, - convertToObjectAssignmentPattern, - convertToArrayAssignmentPattern, - convertToAssignmentElementTarget - }; - function convertToFunctionBlock(node, multiLine) { - if (isBlock(node)) - return node; - const returnStatement = factory2.createReturnStatement(node); - setTextRange(returnStatement, node); - const body = factory2.createBlock([returnStatement], multiLine); - setTextRange(body, node); - return body; - } - function convertToFunctionExpression(node) { - var _a; - if (!node.body) - return Debug.fail(`Cannot convert a FunctionDeclaration without a body`); - const updated = factory2.createFunctionExpression( - (_a = getModifiers(node)) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), - node.asteriskToken, - node.name, - node.typeParameters, - node.parameters, - node.type, - node.body - ); - setOriginalNode(updated, node); - setTextRange(updated, node); - if (getStartsOnNewLine(node)) { - setStartsOnNewLine( - updated, - /*newLine*/ - true - ); - } - return updated; - } - function convertToClassExpression(node) { - var _a; - const updated = factory2.createClassExpression( - (_a = node.modifiers) == null ? void 0 : _a.filter((modifier) => !isExportModifier(modifier) && !isDefaultModifier(modifier)), - node.name, - node.typeParameters, - node.heritageClauses, - node.members - ); - setOriginalNode(updated, node); - setTextRange(updated, node); - if (getStartsOnNewLine(node)) { - setStartsOnNewLine( - updated, - /*newLine*/ - true - ); - } - return updated; - } - function convertToArrayAssignmentElement(element) { - if (isBindingElement(element)) { - if (element.dotDotDotToken) { - Debug.assertNode(element.name, isIdentifier); - return setOriginalNode(setTextRange(factory2.createSpreadElement(element.name), element), element); - } - const expression = convertToAssignmentElementTarget(element.name); - return element.initializer ? setOriginalNode( - setTextRange( - factory2.createAssignment(expression, element.initializer), - element - ), - element - ) : expression; - } - return cast(element, isExpression); - } - function convertToObjectAssignmentElement(element) { - if (isBindingElement(element)) { - if (element.dotDotDotToken) { - Debug.assertNode(element.name, isIdentifier); - return setOriginalNode(setTextRange(factory2.createSpreadAssignment(element.name), element), element); - } - if (element.propertyName) { - const expression = convertToAssignmentElementTarget(element.name); - return setOriginalNode(setTextRange(factory2.createPropertyAssignment(element.propertyName, element.initializer ? factory2.createAssignment(expression, element.initializer) : expression), element), element); - } - Debug.assertNode(element.name, isIdentifier); - return setOriginalNode(setTextRange(factory2.createShorthandPropertyAssignment(element.name, element.initializer), element), element); - } - return cast(element, isObjectLiteralElementLike); - } - function convertToAssignmentPattern(node) { - switch (node.kind) { - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: - return convertToArrayAssignmentPattern(node); - case 206 /* ObjectBindingPattern */: - case 210 /* ObjectLiteralExpression */: - return convertToObjectAssignmentPattern(node); - } - } - function convertToObjectAssignmentPattern(node) { - if (isObjectBindingPattern(node)) { - return setOriginalNode( - setTextRange( - factory2.createObjectLiteralExpression(map(node.elements, convertToObjectAssignmentElement)), - node - ), - node - ); - } - return cast(node, isObjectLiteralExpression); - } - function convertToArrayAssignmentPattern(node) { - if (isArrayBindingPattern(node)) { - return setOriginalNode( - setTextRange( - factory2.createArrayLiteralExpression(map(node.elements, convertToArrayAssignmentElement)), - node - ), - node - ); - } - return cast(node, isArrayLiteralExpression); - } - function convertToAssignmentElementTarget(node) { - if (isBindingPattern(node)) { - return convertToAssignmentPattern(node); - } - return cast(node, isExpression); - } - } - var nullNodeConverters; - var init_nodeConverters = __esm({ - "src/compiler/factory/nodeConverters.ts"() { - "use strict"; - init_ts2(); - nullNodeConverters = { - convertToFunctionBlock: notImplemented, - convertToFunctionExpression: notImplemented, - convertToClassExpression: notImplemented, - convertToArrayAssignmentElement: notImplemented, - convertToObjectAssignmentElement: notImplemented, - convertToAssignmentPattern: notImplemented, - convertToObjectAssignmentPattern: notImplemented, - convertToArrayAssignmentPattern: notImplemented, - convertToAssignmentElementTarget: notImplemented - }; - } - }); - - // src/compiler/factory/nodeFactory.ts - function addNodeFactoryPatcher(fn) { - nodeFactoryPatchers.push(fn); - } - function createNodeFactory(flags, baseFactory2) { - const update = flags & 8 /* NoOriginalNode */ ? updateWithoutOriginal : updateWithOriginal; - const parenthesizerRules = memoize(() => flags & 1 /* NoParenthesizerRules */ ? nullParenthesizerRules : createParenthesizerRules(factory2)); - const converters = memoize(() => flags & 2 /* NoNodeConverters */ ? nullNodeConverters : createNodeConverters(factory2)); - const getBinaryCreateFunction = memoizeOne((operator) => (left, right) => createBinaryExpression(left, operator, right)); - const getPrefixUnaryCreateFunction = memoizeOne((operator) => (operand) => createPrefixUnaryExpression(operator, operand)); - const getPostfixUnaryCreateFunction = memoizeOne((operator) => (operand) => createPostfixUnaryExpression(operand, operator)); - const getJSDocPrimaryTypeCreateFunction = memoizeOne((kind) => () => createJSDocPrimaryTypeWorker(kind)); - const getJSDocUnaryTypeCreateFunction = memoizeOne((kind) => (type) => createJSDocUnaryTypeWorker(kind, type)); - const getJSDocUnaryTypeUpdateFunction = memoizeOne((kind) => (node, type) => updateJSDocUnaryTypeWorker(kind, node, type)); - const getJSDocPrePostfixUnaryTypeCreateFunction = memoizeOne((kind) => (type, postfix) => createJSDocPrePostfixUnaryTypeWorker(kind, type, postfix)); - const getJSDocPrePostfixUnaryTypeUpdateFunction = memoizeOne((kind) => (node, type) => updateJSDocPrePostfixUnaryTypeWorker(kind, node, type)); - const getJSDocSimpleTagCreateFunction = memoizeOne((kind) => (tagName, comment) => createJSDocSimpleTagWorker(kind, tagName, comment)); - const getJSDocSimpleTagUpdateFunction = memoizeOne((kind) => (node, tagName, comment) => updateJSDocSimpleTagWorker(kind, node, tagName, comment)); - const getJSDocTypeLikeTagCreateFunction = memoizeOne((kind) => (tagName, typeExpression, comment) => createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment)); - const getJSDocTypeLikeTagUpdateFunction = memoizeOne((kind) => (node, tagName, typeExpression, comment) => updateJSDocTypeLikeTagWorker(kind, node, tagName, typeExpression, comment)); - const factory2 = { - get parenthesizer() { - return parenthesizerRules(); - }, - get converters() { - return converters(); - }, - baseFactory: baseFactory2, - flags, - createNodeArray, - createNumericLiteral, - createBigIntLiteral, - createStringLiteral, - createStringLiteralFromNode, - createRegularExpressionLiteral, - createLiteralLikeNode, - createIdentifier, - createTempVariable, - createLoopVariable, - createUniqueName, - getGeneratedNameForNode, - createPrivateIdentifier, - createUniquePrivateName, - getGeneratedPrivateNameForNode, - createToken, - createSuper, - createThis, - createNull, - createTrue, - createFalse, - createModifier, - createModifiersFromModifierFlags, - createQualifiedName, - updateQualifiedName, - createComputedPropertyName, - updateComputedPropertyName, - createTypeParameterDeclaration, - updateTypeParameterDeclaration, - createParameterDeclaration, - updateParameterDeclaration, - createDecorator, - updateDecorator, - createPropertySignature, - updatePropertySignature, - createPropertyDeclaration, - updatePropertyDeclaration: updatePropertyDeclaration2, - createMethodSignature, - updateMethodSignature, - createMethodDeclaration, - updateMethodDeclaration, - createConstructorDeclaration, - updateConstructorDeclaration, - createGetAccessorDeclaration, - updateGetAccessorDeclaration, - createSetAccessorDeclaration, - updateSetAccessorDeclaration, - createCallSignature, - updateCallSignature, - createConstructSignature, - updateConstructSignature, - createIndexSignature, - updateIndexSignature, - createClassStaticBlockDeclaration, - updateClassStaticBlockDeclaration, - createTemplateLiteralTypeSpan, - updateTemplateLiteralTypeSpan, - createKeywordTypeNode, - createTypePredicateNode, - updateTypePredicateNode, - createTypeReferenceNode, - updateTypeReferenceNode, - createFunctionTypeNode, - updateFunctionTypeNode, - createConstructorTypeNode, - updateConstructorTypeNode, - createTypeQueryNode, - updateTypeQueryNode, - createTypeLiteralNode, - updateTypeLiteralNode, - createArrayTypeNode, - updateArrayTypeNode, - createTupleTypeNode, - updateTupleTypeNode, - createNamedTupleMember, - updateNamedTupleMember, - createOptionalTypeNode, - updateOptionalTypeNode, - createRestTypeNode, - updateRestTypeNode, - createUnionTypeNode, - updateUnionTypeNode, - createIntersectionTypeNode, - updateIntersectionTypeNode, - createConditionalTypeNode, - updateConditionalTypeNode, - createInferTypeNode, - updateInferTypeNode, - createImportTypeNode, - updateImportTypeNode, - createParenthesizedType, - updateParenthesizedType, - createThisTypeNode, - createTypeOperatorNode, - updateTypeOperatorNode, - createIndexedAccessTypeNode, - updateIndexedAccessTypeNode, - createMappedTypeNode, - updateMappedTypeNode, - createLiteralTypeNode, - updateLiteralTypeNode, - createTemplateLiteralType, - updateTemplateLiteralType, - createObjectBindingPattern, - updateObjectBindingPattern, - createArrayBindingPattern, - updateArrayBindingPattern, - createBindingElement, - updateBindingElement, - createArrayLiteralExpression, - updateArrayLiteralExpression, - createObjectLiteralExpression, - updateObjectLiteralExpression, - createPropertyAccessExpression: flags & 4 /* NoIndentationOnFreshPropertyAccess */ ? (expression, name) => setEmitFlags(createPropertyAccessExpression(expression, name), 262144 /* NoIndentation */) : createPropertyAccessExpression, - updatePropertyAccessExpression, - createPropertyAccessChain: flags & 4 /* NoIndentationOnFreshPropertyAccess */ ? (expression, questionDotToken, name) => setEmitFlags(createPropertyAccessChain(expression, questionDotToken, name), 262144 /* NoIndentation */) : createPropertyAccessChain, - updatePropertyAccessChain, - createElementAccessExpression, - updateElementAccessExpression, - createElementAccessChain, - updateElementAccessChain, - createCallExpression, - updateCallExpression, - createCallChain, - updateCallChain, - createNewExpression, - updateNewExpression, - createTaggedTemplateExpression, - updateTaggedTemplateExpression, - createTypeAssertion, - updateTypeAssertion, - createParenthesizedExpression, - updateParenthesizedExpression, - createFunctionExpression, - updateFunctionExpression, - createArrowFunction, - updateArrowFunction, - createDeleteExpression, - updateDeleteExpression, - createTypeOfExpression, - updateTypeOfExpression, - createVoidExpression, - updateVoidExpression, - createAwaitExpression, - updateAwaitExpression, - createPrefixUnaryExpression, - updatePrefixUnaryExpression, - createPostfixUnaryExpression, - updatePostfixUnaryExpression, - createBinaryExpression, - updateBinaryExpression, - createConditionalExpression, - updateConditionalExpression, - createTemplateExpression, - updateTemplateExpression, - createTemplateHead, - createTemplateMiddle, - createTemplateTail, - createNoSubstitutionTemplateLiteral, - createTemplateLiteralLikeNode, - createYieldExpression, - updateYieldExpression, - createSpreadElement, - updateSpreadElement, - createClassExpression, - updateClassExpression, - createOmittedExpression, - createExpressionWithTypeArguments, - updateExpressionWithTypeArguments, - createAsExpression, - updateAsExpression, - createNonNullExpression, - updateNonNullExpression, - createSatisfiesExpression, - updateSatisfiesExpression, - createNonNullChain, - updateNonNullChain, - createMetaProperty, - updateMetaProperty, - createTemplateSpan, - updateTemplateSpan, - createSemicolonClassElement, - createBlock, - updateBlock, - createVariableStatement, - updateVariableStatement, - createEmptyStatement, - createExpressionStatement, - updateExpressionStatement, - createIfStatement, - updateIfStatement, - createDoStatement, - updateDoStatement, - createWhileStatement, - updateWhileStatement, - createForStatement, - updateForStatement, - createForInStatement, - updateForInStatement, - createForOfStatement, - updateForOfStatement, - createContinueStatement, - updateContinueStatement, - createBreakStatement, - updateBreakStatement, - createReturnStatement, - updateReturnStatement, - createWithStatement, - updateWithStatement, - createSwitchStatement, - updateSwitchStatement, - createLabeledStatement, - updateLabeledStatement, - createThrowStatement, - updateThrowStatement, - createTryStatement, - updateTryStatement, - createDebuggerStatement, - createVariableDeclaration, - updateVariableDeclaration, - createVariableDeclarationList, - updateVariableDeclarationList, - createFunctionDeclaration, - updateFunctionDeclaration, - createClassDeclaration, - updateClassDeclaration, - createInterfaceDeclaration, - updateInterfaceDeclaration, - createTypeAliasDeclaration, - updateTypeAliasDeclaration, - createEnumDeclaration, - updateEnumDeclaration, - createModuleDeclaration, - updateModuleDeclaration, - createModuleBlock, - updateModuleBlock, - createCaseBlock, - updateCaseBlock, - createNamespaceExportDeclaration, - updateNamespaceExportDeclaration, - createImportEqualsDeclaration, - updateImportEqualsDeclaration, - createImportDeclaration, - updateImportDeclaration, - createImportClause, - updateImportClause, - createAssertClause, - updateAssertClause, - createAssertEntry, - updateAssertEntry, - createImportTypeAssertionContainer, - updateImportTypeAssertionContainer, - createNamespaceImport, - updateNamespaceImport, - createNamespaceExport, - updateNamespaceExport, - createNamedImports, - updateNamedImports, - createImportSpecifier, - updateImportSpecifier, - createExportAssignment: createExportAssignment2, - updateExportAssignment, - createExportDeclaration, - updateExportDeclaration, - createNamedExports, - updateNamedExports, - createExportSpecifier, - updateExportSpecifier, - createMissingDeclaration, - createExternalModuleReference, - updateExternalModuleReference, - // lazily load factory members for JSDoc types with similar structure - get createJSDocAllType() { - return getJSDocPrimaryTypeCreateFunction(319 /* JSDocAllType */); - }, - get createJSDocUnknownType() { - return getJSDocPrimaryTypeCreateFunction(320 /* JSDocUnknownType */); - }, - get createJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(322 /* JSDocNonNullableType */); - }, - get updateJSDocNonNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(322 /* JSDocNonNullableType */); - }, - get createJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeCreateFunction(321 /* JSDocNullableType */); - }, - get updateJSDocNullableType() { - return getJSDocPrePostfixUnaryTypeUpdateFunction(321 /* JSDocNullableType */); - }, - get createJSDocOptionalType() { - return getJSDocUnaryTypeCreateFunction(323 /* JSDocOptionalType */); - }, - get updateJSDocOptionalType() { - return getJSDocUnaryTypeUpdateFunction(323 /* JSDocOptionalType */); - }, - get createJSDocVariadicType() { - return getJSDocUnaryTypeCreateFunction(325 /* JSDocVariadicType */); - }, - get updateJSDocVariadicType() { - return getJSDocUnaryTypeUpdateFunction(325 /* JSDocVariadicType */); - }, - get createJSDocNamepathType() { - return getJSDocUnaryTypeCreateFunction(326 /* JSDocNamepathType */); - }, - get updateJSDocNamepathType() { - return getJSDocUnaryTypeUpdateFunction(326 /* JSDocNamepathType */); - }, - createJSDocFunctionType, - updateJSDocFunctionType, - createJSDocTypeLiteral, - updateJSDocTypeLiteral, - createJSDocTypeExpression, - updateJSDocTypeExpression, - createJSDocSignature, - updateJSDocSignature, - createJSDocTemplateTag, - updateJSDocTemplateTag, - createJSDocTypedefTag, - updateJSDocTypedefTag, - createJSDocParameterTag, - updateJSDocParameterTag, - createJSDocPropertyTag, - updateJSDocPropertyTag, - createJSDocCallbackTag, - updateJSDocCallbackTag, - createJSDocOverloadTag, - updateJSDocOverloadTag, - createJSDocAugmentsTag, - updateJSDocAugmentsTag, - createJSDocImplementsTag, - updateJSDocImplementsTag, - createJSDocSeeTag, - updateJSDocSeeTag, - createJSDocNameReference, - updateJSDocNameReference, - createJSDocMemberName, - updateJSDocMemberName, - createJSDocLink, - updateJSDocLink, - createJSDocLinkCode, - updateJSDocLinkCode, - createJSDocLinkPlain, - updateJSDocLinkPlain, - // lazily load factory members for JSDoc tags with similar structure - get createJSDocTypeTag() { - return getJSDocTypeLikeTagCreateFunction(351 /* JSDocTypeTag */); - }, - get updateJSDocTypeTag() { - return getJSDocTypeLikeTagUpdateFunction(351 /* JSDocTypeTag */); - }, - get createJSDocReturnTag() { - return getJSDocTypeLikeTagCreateFunction(349 /* JSDocReturnTag */); - }, - get updateJSDocReturnTag() { - return getJSDocTypeLikeTagUpdateFunction(349 /* JSDocReturnTag */); - }, - get createJSDocThisTag() { - return getJSDocTypeLikeTagCreateFunction(350 /* JSDocThisTag */); - }, - get updateJSDocThisTag() { - return getJSDocTypeLikeTagUpdateFunction(350 /* JSDocThisTag */); - }, - get createJSDocAuthorTag() { - return getJSDocSimpleTagCreateFunction(337 /* JSDocAuthorTag */); - }, - get updateJSDocAuthorTag() { - return getJSDocSimpleTagUpdateFunction(337 /* JSDocAuthorTag */); - }, - get createJSDocClassTag() { - return getJSDocSimpleTagCreateFunction(339 /* JSDocClassTag */); - }, - get updateJSDocClassTag() { - return getJSDocSimpleTagUpdateFunction(339 /* JSDocClassTag */); - }, - get createJSDocPublicTag() { - return getJSDocSimpleTagCreateFunction(340 /* JSDocPublicTag */); - }, - get updateJSDocPublicTag() { - return getJSDocSimpleTagUpdateFunction(340 /* JSDocPublicTag */); - }, - get createJSDocPrivateTag() { - return getJSDocSimpleTagCreateFunction(341 /* JSDocPrivateTag */); - }, - get updateJSDocPrivateTag() { - return getJSDocSimpleTagUpdateFunction(341 /* JSDocPrivateTag */); - }, - get createJSDocProtectedTag() { - return getJSDocSimpleTagCreateFunction(342 /* JSDocProtectedTag */); - }, - get updateJSDocProtectedTag() { - return getJSDocSimpleTagUpdateFunction(342 /* JSDocProtectedTag */); - }, - get createJSDocReadonlyTag() { - return getJSDocSimpleTagCreateFunction(343 /* JSDocReadonlyTag */); - }, - get updateJSDocReadonlyTag() { - return getJSDocSimpleTagUpdateFunction(343 /* JSDocReadonlyTag */); - }, - get createJSDocOverrideTag() { - return getJSDocSimpleTagCreateFunction(344 /* JSDocOverrideTag */); - }, - get updateJSDocOverrideTag() { - return getJSDocSimpleTagUpdateFunction(344 /* JSDocOverrideTag */); - }, - get createJSDocDeprecatedTag() { - return getJSDocSimpleTagCreateFunction(338 /* JSDocDeprecatedTag */); - }, - get updateJSDocDeprecatedTag() { - return getJSDocSimpleTagUpdateFunction(338 /* JSDocDeprecatedTag */); - }, - get createJSDocThrowsTag() { - return getJSDocTypeLikeTagCreateFunction(356 /* JSDocThrowsTag */); - }, - get updateJSDocThrowsTag() { - return getJSDocTypeLikeTagUpdateFunction(356 /* JSDocThrowsTag */); - }, - get createJSDocSatisfiesTag() { - return getJSDocTypeLikeTagCreateFunction(357 /* JSDocSatisfiesTag */); - }, - get updateJSDocSatisfiesTag() { - return getJSDocTypeLikeTagUpdateFunction(357 /* JSDocSatisfiesTag */); - }, - createJSDocEnumTag, - updateJSDocEnumTag, - createJSDocUnknownTag, - updateJSDocUnknownTag, - createJSDocText, - updateJSDocText, - createJSDocComment, - updateJSDocComment, - createJsxElement, - updateJsxElement, - createJsxSelfClosingElement, - updateJsxSelfClosingElement, - createJsxOpeningElement, - updateJsxOpeningElement, - createJsxClosingElement, - updateJsxClosingElement, - createJsxFragment, - createJsxText, - updateJsxText, - createJsxOpeningFragment, - createJsxJsxClosingFragment, - updateJsxFragment, - createJsxAttribute, - updateJsxAttribute, - createJsxAttributes, - updateJsxAttributes, - createJsxSpreadAttribute, - updateJsxSpreadAttribute, - createJsxExpression, - updateJsxExpression, - createJsxNamespacedName, - updateJsxNamespacedName, - createCaseClause, - updateCaseClause, - createDefaultClause, - updateDefaultClause, - createHeritageClause, - updateHeritageClause, - createCatchClause, - updateCatchClause, - createPropertyAssignment, - updatePropertyAssignment, - createShorthandPropertyAssignment, - updateShorthandPropertyAssignment, - createSpreadAssignment, - updateSpreadAssignment, - createEnumMember, - updateEnumMember, - createSourceFile: createSourceFile2, - updateSourceFile: updateSourceFile2, - createRedirectedSourceFile, - createBundle, - updateBundle, - createUnparsedSource, - createUnparsedPrologue, - createUnparsedPrepend, - createUnparsedTextLike, - createUnparsedSyntheticReference, - createInputFiles: createInputFiles2, - createSyntheticExpression, - createSyntaxList: createSyntaxList3, - createNotEmittedStatement, - createPartiallyEmittedExpression, - updatePartiallyEmittedExpression, - createCommaListExpression, - updateCommaListExpression, - createSyntheticReferenceExpression, - updateSyntheticReferenceExpression, - cloneNode, - // Lazily load factory methods for common operator factories and utilities - get createComma() { - return getBinaryCreateFunction(28 /* CommaToken */); - }, - get createAssignment() { - return getBinaryCreateFunction(64 /* EqualsToken */); - }, - get createLogicalOr() { - return getBinaryCreateFunction(57 /* BarBarToken */); - }, - get createLogicalAnd() { - return getBinaryCreateFunction(56 /* AmpersandAmpersandToken */); - }, - get createBitwiseOr() { - return getBinaryCreateFunction(52 /* BarToken */); - }, - get createBitwiseXor() { - return getBinaryCreateFunction(53 /* CaretToken */); - }, - get createBitwiseAnd() { - return getBinaryCreateFunction(51 /* AmpersandToken */); - }, - get createStrictEquality() { - return getBinaryCreateFunction(37 /* EqualsEqualsEqualsToken */); - }, - get createStrictInequality() { - return getBinaryCreateFunction(38 /* ExclamationEqualsEqualsToken */); - }, - get createEquality() { - return getBinaryCreateFunction(35 /* EqualsEqualsToken */); - }, - get createInequality() { - return getBinaryCreateFunction(36 /* ExclamationEqualsToken */); - }, - get createLessThan() { - return getBinaryCreateFunction(30 /* LessThanToken */); - }, - get createLessThanEquals() { - return getBinaryCreateFunction(33 /* LessThanEqualsToken */); - }, - get createGreaterThan() { - return getBinaryCreateFunction(32 /* GreaterThanToken */); - }, - get createGreaterThanEquals() { - return getBinaryCreateFunction(34 /* GreaterThanEqualsToken */); - }, - get createLeftShift() { - return getBinaryCreateFunction(48 /* LessThanLessThanToken */); - }, - get createRightShift() { - return getBinaryCreateFunction(49 /* GreaterThanGreaterThanToken */); - }, - get createUnsignedRightShift() { - return getBinaryCreateFunction(50 /* GreaterThanGreaterThanGreaterThanToken */); - }, - get createAdd() { - return getBinaryCreateFunction(40 /* PlusToken */); - }, - get createSubtract() { - return getBinaryCreateFunction(41 /* MinusToken */); - }, - get createMultiply() { - return getBinaryCreateFunction(42 /* AsteriskToken */); - }, - get createDivide() { - return getBinaryCreateFunction(44 /* SlashToken */); - }, - get createModulo() { - return getBinaryCreateFunction(45 /* PercentToken */); - }, - get createExponent() { - return getBinaryCreateFunction(43 /* AsteriskAsteriskToken */); - }, - get createPrefixPlus() { - return getPrefixUnaryCreateFunction(40 /* PlusToken */); - }, - get createPrefixMinus() { - return getPrefixUnaryCreateFunction(41 /* MinusToken */); - }, - get createPrefixIncrement() { - return getPrefixUnaryCreateFunction(46 /* PlusPlusToken */); - }, - get createPrefixDecrement() { - return getPrefixUnaryCreateFunction(47 /* MinusMinusToken */); - }, - get createBitwiseNot() { - return getPrefixUnaryCreateFunction(55 /* TildeToken */); - }, - get createLogicalNot() { - return getPrefixUnaryCreateFunction(54 /* ExclamationToken */); - }, - get createPostfixIncrement() { - return getPostfixUnaryCreateFunction(46 /* PlusPlusToken */); - }, - get createPostfixDecrement() { - return getPostfixUnaryCreateFunction(47 /* MinusMinusToken */); - }, - // Compound nodes - createImmediatelyInvokedFunctionExpression, - createImmediatelyInvokedArrowFunction, - createVoidZero, - createExportDefault, - createExternalModuleExport, - createTypeCheck, - createIsNotTypeCheck, - createMethodCall, - createGlobalMethodCall, - createFunctionBindCall, - createFunctionCallCall, - createFunctionApplyCall, - createArraySliceCall, - createArrayConcatCall, - createObjectDefinePropertyCall, - createObjectGetOwnPropertyDescriptorCall, - createReflectGetCall, - createReflectSetCall, - createPropertyDescriptor, - createCallBinding, - createAssignmentTargetWrapper, - // Utilities - inlineExpressions, - getInternalName, - getLocalName, - getExportName, - getDeclarationName, - getNamespaceMemberName, - getExternalModuleOrNamespaceExportName, - restoreOuterExpressions, - restoreEnclosingLabel, - createUseStrictPrologue, - copyPrologue, - copyStandardPrologue, - copyCustomPrologue, - ensureUseStrict, - liftToBlock, - mergeLexicalEnvironment, - updateModifiers, - updateModifierLike - }; - forEach(nodeFactoryPatchers, (fn) => fn(factory2)); - return factory2; - function createNodeArray(elements, hasTrailingComma) { - if (elements === void 0 || elements === emptyArray) { - elements = []; - } else if (isNodeArray(elements)) { - if (hasTrailingComma === void 0 || elements.hasTrailingComma === hasTrailingComma) { - if (elements.transformFlags === void 0) { - aggregateChildrenFlags(elements); - } - Debug.attachNodeArrayDebugInfo(elements); - return elements; - } - const array2 = elements.slice(); - array2.pos = elements.pos; - array2.end = elements.end; - array2.hasTrailingComma = hasTrailingComma; - array2.transformFlags = elements.transformFlags; - Debug.attachNodeArrayDebugInfo(array2); - return array2; - } - const length2 = elements.length; - const array = length2 >= 1 && length2 <= 4 ? elements.slice() : elements; - array.pos = -1; - array.end = -1; - array.hasTrailingComma = !!hasTrailingComma; - array.transformFlags = 0 /* None */; - aggregateChildrenFlags(array); - Debug.attachNodeArrayDebugInfo(array); - return array; - } - function createBaseNode(kind) { - return baseFactory2.createBaseNode(kind); - } - function createBaseDeclaration(kind) { - const node = createBaseNode(kind); - node.symbol = void 0; - node.localSymbol = void 0; - return node; - } - function finishUpdateBaseSignatureDeclaration(updated, original) { - if (updated !== original) { - updated.typeArguments = original.typeArguments; - } - return update(updated, original); - } - function createNumericLiteral(value, numericLiteralFlags = 0 /* None */) { - const node = createBaseDeclaration(9 /* NumericLiteral */); - node.text = typeof value === "number" ? value + "" : value; - node.numericLiteralFlags = numericLiteralFlags; - if (numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */) - node.transformFlags |= 1024 /* ContainsES2015 */; - return node; - } - function createBigIntLiteral(value) { - const node = createBaseToken(10 /* BigIntLiteral */); - node.text = typeof value === "string" ? value : pseudoBigIntToString(value) + "n"; - node.transformFlags |= 32 /* ContainsES2020 */; - return node; - } - function createBaseStringLiteral(text, isSingleQuote) { - const node = createBaseDeclaration(11 /* StringLiteral */); - node.text = text; - node.singleQuote = isSingleQuote; - return node; - } - function createStringLiteral(text, isSingleQuote, hasExtendedUnicodeEscape) { - const node = createBaseStringLiteral(text, isSingleQuote); - node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape; - if (hasExtendedUnicodeEscape) - node.transformFlags |= 1024 /* ContainsES2015 */; - return node; - } - function createStringLiteralFromNode(sourceNode) { - const node = createBaseStringLiteral( - getTextOfIdentifierOrLiteral(sourceNode), - /*isSingleQuote*/ - void 0 - ); - node.textSourceNode = sourceNode; - return node; - } - function createRegularExpressionLiteral(text) { - const node = createBaseToken(14 /* RegularExpressionLiteral */); - node.text = text; - return node; - } - function createLiteralLikeNode(kind, text) { - switch (kind) { - case 9 /* NumericLiteral */: - return createNumericLiteral( - text, - /*numericLiteralFlags*/ - 0 - ); - case 10 /* BigIntLiteral */: - return createBigIntLiteral(text); - case 11 /* StringLiteral */: - return createStringLiteral( - text, - /*isSingleQuote*/ - void 0 - ); - case 12 /* JsxText */: - return createJsxText( - text, - /*containsOnlyTriviaWhiteSpaces*/ - false - ); - case 13 /* JsxTextAllWhiteSpaces */: - return createJsxText( - text, - /*containsOnlyTriviaWhiteSpaces*/ - true - ); - case 14 /* RegularExpressionLiteral */: - return createRegularExpressionLiteral(text); - case 15 /* NoSubstitutionTemplateLiteral */: - return createTemplateLiteralLikeNode( - kind, - text, - /*rawText*/ - void 0, - /*templateFlags*/ - 0 - ); - } - } - function createBaseIdentifier(escapedText) { - const node = baseFactory2.createBaseIdentifierNode(80 /* Identifier */); - node.escapedText = escapedText; - node.jsDoc = void 0; - node.flowNode = void 0; - node.symbol = void 0; - return node; - } - function createBaseGeneratedIdentifier(text, autoGenerateFlags, prefix, suffix) { - const node = createBaseIdentifier(escapeLeadingUnderscores(text)); - setIdentifierAutoGenerate(node, { - flags: autoGenerateFlags, - id: nextAutoGenerateId, - prefix, - suffix - }); - nextAutoGenerateId++; - return node; - } - function createIdentifier(text, originalKeywordKind, hasExtendedUnicodeEscape) { - if (originalKeywordKind === void 0 && text) { - originalKeywordKind = stringToToken(text); - } - if (originalKeywordKind === 80 /* Identifier */) { - originalKeywordKind = void 0; - } - const node = createBaseIdentifier(escapeLeadingUnderscores(text)); - if (hasExtendedUnicodeEscape) - node.flags |= 256 /* IdentifierHasExtendedUnicodeEscape */; - if (node.escapedText === "await") { - node.transformFlags |= 67108864 /* ContainsPossibleTopLevelAwait */; - } - if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { - node.transformFlags |= 1024 /* ContainsES2015 */; - } - return node; - } - function createTempVariable(recordTempVariable, reservedInNestedScopes, prefix, suffix) { - let flags2 = 1 /* Auto */; - if (reservedInNestedScopes) - flags2 |= 8 /* ReservedInNestedScopes */; - const name = createBaseGeneratedIdentifier("", flags2, prefix, suffix); - if (recordTempVariable) { - recordTempVariable(name); - } - return name; - } - function createLoopVariable(reservedInNestedScopes) { - let flags2 = 2 /* Loop */; - if (reservedInNestedScopes) - flags2 |= 8 /* ReservedInNestedScopes */; - return createBaseGeneratedIdentifier( - "", - flags2, - /*prefix*/ - void 0, - /*suffix*/ - void 0 - ); - } - function createUniqueName(text, flags2 = 0 /* None */, prefix, suffix) { - Debug.assert(!(flags2 & 7 /* KindMask */), "Argument out of range: flags"); - Debug.assert((flags2 & (16 /* Optimistic */ | 32 /* FileLevel */)) !== 32 /* FileLevel */, "GeneratedIdentifierFlags.FileLevel cannot be set without also setting GeneratedIdentifierFlags.Optimistic"); - return createBaseGeneratedIdentifier(text, 3 /* Unique */ | flags2, prefix, suffix); - } - function getGeneratedNameForNode(node, flags2 = 0, prefix, suffix) { - Debug.assert(!(flags2 & 7 /* KindMask */), "Argument out of range: flags"); - const text = !node ? "" : isMemberName(node) ? formatGeneratedName( - /*privateName*/ - false, - prefix, - node, - suffix, - idText - ) : `generated@${getNodeId(node)}`; - if (prefix || suffix) - flags2 |= 16 /* Optimistic */; - const name = createBaseGeneratedIdentifier(text, 4 /* Node */ | flags2, prefix, suffix); - name.original = node; - return name; - } - function createBasePrivateIdentifier(escapedText) { - const node = baseFactory2.createBasePrivateIdentifierNode(81 /* PrivateIdentifier */); - node.escapedText = escapedText; - node.transformFlags |= 16777216 /* ContainsClassFields */; - return node; - } - function createPrivateIdentifier(text) { - if (!startsWith(text, "#")) - Debug.fail("First character of private identifier must be #: " + text); - return createBasePrivateIdentifier(escapeLeadingUnderscores(text)); - } - function createBaseGeneratedPrivateIdentifier(text, autoGenerateFlags, prefix, suffix) { - const node = createBasePrivateIdentifier(escapeLeadingUnderscores(text)); - setIdentifierAutoGenerate(node, { - flags: autoGenerateFlags, - id: nextAutoGenerateId, - prefix, - suffix - }); - nextAutoGenerateId++; - return node; - } - function createUniquePrivateName(text, prefix, suffix) { - if (text && !startsWith(text, "#")) - Debug.fail("First character of private identifier must be #: " + text); - const autoGenerateFlags = 8 /* ReservedInNestedScopes */ | (text ? 3 /* Unique */ : 1 /* Auto */); - return createBaseGeneratedPrivateIdentifier(text ?? "", autoGenerateFlags, prefix, suffix); - } - function getGeneratedPrivateNameForNode(node, prefix, suffix) { - const text = isMemberName(node) ? formatGeneratedName( - /*privateName*/ - true, - prefix, - node, - suffix, - idText - ) : `#generated@${getNodeId(node)}`; - const flags2 = prefix || suffix ? 16 /* Optimistic */ : 0 /* None */; - const name = createBaseGeneratedPrivateIdentifier(text, 4 /* Node */ | flags2, prefix, suffix); - name.original = node; - return name; - } - function createBaseToken(kind) { - return baseFactory2.createBaseTokenNode(kind); - } - function createToken(token) { - Debug.assert(token >= 0 /* FirstToken */ && token <= 165 /* LastToken */, "Invalid token"); - Debug.assert(token <= 15 /* FirstTemplateToken */ || token >= 18 /* LastTemplateToken */, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals."); - Debug.assert(token <= 9 /* FirstLiteralToken */ || token >= 15 /* LastLiteralToken */, "Invalid token. Use 'createLiteralLikeNode' to create literals."); - Debug.assert(token !== 80 /* Identifier */, "Invalid token. Use 'createIdentifier' to create identifiers"); - const node = createBaseToken(token); - let transformFlags = 0 /* None */; - switch (token) { - case 134 /* AsyncKeyword */: - transformFlags = 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; - break; - case 160 /* UsingKeyword */: - transformFlags = 4 /* ContainsESNext */; - break; - case 125 /* PublicKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - case 148 /* ReadonlyKeyword */: - case 128 /* AbstractKeyword */: - case 138 /* DeclareKeyword */: - case 87 /* ConstKeyword */: - case 133 /* AnyKeyword */: - case 150 /* NumberKeyword */: - case 163 /* BigIntKeyword */: - case 146 /* NeverKeyword */: - case 151 /* ObjectKeyword */: - case 103 /* InKeyword */: - case 147 /* OutKeyword */: - case 164 /* OverrideKeyword */: - case 154 /* StringKeyword */: - case 136 /* BooleanKeyword */: - case 155 /* SymbolKeyword */: - case 116 /* VoidKeyword */: - case 159 /* UnknownKeyword */: - case 157 /* UndefinedKeyword */: - transformFlags = 1 /* ContainsTypeScript */; - break; - case 108 /* SuperKeyword */: - transformFlags = 1024 /* ContainsES2015 */ | 134217728 /* ContainsLexicalSuper */; - node.flowNode = void 0; - break; - case 126 /* StaticKeyword */: - transformFlags = 1024 /* ContainsES2015 */; - break; - case 129 /* AccessorKeyword */: - transformFlags = 16777216 /* ContainsClassFields */; - break; - case 110 /* ThisKeyword */: - transformFlags = 16384 /* ContainsLexicalThis */; - node.flowNode = void 0; - break; - } - if (transformFlags) { - node.transformFlags |= transformFlags; - } - return node; - } - function createSuper() { - return createToken(108 /* SuperKeyword */); - } - function createThis() { - return createToken(110 /* ThisKeyword */); - } - function createNull() { - return createToken(106 /* NullKeyword */); - } - function createTrue() { - return createToken(112 /* TrueKeyword */); - } - function createFalse() { - return createToken(97 /* FalseKeyword */); - } - function createModifier(kind) { - return createToken(kind); - } - function createModifiersFromModifierFlags(flags2) { - const result = []; - if (flags2 & 1 /* Export */) - result.push(createModifier(95 /* ExportKeyword */)); - if (flags2 & 2 /* Ambient */) - result.push(createModifier(138 /* DeclareKeyword */)); - if (flags2 & 1024 /* Default */) - result.push(createModifier(90 /* DefaultKeyword */)); - if (flags2 & 2048 /* Const */) - result.push(createModifier(87 /* ConstKeyword */)); - if (flags2 & 4 /* Public */) - result.push(createModifier(125 /* PublicKeyword */)); - if (flags2 & 8 /* Private */) - result.push(createModifier(123 /* PrivateKeyword */)); - if (flags2 & 16 /* Protected */) - result.push(createModifier(124 /* ProtectedKeyword */)); - if (flags2 & 256 /* Abstract */) - result.push(createModifier(128 /* AbstractKeyword */)); - if (flags2 & 32 /* Static */) - result.push(createModifier(126 /* StaticKeyword */)); - if (flags2 & 16384 /* Override */) - result.push(createModifier(164 /* OverrideKeyword */)); - if (flags2 & 64 /* Readonly */) - result.push(createModifier(148 /* ReadonlyKeyword */)); - if (flags2 & 128 /* Accessor */) - result.push(createModifier(129 /* AccessorKeyword */)); - if (flags2 & 512 /* Async */) - result.push(createModifier(134 /* AsyncKeyword */)); - if (flags2 & 32768 /* In */) - result.push(createModifier(103 /* InKeyword */)); - if (flags2 & 65536 /* Out */) - result.push(createModifier(147 /* OutKeyword */)); - return result.length ? result : void 0; - } - function createQualifiedName(left, right) { - const node = createBaseNode(166 /* QualifiedName */); - node.left = left; - node.right = asName(right); - node.transformFlags |= propagateChildFlags(node.left) | propagateIdentifierNameFlags(node.right); - node.flowNode = void 0; - return node; - } - function updateQualifiedName(node, left, right) { - return node.left !== left || node.right !== right ? update(createQualifiedName(left, right), node) : node; - } - function createComputedPropertyName(expression) { - const node = createBaseNode(167 /* ComputedPropertyName */); - node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression); - node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 131072 /* ContainsComputedPropertyName */; - return node; - } - function updateComputedPropertyName(node, expression) { - return node.expression !== expression ? update(createComputedPropertyName(expression), node) : node; - } - function createTypeParameterDeclaration(modifiers, name, constraint, defaultType) { - const node = createBaseDeclaration(168 /* TypeParameter */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.constraint = constraint; - node.default = defaultType; - node.transformFlags = 1 /* ContainsTypeScript */; - node.expression = void 0; - node.jsDoc = void 0; - return node; - } - function updateTypeParameterDeclaration(node, modifiers, name, constraint, defaultType) { - return node.modifiers !== modifiers || node.name !== name || node.constraint !== constraint || node.default !== defaultType ? update(createTypeParameterDeclaration(modifiers, name, constraint, defaultType), node) : node; - } - function createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer) { - const node = createBaseDeclaration(169 /* Parameter */); - node.modifiers = asNodeArray(modifiers); - node.dotDotDotToken = dotDotDotToken; - node.name = asName(name); - node.questionToken = questionToken; - node.type = type; - node.initializer = asInitializer(initializer); - if (isThisIdentifier(node.name)) { - node.transformFlags = 1 /* ContainsTypeScript */; - } else { - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */); - } - node.jsDoc = void 0; - return node; - } - function updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer) { - return node.modifiers !== modifiers || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type || node.initializer !== initializer ? update(createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer), node) : node; - } - function createDecorator(expression) { - const node = createBaseNode(170 /* Decorator */); - node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - false - ); - node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */ | 8192 /* ContainsTypeScriptClassSyntax */ | 33554432 /* ContainsDecorators */; - return node; - } - function updateDecorator(node, expression) { - return node.expression !== expression ? update(createDecorator(expression), node) : node; - } - function createPropertySignature(modifiers, name, questionToken, type) { - const node = createBaseDeclaration(171 /* PropertySignature */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.type = type; - node.questionToken = questionToken; - node.transformFlags = 1 /* ContainsTypeScript */; - node.initializer = void 0; - node.jsDoc = void 0; - return node; - } - function updatePropertySignature(node, modifiers, name, questionToken, type) { - return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.type !== type ? finishUpdatePropertySignature(createPropertySignature(modifiers, name, questionToken, type), node) : node; - } - function finishUpdatePropertySignature(updated, original) { - if (updated !== original) { - updated.initializer = original.initializer; - } - return update(updated, original); - } - function createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer) { - const node = createBaseDeclaration(172 /* PropertyDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.questionToken = questionOrExclamationToken && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; - node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; - node.type = type; - node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; - node.jsDoc = void 0; - return node; - } - function updatePropertyDeclaration2(node, modifiers, name, questionOrExclamationToken, type, initializer) { - return node.modifiers !== modifiers || node.name !== name || node.questionToken !== (questionOrExclamationToken !== void 0 && isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.exclamationToken !== (questionOrExclamationToken !== void 0 && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0) || node.type !== type || node.initializer !== initializer ? update(createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer), node) : node; - } - function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) { - const node = createBaseDeclaration(173 /* MethodSignature */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.questionToken = questionToken; - node.typeParameters = asNodeArray(typeParameters); - node.parameters = asNodeArray(parameters); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.typeArguments = void 0; - return node; - } - function updateMethodSignature(node, modifiers, name, questionToken, typeParameters, parameters, type) { - return node.modifiers !== modifiers || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type), node) : node; - } - function createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(174 /* MethodDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.asteriskToken = asteriskToken; - node.name = asName(name); - node.questionToken = questionToken; - node.exclamationToken = void 0; - node.typeParameters = asNodeArray(typeParameters); - node.parameters = createNodeArray(parameters); - node.type = type; - node.body = body; - if (!node.body) { - node.transformFlags = 1 /* ContainsTypeScript */; - } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; - const isGenerator = !!node.asteriskToken; - const isAsyncGenerator = isAsync && isGenerator; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; - } - node.typeArguments = void 0; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.flowNode = void 0; - node.endFlowNode = void 0; - node.returnFlowNode = void 0; - return node; - } - function updateMethodDeclaration(node, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) { - return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.questionToken !== questionToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateMethodDeclaration(createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node) : node; - } - function finishUpdateMethodDeclaration(updated, original) { - if (updated !== original) { - updated.exclamationToken = original.exclamationToken; - } - return update(updated, original); - } - function createClassStaticBlockDeclaration(body) { - const node = createBaseDeclaration(175 /* ClassStaticBlockDeclaration */); - node.body = body; - node.transformFlags = propagateChildFlags(body) | 16777216 /* ContainsClassFields */; - node.modifiers = void 0; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.endFlowNode = void 0; - node.returnFlowNode = void 0; - return node; - } - function updateClassStaticBlockDeclaration(node, body) { - return node.body !== body ? finishUpdateClassStaticBlockDeclaration(createClassStaticBlockDeclaration(body), node) : node; - } - function finishUpdateClassStaticBlockDeclaration(updated, original) { - if (updated !== original) { - updated.modifiers = original.modifiers; - } - return update(updated, original); - } - function createConstructorDeclaration(modifiers, parameters, body) { - const node = createBaseDeclaration(176 /* Constructor */); - node.modifiers = asNodeArray(modifiers); - node.parameters = createNodeArray(parameters); - node.body = body; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | 1024 /* ContainsES2015 */; - node.typeParameters = void 0; - node.type = void 0; - node.typeArguments = void 0; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.endFlowNode = void 0; - node.returnFlowNode = void 0; - return node; - } - function updateConstructorDeclaration(node, modifiers, parameters, body) { - return node.modifiers !== modifiers || node.parameters !== parameters || node.body !== body ? finishUpdateConstructorDeclaration(createConstructorDeclaration(modifiers, parameters, body), node) : node; - } - function finishUpdateConstructorDeclaration(updated, original) { - if (updated !== original) { - updated.typeParameters = original.typeParameters; - updated.type = original.type; - } - return finishUpdateBaseSignatureDeclaration(updated, original); - } - function createGetAccessorDeclaration(modifiers, name, parameters, type, body) { - const node = createBaseDeclaration(177 /* GetAccessor */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.parameters = createNodeArray(parameters); - node.type = type; - node.body = body; - if (!node.body) { - node.transformFlags = 1 /* ContainsTypeScript */; - } else { - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); - } - node.typeArguments = void 0; - node.typeParameters = void 0; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.flowNode = void 0; - node.endFlowNode = void 0; - node.returnFlowNode = void 0; - return node; - } - function updateGetAccessorDeclaration(node, modifiers, name, parameters, type, body) { - return node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateGetAccessorDeclaration(createGetAccessorDeclaration(modifiers, name, parameters, type, body), node) : node; - } - function finishUpdateGetAccessorDeclaration(updated, original) { - if (updated !== original) { - updated.typeParameters = original.typeParameters; - } - return finishUpdateBaseSignatureDeclaration(updated, original); - } - function createSetAccessorDeclaration(modifiers, name, parameters, body) { - const node = createBaseDeclaration(178 /* SetAccessor */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.parameters = createNodeArray(parameters); - node.body = body; - if (!node.body) { - node.transformFlags = 1 /* ContainsTypeScript */; - } else { - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); - } - node.typeArguments = void 0; - node.typeParameters = void 0; - node.type = void 0; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.flowNode = void 0; - node.endFlowNode = void 0; - node.returnFlowNode = void 0; - return node; - } - function updateSetAccessorDeclaration(node, modifiers, name, parameters, body) { - return node.modifiers !== modifiers || node.name !== name || node.parameters !== parameters || node.body !== body ? finishUpdateSetAccessorDeclaration(createSetAccessorDeclaration(modifiers, name, parameters, body), node) : node; - } - function finishUpdateSetAccessorDeclaration(updated, original) { - if (updated !== original) { - updated.typeParameters = original.typeParameters; - updated.type = original.type; - } - return finishUpdateBaseSignatureDeclaration(updated, original); - } - function createCallSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(179 /* CallSignature */); - node.typeParameters = asNodeArray(typeParameters); - node.parameters = asNodeArray(parameters); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.typeArguments = void 0; - return node; - } - function updateCallSignature(node, typeParameters, parameters, type) { - return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createCallSignature(typeParameters, parameters, type), node) : node; - } - function createConstructSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(180 /* ConstructSignature */); - node.typeParameters = asNodeArray(typeParameters); - node.parameters = asNodeArray(parameters); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.typeArguments = void 0; - return node; - } - function updateConstructSignature(node, typeParameters, parameters, type) { - return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructSignature(typeParameters, parameters, type), node) : node; - } - function createIndexSignature(modifiers, parameters, type) { - const node = createBaseDeclaration(181 /* IndexSignature */); - node.modifiers = asNodeArray(modifiers); - node.parameters = asNodeArray(parameters); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.typeArguments = void 0; - return node; - } - function updateIndexSignature(node, modifiers, parameters, type) { - return node.parameters !== parameters || node.type !== type || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type), node) : node; - } - function createTemplateLiteralTypeSpan(type, literal) { - const node = createBaseNode(204 /* TemplateLiteralTypeSpan */); - node.type = type; - node.literal = literal; - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateTemplateLiteralTypeSpan(node, type, literal) { - return node.type !== type || node.literal !== literal ? update(createTemplateLiteralTypeSpan(type, literal), node) : node; - } - function createKeywordTypeNode(kind) { - return createToken(kind); - } - function createTypePredicateNode(assertsModifier, parameterName, type) { - const node = createBaseNode(182 /* TypePredicate */); - node.assertsModifier = assertsModifier; - node.parameterName = asName(parameterName); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateTypePredicateNode(node, assertsModifier, parameterName, type) { - return node.assertsModifier !== assertsModifier || node.parameterName !== parameterName || node.type !== type ? update(createTypePredicateNode(assertsModifier, parameterName, type), node) : node; - } - function createTypeReferenceNode(typeName, typeArguments) { - const node = createBaseNode(183 /* TypeReference */); - node.typeName = asName(typeName); - node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments)); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateTypeReferenceNode(node, typeName, typeArguments) { - return node.typeName !== typeName || node.typeArguments !== typeArguments ? update(createTypeReferenceNode(typeName, typeArguments), node) : node; - } - function createFunctionTypeNode(typeParameters, parameters, type) { - const node = createBaseDeclaration(184 /* FunctionType */); - node.typeParameters = asNodeArray(typeParameters); - node.parameters = asNodeArray(parameters); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - node.modifiers = void 0; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.typeArguments = void 0; - return node; - } - function updateFunctionTypeNode(node, typeParameters, parameters, type) { - return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateFunctionTypeNode(createFunctionTypeNode(typeParameters, parameters, type), node) : node; - } - function finishUpdateFunctionTypeNode(updated, original) { - if (updated !== original) { - updated.modifiers = original.modifiers; - } - return finishUpdateBaseSignatureDeclaration(updated, original); - } - function createConstructorTypeNode(...args) { - return args.length === 4 ? createConstructorTypeNode1(...args) : args.length === 3 ? createConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); - } - function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) { - const node = createBaseDeclaration(185 /* ConstructorType */); - node.modifiers = asNodeArray(modifiers); - node.typeParameters = asNodeArray(typeParameters); - node.parameters = asNodeArray(parameters); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.typeArguments = void 0; - return node; - } - function createConstructorTypeNode2(typeParameters, parameters, type) { - return createConstructorTypeNode1( - /*modifiers*/ - void 0, - typeParameters, - parameters, - type - ); - } - function updateConstructorTypeNode(...args) { - return args.length === 5 ? updateConstructorTypeNode1(...args) : args.length === 4 ? updateConstructorTypeNode2(...args) : Debug.fail("Incorrect number of arguments specified."); - } - function updateConstructorTypeNode1(node, modifiers, typeParameters, parameters, type) { - return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? finishUpdateBaseSignatureDeclaration(createConstructorTypeNode(modifiers, typeParameters, parameters, type), node) : node; - } - function updateConstructorTypeNode2(node, typeParameters, parameters, type) { - return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type); - } - function createTypeQueryNode(exprName, typeArguments) { - const node = createBaseNode(186 /* TypeQuery */); - node.exprName = exprName; - node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateTypeQueryNode(node, exprName, typeArguments) { - return node.exprName !== exprName || node.typeArguments !== typeArguments ? update(createTypeQueryNode(exprName, typeArguments), node) : node; - } - function createTypeLiteralNode(members) { - const node = createBaseDeclaration(187 /* TypeLiteral */); - node.members = createNodeArray(members); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateTypeLiteralNode(node, members) { - return node.members !== members ? update(createTypeLiteralNode(members), node) : node; - } - function createArrayTypeNode(elementType) { - const node = createBaseNode(188 /* ArrayType */); - node.elementType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(elementType); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateArrayTypeNode(node, elementType) { - return node.elementType !== elementType ? update(createArrayTypeNode(elementType), node) : node; - } - function createTupleTypeNode(elements) { - const node = createBaseNode(189 /* TupleType */); - node.elements = createNodeArray(parenthesizerRules().parenthesizeElementTypesOfTupleType(elements)); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateTupleTypeNode(node, elements) { - return node.elements !== elements ? update(createTupleTypeNode(elements), node) : node; - } - function createNamedTupleMember(dotDotDotToken, name, questionToken, type) { - const node = createBaseDeclaration(202 /* NamedTupleMember */); - node.dotDotDotToken = dotDotDotToken; - node.name = name; - node.questionToken = questionToken; - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - node.jsDoc = void 0; - return node; - } - function updateNamedTupleMember(node, dotDotDotToken, name, questionToken, type) { - return node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.questionToken !== questionToken || node.type !== type ? update(createNamedTupleMember(dotDotDotToken, name, questionToken, type), node) : node; - } - function createOptionalTypeNode(type) { - const node = createBaseNode(190 /* OptionalType */); - node.type = parenthesizerRules().parenthesizeTypeOfOptionalType(type); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateOptionalTypeNode(node, type) { - return node.type !== type ? update(createOptionalTypeNode(type), node) : node; - } - function createRestTypeNode(type) { - const node = createBaseNode(191 /* RestType */); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateRestTypeNode(node, type) { - return node.type !== type ? update(createRestTypeNode(type), node) : node; - } - function createUnionOrIntersectionTypeNode(kind, types, parenthesize) { - const node = createBaseNode(kind); - node.types = factory2.createNodeArray(parenthesize(types)); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateUnionOrIntersectionTypeNode(node, types, parenthesize) { - return node.types !== types ? update(createUnionOrIntersectionTypeNode(node.kind, types, parenthesize), node) : node; - } - function createUnionTypeNode(types) { - return createUnionOrIntersectionTypeNode(192 /* UnionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); - } - function updateUnionTypeNode(node, types) { - return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfUnionType); - } - function createIntersectionTypeNode(types) { - return createUnionOrIntersectionTypeNode(193 /* IntersectionType */, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); - } - function updateIntersectionTypeNode(node, types) { - return updateUnionOrIntersectionTypeNode(node, types, parenthesizerRules().parenthesizeConstituentTypesOfIntersectionType); - } - function createConditionalTypeNode(checkType, extendsType, trueType, falseType) { - const node = createBaseNode(194 /* ConditionalType */); - node.checkType = parenthesizerRules().parenthesizeCheckTypeOfConditionalType(checkType); - node.extendsType = parenthesizerRules().parenthesizeExtendsTypeOfConditionalType(extendsType); - node.trueType = trueType; - node.falseType = falseType; - node.transformFlags = 1 /* ContainsTypeScript */; - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateConditionalTypeNode(node, checkType, extendsType, trueType, falseType) { - return node.checkType !== checkType || node.extendsType !== extendsType || node.trueType !== trueType || node.falseType !== falseType ? update(createConditionalTypeNode(checkType, extendsType, trueType, falseType), node) : node; - } - function createInferTypeNode(typeParameter) { - const node = createBaseNode(195 /* InferType */); - node.typeParameter = typeParameter; - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateInferTypeNode(node, typeParameter) { - return node.typeParameter !== typeParameter ? update(createInferTypeNode(typeParameter), node) : node; - } - function createTemplateLiteralType(head, templateSpans) { - const node = createBaseNode(203 /* TemplateLiteralType */); - node.head = head; - node.templateSpans = createNodeArray(templateSpans); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateTemplateLiteralType(node, head, templateSpans) { - return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; - } - function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { - const node = createBaseNode(205 /* ImportType */); - node.argument = argument; - node.assertions = assertions; - node.qualifier = qualifier; - node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); - node.isTypeOf = isTypeOf; - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateImportTypeNode(node, argument, assertions, qualifier, typeArguments, isTypeOf = node.isTypeOf) { - return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; - } - function createParenthesizedType(type) { - const node = createBaseNode(196 /* ParenthesizedType */); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateParenthesizedType(node, type) { - return node.type !== type ? update(createParenthesizedType(type), node) : node; - } - function createThisTypeNode() { - const node = createBaseNode(197 /* ThisType */); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function createTypeOperatorNode(operator, type) { - const node = createBaseNode(198 /* TypeOperator */); - node.operator = operator; - node.type = operator === 148 /* ReadonlyKeyword */ ? parenthesizerRules().parenthesizeOperandOfReadonlyTypeOperator(type) : parenthesizerRules().parenthesizeOperandOfTypeOperator(type); - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateTypeOperatorNode(node, type) { - return node.type !== type ? update(createTypeOperatorNode(node.operator, type), node) : node; - } - function createIndexedAccessTypeNode(objectType, indexType) { - const node = createBaseNode(199 /* IndexedAccessType */); - node.objectType = parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(objectType); - node.indexType = indexType; - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateIndexedAccessTypeNode(node, objectType, indexType) { - return node.objectType !== objectType || node.indexType !== indexType ? update(createIndexedAccessTypeNode(objectType, indexType), node) : node; - } - function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) { - const node = createBaseDeclaration(200 /* MappedType */); - node.readonlyToken = readonlyToken; - node.typeParameter = typeParameter; - node.nameType = nameType; - node.questionToken = questionToken; - node.type = type; - node.members = members && createNodeArray(members); - node.transformFlags = 1 /* ContainsTypeScript */; - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) { - return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node) : node; - } - function createLiteralTypeNode(literal) { - const node = createBaseNode(201 /* LiteralType */); - node.literal = literal; - node.transformFlags = 1 /* ContainsTypeScript */; - return node; - } - function updateLiteralTypeNode(node, literal) { - return node.literal !== literal ? update(createLiteralTypeNode(literal), node) : node; - } - function createObjectBindingPattern(elements) { - const node = createBaseNode(206 /* ObjectBindingPattern */); - node.elements = createNodeArray(elements); - node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; - if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { - node.transformFlags |= 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; - } - return node; - } - function updateObjectBindingPattern(node, elements) { - return node.elements !== elements ? update(createObjectBindingPattern(elements), node) : node; - } - function createArrayBindingPattern(elements) { - const node = createBaseNode(207 /* ArrayBindingPattern */); - node.elements = createNodeArray(elements); - node.transformFlags |= propagateChildrenFlags(node.elements) | 1024 /* ContainsES2015 */ | 524288 /* ContainsBindingPattern */; - return node; - } - function updateArrayBindingPattern(node, elements) { - return node.elements !== elements ? update(createArrayBindingPattern(elements), node) : node; - } - function createBindingElement(dotDotDotToken, propertyName, name, initializer) { - const node = createBaseDeclaration(208 /* BindingElement */); - node.dotDotDotToken = dotDotDotToken; - node.propertyName = asName(propertyName); - node.name = asName(name); - node.initializer = asInitializer(initializer); - node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.propertyName) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (node.dotDotDotToken ? 32768 /* ContainsRestOrSpread */ : 0 /* None */) | 1024 /* ContainsES2015 */; - node.flowNode = void 0; - return node; - } - function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) { - return node.propertyName !== propertyName || node.dotDotDotToken !== dotDotDotToken || node.name !== name || node.initializer !== initializer ? update(createBindingElement(dotDotDotToken, propertyName, name, initializer), node) : node; - } - function createArrayLiteralExpression(elements, multiLine) { - const node = createBaseNode(209 /* ArrayLiteralExpression */); - const lastElement = elements && lastOrUndefined(elements); - const elementsArray = createNodeArray(elements, lastElement && isOmittedExpression(lastElement) ? true : void 0); - node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray); - node.multiLine = multiLine; - node.transformFlags |= propagateChildrenFlags(node.elements); - return node; - } - function updateArrayLiteralExpression(node, elements) { - return node.elements !== elements ? update(createArrayLiteralExpression(elements, node.multiLine), node) : node; - } - function createObjectLiteralExpression(properties, multiLine) { - const node = createBaseDeclaration(210 /* ObjectLiteralExpression */); - node.properties = createNodeArray(properties); - node.multiLine = multiLine; - node.transformFlags |= propagateChildrenFlags(node.properties); - node.jsDoc = void 0; - return node; - } - function updateObjectLiteralExpression(node, properties) { - return node.properties !== properties ? update(createObjectLiteralExpression(properties, node.multiLine), node) : node; - } - function createBasePropertyAccessExpression(expression, questionDotToken, name) { - const node = createBaseDeclaration(211 /* PropertyAccessExpression */); - node.expression = expression; - node.questionDotToken = questionDotToken; - node.name = name; - node.transformFlags = propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | (isIdentifier(node.name) ? propagateIdentifierNameFlags(node.name) : propagateChildFlags(node.name) | 536870912 /* ContainsPrivateIdentifierInExpression */); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function createPropertyAccessExpression(expression, name) { - const node = createBasePropertyAccessExpression( - parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - false - ), - /*questionDotToken*/ - void 0, - asName(name) - ); - if (isSuperKeyword(expression)) { - node.transformFlags |= 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; - } - return node; - } - function updatePropertyAccessExpression(node, expression, name) { - if (isPropertyAccessChain(node)) { - return updatePropertyAccessChain(node, expression, node.questionDotToken, cast(name, isIdentifier)); - } - return node.expression !== expression || node.name !== name ? update(createPropertyAccessExpression(expression, name), node) : node; - } - function createPropertyAccessChain(expression, questionDotToken, name) { - const node = createBasePropertyAccessExpression( - parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - true - ), - questionDotToken, - asName(name) - ); - node.flags |= 64 /* OptionalChain */; - node.transformFlags |= 32 /* ContainsES2020 */; - return node; - } - function updatePropertyAccessChain(node, expression, questionDotToken, name) { - Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a PropertyAccessExpression using updatePropertyAccessChain. Use updatePropertyAccess instead."); - return node.expression !== expression || node.questionDotToken !== questionDotToken || node.name !== name ? update(createPropertyAccessChain(expression, questionDotToken, name), node) : node; - } - function createBaseElementAccessExpression(expression, questionDotToken, argumentExpression) { - const node = createBaseDeclaration(212 /* ElementAccessExpression */); - node.expression = expression; - node.questionDotToken = questionDotToken; - node.argumentExpression = argumentExpression; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildFlags(node.argumentExpression); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function createElementAccessExpression(expression, index) { - const node = createBaseElementAccessExpression( - parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - false - ), - /*questionDotToken*/ - void 0, - asExpression(index) - ); - if (isSuperKeyword(expression)) { - node.transformFlags |= 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */; - } - return node; - } - function updateElementAccessExpression(node, expression, argumentExpression) { - if (isElementAccessChain(node)) { - return updateElementAccessChain(node, expression, node.questionDotToken, argumentExpression); - } - return node.expression !== expression || node.argumentExpression !== argumentExpression ? update(createElementAccessExpression(expression, argumentExpression), node) : node; - } - function createElementAccessChain(expression, questionDotToken, index) { - const node = createBaseElementAccessExpression( - parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - true - ), - questionDotToken, - asExpression(index) - ); - node.flags |= 64 /* OptionalChain */; - node.transformFlags |= 32 /* ContainsES2020 */; - return node; - } - function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) { - Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a ElementAccessExpression using updateElementAccessChain. Use updateElementAccess instead."); - return node.expression !== expression || node.questionDotToken !== questionDotToken || node.argumentExpression !== argumentExpression ? update(createElementAccessChain(expression, questionDotToken, argumentExpression), node) : node; - } - function createBaseCallExpression(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseDeclaration(213 /* CallExpression */); - node.expression = expression; - node.questionDotToken = questionDotToken; - node.typeArguments = typeArguments; - node.arguments = argumentsArray; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.questionDotToken) | propagateChildrenFlags(node.typeArguments) | propagateChildrenFlags(node.arguments); - if (node.typeArguments) { - node.transformFlags |= 1 /* ContainsTypeScript */; - } - if (isSuperProperty(node.expression)) { - node.transformFlags |= 16384 /* ContainsLexicalThis */; - } - return node; - } - function createCallExpression(expression, typeArguments, argumentsArray) { - const node = createBaseCallExpression( - parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - false - ), - /*questionDotToken*/ - void 0, - asNodeArray(typeArguments), - parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)) - ); - if (isImportKeyword(node.expression)) { - node.transformFlags |= 8388608 /* ContainsDynamicImport */; - } - return node; - } - function updateCallExpression(node, expression, typeArguments, argumentsArray) { - if (isCallChain(node)) { - return updateCallChain(node, expression, node.questionDotToken, typeArguments, argumentsArray); - } - return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallExpression(expression, typeArguments, argumentsArray), node) : node; - } - function createCallChain(expression, questionDotToken, typeArguments, argumentsArray) { - const node = createBaseCallExpression( - parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - true - ), - questionDotToken, - asNodeArray(typeArguments), - parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray)) - ); - node.flags |= 64 /* OptionalChain */; - node.transformFlags |= 32 /* ContainsES2020 */; - return node; - } - function updateCallChain(node, expression, questionDotToken, typeArguments, argumentsArray) { - Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a CallExpression using updateCallChain. Use updateCall instead."); - return node.expression !== expression || node.questionDotToken !== questionDotToken || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createCallChain(expression, questionDotToken, typeArguments, argumentsArray), node) : node; - } - function createNewExpression(expression, typeArguments, argumentsArray) { - const node = createBaseDeclaration(214 /* NewExpression */); - node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression); - node.typeArguments = asNodeArray(typeArguments); - node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : void 0; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | propagateChildrenFlags(node.arguments) | 32 /* ContainsES2020 */; - if (node.typeArguments) { - node.transformFlags |= 1 /* ContainsTypeScript */; - } - return node; - } - function updateNewExpression(node, expression, typeArguments, argumentsArray) { - return node.expression !== expression || node.typeArguments !== typeArguments || node.arguments !== argumentsArray ? update(createNewExpression(expression, typeArguments, argumentsArray), node) : node; - } - function createTaggedTemplateExpression(tag, typeArguments, template) { - const node = createBaseNode(215 /* TaggedTemplateExpression */); - node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess( - tag, - /*optionalChain*/ - false - ); - node.typeArguments = asNodeArray(typeArguments); - node.template = template; - node.transformFlags |= propagateChildFlags(node.tag) | propagateChildrenFlags(node.typeArguments) | propagateChildFlags(node.template) | 1024 /* ContainsES2015 */; - if (node.typeArguments) { - node.transformFlags |= 1 /* ContainsTypeScript */; - } - if (hasInvalidEscape(node.template)) { - node.transformFlags |= 128 /* ContainsES2018 */; - } - return node; - } - function updateTaggedTemplateExpression(node, tag, typeArguments, template) { - return node.tag !== tag || node.typeArguments !== typeArguments || node.template !== template ? update(createTaggedTemplateExpression(tag, typeArguments, template), node) : node; - } - function createTypeAssertion(type, expression) { - const node = createBaseNode(216 /* TypeAssertionExpression */); - node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); - node.type = type; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; - return node; - } - function updateTypeAssertion(node, type, expression) { - return node.type !== type || node.expression !== expression ? update(createTypeAssertion(type, expression), node) : node; - } - function createParenthesizedExpression(expression) { - const node = createBaseNode(217 /* ParenthesizedExpression */); - node.expression = expression; - node.transformFlags = propagateChildFlags(node.expression); - node.jsDoc = void 0; - return node; - } - function updateParenthesizedExpression(node, expression) { - return node.expression !== expression ? update(createParenthesizedExpression(expression), node) : node; - } - function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(218 /* FunctionExpression */); - node.modifiers = asNodeArray(modifiers); - node.asteriskToken = asteriskToken; - node.name = asName(name); - node.typeParameters = asNodeArray(typeParameters); - node.parameters = createNodeArray(parameters); - node.type = type; - node.body = body; - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; - const isGenerator = !!node.asteriskToken; - const isAsyncGenerator = isAsync && isGenerator; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - node.typeArguments = void 0; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.flowNode = void 0; - node.endFlowNode = void 0; - node.returnFlowNode = void 0; - return node; - } - function updateFunctionExpression(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - return node.name !== name || node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateBaseSignatureDeclaration(createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; - } - function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - const node = createBaseDeclaration(219 /* ArrowFunction */); - node.modifiers = asNodeArray(modifiers); - node.typeParameters = asNodeArray(typeParameters); - node.parameters = createNodeArray(parameters); - node.type = type; - node.equalsGreaterThanToken = equalsGreaterThanToken ?? createToken(39 /* EqualsGreaterThanToken */); - node.body = parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body); - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */; - node.typeArguments = void 0; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.flowNode = void 0; - node.endFlowNode = void 0; - node.returnFlowNode = void 0; - return node; - } - function updateArrowFunction(node, modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) { - return node.modifiers !== modifiers || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.equalsGreaterThanToken !== equalsGreaterThanToken || node.body !== body ? finishUpdateBaseSignatureDeclaration(createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body), node) : node; - } - function createDeleteExpression(expression) { - const node = createBaseNode(220 /* DeleteExpression */); - node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); - node.transformFlags |= propagateChildFlags(node.expression); - return node; - } - function updateDeleteExpression(node, expression) { - return node.expression !== expression ? update(createDeleteExpression(expression), node) : node; - } - function createTypeOfExpression(expression) { - const node = createBaseNode(221 /* TypeOfExpression */); - node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); - node.transformFlags |= propagateChildFlags(node.expression); - return node; - } - function updateTypeOfExpression(node, expression) { - return node.expression !== expression ? update(createTypeOfExpression(expression), node) : node; - } - function createVoidExpression(expression) { - const node = createBaseNode(222 /* VoidExpression */); - node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); - node.transformFlags |= propagateChildFlags(node.expression); - return node; - } - function updateVoidExpression(node, expression) { - return node.expression !== expression ? update(createVoidExpression(expression), node) : node; - } - function createAwaitExpression(expression) { - const node = createBaseNode(223 /* AwaitExpression */); - node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression); - node.transformFlags |= propagateChildFlags(node.expression) | 256 /* ContainsES2017 */ | 128 /* ContainsES2018 */ | 2097152 /* ContainsAwait */; - return node; - } - function updateAwaitExpression(node, expression) { - return node.expression !== expression ? update(createAwaitExpression(expression), node) : node; - } - function createPrefixUnaryExpression(operator, operand) { - const node = createBaseNode(224 /* PrefixUnaryExpression */); - node.operator = operator; - node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand); - node.transformFlags |= propagateChildFlags(node.operand); - if ((operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */) && isIdentifier(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand)) { - node.transformFlags |= 268435456 /* ContainsUpdateExpressionForIdentifier */; - } - return node; - } - function updatePrefixUnaryExpression(node, operand) { - return node.operand !== operand ? update(createPrefixUnaryExpression(node.operator, operand), node) : node; - } - function createPostfixUnaryExpression(operand, operator) { - const node = createBaseNode(225 /* PostfixUnaryExpression */); - node.operator = operator; - node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand); - node.transformFlags |= propagateChildFlags(node.operand); - if (isIdentifier(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand)) { - node.transformFlags |= 268435456 /* ContainsUpdateExpressionForIdentifier */; - } - return node; - } - function updatePostfixUnaryExpression(node, operand) { - return node.operand !== operand ? update(createPostfixUnaryExpression(operand, node.operator), node) : node; - } - function createBinaryExpression(left, operator, right) { - const node = createBaseDeclaration(226 /* BinaryExpression */); - const operatorToken = asToken(operator); - const operatorKind = operatorToken.kind; - node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left); - node.operatorToken = operatorToken; - node.right = parenthesizerRules().parenthesizeRightSideOfBinary(operatorKind, node.left, right); - node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.operatorToken) | propagateChildFlags(node.right); - if (operatorKind === 61 /* QuestionQuestionToken */) { - node.transformFlags |= 32 /* ContainsES2020 */; - } else if (operatorKind === 64 /* EqualsToken */) { - if (isObjectLiteralExpression(node.left)) { - node.transformFlags |= 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 4096 /* ContainsDestructuringAssignment */ | propagateAssignmentPatternFlags(node.left); - } else if (isArrayLiteralExpression(node.left)) { - node.transformFlags |= 1024 /* ContainsES2015 */ | 4096 /* ContainsDestructuringAssignment */ | propagateAssignmentPatternFlags(node.left); - } - } else if (operatorKind === 43 /* AsteriskAsteriskToken */ || operatorKind === 68 /* AsteriskAsteriskEqualsToken */) { - node.transformFlags |= 512 /* ContainsES2016 */; - } else if (isLogicalOrCoalescingAssignmentOperator(operatorKind)) { - node.transformFlags |= 16 /* ContainsES2021 */; - } - if (operatorKind === 103 /* InKeyword */ && isPrivateIdentifier(node.left)) { - node.transformFlags |= 536870912 /* ContainsPrivateIdentifierInExpression */; - } - node.jsDoc = void 0; - return node; - } - function propagateAssignmentPatternFlags(node) { - return containsObjectRestOrSpread(node) ? 65536 /* ContainsObjectRestOrSpread */ : 0 /* None */; - } - function updateBinaryExpression(node, left, operator, right) { - return node.left !== left || node.operatorToken !== operator || node.right !== right ? update(createBinaryExpression(left, operator, right), node) : node; - } - function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) { - const node = createBaseNode(227 /* ConditionalExpression */); - node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition); - node.questionToken = questionToken ?? createToken(58 /* QuestionToken */); - node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue); - node.colonToken = colonToken ?? createToken(59 /* ColonToken */); - node.whenFalse = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenFalse); - node.transformFlags |= propagateChildFlags(node.condition) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.whenTrue) | propagateChildFlags(node.colonToken) | propagateChildFlags(node.whenFalse); - return node; - } - function updateConditionalExpression(node, condition, questionToken, whenTrue, colonToken, whenFalse) { - return node.condition !== condition || node.questionToken !== questionToken || node.whenTrue !== whenTrue || node.colonToken !== colonToken || node.whenFalse !== whenFalse ? update(createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse), node) : node; - } - function createTemplateExpression(head, templateSpans) { - const node = createBaseNode(228 /* TemplateExpression */); - node.head = head; - node.templateSpans = createNodeArray(templateSpans); - node.transformFlags |= propagateChildFlags(node.head) | propagateChildrenFlags(node.templateSpans) | 1024 /* ContainsES2015 */; - return node; - } - function updateTemplateExpression(node, head, templateSpans) { - return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateExpression(head, templateSpans), node) : node; - } - function checkTemplateLiteralLikeNode(kind, text, rawText, templateFlags = 0 /* None */) { - Debug.assert(!(templateFlags & ~7176 /* TemplateLiteralLikeFlags */), "Unsupported template flags."); - let cooked = void 0; - if (rawText !== void 0 && rawText !== text) { - cooked = getCookedText(kind, rawText); - if (typeof cooked === "object") { - return Debug.fail("Invalid raw text"); - } - } - if (text === void 0) { - if (cooked === void 0) { - return Debug.fail("Arguments 'text' and 'rawText' may not both be undefined."); - } - text = cooked; - } else if (cooked !== void 0) { - Debug.assert(text === cooked, "Expected argument 'text' to be the normalized (i.e. 'cooked') version of argument 'rawText'."); - } - return text; - } - function getTransformFlagsOfTemplateLiteralLike(templateFlags) { - let transformFlags = 1024 /* ContainsES2015 */; - if (templateFlags) { - transformFlags |= 128 /* ContainsES2018 */; - } - return transformFlags; - } - function createTemplateLiteralLikeToken(kind, text, rawText, templateFlags) { - const node = createBaseToken(kind); - node.text = text; - node.rawText = rawText; - node.templateFlags = templateFlags & 7176 /* TemplateLiteralLikeFlags */; - node.transformFlags = getTransformFlagsOfTemplateLiteralLike(node.templateFlags); - return node; - } - function createTemplateLiteralLikeDeclaration(kind, text, rawText, templateFlags) { - const node = createBaseDeclaration(kind); - node.text = text; - node.rawText = rawText; - node.templateFlags = templateFlags & 7176 /* TemplateLiteralLikeFlags */; - node.transformFlags = getTransformFlagsOfTemplateLiteralLike(node.templateFlags); - return node; - } - function createTemplateLiteralLikeNode(kind, text, rawText, templateFlags) { - if (kind === 15 /* NoSubstitutionTemplateLiteral */) { - return createTemplateLiteralLikeDeclaration(kind, text, rawText, templateFlags); - } - return createTemplateLiteralLikeToken(kind, text, rawText, templateFlags); - } - function createTemplateHead(text, rawText, templateFlags) { - text = checkTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags); - return createTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags); - } - function createTemplateMiddle(text, rawText, templateFlags) { - text = checkTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags); - return createTemplateLiteralLikeNode(17 /* TemplateMiddle */, text, rawText, templateFlags); - } - function createTemplateTail(text, rawText, templateFlags) { - text = checkTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags); - return createTemplateLiteralLikeNode(18 /* TemplateTail */, text, rawText, templateFlags); - } - function createNoSubstitutionTemplateLiteral(text, rawText, templateFlags) { - text = checkTemplateLiteralLikeNode(16 /* TemplateHead */, text, rawText, templateFlags); - return createTemplateLiteralLikeDeclaration(15 /* NoSubstitutionTemplateLiteral */, text, rawText, templateFlags); - } - function createYieldExpression(asteriskToken, expression) { - Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression."); - const node = createBaseNode(229 /* YieldExpression */); - node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); - node.asteriskToken = asteriskToken; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.asteriskToken) | 1024 /* ContainsES2015 */ | 128 /* ContainsES2018 */ | 1048576 /* ContainsYield */; - return node; - } - function updateYieldExpression(node, asteriskToken, expression) { - return node.expression !== expression || node.asteriskToken !== asteriskToken ? update(createYieldExpression(asteriskToken, expression), node) : node; - } - function createSpreadElement(expression) { - const node = createBaseNode(230 /* SpreadElement */); - node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); - node.transformFlags |= propagateChildFlags(node.expression) | 1024 /* ContainsES2015 */ | 32768 /* ContainsRestOrSpread */; - return node; - } - function updateSpreadElement(node, expression) { - return node.expression !== expression ? update(createSpreadElement(expression), node) : node; - } - function createClassExpression(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(231 /* ClassExpression */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.typeParameters = asNodeArray(typeParameters); - node.heritageClauses = asNodeArray(heritageClauses); - node.members = createNodeArray(members); - node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; - node.jsDoc = void 0; - return node; - } - function updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members) { - return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassExpression(modifiers, name, typeParameters, heritageClauses, members), node) : node; - } - function createOmittedExpression() { - return createBaseNode(232 /* OmittedExpression */); - } - function createExpressionWithTypeArguments(expression, typeArguments) { - const node = createBaseNode(233 /* ExpressionWithTypeArguments */); - node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - false - ); - node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.typeArguments) | 1024 /* ContainsES2015 */; - return node; - } - function updateExpressionWithTypeArguments(node, expression, typeArguments) { - return node.expression !== expression || node.typeArguments !== typeArguments ? update(createExpressionWithTypeArguments(expression, typeArguments), node) : node; - } - function createAsExpression(expression, type) { - const node = createBaseNode(234 /* AsExpression */); - node.expression = expression; - node.type = type; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; - return node; - } - function updateAsExpression(node, expression, type) { - return node.expression !== expression || node.type !== type ? update(createAsExpression(expression, type), node) : node; - } - function createNonNullExpression(expression) { - const node = createBaseNode(235 /* NonNullExpression */); - node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - false - ); - node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; - return node; - } - function updateNonNullExpression(node, expression) { - if (isNonNullChain(node)) { - return updateNonNullChain(node, expression); - } - return node.expression !== expression ? update(createNonNullExpression(expression), node) : node; - } - function createSatisfiesExpression(expression, type) { - const node = createBaseNode(238 /* SatisfiesExpression */); - node.expression = expression; - node.type = type; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.type) | 1 /* ContainsTypeScript */; - return node; - } - function updateSatisfiesExpression(node, expression, type) { - return node.expression !== expression || node.type !== type ? update(createSatisfiesExpression(expression, type), node) : node; - } - function createNonNullChain(expression) { - const node = createBaseNode(235 /* NonNullExpression */); - node.flags |= 64 /* OptionalChain */; - node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - true - ); - node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; - return node; - } - function updateNonNullChain(node, expression) { - Debug.assert(!!(node.flags & 64 /* OptionalChain */), "Cannot update a NonNullExpression using updateNonNullChain. Use updateNonNullExpression instead."); - return node.expression !== expression ? update(createNonNullChain(expression), node) : node; - } - function createMetaProperty(keywordToken, name) { - const node = createBaseNode(236 /* MetaProperty */); - node.keywordToken = keywordToken; - node.name = name; - node.transformFlags |= propagateChildFlags(node.name); - switch (keywordToken) { - case 105 /* NewKeyword */: - node.transformFlags |= 1024 /* ContainsES2015 */; - break; - case 102 /* ImportKeyword */: - node.transformFlags |= 32 /* ContainsES2020 */; - break; - default: - return Debug.assertNever(keywordToken); - } - node.flowNode = void 0; - return node; - } - function updateMetaProperty(node, name) { - return node.name !== name ? update(createMetaProperty(node.keywordToken, name), node) : node; - } - function createTemplateSpan(expression, literal) { - const node = createBaseNode(239 /* TemplateSpan */); - node.expression = expression; - node.literal = literal; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024 /* ContainsES2015 */; - return node; - } - function updateTemplateSpan(node, expression, literal) { - return node.expression !== expression || node.literal !== literal ? update(createTemplateSpan(expression, literal), node) : node; - } - function createSemicolonClassElement() { - const node = createBaseNode(240 /* SemicolonClassElement */); - node.transformFlags |= 1024 /* ContainsES2015 */; - return node; - } - function createBlock(statements, multiLine) { - const node = createBaseNode(241 /* Block */); - node.statements = createNodeArray(statements); - node.multiLine = multiLine; - node.transformFlags |= propagateChildrenFlags(node.statements); - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateBlock(node, statements) { - return node.statements !== statements ? update(createBlock(statements, node.multiLine), node) : node; - } - function createVariableStatement(modifiers, declarationList) { - const node = createBaseNode(243 /* VariableStatement */); - node.modifiers = asNodeArray(modifiers); - node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; - node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { - node.transformFlags = 1 /* ContainsTypeScript */; - } - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateVariableStatement(node, modifiers, declarationList) { - return node.modifiers !== modifiers || node.declarationList !== declarationList ? update(createVariableStatement(modifiers, declarationList), node) : node; - } - function createEmptyStatement() { - const node = createBaseNode(242 /* EmptyStatement */); - node.jsDoc = void 0; - return node; - } - function createExpressionStatement(expression) { - const node = createBaseNode(244 /* ExpressionStatement */); - node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression); - node.transformFlags |= propagateChildFlags(node.expression); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateExpressionStatement(node, expression) { - return node.expression !== expression ? update(createExpressionStatement(expression), node) : node; - } - function createIfStatement(expression, thenStatement, elseStatement) { - const node = createBaseNode(245 /* IfStatement */); - node.expression = expression; - node.thenStatement = asEmbeddedStatement(thenStatement); - node.elseStatement = asEmbeddedStatement(elseStatement); - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thenStatement) | propagateChildFlags(node.elseStatement); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateIfStatement(node, expression, thenStatement, elseStatement) { - return node.expression !== expression || node.thenStatement !== thenStatement || node.elseStatement !== elseStatement ? update(createIfStatement(expression, thenStatement, elseStatement), node) : node; - } - function createDoStatement(statement, expression) { - const node = createBaseNode(246 /* DoStatement */); - node.statement = asEmbeddedStatement(statement); - node.expression = expression; - node.transformFlags |= propagateChildFlags(node.statement) | propagateChildFlags(node.expression); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateDoStatement(node, statement, expression) { - return node.statement !== statement || node.expression !== expression ? update(createDoStatement(statement, expression), node) : node; - } - function createWhileStatement(expression, statement) { - const node = createBaseNode(247 /* WhileStatement */); - node.expression = expression; - node.statement = asEmbeddedStatement(statement); - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateWhileStatement(node, expression, statement) { - return node.expression !== expression || node.statement !== statement ? update(createWhileStatement(expression, statement), node) : node; - } - function createForStatement(initializer, condition, incrementor, statement) { - const node = createBaseNode(248 /* ForStatement */); - node.initializer = initializer; - node.condition = condition; - node.incrementor = incrementor; - node.statement = asEmbeddedStatement(statement); - node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.condition) | propagateChildFlags(node.incrementor) | propagateChildFlags(node.statement); - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.flowNode = void 0; - return node; - } - function updateForStatement(node, initializer, condition, incrementor, statement) { - return node.initializer !== initializer || node.condition !== condition || node.incrementor !== incrementor || node.statement !== statement ? update(createForStatement(initializer, condition, incrementor, statement), node) : node; - } - function createForInStatement(initializer, expression, statement) { - const node = createBaseNode(249 /* ForInStatement */); - node.initializer = initializer; - node.expression = expression; - node.statement = asEmbeddedStatement(statement); - node.transformFlags |= propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement); - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.flowNode = void 0; - return node; - } - function updateForInStatement(node, initializer, expression, statement) { - return node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForInStatement(initializer, expression, statement), node) : node; - } - function createForOfStatement(awaitModifier, initializer, expression, statement) { - const node = createBaseNode(250 /* ForOfStatement */); - node.awaitModifier = awaitModifier; - node.initializer = initializer; - node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); - node.statement = asEmbeddedStatement(statement); - node.transformFlags |= propagateChildFlags(node.awaitModifier) | propagateChildFlags(node.initializer) | propagateChildFlags(node.expression) | propagateChildFlags(node.statement) | 1024 /* ContainsES2015 */; - if (awaitModifier) - node.transformFlags |= 128 /* ContainsES2018 */; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.flowNode = void 0; - return node; - } - function updateForOfStatement(node, awaitModifier, initializer, expression, statement) { - return node.awaitModifier !== awaitModifier || node.initializer !== initializer || node.expression !== expression || node.statement !== statement ? update(createForOfStatement(awaitModifier, initializer, expression, statement), node) : node; - } - function createContinueStatement(label) { - const node = createBaseNode(251 /* ContinueStatement */); - node.label = asName(label); - node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateContinueStatement(node, label) { - return node.label !== label ? update(createContinueStatement(label), node) : node; - } - function createBreakStatement(label) { - const node = createBaseNode(252 /* BreakStatement */); - node.label = asName(label); - node.transformFlags |= propagateChildFlags(node.label) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateBreakStatement(node, label) { - return node.label !== label ? update(createBreakStatement(label), node) : node; - } - function createReturnStatement(expression) { - const node = createBaseNode(253 /* ReturnStatement */); - node.expression = expression; - node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateReturnStatement(node, expression) { - return node.expression !== expression ? update(createReturnStatement(expression), node) : node; - } - function createWithStatement(expression, statement) { - const node = createBaseNode(254 /* WithStatement */); - node.expression = expression; - node.statement = asEmbeddedStatement(statement); - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.statement); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateWithStatement(node, expression, statement) { - return node.expression !== expression || node.statement !== statement ? update(createWithStatement(expression, statement), node) : node; - } - function createSwitchStatement(expression, caseBlock) { - const node = createBaseNode(255 /* SwitchStatement */); - node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); - node.caseBlock = caseBlock; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.caseBlock); - node.jsDoc = void 0; - node.flowNode = void 0; - node.possiblyExhaustive = false; - return node; - } - function updateSwitchStatement(node, expression, caseBlock) { - return node.expression !== expression || node.caseBlock !== caseBlock ? update(createSwitchStatement(expression, caseBlock), node) : node; - } - function createLabeledStatement(label, statement) { - const node = createBaseNode(256 /* LabeledStatement */); - node.label = asName(label); - node.statement = asEmbeddedStatement(statement); - node.transformFlags |= propagateChildFlags(node.label) | propagateChildFlags(node.statement); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateLabeledStatement(node, label, statement) { - return node.label !== label || node.statement !== statement ? update(createLabeledStatement(label, statement), node) : node; - } - function createThrowStatement(expression) { - const node = createBaseNode(257 /* ThrowStatement */); - node.expression = expression; - node.transformFlags |= propagateChildFlags(node.expression); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateThrowStatement(node, expression) { - return node.expression !== expression ? update(createThrowStatement(expression), node) : node; - } - function createTryStatement(tryBlock, catchClause, finallyBlock) { - const node = createBaseNode(258 /* TryStatement */); - node.tryBlock = tryBlock; - node.catchClause = catchClause; - node.finallyBlock = finallyBlock; - node.transformFlags |= propagateChildFlags(node.tryBlock) | propagateChildFlags(node.catchClause) | propagateChildFlags(node.finallyBlock); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function updateTryStatement(node, tryBlock, catchClause, finallyBlock) { - return node.tryBlock !== tryBlock || node.catchClause !== catchClause || node.finallyBlock !== finallyBlock ? update(createTryStatement(tryBlock, catchClause, finallyBlock), node) : node; - } - function createDebuggerStatement() { - const node = createBaseNode(259 /* DebuggerStatement */); - node.jsDoc = void 0; - node.flowNode = void 0; - return node; - } - function createVariableDeclaration(name, exclamationToken, type, initializer) { - const node = createBaseDeclaration(260 /* VariableDeclaration */); - node.name = asName(name); - node.exclamationToken = exclamationToken; - node.type = type; - node.initializer = asInitializer(initializer); - node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (node.exclamationToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); - node.jsDoc = void 0; - return node; - } - function updateVariableDeclaration(node, name, exclamationToken, type, initializer) { - return node.name !== name || node.type !== type || node.exclamationToken !== exclamationToken || node.initializer !== initializer ? update(createVariableDeclaration(name, exclamationToken, type, initializer), node) : node; - } - function createVariableDeclarationList(declarations, flags2 = 0 /* None */) { - const node = createBaseNode(261 /* VariableDeclarationList */); - node.flags |= flags2 & 7 /* BlockScoped */; - node.declarations = createNodeArray(declarations); - node.transformFlags |= propagateChildrenFlags(node.declarations) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - if (flags2 & 7 /* BlockScoped */) { - node.transformFlags |= 1024 /* ContainsES2015 */ | 262144 /* ContainsBlockScopedBinding */; - } - if (flags2 & 4 /* Using */) { - node.transformFlags |= 4 /* ContainsESNext */; - } - return node; - } - function updateVariableDeclarationList(node, declarations) { - return node.declarations !== declarations ? update(createVariableDeclarationList(declarations, node.flags), node) : node; - } - function createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - const node = createBaseDeclaration(262 /* FunctionDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.asteriskToken = asteriskToken; - node.name = asName(name); - node.typeParameters = asNodeArray(typeParameters); - node.parameters = createNodeArray(parameters); - node.type = type; - node.body = body; - if (!node.body || modifiersToFlags(node.modifiers) & 2 /* Ambient */) { - node.transformFlags = 1 /* ContainsTypeScript */; - } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; - const isGenerator = !!node.asteriskToken; - const isAsyncGenerator = isAsync && isGenerator; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; - } - node.typeArguments = void 0; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.endFlowNode = void 0; - node.returnFlowNode = void 0; - return node; - } - function updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body) { - return node.modifiers !== modifiers || node.asteriskToken !== asteriskToken || node.name !== name || node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type || node.body !== body ? finishUpdateFunctionDeclaration(createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body), node) : node; - } - function finishUpdateFunctionDeclaration(updated, original) { - if (updated !== original) { - if (updated.modifiers === original.modifiers) { - updated.modifiers = original.modifiers; - } - } - return finishUpdateBaseSignatureDeclaration(updated, original); - } - function createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(263 /* ClassDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.typeParameters = asNodeArray(typeParameters); - node.heritageClauses = asNodeArray(heritageClauses); - node.members = createNodeArray(members); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { - node.transformFlags = 1 /* ContainsTypeScript */; - } else { - node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; - if (node.transformFlags & 8192 /* ContainsTypeScriptClassSyntax */) { - node.transformFlags |= 1 /* ContainsTypeScript */; - } - } - node.jsDoc = void 0; - return node; - } - function updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) { - return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; - } - function createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members) { - const node = createBaseDeclaration(264 /* InterfaceDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.typeParameters = asNodeArray(typeParameters); - node.heritageClauses = asNodeArray(heritageClauses); - node.members = createNodeArray(members); - node.transformFlags = 1 /* ContainsTypeScript */; - node.jsDoc = void 0; - return node; - } - function updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members) { - return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.heritageClauses !== heritageClauses || node.members !== members ? update(createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members), node) : node; - } - function createTypeAliasDeclaration(modifiers, name, typeParameters, type) { - const node = createBaseDeclaration(265 /* TypeAliasDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.typeParameters = asNodeArray(typeParameters); - node.type = type; - node.transformFlags = 1 /* ContainsTypeScript */; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type) { - return node.modifiers !== modifiers || node.name !== name || node.typeParameters !== typeParameters || node.type !== type ? update(createTypeAliasDeclaration(modifiers, name, typeParameters, type), node) : node; - } - function createEnumDeclaration(modifiers, name, members) { - const node = createBaseDeclaration(266 /* EnumDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.members = createNodeArray(members); - node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildrenFlags(node.members) | 1 /* ContainsTypeScript */; - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - node.jsDoc = void 0; - return node; - } - function updateEnumDeclaration(node, modifiers, name, members) { - return node.modifiers !== modifiers || node.name !== name || node.members !== members ? update(createEnumDeclaration(modifiers, name, members), node) : node; - } - function createModuleDeclaration(modifiers, name, body, flags2 = 0 /* None */) { - const node = createBaseDeclaration(267 /* ModuleDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); - node.name = name; - node.body = body; - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { - node.transformFlags = 1 /* ContainsTypeScript */; - } else { - node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */; - } - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateModuleDeclaration(node, modifiers, name, body) { - return node.modifiers !== modifiers || node.name !== name || node.body !== body ? update(createModuleDeclaration(modifiers, name, body, node.flags), node) : node; - } - function createModuleBlock(statements) { - const node = createBaseNode(268 /* ModuleBlock */); - node.statements = createNodeArray(statements); - node.transformFlags |= propagateChildrenFlags(node.statements); - node.jsDoc = void 0; - return node; - } - function updateModuleBlock(node, statements) { - return node.statements !== statements ? update(createModuleBlock(statements), node) : node; - } - function createCaseBlock(clauses) { - const node = createBaseNode(269 /* CaseBlock */); - node.clauses = createNodeArray(clauses); - node.transformFlags |= propagateChildrenFlags(node.clauses); - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateCaseBlock(node, clauses) { - return node.clauses !== clauses ? update(createCaseBlock(clauses), node) : node; - } - function createNamespaceExportDeclaration(name) { - const node = createBaseDeclaration(270 /* NamespaceExportDeclaration */); - node.name = asName(name); - node.transformFlags |= propagateIdentifierNameFlags(node.name) | 1 /* ContainsTypeScript */; - node.modifiers = void 0; - node.jsDoc = void 0; - return node; - } - function updateNamespaceExportDeclaration(node, name) { - return node.name !== name ? finishUpdateNamespaceExportDeclaration(createNamespaceExportDeclaration(name), node) : node; - } - function finishUpdateNamespaceExportDeclaration(updated, original) { - if (updated !== original) { - updated.modifiers = original.modifiers; - } - return update(updated, original); - } - function createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference) { - const node = createBaseDeclaration(271 /* ImportEqualsDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.name = asName(name); - node.isTypeOnly = isTypeOnly; - node.moduleReference = moduleReference; - node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.moduleReference); - if (!isExternalModuleReference(node.moduleReference)) { - node.transformFlags |= 1 /* ContainsTypeScript */; - } - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - node.jsDoc = void 0; - return node; - } - function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) { - return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; - } - function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { - const node = createBaseNode(272 /* ImportDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.importClause = importClause; - node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; - node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier); - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - node.jsDoc = void 0; - return node; - } - function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; - } - function createImportClause(isTypeOnly, name, namedBindings) { - const node = createBaseDeclaration(273 /* ImportClause */); - node.isTypeOnly = isTypeOnly; - node.name = name; - node.namedBindings = namedBindings; - node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.namedBindings); - if (isTypeOnly) { - node.transformFlags |= 1 /* ContainsTypeScript */; - } - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - return node; - } - function updateImportClause(node, isTypeOnly, name, namedBindings) { - return node.isTypeOnly !== isTypeOnly || node.name !== name || node.namedBindings !== namedBindings ? update(createImportClause(isTypeOnly, name, namedBindings), node) : node; - } - function createAssertClause(elements, multiLine) { - const node = createBaseNode(300 /* AssertClause */); - node.elements = createNodeArray(elements); - node.multiLine = multiLine; - node.transformFlags |= 4 /* ContainsESNext */; - return node; - } - function updateAssertClause(node, elements, multiLine) { - return node.elements !== elements || node.multiLine !== multiLine ? update(createAssertClause(elements, multiLine), node) : node; - } - function createAssertEntry(name, value) { - const node = createBaseNode(301 /* AssertEntry */); - node.name = name; - node.value = value; - node.transformFlags |= 4 /* ContainsESNext */; - return node; - } - function updateAssertEntry(node, name, value) { - return node.name !== name || node.value !== value ? update(createAssertEntry(name, value), node) : node; - } - function createImportTypeAssertionContainer(clause, multiLine) { - const node = createBaseNode(302 /* ImportTypeAssertionContainer */); - node.assertClause = clause; - node.multiLine = multiLine; - return node; - } - function updateImportTypeAssertionContainer(node, clause, multiLine) { - return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; - } - function createNamespaceImport(name) { - const node = createBaseDeclaration(274 /* NamespaceImport */); - node.name = name; - node.transformFlags |= propagateChildFlags(node.name); - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - return node; - } - function updateNamespaceImport(node, name) { - return node.name !== name ? update(createNamespaceImport(name), node) : node; - } - function createNamespaceExport(name) { - const node = createBaseDeclaration(280 /* NamespaceExport */); - node.name = name; - node.transformFlags |= propagateChildFlags(node.name) | 32 /* ContainsES2020 */; - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - return node; - } - function updateNamespaceExport(node, name) { - return node.name !== name ? update(createNamespaceExport(name), node) : node; - } - function createNamedImports(elements) { - const node = createBaseNode(275 /* NamedImports */); - node.elements = createNodeArray(elements); - node.transformFlags |= propagateChildrenFlags(node.elements); - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - return node; - } - function updateNamedImports(node, elements) { - return node.elements !== elements ? update(createNamedImports(elements), node) : node; - } - function createImportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseDeclaration(276 /* ImportSpecifier */); - node.isTypeOnly = isTypeOnly; - node.propertyName = propertyName; - node.name = name; - node.transformFlags |= propagateChildFlags(node.propertyName) | propagateChildFlags(node.name); - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - return node; - } - function updateImportSpecifier(node, isTypeOnly, propertyName, name) { - return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createImportSpecifier(isTypeOnly, propertyName, name), node) : node; - } - function createExportAssignment2(modifiers, isExportEquals, expression) { - const node = createBaseDeclaration(277 /* ExportAssignment */); - node.modifiers = asNodeArray(modifiers); - node.isExportEquals = isExportEquals; - node.expression = isExportEquals ? parenthesizerRules().parenthesizeRightSideOfBinary( - 64 /* EqualsToken */, - /*leftSide*/ - void 0, - expression - ) : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression); - node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.expression); - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - node.jsDoc = void 0; - return node; - } - function updateExportAssignment(node, modifiers, expression) { - return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; - } - function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - const node = createBaseDeclaration(278 /* ExportDeclaration */); - node.modifiers = asNodeArray(modifiers); - node.isTypeOnly = isTypeOnly; - node.exportClause = exportClause; - node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; - node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier); - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - node.jsDoc = void 0; - return node; - } - function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause), node) : node; - } - function finishUpdateExportDeclaration(updated, original) { - if (updated !== original) { - if (updated.modifiers === original.modifiers) { - updated.modifiers = original.modifiers; - } - } - return update(updated, original); - } - function createNamedExports(elements) { - const node = createBaseNode(279 /* NamedExports */); - node.elements = createNodeArray(elements); - node.transformFlags |= propagateChildrenFlags(node.elements); - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - return node; - } - function updateNamedExports(node, elements) { - return node.elements !== elements ? update(createNamedExports(elements), node) : node; - } - function createExportSpecifier(isTypeOnly, propertyName, name) { - const node = createBaseNode(281 /* ExportSpecifier */); - node.isTypeOnly = isTypeOnly; - node.propertyName = asName(propertyName); - node.name = asName(name); - node.transformFlags |= propagateChildFlags(node.propertyName) | propagateChildFlags(node.name); - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - node.jsDoc = void 0; - return node; - } - function updateExportSpecifier(node, isTypeOnly, propertyName, name) { - return node.isTypeOnly !== isTypeOnly || node.propertyName !== propertyName || node.name !== name ? update(createExportSpecifier(isTypeOnly, propertyName, name), node) : node; - } - function createMissingDeclaration() { - const node = createBaseDeclaration(282 /* MissingDeclaration */); - node.jsDoc = void 0; - return node; - } - function createExternalModuleReference(expression) { - const node = createBaseNode(283 /* ExternalModuleReference */); - node.expression = expression; - node.transformFlags |= propagateChildFlags(node.expression); - node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; - return node; - } - function updateExternalModuleReference(node, expression) { - return node.expression !== expression ? update(createExternalModuleReference(expression), node) : node; - } - function createJSDocPrimaryTypeWorker(kind) { - return createBaseNode(kind); - } - function createJSDocPrePostfixUnaryTypeWorker(kind, type, postfix = false) { - const node = createJSDocUnaryTypeWorker( - kind, - postfix ? type && parenthesizerRules().parenthesizeNonArrayTypeOfPostfixType(type) : type - ); - node.postfix = postfix; - return node; - } - function createJSDocUnaryTypeWorker(kind, type) { - const node = createBaseNode(kind); - node.type = type; - return node; - } - function updateJSDocPrePostfixUnaryTypeWorker(kind, node, type) { - return node.type !== type ? update(createJSDocPrePostfixUnaryTypeWorker(kind, type, node.postfix), node) : node; - } - function updateJSDocUnaryTypeWorker(kind, node, type) { - return node.type !== type ? update(createJSDocUnaryTypeWorker(kind, type), node) : node; - } - function createJSDocFunctionType(parameters, type) { - const node = createBaseDeclaration(324 /* JSDocFunctionType */); - node.parameters = asNodeArray(parameters); - node.type = type; - node.transformFlags = propagateChildrenFlags(node.parameters) | (node.type ? 1 /* ContainsTypeScript */ : 0 /* None */); - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - node.typeArguments = void 0; - return node; - } - function updateJSDocFunctionType(node, parameters, type) { - return node.parameters !== parameters || node.type !== type ? update(createJSDocFunctionType(parameters, type), node) : node; - } - function createJSDocTypeLiteral(propertyTags, isArrayType = false) { - const node = createBaseDeclaration(329 /* JSDocTypeLiteral */); - node.jsDocPropertyTags = asNodeArray(propertyTags); - node.isArrayType = isArrayType; - return node; - } - function updateJSDocTypeLiteral(node, propertyTags, isArrayType) { - return node.jsDocPropertyTags !== propertyTags || node.isArrayType !== isArrayType ? update(createJSDocTypeLiteral(propertyTags, isArrayType), node) : node; - } - function createJSDocTypeExpression(type) { - const node = createBaseNode(316 /* JSDocTypeExpression */); - node.type = type; - return node; - } - function updateJSDocTypeExpression(node, type) { - return node.type !== type ? update(createJSDocTypeExpression(type), node) : node; - } - function createJSDocSignature(typeParameters, parameters, type) { - const node = createBaseDeclaration(330 /* JSDocSignature */); - node.typeParameters = asNodeArray(typeParameters); - node.parameters = createNodeArray(parameters); - node.type = type; - node.jsDoc = void 0; - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateJSDocSignature(node, typeParameters, parameters, type) { - return node.typeParameters !== typeParameters || node.parameters !== parameters || node.type !== type ? update(createJSDocSignature(typeParameters, parameters, type), node) : node; - } - function getDefaultTagName(node) { - const defaultTagName = getDefaultTagNameForKind(node.kind); - return node.tagName.escapedText === escapeLeadingUnderscores(defaultTagName) ? node.tagName : createIdentifier(defaultTagName); - } - function createBaseJSDocTag(kind, tagName, comment) { - const node = createBaseNode(kind); - node.tagName = tagName; - node.comment = comment; - return node; - } - function createBaseJSDocTagDeclaration(kind, tagName, comment) { - const node = createBaseDeclaration(kind); - node.tagName = tagName; - node.comment = comment; - return node; - } - function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) { - const node = createBaseJSDocTag(352 /* JSDocTemplateTag */, tagName ?? createIdentifier("template"), comment); - node.constraint = constraint; - node.typeParameters = createNodeArray(typeParameters); - return node; - } - function updateJSDocTemplateTag(node, tagName = getDefaultTagName(node), constraint, typeParameters, comment) { - return node.tagName !== tagName || node.constraint !== constraint || node.typeParameters !== typeParameters || node.comment !== comment ? update(createJSDocTemplateTag(tagName, constraint, typeParameters, comment), node) : node; - } - function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(353 /* JSDocTypedefTag */, tagName ?? createIdentifier("typedef"), comment); - node.typeExpression = typeExpression; - node.fullName = fullName; - node.name = getJSDocTypeAliasName(fullName); - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateJSDocTypedefTag(node, tagName = getDefaultTagName(node), typeExpression, fullName, comment) { - return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocTypedefTag(tagName, typeExpression, fullName, comment), node) : node; - } - function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(348 /* JSDocParameterTag */, tagName ?? createIdentifier("param"), comment); - node.typeExpression = typeExpression; - node.name = name; - node.isNameFirst = !!isNameFirst; - node.isBracketed = isBracketed; - return node; - } - function updateJSDocParameterTag(node, tagName = getDefaultTagName(node), name, isBracketed, typeExpression, isNameFirst, comment) { - return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; - } - function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) { - const node = createBaseJSDocTagDeclaration(355 /* JSDocPropertyTag */, tagName ?? createIdentifier("prop"), comment); - node.typeExpression = typeExpression; - node.name = name; - node.isNameFirst = !!isNameFirst; - node.isBracketed = isBracketed; - return node; - } - function updateJSDocPropertyTag(node, tagName = getDefaultTagName(node), name, isBracketed, typeExpression, isNameFirst, comment) { - return node.tagName !== tagName || node.name !== name || node.isBracketed !== isBracketed || node.typeExpression !== typeExpression || node.isNameFirst !== isNameFirst || node.comment !== comment ? update(createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment), node) : node; - } - function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) { - const node = createBaseJSDocTagDeclaration(345 /* JSDocCallbackTag */, tagName ?? createIdentifier("callback"), comment); - node.typeExpression = typeExpression; - node.fullName = fullName; - node.name = getJSDocTypeAliasName(fullName); - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateJSDocCallbackTag(node, tagName = getDefaultTagName(node), typeExpression, fullName, comment) { - return node.tagName !== tagName || node.typeExpression !== typeExpression || node.fullName !== fullName || node.comment !== comment ? update(createJSDocCallbackTag(tagName, typeExpression, fullName, comment), node) : node; - } - function createJSDocOverloadTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTag(346 /* JSDocOverloadTag */, tagName ?? createIdentifier("overload"), comment); - node.typeExpression = typeExpression; - return node; - } - function updateJSDocOverloadTag(node, tagName = getDefaultTagName(node), typeExpression, comment) { - return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocOverloadTag(tagName, typeExpression, comment), node) : node; - } - function createJSDocAugmentsTag(tagName, className, comment) { - const node = createBaseJSDocTag(335 /* JSDocAugmentsTag */, tagName ?? createIdentifier("augments"), comment); - node.class = className; - return node; - } - function updateJSDocAugmentsTag(node, tagName = getDefaultTagName(node), className, comment) { - return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocAugmentsTag(tagName, className, comment), node) : node; - } - function createJSDocImplementsTag(tagName, className, comment) { - const node = createBaseJSDocTag(336 /* JSDocImplementsTag */, tagName ?? createIdentifier("implements"), comment); - node.class = className; - return node; - } - function createJSDocSeeTag(tagName, name, comment) { - const node = createBaseJSDocTag(354 /* JSDocSeeTag */, tagName ?? createIdentifier("see"), comment); - node.name = name; - return node; - } - function updateJSDocSeeTag(node, tagName, name, comment) { - return node.tagName !== tagName || node.name !== name || node.comment !== comment ? update(createJSDocSeeTag(tagName, name, comment), node) : node; - } - function createJSDocNameReference(name) { - const node = createBaseNode(317 /* JSDocNameReference */); - node.name = name; - return node; - } - function updateJSDocNameReference(node, name) { - return node.name !== name ? update(createJSDocNameReference(name), node) : node; - } - function createJSDocMemberName(left, right) { - const node = createBaseNode(318 /* JSDocMemberName */); - node.left = left; - node.right = right; - node.transformFlags |= propagateChildFlags(node.left) | propagateChildFlags(node.right); - return node; - } - function updateJSDocMemberName(node, left, right) { - return node.left !== left || node.right !== right ? update(createJSDocMemberName(left, right), node) : node; - } - function createJSDocLink(name, text) { - const node = createBaseNode(331 /* JSDocLink */); - node.name = name; - node.text = text; - return node; - } - function updateJSDocLink(node, name, text) { - return node.name !== name ? update(createJSDocLink(name, text), node) : node; - } - function createJSDocLinkCode(name, text) { - const node = createBaseNode(332 /* JSDocLinkCode */); - node.name = name; - node.text = text; - return node; - } - function updateJSDocLinkCode(node, name, text) { - return node.name !== name ? update(createJSDocLinkCode(name, text), node) : node; - } - function createJSDocLinkPlain(name, text) { - const node = createBaseNode(333 /* JSDocLinkPlain */); - node.name = name; - node.text = text; - return node; - } - function updateJSDocLinkPlain(node, name, text) { - return node.name !== name ? update(createJSDocLinkPlain(name, text), node) : node; - } - function updateJSDocImplementsTag(node, tagName = getDefaultTagName(node), className, comment) { - return node.tagName !== tagName || node.class !== className || node.comment !== comment ? update(createJSDocImplementsTag(tagName, className, comment), node) : node; - } - function createJSDocSimpleTagWorker(kind, tagName, comment) { - const node = createBaseJSDocTag(kind, tagName ?? createIdentifier(getDefaultTagNameForKind(kind)), comment); - return node; - } - function updateJSDocSimpleTagWorker(kind, node, tagName = getDefaultTagName(node), comment) { - return node.tagName !== tagName || node.comment !== comment ? update(createJSDocSimpleTagWorker(kind, tagName, comment), node) : node; - } - function createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment) { - const node = createBaseJSDocTag(kind, tagName ?? createIdentifier(getDefaultTagNameForKind(kind)), comment); - node.typeExpression = typeExpression; - return node; - } - function updateJSDocTypeLikeTagWorker(kind, node, tagName = getDefaultTagName(node), typeExpression, comment) { - return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocTypeLikeTagWorker(kind, tagName, typeExpression, comment), node) : node; - } - function createJSDocUnknownTag(tagName, comment) { - const node = createBaseJSDocTag(334 /* JSDocTag */, tagName, comment); - return node; - } - function updateJSDocUnknownTag(node, tagName, comment) { - return node.tagName !== tagName || node.comment !== comment ? update(createJSDocUnknownTag(tagName, comment), node) : node; - } - function createJSDocEnumTag(tagName, typeExpression, comment) { - const node = createBaseJSDocTagDeclaration(347 /* JSDocEnumTag */, tagName ?? createIdentifier(getDefaultTagNameForKind(347 /* JSDocEnumTag */)), comment); - node.typeExpression = typeExpression; - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateJSDocEnumTag(node, tagName = getDefaultTagName(node), typeExpression, comment) { - return node.tagName !== tagName || node.typeExpression !== typeExpression || node.comment !== comment ? update(createJSDocEnumTag(tagName, typeExpression, comment), node) : node; - } - function createJSDocText(text) { - const node = createBaseNode(328 /* JSDocText */); - node.text = text; - return node; - } - function updateJSDocText(node, text) { - return node.text !== text ? update(createJSDocText(text), node) : node; - } - function createJSDocComment(comment, tags) { - const node = createBaseNode(327 /* JSDoc */); - node.comment = comment; - node.tags = asNodeArray(tags); - return node; - } - function updateJSDocComment(node, comment, tags) { - return node.comment !== comment || node.tags !== tags ? update(createJSDocComment(comment, tags), node) : node; - } - function createJsxElement(openingElement, children, closingElement) { - const node = createBaseNode(284 /* JsxElement */); - node.openingElement = openingElement; - node.children = createNodeArray(children); - node.closingElement = closingElement; - node.transformFlags |= propagateChildFlags(node.openingElement) | propagateChildrenFlags(node.children) | propagateChildFlags(node.closingElement) | 2 /* ContainsJsx */; - return node; - } - function updateJsxElement(node, openingElement, children, closingElement) { - return node.openingElement !== openingElement || node.children !== children || node.closingElement !== closingElement ? update(createJsxElement(openingElement, children, closingElement), node) : node; - } - function createJsxSelfClosingElement(tagName, typeArguments, attributes) { - const node = createBaseNode(285 /* JsxSelfClosingElement */); - node.tagName = tagName; - node.typeArguments = asNodeArray(typeArguments); - node.attributes = attributes; - node.transformFlags |= propagateChildFlags(node.tagName) | propagateChildrenFlags(node.typeArguments) | propagateChildFlags(node.attributes) | 2 /* ContainsJsx */; - if (node.typeArguments) { - node.transformFlags |= 1 /* ContainsTypeScript */; - } - return node; - } - function updateJsxSelfClosingElement(node, tagName, typeArguments, attributes) { - return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxSelfClosingElement(tagName, typeArguments, attributes), node) : node; - } - function createJsxOpeningElement(tagName, typeArguments, attributes) { - const node = createBaseNode(286 /* JsxOpeningElement */); - node.tagName = tagName; - node.typeArguments = asNodeArray(typeArguments); - node.attributes = attributes; - node.transformFlags |= propagateChildFlags(node.tagName) | propagateChildrenFlags(node.typeArguments) | propagateChildFlags(node.attributes) | 2 /* ContainsJsx */; - if (typeArguments) { - node.transformFlags |= 1 /* ContainsTypeScript */; - } - return node; - } - function updateJsxOpeningElement(node, tagName, typeArguments, attributes) { - return node.tagName !== tagName || node.typeArguments !== typeArguments || node.attributes !== attributes ? update(createJsxOpeningElement(tagName, typeArguments, attributes), node) : node; - } - function createJsxClosingElement(tagName) { - const node = createBaseNode(287 /* JsxClosingElement */); - node.tagName = tagName; - node.transformFlags |= propagateChildFlags(node.tagName) | 2 /* ContainsJsx */; - return node; - } - function updateJsxClosingElement(node, tagName) { - return node.tagName !== tagName ? update(createJsxClosingElement(tagName), node) : node; - } - function createJsxFragment(openingFragment, children, closingFragment) { - const node = createBaseNode(288 /* JsxFragment */); - node.openingFragment = openingFragment; - node.children = createNodeArray(children); - node.closingFragment = closingFragment; - node.transformFlags |= propagateChildFlags(node.openingFragment) | propagateChildrenFlags(node.children) | propagateChildFlags(node.closingFragment) | 2 /* ContainsJsx */; - return node; - } - function updateJsxFragment(node, openingFragment, children, closingFragment) { - return node.openingFragment !== openingFragment || node.children !== children || node.closingFragment !== closingFragment ? update(createJsxFragment(openingFragment, children, closingFragment), node) : node; - } - function createJsxText(text, containsOnlyTriviaWhiteSpaces) { - const node = createBaseNode(12 /* JsxText */); - node.text = text; - node.containsOnlyTriviaWhiteSpaces = !!containsOnlyTriviaWhiteSpaces; - node.transformFlags |= 2 /* ContainsJsx */; - return node; - } - function updateJsxText(node, text, containsOnlyTriviaWhiteSpaces) { - return node.text !== text || node.containsOnlyTriviaWhiteSpaces !== containsOnlyTriviaWhiteSpaces ? update(createJsxText(text, containsOnlyTriviaWhiteSpaces), node) : node; - } - function createJsxOpeningFragment() { - const node = createBaseNode(289 /* JsxOpeningFragment */); - node.transformFlags |= 2 /* ContainsJsx */; - return node; - } - function createJsxJsxClosingFragment() { - const node = createBaseNode(290 /* JsxClosingFragment */); - node.transformFlags |= 2 /* ContainsJsx */; - return node; - } - function createJsxAttribute(name, initializer) { - const node = createBaseDeclaration(291 /* JsxAttribute */); - node.name = name; - node.initializer = initializer; - node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 2 /* ContainsJsx */; - return node; - } - function updateJsxAttribute(node, name, initializer) { - return node.name !== name || node.initializer !== initializer ? update(createJsxAttribute(name, initializer), node) : node; - } - function createJsxAttributes(properties) { - const node = createBaseDeclaration(292 /* JsxAttributes */); - node.properties = createNodeArray(properties); - node.transformFlags |= propagateChildrenFlags(node.properties) | 2 /* ContainsJsx */; - return node; - } - function updateJsxAttributes(node, properties) { - return node.properties !== properties ? update(createJsxAttributes(properties), node) : node; - } - function createJsxSpreadAttribute(expression) { - const node = createBaseNode(293 /* JsxSpreadAttribute */); - node.expression = expression; - node.transformFlags |= propagateChildFlags(node.expression) | 2 /* ContainsJsx */; - return node; - } - function updateJsxSpreadAttribute(node, expression) { - return node.expression !== expression ? update(createJsxSpreadAttribute(expression), node) : node; - } - function createJsxExpression(dotDotDotToken, expression) { - const node = createBaseNode(294 /* JsxExpression */); - node.dotDotDotToken = dotDotDotToken; - node.expression = expression; - node.transformFlags |= propagateChildFlags(node.dotDotDotToken) | propagateChildFlags(node.expression) | 2 /* ContainsJsx */; - return node; - } - function updateJsxExpression(node, expression) { - return node.expression !== expression ? update(createJsxExpression(node.dotDotDotToken, expression), node) : node; - } - function createJsxNamespacedName(namespace, name) { - const node = createBaseNode(295 /* JsxNamespacedName */); - node.namespace = namespace; - node.name = name; - node.transformFlags |= propagateChildFlags(node.namespace) | propagateChildFlags(node.name) | 2 /* ContainsJsx */; - return node; - } - function updateJsxNamespacedName(node, namespace, name) { - return node.namespace !== namespace || node.name !== name ? update(createJsxNamespacedName(namespace, name), node) : node; - } - function createCaseClause(expression, statements) { - const node = createBaseNode(296 /* CaseClause */); - node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); - node.statements = createNodeArray(statements); - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildrenFlags(node.statements); - node.jsDoc = void 0; - return node; - } - function updateCaseClause(node, expression, statements) { - return node.expression !== expression || node.statements !== statements ? update(createCaseClause(expression, statements), node) : node; - } - function createDefaultClause(statements) { - const node = createBaseNode(297 /* DefaultClause */); - node.statements = createNodeArray(statements); - node.transformFlags = propagateChildrenFlags(node.statements); - return node; - } - function updateDefaultClause(node, statements) { - return node.statements !== statements ? update(createDefaultClause(statements), node) : node; - } - function createHeritageClause(token, types) { - const node = createBaseNode(298 /* HeritageClause */); - node.token = token; - node.types = createNodeArray(types); - node.transformFlags |= propagateChildrenFlags(node.types); - switch (token) { - case 96 /* ExtendsKeyword */: - node.transformFlags |= 1024 /* ContainsES2015 */; - break; - case 119 /* ImplementsKeyword */: - node.transformFlags |= 1 /* ContainsTypeScript */; - break; - default: - return Debug.assertNever(token); - } - return node; - } - function updateHeritageClause(node, types) { - return node.types !== types ? update(createHeritageClause(node.token, types), node) : node; - } - function createCatchClause(variableDeclaration, block) { - const node = createBaseNode(299 /* CatchClause */); - node.variableDeclaration = asVariableDeclaration(variableDeclaration); - node.block = block; - node.transformFlags |= propagateChildFlags(node.variableDeclaration) | propagateChildFlags(node.block) | (!variableDeclaration ? 64 /* ContainsES2019 */ : 0 /* None */); - node.locals = void 0; - node.nextContainer = void 0; - return node; - } - function updateCatchClause(node, variableDeclaration, block) { - return node.variableDeclaration !== variableDeclaration || node.block !== block ? update(createCatchClause(variableDeclaration, block), node) : node; - } - function createPropertyAssignment(name, initializer) { - const node = createBaseDeclaration(303 /* PropertyAssignment */); - node.name = asName(name); - node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); - node.transformFlags |= propagateNameFlags(node.name) | propagateChildFlags(node.initializer); - node.modifiers = void 0; - node.questionToken = void 0; - node.exclamationToken = void 0; - node.jsDoc = void 0; - return node; - } - function updatePropertyAssignment(node, name, initializer) { - return node.name !== name || node.initializer !== initializer ? finishUpdatePropertyAssignment(createPropertyAssignment(name, initializer), node) : node; - } - function finishUpdatePropertyAssignment(updated, original) { - if (updated !== original) { - updated.modifiers = original.modifiers; - updated.questionToken = original.questionToken; - updated.exclamationToken = original.exclamationToken; - } - return update(updated, original); - } - function createShorthandPropertyAssignment(name, objectAssignmentInitializer) { - const node = createBaseDeclaration(304 /* ShorthandPropertyAssignment */); - node.name = asName(name); - node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer); - node.transformFlags |= propagateIdentifierNameFlags(node.name) | propagateChildFlags(node.objectAssignmentInitializer) | 1024 /* ContainsES2015 */; - node.equalsToken = void 0; - node.modifiers = void 0; - node.questionToken = void 0; - node.exclamationToken = void 0; - node.jsDoc = void 0; - return node; - } - function updateShorthandPropertyAssignment(node, name, objectAssignmentInitializer) { - return node.name !== name || node.objectAssignmentInitializer !== objectAssignmentInitializer ? finishUpdateShorthandPropertyAssignment(createShorthandPropertyAssignment(name, objectAssignmentInitializer), node) : node; - } - function finishUpdateShorthandPropertyAssignment(updated, original) { - if (updated !== original) { - updated.modifiers = original.modifiers; - updated.questionToken = original.questionToken; - updated.exclamationToken = original.exclamationToken; - updated.equalsToken = original.equalsToken; - } - return update(updated, original); - } - function createSpreadAssignment(expression) { - const node = createBaseDeclaration(305 /* SpreadAssignment */); - node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression); - node.transformFlags |= propagateChildFlags(node.expression) | 128 /* ContainsES2018 */ | 65536 /* ContainsObjectRestOrSpread */; - node.jsDoc = void 0; - return node; - } - function updateSpreadAssignment(node, expression) { - return node.expression !== expression ? update(createSpreadAssignment(expression), node) : node; - } - function createEnumMember(name, initializer) { - const node = createBaseDeclaration(306 /* EnumMember */); - node.name = asName(name); - node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer); - node.transformFlags |= propagateChildFlags(node.name) | propagateChildFlags(node.initializer) | 1 /* ContainsTypeScript */; - node.jsDoc = void 0; - return node; - } - function updateEnumMember(node, name, initializer) { - return node.name !== name || node.initializer !== initializer ? update(createEnumMember(name, initializer), node) : node; - } - function createSourceFile2(statements, endOfFileToken, flags2) { - const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); - node.statements = createNodeArray(statements); - node.endOfFileToken = endOfFileToken; - node.flags |= flags2; - node.text = ""; - node.fileName = ""; - node.path = ""; - node.resolvedPath = ""; - node.originalFileName = ""; - node.languageVersion = 0; - node.languageVariant = 0; - node.scriptKind = 0; - node.isDeclarationFile = false; - node.hasNoDefaultLib = false; - node.transformFlags |= propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken); - node.locals = void 0; - node.nextContainer = void 0; - node.endFlowNode = void 0; - node.nodeCount = 0; - node.identifierCount = 0; - node.symbolCount = 0; - node.parseDiagnostics = void 0; - node.bindDiagnostics = void 0; - node.bindSuggestionDiagnostics = void 0; - node.lineMap = void 0; - node.externalModuleIndicator = void 0; - node.setExternalModuleIndicator = void 0; - node.pragmas = void 0; - node.checkJsDirective = void 0; - node.referencedFiles = void 0; - node.typeReferenceDirectives = void 0; - node.libReferenceDirectives = void 0; - node.amdDependencies = void 0; - node.commentDirectives = void 0; - node.identifiers = void 0; - node.packageJsonLocations = void 0; - node.packageJsonScope = void 0; - node.imports = void 0; - node.moduleAugmentations = void 0; - node.ambientModuleNames = void 0; - node.resolvedModules = void 0; - node.classifiableNames = void 0; - node.impliedNodeFormat = void 0; - return node; - } - function createRedirectedSourceFile(redirectInfo) { - const node = Object.create(redirectInfo.redirectTarget); - Object.defineProperties(node, { - id: { - get() { - return this.redirectInfo.redirectTarget.id; - }, - set(value) { - this.redirectInfo.redirectTarget.id = value; - } - }, - symbol: { - get() { - return this.redirectInfo.redirectTarget.symbol; - }, - set(value) { - this.redirectInfo.redirectTarget.symbol = value; - } - } - }); - node.redirectInfo = redirectInfo; - return node; - } - function cloneRedirectedSourceFile(source) { - const node = createRedirectedSourceFile(source.redirectInfo); - node.flags |= source.flags & ~16 /* Synthesized */; - node.fileName = source.fileName; - node.path = source.path; - node.resolvedPath = source.resolvedPath; - node.originalFileName = source.originalFileName; - node.packageJsonLocations = source.packageJsonLocations; - node.packageJsonScope = source.packageJsonScope; - node.emitNode = void 0; - return node; - } - function cloneSourceFileWorker(source) { - const node = baseFactory2.createBaseSourceFileNode(312 /* SourceFile */); - node.flags |= source.flags & ~16 /* Synthesized */; - for (const p in source) { - if (hasProperty(node, p) || !hasProperty(source, p)) { - continue; - } - if (p === "emitNode") { - node.emitNode = void 0; - continue; - } - node[p] = source[p]; - } - return node; - } - function cloneSourceFile(source) { - const node = source.redirectInfo ? cloneRedirectedSourceFile(source) : cloneSourceFileWorker(source); - setOriginalNode(node, source); - return node; - } - function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) { - const node = cloneSourceFile(source); - node.statements = createNodeArray(statements); - node.isDeclarationFile = isDeclarationFile; - node.referencedFiles = referencedFiles; - node.typeReferenceDirectives = typeReferences; - node.hasNoDefaultLib = hasNoDefaultLib; - node.libReferenceDirectives = libReferences; - node.transformFlags = propagateChildrenFlags(node.statements) | propagateChildFlags(node.endOfFileToken); - return node; - } - function updateSourceFile2(node, statements, isDeclarationFile = node.isDeclarationFile, referencedFiles = node.referencedFiles, typeReferenceDirectives = node.typeReferenceDirectives, hasNoDefaultLib = node.hasNoDefaultLib, libReferenceDirectives = node.libReferenceDirectives) { - return node.statements !== statements || node.isDeclarationFile !== isDeclarationFile || node.referencedFiles !== referencedFiles || node.typeReferenceDirectives !== typeReferenceDirectives || node.hasNoDefaultLib !== hasNoDefaultLib || node.libReferenceDirectives !== libReferenceDirectives ? update(cloneSourceFileWithChanges(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives), node) : node; - } - function createBundle(sourceFiles, prepends = emptyArray) { - const node = createBaseNode(313 /* Bundle */); - node.prepends = prepends; - node.sourceFiles = sourceFiles; - node.syntheticFileReferences = void 0; - node.syntheticTypeReferences = void 0; - node.syntheticLibReferences = void 0; - node.hasNoDefaultLib = void 0; - return node; - } - function updateBundle(node, sourceFiles, prepends = emptyArray) { - return node.sourceFiles !== sourceFiles || node.prepends !== prepends ? update(createBundle(sourceFiles, prepends), node) : node; - } - function createUnparsedSource(prologues, syntheticReferences, texts) { - const node = createBaseNode(314 /* UnparsedSource */); - node.prologues = prologues; - node.syntheticReferences = syntheticReferences; - node.texts = texts; - node.fileName = ""; - node.text = ""; - node.referencedFiles = emptyArray; - node.libReferenceDirectives = emptyArray; - node.getLineAndCharacterOfPosition = (pos) => getLineAndCharacterOfPosition(node, pos); - return node; - } - function createBaseUnparsedNode(kind, data) { - const node = createBaseNode(kind); - node.data = data; - return node; - } - function createUnparsedPrologue(data) { - return createBaseUnparsedNode(307 /* UnparsedPrologue */, data); - } - function createUnparsedPrepend(data, texts) { - const node = createBaseUnparsedNode(308 /* UnparsedPrepend */, data); - node.texts = texts; - return node; - } - function createUnparsedTextLike(data, internal) { - return createBaseUnparsedNode(internal ? 310 /* UnparsedInternalText */ : 309 /* UnparsedText */, data); - } - function createUnparsedSyntheticReference(section) { - const node = createBaseNode(311 /* UnparsedSyntheticReference */); - node.data = section.data; - node.section = section; - return node; - } - function createInputFiles2() { - const node = createBaseNode(315 /* InputFiles */); - node.javascriptText = ""; - node.declarationText = ""; - return node; - } - function createSyntheticExpression(type, isSpread = false, tupleNameSource) { - const node = createBaseNode(237 /* SyntheticExpression */); - node.type = type; - node.isSpread = isSpread; - node.tupleNameSource = tupleNameSource; - return node; - } - function createSyntaxList3(children) { - const node = createBaseNode(358 /* SyntaxList */); - node._children = children; - return node; - } - function createNotEmittedStatement(original) { - const node = createBaseNode(359 /* NotEmittedStatement */); - node.original = original; - setTextRange(node, original); - return node; - } - function createPartiallyEmittedExpression(expression, original) { - const node = createBaseNode(360 /* PartiallyEmittedExpression */); - node.expression = expression; - node.original = original; - node.transformFlags |= propagateChildFlags(node.expression) | 1 /* ContainsTypeScript */; - setTextRange(node, original); - return node; - } - function updatePartiallyEmittedExpression(node, expression) { - return node.expression !== expression ? update(createPartiallyEmittedExpression(expression, node.original), node) : node; - } - function flattenCommaElements(node) { - if (nodeIsSynthesized(node) && !isParseTreeNode(node) && !node.original && !node.emitNode && !node.id) { - if (isCommaListExpression(node)) { - return node.elements; - } - if (isBinaryExpression(node) && isCommaToken(node.operatorToken)) { - return [node.left, node.right]; - } - } - return node; - } - function createCommaListExpression(elements) { - const node = createBaseNode(361 /* CommaListExpression */); - node.elements = createNodeArray(sameFlatMap(elements, flattenCommaElements)); - node.transformFlags |= propagateChildrenFlags(node.elements); - return node; - } - function updateCommaListExpression(node, elements) { - return node.elements !== elements ? update(createCommaListExpression(elements), node) : node; - } - function createSyntheticReferenceExpression(expression, thisArg) { - const node = createBaseNode(362 /* SyntheticReferenceExpression */); - node.expression = expression; - node.thisArg = thisArg; - node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.thisArg); - return node; - } - function updateSyntheticReferenceExpression(node, expression, thisArg) { - return node.expression !== expression || node.thisArg !== thisArg ? update(createSyntheticReferenceExpression(expression, thisArg), node) : node; - } - function cloneGeneratedIdentifier(node) { - const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~16 /* Synthesized */; - clone2.transformFlags = node.transformFlags; - setOriginalNode(clone2, node); - setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); - return clone2; - } - function cloneIdentifier(node) { - const clone2 = createBaseIdentifier(node.escapedText); - clone2.flags |= node.flags & ~16 /* Synthesized */; - clone2.jsDoc = node.jsDoc; - clone2.flowNode = node.flowNode; - clone2.symbol = node.symbol; - clone2.transformFlags = node.transformFlags; - setOriginalNode(clone2, node); - const typeArguments = getIdentifierTypeArguments(node); - if (typeArguments) - setIdentifierTypeArguments(clone2, typeArguments); - return clone2; - } - function cloneGeneratedPrivateIdentifier(node) { - const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~16 /* Synthesized */; - clone2.transformFlags = node.transformFlags; - setOriginalNode(clone2, node); - setIdentifierAutoGenerate(clone2, { ...node.emitNode.autoGenerate }); - return clone2; - } - function clonePrivateIdentifier(node) { - const clone2 = createBasePrivateIdentifier(node.escapedText); - clone2.flags |= node.flags & ~16 /* Synthesized */; - clone2.transformFlags = node.transformFlags; - setOriginalNode(clone2, node); - return clone2; - } - function cloneNode(node) { - if (node === void 0) { - return node; - } - if (isSourceFile(node)) { - return cloneSourceFile(node); - } - if (isGeneratedIdentifier(node)) { - return cloneGeneratedIdentifier(node); - } - if (isIdentifier(node)) { - return cloneIdentifier(node); - } - if (isGeneratedPrivateIdentifier(node)) { - return cloneGeneratedPrivateIdentifier(node); - } - if (isPrivateIdentifier(node)) { - return clonePrivateIdentifier(node); - } - const clone2 = !isNodeKind(node.kind) ? baseFactory2.createBaseTokenNode(node.kind) : baseFactory2.createBaseNode(node.kind); - clone2.flags |= node.flags & ~16 /* Synthesized */; - clone2.transformFlags = node.transformFlags; - setOriginalNode(clone2, node); - for (const key in node) { - if (hasProperty(clone2, key) || !hasProperty(node, key)) { - continue; - } - clone2[key] = node[key]; - } - return clone2; - } - function createImmediatelyInvokedFunctionExpression(statements, param, paramValue) { - return createCallExpression( - createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - param ? [param] : [], - /*type*/ - void 0, - createBlock( - statements, - /*multiLine*/ - true - ) - ), - /*typeArguments*/ - void 0, - /*argumentsArray*/ - paramValue ? [paramValue] : [] - ); - } - function createImmediatelyInvokedArrowFunction(statements, param, paramValue) { - return createCallExpression( - createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - param ? [param] : [], - /*type*/ - void 0, - /*equalsGreaterThanToken*/ - void 0, - createBlock( - statements, - /*multiLine*/ - true - ) - ), - /*typeArguments*/ - void 0, - /*argumentsArray*/ - paramValue ? [paramValue] : [] - ); - } - function createVoidZero() { - return createVoidExpression(createNumericLiteral("0")); - } - function createExportDefault(expression) { - return createExportAssignment2( - /*modifiers*/ - void 0, - /*isExportEquals*/ - false, - expression - ); - } - function createExternalModuleExport(exportName) { - return createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - createNamedExports([ - createExportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ - void 0, - exportName - ) - ]) - ); - } - function createTypeCheck(value, tag) { - return tag === "null" ? factory2.createStrictEquality(value, createNull()) : tag === "undefined" ? factory2.createStrictEquality(value, createVoidZero()) : factory2.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag)); - } - function createIsNotTypeCheck(value, tag) { - return tag === "null" ? factory2.createStrictInequality(value, createNull()) : tag === "undefined" ? factory2.createStrictInequality(value, createVoidZero()) : factory2.createStrictInequality(createTypeOfExpression(value), createStringLiteral(tag)); - } - function createMethodCall(object, methodName, argumentsList) { - if (isCallChain(object)) { - return createCallChain( - createPropertyAccessChain( - object, - /*questionDotToken*/ - void 0, - methodName - ), - /*questionDotToken*/ - void 0, - /*typeArguments*/ - void 0, - argumentsList - ); - } - return createCallExpression( - createPropertyAccessExpression(object, methodName), - /*typeArguments*/ - void 0, - argumentsList - ); - } - function createFunctionBindCall(target, thisArg, argumentsList) { - return createMethodCall(target, "bind", [thisArg, ...argumentsList]); - } - function createFunctionCallCall(target, thisArg, argumentsList) { - return createMethodCall(target, "call", [thisArg, ...argumentsList]); - } - function createFunctionApplyCall(target, thisArg, argumentsExpression) { - return createMethodCall(target, "apply", [thisArg, argumentsExpression]); - } - function createGlobalMethodCall(globalObjectName, methodName, argumentsList) { - return createMethodCall(createIdentifier(globalObjectName), methodName, argumentsList); - } - function createArraySliceCall(array, start) { - return createMethodCall(array, "slice", start === void 0 ? [] : [asExpression(start)]); - } - function createArrayConcatCall(array, argumentsList) { - return createMethodCall(array, "concat", argumentsList); - } - function createObjectDefinePropertyCall(target, propertyName, attributes) { - return createGlobalMethodCall("Object", "defineProperty", [target, asExpression(propertyName), attributes]); - } - function createObjectGetOwnPropertyDescriptorCall(target, propertyName) { - return createGlobalMethodCall("Object", "getOwnPropertyDescriptor", [target, asExpression(propertyName)]); - } - function createReflectGetCall(target, propertyKey, receiver) { - return createGlobalMethodCall("Reflect", "get", receiver ? [target, propertyKey, receiver] : [target, propertyKey]); - } - function createReflectSetCall(target, propertyKey, value, receiver) { - return createGlobalMethodCall("Reflect", "set", receiver ? [target, propertyKey, value, receiver] : [target, propertyKey, value]); - } - function tryAddPropertyAssignment(properties, propertyName, expression) { - if (expression) { - properties.push(createPropertyAssignment(propertyName, expression)); - return true; - } - return false; - } - function createPropertyDescriptor(attributes, singleLine) { - const properties = []; - tryAddPropertyAssignment(properties, "enumerable", asExpression(attributes.enumerable)); - tryAddPropertyAssignment(properties, "configurable", asExpression(attributes.configurable)); - let isData = tryAddPropertyAssignment(properties, "writable", asExpression(attributes.writable)); - isData = tryAddPropertyAssignment(properties, "value", attributes.value) || isData; - let isAccessor2 = tryAddPropertyAssignment(properties, "get", attributes.get); - isAccessor2 = tryAddPropertyAssignment(properties, "set", attributes.set) || isAccessor2; - Debug.assert(!(isData && isAccessor2), "A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."); - return createObjectLiteralExpression(properties, !singleLine); - } - function updateOuterExpression(outerExpression, expression) { - switch (outerExpression.kind) { - case 217 /* ParenthesizedExpression */: - return updateParenthesizedExpression(outerExpression, expression); - case 216 /* TypeAssertionExpression */: - return updateTypeAssertion(outerExpression, outerExpression.type, expression); - case 234 /* AsExpression */: - return updateAsExpression(outerExpression, expression, outerExpression.type); - case 238 /* SatisfiesExpression */: - return updateSatisfiesExpression(outerExpression, expression, outerExpression.type); - case 235 /* NonNullExpression */: - return updateNonNullExpression(outerExpression, expression); - case 360 /* PartiallyEmittedExpression */: - return updatePartiallyEmittedExpression(outerExpression, expression); - } - } - function isIgnorableParen(node) { - return isParenthesizedExpression(node) && nodeIsSynthesized(node) && nodeIsSynthesized(getSourceMapRange(node)) && nodeIsSynthesized(getCommentRange(node)) && !some(getSyntheticLeadingComments(node)) && !some(getSyntheticTrailingComments(node)); - } - function restoreOuterExpressions(outerExpression, innerExpression, kinds = 15 /* All */) { - if (outerExpression && isOuterExpression(outerExpression, kinds) && !isIgnorableParen(outerExpression)) { - return updateOuterExpression( - outerExpression, - restoreOuterExpressions(outerExpression.expression, innerExpression) - ); - } - return innerExpression; - } - function restoreEnclosingLabel(node, outermostLabeledStatement, afterRestoreLabelCallback) { - if (!outermostLabeledStatement) { - return node; - } - const updated = updateLabeledStatement( - outermostLabeledStatement, - outermostLabeledStatement.label, - isLabeledStatement(outermostLabeledStatement.statement) ? restoreEnclosingLabel(node, outermostLabeledStatement.statement) : node - ); - if (afterRestoreLabelCallback) { - afterRestoreLabelCallback(outermostLabeledStatement); - } - return updated; - } - function shouldBeCapturedInTempVariable(node, cacheIdentifiers) { - const target = skipParentheses(node); - switch (target.kind) { - case 80 /* Identifier */: - return cacheIdentifiers; - case 110 /* ThisKeyword */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 11 /* StringLiteral */: - return false; - case 209 /* ArrayLiteralExpression */: - const elements = target.elements; - if (elements.length === 0) { - return false; - } - return true; - case 210 /* ObjectLiteralExpression */: - return target.properties.length > 0; - default: - return true; - } - } - function createCallBinding(expression, recordTempVariable, languageVersion, cacheIdentifiers = false) { - const callee = skipOuterExpressions(expression, 15 /* All */); - let thisArg; - let target; - if (isSuperProperty(callee)) { - thisArg = createThis(); - target = callee; - } else if (isSuperKeyword(callee)) { - thisArg = createThis(); - target = languageVersion !== void 0 && languageVersion < 2 /* ES2015 */ ? setTextRange(createIdentifier("_super"), callee) : callee; - } else if (getEmitFlags(callee) & 8192 /* HelperName */) { - thisArg = createVoidZero(); - target = parenthesizerRules().parenthesizeLeftSideOfAccess( - callee, - /*optionalChain*/ - false - ); - } else if (isPropertyAccessExpression(callee)) { - if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { - thisArg = createTempVariable(recordTempVariable); - target = createPropertyAccessExpression( - setTextRange( - factory2.createAssignment( - thisArg, - callee.expression - ), - callee.expression - ), - callee.name - ); - setTextRange(target, callee); - } else { - thisArg = callee.expression; - target = callee; - } - } else if (isElementAccessExpression(callee)) { - if (shouldBeCapturedInTempVariable(callee.expression, cacheIdentifiers)) { - thisArg = createTempVariable(recordTempVariable); - target = createElementAccessExpression( - setTextRange( - factory2.createAssignment( - thisArg, - callee.expression - ), - callee.expression - ), - callee.argumentExpression - ); - setTextRange(target, callee); - } else { - thisArg = callee.expression; - target = callee; - } - } else { - thisArg = createVoidZero(); - target = parenthesizerRules().parenthesizeLeftSideOfAccess( - expression, - /*optionalChain*/ - false - ); - } - return { target, thisArg }; - } - function createAssignmentTargetWrapper(paramName, expression) { - return createPropertyAccessExpression( - // Explicit parens required because of v8 regression (https://bugs.chromium.org/p/v8/issues/detail?id=9560) - createParenthesizedExpression( - createObjectLiteralExpression([ - createSetAccessorDeclaration( - /*modifiers*/ - void 0, - "value", - [createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - paramName, - /*questionToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - )], - createBlock([ - createExpressionStatement(expression) - ]) - ) - ]) - ), - "value" - ); - } - function inlineExpressions(expressions) { - return expressions.length > 10 ? createCommaListExpression(expressions) : reduceLeft(expressions, factory2.createComma); - } - function getName(node, allowComments, allowSourceMaps, emitFlags = 0, ignoreAssignedName) { - const nodeName = ignoreAssignedName ? node && getNonAssignedNameOfDeclaration(node) : getNameOfDeclaration(node); - if (nodeName && isIdentifier(nodeName) && !isGeneratedIdentifier(nodeName)) { - const name = setParent(setTextRange(cloneNode(nodeName), nodeName), nodeName.parent); - emitFlags |= getEmitFlags(nodeName); - if (!allowSourceMaps) - emitFlags |= 96 /* NoSourceMap */; - if (!allowComments) - emitFlags |= 3072 /* NoComments */; - if (emitFlags) - setEmitFlags(name, emitFlags); - return name; - } - return getGeneratedNameForNode(node); - } - function getInternalName(node, allowComments, allowSourceMaps) { - return getName(node, allowComments, allowSourceMaps, 32768 /* LocalName */ | 65536 /* InternalName */); - } - function getLocalName(node, allowComments, allowSourceMaps, ignoreAssignedName) { - return getName(node, allowComments, allowSourceMaps, 32768 /* LocalName */, ignoreAssignedName); - } - function getExportName(node, allowComments, allowSourceMaps) { - return getName(node, allowComments, allowSourceMaps, 16384 /* ExportName */); - } - function getDeclarationName(node, allowComments, allowSourceMaps) { - return getName(node, allowComments, allowSourceMaps); - } - function getNamespaceMemberName(ns, name, allowComments, allowSourceMaps) { - const qualifiedName = createPropertyAccessExpression(ns, nodeIsSynthesized(name) ? name : cloneNode(name)); - setTextRange(qualifiedName, name); - let emitFlags = 0; - if (!allowSourceMaps) - emitFlags |= 96 /* NoSourceMap */; - if (!allowComments) - emitFlags |= 3072 /* NoComments */; - if (emitFlags) - setEmitFlags(qualifiedName, emitFlags); - return qualifiedName; - } - function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) { - if (ns && hasSyntacticModifier(node, 1 /* Export */)) { - return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps); - } - return getExportName(node, allowComments, allowSourceMaps); - } - function copyPrologue(source, target, ensureUseStrict2, visitor) { - const offset = copyStandardPrologue(source, target, 0, ensureUseStrict2); - return copyCustomPrologue(source, target, offset, visitor); - } - function isUseStrictPrologue2(node) { - return isStringLiteral(node.expression) && node.expression.text === "use strict"; - } - function createUseStrictPrologue() { - return startOnNewLine(createExpressionStatement(createStringLiteral("use strict"))); - } - function copyStandardPrologue(source, target, statementOffset = 0, ensureUseStrict2) { - Debug.assert(target.length === 0, "Prologue directives should be at the first statement in the target statements array"); - let foundUseStrict = false; - const numStatements = source.length; - while (statementOffset < numStatements) { - const statement = source[statementOffset]; - if (isPrologueDirective(statement)) { - if (isUseStrictPrologue2(statement)) { - foundUseStrict = true; - } - target.push(statement); - } else { - break; - } - statementOffset++; - } - if (ensureUseStrict2 && !foundUseStrict) { - target.push(createUseStrictPrologue()); - } - return statementOffset; - } - function copyCustomPrologue(source, target, statementOffset, visitor, filter2 = returnTrue) { - const numStatements = source.length; - while (statementOffset !== void 0 && statementOffset < numStatements) { - const statement = source[statementOffset]; - if (getEmitFlags(statement) & 2097152 /* CustomPrologue */ && filter2(statement)) { - append(target, visitor ? visitNode(statement, visitor, isStatement) : statement); - } else { - break; - } - statementOffset++; - } - return statementOffset; - } - function ensureUseStrict(statements) { - const foundUseStrict = findUseStrictPrologue(statements); - if (!foundUseStrict) { - return setTextRange(createNodeArray([createUseStrictPrologue(), ...statements]), statements); - } - return statements; - } - function liftToBlock(nodes) { - Debug.assert(every(nodes, isStatementOrBlock), "Cannot lift nodes to a Block."); - return singleOrUndefined(nodes) || createBlock(nodes); - } - function findSpanEnd(array, test, start) { - let i = start; - while (i < array.length && test(array[i])) { - i++; - } - return i; - } - function mergeLexicalEnvironment(statements, declarations) { - if (!some(declarations)) { - return statements; - } - const leftStandardPrologueEnd = findSpanEnd(statements, isPrologueDirective, 0); - const leftHoistedFunctionsEnd = findSpanEnd(statements, isHoistedFunction, leftStandardPrologueEnd); - const leftHoistedVariablesEnd = findSpanEnd(statements, isHoistedVariableStatement, leftHoistedFunctionsEnd); - const rightStandardPrologueEnd = findSpanEnd(declarations, isPrologueDirective, 0); - const rightHoistedFunctionsEnd = findSpanEnd(declarations, isHoistedFunction, rightStandardPrologueEnd); - const rightHoistedVariablesEnd = findSpanEnd(declarations, isHoistedVariableStatement, rightHoistedFunctionsEnd); - const rightCustomPrologueEnd = findSpanEnd(declarations, isCustomPrologue, rightHoistedVariablesEnd); - Debug.assert(rightCustomPrologueEnd === declarations.length, "Expected declarations to be valid standard or custom prologues"); - const left = isNodeArray(statements) ? statements.slice() : statements; - if (rightCustomPrologueEnd > rightHoistedVariablesEnd) { - left.splice(leftHoistedVariablesEnd, 0, ...declarations.slice(rightHoistedVariablesEnd, rightCustomPrologueEnd)); - } - if (rightHoistedVariablesEnd > rightHoistedFunctionsEnd) { - left.splice(leftHoistedFunctionsEnd, 0, ...declarations.slice(rightHoistedFunctionsEnd, rightHoistedVariablesEnd)); - } - if (rightHoistedFunctionsEnd > rightStandardPrologueEnd) { - left.splice(leftStandardPrologueEnd, 0, ...declarations.slice(rightStandardPrologueEnd, rightHoistedFunctionsEnd)); - } - if (rightStandardPrologueEnd > 0) { - if (leftStandardPrologueEnd === 0) { - left.splice(0, 0, ...declarations.slice(0, rightStandardPrologueEnd)); - } else { - const leftPrologues = /* @__PURE__ */ new Map(); - for (let i = 0; i < leftStandardPrologueEnd; i++) { - const leftPrologue = statements[i]; - leftPrologues.set(leftPrologue.expression.text, true); - } - for (let i = rightStandardPrologueEnd - 1; i >= 0; i--) { - const rightPrologue = declarations[i]; - if (!leftPrologues.has(rightPrologue.expression.text)) { - left.unshift(rightPrologue); - } - } - } - } - if (isNodeArray(statements)) { - return setTextRange(createNodeArray(left, statements.hasTrailingComma), statements); - } - return statements; - } - function updateModifiers(node, modifiers) { - let modifierArray; - if (typeof modifiers === "number") { - modifierArray = createModifiersFromModifierFlags(modifiers); - } else { - modifierArray = modifiers; - } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); - } - function updateModifierLike(node, modifierArray) { - return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); - } - function asNodeArray(array) { - return array ? createNodeArray(array) : void 0; - } - function asName(name) { - return typeof name === "string" ? createIdentifier(name) : name; - } - function asExpression(value) { - return typeof value === "string" ? createStringLiteral(value) : typeof value === "number" ? createNumericLiteral(value) : typeof value === "boolean" ? value ? createTrue() : createFalse() : value; - } - function asInitializer(node) { - return node && parenthesizerRules().parenthesizeExpressionForDisallowedComma(node); - } - function asToken(value) { - return typeof value === "number" ? createToken(value) : value; - } - function asEmbeddedStatement(statement) { - return statement && isNotEmittedStatement(statement) ? setTextRange(setOriginalNode(createEmptyStatement(), statement), statement) : statement; - } - function asVariableDeclaration(variableDeclaration) { - if (typeof variableDeclaration === "string" || variableDeclaration && !isVariableDeclaration(variableDeclaration)) { - return createVariableDeclaration( - variableDeclaration, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ); - } - return variableDeclaration; - } - } - function updateWithoutOriginal(updated, original) { - if (updated !== original) { - setTextRange(updated, original); - } - return updated; - } - function updateWithOriginal(updated, original) { - if (updated !== original) { - setOriginalNode(updated, original); - setTextRange(updated, original); - } - return updated; - } - function getDefaultTagNameForKind(kind) { - switch (kind) { - case 351 /* JSDocTypeTag */: - return "type"; - case 349 /* JSDocReturnTag */: - return "returns"; - case 350 /* JSDocThisTag */: - return "this"; - case 347 /* JSDocEnumTag */: - return "enum"; - case 337 /* JSDocAuthorTag */: - return "author"; - case 339 /* JSDocClassTag */: - return "class"; - case 340 /* JSDocPublicTag */: - return "public"; - case 341 /* JSDocPrivateTag */: - return "private"; - case 342 /* JSDocProtectedTag */: - return "protected"; - case 343 /* JSDocReadonlyTag */: - return "readonly"; - case 344 /* JSDocOverrideTag */: - return "override"; - case 352 /* JSDocTemplateTag */: - return "template"; - case 353 /* JSDocTypedefTag */: - return "typedef"; - case 348 /* JSDocParameterTag */: - return "param"; - case 355 /* JSDocPropertyTag */: - return "prop"; - case 345 /* JSDocCallbackTag */: - return "callback"; - case 346 /* JSDocOverloadTag */: - return "overload"; - case 335 /* JSDocAugmentsTag */: - return "augments"; - case 336 /* JSDocImplementsTag */: - return "implements"; - default: - return Debug.fail(`Unsupported kind: ${Debug.formatSyntaxKind(kind)}`); - } - } - function getCookedText(kind, rawText) { - if (!rawTextScanner) { - rawTextScanner = createScanner( - 99 /* Latest */, - /*skipTrivia*/ - false, - 0 /* Standard */ - ); - } - switch (kind) { - case 15 /* NoSubstitutionTemplateLiteral */: - rawTextScanner.setText("`" + rawText + "`"); - break; - case 16 /* TemplateHead */: - rawTextScanner.setText("`" + rawText + "${"); - break; - case 17 /* TemplateMiddle */: - rawTextScanner.setText("}" + rawText + "${"); - break; - case 18 /* TemplateTail */: - rawTextScanner.setText("}" + rawText + "`"); - break; - } - let token = rawTextScanner.scan(); - if (token === 20 /* CloseBraceToken */) { - token = rawTextScanner.reScanTemplateToken( - /*isTaggedTemplate*/ - false - ); - } - if (rawTextScanner.isUnterminated()) { - rawTextScanner.setText(void 0); - return invalidValueSentinel; - } - let tokenValue; - switch (token) { - case 15 /* NoSubstitutionTemplateLiteral */: - case 16 /* TemplateHead */: - case 17 /* TemplateMiddle */: - case 18 /* TemplateTail */: - tokenValue = rawTextScanner.getTokenValue(); - break; - } - if (tokenValue === void 0 || rawTextScanner.scan() !== 1 /* EndOfFileToken */) { - rawTextScanner.setText(void 0); - return invalidValueSentinel; - } - rawTextScanner.setText(void 0); - return tokenValue; - } - function propagateNameFlags(node) { - return node && isIdentifier(node) ? propagateIdentifierNameFlags(node) : propagateChildFlags(node); - } - function propagateIdentifierNameFlags(node) { - return propagateChildFlags(node) & ~67108864 /* ContainsPossibleTopLevelAwait */; - } - function propagatePropertyNameFlagsOfChild(node, transformFlags) { - return transformFlags | node.transformFlags & 134234112 /* PropertyNamePropagatingFlags */; - } - function propagateChildFlags(child) { - if (!child) - return 0 /* None */; - const childFlags = child.transformFlags & ~getTransformFlagsSubtreeExclusions(child.kind); - return isNamedDeclaration(child) && isPropertyName(child.name) ? propagatePropertyNameFlagsOfChild(child.name, childFlags) : childFlags; - } - function propagateChildrenFlags(children) { - return children ? children.transformFlags : 0 /* None */; - } - function aggregateChildrenFlags(children) { - let subtreeFlags = 0 /* None */; - for (const child of children) { - subtreeFlags |= propagateChildFlags(child); - } - children.transformFlags = subtreeFlags; - } - function getTransformFlagsSubtreeExclusions(kind) { - if (kind >= 182 /* FirstTypeNode */ && kind <= 205 /* LastTypeNode */) { - return -2 /* TypeExcludes */; - } - switch (kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 209 /* ArrayLiteralExpression */: - return -2147450880 /* ArrayLiteralOrCallOrNewExcludes */; - case 267 /* ModuleDeclaration */: - return -1941676032 /* ModuleExcludes */; - case 169 /* Parameter */: - return -2147483648 /* ParameterExcludes */; - case 219 /* ArrowFunction */: - return -2072174592 /* ArrowFunctionExcludes */; - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - return -1937940480 /* FunctionExcludes */; - case 261 /* VariableDeclarationList */: - return -2146893824 /* VariableDeclarationListExcludes */; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - return -2147344384 /* ClassExcludes */; - case 176 /* Constructor */: - return -1937948672 /* ConstructorExcludes */; - case 172 /* PropertyDeclaration */: - return -2013249536 /* PropertyExcludes */; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return -2005057536 /* MethodOrAccessorExcludes */; - case 133 /* AnyKeyword */: - case 150 /* NumberKeyword */: - case 163 /* BigIntKeyword */: - case 146 /* NeverKeyword */: - case 154 /* StringKeyword */: - case 151 /* ObjectKeyword */: - case 136 /* BooleanKeyword */: - case 155 /* SymbolKeyword */: - case 116 /* VoidKeyword */: - case 168 /* TypeParameter */: - case 171 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - return -2 /* TypeExcludes */; - case 210 /* ObjectLiteralExpression */: - return -2147278848 /* ObjectLiteralExcludes */; - case 299 /* CatchClause */: - return -2147418112 /* CatchClauseExcludes */; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - return -2147450880 /* BindingPatternExcludes */; - case 216 /* TypeAssertionExpression */: - case 238 /* SatisfiesExpression */: - case 234 /* AsExpression */: - case 360 /* PartiallyEmittedExpression */: - case 217 /* ParenthesizedExpression */: - case 108 /* SuperKeyword */: - return -2147483648 /* OuterExpressionExcludes */; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - return -2147483648 /* PropertyAccessExcludes */; - default: - return -2147483648 /* NodeExcludes */; - } - } - function makeSynthetic(node) { - node.flags |= 16 /* Synthesized */; - return node; - } - function createUnparsedSourceFile(textOrInputFiles, mapPathOrType, mapTextOrStripInternal) { - let stripInternal; - let bundleFileInfo; - let fileName; - let text; - let length2; - let sourceMapPath; - let sourceMapText; - let getText; - let getSourceMapText; - let oldFileOfCurrentEmit; - if (!isString(textOrInputFiles)) { - Debug.assert(mapPathOrType === "js" || mapPathOrType === "dts"); - fileName = (mapPathOrType === "js" ? textOrInputFiles.javascriptPath : textOrInputFiles.declarationPath) || ""; - sourceMapPath = mapPathOrType === "js" ? textOrInputFiles.javascriptMapPath : textOrInputFiles.declarationMapPath; - getText = () => mapPathOrType === "js" ? textOrInputFiles.javascriptText : textOrInputFiles.declarationText; - getSourceMapText = () => mapPathOrType === "js" ? textOrInputFiles.javascriptMapText : textOrInputFiles.declarationMapText; - length2 = () => getText().length; - if (textOrInputFiles.buildInfo && textOrInputFiles.buildInfo.bundle) { - Debug.assert(mapTextOrStripInternal === void 0 || typeof mapTextOrStripInternal === "boolean"); - stripInternal = mapTextOrStripInternal; - bundleFileInfo = mapPathOrType === "js" ? textOrInputFiles.buildInfo.bundle.js : textOrInputFiles.buildInfo.bundle.dts; - oldFileOfCurrentEmit = textOrInputFiles.oldFileOfCurrentEmit; - } - } else { - fileName = ""; - text = textOrInputFiles; - length2 = textOrInputFiles.length; - sourceMapPath = mapPathOrType; - sourceMapText = mapTextOrStripInternal; - } - const node = oldFileOfCurrentEmit ? parseOldFileOfCurrentEmit(Debug.checkDefined(bundleFileInfo)) : parseUnparsedSourceFile(bundleFileInfo, stripInternal, length2); - node.fileName = fileName; - node.sourceMapPath = sourceMapPath; - node.oldFileOfCurrentEmit = oldFileOfCurrentEmit; - if (getText && getSourceMapText) { - Object.defineProperty(node, "text", { get: getText }); - Object.defineProperty(node, "sourceMapText", { get: getSourceMapText }); - } else { - Debug.assert(!oldFileOfCurrentEmit); - node.text = text ?? ""; - node.sourceMapText = sourceMapText; - } - return node; - } - function parseUnparsedSourceFile(bundleFileInfo, stripInternal, length2) { - let prologues; - let helpers; - let referencedFiles; - let typeReferenceDirectives; - let libReferenceDirectives; - let prependChildren; - let texts; - let hasNoDefaultLib; - for (const section of bundleFileInfo ? bundleFileInfo.sections : emptyArray) { - switch (section.kind) { - case "prologue" /* Prologue */: - prologues = append(prologues, setTextRange(factory.createUnparsedPrologue(section.data), section)); - break; - case "emitHelpers" /* EmitHelpers */: - helpers = append(helpers, getAllUnscopedEmitHelpers().get(section.data)); - break; - case "no-default-lib" /* NoDefaultLib */: - hasNoDefaultLib = true; - break; - case "reference" /* Reference */: - referencedFiles = append(referencedFiles, { pos: -1, end: -1, fileName: section.data }); - break; - case "type" /* Type */: - typeReferenceDirectives = append(typeReferenceDirectives, { pos: -1, end: -1, fileName: section.data }); - break; - case "type-import" /* TypeResolutionModeImport */: - typeReferenceDirectives = append(typeReferenceDirectives, { pos: -1, end: -1, fileName: section.data, resolutionMode: 99 /* ESNext */ }); - break; - case "type-require" /* TypeResolutionModeRequire */: - typeReferenceDirectives = append(typeReferenceDirectives, { pos: -1, end: -1, fileName: section.data, resolutionMode: 1 /* CommonJS */ }); - break; - case "lib" /* Lib */: - libReferenceDirectives = append(libReferenceDirectives, { pos: -1, end: -1, fileName: section.data }); - break; - case "prepend" /* Prepend */: - let prependTexts; - for (const text of section.texts) { - if (!stripInternal || text.kind !== "internal" /* Internal */) { - prependTexts = append(prependTexts, setTextRange(factory.createUnparsedTextLike(text.data, text.kind === "internal" /* Internal */), text)); - } - } - prependChildren = addRange(prependChildren, prependTexts); - texts = append(texts, factory.createUnparsedPrepend(section.data, prependTexts ?? emptyArray)); - break; - case "internal" /* Internal */: - if (stripInternal) { - if (!texts) - texts = []; - break; - } - case "text" /* Text */: - texts = append(texts, setTextRange(factory.createUnparsedTextLike(section.data, section.kind === "internal" /* Internal */), section)); - break; - default: - Debug.assertNever(section); - } - } - if (!texts) { - const textNode = factory.createUnparsedTextLike( - /*data*/ - void 0, - /*internal*/ - false - ); - setTextRangePosWidth(textNode, 0, typeof length2 === "function" ? length2() : length2); - texts = [textNode]; - } - const node = parseNodeFactory.createUnparsedSource( - prologues ?? emptyArray, - /*syntheticReferences*/ - void 0, - texts - ); - setEachParent(prologues, node); - setEachParent(texts, node); - setEachParent(prependChildren, node); - node.hasNoDefaultLib = hasNoDefaultLib; - node.helpers = helpers; - node.referencedFiles = referencedFiles || emptyArray; - node.typeReferenceDirectives = typeReferenceDirectives; - node.libReferenceDirectives = libReferenceDirectives || emptyArray; - return node; - } - function parseOldFileOfCurrentEmit(bundleFileInfo) { - let texts; - let syntheticReferences; - for (const section of bundleFileInfo.sections) { - switch (section.kind) { - case "internal" /* Internal */: - case "text" /* Text */: - texts = append(texts, setTextRange(factory.createUnparsedTextLike(section.data, section.kind === "internal" /* Internal */), section)); - break; - case "no-default-lib" /* NoDefaultLib */: - case "reference" /* Reference */: - case "type" /* Type */: - case "type-import" /* TypeResolutionModeImport */: - case "type-require" /* TypeResolutionModeRequire */: - case "lib" /* Lib */: - syntheticReferences = append(syntheticReferences, setTextRange(factory.createUnparsedSyntheticReference(section), section)); - break; - case "prologue" /* Prologue */: - case "emitHelpers" /* EmitHelpers */: - case "prepend" /* Prepend */: - break; - default: - Debug.assertNever(section); - } - } - const node = factory.createUnparsedSource(emptyArray, syntheticReferences, texts ?? emptyArray); - setEachParent(syntheticReferences, node); - setEachParent(texts, node); - node.helpers = map(bundleFileInfo.sources && bundleFileInfo.sources.helpers, (name) => getAllUnscopedEmitHelpers().get(name)); - return node; - } - function createInputFiles(javascriptTextOrReadFileText, declarationTextOrJavascriptPath, javascriptMapPath, javascriptMapTextOrDeclarationPath, declarationMapPath, declarationMapTextOrBuildInfoPath) { - return !isString(javascriptTextOrReadFileText) ? createInputFilesWithFilePaths( - javascriptTextOrReadFileText, - declarationTextOrJavascriptPath, - javascriptMapPath, - javascriptMapTextOrDeclarationPath, - declarationMapPath, - declarationMapTextOrBuildInfoPath - ) : createInputFilesWithFileTexts( - /*javascriptPath*/ - void 0, - javascriptTextOrReadFileText, - javascriptMapPath, - javascriptMapTextOrDeclarationPath, - /*declarationPath*/ - void 0, - declarationTextOrJavascriptPath, - declarationMapPath, - declarationMapTextOrBuildInfoPath - ); - } - function createInputFilesWithFilePaths(readFileText, javascriptPath, javascriptMapPath, declarationPath, declarationMapPath, buildInfoPath, host, options) { - const node = parseNodeFactory.createInputFiles(); - node.javascriptPath = javascriptPath; - node.javascriptMapPath = javascriptMapPath; - node.declarationPath = declarationPath; - node.declarationMapPath = declarationMapPath; - node.buildInfoPath = buildInfoPath; - const cache = /* @__PURE__ */ new Map(); - const textGetter = (path) => { - if (path === void 0) - return void 0; - let value = cache.get(path); - if (value === void 0) { - value = readFileText(path); - cache.set(path, value !== void 0 ? value : false); - } - return value !== false ? value : void 0; - }; - const definedTextGetter = (path) => { - const result = textGetter(path); - return result !== void 0 ? result : `/* Input file ${path} was missing */\r -`; - }; - let buildInfo; - const getAndCacheBuildInfo = () => { - if (buildInfo === void 0 && buildInfoPath) { - if (host == null ? void 0 : host.getBuildInfo) { - buildInfo = host.getBuildInfo(buildInfoPath, options.configFilePath) ?? false; - } else { - const result = textGetter(buildInfoPath); - buildInfo = result !== void 0 ? getBuildInfo(buildInfoPath, result) ?? false : false; - } - } - return buildInfo || void 0; - }; - Object.defineProperties(node, { - javascriptText: { get: () => definedTextGetter(javascriptPath) }, - javascriptMapText: { get: () => textGetter(javascriptMapPath) }, - // TODO:: if there is inline sourceMap in jsFile, use that - declarationText: { get: () => definedTextGetter(Debug.checkDefined(declarationPath)) }, - declarationMapText: { get: () => textGetter(declarationMapPath) }, - // TODO:: if there is inline sourceMap in dtsFile, use that - buildInfo: { get: getAndCacheBuildInfo } - }); - return node; - } - function createInputFilesWithFileTexts(javascriptPath, javascriptText, javascriptMapPath, javascriptMapText, declarationPath, declarationText, declarationMapPath, declarationMapText, buildInfoPath, buildInfo, oldFileOfCurrentEmit) { - const node = parseNodeFactory.createInputFiles(); - node.javascriptPath = javascriptPath; - node.javascriptText = javascriptText; - node.javascriptMapPath = javascriptMapPath; - node.javascriptMapText = javascriptMapText; - node.declarationPath = declarationPath; - node.declarationText = declarationText; - node.declarationMapPath = declarationMapPath; - node.declarationMapText = declarationMapText; - node.buildInfoPath = buildInfoPath; - node.buildInfo = buildInfo; - node.oldFileOfCurrentEmit = oldFileOfCurrentEmit; - return node; - } - function createSourceMapSource(fileName, text, skipTrivia2) { - return new (SourceMapSource2 || (SourceMapSource2 = objectAllocator.getSourceMapSourceConstructor()))(fileName, text, skipTrivia2); - } - function setOriginalNode(node, original) { - if (node.original !== original) { - node.original = original; - if (original) { - const emitNode = original.emitNode; - if (emitNode) - node.emitNode = mergeEmitNode(emitNode, node.emitNode); - } - } - return node; - } - function mergeEmitNode(sourceEmitNode, destEmitNode) { - const { - flags, - internalFlags, - leadingComments, - trailingComments, - commentRange, - sourceMapRange, - tokenSourceMapRanges, - constantValue, - helpers, - startsOnNewLine, - snippetElement, - classThis, - assignedName - } = sourceEmitNode; - if (!destEmitNode) - destEmitNode = {}; - if (flags) { - destEmitNode.flags = flags; - } - if (internalFlags) { - destEmitNode.internalFlags = internalFlags & ~8 /* Immutable */; - } - if (leadingComments) { - destEmitNode.leadingComments = addRange(leadingComments.slice(), destEmitNode.leadingComments); - } - if (trailingComments) { - destEmitNode.trailingComments = addRange(trailingComments.slice(), destEmitNode.trailingComments); - } - if (commentRange) { - destEmitNode.commentRange = commentRange; - } - if (sourceMapRange) { - destEmitNode.sourceMapRange = sourceMapRange; - } - if (tokenSourceMapRanges) { - destEmitNode.tokenSourceMapRanges = mergeTokenSourceMapRanges(tokenSourceMapRanges, destEmitNode.tokenSourceMapRanges); - } - if (constantValue !== void 0) { - destEmitNode.constantValue = constantValue; - } - if (helpers) { - for (const helper of helpers) { - destEmitNode.helpers = appendIfUnique(destEmitNode.helpers, helper); - } - } - if (startsOnNewLine !== void 0) { - destEmitNode.startsOnNewLine = startsOnNewLine; - } - if (snippetElement !== void 0) { - destEmitNode.snippetElement = snippetElement; - } - if (classThis) { - destEmitNode.classThis = classThis; - } - if (assignedName) { - destEmitNode.assignedName = assignedName; - } - return destEmitNode; - } - function mergeTokenSourceMapRanges(sourceRanges, destRanges) { - if (!destRanges) - destRanges = []; - for (const key in sourceRanges) { - destRanges[key] = sourceRanges[key]; - } - return destRanges; - } - var nextAutoGenerateId, NodeFactoryFlags, nodeFactoryPatchers, rawTextScanner, invalidValueSentinel, baseFactory, syntheticFactory, factory, SourceMapSource2; - var init_nodeFactory = __esm({ - "src/compiler/factory/nodeFactory.ts"() { - "use strict"; - init_ts2(); - nextAutoGenerateId = 0; - NodeFactoryFlags = /* @__PURE__ */ ((NodeFactoryFlags2) => { - NodeFactoryFlags2[NodeFactoryFlags2["None"] = 0] = "None"; - NodeFactoryFlags2[NodeFactoryFlags2["NoParenthesizerRules"] = 1] = "NoParenthesizerRules"; - NodeFactoryFlags2[NodeFactoryFlags2["NoNodeConverters"] = 2] = "NoNodeConverters"; - NodeFactoryFlags2[NodeFactoryFlags2["NoIndentationOnFreshPropertyAccess"] = 4] = "NoIndentationOnFreshPropertyAccess"; - NodeFactoryFlags2[NodeFactoryFlags2["NoOriginalNode"] = 8] = "NoOriginalNode"; - return NodeFactoryFlags2; - })(NodeFactoryFlags || {}); - nodeFactoryPatchers = []; - invalidValueSentinel = {}; - baseFactory = createBaseNodeFactory(); - syntheticFactory = { - createBaseSourceFileNode: (kind) => makeSynthetic(baseFactory.createBaseSourceFileNode(kind)), - createBaseIdentifierNode: (kind) => makeSynthetic(baseFactory.createBaseIdentifierNode(kind)), - createBasePrivateIdentifierNode: (kind) => makeSynthetic(baseFactory.createBasePrivateIdentifierNode(kind)), - createBaseTokenNode: (kind) => makeSynthetic(baseFactory.createBaseTokenNode(kind)), - createBaseNode: (kind) => makeSynthetic(baseFactory.createBaseNode(kind)) - }; - factory = createNodeFactory(4 /* NoIndentationOnFreshPropertyAccess */, syntheticFactory); - } - }); - - // src/compiler/factory/emitNode.ts - function getOrCreateEmitNode(node) { - if (!node.emitNode) { - if (isParseTreeNode(node)) { - if (node.kind === 312 /* SourceFile */) { - return node.emitNode = { annotatedNodes: [node] }; - } - const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail("Could not determine parsed source file."); - getOrCreateEmitNode(sourceFile).annotatedNodes.push(node); - } - node.emitNode = {}; - } else { - Debug.assert(!(node.emitNode.internalFlags & 8 /* Immutable */), "Invalid attempt to mutate an immutable node."); - } - return node.emitNode; - } - function disposeEmitNodes(sourceFile) { - var _a, _b; - const annotatedNodes = (_b = (_a = getSourceFileOfNode(getParseTreeNode(sourceFile))) == null ? void 0 : _a.emitNode) == null ? void 0 : _b.annotatedNodes; - if (annotatedNodes) { - for (const node of annotatedNodes) { - node.emitNode = void 0; - } - } - } - function removeAllComments(node) { - const emitNode = getOrCreateEmitNode(node); - emitNode.flags |= 3072 /* NoComments */; - emitNode.leadingComments = void 0; - emitNode.trailingComments = void 0; - return node; - } - function setEmitFlags(node, emitFlags) { - getOrCreateEmitNode(node).flags = emitFlags; - return node; - } - function addEmitFlags(node, emitFlags) { - const emitNode = getOrCreateEmitNode(node); - emitNode.flags = emitNode.flags | emitFlags; - return node; - } - function setInternalEmitFlags(node, emitFlags) { - getOrCreateEmitNode(node).internalFlags = emitFlags; - return node; - } - function addInternalEmitFlags(node, emitFlags) { - const emitNode = getOrCreateEmitNode(node); - emitNode.internalFlags = emitNode.internalFlags | emitFlags; - return node; - } - function getSourceMapRange(node) { - var _a; - return ((_a = node.emitNode) == null ? void 0 : _a.sourceMapRange) ?? node; - } - function setSourceMapRange(node, range) { - getOrCreateEmitNode(node).sourceMapRange = range; - return node; - } - function getTokenSourceMapRange(node, token) { - var _a, _b; - return (_b = (_a = node.emitNode) == null ? void 0 : _a.tokenSourceMapRanges) == null ? void 0 : _b[token]; - } - function setTokenSourceMapRange(node, token, range) { - const emitNode = getOrCreateEmitNode(node); - const tokenSourceMapRanges = emitNode.tokenSourceMapRanges ?? (emitNode.tokenSourceMapRanges = []); - tokenSourceMapRanges[token] = range; - return node; - } - function getStartsOnNewLine(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.startsOnNewLine; - } - function setStartsOnNewLine(node, newLine) { - getOrCreateEmitNode(node).startsOnNewLine = newLine; - return node; - } - function getCommentRange(node) { - var _a; - return ((_a = node.emitNode) == null ? void 0 : _a.commentRange) ?? node; - } - function setCommentRange(node, range) { - getOrCreateEmitNode(node).commentRange = range; - return node; - } - function getSyntheticLeadingComments(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.leadingComments; - } - function setSyntheticLeadingComments(node, comments) { - getOrCreateEmitNode(node).leadingComments = comments; - return node; - } - function addSyntheticLeadingComment(node, kind, text, hasTrailingNewLine) { - return setSyntheticLeadingComments(node, append(getSyntheticLeadingComments(node), { kind, pos: -1, end: -1, hasTrailingNewLine, text })); - } - function getSyntheticTrailingComments(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.trailingComments; - } - function setSyntheticTrailingComments(node, comments) { - getOrCreateEmitNode(node).trailingComments = comments; - return node; - } - function addSyntheticTrailingComment(node, kind, text, hasTrailingNewLine) { - return setSyntheticTrailingComments(node, append(getSyntheticTrailingComments(node), { kind, pos: -1, end: -1, hasTrailingNewLine, text })); - } - function moveSyntheticComments(node, original) { - setSyntheticLeadingComments(node, getSyntheticLeadingComments(original)); - setSyntheticTrailingComments(node, getSyntheticTrailingComments(original)); - const emit = getOrCreateEmitNode(original); - emit.leadingComments = void 0; - emit.trailingComments = void 0; - return node; - } - function getConstantValue(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.constantValue; - } - function setConstantValue(node, value) { - const emitNode = getOrCreateEmitNode(node); - emitNode.constantValue = value; - return node; - } - function addEmitHelper(node, helper) { - const emitNode = getOrCreateEmitNode(node); - emitNode.helpers = append(emitNode.helpers, helper); - return node; - } - function addEmitHelpers(node, helpers) { - if (some(helpers)) { - const emitNode = getOrCreateEmitNode(node); - for (const helper of helpers) { - emitNode.helpers = appendIfUnique(emitNode.helpers, helper); - } - } - return node; - } - function removeEmitHelper(node, helper) { - var _a; - const helpers = (_a = node.emitNode) == null ? void 0 : _a.helpers; - if (helpers) { - return orderedRemoveItem(helpers, helper); - } - return false; - } - function getEmitHelpers(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.helpers; - } - function moveEmitHelpers(source, target, predicate) { - const sourceEmitNode = source.emitNode; - const sourceEmitHelpers = sourceEmitNode && sourceEmitNode.helpers; - if (!some(sourceEmitHelpers)) - return; - const targetEmitNode = getOrCreateEmitNode(target); - let helpersRemoved = 0; - for (let i = 0; i < sourceEmitHelpers.length; i++) { - const helper = sourceEmitHelpers[i]; - if (predicate(helper)) { - helpersRemoved++; - targetEmitNode.helpers = appendIfUnique(targetEmitNode.helpers, helper); - } else if (helpersRemoved > 0) { - sourceEmitHelpers[i - helpersRemoved] = helper; - } - } - if (helpersRemoved > 0) { - sourceEmitHelpers.length -= helpersRemoved; - } - } - function getSnippetElement(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.snippetElement; - } - function setSnippetElement(node, snippet) { - const emitNode = getOrCreateEmitNode(node); - emitNode.snippetElement = snippet; - return node; - } - function ignoreSourceNewlines(node) { - getOrCreateEmitNode(node).internalFlags |= 4 /* IgnoreSourceNewlines */; - return node; - } - function setTypeNode(node, type) { - const emitNode = getOrCreateEmitNode(node); - emitNode.typeNode = type; - return node; - } - function getTypeNode(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.typeNode; - } - function setIdentifierTypeArguments(node, typeArguments) { - getOrCreateEmitNode(node).identifierTypeArguments = typeArguments; - return node; - } - function getIdentifierTypeArguments(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.identifierTypeArguments; - } - function setIdentifierAutoGenerate(node, autoGenerate) { - getOrCreateEmitNode(node).autoGenerate = autoGenerate; - return node; - } - function getIdentifierAutoGenerate(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.autoGenerate; - } - function setIdentifierGeneratedImportReference(node, value) { - getOrCreateEmitNode(node).generatedImportReference = value; - return node; - } - function getIdentifierGeneratedImportReference(node) { - var _a; - return (_a = node.emitNode) == null ? void 0 : _a.generatedImportReference; - } - var init_emitNode = __esm({ - "src/compiler/factory/emitNode.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/factory/emitHelpers.ts - function createEmitHelperFactory(context) { - const factory2 = context.factory; - const immutableTrue = memoize(() => setInternalEmitFlags(factory2.createTrue(), 8 /* Immutable */)); - const immutableFalse = memoize(() => setInternalEmitFlags(factory2.createFalse(), 8 /* Immutable */)); - return { - getUnscopedHelperName, - // TypeScript Helpers - createDecorateHelper, - createMetadataHelper, - createParamHelper, - // ES Decorators Helpers - createESDecorateHelper, - createRunInitializersHelper, - // ES2018 Helpers - createAssignHelper, - createAwaitHelper, - createAsyncGeneratorHelper, - createAsyncDelegatorHelper, - createAsyncValuesHelper, - // ES2018 Destructuring Helpers - createRestHelper, - // ES2017 Helpers - createAwaiterHelper, - // ES2015 Helpers - createExtendsHelper, - createTemplateObjectHelper, - createSpreadArrayHelper, - createPropKeyHelper, - createSetFunctionNameHelper, - // ES2015 Destructuring Helpers - createValuesHelper, - createReadHelper, - // ES2015 Generator Helpers - createGeneratorHelper, - // ES Module Helpers - createCreateBindingHelper, - createImportStarHelper, - createImportStarCallbackHelper, - createImportDefaultHelper, - createExportStarHelper, - // Class Fields Helpers - createClassPrivateFieldGetHelper, - createClassPrivateFieldSetHelper, - createClassPrivateFieldInHelper, - // 'using' helpers - createAddDisposableResourceHelper, - createDisposeResourcesHelper - }; - function getUnscopedHelperName(name) { - return setEmitFlags(factory2.createIdentifier(name), 8192 /* HelperName */ | 4 /* AdviseOnEmitNode */); - } - function createDecorateHelper(decoratorExpressions, target, memberName, descriptor) { - context.requestEmitHelper(decorateHelper); - const argumentsArray = []; - argumentsArray.push(factory2.createArrayLiteralExpression( - decoratorExpressions, - /*multiLine*/ - true - )); - argumentsArray.push(target); - if (memberName) { - argumentsArray.push(memberName); - if (descriptor) { - argumentsArray.push(descriptor); - } - } - return factory2.createCallExpression( - getUnscopedHelperName("__decorate"), - /*typeArguments*/ - void 0, - argumentsArray - ); - } - function createMetadataHelper(metadataKey, metadataValue) { - context.requestEmitHelper(metadataHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__metadata"), - /*typeArguments*/ - void 0, - [ - factory2.createStringLiteral(metadataKey), - metadataValue - ] - ); - } - function createParamHelper(expression, parameterOffset, location) { - context.requestEmitHelper(paramHelper); - return setTextRange( - factory2.createCallExpression( - getUnscopedHelperName("__param"), - /*typeArguments*/ - void 0, - [ - factory2.createNumericLiteral(parameterOffset + ""), - expression - ] - ), - location - ); - } - function createESDecorateClassContextObject(contextIn) { - const properties = [ - factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral("class")), - factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name), - factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) - ]; - return factory2.createObjectLiteralExpression(properties); - } - function createESDecorateClassElementAccessGetMethod(elementName) { - const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name); - return factory2.createPropertyAssignment( - "get", - factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - factory2.createIdentifier("obj") - )], - /*type*/ - void 0, - /*equalsGreaterThanToken*/ - void 0, - accessor - ) - ); - } - function createESDecorateClassElementAccessSetMethod(elementName) { - const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name); - return factory2.createPropertyAssignment( - "set", - factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - [ - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - factory2.createIdentifier("obj") - ), - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - factory2.createIdentifier("value") - ) - ], - /*type*/ - void 0, - /*equalsGreaterThanToken*/ - void 0, - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createAssignment( - accessor, - factory2.createIdentifier("value") - ) - ) - ]) - ) - ); - } - function createESDecorateClassElementAccessHasMethod(elementName) { - const propertyName = elementName.computed ? elementName.name : isIdentifier(elementName.name) ? factory2.createStringLiteralFromNode(elementName.name) : elementName.name; - return factory2.createPropertyAssignment( - "has", - factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - factory2.createIdentifier("obj") - )], - /*type*/ - void 0, - /*equalsGreaterThanToken*/ - void 0, - factory2.createBinaryExpression( - propertyName, - 103 /* InKeyword */, - factory2.createIdentifier("obj") - ) - ) - ); - } - function createESDecorateClassElementAccessObject(name, access) { - const properties = []; - properties.push(createESDecorateClassElementAccessHasMethod(name)); - if (access.get) - properties.push(createESDecorateClassElementAccessGetMethod(name)); - if (access.set) - properties.push(createESDecorateClassElementAccessSetMethod(name)); - return factory2.createObjectLiteralExpression(properties); - } - function createESDecorateClassElementContextObject(contextIn) { - const properties = [ - factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral(contextIn.kind)), - factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory2.createStringLiteralFromNode(contextIn.name.name)), - factory2.createPropertyAssignment(factory2.createIdentifier("static"), contextIn.static ? factory2.createTrue() : factory2.createFalse()), - factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse()), - factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access)), - factory2.createPropertyAssignment(factory2.createIdentifier("metadata"), contextIn.metadata) - ]; - return factory2.createObjectLiteralExpression(properties); - } - function createESDecorateContextObject(contextIn) { - return contextIn.kind === "class" ? createESDecorateClassContextObject(contextIn) : createESDecorateClassElementContextObject(contextIn); - } - function createESDecorateHelper(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - context.requestEmitHelper(esDecorateHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__esDecorate"), - /*typeArguments*/ - void 0, - [ - ctor ?? factory2.createNull(), - descriptorIn ?? factory2.createNull(), - decorators, - createESDecorateContextObject(contextIn), - initializers, - extraInitializers - ] - ); - } - function createRunInitializersHelper(thisArg, initializers, value) { - context.requestEmitHelper(runInitializersHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__runInitializers"), - /*typeArguments*/ - void 0, - value ? [thisArg, initializers, value] : [thisArg, initializers] - ); - } - function createAssignHelper(attributesSegments) { - if (getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) { - return factory2.createCallExpression( - factory2.createPropertyAccessExpression(factory2.createIdentifier("Object"), "assign"), - /*typeArguments*/ - void 0, - attributesSegments - ); - } - context.requestEmitHelper(assignHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__assign"), - /*typeArguments*/ - void 0, - attributesSegments - ); - } - function createAwaitHelper(expression) { - context.requestEmitHelper(awaitHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__await"), - /*typeArguments*/ - void 0, - [expression] - ); - } - function createAsyncGeneratorHelper(generatorFunc, hasLexicalThis) { - context.requestEmitHelper(awaitHelper); - context.requestEmitHelper(asyncGeneratorHelper); - (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 524288 /* AsyncFunctionBody */ | 1048576 /* ReuseTempVariableScope */; - return factory2.createCallExpression( - getUnscopedHelperName("__asyncGenerator"), - /*typeArguments*/ - void 0, - [ - hasLexicalThis ? factory2.createThis() : factory2.createVoidZero(), - factory2.createIdentifier("arguments"), - generatorFunc - ] - ); - } - function createAsyncDelegatorHelper(expression) { - context.requestEmitHelper(awaitHelper); - context.requestEmitHelper(asyncDelegator); - return factory2.createCallExpression( - getUnscopedHelperName("__asyncDelegator"), - /*typeArguments*/ - void 0, - [expression] - ); - } - function createAsyncValuesHelper(expression) { - context.requestEmitHelper(asyncValues); - return factory2.createCallExpression( - getUnscopedHelperName("__asyncValues"), - /*typeArguments*/ - void 0, - [expression] - ); - } - function createRestHelper(value, elements, computedTempVariables, location) { - context.requestEmitHelper(restHelper); - const propertyNames = []; - let computedTempVariableOffset = 0; - for (let i = 0; i < elements.length - 1; i++) { - const propertyName = getPropertyNameOfBindingOrAssignmentElement(elements[i]); - if (propertyName) { - if (isComputedPropertyName(propertyName)) { - Debug.assertIsDefined(computedTempVariables, "Encountered computed property name but 'computedTempVariables' argument was not provided."); - const temp = computedTempVariables[computedTempVariableOffset]; - computedTempVariableOffset++; - propertyNames.push( - factory2.createConditionalExpression( - factory2.createTypeCheck(temp, "symbol"), - /*questionToken*/ - void 0, - temp, - /*colonToken*/ - void 0, - factory2.createAdd(temp, factory2.createStringLiteral("")) - ) - ); - } else { - propertyNames.push(factory2.createStringLiteralFromNode(propertyName)); - } - } - } - return factory2.createCallExpression( - getUnscopedHelperName("__rest"), - /*typeArguments*/ - void 0, - [ - value, - setTextRange( - factory2.createArrayLiteralExpression(propertyNames), - location - ) - ] - ); - } - function createAwaiterHelper(hasLexicalThis, hasLexicalArguments, promiseConstructor, body) { - context.requestEmitHelper(awaiterHelper); - const generatorFunc = factory2.createFunctionExpression( - /*modifiers*/ - void 0, - factory2.createToken(42 /* AsteriskToken */), - /*name*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - [], - /*type*/ - void 0, - body - ); - (generatorFunc.emitNode || (generatorFunc.emitNode = {})).flags |= 524288 /* AsyncFunctionBody */ | 1048576 /* ReuseTempVariableScope */; - return factory2.createCallExpression( - getUnscopedHelperName("__awaiter"), - /*typeArguments*/ - void 0, - [ - hasLexicalThis ? factory2.createThis() : factory2.createVoidZero(), - hasLexicalArguments ? factory2.createIdentifier("arguments") : factory2.createVoidZero(), - promiseConstructor ? createExpressionFromEntityName(factory2, promiseConstructor) : factory2.createVoidZero(), - generatorFunc - ] - ); - } - function createExtendsHelper(name) { - context.requestEmitHelper(extendsHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__extends"), - /*typeArguments*/ - void 0, - [name, factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */)] - ); - } - function createTemplateObjectHelper(cooked, raw) { - context.requestEmitHelper(templateObjectHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__makeTemplateObject"), - /*typeArguments*/ - void 0, - [cooked, raw] - ); - } - function createSpreadArrayHelper(to, from, packFrom) { - context.requestEmitHelper(spreadArrayHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__spreadArray"), - /*typeArguments*/ - void 0, - [to, from, packFrom ? immutableTrue() : immutableFalse()] - ); - } - function createPropKeyHelper(expr) { - context.requestEmitHelper(propKeyHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__propKey"), - /*typeArguments*/ - void 0, - [expr] - ); - } - function createSetFunctionNameHelper(f, name, prefix) { - context.requestEmitHelper(setFunctionNameHelper); - return context.factory.createCallExpression( - getUnscopedHelperName("__setFunctionName"), - /*typeArguments*/ - void 0, - prefix ? [f, name, context.factory.createStringLiteral(prefix)] : [f, name] - ); - } - function createValuesHelper(expression) { - context.requestEmitHelper(valuesHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__values"), - /*typeArguments*/ - void 0, - [expression] - ); - } - function createReadHelper(iteratorRecord, count) { - context.requestEmitHelper(readHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__read"), - /*typeArguments*/ - void 0, - count !== void 0 ? [iteratorRecord, factory2.createNumericLiteral(count + "")] : [iteratorRecord] - ); - } - function createGeneratorHelper(body) { - context.requestEmitHelper(generatorHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__generator"), - /*typeArguments*/ - void 0, - [factory2.createThis(), body] - ); - } - function createCreateBindingHelper(module2, inputName, outputName) { - context.requestEmitHelper(createBindingHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__createBinding"), - /*typeArguments*/ - void 0, - [factory2.createIdentifier("exports"), module2, inputName, ...outputName ? [outputName] : []] - ); - } - function createImportStarHelper(expression) { - context.requestEmitHelper(importStarHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__importStar"), - /*typeArguments*/ - void 0, - [expression] - ); - } - function createImportStarCallbackHelper() { - context.requestEmitHelper(importStarHelper); - return getUnscopedHelperName("__importStar"); - } - function createImportDefaultHelper(expression) { - context.requestEmitHelper(importDefaultHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__importDefault"), - /*typeArguments*/ - void 0, - [expression] - ); - } - function createExportStarHelper(moduleExpression, exportsExpression = factory2.createIdentifier("exports")) { - context.requestEmitHelper(exportStarHelper); - context.requestEmitHelper(createBindingHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__exportStar"), - /*typeArguments*/ - void 0, - [moduleExpression, exportsExpression] - ); - } - function createClassPrivateFieldGetHelper(receiver, state, kind, f) { - context.requestEmitHelper(classPrivateFieldGetHelper); - let args; - if (!f) { - args = [receiver, state, factory2.createStringLiteral(kind)]; - } else { - args = [receiver, state, factory2.createStringLiteral(kind), f]; - } - return factory2.createCallExpression( - getUnscopedHelperName("__classPrivateFieldGet"), - /*typeArguments*/ - void 0, - args - ); - } - function createClassPrivateFieldSetHelper(receiver, state, value, kind, f) { - context.requestEmitHelper(classPrivateFieldSetHelper); - let args; - if (!f) { - args = [receiver, state, value, factory2.createStringLiteral(kind)]; - } else { - args = [receiver, state, value, factory2.createStringLiteral(kind), f]; - } - return factory2.createCallExpression( - getUnscopedHelperName("__classPrivateFieldSet"), - /*typeArguments*/ - void 0, - args - ); - } - function createClassPrivateFieldInHelper(state, receiver) { - context.requestEmitHelper(classPrivateFieldInHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__classPrivateFieldIn"), - /*typeArguments*/ - void 0, - [state, receiver] - ); - } - function createAddDisposableResourceHelper(envBinding, value, async) { - context.requestEmitHelper(addDisposableResourceHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__addDisposableResource"), - /*typeArguments*/ - void 0, - [envBinding, value, async ? factory2.createTrue() : factory2.createFalse()] - ); - } - function createDisposeResourcesHelper(envBinding) { - context.requestEmitHelper(disposeResourcesHelper); - return factory2.createCallExpression( - getUnscopedHelperName("__disposeResources"), - /*typeArguments*/ - void 0, - [envBinding] - ); - } - } - function compareEmitHelpers(x, y) { - if (x === y) - return 0 /* EqualTo */; - if (x.priority === y.priority) - return 0 /* EqualTo */; - if (x.priority === void 0) - return 1 /* GreaterThan */; - if (y.priority === void 0) - return -1 /* LessThan */; - return compareValues(x.priority, y.priority); - } - function helperString(input, ...args) { - return (uniqueName) => { - let result = ""; - for (let i = 0; i < args.length; i++) { - result += input[i]; - result += uniqueName(args[i]); - } - result += input[input.length - 1]; - return result; - }; - } - function getAllUnscopedEmitHelpers() { - return allUnscopedEmitHelpers || (allUnscopedEmitHelpers = arrayToMap([ - decorateHelper, - metadataHelper, - paramHelper, - esDecorateHelper, - runInitializersHelper, - assignHelper, - awaitHelper, - asyncGeneratorHelper, - asyncDelegator, - asyncValues, - restHelper, - awaiterHelper, - extendsHelper, - templateObjectHelper, - spreadArrayHelper, - valuesHelper, - readHelper, - propKeyHelper, - setFunctionNameHelper, - generatorHelper, - importStarHelper, - importDefaultHelper, - exportStarHelper, - classPrivateFieldGetHelper, - classPrivateFieldSetHelper, - classPrivateFieldInHelper, - createBindingHelper, - setModuleDefaultHelper, - addDisposableResourceHelper, - disposeResourcesHelper - ], (helper) => helper.name)); - } - function isCallToHelper(firstSegment, helperName) { - return isCallExpression(firstSegment) && isIdentifier(firstSegment.expression) && (getEmitFlags(firstSegment.expression) & 8192 /* HelperName */) !== 0 && firstSegment.expression.escapedText === helperName; - } - var PrivateIdentifierKind, decorateHelper, metadataHelper, paramHelper, esDecorateHelper, runInitializersHelper, assignHelper, awaitHelper, asyncGeneratorHelper, asyncDelegator, asyncValues, restHelper, awaiterHelper, extendsHelper, templateObjectHelper, readHelper, spreadArrayHelper, propKeyHelper, setFunctionNameHelper, valuesHelper, generatorHelper, createBindingHelper, setModuleDefaultHelper, importStarHelper, importDefaultHelper, exportStarHelper, classPrivateFieldGetHelper, classPrivateFieldSetHelper, classPrivateFieldInHelper, addDisposableResourceHelper, disposeResourcesHelper, allUnscopedEmitHelpers, asyncSuperHelper, advancedAsyncSuperHelper; - var init_emitHelpers = __esm({ - "src/compiler/factory/emitHelpers.ts"() { - "use strict"; - init_ts2(); - PrivateIdentifierKind = /* @__PURE__ */ ((PrivateIdentifierKind2) => { - PrivateIdentifierKind2["Field"] = "f"; - PrivateIdentifierKind2["Method"] = "m"; - PrivateIdentifierKind2["Accessor"] = "a"; - return PrivateIdentifierKind2; - })(PrivateIdentifierKind || {}); - decorateHelper = { - name: "typescript:decorate", - importName: "__decorate", - scoped: false, - priority: 2, - text: ` - var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - 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; - return c > 3 && r && Object.defineProperty(target, key, r), r; - };` - }; - metadataHelper = { - name: "typescript:metadata", - importName: "__metadata", - scoped: false, - priority: 3, - text: ` - var __metadata = (this && this.__metadata) || function (k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - };` - }; - paramHelper = { - name: "typescript:param", - importName: "__param", - scoped: false, - priority: 4, - text: ` - var __param = (this && this.__param) || function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - };` - }; - esDecorateHelper = { - name: "typescript:esDecorate", - importName: "__esDecorate", - scoped: false, - priority: 2, - text: ` - var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { - function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; } - var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; - var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; - var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; - for (var i = decorators.length - 1; i >= 0; i--) { - var context = {}; - for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; - for (var p in contextIn.access) context.access[p] = contextIn.access[p]; - context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); }; - var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); - if (kind === "accessor") { - if (result === void 0) continue; - if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } - else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; - } - } - if (target) Object.defineProperty(target, contextIn.name, descriptor); - done = true; - };` - }; - runInitializersHelper = { - name: "typescript:runInitializers", - importName: "__runInitializers", - scoped: false, - priority: 2, - text: ` - var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) { - var useValue = arguments.length > 2; - for (var i = 0; i < initializers.length; i++) { - value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg); - } - return useValue ? value : void 0; - };` - }; - assignHelper = { - name: "typescript:assign", - importName: "__assign", - scoped: false, - priority: 1, - text: ` - var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - };` - }; - awaitHelper = { - name: "typescript:await", - importName: "__await", - scoped: false, - text: ` - var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }` - }; - asyncGeneratorHelper = { - name: "typescript:asyncGenerator", - importName: "__asyncGenerator", - scoped: false, - dependencies: [awaitHelper], - text: ` - var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - 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); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - };` - }; - asyncDelegator = { - name: "typescript:asyncDelegator", - importName: "__asyncDelegator", - scoped: false, - dependencies: [awaitHelper], - text: ` - var __asyncDelegator = (this && this.__asyncDelegator) || function (o) { - var i, p; - return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; - function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; } - };` - }; - asyncValues = { - name: "typescript:asyncValues", - importName: "__asyncValues", - scoped: false, - text: ` - var __asyncValues = (this && this.__asyncValues) || function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - 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); - 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); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } - };` - }; - restHelper = { - name: "typescript:rest", - importName: "__rest", - scoped: false, - text: ` - var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; - };` - }; - awaiterHelper = { - name: "typescript:awaiter", - importName: "__awaiter", - scoped: false, - priority: 5, - text: ` - var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - };` - }; - extendsHelper = { - name: "typescript:extends", - importName: "__extends", - scoped: false, - priority: 0, - text: ` - var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - })();` - }; - templateObjectHelper = { - name: "typescript:makeTemplateObject", - importName: "__makeTemplateObject", - scoped: false, - priority: 0, - text: ` - var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - };` - }; - readHelper = { - name: "typescript:read", - importName: "__read", - scoped: false, - text: ` - var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - };` - }; - spreadArrayHelper = { - name: "typescript:spreadArray", - importName: "__spreadArray", - scoped: false, - text: ` - var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); - };` - }; - propKeyHelper = { - name: "typescript:propKey", - importName: "__propKey", - scoped: false, - text: ` - var __propKey = (this && this.__propKey) || function (x) { - return typeof x === "symbol" ? x : "".concat(x); - };` - }; - setFunctionNameHelper = { - name: "typescript:setFunctionName", - importName: "__setFunctionName", - scoped: false, - text: ` - var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { - if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; - return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); - };` - }; - valuesHelper = { - name: "typescript:values", - importName: "__values", - scoped: false, - text: ` - var __values = (this && this.__values) || function(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - };` - }; - generatorHelper = { - name: "typescript:generator", - importName: "__generator", - scoped: false, - priority: 6, - text: ` - var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } - };` - }; - createBindingHelper = { - name: "typescript:commonjscreatebinding", - importName: "__createBinding", - scoped: false, - priority: 1, - text: ` - var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }));` - }; - setModuleDefaultHelper = { - name: "typescript:commonjscreatevalue", - importName: "__setModuleDefault", - scoped: false, - priority: 1, - text: ` - var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - });` - }; - importStarHelper = { - name: "typescript:commonjsimportstar", - importName: "__importStar", - scoped: false, - dependencies: [createBindingHelper, setModuleDefaultHelper], - priority: 2, - text: ` - var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - };` - }; - importDefaultHelper = { - name: "typescript:commonjsimportdefault", - importName: "__importDefault", - scoped: false, - text: ` - var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - };` - }; - exportStarHelper = { - name: "typescript:export-star", - importName: "__exportStar", - scoped: false, - dependencies: [createBindingHelper], - priority: 2, - text: ` - var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); - };` - }; - classPrivateFieldGetHelper = { - name: "typescript:classPrivateFieldGet", - importName: "__classPrivateFieldGet", - scoped: false, - text: ` - var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - };` - }; - classPrivateFieldSetHelper = { - name: "typescript:classPrivateFieldSet", - importName: "__classPrivateFieldSet", - scoped: false, - text: ` - var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - };` - }; - classPrivateFieldInHelper = { - name: "typescript:classPrivateFieldIn", - importName: "__classPrivateFieldIn", - scoped: false, - text: ` - var __classPrivateFieldIn = (this && this.__classPrivateFieldIn) || function(state, receiver) { - if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object"); - return typeof state === "function" ? receiver === state : state.has(receiver); - };` - }; - addDisposableResourceHelper = { - name: "typescript:addDisposableResource", - importName: "__addDisposableResource", - scoped: false, - text: ` - var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { - if (value !== null && value !== void 0) { - if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); - var dispose; - if (async) { - if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); - dispose = value[Symbol.asyncDispose]; - } - if (dispose === void 0) { - if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); - dispose = value[Symbol.dispose]; - } - if (typeof dispose !== "function") throw new TypeError("Object not disposable."); - env.stack.push({ value: value, dispose: dispose, async: async }); - } - else if (async) { - env.stack.push({ async: true }); - } - return value; - };` - }; - disposeResourcesHelper = { - name: "typescript:disposeResources", - importName: "__disposeResources", - scoped: false, - text: ` - var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { - return function (env) { - function fail(e) { - env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; - } - function next() { - while (env.stack.length) { - var rec = env.stack.pop(); - try { - var result = rec.dispose && rec.dispose.call(rec.value); - if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); - } - catch (e) { - fail(e); - } - } - if (env.hasError) throw env.error; - } - return next(); - }; - })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - });` - }; - asyncSuperHelper = { - name: "typescript:async-super", - scoped: true, - text: helperString` - const ${"_superIndex"} = name => super[name];` - }; - advancedAsyncSuperHelper = { - name: "typescript:advanced-async-super", - scoped: true, - text: helperString` - const ${"_superIndex"} = (function (geti, seti) { - const cache = Object.create(null); - return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } }); - })(name => super[name], (name, value) => super[name] = value);` - }; - } - }); - - // src/compiler/factory/nodeTests.ts - function isNumericLiteral(node) { - return node.kind === 9 /* NumericLiteral */; - } - function isBigIntLiteral(node) { - return node.kind === 10 /* BigIntLiteral */; - } - function isStringLiteral(node) { - return node.kind === 11 /* StringLiteral */; - } - function isJsxText(node) { - return node.kind === 12 /* JsxText */; - } - function isRegularExpressionLiteral(node) { - return node.kind === 14 /* RegularExpressionLiteral */; - } - function isNoSubstitutionTemplateLiteral(node) { - return node.kind === 15 /* NoSubstitutionTemplateLiteral */; - } - function isTemplateHead(node) { - return node.kind === 16 /* TemplateHead */; - } - function isTemplateMiddle(node) { - return node.kind === 17 /* TemplateMiddle */; - } - function isTemplateTail(node) { - return node.kind === 18 /* TemplateTail */; - } - function isDotDotDotToken(node) { - return node.kind === 26 /* DotDotDotToken */; - } - function isCommaToken(node) { - return node.kind === 28 /* CommaToken */; - } - function isPlusToken(node) { - return node.kind === 40 /* PlusToken */; - } - function isMinusToken(node) { - return node.kind === 41 /* MinusToken */; - } - function isAsteriskToken(node) { - return node.kind === 42 /* AsteriskToken */; - } - function isExclamationToken(node) { - return node.kind === 54 /* ExclamationToken */; - } - function isQuestionToken(node) { - return node.kind === 58 /* QuestionToken */; - } - function isColonToken(node) { - return node.kind === 59 /* ColonToken */; - } - function isQuestionDotToken(node) { - return node.kind === 29 /* QuestionDotToken */; - } - function isEqualsGreaterThanToken(node) { - return node.kind === 39 /* EqualsGreaterThanToken */; - } - function isIdentifier(node) { - return node.kind === 80 /* Identifier */; - } - function isPrivateIdentifier(node) { - return node.kind === 81 /* PrivateIdentifier */; - } - function isExportModifier(node) { - return node.kind === 95 /* ExportKeyword */; - } - function isDefaultModifier(node) { - return node.kind === 90 /* DefaultKeyword */; - } - function isAsyncModifier(node) { - return node.kind === 134 /* AsyncKeyword */; - } - function isAssertsKeyword(node) { - return node.kind === 131 /* AssertsKeyword */; - } - function isAwaitKeyword(node) { - return node.kind === 135 /* AwaitKeyword */; - } - function isReadonlyKeyword(node) { - return node.kind === 148 /* ReadonlyKeyword */; - } - function isStaticModifier(node) { - return node.kind === 126 /* StaticKeyword */; - } - function isAbstractModifier(node) { - return node.kind === 128 /* AbstractKeyword */; - } - function isOverrideModifier(node) { - return node.kind === 164 /* OverrideKeyword */; - } - function isAccessorModifier(node) { - return node.kind === 129 /* AccessorKeyword */; - } - function isSuperKeyword(node) { - return node.kind === 108 /* SuperKeyword */; - } - function isImportKeyword(node) { - return node.kind === 102 /* ImportKeyword */; - } - function isCaseKeyword(node) { - return node.kind === 84 /* CaseKeyword */; - } - function isQualifiedName(node) { - return node.kind === 166 /* QualifiedName */; - } - function isComputedPropertyName(node) { - return node.kind === 167 /* ComputedPropertyName */; - } - function isTypeParameterDeclaration(node) { - return node.kind === 168 /* TypeParameter */; - } - function isParameter(node) { - return node.kind === 169 /* Parameter */; - } - function isDecorator(node) { - return node.kind === 170 /* Decorator */; - } - function isPropertySignature(node) { - return node.kind === 171 /* PropertySignature */; - } - function isPropertyDeclaration(node) { - return node.kind === 172 /* PropertyDeclaration */; - } - function isMethodSignature(node) { - return node.kind === 173 /* MethodSignature */; - } - function isMethodDeclaration(node) { - return node.kind === 174 /* MethodDeclaration */; - } - function isClassStaticBlockDeclaration(node) { - return node.kind === 175 /* ClassStaticBlockDeclaration */; - } - function isConstructorDeclaration(node) { - return node.kind === 176 /* Constructor */; - } - function isGetAccessorDeclaration(node) { - return node.kind === 177 /* GetAccessor */; - } - function isSetAccessorDeclaration(node) { - return node.kind === 178 /* SetAccessor */; - } - function isCallSignatureDeclaration(node) { - return node.kind === 179 /* CallSignature */; - } - function isConstructSignatureDeclaration(node) { - return node.kind === 180 /* ConstructSignature */; - } - function isIndexSignatureDeclaration(node) { - return node.kind === 181 /* IndexSignature */; - } - function isTypePredicateNode(node) { - return node.kind === 182 /* TypePredicate */; - } - function isTypeReferenceNode(node) { - return node.kind === 183 /* TypeReference */; - } - function isFunctionTypeNode(node) { - return node.kind === 184 /* FunctionType */; - } - function isConstructorTypeNode(node) { - return node.kind === 185 /* ConstructorType */; - } - function isTypeQueryNode(node) { - return node.kind === 186 /* TypeQuery */; - } - function isTypeLiteralNode(node) { - return node.kind === 187 /* TypeLiteral */; - } - function isArrayTypeNode(node) { - return node.kind === 188 /* ArrayType */; - } - function isTupleTypeNode(node) { - return node.kind === 189 /* TupleType */; - } - function isNamedTupleMember(node) { - return node.kind === 202 /* NamedTupleMember */; - } - function isOptionalTypeNode(node) { - return node.kind === 190 /* OptionalType */; - } - function isRestTypeNode(node) { - return node.kind === 191 /* RestType */; - } - function isUnionTypeNode(node) { - return node.kind === 192 /* UnionType */; - } - function isIntersectionTypeNode(node) { - return node.kind === 193 /* IntersectionType */; - } - function isConditionalTypeNode(node) { - return node.kind === 194 /* ConditionalType */; - } - function isInferTypeNode(node) { - return node.kind === 195 /* InferType */; - } - function isParenthesizedTypeNode(node) { - return node.kind === 196 /* ParenthesizedType */; - } - function isThisTypeNode(node) { - return node.kind === 197 /* ThisType */; - } - function isTypeOperatorNode(node) { - return node.kind === 198 /* TypeOperator */; - } - function isIndexedAccessTypeNode(node) { - return node.kind === 199 /* IndexedAccessType */; - } - function isMappedTypeNode(node) { - return node.kind === 200 /* MappedType */; - } - function isLiteralTypeNode(node) { - return node.kind === 201 /* LiteralType */; - } - function isImportTypeNode(node) { - return node.kind === 205 /* ImportType */; - } - function isTemplateLiteralTypeSpan(node) { - return node.kind === 204 /* TemplateLiteralTypeSpan */; - } - function isTemplateLiteralTypeNode(node) { - return node.kind === 203 /* TemplateLiteralType */; - } - function isObjectBindingPattern(node) { - return node.kind === 206 /* ObjectBindingPattern */; - } - function isArrayBindingPattern(node) { - return node.kind === 207 /* ArrayBindingPattern */; - } - function isBindingElement(node) { - return node.kind === 208 /* BindingElement */; - } - function isArrayLiteralExpression(node) { - return node.kind === 209 /* ArrayLiteralExpression */; - } - function isObjectLiteralExpression(node) { - return node.kind === 210 /* ObjectLiteralExpression */; - } - function isPropertyAccessExpression(node) { - return node.kind === 211 /* PropertyAccessExpression */; - } - function isElementAccessExpression(node) { - return node.kind === 212 /* ElementAccessExpression */; - } - function isCallExpression(node) { - return node.kind === 213 /* CallExpression */; - } - function isNewExpression(node) { - return node.kind === 214 /* NewExpression */; - } - function isTaggedTemplateExpression(node) { - return node.kind === 215 /* TaggedTemplateExpression */; - } - function isTypeAssertionExpression(node) { - return node.kind === 216 /* TypeAssertionExpression */; - } - function isParenthesizedExpression(node) { - return node.kind === 217 /* ParenthesizedExpression */; - } - function isFunctionExpression(node) { - return node.kind === 218 /* FunctionExpression */; - } - function isArrowFunction(node) { - return node.kind === 219 /* ArrowFunction */; - } - function isDeleteExpression(node) { - return node.kind === 220 /* DeleteExpression */; - } - function isTypeOfExpression(node) { - return node.kind === 221 /* TypeOfExpression */; - } - function isVoidExpression(node) { - return node.kind === 222 /* VoidExpression */; - } - function isAwaitExpression(node) { - return node.kind === 223 /* AwaitExpression */; - } - function isPrefixUnaryExpression(node) { - return node.kind === 224 /* PrefixUnaryExpression */; - } - function isPostfixUnaryExpression(node) { - return node.kind === 225 /* PostfixUnaryExpression */; - } - function isBinaryExpression(node) { - return node.kind === 226 /* BinaryExpression */; - } - function isConditionalExpression(node) { - return node.kind === 227 /* ConditionalExpression */; - } - function isTemplateExpression(node) { - return node.kind === 228 /* TemplateExpression */; - } - function isYieldExpression(node) { - return node.kind === 229 /* YieldExpression */; - } - function isSpreadElement(node) { - return node.kind === 230 /* SpreadElement */; - } - function isClassExpression(node) { - return node.kind === 231 /* ClassExpression */; - } - function isOmittedExpression(node) { - return node.kind === 232 /* OmittedExpression */; - } - function isExpressionWithTypeArguments(node) { - return node.kind === 233 /* ExpressionWithTypeArguments */; - } - function isAsExpression(node) { - return node.kind === 234 /* AsExpression */; - } - function isSatisfiesExpression(node) { - return node.kind === 238 /* SatisfiesExpression */; - } - function isNonNullExpression(node) { - return node.kind === 235 /* NonNullExpression */; - } - function isMetaProperty(node) { - return node.kind === 236 /* MetaProperty */; - } - function isSyntheticExpression(node) { - return node.kind === 237 /* SyntheticExpression */; - } - function isPartiallyEmittedExpression(node) { - return node.kind === 360 /* PartiallyEmittedExpression */; - } - function isCommaListExpression(node) { - return node.kind === 361 /* CommaListExpression */; - } - function isTemplateSpan(node) { - return node.kind === 239 /* TemplateSpan */; - } - function isSemicolonClassElement(node) { - return node.kind === 240 /* SemicolonClassElement */; - } - function isBlock(node) { - return node.kind === 241 /* Block */; - } - function isVariableStatement(node) { - return node.kind === 243 /* VariableStatement */; - } - function isEmptyStatement(node) { - return node.kind === 242 /* EmptyStatement */; - } - function isExpressionStatement(node) { - return node.kind === 244 /* ExpressionStatement */; - } - function isIfStatement(node) { - return node.kind === 245 /* IfStatement */; - } - function isDoStatement(node) { - return node.kind === 246 /* DoStatement */; - } - function isWhileStatement(node) { - return node.kind === 247 /* WhileStatement */; - } - function isForStatement(node) { - return node.kind === 248 /* ForStatement */; - } - function isForInStatement(node) { - return node.kind === 249 /* ForInStatement */; - } - function isForOfStatement(node) { - return node.kind === 250 /* ForOfStatement */; - } - function isContinueStatement(node) { - return node.kind === 251 /* ContinueStatement */; - } - function isBreakStatement(node) { - return node.kind === 252 /* BreakStatement */; - } - function isReturnStatement(node) { - return node.kind === 253 /* ReturnStatement */; - } - function isWithStatement(node) { - return node.kind === 254 /* WithStatement */; - } - function isSwitchStatement(node) { - return node.kind === 255 /* SwitchStatement */; - } - function isLabeledStatement(node) { - return node.kind === 256 /* LabeledStatement */; - } - function isThrowStatement(node) { - return node.kind === 257 /* ThrowStatement */; - } - function isTryStatement(node) { - return node.kind === 258 /* TryStatement */; - } - function isDebuggerStatement(node) { - return node.kind === 259 /* DebuggerStatement */; - } - function isVariableDeclaration(node) { - return node.kind === 260 /* VariableDeclaration */; - } - function isVariableDeclarationList(node) { - return node.kind === 261 /* VariableDeclarationList */; - } - function isFunctionDeclaration(node) { - return node.kind === 262 /* FunctionDeclaration */; - } - function isClassDeclaration(node) { - return node.kind === 263 /* ClassDeclaration */; - } - function isInterfaceDeclaration(node) { - return node.kind === 264 /* InterfaceDeclaration */; - } - function isTypeAliasDeclaration(node) { - return node.kind === 265 /* TypeAliasDeclaration */; - } - function isEnumDeclaration(node) { - return node.kind === 266 /* EnumDeclaration */; - } - function isModuleDeclaration(node) { - return node.kind === 267 /* ModuleDeclaration */; - } - function isModuleBlock(node) { - return node.kind === 268 /* ModuleBlock */; - } - function isCaseBlock(node) { - return node.kind === 269 /* CaseBlock */; - } - function isNamespaceExportDeclaration(node) { - return node.kind === 270 /* NamespaceExportDeclaration */; - } - function isImportEqualsDeclaration(node) { - return node.kind === 271 /* ImportEqualsDeclaration */; - } - function isImportDeclaration(node) { - return node.kind === 272 /* ImportDeclaration */; - } - function isImportClause(node) { - return node.kind === 273 /* ImportClause */; - } - function isImportTypeAssertionContainer(node) { - return node.kind === 302 /* ImportTypeAssertionContainer */; - } - function isAssertClause(node) { - return node.kind === 300 /* AssertClause */; - } - function isAssertEntry(node) { - return node.kind === 301 /* AssertEntry */; - } - function isNamespaceImport(node) { - return node.kind === 274 /* NamespaceImport */; - } - function isNamespaceExport(node) { - return node.kind === 280 /* NamespaceExport */; - } - function isNamedImports(node) { - return node.kind === 275 /* NamedImports */; - } - function isImportSpecifier(node) { - return node.kind === 276 /* ImportSpecifier */; - } - function isExportAssignment(node) { - return node.kind === 277 /* ExportAssignment */; - } - function isExportDeclaration(node) { - return node.kind === 278 /* ExportDeclaration */; - } - function isNamedExports(node) { - return node.kind === 279 /* NamedExports */; - } - function isExportSpecifier(node) { - return node.kind === 281 /* ExportSpecifier */; - } - function isMissingDeclaration(node) { - return node.kind === 282 /* MissingDeclaration */; - } - function isNotEmittedStatement(node) { - return node.kind === 359 /* NotEmittedStatement */; - } - function isSyntheticReference(node) { - return node.kind === 362 /* SyntheticReferenceExpression */; - } - function isExternalModuleReference(node) { - return node.kind === 283 /* ExternalModuleReference */; - } - function isJsxElement(node) { - return node.kind === 284 /* JsxElement */; - } - function isJsxSelfClosingElement(node) { - return node.kind === 285 /* JsxSelfClosingElement */; - } - function isJsxOpeningElement(node) { - return node.kind === 286 /* JsxOpeningElement */; - } - function isJsxClosingElement(node) { - return node.kind === 287 /* JsxClosingElement */; - } - function isJsxFragment(node) { - return node.kind === 288 /* JsxFragment */; - } - function isJsxOpeningFragment(node) { - return node.kind === 289 /* JsxOpeningFragment */; - } - function isJsxClosingFragment(node) { - return node.kind === 290 /* JsxClosingFragment */; - } - function isJsxAttribute(node) { - return node.kind === 291 /* JsxAttribute */; - } - function isJsxAttributes(node) { - return node.kind === 292 /* JsxAttributes */; - } - function isJsxSpreadAttribute(node) { - return node.kind === 293 /* JsxSpreadAttribute */; - } - function isJsxExpression(node) { - return node.kind === 294 /* JsxExpression */; - } - function isJsxNamespacedName(node) { - return node.kind === 295 /* JsxNamespacedName */; - } - function isCaseClause(node) { - return node.kind === 296 /* CaseClause */; - } - function isDefaultClause(node) { - return node.kind === 297 /* DefaultClause */; - } - function isHeritageClause(node) { - return node.kind === 298 /* HeritageClause */; - } - function isCatchClause(node) { - return node.kind === 299 /* CatchClause */; - } - function isPropertyAssignment(node) { - return node.kind === 303 /* PropertyAssignment */; - } - function isShorthandPropertyAssignment(node) { - return node.kind === 304 /* ShorthandPropertyAssignment */; - } - function isSpreadAssignment(node) { - return node.kind === 305 /* SpreadAssignment */; - } - function isEnumMember(node) { - return node.kind === 306 /* EnumMember */; - } - function isUnparsedPrepend(node) { - return node.kind === 308 /* UnparsedPrepend */; - } - function isSourceFile(node) { - return node.kind === 312 /* SourceFile */; - } - function isBundle(node) { - return node.kind === 313 /* Bundle */; - } - function isUnparsedSource(node) { - return node.kind === 314 /* UnparsedSource */; - } - function isJSDocTypeExpression(node) { - return node.kind === 316 /* JSDocTypeExpression */; - } - function isJSDocNameReference(node) { - return node.kind === 317 /* JSDocNameReference */; - } - function isJSDocMemberName(node) { - return node.kind === 318 /* JSDocMemberName */; - } - function isJSDocLink(node) { - return node.kind === 331 /* JSDocLink */; - } - function isJSDocLinkCode(node) { - return node.kind === 332 /* JSDocLinkCode */; - } - function isJSDocLinkPlain(node) { - return node.kind === 333 /* JSDocLinkPlain */; - } - function isJSDocAllType(node) { - return node.kind === 319 /* JSDocAllType */; - } - function isJSDocUnknownType(node) { - return node.kind === 320 /* JSDocUnknownType */; - } - function isJSDocNullableType(node) { - return node.kind === 321 /* JSDocNullableType */; - } - function isJSDocNonNullableType(node) { - return node.kind === 322 /* JSDocNonNullableType */; - } - function isJSDocOptionalType(node) { - return node.kind === 323 /* JSDocOptionalType */; - } - function isJSDocFunctionType(node) { - return node.kind === 324 /* JSDocFunctionType */; - } - function isJSDocVariadicType(node) { - return node.kind === 325 /* JSDocVariadicType */; - } - function isJSDocNamepathType(node) { - return node.kind === 326 /* JSDocNamepathType */; - } - function isJSDoc(node) { - return node.kind === 327 /* JSDoc */; - } - function isJSDocTypeLiteral(node) { - return node.kind === 329 /* JSDocTypeLiteral */; - } - function isJSDocSignature(node) { - return node.kind === 330 /* JSDocSignature */; - } - function isJSDocAugmentsTag(node) { - return node.kind === 335 /* JSDocAugmentsTag */; - } - function isJSDocAuthorTag(node) { - return node.kind === 337 /* JSDocAuthorTag */; - } - function isJSDocClassTag(node) { - return node.kind === 339 /* JSDocClassTag */; - } - function isJSDocCallbackTag(node) { - return node.kind === 345 /* JSDocCallbackTag */; - } - function isJSDocPublicTag(node) { - return node.kind === 340 /* JSDocPublicTag */; - } - function isJSDocPrivateTag(node) { - return node.kind === 341 /* JSDocPrivateTag */; - } - function isJSDocProtectedTag(node) { - return node.kind === 342 /* JSDocProtectedTag */; - } - function isJSDocReadonlyTag(node) { - return node.kind === 343 /* JSDocReadonlyTag */; - } - function isJSDocOverrideTag(node) { - return node.kind === 344 /* JSDocOverrideTag */; - } - function isJSDocOverloadTag(node) { - return node.kind === 346 /* JSDocOverloadTag */; - } - function isJSDocDeprecatedTag(node) { - return node.kind === 338 /* JSDocDeprecatedTag */; - } - function isJSDocSeeTag(node) { - return node.kind === 354 /* JSDocSeeTag */; - } - function isJSDocEnumTag(node) { - return node.kind === 347 /* JSDocEnumTag */; - } - function isJSDocParameterTag(node) { - return node.kind === 348 /* JSDocParameterTag */; - } - function isJSDocReturnTag(node) { - return node.kind === 349 /* JSDocReturnTag */; - } - function isJSDocThisTag(node) { - return node.kind === 350 /* JSDocThisTag */; - } - function isJSDocTypeTag(node) { - return node.kind === 351 /* JSDocTypeTag */; - } - function isJSDocTemplateTag(node) { - return node.kind === 352 /* JSDocTemplateTag */; - } - function isJSDocTypedefTag(node) { - return node.kind === 353 /* JSDocTypedefTag */; - } - function isJSDocUnknownTag(node) { - return node.kind === 334 /* JSDocTag */; - } - function isJSDocPropertyTag(node) { - return node.kind === 355 /* JSDocPropertyTag */; - } - function isJSDocImplementsTag(node) { - return node.kind === 336 /* JSDocImplementsTag */; - } - function isJSDocSatisfiesTag(node) { - return node.kind === 357 /* JSDocSatisfiesTag */; - } - function isJSDocThrowsTag(node) { - return node.kind === 356 /* JSDocThrowsTag */; - } - function isSyntaxList(n) { - return n.kind === 358 /* SyntaxList */; - } - var init_nodeTests = __esm({ - "src/compiler/factory/nodeTests.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/factory/utilities.ts - function createEmptyExports(factory2) { - return factory2.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory2.createNamedExports([]), - /*moduleSpecifier*/ - void 0 - ); - } - function createMemberAccessForPropertyName(factory2, target, memberName, location) { - if (isComputedPropertyName(memberName)) { - return setTextRange(factory2.createElementAccessExpression(target, memberName.expression), location); - } else { - const expression = setTextRange( - isMemberName(memberName) ? factory2.createPropertyAccessExpression(target, memberName) : factory2.createElementAccessExpression(target, memberName), - memberName - ); - addEmitFlags(expression, 128 /* NoNestedSourceMaps */); - return expression; - } - } - function createReactNamespace(reactNamespace, parent2) { - const react = parseNodeFactory.createIdentifier(reactNamespace || "React"); - setParent(react, getParseTreeNode(parent2)); - return react; - } - function createJsxFactoryExpressionFromEntityName(factory2, jsxFactory, parent2) { - if (isQualifiedName(jsxFactory)) { - const left = createJsxFactoryExpressionFromEntityName(factory2, jsxFactory.left, parent2); - const right = factory2.createIdentifier(idText(jsxFactory.right)); - right.escapedText = jsxFactory.right.escapedText; - return factory2.createPropertyAccessExpression(left, right); - } else { - return createReactNamespace(idText(jsxFactory), parent2); - } - } - function createJsxFactoryExpression(factory2, jsxFactoryEntity, reactNamespace, parent2) { - return jsxFactoryEntity ? createJsxFactoryExpressionFromEntityName(factory2, jsxFactoryEntity, parent2) : factory2.createPropertyAccessExpression( - createReactNamespace(reactNamespace, parent2), - "createElement" - ); - } - function createJsxFragmentFactoryExpression(factory2, jsxFragmentFactoryEntity, reactNamespace, parent2) { - return jsxFragmentFactoryEntity ? createJsxFactoryExpressionFromEntityName(factory2, jsxFragmentFactoryEntity, parent2) : factory2.createPropertyAccessExpression( - createReactNamespace(reactNamespace, parent2), - "Fragment" - ); - } - function createExpressionForJsxElement(factory2, callee, tagName, props, children, location) { - const argumentsList = [tagName]; - if (props) { - argumentsList.push(props); - } - if (children && children.length > 0) { - if (!props) { - argumentsList.push(factory2.createNull()); - } - if (children.length > 1) { - for (const child of children) { - startOnNewLine(child); - argumentsList.push(child); - } - } else { - argumentsList.push(children[0]); - } - } - return setTextRange( - factory2.createCallExpression( - callee, - /*typeArguments*/ - void 0, - argumentsList - ), - location - ); - } - function createExpressionForJsxFragment(factory2, jsxFactoryEntity, jsxFragmentFactoryEntity, reactNamespace, children, parentElement, location) { - const tagName = createJsxFragmentFactoryExpression(factory2, jsxFragmentFactoryEntity, reactNamespace, parentElement); - const argumentsList = [tagName, factory2.createNull()]; - if (children && children.length > 0) { - if (children.length > 1) { - for (const child of children) { - startOnNewLine(child); - argumentsList.push(child); - } - } else { - argumentsList.push(children[0]); - } - } - return setTextRange( - factory2.createCallExpression( - createJsxFactoryExpression(factory2, jsxFactoryEntity, reactNamespace, parentElement), - /*typeArguments*/ - void 0, - argumentsList - ), - location - ); - } - function createForOfBindingStatement(factory2, node, boundValue) { - if (isVariableDeclarationList(node)) { - const firstDeclaration = first(node.declarations); - const updatedDeclaration = factory2.updateVariableDeclaration( - firstDeclaration, - firstDeclaration.name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - boundValue - ); - return setTextRange( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.updateVariableDeclarationList(node, [updatedDeclaration]) - ), - /*location*/ - node - ); - } else { - const updatedExpression = setTextRange( - factory2.createAssignment(node, boundValue), - /*location*/ - node - ); - return setTextRange( - factory2.createExpressionStatement(updatedExpression), - /*location*/ - node - ); - } - } - function insertLeadingStatement(factory2, dest, source) { - if (isBlock(dest)) { - return factory2.updateBlock(dest, setTextRange(factory2.createNodeArray([source, ...dest.statements]), dest.statements)); - } else { - return factory2.createBlock( - factory2.createNodeArray([dest, source]), - /*multiLine*/ - true - ); - } - } - function createExpressionFromEntityName(factory2, node) { - if (isQualifiedName(node)) { - const left = createExpressionFromEntityName(factory2, node.left); - const right = setParent(setTextRange(factory2.cloneNode(node.right), node.right), node.right.parent); - return setTextRange(factory2.createPropertyAccessExpression(left, right), node); - } else { - return setParent(setTextRange(factory2.cloneNode(node), node), node.parent); - } - } - function createExpressionForPropertyName(factory2, memberName) { - if (isIdentifier(memberName)) { - return factory2.createStringLiteralFromNode(memberName); - } else if (isComputedPropertyName(memberName)) { - return setParent(setTextRange(factory2.cloneNode(memberName.expression), memberName.expression), memberName.expression.parent); - } else { - return setParent(setTextRange(factory2.cloneNode(memberName), memberName), memberName.parent); - } - } - function createExpressionForAccessorDeclaration(factory2, properties, property, receiver, multiLine) { - const { firstAccessor, getAccessor, setAccessor } = getAllAccessorDeclarations(properties, property); - if (property === firstAccessor) { - return setTextRange( - factory2.createObjectDefinePropertyCall( - receiver, - createExpressionForPropertyName(factory2, property.name), - factory2.createPropertyDescriptor({ - enumerable: factory2.createFalse(), - configurable: true, - get: getAccessor && setTextRange( - setOriginalNode( - factory2.createFunctionExpression( - getModifiers(getAccessor), - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - getAccessor.parameters, - /*type*/ - void 0, - getAccessor.body - // TODO: GH#18217 - ), - getAccessor - ), - getAccessor - ), - set: setAccessor && setTextRange( - setOriginalNode( - factory2.createFunctionExpression( - getModifiers(setAccessor), - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - setAccessor.parameters, - /*type*/ - void 0, - setAccessor.body - // TODO: GH#18217 - ), - setAccessor - ), - setAccessor - ) - }, !multiLine) - ), - firstAccessor - ); - } - return void 0; - } - function createExpressionForPropertyAssignment(factory2, property, receiver) { - return setOriginalNode( - setTextRange( - factory2.createAssignment( - createMemberAccessForPropertyName( - factory2, - receiver, - property.name, - /*location*/ - property.name - ), - property.initializer - ), - property - ), - property - ); - } - function createExpressionForShorthandPropertyAssignment(factory2, property, receiver) { - return setOriginalNode( - setTextRange( - factory2.createAssignment( - createMemberAccessForPropertyName( - factory2, - receiver, - property.name, - /*location*/ - property.name - ), - factory2.cloneNode(property.name) - ), - /*location*/ - property - ), - /*original*/ - property - ); - } - function createExpressionForMethodDeclaration(factory2, method, receiver) { - return setOriginalNode( - setTextRange( - factory2.createAssignment( - createMemberAccessForPropertyName( - factory2, - receiver, - method.name, - /*location*/ - method.name - ), - setOriginalNode( - setTextRange( - factory2.createFunctionExpression( - getModifiers(method), - method.asteriskToken, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - method.parameters, - /*type*/ - void 0, - method.body - // TODO: GH#18217 - ), - /*location*/ - method - ), - /*original*/ - method - ) - ), - /*location*/ - method - ), - /*original*/ - method - ); - } - function createExpressionForObjectLiteralElementLike(factory2, node, property, receiver) { - if (property.name && isPrivateIdentifier(property.name)) { - Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals."); - } - switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return createExpressionForAccessorDeclaration(factory2, node.properties, property, receiver, !!node.multiLine); - case 303 /* PropertyAssignment */: - return createExpressionForPropertyAssignment(factory2, property, receiver); - case 304 /* ShorthandPropertyAssignment */: - return createExpressionForShorthandPropertyAssignment(factory2, property, receiver); - case 174 /* MethodDeclaration */: - return createExpressionForMethodDeclaration(factory2, property, receiver); - } - } - function expandPreOrPostfixIncrementOrDecrementExpression(factory2, node, expression, recordTempVariable, resultVariable) { - const operator = node.operator; - Debug.assert(operator === 46 /* PlusPlusToken */ || operator === 47 /* MinusMinusToken */, "Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression"); - const temp = factory2.createTempVariable(recordTempVariable); - expression = factory2.createAssignment(temp, expression); - setTextRange(expression, node.operand); - let operation = isPrefixUnaryExpression(node) ? factory2.createPrefixUnaryExpression(operator, temp) : factory2.createPostfixUnaryExpression(temp, operator); - setTextRange(operation, node); - if (resultVariable) { - operation = factory2.createAssignment(resultVariable, operation); - setTextRange(operation, node); - } - expression = factory2.createComma(expression, operation); - setTextRange(expression, node); - if (isPostfixUnaryExpression(node)) { - expression = factory2.createComma(expression, temp); - setTextRange(expression, node); - } - return expression; - } - function isInternalName(node) { - return (getEmitFlags(node) & 65536 /* InternalName */) !== 0; - } - function isLocalName(node) { - return (getEmitFlags(node) & 32768 /* LocalName */) !== 0; - } - function isExportName(node) { - return (getEmitFlags(node) & 16384 /* ExportName */) !== 0; - } - function isUseStrictPrologue(node) { - return isStringLiteral(node.expression) && node.expression.text === "use strict"; - } - function findUseStrictPrologue(statements) { - for (const statement of statements) { - if (isPrologueDirective(statement)) { - if (isUseStrictPrologue(statement)) { - return statement; - } - } else { - break; - } - } - return void 0; - } - function startsWithUseStrict(statements) { - const firstStatement = firstOrUndefined(statements); - return firstStatement !== void 0 && isPrologueDirective(firstStatement) && isUseStrictPrologue(firstStatement); - } - function isCommaExpression(node) { - return node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 28 /* CommaToken */; - } - function isCommaSequence(node) { - return isCommaExpression(node) || isCommaListExpression(node); - } - function isJSDocTypeAssertion(node) { - return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node); - } - function getJSDocTypeAssertionType(node) { - const type = getJSDocType(node); - Debug.assertIsDefined(type); - return type; - } - function isOuterExpression(node, kinds = 15 /* All */) { - switch (node.kind) { - case 217 /* ParenthesizedExpression */: - if (kinds & 16 /* ExcludeJSDocTypeAssertion */ && isJSDocTypeAssertion(node)) { - return false; - } - return (kinds & 1 /* Parentheses */) !== 0; - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - case 233 /* ExpressionWithTypeArguments */: - case 238 /* SatisfiesExpression */: - return (kinds & 2 /* TypeAssertions */) !== 0; - case 235 /* NonNullExpression */: - return (kinds & 4 /* NonNullAssertions */) !== 0; - case 360 /* PartiallyEmittedExpression */: - return (kinds & 8 /* PartiallyEmittedExpressions */) !== 0; - } - return false; - } - function skipOuterExpressions(node, kinds = 15 /* All */) { - while (isOuterExpression(node, kinds)) { - node = node.expression; - } - return node; - } - function walkUpOuterExpressions(node, kinds = 15 /* All */) { - let parent2 = node.parent; - while (isOuterExpression(parent2, kinds)) { - parent2 = parent2.parent; - Debug.assert(parent2); - } - return parent2; - } - function skipAssertions(node) { - return skipOuterExpressions(node, 6 /* Assertions */); - } - function startOnNewLine(node) { - return setStartsOnNewLine( - node, - /*newLine*/ - true - ); - } - function getExternalHelpersModuleName(node) { - const parseNode = getOriginalNode(node, isSourceFile); - const emitNode = parseNode && parseNode.emitNode; - return emitNode && emitNode.externalHelpersModuleName; - } - function hasRecordedExternalHelpers(sourceFile) { - const parseNode = getOriginalNode(sourceFile, isSourceFile); - const emitNode = parseNode && parseNode.emitNode; - return !!emitNode && (!!emitNode.externalHelpersModuleName || !!emitNode.externalHelpers); - } - function createExternalHelpersImportDeclarationIfNeeded(nodeFactory, helperFactory, sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar, hasImportDefault) { - if (compilerOptions.importHelpers && isEffectiveExternalModule(sourceFile, compilerOptions)) { - let namedBindings; - const moduleKind = getEmitModuleKind(compilerOptions); - if (moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */ || sourceFile.impliedNodeFormat === 99 /* ESNext */) { - const helpers = getEmitHelpers(sourceFile); - if (helpers) { - const helperNames = []; - for (const helper of helpers) { - if (!helper.scoped) { - const importName = helper.importName; - if (importName) { - pushIfUnique(helperNames, importName); - } - } - } - if (some(helperNames)) { - helperNames.sort(compareStringsCaseSensitive); - namedBindings = nodeFactory.createNamedImports( - map( - helperNames, - (name) => isFileLevelUniqueName(sourceFile, name) ? nodeFactory.createImportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ - void 0, - nodeFactory.createIdentifier(name) - ) : nodeFactory.createImportSpecifier( - /*isTypeOnly*/ - false, - nodeFactory.createIdentifier(name), - helperFactory.getUnscopedHelperName(name) - ) - ) - ); - const parseNode = getOriginalNode(sourceFile, isSourceFile); - const emitNode = getOrCreateEmitNode(parseNode); - emitNode.externalHelpers = true; - } - } - } else { - const externalHelpersModuleName = getOrCreateExternalHelpersModuleNameIfNeeded(nodeFactory, sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar || hasImportDefault); - if (externalHelpersModuleName) { - namedBindings = nodeFactory.createNamespaceImport(externalHelpersModuleName); - } - } - if (namedBindings) { - const externalHelpersImportDeclaration = nodeFactory.createImportDeclaration( - /*modifiers*/ - void 0, - nodeFactory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ - void 0, - namedBindings - ), - nodeFactory.createStringLiteral(externalHelpersModuleNameText), - /*assertClause*/ - void 0 - ); - addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */); - return externalHelpersImportDeclaration; - } - } - } - function getOrCreateExternalHelpersModuleNameIfNeeded(factory2, node, compilerOptions, hasExportStarsToExportValues, hasImportStarOrImportDefault) { - if (compilerOptions.importHelpers && isEffectiveExternalModule(node, compilerOptions)) { - const externalHelpersModuleName = getExternalHelpersModuleName(node); - if (externalHelpersModuleName) { - return externalHelpersModuleName; - } - const moduleKind = getEmitModuleKind(compilerOptions); - let create = (hasExportStarsToExportValues || getESModuleInterop(compilerOptions) && hasImportStarOrImportDefault) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || node.impliedNodeFormat === 1 /* CommonJS */); - if (!create) { - const helpers = getEmitHelpers(node); - if (helpers) { - for (const helper of helpers) { - if (!helper.scoped) { - create = true; - break; - } - } - } - } - if (create) { - const parseNode = getOriginalNode(node, isSourceFile); - const emitNode = getOrCreateEmitNode(parseNode); - return emitNode.externalHelpersModuleName || (emitNode.externalHelpersModuleName = factory2.createUniqueName(externalHelpersModuleNameText)); - } - } - } - function getLocalNameForExternalImport(factory2, node, sourceFile) { - const namespaceDeclaration = getNamespaceDeclarationNode(node); - if (namespaceDeclaration && !isDefaultImport(node) && !isExportNamespaceAsDefaultDeclaration(node)) { - const name = namespaceDeclaration.name; - return isGeneratedIdentifier(name) ? name : factory2.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); - } - if (node.kind === 272 /* ImportDeclaration */ && node.importClause) { - return factory2.getGeneratedNameForNode(node); - } - if (node.kind === 278 /* ExportDeclaration */ && node.moduleSpecifier) { - return factory2.getGeneratedNameForNode(node); - } - return void 0; - } - function getExternalModuleNameLiteral(factory2, importNode, sourceFile, host, resolver, compilerOptions) { - const moduleName = getExternalModuleName(importNode); - if (moduleName && isStringLiteral(moduleName)) { - return tryGetModuleNameFromDeclaration(importNode, host, factory2, resolver, compilerOptions) || tryRenameExternalModule(factory2, moduleName, sourceFile) || factory2.cloneNode(moduleName); - } - return void 0; - } - function tryRenameExternalModule(factory2, moduleName, sourceFile) { - const rename = sourceFile.renamedDependencies && sourceFile.renamedDependencies.get(moduleName.text); - return rename ? factory2.createStringLiteral(rename) : void 0; - } - function tryGetModuleNameFromFile(factory2, file, host, options) { - if (!file) { - return void 0; - } - if (file.moduleName) { - return factory2.createStringLiteral(file.moduleName); - } - if (!file.isDeclarationFile && outFile(options)) { - return factory2.createStringLiteral(getExternalModuleNameFromPath(host, file.fileName)); - } - return void 0; - } - function tryGetModuleNameFromDeclaration(declaration, host, factory2, resolver, compilerOptions) { - return tryGetModuleNameFromFile(factory2, resolver.getExternalModuleFileFromDeclaration(declaration), host, compilerOptions); - } - function getInitializerOfBindingOrAssignmentElement(bindingElement) { - if (isDeclarationBindingElement(bindingElement)) { - return bindingElement.initializer; - } - if (isPropertyAssignment(bindingElement)) { - const initializer = bindingElement.initializer; - return isAssignmentExpression( - initializer, - /*excludeCompoundAssignment*/ - true - ) ? initializer.right : void 0; - } - if (isShorthandPropertyAssignment(bindingElement)) { - return bindingElement.objectAssignmentInitializer; - } - if (isAssignmentExpression( - bindingElement, - /*excludeCompoundAssignment*/ - true - )) { - return bindingElement.right; - } - if (isSpreadElement(bindingElement)) { - return getInitializerOfBindingOrAssignmentElement(bindingElement.expression); - } - } - function getTargetOfBindingOrAssignmentElement(bindingElement) { - if (isDeclarationBindingElement(bindingElement)) { - return bindingElement.name; - } - if (isObjectLiteralElementLike(bindingElement)) { - switch (bindingElement.kind) { - case 303 /* PropertyAssignment */: - return getTargetOfBindingOrAssignmentElement(bindingElement.initializer); - case 304 /* ShorthandPropertyAssignment */: - return bindingElement.name; - case 305 /* SpreadAssignment */: - return getTargetOfBindingOrAssignmentElement(bindingElement.expression); - } - return void 0; - } - if (isAssignmentExpression( - bindingElement, - /*excludeCompoundAssignment*/ - true - )) { - return getTargetOfBindingOrAssignmentElement(bindingElement.left); - } - if (isSpreadElement(bindingElement)) { - return getTargetOfBindingOrAssignmentElement(bindingElement.expression); - } - return bindingElement; - } - function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) { - switch (bindingElement.kind) { - case 169 /* Parameter */: - case 208 /* BindingElement */: - return bindingElement.dotDotDotToken; - case 230 /* SpreadElement */: - case 305 /* SpreadAssignment */: - return bindingElement; - } - return void 0; - } - function getPropertyNameOfBindingOrAssignmentElement(bindingElement) { - const propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement); - Debug.assert(!!propertyName || isSpreadAssignment(bindingElement), "Invalid property name for binding element."); - return propertyName; - } - function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) { - switch (bindingElement.kind) { - case 208 /* BindingElement */: - if (bindingElement.propertyName) { - const propertyName = bindingElement.propertyName; - if (isPrivateIdentifier(propertyName)) { - return Debug.failBadSyntaxKind(propertyName); - } - return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; - } - break; - case 303 /* PropertyAssignment */: - if (bindingElement.name) { - const propertyName = bindingElement.name; - if (isPrivateIdentifier(propertyName)) { - return Debug.failBadSyntaxKind(propertyName); - } - return isComputedPropertyName(propertyName) && isStringOrNumericLiteral(propertyName.expression) ? propertyName.expression : propertyName; - } - break; - case 305 /* SpreadAssignment */: - if (bindingElement.name && isPrivateIdentifier(bindingElement.name)) { - return Debug.failBadSyntaxKind(bindingElement.name); - } - return bindingElement.name; - } - const target = getTargetOfBindingOrAssignmentElement(bindingElement); - if (target && isPropertyName(target)) { - return target; - } - } - function isStringOrNumericLiteral(node) { - const kind = node.kind; - return kind === 11 /* StringLiteral */ || kind === 9 /* NumericLiteral */; - } - function getElementsOfBindingOrAssignmentPattern(name) { - switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 209 /* ArrayLiteralExpression */: - return name.elements; - case 210 /* ObjectLiteralExpression */: - return name.properties; - } - } - function getJSDocTypeAliasName(fullName) { - if (fullName) { - let rightNode = fullName; - while (true) { - if (isIdentifier(rightNode) || !rightNode.body) { - return isIdentifier(rightNode) ? rightNode : rightNode.name; - } - rightNode = rightNode.body; - } - } - } - function canHaveIllegalType(node) { - const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 178 /* SetAccessor */; - } - function canHaveIllegalTypeParameters(node) { - const kind = node.kind; - return kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; - } - function canHaveIllegalDecorators(node) { - const kind = node.kind; - return kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 181 /* IndexSignature */ || kind === 175 /* ClassStaticBlockDeclaration */ || kind === 282 /* MissingDeclaration */ || kind === 243 /* VariableStatement */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 277 /* ExportAssignment */; - } - function canHaveIllegalModifiers(node) { - const kind = node.kind; - return kind === 175 /* ClassStaticBlockDeclaration */ || kind === 303 /* PropertyAssignment */ || kind === 304 /* ShorthandPropertyAssignment */ || kind === 282 /* MissingDeclaration */ || kind === 270 /* NamespaceExportDeclaration */; - } - function isQuestionOrExclamationToken(node) { - return isQuestionToken(node) || isExclamationToken(node); - } - function isIdentifierOrThisTypeNode(node) { - return isIdentifier(node) || isThisTypeNode(node); - } - function isReadonlyKeywordOrPlusOrMinusToken(node) { - return isReadonlyKeyword(node) || isPlusToken(node) || isMinusToken(node); - } - function isQuestionOrPlusOrMinusToken(node) { - return isQuestionToken(node) || isPlusToken(node) || isMinusToken(node); - } - function isModuleName(node) { - return isIdentifier(node) || isStringLiteral(node); - } - function isLiteralTypeLikeExpression(node) { - const kind = node.kind; - return kind === 106 /* NullKeyword */ || kind === 112 /* TrueKeyword */ || kind === 97 /* FalseKeyword */ || isLiteralExpression(node) || isPrefixUnaryExpression(node); - } - function isExponentiationOperator(kind) { - return kind === 43 /* AsteriskAsteriskToken */; - } - function isMultiplicativeOperator(kind) { - return kind === 42 /* AsteriskToken */ || kind === 44 /* SlashToken */ || kind === 45 /* PercentToken */; - } - function isMultiplicativeOperatorOrHigher(kind) { - return isExponentiationOperator(kind) || isMultiplicativeOperator(kind); - } - function isAdditiveOperator(kind) { - return kind === 40 /* PlusToken */ || kind === 41 /* MinusToken */; - } - function isAdditiveOperatorOrHigher(kind) { - return isAdditiveOperator(kind) || isMultiplicativeOperatorOrHigher(kind); - } - function isShiftOperator(kind) { - return kind === 48 /* LessThanLessThanToken */ || kind === 49 /* GreaterThanGreaterThanToken */ || kind === 50 /* GreaterThanGreaterThanGreaterThanToken */; - } - function isShiftOperatorOrHigher(kind) { - return isShiftOperator(kind) || isAdditiveOperatorOrHigher(kind); - } - function isRelationalOperator(kind) { - return kind === 30 /* LessThanToken */ || kind === 33 /* LessThanEqualsToken */ || kind === 32 /* GreaterThanToken */ || kind === 34 /* GreaterThanEqualsToken */ || kind === 104 /* InstanceOfKeyword */ || kind === 103 /* InKeyword */; - } - function isRelationalOperatorOrHigher(kind) { - return isRelationalOperator(kind) || isShiftOperatorOrHigher(kind); - } - function isEqualityOperator(kind) { - return kind === 35 /* EqualsEqualsToken */ || kind === 37 /* EqualsEqualsEqualsToken */ || kind === 36 /* ExclamationEqualsToken */ || kind === 38 /* ExclamationEqualsEqualsToken */; - } - function isEqualityOperatorOrHigher(kind) { - return isEqualityOperator(kind) || isRelationalOperatorOrHigher(kind); - } - function isBitwiseOperator(kind) { - return kind === 51 /* AmpersandToken */ || kind === 52 /* BarToken */ || kind === 53 /* CaretToken */; - } - function isBitwiseOperatorOrHigher(kind) { - return isBitwiseOperator(kind) || isEqualityOperatorOrHigher(kind); - } - function isLogicalOperator2(kind) { - return kind === 56 /* AmpersandAmpersandToken */ || kind === 57 /* BarBarToken */; - } - function isLogicalOperatorOrHigher(kind) { - return isLogicalOperator2(kind) || isBitwiseOperatorOrHigher(kind); - } - function isAssignmentOperatorOrHigher(kind) { - return kind === 61 /* QuestionQuestionToken */ || isLogicalOperatorOrHigher(kind) || isAssignmentOperator(kind); - } - function isBinaryOperator(kind) { - return isAssignmentOperatorOrHigher(kind) || kind === 28 /* CommaToken */; - } - function isBinaryOperatorToken(node) { - return isBinaryOperator(node.kind); - } - function createBinaryExpressionTrampoline(onEnter, onLeft, onOperator, onRight, onExit, foldState) { - const machine = new BinaryExpressionStateMachine(onEnter, onLeft, onOperator, onRight, onExit, foldState); - return trampoline; - function trampoline(node, outerState) { - const resultHolder = { value: void 0 }; - const stateStack = [BinaryExpressionState.enter]; - const nodeStack = [node]; - const userStateStack = [void 0]; - let stackIndex = 0; - while (stateStack[stackIndex] !== BinaryExpressionState.done) { - stackIndex = stateStack[stackIndex](machine, stackIndex, stateStack, nodeStack, userStateStack, resultHolder, outerState); - } - Debug.assertEqual(stackIndex, 0); - return resultHolder.value; - } - } - function isExportOrDefaultKeywordKind(kind) { - return kind === 95 /* ExportKeyword */ || kind === 90 /* DefaultKeyword */; - } - function isExportOrDefaultModifier(node) { - const kind = node.kind; - return isExportOrDefaultKeywordKind(kind); - } - function isNonExportDefaultModifier(node) { - const kind = node.kind; - return isModifierKind(kind) && !isExportOrDefaultKeywordKind(kind); - } - function elideNodes(factory2, nodes) { - if (nodes === void 0) - return void 0; - if (nodes.length === 0) - return nodes; - return setTextRange(factory2.createNodeArray([], nodes.hasTrailingComma), nodes); - } - function getNodeForGeneratedName(name) { - var _a; - const autoGenerate = name.emitNode.autoGenerate; - if (autoGenerate.flags & 4 /* Node */) { - const autoGenerateId = autoGenerate.id; - let node = name; - let original = node.original; - while (original) { - node = original; - const autoGenerate2 = (_a = node.emitNode) == null ? void 0 : _a.autoGenerate; - if (isMemberName(node) && (autoGenerate2 === void 0 || !!(autoGenerate2.flags & 4 /* Node */) && autoGenerate2.id !== autoGenerateId)) { - break; - } - original = node.original; - } - return node; - } - return name; - } - function formatGeneratedNamePart(part, generateName) { - return typeof part === "object" ? formatGeneratedName( - /*privateName*/ - false, - part.prefix, - part.node, - part.suffix, - generateName - ) : typeof part === "string" ? part.length > 0 && part.charCodeAt(0) === 35 /* hash */ ? part.slice(1) : part : ""; - } - function formatIdentifier(name, generateName) { - return typeof name === "string" ? name : formatIdentifierWorker(name, Debug.checkDefined(generateName)); - } - function formatIdentifierWorker(node, generateName) { - return isGeneratedPrivateIdentifier(node) ? generateName(node).slice(1) : isGeneratedIdentifier(node) ? generateName(node) : isPrivateIdentifier(node) ? node.escapedText.slice(1) : idText(node); - } - function formatGeneratedName(privateName, prefix, baseName, suffix, generateName) { - prefix = formatGeneratedNamePart(prefix, generateName); - suffix = formatGeneratedNamePart(suffix, generateName); - baseName = formatIdentifier(baseName, generateName); - return `${privateName ? "#" : ""}${prefix}${baseName}${suffix}`; - } - function createAccessorPropertyBackingField(factory2, node, modifiers, initializer) { - return factory2.updatePropertyDeclaration( - node, - modifiers, - factory2.getGeneratedPrivateNameForNode( - node.name, - /*prefix*/ - void 0, - "_accessor_storage" - ), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); - } - function createAccessorPropertyGetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { - return factory2.createGetAccessorDeclaration( - modifiers, - name, - [], - /*type*/ - void 0, - factory2.createBlock([ - factory2.createReturnStatement( - factory2.createPropertyAccessExpression( - receiver, - factory2.getGeneratedPrivateNameForNode( - node.name, - /*prefix*/ - void 0, - "_accessor_storage" - ) - ) - ) - ]) - ); - } - function createAccessorPropertySetRedirector(factory2, node, modifiers, name, receiver = factory2.createThis()) { - return factory2.createSetAccessorDeclaration( - modifiers, - name, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "value" - )], - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.createPropertyAccessExpression( - receiver, - factory2.getGeneratedPrivateNameForNode( - node.name, - /*prefix*/ - void 0, - "_accessor_storage" - ) - ), - factory2.createIdentifier("value") - ) - ) - ]) - ); - } - function findComputedPropertyNameCacheAssignment(name) { - let node = name.expression; - while (true) { - node = skipOuterExpressions(node); - if (isCommaListExpression(node)) { - node = last(node.elements); - continue; - } - if (isCommaExpression(node)) { - node = node.right; - continue; - } - if (isAssignmentExpression( - node, - /*excludeCompoundAssignment*/ - true - ) && isGeneratedIdentifier(node.left)) { - return node; - } - break; - } - } - function isSyntheticParenthesizedExpression(node) { - return isParenthesizedExpression(node) && nodeIsSynthesized(node) && !node.emitNode; - } - function flattenCommaListWorker(node, expressions) { - if (isSyntheticParenthesizedExpression(node)) { - flattenCommaListWorker(node.expression, expressions); - } else if (isCommaExpression(node)) { - flattenCommaListWorker(node.left, expressions); - flattenCommaListWorker(node.right, expressions); - } else if (isCommaListExpression(node)) { - for (const child of node.elements) { - flattenCommaListWorker(child, expressions); - } - } else { - expressions.push(node); - } - } - function flattenCommaList(node) { - const expressions = []; - flattenCommaListWorker(node, expressions); - return expressions; - } - function containsObjectRestOrSpread(node) { - if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) - return true; - if (node.transformFlags & 128 /* ContainsES2018 */) { - for (const element of getElementsOfBindingOrAssignmentPattern(node)) { - const target = getTargetOfBindingOrAssignmentElement(element); - if (target && isAssignmentPattern(target)) { - if (target.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { - return true; - } - if (target.transformFlags & 128 /* ContainsES2018 */) { - if (containsObjectRestOrSpread(target)) - return true; - } - } - } - } - return false; - } - var BinaryExpressionState, BinaryExpressionStateMachine; - var init_utilities2 = __esm({ - "src/compiler/factory/utilities.ts"() { - "use strict"; - init_ts2(); - ((BinaryExpressionState2) => { - function enter(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, outerState) { - const prevUserState = stackIndex > 0 ? userStateStack[stackIndex - 1] : void 0; - Debug.assertEqual(stateStack[stackIndex], enter); - userStateStack[stackIndex] = machine.onEnter(nodeStack[stackIndex], prevUserState, outerState); - stateStack[stackIndex] = nextState(machine, enter); - return stackIndex; - } - BinaryExpressionState2.enter = enter; - function left(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, _outerState) { - Debug.assertEqual(stateStack[stackIndex], left); - Debug.assertIsDefined(machine.onLeft); - stateStack[stackIndex] = nextState(machine, left); - const nextNode = machine.onLeft(nodeStack[stackIndex].left, userStateStack[stackIndex], nodeStack[stackIndex]); - if (nextNode) { - checkCircularity(stackIndex, nodeStack, nextNode); - return pushStack(stackIndex, stateStack, nodeStack, userStateStack, nextNode); - } - return stackIndex; - } - BinaryExpressionState2.left = left; - function operator(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, _outerState) { - Debug.assertEqual(stateStack[stackIndex], operator); - Debug.assertIsDefined(machine.onOperator); - stateStack[stackIndex] = nextState(machine, operator); - machine.onOperator(nodeStack[stackIndex].operatorToken, userStateStack[stackIndex], nodeStack[stackIndex]); - return stackIndex; - } - BinaryExpressionState2.operator = operator; - function right(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, _outerState) { - Debug.assertEqual(stateStack[stackIndex], right); - Debug.assertIsDefined(machine.onRight); - stateStack[stackIndex] = nextState(machine, right); - const nextNode = machine.onRight(nodeStack[stackIndex].right, userStateStack[stackIndex], nodeStack[stackIndex]); - if (nextNode) { - checkCircularity(stackIndex, nodeStack, nextNode); - return pushStack(stackIndex, stateStack, nodeStack, userStateStack, nextNode); - } - return stackIndex; - } - BinaryExpressionState2.right = right; - function exit(machine, stackIndex, stateStack, nodeStack, userStateStack, resultHolder, _outerState) { - Debug.assertEqual(stateStack[stackIndex], exit); - stateStack[stackIndex] = nextState(machine, exit); - const result = machine.onExit(nodeStack[stackIndex], userStateStack[stackIndex]); - if (stackIndex > 0) { - stackIndex--; - if (machine.foldState) { - const side = stateStack[stackIndex] === exit ? "right" : "left"; - userStateStack[stackIndex] = machine.foldState(userStateStack[stackIndex], result, side); - } - } else { - resultHolder.value = result; - } - return stackIndex; - } - BinaryExpressionState2.exit = exit; - function done(_machine, stackIndex, stateStack, _nodeStack, _userStateStack, _resultHolder, _outerState) { - Debug.assertEqual(stateStack[stackIndex], done); - return stackIndex; - } - BinaryExpressionState2.done = done; - function nextState(machine, currentState) { - switch (currentState) { - case enter: - if (machine.onLeft) - return left; - case left: - if (machine.onOperator) - return operator; - case operator: - if (machine.onRight) - return right; - case right: - return exit; - case exit: - return done; - case done: - return done; - default: - Debug.fail("Invalid state"); - } - } - BinaryExpressionState2.nextState = nextState; - function pushStack(stackIndex, stateStack, nodeStack, userStateStack, node) { - stackIndex++; - stateStack[stackIndex] = enter; - nodeStack[stackIndex] = node; - userStateStack[stackIndex] = void 0; - return stackIndex; - } - function checkCircularity(stackIndex, nodeStack, node) { - if (Debug.shouldAssert(2 /* Aggressive */)) { - while (stackIndex >= 0) { - Debug.assert(nodeStack[stackIndex] !== node, "Circular traversal detected."); - stackIndex--; - } - } - } - })(BinaryExpressionState || (BinaryExpressionState = {})); - BinaryExpressionStateMachine = class { - constructor(onEnter, onLeft, onOperator, onRight, onExit, foldState) { - this.onEnter = onEnter; - this.onLeft = onLeft; - this.onOperator = onOperator; - this.onRight = onRight; - this.onExit = onExit; - this.foldState = foldState; - } - }; - } - }); - - // src/compiler/factory/utilitiesPublic.ts - function setTextRange(range, location) { - return location ? setTextRangePosEnd(range, location.pos, location.end) : range; - } - function canHaveModifiers(node) { - const kind = node.kind; - return kind === 168 /* TypeParameter */ || kind === 169 /* Parameter */ || kind === 171 /* PropertySignature */ || kind === 172 /* PropertyDeclaration */ || kind === 173 /* MethodSignature */ || kind === 174 /* MethodDeclaration */ || kind === 176 /* Constructor */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 181 /* IndexSignature */ || kind === 185 /* ConstructorType */ || kind === 218 /* FunctionExpression */ || kind === 219 /* ArrowFunction */ || kind === 231 /* ClassExpression */ || kind === 243 /* VariableStatement */ || kind === 262 /* FunctionDeclaration */ || kind === 263 /* ClassDeclaration */ || kind === 264 /* InterfaceDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 266 /* EnumDeclaration */ || kind === 267 /* ModuleDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 277 /* ExportAssignment */ || kind === 278 /* ExportDeclaration */; - } - function canHaveDecorators(node) { - const kind = node.kind; - return kind === 169 /* Parameter */ || kind === 172 /* PropertyDeclaration */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 231 /* ClassExpression */ || kind === 263 /* ClassDeclaration */; - } - var init_utilitiesPublic2 = __esm({ - "src/compiler/factory/utilitiesPublic.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/parser.ts - function visitNode2(cbNode, node) { - return node && cbNode(node); - } - function visitNodes(cbNode, cbNodes, nodes) { - if (nodes) { - if (cbNodes) { - return cbNodes(nodes); - } - for (const node of nodes) { - const result = cbNode(node); - if (result) { - return result; - } - } - } - } - function isJSDocLikeText(text, start) { - return text.charCodeAt(start + 1) === 42 /* asterisk */ && text.charCodeAt(start + 2) === 42 /* asterisk */ && text.charCodeAt(start + 3) !== 47 /* slash */; - } - function isFileProbablyExternalModule(sourceFile) { - return forEach(sourceFile.statements, isAnExternalModuleIndicatorNode) || getImportMetaIfNecessary(sourceFile); - } - function isAnExternalModuleIndicatorNode(node) { - return canHaveModifiers(node) && hasModifierOfKind(node, 95 /* ExportKeyword */) || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) || isImportDeclaration(node) || isExportAssignment(node) || isExportDeclaration(node) ? node : void 0; - } - function getImportMetaIfNecessary(sourceFile) { - return sourceFile.flags & 8388608 /* PossiblyContainsImportMeta */ ? walkTreeForImportMeta(sourceFile) : void 0; - } - function walkTreeForImportMeta(node) { - return isImportMeta2(node) ? node : forEachChild(node, walkTreeForImportMeta); - } - function hasModifierOfKind(node, kind) { - return some(node.modifiers, (m) => m.kind === kind); - } - function isImportMeta2(node) { - return isMetaProperty(node) && node.keywordToken === 102 /* ImportKeyword */ && node.name.escapedText === "meta"; - } - function forEachChildInCallOrConstructSignature(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); - } - function forEachChildInUnionOrIntersectionType(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.types); - } - function forEachChildInParenthesizedTypeOrTypeOperator(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.type); - } - function forEachChildInObjectOrArrayBindingPattern(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.elements); - } - function forEachChildInCallOrNewExpression(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.expression) || // TODO: should we separate these branches out? - visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNodes(cbNode, cbNodes, node.arguments); - } - function forEachChildInBlock(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.statements); - } - function forEachChildInContinueOrBreakStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.label); - } - function forEachChildInClassDeclarationOrExpression(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); - } - function forEachChildInNamedImportsOrExports(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.elements); - } - function forEachChildInImportOrExportSpecifier(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name); - } - function forEachChildInJsxOpeningOrSelfClosingElement(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.attributes); - } - function forEachChildInOptionalRestOrJSDocParameterModifier(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.type); - } - function forEachChildInJSDocParameterOrPropertyTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.isNameFirst ? visitNode2(cbNode, node.name) || visitNode2(cbNode, node.typeExpression) : visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.name)) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); - } - function forEachChildInJSDocTypeLikeTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); - } - function forEachChildInJSDocLinkCodeOrPlain(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name); - } - function forEachChildInJSDocTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); - } - function forEachChildInPartiallyEmittedExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - } - function forEachChild(node, cbNode, cbNodes) { - if (node === void 0 || node.kind <= 165 /* LastToken */) { - return; - } - const fn = forEachChildTable[node.kind]; - return fn === void 0 ? void 0 : fn(node, cbNode, cbNodes); - } - function forEachChildRecursively(rootNode, cbNode, cbNodes) { - const queue = gatherPossibleChildren(rootNode); - const parents = []; - while (parents.length < queue.length) { - parents.push(rootNode); - } - while (queue.length !== 0) { - const current = queue.pop(); - const parent2 = parents.pop(); - if (isArray(current)) { - if (cbNodes) { - const res = cbNodes(current, parent2); - if (res) { - if (res === "skip") - continue; - return res; - } - } - for (let i = current.length - 1; i >= 0; --i) { - queue.push(current[i]); - parents.push(parent2); - } - } else { - const res = cbNode(current, parent2); - if (res) { - if (res === "skip") - continue; - return res; - } - if (current.kind >= 166 /* FirstNode */) { - for (const child of gatherPossibleChildren(current)) { - queue.push(child); - parents.push(current); - } - } - } - } - } - function gatherPossibleChildren(node) { - const children = []; - forEachChild(node, addWorkItem, addWorkItem); - return children; - function addWorkItem(n) { - children.unshift(n); - } - } - function setExternalModuleIndicator(sourceFile) { - sourceFile.externalModuleIndicator = isFileProbablyExternalModule(sourceFile); - } - function createSourceFile(fileName, sourceText, languageVersionOrOptions, setParentNodes = false, scriptKind) { - var _a, _b, _c, _d; - (_a = tracing) == null ? void 0 : _a.push( - tracing.Phase.Parse, - "createSourceFile", - { path: fileName }, - /*separateBeginAndEnd*/ - true - ); - mark("beforeParse"); - let result; - (_b = perfLogger) == null ? void 0 : _b.logStartParseSourceFile(fileName); - const { - languageVersion, - setExternalModuleIndicator: overrideSetExternalModuleIndicator, - impliedNodeFormat: format - } = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { languageVersion: languageVersionOrOptions }; - if (languageVersion === 100 /* JSON */) { - result = Parser.parseSourceFile( - fileName, - sourceText, - languageVersion, - /*syntaxCursor*/ - void 0, - setParentNodes, - 6 /* JSON */, - noop - ); - } else { - const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => { - file.impliedNodeFormat = format; - return (overrideSetExternalModuleIndicator || setExternalModuleIndicator)(file); - }; - result = Parser.parseSourceFile( - fileName, - sourceText, - languageVersion, - /*syntaxCursor*/ - void 0, - setParentNodes, - scriptKind, - setIndicator - ); - } - (_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile(); - mark("afterParse"); - measure("Parse", "beforeParse", "afterParse"); - (_d = tracing) == null ? void 0 : _d.pop(); - return result; - } - function parseIsolatedEntityName(text, languageVersion) { - return Parser.parseIsolatedEntityName(text, languageVersion); - } - function parseJsonText(fileName, sourceText) { - return Parser.parseJsonText(fileName, sourceText); - } - function isExternalModule(file) { - return file.externalModuleIndicator !== void 0; - } - function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks = false) { - const newSourceFile = IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks); - newSourceFile.flags |= sourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */; - return newSourceFile; - } - function parseIsolatedJSDocComment(content, start, length2) { - const result = Parser.JSDocParser.parseIsolatedJSDocComment(content, start, length2); - if (result && result.jsDoc) { - Parser.fixupParentReferences(result.jsDoc); - } - return result; - } - function parseJSDocTypeExpressionForTests(content, start, length2) { - return Parser.JSDocParser.parseJSDocTypeExpressionForTests(content, start, length2); - } - function isDeclarationFileName(fileName) { - return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && stringContains(getBaseFileName(fileName), ".d."); - } - function parseResolutionMode(mode, pos, end, reportDiagnostic) { - if (!mode) { - return void 0; - } - if (mode === "import") { - return 99 /* ESNext */; - } - if (mode === "require") { - return 1 /* CommonJS */; - } - reportDiagnostic(pos, end - pos, Diagnostics.resolution_mode_should_be_either_require_or_import); - return void 0; - } - function processCommentPragmas(context, sourceText) { - const pragmas = []; - for (const range of getLeadingCommentRanges(sourceText, 0) || emptyArray) { - const comment = sourceText.substring(range.pos, range.end); - extractPragmas(pragmas, range, comment); - } - context.pragmas = /* @__PURE__ */ new Map(); - for (const pragma of pragmas) { - if (context.pragmas.has(pragma.name)) { - const currentValue = context.pragmas.get(pragma.name); - if (currentValue instanceof Array) { - currentValue.push(pragma.args); - } else { - context.pragmas.set(pragma.name, [currentValue, pragma.args]); - } - continue; - } - context.pragmas.set(pragma.name, pragma.args); - } - } - function processPragmasIntoFields(context, reportDiagnostic) { - context.checkJsDirective = void 0; - context.referencedFiles = []; - context.typeReferenceDirectives = []; - context.libReferenceDirectives = []; - context.amdDependencies = []; - context.hasNoDefaultLib = false; - context.pragmas.forEach((entryOrList, key) => { - switch (key) { - case "reference": { - const referencedFiles = context.referencedFiles; - const typeReferenceDirectives = context.typeReferenceDirectives; - const libReferenceDirectives = context.libReferenceDirectives; - forEach(toArray(entryOrList), (arg) => { - const { types, lib, path, ["resolution-mode"]: res } = arg.arguments; - if (arg.arguments["no-default-lib"]) { - context.hasNoDefaultLib = true; - } else if (types) { - const parsed = parseResolutionMode(res, types.pos, types.end, reportDiagnostic); - typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {} }); - } else if (lib) { - libReferenceDirectives.push({ pos: lib.pos, end: lib.end, fileName: lib.value }); - } else if (path) { - referencedFiles.push({ pos: path.pos, end: path.end, fileName: path.value }); - } else { - reportDiagnostic(arg.range.pos, arg.range.end - arg.range.pos, Diagnostics.Invalid_reference_directive_syntax); - } - }); - break; - } - case "amd-dependency": { - context.amdDependencies = map( - toArray(entryOrList), - (x) => ({ name: x.arguments.name, path: x.arguments.path }) - ); - break; - } - case "amd-module": { - if (entryOrList instanceof Array) { - for (const entry of entryOrList) { - if (context.moduleName) { - reportDiagnostic(entry.range.pos, entry.range.end - entry.range.pos, Diagnostics.An_AMD_module_cannot_have_multiple_name_assignments); - } - context.moduleName = entry.arguments.name; - } - } else { - context.moduleName = entryOrList.arguments.name; - } - break; - } - case "ts-nocheck": - case "ts-check": { - forEach(toArray(entryOrList), (entry) => { - if (!context.checkJsDirective || entry.range.pos > context.checkJsDirective.pos) { - context.checkJsDirective = { - enabled: key === "ts-check", - end: entry.range.end, - pos: entry.range.pos - }; - } - }); - break; - } - case "jsx": - case "jsxfrag": - case "jsximportsource": - case "jsxruntime": - return; - default: - Debug.fail("Unhandled pragma kind"); - } - }); - } - function getNamedArgRegEx(name) { - if (namedArgRegExCache.has(name)) { - return namedArgRegExCache.get(name); - } - const result = new RegExp(`(\\s${name}\\s*=\\s*)(?:(?:'([^']*)')|(?:"([^"]*)"))`, "im"); - namedArgRegExCache.set(name, result); - return result; - } - function extractPragmas(pragmas, range, text) { - const tripleSlash = range.kind === 2 /* SingleLineCommentTrivia */ && tripleSlashXMLCommentStartRegEx.exec(text); - if (tripleSlash) { - const name = tripleSlash[1].toLowerCase(); - const pragma = commentPragmas[name]; - if (!pragma || !(pragma.kind & 1 /* TripleSlashXML */)) { - return; - } - if (pragma.args) { - const argument = {}; - for (const arg of pragma.args) { - const matcher = getNamedArgRegEx(arg.name); - const matchResult = matcher.exec(text); - if (!matchResult && !arg.optional) { - return; - } else if (matchResult) { - const value = matchResult[2] || matchResult[3]; - if (arg.captureSpan) { - const startPos = range.pos + matchResult.index + matchResult[1].length + 1; - argument[arg.name] = { - value, - pos: startPos, - end: startPos + value.length - }; - } else { - argument[arg.name] = value; - } - } - } - pragmas.push({ name, args: { arguments: argument, range } }); - } else { - pragmas.push({ name, args: { arguments: {}, range } }); - } - return; - } - const singleLine = range.kind === 2 /* SingleLineCommentTrivia */ && singleLinePragmaRegEx.exec(text); - if (singleLine) { - return addPragmaForMatch(pragmas, range, 2 /* SingleLine */, singleLine); - } - if (range.kind === 3 /* MultiLineCommentTrivia */) { - const multiLinePragmaRegEx = /@(\S+)(\s+.*)?$/gim; - let multiLineMatch; - while (multiLineMatch = multiLinePragmaRegEx.exec(text)) { - addPragmaForMatch(pragmas, range, 4 /* MultiLine */, multiLineMatch); - } - } - } - function addPragmaForMatch(pragmas, range, kind, match) { - if (!match) - return; - const name = match[1].toLowerCase(); - const pragma = commentPragmas[name]; - if (!pragma || !(pragma.kind & kind)) { - return; - } - const args = match[2]; - const argument = getNamedPragmaArguments(pragma, args); - if (argument === "fail") - return; - pragmas.push({ name, args: { arguments: argument, range } }); - return; - } - function getNamedPragmaArguments(pragma, text) { - if (!text) - return {}; - if (!pragma.args) - return {}; - const args = trimString(text).split(/\s+/); - const argMap = {}; - for (let i = 0; i < pragma.args.length; i++) { - const argument = pragma.args[i]; - if (!args[i] && !argument.optional) { - return "fail"; - } - if (argument.captureSpan) { - return Debug.fail("Capture spans not yet implemented for non-xml pragmas"); - } - argMap[argument.name] = args[i]; - } - return argMap; - } - function tagNamesAreEquivalent(lhs, rhs) { - if (lhs.kind !== rhs.kind) { - return false; - } - if (lhs.kind === 80 /* Identifier */) { - return lhs.escapedText === rhs.escapedText; - } - if (lhs.kind === 110 /* ThisKeyword */) { - return true; - } - if (lhs.kind === 295 /* JsxNamespacedName */) { - return lhs.namespace.escapedText === rhs.namespace.escapedText && lhs.name.escapedText === rhs.name.escapedText; - } - return lhs.name.escapedText === rhs.name.escapedText && tagNamesAreEquivalent(lhs.expression, rhs.expression); - } - var NodeConstructor, TokenConstructor, IdentifierConstructor, PrivateIdentifierConstructor, SourceFileConstructor, parseBaseNodeFactory, parseNodeFactory, forEachChildTable, Parser, IncrementalParser, namedArgRegExCache, tripleSlashXMLCommentStartRegEx, singleLinePragmaRegEx; - var init_parser = __esm({ - "src/compiler/parser.ts"() { - "use strict"; - init_ts2(); - init_ts_performance(); - parseBaseNodeFactory = { - createBaseSourceFileNode: (kind) => new (SourceFileConstructor || (SourceFileConstructor = objectAllocator.getSourceFileConstructor()))(kind, -1, -1), - createBaseIdentifierNode: (kind) => new (IdentifierConstructor || (IdentifierConstructor = objectAllocator.getIdentifierConstructor()))(kind, -1, -1), - createBasePrivateIdentifierNode: (kind) => new (PrivateIdentifierConstructor || (PrivateIdentifierConstructor = objectAllocator.getPrivateIdentifierConstructor()))(kind, -1, -1), - createBaseTokenNode: (kind) => new (TokenConstructor || (TokenConstructor = objectAllocator.getTokenConstructor()))(kind, -1, -1), - createBaseNode: (kind) => new (NodeConstructor || (NodeConstructor = objectAllocator.getNodeConstructor()))(kind, -1, -1) - }; - parseNodeFactory = createNodeFactory(1 /* NoParenthesizerRules */, parseBaseNodeFactory); - forEachChildTable = { - [166 /* QualifiedName */]: function forEachChildInQualifiedName(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); - }, - [168 /* TypeParameter */]: function forEachChildInTypeParameter(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.constraint) || visitNode2(cbNode, node.default) || visitNode2(cbNode, node.expression); - }, - [304 /* ShorthandPropertyAssignment */]: function forEachChildInShorthandPropertyAssignment(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.equalsToken) || visitNode2(cbNode, node.objectAssignmentInitializer); - }, - [305 /* SpreadAssignment */]: function forEachChildInSpreadAssignment(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [169 /* Parameter */]: function forEachChildInParameter(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); - }, - [172 /* PropertyDeclaration */]: function forEachChildInPropertyDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); - }, - [171 /* PropertySignature */]: function forEachChildInPropertySignature(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); - }, - [303 /* PropertyAssignment */]: function forEachChildInPropertyAssignment(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.initializer); - }, - [260 /* VariableDeclaration */]: function forEachChildInVariableDeclaration(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.exclamationToken) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.initializer); - }, - [208 /* BindingElement */]: function forEachChildInBindingElement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.propertyName) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); - }, - [181 /* IndexSignature */]: function forEachChildInIndexSignature(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); - }, - [185 /* ConstructorType */]: function forEachChildInConstructorType(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); - }, - [184 /* FunctionType */]: function forEachChildInFunctionType(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); - }, - [179 /* CallSignature */]: forEachChildInCallOrConstructSignature, - [180 /* ConstructSignature */]: forEachChildInCallOrConstructSignature, - [174 /* MethodDeclaration */]: function forEachChildInMethodDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.exclamationToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); - }, - [173 /* MethodSignature */]: function forEachChildInMethodSignature(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); - }, - [176 /* Constructor */]: function forEachChildInConstructor(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); - }, - [177 /* GetAccessor */]: function forEachChildInGetAccessor(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); - }, - [178 /* SetAccessor */]: function forEachChildInSetAccessor(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); - }, - [262 /* FunctionDeclaration */]: function forEachChildInFunctionDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); - }, - [218 /* FunctionExpression */]: function forEachChildInFunctionExpression(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.body); - }, - [219 /* ArrowFunction */]: function forEachChildInArrowFunction(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type) || visitNode2(cbNode, node.equalsGreaterThanToken) || visitNode2(cbNode, node.body); - }, - [175 /* ClassStaticBlockDeclaration */]: function forEachChildInClassStaticBlockDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.body); - }, - [183 /* TypeReference */]: function forEachChildInTypeReference(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.typeName) || visitNodes(cbNode, cbNodes, node.typeArguments); - }, - [182 /* TypePredicate */]: function forEachChildInTypePredicate(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.assertsModifier) || visitNode2(cbNode, node.parameterName) || visitNode2(cbNode, node.type); - }, - [186 /* TypeQuery */]: function forEachChildInTypeQuery(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.exprName) || visitNodes(cbNode, cbNodes, node.typeArguments); - }, - [187 /* TypeLiteral */]: function forEachChildInTypeLiteral(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.members); - }, - [188 /* ArrayType */]: function forEachChildInArrayType(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.elementType); - }, - [189 /* TupleType */]: function forEachChildInTupleType(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.elements); - }, - [192 /* UnionType */]: forEachChildInUnionOrIntersectionType, - [193 /* IntersectionType */]: forEachChildInUnionOrIntersectionType, - [194 /* ConditionalType */]: function forEachChildInConditionalType(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.checkType) || visitNode2(cbNode, node.extendsType) || visitNode2(cbNode, node.trueType) || visitNode2(cbNode, node.falseType); - }, - [195 /* InferType */]: function forEachChildInInferType(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.typeParameter); - }, - [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); - }, - [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.assertClause); - }, - [196 /* ParenthesizedType */]: forEachChildInParenthesizedTypeOrTypeOperator, - [198 /* TypeOperator */]: forEachChildInParenthesizedTypeOrTypeOperator, - [199 /* IndexedAccessType */]: function forEachChildInIndexedAccessType(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.objectType) || visitNode2(cbNode, node.indexType); - }, - [200 /* MappedType */]: function forEachChildInMappedType(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.readonlyToken) || visitNode2(cbNode, node.typeParameter) || visitNode2(cbNode, node.nameType) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type) || visitNodes(cbNode, cbNodes, node.members); - }, - [201 /* LiteralType */]: function forEachChildInLiteralType(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.literal); - }, - [202 /* NamedTupleMember */]: function forEachChildInNamedTupleMember(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.type); - }, - [206 /* ObjectBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [207 /* ArrayBindingPattern */]: forEachChildInObjectOrArrayBindingPattern, - [209 /* ArrayLiteralExpression */]: function forEachChildInArrayLiteralExpression(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.elements); - }, - [210 /* ObjectLiteralExpression */]: function forEachChildInObjectLiteralExpression(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.properties); - }, - [211 /* PropertyAccessExpression */]: function forEachChildInPropertyAccessExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.name); - }, - [212 /* ElementAccessExpression */]: function forEachChildInElementAccessExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.questionDotToken) || visitNode2(cbNode, node.argumentExpression); - }, - [213 /* CallExpression */]: forEachChildInCallOrNewExpression, - [214 /* NewExpression */]: forEachChildInCallOrNewExpression, - [215 /* TaggedTemplateExpression */]: function forEachChildInTaggedTemplateExpression(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tag) || visitNode2(cbNode, node.questionDotToken) || visitNodes(cbNode, cbNodes, node.typeArguments) || visitNode2(cbNode, node.template); - }, - [216 /* TypeAssertionExpression */]: function forEachChildInTypeAssertionExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.expression); - }, - [217 /* ParenthesizedExpression */]: function forEachChildInParenthesizedExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [220 /* DeleteExpression */]: function forEachChildInDeleteExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [221 /* TypeOfExpression */]: function forEachChildInTypeOfExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [222 /* VoidExpression */]: function forEachChildInVoidExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [224 /* PrefixUnaryExpression */]: function forEachChildInPrefixUnaryExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.operand); - }, - [229 /* YieldExpression */]: function forEachChildInYieldExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.asteriskToken) || visitNode2(cbNode, node.expression); - }, - [223 /* AwaitExpression */]: function forEachChildInAwaitExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [225 /* PostfixUnaryExpression */]: function forEachChildInPostfixUnaryExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.operand); - }, - [226 /* BinaryExpression */]: function forEachChildInBinaryExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.operatorToken) || visitNode2(cbNode, node.right); - }, - [234 /* AsExpression */]: function forEachChildInAsExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); - }, - [235 /* NonNullExpression */]: function forEachChildInNonNullExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [238 /* SatisfiesExpression */]: function forEachChildInSatisfiesExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.type); - }, - [236 /* MetaProperty */]: function forEachChildInMetaProperty(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name); - }, - [227 /* ConditionalExpression */]: function forEachChildInConditionalExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.questionToken) || visitNode2(cbNode, node.whenTrue) || visitNode2(cbNode, node.colonToken) || visitNode2(cbNode, node.whenFalse); - }, - [230 /* SpreadElement */]: function forEachChildInSpreadElement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [241 /* Block */]: forEachChildInBlock, - [268 /* ModuleBlock */]: forEachChildInBlock, - [312 /* SourceFile */]: function forEachChildInSourceFile(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.statements) || visitNode2(cbNode, node.endOfFileToken); - }, - [243 /* VariableStatement */]: function forEachChildInVariableStatement(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.declarationList); - }, - [261 /* VariableDeclarationList */]: function forEachChildInVariableDeclarationList(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.declarations); - }, - [244 /* ExpressionStatement */]: function forEachChildInExpressionStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [245 /* IfStatement */]: function forEachChildInIfStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.thenStatement) || visitNode2(cbNode, node.elseStatement); - }, - [246 /* DoStatement */]: function forEachChildInDoStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.statement) || visitNode2(cbNode, node.expression); - }, - [247 /* WhileStatement */]: function forEachChildInWhileStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); - }, - [248 /* ForStatement */]: function forEachChildInForStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.condition) || visitNode2(cbNode, node.incrementor) || visitNode2(cbNode, node.statement); - }, - [249 /* ForInStatement */]: function forEachChildInForInStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); - }, - [250 /* ForOfStatement */]: function forEachChildInForOfStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.awaitModifier) || visitNode2(cbNode, node.initializer) || visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); - }, - [251 /* ContinueStatement */]: forEachChildInContinueOrBreakStatement, - [252 /* BreakStatement */]: forEachChildInContinueOrBreakStatement, - [253 /* ReturnStatement */]: function forEachChildInReturnStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [254 /* WithStatement */]: function forEachChildInWithStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.statement); - }, - [255 /* SwitchStatement */]: function forEachChildInSwitchStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.caseBlock); - }, - [269 /* CaseBlock */]: function forEachChildInCaseBlock(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.clauses); - }, - [296 /* CaseClause */]: function forEachChildInCaseClause(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.statements); - }, - [297 /* DefaultClause */]: function forEachChildInDefaultClause(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.statements); - }, - [256 /* LabeledStatement */]: function forEachChildInLabeledStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.label) || visitNode2(cbNode, node.statement); - }, - [257 /* ThrowStatement */]: function forEachChildInThrowStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [258 /* TryStatement */]: function forEachChildInTryStatement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.tryBlock) || visitNode2(cbNode, node.catchClause) || visitNode2(cbNode, node.finallyBlock); - }, - [299 /* CatchClause */]: function forEachChildInCatchClause(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.variableDeclaration) || visitNode2(cbNode, node.block); - }, - [170 /* Decorator */]: function forEachChildInDecorator(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [263 /* ClassDeclaration */]: forEachChildInClassDeclarationOrExpression, - [231 /* ClassExpression */]: forEachChildInClassDeclarationOrExpression, - [264 /* InterfaceDeclaration */]: function forEachChildInInterfaceDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNodes(cbNode, cbNodes, node.heritageClauses) || visitNodes(cbNode, cbNodes, node.members); - }, - [265 /* TypeAliasDeclaration */]: function forEachChildInTypeAliasDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.typeParameters) || visitNode2(cbNode, node.type); - }, - [266 /* EnumDeclaration */]: function forEachChildInEnumDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNodes(cbNode, cbNodes, node.members); - }, - [306 /* EnumMember */]: function forEachChildInEnumMember(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); - }, - [267 /* ModuleDeclaration */]: function forEachChildInModuleDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.body); - }, - [271 /* ImportEqualsDeclaration */]: function forEachChildInImportEqualsDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); - }, - [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); - }, - [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); - }, - [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.elements); - }, - [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); - }, - [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name); - }, - [274 /* NamespaceImport */]: function forEachChildInNamespaceImport(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name); - }, - [280 /* NamespaceExport */]: function forEachChildInNamespaceExport(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name); - }, - [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, - [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, - [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); - }, - [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, - [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, - [277 /* ExportAssignment */]: function forEachChildInExportAssignment(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.expression); - }, - [228 /* TemplateExpression */]: function forEachChildInTemplateExpression(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); - }, - [239 /* TemplateSpan */]: function forEachChildInTemplateSpan(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression) || visitNode2(cbNode, node.literal); - }, - [203 /* TemplateLiteralType */]: function forEachChildInTemplateLiteralType(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans); - }, - [204 /* TemplateLiteralTypeSpan */]: function forEachChildInTemplateLiteralTypeSpan(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.type) || visitNode2(cbNode, node.literal); - }, - [167 /* ComputedPropertyName */]: function forEachChildInComputedPropertyName(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [298 /* HeritageClause */]: function forEachChildInHeritageClause(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.types); - }, - [233 /* ExpressionWithTypeArguments */]: function forEachChildInExpressionWithTypeArguments(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.expression) || visitNodes(cbNode, cbNodes, node.typeArguments); - }, - [283 /* ExternalModuleReference */]: function forEachChildInExternalModuleReference(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [282 /* MissingDeclaration */]: function forEachChildInMissingDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers); - }, - [361 /* CommaListExpression */]: function forEachChildInCommaListExpression(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.elements); - }, - [284 /* JsxElement */]: function forEachChildInJsxElement(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.openingElement) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingElement); - }, - [288 /* JsxFragment */]: function forEachChildInJsxFragment(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.openingFragment) || visitNodes(cbNode, cbNodes, node.children) || visitNode2(cbNode, node.closingFragment); - }, - [285 /* JsxSelfClosingElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [286 /* JsxOpeningElement */]: forEachChildInJsxOpeningOrSelfClosingElement, - [292 /* JsxAttributes */]: function forEachChildInJsxAttributes(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.properties); - }, - [291 /* JsxAttribute */]: function forEachChildInJsxAttribute(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.initializer); - }, - [293 /* JsxSpreadAttribute */]: function forEachChildInJsxSpreadAttribute(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.expression); - }, - [294 /* JsxExpression */]: function forEachChildInJsxExpression(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.dotDotDotToken) || visitNode2(cbNode, node.expression); - }, - [287 /* JsxClosingElement */]: function forEachChildInJsxClosingElement(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.tagName); - }, - [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.namespace) || visitNode2(cbNode, node.name); - }, - [190 /* OptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [191 /* RestType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [316 /* JSDocTypeExpression */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [322 /* JSDocNonNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [321 /* JSDocNullableType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [323 /* JSDocOptionalType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [325 /* JSDocVariadicType */]: forEachChildInOptionalRestOrJSDocParameterModifier, - [324 /* JSDocFunctionType */]: function forEachChildInJSDocFunctionType(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.parameters) || visitNode2(cbNode, node.type); - }, - [327 /* JSDoc */]: function forEachChildInJSDoc(node, cbNode, cbNodes) { - return (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) || visitNodes(cbNode, cbNodes, node.tags); - }, - [354 /* JSDocSeeTag */]: function forEachChildInJSDocSeeTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.name) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); - }, - [317 /* JSDocNameReference */]: function forEachChildInJSDocNameReference(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.name); - }, - [318 /* JSDocMemberName */]: function forEachChildInJSDocMemberName(node, cbNode, _cbNodes) { - return visitNode2(cbNode, node.left) || visitNode2(cbNode, node.right); - }, - [348 /* JSDocParameterTag */]: forEachChildInJSDocParameterOrPropertyTag, - [355 /* JSDocPropertyTag */]: forEachChildInJSDocParameterOrPropertyTag, - [337 /* JSDocAuthorTag */]: function forEachChildInJSDocAuthorTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); - }, - [336 /* JSDocImplementsTag */]: function forEachChildInJSDocImplementsTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); - }, - [335 /* JSDocAugmentsTag */]: function forEachChildInJSDocAugmentsTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.class) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); - }, - [352 /* JSDocTemplateTag */]: function forEachChildInJSDocTemplateTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.constraint) || visitNodes(cbNode, cbNodes, node.typeParameters) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); - }, - [353 /* JSDocTypedefTag */]: function forEachChildInJSDocTypedefTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || (node.typeExpression && node.typeExpression.kind === 316 /* JSDocTypeExpression */ ? visitNode2(cbNode, node.typeExpression) || visitNode2(cbNode, node.fullName) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)) : visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment))); - }, - [345 /* JSDocCallbackTag */]: function forEachChildInJSDocCallbackTag(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.tagName) || visitNode2(cbNode, node.fullName) || visitNode2(cbNode, node.typeExpression) || (typeof node.comment === "string" ? void 0 : visitNodes(cbNode, cbNodes, node.comment)); - }, - [349 /* JSDocReturnTag */]: forEachChildInJSDocTypeLikeTag, - [351 /* JSDocTypeTag */]: forEachChildInJSDocTypeLikeTag, - [350 /* JSDocThisTag */]: forEachChildInJSDocTypeLikeTag, - [347 /* JSDocEnumTag */]: forEachChildInJSDocTypeLikeTag, - [357 /* JSDocSatisfiesTag */]: forEachChildInJSDocTypeLikeTag, - [356 /* JSDocThrowsTag */]: forEachChildInJSDocTypeLikeTag, - [346 /* JSDocOverloadTag */]: forEachChildInJSDocTypeLikeTag, - [330 /* JSDocSignature */]: function forEachChildInJSDocSignature(node, cbNode, _cbNodes) { - return forEach(node.typeParameters, cbNode) || forEach(node.parameters, cbNode) || visitNode2(cbNode, node.type); - }, - [331 /* JSDocLink */]: forEachChildInJSDocLinkCodeOrPlain, - [332 /* JSDocLinkCode */]: forEachChildInJSDocLinkCodeOrPlain, - [333 /* JSDocLinkPlain */]: forEachChildInJSDocLinkCodeOrPlain, - [329 /* JSDocTypeLiteral */]: function forEachChildInJSDocTypeLiteral(node, cbNode, _cbNodes) { - return forEach(node.jsDocPropertyTags, cbNode); - }, - [334 /* JSDocTag */]: forEachChildInJSDocTag, - [339 /* JSDocClassTag */]: forEachChildInJSDocTag, - [340 /* JSDocPublicTag */]: forEachChildInJSDocTag, - [341 /* JSDocPrivateTag */]: forEachChildInJSDocTag, - [342 /* JSDocProtectedTag */]: forEachChildInJSDocTag, - [343 /* JSDocReadonlyTag */]: forEachChildInJSDocTag, - [338 /* JSDocDeprecatedTag */]: forEachChildInJSDocTag, - [344 /* JSDocOverrideTag */]: forEachChildInJSDocTag, - [360 /* PartiallyEmittedExpression */]: forEachChildInPartiallyEmittedExpression - }; - ((Parser2) => { - var scanner2 = createScanner( - 99 /* Latest */, - /*skipTrivia*/ - true - ); - var disallowInAndDecoratorContext = 8192 /* DisallowInContext */ | 32768 /* DecoratorContext */; - var NodeConstructor2; - var TokenConstructor2; - var IdentifierConstructor2; - var PrivateIdentifierConstructor2; - var SourceFileConstructor2; - function countNode(node) { - nodeCount++; - return node; - } - var baseNodeFactory = { - createBaseSourceFileNode: (kind) => countNode(new SourceFileConstructor2( - kind, - /*pos*/ - 0, - /*end*/ - 0 - )), - createBaseIdentifierNode: (kind) => countNode(new IdentifierConstructor2( - kind, - /*pos*/ - 0, - /*end*/ - 0 - )), - createBasePrivateIdentifierNode: (kind) => countNode(new PrivateIdentifierConstructor2( - kind, - /*pos*/ - 0, - /*end*/ - 0 - )), - createBaseTokenNode: (kind) => countNode(new TokenConstructor2( - kind, - /*pos*/ - 0, - /*end*/ - 0 - )), - createBaseNode: (kind) => countNode(new NodeConstructor2( - kind, - /*pos*/ - 0, - /*end*/ - 0 - )) - }; - var factory2 = createNodeFactory(1 /* NoParenthesizerRules */ | 2 /* NoNodeConverters */ | 8 /* NoOriginalNode */, baseNodeFactory); - var { - createNodeArray: factoryCreateNodeArray, - createNumericLiteral: factoryCreateNumericLiteral, - createStringLiteral: factoryCreateStringLiteral, - createLiteralLikeNode: factoryCreateLiteralLikeNode, - createIdentifier: factoryCreateIdentifier, - createPrivateIdentifier: factoryCreatePrivateIdentifier, - createToken: factoryCreateToken, - createArrayLiteralExpression: factoryCreateArrayLiteralExpression, - createObjectLiteralExpression: factoryCreateObjectLiteralExpression, - createPropertyAccessExpression: factoryCreatePropertyAccessExpression, - createPropertyAccessChain: factoryCreatePropertyAccessChain, - createElementAccessExpression: factoryCreateElementAccessExpression, - createElementAccessChain: factoryCreateElementAccessChain, - createCallExpression: factoryCreateCallExpression, - createCallChain: factoryCreateCallChain, - createNewExpression: factoryCreateNewExpression, - createParenthesizedExpression: factoryCreateParenthesizedExpression, - createBlock: factoryCreateBlock, - createVariableStatement: factoryCreateVariableStatement, - createExpressionStatement: factoryCreateExpressionStatement, - createIfStatement: factoryCreateIfStatement, - createWhileStatement: factoryCreateWhileStatement, - createForStatement: factoryCreateForStatement, - createForOfStatement: factoryCreateForOfStatement, - createVariableDeclaration: factoryCreateVariableDeclaration, - createVariableDeclarationList: factoryCreateVariableDeclarationList - } = factory2; - var fileName; - var sourceFlags; - var sourceText; - var languageVersion; - var scriptKind; - var languageVariant; - var parseDiagnostics; - var jsDocDiagnostics; - var syntaxCursor; - var currentToken; - var nodeCount; - var identifiers; - var identifierCount; - var parsingContext; - var notParenthesizedArrow; - var contextFlags; - var topLevel = true; - var parseErrorBeforeNextFinishedNode = false; - function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride) { - var _a; - scriptKind2 = ensureScriptKind(fileName2, scriptKind2); - if (scriptKind2 === 6 /* JSON */) { - const result2 = parseJsonText2(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes); - convertToJson( - result2, - (_a = result2.statements[0]) == null ? void 0 : _a.expression, - result2.parseDiagnostics, - /*returnValue*/ - false, - /*jsonConversionNotifier*/ - void 0 - ); - result2.referencedFiles = emptyArray; - result2.typeReferenceDirectives = emptyArray; - result2.libReferenceDirectives = emptyArray; - result2.amdDependencies = emptyArray; - result2.hasNoDefaultLib = false; - result2.pragmas = emptyMap; - return result2; - } - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2); - const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator); - clearState(); - return result; - } - Parser2.parseSourceFile = parseSourceFile; - function parseIsolatedEntityName2(content, languageVersion2) { - initializeState( - "", - content, - languageVersion2, - /*syntaxCursor*/ - void 0, - 1 /* JS */ - ); - nextToken(); - const entityName = parseEntityName( - /*allowReservedWords*/ - true - ); - const isInvalid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length; - clearState(); - return isInvalid ? entityName : void 0; - } - Parser2.parseIsolatedEntityName = parseIsolatedEntityName2; - function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) { - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */); - sourceFlags = contextFlags; - nextToken(); - const pos = getNodePos(); - let statements, endOfFileToken; - if (token() === 1 /* EndOfFileToken */) { - statements = createNodeArray([], pos, pos); - endOfFileToken = parseTokenNode(); - } else { - let expressions; - while (token() !== 1 /* EndOfFileToken */) { - let expression2; - switch (token()) { - case 23 /* OpenBracketToken */: - expression2 = parseArrayLiteralExpression(); - break; - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 106 /* NullKeyword */: - expression2 = parseTokenNode(); - break; - case 41 /* MinusToken */: - if (lookAhead(() => nextToken() === 9 /* NumericLiteral */ && nextToken() !== 59 /* ColonToken */)) { - expression2 = parsePrefixUnaryExpression(); - } else { - expression2 = parseObjectLiteralExpression(); - } - break; - case 9 /* NumericLiteral */: - case 11 /* StringLiteral */: - if (lookAhead(() => nextToken() !== 59 /* ColonToken */)) { - expression2 = parseLiteralNode(); - break; - } - default: - expression2 = parseObjectLiteralExpression(); - break; - } - if (expressions && isArray(expressions)) { - expressions.push(expression2); - } else if (expressions) { - expressions = [expressions, expression2]; - } else { - expressions = expression2; - if (token() !== 1 /* EndOfFileToken */) { - parseErrorAtCurrentToken(Diagnostics.Unexpected_token); - } - } - } - const expression = isArray(expressions) ? finishNode(factoryCreateArrayLiteralExpression(expressions), pos) : Debug.checkDefined(expressions); - const statement = factoryCreateExpressionStatement(expression); - finishNode(statement, pos); - statements = createNodeArray([statement], pos); - endOfFileToken = parseExpectedToken(1 /* EndOfFileToken */, Diagnostics.Unexpected_token); - } - const sourceFile = createSourceFile2( - fileName2, - 2 /* ES2015 */, - 6 /* JSON */, - /*isDeclarationFile*/ - false, - statements, - endOfFileToken, - sourceFlags, - noop - ); - if (setParentNodes) { - fixupParentReferences(sourceFile); - } - sourceFile.nodeCount = nodeCount; - sourceFile.identifierCount = identifierCount; - sourceFile.identifiers = identifiers; - sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); - if (jsDocDiagnostics) { - sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile); - } - const result = sourceFile; - clearState(); - return result; - } - Parser2.parseJsonText = parseJsonText2; - function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind) { - NodeConstructor2 = objectAllocator.getNodeConstructor(); - TokenConstructor2 = objectAllocator.getTokenConstructor(); - IdentifierConstructor2 = objectAllocator.getIdentifierConstructor(); - PrivateIdentifierConstructor2 = objectAllocator.getPrivateIdentifierConstructor(); - SourceFileConstructor2 = objectAllocator.getSourceFileConstructor(); - fileName = normalizePath(_fileName); - sourceText = _sourceText; - languageVersion = _languageVersion; - syntaxCursor = _syntaxCursor; - scriptKind = _scriptKind; - languageVariant = getLanguageVariant(_scriptKind); - parseDiagnostics = []; - parsingContext = 0; - identifiers = /* @__PURE__ */ new Map(); - identifierCount = 0; - nodeCount = 0; - sourceFlags = 0; - topLevel = true; - switch (scriptKind) { - case 1 /* JS */: - case 2 /* JSX */: - contextFlags = 524288 /* JavaScriptFile */; - break; - case 6 /* JSON */: - contextFlags = 524288 /* JavaScriptFile */ | 134217728 /* JsonFile */; - break; - default: - contextFlags = 0 /* None */; - break; - } - parseErrorBeforeNextFinishedNode = false; - scanner2.setText(sourceText); - scanner2.setOnError(scanError); - scanner2.setScriptTarget(languageVersion); - scanner2.setLanguageVariant(languageVariant); - } - function clearState() { - scanner2.clearCommentDirectives(); - scanner2.setText(""); - scanner2.setOnError(void 0); - sourceText = void 0; - languageVersion = void 0; - syntaxCursor = void 0; - scriptKind = void 0; - languageVariant = void 0; - sourceFlags = 0; - parseDiagnostics = void 0; - jsDocDiagnostics = void 0; - parsingContext = 0; - identifiers = void 0; - notParenthesizedArrow = void 0; - topLevel = true; - } - function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { - const isDeclarationFile = isDeclarationFileName(fileName); - if (isDeclarationFile) { - contextFlags |= 33554432 /* Ambient */; - } - sourceFlags = contextFlags; - nextToken(); - const statements = parseList(0 /* SourceElements */, parseStatement); - Debug.assert(token() === 1 /* EndOfFileToken */); - const endHasJSDoc = hasPrecedingJSDocComment(); - const endOfFileToken = withJSDoc(parseTokenNode(), endHasJSDoc); - const sourceFile = createSourceFile2(fileName, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags, setExternalModuleIndicator2); - processCommentPragmas(sourceFile, sourceText); - processPragmasIntoFields(sourceFile, reportPragmaDiagnostic); - sourceFile.commentDirectives = scanner2.getCommentDirectives(); - sourceFile.nodeCount = nodeCount; - sourceFile.identifierCount = identifierCount; - sourceFile.identifiers = identifiers; - sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); - if (jsDocDiagnostics) { - sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile); - } - if (setParentNodes) { - fixupParentReferences(sourceFile); - } - return sourceFile; - function reportPragmaDiagnostic(pos, end, diagnostic) { - parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); - } - } - let hasDeprecatedTag = false; - function withJSDoc(node, hasJSDoc) { - if (!hasJSDoc) { - return node; - } - Debug.assert(!node.jsDoc); - const jsDoc = mapDefined(getJSDocCommentRanges(node, sourceText), (comment) => JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos)); - if (jsDoc.length) - node.jsDoc = jsDoc; - if (hasDeprecatedTag) { - hasDeprecatedTag = false; - node.flags |= 536870912 /* Deprecated */; - } - return node; - } - function reparseTopLevelAwait(sourceFile) { - const savedSyntaxCursor = syntaxCursor; - const baseSyntaxCursor = IncrementalParser.createSyntaxCursor(sourceFile); - syntaxCursor = { currentNode: currentNode2 }; - const statements = []; - const savedParseDiagnostics = parseDiagnostics; - parseDiagnostics = []; - let pos = 0; - let start = findNextStatementWithAwait(sourceFile.statements, 0); - while (start !== -1) { - const prevStatement = sourceFile.statements[pos]; - const nextStatement = sourceFile.statements[start]; - addRange(statements, sourceFile.statements, pos, start); - pos = findNextStatementWithoutAwait(sourceFile.statements, start); - const diagnosticStart = findIndex(savedParseDiagnostics, (diagnostic) => diagnostic.start >= prevStatement.pos); - const diagnosticEnd = diagnosticStart >= 0 ? findIndex(savedParseDiagnostics, (diagnostic) => diagnostic.start >= nextStatement.pos, diagnosticStart) : -1; - if (diagnosticStart >= 0) { - addRange(parseDiagnostics, savedParseDiagnostics, diagnosticStart, diagnosticEnd >= 0 ? diagnosticEnd : void 0); - } - speculationHelper(() => { - const savedContextFlags = contextFlags; - contextFlags |= 65536 /* AwaitContext */; - scanner2.resetTokenState(nextStatement.pos); - nextToken(); - while (token() !== 1 /* EndOfFileToken */) { - const startPos = scanner2.getTokenFullStart(); - const statement = parseListElement(0 /* SourceElements */, parseStatement); - statements.push(statement); - if (startPos === scanner2.getTokenFullStart()) { - nextToken(); - } - if (pos >= 0) { - const nonAwaitStatement = sourceFile.statements[pos]; - if (statement.end === nonAwaitStatement.pos) { - break; - } - if (statement.end > nonAwaitStatement.pos) { - pos = findNextStatementWithoutAwait(sourceFile.statements, pos + 1); - } - } - } - contextFlags = savedContextFlags; - }, 2 /* Reparse */); - start = pos >= 0 ? findNextStatementWithAwait(sourceFile.statements, pos) : -1; - } - if (pos >= 0) { - const prevStatement = sourceFile.statements[pos]; - addRange(statements, sourceFile.statements, pos); - const diagnosticStart = findIndex(savedParseDiagnostics, (diagnostic) => diagnostic.start >= prevStatement.pos); - if (diagnosticStart >= 0) { - addRange(parseDiagnostics, savedParseDiagnostics, diagnosticStart); - } - } - syntaxCursor = savedSyntaxCursor; - return factory2.updateSourceFile(sourceFile, setTextRange(factoryCreateNodeArray(statements), sourceFile.statements)); - function containsPossibleTopLevelAwait(node) { - return !(node.flags & 65536 /* AwaitContext */) && !!(node.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */); - } - function findNextStatementWithAwait(statements2, start2) { - for (let i = start2; i < statements2.length; i++) { - if (containsPossibleTopLevelAwait(statements2[i])) { - return i; - } - } - return -1; - } - function findNextStatementWithoutAwait(statements2, start2) { - for (let i = start2; i < statements2.length; i++) { - if (!containsPossibleTopLevelAwait(statements2[i])) { - return i; - } - } - return -1; - } - function currentNode2(position) { - const node = baseSyntaxCursor.currentNode(position); - if (topLevel && node && containsPossibleTopLevelAwait(node)) { - node.intersectsChange = true; - } - return node; - } - } - function fixupParentReferences(rootNode) { - setParentRecursive( - rootNode, - /*incremental*/ - true - ); - } - Parser2.fixupParentReferences = fixupParentReferences; - function createSourceFile2(fileName2, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, flags, setExternalModuleIndicator2) { - let sourceFile = factory2.createSourceFile(statements, endOfFileToken, flags); - setTextRangePosWidth(sourceFile, 0, sourceText.length); - setFields(sourceFile); - if (!isDeclarationFile && isExternalModule(sourceFile) && sourceFile.transformFlags & 67108864 /* ContainsPossibleTopLevelAwait */) { - sourceFile = reparseTopLevelAwait(sourceFile); - setFields(sourceFile); - } - return sourceFile; - function setFields(sourceFile2) { - sourceFile2.text = sourceText; - sourceFile2.bindDiagnostics = []; - sourceFile2.bindSuggestionDiagnostics = void 0; - sourceFile2.languageVersion = languageVersion2; - sourceFile2.fileName = fileName2; - sourceFile2.languageVariant = getLanguageVariant(scriptKind2); - sourceFile2.isDeclarationFile = isDeclarationFile; - sourceFile2.scriptKind = scriptKind2; - setExternalModuleIndicator2(sourceFile2); - sourceFile2.setExternalModuleIndicator = setExternalModuleIndicator2; - } - } - function setContextFlag(val, flag) { - if (val) { - contextFlags |= flag; - } else { - contextFlags &= ~flag; - } - } - function setDisallowInContext(val) { - setContextFlag(val, 8192 /* DisallowInContext */); - } - function setYieldContext(val) { - setContextFlag(val, 16384 /* YieldContext */); - } - function setDecoratorContext(val) { - setContextFlag(val, 32768 /* DecoratorContext */); - } - function setAwaitContext(val) { - setContextFlag(val, 65536 /* AwaitContext */); - } - function doOutsideOfContext(context, func) { - const contextFlagsToClear = context & contextFlags; - if (contextFlagsToClear) { - setContextFlag( - /*val*/ - false, - contextFlagsToClear - ); - const result = func(); - setContextFlag( - /*val*/ - true, - contextFlagsToClear - ); - return result; - } - return func(); - } - function doInsideOfContext(context, func) { - const contextFlagsToSet = context & ~contextFlags; - if (contextFlagsToSet) { - setContextFlag( - /*val*/ - true, - contextFlagsToSet - ); - const result = func(); - setContextFlag( - /*val*/ - false, - contextFlagsToSet - ); - return result; - } - return func(); - } - function allowInAnd(func) { - return doOutsideOfContext(8192 /* DisallowInContext */, func); - } - function disallowInAnd(func) { - return doInsideOfContext(8192 /* DisallowInContext */, func); - } - function allowConditionalTypesAnd(func) { - return doOutsideOfContext(131072 /* DisallowConditionalTypesContext */, func); - } - function disallowConditionalTypesAnd(func) { - return doInsideOfContext(131072 /* DisallowConditionalTypesContext */, func); - } - function doInYieldContext(func) { - return doInsideOfContext(16384 /* YieldContext */, func); - } - function doInDecoratorContext(func) { - return doInsideOfContext(32768 /* DecoratorContext */, func); - } - function doInAwaitContext(func) { - return doInsideOfContext(65536 /* AwaitContext */, func); - } - function doOutsideOfAwaitContext(func) { - return doOutsideOfContext(65536 /* AwaitContext */, func); - } - function doInYieldAndAwaitContext(func) { - return doInsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); - } - function doOutsideOfYieldAndAwaitContext(func) { - return doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */, func); - } - function inContext(flags) { - return (contextFlags & flags) !== 0; - } - function inYieldContext() { - return inContext(16384 /* YieldContext */); - } - function inDisallowInContext() { - return inContext(8192 /* DisallowInContext */); - } - function inDisallowConditionalTypesContext() { - return inContext(131072 /* DisallowConditionalTypesContext */); - } - function inDecoratorContext() { - return inContext(32768 /* DecoratorContext */); - } - function inAwaitContext() { - return inContext(65536 /* AwaitContext */); - } - function parseErrorAtCurrentToken(message, ...args) { - return parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), message, ...args); - } - function parseErrorAtPosition(start, length2, message, ...args) { - const lastError = lastOrUndefined(parseDiagnostics); - let result; - if (!lastError || start !== lastError.start) { - result = createDetachedDiagnostic(fileName, start, length2, message, ...args); - parseDiagnostics.push(result); - } - parseErrorBeforeNextFinishedNode = true; - return result; - } - function parseErrorAt(start, end, message, ...args) { - return parseErrorAtPosition(start, end - start, message, ...args); - } - function parseErrorAtRange(range, message, ...args) { - parseErrorAt(range.pos, range.end, message, ...args); - } - function scanError(message, length2, arg0) { - parseErrorAtPosition(scanner2.getTokenEnd(), length2, message, arg0); - } - function getNodePos() { - return scanner2.getTokenFullStart(); - } - function hasPrecedingJSDocComment() { - return scanner2.hasPrecedingJSDocComment(); - } - function token() { - return currentToken; - } - function nextTokenWithoutCheck() { - return currentToken = scanner2.scan(); - } - function nextTokenAnd(func) { - nextToken(); - return func(); - } - function nextToken() { - if (isKeyword(currentToken) && (scanner2.hasUnicodeEscape() || scanner2.hasExtendedUnicodeEscape())) { - parseErrorAt(scanner2.getTokenStart(), scanner2.getTokenEnd(), Diagnostics.Keywords_cannot_contain_escape_characters); - } - return nextTokenWithoutCheck(); - } - function nextTokenJSDoc() { - return currentToken = scanner2.scanJsDocToken(); - } - function nextJSDocCommentTextToken(inBackticks) { - return currentToken = scanner2.scanJSDocCommentTextToken(inBackticks); - } - function reScanGreaterToken() { - return currentToken = scanner2.reScanGreaterToken(); - } - function reScanSlashToken() { - return currentToken = scanner2.reScanSlashToken(); - } - function reScanTemplateToken(isTaggedTemplate) { - return currentToken = scanner2.reScanTemplateToken(isTaggedTemplate); - } - function reScanLessThanToken() { - return currentToken = scanner2.reScanLessThanToken(); - } - function reScanHashToken() { - return currentToken = scanner2.reScanHashToken(); - } - function scanJsxIdentifier() { - return currentToken = scanner2.scanJsxIdentifier(); - } - function scanJsxText() { - return currentToken = scanner2.scanJsxToken(); - } - function scanJsxAttributeValue() { - return currentToken = scanner2.scanJsxAttributeValue(); - } - function speculationHelper(callback, speculationKind) { - const saveToken = currentToken; - const saveParseDiagnosticsLength = parseDiagnostics.length; - const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - const saveContextFlags = contextFlags; - const result = speculationKind !== 0 /* TryParse */ ? scanner2.lookAhead(callback) : scanner2.tryScan(callback); - Debug.assert(saveContextFlags === contextFlags); - if (!result || speculationKind !== 0 /* TryParse */) { - currentToken = saveToken; - if (speculationKind !== 2 /* Reparse */) { - parseDiagnostics.length = saveParseDiagnosticsLength; - } - parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode; - } - return result; - } - function lookAhead(callback) { - return speculationHelper(callback, 1 /* Lookahead */); - } - function tryParse(callback) { - return speculationHelper(callback, 0 /* TryParse */); - } - function isBindingIdentifier() { - if (token() === 80 /* Identifier */) { - return true; - } - return token() > 118 /* LastReservedWord */; - } - function isIdentifier2() { - if (token() === 80 /* Identifier */) { - return true; - } - if (token() === 127 /* YieldKeyword */ && inYieldContext()) { - return false; - } - if (token() === 135 /* AwaitKeyword */ && inAwaitContext()) { - return false; - } - return token() > 118 /* LastReservedWord */; - } - function parseExpected(kind, diagnosticMessage, shouldAdvance = true) { - if (token() === kind) { - if (shouldAdvance) { - nextToken(); - } - return true; - } - if (diagnosticMessage) { - parseErrorAtCurrentToken(diagnosticMessage); - } else { - parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(kind)); - } - return false; - } - const viableKeywordSuggestions = Object.keys(textToKeywordObj).filter((keyword) => keyword.length > 2); - function parseErrorForMissingSemicolonAfter(node) { - if (isTaggedTemplateExpression(node)) { - parseErrorAt(skipTrivia(sourceText, node.template.pos), node.template.end, Diagnostics.Module_declaration_names_may_only_use_or_quoted_strings); - return; - } - const expressionText = isIdentifier(node) ? idText(node) : void 0; - if (!expressionText || !isIdentifierText(expressionText, languageVersion)) { - parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(27 /* SemicolonToken */)); - return; - } - const pos = skipTrivia(sourceText, node.pos); - switch (expressionText) { - case "const": - case "let": - case "var": - parseErrorAt(pos, node.end, Diagnostics.Variable_declaration_not_allowed_at_this_location); - return; - case "declare": - return; - case "interface": - parseErrorForInvalidName(Diagnostics.Interface_name_cannot_be_0, Diagnostics.Interface_must_be_given_a_name, 19 /* OpenBraceToken */); - return; - case "is": - parseErrorAt(pos, scanner2.getTokenStart(), Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - return; - case "module": - case "namespace": - parseErrorForInvalidName(Diagnostics.Namespace_name_cannot_be_0, Diagnostics.Namespace_must_be_given_a_name, 19 /* OpenBraceToken */); - return; - case "type": - parseErrorForInvalidName(Diagnostics.Type_alias_name_cannot_be_0, Diagnostics.Type_alias_must_be_given_a_name, 64 /* EqualsToken */); - return; - } - const suggestion = getSpellingSuggestion(expressionText, viableKeywordSuggestions, (n) => n) ?? getSpaceSuggestion(expressionText); - if (suggestion) { - parseErrorAt(pos, node.end, Diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion); - return; - } - if (token() === 0 /* Unknown */) { - return; - } - parseErrorAt(pos, node.end, Diagnostics.Unexpected_keyword_or_identifier); - } - function parseErrorForInvalidName(nameDiagnostic, blankDiagnostic, tokenIfBlankName) { - if (token() === tokenIfBlankName) { - parseErrorAtCurrentToken(blankDiagnostic); - } else { - parseErrorAtCurrentToken(nameDiagnostic, scanner2.getTokenValue()); - } - } - function getSpaceSuggestion(expressionText) { - for (const keyword of viableKeywordSuggestions) { - if (expressionText.length > keyword.length + 2 && startsWith(expressionText, keyword)) { - return `${keyword} ${expressionText.slice(keyword.length)}`; - } - } - return void 0; - } - function parseSemicolonAfterPropertyName(name, type, initializer) { - if (token() === 60 /* AtToken */ && !scanner2.hasPrecedingLineBreak()) { - parseErrorAtCurrentToken(Diagnostics.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations); - return; - } - if (token() === 21 /* OpenParenToken */) { - parseErrorAtCurrentToken(Diagnostics.Cannot_start_a_function_call_in_a_type_annotation); - nextToken(); - return; - } - if (type && !canParseSemicolon()) { - if (initializer) { - parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(27 /* SemicolonToken */)); - } else { - parseErrorAtCurrentToken(Diagnostics.Expected_for_property_initializer); - } - return; - } - if (tryParseSemicolon()) { - return; - } - if (initializer) { - parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(27 /* SemicolonToken */)); - return; - } - parseErrorForMissingSemicolonAfter(name); - } - function parseExpectedJSDoc(kind) { - if (token() === kind) { - nextTokenJSDoc(); - return true; - } - Debug.assert(isKeywordOrPunctuation(kind)); - parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(kind)); - return false; - } - function parseExpectedMatchingBrackets(openKind, closeKind, openParsed, openPosition) { - if (token() === closeKind) { - nextToken(); - return; - } - const lastError = parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(closeKind)); - if (!openParsed) { - return; - } - if (lastError) { - addRelatedInfo( - lastError, - createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) - ); - } - } - function parseOptional(t) { - if (token() === t) { - nextToken(); - return true; - } - return false; - } - function parseOptionalToken(t) { - if (token() === t) { - return parseTokenNode(); - } - return void 0; - } - function parseOptionalTokenJSDoc(t) { - if (token() === t) { - return parseTokenNodeJSDoc(); - } - return void 0; - } - function parseExpectedToken(t, diagnosticMessage, arg0) { - return parseOptionalToken(t) || createMissingNode( - t, - /*reportAtCurrentPosition*/ - false, - diagnosticMessage || Diagnostics._0_expected, - arg0 || tokenToString(t) - ); - } - function parseExpectedTokenJSDoc(t) { - const optional = parseOptionalTokenJSDoc(t); - if (optional) - return optional; - Debug.assert(isKeywordOrPunctuation(t)); - return createMissingNode( - t, - /*reportAtCurrentPosition*/ - false, - Diagnostics._0_expected, - tokenToString(t) - ); - } - function parseTokenNode() { - const pos = getNodePos(); - const kind = token(); - nextToken(); - return finishNode(factoryCreateToken(kind), pos); - } - function parseTokenNodeJSDoc() { - const pos = getNodePos(); - const kind = token(); - nextTokenJSDoc(); - return finishNode(factoryCreateToken(kind), pos); - } - function canParseSemicolon() { - if (token() === 27 /* SemicolonToken */) { - return true; - } - return token() === 20 /* CloseBraceToken */ || token() === 1 /* EndOfFileToken */ || scanner2.hasPrecedingLineBreak(); - } - function tryParseSemicolon() { - if (!canParseSemicolon()) { - return false; - } - if (token() === 27 /* SemicolonToken */) { - nextToken(); - } - return true; - } - function parseSemicolon() { - return tryParseSemicolon() || parseExpected(27 /* SemicolonToken */); - } - function createNodeArray(elements, pos, end, hasTrailingComma) { - const array = factoryCreateNodeArray(elements, hasTrailingComma); - setTextRangePosEnd(array, pos, end ?? scanner2.getTokenFullStart()); - return array; - } - function finishNode(node, pos, end) { - setTextRangePosEnd(node, pos, end ?? scanner2.getTokenFullStart()); - if (contextFlags) { - node.flags |= contextFlags; - } - if (parseErrorBeforeNextFinishedNode) { - parseErrorBeforeNextFinishedNode = false; - node.flags |= 262144 /* ThisNodeHasError */; - } - return node; - } - function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, ...args) { - if (reportAtCurrentPosition) { - parseErrorAtPosition(scanner2.getTokenFullStart(), 0, diagnosticMessage, ...args); - } else if (diagnosticMessage) { - parseErrorAtCurrentToken(diagnosticMessage, ...args); - } - const pos = getNodePos(); - const result = kind === 80 /* Identifier */ ? factoryCreateIdentifier( - "", - /*originalKeywordKind*/ - void 0 - ) : isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode( - kind, - "", - "", - /*templateFlags*/ - void 0 - ) : kind === 9 /* NumericLiteral */ ? factoryCreateNumericLiteral( - "", - /*numericLiteralFlags*/ - void 0 - ) : kind === 11 /* StringLiteral */ ? factoryCreateStringLiteral( - "", - /*isSingleQuote*/ - void 0 - ) : kind === 282 /* MissingDeclaration */ ? factory2.createMissingDeclaration() : factoryCreateToken(kind); - return finishNode(result, pos); - } - function internIdentifier(text) { - let identifier = identifiers.get(text); - if (identifier === void 0) { - identifiers.set(text, identifier = text); - } - return identifier; - } - function createIdentifier(isIdentifier3, diagnosticMessage, privateIdentifierDiagnosticMessage) { - if (isIdentifier3) { - identifierCount++; - const pos = getNodePos(); - const originalKeywordKind = token(); - const text = internIdentifier(scanner2.getTokenValue()); - const hasExtendedUnicodeEscape = scanner2.hasExtendedUnicodeEscape(); - nextTokenWithoutCheck(); - return finishNode(factoryCreateIdentifier(text, originalKeywordKind, hasExtendedUnicodeEscape), pos); - } - if (token() === 81 /* PrivateIdentifier */) { - parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); - return createIdentifier( - /*isIdentifier*/ - true - ); - } - if (token() === 0 /* Unknown */ && scanner2.tryScan(() => scanner2.reScanInvalidIdentifier() === 80 /* Identifier */)) { - return createIdentifier( - /*isIdentifier*/ - true - ); - } - identifierCount++; - const reportAtCurrentPosition = token() === 1 /* EndOfFileToken */; - const isReservedWord = scanner2.isReservedWord(); - const msgArg = scanner2.getTokenText(); - const defaultMessage = isReservedWord ? Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here : Diagnostics.Identifier_expected; - return createMissingNode(80 /* Identifier */, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg); - } - function parseBindingIdentifier(privateIdentifierDiagnosticMessage) { - return createIdentifier( - isBindingIdentifier(), - /*diagnosticMessage*/ - void 0, - privateIdentifierDiagnosticMessage - ); - } - function parseIdentifier(diagnosticMessage, privateIdentifierDiagnosticMessage) { - return createIdentifier(isIdentifier2(), diagnosticMessage, privateIdentifierDiagnosticMessage); - } - function parseIdentifierName(diagnosticMessage) { - return createIdentifier(tokenIsIdentifierOrKeyword(token()), diagnosticMessage); - } - function isLiteralPropertyName() { - return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */; - } - function isAssertionKey2() { - return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */; - } - function parsePropertyNameWorker(allowComputedPropertyNames) { - if (token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */) { - const node = parseLiteralNode(); - node.text = internIdentifier(node.text); - return node; - } - if (allowComputedPropertyNames && token() === 23 /* OpenBracketToken */) { - return parseComputedPropertyName(); - } - if (token() === 81 /* PrivateIdentifier */) { - return parsePrivateIdentifier(); - } - return parseIdentifierName(); - } - function parsePropertyName() { - return parsePropertyNameWorker( - /*allowComputedPropertyNames*/ - true - ); - } - function parseComputedPropertyName() { - const pos = getNodePos(); - parseExpected(23 /* OpenBracketToken */); - const expression = allowInAnd(parseExpression); - parseExpected(24 /* CloseBracketToken */); - return finishNode(factory2.createComputedPropertyName(expression), pos); - } - function parsePrivateIdentifier() { - const pos = getNodePos(); - const node = factoryCreatePrivateIdentifier(internIdentifier(scanner2.getTokenValue())); - nextToken(); - return finishNode(node, pos); - } - function parseContextualModifier(t) { - return token() === t && tryParse(nextTokenCanFollowModifier); - } - function nextTokenIsOnSameLineAndCanFollowModifier() { - nextToken(); - if (scanner2.hasPrecedingLineBreak()) { - return false; - } - return canFollowModifier(); - } - function nextTokenCanFollowModifier() { - switch (token()) { - case 87 /* ConstKeyword */: - return nextToken() === 94 /* EnumKeyword */; - case 95 /* ExportKeyword */: - nextToken(); - if (token() === 90 /* DefaultKeyword */) { - return lookAhead(nextTokenCanFollowDefaultKeyword); - } - if (token() === 156 /* TypeKeyword */) { - return lookAhead(nextTokenCanFollowExportModifier); - } - return canFollowExportModifier(); - case 90 /* DefaultKeyword */: - return nextTokenCanFollowDefaultKeyword(); - case 126 /* StaticKeyword */: - case 139 /* GetKeyword */: - case 153 /* SetKeyword */: - nextToken(); - return canFollowModifier(); - default: - return nextTokenIsOnSameLineAndCanFollowModifier(); - } - } - function canFollowExportModifier() { - return token() === 60 /* AtToken */ || token() !== 42 /* AsteriskToken */ && token() !== 130 /* AsKeyword */ && token() !== 19 /* OpenBraceToken */ && canFollowModifier(); - } - function nextTokenCanFollowExportModifier() { - nextToken(); - return canFollowExportModifier(); - } - function parseAnyContextualModifier() { - return isModifierKind(token()) && tryParse(nextTokenCanFollowModifier); - } - function canFollowModifier() { - return token() === 23 /* OpenBracketToken */ || token() === 19 /* OpenBraceToken */ || token() === 42 /* AsteriskToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName(); - } - function nextTokenCanFollowDefaultKeyword() { - nextToken(); - return token() === 86 /* ClassKeyword */ || token() === 100 /* FunctionKeyword */ || token() === 120 /* InterfaceKeyword */ || token() === 60 /* AtToken */ || token() === 128 /* AbstractKeyword */ && lookAhead(nextTokenIsClassKeywordOnSameLine) || token() === 134 /* AsyncKeyword */ && lookAhead(nextTokenIsFunctionKeywordOnSameLine); - } - function isListElement2(parsingContext2, inErrorRecovery) { - const node = currentNode(parsingContext2); - if (node) { - return true; - } - switch (parsingContext2) { - case 0 /* SourceElements */: - case 1 /* BlockStatements */: - case 3 /* SwitchClauseStatements */: - return !(token() === 27 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); - case 2 /* SwitchClauses */: - return token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */; - case 4 /* TypeMembers */: - return lookAhead(isTypeMemberStart); - case 5 /* ClassMembers */: - return lookAhead(isClassMemberStart) || token() === 27 /* SemicolonToken */ && !inErrorRecovery; - case 6 /* EnumMembers */: - return token() === 23 /* OpenBracketToken */ || isLiteralPropertyName(); - case 12 /* ObjectLiteralMembers */: - switch (token()) { - case 23 /* OpenBracketToken */: - case 42 /* AsteriskToken */: - case 26 /* DotDotDotToken */: - case 25 /* DotToken */: - return true; - default: - return isLiteralPropertyName(); - } - case 18 /* RestProperties */: - return isLiteralPropertyName(); - case 9 /* ObjectBindingElements */: - return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName(); - case 24 /* AssertEntries */: - return isAssertionKey2(); - case 7 /* HeritageClauseElement */: - if (token() === 19 /* OpenBraceToken */) { - return lookAhead(isValidHeritageClauseObjectLiteral); - } - if (!inErrorRecovery) { - return isStartOfLeftHandSideExpression() && !isHeritageClauseExtendsOrImplementsKeyword(); - } else { - return isIdentifier2() && !isHeritageClauseExtendsOrImplementsKeyword(); - } - case 8 /* VariableDeclarations */: - return isBindingIdentifierOrPrivateIdentifierOrPattern(); - case 10 /* ArrayBindingElements */: - return token() === 28 /* CommaToken */ || token() === 26 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern(); - case 19 /* TypeParameters */: - return token() === 103 /* InKeyword */ || token() === 87 /* ConstKeyword */ || isIdentifier2(); - case 15 /* ArrayLiteralMembers */: - switch (token()) { - case 28 /* CommaToken */: - case 25 /* DotToken */: - return true; - } - case 11 /* ArgumentExpressions */: - return token() === 26 /* DotDotDotToken */ || isStartOfExpression(); - case 16 /* Parameters */: - return isStartOfParameter( - /*isJSDocParameter*/ - false - ); - case 17 /* JSDocParameters */: - return isStartOfParameter( - /*isJSDocParameter*/ - true - ); - case 20 /* TypeArguments */: - case 21 /* TupleElementTypes */: - return token() === 28 /* CommaToken */ || isStartOfType(); - case 22 /* HeritageClauses */: - return isHeritageClause2(); - case 23 /* ImportOrExportSpecifiers */: - if (token() === 161 /* FromKeyword */ && lookAhead(nextTokenIsStringLiteral)) { - return false; - } - return tokenIsIdentifierOrKeyword(token()); - case 13 /* JsxAttributes */: - return tokenIsIdentifierOrKeyword(token()) || token() === 19 /* OpenBraceToken */; - case 14 /* JsxChildren */: - return true; - case 25 /* JSDocComment */: - return true; - case 26 /* Count */: - return Debug.fail("ParsingContext.Count used as a context"); - default: - Debug.assertNever(parsingContext2, "Non-exhaustive case in 'isListElement'."); - } - } - function isValidHeritageClauseObjectLiteral() { - Debug.assert(token() === 19 /* OpenBraceToken */); - if (nextToken() === 20 /* CloseBraceToken */) { - const next = nextToken(); - return next === 28 /* CommaToken */ || next === 19 /* OpenBraceToken */ || next === 96 /* ExtendsKeyword */ || next === 119 /* ImplementsKeyword */; - } - return true; - } - function nextTokenIsIdentifier() { - nextToken(); - return isIdentifier2(); - } - function nextTokenIsIdentifierOrKeyword() { - nextToken(); - return tokenIsIdentifierOrKeyword(token()); - } - function nextTokenIsIdentifierOrKeywordOrGreaterThan() { - nextToken(); - return tokenIsIdentifierOrKeywordOrGreaterThan(token()); - } - function isHeritageClauseExtendsOrImplementsKeyword() { - if (token() === 119 /* ImplementsKeyword */ || token() === 96 /* ExtendsKeyword */) { - return lookAhead(nextTokenIsStartOfExpression); - } - return false; - } - function nextTokenIsStartOfExpression() { - nextToken(); - return isStartOfExpression(); - } - function nextTokenIsStartOfType() { - nextToken(); - return isStartOfType(); - } - function isListTerminator(kind) { - if (token() === 1 /* EndOfFileToken */) { - return true; - } - switch (kind) { - case 1 /* BlockStatements */: - case 2 /* SwitchClauses */: - case 4 /* TypeMembers */: - case 5 /* ClassMembers */: - case 6 /* EnumMembers */: - case 12 /* ObjectLiteralMembers */: - case 9 /* ObjectBindingElements */: - case 23 /* ImportOrExportSpecifiers */: - case 24 /* AssertEntries */: - return token() === 20 /* CloseBraceToken */; - case 3 /* SwitchClauseStatements */: - return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */; - case 7 /* HeritageClauseElement */: - return token() === 19 /* OpenBraceToken */ || token() === 96 /* ExtendsKeyword */ || token() === 119 /* ImplementsKeyword */; - case 8 /* VariableDeclarations */: - return isVariableDeclaratorListTerminator(); - case 19 /* TypeParameters */: - return token() === 32 /* GreaterThanToken */ || token() === 21 /* OpenParenToken */ || token() === 19 /* OpenBraceToken */ || token() === 96 /* ExtendsKeyword */ || token() === 119 /* ImplementsKeyword */; - case 11 /* ArgumentExpressions */: - return token() === 22 /* CloseParenToken */ || token() === 27 /* SemicolonToken */; - case 15 /* ArrayLiteralMembers */: - case 21 /* TupleElementTypes */: - case 10 /* ArrayBindingElements */: - return token() === 24 /* CloseBracketToken */; - case 17 /* JSDocParameters */: - case 16 /* Parameters */: - case 18 /* RestProperties */: - return token() === 22 /* CloseParenToken */ || token() === 24 /* CloseBracketToken */; - case 20 /* TypeArguments */: - return token() !== 28 /* CommaToken */; - case 22 /* HeritageClauses */: - return token() === 19 /* OpenBraceToken */ || token() === 20 /* CloseBraceToken */; - case 13 /* JsxAttributes */: - return token() === 32 /* GreaterThanToken */ || token() === 44 /* SlashToken */; - case 14 /* JsxChildren */: - return token() === 30 /* LessThanToken */ && lookAhead(nextTokenIsSlash); - default: - return false; - } - } - function isVariableDeclaratorListTerminator() { - if (canParseSemicolon()) { - return true; - } - if (isInOrOfKeyword(token())) { - return true; - } - if (token() === 39 /* EqualsGreaterThanToken */) { - return true; - } - return false; - } - function isInSomeParsingContext() { - Debug.assert(parsingContext, "Missing parsing context"); - for (let kind = 0; kind < 26 /* Count */; kind++) { - if (parsingContext & 1 << kind) { - if (isListElement2( - kind, - /*inErrorRecovery*/ - true - ) || isListTerminator(kind)) { - return true; - } - } - } - return false; - } - function parseList(kind, parseElement) { - const saveParsingContext = parsingContext; - parsingContext |= 1 << kind; - const list = []; - const listPos = getNodePos(); - while (!isListTerminator(kind)) { - if (isListElement2( - kind, - /*inErrorRecovery*/ - false - )) { - list.push(parseListElement(kind, parseElement)); - continue; - } - if (abortParsingListOrMoveToNextToken(kind)) { - break; - } - } - parsingContext = saveParsingContext; - return createNodeArray(list, listPos); - } - function parseListElement(parsingContext2, parseElement) { - const node = currentNode(parsingContext2); - if (node) { - return consumeNode(node); - } - return parseElement(); - } - function currentNode(parsingContext2, pos) { - var _a; - if (!syntaxCursor || !isReusableParsingContext(parsingContext2) || parseErrorBeforeNextFinishedNode) { - return void 0; - } - const node = syntaxCursor.currentNode(pos ?? scanner2.getTokenFullStart()); - if (nodeIsMissing(node) || node.intersectsChange || containsParseError(node)) { - return void 0; - } - const nodeContextFlags = node.flags & 101441536 /* ContextFlags */; - if (nodeContextFlags !== contextFlags) { - return void 0; - } - if (!canReuseNode(node, parsingContext2)) { - return void 0; - } - if (canHaveJSDoc(node) && ((_a = node.jsDoc) == null ? void 0 : _a.jsDocCache)) { - node.jsDoc.jsDocCache = void 0; - } - return node; - } - function consumeNode(node) { - scanner2.resetTokenState(node.end); - nextToken(); - return node; - } - function isReusableParsingContext(parsingContext2) { - switch (parsingContext2) { - case 5 /* ClassMembers */: - case 2 /* SwitchClauses */: - case 0 /* SourceElements */: - case 1 /* BlockStatements */: - case 3 /* SwitchClauseStatements */: - case 6 /* EnumMembers */: - case 4 /* TypeMembers */: - case 8 /* VariableDeclarations */: - case 17 /* JSDocParameters */: - case 16 /* Parameters */: - return true; - } - return false; - } - function canReuseNode(node, parsingContext2) { - switch (parsingContext2) { - case 5 /* ClassMembers */: - return isReusableClassMember(node); - case 2 /* SwitchClauses */: - return isReusableSwitchClause(node); - case 0 /* SourceElements */: - case 1 /* BlockStatements */: - case 3 /* SwitchClauseStatements */: - return isReusableStatement(node); - case 6 /* EnumMembers */: - return isReusableEnumMember(node); - case 4 /* TypeMembers */: - return isReusableTypeMember(node); - case 8 /* VariableDeclarations */: - return isReusableVariableDeclaration(node); - case 17 /* JSDocParameters */: - case 16 /* Parameters */: - return isReusableParameter(node); - } - return false; - } - function isReusableClassMember(node) { - if (node) { - switch (node.kind) { - case 176 /* Constructor */: - case 181 /* IndexSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 172 /* PropertyDeclaration */: - case 240 /* SemicolonClassElement */: - return true; - case 174 /* MethodDeclaration */: - const methodDeclaration = node; - const nameIsConstructor = methodDeclaration.name.kind === 80 /* Identifier */ && methodDeclaration.name.escapedText === "constructor"; - return !nameIsConstructor; - } - } - return false; - } - function isReusableSwitchClause(node) { - if (node) { - switch (node.kind) { - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - return true; - } - } - return false; - } - function isReusableStatement(node) { - if (node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 243 /* VariableStatement */: - case 241 /* Block */: - case 245 /* IfStatement */: - case 244 /* ExpressionStatement */: - case 257 /* ThrowStatement */: - case 253 /* ReturnStatement */: - case 255 /* SwitchStatement */: - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 248 /* ForStatement */: - case 247 /* WhileStatement */: - case 254 /* WithStatement */: - case 242 /* EmptyStatement */: - case 258 /* TryStatement */: - case 256 /* LabeledStatement */: - case 246 /* DoStatement */: - case 259 /* DebuggerStatement */: - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 278 /* ExportDeclaration */: - case 277 /* ExportAssignment */: - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - return true; - } - } - return false; - } - function isReusableEnumMember(node) { - return node.kind === 306 /* EnumMember */; - } - function isReusableTypeMember(node) { - if (node) { - switch (node.kind) { - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 171 /* PropertySignature */: - case 179 /* CallSignature */: - return true; - } - } - return false; - } - function isReusableVariableDeclaration(node) { - if (node.kind !== 260 /* VariableDeclaration */) { - return false; - } - const variableDeclarator = node; - return variableDeclarator.initializer === void 0; - } - function isReusableParameter(node) { - if (node.kind !== 169 /* Parameter */) { - return false; - } - const parameter = node; - return parameter.initializer === void 0; - } - function abortParsingListOrMoveToNextToken(kind) { - parsingContextErrors(kind); - if (isInSomeParsingContext()) { - return true; - } - nextToken(); - return false; - } - function parsingContextErrors(context) { - switch (context) { - case 0 /* SourceElements */: - return token() === 90 /* DefaultKeyword */ ? parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(95 /* ExportKeyword */)) : parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); - case 1 /* BlockStatements */: - return parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); - case 2 /* SwitchClauses */: - return parseErrorAtCurrentToken(Diagnostics.case_or_default_expected); - case 3 /* SwitchClauseStatements */: - return parseErrorAtCurrentToken(Diagnostics.Statement_expected); - case 18 /* RestProperties */: - case 4 /* TypeMembers */: - return parseErrorAtCurrentToken(Diagnostics.Property_or_signature_expected); - case 5 /* ClassMembers */: - return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected); - case 6 /* EnumMembers */: - return parseErrorAtCurrentToken(Diagnostics.Enum_member_expected); - case 7 /* HeritageClauseElement */: - return parseErrorAtCurrentToken(Diagnostics.Expression_expected); - case 8 /* VariableDeclarations */: - return isKeyword(token()) ? parseErrorAtCurrentToken(Diagnostics._0_is_not_allowed_as_a_variable_declaration_name, tokenToString(token())) : parseErrorAtCurrentToken(Diagnostics.Variable_declaration_expected); - case 9 /* ObjectBindingElements */: - return parseErrorAtCurrentToken(Diagnostics.Property_destructuring_pattern_expected); - case 10 /* ArrayBindingElements */: - return parseErrorAtCurrentToken(Diagnostics.Array_element_destructuring_pattern_expected); - case 11 /* ArgumentExpressions */: - return parseErrorAtCurrentToken(Diagnostics.Argument_expression_expected); - case 12 /* ObjectLiteralMembers */: - return parseErrorAtCurrentToken(Diagnostics.Property_assignment_expected); - case 15 /* ArrayLiteralMembers */: - return parseErrorAtCurrentToken(Diagnostics.Expression_or_comma_expected); - case 17 /* JSDocParameters */: - return parseErrorAtCurrentToken(Diagnostics.Parameter_declaration_expected); - case 16 /* Parameters */: - return isKeyword(token()) ? parseErrorAtCurrentToken(Diagnostics._0_is_not_allowed_as_a_parameter_name, tokenToString(token())) : parseErrorAtCurrentToken(Diagnostics.Parameter_declaration_expected); - case 19 /* TypeParameters */: - return parseErrorAtCurrentToken(Diagnostics.Type_parameter_declaration_expected); - case 20 /* TypeArguments */: - return parseErrorAtCurrentToken(Diagnostics.Type_argument_expected); - case 21 /* TupleElementTypes */: - return parseErrorAtCurrentToken(Diagnostics.Type_expected); - case 22 /* HeritageClauses */: - return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_expected); - case 23 /* ImportOrExportSpecifiers */: - if (token() === 161 /* FromKeyword */) { - return parseErrorAtCurrentToken(Diagnostics._0_expected, "}"); - } - return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); - case 13 /* JsxAttributes */: - return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); - case 14 /* JsxChildren */: - return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); - case 24 /* AssertEntries */: - return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected); - case 25 /* JSDocComment */: - return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); - case 26 /* Count */: - return Debug.fail("ParsingContext.Count used as a context"); - default: - Debug.assertNever(context); - } - } - function parseDelimitedList(kind, parseElement, considerSemicolonAsDelimiter) { - const saveParsingContext = parsingContext; - parsingContext |= 1 << kind; - const list = []; - const listPos = getNodePos(); - let commaStart = -1; - while (true) { - if (isListElement2( - kind, - /*inErrorRecovery*/ - false - )) { - const startPos = scanner2.getTokenFullStart(); - const result = parseListElement(kind, parseElement); - if (!result) { - parsingContext = saveParsingContext; - return void 0; - } - list.push(result); - commaStart = scanner2.getTokenStart(); - if (parseOptional(28 /* CommaToken */)) { - continue; - } - commaStart = -1; - if (isListTerminator(kind)) { - break; - } - parseExpected(28 /* CommaToken */, getExpectedCommaDiagnostic(kind)); - if (considerSemicolonAsDelimiter && token() === 27 /* SemicolonToken */ && !scanner2.hasPrecedingLineBreak()) { - nextToken(); - } - if (startPos === scanner2.getTokenFullStart()) { - nextToken(); - } - continue; - } - if (isListTerminator(kind)) { - break; - } - if (abortParsingListOrMoveToNextToken(kind)) { - break; - } - } - parsingContext = saveParsingContext; - return createNodeArray( - list, - listPos, - /*end*/ - void 0, - commaStart >= 0 - ); - } - function getExpectedCommaDiagnostic(kind) { - return kind === 6 /* EnumMembers */ ? Diagnostics.An_enum_member_name_must_be_followed_by_a_or : void 0; - } - function createMissingList() { - const list = createNodeArray([], getNodePos()); - list.isMissingList = true; - return list; - } - function isMissingList(arr) { - return !!arr.isMissingList; - } - function parseBracketedList(kind, parseElement, open, close) { - if (parseExpected(open)) { - const result = parseDelimitedList(kind, parseElement); - parseExpected(close); - return result; - } - return createMissingList(); - } - function parseEntityName(allowReservedWords, diagnosticMessage) { - const pos = getNodePos(); - let entity = allowReservedWords ? parseIdentifierName(diagnosticMessage) : parseIdentifier(diagnosticMessage); - while (parseOptional(25 /* DotToken */)) { - if (token() === 30 /* LessThanToken */) { - break; - } - entity = finishNode( - factory2.createQualifiedName( - entity, - parseRightSideOfDot( - allowReservedWords, - /*allowPrivateIdentifiers*/ - false - ) - ), - pos - ); - } - return entity; - } - function createQualifiedName(entity, name) { - return finishNode(factory2.createQualifiedName(entity, name), entity.pos); - } - function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers) { - if (scanner2.hasPrecedingLineBreak() && tokenIsIdentifierOrKeyword(token())) { - const matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - if (matchesPattern) { - return createMissingNode( - 80 /* Identifier */, - /*reportAtCurrentPosition*/ - true, - Diagnostics.Identifier_expected - ); - } - } - if (token() === 81 /* PrivateIdentifier */) { - const node = parsePrivateIdentifier(); - return allowPrivateIdentifiers ? node : createMissingNode( - 80 /* Identifier */, - /*reportAtCurrentPosition*/ - true, - Diagnostics.Identifier_expected - ); - } - return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); - } - function parseTemplateSpans(isTaggedTemplate) { - const pos = getNodePos(); - const list = []; - let node; - do { - node = parseTemplateSpan(isTaggedTemplate); - list.push(node); - } while (node.literal.kind === 17 /* TemplateMiddle */); - return createNodeArray(list, pos); - } - function parseTemplateExpression(isTaggedTemplate) { - const pos = getNodePos(); - return finishNode( - factory2.createTemplateExpression( - parseTemplateHead(isTaggedTemplate), - parseTemplateSpans(isTaggedTemplate) - ), - pos - ); - } - function parseTemplateType() { - const pos = getNodePos(); - return finishNode( - factory2.createTemplateLiteralType( - parseTemplateHead( - /*isTaggedTemplate*/ - false - ), - parseTemplateTypeSpans() - ), - pos - ); - } - function parseTemplateTypeSpans() { - const pos = getNodePos(); - const list = []; - let node; - do { - node = parseTemplateTypeSpan(); - list.push(node); - } while (node.literal.kind === 17 /* TemplateMiddle */); - return createNodeArray(list, pos); - } - function parseTemplateTypeSpan() { - const pos = getNodePos(); - return finishNode( - factory2.createTemplateLiteralTypeSpan( - parseType(), - parseLiteralOfTemplateSpan( - /*isTaggedTemplate*/ - false - ) - ), - pos - ); - } - function parseLiteralOfTemplateSpan(isTaggedTemplate) { - if (token() === 20 /* CloseBraceToken */) { - reScanTemplateToken(isTaggedTemplate); - return parseTemplateMiddleOrTemplateTail(); - } else { - return parseExpectedToken(18 /* TemplateTail */, Diagnostics._0_expected, tokenToString(20 /* CloseBraceToken */)); - } - } - function parseTemplateSpan(isTaggedTemplate) { - const pos = getNodePos(); - return finishNode( - factory2.createTemplateSpan( - allowInAnd(parseExpression), - parseLiteralOfTemplateSpan(isTaggedTemplate) - ), - pos - ); - } - function parseLiteralNode() { - return parseLiteralLikeNode(token()); - } - function parseTemplateHead(isTaggedTemplate) { - if (!isTaggedTemplate && scanner2.getTokenFlags() & 26656 /* IsInvalid */) { - reScanTemplateToken( - /*isTaggedTemplate*/ - false - ); - } - const fragment = parseLiteralLikeNode(token()); - Debug.assert(fragment.kind === 16 /* TemplateHead */, "Template head has wrong token kind"); - return fragment; - } - function parseTemplateMiddleOrTemplateTail() { - const fragment = parseLiteralLikeNode(token()); - Debug.assert(fragment.kind === 17 /* TemplateMiddle */ || fragment.kind === 18 /* TemplateTail */, "Template fragment has wrong token kind"); - return fragment; - } - function getTemplateLiteralRawText(kind) { - const isLast = kind === 15 /* NoSubstitutionTemplateLiteral */ || kind === 18 /* TemplateTail */; - const tokenText = scanner2.getTokenText(); - return tokenText.substring(1, tokenText.length - (scanner2.isUnterminated() ? 0 : isLast ? 1 : 2)); - } - function parseLiteralLikeNode(kind) { - const pos = getNodePos(); - const node = isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, scanner2.getTokenValue(), getTemplateLiteralRawText(kind), scanner2.getTokenFlags() & 7176 /* TemplateLiteralLikeFlags */) : ( - // Note that theoretically the following condition would hold true literals like 009, - // which is not octal. But because of how the scanner separates the tokens, we would - // never get a token like this. Instead, we would get 00 and 9 as two separate tokens. - // We also do not need to check for negatives because any prefix operator would be part of a - // parent unary expression. - kind === 9 /* NumericLiteral */ ? factoryCreateNumericLiteral(scanner2.getTokenValue(), scanner2.getNumericLiteralFlags()) : kind === 11 /* StringLiteral */ ? factoryCreateStringLiteral( - scanner2.getTokenValue(), - /*isSingleQuote*/ - void 0, - scanner2.hasExtendedUnicodeEscape() - ) : isLiteralKind(kind) ? factoryCreateLiteralLikeNode(kind, scanner2.getTokenValue()) : Debug.fail() - ); - if (scanner2.hasExtendedUnicodeEscape()) { - node.hasExtendedUnicodeEscape = true; - } - if (scanner2.isUnterminated()) { - node.isUnterminated = true; - } - nextToken(); - return finishNode(node, pos); - } - function parseEntityNameOfTypeReference() { - return parseEntityName( - /*allowReservedWords*/ - true, - Diagnostics.Type_expected - ); - } - function parseTypeArgumentsOfTypeReference() { - if (!scanner2.hasPrecedingLineBreak() && reScanLessThanToken() === 30 /* LessThanToken */) { - return parseBracketedList(20 /* TypeArguments */, parseType, 30 /* LessThanToken */, 32 /* GreaterThanToken */); - } - } - function parseTypeReference() { - const pos = getNodePos(); - return finishNode( - factory2.createTypeReferenceNode( - parseEntityNameOfTypeReference(), - parseTypeArgumentsOfTypeReference() - ), - pos - ); - } - function typeHasArrowFunctionBlockingParseError(node) { - switch (node.kind) { - case 183 /* TypeReference */: - return nodeIsMissing(node.typeName); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: { - const { parameters, type } = node; - return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type); - } - case 196 /* ParenthesizedType */: - return typeHasArrowFunctionBlockingParseError(node.type); - default: - return false; - } - } - function parseThisTypePredicate(lhs) { - nextToken(); - return finishNode(factory2.createTypePredicateNode( - /*assertsModifier*/ - void 0, - lhs, - parseType() - ), lhs.pos); - } - function parseThisTypeNode() { - const pos = getNodePos(); - nextToken(); - return finishNode(factory2.createThisTypeNode(), pos); - } - function parseJSDocAllType() { - const pos = getNodePos(); - nextToken(); - return finishNode(factory2.createJSDocAllType(), pos); - } - function parseJSDocNonNullableType() { - const pos = getNodePos(); - nextToken(); - return finishNode(factory2.createJSDocNonNullableType( - parseNonArrayType(), - /*postfix*/ - false - ), pos); - } - function parseJSDocUnknownOrNullableType() { - const pos = getNodePos(); - nextToken(); - if (token() === 28 /* CommaToken */ || token() === 20 /* CloseBraceToken */ || token() === 22 /* CloseParenToken */ || token() === 32 /* GreaterThanToken */ || token() === 64 /* EqualsToken */ || token() === 52 /* BarToken */) { - return finishNode(factory2.createJSDocUnknownType(), pos); - } else { - return finishNode(factory2.createJSDocNullableType( - parseType(), - /*postfix*/ - false - ), pos); - } - } - function parseJSDocFunctionType() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - if (lookAhead(nextTokenIsOpenParen)) { - nextToken(); - const parameters = parseParameters(4 /* Type */ | 32 /* JSDoc */); - const type = parseReturnType( - 59 /* ColonToken */, - /*isType*/ - false - ); - return withJSDoc(finishNode(factory2.createJSDocFunctionType(parameters, type), pos), hasJSDoc); - } - return finishNode(factory2.createTypeReferenceNode( - parseIdentifierName(), - /*typeArguments*/ - void 0 - ), pos); - } - function parseJSDocParameter() { - const pos = getNodePos(); - let name; - if (token() === 110 /* ThisKeyword */ || token() === 105 /* NewKeyword */) { - name = parseIdentifierName(); - parseExpected(59 /* ColonToken */); - } - return finishNode( - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - // TODO(rbuckton): JSDoc parameters don't have names (except `this`/`new`), should we manufacture an empty identifier? - name, - /*questionToken*/ - void 0, - parseJSDocType(), - /*initializer*/ - void 0 - ), - pos - ); - } - function parseJSDocType() { - scanner2.setInJSDocType(true); - const pos = getNodePos(); - if (parseOptional(144 /* ModuleKeyword */)) { - const moduleTag = factory2.createJSDocNamepathType( - /*type*/ - void 0 - ); - terminate: - while (true) { - switch (token()) { - case 20 /* CloseBraceToken */: - case 1 /* EndOfFileToken */: - case 28 /* CommaToken */: - case 5 /* WhitespaceTrivia */: - break terminate; - default: - nextTokenJSDoc(); - } - } - scanner2.setInJSDocType(false); - return finishNode(moduleTag, pos); - } - const hasDotDotDot = parseOptional(26 /* DotDotDotToken */); - let type = parseTypeOrTypePredicate(); - scanner2.setInJSDocType(false); - if (hasDotDotDot) { - type = finishNode(factory2.createJSDocVariadicType(type), pos); - } - if (token() === 64 /* EqualsToken */) { - nextToken(); - return finishNode(factory2.createJSDocOptionalType(type), pos); - } - return type; - } - function parseTypeQuery() { - const pos = getNodePos(); - parseExpected(114 /* TypeOfKeyword */); - const entityName = parseEntityName( - /*allowReservedWords*/ - true - ); - const typeArguments = !scanner2.hasPrecedingLineBreak() ? tryParseTypeArguments() : void 0; - return finishNode(factory2.createTypeQueryNode(entityName, typeArguments), pos); - } - function parseTypeParameter() { - const pos = getNodePos(); - const modifiers = parseModifiers( - /*allowDecorators*/ - false, - /*permitConstAsModifier*/ - true - ); - const name = parseIdentifier(); - let constraint; - let expression; - if (parseOptional(96 /* ExtendsKeyword */)) { - if (isStartOfType() || !isStartOfExpression()) { - constraint = parseType(); - } else { - expression = parseUnaryExpressionOrHigher(); - } - } - const defaultType = parseOptional(64 /* EqualsToken */) ? parseType() : void 0; - const node = factory2.createTypeParameterDeclaration(modifiers, name, constraint, defaultType); - node.expression = expression; - return finishNode(node, pos); - } - function parseTypeParameters() { - if (token() === 30 /* LessThanToken */) { - return parseBracketedList(19 /* TypeParameters */, parseTypeParameter, 30 /* LessThanToken */, 32 /* GreaterThanToken */); - } - } - function isStartOfParameter(isJSDocParameter) { - return token() === 26 /* DotDotDotToken */ || isBindingIdentifierOrPrivateIdentifierOrPattern() || isModifierKind(token()) || token() === 60 /* AtToken */ || isStartOfType( - /*inStartOfParameter*/ - !isJSDocParameter - ); - } - function parseNameOfParameter(modifiers) { - const name = parseIdentifierOrPattern(Diagnostics.Private_identifiers_cannot_be_used_as_parameters); - if (getFullWidth(name) === 0 && !some(modifiers) && isModifierKind(token())) { - nextToken(); - } - return name; - } - function isParameterNameStart() { - return isBindingIdentifier() || token() === 23 /* OpenBracketToken */ || token() === 19 /* OpenBraceToken */; - } - function parseParameter(inOuterAwaitContext) { - return parseParameterWorker(inOuterAwaitContext); - } - function parseParameterForSpeculation(inOuterAwaitContext) { - return parseParameterWorker( - inOuterAwaitContext, - /*allowAmbiguity*/ - false - ); - } - function parseParameterWorker(inOuterAwaitContext, allowAmbiguity = true) { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const modifiers = inOuterAwaitContext ? doInAwaitContext(() => parseModifiers( - /*allowDecorators*/ - true - )) : doOutsideOfAwaitContext(() => parseModifiers( - /*allowDecorators*/ - true - )); - if (token() === 110 /* ThisKeyword */) { - const node2 = factory2.createParameterDeclaration( - modifiers, - /*dotDotDotToken*/ - void 0, - createIdentifier( - /*isIdentifier*/ - true - ), - /*questionToken*/ - void 0, - parseTypeAnnotation(), - /*initializer*/ - void 0 - ); - const modifier = firstOrUndefined(modifiers); - if (modifier) { - parseErrorAtRange(modifier, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); - } - return withJSDoc(finishNode(node2, pos), hasJSDoc); - } - const savedTopLevel = topLevel; - topLevel = false; - const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); - if (!allowAmbiguity && !isParameterNameStart()) { - return void 0; - } - const node = withJSDoc( - finishNode( - factory2.createParameterDeclaration( - modifiers, - dotDotDotToken, - parseNameOfParameter(modifiers), - parseOptionalToken(58 /* QuestionToken */), - parseTypeAnnotation(), - parseInitializer() - ), - pos - ), - hasJSDoc - ); - topLevel = savedTopLevel; - return node; - } - function parseReturnType(returnToken, isType) { - if (shouldParseReturnType(returnToken, isType)) { - return allowConditionalTypesAnd(parseTypeOrTypePredicate); - } - } - function shouldParseReturnType(returnToken, isType) { - if (returnToken === 39 /* EqualsGreaterThanToken */) { - parseExpected(returnToken); - return true; - } else if (parseOptional(59 /* ColonToken */)) { - return true; - } else if (isType && token() === 39 /* EqualsGreaterThanToken */) { - parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(59 /* ColonToken */)); - nextToken(); - return true; - } - return false; - } - function parseParametersWorker(flags, allowAmbiguity) { - const savedYieldContext = inYieldContext(); - const savedAwaitContext = inAwaitContext(); - setYieldContext(!!(flags & 1 /* Yield */)); - setAwaitContext(!!(flags & 2 /* Await */)); - const parameters = flags & 32 /* JSDoc */ ? parseDelimitedList(17 /* JSDocParameters */, parseJSDocParameter) : parseDelimitedList(16 /* Parameters */, () => allowAmbiguity ? parseParameter(savedAwaitContext) : parseParameterForSpeculation(savedAwaitContext)); - setYieldContext(savedYieldContext); - setAwaitContext(savedAwaitContext); - return parameters; - } - function parseParameters(flags) { - if (!parseExpected(21 /* OpenParenToken */)) { - return createMissingList(); - } - const parameters = parseParametersWorker( - flags, - /*allowAmbiguity*/ - true - ); - parseExpected(22 /* CloseParenToken */); - return parameters; - } - function parseTypeMemberSemicolon() { - if (parseOptional(28 /* CommaToken */)) { - return; - } - parseSemicolon(); - } - function parseSignatureMember(kind) { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - if (kind === 180 /* ConstructSignature */) { - parseExpected(105 /* NewKeyword */); - } - const typeParameters = parseTypeParameters(); - const parameters = parseParameters(4 /* Type */); - const type = parseReturnType( - 59 /* ColonToken */, - /*isType*/ - true - ); - parseTypeMemberSemicolon(); - const node = kind === 179 /* CallSignature */ ? factory2.createCallSignature(typeParameters, parameters, type) : factory2.createConstructSignature(typeParameters, parameters, type); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function isIndexSignature() { - return token() === 23 /* OpenBracketToken */ && lookAhead(isUnambiguouslyIndexSignature); - } - function isUnambiguouslyIndexSignature() { - nextToken(); - if (token() === 26 /* DotDotDotToken */ || token() === 24 /* CloseBracketToken */) { - return true; - } - if (isModifierKind(token())) { - nextToken(); - if (isIdentifier2()) { - return true; - } - } else if (!isIdentifier2()) { - return false; - } else { - nextToken(); - } - if (token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */) { - return true; - } - if (token() !== 58 /* QuestionToken */) { - return false; - } - nextToken(); - return token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */ || token() === 24 /* CloseBracketToken */; - } - function parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers) { - const parameters = parseBracketedList(16 /* Parameters */, () => parseParameter( - /*inOuterAwaitContext*/ - false - ), 23 /* OpenBracketToken */, 24 /* CloseBracketToken */); - const type = parseTypeAnnotation(); - parseTypeMemberSemicolon(); - const node = factory2.createIndexSignature(modifiers, parameters, type); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers) { - const name = parsePropertyName(); - const questionToken = parseOptionalToken(58 /* QuestionToken */); - let node; - if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - const typeParameters = parseTypeParameters(); - const parameters = parseParameters(4 /* Type */); - const type = parseReturnType( - 59 /* ColonToken */, - /*isType*/ - true - ); - node = factory2.createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type); - } else { - const type = parseTypeAnnotation(); - node = factory2.createPropertySignature(modifiers, name, questionToken, type); - if (token() === 64 /* EqualsToken */) - node.initializer = parseInitializer(); - } - parseTypeMemberSemicolon(); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function isTypeMemberStart() { - if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */ || token() === 139 /* GetKeyword */ || token() === 153 /* SetKeyword */) { - return true; - } - let idToken = false; - while (isModifierKind(token())) { - idToken = true; - nextToken(); - } - if (token() === 23 /* OpenBracketToken */) { - return true; - } - if (isLiteralPropertyName()) { - idToken = true; - nextToken(); - } - if (idToken) { - return token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */ || token() === 58 /* QuestionToken */ || token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */ || canParseSemicolon(); - } - return false; - } - function parseTypeMember() { - if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - return parseSignatureMember(179 /* CallSignature */); - } - if (token() === 105 /* NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) { - return parseSignatureMember(180 /* ConstructSignature */); - } - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const modifiers = parseModifiers( - /*allowDecorators*/ - false - ); - if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 4 /* Type */); - } - if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 4 /* Type */); - } - if (isIndexSignature()) { - return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); - } - return parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers); - } - function nextTokenIsOpenParenOrLessThan() { - nextToken(); - return token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */; - } - function nextTokenIsDot() { - return nextToken() === 25 /* DotToken */; - } - function nextTokenIsOpenParenOrLessThanOrDot() { - switch (nextToken()) { - case 21 /* OpenParenToken */: - case 30 /* LessThanToken */: - case 25 /* DotToken */: - return true; - } - return false; - } - function parseTypeLiteral() { - const pos = getNodePos(); - return finishNode(factory2.createTypeLiteralNode(parseObjectTypeMembers()), pos); - } - function parseObjectTypeMembers() { - let members; - if (parseExpected(19 /* OpenBraceToken */)) { - members = parseList(4 /* TypeMembers */, parseTypeMember); - parseExpected(20 /* CloseBraceToken */); - } else { - members = createMissingList(); - } - return members; - } - function isStartOfMappedType() { - nextToken(); - if (token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) { - return nextToken() === 148 /* ReadonlyKeyword */; - } - if (token() === 148 /* ReadonlyKeyword */) { - nextToken(); - } - return token() === 23 /* OpenBracketToken */ && nextTokenIsIdentifier() && nextToken() === 103 /* InKeyword */; - } - function parseMappedTypeParameter() { - const pos = getNodePos(); - const name = parseIdentifierName(); - parseExpected(103 /* InKeyword */); - const type = parseType(); - return finishNode(factory2.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - name, - type, - /*defaultType*/ - void 0 - ), pos); - } - function parseMappedType() { - const pos = getNodePos(); - parseExpected(19 /* OpenBraceToken */); - let readonlyToken; - if (token() === 148 /* ReadonlyKeyword */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) { - readonlyToken = parseTokenNode(); - if (readonlyToken.kind !== 148 /* ReadonlyKeyword */) { - parseExpected(148 /* ReadonlyKeyword */); - } - } - parseExpected(23 /* OpenBracketToken */); - const typeParameter = parseMappedTypeParameter(); - const nameType = parseOptional(130 /* AsKeyword */) ? parseType() : void 0; - parseExpected(24 /* CloseBracketToken */); - let questionToken; - if (token() === 58 /* QuestionToken */ || token() === 40 /* PlusToken */ || token() === 41 /* MinusToken */) { - questionToken = parseTokenNode(); - if (questionToken.kind !== 58 /* QuestionToken */) { - parseExpected(58 /* QuestionToken */); - } - } - const type = parseTypeAnnotation(); - parseSemicolon(); - const members = parseList(4 /* TypeMembers */, parseTypeMember); - parseExpected(20 /* CloseBraceToken */); - return finishNode(factory2.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos); - } - function parseTupleElementType() { - const pos = getNodePos(); - if (parseOptional(26 /* DotDotDotToken */)) { - return finishNode(factory2.createRestTypeNode(parseType()), pos); - } - const type = parseType(); - if (isJSDocNullableType(type) && type.pos === type.type.pos) { - const node = factory2.createOptionalTypeNode(type.type); - setTextRange(node, type); - node.flags = type.flags; - return node; - } - return type; - } - function isNextTokenColonOrQuestionColon() { - return nextToken() === 59 /* ColonToken */ || token() === 58 /* QuestionToken */ && nextToken() === 59 /* ColonToken */; - } - function isTupleElementName() { - if (token() === 26 /* DotDotDotToken */) { - return tokenIsIdentifierOrKeyword(nextToken()) && isNextTokenColonOrQuestionColon(); - } - return tokenIsIdentifierOrKeyword(token()) && isNextTokenColonOrQuestionColon(); - } - function parseTupleElementNameOrTupleElementType() { - if (lookAhead(isTupleElementName)) { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); - const name = parseIdentifierName(); - const questionToken = parseOptionalToken(58 /* QuestionToken */); - parseExpected(59 /* ColonToken */); - const type = parseTupleElementType(); - const node = factory2.createNamedTupleMember(dotDotDotToken, name, questionToken, type); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - return parseTupleElementType(); - } - function parseTupleType() { - const pos = getNodePos(); - return finishNode( - factory2.createTupleTypeNode( - parseBracketedList(21 /* TupleElementTypes */, parseTupleElementNameOrTupleElementType, 23 /* OpenBracketToken */, 24 /* CloseBracketToken */) - ), - pos - ); - } - function parseParenthesizedType() { - const pos = getNodePos(); - parseExpected(21 /* OpenParenToken */); - const type = parseType(); - parseExpected(22 /* CloseParenToken */); - return finishNode(factory2.createParenthesizedType(type), pos); - } - function parseModifiersForConstructorType() { - let modifiers; - if (token() === 128 /* AbstractKeyword */) { - const pos = getNodePos(); - nextToken(); - const modifier = finishNode(factoryCreateToken(128 /* AbstractKeyword */), pos); - modifiers = createNodeArray([modifier], pos); - } - return modifiers; - } - function parseFunctionOrConstructorType() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const modifiers = parseModifiersForConstructorType(); - const isConstructorType = parseOptional(105 /* NewKeyword */); - Debug.assert(!modifiers || isConstructorType, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers."); - const typeParameters = parseTypeParameters(); - const parameters = parseParameters(4 /* Type */); - const type = parseReturnType( - 39 /* EqualsGreaterThanToken */, - /*isType*/ - false - ); - const node = isConstructorType ? factory2.createConstructorTypeNode(modifiers, typeParameters, parameters, type) : factory2.createFunctionTypeNode(typeParameters, parameters, type); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseKeywordAndNoDot() { - const node = parseTokenNode(); - return token() === 25 /* DotToken */ ? void 0 : node; - } - function parseLiteralTypeNode(negative) { - const pos = getNodePos(); - if (negative) { - nextToken(); - } - let expression = token() === 112 /* TrueKeyword */ || token() === 97 /* FalseKeyword */ || token() === 106 /* NullKeyword */ ? parseTokenNode() : parseLiteralLikeNode(token()); - if (negative) { - expression = finishNode(factory2.createPrefixUnaryExpression(41 /* MinusToken */, expression), pos); - } - return finishNode(factory2.createLiteralTypeNode(expression), pos); - } - function isStartOfTypeOfImportType() { - nextToken(); - return token() === 102 /* ImportKeyword */; - } - function parseImportTypeAssertions() { - const pos = getNodePos(); - const openBracePosition = scanner2.getTokenStart(); - parseExpected(19 /* OpenBraceToken */); - const multiLine = scanner2.hasPrecedingLineBreak(); - parseExpected(132 /* AssertKeyword */); - parseExpected(59 /* ColonToken */); - const clause = parseAssertClause( - /*skipAssertKeyword*/ - true - ); - if (!parseExpected(20 /* CloseBraceToken */)) { - const lastError = lastOrUndefined(parseDiagnostics); - if (lastError && lastError.code === Diagnostics._0_expected.code) { - addRelatedInfo( - lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") - ); - } - } - return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); - } - function parseImportType() { - sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; - const pos = getNodePos(); - const isTypeOf = parseOptional(114 /* TypeOfKeyword */); - parseExpected(102 /* ImportKeyword */); - parseExpected(21 /* OpenParenToken */); - const type = parseType(); - let assertions; - if (parseOptional(28 /* CommaToken */)) { - assertions = parseImportTypeAssertions(); - } - parseExpected(22 /* CloseParenToken */); - const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0; - const typeArguments = parseTypeArgumentsOfTypeReference(); - return finishNode(factory2.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos); - } - function nextTokenIsNumericOrBigIntLiteral() { - nextToken(); - return token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */; - } - function parseNonArrayType() { - switch (token()) { - case 133 /* AnyKeyword */: - case 159 /* UnknownKeyword */: - case 154 /* StringKeyword */: - case 150 /* NumberKeyword */: - case 163 /* BigIntKeyword */: - case 155 /* SymbolKeyword */: - case 136 /* BooleanKeyword */: - case 157 /* UndefinedKeyword */: - case 146 /* NeverKeyword */: - case 151 /* ObjectKeyword */: - return tryParse(parseKeywordAndNoDot) || parseTypeReference(); - case 67 /* AsteriskEqualsToken */: - scanner2.reScanAsteriskEqualsToken(); - case 42 /* AsteriskToken */: - return parseJSDocAllType(); - case 61 /* QuestionQuestionToken */: - scanner2.reScanQuestionToken(); - case 58 /* QuestionToken */: - return parseJSDocUnknownOrNullableType(); - case 100 /* FunctionKeyword */: - return parseJSDocFunctionType(); - case 54 /* ExclamationToken */: - return parseJSDocNonNullableType(); - case 15 /* NoSubstitutionTemplateLiteral */: - case 11 /* StringLiteral */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 106 /* NullKeyword */: - return parseLiteralTypeNode(); - case 41 /* MinusToken */: - return lookAhead(nextTokenIsNumericOrBigIntLiteral) ? parseLiteralTypeNode( - /*negative*/ - true - ) : parseTypeReference(); - case 116 /* VoidKeyword */: - return parseTokenNode(); - case 110 /* ThisKeyword */: { - const thisKeyword = parseThisTypeNode(); - if (token() === 142 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { - return parseThisTypePredicate(thisKeyword); - } else { - return thisKeyword; - } - } - case 114 /* TypeOfKeyword */: - return lookAhead(isStartOfTypeOfImportType) ? parseImportType() : parseTypeQuery(); - case 19 /* OpenBraceToken */: - return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral(); - case 23 /* OpenBracketToken */: - return parseTupleType(); - case 21 /* OpenParenToken */: - return parseParenthesizedType(); - case 102 /* ImportKeyword */: - return parseImportType(); - case 131 /* AssertsKeyword */: - return lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine) ? parseAssertsTypePredicate() : parseTypeReference(); - case 16 /* TemplateHead */: - return parseTemplateType(); - default: - return parseTypeReference(); - } - } - function isStartOfType(inStartOfParameter) { - switch (token()) { - case 133 /* AnyKeyword */: - case 159 /* UnknownKeyword */: - case 154 /* StringKeyword */: - case 150 /* NumberKeyword */: - case 163 /* BigIntKeyword */: - case 136 /* BooleanKeyword */: - case 148 /* ReadonlyKeyword */: - case 155 /* SymbolKeyword */: - case 158 /* UniqueKeyword */: - case 116 /* VoidKeyword */: - case 157 /* UndefinedKeyword */: - case 106 /* NullKeyword */: - case 110 /* ThisKeyword */: - case 114 /* TypeOfKeyword */: - case 146 /* NeverKeyword */: - case 19 /* OpenBraceToken */: - case 23 /* OpenBracketToken */: - case 30 /* LessThanToken */: - case 52 /* BarToken */: - case 51 /* AmpersandToken */: - case 105 /* NewKeyword */: - case 11 /* StringLiteral */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 151 /* ObjectKeyword */: - case 42 /* AsteriskToken */: - case 58 /* QuestionToken */: - case 54 /* ExclamationToken */: - case 26 /* DotDotDotToken */: - case 140 /* InferKeyword */: - case 102 /* ImportKeyword */: - case 131 /* AssertsKeyword */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 16 /* TemplateHead */: - return true; - case 100 /* FunctionKeyword */: - return !inStartOfParameter; - case 41 /* MinusToken */: - return !inStartOfParameter && lookAhead(nextTokenIsNumericOrBigIntLiteral); - case 21 /* OpenParenToken */: - return !inStartOfParameter && lookAhead(isStartOfParenthesizedOrFunctionType); - default: - return isIdentifier2(); - } - } - function isStartOfParenthesizedOrFunctionType() { - nextToken(); - return token() === 22 /* CloseParenToken */ || isStartOfParameter( - /*isJSDocParameter*/ - false - ) || isStartOfType(); - } - function parsePostfixTypeOrHigher() { - const pos = getNodePos(); - let type = parseNonArrayType(); - while (!scanner2.hasPrecedingLineBreak()) { - switch (token()) { - case 54 /* ExclamationToken */: - nextToken(); - type = finishNode(factory2.createJSDocNonNullableType( - type, - /*postfix*/ - true - ), pos); - break; - case 58 /* QuestionToken */: - if (lookAhead(nextTokenIsStartOfType)) { - return type; - } - nextToken(); - type = finishNode(factory2.createJSDocNullableType( - type, - /*postfix*/ - true - ), pos); - break; - case 23 /* OpenBracketToken */: - parseExpected(23 /* OpenBracketToken */); - if (isStartOfType()) { - const indexType = parseType(); - parseExpected(24 /* CloseBracketToken */); - type = finishNode(factory2.createIndexedAccessTypeNode(type, indexType), pos); - } else { - parseExpected(24 /* CloseBracketToken */); - type = finishNode(factory2.createArrayTypeNode(type), pos); - } - break; - default: - return type; - } - } - return type; - } - function parseTypeOperator(operator) { - const pos = getNodePos(); - parseExpected(operator); - return finishNode(factory2.createTypeOperatorNode(operator, parseTypeOperatorOrHigher()), pos); - } - function tryParseConstraintOfInferType() { - if (parseOptional(96 /* ExtendsKeyword */)) { - const constraint = disallowConditionalTypesAnd(parseType); - if (inDisallowConditionalTypesContext() || token() !== 58 /* QuestionToken */) { - return constraint; - } - } - } - function parseTypeParameterOfInferType() { - const pos = getNodePos(); - const name = parseIdentifier(); - const constraint = tryParse(tryParseConstraintOfInferType); - const node = factory2.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - name, - constraint - ); - return finishNode(node, pos); - } - function parseInferType() { - const pos = getNodePos(); - parseExpected(140 /* InferKeyword */); - return finishNode(factory2.createInferTypeNode(parseTypeParameterOfInferType()), pos); - } - function parseTypeOperatorOrHigher() { - const operator = token(); - switch (operator) { - case 143 /* KeyOfKeyword */: - case 158 /* UniqueKeyword */: - case 148 /* ReadonlyKeyword */: - return parseTypeOperator(operator); - case 140 /* InferKeyword */: - return parseInferType(); - } - return allowConditionalTypesAnd(parsePostfixTypeOrHigher); - } - function parseFunctionOrConstructorTypeToError(isInUnionType) { - if (isStartOfFunctionTypeOrConstructorType()) { - const type = parseFunctionOrConstructorType(); - let diagnostic; - if (isFunctionTypeNode(type)) { - diagnostic = isInUnionType ? Diagnostics.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type : Diagnostics.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type; - } else { - diagnostic = isInUnionType ? Diagnostics.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type : Diagnostics.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type; - } - parseErrorAtRange(type, diagnostic); - return type; - } - return void 0; - } - function parseUnionOrIntersectionType(operator, parseConstituentType, createTypeNode) { - const pos = getNodePos(); - const isUnionType = operator === 52 /* BarToken */; - const hasLeadingOperator = parseOptional(operator); - let type = hasLeadingOperator && parseFunctionOrConstructorTypeToError(isUnionType) || parseConstituentType(); - if (token() === operator || hasLeadingOperator) { - const types = [type]; - while (parseOptional(operator)) { - types.push(parseFunctionOrConstructorTypeToError(isUnionType) || parseConstituentType()); - } - type = finishNode(createTypeNode(createNodeArray(types, pos)), pos); - } - return type; - } - function parseIntersectionTypeOrHigher() { - return parseUnionOrIntersectionType(51 /* AmpersandToken */, parseTypeOperatorOrHigher, factory2.createIntersectionTypeNode); - } - function parseUnionTypeOrHigher() { - return parseUnionOrIntersectionType(52 /* BarToken */, parseIntersectionTypeOrHigher, factory2.createUnionTypeNode); - } - function nextTokenIsNewKeyword() { - nextToken(); - return token() === 105 /* NewKeyword */; - } - function isStartOfFunctionTypeOrConstructorType() { - if (token() === 30 /* LessThanToken */) { - return true; - } - if (token() === 21 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType)) { - return true; - } - return token() === 105 /* NewKeyword */ || token() === 128 /* AbstractKeyword */ && lookAhead(nextTokenIsNewKeyword); - } - function skipParameterStart() { - if (isModifierKind(token())) { - parseModifiers( - /*allowDecorators*/ - false - ); - } - if (isIdentifier2() || token() === 110 /* ThisKeyword */) { - nextToken(); - return true; - } - if (token() === 23 /* OpenBracketToken */ || token() === 19 /* OpenBraceToken */) { - const previousErrorCount = parseDiagnostics.length; - parseIdentifierOrPattern(); - return previousErrorCount === parseDiagnostics.length; - } - return false; - } - function isUnambiguouslyStartOfFunctionType() { - nextToken(); - if (token() === 22 /* CloseParenToken */ || token() === 26 /* DotDotDotToken */) { - return true; - } - if (skipParameterStart()) { - if (token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */ || token() === 58 /* QuestionToken */ || token() === 64 /* EqualsToken */) { - return true; - } - if (token() === 22 /* CloseParenToken */) { - nextToken(); - if (token() === 39 /* EqualsGreaterThanToken */) { - return true; - } - } - } - return false; - } - function parseTypeOrTypePredicate() { - const pos = getNodePos(); - const typePredicateVariable = isIdentifier2() && tryParse(parseTypePredicatePrefix); - const type = parseType(); - if (typePredicateVariable) { - return finishNode(factory2.createTypePredicateNode( - /*assertsModifier*/ - void 0, - typePredicateVariable, - type - ), pos); - } else { - return type; - } - } - function parseTypePredicatePrefix() { - const id = parseIdentifier(); - if (token() === 142 /* IsKeyword */ && !scanner2.hasPrecedingLineBreak()) { - nextToken(); - return id; - } - } - function parseAssertsTypePredicate() { - const pos = getNodePos(); - const assertsModifier = parseExpectedToken(131 /* AssertsKeyword */); - const parameterName = token() === 110 /* ThisKeyword */ ? parseThisTypeNode() : parseIdentifier(); - const type = parseOptional(142 /* IsKeyword */) ? parseType() : void 0; - return finishNode(factory2.createTypePredicateNode(assertsModifier, parameterName, type), pos); - } - function parseType() { - if (contextFlags & 81920 /* TypeExcludesFlags */) { - return doOutsideOfContext(81920 /* TypeExcludesFlags */, parseType); - } - if (isStartOfFunctionTypeOrConstructorType()) { - return parseFunctionOrConstructorType(); - } - const pos = getNodePos(); - const type = parseUnionTypeOrHigher(); - if (!inDisallowConditionalTypesContext() && !scanner2.hasPrecedingLineBreak() && parseOptional(96 /* ExtendsKeyword */)) { - const extendsType = disallowConditionalTypesAnd(parseType); - parseExpected(58 /* QuestionToken */); - const trueType = allowConditionalTypesAnd(parseType); - parseExpected(59 /* ColonToken */); - const falseType = allowConditionalTypesAnd(parseType); - return finishNode(factory2.createConditionalTypeNode(type, extendsType, trueType, falseType), pos); - } - return type; - } - function parseTypeAnnotation() { - return parseOptional(59 /* ColonToken */) ? parseType() : void 0; - } - function isStartOfLeftHandSideExpression() { - switch (token()) { - case 110 /* ThisKeyword */: - case 108 /* SuperKeyword */: - case 106 /* NullKeyword */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 16 /* TemplateHead */: - case 21 /* OpenParenToken */: - case 23 /* OpenBracketToken */: - case 19 /* OpenBraceToken */: - case 100 /* FunctionKeyword */: - case 86 /* ClassKeyword */: - case 105 /* NewKeyword */: - case 44 /* SlashToken */: - case 69 /* SlashEqualsToken */: - case 80 /* Identifier */: - return true; - case 102 /* ImportKeyword */: - return lookAhead(nextTokenIsOpenParenOrLessThanOrDot); - default: - return isIdentifier2(); - } - } - function isStartOfExpression() { - if (isStartOfLeftHandSideExpression()) { - return true; - } - switch (token()) { - case 40 /* PlusToken */: - case 41 /* MinusToken */: - case 55 /* TildeToken */: - case 54 /* ExclamationToken */: - case 91 /* DeleteKeyword */: - case 114 /* TypeOfKeyword */: - case 116 /* VoidKeyword */: - case 46 /* PlusPlusToken */: - case 47 /* MinusMinusToken */: - case 30 /* LessThanToken */: - case 135 /* AwaitKeyword */: - case 127 /* YieldKeyword */: - case 81 /* PrivateIdentifier */: - case 60 /* AtToken */: - return true; - default: - if (isBinaryOperator2()) { - return true; - } - return isIdentifier2(); - } - } - function isStartOfExpressionStatement() { - return token() !== 19 /* OpenBraceToken */ && token() !== 100 /* FunctionKeyword */ && token() !== 86 /* ClassKeyword */ && token() !== 60 /* AtToken */ && isStartOfExpression(); - } - function parseExpression() { - const saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext( - /*val*/ - false - ); - } - const pos = getNodePos(); - let expr = parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - ); - let operatorToken; - while (operatorToken = parseOptionalToken(28 /* CommaToken */)) { - expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - ), pos); - } - if (saveDecoratorContext) { - setDecoratorContext( - /*val*/ - true - ); - } - return expr; - } - function parseInitializer() { - return parseOptional(64 /* EqualsToken */) ? parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - ) : void 0; - } - function parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction) { - if (isYieldExpression2()) { - return parseYieldExpression(); - } - const arrowExpression = tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) || tryParseAsyncSimpleArrowFunctionExpression(allowReturnTypeInArrowFunction); - if (arrowExpression) { - return arrowExpression; - } - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); - if (expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) { - return parseSimpleArrowFunctionExpression( - pos, - expr, - allowReturnTypeInArrowFunction, - hasJSDoc, - /*asyncModifier*/ - void 0 - ); - } - if (isLeftHandSideExpression(expr) && isAssignmentOperator(reScanGreaterToken())) { - return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction), pos); - } - return parseConditionalExpressionRest(expr, pos, allowReturnTypeInArrowFunction); - } - function isYieldExpression2() { - if (token() === 127 /* YieldKeyword */) { - if (inYieldContext()) { - return true; - } - return lookAhead(nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine); - } - return false; - } - function nextTokenIsIdentifierOnSameLine() { - nextToken(); - return !scanner2.hasPrecedingLineBreak() && isIdentifier2(); - } - function parseYieldExpression() { - const pos = getNodePos(); - nextToken(); - if (!scanner2.hasPrecedingLineBreak() && (token() === 42 /* AsteriskToken */ || isStartOfExpression())) { - return finishNode( - factory2.createYieldExpression( - parseOptionalToken(42 /* AsteriskToken */), - parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - ) - ), - pos - ); - } else { - return finishNode(factory2.createYieldExpression( - /*asteriskToken*/ - void 0, - /*expression*/ - void 0 - ), pos); - } - } - function parseSimpleArrowFunctionExpression(pos, identifier, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier) { - Debug.assert(token() === 39 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - const parameter = factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - identifier, - /*questionToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ); - finishNode(parameter, identifier.pos); - const parameters = createNodeArray([parameter], parameter.pos, parameter.end); - const equalsGreaterThanToken = parseExpectedToken(39 /* EqualsGreaterThanToken */); - const body = parseArrowFunctionExpressionBody( - /*isAsync*/ - !!asyncModifier, - allowReturnTypeInArrowFunction - ); - const node = factory2.createArrowFunction( - asyncModifier, - /*typeParameters*/ - void 0, - parameters, - /*type*/ - void 0, - equalsGreaterThanToken, - body - ); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function tryParseParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { - const triState = isParenthesizedArrowFunctionExpression(); - if (triState === 0 /* False */) { - return void 0; - } - return triState === 1 /* True */ ? parseParenthesizedArrowFunctionExpression( - /*allowAmbiguity*/ - true, - /*allowReturnTypeInArrowFunction*/ - true - ) : tryParse(() => parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction)); - } - function isParenthesizedArrowFunctionExpression() { - if (token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */ || token() === 134 /* AsyncKeyword */) { - return lookAhead(isParenthesizedArrowFunctionExpressionWorker); - } - if (token() === 39 /* EqualsGreaterThanToken */) { - return 1 /* True */; - } - return 0 /* False */; - } - function isParenthesizedArrowFunctionExpressionWorker() { - if (token() === 134 /* AsyncKeyword */) { - nextToken(); - if (scanner2.hasPrecedingLineBreak()) { - return 0 /* False */; - } - if (token() !== 21 /* OpenParenToken */ && token() !== 30 /* LessThanToken */) { - return 0 /* False */; - } - } - const first2 = token(); - const second = nextToken(); - if (first2 === 21 /* OpenParenToken */) { - if (second === 22 /* CloseParenToken */) { - const third = nextToken(); - switch (third) { - case 39 /* EqualsGreaterThanToken */: - case 59 /* ColonToken */: - case 19 /* OpenBraceToken */: - return 1 /* True */; - default: - return 0 /* False */; - } - } - if (second === 23 /* OpenBracketToken */ || second === 19 /* OpenBraceToken */) { - return 2 /* Unknown */; - } - if (second === 26 /* DotDotDotToken */) { - return 1 /* True */; - } - if (isModifierKind(second) && second !== 134 /* AsyncKeyword */ && lookAhead(nextTokenIsIdentifier)) { - if (nextToken() === 130 /* AsKeyword */) { - return 0 /* False */; - } - return 1 /* True */; - } - if (!isIdentifier2() && second !== 110 /* ThisKeyword */) { - return 0 /* False */; - } - switch (nextToken()) { - case 59 /* ColonToken */: - return 1 /* True */; - case 58 /* QuestionToken */: - nextToken(); - if (token() === 59 /* ColonToken */ || token() === 28 /* CommaToken */ || token() === 64 /* EqualsToken */ || token() === 22 /* CloseParenToken */) { - return 1 /* True */; - } - return 0 /* False */; - case 28 /* CommaToken */: - case 64 /* EqualsToken */: - case 22 /* CloseParenToken */: - return 2 /* Unknown */; - } - return 0 /* False */; - } else { - Debug.assert(first2 === 30 /* LessThanToken */); - if (!isIdentifier2() && token() !== 87 /* ConstKeyword */) { - return 0 /* False */; - } - if (languageVariant === 1 /* JSX */) { - const isArrowFunctionInJsx = lookAhead(() => { - parseOptional(87 /* ConstKeyword */); - const third = nextToken(); - if (third === 96 /* ExtendsKeyword */) { - const fourth = nextToken(); - switch (fourth) { - case 64 /* EqualsToken */: - case 32 /* GreaterThanToken */: - case 44 /* SlashToken */: - return false; - default: - return true; - } - } else if (third === 28 /* CommaToken */ || third === 64 /* EqualsToken */) { - return true; - } - return false; - }); - if (isArrowFunctionInJsx) { - return 1 /* True */; - } - return 0 /* False */; - } - return 2 /* Unknown */; - } - } - function parsePossibleParenthesizedArrowFunctionExpression(allowReturnTypeInArrowFunction) { - const tokenPos = scanner2.getTokenStart(); - if (notParenthesizedArrow == null ? void 0 : notParenthesizedArrow.has(tokenPos)) { - return void 0; - } - const result = parseParenthesizedArrowFunctionExpression( - /*allowAmbiguity*/ - false, - allowReturnTypeInArrowFunction - ); - if (!result) { - (notParenthesizedArrow || (notParenthesizedArrow = /* @__PURE__ */ new Set())).add(tokenPos); - } - return result; - } - function tryParseAsyncSimpleArrowFunctionExpression(allowReturnTypeInArrowFunction) { - if (token() === 134 /* AsyncKeyword */) { - if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1 /* True */) { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const asyncModifier = parseModifiersForArrowFunction(); - const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); - return parseSimpleArrowFunctionExpression(pos, expr, allowReturnTypeInArrowFunction, hasJSDoc, asyncModifier); - } - } - return void 0; - } - function isUnParenthesizedAsyncArrowFunctionWorker() { - if (token() === 134 /* AsyncKeyword */) { - nextToken(); - if (scanner2.hasPrecedingLineBreak() || token() === 39 /* EqualsGreaterThanToken */) { - return 0 /* False */; - } - const expr = parseBinaryExpressionOrHigher(0 /* Lowest */); - if (!scanner2.hasPrecedingLineBreak() && expr.kind === 80 /* Identifier */ && token() === 39 /* EqualsGreaterThanToken */) { - return 1 /* True */; - } - } - return 0 /* False */; - } - function parseParenthesizedArrowFunctionExpression(allowAmbiguity, allowReturnTypeInArrowFunction) { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const modifiers = parseModifiersForArrowFunction(); - const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */; - const typeParameters = parseTypeParameters(); - let parameters; - if (!parseExpected(21 /* OpenParenToken */)) { - if (!allowAmbiguity) { - return void 0; - } - parameters = createMissingList(); - } else { - if (!allowAmbiguity) { - const maybeParameters = parseParametersWorker(isAsync, allowAmbiguity); - if (!maybeParameters) { - return void 0; - } - parameters = maybeParameters; - } else { - parameters = parseParametersWorker(isAsync, allowAmbiguity); - } - if (!parseExpected(22 /* CloseParenToken */) && !allowAmbiguity) { - return void 0; - } - } - const hasReturnColon = token() === 59 /* ColonToken */; - const type = parseReturnType( - 59 /* ColonToken */, - /*isType*/ - false - ); - if (type && !allowAmbiguity && typeHasArrowFunctionBlockingParseError(type)) { - return void 0; - } - let unwrappedType = type; - while ((unwrappedType == null ? void 0 : unwrappedType.kind) === 196 /* ParenthesizedType */) { - unwrappedType = unwrappedType.type; - } - const hasJSDocFunctionType = unwrappedType && isJSDocFunctionType(unwrappedType); - if (!allowAmbiguity && token() !== 39 /* EqualsGreaterThanToken */ && (hasJSDocFunctionType || token() !== 19 /* OpenBraceToken */)) { - return void 0; - } - const lastToken = token(); - const equalsGreaterThanToken = parseExpectedToken(39 /* EqualsGreaterThanToken */); - const body = lastToken === 39 /* EqualsGreaterThanToken */ || lastToken === 19 /* OpenBraceToken */ ? parseArrowFunctionExpressionBody(some(modifiers, isAsyncModifier), allowReturnTypeInArrowFunction) : parseIdentifier(); - if (!allowReturnTypeInArrowFunction && hasReturnColon) { - if (token() !== 59 /* ColonToken */) { - return void 0; - } - } - const node = factory2.createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseArrowFunctionExpressionBody(isAsync, allowReturnTypeInArrowFunction) { - if (token() === 19 /* OpenBraceToken */) { - return parseFunctionBlock(isAsync ? 2 /* Await */ : 0 /* None */); - } - if (token() !== 27 /* SemicolonToken */ && token() !== 100 /* FunctionKeyword */ && token() !== 86 /* ClassKeyword */ && isStartOfStatement() && !isStartOfExpressionStatement()) { - return parseFunctionBlock(16 /* IgnoreMissingOpenBrace */ | (isAsync ? 2 /* Await */ : 0 /* None */)); - } - const savedTopLevel = topLevel; - topLevel = false; - const node = isAsync ? doInAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction)) : doOutsideOfAwaitContext(() => parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction)); - topLevel = savedTopLevel; - return node; - } - function parseConditionalExpressionRest(leftOperand, pos, allowReturnTypeInArrowFunction) { - const questionToken = parseOptionalToken(58 /* QuestionToken */); - if (!questionToken) { - return leftOperand; - } - let colonToken; - return finishNode( - factory2.createConditionalExpression( - leftOperand, - questionToken, - doOutsideOfContext(disallowInAndDecoratorContext, () => parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - false - )), - colonToken = parseExpectedToken(59 /* ColonToken */), - nodeIsPresent(colonToken) ? parseAssignmentExpressionOrHigher(allowReturnTypeInArrowFunction) : createMissingNode( - 80 /* Identifier */, - /*reportAtCurrentPosition*/ - false, - Diagnostics._0_expected, - tokenToString(59 /* ColonToken */) - ) - ), - pos - ); - } - function parseBinaryExpressionOrHigher(precedence) { - const pos = getNodePos(); - const leftOperand = parseUnaryExpressionOrHigher(); - return parseBinaryExpressionRest(precedence, leftOperand, pos); - } - function isInOrOfKeyword(t) { - return t === 103 /* InKeyword */ || t === 165 /* OfKeyword */; - } - function parseBinaryExpressionRest(precedence, leftOperand, pos) { - while (true) { - reScanGreaterToken(); - const newPrecedence = getBinaryOperatorPrecedence(token()); - const consumeCurrentOperator = token() === 43 /* AsteriskAsteriskToken */ ? newPrecedence >= precedence : newPrecedence > precedence; - if (!consumeCurrentOperator) { - break; - } - if (token() === 103 /* InKeyword */ && inDisallowInContext()) { - break; - } - if (token() === 130 /* AsKeyword */ || token() === 152 /* SatisfiesKeyword */) { - if (scanner2.hasPrecedingLineBreak()) { - break; - } else { - const keywordKind = token(); - nextToken(); - leftOperand = keywordKind === 152 /* SatisfiesKeyword */ ? makeSatisfiesExpression(leftOperand, parseType()) : makeAsExpression(leftOperand, parseType()); - } - } else { - leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence), pos); - } - } - return leftOperand; - } - function isBinaryOperator2() { - if (inDisallowInContext() && token() === 103 /* InKeyword */) { - return false; - } - return getBinaryOperatorPrecedence(token()) > 0; - } - function makeSatisfiesExpression(left, right) { - return finishNode(factory2.createSatisfiesExpression(left, right), left.pos); - } - function makeBinaryExpression(left, operatorToken, right, pos) { - return finishNode(factory2.createBinaryExpression(left, operatorToken, right), pos); - } - function makeAsExpression(left, right) { - return finishNode(factory2.createAsExpression(left, right), left.pos); - } - function parsePrefixUnaryExpression() { - const pos = getNodePos(); - return finishNode(factory2.createPrefixUnaryExpression(token(), nextTokenAnd(parseSimpleUnaryExpression)), pos); - } - function parseDeleteExpression() { - const pos = getNodePos(); - return finishNode(factory2.createDeleteExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos); - } - function parseTypeOfExpression() { - const pos = getNodePos(); - return finishNode(factory2.createTypeOfExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos); - } - function parseVoidExpression() { - const pos = getNodePos(); - return finishNode(factory2.createVoidExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos); - } - function isAwaitExpression2() { - if (token() === 135 /* AwaitKeyword */) { - if (inAwaitContext()) { - return true; - } - return lookAhead(nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine); - } - return false; - } - function parseAwaitExpression() { - const pos = getNodePos(); - return finishNode(factory2.createAwaitExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos); - } - function parseUnaryExpressionOrHigher() { - if (isUpdateExpression()) { - const pos = getNodePos(); - const updateExpression = parseUpdateExpression(); - return token() === 43 /* AsteriskAsteriskToken */ ? parseBinaryExpressionRest(getBinaryOperatorPrecedence(token()), updateExpression, pos) : updateExpression; - } - const unaryOperator = token(); - const simpleUnaryExpression = parseSimpleUnaryExpression(); - if (token() === 43 /* AsteriskAsteriskToken */) { - const pos = skipTrivia(sourceText, simpleUnaryExpression.pos); - const { end } = simpleUnaryExpression; - if (simpleUnaryExpression.kind === 216 /* TypeAssertionExpression */) { - parseErrorAt(pos, end, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses); - } else { - Debug.assert(isKeywordOrPunctuation(unaryOperator)); - parseErrorAt(pos, end, 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, tokenToString(unaryOperator)); - } - } - return simpleUnaryExpression; - } - function parseSimpleUnaryExpression() { - switch (token()) { - case 40 /* PlusToken */: - case 41 /* MinusToken */: - case 55 /* TildeToken */: - case 54 /* ExclamationToken */: - return parsePrefixUnaryExpression(); - case 91 /* DeleteKeyword */: - return parseDeleteExpression(); - case 114 /* TypeOfKeyword */: - return parseTypeOfExpression(); - case 116 /* VoidKeyword */: - return parseVoidExpression(); - case 30 /* LessThanToken */: - if (languageVariant === 1 /* JSX */) { - return parseJsxElementOrSelfClosingElementOrFragment( - /*inExpressionContext*/ - true, - /*topInvalidNodePosition*/ - void 0, - /*openingTag*/ - void 0, - /*mustBeUnary*/ - true - ); - } - return parseTypeAssertion(); - case 135 /* AwaitKeyword */: - if (isAwaitExpression2()) { - return parseAwaitExpression(); - } - default: - return parseUpdateExpression(); - } - } - function isUpdateExpression() { - switch (token()) { - case 40 /* PlusToken */: - case 41 /* MinusToken */: - case 55 /* TildeToken */: - case 54 /* ExclamationToken */: - case 91 /* DeleteKeyword */: - case 114 /* TypeOfKeyword */: - case 116 /* VoidKeyword */: - case 135 /* AwaitKeyword */: - return false; - case 30 /* LessThanToken */: - if (languageVariant !== 1 /* JSX */) { - return false; - } - default: - return true; - } - } - function parseUpdateExpression() { - if (token() === 46 /* PlusPlusToken */ || token() === 47 /* MinusMinusToken */) { - const pos = getNodePos(); - return finishNode(factory2.createPrefixUnaryExpression(token(), nextTokenAnd(parseLeftHandSideExpressionOrHigher)), pos); - } else if (languageVariant === 1 /* JSX */ && token() === 30 /* LessThanToken */ && lookAhead(nextTokenIsIdentifierOrKeywordOrGreaterThan)) { - return parseJsxElementOrSelfClosingElementOrFragment( - /*inExpressionContext*/ - true - ); - } - const expression = parseLeftHandSideExpressionOrHigher(); - Debug.assert(isLeftHandSideExpression(expression)); - if ((token() === 46 /* PlusPlusToken */ || token() === 47 /* MinusMinusToken */) && !scanner2.hasPrecedingLineBreak()) { - const operator = token(); - nextToken(); - return finishNode(factory2.createPostfixUnaryExpression(expression, operator), expression.pos); - } - return expression; - } - function parseLeftHandSideExpressionOrHigher() { - const pos = getNodePos(); - let expression; - if (token() === 102 /* ImportKeyword */) { - if (lookAhead(nextTokenIsOpenParenOrLessThan)) { - sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; - expression = parseTokenNode(); - } else if (lookAhead(nextTokenIsDot)) { - nextToken(); - nextToken(); - expression = finishNode(factory2.createMetaProperty(102 /* ImportKeyword */, parseIdentifierName()), pos); - sourceFlags |= 8388608 /* PossiblyContainsImportMeta */; - } else { - expression = parseMemberExpressionOrHigher(); - } - } else { - expression = token() === 108 /* SuperKeyword */ ? parseSuperExpression() : parseMemberExpressionOrHigher(); - } - return parseCallExpressionRest(pos, expression); - } - function parseMemberExpressionOrHigher() { - const pos = getNodePos(); - const expression = parsePrimaryExpression(); - return parseMemberExpressionRest( - pos, - expression, - /*allowOptionalChain*/ - true - ); - } - function parseSuperExpression() { - const pos = getNodePos(); - let expression = parseTokenNode(); - if (token() === 30 /* LessThanToken */) { - const startPos = getNodePos(); - const typeArguments = tryParse(parseTypeArgumentsInExpression); - if (typeArguments !== void 0) { - parseErrorAt(startPos, getNodePos(), Diagnostics.super_may_not_use_type_arguments); - if (!isTemplateStartOfTaggedTemplate()) { - expression = factory2.createExpressionWithTypeArguments(expression, typeArguments); - } - } - } - if (token() === 21 /* OpenParenToken */ || token() === 25 /* DotToken */ || token() === 23 /* OpenBracketToken */) { - return expression; - } - parseExpectedToken(25 /* DotToken */, Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); - return finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot( - /*allowIdentifierNames*/ - true, - /*allowPrivateIdentifiers*/ - true - )), pos); - } - function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag, mustBeUnary = false) { - const pos = getNodePos(); - const opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext); - let result; - if (opening.kind === 286 /* JsxOpeningElement */) { - let children = parseJsxChildren(opening); - let closingElement; - const lastChild = children[children.length - 1]; - if ((lastChild == null ? void 0 : lastChild.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName) && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) { - const end = lastChild.children.end; - const newLast = finishNode( - factory2.createJsxElement( - lastChild.openingElement, - lastChild.children, - finishNode(factory2.createJsxClosingElement(finishNode(factoryCreateIdentifier(""), end, end)), end, end) - ), - lastChild.openingElement.pos, - end - ); - children = createNodeArray([...children.slice(0, children.length - 1), newLast], children.pos, end); - closingElement = lastChild.closingElement; - } else { - closingElement = parseJsxClosingElement(opening, inExpressionContext); - if (!tagNamesAreEquivalent(opening.tagName, closingElement.tagName)) { - if (openingTag && isJsxOpeningElement(openingTag) && tagNamesAreEquivalent(closingElement.tagName, openingTag.tagName)) { - parseErrorAtRange(opening.tagName, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, opening.tagName)); - } else { - parseErrorAtRange(closingElement.tagName, Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, getTextOfNodeFromSourceText(sourceText, opening.tagName)); - } - } - } - result = finishNode(factory2.createJsxElement(opening, children, closingElement), pos); - } else if (opening.kind === 289 /* JsxOpeningFragment */) { - result = finishNode(factory2.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos); - } else { - Debug.assert(opening.kind === 285 /* JsxSelfClosingElement */); - result = opening; - } - if (!mustBeUnary && inExpressionContext && token() === 30 /* LessThanToken */) { - const topBadPos = typeof topInvalidNodePosition === "undefined" ? result.pos : topInvalidNodePosition; - const invalidElement = tryParse(() => parseJsxElementOrSelfClosingElementOrFragment( - /*inExpressionContext*/ - true, - topBadPos - )); - if (invalidElement) { - const operatorToken = createMissingNode( - 28 /* CommaToken */, - /*reportAtCurrentPosition*/ - false - ); - setTextRangePosWidth(operatorToken, invalidElement.pos, 0); - parseErrorAt(skipTrivia(sourceText, topBadPos), invalidElement.end, Diagnostics.JSX_expressions_must_have_one_parent_element); - return finishNode(factory2.createBinaryExpression(result, operatorToken, invalidElement), pos); - } - } - return result; - } - function parseJsxText() { - const pos = getNodePos(); - const node = factory2.createJsxText(scanner2.getTokenValue(), currentToken === 13 /* JsxTextAllWhiteSpaces */); - currentToken = scanner2.scanJsxToken(); - return finishNode(node, pos); - } - function parseJsxChild(openingTag, token2) { - switch (token2) { - case 1 /* EndOfFileToken */: - if (isJsxOpeningFragment(openingTag)) { - parseErrorAtRange(openingTag, Diagnostics.JSX_fragment_has_no_corresponding_closing_tag); - } else { - const tag = openingTag.tagName; - const start = Math.min(skipTrivia(sourceText, tag.pos), tag.end); - parseErrorAt(start, tag.end, Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, getTextOfNodeFromSourceText(sourceText, openingTag.tagName)); - } - return void 0; - case 31 /* LessThanSlashToken */: - case 7 /* ConflictMarkerTrivia */: - return void 0; - case 12 /* JsxText */: - case 13 /* JsxTextAllWhiteSpaces */: - return parseJsxText(); - case 19 /* OpenBraceToken */: - return parseJsxExpression( - /*inExpressionContext*/ - false - ); - case 30 /* LessThanToken */: - return parseJsxElementOrSelfClosingElementOrFragment( - /*inExpressionContext*/ - false, - /*topInvalidNodePosition*/ - void 0, - openingTag - ); - default: - return Debug.assertNever(token2); - } - } - function parseJsxChildren(openingTag) { - const list = []; - const listPos = getNodePos(); - const saveParsingContext = parsingContext; - parsingContext |= 1 << 14 /* JsxChildren */; - while (true) { - const child = parseJsxChild(openingTag, currentToken = scanner2.reScanJsxToken()); - if (!child) - break; - list.push(child); - if (isJsxOpeningElement(openingTag) && (child == null ? void 0 : child.kind) === 284 /* JsxElement */ && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName) && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) { - break; - } - } - parsingContext = saveParsingContext; - return createNodeArray(list, listPos); - } - function parseJsxAttributes() { - const pos = getNodePos(); - return finishNode(factory2.createJsxAttributes(parseList(13 /* JsxAttributes */, parseJsxAttribute)), pos); - } - function parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext) { - const pos = getNodePos(); - parseExpected(30 /* LessThanToken */); - if (token() === 32 /* GreaterThanToken */) { - scanJsxText(); - return finishNode(factory2.createJsxOpeningFragment(), pos); - } - const tagName = parseJsxElementName(); - const typeArguments = (contextFlags & 524288 /* JavaScriptFile */) === 0 ? tryParseTypeArguments() : void 0; - const attributes = parseJsxAttributes(); - let node; - if (token() === 32 /* GreaterThanToken */) { - scanJsxText(); - node = factory2.createJsxOpeningElement(tagName, typeArguments, attributes); - } else { - parseExpected(44 /* SlashToken */); - if (parseExpected( - 32 /* GreaterThanToken */, - /*diagnosticMessage*/ - void 0, - /*shouldAdvance*/ - false - )) { - if (inExpressionContext) { - nextToken(); - } else { - scanJsxText(); - } - } - node = factory2.createJsxSelfClosingElement(tagName, typeArguments, attributes); - } - return finishNode(node, pos); - } - function parseJsxElementName() { - const pos = getNodePos(); - const initialExpression = parseJsxTagName(); - if (isJsxNamespacedName(initialExpression)) { - return initialExpression; - } - let expression = initialExpression; - while (parseOptional(25 /* DotToken */)) { - expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot( - /*allowIdentifierNames*/ - true, - /*allowPrivateIdentifiers*/ - false - )), pos); - } - return expression; - } - function parseJsxTagName() { - const pos = getNodePos(); - scanJsxIdentifier(); - const isThis2 = token() === 110 /* ThisKeyword */; - const tagName = parseIdentifierName(); - if (parseOptional(59 /* ColonToken */)) { - scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierName()), pos); - } - return isThis2 ? finishNode(factory2.createToken(110 /* ThisKeyword */), pos) : tagName; - } - function parseJsxExpression(inExpressionContext) { - const pos = getNodePos(); - if (!parseExpected(19 /* OpenBraceToken */)) { - return void 0; - } - let dotDotDotToken; - let expression; - if (token() !== 20 /* CloseBraceToken */) { - dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); - expression = parseExpression(); - } - if (inExpressionContext) { - parseExpected(20 /* CloseBraceToken */); - } else { - if (parseExpected( - 20 /* CloseBraceToken */, - /*diagnosticMessage*/ - void 0, - /*shouldAdvance*/ - false - )) { - scanJsxText(); - } - } - return finishNode(factory2.createJsxExpression(dotDotDotToken, expression), pos); - } - function parseJsxAttribute() { - if (token() === 19 /* OpenBraceToken */) { - return parseJsxSpreadAttribute(); - } - const pos = getNodePos(); - return finishNode(factory2.createJsxAttribute(parseJsxAttributeName(), parseJsxAttributeValue()), pos); - } - function parseJsxAttributeValue() { - if (token() === 64 /* EqualsToken */) { - if (scanJsxAttributeValue() === 11 /* StringLiteral */) { - return parseLiteralNode(); - } - if (token() === 19 /* OpenBraceToken */) { - return parseJsxExpression( - /*inExpressionContext*/ - true - ); - } - if (token() === 30 /* LessThanToken */) { - return parseJsxElementOrSelfClosingElementOrFragment( - /*inExpressionContext*/ - true - ); - } - parseErrorAtCurrentToken(Diagnostics.or_JSX_element_expected); - } - return void 0; - } - function parseJsxAttributeName() { - const pos = getNodePos(); - scanJsxIdentifier(); - const attrName = parseIdentifierName(); - if (parseOptional(59 /* ColonToken */)) { - scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierName()), pos); - } - return attrName; - } - function parseJsxSpreadAttribute() { - const pos = getNodePos(); - parseExpected(19 /* OpenBraceToken */); - parseExpected(26 /* DotDotDotToken */); - const expression = parseExpression(); - parseExpected(20 /* CloseBraceToken */); - return finishNode(factory2.createJsxSpreadAttribute(expression), pos); - } - function parseJsxClosingElement(open, inExpressionContext) { - const pos = getNodePos(); - parseExpected(31 /* LessThanSlashToken */); - const tagName = parseJsxElementName(); - if (parseExpected( - 32 /* GreaterThanToken */, - /*diagnosticMessage*/ - void 0, - /*shouldAdvance*/ - false - )) { - if (inExpressionContext || !tagNamesAreEquivalent(open.tagName, tagName)) { - nextToken(); - } else { - scanJsxText(); - } - } - return finishNode(factory2.createJsxClosingElement(tagName), pos); - } - function parseJsxClosingFragment(inExpressionContext) { - const pos = getNodePos(); - parseExpected(31 /* LessThanSlashToken */); - if (parseExpected( - 32 /* GreaterThanToken */, - Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment, - /*shouldAdvance*/ - false - )) { - if (inExpressionContext) { - nextToken(); - } else { - scanJsxText(); - } - } - return finishNode(factory2.createJsxJsxClosingFragment(), pos); - } - function parseTypeAssertion() { - Debug.assert(languageVariant !== 1 /* JSX */, "Type assertions should never be parsed in JSX; they should be parsed as comparisons or JSX elements/fragments."); - const pos = getNodePos(); - parseExpected(30 /* LessThanToken */); - const type = parseType(); - parseExpected(32 /* GreaterThanToken */); - const expression = parseSimpleUnaryExpression(); - return finishNode(factory2.createTypeAssertion(type, expression), pos); - } - function nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate() { - nextToken(); - return tokenIsIdentifierOrKeyword(token()) || token() === 23 /* OpenBracketToken */ || isTemplateStartOfTaggedTemplate(); - } - function isStartOfOptionalPropertyOrElementAccessChain() { - return token() === 29 /* QuestionDotToken */ && lookAhead(nextTokenIsIdentifierOrKeywordOrOpenBracketOrTemplate); - } - function tryReparseOptionalChain(node) { - if (node.flags & 64 /* OptionalChain */) { - return true; - } - if (isNonNullExpression(node)) { - let expr = node.expression; - while (isNonNullExpression(expr) && !(expr.flags & 64 /* OptionalChain */)) { - expr = expr.expression; - } - if (expr.flags & 64 /* OptionalChain */) { - while (isNonNullExpression(node)) { - node.flags |= 64 /* OptionalChain */; - node = node.expression; - } - return true; - } - } - return false; - } - function parsePropertyAccessExpressionRest(pos, expression, questionDotToken) { - const name = parseRightSideOfDot( - /*allowIdentifierNames*/ - true, - /*allowPrivateIdentifiers*/ - true - ); - const isOptionalChain2 = questionDotToken || tryReparseOptionalChain(expression); - const propertyAccess = isOptionalChain2 ? factoryCreatePropertyAccessChain(expression, questionDotToken, name) : factoryCreatePropertyAccessExpression(expression, name); - if (isOptionalChain2 && isPrivateIdentifier(propertyAccess.name)) { - parseErrorAtRange(propertyAccess.name, Diagnostics.An_optional_chain_cannot_contain_private_identifiers); - } - if (isExpressionWithTypeArguments(expression) && expression.typeArguments) { - const pos2 = expression.typeArguments.pos - 1; - const end = skipTrivia(sourceText, expression.typeArguments.end) + 1; - parseErrorAt(pos2, end, Diagnostics.An_instantiation_expression_cannot_be_followed_by_a_property_access); - } - return finishNode(propertyAccess, pos); - } - function parseElementAccessExpressionRest(pos, expression, questionDotToken) { - let argumentExpression; - if (token() === 24 /* CloseBracketToken */) { - argumentExpression = createMissingNode( - 80 /* Identifier */, - /*reportAtCurrentPosition*/ - true, - Diagnostics.An_element_access_expression_should_take_an_argument - ); - } else { - const argument = allowInAnd(parseExpression); - if (isStringOrNumericLiteralLike(argument)) { - argument.text = internIdentifier(argument.text); - } - argumentExpression = argument; - } - parseExpected(24 /* CloseBracketToken */); - const indexedAccess = questionDotToken || tryReparseOptionalChain(expression) ? factoryCreateElementAccessChain(expression, questionDotToken, argumentExpression) : factoryCreateElementAccessExpression(expression, argumentExpression); - return finishNode(indexedAccess, pos); - } - function parseMemberExpressionRest(pos, expression, allowOptionalChain) { - while (true) { - let questionDotToken; - let isPropertyAccess = false; - if (allowOptionalChain && isStartOfOptionalPropertyOrElementAccessChain()) { - questionDotToken = parseExpectedToken(29 /* QuestionDotToken */); - isPropertyAccess = tokenIsIdentifierOrKeyword(token()); - } else { - isPropertyAccess = parseOptional(25 /* DotToken */); - } - if (isPropertyAccess) { - expression = parsePropertyAccessExpressionRest(pos, expression, questionDotToken); - continue; - } - if ((questionDotToken || !inDecoratorContext()) && parseOptional(23 /* OpenBracketToken */)) { - expression = parseElementAccessExpressionRest(pos, expression, questionDotToken); - continue; - } - if (isTemplateStartOfTaggedTemplate()) { - expression = !questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */ ? parseTaggedTemplateRest(pos, expression.expression, questionDotToken, expression.typeArguments) : parseTaggedTemplateRest( - pos, - expression, - questionDotToken, - /*typeArguments*/ - void 0 - ); - continue; - } - if (!questionDotToken) { - if (token() === 54 /* ExclamationToken */ && !scanner2.hasPrecedingLineBreak()) { - nextToken(); - expression = finishNode(factory2.createNonNullExpression(expression), pos); - continue; - } - const typeArguments = tryParse(parseTypeArgumentsInExpression); - if (typeArguments) { - expression = finishNode(factory2.createExpressionWithTypeArguments(expression, typeArguments), pos); - continue; - } - } - return expression; - } - } - function isTemplateStartOfTaggedTemplate() { - return token() === 15 /* NoSubstitutionTemplateLiteral */ || token() === 16 /* TemplateHead */; - } - function parseTaggedTemplateRest(pos, tag, questionDotToken, typeArguments) { - const tagExpression = factory2.createTaggedTemplateExpression( - tag, - typeArguments, - token() === 15 /* NoSubstitutionTemplateLiteral */ ? (reScanTemplateToken( - /*isTaggedTemplate*/ - true - ), parseLiteralNode()) : parseTemplateExpression( - /*isTaggedTemplate*/ - true - ) - ); - if (questionDotToken || tag.flags & 64 /* OptionalChain */) { - tagExpression.flags |= 64 /* OptionalChain */; - } - tagExpression.questionDotToken = questionDotToken; - return finishNode(tagExpression, pos); - } - function parseCallExpressionRest(pos, expression) { - while (true) { - expression = parseMemberExpressionRest( - pos, - expression, - /*allowOptionalChain*/ - true - ); - let typeArguments; - const questionDotToken = parseOptionalToken(29 /* QuestionDotToken */); - if (questionDotToken) { - typeArguments = tryParse(parseTypeArgumentsInExpression); - if (isTemplateStartOfTaggedTemplate()) { - expression = parseTaggedTemplateRest(pos, expression, questionDotToken, typeArguments); - continue; - } - } - if (typeArguments || token() === 21 /* OpenParenToken */) { - if (!questionDotToken && expression.kind === 233 /* ExpressionWithTypeArguments */) { - typeArguments = expression.typeArguments; - expression = expression.expression; - } - const argumentList = parseArgumentList(); - const callExpr = questionDotToken || tryReparseOptionalChain(expression) ? factoryCreateCallChain(expression, questionDotToken, typeArguments, argumentList) : factoryCreateCallExpression(expression, typeArguments, argumentList); - expression = finishNode(callExpr, pos); - continue; - } - if (questionDotToken) { - const name = createMissingNode( - 80 /* Identifier */, - /*reportAtCurrentPosition*/ - false, - Diagnostics.Identifier_expected - ); - expression = finishNode(factoryCreatePropertyAccessChain(expression, questionDotToken, name), pos); - } - break; - } - return expression; - } - function parseArgumentList() { - parseExpected(21 /* OpenParenToken */); - const result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression); - parseExpected(22 /* CloseParenToken */); - return result; - } - function parseTypeArgumentsInExpression() { - if ((contextFlags & 524288 /* JavaScriptFile */) !== 0) { - return void 0; - } - if (reScanLessThanToken() !== 30 /* LessThanToken */) { - return void 0; - } - nextToken(); - const typeArguments = parseDelimitedList(20 /* TypeArguments */, parseType); - if (reScanGreaterToken() !== 32 /* GreaterThanToken */) { - return void 0; - } - nextToken(); - return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : void 0; - } - function canFollowTypeArgumentsInExpression() { - switch (token()) { - case 21 /* OpenParenToken */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 16 /* TemplateHead */: - return true; - case 30 /* LessThanToken */: - case 32 /* GreaterThanToken */: - case 40 /* PlusToken */: - case 41 /* MinusToken */: - return false; - } - return scanner2.hasPrecedingLineBreak() || isBinaryOperator2() || !isStartOfExpression(); - } - function parsePrimaryExpression() { - switch (token()) { - case 15 /* NoSubstitutionTemplateLiteral */: - if (scanner2.getTokenFlags() & 26656 /* IsInvalid */) { - reScanTemplateToken( - /*isTaggedTemplate*/ - false - ); - } - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 11 /* StringLiteral */: - return parseLiteralNode(); - case 110 /* ThisKeyword */: - case 108 /* SuperKeyword */: - case 106 /* NullKeyword */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - return parseTokenNode(); - case 21 /* OpenParenToken */: - return parseParenthesizedExpression(); - case 23 /* OpenBracketToken */: - return parseArrayLiteralExpression(); - case 19 /* OpenBraceToken */: - return parseObjectLiteralExpression(); - case 134 /* AsyncKeyword */: - if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) { - break; - } - return parseFunctionExpression(); - case 60 /* AtToken */: - return parseDecoratedExpression(); - case 86 /* ClassKeyword */: - return parseClassExpression(); - case 100 /* FunctionKeyword */: - return parseFunctionExpression(); - case 105 /* NewKeyword */: - return parseNewExpressionOrNewDotTarget(); - case 44 /* SlashToken */: - case 69 /* SlashEqualsToken */: - if (reScanSlashToken() === 14 /* RegularExpressionLiteral */) { - return parseLiteralNode(); - } - break; - case 16 /* TemplateHead */: - return parseTemplateExpression( - /*isTaggedTemplate*/ - false - ); - case 81 /* PrivateIdentifier */: - return parsePrivateIdentifier(); - } - return parseIdentifier(Diagnostics.Expression_expected); - } - function parseParenthesizedExpression() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(21 /* OpenParenToken */); - const expression = allowInAnd(parseExpression); - parseExpected(22 /* CloseParenToken */); - return withJSDoc(finishNode(factoryCreateParenthesizedExpression(expression), pos), hasJSDoc); - } - function parseSpreadElement() { - const pos = getNodePos(); - parseExpected(26 /* DotDotDotToken */); - const expression = parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - ); - return finishNode(factory2.createSpreadElement(expression), pos); - } - function parseArgumentOrArrayLiteralElement() { - return token() === 26 /* DotDotDotToken */ ? parseSpreadElement() : token() === 28 /* CommaToken */ ? finishNode(factory2.createOmittedExpression(), getNodePos()) : parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - ); - } - function parseArgumentExpression() { - return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); - } - function parseArrayLiteralExpression() { - const pos = getNodePos(); - const openBracketPosition = scanner2.getTokenStart(); - const openBracketParsed = parseExpected(23 /* OpenBracketToken */); - const multiLine = scanner2.hasPrecedingLineBreak(); - const elements = parseDelimitedList(15 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); - parseExpectedMatchingBrackets(23 /* OpenBracketToken */, 24 /* CloseBracketToken */, openBracketParsed, openBracketPosition); - return finishNode(factoryCreateArrayLiteralExpression(elements, multiLine), pos); - } - function parseObjectLiteralElement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - if (parseOptionalToken(26 /* DotDotDotToken */)) { - const expression = parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - ); - return withJSDoc(finishNode(factory2.createSpreadAssignment(expression), pos), hasJSDoc); - } - const modifiers = parseModifiers( - /*allowDecorators*/ - true - ); - if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); - } - if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); - } - const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); - const tokenIsIdentifier = isIdentifier2(); - const name = parsePropertyName(); - const questionToken = parseOptionalToken(58 /* QuestionToken */); - const exclamationToken = parseOptionalToken(54 /* ExclamationToken */); - if (asteriskToken || token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - return parseMethodDeclaration(pos, hasJSDoc, modifiers, asteriskToken, name, questionToken, exclamationToken); - } - let node; - const isShorthandPropertyAssignment2 = tokenIsIdentifier && token() !== 59 /* ColonToken */; - if (isShorthandPropertyAssignment2) { - const equalsToken = parseOptionalToken(64 /* EqualsToken */); - const objectAssignmentInitializer = equalsToken ? allowInAnd(() => parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - )) : void 0; - node = factory2.createShorthandPropertyAssignment(name, objectAssignmentInitializer); - node.equalsToken = equalsToken; - } else { - parseExpected(59 /* ColonToken */); - const initializer = allowInAnd(() => parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - )); - node = factory2.createPropertyAssignment(name, initializer); - } - node.modifiers = modifiers; - node.questionToken = questionToken; - node.exclamationToken = exclamationToken; - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseObjectLiteralExpression() { - const pos = getNodePos(); - const openBracePosition = scanner2.getTokenStart(); - const openBraceParsed = parseExpected(19 /* OpenBraceToken */); - const multiLine = scanner2.hasPrecedingLineBreak(); - const properties = parseDelimitedList( - 12 /* ObjectLiteralMembers */, - parseObjectLiteralElement, - /*considerSemicolonAsDelimiter*/ - true - ); - parseExpectedMatchingBrackets(19 /* OpenBraceToken */, 20 /* CloseBraceToken */, openBraceParsed, openBracePosition); - return finishNode(factoryCreateObjectLiteralExpression(properties, multiLine), pos); - } - function parseFunctionExpression() { - const savedDecoratorContext = inDecoratorContext(); - setDecoratorContext( - /*val*/ - false - ); - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const modifiers = parseModifiers( - /*allowDecorators*/ - false - ); - parseExpected(100 /* FunctionKeyword */); - const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); - const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; - const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */; - const name = isGenerator && isAsync ? doInYieldAndAwaitContext(parseOptionalBindingIdentifier) : isGenerator ? doInYieldContext(parseOptionalBindingIdentifier) : isAsync ? doInAwaitContext(parseOptionalBindingIdentifier) : parseOptionalBindingIdentifier(); - const typeParameters = parseTypeParameters(); - const parameters = parseParameters(isGenerator | isAsync); - const type = parseReturnType( - 59 /* ColonToken */, - /*isType*/ - false - ); - const body = parseFunctionBlock(isGenerator | isAsync); - setDecoratorContext(savedDecoratorContext); - const node = factory2.createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseOptionalBindingIdentifier() { - return isBindingIdentifier() ? parseBindingIdentifier() : void 0; - } - function parseNewExpressionOrNewDotTarget() { - const pos = getNodePos(); - parseExpected(105 /* NewKeyword */); - if (parseOptional(25 /* DotToken */)) { - const name = parseIdentifierName(); - return finishNode(factory2.createMetaProperty(105 /* NewKeyword */, name), pos); - } - const expressionPos = getNodePos(); - let expression = parseMemberExpressionRest( - expressionPos, - parsePrimaryExpression(), - /*allowOptionalChain*/ - false - ); - let typeArguments; - if (expression.kind === 233 /* ExpressionWithTypeArguments */) { - typeArguments = expression.typeArguments; - expression = expression.expression; - } - if (token() === 29 /* QuestionDotToken */) { - parseErrorAtCurrentToken(Diagnostics.Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0, getTextOfNodeFromSourceText(sourceText, expression)); - } - const argumentList = token() === 21 /* OpenParenToken */ ? parseArgumentList() : void 0; - return finishNode(factoryCreateNewExpression(expression, typeArguments, argumentList), pos); - } - function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const openBracePosition = scanner2.getTokenStart(); - const openBraceParsed = parseExpected(19 /* OpenBraceToken */, diagnosticMessage); - if (openBraceParsed || ignoreMissingOpenBrace) { - const multiLine = scanner2.hasPrecedingLineBreak(); - const statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpectedMatchingBrackets(19 /* OpenBraceToken */, 20 /* CloseBraceToken */, openBraceParsed, openBracePosition); - const result = withJSDoc(finishNode(factoryCreateBlock(statements, multiLine), pos), hasJSDoc); - if (token() === 64 /* EqualsToken */) { - parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_whole_assignment_in_parentheses); - nextToken(); - } - return result; - } else { - const statements = createMissingList(); - return withJSDoc(finishNode(factoryCreateBlock( - statements, - /*multiLine*/ - void 0 - ), pos), hasJSDoc); - } - } - function parseFunctionBlock(flags, diagnosticMessage) { - const savedYieldContext = inYieldContext(); - setYieldContext(!!(flags & 1 /* Yield */)); - const savedAwaitContext = inAwaitContext(); - setAwaitContext(!!(flags & 2 /* Await */)); - const savedTopLevel = topLevel; - topLevel = false; - const saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext( - /*val*/ - false - ); - } - const block = parseBlock(!!(flags & 16 /* IgnoreMissingOpenBrace */), diagnosticMessage); - if (saveDecoratorContext) { - setDecoratorContext( - /*val*/ - true - ); - } - topLevel = savedTopLevel; - setYieldContext(savedYieldContext); - setAwaitContext(savedAwaitContext); - return block; - } - function parseEmptyStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(27 /* SemicolonToken */); - return withJSDoc(finishNode(factory2.createEmptyStatement(), pos), hasJSDoc); - } - function parseIfStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(101 /* IfKeyword */); - const openParenPosition = scanner2.getTokenStart(); - const openParenParsed = parseExpected(21 /* OpenParenToken */); - const expression = allowInAnd(parseExpression); - parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition); - const thenStatement = parseStatement(); - const elseStatement = parseOptional(93 /* ElseKeyword */) ? parseStatement() : void 0; - return withJSDoc(finishNode(factoryCreateIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc); - } - function parseDoStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(92 /* DoKeyword */); - const statement = parseStatement(); - parseExpected(117 /* WhileKeyword */); - const openParenPosition = scanner2.getTokenStart(); - const openParenParsed = parseExpected(21 /* OpenParenToken */); - const expression = allowInAnd(parseExpression); - parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition); - parseOptional(27 /* SemicolonToken */); - return withJSDoc(finishNode(factory2.createDoStatement(statement, expression), pos), hasJSDoc); - } - function parseWhileStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(117 /* WhileKeyword */); - const openParenPosition = scanner2.getTokenStart(); - const openParenParsed = parseExpected(21 /* OpenParenToken */); - const expression = allowInAnd(parseExpression); - parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition); - const statement = parseStatement(); - return withJSDoc(finishNode(factoryCreateWhileStatement(expression, statement), pos), hasJSDoc); - } - function parseForOrForInOrForOfStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(99 /* ForKeyword */); - const awaitToken = parseOptionalToken(135 /* AwaitKeyword */); - parseExpected(21 /* OpenParenToken */); - let initializer; - if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { - initializer = parseVariableDeclarationList( - /*inForStatementInitializer*/ - true - ); - } else { - initializer = disallowInAnd(parseExpression); - } - } - let node; - if (awaitToken ? parseExpected(165 /* OfKeyword */) : parseOptional(165 /* OfKeyword */)) { - const expression = allowInAnd(() => parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - )); - parseExpected(22 /* CloseParenToken */); - node = factoryCreateForOfStatement(awaitToken, initializer, expression, parseStatement()); - } else if (parseOptional(103 /* InKeyword */)) { - const expression = allowInAnd(parseExpression); - parseExpected(22 /* CloseParenToken */); - node = factory2.createForInStatement(initializer, expression, parseStatement()); - } else { - parseExpected(27 /* SemicolonToken */); - const condition = token() !== 27 /* SemicolonToken */ && token() !== 22 /* CloseParenToken */ ? allowInAnd(parseExpression) : void 0; - parseExpected(27 /* SemicolonToken */); - const incrementor = token() !== 22 /* CloseParenToken */ ? allowInAnd(parseExpression) : void 0; - parseExpected(22 /* CloseParenToken */); - node = factoryCreateForStatement(initializer, condition, incrementor, parseStatement()); - } - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseBreakOrContinueStatement(kind) { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(kind === 252 /* BreakStatement */ ? 83 /* BreakKeyword */ : 88 /* ContinueKeyword */); - const label = canParseSemicolon() ? void 0 : parseIdentifier(); - parseSemicolon(); - const node = kind === 252 /* BreakStatement */ ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseReturnStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(107 /* ReturnKeyword */); - const expression = canParseSemicolon() ? void 0 : allowInAnd(parseExpression); - parseSemicolon(); - return withJSDoc(finishNode(factory2.createReturnStatement(expression), pos), hasJSDoc); - } - function parseWithStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(118 /* WithKeyword */); - const openParenPosition = scanner2.getTokenStart(); - const openParenParsed = parseExpected(21 /* OpenParenToken */); - const expression = allowInAnd(parseExpression); - parseExpectedMatchingBrackets(21 /* OpenParenToken */, 22 /* CloseParenToken */, openParenParsed, openParenPosition); - const statement = doInsideOfContext(67108864 /* InWithStatement */, parseStatement); - return withJSDoc(finishNode(factory2.createWithStatement(expression, statement), pos), hasJSDoc); - } - function parseCaseClause() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(84 /* CaseKeyword */); - const expression = allowInAnd(parseExpression); - parseExpected(59 /* ColonToken */); - const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); - return withJSDoc(finishNode(factory2.createCaseClause(expression, statements), pos), hasJSDoc); - } - function parseDefaultClause() { - const pos = getNodePos(); - parseExpected(90 /* DefaultKeyword */); - parseExpected(59 /* ColonToken */); - const statements = parseList(3 /* SwitchClauseStatements */, parseStatement); - return finishNode(factory2.createDefaultClause(statements), pos); - } - function parseCaseOrDefaultClause() { - return token() === 84 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); - } - function parseCaseBlock() { - const pos = getNodePos(); - parseExpected(19 /* OpenBraceToken */); - const clauses = parseList(2 /* SwitchClauses */, parseCaseOrDefaultClause); - parseExpected(20 /* CloseBraceToken */); - return finishNode(factory2.createCaseBlock(clauses), pos); - } - function parseSwitchStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(109 /* SwitchKeyword */); - parseExpected(21 /* OpenParenToken */); - const expression = allowInAnd(parseExpression); - parseExpected(22 /* CloseParenToken */); - const caseBlock = parseCaseBlock(); - return withJSDoc(finishNode(factory2.createSwitchStatement(expression, caseBlock), pos), hasJSDoc); - } - function parseThrowStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(111 /* ThrowKeyword */); - let expression = scanner2.hasPrecedingLineBreak() ? void 0 : allowInAnd(parseExpression); - if (expression === void 0) { - identifierCount++; - expression = finishNode(factoryCreateIdentifier(""), getNodePos()); - } - if (!tryParseSemicolon()) { - parseErrorForMissingSemicolonAfter(expression); - } - return withJSDoc(finishNode(factory2.createThrowStatement(expression), pos), hasJSDoc); - } - function parseTryStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(113 /* TryKeyword */); - const tryBlock = parseBlock( - /*ignoreMissingOpenBrace*/ - false - ); - const catchClause = token() === 85 /* CatchKeyword */ ? parseCatchClause() : void 0; - let finallyBlock; - if (!catchClause || token() === 98 /* FinallyKeyword */) { - parseExpected(98 /* FinallyKeyword */, Diagnostics.catch_or_finally_expected); - finallyBlock = parseBlock( - /*ignoreMissingOpenBrace*/ - false - ); - } - return withJSDoc(finishNode(factory2.createTryStatement(tryBlock, catchClause, finallyBlock), pos), hasJSDoc); - } - function parseCatchClause() { - const pos = getNodePos(); - parseExpected(85 /* CatchKeyword */); - let variableDeclaration; - if (parseOptional(21 /* OpenParenToken */)) { - variableDeclaration = parseVariableDeclaration(); - parseExpected(22 /* CloseParenToken */); - } else { - variableDeclaration = void 0; - } - const block = parseBlock( - /*ignoreMissingOpenBrace*/ - false - ); - return finishNode(factory2.createCatchClause(variableDeclaration, block), pos); - } - function parseDebuggerStatement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - parseExpected(89 /* DebuggerKeyword */); - parseSemicolon(); - return withJSDoc(finishNode(factory2.createDebuggerStatement(), pos), hasJSDoc); - } - function parseExpressionOrLabeledStatement() { - const pos = getNodePos(); - let hasJSDoc = hasPrecedingJSDocComment(); - let node; - const hasParen = token() === 21 /* OpenParenToken */; - const expression = allowInAnd(parseExpression); - if (isIdentifier(expression) && parseOptional(59 /* ColonToken */)) { - node = factory2.createLabeledStatement(expression, parseStatement()); - } else { - if (!tryParseSemicolon()) { - parseErrorForMissingSemicolonAfter(expression); - } - node = factoryCreateExpressionStatement(expression); - if (hasParen) { - hasJSDoc = false; - } - } - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function nextTokenIsIdentifierOrKeywordOnSameLine() { - nextToken(); - return tokenIsIdentifierOrKeyword(token()) && !scanner2.hasPrecedingLineBreak(); - } - function nextTokenIsClassKeywordOnSameLine() { - nextToken(); - return token() === 86 /* ClassKeyword */ && !scanner2.hasPrecedingLineBreak(); - } - function nextTokenIsFunctionKeywordOnSameLine() { - nextToken(); - return token() === 100 /* FunctionKeyword */ && !scanner2.hasPrecedingLineBreak(); - } - function nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine() { - nextToken(); - return (tokenIsIdentifierOrKeyword(token()) || token() === 9 /* NumericLiteral */ || token() === 10 /* BigIntLiteral */ || token() === 11 /* StringLiteral */) && !scanner2.hasPrecedingLineBreak(); - } - function isDeclaration2() { - while (true) { - switch (token()) { - case 115 /* VarKeyword */: - case 121 /* LetKeyword */: - case 87 /* ConstKeyword */: - case 100 /* FunctionKeyword */: - case 86 /* ClassKeyword */: - case 94 /* EnumKeyword */: - return true; - case 160 /* UsingKeyword */: - return isUsingDeclaration(); - case 135 /* AwaitKeyword */: - return isAwaitUsingDeclaration(); - case 120 /* InterfaceKeyword */: - case 156 /* TypeKeyword */: - return nextTokenIsIdentifierOnSameLine(); - case 144 /* ModuleKeyword */: - case 145 /* NamespaceKeyword */: - return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 128 /* AbstractKeyword */: - case 129 /* AccessorKeyword */: - case 134 /* AsyncKeyword */: - case 138 /* DeclareKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - case 125 /* PublicKeyword */: - case 148 /* ReadonlyKeyword */: - const previousToken = token(); - nextToken(); - if (scanner2.hasPrecedingLineBreak()) { - return false; - } - if (previousToken === 138 /* DeclareKeyword */ && token() === 156 /* TypeKeyword */) { - return true; - } - continue; - case 162 /* GlobalKeyword */: - nextToken(); - return token() === 19 /* OpenBraceToken */ || token() === 80 /* Identifier */ || token() === 95 /* ExportKeyword */; - case 102 /* ImportKeyword */: - nextToken(); - return token() === 11 /* StringLiteral */ || token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */ || tokenIsIdentifierOrKeyword(token()); - case 95 /* ExportKeyword */: - let currentToken2 = nextToken(); - if (currentToken2 === 156 /* TypeKeyword */) { - currentToken2 = lookAhead(nextToken); - } - if (currentToken2 === 64 /* EqualsToken */ || currentToken2 === 42 /* AsteriskToken */ || currentToken2 === 19 /* OpenBraceToken */ || currentToken2 === 90 /* DefaultKeyword */ || currentToken2 === 130 /* AsKeyword */ || currentToken2 === 60 /* AtToken */) { - return true; - } - continue; - case 126 /* StaticKeyword */: - nextToken(); - continue; - default: - return false; - } - } - } - function isStartOfDeclaration() { - return lookAhead(isDeclaration2); - } - function isStartOfStatement() { - switch (token()) { - case 60 /* AtToken */: - case 27 /* SemicolonToken */: - case 19 /* OpenBraceToken */: - case 115 /* VarKeyword */: - case 121 /* LetKeyword */: - case 160 /* UsingKeyword */: - case 100 /* FunctionKeyword */: - case 86 /* ClassKeyword */: - case 94 /* EnumKeyword */: - case 101 /* IfKeyword */: - case 92 /* DoKeyword */: - case 117 /* WhileKeyword */: - case 99 /* ForKeyword */: - case 88 /* ContinueKeyword */: - case 83 /* BreakKeyword */: - case 107 /* ReturnKeyword */: - case 118 /* WithKeyword */: - case 109 /* SwitchKeyword */: - case 111 /* ThrowKeyword */: - case 113 /* TryKeyword */: - case 89 /* DebuggerKeyword */: - case 85 /* CatchKeyword */: - case 98 /* FinallyKeyword */: - return true; - case 102 /* ImportKeyword */: - return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThanOrDot); - case 87 /* ConstKeyword */: - case 95 /* ExportKeyword */: - return isStartOfDeclaration(); - case 134 /* AsyncKeyword */: - case 138 /* DeclareKeyword */: - case 120 /* InterfaceKeyword */: - case 144 /* ModuleKeyword */: - case 145 /* NamespaceKeyword */: - case 156 /* TypeKeyword */: - case 162 /* GlobalKeyword */: - return true; - case 129 /* AccessorKeyword */: - case 125 /* PublicKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - case 126 /* StaticKeyword */: - case 148 /* ReadonlyKeyword */: - return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - default: - return isStartOfExpression(); - } - } - function nextTokenIsBindingIdentifierOrStartOfDestructuring() { - nextToken(); - return isBindingIdentifier() || token() === 19 /* OpenBraceToken */ || token() === 23 /* OpenBracketToken */; - } - function isLetDeclaration() { - return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuring); - } - function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf() { - return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine( - /*disallowOf*/ - true - ); - } - function nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf) { - nextToken(); - if (disallowOf && token() === 165 /* OfKeyword */) - return false; - return (isBindingIdentifier() || token() === 19 /* OpenBraceToken */) && !scanner2.hasPrecedingLineBreak(); - } - function isUsingDeclaration() { - return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); - } - function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { - return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( - /*disallowOf*/ - true - ); - } - function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { - if (nextToken() === 160 /* UsingKeyword */) { - return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); - } - return false; - } - function isAwaitUsingDeclaration() { - return lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine); - } - function parseStatement() { - switch (token()) { - case 27 /* SemicolonToken */: - return parseEmptyStatement(); - case 19 /* OpenBraceToken */: - return parseBlock( - /*ignoreMissingOpenBrace*/ - false - ); - case 115 /* VarKeyword */: - return parseVariableStatement( - getNodePos(), - hasPrecedingJSDocComment(), - /*modifiers*/ - void 0 - ); - case 121 /* LetKeyword */: - if (isLetDeclaration()) { - return parseVariableStatement( - getNodePos(), - hasPrecedingJSDocComment(), - /*modifiers*/ - void 0 - ); - } - break; - case 135 /* AwaitKeyword */: - if (isAwaitUsingDeclaration()) { - return parseVariableStatement( - getNodePos(), - hasPrecedingJSDocComment(), - /*modifiers*/ - void 0 - ); - } - break; - case 160 /* UsingKeyword */: - if (isUsingDeclaration()) { - return parseVariableStatement( - getNodePos(), - hasPrecedingJSDocComment(), - /*modifiers*/ - void 0 - ); - } - break; - case 100 /* FunctionKeyword */: - return parseFunctionDeclaration( - getNodePos(), - hasPrecedingJSDocComment(), - /*modifiers*/ - void 0 - ); - case 86 /* ClassKeyword */: - return parseClassDeclaration( - getNodePos(), - hasPrecedingJSDocComment(), - /*modifiers*/ - void 0 - ); - case 101 /* IfKeyword */: - return parseIfStatement(); - case 92 /* DoKeyword */: - return parseDoStatement(); - case 117 /* WhileKeyword */: - return parseWhileStatement(); - case 99 /* ForKeyword */: - return parseForOrForInOrForOfStatement(); - case 88 /* ContinueKeyword */: - return parseBreakOrContinueStatement(251 /* ContinueStatement */); - case 83 /* BreakKeyword */: - return parseBreakOrContinueStatement(252 /* BreakStatement */); - case 107 /* ReturnKeyword */: - return parseReturnStatement(); - case 118 /* WithKeyword */: - return parseWithStatement(); - case 109 /* SwitchKeyword */: - return parseSwitchStatement(); - case 111 /* ThrowKeyword */: - return parseThrowStatement(); - case 113 /* TryKeyword */: - case 85 /* CatchKeyword */: - case 98 /* FinallyKeyword */: - return parseTryStatement(); - case 89 /* DebuggerKeyword */: - return parseDebuggerStatement(); - case 60 /* AtToken */: - return parseDeclaration(); - case 134 /* AsyncKeyword */: - case 120 /* InterfaceKeyword */: - case 156 /* TypeKeyword */: - case 144 /* ModuleKeyword */: - case 145 /* NamespaceKeyword */: - case 138 /* DeclareKeyword */: - case 87 /* ConstKeyword */: - case 94 /* EnumKeyword */: - case 95 /* ExportKeyword */: - case 102 /* ImportKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - case 125 /* PublicKeyword */: - case 128 /* AbstractKeyword */: - case 129 /* AccessorKeyword */: - case 126 /* StaticKeyword */: - case 148 /* ReadonlyKeyword */: - case 162 /* GlobalKeyword */: - if (isStartOfDeclaration()) { - return parseDeclaration(); - } - break; - } - return parseExpressionOrLabeledStatement(); - } - function isDeclareModifier(modifier) { - return modifier.kind === 138 /* DeclareKeyword */; - } - function parseDeclaration() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const modifiers = parseModifiers( - /*allowDecorators*/ - true - ); - const isAmbient = some(modifiers, isDeclareModifier); - if (isAmbient) { - const node = tryReuseAmbientDeclaration(pos); - if (node) { - return node; - } - for (const m of modifiers) { - m.flags |= 33554432 /* Ambient */; - } - return doInsideOfContext(33554432 /* Ambient */, () => parseDeclarationWorker(pos, hasJSDoc, modifiers)); - } else { - return parseDeclarationWorker(pos, hasJSDoc, modifiers); - } - } - function tryReuseAmbientDeclaration(pos) { - return doInsideOfContext(33554432 /* Ambient */, () => { - const node = currentNode(parsingContext, pos); - if (node) { - return consumeNode(node); - } - }); - } - function parseDeclarationWorker(pos, hasJSDoc, modifiersIn) { - switch (token()) { - case 115 /* VarKeyword */: - case 121 /* LetKeyword */: - case 87 /* ConstKeyword */: - case 160 /* UsingKeyword */: - case 135 /* AwaitKeyword */: - return parseVariableStatement(pos, hasJSDoc, modifiersIn); - case 100 /* FunctionKeyword */: - return parseFunctionDeclaration(pos, hasJSDoc, modifiersIn); - case 86 /* ClassKeyword */: - return parseClassDeclaration(pos, hasJSDoc, modifiersIn); - case 120 /* InterfaceKeyword */: - return parseInterfaceDeclaration(pos, hasJSDoc, modifiersIn); - case 156 /* TypeKeyword */: - return parseTypeAliasDeclaration(pos, hasJSDoc, modifiersIn); - case 94 /* EnumKeyword */: - return parseEnumDeclaration(pos, hasJSDoc, modifiersIn); - case 162 /* GlobalKeyword */: - case 144 /* ModuleKeyword */: - case 145 /* NamespaceKeyword */: - return parseModuleDeclaration(pos, hasJSDoc, modifiersIn); - case 102 /* ImportKeyword */: - return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiersIn); - case 95 /* ExportKeyword */: - nextToken(); - switch (token()) { - case 90 /* DefaultKeyword */: - case 64 /* EqualsToken */: - return parseExportAssignment(pos, hasJSDoc, modifiersIn); - case 130 /* AsKeyword */: - return parseNamespaceExportDeclaration(pos, hasJSDoc, modifiersIn); - default: - return parseExportDeclaration(pos, hasJSDoc, modifiersIn); - } - default: - if (modifiersIn) { - const missing = createMissingNode( - 282 /* MissingDeclaration */, - /*reportAtCurrentPosition*/ - true, - Diagnostics.Declaration_expected - ); - setTextRangePos(missing, pos); - missing.modifiers = modifiersIn; - return missing; - } - return void 0; - } - } - function nextTokenIsStringLiteral() { - return nextToken() === 11 /* StringLiteral */; - } - function nextTokenIsIdentifierOrStringLiteralOnSameLine() { - nextToken(); - return !scanner2.hasPrecedingLineBreak() && (isIdentifier2() || token() === 11 /* StringLiteral */); - } - function parseFunctionBlockOrSemicolon(flags, diagnosticMessage) { - if (token() !== 19 /* OpenBraceToken */) { - if (flags & 4 /* Type */) { - parseTypeMemberSemicolon(); - return; - } - if (canParseSemicolon()) { - parseSemicolon(); - return; - } - } - return parseFunctionBlock(flags, diagnosticMessage); - } - function parseArrayBindingElement() { - const pos = getNodePos(); - if (token() === 28 /* CommaToken */) { - return finishNode(factory2.createOmittedExpression(), pos); - } - const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); - const name = parseIdentifierOrPattern(); - const initializer = parseInitializer(); - return finishNode(factory2.createBindingElement( - dotDotDotToken, - /*propertyName*/ - void 0, - name, - initializer - ), pos); - } - function parseObjectBindingElement() { - const pos = getNodePos(); - const dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); - const tokenIsIdentifier = isBindingIdentifier(); - let propertyName = parsePropertyName(); - let name; - if (tokenIsIdentifier && token() !== 59 /* ColonToken */) { - name = propertyName; - propertyName = void 0; - } else { - parseExpected(59 /* ColonToken */); - name = parseIdentifierOrPattern(); - } - const initializer = parseInitializer(); - return finishNode(factory2.createBindingElement(dotDotDotToken, propertyName, name, initializer), pos); - } - function parseObjectBindingPattern() { - const pos = getNodePos(); - parseExpected(19 /* OpenBraceToken */); - const elements = allowInAnd(() => parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement)); - parseExpected(20 /* CloseBraceToken */); - return finishNode(factory2.createObjectBindingPattern(elements), pos); - } - function parseArrayBindingPattern() { - const pos = getNodePos(); - parseExpected(23 /* OpenBracketToken */); - const elements = allowInAnd(() => parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement)); - parseExpected(24 /* CloseBracketToken */); - return finishNode(factory2.createArrayBindingPattern(elements), pos); - } - function isBindingIdentifierOrPrivateIdentifierOrPattern() { - return token() === 19 /* OpenBraceToken */ || token() === 23 /* OpenBracketToken */ || token() === 81 /* PrivateIdentifier */ || isBindingIdentifier(); - } - function parseIdentifierOrPattern(privateIdentifierDiagnosticMessage) { - if (token() === 23 /* OpenBracketToken */) { - return parseArrayBindingPattern(); - } - if (token() === 19 /* OpenBraceToken */) { - return parseObjectBindingPattern(); - } - return parseBindingIdentifier(privateIdentifierDiagnosticMessage); - } - function parseVariableDeclarationAllowExclamation() { - return parseVariableDeclaration( - /*allowExclamation*/ - true - ); - } - function parseVariableDeclaration(allowExclamation) { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const name = parseIdentifierOrPattern(Diagnostics.Private_identifiers_are_not_allowed_in_variable_declarations); - let exclamationToken; - if (allowExclamation && name.kind === 80 /* Identifier */ && token() === 54 /* ExclamationToken */ && !scanner2.hasPrecedingLineBreak()) { - exclamationToken = parseTokenNode(); - } - const type = parseTypeAnnotation(); - const initializer = isInOrOfKeyword(token()) ? void 0 : parseInitializer(); - const node = factoryCreateVariableDeclaration(name, exclamationToken, type, initializer); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseVariableDeclarationList(inForStatementInitializer) { - const pos = getNodePos(); - let flags = 0; - switch (token()) { - case 115 /* VarKeyword */: - break; - case 121 /* LetKeyword */: - flags |= 1 /* Let */; - break; - case 87 /* ConstKeyword */: - flags |= 2 /* Const */; - break; - case 160 /* UsingKeyword */: - flags |= 4 /* Using */; - break; - case 135 /* AwaitKeyword */: - Debug.assert(isAwaitUsingDeclaration()); - flags |= 6 /* AwaitUsing */; - nextToken(); - break; - default: - Debug.fail(); - } - nextToken(); - let declarations; - if (token() === 165 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { - declarations = createMissingList(); - } else { - const savedDisallowIn = inDisallowInContext(); - setDisallowInContext(inForStatementInitializer); - declarations = parseDelimitedList( - 8 /* VariableDeclarations */, - inForStatementInitializer ? parseVariableDeclaration : parseVariableDeclarationAllowExclamation - ); - setDisallowInContext(savedDisallowIn); - } - return finishNode(factoryCreateVariableDeclarationList(declarations, flags), pos); - } - function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 22 /* CloseParenToken */; - } - function parseVariableStatement(pos, hasJSDoc, modifiers) { - const declarationList = parseVariableDeclarationList( - /*inForStatementInitializer*/ - false - ); - parseSemicolon(); - const node = factoryCreateVariableStatement(modifiers, declarationList); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseFunctionDeclaration(pos, hasJSDoc, modifiers) { - const savedAwaitContext = inAwaitContext(); - const modifierFlags = modifiersToFlags(modifiers); - parseExpected(100 /* FunctionKeyword */); - const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); - const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); - const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; - const isAsync = modifierFlags & 512 /* Async */ ? 2 /* Await */ : 0 /* None */; - const typeParameters = parseTypeParameters(); - if (modifierFlags & 1 /* Export */) - setAwaitContext( - /*value*/ - true - ); - const parameters = parseParameters(isGenerator | isAsync); - const type = parseReturnType( - 59 /* ColonToken */, - /*isType*/ - false - ); - const body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, Diagnostics.or_expected); - setAwaitContext(savedAwaitContext); - const node = factory2.createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseConstructorName() { - if (token() === 137 /* ConstructorKeyword */) { - return parseExpected(137 /* ConstructorKeyword */); - } - if (token() === 11 /* StringLiteral */ && lookAhead(nextToken) === 21 /* OpenParenToken */) { - return tryParse(() => { - const literalNode = parseLiteralNode(); - return literalNode.text === "constructor" ? literalNode : void 0; - }); - } - } - function tryParseConstructorDeclaration(pos, hasJSDoc, modifiers) { - return tryParse(() => { - if (parseConstructorName()) { - const typeParameters = parseTypeParameters(); - const parameters = parseParameters(0 /* None */); - const type = parseReturnType( - 59 /* ColonToken */, - /*isType*/ - false - ); - const body = parseFunctionBlockOrSemicolon(0 /* None */, Diagnostics.or_expected); - const node = factory2.createConstructorDeclaration(modifiers, parameters, body); - node.typeParameters = typeParameters; - node.type = type; - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - }); - } - function parseMethodDeclaration(pos, hasJSDoc, modifiers, asteriskToken, name, questionToken, exclamationToken, diagnosticMessage) { - const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; - const isAsync = some(modifiers, isAsyncModifier) ? 2 /* Await */ : 0 /* None */; - const typeParameters = parseTypeParameters(); - const parameters = parseParameters(isGenerator | isAsync); - const type = parseReturnType( - 59 /* ColonToken */, - /*isType*/ - false - ); - const body = parseFunctionBlockOrSemicolon(isGenerator | isAsync, diagnosticMessage); - const node = factory2.createMethodDeclaration( - modifiers, - asteriskToken, - name, - questionToken, - typeParameters, - parameters, - type, - body - ); - node.exclamationToken = exclamationToken; - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken) { - const exclamationToken = !questionToken && !scanner2.hasPrecedingLineBreak() ? parseOptionalToken(54 /* ExclamationToken */) : void 0; - const type = parseTypeAnnotation(); - const initializer = doOutsideOfContext(16384 /* YieldContext */ | 65536 /* AwaitContext */ | 8192 /* DisallowInContext */, parseInitializer); - parseSemicolonAfterPropertyName(name, type, initializer); - const node = factory2.createPropertyDeclaration( - modifiers, - name, - questionToken || exclamationToken, - type, - initializer - ); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers) { - const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); - const name = parsePropertyName(); - const questionToken = parseOptionalToken(58 /* QuestionToken */); - if (asteriskToken || token() === 21 /* OpenParenToken */ || token() === 30 /* LessThanToken */) { - return parseMethodDeclaration( - pos, - hasJSDoc, - modifiers, - asteriskToken, - name, - questionToken, - /*exclamationToken*/ - void 0, - Diagnostics.or_expected - ); - } - return parsePropertyDeclaration(pos, hasJSDoc, modifiers, name, questionToken); - } - function parseAccessorDeclaration(pos, hasJSDoc, modifiers, kind, flags) { - const name = parsePropertyName(); - const typeParameters = parseTypeParameters(); - const parameters = parseParameters(0 /* None */); - const type = parseReturnType( - 59 /* ColonToken */, - /*isType*/ - false - ); - const body = parseFunctionBlockOrSemicolon(flags); - const node = kind === 177 /* GetAccessor */ ? factory2.createGetAccessorDeclaration(modifiers, name, parameters, type, body) : factory2.createSetAccessorDeclaration(modifiers, name, parameters, body); - node.typeParameters = typeParameters; - if (isSetAccessorDeclaration(node)) - node.type = type; - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function isClassMemberStart() { - let idToken; - if (token() === 60 /* AtToken */) { - return true; - } - while (isModifierKind(token())) { - idToken = token(); - if (isClassMemberModifier(idToken)) { - return true; - } - nextToken(); - } - if (token() === 42 /* AsteriskToken */) { - return true; - } - if (isLiteralPropertyName()) { - idToken = token(); - nextToken(); - } - if (token() === 23 /* OpenBracketToken */) { - return true; - } - if (idToken !== void 0) { - if (!isKeyword(idToken) || idToken === 153 /* SetKeyword */ || idToken === 139 /* GetKeyword */) { - return true; - } - switch (token()) { - case 21 /* OpenParenToken */: - case 30 /* LessThanToken */: - case 54 /* ExclamationToken */: - case 59 /* ColonToken */: - case 64 /* EqualsToken */: - case 58 /* QuestionToken */: - return true; - default: - return canParseSemicolon(); - } - } - return false; - } - function parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers) { - parseExpectedToken(126 /* StaticKeyword */); - const body = parseClassStaticBlockBody(); - const node = withJSDoc(finishNode(factory2.createClassStaticBlockDeclaration(body), pos), hasJSDoc); - node.modifiers = modifiers; - return node; - } - function parseClassStaticBlockBody() { - const savedYieldContext = inYieldContext(); - const savedAwaitContext = inAwaitContext(); - setYieldContext(false); - setAwaitContext(true); - const body = parseBlock( - /*ignoreMissingOpenBrace*/ - false - ); - setYieldContext(savedYieldContext); - setAwaitContext(savedAwaitContext); - return body; - } - function parseDecoratorExpression() { - if (inAwaitContext() && token() === 135 /* AwaitKeyword */) { - const pos = getNodePos(); - const awaitExpression = parseIdentifier(Diagnostics.Expression_expected); - nextToken(); - const memberExpression = parseMemberExpressionRest( - pos, - awaitExpression, - /*allowOptionalChain*/ - true - ); - return parseCallExpressionRest(pos, memberExpression); - } - return parseLeftHandSideExpressionOrHigher(); - } - function tryParseDecorator() { - const pos = getNodePos(); - if (!parseOptional(60 /* AtToken */)) { - return void 0; - } - const expression = doInDecoratorContext(parseDecoratorExpression); - return finishNode(factory2.createDecorator(expression), pos); - } - function tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock) { - const pos = getNodePos(); - const kind = token(); - if (token() === 87 /* ConstKeyword */ && permitConstAsModifier) { - if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) { - return void 0; - } - } else if (stopOnStartOfClassStaticBlock && token() === 126 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { - return void 0; - } else if (hasSeenStaticModifier && token() === 126 /* StaticKeyword */) { - return void 0; - } else { - if (!parseAnyContextualModifier()) { - return void 0; - } - } - return finishNode(factoryCreateToken(kind), pos); - } - function parseModifiers(allowDecorators, permitConstAsModifier, stopOnStartOfClassStaticBlock) { - const pos = getNodePos(); - let list; - let decorator, modifier, hasSeenStaticModifier = false, hasLeadingModifier = false, hasTrailingDecorator = false; - if (allowDecorators && token() === 60 /* AtToken */) { - while (decorator = tryParseDecorator()) { - list = append(list, decorator); - } - } - while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 126 /* StaticKeyword */) - hasSeenStaticModifier = true; - list = append(list, modifier); - hasLeadingModifier = true; - } - if (hasLeadingModifier && allowDecorators && token() === 60 /* AtToken */) { - while (decorator = tryParseDecorator()) { - list = append(list, decorator); - hasTrailingDecorator = true; - } - } - if (hasTrailingDecorator) { - while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) { - if (modifier.kind === 126 /* StaticKeyword */) - hasSeenStaticModifier = true; - list = append(list, modifier); - } - } - return list && createNodeArray(list, pos); - } - function parseModifiersForArrowFunction() { - let modifiers; - if (token() === 134 /* AsyncKeyword */) { - const pos = getNodePos(); - nextToken(); - const modifier = finishNode(factoryCreateToken(134 /* AsyncKeyword */), pos); - modifiers = createNodeArray([modifier], pos); - } - return modifiers; - } - function parseClassElement() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - if (token() === 27 /* SemicolonToken */) { - nextToken(); - return withJSDoc(finishNode(factory2.createSemicolonClassElement(), pos), hasJSDoc); - } - const modifiers = parseModifiers( - /*allowDecorators*/ - true, - /*permitConstAsModifier*/ - true, - /*stopOnStartOfClassStaticBlock*/ - true - ); - if (token() === 126 /* StaticKeyword */ && lookAhead(nextTokenIsOpenBrace)) { - return parseClassStaticBlockDeclaration(pos, hasJSDoc, modifiers); - } - if (parseContextualModifier(139 /* GetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 177 /* GetAccessor */, 0 /* None */); - } - if (parseContextualModifier(153 /* SetKeyword */)) { - return parseAccessorDeclaration(pos, hasJSDoc, modifiers, 178 /* SetAccessor */, 0 /* None */); - } - if (token() === 137 /* ConstructorKeyword */ || token() === 11 /* StringLiteral */) { - const constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, modifiers); - if (constructorDeclaration) { - return constructorDeclaration; - } - } - if (isIndexSignature()) { - return parseIndexSignatureDeclaration(pos, hasJSDoc, modifiers); - } - if (tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */ || token() === 42 /* AsteriskToken */ || token() === 23 /* OpenBracketToken */) { - const isAmbient = some(modifiers, isDeclareModifier); - if (isAmbient) { - for (const m of modifiers) { - m.flags |= 33554432 /* Ambient */; - } - return doInsideOfContext(33554432 /* Ambient */, () => parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers)); - } else { - return parsePropertyOrMethodDeclaration(pos, hasJSDoc, modifiers); - } - } - if (modifiers) { - const name = createMissingNode( - 80 /* Identifier */, - /*reportAtCurrentPosition*/ - true, - Diagnostics.Declaration_expected - ); - return parsePropertyDeclaration( - pos, - hasJSDoc, - modifiers, - name, - /*questionToken*/ - void 0 - ); - } - return Debug.fail("Should not have attempted to parse class member declaration."); - } - function parseDecoratedExpression() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const modifiers = parseModifiers( - /*allowDecorators*/ - true - ); - if (token() === 86 /* ClassKeyword */) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 231 /* ClassExpression */); - } - const missing = createMissingNode( - 282 /* MissingDeclaration */, - /*reportAtCurrentPosition*/ - true, - Diagnostics.Expression_expected - ); - setTextRangePos(missing, pos); - missing.modifiers = modifiers; - return missing; - } - function parseClassExpression() { - return parseClassDeclarationOrExpression( - getNodePos(), - hasPrecedingJSDocComment(), - /*modifiers*/ - void 0, - 231 /* ClassExpression */ - ); - } - function parseClassDeclaration(pos, hasJSDoc, modifiers) { - return parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, 263 /* ClassDeclaration */); - } - function parseClassDeclarationOrExpression(pos, hasJSDoc, modifiers, kind) { - const savedAwaitContext = inAwaitContext(); - parseExpected(86 /* ClassKeyword */); - const name = parseNameOfClassDeclarationOrExpression(); - const typeParameters = parseTypeParameters(); - if (some(modifiers, isExportModifier)) - setAwaitContext( - /*value*/ - true - ); - const heritageClauses = parseHeritageClauses(); - let members; - if (parseExpected(19 /* OpenBraceToken */)) { - members = parseClassMembers(); - parseExpected(20 /* CloseBraceToken */); - } else { - members = createMissingList(); - } - setAwaitContext(savedAwaitContext); - const node = kind === 263 /* ClassDeclaration */ ? factory2.createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members) : factory2.createClassExpression(modifiers, name, typeParameters, heritageClauses, members); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseNameOfClassDeclarationOrExpression() { - return isBindingIdentifier() && !isImplementsClause() ? createIdentifier(isBindingIdentifier()) : void 0; - } - function isImplementsClause() { - return token() === 119 /* ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword); - } - function parseHeritageClauses() { - if (isHeritageClause2()) { - return parseList(22 /* HeritageClauses */, parseHeritageClause); - } - return void 0; - } - function parseHeritageClause() { - const pos = getNodePos(); - const tok = token(); - Debug.assert(tok === 96 /* ExtendsKeyword */ || tok === 119 /* ImplementsKeyword */); - nextToken(); - const types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); - return finishNode(factory2.createHeritageClause(tok, types), pos); - } - function parseExpressionWithTypeArguments() { - const pos = getNodePos(); - const expression = parseLeftHandSideExpressionOrHigher(); - if (expression.kind === 233 /* ExpressionWithTypeArguments */) { - return expression; - } - const typeArguments = tryParseTypeArguments(); - return finishNode(factory2.createExpressionWithTypeArguments(expression, typeArguments), pos); - } - function tryParseTypeArguments() { - return token() === 30 /* LessThanToken */ ? parseBracketedList(20 /* TypeArguments */, parseType, 30 /* LessThanToken */, 32 /* GreaterThanToken */) : void 0; - } - function isHeritageClause2() { - return token() === 96 /* ExtendsKeyword */ || token() === 119 /* ImplementsKeyword */; - } - function parseClassMembers() { - return parseList(5 /* ClassMembers */, parseClassElement); - } - function parseInterfaceDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(120 /* InterfaceKeyword */); - const name = parseIdentifier(); - const typeParameters = parseTypeParameters(); - const heritageClauses = parseHeritageClauses(); - const members = parseObjectTypeMembers(); - const node = factory2.createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseTypeAliasDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(156 /* TypeKeyword */); - if (scanner2.hasPrecedingLineBreak()) { - parseErrorAtCurrentToken(Diagnostics.Line_break_not_permitted_here); - } - const name = parseIdentifier(); - const typeParameters = parseTypeParameters(); - parseExpected(64 /* EqualsToken */); - const type = token() === 141 /* IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType(); - parseSemicolon(); - const node = factory2.createTypeAliasDeclaration(modifiers, name, typeParameters, type); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseEnumMember() { - const pos = getNodePos(); - const hasJSDoc = hasPrecedingJSDocComment(); - const name = parsePropertyName(); - const initializer = allowInAnd(parseInitializer); - return withJSDoc(finishNode(factory2.createEnumMember(name, initializer), pos), hasJSDoc); - } - function parseEnumDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(94 /* EnumKeyword */); - const name = parseIdentifier(); - let members; - if (parseExpected(19 /* OpenBraceToken */)) { - members = doOutsideOfYieldAndAwaitContext(() => parseDelimitedList(6 /* EnumMembers */, parseEnumMember)); - parseExpected(20 /* CloseBraceToken */); - } else { - members = createMissingList(); - } - const node = factory2.createEnumDeclaration(modifiers, name, members); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseModuleBlock() { - const pos = getNodePos(); - let statements; - if (parseExpected(19 /* OpenBraceToken */)) { - statements = parseList(1 /* BlockStatements */, parseStatement); - parseExpected(20 /* CloseBraceToken */); - } else { - statements = createMissingList(); - } - return finishNode(factory2.createModuleBlock(statements), pos); - } - function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { - const namespaceFlag = flags & 32 /* Namespace */; - const name = parseIdentifier(); - const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( - getNodePos(), - /*hasJSDoc*/ - false, - /*modifiers*/ - void 0, - 8 /* NestedNamespace */ | namespaceFlag - ) : parseModuleBlock(); - const node = factory2.createModuleDeclaration(modifiers, name, body, flags); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn) { - let flags = 0; - let name; - if (token() === 162 /* GlobalKeyword */) { - name = parseIdentifier(); - flags |= 2048 /* GlobalAugmentation */; - } else { - name = parseLiteralNode(); - name.text = internIdentifier(name.text); - } - let body; - if (token() === 19 /* OpenBraceToken */) { - body = parseModuleBlock(); - } else { - parseSemicolon(); - } - const node = factory2.createModuleDeclaration(modifiersIn, name, body, flags); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseModuleDeclaration(pos, hasJSDoc, modifiersIn) { - let flags = 0; - if (token() === 162 /* GlobalKeyword */) { - return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); - } else if (parseOptional(145 /* NamespaceKeyword */)) { - flags |= 32 /* Namespace */; - } else { - parseExpected(144 /* ModuleKeyword */); - if (token() === 11 /* StringLiteral */) { - return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, modifiersIn); - } - } - return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiersIn, flags); - } - function isExternalModuleReference2() { - return token() === 149 /* RequireKeyword */ && lookAhead(nextTokenIsOpenParen); - } - function nextTokenIsOpenParen() { - return nextToken() === 21 /* OpenParenToken */; - } - function nextTokenIsOpenBrace() { - return nextToken() === 19 /* OpenBraceToken */; - } - function nextTokenIsSlash() { - return nextToken() === 44 /* SlashToken */; - } - function parseNamespaceExportDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(130 /* AsKeyword */); - parseExpected(145 /* NamespaceKeyword */); - const name = parseIdentifier(); - parseSemicolon(); - const node = factory2.createNamespaceExportDeclaration(name); - node.modifiers = modifiers; - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, modifiers) { - parseExpected(102 /* ImportKeyword */); - const afterImportPos = scanner2.getTokenFullStart(); - let identifier; - if (isIdentifier2()) { - identifier = parseIdentifier(); - } - let isTypeOnly = false; - if (token() !== 161 /* FromKeyword */ && (identifier == null ? void 0 : identifier.escapedText) === "type" && (isIdentifier2() || tokenAfterImportDefinitelyProducesImportDeclaration())) { - isTypeOnly = true; - identifier = isIdentifier2() ? parseIdentifier() : void 0; - } - if (identifier && !tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration()) { - return parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly); - } - let importClause; - if (identifier || // import id - token() === 42 /* AsteriskToken */ || // import * - token() === 19 /* OpenBraceToken */) { - importClause = parseImportClause(identifier, afterImportPos, isTypeOnly); - parseExpected(161 /* FromKeyword */); - } - const moduleSpecifier = parseModuleSpecifier(); - let assertClause; - if (token() === 132 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); - } - parseSemicolon(); - const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseAssertEntry() { - const pos = getNodePos(); - const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */); - parseExpected(59 /* ColonToken */); - const value = parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - ); - return finishNode(factory2.createAssertEntry(name, value), pos); - } - function parseAssertClause(skipAssertKeyword) { - const pos = getNodePos(); - if (!skipAssertKeyword) { - parseExpected(132 /* AssertKeyword */); - } - const openBracePosition = scanner2.getTokenStart(); - if (parseExpected(19 /* OpenBraceToken */)) { - const multiLine = scanner2.hasPrecedingLineBreak(); - const elements = parseDelimitedList( - 24 /* AssertEntries */, - parseAssertEntry, - /*considerSemicolonAsDelimiter*/ - true - ); - if (!parseExpected(20 /* CloseBraceToken */)) { - const lastError = lastOrUndefined(parseDiagnostics); - if (lastError && lastError.code === Diagnostics._0_expected.code) { - addRelatedInfo( - lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") - ); - } - } - return finishNode(factory2.createAssertClause(elements, multiLine), pos); - } else { - const elements = createNodeArray( - [], - getNodePos(), - /*end*/ - void 0, - /*hasTrailingComma*/ - false - ); - return finishNode(factory2.createAssertClause( - elements, - /*multiLine*/ - false - ), pos); - } - } - function tokenAfterImportDefinitelyProducesImportDeclaration() { - return token() === 42 /* AsteriskToken */ || token() === 19 /* OpenBraceToken */; - } - function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() { - return token() === 28 /* CommaToken */ || token() === 161 /* FromKeyword */; - } - function parseImportEqualsDeclaration(pos, hasJSDoc, modifiers, identifier, isTypeOnly) { - parseExpected(64 /* EqualsToken */); - const moduleReference = parseModuleReference(); - parseSemicolon(); - const node = factory2.createImportEqualsDeclaration(modifiers, isTypeOnly, identifier, moduleReference); - const finished = withJSDoc(finishNode(node, pos), hasJSDoc); - return finished; - } - function parseImportClause(identifier, pos, isTypeOnly) { - let namedBindings; - if (!identifier || parseOptional(28 /* CommaToken */)) { - namedBindings = token() === 42 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(275 /* NamedImports */); - } - return finishNode(factory2.createImportClause(isTypeOnly, identifier, namedBindings), pos); - } - function parseModuleReference() { - return isExternalModuleReference2() ? parseExternalModuleReference() : parseEntityName( - /*allowReservedWords*/ - false - ); - } - function parseExternalModuleReference() { - const pos = getNodePos(); - parseExpected(149 /* RequireKeyword */); - parseExpected(21 /* OpenParenToken */); - const expression = parseModuleSpecifier(); - parseExpected(22 /* CloseParenToken */); - return finishNode(factory2.createExternalModuleReference(expression), pos); - } - function parseModuleSpecifier() { - if (token() === 11 /* StringLiteral */) { - const result = parseLiteralNode(); - result.text = internIdentifier(result.text); - return result; - } else { - return parseExpression(); - } - } - function parseNamespaceImport() { - const pos = getNodePos(); - parseExpected(42 /* AsteriskToken */); - parseExpected(130 /* AsKeyword */); - const name = parseIdentifier(); - return finishNode(factory2.createNamespaceImport(name), pos); - } - function parseNamedImportsOrExports(kind) { - const pos = getNodePos(); - const node = kind === 275 /* NamedImports */ ? factory2.createNamedImports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseImportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)) : factory2.createNamedExports(parseBracketedList(23 /* ImportOrExportSpecifiers */, parseExportSpecifier, 19 /* OpenBraceToken */, 20 /* CloseBraceToken */)); - return finishNode(node, pos); - } - function parseExportSpecifier() { - const hasJSDoc = hasPrecedingJSDocComment(); - return withJSDoc(parseImportOrExportSpecifier(281 /* ExportSpecifier */), hasJSDoc); - } - function parseImportSpecifier() { - return parseImportOrExportSpecifier(276 /* ImportSpecifier */); - } - function parseImportOrExportSpecifier(kind) { - const pos = getNodePos(); - let checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - let checkIdentifierStart = scanner2.getTokenStart(); - let checkIdentifierEnd = scanner2.getTokenEnd(); - let isTypeOnly = false; - let propertyName; - let canParseAsKeyword = true; - let name = parseIdentifierName(); - if (name.escapedText === "type") { - if (token() === 130 /* AsKeyword */) { - const firstAs = parseIdentifierName(); - if (token() === 130 /* AsKeyword */) { - const secondAs = parseIdentifierName(); - if (tokenIsIdentifierOrKeyword(token())) { - isTypeOnly = true; - propertyName = firstAs; - name = parseNameWithKeywordCheck(); - canParseAsKeyword = false; - } else { - propertyName = name; - name = secondAs; - canParseAsKeyword = false; - } - } else if (tokenIsIdentifierOrKeyword(token())) { - propertyName = name; - canParseAsKeyword = false; - name = parseNameWithKeywordCheck(); - } else { - isTypeOnly = true; - name = firstAs; - } - } else if (tokenIsIdentifierOrKeyword(token())) { - isTypeOnly = true; - name = parseNameWithKeywordCheck(); - } - } - if (canParseAsKeyword && token() === 130 /* AsKeyword */) { - propertyName = name; - parseExpected(130 /* AsKeyword */); - name = parseNameWithKeywordCheck(); - } - if (kind === 276 /* ImportSpecifier */ && checkIdentifierIsKeyword) { - parseErrorAt(checkIdentifierStart, checkIdentifierEnd, Diagnostics.Identifier_expected); - } - const node = kind === 276 /* ImportSpecifier */ ? factory2.createImportSpecifier(isTypeOnly, propertyName, name) : factory2.createExportSpecifier(isTypeOnly, propertyName, name); - return finishNode(node, pos); - function parseNameWithKeywordCheck() { - checkIdentifierIsKeyword = isKeyword(token()) && !isIdentifier2(); - checkIdentifierStart = scanner2.getTokenStart(); - checkIdentifierEnd = scanner2.getTokenEnd(); - return parseIdentifierName(); - } - } - function parseNamespaceExport(pos) { - return finishNode(factory2.createNamespaceExport(parseIdentifierName()), pos); - } - function parseExportDeclaration(pos, hasJSDoc, modifiers) { - const savedAwaitContext = inAwaitContext(); - setAwaitContext( - /*value*/ - true - ); - let exportClause; - let moduleSpecifier; - let assertClause; - const isTypeOnly = parseOptional(156 /* TypeKeyword */); - const namespaceExportPos = getNodePos(); - if (parseOptional(42 /* AsteriskToken */)) { - if (parseOptional(130 /* AsKeyword */)) { - exportClause = parseNamespaceExport(namespaceExportPos); - } - parseExpected(161 /* FromKeyword */); - moduleSpecifier = parseModuleSpecifier(); - } else { - exportClause = parseNamedImportsOrExports(279 /* NamedExports */); - if (token() === 161 /* FromKeyword */ || token() === 11 /* StringLiteral */ && !scanner2.hasPrecedingLineBreak()) { - parseExpected(161 /* FromKeyword */); - moduleSpecifier = parseModuleSpecifier(); - } - } - if (moduleSpecifier && token() === 132 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); - } - parseSemicolon(); - setAwaitContext(savedAwaitContext); - const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - function parseExportAssignment(pos, hasJSDoc, modifiers) { - const savedAwaitContext = inAwaitContext(); - setAwaitContext( - /*value*/ - true - ); - let isExportEquals; - if (parseOptional(64 /* EqualsToken */)) { - isExportEquals = true; - } else { - parseExpected(90 /* DefaultKeyword */); - } - const expression = parseAssignmentExpressionOrHigher( - /*allowReturnTypeInArrowFunction*/ - true - ); - parseSemicolon(); - setAwaitContext(savedAwaitContext); - const node = factory2.createExportAssignment(modifiers, isExportEquals, expression); - return withJSDoc(finishNode(node, pos), hasJSDoc); - } - let ParsingContext; - ((ParsingContext2) => { - ParsingContext2[ParsingContext2["SourceElements"] = 0] = "SourceElements"; - ParsingContext2[ParsingContext2["BlockStatements"] = 1] = "BlockStatements"; - ParsingContext2[ParsingContext2["SwitchClauses"] = 2] = "SwitchClauses"; - ParsingContext2[ParsingContext2["SwitchClauseStatements"] = 3] = "SwitchClauseStatements"; - ParsingContext2[ParsingContext2["TypeMembers"] = 4] = "TypeMembers"; - ParsingContext2[ParsingContext2["ClassMembers"] = 5] = "ClassMembers"; - ParsingContext2[ParsingContext2["EnumMembers"] = 6] = "EnumMembers"; - ParsingContext2[ParsingContext2["HeritageClauseElement"] = 7] = "HeritageClauseElement"; - ParsingContext2[ParsingContext2["VariableDeclarations"] = 8] = "VariableDeclarations"; - ParsingContext2[ParsingContext2["ObjectBindingElements"] = 9] = "ObjectBindingElements"; - ParsingContext2[ParsingContext2["ArrayBindingElements"] = 10] = "ArrayBindingElements"; - ParsingContext2[ParsingContext2["ArgumentExpressions"] = 11] = "ArgumentExpressions"; - ParsingContext2[ParsingContext2["ObjectLiteralMembers"] = 12] = "ObjectLiteralMembers"; - ParsingContext2[ParsingContext2["JsxAttributes"] = 13] = "JsxAttributes"; - ParsingContext2[ParsingContext2["JsxChildren"] = 14] = "JsxChildren"; - ParsingContext2[ParsingContext2["ArrayLiteralMembers"] = 15] = "ArrayLiteralMembers"; - ParsingContext2[ParsingContext2["Parameters"] = 16] = "Parameters"; - ParsingContext2[ParsingContext2["JSDocParameters"] = 17] = "JSDocParameters"; - ParsingContext2[ParsingContext2["RestProperties"] = 18] = "RestProperties"; - ParsingContext2[ParsingContext2["TypeParameters"] = 19] = "TypeParameters"; - ParsingContext2[ParsingContext2["TypeArguments"] = 20] = "TypeArguments"; - ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes"; - ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses"; - ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers"; - ParsingContext2[ParsingContext2["AssertEntries"] = 24] = "AssertEntries"; - ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment"; - ParsingContext2[ParsingContext2["Count"] = 26] = "Count"; - })(ParsingContext || (ParsingContext = {})); - let Tristate; - ((Tristate2) => { - Tristate2[Tristate2["False"] = 0] = "False"; - Tristate2[Tristate2["True"] = 1] = "True"; - Tristate2[Tristate2["Unknown"] = 2] = "Unknown"; - })(Tristate || (Tristate = {})); - let JSDocParser; - ((JSDocParser2) => { - function parseJSDocTypeExpressionForTests2(content, start, length2) { - initializeState( - "file.js", - content, - 99 /* Latest */, - /*syntaxCursor*/ - void 0, - 1 /* JS */ - ); - scanner2.setText(content, start, length2); - currentToken = scanner2.scan(); - const jsDocTypeExpression = parseJSDocTypeExpression(); - const sourceFile = createSourceFile2( - "file.js", - 99 /* Latest */, - 1 /* JS */, - /*isDeclarationFile*/ - false, - [], - factoryCreateToken(1 /* EndOfFileToken */), - 0 /* None */, - noop - ); - const diagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); - if (jsDocDiagnostics) { - sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile); - } - clearState(); - return jsDocTypeExpression ? { jsDocTypeExpression, diagnostics } : void 0; - } - JSDocParser2.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests2; - function parseJSDocTypeExpression(mayOmitBraces) { - const pos = getNodePos(); - const hasBrace = (mayOmitBraces ? parseOptional : parseExpected)(19 /* OpenBraceToken */); - const type = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); - if (!mayOmitBraces || hasBrace) { - parseExpectedJSDoc(20 /* CloseBraceToken */); - } - const result = factory2.createJSDocTypeExpression(type); - fixupParentReferences(result); - return finishNode(result, pos); - } - JSDocParser2.parseJSDocTypeExpression = parseJSDocTypeExpression; - function parseJSDocNameReference() { - const pos = getNodePos(); - const hasBrace = parseOptional(19 /* OpenBraceToken */); - const p2 = getNodePos(); - let entityName = parseEntityName( - /*allowReservedWords*/ - false - ); - while (token() === 81 /* PrivateIdentifier */) { - reScanHashToken(); - nextTokenJSDoc(); - entityName = finishNode(factory2.createJSDocMemberName(entityName, parseIdentifier()), p2); - } - if (hasBrace) { - parseExpectedJSDoc(20 /* CloseBraceToken */); - } - const result = factory2.createJSDocNameReference(entityName); - fixupParentReferences(result); - return finishNode(result, pos); - } - JSDocParser2.parseJSDocNameReference = parseJSDocNameReference; - function parseIsolatedJSDocComment2(content, start, length2) { - initializeState( - "", - content, - 99 /* Latest */, - /*syntaxCursor*/ - void 0, - 1 /* JS */ - ); - const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); - const sourceFile = { languageVariant: 0 /* Standard */, text: content }; - const diagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); - clearState(); - return jsDoc ? { jsDoc, diagnostics } : void 0; - } - JSDocParser2.parseIsolatedJSDocComment = parseIsolatedJSDocComment2; - function parseJSDocComment(parent2, start, length2) { - const saveToken = currentToken; - const saveParseDiagnosticsLength = parseDiagnostics.length; - const saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - const comment = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); - setParent(comment, parent2); - if (contextFlags & 524288 /* JavaScriptFile */) { - if (!jsDocDiagnostics) { - jsDocDiagnostics = []; - } - jsDocDiagnostics.push(...parseDiagnostics); - } - currentToken = saveToken; - parseDiagnostics.length = saveParseDiagnosticsLength; - parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode; - return comment; - } - JSDocParser2.parseJSDocComment = parseJSDocComment; - let JSDocState; - ((JSDocState2) => { - JSDocState2[JSDocState2["BeginningOfLine"] = 0] = "BeginningOfLine"; - JSDocState2[JSDocState2["SawAsterisk"] = 1] = "SawAsterisk"; - JSDocState2[JSDocState2["SavingComments"] = 2] = "SavingComments"; - JSDocState2[JSDocState2["SavingBackticks"] = 3] = "SavingBackticks"; - })(JSDocState || (JSDocState = {})); - let PropertyLikeParse; - ((PropertyLikeParse2) => { - PropertyLikeParse2[PropertyLikeParse2["Property"] = 1] = "Property"; - PropertyLikeParse2[PropertyLikeParse2["Parameter"] = 2] = "Parameter"; - PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter"; - })(PropertyLikeParse || (PropertyLikeParse = {})); - function parseJSDocCommentWorker(start = 0, length2) { - const saveParsingContext = parsingContext; - parsingContext |= 1 << 25 /* JSDocComment */; - const content = sourceText; - const end = length2 === void 0 ? content.length : start + length2; - length2 = end - start; - Debug.assert(start >= 0); - Debug.assert(start <= end); - Debug.assert(end <= content.length); - if (!isJSDocLikeText(content, start)) { - return void 0; - } - let tags; - let tagsPos; - let tagsEnd; - let linkEnd; - let commentsPos; - let comments = []; - const parts = []; - const result = scanner2.scanRange(start + 3, length2 - 5, doJSDocScan); - parsingContext = saveParsingContext; - return result; - function doJSDocScan() { - let state = 1 /* SawAsterisk */; - let margin; - let indent3 = start - (content.lastIndexOf("\n", start) + 1) + 4; - function pushComment(text) { - if (!margin) { - margin = indent3; - } - comments.push(text); - indent3 += text.length; - } - nextTokenJSDoc(); - while (parseOptionalJsdoc(5 /* WhitespaceTrivia */)) - ; - if (parseOptionalJsdoc(4 /* NewLineTrivia */)) { - state = 0 /* BeginningOfLine */; - indent3 = 0; - } - loop: - while (true) { - switch (token()) { - case 60 /* AtToken */: - removeTrailingWhitespace(comments); - if (!commentsPos) - commentsPos = getNodePos(); - addTag(parseTag(indent3)); - state = 0 /* BeginningOfLine */; - margin = void 0; - break; - case 4 /* NewLineTrivia */: - comments.push(scanner2.getTokenText()); - state = 0 /* BeginningOfLine */; - indent3 = 0; - break; - case 42 /* AsteriskToken */: - const asterisk = scanner2.getTokenText(); - if (state === 1 /* SawAsterisk */) { - state = 2 /* SavingComments */; - pushComment(asterisk); - } else { - Debug.assert(state === 0 /* BeginningOfLine */); - state = 1 /* SawAsterisk */; - indent3 += asterisk.length; - } - break; - case 5 /* WhitespaceTrivia */: - Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text"); - const whitespace = scanner2.getTokenText(); - if (margin !== void 0 && indent3 + whitespace.length > margin) { - comments.push(whitespace.slice(margin - indent3)); - } - indent3 += whitespace.length; - break; - case 1 /* EndOfFileToken */: - break loop; - case 82 /* JSDocCommentTextToken */: - state = 2 /* SavingComments */; - pushComment(scanner2.getTokenValue()); - break; - case 19 /* OpenBraceToken */: - state = 2 /* SavingComments */; - const commentEnd = scanner2.getTokenFullStart(); - const linkStart = scanner2.getTokenEnd() - 1; - const link = parseJSDocLink(linkStart); - if (link) { - if (!linkEnd) { - removeLeadingNewlines(comments); - } - parts.push(finishNode(factory2.createJSDocText(comments.join("")), linkEnd ?? start, commentEnd)); - parts.push(link); - comments = []; - linkEnd = scanner2.getTokenEnd(); - break; - } - default: - state = 2 /* SavingComments */; - pushComment(scanner2.getTokenText()); - break; - } - if (state === 2 /* SavingComments */) { - nextJSDocCommentTextToken( - /*inBackticks*/ - false - ); - } else { - nextTokenJSDoc(); - } - } - const trimmedComments = trimStringEnd(comments.join("")); - if (parts.length && trimmedComments.length) { - parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start, commentsPos)); - } - if (parts.length && tags) - Debug.assertIsDefined(commentsPos, "having parsed tags implies that the end of the comment span should be set"); - const tagsArray = tags && createNodeArray(tags, tagsPos, tagsEnd); - return finishNode(factory2.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : trimmedComments.length ? trimmedComments : void 0, tagsArray), start, end); - } - function removeLeadingNewlines(comments2) { - while (comments2.length && (comments2[0] === "\n" || comments2[0] === "\r")) { - comments2.shift(); - } - } - function removeTrailingWhitespace(comments2) { - while (comments2.length) { - const trimmed = trimStringEnd(comments2[comments2.length - 1]); - if (trimmed === "") { - comments2.pop(); - } else if (trimmed.length < comments2[comments2.length - 1].length) { - comments2[comments2.length - 1] = trimmed; - break; - } else { - break; - } - } - } - function isNextNonwhitespaceTokenEndOfFile() { - while (true) { - nextTokenJSDoc(); - if (token() === 1 /* EndOfFileToken */) { - return true; - } - if (!(token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */)) { - return false; - } - } - } - function skipWhitespace() { - if (token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */) { - if (lookAhead(isNextNonwhitespaceTokenEndOfFile)) { - return; - } - } - while (token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */) { - nextTokenJSDoc(); - } - } - function skipWhitespaceOrAsterisk() { - if (token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */) { - if (lookAhead(isNextNonwhitespaceTokenEndOfFile)) { - return ""; - } - } - let precedingLineBreak = scanner2.hasPrecedingLineBreak(); - let seenLineBreak = false; - let indentText = ""; - while (precedingLineBreak && token() === 42 /* AsteriskToken */ || token() === 5 /* WhitespaceTrivia */ || token() === 4 /* NewLineTrivia */) { - indentText += scanner2.getTokenText(); - if (token() === 4 /* NewLineTrivia */) { - precedingLineBreak = true; - seenLineBreak = true; - indentText = ""; - } else if (token() === 42 /* AsteriskToken */) { - precedingLineBreak = false; - } - nextTokenJSDoc(); - } - return seenLineBreak ? indentText : ""; - } - function parseTag(margin) { - Debug.assert(token() === 60 /* AtToken */); - const start2 = scanner2.getTokenStart(); - nextTokenJSDoc(); - const tagName = parseJSDocIdentifierName( - /*message*/ - void 0 - ); - const indentText = skipWhitespaceOrAsterisk(); - let tag; - switch (tagName.escapedText) { - case "author": - tag = parseAuthorTag(start2, tagName, margin, indentText); - break; - case "implements": - tag = parseImplementsTag(start2, tagName, margin, indentText); - break; - case "augments": - case "extends": - tag = parseAugmentsTag(start2, tagName, margin, indentText); - break; - case "class": - case "constructor": - tag = parseSimpleTag(start2, factory2.createJSDocClassTag, tagName, margin, indentText); - break; - case "public": - tag = parseSimpleTag(start2, factory2.createJSDocPublicTag, tagName, margin, indentText); - break; - case "private": - tag = parseSimpleTag(start2, factory2.createJSDocPrivateTag, tagName, margin, indentText); - break; - case "protected": - tag = parseSimpleTag(start2, factory2.createJSDocProtectedTag, tagName, margin, indentText); - break; - case "readonly": - tag = parseSimpleTag(start2, factory2.createJSDocReadonlyTag, tagName, margin, indentText); - break; - case "override": - tag = parseSimpleTag(start2, factory2.createJSDocOverrideTag, tagName, margin, indentText); - break; - case "deprecated": - hasDeprecatedTag = true; - tag = parseSimpleTag(start2, factory2.createJSDocDeprecatedTag, tagName, margin, indentText); - break; - case "this": - tag = parseThisTag(start2, tagName, margin, indentText); - break; - case "enum": - tag = parseEnumTag(start2, tagName, margin, indentText); - break; - case "arg": - case "argument": - case "param": - return parseParameterOrPropertyTag(start2, tagName, 2 /* Parameter */, margin); - case "return": - case "returns": - tag = parseReturnTag(start2, tagName, margin, indentText); - break; - case "template": - tag = parseTemplateTag(start2, tagName, margin, indentText); - break; - case "type": - tag = parseTypeTag(start2, tagName, margin, indentText); - break; - case "typedef": - tag = parseTypedefTag(start2, tagName, margin, indentText); - break; - case "callback": - tag = parseCallbackTag(start2, tagName, margin, indentText); - break; - case "overload": - tag = parseOverloadTag(start2, tagName, margin, indentText); - break; - case "satisfies": - tag = parseSatisfiesTag(start2, tagName, margin, indentText); - break; - case "see": - tag = parseSeeTag(start2, tagName, margin, indentText); - break; - case "exception": - case "throws": - tag = parseThrowsTag(start2, tagName, margin, indentText); - break; - default: - tag = parseUnknownTag(start2, tagName, margin, indentText); - break; - } - return tag; - } - function parseTrailingTagComments(pos, end2, margin, indentText) { - if (!indentText) { - margin += end2 - pos; - } - return parseTagComments(margin, indentText.slice(margin)); - } - function parseTagComments(indent3, initialMargin) { - const commentsPos2 = getNodePos(); - let comments2 = []; - const parts2 = []; - let linkEnd2; - let state = 0 /* BeginningOfLine */; - let margin; - function pushComment(text) { - if (!margin) { - margin = indent3; - } - comments2.push(text); - indent3 += text.length; - } - if (initialMargin !== void 0) { - if (initialMargin !== "") { - pushComment(initialMargin); - } - state = 1 /* SawAsterisk */; - } - let tok = token(); - loop: - while (true) { - switch (tok) { - case 4 /* NewLineTrivia */: - state = 0 /* BeginningOfLine */; - comments2.push(scanner2.getTokenText()); - indent3 = 0; - break; - case 60 /* AtToken */: - scanner2.resetTokenState(scanner2.getTokenEnd() - 1); - break loop; - case 1 /* EndOfFileToken */: - break loop; - case 5 /* WhitespaceTrivia */: - Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text"); - const whitespace = scanner2.getTokenText(); - if (margin !== void 0 && indent3 + whitespace.length > margin) { - comments2.push(whitespace.slice(margin - indent3)); - state = 2 /* SavingComments */; - } - indent3 += whitespace.length; - break; - case 19 /* OpenBraceToken */: - state = 2 /* SavingComments */; - const commentEnd = scanner2.getTokenFullStart(); - const linkStart = scanner2.getTokenEnd() - 1; - const link = parseJSDocLink(linkStart); - if (link) { - parts2.push(finishNode(factory2.createJSDocText(comments2.join("")), linkEnd2 ?? commentsPos2, commentEnd)); - parts2.push(link); - comments2 = []; - linkEnd2 = scanner2.getTokenEnd(); - } else { - pushComment(scanner2.getTokenText()); - } - break; - case 62 /* BacktickToken */: - if (state === 3 /* SavingBackticks */) { - state = 2 /* SavingComments */; - } else { - state = 3 /* SavingBackticks */; - } - pushComment(scanner2.getTokenText()); - break; - case 82 /* JSDocCommentTextToken */: - if (state !== 3 /* SavingBackticks */) { - state = 2 /* SavingComments */; - } - pushComment(scanner2.getTokenValue()); - break; - case 42 /* AsteriskToken */: - if (state === 0 /* BeginningOfLine */) { - state = 1 /* SawAsterisk */; - indent3 += 1; - break; - } - default: - if (state !== 3 /* SavingBackticks */) { - state = 2 /* SavingComments */; - } - pushComment(scanner2.getTokenText()); - break; - } - if (state === 2 /* SavingComments */ || state === 3 /* SavingBackticks */) { - tok = nextJSDocCommentTextToken(state === 3 /* SavingBackticks */); - } else { - tok = nextTokenJSDoc(); - } - } - removeLeadingNewlines(comments2); - const trimmedComments = trimStringEnd(comments2.join("")); - if (parts2.length) { - if (trimmedComments.length) { - parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2)); - } - return createNodeArray(parts2, commentsPos2, scanner2.getTokenEnd()); - } else if (trimmedComments.length) { - return trimmedComments; - } - } - function parseJSDocLink(start2) { - const linkType = tryParse(parseJSDocLinkPrefix); - if (!linkType) { - return void 0; - } - nextTokenJSDoc(); - skipWhitespace(); - const p2 = getNodePos(); - let name = tokenIsIdentifierOrKeyword(token()) ? parseEntityName( - /*allowReservedWords*/ - true - ) : void 0; - if (name) { - while (token() === 81 /* PrivateIdentifier */) { - reScanHashToken(); - nextTokenJSDoc(); - name = finishNode(factory2.createJSDocMemberName(name, parseIdentifier()), p2); - } - } - const text = []; - while (token() !== 20 /* CloseBraceToken */ && token() !== 4 /* NewLineTrivia */ && token() !== 1 /* EndOfFileToken */) { - text.push(scanner2.getTokenText()); - nextTokenJSDoc(); - } - const create = linkType === "link" ? factory2.createJSDocLink : linkType === "linkcode" ? factory2.createJSDocLinkCode : factory2.createJSDocLinkPlain; - return finishNode(create(name, text.join("")), start2, scanner2.getTokenEnd()); - } - function parseJSDocLinkPrefix() { - skipWhitespaceOrAsterisk(); - if (token() === 19 /* OpenBraceToken */ && nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc())) { - const kind = scanner2.getTokenValue(); - if (isJSDocLinkTag(kind)) - return kind; - } - } - function isJSDocLinkTag(kind) { - return kind === "link" || kind === "linkcode" || kind === "linkplain"; - } - function parseUnknownTag(start2, tagName, indent3, indentText) { - return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); - } - function addTag(tag) { - if (!tag) { - return; - } - if (!tags) { - tags = [tag]; - tagsPos = tag.pos; - } else { - tags.push(tag); - } - tagsEnd = tag.end; - } - function tryParseTypeExpression() { - skipWhitespaceOrAsterisk(); - return token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0; - } - function parseBracketNameInPropertyAndParamTag() { - const isBracketed = parseOptionalJsdoc(23 /* OpenBracketToken */); - if (isBracketed) { - skipWhitespace(); - } - const isBackquoted = parseOptionalJsdoc(62 /* BacktickToken */); - const name = parseJSDocEntityName(); - if (isBackquoted) { - parseExpectedTokenJSDoc(62 /* BacktickToken */); - } - if (isBracketed) { - skipWhitespace(); - if (parseOptionalToken(64 /* EqualsToken */)) { - parseExpression(); - } - parseExpected(24 /* CloseBracketToken */); - } - return { name, isBracketed }; - } - function isObjectOrObjectArrayTypeReference(node) { - switch (node.kind) { - case 151 /* ObjectKeyword */: - return true; - case 188 /* ArrayType */: - return isObjectOrObjectArrayTypeReference(node.elementType); - default: - return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; - } - } - function parseParameterOrPropertyTag(start2, tagName, target, indent3) { - let typeExpression = tryParseTypeExpression(); - let isNameFirst = !typeExpression; - skipWhitespaceOrAsterisk(); - const { name, isBracketed } = parseBracketNameInPropertyAndParamTag(); - const indentText = skipWhitespaceOrAsterisk(); - if (isNameFirst && !lookAhead(parseJSDocLinkPrefix)) { - typeExpression = tryParseTypeExpression(); - } - const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); - const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent3); - if (nestedTypeLiteral) { - typeExpression = nestedTypeLiteral; - isNameFirst = true; - } - const result2 = target === 1 /* Property */ ? factory2.createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) : factory2.createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment); - return finishNode(result2, start2); - } - function parseNestedTypeLiteral(typeExpression, name, target, indent3) { - if (typeExpression && isObjectOrObjectArrayTypeReference(typeExpression.type)) { - const pos = getNodePos(); - let child; - let children; - while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { - if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) { - children = append(children, child); - } else if (child.kind === 352 /* JSDocTemplateTag */) { - parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); - } - } - if (children) { - const literal = finishNode(factory2.createJSDocTypeLiteral(children, typeExpression.type.kind === 188 /* ArrayType */), pos); - return finishNode(factory2.createJSDocTypeExpression(literal), pos); - } - } - } - function parseReturnTag(start2, tagName, indent3, indentText) { - if (some(tags, isJSDocReturnTag)) { - parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText)); - } - const typeExpression = tryParseTypeExpression(); - return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); - } - function parseTypeTag(start2, tagName, indent3, indentText) { - if (some(tags, isJSDocTypeTag)) { - parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText)); - } - const typeExpression = parseJSDocTypeExpression( - /*mayOmitBraces*/ - true - ); - const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0; - return finishNode(factory2.createJSDocTypeTag(tagName, typeExpression, comments2), start2); - } - function parseSeeTag(start2, tagName, indent3, indentText) { - const isMarkdownOrJSDocLink = token() === 23 /* OpenBracketToken */ || lookAhead(() => nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && isJSDocLinkTag(scanner2.getTokenValue())); - const nameExpression = isMarkdownOrJSDocLink ? void 0 : parseJSDocNameReference(); - const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0; - return finishNode(factory2.createJSDocSeeTag(tagName, nameExpression, comments2), start2); - } - function parseThrowsTag(start2, tagName, indent3, indentText) { - const typeExpression = tryParseTypeExpression(); - const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); - return finishNode(factory2.createJSDocThrowsTag(tagName, typeExpression, comment), start2); - } - function parseAuthorTag(start2, tagName, indent3, indentText) { - const commentStart = getNodePos(); - const textOnly = parseAuthorNameAndEmail(); - let commentEnd = scanner2.getTokenFullStart(); - const comments2 = parseTrailingTagComments(start2, commentEnd, indent3, indentText); - if (!comments2) { - commentEnd = scanner2.getTokenFullStart(); - } - const allParts = typeof comments2 !== "string" ? createNodeArray(concatenate([finishNode(textOnly, commentStart, commentEnd)], comments2), commentStart) : textOnly.text + comments2; - return finishNode(factory2.createJSDocAuthorTag(tagName, allParts), start2); - } - function parseAuthorNameAndEmail() { - const comments2 = []; - let inEmail = false; - let token2 = scanner2.getToken(); - while (token2 !== 1 /* EndOfFileToken */ && token2 !== 4 /* NewLineTrivia */) { - if (token2 === 30 /* LessThanToken */) { - inEmail = true; - } else if (token2 === 60 /* AtToken */ && !inEmail) { - break; - } else if (token2 === 32 /* GreaterThanToken */ && inEmail) { - comments2.push(scanner2.getTokenText()); - scanner2.resetTokenState(scanner2.getTokenEnd()); - break; - } - comments2.push(scanner2.getTokenText()); - token2 = nextTokenJSDoc(); - } - return factory2.createJSDocText(comments2.join("")); - } - function parseImplementsTag(start2, tagName, margin, indentText) { - const className = parseExpressionWithTypeArgumentsForAugments(); - return finishNode(factory2.createJSDocImplementsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2); - } - function parseAugmentsTag(start2, tagName, margin, indentText) { - const className = parseExpressionWithTypeArgumentsForAugments(); - return finishNode(factory2.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2); - } - function parseSatisfiesTag(start2, tagName, margin, indentText) { - const typeExpression = parseJSDocTypeExpression( - /*mayOmitBraces*/ - false - ); - const comments2 = margin !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), margin, indentText) : void 0; - return finishNode(factory2.createJSDocSatisfiesTag(tagName, typeExpression, comments2), start2); - } - function parseExpressionWithTypeArgumentsForAugments() { - const usedBrace = parseOptional(19 /* OpenBraceToken */); - const pos = getNodePos(); - const expression = parsePropertyAccessEntityNameExpression(); - scanner2.setInJSDocType(true); - const typeArguments = tryParseTypeArguments(); - scanner2.setInJSDocType(false); - const node = factory2.createExpressionWithTypeArguments(expression, typeArguments); - const res = finishNode(node, pos); - if (usedBrace) { - parseExpected(20 /* CloseBraceToken */); - } - return res; - } - function parsePropertyAccessEntityNameExpression() { - const pos = getNodePos(); - let node = parseJSDocIdentifierName(); - while (parseOptional(25 /* DotToken */)) { - const name = parseJSDocIdentifierName(); - node = finishNode(factoryCreatePropertyAccessExpression(node, name), pos); - } - return node; - } - function parseSimpleTag(start2, createTag, tagName, margin, indentText) { - return finishNode(createTag(tagName, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2); - } - function parseThisTag(start2, tagName, margin, indentText) { - const typeExpression = parseJSDocTypeExpression( - /*mayOmitBraces*/ - true - ); - skipWhitespace(); - return finishNode(factory2.createJSDocThisTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2); - } - function parseEnumTag(start2, tagName, margin, indentText) { - const typeExpression = parseJSDocTypeExpression( - /*mayOmitBraces*/ - true - ); - skipWhitespace(); - return finishNode(factory2.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2); - } - function parseTypedefTag(start2, tagName, indent3, indentText) { - let typeExpression = tryParseTypeExpression(); - skipWhitespaceOrAsterisk(); - const fullName = parseJSDocTypeNameWithNamespace(); - skipWhitespace(); - let comment = parseTagComments(indent3); - let end2; - if (!typeExpression || isObjectOrObjectArrayTypeReference(typeExpression.type)) { - let child; - let childTypeTag; - let jsDocPropertyTags; - let hasChildren = false; - while (child = tryParse(() => parseChildPropertyTag(indent3))) { - if (child.kind === 352 /* JSDocTemplateTag */) { - break; - } - hasChildren = true; - if (child.kind === 351 /* JSDocTypeTag */) { - if (childTypeTag) { - const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); - if (lastError) { - addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here)); - } - break; - } else { - childTypeTag = child; - } - } else { - jsDocPropertyTags = append(jsDocPropertyTags, child); - } - } - if (hasChildren) { - const isArrayType = typeExpression && typeExpression.type.kind === 188 /* ArrayType */; - const jsdocTypeLiteral = factory2.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType); - typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ? childTypeTag.typeExpression : finishNode(jsdocTypeLiteral, start2); - end2 = typeExpression.end; - } - } - end2 = end2 || comment !== void 0 ? getNodePos() : (fullName ?? typeExpression ?? tagName).end; - if (!comment) { - comment = parseTrailingTagComments(start2, end2, indent3, indentText); - } - const typedefTag = factory2.createJSDocTypedefTag(tagName, typeExpression, fullName, comment); - return finishNode(typedefTag, start2, end2); - } - function parseJSDocTypeNameWithNamespace(nested) { - const start2 = scanner2.getTokenStart(); - if (!tokenIsIdentifierOrKeyword(token())) { - return void 0; - } - const typeNameOrNamespaceName = parseJSDocIdentifierName(); - if (parseOptional(25 /* DotToken */)) { - const body = parseJSDocTypeNameWithNamespace( - /*nested*/ - true - ); - const jsDocNamespaceNode = factory2.createModuleDeclaration( - /*modifiers*/ - void 0, - typeNameOrNamespaceName, - body, - nested ? 8 /* NestedNamespace */ : void 0 - ); - return finishNode(jsDocNamespaceNode, start2); - } - if (nested) { - typeNameOrNamespaceName.flags |= 4096 /* IdentifierIsInJSDocNamespace */; - } - return typeNameOrNamespaceName; - } - function parseCallbackTagParameters(indent3) { - const pos = getNodePos(); - let child; - let parameters; - while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) { - if (child.kind === 352 /* JSDocTemplateTag */) { - parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); - break; - } - parameters = append(parameters, child); - } - return createNodeArray(parameters || [], pos); - } - function parseJSDocSignature(start2, indent3) { - const parameters = parseCallbackTagParameters(indent3); - const returnTag = tryParse(() => { - if (parseOptionalJsdoc(60 /* AtToken */)) { - const tag = parseTag(indent3); - if (tag && tag.kind === 349 /* JSDocReturnTag */) { - return tag; - } - } - }); - return finishNode(factory2.createJSDocSignature( - /*typeParameters*/ - void 0, - parameters, - returnTag - ), start2); - } - function parseCallbackTag(start2, tagName, indent3, indentText) { - const fullName = parseJSDocTypeNameWithNamespace(); - skipWhitespace(); - let comment = parseTagComments(indent3); - const typeExpression = parseJSDocSignature(start2, indent3); - if (!comment) { - comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); - } - const end2 = comment !== void 0 ? getNodePos() : typeExpression.end; - return finishNode(factory2.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start2, end2); - } - function parseOverloadTag(start2, tagName, indent3, indentText) { - skipWhitespace(); - let comment = parseTagComments(indent3); - const typeExpression = parseJSDocSignature(start2, indent3); - if (!comment) { - comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); - } - const end2 = comment !== void 0 ? getNodePos() : typeExpression.end; - return finishNode(factory2.createJSDocOverloadTag(tagName, typeExpression, comment), start2, end2); - } - function escapedTextsEqual(a, b) { - while (!isIdentifier(a) || !isIdentifier(b)) { - if (!isIdentifier(a) && !isIdentifier(b) && a.right.escapedText === b.right.escapedText) { - a = a.left; - b = b.left; - } else { - return false; - } - } - return a.escapedText === b.escapedText; - } - function parseChildPropertyTag(indent3) { - return parseChildParameterOrPropertyTag(1 /* Property */, indent3); - } - function parseChildParameterOrPropertyTag(target, indent3, name) { - let canParseTag = true; - let seenAsterisk = false; - while (true) { - switch (nextTokenJSDoc()) { - case 60 /* AtToken */: - if (canParseTag) { - const child = tryParseChildTag(target, indent3); - if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { - return false; - } - return child; - } - seenAsterisk = false; - break; - case 4 /* NewLineTrivia */: - canParseTag = true; - seenAsterisk = false; - break; - case 42 /* AsteriskToken */: - if (seenAsterisk) { - canParseTag = false; - } - seenAsterisk = true; - break; - case 80 /* Identifier */: - canParseTag = false; - break; - case 1 /* EndOfFileToken */: - return false; - } - } - } - function tryParseChildTag(target, indent3) { - Debug.assert(token() === 60 /* AtToken */); - const start2 = scanner2.getTokenFullStart(); - nextTokenJSDoc(); - const tagName = parseJSDocIdentifierName(); - const indentText = skipWhitespaceOrAsterisk(); - let t; - switch (tagName.escapedText) { - case "type": - return target === 1 /* Property */ && parseTypeTag(start2, tagName); - case "prop": - case "property": - t = 1 /* Property */; - break; - case "arg": - case "argument": - case "param": - t = 2 /* Parameter */ | 4 /* CallbackParameter */; - break; - case "template": - return parseTemplateTag(start2, tagName, indent3, indentText); - default: - return false; - } - if (!(target & t)) { - return false; - } - return parseParameterOrPropertyTag(start2, tagName, target, indent3); - } - function parseTemplateTagTypeParameter() { - const typeParameterPos = getNodePos(); - const isBracketed = parseOptionalJsdoc(23 /* OpenBracketToken */); - if (isBracketed) { - skipWhitespace(); - } - const name = parseJSDocIdentifierName(Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces); - let defaultType; - if (isBracketed) { - skipWhitespace(); - parseExpected(64 /* EqualsToken */); - defaultType = doInsideOfContext(16777216 /* JSDoc */, parseJSDocType); - parseExpected(24 /* CloseBracketToken */); - } - if (nodeIsMissing(name)) { - return void 0; - } - return finishNode(factory2.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - name, - /*constraint*/ - void 0, - defaultType - ), typeParameterPos); - } - function parseTemplateTagTypeParameters() { - const pos = getNodePos(); - const typeParameters = []; - do { - skipWhitespace(); - const node = parseTemplateTagTypeParameter(); - if (node !== void 0) { - typeParameters.push(node); - } - skipWhitespaceOrAsterisk(); - } while (parseOptionalJsdoc(28 /* CommaToken */)); - return createNodeArray(typeParameters, pos); - } - function parseTemplateTag(start2, tagName, indent3, indentText) { - const constraint = token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0; - const typeParameters = parseTemplateTagTypeParameters(); - return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); - } - function parseOptionalJsdoc(t) { - if (token() === t) { - nextTokenJSDoc(); - return true; - } - return false; - } - function parseJSDocEntityName() { - let entity = parseJSDocIdentifierName(); - if (parseOptional(23 /* OpenBracketToken */)) { - parseExpected(24 /* CloseBracketToken */); - } - while (parseOptional(25 /* DotToken */)) { - const name = parseJSDocIdentifierName(); - if (parseOptional(23 /* OpenBracketToken */)) { - parseExpected(24 /* CloseBracketToken */); - } - entity = createQualifiedName(entity, name); - } - return entity; - } - function parseJSDocIdentifierName(message) { - if (!tokenIsIdentifierOrKeyword(token())) { - return createMissingNode( - 80 /* Identifier */, - /*reportAtCurrentPosition*/ - !message, - message || Diagnostics.Identifier_expected - ); - } - identifierCount++; - const start2 = scanner2.getTokenStart(); - const end2 = scanner2.getTokenEnd(); - const originalKeywordKind = token(); - const text = internIdentifier(scanner2.getTokenValue()); - const result2 = finishNode(factoryCreateIdentifier(text, originalKeywordKind), start2, end2); - nextTokenJSDoc(); - return result2; - } - } - })(JSDocParser = Parser2.JSDocParser || (Parser2.JSDocParser = {})); - })(Parser || (Parser = {})); - ((IncrementalParser2) => { - function updateSourceFile2(sourceFile, newText, textChangeRange, aggressiveChecks) { - aggressiveChecks = aggressiveChecks || Debug.shouldAssert(2 /* Aggressive */); - checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); - if (textChangeRangeIsUnchanged(textChangeRange)) { - return sourceFile; - } - if (sourceFile.statements.length === 0) { - return Parser.parseSourceFile( - sourceFile.fileName, - newText, - sourceFile.languageVersion, - /*syntaxCursor*/ - void 0, - /*setParentNodes*/ - true, - sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator - ); - } - const incrementalSourceFile = sourceFile; - Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); - incrementalSourceFile.hasBeenIncrementallyParsed = true; - Parser.fixupParentReferences(incrementalSourceFile); - const oldText = sourceFile.text; - const syntaxCursor = createSyntaxCursor(sourceFile); - const changeRange = extendToAffectedRange(sourceFile, textChangeRange); - checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); - Debug.assert(changeRange.span.start <= textChangeRange.span.start); - Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span)); - Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange))); - const delta = textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - updateTokenPositionsAndMarkElements( - incrementalSourceFile, - changeRange.span.start, - textSpanEnd(changeRange.span), - textSpanEnd(textChangeRangeNewSpan(changeRange)), - delta, - oldText, - newText, - aggressiveChecks - ); - const result = Parser.parseSourceFile( - sourceFile.fileName, - newText, - sourceFile.languageVersion, - syntaxCursor, - /*setParentNodes*/ - true, - sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator - ); - result.commentDirectives = getNewCommentDirectives( - sourceFile.commentDirectives, - result.commentDirectives, - changeRange.span.start, - textSpanEnd(changeRange.span), - delta, - oldText, - newText, - aggressiveChecks - ); - result.impliedNodeFormat = sourceFile.impliedNodeFormat; - return result; - } - IncrementalParser2.updateSourceFile = updateSourceFile2; - function getNewCommentDirectives(oldDirectives, newDirectives, changeStart, changeRangeOldEnd, delta, oldText, newText, aggressiveChecks) { - if (!oldDirectives) - return newDirectives; - let commentDirectives; - let addedNewlyScannedDirectives = false; - for (const directive of oldDirectives) { - const { range, type } = directive; - if (range.end < changeStart) { - commentDirectives = append(commentDirectives, directive); - } else if (range.pos > changeRangeOldEnd) { - addNewlyScannedDirectives(); - const updatedDirective = { - range: { pos: range.pos + delta, end: range.end + delta }, - type - }; - commentDirectives = append(commentDirectives, updatedDirective); - if (aggressiveChecks) { - Debug.assert(oldText.substring(range.pos, range.end) === newText.substring(updatedDirective.range.pos, updatedDirective.range.end)); - } - } - } - addNewlyScannedDirectives(); - return commentDirectives; - function addNewlyScannedDirectives() { - if (addedNewlyScannedDirectives) - return; - addedNewlyScannedDirectives = true; - if (!commentDirectives) { - commentDirectives = newDirectives; - } else if (newDirectives) { - commentDirectives.push(...newDirectives); - } - } - } - function moveElementEntirelyPastChangeRange(element, isArray2, delta, oldText, newText, aggressiveChecks) { - if (isArray2) { - visitArray2(element); - } else { - visitNode3(element); - } - return; - function visitNode3(node) { - let text = ""; - if (aggressiveChecks && shouldCheckNode(node)) { - text = oldText.substring(node.pos, node.end); - } - if (node._children) { - node._children = void 0; - } - setTextRangePosEnd(node, node.pos + delta, node.end + delta); - if (aggressiveChecks && shouldCheckNode(node)) { - Debug.assert(text === newText.substring(node.pos, node.end)); - } - forEachChild(node, visitNode3, visitArray2); - if (hasJSDocNodes(node)) { - for (const jsDocComment of node.jsDoc) { - visitNode3(jsDocComment); - } - } - checkNodePositions(node, aggressiveChecks); - } - function visitArray2(array) { - array._children = void 0; - setTextRangePosEnd(array, array.pos + delta, array.end + delta); - for (const node of array) { - visitNode3(node); - } - } - } - function shouldCheckNode(node) { - switch (node.kind) { - case 11 /* StringLiteral */: - case 9 /* NumericLiteral */: - case 80 /* Identifier */: - return true; - } - return false; - } - function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { - Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); - Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range"); - Debug.assert(element.pos <= element.end); - const pos = Math.min(element.pos, changeRangeNewEnd); - const end = element.end >= changeRangeOldEnd ? ( - // Element ends after the change range. Always adjust the end pos. - element.end + delta - ) : ( - // Element ends in the change range. The element will keep its position if - // possible. Or Move backward to the new-end if it's in the 'Y' range. - Math.min(element.end, changeRangeNewEnd) - ); - Debug.assert(pos <= end); - if (element.parent) { - Debug.assertGreaterThanOrEqual(pos, element.parent.pos); - Debug.assertLessThanOrEqual(end, element.parent.end); - } - setTextRangePosEnd(element, pos, end); - } - function checkNodePositions(node, aggressiveChecks) { - if (aggressiveChecks) { - let pos = node.pos; - const visitNode3 = (child) => { - Debug.assert(child.pos >= pos); - pos = child.end; - }; - if (hasJSDocNodes(node)) { - for (const jsDocComment of node.jsDoc) { - visitNode3(jsDocComment); - } - } - forEachChild(node, visitNode3); - Debug.assert(pos <= node.end); - } - } - function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { - visitNode3(sourceFile); - return; - function visitNode3(child) { - Debug.assert(child.pos <= child.end); - if (child.pos > changeRangeOldEnd) { - moveElementEntirelyPastChangeRange( - child, - /*isArray*/ - false, - delta, - oldText, - newText, - aggressiveChecks - ); - return; - } - const fullEnd = child.end; - if (fullEnd >= changeStart) { - child.intersectsChange = true; - child._children = void 0; - adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - forEachChild(child, visitNode3, visitArray2); - if (hasJSDocNodes(child)) { - for (const jsDocComment of child.jsDoc) { - visitNode3(jsDocComment); - } - } - checkNodePositions(child, aggressiveChecks); - return; - } - Debug.assert(fullEnd < changeStart); - } - function visitArray2(array) { - Debug.assert(array.pos <= array.end); - if (array.pos > changeRangeOldEnd) { - moveElementEntirelyPastChangeRange( - array, - /*isArray*/ - true, - delta, - oldText, - newText, - aggressiveChecks - ); - return; - } - const fullEnd = array.end; - if (fullEnd >= changeStart) { - array.intersectsChange = true; - array._children = void 0; - adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (const node of array) { - visitNode3(node); - } - return; - } - Debug.assert(fullEnd < changeStart); - } - } - function extendToAffectedRange(sourceFile, changeRange) { - const maxLookahead = 1; - let start = changeRange.span.start; - for (let i = 0; start > 0 && i <= maxLookahead; i++) { - const nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); - Debug.assert(nearestNode.pos <= start); - const position = nearestNode.pos; - start = Math.max(0, position - 1); - } - const finalSpan = createTextSpanFromBounds(start, textSpanEnd(changeRange.span)); - const finalLength = changeRange.newLength + (changeRange.span.start - start); - return createTextChangeRange(finalSpan, finalLength); - } - function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { - let bestResult = sourceFile; - let lastNodeEntirelyBeforePosition; - forEachChild(sourceFile, visit); - if (lastNodeEntirelyBeforePosition) { - const lastChildOfLastEntireNodeBeforePosition = getLastDescendant(lastNodeEntirelyBeforePosition); - if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { - bestResult = lastChildOfLastEntireNodeBeforePosition; - } - } - return bestResult; - function getLastDescendant(node) { - while (true) { - const lastChild = getLastChild(node); - if (lastChild) { - node = lastChild; - } else { - return node; - } - } - } - function visit(child) { - if (nodeIsMissing(child)) { - return; - } - if (child.pos <= position) { - if (child.pos >= bestResult.pos) { - bestResult = child; - } - if (position < child.end) { - forEachChild(child, visit); - return true; - } else { - Debug.assert(child.end <= position); - lastNodeEntirelyBeforePosition = child; - } - } else { - Debug.assert(child.pos > position); - return true; - } - } - } - function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { - const oldText = sourceFile.text; - if (textChangeRange) { - Debug.assert(oldText.length - textChangeRange.span.length + textChangeRange.newLength === newText.length); - if (aggressiveChecks || Debug.shouldAssert(3 /* VeryAggressive */)) { - const oldTextPrefix = oldText.substr(0, textChangeRange.span.start); - const newTextPrefix = newText.substr(0, textChangeRange.span.start); - Debug.assert(oldTextPrefix === newTextPrefix); - const oldTextSuffix = oldText.substring(textSpanEnd(textChangeRange.span), oldText.length); - const newTextSuffix = newText.substring(textSpanEnd(textChangeRangeNewSpan(textChangeRange)), newText.length); - Debug.assert(oldTextSuffix === newTextSuffix); - } - } - } - function createSyntaxCursor(sourceFile) { - let currentArray = sourceFile.statements; - let currentArrayIndex = 0; - Debug.assert(currentArrayIndex < currentArray.length); - let current = currentArray[currentArrayIndex]; - let lastQueriedPosition = -1 /* Value */; - return { - currentNode(position) { - if (position !== lastQueriedPosition) { - if (current && current.end === position && currentArrayIndex < currentArray.length - 1) { - currentArrayIndex++; - current = currentArray[currentArrayIndex]; - } - if (!current || current.pos !== position) { - findHighestListElementThatStartsAtPosition(position); - } - } - lastQueriedPosition = position; - Debug.assert(!current || current.pos === position); - return current; - } - }; - function findHighestListElementThatStartsAtPosition(position) { - currentArray = void 0; - currentArrayIndex = -1 /* Value */; - current = void 0; - forEachChild(sourceFile, visitNode3, visitArray2); - return; - function visitNode3(node) { - if (position >= node.pos && position < node.end) { - forEachChild(node, visitNode3, visitArray2); - return true; - } - return false; - } - function visitArray2(array) { - if (position >= array.pos && position < array.end) { - for (let i = 0; i < array.length; i++) { - const child = array[i]; - if (child) { - if (child.pos === position) { - currentArray = array; - currentArrayIndex = i; - current = child; - return true; - } else { - if (child.pos < position && position < child.end) { - forEachChild(child, visitNode3, visitArray2); - return true; - } - } - } - } - } - return false; - } - } - } - IncrementalParser2.createSyntaxCursor = createSyntaxCursor; - let InvalidPosition; - ((InvalidPosition2) => { - InvalidPosition2[InvalidPosition2["Value"] = -1] = "Value"; - })(InvalidPosition || (InvalidPosition = {})); - })(IncrementalParser || (IncrementalParser = {})); - namedArgRegExCache = /* @__PURE__ */ new Map(); - tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; - singleLinePragmaRegEx = /^\/\/\/?\s*@([^\s:]+)(.*)\s*$/im; - } - }); - - // src/compiler/commandLineParser.ts - function createOptionNameMap(optionDeclarations2) { - const optionsNameMap = /* @__PURE__ */ new Map(); - const shortOptionNames = /* @__PURE__ */ new Map(); - forEach(optionDeclarations2, (option) => { - optionsNameMap.set(option.name.toLowerCase(), option); - if (option.shortName) { - shortOptionNames.set(option.shortName, option.name); - } - }); - return { optionsNameMap, shortOptionNames }; - } - function getOptionsNameMap() { - return optionsNameMapCache || (optionsNameMapCache = createOptionNameMap(optionDeclarations)); - } - function createCompilerDiagnosticForInvalidCustomType(opt) { - return createDiagnosticForInvalidCustomType(opt, createCompilerDiagnostic); - } - function createDiagnosticForInvalidCustomType(opt, createDiagnostic) { - const namesOfType = arrayFrom(opt.type.keys()); - const stringNames = (opt.deprecatedKeys ? namesOfType.filter((k) => !opt.deprecatedKeys.has(k)) : namesOfType).map((key) => `'${key}'`).join(", "); - return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames); - } - function parseCustomTypeOption(opt, value, errors) { - return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors); - } - function parseListTypeOption(opt, value = "", errors) { - value = trimString(value); - if (startsWith(value, "-")) { - return void 0; - } - if (opt.type === "listOrElement" && !stringContains(value, ",")) { - return validateJsonOptionValue(opt, value, errors); - } - if (value === "") { - return []; - } - const values = value.split(","); - switch (opt.element.type) { - case "number": - return mapDefined(values, (v) => validateJsonOptionValue(opt.element, parseInt(v), errors)); - case "string": - return mapDefined(values, (v) => validateJsonOptionValue(opt.element, v || "", errors)); - case "boolean": - case "object": - return Debug.fail(`List of ${opt.element.type} is not yet supported.`); - default: - return mapDefined(values, (v) => parseCustomTypeOption(opt.element, v, errors)); - } - } - function getOptionName(option) { - return option.name; - } - function createUnknownOptionError(unknownOption, diagnostics, unknownOptionErrorText, node, sourceFile) { - var _a; - if ((_a = diagnostics.alternateMode) == null ? void 0 : _a.getOptionsNameMap().optionsNameMap.has(unknownOption.toLowerCase())) { - return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.alternateMode.diagnostic, unknownOption); - } - const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName); - return possibleOption ? createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption); - } - function parseCommandLineWorker(diagnostics, commandLine, readFile) { - const options = {}; - let watchOptions; - const fileNames = []; - const errors = []; - parseStrings(commandLine); - return { - options, - watchOptions, - fileNames, - errors - }; - function parseStrings(args) { - let i = 0; - while (i < args.length) { - const s = args[i]; - i++; - if (s.charCodeAt(0) === 64 /* at */) { - parseResponseFile(s.slice(1)); - } else if (s.charCodeAt(0) === 45 /* minus */) { - const inputOptionName = s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1); - const opt = getOptionDeclarationFromName( - diagnostics.getOptionsNameMap, - inputOptionName, - /*allowShort*/ - true - ); - if (opt) { - i = parseOptionValue(args, i, diagnostics, opt, options, errors); - } else { - const watchOpt = getOptionDeclarationFromName( - watchOptionsDidYouMeanDiagnostics.getOptionsNameMap, - inputOptionName, - /*allowShort*/ - true - ); - if (watchOpt) { - i = parseOptionValue(args, i, watchOptionsDidYouMeanDiagnostics, watchOpt, watchOptions || (watchOptions = {}), errors); - } else { - errors.push(createUnknownOptionError(inputOptionName, diagnostics, s)); - } - } - } else { - fileNames.push(s); - } - } - } - function parseResponseFile(fileName) { - const text = tryReadFile(fileName, readFile || ((fileName2) => sys.readFile(fileName2))); - if (!isString(text)) { - errors.push(text); - return; - } - const args = []; - let pos = 0; - while (true) { - while (pos < text.length && text.charCodeAt(pos) <= 32 /* space */) - pos++; - if (pos >= text.length) - break; - const start = pos; - if (text.charCodeAt(start) === 34 /* doubleQuote */) { - pos++; - while (pos < text.length && text.charCodeAt(pos) !== 34 /* doubleQuote */) - pos++; - if (pos < text.length) { - args.push(text.substring(start + 1, pos)); - pos++; - } else { - errors.push(createCompilerDiagnostic(Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName)); - } - } else { - while (text.charCodeAt(pos) > 32 /* space */) - pos++; - args.push(text.substring(start, pos)); - } - } - parseStrings(args); - } - } - function parseOptionValue(args, i, diagnostics, opt, options, errors) { - if (opt.isTSConfigOnly) { - const optValue = args[i]; - if (optValue === "null") { - options[opt.name] = void 0; - i++; - } else if (opt.type === "boolean") { - if (optValue === "false") { - options[opt.name] = validateJsonOptionValue( - opt, - /*value*/ - false, - errors - ); - i++; - } else { - if (optValue === "true") - i++; - errors.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line, opt.name)); - } - } else { - errors.push(createCompilerDiagnostic(Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line, opt.name)); - if (optValue && !startsWith(optValue, "-")) - i++; - } - } else { - if (!args[i] && opt.type !== "boolean") { - errors.push(createCompilerDiagnostic(diagnostics.optionTypeMismatchDiagnostic, opt.name, getCompilerOptionValueTypeString(opt))); - } - if (args[i] !== "null") { - switch (opt.type) { - case "number": - options[opt.name] = validateJsonOptionValue(opt, parseInt(args[i]), errors); - i++; - break; - case "boolean": - const optValue = args[i]; - options[opt.name] = validateJsonOptionValue(opt, optValue !== "false", errors); - if (optValue === "false" || optValue === "true") { - i++; - } - break; - case "string": - options[opt.name] = validateJsonOptionValue(opt, args[i] || "", errors); - i++; - break; - case "list": - const result = parseListTypeOption(opt, args[i], errors); - options[opt.name] = result || []; - if (result) { - i++; - } - break; - case "listOrElement": - Debug.fail("listOrElement not supported here"); - break; - default: - options[opt.name] = parseCustomTypeOption(opt, args[i], errors); - i++; - break; - } - } else { - options[opt.name] = void 0; - i++; - } - } - return i; - } - function parseCommandLine(commandLine, readFile) { - return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile); - } - function getOptionFromName(optionName, allowShort) { - return getOptionDeclarationFromName(getOptionsNameMap, optionName, allowShort); - } - function getOptionDeclarationFromName(getOptionNameMap, optionName, allowShort = false) { - optionName = optionName.toLowerCase(); - const { optionsNameMap, shortOptionNames } = getOptionNameMap(); - if (allowShort) { - const short = shortOptionNames.get(optionName); - if (short !== void 0) { - optionName = short; - } - } - return optionsNameMap.get(optionName); - } - function getBuildOptionsNameMap() { - return buildOptionsNameMapCache || (buildOptionsNameMapCache = createOptionNameMap(buildOpts)); - } - function parseBuildCommand(args) { - const { options, watchOptions, fileNames: projects, errors } = parseCommandLineWorker( - buildOptionsDidYouMeanDiagnostics, - args - ); - const buildOptions = options; - if (projects.length === 0) { - projects.push("."); - } - if (buildOptions.clean && buildOptions.force) { - errors.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, "clean", "force")); - } - if (buildOptions.clean && buildOptions.verbose) { - errors.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, "clean", "verbose")); - } - if (buildOptions.clean && buildOptions.watch) { - errors.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, "clean", "watch")); - } - if (buildOptions.watch && buildOptions.dry) { - errors.push(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, "watch", "dry")); - } - return { buildOptions, watchOptions, projects, errors }; - } - function getDiagnosticText(_message, ..._args) { - const diagnostic = createCompilerDiagnostic.apply(void 0, arguments); - return diagnostic.messageText; - } - function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) { - const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName)); - if (!isString(configFileText)) { - host.onUnRecoverableConfigFileDiagnostic(configFileText); - return void 0; - } - const result = parseJsonText(configFileName, configFileText); - const cwd = host.getCurrentDirectory(); - result.path = toPath(configFileName, cwd, createGetCanonicalFileName(host.useCaseSensitiveFileNames)); - result.resolvedPath = result.path; - result.originalFileName = result.fileName; - return parseJsonSourceFileConfigFileContent( - result, - host, - getNormalizedAbsolutePath(getDirectoryPath(configFileName), cwd), - optionsToExtend, - getNormalizedAbsolutePath(configFileName, cwd), - /*resolutionStack*/ - void 0, - extraFileExtensions, - extendedConfigCache, - watchOptionsToExtend - ); - } - function readConfigFile(fileName, readFile) { - const textOrDiagnostic = tryReadFile(fileName, readFile); - return isString(textOrDiagnostic) ? parseConfigFileTextToJson(fileName, textOrDiagnostic) : { config: {}, error: textOrDiagnostic }; - } - function parseConfigFileTextToJson(fileName, jsonText) { - const jsonSourceFile = parseJsonText(fileName, jsonText); - return { - config: convertConfigFileToObject( - jsonSourceFile, - jsonSourceFile.parseDiagnostics, - /*jsonConversionNotifier*/ - void 0 - ), - error: jsonSourceFile.parseDiagnostics.length ? jsonSourceFile.parseDiagnostics[0] : void 0 - }; - } - function readJsonConfigFile(fileName, readFile) { - const textOrDiagnostic = tryReadFile(fileName, readFile); - return isString(textOrDiagnostic) ? parseJsonText(fileName, textOrDiagnostic) : { fileName, parseDiagnostics: [textOrDiagnostic] }; - } - function tryReadFile(fileName, readFile) { - let text; - try { - text = readFile(fileName); - } catch (e) { - return createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message); - } - return text === void 0 ? createCompilerDiagnostic(Diagnostics.Cannot_read_file_0, fileName) : text; - } - function commandLineOptionsToMap(options) { - return arrayToMap(options, getOptionName); - } - function getWatchOptionsNameMap() { - return watchOptionsNameMapCache || (watchOptionsNameMapCache = createOptionNameMap(optionsForWatch)); - } - function getCommandLineCompilerOptionsMap() { - return commandLineCompilerOptionsMapCache || (commandLineCompilerOptionsMapCache = commandLineOptionsToMap(optionDeclarations)); - } - function getCommandLineWatchOptionsMap() { - return commandLineWatchOptionsMapCache || (commandLineWatchOptionsMapCache = commandLineOptionsToMap(optionsForWatch)); - } - function getCommandLineTypeAcquisitionMap() { - return commandLineTypeAcquisitionMapCache || (commandLineTypeAcquisitionMapCache = commandLineOptionsToMap(typeAcquisitionDeclarations)); - } - function getTsconfigRootOptionsMap() { - if (_tsconfigRootOptions === void 0) { - _tsconfigRootOptions = { - name: void 0, - // should never be needed since this is root - type: "object", - elementOptions: commandLineOptionsToMap([ - compilerOptionsDeclaration, - watchOptionsDeclaration, - typeAcquisitionDeclaration, - extendsOptionDeclaration, - { - name: "references", - type: "list", - element: { - name: "references", - type: "object" - }, - category: Diagnostics.Projects - }, - { - name: "files", - type: "list", - element: { - name: "files", - type: "string" - }, - category: Diagnostics.File_Management - }, - { - name: "include", - type: "list", - element: { - name: "include", - type: "string" - }, - category: Diagnostics.File_Management, - defaultValueDescription: Diagnostics.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk - }, - { - name: "exclude", - type: "list", - element: { - name: "exclude", - type: "string" - }, - category: Diagnostics.File_Management, - defaultValueDescription: Diagnostics.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified - }, - compileOnSaveCommandLineOption - ]) - }; - } - return _tsconfigRootOptions; - } - function convertConfigFileToObject(sourceFile, errors, jsonConversionNotifier) { - var _a; - const rootExpression = (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression; - if (rootExpression && rootExpression.kind !== 210 /* ObjectLiteralExpression */) { - errors.push(createDiagnosticForNodeInSourceFile( - sourceFile, - rootExpression, - Diagnostics.The_root_value_of_a_0_file_must_be_an_object, - getBaseFileName(sourceFile.fileName) === "jsconfig.json" ? "jsconfig.json" : "tsconfig.json" - )); - if (isArrayLiteralExpression(rootExpression)) { - const firstObject = find(rootExpression.elements, isObjectLiteralExpression); - if (firstObject) { - return convertToJson( - sourceFile, - firstObject, - errors, - /*returnValue*/ - true, - jsonConversionNotifier - ); - } - } - return {}; - } - return convertToJson( - sourceFile, - rootExpression, - errors, - /*returnValue*/ - true, - jsonConversionNotifier - ); - } - function convertToObject(sourceFile, errors) { - var _a; - return convertToJson( - sourceFile, - (_a = sourceFile.statements[0]) == null ? void 0 : _a.expression, - errors, - /*returnValue*/ - true, - /*jsonConversionNotifier*/ - void 0 - ); - } - function convertToJson(sourceFile, rootExpression, errors, returnValue, jsonConversionNotifier) { - if (!rootExpression) { - return returnValue ? {} : void 0; - } - return convertPropertyValueToJson(rootExpression, jsonConversionNotifier == null ? void 0 : jsonConversionNotifier.rootOptions); - function convertObjectLiteralExpressionToJson(node, objectOption) { - var _a; - const result = returnValue ? {} : void 0; - for (const element of node.properties) { - if (element.kind !== 303 /* PropertyAssignment */) { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element, Diagnostics.Property_assignment_expected)); - continue; - } - if (element.questionToken) { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.questionToken, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); - } - if (!isDoubleQuotedString(element.name)) { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, element.name, Diagnostics.String_literal_with_double_quotes_expected)); - } - const textOfKey = isComputedNonLiteralName(element.name) ? void 0 : getTextOfPropertyName(element.name); - const keyText = textOfKey && unescapeLeadingUnderscores(textOfKey); - const option = keyText ? (_a = objectOption == null ? void 0 : objectOption.elementOptions) == null ? void 0 : _a.get(keyText) : void 0; - const value = convertPropertyValueToJson(element.initializer, option); - if (typeof keyText !== "undefined") { - if (returnValue) { - result[keyText] = value; - } - jsonConversionNotifier == null ? void 0 : jsonConversionNotifier.onPropertySet(keyText, value, element, objectOption, option); - } - } - return result; - } - function convertArrayLiteralExpressionToJson(elements, elementOption) { - if (!returnValue) { - elements.forEach((element) => convertPropertyValueToJson(element, elementOption)); - return void 0; - } - return filter(elements.map((element) => convertPropertyValueToJson(element, elementOption)), (v) => v !== void 0); - } - function convertPropertyValueToJson(valueExpression, option) { - switch (valueExpression.kind) { - case 112 /* TrueKeyword */: - return true; - case 97 /* FalseKeyword */: - return false; - case 106 /* NullKeyword */: - return null; - case 11 /* StringLiteral */: - if (!isDoubleQuotedString(valueExpression)) { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.String_literal_with_double_quotes_expected)); - } - return valueExpression.text; - case 9 /* NumericLiteral */: - return Number(valueExpression.text); - case 224 /* PrefixUnaryExpression */: - if (valueExpression.operator !== 41 /* MinusToken */ || valueExpression.operand.kind !== 9 /* NumericLiteral */) { - break; - } - return -Number(valueExpression.operand.text); - case 210 /* ObjectLiteralExpression */: - const objectLiteralExpression = valueExpression; - return convertObjectLiteralExpressionToJson(objectLiteralExpression, option); - case 209 /* ArrayLiteralExpression */: - return convertArrayLiteralExpressionToJson( - valueExpression.elements, - option && option.element - ); - } - if (option) { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.Compiler_option_0_requires_a_value_of_type_1, option.name, getCompilerOptionValueTypeString(option))); - } else { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, valueExpression, Diagnostics.Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal)); - } - return void 0; - } - function isDoubleQuotedString(node) { - return isStringLiteral(node) && isStringDoubleQuoted(node, sourceFile); - } - } - function getCompilerOptionValueTypeString(option) { - return option.type === "listOrElement" ? `${getCompilerOptionValueTypeString(option.element)} or Array` : option.type === "list" ? "Array" : isString(option.type) ? option.type : "string"; - } - function isCompilerOptionsValue(option, value) { - if (option) { - if (isNullOrUndefined(value)) - return !option.disallowNullOrUndefined; - if (option.type === "list") { - return isArray(value); - } - if (option.type === "listOrElement") { - return isArray(value) || isCompilerOptionsValue(option.element, value); - } - const expectedType = isString(option.type) ? option.type : "string"; - return typeof value === expectedType; - } - return false; - } - function convertToTSConfig(configParseResult, configFileName, host) { - var _a, _b, _c; - const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames); - const files = map( - filter( - configParseResult.fileNames, - !((_b = (_a = configParseResult.options.configFile) == null ? void 0 : _a.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs) ? returnTrue : matchesSpecs( - configFileName, - configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs, - configParseResult.options.configFile.configFileSpecs.validatedExcludeSpecs, - host - ) - ), - (f) => getRelativePathFromFile(getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), getNormalizedAbsolutePath(f, host.getCurrentDirectory()), getCanonicalFileName) - ); - const optionMap = serializeCompilerOptions(configParseResult.options, { configFilePath: getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames }); - const watchOptionMap = configParseResult.watchOptions && serializeWatchOptions(configParseResult.watchOptions); - const config = { - compilerOptions: { - ...optionMapToObject(optionMap), - 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: watchOptionMap && optionMapToObject(watchOptionMap), - references: map(configParseResult.projectReferences, (r) => ({ ...r, path: r.originalPath ? r.originalPath : "", originalPath: void 0 })), - files: length(files) ? files : void 0, - ...((_c = configParseResult.options.configFile) == null ? void 0 : _c.configFileSpecs) ? { - include: filterSameAsDefaultInclude(configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs), - exclude: configParseResult.options.configFile.configFileSpecs.validatedExcludeSpecs - } : {}, - compileOnSave: !!configParseResult.compileOnSave ? true : void 0 - }; - return config; - } - function optionMapToObject(optionMap) { - return { - ...arrayFrom(optionMap.entries()).reduce((prev, cur) => ({ ...prev, [cur[0]]: cur[1] }), {}) - }; - } - function filterSameAsDefaultInclude(specs) { - if (!length(specs)) - return void 0; - if (length(specs) !== 1) - return specs; - if (specs[0] === defaultIncludeSpec) - return void 0; - return specs; - } - function matchesSpecs(path, includeSpecs, excludeSpecs, host) { - if (!includeSpecs) - return returnTrue; - const patterns = getFileMatcherPatterns(path, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory()); - const excludeRe = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames); - const includeRe = patterns.includeFilePattern && getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames); - if (includeRe) { - if (excludeRe) { - return (path2) => !(includeRe.test(path2) && !excludeRe.test(path2)); - } - return (path2) => !includeRe.test(path2); - } - if (excludeRe) { - return (path2) => excludeRe.test(path2); - } - return returnTrue; - } - function getCustomTypeMapOfCommandLineOption(optionDefinition) { - switch (optionDefinition.type) { - case "string": - case "number": - case "boolean": - case "object": - return void 0; - case "list": - case "listOrElement": - return getCustomTypeMapOfCommandLineOption(optionDefinition.element); - default: - return optionDefinition.type; - } - } - function getNameOfCompilerOptionValue(value, customTypeMap) { - return forEachEntry(customTypeMap, (mapValue, key) => { - if (mapValue === value) { - return key; - } - }); - } - function serializeCompilerOptions(options, pathOptions) { - return serializeOptionBaseObject(options, getOptionsNameMap(), pathOptions); - } - function serializeWatchOptions(options) { - return serializeOptionBaseObject(options, getWatchOptionsNameMap()); - } - function serializeOptionBaseObject(options, { optionsNameMap }, pathOptions) { - const result = /* @__PURE__ */ new Map(); - const getCanonicalFileName = pathOptions && createGetCanonicalFileName(pathOptions.useCaseSensitiveFileNames); - for (const name in options) { - if (hasProperty(options, name)) { - if (optionsNameMap.has(name) && (optionsNameMap.get(name).category === Diagnostics.Command_line_Options || optionsNameMap.get(name).category === Diagnostics.Output_Formatting)) { - continue; - } - const value = options[name]; - const optionDefinition = optionsNameMap.get(name.toLowerCase()); - if (optionDefinition) { - Debug.assert(optionDefinition.type !== "listOrElement"); - const customTypeMap = getCustomTypeMapOfCommandLineOption(optionDefinition); - if (!customTypeMap) { - if (pathOptions && optionDefinition.isFilePath) { - result.set(name, getRelativePathFromFile(pathOptions.configFilePath, getNormalizedAbsolutePath(value, getDirectoryPath(pathOptions.configFilePath)), getCanonicalFileName)); - } else { - result.set(name, value); - } - } else { - if (optionDefinition.type === "list") { - result.set(name, value.map((element) => getNameOfCompilerOptionValue(element, customTypeMap))); - } else { - result.set(name, getNameOfCompilerOptionValue(value, customTypeMap)); - } - } - } - } - } - return result; - } - function getCompilerOptionsDiffValue(options, newLine) { - const compilerOptionsMap = getSerializedCompilerOption(options); - return getOverwrittenDefaultOptions(); - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); - } - function getOverwrittenDefaultOptions() { - const result = []; - const tab = makePadding(2); - commandOptionsWithoutBuild.forEach((cmd) => { - if (!compilerOptionsMap.has(cmd.name)) { - return; - } - const newValue = compilerOptionsMap.get(cmd.name); - const defaultValue = getDefaultValueForOption(cmd); - if (newValue !== defaultValue) { - result.push(`${tab}${cmd.name}: ${newValue}`); - } else if (hasProperty(defaultInitCompilerOptions, cmd.name)) { - result.push(`${tab}${cmd.name}: ${defaultValue}`); - } - }); - return result.join(newLine) + newLine; - } - } - function getSerializedCompilerOption(options) { - const compilerOptions = extend(options, defaultInitCompilerOptions); - return serializeCompilerOptions(compilerOptions); - } - function generateTSConfig(options, fileNames, newLine) { - const compilerOptionsMap = getSerializedCompilerOption(options); - return writeConfigurations(); - function makePadding(paddingLength) { - return Array(paddingLength + 1).join(" "); - } - function isAllowedOptionForOutput({ category, name, isCommandLineOnly }) { - const categoriesToSkip = [Diagnostics.Command_line_Options, Diagnostics.Editor_Support, Diagnostics.Compiler_Diagnostics, Diagnostics.Backwards_Compatibility, Diagnostics.Watch_and_Build_Modes, Diagnostics.Output_Formatting]; - return !isCommandLineOnly && category !== void 0 && (!categoriesToSkip.includes(category) || compilerOptionsMap.has(name)); - } - function writeConfigurations() { - const categorizedOptions = /* @__PURE__ */ new Map(); - categorizedOptions.set(Diagnostics.Projects, []); - categorizedOptions.set(Diagnostics.Language_and_Environment, []); - categorizedOptions.set(Diagnostics.Modules, []); - categorizedOptions.set(Diagnostics.JavaScript_Support, []); - categorizedOptions.set(Diagnostics.Emit, []); - categorizedOptions.set(Diagnostics.Interop_Constraints, []); - categorizedOptions.set(Diagnostics.Type_Checking, []); - categorizedOptions.set(Diagnostics.Completeness, []); - for (const option of optionDeclarations) { - if (isAllowedOptionForOutput(option)) { - let listForCategory = categorizedOptions.get(option.category); - if (!listForCategory) - categorizedOptions.set(option.category, listForCategory = []); - listForCategory.push(option); - } - } - let marginLength = 0; - let seenKnownKeys = 0; - const entries = []; - categorizedOptions.forEach((options2, category) => { - if (entries.length !== 0) { - entries.push({ value: "" }); - } - entries.push({ value: `/* ${getLocaleSpecificMessage(category)} */` }); - for (const option of options2) { - let optionName; - if (compilerOptionsMap.has(option.name)) { - optionName = `"${option.name}": ${JSON.stringify(compilerOptionsMap.get(option.name))}${(seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ","}`; - } else { - optionName = `// "${option.name}": ${JSON.stringify(getDefaultValueForOption(option))},`; - } - entries.push({ - value: optionName, - description: `/* ${option.description && getLocaleSpecificMessage(option.description) || option.name} */` - }); - marginLength = Math.max(optionName.length, marginLength); - } - }); - const tab = makePadding(2); - const result = []; - result.push(`{`); - result.push(`${tab}"compilerOptions": {`); - result.push(`${tab}${tab}/* ${getLocaleSpecificMessage(Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file)} */`); - result.push(""); - for (const entry of entries) { - const { value, description: description3 = "" } = entry; - result.push(value && `${tab}${tab}${value}${description3 && makePadding(marginLength - value.length + 2) + description3}`); - } - if (fileNames.length) { - result.push(`${tab}},`); - result.push(`${tab}"files": [`); - for (let i = 0; i < fileNames.length; i++) { - result.push(`${tab}${tab}${JSON.stringify(fileNames[i])}${i === fileNames.length - 1 ? "" : ","}`); - } - result.push(`${tab}]`); - } else { - result.push(`${tab}}`); - } - result.push(`}`); - return result.join(newLine) + newLine; - } - } - function convertToOptionsWithAbsolutePaths(options, toAbsolutePath) { - const result = {}; - const optionsNameMap = getOptionsNameMap().optionsNameMap; - for (const name in options) { - if (hasProperty(options, name)) { - result[name] = convertToOptionValueWithAbsolutePaths( - optionsNameMap.get(name.toLowerCase()), - options[name], - toAbsolutePath - ); - } - } - if (result.configFilePath) { - result.configFilePath = toAbsolutePath(result.configFilePath); - } - return result; - } - function convertToOptionValueWithAbsolutePaths(option, value, toAbsolutePath) { - if (option && !isNullOrUndefined(value)) { - if (option.type === "list") { - const values = value; - if (option.element.isFilePath && values.length) { - return values.map(toAbsolutePath); - } - } else if (option.isFilePath) { - return toAbsolutePath(value); - } - Debug.assert(option.type !== "listOrElement"); - } - return value; - } - function parseJsonConfigFileContent(json, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache, existingWatchOptions) { - return parseJsonConfigFileContentWorker( - json, - /*sourceFile*/ - void 0, - host, - basePath, - existingOptions, - existingWatchOptions, - configFileName, - resolutionStack, - extraFileExtensions, - extendedConfigCache - ); - } - function parseJsonSourceFileConfigFileContent(sourceFile, host, basePath, existingOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache, existingWatchOptions) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Parse, "parseJsonSourceFileConfigFileContent", { path: sourceFile.fileName }); - const result = parseJsonConfigFileContentWorker( - /*json*/ - void 0, - sourceFile, - host, - basePath, - existingOptions, - existingWatchOptions, - configFileName, - resolutionStack, - extraFileExtensions, - extendedConfigCache - ); - (_b = tracing) == null ? void 0 : _b.pop(); - return result; - } - function setConfigFileInOptions(options, configFile) { - if (configFile) { - Object.defineProperty(options, "configFile", { enumerable: false, writable: false, value: configFile }); - } - } - function isNullOrUndefined(x) { - return x === void 0 || x === null; - } - function directoryOfCombinedPath(fileName, basePath) { - return getDirectoryPath(getNormalizedAbsolutePath(fileName, basePath)); - } - function parseJsonConfigFileContentWorker(json, sourceFile, host, basePath, existingOptions = {}, existingWatchOptions, configFileName, resolutionStack = [], extraFileExtensions = [], extendedConfigCache) { - Debug.assert(json === void 0 && sourceFile !== void 0 || json !== void 0 && sourceFile === void 0); - const errors = []; - const parsedConfig = parseConfig(json, sourceFile, host, basePath, configFileName, resolutionStack, errors, extendedConfigCache); - const { raw } = parsedConfig; - const options = extend(existingOptions, parsedConfig.options || {}); - const watchOptions = existingWatchOptions && parsedConfig.watchOptions ? extend(existingWatchOptions, parsedConfig.watchOptions) : parsedConfig.watchOptions || existingWatchOptions; - options.configFilePath = configFileName && normalizeSlashes(configFileName); - const configFileSpecs = getConfigFileSpecs(); - if (sourceFile) - sourceFile.configFileSpecs = configFileSpecs; - setConfigFileInOptions(options, sourceFile); - const basePathForFileNames = normalizePath(configFileName ? directoryOfCombinedPath(configFileName, basePath) : basePath); - return { - options, - watchOptions, - fileNames: getFileNames(basePathForFileNames), - projectReferences: getProjectReferences(basePathForFileNames), - typeAcquisition: parsedConfig.typeAcquisition || getDefaultTypeAcquisition(), - raw, - errors, - // Wildcard directories (provided as part of a wildcard path) are stored in a - // file map that marks whether it was a regular wildcard match (with a `*` or `?` token), - // or a recursive directory. This information is used by filesystem watchers to monitor for - // new entries in these paths. - wildcardDirectories: getWildcardDirectories(configFileSpecs, basePathForFileNames, host.useCaseSensitiveFileNames), - compileOnSave: !!raw.compileOnSave - }; - function getConfigFileSpecs() { - const referencesOfRaw = getPropFromRaw("references", (element) => typeof element === "object", "object"); - const filesSpecs = toPropValue(getSpecsFromRaw("files")); - if (filesSpecs) { - const hasZeroOrNoReferences = referencesOfRaw === "no-prop" || isArray(referencesOfRaw) && referencesOfRaw.length === 0; - const hasExtends = hasProperty(raw, "extends"); - if (filesSpecs.length === 0 && hasZeroOrNoReferences && !hasExtends) { - if (sourceFile) { - const fileName = configFileName || "tsconfig.json"; - const diagnosticMessage = Diagnostics.The_files_list_in_config_file_0_is_empty; - const nodeValue = forEachTsConfigPropArray(sourceFile, "files", (property) => property.initializer); - const error2 = createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, nodeValue, diagnosticMessage, fileName); - errors.push(error2); - } else { - createCompilerDiagnosticOnlyIfJson(Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json"); - } - } - } - let includeSpecs = toPropValue(getSpecsFromRaw("include")); - const excludeOfRaw = getSpecsFromRaw("exclude"); - let isDefaultIncludeSpec = false; - let excludeSpecs = toPropValue(excludeOfRaw); - if (excludeOfRaw === "no-prop" && raw.compilerOptions) { - const outDir = raw.compilerOptions.outDir; - const declarationDir = raw.compilerOptions.declarationDir; - if (outDir || declarationDir) { - excludeSpecs = [outDir, declarationDir].filter((d) => !!d); - } - } - if (filesSpecs === void 0 && includeSpecs === void 0) { - includeSpecs = [defaultIncludeSpec]; - isDefaultIncludeSpec = true; - } - let validatedIncludeSpecs, validatedExcludeSpecs; - if (includeSpecs) { - validatedIncludeSpecs = validateSpecs( - includeSpecs, - errors, - /*disallowTrailingRecursion*/ - true, - sourceFile, - "include" - ); - } - if (excludeSpecs) { - validatedExcludeSpecs = validateSpecs( - excludeSpecs, - errors, - /*disallowTrailingRecursion*/ - false, - sourceFile, - "exclude" - ); - } - return { - filesSpecs, - includeSpecs, - excludeSpecs, - validatedFilesSpec: filter(filesSpecs, isString), - validatedIncludeSpecs, - validatedExcludeSpecs, - pathPatterns: void 0, - // Initialized on first use - isDefaultIncludeSpec - }; - } - function getFileNames(basePath2) { - const fileNames = getFileNamesFromConfigSpecs(configFileSpecs, basePath2, options, host, extraFileExtensions); - if (shouldReportNoInputFiles(fileNames, canJsonReportNoInputFiles(raw), resolutionStack)) { - errors.push(getErrorForNoInputFiles(configFileSpecs, configFileName)); - } - return fileNames; - } - function getProjectReferences(basePath2) { - let projectReferences; - const referencesOfRaw = getPropFromRaw("references", (element) => typeof element === "object", "object"); - if (isArray(referencesOfRaw)) { - for (const ref of referencesOfRaw) { - if (typeof ref.path !== "string") { - createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "reference.path", "string"); - } else { - (projectReferences || (projectReferences = [])).push({ - path: getNormalizedAbsolutePath(ref.path, basePath2), - originalPath: ref.path, - prepend: ref.prepend, - circular: ref.circular - }); - } - } - } - return projectReferences; - } - function toPropValue(specResult) { - return isArray(specResult) ? specResult : void 0; - } - function getSpecsFromRaw(prop) { - return getPropFromRaw(prop, isString, "string"); - } - function getPropFromRaw(prop, validateElement, elementTypeName) { - if (hasProperty(raw, prop) && !isNullOrUndefined(raw[prop])) { - if (isArray(raw[prop])) { - const result = raw[prop]; - if (!sourceFile && !every(result, validateElement)) { - errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, prop, elementTypeName)); - } - return result; - } else { - createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, prop, "Array"); - return "not-array"; - } - } - return "no-prop"; - } - function createCompilerDiagnosticOnlyIfJson(message, ...args) { - if (!sourceFile) { - errors.push(createCompilerDiagnostic(message, ...args)); - } - } - } - function isErrorNoInputFiles(error2) { - return error2.code === Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code; - } - function getErrorForNoInputFiles({ includeSpecs, excludeSpecs }, configFileName) { - return createCompilerDiagnostic( - Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, - configFileName || "tsconfig.json", - JSON.stringify(includeSpecs || []), - JSON.stringify(excludeSpecs || []) - ); - } - function shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles, resolutionStack) { - return fileNames.length === 0 && canJsonReportNoInutFiles && (!resolutionStack || resolutionStack.length === 0); - } - function canJsonReportNoInputFiles(raw) { - return !hasProperty(raw, "files") && !hasProperty(raw, "references"); - } - function updateErrorForNoInputFiles(fileNames, configFileName, configFileSpecs, configParseDiagnostics, canJsonReportNoInutFiles) { - const existingErrors = configParseDiagnostics.length; - if (shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles)) { - configParseDiagnostics.push(getErrorForNoInputFiles(configFileSpecs, configFileName)); - } else { - filterMutate(configParseDiagnostics, (error2) => !isErrorNoInputFiles(error2)); - } - return existingErrors !== configParseDiagnostics.length; - } - function isSuccessfulParsedTsconfig(value) { - return !!value.options; - } - function parseConfig(json, sourceFile, host, basePath, configFileName, resolutionStack, errors, extendedConfigCache) { - var _a; - basePath = normalizeSlashes(basePath); - const resolvedPath = getNormalizedAbsolutePath(configFileName || "", basePath); - if (resolutionStack.indexOf(resolvedPath) >= 0) { - errors.push(createCompilerDiagnostic(Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, [...resolutionStack, resolvedPath].join(" -> "))); - return { raw: json || convertToObject(sourceFile, errors) }; - } - const ownConfig = json ? parseOwnConfigOfJson(json, host, basePath, configFileName, errors) : parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileName, errors); - if ((_a = ownConfig.options) == null ? void 0 : _a.paths) { - ownConfig.options.pathsBasePath = basePath; - } - if (ownConfig.extendedConfigPath) { - resolutionStack = resolutionStack.concat([resolvedPath]); - const result = { options: {} }; - if (isString(ownConfig.extendedConfigPath)) { - applyExtendedConfig(result, ownConfig.extendedConfigPath); - } else { - ownConfig.extendedConfigPath.forEach((extendedConfigPath) => applyExtendedConfig(result, extendedConfigPath)); - } - if (!ownConfig.raw.include && result.include) - ownConfig.raw.include = result.include; - if (!ownConfig.raw.exclude && result.exclude) - ownConfig.raw.exclude = result.exclude; - if (!ownConfig.raw.files && result.files) - ownConfig.raw.files = result.files; - if (ownConfig.raw.compileOnSave === void 0 && result.compileOnSave) - ownConfig.raw.compileOnSave = result.compileOnSave; - if (sourceFile && result.extendedSourceFiles) - sourceFile.extendedSourceFiles = arrayFrom(result.extendedSourceFiles.keys()); - ownConfig.options = assign(result.options, ownConfig.options); - ownConfig.watchOptions = ownConfig.watchOptions && result.watchOptions ? assign(result.watchOptions, ownConfig.watchOptions) : ownConfig.watchOptions || result.watchOptions; - } - return ownConfig; - function applyExtendedConfig(result, extendedConfigPath) { - const extendedConfig = getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result); - if (extendedConfig && isSuccessfulParsedTsconfig(extendedConfig)) { - const extendsRaw = extendedConfig.raw; - let relativeDifference; - const setPropertyInResultIfNotUndefined = (propertyName) => { - if (extendsRaw[propertyName]) { - result[propertyName] = map(extendsRaw[propertyName], (path) => isRootedDiskPath(path) ? path : combinePaths( - relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))), - path - )); - } - }; - setPropertyInResultIfNotUndefined("include"); - setPropertyInResultIfNotUndefined("exclude"); - setPropertyInResultIfNotUndefined("files"); - if (extendsRaw.compileOnSave !== void 0) { - result.compileOnSave = extendsRaw.compileOnSave; - } - assign(result.options, extendedConfig.options); - result.watchOptions = result.watchOptions && extendedConfig.watchOptions ? assign({}, result.watchOptions, extendedConfig.watchOptions) : result.watchOptions || extendedConfig.watchOptions; - } - } - } - function parseOwnConfigOfJson(json, host, basePath, configFileName, errors) { - if (hasProperty(json, "excludes")) { - errors.push(createCompilerDiagnostic(Diagnostics.Unknown_option_excludes_Did_you_mean_exclude)); - } - const options = convertCompilerOptionsFromJsonWorker(json.compilerOptions, basePath, errors, configFileName); - const typeAcquisition = convertTypeAcquisitionFromJsonWorker(json.typeAcquisition, basePath, errors, configFileName); - const watchOptions = convertWatchOptionsFromJsonWorker(json.watchOptions, basePath, errors); - json.compileOnSave = convertCompileOnSaveOptionFromJson(json, basePath, errors); - const extendedConfigPath = json.extends || json.extends === "" ? getExtendsConfigPathOrArray(json.extends, host, basePath, configFileName, errors) : void 0; - return { raw: json, options, watchOptions, typeAcquisition, extendedConfigPath }; - } - function getExtendsConfigPathOrArray(value, host, basePath, configFileName, errors, propertyAssignment, valueExpression, sourceFile) { - let extendedConfigPath; - const newBase = configFileName ? directoryOfCombinedPath(configFileName, basePath) : basePath; - if (isString(value)) { - extendedConfigPath = getExtendsConfigPath( - value, - host, - newBase, - errors, - valueExpression, - sourceFile - ); - } else if (isArray(value)) { - extendedConfigPath = []; - for (let index = 0; index < value.length; index++) { - const fileName = value[index]; - if (isString(fileName)) { - extendedConfigPath = append(extendedConfigPath, getExtendsConfigPath( - fileName, - host, - newBase, - errors, - valueExpression == null ? void 0 : valueExpression.elements[index], - sourceFile - )); - } else { - convertJsonOption(extendsOptionDeclaration.element, value, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile); - } - } - } else { - convertJsonOption(extendsOptionDeclaration, value, basePath, errors, propertyAssignment, valueExpression, sourceFile); - } - return extendedConfigPath; - } - function parseOwnConfigOfJsonSourceFile(sourceFile, host, basePath, configFileName, errors) { - const options = getDefaultCompilerOptions(configFileName); - let typeAcquisition; - let watchOptions; - let extendedConfigPath; - let rootCompilerOptions; - const rootOptions = getTsconfigRootOptionsMap(); - const json = convertConfigFileToObject( - sourceFile, - errors, - { rootOptions, onPropertySet } - ); - if (!typeAcquisition) { - typeAcquisition = getDefaultTypeAcquisition(configFileName); - } - if (rootCompilerOptions && json && json.compilerOptions === void 0) { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, rootCompilerOptions[0], Diagnostics._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file, getTextOfPropertyName(rootCompilerOptions[0]))); - } - return { raw: json, options, watchOptions, typeAcquisition, extendedConfigPath }; - function onPropertySet(keyText, value, propertyAssignment, parentOption, option) { - if (option && option !== extendsOptionDeclaration) - value = convertJsonOption(option, value, basePath, errors, propertyAssignment, propertyAssignment.initializer, sourceFile); - if (parentOption == null ? void 0 : parentOption.name) { - if (option) { - let currentOption; - if (parentOption === compilerOptionsDeclaration) - currentOption = options; - else if (parentOption === watchOptionsDeclaration) - currentOption = watchOptions ?? (watchOptions = {}); - else if (parentOption === typeAcquisitionDeclaration) - currentOption = typeAcquisition ?? (typeAcquisition = getDefaultTypeAcquisition(configFileName)); - else - Debug.fail("Unknown option"); - currentOption[option.name] = value; - } else if (keyText && (parentOption == null ? void 0 : parentOption.extraKeyDiagnostics)) { - if (parentOption.elementOptions) { - errors.push(createUnknownOptionError( - keyText, - parentOption.extraKeyDiagnostics, - /*unknownOptionErrorText*/ - void 0, - propertyAssignment.name, - sourceFile - )); - } else { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, propertyAssignment.name, parentOption.extraKeyDiagnostics.unknownOptionDiagnostic, keyText)); - } - } - } else if (parentOption === rootOptions) { - if (option === extendsOptionDeclaration) { - extendedConfigPath = getExtendsConfigPathOrArray(value, host, basePath, configFileName, errors, propertyAssignment, propertyAssignment.initializer, sourceFile); - } else if (!option) { - if (keyText === "excludes") { - errors.push(createDiagnosticForNodeInSourceFile(sourceFile, propertyAssignment.name, Diagnostics.Unknown_option_excludes_Did_you_mean_exclude)); - } - if (find(commandOptionsWithoutBuild, (opt) => opt.name === keyText)) { - rootCompilerOptions = append(rootCompilerOptions, propertyAssignment.name); - } - } - } - } - } - function getExtendsConfigPath(extendedConfig, host, basePath, errors, valueExpression, sourceFile) { - extendedConfig = normalizeSlashes(extendedConfig); - if (isRootedDiskPath(extendedConfig) || startsWith(extendedConfig, "./") || startsWith(extendedConfig, "../")) { - let extendedConfigPath = getNormalizedAbsolutePath(extendedConfig, basePath); - if (!host.fileExists(extendedConfigPath) && !endsWith(extendedConfigPath, ".json" /* Json */)) { - extendedConfigPath = `${extendedConfigPath}.json`; - if (!host.fileExists(extendedConfigPath)) { - errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.File_0_not_found, extendedConfig)); - return void 0; - } - } - return extendedConfigPath; - } - const resolved = nodeNextJsonConfigResolver(extendedConfig, combinePaths(basePath, "tsconfig.json"), host); - if (resolved.resolvedModule) { - return resolved.resolvedModule.resolvedFileName; - } - if (extendedConfig === "") { - errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.Compiler_option_0_cannot_be_given_an_empty_string, "extends")); - } else { - errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.File_0_not_found, extendedConfig)); - } - return void 0; - } - function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) { - const path = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath); - let value; - let extendedResult; - let extendedConfig; - if (extendedConfigCache && (value = extendedConfigCache.get(path))) { - ({ extendedResult, extendedConfig } = value); - } else { - extendedResult = readJsonConfigFile(extendedConfigPath, (path2) => host.readFile(path2)); - if (!extendedResult.parseDiagnostics.length) { - extendedConfig = parseConfig( - /*json*/ - void 0, - extendedResult, - host, - getDirectoryPath(extendedConfigPath), - getBaseFileName(extendedConfigPath), - resolutionStack, - errors, - extendedConfigCache - ); - } - if (extendedConfigCache) { - extendedConfigCache.set(path, { extendedResult, extendedConfig }); - } - } - if (sourceFile) { - (result.extendedSourceFiles ?? (result.extendedSourceFiles = /* @__PURE__ */ new Set())).add(extendedResult.fileName); - if (extendedResult.extendedSourceFiles) { - for (const extenedSourceFile of extendedResult.extendedSourceFiles) { - result.extendedSourceFiles.add(extenedSourceFile); - } - } - } - if (extendedResult.parseDiagnostics.length) { - errors.push(...extendedResult.parseDiagnostics); - return void 0; - } - return extendedConfig; - } - function convertCompileOnSaveOptionFromJson(jsonOption, basePath, errors) { - if (!hasProperty(jsonOption, compileOnSaveCommandLineOption.name)) { - return false; - } - const result = convertJsonOption(compileOnSaveCommandLineOption, jsonOption.compileOnSave, basePath, errors); - return typeof result === "boolean" && result; - } - function convertCompilerOptionsFromJson(jsonOptions, basePath, configFileName) { - const errors = []; - const options = convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName); - return { options, errors }; - } - function convertTypeAcquisitionFromJson(jsonOptions, basePath, configFileName) { - const errors = []; - const options = convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName); - return { options, errors }; - } - function getDefaultCompilerOptions(configFileName) { - const options = configFileName && getBaseFileName(configFileName) === "jsconfig.json" ? { allowJs: true, maxNodeModuleJsDepth: 2, allowSyntheticDefaultImports: true, skipLibCheck: true, noEmit: true } : {}; - return options; - } - function convertCompilerOptionsFromJsonWorker(jsonOptions, basePath, errors, configFileName) { - const options = getDefaultCompilerOptions(configFileName); - convertOptionsFromJson(getCommandLineCompilerOptionsMap(), jsonOptions, basePath, options, compilerOptionsDidYouMeanDiagnostics, errors); - if (configFileName) { - options.configFilePath = normalizeSlashes(configFileName); - } - return options; - } - function getDefaultTypeAcquisition(configFileName) { - return { enable: !!configFileName && getBaseFileName(configFileName) === "jsconfig.json", include: [], exclude: [] }; - } - function convertTypeAcquisitionFromJsonWorker(jsonOptions, basePath, errors, configFileName) { - const options = getDefaultTypeAcquisition(configFileName); - convertOptionsFromJson(getCommandLineTypeAcquisitionMap(), jsonOptions, basePath, options, typeAcquisitionDidYouMeanDiagnostics, errors); - return options; - } - function convertWatchOptionsFromJsonWorker(jsonOptions, basePath, errors) { - return convertOptionsFromJson( - getCommandLineWatchOptionsMap(), - jsonOptions, - basePath, - /*defaultOptions*/ - void 0, - watchOptionsDidYouMeanDiagnostics, - errors - ); - } - function convertOptionsFromJson(optionsNameMap, jsonOptions, basePath, defaultOptions, diagnostics, errors) { - if (!jsonOptions) { - return; - } - for (const id in jsonOptions) { - const opt = optionsNameMap.get(id); - if (opt) { - (defaultOptions || (defaultOptions = {}))[opt.name] = convertJsonOption(opt, jsonOptions[id], basePath, errors); - } else { - errors.push(createUnknownOptionError(id, diagnostics)); - } - } - return defaultOptions; - } - function createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, message, ...args) { - return sourceFile && node ? createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args) : createCompilerDiagnostic(message, ...args); - } - function convertJsonOption(opt, value, basePath, errors, propertyAssignment, valueExpression, sourceFile) { - if (opt.isCommandLineOnly) { - errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, propertyAssignment == null ? void 0 : propertyAssignment.name, Diagnostics.Option_0_can_only_be_specified_on_command_line, opt.name)); - return void 0; - } - if (isCompilerOptionsValue(opt, value)) { - const optType = opt.type; - if (optType === "list" && isArray(value)) { - return convertJsonOptionOfListType(opt, value, basePath, errors, propertyAssignment, valueExpression, sourceFile); - } else if (optType === "listOrElement") { - return isArray(value) ? convertJsonOptionOfListType(opt, value, basePath, errors, propertyAssignment, valueExpression, sourceFile) : convertJsonOption(opt.element, value, basePath, errors, propertyAssignment, valueExpression, sourceFile); - } else if (!isString(opt.type)) { - return convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sourceFile); - } - const validatedValue = validateJsonOptionValue(opt, value, errors, valueExpression, sourceFile); - return isNullOrUndefined(validatedValue) ? validatedValue : normalizeNonListOptionValue(opt, basePath, validatedValue); - } else { - errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, Diagnostics.Compiler_option_0_requires_a_value_of_type_1, opt.name, getCompilerOptionValueTypeString(opt))); - } - } - function normalizeNonListOptionValue(option, basePath, value) { - if (option.isFilePath) { - value = getNormalizedAbsolutePath(value, basePath); - if (value === "") { - value = "."; - } - } - return value; - } - function validateJsonOptionValue(opt, value, errors, valueExpression, sourceFile) { - var _a; - if (isNullOrUndefined(value)) - return void 0; - const d = (_a = opt.extraValidation) == null ? void 0 : _a.call(opt, value); - if (!d) - return value; - errors.push(createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, ...d)); - return void 0; - } - function convertJsonOptionOfCustomType(opt, value, errors, valueExpression, sourceFile) { - if (isNullOrUndefined(value)) - return void 0; - const key = value.toLowerCase(); - const val = opt.type.get(key); - if (val !== void 0) { - return validateJsonOptionValue(opt, val, errors, valueExpression, sourceFile); - } else { - errors.push(createDiagnosticForInvalidCustomType(opt, (message, ...args) => createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, valueExpression, message, ...args))); - } - } - function convertJsonOptionOfListType(option, values, basePath, errors, propertyAssignment, valueExpression, sourceFile) { - return filter(map(values, (v, index) => convertJsonOption(option.element, v, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile)), (v) => option.listPreserveFalsyValues ? true : !!v); - } - function getFileNamesFromConfigSpecs(configFileSpecs, basePath, options, host, extraFileExtensions = emptyArray) { - basePath = normalizePath(basePath); - const keyMapper = createGetCanonicalFileName(host.useCaseSensitiveFileNames); - const literalFileMap = /* @__PURE__ */ new Map(); - const wildcardFileMap = /* @__PURE__ */ new Map(); - const wildCardJsonFileMap = /* @__PURE__ */ new Map(); - const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = configFileSpecs; - const supportedExtensions = getSupportedExtensions(options, extraFileExtensions); - const supportedExtensionsWithJsonIfResolveJsonModule = getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions); - if (validatedFilesSpec) { - for (const fileName of validatedFilesSpec) { - const file = getNormalizedAbsolutePath(fileName, basePath); - literalFileMap.set(keyMapper(file), file); - } - } - let jsonOnlyIncludeRegexes; - if (validatedIncludeSpecs && validatedIncludeSpecs.length > 0) { - for (const file of host.readDirectory( - basePath, - flatten(supportedExtensionsWithJsonIfResolveJsonModule), - validatedExcludeSpecs, - validatedIncludeSpecs, - /*depth*/ - void 0 - )) { - if (fileExtensionIs(file, ".json" /* Json */)) { - if (!jsonOnlyIncludeRegexes) { - const includes = validatedIncludeSpecs.filter((s) => endsWith(s, ".json" /* Json */)); - const includeFilePatterns = map(getRegularExpressionsForWildcards(includes, basePath, "files"), (pattern) => `^${pattern}$`); - jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, host.useCaseSensitiveFileNames)) : emptyArray; - } - const includeIndex = findIndex(jsonOnlyIncludeRegexes, (re) => re.test(file)); - if (includeIndex !== -1) { - const key2 = keyMapper(file); - if (!literalFileMap.has(key2) && !wildCardJsonFileMap.has(key2)) { - wildCardJsonFileMap.set(key2, file); - } - } - continue; - } - if (hasFileWithHigherPriorityExtension(file, literalFileMap, wildcardFileMap, supportedExtensions, keyMapper)) { - continue; - } - removeWildcardFilesWithLowerPriorityExtension(file, wildcardFileMap, supportedExtensions, keyMapper); - const key = keyMapper(file); - if (!literalFileMap.has(key) && !wildcardFileMap.has(key)) { - wildcardFileMap.set(key, file); - } - } - } - const literalFiles = arrayFrom(literalFileMap.values()); - const wildcardFiles = arrayFrom(wildcardFileMap.values()); - return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values())); - } - function isExcludedFile(pathToCheck, spec, basePath, useCaseSensitiveFileNames2, currentDirectory) { - const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec; - if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs)) - return false; - basePath = normalizePath(basePath); - const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2); - if (validatedFilesSpec) { - for (const fileName of validatedFilesSpec) { - if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck) - return false; - } - } - return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath); - } - function invalidDotDotAfterRecursiveWildcard(s) { - const wildcardIndex = startsWith(s, "**/") ? 0 : s.indexOf("/**/"); - if (wildcardIndex === -1) { - return false; - } - const lastDotIndex = endsWith(s, "/..") ? s.length : s.lastIndexOf("/../"); - return lastDotIndex > wildcardIndex; - } - function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) { - return matchesExcludeWorker( - pathToCheck, - filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)), - useCaseSensitiveFileNames2, - currentDirectory - ); - } - function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) { - const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude"); - const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2); - if (!excludeRegex) - return false; - if (excludeRegex.test(pathToCheck)) - return true; - return !hasExtension(pathToCheck) && excludeRegex.test(ensureTrailingDirectorySeparator(pathToCheck)); - } - function validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile, specKey) { - return specs.filter((spec) => { - if (!isString(spec)) - return false; - const diag2 = specToDiagnostic(spec, disallowTrailingRecursion); - if (diag2 !== void 0) { - errors.push(createDiagnostic(...diag2)); - } - return diag2 === void 0; - }); - function createDiagnostic(message, spec) { - const element = getTsConfigPropArrayElementValue(jsonSourceFile, specKey, spec); - return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(jsonSourceFile, element, message, spec); - } - } - function specToDiagnostic(spec, disallowTrailingRecursion) { - Debug.assert(typeof spec === "string"); - if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) { - return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec]; - } else if (invalidDotDotAfterRecursiveWildcard(spec)) { - return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec]; - } - } - function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, path, useCaseSensitiveFileNames2) { - const rawExcludeRegex = getRegularExpressionForWildcard(exclude, path, "exclude"); - const excludeRegex = rawExcludeRegex && new RegExp(rawExcludeRegex, useCaseSensitiveFileNames2 ? "" : "i"); - const wildcardDirectories = {}; - if (include !== void 0) { - const recursiveKeys = []; - for (const file of include) { - const spec = normalizePath(combinePaths(path, file)); - if (excludeRegex && excludeRegex.test(spec)) { - continue; - } - const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2); - if (match) { - const { key, flags } = match; - const existingFlags = wildcardDirectories[key]; - if (existingFlags === void 0 || existingFlags < flags) { - wildcardDirectories[key] = flags; - if (flags === 1 /* Recursive */) { - recursiveKeys.push(key); - } - } - } - } - for (const key in wildcardDirectories) { - if (hasProperty(wildcardDirectories, key)) { - for (const recursiveKey of recursiveKeys) { - if (key !== recursiveKey && containsPath(recursiveKey, key, path, !useCaseSensitiveFileNames2)) { - delete wildcardDirectories[key]; - } - } - } - } - } - return wildcardDirectories; - } - function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) { - const match = wildcardDirectoryPattern.exec(spec); - if (match) { - const questionWildcardIndex = spec.indexOf("?"); - const starWildcardIndex = spec.indexOf("*"); - const lastDirectorySeperatorIndex = spec.lastIndexOf(directorySeparator); - return { - key: useCaseSensitiveFileNames2 ? match[0] : toFileNameLowerCase(match[0]), - flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 /* Recursive */ : 0 /* None */ - }; - } - if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) { - return { - key: removeTrailingDirectorySeparator(useCaseSensitiveFileNames2 ? spec : toFileNameLowerCase(spec)), - flags: 1 /* Recursive */ - }; - } - return void 0; - } - function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) { - const extensionGroup = forEach(extensions, (group2) => fileExtensionIsOneOf(file, group2) ? group2 : void 0); - if (!extensionGroup) { - return false; - } - for (const ext of extensionGroup) { - if (fileExtensionIs(file, ext)) { - return false; - } - const higherPriorityPath = keyMapper(changeExtension(file, ext)); - if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) { - if (ext === ".d.ts" /* Dts */ && (fileExtensionIs(file, ".js" /* Js */) || fileExtensionIs(file, ".jsx" /* Jsx */))) { - continue; - } - return true; - } - } - return false; - } - function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) { - const extensionGroup = forEach(extensions, (group2) => fileExtensionIsOneOf(file, group2) ? group2 : void 0); - if (!extensionGroup) { - return; - } - for (let i = extensionGroup.length - 1; i >= 0; i--) { - const ext = extensionGroup[i]; - if (fileExtensionIs(file, ext)) { - return; - } - const lowerPriorityPath = keyMapper(changeExtension(file, ext)); - wildcardFiles.delete(lowerPriorityPath); - } - } - function convertCompilerOptionsForTelemetry(opts) { - const out = {}; - for (const key in opts) { - if (hasProperty(opts, key)) { - const type = getOptionFromName(key); - if (type !== void 0) { - out[key] = getOptionValueWithEmptyStrings(opts[key], type); - } - } - } - return out; - } - function getOptionValueWithEmptyStrings(value, option) { - if (value === void 0) - return value; - switch (option.type) { - case "object": - return ""; - case "string": - return ""; - case "number": - return typeof value === "number" ? value : ""; - case "boolean": - return typeof value === "boolean" ? value : ""; - case "listOrElement": - if (!isArray(value)) - return getOptionValueWithEmptyStrings(value, option.element); - case "list": - const elementType = option.element; - return isArray(value) ? mapDefined(value, (v) => getOptionValueWithEmptyStrings(v, elementType)) : ""; - default: - return forEachEntry(option.type, (optionEnumValue, optionStringValue) => { - if (optionEnumValue === value) { - return optionStringValue; - } - }); - } - } - function getDefaultValueForOption(option) { - switch (option.type) { - case "number": - return 1; - case "boolean": - return true; - case "string": - const defaultValue = option.defaultValueDescription; - return option.isFilePath ? `./${defaultValue && typeof defaultValue === "string" ? defaultValue : ""}` : ""; - case "list": - return []; - case "listOrElement": - return getDefaultValueForOption(option.element); - case "object": - return {}; - default: - const value = firstOrUndefinedIterator(option.type.keys()); - if (value !== void 0) - return value; - return Debug.fail("Expected 'option.type' to have entries."); - } - } - var compileOnSaveCommandLineOption, jsxOptionMap, inverseJsxOptionMap, libEntries, libs, libMap, optionsForWatch, commonOptionsWithBuild, targetOptionDeclaration, moduleOptionDeclaration, commandOptionsWithoutBuild, optionDeclarations, semanticDiagnosticsOptionDeclarations, affectsEmitOptionDeclarations, affectsDeclarationPathOptionDeclarations, moduleResolutionOptionDeclarations, sourceFileAffectingCompilerOptions, optionsAffectingProgramStructure, transpileOptionValueCompilerOptions, optionsForBuild, buildOpts, typeAcquisitionDeclarations, optionsNameMapCache, compilerOptionsAlternateMode, defaultInitCompilerOptions, compilerOptionsDidYouMeanDiagnostics, buildOptionsNameMapCache, buildOptionsAlternateMode, buildOptionsDidYouMeanDiagnostics, typeAcquisitionDidYouMeanDiagnostics, watchOptionsNameMapCache, watchOptionsDidYouMeanDiagnostics, commandLineCompilerOptionsMapCache, commandLineWatchOptionsMapCache, commandLineTypeAcquisitionMapCache, extendsOptionDeclaration, compilerOptionsDeclaration, watchOptionsDeclaration, typeAcquisitionDeclaration, _tsconfigRootOptions, defaultIncludeSpec, invalidTrailingRecursionPattern, wildcardDirectoryPattern; - var init_commandLineParser = __esm({ - "src/compiler/commandLineParser.ts"() { - "use strict"; - init_ts2(); - compileOnSaveCommandLineOption = { - name: "compileOnSave", - type: "boolean", - defaultValueDescription: false - }; - jsxOptionMap = new Map(Object.entries({ - "preserve": 1 /* Preserve */, - "react-native": 3 /* ReactNative */, - "react": 2 /* React */, - "react-jsx": 4 /* ReactJSX */, - "react-jsxdev": 5 /* ReactJSXDev */ - })); - inverseJsxOptionMap = new Map(mapIterator(jsxOptionMap.entries(), ([key, value]) => ["" + value, key])); - libEntries = [ - // JavaScript only - ["es5", "lib.es5.d.ts"], - ["es6", "lib.es2015.d.ts"], - ["es2015", "lib.es2015.d.ts"], - ["es7", "lib.es2016.d.ts"], - ["es2016", "lib.es2016.d.ts"], - ["es2017", "lib.es2017.d.ts"], - ["es2018", "lib.es2018.d.ts"], - ["es2019", "lib.es2019.d.ts"], - ["es2020", "lib.es2020.d.ts"], - ["es2021", "lib.es2021.d.ts"], - ["es2022", "lib.es2022.d.ts"], - ["es2023", "lib.es2023.d.ts"], - ["esnext", "lib.esnext.d.ts"], - // Host only - ["dom", "lib.dom.d.ts"], - ["dom.iterable", "lib.dom.iterable.d.ts"], - ["webworker", "lib.webworker.d.ts"], - ["webworker.importscripts", "lib.webworker.importscripts.d.ts"], - ["webworker.iterable", "lib.webworker.iterable.d.ts"], - ["scripthost", "lib.scripthost.d.ts"], - // ES2015 Or ESNext By-feature options - ["es2015.core", "lib.es2015.core.d.ts"], - ["es2015.collection", "lib.es2015.collection.d.ts"], - ["es2015.generator", "lib.es2015.generator.d.ts"], - ["es2015.iterable", "lib.es2015.iterable.d.ts"], - ["es2015.promise", "lib.es2015.promise.d.ts"], - ["es2015.proxy", "lib.es2015.proxy.d.ts"], - ["es2015.reflect", "lib.es2015.reflect.d.ts"], - ["es2015.symbol", "lib.es2015.symbol.d.ts"], - ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], - ["es2016.array.include", "lib.es2016.array.include.d.ts"], - ["es2017.date", "lib.es2017.date.d.ts"], - ["es2017.object", "lib.es2017.object.d.ts"], - ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], - ["es2017.string", "lib.es2017.string.d.ts"], - ["es2017.intl", "lib.es2017.intl.d.ts"], - ["es2017.typedarrays", "lib.es2017.typedarrays.d.ts"], - ["es2018.asyncgenerator", "lib.es2018.asyncgenerator.d.ts"], - ["es2018.asynciterable", "lib.es2018.asynciterable.d.ts"], - ["es2018.intl", "lib.es2018.intl.d.ts"], - ["es2018.promise", "lib.es2018.promise.d.ts"], - ["es2018.regexp", "lib.es2018.regexp.d.ts"], - ["es2019.array", "lib.es2019.array.d.ts"], - ["es2019.object", "lib.es2019.object.d.ts"], - ["es2019.string", "lib.es2019.string.d.ts"], - ["es2019.symbol", "lib.es2019.symbol.d.ts"], - ["es2019.intl", "lib.es2019.intl.d.ts"], - ["es2020.bigint", "lib.es2020.bigint.d.ts"], - ["es2020.date", "lib.es2020.date.d.ts"], - ["es2020.promise", "lib.es2020.promise.d.ts"], - ["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"], - ["es2020.string", "lib.es2020.string.d.ts"], - ["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"], - ["es2020.intl", "lib.es2020.intl.d.ts"], - ["es2020.number", "lib.es2020.number.d.ts"], - ["es2021.promise", "lib.es2021.promise.d.ts"], - ["es2021.string", "lib.es2021.string.d.ts"], - ["es2021.weakref", "lib.es2021.weakref.d.ts"], - ["es2021.intl", "lib.es2021.intl.d.ts"], - ["es2022.array", "lib.es2022.array.d.ts"], - ["es2022.error", "lib.es2022.error.d.ts"], - ["es2022.intl", "lib.es2022.intl.d.ts"], - ["es2022.object", "lib.es2022.object.d.ts"], - ["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"], - ["es2022.string", "lib.es2022.string.d.ts"], - ["es2022.regexp", "lib.es2022.regexp.d.ts"], - ["es2023.array", "lib.es2023.array.d.ts"], - ["es2023.collection", "lib.es2023.collection.d.ts"], - ["esnext.array", "lib.es2023.array.d.ts"], - ["esnext.collection", "lib.es2023.collection.d.ts"], - ["esnext.symbol", "lib.es2019.symbol.d.ts"], - ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], - ["esnext.intl", "lib.esnext.intl.d.ts"], - ["esnext.disposable", "lib.esnext.disposable.d.ts"], - ["esnext.bigint", "lib.es2020.bigint.d.ts"], - ["esnext.string", "lib.es2022.string.d.ts"], - ["esnext.promise", "lib.es2021.promise.d.ts"], - ["esnext.weakref", "lib.es2021.weakref.d.ts"], - ["esnext.decorators", "lib.esnext.decorators.d.ts"], - ["decorators", "lib.decorators.d.ts"], - ["decorators.legacy", "lib.decorators.legacy.d.ts"] - ]; - libs = libEntries.map((entry) => entry[0]); - libMap = new Map(libEntries); - optionsForWatch = [ - { - name: "watchFile", - type: new Map(Object.entries({ - fixedpollinginterval: 0 /* FixedPollingInterval */, - prioritypollinginterval: 1 /* PriorityPollingInterval */, - dynamicprioritypolling: 2 /* DynamicPriorityPolling */, - fixedchunksizepolling: 3 /* FixedChunkSizePolling */, - usefsevents: 4 /* UseFsEvents */, - usefseventsonparentdirectory: 5 /* UseFsEventsOnParentDirectory */ - })), - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Specify_how_the_TypeScript_watch_mode_works, - defaultValueDescription: 4 /* UseFsEvents */ - }, - { - name: "watchDirectory", - type: new Map(Object.entries({ - usefsevents: 0 /* UseFsEvents */, - fixedpollinginterval: 1 /* FixedPollingInterval */, - dynamicprioritypolling: 2 /* DynamicPriorityPolling */, - fixedchunksizepolling: 3 /* FixedChunkSizePolling */ - })), - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality, - defaultValueDescription: 0 /* UseFsEvents */ - }, - { - name: "fallbackPolling", - type: new Map(Object.entries({ - fixedinterval: 0 /* FixedInterval */, - priorityinterval: 1 /* PriorityInterval */, - dynamicpriority: 2 /* DynamicPriority */, - fixedchunksize: 3 /* FixedChunkSize */ - })), - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers, - defaultValueDescription: 1 /* PriorityInterval */ - }, - { - name: "synchronousWatchDirectory", - type: "boolean", - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively, - defaultValueDescription: false - }, - { - name: "excludeDirectories", - type: "list", - element: { - name: "excludeDirectory", - type: "string", - isFilePath: true, - extraValidation: specToDiagnostic - }, - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Remove_a_list_of_directories_from_the_watch_process - }, - { - name: "excludeFiles", - type: "list", - element: { - name: "excludeFile", - type: "string", - isFilePath: true, - extraValidation: specToDiagnostic - }, - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Remove_a_list_of_files_from_the_watch_mode_s_processing - } - ]; - commonOptionsWithBuild = [ - { - name: "help", - shortName: "h", - type: "boolean", - showInSimplifiedHelpView: true, - isCommandLineOnly: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Print_this_message, - defaultValueDescription: false - }, - { - name: "help", - shortName: "?", - type: "boolean", - isCommandLineOnly: true, - category: Diagnostics.Command_line_Options, - defaultValueDescription: false - }, - { - name: "watch", - shortName: "w", - type: "boolean", - showInSimplifiedHelpView: true, - isCommandLineOnly: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Watch_input_files, - defaultValueDescription: false - }, - { - name: "preserveWatchOutput", - type: "boolean", - showInSimplifiedHelpView: false, - category: Diagnostics.Output_Formatting, - description: Diagnostics.Disable_wiping_the_console_in_watch_mode, - defaultValueDescription: false - }, - { - name: "listFiles", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Print_all_of_the_files_read_during_the_compilation, - defaultValueDescription: false - }, - { - name: "explainFiles", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included, - defaultValueDescription: false - }, - { - name: "listEmittedFiles", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Print_the_names_of_emitted_files_after_a_compilation, - defaultValueDescription: false - }, - { - name: "pretty", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Output_Formatting, - description: Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read, - defaultValueDescription: true - }, - { - name: "traceResolution", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Log_paths_used_during_the_moduleResolution_process, - defaultValueDescription: false - }, - { - name: "diagnostics", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Output_compiler_performance_information_after_building, - defaultValueDescription: false - }, - { - name: "extendedDiagnostics", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Output_more_detailed_compiler_performance_information_after_building, - defaultValueDescription: false - }, - { - name: "generateCpuProfile", - type: "string", - isFilePath: true, - paramType: Diagnostics.FILE_OR_DIRECTORY, - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging, - defaultValueDescription: "profile.cpuprofile" - }, - { - name: "generateTrace", - type: "string", - isFilePath: true, - isCommandLineOnly: true, - paramType: Diagnostics.DIRECTORY, - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Generates_an_event_trace_and_a_list_of_types - }, - { - name: "incremental", - shortName: "i", - type: "boolean", - category: Diagnostics.Projects, - description: Diagnostics.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects, - transpileOptionValue: void 0, - defaultValueDescription: Diagnostics.false_unless_composite_is_set - }, - { - name: "declaration", - shortName: "d", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - transpileOptionValue: void 0, - description: Diagnostics.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project, - defaultValueDescription: Diagnostics.false_unless_composite_is_set - }, - { - name: "declarationMap", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - transpileOptionValue: void 0, - defaultValueDescription: false, - description: Diagnostics.Create_sourcemaps_for_d_ts_files - }, - { - name: "emitDeclarationOnly", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files, - transpileOptionValue: void 0, - defaultValueDescription: false - }, - { - name: "sourceMap", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - defaultValueDescription: false, - description: Diagnostics.Create_source_map_files_for_emitted_JavaScript_files - }, - { - name: "inlineSourceMap", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript, - defaultValueDescription: false - }, - { - name: "assumeChangesOnlyAffectDirectDependencies", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it, - defaultValueDescription: false - }, - { - name: "locale", - type: "string", - category: Diagnostics.Command_line_Options, - isCommandLineOnly: true, - description: Diagnostics.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit, - defaultValueDescription: Diagnostics.Platform_specific - } - ]; - targetOptionDeclaration = { - name: "target", - shortName: "t", - type: new Map(Object.entries({ - es3: 0 /* ES3 */, - es5: 1 /* ES5 */, - es6: 2 /* ES2015 */, - es2015: 2 /* ES2015 */, - es2016: 3 /* ES2016 */, - es2017: 4 /* ES2017 */, - es2018: 5 /* ES2018 */, - es2019: 6 /* ES2019 */, - es2020: 7 /* ES2020 */, - es2021: 8 /* ES2021 */, - es2022: 9 /* ES2022 */, - esnext: 99 /* ESNext */ - })), - affectsSourceFile: true, - affectsModuleResolution: true, - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.VERSION, - showInSimplifiedHelpView: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations, - defaultValueDescription: 1 /* ES5 */ - }; - moduleOptionDeclaration = { - name: "module", - shortName: "m", - type: new Map(Object.entries({ - none: 0 /* None */, - commonjs: 1 /* CommonJS */, - amd: 2 /* AMD */, - system: 4 /* System */, - umd: 3 /* UMD */, - es6: 5 /* ES2015 */, - es2015: 5 /* ES2015 */, - es2020: 6 /* ES2020 */, - es2022: 7 /* ES2022 */, - esnext: 99 /* ESNext */, - node16: 100 /* Node16 */, - nodenext: 199 /* NodeNext */ - })), - affectsModuleResolution: true, - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.KIND, - showInSimplifiedHelpView: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_what_module_code_is_generated, - defaultValueDescription: void 0 - }; - commandOptionsWithoutBuild = [ - // CommandLine only options - { - name: "all", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Show_all_compiler_options, - defaultValueDescription: false - }, - { - name: "version", - shortName: "v", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Print_the_compiler_s_version, - defaultValueDescription: false - }, - { - name: "init", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file, - defaultValueDescription: false - }, - { - name: "project", - shortName: "p", - type: "string", - isFilePath: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - paramType: Diagnostics.FILE_OR_DIRECTORY, - description: 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: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date, - defaultValueDescription: false - }, - { - name: "showConfig", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - isCommandLineOnly: true, - description: Diagnostics.Print_the_final_configuration_instead_of_building, - defaultValueDescription: false - }, - { - name: "listFilesOnly", - type: "boolean", - category: Diagnostics.Command_line_Options, - isCommandLineOnly: true, - description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing, - defaultValueDescription: false - }, - // Basic - targetOptionDeclaration, - moduleOptionDeclaration, - { - name: "lib", - type: "list", - element: { - name: "lib", - type: libMap, - defaultValueDescription: void 0 - }, - affectsProgramStructure: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment, - transpileOptionValue: void 0 - }, - { - name: "allowJs", - type: "boolean", - affectsModuleResolution: true, - showInSimplifiedHelpView: true, - category: Diagnostics.JavaScript_Support, - description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, - defaultValueDescription: false - }, - { - name: "checkJs", - type: "boolean", - affectsModuleResolution: true, - showInSimplifiedHelpView: true, - category: Diagnostics.JavaScript_Support, - description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, - defaultValueDescription: false - }, - { - name: "jsx", - type: jsxOptionMap, - affectsSourceFile: true, - affectsEmit: true, - affectsBuildInfo: true, - affectsModuleResolution: true, - paramType: Diagnostics.KIND, - showInSimplifiedHelpView: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_what_JSX_code_is_generated, - defaultValueDescription: void 0 - }, - { - name: "outFile", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: true, - paramType: Diagnostics.FILE, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output, - transpileOptionValue: void 0 - }, - { - name: "outDir", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: true, - paramType: Diagnostics.DIRECTORY, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Specify_an_output_folder_for_all_emitted_files - }, - { - name: "rootDir", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: true, - paramType: Diagnostics.LOCATION, - category: Diagnostics.Modules, - description: Diagnostics.Specify_the_root_folder_within_your_source_files, - defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files - }, - { - name: "composite", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - isTSConfigOnly: true, - category: Diagnostics.Projects, - transpileOptionValue: void 0, - defaultValueDescription: false, - description: Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references - }, - { - name: "tsBuildInfoFile", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - isFilePath: true, - paramType: Diagnostics.FILE, - category: Diagnostics.Projects, - transpileOptionValue: void 0, - defaultValueDescription: ".tsbuildinfo", - description: Diagnostics.Specify_the_path_to_tsbuildinfo_incremental_compilation_file - }, - { - name: "removeComments", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - defaultValueDescription: false, - description: Diagnostics.Disable_emitting_comments - }, - { - name: "noEmit", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_emitting_files_from_a_compilation, - transpileOptionValue: void 0, - defaultValueDescription: false - }, - { - name: "importHelpers", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file, - defaultValueDescription: false - }, - { - name: "importsNotUsedAsValues", - type: new Map(Object.entries({ - remove: 0 /* Remove */, - preserve: 1 /* Preserve */, - error: 2 /* Error */ - })), - affectsEmit: true, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types, - defaultValueDescription: 0 /* Remove */ - }, - { - name: "downlevelIteration", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration, - defaultValueDescription: false - }, - { - name: "isolatedModules", - type: "boolean", - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports, - transpileOptionValue: true, - defaultValueDescription: false - }, - { - name: "verbatimModuleSyntax", - type: "boolean", - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting, - defaultValueDescription: false - }, - // Strict Type Checks - { - name: "strict", - type: "boolean", - // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here - // The value of each strictFlag depends on own strictFlag value or this and never accessed directly. - // But we need to store `strict` in builf info, even though it won't be examined directly, so that the - // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_all_strict_type_checking_options, - defaultValueDescription: false - }, - { - name: "noImplicitAny", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type, - defaultValueDescription: Diagnostics.false_unless_strict_is_set - }, - { - name: "strictNullChecks", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.When_type_checking_take_into_account_null_and_undefined, - defaultValueDescription: Diagnostics.false_unless_strict_is_set - }, - { - name: "strictFunctionTypes", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible, - defaultValueDescription: Diagnostics.false_unless_strict_is_set - }, - { - name: "strictBindCallApply", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function, - defaultValueDescription: Diagnostics.false_unless_strict_is_set - }, - { - name: "strictPropertyInitialization", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor, - defaultValueDescription: Diagnostics.false_unless_strict_is_set - }, - { - name: "noImplicitThis", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any, - defaultValueDescription: Diagnostics.false_unless_strict_is_set - }, - { - name: "useUnknownInCatchVariables", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any, - defaultValueDescription: Diagnostics.false_unless_strict_is_set - }, - { - name: "alwaysStrict", - type: "boolean", - affectsSourceFile: true, - affectsEmit: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Ensure_use_strict_is_always_emitted, - defaultValueDescription: Diagnostics.false_unless_strict_is_set - }, - // Additional Checks - { - name: "noUnusedLocals", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read, - defaultValueDescription: false - }, - { - name: "noUnusedParameters", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read, - defaultValueDescription: false - }, - { - name: "exactOptionalPropertyTypes", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined, - defaultValueDescription: false - }, - { - name: "noImplicitReturns", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function, - defaultValueDescription: false - }, - { - name: "noFallthroughCasesInSwitch", - type: "boolean", - affectsBindDiagnostics: true, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements, - defaultValueDescription: false - }, - { - name: "noUncheckedIndexedAccess", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index, - defaultValueDescription: false - }, - { - name: "noImplicitOverride", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier, - defaultValueDescription: false - }, - { - name: "noPropertyAccessFromIndexSignature", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - showInSimplifiedHelpView: false, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type, - defaultValueDescription: false - }, - // Module Resolution - { - name: "moduleResolution", - type: new Map(Object.entries({ - // N.B. The first entry specifies the value shown in `tsc --init` - node10: 2 /* Node10 */, - node: 2 /* Node10 */, - classic: 1 /* Classic */, - node16: 3 /* Node16 */, - nodenext: 99 /* NodeNext */, - bundler: 100 /* Bundler */ - })), - deprecatedKeys: /* @__PURE__ */ new Set(["node"]), - affectsModuleResolution: true, - paramType: Diagnostics.STRATEGY, - category: Diagnostics.Modules, - description: Diagnostics.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier, - defaultValueDescription: Diagnostics.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node - }, - { - name: "baseUrl", - type: "string", - affectsModuleResolution: true, - isFilePath: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_the_base_directory_to_resolve_non_relative_module_names - }, - { - // this option can only be specified in tsconfig.json - // use type = object to copy the value as-is - name: "paths", - type: "object", - affectsModuleResolution: true, - isTSConfigOnly: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations, - transpileOptionValue: void 0 - }, - { - // this option can only be specified in tsconfig.json - // use type = object to copy the value as-is - name: "rootDirs", - type: "list", - isTSConfigOnly: true, - element: { - name: "rootDirs", - type: "string", - isFilePath: true - }, - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules, - transpileOptionValue: void 0, - defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files - }, - { - name: "typeRoots", - type: "list", - element: { - name: "typeRoots", - type: "string", - isFilePath: true - }, - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types - }, - { - name: "types", - type: "list", - element: { - name: "types", - type: "string" - }, - affectsProgramStructure: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file, - transpileOptionValue: void 0 - }, - { - name: "allowSyntheticDefaultImports", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export, - defaultValueDescription: Diagnostics.module_system_or_esModuleInterop - }, - { - name: "esModuleInterop", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility, - defaultValueDescription: false - }, - { - name: "preserveSymlinks", - type: "boolean", - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node, - defaultValueDescription: false - }, - { - name: "allowUmdGlobalAccess", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Modules, - description: Diagnostics.Allow_accessing_UMD_globals_from_modules, - defaultValueDescription: false - }, - { - name: "moduleSuffixes", - type: "list", - element: { - name: "suffix", - type: "string" - }, - listPreserveFalsyValues: true, - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.List_of_file_name_suffixes_to_search_when_resolving_a_module - }, - { - name: "allowImportingTsExtensions", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Modules, - description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set, - defaultValueDescription: false, - transpileOptionValue: void 0 - }, - { - name: "resolvePackageJsonExports", - type: "boolean", - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Use_the_package_json_exports_field_when_resolving_package_imports, - defaultValueDescription: Diagnostics.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false - }, - { - name: "resolvePackageJsonImports", - type: "boolean", - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Use_the_package_json_imports_field_when_resolving_imports, - defaultValueDescription: Diagnostics.true_when_moduleResolution_is_node16_nodenext_or_bundler_otherwise_false - }, - { - name: "customConditions", - type: "list", - element: { - name: "condition", - type: "string" - }, - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Conditions_to_set_in_addition_to_the_resolver_specific_defaults_when_resolving_imports - }, - // Source Maps - { - name: "sourceRoot", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.LOCATION, - category: Diagnostics.Emit, - description: Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code - }, - { - name: "mapRoot", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.LOCATION, - category: Diagnostics.Emit, - description: Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations - }, - { - name: "inlineSources", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript, - defaultValueDescription: false - }, - // Experimental - { - name: "experimentalDecorators", - type: "boolean", - affectsEmit: true, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Enable_experimental_support_for_legacy_experimental_decorators, - defaultValueDescription: false - }, - { - name: "emitDecoratorMetadata", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files, - defaultValueDescription: false - }, - // Advanced - { - name: "jsxFactory", - type: "string", - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h, - defaultValueDescription: "`React.createElement`" - }, - { - name: "jsxFragmentFactory", - type: "string", - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment, - defaultValueDescription: "React.Fragment" - }, - { - name: "jsxImportSource", - type: "string", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - affectsModuleResolution: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk, - defaultValueDescription: "react" - }, - { - name: "resolveJsonModule", - type: "boolean", - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Enable_importing_json_files, - defaultValueDescription: false - }, - { - name: "allowArbitraryExtensions", - type: "boolean", - affectsProgramStructure: true, - category: Diagnostics.Modules, - description: Diagnostics.Enable_importing_files_with_any_extension_provided_a_declaration_file_is_present, - defaultValueDescription: false - }, - { - name: "out", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: false, - // This is intentionally broken to support compatability with existing tsconfig files - // for correct behaviour, please use outFile - category: Diagnostics.Backwards_Compatibility, - paramType: Diagnostics.FILE, - transpileOptionValue: void 0, - description: Diagnostics.Deprecated_setting_Use_outFile_instead - }, - { - name: "reactNamespace", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit, - defaultValueDescription: "`React`" - }, - { - name: "skipDefaultLibCheck", - type: "boolean", - // We need to store these to determine whether `lib` files need to be rechecked - affectsBuildInfo: true, - category: Diagnostics.Completeness, - description: Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript, - defaultValueDescription: false - }, - { - name: "charset", - type: "string", - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files, - defaultValueDescription: "utf8" - }, - { - name: "emitBOM", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files, - defaultValueDescription: false - }, - { - name: "newLine", - type: new Map(Object.entries({ - crlf: 0 /* CarriageReturnLineFeed */, - lf: 1 /* LineFeed */ - })), - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.NEWLINE, - category: Diagnostics.Emit, - description: Diagnostics.Set_the_newline_character_for_emitting_files, - defaultValueDescription: "lf" - }, - { - name: "noErrorTruncation", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Output_Formatting, - description: Diagnostics.Disable_truncating_types_in_error_messages, - defaultValueDescription: false - }, - { - name: "noLib", - type: "boolean", - category: Diagnostics.Language_and_Environment, - affectsProgramStructure: true, - description: Diagnostics.Disable_including_any_library_files_including_the_default_lib_d_ts, - // We are not returning a sourceFile for lib file when asked by the program, - // so pass --noLib to avoid reporting a file not found error. - transpileOptionValue: true, - defaultValueDescription: false - }, - { - name: "noResolve", - type: "boolean", - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project, - // We are not doing a full typecheck, we are not resolving the whole context, - // so pass --noResolve to avoid reporting missing file errors. - transpileOptionValue: true, - defaultValueDescription: false - }, - { - name: "stripInternal", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments, - defaultValueDescription: false - }, - { - name: "disableSizeLimit", - type: "boolean", - affectsProgramStructure: true, - category: Diagnostics.Editor_Support, - description: Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server, - defaultValueDescription: false - }, - { - name: "disableSourceOfProjectReferenceRedirect", - type: "boolean", - isTSConfigOnly: true, - category: Diagnostics.Projects, - description: Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects, - defaultValueDescription: false - }, - { - name: "disableSolutionSearching", - type: "boolean", - isTSConfigOnly: true, - category: Diagnostics.Projects, - description: Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing, - defaultValueDescription: false - }, - { - name: "disableReferencedProjectLoad", - type: "boolean", - isTSConfigOnly: true, - category: Diagnostics.Projects, - description: Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript, - defaultValueDescription: false - }, - { - name: "noImplicitUseStrict", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files, - defaultValueDescription: false - }, - { - name: "noEmitHelpers", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output, - defaultValueDescription: false - }, - { - name: "noEmitOnError", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - transpileOptionValue: void 0, - description: Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported, - defaultValueDescription: false - }, - { - name: "preserveConstEnums", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code, - defaultValueDescription: false - }, - { - name: "declarationDir", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: true, - paramType: Diagnostics.DIRECTORY, - category: Diagnostics.Emit, - transpileOptionValue: void 0, - description: Diagnostics.Specify_the_output_directory_for_generated_declaration_files - }, - { - name: "skipLibCheck", - type: "boolean", - // We need to store these to determine whether `lib` files need to be rechecked - affectsBuildInfo: true, - category: Diagnostics.Completeness, - description: Diagnostics.Skip_type_checking_all_d_ts_files, - defaultValueDescription: false - }, - { - name: "allowUnusedLabels", - type: "boolean", - affectsBindDiagnostics: true, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Disable_error_reporting_for_unused_labels, - defaultValueDescription: void 0 - }, - { - name: "allowUnreachableCode", - type: "boolean", - affectsBindDiagnostics: true, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Disable_error_reporting_for_unreachable_code, - defaultValueDescription: void 0 - }, - { - name: "suppressExcessPropertyErrors", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals, - defaultValueDescription: false - }, - { - name: "suppressImplicitAnyIndexErrors", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures, - defaultValueDescription: false - }, - { - name: "forceConsistentCasingInFileNames", - type: "boolean", - affectsModuleResolution: true, - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Ensure_that_casing_is_correct_in_imports, - defaultValueDescription: true - }, - { - name: "maxNodeModuleJsDepth", - type: "number", - affectsModuleResolution: true, - category: Diagnostics.JavaScript_Support, - description: Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs, - defaultValueDescription: 0 - }, - { - name: "noStrictGenericChecks", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types, - defaultValueDescription: false - }, - { - name: "useDefineForClassFields", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Emit_ECMAScript_standard_compliant_class_fields, - defaultValueDescription: Diagnostics.true_for_ES2022_and_above_including_ESNext - }, - { - name: "preserveValueImports", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed, - defaultValueDescription: false - }, - { - name: "keyofStringsOnly", - type: "boolean", - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option, - defaultValueDescription: false - }, - { - // A list of plugins to load in the language service - name: "plugins", - type: "list", - isTSConfigOnly: true, - element: { - name: "plugin", - type: "object" - }, - description: Diagnostics.Specify_a_list_of_language_service_plugins_to_include, - category: Diagnostics.Editor_Support - }, - { - name: "moduleDetection", - type: new Map(Object.entries({ - auto: 2 /* Auto */, - legacy: 1 /* Legacy */, - force: 3 /* Force */ - })), - affectsModuleResolution: true, - description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files, - category: Diagnostics.Language_and_Environment, - defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules - }, - { - name: "ignoreDeprecations", - type: "string", - defaultValueDescription: void 0 - } - ]; - optionDeclarations = [ - ...commonOptionsWithBuild, - ...commandOptionsWithoutBuild - ]; - semanticDiagnosticsOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsSemanticDiagnostics); - affectsEmitOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsEmit); - affectsDeclarationPathOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsDeclarationPath); - moduleResolutionOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsModuleResolution); - sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics); - optionsAffectingProgramStructure = optionDeclarations.filter((option) => !!option.affectsProgramStructure); - transpileOptionValueCompilerOptions = optionDeclarations.filter((option) => hasProperty(option, "transpileOptionValue")); - optionsForBuild = [ - { - name: "verbose", - shortName: "v", - category: Diagnostics.Command_line_Options, - description: Diagnostics.Enable_verbose_logging, - type: "boolean", - defaultValueDescription: false - }, - { - name: "dry", - shortName: "d", - category: Diagnostics.Command_line_Options, - description: Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean, - type: "boolean", - defaultValueDescription: false - }, - { - name: "force", - shortName: "f", - category: Diagnostics.Command_line_Options, - description: Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date, - type: "boolean", - defaultValueDescription: false - }, - { - name: "clean", - category: Diagnostics.Command_line_Options, - description: Diagnostics.Delete_the_outputs_of_all_projects, - type: "boolean", - defaultValueDescription: false - } - ]; - buildOpts = [ - ...commonOptionsWithBuild, - ...optionsForBuild - ]; - typeAcquisitionDeclarations = [ - { - name: "enable", - type: "boolean", - defaultValueDescription: false - }, - { - name: "include", - type: "list", - element: { - name: "include", - type: "string" - } - }, - { - name: "exclude", - type: "list", - element: { - name: "exclude", - type: "string" - } - }, - { - name: "disableFilenameBasedTypeAcquisition", - type: "boolean", - defaultValueDescription: false - } - ]; - compilerOptionsAlternateMode = { - diagnostic: Diagnostics.Compiler_option_0_may_only_be_used_with_build, - getOptionsNameMap: getBuildOptionsNameMap - }; - defaultInitCompilerOptions = { - module: 1 /* CommonJS */, - target: 3 /* ES2016 */, - strict: true, - esModuleInterop: true, - forceConsistentCasingInFileNames: true, - skipLibCheck: true - }; - compilerOptionsDidYouMeanDiagnostics = { - alternateMode: compilerOptionsAlternateMode, - getOptionsNameMap, - optionDeclarations, - unknownOptionDiagnostic: Diagnostics.Unknown_compiler_option_0, - unknownDidYouMeanDiagnostic: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1, - optionTypeMismatchDiagnostic: Diagnostics.Compiler_option_0_expects_an_argument - }; - buildOptionsAlternateMode = { - diagnostic: Diagnostics.Compiler_option_0_may_not_be_used_with_build, - getOptionsNameMap - }; - buildOptionsDidYouMeanDiagnostics = { - alternateMode: buildOptionsAlternateMode, - getOptionsNameMap: getBuildOptionsNameMap, - optionDeclarations: buildOpts, - unknownOptionDiagnostic: Diagnostics.Unknown_build_option_0, - unknownDidYouMeanDiagnostic: Diagnostics.Unknown_build_option_0_Did_you_mean_1, - optionTypeMismatchDiagnostic: Diagnostics.Build_option_0_requires_a_value_of_type_1 - }; - typeAcquisitionDidYouMeanDiagnostics = { - optionDeclarations: typeAcquisitionDeclarations, - unknownOptionDiagnostic: Diagnostics.Unknown_type_acquisition_option_0, - unknownDidYouMeanDiagnostic: Diagnostics.Unknown_type_acquisition_option_0_Did_you_mean_1 - }; - watchOptionsDidYouMeanDiagnostics = { - getOptionsNameMap: getWatchOptionsNameMap, - optionDeclarations: optionsForWatch, - unknownOptionDiagnostic: Diagnostics.Unknown_watch_option_0, - unknownDidYouMeanDiagnostic: Diagnostics.Unknown_watch_option_0_Did_you_mean_1, - optionTypeMismatchDiagnostic: Diagnostics.Watch_option_0_requires_a_value_of_type_1 - }; - extendsOptionDeclaration = { - name: "extends", - type: "listOrElement", - element: { - name: "extends", - type: "string" - }, - category: Diagnostics.File_Management, - disallowNullOrUndefined: true - }; - compilerOptionsDeclaration = { - name: "compilerOptions", - type: "object", - elementOptions: getCommandLineCompilerOptionsMap(), - extraKeyDiagnostics: compilerOptionsDidYouMeanDiagnostics - }; - watchOptionsDeclaration = { - name: "watchOptions", - type: "object", - elementOptions: getCommandLineWatchOptionsMap(), - extraKeyDiagnostics: watchOptionsDidYouMeanDiagnostics - }; - typeAcquisitionDeclaration = { - name: "typeAcquisition", - type: "object", - elementOptions: getCommandLineTypeAcquisitionMap(), - extraKeyDiagnostics: typeAcquisitionDidYouMeanDiagnostics - }; - defaultIncludeSpec = "**/*"; - invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/; - wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/; - } - }); - - // src/compiler/moduleNameResolver.ts - function trace(host) { - host.trace(formatMessage.apply(void 0, arguments)); - } - function isTraceEnabled(compilerOptions, host) { - return !!compilerOptions.traceResolution && host.trace !== void 0; - } - function withPackageId(packageInfo, r) { - let packageId; - if (r && packageInfo) { - const packageJsonContent = packageInfo.contents.packageJsonContent; - if (typeof packageJsonContent.name === "string" && typeof packageJsonContent.version === "string") { - packageId = { - name: packageJsonContent.name, - subModuleName: r.path.slice(packageInfo.packageDirectory.length + directorySeparator.length), - version: packageJsonContent.version - }; - } - } - return r && { path: r.path, extension: r.ext, packageId, resolvedUsingTsExtension: r.resolvedUsingTsExtension }; - } - function noPackageId(r) { - return withPackageId( - /*packageInfo*/ - void 0, - r - ); - } - function removeIgnoredPackageId(r) { - if (r) { - Debug.assert(r.packageId === void 0); - return { path: r.path, ext: r.extension, resolvedUsingTsExtension: r.resolvedUsingTsExtension }; - } - } - function formatExtensions(extensions) { - const result = []; - if (extensions & 1 /* TypeScript */) - result.push("TypeScript"); - if (extensions & 2 /* JavaScript */) - result.push("JavaScript"); - if (extensions & 4 /* Declaration */) - result.push("Declaration"); - if (extensions & 8 /* Json */) - result.push("JSON"); - return result.join(", "); - } - function extensionsToExtensionsArray(extensions) { - const result = []; - if (extensions & 1 /* TypeScript */) - result.push(...supportedTSImplementationExtensions); - if (extensions & 2 /* JavaScript */) - result.push(...supportedJSExtensionsFlat); - if (extensions & 4 /* Declaration */) - result.push(...supportedDeclarationExtensions); - if (extensions & 8 /* Json */) - result.push(".json" /* Json */); - return result; - } - function resolvedTypeScriptOnly(resolved) { - if (!resolved) { - return void 0; - } - Debug.assert(extensionIsTS(resolved.extension)); - return { fileName: resolved.path, packageId: resolved.packageId }; - } - function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, legacyResult) { - if (!state.resultFromCache && !state.compilerOptions.preserveSymlinks && resolved && isExternalLibraryImport && !resolved.originalPath && !isExternalModuleNameRelative(moduleName)) { - const { resolvedFileName, originalPath } = getOriginalAndResolvedFileName(resolved.path, state.host, state.traceEnabled); - if (originalPath) - resolved = { ...resolved, path: resolvedFileName, originalPath }; - } - return createResolvedModuleWithFailedLookupLocations( - resolved, - isExternalLibraryImport, - failedLookupLocations, - affectingLocations, - diagnostics, - state.resultFromCache, - legacyResult - ); - } - function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) { - if (resultFromCache) { - resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations); - resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations); - resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics); - return resultFromCache; - } - return { - resolvedModule: resolved && { - resolvedFileName: resolved.path, - originalPath: resolved.originalPath === true ? void 0 : resolved.originalPath, - extension: resolved.extension, - isExternalLibraryImport, - packageId: resolved.packageId, - resolvedUsingTsExtension: !!resolved.resolvedUsingTsExtension - }, - failedLookupLocations: initializeResolutionField(failedLookupLocations), - affectingLocations: initializeResolutionField(affectingLocations), - resolutionDiagnostics: initializeResolutionField(diagnostics), - node10Result: legacyResult - }; - } - function initializeResolutionField(value) { - return value.length ? value : void 0; - } - function updateResolutionField(to, value) { - if (!(value == null ? void 0 : value.length)) - return to; - if (!(to == null ? void 0 : to.length)) - return value; - to.push(...value); - return to; - } - function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) { - if (!hasProperty(jsonContent, fieldName)) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_does_not_have_a_0_field, fieldName); - } - return; - } - const value = jsonContent[fieldName]; - if (typeof value !== typeOfTag || value === null) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, fieldName, typeOfTag, value === null ? "null" : typeof value); - } - return; - } - return value; - } - function readPackageJsonPathField(jsonContent, fieldName, baseDirectory, state) { - const fileName = readPackageJsonField(jsonContent, fieldName, "string", state); - if (fileName === void 0) { - return; - } - if (!fileName) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_had_a_falsy_0_field, fieldName); - } - return; - } - const path = normalizePath(combinePaths(baseDirectory, fileName)); - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path); - } - return path; - } - function readPackageJsonTypesFields(jsonContent, baseDirectory, state) { - return readPackageJsonPathField(jsonContent, "typings", baseDirectory, state) || readPackageJsonPathField(jsonContent, "types", baseDirectory, state); - } - function readPackageJsonTSConfigField(jsonContent, baseDirectory, state) { - return readPackageJsonPathField(jsonContent, "tsconfig", baseDirectory, state); - } - function readPackageJsonMainField(jsonContent, baseDirectory, state) { - return readPackageJsonPathField(jsonContent, "main", baseDirectory, state); - } - function readPackageJsonTypesVersionsField(jsonContent, state) { - const typesVersions = readPackageJsonField(jsonContent, "typesVersions", "object", state); - if (typesVersions === void 0) - return; - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_has_a_typesVersions_field_with_version_specific_path_mappings); - } - return typesVersions; - } - function readPackageJsonTypesVersionPaths(jsonContent, state) { - const typesVersions = readPackageJsonTypesVersionsField(jsonContent, state); - if (typesVersions === void 0) - return; - if (state.traceEnabled) { - for (const key in typesVersions) { - if (hasProperty(typesVersions, key) && !VersionRange.tryParse(key)) { - trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range, key); - } - } - } - const result = getPackageJsonTypesVersionsPaths(typesVersions); - if (!result) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_does_not_have_a_typesVersions_entry_that_matches_version_0, versionMajorMinor); - } - return; - } - const { version: bestVersionKey, paths: bestVersionPaths } = result; - if (typeof bestVersionPaths !== "object") { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, `typesVersions['${bestVersionKey}']`, "object", typeof bestVersionPaths); - } - return; - } - return result; - } - function getPackageJsonTypesVersionsPaths(typesVersions) { - if (!typeScriptVersion) - typeScriptVersion = new Version(version); - for (const key in typesVersions) { - if (!hasProperty(typesVersions, key)) - continue; - const keyRange = VersionRange.tryParse(key); - if (keyRange === void 0) { - continue; - } - if (keyRange.test(typeScriptVersion)) { - return { version: key, paths: typesVersions[key] }; - } - } - } - function getEffectiveTypeRoots(options, host) { - if (options.typeRoots) { - return options.typeRoots; - } - let currentDirectory; - if (options.configFilePath) { - currentDirectory = getDirectoryPath(options.configFilePath); - } else if (host.getCurrentDirectory) { - currentDirectory = host.getCurrentDirectory(); - } - if (currentDirectory !== void 0) { - return getDefaultTypeRoots(currentDirectory); - } - } - function getDefaultTypeRoots(currentDirectory) { - let typeRoots; - forEachAncestorDirectory(normalizePath(currentDirectory), (directory) => { - const atTypes = combinePaths(directory, nodeModulesAtTypes); - (typeRoots ?? (typeRoots = [])).push(atTypes); - }); - return typeRoots; - } - function arePathsEqual(path1, path2, host) { - const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames; - return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0 /* EqualTo */; - } - function getOriginalAndResolvedFileName(fileName, host, traceEnabled) { - const resolvedFileName = realPath(fileName, host, traceEnabled); - const pathsAreEqual = arePathsEqual(fileName, resolvedFileName, host); - return { - // If the fileName and realpath are differing only in casing prefer fileName so that we can issue correct errors for casing under forceConsistentCasingInFileNames - resolvedFileName: pathsAreEqual ? fileName : resolvedFileName, - originalPath: pathsAreEqual ? void 0 : fileName - }; - } - function getCandidateFromTypeRoot(typeRoot, typeReferenceDirectiveName, moduleResolutionState) { - const nameForLookup = endsWith(typeRoot, "/node_modules/@types") || endsWith(typeRoot, "/node_modules/@types/") ? mangleScopedPackageNameWithTrace(typeReferenceDirectiveName, moduleResolutionState) : typeReferenceDirectiveName; - return combinePaths(typeRoot, nameForLookup); - } - function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference, cache, resolutionMode) { - Debug.assert(typeof typeReferenceDirectiveName === "string", "Non-string value passed to `ts.resolveTypeReferenceDirective`, likely by a wrapping package working with an outdated `resolveTypeReferenceDirectives` signature. This is probably not a problem in TS itself."); - const traceEnabled = isTraceEnabled(options, host); - if (redirectedReference) { - options = redirectedReference.commandLine.options; - } - const containingDirectory = containingFile ? getDirectoryPath(containingFile) : void 0; - let result = containingDirectory ? cache == null ? void 0 : cache.getFromDirectoryCache(typeReferenceDirectiveName, resolutionMode, containingDirectory, redirectedReference) : void 0; - if (!result && containingDirectory && !isExternalModuleNameRelative(typeReferenceDirectiveName)) { - result = cache == null ? void 0 : cache.getFromNonRelativeNameCache(typeReferenceDirectiveName, resolutionMode, containingDirectory, redirectedReference); - } - if (result) { - if (traceEnabled) { - trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_1, typeReferenceDirectiveName, containingFile); - if (redirectedReference) - trace(host, Diagnostics.Using_compiler_options_of_project_reference_redirect_0, redirectedReference.sourceFile.fileName); - trace(host, Diagnostics.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1, typeReferenceDirectiveName, containingDirectory); - traceResult(result); - } - return result; - } - const typeRoots = getEffectiveTypeRoots(options, host); - if (traceEnabled) { - if (containingFile === void 0) { - if (typeRoots === void 0) { - trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set, typeReferenceDirectiveName); - } else { - trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1, typeReferenceDirectiveName, typeRoots); - } - } else { - if (typeRoots === void 0) { - trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set, typeReferenceDirectiveName, containingFile); - } else { - trace(host, Diagnostics.Resolving_type_reference_directive_0_containing_file_1_root_directory_2, typeReferenceDirectiveName, containingFile, typeRoots); - } - } - if (redirectedReference) { - trace(host, Diagnostics.Using_compiler_options_of_project_reference_redirect_0, redirectedReference.sourceFile.fileName); - } - } - const failedLookupLocations = []; - const affectingLocations = []; - let features = getNodeResolutionFeatures(options); - if (resolutionMode === 99 /* ESNext */ && (getEmitModuleResolutionKind(options) === 3 /* Node16 */ || getEmitModuleResolutionKind(options) === 99 /* NodeNext */)) { - features |= 32 /* EsmMode */; - } - const conditions = features & 8 /* Exports */ ? getConditions(options, !!(features & 32 /* EsmMode */)) : []; - const diagnostics = []; - const moduleResolutionState = { - compilerOptions: options, - host, - traceEnabled, - failedLookupLocations, - affectingLocations, - packageJsonInfoCache: cache, - features, - conditions, - requestContainingDirectory: containingDirectory, - reportDiagnostic: (diag2) => void diagnostics.push(diag2), - isConfigLookup: false, - candidateIsFromPackageJsonField: false - }; - let resolved = primaryLookup(); - let primary = true; - if (!resolved) { - resolved = secondaryLookup(); - primary = false; - } - let resolvedTypeReferenceDirective; - if (resolved) { - const { fileName, packageId } = resolved; - let resolvedFileName = fileName, originalPath; - if (!options.preserveSymlinks) - ({ resolvedFileName, originalPath } = getOriginalAndResolvedFileName(fileName, host, traceEnabled)); - resolvedTypeReferenceDirective = { - primary, - resolvedFileName, - originalPath, - packageId, - isExternalLibraryImport: pathContainsNodeModules(fileName) - }; - } - result = { - resolvedTypeReferenceDirective, - failedLookupLocations: initializeResolutionField(failedLookupLocations), - affectingLocations: initializeResolutionField(affectingLocations), - resolutionDiagnostics: initializeResolutionField(diagnostics) - }; - if (containingDirectory) { - cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set( - typeReferenceDirectiveName, - /*mode*/ - resolutionMode, - result - ); - if (!isExternalModuleNameRelative(typeReferenceDirectiveName)) { - cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(typeReferenceDirectiveName, resolutionMode, redirectedReference).set(containingDirectory, result); - } - } - if (traceEnabled) - traceResult(result); - return result; - function traceResult(result2) { - var _a; - if (!((_a = result2.resolvedTypeReferenceDirective) == null ? void 0 : _a.resolvedFileName)) { - trace(host, Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName); - } else if (result2.resolvedTypeReferenceDirective.packageId) { - trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3, typeReferenceDirectiveName, result2.resolvedTypeReferenceDirective.resolvedFileName, packageIdToString(result2.resolvedTypeReferenceDirective.packageId), result2.resolvedTypeReferenceDirective.primary); - } else { - trace(host, Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, result2.resolvedTypeReferenceDirective.resolvedFileName, result2.resolvedTypeReferenceDirective.primary); - } - } - function primaryLookup() { - if (typeRoots && typeRoots.length) { - if (traceEnabled) { - trace(host, Diagnostics.Resolving_with_primary_search_path_0, typeRoots.join(", ")); - } - return firstDefined(typeRoots, (typeRoot) => { - const candidate = getCandidateFromTypeRoot(typeRoot, typeReferenceDirectiveName, moduleResolutionState); - const directoryExists = directoryProbablyExists(typeRoot, host); - if (!directoryExists && traceEnabled) { - trace(host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, typeRoot); - } - if (options.typeRoots) { - const resolvedFromFile = loadModuleFromFile(4 /* Declaration */, candidate, !directoryExists, moduleResolutionState); - if (resolvedFromFile) { - const packageDirectory = parseNodeModuleFromPath(resolvedFromFile.path); - const packageInfo = packageDirectory ? getPackageJsonInfo( - packageDirectory, - /*onlyRecordFailures*/ - false, - moduleResolutionState - ) : void 0; - return resolvedTypeScriptOnly(withPackageId(packageInfo, resolvedFromFile)); - } - } - return resolvedTypeScriptOnly( - loadNodeModuleFromDirectory( - 4 /* Declaration */, - candidate, - !directoryExists, - moduleResolutionState - ) - ); - }); - } else { - if (traceEnabled) { - trace(host, Diagnostics.Root_directory_cannot_be_determined_skipping_primary_search_paths); - } - } - } - function secondaryLookup() { - const initialLocationForSecondaryLookup = containingFile && getDirectoryPath(containingFile); - if (initialLocationForSecondaryLookup !== void 0) { - let result2; - if (!options.typeRoots || !endsWith(containingFile, inferredTypesContainingFile)) { - if (traceEnabled) { - trace(host, Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup); - } - if (!isExternalModuleNameRelative(typeReferenceDirectiveName)) { - const searchResult = loadModuleFromNearestNodeModulesDirectory( - 4 /* Declaration */, - typeReferenceDirectiveName, - initialLocationForSecondaryLookup, - moduleResolutionState, - /*cache*/ - void 0, - /*redirectedReference*/ - void 0 - ); - result2 = searchResult && searchResult.value; - } else { - const { path: candidate } = normalizePathForCJSResolution(initialLocationForSecondaryLookup, typeReferenceDirectiveName); - result2 = nodeLoadModuleByRelativeName( - 4 /* Declaration */, - candidate, - /*onlyRecordFailures*/ - false, - moduleResolutionState, - /*considerPackageJson*/ - true - ); - } - } else if (traceEnabled) { - trace(host, Diagnostics.Resolving_type_reference_directive_for_program_that_specifies_custom_typeRoots_skipping_lookup_in_node_modules_folder); - } - return resolvedTypeScriptOnly(result2); - } else { - if (traceEnabled) { - trace(host, Diagnostics.Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder); - } - } - } - } - function getNodeResolutionFeatures(options) { - let features = 0 /* None */; - switch (getEmitModuleResolutionKind(options)) { - case 3 /* Node16 */: - features = 30 /* Node16Default */; - break; - case 99 /* NodeNext */: - features = 30 /* NodeNextDefault */; - break; - case 100 /* Bundler */: - features = 30 /* BundlerDefault */; - break; - } - if (options.resolvePackageJsonExports) { - features |= 8 /* Exports */; - } else if (options.resolvePackageJsonExports === false) { - features &= ~8 /* Exports */; - } - if (options.resolvePackageJsonImports) { - features |= 2 /* Imports */; - } else if (options.resolvePackageJsonImports === false) { - features &= ~2 /* Imports */; - } - return features; - } - function getConditions(options, esmMode) { - const conditions = esmMode || getEmitModuleResolutionKind(options) === 100 /* Bundler */ ? ["import"] : ["require"]; - if (!options.noDtsResolution) { - conditions.push("types"); - } - if (getEmitModuleResolutionKind(options) !== 100 /* Bundler */) { - conditions.push("node"); - } - return concatenate(conditions, options.customConditions); - } - function resolvePackageNameToPackageJson(packageName, containingDirectory, options, host, cache) { - const moduleResolutionState = getTemporaryModuleResolutionState(cache == null ? void 0 : cache.getPackageJsonInfoCache(), host, options); - return forEachAncestorDirectory(containingDirectory, (ancestorDirectory) => { - if (getBaseFileName(ancestorDirectory) !== "node_modules") { - const nodeModulesFolder = combinePaths(ancestorDirectory, "node_modules"); - const candidate = combinePaths(nodeModulesFolder, packageName); - return getPackageJsonInfo( - candidate, - /*onlyRecordFailures*/ - false, - moduleResolutionState - ); - } - }); - } - function getAutomaticTypeDirectiveNames(options, host) { - if (options.types) { - return options.types; - } - const result = []; - if (host.directoryExists && host.getDirectories) { - const typeRoots = getEffectiveTypeRoots(options, host); - if (typeRoots) { - for (const root of typeRoots) { - if (host.directoryExists(root)) { - for (const typeDirectivePath of host.getDirectories(root)) { - const normalized = normalizePath(typeDirectivePath); - const packageJsonPath = combinePaths(root, normalized, "package.json"); - const isNotNeededPackage = host.fileExists(packageJsonPath) && readJson(packageJsonPath, host).typings === null; - if (!isNotNeededPackage) { - const baseFileName = getBaseFileName(normalized); - if (baseFileName.charCodeAt(0) !== 46 /* dot */) { - result.push(baseFileName); - } - } - } - } - } - } - } - return result; - } - function compilerOptionValueToString(value) { - var _a; - if (value === null || typeof value !== "object") { - return "" + value; - } - if (isArray(value)) { - return `[${(_a = value.map((e) => compilerOptionValueToString(e))) == null ? void 0 : _a.join(",")}]`; - } - let str = "{"; - for (const key in value) { - if (hasProperty(value, key)) { - str += `${key}: ${compilerOptionValueToString(value[key])}`; - } - } - return str + "}"; - } - function getKeyForCompilerOptions(options, affectingOptionDeclarations) { - return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + `|${options.pathsBasePath}`; - } - function createCacheWithRedirects(ownOptions) { - const redirectsMap = /* @__PURE__ */ new Map(); - const optionsToRedirectsKey = /* @__PURE__ */ new Map(); - const redirectsKeyToMap = /* @__PURE__ */ new Map(); - let ownMap = /* @__PURE__ */ new Map(); - if (ownOptions) - redirectsMap.set(ownOptions, ownMap); - return { - getMapOfCacheRedirects, - getOrCreateMapOfCacheRedirects, - update, - clear: clear2 - }; - function getMapOfCacheRedirects(redirectedReference) { - return redirectedReference ? getOrCreateMap( - redirectedReference.commandLine.options, - /*create*/ - false - ) : ownMap; - } - function getOrCreateMapOfCacheRedirects(redirectedReference) { - return redirectedReference ? getOrCreateMap( - redirectedReference.commandLine.options, - /*create*/ - true - ) : ownMap; - } - function update(newOptions) { - if (ownOptions !== newOptions) { - if (ownOptions) - ownMap = getOrCreateMap( - newOptions, - /*create*/ - true - ); - else - redirectsMap.set(newOptions, ownMap); - ownOptions = newOptions; - } - } - function getOrCreateMap(redirectOptions, create) { - let result = redirectsMap.get(redirectOptions); - if (result) - return result; - const key = getRedirectsCacheKey(redirectOptions); - result = redirectsKeyToMap.get(key); - if (!result) { - if (ownOptions) { - const ownKey = getRedirectsCacheKey(ownOptions); - if (ownKey === key) - result = ownMap; - else if (!redirectsKeyToMap.has(ownKey)) - redirectsKeyToMap.set(ownKey, ownMap); - } - if (create) - result ?? (result = /* @__PURE__ */ new Map()); - if (result) - redirectsKeyToMap.set(key, result); - } - if (result) - redirectsMap.set(redirectOptions, result); - return result; - } - function clear2() { - const ownKey = ownOptions && optionsToRedirectsKey.get(ownOptions); - ownMap.clear(); - redirectsMap.clear(); - optionsToRedirectsKey.clear(); - redirectsKeyToMap.clear(); - if (ownOptions) { - if (ownKey) - optionsToRedirectsKey.set(ownOptions, ownKey); - redirectsMap.set(ownOptions, ownMap); - } - } - function getRedirectsCacheKey(options) { - let result = optionsToRedirectsKey.get(options); - if (!result) { - optionsToRedirectsKey.set(options, result = getKeyForCompilerOptions(options, moduleResolutionOptionDeclarations)); - } - return result; - } - } - function createPackageJsonInfoCache(currentDirectory, getCanonicalFileName) { - let cache; - return { getPackageJsonInfo: getPackageJsonInfo2, setPackageJsonInfo, clear: clear2, entries, getInternalMap }; - function getPackageJsonInfo2(packageJsonPath) { - return cache == null ? void 0 : cache.get(toPath(packageJsonPath, currentDirectory, getCanonicalFileName)); - } - function setPackageJsonInfo(packageJsonPath, info) { - (cache || (cache = /* @__PURE__ */ new Map())).set(toPath(packageJsonPath, currentDirectory, getCanonicalFileName), info); - } - function clear2() { - cache = void 0; - } - function entries() { - const iter = cache == null ? void 0 : cache.entries(); - return iter ? arrayFrom(iter) : []; - } - function getInternalMap() { - return cache; - } - } - function getOrCreateCache(cacheWithRedirects, redirectedReference, key, create) { - const cache = cacheWithRedirects.getOrCreateMapOfCacheRedirects(redirectedReference); - let result = cache.get(key); - if (!result) { - result = create(); - cache.set(key, result); - } - return result; - } - function createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options) { - const directoryToModuleNameMap = createCacheWithRedirects(options); - return { - getFromDirectoryCache, - getOrCreateCacheForDirectory, - clear: clear2, - update - }; - function clear2() { - directoryToModuleNameMap.clear(); - } - function update(options2) { - directoryToModuleNameMap.update(options2); - } - function getOrCreateCacheForDirectory(directoryName, redirectedReference) { - const path = toPath(directoryName, currentDirectory, getCanonicalFileName); - return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path, () => createModeAwareCache()); - } - function getFromDirectoryCache(name, mode, directoryName, redirectedReference) { - var _a, _b; - const path = toPath(directoryName, currentDirectory, getCanonicalFileName); - return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(path)) == null ? void 0 : _b.get(name, mode); - } - } - function createModeAwareCacheKey(specifier, mode) { - return mode === void 0 ? specifier : `${mode}|${specifier}`; - } - function createModeAwareCache() { - const underlying = /* @__PURE__ */ new Map(); - const memoizedReverseKeys = /* @__PURE__ */ new Map(); - const cache = { - get(specifier, mode) { - return underlying.get(getUnderlyingCacheKey(specifier, mode)); - }, - set(specifier, mode, value) { - underlying.set(getUnderlyingCacheKey(specifier, mode), value); - return cache; - }, - delete(specifier, mode) { - underlying.delete(getUnderlyingCacheKey(specifier, mode)); - return cache; - }, - has(specifier, mode) { - return underlying.has(getUnderlyingCacheKey(specifier, mode)); - }, - forEach(cb) { - return underlying.forEach((elem, key) => { - const [specifier, mode] = memoizedReverseKeys.get(key); - return cb(elem, specifier, mode); - }); - }, - size() { - return underlying.size; - } - }; - return cache; - function getUnderlyingCacheKey(specifier, mode) { - const result = createModeAwareCacheKey(specifier, mode); - memoizedReverseKeys.set(result, [specifier, mode]); - return result; - } - } - function zipToModeAwareCache(file, keys, values, nameAndModeGetter) { - Debug.assert(keys.length === values.length); - const map2 = createModeAwareCache(); - for (let i = 0; i < keys.length; ++i) { - const entry = keys[i]; - map2.set(nameAndModeGetter.getName(entry), nameAndModeGetter.getMode(entry, file), values[i]); - } - return map2; - } - function getOriginalOrResolvedModuleFileName(result) { - return result.resolvedModule && (result.resolvedModule.originalPath || result.resolvedModule.resolvedFileName); - } - function getOriginalOrResolvedTypeReferenceFileName(result) { - return result.resolvedTypeReferenceDirective && (result.resolvedTypeReferenceDirective.originalPath || result.resolvedTypeReferenceDirective.resolvedFileName); - } - function createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFileName, options, getResolvedFileName) { - const moduleNameToDirectoryMap = createCacheWithRedirects(options); - return { - getFromNonRelativeNameCache, - getOrCreateCacheForNonRelativeName, - clear: clear2, - update - }; - function clear2() { - moduleNameToDirectoryMap.clear(); - } - function update(options2) { - moduleNameToDirectoryMap.update(options2); - } - function getFromNonRelativeNameCache(nonRelativeModuleName, mode, directoryName, redirectedReference) { - var _a, _b; - Debug.assert(!isExternalModuleNameRelative(nonRelativeModuleName)); - return (_b = (_a = moduleNameToDirectoryMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(createModeAwareCacheKey(nonRelativeModuleName, mode))) == null ? void 0 : _b.get(directoryName); - } - function getOrCreateCacheForNonRelativeName(nonRelativeModuleName, mode, redirectedReference) { - Debug.assert(!isExternalModuleNameRelative(nonRelativeModuleName)); - return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, createModeAwareCacheKey(nonRelativeModuleName, mode), createPerModuleNameCache); - } - function createPerModuleNameCache() { - const directoryPathMap = /* @__PURE__ */ new Map(); - return { get, set }; - function get(directory) { - return directoryPathMap.get(toPath(directory, currentDirectory, getCanonicalFileName)); - } - function set(directory, result) { - const path = toPath(directory, currentDirectory, getCanonicalFileName); - if (directoryPathMap.has(path)) { - return; - } - directoryPathMap.set(path, result); - const resolvedFileName = getResolvedFileName(result); - const commonPrefix = resolvedFileName && getCommonPrefix(path, resolvedFileName); - let current = path; - while (current !== commonPrefix) { - const parent2 = getDirectoryPath(current); - if (parent2 === current || directoryPathMap.has(parent2)) { - break; - } - directoryPathMap.set(parent2, result); - current = parent2; - } - } - function getCommonPrefix(directory, resolution) { - const resolutionDirectory = toPath(getDirectoryPath(resolution), currentDirectory, getCanonicalFileName); - let i = 0; - const limit = Math.min(directory.length, resolutionDirectory.length); - while (i < limit && directory.charCodeAt(i) === resolutionDirectory.charCodeAt(i)) { - i++; - } - if (i === directory.length && (resolutionDirectory.length === i || resolutionDirectory[i] === directorySeparator)) { - return directory; - } - const rootLength = getRootLength(directory); - if (i < rootLength) { - return void 0; - } - const sep = directory.lastIndexOf(directorySeparator, i - 1); - if (sep === -1) { - return void 0; - } - return directory.substr(0, Math.max(sep, rootLength)); - } - } - } - function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, getResolvedFileName) { - const perDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options); - const nonRelativeNameResolutionCache = createNonRelativeNameResolutionCache( - currentDirectory, - getCanonicalFileName, - options, - getResolvedFileName - ); - packageJsonInfoCache ?? (packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName)); - return { - ...packageJsonInfoCache, - ...perDirectoryResolutionCache, - ...nonRelativeNameResolutionCache, - clear: clear2, - update, - getPackageJsonInfoCache: () => packageJsonInfoCache, - clearAllExceptPackageJsonInfoCache - }; - function clear2() { - clearAllExceptPackageJsonInfoCache(); - packageJsonInfoCache.clear(); - } - function clearAllExceptPackageJsonInfoCache() { - perDirectoryResolutionCache.clear(); - nonRelativeNameResolutionCache.clear(); - } - function update(options2) { - perDirectoryResolutionCache.update(options2); - nonRelativeNameResolutionCache.update(options2); - } - } - function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache) { - const result = createModuleOrTypeReferenceResolutionCache( - currentDirectory, - getCanonicalFileName, - options, - packageJsonInfoCache, - getOriginalOrResolvedModuleFileName - ); - result.getOrCreateCacheForModuleName = (nonRelativeName, mode, redirectedReference) => result.getOrCreateCacheForNonRelativeName(nonRelativeName, mode, redirectedReference); - return result; - } - function createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache) { - return createModuleOrTypeReferenceResolutionCache( - currentDirectory, - getCanonicalFileName, - options, - packageJsonInfoCache, - getOriginalOrResolvedTypeReferenceFileName - ); - } - function getOptionsForLibraryResolution(options) { - return { moduleResolution: 2 /* Node10 */, traceResolution: options.traceResolution }; - } - function resolveLibrary(libraryName, resolveFrom, compilerOptions, host, cache) { - return resolveModuleName(libraryName, resolveFrom, getOptionsForLibraryResolution(compilerOptions), host, cache); - } - function resolveModuleNameFromCache(moduleName, containingFile, cache, mode) { - const containingDirectory = getDirectoryPath(containingFile); - return cache.getFromDirectoryCache( - moduleName, - mode, - containingDirectory, - /*redirectedReference*/ - void 0 - ); - } - function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) { - var _a, _b, _c; - const traceEnabled = isTraceEnabled(compilerOptions, host); - if (redirectedReference) { - compilerOptions = redirectedReference.commandLine.options; - } - if (traceEnabled) { - trace(host, Diagnostics.Resolving_module_0_from_1, moduleName, containingFile); - if (redirectedReference) { - trace(host, Diagnostics.Using_compiler_options_of_project_reference_redirect_0, redirectedReference.sourceFile.fileName); - } - } - const containingDirectory = getDirectoryPath(containingFile); - let result = cache == null ? void 0 : cache.getFromDirectoryCache(moduleName, resolutionMode, containingDirectory, redirectedReference); - if (result) { - if (traceEnabled) { - trace(host, Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory); - } - } else { - let moduleResolution = compilerOptions.moduleResolution; - if (moduleResolution === void 0) { - switch (getEmitModuleKind(compilerOptions)) { - case 1 /* CommonJS */: - moduleResolution = 2 /* Node10 */; - break; - case 100 /* Node16 */: - moduleResolution = 3 /* Node16 */; - break; - case 199 /* NodeNext */: - moduleResolution = 99 /* NodeNext */; - break; - default: - moduleResolution = 1 /* Classic */; - break; - } - if (traceEnabled) { - trace(host, Diagnostics.Module_resolution_kind_is_not_specified_using_0, ModuleResolutionKind[moduleResolution]); - } - } else { - if (traceEnabled) { - trace(host, Diagnostics.Explicitly_specified_module_resolution_kind_Colon_0, ModuleResolutionKind[moduleResolution]); - } - } - (_a = perfLogger) == null ? void 0 : _a.logStartResolveModule(moduleName); - switch (moduleResolution) { - case 3 /* Node16 */: - result = node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); - break; - case 99 /* NodeNext */: - result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); - break; - case 2 /* Node10 */: - result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); - break; - case 1 /* Classic */: - result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); - break; - case 100 /* Bundler */: - result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); - break; - default: - return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`); - } - if (result && result.resolvedModule) - (_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`); - (_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null"); - cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); - if (!isExternalModuleNameRelative(moduleName)) { - cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); - } - } - if (traceEnabled) { - if (result.resolvedModule) { - if (result.resolvedModule.packageId) { - trace(host, Diagnostics.Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2, moduleName, result.resolvedModule.resolvedFileName, packageIdToString(result.resolvedModule.packageId)); - } else { - trace(host, Diagnostics.Module_name_0_was_successfully_resolved_to_1, moduleName, result.resolvedModule.resolvedFileName); - } - } else { - trace(host, Diagnostics.Module_name_0_was_not_resolved, moduleName); - } - } - return result; - } - function tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loader, state) { - const resolved = tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state); - if (resolved) - return resolved.value; - if (!isExternalModuleNameRelative(moduleName)) { - return tryLoadModuleUsingBaseUrl(extensions, moduleName, loader, state); - } else { - return tryLoadModuleUsingRootDirs(extensions, moduleName, containingDirectory, loader, state); - } - } - function tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state) { - var _a; - const { baseUrl, paths, configFile } = state.compilerOptions; - if (paths && !pathIsRelative(moduleName)) { - if (state.traceEnabled) { - if (baseUrl) { - trace(state.host, Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, baseUrl, moduleName); - } - trace(state.host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName); - } - const baseDirectory = getPathsBasePath(state.compilerOptions, state.host); - const pathPatterns = (configFile == null ? void 0 : configFile.configFileSpecs) ? (_a = configFile.configFileSpecs).pathPatterns || (_a.pathPatterns = tryParsePatterns(paths)) : void 0; - return tryLoadModuleUsingPaths( - extensions, - moduleName, - baseDirectory, - paths, - pathPatterns, - loader, - /*onlyRecordFailures*/ - false, - state - ); - } - } - function tryLoadModuleUsingRootDirs(extensions, moduleName, containingDirectory, loader, state) { - if (!state.compilerOptions.rootDirs) { - return void 0; - } - if (state.traceEnabled) { - trace(state.host, Diagnostics.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0, moduleName); - } - const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - let matchedRootDir; - let matchedNormalizedPrefix; - for (const rootDir of state.compilerOptions.rootDirs) { - let normalizedRoot = normalizePath(rootDir); - if (!endsWith(normalizedRoot, directorySeparator)) { - normalizedRoot += directorySeparator; - } - const isLongestMatchingPrefix = startsWith(candidate, normalizedRoot) && (matchedNormalizedPrefix === void 0 || matchedNormalizedPrefix.length < normalizedRoot.length); - if (state.traceEnabled) { - trace(state.host, Diagnostics.Checking_if_0_is_the_longest_matching_prefix_for_1_2, normalizedRoot, candidate, isLongestMatchingPrefix); - } - if (isLongestMatchingPrefix) { - matchedNormalizedPrefix = normalizedRoot; - matchedRootDir = rootDir; - } - } - if (matchedNormalizedPrefix) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Longest_matching_prefix_for_0_is_1, candidate, matchedNormalizedPrefix); - } - const suffix = candidate.substr(matchedNormalizedPrefix.length); - if (state.traceEnabled) { - trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, matchedNormalizedPrefix, candidate); - } - const resolvedFileName = loader(extensions, candidate, !directoryProbablyExists(containingDirectory, state.host), state); - if (resolvedFileName) { - return resolvedFileName; - } - if (state.traceEnabled) { - trace(state.host, Diagnostics.Trying_other_entries_in_rootDirs); - } - for (const rootDir of state.compilerOptions.rootDirs) { - if (rootDir === matchedRootDir) { - continue; - } - const candidate2 = combinePaths(normalizePath(rootDir), suffix); - if (state.traceEnabled) { - trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, rootDir, candidate2); - } - const baseDirectory = getDirectoryPath(candidate2); - const resolvedFileName2 = loader(extensions, candidate2, !directoryProbablyExists(baseDirectory, state.host), state); - if (resolvedFileName2) { - return resolvedFileName2; - } - } - if (state.traceEnabled) { - trace(state.host, Diagnostics.Module_resolution_using_rootDirs_has_failed); - } - } - return void 0; - } - function tryLoadModuleUsingBaseUrl(extensions, moduleName, loader, state) { - const { baseUrl } = state.compilerOptions; - if (!baseUrl) { - return void 0; - } - if (state.traceEnabled) { - trace(state.host, Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, baseUrl, moduleName); - } - const candidate = normalizePath(combinePaths(baseUrl, moduleName)); - if (state.traceEnabled) { - trace(state.host, Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, baseUrl, candidate); - } - return loader(extensions, candidate, !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); - } - function resolveJSModule(moduleName, initialDir, host) { - const { resolvedModule, failedLookupLocations } = tryResolveJSModuleWorker(moduleName, initialDir, host); - if (!resolvedModule) { - throw new Error(`Could not resolve JS module '${moduleName}' starting at '${initialDir}'. Looked in: ${failedLookupLocations == null ? void 0 : failedLookupLocations.join(", ")}`); - } - return resolvedModule.resolvedFileName; - } - function node16ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) { - return nodeNextModuleNameResolverWorker( - 30 /* Node16Default */, - moduleName, - containingFile, - compilerOptions, - host, - cache, - redirectedReference, - resolutionMode - ); - } - function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) { - return nodeNextModuleNameResolverWorker( - 30 /* NodeNextDefault */, - moduleName, - containingFile, - compilerOptions, - host, - cache, - redirectedReference, - resolutionMode - ); - } - function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) { - const containingDirectory = getDirectoryPath(containingFile); - const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0; - let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; - if (getResolveJsonModule(compilerOptions)) { - extensions |= 8 /* Json */; - } - return nodeModuleNameResolverWorker( - features | esmMode, - moduleName, - containingDirectory, - compilerOptions, - host, - cache, - extensions, - /*isConfigLookup*/ - false, - redirectedReference - ); - } - function tryResolveJSModuleWorker(moduleName, initialDir, host) { - return nodeModuleNameResolverWorker( - 0 /* None */, - moduleName, - initialDir, - { moduleResolution: 2 /* Node10 */, allowJs: true }, - host, - /*cache*/ - void 0, - 2 /* JavaScript */, - /*isConfigLookup*/ - false, - /*redirectedReference*/ - void 0 - ); - } - function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) { - const containingDirectory = getDirectoryPath(containingFile); - let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; - if (getResolveJsonModule(compilerOptions)) { - extensions |= 8 /* Json */; - } - return nodeModuleNameResolverWorker( - getNodeResolutionFeatures(compilerOptions), - moduleName, - containingDirectory, - compilerOptions, - host, - cache, - extensions, - /*isConfigLookup*/ - false, - redirectedReference - ); - } - function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) { - let extensions; - if (isConfigLookup) { - extensions = 8 /* Json */; - } else if (compilerOptions.noDtsResolution) { - extensions = 3 /* ImplementationFiles */; - if (getResolveJsonModule(compilerOptions)) - extensions |= 8 /* Json */; - } else { - extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; - } - return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference); - } - function nodeNextJsonConfigResolver(moduleName, containingFile, host) { - return nodeModuleNameResolverWorker( - 30 /* NodeNextDefault */, - moduleName, - getDirectoryPath(containingFile), - { moduleResolution: 99 /* NodeNext */ }, - host, - /*cache*/ - void 0, - 8 /* Json */, - /*isConfigLookup*/ - true, - /*redirectedReference*/ - void 0 - ); - } - function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) { - var _a, _b, _c, _d; - const traceEnabled = isTraceEnabled(compilerOptions, host); - const failedLookupLocations = []; - const affectingLocations = []; - const conditions = getConditions(compilerOptions, !!(features & 32 /* EsmMode */)); - const diagnostics = []; - const state = { - compilerOptions, - host, - traceEnabled, - failedLookupLocations, - affectingLocations, - packageJsonInfoCache: cache, - features, - conditions, - requestContainingDirectory: containingDirectory, - reportDiagnostic: (diag2) => void diagnostics.push(diag2), - isConfigLookup, - candidateIsFromPackageJsonField: false - }; - if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(compilerOptions))) { - trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", ")); - } - let result; - if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) { - const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); - const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); - result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0; - } else { - result = tryResolve(extensions, state); - } - let legacyResult; - if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.indexOf("import") > -1) { - traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update); - const diagnosticState = { - ...state, - features: state.features & ~8 /* Exports */, - reportDiagnostic: noop - }; - const diagnosticResult = tryResolve(extensions & (1 /* TypeScript */ | 4 /* Declaration */), diagnosticState); - if ((_b = diagnosticResult == null ? void 0 : diagnosticResult.value) == null ? void 0 : _b.isExternalLibraryImport) { - legacyResult = diagnosticResult.value.resolved.path; - } - } - return createResolvedModuleWithFailedLookupLocationsHandlingSymlink( - moduleName, - (_c = result == null ? void 0 : result.value) == null ? void 0 : _c.resolved, - (_d = result == null ? void 0 : result.value) == null ? void 0 : _d.isExternalLibraryImport, - failedLookupLocations, - affectingLocations, - diagnostics, - state, - legacyResult - ); - function tryResolve(extensions2, state2) { - const loader = (extensions3, candidate, onlyRecordFailures, state3) => nodeLoadModuleByRelativeName( - extensions3, - candidate, - onlyRecordFailures, - state3, - /*considerPackageJson*/ - true - ); - const resolved = tryLoadModuleUsingOptionalResolutionSettings(extensions2, moduleName, containingDirectory, loader, state2); - if (resolved) { - return toSearchResult({ resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) }); - } - if (!isExternalModuleNameRelative(moduleName)) { - let resolved2; - if (features & 2 /* Imports */ && startsWith(moduleName, "#")) { - resolved2 = loadModuleFromImports(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); - } - if (!resolved2 && features & 4 /* SelfName */) { - resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); - } - if (!resolved2) { - if (moduleName.indexOf(":") > -1) { - if (traceEnabled) { - trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); - } - return void 0; - } - if (traceEnabled) { - trace(host, Diagnostics.Loading_module_0_from_node_modules_folder_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); - } - resolved2 = loadModuleFromNearestNodeModulesDirectory(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); - } - if (extensions2 & 4 /* Declaration */) { - resolved2 ?? (resolved2 = resolveFromTypeRoot(moduleName, state2)); - } - return resolved2 && { value: resolved2.value && { resolved: resolved2.value, isExternalLibraryImport: true } }; - } else { - const { path: candidate, parts } = normalizePathForCJSResolution(containingDirectory, moduleName); - const resolved2 = nodeLoadModuleByRelativeName( - extensions2, - candidate, - /*onlyRecordFailures*/ - false, - state2, - /*considerPackageJson*/ - true - ); - return resolved2 && toSearchResult({ resolved: resolved2, isExternalLibraryImport: contains(parts, "node_modules") }); - } - } - } - function normalizePathForCJSResolution(containingDirectory, moduleName) { - const combined = combinePaths(containingDirectory, moduleName); - const parts = getPathComponents(combined); - const lastPart = lastOrUndefined(parts); - const path = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined); - return { path, parts }; - } - function realPath(path, host, traceEnabled) { - if (!host.realpath) { - return path; - } - const real = normalizePath(host.realpath(path)); - if (traceEnabled) { - trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real); - } - Debug.assert(host.fileExists(real), `${path} linked to nonexistent file ${real}`); - return real; - } - function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1, candidate, formatExtensions(extensions)); - } - if (!hasTrailingDirectorySeparator(candidate)) { - if (!onlyRecordFailures) { - const parentOfCandidate = getDirectoryPath(candidate); - if (!directoryProbablyExists(parentOfCandidate, state.host)) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, parentOfCandidate); - } - onlyRecordFailures = true; - } - } - const resolvedFromFile = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state); - if (resolvedFromFile) { - const packageDirectory = considerPackageJson ? parseNodeModuleFromPath(resolvedFromFile.path) : void 0; - const packageInfo = packageDirectory ? getPackageJsonInfo( - packageDirectory, - /*onlyRecordFailures*/ - false, - state - ) : void 0; - return withPackageId(packageInfo, resolvedFromFile); - } - } - if (!onlyRecordFailures) { - const candidateExists = directoryProbablyExists(candidate, state.host); - if (!candidateExists) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, candidate); - } - onlyRecordFailures = true; - } - } - if (!(state.features & 32 /* EsmMode */)) { - return loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson); - } - return void 0; - } - function pathContainsNodeModules(path) { - return stringContains(path, nodeModulesPathPart); - } - function parseNodeModuleFromPath(resolved, isFolder) { - const path = normalizePath(resolved); - const idx = path.lastIndexOf(nodeModulesPathPart); - if (idx === -1) { - return void 0; - } - const indexAfterNodeModules = idx + nodeModulesPathPart.length; - let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterNodeModules, isFolder); - if (path.charCodeAt(indexAfterNodeModules) === 64 /* at */) { - indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path, indexAfterPackageName, isFolder); - } - return path.slice(0, indexAfterPackageName); - } - function moveToNextDirectorySeparatorIfAvailable(path, prevSeparatorIndex, isFolder) { - const nextSeparatorIndex = path.indexOf(directorySeparator, prevSeparatorIndex + 1); - return nextSeparatorIndex === -1 ? isFolder ? path.length : prevSeparatorIndex : nextSeparatorIndex; - } - function loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) { - return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state)); - } - function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) { - const resolvedByReplacingExtension = loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state); - if (resolvedByReplacingExtension) { - return resolvedByReplacingExtension; - } - if (!(state.features & 32 /* EsmMode */)) { - const resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, "", onlyRecordFailures, state); - if (resolvedByAddingExtension) { - return resolvedByAddingExtension; - } - } - } - function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) { - const filename = getBaseFileName(candidate); - if (filename.indexOf(".") === -1) { - return void 0; - } - let extensionless = removeFileExtension(candidate); - if (extensionless === candidate) { - extensionless = candidate.substring(0, candidate.lastIndexOf(".")); - } - const extension = candidate.substring(extensionless.length); - if (state.traceEnabled) { - trace(state.host, Diagnostics.File_name_0_has_a_1_extension_stripping_it, candidate, extension); - } - return tryAddingExtensions(extensionless, extensions, extension, onlyRecordFailures, state); - } - function loadFileNameFromPackageJsonField(extensions, candidate, onlyRecordFailures, state) { - if (extensions & 1 /* TypeScript */ && fileExtensionIsOneOf(candidate, supportedTSImplementationExtensions) || extensions & 4 /* Declaration */ && fileExtensionIsOneOf(candidate, supportedDeclarationExtensions)) { - const result = tryFile(candidate, onlyRecordFailures, state); - return result !== void 0 ? { path: candidate, ext: tryExtractTSExtension(candidate), resolvedUsingTsExtension: void 0 } : void 0; - } - if (state.isConfigLookup && extensions === 8 /* Json */ && fileExtensionIs(candidate, ".json" /* Json */)) { - const result = tryFile(candidate, onlyRecordFailures, state); - return result !== void 0 ? { path: candidate, ext: ".json" /* Json */, resolvedUsingTsExtension: void 0 } : void 0; - } - return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state); - } - function tryAddingExtensions(candidate, extensions, originalExtension, onlyRecordFailures, state) { - if (!onlyRecordFailures) { - const directory = getDirectoryPath(candidate); - if (directory) { - onlyRecordFailures = !directoryProbablyExists(directory, state.host); - } - } - switch (originalExtension) { - case ".mjs" /* Mjs */: - case ".mts" /* Mts */: - case ".d.mts" /* Dmts */: - return extensions & 1 /* TypeScript */ && tryExtension(".mts" /* Mts */, originalExtension === ".mts" /* Mts */ || originalExtension === ".d.mts" /* Dmts */) || extensions & 4 /* Declaration */ && tryExtension(".d.mts" /* Dmts */, originalExtension === ".mts" /* Mts */ || originalExtension === ".d.mts" /* Dmts */) || extensions & 2 /* JavaScript */ && tryExtension(".mjs" /* Mjs */) || void 0; - case ".cjs" /* Cjs */: - case ".cts" /* Cts */: - case ".d.cts" /* Dcts */: - return extensions & 1 /* TypeScript */ && tryExtension(".cts" /* Cts */, originalExtension === ".cts" /* Cts */ || originalExtension === ".d.cts" /* Dcts */) || extensions & 4 /* Declaration */ && tryExtension(".d.cts" /* Dcts */, originalExtension === ".cts" /* Cts */ || originalExtension === ".d.cts" /* Dcts */) || extensions & 2 /* JavaScript */ && tryExtension(".cjs" /* Cjs */) || void 0; - case ".json" /* Json */: - return extensions & 4 /* Declaration */ && tryExtension(".d.json.ts") || extensions & 8 /* Json */ && tryExtension(".json" /* Json */) || void 0; - case ".tsx" /* Tsx */: - case ".jsx" /* Jsx */: - return extensions & 1 /* TypeScript */ && (tryExtension(".tsx" /* Tsx */, originalExtension === ".tsx" /* Tsx */) || tryExtension(".ts" /* Ts */, originalExtension === ".tsx" /* Tsx */)) || extensions & 4 /* Declaration */ && tryExtension(".d.ts" /* Dts */, originalExtension === ".tsx" /* Tsx */) || extensions & 2 /* JavaScript */ && (tryExtension(".jsx" /* Jsx */) || tryExtension(".js" /* Js */)) || void 0; - case ".ts" /* Ts */: - case ".d.ts" /* Dts */: - case ".js" /* Js */: - case "": - return extensions & 1 /* TypeScript */ && (tryExtension(".ts" /* Ts */, originalExtension === ".ts" /* Ts */ || originalExtension === ".d.ts" /* Dts */) || tryExtension(".tsx" /* Tsx */, originalExtension === ".ts" /* Ts */ || originalExtension === ".d.ts" /* Dts */)) || extensions & 4 /* Declaration */ && tryExtension(".d.ts" /* Dts */, originalExtension === ".ts" /* Ts */ || originalExtension === ".d.ts" /* Dts */) || extensions & 2 /* JavaScript */ && (tryExtension(".js" /* Js */) || tryExtension(".jsx" /* Jsx */)) || state.isConfigLookup && tryExtension(".json" /* Json */) || void 0; - default: - return extensions & 4 /* Declaration */ && !isDeclarationFileName(candidate + originalExtension) && tryExtension(`.d${originalExtension}.ts`) || void 0; - } - function tryExtension(ext, resolvedUsingTsExtension) { - const path = tryFile(candidate + ext, onlyRecordFailures, state); - return path === void 0 ? void 0 : { path, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension }; - } - } - function tryFile(fileName, onlyRecordFailures, state) { - var _a; - if (!((_a = state.compilerOptions.moduleSuffixes) == null ? void 0 : _a.length)) { - return tryFileLookup(fileName, onlyRecordFailures, state); - } - const ext = tryGetExtensionFromPath2(fileName) ?? ""; - const fileNameNoExtension = ext ? removeExtension(fileName, ext) : fileName; - return forEach(state.compilerOptions.moduleSuffixes, (suffix) => tryFileLookup(fileNameNoExtension + suffix + ext, onlyRecordFailures, state)); - } - function tryFileLookup(fileName, onlyRecordFailures, state) { - var _a; - if (!onlyRecordFailures) { - if (state.host.fileExists(fileName)) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.File_0_exists_use_it_as_a_name_resolution_result, fileName); - } - return fileName; - } else { - if (state.traceEnabled) { - trace(state.host, Diagnostics.File_0_does_not_exist, fileName); - } - } - } - (_a = state.failedLookupLocations) == null ? void 0 : _a.push(fileName); - return void 0; - } - function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson = true) { - const packageInfo = considerPackageJson ? getPackageJsonInfo(candidate, onlyRecordFailures, state) : void 0; - const packageJsonContent = packageInfo && packageInfo.contents.packageJsonContent; - const versionPaths = packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state); - return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths)); - } - function getEntrypointsFromPackageJsonInfo(packageJsonInfo, options, host, cache, resolveJs) { - if (!resolveJs && packageJsonInfo.contents.resolvedEntrypoints !== void 0) { - return packageJsonInfo.contents.resolvedEntrypoints; - } - let entrypoints; - const extensions = 1 /* TypeScript */ | 4 /* Declaration */ | (resolveJs ? 2 /* JavaScript */ : 0); - const features = getNodeResolutionFeatures(options); - const loadPackageJsonMainState = getTemporaryModuleResolutionState(cache == null ? void 0 : cache.getPackageJsonInfoCache(), host, options); - loadPackageJsonMainState.conditions = getConditions(options); - loadPackageJsonMainState.requestContainingDirectory = packageJsonInfo.packageDirectory; - const mainResolution = loadNodeModuleFromDirectoryWorker( - extensions, - packageJsonInfo.packageDirectory, - /*onlyRecordFailures*/ - false, - loadPackageJsonMainState, - packageJsonInfo.contents.packageJsonContent, - getVersionPathsOfPackageJsonInfo(packageJsonInfo, loadPackageJsonMainState) - ); - entrypoints = append(entrypoints, mainResolution == null ? void 0 : mainResolution.path); - if (features & 8 /* Exports */ && packageJsonInfo.contents.packageJsonContent.exports) { - const conditionSets = deduplicate( - [getConditions( - options, - /*esmMode*/ - true - ), getConditions( - options, - /*esmMode*/ - false - )], - arrayIsEqualTo - ); - for (const conditions of conditionSets) { - const loadPackageJsonExportsState = { ...loadPackageJsonMainState, failedLookupLocations: [], conditions, host }; - const exportResolutions = loadEntrypointsFromExportMap( - packageJsonInfo, - packageJsonInfo.contents.packageJsonContent.exports, - loadPackageJsonExportsState, - extensions - ); - if (exportResolutions) { - for (const resolution of exportResolutions) { - entrypoints = appendIfUnique(entrypoints, resolution.path); - } - } - } - } - return packageJsonInfo.contents.resolvedEntrypoints = entrypoints || false; - } - function loadEntrypointsFromExportMap(scope, exports, state, extensions) { - let entrypoints; - if (isArray(exports)) { - for (const target of exports) { - loadEntrypointsFromTargetExports(target); - } - } else if (typeof exports === "object" && exports !== null && allKeysStartWithDot(exports)) { - for (const key in exports) { - loadEntrypointsFromTargetExports(exports[key]); - } - } else { - loadEntrypointsFromTargetExports(exports); - } - return entrypoints; - function loadEntrypointsFromTargetExports(target) { - var _a, _b; - if (typeof target === "string" && startsWith(target, "./")) { - if (target.indexOf("*") >= 0 && state.host.readDirectory) { - if (target.indexOf("*") !== target.lastIndexOf("*")) { - return false; - } - state.host.readDirectory( - scope.packageDirectory, - extensionsToExtensionsArray(extensions), - /*excludes*/ - void 0, - [changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))] - ).forEach((entry) => { - entrypoints = appendIfUnique(entrypoints, { - path: entry, - ext: getAnyExtensionFromPath(entry), - resolvedUsingTsExtension: void 0 - }); - }); - } else { - const partsAfterFirst = getPathComponents(target).slice(2); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { - return false; - } - const resolvedTarget = combinePaths(scope.packageDirectory, target); - const finalPath = getNormalizedAbsolutePath(resolvedTarget, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); - const result = loadFileNameFromPackageJsonField( - extensions, - finalPath, - /*onlyRecordFailures*/ - false, - state - ); - if (result) { - entrypoints = appendIfUnique(entrypoints, result, (a, b) => a.path === b.path); - return true; - } - } - } else if (Array.isArray(target)) { - for (const t of target) { - const success = loadEntrypointsFromTargetExports(t); - if (success) { - return true; - } - } - } else if (typeof target === "object" && target !== null) { - return forEach(getOwnKeys(target), (key) => { - if (key === "default" || contains(state.conditions, key) || isApplicableVersionedTypesKey(state.conditions, key)) { - loadEntrypointsFromTargetExports(target[key]); - return true; - } - }); - } - } - } - function getTemporaryModuleResolutionState(packageJsonInfoCache, host, options) { - return { - host, - compilerOptions: options, - traceEnabled: isTraceEnabled(options, host), - failedLookupLocations: void 0, - affectingLocations: void 0, - packageJsonInfoCache, - features: 0 /* None */, - conditions: emptyArray, - requestContainingDirectory: void 0, - reportDiagnostic: noop, - isConfigLookup: false, - candidateIsFromPackageJsonField: false - }; - } - function getPackageScopeForPath(fileName, state) { - const parts = getPathComponents(fileName); - parts.pop(); - while (parts.length > 0) { - const pkg = getPackageJsonInfo( - getPathFromPathComponents(parts), - /*onlyRecordFailures*/ - false, - state - ); - if (pkg) { - return pkg; - } - parts.pop(); - } - return void 0; - } - function getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) { - if (packageJsonInfo.contents.versionPaths === void 0) { - packageJsonInfo.contents.versionPaths = readPackageJsonTypesVersionPaths(packageJsonInfo.contents.packageJsonContent, state) || false; - } - return packageJsonInfo.contents.versionPaths || void 0; - } - function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { - var _a, _b, _c, _d, _e, _f, _g, _h; - const { host, traceEnabled } = state; - const packageJsonPath = combinePaths(packageDirectory, "package.json"); - if (onlyRecordFailures) { - (_a = state.failedLookupLocations) == null ? void 0 : _a.push(packageJsonPath); - return void 0; - } - const existing = (_b = state.packageJsonInfoCache) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath); - if (existing !== void 0) { - if (typeof existing !== "boolean") { - if (traceEnabled) - trace(host, Diagnostics.File_0_exists_according_to_earlier_cached_lookups, packageJsonPath); - (_c = state.affectingLocations) == null ? void 0 : _c.push(packageJsonPath); - return existing.packageDirectory === packageDirectory ? existing : { packageDirectory, contents: existing.contents }; - } else { - if (existing && traceEnabled) - trace(host, Diagnostics.File_0_does_not_exist_according_to_earlier_cached_lookups, packageJsonPath); - (_d = state.failedLookupLocations) == null ? void 0 : _d.push(packageJsonPath); - return void 0; - } - } - const directoryExists = directoryProbablyExists(packageDirectory, host); - if (directoryExists && host.fileExists(packageJsonPath)) { - const packageJsonContent = readJson(packageJsonPath, host); - if (traceEnabled) { - trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath); - } - const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0 } }; - (_e = state.packageJsonInfoCache) == null ? void 0 : _e.setPackageJsonInfo(packageJsonPath, result); - (_f = state.affectingLocations) == null ? void 0 : _f.push(packageJsonPath); - return result; - } else { - if (directoryExists && traceEnabled) { - trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath); - } - (_g = state.packageJsonInfoCache) == null ? void 0 : _g.setPackageJsonInfo(packageJsonPath, directoryExists); - (_h = state.failedLookupLocations) == null ? void 0 : _h.push(packageJsonPath); - } - } - function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) { - let packageFile; - if (jsonContent) { - if (state.isConfigLookup) { - packageFile = readPackageJsonTSConfigField(jsonContent, candidate, state); - } else { - packageFile = extensions & 4 /* Declaration */ && readPackageJsonTypesFields(jsonContent, candidate, state) || extensions & (3 /* ImplementationFiles */ | 4 /* Declaration */) && readPackageJsonMainField(jsonContent, candidate, state) || void 0; - } - } - const loader = (extensions2, candidate2, onlyRecordFailures2, state2) => { - const fromFile = tryFile(candidate2, onlyRecordFailures2, state2); - if (fromFile) { - const resolved = resolvedIfExtensionMatches(extensions2, fromFile); - if (resolved) { - return noPackageId(resolved); - } - if (state2.traceEnabled) { - trace(state2.host, Diagnostics.File_0_has_an_unsupported_extension_so_skipping_it, fromFile); - } - } - const expandedExtensions = extensions2 === 4 /* Declaration */ ? 1 /* TypeScript */ | 4 /* Declaration */ : extensions2; - const features = state2.features; - const candidateIsFromPackageJsonField = state2.candidateIsFromPackageJsonField; - state2.candidateIsFromPackageJsonField = true; - if ((jsonContent == null ? void 0 : jsonContent.type) !== "module") { - state2.features &= ~32 /* EsmMode */; - } - const result = nodeLoadModuleByRelativeName( - expandedExtensions, - candidate2, - onlyRecordFailures2, - state2, - /*considerPackageJson*/ - false - ); - state2.features = features; - state2.candidateIsFromPackageJsonField = candidateIsFromPackageJsonField; - return result; - }; - const onlyRecordFailuresForPackageFile = packageFile ? !directoryProbablyExists(getDirectoryPath(packageFile), state.host) : void 0; - const onlyRecordFailuresForIndex = onlyRecordFailures || !directoryProbablyExists(candidate, state.host); - const indexPath = combinePaths(candidate, state.isConfigLookup ? "tsconfig" : "index"); - if (versionPaths && (!packageFile || containsPath(candidate, packageFile))) { - const moduleName = getRelativePathFromDirectory( - candidate, - packageFile || indexPath, - /*ignoreCase*/ - false - ); - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, moduleName); - } - const result = tryLoadModuleUsingPaths( - extensions, - moduleName, - candidate, - versionPaths.paths, - /*pathPatterns*/ - void 0, - loader, - onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, - state - ); - if (result) { - return removeIgnoredPackageId(result.value); - } - } - const packageFileResult = packageFile && removeIgnoredPackageId(loader(extensions, packageFile, onlyRecordFailuresForPackageFile, state)); - if (packageFileResult) - return packageFileResult; - if (!(state.features & 32 /* EsmMode */)) { - return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state); - } - } - function resolvedIfExtensionMatches(extensions, path, resolvedUsingTsExtension) { - const ext = tryGetExtensionFromPath2(path); - return ext !== void 0 && extensionIsOk(extensions, ext) ? { path, ext, resolvedUsingTsExtension } : void 0; - } - function extensionIsOk(extensions, extension) { - return extensions & 2 /* JavaScript */ && (extension === ".js" /* Js */ || extension === ".jsx" /* Jsx */ || extension === ".mjs" /* Mjs */ || extension === ".cjs" /* Cjs */) || extensions & 1 /* TypeScript */ && (extension === ".ts" /* Ts */ || extension === ".tsx" /* Tsx */ || extension === ".mts" /* Mts */ || extension === ".cts" /* Cts */) || extensions & 4 /* Declaration */ && (extension === ".d.ts" /* Dts */ || extension === ".d.mts" /* Dmts */ || extension === ".d.cts" /* Dcts */) || extensions & 8 /* Json */ && extension === ".json" /* Json */ || false; - } - function parsePackageName(moduleName) { - let idx = moduleName.indexOf(directorySeparator); - if (moduleName[0] === "@") { - idx = moduleName.indexOf(directorySeparator, idx + 1); - } - return idx === -1 ? { packageName: moduleName, rest: "" } : { packageName: moduleName.slice(0, idx), rest: moduleName.slice(idx + 1) }; - } - function allKeysStartWithDot(obj) { - return every(getOwnKeys(obj), (k) => startsWith(k, ".")); - } - function noKeyStartsWithDot(obj) { - return !some(getOwnKeys(obj), (k) => startsWith(k, ".")); - } - function loadModuleFromSelfNameReference(extensions, moduleName, directory, state, cache, redirectedReference) { - var _a, _b; - const directoryPath = getNormalizedAbsolutePath(combinePaths(directory, "dummy"), (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); - const scope = getPackageScopeForPath(directoryPath, state); - if (!scope || !scope.contents.packageJsonContent.exports) { - return void 0; - } - if (typeof scope.contents.packageJsonContent.name !== "string") { - return void 0; - } - const parts = getPathComponents(moduleName); - const nameParts = getPathComponents(scope.contents.packageJsonContent.name); - if (!every(nameParts, (p, i) => parts[i] === p)) { - return void 0; - } - const trailingParts = parts.slice(nameParts.length); - const subpath = !length(trailingParts) ? "." : `.${directorySeparator}${trailingParts.join(directorySeparator)}`; - if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) { - return loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference); - } - const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); - const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); - return loadModuleFromExports(scope, priorityExtensions, subpath, state, cache, redirectedReference) || loadModuleFromExports(scope, secondaryExtensions, subpath, state, cache, redirectedReference); - } - function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) { - if (!scope.contents.packageJsonContent.exports) { - return void 0; - } - if (subpath === ".") { - let mainExport; - if (typeof scope.contents.packageJsonContent.exports === "string" || Array.isArray(scope.contents.packageJsonContent.exports) || typeof scope.contents.packageJsonContent.exports === "object" && noKeyStartsWithDot(scope.contents.packageJsonContent.exports)) { - mainExport = scope.contents.packageJsonContent.exports; - } else if (hasProperty(scope.contents.packageJsonContent.exports, ".")) { - mainExport = scope.contents.packageJsonContent.exports["."]; - } - if (mainExport) { - const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport( - extensions, - state, - cache, - redirectedReference, - subpath, - scope, - /*isImports*/ - false - ); - return loadModuleFromTargetImportOrExport( - mainExport, - "", - /*pattern*/ - false, - "." - ); - } - } else if (allKeysStartWithDot(scope.contents.packageJsonContent.exports)) { - if (typeof scope.contents.packageJsonContent.exports !== "object") { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, subpath, scope.packageDirectory); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - const result = loadModuleFromImportsOrExports( - extensions, - state, - cache, - redirectedReference, - subpath, - scope.contents.packageJsonContent.exports, - scope, - /*isImports*/ - false - ); - if (result) { - return result; - } - } - if (state.traceEnabled) { - trace(state.host, Diagnostics.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, subpath, scope.packageDirectory); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - function loadModuleFromImports(extensions, moduleName, directory, state, cache, redirectedReference) { - var _a, _b; - if (moduleName === "#" || startsWith(moduleName, "#/")) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Invalid_import_specifier_0_has_no_possible_resolutions, moduleName); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - const directoryPath = getNormalizedAbsolutePath(combinePaths(directory, "dummy"), (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); - const scope = getPackageScopeForPath(directoryPath, state); - if (!scope) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve, directoryPath); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - if (!scope.contents.packageJsonContent.imports) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_scope_0_has_no_imports_defined, scope.packageDirectory); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - const result = loadModuleFromImportsOrExports( - extensions, - state, - cache, - redirectedReference, - moduleName, - scope.contents.packageJsonContent.imports, - scope, - /*isImports*/ - true - ); - if (result) { - return result; - } - if (state.traceEnabled) { - trace(state.host, Diagnostics.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1, moduleName, scope.packageDirectory); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - function comparePatternKeys(a, b) { - const aPatternIndex = a.indexOf("*"); - const bPatternIndex = b.indexOf("*"); - const baseLenA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; - const baseLenB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; - if (baseLenA > baseLenB) - return -1; - if (baseLenB > baseLenA) - return 1; - if (aPatternIndex === -1) - return 1; - if (bPatternIndex === -1) - return -1; - if (a.length > b.length) - return -1; - if (b.length > a.length) - return 1; - return 0; - } - function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) { - const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports); - if (!endsWith(moduleName, directorySeparator) && moduleName.indexOf("*") === -1 && hasProperty(lookupTable, moduleName)) { - const target = lookupTable[moduleName]; - return loadModuleFromTargetImportOrExport( - target, - /*subpath*/ - "", - /*pattern*/ - false, - moduleName - ); - } - const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.indexOf("*") !== -1 || endsWith(k, "/")), comparePatternKeys); - for (const potentialTarget of expandingKeys) { - if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) { - const target = lookupTable[potentialTarget]; - const starPos = potentialTarget.indexOf("*"); - const subpath = moduleName.substring(potentialTarget.substring(0, starPos).length, moduleName.length - (potentialTarget.length - 1 - starPos)); - return loadModuleFromTargetImportOrExport( - target, - subpath, - /*pattern*/ - true, - potentialTarget - ); - } else if (endsWith(potentialTarget, "*") && startsWith(moduleName, potentialTarget.substring(0, potentialTarget.length - 1))) { - const target = lookupTable[potentialTarget]; - const subpath = moduleName.substring(potentialTarget.length - 1); - return loadModuleFromTargetImportOrExport( - target, - subpath, - /*pattern*/ - true, - potentialTarget - ); - } else if (startsWith(moduleName, potentialTarget)) { - const target = lookupTable[potentialTarget]; - const subpath = moduleName.substring(potentialTarget.length); - return loadModuleFromTargetImportOrExport( - target, - subpath, - /*pattern*/ - false, - potentialTarget - ); - } - } - function matchesPatternWithTrailer(target, name) { - if (endsWith(target, "*")) - return false; - const starPos = target.indexOf("*"); - if (starPos === -1) - return false; - return startsWith(name, target.substring(0, starPos)) && endsWith(name, target.substring(starPos + 1)); - } - } - function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) { - return loadModuleFromTargetImportOrExport; - function loadModuleFromTargetImportOrExport(target, subpath, pattern, key) { - if (typeof target === "string") { - if (!pattern && subpath.length > 0 && !endsWith(target, "/")) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - if (!startsWith(target, "./")) { - if (isImports && !startsWith(target, "../") && !startsWith(target, "/") && !isRootedDiskPath(target)) { - const combinedLookup = pattern ? target.replace(/\*/g, subpath) : target + subpath; - traceIfEnabled(state, Diagnostics.Using_0_subpath_1_with_target_2, "imports", key, combinedLookup); - traceIfEnabled(state, Diagnostics.Resolving_module_0_from_1, combinedLookup, scope.packageDirectory + "/"); - const result = nodeModuleNameResolverWorker( - state.features, - combinedLookup, - scope.packageDirectory + "/", - state.compilerOptions, - state.host, - cache, - extensions, - /*isConfigLookup*/ - false, - redirectedReference - ); - return toSearchResult(result.resolvedModule ? { - path: result.resolvedModule.resolvedFileName, - extension: result.resolvedModule.extension, - packageId: result.resolvedModule.packageId, - originalPath: result.resolvedModule.originalPath, - resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension - } : void 0); - } - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target); - const partsAfterFirst = parts.slice(1); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - const resolvedTarget = combinePaths(scope.packageDirectory, target); - const subpathParts = getPathComponents(subpath); - if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - if (state.traceEnabled) { - trace( - state.host, - Diagnostics.Using_0_subpath_1_with_target_2, - isImports ? "imports" : "exports", - key, - pattern ? target.replace(/\*/g, subpath) : target + subpath - ); - } - const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath); - const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports); - if (inputLink) - return inputLink; - return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField( - extensions, - finalPath, - /*onlyRecordFailures*/ - false, - state - ))); - } else if (typeof target === "object" && target !== null) { - if (!Array.isArray(target)) { - traceIfEnabled(state, Diagnostics.Entering_conditional_exports); - for (const condition of getOwnKeys(target)) { - if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) { - traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition); - const subTarget = target[condition]; - const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key); - if (result) { - traceIfEnabled(state, Diagnostics.Resolved_under_condition_0, condition); - traceIfEnabled(state, Diagnostics.Exiting_conditional_exports); - return result; - } else { - traceIfEnabled(state, Diagnostics.Failed_to_resolve_under_condition_0, condition); - } - } else { - traceIfEnabled(state, Diagnostics.Saw_non_matching_condition_0, condition); - } - } - traceIfEnabled(state, Diagnostics.Exiting_conditional_exports); - return void 0; - } else { - if (!length(target)) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - for (const elem of target) { - const result = loadModuleFromTargetImportOrExport(elem, subpath, pattern, key); - if (result) { - return result; - } - } - } - } else if (target === null) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_scope_0_explicitly_maps_specifier_1_to_null, scope.packageDirectory, moduleName); - } - return toSearchResult( - /*value*/ - void 0 - ); - } - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); - } - return toSearchResult( - /*value*/ - void 0 - ); - function toAbsolutePath(path) { - var _a, _b; - if (path === void 0) - return path; - return getNormalizedAbsolutePath(path, (_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)); - } - function combineDirectoryPath(root, dir) { - return ensureTrailingDirectorySeparator(combinePaths(root, dir)); - } - function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { - var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { - const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); - const commonSourceDirGuesses = []; - if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { - const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [], ((_b = (_a = state.host).getCurrentDirectory) == null ? void 0 : _b.call(_a)) || "", getCanonicalFileName)); - commonSourceDirGuesses.push(commonDir); - } else if (state.requestContainingDirectory) { - const requestingFile = toAbsolutePath(combinePaths(state.requestContainingDirectory, "index.ts")); - const commonDir = toAbsolutePath(getCommonSourceDirectory(state.compilerOptions, () => [requestingFile, toAbsolutePath(packagePath)], ((_d = (_c = state.host).getCurrentDirectory) == null ? void 0 : _d.call(_c)) || "", getCanonicalFileName)); - commonSourceDirGuesses.push(commonDir); - let fragment = ensureTrailingDirectorySeparator(commonDir); - while (fragment && fragment.length > 1) { - const parts = getPathComponents(fragment); - parts.pop(); - const commonDir2 = getPathFromPathComponents(parts); - commonSourceDirGuesses.unshift(commonDir2); - fragment = ensureTrailingDirectorySeparator(commonDir2); - } - } - if (commonSourceDirGuesses.length > 1) { - state.reportDiagnostic(createCompilerDiagnostic( - isImports2 ? Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate : Diagnostics.The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate, - entry === "" ? "." : entry, - // replace empty string with `.` - the reverse of the operation done when entries are built - so main entrypoint errors don't look weird - packagePath - )); - } - for (const commonSourceDirGuess of commonSourceDirGuesses) { - const candidateDirectories = getOutputDirectoriesForBaseDirectory(commonSourceDirGuess); - for (const candidateDir of candidateDirectories) { - if (containsPath(candidateDir, finalPath, !useCaseSensitiveFileNames(state))) { - const pathFragment = finalPath.slice(candidateDir.length + 1); - const possibleInputBase = combinePaths(commonSourceDirGuess, pathFragment); - const jsAndDtsExtensions = [".mjs" /* Mjs */, ".cjs" /* Cjs */, ".js" /* Js */, ".json" /* Json */, ".d.mts" /* Dmts */, ".d.cts" /* Dcts */, ".d.ts" /* Dts */]; - for (const ext of jsAndDtsExtensions) { - if (fileExtensionIs(possibleInputBase, ext)) { - const inputExts = getPossibleOriginalInputExtensionForExtension(possibleInputBase); - for (const possibleExt of inputExts) { - if (!extensionIsOk(extensions, possibleExt)) - continue; - const possibleInputWithInputExtension = changeAnyExtension(possibleInputBase, possibleExt, ext, !useCaseSensitiveFileNames(state)); - if (state.host.fileExists(possibleInputWithInputExtension)) { - return toSearchResult(withPackageId(scope, loadFileNameFromPackageJsonField( - extensions, - possibleInputWithInputExtension, - /*onlyRecordFailures*/ - false, - state - ))); - } - } - } - } - } - } - } - } - return void 0; - function getOutputDirectoriesForBaseDirectory(commonSourceDirGuess) { - var _a2, _b2; - const currentDir = state.compilerOptions.configFile ? ((_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2)) || "" : commonSourceDirGuess; - const candidateDirectories = []; - if (state.compilerOptions.declarationDir) { - candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.declarationDir))); - } - if (state.compilerOptions.outDir && state.compilerOptions.outDir !== state.compilerOptions.declarationDir) { - candidateDirectories.push(toAbsolutePath(combineDirectoryPath(currentDir, state.compilerOptions.outDir))); - } - return candidateDirectories; - } - } - } - } - function isApplicableVersionedTypesKey(conditions, key) { - if (conditions.indexOf("types") === -1) - return false; - if (!startsWith(key, "types@")) - return false; - const range = VersionRange.tryParse(key.substring("types@".length)); - if (!range) - return false; - return range.test(version); - } - function loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, directory, state, cache, redirectedReference) { - return loadModuleFromNearestNodeModulesDirectoryWorker( - extensions, - moduleName, - directory, - state, - /*typesScopeOnly*/ - false, - cache, - redirectedReference - ); - } - function loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, directory, state) { - return loadModuleFromNearestNodeModulesDirectoryWorker( - 4 /* Declaration */, - moduleName, - directory, - state, - /*typesScopeOnly*/ - true, - /*cache*/ - void 0, - /*redirectedReference*/ - void 0 - ); - } - function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) { - const mode = state.features === 0 ? void 0 : state.features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */; - const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); - const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); - if (priorityExtensions) { - traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_preferred_extensions_Colon_0, formatExtensions(priorityExtensions)); - const result = lookup(priorityExtensions); - if (result) - return result; - } - if (secondaryExtensions && !typesScopeOnly) { - traceIfEnabled(state, Diagnostics.Searching_all_ancestor_node_modules_directories_for_fallback_extensions_Colon_0, formatExtensions(secondaryExtensions)); - return lookup(secondaryExtensions); - } - function lookup(extensions2) { - return forEachAncestorDirectory(normalizeSlashes(directory), (ancestorDirectory) => { - if (getBaseFileName(ancestorDirectory) !== "node_modules") { - const resolutionFromCache = tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, ancestorDirectory, redirectedReference, state); - if (resolutionFromCache) { - return resolutionFromCache; - } - return toSearchResult(loadModuleFromImmediateNodeModulesDirectory(extensions2, moduleName, ancestorDirectory, state, typesScopeOnly, cache, redirectedReference)); - } - }); - } - } - function loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) { - const nodeModulesFolder = combinePaths(directory, "node_modules"); - const nodeModulesFolderExists = directoryProbablyExists(nodeModulesFolder, state.host); - if (!nodeModulesFolderExists && state.traceEnabled) { - trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder); - } - if (!typesScopeOnly) { - const packageResult = loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, state, cache, redirectedReference); - if (packageResult) { - return packageResult; - } - } - if (extensions & 4 /* Declaration */) { - const nodeModulesAtTypes2 = combinePaths(nodeModulesFolder, "@types"); - let nodeModulesAtTypesExists = nodeModulesFolderExists; - if (nodeModulesFolderExists && !directoryProbablyExists(nodeModulesAtTypes2, state.host)) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesAtTypes2); - } - nodeModulesAtTypesExists = false; - } - return loadModuleFromSpecificNodeModulesDirectory(4 /* Declaration */, mangleScopedPackageNameWithTrace(moduleName, state), nodeModulesAtTypes2, nodeModulesAtTypesExists, state, cache, redirectedReference); - } - } - function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) { - var _a, _b; - const candidate = normalizePath(combinePaths(nodeModulesDirectory, moduleName)); - const { packageName, rest } = parsePackageName(moduleName); - const packageDirectory = combinePaths(nodeModulesDirectory, packageName); - let rootPackageInfo; - let packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state); - if (rest !== "" && packageInfo && (!(state.features & 8 /* Exports */) || !hasProperty(((_a = rootPackageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state)) == null ? void 0 : _a.contents.packageJsonContent) ?? emptyArray, "exports"))) { - const fromFile = loadModuleFromFile(extensions, candidate, !nodeModulesDirectoryExists, state); - if (fromFile) { - return noPackageId(fromFile); - } - const fromDirectory = loadNodeModuleFromDirectoryWorker( - extensions, - candidate, - !nodeModulesDirectoryExists, - state, - packageInfo.contents.packageJsonContent, - getVersionPathsOfPackageJsonInfo(packageInfo, state) - ); - return withPackageId(packageInfo, fromDirectory); - } - const loader = (extensions2, candidate2, onlyRecordFailures, state2) => { - let pathAndExtension = (rest || !(state2.features & 32 /* EsmMode */)) && loadModuleFromFile(extensions2, candidate2, onlyRecordFailures, state2) || loadNodeModuleFromDirectoryWorker( - extensions2, - candidate2, - onlyRecordFailures, - state2, - packageInfo && packageInfo.contents.packageJsonContent, - packageInfo && getVersionPathsOfPackageJsonInfo(packageInfo, state2) - ); - if (!pathAndExtension && packageInfo && (packageInfo.contents.packageJsonContent.exports === void 0 || packageInfo.contents.packageJsonContent.exports === null) && state2.features & 32 /* EsmMode */) { - pathAndExtension = loadModuleFromFile(extensions2, combinePaths(candidate2, "index.js"), onlyRecordFailures, state2); - } - return withPackageId(packageInfo, pathAndExtension); - }; - if (rest !== "") { - packageInfo = rootPackageInfo ?? getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state); - } - if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & 8 /* Exports */) { - return (_b = loadModuleFromExports(packageInfo, extensions, combinePaths(".", rest), state, cache, redirectedReference)) == null ? void 0 : _b.value; - } - const versionPaths = rest !== "" && packageInfo ? getVersionPathsOfPackageJsonInfo(packageInfo, state) : void 0; - if (versionPaths) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, version, rest); - } - const packageDirectoryExists = nodeModulesDirectoryExists && directoryProbablyExists(packageDirectory, state.host); - const fromPaths = tryLoadModuleUsingPaths( - extensions, - rest, - packageDirectory, - versionPaths.paths, - /*pathPatterns*/ - void 0, - loader, - !packageDirectoryExists, - state - ); - if (fromPaths) { - return fromPaths.value; - } - } - return loader(extensions, candidate, !nodeModulesDirectoryExists, state); - } - function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, pathPatterns, loader, onlyRecordFailures, state) { - pathPatterns || (pathPatterns = tryParsePatterns(paths)); - const matchedPattern = matchPatternOrExact(pathPatterns, moduleName); - if (matchedPattern) { - const matchedStar = isString(matchedPattern) ? void 0 : matchedText(matchedPattern, moduleName); - const matchedPatternText = isString(matchedPattern) ? matchedPattern : patternText(matchedPattern); - if (state.traceEnabled) { - trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText); - } - const resolved = forEach(paths[matchedPatternText], (subst) => { - const path = matchedStar ? subst.replace("*", matchedStar) : subst; - const candidate = normalizePath(combinePaths(baseDirectory, path)); - if (state.traceEnabled) { - trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path); - } - const extension = tryGetExtensionFromPath2(subst); - if (extension !== void 0) { - const path2 = tryFile(candidate, onlyRecordFailures, state); - if (path2 !== void 0) { - return noPackageId({ path: path2, ext: extension, resolvedUsingTsExtension: void 0 }); - } - } - return loader(extensions, candidate, onlyRecordFailures || !directoryProbablyExists(getDirectoryPath(candidate), state.host), state); - }); - return { value: resolved }; - } - } - function mangleScopedPackageNameWithTrace(packageName, state) { - const mangled = mangleScopedPackageName(packageName); - if (state.traceEnabled && mangled !== packageName) { - trace(state.host, Diagnostics.Scoped_package_detected_looking_in_0, mangled); - } - return mangled; - } - function getTypesPackageName(packageName) { - return `@types/${mangleScopedPackageName(packageName)}`; - } - function mangleScopedPackageName(packageName) { - if (startsWith(packageName, "@")) { - const replaceSlash = packageName.replace(directorySeparator, mangledScopedPackageSeparator); - if (replaceSlash !== packageName) { - return replaceSlash.slice(1); - } - } - return packageName; - } - function getPackageNameFromTypesPackageName(mangledName) { - const withoutAtTypePrefix = removePrefix(mangledName, "@types/"); - if (withoutAtTypePrefix !== mangledName) { - return unmangleScopedPackageName(withoutAtTypePrefix); - } - return mangledName; - } - function unmangleScopedPackageName(typesPackageName) { - return stringContains(typesPackageName, mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName; - } - function tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containingDirectory, redirectedReference, state) { - const result = cache && cache.getFromNonRelativeNameCache(moduleName, mode, containingDirectory, redirectedReference); - if (result) { - if (state.traceEnabled) { - trace(state.host, Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory); - } - state.resultFromCache = result; - return { - value: result.resolvedModule && { - path: result.resolvedModule.resolvedFileName, - originalPath: result.resolvedModule.originalPath || true, - extension: result.resolvedModule.extension, - packageId: result.resolvedModule.packageId, - resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension - } - }; - } - } - function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) { - const traceEnabled = isTraceEnabled(compilerOptions, host); - const failedLookupLocations = []; - const affectingLocations = []; - const containingDirectory = getDirectoryPath(containingFile); - const diagnostics = []; - const state = { - compilerOptions, - host, - traceEnabled, - failedLookupLocations, - affectingLocations, - packageJsonInfoCache: cache, - features: 0 /* None */, - conditions: [], - requestContainingDirectory: containingDirectory, - reportDiagnostic: (diag2) => void diagnostics.push(diag2), - isConfigLookup: false, - candidateIsFromPackageJsonField: false - }; - const resolved = tryResolve(1 /* TypeScript */ | 4 /* Declaration */) || tryResolve(2 /* JavaScript */ | (compilerOptions.resolveJsonModule ? 8 /* Json */ : 0)); - return createResolvedModuleWithFailedLookupLocationsHandlingSymlink( - moduleName, - resolved && resolved.value, - (resolved == null ? void 0 : resolved.value) && pathContainsNodeModules(resolved.value.path), - failedLookupLocations, - affectingLocations, - diagnostics, - state - ); - function tryResolve(extensions) { - const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state); - if (resolvedUsingSettings) { - return { value: resolvedUsingSettings }; - } - if (!isExternalModuleNameRelative(moduleName)) { - const resolved2 = forEachAncestorDirectory(containingDirectory, (directory) => { - const resolutionFromCache = tryFindNonRelativeModuleNameInCache( - cache, - moduleName, - /*mode*/ - void 0, - directory, - redirectedReference, - state - ); - if (resolutionFromCache) { - return resolutionFromCache; - } - const searchName = normalizePath(combinePaths(directory, moduleName)); - return toSearchResult(loadModuleFromFileNoPackageId( - extensions, - searchName, - /*onlyRecordFailures*/ - false, - state - )); - }); - if (resolved2) - return resolved2; - if (extensions & (1 /* TypeScript */ | 4 /* Declaration */)) { - let resolved3 = loadModuleFromNearestNodeModulesDirectoryTypesScope(moduleName, containingDirectory, state); - if (extensions & 4 /* Declaration */) - resolved3 ?? (resolved3 = resolveFromTypeRoot(moduleName, state)); - return resolved3; - } - } else { - const candidate = normalizePath(combinePaths(containingDirectory, moduleName)); - return toSearchResult(loadModuleFromFileNoPackageId( - extensions, - candidate, - /*onlyRecordFailures*/ - false, - state - )); - } - } - } - function resolveFromTypeRoot(moduleName, state) { - if (!state.compilerOptions.typeRoots) - return; - for (const typeRoot of state.compilerOptions.typeRoots) { - const candidate = getCandidateFromTypeRoot(typeRoot, moduleName, state); - const directoryExists = directoryProbablyExists(typeRoot, state.host); - if (!directoryExists && state.traceEnabled) { - trace(state.host, Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, typeRoot); - } - const resolvedFromFile = loadModuleFromFile(4 /* Declaration */, candidate, !directoryExists, state); - if (resolvedFromFile) { - const packageDirectory = parseNodeModuleFromPath(resolvedFromFile.path); - const packageInfo = packageDirectory ? getPackageJsonInfo( - packageDirectory, - /*onlyRecordFailures*/ - false, - state - ) : void 0; - return toSearchResult(withPackageId(packageInfo, resolvedFromFile)); - } - const resolved = loadNodeModuleFromDirectory(4 /* Declaration */, candidate, !directoryExists, state); - if (resolved) - return toSearchResult(resolved); - } - } - function shouldAllowImportingTsExtension(compilerOptions, fromFileName) { - return !!compilerOptions.allowImportingTsExtensions || fromFileName && isDeclarationFileName(fromFileName); - } - function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache, packageJsonInfoCache) { - const traceEnabled = isTraceEnabled(compilerOptions, host); - if (traceEnabled) { - trace(host, Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache); - } - const failedLookupLocations = []; - const affectingLocations = []; - const diagnostics = []; - const state = { - compilerOptions, - host, - traceEnabled, - failedLookupLocations, - affectingLocations, - packageJsonInfoCache, - features: 0 /* None */, - conditions: [], - requestContainingDirectory: void 0, - reportDiagnostic: (diag2) => void diagnostics.push(diag2), - isConfigLookup: false, - candidateIsFromPackageJsonField: false - }; - const resolved = loadModuleFromImmediateNodeModulesDirectory( - 4 /* Declaration */, - moduleName, - globalCache, - state, - /*typesScopeOnly*/ - false, - /*cache*/ - void 0, - /*redirectedReference*/ - void 0 - ); - return createResolvedModuleWithFailedLookupLocations( - resolved, - /*isExternalLibraryImport*/ - true, - failedLookupLocations, - affectingLocations, - diagnostics, - state.resultFromCache - ); - } - function toSearchResult(value) { - return value !== void 0 ? { value } : void 0; - } - function traceIfEnabled(state, diagnostic, ...args) { - if (state.traceEnabled) { - trace(state.host, diagnostic, ...args); - } - } - function useCaseSensitiveFileNames(state) { - return !state.host.useCaseSensitiveFileNames ? true : typeof state.host.useCaseSensitiveFileNames === "boolean" ? state.host.useCaseSensitiveFileNames : state.host.useCaseSensitiveFileNames(); - } - var typeScriptVersion, nodeModulesAtTypes, NodeResolutionFeatures, nodeModulesPathPart, mangledScopedPackageSeparator; - var init_moduleNameResolver = __esm({ - "src/compiler/moduleNameResolver.ts"() { - "use strict"; - init_ts2(); - nodeModulesAtTypes = combinePaths("node_modules", "@types"); - NodeResolutionFeatures = /* @__PURE__ */ ((NodeResolutionFeatures2) => { - NodeResolutionFeatures2[NodeResolutionFeatures2["None"] = 0] = "None"; - NodeResolutionFeatures2[NodeResolutionFeatures2["Imports"] = 2] = "Imports"; - NodeResolutionFeatures2[NodeResolutionFeatures2["SelfName"] = 4] = "SelfName"; - NodeResolutionFeatures2[NodeResolutionFeatures2["Exports"] = 8] = "Exports"; - NodeResolutionFeatures2[NodeResolutionFeatures2["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers"; - NodeResolutionFeatures2[NodeResolutionFeatures2["AllFeatures"] = 30] = "AllFeatures"; - NodeResolutionFeatures2[NodeResolutionFeatures2["Node16Default"] = 30] = "Node16Default"; - NodeResolutionFeatures2[NodeResolutionFeatures2["NodeNextDefault"] = 30 /* AllFeatures */] = "NodeNextDefault"; - NodeResolutionFeatures2[NodeResolutionFeatures2["BundlerDefault"] = 30] = "BundlerDefault"; - NodeResolutionFeatures2[NodeResolutionFeatures2["EsmMode"] = 32] = "EsmMode"; - return NodeResolutionFeatures2; - })(NodeResolutionFeatures || {}); - nodeModulesPathPart = "/node_modules/"; - mangledScopedPackageSeparator = "__"; - } - }); - - // src/compiler/binder.ts - function getModuleInstanceState(node, visited) { - if (node.body && !node.body.parent) { - setParent(node.body, node); - setParentRecursive( - node.body, - /*incremental*/ - false - ); - } - return node.body ? getModuleInstanceStateCached(node.body, visited) : 1 /* Instantiated */; - } - function getModuleInstanceStateCached(node, visited = /* @__PURE__ */ new Map()) { - const nodeId = getNodeId(node); - if (visited.has(nodeId)) { - return visited.get(nodeId) || 0 /* NonInstantiated */; - } - visited.set(nodeId, void 0); - const result = getModuleInstanceStateWorker(node, visited); - visited.set(nodeId, result); - return result; - } - function getModuleInstanceStateWorker(node, visited) { - switch (node.kind) { - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - return 0 /* NonInstantiated */; - case 266 /* EnumDeclaration */: - if (isEnumConst(node)) { - return 2 /* ConstEnumOnly */; - } - break; - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - if (!hasSyntacticModifier(node, 1 /* Export */)) { - return 0 /* NonInstantiated */; - } - break; - case 278 /* ExportDeclaration */: - const exportDeclaration = node; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 279 /* NamedExports */) { - let state = 0 /* NonInstantiated */; - for (const specifier of exportDeclaration.exportClause.elements) { - const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); - if (specifierState > state) { - state = specifierState; - } - if (state === 1 /* Instantiated */) { - return state; - } - } - return state; - } - break; - case 268 /* ModuleBlock */: { - let state = 0 /* NonInstantiated */; - forEachChild(node, (n) => { - const childState = getModuleInstanceStateCached(n, visited); - switch (childState) { - case 0 /* NonInstantiated */: - return; - case 2 /* ConstEnumOnly */: - state = 2 /* ConstEnumOnly */; - return; - case 1 /* Instantiated */: - state = 1 /* Instantiated */; - return true; - default: - Debug.assertNever(childState); - } - }); - return state; - } - case 267 /* ModuleDeclaration */: - return getModuleInstanceState(node, visited); - case 80 /* Identifier */: - if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { - return 0 /* NonInstantiated */; - } - } - return 1 /* Instantiated */; - } - function getModuleInstanceStateForAliasTarget(specifier, visited) { - const name = specifier.propertyName || specifier.name; - let p = specifier.parent; - while (p) { - if (isBlock(p) || isModuleBlock(p) || isSourceFile(p)) { - const statements = p.statements; - let found; - for (const statement of statements) { - if (nodeHasName(statement, name)) { - if (!statement.parent) { - setParent(statement, p); - setParentRecursive( - statement, - /*incremental*/ - false - ); - } - const state = getModuleInstanceStateCached(statement, visited); - if (found === void 0 || state > found) { - found = state; - } - if (found === 1 /* Instantiated */) { - return found; - } - if (statement.kind === 271 /* ImportEqualsDeclaration */) { - found = 1 /* Instantiated */; - } - } - } - if (found !== void 0) { - return found; - } - } - p = p.parent; - } - return 1 /* Instantiated */; - } - function initFlowNode(node) { - Debug.attachFlowNodeDebugInfo(node); - return node; - } - function bindSourceFile(file, options) { - var _a, _b; - mark("beforeBind"); - (_a = perfLogger) == null ? void 0 : _a.logStartBindFile("" + file.fileName); - binder(file, options); - (_b = perfLogger) == null ? void 0 : _b.logStopBindFile(); - mark("afterBind"); - measure("Bind", "beforeBind", "afterBind"); - } - function createBinder() { - var file; - var options; - var languageVersion; - var parent2; - var container; - var thisParentContainer; - var blockScopeContainer; - var lastContainer; - var delayedTypeAliases; - var seenThisKeyword; - var currentFlow; - var currentBreakTarget; - var currentContinueTarget; - var currentReturnTarget; - var currentTrueTarget; - var currentFalseTarget; - var currentExceptionTarget; - var preSwitchCaseFlow; - var activeLabelList; - var hasExplicitReturn; - var emitFlags; - var inStrictMode; - var inAssignmentPattern = false; - var symbolCount = 0; - var Symbol47; - var classifiableNames; - var unreachableFlow = { flags: 1 /* Unreachable */ }; - var reportedUnreachableFlow = { flags: 1 /* Unreachable */ }; - var bindBinaryExpressionFlow = createBindBinaryExpressionFlow(); - return bindSourceFile2; - function createDiagnosticForNode2(node, message, ...args) { - return createDiagnosticForNodeInSourceFile(getSourceFileOfNode(node) || file, node, message, ...args); - } - function bindSourceFile2(f, opts) { - var _a, _b; - file = f; - options = opts; - languageVersion = getEmitScriptTarget(options); - inStrictMode = bindInStrictMode(file, opts); - classifiableNames = /* @__PURE__ */ new Set(); - symbolCount = 0; - Symbol47 = objectAllocator.getSymbolConstructor(); - Debug.attachFlowNodeDebugInfo(unreachableFlow); - Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); - if (!file.locals) { - (_a = tracing) == null ? void 0 : _a.push( - tracing.Phase.Bind, - "bindSourceFile", - { path: file.path }, - /*separateBeginAndEnd*/ - true - ); - bind(file); - (_b = tracing) == null ? void 0 : _b.pop(); - file.symbolCount = symbolCount; - file.classifiableNames = classifiableNames; - delayedBindJSDocTypedefTag(); - } - file = void 0; - options = void 0; - languageVersion = void 0; - parent2 = void 0; - container = void 0; - thisParentContainer = void 0; - blockScopeContainer = void 0; - lastContainer = void 0; - delayedTypeAliases = void 0; - seenThisKeyword = false; - currentFlow = void 0; - currentBreakTarget = void 0; - currentContinueTarget = void 0; - currentReturnTarget = void 0; - currentTrueTarget = void 0; - currentFalseTarget = void 0; - currentExceptionTarget = void 0; - activeLabelList = void 0; - hasExplicitReturn = false; - inAssignmentPattern = false; - emitFlags = 0 /* None */; - } - function bindInStrictMode(file2, opts) { - if (getStrictOptionValue(opts, "alwaysStrict") && !file2.isDeclarationFile) { - return true; - } else { - return !!file2.externalModuleIndicator; - } - } - function createSymbol(flags, name) { - symbolCount++; - return new Symbol47(flags, name); - } - function addDeclarationToSymbol(symbol, node, symbolFlags) { - symbol.flags |= symbolFlags; - node.symbol = symbol; - symbol.declarations = appendIfUnique(symbol.declarations, node); - if (symbolFlags & (32 /* Class */ | 384 /* Enum */ | 1536 /* Module */ | 3 /* Variable */) && !symbol.exports) { - symbol.exports = createSymbolTable(); - } - if (symbolFlags & (32 /* Class */ | 64 /* Interface */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && !symbol.members) { - symbol.members = createSymbolTable(); - } - if (symbol.constEnumOnlyModule && symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) { - symbol.constEnumOnlyModule = false; - } - if (symbolFlags & 111551 /* Value */) { - setValueDeclaration(symbol, node); - } - } - function getDeclarationName(node) { - if (node.kind === 277 /* ExportAssignment */) { - return node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - } - const name = getNameOfDeclaration(node); - if (name) { - if (isAmbientModule(node)) { - const moduleName = getTextOfIdentifierOrLiteral(name); - return isGlobalScopeAugmentation(node) ? "__global" : `"${moduleName}"`; - } - if (name.kind === 167 /* ComputedPropertyName */) { - const nameExpression = name.expression; - if (isStringOrNumericLiteralLike(nameExpression)) { - return escapeLeadingUnderscores(nameExpression.text); - } - if (isSignedNumericLiteral(nameExpression)) { - return tokenToString(nameExpression.operator) + nameExpression.operand.text; - } else { - Debug.fail("Only computed properties with literal names have declaration names"); - } - } - if (isPrivateIdentifier(name)) { - const containingClass = getContainingClass(node); - if (!containingClass) { - return void 0; - } - const containingClassSymbol = containingClass.symbol; - return getSymbolNameForPrivateIdentifier(containingClassSymbol, name.escapedText); - } - if (isJsxNamespacedName(name)) { - return getEscapedTextOfJsxNamespacedName(name); - } - return isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; - } - switch (node.kind) { - case 176 /* Constructor */: - return "__constructor" /* Constructor */; - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 330 /* JSDocSignature */: - return "__call" /* Call */; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - return "__new" /* New */; - case 181 /* IndexSignature */: - return "__index" /* Index */; - case 278 /* ExportDeclaration */: - return "__export" /* ExportStar */; - case 312 /* SourceFile */: - return "export=" /* ExportEquals */; - case 226 /* BinaryExpression */: - if (getAssignmentDeclarationKind(node) === 2 /* ModuleExports */) { - return "export=" /* ExportEquals */; - } - Debug.fail("Unknown binary declaration kind"); - break; - case 324 /* JSDocFunctionType */: - return isJSDocConstructSignature(node) ? "__new" /* New */ : "__call" /* Call */; - case 169 /* Parameter */: - Debug.assert(node.parent.kind === 324 /* JSDocFunctionType */, "Impossible parameter parent kind", () => `parent is: ${Debug.formatSyntaxKind(node.parent.kind)}, expected JSDocFunctionType`); - const functionType = node.parent; - const index = functionType.parameters.indexOf(node); - return "arg" + index; - } - } - function getDisplayName(node) { - return isNamedDeclaration(node) ? declarationNameToString(node.name) : unescapeLeadingUnderscores(Debug.checkDefined(getDeclarationName(node))); - } - function declareSymbol(symbolTable, parent3, node, includes, excludes, isReplaceableByMethod, isComputedName) { - Debug.assert(isComputedName || !hasDynamicName(node)); - const isDefaultExport = hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default"; - const name = isComputedName ? "__computed" /* Computed */ : isDefaultExport && parent3 ? "default" /* Default */ : getDeclarationName(node); - let symbol; - if (name === void 0) { - symbol = createSymbol(0 /* None */, "__missing" /* Missing */); - } else { - symbol = symbolTable.get(name); - if (includes & 2885600 /* Classifiable */) { - classifiableNames.add(name); - } - if (!symbol) { - symbolTable.set(name, symbol = createSymbol(0 /* None */, name)); - if (isReplaceableByMethod) - symbol.isReplaceableByMethod = true; - } else if (isReplaceableByMethod && !symbol.isReplaceableByMethod) { - return symbol; - } else if (symbol.flags & excludes) { - if (symbol.isReplaceableByMethod) { - symbolTable.set(name, symbol = createSymbol(0 /* None */, name)); - } else if (!(includes & 3 /* Variable */ && symbol.flags & 67108864 /* Assignment */)) { - if (isNamedDeclaration(node)) { - setParent(node.name, node); - } - let message = symbol.flags & 2 /* BlockScopedVariable */ ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0; - let messageNeedsName = true; - if (symbol.flags & 384 /* Enum */ || includes & 384 /* Enum */) { - message = Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations; - messageNeedsName = false; - } - let multipleDefaultExports = false; - if (length(symbol.declarations)) { - if (isDefaultExport) { - message = Diagnostics.A_module_cannot_have_multiple_default_exports; - messageNeedsName = false; - multipleDefaultExports = true; - } else { - if (symbol.declarations && symbol.declarations.length && (node.kind === 277 /* ExportAssignment */ && !node.isExportEquals)) { - message = Diagnostics.A_module_cannot_have_multiple_default_exports; - messageNeedsName = false; - multipleDefaultExports = true; - } - } - } - const relatedInformation = []; - if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) { - relatedInformation.push(createDiagnosticForNode2(node, Diagnostics.Did_you_mean_0, `export type { ${unescapeLeadingUnderscores(node.name.escapedText)} }`)); - } - const declarationName = getNameOfDeclaration(node) || node; - forEach(symbol.declarations, (declaration, index) => { - const decl = getNameOfDeclaration(declaration) || declaration; - const diag3 = messageNeedsName ? createDiagnosticForNode2(decl, message, getDisplayName(declaration)) : createDiagnosticForNode2(decl, message); - file.bindDiagnostics.push( - multipleDefaultExports ? addRelatedInfo(diag3, createDiagnosticForNode2(declarationName, index === 0 ? Diagnostics.Another_export_default_is_here : Diagnostics.and_here)) : diag3 - ); - if (multipleDefaultExports) { - relatedInformation.push(createDiagnosticForNode2(decl, Diagnostics.The_first_export_default_is_here)); - } - }); - const diag2 = messageNeedsName ? createDiagnosticForNode2(declarationName, message, getDisplayName(node)) : createDiagnosticForNode2(declarationName, message); - file.bindDiagnostics.push(addRelatedInfo(diag2, ...relatedInformation)); - symbol = createSymbol(0 /* None */, name); - } - } - } - addDeclarationToSymbol(symbol, node, includes); - if (symbol.parent) { - Debug.assert(symbol.parent === parent3, "Existing symbol parent should match new one"); - } else { - symbol.parent = parent3; - } - return symbol; - } - function declareModuleMember(node, symbolFlags, symbolExcludes) { - const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); - if (symbolFlags & 2097152 /* Alias */) { - if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) { - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - } else { - Debug.assertNode(container, canHaveLocals); - return declareSymbol( - container.locals, - /*parent*/ - void 0, - node, - symbolFlags, - symbolExcludes - ); - } - } else { - if (isJSDocTypeAlias(node)) - Debug.assert(isInJSFile(node)); - if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) { - if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) { - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - } - const exportKind = symbolFlags & 111551 /* Value */ ? 1048576 /* ExportValue */ : 0; - const local = declareSymbol( - container.locals, - /*parent*/ - void 0, - node, - exportKind, - symbolExcludes - ); - local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - node.localSymbol = local; - return local; - } else { - Debug.assertNode(container, canHaveLocals); - return declareSymbol( - container.locals, - /*parent*/ - void 0, - node, - symbolFlags, - symbolExcludes - ); - } - } - } - function jsdocTreatAsExported(node) { - if (node.parent && isModuleDeclaration(node)) { - node = node.parent; - } - if (!isJSDocTypeAlias(node)) - return false; - if (!isJSDocEnumTag(node) && !!node.fullName) - return true; - const declName = getNameOfDeclaration(node); - if (!declName) - return false; - if (isPropertyAccessEntityNameExpression(declName.parent) && isTopLevelNamespaceAssignment(declName.parent)) - return true; - if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 1 /* Export */) - return true; - return false; - } - function bindContainer(node, containerFlags) { - const saveContainer = container; - const saveThisParentContainer = thisParentContainer; - const savedBlockScopeContainer = blockScopeContainer; - if (containerFlags & 1 /* IsContainer */) { - if (node.kind !== 219 /* ArrowFunction */) { - thisParentContainer = container; - } - container = blockScopeContainer = node; - if (containerFlags & 32 /* HasLocals */) { - container.locals = createSymbolTable(); - addToContainerChain(container); - } - } else if (containerFlags & 2 /* IsBlockScopedContainer */) { - blockScopeContainer = node; - if (containerFlags & 32 /* HasLocals */) { - blockScopeContainer.locals = void 0; - } - } - if (containerFlags & 4 /* IsControlFlowContainer */) { - const saveCurrentFlow = currentFlow; - const saveBreakTarget = currentBreakTarget; - const saveContinueTarget = currentContinueTarget; - const saveReturnTarget = currentReturnTarget; - const saveExceptionTarget = currentExceptionTarget; - const saveActiveLabelList = activeLabelList; - const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; - if (!isImmediatelyInvoked) { - currentFlow = initFlowNode({ flags: 2 /* Start */ }); - if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { - currentFlow.node = node; - } - } - currentReturnTarget = isImmediatelyInvoked || node.kind === 176 /* Constructor */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */) ? createBranchLabel() : void 0; - currentExceptionTarget = void 0; - currentBreakTarget = void 0; - currentContinueTarget = void 0; - activeLabelList = void 0; - hasExplicitReturn = false; - bindChildren(node); - node.flags &= ~5632 /* ReachabilityAndEmitFlags */; - if (!(currentFlow.flags & 1 /* Unreachable */) && containerFlags & 8 /* IsFunctionLike */ && nodeIsPresent(node.body)) { - node.flags |= 512 /* HasImplicitReturn */; - if (hasExplicitReturn) - node.flags |= 1024 /* HasExplicitReturn */; - node.endFlowNode = currentFlow; - } - if (node.kind === 312 /* SourceFile */) { - node.flags |= emitFlags; - node.endFlowNode = currentFlow; - } - if (currentReturnTarget) { - addAntecedent(currentReturnTarget, currentFlow); - currentFlow = finishFlowLabel(currentReturnTarget); - if (node.kind === 176 /* Constructor */ || node.kind === 175 /* ClassStaticBlockDeclaration */ || isInJSFile(node) && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { - node.returnFlowNode = currentFlow; - } - } - if (!isImmediatelyInvoked) { - currentFlow = saveCurrentFlow; - } - currentBreakTarget = saveBreakTarget; - currentContinueTarget = saveContinueTarget; - currentReturnTarget = saveReturnTarget; - currentExceptionTarget = saveExceptionTarget; - activeLabelList = saveActiveLabelList; - hasExplicitReturn = saveHasExplicitReturn; - } else if (containerFlags & 64 /* IsInterface */) { - seenThisKeyword = false; - bindChildren(node); - Debug.assertNotNode(node, isIdentifier); - node.flags = seenThisKeyword ? node.flags | 256 /* ContainsThis */ : node.flags & ~256 /* ContainsThis */; - } else { - bindChildren(node); - } - container = saveContainer; - thisParentContainer = saveThisParentContainer; - blockScopeContainer = savedBlockScopeContainer; - } - function bindEachFunctionsFirst(nodes) { - bindEach(nodes, (n) => n.kind === 262 /* FunctionDeclaration */ ? bind(n) : void 0); - bindEach(nodes, (n) => n.kind !== 262 /* FunctionDeclaration */ ? bind(n) : void 0); - } - function bindEach(nodes, bindFunction = bind) { - if (nodes === void 0) { - return; - } - forEach(nodes, bindFunction); - } - function bindEachChild(node) { - forEachChild(node, bind, bindEach); - } - function bindChildren(node) { - const saveInAssignmentPattern = inAssignmentPattern; - inAssignmentPattern = false; - if (checkUnreachable(node)) { - bindEachChild(node); - bindJSDoc(node); - inAssignmentPattern = saveInAssignmentPattern; - return; - } - if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && !options.allowUnreachableCode) { - node.flowNode = currentFlow; - } - switch (node.kind) { - case 247 /* WhileStatement */: - bindWhileStatement(node); - break; - case 246 /* DoStatement */: - bindDoStatement(node); - break; - case 248 /* ForStatement */: - bindForStatement(node); - break; - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - bindForInOrForOfStatement(node); - break; - case 245 /* IfStatement */: - bindIfStatement(node); - break; - case 253 /* ReturnStatement */: - case 257 /* ThrowStatement */: - bindReturnOrThrow(node); - break; - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: - bindBreakOrContinueStatement(node); - break; - case 258 /* TryStatement */: - bindTryStatement(node); - break; - case 255 /* SwitchStatement */: - bindSwitchStatement(node); - break; - case 269 /* CaseBlock */: - bindCaseBlock(node); - break; - case 296 /* CaseClause */: - bindCaseClause(node); - break; - case 244 /* ExpressionStatement */: - bindExpressionStatement(node); - break; - case 256 /* LabeledStatement */: - bindLabeledStatement(node); - break; - case 224 /* PrefixUnaryExpression */: - bindPrefixUnaryExpressionFlow(node); - break; - case 225 /* PostfixUnaryExpression */: - bindPostfixUnaryExpressionFlow(node); - break; - case 226 /* BinaryExpression */: - if (isDestructuringAssignment(node)) { - inAssignmentPattern = saveInAssignmentPattern; - bindDestructuringAssignmentFlow(node); - return; - } - bindBinaryExpressionFlow(node); - break; - case 220 /* DeleteExpression */: - bindDeleteExpressionFlow(node); - break; - case 227 /* ConditionalExpression */: - bindConditionalExpressionFlow(node); - break; - case 260 /* VariableDeclaration */: - bindVariableDeclarationFlow(node); - break; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - bindAccessExpressionFlow(node); - break; - case 213 /* CallExpression */: - bindCallExpressionFlow(node); - break; - case 235 /* NonNullExpression */: - bindNonNullExpressionFlow(node); - break; - case 353 /* JSDocTypedefTag */: - case 345 /* JSDocCallbackTag */: - case 347 /* JSDocEnumTag */: - bindJSDocTypeAlias(node); - break; - case 312 /* SourceFile */: { - bindEachFunctionsFirst(node.statements); - bind(node.endOfFileToken); - break; - } - case 241 /* Block */: - case 268 /* ModuleBlock */: - bindEachFunctionsFirst(node.statements); - break; - case 208 /* BindingElement */: - bindBindingElementFlow(node); - break; - case 169 /* Parameter */: - bindParameterFlow(node); - break; - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: - case 303 /* PropertyAssignment */: - case 230 /* SpreadElement */: - inAssignmentPattern = saveInAssignmentPattern; - default: - bindEachChild(node); - break; - } - bindJSDoc(node); - inAssignmentPattern = saveInAssignmentPattern; - } - function isNarrowingExpression(expr) { - switch (expr.kind) { - case 80 /* Identifier */: - case 81 /* PrivateIdentifier */: - case 110 /* ThisKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - return containsNarrowableReference(expr); - case 213 /* CallExpression */: - return hasNarrowableArgument(expr); - case 217 /* ParenthesizedExpression */: - case 235 /* NonNullExpression */: - return isNarrowingExpression(expr.expression); - case 226 /* BinaryExpression */: - return isNarrowingBinaryExpression(expr); - case 224 /* PrefixUnaryExpression */: - return expr.operator === 54 /* ExclamationToken */ && isNarrowingExpression(expr.operand); - case 221 /* TypeOfExpression */: - return isNarrowingExpression(expr.expression); - } - return false; - } - function isNarrowableReference(expr) { - return isDottedName(expr) || (isPropertyAccessExpression(expr) || isNonNullExpression(expr) || isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) || isBinaryExpression(expr) && expr.operatorToken.kind === 28 /* CommaToken */ && isNarrowableReference(expr.right) || isElementAccessExpression(expr) && (isStringOrNumericLiteralLike(expr.argumentExpression) || isEntityNameExpression(expr.argumentExpression)) && isNarrowableReference(expr.expression) || isAssignmentExpression(expr) && isNarrowableReference(expr.left); - } - function containsNarrowableReference(expr) { - return isNarrowableReference(expr) || isOptionalChain(expr) && containsNarrowableReference(expr.expression); - } - function hasNarrowableArgument(expr) { - if (expr.arguments) { - for (const argument of expr.arguments) { - if (containsNarrowableReference(argument)) { - return true; - } - } - } - if (expr.expression.kind === 211 /* PropertyAccessExpression */ && containsNarrowableReference(expr.expression.expression)) { - return true; - } - return false; - } - function isNarrowingTypeofOperands(expr1, expr2) { - return isTypeOfExpression(expr1) && isNarrowableOperand(expr1.expression) && isStringLiteralLike(expr2); - } - function isNarrowingBinaryExpression(expr) { - switch (expr.operatorToken.kind) { - case 64 /* EqualsToken */: - case 76 /* BarBarEqualsToken */: - case 77 /* AmpersandAmpersandEqualsToken */: - case 78 /* QuestionQuestionEqualsToken */: - return containsNarrowableReference(expr.left); - case 35 /* EqualsEqualsToken */: - case 36 /* ExclamationEqualsToken */: - case 37 /* EqualsEqualsEqualsToken */: - case 38 /* ExclamationEqualsEqualsToken */: - return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); - case 104 /* InstanceOfKeyword */: - return isNarrowableOperand(expr.left); - case 103 /* InKeyword */: - return isNarrowingExpression(expr.right); - case 28 /* CommaToken */: - return isNarrowingExpression(expr.right); - } - return false; - } - function isNarrowableOperand(expr) { - switch (expr.kind) { - case 217 /* ParenthesizedExpression */: - return isNarrowableOperand(expr.expression); - case 226 /* BinaryExpression */: - switch (expr.operatorToken.kind) { - case 64 /* EqualsToken */: - return isNarrowableOperand(expr.left); - case 28 /* CommaToken */: - return isNarrowableOperand(expr.right); - } - } - return containsNarrowableReference(expr); - } - function createBranchLabel() { - return initFlowNode({ flags: 4 /* BranchLabel */, antecedents: void 0 }); - } - function createLoopLabel() { - return initFlowNode({ flags: 8 /* LoopLabel */, antecedents: void 0 }); - } - function createReduceLabel(target, antecedents, antecedent) { - return initFlowNode({ flags: 1024 /* ReduceLabel */, target, antecedents, antecedent }); - } - function setFlowNodeReferenced(flow) { - flow.flags |= flow.flags & 2048 /* Referenced */ ? 4096 /* Shared */ : 2048 /* Referenced */; - } - function addAntecedent(label, antecedent) { - if (!(antecedent.flags & 1 /* Unreachable */) && !contains(label.antecedents, antecedent)) { - (label.antecedents || (label.antecedents = [])).push(antecedent); - setFlowNodeReferenced(antecedent); - } - } - function createFlowCondition(flags, antecedent, expression) { - if (antecedent.flags & 1 /* Unreachable */) { - return antecedent; - } - if (!expression) { - return flags & 32 /* TrueCondition */ ? antecedent : unreachableFlow; - } - if ((expression.kind === 112 /* TrueKeyword */ && flags & 64 /* FalseCondition */ || expression.kind === 97 /* FalseKeyword */ && flags & 32 /* TrueCondition */) && !isExpressionOfOptionalChainRoot(expression) && !isNullishCoalesce(expression.parent)) { - return unreachableFlow; - } - if (!isNarrowingExpression(expression)) { - return antecedent; - } - setFlowNodeReferenced(antecedent); - return initFlowNode({ flags, antecedent, node: expression }); - } - function createFlowSwitchClause(antecedent, switchStatement, clauseStart, clauseEnd) { - setFlowNodeReferenced(antecedent); - return initFlowNode({ flags: 128 /* SwitchClause */, antecedent, switchStatement, clauseStart, clauseEnd }); - } - function createFlowMutation(flags, antecedent, node) { - setFlowNodeReferenced(antecedent); - const result = initFlowNode({ flags, antecedent, node }); - if (currentExceptionTarget) { - addAntecedent(currentExceptionTarget, result); - } - return result; - } - function createFlowCall(antecedent, node) { - setFlowNodeReferenced(antecedent); - return initFlowNode({ flags: 512 /* Call */, antecedent, node }); - } - function finishFlowLabel(flow) { - const antecedents = flow.antecedents; - if (!antecedents) { - return unreachableFlow; - } - if (antecedents.length === 1) { - return antecedents[0]; - } - return flow; - } - function isStatementCondition(node) { - const parent3 = node.parent; - switch (parent3.kind) { - case 245 /* IfStatement */: - case 247 /* WhileStatement */: - case 246 /* DoStatement */: - return parent3.expression === node; - case 248 /* ForStatement */: - case 227 /* ConditionalExpression */: - return parent3.condition === node; - } - return false; - } - function isLogicalExpression(node) { - while (true) { - if (node.kind === 217 /* ParenthesizedExpression */) { - node = node.expression; - } else if (node.kind === 224 /* PrefixUnaryExpression */ && node.operator === 54 /* ExclamationToken */) { - node = node.operand; - } else { - return isLogicalOrCoalescingBinaryExpression(node); - } - } - } - function isLogicalAssignmentExpression(node) { - return isLogicalOrCoalescingAssignmentExpression(skipParentheses(node)); - } - function isTopLevelLogicalExpression(node) { - while (isParenthesizedExpression(node.parent) || isPrefixUnaryExpression(node.parent) && node.parent.operator === 54 /* ExclamationToken */) { - node = node.parent; - } - return !isStatementCondition(node) && !isLogicalExpression(node.parent) && !(isOptionalChain(node.parent) && node.parent.expression === node); - } - function doWithConditionalBranches(action, value, trueTarget, falseTarget) { - const savedTrueTarget = currentTrueTarget; - const savedFalseTarget = currentFalseTarget; - currentTrueTarget = trueTarget; - currentFalseTarget = falseTarget; - action(value); - currentTrueTarget = savedTrueTarget; - currentFalseTarget = savedFalseTarget; - } - function bindCondition(node, trueTarget, falseTarget) { - doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!node || !isLogicalAssignmentExpression(node) && !isLogicalExpression(node) && !(isOptionalChain(node) && isOutermostOptionalChain(node))) { - addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); - addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); - } - } - function bindIterativeStatement(node, breakTarget, continueTarget) { - const saveBreakTarget = currentBreakTarget; - const saveContinueTarget = currentContinueTarget; - currentBreakTarget = breakTarget; - currentContinueTarget = continueTarget; - bind(node); - currentBreakTarget = saveBreakTarget; - currentContinueTarget = saveContinueTarget; - } - function setContinueTarget(node, target) { - let label = activeLabelList; - while (label && node.parent.kind === 256 /* LabeledStatement */) { - label.continueTarget = target; - label = label.next; - node = node.parent; - } - return target; - } - function bindWhileStatement(node) { - const preWhileLabel = setContinueTarget(node, createLoopLabel()); - const preBodyLabel = createBranchLabel(); - const postWhileLabel = createBranchLabel(); - addAntecedent(preWhileLabel, currentFlow); - currentFlow = preWhileLabel; - bindCondition(node.expression, preBodyLabel, postWhileLabel); - currentFlow = finishFlowLabel(preBodyLabel); - bindIterativeStatement(node.statement, postWhileLabel, preWhileLabel); - addAntecedent(preWhileLabel, currentFlow); - currentFlow = finishFlowLabel(postWhileLabel); - } - function bindDoStatement(node) { - const preDoLabel = createLoopLabel(); - const preConditionLabel = setContinueTarget(node, createBranchLabel()); - const postDoLabel = createBranchLabel(); - addAntecedent(preDoLabel, currentFlow); - currentFlow = preDoLabel; - bindIterativeStatement(node.statement, postDoLabel, preConditionLabel); - addAntecedent(preConditionLabel, currentFlow); - currentFlow = finishFlowLabel(preConditionLabel); - bindCondition(node.expression, preDoLabel, postDoLabel); - currentFlow = finishFlowLabel(postDoLabel); - } - function bindForStatement(node) { - const preLoopLabel = setContinueTarget(node, createLoopLabel()); - const preBodyLabel = createBranchLabel(); - const postLoopLabel = createBranchLabel(); - bind(node.initializer); - addAntecedent(preLoopLabel, currentFlow); - currentFlow = preLoopLabel; - bindCondition(node.condition, preBodyLabel, postLoopLabel); - currentFlow = finishFlowLabel(preBodyLabel); - bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); - bind(node.incrementor); - addAntecedent(preLoopLabel, currentFlow); - currentFlow = finishFlowLabel(postLoopLabel); - } - function bindForInOrForOfStatement(node) { - const preLoopLabel = setContinueTarget(node, createLoopLabel()); - const postLoopLabel = createBranchLabel(); - bind(node.expression); - addAntecedent(preLoopLabel, currentFlow); - currentFlow = preLoopLabel; - if (node.kind === 250 /* ForOfStatement */) { - bind(node.awaitModifier); - } - addAntecedent(postLoopLabel, currentFlow); - bind(node.initializer); - if (node.initializer.kind !== 261 /* VariableDeclarationList */) { - bindAssignmentTargetFlow(node.initializer); - } - bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel); - addAntecedent(preLoopLabel, currentFlow); - currentFlow = finishFlowLabel(postLoopLabel); - } - function bindIfStatement(node) { - const thenLabel = createBranchLabel(); - const elseLabel = createBranchLabel(); - const postIfLabel = createBranchLabel(); - bindCondition(node.expression, thenLabel, elseLabel); - currentFlow = finishFlowLabel(thenLabel); - bind(node.thenStatement); - addAntecedent(postIfLabel, currentFlow); - currentFlow = finishFlowLabel(elseLabel); - bind(node.elseStatement); - addAntecedent(postIfLabel, currentFlow); - currentFlow = finishFlowLabel(postIfLabel); - } - function bindReturnOrThrow(node) { - bind(node.expression); - if (node.kind === 253 /* ReturnStatement */) { - hasExplicitReturn = true; - if (currentReturnTarget) { - addAntecedent(currentReturnTarget, currentFlow); - } - } - currentFlow = unreachableFlow; - } - function findActiveLabel(name) { - for (let label = activeLabelList; label; label = label.next) { - if (label.name === name) { - return label; - } - } - return void 0; - } - function bindBreakOrContinueFlow(node, breakTarget, continueTarget) { - const flowLabel = node.kind === 252 /* BreakStatement */ ? breakTarget : continueTarget; - if (flowLabel) { - addAntecedent(flowLabel, currentFlow); - currentFlow = unreachableFlow; - } - } - function bindBreakOrContinueStatement(node) { - bind(node.label); - if (node.label) { - const activeLabel = findActiveLabel(node.label.escapedText); - if (activeLabel) { - activeLabel.referenced = true; - bindBreakOrContinueFlow(node, activeLabel.breakTarget, activeLabel.continueTarget); - } - } else { - bindBreakOrContinueFlow(node, currentBreakTarget, currentContinueTarget); - } - } - function bindTryStatement(node) { - const saveReturnTarget = currentReturnTarget; - const saveExceptionTarget = currentExceptionTarget; - const normalExitLabel = createBranchLabel(); - const returnLabel = createBranchLabel(); - let exceptionLabel = createBranchLabel(); - if (node.finallyBlock) { - currentReturnTarget = returnLabel; - } - addAntecedent(exceptionLabel, currentFlow); - currentExceptionTarget = exceptionLabel; - bind(node.tryBlock); - addAntecedent(normalExitLabel, currentFlow); - if (node.catchClause) { - currentFlow = finishFlowLabel(exceptionLabel); - exceptionLabel = createBranchLabel(); - addAntecedent(exceptionLabel, currentFlow); - currentExceptionTarget = exceptionLabel; - bind(node.catchClause); - addAntecedent(normalExitLabel, currentFlow); - } - currentReturnTarget = saveReturnTarget; - currentExceptionTarget = saveExceptionTarget; - if (node.finallyBlock) { - const finallyLabel = createBranchLabel(); - finallyLabel.antecedents = concatenate(concatenate(normalExitLabel.antecedents, exceptionLabel.antecedents), returnLabel.antecedents); - currentFlow = finallyLabel; - bind(node.finallyBlock); - if (currentFlow.flags & 1 /* Unreachable */) { - currentFlow = unreachableFlow; - } else { - if (currentReturnTarget && returnLabel.antecedents) { - addAntecedent(currentReturnTarget, createReduceLabel(finallyLabel, returnLabel.antecedents, currentFlow)); - } - if (currentExceptionTarget && exceptionLabel.antecedents) { - addAntecedent(currentExceptionTarget, createReduceLabel(finallyLabel, exceptionLabel.antecedents, currentFlow)); - } - currentFlow = normalExitLabel.antecedents ? createReduceLabel(finallyLabel, normalExitLabel.antecedents, currentFlow) : unreachableFlow; - } - } else { - currentFlow = finishFlowLabel(normalExitLabel); - } - } - function bindSwitchStatement(node) { - const postSwitchLabel = createBranchLabel(); - bind(node.expression); - const saveBreakTarget = currentBreakTarget; - const savePreSwitchCaseFlow = preSwitchCaseFlow; - currentBreakTarget = postSwitchLabel; - preSwitchCaseFlow = currentFlow; - bind(node.caseBlock); - addAntecedent(postSwitchLabel, currentFlow); - const hasDefault = forEach(node.caseBlock.clauses, (c) => c.kind === 297 /* DefaultClause */); - node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents; - if (!hasDefault) { - addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0)); - } - currentBreakTarget = saveBreakTarget; - preSwitchCaseFlow = savePreSwitchCaseFlow; - currentFlow = finishFlowLabel(postSwitchLabel); - } - function bindCaseBlock(node) { - const clauses = node.clauses; - const isNarrowingSwitch = isNarrowingExpression(node.parent.expression); - let fallthroughFlow = unreachableFlow; - for (let i = 0; i < clauses.length; i++) { - const clauseStart = i; - while (!clauses[i].statements.length && i + 1 < clauses.length) { - bind(clauses[i]); - i++; - } - const preCaseLabel = createBranchLabel(); - addAntecedent(preCaseLabel, isNarrowingSwitch ? createFlowSwitchClause(preSwitchCaseFlow, node.parent, clauseStart, i + 1) : preSwitchCaseFlow); - addAntecedent(preCaseLabel, fallthroughFlow); - currentFlow = finishFlowLabel(preCaseLabel); - const clause = clauses[i]; - bind(clause); - fallthroughFlow = currentFlow; - if (!(currentFlow.flags & 1 /* Unreachable */) && i !== clauses.length - 1 && options.noFallthroughCasesInSwitch) { - clause.fallthroughFlowNode = currentFlow; - } - } - } - function bindCaseClause(node) { - const saveCurrentFlow = currentFlow; - currentFlow = preSwitchCaseFlow; - bind(node.expression); - currentFlow = saveCurrentFlow; - bindEach(node.statements); - } - function bindExpressionStatement(node) { - bind(node.expression); - maybeBindExpressionFlowIfCall(node.expression); - } - function maybeBindExpressionFlowIfCall(node) { - if (node.kind === 213 /* CallExpression */) { - const call = node; - if (call.expression.kind !== 108 /* SuperKeyword */ && isDottedName(call.expression)) { - currentFlow = createFlowCall(currentFlow, call); - } - } - } - function bindLabeledStatement(node) { - const postStatementLabel = createBranchLabel(); - activeLabelList = { - next: activeLabelList, - name: node.label.escapedText, - breakTarget: postStatementLabel, - continueTarget: void 0, - referenced: false - }; - bind(node.label); - bind(node.statement); - if (!activeLabelList.referenced && !options.allowUnusedLabels) { - errorOrSuggestionOnNode(unusedLabelIsError(options), node.label, Diagnostics.Unused_label); - } - activeLabelList = activeLabelList.next; - addAntecedent(postStatementLabel, currentFlow); - currentFlow = finishFlowLabel(postStatementLabel); - } - function bindDestructuringTargetFlow(node) { - if (node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */) { - bindAssignmentTargetFlow(node.left); - } else { - bindAssignmentTargetFlow(node); - } - } - function bindAssignmentTargetFlow(node) { - if (isNarrowableReference(node)) { - currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } else if (node.kind === 209 /* ArrayLiteralExpression */) { - for (const e of node.elements) { - if (e.kind === 230 /* SpreadElement */) { - bindAssignmentTargetFlow(e.expression); - } else { - bindDestructuringTargetFlow(e); - } - } - } else if (node.kind === 210 /* ObjectLiteralExpression */) { - for (const p of node.properties) { - if (p.kind === 303 /* PropertyAssignment */) { - bindDestructuringTargetFlow(p.initializer); - } else if (p.kind === 304 /* ShorthandPropertyAssignment */) { - bindAssignmentTargetFlow(p.name); - } else if (p.kind === 305 /* SpreadAssignment */) { - bindAssignmentTargetFlow(p.expression); - } - } - } - } - function bindLogicalLikeExpression(node, trueTarget, falseTarget) { - const preRightLabel = createBranchLabel(); - if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ || node.operatorToken.kind === 77 /* AmpersandAmpersandEqualsToken */) { - bindCondition(node.left, preRightLabel, falseTarget); - } else { - bindCondition(node.left, trueTarget, preRightLabel); - } - currentFlow = finishFlowLabel(preRightLabel); - bind(node.operatorToken); - if (isLogicalOrCoalescingAssignmentOperator(node.operatorToken.kind)) { - doWithConditionalBranches(bind, node.right, trueTarget, falseTarget); - bindAssignmentTargetFlow(node.left); - addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); - addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); - } else { - bindCondition(node.right, trueTarget, falseTarget); - } - } - function bindPrefixUnaryExpressionFlow(node) { - if (node.operator === 54 /* ExclamationToken */) { - const saveTrueTarget = currentTrueTarget; - currentTrueTarget = currentFalseTarget; - currentFalseTarget = saveTrueTarget; - bindEachChild(node); - currentFalseTarget = currentTrueTarget; - currentTrueTarget = saveTrueTarget; - } else { - bindEachChild(node); - if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) { - bindAssignmentTargetFlow(node.operand); - } - } - } - function bindPostfixUnaryExpressionFlow(node) { - bindEachChild(node); - if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) { - bindAssignmentTargetFlow(node.operand); - } - } - function bindDestructuringAssignmentFlow(node) { - if (inAssignmentPattern) { - inAssignmentPattern = false; - bind(node.operatorToken); - bind(node.right); - inAssignmentPattern = true; - bind(node.left); - } else { - inAssignmentPattern = true; - bind(node.left); - inAssignmentPattern = false; - bind(node.operatorToken); - bind(node.right); - } - bindAssignmentTargetFlow(node.left); - } - function createBindBinaryExpressionFlow() { - return createBinaryExpressionTrampoline( - onEnter, - onLeft, - onOperator, - onRight, - onExit, - /*foldState*/ - void 0 - ); - function onEnter(node, state) { - if (state) { - state.stackIndex++; - setParent(node, parent2); - const saveInStrictMode = inStrictMode; - bindWorker(node); - const saveParent = parent2; - parent2 = node; - state.skip = false; - state.inStrictModeStack[state.stackIndex] = saveInStrictMode; - state.parentStack[state.stackIndex] = saveParent; - } else { - state = { - stackIndex: 0, - skip: false, - inStrictModeStack: [void 0], - parentStack: [void 0] - }; - } - const operator = node.operatorToken.kind; - if (isLogicalOrCoalescingBinaryOperator(operator) || isLogicalOrCoalescingAssignmentOperator(operator)) { - if (isTopLevelLogicalExpression(node)) { - const postExpressionLabel = createBranchLabel(); - bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel); - currentFlow = finishFlowLabel(postExpressionLabel); - } else { - bindLogicalLikeExpression(node, currentTrueTarget, currentFalseTarget); - } - state.skip = true; - } - return state; - } - function onLeft(left, state, node) { - if (!state.skip) { - const maybeBound = maybeBind2(left); - if (node.operatorToken.kind === 28 /* CommaToken */) { - maybeBindExpressionFlowIfCall(left); - } - return maybeBound; - } - } - function onOperator(operatorToken, state, _node) { - if (!state.skip) { - bind(operatorToken); - } - } - function onRight(right, state, node) { - if (!state.skip) { - const maybeBound = maybeBind2(right); - if (node.operatorToken.kind === 28 /* CommaToken */) { - maybeBindExpressionFlowIfCall(right); - } - return maybeBound; - } - } - function onExit(node, state) { - if (!state.skip) { - const operator = node.operatorToken.kind; - if (isAssignmentOperator(operator) && !isAssignmentTarget(node)) { - bindAssignmentTargetFlow(node.left); - if (operator === 64 /* EqualsToken */ && node.left.kind === 212 /* ElementAccessExpression */) { - const elementAccess = node.left; - if (isNarrowableOperand(elementAccess.expression)) { - currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); - } - } - } - } - const savedInStrictMode = state.inStrictModeStack[state.stackIndex]; - const savedParent = state.parentStack[state.stackIndex]; - if (savedInStrictMode !== void 0) { - inStrictMode = savedInStrictMode; - } - if (savedParent !== void 0) { - parent2 = savedParent; - } - state.skip = false; - state.stackIndex--; - } - function maybeBind2(node) { - if (node && isBinaryExpression(node) && !isDestructuringAssignment(node)) { - return node; - } - bind(node); - } - } - function bindDeleteExpressionFlow(node) { - bindEachChild(node); - if (node.expression.kind === 211 /* PropertyAccessExpression */) { - bindAssignmentTargetFlow(node.expression); - } - } - function bindConditionalExpressionFlow(node) { - const trueLabel = createBranchLabel(); - const falseLabel = createBranchLabel(); - const postExpressionLabel = createBranchLabel(); - bindCondition(node.condition, trueLabel, falseLabel); - currentFlow = finishFlowLabel(trueLabel); - bind(node.questionToken); - bind(node.whenTrue); - addAntecedent(postExpressionLabel, currentFlow); - currentFlow = finishFlowLabel(falseLabel); - bind(node.colonToken); - bind(node.whenFalse); - addAntecedent(postExpressionLabel, currentFlow); - currentFlow = finishFlowLabel(postExpressionLabel); - } - function bindInitializedVariableFlow(node) { - const name = !isOmittedExpression(node) ? node.name : void 0; - if (isBindingPattern(name)) { - for (const child of name.elements) { - bindInitializedVariableFlow(child); - } - } else { - currentFlow = createFlowMutation(16 /* Assignment */, currentFlow, node); - } - } - function bindVariableDeclarationFlow(node) { - bindEachChild(node); - if (node.initializer || isForInOrOfStatement(node.parent.parent)) { - bindInitializedVariableFlow(node); - } - } - function bindBindingElementFlow(node) { - bind(node.dotDotDotToken); - bind(node.propertyName); - bindInitializer(node.initializer); - bind(node.name); - } - function bindParameterFlow(node) { - bindEach(node.modifiers); - bind(node.dotDotDotToken); - bind(node.questionToken); - bind(node.type); - bindInitializer(node.initializer); - bind(node.name); - } - function bindInitializer(node) { - if (!node) { - return; - } - const entryFlow = currentFlow; - bind(node); - if (entryFlow === unreachableFlow || entryFlow === currentFlow) { - return; - } - const exitFlow = createBranchLabel(); - addAntecedent(exitFlow, entryFlow); - addAntecedent(exitFlow, currentFlow); - currentFlow = finishFlowLabel(exitFlow); - } - function bindJSDocTypeAlias(node) { - bind(node.tagName); - if (node.kind !== 347 /* JSDocEnumTag */ && node.fullName) { - setParent(node.fullName, node); - setParentRecursive( - node.fullName, - /*incremental*/ - false - ); - } - if (typeof node.comment !== "string") { - bindEach(node.comment); - } - } - function bindJSDocClassTag(node) { - bindEachChild(node); - const host = getHostSignatureFromJSDoc(node); - if (host && host.kind !== 174 /* MethodDeclaration */) { - addDeclarationToSymbol(host.symbol, host, 32 /* Class */); - } - } - function bindOptionalExpression(node, trueTarget, falseTarget) { - doWithConditionalBranches(bind, node, trueTarget, falseTarget); - if (!isOptionalChain(node) || isOutermostOptionalChain(node)) { - addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); - addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); - } - } - function bindOptionalChainRest(node) { - switch (node.kind) { - case 211 /* PropertyAccessExpression */: - bind(node.questionDotToken); - bind(node.name); - break; - case 212 /* ElementAccessExpression */: - bind(node.questionDotToken); - bind(node.argumentExpression); - break; - case 213 /* CallExpression */: - bind(node.questionDotToken); - bindEach(node.typeArguments); - bindEach(node.arguments); - break; - } - } - function bindOptionalChain(node, trueTarget, falseTarget) { - const preChainLabel = isOptionalChainRoot(node) ? createBranchLabel() : void 0; - bindOptionalExpression(node.expression, preChainLabel || trueTarget, falseTarget); - if (preChainLabel) { - currentFlow = finishFlowLabel(preChainLabel); - } - doWithConditionalBranches(bindOptionalChainRest, node, trueTarget, falseTarget); - if (isOutermostOptionalChain(node)) { - addAntecedent(trueTarget, createFlowCondition(32 /* TrueCondition */, currentFlow, node)); - addAntecedent(falseTarget, createFlowCondition(64 /* FalseCondition */, currentFlow, node)); - } - } - function bindOptionalChainFlow(node) { - if (isTopLevelLogicalExpression(node)) { - const postExpressionLabel = createBranchLabel(); - bindOptionalChain(node, postExpressionLabel, postExpressionLabel); - currentFlow = finishFlowLabel(postExpressionLabel); - } else { - bindOptionalChain(node, currentTrueTarget, currentFalseTarget); - } - } - function bindNonNullExpressionFlow(node) { - if (isOptionalChain(node)) { - bindOptionalChainFlow(node); - } else { - bindEachChild(node); - } - } - function bindAccessExpressionFlow(node) { - if (isOptionalChain(node)) { - bindOptionalChainFlow(node); - } else { - bindEachChild(node); - } - } - function bindCallExpressionFlow(node) { - if (isOptionalChain(node)) { - bindOptionalChainFlow(node); - } else { - const expr = skipParentheses(node.expression); - if (expr.kind === 218 /* FunctionExpression */ || expr.kind === 219 /* ArrowFunction */) { - bindEach(node.typeArguments); - bindEach(node.arguments); - bind(node.expression); - } else { - bindEachChild(node); - if (node.expression.kind === 108 /* SuperKeyword */) { - currentFlow = createFlowCall(currentFlow, node); - } - } - } - if (node.expression.kind === 211 /* PropertyAccessExpression */) { - const propertyAccess = node.expression; - if (isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && isPushOrUnshiftIdentifier(propertyAccess.name)) { - currentFlow = createFlowMutation(256 /* ArrayMutation */, currentFlow, node); - } - } - } - function addToContainerChain(next) { - if (lastContainer) { - lastContainer.nextContainer = next; - } - lastContainer = next; - } - function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { - switch (container.kind) { - case 267 /* ModuleDeclaration */: - return declareModuleMember(node, symbolFlags, symbolExcludes); - case 312 /* SourceFile */: - return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 231 /* ClassExpression */: - case 263 /* ClassDeclaration */: - return declareClassMember(node, symbolFlags, symbolExcludes); - case 266 /* EnumDeclaration */: - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 187 /* TypeLiteral */: - case 329 /* JSDocTypeLiteral */: - case 210 /* ObjectLiteralExpression */: - case 264 /* InterfaceDeclaration */: - case 292 /* JsxAttributes */: - return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 330 /* JSDocSignature */: - case 181 /* IndexSignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 324 /* JSDocFunctionType */: - case 175 /* ClassStaticBlockDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 200 /* MappedType */: - if (container.locals) - Debug.assertNode(container, canHaveLocals); - return declareSymbol( - container.locals, - /*parent*/ - void 0, - node, - symbolFlags, - symbolExcludes - ); - } - } - function declareClassMember(node, symbolFlags, symbolExcludes) { - return isStatic(node) ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - } - function declareSourceFileMember(node, symbolFlags, symbolExcludes) { - return isExternalModule(file) ? declareModuleMember(node, symbolFlags, symbolExcludes) : declareSymbol( - file.locals, - /*parent*/ - void 0, - node, - symbolFlags, - symbolExcludes - ); - } - function hasExportDeclarations(node) { - const body = isSourceFile(node) ? node : tryCast(node.body, isModuleBlock); - return !!body && body.statements.some((s) => isExportDeclaration(s) || isExportAssignment(s)); - } - function setExportContextFlag(node) { - if (node.flags & 33554432 /* Ambient */ && !hasExportDeclarations(node)) { - node.flags |= 128 /* ExportContext */; - } else { - node.flags &= ~128 /* ExportContext */; - } - } - function bindModuleDeclaration(node) { - setExportContextFlag(node); - if (isAmbientModule(node)) { - if (hasSyntacticModifier(node, 1 /* Export */)) { - errorOnFirstToken(node, Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); - } - if (isModuleAugmentationExternal(node)) { - declareModuleSymbol(node); - } else { - let pattern; - if (node.name.kind === 11 /* StringLiteral */) { - const { text } = node.name; - pattern = tryParsePattern(text); - if (pattern === void 0) { - errorOnFirstToken(node.name, Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character, text); - } - } - const symbol = declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 110735 /* ValueModuleExcludes */); - file.patternAmbientModules = append(file.patternAmbientModules, pattern && !isString(pattern) ? { pattern, symbol } : void 0); - } - } else { - const state = declareModuleSymbol(node); - if (state !== 0 /* NonInstantiated */) { - const { symbol } = node; - symbol.constEnumOnlyModule = !(symbol.flags & (16 /* Function */ | 32 /* Class */ | 256 /* RegularEnum */)) && state === 2 /* ConstEnumOnly */ && symbol.constEnumOnlyModule !== false; - } - } - } - function declareModuleSymbol(node) { - const state = getModuleInstanceState(node); - const instantiated = state !== 0 /* NonInstantiated */; - declareSymbolAndAddToSymbolTable( - node, - instantiated ? 512 /* ValueModule */ : 1024 /* NamespaceModule */, - instantiated ? 110735 /* ValueModuleExcludes */ : 0 /* NamespaceModuleExcludes */ - ); - return state; - } - function bindFunctionOrConstructorType(node) { - const symbol = createSymbol(131072 /* Signature */, getDeclarationName(node)); - addDeclarationToSymbol(symbol, node, 131072 /* Signature */); - const typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */); - addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */); - typeLiteralSymbol.members = createSymbolTable(); - typeLiteralSymbol.members.set(symbol.escapedName, symbol); - } - function bindObjectLiteralExpression(node) { - return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__object" /* Object */); - } - function bindJsxAttributes(node) { - return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__jsxAttributes" /* JSXAttributes */); - } - function bindJsxAttribute(node, symbolFlags, symbolExcludes) { - return declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); - } - function bindAnonymousDeclaration(node, symbolFlags, name) { - const symbol = createSymbol(symbolFlags, name); - if (symbolFlags & (8 /* EnumMember */ | 106500 /* ClassMember */)) { - symbol.parent = container.symbol; - } - addDeclarationToSymbol(symbol, node, symbolFlags); - return symbol; - } - function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { - switch (blockScopeContainer.kind) { - case 267 /* ModuleDeclaration */: - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - case 312 /* SourceFile */: - if (isExternalOrCommonJsModule(container)) { - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - } - default: - Debug.assertNode(blockScopeContainer, canHaveLocals); - if (!blockScopeContainer.locals) { - blockScopeContainer.locals = createSymbolTable(); - addToContainerChain(blockScopeContainer); - } - declareSymbol( - blockScopeContainer.locals, - /*parent*/ - void 0, - node, - symbolFlags, - symbolExcludes - ); - } - } - function delayedBindJSDocTypedefTag() { - if (!delayedTypeAliases) { - return; - } - const saveContainer = container; - const saveLastContainer = lastContainer; - const saveBlockScopeContainer = blockScopeContainer; - const saveParent = parent2; - const saveCurrentFlow = currentFlow; - for (const typeAlias of delayedTypeAliases) { - const host = typeAlias.parent.parent; - container = getEnclosingContainer(host) || file; - blockScopeContainer = getEnclosingBlockScopeContainer(host) || file; - currentFlow = initFlowNode({ flags: 2 /* Start */ }); - parent2 = typeAlias; - bind(typeAlias.typeExpression); - const declName = getNameOfDeclaration(typeAlias); - if ((isJSDocEnumTag(typeAlias) || !typeAlias.fullName) && declName && isPropertyAccessEntityNameExpression(declName.parent)) { - const isTopLevel = isTopLevelNamespaceAssignment(declName.parent); - if (isTopLevel) { - bindPotentiallyMissingNamespaces( - file.symbol, - declName.parent, - isTopLevel, - !!findAncestor(declName, (d) => isPropertyAccessExpression(d) && d.name.escapedText === "prototype"), - /*containerIsClass*/ - false - ); - const oldContainer = container; - switch (getAssignmentDeclarationPropertyAccessKind(declName.parent)) { - case 1 /* ExportsProperty */: - case 2 /* ModuleExports */: - if (!isExternalOrCommonJsModule(file)) { - container = void 0; - } else { - container = file; - } - break; - case 4 /* ThisProperty */: - container = declName.parent.expression; - break; - case 3 /* PrototypeProperty */: - container = declName.parent.expression.name; - break; - case 5 /* Property */: - container = isExportsOrModuleExportsOrAlias(file, declName.parent.expression) ? file : isPropertyAccessExpression(declName.parent.expression) ? declName.parent.expression.name : declName.parent.expression; - break; - case 0 /* None */: - return Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration"); - } - if (container) { - declareModuleMember(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - } - container = oldContainer; - } - } else if (isJSDocEnumTag(typeAlias) || !typeAlias.fullName || typeAlias.fullName.kind === 80 /* Identifier */) { - parent2 = typeAlias.parent; - bindBlockScopedDeclaration(typeAlias, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - } else { - bind(typeAlias.fullName); - } - } - container = saveContainer; - lastContainer = saveLastContainer; - blockScopeContainer = saveBlockScopeContainer; - parent2 = saveParent; - currentFlow = saveCurrentFlow; - } - function checkContextualIdentifier(node) { - if (!file.parseDiagnostics.length && !(node.flags & 33554432 /* Ambient */) && !(node.flags & 16777216 /* JSDoc */) && !isIdentifierName(node)) { - const originalKeywordKind = identifierToKeywordKind(node); - if (originalKeywordKind === void 0) { - return; - } - if (inStrictMode && originalKeywordKind >= 119 /* FirstFutureReservedWord */ && originalKeywordKind <= 127 /* LastFutureReservedWord */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - getStrictModeIdentifierMessage(node), - declarationNameToString(node) - )); - } else if (originalKeywordKind === 135 /* AwaitKeyword */) { - if (isExternalModule(file) && isInTopLevelContext(node)) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, - declarationNameToString(node) - )); - } else if (node.flags & 65536 /* AwaitContext */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, - declarationNameToString(node) - )); - } - } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 16384 /* YieldContext */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, - declarationNameToString(node) - )); - } - } - } - function getStrictModeIdentifierMessage(node) { - if (getContainingClass(node)) { - return Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode; - } - if (file.externalModuleIndicator) { - return Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode; - } - return Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode; - } - function checkPrivateIdentifier(node) { - if (node.escapedText === "#constructor") { - if (!file.parseDiagnostics.length) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.constructor_is_a_reserved_word, - declarationNameToString(node) - )); - } - } - } - function checkStrictModeBinaryExpression(node) { - if (inStrictMode && isLeftHandSideExpression(node.left) && isAssignmentOperator(node.operatorToken.kind)) { - checkStrictModeEvalOrArguments(node, node.left); - } - } - function checkStrictModeCatchClause(node) { - if (inStrictMode && node.variableDeclaration) { - checkStrictModeEvalOrArguments(node, node.variableDeclaration.name); - } - } - function checkStrictModeDeleteExpression(node) { - if (inStrictMode && node.expression.kind === 80 /* Identifier */) { - const span = getErrorSpanForNode(file, node.expression); - file.bindDiagnostics.push(createFileDiagnostic(file, span.start, span.length, Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode)); - } - } - function isEvalOrArgumentsIdentifier(node) { - return isIdentifier(node) && (node.escapedText === "eval" || node.escapedText === "arguments"); - } - function checkStrictModeEvalOrArguments(contextNode, name) { - if (name && name.kind === 80 /* Identifier */) { - const identifier = name; - if (isEvalOrArgumentsIdentifier(identifier)) { - const span = getErrorSpanForNode(file, name); - file.bindDiagnostics.push(createFileDiagnostic( - file, - span.start, - span.length, - getStrictModeEvalOrArgumentsMessage(contextNode), - idText(identifier) - )); - } - } - } - function getStrictModeEvalOrArgumentsMessage(node) { - if (getContainingClass(node)) { - return Diagnostics.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode; - } - if (file.externalModuleIndicator) { - return Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode; - } - return Diagnostics.Invalid_use_of_0_in_strict_mode; - } - function checkStrictModeFunctionName(node) { - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.name); - } - } - function getStrictModeBlockScopeFunctionDeclarationMessage(node) { - if (getContainingClass(node)) { - return Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode; - } - if (file.externalModuleIndicator) { - return Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode; - } - return Diagnostics.Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5; - } - function checkStrictModeFunctionDeclaration(node) { - if (languageVersion < 2 /* ES2015 */) { - if (blockScopeContainer.kind !== 312 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { - const errorSpan = getErrorSpanForNode(file, node); - file.bindDiagnostics.push(createFileDiagnostic( - file, - errorSpan.start, - errorSpan.length, - getStrictModeBlockScopeFunctionDeclarationMessage(node) - )); - } - } - } - function checkStrictModePostfixUnaryExpression(node) { - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.operand); - } - } - function checkStrictModePrefixUnaryExpression(node) { - if (inStrictMode) { - if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) { - checkStrictModeEvalOrArguments(node, node.operand); - } - } - } - function checkStrictModeWithStatement(node) { - if (inStrictMode) { - errorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_strict_mode); - } - } - function checkStrictModeLabeledStatement(node) { - if (inStrictMode && getEmitScriptTarget(options) >= 2 /* ES2015 */) { - if (isDeclarationStatement(node.statement) || isVariableStatement(node.statement)) { - errorOnFirstToken(node.label, Diagnostics.A_label_is_not_allowed_here); - } - } - } - function errorOnFirstToken(node, message, ...args) { - const span = getSpanOfTokenAtPosition(file, node.pos); - file.bindDiagnostics.push(createFileDiagnostic(file, span.start, span.length, message, ...args)); - } - function errorOrSuggestionOnNode(isError, node, message) { - errorOrSuggestionOnRange(isError, node, node, message); - } - function errorOrSuggestionOnRange(isError, startNode2, endNode2, message) { - addErrorOrSuggestionDiagnostic(isError, { pos: getTokenPosOfNode(startNode2, file), end: endNode2.end }, message); - } - function addErrorOrSuggestionDiagnostic(isError, range, message) { - const diag2 = createFileDiagnostic(file, range.pos, range.end - range.pos, message); - if (isError) { - file.bindDiagnostics.push(diag2); - } else { - file.bindSuggestionDiagnostics = append(file.bindSuggestionDiagnostics, { ...diag2, category: 2 /* Suggestion */ }); - } - } - function bind(node) { - if (!node) { - return; - } - setParent(node, parent2); - if (tracing) - node.tracingPath = file.path; - const saveInStrictMode = inStrictMode; - bindWorker(node); - if (node.kind > 165 /* LastToken */) { - const saveParent = parent2; - parent2 = node; - const containerFlags = getContainerFlags(node); - if (containerFlags === 0 /* None */) { - bindChildren(node); - } else { - bindContainer(node, containerFlags); - } - parent2 = saveParent; - } else { - const saveParent = parent2; - if (node.kind === 1 /* EndOfFileToken */) - parent2 = node; - bindJSDoc(node); - parent2 = saveParent; - } - inStrictMode = saveInStrictMode; - } - function bindJSDoc(node) { - if (hasJSDocNodes(node)) { - if (isInJSFile(node)) { - for (const j of node.jsDoc) { - bind(j); - } - } else { - for (const j of node.jsDoc) { - setParent(j, node); - setParentRecursive( - j, - /*incremental*/ - false - ); - } - } - } - } - function updateStrictModeStatementList(statements) { - if (!inStrictMode) { - for (const statement of statements) { - if (!isPrologueDirective(statement)) { - return; - } - if (isUseStrictPrologueDirective(statement)) { - inStrictMode = true; - return; - } - } - } - } - function isUseStrictPrologueDirective(node) { - const nodeText2 = getSourceTextOfNodeFromSourceFile(file, node.expression); - return nodeText2 === '"use strict"' || nodeText2 === "'use strict'"; - } - function bindWorker(node) { - switch (node.kind) { - case 80 /* Identifier */: - if (node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { - let parentNode = node.parent; - while (parentNode && !isJSDocTypeAlias(parentNode)) { - parentNode = parentNode.parent; - } - bindBlockScopedDeclaration(parentNode, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - break; - } - case 110 /* ThisKeyword */: - if (currentFlow && (isExpression(node) || parent2.kind === 304 /* ShorthandPropertyAssignment */)) { - node.flowNode = currentFlow; - } - return checkContextualIdentifier(node); - case 166 /* QualifiedName */: - if (currentFlow && isPartOfTypeQuery(node)) { - node.flowNode = currentFlow; - } - break; - case 236 /* MetaProperty */: - case 108 /* SuperKeyword */: - node.flowNode = currentFlow; - break; - case 81 /* PrivateIdentifier */: - return checkPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - const expr = node; - if (currentFlow && isNarrowableReference(expr)) { - expr.flowNode = currentFlow; - } - if (isSpecialPropertyDeclaration(expr)) { - bindSpecialPropertyDeclaration(expr); - } - if (isInJSFile(expr) && file.commonJsModuleIndicator && isModuleExportsAccessExpression(expr) && !lookupSymbolForName(blockScopeContainer, "module")) { - declareSymbol( - file.locals, - /*parent*/ - void 0, - expr.expression, - 1 /* FunctionScopedVariable */ | 134217728 /* ModuleExports */, - 111550 /* FunctionScopedVariableExcludes */ - ); - } - break; - case 226 /* BinaryExpression */: - const specialKind = getAssignmentDeclarationKind(node); - switch (specialKind) { - case 1 /* ExportsProperty */: - bindExportsPropertyAssignment(node); - break; - case 2 /* ModuleExports */: - bindModuleExportsAssignment(node); - break; - case 3 /* PrototypeProperty */: - bindPrototypePropertyAssignment(node.left, node); - break; - case 6 /* Prototype */: - bindPrototypeAssignment(node); - break; - case 4 /* ThisProperty */: - bindThisPropertyAssignment(node); - break; - case 5 /* Property */: - const expression = node.left.expression; - if (isInJSFile(node) && isIdentifier(expression)) { - const symbol = lookupSymbolForName(blockScopeContainer, expression.escapedText); - if (isThisInitializedDeclaration(symbol == null ? void 0 : symbol.valueDeclaration)) { - bindThisPropertyAssignment(node); - break; - } - } - bindSpecialPropertyAssignment(node); - break; - case 0 /* None */: - break; - default: - Debug.fail("Unknown binary expression special property assignment kind"); - } - return checkStrictModeBinaryExpression(node); - case 299 /* CatchClause */: - return checkStrictModeCatchClause(node); - case 220 /* DeleteExpression */: - return checkStrictModeDeleteExpression(node); - case 225 /* PostfixUnaryExpression */: - return checkStrictModePostfixUnaryExpression(node); - case 224 /* PrefixUnaryExpression */: - return checkStrictModePrefixUnaryExpression(node); - case 254 /* WithStatement */: - return checkStrictModeWithStatement(node); - case 256 /* LabeledStatement */: - return checkStrictModeLabeledStatement(node); - case 197 /* ThisType */: - seenThisKeyword = true; - return; - case 182 /* TypePredicate */: - break; - case 168 /* TypeParameter */: - return bindTypeParameter(node); - case 169 /* Parameter */: - return bindParameter(node); - case 260 /* VariableDeclaration */: - return bindVariableDeclarationOrBindingElement(node); - case 208 /* BindingElement */: - node.flowNode = currentFlow; - return bindVariableDeclarationOrBindingElement(node); - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - return bindPropertyWorker(node); - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 306 /* EnumMember */: - return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 900095 /* EnumMemberExcludes */); - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - return bindPropertyOrMethodOrAccessor( - node, - 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), - isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ - ); - case 262 /* FunctionDeclaration */: - return bindFunctionDeclaration(node); - case 176 /* Constructor */: - return declareSymbolAndAddToSymbolTable( - node, - 16384 /* Constructor */, - /*symbolExcludes:*/ - 0 /* None */ - ); - case 177 /* GetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 46015 /* GetAccessorExcludes */); - case 178 /* SetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 78783 /* SetAccessorExcludes */); - case 184 /* FunctionType */: - case 324 /* JSDocFunctionType */: - case 330 /* JSDocSignature */: - case 185 /* ConstructorType */: - return bindFunctionOrConstructorType(node); - case 187 /* TypeLiteral */: - case 329 /* JSDocTypeLiteral */: - case 200 /* MappedType */: - return bindAnonymousTypeWorker(node); - case 339 /* JSDocClassTag */: - return bindJSDocClassTag(node); - case 210 /* ObjectLiteralExpression */: - return bindObjectLiteralExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return bindFunctionExpression(node); - case 213 /* CallExpression */: - const assignmentKind = getAssignmentDeclarationKind(node); - switch (assignmentKind) { - case 7 /* ObjectDefinePropertyValue */: - return bindObjectDefinePropertyAssignment(node); - case 8 /* ObjectDefinePropertyExports */: - return bindObjectDefinePropertyExport(node); - case 9 /* ObjectDefinePrototypeProperty */: - return bindObjectDefinePrototypeProperty(node); - case 0 /* None */: - break; - default: - return Debug.fail("Unknown call expression assignment declaration kind"); - } - if (isInJSFile(node)) { - bindCallExpression(node); - } - break; - case 231 /* ClassExpression */: - case 263 /* ClassDeclaration */: - inStrictMode = true; - return bindClassLikeDeclaration(node); - case 264 /* InterfaceDeclaration */: - return bindBlockScopedDeclaration(node, 64 /* Interface */, 788872 /* InterfaceExcludes */); - case 265 /* TypeAliasDeclaration */: - return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 788968 /* TypeAliasExcludes */); - case 266 /* EnumDeclaration */: - return bindEnumDeclaration(node); - case 267 /* ModuleDeclaration */: - return bindModuleDeclaration(node); - case 292 /* JsxAttributes */: - return bindJsxAttributes(node); - case 291 /* JsxAttribute */: - return bindJsxAttribute(node, 4 /* Property */, 0 /* PropertyExcludes */); - case 271 /* ImportEqualsDeclaration */: - case 274 /* NamespaceImport */: - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: - return declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - case 270 /* NamespaceExportDeclaration */: - return bindNamespaceExportDeclaration(node); - case 273 /* ImportClause */: - return bindImportClause(node); - case 278 /* ExportDeclaration */: - return bindExportDeclaration(node); - case 277 /* ExportAssignment */: - return bindExportAssignment(node); - case 312 /* SourceFile */: - updateStrictModeStatementList(node.statements); - return bindSourceFileIfExternalModule(); - case 241 /* Block */: - if (!isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) { - return; - } - case 268 /* ModuleBlock */: - return updateStrictModeStatementList(node.statements); - case 348 /* JSDocParameterTag */: - if (node.parent.kind === 330 /* JSDocSignature */) { - return bindParameter(node); - } - if (node.parent.kind !== 329 /* JSDocTypeLiteral */) { - break; - } - case 355 /* JSDocPropertyTag */: - const propTag = node; - const flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 323 /* JSDocOptionalType */ ? 4 /* Property */ | 16777216 /* Optional */ : 4 /* Property */; - return declareSymbolAndAddToSymbolTable(propTag, flags, 0 /* PropertyExcludes */); - case 353 /* JSDocTypedefTag */: - case 345 /* JSDocCallbackTag */: - case 347 /* JSDocEnumTag */: - return (delayedTypeAliases || (delayedTypeAliases = [])).push(node); - case 346 /* JSDocOverloadTag */: - return bind(node.typeExpression); - } - } - function bindPropertyWorker(node) { - const isAutoAccessor = isAutoAccessorPropertyDeclaration(node); - const includes = isAutoAccessor ? 98304 /* Accessor */ : 4 /* Property */; - const excludes = isAutoAccessor ? 13247 /* AccessorExcludes */ : 0 /* PropertyExcludes */; - return bindPropertyOrMethodOrAccessor(node, includes | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), excludes); - } - function bindAnonymousTypeWorker(node) { - return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type" /* Type */); - } - function bindSourceFileIfExternalModule() { - setExportContextFlag(file); - if (isExternalModule(file)) { - bindSourceFileAsExternalModule(); - } else if (isJsonSourceFile(file)) { - bindSourceFileAsExternalModule(); - const originalSymbol = file.symbol; - declareSymbol(file.symbol.exports, file.symbol, file, 4 /* Property */, 67108863 /* All */); - file.symbol = originalSymbol; - } - } - function bindSourceFileAsExternalModule() { - bindAnonymousDeclaration(file, 512 /* ValueModule */, `"${removeFileExtension(file.fileName)}"`); - } - function bindExportAssignment(node) { - if (!container.symbol || !container.symbol.exports) { - bindAnonymousDeclaration(node, 111551 /* Value */, getDeclarationName(node)); - } else { - const flags = exportAssignmentIsAlias(node) ? 2097152 /* Alias */ : 4 /* Property */; - const symbol = declareSymbol(container.symbol.exports, container.symbol, node, flags, 67108863 /* All */); - if (node.isExportEquals) { - setValueDeclaration(symbol, node); - } - } - } - function bindNamespaceExportDeclaration(node) { - if (some(node.modifiers)) { - file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Modifiers_cannot_appear_here)); - } - const diag2 = !isSourceFile(node.parent) ? Diagnostics.Global_module_exports_may_only_appear_at_top_level : !isExternalModule(node.parent) ? Diagnostics.Global_module_exports_may_only_appear_in_module_files : !node.parent.isDeclarationFile ? Diagnostics.Global_module_exports_may_only_appear_in_declaration_files : void 0; - if (diag2) { - file.bindDiagnostics.push(createDiagnosticForNode2(node, diag2)); - } else { - file.symbol.globalExports = file.symbol.globalExports || createSymbolTable(); - declareSymbol(file.symbol.globalExports, file.symbol, node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - } - } - function bindExportDeclaration(node) { - if (!container.symbol || !container.symbol.exports) { - bindAnonymousDeclaration(node, 8388608 /* ExportStar */, getDeclarationName(node)); - } else if (!node.exportClause) { - declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* ExportStar */, 0 /* None */); - } else if (isNamespaceExport(node.exportClause)) { - setParent(node.exportClause, node); - declareSymbol(container.symbol.exports, container.symbol, node.exportClause, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - } - } - function bindImportClause(node) { - if (node.name) { - declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - } - } - function setCommonJsModuleIndicator(node) { - if (file.externalModuleIndicator && file.externalModuleIndicator !== true) { - return false; - } - if (!file.commonJsModuleIndicator) { - file.commonJsModuleIndicator = node; - if (!file.externalModuleIndicator) { - bindSourceFileAsExternalModule(); - } - } - return true; - } - function bindObjectDefinePropertyExport(node) { - if (!setCommonJsModuleIndicator(node)) { - return; - } - const symbol = forEachIdentifierInEntityName( - node.arguments[0], - /*parent*/ - void 0, - (id, symbol2) => { - if (symbol2) { - addDeclarationToSymbol(symbol2, id, 1536 /* Module */ | 67108864 /* Assignment */); - } - return symbol2; - } - ); - if (symbol) { - const flags = 4 /* Property */ | 1048576 /* ExportValue */; - declareSymbol(symbol.exports, symbol, node, flags, 0 /* None */); - } - } - function bindExportsPropertyAssignment(node) { - if (!setCommonJsModuleIndicator(node)) { - return; - } - const symbol = forEachIdentifierInEntityName( - node.left.expression, - /*parent*/ - void 0, - (id, symbol2) => { - if (symbol2) { - addDeclarationToSymbol(symbol2, id, 1536 /* Module */ | 67108864 /* Assignment */); - } - return symbol2; - } - ); - if (symbol) { - const isAlias = isAliasableExpression(node.right) && (isExportsIdentifier(node.left.expression) || isModuleExportsAccessExpression(node.left.expression)); - const flags = isAlias ? 2097152 /* Alias */ : 4 /* Property */ | 1048576 /* ExportValue */; - setParent(node.left, node); - declareSymbol(symbol.exports, symbol, node.left, flags, 0 /* None */); - } - } - function bindModuleExportsAssignment(node) { - if (!setCommonJsModuleIndicator(node)) { - return; - } - const assignedExpression = getRightMostAssignedExpression(node.right); - if (isEmptyObjectLiteral(assignedExpression) || container === file && isExportsOrModuleExportsOrAlias(file, assignedExpression)) { - return; - } - if (isObjectLiteralExpression(assignedExpression) && every(assignedExpression.properties, isShorthandPropertyAssignment)) { - forEach(assignedExpression.properties, bindExportAssignedObjectMemberAlias); - return; - } - const flags = exportAssignmentIsAlias(node) ? 2097152 /* Alias */ : 4 /* Property */ | 1048576 /* ExportValue */ | 512 /* ValueModule */; - const symbol = declareSymbol(file.symbol.exports, file.symbol, node, flags | 67108864 /* Assignment */, 0 /* None */); - setValueDeclaration(symbol, node); - } - function bindExportAssignedObjectMemberAlias(node) { - declareSymbol(file.symbol.exports, file.symbol, node, 2097152 /* Alias */ | 67108864 /* Assignment */, 0 /* None */); - } - function bindThisPropertyAssignment(node) { - Debug.assert(isInJSFile(node)); - const hasPrivateIdentifier = isBinaryExpression(node) && isPropertyAccessExpression(node.left) && isPrivateIdentifier(node.left.name) || isPropertyAccessExpression(node) && isPrivateIdentifier(node.name); - if (hasPrivateIdentifier) { - return; - } - const thisContainer = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - switch (thisContainer.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - let constructorSymbol = thisContainer.symbol; - if (isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 64 /* EqualsToken */) { - const l = thisContainer.parent.left; - if (isBindableStaticAccessExpression(l) && isPrototypeAccess(l.expression)) { - constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer); - } - } - if (constructorSymbol && constructorSymbol.valueDeclaration) { - constructorSymbol.members = constructorSymbol.members || createSymbolTable(); - if (hasDynamicName(node)) { - bindDynamicallyNamedThisPropertyAssignment(node, constructorSymbol, constructorSymbol.members); - } else { - declareSymbol(constructorSymbol.members, constructorSymbol, node, 4 /* Property */ | 67108864 /* Assignment */, 0 /* PropertyExcludes */ & ~4 /* Property */); - } - addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32 /* Class */); - } - break; - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: - const containingClass = thisContainer.parent; - const symbolTable = isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members; - if (hasDynamicName(node)) { - bindDynamicallyNamedThisPropertyAssignment(node, containingClass.symbol, symbolTable); - } else { - declareSymbol( - symbolTable, - containingClass.symbol, - node, - 4 /* Property */ | 67108864 /* Assignment */, - 0 /* None */, - /*isReplaceableByMethod*/ - true - ); - } - break; - case 312 /* SourceFile */: - if (hasDynamicName(node)) { - break; - } else if (thisContainer.commonJsModuleIndicator) { - declareSymbol(thisContainer.symbol.exports, thisContainer.symbol, node, 4 /* Property */ | 1048576 /* ExportValue */, 0 /* None */); - } else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */); - } - break; - case 267 /* ModuleDeclaration */: - break; - default: - Debug.failBadSyntaxKind(thisContainer); - } - } - function bindDynamicallyNamedThisPropertyAssignment(node, symbol, symbolTable) { - declareSymbol( - symbolTable, - symbol, - node, - 4 /* Property */, - 0 /* None */, - /*isReplaceableByMethod*/ - true, - /*isComputedName*/ - true - ); - addLateBoundAssignmentDeclarationToSymbol(node, symbol); - } - function addLateBoundAssignmentDeclarationToSymbol(node, symbol) { - if (symbol) { - (symbol.assignmentDeclarationMembers || (symbol.assignmentDeclarationMembers = /* @__PURE__ */ new Map())).set(getNodeId(node), node); - } - } - function bindSpecialPropertyDeclaration(node) { - if (node.expression.kind === 110 /* ThisKeyword */) { - bindThisPropertyAssignment(node); - } else if (isBindableStaticAccessExpression(node) && node.parent.parent.kind === 312 /* SourceFile */) { - if (isPrototypeAccess(node.expression)) { - bindPrototypePropertyAssignment(node, node.parent); - } else { - bindStaticPropertyAssignment(node); - } - } - } - function bindPrototypeAssignment(node) { - setParent(node.left, node); - setParent(node.right, node); - bindPropertyAssignment( - node.left.expression, - node.left, - /*isPrototypeProperty*/ - false, - /*containerIsClass*/ - true - ); - } - function bindObjectDefinePrototypeProperty(node) { - const namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0].expression); - if (namespaceSymbol && namespaceSymbol.valueDeclaration) { - addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); - } - bindPotentiallyNewExpandoMemberToNamespace( - node, - namespaceSymbol, - /*isPrototypeProperty*/ - true - ); - } - function bindPrototypePropertyAssignment(lhs, parent3) { - const classPrototype = lhs.expression; - const constructorFunction = classPrototype.expression; - setParent(constructorFunction, classPrototype); - setParent(classPrototype, lhs); - setParent(lhs, parent3); - bindPropertyAssignment( - constructorFunction, - lhs, - /*isPrototypeProperty*/ - true, - /*containerIsClass*/ - true - ); - } - function bindObjectDefinePropertyAssignment(node) { - let namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]); - const isToplevel = node.parent.parent.kind === 312 /* SourceFile */; - namespaceSymbol = bindPotentiallyMissingNamespaces( - namespaceSymbol, - node.arguments[0], - isToplevel, - /*isPrototypeProperty*/ - false, - /*containerIsClass*/ - false - ); - bindPotentiallyNewExpandoMemberToNamespace( - node, - namespaceSymbol, - /*isPrototypeProperty*/ - false - ); - } - function bindSpecialPropertyAssignment(node) { - var _a; - const parentSymbol = lookupSymbolForPropertyAccess(node.left.expression, container) || lookupSymbolForPropertyAccess(node.left.expression, blockScopeContainer); - if (!isInJSFile(node) && !isFunctionSymbol(parentSymbol)) { - return; - } - const rootExpr = getLeftmostAccessExpression(node.left); - if (isIdentifier(rootExpr) && ((_a = lookupSymbolForName(container, rootExpr.escapedText)) == null ? void 0 : _a.flags) & 2097152 /* Alias */) { - return; - } - setParent(node.left, node); - setParent(node.right, node); - if (isIdentifier(node.left.expression) && container === file && isExportsOrModuleExportsOrAlias(file, node.left.expression)) { - bindExportsPropertyAssignment(node); - } else if (hasDynamicName(node)) { - bindAnonymousDeclaration(node, 4 /* Property */ | 67108864 /* Assignment */, "__computed" /* Computed */); - const sym = bindPotentiallyMissingNamespaces( - parentSymbol, - node.left.expression, - isTopLevelNamespaceAssignment(node.left), - /*isPrototypeProperty*/ - false, - /*containerIsClass*/ - false - ); - addLateBoundAssignmentDeclarationToSymbol(node, sym); - } else { - bindStaticPropertyAssignment(cast(node.left, isBindableStaticNameExpression)); - } - } - function bindStaticPropertyAssignment(node) { - Debug.assert(!isIdentifier(node)); - setParent(node.expression, node); - bindPropertyAssignment( - node.expression, - node, - /*isPrototypeProperty*/ - false, - /*containerIsClass*/ - false - ); - } - function bindPotentiallyMissingNamespaces(namespaceSymbol, entityName, isToplevel, isPrototypeProperty, containerIsClass) { - if ((namespaceSymbol == null ? void 0 : namespaceSymbol.flags) & 2097152 /* Alias */) { - return namespaceSymbol; - } - if (isToplevel && !isPrototypeProperty) { - const flags = 1536 /* Module */ | 67108864 /* Assignment */; - const excludeFlags = 110735 /* ValueModuleExcludes */ & ~67108864 /* Assignment */; - namespaceSymbol = forEachIdentifierInEntityName(entityName, namespaceSymbol, (id, symbol, parent3) => { - if (symbol) { - addDeclarationToSymbol(symbol, id, flags); - return symbol; - } else { - const table = parent3 ? parent3.exports : file.jsGlobalAugmentations || (file.jsGlobalAugmentations = createSymbolTable()); - return declareSymbol(table, parent3, id, flags, excludeFlags); - } - }); - } - if (containerIsClass && namespaceSymbol && namespaceSymbol.valueDeclaration) { - addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, 32 /* Class */); - } - return namespaceSymbol; - } - function bindPotentiallyNewExpandoMemberToNamespace(declaration, namespaceSymbol, isPrototypeProperty) { - if (!namespaceSymbol || !isExpandoSymbol(namespaceSymbol)) { - return; - } - const symbolTable = isPrototypeProperty ? namespaceSymbol.members || (namespaceSymbol.members = createSymbolTable()) : namespaceSymbol.exports || (namespaceSymbol.exports = createSymbolTable()); - let includes = 0 /* None */; - let excludes = 0 /* None */; - if (isFunctionLikeDeclaration(getAssignedExpandoInitializer(declaration))) { - includes = 8192 /* Method */; - excludes = 103359 /* MethodExcludes */; - } else if (isCallExpression(declaration) && isBindableObjectDefinePropertyCall(declaration)) { - if (some(declaration.arguments[2].properties, (p) => { - const id = getNameOfDeclaration(p); - return !!id && isIdentifier(id) && idText(id) === "set"; - })) { - includes |= 65536 /* SetAccessor */ | 4 /* Property */; - excludes |= 78783 /* SetAccessorExcludes */; - } - if (some(declaration.arguments[2].properties, (p) => { - const id = getNameOfDeclaration(p); - return !!id && isIdentifier(id) && idText(id) === "get"; - })) { - includes |= 32768 /* GetAccessor */ | 4 /* Property */; - excludes |= 46015 /* GetAccessorExcludes */; - } - } - if (includes === 0 /* None */) { - includes = 4 /* Property */; - excludes = 0 /* PropertyExcludes */; - } - declareSymbol(symbolTable, namespaceSymbol, declaration, includes | 67108864 /* Assignment */, excludes & ~67108864 /* Assignment */); - } - function isTopLevelNamespaceAssignment(propertyAccess) { - return isBinaryExpression(propertyAccess.parent) ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 312 /* SourceFile */ : propertyAccess.parent.parent.kind === 312 /* SourceFile */; - } - function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) { - let namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer); - const isToplevel = isTopLevelNamespaceAssignment(propertyAccess); - namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, propertyAccess.expression, isToplevel, isPrototypeProperty, containerIsClass); - bindPotentiallyNewExpandoMemberToNamespace(propertyAccess, namespaceSymbol, isPrototypeProperty); - } - function isExpandoSymbol(symbol) { - if (symbol.flags & (16 /* Function */ | 32 /* Class */ | 1024 /* NamespaceModule */)) { - return true; - } - const node = symbol.valueDeclaration; - if (node && isCallExpression(node)) { - return !!getAssignedExpandoInitializer(node); - } - let init = !node ? void 0 : isVariableDeclaration(node) ? node.initializer : isBinaryExpression(node) ? node.right : isPropertyAccessExpression(node) && isBinaryExpression(node.parent) ? node.parent.right : void 0; - init = init && getRightMostAssignedExpression(init); - if (init) { - const isPrototypeAssignment = isPrototypeAccess(isVariableDeclaration(node) ? node.name : isBinaryExpression(node) ? node.left : node); - return !!getExpandoInitializer(isBinaryExpression(init) && (init.operatorToken.kind === 57 /* BarBarToken */ || init.operatorToken.kind === 61 /* QuestionQuestionToken */) ? init.right : init, isPrototypeAssignment); - } - return false; - } - function getParentOfBinaryExpression(expr) { - while (isBinaryExpression(expr.parent)) { - expr = expr.parent; - } - return expr.parent; - } - function lookupSymbolForPropertyAccess(node, lookupContainer = container) { - if (isIdentifier(node)) { - return lookupSymbolForName(lookupContainer, node.escapedText); - } else { - const symbol = lookupSymbolForPropertyAccess(node.expression); - return symbol && symbol.exports && symbol.exports.get(getElementOrPropertyAccessName(node)); - } - } - function forEachIdentifierInEntityName(e, parent3, action) { - if (isExportsOrModuleExportsOrAlias(file, e)) { - return file.symbol; - } else if (isIdentifier(e)) { - return action(e, lookupSymbolForPropertyAccess(e), parent3); - } else { - const s = forEachIdentifierInEntityName(e.expression, parent3, action); - const name = getNameOrArgument(e); - if (isPrivateIdentifier(name)) { - Debug.fail("unexpected PrivateIdentifier"); - } - return action(name, s && s.exports && s.exports.get(getElementOrPropertyAccessName(e)), s); - } - } - function bindCallExpression(node) { - if (!file.commonJsModuleIndicator && isRequireCall( - node, - /*requireStringLiteralLikeArgument*/ - false - )) { - setCommonJsModuleIndicator(node); - } - } - function bindClassLikeDeclaration(node) { - if (node.kind === 263 /* ClassDeclaration */) { - bindBlockScopedDeclaration(node, 32 /* Class */, 899503 /* ClassExcludes */); - } else { - const bindingName = node.name ? node.name.escapedText : "__class" /* Class */; - bindAnonymousDeclaration(node, 32 /* Class */, bindingName); - if (node.name) { - classifiableNames.add(node.name.escapedText); - } - } - const { symbol } = node; - const prototypeSymbol = createSymbol(4 /* Property */ | 4194304 /* Prototype */, "prototype"); - const symbolExport = symbol.exports.get(prototypeSymbol.escapedName); - if (symbolExport) { - if (node.name) { - setParent(node.name, node); - } - file.bindDiagnostics.push(createDiagnosticForNode2(symbolExport.declarations[0], Diagnostics.Duplicate_identifier_0, symbolName(prototypeSymbol))); - } - symbol.exports.set(prototypeSymbol.escapedName, prototypeSymbol); - prototypeSymbol.parent = symbol; - } - function bindEnumDeclaration(node) { - return isEnumConst(node) ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); - } - function bindVariableDeclarationOrBindingElement(node) { - if (inStrictMode) { - checkStrictModeEvalOrArguments(node, node.name); - } - if (!isBindingPattern(node.name)) { - const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent; - if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { - declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); - } else if (isBlockOrCatchScoped(node)) { - bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 111551 /* BlockScopedVariableExcludes */); - } else if (isParameterDeclaration(node)) { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111551 /* ParameterExcludes */); - } else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111550 /* FunctionScopedVariableExcludes */); - } - } - } - function bindParameter(node) { - if (node.kind === 348 /* JSDocParameterTag */ && container.kind !== 330 /* JSDocSignature */) { - return; - } - if (inStrictMode && !(node.flags & 33554432 /* Ambient */)) { - checkStrictModeEvalOrArguments(node, node.name); - } - if (isBindingPattern(node.name)) { - bindAnonymousDeclaration(node, 1 /* FunctionScopedVariable */, "__" + node.parent.parameters.indexOf(node)); - } else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 111551 /* ParameterExcludes */); - } - if (isParameterPropertyDeclaration(node, node.parent)) { - const classDeclaration = node.parent.parent; - declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), 0 /* PropertyExcludes */); - } - } - function bindFunctionDeclaration(node) { - if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { - if (isAsyncFunction(node)) { - emitFlags |= 4096 /* HasAsyncFunctions */; - } - } - checkStrictModeFunctionName(node); - if (inStrictMode) { - checkStrictModeFunctionDeclaration(node); - bindBlockScopedDeclaration(node, 16 /* Function */, 110991 /* FunctionExcludes */); - } else { - declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 110991 /* FunctionExcludes */); - } - } - function bindFunctionExpression(node) { - if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */)) { - if (isAsyncFunction(node)) { - emitFlags |= 4096 /* HasAsyncFunctions */; - } - } - if (currentFlow) { - node.flowNode = currentFlow; - } - checkStrictModeFunctionName(node); - const bindingName = node.name ? node.name.escapedText : "__function" /* Function */; - return bindAnonymousDeclaration(node, 16 /* Function */, bindingName); - } - function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - if (!file.isDeclarationFile && !(node.flags & 33554432 /* Ambient */) && isAsyncFunction(node)) { - emitFlags |= 4096 /* HasAsyncFunctions */; - } - if (currentFlow && isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { - node.flowNode = currentFlow; - } - return hasDynamicName(node) ? bindAnonymousDeclaration(node, symbolFlags, "__computed" /* Computed */) : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); - } - function getInferTypeContainer(node) { - const extendsType = findAncestor(node, (n) => n.parent && isConditionalTypeNode(n.parent) && n.parent.extendsType === n); - return extendsType && extendsType.parent; - } - function bindTypeParameter(node) { - if (isJSDocTemplateTag(node.parent)) { - const container2 = getEffectiveContainerForJSDocTemplateTag(node.parent); - if (container2) { - Debug.assertNode(container2, canHaveLocals); - container2.locals ?? (container2.locals = createSymbolTable()); - declareSymbol( - container2.locals, - /*parent*/ - void 0, - node, - 262144 /* TypeParameter */, - 526824 /* TypeParameterExcludes */ - ); - } else { - declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); - } - } else if (node.parent.kind === 195 /* InferType */) { - const container2 = getInferTypeContainer(node.parent); - if (container2) { - Debug.assertNode(container2, canHaveLocals); - container2.locals ?? (container2.locals = createSymbolTable()); - declareSymbol( - container2.locals, - /*parent*/ - void 0, - node, - 262144 /* TypeParameter */, - 526824 /* TypeParameterExcludes */ - ); - } else { - bindAnonymousDeclaration(node, 262144 /* TypeParameter */, getDeclarationName(node)); - } - } else { - declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 526824 /* TypeParameterExcludes */); - } - } - function shouldReportErrorOnModuleDeclaration(node) { - const instanceState = getModuleInstanceState(node); - return instanceState === 1 /* Instantiated */ || instanceState === 2 /* ConstEnumOnly */ && shouldPreserveConstEnums(options); - } - function checkUnreachable(node) { - if (!(currentFlow.flags & 1 /* Unreachable */)) { - return false; - } - if (currentFlow === unreachableFlow) { - const reportError = ( - // report error on all statements except empty ones - isStatementButNotDeclaration(node) && node.kind !== 242 /* EmptyStatement */ || // report error on class declarations - node.kind === 263 /* ClassDeclaration */ || // report error on instantiated modules or const-enums only modules if preserveConstEnums is set - node.kind === 267 /* ModuleDeclaration */ && shouldReportErrorOnModuleDeclaration(node) - ); - if (reportError) { - currentFlow = reportedUnreachableFlow; - if (!options.allowUnreachableCode) { - const isError = unreachableCodeIsError(options) && !(node.flags & 33554432 /* Ambient */) && (!isVariableStatement(node) || !!(getCombinedNodeFlags(node.declarationList) & 7 /* BlockScoped */) || node.declarationList.declarations.some((d) => !!d.initializer)); - eachUnreachableRange(node, (start, end) => errorOrSuggestionOnRange(isError, start, end, Diagnostics.Unreachable_code_detected)); - } - } - } - return true; - } - } - function eachUnreachableRange(node, cb) { - if (isStatement(node) && isExecutableStatement(node) && isBlock(node.parent)) { - const { statements } = node.parent; - const slice = sliceAfter(statements, node); - getRangesWhere(slice, isExecutableStatement, (start, afterEnd) => cb(slice[start], slice[afterEnd - 1])); - } else { - cb(node, node); - } - } - function isExecutableStatement(s) { - return !isFunctionDeclaration(s) && !isPurelyTypeDeclaration(s) && !isEnumDeclaration(s) && // `var x;` may declare a variable used above - !(isVariableStatement(s) && !(getCombinedNodeFlags(s) & 7 /* BlockScoped */) && s.declarationList.declarations.some((d) => !d.initializer)); - } - function isPurelyTypeDeclaration(s) { - switch (s.kind) { - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - return true; - case 267 /* ModuleDeclaration */: - return getModuleInstanceState(s) !== 1 /* Instantiated */; - case 266 /* EnumDeclaration */: - return hasSyntacticModifier(s, 2048 /* Const */); - default: - return false; - } - } - function isExportsOrModuleExportsOrAlias(sourceFile, node) { - let i = 0; - const q = createQueue(); - q.enqueue(node); - while (!q.isEmpty() && i < 100) { - i++; - node = q.dequeue(); - if (isExportsIdentifier(node) || isModuleExportsAccessExpression(node)) { - return true; - } else if (isIdentifier(node)) { - const symbol = lookupSymbolForName(sourceFile, node.escapedText); - if (!!symbol && !!symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) && !!symbol.valueDeclaration.initializer) { - const init = symbol.valueDeclaration.initializer; - q.enqueue(init); - if (isAssignmentExpression( - init, - /*excludeCompoundAssignment*/ - true - )) { - q.enqueue(init.left); - q.enqueue(init.right); - } - } - } - } - return false; - } - function getContainerFlags(node) { - switch (node.kind) { - case 231 /* ClassExpression */: - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 329 /* JSDocTypeLiteral */: - case 292 /* JsxAttributes */: - return 1 /* IsContainer */; - case 264 /* InterfaceDeclaration */: - return 1 /* IsContainer */ | 64 /* IsInterface */; - case 267 /* ModuleDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 200 /* MappedType */: - case 181 /* IndexSignature */: - return 1 /* IsContainer */ | 32 /* HasLocals */; - case 312 /* SourceFile */: - return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - if (isObjectLiteralOrClassExpressionMethodOrAccessor(node)) { - return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */; - } - case 176 /* Constructor */: - case 262 /* FunctionDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 330 /* JSDocSignature */: - case 324 /* JSDocFunctionType */: - case 184 /* FunctionType */: - case 180 /* ConstructSignature */: - case 185 /* ConstructorType */: - case 175 /* ClassStaticBlockDeclaration */: - return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */; - case 268 /* ModuleBlock */: - return 4 /* IsControlFlowContainer */; - case 172 /* PropertyDeclaration */: - return node.initializer ? 4 /* IsControlFlowContainer */ : 0; - case 299 /* CatchClause */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 269 /* CaseBlock */: - return 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - case 241 /* Block */: - return isFunctionLike(node.parent) || isClassStaticBlockDeclaration(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */ | 32 /* HasLocals */; - } - return 0 /* None */; - } - function lookupSymbolForName(container, name) { - var _a, _b, _c, _d; - const local = (_b = (_a = tryCast(container, canHaveLocals)) == null ? void 0 : _a.locals) == null ? void 0 : _b.get(name); - if (local) { - return local.exportSymbol ?? local; - } - if (isSourceFile(container) && container.jsGlobalAugmentations && container.jsGlobalAugmentations.has(name)) { - return container.jsGlobalAugmentations.get(name); - } - if (canHaveSymbol(container)) { - return (_d = (_c = container.symbol) == null ? void 0 : _c.exports) == null ? void 0 : _d.get(name); - } - } - var ModuleInstanceState, ContainerFlags, binder; - var init_binder = __esm({ - "src/compiler/binder.ts"() { - "use strict"; - init_ts2(); - init_ts_performance(); - ModuleInstanceState = /* @__PURE__ */ ((ModuleInstanceState2) => { - ModuleInstanceState2[ModuleInstanceState2["NonInstantiated"] = 0] = "NonInstantiated"; - ModuleInstanceState2[ModuleInstanceState2["Instantiated"] = 1] = "Instantiated"; - ModuleInstanceState2[ModuleInstanceState2["ConstEnumOnly"] = 2] = "ConstEnumOnly"; - return ModuleInstanceState2; - })(ModuleInstanceState || {}); - ContainerFlags = /* @__PURE__ */ ((ContainerFlags2) => { - ContainerFlags2[ContainerFlags2["None"] = 0] = "None"; - ContainerFlags2[ContainerFlags2["IsContainer"] = 1] = "IsContainer"; - ContainerFlags2[ContainerFlags2["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; - ContainerFlags2[ContainerFlags2["IsControlFlowContainer"] = 4] = "IsControlFlowContainer"; - ContainerFlags2[ContainerFlags2["IsFunctionLike"] = 8] = "IsFunctionLike"; - ContainerFlags2[ContainerFlags2["IsFunctionExpression"] = 16] = "IsFunctionExpression"; - ContainerFlags2[ContainerFlags2["HasLocals"] = 32] = "HasLocals"; - ContainerFlags2[ContainerFlags2["IsInterface"] = 64] = "IsInterface"; - ContainerFlags2[ContainerFlags2["IsObjectLiteralOrClassExpressionMethodOrAccessor"] = 128] = "IsObjectLiteralOrClassExpressionMethodOrAccessor"; - return ContainerFlags2; - })(ContainerFlags || {}); - binder = /* @__PURE__ */ createBinder(); - } - }); - - // src/compiler/symbolWalker.ts - function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getConstraintOfTypeParameter, getFirstIdentifier2, getTypeArguments) { - return getSymbolWalker; - function getSymbolWalker(accept = () => true) { - const visitedTypes = []; - const visitedSymbols = []; - return { - walkType: (type) => { - try { - visitType(type); - return { visitedTypes: getOwnValues(visitedTypes), visitedSymbols: getOwnValues(visitedSymbols) }; - } finally { - clear(visitedTypes); - clear(visitedSymbols); - } - }, - walkSymbol: (symbol) => { - try { - visitSymbol(symbol); - return { visitedTypes: getOwnValues(visitedTypes), visitedSymbols: getOwnValues(visitedSymbols) }; - } finally { - clear(visitedTypes); - clear(visitedSymbols); - } - } - }; - function visitType(type) { - if (!type) { - return; - } - if (visitedTypes[type.id]) { - return; - } - visitedTypes[type.id] = type; - const shouldBail = visitSymbol(type.symbol); - if (shouldBail) - return; - if (type.flags & 524288 /* Object */) { - const objectType = type; - const objectFlags = objectType.objectFlags; - if (objectFlags & 4 /* Reference */) { - visitTypeReference(type); - } - if (objectFlags & 32 /* Mapped */) { - visitMappedType(type); - } - if (objectFlags & (1 /* Class */ | 2 /* Interface */)) { - visitInterfaceType(type); - } - if (objectFlags & (8 /* Tuple */ | 16 /* Anonymous */)) { - visitObjectType(objectType); - } - } - if (type.flags & 262144 /* TypeParameter */) { - visitTypeParameter(type); - } - if (type.flags & 3145728 /* UnionOrIntersection */) { - visitUnionOrIntersectionType(type); - } - if (type.flags & 4194304 /* Index */) { - visitIndexType(type); - } - if (type.flags & 8388608 /* IndexedAccess */) { - visitIndexedAccessType(type); - } - } - function visitTypeReference(type) { - visitType(type.target); - forEach(getTypeArguments(type), visitType); - } - function visitTypeParameter(type) { - visitType(getConstraintOfTypeParameter(type)); - } - function visitUnionOrIntersectionType(type) { - forEach(type.types, visitType); - } - function visitIndexType(type) { - visitType(type.type); - } - function visitIndexedAccessType(type) { - visitType(type.objectType); - visitType(type.indexType); - visitType(type.constraint); - } - function visitMappedType(type) { - visitType(type.typeParameter); - visitType(type.constraintType); - visitType(type.templateType); - visitType(type.modifiersType); - } - function visitSignature(signature) { - const typePredicate = getTypePredicateOfSignature(signature); - if (typePredicate) { - visitType(typePredicate.type); - } - forEach(signature.typeParameters, visitType); - for (const parameter of signature.parameters) { - visitSymbol(parameter); - } - visitType(getRestTypeOfSignature(signature)); - visitType(getReturnTypeOfSignature(signature)); - } - function visitInterfaceType(interfaceT) { - visitObjectType(interfaceT); - forEach(interfaceT.typeParameters, visitType); - forEach(getBaseTypes(interfaceT), visitType); - visitType(interfaceT.thisType); - } - function visitObjectType(type) { - const resolved = resolveStructuredTypeMembers(type); - for (const info of resolved.indexInfos) { - visitType(info.keyType); - visitType(info.type); - } - for (const signature of resolved.callSignatures) { - visitSignature(signature); - } - for (const signature of resolved.constructSignatures) { - visitSignature(signature); - } - for (const p of resolved.properties) { - visitSymbol(p); - } - } - function visitSymbol(symbol) { - if (!symbol) { - return false; - } - const symbolId = getSymbolId(symbol); - if (visitedSymbols[symbolId]) { - return false; - } - visitedSymbols[symbolId] = symbol; - if (!accept(symbol)) { - return true; - } - const t = getTypeOfSymbol(symbol); - visitType(t); - if (symbol.exports) { - symbol.exports.forEach(visitSymbol); - } - forEach(symbol.declarations, (d) => { - if (d.type && d.type.kind === 186 /* TypeQuery */) { - const query = d.type; - const entity = getResolvedSymbol(getFirstIdentifier2(query.exprName)); - visitSymbol(entity); - } - }); - return false; - } - } - } - var init_symbolWalker = __esm({ - "src/compiler/symbolWalker.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/moduleSpecifiers.ts - function getPreferences({ importModuleSpecifierPreference, importModuleSpecifierEnding }, compilerOptions, importingSourceFile, oldImportSpecifier) { - const preferredEnding = getPreferredEnding(); - return { - relativePreference: oldImportSpecifier !== void 0 ? isExternalModuleNameRelative(oldImportSpecifier) ? 0 /* Relative */ : 1 /* NonRelative */ : importModuleSpecifierPreference === "relative" ? 0 /* Relative */ : importModuleSpecifierPreference === "non-relative" ? 1 /* NonRelative */ : importModuleSpecifierPreference === "project-relative" ? 3 /* ExternalNonRelative */ : 2 /* Shortest */, - getAllowedEndingsInPreferredOrder: (syntaxImpliedNodeFormat) => { - if ((syntaxImpliedNodeFormat ?? importingSourceFile.impliedNodeFormat) === 99 /* ESNext */) { - if (shouldAllowImportingTsExtension(compilerOptions, importingSourceFile.fileName)) { - return [3 /* TsExtension */, 2 /* JsExtension */]; - } - return [2 /* JsExtension */]; - } - if (getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */) { - return preferredEnding === 2 /* JsExtension */ ? [2 /* JsExtension */, 1 /* Index */] : [1 /* Index */, 2 /* JsExtension */]; - } - const allowImportingTsExtension = shouldAllowImportingTsExtension(compilerOptions, importingSourceFile.fileName); - switch (preferredEnding) { - case 2 /* JsExtension */: - return allowImportingTsExtension ? [2 /* JsExtension */, 3 /* TsExtension */, 0 /* Minimal */, 1 /* Index */] : [2 /* JsExtension */, 0 /* Minimal */, 1 /* Index */]; - case 3 /* TsExtension */: - return [3 /* TsExtension */, 0 /* Minimal */, 2 /* JsExtension */, 1 /* Index */]; - case 1 /* Index */: - return allowImportingTsExtension ? [1 /* Index */, 0 /* Minimal */, 3 /* TsExtension */, 2 /* JsExtension */] : [1 /* Index */, 0 /* Minimal */, 2 /* JsExtension */]; - case 0 /* Minimal */: - return allowImportingTsExtension ? [0 /* Minimal */, 1 /* Index */, 3 /* TsExtension */, 2 /* JsExtension */] : [0 /* Minimal */, 1 /* Index */, 2 /* JsExtension */]; - default: - Debug.assertNever(preferredEnding); - } - } - }; - function getPreferredEnding() { - if (oldImportSpecifier !== void 0) { - if (hasJSFileExtension(oldImportSpecifier)) - return 2 /* JsExtension */; - if (endsWith(oldImportSpecifier, "/index")) - return 1 /* Index */; - } - return getModuleSpecifierEndingPreference( - importModuleSpecifierEnding, - importingSourceFile.impliedNodeFormat, - compilerOptions, - importingSourceFile - ); - } - } - function updateModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, oldImportSpecifier, options = {}) { - const res = getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getPreferences({}, compilerOptions, importingSourceFile, oldImportSpecifier), {}, options); - if (res === oldImportSpecifier) - return void 0; - return res; - } - function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, options = {}) { - return getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, getPreferences({}, compilerOptions, importingSourceFile), {}, options); - } - function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options = {}) { - const info = getInfo(importingSourceFile.path, host); - const modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options); - return firstDefined( - modulePaths, - (modulePath) => tryGetModuleNameAsNodeModule( - modulePath, - info, - importingSourceFile, - host, - compilerOptions, - preferences, - /*packageNameOnly*/ - true, - options.overrideImportMode - ) - ); - } - function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, preferences, userPreferences, options = {}) { - const info = getInfo(importingSourceFileName, host); - const modulePaths = getAllModulePaths(importingSourceFileName, toFileName2, host, userPreferences, options); - return firstDefined(modulePaths, (modulePath) => tryGetModuleNameAsNodeModule( - modulePath, - info, - importingSourceFile, - host, - compilerOptions, - userPreferences, - /*packageNameOnly*/ - void 0, - options.overrideImportMode - )) || getLocalModuleSpecifier(toFileName2, info, compilerOptions, host, options.overrideImportMode || importingSourceFile.impliedNodeFormat, preferences); - } - function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences, options = {}) { - return tryGetModuleSpecifiersFromCacheWorker( - moduleSymbol, - importingSourceFile, - host, - userPreferences, - options - )[0]; - } - function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences, options = {}) { - var _a; - const moduleSourceFile = getSourceFileOfModule(moduleSymbol); - if (!moduleSourceFile) { - return emptyArray; - } - const cache = (_a = host.getModuleSpecifierCache) == null ? void 0 : _a.call(host); - const cached = cache == null ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences, options); - return [cached == null ? void 0 : cached.moduleSpecifiers, moduleSourceFile, cached == null ? void 0 : cached.modulePaths, cache]; - } - function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) { - return getModuleSpecifiersWithCacheInfo( - moduleSymbol, - checker, - compilerOptions, - importingSourceFile, - host, - userPreferences, - options - ).moduleSpecifiers; - } - function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) { - let computedWithoutCache = false; - const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker); - if (ambient) - return { moduleSpecifiers: [ambient], computedWithoutCache }; - let [specifiers, moduleSourceFile, modulePaths, cache] = tryGetModuleSpecifiersFromCacheWorker( - moduleSymbol, - importingSourceFile, - host, - userPreferences, - options - ); - if (specifiers) - return { moduleSpecifiers: specifiers, computedWithoutCache }; - if (!moduleSourceFile) - return { moduleSpecifiers: emptyArray, computedWithoutCache }; - computedWithoutCache = true; - modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host)); - const result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options); - cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result); - return { moduleSpecifiers: result, computedWithoutCache }; - } - function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) { - const info = getInfo(importingSourceFile.path, host); - const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile); - const existingSpecifier = forEach(modulePaths, (modulePath) => forEach( - host.getFileIncludeReasons().get(toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)), - (reason) => { - if (reason.kind !== 3 /* Import */ || reason.file !== importingSourceFile.path) - return void 0; - if (importingSourceFile.impliedNodeFormat && importingSourceFile.impliedNodeFormat !== getModeForResolutionAtIndex(importingSourceFile, reason.index)) - return void 0; - const specifier = getModuleNameStringLiteralAt(importingSourceFile, reason.index).text; - return preferences.relativePreference !== 1 /* NonRelative */ || !pathIsRelative(specifier) ? specifier : void 0; - } - )); - if (existingSpecifier) { - const moduleSpecifiers = [existingSpecifier]; - return moduleSpecifiers; - } - const importedFileIsInNodeModules = some(modulePaths, (p) => p.isInNodeModules); - let nodeModulesSpecifiers; - let pathsSpecifiers; - let redirectPathsSpecifiers; - let relativeSpecifiers; - for (const modulePath of modulePaths) { - const specifier = modulePath.isInNodeModules ? tryGetModuleNameAsNodeModule( - modulePath, - info, - importingSourceFile, - host, - compilerOptions, - userPreferences, - /*packageNameOnly*/ - void 0, - options.overrideImportMode - ) : void 0; - nodeModulesSpecifiers = append(nodeModulesSpecifiers, specifier); - if (specifier && modulePath.isRedirect) { - return nodeModulesSpecifiers; - } - if (!specifier) { - const local = getLocalModuleSpecifier( - modulePath.path, - info, - compilerOptions, - host, - options.overrideImportMode || importingSourceFile.impliedNodeFormat, - preferences, - /*pathsOnly*/ - modulePath.isRedirect - ); - if (!local) { - continue; - } - if (modulePath.isRedirect) { - redirectPathsSpecifiers = append(redirectPathsSpecifiers, local); - } else if (pathIsBareSpecifier(local)) { - pathsSpecifiers = append(pathsSpecifiers, local); - } else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) { - relativeSpecifiers = append(relativeSpecifiers, local); - } - } - } - return (pathsSpecifiers == null ? void 0 : pathsSpecifiers.length) ? pathsSpecifiers : (redirectPathsSpecifiers == null ? void 0 : redirectPathsSpecifiers.length) ? redirectPathsSpecifiers : (nodeModulesSpecifiers == null ? void 0 : nodeModulesSpecifiers.length) ? nodeModulesSpecifiers : Debug.checkDefined(relativeSpecifiers); - } - function getInfo(importingSourceFileName, host) { - const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames ? host.useCaseSensitiveFileNames() : true); - const sourceDirectory = getDirectoryPath(importingSourceFileName); - return { getCanonicalFileName, importingSourceFileName, sourceDirectory }; - } - function getLocalModuleSpecifier(moduleFileName, info, compilerOptions, host, importMode, { getAllowedEndingsInPreferredOrder: getAllowedEndingsInPrefererredOrder, relativePreference }, pathsOnly) { - const { baseUrl, paths, rootDirs } = compilerOptions; - if (pathsOnly && !paths) { - return void 0; - } - const { sourceDirectory, getCanonicalFileName } = info; - const allowedEndings = getAllowedEndingsInPrefererredOrder(importMode); - const relativePath = rootDirs && tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, allowedEndings, compilerOptions) || processEnding(ensurePathIsNonModuleName(getRelativePathFromDirectory(sourceDirectory, moduleFileName, getCanonicalFileName)), allowedEndings, compilerOptions); - if (!baseUrl && !paths || relativePreference === 0 /* Relative */) { - return pathsOnly ? void 0 : relativePath; - } - const baseDirectory = getNormalizedAbsolutePath(getPathsBasePath(compilerOptions, host) || baseUrl, host.getCurrentDirectory()); - const relativeToBaseUrl = getRelativePathIfInSameVolume(moduleFileName, baseDirectory, getCanonicalFileName); - if (!relativeToBaseUrl) { - return pathsOnly ? void 0 : relativePath; - } - const fromPaths = paths && tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions); - if (pathsOnly) { - return fromPaths; - } - const maybeNonRelative = fromPaths === void 0 && baseUrl !== void 0 ? processEnding(relativeToBaseUrl, allowedEndings, compilerOptions) : fromPaths; - if (!maybeNonRelative) { - return relativePath; - } - if (relativePreference === 1 /* NonRelative */ && !pathIsRelative(maybeNonRelative)) { - return maybeNonRelative; - } - if (relativePreference === 3 /* ExternalNonRelative */ && !pathIsRelative(maybeNonRelative)) { - const projectDirectory = compilerOptions.configFilePath ? toPath(getDirectoryPath(compilerOptions.configFilePath), host.getCurrentDirectory(), info.getCanonicalFileName) : info.getCanonicalFileName(host.getCurrentDirectory()); - const modulePath = toPath(moduleFileName, projectDirectory, getCanonicalFileName); - const sourceIsInternal = startsWith(sourceDirectory, projectDirectory); - const targetIsInternal = startsWith(modulePath, projectDirectory); - if (sourceIsInternal && !targetIsInternal || !sourceIsInternal && targetIsInternal) { - return maybeNonRelative; - } - const nearestTargetPackageJson = getNearestAncestorDirectoryWithPackageJson(host, getDirectoryPath(modulePath)); - const nearestSourcePackageJson = getNearestAncestorDirectoryWithPackageJson(host, sourceDirectory); - if (nearestSourcePackageJson !== nearestTargetPackageJson) { - return maybeNonRelative; - } - return relativePath; - } - return isPathRelativeToParent(maybeNonRelative) || countPathComponents(relativePath) < countPathComponents(maybeNonRelative) ? relativePath : maybeNonRelative; - } - function countPathComponents(path) { - let count = 0; - for (let i = startsWith(path, "./") ? 2 : 0; i < path.length; i++) { - if (path.charCodeAt(i) === 47 /* slash */) - count++; - } - return count; - } - function comparePathsByRedirectAndNumberOfDirectorySeparators(a, b) { - return compareBooleans(b.isRedirect, a.isRedirect) || compareNumberOfDirectorySeparators(a.path, b.path); - } - function getNearestAncestorDirectoryWithPackageJson(host, fileName) { - if (host.getNearestAncestorDirectoryWithPackageJson) { - return host.getNearestAncestorDirectoryWithPackageJson(fileName); - } - return !!forEachAncestorDirectory(fileName, (directory) => { - return host.fileExists(combinePaths(directory, "package.json")) ? true : void 0; - }); - } - function forEachFileNameOfModule(importingFileName, importedFileName, host, preferSymlinks, cb) { - var _a; - const getCanonicalFileName = hostGetCanonicalFileName(host); - const cwd = host.getCurrentDirectory(); - const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? host.getProjectReferenceRedirect(importedFileName) : void 0; - const importedPath = toPath(importedFileName, cwd, getCanonicalFileName); - const redirects = host.redirectTargetsMap.get(importedPath) || emptyArray; - const importedFileNames = [...referenceRedirect ? [referenceRedirect] : emptyArray, importedFileName, ...redirects]; - const targets = importedFileNames.map((f) => getNormalizedAbsolutePath(f, cwd)); - let shouldFilterIgnoredPaths = !every(targets, containsIgnoredPath); - if (!preferSymlinks) { - const result2 = forEach(targets, (p) => !(shouldFilterIgnoredPaths && containsIgnoredPath(p)) && cb(p, referenceRedirect === p)); - if (result2) - return result2; - } - const symlinkedDirectories = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath(); - const fullImportedFileName = getNormalizedAbsolutePath(importedFileName, cwd); - const result = symlinkedDirectories && forEachAncestorDirectory(getDirectoryPath(fullImportedFileName), (realPathDirectory) => { - const symlinkDirectories = symlinkedDirectories.get(ensureTrailingDirectorySeparator(toPath(realPathDirectory, cwd, getCanonicalFileName))); - if (!symlinkDirectories) - return void 0; - if (startsWithDirectory(importingFileName, realPathDirectory, getCanonicalFileName)) { - return false; - } - return forEach(targets, (target) => { - if (!startsWithDirectory(target, realPathDirectory, getCanonicalFileName)) { - return; - } - const relative = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName); - for (const symlinkDirectory of symlinkDirectories) { - const option = resolvePath(symlinkDirectory, relative); - const result2 = cb(option, target === referenceRedirect); - shouldFilterIgnoredPaths = true; - if (result2) - return result2; - } - }); - }); - return result || (preferSymlinks ? forEach(targets, (p) => shouldFilterIgnoredPaths && containsIgnoredPath(p) ? void 0 : cb(p, p === referenceRedirect)) : void 0); - } - function getAllModulePaths(importingFilePath, importedFileName, host, preferences, options = {}) { - var _a; - const importedFilePath = toPath(importedFileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host)); - const cache = (_a = host.getModuleSpecifierCache) == null ? void 0 : _a.call(host); - if (cache) { - const cached = cache.get(importingFilePath, importedFilePath, preferences, options); - if (cached == null ? void 0 : cached.modulePaths) - return cached.modulePaths; - } - const modulePaths = getAllModulePathsWorker(importingFilePath, importedFileName, host); - if (cache) { - cache.setModulePaths(importingFilePath, importedFilePath, preferences, options, modulePaths); - } - return modulePaths; - } - function getAllModulePathsWorker(importingFileName, importedFileName, host) { - const getCanonicalFileName = hostGetCanonicalFileName(host); - const allFileNames = /* @__PURE__ */ new Map(); - let importedFileFromNodeModules = false; - forEachFileNameOfModule( - importingFileName, - importedFileName, - host, - /*preferSymlinks*/ - true, - (path, isRedirect) => { - const isInNodeModules = pathContainsNodeModules(path); - allFileNames.set(path, { path: getCanonicalFileName(path), isRedirect, isInNodeModules }); - importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules; - } - ); - const sortedPaths = []; - for (let directory = getDirectoryPath(importingFileName); allFileNames.size !== 0; ) { - const directoryStart = ensureTrailingDirectorySeparator(directory); - let pathsInDirectory; - allFileNames.forEach(({ path, isRedirect, isInNodeModules }, fileName) => { - if (startsWith(path, directoryStart)) { - (pathsInDirectory || (pathsInDirectory = [])).push({ path: fileName, isRedirect, isInNodeModules }); - allFileNames.delete(fileName); - } - }); - if (pathsInDirectory) { - if (pathsInDirectory.length > 1) { - pathsInDirectory.sort(comparePathsByRedirectAndNumberOfDirectorySeparators); - } - sortedPaths.push(...pathsInDirectory); - } - const newDirectory = getDirectoryPath(directory); - if (newDirectory === directory) - break; - directory = newDirectory; - } - if (allFileNames.size) { - const remainingPaths = arrayFrom(allFileNames.values()); - if (remainingPaths.length > 1) - remainingPaths.sort(comparePathsByRedirectAndNumberOfDirectorySeparators); - sortedPaths.push(...remainingPaths); - } - return sortedPaths; - } - function tryGetModuleNameFromAmbientModule(moduleSymbol, checker) { - var _a; - const decl = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find( - (d) => isNonGlobalAmbientModule(d) && (!isExternalModuleAugmentation(d) || !isExternalModuleNameRelative(getTextOfIdentifierOrLiteral(d.name))) - ); - if (decl) { - return decl.name.text; - } - const ambientModuleDeclareCandidates = mapDefined( - moduleSymbol.declarations, - (d) => { - var _a2, _b, _c, _d; - if (!isModuleDeclaration(d)) - return; - const topNamespace = getTopNamespace(d); - if (!(((_a2 = topNamespace == null ? void 0 : topNamespace.parent) == null ? void 0 : _a2.parent) && isModuleBlock(topNamespace.parent) && isAmbientModule(topNamespace.parent.parent) && isSourceFile(topNamespace.parent.parent.parent))) - return; - const exportAssignment = (_d = (_c = (_b = topNamespace.parent.parent.symbol.exports) == null ? void 0 : _b.get("export=")) == null ? void 0 : _c.valueDeclaration) == null ? void 0 : _d.expression; - if (!exportAssignment) - return; - const exportSymbol = checker.getSymbolAtLocation(exportAssignment); - if (!exportSymbol) - return; - const originalExportSymbol = (exportSymbol == null ? void 0 : exportSymbol.flags) & 2097152 /* Alias */ ? checker.getAliasedSymbol(exportSymbol) : exportSymbol; - if (originalExportSymbol === d.symbol) - return topNamespace.parent.parent; - function getTopNamespace(namespaceDeclaration) { - while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { - namespaceDeclaration = namespaceDeclaration.parent; - } - return namespaceDeclaration; - } - } - ); - const ambientModuleDeclare = ambientModuleDeclareCandidates[0]; - if (ambientModuleDeclare) { - return ambientModuleDeclare.name.text; - } - } - function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) { - for (const key in paths) { - for (const patternText2 of paths[key]) { - const pattern = normalizePath(patternText2); - const indexOfStar = pattern.indexOf("*"); - const candidates = allowedEndings.map((ending) => ({ - ending, - value: processEnding(relativeToBaseUrl, [ending], compilerOptions) - })); - if (tryGetExtensionFromPath2(pattern)) { - candidates.push({ ending: void 0, value: relativeToBaseUrl }); - } - if (indexOfStar !== -1) { - const prefix = pattern.substring(0, indexOfStar); - const suffix = pattern.substring(indexOfStar + 1); - for (const { ending, value } of candidates) { - if (value.length >= prefix.length + suffix.length && startsWith(value, prefix) && endsWith(value, suffix) && validateEnding({ ending, value })) { - const matchedStar = value.substring(prefix.length, value.length - suffix.length); - if (!pathIsRelative(matchedStar)) { - return key.replace("*", matchedStar); - } - } - } - } else if (some(candidates, (c) => c.ending !== 0 /* Minimal */ && pattern === c.value) || some(candidates, (c) => c.ending === 0 /* Minimal */ && pattern === c.value && validateEnding(c))) { - return key; - } - } - } - function validateEnding({ ending, value }) { - return ending !== 0 /* Minimal */ || value === processEnding(relativeToBaseUrl, [ending], compilerOptions, host); - } - } - function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, exports, conditions, mode = 0 /* Exact */) { - if (typeof exports === "string") { - const pathOrPattern = getNormalizedAbsolutePath( - combinePaths(packageDirectory, exports), - /*currentDirectory*/ - void 0 - ); - const extensionSwappedTarget = hasTSFileExtension(targetFilePath) ? removeFileExtension(targetFilePath) + tryGetJSExtensionForFile(targetFilePath, options) : void 0; - switch (mode) { - case 0 /* Exact */: - if (comparePaths(targetFilePath, pathOrPattern) === 0 /* EqualTo */ || extensionSwappedTarget && comparePaths(extensionSwappedTarget, pathOrPattern) === 0 /* EqualTo */) { - return { moduleFileToTry: packageName }; - } - break; - case 1 /* Directory */: - if (containsPath(pathOrPattern, targetFilePath)) { - const fragment = getRelativePathFromDirectory( - pathOrPattern, - targetFilePath, - /*ignoreCase*/ - false - ); - return { moduleFileToTry: getNormalizedAbsolutePath( - combinePaths(combinePaths(packageName, exports), fragment), - /*currentDirectory*/ - void 0 - ) }; - } - break; - case 2 /* Pattern */: - const starPos = pathOrPattern.indexOf("*"); - const leadingSlice = pathOrPattern.slice(0, starPos); - const trailingSlice = pathOrPattern.slice(starPos + 1); - if (startsWith(targetFilePath, leadingSlice) && endsWith(targetFilePath, trailingSlice)) { - const starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length); - return { moduleFileToTry: packageName.replace("*", starReplacement) }; - } - if (extensionSwappedTarget && startsWith(extensionSwappedTarget, leadingSlice) && endsWith(extensionSwappedTarget, trailingSlice)) { - const starReplacement = extensionSwappedTarget.slice(leadingSlice.length, extensionSwappedTarget.length - trailingSlice.length); - return { moduleFileToTry: packageName.replace("*", starReplacement) }; - } - break; - } - } else if (Array.isArray(exports)) { - return forEach(exports, (e) => tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, e, conditions)); - } else if (typeof exports === "object" && exports !== null) { - if (allKeysStartWithDot(exports)) { - return forEach(getOwnKeys(exports), (k) => { - const subPackageName = getNormalizedAbsolutePath( - combinePaths(packageName, k), - /*currentDirectory*/ - void 0 - ); - const mode2 = endsWith(k, "/") ? 1 /* Directory */ : stringContains(k, "*") ? 2 /* Pattern */ : 0 /* Exact */; - return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode2); - }); - } else { - for (const key of getOwnKeys(exports)) { - if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { - const subTarget = exports[key]; - const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode); - if (result) { - return result; - } - } - } - } - } - return void 0; - } - function tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, allowedEndings, compilerOptions) { - const normalizedTargetPaths = getPathsRelativeToRootDirs(moduleFileName, rootDirs, getCanonicalFileName); - if (normalizedTargetPaths === void 0) { - return void 0; - } - const normalizedSourcePaths = getPathsRelativeToRootDirs(sourceDirectory, rootDirs, getCanonicalFileName); - const relativePaths = flatMap(normalizedSourcePaths, (sourcePath) => { - return map(normalizedTargetPaths, (targetPath) => ensurePathIsNonModuleName(getRelativePathFromDirectory(sourcePath, targetPath, getCanonicalFileName))); - }); - const shortest = min(relativePaths, compareNumberOfDirectorySeparators); - if (!shortest) { - return void 0; - } - return processEnding(shortest, allowedEndings, compilerOptions); - } - function tryGetModuleNameAsNodeModule({ path, isRedirect }, { getCanonicalFileName, sourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) { - if (!host.fileExists || !host.readFile) { - return void 0; - } - const parts = getNodeModulePathParts(path); - if (!parts) { - return void 0; - } - const preferences = getPreferences(userPreferences, options, importingSourceFile); - const allowedEndings = preferences.getAllowedEndingsInPreferredOrder(); - let moduleSpecifier = path; - let isPackageRootPath = false; - if (!packageNameOnly) { - let packageRootIndex = parts.packageRootIndex; - let moduleFileName; - while (true) { - const { moduleFileToTry, packageRootPath, blockedByExports, verbatimFromExports } = tryDirectoryWithPackageJson(packageRootIndex); - if (getEmitModuleResolutionKind(options) !== 1 /* Classic */) { - if (blockedByExports) { - return void 0; - } - if (verbatimFromExports) { - return moduleFileToTry; - } - } - if (packageRootPath) { - moduleSpecifier = packageRootPath; - isPackageRootPath = true; - break; - } - if (!moduleFileName) - moduleFileName = moduleFileToTry; - packageRootIndex = path.indexOf(directorySeparator, packageRootIndex + 1); - if (packageRootIndex === -1) { - moduleSpecifier = processEnding(moduleFileName, allowedEndings, options, host); - break; - } - } - } - if (isRedirect && !isPackageRootPath) { - return void 0; - } - const globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); - const pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); - if (!(startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { - return void 0; - } - const nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); - const packageName = getPackageNameFromTypesPackageName(nodeModulesDirectoryName); - return getEmitModuleResolutionKind(options) === 1 /* Classic */ && packageName === nodeModulesDirectoryName ? void 0 : packageName; - function tryDirectoryWithPackageJson(packageRootIndex) { - var _a, _b; - const packageRootPath = path.substring(0, packageRootIndex); - const packageJsonPath = combinePaths(packageRootPath, "package.json"); - let moduleFileToTry = path; - let maybeBlockedByTypesVersions = false; - const cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath); - if (typeof cachedPackageJson === "object" || cachedPackageJson === void 0 && host.fileExists(packageJsonPath)) { - const packageJsonContent = (cachedPackageJson == null ? void 0 : cachedPackageJson.contents.packageJsonContent) || JSON.parse(host.readFile(packageJsonPath)); - const importMode = overrideMode || importingSourceFile.impliedNodeFormat; - if (getResolvePackageJsonExports(options)) { - const nodeModulesDirectoryName2 = packageRootPath.substring(parts.topLevelPackageNameIndex + 1); - const packageName2 = getPackageNameFromTypesPackageName(nodeModulesDirectoryName2); - const conditions = getConditions(options, importMode === 99 /* ESNext */); - const fromExports = packageJsonContent.exports ? tryGetModuleNameFromExports(options, path, packageRootPath, packageName2, packageJsonContent.exports, conditions) : void 0; - if (fromExports) { - const withJsExtension = !hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) }; - return { ...withJsExtension, verbatimFromExports: true }; - } - if (packageJsonContent.exports) { - return { moduleFileToTry: path, blockedByExports: true }; - } - } - const versionPaths = packageJsonContent.typesVersions ? getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions) : void 0; - if (versionPaths) { - const subModuleName = path.slice(packageRootPath.length + 1); - const fromPaths = tryGetModuleNameFromPaths( - subModuleName, - versionPaths.paths, - allowedEndings, - host, - options - ); - if (fromPaths === void 0) { - maybeBlockedByTypesVersions = true; - } else { - moduleFileToTry = combinePaths(packageRootPath, fromPaths); - } - } - const mainFileRelative = packageJsonContent.typings || packageJsonContent.types || packageJsonContent.main || "index.js"; - if (isString(mainFileRelative) && !(maybeBlockedByTypesVersions && matchPatternOrExact(tryParsePatterns(versionPaths.paths), mainFileRelative))) { - const mainExportFile = toPath(mainFileRelative, packageRootPath, getCanonicalFileName); - const canonicalModuleFileToTry = getCanonicalFileName(moduleFileToTry); - if (removeFileExtension(mainExportFile) === removeFileExtension(canonicalModuleFileToTry)) { - return { packageRootPath, moduleFileToTry }; - } else if (packageJsonContent.type !== "module" && !fileExtensionIsOneOf(canonicalModuleFileToTry, extensionsNotSupportingExtensionlessResolution) && startsWith(canonicalModuleFileToTry, mainExportFile) && getDirectoryPath(canonicalModuleFileToTry) === removeTrailingDirectorySeparator(mainExportFile) && removeFileExtension(getBaseFileName(canonicalModuleFileToTry)) === "index") { - return { packageRootPath, moduleFileToTry }; - } - } - } else { - const fileName = getCanonicalFileName(moduleFileToTry.substring(parts.packageRootIndex + 1)); - if (fileName === "index.d.ts" || fileName === "index.js" || fileName === "index.ts" || fileName === "index.tsx") { - return { moduleFileToTry, packageRootPath }; - } - } - return { moduleFileToTry }; - } - } - function tryGetAnyFileFromPath(host, path) { - if (!host.fileExists) - return; - const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: 6 /* JSON */ }])); - for (const e of extensions) { - const fullPath = path + e; - if (host.fileExists(fullPath)) { - return fullPath; - } - } - } - function getPathsRelativeToRootDirs(path, rootDirs, getCanonicalFileName) { - return mapDefined(rootDirs, (rootDir) => { - const relativePath = getRelativePathIfInSameVolume(path, rootDir, getCanonicalFileName); - return relativePath !== void 0 && isPathRelativeToParent(relativePath) ? void 0 : relativePath; - }); - } - function processEnding(fileName, allowedEndings, options, host) { - if (fileExtensionIsOneOf(fileName, [".json" /* Json */, ".mjs" /* Mjs */, ".cjs" /* Cjs */])) { - return fileName; - } - const noExtension = removeFileExtension(fileName); - if (fileName === noExtension) { - return fileName; - } - const jsPriority = allowedEndings.indexOf(2 /* JsExtension */); - const tsPriority = allowedEndings.indexOf(3 /* TsExtension */); - if (fileExtensionIsOneOf(fileName, [".mts" /* Mts */, ".cts" /* Cts */]) && tsPriority !== -1 && tsPriority < jsPriority) { - return fileName; - } else if (fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".d.cts" /* Dcts */, ".cts" /* Cts */])) { - return noExtension + getJSExtensionForFile(fileName, options); - } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && stringContains(fileName, ".d.")) { - return tryGetRealFileNameForNonJsDeclarationFileName(fileName); - } - switch (allowedEndings[0]) { - case 0 /* Minimal */: - const withoutIndex = removeSuffix(noExtension, "/index"); - if (host && withoutIndex !== noExtension && tryGetAnyFileFromPath(host, withoutIndex)) { - return noExtension; - } - return withoutIndex; - case 1 /* Index */: - return noExtension; - case 2 /* JsExtension */: - return noExtension + getJSExtensionForFile(fileName, options); - case 3 /* TsExtension */: - if (isDeclarationFileName(fileName)) { - const extensionlessPriority = allowedEndings.findIndex((e) => e === 0 /* Minimal */ || e === 1 /* Index */); - return extensionlessPriority !== -1 && extensionlessPriority < jsPriority ? noExtension : noExtension + getJSExtensionForFile(fileName, options); - } - return fileName; - default: - return Debug.assertNever(allowedEndings[0]); - } - } - function tryGetRealFileNameForNonJsDeclarationFileName(fileName) { - const baseName = getBaseFileName(fileName); - if (!endsWith(fileName, ".ts" /* Ts */) || !stringContains(baseName, ".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */])) - return void 0; - const noExtension = removeExtension(fileName, ".ts" /* Ts */); - const ext = noExtension.substring(noExtension.lastIndexOf(".")); - return noExtension.substring(0, noExtension.indexOf(".d.")) + ext; - } - function getJSExtensionForFile(fileName, options) { - return tryGetJSExtensionForFile(fileName, options) ?? Debug.fail(`Extension ${extensionFromPath(fileName)} is unsupported:: FileName:: ${fileName}`); - } - function tryGetJSExtensionForFile(fileName, options) { - const ext = tryGetExtensionFromPath2(fileName); - switch (ext) { - case ".ts" /* Ts */: - case ".d.ts" /* Dts */: - return ".js" /* Js */; - case ".tsx" /* Tsx */: - return options.jsx === 1 /* Preserve */ ? ".jsx" /* Jsx */ : ".js" /* Js */; - case ".js" /* Js */: - case ".jsx" /* Jsx */: - case ".json" /* Json */: - return ext; - case ".d.mts" /* Dmts */: - case ".mts" /* Mts */: - case ".mjs" /* Mjs */: - return ".mjs" /* Mjs */; - case ".d.cts" /* Dcts */: - case ".cts" /* Cts */: - case ".cjs" /* Cjs */: - return ".cjs" /* Cjs */; - default: - return void 0; - } - } - function getRelativePathIfInSameVolume(path, directoryPath, getCanonicalFileName) { - const relativePath = getRelativePathToDirectoryOrUrl( - directoryPath, - path, - directoryPath, - getCanonicalFileName, - /*isAbsolutePathAnUrl*/ - false - ); - return isRootedDiskPath(relativePath) ? void 0 : relativePath; - } - function isPathRelativeToParent(path) { - return startsWith(path, ".."); - } - var init_moduleSpecifiers = __esm({ - "src/compiler/moduleSpecifiers.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/_namespaces/ts.moduleSpecifiers.ts - var ts_moduleSpecifiers_exports = {}; - __export(ts_moduleSpecifiers_exports, { - countPathComponents: () => countPathComponents, - forEachFileNameOfModule: () => forEachFileNameOfModule, - getModuleSpecifier: () => getModuleSpecifier, - getModuleSpecifiers: () => getModuleSpecifiers, - getModuleSpecifiersWithCacheInfo: () => getModuleSpecifiersWithCacheInfo, - getNodeModulesPackageName: () => getNodeModulesPackageName, - tryGetJSExtensionForFile: () => tryGetJSExtensionForFile, - tryGetModuleSpecifiersFromCache: () => tryGetModuleSpecifiersFromCache, - tryGetRealFileNameForNonJsDeclarationFileName: () => tryGetRealFileNameForNonJsDeclarationFileName, - updateModuleSpecifier: () => updateModuleSpecifier - }); - var init_ts_moduleSpecifiers = __esm({ - "src/compiler/_namespaces/ts.moduleSpecifiers.ts"() { - "use strict"; - init_moduleSpecifiers(); - } - }); - - // src/compiler/checker.ts - function NodeLinks() { - this.flags = 0 /* None */; - } - function getNodeId(node) { - if (!node.id) { - node.id = nextNodeId; - nextNodeId++; - } - return node.id; - } - function getSymbolId(symbol) { - if (!symbol.id) { - symbol.id = nextSymbolId; - nextSymbolId++; - } - return symbol.id; - } - function isInstantiatedModule(node, preserveConstEnums) { - const moduleState = getModuleInstanceState(node); - return moduleState === 1 /* Instantiated */ || preserveConstEnums && moduleState === 2 /* ConstEnumOnly */; - } - function createTypeChecker(host) { - var deferredDiagnosticsCallbacks = []; - var addLazyDiagnostic = (arg) => { - deferredDiagnosticsCallbacks.push(arg); - }; - var cancellationToken; - var requestedExternalEmitHelperNames = /* @__PURE__ */ new Set(); - var requestedExternalEmitHelpers; - var externalHelpersModule; - var Symbol47 = objectAllocator.getSymbolConstructor(); - var Type27 = objectAllocator.getTypeConstructor(); - var Signature15 = objectAllocator.getSignatureConstructor(); - var typeCount = 0; - var symbolCount = 0; - var totalInstantiationCount = 0; - var instantiationCount = 0; - var instantiationDepth = 0; - var inlineLevel = 0; - var currentNode; - var varianceTypeParameter; - var isInferencePartiallyBlocked = false; - var emptySymbols = createSymbolTable(); - var arrayVariances = [1 /* Covariant */]; - var compilerOptions = host.getCompilerOptions(); - var languageVersion = getEmitScriptTarget(compilerOptions); - var moduleKind = getEmitModuleKind(compilerOptions); - var legacyDecorators = !!compilerOptions.experimentalDecorators; - var useDefineForClassFields = getUseDefineForClassFields(compilerOptions); - var emitStandardClassFields = getEmitStandardClassFields(compilerOptions); - var allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions); - var strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks"); - var strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes"); - var strictBindCallApply = getStrictOptionValue(compilerOptions, "strictBindCallApply"); - var strictPropertyInitialization = getStrictOptionValue(compilerOptions, "strictPropertyInitialization"); - var noImplicitAny = getStrictOptionValue(compilerOptions, "noImplicitAny"); - var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis"); - var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables"); - var keyofStringsOnly = !!compilerOptions.keyofStringsOnly; - var defaultIndexFlags = keyofStringsOnly ? 1 /* StringsOnly */ : 0 /* None */; - var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 8192 /* FreshLiteral */; - var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes; - var checkBinaryExpression = createCheckBinaryExpression(); - var emitResolver = createResolver(); - var nodeBuilder = createNodeBuilder(); - var globals = createSymbolTable(); - var undefinedSymbol = createSymbol(4 /* Property */, "undefined"); - undefinedSymbol.declarations = []; - var globalThisSymbol = createSymbol(1536 /* Module */, "globalThis", 8 /* Readonly */); - globalThisSymbol.exports = globals; - globalThisSymbol.declarations = []; - globals.set(globalThisSymbol.escapedName, globalThisSymbol); - var argumentsSymbol = createSymbol(4 /* Property */, "arguments"); - var requireSymbol = createSymbol(4 /* Property */, "require"); - var isolatedModulesLikeFlagName = compilerOptions.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"; - var canCollectSymbolAliasAccessabilityData = !compilerOptions.verbatimModuleSyntax || !!compilerOptions.importsNotUsedAsValues; - var apparentArgumentCount; - var lastGetCombinedNodeFlagsNode; - var lastGetCombinedNodeFlagsResult = 0 /* None */; - var lastGetCombinedModifierFlagsNode; - var lastGetCombinedModifierFlagsResult = 0 /* None */; - const checker = { - getNodeCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.nodeCount, 0), - getIdentifierCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.identifierCount, 0), - getSymbolCount: () => reduceLeft(host.getSourceFiles(), (n, s) => n + s.symbolCount, symbolCount), - getTypeCount: () => typeCount, - getInstantiationCount: () => totalInstantiationCount, - getRelationCacheSizes: () => ({ - assignable: assignableRelation.size, - identity: identityRelation.size, - subtype: subtypeRelation.size, - strictSubtype: strictSubtypeRelation.size - }), - isUndefinedSymbol: (symbol) => symbol === undefinedSymbol, - isArgumentsSymbol: (symbol) => symbol === argumentsSymbol, - isUnknownSymbol: (symbol) => symbol === unknownSymbol, - getMergedSymbol, - getDiagnostics: getDiagnostics2, - getGlobalDiagnostics, - getRecursionIdentity, - getUnmatchedProperties, - getTypeOfSymbolAtLocation: (symbol, locationIn) => { - const location = getParseTreeNode(locationIn); - return location ? getTypeOfSymbolAtLocation(symbol, location) : errorType; - }, - getTypeOfSymbol, - getSymbolsOfParameterPropertyDeclaration: (parameterIn, parameterName) => { - const parameter = getParseTreeNode(parameterIn, isParameter); - if (parameter === void 0) - return Debug.fail("Cannot get symbols of a synthetic parameter that cannot be resolved to a parse-tree node."); - Debug.assert(isParameterPropertyDeclaration(parameter, parameter.parent)); - return getSymbolsOfParameterPropertyDeclaration(parameter, escapeLeadingUnderscores(parameterName)); - }, - getDeclaredTypeOfSymbol, - getPropertiesOfType, - getPropertyOfType: (type, name) => getPropertyOfType(type, escapeLeadingUnderscores(name)), - getPrivateIdentifierPropertyOfType: (leftType, name, location) => { - const node = getParseTreeNode(location); - if (!node) { - return void 0; - } - const propName = escapeLeadingUnderscores(name); - const lexicallyScopedIdentifier = lookupSymbolForPrivateIdentifierDeclaration(propName, node); - return lexicallyScopedIdentifier ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedIdentifier) : void 0; - }, - getTypeOfPropertyOfType: (type, name) => getTypeOfPropertyOfType(type, escapeLeadingUnderscores(name)), - getIndexInfoOfType: (type, kind) => getIndexInfoOfType(type, kind === 0 /* String */ ? stringType : numberType), - getIndexInfosOfType, - getIndexInfosOfIndexSymbol, - getSignaturesOfType, - getIndexTypeOfType: (type, kind) => getIndexTypeOfType(type, kind === 0 /* String */ ? stringType : numberType), - getIndexType: (type) => getIndexType(type), - getBaseTypes, - getBaseTypeOfLiteralType, - getWidenedType, - getTypeFromTypeNode: (nodeIn) => { - const node = getParseTreeNode(nodeIn, isTypeNode); - return node ? getTypeFromTypeNode(node) : errorType; - }, - getParameterType: getTypeAtPosition, - getParameterIdentifierInfoAtPosition, - getPromisedTypeOfPromise, - getAwaitedType: (type) => getAwaitedType(type), - getReturnTypeOfSignature, - isNullableType, - getNullableType, - getNonNullableType, - getNonOptionalType: removeOptionalTypeMarker, - getTypeArguments, - typeToTypeNode: nodeBuilder.typeToTypeNode, - indexInfoToIndexSignatureDeclaration: nodeBuilder.indexInfoToIndexSignatureDeclaration, - signatureToSignatureDeclaration: nodeBuilder.signatureToSignatureDeclaration, - symbolToEntityName: nodeBuilder.symbolToEntityName, - symbolToExpression: nodeBuilder.symbolToExpression, - symbolToNode: nodeBuilder.symbolToNode, - symbolToTypeParameterDeclarations: nodeBuilder.symbolToTypeParameterDeclarations, - symbolToParameterDeclaration: nodeBuilder.symbolToParameterDeclaration, - typeParameterToDeclaration: nodeBuilder.typeParameterToDeclaration, - getSymbolsInScope: (locationIn, meaning) => { - const location = getParseTreeNode(locationIn); - return location ? getSymbolsInScope(location, meaning) : []; - }, - getSymbolAtLocation: (nodeIn) => { - const node = getParseTreeNode(nodeIn); - return node ? getSymbolAtLocation( - node, - /*ignoreErrors*/ - true - ) : void 0; - }, - getIndexInfosAtLocation: (nodeIn) => { - const node = getParseTreeNode(nodeIn); - return node ? getIndexInfosAtLocation(node) : void 0; - }, - getShorthandAssignmentValueSymbol: (nodeIn) => { - const node = getParseTreeNode(nodeIn); - return node ? getShorthandAssignmentValueSymbol(node) : void 0; - }, - getExportSpecifierLocalTargetSymbol: (nodeIn) => { - const node = getParseTreeNode(nodeIn, isExportSpecifier); - return node ? getExportSpecifierLocalTargetSymbol(node) : void 0; - }, - getExportSymbolOfSymbol(symbol) { - return getMergedSymbol(symbol.exportSymbol || symbol); - }, - getTypeAtLocation: (nodeIn) => { - const node = getParseTreeNode(nodeIn); - return node ? getTypeOfNode(node) : errorType; - }, - getTypeOfAssignmentPattern: (nodeIn) => { - const node = getParseTreeNode(nodeIn, isAssignmentPattern); - return node && getTypeOfAssignmentPattern(node) || errorType; - }, - getPropertySymbolOfDestructuringAssignment: (locationIn) => { - const location = getParseTreeNode(locationIn, isIdentifier); - return location ? getPropertySymbolOfDestructuringAssignment(location) : void 0; - }, - signatureToString: (signature, enclosingDeclaration, flags, kind) => { - return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind); - }, - typeToString: (type, enclosingDeclaration, flags) => { - return typeToString(type, getParseTreeNode(enclosingDeclaration), flags); - }, - symbolToString: (symbol, enclosingDeclaration, meaning, flags) => { - return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags); - }, - typePredicateToString: (predicate, enclosingDeclaration, flags) => { - return typePredicateToString(predicate, getParseTreeNode(enclosingDeclaration), flags); - }, - writeSignature: (signature, enclosingDeclaration, flags, kind, writer) => { - return signatureToString(signature, getParseTreeNode(enclosingDeclaration), flags, kind, writer); - }, - writeType: (type, enclosingDeclaration, flags, writer) => { - return typeToString(type, getParseTreeNode(enclosingDeclaration), flags, writer); - }, - writeSymbol: (symbol, enclosingDeclaration, meaning, flags, writer) => { - return symbolToString(symbol, getParseTreeNode(enclosingDeclaration), meaning, flags, writer); - }, - writeTypePredicate: (predicate, enclosingDeclaration, flags, writer) => { - return typePredicateToString(predicate, getParseTreeNode(enclosingDeclaration), flags, writer); - }, - getAugmentedPropertiesOfType, - getRootSymbols, - getSymbolOfExpando, - getContextualType: (nodeIn, contextFlags) => { - const node = getParseTreeNode(nodeIn, isExpression); - if (!node) { - return void 0; - } - if (contextFlags & 4 /* Completions */) { - return runWithInferenceBlockedFromSourceNode(node, () => getContextualType2(node, contextFlags)); - } - return getContextualType2(node, contextFlags); - }, - getContextualTypeForObjectLiteralElement: (nodeIn) => { - const node = getParseTreeNode(nodeIn, isObjectLiteralElementLike); - return node ? getContextualTypeForObjectLiteralElement( - node, - /*contextFlags*/ - void 0 - ) : void 0; - }, - getContextualTypeForArgumentAtIndex: (nodeIn, argIndex) => { - const node = getParseTreeNode(nodeIn, isCallLikeExpression); - return node && getContextualTypeForArgumentAtIndex(node, argIndex); - }, - getContextualTypeForJsxAttribute: (nodeIn) => { - const node = getParseTreeNode(nodeIn, isJsxAttributeLike); - return node && getContextualTypeForJsxAttribute( - node, - /*contextFlags*/ - void 0 - ); - }, - isContextSensitive, - getTypeOfPropertyOfContextualType, - getFullyQualifiedName, - getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */), - getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) => { - if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) { - return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ - )); - } - return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ - )); - }, - getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)), - getExpandedParameters, - hasEffectiveRestParameter, - containsArgumentsReference, - getConstantValue: (nodeIn) => { - const node = getParseTreeNode(nodeIn, canHaveConstantValue); - return node ? getConstantValue2(node) : void 0; - }, - isValidPropertyAccess: (nodeIn, propertyName) => { - const node = getParseTreeNode(nodeIn, isPropertyAccessOrQualifiedNameOrImportTypeNode); - return !!node && isValidPropertyAccess(node, escapeLeadingUnderscores(propertyName)); - }, - isValidPropertyAccessForCompletions: (nodeIn, type, property) => { - const node = getParseTreeNode(nodeIn, isPropertyAccessExpression); - return !!node && isValidPropertyAccessForCompletions(node, type, property); - }, - getSignatureFromDeclaration: (declarationIn) => { - const declaration = getParseTreeNode(declarationIn, isFunctionLike); - return declaration ? getSignatureFromDeclaration(declaration) : void 0; - }, - isImplementationOfOverload: (nodeIn) => { - const node = getParseTreeNode(nodeIn, isFunctionLike); - return node ? isImplementationOfOverload(node) : void 0; - }, - getImmediateAliasedSymbol, - getAliasedSymbol: resolveAlias, - getEmitResolver, - getExportsOfModule: getExportsOfModuleAsArray, - getExportsAndPropertiesOfModule, - forEachExportAndPropertyOfModule, - getSymbolWalker: createGetSymbolWalker( - getRestTypeOfSignature, - getTypePredicateOfSignature, - getReturnTypeOfSignature, - getBaseTypes, - resolveStructuredTypeMembers, - getTypeOfSymbol, - getResolvedSymbol, - getConstraintOfTypeParameter, - getFirstIdentifier, - getTypeArguments - ), - getAmbientModules, - getJsxIntrinsicTagNamesAt, - isOptionalParameter: (nodeIn) => { - const node = getParseTreeNode(nodeIn, isParameter); - return node ? isOptionalParameter(node) : false; - }, - tryGetMemberInModuleExports: (name, symbol) => tryGetMemberInModuleExports(escapeLeadingUnderscores(name), symbol), - tryGetMemberInModuleExportsAndProperties: (name, symbol) => tryGetMemberInModuleExportsAndProperties(escapeLeadingUnderscores(name), symbol), - tryFindAmbientModule: (moduleName) => tryFindAmbientModule( - moduleName, - /*withAugmentations*/ - true - ), - tryFindAmbientModuleWithoutAugmentations: (moduleName) => { - return tryFindAmbientModule( - moduleName, - /*withAugmentations*/ - false - ); - }, - getApparentType, - getUnionType, - isTypeAssignableTo, - createAnonymousType, - createSignature, - createSymbol, - createIndexInfo, - getAnyType: () => anyType, - getStringType: () => stringType, - getStringLiteralType, - getNumberType: () => numberType, - getNumberLiteralType, - getBigIntType: () => bigintType, - createPromiseType, - createArrayType, - getElementTypeOfArrayType, - getBooleanType: () => booleanType, - getFalseType: (fresh) => fresh ? falseType : regularFalseType, - getTrueType: (fresh) => fresh ? trueType : regularTrueType, - getVoidType: () => voidType, - getUndefinedType: () => undefinedType, - getNullType: () => nullType, - getESSymbolType: () => esSymbolType, - getNeverType: () => neverType, - getOptionalType: () => optionalType, - getPromiseType: () => getGlobalPromiseType( - /*reportErrors*/ - false - ), - getPromiseLikeType: () => getGlobalPromiseLikeType( - /*reportErrors*/ - false - ), - getAsyncIterableType: () => { - const type = getGlobalAsyncIterableType( - /*reportErrors*/ - false - ); - if (type === emptyGenericType) - return void 0; - return type; - }, - isSymbolAccessible, - isArrayType, - isTupleType, - isArrayLikeType, - isEmptyAnonymousObjectType, - isTypeInvalidDueToUnionDiscriminant, - getExactOptionalProperties, - getAllPossiblePropertiesOfTypes, - getSuggestedSymbolForNonexistentProperty, - getSuggestionForNonexistentProperty, - getSuggestedSymbolForNonexistentJSXAttribute, - getSuggestedSymbolForNonexistentSymbol: (location, name, meaning) => getSuggestedSymbolForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning), - getSuggestionForNonexistentSymbol: (location, name, meaning) => getSuggestionForNonexistentSymbol(location, escapeLeadingUnderscores(name), meaning), - getSuggestedSymbolForNonexistentModule, - getSuggestionForNonexistentExport, - getSuggestedSymbolForNonexistentClassMember, - getBaseConstraintOfType, - getDefaultFromTypeParameter: (type) => type && type.flags & 262144 /* TypeParameter */ ? getDefaultFromTypeParameter(type) : void 0, - resolveName(name, location, meaning, excludeGlobals) { - return resolveName( - location, - escapeLeadingUnderscores(name), - meaning, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false, - excludeGlobals - ); - }, - getJsxNamespace: (n) => unescapeLeadingUnderscores(getJsxNamespace(n)), - getJsxFragmentFactory: (n) => { - const jsxFragmentFactory = getJsxFragmentFactoryEntity(n); - return jsxFragmentFactory && unescapeLeadingUnderscores(getFirstIdentifier(jsxFragmentFactory).escapedText); - }, - getAccessibleSymbolChain, - getTypePredicateOfSignature, - resolveExternalModuleName: (moduleSpecifierIn) => { - const moduleSpecifier = getParseTreeNode(moduleSpecifierIn, isExpression); - return moduleSpecifier && resolveExternalModuleName( - moduleSpecifier, - moduleSpecifier, - /*ignoreErrors*/ - true - ); - }, - resolveExternalModuleSymbol, - tryGetThisTypeAt: (nodeIn, includeGlobalThis, container) => { - const node = getParseTreeNode(nodeIn); - return node && tryGetThisTypeAt(node, includeGlobalThis, container); - }, - getTypeArgumentConstraint: (nodeIn) => { - const node = getParseTreeNode(nodeIn, isTypeNode); - return node && getTypeArgumentConstraint(node); - }, - getSuggestionDiagnostics: (fileIn, ct) => { - const file = getParseTreeNode(fileIn, isSourceFile) || Debug.fail("Could not determine parsed source file."); - if (skipTypeChecking(file, compilerOptions, host)) { - return emptyArray; - } - let diagnostics2; - try { - cancellationToken = ct; - checkSourceFileWithEagerDiagnostics(file); - Debug.assert(!!(getNodeLinks(file).flags & 1 /* TypeChecked */)); - diagnostics2 = addRange(diagnostics2, suggestionDiagnostics.getDiagnostics(file.fileName)); - checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(file), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && !unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { - (diagnostics2 || (diagnostics2 = [])).push({ ...diag2, category: 2 /* Suggestion */ }); - } - }); - return diagnostics2 || emptyArray; - } finally { - cancellationToken = void 0; - } - }, - runWithCancellationToken: (token, callback) => { - try { - cancellationToken = token; - return callback(checker); - } finally { - cancellationToken = void 0; - } - }, - getLocalTypeParametersOfClassOrInterfaceOrTypeAlias, - isDeclarationVisible, - isPropertyAccessible, - getTypeOnlyAliasDeclaration, - getMemberOverrideModifierStatus, - isTypeParameterPossiblyReferenced, - typeHasCallOrConstructSignatures - }; - function runWithoutResolvedSignatureCaching(node, fn) { - const cachedSignatures = []; - while (node) { - if (isCallLikeExpression(node)) { - const nodeLinks2 = getNodeLinks(node); - const resolvedSignature = nodeLinks2.resolvedSignature; - cachedSignatures.push([nodeLinks2, resolvedSignature]); - nodeLinks2.resolvedSignature = void 0; - } - node = node.parent; - } - const result = fn(); - for (const [nodeLinks2, resolvedSignature] of cachedSignatures) { - nodeLinks2.resolvedSignature = resolvedSignature; - } - return result; - } - function runWithInferenceBlockedFromSourceNode(node, fn) { - const containingCall = findAncestor(node, isCallLikeExpression); - if (containingCall) { - let toMarkSkip = node; - do { - getNodeLinks(toMarkSkip).skipDirectInference = true; - toMarkSkip = toMarkSkip.parent; - } while (toMarkSkip && toMarkSkip !== containingCall); - } - isInferencePartiallyBlocked = true; - const result = runWithoutResolvedSignatureCaching(node, fn); - isInferencePartiallyBlocked = false; - if (containingCall) { - let toMarkSkip = node; - do { - getNodeLinks(toMarkSkip).skipDirectInference = void 0; - toMarkSkip = toMarkSkip.parent; - } while (toMarkSkip && toMarkSkip !== containingCall); - } - return result; - } - function getResolvedSignatureWorker(nodeIn, candidatesOutArray, argumentCount, checkMode) { - const node = getParseTreeNode(nodeIn, isCallLikeExpression); - apparentArgumentCount = argumentCount; - const res = !node ? void 0 : getResolvedSignature(node, candidatesOutArray, checkMode); - apparentArgumentCount = void 0; - return res; - } - var tupleTypes = /* @__PURE__ */ new Map(); - var unionTypes = /* @__PURE__ */ new Map(); - var unionOfUnionTypes = /* @__PURE__ */ new Map(); - var intersectionTypes = /* @__PURE__ */ new Map(); - var stringLiteralTypes = /* @__PURE__ */ new Map(); - var numberLiteralTypes = /* @__PURE__ */ new Map(); - var bigIntLiteralTypes = /* @__PURE__ */ new Map(); - var enumLiteralTypes = /* @__PURE__ */ new Map(); - var indexedAccessTypes = /* @__PURE__ */ new Map(); - var templateLiteralTypes = /* @__PURE__ */ new Map(); - var stringMappingTypes = /* @__PURE__ */ new Map(); - var substitutionTypes = /* @__PURE__ */ new Map(); - var subtypeReductionCache = /* @__PURE__ */ new Map(); - var decoratorContextOverrideTypeCache = /* @__PURE__ */ new Map(); - var cachedTypes = /* @__PURE__ */ new Map(); - var evolvingArrayTypes = []; - var undefinedProperties = /* @__PURE__ */ new Map(); - var markerTypes = /* @__PURE__ */ new Set(); - var unknownSymbol = createSymbol(4 /* Property */, "unknown"); - var resolvingSymbol = createSymbol(0, "__resolving__" /* Resolving */); - var unresolvedSymbols = /* @__PURE__ */ new Map(); - var errorTypes = /* @__PURE__ */ new Map(); - var anyType = createIntrinsicType(1 /* Any */, "any"); - var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */); - var wildcardType = createIntrinsicType(1 /* Any */, "any"); - var errorType = createIntrinsicType(1 /* Any */, "error"); - var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved"); - var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */); - var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic"); - var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); - var nonNullUnknownType = createIntrinsicType(2 /* Unknown */, "unknown"); - var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */); - var missingType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedOrMissingType = exactOptionalPropertyTypes ? missingType : undefinedType; - var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */); - var stringType = createIntrinsicType(4 /* String */, "string"); - var numberType = createIntrinsicType(8 /* Number */, "number"); - var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); - var falseType = createIntrinsicType(512 /* BooleanLiteral */, "false"); - var regularFalseType = createIntrinsicType(512 /* BooleanLiteral */, "false"); - var trueType = createIntrinsicType(512 /* BooleanLiteral */, "true"); - var regularTrueType = createIntrinsicType(512 /* BooleanLiteral */, "true"); - trueType.regularType = regularTrueType; - trueType.freshType = trueType; - regularTrueType.regularType = regularTrueType; - regularTrueType.freshType = trueType; - falseType.regularType = regularFalseType; - falseType.freshType = falseType; - regularFalseType.regularType = regularFalseType; - regularFalseType.freshType = falseType; - var booleanType = getUnionType([regularFalseType, regularTrueType]); - var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, "symbol"); - var voidType = createIntrinsicType(16384 /* Void */, "void"); - var neverType = createIntrinsicType(131072 /* Never */, "never"); - var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */); - var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); - var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never"); - var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); - var stringOrNumberType = getUnionType([stringType, numberType]); - var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]); - var keyofConstraintType = keyofStringsOnly ? stringType : stringNumberSymbolType; - var numberOrBigIntType = getUnionType([numberType, bigintType]); - var templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]); - var numericStringType = getTemplateLiteralType(["", ""], [numberType]); - var restrictiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t, () => "(restrictive mapper)"); - var permissiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? wildcardType : t, () => "(permissive mapper)"); - var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never"); - var uniqueLiteralMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t, () => "(unique literal mapper)"); - var outofbandVarianceMarkerHandler; - var reportUnreliableMapper = makeFunctionTypeMapper((t) => { - if (outofbandVarianceMarkerHandler && (t === markerSuperType || t === markerSubType || t === markerOtherType)) { - outofbandVarianceMarkerHandler( - /*onlyUnreliable*/ - true - ); - } - return t; - }, () => "(unmeasurable reporter)"); - var reportUnmeasurableMapper = makeFunctionTypeMapper((t) => { - if (outofbandVarianceMarkerHandler && (t === markerSuperType || t === markerSubType || t === markerOtherType)) { - outofbandVarianceMarkerHandler( - /*onlyUnreliable*/ - false - ); - } - return t; - }, () => "(unreliable reporter)"); - var emptyObjectType = createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - emptyArray - ); - var emptyJsxObjectType = createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - emptyArray - ); - emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */; - var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */); - emptyTypeLiteralSymbol.members = createSymbolTable(); - var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, emptyArray); - var unknownEmptyObjectType = createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - emptyArray - ); - var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType; - var emptyGenericType = createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - emptyArray - ); - emptyGenericType.instantiations = /* @__PURE__ */ new Map(); - var anyFunctionType = createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - emptyArray - ); - anyFunctionType.objectFlags |= 262144 /* NonInferrableType */; - var noConstraintType = createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - emptyArray - ); - var circularConstraintType = createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - emptyArray - ); - var resolvingDefaultType = createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - emptyArray - ); - var markerSuperType = createTypeParameter(); - var markerSubType = createTypeParameter(); - markerSubType.constraint = markerSuperType; - var markerOtherType = createTypeParameter(); - var markerSuperTypeForCheck = createTypeParameter(); - var markerSubTypeForCheck = createTypeParameter(); - markerSubTypeForCheck.constraint = markerSuperTypeForCheck; - var noTypePredicate = createTypePredicate(1 /* Identifier */, "<>", 0, anyType); - var anySignature = createSignature( - /*declaration*/ - void 0, - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - emptyArray, - anyType, - /*resolvedTypePredicate*/ - void 0, - 0, - 0 /* None */ - ); - var unknownSignature = createSignature( - /*declaration*/ - void 0, - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - emptyArray, - errorType, - /*resolvedTypePredicate*/ - void 0, - 0, - 0 /* None */ - ); - var resolvingSignature = createSignature( - /*declaration*/ - void 0, - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - emptyArray, - anyType, - /*resolvedTypePredicate*/ - void 0, - 0, - 0 /* None */ - ); - var silentNeverSignature = createSignature( - /*declaration*/ - void 0, - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - emptyArray, - silentNeverType, - /*resolvedTypePredicate*/ - void 0, - 0, - 0 /* None */ - ); - var enumNumberIndexInfo = createIndexInfo( - numberType, - stringType, - /*isReadonly*/ - true - ); - var iterationTypesCache = /* @__PURE__ */ new Map(); - var noIterationTypes = { - get yieldType() { - return Debug.fail("Not supported"); - }, - get returnType() { - return Debug.fail("Not supported"); - }, - get nextType() { - return Debug.fail("Not supported"); - } - }; - var anyIterationTypes = createIterationTypes(anyType, anyType, anyType); - var anyIterationTypesExceptNext = createIterationTypes(anyType, anyType, unknownType); - var defaultIterationTypes = createIterationTypes(neverType, anyType, undefinedType); - var asyncIterationTypesResolver = { - iterableCacheKey: "iterationTypesOfAsyncIterable", - iteratorCacheKey: "iterationTypesOfAsyncIterator", - iteratorSymbolName: "asyncIterator", - getGlobalIteratorType: getGlobalAsyncIteratorType, - getGlobalIterableType: getGlobalAsyncIterableType, - getGlobalIterableIteratorType: getGlobalAsyncIterableIteratorType, - getGlobalGeneratorType: getGlobalAsyncGeneratorType, - resolveIterationType: (type, errorNode) => getAwaitedType(type, errorNode, Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member), - mustHaveANextMethodDiagnostic: Diagnostics.An_async_iterator_must_have_a_next_method, - mustBeAMethodDiagnostic: Diagnostics.The_0_property_of_an_async_iterator_must_be_a_method, - mustHaveAValueDiagnostic: Diagnostics.The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property - }; - var syncIterationTypesResolver = { - iterableCacheKey: "iterationTypesOfIterable", - iteratorCacheKey: "iterationTypesOfIterator", - iteratorSymbolName: "iterator", - getGlobalIteratorType, - getGlobalIterableType, - getGlobalIterableIteratorType, - getGlobalGeneratorType, - resolveIterationType: (type, _errorNode) => type, - mustHaveANextMethodDiagnostic: Diagnostics.An_iterator_must_have_a_next_method, - mustBeAMethodDiagnostic: Diagnostics.The_0_property_of_an_iterator_must_be_a_method, - mustHaveAValueDiagnostic: Diagnostics.The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property - }; - var amalgamatedDuplicates; - var reverseMappedCache = /* @__PURE__ */ new Map(); - var homomorphicMappedTypeInferenceStack = []; - var ambientModulesCache; - var patternAmbientModules; - var patternAmbientModuleAugmentations; - var globalObjectType; - var globalFunctionType; - var globalCallableFunctionType; - var globalNewableFunctionType; - var globalArrayType; - var globalReadonlyArrayType; - var globalStringType; - var globalNumberType; - var globalBooleanType; - var globalRegExpType; - var globalThisType; - var anyArrayType; - var autoArrayType; - var anyReadonlyArrayType; - var deferredGlobalNonNullableTypeAlias; - var deferredGlobalESSymbolConstructorSymbol; - var deferredGlobalESSymbolConstructorTypeSymbol; - var deferredGlobalESSymbolType; - var deferredGlobalTypedPropertyDescriptorType; - var deferredGlobalPromiseType; - var deferredGlobalPromiseLikeType; - var deferredGlobalPromiseConstructorSymbol; - var deferredGlobalPromiseConstructorLikeType; - var deferredGlobalIterableType; - var deferredGlobalIteratorType; - var deferredGlobalIterableIteratorType; - var deferredGlobalGeneratorType; - var deferredGlobalIteratorYieldResultType; - var deferredGlobalIteratorReturnResultType; - var deferredGlobalAsyncIterableType; - var deferredGlobalAsyncIteratorType; - var deferredGlobalAsyncIterableIteratorType; - var deferredGlobalAsyncGeneratorType; - var deferredGlobalTemplateStringsArrayType; - var deferredGlobalImportMetaType; - var deferredGlobalImportMetaExpressionType; - var deferredGlobalImportCallOptionsType; - var deferredGlobalDisposableType; - var deferredGlobalAsyncDisposableType; - var deferredGlobalExtractSymbol; - var deferredGlobalOmitSymbol; - var deferredGlobalAwaitedSymbol; - var deferredGlobalBigIntType; - var deferredGlobalNaNSymbol; - var deferredGlobalRecordSymbol; - var deferredGlobalClassDecoratorContextType; - var deferredGlobalClassMethodDecoratorContextType; - var deferredGlobalClassGetterDecoratorContextType; - var deferredGlobalClassSetterDecoratorContextType; - var deferredGlobalClassAccessorDecoratorContextType; - var deferredGlobalClassAccessorDecoratorTargetType; - var deferredGlobalClassAccessorDecoratorResultType; - var deferredGlobalClassFieldDecoratorContextType; - var allPotentiallyUnusedIdentifiers = /* @__PURE__ */ new Map(); - var flowLoopStart = 0; - var flowLoopCount = 0; - var sharedFlowCount = 0; - var flowAnalysisDisabled = false; - var flowInvocationCount = 0; - var lastFlowNode; - var lastFlowNodeReachable; - var flowTypeCache; - var contextualTypeNodes = []; - var contextualTypes = []; - var contextualIsCache = []; - var contextualTypeCount = 0; - var inferenceContextNodes = []; - var inferenceContexts = []; - var inferenceContextCount = 0; - var emptyStringType = getStringLiteralType(""); - var zeroType = getNumberLiteralType(0); - var zeroBigIntType = getBigIntLiteralType({ negative: false, base10Value: "0" }); - var resolutionTargets = []; - var resolutionResults = []; - var resolutionPropertyNames = []; - var resolutionStart = 0; - var inVarianceComputation = false; - var suggestionCount = 0; - var maximumSuggestionCount = 10; - var mergedSymbols = []; - var symbolLinks = []; - var nodeLinks = []; - var flowLoopCaches = []; - var flowLoopNodes = []; - var flowLoopKeys = []; - var flowLoopTypes = []; - var sharedFlowNodes = []; - var sharedFlowTypes = []; - var flowNodeReachable = []; - var flowNodePostSuper = []; - var potentialThisCollisions = []; - var potentialNewTargetCollisions = []; - var potentialWeakMapSetCollisions = []; - var potentialReflectCollisions = []; - var potentialUnusedRenamedBindingElementsInTypes = []; - var awaitedTypeStack = []; - var diagnostics = createDiagnosticCollection(); - var suggestionDiagnostics = createDiagnosticCollection(); - var typeofType = createTypeofType(); - var _jsxNamespace; - var _jsxFactoryEntity; - var subtypeRelation = /* @__PURE__ */ new Map(); - var strictSubtypeRelation = /* @__PURE__ */ new Map(); - var assignableRelation = /* @__PURE__ */ new Map(); - var comparableRelation = /* @__PURE__ */ new Map(); - var identityRelation = /* @__PURE__ */ new Map(); - var enumRelation = /* @__PURE__ */ new Map(); - var builtinGlobals = createSymbolTable(); - builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol); - var suggestedExtensions = [ - [".mts", ".mjs"], - [".ts", ".js"], - [".cts", ".cjs"], - [".mjs", ".mjs"], - [".js", ".js"], - [".cjs", ".cjs"], - [".tsx", compilerOptions.jsx === 1 /* Preserve */ ? ".jsx" : ".js"], - [".jsx", ".jsx"], - [".json", ".json"] - ]; - initializeTypeChecker(); - return checker; - function getCachedType(key) { - return key ? cachedTypes.get(key) : void 0; - } - function setCachedType(key, type) { - if (key) - cachedTypes.set(key, type); - return type; - } - function getJsxNamespace(location) { - if (location) { - const file = getSourceFileOfNode(location); - if (file) { - if (isJsxOpeningFragment(location)) { - if (file.localJsxFragmentNamespace) { - return file.localJsxFragmentNamespace; - } - const jsxFragmentPragma = file.pragmas.get("jsxfrag"); - if (jsxFragmentPragma) { - const chosenPragma = isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma; - file.localJsxFragmentFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion); - visitNode(file.localJsxFragmentFactory, markAsSynthetic, isEntityName); - if (file.localJsxFragmentFactory) { - return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText; - } - } - const entity = getJsxFragmentFactoryEntity(location); - if (entity) { - file.localJsxFragmentFactory = entity; - return file.localJsxFragmentNamespace = getFirstIdentifier(entity).escapedText; - } - } else { - const localJsxNamespace = getLocalJsxNamespace(file); - if (localJsxNamespace) { - return file.localJsxNamespace = localJsxNamespace; - } - } - } - } - if (!_jsxNamespace) { - _jsxNamespace = "React"; - if (compilerOptions.jsxFactory) { - _jsxFactoryEntity = parseIsolatedEntityName(compilerOptions.jsxFactory, languageVersion); - visitNode(_jsxFactoryEntity, markAsSynthetic); - if (_jsxFactoryEntity) { - _jsxNamespace = getFirstIdentifier(_jsxFactoryEntity).escapedText; - } - } else if (compilerOptions.reactNamespace) { - _jsxNamespace = escapeLeadingUnderscores(compilerOptions.reactNamespace); - } - } - if (!_jsxFactoryEntity) { - _jsxFactoryEntity = factory.createQualifiedName(factory.createIdentifier(unescapeLeadingUnderscores(_jsxNamespace)), "createElement"); - } - return _jsxNamespace; - } - function getLocalJsxNamespace(file) { - if (file.localJsxNamespace) { - return file.localJsxNamespace; - } - const jsxPragma = file.pragmas.get("jsx"); - if (jsxPragma) { - const chosenPragma = isArray(jsxPragma) ? jsxPragma[0] : jsxPragma; - file.localJsxFactory = parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion); - visitNode(file.localJsxFactory, markAsSynthetic, isEntityName); - if (file.localJsxFactory) { - return file.localJsxNamespace = getFirstIdentifier(file.localJsxFactory).escapedText; - } - } - } - function markAsSynthetic(node) { - setTextRangePosEnd(node, -1, -1); - return visitEachChild(node, markAsSynthetic, nullTransformationContext); - } - function getEmitResolver(sourceFile, cancellationToken2) { - getDiagnostics2(sourceFile, cancellationToken2); - return emitResolver; - } - function lookupOrIssueError(location, message, ...args) { - const diagnostic = location ? createDiagnosticForNode(location, message, ...args) : createCompilerDiagnostic(message, ...args); - const existing = diagnostics.lookup(diagnostic); - if (existing) { - return existing; - } else { - diagnostics.add(diagnostic); - return diagnostic; - } - } - function errorSkippedOn(key, location, message, ...args) { - const diagnostic = error2(location, message, ...args); - diagnostic.skippedOn = key; - return diagnostic; - } - function createError(location, message, ...args) { - return location ? createDiagnosticForNode(location, message, ...args) : createCompilerDiagnostic(message, ...args); - } - function error2(location, message, ...args) { - const diagnostic = createError(location, message, ...args); - diagnostics.add(diagnostic); - return diagnostic; - } - function addErrorOrSuggestion(isError, diagnostic) { - if (isError) { - diagnostics.add(diagnostic); - } else { - suggestionDiagnostics.add({ ...diagnostic, category: 2 /* Suggestion */ }); - } - } - function errorOrSuggestion(isError, location, message, ...args) { - if (location.pos < 0 || location.end < 0) { - if (!isError) { - return; - } - const file = getSourceFileOfNode(location); - addErrorOrSuggestion(isError, "message" in message ? createFileDiagnostic(file, 0, 0, message, ...args) : createDiagnosticForFileFromMessageChain(file, message)); - return; - } - addErrorOrSuggestion(isError, "message" in message ? createDiagnosticForNode(location, message, ...args) : createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(location), location, message)); - } - function errorAndMaybeSuggestAwait(location, maybeMissingAwait, message, ...args) { - const diagnostic = error2(location, message, ...args); - if (maybeMissingAwait) { - const related = createDiagnosticForNode(location, Diagnostics.Did_you_forget_to_use_await); - addRelatedInfo(diagnostic, related); - } - return diagnostic; - } - function addDeprecatedSuggestionWorker(declarations, diagnostic) { - const deprecatedTag = Array.isArray(declarations) ? forEach(declarations, getJSDocDeprecatedTag) : getJSDocDeprecatedTag(declarations); - if (deprecatedTag) { - addRelatedInfo( - diagnostic, - createDiagnosticForNode(deprecatedTag, Diagnostics.The_declaration_was_marked_as_deprecated_here) - ); - } - suggestionDiagnostics.add(diagnostic); - return diagnostic; - } - function isDeprecatedSymbol(symbol) { - const parentSymbol = getParentOfSymbol(symbol); - if (parentSymbol && length(symbol.declarations) > 1) { - return parentSymbol.flags & 64 /* Interface */ ? some(symbol.declarations, isDeprecatedDeclaration2) : every(symbol.declarations, isDeprecatedDeclaration2); - } - return !!symbol.valueDeclaration && isDeprecatedDeclaration2(symbol.valueDeclaration) || length(symbol.declarations) && every(symbol.declarations, isDeprecatedDeclaration2); - } - function isDeprecatedDeclaration2(declaration) { - return !!(getCombinedNodeFlagsCached(declaration) & 536870912 /* Deprecated */); - } - function addDeprecatedSuggestion(location, declarations, deprecatedEntity) { - const diagnostic = createDiagnosticForNode(location, Diagnostics._0_is_deprecated, deprecatedEntity); - return addDeprecatedSuggestionWorker(declarations, diagnostic); - } - function addDeprecatedSuggestionWithSignature(location, declaration, deprecatedEntity, signatureString) { - const diagnostic = deprecatedEntity ? createDiagnosticForNode(location, Diagnostics.The_signature_0_of_1_is_deprecated, signatureString, deprecatedEntity) : createDiagnosticForNode(location, Diagnostics._0_is_deprecated, signatureString); - return addDeprecatedSuggestionWorker(declaration, diagnostic); - } - function createSymbol(flags, name, checkFlags) { - symbolCount++; - const symbol = new Symbol47(flags | 33554432 /* Transient */, name); - symbol.links = new SymbolLinks(); - symbol.links.checkFlags = checkFlags || 0 /* None */; - return symbol; - } - function createParameter(name, type) { - const symbol = createSymbol(1 /* FunctionScopedVariable */, name); - symbol.links.type = type; - return symbol; - } - function createProperty(name, type) { - const symbol = createSymbol(4 /* Property */, name); - symbol.links.type = type; - return symbol; - } - function getExcludedSymbolFlags(flags) { - let result = 0; - if (flags & 2 /* BlockScopedVariable */) - result |= 111551 /* BlockScopedVariableExcludes */; - if (flags & 1 /* FunctionScopedVariable */) - result |= 111550 /* FunctionScopedVariableExcludes */; - if (flags & 4 /* Property */) - result |= 0 /* PropertyExcludes */; - if (flags & 8 /* EnumMember */) - result |= 900095 /* EnumMemberExcludes */; - if (flags & 16 /* Function */) - result |= 110991 /* FunctionExcludes */; - if (flags & 32 /* Class */) - result |= 899503 /* ClassExcludes */; - if (flags & 64 /* Interface */) - result |= 788872 /* InterfaceExcludes */; - if (flags & 256 /* RegularEnum */) - result |= 899327 /* RegularEnumExcludes */; - if (flags & 128 /* ConstEnum */) - result |= 899967 /* ConstEnumExcludes */; - if (flags & 512 /* ValueModule */) - result |= 110735 /* ValueModuleExcludes */; - if (flags & 8192 /* Method */) - result |= 103359 /* MethodExcludes */; - if (flags & 32768 /* GetAccessor */) - result |= 46015 /* GetAccessorExcludes */; - if (flags & 65536 /* SetAccessor */) - result |= 78783 /* SetAccessorExcludes */; - if (flags & 262144 /* TypeParameter */) - result |= 526824 /* TypeParameterExcludes */; - if (flags & 524288 /* TypeAlias */) - result |= 788968 /* TypeAliasExcludes */; - if (flags & 2097152 /* Alias */) - result |= 2097152 /* AliasExcludes */; - return result; - } - function recordMergedSymbol(target, source) { - if (!source.mergeId) { - source.mergeId = nextMergeId; - nextMergeId++; - } - mergedSymbols[source.mergeId] = target; - } - function cloneSymbol(symbol) { - const result = createSymbol(symbol.flags, symbol.escapedName); - result.declarations = symbol.declarations ? symbol.declarations.slice() : []; - result.parent = symbol.parent; - if (symbol.valueDeclaration) - result.valueDeclaration = symbol.valueDeclaration; - if (symbol.constEnumOnlyModule) - result.constEnumOnlyModule = true; - if (symbol.members) - result.members = new Map(symbol.members); - if (symbol.exports) - result.exports = new Map(symbol.exports); - recordMergedSymbol(result, symbol); - return result; - } - function mergeSymbol(target, source, unidirectional = false) { - if (!(target.flags & getExcludedSymbolFlags(source.flags)) || (source.flags | target.flags) & 67108864 /* Assignment */) { - if (source === target) { - return target; - } - if (!(target.flags & 33554432 /* Transient */)) { - const resolvedTarget = resolveSymbol(target); - if (resolvedTarget === unknownSymbol) { - return source; - } - target = cloneSymbol(resolvedTarget); - } - if (source.flags & 512 /* ValueModule */ && target.flags & 512 /* ValueModule */ && target.constEnumOnlyModule && !source.constEnumOnlyModule) { - target.constEnumOnlyModule = false; - } - target.flags |= source.flags; - if (source.valueDeclaration) { - setValueDeclaration(target, source.valueDeclaration); - } - addRange(target.declarations, source.declarations); - if (source.members) { - if (!target.members) - target.members = createSymbolTable(); - mergeSymbolTable(target.members, source.members, unidirectional); - } - if (source.exports) { - if (!target.exports) - target.exports = createSymbolTable(); - mergeSymbolTable(target.exports, source.exports, unidirectional); - } - if (!unidirectional) { - recordMergedSymbol(target, source); - } - } else if (target.flags & 1024 /* NamespaceModule */) { - if (target !== globalThisSymbol) { - error2( - source.declarations && getNameOfDeclaration(source.declarations[0]), - Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, - symbolToString(target) - ); - } - } else { - const isEitherEnum = !!(target.flags & 384 /* Enum */ || source.flags & 384 /* Enum */); - const isEitherBlockScoped = !!(target.flags & 2 /* BlockScopedVariable */ || source.flags & 2 /* BlockScopedVariable */); - const message = isEitherEnum ? Diagnostics.Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations : isEitherBlockScoped ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0; - const sourceSymbolFile = source.declarations && getSourceFileOfNode(source.declarations[0]); - const targetSymbolFile = target.declarations && getSourceFileOfNode(target.declarations[0]); - const isSourcePlainJs = isPlainJsFile(sourceSymbolFile, compilerOptions.checkJs); - const isTargetPlainJs = isPlainJsFile(targetSymbolFile, compilerOptions.checkJs); - const symbolName2 = symbolToString(source); - if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) { - const firstFile = comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 /* LessThan */ ? sourceSymbolFile : targetSymbolFile; - const secondFile = firstFile === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile; - const filesDuplicates = getOrUpdate(amalgamatedDuplicates, `${firstFile.path}|${secondFile.path}`, () => ({ firstFile, secondFile, conflictingSymbols: /* @__PURE__ */ new Map() })); - const conflictingSymbolInfo = getOrUpdate(filesDuplicates.conflictingSymbols, symbolName2, () => ({ isBlockScoped: isEitherBlockScoped, firstFileLocations: [], secondFileLocations: [] })); - if (!isSourcePlainJs) - addDuplicateLocations(conflictingSymbolInfo.firstFileLocations, source); - if (!isTargetPlainJs) - addDuplicateLocations(conflictingSymbolInfo.secondFileLocations, target); - } else { - if (!isSourcePlainJs) - addDuplicateDeclarationErrorsForSymbols(source, message, symbolName2, target); - if (!isTargetPlainJs) - addDuplicateDeclarationErrorsForSymbols(target, message, symbolName2, source); - } - } - return target; - function addDuplicateLocations(locs, symbol) { - if (symbol.declarations) { - for (const decl of symbol.declarations) { - pushIfUnique(locs, decl); - } - } - } - } - function addDuplicateDeclarationErrorsForSymbols(target, message, symbolName2, source) { - forEach(target.declarations, (node) => { - addDuplicateDeclarationError(node, message, symbolName2, source.declarations); - }); - } - function addDuplicateDeclarationError(node, message, symbolName2, relatedNodes) { - const errorNode = (getExpandoInitializer( - node, - /*isPrototypeAssignment*/ - false - ) ? getNameOfExpando(node) : getNameOfDeclaration(node)) || node; - const err = lookupOrIssueError(errorNode, message, symbolName2); - for (const relatedNode of relatedNodes || emptyArray) { - const adjustedNode = (getExpandoInitializer( - relatedNode, - /*isPrototypeAssignment*/ - false - ) ? getNameOfExpando(relatedNode) : getNameOfDeclaration(relatedNode)) || relatedNode; - if (adjustedNode === errorNode) - continue; - err.relatedInformation = err.relatedInformation || []; - const leadingMessage = createDiagnosticForNode(adjustedNode, Diagnostics._0_was_also_declared_here, symbolName2); - const followOnMessage = createDiagnosticForNode(adjustedNode, Diagnostics.and_here); - if (length(err.relatedInformation) >= 5 || some(err.relatedInformation, (r) => compareDiagnostics(r, followOnMessage) === 0 /* EqualTo */ || compareDiagnostics(r, leadingMessage) === 0 /* EqualTo */)) - continue; - addRelatedInfo(err, !length(err.relatedInformation) ? leadingMessage : followOnMessage); - } - } - function combineSymbolTables(first2, second) { - if (!(first2 == null ? void 0 : first2.size)) - return second; - if (!(second == null ? void 0 : second.size)) - return first2; - const combined = createSymbolTable(); - mergeSymbolTable(combined, first2); - mergeSymbolTable(combined, second); - return combined; - } - function mergeSymbolTable(target, source, unidirectional = false) { - source.forEach((sourceSymbol, id) => { - const targetSymbol = target.get(id); - target.set(id, targetSymbol ? mergeSymbol(targetSymbol, sourceSymbol, unidirectional) : getMergedSymbol(sourceSymbol)); - }); - } - function mergeModuleAugmentation(moduleName) { - var _a, _b, _c; - const moduleAugmentation = moduleName.parent; - if (((_a = moduleAugmentation.symbol.declarations) == null ? void 0 : _a[0]) !== moduleAugmentation) { - Debug.assert(moduleAugmentation.symbol.declarations.length > 1); - return; - } - if (isGlobalScopeAugmentation(moduleAugmentation)) { - mergeSymbolTable(globals, moduleAugmentation.symbol.exports); - } else { - const moduleNotFoundError = !(moduleName.parent.parent.flags & 33554432 /* Ambient */) ? Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found : void 0; - let mainModule = resolveExternalModuleNameWorker( - moduleName, - moduleName, - moduleNotFoundError, - /*isForAugmentation*/ - true - ); - if (!mainModule) { - return; - } - mainModule = resolveExternalModuleSymbol(mainModule); - if (mainModule.flags & 1920 /* Namespace */) { - if (some(patternAmbientModules, (module2) => mainModule === module2.symbol)) { - const merged = mergeSymbol( - moduleAugmentation.symbol, - mainModule, - /*unidirectional*/ - true - ); - if (!patternAmbientModuleAugmentations) { - patternAmbientModuleAugmentations = /* @__PURE__ */ new Map(); - } - patternAmbientModuleAugmentations.set(moduleName.text, merged); - } else { - if (((_b = mainModule.exports) == null ? void 0 : _b.get("__export" /* ExportStar */)) && ((_c = moduleAugmentation.symbol.exports) == null ? void 0 : _c.size)) { - const resolvedExports = getResolvedMembersOrExportsOfSymbol(mainModule, "resolvedExports" /* resolvedExports */); - for (const [key, value] of arrayFrom(moduleAugmentation.symbol.exports.entries())) { - if (resolvedExports.has(key) && !mainModule.exports.has(key)) { - mergeSymbol(resolvedExports.get(key), value); - } - } - } - mergeSymbol(mainModule, moduleAugmentation.symbol); - } - } else { - error2(moduleName, Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity, moduleName.text); - } - } - } - function addToSymbolTable(target, source, message) { - source.forEach((sourceSymbol, id) => { - const targetSymbol = target.get(id); - if (targetSymbol) { - forEach(targetSymbol.declarations, addDeclarationDiagnostic(unescapeLeadingUnderscores(id), message)); - } else { - target.set(id, sourceSymbol); - } - }); - function addDeclarationDiagnostic(id, message2) { - return (declaration) => diagnostics.add(createDiagnosticForNode(declaration, message2, id)); - } - } - function getSymbolLinks(symbol) { - if (symbol.flags & 33554432 /* Transient */) - return symbol.links; - const id = getSymbolId(symbol); - return symbolLinks[id] ?? (symbolLinks[id] = new SymbolLinks()); - } - function getNodeLinks(node) { - const nodeId = getNodeId(node); - return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks()); - } - function isGlobalSourceFile(node) { - return node.kind === 312 /* SourceFile */ && !isExternalOrCommonJsModule(node); - } - function getSymbol2(symbols, name, meaning) { - if (meaning) { - const symbol = getMergedSymbol(symbols.get(name)); - if (symbol) { - Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (symbol.flags & meaning) { - return symbol; - } - if (symbol.flags & 2097152 /* Alias */) { - const targetFlags = getSymbolFlags(symbol); - if (targetFlags & meaning) { - return symbol; - } - } - } - } - } - function getSymbolsOfParameterPropertyDeclaration(parameter, parameterName) { - const constructorDeclaration = parameter.parent; - const classDeclaration = parameter.parent.parent; - const parameterSymbol = getSymbol2(constructorDeclaration.locals, parameterName, 111551 /* Value */); - const propertySymbol = getSymbol2(getMembersOfSymbol(classDeclaration.symbol), parameterName, 111551 /* Value */); - if (parameterSymbol && propertySymbol) { - return [parameterSymbol, propertySymbol]; - } - return Debug.fail("There should exist two symbols, one as property declaration and one as parameter declaration"); - } - function isBlockScopedNameDeclaredBeforeUse(declaration, usage) { - const declarationFile = getSourceFileOfNode(declaration); - const useFile = getSourceFileOfNode(usage); - const declContainer = getEnclosingBlockScopeContainer(declaration); - if (declarationFile !== useFile) { - if (moduleKind && (declarationFile.externalModuleIndicator || useFile.externalModuleIndicator) || !outFile(compilerOptions) || isInTypeQuery(usage) || declaration.flags & 33554432 /* Ambient */) { - return true; - } - if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { - return true; - } - const sourceFiles = host.getSourceFiles(); - return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); - } - if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { - if (declaration.kind === 208 /* BindingElement */) { - const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); - if (errorBindingElement) { - return findAncestor(errorBindingElement, isBindingElement) !== findAncestor(declaration, isBindingElement) || declaration.pos < errorBindingElement.pos; - } - return isBlockScopedNameDeclaredBeforeUse(getAncestor(declaration, 260 /* VariableDeclaration */), usage); - } else if (declaration.kind === 260 /* VariableDeclaration */) { - return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage); - } else if (isClassDeclaration(declaration)) { - return !findAncestor(usage, (n) => isComputedPropertyName(n) && n.parent.parent === declaration); - } else if (isPropertyDeclaration(declaration)) { - return !isPropertyImmediatelyReferencedWithinDeclaration( - declaration, - usage, - /*stopAtAnyPropertyDeclaration*/ - false - ); - } else if (isParameterPropertyDeclaration(declaration, declaration.parent)) { - return !(emitStandardClassFields && getContainingClass(declaration) === getContainingClass(usage) && isUsedInFunctionOrInstanceProperty(usage, declaration)); - } - return true; - } - if (usage.parent.kind === 281 /* ExportSpecifier */ || usage.parent.kind === 277 /* ExportAssignment */ && usage.parent.isExportEquals) { - return true; - } - if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) { - return true; - } - if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { - return true; - } - if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { - if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { - return !isPropertyImmediatelyReferencedWithinDeclaration( - declaration, - usage, - /*stopAtAnyPropertyDeclaration*/ - true - ); - } else { - return true; - } - } - return false; - function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration2, usage2) { - switch (declaration2.parent.parent.kind) { - case 243 /* VariableStatement */: - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: - if (isSameScopeDescendentOf(usage2, declaration2, declContainer)) { - return true; - } - break; - } - const grandparent = declaration2.parent.parent; - return isForInOrOfStatement(grandparent) && isSameScopeDescendentOf(usage2, grandparent.expression, declContainer); - } - function isUsedInFunctionOrInstanceProperty(usage2, declaration2) { - return !!findAncestor(usage2, (current) => { - if (current === declContainer) { - return "quit"; - } - if (isFunctionLike(current)) { - return true; - } - if (isClassStaticBlockDeclaration(current)) { - return declaration2.pos < usage2.pos; - } - const propertyDeclaration = tryCast(current.parent, isPropertyDeclaration); - if (propertyDeclaration) { - const initializerOfProperty = propertyDeclaration.initializer === current; - if (initializerOfProperty) { - if (isStatic(current.parent)) { - if (declaration2.kind === 174 /* MethodDeclaration */) { - return true; - } - if (isPropertyDeclaration(declaration2) && getContainingClass(usage2) === getContainingClass(declaration2)) { - const propName = declaration2.name; - if (isIdentifier(propName) || isPrivateIdentifier(propName)) { - const type = getTypeOfSymbol(getSymbolOfDeclaration(declaration2)); - const staticBlocks = filter(declaration2.parent.members, isClassStaticBlockDeclaration); - if (isPropertyInitializedInStaticBlocks(propName, type, staticBlocks, declaration2.parent.pos, current.pos)) { - return true; - } - } - } - } else { - const isDeclarationInstanceProperty = declaration2.kind === 172 /* PropertyDeclaration */ && !isStatic(declaration2); - if (!isDeclarationInstanceProperty || getContainingClass(usage2) !== getContainingClass(declaration2)) { - return true; - } - } - } - } - return false; - }); - } - function isPropertyImmediatelyReferencedWithinDeclaration(declaration2, usage2, stopAtAnyPropertyDeclaration) { - if (usage2.end > declaration2.end) { - return false; - } - const ancestorChangingReferenceScope = findAncestor(usage2, (node) => { - if (node === declaration2) { - return "quit"; - } - switch (node.kind) { - case 219 /* ArrowFunction */: - return true; - case 172 /* PropertyDeclaration */: - return stopAtAnyPropertyDeclaration && (isPropertyDeclaration(declaration2) && node.parent === declaration2.parent || isParameterPropertyDeclaration(declaration2, declaration2.parent) && node.parent === declaration2.parent.parent) ? "quit" : true; - case 241 /* Block */: - switch (node.parent.kind) { - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: - return true; - default: - return false; - } - default: - return false; - } - }); - return ancestorChangingReferenceScope === void 0; - } - } - function useOuterVariableScopeInParameter(result, location, lastLocation) { - const target = getEmitScriptTarget(compilerOptions); - const functionLocation = location; - if (isParameter(lastLocation) && functionLocation.body && result.valueDeclaration && result.valueDeclaration.pos >= functionLocation.body.pos && result.valueDeclaration.end <= functionLocation.body.end) { - if (target >= 2 /* ES2015 */) { - const links = getNodeLinks(functionLocation); - if (links.declarationRequiresScopeChange === void 0) { - links.declarationRequiresScopeChange = forEach(functionLocation.parameters, requiresScopeChange) || false; - } - return !links.declarationRequiresScopeChange; - } - } - return false; - function requiresScopeChange(node) { - return requiresScopeChangeWorker(node.name) || !!node.initializer && requiresScopeChangeWorker(node.initializer); - } - function requiresScopeChangeWorker(node) { - switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 176 /* Constructor */: - return false; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 303 /* PropertyAssignment */: - return requiresScopeChangeWorker(node.name); - case 172 /* PropertyDeclaration */: - if (hasStaticModifier(node)) { - return !emitStandardClassFields; - } - return requiresScopeChangeWorker(node.name); - default: - if (isNullishCoalesce(node) || isOptionalChain(node)) { - return target < 7 /* ES2020 */; - } - if (isBindingElement(node) && node.dotDotDotToken && isObjectBindingPattern(node.parent)) { - return target < 4 /* ES2017 */; - } - if (isTypeNode(node)) - return false; - return forEachChild(node, requiresScopeChangeWorker) || false; - } - } - } - function isConstAssertion(location) { - return isAssertionExpression(location) && isConstTypeReference(location.type) || isJSDocTypeTag(location) && isConstTypeReference(location.typeExpression); - } - function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals = false, getSpellingSuggestions = true) { - return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, getSymbol2); - } - function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) { - var _a, _b, _c; - const originalLocation = location; - let result; - let lastLocation; - let lastSelfReferenceLocation; - let propertyWithInvalidInitializer; - let associatedDeclarationForContainingInitializerOrBindingName; - let withinDeferredContext = false; - const errorLocation = location; - let grandparent; - let isInExternalModule = false; - loop: - while (location) { - if (name === "const" && isConstAssertion(location)) { - return void 0; - } - if (isModuleOrEnumDeclaration(location) && lastLocation && location.name === lastLocation) { - lastLocation = location; - location = location.parent; - } - if (canHaveLocals(location) && location.locals && !isGlobalSourceFile(location)) { - if (result = lookup(location.locals, name, meaning)) { - let useResult = true; - if (isFunctionLike(location) && lastLocation && lastLocation !== location.body) { - if (meaning & result.flags & 788968 /* Type */ && lastLocation.kind !== 327 /* JSDoc */) { - useResult = result.flags & 262144 /* TypeParameter */ ? lastLocation === location.type || lastLocation.kind === 169 /* Parameter */ || lastLocation.kind === 348 /* JSDocParameterTag */ || lastLocation.kind === 349 /* JSDocReturnTag */ || lastLocation.kind === 168 /* TypeParameter */ : false; - } - if (meaning & result.flags & 3 /* Variable */) { - if (useOuterVariableScopeInParameter(result, location, lastLocation)) { - useResult = false; - } else if (result.flags & 1 /* FunctionScopedVariable */) { - useResult = lastLocation.kind === 169 /* Parameter */ || lastLocation === location.type && !!findAncestor(result.valueDeclaration, isParameter); - } - } - } else if (location.kind === 194 /* ConditionalType */) { - useResult = lastLocation === location.trueType; - } - if (useResult) { - break loop; - } else { - result = void 0; - } - } - } - withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation); - switch (location.kind) { - case 312 /* SourceFile */: - if (!isExternalOrCommonJsModule(location)) - break; - isInExternalModule = true; - case 267 /* ModuleDeclaration */: - const moduleExports = ((_a = getSymbolOfDeclaration(location)) == null ? void 0 : _a.exports) || emptySymbols; - if (location.kind === 312 /* SourceFile */ || isModuleDeclaration(location) && location.flags & 33554432 /* Ambient */ && !isGlobalScopeAugmentation(location)) { - if (result = moduleExports.get("default" /* Default */)) { - const localSymbol = getLocalSymbolForExportDefault(result); - if (localSymbol && result.flags & meaning && localSymbol.escapedName === name) { - break loop; - } - result = void 0; - } - const moduleExport = moduleExports.get(name); - if (moduleExport && moduleExport.flags === 2097152 /* Alias */ && (getDeclarationOfKind(moduleExport, 281 /* ExportSpecifier */) || getDeclarationOfKind(moduleExport, 280 /* NamespaceExport */))) { - break; - } - } - if (name !== "default" /* Default */ && (result = lookup(moduleExports, name, meaning & 2623475 /* ModuleMember */))) { - if (isSourceFile(location) && location.commonJsModuleIndicator && !((_b = result.declarations) == null ? void 0 : _b.some(isJSDocTypeAlias))) { - result = void 0; - } else { - break loop; - } - } - break; - case 266 /* EnumDeclaration */: - if (result = lookup(((_c = getSymbolOfDeclaration(location)) == null ? void 0 : _c.exports) || emptySymbols, name, meaning & 8 /* EnumMember */)) { - if (nameNotFoundMessage && getIsolatedModules(compilerOptions) && !(location.flags & 33554432 /* Ambient */) && getSourceFileOfNode(location) !== getSourceFileOfNode(result.valueDeclaration)) { - error2( - errorLocation, - Diagnostics.Cannot_access_0_from_another_file_without_qualification_when_1_is_enabled_Use_2_instead, - unescapeLeadingUnderscores(name), - isolatedModulesLikeFlagName, - `${unescapeLeadingUnderscores(getSymbolOfNode(location).escapedName)}.${unescapeLeadingUnderscores(name)}` - ); - } - break loop; - } - break; - case 172 /* PropertyDeclaration */: - if (!isStatic(location)) { - const ctor = findConstructorDeclaration(location.parent); - if (ctor && ctor.locals) { - if (lookup(ctor.locals, name, meaning & 111551 /* Value */)) { - Debug.assertNode(location, isPropertyDeclaration); - propertyWithInvalidInitializer = location; - } - } - } - break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - if (result = lookup(getSymbolOfDeclaration(location).members || emptySymbols, name, meaning & 788968 /* Type */)) { - if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { - result = void 0; - break; - } - if (lastLocation && isStatic(lastLocation)) { - if (nameNotFoundMessage) { - error2(errorLocation, Diagnostics.Static_members_cannot_reference_class_type_parameters); - } - return void 0; - } - break loop; - } - if (isClassExpression(location) && meaning & 32 /* Class */) { - const className = location.name; - if (className && name === className.escapedText) { - result = location.symbol; - break loop; - } - } - break; - case 233 /* ExpressionWithTypeArguments */: - if (lastLocation === location.expression && location.parent.token === 96 /* ExtendsKeyword */) { - const container = location.parent.parent; - if (isClassLike(container) && (result = lookup(getSymbolOfDeclaration(container).members, name, meaning & 788968 /* Type */))) { - if (nameNotFoundMessage) { - error2(errorLocation, Diagnostics.Base_class_expressions_cannot_reference_class_type_parameters); - } - return void 0; - } - } - break; - case 167 /* ComputedPropertyName */: - grandparent = location.parent.parent; - if (isClassLike(grandparent) || grandparent.kind === 264 /* InterfaceDeclaration */) { - if (result = lookup(getSymbolOfDeclaration(grandparent).members, name, meaning & 788968 /* Type */)) { - if (nameNotFoundMessage) { - error2(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); - } - return void 0; - } - } - break; - case 219 /* ArrowFunction */: - if (getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */) { - break; - } - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - if (meaning & 3 /* Variable */ && name === "arguments") { - result = argumentsSymbol; - break loop; - } - break; - case 218 /* FunctionExpression */: - if (meaning & 3 /* Variable */ && name === "arguments") { - result = argumentsSymbol; - break loop; - } - if (meaning & 16 /* Function */) { - const functionName = location.name; - if (functionName && name === functionName.escapedText) { - result = location.symbol; - break loop; - } - } - break; - case 170 /* Decorator */: - if (location.parent && location.parent.kind === 169 /* Parameter */) { - location = location.parent; - } - if (location.parent && (isClassElement(location.parent) || location.parent.kind === 263 /* ClassDeclaration */)) { - location = location.parent; - } - break; - case 353 /* JSDocTypedefTag */: - case 345 /* JSDocCallbackTag */: - case 347 /* JSDocEnumTag */: - const root = getJSDocRoot(location); - if (root) { - location = root.parent; - } - break; - case 169 /* Parameter */: - if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { - if (!associatedDeclarationForContainingInitializerOrBindingName) { - associatedDeclarationForContainingInitializerOrBindingName = location; - } - } - break; - case 208 /* BindingElement */: - if (lastLocation && (lastLocation === location.initializer || lastLocation === location.name && isBindingPattern(lastLocation))) { - if (isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) { - associatedDeclarationForContainingInitializerOrBindingName = location; - } - } - break; - case 195 /* InferType */: - if (meaning & 262144 /* TypeParameter */) { - const parameterName = location.typeParameter.name; - if (parameterName && name === parameterName.escapedText) { - result = location.typeParameter.symbol; - break loop; - } - } - break; - case 281 /* ExportSpecifier */: - if (lastLocation && lastLocation === location.propertyName && location.parent.parent.moduleSpecifier) { - location = location.parent.parent.parent; - } - break; - } - if (isSelfReferenceLocation(location)) { - lastSelfReferenceLocation = location; - } - lastLocation = location; - location = isJSDocTemplateTag(location) ? getEffectiveContainerForJSDocTemplateTag(location) || location.parent : isJSDocParameterTag(location) || isJSDocReturnTag(location) ? getHostSignatureFromJSDoc(location) || location.parent : location.parent; - } - if (isUse && result && (!lastSelfReferenceLocation || result !== lastSelfReferenceLocation.symbol)) { - result.isReferenced |= meaning; - } - if (!result) { - if (lastLocation) { - Debug.assertNode(lastLocation, isSourceFile); - if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) { - return lastLocation.symbol; - } - } - if (!excludeGlobals) { - result = lookup(globals, name, meaning); - } - } - if (!result) { - if (originalLocation && isInJSFile(originalLocation) && originalLocation.parent) { - if (isRequireCall( - originalLocation.parent, - /*requireStringLiteralLikeArgument*/ - false - )) { - return requireSymbol; - } - } - } - function checkAndReportErrorForInvalidInitializer() { - if (propertyWithInvalidInitializer && !emitStandardClassFields) { - error2( - errorLocation, - errorLocation && propertyWithInvalidInitializer.type && textRangeContainsPositionInclusive(propertyWithInvalidInitializer.type, errorLocation.pos) ? Diagnostics.Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor : Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, - declarationNameToString(propertyWithInvalidInitializer.name), - diagnosticName(nameArg) - ); - return true; - } - return false; - } - if (!result) { - if (nameNotFoundMessage) { - addLazyDiagnostic(() => { - if (!errorLocation || errorLocation.parent.kind !== 331 /* JSDocLink */ && !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217 - !checkAndReportErrorForInvalidInitializer() && !checkAndReportErrorForExtendingInterface(errorLocation) && !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForExportingPrimitiveType(errorLocation, name) && !checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) { - let suggestion; - let suggestedLib; - if (nameArg) { - suggestedLib = getSuggestedLibForNonExistentName(nameArg); - if (suggestedLib) { - error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg), suggestedLib); - } - } - if (!suggestedLib && getSpellingSuggestions && suggestionCount < maximumSuggestionCount) { - suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning); - const isGlobalScopeAugmentationDeclaration = (suggestion == null ? void 0 : suggestion.valueDeclaration) && isAmbientModule(suggestion.valueDeclaration) && isGlobalScopeAugmentation(suggestion.valueDeclaration); - if (isGlobalScopeAugmentationDeclaration) { - suggestion = void 0; - } - if (suggestion) { - const suggestionName = symbolToString(suggestion); - const isUncheckedJS = isUncheckedJSSuggestion( - originalLocation, - suggestion, - /*excludeClasses*/ - false - ); - const message = meaning === 1920 /* Namespace */ || nameArg && typeof nameArg !== "string" && nodeIsSynthesized(nameArg) ? Diagnostics.Cannot_find_namespace_0_Did_you_mean_1 : isUncheckedJS ? Diagnostics.Could_not_find_name_0_Did_you_mean_1 : Diagnostics.Cannot_find_name_0_Did_you_mean_1; - const diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName); - addErrorOrSuggestion(!isUncheckedJS, diagnostic); - if (suggestion.valueDeclaration) { - addRelatedInfo( - diagnostic, - createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName) - ); - } - } - } - if (!suggestion && !suggestedLib && nameArg) { - error2(errorLocation, nameNotFoundMessage, diagnosticName(nameArg)); - } - suggestionCount++; - } - }); - } - return void 0; - } else if (nameNotFoundMessage && checkAndReportErrorForInvalidInitializer()) { - return void 0; - } - if (nameNotFoundMessage) { - addLazyDiagnostic(() => { - if (errorLocation && (meaning & 2 /* BlockScopedVariable */ || (meaning & 32 /* Class */ || meaning & 384 /* Enum */) && (meaning & 111551 /* Value */) === 111551 /* Value */)) { - const exportOrLocalSymbol = getExportSymbolOfValueSymbolIfExported(result); - if (exportOrLocalSymbol.flags & 2 /* BlockScopedVariable */ || exportOrLocalSymbol.flags & 32 /* Class */ || exportOrLocalSymbol.flags & 384 /* Enum */) { - checkResolvedBlockScopedVariable(exportOrLocalSymbol, errorLocation); - } - } - if (result && isInExternalModule && (meaning & 111551 /* Value */) === 111551 /* Value */ && !(originalLocation.flags & 16777216 /* JSDoc */)) { - const merged = getMergedSymbol(result); - if (length(merged.declarations) && every(merged.declarations, (d) => isNamespaceExportDeclaration(d) || isSourceFile(d) && !!d.symbol.globalExports)) { - errorOrSuggestion(!compilerOptions.allowUmdGlobalAccess, errorLocation, Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead, unescapeLeadingUnderscores(name)); - } - } - if (result && associatedDeclarationForContainingInitializerOrBindingName && !withinDeferredContext && (meaning & 111551 /* Value */) === 111551 /* Value */) { - const candidate = getMergedSymbol(getLateBoundSymbol(result)); - const root = getRootDeclaration(associatedDeclarationForContainingInitializerOrBindingName); - if (candidate === getSymbolOfDeclaration(associatedDeclarationForContainingInitializerOrBindingName)) { - error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_itself, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name)); - } else if (candidate.valueDeclaration && candidate.valueDeclaration.pos > associatedDeclarationForContainingInitializerOrBindingName.pos && root.parent.locals && lookup(root.parent.locals, candidate.escapedName, meaning) === candidate) { - error2(errorLocation, Diagnostics.Parameter_0_cannot_reference_identifier_1_declared_after_it, declarationNameToString(associatedDeclarationForContainingInitializerOrBindingName.name), declarationNameToString(errorLocation)); - } - } - if (result && errorLocation && meaning & 111551 /* Value */ && result.flags & 2097152 /* Alias */ && !(result.flags & 111551 /* Value */) && !isValidTypeOnlyAliasUseSite(errorLocation)) { - const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(result, 111551 /* Value */); - if (typeOnlyDeclaration) { - const message = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type : Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type; - const unescapedName = unescapeLeadingUnderscores(name); - addTypeOnlyDeclarationRelatedInfo( - error2(errorLocation, message, unescapedName), - typeOnlyDeclaration, - unescapedName - ); - } - } - }); - } - return result; - } - function addTypeOnlyDeclarationRelatedInfo(diagnostic, typeOnlyDeclaration, unescapedName) { - if (!typeOnlyDeclaration) - return diagnostic; - return addRelatedInfo( - diagnostic, - createDiagnosticForNode( - typeOnlyDeclaration, - typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ || typeOnlyDeclaration.kind === 280 /* NamespaceExport */ ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here, - unescapedName - ) - ); - } - function getIsDeferredContext(location, lastLocation) { - if (location.kind !== 219 /* ArrowFunction */ && location.kind !== 218 /* FunctionExpression */) { - return isTypeQueryNode(location) || (isFunctionLikeDeclaration(location) || location.kind === 172 /* PropertyDeclaration */ && !isStatic(location)) && (!lastLocation || lastLocation !== location.name); - } - if (lastLocation && lastLocation === location.name) { - return false; - } - if (location.asteriskToken || hasSyntacticModifier(location, 512 /* Async */)) { - return true; - } - return !getImmediatelyInvokedFunctionExpression(location); - } - function isSelfReferenceLocation(node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 267 /* ModuleDeclaration */: - return true; - default: - return false; - } - } - function diagnosticName(nameArg) { - return isString(nameArg) ? unescapeLeadingUnderscores(nameArg) : declarationNameToString(nameArg); - } - function isTypeParameterSymbolDeclaredInContainer(symbol, container) { - if (symbol.declarations) { - for (const decl of symbol.declarations) { - if (decl.kind === 168 /* TypeParameter */) { - const parent2 = isJSDocTemplateTag(decl.parent) ? getJSDocHost(decl.parent) : decl.parent; - if (parent2 === container) { - return !(isJSDocTemplateTag(decl.parent) && find(decl.parent.parent.tags, isJSDocTypeAlias)); - } - } - } - } - return false; - } - function checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) { - if (!isIdentifier(errorLocation) || errorLocation.escapedText !== name || isTypeReferenceIdentifier(errorLocation) || isInTypeQuery(errorLocation)) { - return false; - } - const container = getThisContainer( - errorLocation, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - let location = container; - while (location) { - if (isClassLike(location.parent)) { - const classSymbol = getSymbolOfDeclaration(location.parent); - if (!classSymbol) { - break; - } - const constructorType = getTypeOfSymbol(classSymbol); - if (getPropertyOfType(constructorType, name)) { - error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, diagnosticName(nameArg), symbolToString(classSymbol)); - return true; - } - if (location === container && !isStatic(location)) { - const instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType; - if (getPropertyOfType(instanceType, name)) { - error2(errorLocation, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, diagnosticName(nameArg)); - return true; - } - } - } - location = location.parent; - } - return false; - } - function checkAndReportErrorForExtendingInterface(errorLocation) { - const expression = getEntityNameForExtendingInterface(errorLocation); - if (expression && resolveEntityName( - expression, - 64 /* Interface */, - /*ignoreErrors*/ - true - )) { - error2(errorLocation, Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements, getTextOfNode(expression)); - return true; - } - return false; - } - function getEntityNameForExtendingInterface(node) { - switch (node.kind) { - case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: - return node.parent ? getEntityNameForExtendingInterface(node.parent) : void 0; - case 233 /* ExpressionWithTypeArguments */: - if (isEntityNameExpression(node.expression)) { - return node.expression; - } - default: - return void 0; - } - } - function checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) { - const namespaceMeaning = 1920 /* Namespace */ | (isInJSFile(errorLocation) ? 111551 /* Value */ : 0); - if (meaning === namespaceMeaning) { - const symbol = resolveSymbol(resolveName( - errorLocation, - name, - 788968 /* Type */ & ~namespaceMeaning, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - )); - const parent2 = errorLocation.parent; - if (symbol) { - if (isQualifiedName(parent2)) { - Debug.assert(parent2.left === errorLocation, "Should only be resolving left side of qualified name as a namespace"); - const propName = parent2.right.escapedText; - const propType = getPropertyOfType(getDeclaredTypeOfSymbol(symbol), propName); - if (propType) { - error2( - parent2, - 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, - unescapeLeadingUnderscores(name), - unescapeLeadingUnderscores(propName) - ); - return true; - } - } - error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here, unescapeLeadingUnderscores(name)); - return true; - } - } - return false; - } - function checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning) { - if (meaning & (788968 /* Type */ & ~1920 /* Namespace */)) { - const symbol = resolveSymbol(resolveName( - errorLocation, - name, - ~788968 /* Type */ & 111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - )); - if (symbol && !(symbol.flags & 1920 /* Namespace */)) { - error2(errorLocation, Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, unescapeLeadingUnderscores(name)); - return true; - } - } - return false; - } - function isPrimitiveTypeName(name) { - return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown"; - } - function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) { - if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 281 /* ExportSpecifier */) { - error2(errorLocation, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name); - return true; - } - return false; - } - function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { - if (meaning & 111551 /* Value */) { - if (isPrimitiveTypeName(name)) { - if (isExtendedByInterface(errorLocation)) { - error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); - } else { - error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); - } - return true; - } - const symbol = resolveSymbol(resolveName( - errorLocation, - name, - 788968 /* Type */ & ~111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - )); - const allFlags = symbol && getSymbolFlags(symbol); - if (symbol && allFlags !== void 0 && !(allFlags & 111551 /* Value */)) { - const rawName = unescapeLeadingUnderscores(name); - if (isES2015OrLaterConstructorName(name)) { - error2(errorLocation, 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, rawName); - } else if (maybeMappedType(errorLocation, symbol)) { - error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K"); - } else { - error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName); - } - return true; - } - } - return false; - } - function isExtendedByInterface(node) { - const grandparent = node.parent.parent; - const parentOfGrandparent = grandparent.parent; - if (grandparent && parentOfGrandparent) { - const isExtending = isHeritageClause(grandparent) && grandparent.token === 96 /* ExtendsKeyword */; - const isInterface = isInterfaceDeclaration(parentOfGrandparent); - return isExtending && isInterface; - } - return false; - } - function maybeMappedType(node, symbol) { - const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || "quit"); - if (container && container.members.length === 1) { - const type = getDeclaredTypeOfSymbol(symbol); - return !!(type.flags & 1048576 /* Union */) && allTypesAssignableToKind( - type, - 384 /* StringOrNumberLiteral */, - /*strict*/ - true - ); - } - return false; - } - function isES2015OrLaterConstructorName(n) { - switch (n) { - case "Promise": - case "Symbol": - case "Map": - case "WeakMap": - case "Set": - case "WeakSet": - return true; - } - return false; - } - function checkAndReportErrorForUsingNamespaceAsTypeOrValue(errorLocation, name, meaning) { - if (meaning & (111551 /* Value */ & ~788968 /* Type */)) { - const symbol = resolveSymbol(resolveName( - errorLocation, - name, - 1024 /* NamespaceModule */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - )); - if (symbol) { - error2( - errorLocation, - Diagnostics.Cannot_use_namespace_0_as_a_value, - unescapeLeadingUnderscores(name) - ); - return true; - } - } else if (meaning & (788968 /* Type */ & ~111551 /* Value */)) { - const symbol = resolveSymbol(resolveName( - errorLocation, - name, - 1536 /* Module */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - )); - if (symbol) { - error2(errorLocation, Diagnostics.Cannot_use_namespace_0_as_a_type, unescapeLeadingUnderscores(name)); - return true; - } - } - return false; - } - function checkResolvedBlockScopedVariable(result, errorLocation) { - var _a; - Debug.assert(!!(result.flags & 2 /* BlockScopedVariable */ || result.flags & 32 /* Class */ || result.flags & 384 /* Enum */)); - if (result.flags & (16 /* Function */ | 1 /* FunctionScopedVariable */ | 67108864 /* Assignment */) && result.flags & 32 /* Class */) { - return; - } - const declaration = (_a = result.declarations) == null ? void 0 : _a.find( - (d) => isBlockOrCatchScoped(d) || isClassLike(d) || d.kind === 266 /* EnumDeclaration */ - ); - if (declaration === void 0) - return Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration"); - if (!(declaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) { - let diagnosticMessage; - const declarationName = declarationNameToString(getNameOfDeclaration(declaration)); - if (result.flags & 2 /* BlockScopedVariable */) { - diagnosticMessage = error2(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationName); - } else if (result.flags & 32 /* Class */) { - diagnosticMessage = error2(errorLocation, Diagnostics.Class_0_used_before_its_declaration, declarationName); - } else if (result.flags & 256 /* RegularEnum */) { - diagnosticMessage = error2(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); - } - if (diagnosticMessage) { - addRelatedInfo( - diagnosticMessage, - createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName) - ); - } - } - } - function isSameScopeDescendentOf(initial, parent2, stopAt) { - return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || isAsyncFunction(n)) ? "quit" : false)); - } - function getAnyImportSyntax(node) { - switch (node.kind) { - case 271 /* ImportEqualsDeclaration */: - return node; - case 273 /* ImportClause */: - return node.parent; - case 274 /* NamespaceImport */: - return node.parent.parent; - case 276 /* ImportSpecifier */: - return node.parent.parent.parent; - default: - return void 0; - } - } - function getDeclarationOfAliasSymbol(symbol) { - return symbol.declarations && findLast(symbol.declarations, isAliasSymbolDeclaration2); - } - function isAliasSymbolDeclaration2(node) { - return node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 270 /* NamespaceExportDeclaration */ || node.kind === 273 /* ImportClause */ && !!node.name || node.kind === 274 /* NamespaceImport */ || node.kind === 280 /* NamespaceExport */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 281 /* ExportSpecifier */ || node.kind === 277 /* ExportAssignment */ && exportAssignmentIsAlias(node) || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 /* ModuleExports */ && exportAssignmentIsAlias(node) || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */ && isAliasableOrJsExpression(node.parent.right) || node.kind === 304 /* ShorthandPropertyAssignment */ || node.kind === 303 /* PropertyAssignment */ && isAliasableOrJsExpression(node.initializer) || node.kind === 260 /* VariableDeclaration */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node) || node.kind === 208 /* BindingElement */ && isVariableDeclarationInitializedToBareOrAccessedRequire(node.parent.parent); - } - function isAliasableOrJsExpression(e) { - return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); - } - function getTargetOfImportEqualsDeclaration(node, dontResolveAlias) { - const commonJSPropertyAccess = getCommonJSPropertyAccess(node); - if (commonJSPropertyAccess) { - const name = getLeftmostAccessExpression(commonJSPropertyAccess.expression).arguments[0]; - return isIdentifier(commonJSPropertyAccess.name) ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) : void 0; - } - if (isVariableDeclaration(node) || node.moduleReference.kind === 283 /* ExternalModuleReference */) { - const immediate = resolveExternalModuleName( - node, - getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node) - ); - const resolved2 = resolveExternalModuleSymbol(immediate); - markSymbolOfAliasDeclarationIfTypeOnly( - node, - immediate, - resolved2, - /*overwriteEmpty*/ - false - ); - return resolved2; - } - const resolved = getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, dontResolveAlias); - checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved); - return resolved; - } - function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) { - if (markSymbolOfAliasDeclarationIfTypeOnly( - node, - /*immediateTarget*/ - void 0, - resolved, - /*overwriteEmpty*/ - false - ) && !node.isTypeOnly) { - const typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfDeclaration(node)); - const isExport = typeOnlyDeclaration.kind === 281 /* ExportSpecifier */ || typeOnlyDeclaration.kind === 278 /* ExportDeclaration */; - const message = isExport ? Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type : Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type; - const relatedMessage = isExport ? Diagnostics._0_was_exported_here : Diagnostics._0_was_imported_here; - const name = typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? "*" : unescapeLeadingUnderscores(typeOnlyDeclaration.name.escapedText); - addRelatedInfo(error2(node.moduleReference, message), createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, name)); - } - } - function resolveExportByName(moduleSymbol, name, sourceNode, dontResolveAlias) { - const exportValue = moduleSymbol.exports.get("export=" /* ExportEquals */); - const exportSymbol = exportValue ? getPropertyOfType( - getTypeOfSymbol(exportValue), - name, - /*skipObjectFunctionPropertyAugment*/ - true - ) : moduleSymbol.exports.get(name); - const resolved = resolveSymbol(exportSymbol, dontResolveAlias); - markSymbolOfAliasDeclarationIfTypeOnly( - sourceNode, - exportSymbol, - resolved, - /*overwriteEmpty*/ - false - ); - return resolved; - } - function isSyntacticDefault(node) { - return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node); - } - function getUsageModeForExpression(usage) { - return isStringLiteralLike(usage) ? getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0; - } - function isESMFormatImportImportingCommonjsFormatFile(usageMode, targetMode) { - return usageMode === 99 /* ESNext */ && targetMode === 1 /* CommonJS */; - } - function isOnlyImportedAsDefault(usage) { - const usageMode = getUsageModeForExpression(usage); - return usageMode === 99 /* ESNext */ && endsWith(usage.text, ".json" /* Json */); - } - function canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, usage) { - const usageMode = file && getUsageModeForExpression(usage); - if (file && usageMode !== void 0) { - const result = isESMFormatImportImportingCommonjsFormatFile(usageMode, file.impliedNodeFormat); - if (usageMode === 99 /* ESNext */ || result) { - return result; - } - } - if (!allowSyntheticDefaultImports) { - return false; - } - if (!file || file.isDeclarationFile) { - const defaultExportSymbol = resolveExportByName( - moduleSymbol, - "default" /* Default */, - /*sourceNode*/ - void 0, - /*dontResolveAlias*/ - true - ); - if (defaultExportSymbol && some(defaultExportSymbol.declarations, isSyntacticDefault)) { - return false; - } - if (resolveExportByName( - moduleSymbol, - escapeLeadingUnderscores("__esModule"), - /*sourceNode*/ - void 0, - dontResolveAlias - )) { - return false; - } - return true; - } - if (!isSourceFileJS(file)) { - return hasExportAssignmentSymbol(moduleSymbol); - } - return typeof file.externalModuleIndicator !== "object" && !resolveExportByName( - moduleSymbol, - escapeLeadingUnderscores("__esModule"), - /*sourceNode*/ - void 0, - dontResolveAlias - ); - } - function getTargetOfImportClause(node, dontResolveAlias) { - const moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); - if (moduleSymbol) { - return getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias); - } - } - function getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias) { - var _a; - let exportDefaultSymbol; - if (isShorthandAmbientModuleSymbol(moduleSymbol)) { - exportDefaultSymbol = moduleSymbol; - } else { - exportDefaultSymbol = resolveExportByName(moduleSymbol, "default" /* Default */, node, dontResolveAlias); - } - const file = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile); - const specifier = getModuleSpecifierForImportOrExport(node); - if (!specifier) { - return exportDefaultSymbol; - } - const hasDefaultOnly = isOnlyImportedAsDefault(specifier); - const hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, specifier); - if (!exportDefaultSymbol && !hasSyntheticDefault && !hasDefaultOnly) { - if (hasExportAssignmentSymbol(moduleSymbol) && !allowSyntheticDefaultImports) { - const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; - const exportEqualsSymbol = moduleSymbol.exports.get("export=" /* ExportEquals */); - const exportAssignment = exportEqualsSymbol.valueDeclaration; - const err = error2(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); - if (exportAssignment) { - addRelatedInfo(err, createDiagnosticForNode( - exportAssignment, - Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, - compilerOptionName - )); - } - } else if (isImportClause(node)) { - reportNonDefaultExport(moduleSymbol, node); - } else { - errorNoModuleMemberSymbol(moduleSymbol, moduleSymbol, node, isImportOrExportSpecifier(node) && node.propertyName || node.name); - } - } else if (hasSyntheticDefault || hasDefaultOnly) { - const resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); - markSymbolOfAliasDeclarationIfTypeOnly( - node, - moduleSymbol, - resolved, - /*overwriteEmpty*/ - false - ); - return resolved; - } - markSymbolOfAliasDeclarationIfTypeOnly( - node, - exportDefaultSymbol, - /*finalTarget*/ - void 0, - /*overwriteEmpty*/ - false - ); - return exportDefaultSymbol; - } - function getModuleSpecifierForImportOrExport(node) { - switch (node.kind) { - case 273 /* ImportClause */: - return node.parent.moduleSpecifier; - case 271 /* ImportEqualsDeclaration */: - return isExternalModuleReference(node.moduleReference) ? node.moduleReference.expression : void 0; - case 274 /* NamespaceImport */: - return node.parent.parent.moduleSpecifier; - case 276 /* ImportSpecifier */: - return node.parent.parent.parent.moduleSpecifier; - case 281 /* ExportSpecifier */: - return node.parent.parent.moduleSpecifier; - default: - return Debug.assertNever(node); - } - } - function reportNonDefaultExport(moduleSymbol, node) { - var _a, _b, _c; - if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has(node.symbol.escapedName)) { - error2( - node.name, - Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead, - symbolToString(moduleSymbol), - symbolToString(node.symbol) - ); - } else { - const diagnostic = error2(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); - const exportStar = (_b = moduleSymbol.exports) == null ? void 0 : _b.get("__export" /* ExportStar */); - if (exportStar) { - const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find((decl) => { - var _a2, _b2; - return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a2 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a2.exports) == null ? void 0 : _b2.has("default" /* Default */))); - }); - if (defaultExport) { - addRelatedInfo(diagnostic, createDiagnosticForNode(defaultExport, Diagnostics.export_Asterisk_does_not_re_export_a_default)); - } - } - } - } - function getTargetOfNamespaceImport(node, dontResolveAlias) { - const moduleSpecifier = node.parent.parent.moduleSpecifier; - const immediate = resolveExternalModuleName(node, moduleSpecifier); - const resolved = resolveESModuleSymbol( - immediate, - moduleSpecifier, - dontResolveAlias, - /*suppressInteropError*/ - false - ); - markSymbolOfAliasDeclarationIfTypeOnly( - node, - immediate, - resolved, - /*overwriteEmpty*/ - false - ); - return resolved; - } - function getTargetOfNamespaceExport(node, dontResolveAlias) { - const moduleSpecifier = node.parent.moduleSpecifier; - const immediate = moduleSpecifier && resolveExternalModuleName(node, moduleSpecifier); - const resolved = moduleSpecifier && resolveESModuleSymbol( - immediate, - moduleSpecifier, - dontResolveAlias, - /*suppressInteropError*/ - false - ); - markSymbolOfAliasDeclarationIfTypeOnly( - node, - immediate, - resolved, - /*overwriteEmpty*/ - false - ); - return resolved; - } - function combineValueAndTypeSymbols(valueSymbol, typeSymbol) { - if (valueSymbol === unknownSymbol && typeSymbol === unknownSymbol) { - return unknownSymbol; - } - if (valueSymbol.flags & (788968 /* Type */ | 1920 /* Namespace */)) { - return valueSymbol; - } - const result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName); - Debug.assert(valueSymbol.declarations || typeSymbol.declarations); - result.declarations = deduplicate(concatenate(valueSymbol.declarations, typeSymbol.declarations), equateValues); - result.parent = valueSymbol.parent || typeSymbol.parent; - if (valueSymbol.valueDeclaration) - result.valueDeclaration = valueSymbol.valueDeclaration; - if (typeSymbol.members) - result.members = new Map(typeSymbol.members); - if (valueSymbol.exports) - result.exports = new Map(valueSymbol.exports); - return result; - } - function getExportOfModule(symbol, name, specifier, dontResolveAlias) { - var _a; - if (symbol.flags & 1536 /* Module */) { - const exportSymbol = getExportsOfSymbol(symbol).get(name.escapedText); - const resolved = resolveSymbol(exportSymbol, dontResolveAlias); - const exportStarDeclaration = (_a = getSymbolLinks(symbol).typeOnlyExportStarMap) == null ? void 0 : _a.get(name.escapedText); - markSymbolOfAliasDeclarationIfTypeOnly( - specifier, - exportSymbol, - resolved, - /*overwriteEmpty*/ - false, - exportStarDeclaration, - name.escapedText - ); - return resolved; - } - } - function getPropertyOfVariable(symbol, name) { - if (symbol.flags & 3 /* Variable */) { - const typeAnnotation = symbol.valueDeclaration.type; - if (typeAnnotation) { - return resolveSymbol(getPropertyOfType(getTypeFromTypeNode(typeAnnotation), name)); - } - } - } - function getExternalModuleMember(node, specifier, dontResolveAlias = false) { - var _a; - const moduleSpecifier = getExternalModuleRequireArgument(node) || node.moduleSpecifier; - const moduleSymbol = resolveExternalModuleName(node, moduleSpecifier); - const name = !isPropertyAccessExpression(specifier) && specifier.propertyName || specifier.name; - if (!isIdentifier(name)) { - return void 0; - } - const suppressInteropError = name.escapedText === "default" /* Default */ && allowSyntheticDefaultImports; - const targetSymbol = resolveESModuleSymbol( - moduleSymbol, - moduleSpecifier, - /*dontResolveAlias*/ - false, - suppressInteropError - ); - if (targetSymbol) { - if (name.escapedText) { - if (isShorthandAmbientModuleSymbol(moduleSymbol)) { - return moduleSymbol; - } - let symbolFromVariable; - if (moduleSymbol && moduleSymbol.exports && moduleSymbol.exports.get("export=" /* ExportEquals */)) { - symbolFromVariable = getPropertyOfType( - getTypeOfSymbol(targetSymbol), - name.escapedText, - /*skipObjectFunctionPropertyAugment*/ - true - ); - } else { - symbolFromVariable = getPropertyOfVariable(targetSymbol, name.escapedText); - } - symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias); - let symbolFromModule = getExportOfModule(targetSymbol, name, specifier, dontResolveAlias); - if (symbolFromModule === void 0 && name.escapedText === "default" /* Default */) { - const file = (_a = moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile); - if (isOnlyImportedAsDefault(moduleSpecifier) || canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, moduleSpecifier)) { - symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias); - } - } - const symbol = symbolFromModule && symbolFromVariable && symbolFromModule !== symbolFromVariable ? combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) : symbolFromModule || symbolFromVariable; - if (!symbol) { - errorNoModuleMemberSymbol(moduleSymbol, targetSymbol, node, name); - } - return symbol; - } - } - } - function errorNoModuleMemberSymbol(moduleSymbol, targetSymbol, node, name) { - var _a; - const moduleName = getFullyQualifiedName(moduleSymbol, node); - const declarationName = declarationNameToString(name); - const suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol); - if (suggestion !== void 0) { - const suggestionName = symbolToString(suggestion); - const diagnostic = error2(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); - if (suggestion.valueDeclaration) { - addRelatedInfo( - diagnostic, - createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName) - ); - } - } else { - if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has("default" /* Default */)) { - error2( - name, - Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, - moduleName, - declarationName - ); - } else { - reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName); - } - } - } - function reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName) { - var _a, _b; - const localSymbol = (_b = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals) == null ? void 0 : _b.get(name.escapedText); - const exports = moduleSymbol.exports; - if (localSymbol) { - const exportedEqualsSymbol = exports == null ? void 0 : exports.get("export=" /* ExportEquals */); - if (exportedEqualsSymbol) { - getSymbolIfSameReference(exportedEqualsSymbol, localSymbol) ? reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) : error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); - } else { - const exportedSymbol = exports ? find(symbolsToArray(exports), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0; - const diagnostic = exportedSymbol ? error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); - if (localSymbol.declarations) { - addRelatedInfo( - diagnostic, - ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)) - ); - } - } - } else { - error2(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName); - } - } - function reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) { - if (moduleKind >= 5 /* ES2015 */) { - const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error2(name, message, declarationName); - } else { - if (isInJSFile(node)) { - const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error2(name, message, declarationName); - } else { - const message = getESModuleInterop(compilerOptions) ? Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import : Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; - error2(name, message, declarationName, declarationName, moduleName); - } - } - } - function getTargetOfImportSpecifier(node, dontResolveAlias) { - if (isImportSpecifier(node) && idText(node.propertyName || node.name) === "default" /* Default */) { - const specifier = getModuleSpecifierForImportOrExport(node); - const moduleSymbol = specifier && resolveExternalModuleName(node, specifier); - if (moduleSymbol) { - return getTargetofModuleDefault(moduleSymbol, node, dontResolveAlias); - } - } - const root = isBindingElement(node) ? getRootDeclaration(node) : node.parent.parent.parent; - const commonJSPropertyAccess = getCommonJSPropertyAccess(root); - const resolved = getExternalModuleMember(root, commonJSPropertyAccess || node, dontResolveAlias); - const name = node.propertyName || node.name; - if (commonJSPropertyAccess && resolved && isIdentifier(name)) { - return resolveSymbol(getPropertyOfType(getTypeOfSymbol(resolved), name.escapedText), dontResolveAlias); - } - markSymbolOfAliasDeclarationIfTypeOnly( - node, - /*immediateTarget*/ - void 0, - resolved, - /*overwriteEmpty*/ - false - ); - return resolved; - } - function getCommonJSPropertyAccess(node) { - if (isVariableDeclaration(node) && node.initializer && isPropertyAccessExpression(node.initializer)) { - return node.initializer; - } - } - function getTargetOfNamespaceExportDeclaration(node, dontResolveAlias) { - if (canHaveSymbol(node.parent)) { - const resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); - markSymbolOfAliasDeclarationIfTypeOnly( - node, - /*immediateTarget*/ - void 0, - resolved, - /*overwriteEmpty*/ - false - ); - return resolved; - } - } - function getTargetOfExportSpecifier(node, meaning, dontResolveAlias) { - if (idText(node.propertyName || node.name) === "default" /* Default */) { - const specifier = getModuleSpecifierForImportOrExport(node); - const moduleSymbol = specifier && resolveExternalModuleName(node, specifier); - if (moduleSymbol) { - return getTargetofModuleDefault(moduleSymbol, node, !!dontResolveAlias); - } - } - const resolved = node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node, dontResolveAlias) : resolveEntityName( - node.propertyName || node.name, - meaning, - /*ignoreErrors*/ - false, - dontResolveAlias - ); - markSymbolOfAliasDeclarationIfTypeOnly( - node, - /*immediateTarget*/ - void 0, - resolved, - /*overwriteEmpty*/ - false - ); - return resolved; - } - function getTargetOfExportAssignment(node, dontResolveAlias) { - const expression = isExportAssignment(node) ? node.expression : node.right; - const resolved = getTargetOfAliasLikeExpression(expression, dontResolveAlias); - markSymbolOfAliasDeclarationIfTypeOnly( - node, - /*immediateTarget*/ - void 0, - resolved, - /*overwriteEmpty*/ - false - ); - return resolved; - } - function getTargetOfAliasLikeExpression(expression, dontResolveAlias) { - if (isClassExpression(expression)) { - return checkExpressionCached(expression).symbol; - } - if (!isEntityName(expression) && !isEntityNameExpression(expression)) { - return void 0; - } - const aliasLike = resolveEntityName( - expression, - 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, - /*ignoreErrors*/ - true, - dontResolveAlias - ); - if (aliasLike) { - return aliasLike; - } - checkExpressionCached(expression); - return getNodeLinks(expression).resolvedSymbol; - } - function getTargetOfAccessExpression(node, dontRecursivelyResolve) { - if (!(isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */)) { - return void 0; - } - return getTargetOfAliasLikeExpression(node.parent.right, dontRecursivelyResolve); - } - function getTargetOfAliasDeclaration(node, dontRecursivelyResolve = false) { - switch (node.kind) { - case 271 /* ImportEqualsDeclaration */: - case 260 /* VariableDeclaration */: - return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); - case 273 /* ImportClause */: - return getTargetOfImportClause(node, dontRecursivelyResolve); - case 274 /* NamespaceImport */: - return getTargetOfNamespaceImport(node, dontRecursivelyResolve); - case 280 /* NamespaceExport */: - return getTargetOfNamespaceExport(node, dontRecursivelyResolve); - case 276 /* ImportSpecifier */: - case 208 /* BindingElement */: - return getTargetOfImportSpecifier(node, dontRecursivelyResolve); - case 281 /* ExportSpecifier */: - return getTargetOfExportSpecifier(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, dontRecursivelyResolve); - case 277 /* ExportAssignment */: - case 226 /* BinaryExpression */: - return getTargetOfExportAssignment(node, dontRecursivelyResolve); - case 270 /* NamespaceExportDeclaration */: - return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve); - case 304 /* ShorthandPropertyAssignment */: - return resolveEntityName( - node.name, - 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, - /*ignoreErrors*/ - true, - dontRecursivelyResolve - ); - case 303 /* PropertyAssignment */: - return getTargetOfAliasLikeExpression(node.initializer, dontRecursivelyResolve); - case 212 /* ElementAccessExpression */: - case 211 /* PropertyAccessExpression */: - return getTargetOfAccessExpression(node, dontRecursivelyResolve); - default: - return Debug.fail(); - } - } - function isNonLocalAlias(symbol, excludes = 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */) { - if (!symbol) - return false; - return (symbol.flags & (2097152 /* Alias */ | excludes)) === 2097152 /* Alias */ || !!(symbol.flags & 2097152 /* Alias */ && symbol.flags & 67108864 /* Assignment */); - } - function resolveSymbol(symbol, dontResolveAlias) { - return !dontResolveAlias && isNonLocalAlias(symbol) ? resolveAlias(symbol) : symbol; - } - function resolveAlias(symbol) { - Debug.assert((symbol.flags & 2097152 /* Alias */) !== 0, "Should only get Alias here."); - const links = getSymbolLinks(symbol); - if (!links.aliasTarget) { - links.aliasTarget = resolvingSymbol; - const node = getDeclarationOfAliasSymbol(symbol); - if (!node) - return Debug.fail(); - const target = getTargetOfAliasDeclaration(node); - if (links.aliasTarget === resolvingSymbol) { - links.aliasTarget = target || unknownSymbol; - } else { - error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); - } - } else if (links.aliasTarget === resolvingSymbol) { - links.aliasTarget = unknownSymbol; - } - return links.aliasTarget; - } - function tryResolveAlias(symbol) { - const links = getSymbolLinks(symbol); - if (links.aliasTarget !== resolvingSymbol) { - return resolveAlias(symbol); - } - return void 0; - } - function getSymbolFlags(symbol, excludeTypeOnlyMeanings, excludeLocalMeanings) { - const typeOnlyDeclaration = excludeTypeOnlyMeanings && getTypeOnlyAliasDeclaration(symbol); - const typeOnlyDeclarationIsExportStar = typeOnlyDeclaration && isExportDeclaration(typeOnlyDeclaration); - const typeOnlyResolution = typeOnlyDeclaration && (typeOnlyDeclarationIsExportStar ? resolveExternalModuleName( - typeOnlyDeclaration.moduleSpecifier, - typeOnlyDeclaration.moduleSpecifier, - /*ignoreErrors*/ - true - ) : resolveAlias(typeOnlyDeclaration.symbol)); - const typeOnlyExportStarTargets = typeOnlyDeclarationIsExportStar && typeOnlyResolution ? getExportsOfModule(typeOnlyResolution) : void 0; - let flags = excludeLocalMeanings ? 0 /* None */ : symbol.flags; - let seenSymbols; - while (symbol.flags & 2097152 /* Alias */) { - const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol)); - if (!typeOnlyDeclarationIsExportStar && target === typeOnlyResolution || (typeOnlyExportStarTargets == null ? void 0 : typeOnlyExportStarTargets.get(target.escapedName)) === target) { - break; - } - if (target === unknownSymbol) { - return 67108863 /* All */; - } - if (target === symbol || (seenSymbols == null ? void 0 : seenSymbols.has(target))) { - break; - } - if (target.flags & 2097152 /* Alias */) { - if (seenSymbols) { - seenSymbols.add(target); - } else { - seenSymbols = /* @__PURE__ */ new Set([symbol, target]); - } - } - flags |= target.flags; - symbol = target; - } - return flags; - } - function markSymbolOfAliasDeclarationIfTypeOnly(aliasDeclaration, immediateTarget, finalTarget, overwriteEmpty, exportStarDeclaration, exportStarName) { - if (!aliasDeclaration || isPropertyAccessExpression(aliasDeclaration)) - return false; - const sourceSymbol = getSymbolOfDeclaration(aliasDeclaration); - if (isTypeOnlyImportOrExportDeclaration(aliasDeclaration)) { - const links2 = getSymbolLinks(sourceSymbol); - links2.typeOnlyDeclaration = aliasDeclaration; - return true; - } - if (exportStarDeclaration) { - const links2 = getSymbolLinks(sourceSymbol); - links2.typeOnlyDeclaration = exportStarDeclaration; - if (sourceSymbol.escapedName !== exportStarName) { - links2.typeOnlyExportStarName = exportStarName; - } - return true; - } - const links = getSymbolLinks(sourceSymbol); - return markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, immediateTarget, overwriteEmpty) || markSymbolOfAliasDeclarationIfTypeOnlyWorker(links, finalTarget, overwriteEmpty); - } - function markSymbolOfAliasDeclarationIfTypeOnlyWorker(aliasDeclarationLinks, target, overwriteEmpty) { - var _a; - if (target && (aliasDeclarationLinks.typeOnlyDeclaration === void 0 || overwriteEmpty && aliasDeclarationLinks.typeOnlyDeclaration === false)) { - const exportSymbol = ((_a = target.exports) == null ? void 0 : _a.get("export=" /* ExportEquals */)) ?? target; - const typeOnly = exportSymbol.declarations && find(exportSymbol.declarations, isTypeOnlyImportOrExportDeclaration); - aliasDeclarationLinks.typeOnlyDeclaration = typeOnly ?? getSymbolLinks(exportSymbol).typeOnlyDeclaration ?? false; - } - return !!aliasDeclarationLinks.typeOnlyDeclaration; - } - function getTypeOnlyAliasDeclaration(symbol, include) { - if (!(symbol.flags & 2097152 /* Alias */)) { - return void 0; - } - const links = getSymbolLinks(symbol); - if (include === void 0) { - return links.typeOnlyDeclaration || void 0; - } - if (links.typeOnlyDeclaration) { - const resolved = links.typeOnlyDeclaration.kind === 278 /* ExportDeclaration */ ? resolveSymbol(getExportsOfModule(links.typeOnlyDeclaration.symbol.parent).get(links.typeOnlyExportStarName || symbol.escapedName)) : resolveAlias(links.typeOnlyDeclaration.symbol); - return getSymbolFlags(resolved) & include ? links.typeOnlyDeclaration : void 0; - } - return void 0; - } - function markExportAsReferenced(node) { - if (!canCollectSymbolAliasAccessabilityData) { - return; - } - const symbol = getSymbolOfDeclaration(node); - const target = resolveAlias(symbol); - if (target) { - const markAlias = target === unknownSymbol || getSymbolFlags( - symbol, - /*excludeTypeOnlyMeanings*/ - true - ) & 111551 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target); - if (markAlias) { - markAliasSymbolAsReferenced(symbol); - } - } - } - function markAliasSymbolAsReferenced(symbol) { - Debug.assert(canCollectSymbolAliasAccessabilityData); - const links = getSymbolLinks(symbol); - if (!links.referenced) { - links.referenced = true; - const node = getDeclarationOfAliasSymbol(symbol); - if (!node) - return Debug.fail(); - if (isInternalModuleImportEqualsDeclaration(node)) { - if (getSymbolFlags(resolveSymbol(symbol)) & 111551 /* Value */) { - checkExpressionCached(node.moduleReference); - } - } - } - } - function markConstEnumAliasAsReferenced(symbol) { - const links = getSymbolLinks(symbol); - if (!links.constEnumReferenced) { - links.constEnumReferenced = true; - } - } - function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) { - if (entityName.kind === 80 /* Identifier */ && isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { - entityName = entityName.parent; - } - if (entityName.kind === 80 /* Identifier */ || entityName.parent.kind === 166 /* QualifiedName */) { - return resolveEntityName( - entityName, - 1920 /* Namespace */, - /*ignoreErrors*/ - false, - dontResolveAlias - ); - } else { - Debug.assert(entityName.parent.kind === 271 /* ImportEqualsDeclaration */); - return resolveEntityName( - entityName, - 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, - /*ignoreErrors*/ - false, - dontResolveAlias - ); - } - } - function getFullyQualifiedName(symbol, containingLocation) { - return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString( - symbol, - containingLocation, - /*meaning*/ - void 0, - 32 /* DoNotIncludeSymbolChain */ | 4 /* AllowAnyNodeKind */ - ); - } - function getContainingQualifiedNameNode(node) { - while (isQualifiedName(node.parent)) { - node = node.parent; - } - return node; - } - function tryGetQualifiedNameAsValue(node) { - let left = getFirstIdentifier(node); - let symbol = resolveName( - left, - left.escapedText, - 111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - left, - /*isUse*/ - true - ); - if (!symbol) { - return void 0; - } - while (isQualifiedName(left.parent)) { - const type = getTypeOfSymbol(symbol); - symbol = getPropertyOfType(type, left.parent.right.escapedText); - if (!symbol) { - return void 0; - } - left = left.parent; - } - return symbol; - } - function resolveEntityName(name, meaning, ignoreErrors, dontResolveAlias, location) { - if (nodeIsMissing(name)) { - return void 0; - } - const namespaceMeaning = 1920 /* Namespace */ | (isInJSFile(name) ? meaning & 111551 /* Value */ : 0); - let symbol; - if (name.kind === 80 /* Identifier */) { - const message = meaning === namespaceMeaning || nodeIsSynthesized(name) ? Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name)); - const symbolFromJSPrototype = isInJSFile(name) && !nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : void 0; - symbol = getMergedSymbol(resolveName( - location || name, - name.escapedText, - meaning, - ignoreErrors || symbolFromJSPrototype ? void 0 : message, - name, - /*isUse*/ - true, - /*excludeGlobals*/ - false - )); - if (!symbol) { - return getMergedSymbol(symbolFromJSPrototype); - } - } else if (name.kind === 166 /* QualifiedName */ || name.kind === 211 /* PropertyAccessExpression */) { - const left = name.kind === 166 /* QualifiedName */ ? name.left : name.expression; - const right = name.kind === 166 /* QualifiedName */ ? name.right : name.name; - let namespace = resolveEntityName( - left, - namespaceMeaning, - ignoreErrors, - /*dontResolveAlias*/ - false, - location - ); - if (!namespace || nodeIsMissing(right)) { - return void 0; - } else if (namespace === unknownSymbol) { - return namespace; - } - if (namespace.valueDeclaration && isInJSFile(namespace.valueDeclaration) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isVariableDeclaration(namespace.valueDeclaration) && namespace.valueDeclaration.initializer && isCommonJsRequire(namespace.valueDeclaration.initializer)) { - const moduleName = namespace.valueDeclaration.initializer.arguments[0]; - const moduleSym = resolveExternalModuleName(moduleName, moduleName); - if (moduleSym) { - const resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym); - if (resolvedModuleSymbol) { - namespace = resolvedModuleSymbol; - } - } - } - symbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(namespace), right.escapedText, meaning)); - if (!symbol && namespace.flags & 2097152 /* Alias */) { - symbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(resolveAlias(namespace)), right.escapedText, meaning)); - } - if (!symbol) { - if (!ignoreErrors) { - const namespaceName = getFullyQualifiedName(namespace); - const declarationName = declarationNameToString(right); - const suggestionForNonexistentModule = getSuggestedSymbolForNonexistentModule(right, namespace); - if (suggestionForNonexistentModule) { - error2(right, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule)); - return void 0; - } - const containingQualifiedName = isQualifiedName(name) && getContainingQualifiedNameNode(name); - const canSuggestTypeof = globalObjectType && meaning & 788968 /* Type */ && containingQualifiedName && !isTypeOfExpression(containingQualifiedName.parent) && tryGetQualifiedNameAsValue(containingQualifiedName); - if (canSuggestTypeof) { - error2( - containingQualifiedName, - Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, - entityNameToString(containingQualifiedName) - ); - return void 0; - } - if (meaning & 1920 /* Namespace */ && isQualifiedName(name.parent)) { - const exportedTypeSymbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(namespace), right.escapedText, 788968 /* Type */)); - if (exportedTypeSymbol) { - error2( - name.parent.right, - 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, - symbolToString(exportedTypeSymbol), - unescapeLeadingUnderscores(name.parent.right.escapedText) - ); - return void 0; - } - } - error2(right, Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName); - } - return void 0; - } - } else { - Debug.assertNever(name, "Unknown entity name kind."); - } - Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 277 /* ExportAssignment */)) { - markSymbolOfAliasDeclarationIfTypeOnly( - getAliasDeclarationFromName(name), - symbol, - /*finalTarget*/ - void 0, - /*overwriteEmpty*/ - true - ); - } - return symbol.flags & meaning || dontResolveAlias ? symbol : resolveAlias(symbol); - } - function resolveEntityNameFromAssignmentDeclaration(name, meaning) { - if (isJSDocTypeReference(name.parent)) { - const secondaryLocation = getAssignmentDeclarationLocation(name.parent); - if (secondaryLocation) { - return resolveName( - secondaryLocation, - name.escapedText, - meaning, - /*nameNotFoundMessage*/ - void 0, - name, - /*isUse*/ - true - ); - } - } - } - function getAssignmentDeclarationLocation(node) { - const typeAlias = findAncestor(node, (node2) => !(isJSDocNode(node2) || node2.flags & 16777216 /* JSDoc */) ? "quit" : isJSDocTypeAlias(node2)); - if (typeAlias) { - return; - } - const host2 = getJSDocHost(node); - if (host2 && isExpressionStatement(host2) && isPrototypePropertyAssignment(host2.expression)) { - const symbol = getSymbolOfDeclaration(host2.expression.left); - if (symbol) { - return getDeclarationOfJSPrototypeContainer(symbol); - } - } - if (host2 && isFunctionExpression(host2) && isPrototypePropertyAssignment(host2.parent) && isExpressionStatement(host2.parent.parent)) { - const symbol = getSymbolOfDeclaration(host2.parent.left); - if (symbol) { - return getDeclarationOfJSPrototypeContainer(symbol); - } - } - if (host2 && (isObjectLiteralMethod(host2) || isPropertyAssignment(host2)) && isBinaryExpression(host2.parent.parent) && getAssignmentDeclarationKind(host2.parent.parent) === 6 /* Prototype */) { - const symbol = getSymbolOfDeclaration(host2.parent.parent.left); - if (symbol) { - return getDeclarationOfJSPrototypeContainer(symbol); - } - } - const sig = getEffectiveJSDocHost(node); - if (sig && isFunctionLike(sig)) { - const symbol = getSymbolOfDeclaration(sig); - return symbol && symbol.valueDeclaration; - } - } - function getDeclarationOfJSPrototypeContainer(symbol) { - const decl = symbol.parent.valueDeclaration; - if (!decl) { - return void 0; - } - const initializer = isAssignmentDeclaration(decl) ? getAssignedExpandoInitializer(decl) : hasOnlyExpressionInitializer(decl) ? getDeclaredExpandoInitializer(decl) : void 0; - return initializer || decl; - } - function getExpandoSymbol(symbol) { - const decl = symbol.valueDeclaration; - if (!decl || !isInJSFile(decl) || symbol.flags & 524288 /* TypeAlias */ || getExpandoInitializer( - decl, - /*isPrototypeAssignment*/ - false - )) { - return void 0; - } - const init = isVariableDeclaration(decl) ? getDeclaredExpandoInitializer(decl) : getAssignedExpandoInitializer(decl); - if (init) { - const initSymbol = getSymbolOfNode(init); - if (initSymbol) { - return mergeJSSymbols(initSymbol, symbol); - } - } - } - function resolveExternalModuleName(location, moduleReferenceExpression, ignoreErrors) { - const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */; - const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations; - return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? void 0 : errorMessage); - } - function resolveExternalModuleNameWorker(location, moduleReferenceExpression, moduleNotFoundError, isForAugmentation = false) { - return isStringLiteralLike(moduleReferenceExpression) ? resolveExternalModule(location, moduleReferenceExpression.text, moduleNotFoundError, moduleReferenceExpression, isForAugmentation) : void 0; - } - function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation = false) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j; - if (startsWith(moduleReference, "@types/")) { - const diag2 = Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1; - const withoutAtTypePrefix = removePrefix(moduleReference, "@types/"); - error2(errorNode, diag2, withoutAtTypePrefix, moduleReference); - } - const ambientModule = tryFindAmbientModule( - moduleReference, - /*withAugmentations*/ - true - ); - if (ambientModule) { - return ambientModule; - } - const currentSourceFile = getSourceFileOfNode(location); - const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = findAncestor(location, isImportCall)) == null ? void 0 : _a.arguments[0]) || ((_b = findAncestor(location, isImportDeclaration)) == null ? void 0 : _b.moduleSpecifier) || ((_c = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _c.moduleReference.expression) || ((_d = findAncestor(location, isExportDeclaration)) == null ? void 0 : _d.moduleSpecifier) || ((_e = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _e.name) || ((_f = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _f.argument.literal); - const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat; - const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); - const resolvedModule = getResolvedModule(currentSourceFile, moduleReference, mode); - const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile); - const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName); - if (sourceFile) { - if (resolutionDiagnostic) { - error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); - } - if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) { - const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); - if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { - error2( - errorNode, - Diagnostics.A_declaration_file_cannot_be_imported_without_import_type_Did_you_mean_to_import_an_implementation_file_0_instead, - getSuggestedImportSource(Debug.checkDefined(tryExtractTSExtension(moduleReference))) - ); - } - } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); - if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { - const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); - error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); - } - } - if (sourceFile.symbol) { - if (resolvedModule.isExternalLibraryImport && !resolutionExtensionIsTSOrJson(resolvedModule.extension)) { - errorOnImplicitAnyModule( - /*isError*/ - false, - errorNode, - currentSourceFile, - mode, - resolvedModule, - moduleReference - ); - } - if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) { - const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); - const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); - const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_i = overrideClauseHost.assertions) == null ? void 0 : _i.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; - if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) { - if (findAncestor(location, isImportEqualsDeclaration)) { - error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); - } else { - let diagnosticDetails; - const ext = tryGetExtensionFromPath2(currentSourceFile.fileName); - if (ext === ".ts" /* Ts */ || ext === ".js" /* Js */ || ext === ".tsx" /* Tsx */ || ext === ".jsx" /* Jsx */) { - const scope = currentSourceFile.packageJsonScope; - const targetExt = ext === ".ts" /* Ts */ ? ".mts" /* Mts */ : ext === ".js" /* Js */ ? ".mjs" /* Mjs */ : void 0; - if (scope && !scope.contents.packageJsonContent.type) { - if (targetExt) { - diagnosticDetails = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1, - targetExt, - combinePaths(scope.packageDirectory, "package.json") - ); - } else { - diagnosticDetails = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0, - combinePaths(scope.packageDirectory, "package.json") - ); - } - } else { - if (targetExt) { - diagnosticDetails = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module, - targetExt - ); - } else { - diagnosticDetails = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module - ); - } - } - } - diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorNode), errorNode, chainDiagnosticMessages( - diagnosticDetails, - Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead, - moduleReference - ))); - } - } - } - return getMergedSymbol(sourceFile.symbol); - } - if (moduleNotFoundError) { - error2(errorNode, Diagnostics.File_0_is_not_a_module, sourceFile.fileName); - } - return void 0; - } - if (patternAmbientModules) { - const pattern = findBestPatternMatch(patternAmbientModules, (_) => _.pattern, moduleReference); - if (pattern) { - const augmentation = patternAmbientModuleAugmentations && patternAmbientModuleAugmentations.get(moduleReference); - if (augmentation) { - return getMergedSymbol(augmentation); - } - return getMergedSymbol(pattern.symbol); - } - } - if (resolvedModule && !resolutionExtensionIsTSOrJson(resolvedModule.extension) && resolutionDiagnostic === void 0 || resolutionDiagnostic === Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type) { - if (isForAugmentation) { - const diag2 = Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented; - error2(errorNode, diag2, moduleReference, resolvedModule.resolvedFileName); - } else { - errorOnImplicitAnyModule( - /*isError*/ - noImplicitAny && !!moduleNotFoundError, - errorNode, - currentSourceFile, - mode, - resolvedModule, - moduleReference - ); - } - return void 0; - } - if (moduleNotFoundError) { - if (resolvedModule) { - const redirect = host.getProjectReferenceRedirect(resolvedModule.resolvedFileName); - if (redirect) { - error2(errorNode, Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, resolvedModule.resolvedFileName); - return void 0; - } - } - if (resolutionDiagnostic) { - error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); - } else { - const isExtensionlessRelativePathImport = pathIsRelative(moduleReference) && !hasExtension(moduleReference); - const resolutionIsNode16OrNext = moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */; - if (!getResolveJsonModule(compilerOptions) && fileExtensionIs(moduleReference, ".json" /* Json */) && moduleResolutionKind !== 1 /* Classic */ && hasJsonModuleEmitEnabled(compilerOptions)) { - error2(errorNode, Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference); - } else if (mode === 99 /* ESNext */ && resolutionIsNode16OrNext && isExtensionlessRelativePathImport) { - const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); - const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1]; - if (suggestedExt) { - error2( - errorNode, - Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, - moduleReference + suggestedExt - ); - } else { - error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); - } - } else { - error2(errorNode, moduleNotFoundError, moduleReference); - } - } - } - return void 0; - function getSuggestedImportSource(tsExtension) { - const importSourceWithoutExtension = removeExtension(moduleReference, tsExtension); - if (emitModuleKindIsNonNodeESM(moduleKind) || mode === 99 /* ESNext */) { - const preferTs = isDeclarationFileName(moduleReference) && shouldAllowImportingTsExtension(compilerOptions); - const ext = tsExtension === ".mts" /* Mts */ || tsExtension === ".d.mts" /* Dmts */ ? preferTs ? ".mts" : ".mjs" : tsExtension === ".cts" /* Cts */ || tsExtension === ".d.mts" /* Dmts */ ? preferTs ? ".cts" : ".cjs" : preferTs ? ".ts" : ".js"; - return importSourceWithoutExtension + ext; - } - return importSourceWithoutExtension; - } - } - function errorOnImplicitAnyModule(isError, errorNode, sourceFile, mode, { packageId, resolvedFileName }, moduleReference) { - let errorInfo; - if (!isExternalModuleNameRelative(moduleReference) && packageId) { - errorInfo = createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageId.name); - } - errorOrSuggestion(isError, errorNode, chainDiagnosticMessages( - errorInfo, - Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, - moduleReference, - resolvedFileName - )); - } - function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) { - if (moduleSymbol == null ? void 0 : moduleSymbol.exports) { - const exportEquals = resolveSymbol(moduleSymbol.exports.get("export=" /* ExportEquals */), dontResolveAlias); - const exported = getCommonJsExportEquals(getMergedSymbol(exportEquals), getMergedSymbol(moduleSymbol)); - return getMergedSymbol(exported) || moduleSymbol; - } - return void 0; - } - function getCommonJsExportEquals(exported, moduleSymbol) { - if (!exported || exported === unknownSymbol || exported === moduleSymbol || moduleSymbol.exports.size === 1 || exported.flags & 2097152 /* Alias */) { - return exported; - } - const links = getSymbolLinks(exported); - if (links.cjsExportMerged) { - return links.cjsExportMerged; - } - const merged = exported.flags & 33554432 /* Transient */ ? exported : cloneSymbol(exported); - merged.flags = merged.flags | 512 /* ValueModule */; - if (merged.exports === void 0) { - merged.exports = createSymbolTable(); - } - moduleSymbol.exports.forEach((s, name) => { - if (name === "export=" /* ExportEquals */) - return; - merged.exports.set(name, merged.exports.has(name) ? mergeSymbol(merged.exports.get(name), s) : s); - }); - if (merged === exported) { - getSymbolLinks(merged).resolvedExports = void 0; - getSymbolLinks(merged).resolvedMembers = void 0; - } - getSymbolLinks(merged).cjsExportMerged = merged; - return links.cjsExportMerged = merged; - } - function resolveESModuleSymbol(moduleSymbol, referencingLocation, dontResolveAlias, suppressInteropError) { - var _a; - const symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias); - if (!dontResolveAlias && symbol) { - if (!suppressInteropError && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */)) && !getDeclarationOfKind(symbol, 312 /* SourceFile */)) { - const compilerOptionName = moduleKind >= 5 /* ES2015 */ ? "allowSyntheticDefaultImports" : "esModuleInterop"; - error2(referencingLocation, Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName); - return symbol; - } - const referenceParent = referencingLocation.parent; - if (isImportDeclaration(referenceParent) && getNamespaceDeclarationNode(referenceParent) || isImportCall(referenceParent)) { - const reference = isImportCall(referenceParent) ? referenceParent.arguments[0] : referenceParent.moduleSpecifier; - const type = getTypeOfSymbol(symbol); - const defaultOnlyType = getTypeWithSyntheticDefaultOnly(type, symbol, moduleSymbol, reference); - if (defaultOnlyType) { - return cloneTypeAsModuleType(symbol, defaultOnlyType, referenceParent); - } - const targetFile = (_a = moduleSymbol == null ? void 0 : moduleSymbol.declarations) == null ? void 0 : _a.find(isSourceFile); - const isEsmCjsRef = targetFile && isESMFormatImportImportingCommonjsFormatFile(getUsageModeForExpression(reference), targetFile.impliedNodeFormat); - if (getESModuleInterop(compilerOptions) || isEsmCjsRef) { - let sigs = getSignaturesOfStructuredType(type, 0 /* Call */); - if (!sigs || !sigs.length) { - sigs = getSignaturesOfStructuredType(type, 1 /* Construct */); - } - if (sigs && sigs.length || getPropertyOfType( - type, - "default" /* Default */, - /*skipObjectFunctionPropertyAugment*/ - true - ) || isEsmCjsRef) { - const moduleType = type.flags & 3670016 /* StructuredType */ ? getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference) : createDefaultPropertyWrapperForModule(symbol, symbol.parent); - return cloneTypeAsModuleType(symbol, moduleType, referenceParent); - } - } - } - } - return symbol; - } - function cloneTypeAsModuleType(symbol, moduleType, referenceParent) { - const result = createSymbol(symbol.flags, symbol.escapedName); - result.declarations = symbol.declarations ? symbol.declarations.slice() : []; - result.parent = symbol.parent; - result.links.target = symbol; - result.links.originatingImport = referenceParent; - if (symbol.valueDeclaration) - result.valueDeclaration = symbol.valueDeclaration; - if (symbol.constEnumOnlyModule) - result.constEnumOnlyModule = true; - if (symbol.members) - result.members = new Map(symbol.members); - if (symbol.exports) - result.exports = new Map(symbol.exports); - const resolvedModuleType = resolveStructuredTypeMembers(moduleType); - result.links.type = createAnonymousType(result, resolvedModuleType.members, emptyArray, emptyArray, resolvedModuleType.indexInfos); - return result; - } - function hasExportAssignmentSymbol(moduleSymbol) { - return moduleSymbol.exports.get("export=" /* ExportEquals */) !== void 0; - } - function getExportsOfModuleAsArray(moduleSymbol) { - return symbolsToArray(getExportsOfModule(moduleSymbol)); - } - function getExportsAndPropertiesOfModule(moduleSymbol) { - const exports = getExportsOfModuleAsArray(moduleSymbol); - const exportEquals = resolveExternalModuleSymbol(moduleSymbol); - if (exportEquals !== moduleSymbol) { - const type = getTypeOfSymbol(exportEquals); - if (shouldTreatPropertiesOfExternalModuleAsExports(type)) { - addRange(exports, getPropertiesOfType(type)); - } - } - return exports; - } - function forEachExportAndPropertyOfModule(moduleSymbol, cb) { - const exports = getExportsOfModule(moduleSymbol); - exports.forEach((symbol, key) => { - if (!isReservedMemberName(key)) { - cb(symbol, key); - } - }); - const exportEquals = resolveExternalModuleSymbol(moduleSymbol); - if (exportEquals !== moduleSymbol) { - const type = getTypeOfSymbol(exportEquals); - if (shouldTreatPropertiesOfExternalModuleAsExports(type)) { - forEachPropertyOfType(type, (symbol, escapedName) => { - cb(symbol, escapedName); - }); - } - } - } - function tryGetMemberInModuleExports(memberName, moduleSymbol) { - const symbolTable = getExportsOfModule(moduleSymbol); - if (symbolTable) { - return symbolTable.get(memberName); - } - } - function tryGetMemberInModuleExportsAndProperties(memberName, moduleSymbol) { - const symbol = tryGetMemberInModuleExports(memberName, moduleSymbol); - if (symbol) { - return symbol; - } - const exportEquals = resolveExternalModuleSymbol(moduleSymbol); - if (exportEquals === moduleSymbol) { - return void 0; - } - const type = getTypeOfSymbol(exportEquals); - return shouldTreatPropertiesOfExternalModuleAsExports(type) ? getPropertyOfType(type, memberName) : void 0; - } - function shouldTreatPropertiesOfExternalModuleAsExports(resolvedExternalModuleType) { - return !(resolvedExternalModuleType.flags & 402784252 /* Primitive */ || getObjectFlags(resolvedExternalModuleType) & 1 /* Class */ || // `isArrayOrTupleLikeType` is too expensive to use in this auto-imports hot path - isArrayType(resolvedExternalModuleType) || isTupleType(resolvedExternalModuleType)); - } - function getExportsOfSymbol(symbol) { - return symbol.flags & 6256 /* LateBindingContainer */ ? getResolvedMembersOrExportsOfSymbol(symbol, "resolvedExports" /* resolvedExports */) : symbol.flags & 1536 /* Module */ ? getExportsOfModule(symbol) : symbol.exports || emptySymbols; - } - function getExportsOfModule(moduleSymbol) { - const links = getSymbolLinks(moduleSymbol); - if (!links.resolvedExports) { - const { exports, typeOnlyExportStarMap } = getExportsOfModuleWorker(moduleSymbol); - links.resolvedExports = exports; - links.typeOnlyExportStarMap = typeOnlyExportStarMap; - } - return links.resolvedExports; - } - function extendExportSymbols(target, source, lookupTable, exportNode) { - if (!source) - return; - source.forEach((sourceSymbol, id) => { - if (id === "default" /* Default */) - return; - const targetSymbol = target.get(id); - if (!targetSymbol) { - target.set(id, sourceSymbol); - if (lookupTable && exportNode) { - lookupTable.set(id, { - specifierText: getTextOfNode(exportNode.moduleSpecifier) - }); - } - } else if (lookupTable && exportNode && targetSymbol && resolveSymbol(targetSymbol) !== resolveSymbol(sourceSymbol)) { - const collisionTracker = lookupTable.get(id); - if (!collisionTracker.exportsWithDuplicate) { - collisionTracker.exportsWithDuplicate = [exportNode]; - } else { - collisionTracker.exportsWithDuplicate.push(exportNode); - } - } - }); - } - function getExportsOfModuleWorker(moduleSymbol) { - const visitedSymbols = []; - let typeOnlyExportStarMap; - const nonTypeOnlyNames = /* @__PURE__ */ new Set(); - moduleSymbol = resolveExternalModuleSymbol(moduleSymbol); - const exports = visit(moduleSymbol) || emptySymbols; - if (typeOnlyExportStarMap) { - nonTypeOnlyNames.forEach((name) => typeOnlyExportStarMap.delete(name)); - } - return { - exports, - typeOnlyExportStarMap - }; - function visit(symbol, exportStar, isTypeOnly) { - if (!isTypeOnly && (symbol == null ? void 0 : symbol.exports)) { - symbol.exports.forEach((_, name) => nonTypeOnlyNames.add(name)); - } - if (!(symbol && symbol.exports && pushIfUnique(visitedSymbols, symbol))) { - return; - } - const symbols = new Map(symbol.exports); - const exportStars = symbol.exports.get("__export" /* ExportStar */); - if (exportStars) { - const nestedSymbols = createSymbolTable(); - const lookupTable = /* @__PURE__ */ new Map(); - if (exportStars.declarations) { - for (const node of exportStars.declarations) { - const resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier); - const exportedSymbols = visit(resolvedModule, node, isTypeOnly || node.isTypeOnly); - extendExportSymbols( - nestedSymbols, - exportedSymbols, - lookupTable, - node - ); - } - } - lookupTable.forEach(({ exportsWithDuplicate }, id) => { - if (id === "export=" || !(exportsWithDuplicate && exportsWithDuplicate.length) || symbols.has(id)) { - return; - } - for (const node of exportsWithDuplicate) { - diagnostics.add(createDiagnosticForNode( - node, - Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity, - lookupTable.get(id).specifierText, - unescapeLeadingUnderscores(id) - )); - } - }); - extendExportSymbols(symbols, nestedSymbols); - } - if (exportStar == null ? void 0 : exportStar.isTypeOnly) { - typeOnlyExportStarMap ?? (typeOnlyExportStarMap = /* @__PURE__ */ new Map()); - symbols.forEach((_, escapedName) => typeOnlyExportStarMap.set( - escapedName, - exportStar - )); - } - return symbols; - } - } - function getMergedSymbol(symbol) { - let merged; - return symbol && symbol.mergeId && (merged = mergedSymbols[symbol.mergeId]) ? merged : symbol; - } - function getSymbolOfDeclaration(node) { - return getMergedSymbol(node.symbol && getLateBoundSymbol(node.symbol)); - } - function getSymbolOfNode(node) { - return canHaveSymbol(node) ? getSymbolOfDeclaration(node) : void 0; - } - function getParentOfSymbol(symbol) { - return getMergedSymbol(symbol.parent && getLateBoundSymbol(symbol.parent)); - } - function getAlternativeContainingModules(symbol, enclosingDeclaration) { - const containingFile = getSourceFileOfNode(enclosingDeclaration); - const id = getNodeId(containingFile); - const links = getSymbolLinks(symbol); - let results; - if (links.extendedContainersByFile && (results = links.extendedContainersByFile.get(id))) { - return results; - } - if (containingFile && containingFile.imports) { - for (const importRef of containingFile.imports) { - if (nodeIsSynthesized(importRef)) - continue; - const resolvedModule = resolveExternalModuleName( - enclosingDeclaration, - importRef, - /*ignoreErrors*/ - true - ); - if (!resolvedModule) - continue; - const ref = getAliasForSymbolInContainer(resolvedModule, symbol); - if (!ref) - continue; - results = append(results, resolvedModule); - } - if (length(results)) { - (links.extendedContainersByFile || (links.extendedContainersByFile = /* @__PURE__ */ new Map())).set(id, results); - return results; - } - } - if (links.extendedContainers) { - return links.extendedContainers; - } - const otherFiles = host.getSourceFiles(); - for (const file of otherFiles) { - if (!isExternalModule(file)) - continue; - const sym = getSymbolOfDeclaration(file); - const ref = getAliasForSymbolInContainer(sym, symbol); - if (!ref) - continue; - results = append(results, sym); - } - return links.extendedContainers = results || emptyArray; - } - function getContainersOfSymbol(symbol, enclosingDeclaration, meaning) { - const container = getParentOfSymbol(symbol); - if (container && !(symbol.flags & 262144 /* TypeParameter */)) { - const additionalContainers = mapDefined(container.declarations, fileSymbolIfFileSymbolExportEqualsContainer); - const reexportContainers = enclosingDeclaration && getAlternativeContainingModules(symbol, enclosingDeclaration); - const objectLiteralContainer = getVariableDeclarationOfObjectLiteral(container, meaning); - if (enclosingDeclaration && container.flags & getQualifiedLeftMeaning(meaning) && getAccessibleSymbolChain( - container, - enclosingDeclaration, - 1920 /* Namespace */, - /*useOnlyExternalAliasing*/ - false - )) { - return append(concatenate(concatenate([container], additionalContainers), reexportContainers), objectLiteralContainer); - } - const firstVariableMatch = !(container.flags & getQualifiedLeftMeaning(meaning)) && container.flags & 788968 /* Type */ && getDeclaredTypeOfSymbol(container).flags & 524288 /* Object */ && meaning === 111551 /* Value */ ? forEachSymbolTableInScope(enclosingDeclaration, (t) => { - return forEachEntry(t, (s) => { - if (s.flags & getQualifiedLeftMeaning(meaning) && getTypeOfSymbol(s) === getDeclaredTypeOfSymbol(container)) { - return s; - } - }); - }) : void 0; - let res = firstVariableMatch ? [firstVariableMatch, ...additionalContainers, container] : [...additionalContainers, container]; - res = append(res, objectLiteralContainer); - res = addRange(res, reexportContainers); - return res; - } - const candidates = mapDefined(symbol.declarations, (d) => { - if (!isAmbientModule(d) && d.parent) { - if (hasNonGlobalAugmentationExternalModuleSymbol(d.parent)) { - return getSymbolOfDeclaration(d.parent); - } - if (isModuleBlock(d.parent) && d.parent.parent && resolveExternalModuleSymbol(getSymbolOfDeclaration(d.parent.parent)) === symbol) { - return getSymbolOfDeclaration(d.parent.parent); - } - } - if (isClassExpression(d) && isBinaryExpression(d.parent) && d.parent.operatorToken.kind === 64 /* EqualsToken */ && isAccessExpression(d.parent.left) && isEntityNameExpression(d.parent.left.expression)) { - if (isModuleExportsAccessExpression(d.parent.left) || isExportsIdentifier(d.parent.left.expression)) { - return getSymbolOfDeclaration(getSourceFileOfNode(d)); - } - checkExpressionCached(d.parent.left.expression); - return getNodeLinks(d.parent.left.expression).resolvedSymbol; - } - }); - if (!length(candidates)) { - return void 0; - } - return mapDefined(candidates, (candidate) => getAliasForSymbolInContainer(candidate, symbol) ? candidate : void 0); - function fileSymbolIfFileSymbolExportEqualsContainer(d) { - return container && getFileSymbolIfFileSymbolExportEqualsContainer(d, container); - } - } - function getVariableDeclarationOfObjectLiteral(symbol, meaning) { - const firstDecl = !!length(symbol.declarations) && first(symbol.declarations); - if (meaning & 111551 /* Value */ && firstDecl && firstDecl.parent && isVariableDeclaration(firstDecl.parent)) { - if (isObjectLiteralExpression(firstDecl) && firstDecl === firstDecl.parent.initializer || isTypeLiteralNode(firstDecl) && firstDecl === firstDecl.parent.type) { - return getSymbolOfDeclaration(firstDecl.parent); - } - } - } - function getFileSymbolIfFileSymbolExportEqualsContainer(d, container) { - const fileSymbol = getExternalModuleContainer(d); - const exported = fileSymbol && fileSymbol.exports && fileSymbol.exports.get("export=" /* ExportEquals */); - return exported && getSymbolIfSameReference(exported, container) ? fileSymbol : void 0; - } - function getAliasForSymbolInContainer(container, symbol) { - if (container === getParentOfSymbol(symbol)) { - return symbol; - } - const exportEquals = container.exports && container.exports.get("export=" /* ExportEquals */); - if (exportEquals && getSymbolIfSameReference(exportEquals, symbol)) { - return container; - } - const exports = getExportsOfSymbol(container); - const quick = exports.get(symbol.escapedName); - if (quick && getSymbolIfSameReference(quick, symbol)) { - return quick; - } - return forEachEntry(exports, (exported) => { - if (getSymbolIfSameReference(exported, symbol)) { - return exported; - } - }); - } - function getSymbolIfSameReference(s1, s2) { - if (getMergedSymbol(resolveSymbol(getMergedSymbol(s1))) === getMergedSymbol(resolveSymbol(getMergedSymbol(s2)))) { - return s1; - } - } - function getExportSymbolOfValueSymbolIfExported(symbol) { - return getMergedSymbol(symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 && symbol.exportSymbol || symbol); - } - function symbolIsValue(symbol, includeTypeOnlyMembers) { - return !!(symbol.flags & 111551 /* Value */ || symbol.flags & 2097152 /* Alias */ && getSymbolFlags(symbol, !includeTypeOnlyMembers) & 111551 /* Value */); - } - function findConstructorDeclaration(node) { - const members = node.members; - for (const member of members) { - if (member.kind === 176 /* Constructor */ && nodeIsPresent(member.body)) { - return member; - } - } - } - function createType(flags) { - var _a; - const result = new Type27(checker, flags); - typeCount++; - result.id = typeCount; - (_a = tracing) == null ? void 0 : _a.recordType(result); - return result; - } - function createTypeWithSymbol(flags, symbol) { - const result = createType(flags); - result.symbol = symbol; - return result; - } - function createOriginType(flags) { - return new Type27(checker, flags); - } - function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) { - const type = createType(kind); - type.intrinsicName = intrinsicName; - type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */; - return type; - } - function createObjectType(objectFlags, symbol) { - const type = createTypeWithSymbol(524288 /* Object */, symbol); - type.objectFlags = objectFlags; - type.members = void 0; - type.properties = void 0; - type.callSignatures = void 0; - type.constructSignatures = void 0; - type.indexInfos = void 0; - return type; - } - function createTypeofType() { - return getUnionType(arrayFrom(typeofNEFacts.keys(), getStringLiteralType)); - } - function createTypeParameter(symbol) { - return createTypeWithSymbol(262144 /* TypeParameter */, symbol); - } - function isReservedMemberName(name) { - return name.charCodeAt(0) === 95 /* _ */ && name.charCodeAt(1) === 95 /* _ */ && name.charCodeAt(2) !== 95 /* _ */ && name.charCodeAt(2) !== 64 /* at */ && name.charCodeAt(2) !== 35 /* hash */; - } - function getNamedMembers(members) { - let result; - members.forEach((symbol, id) => { - if (isNamedMember(symbol, id)) { - (result || (result = [])).push(symbol); - } - }); - return result || emptyArray; - } - function isNamedMember(member, escapedName) { - return !isReservedMemberName(escapedName) && symbolIsValue(member); - } - function getNamedOrIndexSignatureMembers(members) { - const result = getNamedMembers(members); - const index = getIndexSymbolFromSymbolTable(members); - return index ? concatenate(result, [index]) : result; - } - function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos) { - const resolved = type; - resolved.members = members; - resolved.properties = emptyArray; - resolved.callSignatures = callSignatures; - resolved.constructSignatures = constructSignatures; - resolved.indexInfos = indexInfos; - if (members !== emptySymbols) - resolved.properties = getNamedMembers(members); - return resolved; - } - function createAnonymousType(symbol, members, callSignatures, constructSignatures, indexInfos) { - return setStructuredTypeMembers( - createObjectType(16 /* Anonymous */, symbol), - members, - callSignatures, - constructSignatures, - indexInfos - ); - } - function getResolvedTypeWithoutAbstractConstructSignatures(type) { - if (type.constructSignatures.length === 0) - return type; - if (type.objectTypeWithoutAbstractConstructSignatures) - return type.objectTypeWithoutAbstractConstructSignatures; - const constructSignatures = filter(type.constructSignatures, (signature) => !(signature.flags & 4 /* Abstract */)); - if (type.constructSignatures === constructSignatures) - return type; - const typeCopy = createAnonymousType( - type.symbol, - type.members, - type.callSignatures, - some(constructSignatures) ? constructSignatures : emptyArray, - type.indexInfos - ); - type.objectTypeWithoutAbstractConstructSignatures = typeCopy; - typeCopy.objectTypeWithoutAbstractConstructSignatures = typeCopy; - return typeCopy; - } - function forEachSymbolTableInScope(enclosingDeclaration, callback) { - let result; - for (let location = enclosingDeclaration; location; location = location.parent) { - if (canHaveLocals(location) && location.locals && !isGlobalSourceFile(location)) { - if (result = callback( - location.locals, - /*ignoreQualification*/ - void 0, - /*isLocalNameLookup*/ - true, - location - )) { - return result; - } - } - switch (location.kind) { - case 312 /* SourceFile */: - if (!isExternalOrCommonJsModule(location)) { - break; - } - case 267 /* ModuleDeclaration */: - const sym = getSymbolOfDeclaration(location); - if (result = callback( - (sym == null ? void 0 : sym.exports) || emptySymbols, - /*ignoreQualification*/ - void 0, - /*isLocalNameLookup*/ - true, - location - )) { - return result; - } - break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - let table; - (getSymbolOfDeclaration(location).members || emptySymbols).forEach((memberSymbol, key) => { - if (memberSymbol.flags & (788968 /* Type */ & ~67108864 /* Assignment */)) { - (table || (table = createSymbolTable())).set(key, memberSymbol); - } - }); - if (table && (result = callback( - table, - /*ignoreQualification*/ - void 0, - /*isLocalNameLookup*/ - false, - location - ))) { - return result; - } - break; - } - } - return callback( - globals, - /*ignoreQualification*/ - void 0, - /*isLocalNameLookup*/ - true - ); - } - function getQualifiedLeftMeaning(rightMeaning) { - return rightMeaning === 111551 /* Value */ ? 111551 /* Value */ : 1920 /* Namespace */; - } - function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing, visitedSymbolTablesMap = /* @__PURE__ */ new Map()) { - if (!(symbol && !isPropertyOrMethodDeclarationSymbol(symbol))) { - return void 0; - } - const links = getSymbolLinks(symbol); - const cache = links.accessibleChainCache || (links.accessibleChainCache = /* @__PURE__ */ new Map()); - const firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, (_, __, ___, node) => node); - const key = `${useOnlyExternalAliasing ? 0 : 1}|${firstRelevantLocation && getNodeId(firstRelevantLocation)}|${meaning}`; - if (cache.has(key)) { - return cache.get(key); - } - const id = getSymbolId(symbol); - let visitedSymbolTables = visitedSymbolTablesMap.get(id); - if (!visitedSymbolTables) { - visitedSymbolTablesMap.set(id, visitedSymbolTables = []); - } - const result = forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable); - cache.set(key, result); - return result; - function getAccessibleSymbolChainFromSymbolTable(symbols, ignoreQualification, isLocalNameLookup) { - if (!pushIfUnique(visitedSymbolTables, symbols)) { - return void 0; - } - const result2 = trySymbolTable(symbols, ignoreQualification, isLocalNameLookup); - visitedSymbolTables.pop(); - return result2; - } - function canQualifySymbol(symbolFromSymbolTable, meaning2) { - return !needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning2) || // If symbol needs qualification, make sure that parent is accessible, if it is then this symbol is accessible too - !!getAccessibleSymbolChain(symbolFromSymbolTable.parent, enclosingDeclaration, getQualifiedLeftMeaning(meaning2), useOnlyExternalAliasing, visitedSymbolTablesMap); - } - function isAccessible(symbolFromSymbolTable, resolvedAliasSymbol, ignoreQualification) { - return (symbol === (resolvedAliasSymbol || symbolFromSymbolTable) || getMergedSymbol(symbol) === getMergedSymbol(resolvedAliasSymbol || symbolFromSymbolTable)) && // if the symbolFromSymbolTable is not external module (it could be if it was determined as ambient external module and would be in globals table) - // and if symbolFromSymbolTable or alias resolution matches the symbol, - // check the symbol can be qualified, it is only then this symbol is accessible - !some(symbolFromSymbolTable.declarations, hasNonGlobalAugmentationExternalModuleSymbol) && (ignoreQualification || canQualifySymbol(getMergedSymbol(symbolFromSymbolTable), meaning)); - } - function trySymbolTable(symbols, ignoreQualification, isLocalNameLookup) { - if (isAccessible( - symbols.get(symbol.escapedName), - /*resolvedAliasSymbol*/ - void 0, - ignoreQualification - )) { - return [symbol]; - } - const result2 = forEachEntry(symbols, (symbolFromSymbolTable) => { - if (symbolFromSymbolTable.flags & 2097152 /* Alias */ && symbolFromSymbolTable.escapedName !== "export=" /* ExportEquals */ && symbolFromSymbolTable.escapedName !== "default" /* Default */ && !(isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && isExternalModule(getSourceFileOfNode(enclosingDeclaration))) && (!useOnlyExternalAliasing || some(symbolFromSymbolTable.declarations, isExternalModuleImportEqualsDeclaration)) && (isLocalNameLookup ? !some(symbolFromSymbolTable.declarations, isNamespaceReexportDeclaration) : true) && (ignoreQualification || !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */))) { - const resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); - const candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification); - if (candidate) { - return candidate; - } - } - if (symbolFromSymbolTable.escapedName === symbol.escapedName && symbolFromSymbolTable.exportSymbol) { - if (isAccessible( - getMergedSymbol(symbolFromSymbolTable.exportSymbol), - /*resolvedAliasSymbol*/ - void 0, - ignoreQualification - )) { - return [symbol]; - } - } - }); - return result2 || (symbols === globals ? getCandidateListForSymbol(globalThisSymbol, globalThisSymbol, ignoreQualification) : void 0); - } - function getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification) { - if (isAccessible(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification)) { - return [symbolFromSymbolTable]; - } - const candidateTable = getExportsOfSymbol(resolvedImportedSymbol); - const accessibleSymbolsFromExports = candidateTable && getAccessibleSymbolChainFromSymbolTable( - candidateTable, - /*ignoreQualification*/ - true - ); - if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) { - return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports); - } - } - } - function needsQualification(symbol, enclosingDeclaration, meaning) { - let qualify = false; - forEachSymbolTableInScope(enclosingDeclaration, (symbolTable) => { - let symbolFromSymbolTable = getMergedSymbol(symbolTable.get(symbol.escapedName)); - if (!symbolFromSymbolTable) { - return false; - } - if (symbolFromSymbolTable === symbol) { - return true; - } - const shouldResolveAlias = symbolFromSymbolTable.flags & 2097152 /* Alias */ && !getDeclarationOfKind(symbolFromSymbolTable, 281 /* ExportSpecifier */); - symbolFromSymbolTable = shouldResolveAlias ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; - const flags = shouldResolveAlias ? getSymbolFlags(symbolFromSymbolTable) : symbolFromSymbolTable.flags; - if (flags & meaning) { - qualify = true; - return true; - } - return false; - }); - return qualify; - } - function isPropertyOrMethodDeclarationSymbol(symbol) { - if (symbol.declarations && symbol.declarations.length) { - for (const declaration of symbol.declarations) { - switch (declaration.kind) { - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - continue; - default: - return false; - } - } - return true; - } - return false; - } - function isTypeSymbolAccessible(typeSymbol, enclosingDeclaration) { - const access = isSymbolAccessibleWorker( - typeSymbol, - enclosingDeclaration, - 788968 /* Type */, - /*shouldComputeAliasesToMakeVisible*/ - false, - /*allowModules*/ - true - ); - return access.accessibility === 0 /* Accessible */; - } - function isValueSymbolAccessible(typeSymbol, enclosingDeclaration) { - const access = isSymbolAccessibleWorker( - typeSymbol, - enclosingDeclaration, - 111551 /* Value */, - /*shouldComputeAliasesToMakeVisible*/ - false, - /*allowModules*/ - true - ); - return access.accessibility === 0 /* Accessible */; - } - function isSymbolAccessibleByFlags(typeSymbol, enclosingDeclaration, flags) { - const access = isSymbolAccessibleWorker( - typeSymbol, - enclosingDeclaration, - flags, - /*shouldComputeAliasesToMakeVisible*/ - false, - /*allowModules*/ - false - ); - return access.accessibility === 0 /* Accessible */; - } - function isAnySymbolAccessible(symbols, enclosingDeclaration, initialSymbol, meaning, shouldComputeAliasesToMakeVisible, allowModules) { - if (!length(symbols)) - return; - let hadAccessibleChain; - let earlyModuleBail = false; - for (const symbol of symbols) { - const accessibleSymbolChain = getAccessibleSymbolChain( - symbol, - enclosingDeclaration, - meaning, - /*useOnlyExternalAliasing*/ - false - ); - if (accessibleSymbolChain) { - hadAccessibleChain = symbol; - const hasAccessibleDeclarations = hasVisibleDeclarations(accessibleSymbolChain[0], shouldComputeAliasesToMakeVisible); - if (hasAccessibleDeclarations) { - return hasAccessibleDeclarations; - } - } - if (allowModules) { - if (some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { - if (shouldComputeAliasesToMakeVisible) { - earlyModuleBail = true; - continue; - } - return { - accessibility: 0 /* Accessible */ - }; - } - } - const containers = getContainersOfSymbol(symbol, enclosingDeclaration, meaning); - const parentResult = isAnySymbolAccessible(containers, enclosingDeclaration, initialSymbol, initialSymbol === symbol ? getQualifiedLeftMeaning(meaning) : meaning, shouldComputeAliasesToMakeVisible, allowModules); - if (parentResult) { - return parentResult; - } - } - if (earlyModuleBail) { - return { - accessibility: 0 /* Accessible */ - }; - } - if (hadAccessibleChain) { - return { - accessibility: 1 /* NotAccessible */, - errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning), - errorModuleName: hadAccessibleChain !== initialSymbol ? symbolToString(hadAccessibleChain, enclosingDeclaration, 1920 /* Namespace */) : void 0 - }; - } - } - function isSymbolAccessible(symbol, enclosingDeclaration, meaning, shouldComputeAliasesToMakeVisible) { - return isSymbolAccessibleWorker( - symbol, - enclosingDeclaration, - meaning, - shouldComputeAliasesToMakeVisible, - /*allowModules*/ - true - ); - } - function isSymbolAccessibleWorker(symbol, enclosingDeclaration, meaning, shouldComputeAliasesToMakeVisible, allowModules) { - if (symbol && enclosingDeclaration) { - const result = isAnySymbolAccessible([symbol], enclosingDeclaration, symbol, meaning, shouldComputeAliasesToMakeVisible, allowModules); - if (result) { - return result; - } - const symbolExternalModule = forEach(symbol.declarations, getExternalModuleContainer); - if (symbolExternalModule) { - const enclosingExternalModule = getExternalModuleContainer(enclosingDeclaration); - if (symbolExternalModule !== enclosingExternalModule) { - return { - accessibility: 2 /* CannotBeNamed */, - errorSymbolName: symbolToString(symbol, enclosingDeclaration, meaning), - errorModuleName: symbolToString(symbolExternalModule), - errorNode: isInJSFile(enclosingDeclaration) ? enclosingDeclaration : void 0 - }; - } - } - return { - accessibility: 1 /* NotAccessible */, - errorSymbolName: symbolToString(symbol, enclosingDeclaration, meaning) - }; - } - return { accessibility: 0 /* Accessible */ }; - } - function getExternalModuleContainer(declaration) { - const node = findAncestor(declaration, hasExternalModuleSymbol); - return node && getSymbolOfDeclaration(node); - } - function hasExternalModuleSymbol(declaration) { - return isAmbientModule(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); - } - function hasNonGlobalAugmentationExternalModuleSymbol(declaration) { - return isModuleWithStringLiteralName(declaration) || declaration.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(declaration); - } - function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) { - let aliasesToMakeVisible; - if (!every(filter(symbol.declarations, (d) => d.kind !== 80 /* Identifier */), getIsDeclarationVisible)) { - return void 0; - } - return { accessibility: 0 /* Accessible */, aliasesToMakeVisible }; - function getIsDeclarationVisible(declaration) { - var _a, _b; - if (!isDeclarationVisible(declaration)) { - const anyImportSyntax = getAnyImportSyntax(declaration); - if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 1 /* Export */) && // import clause without export - isDeclarationVisible(anyImportSyntax.parent)) { - return addVisibleAlias(declaration, anyImportSyntax); - } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 1 /* Export */) && // unexported variable statement - isDeclarationVisible(declaration.parent.parent.parent)) { - return addVisibleAlias(declaration, declaration.parent.parent); - } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 1 /* Export */) && isDeclarationVisible(declaration.parent)) { - return addVisibleAlias(declaration, declaration); - } else if (isBindingElement(declaration)) { - if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 1 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) { - return addVisibleAlias(declaration, declaration.parent.parent.parent.parent); - } else if (symbol.flags & 2 /* BlockScopedVariable */) { - const variableStatement = findAncestor(declaration, isVariableStatement); - if (hasSyntacticModifier(variableStatement, 1 /* Export */)) { - return true; - } - if (!isDeclarationVisible(variableStatement.parent)) { - return false; - } - return addVisibleAlias(declaration, variableStatement); - } - } - return false; - } - return true; - } - function addVisibleAlias(declaration, aliasingStatement) { - if (shouldComputeAliasToMakeVisible) { - getNodeLinks(declaration).isVisible = true; - aliasesToMakeVisible = appendIfUnique(aliasesToMakeVisible, aliasingStatement); - } - return true; - } - } - function isEntityNameVisible(entityName, enclosingDeclaration) { - let meaning; - if (entityName.parent.kind === 186 /* TypeQuery */ || entityName.parent.kind === 233 /* ExpressionWithTypeArguments */ && !isPartOfTypeNode(entityName.parent) || entityName.parent.kind === 167 /* ComputedPropertyName */) { - meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else if (entityName.kind === 166 /* QualifiedName */ || entityName.kind === 211 /* PropertyAccessExpression */ || entityName.parent.kind === 271 /* ImportEqualsDeclaration */) { - meaning = 1920 /* Namespace */; - } else { - meaning = 788968 /* Type */; - } - const firstIdentifier = getFirstIdentifier(entityName); - const symbol = resolveName( - enclosingDeclaration, - firstIdentifier.escapedText, - meaning, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - ); - if (symbol && symbol.flags & 262144 /* TypeParameter */ && meaning & 788968 /* Type */) { - return { accessibility: 0 /* Accessible */ }; - } - if (!symbol && isThisIdentifier(firstIdentifier) && isSymbolAccessible( - getSymbolOfDeclaration(getThisContainer( - firstIdentifier, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - )), - firstIdentifier, - meaning, - /*shouldComputeAliasesToMakeVisible*/ - false - ).accessibility === 0 /* Accessible */) { - return { accessibility: 0 /* Accessible */ }; - } - return symbol && hasVisibleDeclarations( - symbol, - /*shouldComputeAliasToMakeVisible*/ - true - ) || { - accessibility: 1 /* NotAccessible */, - errorSymbolName: getTextOfNode(firstIdentifier), - errorNode: firstIdentifier - }; - } - function symbolToString(symbol, enclosingDeclaration, meaning, flags = 4 /* AllowAnyNodeKind */, writer) { - let nodeFlags = 70221824 /* IgnoreErrors */; - if (flags & 2 /* UseOnlyExternalAliasing */) { - nodeFlags |= 128 /* UseOnlyExternalAliasing */; - } - if (flags & 1 /* WriteTypeParametersOrArguments */) { - nodeFlags |= 512 /* WriteTypeParametersInQualifiedName */; - } - if (flags & 8 /* UseAliasDefinedOutsideCurrentScope */) { - nodeFlags |= 16384 /* UseAliasDefinedOutsideCurrentScope */; - } - if (flags & 32 /* DoNotIncludeSymbolChain */) { - nodeFlags |= 134217728 /* DoNotIncludeSymbolChain */; - } - if (flags & 16 /* WriteComputedProps */) { - nodeFlags |= 1073741824 /* WriteComputedProps */; - } - const builder = flags & 4 /* AllowAnyNodeKind */ ? nodeBuilder.symbolToNode : nodeBuilder.symbolToEntityName; - return writer ? symbolToStringWorker(writer).getText() : usingSingleLineStringWriter(symbolToStringWorker); - function symbolToStringWorker(writer2) { - const entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags); - const printer = (enclosingDeclaration == null ? void 0 : enclosingDeclaration.kind) === 312 /* SourceFile */ ? createPrinterWithRemoveCommentsNeverAsciiEscape() : createPrinterWithRemoveComments(); - const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); - printer.writeNode( - 4 /* Unspecified */, - entity, - /*sourceFile*/ - sourceFile, - writer2 - ); - return writer2; - } - } - function signatureToString(signature, enclosingDeclaration, flags = 0 /* None */, kind, writer) { - return writer ? signatureToStringWorker(writer).getText() : usingSingleLineStringWriter(signatureToStringWorker); - function signatureToStringWorker(writer2) { - let sigOutput; - if (flags & 262144 /* WriteArrowStyleSignature */) { - sigOutput = kind === 1 /* Construct */ ? 185 /* ConstructorType */ : 184 /* FunctionType */; - } else { - sigOutput = kind === 1 /* Construct */ ? 180 /* ConstructSignature */ : 179 /* CallSignature */; - } - const sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */); - const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); - const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); - printer.writeNode( - 4 /* Unspecified */, - sig, - /*sourceFile*/ - sourceFile, - getTrailingSemicolonDeferringWriter(writer2) - ); - return writer2; - } - } - function typeToString(type, enclosingDeclaration, flags = 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer = createTextWriter("")) { - const noTruncation = compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */; - const typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | (noTruncation ? 1 /* NoTruncation */ : 0)); - if (typeNode === void 0) - return Debug.fail("should always get typenode"); - const printer = type !== unresolvedType ? createPrinterWithRemoveComments() : createPrinterWithDefaults(); - const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); - printer.writeNode( - 4 /* Unspecified */, - typeNode, - /*sourceFile*/ - sourceFile, - writer - ); - const result = writer.getText(); - const maxLength2 = noTruncation ? noTruncationMaximumTruncationLength * 2 : defaultMaximumTruncationLength * 2; - if (maxLength2 && result && result.length >= maxLength2) { - return result.substr(0, maxLength2 - "...".length) + "..."; - } - return result; - } - function getTypeNamesForErrorDisplay(left, right) { - let leftStr = symbolValueDeclarationIsContextSensitive(left.symbol) ? typeToString(left, left.symbol.valueDeclaration) : typeToString(left); - let rightStr = symbolValueDeclarationIsContextSensitive(right.symbol) ? typeToString(right, right.symbol.valueDeclaration) : typeToString(right); - if (leftStr === rightStr) { - leftStr = getTypeNameForErrorDisplay(left); - rightStr = getTypeNameForErrorDisplay(right); - } - return [leftStr, rightStr]; - } - function getTypeNameForErrorDisplay(type) { - return typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 64 /* UseFullyQualifiedType */ - ); - } - function symbolValueDeclarationIsContextSensitive(symbol) { - return symbol && !!symbol.valueDeclaration && isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration); - } - function toNodeBuilderFlags(flags = 0 /* None */) { - return flags & 848330091 /* NodeBuilderFlagsMask */; - } - function isClassInstanceSide(type) { - return !!type.symbol && !!(type.symbol.flags & 32 /* Class */) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || !!(type.flags & 524288 /* Object */) && !!(getObjectFlags(type) & 16777216 /* IsClassInstanceClone */)); - } - function createNodeBuilder() { - return { - typeToTypeNode: (type, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => typeToTypeNodeHelper(type, context)), - indexInfoToIndexSignatureDeclaration: (indexInfo, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => indexInfoToIndexSignatureDeclarationHelper( - indexInfo, - context, - /*typeNode*/ - void 0 - )), - signatureToSignatureDeclaration: (signature, kind, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => signatureToSignatureDeclarationHelper(signature, kind, context)), - symbolToEntityName: (symbol, meaning, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => symbolToName( - symbol, - context, - meaning, - /*expectsIdentifier*/ - false - )), - symbolToExpression: (symbol, meaning, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => symbolToExpression(symbol, context, meaning)), - symbolToTypeParameterDeclarations: (symbol, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => typeParametersToTypeParameterDeclarations(symbol, context)), - symbolToParameterDeclaration: (symbol, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => symbolToParameterDeclaration(symbol, context)), - typeParameterToDeclaration: (parameter, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => typeParameterToDeclaration(parameter, context)), - symbolTableToDeclarationStatements: (symbolTable, enclosingDeclaration, flags, tracker, bundled) => withContext(enclosingDeclaration, flags, tracker, (context) => symbolTableToDeclarationStatements(symbolTable, context, bundled)), - symbolToNode: (symbol, meaning, enclosingDeclaration, flags, tracker) => withContext(enclosingDeclaration, flags, tracker, (context) => symbolToNode(symbol, context, meaning)) - }; - function symbolToNode(symbol, context, meaning) { - if (context.flags & 1073741824 /* WriteComputedProps */) { - if (symbol.valueDeclaration) { - const name = getNameOfDeclaration(symbol.valueDeclaration); - if (name && isComputedPropertyName(name)) - return name; - } - const nameType = getSymbolLinks(symbol).nameType; - if (nameType && nameType.flags & (1024 /* EnumLiteral */ | 8192 /* UniqueESSymbol */)) { - context.enclosingDeclaration = nameType.symbol.valueDeclaration; - return factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, meaning)); - } - } - return symbolToExpression(symbol, context, meaning); - } - function withContext(enclosingDeclaration, flags, tracker, cb) { - Debug.assert(enclosingDeclaration === void 0 || (enclosingDeclaration.flags & 16 /* Synthesized */) === 0); - const moduleResolverHost = (tracker == null ? void 0 : tracker.trackSymbol) ? tracker.moduleResolverHost : flags & 134217728 /* DoNotIncludeSymbolChain */ ? createBasicNodeBuilderModuleSpecifierResolutionHost(host) : void 0; - const context = { - enclosingDeclaration, - flags: flags || 0 /* None */, - tracker: void 0, - encounteredError: false, - reportedDiagnostic: false, - visitedTypes: void 0, - symbolDepth: void 0, - inferTypeParameters: void 0, - approximateLength: 0 - }; - context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost); - const resultingNode = cb(context); - if (context.truncating && context.flags & 1 /* NoTruncation */) { - context.tracker.reportTruncationError(); - } - return context.encounteredError ? void 0 : resultingNode; - } - function checkTruncationLength(context) { - if (context.truncating) - return context.truncating; - return context.truncating = context.approximateLength > (context.flags & 1 /* NoTruncation */ ? noTruncationMaximumTruncationLength : defaultMaximumTruncationLength); - } - function typeToTypeNodeHelper(type, context) { - const savedFlags = context.flags; - const typeNode = typeToTypeNodeWorker(type, context); - context.flags = savedFlags; - return typeNode; - } - function typeToTypeNodeWorker(type, context) { - var _a, _b; - if (cancellationToken && cancellationToken.throwIfCancellationRequested) { - cancellationToken.throwIfCancellationRequested(); - } - const inTypeAlias = context.flags & 8388608 /* InTypeAlias */; - context.flags &= ~8388608 /* InTypeAlias */; - if (!type) { - if (!(context.flags & 262144 /* AllowEmptyUnionOrIntersection */)) { - context.encounteredError = true; - return void 0; - } - context.approximateLength += 3; - return factory.createKeywordTypeNode(133 /* AnyKeyword */); - } - if (!(context.flags & 536870912 /* NoTypeReduction */)) { - type = getReducedType(type); - } - if (type.flags & 1 /* Any */) { - if (type.aliasSymbol) { - return factory.createTypeReferenceNode(symbolToEntityNameNode(type.aliasSymbol), mapToTypeNodes(type.aliasTypeArguments, context)); - } - if (type === unresolvedType) { - return addSyntheticLeadingComment(factory.createKeywordTypeNode(133 /* AnyKeyword */), 3 /* MultiLineCommentTrivia */, "unresolved"); - } - context.approximateLength += 3; - return factory.createKeywordTypeNode(type === intrinsicMarkerType ? 141 /* IntrinsicKeyword */ : 133 /* AnyKeyword */); - } - if (type.flags & 2 /* Unknown */) { - return factory.createKeywordTypeNode(159 /* UnknownKeyword */); - } - if (type.flags & 4 /* String */) { - context.approximateLength += 6; - return factory.createKeywordTypeNode(154 /* StringKeyword */); - } - if (type.flags & 8 /* Number */) { - context.approximateLength += 6; - return factory.createKeywordTypeNode(150 /* NumberKeyword */); - } - if (type.flags & 64 /* BigInt */) { - context.approximateLength += 6; - return factory.createKeywordTypeNode(163 /* BigIntKeyword */); - } - if (type.flags & 16 /* Boolean */ && !type.aliasSymbol) { - context.approximateLength += 7; - return factory.createKeywordTypeNode(136 /* BooleanKeyword */); - } - if (type.flags & 1056 /* EnumLike */) { - if (type.symbol.flags & 8 /* EnumMember */) { - const parentSymbol = getParentOfSymbol(type.symbol); - const parentName = symbolToTypeNode(parentSymbol, context, 788968 /* Type */); - if (getDeclaredTypeOfSymbol(parentSymbol) === type) { - return parentName; - } - const memberName = symbolName(type.symbol); - if (isIdentifierText(memberName, 0 /* ES3 */)) { - return appendReferenceToType( - parentName, - factory.createTypeReferenceNode( - memberName, - /*typeArguments*/ - void 0 - ) - ); - } - if (isImportTypeNode(parentName)) { - parentName.isTypeOf = true; - return factory.createIndexedAccessTypeNode(parentName, factory.createLiteralTypeNode(factory.createStringLiteral(memberName))); - } else if (isTypeReferenceNode(parentName)) { - return factory.createIndexedAccessTypeNode(factory.createTypeQueryNode(parentName.typeName), factory.createLiteralTypeNode(factory.createStringLiteral(memberName))); - } else { - return Debug.fail("Unhandled type node kind returned from `symbolToTypeNode`."); - } - } - return symbolToTypeNode(type.symbol, context, 788968 /* Type */); - } - if (type.flags & 128 /* StringLiteral */) { - context.approximateLength += type.value.length + 2; - return factory.createLiteralTypeNode(setEmitFlags(factory.createStringLiteral(type.value, !!(context.flags & 268435456 /* UseSingleQuotesForStringLiteralType */)), 16777216 /* NoAsciiEscaping */)); - } - if (type.flags & 256 /* NumberLiteral */) { - const value = type.value; - context.approximateLength += ("" + value).length; - return factory.createLiteralTypeNode(value < 0 ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-value)) : factory.createNumericLiteral(value)); - } - if (type.flags & 2048 /* BigIntLiteral */) { - context.approximateLength += pseudoBigIntToString(type.value).length + 1; - return factory.createLiteralTypeNode(factory.createBigIntLiteral(type.value)); - } - if (type.flags & 512 /* BooleanLiteral */) { - context.approximateLength += type.intrinsicName.length; - return factory.createLiteralTypeNode(type.intrinsicName === "true" ? factory.createTrue() : factory.createFalse()); - } - if (type.flags & 8192 /* UniqueESSymbol */) { - if (!(context.flags & 1048576 /* AllowUniqueESSymbolType */)) { - if (isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) { - context.approximateLength += 6; - return symbolToTypeNode(type.symbol, context, 111551 /* Value */); - } - if (context.tracker.reportInaccessibleUniqueSymbolError) { - context.tracker.reportInaccessibleUniqueSymbolError(); - } - } - context.approximateLength += 13; - return factory.createTypeOperatorNode(158 /* UniqueKeyword */, factory.createKeywordTypeNode(155 /* SymbolKeyword */)); - } - if (type.flags & 16384 /* Void */) { - context.approximateLength += 4; - return factory.createKeywordTypeNode(116 /* VoidKeyword */); - } - if (type.flags & 32768 /* Undefined */) { - context.approximateLength += 9; - return factory.createKeywordTypeNode(157 /* UndefinedKeyword */); - } - if (type.flags & 65536 /* Null */) { - context.approximateLength += 4; - return factory.createLiteralTypeNode(factory.createNull()); - } - if (type.flags & 131072 /* Never */) { - context.approximateLength += 5; - return factory.createKeywordTypeNode(146 /* NeverKeyword */); - } - if (type.flags & 4096 /* ESSymbol */) { - context.approximateLength += 6; - return factory.createKeywordTypeNode(155 /* SymbolKeyword */); - } - if (type.flags & 67108864 /* NonPrimitive */) { - context.approximateLength += 6; - return factory.createKeywordTypeNode(151 /* ObjectKeyword */); - } - if (isThisTypeParameter(type)) { - if (context.flags & 4194304 /* InObjectTypeLiteral */) { - if (!context.encounteredError && !(context.flags & 32768 /* AllowThisInObjectLiteral */)) { - context.encounteredError = true; - } - (_b = (_a = context.tracker).reportInaccessibleThisError) == null ? void 0 : _b.call(_a); - } - context.approximateLength += 4; - return factory.createThisTypeNode(); - } - if (!inTypeAlias && type.aliasSymbol && (context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */ || isTypeSymbolAccessible(type.aliasSymbol, context.enclosingDeclaration))) { - const typeArgumentNodes = mapToTypeNodes(type.aliasTypeArguments, context); - if (isReservedMemberName(type.aliasSymbol.escapedName) && !(type.aliasSymbol.flags & 32 /* Class */)) - return factory.createTypeReferenceNode(factory.createIdentifier(""), typeArgumentNodes); - if (length(typeArgumentNodes) === 1 && type.aliasSymbol === globalArrayType.symbol) { - return factory.createArrayTypeNode(typeArgumentNodes[0]); - } - return symbolToTypeNode(type.aliasSymbol, context, 788968 /* Type */, typeArgumentNodes); - } - const objectFlags = getObjectFlags(type); - if (objectFlags & 4 /* Reference */) { - Debug.assert(!!(type.flags & 524288 /* Object */)); - return type.node ? visitAndTransformType(type, typeReferenceToTypeNode) : typeReferenceToTypeNode(type); - } - if (type.flags & 262144 /* TypeParameter */ || objectFlags & 3 /* ClassOrInterface */) { - if (type.flags & 262144 /* TypeParameter */ && contains(context.inferTypeParameters, type)) { - context.approximateLength += symbolName(type.symbol).length + 6; - let constraintNode; - const constraint = getConstraintOfTypeParameter(type); - if (constraint) { - const inferredConstraint = getInferredTypeParameterConstraint( - type, - /*omitTypeReferences*/ - true - ); - if (!(inferredConstraint && isTypeIdenticalTo(constraint, inferredConstraint))) { - context.approximateLength += 9; - constraintNode = constraint && typeToTypeNodeHelper(constraint, context); - } - } - return factory.createInferTypeNode(typeParameterToDeclarationWithConstraint(type, context, constraintNode)); - } - if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type.flags & 262144 /* TypeParameter */ && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration)) { - const name2 = typeParameterToName(type, context); - context.approximateLength += idText(name2).length; - return factory.createTypeReferenceNode( - factory.createIdentifier(idText(name2)), - /*typeArguments*/ - void 0 - ); - } - if (type.symbol) { - return symbolToTypeNode(type.symbol, context, 788968 /* Type */); - } - const name = (type === markerSuperTypeForCheck || type === markerSubTypeForCheck) && varianceTypeParameter && varianceTypeParameter.symbol ? (type === markerSubTypeForCheck ? "sub-" : "super-") + symbolName(varianceTypeParameter.symbol) : "?"; - return factory.createTypeReferenceNode( - factory.createIdentifier(name), - /*typeArguments*/ - void 0 - ); - } - if (type.flags & 1048576 /* Union */ && type.origin) { - type = type.origin; - } - if (type.flags & (1048576 /* Union */ | 2097152 /* Intersection */)) { - const types = type.flags & 1048576 /* Union */ ? formatUnionTypes(type.types) : type.types; - if (length(types) === 1) { - return typeToTypeNodeHelper(types[0], context); - } - const typeNodes = mapToTypeNodes( - types, - context, - /*isBareList*/ - true - ); - if (typeNodes && typeNodes.length > 0) { - return type.flags & 1048576 /* Union */ ? factory.createUnionTypeNode(typeNodes) : factory.createIntersectionTypeNode(typeNodes); - } else { - if (!context.encounteredError && !(context.flags & 262144 /* AllowEmptyUnionOrIntersection */)) { - context.encounteredError = true; - } - return void 0; - } - } - if (objectFlags & (16 /* Anonymous */ | 32 /* Mapped */)) { - Debug.assert(!!(type.flags & 524288 /* Object */)); - return createAnonymousTypeNode(type); - } - if (type.flags & 4194304 /* Index */) { - const indexedType = type.type; - context.approximateLength += 6; - const indexTypeNode = typeToTypeNodeHelper(indexedType, context); - return factory.createTypeOperatorNode(143 /* KeyOfKeyword */, indexTypeNode); - } - if (type.flags & 134217728 /* TemplateLiteral */) { - const texts = type.texts; - const types = type.types; - const templateHead = factory.createTemplateHead(texts[0]); - const templateSpans = factory.createNodeArray( - map(types, (t, i) => factory.createTemplateLiteralTypeSpan( - typeToTypeNodeHelper(t, context), - (i < types.length - 1 ? factory.createTemplateMiddle : factory.createTemplateTail)(texts[i + 1]) - )) - ); - context.approximateLength += 2; - return factory.createTemplateLiteralType(templateHead, templateSpans); - } - if (type.flags & 268435456 /* StringMapping */) { - const typeNode = typeToTypeNodeHelper(type.type, context); - return symbolToTypeNode(type.symbol, context, 788968 /* Type */, [typeNode]); - } - if (type.flags & 8388608 /* IndexedAccess */) { - const objectTypeNode = typeToTypeNodeHelper(type.objectType, context); - const indexTypeNode = typeToTypeNodeHelper(type.indexType, context); - context.approximateLength += 2; - return factory.createIndexedAccessTypeNode(objectTypeNode, indexTypeNode); - } - if (type.flags & 16777216 /* Conditional */) { - return visitAndTransformType(type, (type2) => conditionalTypeToTypeNode(type2)); - } - if (type.flags & 33554432 /* Substitution */) { - return typeToTypeNodeHelper(type.baseType, context); - } - return Debug.fail("Should be unreachable."); - function conditionalTypeToTypeNode(type2) { - const checkTypeNode = typeToTypeNodeHelper(type2.checkType, context); - context.approximateLength += 15; - if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && type2.root.isDistributive && !(type2.checkType.flags & 262144 /* TypeParameter */)) { - const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); - const name = typeParameterToName(newParam, context); - const newTypeVariable = factory.createTypeReferenceNode(name); - context.approximateLength += 37; - const newMapper = prependTypeMapping(type2.root.checkType, newParam, type2.mapper); - const saveInferTypeParameters2 = context.inferTypeParameters; - context.inferTypeParameters = type2.root.inferTypeParameters; - const extendsTypeNode2 = typeToTypeNodeHelper(instantiateType(type2.root.extendsType, newMapper), context); - context.inferTypeParameters = saveInferTypeParameters2; - const trueTypeNode2 = typeToTypeNodeOrCircularityElision(instantiateType(getTypeFromTypeNode(type2.root.node.trueType), newMapper)); - const falseTypeNode2 = typeToTypeNodeOrCircularityElision(instantiateType(getTypeFromTypeNode(type2.root.node.falseType), newMapper)); - return factory.createConditionalTypeNode( - checkTypeNode, - factory.createInferTypeNode(factory.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - factory.cloneNode(newTypeVariable.typeName) - )), - factory.createConditionalTypeNode( - factory.createTypeReferenceNode(factory.cloneNode(name)), - typeToTypeNodeHelper(type2.checkType, context), - factory.createConditionalTypeNode(newTypeVariable, extendsTypeNode2, trueTypeNode2, falseTypeNode2), - factory.createKeywordTypeNode(146 /* NeverKeyword */) - ), - factory.createKeywordTypeNode(146 /* NeverKeyword */) - ); - } - const saveInferTypeParameters = context.inferTypeParameters; - context.inferTypeParameters = type2.root.inferTypeParameters; - const extendsTypeNode = typeToTypeNodeHelper(type2.extendsType, context); - context.inferTypeParameters = saveInferTypeParameters; - const trueTypeNode = typeToTypeNodeOrCircularityElision(getTrueTypeFromConditionalType(type2)); - const falseTypeNode = typeToTypeNodeOrCircularityElision(getFalseTypeFromConditionalType(type2)); - return factory.createConditionalTypeNode(checkTypeNode, extendsTypeNode, trueTypeNode, falseTypeNode); - } - function typeToTypeNodeOrCircularityElision(type2) { - var _a2, _b2, _c; - if (type2.flags & 1048576 /* Union */) { - if ((_a2 = context.visitedTypes) == null ? void 0 : _a2.has(getTypeId(type2))) { - if (!(context.flags & 131072 /* AllowAnonymousIdentifier */)) { - context.encounteredError = true; - (_c = (_b2 = context.tracker) == null ? void 0 : _b2.reportCyclicStructureError) == null ? void 0 : _c.call(_b2); - } - return createElidedInformationPlaceholder(context); - } - return visitAndTransformType(type2, (type3) => typeToTypeNodeHelper(type3, context)); - } - return typeToTypeNodeHelper(type2, context); - } - function isMappedTypeHomomorphic(type2) { - return !!getHomomorphicTypeVariable(type2); - } - function isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) { - return !!type2.target && isMappedTypeHomomorphic(type2.target) && !isMappedTypeHomomorphic(type2); - } - function createMappedTypeNodeFromType(type2) { - var _a2; - Debug.assert(!!(type2.flags & 524288 /* Object */)); - const readonlyToken = type2.declaration.readonlyToken ? factory.createToken(type2.declaration.readonlyToken.kind) : void 0; - const questionToken = type2.declaration.questionToken ? factory.createToken(type2.declaration.questionToken.kind) : void 0; - let appropriateConstraintTypeNode; - let newTypeVariable; - const needsModifierPreservingWrapper = !isMappedTypeWithKeyofConstraintDeclaration(type2) && !(getModifiersTypeFromMappedType(type2).flags & 2 /* Unknown */) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && !(getConstraintTypeFromMappedType(type2).flags & 262144 /* TypeParameter */ && ((_a2 = getConstraintOfTypeParameter(getConstraintTypeFromMappedType(type2))) == null ? void 0 : _a2.flags) & 4194304 /* Index */); - if (isMappedTypeWithKeyofConstraintDeclaration(type2)) { - if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) { - const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); - const name = typeParameterToName(newParam, context); - newTypeVariable = factory.createTypeReferenceNode(name); - } - appropriateConstraintTypeNode = factory.createTypeOperatorNode(143 /* KeyOfKeyword */, newTypeVariable || typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)); - } else if (needsModifierPreservingWrapper) { - const newParam = createTypeParameter(createSymbol(262144 /* TypeParameter */, "T")); - const name = typeParameterToName(newParam, context); - newTypeVariable = factory.createTypeReferenceNode(name); - appropriateConstraintTypeNode = newTypeVariable; - } else { - appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context); - } - const typeParameterNode = typeParameterToDeclarationWithConstraint(getTypeParameterFromMappedType(type2), context, appropriateConstraintTypeNode); - const nameTypeNode = type2.declaration.nameType ? typeToTypeNodeHelper(getNameTypeFromMappedType(type2), context) : void 0; - const templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type2), !!(getMappedTypeModifiers(type2) & 4 /* IncludeOptional */)), context); - const mappedTypeNode = factory.createMappedTypeNode( - readonlyToken, - typeParameterNode, - nameTypeNode, - questionToken, - templateTypeNode, - /*members*/ - void 0 - ); - context.approximateLength += 10; - const result = setEmitFlags(mappedTypeNode, 1 /* SingleLine */); - if (isHomomorphicMappedTypeWithNonHomomorphicInstantiation(type2) && context.flags & 4 /* GenerateNamesForShadowedTypeParams */) { - const originalConstraint = instantiateType(getConstraintOfTypeParameter(getTypeFromTypeNode(type2.declaration.typeParameter.constraint.type)) || unknownType, type2.mapper); - return factory.createConditionalTypeNode( - typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context), - factory.createInferTypeNode(factory.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - factory.cloneNode(newTypeVariable.typeName), - originalConstraint.flags & 2 /* Unknown */ ? void 0 : typeToTypeNodeHelper(originalConstraint, context) - )), - result, - factory.createKeywordTypeNode(146 /* NeverKeyword */) - ); - } else if (needsModifierPreservingWrapper) { - return factory.createConditionalTypeNode( - typeToTypeNodeHelper(getConstraintTypeFromMappedType(type2), context), - factory.createInferTypeNode(factory.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - factory.cloneNode(newTypeVariable.typeName), - factory.createTypeOperatorNode(143 /* KeyOfKeyword */, typeToTypeNodeHelper(getModifiersTypeFromMappedType(type2), context)) - )), - result, - factory.createKeywordTypeNode(146 /* NeverKeyword */) - ); - } - return result; - } - function createAnonymousTypeNode(type2) { - var _a2, _b2; - const typeId = type2.id; - const symbol = type2.symbol; - if (symbol) { - const isInstanceType = isClassInstanceSide(type2) ? 788968 /* Type */ : 111551 /* Value */; - if (isJSConstructor(symbol.valueDeclaration)) { - return symbolToTypeNode(symbol, context, isInstanceType); - } else if (symbol.flags & 32 /* Class */ && !getBaseTypeVariableOfClass(symbol) && !(symbol.valueDeclaration && isClassLike(symbol.valueDeclaration) && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && (!isClassDeclaration(symbol.valueDeclaration) || isSymbolAccessible( - symbol, - context.enclosingDeclaration, - isInstanceType, - /*shouldComputeAliasesToMakeVisible*/ - false - ).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) { - return symbolToTypeNode(symbol, context, isInstanceType); - } else if ((_a2 = context.visitedTypes) == null ? void 0 : _a2.has(typeId)) { - const typeAlias = getTypeAliasForTypeLiteral(type2); - if (typeAlias) { - return symbolToTypeNode(typeAlias, context, 788968 /* Type */); - } else { - return createElidedInformationPlaceholder(context); - } - } else { - return visitAndTransformType(type2, createTypeNodeFromObjectType); - } - } else { - const isInstantiationExpressionType = !!(getObjectFlags(type2) & 8388608 /* InstantiationExpressionType */); - if (isInstantiationExpressionType) { - const instantiationExpressionType = type2; - if (isTypeQueryNode(instantiationExpressionType.node)) { - const typeNode = serializeExistingTypeNode(context, instantiationExpressionType.node); - if (typeNode) { - return typeNode; - } - } - if ((_b2 = context.visitedTypes) == null ? void 0 : _b2.has(typeId)) { - return createElidedInformationPlaceholder(context); - } - return visitAndTransformType(type2, createTypeNodeFromObjectType); - } - return createTypeNodeFromObjectType(type2); - } - function shouldWriteTypeOfFunctionSymbol() { - var _a3; - const isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */) && // typeof static method - some(symbol.declarations, (declaration) => isStatic(declaration)); - const isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && (symbol.parent || // is exported function symbol - forEach(symbol.declarations, (declaration) => declaration.parent.kind === 312 /* SourceFile */ || declaration.parent.kind === 268 /* ModuleBlock */)); - if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { - return (!!(context.flags & 4096 /* UseTypeOfFunction */) || ((_a3 = context.visitedTypes) == null ? void 0 : _a3.has(typeId))) && // it is type of the symbol uses itself recursively - (!(context.flags & 8 /* UseStructuralFallback */) || isValueSymbolAccessible(symbol, context.enclosingDeclaration)); - } - } - } - function visitAndTransformType(type2, transform2) { - var _a2, _b2; - const typeId = type2.id; - const isConstructorObject = getObjectFlags(type2) & 16 /* Anonymous */ && type2.symbol && type2.symbol.flags & 32 /* Class */; - const id = getObjectFlags(type2) & 4 /* Reference */ && type2.node ? "N" + getNodeId(type2.node) : type2.flags & 16777216 /* Conditional */ ? "N" + getNodeId(type2.root.node) : type2.symbol ? (isConstructorObject ? "+" : "") + getSymbolId(type2.symbol) : void 0; - if (!context.visitedTypes) { - context.visitedTypes = /* @__PURE__ */ new Set(); - } - if (id && !context.symbolDepth) { - context.symbolDepth = /* @__PURE__ */ new Map(); - } - const links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration); - const key = `${getTypeId(type2)}|${context.flags}`; - if (links) { - links.serializedTypes || (links.serializedTypes = /* @__PURE__ */ new Map()); - } - const cachedResult = (_a2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a2.get(key); - if (cachedResult) { - if (cachedResult.truncating) { - context.truncating = true; - } - context.approximateLength += cachedResult.addedLength; - return deepCloneOrReuseNode(cachedResult.node); - } - let depth; - if (id) { - depth = context.symbolDepth.get(id) || 0; - if (depth > 10) { - return createElidedInformationPlaceholder(context); - } - context.symbolDepth.set(id, depth + 1); - } - context.visitedTypes.add(typeId); - const startLength = context.approximateLength; - const result = transform2(type2); - const addedLength = context.approximateLength - startLength; - if (!context.reportedDiagnostic && !context.encounteredError) { - (_b2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _b2.set(key, { node: result, truncating: context.truncating, addedLength }); - } - context.visitedTypes.delete(typeId); - if (id) { - context.symbolDepth.set(id, depth); - } - return result; - function deepCloneOrReuseNode(node) { - if (!nodeIsSynthesized(node) && getParseTreeNode(node) === node) { - return node; - } - return setTextRange(factory.cloneNode(visitEachChild(node, deepCloneOrReuseNode, nullTransformationContext, deepCloneOrReuseNodes)), node); - } - function deepCloneOrReuseNodes(nodes, visitor, test, start, count) { - if (nodes && nodes.length === 0) { - return setTextRange(factory.createNodeArray( - /*elements*/ - void 0, - nodes.hasTrailingComma - ), nodes); - } - return visitNodes2(nodes, visitor, test, start, count); - } - } - function createTypeNodeFromObjectType(type2) { - if (isGenericMappedType(type2) || type2.containsError) { - return createMappedTypeNodeFromType(type2); - } - const resolved = resolveStructuredTypeMembers(type2); - if (!resolved.properties.length && !resolved.indexInfos.length) { - if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { - context.approximateLength += 2; - return setEmitFlags(factory.createTypeLiteralNode( - /*members*/ - void 0 - ), 1 /* SingleLine */); - } - if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { - const signature = resolved.callSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 184 /* FunctionType */, context); - return signatureNode; - } - if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { - const signature = resolved.constructSignatures[0]; - const signatureNode = signatureToSignatureDeclarationHelper(signature, 185 /* ConstructorType */, context); - return signatureNode; - } - } - const abstractSignatures = filter(resolved.constructSignatures, (signature) => !!(signature.flags & 4 /* Abstract */)); - if (some(abstractSignatures)) { - const types = map(abstractSignatures, getOrCreateTypeFromSignature); - const typeElementCount = resolved.callSignatures.length + (resolved.constructSignatures.length - abstractSignatures.length) + resolved.indexInfos.length + // exclude `prototype` when writing a class expression as a type literal, as per - // the logic in `createTypeNodesFromResolvedType`. - (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ ? countWhere(resolved.properties, (p) => !(p.flags & 4194304 /* Prototype */)) : length(resolved.properties)); - if (typeElementCount) { - types.push(getResolvedTypeWithoutAbstractConstructSignatures(resolved)); - } - return typeToTypeNodeHelper(getIntersectionType(types), context); - } - const savedFlags = context.flags; - context.flags |= 4194304 /* InObjectTypeLiteral */; - const members = createTypeNodesFromResolvedType(resolved); - context.flags = savedFlags; - const typeLiteralNode = factory.createTypeLiteralNode(members); - context.approximateLength += 2; - setEmitFlags(typeLiteralNode, context.flags & 1024 /* MultilineObjectLiterals */ ? 0 : 1 /* SingleLine */); - return typeLiteralNode; - } - function typeReferenceToTypeNode(type2) { - let typeArguments = getTypeArguments(type2); - if (type2.target === globalArrayType || type2.target === globalReadonlyArrayType) { - if (context.flags & 2 /* WriteArrayAsGenericType */) { - const typeArgumentNode = typeToTypeNodeHelper(typeArguments[0], context); - return factory.createTypeReferenceNode(type2.target === globalArrayType ? "Array" : "ReadonlyArray", [typeArgumentNode]); - } - const elementType = typeToTypeNodeHelper(typeArguments[0], context); - const arrayType = factory.createArrayTypeNode(elementType); - return type2.target === globalArrayType ? arrayType : factory.createTypeOperatorNode(148 /* ReadonlyKeyword */, arrayType); - } else if (type2.target.objectFlags & 8 /* Tuple */) { - typeArguments = sameMap(typeArguments, (t, i) => removeMissingType(t, !!(type2.target.elementFlags[i] & 2 /* Optional */))); - if (typeArguments.length > 0) { - const arity = getTypeReferenceArity(type2); - const tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, arity), context); - if (tupleConstituentNodes) { - const { labeledElementDeclarations } = type2.target; - for (let i = 0; i < tupleConstituentNodes.length; i++) { - const flags = type2.target.elementFlags[i]; - const labeledElementDeclaration = labeledElementDeclarations == null ? void 0 : labeledElementDeclarations[i]; - if (labeledElementDeclaration) { - tupleConstituentNodes[i] = factory.createNamedTupleMember( - flags & 12 /* Variable */ ? factory.createToken(26 /* DotDotDotToken */) : void 0, - factory.createIdentifier(unescapeLeadingUnderscores(getTupleElementLabel(labeledElementDeclaration))), - flags & 2 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i] - ); - } else { - tupleConstituentNodes[i] = flags & 12 /* Variable */ ? factory.createRestTypeNode(flags & 4 /* Rest */ ? factory.createArrayTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]) : flags & 2 /* Optional */ ? factory.createOptionalTypeNode(tupleConstituentNodes[i]) : tupleConstituentNodes[i]; - } - } - const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode(tupleConstituentNodes), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(148 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; - } - } - if (context.encounteredError || context.flags & 524288 /* AllowEmptyTuple */) { - const tupleTypeNode = setEmitFlags(factory.createTupleTypeNode([]), 1 /* SingleLine */); - return type2.target.readonly ? factory.createTypeOperatorNode(148 /* ReadonlyKeyword */, tupleTypeNode) : tupleTypeNode; - } - context.encounteredError = true; - return void 0; - } else if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */ && type2.symbol.valueDeclaration && isClassLike(type2.symbol.valueDeclaration) && !isValueSymbolAccessible(type2.symbol, context.enclosingDeclaration)) { - return createAnonymousTypeNode(type2); - } else { - const outerTypeParameters = type2.target.outerTypeParameters; - let i = 0; - let resultType; - if (outerTypeParameters) { - const length2 = outerTypeParameters.length; - while (i < length2) { - const start = i; - const parent2 = getParentSymbolOfTypeParameter(outerTypeParameters[i]); - do { - i++; - } while (i < length2 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent2); - if (!rangeEquals(outerTypeParameters, typeArguments, start, i)) { - const typeArgumentSlice = mapToTypeNodes(typeArguments.slice(start, i), context); - const flags2 = context.flags; - context.flags |= 16 /* ForbidIndexedAccessSymbolReferences */; - const ref = symbolToTypeNode(parent2, context, 788968 /* Type */, typeArgumentSlice); - context.flags = flags2; - resultType = !resultType ? ref : appendReferenceToType(resultType, ref); - } - } - } - let typeArgumentNodes; - if (typeArguments.length > 0) { - const typeParameterCount = (type2.target.typeParameters || emptyArray).length; - typeArgumentNodes = mapToTypeNodes(typeArguments.slice(i, typeParameterCount), context); - } - const flags = context.flags; - context.flags |= 16 /* ForbidIndexedAccessSymbolReferences */; - const finalRef = symbolToTypeNode(type2.symbol, context, 788968 /* Type */, typeArgumentNodes); - context.flags = flags; - return !resultType ? finalRef : appendReferenceToType(resultType, finalRef); - } - } - function appendReferenceToType(root, ref) { - if (isImportTypeNode(root)) { - let typeArguments = root.typeArguments; - let qualifier = root.qualifier; - if (qualifier) { - if (isIdentifier(qualifier)) { - if (typeArguments !== getIdentifierTypeArguments(qualifier)) { - qualifier = setIdentifierTypeArguments(factory.cloneNode(qualifier), typeArguments); - } - } else { - if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) { - qualifier = factory.updateQualifiedName( - qualifier, - qualifier.left, - setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments) - ); - } - } - } - typeArguments = ref.typeArguments; - const ids = getAccessStack(ref); - for (const id of ids) { - qualifier = qualifier ? factory.createQualifiedName(qualifier, id) : id; - } - return factory.updateImportTypeNode( - root, - root.argument, - root.assertions, - qualifier, - typeArguments, - root.isTypeOf - ); - } else { - let typeArguments = root.typeArguments; - let typeName = root.typeName; - if (isIdentifier(typeName)) { - if (typeArguments !== getIdentifierTypeArguments(typeName)) { - typeName = setIdentifierTypeArguments(factory.cloneNode(typeName), typeArguments); - } - } else { - if (typeArguments !== getIdentifierTypeArguments(typeName.right)) { - typeName = factory.updateQualifiedName( - typeName, - typeName.left, - setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments) - ); - } - } - typeArguments = ref.typeArguments; - const ids = getAccessStack(ref); - for (const id of ids) { - typeName = factory.createQualifiedName(typeName, id); - } - return factory.updateTypeReferenceNode( - root, - typeName, - typeArguments - ); - } - } - function getAccessStack(ref) { - let state = ref.typeName; - const ids = []; - while (!isIdentifier(state)) { - ids.unshift(state.right); - state = state.left; - } - ids.unshift(state); - return ids; - } - function createTypeNodesFromResolvedType(resolvedType) { - if (checkTruncationLength(context)) { - return [factory.createPropertySignature( - /*modifiers*/ - void 0, - "...", - /*questionToken*/ - void 0, - /*type*/ - void 0 - )]; - } - const typeElements = []; - for (const signature of resolvedType.callSignatures) { - typeElements.push(signatureToSignatureDeclarationHelper(signature, 179 /* CallSignature */, context)); - } - for (const signature of resolvedType.constructSignatures) { - if (signature.flags & 4 /* Abstract */) - continue; - typeElements.push(signatureToSignatureDeclarationHelper(signature, 180 /* ConstructSignature */, context)); - } - for (const info of resolvedType.indexInfos) { - typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 /* ReverseMapped */ ? createElidedInformationPlaceholder(context) : void 0)); - } - const properties = resolvedType.properties; - if (!properties) { - return typeElements; - } - let i = 0; - for (const propertySymbol of properties) { - i++; - if (context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */) { - if (propertySymbol.flags & 4194304 /* Prototype */) { - continue; - } - if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (8 /* Private */ | 16 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) { - context.tracker.reportPrivateInBaseOfClassExpression(unescapeLeadingUnderscores(propertySymbol.escapedName)); - } - } - if (checkTruncationLength(context) && i + 2 < properties.length - 1) { - typeElements.push(factory.createPropertySignature( - /*modifiers*/ - void 0, - `... ${properties.length - i} more ...`, - /*questionToken*/ - void 0, - /*type*/ - void 0 - )); - addPropertyToElementList(properties[properties.length - 1], context, typeElements); - break; - } - addPropertyToElementList(propertySymbol, context, typeElements); - } - return typeElements.length ? typeElements : void 0; - } - } - function createElidedInformationPlaceholder(context) { - context.approximateLength += 3; - if (!(context.flags & 1 /* NoTruncation */)) { - return factory.createTypeReferenceNode( - factory.createIdentifier("..."), - /*typeArguments*/ - void 0 - ); - } - return factory.createKeywordTypeNode(133 /* AnyKeyword */); - } - function shouldUsePlaceholderForProperty(propertySymbol, context) { - var _a; - return !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */) && (contains(context.reverseMappedStack, propertySymbol) || ((_a = context.reverseMappedStack) == null ? void 0 : _a[0]) && !(getObjectFlags(last(context.reverseMappedStack).links.propertyType) & 16 /* Anonymous */)); - } - function addPropertyToElementList(propertySymbol, context, typeElements) { - var _a; - const propertyIsReverseMapped = !!(getCheckFlags(propertySymbol) & 8192 /* ReverseMapped */); - const propertyType = shouldUsePlaceholderForProperty(propertySymbol, context) ? anyType : getNonMissingTypeOfSymbol(propertySymbol); - const saveEnclosingDeclaration = context.enclosingDeclaration; - context.enclosingDeclaration = void 0; - if (context.tracker.canTrackSymbol && isLateBoundName(propertySymbol.escapedName)) { - if (propertySymbol.declarations) { - const decl = first(propertySymbol.declarations); - if (hasLateBindableName(decl)) { - if (isBinaryExpression(decl)) { - const name = getNameOfDeclaration(decl); - if (name && isElementAccessExpression(name) && isPropertyAccessEntityNameExpression(name.argumentExpression)) { - trackComputedName(name.argumentExpression, saveEnclosingDeclaration, context); - } - } else { - trackComputedName(decl.name.expression, saveEnclosingDeclaration, context); - } - } - } else { - context.tracker.reportNonSerializableProperty(symbolToString(propertySymbol)); - } - } - context.enclosingDeclaration = propertySymbol.valueDeclaration || ((_a = propertySymbol.declarations) == null ? void 0 : _a[0]) || saveEnclosingDeclaration; - const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); - context.enclosingDeclaration = saveEnclosingDeclaration; - context.approximateLength += symbolName(propertySymbol).length + 1; - const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0; - if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { - const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); - for (const signature of signatures) { - const methodDeclaration = signatureToSignatureDeclarationHelper(signature, 173 /* MethodSignature */, context, { name: propertyName, questionToken: optionalToken }); - typeElements.push(preserveCommentsOn(methodDeclaration)); - } - if (signatures.length || !optionalToken) { - return; - } - } - let propertyTypeNode; - if (shouldUsePlaceholderForProperty(propertySymbol, context)) { - propertyTypeNode = createElidedInformationPlaceholder(context); - } else { - if (propertyIsReverseMapped) { - context.reverseMappedStack || (context.reverseMappedStack = []); - context.reverseMappedStack.push(propertySymbol); - } - propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : factory.createKeywordTypeNode(133 /* AnyKeyword */); - if (propertyIsReverseMapped) { - context.reverseMappedStack.pop(); - } - } - const modifiers = isReadonlySymbol(propertySymbol) ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0; - if (modifiers) { - context.approximateLength += 9; - } - const propertySignature = factory.createPropertySignature( - modifiers, - propertyName, - optionalToken, - propertyTypeNode - ); - typeElements.push(preserveCommentsOn(propertySignature)); - function preserveCommentsOn(node) { - var _a2; - if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) { - const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */); - const commentText = getTextOfJSDocComment(d.comment); - if (commentText) { - setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); - } - } else if (propertySymbol.valueDeclaration) { - setCommentRange(node, propertySymbol.valueDeclaration); - } - return node; - } - } - function mapToTypeNodes(types, context, isBareList) { - if (some(types)) { - if (checkTruncationLength(context)) { - if (!isBareList) { - return [factory.createTypeReferenceNode( - "...", - /*typeArguments*/ - void 0 - )]; - } else if (types.length > 2) { - return [ - typeToTypeNodeHelper(types[0], context), - factory.createTypeReferenceNode( - `... ${types.length - 2} more ...`, - /*typeArguments*/ - void 0 - ), - typeToTypeNodeHelper(types[types.length - 1], context) - ]; - } - } - const mayHaveNameCollisions = !(context.flags & 64 /* UseFullyQualifiedType */); - const seenNames = mayHaveNameCollisions ? createMultiMap() : void 0; - const result = []; - let i = 0; - for (const type of types) { - i++; - if (checkTruncationLength(context) && i + 2 < types.length - 1) { - result.push(factory.createTypeReferenceNode( - `... ${types.length - i} more ...`, - /*typeArguments*/ - void 0 - )); - const typeNode2 = typeToTypeNodeHelper(types[types.length - 1], context); - if (typeNode2) { - result.push(typeNode2); - } - break; - } - context.approximateLength += 2; - const typeNode = typeToTypeNodeHelper(type, context); - if (typeNode) { - result.push(typeNode); - if (seenNames && isIdentifierTypeReference(typeNode)) { - seenNames.add(typeNode.typeName.escapedText, [type, result.length - 1]); - } - } - } - if (seenNames) { - const saveContextFlags = context.flags; - context.flags |= 64 /* UseFullyQualifiedType */; - seenNames.forEach((types2) => { - if (!arrayIsHomogeneous(types2, ([a], [b]) => typesAreSameReference(a, b))) { - for (const [type, resultIndex] of types2) { - result[resultIndex] = typeToTypeNodeHelper(type, context); - } - } - }); - context.flags = saveContextFlags; - } - return result; - } - } - function typesAreSameReference(a, b) { - return a === b || !!a.symbol && a.symbol === b.symbol || !!a.aliasSymbol && a.aliasSymbol === b.aliasSymbol; - } - function indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, typeNode) { - const name = getNameFromIndexInfo(indexInfo) || "x"; - const indexerTypeNode = typeToTypeNodeHelper(indexInfo.keyType, context); - const indexingParameter = factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name, - /*questionToken*/ - void 0, - indexerTypeNode, - /*initializer*/ - void 0 - ); - if (!typeNode) { - typeNode = typeToTypeNodeHelper(indexInfo.type || anyType, context); - } - if (!indexInfo.type && !(context.flags & 2097152 /* AllowEmptyIndexInfoType */)) { - context.encounteredError = true; - } - context.approximateLength += name.length + 4; - return factory.createIndexSignature( - indexInfo.isReadonly ? [factory.createToken(148 /* ReadonlyKeyword */)] : void 0, - [indexingParameter], - typeNode - ); - } - function signatureToSignatureDeclarationHelper(signature, kind, context, options) { - var _a; - const suppressAny = context.flags & 256 /* SuppressAnyReturnType */; - if (suppressAny) - context.flags &= ~256 /* SuppressAnyReturnType */; - context.approximateLength += 3; - let typeParameters; - let typeArguments; - if (context.flags & 32 /* WriteTypeArgumentsOfSignature */ && signature.target && signature.mapper && signature.target.typeParameters) { - typeArguments = signature.target.typeParameters.map((parameter) => typeToTypeNodeHelper(instantiateType(parameter, signature.mapper), context)); - } else { - typeParameters = signature.typeParameters && signature.typeParameters.map((parameter) => typeParameterToDeclaration(parameter, context)); - } - const expandedParams = getExpandedParameters( - signature, - /*skipUnionExpanding*/ - true - )[0]; - let cleanup; - if (context.enclosingDeclaration && signature.declaration && signature.declaration !== context.enclosingDeclaration && !isInJSFile(signature.declaration) && some(expandedParams)) { - const existingFakeScope = getNodeLinks(context.enclosingDeclaration).fakeScopeForSignatureDeclaration ? context.enclosingDeclaration : void 0; - Debug.assertOptionalNode(existingFakeScope, isBlock); - const locals = (existingFakeScope == null ? void 0 : existingFakeScope.locals) ?? createSymbolTable(); - let newLocals; - for (const param of expandedParams) { - if (!locals.has(param.escapedName)) { - newLocals = append(newLocals, param.escapedName); - locals.set(param.escapedName, param); - } - } - if (newLocals) { - let removeNewLocals2 = function() { - forEach(newLocals, (s) => locals.delete(s)); - }; - var removeNewLocals = removeNewLocals2; - if (existingFakeScope) { - cleanup = removeNewLocals2; - } else { - const fakeScope = parseNodeFactory.createBlock(emptyArray); - getNodeLinks(fakeScope).fakeScopeForSignatureDeclaration = true; - fakeScope.locals = locals; - const saveEnclosingDeclaration = context.enclosingDeclaration; - setParent(fakeScope, saveEnclosingDeclaration); - context.enclosingDeclaration = fakeScope; - cleanup = () => { - context.enclosingDeclaration = saveEnclosingDeclaration; - removeNewLocals2(); - }; - } - } - } - const parameters = (some(expandedParams, (p) => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & 32768 /* RestParameter */)) ? signature.parameters : expandedParams).map((parameter) => symbolToParameterDeclaration(parameter, context, kind === 176 /* Constructor */, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports)); - const thisParameter = context.flags & 33554432 /* OmitThisParameter */ ? void 0 : tryGetThisParameterDeclaration(signature, context); - if (thisParameter) { - parameters.unshift(thisParameter); - } - let returnTypeNode; - const typePredicate = getTypePredicateOfSignature(signature); - if (typePredicate) { - const assertsModifier = typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(131 /* AssertsKeyword */) : void 0; - const parameterName = typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? setEmitFlags(factory.createIdentifier(typePredicate.parameterName), 16777216 /* NoAsciiEscaping */) : factory.createThisTypeNode(); - const typeNode = typePredicate.type && typeToTypeNodeHelper(typePredicate.type, context); - returnTypeNode = factory.createTypePredicateNode(assertsModifier, parameterName, typeNode); - } else { - const returnType = getReturnTypeOfSignature(signature); - if (returnType && !(suppressAny && isTypeAny(returnType))) { - returnTypeNode = serializeReturnTypeForSignature(context, returnType, signature, options == null ? void 0 : options.privateSymbolVisitor, options == null ? void 0 : options.bundledImports); - } else if (!suppressAny) { - returnTypeNode = factory.createKeywordTypeNode(133 /* AnyKeyword */); - } - } - let modifiers = options == null ? void 0 : options.modifiers; - if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { - const flags = modifiersToFlags(modifiers); - modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); - } - const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration( - modifiers, - /*asteriskToken*/ - void 0, - (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), - /*questionToken*/ - void 0, - typeParameters, - parameters, - returnTypeNode, - /*body*/ - void 0 - ) : kind === 176 /* Constructor */ ? factory.createConstructorDeclaration( - modifiers, - parameters, - /*body*/ - void 0 - ) : kind === 177 /* GetAccessor */ ? factory.createGetAccessorDeclaration( - modifiers, - (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), - parameters, - returnTypeNode, - /*body*/ - void 0 - ) : kind === 178 /* SetAccessor */ ? factory.createSetAccessorDeclaration( - modifiers, - (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), - parameters, - /*body*/ - void 0 - ) : kind === 181 /* IndexSignature */ ? factory.createIndexSignature(modifiers, parameters, returnTypeNode) : kind === 324 /* JSDocFunctionType */ ? factory.createJSDocFunctionType(parameters, returnTypeNode) : kind === 184 /* FunctionType */ ? factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 185 /* ConstructorType */ ? factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode ?? factory.createTypeReferenceNode(factory.createIdentifier(""))) : kind === 262 /* FunctionDeclaration */ ? factory.createFunctionDeclaration( - modifiers, - /*asteriskToken*/ - void 0, - (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), - typeParameters, - parameters, - returnTypeNode, - /*body*/ - void 0 - ) : kind === 218 /* FunctionExpression */ ? factory.createFunctionExpression( - modifiers, - /*asteriskToken*/ - void 0, - (options == null ? void 0 : options.name) ? cast(options.name, isIdentifier) : factory.createIdentifier(""), - typeParameters, - parameters, - returnTypeNode, - factory.createBlock([]) - ) : kind === 219 /* ArrowFunction */ ? factory.createArrowFunction( - modifiers, - typeParameters, - parameters, - returnTypeNode, - /*equalsGreaterThanToken*/ - void 0, - factory.createBlock([]) - ) : Debug.assertNever(kind); - if (typeArguments) { - node.typeArguments = factory.createNodeArray(typeArguments); - } - if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 330 /* JSDocSignature */ && signature.declaration.parent.kind === 346 /* JSDocOverloadTag */) { - const comment = getTextOfNode( - signature.declaration.parent.parent, - /*includeTrivia*/ - true - ).slice(2, -2).split(/\r\n|\n|\r/).map((line) => line.replace(/^\s+/, " ")).join("\n"); - addSyntheticLeadingComment( - node, - 3 /* MultiLineCommentTrivia */, - comment, - /*hasTrailingNewLine*/ - true - ); - } - cleanup == null ? void 0 : cleanup(); - return node; - } - function tryGetThisParameterDeclaration(signature, context) { - if (signature.thisParameter) { - return symbolToParameterDeclaration(signature.thisParameter, context); - } - if (signature.declaration && isInJSFile(signature.declaration)) { - const thisTag = getJSDocThisTag(signature.declaration); - if (thisTag && thisTag.typeExpression) { - return factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "this", - /*questionToken*/ - void 0, - typeToTypeNodeHelper(getTypeFromTypeNode(thisTag.typeExpression), context) - ); - } - } - } - function typeParameterToDeclarationWithConstraint(type, context, constraintNode) { - const savedContextFlags = context.flags; - context.flags &= ~512 /* WriteTypeParametersInQualifiedName */; - const modifiers = factory.createModifiersFromModifierFlags(getTypeParameterModifiers(type)); - const name = typeParameterToName(type, context); - const defaultParameter = getDefaultFromTypeParameter(type); - const defaultParameterNode = defaultParameter && typeToTypeNodeHelper(defaultParameter, context); - context.flags = savedContextFlags; - return factory.createTypeParameterDeclaration(modifiers, name, constraintNode, defaultParameterNode); - } - function typeParameterToDeclaration(type, context, constraint = getConstraintOfTypeParameter(type)) { - const constraintNode = constraint && typeToTypeNodeHelper(constraint, context); - return typeParameterToDeclarationWithConstraint(type, context, constraintNode); - } - function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); - if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); - } - let parameterType = getTypeOfSymbol(parameterSymbol); - if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { - parameterType = getOptionalType(parameterType); - } - const parameterTypeNode = serializeTypeForDeclaration(context, parameterType, parameterSymbol, context.enclosingDeclaration, privateSymbolVisitor, bundledImports); - const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; - const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; - const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); - const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; - const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; - const parameterNode = factory.createParameterDeclaration( - modifiers, - dotDotDotToken, - name, - questionToken, - parameterTypeNode, - /*initializer*/ - void 0 - ); - context.approximateLength += symbolName(parameterSymbol).length + 3; - return parameterNode; - function cloneBindingName(node) { - return elideInitializerAndSetEmitFlags(node); - function elideInitializerAndSetEmitFlags(node2) { - if (context.tracker.canTrackSymbol && isComputedPropertyName(node2) && isLateBindableName(node2)) { - trackComputedName(node2.expression, context.enclosingDeclaration, context); - } - let visited = visitEachChild( - node2, - elideInitializerAndSetEmitFlags, - nullTransformationContext, - /*nodesVisitor*/ - void 0, - elideInitializerAndSetEmitFlags - ); - if (isBindingElement(visited)) { - visited = factory.updateBindingElement( - visited, - visited.dotDotDotToken, - visited.propertyName, - visited.name, - /*initializer*/ - void 0 - ); - } - if (!nodeIsSynthesized(visited)) { - visited = factory.cloneNode(visited); - } - return setEmitFlags(visited, 1 /* SingleLine */ | 16777216 /* NoAsciiEscaping */); - } - } - } - function trackComputedName(accessExpression, enclosingDeclaration, context) { - if (!context.tracker.canTrackSymbol) - return; - const firstIdentifier = getFirstIdentifier(accessExpression); - const name = resolveName( - firstIdentifier, - firstIdentifier.escapedText, - 111551 /* Value */ | 1048576 /* ExportValue */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - true - ); - if (name) { - context.tracker.trackSymbol(name, enclosingDeclaration, 111551 /* Value */); - } - } - function lookupSymbolChain(symbol, context, meaning, yieldModuleSymbol) { - context.tracker.trackSymbol(symbol, context.enclosingDeclaration, meaning); - return lookupSymbolChainWorker(symbol, context, meaning, yieldModuleSymbol); - } - function lookupSymbolChainWorker(symbol, context, meaning, yieldModuleSymbol) { - let chain; - const isTypeParameter = symbol.flags & 262144 /* TypeParameter */; - if (!isTypeParameter && (context.enclosingDeclaration || context.flags & 64 /* UseFullyQualifiedType */) && !(context.flags & 134217728 /* DoNotIncludeSymbolChain */)) { - chain = Debug.checkDefined(getSymbolChain( - symbol, - meaning, - /*endOfChain*/ - true - )); - Debug.assert(chain && chain.length > 0); - } else { - chain = [symbol]; - } - return chain; - function getSymbolChain(symbol2, meaning2, endOfChain) { - let accessibleSymbolChain = getAccessibleSymbolChain(symbol2, context.enclosingDeclaration, meaning2, !!(context.flags & 128 /* UseOnlyExternalAliasing */)); - let parentSpecifiers; - if (!accessibleSymbolChain || needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning2 : getQualifiedLeftMeaning(meaning2))) { - const parents = getContainersOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol2, context.enclosingDeclaration, meaning2); - if (length(parents)) { - parentSpecifiers = parents.map((symbol3) => some(symbol3.declarations, hasNonGlobalAugmentationExternalModuleSymbol) ? getSpecifierForModuleSymbol(symbol3, context) : void 0); - const indices = parents.map((_, i) => i); - indices.sort(sortByBestName); - const sortedParents = indices.map((i) => parents[i]); - for (const parent2 of sortedParents) { - const parentChain = getSymbolChain( - parent2, - getQualifiedLeftMeaning(meaning2), - /*endOfChain*/ - false - ); - if (parentChain) { - if (parent2.exports && parent2.exports.get("export=" /* ExportEquals */) && getSymbolIfSameReference(parent2.exports.get("export=" /* ExportEquals */), symbol2)) { - accessibleSymbolChain = parentChain; - break; - } - accessibleSymbolChain = parentChain.concat(accessibleSymbolChain || [getAliasForSymbolInContainer(parent2, symbol2) || symbol2]); - break; - } - } - } - } - if (accessibleSymbolChain) { - return accessibleSymbolChain; - } - if ( - // If this is the last part of outputting the symbol, always output. The cases apply only to parent symbols. - endOfChain || // If a parent symbol is an anonymous type, don't write it. - !(symbol2.flags & (2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */)) - ) { - if (!endOfChain && !yieldModuleSymbol && !!forEach(symbol2.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { - return; - } - return [symbol2]; - } - function sortByBestName(a, b) { - const specifierA = parentSpecifiers[a]; - const specifierB = parentSpecifiers[b]; - if (specifierA && specifierB) { - const isBRelative = pathIsRelative(specifierB); - if (pathIsRelative(specifierA) === isBRelative) { - return countPathComponents(specifierA) - countPathComponents(specifierB); - } - if (isBRelative) { - return -1; - } - return 1; - } - return 0; - } - } - } - function typeParametersToTypeParameterDeclarations(symbol, context) { - let typeParameterNodes; - const targetSymbol = getTargetSymbol(symbol); - if (targetSymbol.flags & (32 /* Class */ | 64 /* Interface */ | 524288 /* TypeAlias */)) { - typeParameterNodes = factory.createNodeArray(map(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol), (tp) => typeParameterToDeclaration(tp, context))); - } - return typeParameterNodes; - } - function lookupTypeParameterNodes(chain, index, context) { - var _a; - Debug.assert(chain && 0 <= index && index < chain.length); - const symbol = chain[index]; - const symbolId = getSymbolId(symbol); - if ((_a = context.typeParameterSymbolList) == null ? void 0 : _a.has(symbolId)) { - return void 0; - } - (context.typeParameterSymbolList || (context.typeParameterSymbolList = /* @__PURE__ */ new Set())).add(symbolId); - let typeParameterNodes; - if (context.flags & 512 /* WriteTypeParametersInQualifiedName */ && index < chain.length - 1) { - const parentSymbol = symbol; - const nextSymbol = chain[index + 1]; - if (getCheckFlags(nextSymbol) & 1 /* Instantiated */) { - const params = getTypeParametersOfClassOrInterface( - parentSymbol.flags & 2097152 /* Alias */ ? resolveAlias(parentSymbol) : parentSymbol - ); - typeParameterNodes = mapToTypeNodes(map(params, (t) => getMappedType(t, nextSymbol.links.mapper)), context); - } else { - typeParameterNodes = typeParametersToTypeParameterDeclarations(symbol, context); - } - } - return typeParameterNodes; - } - function getTopmostIndexedAccessType(top) { - if (isIndexedAccessTypeNode(top.objectType)) { - return getTopmostIndexedAccessType(top.objectType); - } - return top; - } - function getSpecifierForModuleSymbol(symbol, context, overrideImportMode) { - let file = getDeclarationOfKind(symbol, 312 /* SourceFile */); - if (!file) { - const equivalentFileSymbol = firstDefined(symbol.declarations, (d) => getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol)); - if (equivalentFileSymbol) { - file = getDeclarationOfKind(equivalentFileSymbol, 312 /* SourceFile */); - } - } - if (file && file.moduleName !== void 0) { - return file.moduleName; - } - if (!file) { - if (context.tracker.trackReferencedAmbientModule) { - const ambientDecls = filter(symbol.declarations, isAmbientModule); - if (length(ambientDecls)) { - for (const decl of ambientDecls) { - context.tracker.trackReferencedAmbientModule(decl, symbol); - } - } - } - if (ambientModuleSymbolRegex.test(symbol.escapedName)) { - return symbol.escapedName.substring(1, symbol.escapedName.length - 1); - } - } - if (!context.enclosingDeclaration || !context.tracker.moduleResolverHost) { - if (ambientModuleSymbolRegex.test(symbol.escapedName)) { - return symbol.escapedName.substring(1, symbol.escapedName.length - 1); - } - return getSourceFileOfNode(getNonAugmentationDeclaration(symbol)).fileName; - } - const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration)); - const resolutionMode = overrideImportMode || (contextFile == null ? void 0 : contextFile.impliedNodeFormat); - const cacheKey = createModeAwareCacheKey(contextFile.path, resolutionMode); - const links = getSymbolLinks(symbol); - let specifier = links.specifierCache && links.specifierCache.get(cacheKey); - if (!specifier) { - const isBundle2 = !!outFile(compilerOptions); - const { moduleResolverHost } = context.tracker; - const specifierCompilerOptions = isBundle2 ? { ...compilerOptions, baseUrl: moduleResolverHost.getCommonSourceDirectory() } : compilerOptions; - specifier = first(getModuleSpecifiers( - symbol, - checker, - specifierCompilerOptions, - contextFile, - moduleResolverHost, - { - importModuleSpecifierPreference: isBundle2 ? "non-relative" : "project-relative", - importModuleSpecifierEnding: isBundle2 ? "minimal" : resolutionMode === 99 /* ESNext */ ? "js" : void 0 - }, - { overrideImportMode } - )); - links.specifierCache ?? (links.specifierCache = /* @__PURE__ */ new Map()); - links.specifierCache.set(cacheKey, specifier); - } - return specifier; - } - function symbolToEntityNameNode(symbol) { - const identifier = factory.createIdentifier(unescapeLeadingUnderscores(symbol.escapedName)); - return symbol.parent ? factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier; - } - function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) { - var _a, _b, _c, _d; - const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */)); - const isTypeOf = meaning === 111551 /* Value */; - if (some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { - const nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : void 0; - const typeParameterNodes = overrideTypeArguments || lookupTypeParameterNodes(chain, 0, context); - const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration)); - const targetFile = getSourceFileOfModule(chain[0]); - let specifier; - let assertion; - if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) { - if ((targetFile == null ? void 0 : targetFile.impliedNodeFormat) === 99 /* ESNext */ && targetFile.impliedNodeFormat !== (contextFile == null ? void 0 : contextFile.impliedNodeFormat)) { - specifier = getSpecifierForModuleSymbol(chain[0], context, 99 /* ESNext */); - assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([ - factory.createAssertEntry( - factory.createStringLiteral("resolution-mode"), - factory.createStringLiteral("import") - ) - ]))); - (_b = (_a = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _b.call(_a); - } - } - if (!specifier) { - specifier = getSpecifierForModuleSymbol(chain[0], context); - } - if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.indexOf("/node_modules/") >= 0) { - const oldSpecifier = specifier; - if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) { - const swappedMode = (contextFile == null ? void 0 : contextFile.impliedNodeFormat) === 99 /* ESNext */ ? 1 /* CommonJS */ : 99 /* ESNext */; - specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode); - if (specifier.indexOf("/node_modules/") >= 0) { - specifier = oldSpecifier; - } else { - assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([ - factory.createAssertEntry( - factory.createStringLiteral("resolution-mode"), - factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require") - ) - ]))); - (_d = (_c = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _d.call(_c); - } - } - if (!assertion) { - context.encounteredError = true; - if (context.tracker.reportLikelyUnsafeImportRequiredError) { - context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier); - } - } - } - const lit = factory.createLiteralTypeNode(factory.createStringLiteral(specifier)); - if (context.tracker.trackExternalModuleSymbolOfImportTypeNode) - context.tracker.trackExternalModuleSymbolOfImportTypeNode(chain[0]); - context.approximateLength += specifier.length + 10; - if (!nonRootParts || isEntityName(nonRootParts)) { - if (nonRootParts) { - const lastId = isIdentifier(nonRootParts) ? nonRootParts : nonRootParts.right; - setIdentifierTypeArguments( - lastId, - /*typeArguments*/ - void 0 - ); - } - return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf); - } else { - const splitNode = getTopmostIndexedAccessType(nonRootParts); - const qualifier = splitNode.objectType.typeName; - return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, assertion, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType); - } - } - const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0); - if (isIndexedAccessTypeNode(entityName)) { - return entityName; - } - if (isTypeOf) { - return factory.createTypeQueryNode(entityName); - } else { - const lastId = isIdentifier(entityName) ? entityName : entityName.right; - const lastTypeArgs = getIdentifierTypeArguments(lastId); - setIdentifierTypeArguments( - lastId, - /*typeArguments*/ - void 0 - ); - return factory.createTypeReferenceNode(entityName, lastTypeArgs); - } - function createAccessFromSymbolChain(chain2, index, stopper) { - const typeParameterNodes = index === chain2.length - 1 ? overrideTypeArguments : lookupTypeParameterNodes(chain2, index, context); - const symbol2 = chain2[index]; - const parent2 = chain2[index - 1]; - let symbolName2; - if (index === 0) { - context.flags |= 16777216 /* InInitialEntityName */; - symbolName2 = getNameOfSymbolAsWritten(symbol2, context); - context.approximateLength += (symbolName2 ? symbolName2.length : 0) + 1; - context.flags ^= 16777216 /* InInitialEntityName */; - } else { - if (parent2 && getExportsOfSymbol(parent2)) { - const exports = getExportsOfSymbol(parent2); - forEachEntry(exports, (ex, name) => { - if (getSymbolIfSameReference(ex, symbol2) && !isLateBoundName(name) && name !== "export=" /* ExportEquals */) { - symbolName2 = unescapeLeadingUnderscores(name); - return true; - } - }); - } - } - if (symbolName2 === void 0) { - const name = firstDefined(symbol2.declarations, getNameOfDeclaration); - if (name && isComputedPropertyName(name) && isEntityName(name.expression)) { - const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper); - if (isEntityName(LHS)) { - return factory.createIndexedAccessTypeNode(factory.createParenthesizedType(factory.createTypeQueryNode(LHS)), factory.createTypeQueryNode(name.expression)); - } - return LHS; - } - symbolName2 = getNameOfSymbolAsWritten(symbol2, context); - } - context.approximateLength += symbolName2.length + 1; - if (!(context.flags & 16 /* ForbidIndexedAccessSymbolReferences */) && parent2 && getMembersOfSymbol(parent2) && getMembersOfSymbol(parent2).get(symbol2.escapedName) && getSymbolIfSameReference(getMembersOfSymbol(parent2).get(symbol2.escapedName), symbol2)) { - const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper); - if (isIndexedAccessTypeNode(LHS)) { - return factory.createIndexedAccessTypeNode(LHS, factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2))); - } else { - return factory.createIndexedAccessTypeNode(factory.createTypeReferenceNode(LHS, typeParameterNodes), factory.createLiteralTypeNode(factory.createStringLiteral(symbolName2))); - } - } - const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */); - if (typeParameterNodes) - setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes)); - identifier.symbol = symbol2; - if (index > stopper) { - const LHS = createAccessFromSymbolChain(chain2, index - 1, stopper); - if (!isEntityName(LHS)) { - return Debug.fail("Impossible construct - an export of an indexed access cannot be reachable"); - } - return factory.createQualifiedName(LHS, identifier); - } - return identifier; - } - } - function typeParameterShadowsNameInScope(escapedName, context, type) { - const result = resolveName( - context.enclosingDeclaration, - escapedName, - 788968 /* Type */, - /*nameNotFoundMessage*/ - void 0, - escapedName, - /*isUse*/ - false - ); - if (result) { - if (result.flags & 262144 /* TypeParameter */ && result === type.symbol) { - return false; - } - return true; - } - return false; - } - function typeParameterToName(type, context) { - var _a, _b; - if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */ && context.typeParameterNames) { - const cached = context.typeParameterNames.get(getTypeId(type)); - if (cached) { - return cached; - } - } - let result = symbolToName( - type.symbol, - context, - 788968 /* Type */, - /*expectsIdentifier*/ - true - ); - if (!(result.kind & 80 /* Identifier */)) { - return factory.createIdentifier("(Missing type parameter)"); - } - if (context.flags & 4 /* GenerateNamesForShadowedTypeParams */) { - const rawtext = result.escapedText; - let i = ((_a = context.typeParameterNamesByTextNextNameCount) == null ? void 0 : _a.get(rawtext)) || 0; - let text = rawtext; - while (((_b = context.typeParameterNamesByText) == null ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) { - i++; - text = `${rawtext}_${i}`; - } - if (text !== rawtext) { - const typeArguments = getIdentifierTypeArguments(result); - result = factory.createIdentifier(text); - setIdentifierTypeArguments(result, typeArguments); - } - (context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = /* @__PURE__ */ new Map())).set(rawtext, i); - (context.typeParameterNames || (context.typeParameterNames = /* @__PURE__ */ new Map())).set(getTypeId(type), result); - (context.typeParameterNamesByText || (context.typeParameterNamesByText = /* @__PURE__ */ new Set())).add(rawtext); - } - return result; - } - function symbolToName(symbol, context, meaning, expectsIdentifier) { - const chain = lookupSymbolChain(symbol, context, meaning); - if (expectsIdentifier && chain.length !== 1 && !context.encounteredError && !(context.flags & 65536 /* AllowQualifiedNameInPlaceOfIdentifier */)) { - context.encounteredError = true; - } - return createEntityNameFromSymbolChain(chain, chain.length - 1); - function createEntityNameFromSymbolChain(chain2, index) { - const typeParameterNodes = lookupTypeParameterNodes(chain2, index, context); - const symbol2 = chain2[index]; - if (index === 0) { - context.flags |= 16777216 /* InInitialEntityName */; - } - const symbolName2 = getNameOfSymbolAsWritten(symbol2, context); - if (index === 0) { - context.flags ^= 16777216 /* InInitialEntityName */; - } - const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */); - if (typeParameterNodes) - setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes)); - identifier.symbol = symbol2; - return index > 0 ? factory.createQualifiedName(createEntityNameFromSymbolChain(chain2, index - 1), identifier) : identifier; - } - } - function symbolToExpression(symbol, context, meaning) { - const chain = lookupSymbolChain(symbol, context, meaning); - return createExpressionFromSymbolChain(chain, chain.length - 1); - function createExpressionFromSymbolChain(chain2, index) { - const typeParameterNodes = lookupTypeParameterNodes(chain2, index, context); - const symbol2 = chain2[index]; - if (index === 0) { - context.flags |= 16777216 /* InInitialEntityName */; - } - let symbolName2 = getNameOfSymbolAsWritten(symbol2, context); - if (index === 0) { - context.flags ^= 16777216 /* InInitialEntityName */; - } - let firstChar = symbolName2.charCodeAt(0); - if (isSingleOrDoubleQuote(firstChar) && some(symbol2.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { - return factory.createStringLiteral(getSpecifierForModuleSymbol(symbol2, context)); - } - if (index === 0 || canUsePropertyAccess(symbolName2, languageVersion)) { - const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */); - if (typeParameterNodes) - setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes)); - identifier.symbol = symbol2; - return index > 0 ? factory.createPropertyAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), identifier) : identifier; - } else { - if (firstChar === 91 /* openBracket */) { - symbolName2 = symbolName2.substring(1, symbolName2.length - 1); - firstChar = symbolName2.charCodeAt(0); - } - let expression; - if (isSingleOrDoubleQuote(firstChar) && !(symbol2.flags & 8 /* EnumMember */)) { - expression = factory.createStringLiteral(stripQuotes(symbolName2).replace(/\\./g, (s) => s.substring(1)), firstChar === 39 /* singleQuote */); - } else if ("" + +symbolName2 === symbolName2) { - expression = factory.createNumericLiteral(+symbolName2); - } - if (!expression) { - const identifier = setEmitFlags(factory.createIdentifier(symbolName2), 16777216 /* NoAsciiEscaping */); - if (typeParameterNodes) - setIdentifierTypeArguments(identifier, factory.createNodeArray(typeParameterNodes)); - identifier.symbol = symbol2; - expression = identifier; - } - return factory.createElementAccessExpression(createExpressionFromSymbolChain(chain2, index - 1), expression); - } - } - } - function isStringNamed(d) { - const name = getNameOfDeclaration(d); - return !!name && isStringLiteral(name); - } - function isSingleQuotedStringNamed(d) { - const name = getNameOfDeclaration(d); - return !!(name && isStringLiteral(name) && (name.singleQuote || !nodeIsSynthesized(name) && startsWith(getTextOfNode( - name, - /*includeTrivia*/ - false - ), "'"))); - } - function getPropertyNameNodeForSymbol(symbol, context) { - const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); - const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); - const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed); - if (fromNameType) { - return fromNameType; - } - const rawName = unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed); - } - function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed) { - const nameType = getSymbolLinks(symbol).nameType; - if (nameType) { - if (nameType.flags & 384 /* StringOrNumberLiteral */) { - const name = "" + nameType.value; - if (!isIdentifierText(name, getEmitScriptTarget(compilerOptions)) && (stringNamed || !isNumericLiteralName(name))) { - return factory.createStringLiteral(name, !!singleQuote); - } - if (isNumericLiteralName(name) && startsWith(name, "-")) { - return factory.createComputedPropertyName(factory.createNumericLiteral(+name)); - } - return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions)); - } - if (nameType.flags & 8192 /* UniqueESSymbol */) { - return factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, 111551 /* Value */)); - } - } - } - function cloneNodeBuilderContext(context) { - const initial = { ...context }; - if (initial.typeParameterNames) { - initial.typeParameterNames = new Map(initial.typeParameterNames); - } - if (initial.typeParameterNamesByText) { - initial.typeParameterNamesByText = new Set(initial.typeParameterNamesByText); - } - if (initial.typeParameterSymbolList) { - initial.typeParameterSymbolList = new Set(initial.typeParameterSymbolList); - } - initial.tracker = new SymbolTrackerImpl(initial, initial.tracker.inner, initial.tracker.moduleResolverHost); - return initial; - } - function getDeclarationWithTypeAnnotation(symbol, enclosingDeclaration) { - return symbol.declarations && find(symbol.declarations, (s) => !!getEffectiveTypeAnnotationNode(s) && (!enclosingDeclaration || !!findAncestor(s, (n) => n === enclosingDeclaration))); - } - function existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type) { - return !(getObjectFlags(type) & 4 /* Reference */) || !isTypeReferenceNode(existing) || length(existing.typeArguments) >= getMinTypeArgumentCount(type.target.typeParameters); - } - function getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration) { - return getNodeLinks(enclosingDeclaration).fakeScopeForSignatureDeclaration ? enclosingDeclaration.parent : enclosingDeclaration; - } - function serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) { - if (!isErrorType(type) && enclosingDeclaration) { - const declWithExistingAnnotation = getDeclarationWithTypeAnnotation(symbol, getEnclosingDeclarationIgnoringFakeScope(enclosingDeclaration)); - if (declWithExistingAnnotation && !isFunctionLikeDeclaration(declWithExistingAnnotation) && !isGetAccessorDeclaration(declWithExistingAnnotation)) { - const existing = getEffectiveTypeAnnotationNode(declWithExistingAnnotation); - if (typeNodeIsEquivalentToType(existing, declWithExistingAnnotation, type) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type)) { - const result2 = serializeExistingTypeNode(context, existing, includePrivateSymbol, bundled); - if (result2) { - return result2; - } - } - } - } - const oldFlags = context.flags; - if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol && (!context.enclosingDeclaration || some(symbol.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)))) { - context.flags |= 1048576 /* AllowUniqueESSymbolType */; - } - const result = typeToTypeNodeHelper(type, context); - context.flags = oldFlags; - return result; - } - function typeNodeIsEquivalentToType(typeNode, annotatedDeclaration, type) { - const typeFromTypeNode = getTypeFromTypeNode(typeNode); - if (typeFromTypeNode === type) { - return true; - } - if (isParameter(annotatedDeclaration) && annotatedDeclaration.questionToken) { - return getTypeWithFacts(type, 524288 /* NEUndefined */) === typeFromTypeNode; - } - return false; - } - function serializeReturnTypeForSignature(context, type, signature, includePrivateSymbol, bundled) { - if (!isErrorType(type) && context.enclosingDeclaration) { - const annotation = signature.declaration && getEffectiveReturnTypeNode(signature.declaration); - const enclosingDeclarationIgnoringFakeScope = getEnclosingDeclarationIgnoringFakeScope(context.enclosingDeclaration); - if (!!findAncestor(annotation, (n) => n === enclosingDeclarationIgnoringFakeScope) && annotation) { - const annotated = getTypeFromTypeNode(annotation); - const thisInstantiated = annotated.flags & 262144 /* TypeParameter */ && annotated.isThisType ? instantiateType(annotated, signature.mapper) : annotated; - if (thisInstantiated === type && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(annotation, type)) { - const result = serializeExistingTypeNode(context, annotation, includePrivateSymbol, bundled); - if (result) { - return result; - } - } - } - } - return typeToTypeNodeHelper(type, context); - } - function trackExistingEntityName(node, context, includePrivateSymbol) { - let introducesError = false; - const leftmost = getFirstIdentifier(node); - if (isInJSFile(node) && (isExportsIdentifier(leftmost) || isModuleExportsAccessExpression(leftmost.parent) || isQualifiedName(leftmost.parent) && isModuleIdentifier(leftmost.parent.left) && isExportsIdentifier(leftmost.parent.right))) { - introducesError = true; - return { introducesError, node }; - } - const sym = resolveEntityName( - leftmost, - 67108863 /* All */, - /*ignoreErrors*/ - true, - /*dontResolveAlias*/ - true - ); - if (sym) { - if (isSymbolAccessible( - sym, - context.enclosingDeclaration, - 67108863 /* All */, - /*shouldComputeAliasesToMakeVisible*/ - false - ).accessibility !== 0 /* Accessible */) { - introducesError = true; - } else { - context.tracker.trackSymbol(sym, context.enclosingDeclaration, 67108863 /* All */); - includePrivateSymbol == null ? void 0 : includePrivateSymbol(sym); - } - if (isIdentifier(node)) { - const type = getDeclaredTypeOfSymbol(sym); - const name = sym.flags & 262144 /* TypeParameter */ && !isTypeSymbolAccessible(type.symbol, context.enclosingDeclaration) ? typeParameterToName(type, context) : factory.cloneNode(node); - name.symbol = sym; - return { introducesError, node: setEmitFlags(setOriginalNode(name, node), 16777216 /* NoAsciiEscaping */) }; - } - } - return { introducesError, node }; - } - function serializeExistingTypeNode(context, existing, includePrivateSymbol, bundled) { - if (cancellationToken && cancellationToken.throwIfCancellationRequested) { - cancellationToken.throwIfCancellationRequested(); - } - let hadError = false; - const file = getSourceFileOfNode(existing); - const transformed = visitNode(existing, visitExistingNodeTreeSymbols, isTypeNode); - if (hadError) { - return void 0; - } - return transformed === existing ? setTextRange(factory.cloneNode(existing), existing) : transformed; - function visitExistingNodeTreeSymbols(node) { - if (isJSDocAllType(node) || node.kind === 326 /* JSDocNamepathType */) { - return factory.createKeywordTypeNode(133 /* AnyKeyword */); - } - if (isJSDocUnknownType(node)) { - return factory.createKeywordTypeNode(159 /* UnknownKeyword */); - } - if (isJSDocNullableType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createLiteralTypeNode(factory.createNull())]); - } - if (isJSDocOptionalType(node)) { - return factory.createUnionTypeNode([visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode), factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); - } - if (isJSDocNonNullableType(node)) { - return visitNode(node.type, visitExistingNodeTreeSymbols); - } - if (isJSDocVariadicType(node)) { - return factory.createArrayTypeNode(visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode)); - } - if (isJSDocTypeLiteral(node)) { - return factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (t) => { - const name = isIdentifier(t.name) ? t.name : t.name.right; - const typeViaParent = getTypeOfPropertyOfType(getTypeFromTypeNode(node), name.escapedText); - const overrideTypeNode = typeViaParent && t.typeExpression && getTypeFromTypeNode(t.typeExpression.type) !== typeViaParent ? typeToTypeNodeHelper(typeViaParent, context) : void 0; - return factory.createPropertySignature( - /*modifiers*/ - void 0, - name, - t.isBracketed || t.typeExpression && isJSDocOptionalType(t.typeExpression.type) ? factory.createToken(58 /* QuestionToken */) : void 0, - overrideTypeNode || t.typeExpression && visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ); - })); - } - if (isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "") { - return setOriginalNode(factory.createKeywordTypeNode(133 /* AnyKeyword */), node); - } - if ((isExpressionWithTypeArguments(node) || isTypeReferenceNode(node)) && isJSDocIndexSignature(node)) { - return factory.createTypeLiteralNode([factory.createIndexSignature( - /*modifiers*/ - void 0, - [factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "x", - /*questionToken*/ - void 0, - visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols, isTypeNode) - )], - visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols, isTypeNode) - )]); - } - if (isJSDocFunctionType(node)) { - if (isJSDocConstructSignature(node)) { - let newTypeNode; - return factory.createConstructorTypeNode( - /*modifiers*/ - void 0, - visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration), - mapDefined(node.parameters, (p, i) => p.name && isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode = p.type, void 0) : factory.createParameterDeclaration( - /*modifiers*/ - void 0, - getEffectiveDotDotDotForParameter(p), - getNameForJSDocFunctionParameter(p, i), - p.questionToken, - visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode), - /*initializer*/ - void 0 - )), - visitNode(newTypeNode || node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ); - } else { - return factory.createFunctionTypeNode( - visitNodes2(node.typeParameters, visitExistingNodeTreeSymbols, isTypeParameterDeclaration), - map(node.parameters, (p, i) => factory.createParameterDeclaration( - /*modifiers*/ - void 0, - getEffectiveDotDotDotForParameter(p), - getNameForJSDocFunctionParameter(p, i), - p.questionToken, - visitNode(p.type, visitExistingNodeTreeSymbols, isTypeNode), - /*initializer*/ - void 0 - )), - visitNode(node.type, visitExistingNodeTreeSymbols, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ); - } - } - if (isTypeReferenceNode(node) && isInJSDoc(node) && (!existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(node, getTypeFromTypeNode(node)) || getIntendedTypeFromJSDocTypeReference(node) || unknownSymbol === resolveTypeReferenceName( - node, - 788968 /* Type */, - /*ignoreErrors*/ - true - ))) { - return setOriginalNode(typeToTypeNodeHelper(getTypeFromTypeNode(node), context), node); - } - if (isLiteralImportTypeNode(node)) { - const nodeSymbol = getNodeLinks(node).resolvedSymbol; - if (isInJSDoc(node) && nodeSymbol && // The import type resolved using jsdoc fallback logic - (!node.isTypeOf && !(nodeSymbol.flags & 788968 /* Type */) || // The import type had type arguments autofilled by js fallback logic - !(length(node.typeArguments) >= getMinTypeArgumentCount(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(nodeSymbol))))) { - return setOriginalNode(typeToTypeNodeHelper(getTypeFromTypeNode(node), context), node); - } - return factory.updateImportTypeNode( - node, - factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), - node.assertions, - node.qualifier, - visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode), - node.isTypeOf - ); - } - if (isEntityName(node) || isEntityNameExpression(node)) { - const { introducesError, node: result } = trackExistingEntityName(node, context, includePrivateSymbol); - hadError = hadError || introducesError; - if (result !== node) { - return result; - } - } - if (file && isTupleTypeNode(node) && getLineAndCharacterOfPosition(file, node.pos).line === getLineAndCharacterOfPosition(file, node.end).line) { - setEmitFlags(node, 1 /* SingleLine */); - } - return visitEachChild(node, visitExistingNodeTreeSymbols, nullTransformationContext); - function getEffectiveDotDotDotForParameter(p) { - return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? factory.createToken(26 /* DotDotDotToken */) : void 0); - } - function getNameForJSDocFunctionParameter(p, index) { - return p.name && isIdentifier(p.name) && p.name.escapedText === "this" ? "this" : getEffectiveDotDotDotForParameter(p) ? `args` : `arg${index}`; - } - function rewriteModuleSpecifier(parent2, lit) { - if (bundled) { - if (context.tracker && context.tracker.moduleResolverHost) { - const targetFile = getExternalModuleFileFromDeclaration(parent2); - if (targetFile) { - const getCanonicalFileName = createGetCanonicalFileName(!!host.useCaseSensitiveFileNames); - const resolverHost = { - getCanonicalFileName, - getCurrentDirectory: () => context.tracker.moduleResolverHost.getCurrentDirectory(), - getCommonSourceDirectory: () => context.tracker.moduleResolverHost.getCommonSourceDirectory() - }; - const newName = getResolvedExternalModuleName(resolverHost, targetFile); - return factory.createStringLiteral(newName); - } - } - } else { - if (context.tracker && context.tracker.trackExternalModuleSymbolOfImportTypeNode) { - const moduleSym = resolveExternalModuleNameWorker( - lit, - lit, - /*moduleNotFoundError*/ - void 0 - ); - if (moduleSym) { - context.tracker.trackExternalModuleSymbolOfImportTypeNode(moduleSym); - } - } - } - return lit; - } - } - } - function symbolTableToDeclarationStatements(symbolTable, context, bundled) { - const serializePropertySymbolForClass = makeSerializePropertySymbol( - factory.createPropertyDeclaration, - 174 /* MethodDeclaration */, - /*useAccessors*/ - true - ); - const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol( - (mods, name, question, type) => factory.createPropertySignature(mods, name, question, type), - 173 /* MethodSignature */, - /*useAccessors*/ - false - ); - const enclosingDeclaration = context.enclosingDeclaration; - let results = []; - const visitedSymbols = /* @__PURE__ */ new Set(); - const deferredPrivatesStack = []; - const oldcontext = context; - context = { - ...oldcontext, - usedSymbolNames: new Set(oldcontext.usedSymbolNames), - remappedSymbolNames: /* @__PURE__ */ new Map(), - tracker: void 0 - }; - const tracker = { - ...oldcontext.tracker.inner, - trackSymbol: (sym, decl, meaning) => { - var _a; - const accessibleResult = isSymbolAccessible( - sym, - decl, - meaning, - /*shouldComputeAliasesToMakeVisible*/ - false - ); - if (accessibleResult.accessibility === 0 /* Accessible */) { - const chain = lookupSymbolChainWorker(sym, context, meaning); - if (!(sym.flags & 4 /* Property */)) { - includePrivateSymbol(chain[0]); - } - } else if ((_a = oldcontext.tracker.inner) == null ? void 0 : _a.trackSymbol) { - return oldcontext.tracker.inner.trackSymbol(sym, decl, meaning); - } - return false; - } - }; - context.tracker = new SymbolTrackerImpl(context, tracker, oldcontext.tracker.moduleResolverHost); - forEachEntry(symbolTable, (symbol, name) => { - const baseName = unescapeLeadingUnderscores(name); - void getInternalSymbolName(symbol, baseName); - }); - let addingDeclare = !bundled; - const exportEquals = symbolTable.get("export=" /* ExportEquals */); - if (exportEquals && symbolTable.size > 1 && exportEquals.flags & 2097152 /* Alias */) { - symbolTable = createSymbolTable(); - symbolTable.set("export=" /* ExportEquals */, exportEquals); - } - visitSymbolTable(symbolTable); - return mergeRedundantStatements(results); - function isIdentifierAndNotUndefined(node) { - return !!node && node.kind === 80 /* Identifier */; - } - function getNamesOfDeclaration(statement) { - if (isVariableStatement(statement)) { - return filter(map(statement.declarationList.declarations, getNameOfDeclaration), isIdentifierAndNotUndefined); - } - return filter([getNameOfDeclaration(statement)], isIdentifierAndNotUndefined); - } - function flattenExportAssignedNamespace(statements) { - const exportAssignment = find(statements, isExportAssignment); - const nsIndex = findIndex(statements, isModuleDeclaration); - let ns = nsIndex !== -1 ? statements[nsIndex] : void 0; - if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier(exportAssignment.expression) && isIdentifier(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) { - const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 1 /* Export */)); - const name = ns.name; - let body = ns.body; - if (length(excessExports)) { - ns = factory.updateModuleDeclaration( - ns, - ns.modifiers, - ns.name, - body = factory.updateModuleBlock( - body, - factory.createNodeArray([...ns.body.statements, factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ - void 0, - id - ))), - /*moduleSpecifier*/ - void 0 - )]) - ) - ); - statements = [...statements.slice(0, nsIndex), ns, ...statements.slice(nsIndex + 1)]; - } - if (!find(statements, (s) => s !== ns && nodeHasName(s, name))) { - results = []; - const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 1 /* Export */) || isExportAssignment(s) || isExportDeclaration(s)); - forEach(body.statements, (s) => { - addResult(s, mixinExportFlag ? 1 /* Export */ : 0 /* None */); - }); - statements = [...filter(statements, (s) => s !== ns && s !== exportAssignment), ...results]; - } - } - return statements; - } - function mergeExportDeclarations(statements) { - const exports = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); - if (length(exports) > 1) { - const nonExports = filter(statements, (d) => !isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause); - statements = [...nonExports, factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(flatMap(exports, (e) => cast(e.exportClause, isNamedExports).elements)), - /*moduleSpecifier*/ - void 0 - )]; - } - const reexports = filter(statements, (d) => isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); - if (length(reexports) > 1) { - const groups = group(reexports, (decl) => isStringLiteral(decl.moduleSpecifier) ? ">" + decl.moduleSpecifier.text : ">"); - if (groups.length !== reexports.length) { - for (const group2 of groups) { - if (group2.length > 1) { - statements = [ - ...filter(statements, (s) => group2.indexOf(s) === -1), - factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(flatMap(group2, (e) => cast(e.exportClause, isNamedExports).elements)), - group2[0].moduleSpecifier - ) - ]; - } - } - } - } - return statements; - } - function inlineExportModifiers(statements) { - const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.assertClause && !!d.exportClause && isNamedExports(d.exportClause)); - if (index >= 0) { - const exportDecl = statements[index]; - const replacements = mapDefined(exportDecl.exportClause.elements, (e) => { - if (!e.propertyName) { - const indices = indicesOf(statements); - const associatedIndices = filter(indices, (i) => nodeHasName(statements[i], e.name)); - if (length(associatedIndices) && every(associatedIndices, (i) => canHaveExportModifier(statements[i]))) { - for (const index2 of associatedIndices) { - statements[index2] = addExportModifier(statements[index2]); - } - return void 0; - } - } - return e; - }); - if (!length(replacements)) { - orderedRemoveItemAt(statements, index); - } else { - statements[index] = factory.updateExportDeclaration( - exportDecl, - exportDecl.modifiers, - exportDecl.isTypeOnly, - factory.updateNamedExports( - exportDecl.exportClause, - replacements - ), - exportDecl.moduleSpecifier, - exportDecl.assertClause - ); - } - } - return statements; - } - function mergeRedundantStatements(statements) { - statements = flattenExportAssignedNamespace(statements); - statements = mergeExportDeclarations(statements); - statements = inlineExportModifiers(statements); - if (enclosingDeclaration && (isSourceFile(enclosingDeclaration) && isExternalOrCommonJsModule(enclosingDeclaration) || isModuleDeclaration(enclosingDeclaration)) && (!some(statements, isExternalModuleIndicator) || !hasScopeMarker(statements) && some(statements, needsScopeMarker))) { - statements.push(createEmptyExports(factory)); - } - return statements; - } - function addExportModifier(node) { - const flags = (getEffectiveModifierFlags(node) | 1 /* Export */) & ~2 /* Ambient */; - return factory.updateModifiers(node, flags); - } - function removeExportModifier(node) { - const flags = getEffectiveModifierFlags(node) & ~1 /* Export */; - return factory.updateModifiers(node, flags); - } - function visitSymbolTable(symbolTable2, suppressNewPrivateContext, propertyAsAlias) { - if (!suppressNewPrivateContext) { - deferredPrivatesStack.push(/* @__PURE__ */ new Map()); - } - symbolTable2.forEach((symbol) => { - serializeSymbol( - symbol, - /*isPrivate*/ - false, - !!propertyAsAlias - ); - }); - if (!suppressNewPrivateContext) { - deferredPrivatesStack[deferredPrivatesStack.length - 1].forEach((symbol) => { - serializeSymbol( - symbol, - /*isPrivate*/ - true, - !!propertyAsAlias - ); - }); - deferredPrivatesStack.pop(); - } - } - function serializeSymbol(symbol, isPrivate, propertyAsAlias) { - const visitedSym = getMergedSymbol(symbol); - if (visitedSymbols.has(getSymbolId(visitedSym))) { - return; - } - visitedSymbols.add(getSymbolId(visitedSym)); - const skipMembershipCheck = !isPrivate; - if (skipMembershipCheck || !!length(symbol.declarations) && some(symbol.declarations, (d) => !!findAncestor(d, (n) => n === enclosingDeclaration))) { - const oldContext = context; - context = cloneNodeBuilderContext(context); - serializeSymbolWorker(symbol, isPrivate, propertyAsAlias); - if (context.reportedDiagnostic) { - oldcontext.reportedDiagnostic = context.reportedDiagnostic; - } - context = oldContext; - } - } - function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias) { - var _a, _b, _c, _d; - const symbolName2 = unescapeLeadingUnderscores(symbol.escapedName); - const isDefault = symbol.escapedName === "default" /* Default */; - if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && isStringANonContextualKeyword(symbolName2) && !isDefault) { - context.encounteredError = true; - return; - } - let needsPostExportDefault = isDefault && !!(symbol.flags & -113 /* ExportDoesNotSupportDefaultModifier */ || symbol.flags & 16 /* Function */ && length(getPropertiesOfType(getTypeOfSymbol(symbol)))) && !(symbol.flags & 2097152 /* Alias */); - let needsExportDeclaration = !needsPostExportDefault && !isPrivate && isStringANonContextualKeyword(symbolName2) && !isDefault; - if (needsPostExportDefault || needsExportDeclaration) { - isPrivate = true; - } - const modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 1024 /* Default */ : 0); - const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */; - const isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); - if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) { - serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags); - } - if (symbol.flags & 524288 /* TypeAlias */) { - serializeTypeAlias(symbol, symbolName2, modifierFlags); - } - if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) { - if (propertyAsAlias) { - const createdExport = serializeMaybeAliasAssignment(symbol); - if (createdExport) { - needsExportDeclaration = false; - needsPostExportDefault = false; - } - } else { - const type = getTypeOfSymbol(symbol); - const localName = getInternalSymbolName(symbol, symbolName2); - if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { - serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags); - } else { - const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; - const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol); - let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d)); - if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { - textRange = textRange.parent.parent; - } - const propertyAccessRequire = (_c = symbol.declarations) == null ? void 0 : _c.find(isPropertyAccessExpression); - if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_d = type.symbol) == null ? void 0 : _d.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { - const alias = localName === propertyAccessRequire.parent.right.escapedText ? void 0 : propertyAccessRequire.parent.right; - addResult( - factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( - /*isTypeOnly*/ - false, - alias, - localName - )]) - ), - 0 /* None */ - ); - context.tracker.trackSymbol(type.symbol, context.enclosingDeclaration, 111551 /* Value */); - } else { - const statement = setTextRange(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([ - factory.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) - ) - ], flags) - ), textRange); - addResult(statement, name !== localName ? modifierFlags & ~1 /* Export */ : modifierFlags); - if (name !== localName && !isPrivate) { - addResult( - factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( - /*isTypeOnly*/ - false, - name, - localName - )]) - ), - 0 /* None */ - ); - needsExportDeclaration = false; - needsPostExportDefault = false; - } - } - } - } - } - if (symbol.flags & 384 /* Enum */) { - serializeEnum(symbol, symbolName2, modifierFlags); - } - if (symbol.flags & 32 /* Class */) { - if (symbol.flags & 4 /* Property */ && symbol.valueDeclaration && isBinaryExpression(symbol.valueDeclaration.parent) && isClassExpression(symbol.valueDeclaration.parent.right)) { - serializeAsAlias(symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags); - } else { - serializeAsClass(symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags); - } - } - if (symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && (!isConstMergedWithNS || isTypeOnlyNamespace(symbol)) || isConstMergedWithNSPrintableAsSignatureMerge) { - serializeModule(symbol, symbolName2, modifierFlags); - } - if (symbol.flags & 64 /* Interface */ && !(symbol.flags & 32 /* Class */)) { - serializeInterface(symbol, symbolName2, modifierFlags); - } - if (symbol.flags & 2097152 /* Alias */) { - serializeAsAlias(symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags); - } - if (symbol.flags & 4 /* Property */ && symbol.escapedName === "export=" /* ExportEquals */) { - serializeMaybeAliasAssignment(symbol); - } - if (symbol.flags & 8388608 /* ExportStar */) { - if (symbol.declarations) { - for (const node of symbol.declarations) { - const resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier); - if (!resolvedModule) - continue; - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - node.isTypeOnly, - /*exportClause*/ - void 0, - factory.createStringLiteral(getSpecifierForModuleSymbol(resolvedModule, context)) - ), 0 /* None */); - } - } - } - if (needsPostExportDefault) { - addResult(factory.createExportAssignment( - /*modifiers*/ - void 0, - /*isExportEquals*/ - false, - factory.createIdentifier(getInternalSymbolName(symbol, symbolName2)) - ), 0 /* None */); - } else if (needsExportDeclaration) { - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( - /*isTypeOnly*/ - false, - getInternalSymbolName(symbol, symbolName2), - symbolName2 - )]) - ), 0 /* None */); - } - } - function includePrivateSymbol(symbol) { - if (some(symbol.declarations, isParameterDeclaration)) - return; - Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]); - getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol); - const isExternalImportAlias = !!(symbol.flags & 2097152 /* Alias */) && !some( - symbol.declarations, - (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference) - ); - deferredPrivatesStack[isExternalImportAlias ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol); - } - function isExportingScope(enclosingDeclaration2) { - return isSourceFile(enclosingDeclaration2) && (isExternalOrCommonJsModule(enclosingDeclaration2) || isJsonSourceFile(enclosingDeclaration2)) || isAmbientModule(enclosingDeclaration2) && !isGlobalScopeAugmentation(enclosingDeclaration2); - } - function addResult(node, additionalModifierFlags) { - if (canHaveModifiers(node)) { - let newModifierFlags = 0 /* None */; - const enclosingDeclaration2 = context.enclosingDeclaration && (isJSDocTypeAlias(context.enclosingDeclaration) ? getSourceFileOfNode(context.enclosingDeclaration) : context.enclosingDeclaration); - if (additionalModifierFlags & 1 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { - newModifierFlags |= 1 /* Export */; - } - if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { - newModifierFlags |= 2 /* Ambient */; - } - if (additionalModifierFlags & 1024 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { - newModifierFlags |= 1024 /* Default */; - } - if (newModifierFlags) { - node = factory.updateModifiers(node, newModifierFlags | getEffectiveModifierFlags(node)); - } - } - results.push(node); - } - function serializeTypeAlias(symbol, symbolName2, modifierFlags) { - var _a; - const aliasType = getDeclaredTypeOfTypeAlias(symbol); - const typeParams = getSymbolLinks(symbol).typeParameters; - const typeParamDecls = map(typeParams, (p) => typeParameterToDeclaration(p, context)); - const jsdocAliasDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isJSDocTypeAlias); - const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0); - const oldFlags = context.flags; - context.flags |= 8388608 /* InTypeAlias */; - const oldEnclosingDecl = context.enclosingDeclaration; - context.enclosingDeclaration = jsdocAliasDecl; - const typeNode = jsdocAliasDecl && jsdocAliasDecl.typeExpression && isJSDocTypeExpression(jsdocAliasDecl.typeExpression) && serializeExistingTypeNode(context, jsdocAliasDecl.typeExpression.type, includePrivateSymbol, bundled) || typeToTypeNodeHelper(aliasType, context); - addResult(setSyntheticLeadingComments( - factory.createTypeAliasDeclaration( - /*modifiers*/ - void 0, - getInternalSymbolName(symbol, symbolName2), - typeParamDecls, - typeNode - ), - !commentText ? [] : [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }] - ), modifierFlags); - context.flags = oldFlags; - context.enclosingDeclaration = oldEnclosingDecl; - } - function serializeInterface(symbol, symbolName2, modifierFlags) { - const interfaceType = getDeclaredTypeOfClassOrInterface(symbol); - const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - const typeParamDecls = map(localParams, (p) => typeParameterToDeclaration(p, context)); - const baseTypes = getBaseTypes(interfaceType); - const baseType = length(baseTypes) ? getIntersectionType(baseTypes) : void 0; - const members = flatMap(getPropertiesOfType(interfaceType), (p) => serializePropertySymbolForInterface(p, baseType)); - const callSignatures = serializeSignatures(0 /* Call */, interfaceType, baseType, 179 /* CallSignature */); - const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); - const indexSignatures = serializeIndexSignatures(interfaceType, baseType); - const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; - addResult(factory.createInterfaceDeclaration( - /*modifiers*/ - void 0, - getInternalSymbolName(symbol, symbolName2), - typeParamDecls, - heritageClauses, - [...indexSignatures, ...constructSignatures, ...callSignatures, ...members] - ), modifierFlags); - } - function getNamespaceMembersForSerialization(symbol) { - const exports = getExportsOfSymbol(symbol); - return !exports ? [] : filter(arrayFrom(exports.values()), (m) => isNamespaceMember(m) && isIdentifierText(m.escapedName, 99 /* ESNext */)); - } - function isTypeOnlyNamespace(symbol) { - return every(getNamespaceMembersForSerialization(symbol), (m) => !(getSymbolFlags(resolveSymbol(m)) & 111551 /* Value */)); - } - function serializeModule(symbol, symbolName2, modifierFlags) { - const members = getNamespaceMembersForSerialization(symbol); - const locationMap = arrayToMultiMap(members, (m) => m.parent && m.parent === symbol ? "real" : "merged"); - const realMembers = locationMap.get("real") || emptyArray; - const mergedMembers = locationMap.get("merged") || emptyArray; - if (length(realMembers)) { - const localName = getInternalSymbolName(symbol, symbolName2); - serializeAsNamespaceDeclaration(realMembers, localName, modifierFlags, !!(symbol.flags & (16 /* Function */ | 67108864 /* Assignment */))); - } - if (length(mergedMembers)) { - const containingFile = getSourceFileOfNode(context.enclosingDeclaration); - const localName = getInternalSymbolName(symbol, symbolName2); - const nsBody = factory.createModuleBlock([factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(mapDefined(filter(mergedMembers, (n) => n.escapedName !== "export=" /* ExportEquals */), (s) => { - var _a, _b; - const name = unescapeLeadingUnderscores(s.escapedName); - const localName2 = getInternalSymbolName(s, name); - const aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); - if (containingFile && (aliasDecl ? containingFile !== getSourceFileOfNode(aliasDecl) : !some(s.declarations, (d) => getSourceFileOfNode(d) === containingFile))) { - (_b = (_a = context.tracker) == null ? void 0 : _a.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a, containingFile, symbol, s); - return void 0; - } - const target = aliasDecl && getTargetOfAliasDeclaration( - aliasDecl, - /*dontRecursivelyResolve*/ - true - ); - includePrivateSymbol(target || s); - const targetName = target ? getInternalSymbolName(target, unescapeLeadingUnderscores(target.escapedName)) : localName2; - return factory.createExportSpecifier( - /*isTypeOnly*/ - false, - name === targetName ? void 0 : targetName, - name - ); - })) - )]); - addResult(factory.createModuleDeclaration( - /*modifiers*/ - void 0, - factory.createIdentifier(localName), - nsBody, - 32 /* Namespace */ - ), 0 /* None */); - } - } - function serializeEnum(symbol, symbolName2, modifierFlags) { - addResult(factory.createEnumDeclaration( - factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 2048 /* Const */ : 0), - getInternalSymbolName(symbol, symbolName2), - map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => { - const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0; - return factory.createEnumMember(unescapeLeadingUnderscores(p.escapedName), initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue)); - }) - ), modifierFlags); - } - function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { - const signatures = getSignaturesOfType(type, 0 /* Call */); - for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, 262 /* FunctionDeclaration */, context, { name: factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled }); - addResult(setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags); - } - if (!(symbol.flags & (512 /* ValueModule */ | 1024 /* NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) { - const props = filter(getPropertiesOfType(type), isNamespaceMember); - serializeAsNamespaceDeclaration( - props, - localName, - modifierFlags, - /*suppressNewPrivateContext*/ - true - ); - } - } - function getSignatureTextRangeLocation(signature) { - if (signature.declaration && signature.declaration.parent) { - if (isBinaryExpression(signature.declaration.parent) && getAssignmentDeclarationKind(signature.declaration.parent) === 5 /* Property */) { - return signature.declaration.parent; - } - if (isVariableDeclaration(signature.declaration.parent) && signature.declaration.parent.parent) { - return signature.declaration.parent.parent; - } - } - return signature.declaration; - } - function serializeAsNamespaceDeclaration(props, localName, modifierFlags, suppressNewPrivateContext) { - if (length(props)) { - const localVsRemoteMap = arrayToMultiMap( - props, - (p) => !length(p.declarations) || some( - p.declarations, - (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration) - ) ? "local" : "remote" - ); - const localProps = localVsRemoteMap.get("local") || emptyArray; - let fakespace = parseNodeFactory.createModuleDeclaration( - /*modifiers*/ - void 0, - factory.createIdentifier(localName), - factory.createModuleBlock([]), - 32 /* Namespace */ - ); - setParent(fakespace, enclosingDeclaration); - fakespace.locals = createSymbolTable(props); - fakespace.symbol = props[0].parent; - const oldResults = results; - results = []; - const oldAddingDeclare = addingDeclare; - addingDeclare = false; - const subcontext = { ...context, enclosingDeclaration: fakespace }; - const oldContext = context; - context = subcontext; - visitSymbolTable( - createSymbolTable(localProps), - suppressNewPrivateContext, - /*propertyAsAlias*/ - true - ); - context = oldContext; - addingDeclare = oldAddingDeclare; - const declarations = results; - results = oldResults; - const defaultReplaced = map(declarations, (d) => isExportAssignment(d) && !d.isExportEquals && isIdentifier(d.expression) ? factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( - /*isTypeOnly*/ - false, - d.expression, - factory.createIdentifier("default" /* Default */) - )]) - ) : d); - const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 1 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced; - fakespace = factory.updateModuleDeclaration( - fakespace, - fakespace.modifiers, - fakespace.name, - factory.createModuleBlock(exportModifierStripped) - ); - addResult(fakespace, modifierFlags); - } - } - function isNamespaceMember(p) { - return !!(p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) || !(p.flags & 4194304 /* Prototype */ || p.escapedName === "prototype" || p.valueDeclaration && isStatic(p.valueDeclaration) && isClassLike(p.valueDeclaration.parent)); - } - function sanitizeJSDocImplements(clauses) { - const result = mapDefined(clauses, (e) => { - const oldEnclosing = context.enclosingDeclaration; - context.enclosingDeclaration = e; - let expr = e.expression; - if (isEntityNameExpression(expr)) { - if (isIdentifier(expr) && idText(expr) === "") { - return cleanup( - /*result*/ - void 0 - ); - } - let introducesError; - ({ introducesError, node: expr } = trackExistingEntityName(expr, context, includePrivateSymbol)); - if (introducesError) { - return cleanup( - /*result*/ - void 0 - ); - } - } - return cleanup(factory.createExpressionWithTypeArguments( - expr, - map( - e.typeArguments, - (a) => serializeExistingTypeNode(context, a, includePrivateSymbol, bundled) || typeToTypeNodeHelper(getTypeFromTypeNode(a), context) - ) - )); - function cleanup(result2) { - context.enclosingDeclaration = oldEnclosing; - return result2; - } - }); - if (result.length === clauses.length) { - return result; - } - return void 0; - } - function serializeAsClass(symbol, localName, modifierFlags) { - var _a, _b; - const originalDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike); - const oldEnclosing = context.enclosingDeclaration; - context.enclosingDeclaration = originalDecl || oldEnclosing; - const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - const typeParamDecls = map(localParams, (p) => typeParameterToDeclaration(p, context)); - const classType = getTypeWithThisArgument(getDeclaredTypeOfClassOrInterface(symbol)); - const baseTypes = getBaseTypes(classType); - const originalImplements = originalDecl && getEffectiveImplementsTypeNodes(originalDecl); - const implementsExpressions = originalImplements && sanitizeJSDocImplements(originalImplements) || mapDefined(getImplementsTypes(classType), serializeImplementedType); - const staticType = getTypeOfSymbol(symbol); - const isClass = !!((_b = staticType.symbol) == null ? void 0 : _b.valueDeclaration) && isClassLike(staticType.symbol.valueDeclaration); - const staticBaseType = isClass ? getBaseConstructorTypeOfClass(staticType) : anyType; - const heritageClauses = [ - ...!length(baseTypes) ? [] : [factory.createHeritageClause(96 /* ExtendsKeyword */, map(baseTypes, (b) => serializeBaseType(b, staticBaseType, localName)))], - ...!length(implementsExpressions) ? [] : [factory.createHeritageClause(119 /* ImplementsKeyword */, implementsExpressions)] - ]; - const symbolProps = getNonInheritedProperties(classType, baseTypes, getPropertiesOfType(classType)); - const publicSymbolProps = filter(symbolProps, (s) => { - const valueDecl = s.valueDeclaration; - return !!valueDecl && !(isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name)); - }); - const hasPrivateIdentifier = some(symbolProps, (s) => { - const valueDecl = s.valueDeclaration; - return !!valueDecl && isNamedDeclaration(valueDecl) && isPrivateIdentifier(valueDecl.name); - }); - const privateProperties = hasPrivateIdentifier ? [factory.createPropertyDeclaration( - /*modifiers*/ - void 0, - factory.createPrivateIdentifier("#private"), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - )] : emptyArray; - const publicProperties = flatMap(publicSymbolProps, (p) => serializePropertySymbolForClass( - p, - /*isStatic*/ - false, - baseTypes[0] - )); - const staticMembers = flatMap( - filter(getPropertiesOfType(staticType), (p) => !(p.flags & 4194304 /* Prototype */) && p.escapedName !== "prototype" && !isNamespaceMember(p)), - (p) => serializePropertySymbolForClass( - p, - /*isStatic*/ - true, - staticBaseType - ) - ); - const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */)); - const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration( - factory.createModifiersFromModifierFlags(8 /* Private */), - [], - /*body*/ - void 0 - )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); - const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); - context.enclosingDeclaration = oldEnclosing; - addResult(setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - localName, - typeParamDecls, - heritageClauses, - [...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties] - ), symbol.declarations && filter(symbol.declarations, (d) => isClassDeclaration(d) || isClassExpression(d))[0]), modifierFlags); - } - function getSomeTargetNameFromDeclarations(declarations) { - return firstDefined(declarations, (d) => { - if (isImportSpecifier(d) || isExportSpecifier(d)) { - return idText(d.propertyName || d.name); - } - if (isBinaryExpression(d) || isExportAssignment(d)) { - const expression = isExportAssignment(d) ? d.expression : d.right; - if (isPropertyAccessExpression(expression)) { - return idText(expression.name); - } - } - if (isAliasSymbolDeclaration2(d)) { - const name = getNameOfDeclaration(d); - if (name && isIdentifier(name)) { - return idText(name); - } - } - return void 0; - }); - } - function serializeAsAlias(symbol, localName, modifierFlags) { - var _a, _b, _c, _d, _e; - const node = getDeclarationOfAliasSymbol(symbol); - if (!node) - return Debug.fail(); - const target = getMergedSymbol(getTargetOfAliasDeclaration( - node, - /*dontRecursivelyResolve*/ - true - )); - if (!target) { - return; - } - let verbatimTargetName = isShorthandAmbientModuleSymbol(target) && getSomeTargetNameFromDeclarations(symbol.declarations) || unescapeLeadingUnderscores(target.escapedName); - if (verbatimTargetName === "export=" /* ExportEquals */ && allowSyntheticDefaultImports) { - verbatimTargetName = "default" /* Default */; - } - const targetName = getInternalSymbolName(target, verbatimTargetName); - includePrivateSymbol(target); - switch (node.kind) { - case 208 /* BindingElement */: - if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { - const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); - const { propertyName } = node; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ - void 0, - factory.createNamedImports([factory.createImportSpecifier( - /*isTypeOnly*/ - false, - propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : void 0, - factory.createIdentifier(localName) - )]) - ), - factory.createStringLiteral(specifier2), - /*assertClause*/ - void 0 - ), 0 /* None */); - break; - } - Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); - break; - case 304 /* ShorthandPropertyAssignment */: - if (((_e = (_d = node.parent) == null ? void 0 : _d.parent) == null ? void 0 : _e.kind) === 226 /* BinaryExpression */) { - serializeExportSpecifier( - unescapeLeadingUnderscores(symbol.escapedName), - targetName - ); - } - break; - case 260 /* VariableDeclaration */: - if (isPropertyAccessExpression(node.initializer)) { - const initializer = node.initializer; - const uniqueName = factory.createUniqueName(localName); - const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - uniqueName, - factory.createExternalModuleReference(factory.createStringLiteral(specifier2)) - ), 0 /* None */); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - factory.createQualifiedName(uniqueName, initializer.name) - ), modifierFlags); - break; - } - case 271 /* ImportEqualsDeclaration */: - if (target.escapedName === "export=" /* ExportEquals */ && some(target.declarations, (d) => isSourceFile(d) && isJsonSourceFile(d))) { - serializeMaybeAliasAssignment(symbol); - break; - } - const isLocalImport = !(target.flags & 512 /* ValueModule */) && !isVariableDeclaration(node); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - isLocalImport ? symbolToName( - target, - context, - 67108863 /* All */, - /*expectsIdentifier*/ - false - ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) - ), isLocalImport ? modifierFlags : 0 /* None */); - break; - case 270 /* NamespaceExportDeclaration */: - addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); - break; - case 273 /* ImportClause */: { - const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); - const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - /*namedBindings*/ - void 0 - ), - specifier2, - node.parent.assertClause - ), 0 /* None */); - break; - } - case 274 /* NamespaceImport */: { - const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); - const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ - void 0, - factory.createNamespaceImport(factory.createIdentifier(localName)) - ), - specifier2, - node.parent.parent.assertClause - ), 0 /* None */); - break; - } - case 280 /* NamespaceExport */: - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamespaceExport(factory.createIdentifier(localName)), - factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) - ), 0 /* None */); - break; - case 276 /* ImportSpecifier */: { - const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); - const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ - void 0, - factory.createNamedImports([ - factory.createImportSpecifier( - /*isTypeOnly*/ - false, - localName !== verbatimTargetName ? factory.createIdentifier(verbatimTargetName) : void 0, - factory.createIdentifier(localName) - ) - ]) - ), - specifier2, - node.parent.parent.parent.assertClause - ), 0 /* None */); - break; - } - case 281 /* ExportSpecifier */: - const specifier = node.parent.parent.moduleSpecifier; - serializeExportSpecifier( - unescapeLeadingUnderscores(symbol.escapedName), - specifier ? verbatimTargetName : targetName, - specifier && isStringLiteralLike(specifier) ? factory.createStringLiteral(specifier.text) : void 0 - ); - break; - case 277 /* ExportAssignment */: - serializeMaybeAliasAssignment(symbol); - break; - case 226 /* BinaryExpression */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - if (symbol.escapedName === "default" /* Default */ || symbol.escapedName === "export=" /* ExportEquals */) { - serializeMaybeAliasAssignment(symbol); - } else { - serializeExportSpecifier(localName, targetName); - } - break; - default: - return Debug.failBadSyntaxKind(node, "Unhandled alias declaration kind in symbol serializer!"); - } - } - function serializeExportSpecifier(localName, targetName, specifier) { - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( - /*isTypeOnly*/ - false, - localName !== targetName ? targetName : void 0, - localName - )]), - specifier - ), 0 /* None */); - } - function serializeMaybeAliasAssignment(symbol) { - var _a; - if (symbol.flags & 4194304 /* Prototype */) { - return false; - } - const name = unescapeLeadingUnderscores(symbol.escapedName); - const isExportEquals = name === "export=" /* ExportEquals */; - const isDefault = name === "default" /* Default */; - const isExportAssignmentCompatibleSymbolName = isExportEquals || isDefault; - const aliasDecl = symbol.declarations && getDeclarationOfAliasSymbol(symbol); - const target = aliasDecl && getTargetOfAliasDeclaration( - aliasDecl, - /*dontRecursivelyResolve*/ - true - ); - if (target && length(target.declarations) && some(target.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(enclosingDeclaration))) { - const expr = aliasDecl && (isExportAssignment(aliasDecl) || isBinaryExpression(aliasDecl) ? getExportAssignmentExpression(aliasDecl) : getPropertyAssignmentAliasLikeExpression(aliasDecl)); - const first2 = expr && isEntityNameExpression(expr) ? getFirstNonModuleExportsIdentifier(expr) : void 0; - const referenced = first2 && resolveEntityName( - first2, - 67108863 /* All */, - /*ignoreErrors*/ - true, - /*dontResolveAlias*/ - true, - enclosingDeclaration - ); - if (referenced || target) { - includePrivateSymbol(referenced || target); - } - const prevDisableTrackSymbol = context.tracker.disableTrackSymbol; - context.tracker.disableTrackSymbol = true; - if (isExportAssignmentCompatibleSymbolName) { - results.push(factory.createExportAssignment( - /*modifiers*/ - void 0, - isExportEquals, - symbolToExpression(target, context, 67108863 /* All */) - )); - } else { - if (first2 === expr && first2) { - serializeExportSpecifier(name, idText(first2)); - } else if (expr && isClassExpression(expr)) { - serializeExportSpecifier(name, getInternalSymbolName(target, symbolName(target))); - } else { - const varName = getUnusedName(name, symbol); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(varName), - symbolToName( - target, - context, - 67108863 /* All */, - /*expectsIdentifier*/ - false - ) - ), 0 /* None */); - serializeExportSpecifier(name, varName); - } - } - context.tracker.disableTrackSymbol = prevDisableTrackSymbol; - return true; - } else { - const varName = getUnusedName(name, symbol); - const typeToSerialize = getWidenedType(getTypeOfSymbol(getMergedSymbol(symbol))); - if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) { - serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 1 /* Export */); - } else { - const statement = factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([ - factory.createVariableDeclaration( - varName, - /*exclamationToken*/ - void 0, - serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled) - ) - ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) - ); - addResult( - statement, - target && target.flags & 4 /* Property */ && target.escapedName === "export=" /* ExportEquals */ ? 2 /* Ambient */ : name === varName ? 1 /* Export */ : 0 /* None */ - ); - } - if (isExportAssignmentCompatibleSymbolName) { - results.push(factory.createExportAssignment( - /*modifiers*/ - void 0, - isExportEquals, - factory.createIdentifier(varName) - )); - return true; - } else if (name !== varName) { - serializeExportSpecifier(name, varName); - return true; - } - return false; - } - } - function isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, hostSymbol) { - const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration); - return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class - !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK - !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => isIdentifierText(symbolName(p), languageVersion)); - } - function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) { - return function serializePropertySymbol(p, isStatic2, baseType) { - var _a, _b, _c, _d, _e; - const modifierFlags = getDeclarationModifierFlagsFromSymbol(p); - const isPrivate = !!(modifierFlags & 8 /* Private */); - if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) { - return []; - } - if (p.flags & 4194304 /* Prototype */ || p.escapedName === "constructor" || baseType && getPropertyOfType(baseType, p.escapedName) && isReadonlySymbol(getPropertyOfType(baseType, p.escapedName)) === isReadonlySymbol(p) && (p.flags & 16777216 /* Optional */) === (getPropertyOfType(baseType, p.escapedName).flags & 16777216 /* Optional */) && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName))) { - return []; - } - const flag = modifierFlags & ~512 /* Async */ | (isStatic2 ? 32 /* Static */ : 0); - const name = getPropertyNameNodeForSymbol(p, context); - const firstPropertyLikeDecl = (_a = p.declarations) == null ? void 0 : _a.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression)); - if (p.flags & 98304 /* Accessor */ && useAccessors) { - const result = []; - if (p.flags & 65536 /* SetAccessor */) { - result.push(setTextRange(factory.createSetAccessorDeclaration( - factory.createModifiersFromModifierFlags(flag), - name, - [factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "arg", - /*questionToken*/ - void 0, - isPrivate ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled) - )], - /*body*/ - void 0 - ), ((_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor)) || firstPropertyLikeDecl)); - } - if (p.flags & 32768 /* GetAccessor */) { - const isPrivate2 = modifierFlags & 8 /* Private */; - result.push(setTextRange(factory.createGetAccessorDeclaration( - factory.createModifiersFromModifierFlags(flag), - name, - [], - isPrivate2 ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), - /*body*/ - void 0 - ), ((_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor)) || firstPropertyLikeDecl)); - } - return result; - } else if (p.flags & (4 /* Property */ | 3 /* Variable */ | 98304 /* Accessor */)) { - return setTextRange(createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), - name, - p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - isPrivate ? void 0 : serializeTypeForDeclaration(context, getWriteTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), - // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 - // interface members can't have initializers, however class members _can_ - /*initializer*/ - void 0 - ), ((_d = p.declarations) == null ? void 0 : _d.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl); - } - if (p.flags & (8192 /* Method */ | 16 /* Function */)) { - const type = getTypeOfSymbol(p); - const signatures = getSignaturesOfType(type, 0 /* Call */); - if (flag & 8 /* Private */) { - return setTextRange(createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), - name, - p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ), ((_e = p.declarations) == null ? void 0 : _e.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0]); - } - const results2 = []; - for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper( - sig, - methodKind, - context, - { - name, - questionToken: p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - modifiers: flag ? factory.createModifiersFromModifierFlags(flag) : void 0 - } - ); - const location = sig.declaration && isPrototypePropertyAssignment(sig.declaration.parent) ? sig.declaration.parent : sig.declaration; - results2.push(setTextRange(decl, location)); - } - return results2; - } - return Debug.fail(`Unhandled class member kind! ${p.__debugFlags || p.flags}`); - }; - } - function serializePropertySymbolForInterface(p, baseType) { - return serializePropertySymbolForInterfaceWorker( - p, - /*isStatic*/ - false, - baseType - ); - } - function serializeSignatures(kind, input, baseType, outputKind) { - const signatures = getSignaturesOfType(input, kind); - if (kind === 1 /* Construct */) { - if (!baseType && every(signatures, (s) => length(s.parameters) === 0)) { - return []; - } - if (baseType) { - const baseSigs = getSignaturesOfType(baseType, 1 /* Construct */); - if (!length(baseSigs) && every(signatures, (s) => length(s.parameters) === 0)) { - return []; - } - if (baseSigs.length === signatures.length) { - let failed = false; - for (let i = 0; i < baseSigs.length; i++) { - if (!compareSignaturesIdentical( - signatures[i], - baseSigs[i], - /*partialMatch*/ - false, - /*ignoreThisTypes*/ - false, - /*ignoreReturnTypes*/ - true, - compareTypesIdentical - )) { - failed = true; - break; - } - } - if (!failed) { - return []; - } - } - } - let privateProtected = 0; - for (const s of signatures) { - if (s.declaration) { - privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 8 /* Private */ | 16 /* Protected */); - } - } - if (privateProtected) { - return [setTextRange(factory.createConstructorDeclaration( - factory.createModifiersFromModifierFlags(privateProtected), - /*parameters*/ - [], - /*body*/ - void 0 - ), signatures[0].declaration)]; - } - } - const results2 = []; - for (const sig of signatures) { - const decl = signatureToSignatureDeclarationHelper(sig, outputKind, context); - results2.push(setTextRange(decl, sig.declaration)); - } - return results2; - } - function serializeIndexSignatures(input, baseType) { - const results2 = []; - for (const info of getIndexInfosOfType(input)) { - if (baseType) { - const baseInfo = getIndexInfoOfType(baseType, info.keyType); - if (baseInfo) { - if (isTypeIdenticalTo(info.type, baseInfo.type)) { - continue; - } - } - } - results2.push(indexInfoToIndexSignatureDeclarationHelper( - info, - context, - /*typeNode*/ - void 0 - )); - } - return results2; - } - function serializeBaseType(t, staticType, rootName) { - const ref = trySerializeAsTypeReference(t, 111551 /* Value */); - if (ref) { - return ref; - } - const tempName = getUnusedName(`${rootName}_base`); - const statement = factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([ - factory.createVariableDeclaration( - tempName, - /*exclamationToken*/ - void 0, - typeToTypeNodeHelper(staticType, context) - ) - ], 2 /* Const */) - ); - addResult(statement, 0 /* None */); - return factory.createExpressionWithTypeArguments( - factory.createIdentifier(tempName), - /*typeArguments*/ - void 0 - ); - } - function trySerializeAsTypeReference(t, flags) { - let typeArgs; - let reference; - if (t.target && isSymbolAccessibleByFlags(t.target.symbol, enclosingDeclaration, flags)) { - typeArgs = map(getTypeArguments(t), (t2) => typeToTypeNodeHelper(t2, context)); - reference = symbolToExpression(t.target.symbol, context, 788968 /* Type */); - } else if (t.symbol && isSymbolAccessibleByFlags(t.symbol, enclosingDeclaration, flags)) { - reference = symbolToExpression(t.symbol, context, 788968 /* Type */); - } - if (reference) { - return factory.createExpressionWithTypeArguments(reference, typeArgs); - } - } - function serializeImplementedType(t) { - const ref = trySerializeAsTypeReference(t, 788968 /* Type */); - if (ref) { - return ref; - } - if (t.symbol) { - return factory.createExpressionWithTypeArguments( - symbolToExpression(t.symbol, context, 788968 /* Type */), - /*typeArguments*/ - void 0 - ); - } - } - function getUnusedName(input, symbol) { - var _a, _b; - const id = symbol ? getSymbolId(symbol) : void 0; - if (id) { - if (context.remappedSymbolNames.has(id)) { - return context.remappedSymbolNames.get(id); - } - } - if (symbol) { - input = getNameCandidateWorker(symbol, input); - } - let i = 0; - const original = input; - while ((_a = context.usedSymbolNames) == null ? void 0 : _a.has(input)) { - i++; - input = `${original}_${i}`; - } - (_b = context.usedSymbolNames) == null ? void 0 : _b.add(input); - if (id) { - context.remappedSymbolNames.set(id, input); - } - return input; - } - function getNameCandidateWorker(symbol, localName) { - if (localName === "default" /* Default */ || localName === "__class" /* Class */ || localName === "__function" /* Function */) { - const flags = context.flags; - context.flags |= 16777216 /* InInitialEntityName */; - const nameCandidate = getNameOfSymbolAsWritten(symbol, context); - context.flags = flags; - localName = nameCandidate.length > 0 && isSingleOrDoubleQuote(nameCandidate.charCodeAt(0)) ? stripQuotes(nameCandidate) : nameCandidate; - } - if (localName === "default" /* Default */) { - localName = "_default"; - } else if (localName === "export=" /* ExportEquals */) { - localName = "_exports"; - } - localName = isIdentifierText(localName, languageVersion) && !isStringANonContextualKeyword(localName) ? localName : "_" + localName.replace(/[^a-zA-Z0-9]/g, "_"); - return localName; - } - function getInternalSymbolName(symbol, localName) { - const id = getSymbolId(symbol); - if (context.remappedSymbolNames.has(id)) { - return context.remappedSymbolNames.get(id); - } - localName = getNameCandidateWorker(symbol, localName); - context.remappedSymbolNames.set(id, localName); - return localName; - } - } - } - function typePredicateToString(typePredicate, enclosingDeclaration, flags = 16384 /* UseAliasDefinedOutsideCurrentScope */, writer) { - return writer ? typePredicateToStringWorker(writer).getText() : usingSingleLineStringWriter(typePredicateToStringWorker); - function typePredicateToStringWorker(writer2) { - const predicate = factory.createTypePredicateNode( - typePredicate.kind === 2 /* AssertsThis */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createToken(131 /* AssertsKeyword */) : void 0, - typePredicate.kind === 1 /* Identifier */ || typePredicate.kind === 3 /* AssertsIdentifier */ ? factory.createIdentifier(typePredicate.parameterName) : factory.createThisTypeNode(), - typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 /* IgnoreErrors */ | 512 /* WriteTypeParametersInQualifiedName */) - // TODO: GH#18217 - ); - const printer = createPrinterWithRemoveComments(); - const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); - printer.writeNode( - 4 /* Unspecified */, - predicate, - /*sourceFile*/ - sourceFile, - writer2 - ); - return writer2; - } - } - function formatUnionTypes(types) { - const result = []; - let flags = 0; - for (let i = 0; i < types.length; i++) { - const t = types[i]; - flags |= t.flags; - if (!(t.flags & 98304 /* Nullable */)) { - if (t.flags & (512 /* BooleanLiteral */ | 1056 /* EnumLike */)) { - const baseType = t.flags & 512 /* BooleanLiteral */ ? booleanType : getBaseTypeOfEnumLikeType(t); - if (baseType.flags & 1048576 /* Union */) { - const count = baseType.types.length; - if (i + count <= types.length && getRegularTypeOfLiteralType(types[i + count - 1]) === getRegularTypeOfLiteralType(baseType.types[count - 1])) { - result.push(baseType); - i += count - 1; - continue; - } - } - } - result.push(t); - } - } - if (flags & 65536 /* Null */) - result.push(nullType); - if (flags & 32768 /* Undefined */) - result.push(undefinedType); - return result || types; - } - function visibilityToString(flags) { - if (flags === 8 /* Private */) { - return "private"; - } - if (flags === 16 /* Protected */) { - return "protected"; - } - return "public"; - } - function getTypeAliasForTypeLiteral(type) { - if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */ && type.symbol.declarations) { - const node = walkUpParenthesizedTypes(type.symbol.declarations[0].parent); - if (isTypeAliasDeclaration(node)) { - return getSymbolOfDeclaration(node); - } - } - return void 0; - } - function isTopLevelInExternalModuleAugmentation(node) { - return node && node.parent && node.parent.kind === 268 /* ModuleBlock */ && isExternalModuleAugmentation(node.parent.parent); - } - function isDefaultBindingContext(location) { - return location.kind === 312 /* SourceFile */ || isAmbientModule(location); - } - function getNameOfSymbolFromNameType(symbol, context) { - const nameType = getSymbolLinks(symbol).nameType; - if (nameType) { - if (nameType.flags & 384 /* StringOrNumberLiteral */) { - const name = "" + nameType.value; - if (!isIdentifierText(name, getEmitScriptTarget(compilerOptions)) && !isNumericLiteralName(name)) { - return `"${escapeString(name, 34 /* doubleQuote */)}"`; - } - if (isNumericLiteralName(name) && startsWith(name, "-")) { - return `[${name}]`; - } - return name; - } - if (nameType.flags & 8192 /* UniqueESSymbol */) { - return `[${getNameOfSymbolAsWritten(nameType.symbol, context)}]`; - } - } - } - function getNameOfSymbolAsWritten(symbol, context) { - if (context && symbol.escapedName === "default" /* Default */ && !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */) && // If it's not the first part of an entity name, it must print as `default` - (!(context.flags & 16777216 /* InInitialEntityName */) || // if the symbol is synthesized, it will only be referenced externally it must print as `default` - !symbol.declarations || // if not in the same binding context (source file, module declaration), it must print as `default` - context.enclosingDeclaration && findAncestor(symbol.declarations[0], isDefaultBindingContext) !== findAncestor(context.enclosingDeclaration, isDefaultBindingContext))) { - return "default"; - } - if (symbol.declarations && symbol.declarations.length) { - let declaration = firstDefined(symbol.declarations, (d) => getNameOfDeclaration(d) ? d : void 0); - const name2 = declaration && getNameOfDeclaration(declaration); - if (declaration && name2) { - if (isCallExpression(declaration) && isBindableObjectDefinePropertyCall(declaration)) { - return symbolName(symbol); - } - if (isComputedPropertyName(name2) && !(getCheckFlags(symbol) & 4096 /* Late */)) { - const nameType = getSymbolLinks(symbol).nameType; - if (nameType && nameType.flags & 384 /* StringOrNumberLiteral */) { - const result = getNameOfSymbolFromNameType(symbol, context); - if (result !== void 0) { - return result; - } - } - } - return declarationNameToString(name2); - } - if (!declaration) { - declaration = symbol.declarations[0]; - } - if (declaration.parent && declaration.parent.kind === 260 /* VariableDeclaration */) { - return declarationNameToString(declaration.parent.name); - } - switch (declaration.kind) { - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - if (context && !context.encounteredError && !(context.flags & 131072 /* AllowAnonymousIdentifier */)) { - context.encounteredError = true; - } - return declaration.kind === 231 /* ClassExpression */ ? "(Anonymous class)" : "(Anonymous function)"; - } - } - const name = getNameOfSymbolFromNameType(symbol, context); - return name !== void 0 ? name : symbolName(symbol); - } - function isDeclarationVisible(node) { - if (node) { - const links = getNodeLinks(node); - if (links.isVisible === void 0) { - links.isVisible = !!determineIfDeclarationIsVisible(); - } - return links.isVisible; - } - return false; - function determineIfDeclarationIsVisible() { - switch (node.kind) { - case 345 /* JSDocCallbackTag */: - case 353 /* JSDocTypedefTag */: - case 347 /* JSDocEnumTag */: - return !!(node.parent && node.parent.parent && node.parent.parent.parent && isSourceFile(node.parent.parent.parent)); - case 208 /* BindingElement */: - return isDeclarationVisible(node.parent.parent); - case 260 /* VariableDeclaration */: - if (isBindingPattern(node.name) && !node.name.elements.length) { - return false; - } - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 262 /* FunctionDeclaration */: - case 266 /* EnumDeclaration */: - case 271 /* ImportEqualsDeclaration */: - if (isExternalModuleAugmentation(node)) { - return true; - } - const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlagsCached(node) & 1 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 312 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { - return isGlobalSourceFile(parent2); - } - return isDeclarationVisible(parent2); - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { - return false; - } - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 169 /* Parameter */: - case 268 /* ModuleBlock */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 183 /* TypeReference */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: - return isDeclarationVisible(node.parent); - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: - case 276 /* ImportSpecifier */: - return false; - case 168 /* TypeParameter */: - case 312 /* SourceFile */: - case 270 /* NamespaceExportDeclaration */: - return true; - case 277 /* ExportAssignment */: - return false; - default: - return false; - } - } - } - function collectLinkedAliases(node, setVisibility) { - let exportSymbol; - if (node.parent && node.parent.kind === 277 /* ExportAssignment */) { - exportSymbol = resolveName( - node, - node.escapedText, - 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, - /*nameNotFoundMessage*/ - void 0, - node, - /*isUse*/ - false - ); - } else if (node.parent.kind === 281 /* ExportSpecifier */) { - exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); - } - let result; - let visited; - if (exportSymbol) { - visited = /* @__PURE__ */ new Set(); - visited.add(getSymbolId(exportSymbol)); - buildVisibleNodeList(exportSymbol.declarations); - } - return result; - function buildVisibleNodeList(declarations) { - forEach(declarations, (declaration) => { - const resultNode = getAnyImportSyntax(declaration) || declaration; - if (setVisibility) { - getNodeLinks(declaration).isVisible = true; - } else { - result = result || []; - pushIfUnique(result, resultNode); - } - if (isInternalModuleImportEqualsDeclaration(declaration)) { - const internalModuleReference = declaration.moduleReference; - const firstIdentifier = getFirstIdentifier(internalModuleReference); - const importSymbol = resolveName( - declaration, - firstIdentifier.escapedText, - 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - ); - if (importSymbol && visited) { - if (tryAddToSet(visited, getSymbolId(importSymbol))) { - buildVisibleNodeList(importSymbol.declarations); - } - } - } - }); - } - } - function pushTypeResolution(target, propertyName) { - const resolutionCycleStartIndex = findResolutionCycleStartIndex(target, propertyName); - if (resolutionCycleStartIndex >= 0) { - const { length: length2 } = resolutionTargets; - for (let i = resolutionCycleStartIndex; i < length2; i++) { - resolutionResults[i] = false; - } - return false; - } - resolutionTargets.push(target); - resolutionResults.push( - /*items*/ - true - ); - resolutionPropertyNames.push(propertyName); - return true; - } - function findResolutionCycleStartIndex(target, propertyName) { - for (let i = resolutionTargets.length - 1; i >= resolutionStart; i--) { - if (resolutionTargetHasProperty(resolutionTargets[i], resolutionPropertyNames[i])) { - return -1; - } - if (resolutionTargets[i] === target && resolutionPropertyNames[i] === propertyName) { - return i; - } - } - return -1; - } - function resolutionTargetHasProperty(target, propertyName) { - switch (propertyName) { - case 0 /* Type */: - return !!getSymbolLinks(target).type; - case 5 /* EnumTagType */: - return !!getNodeLinks(target).resolvedEnumType; - case 2 /* DeclaredType */: - return !!getSymbolLinks(target).declaredType; - case 1 /* ResolvedBaseConstructorType */: - return !!target.resolvedBaseConstructorType; - case 3 /* ResolvedReturnType */: - return !!target.resolvedReturnType; - case 4 /* ImmediateBaseConstraint */: - return !!target.immediateBaseConstraint; - case 6 /* ResolvedTypeArguments */: - return !!target.resolvedTypeArguments; - case 7 /* ResolvedBaseTypes */: - return !!target.baseTypesResolved; - case 8 /* WriteType */: - return !!getSymbolLinks(target).writeType; - case 9 /* ParameterInitializerContainsUndefined */: - return getNodeLinks(target).parameterInitializerContainsUndefined !== void 0; - } - return Debug.assertNever(propertyName); - } - function popTypeResolution() { - resolutionTargets.pop(); - resolutionPropertyNames.pop(); - return resolutionResults.pop(); - } - function getDeclarationContainer(node) { - return findAncestor(getRootDeclaration(node), (node2) => { - switch (node2.kind) { - case 260 /* VariableDeclaration */: - case 261 /* VariableDeclarationList */: - case 276 /* ImportSpecifier */: - case 275 /* NamedImports */: - case 274 /* NamespaceImport */: - case 273 /* ImportClause */: - return false; - default: - return true; - } - }).parent; - } - function getTypeOfPrototypeProperty(prototype) { - const classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype)); - return classType.typeParameters ? createTypeReference(classType, map(classType.typeParameters, (_) => anyType)) : classType; - } - function getTypeOfPropertyOfType(type, name) { - const prop = getPropertyOfType(type, name); - return prop ? getTypeOfSymbol(prop) : void 0; - } - function getTypeOfPropertyOrIndexSignature(type, name) { - var _a; - return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType; - } - function getTypeOfPropertyOrIndexSignatureOfType(type, name) { - var _a; - let propType; - return getTypeOfPropertyOfType(type, name) || (propType = (_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) && addOptionality( - propType, - /*isProperty*/ - true, - /*isOptional*/ - true - ); - } - function isTypeAny(type) { - return type && (type.flags & 1 /* Any */) !== 0; - } - function isErrorType(type) { - return type === errorType || !!(type.flags & 1 /* Any */ && type.aliasSymbol); - } - function getTypeForBindingElementParent(node, checkMode) { - if (checkMode !== 0 /* Normal */) { - return getTypeForVariableLikeDeclaration( - node, - /*includeOptionality*/ - false, - checkMode - ); - } - const symbol = getSymbolOfDeclaration(node); - return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration( - node, - /*includeOptionality*/ - false, - checkMode - ); - } - function getRestType(source, properties, symbol) { - source = filterType(source, (t) => !(t.flags & 98304 /* Nullable */)); - if (source.flags & 131072 /* Never */) { - return emptyObjectType; - } - if (source.flags & 1048576 /* Union */) { - return mapType(source, (t) => getRestType(t, properties, symbol)); - } - let omitKeyType = getUnionType(map(properties, getLiteralTypeFromPropertyName)); - const spreadableProperties = []; - const unspreadableToRestKeys = []; - for (const prop of getPropertiesOfType(source)) { - const literalTypeFromProperty = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */); - if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) && isSpreadableProperty(prop)) { - spreadableProperties.push(prop); - } else { - unspreadableToRestKeys.push(literalTypeFromProperty); - } - } - if (isGenericObjectType(source) || isGenericIndexType(omitKeyType)) { - if (unspreadableToRestKeys.length) { - omitKeyType = getUnionType([omitKeyType, ...unspreadableToRestKeys]); - } - if (omitKeyType.flags & 131072 /* Never */) { - return source; - } - const omitTypeAlias = getGlobalOmitSymbol(); - if (!omitTypeAlias) { - return errorType; - } - return getTypeAliasInstantiation(omitTypeAlias, [source, omitKeyType]); - } - const members = createSymbolTable(); - for (const prop of spreadableProperties) { - members.set(prop.escapedName, getSpreadSymbol( - prop, - /*readonly*/ - false - )); - } - const result = createAnonymousType(symbol, members, emptyArray, emptyArray, getIndexInfosOfType(source)); - result.objectFlags |= 4194304 /* ObjectRestType */; - return result; - } - function isGenericTypeWithUndefinedConstraint(type) { - return !!(type.flags & 465829888 /* Instantiable */) && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 32768 /* Undefined */); - } - function getNonUndefinedType(type) { - const typeOrConstraint = someType(type, isGenericTypeWithUndefinedConstraint) ? mapType(type, (t) => t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOrType(t) : t) : type; - return getTypeWithFacts(typeOrConstraint, 524288 /* NEUndefined */); - } - function getFlowTypeOfDestructuring(node, declaredType) { - const reference = getSyntheticElementAccess(node); - return reference ? getFlowTypeOfReference(reference, declaredType) : declaredType; - } - function getSyntheticElementAccess(node) { - const parentAccess = getParentElementAccess(node); - if (parentAccess && canHaveFlowNode(parentAccess) && parentAccess.flowNode) { - const propName = getDestructuringPropertyName(node); - if (propName) { - const literal = setTextRange(parseNodeFactory.createStringLiteral(propName), node); - const lhsExpr = isLeftHandSideExpression(parentAccess) ? parentAccess : parseNodeFactory.createParenthesizedExpression(parentAccess); - const result = setTextRange(parseNodeFactory.createElementAccessExpression(lhsExpr, literal), node); - setParent(literal, result); - setParent(result, node); - if (lhsExpr !== parentAccess) { - setParent(lhsExpr, result); - } - result.flowNode = parentAccess.flowNode; - return result; - } - } - } - function getParentElementAccess(node) { - const ancestor = node.parent.parent; - switch (ancestor.kind) { - case 208 /* BindingElement */: - case 303 /* PropertyAssignment */: - return getSyntheticElementAccess(ancestor); - case 209 /* ArrayLiteralExpression */: - return getSyntheticElementAccess(node.parent); - case 260 /* VariableDeclaration */: - return ancestor.initializer; - case 226 /* BinaryExpression */: - return ancestor.right; - } - } - function getDestructuringPropertyName(node) { - const parent2 = node.parent; - if (node.kind === 208 /* BindingElement */ && parent2.kind === 206 /* ObjectBindingPattern */) { - return getLiteralPropertyNameText(node.propertyName || node.name); - } - if (node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) { - return getLiteralPropertyNameText(node.name); - } - return "" + parent2.elements.indexOf(node); - } - function getLiteralPropertyNameText(name) { - const type = getLiteralTypeFromPropertyName(name); - return type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */) ? "" + type.value : void 0; - } - function getTypeForBindingElement(declaration) { - const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */; - const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode); - return parentType && getBindingElementTypeFromParentType(declaration, parentType); - } - function getBindingElementTypeFromParentType(declaration, parentType) { - if (isTypeAny(parentType)) { - return parentType; - } - const pattern = declaration.parent; - if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) { - parentType = getNonNullableType(parentType); - } else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) { - parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); - } - let type; - if (pattern.kind === 206 /* ObjectBindingPattern */) { - if (declaration.dotDotDotToken) { - parentType = getReducedType(parentType); - if (parentType.flags & 2 /* Unknown */ || !isValidSpreadType(parentType)) { - error2(declaration, Diagnostics.Rest_types_may_only_be_created_from_object_types); - return errorType; - } - const literalMembers = []; - for (const element of pattern.elements) { - if (!element.dotDotDotToken) { - literalMembers.push(element.propertyName || element.name); - } - } - type = getRestType(parentType, literalMembers, declaration.symbol); - } else { - const name = declaration.propertyName || declaration.name; - const indexType = getLiteralTypeFromPropertyName(name); - const declaredType = getIndexedAccessType(parentType, indexType, 32 /* ExpressionPosition */, name); - type = getFlowTypeOfDestructuring(declaration, declaredType); - } - } else { - const elementType = checkIteratedTypeOrElementType(65 /* Destructuring */ | (declaration.dotDotDotToken ? 0 : 128 /* PossiblyOutOfBounds */), parentType, undefinedType, pattern); - const index = pattern.elements.indexOf(declaration); - if (declaration.dotDotDotToken) { - const baseConstraint = mapType(parentType, (t) => t.flags & 58982400 /* InstantiableNonPrimitive */ ? getBaseConstraintOrType(t) : t); - type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType); - } else if (isArrayLikeType(parentType)) { - const indexType = getNumberLiteralType(index); - const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0); - const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType; - type = getFlowTypeOfDestructuring(declaration, declaredType); - } else { - type = elementType; - } - } - if (!declaration.initializer) { - return type; - } - if (getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration))) { - return strictNullChecks && !(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type; - } - return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0 /* Normal */)], 2 /* Subtype */)); - } - function getTypeForDeclarationFromJSDocComment(declaration) { - const jsdocType = getJSDocType(declaration); - if (jsdocType) { - return getTypeFromTypeNode(jsdocType); - } - return void 0; - } - function isNullOrUndefined3(node) { - const expr = skipParentheses( - node, - /*excludeJSDocTypeAssertions*/ - true - ); - return expr.kind === 106 /* NullKeyword */ || expr.kind === 80 /* Identifier */ && getResolvedSymbol(expr) === undefinedSymbol; - } - function isEmptyArrayLiteral2(node) { - const expr = skipParentheses( - node, - /*excludeJSDocTypeAssertions*/ - true - ); - return expr.kind === 209 /* ArrayLiteralExpression */ && expr.elements.length === 0; - } - function addOptionality(type, isProperty = false, isOptional = true) { - return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type; - } - function getTypeForVariableLikeDeclaration(declaration, includeOptionality, checkMode) { - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 249 /* ForInStatement */) { - const indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression( - declaration.parent.parent.expression, - /*checkMode*/ - checkMode - ))); - return indexType.flags & (262144 /* TypeParameter */ | 4194304 /* Index */) ? getExtractStringType(indexType) : stringType; - } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { - const forOfStatement = declaration.parent.parent; - return checkRightHandSideOfForOf(forOfStatement) || anyType; - } - if (isBindingPattern(declaration.parent)) { - return getTypeForBindingElement(declaration); - } - const isProperty = isPropertyDeclaration(declaration) && !hasAccessorModifier(declaration) || isPropertySignature(declaration) || isJSDocPropertyTag(declaration); - const isOptional = includeOptionality && isOptionalDeclaration(declaration); - const declaredType = tryGetTypeFromEffectiveTypeNode(declaration); - if (isCatchClauseVariableDeclarationOrBindingElement(declaration)) { - if (declaredType) { - return isTypeAny(declaredType) || declaredType === unknownType ? declaredType : errorType; - } - return useUnknownInCatchVariables ? unknownType : anyType; - } - if (declaredType) { - return addOptionality(declaredType, isProperty, isOptional); - } - if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 1 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { - if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) { - return autoType; - } - if (declaration.initializer && isEmptyArrayLiteral2(declaration.initializer)) { - return autoArrayType; - } - } - if (isParameter(declaration)) { - const func = declaration.parent; - if (func.kind === 178 /* SetAccessor */ && hasBindableName(func)) { - const getter = getDeclarationOfKind(getSymbolOfDeclaration(declaration.parent), 177 /* GetAccessor */); - if (getter) { - const getterSignature = getSignatureFromDeclaration(getter); - const thisParameter = getAccessorThisParameter(func); - if (thisParameter && declaration === thisParameter) { - Debug.assert(!thisParameter.type); - return getTypeOfSymbol(getterSignature.thisParameter); - } - return getReturnTypeOfSignature(getterSignature); - } - } - const parameterTypeOfTypeTag = getParameterTypeOfTypeTag(func, declaration); - if (parameterTypeOfTypeTag) - return parameterTypeOfTypeTag; - const type = declaration.symbol.escapedName === "this" /* This */ ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration); - if (type) { - return addOptionality( - type, - /*isProperty*/ - false, - isOptional - ); - } - } - if (hasOnlyExpressionInitializer(declaration) && !!declaration.initializer) { - if (isInJSFile(declaration) && !isParameter(declaration)) { - const containerObjectType = getJSContainerObjectType(declaration, getSymbolOfDeclaration(declaration), getDeclaredExpandoInitializer(declaration)); - if (containerObjectType) { - return containerObjectType; - } - } - const type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration, checkMode)); - return addOptionality(type, isProperty, isOptional); - } - if (isPropertyDeclaration(declaration) && (noImplicitAny || isInJSFile(declaration))) { - if (!hasStaticModifier(declaration)) { - const constructor = findConstructorDeclaration(declaration.parent); - const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; - return type && addOptionality( - type, - /*isProperty*/ - true, - isOptional - ); - } else { - const staticBlocks = filter(declaration.parent.members, isClassStaticBlockDeclaration); - const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; - return type && addOptionality( - type, - /*isProperty*/ - true, - isOptional - ); - } - } - if (isJsxAttribute(declaration)) { - return trueType; - } - if (isBindingPattern(declaration.name)) { - return getTypeFromBindingPattern( - declaration.name, - /*includePatternInType*/ - false, - /*reportErrors*/ - true - ); - } - return void 0; - } - function isConstructorDeclaredProperty(symbol) { - if (symbol.valueDeclaration && isBinaryExpression(symbol.valueDeclaration)) { - const links = getSymbolLinks(symbol); - if (links.isConstructorDeclaredProperty === void 0) { - links.isConstructorDeclaredProperty = false; - links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, (declaration) => isBinaryExpression(declaration) && isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== 212 /* ElementAccessExpression */ || isStringOrNumericLiteralLike(declaration.left.argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration( - /*declaredType*/ - void 0, - declaration, - symbol, - declaration - )); - } - return links.isConstructorDeclaredProperty; - } - return false; - } - function isAutoTypedProperty(symbol) { - const declaration = symbol.valueDeclaration; - return declaration && isPropertyDeclaration(declaration) && !getEffectiveTypeAnnotationNode(declaration) && !declaration.initializer && (noImplicitAny || isInJSFile(declaration)); - } - function getDeclaringConstructor(symbol) { - if (!symbol.declarations) { - return; - } - for (const declaration of symbol.declarations) { - const container = getThisContainer( - declaration, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - if (container && (container.kind === 176 /* Constructor */ || isJSConstructor(container))) { - return container; - } - } - } - function getFlowTypeFromCommonJSExport(symbol) { - const file = getSourceFileOfNode(symbol.declarations[0]); - const accessName = unescapeLeadingUnderscores(symbol.escapedName); - const areAllModuleExports = symbol.declarations.every((d) => isInJSFile(d) && isAccessExpression(d) && isModuleExportsAccessExpression(d.expression)); - const reference = areAllModuleExports ? factory.createPropertyAccessExpression(factory.createPropertyAccessExpression(factory.createIdentifier("module"), factory.createIdentifier("exports")), accessName) : factory.createPropertyAccessExpression(factory.createIdentifier("exports"), accessName); - if (areAllModuleExports) { - setParent(reference.expression.expression, reference.expression); - } - setParent(reference.expression, reference); - setParent(reference, file); - reference.flowNode = file.endFlowNode; - return getFlowTypeOfReference(reference, autoType, undefinedType); - } - function getFlowTypeInStaticBlocks(symbol, staticBlocks) { - const accessName = startsWith(symbol.escapedName, "__#") ? factory.createPrivateIdentifier(symbol.escapedName.split("@")[1]) : unescapeLeadingUnderscores(symbol.escapedName); - for (const staticBlock of staticBlocks) { - const reference = factory.createPropertyAccessExpression(factory.createThis(), accessName); - setParent(reference.expression, reference); - setParent(reference, staticBlock); - reference.flowNode = staticBlock.returnFlowNode; - const flowType = getFlowTypeOfProperty(reference, symbol); - if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) { - error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); - } - if (everyType(flowType, isNullableType)) { - continue; - } - return convertAutoToAny(flowType); - } - } - function getFlowTypeInConstructor(symbol, constructor) { - const accessName = startsWith(symbol.escapedName, "__#") ? factory.createPrivateIdentifier(symbol.escapedName.split("@")[1]) : unescapeLeadingUnderscores(symbol.escapedName); - const reference = factory.createPropertyAccessExpression(factory.createThis(), accessName); - setParent(reference.expression, reference); - setParent(reference, constructor); - reference.flowNode = constructor.returnFlowNode; - const flowType = getFlowTypeOfProperty(reference, symbol); - if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) { - error2(symbol.valueDeclaration, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); - } - return everyType(flowType, isNullableType) ? void 0 : convertAutoToAny(flowType); - } - function getFlowTypeOfProperty(reference, prop) { - const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 2 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType; - return getFlowTypeOfReference(reference, autoType, initialType); - } - function getWidenedTypeForAssignmentDeclaration(symbol, resolvedSymbol) { - const container = getAssignedExpandoInitializer(symbol.valueDeclaration); - if (container) { - const tag = isInJSFile(container) ? getJSDocTypeTag(container) : void 0; - if (tag && tag.typeExpression) { - return getTypeFromTypeNode(tag.typeExpression); - } - const containerObjectType = symbol.valueDeclaration && getJSContainerObjectType(symbol.valueDeclaration, symbol, container); - return containerObjectType || getWidenedLiteralType(checkExpressionCached(container)); - } - let type; - let definedInConstructor = false; - let definedInMethod = false; - if (isConstructorDeclaredProperty(symbol)) { - type = getFlowTypeInConstructor(symbol, getDeclaringConstructor(symbol)); - } - if (!type) { - let types; - if (symbol.declarations) { - let jsdocType; - for (const declaration of symbol.declarations) { - const expression = isBinaryExpression(declaration) || isCallExpression(declaration) ? declaration : isAccessExpression(declaration) ? isBinaryExpression(declaration.parent) ? declaration.parent : declaration : void 0; - if (!expression) { - continue; - } - const kind = isAccessExpression(expression) ? getAssignmentDeclarationPropertyAccessKind(expression) : getAssignmentDeclarationKind(expression); - if (kind === 4 /* ThisProperty */ || isBinaryExpression(expression) && isPossiblyAliasedThisProperty(expression, kind)) { - if (isDeclarationInConstructor(expression)) { - definedInConstructor = true; - } else { - definedInMethod = true; - } - } - if (!isCallExpression(expression)) { - jsdocType = getAnnotatedTypeForAssignmentDeclaration(jsdocType, expression, symbol, declaration); - } - if (!jsdocType) { - (types || (types = [])).push(isBinaryExpression(expression) || isCallExpression(expression) ? getInitializerTypeFromAssignmentDeclaration(symbol, resolvedSymbol, expression, kind) : neverType); - } - } - type = jsdocType; - } - if (!type) { - if (!length(types)) { - return errorType; - } - let constructorTypes = definedInConstructor && symbol.declarations ? getConstructorDefinedThisAssignmentTypes(types, symbol.declarations) : void 0; - if (definedInMethod) { - const propType = getTypeOfPropertyInBaseClass(symbol); - if (propType) { - (constructorTypes || (constructorTypes = [])).push(propType); - definedInConstructor = true; - } - } - const sourceTypes = some(constructorTypes, (t) => !!(t.flags & ~98304 /* Nullable */)) ? constructorTypes : types; - type = getUnionType(sourceTypes); - } - } - const widened = getWidenedType(addOptionality( - type, - /*isProperty*/ - false, - definedInMethod && !definedInConstructor - )); - if (symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && filterType(widened, (t) => !!(t.flags & ~98304 /* Nullable */)) === neverType) { - reportImplicitAny(symbol.valueDeclaration, anyType); - return anyType; - } - return widened; - } - function getJSContainerObjectType(decl, symbol, init) { - var _a, _b; - if (!isInJSFile(decl) || !init || !isObjectLiteralExpression(init) || init.properties.length) { - return void 0; - } - const exports = createSymbolTable(); - while (isBinaryExpression(decl) || isPropertyAccessExpression(decl)) { - const s2 = getSymbolOfNode(decl); - if ((_a = s2 == null ? void 0 : s2.exports) == null ? void 0 : _a.size) { - mergeSymbolTable(exports, s2.exports); - } - decl = isBinaryExpression(decl) ? decl.parent : decl.parent.parent; - } - const s = getSymbolOfNode(decl); - if ((_b = s == null ? void 0 : s.exports) == null ? void 0 : _b.size) { - mergeSymbolTable(exports, s.exports); - } - const type = createAnonymousType(symbol, exports, emptyArray, emptyArray, emptyArray); - type.objectFlags |= 4096 /* JSLiteral */; - return type; - } - function getAnnotatedTypeForAssignmentDeclaration(declaredType, expression, symbol, declaration) { - var _a; - const typeNode = getEffectiveTypeAnnotationNode(expression.parent); - if (typeNode) { - const type = getWidenedType(getTypeFromTypeNode(typeNode)); - if (!declaredType) { - return type; - } else if (!isErrorType(declaredType) && !isErrorType(type) && !isTypeIdenticalTo(declaredType, type)) { - errorNextVariableOrPropertyDeclarationMustHaveSameType( - /*firstDeclaration*/ - void 0, - declaredType, - declaration, - type - ); - } - } - if ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) { - const typeNode2 = getEffectiveTypeAnnotationNode(symbol.parent.valueDeclaration); - if (typeNode2) { - const annotationSymbol = getPropertyOfType(getTypeFromTypeNode(typeNode2), symbol.escapedName); - if (annotationSymbol) { - return getNonMissingTypeOfSymbol(annotationSymbol); - } - } - } - return declaredType; - } - function getInitializerTypeFromAssignmentDeclaration(symbol, resolvedSymbol, expression, kind) { - if (isCallExpression(expression)) { - if (resolvedSymbol) { - return getTypeOfSymbol(resolvedSymbol); - } - const objectLitType = checkExpressionCached(expression.arguments[2]); - const valueType = getTypeOfPropertyOfType(objectLitType, "value"); - if (valueType) { - return valueType; - } - const getFunc = getTypeOfPropertyOfType(objectLitType, "get"); - if (getFunc) { - const getSig = getSingleCallSignature(getFunc); - if (getSig) { - return getReturnTypeOfSignature(getSig); - } - } - const setFunc = getTypeOfPropertyOfType(objectLitType, "set"); - if (setFunc) { - const setSig = getSingleCallSignature(setFunc); - if (setSig) { - return getTypeOfFirstParameterOfSignature(setSig); - } - } - return anyType; - } - if (containsSameNamedThisProperty(expression.left, expression.right)) { - return anyType; - } - const isDirectExport = kind === 1 /* ExportsProperty */ && (isPropertyAccessExpression(expression.left) || isElementAccessExpression(expression.left)) && (isModuleExportsAccessExpression(expression.left.expression) || isIdentifier(expression.left.expression) && isExportsIdentifier(expression.left.expression)); - const type = resolvedSymbol ? getTypeOfSymbol(resolvedSymbol) : isDirectExport ? getRegularTypeOfLiteralType(checkExpressionCached(expression.right)) : getWidenedLiteralType(checkExpressionCached(expression.right)); - if (type.flags & 524288 /* Object */ && kind === 2 /* ModuleExports */ && symbol.escapedName === "export=" /* ExportEquals */) { - const exportedType = resolveStructuredTypeMembers(type); - const members = createSymbolTable(); - copyEntries(exportedType.members, members); - const initialSize = members.size; - if (resolvedSymbol && !resolvedSymbol.exports) { - resolvedSymbol.exports = createSymbolTable(); - } - (resolvedSymbol || symbol).exports.forEach((s, name) => { - var _a; - const exportedMember = members.get(name); - if (exportedMember && exportedMember !== s && !(s.flags & 2097152 /* Alias */)) { - if (s.flags & 111551 /* Value */ && exportedMember.flags & 111551 /* Value */) { - if (s.valueDeclaration && exportedMember.valueDeclaration && getSourceFileOfNode(s.valueDeclaration) !== getSourceFileOfNode(exportedMember.valueDeclaration)) { - const unescapedName = unescapeLeadingUnderscores(s.escapedName); - const exportedMemberName = ((_a = tryCast(exportedMember.valueDeclaration, isNamedDeclaration)) == null ? void 0 : _a.name) || exportedMember.valueDeclaration; - addRelatedInfo( - error2(s.valueDeclaration, Diagnostics.Duplicate_identifier_0, unescapedName), - createDiagnosticForNode(exportedMemberName, Diagnostics._0_was_also_declared_here, unescapedName) - ); - addRelatedInfo( - error2(exportedMemberName, Diagnostics.Duplicate_identifier_0, unescapedName), - createDiagnosticForNode(s.valueDeclaration, Diagnostics._0_was_also_declared_here, unescapedName) - ); - } - const union = createSymbol(s.flags | exportedMember.flags, name); - union.links.type = getUnionType([getTypeOfSymbol(s), getTypeOfSymbol(exportedMember)]); - union.valueDeclaration = exportedMember.valueDeclaration; - union.declarations = concatenate(exportedMember.declarations, s.declarations); - members.set(name, union); - } else { - members.set(name, mergeSymbol(s, exportedMember)); - } - } else { - members.set(name, s); - } - }); - const result = createAnonymousType( - initialSize !== members.size ? void 0 : exportedType.symbol, - // Only set the type's symbol if it looks to be the same as the original type - members, - exportedType.callSignatures, - exportedType.constructSignatures, - exportedType.indexInfos - ); - if (initialSize === members.size) { - if (type.aliasSymbol) { - result.aliasSymbol = type.aliasSymbol; - result.aliasTypeArguments = type.aliasTypeArguments; - } - if (getObjectFlags(type) & 4 /* Reference */) { - result.aliasSymbol = type.symbol; - const args = getTypeArguments(type); - result.aliasTypeArguments = length(args) ? args : void 0; - } - } - result.objectFlags |= getObjectFlags(type) & 4096 /* JSLiteral */; - if (result.symbol && result.symbol.flags & 32 /* Class */ && type === getDeclaredTypeOfClassOrInterface(result.symbol)) { - result.objectFlags |= 16777216 /* IsClassInstanceClone */; - } - return result; - } - if (isEmptyArrayLiteralType(type)) { - reportImplicitAny(expression, anyArrayType); - return anyArrayType; - } - return type; - } - function containsSameNamedThisProperty(thisProperty, expression) { - return isPropertyAccessExpression(thisProperty) && thisProperty.expression.kind === 110 /* ThisKeyword */ && forEachChildRecursively(expression, (n) => isMatchingReference(thisProperty, n)); - } - function isDeclarationInConstructor(expression) { - const thisContainer = getThisContainer( - expression, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - return thisContainer.kind === 176 /* Constructor */ || thisContainer.kind === 262 /* FunctionDeclaration */ || thisContainer.kind === 218 /* FunctionExpression */ && !isPrototypePropertyAssignment(thisContainer.parent); - } - function getConstructorDefinedThisAssignmentTypes(types, declarations) { - Debug.assert(types.length === declarations.length); - return types.filter((_, i) => { - const declaration = declarations[i]; - const expression = isBinaryExpression(declaration) ? declaration : isBinaryExpression(declaration.parent) ? declaration.parent : void 0; - return expression && isDeclarationInConstructor(expression); - }); - } - function getTypeFromBindingElement(element, includePatternInType, reportErrors2) { - if (element.initializer) { - const contextualType = isBindingPattern(element.name) ? getTypeFromBindingPattern( - element.name, - /*includePatternInType*/ - true, - /*reportErrors*/ - false - ) : unknownType; - return addOptionality(widenTypeInferredFromInitializer(element, checkDeclarationInitializer(element, 0 /* Normal */, contextualType))); - } - if (isBindingPattern(element.name)) { - return getTypeFromBindingPattern(element.name, includePatternInType, reportErrors2); - } - if (reportErrors2 && !declarationBelongsToPrivateAmbientMember(element)) { - reportImplicitAny(element, anyType); - } - return includePatternInType ? nonInferrableAnyType : anyType; - } - function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) { - const members = createSymbolTable(); - let stringIndexInfo; - let objectFlags = 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */; - forEach(pattern.elements, (e) => { - const name = e.propertyName || e.name; - if (e.dotDotDotToken) { - stringIndexInfo = createIndexInfo( - stringType, - anyType, - /*isReadonly*/ - false - ); - return; - } - const exprType = getLiteralTypeFromPropertyName(name); - if (!isTypeUsableAsPropertyName(exprType)) { - objectFlags |= 512 /* ObjectLiteralPatternWithComputedProperties */; - return; - } - const text = getPropertyNameFromType(exprType); - const flags = 4 /* Property */ | (e.initializer ? 16777216 /* Optional */ : 0); - const symbol = createSymbol(flags, text); - symbol.links.type = getTypeFromBindingElement(e, includePatternInType, reportErrors2); - symbol.links.bindingElement = e; - members.set(symbol.escapedName, symbol); - }); - const result = createAnonymousType( - /*symbol*/ - void 0, - members, - emptyArray, - emptyArray, - stringIndexInfo ? [stringIndexInfo] : emptyArray - ); - result.objectFlags |= objectFlags; - if (includePatternInType) { - result.pattern = pattern; - result.objectFlags |= 131072 /* ContainsObjectOrArrayLiteral */; - } - return result; - } - function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2) { - const elements = pattern.elements; - const lastElement = lastOrUndefined(elements); - const restElement = lastElement && lastElement.kind === 208 /* BindingElement */ && lastElement.dotDotDotToken ? lastElement : void 0; - if (elements.length === 0 || elements.length === 1 && restElement) { - return languageVersion >= 2 /* ES2015 */ ? createIterableType(anyType) : anyArrayType; - } - const elementTypes = map(elements, (e) => isOmittedExpression(e) ? anyType : getTypeFromBindingElement(e, includePatternInType, reportErrors2)); - const minLength = findLastIndex(elements, (e) => !(e === restElement || isOmittedExpression(e) || hasDefaultValue(e)), elements.length - 1) + 1; - const elementFlags = map(elements, (e, i) => e === restElement ? 4 /* Rest */ : i >= minLength ? 2 /* Optional */ : 1 /* Required */); - let result = createTupleType(elementTypes, elementFlags); - if (includePatternInType) { - result = cloneTypeReference(result); - result.pattern = pattern; - result.objectFlags |= 131072 /* ContainsObjectOrArrayLiteral */; - } - return result; - } - function getTypeFromBindingPattern(pattern, includePatternInType = false, reportErrors2 = false) { - return pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors2) : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors2); - } - function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors2) { - return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration( - declaration, - /*includeOptionality*/ - true, - 0 /* Normal */ - ), declaration, reportErrors2); - } - function isGlobalSymbolConstructor(node) { - const symbol = getSymbolOfNode(node); - const globalSymbol = getGlobalESSymbolConstructorTypeSymbol( - /*reportErrors*/ - false - ); - return globalSymbol && symbol && symbol === globalSymbol; - } - function widenTypeForVariableLikeDeclaration(type, declaration, reportErrors2) { - if (type) { - if (type.flags & 4096 /* ESSymbol */ && isGlobalSymbolConstructor(declaration.parent)) { - type = getESSymbolLikeTypeForNode(declaration); - } - if (reportErrors2) { - reportErrorsFromWidening(declaration, type); - } - if (type.flags & 8192 /* UniqueESSymbol */ && (isBindingElement(declaration) || !declaration.type) && type.symbol !== getSymbolOfDeclaration(declaration)) { - type = esSymbolType; - } - return getWidenedType(type); - } - type = isParameter(declaration) && declaration.dotDotDotToken ? anyArrayType : anyType; - if (reportErrors2) { - if (!declarationBelongsToPrivateAmbientMember(declaration)) { - reportImplicitAny(declaration, type); - } - } - return type; - } - function declarationBelongsToPrivateAmbientMember(declaration) { - const root = getRootDeclaration(declaration); - const memberDeclaration = root.kind === 169 /* Parameter */ ? root.parent : root; - return isPrivateWithinAmbient(memberDeclaration); - } - function tryGetTypeFromEffectiveTypeNode(node) { - const typeNode = getEffectiveTypeAnnotationNode(node); - if (typeNode) { - return getTypeFromTypeNode(typeNode); - } - } - function isParameterOfContextSensitiveSignature(symbol) { - let decl = symbol.valueDeclaration; - if (!decl) { - return false; - } - if (isBindingElement(decl)) { - decl = walkUpBindingElementsAndPatterns(decl); - } - if (isParameter(decl)) { - return isContextSensitiveFunctionOrObjectLiteralMethod(decl.parent); - } - return false; - } - function getTypeOfVariableOrParameterOrProperty(symbol) { - const links = getSymbolLinks(symbol); - if (!links.type) { - const type = getTypeOfVariableOrParameterOrPropertyWorker(symbol); - if (!links.type && !isParameterOfContextSensitiveSignature(symbol)) { - links.type = type; - } - return type; - } - return links.type; - } - function getTypeOfVariableOrParameterOrPropertyWorker(symbol) { - if (symbol.flags & 4194304 /* Prototype */) { - return getTypeOfPrototypeProperty(symbol); - } - if (symbol === requireSymbol) { - return anyType; - } - if (symbol.flags & 134217728 /* ModuleExports */ && symbol.valueDeclaration) { - const fileSymbol = getSymbolOfDeclaration(getSourceFileOfNode(symbol.valueDeclaration)); - const result = createSymbol(fileSymbol.flags, "exports"); - result.declarations = fileSymbol.declarations ? fileSymbol.declarations.slice() : []; - result.parent = symbol; - result.links.target = fileSymbol; - if (fileSymbol.valueDeclaration) - result.valueDeclaration = fileSymbol.valueDeclaration; - if (fileSymbol.members) - result.members = new Map(fileSymbol.members); - if (fileSymbol.exports) - result.exports = new Map(fileSymbol.exports); - const members = createSymbolTable(); - members.set("exports", result); - return createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray); - } - Debug.assertIsDefined(symbol.valueDeclaration); - const declaration = symbol.valueDeclaration; - if (isSourceFile(declaration) && isJsonSourceFile(declaration)) { - if (!declaration.statements.length) { - return emptyObjectType; - } - return getWidenedType(getWidenedLiteralType(checkExpression(declaration.statements[0].expression))); - } - if (isAccessor(declaration)) { - return getTypeOfAccessors(symbol); - } - if (!pushTypeResolution(symbol, 0 /* Type */)) { - if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { - return getTypeOfFuncClassEnumModule(symbol); - } - return reportCircularityError(symbol); - } - let type; - if (declaration.kind === 277 /* ExportAssignment */) { - type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration); - } else if (isBinaryExpression(declaration) || isInJSFile(declaration) && (isCallExpression(declaration) || (isPropertyAccessExpression(declaration) || isBindableStaticElementAccessExpression(declaration)) && isBinaryExpression(declaration.parent))) { - type = getWidenedTypeForAssignmentDeclaration(symbol); - } else if (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isIdentifier(declaration) || isStringLiteralLike(declaration) || isNumericLiteral(declaration) || isClassDeclaration(declaration) || isFunctionDeclaration(declaration) || isMethodDeclaration(declaration) && !isObjectLiteralMethod(declaration) || isMethodSignature(declaration) || isSourceFile(declaration)) { - if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) { - return getTypeOfFuncClassEnumModule(symbol); - } - type = isBinaryExpression(declaration.parent) ? getWidenedTypeForAssignmentDeclaration(symbol) : tryGetTypeFromEffectiveTypeNode(declaration) || anyType; - } else if (isPropertyAssignment(declaration)) { - type = tryGetTypeFromEffectiveTypeNode(declaration) || checkPropertyAssignment(declaration); - } else if (isJsxAttribute(declaration)) { - type = tryGetTypeFromEffectiveTypeNode(declaration) || checkJsxAttribute(declaration); - } else if (isShorthandPropertyAssignment(declaration)) { - type = tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionForMutableLocation(declaration.name, 0 /* Normal */); - } else if (isObjectLiteralMethod(declaration)) { - type = tryGetTypeFromEffectiveTypeNode(declaration) || checkObjectLiteralMethod(declaration, 0 /* Normal */); - } else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) { - type = getWidenedTypeForVariableLikeDeclaration( - declaration, - /*reportErrors*/ - true - ); - } else if (isEnumDeclaration(declaration)) { - type = getTypeOfFuncClassEnumModule(symbol); - } else if (isEnumMember(declaration)) { - type = getTypeOfEnumMember(symbol); - } else { - return Debug.fail("Unhandled declaration kind! " + Debug.formatSyntaxKind(declaration.kind) + " for " + Debug.formatSymbol(symbol)); - } - if (!popTypeResolution()) { - if (symbol.flags & 512 /* ValueModule */ && !(symbol.flags & 67108864 /* Assignment */)) { - return getTypeOfFuncClassEnumModule(symbol); - } - return reportCircularityError(symbol); - } - return type; - } - function getAnnotatedAccessorTypeNode(accessor) { - if (accessor) { - switch (accessor.kind) { - case 177 /* GetAccessor */: - const getterTypeAnnotation = getEffectiveReturnTypeNode(accessor); - return getterTypeAnnotation; - case 178 /* SetAccessor */: - const setterTypeAnnotation = getEffectiveSetAccessorTypeAnnotationNode(accessor); - return setterTypeAnnotation; - case 172 /* PropertyDeclaration */: - Debug.assert(hasAccessorModifier(accessor)); - const accessorTypeAnnotation = getEffectiveTypeAnnotationNode(accessor); - return accessorTypeAnnotation; - } - } - return void 0; - } - function getAnnotatedAccessorType(accessor) { - const node = getAnnotatedAccessorTypeNode(accessor); - return node && getTypeFromTypeNode(node); - } - function getAnnotatedAccessorThisParameter(accessor) { - const parameter = getAccessorThisParameter(accessor); - return parameter && parameter.symbol; - } - function getThisTypeOfDeclaration(declaration) { - return getThisTypeOfSignature(getSignatureFromDeclaration(declaration)); - } - function getTypeOfAccessors(symbol) { - const links = getSymbolLinks(symbol); - if (!links.type) { - if (!pushTypeResolution(symbol, 0 /* Type */)) { - return errorType; - } - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); - const accessor = tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); - let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration( - accessor, - /*reportErrors*/ - true - ); - if (!type) { - if (setter && !isPrivateWithinAmbient(setter)) { - errorOrSuggestion(noImplicitAny, setter, Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol)); - } else if (getter && !isPrivateWithinAmbient(getter)) { - errorOrSuggestion(noImplicitAny, getter, Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol)); - } else if (accessor && !isPrivateWithinAmbient(accessor)) { - errorOrSuggestion(noImplicitAny, accessor, Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), "any"); - } - type = anyType; - } - if (!popTypeResolution()) { - if (getAnnotatedAccessorTypeNode(getter)) { - error2(getter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); - } else if (getAnnotatedAccessorTypeNode(setter)) { - error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); - } else if (getAnnotatedAccessorTypeNode(accessor)) { - error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); - } else if (getter && noImplicitAny) { - error2(getter, 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, symbolToString(symbol)); - } - type = anyType; - } - links.type = type; - } - return links.type; - } - function getWriteTypeOfAccessors(symbol) { - const links = getSymbolLinks(symbol); - if (!links.writeType) { - if (!pushTypeResolution(symbol, 8 /* WriteType */)) { - return errorType; - } - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */) ?? tryCast(getDeclarationOfKind(symbol, 172 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration); - let writeType = getAnnotatedAccessorType(setter); - if (!popTypeResolution()) { - if (getAnnotatedAccessorTypeNode(setter)) { - error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); - } - writeType = anyType; - } - links.writeType = writeType || getTypeOfAccessors(symbol); - } - return links.writeType; - } - function getBaseTypeVariableOfClass(symbol) { - const baseConstructorType = getBaseConstructorTypeOfClass(getDeclaredTypeOfClassOrInterface(symbol)); - return baseConstructorType.flags & 8650752 /* TypeVariable */ ? baseConstructorType : baseConstructorType.flags & 2097152 /* Intersection */ ? find(baseConstructorType.types, (t) => !!(t.flags & 8650752 /* TypeVariable */)) : void 0; - } - function getTypeOfFuncClassEnumModule(symbol) { - let links = getSymbolLinks(symbol); - const originalLinks = links; - if (!links.type) { - const expando = symbol.valueDeclaration && getSymbolOfExpando( - symbol.valueDeclaration, - /*allowDeclaration*/ - false - ); - if (expando) { - const merged = mergeJSSymbols(symbol, expando); - if (merged) { - symbol = merged; - links = merged.links; - } - } - originalLinks.type = links.type = getTypeOfFuncClassEnumModuleWorker(symbol); - } - return links.type; - } - function getTypeOfFuncClassEnumModuleWorker(symbol) { - const declaration = symbol.valueDeclaration; - if (symbol.flags & 1536 /* Module */ && isShorthandAmbientModuleSymbol(symbol)) { - return anyType; - } else if (declaration && (declaration.kind === 226 /* BinaryExpression */ || isAccessExpression(declaration) && declaration.parent.kind === 226 /* BinaryExpression */)) { - return getWidenedTypeForAssignmentDeclaration(symbol); - } else if (symbol.flags & 512 /* ValueModule */ && declaration && isSourceFile(declaration) && declaration.commonJsModuleIndicator) { - const resolvedModule = resolveExternalModuleSymbol(symbol); - if (resolvedModule !== symbol) { - if (!pushTypeResolution(symbol, 0 /* Type */)) { - return errorType; - } - const exportEquals = getMergedSymbol(symbol.exports.get("export=" /* ExportEquals */)); - const type2 = getWidenedTypeForAssignmentDeclaration(exportEquals, exportEquals === resolvedModule ? void 0 : resolvedModule); - if (!popTypeResolution()) { - return reportCircularityError(symbol); - } - return type2; - } - } - const type = createObjectType(16 /* Anonymous */, symbol); - if (symbol.flags & 32 /* Class */) { - const baseTypeVariable = getBaseTypeVariableOfClass(symbol); - return baseTypeVariable ? getIntersectionType([type, baseTypeVariable]) : type; - } else { - return strictNullChecks && symbol.flags & 16777216 /* Optional */ ? getOptionalType( - type, - /*isProperty*/ - true - ) : type; - } - } - function getTypeOfEnumMember(symbol) { - const links = getSymbolLinks(symbol); - return links.type || (links.type = getDeclaredTypeOfEnumMember(symbol)); - } - function getTypeOfAlias(symbol) { - const links = getSymbolLinks(symbol); - if (!links.type) { - const targetSymbol = resolveAlias(symbol); - const exportSymbol = symbol.declarations && getTargetOfAliasDeclaration( - getDeclarationOfAliasSymbol(symbol), - /*dontRecursivelyResolve*/ - true - ); - const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); - links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; - } - return links.type; - } - function getTypeOfInstantiatedSymbol(symbol) { - const links = getSymbolLinks(symbol); - return links.type || (links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper)); - } - function getWriteTypeOfInstantiatedSymbol(symbol) { - const links = getSymbolLinks(symbol); - return links.writeType || (links.writeType = instantiateType(getWriteTypeOfSymbol(links.target), links.mapper)); - } - function reportCircularityError(symbol) { - const declaration = symbol.valueDeclaration; - if (getEffectiveTypeAnnotationNode(declaration)) { - error2( - symbol.valueDeclaration, - Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, - symbolToString(symbol) - ); - return errorType; - } - if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { - error2( - symbol.valueDeclaration, - Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, - symbolToString(symbol) - ); - } - return anyType; - } - function getTypeOfSymbolWithDeferredType(symbol) { - const links = getSymbolLinks(symbol); - if (!links.type) { - Debug.assertIsDefined(links.deferralParent); - Debug.assertIsDefined(links.deferralConstituents); - links.type = links.deferralParent.flags & 1048576 /* Union */ ? getUnionType(links.deferralConstituents) : getIntersectionType(links.deferralConstituents); - } - return links.type; - } - function getWriteTypeOfSymbolWithDeferredType(symbol) { - const links = getSymbolLinks(symbol); - if (!links.writeType && links.deferralWriteConstituents) { - Debug.assertIsDefined(links.deferralParent); - Debug.assertIsDefined(links.deferralConstituents); - links.writeType = links.deferralParent.flags & 1048576 /* Union */ ? getUnionType(links.deferralWriteConstituents) : getIntersectionType(links.deferralWriteConstituents); - } - return links.writeType; - } - function getWriteTypeOfSymbol(symbol) { - const checkFlags = getCheckFlags(symbol); - if (symbol.flags & 4 /* Property */) { - return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : ( - // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty - symbol.links.writeType || symbol.links.type - ) : getTypeOfSymbol(symbol); - } - if (symbol.flags & 98304 /* Accessor */) { - return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol); - } - return getTypeOfSymbol(symbol); - } - function getTypeOfSymbol(symbol) { - const checkFlags = getCheckFlags(symbol); - if (checkFlags & 65536 /* DeferredType */) { - return getTypeOfSymbolWithDeferredType(symbol); - } - if (checkFlags & 1 /* Instantiated */) { - return getTypeOfInstantiatedSymbol(symbol); - } - if (checkFlags & 262144 /* Mapped */) { - return getTypeOfMappedSymbol(symbol); - } - if (checkFlags & 8192 /* ReverseMapped */) { - return getTypeOfReverseMappedSymbol(symbol); - } - if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) { - return getTypeOfVariableOrParameterOrProperty(symbol); - } - if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) { - return getTypeOfFuncClassEnumModule(symbol); - } - if (symbol.flags & 8 /* EnumMember */) { - return getTypeOfEnumMember(symbol); - } - if (symbol.flags & 98304 /* Accessor */) { - return getTypeOfAccessors(symbol); - } - if (symbol.flags & 2097152 /* Alias */) { - return getTypeOfAlias(symbol); - } - return errorType; - } - function getNonMissingTypeOfSymbol(symbol) { - return removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */)); - } - function isReferenceToType2(type, target) { - return type !== void 0 && target !== void 0 && (getObjectFlags(type) & 4 /* Reference */) !== 0 && type.target === target; - } - function getTargetType(type) { - return getObjectFlags(type) & 4 /* Reference */ ? type.target : type; - } - function hasBaseType(type, checkBase) { - return check(type); - function check(type2) { - if (getObjectFlags(type2) & (3 /* ClassOrInterface */ | 4 /* Reference */)) { - const target = getTargetType(type2); - return target === checkBase || some(getBaseTypes(target), check); - } else if (type2.flags & 2097152 /* Intersection */) { - return some(type2.types, check); - } - return false; - } - } - function appendTypeParameters(typeParameters, declarations) { - for (const declaration of declarations) { - typeParameters = appendIfUnique(typeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(declaration))); - } - return typeParameters; - } - function getOuterTypeParameters(node, includeThisTypes) { - while (true) { - node = node.parent; - if (node && isBinaryExpression(node)) { - const assignmentKind = getAssignmentDeclarationKind(node); - if (assignmentKind === 6 /* Prototype */ || assignmentKind === 3 /* PrototypeProperty */) { - const symbol = getSymbolOfDeclaration(node.left); - if (symbol && symbol.parent && !findAncestor(symbol.parent.valueDeclaration, (d) => node === d)) { - node = symbol.parent.valueDeclaration; - } - } - } - if (!node) { - return void 0; - } - switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 173 /* MethodSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 324 /* JSDocFunctionType */: - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 265 /* TypeAliasDeclaration */: - case 352 /* JSDocTemplateTag */: - case 353 /* JSDocTypedefTag */: - case 347 /* JSDocEnumTag */: - case 345 /* JSDocCallbackTag */: - case 200 /* MappedType */: - case 194 /* ConditionalType */: { - const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - if (node.kind === 200 /* MappedType */) { - return append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter))); - } else if (node.kind === 194 /* ConditionalType */) { - return concatenate(outerTypeParameters, getInferTypeParameters(node)); - } - const outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, getEffectiveTypeParameterDeclarations(node)); - const thisType = includeThisTypes && (node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || node.kind === 264 /* InterfaceDeclaration */ || isJSConstructor(node)) && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node)).thisType; - return thisType ? append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters; - } - case 348 /* JSDocParameterTag */: - const paramSymbol = getParameterSymbolFromJSDoc(node); - if (paramSymbol) { - node = paramSymbol.valueDeclaration; - } - break; - case 327 /* JSDoc */: { - const outerTypeParameters = getOuterTypeParameters(node, includeThisTypes); - return node.tags ? appendTypeParameters(outerTypeParameters, flatMap(node.tags, (t) => isJSDocTemplateTag(t) ? t.typeParameters : void 0)) : outerTypeParameters; - } - } - } - } - function getOuterTypeParametersOfClassOrInterface(symbol) { - var _a; - const declaration = symbol.flags & 32 /* Class */ || symbol.flags & 16 /* Function */ ? symbol.valueDeclaration : (_a = symbol.declarations) == null ? void 0 : _a.find((decl) => { - if (decl.kind === 264 /* InterfaceDeclaration */) { - return true; - } - if (decl.kind !== 260 /* VariableDeclaration */) { - return false; - } - const initializer = decl.initializer; - return !!initializer && (initializer.kind === 218 /* FunctionExpression */ || initializer.kind === 219 /* ArrowFunction */); - }); - Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations"); - return getOuterTypeParameters(declaration); - } - function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) { - if (!symbol.declarations) { - return; - } - let result; - for (const node of symbol.declarations) { - if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */ || isJSConstructor(node) || isTypeAlias(node)) { - const declaration = node; - result = appendTypeParameters(result, getEffectiveTypeParameterDeclarations(declaration)); - } - } - return result; - } - function getTypeParametersOfClassOrInterface(symbol) { - return concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol)); - } - function isMixinConstructorType(type) { - const signatures = getSignaturesOfType(type, 1 /* Construct */); - if (signatures.length === 1) { - const s = signatures[0]; - if (!s.typeParameters && s.parameters.length === 1 && signatureHasRestParameter(s)) { - const paramType = getTypeOfParameter(s.parameters[0]); - return isTypeAny(paramType) || getElementTypeOfArrayType(paramType) === anyType; - } - } - return false; - } - function isConstructorType(type) { - if (getSignaturesOfType(type, 1 /* Construct */).length > 0) { - return true; - } - if (type.flags & 8650752 /* TypeVariable */) { - const constraint = getBaseConstraintOfType(type); - return !!constraint && isMixinConstructorType(constraint); - } - return false; - } - function getBaseTypeNodeOfClass(type) { - const decl = getClassLikeDeclarationOfSymbol(type.symbol); - return decl && getEffectiveBaseTypeNode(decl); - } - function getConstructorsForTypeArguments(type, typeArgumentNodes, location) { - const typeArgCount = length(typeArgumentNodes); - const isJavascript = isInJSFile(location); - return filter( - getSignaturesOfType(type, 1 /* Construct */), - (sig) => (isJavascript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= length(sig.typeParameters) - ); - } - function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) { - const signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location); - const typeArguments = map(typeArgumentNodes, getTypeFromTypeNode); - return sameMap(signatures, (sig) => some(sig.typeParameters) ? getSignatureInstantiation(sig, typeArguments, isInJSFile(location)) : sig); - } - function getBaseConstructorTypeOfClass(type) { - if (!type.resolvedBaseConstructorType) { - const decl = getClassLikeDeclarationOfSymbol(type.symbol); - const extended = decl && getEffectiveBaseTypeNode(decl); - const baseTypeNode = getBaseTypeNodeOfClass(type); - if (!baseTypeNode) { - return type.resolvedBaseConstructorType = undefinedType; - } - if (!pushTypeResolution(type, 1 /* ResolvedBaseConstructorType */)) { - return errorType; - } - const baseConstructorType = checkExpression(baseTypeNode.expression); - if (extended && baseTypeNode !== extended) { - Debug.assert(!extended.typeArguments); - checkExpression(extended.expression); - } - if (baseConstructorType.flags & (524288 /* Object */ | 2097152 /* Intersection */)) { - resolveStructuredTypeMembers(baseConstructorType); - } - if (!popTypeResolution()) { - error2(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol)); - return type.resolvedBaseConstructorType = errorType; - } - if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) { - const err = error2(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType)); - if (baseConstructorType.flags & 262144 /* TypeParameter */) { - const constraint = getConstraintFromTypeParameter(baseConstructorType); - let ctorReturn = unknownType; - if (constraint) { - const ctorSig = getSignaturesOfType(constraint, 1 /* Construct */); - if (ctorSig[0]) { - ctorReturn = getReturnTypeOfSignature(ctorSig[0]); - } - } - if (baseConstructorType.symbol.declarations) { - addRelatedInfo(err, createDiagnosticForNode(baseConstructorType.symbol.declarations[0], Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, symbolToString(baseConstructorType.symbol), typeToString(ctorReturn))); - } - } - return type.resolvedBaseConstructorType = errorType; - } - type.resolvedBaseConstructorType = baseConstructorType; - } - return type.resolvedBaseConstructorType; - } - function getImplementsTypes(type) { - let resolvedImplementsTypes = emptyArray; - if (type.symbol.declarations) { - for (const declaration of type.symbol.declarations) { - const implementsTypeNodes = getEffectiveImplementsTypeNodes(declaration); - if (!implementsTypeNodes) - continue; - for (const node of implementsTypeNodes) { - const implementsType = getTypeFromTypeNode(node); - if (!isErrorType(implementsType)) { - if (resolvedImplementsTypes === emptyArray) { - resolvedImplementsTypes = [implementsType]; - } else { - resolvedImplementsTypes.push(implementsType); - } - } - } - } - } - return resolvedImplementsTypes; - } - function reportCircularBaseType(node, type) { - error2(node, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 2 /* WriteArrayAsGenericType */ - )); - } - function getBaseTypes(type) { - if (!type.baseTypesResolved) { - if (pushTypeResolution(type, 7 /* ResolvedBaseTypes */)) { - if (type.objectFlags & 8 /* Tuple */) { - type.resolvedBaseTypes = [getTupleBaseType(type)]; - } else if (type.symbol.flags & (32 /* Class */ | 64 /* Interface */)) { - if (type.symbol.flags & 32 /* Class */) { - resolveBaseTypesOfClass(type); - } - if (type.symbol.flags & 64 /* Interface */) { - resolveBaseTypesOfInterface(type); - } - } else { - Debug.fail("type must be class or interface"); - } - if (!popTypeResolution() && type.symbol.declarations) { - for (const declaration of type.symbol.declarations) { - if (declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 264 /* InterfaceDeclaration */) { - reportCircularBaseType(declaration, type); - } - } - } - } - type.baseTypesResolved = true; - } - return type.resolvedBaseTypes; - } - function getTupleBaseType(type) { - const elementTypes = sameMap(type.typeParameters, (t, i) => type.elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t); - return createArrayType(getUnionType(elementTypes || emptyArray), type.readonly); - } - function resolveBaseTypesOfClass(type) { - type.resolvedBaseTypes = resolvingEmptyArray; - const baseConstructorType = getApparentType(getBaseConstructorTypeOfClass(type)); - if (!(baseConstructorType.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 1 /* Any */))) { - return type.resolvedBaseTypes = emptyArray; - } - const baseTypeNode = getBaseTypeNodeOfClass(type); - let baseType; - const originalBaseType = baseConstructorType.symbol ? getDeclaredTypeOfSymbol(baseConstructorType.symbol) : void 0; - if (baseConstructorType.symbol && baseConstructorType.symbol.flags & 32 /* Class */ && areAllOuterTypeParametersApplied(originalBaseType)) { - baseType = getTypeFromClassOrInterfaceReference(baseTypeNode, baseConstructorType.symbol); - } else if (baseConstructorType.flags & 1 /* Any */) { - baseType = baseConstructorType; - } else { - const constructors = getInstantiatedConstructorsForTypeArguments(baseConstructorType, baseTypeNode.typeArguments, baseTypeNode); - if (!constructors.length) { - error2(baseTypeNode.expression, Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments); - return type.resolvedBaseTypes = emptyArray; - } - baseType = getReturnTypeOfSignature(constructors[0]); - } - if (isErrorType(baseType)) { - return type.resolvedBaseTypes = emptyArray; - } - const reducedBaseType = getReducedType(baseType); - if (!isValidBaseType(reducedBaseType)) { - const elaboration = elaborateNeverIntersection( - /*errorInfo*/ - void 0, - baseType - ); - const diagnostic = chainDiagnosticMessages(elaboration, Diagnostics.Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members, typeToString(reducedBaseType)); - diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(baseTypeNode.expression), baseTypeNode.expression, diagnostic)); - return type.resolvedBaseTypes = emptyArray; - } - if (type === reducedBaseType || hasBaseType(reducedBaseType, type)) { - error2( - type.symbol.valueDeclaration, - Diagnostics.Type_0_recursively_references_itself_as_a_base_type, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 2 /* WriteArrayAsGenericType */ - ) - ); - return type.resolvedBaseTypes = emptyArray; - } - if (type.resolvedBaseTypes === resolvingEmptyArray) { - type.members = void 0; - } - return type.resolvedBaseTypes = [reducedBaseType]; - } - function areAllOuterTypeParametersApplied(type) { - const outerTypeParameters = type.outerTypeParameters; - if (outerTypeParameters) { - const last2 = outerTypeParameters.length - 1; - const typeArguments = getTypeArguments(type); - return outerTypeParameters[last2].symbol !== typeArguments[last2].symbol; - } - return true; - } - function isValidBaseType(type) { - if (type.flags & 262144 /* TypeParameter */) { - const constraint = getBaseConstraintOfType(type); - if (constraint) { - return isValidBaseType(constraint); - } - } - return !!(type.flags & (524288 /* Object */ | 67108864 /* NonPrimitive */ | 1 /* Any */) && !isGenericMappedType(type) || type.flags & 2097152 /* Intersection */ && every(type.types, isValidBaseType)); - } - function resolveBaseTypesOfInterface(type) { - type.resolvedBaseTypes = type.resolvedBaseTypes || emptyArray; - if (type.symbol.declarations) { - for (const declaration of type.symbol.declarations) { - if (declaration.kind === 264 /* InterfaceDeclaration */ && getInterfaceBaseTypeNodes(declaration)) { - for (const node of getInterfaceBaseTypeNodes(declaration)) { - const baseType = getReducedType(getTypeFromTypeNode(node)); - if (!isErrorType(baseType)) { - if (isValidBaseType(baseType)) { - if (type !== baseType && !hasBaseType(baseType, type)) { - if (type.resolvedBaseTypes === emptyArray) { - type.resolvedBaseTypes = [baseType]; - } else { - type.resolvedBaseTypes.push(baseType); - } - } else { - reportCircularBaseType(declaration, type); - } - } else { - error2(node, Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members); - } - } - } - } - } - } - } - function isThislessInterface(symbol) { - if (!symbol.declarations) { - return true; - } - for (const declaration of symbol.declarations) { - if (declaration.kind === 264 /* InterfaceDeclaration */) { - if (declaration.flags & 256 /* ContainsThis */) { - return false; - } - const baseTypeNodes = getInterfaceBaseTypeNodes(declaration); - if (baseTypeNodes) { - for (const node of baseTypeNodes) { - if (isEntityNameExpression(node.expression)) { - const baseSymbol = resolveEntityName( - node.expression, - 788968 /* Type */, - /*ignoreErrors*/ - true - ); - if (!baseSymbol || !(baseSymbol.flags & 64 /* Interface */) || getDeclaredTypeOfClassOrInterface(baseSymbol).thisType) { - return false; - } - } - } - } - } - } - return true; - } - function getDeclaredTypeOfClassOrInterface(symbol) { - let links = getSymbolLinks(symbol); - const originalLinks = links; - if (!links.declaredType) { - const kind = symbol.flags & 32 /* Class */ ? 1 /* Class */ : 2 /* Interface */; - const merged = mergeJSSymbols(symbol, symbol.valueDeclaration && getAssignedClassSymbol(symbol.valueDeclaration)); - if (merged) { - symbol = merged; - links = merged.links; - } - const type = originalLinks.declaredType = links.declaredType = createObjectType(kind, symbol); - const outerTypeParameters = getOuterTypeParametersOfClassOrInterface(symbol); - const localTypeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - if (outerTypeParameters || localTypeParameters || kind === 1 /* Class */ || !isThislessInterface(symbol)) { - type.objectFlags |= 4 /* Reference */; - type.typeParameters = concatenate(outerTypeParameters, localTypeParameters); - type.outerTypeParameters = outerTypeParameters; - type.localTypeParameters = localTypeParameters; - type.instantiations = /* @__PURE__ */ new Map(); - type.instantiations.set(getTypeListId(type.typeParameters), type); - type.target = type; - type.resolvedTypeArguments = type.typeParameters; - type.thisType = createTypeParameter(symbol); - type.thisType.isThisType = true; - type.thisType.constraint = type; - } - } - return links.declaredType; - } - function getDeclaredTypeOfTypeAlias(symbol) { - var _a; - const links = getSymbolLinks(symbol); - if (!links.declaredType) { - if (!pushTypeResolution(symbol, 2 /* DeclaredType */)) { - return errorType; - } - const declaration = Debug.checkDefined((_a = symbol.declarations) == null ? void 0 : _a.find(isTypeAlias), "Type alias symbol with no valid declaration found"); - const typeNode = isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type; - let type = typeNode ? getTypeFromTypeNode(typeNode) : errorType; - if (popTypeResolution()) { - const typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - if (typeParameters) { - links.typeParameters = typeParameters; - links.instantiations = /* @__PURE__ */ new Map(); - links.instantiations.set(getTypeListId(typeParameters), type); - } - } else { - type = errorType; - if (declaration.kind === 347 /* JSDocEnumTag */) { - error2(declaration.typeExpression.type, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); - } else { - error2(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); - } - } - links.declaredType = type; - } - return links.declaredType; - } - function getBaseTypeOfEnumLikeType(type) { - return type.flags & 1056 /* EnumLike */ && type.symbol.flags & 8 /* EnumMember */ ? getDeclaredTypeOfSymbol(getParentOfSymbol(type.symbol)) : type; - } - function getDeclaredTypeOfEnum(symbol) { - const links = getSymbolLinks(symbol); - if (!links.declaredType) { - const memberTypeList = []; - if (symbol.declarations) { - for (const declaration of symbol.declarations) { - if (declaration.kind === 266 /* EnumDeclaration */) { - for (const member of declaration.members) { - if (hasBindableName(member)) { - const memberSymbol = getSymbolOfDeclaration(member); - const value = getEnumMemberValue(member); - const memberType = getFreshTypeOfLiteralType(value !== void 0 ? getEnumLiteralType(value, getSymbolId(symbol), memberSymbol) : createComputedEnumType(memberSymbol)); - getSymbolLinks(memberSymbol).declaredType = memberType; - memberTypeList.push(getRegularTypeOfLiteralType(memberType)); - } - } - } - } - } - const enumType = memberTypeList.length ? getUnionType( - memberTypeList, - 1 /* Literal */, - symbol, - /*aliasTypeArguments*/ - void 0 - ) : createComputedEnumType(symbol); - if (enumType.flags & 1048576 /* Union */) { - enumType.flags |= 1024 /* EnumLiteral */; - enumType.symbol = symbol; - } - links.declaredType = enumType; - } - return links.declaredType; - } - function createComputedEnumType(symbol) { - const regularType = createTypeWithSymbol(32 /* Enum */, symbol); - const freshType = createTypeWithSymbol(32 /* Enum */, symbol); - regularType.regularType = regularType; - regularType.freshType = freshType; - freshType.regularType = regularType; - freshType.freshType = freshType; - return regularType; - } - function getDeclaredTypeOfEnumMember(symbol) { - const links = getSymbolLinks(symbol); - if (!links.declaredType) { - const enumType = getDeclaredTypeOfEnum(getParentOfSymbol(symbol)); - if (!links.declaredType) { - links.declaredType = enumType; - } - } - return links.declaredType; - } - function getDeclaredTypeOfTypeParameter(symbol) { - const links = getSymbolLinks(symbol); - return links.declaredType || (links.declaredType = createTypeParameter(symbol)); - } - function getDeclaredTypeOfAlias(symbol) { - const links = getSymbolLinks(symbol); - return links.declaredType || (links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol))); - } - function getDeclaredTypeOfSymbol(symbol) { - return tryGetDeclaredTypeOfSymbol(symbol) || errorType; - } - function tryGetDeclaredTypeOfSymbol(symbol) { - if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { - return getDeclaredTypeOfClassOrInterface(symbol); - } - if (symbol.flags & 524288 /* TypeAlias */) { - return getDeclaredTypeOfTypeAlias(symbol); - } - if (symbol.flags & 262144 /* TypeParameter */) { - return getDeclaredTypeOfTypeParameter(symbol); - } - if (symbol.flags & 384 /* Enum */) { - return getDeclaredTypeOfEnum(symbol); - } - if (symbol.flags & 8 /* EnumMember */) { - return getDeclaredTypeOfEnumMember(symbol); - } - if (symbol.flags & 2097152 /* Alias */) { - return getDeclaredTypeOfAlias(symbol); - } - return void 0; - } - function isThislessType(node) { - switch (node.kind) { - case 133 /* AnyKeyword */: - case 159 /* UnknownKeyword */: - case 154 /* StringKeyword */: - case 150 /* NumberKeyword */: - case 163 /* BigIntKeyword */: - case 136 /* BooleanKeyword */: - case 155 /* SymbolKeyword */: - case 151 /* ObjectKeyword */: - case 116 /* VoidKeyword */: - case 157 /* UndefinedKeyword */: - case 146 /* NeverKeyword */: - case 201 /* LiteralType */: - return true; - case 188 /* ArrayType */: - return isThislessType(node.elementType); - case 183 /* TypeReference */: - return !node.typeArguments || node.typeArguments.every(isThislessType); - } - return false; - } - function isThislessTypeParameter(node) { - const constraint = getEffectiveConstraintOfTypeParameter(node); - return !constraint || isThislessType(constraint); - } - function isThislessVariableLikeDeclaration(node) { - const typeNode = getEffectiveTypeAnnotationNode(node); - return typeNode ? isThislessType(typeNode) : !hasInitializer(node); - } - function isThislessFunctionLikeDeclaration(node) { - const returnType = getEffectiveReturnTypeNode(node); - const typeParameters = getEffectiveTypeParameterDeclarations(node); - return (node.kind === 176 /* Constructor */ || !!returnType && isThislessType(returnType)) && node.parameters.every(isThislessVariableLikeDeclaration) && typeParameters.every(isThislessTypeParameter); - } - function isThisless(symbol) { - if (symbol.declarations && symbol.declarations.length === 1) { - const declaration = symbol.declarations[0]; - if (declaration) { - switch (declaration.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - return isThislessVariableLikeDeclaration(declaration); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return isThislessFunctionLikeDeclaration(declaration); - } - } - } - return false; - } - function createInstantiatedSymbolTable(symbols, mapper, mappingThisOnly) { - const result = createSymbolTable(); - for (const symbol of symbols) { - result.set(symbol.escapedName, mappingThisOnly && isThisless(symbol) ? symbol : instantiateSymbol(symbol, mapper)); - } - return result; - } - function addInheritedMembers(symbols, baseSymbols) { - for (const base of baseSymbols) { - if (isStaticPrivateIdentifierProperty(base)) { - continue; - } - const derived = symbols.get(base.escapedName); - if (!derived || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration) && !isConstructorDeclaredProperty(derived) && !getContainingClassStaticBlock(derived.valueDeclaration)) { - symbols.set(base.escapedName, base); - symbols.set(base.escapedName, base); - } - } - } - function isStaticPrivateIdentifierProperty(s) { - return !!s.valueDeclaration && isPrivateIdentifierClassElementDeclaration(s.valueDeclaration) && isStatic(s.valueDeclaration); - } - function resolveDeclaredMembers(type) { - if (!type.declaredProperties) { - const symbol = type.symbol; - const members = getMembersOfSymbol(symbol); - type.declaredProperties = getNamedMembers(members); - type.declaredCallSignatures = emptyArray; - type.declaredConstructSignatures = emptyArray; - type.declaredIndexInfos = emptyArray; - type.declaredCallSignatures = getSignaturesOfSymbol(members.get("__call" /* Call */)); - type.declaredConstructSignatures = getSignaturesOfSymbol(members.get("__new" /* New */)); - type.declaredIndexInfos = getIndexInfosOfSymbol(symbol); - } - return type; - } - function isLateBindableName(node) { - if (!isComputedPropertyName(node) && !isElementAccessExpression(node)) { - return false; - } - const expr = isComputedPropertyName(node) ? node.expression : node.argumentExpression; - return isEntityNameExpression(expr) && isTypeUsableAsPropertyName(isComputedPropertyName(node) ? checkComputedPropertyName(node) : checkExpressionCached(expr)); - } - function isLateBoundName(name) { - return name.charCodeAt(0) === 95 /* _ */ && name.charCodeAt(1) === 95 /* _ */ && name.charCodeAt(2) === 64 /* at */; - } - function hasLateBindableName(node) { - const name = getNameOfDeclaration(node); - return !!name && isLateBindableName(name); - } - function hasBindableName(node) { - return !hasDynamicName(node) || hasLateBindableName(node); - } - function isNonBindableDynamicName(node) { - return isDynamicName(node) && !isLateBindableName(node); - } - function addDeclarationToLateBoundSymbol(symbol, member, symbolFlags) { - Debug.assert(!!(getCheckFlags(symbol) & 4096 /* Late */), "Expected a late-bound symbol."); - symbol.flags |= symbolFlags; - getSymbolLinks(member.symbol).lateSymbol = symbol; - if (!symbol.declarations) { - symbol.declarations = [member]; - } else if (!member.symbol.isReplaceableByMethod) { - symbol.declarations.push(member); - } - if (symbolFlags & 111551 /* Value */) { - if (!symbol.valueDeclaration || symbol.valueDeclaration.kind !== member.kind) { - symbol.valueDeclaration = member; - } - } - } - function lateBindMember(parent2, earlySymbols, lateSymbols, decl) { - Debug.assert(!!decl.symbol, "The member is expected to have a symbol."); - const links = getNodeLinks(decl); - if (!links.resolvedSymbol) { - links.resolvedSymbol = decl.symbol; - const declName = isBinaryExpression(decl) ? decl.left : decl.name; - const type = isElementAccessExpression(declName) ? checkExpressionCached(declName.argumentExpression) : checkComputedPropertyName(declName); - if (isTypeUsableAsPropertyName(type)) { - const memberName = getPropertyNameFromType(type); - const symbolFlags = decl.symbol.flags; - let lateSymbol = lateSymbols.get(memberName); - if (!lateSymbol) - lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */)); - const earlySymbol = earlySymbols && earlySymbols.get(memberName); - if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) { - const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations; - const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName); - forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); - error2(declName || decl, Diagnostics.Duplicate_property_0, name); - lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */); - } - lateSymbol.links.nameType = type; - addDeclarationToLateBoundSymbol(lateSymbol, decl, symbolFlags); - if (lateSymbol.parent) { - Debug.assert(lateSymbol.parent === parent2, "Existing symbol parent should match new one"); - } else { - lateSymbol.parent = parent2; - } - return links.resolvedSymbol = lateSymbol; - } - } - return links.resolvedSymbol; - } - function getResolvedMembersOrExportsOfSymbol(symbol, resolutionKind) { - var _a, _b, _c; - const links = getSymbolLinks(symbol); - if (!links[resolutionKind]) { - const isStatic2 = resolutionKind === "resolvedExports" /* resolvedExports */; - const earlySymbols = !isStatic2 ? symbol.members : symbol.flags & 1536 /* Module */ ? getExportsOfModuleWorker(symbol).exports : symbol.exports; - links[resolutionKind] = earlySymbols || emptySymbols; - const lateSymbols = createSymbolTable(); - for (const decl of symbol.declarations || emptyArray) { - const members = getMembersOfDeclaration(decl); - if (members) { - for (const member of members) { - if (isStatic2 === hasStaticModifier(member)) { - if (hasLateBindableName(member)) { - lateBindMember(symbol, earlySymbols, lateSymbols, member); - } - } - } - } - } - const assignments = (((_a = symbol.valueDeclaration) == null ? void 0 : _a.kind) === 219 /* ArrowFunction */ || ((_b = symbol.valueDeclaration) == null ? void 0 : _b.kind) === 218 /* FunctionExpression */) && ((_c = getSymbolOfNode(symbol.valueDeclaration.parent)) == null ? void 0 : _c.assignmentDeclarationMembers) || symbol.assignmentDeclarationMembers; - if (assignments) { - const decls = arrayFrom(assignments.values()); - for (const member of decls) { - const assignmentKind = getAssignmentDeclarationKind(member); - const isInstanceMember = assignmentKind === 3 /* PrototypeProperty */ || isBinaryExpression(member) && isPossiblyAliasedThisProperty(member, assignmentKind) || assignmentKind === 9 /* ObjectDefinePrototypeProperty */ || assignmentKind === 6 /* Prototype */; - if (isStatic2 === !isInstanceMember) { - if (hasLateBindableName(member)) { - lateBindMember(symbol, earlySymbols, lateSymbols, member); - } - } - } - } - links[resolutionKind] = combineSymbolTables(earlySymbols, lateSymbols) || emptySymbols; - } - return links[resolutionKind]; - } - function getMembersOfSymbol(symbol) { - return symbol.flags & 6256 /* LateBindingContainer */ ? getResolvedMembersOrExportsOfSymbol(symbol, "resolvedMembers" /* resolvedMembers */) : symbol.members || emptySymbols; - } - function getLateBoundSymbol(symbol) { - if (symbol.flags & 106500 /* ClassMember */ && symbol.escapedName === "__computed" /* Computed */) { - const links = getSymbolLinks(symbol); - if (!links.lateSymbol && some(symbol.declarations, hasLateBindableName)) { - const parent2 = getMergedSymbol(symbol.parent); - if (some(symbol.declarations, hasStaticModifier)) { - getExportsOfSymbol(parent2); - } else { - getMembersOfSymbol(parent2); - } - } - return links.lateSymbol || (links.lateSymbol = symbol); - } - return symbol; - } - function getTypeWithThisArgument(type, thisArgument, needApparentType) { - if (getObjectFlags(type) & 4 /* Reference */) { - const target = type.target; - const typeArguments = getTypeArguments(type); - return length(target.typeParameters) === length(typeArguments) ? createTypeReference(target, concatenate(typeArguments, [thisArgument || target.thisType])) : type; - } else if (type.flags & 2097152 /* Intersection */) { - const types = sameMap(type.types, (t) => getTypeWithThisArgument(t, thisArgument, needApparentType)); - return types !== type.types ? getIntersectionType(types) : type; - } - return needApparentType ? getApparentType(type) : type; - } - function resolveObjectTypeMembers(type, source, typeParameters, typeArguments) { - let mapper; - let members; - let callSignatures; - let constructSignatures; - let indexInfos; - if (rangeEquals(typeParameters, typeArguments, 0, typeParameters.length)) { - members = source.symbol ? getMembersOfSymbol(source.symbol) : createSymbolTable(source.declaredProperties); - callSignatures = source.declaredCallSignatures; - constructSignatures = source.declaredConstructSignatures; - indexInfos = source.declaredIndexInfos; - } else { - mapper = createTypeMapper(typeParameters, typeArguments); - members = createInstantiatedSymbolTable( - source.declaredProperties, - mapper, - /*mappingThisOnly*/ - typeParameters.length === 1 - ); - callSignatures = instantiateSignatures(source.declaredCallSignatures, mapper); - constructSignatures = instantiateSignatures(source.declaredConstructSignatures, mapper); - indexInfos = instantiateIndexInfos(source.declaredIndexInfos, mapper); - } - const baseTypes = getBaseTypes(source); - if (baseTypes.length) { - if (source.symbol && members === getMembersOfSymbol(source.symbol)) { - members = createSymbolTable(source.declaredProperties); - } - setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos); - const thisArgument = lastOrUndefined(typeArguments); - for (const baseType of baseTypes) { - const instantiatedBaseType = thisArgument ? getTypeWithThisArgument(instantiateType(baseType, mapper), thisArgument) : baseType; - addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType)); - callSignatures = concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */)); - constructSignatures = concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */)); - const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [createIndexInfo( - stringType, - anyType, - /*isReadonly*/ - false - )]; - indexInfos = concatenate(indexInfos, filter(inheritedIndexInfos, (info) => !findIndexInfo(indexInfos, info.keyType))); - } - } - setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos); - } - function resolveClassOrInterfaceMembers(type) { - resolveObjectTypeMembers(type, resolveDeclaredMembers(type), emptyArray, emptyArray); - } - function resolveTypeReferenceMembers(type) { - const source = resolveDeclaredMembers(type.target); - const typeParameters = concatenate(source.typeParameters, [source.thisType]); - const typeArguments = getTypeArguments(type); - const paddedTypeArguments = typeArguments.length === typeParameters.length ? typeArguments : concatenate(typeArguments, [type]); - resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); - } - function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { - const sig = new Signature15(checker, flags); - sig.declaration = declaration; - sig.typeParameters = typeParameters; - sig.parameters = parameters; - sig.thisParameter = thisParameter; - sig.resolvedReturnType = resolvedReturnType; - sig.resolvedTypePredicate = resolvedTypePredicate; - sig.minArgumentCount = minArgumentCount; - sig.resolvedMinArgumentCount = void 0; - sig.target = void 0; - sig.mapper = void 0; - sig.compositeSignatures = void 0; - sig.compositeKind = void 0; - return sig; - } - function cloneSignature(sig) { - const result = createSignature( - sig.declaration, - sig.typeParameters, - sig.thisParameter, - sig.parameters, - /*resolvedReturnType*/ - void 0, - /*resolvedTypePredicate*/ - void 0, - sig.minArgumentCount, - sig.flags & 167 /* PropagatingFlags */ - ); - result.target = sig.target; - result.mapper = sig.mapper; - result.compositeSignatures = sig.compositeSignatures; - result.compositeKind = sig.compositeKind; - return result; - } - function createUnionSignature(signature, unionSignatures) { - const result = cloneSignature(signature); - result.compositeSignatures = unionSignatures; - result.compositeKind = 1048576 /* Union */; - result.target = void 0; - result.mapper = void 0; - return result; - } - function getOptionalCallSignature(signature, callChainFlags) { - if ((signature.flags & 24 /* CallChainFlags */) === callChainFlags) { - return signature; - } - if (!signature.optionalCallSignatureCache) { - signature.optionalCallSignatureCache = {}; - } - const key = callChainFlags === 8 /* IsInnerCallChain */ ? "inner" : "outer"; - return signature.optionalCallSignatureCache[key] || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); - } - function createOptionalCallSignature(signature, callChainFlags) { - Debug.assert( - callChainFlags === 8 /* IsInnerCallChain */ || callChainFlags === 16 /* IsOuterCallChain */, - "An optional call signature can either be for an inner call chain or an outer call chain, but not both." - ); - const result = cloneSignature(signature); - result.flags |= callChainFlags; - return result; - } - function getExpandedParameters(sig, skipUnionExpanding) { - if (signatureHasRestParameter(sig)) { - const restIndex = sig.parameters.length - 1; - const restName = sig.parameters[restIndex].escapedName; - const restType = getTypeOfSymbol(sig.parameters[restIndex]); - if (isTupleType(restType)) { - return [expandSignatureParametersWithTupleMembers(restType, restIndex, restName)]; - } else if (!skipUnionExpanding && restType.flags & 1048576 /* Union */ && every(restType.types, isTupleType)) { - return map(restType.types, (t) => expandSignatureParametersWithTupleMembers(t, restIndex, restName)); - } - } - return [sig.parameters]; - function expandSignatureParametersWithTupleMembers(restType, restIndex, restName) { - const elementTypes = getTypeArguments(restType); - const associatedNames = getUniqAssociatedNamesFromTupleType(restType, restName); - const restParams = map(elementTypes, (t, i) => { - const name = associatedNames && associatedNames[i] ? associatedNames[i] : getParameterNameAtPosition(sig, restIndex + i, restType); - const flags = restType.target.elementFlags[i]; - const checkFlags = flags & 12 /* Variable */ ? 32768 /* RestParameter */ : flags & 2 /* Optional */ ? 16384 /* OptionalParameter */ : 0; - const symbol = createSymbol(1 /* FunctionScopedVariable */, name, checkFlags); - symbol.links.type = flags & 4 /* Rest */ ? createArrayType(t) : t; - return symbol; - }); - return concatenate(sig.parameters.slice(0, restIndex), restParams); - } - function getUniqAssociatedNamesFromTupleType(type, restName) { - const associatedNamesMap = /* @__PURE__ */ new Map(); - return map(type.target.labeledElementDeclarations, (labeledElement, i) => { - const name = getTupleElementLabel(labeledElement, i, restName); - const prevCounter = associatedNamesMap.get(name); - if (prevCounter === void 0) { - associatedNamesMap.set(name, 1); - return name; - } else { - associatedNamesMap.set(name, prevCounter + 1); - return `${name}_${prevCounter}`; - } - }); - } - } - function getDefaultConstructSignatures(classType) { - const baseConstructorType = getBaseConstructorTypeOfClass(classType); - const baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); - const declaration = getClassLikeDeclarationOfSymbol(classType.symbol); - const isAbstract = !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */); - if (baseSignatures.length === 0) { - return [createSignature( - /*declaration*/ - void 0, - classType.localTypeParameters, - /*thisParameter*/ - void 0, - emptyArray, - classType, - /*resolvedTypePredicate*/ - void 0, - 0, - isAbstract ? 4 /* Abstract */ : 0 /* None */ - )]; - } - const baseTypeNode = getBaseTypeNodeOfClass(classType); - const isJavaScript = isInJSFile(baseTypeNode); - const typeArguments = typeArgumentsFromTypeReferenceNode(baseTypeNode); - const typeArgCount = length(typeArguments); - const result = []; - for (const baseSig of baseSignatures) { - const minTypeArgumentCount = getMinTypeArgumentCount(baseSig.typeParameters); - const typeParamCount = length(baseSig.typeParameters); - if (isJavaScript || typeArgCount >= minTypeArgumentCount && typeArgCount <= typeParamCount) { - const sig = typeParamCount ? createSignatureInstantiation(baseSig, fillMissingTypeArguments(typeArguments, baseSig.typeParameters, minTypeArgumentCount, isJavaScript)) : cloneSignature(baseSig); - sig.typeParameters = classType.localTypeParameters; - sig.resolvedReturnType = classType; - sig.flags = isAbstract ? sig.flags | 4 /* Abstract */ : sig.flags & ~4 /* Abstract */; - result.push(sig); - } - } - return result; - } - function findMatchingSignature(signatureList, signature, partialMatch, ignoreThisTypes, ignoreReturnTypes) { - for (const s of signatureList) { - if (compareSignaturesIdentical(s, signature, partialMatch, ignoreThisTypes, ignoreReturnTypes, partialMatch ? compareTypesSubtypeOf : compareTypesIdentical)) { - return s; - } - } - } - function findMatchingSignatures(signatureLists, signature, listIndex) { - if (signature.typeParameters) { - if (listIndex > 0) { - return void 0; - } - for (let i = 1; i < signatureLists.length; i++) { - if (!findMatchingSignature( - signatureLists[i], - signature, - /*partialMatch*/ - false, - /*ignoreThisTypes*/ - false, - /*ignoreReturnTypes*/ - false - )) { - return void 0; - } - } - return [signature]; - } - let result; - for (let i = 0; i < signatureLists.length; i++) { - const match = i === listIndex ? signature : findMatchingSignature( - signatureLists[i], - signature, - /*partialMatch*/ - true, - /*ignoreThisTypes*/ - false, - /*ignoreReturnTypes*/ - true - ); - if (!match) { - return void 0; - } - result = appendIfUnique(result, match); - } - return result; - } - function getUnionSignatures(signatureLists) { - let result; - let indexWithLengthOverOne; - for (let i = 0; i < signatureLists.length; i++) { - if (signatureLists[i].length === 0) - return emptyArray; - if (signatureLists[i].length > 1) { - indexWithLengthOverOne = indexWithLengthOverOne === void 0 ? i : -1; - } - for (const signature of signatureLists[i]) { - if (!result || !findMatchingSignature( - result, - signature, - /*partialMatch*/ - false, - /*ignoreThisTypes*/ - false, - /*ignoreReturnTypes*/ - true - )) { - const unionSignatures = findMatchingSignatures(signatureLists, signature, i); - if (unionSignatures) { - let s = signature; - if (unionSignatures.length > 1) { - let thisParameter = signature.thisParameter; - const firstThisParameterOfUnionSignatures = forEach(unionSignatures, (sig) => sig.thisParameter); - if (firstThisParameterOfUnionSignatures) { - const thisType = getIntersectionType(mapDefined(unionSignatures, (sig) => sig.thisParameter && getTypeOfSymbol(sig.thisParameter))); - thisParameter = createSymbolWithType(firstThisParameterOfUnionSignatures, thisType); - } - s = createUnionSignature(signature, unionSignatures); - s.thisParameter = thisParameter; - } - (result || (result = [])).push(s); - } - } - } - } - if (!length(result) && indexWithLengthOverOne !== -1) { - const masterList = signatureLists[indexWithLengthOverOne !== void 0 ? indexWithLengthOverOne : 0]; - let results = masterList.slice(); - for (const signatures of signatureLists) { - if (signatures !== masterList) { - const signature = signatures[0]; - Debug.assert(!!signature, "getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass"); - results = !!signature.typeParameters && some(results, (s) => !!s.typeParameters && !compareTypeParametersIdentical(signature.typeParameters, s.typeParameters)) ? void 0 : map(results, (sig) => combineSignaturesOfUnionMembers(sig, signature)); - if (!results) { - break; - } - } - } - result = results; - } - return result || emptyArray; - } - function compareTypeParametersIdentical(sourceParams, targetParams) { - if (length(sourceParams) !== length(targetParams)) { - return false; - } - if (!sourceParams || !targetParams) { - return true; - } - const mapper = createTypeMapper(targetParams, sourceParams); - for (let i = 0; i < sourceParams.length; i++) { - const source = sourceParams[i]; - const target = targetParams[i]; - if (source === target) - continue; - if (!isTypeIdenticalTo(getConstraintFromTypeParameter(source) || unknownType, instantiateType(getConstraintFromTypeParameter(target) || unknownType, mapper))) - return false; - } - return true; - } - function combineUnionThisParam(left, right, mapper) { - if (!left || !right) { - return left || right; - } - const thisType = getIntersectionType([getTypeOfSymbol(left), instantiateType(getTypeOfSymbol(right), mapper)]); - return createSymbolWithType(left, thisType); - } - function combineUnionParameters(left, right, mapper) { - const leftCount = getParameterCount(left); - const rightCount = getParameterCount(right); - const longest = leftCount >= rightCount ? left : right; - const shorter = longest === left ? right : left; - const longestCount = longest === left ? leftCount : rightCount; - const eitherHasEffectiveRest = hasEffectiveRestParameter(left) || hasEffectiveRestParameter(right); - const needsExtraRestElement = eitherHasEffectiveRest && !hasEffectiveRestParameter(longest); - const params = new Array(longestCount + (needsExtraRestElement ? 1 : 0)); - for (let i = 0; i < longestCount; i++) { - let longestParamType = tryGetTypeAtPosition(longest, i); - if (longest === right) { - longestParamType = instantiateType(longestParamType, mapper); - } - let shorterParamType = tryGetTypeAtPosition(shorter, i) || unknownType; - if (shorter === right) { - shorterParamType = instantiateType(shorterParamType, mapper); - } - const unionParamType = getIntersectionType([longestParamType, shorterParamType]); - const isRestParam = eitherHasEffectiveRest && !needsExtraRestElement && i === longestCount - 1; - const isOptional = i >= getMinArgumentCount(longest) && i >= getMinArgumentCount(shorter); - const leftName = i >= leftCount ? void 0 : getParameterNameAtPosition(left, i); - const rightName = i >= rightCount ? void 0 : getParameterNameAtPosition(right, i); - const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0; - const paramSymbol = createSymbol( - 1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), - paramName || `arg${i}` - ); - paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType; - params[i] = paramSymbol; - } - if (needsExtraRestElement) { - const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args"); - restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount)); - if (shorter === right) { - restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper); - } - params[longestCount] = restParamSymbol; - } - return params; - } - function combineSignaturesOfUnionMembers(left, right) { - const typeParams = left.typeParameters || right.typeParameters; - let paramMapper; - if (left.typeParameters && right.typeParameters) { - paramMapper = createTypeMapper(right.typeParameters, left.typeParameters); - } - const declaration = left.declaration; - const params = combineUnionParameters(left, right, paramMapper); - const thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter, paramMapper); - const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); - const result = createSignature( - declaration, - typeParams, - thisParam, - params, - /*resolvedReturnType*/ - void 0, - /*resolvedTypePredicate*/ - void 0, - minArgCount, - (left.flags | right.flags) & 167 /* PropagatingFlags */ - ); - result.compositeKind = 1048576 /* Union */; - result.compositeSignatures = concatenate(left.compositeKind !== 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); - if (paramMapper) { - result.mapper = left.compositeKind !== 2097152 /* Intersection */ && left.mapper && left.compositeSignatures ? combineTypeMappers(left.mapper, paramMapper) : paramMapper; - } - return result; - } - function getUnionIndexInfos(types) { - const sourceInfos = getIndexInfosOfType(types[0]); - if (sourceInfos) { - const result = []; - for (const info of sourceInfos) { - const indexType = info.keyType; - if (every(types, (t) => !!getIndexInfoOfType(t, indexType))) { - result.push(createIndexInfo( - indexType, - getUnionType(map(types, (t) => getIndexTypeOfType(t, indexType))), - some(types, (t) => getIndexInfoOfType(t, indexType).isReadonly) - )); - } - } - return result; - } - return emptyArray; - } - function resolveUnionTypeMembers(type) { - const callSignatures = getUnionSignatures(map(type.types, (t) => t === globalFunctionType ? [unknownSignature] : getSignaturesOfType(t, 0 /* Call */))); - const constructSignatures = getUnionSignatures(map(type.types, (t) => getSignaturesOfType(t, 1 /* Construct */))); - const indexInfos = getUnionIndexInfos(type.types); - setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, indexInfos); - } - function intersectTypes(type1, type2) { - return !type1 ? type2 : !type2 ? type1 : getIntersectionType([type1, type2]); - } - function findMixins(types) { - const constructorTypeCount = countWhere(types, (t) => getSignaturesOfType(t, 1 /* Construct */).length > 0); - const mixinFlags = map(types, isMixinConstructorType); - if (constructorTypeCount > 0 && constructorTypeCount === countWhere(mixinFlags, (b) => b)) { - const firstMixinIndex = mixinFlags.indexOf( - /*searchElement*/ - true - ); - mixinFlags[firstMixinIndex] = false; - } - return mixinFlags; - } - function includeMixinType(type, types, mixinFlags, index) { - const mixedTypes = []; - for (let i = 0; i < types.length; i++) { - if (i === index) { - mixedTypes.push(type); - } else if (mixinFlags[i]) { - mixedTypes.push(getReturnTypeOfSignature(getSignaturesOfType(types[i], 1 /* Construct */)[0])); - } - } - return getIntersectionType(mixedTypes); - } - function resolveIntersectionTypeMembers(type) { - let callSignatures; - let constructSignatures; - let indexInfos; - const types = type.types; - const mixinFlags = findMixins(types); - const mixinCount = countWhere(mixinFlags, (b) => b); - for (let i = 0; i < types.length; i++) { - const t = type.types[i]; - if (!mixinFlags[i]) { - let signatures = getSignaturesOfType(t, 1 /* Construct */); - if (signatures.length && mixinCount > 0) { - signatures = map(signatures, (s) => { - const clone2 = cloneSignature(s); - clone2.resolvedReturnType = includeMixinType(getReturnTypeOfSignature(s), types, mixinFlags, i); - return clone2; - }); - } - constructSignatures = appendSignatures(constructSignatures, signatures); - } - callSignatures = appendSignatures(callSignatures, getSignaturesOfType(t, 0 /* Call */)); - indexInfos = reduceLeft(getIndexInfosOfType(t), (infos, newInfo) => appendIndexInfo( - infos, - newInfo, - /*union*/ - false - ), indexInfos); - } - setStructuredTypeMembers(type, emptySymbols, callSignatures || emptyArray, constructSignatures || emptyArray, indexInfos || emptyArray); - } - function appendSignatures(signatures, newSignatures) { - for (const sig of newSignatures) { - if (!signatures || every(signatures, (s) => !compareSignaturesIdentical( - s, - sig, - /*partialMatch*/ - false, - /*ignoreThisTypes*/ - false, - /*ignoreReturnTypes*/ - false, - compareTypesIdentical - ))) { - signatures = append(signatures, sig); - } - } - return signatures; - } - function appendIndexInfo(indexInfos, newInfo, union) { - if (indexInfos) { - for (let i = 0; i < indexInfos.length; i++) { - const info = indexInfos[i]; - if (info.keyType === newInfo.keyType) { - indexInfos[i] = createIndexInfo( - info.keyType, - union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), - union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly - ); - return indexInfos; - } - } - } - return append(indexInfos, newInfo); - } - function resolveAnonymousTypeMembers(type) { - if (type.target) { - setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, emptyArray); - const members2 = createInstantiatedSymbolTable( - getPropertiesOfObjectType(type.target), - type.mapper, - /*mappingThisOnly*/ - false - ); - const callSignatures = instantiateSignatures(getSignaturesOfType(type.target, 0 /* Call */), type.mapper); - const constructSignatures = instantiateSignatures(getSignaturesOfType(type.target, 1 /* Construct */), type.mapper); - const indexInfos2 = instantiateIndexInfos(getIndexInfosOfType(type.target), type.mapper); - setStructuredTypeMembers(type, members2, callSignatures, constructSignatures, indexInfos2); - return; - } - const symbol = getMergedSymbol(type.symbol); - if (symbol.flags & 2048 /* TypeLiteral */) { - setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, emptyArray); - const members2 = getMembersOfSymbol(symbol); - const callSignatures = getSignaturesOfSymbol(members2.get("__call" /* Call */)); - const constructSignatures = getSignaturesOfSymbol(members2.get("__new" /* New */)); - const indexInfos2 = getIndexInfosOfSymbol(symbol); - setStructuredTypeMembers(type, members2, callSignatures, constructSignatures, indexInfos2); - return; - } - let members = getExportsOfSymbol(symbol); - let indexInfos; - if (symbol === globalThisSymbol) { - const varsOnly = /* @__PURE__ */ new Map(); - members.forEach((p) => { - var _a; - if (!(p.flags & 418 /* BlockScoped */) && !(p.flags & 512 /* ValueModule */ && ((_a = p.declarations) == null ? void 0 : _a.length) && every(p.declarations, isAmbientModule))) { - varsOnly.set(p.escapedName, p); - } - }); - members = varsOnly; - } - let baseConstructorIndexInfo; - setStructuredTypeMembers(type, members, emptyArray, emptyArray, emptyArray); - if (symbol.flags & 32 /* Class */) { - const classType = getDeclaredTypeOfClassOrInterface(symbol); - const baseConstructorType = getBaseConstructorTypeOfClass(classType); - if (baseConstructorType.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 8650752 /* TypeVariable */)) { - members = createSymbolTable(getNamedOrIndexSignatureMembers(members)); - addInheritedMembers(members, getPropertiesOfType(baseConstructorType)); - } else if (baseConstructorType === anyType) { - baseConstructorIndexInfo = createIndexInfo( - stringType, - anyType, - /*isReadonly*/ - false - ); - } - } - const indexSymbol = getIndexSymbolFromSymbolTable(members); - if (indexSymbol) { - indexInfos = getIndexInfosOfIndexSymbol(indexSymbol); - } else { - if (baseConstructorIndexInfo) { - indexInfos = append(indexInfos, baseConstructorIndexInfo); - } - if (symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) { - indexInfos = append(indexInfos, enumNumberIndexInfo); - } - } - setStructuredTypeMembers(type, members, emptyArray, emptyArray, indexInfos || emptyArray); - if (symbol.flags & (16 /* Function */ | 8192 /* Method */)) { - type.callSignatures = getSignaturesOfSymbol(symbol); - } - if (symbol.flags & 32 /* Class */) { - const classType = getDeclaredTypeOfClassOrInterface(symbol); - let constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : emptyArray; - if (symbol.flags & 16 /* Function */) { - constructSignatures = addRange(constructSignatures.slice(), mapDefined( - type.callSignatures, - (sig) => isJSConstructor(sig.declaration) ? createSignature( - sig.declaration, - sig.typeParameters, - sig.thisParameter, - sig.parameters, - classType, - /*resolvedTypePredicate*/ - void 0, - sig.minArgumentCount, - sig.flags & 167 /* PropagatingFlags */ - ) : void 0 - )); - } - if (!constructSignatures.length) { - constructSignatures = getDefaultConstructSignatures(classType); - } - type.constructSignatures = constructSignatures; - } - } - function replaceIndexedAccess(instantiable, type, replacement) { - return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])])); - } - function resolveReverseMappedTypeMembers(type) { - const indexInfo = getIndexInfoOfType(type.source, stringType); - const modifiers = getMappedTypeModifiers(type.mappedType); - const readonlyMask = modifiers & 1 /* IncludeReadonly */ ? false : true; - const optionalMask = modifiers & 4 /* IncludeOptional */ ? 0 : 16777216 /* Optional */; - const indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType), readonlyMask && indexInfo.isReadonly)] : emptyArray; - const members = createSymbolTable(); - for (const prop of getPropertiesOfType(type.source)) { - const checkFlags = 8192 /* ReverseMapped */ | (readonlyMask && isReadonlySymbol(prop) ? 8 /* Readonly */ : 0); - const inferredProp = createSymbol(4 /* Property */ | prop.flags & optionalMask, prop.escapedName, checkFlags); - inferredProp.declarations = prop.declarations; - inferredProp.links.nameType = getSymbolLinks(prop).nameType; - inferredProp.links.propertyType = getTypeOfSymbol(prop); - if (type.constraintType.type.flags & 8388608 /* IndexedAccess */ && type.constraintType.type.objectType.flags & 262144 /* TypeParameter */ && type.constraintType.type.indexType.flags & 262144 /* TypeParameter */) { - const newTypeParam = type.constraintType.type.objectType; - const newMappedType = replaceIndexedAccess(type.mappedType, type.constraintType.type, newTypeParam); - inferredProp.links.mappedType = newMappedType; - inferredProp.links.constraintType = getIndexType(newTypeParam); - } else { - inferredProp.links.mappedType = type.mappedType; - inferredProp.links.constraintType = type.constraintType; - } - members.set(prop.escapedName, inferredProp); - } - setStructuredTypeMembers(type, members, emptyArray, emptyArray, indexInfos); - } - function getLowerBoundOfKeyType(type) { - if (type.flags & 4194304 /* Index */) { - const t = getApparentType(type.type); - return isGenericTupleType(t) ? getKnownKeysOfTupleType(t) : getIndexType(t); - } - if (type.flags & 16777216 /* Conditional */) { - if (type.root.isDistributive) { - const checkType = type.checkType; - const constraint = getLowerBoundOfKeyType(checkType); - if (constraint !== checkType) { - return getConditionalTypeInstantiation(type, prependTypeMapping(type.root.checkType, constraint, type.mapper)); - } - } - return type; - } - if (type.flags & 1048576 /* Union */) { - return mapType( - type, - getLowerBoundOfKeyType, - /*noReductions*/ - true - ); - } - if (type.flags & 2097152 /* Intersection */) { - const types = type.types; - if (types.length === 2 && !!(types[0].flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && types[1] === emptyTypeLiteralType) { - return type; - } - return getIntersectionType(sameMap(type.types, getLowerBoundOfKeyType)); - } - return type; - } - function getIsLateCheckFlag(s) { - return getCheckFlags(s) & 4096 /* Late */; - } - function forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(type, include, stringsOnly, cb) { - for (const prop of getPropertiesOfType(type)) { - cb(getLiteralTypeFromProperty(prop, include)); - } - if (type.flags & 1 /* Any */) { - cb(stringType); - } else { - for (const info of getIndexInfosOfType(type)) { - if (!stringsOnly || info.keyType.flags & (4 /* String */ | 134217728 /* TemplateLiteral */)) { - cb(info.keyType); - } - } - } - } - function resolveMappedTypeMembers(type) { - const members = createSymbolTable(); - let indexInfos; - setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, emptyArray); - const typeParameter = getTypeParameterFromMappedType(type); - const constraintType = getConstraintTypeFromMappedType(type); - const mappedType = type.target || type; - const nameType = getNameTypeFromMappedType(mappedType); - const shouldLinkPropDeclarations = !nameType || isFilteringMappedType(mappedType); - const templateType = getTemplateTypeFromMappedType(mappedType); - const modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); - const templateModifiers = getMappedTypeModifiers(type); - const include = keyofStringsOnly ? 128 /* StringLiteral */ : 8576 /* StringOrNumberLiteralOrUnique */; - if (isMappedTypeWithKeyofConstraintDeclaration(type)) { - forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType); - } else { - forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType); - } - setStructuredTypeMembers(type, members, emptyArray, emptyArray, indexInfos || emptyArray); - function addMemberForKeyType(keyType) { - const propNameType = nameType ? instantiateType(nameType, appendTypeMapping(type.mapper, typeParameter, keyType)) : keyType; - forEachType(propNameType, (t) => addMemberForKeyTypeWorker(keyType, t)); - } - function addMemberForKeyTypeWorker(keyType, propNameType) { - if (isTypeUsableAsPropertyName(propNameType)) { - const propName = getPropertyNameFromType(propNameType); - const existingProp = members.get(propName); - if (existingProp) { - existingProp.links.nameType = getUnionType([existingProp.links.nameType, propNameType]); - existingProp.links.keyType = getUnionType([existingProp.links.keyType, keyType]); - } else { - const modifiersProp = isTypeUsableAsPropertyName(keyType) ? getPropertyOfType(modifiersType, getPropertyNameFromType(keyType)) : void 0; - const isOptional = !!(templateModifiers & 4 /* IncludeOptional */ || !(templateModifiers & 8 /* ExcludeOptional */) && modifiersProp && modifiersProp.flags & 16777216 /* Optional */); - const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && modifiersProp && isReadonlySymbol(modifiersProp)); - const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */; - const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0; - const prop = createSymbol( - 4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), - propName, - lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0) - ); - prop.links.mappedType = type; - prop.links.nameType = propNameType; - prop.links.keyType = keyType; - if (modifiersProp) { - prop.links.syntheticOrigin = modifiersProp; - prop.declarations = shouldLinkPropDeclarations ? modifiersProp.declarations : void 0; - } - members.set(propName, prop); - } - } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) { - const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType; - const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType)); - const indexInfo = createIndexInfo(indexKeyType, propType, !!(templateModifiers & 1 /* IncludeReadonly */)); - indexInfos = appendIndexInfo( - indexInfos, - indexInfo, - /*union*/ - true - ); - } - } - } - function getTypeOfMappedSymbol(symbol) { - if (!symbol.links.type) { - const mappedType = symbol.links.mappedType; - if (!pushTypeResolution(symbol, 0 /* Type */)) { - mappedType.containsError = true; - return errorType; - } - const templateType = getTemplateTypeFromMappedType(mappedType.target || mappedType); - const mapper = appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), symbol.links.keyType); - const propType = instantiateType(templateType, mapper); - let type = strictNullChecks && symbol.flags & 16777216 /* Optional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType( - propType, - /*isProperty*/ - true - ) : symbol.links.checkFlags & 524288 /* StripOptional */ ? removeMissingOrUndefinedType(propType) : propType; - if (!popTypeResolution()) { - error2(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType)); - type = errorType; - } - symbol.links.type = type; - } - return symbol.links.type; - } - function getTypeParameterFromMappedType(type) { - return type.typeParameter || (type.typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(type.declaration.typeParameter))); - } - function getConstraintTypeFromMappedType(type) { - return type.constraintType || (type.constraintType = getConstraintOfTypeParameter(getTypeParameterFromMappedType(type)) || errorType); - } - function getNameTypeFromMappedType(type) { - return type.declaration.nameType ? type.nameType || (type.nameType = instantiateType(getTypeFromTypeNode(type.declaration.nameType), type.mapper)) : void 0; - } - function getTemplateTypeFromMappedType(type) { - return type.templateType || (type.templateType = type.declaration.type ? instantiateType(addOptionality( - getTypeFromTypeNode(type.declaration.type), - /*isProperty*/ - true, - !!(getMappedTypeModifiers(type) & 4 /* IncludeOptional */) - ), type.mapper) : errorType); - } - function getConstraintDeclarationForMappedType(type) { - return getEffectiveConstraintOfTypeParameter(type.declaration.typeParameter); - } - function isMappedTypeWithKeyofConstraintDeclaration(type) { - const constraintDeclaration = getConstraintDeclarationForMappedType(type); - return constraintDeclaration.kind === 198 /* TypeOperator */ && constraintDeclaration.operator === 143 /* KeyOfKeyword */; - } - function getModifiersTypeFromMappedType(type) { - if (!type.modifiersType) { - if (isMappedTypeWithKeyofConstraintDeclaration(type)) { - type.modifiersType = instantiateType(getTypeFromTypeNode(getConstraintDeclarationForMappedType(type).type), type.mapper); - } else { - const declaredType = getTypeFromMappedTypeNode(type.declaration); - const constraint = getConstraintTypeFromMappedType(declaredType); - const extendedConstraint = constraint && constraint.flags & 262144 /* TypeParameter */ ? getConstraintOfTypeParameter(constraint) : constraint; - type.modifiersType = extendedConstraint && extendedConstraint.flags & 4194304 /* Index */ ? instantiateType(extendedConstraint.type, type.mapper) : unknownType; - } - } - return type.modifiersType; - } - function getMappedTypeModifiers(type) { - const declaration = type.declaration; - return (declaration.readonlyToken ? declaration.readonlyToken.kind === 41 /* MinusToken */ ? 2 /* ExcludeReadonly */ : 1 /* IncludeReadonly */ : 0) | (declaration.questionToken ? declaration.questionToken.kind === 41 /* MinusToken */ ? 8 /* ExcludeOptional */ : 4 /* IncludeOptional */ : 0); - } - function getMappedTypeOptionality(type) { - const modifiers = getMappedTypeModifiers(type); - return modifiers & 8 /* ExcludeOptional */ ? -1 : modifiers & 4 /* IncludeOptional */ ? 1 : 0; - } - function getCombinedMappedTypeOptionality(type) { - const optionality = getMappedTypeOptionality(type); - const modifiersType = getModifiersTypeFromMappedType(type); - return optionality || (isGenericMappedType(modifiersType) ? getMappedTypeOptionality(modifiersType) : 0); - } - function isPartialMappedType(type) { - return !!(getObjectFlags(type) & 32 /* Mapped */ && getMappedTypeModifiers(type) & 4 /* IncludeOptional */); - } - function isGenericMappedType(type) { - if (getObjectFlags(type) & 32 /* Mapped */) { - const constraint = getConstraintTypeFromMappedType(type); - if (isGenericIndexType(constraint)) { - return true; - } - const nameType = getNameTypeFromMappedType(type); - if (nameType && isGenericIndexType(instantiateType(nameType, makeUnaryTypeMapper(getTypeParameterFromMappedType(type), constraint)))) { - return true; - } - } - return false; - } - function isFilteringMappedType(type) { - const nameType = getNameTypeFromMappedType(type); - return !!nameType && isTypeAssignableTo(nameType, getTypeParameterFromMappedType(type)); - } - function resolveStructuredTypeMembers(type) { - if (!type.members) { - if (type.flags & 524288 /* Object */) { - if (type.objectFlags & 4 /* Reference */) { - resolveTypeReferenceMembers(type); - } else if (type.objectFlags & 3 /* ClassOrInterface */) { - resolveClassOrInterfaceMembers(type); - } else if (type.objectFlags & 1024 /* ReverseMapped */) { - resolveReverseMappedTypeMembers(type); - } else if (type.objectFlags & 16 /* Anonymous */) { - resolveAnonymousTypeMembers(type); - } else if (type.objectFlags & 32 /* Mapped */) { - resolveMappedTypeMembers(type); - } else { - Debug.fail("Unhandled object type " + Debug.formatObjectFlags(type.objectFlags)); - } - } else if (type.flags & 1048576 /* Union */) { - resolveUnionTypeMembers(type); - } else if (type.flags & 2097152 /* Intersection */) { - resolveIntersectionTypeMembers(type); - } else { - Debug.fail("Unhandled type " + Debug.formatTypeFlags(type.flags)); - } - } - return type; - } - function getPropertiesOfObjectType(type) { - if (type.flags & 524288 /* Object */) { - return resolveStructuredTypeMembers(type).properties; - } - return emptyArray; - } - function getPropertyOfObjectType(type, name) { - if (type.flags & 524288 /* Object */) { - const resolved = resolveStructuredTypeMembers(type); - const symbol = resolved.members.get(name); - if (symbol && symbolIsValue(symbol)) { - return symbol; - } - } - } - function getPropertiesOfUnionOrIntersectionType(type) { - if (!type.resolvedProperties) { - const members = createSymbolTable(); - for (const current of type.types) { - for (const prop of getPropertiesOfType(current)) { - if (!members.has(prop.escapedName)) { - const combinedProp = getPropertyOfUnionOrIntersectionType(type, prop.escapedName); - if (combinedProp) { - members.set(prop.escapedName, combinedProp); - } - } - } - if (type.flags & 1048576 /* Union */ && getIndexInfosOfType(current).length === 0) { - break; - } - } - type.resolvedProperties = getNamedMembers(members); - } - return type.resolvedProperties; - } - function getPropertiesOfType(type) { - type = getReducedApparentType(type); - return type.flags & 3145728 /* UnionOrIntersection */ ? getPropertiesOfUnionOrIntersectionType(type) : getPropertiesOfObjectType(type); - } - function forEachPropertyOfType(type, action) { - type = getReducedApparentType(type); - if (type.flags & 3670016 /* StructuredType */) { - resolveStructuredTypeMembers(type).members.forEach((symbol, escapedName) => { - if (isNamedMember(symbol, escapedName)) { - action(symbol, escapedName); - } - }); - } - } - function isTypeInvalidDueToUnionDiscriminant(contextualType, obj) { - const list = obj.properties; - return list.some((property) => { - const nameType = property.name && (isJsxNamespacedName(property.name) ? getStringLiteralType(getTextOfJsxAttributeName(property.name)) : getLiteralTypeFromPropertyName(property.name)); - const name = nameType && isTypeUsableAsPropertyName(nameType) ? getPropertyNameFromType(nameType) : void 0; - const expected = name === void 0 ? void 0 : getTypeOfPropertyOfType(contextualType, name); - return !!expected && isLiteralType(expected) && !isTypeAssignableTo(getTypeOfNode(property), expected); - }); - } - function getAllPossiblePropertiesOfTypes(types) { - const unionType = getUnionType(types); - if (!(unionType.flags & 1048576 /* Union */)) { - return getAugmentedPropertiesOfType(unionType); - } - const props = createSymbolTable(); - for (const memberType of types) { - for (const { escapedName } of getAugmentedPropertiesOfType(memberType)) { - if (!props.has(escapedName)) { - const prop = createUnionOrIntersectionProperty(unionType, escapedName); - if (prop) - props.set(escapedName, prop); - } - } - } - return arrayFrom(props.values()); - } - function getConstraintOfType(type) { - return type.flags & 262144 /* TypeParameter */ ? getConstraintOfTypeParameter(type) : type.flags & 8388608 /* IndexedAccess */ ? getConstraintOfIndexedAccess(type) : type.flags & 16777216 /* Conditional */ ? getConstraintOfConditionalType(type) : getBaseConstraintOfType(type); - } - function getConstraintOfTypeParameter(typeParameter) { - return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : void 0; - } - function isConstTypeVariable(type, depth = 0) { - var _a; - return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); - } - function getConstraintOfIndexedAccess(type) { - return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0; - } - function getSimplifiedTypeOrConstraint(type) { - const simplified = getSimplifiedType( - type, - /*writing*/ - false - ); - return simplified !== type ? simplified : getConstraintOfType(type); - } - function getConstraintFromIndexedAccess(type) { - if (isMappedTypeGenericIndexedAccess(type) || isGenericMappedType(type.objectType)) { - return substituteIndexedMappedType(type.objectType, type.indexType); - } - const indexConstraint = getSimplifiedTypeOrConstraint(type.indexType); - if (indexConstraint && indexConstraint !== type.indexType) { - const indexedAccess = getIndexedAccessTypeOrUndefined(type.objectType, indexConstraint, type.accessFlags); - if (indexedAccess) { - return indexedAccess; - } - } - const objectConstraint = getSimplifiedTypeOrConstraint(type.objectType); - if (objectConstraint && objectConstraint !== type.objectType) { - return getIndexedAccessTypeOrUndefined(objectConstraint, type.indexType, type.accessFlags); - } - return void 0; - } - function getDefaultConstraintOfConditionalType(type) { - if (!type.resolvedDefaultConstraint) { - const trueConstraint = getInferredTrueTypeFromConditionalType(type); - const falseConstraint = getFalseTypeFromConditionalType(type); - type.resolvedDefaultConstraint = isTypeAny(trueConstraint) ? falseConstraint : isTypeAny(falseConstraint) ? trueConstraint : getUnionType([trueConstraint, falseConstraint]); - } - return type.resolvedDefaultConstraint; - } - function getConstraintOfDistributiveConditionalType(type) { - if (type.resolvedConstraintOfDistributive !== void 0) { - return type.resolvedConstraintOfDistributive || void 0; - } - if (type.root.isDistributive && type.restrictiveInstantiation !== type) { - const simplified = getSimplifiedType( - type.checkType, - /*writing*/ - false - ); - const constraint = simplified === type.checkType ? getConstraintOfType(simplified) : simplified; - if (constraint && constraint !== type.checkType) { - const instantiated = getConditionalTypeInstantiation(type, prependTypeMapping(type.root.checkType, constraint, type.mapper)); - if (!(instantiated.flags & 131072 /* Never */)) { - type.resolvedConstraintOfDistributive = instantiated; - return instantiated; - } - } - } - type.resolvedConstraintOfDistributive = false; - return void 0; - } - function getConstraintFromConditionalType(type) { - return getConstraintOfDistributiveConditionalType(type) || getDefaultConstraintOfConditionalType(type); - } - function getConstraintOfConditionalType(type) { - return hasNonCircularBaseConstraint(type) ? getConstraintFromConditionalType(type) : void 0; - } - function getEffectiveConstraintOfIntersection(types, targetIsUnion) { - let constraints; - let hasDisjointDomainType = false; - for (const t of types) { - if (t.flags & 465829888 /* Instantiable */) { - let constraint = getConstraintOfType(t); - while (constraint && constraint.flags & (262144 /* TypeParameter */ | 4194304 /* Index */ | 16777216 /* Conditional */)) { - constraint = getConstraintOfType(constraint); - } - if (constraint) { - constraints = append(constraints, constraint); - if (targetIsUnion) { - constraints = append(constraints, t); - } - } - } else if (t.flags & 469892092 /* DisjointDomains */ || isEmptyAnonymousObjectType(t)) { - hasDisjointDomainType = true; - } - } - if (constraints && (targetIsUnion || hasDisjointDomainType)) { - if (hasDisjointDomainType) { - for (const t of types) { - if (t.flags & 469892092 /* DisjointDomains */ || isEmptyAnonymousObjectType(t)) { - constraints = append(constraints, t); - } - } - } - return getNormalizedType( - getIntersectionType(constraints), - /*writing*/ - false - ); - } - return void 0; - } - function getBaseConstraintOfType(type) { - if (type.flags & (58982400 /* InstantiableNonPrimitive */ | 3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || isGenericTupleType(type)) { - const constraint = getResolvedBaseConstraint(type); - return constraint !== noConstraintType && constraint !== circularConstraintType ? constraint : void 0; - } - return type.flags & 4194304 /* Index */ ? keyofConstraintType : void 0; - } - function getBaseConstraintOrType(type) { - return getBaseConstraintOfType(type) || type; - } - function hasNonCircularBaseConstraint(type) { - return getResolvedBaseConstraint(type) !== circularConstraintType; - } - function getResolvedBaseConstraint(type) { - if (type.resolvedBaseConstraint) { - return type.resolvedBaseConstraint; - } - const stack = []; - return type.resolvedBaseConstraint = getImmediateBaseConstraint(type); - function getImmediateBaseConstraint(t) { - if (!t.immediateBaseConstraint) { - if (!pushTypeResolution(t, 4 /* ImmediateBaseConstraint */)) { - return circularConstraintType; - } - let result; - const identity2 = getRecursionIdentity(t); - if (stack.length < 10 || stack.length < 50 && !contains(stack, identity2)) { - stack.push(identity2); - result = computeBaseConstraint(getSimplifiedType( - t, - /*writing*/ - false - )); - stack.pop(); - } - if (!popTypeResolution()) { - if (t.flags & 262144 /* TypeParameter */) { - const errorNode = getConstraintDeclaration(t); - if (errorNode) { - const diagnostic = error2(errorNode, Diagnostics.Type_parameter_0_has_a_circular_constraint, typeToString(t)); - if (currentNode && !isNodeDescendantOf(errorNode, currentNode) && !isNodeDescendantOf(currentNode, errorNode)) { - addRelatedInfo(diagnostic, createDiagnosticForNode(currentNode, Diagnostics.Circularity_originates_in_type_at_this_location)); - } - } - } - result = circularConstraintType; - } - t.immediateBaseConstraint = result || noConstraintType; - } - return t.immediateBaseConstraint; - } - function getBaseConstraint(t) { - const c = getImmediateBaseConstraint(t); - return c !== noConstraintType && c !== circularConstraintType ? c : void 0; - } - function computeBaseConstraint(t) { - if (t.flags & 262144 /* TypeParameter */) { - const constraint = getConstraintFromTypeParameter(t); - return t.isThisType || !constraint ? constraint : getBaseConstraint(constraint); - } - if (t.flags & 3145728 /* UnionOrIntersection */) { - const types = t.types; - const baseTypes = []; - let different = false; - for (const type2 of types) { - const baseType = getBaseConstraint(type2); - if (baseType) { - if (baseType !== type2) { - different = true; - } - baseTypes.push(baseType); - } else { - different = true; - } - } - if (!different) { - return t; - } - return t.flags & 1048576 /* Union */ && baseTypes.length === types.length ? getUnionType(baseTypes) : t.flags & 2097152 /* Intersection */ && baseTypes.length ? getIntersectionType(baseTypes) : void 0; - } - if (t.flags & 4194304 /* Index */) { - return keyofConstraintType; - } - if (t.flags & 134217728 /* TemplateLiteral */) { - const types = t.types; - const constraints = mapDefined(types, getBaseConstraint); - return constraints.length === types.length ? getTemplateLiteralType(t.texts, constraints) : stringType; - } - if (t.flags & 268435456 /* StringMapping */) { - const constraint = getBaseConstraint(t.type); - return constraint && constraint !== t.type ? getStringMappingType(t.symbol, constraint) : stringType; - } - if (t.flags & 8388608 /* IndexedAccess */) { - if (isMappedTypeGenericIndexedAccess(t)) { - return getBaseConstraint(substituteIndexedMappedType(t.objectType, t.indexType)); - } - const baseObjectType = getBaseConstraint(t.objectType); - const baseIndexType = getBaseConstraint(t.indexType); - const baseIndexedAccess = baseObjectType && baseIndexType && getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType, t.accessFlags); - return baseIndexedAccess && getBaseConstraint(baseIndexedAccess); - } - if (t.flags & 16777216 /* Conditional */) { - const constraint = getConstraintFromConditionalType(t); - return constraint && getBaseConstraint(constraint); - } - if (t.flags & 33554432 /* Substitution */) { - return getBaseConstraint(getSubstitutionIntersection(t)); - } - if (isGenericTupleType(t)) { - const newElements = map(getElementTypes(t), (v, i) => { - const constraint = v.flags & 262144 /* TypeParameter */ && t.target.elementFlags[i] & 8 /* Variadic */ && getBaseConstraint(v) || v; - return constraint !== v && everyType(constraint, (c) => isArrayOrTupleType(c) && !isGenericTupleType(c)) ? constraint : v; - }); - return createTupleType(newElements, t.target.elementFlags, t.target.readonly, t.target.labeledElementDeclarations); - } - return t; - } - } - function getApparentTypeOfIntersectionType(type, thisArgument) { - return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument( - type, - thisArgument, - /*needApparentType*/ - true - )); - } - function getResolvedTypeParameterDefault(typeParameter) { - if (!typeParameter.default) { - if (typeParameter.target) { - const targetDefault = getResolvedTypeParameterDefault(typeParameter.target); - typeParameter.default = targetDefault ? instantiateType(targetDefault, typeParameter.mapper) : noConstraintType; - } else { - typeParameter.default = resolvingDefaultType; - const defaultDeclaration = typeParameter.symbol && forEach(typeParameter.symbol.declarations, (decl) => isTypeParameterDeclaration(decl) && decl.default); - const defaultType = defaultDeclaration ? getTypeFromTypeNode(defaultDeclaration) : noConstraintType; - if (typeParameter.default === resolvingDefaultType) { - typeParameter.default = defaultType; - } - } - } else if (typeParameter.default === resolvingDefaultType) { - typeParameter.default = circularConstraintType; - } - return typeParameter.default; - } - function getDefaultFromTypeParameter(typeParameter) { - const defaultType = getResolvedTypeParameterDefault(typeParameter); - return defaultType !== noConstraintType && defaultType !== circularConstraintType ? defaultType : void 0; - } - function hasNonCircularTypeParameterDefault(typeParameter) { - return getResolvedTypeParameterDefault(typeParameter) !== circularConstraintType; - } - function hasTypeParameterDefault(typeParameter) { - return !!(typeParameter.symbol && forEach(typeParameter.symbol.declarations, (decl) => isTypeParameterDeclaration(decl) && decl.default)); - } - function getApparentTypeOfMappedType(type) { - return type.resolvedApparentType || (type.resolvedApparentType = getResolvedApparentTypeOfMappedType(type)); - } - function getResolvedApparentTypeOfMappedType(type) { - const typeVariable = getHomomorphicTypeVariable(type); - if (typeVariable && !type.declaration.nameType) { - const constraint = getConstraintOfTypeParameter(typeVariable); - if (constraint && everyType(constraint, isArrayOrTupleType)) { - return instantiateType(type, prependTypeMapping(typeVariable, constraint, type.mapper)); - } - } - return type; - } - function isMappedTypeGenericIndexedAccess(type) { - let objectType; - return !!(type.flags & 8388608 /* IndexedAccess */ && getObjectFlags(objectType = type.objectType) & 32 /* Mapped */ && !isGenericMappedType(objectType) && isGenericIndexType(type.indexType) && !(getMappedTypeModifiers(objectType) & 8 /* ExcludeOptional */) && !objectType.declaration.nameType); - } - function getApparentType(type) { - const t = type.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(type) || unknownType : type; - const objectFlags = getObjectFlags(t); - return objectFlags & 32 /* Mapped */ ? getApparentTypeOfMappedType(t) : objectFlags & 4 /* Reference */ && t !== type ? getTypeWithThisArgument(t, type) : t.flags & 2097152 /* Intersection */ ? getApparentTypeOfIntersectionType(t, type) : t.flags & 402653316 /* StringLike */ ? globalStringType : t.flags & 296 /* NumberLike */ ? globalNumberType : t.flags & 2112 /* BigIntLike */ ? getGlobalBigIntType() : t.flags & 528 /* BooleanLike */ ? globalBooleanType : t.flags & 12288 /* ESSymbolLike */ ? getGlobalESSymbolType() : t.flags & 67108864 /* NonPrimitive */ ? emptyObjectType : t.flags & 4194304 /* Index */ ? keyofConstraintType : t.flags & 2 /* Unknown */ && !strictNullChecks ? emptyObjectType : t; - } - function getReducedApparentType(type) { - return getReducedType(getApparentType(getReducedType(type))); - } - function createUnionOrIntersectionProperty(containingType, name, skipObjectFunctionPropertyAugment) { - var _a, _b, _c; - let singleProp; - let propSet; - let indexTypes; - const isUnion = containingType.flags & 1048576 /* Union */; - let optionalFlag; - let syntheticFlag = 4 /* SyntheticMethod */; - let checkFlags = isUnion ? 0 : 8 /* Readonly */; - let mergedInstantiations = false; - for (const current of containingType.types) { - const type = getApparentType(current); - if (!(isErrorType(type) || type.flags & 131072 /* Never */)) { - const prop = getPropertyOfType(type, name, skipObjectFunctionPropertyAugment); - const modifiers = prop ? getDeclarationModifierFlagsFromSymbol(prop) : 0; - if (prop) { - if (prop.flags & 106500 /* ClassMember */) { - optionalFlag ?? (optionalFlag = isUnion ? 0 /* None */ : 16777216 /* Optional */); - if (isUnion) { - optionalFlag |= prop.flags & 16777216 /* Optional */; - } else { - optionalFlag &= prop.flags; - } - } - if (!singleProp) { - singleProp = prop; - } else if (prop !== singleProp) { - const isInstantiation = (getTargetSymbol(prop) || prop) === (getTargetSymbol(singleProp) || singleProp); - if (isInstantiation && compareProperties2(singleProp, prop, (a, b) => a === b ? -1 /* True */ : 0 /* False */) === -1 /* True */) { - mergedInstantiations = !!singleProp.parent && !!length(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(singleProp.parent)); - } else { - if (!propSet) { - propSet = /* @__PURE__ */ new Map(); - propSet.set(getSymbolId(singleProp), singleProp); - } - const id = getSymbolId(prop); - if (!propSet.has(id)) { - propSet.set(id, prop); - } - } - } - if (isUnion && isReadonlySymbol(prop)) { - checkFlags |= 8 /* Readonly */; - } else if (!isUnion && !isReadonlySymbol(prop)) { - checkFlags &= ~8 /* Readonly */; - } - checkFlags |= (!(modifiers & 24 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 16 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 8 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 32 /* Static */ ? 2048 /* ContainsStatic */ : 0); - if (!isPrototypeProperty(prop)) { - syntheticFlag = 2 /* SyntheticProperty */; - } - } else if (isUnion) { - const indexInfo = !isLateBoundName(name) && getApplicableIndexInfoForName(type, name); - if (indexInfo) { - checkFlags |= 32 /* WritePartial */ | (indexInfo.isReadonly ? 8 /* Readonly */ : 0); - indexTypes = append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type); - } else if (isObjectLiteralType2(type) && !(getObjectFlags(type) & 2097152 /* ContainsSpread */)) { - checkFlags |= 32 /* WritePartial */; - indexTypes = append(indexTypes, undefinedType); - } else { - checkFlags |= 16 /* ReadPartial */; - } - } - } - } - if (!singleProp || isUnion && (propSet || checkFlags & 48 /* Partial */) && checkFlags & (1024 /* ContainsPrivate */ | 512 /* ContainsProtected */) && !(propSet && getCommonDeclarationsOfSymbols(propSet.values()))) { - return void 0; - } - if (!propSet && !(checkFlags & 16 /* ReadPartial */) && !indexTypes) { - if (mergedInstantiations) { - const links = (_a = tryCast(singleProp, isTransientSymbol)) == null ? void 0 : _a.links; - const clone2 = createSymbolWithType(singleProp, links == null ? void 0 : links.type); - clone2.parent = (_c = (_b = singleProp.valueDeclaration) == null ? void 0 : _b.symbol) == null ? void 0 : _c.parent; - clone2.links.containingType = containingType; - clone2.links.mapper = links == null ? void 0 : links.mapper; - return clone2; - } else { - return singleProp; - } - } - const props = propSet ? arrayFrom(propSet.values()) : [singleProp]; - let declarations; - let firstType; - let nameType; - const propTypes = []; - let writeTypes; - let firstValueDeclaration; - let hasNonUniformValueDeclaration = false; - for (const prop of props) { - if (!firstValueDeclaration) { - firstValueDeclaration = prop.valueDeclaration; - } else if (prop.valueDeclaration && prop.valueDeclaration !== firstValueDeclaration) { - hasNonUniformValueDeclaration = true; - } - declarations = addRange(declarations, prop.declarations); - const type = getTypeOfSymbol(prop); - if (!firstType) { - firstType = type; - nameType = getSymbolLinks(prop).nameType; - } - const writeType = getWriteTypeOfSymbol(prop); - if (writeTypes || writeType !== type) { - writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType); - } else if (type !== firstType) { - checkFlags |= 64 /* HasNonUniformType */; - } - if (isLiteralType(type) || isPatternLiteralType(type)) { - checkFlags |= 128 /* HasLiteralType */; - } - if (type.flags & 131072 /* Never */ && type !== uniqueLiteralType) { - checkFlags |= 131072 /* HasNeverType */; - } - propTypes.push(type); - } - addRange(propTypes, indexTypes); - const result = createSymbol(4 /* Property */ | (optionalFlag ?? 0), name, syntheticFlag | checkFlags); - result.links.containingType = containingType; - if (!hasNonUniformValueDeclaration && firstValueDeclaration) { - result.valueDeclaration = firstValueDeclaration; - if (firstValueDeclaration.symbol.parent) { - result.parent = firstValueDeclaration.symbol.parent; - } - } - result.declarations = declarations; - result.links.nameType = nameType; - if (propTypes.length > 2) { - result.links.checkFlags |= 65536 /* DeferredType */; - result.links.deferralParent = containingType; - result.links.deferralConstituents = propTypes; - result.links.deferralWriteConstituents = writeTypes; - } else { - result.links.type = isUnion ? getUnionType(propTypes) : getIntersectionType(propTypes); - if (writeTypes) { - result.links.writeType = isUnion ? getUnionType(writeTypes) : getIntersectionType(writeTypes); - } - } - return result; - } - function getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment) { - var _a, _b; - let property = ((_a = type.propertyCacheWithoutObjectFunctionPropertyAugment) == null ? void 0 : _a.get(name)) || !skipObjectFunctionPropertyAugment ? (_b = type.propertyCache) == null ? void 0 : _b.get(name) : void 0; - if (!property) { - property = createUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment); - if (property) { - const properties = skipObjectFunctionPropertyAugment ? type.propertyCacheWithoutObjectFunctionPropertyAugment || (type.propertyCacheWithoutObjectFunctionPropertyAugment = createSymbolTable()) : type.propertyCache || (type.propertyCache = createSymbolTable()); - properties.set(name, property); - } - } - return property; - } - function getCommonDeclarationsOfSymbols(symbols) { - let commonDeclarations; - for (const symbol of symbols) { - if (!symbol.declarations) { - return void 0; - } - if (!commonDeclarations) { - commonDeclarations = new Set(symbol.declarations); - continue; - } - commonDeclarations.forEach((declaration) => { - if (!contains(symbol.declarations, declaration)) { - commonDeclarations.delete(declaration); - } - }); - if (commonDeclarations.size === 0) { - return void 0; - } - } - return commonDeclarations; - } - function getPropertyOfUnionOrIntersectionType(type, name, skipObjectFunctionPropertyAugment) { - const property = getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment); - return property && !(getCheckFlags(property) & 16 /* ReadPartial */) ? property : void 0; - } - function getReducedType(type) { - if (type.flags & 1048576 /* Union */ && type.objectFlags & 16777216 /* ContainsIntersections */) { - return type.resolvedReducedType || (type.resolvedReducedType = getReducedUnionType(type)); - } else if (type.flags & 2097152 /* Intersection */) { - if (!(type.objectFlags & 16777216 /* IsNeverIntersectionComputed */)) { - type.objectFlags |= 16777216 /* IsNeverIntersectionComputed */ | (some(getPropertiesOfUnionOrIntersectionType(type), isNeverReducedProperty) ? 33554432 /* IsNeverIntersection */ : 0); - } - return type.objectFlags & 33554432 /* IsNeverIntersection */ ? neverType : type; - } - return type; - } - function getReducedUnionType(unionType) { - const reducedTypes = sameMap(unionType.types, getReducedType); - if (reducedTypes === unionType.types) { - return unionType; - } - const reduced = getUnionType(reducedTypes); - if (reduced.flags & 1048576 /* Union */) { - reduced.resolvedReducedType = reduced; - } - return reduced; - } - function isNeverReducedProperty(prop) { - return isDiscriminantWithNeverType(prop) || isConflictingPrivateProperty(prop); - } - function isDiscriminantWithNeverType(prop) { - return !(prop.flags & 16777216 /* Optional */) && (getCheckFlags(prop) & (192 /* Discriminant */ | 131072 /* HasNeverType */)) === 192 /* Discriminant */ && !!(getTypeOfSymbol(prop).flags & 131072 /* Never */); - } - function isConflictingPrivateProperty(prop) { - return !prop.valueDeclaration && !!(getCheckFlags(prop) & 1024 /* ContainsPrivate */); - } - function isGenericReducibleType(type) { - return !!(type.flags & 1048576 /* Union */ && type.objectFlags & 16777216 /* ContainsIntersections */ && some(type.types, isGenericReducibleType) || type.flags & 2097152 /* Intersection */ && isReducibleIntersection(type)); - } - function isReducibleIntersection(type) { - const uniqueFilled = type.uniqueLiteralFilledInstantiation || (type.uniqueLiteralFilledInstantiation = instantiateType(type, uniqueLiteralMapper)); - return getReducedType(uniqueFilled) !== uniqueFilled; - } - function elaborateNeverIntersection(errorInfo, type) { - if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 33554432 /* IsNeverIntersection */) { - const neverProp = find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType); - if (neverProp) { - return chainDiagnosticMessages( - errorInfo, - Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 536870912 /* NoTypeReduction */ - ), - symbolToString(neverProp) - ); - } - const privateProp = find(getPropertiesOfUnionOrIntersectionType(type), isConflictingPrivateProperty); - if (privateProp) { - return chainDiagnosticMessages( - errorInfo, - Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 536870912 /* NoTypeReduction */ - ), - symbolToString(privateProp) - ); - } - } - return errorInfo; - } - function getPropertyOfType(type, name, skipObjectFunctionPropertyAugment, includeTypeOnlyMembers) { - type = getReducedApparentType(type); - if (type.flags & 524288 /* Object */) { - const resolved = resolveStructuredTypeMembers(type); - const symbol = resolved.members.get(name); - if (symbol && symbolIsValue(symbol, includeTypeOnlyMembers)) { - return symbol; - } - if (skipObjectFunctionPropertyAugment) - return void 0; - const functionType = resolved === anyFunctionType ? globalFunctionType : resolved.callSignatures.length ? globalCallableFunctionType : resolved.constructSignatures.length ? globalNewableFunctionType : void 0; - if (functionType) { - const symbol2 = getPropertyOfObjectType(functionType, name); - if (symbol2) { - return symbol2; - } - } - return getPropertyOfObjectType(globalObjectType, name); - } - if (type.flags & 3145728 /* UnionOrIntersection */) { - return getPropertyOfUnionOrIntersectionType(type, name, skipObjectFunctionPropertyAugment); - } - return void 0; - } - function getSignaturesOfStructuredType(type, kind) { - if (type.flags & 3670016 /* StructuredType */) { - const resolved = resolveStructuredTypeMembers(type); - return kind === 0 /* Call */ ? resolved.callSignatures : resolved.constructSignatures; - } - return emptyArray; - } - function getSignaturesOfType(type, kind) { - const result = getSignaturesOfStructuredType(getReducedApparentType(type), kind); - if (kind === 0 /* Call */ && !length(result) && type.flags & 1048576 /* Union */) { - if (type.arrayFallbackSignatures) { - return type.arrayFallbackSignatures; - } - let memberName; - if (everyType(type, (t) => { - var _a; - return !!((_a = t.symbol) == null ? void 0 : _a.parent) && isArrayOrTupleSymbol(t.symbol.parent) && (!memberName ? (memberName = t.symbol.escapedName, true) : memberName === t.symbol.escapedName); - })) { - const arrayArg = mapType(type, (t) => getMappedType((isReadonlyArraySymbol(t.symbol.parent) ? globalReadonlyArrayType : globalArrayType).typeParameters[0], t.mapper)); - const arrayType = createArrayType(arrayArg, someType(type, (t) => isReadonlyArraySymbol(t.symbol.parent))); - return type.arrayFallbackSignatures = getSignaturesOfType(getTypeOfPropertyOfType(arrayType, memberName), kind); - } - type.arrayFallbackSignatures = result; - } - return result; - } - function isArrayOrTupleSymbol(symbol) { - if (!symbol || !globalArrayType.symbol || !globalReadonlyArrayType.symbol) { - return false; - } - return !!getSymbolIfSameReference(symbol, globalArrayType.symbol) || !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); - } - function isReadonlyArraySymbol(symbol) { - if (!symbol || !globalReadonlyArrayType.symbol) { - return false; - } - return !!getSymbolIfSameReference(symbol, globalReadonlyArrayType.symbol); - } - function findIndexInfo(indexInfos, keyType) { - return find(indexInfos, (info) => info.keyType === keyType); - } - function findApplicableIndexInfo(indexInfos, keyType) { - let stringIndexInfo; - let applicableInfo; - let applicableInfos; - for (const info of indexInfos) { - if (info.keyType === stringType) { - stringIndexInfo = info; - } else if (isApplicableIndexType(keyType, info.keyType)) { - if (!applicableInfo) { - applicableInfo = info; - } else { - (applicableInfos || (applicableInfos = [applicableInfo])).push(info); - } - } - } - return applicableInfos ? createIndexInfo( - unknownType, - getIntersectionType(map(applicableInfos, (info) => info.type)), - reduceLeft( - applicableInfos, - (isReadonly, info) => isReadonly && info.isReadonly, - /*initial*/ - true - ) - ) : applicableInfo ? applicableInfo : stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo : void 0; - } - function isApplicableIndexType(source, target) { - return isTypeAssignableTo(source, target) || target === stringType && isTypeAssignableTo(source, numberType) || target === numberType && (source === numericStringType || !!(source.flags & 128 /* StringLiteral */) && isNumericLiteralName(source.value)); - } - function getIndexInfosOfStructuredType(type) { - if (type.flags & 3670016 /* StructuredType */) { - const resolved = resolveStructuredTypeMembers(type); - return resolved.indexInfos; - } - return emptyArray; - } - function getIndexInfosOfType(type) { - return getIndexInfosOfStructuredType(getReducedApparentType(type)); - } - function getIndexInfoOfType(type, keyType) { - return findIndexInfo(getIndexInfosOfType(type), keyType); - } - function getIndexTypeOfType(type, keyType) { - var _a; - return (_a = getIndexInfoOfType(type, keyType)) == null ? void 0 : _a.type; - } - function getApplicableIndexInfos(type, keyType) { - return getIndexInfosOfType(type).filter((info) => isApplicableIndexType(keyType, info.keyType)); - } - function getApplicableIndexInfo(type, keyType) { - return findApplicableIndexInfo(getIndexInfosOfType(type), keyType); - } - function getApplicableIndexInfoForName(type, name) { - return getApplicableIndexInfo(type, isLateBoundName(name) ? esSymbolType : getStringLiteralType(unescapeLeadingUnderscores(name))); - } - function getTypeParametersFromDeclaration(declaration) { - var _a; - let result; - for (const node of getEffectiveTypeParameterDeclarations(declaration)) { - result = appendIfUnique(result, getDeclaredTypeOfTypeParameter(node.symbol)); - } - return (result == null ? void 0 : result.length) ? result : isFunctionDeclaration(declaration) ? (_a = getSignatureOfTypeTag(declaration)) == null ? void 0 : _a.typeParameters : void 0; - } - function symbolsToArray(symbols) { - const result = []; - symbols.forEach((symbol, id) => { - if (!isReservedMemberName(id)) { - result.push(symbol); - } - }); - return result; - } - function tryFindAmbientModule(moduleName, withAugmentations) { - if (isExternalModuleNameRelative(moduleName)) { - return void 0; - } - const symbol = getSymbol2(globals, '"' + moduleName + '"', 512 /* ValueModule */); - return symbol && withAugmentations ? getMergedSymbol(symbol) : symbol; - } - function isOptionalParameter(node) { - if (hasQuestionToken(node) || isOptionalJSDocPropertyLikeTag(node) || isJSDocOptionalParameter(node)) { - return true; - } - if (node.initializer) { - const signature = getSignatureFromDeclaration(node.parent); - const parameterIndex = node.parent.parameters.indexOf(node); - Debug.assert(parameterIndex >= 0); - return parameterIndex >= getMinArgumentCount(signature, 1 /* StrongArityForUntypedJS */ | 2 /* VoidIsNonOptional */); - } - const iife = getImmediatelyInvokedFunctionExpression(node.parent); - if (iife) { - return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.arguments.length; - } - return false; - } - function isOptionalPropertyDeclaration(node) { - return isPropertyDeclaration(node) && !hasAccessorModifier(node) && node.questionToken; - } - function createTypePredicate(kind, parameterName, parameterIndex, type) { - return { kind, parameterName, parameterIndex, type }; - } - function getMinTypeArgumentCount(typeParameters) { - let minTypeArgumentCount = 0; - if (typeParameters) { - for (let i = 0; i < typeParameters.length; i++) { - if (!hasTypeParameterDefault(typeParameters[i])) { - minTypeArgumentCount = i + 1; - } - } - } - return minTypeArgumentCount; - } - function fillMissingTypeArguments(typeArguments, typeParameters, minTypeArgumentCount, isJavaScriptImplicitAny) { - const numTypeParameters = length(typeParameters); - if (!numTypeParameters) { - return []; - } - const numTypeArguments = length(typeArguments); - if (isJavaScriptImplicitAny || numTypeArguments >= minTypeArgumentCount && numTypeArguments <= numTypeParameters) { - const result = typeArguments ? typeArguments.slice() : []; - for (let i = numTypeArguments; i < numTypeParameters; i++) { - result[i] = errorType; - } - const baseDefaultType = getDefaultTypeArgumentType(isJavaScriptImplicitAny); - for (let i = numTypeArguments; i < numTypeParameters; i++) { - let defaultType = getDefaultFromTypeParameter(typeParameters[i]); - if (isJavaScriptImplicitAny && defaultType && (isTypeIdenticalTo(defaultType, unknownType) || isTypeIdenticalTo(defaultType, emptyObjectType))) { - defaultType = anyType; - } - result[i] = defaultType ? instantiateType(defaultType, createTypeMapper(typeParameters, result)) : baseDefaultType; - } - result.length = typeParameters.length; - return result; - } - return typeArguments && typeArguments.slice(); - } - function getSignatureFromDeclaration(declaration) { - const links = getNodeLinks(declaration); - if (!links.resolvedSignature) { - const parameters = []; - let flags = 0 /* None */; - let minArgumentCount = 0; - let thisParameter; - let hasThisParameter2 = false; - const iife = getImmediatelyInvokedFunctionExpression(declaration); - const isJSConstructSignature = isJSDocConstructSignature(declaration); - const isUntypedSignatureInJSFile = !iife && isInJSFile(declaration) && isValueSignatureDeclaration(declaration) && !hasJSDocParameterTags(declaration) && !getJSDocType(declaration); - if (isUntypedSignatureInJSFile) { - flags |= 32 /* IsUntypedSignatureInJSFile */; - } - for (let i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) { - const param = declaration.parameters[i]; - let paramSymbol = param.symbol; - const type = isJSDocParameterTag(param) ? param.typeExpression && param.typeExpression.type : param.type; - if (paramSymbol && !!(paramSymbol.flags & 4 /* Property */) && !isBindingPattern(param.name)) { - const resolvedSymbol = resolveName( - param, - paramSymbol.escapedName, - 111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - ); - paramSymbol = resolvedSymbol; - } - if (i === 0 && paramSymbol.escapedName === "this" /* This */) { - hasThisParameter2 = true; - thisParameter = param.symbol; - } else { - parameters.push(paramSymbol); - } - if (type && type.kind === 201 /* LiteralType */) { - flags |= 2 /* HasLiteralTypes */; - } - const isOptionalParameter2 = isOptionalJSDocPropertyLikeTag(param) || param.initializer || param.questionToken || isRestParameter(param) || iife && parameters.length > iife.arguments.length && !type || isJSDocOptionalParameter(param); - if (!isOptionalParameter2) { - minArgumentCount = parameters.length; - } - } - if ((declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) && hasBindableName(declaration) && (!hasThisParameter2 || !thisParameter)) { - const otherKind = declaration.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; - const other = getDeclarationOfKind(getSymbolOfDeclaration(declaration), otherKind); - if (other) { - thisParameter = getAnnotatedAccessorThisParameter(other); - } - } - if (isInJSFile(declaration)) { - const thisTag = getJSDocThisTag(declaration); - if (thisTag && thisTag.typeExpression) { - thisParameter = createSymbolWithType(createSymbol(1 /* FunctionScopedVariable */, "this" /* This */), getTypeFromTypeNode(thisTag.typeExpression)); - } - } - const hostDeclaration = isJSDocSignature(declaration) ? getEffectiveJSDocHost(declaration) : declaration; - const classType = hostDeclaration && isConstructorDeclaration(hostDeclaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(hostDeclaration.parent.symbol)) : void 0; - const typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration); - if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { - flags |= 1 /* HasRestParameter */; - } - if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 256 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 256 /* Abstract */)) { - flags |= 4 /* Abstract */; - } - links.resolvedSignature = createSignature( - declaration, - typeParameters, - thisParameter, - parameters, - /*resolvedReturnType*/ - void 0, - /*resolvedTypePredicate*/ - void 0, - minArgumentCount, - flags - ); - } - return links.resolvedSignature; - } - function maybeAddJsSyntheticRestParameter(declaration, parameters) { - if (isJSDocSignature(declaration) || !containsArgumentsReference(declaration)) { - return false; - } - const lastParam = lastOrUndefined(declaration.parameters); - const lastParamTags = lastParam ? getJSDocParameterTags(lastParam) : getJSDocTags(declaration).filter(isJSDocParameterTag); - const lastParamVariadicType = firstDefined(lastParamTags, (p) => p.typeExpression && isJSDocVariadicType(p.typeExpression.type) ? p.typeExpression.type : void 0); - const syntheticArgsSymbol = createSymbol(3 /* Variable */, "args", 32768 /* RestParameter */); - if (lastParamVariadicType) { - syntheticArgsSymbol.links.type = createArrayType(getTypeFromTypeNode(lastParamVariadicType.type)); - } else { - syntheticArgsSymbol.links.checkFlags |= 65536 /* DeferredType */; - syntheticArgsSymbol.links.deferralParent = neverType; - syntheticArgsSymbol.links.deferralConstituents = [anyArrayType]; - syntheticArgsSymbol.links.deferralWriteConstituents = [anyArrayType]; - } - if (lastParamVariadicType) { - parameters.pop(); - } - parameters.push(syntheticArgsSymbol); - return true; - } - function getSignatureOfTypeTag(node) { - if (!(isInJSFile(node) && isFunctionLikeDeclaration(node))) - return void 0; - const typeTag = getJSDocTypeTag(node); - return (typeTag == null ? void 0 : typeTag.typeExpression) && getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression)); - } - function getParameterTypeOfTypeTag(func, parameter) { - const signature = getSignatureOfTypeTag(func); - if (!signature) - return void 0; - const pos = func.parameters.indexOf(parameter); - return parameter.dotDotDotToken ? getRestTypeAtPosition(signature, pos) : getTypeAtPosition(signature, pos); - } - function getReturnTypeOfTypeTag(node) { - const signature = getSignatureOfTypeTag(node); - return signature && getReturnTypeOfSignature(signature); - } - function containsArgumentsReference(declaration) { - const links = getNodeLinks(declaration); - if (links.containsArgumentsReference === void 0) { - if (links.flags & 512 /* CaptureArguments */) { - links.containsArgumentsReference = true; - } else { - links.containsArgumentsReference = traverse(declaration.body); - } - } - return links.containsArgumentsReference; - function traverse(node) { - if (!node) - return false; - switch (node.kind) { - case 80 /* Identifier */: - return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol; - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return node.name.kind === 167 /* ComputedPropertyName */ && traverse(node.name); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - return traverse(node.expression); - case 303 /* PropertyAssignment */: - return traverse(node.initializer); - default: - return !nodeStartsNewLexicalEnvironment(node) && !isPartOfTypeNode(node) && !!forEachChild(node, traverse); - } - } - } - function getSignaturesOfSymbol(symbol) { - if (!symbol || !symbol.declarations) - return emptyArray; - const result = []; - for (let i = 0; i < symbol.declarations.length; i++) { - const decl = symbol.declarations[i]; - if (!isFunctionLike(decl)) - continue; - if (i > 0 && decl.body) { - const previous = symbol.declarations[i - 1]; - if (decl.parent === previous.parent && decl.kind === previous.kind && decl.pos === previous.end) { - continue; - } - } - if (isInJSFile(decl) && decl.jsDoc) { - let hasJSDocOverloads = false; - for (const node of decl.jsDoc) { - if (node.tags) { - for (const tag of node.tags) { - if (isJSDocOverloadTag(tag)) { - const jsDocSignature = tag.typeExpression; - if (jsDocSignature.type === void 0 && !isConstructorDeclaration(decl)) { - reportImplicitAny(jsDocSignature, anyType); - } - result.push(getSignatureFromDeclaration(jsDocSignature)); - hasJSDocOverloads = true; - } - } - } - } - if (hasJSDocOverloads) { - continue; - } - } - result.push( - !isFunctionExpressionOrArrowFunction(decl) && !isObjectLiteralMethod(decl) && getSignatureOfTypeTag(decl) || getSignatureFromDeclaration(decl) - ); - } - return result; - } - function resolveExternalModuleTypeByLiteral(name) { - const moduleSym = resolveExternalModuleName(name, name); - if (moduleSym) { - const resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym); - if (resolvedModuleSymbol) { - return getTypeOfSymbol(resolvedModuleSymbol); - } - } - return anyType; - } - function getThisTypeOfSignature(signature) { - if (signature.thisParameter) { - return getTypeOfSymbol(signature.thisParameter); - } - } - function getTypePredicateOfSignature(signature) { - if (!signature.resolvedTypePredicate) { - if (signature.target) { - const targetTypePredicate = getTypePredicateOfSignature(signature.target); - signature.resolvedTypePredicate = targetTypePredicate ? instantiateTypePredicate(targetTypePredicate, signature.mapper) : noTypePredicate; - } else if (signature.compositeSignatures) { - signature.resolvedTypePredicate = getUnionOrIntersectionTypePredicate(signature.compositeSignatures, signature.compositeKind) || noTypePredicate; - } else { - const type = signature.declaration && getEffectiveReturnTypeNode(signature.declaration); - let jsdocPredicate; - if (!type) { - const jsdocSignature = getSignatureOfTypeTag(signature.declaration); - if (jsdocSignature && signature !== jsdocSignature) { - jsdocPredicate = getTypePredicateOfSignature(jsdocSignature); - } - } - signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate; - } - Debug.assert(!!signature.resolvedTypePredicate); - } - return signature.resolvedTypePredicate === noTypePredicate ? void 0 : signature.resolvedTypePredicate; - } - function createTypePredicateFromTypePredicateNode(node, signature) { - const parameterName = node.parameterName; - const type = node.type && getTypeFromTypeNode(node.type); - return parameterName.kind === 197 /* ThisType */ ? createTypePredicate( - node.assertsModifier ? 2 /* AssertsThis */ : 0 /* This */, - /*parameterName*/ - void 0, - /*parameterIndex*/ - void 0, - type - ) : createTypePredicate( - node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, - parameterName.escapedText, - findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), - type - ); - } - function getUnionOrIntersectionType(types, kind, unionReduction) { - return kind !== 2097152 /* Intersection */ ? getUnionType(types, unionReduction) : getIntersectionType(types); - } - function getReturnTypeOfSignature(signature) { - if (!signature.resolvedReturnType) { - if (!pushTypeResolution(signature, 3 /* ResolvedReturnType */)) { - return errorType; - } - let type = signature.target ? instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper) : signature.compositeSignatures ? instantiateType(getUnionOrIntersectionType(map(signature.compositeSignatures, getReturnTypeOfSignature), signature.compositeKind, 2 /* Subtype */), signature.mapper) : getReturnTypeFromAnnotation(signature.declaration) || (nodeIsMissing(signature.declaration.body) ? anyType : getReturnTypeFromBody(signature.declaration)); - if (signature.flags & 8 /* IsInnerCallChain */) { - type = addOptionalTypeMarker(type); - } else if (signature.flags & 16 /* IsOuterCallChain */) { - type = getOptionalType(type); - } - if (!popTypeResolution()) { - if (signature.declaration) { - const typeNode = getEffectiveReturnTypeNode(signature.declaration); - if (typeNode) { - error2(typeNode, Diagnostics.Return_type_annotation_circularly_references_itself); - } else if (noImplicitAny) { - const declaration = signature.declaration; - const name = getNameOfDeclaration(declaration); - if (name) { - error2(name, 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, declarationNameToString(name)); - } else { - error2(declaration, Diagnostics.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); - } - } - } - type = anyType; - } - signature.resolvedReturnType = type; - } - return signature.resolvedReturnType; - } - function getReturnTypeFromAnnotation(declaration) { - if (declaration.kind === 176 /* Constructor */) { - return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol)); - } - const typeNode = getEffectiveReturnTypeNode(declaration); - if (isJSDocSignature(declaration)) { - const root = getJSDocRoot(declaration); - if (root && isConstructorDeclaration(root.parent) && !typeNode) { - return getDeclaredTypeOfClassOrInterface(getMergedSymbol(root.parent.parent.symbol)); - } - } - if (isJSDocConstructSignature(declaration)) { - return getTypeFromTypeNode(declaration.parameters[0].type); - } - if (typeNode) { - return getTypeFromTypeNode(typeNode); - } - if (declaration.kind === 177 /* GetAccessor */ && hasBindableName(declaration)) { - const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); - if (jsDocType) { - return jsDocType; - } - const setter = getDeclarationOfKind(getSymbolOfDeclaration(declaration), 178 /* SetAccessor */); - const setterType = getAnnotatedAccessorType(setter); - if (setterType) { - return setterType; - } - } - return getReturnTypeOfTypeTag(declaration); - } - function isResolvingReturnTypeOfSignature(signature) { - return signature.compositeSignatures && some(signature.compositeSignatures, isResolvingReturnTypeOfSignature) || !signature.resolvedReturnType && findResolutionCycleStartIndex(signature, 3 /* ResolvedReturnType */) >= 0; - } - function getRestTypeOfSignature(signature) { - return tryGetRestTypeOfSignature(signature) || anyType; - } - function tryGetRestTypeOfSignature(signature) { - if (signatureHasRestParameter(signature)) { - const sigRestType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); - const restType = isTupleType(sigRestType) ? getRestTypeOfTupleType(sigRestType) : sigRestType; - return restType && getIndexTypeOfType(restType, numberType); - } - return void 0; - } - function getSignatureInstantiation(signature, typeArguments, isJavascript, inferredTypeParameters) { - const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, fillMissingTypeArguments(typeArguments, signature.typeParameters, getMinTypeArgumentCount(signature.typeParameters), isJavascript)); - if (inferredTypeParameters) { - const returnSignature = getSingleCallOrConstructSignature(getReturnTypeOfSignature(instantiatedSignature)); - if (returnSignature) { - const newReturnSignature = cloneSignature(returnSignature); - newReturnSignature.typeParameters = inferredTypeParameters; - const newInstantiatedSignature = cloneSignature(instantiatedSignature); - newInstantiatedSignature.resolvedReturnType = getOrCreateTypeFromSignature(newReturnSignature); - return newInstantiatedSignature; - } - } - return instantiatedSignature; - } - function getSignatureInstantiationWithoutFillingInTypeArguments(signature, typeArguments) { - const instantiations = signature.instantiations || (signature.instantiations = /* @__PURE__ */ new Map()); - const id = getTypeListId(typeArguments); - let instantiation = instantiations.get(id); - if (!instantiation) { - instantiations.set(id, instantiation = createSignatureInstantiation(signature, typeArguments)); - } - return instantiation; - } - function createSignatureInstantiation(signature, typeArguments) { - return instantiateSignature( - signature, - createSignatureTypeMapper(signature, typeArguments), - /*eraseTypeParameters*/ - true - ); - } - function createSignatureTypeMapper(signature, typeArguments) { - return createTypeMapper(signature.typeParameters, typeArguments); - } - function getErasedSignature(signature) { - return signature.typeParameters ? signature.erasedSignatureCache || (signature.erasedSignatureCache = createErasedSignature(signature)) : signature; - } - function createErasedSignature(signature) { - return instantiateSignature( - signature, - createTypeEraser(signature.typeParameters), - /*eraseTypeParameters*/ - true - ); - } - function getCanonicalSignature(signature) { - return signature.typeParameters ? signature.canonicalSignatureCache || (signature.canonicalSignatureCache = createCanonicalSignature(signature)) : signature; - } - function createCanonicalSignature(signature) { - return getSignatureInstantiation( - signature, - map(signature.typeParameters, (tp) => tp.target && !getConstraintOfTypeParameter(tp.target) ? tp.target : tp), - isInJSFile(signature.declaration) - ); - } - function getBaseSignature(signature) { - const typeParameters = signature.typeParameters; - if (typeParameters) { - if (signature.baseSignatureCache) { - return signature.baseSignatureCache; - } - const typeEraser = createTypeEraser(typeParameters); - const baseConstraintMapper = createTypeMapper(typeParameters, map(typeParameters, (tp) => getConstraintOfTypeParameter(tp) || unknownType)); - let baseConstraints = map(typeParameters, (tp) => instantiateType(tp, baseConstraintMapper) || unknownType); - for (let i = 0; i < typeParameters.length - 1; i++) { - baseConstraints = instantiateTypes(baseConstraints, baseConstraintMapper); - } - baseConstraints = instantiateTypes(baseConstraints, typeEraser); - return signature.baseSignatureCache = instantiateSignature( - signature, - createTypeMapper(typeParameters, baseConstraints), - /*eraseTypeParameters*/ - true - ); - } - return signature; - } - function getOrCreateTypeFromSignature(signature) { - var _a; - if (!signature.isolatedSignatureType) { - const kind = (_a = signature.declaration) == null ? void 0 : _a.kind; - const isConstructor = kind === void 0 || kind === 176 /* Constructor */ || kind === 180 /* ConstructSignature */ || kind === 185 /* ConstructorType */; - const type = createObjectType(16 /* Anonymous */); - type.members = emptySymbols; - type.properties = emptyArray; - type.callSignatures = !isConstructor ? [signature] : emptyArray; - type.constructSignatures = isConstructor ? [signature] : emptyArray; - type.indexInfos = emptyArray; - signature.isolatedSignatureType = type; - } - return signature.isolatedSignatureType; - } - function getIndexSymbol(symbol) { - return symbol.members ? getIndexSymbolFromSymbolTable(symbol.members) : void 0; - } - function getIndexSymbolFromSymbolTable(symbolTable) { - return symbolTable.get("__index" /* Index */); - } - function createIndexInfo(keyType, type, isReadonly, declaration) { - return { keyType, type, isReadonly, declaration }; - } - function getIndexInfosOfSymbol(symbol) { - const indexSymbol = getIndexSymbol(symbol); - return indexSymbol ? getIndexInfosOfIndexSymbol(indexSymbol) : emptyArray; - } - function getIndexInfosOfIndexSymbol(indexSymbol) { - if (indexSymbol.declarations) { - const indexInfos = []; - for (const declaration of indexSymbol.declarations) { - if (declaration.parameters.length === 1) { - const parameter = declaration.parameters[0]; - if (parameter.type) { - forEachType(getTypeFromTypeNode(parameter.type), (keyType) => { - if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos, keyType)) { - indexInfos.push(createIndexInfo( - keyType, - declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, - hasEffectiveModifier(declaration, 64 /* Readonly */), - declaration - )); - } - }); - } - } - } - return indexInfos; - } - return emptyArray; - } - function isValidIndexKeyType(type) { - return !!(type.flags & (4 /* String */ | 8 /* Number */ | 4096 /* ESSymbol */)) || isPatternLiteralType(type) || !!(type.flags & 2097152 /* Intersection */) && !isGenericType(type) && some(type.types, isValidIndexKeyType); - } - function getConstraintDeclaration(type) { - return mapDefined(filter(type.symbol && type.symbol.declarations, isTypeParameterDeclaration), getEffectiveConstraintOfTypeParameter)[0]; - } - function getInferredTypeParameterConstraint(typeParameter, omitTypeReferences) { - var _a; - let inferences; - if ((_a = typeParameter.symbol) == null ? void 0 : _a.declarations) { - for (const declaration of typeParameter.symbol.declarations) { - if (declaration.parent.kind === 195 /* InferType */) { - const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); - if (grandParent.kind === 183 /* TypeReference */ && !omitTypeReferences) { - const typeReference = grandParent; - const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReference); - if (typeParameters) { - const index = typeReference.typeArguments.indexOf(childTypeParameter); - if (index < typeParameters.length) { - const declaredConstraint = getConstraintOfTypeParameter(typeParameters[index]); - if (declaredConstraint) { - const mapper = makeDeferredTypeMapper(typeParameters, typeParameters.map((_, index2) => () => { - return getEffectiveTypeArgumentAtIndex(typeReference, typeParameters, index2); - })); - const constraint = instantiateType(declaredConstraint, mapper); - if (constraint !== typeParameter) { - inferences = append(inferences, constraint); - } - } - } - } - } else if (grandParent.kind === 169 /* Parameter */ && grandParent.dotDotDotToken || grandParent.kind === 191 /* RestType */ || grandParent.kind === 202 /* NamedTupleMember */ && grandParent.dotDotDotToken) { - inferences = append(inferences, createArrayType(unknownType)); - } else if (grandParent.kind === 204 /* TemplateLiteralTypeSpan */) { - inferences = append(inferences, stringType); - } else if (grandParent.kind === 168 /* TypeParameter */ && grandParent.parent.kind === 200 /* MappedType */) { - inferences = append(inferences, keyofConstraintType); - } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { - const checkMappedType2 = grandParent.parent.checkType; - const nodeType = getTypeFromTypeNode(checkMappedType2.type); - inferences = append(inferences, instantiateType( - nodeType, - makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(checkMappedType2.typeParameter)), checkMappedType2.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType2.typeParameter.constraint) : keyofConstraintType) - )); - } - } - } - } - return inferences && getIntersectionType(inferences); - } - function getConstraintFromTypeParameter(typeParameter) { - if (!typeParameter.constraint) { - if (typeParameter.target) { - const targetConstraint = getConstraintOfTypeParameter(typeParameter.target); - typeParameter.constraint = targetConstraint ? instantiateType(targetConstraint, typeParameter.mapper) : noConstraintType; - } else { - const constraintDeclaration = getConstraintDeclaration(typeParameter); - if (!constraintDeclaration) { - typeParameter.constraint = getInferredTypeParameterConstraint(typeParameter) || noConstraintType; - } else { - let type = getTypeFromTypeNode(constraintDeclaration); - if (type.flags & 1 /* Any */ && !isErrorType(type)) { - type = constraintDeclaration.parent.parent.kind === 200 /* MappedType */ ? keyofConstraintType : unknownType; - } - typeParameter.constraint = type; - } - } - } - return typeParameter.constraint === noConstraintType ? void 0 : typeParameter.constraint; - } - function getParentSymbolOfTypeParameter(typeParameter) { - const tp = getDeclarationOfKind(typeParameter.symbol, 168 /* TypeParameter */); - const host2 = isJSDocTemplateTag(tp.parent) ? getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent; - return host2 && getSymbolOfNode(host2); - } - function getTypeListId(types) { - let result = ""; - if (types) { - const length2 = types.length; - let i = 0; - while (i < length2) { - const startId = types[i].id; - let count = 1; - while (i + count < length2 && types[i + count].id === startId + count) { - count++; - } - if (result.length) { - result += ","; - } - result += startId; - if (count > 1) { - result += ":" + count; - } - i += count; - } - } - return result; - } - function getAliasId(aliasSymbol, aliasTypeArguments) { - return aliasSymbol ? `@${getSymbolId(aliasSymbol)}` + (aliasTypeArguments ? `:${getTypeListId(aliasTypeArguments)}` : "") : ""; - } - function getPropagatingFlagsOfTypes(types, excludeKinds) { - let result = 0; - for (const type of types) { - if (excludeKinds === void 0 || !(type.flags & excludeKinds)) { - result |= getObjectFlags(type); - } - } - return result & 458752 /* PropagatingFlags */; - } - function tryCreateTypeReference(target, typeArguments) { - if (some(typeArguments) && target === emptyGenericType) { - return unknownType; - } - return createTypeReference(target, typeArguments); - } - function createTypeReference(target, typeArguments) { - const id = getTypeListId(typeArguments); - let type = target.instantiations.get(id); - if (!type) { - type = createObjectType(4 /* Reference */, target.symbol); - target.instantiations.set(id, type); - type.objectFlags |= typeArguments ? getPropagatingFlagsOfTypes(typeArguments) : 0; - type.target = target; - type.resolvedTypeArguments = typeArguments; - } - return type; - } - function cloneTypeReference(source) { - const type = createTypeWithSymbol(source.flags, source.symbol); - type.objectFlags = source.objectFlags; - type.target = source.target; - type.resolvedTypeArguments = source.resolvedTypeArguments; - return type; - } - function createDeferredTypeReference(target, node, mapper, aliasSymbol, aliasTypeArguments) { - if (!aliasSymbol) { - aliasSymbol = getAliasSymbolForTypeNode(node); - const localAliasTypeArguments = getTypeArgumentsForAliasSymbol(aliasSymbol); - aliasTypeArguments = mapper ? instantiateTypes(localAliasTypeArguments, mapper) : localAliasTypeArguments; - } - const type = createObjectType(4 /* Reference */, target.symbol); - type.target = target; - type.node = node; - type.mapper = mapper; - type.aliasSymbol = aliasSymbol; - type.aliasTypeArguments = aliasTypeArguments; - return type; - } - function getTypeArguments(type) { - var _a, _b; - if (!type.resolvedTypeArguments) { - if (!pushTypeResolution(type, 6 /* ResolvedTypeArguments */)) { - return ((_a = type.target.localTypeParameters) == null ? void 0 : _a.map(() => errorType)) || emptyArray; - } - const node = type.node; - const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); - if (popTypeResolution()) { - type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments; - } else { - type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray; - error2( - type.node || currentNode, - type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves, - type.target.symbol && symbolToString(type.target.symbol) - ); - } - } - return type.resolvedTypeArguments; - } - function getTypeReferenceArity(type) { - return length(type.target.typeParameters); - } - function getTypeFromClassOrInterfaceReference(node, symbol) { - const type = getDeclaredTypeOfSymbol(getMergedSymbol(symbol)); - const typeParameters = type.localTypeParameters; - if (typeParameters) { - const numTypeArguments = length(node.typeArguments); - const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters); - const isJs = isInJSFile(node); - const isJsImplicitAny = !noImplicitAny && isJs; - if (!isJsImplicitAny && (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length)) { - const missingAugmentsTag = isJs && isExpressionWithTypeArguments(node) && !isJSDocAugmentsTag(node.parent); - const diag2 = minTypeArgumentCount === typeParameters.length ? missingAugmentsTag ? Diagnostics.Expected_0_type_arguments_provide_these_with_an_extends_tag : Diagnostics.Generic_type_0_requires_1_type_argument_s : missingAugmentsTag ? Diagnostics.Expected_0_1_type_arguments_provide_these_with_an_extends_tag : Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments; - const typeStr = typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 2 /* WriteArrayAsGenericType */ - ); - error2(node, diag2, typeStr, minTypeArgumentCount, typeParameters.length); - if (!isJs) { - return errorType; - } - } - if (node.kind === 183 /* TypeReference */ && isDeferredTypeReferenceNode(node, length(node.typeArguments) !== typeParameters.length)) { - return createDeferredTypeReference( - type, - node, - /*mapper*/ - void 0 - ); - } - const typeArguments = concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgumentsFromTypeReferenceNode(node), typeParameters, minTypeArgumentCount, isJs)); - return createTypeReference(type, typeArguments); - } - return checkNoTypeArguments(node, symbol) ? type : errorType; - } - function getTypeAliasInstantiation(symbol, typeArguments, aliasSymbol, aliasTypeArguments) { - const type = getDeclaredTypeOfSymbol(symbol); - if (type === intrinsicMarkerType && intrinsicTypeKinds.has(symbol.escapedName) && typeArguments && typeArguments.length === 1) { - return getStringMappingType(symbol, typeArguments[0]); - } - const links = getSymbolLinks(symbol); - const typeParameters = links.typeParameters; - const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments); - let instantiation = links.instantiations.get(id); - if (!instantiation) { - links.instantiations.set(id, instantiation = instantiateTypeWithAlias( - type, - createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), - aliasSymbol, - aliasTypeArguments - )); - } - return instantiation; - } - function getTypeFromTypeAliasReference(node, symbol) { - if (getCheckFlags(symbol) & 1048576 /* Unresolved */) { - const typeArguments = typeArgumentsFromTypeReferenceNode(node); - const id = getAliasId(symbol, typeArguments); - let errorType2 = errorTypes.get(id); - if (!errorType2) { - errorType2 = createIntrinsicType(1 /* Any */, "error"); - errorType2.aliasSymbol = symbol; - errorType2.aliasTypeArguments = typeArguments; - errorTypes.set(id, errorType2); - } - return errorType2; - } - const type = getDeclaredTypeOfSymbol(symbol); - const typeParameters = getSymbolLinks(symbol).typeParameters; - if (typeParameters) { - const numTypeArguments = length(node.typeArguments); - const minTypeArgumentCount = getMinTypeArgumentCount(typeParameters); - if (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length) { - error2( - node, - minTypeArgumentCount === typeParameters.length ? Diagnostics.Generic_type_0_requires_1_type_argument_s : Diagnostics.Generic_type_0_requires_between_1_and_2_type_arguments, - symbolToString(symbol), - minTypeArgumentCount, - typeParameters.length - ); - return errorType; - } - const aliasSymbol = getAliasSymbolForTypeNode(node); - let newAliasSymbol = aliasSymbol && (isLocalTypeAlias(symbol) || !isLocalTypeAlias(aliasSymbol)) ? aliasSymbol : void 0; - let aliasTypeArguments; - if (newAliasSymbol) { - aliasTypeArguments = getTypeArgumentsForAliasSymbol(newAliasSymbol); - } else if (isTypeReferenceType(node)) { - const aliasSymbol2 = resolveTypeReferenceName( - node, - 2097152 /* Alias */, - /*ignoreErrors*/ - true - ); - if (aliasSymbol2 && aliasSymbol2 !== unknownSymbol) { - const resolved = resolveAlias(aliasSymbol2); - if (resolved && resolved.flags & 524288 /* TypeAlias */) { - newAliasSymbol = resolved; - aliasTypeArguments = typeArgumentsFromTypeReferenceNode(node) || (typeParameters ? [] : void 0); - } - } - } - return getTypeAliasInstantiation(symbol, typeArgumentsFromTypeReferenceNode(node), newAliasSymbol, aliasTypeArguments); - } - return checkNoTypeArguments(node, symbol) ? type : errorType; - } - function isLocalTypeAlias(symbol) { - var _a; - const declaration = (_a = symbol.declarations) == null ? void 0 : _a.find(isTypeAlias); - return !!(declaration && getContainingFunction(declaration)); - } - function getTypeReferenceName(node) { - switch (node.kind) { - case 183 /* TypeReference */: - return node.typeName; - case 233 /* ExpressionWithTypeArguments */: - const expr = node.expression; - if (isEntityNameExpression(expr)) { - return expr; - } - } - return void 0; - } - function getSymbolPath(symbol) { - return symbol.parent ? `${getSymbolPath(symbol.parent)}.${symbol.escapedName}` : symbol.escapedName; - } - function getUnresolvedSymbolForEntityName(name) { - const identifier = name.kind === 166 /* QualifiedName */ ? name.right : name.kind === 211 /* PropertyAccessExpression */ ? name.name : name; - const text = identifier.escapedText; - if (text) { - const parentSymbol = name.kind === 166 /* QualifiedName */ ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 211 /* PropertyAccessExpression */ ? getUnresolvedSymbolForEntityName(name.expression) : void 0; - const path = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text; - let result = unresolvedSymbols.get(path); - if (!result) { - unresolvedSymbols.set(path, result = createSymbol(524288 /* TypeAlias */, text, 1048576 /* Unresolved */)); - result.parent = parentSymbol; - result.links.declaredType = unresolvedType; - } - return result; - } - return unknownSymbol; - } - function resolveTypeReferenceName(typeReference, meaning, ignoreErrors) { - const name = getTypeReferenceName(typeReference); - if (!name) { - return unknownSymbol; - } - const symbol = resolveEntityName(name, meaning, ignoreErrors); - return symbol && symbol !== unknownSymbol ? symbol : ignoreErrors ? unknownSymbol : getUnresolvedSymbolForEntityName(name); - } - function getTypeReferenceType(node, symbol) { - if (symbol === unknownSymbol) { - return errorType; - } - symbol = getExpandoSymbol(symbol) || symbol; - if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { - return getTypeFromClassOrInterfaceReference(node, symbol); - } - if (symbol.flags & 524288 /* TypeAlias */) { - return getTypeFromTypeAliasReference(node, symbol); - } - const res = tryGetDeclaredTypeOfSymbol(symbol); - if (res) { - return checkNoTypeArguments(node, symbol) ? getRegularTypeOfLiteralType(res) : errorType; - } - if (symbol.flags & 111551 /* Value */ && isJSDocTypeReference(node)) { - const jsdocType = getTypeFromJSDocValueReference(node, symbol); - if (jsdocType) { - return jsdocType; - } else { - resolveTypeReferenceName(node, 788968 /* Type */); - return getTypeOfSymbol(symbol); - } - } - return errorType; - } - function getTypeFromJSDocValueReference(node, symbol) { - const links = getNodeLinks(node); - if (!links.resolvedJSDocType) { - const valueType = getTypeOfSymbol(symbol); - let typeType = valueType; - if (symbol.valueDeclaration) { - const isImportTypeWithQualifier = node.kind === 205 /* ImportType */ && node.qualifier; - if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) { - typeType = getTypeReferenceType(node, valueType.symbol); - } - } - links.resolvedJSDocType = typeType; - } - return links.resolvedJSDocType; - } - function getSubstitutionType(baseType, constraint) { - if (constraint.flags & 3 /* AnyOrUnknown */ || constraint === baseType || baseType.flags & 1 /* Any */) { - return baseType; - } - const id = `${getTypeId(baseType)}>${getTypeId(constraint)}`; - const cached = substitutionTypes.get(id); - if (cached) { - return cached; - } - const result = createType(33554432 /* Substitution */); - result.baseType = baseType; - result.constraint = constraint; - substitutionTypes.set(id, result); - return result; - } - function getSubstitutionIntersection(substitutionType) { - return getIntersectionType([substitutionType.constraint, substitutionType.baseType]); - } - function isUnaryTupleTypeNode(node) { - return node.kind === 189 /* TupleType */ && node.elements.length === 1; - } - function getImpliedConstraint(type, checkNode, extendsNode) { - return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) : getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) : void 0; - } - function getConditionalFlowTypeOfType(type, node) { - let constraints; - let covariant = true; - while (node && !isStatement(node) && node.kind !== 327 /* JSDoc */) { - const parent2 = node.parent; - if (parent2.kind === 169 /* Parameter */) { - covariant = !covariant; - } - if ((covariant || type.flags & 8650752 /* TypeVariable */) && parent2.kind === 194 /* ConditionalType */ && node === parent2.trueType) { - const constraint = getImpliedConstraint(type, parent2.checkType, parent2.extendsType); - if (constraint) { - constraints = append(constraints, constraint); - } - } else if (type.flags & 262144 /* TypeParameter */ && parent2.kind === 200 /* MappedType */ && node === parent2.type) { - const mappedType = getTypeFromTypeNode(parent2); - if (getTypeParameterFromMappedType(mappedType) === getActualTypeVariable(type)) { - const typeParameter = getHomomorphicTypeVariable(mappedType); - if (typeParameter) { - const constraint = getConstraintOfTypeParameter(typeParameter); - if (constraint && everyType(constraint, isArrayOrTupleType)) { - constraints = append(constraints, getUnionType([numberType, numericStringType])); - } - } - } - } - node = parent2; - } - return constraints ? getSubstitutionType(type, getIntersectionType(constraints)) : type; - } - function isJSDocTypeReference(node) { - return !!(node.flags & 16777216 /* JSDoc */) && (node.kind === 183 /* TypeReference */ || node.kind === 205 /* ImportType */); - } - function checkNoTypeArguments(node, symbol) { - if (node.typeArguments) { - error2(node, Diagnostics.Type_0_is_not_generic, symbol ? symbolToString(symbol) : node.typeName ? declarationNameToString(node.typeName) : anon); - return false; - } - return true; - } - function getIntendedTypeFromJSDocTypeReference(node) { - if (isIdentifier(node.typeName)) { - const typeArgs = node.typeArguments; - switch (node.typeName.escapedText) { - case "String": - checkNoTypeArguments(node); - return stringType; - case "Number": - checkNoTypeArguments(node); - return numberType; - case "Boolean": - checkNoTypeArguments(node); - return booleanType; - case "Void": - checkNoTypeArguments(node); - return voidType; - case "Undefined": - checkNoTypeArguments(node); - return undefinedType; - case "Null": - checkNoTypeArguments(node); - return nullType; - case "Function": - case "function": - checkNoTypeArguments(node); - return globalFunctionType; - case "array": - return (!typeArgs || !typeArgs.length) && !noImplicitAny ? anyArrayType : void 0; - case "promise": - return (!typeArgs || !typeArgs.length) && !noImplicitAny ? createPromiseType(anyType) : void 0; - case "Object": - if (typeArgs && typeArgs.length === 2) { - if (isJSDocIndexSignature(node)) { - const indexed = getTypeFromTypeNode(typeArgs[0]); - const target = getTypeFromTypeNode(typeArgs[1]); - const indexInfo = indexed === stringType || indexed === numberType ? [createIndexInfo( - indexed, - target, - /*isReadonly*/ - false - )] : emptyArray; - return createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - indexInfo - ); - } - return anyType; - } - checkNoTypeArguments(node); - return !noImplicitAny ? anyType : void 0; - } - } - } - function getTypeFromJSDocNullableTypeNode(node) { - const type = getTypeFromTypeNode(node.type); - return strictNullChecks ? getNullableType(type, 65536 /* Null */) : type; - } - function getTypeFromTypeReference(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - if (isConstTypeReference(node) && isAssertionExpression(node.parent)) { - links.resolvedSymbol = unknownSymbol; - return links.resolvedType = checkExpressionCached(node.parent.expression); - } - let symbol; - let type; - const meaning = 788968 /* Type */; - if (isJSDocTypeReference(node)) { - type = getIntendedTypeFromJSDocTypeReference(node); - if (!type) { - symbol = resolveTypeReferenceName( - node, - meaning, - /*ignoreErrors*/ - true - ); - if (symbol === unknownSymbol) { - symbol = resolveTypeReferenceName(node, meaning | 111551 /* Value */); - } else { - resolveTypeReferenceName(node, meaning); - } - type = getTypeReferenceType(node, symbol); - } - } - if (!type) { - symbol = resolveTypeReferenceName(node, meaning); - type = getTypeReferenceType(node, symbol); - } - links.resolvedSymbol = symbol; - links.resolvedType = type; - } - return links.resolvedType; - } - function typeArgumentsFromTypeReferenceNode(node) { - return map(node.typeArguments, getTypeFromTypeNode); - } - function getTypeFromTypeQueryNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - const type = checkExpressionWithTypeArguments(node); - links.resolvedType = getRegularTypeOfLiteralType(getWidenedType(type)); - } - return links.resolvedType; - } - function getTypeOfGlobalSymbol(symbol, arity) { - function getTypeDeclaration(symbol2) { - const declarations = symbol2.declarations; - if (declarations) { - for (const declaration of declarations) { - switch (declaration.kind) { - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - return declaration; - } - } - } - } - if (!symbol) { - return arity ? emptyGenericType : emptyObjectType; - } - const type = getDeclaredTypeOfSymbol(symbol); - if (!(type.flags & 524288 /* Object */)) { - error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbolName(symbol)); - return arity ? emptyGenericType : emptyObjectType; - } - if (length(type.typeParameters) !== arity) { - error2(getTypeDeclaration(symbol), Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); - return arity ? emptyGenericType : emptyObjectType; - } - return type; - } - function getGlobalValueSymbol(name, reportErrors2) { - return getGlobalSymbol(name, 111551 /* Value */, reportErrors2 ? Diagnostics.Cannot_find_global_value_0 : void 0); - } - function getGlobalTypeSymbol(name, reportErrors2) { - return getGlobalSymbol(name, 788968 /* Type */, reportErrors2 ? Diagnostics.Cannot_find_global_type_0 : void 0); - } - function getGlobalTypeAliasSymbol(name, arity, reportErrors2) { - const symbol = getGlobalSymbol(name, 788968 /* Type */, reportErrors2 ? Diagnostics.Cannot_find_global_type_0 : void 0); - if (symbol) { - getDeclaredTypeOfSymbol(symbol); - if (length(getSymbolLinks(symbol).typeParameters) !== arity) { - const decl = symbol.declarations && find(symbol.declarations, isTypeAliasDeclaration); - error2(decl, Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbolName(symbol), arity); - return void 0; - } - } - return symbol; - } - function getGlobalSymbol(name, meaning, diagnostic) { - return resolveName( - /*location*/ - void 0, - name, - meaning, - diagnostic, - name, - /*isUse*/ - false, - /*excludeGlobals*/ - false, - /*getSpellingSuggestions*/ - false - ); - } - function getGlobalType(name, arity, reportErrors2) { - const symbol = getGlobalTypeSymbol(name, reportErrors2); - return symbol || reportErrors2 ? getTypeOfGlobalSymbol(symbol, arity) : void 0; - } - function getGlobalTypedPropertyDescriptorType() { - return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType( - "TypedPropertyDescriptor", - /*arity*/ - 1, - /*reportErrors*/ - true - ) || emptyGenericType); - } - function getGlobalTemplateStringsArrayType() { - return deferredGlobalTemplateStringsArrayType || (deferredGlobalTemplateStringsArrayType = getGlobalType( - "TemplateStringsArray", - /*arity*/ - 0, - /*reportErrors*/ - true - ) || emptyObjectType); - } - function getGlobalImportMetaType() { - return deferredGlobalImportMetaType || (deferredGlobalImportMetaType = getGlobalType( - "ImportMeta", - /*arity*/ - 0, - /*reportErrors*/ - true - ) || emptyObjectType); - } - function getGlobalImportMetaExpressionType() { - if (!deferredGlobalImportMetaExpressionType) { - const symbol = createSymbol(0 /* None */, "ImportMetaExpression"); - const importMetaType = getGlobalImportMetaType(); - const metaPropertySymbol = createSymbol(4 /* Property */, "meta", 8 /* Readonly */); - metaPropertySymbol.parent = symbol; - metaPropertySymbol.links.type = importMetaType; - const members = createSymbolTable([metaPropertySymbol]); - symbol.members = members; - deferredGlobalImportMetaExpressionType = createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray); - } - return deferredGlobalImportMetaExpressionType; - } - function getGlobalImportCallOptionsType(reportErrors2) { - return deferredGlobalImportCallOptionsType || (deferredGlobalImportCallOptionsType = getGlobalType( - "ImportCallOptions", - /*arity*/ - 0, - reportErrors2 - )) || emptyObjectType; - } - function getGlobalESSymbolConstructorSymbol(reportErrors2) { - return deferredGlobalESSymbolConstructorSymbol || (deferredGlobalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol", reportErrors2)); - } - function getGlobalESSymbolConstructorTypeSymbol(reportErrors2) { - return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors2)); - } - function getGlobalESSymbolType() { - return deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType( - "Symbol", - /*arity*/ - 0, - /*reportErrors*/ - false - )) || emptyObjectType; - } - function getGlobalPromiseType(reportErrors2) { - return deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType( - "Promise", - /*arity*/ - 1, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalPromiseLikeType(reportErrors2) { - return deferredGlobalPromiseLikeType || (deferredGlobalPromiseLikeType = getGlobalType( - "PromiseLike", - /*arity*/ - 1, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalPromiseConstructorSymbol(reportErrors2) { - return deferredGlobalPromiseConstructorSymbol || (deferredGlobalPromiseConstructorSymbol = getGlobalValueSymbol("Promise", reportErrors2)); - } - function getGlobalPromiseConstructorLikeType(reportErrors2) { - return deferredGlobalPromiseConstructorLikeType || (deferredGlobalPromiseConstructorLikeType = getGlobalType( - "PromiseConstructorLike", - /*arity*/ - 0, - reportErrors2 - )) || emptyObjectType; - } - function getGlobalAsyncIterableType(reportErrors2) { - return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType( - "AsyncIterable", - /*arity*/ - 1, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalAsyncIteratorType(reportErrors2) { - return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType( - "AsyncIterator", - /*arity*/ - 3, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalAsyncIterableIteratorType(reportErrors2) { - return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType( - "AsyncIterableIterator", - /*arity*/ - 1, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalAsyncGeneratorType(reportErrors2) { - return deferredGlobalAsyncGeneratorType || (deferredGlobalAsyncGeneratorType = getGlobalType( - "AsyncGenerator", - /*arity*/ - 3, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalIterableType(reportErrors2) { - return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType( - "Iterable", - /*arity*/ - 1, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalIteratorType(reportErrors2) { - return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType( - "Iterator", - /*arity*/ - 3, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalIterableIteratorType(reportErrors2) { - return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType( - "IterableIterator", - /*arity*/ - 1, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalGeneratorType(reportErrors2) { - return deferredGlobalGeneratorType || (deferredGlobalGeneratorType = getGlobalType( - "Generator", - /*arity*/ - 3, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalIteratorYieldResultType(reportErrors2) { - return deferredGlobalIteratorYieldResultType || (deferredGlobalIteratorYieldResultType = getGlobalType( - "IteratorYieldResult", - /*arity*/ - 1, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalIteratorReturnResultType(reportErrors2) { - return deferredGlobalIteratorReturnResultType || (deferredGlobalIteratorReturnResultType = getGlobalType( - "IteratorReturnResult", - /*arity*/ - 1, - reportErrors2 - )) || emptyGenericType; - } - function getGlobalDisposableType(reportErrors2) { - return deferredGlobalDisposableType || (deferredGlobalDisposableType = getGlobalType( - "Disposable", - /*arity*/ - 0, - reportErrors2 - )) || emptyObjectType; - } - function getGlobalAsyncDisposableType(reportErrors2) { - return deferredGlobalAsyncDisposableType || (deferredGlobalAsyncDisposableType = getGlobalType( - "AsyncDisposable", - /*arity*/ - 0, - reportErrors2 - )) || emptyObjectType; - } - function getGlobalTypeOrUndefined(name, arity = 0) { - const symbol = getGlobalSymbol( - name, - 788968 /* Type */, - /*diagnostic*/ - void 0 - ); - return symbol && getTypeOfGlobalSymbol(symbol, arity); - } - function getGlobalExtractSymbol() { - deferredGlobalExtractSymbol || (deferredGlobalExtractSymbol = getGlobalTypeAliasSymbol( - "Extract", - /*arity*/ - 2, - /*reportErrors*/ - true - ) || unknownSymbol); - return deferredGlobalExtractSymbol === unknownSymbol ? void 0 : deferredGlobalExtractSymbol; - } - function getGlobalOmitSymbol() { - deferredGlobalOmitSymbol || (deferredGlobalOmitSymbol = getGlobalTypeAliasSymbol( - "Omit", - /*arity*/ - 2, - /*reportErrors*/ - true - ) || unknownSymbol); - return deferredGlobalOmitSymbol === unknownSymbol ? void 0 : deferredGlobalOmitSymbol; - } - function getGlobalAwaitedSymbol(reportErrors2) { - deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol( - "Awaited", - /*arity*/ - 1, - reportErrors2 - ) || (reportErrors2 ? unknownSymbol : void 0)); - return deferredGlobalAwaitedSymbol === unknownSymbol ? void 0 : deferredGlobalAwaitedSymbol; - } - function getGlobalBigIntType() { - return deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType( - "BigInt", - /*arity*/ - 0, - /*reportErrors*/ - false - )) || emptyObjectType; - } - function getGlobalClassDecoratorContextType(reportErrors2) { - return deferredGlobalClassDecoratorContextType ?? (deferredGlobalClassDecoratorContextType = getGlobalType( - "ClassDecoratorContext", - /*arity*/ - 1, - reportErrors2 - )) ?? emptyGenericType; - } - function getGlobalClassMethodDecoratorContextType(reportErrors2) { - return deferredGlobalClassMethodDecoratorContextType ?? (deferredGlobalClassMethodDecoratorContextType = getGlobalType( - "ClassMethodDecoratorContext", - /*arity*/ - 2, - reportErrors2 - )) ?? emptyGenericType; - } - function getGlobalClassGetterDecoratorContextType(reportErrors2) { - return deferredGlobalClassGetterDecoratorContextType ?? (deferredGlobalClassGetterDecoratorContextType = getGlobalType( - "ClassGetterDecoratorContext", - /*arity*/ - 2, - reportErrors2 - )) ?? emptyGenericType; - } - function getGlobalClassSetterDecoratorContextType(reportErrors2) { - return deferredGlobalClassSetterDecoratorContextType ?? (deferredGlobalClassSetterDecoratorContextType = getGlobalType( - "ClassSetterDecoratorContext", - /*arity*/ - 2, - reportErrors2 - )) ?? emptyGenericType; - } - function getGlobalClassAccessorDecoratorContextType(reportErrors2) { - return deferredGlobalClassAccessorDecoratorContextType ?? (deferredGlobalClassAccessorDecoratorContextType = getGlobalType( - "ClassAccessorDecoratorContext", - /*arity*/ - 2, - reportErrors2 - )) ?? emptyGenericType; - } - function getGlobalClassAccessorDecoratorTargetType(reportErrors2) { - return deferredGlobalClassAccessorDecoratorTargetType ?? (deferredGlobalClassAccessorDecoratorTargetType = getGlobalType( - "ClassAccessorDecoratorTarget", - /*arity*/ - 2, - reportErrors2 - )) ?? emptyGenericType; - } - function getGlobalClassAccessorDecoratorResultType(reportErrors2) { - return deferredGlobalClassAccessorDecoratorResultType ?? (deferredGlobalClassAccessorDecoratorResultType = getGlobalType( - "ClassAccessorDecoratorResult", - /*arity*/ - 2, - reportErrors2 - )) ?? emptyGenericType; - } - function getGlobalClassFieldDecoratorContextType(reportErrors2) { - return deferredGlobalClassFieldDecoratorContextType ?? (deferredGlobalClassFieldDecoratorContextType = getGlobalType( - "ClassFieldDecoratorContext", - /*arity*/ - 2, - reportErrors2 - )) ?? emptyGenericType; - } - function getGlobalNaNSymbol() { - return deferredGlobalNaNSymbol || (deferredGlobalNaNSymbol = getGlobalValueSymbol( - "NaN", - /*reportErrors*/ - false - )); - } - function getGlobalRecordSymbol() { - deferredGlobalRecordSymbol || (deferredGlobalRecordSymbol = getGlobalTypeAliasSymbol( - "Record", - /*arity*/ - 2, - /*reportErrors*/ - true - ) || unknownSymbol); - return deferredGlobalRecordSymbol === unknownSymbol ? void 0 : deferredGlobalRecordSymbol; - } - function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) { - return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType; - } - function createTypedPropertyDescriptorType(propertyType) { - return createTypeFromGenericGlobalType(getGlobalTypedPropertyDescriptorType(), [propertyType]); - } - function createIterableType(iteratedType) { - return createTypeFromGenericGlobalType(getGlobalIterableType( - /*reportErrors*/ - true - ), [iteratedType]); - } - function createArrayType(elementType, readonly) { - return createTypeFromGenericGlobalType(readonly ? globalReadonlyArrayType : globalArrayType, [elementType]); - } - function getTupleElementFlags(node) { - switch (node.kind) { - case 190 /* OptionalType */: - return 2 /* Optional */; - case 191 /* RestType */: - return getRestTypeElementFlags(node); - case 202 /* NamedTupleMember */: - return node.questionToken ? 2 /* Optional */ : node.dotDotDotToken ? getRestTypeElementFlags(node) : 1 /* Required */; - default: - return 1 /* Required */; - } - } - function getRestTypeElementFlags(node) { - return getArrayElementTypeNode(node.type) ? 4 /* Rest */ : 8 /* Variadic */; - } - function getArrayOrTupleTargetType(node) { - const readonly = isReadonlyTypeOperator(node.parent); - const elementType = getArrayElementTypeNode(node); - if (elementType) { - return readonly ? globalReadonlyArrayType : globalArrayType; - } - const elementFlags = map(node.elements, getTupleElementFlags); - return getTupleTargetType(elementFlags, readonly, map(node.elements, memberIfLabeledElementDeclaration)); - } - function memberIfLabeledElementDeclaration(member) { - return isNamedTupleMember(member) || isParameter(member) ? member : void 0; - } - function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) { - return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 188 /* ArrayType */ ? mayResolveTypeAlias(node.elementType) : node.kind === 189 /* TupleType */ ? some(node.elements, mayResolveTypeAlias) : hasDefaultTypeArguments || some(node.typeArguments, mayResolveTypeAlias)); - } - function isResolvedByTypeAlias(node) { - const parent2 = node.parent; - switch (parent2.kind) { - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 199 /* IndexedAccessType */: - case 194 /* ConditionalType */: - case 198 /* TypeOperator */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - return isResolvedByTypeAlias(parent2); - case 265 /* TypeAliasDeclaration */: - return true; - } - return false; - } - function mayResolveTypeAlias(node) { - switch (node.kind) { - case 183 /* TypeReference */: - return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968 /* Type */).flags & 524288 /* TypeAlias */); - case 186 /* TypeQuery */: - return true; - case 198 /* TypeOperator */: - return node.operator !== 158 /* UniqueKeyword */ && mayResolveTypeAlias(node.type); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 202 /* NamedTupleMember */: - case 323 /* JSDocOptionalType */: - case 321 /* JSDocNullableType */: - case 322 /* JSDocNonNullableType */: - case 316 /* JSDocTypeExpression */: - return mayResolveTypeAlias(node.type); - case 191 /* RestType */: - return node.type.kind !== 188 /* ArrayType */ || mayResolveTypeAlias(node.type.elementType); - case 192 /* UnionType */: - case 193 /* IntersectionType */: - return some(node.types, mayResolveTypeAlias); - case 199 /* IndexedAccessType */: - return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType); - case 194 /* ConditionalType */: - return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) || mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType); - } - return false; - } - function getTypeFromArrayOrTupleTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - const target = getArrayOrTupleTargetType(node); - if (target === emptyGenericType) { - links.resolvedType = emptyObjectType; - } else if (!(node.kind === 189 /* TupleType */ && some(node.elements, (e) => !!(getTupleElementFlags(e) & 8 /* Variadic */))) && isDeferredTypeReferenceNode(node)) { - links.resolvedType = node.kind === 189 /* TupleType */ && node.elements.length === 0 ? target : createDeferredTypeReference( - target, - node, - /*mapper*/ - void 0 - ); - } else { - const elementTypes = node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode); - links.resolvedType = createNormalizedTypeReference(target, elementTypes); - } - } - return links.resolvedType; - } - function isReadonlyTypeOperator(node) { - return isTypeOperatorNode(node) && node.operator === 148 /* ReadonlyKeyword */; - } - function createTupleType(elementTypes, elementFlags, readonly = false, namedMemberDeclarations = []) { - const tupleTarget = getTupleTargetType(elementFlags || map(elementTypes, (_) => 1 /* Required */), readonly, namedMemberDeclarations); - return tupleTarget === emptyGenericType ? emptyObjectType : elementTypes.length ? createNormalizedTypeReference(tupleTarget, elementTypes) : tupleTarget; - } - function getTupleTargetType(elementFlags, readonly, namedMemberDeclarations) { - if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) { - return readonly ? globalReadonlyArrayType : globalArrayType; - } - const memberIds = mapDefined(namedMemberDeclarations, (node) => node ? getNodeId(node) : void 0); - const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : ""); - let type = tupleTypes.get(key); - if (!type) { - tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations)); - } - return type; - } - function createTupleTargetType(elementFlags, readonly, namedMemberDeclarations) { - const arity = elementFlags.length; - const minLength = countWhere(elementFlags, (f) => !!(f & (1 /* Required */ | 8 /* Variadic */))); - let typeParameters; - const properties = []; - let combinedFlags = 0; - if (arity) { - typeParameters = new Array(arity); - for (let i = 0; i < arity; i++) { - const typeParameter = typeParameters[i] = createTypeParameter(); - const flags = elementFlags[i]; - combinedFlags |= flags; - if (!(combinedFlags & 12 /* Variable */)) { - const property = createSymbol( - 4 /* Property */ | (flags & 2 /* Optional */ ? 16777216 /* Optional */ : 0), - "" + i, - readonly ? 8 /* Readonly */ : 0 - ); - property.links.tupleLabelDeclaration = namedMemberDeclarations == null ? void 0 : namedMemberDeclarations[i]; - property.links.type = typeParameter; - properties.push(property); - } - } - } - const fixedLength = properties.length; - const lengthSymbol = createSymbol(4 /* Property */, "length", readonly ? 8 /* Readonly */ : 0); - if (combinedFlags & 12 /* Variable */) { - lengthSymbol.links.type = numberType; - } else { - const literalTypes = []; - for (let i = minLength; i <= arity; i++) - literalTypes.push(getNumberLiteralType(i)); - lengthSymbol.links.type = getUnionType(literalTypes); - } - properties.push(lengthSymbol); - const type = createObjectType(8 /* Tuple */ | 4 /* Reference */); - type.typeParameters = typeParameters; - type.outerTypeParameters = void 0; - type.localTypeParameters = typeParameters; - type.instantiations = /* @__PURE__ */ new Map(); - type.instantiations.set(getTypeListId(type.typeParameters), type); - type.target = type; - type.resolvedTypeArguments = type.typeParameters; - type.thisType = createTypeParameter(); - type.thisType.isThisType = true; - type.thisType.constraint = type; - type.declaredProperties = properties; - type.declaredCallSignatures = emptyArray; - type.declaredConstructSignatures = emptyArray; - type.declaredIndexInfos = emptyArray; - type.elementFlags = elementFlags; - type.minLength = minLength; - type.fixedLength = fixedLength; - type.hasRestElement = !!(combinedFlags & 12 /* Variable */); - type.combinedFlags = combinedFlags; - type.readonly = readonly; - type.labeledElementDeclarations = namedMemberDeclarations; - return type; - } - function createNormalizedTypeReference(target, typeArguments) { - return target.objectFlags & 8 /* Tuple */ ? createNormalizedTupleType(target, typeArguments) : createTypeReference(target, typeArguments); - } - function createNormalizedTupleType(target, elementTypes) { - var _a, _b, _c; - if (!(target.combinedFlags & 14 /* NonRequired */)) { - return createTypeReference(target, elementTypes); - } - if (target.combinedFlags & 8 /* Variadic */) { - const unionIndex = findIndex(elementTypes, (t, i) => !!(target.elementFlags[i] & 8 /* Variadic */ && t.flags & (131072 /* Never */ | 1048576 /* Union */))); - if (unionIndex >= 0) { - return checkCrossProductUnion(map(elementTypes, (t, i) => target.elementFlags[i] & 8 /* Variadic */ ? t : unknownType)) ? mapType(elementTypes[unionIndex], (t) => createNormalizedTupleType(target, replaceElement(elementTypes, unionIndex, t))) : errorType; - } - } - const expandedTypes = []; - const expandedFlags = []; - const expandedDeclarations = []; - let lastRequiredIndex = -1; - let firstRestIndex = -1; - let lastOptionalOrRestIndex = -1; - for (let i = 0; i < elementTypes.length; i++) { - const type = elementTypes[i]; - const flags = target.elementFlags[i]; - if (flags & 8 /* Variadic */) { - if (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type)) { - addElement(type, 8 /* Variadic */, (_a = target.labeledElementDeclarations) == null ? void 0 : _a[i]); - } else if (isTupleType(type)) { - const elements = getElementTypes(type); - if (elements.length + expandedTypes.length >= 1e4) { - error2(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); - return errorType; - } - forEach(elements, (t, n) => { - var _a2; - return addElement(t, type.target.elementFlags[n], (_a2 = type.target.labeledElementDeclarations) == null ? void 0 : _a2[n]); - }); - } else { - addElement(isArrayLikeType(type) && getIndexTypeOfType(type, numberType) || errorType, 4 /* Rest */, (_b = target.labeledElementDeclarations) == null ? void 0 : _b[i]); - } - } else { - addElement(type, flags, (_c = target.labeledElementDeclarations) == null ? void 0 : _c[i]); - } - } - for (let i = 0; i < lastRequiredIndex; i++) { - if (expandedFlags[i] & 2 /* Optional */) - expandedFlags[i] = 1 /* Required */; - } - if (firstRestIndex >= 0 && firstRestIndex < lastOptionalOrRestIndex) { - expandedTypes[firstRestIndex] = getUnionType(sameMap( - expandedTypes.slice(firstRestIndex, lastOptionalOrRestIndex + 1), - (t, i) => expandedFlags[firstRestIndex + i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t - )); - expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); - expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); - expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); - } - const tupleTarget = getTupleTargetType(expandedFlags, target.readonly, expandedDeclarations); - return tupleTarget === emptyGenericType ? emptyObjectType : expandedFlags.length ? createTypeReference(tupleTarget, expandedTypes) : tupleTarget; - function addElement(type, flags, declaration) { - if (flags & 1 /* Required */) { - lastRequiredIndex = expandedFlags.length; - } - if (flags & 4 /* Rest */ && firstRestIndex < 0) { - firstRestIndex = expandedFlags.length; - } - if (flags & (2 /* Optional */ | 4 /* Rest */)) { - lastOptionalOrRestIndex = expandedFlags.length; - } - expandedTypes.push(flags & 2 /* Optional */ ? addOptionality( - type, - /*isProperty*/ - true - ) : type); - expandedFlags.push(flags); - expandedDeclarations.push(declaration); - } - } - function sliceTupleType(type, index, endSkipCount = 0) { - const target = type.target; - const endIndex = getTypeReferenceArity(type) - endSkipCount; - return index > target.fixedLength ? getRestArrayTypeOfTupleType(type) || createTupleType(emptyArray) : createTupleType( - getTypeArguments(type).slice(index, endIndex), - target.elementFlags.slice(index, endIndex), - /*readonly*/ - false, - target.labeledElementDeclarations && target.labeledElementDeclarations.slice(index, endIndex) - ); - } - function getKnownKeysOfTupleType(type) { - return getUnionType(append( - arrayOf(type.target.fixedLength, (i) => getStringLiteralType("" + i)), - getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType) - )); - } - function getStartElementCount(type, flags) { - const index = findIndex(type.elementFlags, (f) => !(f & flags)); - return index >= 0 ? index : type.elementFlags.length; - } - function getEndElementCount(type, flags) { - return type.elementFlags.length - findLastIndex(type.elementFlags, (f) => !(f & flags)) - 1; - } - function getTotalFixedElementCount(type) { - return type.fixedLength + getEndElementCount(type, 3 /* Fixed */); - } - function getElementTypes(type) { - const typeArguments = getTypeArguments(type); - const arity = getTypeReferenceArity(type); - return typeArguments.length === arity ? typeArguments : typeArguments.slice(0, arity); - } - function getTypeFromOptionalTypeNode(node) { - return addOptionality( - getTypeFromTypeNode(node.type), - /*isProperty*/ - true - ); - } - function getTypeId(type) { - return type.id; - } - function containsType(types, type) { - return binarySearch(types, type, getTypeId, compareValues) >= 0; - } - function insertType(types, type) { - const index = binarySearch(types, type, getTypeId, compareValues); - if (index < 0) { - types.splice(~index, 0, type); - return true; - } - return false; - } - function addTypeToUnion(typeSet, includes, type) { - const flags = type.flags; - if (!(flags & 131072 /* Never */)) { - includes |= flags & 473694207 /* IncludesMask */; - if (flags & 465829888 /* Instantiable */) - includes |= 33554432 /* IncludesInstantiable */; - if (type === wildcardType) - includes |= 8388608 /* IncludesWildcard */; - if (!strictNullChecks && flags & 98304 /* Nullable */) { - if (!(getObjectFlags(type) & 65536 /* ContainsWideningType */)) - includes |= 4194304 /* IncludesNonWideningType */; - } else { - const len = typeSet.length; - const index = len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues); - if (index < 0) { - typeSet.splice(~index, 0, type); - } - } - } - return includes; - } - function addTypesToUnion(typeSet, includes, types) { - let lastType; - for (const type of types) { - if (type !== lastType) { - includes = type.flags & 1048576 /* Union */ ? addTypesToUnion(typeSet, includes | (isNamedUnionType(type) ? 1048576 /* Union */ : 0), type.types) : addTypeToUnion(typeSet, includes, type); - lastType = type; - } - } - return includes; - } - function removeSubtypes(types, hasObjectTypes) { - var _a; - if (types.length < 2) { - return types; - } - const id = getTypeListId(types); - const match = subtypeReductionCache.get(id); - if (match) { - return match; - } - const hasEmptyObject = hasObjectTypes && some(types, (t) => !!(t.flags & 524288 /* Object */) && !isGenericMappedType(t) && isEmptyResolvedType(resolveStructuredTypeMembers(t))); - const len = types.length; - let i = len; - let count = 0; - while (i > 0) { - i--; - const source = types[i]; - if (hasEmptyObject || source.flags & 469499904 /* StructuredOrInstantiable */) { - if (source.flags & 262144 /* TypeParameter */ && getBaseConstraintOrType(source).flags & 1048576 /* Union */) { - if (isTypeRelatedTo(source, getUnionType(map(types, (t) => t === source ? neverType : t)), strictSubtypeRelation)) { - orderedRemoveItemAt(types, i); - } - continue; - } - const keyProperty = source.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */) ? find(getPropertiesOfType(source), (p) => isUnitType(getTypeOfSymbol(p))) : void 0; - const keyPropertyType = keyProperty && getRegularTypeOfLiteralType(getTypeOfSymbol(keyProperty)); - for (const target of types) { - if (source !== target) { - if (count === 1e5) { - const estimatedCount = count / (len - i) * len; - if (estimatedCount > 1e6) { - (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "removeSubtypes_DepthLimit", { typeIds: types.map((t) => t.id) }); - error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); - return void 0; - } - } - count++; - if (keyProperty && target.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) { - const t = getTypeOfPropertyOfType(target, keyProperty.escapedName); - if (t && isUnitType(t) && getRegularTypeOfLiteralType(t) !== keyPropertyType) { - continue; - } - } - if (isTypeRelatedTo(source, target, strictSubtypeRelation) && (!(getObjectFlags(getTargetType(source)) & 1 /* Class */) || !(getObjectFlags(getTargetType(target)) & 1 /* Class */) || isTypeDerivedFrom(source, target))) { - orderedRemoveItemAt(types, i); - break; - } - } - } - } - } - subtypeReductionCache.set(id, types); - return types; - } - function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) { - let i = types.length; - while (i > 0) { - i--; - const t = types[i]; - const flags = t.flags; - const remove = flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && includes & 4 /* String */ || flags & 256 /* NumberLiteral */ && includes & 8 /* Number */ || flags & 2048 /* BigIntLiteral */ && includes & 64 /* BigInt */ || flags & 8192 /* UniqueESSymbol */ && includes & 4096 /* ESSymbol */ || reduceVoidUndefined && flags & 32768 /* Undefined */ && includes & 16384 /* Void */ || isFreshLiteralType(t) && containsType(types, t.regularType); - if (remove) { - orderedRemoveItemAt(types, i); - } - } - } - function removeStringLiteralsMatchedByTemplateLiterals(types) { - const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t)); - if (templates.length) { - let i = types.length; - while (i > 0) { - i--; - const t = types[i]; - if (t.flags & 128 /* StringLiteral */ && some(templates, (template) => isTypeMatchedByTemplateLiteralType(t, template))) { - orderedRemoveItemAt(types, i); - } - } - } - } - function isNamedUnionType(type) { - return !!(type.flags & 1048576 /* Union */ && (type.aliasSymbol || type.origin)); - } - function addNamedUnions(namedUnions, types) { - for (const t of types) { - if (t.flags & 1048576 /* Union */) { - const origin = t.origin; - if (t.aliasSymbol || origin && !(origin.flags & 1048576 /* Union */)) { - pushIfUnique(namedUnions, t); - } else if (origin && origin.flags & 1048576 /* Union */) { - addNamedUnions(namedUnions, origin.types); - } - } - } - } - function createOriginUnionOrIntersectionType(flags, types) { - const result = createOriginType(flags); - result.types = types; - return result; - } - function getUnionType(types, unionReduction = 1 /* Literal */, aliasSymbol, aliasTypeArguments, origin) { - if (types.length === 0) { - return neverType; - } - if (types.length === 1) { - return types[0]; - } - if (types.length === 2 && !origin && (types[0].flags & 1048576 /* Union */ || types[1].flags & 1048576 /* Union */)) { - const infix = unionReduction === 0 /* None */ ? "N" : unionReduction === 2 /* Subtype */ ? "S" : "L"; - const index = types[0].id < types[1].id ? 0 : 1; - const id = types[index].id + infix + types[1 - index].id + getAliasId(aliasSymbol, aliasTypeArguments); - let type = unionOfUnionTypes.get(id); - if (!type) { - type = getUnionTypeWorker( - types, - unionReduction, - aliasSymbol, - aliasTypeArguments, - /*origin*/ - void 0 - ); - unionOfUnionTypes.set(id, type); - } - return type; - } - return getUnionTypeWorker(types, unionReduction, aliasSymbol, aliasTypeArguments, origin); - } - function getUnionTypeWorker(types, unionReduction, aliasSymbol, aliasTypeArguments, origin) { - let typeSet = []; - const includes = addTypesToUnion(typeSet, 0, types); - if (unionReduction !== 0 /* None */) { - if (includes & 3 /* AnyOrUnknown */) { - return includes & 1 /* Any */ ? includes & 8388608 /* IncludesWildcard */ ? wildcardType : anyType : includes & 65536 /* Null */ || containsType(typeSet, unknownType) ? unknownType : nonNullUnknownType; - } - if (includes & 32768 /* Undefined */) { - if (typeSet.length >= 2 && typeSet[0] === undefinedType && typeSet[1] === missingType) { - orderedRemoveItemAt(typeSet, 1); - } - } - if (includes & (32 /* Enum */ | 2944 /* Literal */ | 8192 /* UniqueESSymbol */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || includes & 16384 /* Void */ && includes & 32768 /* Undefined */) { - removeRedundantLiteralTypes(typeSet, includes, !!(unionReduction & 2 /* Subtype */)); - } - if (includes & 128 /* StringLiteral */ && includes & 134217728 /* TemplateLiteral */) { - removeStringLiteralsMatchedByTemplateLiterals(typeSet); - } - if (unionReduction === 2 /* Subtype */) { - typeSet = removeSubtypes(typeSet, !!(includes & 524288 /* Object */)); - if (!typeSet) { - return errorType; - } - } - if (typeSet.length === 0) { - return includes & 65536 /* Null */ ? includes & 4194304 /* IncludesNonWideningType */ ? nullType : nullWideningType : includes & 32768 /* Undefined */ ? includes & 4194304 /* IncludesNonWideningType */ ? undefinedType : undefinedWideningType : neverType; - } - } - if (!origin && includes & 1048576 /* Union */) { - const namedUnions = []; - addNamedUnions(namedUnions, types); - const reducedTypes = []; - for (const t of typeSet) { - if (!some(namedUnions, (union) => containsType(union.types, t))) { - reducedTypes.push(t); - } - } - if (!aliasSymbol && namedUnions.length === 1 && reducedTypes.length === 0) { - return namedUnions[0]; - } - const namedTypesCount = reduceLeft(namedUnions, (sum, union) => sum + union.types.length, 0); - if (namedTypesCount + reducedTypes.length === typeSet.length) { - for (const t of namedUnions) { - insertType(reducedTypes, t); - } - origin = createOriginUnionOrIntersectionType(1048576 /* Union */, reducedTypes); - } - } - const objectFlags = (includes & 36323331 /* NotPrimitiveUnion */ ? 0 : 32768 /* PrimitiveUnion */) | (includes & 2097152 /* Intersection */ ? 16777216 /* ContainsIntersections */ : 0); - return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin); - } - function getUnionOrIntersectionTypePredicate(signatures, kind) { - let last2; - const types = []; - for (const sig of signatures) { - const pred = getTypePredicateOfSignature(sig); - if (pred) { - if (pred.kind !== 0 /* This */ && pred.kind !== 1 /* Identifier */ || last2 && !typePredicateKindsMatch(last2, pred)) { - return void 0; - } - last2 = pred; - types.push(pred.type); - } else { - const returnType = kind !== 2097152 /* Intersection */ ? getReturnTypeOfSignature(sig) : void 0; - if (returnType !== falseType && returnType !== regularFalseType) { - return void 0; - } - } - } - if (!last2) { - return void 0; - } - const compositeType = getUnionOrIntersectionType(types, kind); - return createTypePredicate(last2.kind, last2.parameterName, last2.parameterIndex, compositeType); - } - function typePredicateKindsMatch(a, b) { - return a.kind === b.kind && a.parameterIndex === b.parameterIndex; - } - function getUnionTypeFromSortedList(types, precomputedObjectFlags, aliasSymbol, aliasTypeArguments, origin) { - if (types.length === 0) { - return neverType; - } - if (types.length === 1) { - return types[0]; - } - const typeKey = !origin ? getTypeListId(types) : origin.flags & 1048576 /* Union */ ? `|${getTypeListId(origin.types)}` : origin.flags & 2097152 /* Intersection */ ? `&${getTypeListId(origin.types)}` : `#${origin.type.id}|${getTypeListId(types)}`; - const id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments); - let type = unionTypes.get(id); - if (!type) { - type = createType(1048576 /* Union */); - type.objectFlags = precomputedObjectFlags | getPropagatingFlagsOfTypes( - types, - /*excludeKinds*/ - 98304 /* Nullable */ - ); - type.types = types; - type.origin = origin; - type.aliasSymbol = aliasSymbol; - type.aliasTypeArguments = aliasTypeArguments; - if (types.length === 2 && types[0].flags & 512 /* BooleanLiteral */ && types[1].flags & 512 /* BooleanLiteral */) { - type.flags |= 16 /* Boolean */; - type.intrinsicName = "boolean"; - } - unionTypes.set(id, type); - } - return type; - } - function getTypeFromUnionTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - const aliasSymbol = getAliasSymbolForTypeNode(node); - links.resolvedType = getUnionType( - map(node.types, getTypeFromTypeNode), - 1 /* Literal */, - aliasSymbol, - getTypeArgumentsForAliasSymbol(aliasSymbol) - ); - } - return links.resolvedType; - } - function addTypeToIntersection(typeSet, includes, type) { - const flags = type.flags; - if (flags & 2097152 /* Intersection */) { - return addTypesToIntersection(typeSet, includes, type.types); - } - if (isEmptyAnonymousObjectType(type)) { - if (!(includes & 16777216 /* IncludesEmptyObject */)) { - includes |= 16777216 /* IncludesEmptyObject */; - typeSet.set(type.id.toString(), type); - } - } else { - if (flags & 3 /* AnyOrUnknown */) { - if (type === wildcardType) - includes |= 8388608 /* IncludesWildcard */; - } else if (strictNullChecks || !(flags & 98304 /* Nullable */)) { - if (type === missingType) { - includes |= 262144 /* IncludesMissingType */; - type = undefinedType; - } - if (!typeSet.has(type.id.toString())) { - if (type.flags & 109472 /* Unit */ && includes & 109472 /* Unit */) { - includes |= 67108864 /* NonPrimitive */; - } - typeSet.set(type.id.toString(), type); - } - } - includes |= flags & 473694207 /* IncludesMask */; - } - return includes; - } - function addTypesToIntersection(typeSet, includes, types) { - for (const type of types) { - includes = addTypeToIntersection(typeSet, includes, getRegularTypeOfLiteralType(type)); - } - return includes; - } - function removeRedundantSupertypes(types, includes) { - let i = types.length; - while (i > 0) { - i--; - const t = types[i]; - const remove = t.flags & 4 /* String */ && includes & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || t.flags & 8 /* Number */ && includes & 256 /* NumberLiteral */ || t.flags & 64 /* BigInt */ && includes & 2048 /* BigIntLiteral */ || t.flags & 4096 /* ESSymbol */ && includes & 8192 /* UniqueESSymbol */ || t.flags & 16384 /* Void */ && includes & 32768 /* Undefined */ || isEmptyAnonymousObjectType(t) && includes & 470302716 /* DefinitelyNonNullable */; - if (remove) { - orderedRemoveItemAt(types, i); - } - } - } - function eachUnionContains(unionTypes2, type) { - for (const u of unionTypes2) { - if (!containsType(u.types, type)) { - const primitive = type.flags & 128 /* StringLiteral */ ? stringType : type.flags & (32 /* Enum */ | 256 /* NumberLiteral */) ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 8192 /* UniqueESSymbol */ ? esSymbolType : void 0; - if (!primitive || !containsType(u.types, primitive)) { - return false; - } - } - } - return true; - } - function extractRedundantTemplateLiterals(types) { - let i = types.length; - const literals = filter(types, (t) => !!(t.flags & 128 /* StringLiteral */)); - while (i > 0) { - i--; - const t = types[i]; - if (!(t.flags & 134217728 /* TemplateLiteral */)) - continue; - for (const t2 of literals) { - if (isTypeSubtypeOf(t2, t)) { - orderedRemoveItemAt(types, i); - break; - } else if (isPatternLiteralType(t)) { - return true; - } - } - } - return false; - } - function removeFromEach(types, flag) { - for (let i = 0; i < types.length; i++) { - types[i] = filterType(types[i], (t) => !(t.flags & flag)); - } - } - function intersectUnionsOfPrimitiveTypes(types) { - let unionTypes2; - const index = findIndex(types, (t) => !!(getObjectFlags(t) & 32768 /* PrimitiveUnion */)); - if (index < 0) { - return false; - } - let i = index + 1; - while (i < types.length) { - const t = types[i]; - if (getObjectFlags(t) & 32768 /* PrimitiveUnion */) { - (unionTypes2 || (unionTypes2 = [types[index]])).push(t); - orderedRemoveItemAt(types, i); - } else { - i++; - } - } - if (!unionTypes2) { - return false; - } - const checked = []; - const result = []; - for (const u of unionTypes2) { - for (const t of u.types) { - if (insertType(checked, t)) { - if (eachUnionContains(unionTypes2, t)) { - insertType(result, t); - } - } - } - } - types[index] = getUnionTypeFromSortedList(result, 32768 /* PrimitiveUnion */); - return true; - } - function createIntersectionType(types, aliasSymbol, aliasTypeArguments) { - const result = createType(2097152 /* Intersection */); - result.objectFlags = getPropagatingFlagsOfTypes( - types, - /*excludeKinds*/ - 98304 /* Nullable */ - ); - result.types = types; - result.aliasSymbol = aliasSymbol; - result.aliasTypeArguments = aliasTypeArguments; - return result; - } - function getIntersectionType(types, aliasSymbol, aliasTypeArguments, noSupertypeReduction) { - const typeMembershipMap = /* @__PURE__ */ new Map(); - const includes = addTypesToIntersection(typeMembershipMap, 0, types); - const typeSet = arrayFrom(typeMembershipMap.values()); - if (includes & 131072 /* Never */) { - return contains(typeSet, silentNeverType) ? silentNeverType : neverType; - } - if (strictNullChecks && includes & 98304 /* Nullable */ && includes & (524288 /* Object */ | 67108864 /* NonPrimitive */ | 16777216 /* IncludesEmptyObject */) || includes & 67108864 /* NonPrimitive */ && includes & (469892092 /* DisjointDomains */ & ~67108864 /* NonPrimitive */) || includes & 402653316 /* StringLike */ && includes & (469892092 /* DisjointDomains */ & ~402653316 /* StringLike */) || includes & 296 /* NumberLike */ && includes & (469892092 /* DisjointDomains */ & ~296 /* NumberLike */) || includes & 2112 /* BigIntLike */ && includes & (469892092 /* DisjointDomains */ & ~2112 /* BigIntLike */) || includes & 12288 /* ESSymbolLike */ && includes & (469892092 /* DisjointDomains */ & ~12288 /* ESSymbolLike */) || includes & 49152 /* VoidLike */ && includes & (469892092 /* DisjointDomains */ & ~49152 /* VoidLike */)) { - return neverType; - } - if (includes & 134217728 /* TemplateLiteral */ && includes & 128 /* StringLiteral */ && extractRedundantTemplateLiterals(typeSet)) { - return neverType; - } - if (includes & 1 /* Any */) { - return includes & 8388608 /* IncludesWildcard */ ? wildcardType : anyType; - } - if (!strictNullChecks && includes & 98304 /* Nullable */) { - return includes & 16777216 /* IncludesEmptyObject */ ? neverType : includes & 32768 /* Undefined */ ? undefinedType : nullType; - } - if (includes & 4 /* String */ && includes & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) || includes & 8 /* Number */ && includes & 256 /* NumberLiteral */ || includes & 64 /* BigInt */ && includes & 2048 /* BigIntLiteral */ || includes & 4096 /* ESSymbol */ && includes & 8192 /* UniqueESSymbol */ || includes & 16384 /* Void */ && includes & 32768 /* Undefined */ || includes & 16777216 /* IncludesEmptyObject */ && includes & 470302716 /* DefinitelyNonNullable */) { - if (!noSupertypeReduction) - removeRedundantSupertypes(typeSet, includes); - } - if (includes & 262144 /* IncludesMissingType */) { - typeSet[typeSet.indexOf(undefinedType)] = missingType; - } - if (typeSet.length === 0) { - return unknownType; - } - if (typeSet.length === 1) { - return typeSet[0]; - } - const id = getTypeListId(typeSet) + getAliasId(aliasSymbol, aliasTypeArguments); - let result = intersectionTypes.get(id); - if (!result) { - if (includes & 1048576 /* Union */) { - if (intersectUnionsOfPrimitiveTypes(typeSet)) { - result = getIntersectionType(typeSet, aliasSymbol, aliasTypeArguments); - } else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && t.types[0].flags & 32768 /* Undefined */))) { - const containedUndefinedType = some(typeSet, containsMissingType) ? missingType : undefinedType; - removeFromEach(typeSet, 32768 /* Undefined */); - result = getUnionType([getIntersectionType(typeSet), containedUndefinedType], 1 /* Literal */, aliasSymbol, aliasTypeArguments); - } else if (every(typeSet, (t) => !!(t.flags & 1048576 /* Union */ && (t.types[0].flags & 65536 /* Null */ || t.types[1].flags & 65536 /* Null */)))) { - removeFromEach(typeSet, 65536 /* Null */); - result = getUnionType([getIntersectionType(typeSet), nullType], 1 /* Literal */, aliasSymbol, aliasTypeArguments); - } else { - if (!checkCrossProductUnion(typeSet)) { - return errorType; - } - const constituents = getCrossProductIntersections(typeSet); - const origin = some(constituents, (t) => !!(t.flags & 2097152 /* Intersection */)) && getConstituentCountOfTypes(constituents) > getConstituentCountOfTypes(typeSet) ? createOriginUnionOrIntersectionType(2097152 /* Intersection */, typeSet) : void 0; - result = getUnionType(constituents, 1 /* Literal */, aliasSymbol, aliasTypeArguments, origin); - } - } else { - result = createIntersectionType(typeSet, aliasSymbol, aliasTypeArguments); - } - intersectionTypes.set(id, result); - } - return result; - } - function getCrossProductUnionSize(types) { - return reduceLeft(types, (n, t) => t.flags & 1048576 /* Union */ ? n * t.types.length : t.flags & 131072 /* Never */ ? 0 : n, 1); - } - function checkCrossProductUnion(types) { - var _a; - const size = getCrossProductUnionSize(types); - if (size >= 1e5) { - (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkCrossProductUnion_DepthLimit", { typeIds: types.map((t) => t.id), size }); - error2(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); - return false; - } - return true; - } - function getCrossProductIntersections(types) { - const count = getCrossProductUnionSize(types); - const intersections = []; - for (let i = 0; i < count; i++) { - const constituents = types.slice(); - let n = i; - for (let j = types.length - 1; j >= 0; j--) { - if (types[j].flags & 1048576 /* Union */) { - const sourceTypes = types[j].types; - const length2 = sourceTypes.length; - constituents[j] = sourceTypes[n % length2]; - n = Math.floor(n / length2); - } - } - const t = getIntersectionType(constituents); - if (!(t.flags & 131072 /* Never */)) - intersections.push(t); - } - return intersections; - } - function getConstituentCount(type) { - return !(type.flags & 3145728 /* UnionOrIntersection */) || type.aliasSymbol ? 1 : type.flags & 1048576 /* Union */ && type.origin ? getConstituentCount(type.origin) : getConstituentCountOfTypes(type.types); - } - function getConstituentCountOfTypes(types) { - return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0); - } - function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) { - return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType; - } - function getTypeFromIntersectionTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - const aliasSymbol = getAliasSymbolForTypeNode(node); - const types = map(node.types, getTypeFromTypeNode); - const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0])); - links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction); - } - return links.resolvedType; - } - function createIndexType(type, indexFlags) { - const result = createType(4194304 /* Index */); - result.type = type; - result.indexFlags = indexFlags; - return result; - } - function createOriginIndexType(type) { - const result = createOriginType(4194304 /* Index */); - result.type = type; - return result; - } - function getIndexTypeForGenericType(type, indexFlags) { - return indexFlags & 1 /* StringsOnly */ ? type.resolvedStringIndexType || (type.resolvedStringIndexType = createIndexType(type, 1 /* StringsOnly */)) : type.resolvedIndexType || (type.resolvedIndexType = createIndexType(type, 0 /* None */)); - } - function getIndexTypeForMappedType(type, indexFlags) { - const typeParameter = getTypeParameterFromMappedType(type); - const constraintType = getConstraintTypeFromMappedType(type); - const nameType = getNameTypeFromMappedType(type.target || type); - if (!nameType && !(indexFlags & 2 /* NoIndexSignatures */)) { - return constraintType; - } - const keyTypes = []; - if (isMappedTypeWithKeyofConstraintDeclaration(type)) { - if (!isGenericIndexType(constraintType)) { - const modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); - forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576 /* StringOrNumberLiteralOrUnique */, !!(indexFlags & 1 /* StringsOnly */), addMemberForKeyType); - } else { - return getIndexTypeForGenericType(type, indexFlags); - } - } else { - forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType); - } - if (isGenericIndexType(constraintType)) { - forEachType(constraintType, addMemberForKeyType); - } - const result = indexFlags & 2 /* NoIndexSignatures */ ? filterType(getUnionType(keyTypes), (t) => !(t.flags & (1 /* Any */ | 4 /* String */))) : getUnionType(keyTypes); - if (result.flags & 1048576 /* Union */ && constraintType.flags & 1048576 /* Union */ && getTypeListId(result.types) === getTypeListId(constraintType.types)) { - return constraintType; - } - return result; - function addMemberForKeyType(keyType) { - const propNameType = nameType ? instantiateType(nameType, appendTypeMapping(type.mapper, typeParameter, keyType)) : keyType; - keyTypes.push(propNameType === stringType ? stringOrNumberType : propNameType); - } - } - function hasDistributiveNameType(mappedType) { - const typeVariable = getTypeParameterFromMappedType(mappedType); - return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable); - function isDistributive(type) { - return type.flags & (3 /* AnyOrUnknown */ | 402784252 /* Primitive */ | 131072 /* Never */ | 262144 /* TypeParameter */ | 524288 /* Object */ | 67108864 /* NonPrimitive */) ? true : type.flags & 16777216 /* Conditional */ ? type.root.isDistributive && type.checkType === typeVariable : type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) ? every(type.types, isDistributive) : type.flags & 8388608 /* IndexedAccess */ ? isDistributive(type.objectType) && isDistributive(type.indexType) : type.flags & 33554432 /* Substitution */ ? isDistributive(type.baseType) && isDistributive(type.constraint) : type.flags & 268435456 /* StringMapping */ ? isDistributive(type.type) : false; - } - } - function getLiteralTypeFromPropertyName(name) { - if (isPrivateIdentifier(name)) { - return neverType; - } - if (isNumericLiteral(name)) { - return getRegularTypeOfLiteralType(checkExpression(name)); - } - if (isComputedPropertyName(name)) { - return getRegularTypeOfLiteralType(checkComputedPropertyName(name)); - } - const propertyName = getPropertyNameForPropertyNameNode(name); - if (propertyName !== void 0) { - return getStringLiteralType(unescapeLeadingUnderscores(propertyName)); - } - if (isExpression(name)) { - return getRegularTypeOfLiteralType(checkExpression(name)); - } - return neverType; - } - function getLiteralTypeFromProperty(prop, include, includeNonPublic) { - if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) { - let type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; - if (!type) { - const name = getNameOfDeclaration(prop.valueDeclaration); - type = prop.escapedName === "default" /* Default */ ? getStringLiteralType("default") : name && getLiteralTypeFromPropertyName(name) || (!isKnownSymbol(prop) ? getStringLiteralType(symbolName(prop)) : void 0); - } - if (type && type.flags & include) { - return type; - } - } - return neverType; - } - function isKeyTypeIncluded(keyType, include) { - return !!(keyType.flags & include || keyType.flags & 2097152 /* Intersection */ && some(keyType.types, (t) => isKeyTypeIncluded(t, include))); - } - function getLiteralTypeFromProperties(type, include, includeOrigin) { - const origin = includeOrigin && (getObjectFlags(type) & (3 /* ClassOrInterface */ | 4 /* Reference */) || type.aliasSymbol) ? createOriginIndexType(type) : void 0; - const propertyTypes = map(getPropertiesOfType(type), (prop) => getLiteralTypeFromProperty(prop, include)); - const indexKeyTypes = map(getIndexInfosOfType(type), (info) => info !== enumNumberIndexInfo && isKeyTypeIncluded(info.keyType, include) ? info.keyType === stringType && include & 8 /* Number */ ? stringOrNumberType : info.keyType : neverType); - return getUnionType( - concatenate(propertyTypes, indexKeyTypes), - 1 /* Literal */, - /*aliasSymbol*/ - void 0, - /*aliasTypeArguments*/ - void 0, - origin - ); - } - function shouldDeferIndexType(type, indexFlags = 0 /* None */) { - return !!(type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericTupleType(type) || isGenericMappedType(type) && !hasDistributiveNameType(type) || type.flags & 1048576 /* Union */ && !(indexFlags & 4 /* NoReducibleCheck */) && isGenericReducibleType(type) || type.flags & 2097152 /* Intersection */ && maybeTypeOfKind(type, 465829888 /* Instantiable */) && some(type.types, isEmptyAnonymousObjectType)); - } - function getIndexType(type, indexFlags = defaultIndexFlags) { - type = getReducedType(type); - return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties( - type, - (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), - indexFlags === defaultIndexFlags - ); - } - function getExtractStringType(type) { - if (keyofStringsOnly) { - return type; - } - const extractTypeAlias = getGlobalExtractSymbol(); - return extractTypeAlias ? getTypeAliasInstantiation(extractTypeAlias, [type, stringType]) : stringType; - } - function getIndexTypeOrString(type) { - const indexType = getExtractStringType(getIndexType(type)); - return indexType.flags & 131072 /* Never */ ? stringType : indexType; - } - function getTypeFromTypeOperatorNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - switch (node.operator) { - case 143 /* KeyOfKeyword */: - links.resolvedType = getIndexType(getTypeFromTypeNode(node.type)); - break; - case 158 /* UniqueKeyword */: - links.resolvedType = node.type.kind === 155 /* SymbolKeyword */ ? getESSymbolLikeTypeForNode(walkUpParenthesizedTypes(node.parent)) : errorType; - break; - case 148 /* ReadonlyKeyword */: - links.resolvedType = getTypeFromTypeNode(node.type); - break; - default: - Debug.assertNever(node.operator); - } - } - return links.resolvedType; - } - function getTypeFromTemplateTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = getTemplateLiteralType( - [node.head.text, ...map(node.templateSpans, (span) => span.literal.text)], - map(node.templateSpans, (span) => getTypeFromTypeNode(span.type)) - ); - } - return links.resolvedType; - } - function getTemplateLiteralType(texts, types) { - const unionIndex = findIndex(types, (t) => !!(t.flags & (131072 /* Never */ | 1048576 /* Union */))); - if (unionIndex >= 0) { - return checkCrossProductUnion(types) ? mapType(types[unionIndex], (t) => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : errorType; - } - if (contains(types, wildcardType)) { - return wildcardType; - } - const newTypes = []; - const newTexts = []; - let text = texts[0]; - if (!addSpans(texts, types)) { - return stringType; - } - if (newTypes.length === 0) { - return getStringLiteralType(text); - } - newTexts.push(text); - if (every(newTexts, (t) => t === "")) { - if (every(newTypes, (t) => !!(t.flags & 4 /* String */))) { - return stringType; - } - if (newTypes.length === 1 && isPatternLiteralType(newTypes[0])) { - return newTypes[0]; - } - } - const id = `${getTypeListId(newTypes)}|${map(newTexts, (t) => t.length).join(",")}|${newTexts.join("")}`; - let type = templateLiteralTypes.get(id); - if (!type) { - templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes)); - } - return type; - function addSpans(texts2, types2) { - for (let i = 0; i < types2.length; i++) { - const t = types2[i]; - if (t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) { - text += getTemplateStringForType(t) || ""; - text += texts2[i + 1]; - } else if (t.flags & 134217728 /* TemplateLiteral */) { - text += t.texts[0]; - if (!addSpans(t.texts, t.types)) - return false; - text += texts2[i + 1]; - } else if (isGenericIndexType(t) || isPatternLiteralPlaceholderType(t)) { - newTypes.push(t); - newTexts.push(text); - text = texts2[i + 1]; - } else { - return false; - } - } - return true; - } - } - function getTemplateStringForType(type) { - return type.flags & 128 /* StringLiteral */ ? type.value : type.flags & 256 /* NumberLiteral */ ? "" + type.value : type.flags & 2048 /* BigIntLiteral */ ? pseudoBigIntToString(type.value) : type.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) ? type.intrinsicName : void 0; - } - function createTemplateLiteralType(texts, types) { - const type = createType(134217728 /* TemplateLiteral */); - type.objectFlags = getPropagatingFlagsOfTypes( - types, - /*excludeKinds*/ - 98304 /* Nullable */ - ); - type.texts = texts; - type.types = types; - return type; - } - function getStringMappingType(symbol, type) { - return type.flags & (1048576 /* Union */ | 131072 /* Never */) ? mapType(type, (t) => getStringMappingType(symbol, t)) : type.flags & 128 /* StringLiteral */ ? getStringLiteralType(applyStringMapping(symbol, type.value)) : type.flags & 134217728 /* TemplateLiteral */ ? getTemplateLiteralType(...applyTemplateStringMapping(symbol, type.texts, type.types)) : ( - // Mapping> === Mapping - type.flags & 268435456 /* StringMapping */ && symbol === type.symbol ? type : type.flags & (1 /* Any */ | 4 /* String */ | 268435456 /* StringMapping */) || isGenericIndexType(type) ? getStringMappingTypeForGenericType(symbol, type) : ( - // This handles Mapping<`${number}`> and Mapping<`${bigint}`> - isPatternLiteralPlaceholderType(type) ? getStringMappingTypeForGenericType(symbol, getTemplateLiteralType(["", ""], [type])) : type - ) - ); - } - function applyStringMapping(symbol, str) { - switch (intrinsicTypeKinds.get(symbol.escapedName)) { - case 0 /* Uppercase */: - return str.toUpperCase(); - case 1 /* Lowercase */: - return str.toLowerCase(); - case 2 /* Capitalize */: - return str.charAt(0).toUpperCase() + str.slice(1); - case 3 /* Uncapitalize */: - return str.charAt(0).toLowerCase() + str.slice(1); - } - return str; - } - function applyTemplateStringMapping(symbol, texts, types) { - switch (intrinsicTypeKinds.get(symbol.escapedName)) { - case 0 /* Uppercase */: - return [texts.map((t) => t.toUpperCase()), types.map((t) => getStringMappingType(symbol, t))]; - case 1 /* Lowercase */: - return [texts.map((t) => t.toLowerCase()), types.map((t) => getStringMappingType(symbol, t))]; - case 2 /* Capitalize */: - return [texts[0] === "" ? texts : [texts[0].charAt(0).toUpperCase() + texts[0].slice(1), ...texts.slice(1)], texts[0] === "" ? [getStringMappingType(symbol, types[0]), ...types.slice(1)] : types]; - case 3 /* Uncapitalize */: - return [texts[0] === "" ? texts : [texts[0].charAt(0).toLowerCase() + texts[0].slice(1), ...texts.slice(1)], texts[0] === "" ? [getStringMappingType(symbol, types[0]), ...types.slice(1)] : types]; - } - return [texts, types]; - } - function getStringMappingTypeForGenericType(symbol, type) { - const id = `${getSymbolId(symbol)},${getTypeId(type)}`; - let result = stringMappingTypes.get(id); - if (!result) { - stringMappingTypes.set(id, result = createStringMappingType(symbol, type)); - } - return result; - } - function createStringMappingType(symbol, type) { - const result = createTypeWithSymbol(268435456 /* StringMapping */, symbol); - result.type = type; - return result; - } - function createIndexedAccessType(objectType, indexType, accessFlags, aliasSymbol, aliasTypeArguments) { - const type = createType(8388608 /* IndexedAccess */); - type.objectType = objectType; - type.indexType = indexType; - type.accessFlags = accessFlags; - type.aliasSymbol = aliasSymbol; - type.aliasTypeArguments = aliasTypeArguments; - return type; - } - function isJSLiteralType(type) { - if (noImplicitAny) { - return false; - } - if (getObjectFlags(type) & 4096 /* JSLiteral */) { - return true; - } - if (type.flags & 1048576 /* Union */) { - return every(type.types, isJSLiteralType); - } - if (type.flags & 2097152 /* Intersection */) { - return some(type.types, isJSLiteralType); - } - if (type.flags & 465829888 /* Instantiable */) { - const constraint = getResolvedBaseConstraint(type); - return constraint !== type && isJSLiteralType(constraint); - } - return false; - } - function getPropertyNameFromIndex(indexType, accessNode) { - return isTypeUsableAsPropertyName(indexType) ? getPropertyNameFromType(indexType) : accessNode && isPropertyName(accessNode) ? ( - // late bound names are handled in the first branch, so here we only need to handle normal names - getPropertyNameForPropertyNameNode(accessNode) - ) : void 0; - } - function isUncalledFunctionReference(node, symbol) { - if (symbol.flags & (16 /* Function */ | 8192 /* Method */)) { - const parent2 = findAncestor(node.parent, (n) => !isAccessExpression(n)) || node.parent; - if (isCallLikeExpression(parent2)) { - return isCallOrNewExpression(parent2) && isIdentifier(node) && hasMatchingArgument(parent2, node); - } - return every(symbol.declarations, (d) => !isFunctionLike(d) || isDeprecatedDeclaration2(d)); - } - return true; - } - function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) { - const accessExpression = accessNode && accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode : void 0; - const propName = accessNode && isPrivateIdentifier(accessNode) ? void 0 : getPropertyNameFromIndex(indexType, accessNode); - if (propName !== void 0) { - if (accessFlags & 256 /* Contextual */) { - return getTypeOfPropertyOfContextualType(objectType, propName) || anyType; - } - const prop = getPropertyOfType(objectType, propName); - if (prop) { - if (accessFlags & 64 /* ReportDeprecated */ && accessNode && prop.declarations && isDeprecatedSymbol(prop) && isUncalledFunctionReference(accessNode, prop)) { - const deprecatedNode = (accessExpression == null ? void 0 : accessExpression.argumentExpression) ?? (isIndexedAccessTypeNode(accessNode) ? accessNode.indexType : accessNode); - addDeprecatedSuggestion(deprecatedNode, prop.declarations, propName); - } - if (accessExpression) { - markPropertyAsReferenced(prop, accessExpression, isSelfTypeAccess(accessExpression.expression, objectType.symbol)); - if (isAssignmentToReadonlyEntity(accessExpression, prop, getAssignmentTargetKind(accessExpression))) { - error2(accessExpression.argumentExpression, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(prop)); - return void 0; - } - if (accessFlags & 8 /* CacheSymbol */) { - getNodeLinks(accessNode).resolvedSymbol = prop; - } - if (isThisPropertyAccessInConstructor(accessExpression, prop)) { - return autoType; - } - } - const propType = getTypeOfSymbol(prop); - return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 /* Definite */ ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType; - } - if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) { - const index = +propName; - if (accessNode && everyType(objectType, (t) => !t.target.hasRestElement) && !(accessFlags & 16 /* NoTupleBoundsCheck */)) { - const indexNode = getIndexNodeForAccessExpression(accessNode); - if (isTupleType(objectType)) { - if (index < 0) { - error2(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); - return undefinedType; - } - error2( - indexNode, - Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, - typeToString(objectType), - getTypeReferenceArity(objectType), - unescapeLeadingUnderscores(propName) - ); - } else { - error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); - } - } - if (index >= 0) { - errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, numberType)); - return getTupleElementTypeOutOfStartCount(objectType, index, accessFlags & 1 /* IncludeUndefined */ ? missingType : void 0); - } - } - } - if (!(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */)) { - if (objectType.flags & (1 /* Any */ | 131072 /* Never */)) { - return objectType; - } - const indexInfo = getApplicableIndexInfo(objectType, indexType) || getIndexInfoOfType(objectType, stringType); - if (indexInfo) { - if (accessFlags & 2 /* NoIndexSignatures */ && indexInfo.keyType !== numberType) { - if (accessExpression) { - error2(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); - } - return void 0; - } - if (accessNode && indexInfo.keyType === stringType && !isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) { - const indexNode = getIndexNodeForAccessExpression(accessNode); - error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); - return accessFlags & 1 /* IncludeUndefined */ ? getUnionType([indexInfo.type, missingType]) : indexInfo.type; - } - errorIfWritingToReadonlyIndex(indexInfo); - if (accessFlags & 1 /* IncludeUndefined */ && !(objectType.symbol && objectType.symbol.flags & (256 /* RegularEnum */ | 128 /* ConstEnum */) && (indexType.symbol && indexType.flags & 1024 /* EnumLiteral */ && getParentOfSymbol(indexType.symbol) === objectType.symbol))) { - return getUnionType([indexInfo.type, missingType]); - } - return indexInfo.type; - } - if (indexType.flags & 131072 /* Never */) { - return neverType; - } - if (isJSLiteralType(objectType)) { - return anyType; - } - if (accessExpression && !isConstEnumObjectType(objectType)) { - if (isObjectLiteralType2(objectType)) { - if (noImplicitAny && indexType.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - diagnostics.add(createDiagnosticForNode(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, indexType.value, typeToString(objectType))); - return undefinedType; - } else if (indexType.flags & (8 /* Number */ | 4 /* String */)) { - const types = map(objectType.properties, (property) => { - return getTypeOfSymbol(property); - }); - return getUnionType(append(types, undefinedType)); - } - } - if (objectType.symbol === globalThisSymbol && propName !== void 0 && globalThisSymbol.exports.has(propName) && globalThisSymbol.exports.get(propName).flags & 418 /* BlockScoped */) { - error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); - } else if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !(accessFlags & 128 /* SuppressNoImplicitAnyError */)) { - if (propName !== void 0 && typeHasStaticProperty(propName, objectType)) { - const typeName = typeToString(objectType); - error2(accessExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "[" + getTextOfNode(accessExpression.argumentExpression) + "]"); - } else if (getIndexTypeOfType(objectType, numberType)) { - error2(accessExpression.argumentExpression, Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number); - } else { - let suggestion; - if (propName !== void 0 && (suggestion = getSuggestionForNonexistentProperty(propName, objectType))) { - if (suggestion !== void 0) { - error2(accessExpression.argumentExpression, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(objectType), suggestion); - } - } else { - const suggestion2 = getSuggestionForNonexistentIndexSignature(objectType, accessExpression, indexType); - if (suggestion2 !== void 0) { - error2(accessExpression, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1, typeToString(objectType), suggestion2); - } else { - let errorInfo; - if (indexType.flags & 1024 /* EnumLiteral */) { - errorInfo = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Property_0_does_not_exist_on_type_1, - "[" + typeToString(indexType) + "]", - typeToString(objectType) - ); - } else if (indexType.flags & 8192 /* UniqueESSymbol */) { - const symbolName2 = getFullyQualifiedName(indexType.symbol, accessExpression); - errorInfo = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Property_0_does_not_exist_on_type_1, - "[" + symbolName2 + "]", - typeToString(objectType) - ); - } else if (indexType.flags & 128 /* StringLiteral */) { - errorInfo = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Property_0_does_not_exist_on_type_1, - indexType.value, - typeToString(objectType) - ); - } else if (indexType.flags & 256 /* NumberLiteral */) { - errorInfo = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Property_0_does_not_exist_on_type_1, - indexType.value, - typeToString(objectType) - ); - } else if (indexType.flags & (8 /* Number */ | 4 /* String */)) { - errorInfo = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1, - typeToString(indexType), - typeToString(objectType) - ); - } - errorInfo = chainDiagnosticMessages( - errorInfo, - Diagnostics.Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1, - typeToString(fullIndexType), - typeToString(objectType) - ); - diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(accessExpression), accessExpression, errorInfo)); - } - } - } - } - return void 0; - } - } - if (isJSLiteralType(objectType)) { - return anyType; - } - if (accessNode) { - const indexNode = getIndexNodeForAccessExpression(accessNode); - if (indexType.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */)) { - error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, "" + indexType.value, typeToString(objectType)); - } else if (indexType.flags & (4 /* String */ | 8 /* Number */)) { - error2(indexNode, Diagnostics.Type_0_has_no_matching_index_signature_for_type_1, typeToString(objectType), typeToString(indexType)); - } else { - error2(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); - } - } - if (isTypeAny(indexType)) { - return indexType; - } - return void 0; - function errorIfWritingToReadonlyIndex(indexInfo) { - if (indexInfo && indexInfo.isReadonly && accessExpression && (isAssignmentTarget(accessExpression) || isDeleteTarget(accessExpression))) { - error2(accessExpression, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); - } - } - } - function getIndexNodeForAccessExpression(accessNode) { - return accessNode.kind === 212 /* ElementAccessExpression */ ? accessNode.argumentExpression : accessNode.kind === 199 /* IndexedAccessType */ ? accessNode.indexType : accessNode.kind === 167 /* ComputedPropertyName */ ? accessNode.expression : accessNode; - } - function isPatternLiteralPlaceholderType(type) { - if (type.flags & 2097152 /* Intersection */) { - return some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) || isPatternLiteralPlaceholderType(t)); - } - return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); - } - function isPatternLiteralType(type) { - return !!(type.flags & 134217728 /* TemplateLiteral */) && every(type.types, isPatternLiteralPlaceholderType) || !!(type.flags & 268435456 /* StringMapping */) && isPatternLiteralPlaceholderType(type.type); - } - function isGenericType(type) { - return !!getGenericObjectFlags(type); - } - function isGenericObjectType(type) { - return !!(getGenericObjectFlags(type) & 4194304 /* IsGenericObjectType */); - } - function isGenericIndexType(type) { - return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericIndexType */); - } - function getGenericObjectFlags(type) { - if (type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */)) { - if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) { - type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0); - } - return type.objectFlags & 12582912 /* IsGenericType */; - } - if (type.flags & 33554432 /* Substitution */) { - if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) { - type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | getGenericObjectFlags(type.baseType) | getGenericObjectFlags(type.constraint); - } - return type.objectFlags & 12582912 /* IsGenericType */; - } - return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0); - } - function getSimplifiedType(type, writing) { - return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type; - } - function distributeIndexOverObjectType(objectType, indexType, writing) { - if (objectType.flags & 1048576 /* Union */ || objectType.flags & 2097152 /* Intersection */ && !shouldDeferIndexType(objectType)) { - const types = map(objectType.types, (t) => getSimplifiedType(getIndexedAccessType(t, indexType), writing)); - return objectType.flags & 2097152 /* Intersection */ || writing ? getIntersectionType(types) : getUnionType(types); - } - } - function distributeObjectOverIndexType(objectType, indexType, writing) { - if (indexType.flags & 1048576 /* Union */) { - const types = map(indexType.types, (t) => getSimplifiedType(getIndexedAccessType(objectType, t), writing)); - return writing ? getIntersectionType(types) : getUnionType(types); - } - } - function getSimplifiedIndexedAccessType(type, writing) { - const cache = writing ? "simplifiedForWriting" : "simplifiedForReading"; - if (type[cache]) { - return type[cache] === circularConstraintType ? type : type[cache]; - } - type[cache] = circularConstraintType; - const objectType = getSimplifiedType(type.objectType, writing); - const indexType = getSimplifiedType(type.indexType, writing); - const distributedOverIndex = distributeObjectOverIndexType(objectType, indexType, writing); - if (distributedOverIndex) { - return type[cache] = distributedOverIndex; - } - if (!(indexType.flags & 465829888 /* Instantiable */)) { - const distributedOverObject = distributeIndexOverObjectType(objectType, indexType, writing); - if (distributedOverObject) { - return type[cache] = distributedOverObject; - } - } - if (isGenericTupleType(objectType) && indexType.flags & 296 /* NumberLike */) { - const elementType = getElementTypeOfSliceOfTupleType( - objectType, - indexType.flags & 8 /* Number */ ? 0 : objectType.target.fixedLength, - /*endSkipCount*/ - 0, - writing - ); - if (elementType) { - return type[cache] = elementType; - } - } - if (isGenericMappedType(objectType)) { - if (!getNameTypeFromMappedType(objectType) || isFilteringMappedType(objectType)) { - return type[cache] = mapType(substituteIndexedMappedType(objectType, type.indexType), (t) => getSimplifiedType(t, writing)); - } - } - return type[cache] = type; - } - function getSimplifiedConditionalType(type, writing) { - const checkType = type.checkType; - const extendsType = type.extendsType; - const trueType2 = getTrueTypeFromConditionalType(type); - const falseType2 = getFalseTypeFromConditionalType(type); - if (falseType2.flags & 131072 /* Never */ && getActualTypeVariable(trueType2) === getActualTypeVariable(checkType)) { - if (checkType.flags & 1 /* Any */ || isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(extendsType))) { - return getSimplifiedType(trueType2, writing); - } else if (isIntersectionEmpty(checkType, extendsType)) { - return neverType; - } - } else if (trueType2.flags & 131072 /* Never */ && getActualTypeVariable(falseType2) === getActualTypeVariable(checkType)) { - if (!(checkType.flags & 1 /* Any */) && isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(extendsType))) { - return neverType; - } else if (checkType.flags & 1 /* Any */ || isIntersectionEmpty(checkType, extendsType)) { - return getSimplifiedType(falseType2, writing); - } - } - return type; - } - function isIntersectionEmpty(type1, type2) { - return !!(getUnionType([intersectTypes(type1, type2), neverType]).flags & 131072 /* Never */); - } - function substituteIndexedMappedType(objectType, index) { - const mapper = createTypeMapper([getTypeParameterFromMappedType(objectType)], [index]); - const templateMapper = combineTypeMappers(objectType.mapper, mapper); - return instantiateType(getTemplateTypeFromMappedType(objectType.target || objectType), templateMapper); - } - function getIndexedAccessType(objectType, indexType, accessFlags = 0 /* None */, accessNode, aliasSymbol, aliasTypeArguments) { - return getIndexedAccessTypeOrUndefined(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) || (accessNode ? errorType : unknownType); - } - function indexTypeLessThan(indexType, limit) { - return everyType(indexType, (t) => { - if (t.flags & 384 /* StringOrNumberLiteral */) { - const propName = getPropertyNameFromType(t); - if (isNumericLiteralName(propName)) { - const index = +propName; - return index >= 0 && index < limit; - } - } - return false; - }); - } - function getIndexedAccessTypeOrUndefined(objectType, indexType, accessFlags = 0 /* None */, accessNode, aliasSymbol, aliasTypeArguments) { - if (objectType === wildcardType || indexType === wildcardType) { - return wildcardType; - } - objectType = getReducedType(objectType); - if (isStringIndexSignatureOnlyType(objectType) && !(indexType.flags & 98304 /* Nullable */) && isTypeAssignableToKind(indexType, 4 /* String */ | 8 /* Number */)) { - indexType = stringType; - } - if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32 /* ExpressionPosition */) - accessFlags |= 1 /* IncludeUndefined */; - if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 199 /* IndexedAccessType */ ? isGenericTupleType(objectType) && !indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target)) : isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, getTotalFixedElementCount(objectType.target))) || isGenericReducibleType(objectType))) { - if (objectType.flags & 3 /* AnyOrUnknown */) { - return objectType; - } - const persistentAccessFlags = accessFlags & 1 /* Persistent */; - const id = objectType.id + "," + indexType.id + "," + persistentAccessFlags + getAliasId(aliasSymbol, aliasTypeArguments); - let type = indexedAccessTypes.get(id); - if (!type) { - indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType, persistentAccessFlags, aliasSymbol, aliasTypeArguments)); - } - return type; - } - const apparentObjectType = getReducedApparentType(objectType); - if (indexType.flags & 1048576 /* Union */ && !(indexType.flags & 16 /* Boolean */)) { - const propTypes = []; - let wasMissingProp = false; - for (const t of indexType.types) { - const propType = getPropertyTypeForIndexType(objectType, apparentObjectType, t, indexType, accessNode, accessFlags | (wasMissingProp ? 128 /* SuppressNoImplicitAnyError */ : 0)); - if (propType) { - propTypes.push(propType); - } else if (!accessNode) { - return void 0; - } else { - wasMissingProp = true; - } - } - if (wasMissingProp) { - return void 0; - } - return accessFlags & 4 /* Writing */ ? getIntersectionType(propTypes, aliasSymbol, aliasTypeArguments) : getUnionType(propTypes, 1 /* Literal */, aliasSymbol, aliasTypeArguments); - } - return getPropertyTypeForIndexType(objectType, apparentObjectType, indexType, indexType, accessNode, accessFlags | 8 /* CacheSymbol */ | 64 /* ReportDeprecated */); - } - function getTypeFromIndexedAccessTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - const objectType = getTypeFromTypeNode(node.objectType); - const indexType = getTypeFromTypeNode(node.indexType); - const potentialAlias = getAliasSymbolForTypeNode(node); - links.resolvedType = getIndexedAccessType(objectType, indexType, 0 /* None */, node, potentialAlias, getTypeArgumentsForAliasSymbol(potentialAlias)); - } - return links.resolvedType; - } - function getTypeFromMappedTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - const type = createObjectType(32 /* Mapped */, node.symbol); - type.declaration = node; - type.aliasSymbol = getAliasSymbolForTypeNode(node); - type.aliasTypeArguments = getTypeArgumentsForAliasSymbol(type.aliasSymbol); - links.resolvedType = type; - getConstraintTypeFromMappedType(type); - } - return links.resolvedType; - } - function getActualTypeVariable(type) { - if (type.flags & 33554432 /* Substitution */) { - return getActualTypeVariable(type.baseType); - } - if (type.flags & 8388608 /* IndexedAccess */ && (type.objectType.flags & 33554432 /* Substitution */ || type.indexType.flags & 33554432 /* Substitution */)) { - return getIndexedAccessType(getActualTypeVariable(type.objectType), getActualTypeVariable(type.indexType)); - } - return type; - } - function maybeCloneTypeParameter(p) { - const constraint = getConstraintOfTypeParameter(p); - return constraint && (isGenericObjectType(constraint) || isGenericIndexType(constraint)) ? cloneTypeParameter(p) : p; - } - function isSimpleTupleType(node) { - return isTupleTypeNode(node) && length(node.elements) > 0 && !some(node.elements, (e) => isOptionalTypeNode(e) || isRestTypeNode(e) || isNamedTupleMember(e) && !!(e.questionToken || e.dotDotDotToken)); - } - function isDeferredType(type, checkTuples) { - return isGenericType(type) || checkTuples && isTupleType(type) && some(getElementTypes(type), isGenericType); - } - function getConditionalType(root, mapper, aliasSymbol, aliasTypeArguments) { - let result; - let extraTypes; - let tailCount = 0; - while (true) { - if (tailCount === 1e3) { - error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); - return errorType; - } - const checkType = instantiateType(getActualTypeVariable(root.checkType), mapper); - const extendsType = instantiateType(root.extendsType, mapper); - if (checkType === errorType || extendsType === errorType) { - return errorType; - } - if (checkType === wildcardType || extendsType === wildcardType) { - return wildcardType; - } - const checkTuples = isSimpleTupleType(root.node.checkType) && isSimpleTupleType(root.node.extendsType) && length(root.node.checkType.elements) === length(root.node.extendsType.elements); - const checkTypeDeferred = isDeferredType(checkType, checkTuples); - let combinedMapper; - if (root.inferTypeParameters) { - const freshParams = sameMap(root.inferTypeParameters, maybeCloneTypeParameter); - const freshMapper = freshParams !== root.inferTypeParameters ? createTypeMapper(root.inferTypeParameters, freshParams) : void 0; - const context = createInferenceContext( - freshParams, - /*signature*/ - void 0, - 0 /* None */ - ); - if (freshMapper) { - const freshCombinedMapper = combineTypeMappers(mapper, freshMapper); - for (let i = 0; i < freshParams.length; i++) { - if (freshParams[i] !== root.inferTypeParameters[i]) { - freshParams[i].mapper = freshCombinedMapper; - } - } - } - if (!checkTypeDeferred) { - inferTypes(context.inferences, checkType, instantiateType(extendsType, freshMapper), 512 /* NoConstraints */ | 1024 /* AlwaysStrict */); - } - const innerMapper = combineTypeMappers(freshMapper, context.mapper); - combinedMapper = mapper ? combineTypeMappers(innerMapper, mapper) : innerMapper; - } - const inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType; - if (!checkTypeDeferred && !isDeferredType(inferredExtendsType, checkTuples)) { - if (!(inferredExtendsType.flags & 3 /* AnyOrUnknown */) && (checkType.flags & 1 /* Any */ || !isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType)))) { - if (checkType.flags & 1 /* Any */) { - (extraTypes || (extraTypes = [])).push(instantiateType(getTypeFromTypeNode(root.node.trueType), combinedMapper || mapper)); - } - const falseType2 = getTypeFromTypeNode(root.node.falseType); - if (falseType2.flags & 16777216 /* Conditional */) { - const newRoot = falseType2.root; - if (newRoot.node.parent === root.node && (!newRoot.isDistributive || newRoot.checkType === root.checkType)) { - root = newRoot; - continue; - } - if (canTailRecurse(falseType2, mapper)) { - continue; - } - } - result = instantiateType(falseType2, mapper); - break; - } - if (inferredExtendsType.flags & 3 /* AnyOrUnknown */ || isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(inferredExtendsType))) { - const trueType2 = getTypeFromTypeNode(root.node.trueType); - const trueMapper = combinedMapper || mapper; - if (canTailRecurse(trueType2, trueMapper)) { - continue; - } - result = instantiateType(trueType2, trueMapper); - break; - } - } - result = createType(16777216 /* Conditional */); - result.root = root; - result.checkType = instantiateType(root.checkType, mapper); - result.extendsType = instantiateType(root.extendsType, mapper); - result.mapper = mapper; - result.combinedMapper = combinedMapper; - result.aliasSymbol = aliasSymbol || root.aliasSymbol; - result.aliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(root.aliasTypeArguments, mapper); - break; - } - return extraTypes ? getUnionType(append(extraTypes, result)) : result; - function canTailRecurse(newType, newMapper) { - if (newType.flags & 16777216 /* Conditional */ && newMapper) { - const newRoot = newType.root; - if (newRoot.outerTypeParameters) { - const typeParamMapper = combineTypeMappers(newType.mapper, newMapper); - const typeArguments = map(newRoot.outerTypeParameters, (t) => getMappedType(t, typeParamMapper)); - const newRootMapper = createTypeMapper(newRoot.outerTypeParameters, typeArguments); - const newCheckType = newRoot.isDistributive ? getMappedType(newRoot.checkType, newRootMapper) : void 0; - if (!newCheckType || newCheckType === newRoot.checkType || !(newCheckType.flags & (1048576 /* Union */ | 131072 /* Never */))) { - root = newRoot; - mapper = newRootMapper; - aliasSymbol = void 0; - aliasTypeArguments = void 0; - if (newRoot.aliasSymbol) { - tailCount++; - } - return true; - } - } - } - return false; - } - } - function getTrueTypeFromConditionalType(type) { - return type.resolvedTrueType || (type.resolvedTrueType = instantiateType(getTypeFromTypeNode(type.root.node.trueType), type.mapper)); - } - function getFalseTypeFromConditionalType(type) { - return type.resolvedFalseType || (type.resolvedFalseType = instantiateType(getTypeFromTypeNode(type.root.node.falseType), type.mapper)); - } - function getInferredTrueTypeFromConditionalType(type) { - return type.resolvedInferredTrueType || (type.resolvedInferredTrueType = type.combinedMapper ? instantiateType(getTypeFromTypeNode(type.root.node.trueType), type.combinedMapper) : getTrueTypeFromConditionalType(type)); - } - function getInferTypeParameters(node) { - let result; - if (node.locals) { - node.locals.forEach((symbol) => { - if (symbol.flags & 262144 /* TypeParameter */) { - result = append(result, getDeclaredTypeOfSymbol(symbol)); - } - }); - } - return result; - } - function isDistributionDependent(root) { - return root.isDistributive && (isTypeParameterPossiblyReferenced(root.checkType, root.node.trueType) || isTypeParameterPossiblyReferenced(root.checkType, root.node.falseType)); - } - function getTypeFromConditionalTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - const checkType = getTypeFromTypeNode(node.checkType); - const aliasSymbol = getAliasSymbolForTypeNode(node); - const aliasTypeArguments = getTypeArgumentsForAliasSymbol(aliasSymbol); - const allOuterTypeParameters = getOuterTypeParameters( - node, - /*includeThisTypes*/ - true - ); - const outerTypeParameters = aliasTypeArguments ? allOuterTypeParameters : filter(allOuterTypeParameters, (tp) => isTypeParameterPossiblyReferenced(tp, node)); - const root = { - node, - checkType, - extendsType: getTypeFromTypeNode(node.extendsType), - isDistributive: !!(checkType.flags & 262144 /* TypeParameter */), - inferTypeParameters: getInferTypeParameters(node), - outerTypeParameters, - instantiations: void 0, - aliasSymbol, - aliasTypeArguments - }; - links.resolvedType = getConditionalType( - root, - /*mapper*/ - void 0 - ); - if (outerTypeParameters) { - root.instantiations = /* @__PURE__ */ new Map(); - root.instantiations.set(getTypeListId(outerTypeParameters), links.resolvedType); - } - } - return links.resolvedType; - } - function getTypeFromInferTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node.typeParameter)); - } - return links.resolvedType; - } - function getIdentifierChain(node) { - if (isIdentifier(node)) { - return [node]; - } else { - return append(getIdentifierChain(node.left), node.right); - } - } - function getTypeFromImportTypeNode(node) { - var _a; - const links = getNodeLinks(node); - if (!links.resolvedType) { - if (!isLiteralImportTypeNode(node)) { - error2(node.argument, Diagnostics.String_literal_expected); - links.resolvedSymbol = unknownSymbol; - return links.resolvedType = errorType; - } - const targetMeaning = node.isTypeOf ? 111551 /* Value */ : node.flags & 16777216 /* JSDoc */ ? 111551 /* Value */ | 788968 /* Type */ : 788968 /* Type */; - const innerModuleSymbol = resolveExternalModuleName(node, node.argument.literal); - if (!innerModuleSymbol) { - links.resolvedSymbol = unknownSymbol; - return links.resolvedType = errorType; - } - const isExportEquals = !!((_a = innerModuleSymbol.exports) == null ? void 0 : _a.get("export=" /* ExportEquals */)); - const moduleSymbol = resolveExternalModuleSymbol( - innerModuleSymbol, - /*dontResolveAlias*/ - false - ); - if (!nodeIsMissing(node.qualifier)) { - const nameStack = getIdentifierChain(node.qualifier); - let currentNamespace = moduleSymbol; - let current; - while (current = nameStack.shift()) { - const meaning = nameStack.length ? 1920 /* Namespace */ : targetMeaning; - const mergedResolvedSymbol = getMergedSymbol(resolveSymbol(currentNamespace)); - const symbolFromVariable = node.isTypeOf || isInJSFile(node) && isExportEquals ? getPropertyOfType( - getTypeOfSymbol(mergedResolvedSymbol), - current.escapedText, - /*skipObjectFunctionPropertyAugment*/ - false, - /*includeTypeOnlyMembers*/ - true - ) : void 0; - const symbolFromModule = node.isTypeOf ? void 0 : getSymbol2(getExportsOfSymbol(mergedResolvedSymbol), current.escapedText, meaning); - const next = symbolFromModule ?? symbolFromVariable; - if (!next) { - error2(current, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(currentNamespace), declarationNameToString(current)); - return links.resolvedType = errorType; - } - getNodeLinks(current).resolvedSymbol = next; - getNodeLinks(current.parent).resolvedSymbol = next; - currentNamespace = next; - } - links.resolvedType = resolveImportSymbolType(node, links, currentNamespace, targetMeaning); - } else { - if (moduleSymbol.flags & targetMeaning) { - links.resolvedType = resolveImportSymbolType(node, links, moduleSymbol, targetMeaning); - } else { - const errorMessage = targetMeaning === 111551 /* Value */ ? Diagnostics.Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here : Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0; - error2(node, errorMessage, node.argument.literal.text); - links.resolvedSymbol = unknownSymbol; - links.resolvedType = errorType; - } - } - } - return links.resolvedType; - } - function resolveImportSymbolType(node, links, symbol, meaning) { - const resolvedSymbol = resolveSymbol(symbol); - links.resolvedSymbol = resolvedSymbol; - if (meaning === 111551 /* Value */) { - return getInstantiationExpressionType(getTypeOfSymbol(symbol), node); - } else { - return getTypeReferenceType(node, resolvedSymbol); - } - } - function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - const aliasSymbol = getAliasSymbolForTypeNode(node); - if (getMembersOfSymbol(node.symbol).size === 0 && !aliasSymbol) { - links.resolvedType = emptyTypeLiteralType; - } else { - let type = createObjectType(16 /* Anonymous */, node.symbol); - type.aliasSymbol = aliasSymbol; - type.aliasTypeArguments = getTypeArgumentsForAliasSymbol(aliasSymbol); - if (isJSDocTypeLiteral(node) && node.isArrayType) { - type = createArrayType(type); - } - links.resolvedType = type; - } - } - return links.resolvedType; - } - function getAliasSymbolForTypeNode(node) { - let host2 = node.parent; - while (isParenthesizedTypeNode(host2) || isJSDocTypeExpression(host2) || isTypeOperatorNode(host2) && host2.operator === 148 /* ReadonlyKeyword */) { - host2 = host2.parent; - } - return isTypeAlias(host2) ? getSymbolOfDeclaration(host2) : void 0; - } - function getTypeArgumentsForAliasSymbol(symbol) { - return symbol ? getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) : void 0; - } - function isNonGenericObjectType(type) { - return !!(type.flags & 524288 /* Object */) && !isGenericMappedType(type); - } - function isEmptyObjectTypeOrSpreadsIntoEmptyObject(type) { - return isEmptyObjectType(type) || !!(type.flags & (65536 /* Null */ | 32768 /* Undefined */ | 528 /* BooleanLike */ | 296 /* NumberLike */ | 2112 /* BigIntLike */ | 402653316 /* StringLike */ | 1056 /* EnumLike */ | 67108864 /* NonPrimitive */ | 4194304 /* Index */)); - } - function tryMergeUnionOfObjectTypeAndEmptyObject(type, readonly) { - if (!(type.flags & 1048576 /* Union */)) { - return type; - } - if (every(type.types, isEmptyObjectTypeOrSpreadsIntoEmptyObject)) { - return find(type.types, isEmptyObjectType) || emptyObjectType; - } - const firstType = find(type.types, (t) => !isEmptyObjectTypeOrSpreadsIntoEmptyObject(t)); - if (!firstType) { - return type; - } - const secondType = find(type.types, (t) => t !== firstType && !isEmptyObjectTypeOrSpreadsIntoEmptyObject(t)); - if (secondType) { - return type; - } - return getAnonymousPartialType(firstType); - function getAnonymousPartialType(type2) { - const members = createSymbolTable(); - for (const prop of getPropertiesOfType(type2)) { - if (getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) { - } else if (isSpreadableProperty(prop)) { - const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); - const flags = 4 /* Property */ | 16777216 /* Optional */; - const result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 /* Readonly */ : 0)); - result.links.type = isSetonlyAccessor ? undefinedType : addOptionality( - getTypeOfSymbol(prop), - /*isProperty*/ - true - ); - result.declarations = prop.declarations; - result.links.nameType = getSymbolLinks(prop).nameType; - result.links.syntheticOrigin = prop; - members.set(prop.escapedName, result); - } - } - const spread = createAnonymousType(type2.symbol, members, emptyArray, emptyArray, getIndexInfosOfType(type2)); - spread.objectFlags |= 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */; - return spread; - } - } - function getSpreadType(left, right, symbol, objectFlags, readonly) { - if (left.flags & 1 /* Any */ || right.flags & 1 /* Any */) { - return anyType; - } - if (left.flags & 2 /* Unknown */ || right.flags & 2 /* Unknown */) { - return unknownType; - } - if (left.flags & 131072 /* Never */) { - return right; - } - if (right.flags & 131072 /* Never */) { - return left; - } - left = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly); - if (left.flags & 1048576 /* Union */) { - return checkCrossProductUnion([left, right]) ? mapType(left, (t) => getSpreadType(t, right, symbol, objectFlags, readonly)) : errorType; - } - right = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly); - if (right.flags & 1048576 /* Union */) { - return checkCrossProductUnion([left, right]) ? mapType(right, (t) => getSpreadType(left, t, symbol, objectFlags, readonly)) : errorType; - } - if (right.flags & (528 /* BooleanLike */ | 296 /* NumberLike */ | 2112 /* BigIntLike */ | 402653316 /* StringLike */ | 1056 /* EnumLike */ | 67108864 /* NonPrimitive */ | 4194304 /* Index */)) { - return left; - } - if (isGenericObjectType(left) || isGenericObjectType(right)) { - if (isEmptyObjectType(left)) { - return right; - } - if (left.flags & 2097152 /* Intersection */) { - const types = left.types; - const lastLeft = types[types.length - 1]; - if (isNonGenericObjectType(lastLeft) && isNonGenericObjectType(right)) { - return getIntersectionType(concatenate(types.slice(0, types.length - 1), [getSpreadType(lastLeft, right, symbol, objectFlags, readonly)])); - } - } - return getIntersectionType([left, right]); - } - const members = createSymbolTable(); - const skippedPrivateMembers = /* @__PURE__ */ new Set(); - const indexInfos = left === emptyObjectType ? getIndexInfosOfType(right) : getUnionIndexInfos([left, right]); - for (const rightProp of getPropertiesOfType(right)) { - if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) { - skippedPrivateMembers.add(rightProp.escapedName); - } else if (isSpreadableProperty(rightProp)) { - members.set(rightProp.escapedName, getSpreadSymbol(rightProp, readonly)); - } - } - for (const leftProp of getPropertiesOfType(left)) { - if (skippedPrivateMembers.has(leftProp.escapedName) || !isSpreadableProperty(leftProp)) { - continue; - } - if (members.has(leftProp.escapedName)) { - const rightProp = members.get(leftProp.escapedName); - const rightType = getTypeOfSymbol(rightProp); - if (rightProp.flags & 16777216 /* Optional */) { - const declarations = concatenate(leftProp.declarations, rightProp.declarations); - const flags = 4 /* Property */ | leftProp.flags & 16777216 /* Optional */; - const result = createSymbol(flags, leftProp.escapedName); - const leftType = getTypeOfSymbol(leftProp); - const leftTypeWithoutUndefined = removeMissingOrUndefinedType(leftType); - const rightTypeWithoutUndefined = removeMissingOrUndefinedType(rightType); - result.links.type = leftTypeWithoutUndefined === rightTypeWithoutUndefined ? leftType : getUnionType([leftType, rightTypeWithoutUndefined], 2 /* Subtype */); - result.links.leftSpread = leftProp; - result.links.rightSpread = rightProp; - result.declarations = declarations; - result.links.nameType = getSymbolLinks(leftProp).nameType; - members.set(leftProp.escapedName, result); - } - } else { - members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly)); - } - } - const spread = createAnonymousType(symbol, members, emptyArray, emptyArray, sameMap(indexInfos, (info) => getIndexInfoWithReadonly(info, readonly))); - spread.objectFlags |= 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */ | 2097152 /* ContainsSpread */ | objectFlags; - return spread; - } - function isSpreadableProperty(prop) { - var _a; - return !some(prop.declarations, isPrivateIdentifierClassElementDeclaration) && (!(prop.flags & (8192 /* Method */ | 32768 /* GetAccessor */ | 65536 /* SetAccessor */)) || !((_a = prop.declarations) == null ? void 0 : _a.some((decl) => isClassLike(decl.parent)))); - } - function getSpreadSymbol(prop, readonly) { - const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); - if (!isSetonlyAccessor && readonly === isReadonlySymbol(prop)) { - return prop; - } - const flags = 4 /* Property */ | prop.flags & 16777216 /* Optional */; - const result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 /* Readonly */ : 0)); - result.links.type = isSetonlyAccessor ? undefinedType : getTypeOfSymbol(prop); - result.declarations = prop.declarations; - result.links.nameType = getSymbolLinks(prop).nameType; - result.links.syntheticOrigin = prop; - return result; - } - function getIndexInfoWithReadonly(info, readonly) { - return info.isReadonly !== readonly ? createIndexInfo(info.keyType, info.type, readonly, info.declaration) : info; - } - function createLiteralType(flags, value, symbol, regularType) { - const type = createTypeWithSymbol(flags, symbol); - type.value = value; - type.regularType = regularType || type; - return type; - } - function getFreshTypeOfLiteralType(type) { - if (type.flags & 2976 /* Freshable */) { - if (!type.freshType) { - const freshType = createLiteralType(type.flags, type.value, type.symbol, type); - freshType.freshType = freshType; - type.freshType = freshType; - } - return type.freshType; - } - return type; - } - function getRegularTypeOfLiteralType(type) { - return type.flags & 2976 /* Freshable */ ? type.regularType : type.flags & 1048576 /* Union */ ? type.regularType || (type.regularType = mapType(type, getRegularTypeOfLiteralType)) : type; - } - function isFreshLiteralType(type) { - return !!(type.flags & 2976 /* Freshable */) && type.freshType === type; - } - function getStringLiteralType(value) { - let type; - return stringLiteralTypes.get(value) || (stringLiteralTypes.set(value, type = createLiteralType(128 /* StringLiteral */, value)), type); - } - function getNumberLiteralType(value) { - let type; - return numberLiteralTypes.get(value) || (numberLiteralTypes.set(value, type = createLiteralType(256 /* NumberLiteral */, value)), type); - } - function getBigIntLiteralType(value) { - let type; - const key = pseudoBigIntToString(value); - return bigIntLiteralTypes.get(key) || (bigIntLiteralTypes.set(key, type = createLiteralType(2048 /* BigIntLiteral */, value)), type); - } - function getEnumLiteralType(value, enumId, symbol) { - let type; - const key = `${enumId}${typeof value === "string" ? "@" : "#"}${value}`; - const flags = 1024 /* EnumLiteral */ | (typeof value === "string" ? 128 /* StringLiteral */ : 256 /* NumberLiteral */); - return enumLiteralTypes.get(key) || (enumLiteralTypes.set(key, type = createLiteralType(flags, value, symbol)), type); - } - function getTypeFromLiteralTypeNode(node) { - if (node.literal.kind === 106 /* NullKeyword */) { - return nullType; - } - const links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = getRegularTypeOfLiteralType(checkExpression(node.literal)); - } - return links.resolvedType; - } - function createUniqueESSymbolType(symbol) { - const type = createTypeWithSymbol(8192 /* UniqueESSymbol */, symbol); - type.escapedName = `__@${type.symbol.escapedName}@${getSymbolId(type.symbol)}`; - return type; - } - function getESSymbolLikeTypeForNode(node) { - if (isValidESSymbolDeclaration(node)) { - const symbol = isCommonJsExportPropertyAssignment(node) ? getSymbolOfNode(node.left) : getSymbolOfNode(node); - if (symbol) { - const links = getSymbolLinks(symbol); - return links.uniqueESSymbolType || (links.uniqueESSymbolType = createUniqueESSymbolType(symbol)); - } - } - return esSymbolType; - } - function getThisType(node) { - const container = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - const parent2 = container && container.parent; - if (parent2 && (isClassLike(parent2) || parent2.kind === 264 /* InterfaceDeclaration */)) { - if (!isStatic(container) && (!isConstructorDeclaration(container) || isNodeDescendantOf(node, container.body))) { - return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(parent2)).thisType; - } - } - if (parent2 && isObjectLiteralExpression(parent2) && isBinaryExpression(parent2.parent) && getAssignmentDeclarationKind(parent2.parent) === 6 /* Prototype */) { - return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent2.parent.left).parent).thisType; - } - const host2 = node.flags & 16777216 /* JSDoc */ ? getHostSignatureFromJSDoc(node) : void 0; - if (host2 && isFunctionExpression(host2) && isBinaryExpression(host2.parent) && getAssignmentDeclarationKind(host2.parent) === 3 /* PrototypeProperty */) { - return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(host2.parent.left).parent).thisType; - } - if (isJSConstructor(container) && isNodeDescendantOf(node, container.body)) { - return getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(container)).thisType; - } - error2(node, Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface); - return errorType; - } - function getTypeFromThisTypeNode(node) { - const links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = getThisType(node); - } - return links.resolvedType; - } - function getTypeFromRestTypeNode(node) { - return getTypeFromTypeNode(getArrayElementTypeNode(node.type) || node.type); - } - function getArrayElementTypeNode(node) { - switch (node.kind) { - case 196 /* ParenthesizedType */: - return getArrayElementTypeNode(node.type); - case 189 /* TupleType */: - if (node.elements.length === 1) { - node = node.elements[0]; - if (node.kind === 191 /* RestType */ || node.kind === 202 /* NamedTupleMember */ && node.dotDotDotToken) { - return getArrayElementTypeNode(node.type); - } - } - break; - case 188 /* ArrayType */: - return node.elementType; - } - return void 0; - } - function getTypeFromNamedTupleTypeNode(node) { - const links = getNodeLinks(node); - return links.resolvedType || (links.resolvedType = node.dotDotDotToken ? getTypeFromRestTypeNode(node) : addOptionality( - getTypeFromTypeNode(node.type), - /*isProperty*/ - true, - !!node.questionToken - )); - } - function getTypeFromTypeNode(node) { - return getConditionalFlowTypeOfType(getTypeFromTypeNodeWorker(node), node); - } - function getTypeFromTypeNodeWorker(node) { - switch (node.kind) { - case 133 /* AnyKeyword */: - case 319 /* JSDocAllType */: - case 320 /* JSDocUnknownType */: - return anyType; - case 159 /* UnknownKeyword */: - return unknownType; - case 154 /* StringKeyword */: - return stringType; - case 150 /* NumberKeyword */: - return numberType; - case 163 /* BigIntKeyword */: - return bigintType; - case 136 /* BooleanKeyword */: - return booleanType; - case 155 /* SymbolKeyword */: - return esSymbolType; - case 116 /* VoidKeyword */: - return voidType; - case 157 /* UndefinedKeyword */: - return undefinedType; - case 106 /* NullKeyword */: - return nullType; - case 146 /* NeverKeyword */: - return neverType; - case 151 /* ObjectKeyword */: - return node.flags & 524288 /* JavaScriptFile */ && !noImplicitAny ? anyType : nonPrimitiveType; - case 141 /* IntrinsicKeyword */: - return intrinsicMarkerType; - case 197 /* ThisType */: - case 110 /* ThisKeyword */: - return getTypeFromThisTypeNode(node); - case 201 /* LiteralType */: - return getTypeFromLiteralTypeNode(node); - case 183 /* TypeReference */: - return getTypeFromTypeReference(node); - case 182 /* TypePredicate */: - return node.assertsModifier ? voidType : booleanType; - case 233 /* ExpressionWithTypeArguments */: - return getTypeFromTypeReference(node); - case 186 /* TypeQuery */: - return getTypeFromTypeQueryNode(node); - case 188 /* ArrayType */: - case 189 /* TupleType */: - return getTypeFromArrayOrTupleTypeNode(node); - case 190 /* OptionalType */: - return getTypeFromOptionalTypeNode(node); - case 192 /* UnionType */: - return getTypeFromUnionTypeNode(node); - case 193 /* IntersectionType */: - return getTypeFromIntersectionTypeNode(node); - case 321 /* JSDocNullableType */: - return getTypeFromJSDocNullableTypeNode(node); - case 323 /* JSDocOptionalType */: - return addOptionality(getTypeFromTypeNode(node.type)); - case 202 /* NamedTupleMember */: - return getTypeFromNamedTupleTypeNode(node); - case 196 /* ParenthesizedType */: - case 322 /* JSDocNonNullableType */: - case 316 /* JSDocTypeExpression */: - return getTypeFromTypeNode(node.type); - case 191 /* RestType */: - return getTypeFromRestTypeNode(node); - case 325 /* JSDocVariadicType */: - return getTypeFromJSDocVariadicType(node); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 187 /* TypeLiteral */: - case 329 /* JSDocTypeLiteral */: - case 324 /* JSDocFunctionType */: - case 330 /* JSDocSignature */: - return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - case 198 /* TypeOperator */: - return getTypeFromTypeOperatorNode(node); - case 199 /* IndexedAccessType */: - return getTypeFromIndexedAccessTypeNode(node); - case 200 /* MappedType */: - return getTypeFromMappedTypeNode(node); - case 194 /* ConditionalType */: - return getTypeFromConditionalTypeNode(node); - case 195 /* InferType */: - return getTypeFromInferTypeNode(node); - case 203 /* TemplateLiteralType */: - return getTypeFromTemplateTypeNode(node); - case 205 /* ImportType */: - return getTypeFromImportTypeNode(node); - case 80 /* Identifier */: - case 166 /* QualifiedName */: - case 211 /* PropertyAccessExpression */: - const symbol = getSymbolAtLocation(node); - return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; - default: - return errorType; - } - } - function instantiateList(items, mapper, instantiator) { - if (items && items.length) { - for (let i = 0; i < items.length; i++) { - const item = items[i]; - const mapped = instantiator(item, mapper); - if (item !== mapped) { - const result = i === 0 ? [] : items.slice(0, i); - result.push(mapped); - for (i++; i < items.length; i++) { - result.push(instantiator(items[i], mapper)); - } - return result; - } - } - } - return items; - } - function instantiateTypes(types, mapper) { - return instantiateList(types, mapper, instantiateType); - } - function instantiateSignatures(signatures, mapper) { - return instantiateList(signatures, mapper, instantiateSignature); - } - function instantiateIndexInfos(indexInfos, mapper) { - return instantiateList(indexInfos, mapper, instantiateIndexInfo); - } - function createTypeMapper(sources, targets) { - return sources.length === 1 ? makeUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) : makeArrayTypeMapper(sources, targets); - } - function getMappedType(type, mapper) { - switch (mapper.kind) { - case 0 /* Simple */: - return type === mapper.source ? mapper.target : type; - case 1 /* Array */: { - const sources = mapper.sources; - const targets = mapper.targets; - for (let i = 0; i < sources.length; i++) { - if (type === sources[i]) { - return targets ? targets[i] : anyType; - } - } - return type; - } - case 2 /* Deferred */: { - const sources = mapper.sources; - const targets = mapper.targets; - for (let i = 0; i < sources.length; i++) { - if (type === sources[i]) { - return targets[i](); - } - } - return type; - } - case 3 /* Function */: - return mapper.func(type); - case 4 /* Composite */: - case 5 /* Merged */: - const t1 = getMappedType(type, mapper.mapper1); - return t1 !== type && mapper.kind === 4 /* Composite */ ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2); - } - } - function makeUnaryTypeMapper(source, target) { - return Debug.attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source, target }); - } - function makeArrayTypeMapper(sources, targets) { - return Debug.attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources, targets }); - } - function makeFunctionTypeMapper(func, debugInfo) { - return Debug.attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func, debugInfo: Debug.isDebugging ? debugInfo : void 0 }); - } - function makeDeferredTypeMapper(sources, targets) { - return Debug.attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources, targets }); - } - function makeCompositeTypeMapper(kind, mapper1, mapper2) { - return Debug.attachDebugPrototypeIfDebug({ kind, mapper1, mapper2 }); - } - function createTypeEraser(sources) { - return createTypeMapper( - sources, - /*targets*/ - void 0 - ); - } - function createBackreferenceMapper(context, index) { - const forwardInferences = context.inferences.slice(index); - return createTypeMapper(map(forwardInferences, (i) => i.typeParameter), map(forwardInferences, () => unknownType)); - } - function combineTypeMappers(mapper1, mapper2) { - return mapper1 ? makeCompositeTypeMapper(4 /* Composite */, mapper1, mapper2) : mapper2; - } - function mergeTypeMappers(mapper1, mapper2) { - return mapper1 ? makeCompositeTypeMapper(5 /* Merged */, mapper1, mapper2) : mapper2; - } - function prependTypeMapping(source, target, mapper) { - return !mapper ? makeUnaryTypeMapper(source, target) : makeCompositeTypeMapper(5 /* Merged */, makeUnaryTypeMapper(source, target), mapper); - } - function appendTypeMapping(mapper, source, target) { - return !mapper ? makeUnaryTypeMapper(source, target) : makeCompositeTypeMapper(5 /* Merged */, mapper, makeUnaryTypeMapper(source, target)); - } - function getRestrictiveTypeParameter(tp) { - return !tp.constraint && !getConstraintDeclaration(tp) || tp.constraint === noConstraintType ? tp : tp.restrictiveInstantiation || (tp.restrictiveInstantiation = createTypeParameter(tp.symbol), tp.restrictiveInstantiation.constraint = noConstraintType, tp.restrictiveInstantiation); - } - function cloneTypeParameter(typeParameter) { - const result = createTypeParameter(typeParameter.symbol); - result.target = typeParameter; - return result; - } - function instantiateTypePredicate(predicate, mapper) { - return createTypePredicate(predicate.kind, predicate.parameterName, predicate.parameterIndex, instantiateType(predicate.type, mapper)); - } - function instantiateSignature(signature, mapper, eraseTypeParameters) { - let freshTypeParameters; - if (signature.typeParameters && !eraseTypeParameters) { - freshTypeParameters = map(signature.typeParameters, cloneTypeParameter); - mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper); - for (const tp of freshTypeParameters) { - tp.mapper = mapper; - } - } - const result = createSignature( - signature.declaration, - freshTypeParameters, - signature.thisParameter && instantiateSymbol(signature.thisParameter, mapper), - instantiateList(signature.parameters, mapper, instantiateSymbol), - /*resolvedReturnType*/ - void 0, - /*resolvedTypePredicate*/ - void 0, - signature.minArgumentCount, - signature.flags & 167 /* PropagatingFlags */ - ); - result.target = signature; - result.mapper = mapper; - return result; - } - function instantiateSymbol(symbol, mapper) { - const links = getSymbolLinks(symbol); - if (links.type && !couldContainTypeVariables(links.type)) { - return symbol; - } - if (getCheckFlags(symbol) & 1 /* Instantiated */) { - symbol = links.target; - mapper = combineTypeMappers(links.mapper, mapper); - } - const result = createSymbol(symbol.flags, symbol.escapedName, 1 /* Instantiated */ | getCheckFlags(symbol) & (8 /* Readonly */ | 4096 /* Late */ | 16384 /* OptionalParameter */ | 32768 /* RestParameter */)); - result.declarations = symbol.declarations; - result.parent = symbol.parent; - result.links.target = symbol; - result.links.mapper = mapper; - if (symbol.valueDeclaration) { - result.valueDeclaration = symbol.valueDeclaration; - } - if (links.nameType) { - result.links.nameType = links.nameType; - } - return result; - } - function getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments) { - const declaration = type.objectFlags & 4 /* Reference */ ? type.node : type.objectFlags & 8388608 /* InstantiationExpressionType */ ? type.node : type.symbol.declarations[0]; - const links = getNodeLinks(declaration); - const target = type.objectFlags & 4 /* Reference */ ? links.resolvedType : type.objectFlags & 64 /* Instantiated */ ? type.target : type; - let typeParameters = links.outerTypeParameters; - if (!typeParameters) { - let outerTypeParameters = getOuterTypeParameters( - declaration, - /*includeThisTypes*/ - true - ); - if (isJSConstructor(declaration)) { - const templateTagParameters = getTypeParametersFromDeclaration(declaration); - outerTypeParameters = addRange(outerTypeParameters, templateTagParameters); - } - typeParameters = outerTypeParameters || emptyArray; - const allDeclarations = type.objectFlags & (4 /* Reference */ | 8388608 /* InstantiationExpressionType */) ? [declaration] : type.symbol.declarations; - typeParameters = (target.objectFlags & (4 /* Reference */ | 8388608 /* InstantiationExpressionType */) || target.symbol.flags & 8192 /* Method */ || target.symbol.flags & 2048 /* TypeLiteral */) && !target.aliasTypeArguments ? filter(typeParameters, (tp) => some(allDeclarations, (d) => isTypeParameterPossiblyReferenced(tp, d))) : typeParameters; - links.outerTypeParameters = typeParameters; - } - if (typeParameters.length) { - const combinedMapper = combineTypeMappers(type.mapper, mapper); - const typeArguments = map(typeParameters, (t) => getMappedType(t, combinedMapper)); - const newAliasSymbol = aliasSymbol || type.aliasSymbol; - const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper); - const id = getTypeListId(typeArguments) + getAliasId(newAliasSymbol, newAliasTypeArguments); - if (!target.instantiations) { - target.instantiations = /* @__PURE__ */ new Map(); - target.instantiations.set(getTypeListId(typeParameters) + getAliasId(target.aliasSymbol, target.aliasTypeArguments), target); - } - let result = target.instantiations.get(id); - if (!result) { - const newMapper = createTypeMapper(typeParameters, typeArguments); - result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); - target.instantiations.set(id, result); - const resultObjectFlags = getObjectFlags(result); - if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { - const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables); - if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) { - if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) { - result.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (resultCouldContainTypeVariables ? 1048576 /* CouldContainTypeVariables */ : 0); - } else { - result.objectFlags |= !resultCouldContainTypeVariables ? 524288 /* CouldContainTypeVariablesComputed */ : 0; - } - } - } - } - return result; - } - return type; - } - function maybeTypeParameterReference(node) { - return !(node.parent.kind === 183 /* TypeReference */ && node.parent.typeArguments && node === node.parent.typeName || node.parent.kind === 205 /* ImportType */ && node.parent.typeArguments && node === node.parent.qualifier); - } - function isTypeParameterPossiblyReferenced(tp, node) { - if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) { - const container = tp.symbol.declarations[0].parent; - for (let n = node; n !== container; n = n.parent) { - if (!n || n.kind === 241 /* Block */ || n.kind === 194 /* ConditionalType */ && forEachChild(n.extendsType, containsReference)) { - return true; - } - } - return containsReference(node); - } - return true; - function containsReference(node2) { - switch (node2.kind) { - case 197 /* ThisType */: - return !!tp.isThisType; - case 80 /* Identifier */: - return !tp.isThisType && isPartOfTypeNode(node2) && maybeTypeParameterReference(node2) && getTypeFromTypeNodeWorker(node2) === tp; - case 186 /* TypeQuery */: - const entityName = node2.exprName; - const firstIdentifier = getFirstIdentifier(entityName); - if (!isThisIdentifier(firstIdentifier)) { - const firstIdentifierSymbol = getResolvedSymbol(firstIdentifier); - const tpDeclaration = tp.symbol.declarations[0]; - const tpScope = tpDeclaration.kind === 168 /* TypeParameter */ ? tpDeclaration.parent : ( - // Type parameter is a regular type parameter, e.g. foo - tp.isThisType ? tpDeclaration : ( - // Type parameter is the this type, and its declaration is the class declaration. - void 0 - ) - ); - if (firstIdentifierSymbol.declarations && tpScope) { - return some(firstIdentifierSymbol.declarations, (idDecl) => isNodeDescendantOf(idDecl, tpScope)) || some(node2.typeArguments, containsReference); - } - } - return true; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - return !node2.type && !!node2.body || some(node2.typeParameters, containsReference) || some(node2.parameters, containsReference) || !!node2.type && containsReference(node2.type); - } - return !!forEachChild(node2, containsReference); - } - } - function getHomomorphicTypeVariable(type) { - const constraintType = getConstraintTypeFromMappedType(type); - if (constraintType.flags & 4194304 /* Index */) { - const typeVariable = getActualTypeVariable(constraintType.type); - if (typeVariable.flags & 262144 /* TypeParameter */) { - return typeVariable; - } - } - return void 0; - } - function instantiateMappedType(type, mapper, aliasSymbol, aliasTypeArguments) { - const typeVariable = getHomomorphicTypeVariable(type); - if (typeVariable) { - const mappedTypeVariable = instantiateType(typeVariable, mapper); - if (typeVariable !== mappedTypeVariable) { - return mapTypeWithAlias(getReducedType(mappedTypeVariable), (t) => { - if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) { - if (!type.declaration.nameType) { - let constraint; - if (isArrayType(t) || t.flags & 1 /* Any */ && findResolutionCycleStartIndex(typeVariable, 4 /* ImmediateBaseConstraint */) < 0 && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) { - return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper)); - } - if (isGenericTupleType(t)) { - return instantiateMappedGenericTupleType(t, type, typeVariable, mapper); - } - if (isTupleType(t)) { - return instantiateMappedTupleType(t, type, prependTypeMapping(typeVariable, t, mapper)); - } - } - return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t, mapper)); - } - return t; - }, aliasSymbol, aliasTypeArguments); - } - } - return instantiateType(getConstraintTypeFromMappedType(type), mapper) === wildcardType ? wildcardType : instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments); - } - function getModifiedReadonlyState(state, modifiers) { - return modifiers & 1 /* IncludeReadonly */ ? true : modifiers & 2 /* ExcludeReadonly */ ? false : state; - } - function instantiateMappedGenericTupleType(tupleType, mappedType, typeVariable, mapper) { - const elementFlags = tupleType.target.elementFlags; - const elementTypes = map(getElementTypes(tupleType), (t, i) => { - const singleton = elementFlags[i] & 8 /* Variadic */ ? t : elementFlags[i] & 4 /* Rest */ ? createArrayType(t) : createTupleType([t], [elementFlags[i]]); - if (singleton === typeVariable) { - return mappedType; - } - return instantiateMappedType(mappedType, prependTypeMapping(typeVariable, singleton, mapper)); - }); - const newReadonly = getModifiedReadonlyState(tupleType.target.readonly, getMappedTypeModifiers(mappedType)); - return createTupleType(elementTypes, map(elementTypes, (_) => 8 /* Variadic */), newReadonly); - } - function instantiateMappedArrayType(arrayType, mappedType, mapper) { - const elementType = instantiateMappedTypeTemplate( - mappedType, - numberType, - /*isOptional*/ - true, - mapper - ); - return isErrorType(elementType) ? errorType : createArrayType(elementType, getModifiedReadonlyState(isReadonlyArrayType(arrayType), getMappedTypeModifiers(mappedType))); - } - function instantiateMappedTupleType(tupleType, mappedType, mapper) { - const elementFlags = tupleType.target.elementFlags; - const elementTypes = map(getElementTypes(tupleType), (_, i) => instantiateMappedTypeTemplate(mappedType, getStringLiteralType("" + i), !!(elementFlags[i] & 2 /* Optional */), mapper)); - const modifiers = getMappedTypeModifiers(mappedType); - const newTupleModifiers = modifiers & 4 /* IncludeOptional */ ? map(elementFlags, (f) => f & 1 /* Required */ ? 2 /* Optional */ : f) : modifiers & 8 /* ExcludeOptional */ ? map(elementFlags, (f) => f & 2 /* Optional */ ? 1 /* Required */ : f) : elementFlags; - const newReadonly = getModifiedReadonlyState(tupleType.target.readonly, modifiers); - return contains(elementTypes, errorType) ? errorType : createTupleType(elementTypes, newTupleModifiers, newReadonly, tupleType.target.labeledElementDeclarations); - } - function instantiateMappedTypeTemplate(type, key, isOptional, mapper) { - const templateMapper = appendTypeMapping(mapper, getTypeParameterFromMappedType(type), key); - const propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper); - const modifiers = getMappedTypeModifiers(type); - return strictNullChecks && modifiers & 4 /* IncludeOptional */ && !maybeTypeOfKind(propType, 32768 /* Undefined */ | 16384 /* Void */) ? getOptionalType( - propType, - /*isProperty*/ - true - ) : strictNullChecks && modifiers & 8 /* ExcludeOptional */ && isOptional ? getTypeWithFacts(propType, 524288 /* NEUndefined */) : propType; - } - function instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments) { - const result = createObjectType(type.objectFlags & ~(524288 /* CouldContainTypeVariablesComputed */ | 1048576 /* CouldContainTypeVariables */) | 64 /* Instantiated */, type.symbol); - if (type.objectFlags & 32 /* Mapped */) { - result.declaration = type.declaration; - const origTypeParameter = getTypeParameterFromMappedType(type); - const freshTypeParameter = cloneTypeParameter(origTypeParameter); - result.typeParameter = freshTypeParameter; - mapper = combineTypeMappers(makeUnaryTypeMapper(origTypeParameter, freshTypeParameter), mapper); - freshTypeParameter.mapper = mapper; - } - if (type.objectFlags & 8388608 /* InstantiationExpressionType */) { - result.node = type.node; - } - result.target = type; - result.mapper = mapper; - result.aliasSymbol = aliasSymbol || type.aliasSymbol; - result.aliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper); - result.objectFlags |= result.aliasTypeArguments ? getPropagatingFlagsOfTypes(result.aliasTypeArguments) : 0; - return result; - } - function getConditionalTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments) { - const root = type.root; - if (root.outerTypeParameters) { - const typeArguments = map(root.outerTypeParameters, (t) => getMappedType(t, mapper)); - const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments); - let result = root.instantiations.get(id); - if (!result) { - const newMapper = createTypeMapper(root.outerTypeParameters, typeArguments); - const checkType = root.checkType; - const distributionType = root.isDistributive ? getMappedType(checkType, newMapper) : void 0; - result = distributionType && checkType !== distributionType && distributionType.flags & (1048576 /* Union */ | 131072 /* Never */) ? mapTypeWithAlias(getReducedType(distributionType), (t) => getConditionalType(root, prependTypeMapping(checkType, t, newMapper)), aliasSymbol, aliasTypeArguments) : getConditionalType(root, newMapper, aliasSymbol, aliasTypeArguments); - root.instantiations.set(id, result); - } - return result; - } - return type; - } - function instantiateType(type, mapper) { - return type && mapper ? instantiateTypeWithAlias( - type, - mapper, - /*aliasSymbol*/ - void 0, - /*aliasTypeArguments*/ - void 0 - ) : type; - } - function instantiateTypeWithAlias(type, mapper, aliasSymbol, aliasTypeArguments) { - var _a; - if (!couldContainTypeVariables(type)) { - return type; - } - if (instantiationDepth === 100 || instantiationCount >= 5e6) { - (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth, instantiationCount }); - error2(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); - return errorType; - } - totalInstantiationCount++; - instantiationCount++; - instantiationDepth++; - const result = instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments); - instantiationDepth--; - return result; - } - function instantiateTypeWorker(type, mapper, aliasSymbol, aliasTypeArguments) { - const flags = type.flags; - if (flags & 262144 /* TypeParameter */) { - return getMappedType(type, mapper); - } - if (flags & 524288 /* Object */) { - const objectFlags = type.objectFlags; - if (objectFlags & (4 /* Reference */ | 16 /* Anonymous */ | 32 /* Mapped */)) { - if (objectFlags & 4 /* Reference */ && !type.node) { - const resolvedTypeArguments = type.resolvedTypeArguments; - const newTypeArguments = instantiateTypes(resolvedTypeArguments, mapper); - return newTypeArguments !== resolvedTypeArguments ? createNormalizedTypeReference(type.target, newTypeArguments) : type; - } - if (objectFlags & 1024 /* ReverseMapped */) { - return instantiateReverseMappedType(type, mapper); - } - return getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments); - } - return type; - } - if (flags & 3145728 /* UnionOrIntersection */) { - const origin = type.flags & 1048576 /* Union */ ? type.origin : void 0; - const types = origin && origin.flags & 3145728 /* UnionOrIntersection */ ? origin.types : type.types; - const newTypes = instantiateTypes(types, mapper); - if (newTypes === types && aliasSymbol === type.aliasSymbol) { - return type; - } - const newAliasSymbol = aliasSymbol || type.aliasSymbol; - const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper); - return flags & 2097152 /* Intersection */ || origin && origin.flags & 2097152 /* Intersection */ ? getIntersectionType(newTypes, newAliasSymbol, newAliasTypeArguments) : getUnionType(newTypes, 1 /* Literal */, newAliasSymbol, newAliasTypeArguments); - } - if (flags & 4194304 /* Index */) { - return getIndexType(instantiateType(type.type, mapper)); - } - if (flags & 134217728 /* TemplateLiteral */) { - return getTemplateLiteralType(type.texts, instantiateTypes(type.types, mapper)); - } - if (flags & 268435456 /* StringMapping */) { - return getStringMappingType(type.symbol, instantiateType(type.type, mapper)); - } - if (flags & 8388608 /* IndexedAccess */) { - const newAliasSymbol = aliasSymbol || type.aliasSymbol; - const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper); - return getIndexedAccessType( - instantiateType(type.objectType, mapper), - instantiateType(type.indexType, mapper), - type.accessFlags, - /*accessNode*/ - void 0, - newAliasSymbol, - newAliasTypeArguments - ); - } - if (flags & 16777216 /* Conditional */) { - return getConditionalTypeInstantiation(type, combineTypeMappers(type.mapper, mapper), aliasSymbol, aliasTypeArguments); - } - if (flags & 33554432 /* Substitution */) { - const newBaseType = instantiateType(type.baseType, mapper); - const newConstraint = instantiateType(type.constraint, mapper); - if (newBaseType.flags & 8650752 /* TypeVariable */ && isGenericType(newConstraint)) { - return getSubstitutionType(newBaseType, newConstraint); - } - if (newConstraint.flags & 3 /* AnyOrUnknown */ || isTypeAssignableTo(getRestrictiveInstantiation(newBaseType), getRestrictiveInstantiation(newConstraint))) { - return newBaseType; - } - return newBaseType.flags & 8650752 /* TypeVariable */ ? getSubstitutionType(newBaseType, newConstraint) : getIntersectionType([newConstraint, newBaseType]); - } - return type; - } - function instantiateReverseMappedType(type, mapper) { - const innerMappedType = instantiateType(type.mappedType, mapper); - if (!(getObjectFlags(innerMappedType) & 32 /* Mapped */)) { - return type; - } - const innerIndexType = instantiateType(type.constraintType, mapper); - if (!(innerIndexType.flags & 4194304 /* Index */)) { - return type; - } - const instantiated = inferTypeForHomomorphicMappedType( - instantiateType(type.source, mapper), - innerMappedType, - innerIndexType - ); - if (instantiated) { - return instantiated; - } - return type; - } - function getPermissiveInstantiation(type) { - return type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */) ? type : type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper)); - } - function getRestrictiveInstantiation(type) { - if (type.flags & (402784252 /* Primitive */ | 3 /* AnyOrUnknown */ | 131072 /* Never */)) { - return type; - } - if (type.restrictiveInstantiation) { - return type.restrictiveInstantiation; - } - type.restrictiveInstantiation = instantiateType(type, restrictiveMapper); - type.restrictiveInstantiation.restrictiveInstantiation = type.restrictiveInstantiation; - return type.restrictiveInstantiation; - } - function instantiateIndexInfo(info, mapper) { - return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration); - } - function isContextSensitive(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); - switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 262 /* FunctionDeclaration */: - return isContextSensitiveFunctionLikeDeclaration(node); - case 210 /* ObjectLiteralExpression */: - return some(node.properties, isContextSensitive); - case 209 /* ArrayLiteralExpression */: - return some(node.elements, isContextSensitive); - case 227 /* ConditionalExpression */: - return isContextSensitive(node.whenTrue) || isContextSensitive(node.whenFalse); - case 226 /* BinaryExpression */: - return (node.operatorToken.kind === 57 /* BarBarToken */ || node.operatorToken.kind === 61 /* QuestionQuestionToken */) && (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 303 /* PropertyAssignment */: - return isContextSensitive(node.initializer); - case 217 /* ParenthesizedExpression */: - return isContextSensitive(node.expression); - case 292 /* JsxAttributes */: - return some(node.properties, isContextSensitive) || isJsxOpeningElement(node.parent) && some(node.parent.parent.children, isContextSensitive); - case 291 /* JsxAttribute */: { - const { initializer } = node; - return !!initializer && isContextSensitive(initializer); - } - case 294 /* JsxExpression */: { - const { expression } = node; - return !!expression && isContextSensitive(expression); - } - } - return false; - } - function isContextSensitiveFunctionLikeDeclaration(node) { - return hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node); - } - function hasContextSensitiveReturnExpression(node) { - if (node.typeParameters || getEffectiveReturnTypeNode(node) || !node.body) { - return false; - } - if (node.body.kind !== 241 /* Block */) { - return isContextSensitive(node.body); - } - return !!forEachReturnStatement(node.body, (statement) => !!statement.expression && isContextSensitive(statement.expression)); - } - function isContextSensitiveFunctionOrObjectLiteralMethod(func) { - return (isFunctionExpressionOrArrowFunction(func) || isObjectLiteralMethod(func)) && isContextSensitiveFunctionLikeDeclaration(func); - } - function getTypeWithoutSignatures(type) { - if (type.flags & 524288 /* Object */) { - const resolved = resolveStructuredTypeMembers(type); - if (resolved.constructSignatures.length || resolved.callSignatures.length) { - const result = createObjectType(16 /* Anonymous */, type.symbol); - result.members = resolved.members; - result.properties = resolved.properties; - result.callSignatures = emptyArray; - result.constructSignatures = emptyArray; - result.indexInfos = emptyArray; - return result; - } - } else if (type.flags & 2097152 /* Intersection */) { - return getIntersectionType(map(type.types, getTypeWithoutSignatures)); - } - return type; - } - function isTypeIdenticalTo(source, target) { - return isTypeRelatedTo(source, target, identityRelation); - } - function compareTypesIdentical(source, target) { - return isTypeRelatedTo(source, target, identityRelation) ? -1 /* True */ : 0 /* False */; - } - function compareTypesAssignable(source, target) { - return isTypeRelatedTo(source, target, assignableRelation) ? -1 /* True */ : 0 /* False */; - } - function compareTypesSubtypeOf(source, target) { - return isTypeRelatedTo(source, target, subtypeRelation) ? -1 /* True */ : 0 /* False */; - } - function isTypeSubtypeOf(source, target) { - return isTypeRelatedTo(source, target, subtypeRelation); - } - function isTypeStrictSubtypeOf(source, target) { - return isTypeRelatedTo(source, target, strictSubtypeRelation); - } - function isTypeAssignableTo(source, target) { - return isTypeRelatedTo(source, target, assignableRelation); - } - function isTypeDerivedFrom(source, target) { - return source.flags & 1048576 /* Union */ ? every(source.types, (t) => isTypeDerivedFrom(t, target)) : target.flags & 1048576 /* Union */ ? some(target.types, (t) => isTypeDerivedFrom(source, t)) : source.flags & 2097152 /* Intersection */ ? some(source.types, (t) => isTypeDerivedFrom(t, target)) : source.flags & 58982400 /* InstantiableNonPrimitive */ ? isTypeDerivedFrom(getBaseConstraintOfType(source) || unknownType, target) : isEmptyAnonymousObjectType(target) ? !!(source.flags & (524288 /* Object */ | 67108864 /* NonPrimitive */)) : target === globalObjectType ? !!(source.flags & (524288 /* Object */ | 67108864 /* NonPrimitive */)) && !isEmptyAnonymousObjectType(source) : target === globalFunctionType ? !!(source.flags & 524288 /* Object */) && isFunctionObjectType(source) : hasBaseType(source, getTargetType(target)) || isArrayType(target) && !isReadonlyArrayType(target) && isTypeDerivedFrom(source, globalReadonlyArrayType); - } - function isTypeComparableTo(source, target) { - return isTypeRelatedTo(source, target, comparableRelation); - } - function areTypesComparable(type1, type2) { - return isTypeComparableTo(type1, type2) || isTypeComparableTo(type2, type1); - } - function checkTypeAssignableTo(source, target, errorNode, headMessage, containingMessageChain, errorOutputObject) { - return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage, containingMessageChain, errorOutputObject); - } - function checkTypeAssignableToAndOptionallyElaborate(source, target, errorNode, expr, headMessage, containingMessageChain) { - return checkTypeRelatedToAndOptionallyElaborate( - source, - target, - assignableRelation, - errorNode, - expr, - headMessage, - containingMessageChain, - /*errorOutputContainer*/ - void 0 - ); - } - function checkTypeRelatedToAndOptionallyElaborate(source, target, relation, errorNode, expr, headMessage, containingMessageChain, errorOutputContainer) { - if (isTypeRelatedTo(source, target, relation)) - return true; - if (!errorNode || !elaborateError(expr, source, target, relation, headMessage, containingMessageChain, errorOutputContainer)) { - return checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer); - } - return false; - } - function isOrHasGenericConditional(type) { - return !!(type.flags & 16777216 /* Conditional */ || type.flags & 2097152 /* Intersection */ && some(type.types, isOrHasGenericConditional)); - } - function elaborateError(node, source, target, relation, headMessage, containingMessageChain, errorOutputContainer) { - if (!node || isOrHasGenericConditional(target)) - return false; - if (!checkTypeRelatedTo( - source, - target, - relation, - /*errorNode*/ - void 0 - ) && elaborateDidYouMeanToCallOrConstruct(node, source, target, relation, headMessage, containingMessageChain, errorOutputContainer)) { - return true; - } - switch (node.kind) { - case 234 /* AsExpression */: - if (!isConstAssertion(node)) { - break; - } - case 294 /* JsxExpression */: - case 217 /* ParenthesizedExpression */: - return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - case 226 /* BinaryExpression */: - switch (node.operatorToken.kind) { - case 64 /* EqualsToken */: - case 28 /* CommaToken */: - return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer); - } - break; - case 210 /* ObjectLiteralExpression */: - return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 209 /* ArrayLiteralExpression */: - return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 292 /* JsxAttributes */: - return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer); - case 219 /* ArrowFunction */: - return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer); - } - return false; - } - function elaborateDidYouMeanToCallOrConstruct(node, source, target, relation, headMessage, containingMessageChain, errorOutputContainer) { - const callSignatures = getSignaturesOfType(source, 0 /* Call */); - const constructSignatures = getSignaturesOfType(source, 1 /* Construct */); - for (const signatures of [constructSignatures, callSignatures]) { - if (some(signatures, (s) => { - const returnType = getReturnTypeOfSignature(s); - return !(returnType.flags & (1 /* Any */ | 131072 /* Never */)) && checkTypeRelatedTo( - returnType, - target, - relation, - /*errorNode*/ - void 0 - ); - })) { - const resultObj = errorOutputContainer || {}; - checkTypeAssignableTo(source, target, node, headMessage, containingMessageChain, resultObj); - const diagnostic = resultObj.errors[resultObj.errors.length - 1]; - addRelatedInfo(diagnostic, createDiagnosticForNode( - node, - signatures === constructSignatures ? Diagnostics.Did_you_mean_to_use_new_with_this_expression : Diagnostics.Did_you_mean_to_call_this_expression - )); - return true; - } - } - return false; - } - function elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (isBlock(node.body)) { - return false; - } - if (some(node.parameters, hasType)) { - return false; - } - const sourceSig = getSingleCallSignature(source); - if (!sourceSig) { - return false; - } - const targetSignatures = getSignaturesOfType(target, 0 /* Call */); - if (!length(targetSignatures)) { - return false; - } - const returnExpression = node.body; - const sourceReturn = getReturnTypeOfSignature(sourceSig); - const targetReturn = getUnionType(map(targetSignatures, getReturnTypeOfSignature)); - if (!checkTypeRelatedTo( - sourceReturn, - targetReturn, - relation, - /*errorNode*/ - void 0 - )) { - const elaborated = returnExpression && elaborateError( - returnExpression, - sourceReturn, - targetReturn, - relation, - /*headMessage*/ - void 0, - containingMessageChain, - errorOutputContainer - ); - if (elaborated) { - return elaborated; - } - const resultObj = errorOutputContainer || {}; - checkTypeRelatedTo( - sourceReturn, - targetReturn, - relation, - returnExpression, - /*headMessage*/ - void 0, - containingMessageChain, - resultObj - ); - if (resultObj.errors) { - if (target.symbol && length(target.symbol.declarations)) { - addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], createDiagnosticForNode( - target.symbol.declarations[0], - Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature - )); - } - if ((getFunctionFlags(node) & 2 /* Async */) === 0 && !getTypeOfPropertyOfType(sourceReturn, "then") && checkTypeRelatedTo( - createPromiseType(sourceReturn), - targetReturn, - relation, - /*errorNode*/ - void 0 - )) { - addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], createDiagnosticForNode( - node, - Diagnostics.Did_you_mean_to_mark_this_function_as_async - )); - } - return true; - } - } - return false; - } - function getBestMatchIndexedAccessTypeOrUndefined(source, target, nameType) { - const idx = getIndexedAccessTypeOrUndefined(target, nameType); - if (idx) { - return idx; - } - if (target.flags & 1048576 /* Union */) { - const best = getBestMatchingType(source, target); - if (best) { - return getIndexedAccessTypeOrUndefined(best, nameType); - } - } - } - function checkExpressionForMutableLocationWithContextualType(next, sourcePropType) { - pushContextualType( - next, - sourcePropType, - /*isCache*/ - false - ); - const result = checkExpressionForMutableLocation(next, 1 /* Contextual */); - popContextualType(); - return result; - } - function elaborateElementwise(iterator, source, target, relation, containingMessageChain, errorOutputContainer) { - let reportedError = false; - for (const value of iterator) { - const { errorNode: prop, innerExpression: next, nameType, errorMessage } = value; - let targetPropType = getBestMatchIndexedAccessTypeOrUndefined(source, target, nameType); - if (!targetPropType || targetPropType.flags & 8388608 /* IndexedAccess */) - continue; - let sourcePropType = getIndexedAccessTypeOrUndefined(source, nameType); - if (!sourcePropType) - continue; - const propName = getPropertyNameFromIndex( - nameType, - /*accessNode*/ - void 0 - ); - if (!checkTypeRelatedTo( - sourcePropType, - targetPropType, - relation, - /*errorNode*/ - void 0 - )) { - const elaborated = next && elaborateError( - next, - sourcePropType, - targetPropType, - relation, - /*headMessage*/ - void 0, - containingMessageChain, - errorOutputContainer - ); - reportedError = true; - if (!elaborated) { - const resultObj = errorOutputContainer || {}; - const specificSource = next ? checkExpressionForMutableLocationWithContextualType(next, sourcePropType) : sourcePropType; - if (exactOptionalPropertyTypes && isExactOptionalPropertyMismatch(specificSource, targetPropType)) { - const diag2 = createDiagnosticForNode(prop, Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, typeToString(specificSource), typeToString(targetPropType)); - diagnostics.add(diag2); - resultObj.errors = [diag2]; - } else { - const targetIsOptional = !!(propName && (getPropertyOfType(target, propName) || unknownSymbol).flags & 16777216 /* Optional */); - const sourceIsOptional = !!(propName && (getPropertyOfType(source, propName) || unknownSymbol).flags & 16777216 /* Optional */); - targetPropType = removeMissingType(targetPropType, targetIsOptional); - sourcePropType = removeMissingType(sourcePropType, targetIsOptional && sourceIsOptional); - const result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj); - if (result && specificSource !== sourcePropType) { - checkTypeRelatedTo(sourcePropType, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj); - } - } - if (resultObj.errors) { - const reportedDiag = resultObj.errors[resultObj.errors.length - 1]; - const propertyName = isTypeUsableAsPropertyName(nameType) ? getPropertyNameFromType(nameType) : void 0; - const targetProp = propertyName !== void 0 ? getPropertyOfType(target, propertyName) : void 0; - let issuedElaboration = false; - if (!targetProp) { - const indexInfo = getApplicableIndexInfo(target, nameType); - if (indexInfo && indexInfo.declaration && !getSourceFileOfNode(indexInfo.declaration).hasNoDefaultLib) { - issuedElaboration = true; - addRelatedInfo(reportedDiag, createDiagnosticForNode(indexInfo.declaration, Diagnostics.The_expected_type_comes_from_this_index_signature)); - } - } - if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) { - const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0]; - if (!getSourceFileOfNode(targetNode).hasNoDefaultLib) { - addRelatedInfo(reportedDiag, createDiagnosticForNode( - targetNode, - Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1, - propertyName && !(nameType.flags & 8192 /* UniqueESSymbol */) ? unescapeLeadingUnderscores(propertyName) : typeToString(nameType), - typeToString(target) - )); - } - } - } - } - } - } - return reportedError; - } - function elaborateIterableOrArrayLikeTargetElementwise(iterator, source, target, relation, containingMessageChain, errorOutputContainer) { - const tupleOrArrayLikeTargetParts = filterType(target, isArrayOrTupleLikeType); - const nonTupleOrArrayLikeTargetParts = filterType(target, (t) => !isArrayOrTupleLikeType(t)); - const iterationType = nonTupleOrArrayLikeTargetParts !== neverType ? getIterationTypeOfIterable( - 13 /* ForOf */, - 0 /* Yield */, - nonTupleOrArrayLikeTargetParts, - /*errorNode*/ - void 0 - ) : void 0; - let reportedError = false; - for (let status = iterator.next(); !status.done; status = iterator.next()) { - const { errorNode: prop, innerExpression: next, nameType, errorMessage } = status.value; - let targetPropType = iterationType; - const targetIndexedPropType = tupleOrArrayLikeTargetParts !== neverType ? getBestMatchIndexedAccessTypeOrUndefined(source, tupleOrArrayLikeTargetParts, nameType) : void 0; - if (targetIndexedPropType && !(targetIndexedPropType.flags & 8388608 /* IndexedAccess */)) { - targetPropType = iterationType ? getUnionType([iterationType, targetIndexedPropType]) : targetIndexedPropType; - } - if (!targetPropType) - continue; - let sourcePropType = getIndexedAccessTypeOrUndefined(source, nameType); - if (!sourcePropType) - continue; - const propName = getPropertyNameFromIndex( - nameType, - /*accessNode*/ - void 0 - ); - if (!checkTypeRelatedTo( - sourcePropType, - targetPropType, - relation, - /*errorNode*/ - void 0 - )) { - const elaborated = next && elaborateError( - next, - sourcePropType, - targetPropType, - relation, - /*headMessage*/ - void 0, - containingMessageChain, - errorOutputContainer - ); - reportedError = true; - if (!elaborated) { - const resultObj = errorOutputContainer || {}; - const specificSource = next ? checkExpressionForMutableLocationWithContextualType(next, sourcePropType) : sourcePropType; - if (exactOptionalPropertyTypes && isExactOptionalPropertyMismatch(specificSource, targetPropType)) { - const diag2 = createDiagnosticForNode(prop, Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, typeToString(specificSource), typeToString(targetPropType)); - diagnostics.add(diag2); - resultObj.errors = [diag2]; - } else { - const targetIsOptional = !!(propName && (getPropertyOfType(tupleOrArrayLikeTargetParts, propName) || unknownSymbol).flags & 16777216 /* Optional */); - const sourceIsOptional = !!(propName && (getPropertyOfType(source, propName) || unknownSymbol).flags & 16777216 /* Optional */); - targetPropType = removeMissingType(targetPropType, targetIsOptional); - sourcePropType = removeMissingType(sourcePropType, targetIsOptional && sourceIsOptional); - const result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj); - if (result && specificSource !== sourcePropType) { - checkTypeRelatedTo(sourcePropType, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj); - } - } - } - } - } - return reportedError; - } - function* generateJsxAttributes(node) { - if (!length(node.properties)) - return; - for (const prop of node.properties) { - if (isJsxSpreadAttribute(prop) || isHyphenatedJsxName(getTextOfJsxAttributeName(prop.name))) - continue; - yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: getStringLiteralType(getTextOfJsxAttributeName(prop.name)) }; - } - } - function* generateJsxChildren(node, getInvalidTextDiagnostic) { - if (!length(node.children)) - return; - let memberOffset = 0; - for (let i = 0; i < node.children.length; i++) { - const child = node.children[i]; - const nameType = getNumberLiteralType(i - memberOffset); - const elem = getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic); - if (elem) { - yield elem; - } else { - memberOffset++; - } - } - } - function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) { - switch (child.kind) { - case 294 /* JsxExpression */: - return { errorNode: child, innerExpression: child.expression, nameType }; - case 12 /* JsxText */: - if (child.containsOnlyTriviaWhiteSpaces) { - break; - } - return { errorNode: child, innerExpression: void 0, nameType, errorMessage: getInvalidTextDiagnostic() }; - case 284 /* JsxElement */: - case 285 /* JsxSelfClosingElement */: - case 288 /* JsxFragment */: - return { errorNode: child, innerExpression: child, nameType }; - default: - return Debug.assertNever(child, "Found invalid jsx child"); - } - } - function elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer) { - let result = elaborateElementwise(generateJsxAttributes(node), source, target, relation, containingMessageChain, errorOutputContainer); - let invalidTextDiagnostic; - if (isJsxOpeningElement(node.parent) && isJsxElement(node.parent.parent)) { - const containingElement = node.parent.parent; - const childPropName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node)); - const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName); - const childrenNameType = getStringLiteralType(childrenPropName); - const childrenTargetType = getIndexedAccessType(target, childrenNameType); - const validChildren = getSemanticJsxChildren(containingElement.children); - if (!length(validChildren)) { - return result; - } - const moreThanOneRealChildren = length(validChildren) > 1; - let arrayLikeTargetParts; - let nonArrayLikeTargetParts; - const iterableType = getGlobalIterableType( - /*reportErrors*/ - false - ); - if (iterableType !== emptyGenericType) { - const anyIterable = createIterableType(anyType); - arrayLikeTargetParts = filterType(childrenTargetType, (t) => isTypeAssignableTo(t, anyIterable)); - nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isTypeAssignableTo(t, anyIterable)); - } else { - arrayLikeTargetParts = filterType(childrenTargetType, isArrayOrTupleLikeType); - nonArrayLikeTargetParts = filterType(childrenTargetType, (t) => !isArrayOrTupleLikeType(t)); - } - if (moreThanOneRealChildren) { - if (arrayLikeTargetParts !== neverType) { - const realSource = createTupleType(checkJsxChildren(containingElement, 0 /* Normal */)); - const children = generateJsxChildren(containingElement, getInvalidTextualChildDiagnostic); - result = elaborateIterableOrArrayLikeTargetElementwise(children, realSource, arrayLikeTargetParts, relation, containingMessageChain, errorOutputContainer) || result; - } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { - result = true; - const diag2 = error2( - containingElement.openingElement.tagName, - Diagnostics.This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided, - childrenPropName, - typeToString(childrenTargetType) - ); - if (errorOutputContainer && errorOutputContainer.skipLogging) { - (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); - } - } - } else { - if (nonArrayLikeTargetParts !== neverType) { - const child = validChildren[0]; - const elem = getElaborationElementForJsxChild(child, childrenNameType, getInvalidTextualChildDiagnostic); - if (elem) { - result = elaborateElementwise( - function* () { - yield elem; - }(), - source, - target, - relation, - containingMessageChain, - errorOutputContainer - ) || result; - } - } else if (!isTypeRelatedTo(getIndexedAccessType(source, childrenNameType), childrenTargetType, relation)) { - result = true; - const diag2 = error2( - containingElement.openingElement.tagName, - Diagnostics.This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided, - childrenPropName, - typeToString(childrenTargetType) - ); - if (errorOutputContainer && errorOutputContainer.skipLogging) { - (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); - } - } - } - } - return result; - function getInvalidTextualChildDiagnostic() { - if (!invalidTextDiagnostic) { - const tagNameText = getTextOfNode(node.parent.tagName); - const childPropName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node)); - const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName); - const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName)); - const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2; - invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage( - /*dummy*/ - void 0, - diagnostic, - tagNameText, - childrenPropName, - typeToString(childrenTargetType) - ) }; - } - return invalidTextDiagnostic; - } - } - function* generateLimitedTupleElements(node, target) { - const len = length(node.elements); - if (!len) - return; - for (let i = 0; i < len; i++) { - if (isTupleLikeType(target) && !getPropertyOfType(target, "" + i)) - continue; - const elem = node.elements[i]; - if (isOmittedExpression(elem)) - continue; - const nameType = getNumberLiteralType(i); - yield { errorNode: elem, innerExpression: elem, nameType }; - } - } - function elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) - return false; - if (isTupleLikeType(source)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer); - } - pushContextualType( - node, - target, - /*isCache*/ - false - ); - const tupleizedType = checkArrayLiteral( - node, - 1 /* Contextual */, - /*forceTuple*/ - true - ); - popContextualType(); - if (isTupleLikeType(tupleizedType)) { - return elaborateElementwise(generateLimitedTupleElements(node, target), tupleizedType, target, relation, containingMessageChain, errorOutputContainer); - } - return false; - } - function* generateObjectLiteralElements(node) { - if (!length(node.properties)) - return; - for (const prop of node.properties) { - if (isSpreadAssignment(prop)) - continue; - const type = getLiteralTypeFromProperty(getSymbolOfDeclaration(prop), 8576 /* StringOrNumberLiteralOrUnique */); - if (!type || type.flags & 131072 /* Never */) { - continue; - } - switch (prop.kind) { - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - case 174 /* MethodDeclaration */: - case 304 /* ShorthandPropertyAssignment */: - yield { errorNode: prop.name, innerExpression: void 0, nameType: type }; - break; - case 303 /* PropertyAssignment */: - yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: type, errorMessage: isComputedNonLiteralName(prop.name) ? Diagnostics.Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1 : void 0 }; - break; - default: - Debug.assertNever(prop); - } - } - } - function elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer) { - if (target.flags & (402784252 /* Primitive */ | 131072 /* Never */)) - return false; - return elaborateElementwise(generateObjectLiteralElements(node), source, target, relation, containingMessageChain, errorOutputContainer); - } - function checkTypeComparableTo(source, target, errorNode, headMessage, containingMessageChain) { - return checkTypeRelatedTo(source, target, comparableRelation, errorNode, headMessage, containingMessageChain); - } - function isSignatureAssignableTo(source, target, ignoreReturnTypes) { - return compareSignaturesRelated( - source, - target, - ignoreReturnTypes ? 4 /* IgnoreReturnTypes */ : 0 /* None */, - /*reportErrors*/ - false, - /*errorReporter*/ - void 0, - /*incompatibleErrorReporter*/ - void 0, - compareTypesAssignable, - /*reportUnreliableMarkers*/ - void 0 - ) !== 0 /* False */; - } - function isTopSignature(s) { - if (!s.typeParameters && (!s.thisParameter || isTypeAny(getTypeOfParameter(s.thisParameter))) && s.parameters.length === 1 && signatureHasRestParameter(s)) { - const paramType = getTypeOfParameter(s.parameters[0]); - const restType = isArrayType(paramType) ? getTypeArguments(paramType)[0] : paramType; - return !!(restType.flags & (1 /* Any */ | 131072 /* Never */) && getReturnTypeOfSignature(s).flags & 3 /* AnyOrUnknown */); - } - return false; - } - function compareSignaturesRelated(source, target, checkMode, reportErrors2, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) { - if (source === target) { - return -1 /* True */; - } - if (!(checkMode & 16 /* StrictTopSignature */ && isTopSignature(source)) && isTopSignature(target)) { - return -1 /* True */; - } - if (checkMode & 16 /* StrictTopSignature */ && isTopSignature(source) && !isTopSignature(target)) { - return 0 /* False */; - } - const targetCount = getParameterCount(target); - const sourceHasMoreParameters = !hasEffectiveRestParameter(target) && (checkMode & 8 /* StrictArity */ ? hasEffectiveRestParameter(source) || getParameterCount(source) > targetCount : getMinArgumentCount(source) > targetCount); - if (sourceHasMoreParameters) { - if (reportErrors2 && !(checkMode & 8 /* StrictArity */)) { - errorReporter(Diagnostics.Target_signature_provides_too_few_arguments_Expected_0_or_more_but_got_1, getMinArgumentCount(source), targetCount); - } - return 0 /* False */; - } - if (source.typeParameters && source.typeParameters !== target.typeParameters) { - target = getCanonicalSignature(target); - source = instantiateSignatureInContextOf( - source, - target, - /*inferenceContext*/ - void 0, - compareTypes - ); - } - const sourceCount = getParameterCount(source); - const sourceRestType = getNonArrayRestType(source); - const targetRestType = getNonArrayRestType(target); - if (sourceRestType || targetRestType) { - void instantiateType(sourceRestType || targetRestType, reportUnreliableMarkers); - } - const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - const strictVariance = !(checkMode & 3 /* Callback */) && strictFunctionTypes && kind !== 174 /* MethodDeclaration */ && kind !== 173 /* MethodSignature */ && kind !== 176 /* Constructor */; - let result = -1 /* True */; - const sourceThisType = getThisTypeOfSignature(source); - if (sourceThisType && sourceThisType !== voidType) { - const targetThisType = getThisTypeOfSignature(target); - if (targetThisType) { - const related = !strictVariance && compareTypes( - sourceThisType, - targetThisType, - /*reportErrors*/ - false - ) || compareTypes(targetThisType, sourceThisType, reportErrors2); - if (!related) { - if (reportErrors2) { - errorReporter(Diagnostics.The_this_types_of_each_signature_are_incompatible); - } - return 0 /* False */; - } - result &= related; - } - } - const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount); - const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1; - for (let i = 0; i < paramCount; i++) { - const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i); - const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i); - if (sourceType && targetType) { - const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType)); - const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType)); - const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && (getTypeFacts(sourceType) & 50331648 /* IsUndefinedOrNull */) === (getTypeFacts(targetType) & 50331648 /* IsUndefinedOrNull */); - let related = callbacks ? compareSignaturesRelated(targetSig, sourceSig, checkMode & 8 /* StrictArity */ | (strictVariance ? 2 /* StrictCallback */ : 1 /* BivariantCallback */), reportErrors2, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !(checkMode & 3 /* Callback */) && !strictVariance && compareTypes( - sourceType, - targetType, - /*reportErrors*/ - false - ) || compareTypes(targetType, sourceType, reportErrors2); - if (related && checkMode & 8 /* StrictArity */ && i >= getMinArgumentCount(source) && i < getMinArgumentCount(target) && compareTypes( - sourceType, - targetType, - /*reportErrors*/ - false - )) { - related = 0 /* False */; - } - if (!related) { - if (reportErrors2) { - errorReporter( - Diagnostics.Types_of_parameters_0_and_1_are_incompatible, - unescapeLeadingUnderscores(getParameterNameAtPosition(source, i)), - unescapeLeadingUnderscores(getParameterNameAtPosition(target, i)) - ); - } - return 0 /* False */; - } - result &= related; - } - } - if (!(checkMode & 4 /* IgnoreReturnTypes */)) { - const targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(target.declaration.symbol)) : getReturnTypeOfSignature(target); - if (targetReturnType === voidType || targetReturnType === anyType) { - return result; - } - const sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol(source.declaration.symbol)) : getReturnTypeOfSignature(source); - const targetTypePredicate = getTypePredicateOfSignature(target); - if (targetTypePredicate) { - const sourceTypePredicate = getTypePredicateOfSignature(source); - if (sourceTypePredicate) { - result &= compareTypePredicateRelatedTo(sourceTypePredicate, targetTypePredicate, reportErrors2, errorReporter, compareTypes); - } else if (isIdentifierTypePredicate(targetTypePredicate)) { - if (reportErrors2) { - errorReporter(Diagnostics.Signature_0_must_be_a_type_predicate, signatureToString(source)); - } - return 0 /* False */; - } - } else { - result &= checkMode & 1 /* BivariantCallback */ && compareTypes( - targetReturnType, - sourceReturnType, - /*reportErrors*/ - false - ) || compareTypes(sourceReturnType, targetReturnType, reportErrors2); - if (!result && reportErrors2 && incompatibleErrorReporter) { - incompatibleErrorReporter(sourceReturnType, targetReturnType); - } - } - } - return result; - } - function compareTypePredicateRelatedTo(source, target, reportErrors2, errorReporter, compareTypes) { - if (source.kind !== target.kind) { - if (reportErrors2) { - errorReporter(Diagnostics.A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard); - errorReporter(Diagnostics.Type_predicate_0_is_not_assignable_to_1, typePredicateToString(source), typePredicateToString(target)); - } - return 0 /* False */; - } - if (source.kind === 1 /* Identifier */ || source.kind === 3 /* AssertsIdentifier */) { - if (source.parameterIndex !== target.parameterIndex) { - if (reportErrors2) { - errorReporter(Diagnostics.Parameter_0_is_not_in_the_same_position_as_parameter_1, source.parameterName, target.parameterName); - errorReporter(Diagnostics.Type_predicate_0_is_not_assignable_to_1, typePredicateToString(source), typePredicateToString(target)); - } - return 0 /* False */; - } - } - const related = source.type === target.type ? -1 /* True */ : source.type && target.type ? compareTypes(source.type, target.type, reportErrors2) : 0 /* False */; - if (related === 0 /* False */ && reportErrors2) { - errorReporter(Diagnostics.Type_predicate_0_is_not_assignable_to_1, typePredicateToString(source), typePredicateToString(target)); - } - return related; - } - function isImplementationCompatibleWithOverload(implementation, overload) { - const erasedSource = getErasedSignature(implementation); - const erasedTarget = getErasedSignature(overload); - const sourceReturnType = getReturnTypeOfSignature(erasedSource); - const targetReturnType = getReturnTypeOfSignature(erasedTarget); - if (targetReturnType === voidType || isTypeRelatedTo(targetReturnType, sourceReturnType, assignableRelation) || isTypeRelatedTo(sourceReturnType, targetReturnType, assignableRelation)) { - return isSignatureAssignableTo( - erasedSource, - erasedTarget, - /*ignoreReturnTypes*/ - true - ); - } - return false; - } - function isEmptyResolvedType(t) { - return t !== anyFunctionType && t.properties.length === 0 && t.callSignatures.length === 0 && t.constructSignatures.length === 0 && t.indexInfos.length === 0; - } - function isEmptyObjectType(type) { - return type.flags & 524288 /* Object */ ? !isGenericMappedType(type) && isEmptyResolvedType(resolveStructuredTypeMembers(type)) : type.flags & 67108864 /* NonPrimitive */ ? true : type.flags & 1048576 /* Union */ ? some(type.types, isEmptyObjectType) : type.flags & 2097152 /* Intersection */ ? every(type.types, isEmptyObjectType) : false; - } - function isEmptyAnonymousObjectType(type) { - return !!(getObjectFlags(type) & 16 /* Anonymous */ && (type.members && isEmptyResolvedType(type) || type.symbol && type.symbol.flags & 2048 /* TypeLiteral */ && getMembersOfSymbol(type.symbol).size === 0)); - } - function isUnknownLikeUnionType(type) { - if (strictNullChecks && type.flags & 1048576 /* Union */) { - if (!(type.objectFlags & 33554432 /* IsUnknownLikeUnionComputed */)) { - const types = type.types; - type.objectFlags |= 33554432 /* IsUnknownLikeUnionComputed */ | (types.length >= 3 && types[0].flags & 32768 /* Undefined */ && types[1].flags & 65536 /* Null */ && some(types, isEmptyAnonymousObjectType) ? 67108864 /* IsUnknownLikeUnion */ : 0); - } - return !!(type.objectFlags & 67108864 /* IsUnknownLikeUnion */); - } - return false; - } - function containsUndefinedType(type) { - return !!((type.flags & 1048576 /* Union */ ? type.types[0] : type).flags & 32768 /* Undefined */); - } - function isStringIndexSignatureOnlyType(type) { - return type.flags & 524288 /* Object */ && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) || type.flags & 3145728 /* UnionOrIntersection */ && every(type.types, isStringIndexSignatureOnlyType) || false; - } - function isEnumTypeRelatedTo(source, target, errorReporter) { - const sourceSymbol = source.flags & 8 /* EnumMember */ ? getParentOfSymbol(source) : source; - const targetSymbol = target.flags & 8 /* EnumMember */ ? getParentOfSymbol(target) : target; - if (sourceSymbol === targetSymbol) { - return true; - } - if (sourceSymbol.escapedName !== targetSymbol.escapedName || !(sourceSymbol.flags & 256 /* RegularEnum */) || !(targetSymbol.flags & 256 /* RegularEnum */)) { - return false; - } - const id = getSymbolId(sourceSymbol) + "," + getSymbolId(targetSymbol); - const entry = enumRelation.get(id); - if (entry !== void 0 && !(!(entry & 4 /* Reported */) && entry & 2 /* Failed */ && errorReporter)) { - return !!(entry & 1 /* Succeeded */); - } - const targetEnumType = getTypeOfSymbol(targetSymbol); - for (const property of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) { - if (property.flags & 8 /* EnumMember */) { - const targetProperty = getPropertyOfType(targetEnumType, property.escapedName); - if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) { - if (errorReporter) { - errorReporter( - Diagnostics.Property_0_is_missing_in_type_1, - symbolName(property), - typeToString( - getDeclaredTypeOfSymbol(targetSymbol), - /*enclosingDeclaration*/ - void 0, - 64 /* UseFullyQualifiedType */ - ) - ); - enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */); - } else { - enumRelation.set(id, 2 /* Failed */); - } - return false; - } - } - } - enumRelation.set(id, 1 /* Succeeded */); - return true; - } - function isSimpleTypeRelatedTo(source, target, relation, errorReporter) { - const s = source.flags; - const t = target.flags; - if (t & 1 /* Any */ || s & 131072 /* Never */ || source === wildcardType) - return true; - if (t & 2 /* Unknown */ && !(relation === strictSubtypeRelation && s & 1 /* Any */)) - return true; - if (t & 131072 /* Never */) - return false; - if (s & 402653316 /* StringLike */ && t & 4 /* String */) - return true; - if (s & 128 /* StringLiteral */ && s & 1024 /* EnumLiteral */ && t & 128 /* StringLiteral */ && !(t & 1024 /* EnumLiteral */) && source.value === target.value) - return true; - if (s & 296 /* NumberLike */ && t & 8 /* Number */) - return true; - if (s & 256 /* NumberLiteral */ && s & 1024 /* EnumLiteral */ && t & 256 /* NumberLiteral */ && !(t & 1024 /* EnumLiteral */) && source.value === target.value) - return true; - if (s & 2112 /* BigIntLike */ && t & 64 /* BigInt */) - return true; - if (s & 528 /* BooleanLike */ && t & 16 /* Boolean */) - return true; - if (s & 12288 /* ESSymbolLike */ && t & 4096 /* ESSymbol */) - return true; - if (s & 32 /* Enum */ && t & 32 /* Enum */ && source.symbol.escapedName === target.symbol.escapedName && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter)) - return true; - if (s & 1024 /* EnumLiteral */ && t & 1024 /* EnumLiteral */) { - if (s & 1048576 /* Union */ && t & 1048576 /* Union */ && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter)) - return true; - if (s & 2944 /* Literal */ && t & 2944 /* Literal */ && source.value === target.value && isEnumTypeRelatedTo(source.symbol, target.symbol, errorReporter)) - return true; - } - if (s & 32768 /* Undefined */ && (!strictNullChecks && !(t & 3145728 /* UnionOrIntersection */) || t & (32768 /* Undefined */ | 16384 /* Void */))) - return true; - if (s & 65536 /* Null */ && (!strictNullChecks && !(t & 3145728 /* UnionOrIntersection */) || t & 65536 /* Null */)) - return true; - if (s & 524288 /* Object */ && t & 67108864 /* NonPrimitive */ && !(relation === strictSubtypeRelation && isEmptyAnonymousObjectType(source) && !(getObjectFlags(source) & 8192 /* FreshLiteral */))) - return true; - if (relation === assignableRelation || relation === comparableRelation) { - if (s & 1 /* Any */) - return true; - if (s & 8 /* Number */ && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */)) - return true; - if (s & 256 /* NumberLiteral */ && !(s & 1024 /* EnumLiteral */) && (t & 32 /* Enum */ || t & 256 /* NumberLiteral */ && t & 1024 /* EnumLiteral */ && source.value === target.value)) - return true; - if (isUnknownLikeUnionType(target)) - return true; - } - return false; - } - function isTypeRelatedTo(source, target, relation) { - if (isFreshLiteralType(source)) { - source = source.regularType; - } - if (isFreshLiteralType(target)) { - target = target.regularType; - } - if (source === target) { - return true; - } - if (relation !== identityRelation) { - if (relation === comparableRelation && !(target.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target, source, relation) || isSimpleTypeRelatedTo(source, target, relation)) { - return true; - } - } else if (!((source.flags | target.flags) & (3145728 /* UnionOrIntersection */ | 8388608 /* IndexedAccess */ | 16777216 /* Conditional */ | 33554432 /* Substitution */))) { - if (source.flags !== target.flags) - return false; - if (source.flags & 67358815 /* Singleton */) - return true; - } - if (source.flags & 524288 /* Object */ && target.flags & 524288 /* Object */) { - const related = relation.get(getRelationKey( - source, - target, - 0 /* None */, - relation, - /*ignoreConstraints*/ - false - )); - if (related !== void 0) { - return !!(related & 1 /* Succeeded */); - } - } - if (source.flags & 469499904 /* StructuredOrInstantiable */ || target.flags & 469499904 /* StructuredOrInstantiable */) { - return checkTypeRelatedTo( - source, - target, - relation, - /*errorNode*/ - void 0 - ); - } - return false; - } - function isIgnoredJsxProperty(source, sourceProp) { - return getObjectFlags(source) & 2048 /* JsxAttributes */ && isHyphenatedJsxName(sourceProp.escapedName); - } - function getNormalizedType(type, writing) { - while (true) { - const t = isFreshLiteralType(type) ? type.regularType : isGenericTupleType(type) ? getNormalizedTupleType(type, writing) : getObjectFlags(type) & 4 /* Reference */ ? type.node ? createTypeReference(type.target, getTypeArguments(type)) : getSingleBaseForNonAugmentingSubtype(type) || type : type.flags & 3145728 /* UnionOrIntersection */ ? getNormalizedUnionOrIntersectionType(type, writing) : type.flags & 33554432 /* Substitution */ ? writing ? type.baseType : getSubstitutionIntersection(type) : type.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(type, writing) : type; - if (t === type) - return t; - type = t; - } - } - function getNormalizedUnionOrIntersectionType(type, writing) { - const reduced = getReducedType(type); - if (reduced !== type) { - return reduced; - } - if (type.flags & 2097152 /* Intersection */ && some(type.types, isEmptyAnonymousObjectType)) { - const normalizedTypes = sameMap(type.types, (t) => getNormalizedType(t, writing)); - if (normalizedTypes !== type.types) { - return getIntersectionType(normalizedTypes); - } - } - return type; - } - function getNormalizedTupleType(type, writing) { - const elements = getElementTypes(type); - const normalizedElements = sameMap(elements, (t) => t.flags & 25165824 /* Simplifiable */ ? getSimplifiedType(t, writing) : t); - return elements !== normalizedElements ? createNormalizedTupleType(type.target, normalizedElements) : type; - } - function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain, errorOutputContainer) { - var _a; - let errorInfo; - let relatedInfo; - let maybeKeys; - let maybeKeysSet; - let sourceStack; - let targetStack; - let maybeCount = 0; - let sourceDepth = 0; - let targetDepth = 0; - let expandingFlags = 0 /* None */; - let overflow = false; - let overrideNextErrorInfo = 0; - let lastSkippedInfo; - let incompatibleStack; - Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - const result = isRelatedTo( - source, - target, - 3 /* Both */, - /*reportErrors*/ - !!errorNode, - headMessage - ); - if (incompatibleStack) { - reportIncompatibleStack(); - } - if (overflow) { - (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth }); - const diag2 = error2(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); - if (errorOutputContainer) { - (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); - } - } else if (errorInfo) { - if (containingMessageChain) { - const chain = containingMessageChain(); - if (chain) { - concatenateDiagnosticMessageChains(chain, errorInfo); - errorInfo = chain; - } - } - let relatedInformation; - if (headMessage && errorNode && !result && source.symbol) { - const links = getSymbolLinks(source.symbol); - if (links.originatingImport && !isImportCall(links.originatingImport)) { - const helpfulRetry = checkTypeRelatedTo( - getTypeOfSymbol(links.target), - target, - relation, - /*errorNode*/ - void 0 - ); - if (helpfulRetry) { - const diag3 = createDiagnosticForNode(links.originatingImport, Diagnostics.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); - relatedInformation = append(relatedInformation, diag3); - } - } - } - const diag2 = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorNode), errorNode, errorInfo, relatedInformation); - if (relatedInfo) { - addRelatedInfo(diag2, ...relatedInfo); - } - if (errorOutputContainer) { - (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); - } - if (!errorOutputContainer || !errorOutputContainer.skipLogging) { - diagnostics.add(diag2); - } - } - if (errorNode && errorOutputContainer && errorOutputContainer.skipLogging && result === 0 /* False */) { - Debug.assert(!!errorOutputContainer.errors, "missed opportunity to interact with error."); - } - return result !== 0 /* False */; - function resetErrorInfo(saved) { - errorInfo = saved.errorInfo; - lastSkippedInfo = saved.lastSkippedInfo; - incompatibleStack = saved.incompatibleStack; - overrideNextErrorInfo = saved.overrideNextErrorInfo; - relatedInfo = saved.relatedInfo; - } - function captureErrorCalculationState() { - return { - errorInfo, - lastSkippedInfo, - incompatibleStack: incompatibleStack == null ? void 0 : incompatibleStack.slice(), - overrideNextErrorInfo, - relatedInfo: relatedInfo == null ? void 0 : relatedInfo.slice() - }; - } - function reportIncompatibleError(message, ...args) { - overrideNextErrorInfo++; - lastSkippedInfo = void 0; - (incompatibleStack || (incompatibleStack = [])).push([message, ...args]); - } - function reportIncompatibleStack() { - const stack = incompatibleStack || []; - incompatibleStack = void 0; - const info = lastSkippedInfo; - lastSkippedInfo = void 0; - if (stack.length === 1) { - reportError(...stack[0]); - if (info) { - reportRelationError( - /*message*/ - void 0, - ...info - ); - } - return; - } - let path = ""; - const secondaryRootErrors = []; - while (stack.length) { - const [msg, ...args] = stack.pop(); - switch (msg.code) { - case Diagnostics.Types_of_property_0_are_incompatible.code: { - if (path.indexOf("new ") === 0) { - path = `(${path})`; - } - const str = "" + args[0]; - if (path.length === 0) { - path = `${str}`; - } else if (isIdentifierText(str, getEmitScriptTarget(compilerOptions))) { - path = `${path}.${str}`; - } else if (str[0] === "[" && str[str.length - 1] === "]") { - path = `${path}${str}`; - } else { - path = `${path}[${str}]`; - } - break; - } - case Diagnostics.Call_signature_return_types_0_and_1_are_incompatible.code: - case Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code: - case Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: - case Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: { - if (path.length === 0) { - let mappedMsg = msg; - if (msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code) { - mappedMsg = Diagnostics.Call_signature_return_types_0_and_1_are_incompatible; - } else if (msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code) { - mappedMsg = Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible; - } - secondaryRootErrors.unshift([mappedMsg, args[0], args[1]]); - } else { - const prefix = msg.code === Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "new " : ""; - const params = msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "" : "..."; - path = `${prefix}${path}(${params})`; - } - break; - } - case Diagnostics.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code: { - secondaryRootErrors.unshift([Diagnostics.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, args[0], args[1]]); - break; - } - case Diagnostics.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code: { - secondaryRootErrors.unshift([Diagnostics.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target, args[0], args[1], args[2]]); - break; - } - default: - return Debug.fail(`Unhandled Diagnostic: ${msg.code}`); - } - } - if (path) { - reportError( - path[path.length - 1] === ")" ? Diagnostics.The_types_returned_by_0_are_incompatible_between_these_types : Diagnostics.The_types_of_0_are_incompatible_between_these_types, - path - ); - } else { - secondaryRootErrors.shift(); - } - for (const [msg, ...args] of secondaryRootErrors) { - const originalValue = msg.elidedInCompatabilityPyramid; - msg.elidedInCompatabilityPyramid = false; - reportError(msg, ...args); - msg.elidedInCompatabilityPyramid = originalValue; - } - if (info) { - reportRelationError( - /*message*/ - void 0, - ...info - ); - } - } - function reportError(message, ...args) { - Debug.assert(!!errorNode); - if (incompatibleStack) - reportIncompatibleStack(); - if (message.elidedInCompatabilityPyramid) - return; - errorInfo = chainDiagnosticMessages(errorInfo, message, ...args); - } - function associateRelatedInfo(info) { - Debug.assert(!!errorInfo); - if (!relatedInfo) { - relatedInfo = [info]; - } else { - relatedInfo.push(info); - } - } - function reportRelationError(message, source2, target2) { - if (incompatibleStack) - reportIncompatibleStack(); - const [sourceType, targetType] = getTypeNamesForErrorDisplay(source2, target2); - let generalizedSource = source2; - let generalizedSourceType = sourceType; - if (isLiteralType(source2) && !typeCouldHaveTopLevelSingletonTypes(target2)) { - generalizedSource = getBaseTypeOfLiteralType(source2); - Debug.assert(!isTypeAssignableTo(generalizedSource, target2), "generalized source shouldn't be assignable"); - generalizedSourceType = getTypeNameForErrorDisplay(generalizedSource); - } - const targetFlags = target2.flags & 8388608 /* IndexedAccess */ && !(source2.flags & 8388608 /* IndexedAccess */) ? target2.objectType.flags : target2.flags; - if (targetFlags & 262144 /* TypeParameter */ && target2 !== markerSuperTypeForCheck && target2 !== markerSubTypeForCheck) { - const constraint = getBaseConstraintOfType(target2); - let needsOriginalSource; - if (constraint && (isTypeAssignableTo(generalizedSource, constraint) || (needsOriginalSource = isTypeAssignableTo(source2, constraint)))) { - reportError( - Diagnostics._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2, - needsOriginalSource ? sourceType : generalizedSourceType, - targetType, - typeToString(constraint) - ); - } else { - errorInfo = void 0; - reportError( - Diagnostics._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1, - targetType, - generalizedSourceType - ); - } - } - if (!message) { - if (relation === comparableRelation) { - message = Diagnostics.Type_0_is_not_comparable_to_type_1; - } else if (sourceType === targetType) { - message = Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated; - } else if (exactOptionalPropertyTypes && getExactOptionalUnassignableProperties(source2, target2).length) { - message = Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties; - } else { - if (source2.flags & 128 /* StringLiteral */ && target2.flags & 1048576 /* Union */) { - const suggestedType = getSuggestedTypeForNonexistentStringLiteralType(source2, target2); - if (suggestedType) { - reportError(Diagnostics.Type_0_is_not_assignable_to_type_1_Did_you_mean_2, generalizedSourceType, targetType, typeToString(suggestedType)); - return; - } - } - message = Diagnostics.Type_0_is_not_assignable_to_type_1; - } - } else if (message === Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1 && exactOptionalPropertyTypes && getExactOptionalUnassignableProperties(source2, target2).length) { - message = Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties; - } - reportError(message, generalizedSourceType, targetType); - } - function tryElaborateErrorsForPrimitivesAndObjects(source2, target2) { - const sourceType = symbolValueDeclarationIsContextSensitive(source2.symbol) ? typeToString(source2, source2.symbol.valueDeclaration) : typeToString(source2); - const targetType = symbolValueDeclarationIsContextSensitive(target2.symbol) ? typeToString(target2, target2.symbol.valueDeclaration) : typeToString(target2); - if (globalStringType === source2 && stringType === target2 || globalNumberType === source2 && numberType === target2 || globalBooleanType === source2 && booleanType === target2 || getGlobalESSymbolType() === source2 && esSymbolType === target2) { - reportError(Diagnostics._0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible, targetType, sourceType); - } - } - function tryElaborateArrayLikeErrors(source2, target2, reportErrors2) { - if (isTupleType(source2)) { - if (source2.target.readonly && isMutableArrayOrTuple(target2)) { - if (reportErrors2) { - reportError(Diagnostics.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, typeToString(source2), typeToString(target2)); - } - return false; - } - return isArrayOrTupleType(target2); - } - if (isReadonlyArrayType(source2) && isMutableArrayOrTuple(target2)) { - if (reportErrors2) { - reportError(Diagnostics.The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1, typeToString(source2), typeToString(target2)); - } - return false; - } - if (isTupleType(target2)) { - return isArrayType(source2); - } - return true; - } - function isRelatedToWorker(source2, target2, reportErrors2) { - return isRelatedTo(source2, target2, 3 /* Both */, reportErrors2); - } - function isRelatedTo(originalSource, originalTarget, recursionFlags = 3 /* Both */, reportErrors2 = false, headMessage2, intersectionState = 0 /* None */) { - if (originalSource === originalTarget) - return -1 /* True */; - if (originalSource.flags & 524288 /* Object */ && originalTarget.flags & 402784252 /* Primitive */) { - if (relation === comparableRelation && !(originalTarget.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(originalTarget, originalSource, relation) || isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors2 ? reportError : void 0)) { - return -1 /* True */; - } - if (reportErrors2) { - reportErrorResults(originalSource, originalTarget, originalSource, originalTarget, headMessage2); - } - return 0 /* False */; - } - const source2 = getNormalizedType( - originalSource, - /*writing*/ - false - ); - let target2 = getNormalizedType( - originalTarget, - /*writing*/ - true - ); - if (source2 === target2) - return -1 /* True */; - if (relation === identityRelation) { - if (source2.flags !== target2.flags) - return 0 /* False */; - if (source2.flags & 67358815 /* Singleton */) - return -1 /* True */; - traceUnionsOrIntersectionsTooLarge(source2, target2); - return recursiveTypeRelatedTo( - source2, - target2, - /*reportErrors*/ - false, - 0 /* None */, - recursionFlags - ); - } - if (source2.flags & 262144 /* TypeParameter */ && getConstraintOfType(source2) === target2) { - return -1 /* True */; - } - if (source2.flags & 470302716 /* DefinitelyNonNullable */ && target2.flags & 1048576 /* Union */) { - const types = target2.types; - const candidate = types.length === 2 && types[0].flags & 98304 /* Nullable */ ? types[1] : types.length === 3 && types[0].flags & 98304 /* Nullable */ && types[1].flags & 98304 /* Nullable */ ? types[2] : void 0; - if (candidate && !(candidate.flags & 98304 /* Nullable */)) { - target2 = getNormalizedType( - candidate, - /*writing*/ - true - ); - if (source2 === target2) - return -1 /* True */; - } - } - if (relation === comparableRelation && !(target2.flags & 131072 /* Never */) && isSimpleTypeRelatedTo(target2, source2, relation) || isSimpleTypeRelatedTo(source2, target2, relation, reportErrors2 ? reportError : void 0)) - return -1 /* True */; - if (source2.flags & 469499904 /* StructuredOrInstantiable */ || target2.flags & 469499904 /* StructuredOrInstantiable */) { - const isPerformingExcessPropertyChecks = !(intersectionState & 2 /* Target */) && (isObjectLiteralType2(source2) && getObjectFlags(source2) & 8192 /* FreshLiteral */); - if (isPerformingExcessPropertyChecks) { - if (hasExcessProperties(source2, target2, reportErrors2)) { - if (reportErrors2) { - reportRelationError(headMessage2, source2, originalTarget.aliasSymbol ? originalTarget : target2); - } - return 0 /* False */; - } - } - const isPerformingCommonPropertyChecks = (relation !== comparableRelation || isUnitType(source2)) && !(intersectionState & 2 /* Target */) && source2.flags & (402784252 /* Primitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && source2 !== globalObjectType && target2.flags & (524288 /* Object */ | 2097152 /* Intersection */) && isWeakType(target2) && (getPropertiesOfType(source2).length > 0 || typeHasCallOrConstructSignatures(source2)); - const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */); - if (isPerformingCommonPropertyChecks && !hasCommonProperties(source2, target2, isComparingJsxAttributes)) { - if (reportErrors2) { - const sourceString = typeToString(originalSource.aliasSymbol ? originalSource : source2); - const targetString = typeToString(originalTarget.aliasSymbol ? originalTarget : target2); - const calls = getSignaturesOfType(source2, 0 /* Call */); - const constructs = getSignaturesOfType(source2, 1 /* Construct */); - if (calls.length > 0 && isRelatedTo( - getReturnTypeOfSignature(calls[0]), - target2, - 1 /* Source */, - /*reportErrors*/ - false - ) || constructs.length > 0 && isRelatedTo( - getReturnTypeOfSignature(constructs[0]), - target2, - 1 /* Source */, - /*reportErrors*/ - false - )) { - reportError(Diagnostics.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it, sourceString, targetString); - } else { - reportError(Diagnostics.Type_0_has_no_properties_in_common_with_type_1, sourceString, targetString); - } - } - return 0 /* False */; - } - traceUnionsOrIntersectionsTooLarge(source2, target2); - const skipCaching = source2.flags & 1048576 /* Union */ && source2.types.length < 4 && !(target2.flags & 1048576 /* Union */) || target2.flags & 1048576 /* Union */ && target2.types.length < 4 && !(source2.flags & 469499904 /* StructuredOrInstantiable */); - const result2 = skipCaching ? unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) : recursiveTypeRelatedTo(source2, target2, reportErrors2, intersectionState, recursionFlags); - if (result2) { - return result2; - } - } - if (reportErrors2) { - reportErrorResults(originalSource, originalTarget, source2, target2, headMessage2); - } - return 0 /* False */; - } - function reportErrorResults(originalSource, originalTarget, source2, target2, headMessage2) { - var _a2, _b; - const sourceHasBase = !!getSingleBaseForNonAugmentingSubtype(originalSource); - const targetHasBase = !!getSingleBaseForNonAugmentingSubtype(originalTarget); - source2 = originalSource.aliasSymbol || sourceHasBase ? originalSource : source2; - target2 = originalTarget.aliasSymbol || targetHasBase ? originalTarget : target2; - let maybeSuppress = overrideNextErrorInfo > 0; - if (maybeSuppress) { - overrideNextErrorInfo--; - } - if (source2.flags & 524288 /* Object */ && target2.flags & 524288 /* Object */) { - const currentError = errorInfo; - tryElaborateArrayLikeErrors( - source2, - target2, - /*reportErrors*/ - true - ); - if (errorInfo !== currentError) { - maybeSuppress = !!errorInfo; - } - } - if (source2.flags & 524288 /* Object */ && target2.flags & 402784252 /* Primitive */) { - tryElaborateErrorsForPrimitivesAndObjects(source2, target2); - } else if (source2.symbol && source2.flags & 524288 /* Object */ && globalObjectType === source2) { - reportError(Diagnostics.The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead); - } else if (getObjectFlags(source2) & 2048 /* JsxAttributes */ && target2.flags & 2097152 /* Intersection */) { - const targetTypes = target2.types; - const intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes, errorNode); - const intrinsicClassAttributes = getJsxType(JsxNames.IntrinsicClassAttributes, errorNode); - if (!isErrorType(intrinsicAttributes) && !isErrorType(intrinsicClassAttributes) && (contains(targetTypes, intrinsicAttributes) || contains(targetTypes, intrinsicClassAttributes))) { - return; - } - } else { - errorInfo = elaborateNeverIntersection(errorInfo, originalTarget); - } - if (!headMessage2 && maybeSuppress) { - lastSkippedInfo = [source2, target2]; - return; - } - reportRelationError(headMessage2, source2, target2); - if (source2.flags & 262144 /* TypeParameter */ && ((_b = (_a2 = source2.symbol) == null ? void 0 : _a2.declarations) == null ? void 0 : _b[0]) && !getConstraintOfType(source2)) { - const syntheticParam = cloneTypeParameter(source2); - syntheticParam.constraint = instantiateType(target2, makeUnaryTypeMapper(source2, syntheticParam)); - if (hasNonCircularBaseConstraint(syntheticParam)) { - const targetConstraintString = typeToString(target2, source2.symbol.declarations[0]); - associateRelatedInfo(createDiagnosticForNode(source2.symbol.declarations[0], Diagnostics.This_type_parameter_might_need_an_extends_0_constraint, targetConstraintString)); - } - } - } - function traceUnionsOrIntersectionsTooLarge(source2, target2) { - if (!tracing) { - return; - } - if (source2.flags & 3145728 /* UnionOrIntersection */ && target2.flags & 3145728 /* UnionOrIntersection */) { - const sourceUnionOrIntersection = source2; - const targetUnionOrIntersection = target2; - if (sourceUnionOrIntersection.objectFlags & targetUnionOrIntersection.objectFlags & 32768 /* PrimitiveUnion */) { - return; - } - const sourceSize = sourceUnionOrIntersection.types.length; - const targetSize = targetUnionOrIntersection.types.length; - if (sourceSize * targetSize > 1e6) { - tracing.instant(tracing.Phase.CheckTypes, "traceUnionsOrIntersectionsTooLarge_DepthLimit", { - sourceId: source2.id, - sourceSize, - targetId: target2.id, - targetSize, - pos: errorNode == null ? void 0 : errorNode.pos, - end: errorNode == null ? void 0 : errorNode.end - }); - } - } - } - function getTypeOfPropertyInTypes(types, name) { - const appendPropType = (propTypes, type) => { - var _a2; - type = getApparentType(type); - const prop = type.flags & 3145728 /* UnionOrIntersection */ ? getPropertyOfUnionOrIntersectionType(type, name) : getPropertyOfObjectType(type, name); - const propType = prop && getTypeOfSymbol(prop) || ((_a2 = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a2.type) || undefinedType; - return append(propTypes, propType); - }; - return getUnionType(reduceLeft( - types, - appendPropType, - /*initial*/ - void 0 - ) || emptyArray); - } - function hasExcessProperties(source2, target2, reportErrors2) { - var _a2; - if (!isExcessPropertyCheckTarget(target2) || !noImplicitAny && getObjectFlags(target2) & 4096 /* JSLiteral */) { - return false; - } - const isComparingJsxAttributes = !!(getObjectFlags(source2) & 2048 /* JsxAttributes */); - if ((relation === assignableRelation || relation === comparableRelation) && (isTypeSubsetOf(globalObjectType, target2) || !isComparingJsxAttributes && isEmptyObjectType(target2))) { - return false; - } - let reducedTarget = target2; - let checkTypes; - if (target2.flags & 1048576 /* Union */) { - reducedTarget = findMatchingDiscriminantType(source2, target2, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target2); - checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget]; - } - for (const prop of getPropertiesOfType(source2)) { - if (shouldCheckAsExcessProperty(prop, source2.symbol) && !isIgnoredJsxProperty(source2, prop)) { - if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) { - if (reportErrors2) { - const errorTarget = filterType(reducedTarget, isExcessPropertyCheckTarget); - if (!errorNode) - return Debug.fail(); - if (isJsxAttributes(errorNode) || isJsxOpeningLikeElement(errorNode) || isJsxOpeningLikeElement(errorNode.parent)) { - if (prop.valueDeclaration && isJsxAttribute(prop.valueDeclaration) && getSourceFileOfNode(errorNode) === getSourceFileOfNode(prop.valueDeclaration.name)) { - errorNode = prop.valueDeclaration.name; - } - const propName = symbolToString(prop); - const suggestionSymbol = getSuggestedSymbolForNonexistentJSXAttribute(propName, errorTarget); - const suggestion = suggestionSymbol ? symbolToString(suggestionSymbol) : void 0; - if (suggestion) { - reportError(Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, propName, typeToString(errorTarget), suggestion); - } else { - reportError(Diagnostics.Property_0_does_not_exist_on_type_1, propName, typeToString(errorTarget)); - } - } else { - const objectLiteralDeclaration = ((_a2 = source2.symbol) == null ? void 0 : _a2.declarations) && firstOrUndefined(source2.symbol.declarations); - let suggestion; - if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, (d) => d === objectLiteralDeclaration) && getSourceFileOfNode(objectLiteralDeclaration) === getSourceFileOfNode(errorNode)) { - const propDeclaration = prop.valueDeclaration; - Debug.assertNode(propDeclaration, isObjectLiteralElementLike); - const name = propDeclaration.name; - errorNode = name; - if (isIdentifier(name)) { - suggestion = getSuggestionForNonexistentProperty(name, errorTarget); - } - } - if (suggestion !== void 0) { - reportError( - Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, - symbolToString(prop), - typeToString(errorTarget), - suggestion - ); - } else { - reportError( - Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, - symbolToString(prop), - typeToString(errorTarget) - ); - } - } - } - return true; - } - if (checkTypes && !isRelatedTo(getTypeOfSymbol(prop), getTypeOfPropertyInTypes(checkTypes, prop.escapedName), 3 /* Both */, reportErrors2)) { - if (reportErrors2) { - reportIncompatibleError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(prop)); - } - return true; - } - } - } - return false; - } - function shouldCheckAsExcessProperty(prop, container) { - return prop.valueDeclaration && container.valueDeclaration && prop.valueDeclaration.parent === container.valueDeclaration; - } - function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) { - if (source2.flags & 1048576 /* Union */) { - return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState); - } - if (target2.flags & 1048576 /* Union */) { - return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source2), target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */) && !(target2.flags & 402784252 /* Primitive */)); - } - if (target2.flags & 2097152 /* Intersection */) { - return typeRelatedToEachType(source2, target2, reportErrors2, 2 /* Target */); - } - if (relation === comparableRelation && target2.flags & 402784252 /* Primitive */) { - const constraints = sameMap(source2.types, (t) => t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOfType(t) || unknownType : t); - if (constraints !== source2.types) { - source2 = getIntersectionType(constraints); - if (source2.flags & 131072 /* Never */) { - return 0 /* False */; - } - if (!(source2.flags & 2097152 /* Intersection */)) { - return isRelatedTo( - source2, - target2, - 1 /* Source */, - /*reportErrors*/ - false - ) || isRelatedTo( - target2, - source2, - 1 /* Source */, - /*reportErrors*/ - false - ); - } - } - } - return someTypeRelatedToType( - source2, - target2, - /*reportErrors*/ - false, - 1 /* Source */ - ); - } - function eachTypeRelatedToSomeType(source2, target2) { - let result2 = -1 /* True */; - const sourceTypes = source2.types; - for (const sourceType of sourceTypes) { - const related = typeRelatedToSomeType( - sourceType, - target2, - /*reportErrors*/ - false - ); - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - return result2; - } - function typeRelatedToSomeType(source2, target2, reportErrors2) { - const targetTypes = target2.types; - if (target2.flags & 1048576 /* Union */) { - if (containsType(targetTypes, source2)) { - return -1 /* True */; - } - if (relation !== comparableRelation && getObjectFlags(target2) & 32768 /* PrimitiveUnion */ && !(source2.flags & 1024 /* EnumLiteral */) && (source2.flags & (128 /* StringLiteral */ | 512 /* BooleanLiteral */ | 2048 /* BigIntLiteral */) || (relation === subtypeRelation || relation === strictSubtypeRelation) && source2.flags & 256 /* NumberLiteral */)) { - const alternateForm = source2 === source2.regularType ? source2.freshType : source2.regularType; - const primitive = source2.flags & 128 /* StringLiteral */ ? stringType : source2.flags & 256 /* NumberLiteral */ ? numberType : source2.flags & 2048 /* BigIntLiteral */ ? bigintType : void 0; - return primitive && containsType(targetTypes, primitive) || alternateForm && containsType(targetTypes, alternateForm) ? -1 /* True */ : 0 /* False */; - } - const match = getMatchingUnionConstituentForType(target2, source2); - if (match) { - const related = isRelatedTo( - source2, - match, - 2 /* Target */, - /*reportErrors*/ - false - ); - if (related) { - return related; - } - } - } - for (const type of targetTypes) { - const related = isRelatedTo( - source2, - type, - 2 /* Target */, - /*reportErrors*/ - false - ); - if (related) { - return related; - } - } - if (reportErrors2) { - const bestMatchingType = getBestMatchingType(source2, target2, isRelatedTo); - if (bestMatchingType) { - isRelatedTo( - source2, - bestMatchingType, - 2 /* Target */, - /*reportErrors*/ - true - ); - } - } - return 0 /* False */; - } - function typeRelatedToEachType(source2, target2, reportErrors2, intersectionState) { - let result2 = -1 /* True */; - const targetTypes = target2.types; - for (const targetType of targetTypes) { - const related = isRelatedTo( - source2, - targetType, - 2 /* Target */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - return result2; - } - function someTypeRelatedToType(source2, target2, reportErrors2, intersectionState) { - const sourceTypes = source2.types; - if (source2.flags & 1048576 /* Union */ && containsType(sourceTypes, target2)) { - return -1 /* True */; - } - const len = sourceTypes.length; - for (let i = 0; i < len; i++) { - const related = isRelatedTo( - sourceTypes[i], - target2, - 1 /* Source */, - reportErrors2 && i === len - 1, - /*headMessage*/ - void 0, - intersectionState - ); - if (related) { - return related; - } - } - return 0 /* False */; - } - function getUndefinedStrippedTargetIfNeeded(source2, target2) { - if (source2.flags & 1048576 /* Union */ && target2.flags & 1048576 /* Union */ && !(source2.types[0].flags & 32768 /* Undefined */) && target2.types[0].flags & 32768 /* Undefined */) { - return extractTypesOfKind(target2, ~32768 /* Undefined */); - } - return target2; - } - function eachTypeRelatedToType(source2, target2, reportErrors2, intersectionState) { - let result2 = -1 /* True */; - const sourceTypes = source2.types; - const undefinedStrippedTarget = getUndefinedStrippedTargetIfNeeded(source2, target2); - for (let i = 0; i < sourceTypes.length; i++) { - const sourceType = sourceTypes[i]; - if (undefinedStrippedTarget.flags & 1048576 /* Union */ && sourceTypes.length >= undefinedStrippedTarget.types.length && sourceTypes.length % undefinedStrippedTarget.types.length === 0) { - const related2 = isRelatedTo( - sourceType, - undefinedStrippedTarget.types[i % undefinedStrippedTarget.types.length], - 3 /* Both */, - /*reportErrors*/ - false, - /*headMessage*/ - void 0, - intersectionState - ); - if (related2) { - result2 &= related2; - continue; - } - } - const related = isRelatedTo( - sourceType, - target2, - 1 /* Source */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - return result2; - } - function typeArgumentsRelatedTo(sources = emptyArray, targets = emptyArray, variances = emptyArray, reportErrors2, intersectionState) { - if (sources.length !== targets.length && relation === identityRelation) { - return 0 /* False */; - } - const length2 = sources.length <= targets.length ? sources.length : targets.length; - let result2 = -1 /* True */; - for (let i = 0; i < length2; i++) { - const varianceFlags = i < variances.length ? variances[i] : 1 /* Covariant */; - const variance = varianceFlags & 7 /* VarianceMask */; - if (variance !== 4 /* Independent */) { - const s = sources[i]; - const t = targets[i]; - let related = -1 /* True */; - if (varianceFlags & 8 /* Unmeasurable */) { - related = relation === identityRelation ? isRelatedTo( - s, - t, - 3 /* Both */, - /*reportErrors*/ - false - ) : compareTypesIdentical(s, t); - } else if (variance === 1 /* Covariant */) { - related = isRelatedTo( - s, - t, - 3 /* Both */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - } else if (variance === 2 /* Contravariant */) { - related = isRelatedTo( - t, - s, - 3 /* Both */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - } else if (variance === 3 /* Bivariant */) { - related = isRelatedTo( - t, - s, - 3 /* Both */, - /*reportErrors*/ - false - ); - if (!related) { - related = isRelatedTo( - s, - t, - 3 /* Both */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - } - } else { - related = isRelatedTo( - s, - t, - 3 /* Both */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - if (related) { - related &= isRelatedTo( - t, - s, - 3 /* Both */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - } - } - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - } - return result2; - } - function recursiveTypeRelatedTo(source2, target2, reportErrors2, intersectionState, recursionFlags) { - var _a2, _b, _c; - if (overflow) { - return 0 /* False */; - } - const id = getRelationKey( - source2, - target2, - intersectionState, - relation, - /*ignoreConstraints*/ - false - ); - const entry = relation.get(id); - if (entry !== void 0) { - if (reportErrors2 && entry & 2 /* Failed */ && !(entry & 4 /* Reported */)) { - } else { - if (outofbandVarianceMarkerHandler) { - const saved = entry & 24 /* ReportsMask */; - if (saved & 8 /* ReportsUnmeasurable */) { - instantiateType(source2, reportUnmeasurableMapper); - } - if (saved & 16 /* ReportsUnreliable */) { - instantiateType(source2, reportUnreliableMapper); - } - } - return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */; - } - } - if (!maybeKeys) { - maybeKeys = []; - maybeKeysSet = /* @__PURE__ */ new Set(); - sourceStack = []; - targetStack = []; - } else { - if (maybeKeysSet.has(id)) { - return 3 /* Maybe */; - } - const broadestEquivalentId = id.startsWith("*") ? getRelationKey( - source2, - target2, - intersectionState, - relation, - /*ignoreConstraints*/ - true - ) : void 0; - if (broadestEquivalentId && maybeKeysSet.has(broadestEquivalentId)) { - return 3 /* Maybe */; - } - if (sourceDepth === 100 || targetDepth === 100) { - overflow = true; - return 0 /* False */; - } - } - const maybeStart = maybeCount; - maybeKeys[maybeCount] = id; - maybeKeysSet.add(id); - maybeCount++; - const saveExpandingFlags = expandingFlags; - if (recursionFlags & 1 /* Source */) { - sourceStack[sourceDepth] = source2; - sourceDepth++; - if (!(expandingFlags & 1 /* Source */) && isDeeplyNestedType(source2, sourceStack, sourceDepth)) - expandingFlags |= 1 /* Source */; - } - if (recursionFlags & 2 /* Target */) { - targetStack[targetDepth] = target2; - targetDepth++; - if (!(expandingFlags & 2 /* Target */) && isDeeplyNestedType(target2, targetStack, targetDepth)) - expandingFlags |= 2 /* Target */; - } - let originalHandler; - let propagatingVarianceFlags = 0; - if (outofbandVarianceMarkerHandler) { - originalHandler = outofbandVarianceMarkerHandler; - outofbandVarianceMarkerHandler = (onlyUnreliable) => { - propagatingVarianceFlags |= onlyUnreliable ? 16 /* ReportsUnreliable */ : 8 /* ReportsUnmeasurable */; - return originalHandler(onlyUnreliable); - }; - } - let result2; - if (expandingFlags === 3 /* Both */) { - (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, "recursiveTypeRelatedTo_DepthLimit", { - sourceId: source2.id, - sourceIdStack: sourceStack.map((t) => t.id), - targetId: target2.id, - targetIdStack: targetStack.map((t) => t.id), - depth: sourceDepth, - targetDepth - }); - result2 = 3 /* Maybe */; - } else { - (_b = tracing) == null ? void 0 : _b.push(tracing.Phase.CheckTypes, "structuredTypeRelatedTo", { sourceId: source2.id, targetId: target2.id }); - result2 = structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState); - (_c = tracing) == null ? void 0 : _c.pop(); - } - if (outofbandVarianceMarkerHandler) { - outofbandVarianceMarkerHandler = originalHandler; - } - if (recursionFlags & 1 /* Source */) { - sourceDepth--; - } - if (recursionFlags & 2 /* Target */) { - targetDepth--; - } - expandingFlags = saveExpandingFlags; - if (result2) { - if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) { - if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) { - resetMaybeStack( - /*markAllAsSucceeded*/ - true - ); - } else { - resetMaybeStack( - /*markAllAsSucceeded*/ - false - ); - } - } - } else { - relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags); - resetMaybeStack( - /*markAllAsSucceeded*/ - false - ); - } - return result2; - function resetMaybeStack(markAllAsSucceeded) { - for (let i = maybeStart; i < maybeCount; i++) { - maybeKeysSet.delete(maybeKeys[i]); - if (markAllAsSucceeded) { - relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); - } - } - maybeCount = maybeStart; - } - } - function structuredTypeRelatedTo(source2, target2, reportErrors2, intersectionState) { - const saveErrorInfo = captureErrorCalculationState(); - let result2 = structuredTypeRelatedToWorker(source2, target2, reportErrors2, intersectionState, saveErrorInfo); - if (relation !== identityRelation) { - if (!result2 && (source2.flags & 2097152 /* Intersection */ || source2.flags & 262144 /* TypeParameter */ && target2.flags & 1048576 /* Union */)) { - const constraint = getEffectiveConstraintOfIntersection(source2.flags & 2097152 /* Intersection */ ? source2.types : [source2], !!(target2.flags & 1048576 /* Union */)); - if (constraint && everyType(constraint, (c) => c !== source2)) { - result2 = isRelatedTo( - constraint, - target2, - 1 /* Source */, - /*reportErrors*/ - false, - /*headMessage*/ - void 0, - intersectionState - ); - } - } - if (result2 && !(intersectionState & 2 /* Target */) && target2.flags & 2097152 /* Intersection */ && !isGenericObjectType(target2) && source2.flags & (524288 /* Object */ | 2097152 /* Intersection */)) { - result2 &= propertiesRelatedTo( - source2, - target2, - reportErrors2, - /*excludedProperties*/ - void 0, - /*optionalsOnly*/ - false, - 0 /* None */ - ); - if (result2 && isObjectLiteralType2(source2) && getObjectFlags(source2) & 8192 /* FreshLiteral */) { - result2 &= indexSignaturesRelatedTo( - source2, - target2, - /*sourceIsPrimitive*/ - false, - reportErrors2, - 0 /* None */ - ); - } - } else if (result2 && isNonGenericObjectType(target2) && !isArrayOrTupleType(target2) && source2.flags & 2097152 /* Intersection */ && getApparentType(source2).flags & 3670016 /* StructuredType */ && !some(source2.types, (t) => t === target2 || !!(getObjectFlags(t) & 262144 /* NonInferrableType */))) { - result2 &= propertiesRelatedTo( - source2, - target2, - reportErrors2, - /*excludedProperties*/ - void 0, - /*optionalsOnly*/ - true, - intersectionState - ); - } - } - if (result2) { - resetErrorInfo(saveErrorInfo); - } - return result2; - } - function structuredTypeRelatedToWorker(source2, target2, reportErrors2, intersectionState, saveErrorInfo) { - let result2; - let originalErrorInfo; - let varianceCheckFailed = false; - let sourceFlags = source2.flags; - const targetFlags = target2.flags; - if (relation === identityRelation) { - if (sourceFlags & 3145728 /* UnionOrIntersection */) { - let result3 = eachTypeRelatedToSomeType(source2, target2); - if (result3) { - result3 &= eachTypeRelatedToSomeType(target2, source2); - } - return result3; - } - if (sourceFlags & 4194304 /* Index */) { - return isRelatedTo( - source2.type, - target2.type, - 3 /* Both */, - /*reportErrors*/ - false - ); - } - if (sourceFlags & 8388608 /* IndexedAccess */) { - if (result2 = isRelatedTo( - source2.objectType, - target2.objectType, - 3 /* Both */, - /*reportErrors*/ - false - )) { - if (result2 &= isRelatedTo( - source2.indexType, - target2.indexType, - 3 /* Both */, - /*reportErrors*/ - false - )) { - return result2; - } - } - } - if (sourceFlags & 16777216 /* Conditional */) { - if (source2.root.isDistributive === target2.root.isDistributive) { - if (result2 = isRelatedTo( - source2.checkType, - target2.checkType, - 3 /* Both */, - /*reportErrors*/ - false - )) { - if (result2 &= isRelatedTo( - source2.extendsType, - target2.extendsType, - 3 /* Both */, - /*reportErrors*/ - false - )) { - if (result2 &= isRelatedTo( - getTrueTypeFromConditionalType(source2), - getTrueTypeFromConditionalType(target2), - 3 /* Both */, - /*reportErrors*/ - false - )) { - if (result2 &= isRelatedTo( - getFalseTypeFromConditionalType(source2), - getFalseTypeFromConditionalType(target2), - 3 /* Both */, - /*reportErrors*/ - false - )) { - return result2; - } - } - } - } - } - } - if (sourceFlags & 33554432 /* Substitution */) { - if (result2 = isRelatedTo( - source2.baseType, - target2.baseType, - 3 /* Both */, - /*reportErrors*/ - false - )) { - if (result2 &= isRelatedTo( - source2.constraint, - target2.constraint, - 3 /* Both */, - /*reportErrors*/ - false - )) { - return result2; - } - } - } - if (!(sourceFlags & 524288 /* Object */)) { - return 0 /* False */; - } - } else if (sourceFlags & 3145728 /* UnionOrIntersection */ || targetFlags & 3145728 /* UnionOrIntersection */) { - if (result2 = unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState)) { - return result2; - } - if (!(sourceFlags & 465829888 /* Instantiable */ || sourceFlags & 524288 /* Object */ && targetFlags & 1048576 /* Union */ || sourceFlags & 2097152 /* Intersection */ && targetFlags & (524288 /* Object */ | 1048576 /* Union */ | 465829888 /* Instantiable */))) { - return 0 /* False */; - } - } - if (sourceFlags & (524288 /* Object */ | 16777216 /* Conditional */) && source2.aliasSymbol && source2.aliasTypeArguments && source2.aliasSymbol === target2.aliasSymbol && !(isMarkerType(source2) || isMarkerType(target2))) { - const variances = getAliasVariances(source2.aliasSymbol); - if (variances === emptyArray) { - return 1 /* Unknown */; - } - const params = getSymbolLinks(source2.aliasSymbol).typeParameters; - const minParams = getMinTypeArgumentCount(params); - const sourceTypes = fillMissingTypeArguments(source2.aliasTypeArguments, params, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration)); - const targetTypes = fillMissingTypeArguments(target2.aliasTypeArguments, params, minParams, isInJSFile(source2.aliasSymbol.valueDeclaration)); - const varianceResult = relateVariances(sourceTypes, targetTypes, variances, intersectionState); - if (varianceResult !== void 0) { - return varianceResult; - } - } - if (isSingleElementGenericTupleType(source2) && !source2.target.readonly && (result2 = isRelatedTo(getTypeArguments(source2)[0], target2, 1 /* Source */)) || isSingleElementGenericTupleType(target2) && (target2.target.readonly || isMutableArrayOrTuple(getBaseConstraintOfType(source2) || source2)) && (result2 = isRelatedTo(source2, getTypeArguments(target2)[0], 2 /* Target */))) { - return result2; - } - if (targetFlags & 262144 /* TypeParameter */) { - if (getObjectFlags(source2) & 32 /* Mapped */ && !source2.declaration.nameType && isRelatedTo(getIndexType(target2), getConstraintTypeFromMappedType(source2), 3 /* Both */)) { - if (!(getMappedTypeModifiers(source2) & 4 /* IncludeOptional */)) { - const templateType = getTemplateTypeFromMappedType(source2); - const indexedAccessType = getIndexedAccessType(target2, getTypeParameterFromMappedType(source2)); - if (result2 = isRelatedTo(templateType, indexedAccessType, 3 /* Both */, reportErrors2)) { - return result2; - } - } - } - if (relation === comparableRelation && sourceFlags & 262144 /* TypeParameter */) { - let constraint = getConstraintOfTypeParameter(source2); - if (constraint && hasNonCircularBaseConstraint(source2)) { - while (constraint && someType(constraint, (c) => !!(c.flags & 262144 /* TypeParameter */))) { - if (result2 = isRelatedTo( - constraint, - target2, - 1 /* Source */, - /*reportErrors*/ - false - )) { - return result2; - } - constraint = getConstraintOfTypeParameter(constraint); - } - } - return 0 /* False */; - } - } else if (targetFlags & 4194304 /* Index */) { - const targetType = target2.type; - if (sourceFlags & 4194304 /* Index */) { - if (result2 = isRelatedTo( - targetType, - source2.type, - 3 /* Both */, - /*reportErrors*/ - false - )) { - return result2; - } - } - if (isTupleType(targetType)) { - if (result2 = isRelatedTo(source2, getKnownKeysOfTupleType(targetType), 2 /* Target */, reportErrors2)) { - return result2; - } - } else { - const constraint = getSimplifiedTypeOrConstraint(targetType); - if (constraint) { - if (isRelatedTo(source2, getIndexType(constraint, target2.indexFlags | 4 /* NoReducibleCheck */), 2 /* Target */, reportErrors2) === -1 /* True */) { - return -1 /* True */; - } - } else if (isGenericMappedType(targetType)) { - const nameType = getNameTypeFromMappedType(targetType); - const constraintType = getConstraintTypeFromMappedType(targetType); - let targetKeys; - if (nameType && isMappedTypeWithKeyofConstraintDeclaration(targetType)) { - const modifiersType = getApparentType(getModifiersTypeFromMappedType(targetType)); - const mappedKeys = []; - forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType( - modifiersType, - 8576 /* StringOrNumberLiteralOrUnique */, - /*stringsOnly*/ - false, - (t) => void mappedKeys.push(instantiateType(nameType, appendTypeMapping(targetType.mapper, getTypeParameterFromMappedType(targetType), t))) - ); - targetKeys = getUnionType([...mappedKeys, nameType]); - } else { - targetKeys = nameType || constraintType; - } - if (isRelatedTo(source2, targetKeys, 2 /* Target */, reportErrors2) === -1 /* True */) { - return -1 /* True */; - } - } - } - } else if (targetFlags & 8388608 /* IndexedAccess */) { - if (sourceFlags & 8388608 /* IndexedAccess */) { - if (result2 = isRelatedTo(source2.objectType, target2.objectType, 3 /* Both */, reportErrors2)) { - result2 &= isRelatedTo(source2.indexType, target2.indexType, 3 /* Both */, reportErrors2); - } - if (result2) { - return result2; - } - if (reportErrors2) { - originalErrorInfo = errorInfo; - } - } - if (relation === assignableRelation || relation === comparableRelation) { - const objectType = target2.objectType; - const indexType = target2.indexType; - const baseObjectType = getBaseConstraintOfType(objectType) || objectType; - const baseIndexType = getBaseConstraintOfType(indexType) || indexType; - if (!isGenericObjectType(baseObjectType) && !isGenericIndexType(baseIndexType)) { - const accessFlags = 4 /* Writing */ | (baseObjectType !== objectType ? 2 /* NoIndexSignatures */ : 0); - const constraint = getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType, accessFlags); - if (constraint) { - if (reportErrors2 && originalErrorInfo) { - resetErrorInfo(saveErrorInfo); - } - if (result2 = isRelatedTo( - source2, - constraint, - 2 /* Target */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - )) { - return result2; - } - if (reportErrors2 && originalErrorInfo && errorInfo) { - errorInfo = countMessageChainBreadth([originalErrorInfo]) <= countMessageChainBreadth([errorInfo]) ? originalErrorInfo : errorInfo; - } - } - } - } - if (reportErrors2) { - originalErrorInfo = void 0; - } - } else if (isGenericMappedType(target2) && relation !== identityRelation) { - const keysRemapped = !!target2.declaration.nameType; - const templateType = getTemplateTypeFromMappedType(target2); - const modifiers = getMappedTypeModifiers(target2); - if (!(modifiers & 8 /* ExcludeOptional */)) { - if (!keysRemapped && templateType.flags & 8388608 /* IndexedAccess */ && templateType.objectType === source2 && templateType.indexType === getTypeParameterFromMappedType(target2)) { - return -1 /* True */; - } - if (!isGenericMappedType(source2)) { - const targetKeys = keysRemapped ? getNameTypeFromMappedType(target2) : getConstraintTypeFromMappedType(target2); - const sourceKeys = getIndexType(source2, 2 /* NoIndexSignatures */); - const includeOptional = modifiers & 4 /* IncludeOptional */; - const filteredByApplicability = includeOptional ? intersectTypes(targetKeys, sourceKeys) : void 0; - if (includeOptional ? !(filteredByApplicability.flags & 131072 /* Never */) : isRelatedTo(targetKeys, sourceKeys, 3 /* Both */)) { - const templateType2 = getTemplateTypeFromMappedType(target2); - const typeParameter = getTypeParameterFromMappedType(target2); - const nonNullComponent = extractTypesOfKind(templateType2, ~98304 /* Nullable */); - if (!keysRemapped && nonNullComponent.flags & 8388608 /* IndexedAccess */ && nonNullComponent.indexType === typeParameter) { - if (result2 = isRelatedTo(source2, nonNullComponent.objectType, 2 /* Target */, reportErrors2)) { - return result2; - } - } else { - const indexingType = keysRemapped ? filteredByApplicability || targetKeys : filteredByApplicability ? getIntersectionType([filteredByApplicability, typeParameter]) : typeParameter; - const indexedAccessType = getIndexedAccessType(source2, indexingType); - if (result2 = isRelatedTo(indexedAccessType, templateType2, 3 /* Both */, reportErrors2)) { - return result2; - } - } - } - originalErrorInfo = errorInfo; - resetErrorInfo(saveErrorInfo); - } - } - } else if (targetFlags & 16777216 /* Conditional */) { - if (isDeeplyNestedType(target2, targetStack, targetDepth, 10)) { - return 3 /* Maybe */; - } - const c = target2; - if (!c.root.inferTypeParameters && !isDistributionDependent(c.root) && !(source2.flags & 16777216 /* Conditional */ && source2.root === c.root)) { - const skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType)); - const skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType)); - if (result2 = skipTrue ? -1 /* True */ : isRelatedTo( - source2, - getTrueTypeFromConditionalType(c), - 2 /* Target */, - /*reportErrors*/ - false, - /*headMessage*/ - void 0, - intersectionState - )) { - result2 &= skipFalse ? -1 /* True */ : isRelatedTo( - source2, - getFalseTypeFromConditionalType(c), - 2 /* Target */, - /*reportErrors*/ - false, - /*headMessage*/ - void 0, - intersectionState - ); - if (result2) { - return result2; - } - } - } - } else if (targetFlags & 134217728 /* TemplateLiteral */) { - if (sourceFlags & 134217728 /* TemplateLiteral */) { - if (relation === comparableRelation) { - return templateLiteralTypesDefinitelyUnrelated(source2, target2) ? 0 /* False */ : -1 /* True */; - } - instantiateType(source2, reportUnreliableMapper); - } - if (isTypeMatchedByTemplateLiteralType(source2, target2)) { - return -1 /* True */; - } - } else if (target2.flags & 268435456 /* StringMapping */) { - if (!(source2.flags & 268435456 /* StringMapping */)) { - if (isMemberOfStringMapping(source2, target2)) { - return -1 /* True */; - } - } - } - if (sourceFlags & 8650752 /* TypeVariable */) { - if (!(sourceFlags & 8388608 /* IndexedAccess */ && targetFlags & 8388608 /* IndexedAccess */)) { - const constraint = getConstraintOfType(source2) || unknownType; - if (result2 = isRelatedTo( - constraint, - target2, - 1 /* Source */, - /*reportErrors*/ - false, - /*headMessage*/ - void 0, - intersectionState - )) { - return result2; - } else if (result2 = isRelatedTo( - getTypeWithThisArgument(constraint, source2), - target2, - 1 /* Source */, - reportErrors2 && constraint !== unknownType && !(targetFlags & sourceFlags & 262144 /* TypeParameter */), - /*headMessage*/ - void 0, - intersectionState - )) { - return result2; - } - if (isMappedTypeGenericIndexedAccess(source2)) { - const indexConstraint = getConstraintOfType(source2.indexType); - if (indexConstraint) { - if (result2 = isRelatedTo(getIndexedAccessType(source2.objectType, indexConstraint), target2, 1 /* Source */, reportErrors2)) { - return result2; - } - } - } - } - } else if (sourceFlags & 4194304 /* Index */) { - if (result2 = isRelatedTo(keyofConstraintType, target2, 1 /* Source */, reportErrors2)) { - return result2; - } - } else if (sourceFlags & 134217728 /* TemplateLiteral */ && !(targetFlags & 524288 /* Object */)) { - if (!(targetFlags & 134217728 /* TemplateLiteral */)) { - const constraint = getBaseConstraintOfType(source2); - if (constraint && constraint !== source2 && (result2 = isRelatedTo(constraint, target2, 1 /* Source */, reportErrors2))) { - return result2; - } - } - } else if (sourceFlags & 268435456 /* StringMapping */) { - if (targetFlags & 268435456 /* StringMapping */) { - if (source2.symbol !== target2.symbol) { - return 0 /* False */; - } - if (result2 = isRelatedTo(source2.type, target2.type, 3 /* Both */, reportErrors2)) { - return result2; - } - } else { - const constraint = getBaseConstraintOfType(source2); - if (constraint && (result2 = isRelatedTo(constraint, target2, 1 /* Source */, reportErrors2))) { - return result2; - } - } - } else if (sourceFlags & 16777216 /* Conditional */) { - if (isDeeplyNestedType(source2, sourceStack, sourceDepth, 10)) { - return 3 /* Maybe */; - } - if (targetFlags & 16777216 /* Conditional */) { - const sourceParams = source2.root.inferTypeParameters; - let sourceExtends = source2.extendsType; - let mapper; - if (sourceParams) { - const ctx = createInferenceContext( - sourceParams, - /*signature*/ - void 0, - 0 /* None */, - isRelatedToWorker - ); - inferTypes(ctx.inferences, target2.extendsType, sourceExtends, 512 /* NoConstraints */ | 1024 /* AlwaysStrict */); - sourceExtends = instantiateType(sourceExtends, ctx.mapper); - mapper = ctx.mapper; - } - if (isTypeIdenticalTo(sourceExtends, target2.extendsType) && (isRelatedTo(source2.checkType, target2.checkType, 3 /* Both */) || isRelatedTo(target2.checkType, source2.checkType, 3 /* Both */))) { - if (result2 = isRelatedTo(instantiateType(getTrueTypeFromConditionalType(source2), mapper), getTrueTypeFromConditionalType(target2), 3 /* Both */, reportErrors2)) { - result2 &= isRelatedTo(getFalseTypeFromConditionalType(source2), getFalseTypeFromConditionalType(target2), 3 /* Both */, reportErrors2); - } - if (result2) { - return result2; - } - } - } else { - const distributiveConstraint = hasNonCircularBaseConstraint(source2) ? getConstraintOfDistributiveConditionalType(source2) : void 0; - if (distributiveConstraint) { - if (result2 = isRelatedTo(distributiveConstraint, target2, 1 /* Source */, reportErrors2)) { - return result2; - } - } - } - const defaultConstraint = getDefaultConstraintOfConditionalType(source2); - if (defaultConstraint) { - if (result2 = isRelatedTo(defaultConstraint, target2, 1 /* Source */, reportErrors2)) { - return result2; - } - } - } else { - if (relation !== subtypeRelation && relation !== strictSubtypeRelation && isPartialMappedType(target2) && isEmptyObjectType(source2)) { - return -1 /* True */; - } - if (isGenericMappedType(target2)) { - if (isGenericMappedType(source2)) { - if (result2 = mappedTypeRelatedTo(source2, target2, reportErrors2)) { - return result2; - } - } - return 0 /* False */; - } - const sourceIsPrimitive = !!(sourceFlags & 402784252 /* Primitive */); - if (relation !== identityRelation) { - source2 = getApparentType(source2); - sourceFlags = source2.flags; - } else if (isGenericMappedType(source2)) { - return 0 /* False */; - } - if (getObjectFlags(source2) & 4 /* Reference */ && getObjectFlags(target2) & 4 /* Reference */ && source2.target === target2.target && !isTupleType(source2) && !(isMarkerType(source2) || isMarkerType(target2))) { - if (isEmptyArrayLiteralType(source2)) { - return -1 /* True */; - } - const variances = getVariances(source2.target); - if (variances === emptyArray) { - return 1 /* Unknown */; - } - const varianceResult = relateVariances(getTypeArguments(source2), getTypeArguments(target2), variances, intersectionState); - if (varianceResult !== void 0) { - return varianceResult; - } - } else if (isReadonlyArrayType(target2) ? everyType(source2, isArrayOrTupleType) : isArrayType(target2) && everyType(source2, (t) => isTupleType(t) && !t.target.readonly)) { - if (relation !== identityRelation) { - return isRelatedTo(getIndexTypeOfType(source2, numberType) || anyType, getIndexTypeOfType(target2, numberType) || anyType, 3 /* Both */, reportErrors2); - } else { - return 0 /* False */; - } - } else if (isGenericTupleType(source2) && isTupleType(target2) && !isGenericTupleType(target2)) { - const constraint = getBaseConstraintOrType(source2); - if (constraint !== source2) { - return isRelatedTo(constraint, target2, 1 /* Source */, reportErrors2); - } - } else if ((relation === subtypeRelation || relation === strictSubtypeRelation) && isEmptyObjectType(target2) && getObjectFlags(target2) & 8192 /* FreshLiteral */ && !isEmptyObjectType(source2)) { - return 0 /* False */; - } - if (sourceFlags & (524288 /* Object */ | 2097152 /* Intersection */) && targetFlags & 524288 /* Object */) { - const reportStructuralErrors = reportErrors2 && errorInfo === saveErrorInfo.errorInfo && !sourceIsPrimitive; - result2 = propertiesRelatedTo( - source2, - target2, - reportStructuralErrors, - /*excludedProperties*/ - void 0, - /*optionalsOnly*/ - false, - intersectionState - ); - if (result2) { - result2 &= signaturesRelatedTo(source2, target2, 0 /* Call */, reportStructuralErrors, intersectionState); - if (result2) { - result2 &= signaturesRelatedTo(source2, target2, 1 /* Construct */, reportStructuralErrors, intersectionState); - if (result2) { - result2 &= indexSignaturesRelatedTo(source2, target2, sourceIsPrimitive, reportStructuralErrors, intersectionState); - } - } - } - if (varianceCheckFailed && result2) { - errorInfo = originalErrorInfo || errorInfo || saveErrorInfo.errorInfo; - } else if (result2) { - return result2; - } - } - if (sourceFlags & (524288 /* Object */ | 2097152 /* Intersection */) && targetFlags & 1048576 /* Union */) { - const objectOnlyTarget = extractTypesOfKind(target2, 524288 /* Object */ | 2097152 /* Intersection */ | 33554432 /* Substitution */); - if (objectOnlyTarget.flags & 1048576 /* Union */) { - const result3 = typeRelatedToDiscriminatedType(source2, objectOnlyTarget); - if (result3) { - return result3; - } - } - } - } - return 0 /* False */; - function countMessageChainBreadth(info) { - if (!info) - return 0; - return reduceLeft(info, (value, chain) => value + 1 + countMessageChainBreadth(chain.next), 0); - } - function relateVariances(sourceTypeArguments, targetTypeArguments, variances, intersectionState2) { - if (result2 = typeArgumentsRelatedTo(sourceTypeArguments, targetTypeArguments, variances, reportErrors2, intersectionState2)) { - return result2; - } - if (some(variances, (v) => !!(v & 24 /* AllowsStructuralFallback */))) { - originalErrorInfo = void 0; - resetErrorInfo(saveErrorInfo); - return void 0; - } - const allowStructuralFallback = targetTypeArguments && hasCovariantVoidArgument(targetTypeArguments, variances); - varianceCheckFailed = !allowStructuralFallback; - if (variances !== emptyArray && !allowStructuralFallback) { - if (varianceCheckFailed && !(reportErrors2 && some(variances, (v) => (v & 7 /* VarianceMask */) === 0 /* Invariant */))) { - return 0 /* False */; - } - originalErrorInfo = errorInfo; - resetErrorInfo(saveErrorInfo); - } - } - } - function mappedTypeRelatedTo(source2, target2, reportErrors2) { - const modifiersRelated = relation === comparableRelation || (relation === identityRelation ? getMappedTypeModifiers(source2) === getMappedTypeModifiers(target2) : getCombinedMappedTypeOptionality(source2) <= getCombinedMappedTypeOptionality(target2)); - if (modifiersRelated) { - let result2; - const targetConstraint = getConstraintTypeFromMappedType(target2); - const sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source2), getCombinedMappedTypeOptionality(source2) < 0 ? reportUnmeasurableMapper : reportUnreliableMapper); - if (result2 = isRelatedTo(targetConstraint, sourceConstraint, 3 /* Both */, reportErrors2)) { - const mapper = createTypeMapper([getTypeParameterFromMappedType(source2)], [getTypeParameterFromMappedType(target2)]); - if (instantiateType(getNameTypeFromMappedType(source2), mapper) === instantiateType(getNameTypeFromMappedType(target2), mapper)) { - return result2 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source2), mapper), getTemplateTypeFromMappedType(target2), 3 /* Both */, reportErrors2); - } - } - } - return 0 /* False */; - } - function typeRelatedToDiscriminatedType(source2, target2) { - var _a2; - const sourceProperties = getPropertiesOfType(source2); - const sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target2); - if (!sourcePropertiesFiltered) - return 0 /* False */; - let numCombinations = 1; - for (const sourceProperty of sourcePropertiesFiltered) { - numCombinations *= countTypes(getNonMissingTypeOfSymbol(sourceProperty)); - if (numCombinations > 25) { - (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, "typeRelatedToDiscriminatedType_DepthLimit", { sourceId: source2.id, targetId: target2.id, numCombinations }); - return 0 /* False */; - } - } - const sourceDiscriminantTypes = new Array(sourcePropertiesFiltered.length); - const excludedProperties = /* @__PURE__ */ new Set(); - for (let i = 0; i < sourcePropertiesFiltered.length; i++) { - const sourceProperty = sourcePropertiesFiltered[i]; - const sourcePropertyType = getNonMissingTypeOfSymbol(sourceProperty); - sourceDiscriminantTypes[i] = sourcePropertyType.flags & 1048576 /* Union */ ? sourcePropertyType.types : [sourcePropertyType]; - excludedProperties.add(sourceProperty.escapedName); - } - const discriminantCombinations = cartesianProduct(sourceDiscriminantTypes); - const matchingTypes = []; - for (const combination of discriminantCombinations) { - let hasMatch = false; - outer: - for (const type of target2.types) { - for (let i = 0; i < sourcePropertiesFiltered.length; i++) { - const sourceProperty = sourcePropertiesFiltered[i]; - const targetProperty = getPropertyOfType(type, sourceProperty.escapedName); - if (!targetProperty) - continue outer; - if (sourceProperty === targetProperty) - continue; - const related = propertyRelatedTo( - source2, - target2, - sourceProperty, - targetProperty, - (_) => combination[i], - /*reportErrors*/ - false, - 0 /* None */, - /*skipOptional*/ - strictNullChecks || relation === comparableRelation - ); - if (!related) { - continue outer; - } - } - pushIfUnique(matchingTypes, type, equateValues); - hasMatch = true; - } - if (!hasMatch) { - return 0 /* False */; - } - } - let result2 = -1 /* True */; - for (const type of matchingTypes) { - result2 &= propertiesRelatedTo( - source2, - type, - /*reportErrors*/ - false, - excludedProperties, - /*optionalsOnly*/ - false, - 0 /* None */ - ); - if (result2) { - result2 &= signaturesRelatedTo( - source2, - type, - 0 /* Call */, - /*reportErrors*/ - false, - 0 /* None */ - ); - if (result2) { - result2 &= signaturesRelatedTo( - source2, - type, - 1 /* Construct */, - /*reportErrors*/ - false, - 0 /* None */ - ); - if (result2 && !(isTupleType(source2) && isTupleType(type))) { - result2 &= indexSignaturesRelatedTo( - source2, - type, - /*sourceIsPrimitive*/ - false, - /*reportErrors*/ - false, - 0 /* None */ - ); - } - } - } - if (!result2) { - return result2; - } - } - return result2; - } - function excludeProperties(properties, excludedProperties) { - if (!excludedProperties || properties.length === 0) - return properties; - let result2; - for (let i = 0; i < properties.length; i++) { - if (!excludedProperties.has(properties[i].escapedName)) { - if (result2) { - result2.push(properties[i]); - } - } else if (!result2) { - result2 = properties.slice(0, i); - } - } - return result2 || properties; - } - function isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState) { - const targetIsOptional = strictNullChecks && !!(getCheckFlags(targetProp) & 48 /* Partial */); - const effectiveTarget = addOptionality( - getNonMissingTypeOfSymbol(targetProp), - /*isProperty*/ - false, - targetIsOptional - ); - const effectiveSource = getTypeOfSourceProperty(sourceProp); - return isRelatedTo( - effectiveSource, - effectiveTarget, - 3 /* Both */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - } - function propertyRelatedTo(source2, target2, sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState, skipOptional) { - const sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp); - const targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp); - if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) { - if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { - if (reportErrors2) { - if (sourcePropFlags & 8 /* Private */ && targetPropFlags & 8 /* Private */) { - reportError(Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp)); - } else { - reportError( - Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, - symbolToString(targetProp), - typeToString(sourcePropFlags & 8 /* Private */ ? source2 : target2), - typeToString(sourcePropFlags & 8 /* Private */ ? target2 : source2) - ); - } - } - return 0 /* False */; - } - } else if (targetPropFlags & 16 /* Protected */) { - if (!isValidOverrideOf(sourceProp, targetProp)) { - if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, - symbolToString(targetProp), - typeToString(getDeclaringClass(sourceProp) || source2), - typeToString(getDeclaringClass(targetProp) || target2) - ); - } - return 0 /* False */; - } - } else if (sourcePropFlags & 16 /* Protected */) { - if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, - symbolToString(targetProp), - typeToString(source2), - typeToString(target2) - ); - } - return 0 /* False */; - } - if (relation === strictSubtypeRelation && isReadonlySymbol(sourceProp) && !isReadonlySymbol(targetProp)) { - return 0 /* False */; - } - const related = isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState); - if (!related) { - if (reportErrors2) { - reportIncompatibleError(Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp)); - } - return 0 /* False */; - } - if (!skipOptional && sourceProp.flags & 16777216 /* Optional */ && targetProp.flags & 106500 /* ClassMember */ && !(targetProp.flags & 16777216 /* Optional */)) { - if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, - symbolToString(targetProp), - typeToString(source2), - typeToString(target2) - ); - } - return 0 /* False */; - } - return related; - } - function reportUnmatchedProperty(source2, target2, unmatchedProperty, requireOptionalProperties) { - let shouldSkipElaboration = false; - if (unmatchedProperty.valueDeclaration && isNamedDeclaration(unmatchedProperty.valueDeclaration) && isPrivateIdentifier(unmatchedProperty.valueDeclaration.name) && source2.symbol && source2.symbol.flags & 32 /* Class */) { - const privateIdentifierDescription = unmatchedProperty.valueDeclaration.name.escapedText; - const symbolTableKey = getSymbolNameForPrivateIdentifier(source2.symbol, privateIdentifierDescription); - if (symbolTableKey && getPropertyOfType(source2, symbolTableKey)) { - const sourceName = factory.getDeclarationName(source2.symbol.valueDeclaration); - const targetName = factory.getDeclarationName(target2.symbol.valueDeclaration); - reportError( - Diagnostics.Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2, - diagnosticName(privateIdentifierDescription), - diagnosticName(sourceName.escapedText === "" ? anon : sourceName), - diagnosticName(targetName.escapedText === "" ? anon : targetName) - ); - return; - } - } - const props = arrayFrom(getUnmatchedProperties( - source2, - target2, - requireOptionalProperties, - /*matchDiscriminantProperties*/ - false - )); - if (!headMessage || headMessage.code !== Diagnostics.Class_0_incorrectly_implements_interface_1.code && headMessage.code !== Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code) { - shouldSkipElaboration = true; - } - if (props.length === 1) { - const propName = symbolToString( - unmatchedProperty, - /*enclosingDeclaration*/ - void 0, - 0 /* None */, - 4 /* AllowAnyNodeKind */ | 16 /* WriteComputedProps */ - ); - reportError(Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName, ...getTypeNamesForErrorDisplay(source2, target2)); - if (length(unmatchedProperty.declarations)) { - associateRelatedInfo(createDiagnosticForNode(unmatchedProperty.declarations[0], Diagnostics._0_is_declared_here, propName)); - } - if (shouldSkipElaboration && errorInfo) { - overrideNextErrorInfo++; - } - } else if (tryElaborateArrayLikeErrors( - source2, - target2, - /*reportErrors*/ - false - )) { - if (props.length > 5) { - reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more, typeToString(source2), typeToString(target2), map(props.slice(0, 4), (p) => symbolToString(p)).join(", "), props.length - 4); - } else { - reportError(Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2, typeToString(source2), typeToString(target2), map(props, (p) => symbolToString(p)).join(", ")); - } - if (shouldSkipElaboration && errorInfo) { - overrideNextErrorInfo++; - } - } - } - function propertiesRelatedTo(source2, target2, reportErrors2, excludedProperties, optionalsOnly, intersectionState) { - if (relation === identityRelation) { - return propertiesIdenticalTo(source2, target2, excludedProperties); - } - let result2 = -1 /* True */; - if (isTupleType(target2)) { - if (isArrayOrTupleType(source2)) { - if (!target2.target.readonly && (isReadonlyArrayType(source2) || isTupleType(source2) && source2.target.readonly)) { - return 0 /* False */; - } - const sourceArity = getTypeReferenceArity(source2); - const targetArity = getTypeReferenceArity(target2); - const sourceRestFlag = isTupleType(source2) ? source2.target.combinedFlags & 4 /* Rest */ : 4 /* Rest */; - const targetRestFlag = target2.target.combinedFlags & 4 /* Rest */; - const sourceMinLength = isTupleType(source2) ? source2.target.minLength : 0; - const targetMinLength = target2.target.minLength; - if (!sourceRestFlag && sourceArity < targetMinLength) { - if (reportErrors2) { - reportError(Diagnostics.Source_has_0_element_s_but_target_requires_1, sourceArity, targetMinLength); - } - return 0 /* False */; - } - if (!targetRestFlag && targetArity < sourceMinLength) { - if (reportErrors2) { - reportError(Diagnostics.Source_has_0_element_s_but_target_allows_only_1, sourceMinLength, targetArity); - } - return 0 /* False */; - } - if (!targetRestFlag && (sourceRestFlag || targetArity < sourceArity)) { - if (reportErrors2) { - if (sourceMinLength < targetMinLength) { - reportError(Diagnostics.Target_requires_0_element_s_but_source_may_have_fewer, targetMinLength); - } else { - reportError(Diagnostics.Target_allows_only_0_element_s_but_source_may_have_more, targetArity); - } - } - return 0 /* False */; - } - const sourceTypeArguments = getTypeArguments(source2); - const targetTypeArguments = getTypeArguments(target2); - const targetStartCount = getStartElementCount(target2.target, 11 /* NonRest */); - const targetEndCount = getEndElementCount(target2.target, 11 /* NonRest */); - const targetHasRestElement = target2.target.hasRestElement; - let canExcludeDiscriminants = !!excludedProperties; - for (let sourcePosition = 0; sourcePosition < sourceArity; sourcePosition++) { - const sourceFlags = isTupleType(source2) ? source2.target.elementFlags[sourcePosition] : 4 /* Rest */; - const sourcePositionFromEnd = sourceArity - 1 - sourcePosition; - const targetPosition = targetHasRestElement && sourcePosition >= targetStartCount ? targetArity - 1 - Math.min(sourcePositionFromEnd, targetEndCount) : sourcePosition; - const targetFlags = target2.target.elementFlags[targetPosition]; - if (targetFlags & 8 /* Variadic */ && !(sourceFlags & 8 /* Variadic */)) { - if (reportErrors2) { - reportError(Diagnostics.Source_provides_no_match_for_variadic_element_at_position_0_in_target, targetPosition); - } - return 0 /* False */; - } - if (sourceFlags & 8 /* Variadic */ && !(targetFlags & 12 /* Variable */)) { - if (reportErrors2) { - reportError(Diagnostics.Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target, sourcePosition, targetPosition); - } - return 0 /* False */; - } - if (targetFlags & 1 /* Required */ && !(sourceFlags & 1 /* Required */)) { - if (reportErrors2) { - reportError(Diagnostics.Source_provides_no_match_for_required_element_at_position_0_in_target, targetPosition); - } - return 0 /* False */; - } - if (canExcludeDiscriminants) { - if (sourceFlags & 12 /* Variable */ || targetFlags & 12 /* Variable */) { - canExcludeDiscriminants = false; - } - if (canExcludeDiscriminants && (excludedProperties == null ? void 0 : excludedProperties.has("" + sourcePosition))) { - continue; - } - } - const sourceType = removeMissingType(sourceTypeArguments[sourcePosition], !!(sourceFlags & targetFlags & 2 /* Optional */)); - const targetType = targetTypeArguments[targetPosition]; - const targetCheckType = sourceFlags & 8 /* Variadic */ && targetFlags & 4 /* Rest */ ? createArrayType(targetType) : removeMissingType(targetType, !!(targetFlags & 2 /* Optional */)); - const related = isRelatedTo( - sourceType, - targetCheckType, - 3 /* Both */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - if (!related) { - if (reportErrors2 && (targetArity > 1 || sourceArity > 1)) { - if (targetHasRestElement && sourcePosition >= targetStartCount && sourcePositionFromEnd >= targetEndCount && targetStartCount !== sourceArity - targetEndCount - 1) { - reportIncompatibleError(Diagnostics.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target, targetStartCount, sourceArity - targetEndCount - 1, targetPosition); - } else { - reportIncompatibleError(Diagnostics.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, sourcePosition, targetPosition); - } - } - return 0 /* False */; - } - result2 &= related; - } - return result2; - } - if (target2.target.combinedFlags & 12 /* Variable */) { - return 0 /* False */; - } - } - const requireOptionalProperties = (relation === subtypeRelation || relation === strictSubtypeRelation) && !isObjectLiteralType2(source2) && !isEmptyArrayLiteralType(source2) && !isTupleType(source2); - const unmatchedProperty = getUnmatchedProperty( - source2, - target2, - requireOptionalProperties, - /*matchDiscriminantProperties*/ - false - ); - if (unmatchedProperty) { - if (reportErrors2 && shouldReportUnmatchedPropertyError(source2, target2)) { - reportUnmatchedProperty(source2, target2, unmatchedProperty, requireOptionalProperties); - } - return 0 /* False */; - } - if (isObjectLiteralType2(target2)) { - for (const sourceProp of excludeProperties(getPropertiesOfType(source2), excludedProperties)) { - if (!getPropertyOfObjectType(target2, sourceProp.escapedName)) { - const sourceType = getTypeOfSymbol(sourceProp); - if (!(sourceType.flags & 32768 /* Undefined */)) { - if (reportErrors2) { - reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target2)); - } - return 0 /* False */; - } - } - } - } - const properties = getPropertiesOfType(target2); - const numericNamesOnly = isTupleType(source2) && isTupleType(target2); - for (const targetProp of excludeProperties(properties, excludedProperties)) { - const name = targetProp.escapedName; - if (!(targetProp.flags & 4194304 /* Prototype */) && (!numericNamesOnly || isNumericLiteralName(name) || name === "length") && (!optionalsOnly || targetProp.flags & 16777216 /* Optional */)) { - const sourceProp = getPropertyOfType(source2, name); - if (sourceProp && sourceProp !== targetProp) { - const related = propertyRelatedTo(source2, target2, sourceProp, targetProp, getNonMissingTypeOfSymbol, reportErrors2, intersectionState, relation === comparableRelation); - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - } - } - return result2; - } - function propertiesIdenticalTo(source2, target2, excludedProperties) { - if (!(source2.flags & 524288 /* Object */ && target2.flags & 524288 /* Object */)) { - return 0 /* False */; - } - const sourceProperties = excludeProperties(getPropertiesOfObjectType(source2), excludedProperties); - const targetProperties = excludeProperties(getPropertiesOfObjectType(target2), excludedProperties); - if (sourceProperties.length !== targetProperties.length) { - return 0 /* False */; - } - let result2 = -1 /* True */; - for (const sourceProp of sourceProperties) { - const targetProp = getPropertyOfObjectType(target2, sourceProp.escapedName); - if (!targetProp) { - return 0 /* False */; - } - const related = compareProperties2(sourceProp, targetProp, isRelatedTo); - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - return result2; - } - function signaturesRelatedTo(source2, target2, kind, reportErrors2, intersectionState) { - var _a2, _b; - if (relation === identityRelation) { - return signaturesIdenticalTo(source2, target2, kind); - } - if (target2 === anyFunctionType || source2 === anyFunctionType) { - return -1 /* True */; - } - const sourceIsJSConstructor = source2.symbol && isJSConstructor(source2.symbol.valueDeclaration); - const targetIsJSConstructor = target2.symbol && isJSConstructor(target2.symbol.valueDeclaration); - const sourceSignatures = getSignaturesOfType(source2, sourceIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind); - const targetSignatures = getSignaturesOfType(target2, targetIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind); - if (kind === 1 /* Construct */ && sourceSignatures.length && targetSignatures.length) { - const sourceIsAbstract = !!(sourceSignatures[0].flags & 4 /* Abstract */); - const targetIsAbstract = !!(targetSignatures[0].flags & 4 /* Abstract */); - if (sourceIsAbstract && !targetIsAbstract) { - if (reportErrors2) { - reportError(Diagnostics.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type); - } - return 0 /* False */; - } - if (!constructorVisibilitiesAreCompatible(sourceSignatures[0], targetSignatures[0], reportErrors2)) { - return 0 /* False */; - } - } - let result2 = -1 /* True */; - const incompatibleReporter = kind === 1 /* Construct */ ? reportIncompatibleConstructSignatureReturn : reportIncompatibleCallSignatureReturn; - const sourceObjectFlags = getObjectFlags(source2); - const targetObjectFlags = getObjectFlags(target2); - if (sourceObjectFlags & 64 /* Instantiated */ && targetObjectFlags & 64 /* Instantiated */ && source2.symbol === target2.symbol || sourceObjectFlags & 4 /* Reference */ && targetObjectFlags & 4 /* Reference */ && source2.target === target2.target) { - for (let i = 0; i < targetSignatures.length; i++) { - const related = signatureRelatedTo( - sourceSignatures[i], - targetSignatures[i], - /*erase*/ - true, - reportErrors2, - intersectionState, - incompatibleReporter(sourceSignatures[i], targetSignatures[i]) - ); - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - } else if (sourceSignatures.length === 1 && targetSignatures.length === 1) { - const eraseGenerics = relation === comparableRelation || !!compilerOptions.noStrictGenericChecks; - const sourceSignature = first(sourceSignatures); - const targetSignature = first(targetSignatures); - result2 = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors2, intersectionState, incompatibleReporter(sourceSignature, targetSignature)); - if (!result2 && reportErrors2 && kind === 1 /* Construct */ && sourceObjectFlags & targetObjectFlags && (((_a2 = targetSignature.declaration) == null ? void 0 : _a2.kind) === 176 /* Constructor */ || ((_b = sourceSignature.declaration) == null ? void 0 : _b.kind) === 176 /* Constructor */)) { - const constructSignatureToString = (signature) => signatureToString( - signature, - /*enclosingDeclaration*/ - void 0, - 262144 /* WriteArrowStyleSignature */, - kind - ); - reportError(Diagnostics.Type_0_is_not_assignable_to_type_1, constructSignatureToString(sourceSignature), constructSignatureToString(targetSignature)); - reportError(Diagnostics.Types_of_construct_signatures_are_incompatible); - return result2; - } - } else { - outer: - for (const t of targetSignatures) { - const saveErrorInfo = captureErrorCalculationState(); - let shouldElaborateErrors = reportErrors2; - for (const s of sourceSignatures) { - const related = signatureRelatedTo( - s, - t, - /*erase*/ - true, - shouldElaborateErrors, - intersectionState, - incompatibleReporter(s, t) - ); - if (related) { - result2 &= related; - resetErrorInfo(saveErrorInfo); - continue outer; - } - shouldElaborateErrors = false; - } - if (shouldElaborateErrors) { - reportError( - Diagnostics.Type_0_provides_no_match_for_the_signature_1, - typeToString(source2), - signatureToString( - t, - /*enclosingDeclaration*/ - void 0, - /*flags*/ - void 0, - kind - ) - ); - } - return 0 /* False */; - } - } - return result2; - } - function shouldReportUnmatchedPropertyError(source2, target2) { - const typeCallSignatures = getSignaturesOfStructuredType(source2, 0 /* Call */); - const typeConstructSignatures = getSignaturesOfStructuredType(source2, 1 /* Construct */); - const typeProperties = getPropertiesOfObjectType(source2); - if ((typeCallSignatures.length || typeConstructSignatures.length) && !typeProperties.length) { - if (getSignaturesOfType(target2, 0 /* Call */).length && typeCallSignatures.length || getSignaturesOfType(target2, 1 /* Construct */).length && typeConstructSignatures.length) { - return true; - } - return false; - } - return true; - } - function reportIncompatibleCallSignatureReturn(siga, sigb) { - if (siga.parameters.length === 0 && sigb.parameters.length === 0) { - return (source2, target2) => reportIncompatibleError(Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, typeToString(source2), typeToString(target2)); - } - return (source2, target2) => reportIncompatibleError(Diagnostics.Call_signature_return_types_0_and_1_are_incompatible, typeToString(source2), typeToString(target2)); - } - function reportIncompatibleConstructSignatureReturn(siga, sigb) { - if (siga.parameters.length === 0 && sigb.parameters.length === 0) { - return (source2, target2) => reportIncompatibleError(Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1, typeToString(source2), typeToString(target2)); - } - return (source2, target2) => reportIncompatibleError(Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible, typeToString(source2), typeToString(target2)); - } - function signatureRelatedTo(source2, target2, erase, reportErrors2, intersectionState, incompatibleReporter) { - const checkMode = relation === subtypeRelation ? 16 /* StrictTopSignature */ : relation === strictSubtypeRelation ? 16 /* StrictTopSignature */ | 8 /* StrictArity */ : 0 /* None */; - return compareSignaturesRelated( - erase ? getErasedSignature(source2) : source2, - erase ? getErasedSignature(target2) : target2, - checkMode, - reportErrors2, - reportError, - incompatibleReporter, - isRelatedToWorker2, - reportUnreliableMapper - ); - function isRelatedToWorker2(source3, target3, reportErrors3) { - return isRelatedTo( - source3, - target3, - 3 /* Both */, - reportErrors3, - /*headMessage*/ - void 0, - intersectionState - ); - } - } - function signaturesIdenticalTo(source2, target2, kind) { - const sourceSignatures = getSignaturesOfType(source2, kind); - const targetSignatures = getSignaturesOfType(target2, kind); - if (sourceSignatures.length !== targetSignatures.length) { - return 0 /* False */; - } - let result2 = -1 /* True */; - for (let i = 0; i < sourceSignatures.length; i++) { - const related = compareSignaturesIdentical( - sourceSignatures[i], - targetSignatures[i], - /*partialMatch*/ - false, - /*ignoreThisTypes*/ - false, - /*ignoreReturnTypes*/ - false, - isRelatedTo - ); - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - return result2; - } - function membersRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState) { - let result2 = -1 /* True */; - const keyType = targetInfo.keyType; - const props = source2.flags & 2097152 /* Intersection */ ? getPropertiesOfUnionOrIntersectionType(source2) : getPropertiesOfObjectType(source2); - for (const prop of props) { - if (isIgnoredJsxProperty(source2, prop)) { - continue; - } - if (isApplicableIndexType(getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */), keyType)) { - const propType = getNonMissingTypeOfSymbol(prop); - const type = exactOptionalPropertyTypes || propType.flags & 32768 /* Undefined */ || keyType === numberType || !(prop.flags & 16777216 /* Optional */) ? propType : getTypeWithFacts(propType, 524288 /* NEUndefined */); - const related = isRelatedTo( - type, - targetInfo.type, - 3 /* Both */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - if (!related) { - if (reportErrors2) { - reportError(Diagnostics.Property_0_is_incompatible_with_index_signature, symbolToString(prop)); - } - return 0 /* False */; - } - result2 &= related; - } - } - for (const info of getIndexInfosOfType(source2)) { - if (isApplicableIndexType(info.keyType, keyType)) { - const related = indexInfoRelatedTo(info, targetInfo, reportErrors2, intersectionState); - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - } - return result2; - } - function indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors2, intersectionState) { - const related = isRelatedTo( - sourceInfo.type, - targetInfo.type, - 3 /* Both */, - reportErrors2, - /*headMessage*/ - void 0, - intersectionState - ); - if (!related && reportErrors2) { - if (sourceInfo.keyType === targetInfo.keyType) { - reportError(Diagnostics._0_index_signatures_are_incompatible, typeToString(sourceInfo.keyType)); - } else { - reportError(Diagnostics._0_and_1_index_signatures_are_incompatible, typeToString(sourceInfo.keyType), typeToString(targetInfo.keyType)); - } - } - return related; - } - function indexSignaturesRelatedTo(source2, target2, sourceIsPrimitive, reportErrors2, intersectionState) { - if (relation === identityRelation) { - return indexSignaturesIdenticalTo(source2, target2); - } - const indexInfos = getIndexInfosOfType(target2); - const targetHasStringIndex = some(indexInfos, (info) => info.keyType === stringType); - let result2 = -1 /* True */; - for (const targetInfo of indexInfos) { - const related = relation !== strictSubtypeRelation && !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 /* Any */ ? -1 /* True */ : isGenericMappedType(source2) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source2), targetInfo.type, 3 /* Both */, reportErrors2) : typeRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState); - if (!related) { - return 0 /* False */; - } - result2 &= related; - } - return result2; - } - function typeRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState) { - const sourceInfo = getApplicableIndexInfo(source2, targetInfo.keyType); - if (sourceInfo) { - return indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors2, intersectionState); - } - if (!(intersectionState & 1 /* Source */) && (relation !== strictSubtypeRelation || getObjectFlags(source2) & 8192 /* FreshLiteral */) && isObjectTypeWithInferableIndex(source2)) { - return membersRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState); - } - if (reportErrors2) { - reportError(Diagnostics.Index_signature_for_type_0_is_missing_in_type_1, typeToString(targetInfo.keyType), typeToString(source2)); - } - return 0 /* False */; - } - function indexSignaturesIdenticalTo(source2, target2) { - const sourceInfos = getIndexInfosOfType(source2); - const targetInfos = getIndexInfosOfType(target2); - if (sourceInfos.length !== targetInfos.length) { - return 0 /* False */; - } - for (const targetInfo of targetInfos) { - const sourceInfo = getIndexInfoOfType(source2, targetInfo.keyType); - if (!(sourceInfo && isRelatedTo(sourceInfo.type, targetInfo.type, 3 /* Both */) && sourceInfo.isReadonly === targetInfo.isReadonly)) { - return 0 /* False */; - } - } - return -1 /* True */; - } - function constructorVisibilitiesAreCompatible(sourceSignature, targetSignature, reportErrors2) { - if (!sourceSignature.declaration || !targetSignature.declaration) { - return true; - } - const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 24 /* NonPublicAccessibilityModifier */); - const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 24 /* NonPublicAccessibilityModifier */); - if (targetAccessibility === 8 /* Private */) { - return true; - } - if (targetAccessibility === 16 /* Protected */ && sourceAccessibility !== 8 /* Private */) { - return true; - } - if (targetAccessibility !== 16 /* Protected */ && !sourceAccessibility) { - return true; - } - if (reportErrors2) { - reportError(Diagnostics.Cannot_assign_a_0_constructor_type_to_a_1_constructor_type, visibilityToString(sourceAccessibility), visibilityToString(targetAccessibility)); - } - return false; - } - } - function typeCouldHaveTopLevelSingletonTypes(type) { - if (type.flags & 16 /* Boolean */) { - return false; - } - if (type.flags & 3145728 /* UnionOrIntersection */) { - return !!forEach(type.types, typeCouldHaveTopLevelSingletonTypes); - } - if (type.flags & 465829888 /* Instantiable */) { - const constraint = getConstraintOfType(type); - if (constraint && constraint !== type) { - return typeCouldHaveTopLevelSingletonTypes(constraint); - } - } - return isUnitType(type) || !!(type.flags & 134217728 /* TemplateLiteral */) || !!(type.flags & 268435456 /* StringMapping */); - } - function getExactOptionalUnassignableProperties(source, target) { - if (isTupleType(source) && isTupleType(target)) - return emptyArray; - return getPropertiesOfType(target).filter((targetProp) => isExactOptionalPropertyMismatch(getTypeOfPropertyOfType(source, targetProp.escapedName), getTypeOfSymbol(targetProp))); - } - function isExactOptionalPropertyMismatch(source, target) { - return !!source && !!target && maybeTypeOfKind(source, 32768 /* Undefined */) && !!containsMissingType(target); - } - function getExactOptionalProperties(type) { - return getPropertiesOfType(type).filter((targetProp) => containsMissingType(getTypeOfSymbol(targetProp))); - } - function getBestMatchingType(source, target, isRelatedTo = compareTypesAssignable) { - return findMatchingDiscriminantType(source, target, isRelatedTo) || findMatchingTypeReferenceOrTypeAliasReference(source, target) || findBestTypeForObjectLiteral(source, target) || findBestTypeForInvokable(source, target) || findMostOverlappyType(source, target); - } - function discriminateTypeByDiscriminableItems(target, discriminators, related) { - const types = target.types; - const include = types.map((t) => t.flags & 402784252 /* Primitive */ ? 0 /* False */ : -1 /* True */); - for (const [getDiscriminatingType, propertyName] of discriminators) { - let matched = false; - for (let i = 0; i < types.length; i++) { - if (include[i]) { - const targetType = getTypeOfPropertyOrIndexSignatureOfType(types[i], propertyName); - if (targetType && related(getDiscriminatingType(), targetType)) { - matched = true; - } else { - include[i] = 3 /* Maybe */; - } - } - } - for (let i = 0; i < types.length; i++) { - if (include[i] === 3 /* Maybe */) { - include[i] = matched ? 0 /* False */ : -1 /* True */; - } - } - } - const filtered = contains(include, 0 /* False */) ? getUnionType(types.filter((_, i) => include[i]), 0 /* None */) : target; - return filtered.flags & 131072 /* Never */ ? target : filtered; - } - function isWeakType(type) { - if (type.flags & 524288 /* Object */) { - const resolved = resolveStructuredTypeMembers(type); - return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 && resolved.indexInfos.length === 0 && resolved.properties.length > 0 && every(resolved.properties, (p) => !!(p.flags & 16777216 /* Optional */)); - } - if (type.flags & 2097152 /* Intersection */) { - return every(type.types, isWeakType); - } - return false; - } - function hasCommonProperties(source, target, isComparingJsxAttributes) { - for (const prop of getPropertiesOfType(source)) { - if (isKnownProperty(target, prop.escapedName, isComparingJsxAttributes)) { - return true; - } - } - return false; - } - function getVariances(type) { - return type === globalArrayType || type === globalReadonlyArrayType || type.objectFlags & 8 /* Tuple */ ? arrayVariances : getVariancesWorker(type.symbol, type.typeParameters); - } - function getAliasVariances(symbol) { - return getVariancesWorker(symbol, getSymbolLinks(symbol).typeParameters); - } - function getVariancesWorker(symbol, typeParameters = emptyArray) { - var _a, _b; - const links = getSymbolLinks(symbol); - if (!links.variances) { - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "getVariancesWorker", { arity: typeParameters.length, id: getTypeId(getDeclaredTypeOfSymbol(symbol)) }); - const oldVarianceComputation = inVarianceComputation; - if (!inVarianceComputation) { - inVarianceComputation = true; - resolutionStart = resolutionTargets.length; - } - links.variances = emptyArray; - const variances = []; - for (const tp of typeParameters) { - const modifiers = getTypeParameterModifiers(tp); - let variance = modifiers & 65536 /* Out */ ? modifiers & 32768 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 32768 /* In */ ? 2 /* Contravariant */ : void 0; - if (variance === void 0) { - let unmeasurable = false; - let unreliable = false; - const oldHandler = outofbandVarianceMarkerHandler; - outofbandVarianceMarkerHandler = (onlyUnreliable) => onlyUnreliable ? unreliable = true : unmeasurable = true; - const typeWithSuper = createMarkerType(symbol, tp, markerSuperType); - const typeWithSub = createMarkerType(symbol, tp, markerSubType); - variance = (isTypeAssignableTo(typeWithSub, typeWithSuper) ? 1 /* Covariant */ : 0) | (isTypeAssignableTo(typeWithSuper, typeWithSub) ? 2 /* Contravariant */ : 0); - if (variance === 3 /* Bivariant */ && isTypeAssignableTo(createMarkerType(symbol, tp, markerOtherType), typeWithSuper)) { - variance = 4 /* Independent */; - } - outofbandVarianceMarkerHandler = oldHandler; - if (unmeasurable || unreliable) { - if (unmeasurable) { - variance |= 8 /* Unmeasurable */; - } - if (unreliable) { - variance |= 16 /* Unreliable */; - } - } - } - variances.push(variance); - } - if (!oldVarianceComputation) { - inVarianceComputation = false; - resolutionStart = 0; - } - links.variances = variances; - (_b = tracing) == null ? void 0 : _b.pop({ variances: variances.map(Debug.formatVariance) }); - } - return links.variances; - } - function createMarkerType(symbol, source, target) { - const mapper = makeUnaryTypeMapper(source, target); - const type = getDeclaredTypeOfSymbol(symbol); - if (isErrorType(type)) { - return type; - } - const result = symbol.flags & 524288 /* TypeAlias */ ? getTypeAliasInstantiation(symbol, instantiateTypes(getSymbolLinks(symbol).typeParameters, mapper)) : createTypeReference(type, instantiateTypes(type.typeParameters, mapper)); - markerTypes.add(getTypeId(result)); - return result; - } - function isMarkerType(type) { - return markerTypes.has(getTypeId(type)); - } - function getTypeParameterModifiers(tp) { - var _a; - return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (32768 /* In */ | 65536 /* Out */ | 2048 /* Const */); - } - function hasCovariantVoidArgument(typeArguments, variances) { - for (let i = 0; i < variances.length; i++) { - if ((variances[i] & 7 /* VarianceMask */) === 1 /* Covariant */ && typeArguments[i].flags & 16384 /* Void */) { - return true; - } - } - return false; - } - function isUnconstrainedTypeParameter(type) { - return type.flags & 262144 /* TypeParameter */ && !getConstraintOfTypeParameter(type); - } - function isNonDeferredTypeReference(type) { - return !!(getObjectFlags(type) & 4 /* Reference */) && !type.node; - } - function isTypeReferenceWithGenericArguments(type) { - return isNonDeferredTypeReference(type) && some(getTypeArguments(type), (t) => !!(t.flags & 262144 /* TypeParameter */) || isTypeReferenceWithGenericArguments(t)); - } - function getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) { - const typeParameters = []; - let constraintMarker = ""; - const sourceId = getTypeReferenceId(source, 0); - const targetId = getTypeReferenceId(target, 0); - return `${constraintMarker}${sourceId},${targetId}${postFix}`; - function getTypeReferenceId(type, depth = 0) { - let result = "" + type.target.id; - for (const t of getTypeArguments(type)) { - if (t.flags & 262144 /* TypeParameter */) { - if (ignoreConstraints || isUnconstrainedTypeParameter(t)) { - let index = typeParameters.indexOf(t); - if (index < 0) { - index = typeParameters.length; - typeParameters.push(t); - } - result += "=" + index; - continue; - } - constraintMarker = "*"; - } else if (depth < 4 && isTypeReferenceWithGenericArguments(t)) { - result += "<" + getTypeReferenceId(t, depth + 1) + ">"; - continue; - } - result += "-" + t.id; - } - return result; - } - } - function getRelationKey(source, target, intersectionState, relation, ignoreConstraints) { - if (relation === identityRelation && source.id > target.id) { - const temp = source; - source = target; - target = temp; - } - const postFix = intersectionState ? ":" + intersectionState : ""; - return isTypeReferenceWithGenericArguments(source) && isTypeReferenceWithGenericArguments(target) ? getGenericTypeReferenceRelationKey(source, target, postFix, ignoreConstraints) : `${source.id},${target.id}${postFix}`; - } - function forEachProperty2(prop, callback) { - if (getCheckFlags(prop) & 6 /* Synthetic */) { - for (const t of prop.links.containingType.types) { - const p = getPropertyOfType(t, prop.escapedName); - const result = p && forEachProperty2(p, callback); - if (result) { - return result; - } - } - return void 0; - } - return callback(prop); - } - function getDeclaringClass(prop) { - return prop.parent && prop.parent.flags & 32 /* Class */ ? getDeclaredTypeOfSymbol(getParentOfSymbol(prop)) : void 0; - } - function getTypeOfPropertyInBaseClass(property) { - const classType = getDeclaringClass(property); - const baseClassType = classType && getBaseTypes(classType)[0]; - return baseClassType && getTypeOfPropertyOfType(baseClassType, property.escapedName); - } - function isPropertyInClassDerivedFrom(prop, baseClass) { - return forEachProperty2(prop, (sp) => { - const sourceClass = getDeclaringClass(sp); - return sourceClass ? hasBaseType(sourceClass, baseClass) : false; - }); - } - function isValidOverrideOf(sourceProp, targetProp) { - return !forEachProperty2(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 16 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false); - } - function isClassDerivedFromDeclaringClasses(checkClass, prop, writing) { - return forEachProperty2(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 16 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass; - } - function isDeeplyNestedType(type, stack, depth, maxDepth = 3) { - if (depth >= maxDepth) { - if (type.flags & 2097152 /* Intersection */) { - return some(type.types, (t) => isDeeplyNestedType(t, stack, depth, maxDepth)); - } - const identity2 = getRecursionIdentity(type); - let count = 0; - let lastTypeId = 0; - for (let i = 0; i < depth; i++) { - const t = stack[i]; - if (t.flags & 2097152 /* Intersection */ ? some(t.types, (u) => getRecursionIdentity(u) === identity2) : getRecursionIdentity(t) === identity2) { - if (t.id >= lastTypeId) { - count++; - if (count >= maxDepth) { - return true; - } - } - lastTypeId = t.id; - } - } - } - return false; - } - function getRecursionIdentity(type) { - if (type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { - if (getObjectFlags(type) & 4 /* Reference */ && type.node) { - return type.node; - } - if (type.symbol && !(getObjectFlags(type) & 16 /* Anonymous */ && type.symbol.flags & 32 /* Class */)) { - return type.symbol; - } - if (isTupleType(type)) { - return type.target; - } - } - if (type.flags & 262144 /* TypeParameter */) { - return type.symbol; - } - if (type.flags & 8388608 /* IndexedAccess */) { - do { - type = type.objectType; - } while (type.flags & 8388608 /* IndexedAccess */); - return type; - } - if (type.flags & 16777216 /* Conditional */) { - return type.root; - } - return type; - } - function isPropertyIdenticalTo(sourceProp, targetProp) { - return compareProperties2(sourceProp, targetProp, compareTypesIdentical) !== 0 /* False */; - } - function compareProperties2(sourceProp, targetProp, compareTypes) { - if (sourceProp === targetProp) { - return -1 /* True */; - } - const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24 /* NonPublicAccessibilityModifier */; - const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24 /* NonPublicAccessibilityModifier */; - if (sourcePropAccessibility !== targetPropAccessibility) { - return 0 /* False */; - } - if (sourcePropAccessibility) { - if (getTargetSymbol(sourceProp) !== getTargetSymbol(targetProp)) { - return 0 /* False */; - } - } else { - if ((sourceProp.flags & 16777216 /* Optional */) !== (targetProp.flags & 16777216 /* Optional */)) { - return 0 /* False */; - } - } - if (isReadonlySymbol(sourceProp) !== isReadonlySymbol(targetProp)) { - return 0 /* False */; - } - return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); - } - function isMatchingSignature(source, target, partialMatch) { - const sourceParameterCount = getParameterCount(source); - const targetParameterCount = getParameterCount(target); - const sourceMinArgumentCount = getMinArgumentCount(source); - const targetMinArgumentCount = getMinArgumentCount(target); - const sourceHasRestParameter = hasEffectiveRestParameter(source); - const targetHasRestParameter = hasEffectiveRestParameter(target); - if (sourceParameterCount === targetParameterCount && sourceMinArgumentCount === targetMinArgumentCount && sourceHasRestParameter === targetHasRestParameter) { - return true; - } - if (partialMatch && sourceMinArgumentCount <= targetMinArgumentCount) { - return true; - } - return false; - } - function compareSignaturesIdentical(source, target, partialMatch, ignoreThisTypes, ignoreReturnTypes, compareTypes) { - if (source === target) { - return -1 /* True */; - } - if (!isMatchingSignature(source, target, partialMatch)) { - return 0 /* False */; - } - if (length(source.typeParameters) !== length(target.typeParameters)) { - return 0 /* False */; - } - if (target.typeParameters) { - const mapper = createTypeMapper(source.typeParameters, target.typeParameters); - for (let i = 0; i < target.typeParameters.length; i++) { - const s = source.typeParameters[i]; - const t = target.typeParameters[i]; - if (!(s === t || compareTypes(instantiateType(getConstraintFromTypeParameter(s), mapper) || unknownType, getConstraintFromTypeParameter(t) || unknownType) && compareTypes(instantiateType(getDefaultFromTypeParameter(s), mapper) || unknownType, getDefaultFromTypeParameter(t) || unknownType))) { - return 0 /* False */; - } - } - source = instantiateSignature( - source, - mapper, - /*eraseTypeParameters*/ - true - ); - } - let result = -1 /* True */; - if (!ignoreThisTypes) { - const sourceThisType = getThisTypeOfSignature(source); - if (sourceThisType) { - const targetThisType = getThisTypeOfSignature(target); - if (targetThisType) { - const related = compareTypes(sourceThisType, targetThisType); - if (!related) { - return 0 /* False */; - } - result &= related; - } - } - } - const targetLen = getParameterCount(target); - for (let i = 0; i < targetLen; i++) { - const s = getTypeAtPosition(source, i); - const t = getTypeAtPosition(target, i); - const related = compareTypes(t, s); - if (!related) { - return 0 /* False */; - } - result &= related; - } - if (!ignoreReturnTypes) { - const sourceTypePredicate = getTypePredicateOfSignature(source); - const targetTypePredicate = getTypePredicateOfSignature(target); - result &= sourceTypePredicate || targetTypePredicate ? compareTypePredicatesIdentical(sourceTypePredicate, targetTypePredicate, compareTypes) : compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); - } - return result; - } - function compareTypePredicatesIdentical(source, target, compareTypes) { - return !(source && target && typePredicateKindsMatch(source, target)) ? 0 /* False */ : source.type === target.type ? -1 /* True */ : source.type && target.type ? compareTypes(source.type, target.type) : 0 /* False */; - } - function literalTypesWithSameBaseType(types) { - let commonBaseType; - for (const t of types) { - if (!(t.flags & 131072 /* Never */)) { - const baseType = getBaseTypeOfLiteralType(t); - commonBaseType ?? (commonBaseType = baseType); - if (baseType === t || baseType !== commonBaseType) { - return false; - } - } - } - return true; - } - function getCombinedTypeFlags(types) { - return reduceLeft(types, (flags, t) => flags | (t.flags & 1048576 /* Union */ ? getCombinedTypeFlags(t.types) : t.flags), 0); - } - function getCommonSupertype(types) { - if (types.length === 1) { - return types[0]; - } - const primaryTypes = strictNullChecks ? sameMap(types, (t) => filterType(t, (u) => !(u.flags & 98304 /* Nullable */))) : types; - const superTypeOrUnion = literalTypesWithSameBaseType(primaryTypes) ? getUnionType(primaryTypes) : reduceLeft(primaryTypes, (s, t) => isTypeSubtypeOf(s, t) ? t : s); - return primaryTypes === types ? superTypeOrUnion : getNullableType(superTypeOrUnion, getCombinedTypeFlags(types) & 98304 /* Nullable */); - } - function getCommonSubtype(types) { - return reduceLeft(types, (s, t) => isTypeSubtypeOf(t, s) ? t : s); - } - function isArrayType(type) { - return !!(getObjectFlags(type) & 4 /* Reference */) && (type.target === globalArrayType || type.target === globalReadonlyArrayType); - } - function isReadonlyArrayType(type) { - return !!(getObjectFlags(type) & 4 /* Reference */) && type.target === globalReadonlyArrayType; - } - function isArrayOrTupleType(type) { - return isArrayType(type) || isTupleType(type); - } - function isMutableArrayOrTuple(type) { - return isArrayType(type) && !isReadonlyArrayType(type) || isTupleType(type) && !type.target.readonly; - } - function getElementTypeOfArrayType(type) { - return isArrayType(type) ? getTypeArguments(type)[0] : void 0; - } - function isArrayLikeType(type) { - return isArrayType(type) || !(type.flags & 98304 /* Nullable */) && isTypeAssignableTo(type, anyReadonlyArrayType); - } - function getSingleBaseForNonAugmentingSubtype(type) { - if (!(getObjectFlags(type) & 4 /* Reference */) || !(getObjectFlags(type.target) & 3 /* ClassOrInterface */)) { - return void 0; - } - if (getObjectFlags(type) & 33554432 /* IdenticalBaseTypeCalculated */) { - return getObjectFlags(type) & 67108864 /* IdenticalBaseTypeExists */ ? type.cachedEquivalentBaseType : void 0; - } - type.objectFlags |= 33554432 /* IdenticalBaseTypeCalculated */; - const target = type.target; - if (getObjectFlags(target) & 1 /* Class */) { - const baseTypeNode = getBaseTypeNodeOfClass(target); - if (baseTypeNode && baseTypeNode.expression.kind !== 80 /* Identifier */ && baseTypeNode.expression.kind !== 211 /* PropertyAccessExpression */) { - return void 0; - } - } - const bases = getBaseTypes(target); - if (bases.length !== 1) { - return void 0; - } - if (getMembersOfSymbol(type.symbol).size) { - return void 0; - } - let instantiatedBase = !length(target.typeParameters) ? bases[0] : instantiateType(bases[0], createTypeMapper(target.typeParameters, getTypeArguments(type).slice(0, target.typeParameters.length))); - if (length(getTypeArguments(type)) > length(target.typeParameters)) { - instantiatedBase = getTypeWithThisArgument(instantiatedBase, last(getTypeArguments(type))); - } - type.objectFlags |= 67108864 /* IdenticalBaseTypeExists */; - return type.cachedEquivalentBaseType = instantiatedBase; - } - function isEmptyLiteralType(type) { - return strictNullChecks ? type === implicitNeverType : type === undefinedWideningType; - } - function isEmptyArrayLiteralType(type) { - const elementType = getElementTypeOfArrayType(type); - return !!elementType && isEmptyLiteralType(elementType); - } - function isTupleLikeType(type) { - let lengthType; - return isTupleType(type) || !!getPropertyOfType(type, "0") || isArrayLikeType(type) && !!(lengthType = getTypeOfPropertyOfType(type, "length")) && everyType(lengthType, (t) => !!(t.flags & 256 /* NumberLiteral */)); - } - function isArrayOrTupleLikeType(type) { - return isArrayLikeType(type) || isTupleLikeType(type); - } - function getTupleElementType(type, index) { - const propType = getTypeOfPropertyOfType(type, "" + index); - if (propType) { - return propType; - } - if (everyType(type, isTupleType)) { - return getTupleElementTypeOutOfStartCount(type, index, compilerOptions.noUncheckedIndexedAccess ? undefinedType : void 0); - } - return void 0; - } - function isNeitherUnitTypeNorNever(type) { - return !(type.flags & (109472 /* Unit */ | 131072 /* Never */)); - } - function isUnitType(type) { - return !!(type.flags & 109472 /* Unit */); - } - function isUnitLikeType(type) { - const t = getBaseConstraintOrType(type); - return t.flags & 2097152 /* Intersection */ ? some(t.types, isUnitType) : isUnitType(t); - } - function extractUnitType(type) { - return type.flags & 2097152 /* Intersection */ ? find(type.types, isUnitType) || type : type; - } - function isLiteralType(type) { - return type.flags & 16 /* Boolean */ ? true : type.flags & 1048576 /* Union */ ? type.flags & 1024 /* EnumLiteral */ ? true : every(type.types, isUnitType) : isUnitType(type); - } - function getBaseTypeOfLiteralType(type) { - return type.flags & 1056 /* EnumLike */ ? getBaseTypeOfEnumLikeType(type) : type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) ? stringType : type.flags & 256 /* NumberLiteral */ ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 512 /* BooleanLiteral */ ? booleanType : type.flags & 1048576 /* Union */ ? getBaseTypeOfLiteralTypeUnion(type) : type; - } - function getBaseTypeOfLiteralTypeUnion(type) { - const key = `B${getTypeId(type)}`; - return getCachedType(key) ?? setCachedType(key, mapType(type, getBaseTypeOfLiteralType)); - } - function getBaseTypeOfLiteralTypeForComparison(type) { - return type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) ? stringType : type.flags & (256 /* NumberLiteral */ | 32 /* Enum */) ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 512 /* BooleanLiteral */ ? booleanType : type.flags & 1048576 /* Union */ ? mapType(type, getBaseTypeOfLiteralTypeForComparison) : type; - } - function getWidenedLiteralType(type) { - return type.flags & 1056 /* EnumLike */ && isFreshLiteralType(type) ? getBaseTypeOfEnumLikeType(type) : type.flags & 128 /* StringLiteral */ && isFreshLiteralType(type) ? stringType : type.flags & 256 /* NumberLiteral */ && isFreshLiteralType(type) ? numberType : type.flags & 2048 /* BigIntLiteral */ && isFreshLiteralType(type) ? bigintType : type.flags & 512 /* BooleanLiteral */ && isFreshLiteralType(type) ? booleanType : type.flags & 1048576 /* Union */ ? mapType(type, getWidenedLiteralType) : type; - } - function getWidenedUniqueESSymbolType(type) { - return type.flags & 8192 /* UniqueESSymbol */ ? esSymbolType : type.flags & 1048576 /* Union */ ? mapType(type, getWidenedUniqueESSymbolType) : type; - } - function getWidenedLiteralLikeTypeForContextualType(type, contextualType) { - if (!isLiteralOfContextualType(type, contextualType)) { - type = getWidenedUniqueESSymbolType(getWidenedLiteralType(type)); - } - return getRegularTypeOfLiteralType(type); - } - function getWidenedLiteralLikeTypeForContextualReturnTypeIfNeeded(type, contextualSignatureReturnType, isAsync) { - if (type && isUnitType(type)) { - const contextualType = !contextualSignatureReturnType ? void 0 : isAsync ? getPromisedTypeOfPromise(contextualSignatureReturnType) : contextualSignatureReturnType; - type = getWidenedLiteralLikeTypeForContextualType(type, contextualType); - } - return type; - } - function getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(type, contextualSignatureReturnType, kind, isAsyncGenerator) { - if (type && isUnitType(type)) { - const contextualType = !contextualSignatureReturnType ? void 0 : getIterationTypeOfGeneratorFunctionReturnType(kind, contextualSignatureReturnType, isAsyncGenerator); - type = getWidenedLiteralLikeTypeForContextualType(type, contextualType); - } - return type; - } - function isTupleType(type) { - return !!(getObjectFlags(type) & 4 /* Reference */ && type.target.objectFlags & 8 /* Tuple */); - } - function isGenericTupleType(type) { - return isTupleType(type) && !!(type.target.combinedFlags & 8 /* Variadic */); - } - function isSingleElementGenericTupleType(type) { - return isGenericTupleType(type) && type.target.elementFlags.length === 1; - } - function getRestTypeOfTupleType(type) { - return getElementTypeOfSliceOfTupleType(type, type.target.fixedLength); - } - function getTupleElementTypeOutOfStartCount(type, index, undefinedOrMissingType2) { - return mapType(type, (t) => { - const tupleType = t; - const restType = getRestTypeOfTupleType(tupleType); - if (!restType) { - return undefinedType; - } - if (undefinedOrMissingType2 && index >= getTotalFixedElementCount(tupleType.target)) { - return getUnionType([restType, undefinedOrMissingType2]); - } - return restType; - }); - } - function getRestArrayTypeOfTupleType(type) { - const restType = getRestTypeOfTupleType(type); - return restType && createArrayType(restType); - } - function getElementTypeOfSliceOfTupleType(type, index, endSkipCount = 0, writing = false, noReductions = false) { - const length2 = getTypeReferenceArity(type) - endSkipCount; - if (index < length2) { - const typeArguments = getTypeArguments(type); - const elementTypes = []; - for (let i = index; i < length2; i++) { - const t = typeArguments[i]; - elementTypes.push(type.target.elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t); - } - return writing ? getIntersectionType(elementTypes) : getUnionType(elementTypes, noReductions ? 0 /* None */ : 1 /* Literal */); - } - return void 0; - } - function isTupleTypeStructureMatching(t1, t2) { - return getTypeReferenceArity(t1) === getTypeReferenceArity(t2) && every(t1.target.elementFlags, (f, i) => (f & 12 /* Variable */) === (t2.target.elementFlags[i] & 12 /* Variable */)); - } - function isZeroBigInt({ value }) { - return value.base10Value === "0"; - } - function removeDefinitelyFalsyTypes(type) { - return filterType(type, (t) => !!(getTypeFacts(t) & 4194304 /* Truthy */)); - } - function extractDefinitelyFalsyTypes(type) { - return mapType(type, getDefinitelyFalsyPartOfType); - } - function getDefinitelyFalsyPartOfType(type) { - return type.flags & 4 /* String */ ? emptyStringType : type.flags & 8 /* Number */ ? zeroType : type.flags & 64 /* BigInt */ ? zeroBigIntType : type === regularFalseType || type === falseType || type.flags & (16384 /* Void */ | 32768 /* Undefined */ | 65536 /* Null */ | 3 /* AnyOrUnknown */) || type.flags & 128 /* StringLiteral */ && type.value === "" || type.flags & 256 /* NumberLiteral */ && type.value === 0 || type.flags & 2048 /* BigIntLiteral */ && isZeroBigInt(type) ? type : neverType; - } - function getNullableType(type, flags) { - const missing = flags & ~type.flags & (32768 /* Undefined */ | 65536 /* Null */); - return missing === 0 ? type : missing === 32768 /* Undefined */ ? getUnionType([type, undefinedType]) : missing === 65536 /* Null */ ? getUnionType([type, nullType]) : getUnionType([type, undefinedType, nullType]); - } - function getOptionalType(type, isProperty = false) { - Debug.assert(strictNullChecks); - const missingOrUndefined = isProperty ? undefinedOrMissingType : undefinedType; - return type === missingOrUndefined || type.flags & 1048576 /* Union */ && type.types[0] === missingOrUndefined ? type : getUnionType([type, missingOrUndefined]); - } - function getGlobalNonNullableTypeInstantiation(type) { - if (!deferredGlobalNonNullableTypeAlias) { - deferredGlobalNonNullableTypeAlias = getGlobalSymbol( - "NonNullable", - 524288 /* TypeAlias */, - /*diagnostic*/ - void 0 - ) || unknownSymbol; - } - return deferredGlobalNonNullableTypeAlias !== unknownSymbol ? getTypeAliasInstantiation(deferredGlobalNonNullableTypeAlias, [type]) : getIntersectionType([type, emptyObjectType]); - } - function getNonNullableType(type) { - return strictNullChecks ? getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; - } - function addOptionalTypeMarker(type) { - return strictNullChecks ? getUnionType([type, optionalType]) : type; - } - function removeOptionalTypeMarker(type) { - return strictNullChecks ? removeType(type, optionalType) : type; - } - function propagateOptionalTypeMarker(type, node, wasOptional) { - return wasOptional ? isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type; - } - function getOptionalExpressionType(exprType, expression) { - return isExpressionOfOptionalChainRoot(expression) ? getNonNullableType(exprType) : isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) : exprType; - } - function removeMissingType(type, isOptional) { - return exactOptionalPropertyTypes && isOptional ? removeType(type, missingType) : type; - } - function containsMissingType(type) { - return type === missingType || !!(type.flags & 1048576 /* Union */) && type.types[0] === missingType; - } - function removeMissingOrUndefinedType(type) { - return exactOptionalPropertyTypes ? removeType(type, missingType) : getTypeWithFacts(type, 524288 /* NEUndefined */); - } - function isCoercibleUnderDoubleEquals(source, target) { - return (source.flags & (8 /* Number */ | 4 /* String */ | 512 /* BooleanLiteral */)) !== 0 && (target.flags & (8 /* Number */ | 4 /* String */ | 16 /* Boolean */)) !== 0; - } - function isObjectTypeWithInferableIndex(type) { - const objectFlags = getObjectFlags(type); - return type.flags & 2097152 /* Intersection */ ? every(type.types, isObjectTypeWithInferableIndex) : !!(type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */ | 384 /* Enum */ | 512 /* ValueModule */)) !== 0 && !(type.symbol.flags & 32 /* Class */) && !typeHasCallOrConstructSignatures(type)) || !!(objectFlags & 4194304 /* ObjectRestType */) || !!(objectFlags & 1024 /* ReverseMapped */ && isObjectTypeWithInferableIndex(type.source)); - } - function createSymbolWithType(source, type) { - const symbol = createSymbol(source.flags, source.escapedName, getCheckFlags(source) & 8 /* Readonly */); - symbol.declarations = source.declarations; - symbol.parent = source.parent; - symbol.links.type = type; - symbol.links.target = source; - if (source.valueDeclaration) { - symbol.valueDeclaration = source.valueDeclaration; - } - const nameType = getSymbolLinks(source).nameType; - if (nameType) { - symbol.links.nameType = nameType; - } - return symbol; - } - function transformTypeOfMembers(type, f) { - const members = createSymbolTable(); - for (const property of getPropertiesOfObjectType(type)) { - const original = getTypeOfSymbol(property); - const updated = f(original); - members.set(property.escapedName, updated === original ? property : createSymbolWithType(property, updated)); - } - return members; - } - function getRegularTypeOfObjectLiteral(type) { - if (!(isObjectLiteralType2(type) && getObjectFlags(type) & 8192 /* FreshLiteral */)) { - return type; - } - const regularType = type.regularType; - if (regularType) { - return regularType; - } - const resolved = type; - const members = transformTypeOfMembers(type, getRegularTypeOfObjectLiteral); - const regularNew = createAnonymousType(resolved.symbol, members, resolved.callSignatures, resolved.constructSignatures, resolved.indexInfos); - regularNew.flags = resolved.flags; - regularNew.objectFlags |= resolved.objectFlags & ~8192 /* FreshLiteral */; - type.regularType = regularNew; - return regularNew; - } - function createWideningContext(parent2, propertyName, siblings) { - return { parent: parent2, propertyName, siblings, resolvedProperties: void 0 }; - } - function getSiblingsOfContext(context) { - if (!context.siblings) { - const siblings = []; - for (const type of getSiblingsOfContext(context.parent)) { - if (isObjectLiteralType2(type)) { - const prop = getPropertyOfObjectType(type, context.propertyName); - if (prop) { - forEachType(getTypeOfSymbol(prop), (t) => { - siblings.push(t); - }); - } - } - } - context.siblings = siblings; - } - return context.siblings; - } - function getPropertiesOfContext(context) { - if (!context.resolvedProperties) { - const names = /* @__PURE__ */ new Map(); - for (const t of getSiblingsOfContext(context)) { - if (isObjectLiteralType2(t) && !(getObjectFlags(t) & 2097152 /* ContainsSpread */)) { - for (const prop of getPropertiesOfType(t)) { - names.set(prop.escapedName, prop); - } - } - } - context.resolvedProperties = arrayFrom(names.values()); - } - return context.resolvedProperties; - } - function getWidenedProperty(prop, context) { - if (!(prop.flags & 4 /* Property */)) { - return prop; - } - const original = getTypeOfSymbol(prop); - const propContext = context && createWideningContext( - context, - prop.escapedName, - /*siblings*/ - void 0 - ); - const widened = getWidenedTypeWithContext(original, propContext); - return widened === original ? prop : createSymbolWithType(prop, widened); - } - function getUndefinedProperty(prop) { - const cached = undefinedProperties.get(prop.escapedName); - if (cached) { - return cached; - } - const result = createSymbolWithType(prop, undefinedOrMissingType); - result.flags |= 16777216 /* Optional */; - undefinedProperties.set(prop.escapedName, result); - return result; - } - function getWidenedTypeOfObjectLiteral(type, context) { - const members = createSymbolTable(); - for (const prop of getPropertiesOfObjectType(type)) { - members.set(prop.escapedName, getWidenedProperty(prop, context)); - } - if (context) { - for (const prop of getPropertiesOfContext(context)) { - if (!members.has(prop.escapedName)) { - members.set(prop.escapedName, getUndefinedProperty(prop)); - } - } - } - const result = createAnonymousType( - type.symbol, - members, - emptyArray, - emptyArray, - sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly)) - ); - result.objectFlags |= getObjectFlags(type) & (4096 /* JSLiteral */ | 262144 /* NonInferrableType */); - return result; - } - function getWidenedType(type) { - return getWidenedTypeWithContext( - type, - /*context*/ - void 0 - ); - } - function getWidenedTypeWithContext(type, context) { - if (getObjectFlags(type) & 196608 /* RequiresWidening */) { - if (context === void 0 && type.widened) { - return type.widened; - } - let result; - if (type.flags & (1 /* Any */ | 98304 /* Nullable */)) { - result = anyType; - } else if (isObjectLiteralType2(type)) { - result = getWidenedTypeOfObjectLiteral(type, context); - } else if (type.flags & 1048576 /* Union */) { - const unionContext = context || createWideningContext( - /*parent*/ - void 0, - /*propertyName*/ - void 0, - type.types - ); - const widenedTypes = sameMap(type.types, (t) => t.flags & 98304 /* Nullable */ ? t : getWidenedTypeWithContext(t, unionContext)); - result = getUnionType(widenedTypes, some(widenedTypes, isEmptyObjectType) ? 2 /* Subtype */ : 1 /* Literal */); - } else if (type.flags & 2097152 /* Intersection */) { - result = getIntersectionType(sameMap(type.types, getWidenedType)); - } else if (isArrayOrTupleType(type)) { - result = createTypeReference(type.target, sameMap(getTypeArguments(type), getWidenedType)); - } - if (result && context === void 0) { - type.widened = result; - } - return result || type; - } - return type; - } - function reportWideningErrorsInType(type) { - let errorReported = false; - if (getObjectFlags(type) & 65536 /* ContainsWideningType */) { - if (type.flags & 1048576 /* Union */) { - if (some(type.types, isEmptyObjectType)) { - errorReported = true; - } else { - for (const t of type.types) { - if (reportWideningErrorsInType(t)) { - errorReported = true; - } - } - } - } - if (isArrayOrTupleType(type)) { - for (const t of getTypeArguments(type)) { - if (reportWideningErrorsInType(t)) { - errorReported = true; - } - } - } - if (isObjectLiteralType2(type)) { - for (const p of getPropertiesOfObjectType(type)) { - const t = getTypeOfSymbol(p); - if (getObjectFlags(t) & 65536 /* ContainsWideningType */) { - if (!reportWideningErrorsInType(t)) { - error2(p.valueDeclaration, Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t))); - } - errorReported = true; - } - } - } - } - return errorReported; - } - function reportImplicitAny(declaration, type, wideningKind) { - const typeAsString = typeToString(getWidenedType(type)); - if (isInJSFile(declaration) && !isCheckJsEnabledForFile(getSourceFileOfNode(declaration), compilerOptions)) { - return; - } - let diagnostic; - switch (declaration.kind) { - case 226 /* BinaryExpression */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - diagnostic = noImplicitAny ? Diagnostics.Member_0_implicitly_has_an_1_type : Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; - break; - case 169 /* Parameter */: - const param = declaration; - if (isIdentifier(param.name)) { - const originalKeywordKind = identifierToKeywordKind(param.name); - if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName( - param, - param.name.escapedText, - 788968 /* Type */, - /*nameNotFoundMessage*/ - void 0, - param.name.escapedText, - /*isUse*/ - true - ) || originalKeywordKind && isTypeNodeKind(originalKeywordKind))) { - const newName = "arg" + param.parent.parameters.indexOf(param); - const typeName = declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : ""); - errorOrSuggestion(noImplicitAny, declaration, Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName); - return; - } - } - diagnostic = declaration.dotDotDotToken ? noImplicitAny ? Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage : noImplicitAny ? Diagnostics.Parameter_0_implicitly_has_an_1_type : Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; - break; - case 208 /* BindingElement */: - diagnostic = Diagnostics.Binding_element_0_implicitly_has_an_1_type; - if (!noImplicitAny) { - return; - } - break; - case 324 /* JSDocFunctionType */: - error2(declaration, Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); - return; - case 330 /* JSDocSignature */: - if (noImplicitAny && isJSDocOverloadTag(declaration.parent)) { - error2(declaration.parent.tagName, Diagnostics.This_overload_implicitly_returns_the_type_0_because_it_lacks_a_return_type_annotation, typeAsString); - } - return; - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - if (noImplicitAny && !declaration.name) { - if (wideningKind === 3 /* GeneratorYield */) { - error2(declaration, Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString); - } else { - error2(declaration, Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); - } - return; - } - diagnostic = !noImplicitAny ? Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage : wideningKind === 3 /* GeneratorYield */ ? Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type : Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; - break; - case 200 /* MappedType */: - if (noImplicitAny) { - error2(declaration, Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type); - } - return; - default: - diagnostic = noImplicitAny ? Diagnostics.Variable_0_implicitly_has_an_1_type : Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage; - } - errorOrSuggestion(noImplicitAny, declaration, diagnostic, declarationNameToString(getNameOfDeclaration(declaration)), typeAsString); - } - function reportErrorsFromWidening(declaration, type, wideningKind) { - addLazyDiagnostic(() => { - if (noImplicitAny && getObjectFlags(type) & 65536 /* ContainsWideningType */ && (!wideningKind || !getContextualSignatureForFunctionLikeDeclaration(declaration))) { - if (!reportWideningErrorsInType(type)) { - reportImplicitAny(declaration, type, wideningKind); - } - } - }); - } - function applyToParameterTypes(source, target, callback) { - const sourceCount = getParameterCount(source); - const targetCount = getParameterCount(target); - const sourceRestType = getEffectiveRestType(source); - const targetRestType = getEffectiveRestType(target); - const targetNonRestCount = targetRestType ? targetCount - 1 : targetCount; - const paramCount = sourceRestType ? targetNonRestCount : Math.min(sourceCount, targetNonRestCount); - const sourceThisType = getThisTypeOfSignature(source); - if (sourceThisType) { - const targetThisType = getThisTypeOfSignature(target); - if (targetThisType) { - callback(sourceThisType, targetThisType); - } - } - for (let i = 0; i < paramCount; i++) { - callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i)); - } - if (targetRestType) { - callback(getRestTypeAtPosition(source, paramCount), targetRestType); - } - } - function applyToReturnTypes(source, target, callback) { - const sourceTypePredicate = getTypePredicateOfSignature(source); - const targetTypePredicate = getTypePredicateOfSignature(target); - if (sourceTypePredicate && targetTypePredicate && typePredicateKindsMatch(sourceTypePredicate, targetTypePredicate) && sourceTypePredicate.type && targetTypePredicate.type) { - callback(sourceTypePredicate.type, targetTypePredicate.type); - } else { - callback(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); - } - } - function createInferenceContext(typeParameters, signature, flags, compareTypes) { - return createInferenceContextWorker(typeParameters.map(createInferenceInfo), signature, flags, compareTypes || compareTypesAssignable); - } - function cloneInferenceContext(context, extraFlags = 0) { - return context && createInferenceContextWorker(map(context.inferences, cloneInferenceInfo), context.signature, context.flags | extraFlags, context.compareTypes); - } - function createInferenceContextWorker(inferences, signature, flags, compareTypes) { - const context = { - inferences, - signature, - flags, - compareTypes, - mapper: reportUnmeasurableMapper, - // initialize to a noop mapper so the context object is available, but the underlying object shape is right upon construction - nonFixingMapper: reportUnmeasurableMapper - }; - context.mapper = makeFixingMapperForContext(context); - context.nonFixingMapper = makeNonFixingMapperForContext(context); - return context; - } - function makeFixingMapperForContext(context) { - return makeDeferredTypeMapper(map(context.inferences, (i) => i.typeParameter), map(context.inferences, (inference, i) => () => { - if (!inference.isFixed) { - inferFromIntraExpressionSites(context); - clearCachedInferences(context.inferences); - inference.isFixed = true; - } - return getInferredType(context, i); - })); - } - function makeNonFixingMapperForContext(context) { - return makeDeferredTypeMapper(map(context.inferences, (i) => i.typeParameter), map(context.inferences, (_, i) => () => { - return getInferredType(context, i); - })); - } - function clearCachedInferences(inferences) { - for (const inference of inferences) { - if (!inference.isFixed) { - inference.inferredType = void 0; - } - } - } - function addIntraExpressionInferenceSite(context, node, type) { - (context.intraExpressionInferenceSites ?? (context.intraExpressionInferenceSites = [])).push({ node, type }); - } - function inferFromIntraExpressionSites(context) { - if (context.intraExpressionInferenceSites) { - for (const { node, type } of context.intraExpressionInferenceSites) { - const contextualType = node.kind === 174 /* MethodDeclaration */ ? getContextualTypeForObjectLiteralMethod(node, 2 /* NoConstraints */) : getContextualType2(node, 2 /* NoConstraints */); - if (contextualType) { - inferTypes(context.inferences, type, contextualType); - } - } - context.intraExpressionInferenceSites = void 0; - } - } - function createInferenceInfo(typeParameter) { - return { - typeParameter, - candidates: void 0, - contraCandidates: void 0, - inferredType: void 0, - priority: void 0, - topLevel: true, - isFixed: false, - impliedArity: void 0 - }; - } - function cloneInferenceInfo(inference) { - return { - typeParameter: inference.typeParameter, - candidates: inference.candidates && inference.candidates.slice(), - contraCandidates: inference.contraCandidates && inference.contraCandidates.slice(), - inferredType: inference.inferredType, - priority: inference.priority, - topLevel: inference.topLevel, - isFixed: inference.isFixed, - impliedArity: inference.impliedArity - }; - } - function cloneInferredPartOfContext(context) { - const inferences = filter(context.inferences, hasInferenceCandidates); - return inferences.length ? createInferenceContextWorker(map(inferences, cloneInferenceInfo), context.signature, context.flags, context.compareTypes) : void 0; - } - function getMapperFromContext(context) { - return context && context.mapper; - } - function couldContainTypeVariables(type) { - const objectFlags = getObjectFlags(type); - if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) { - return !!(objectFlags & 1048576 /* CouldContainTypeVariables */); - } - const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables)); - if (type.flags & 138117121 /* ObjectFlagsType */) { - type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0); - } - return result; - } - function isNonGenericTopLevelType(type) { - if (type.aliasSymbol && !type.aliasTypeArguments) { - const declaration = getDeclarationOfKind(type.aliasSymbol, 265 /* TypeAliasDeclaration */); - return !!(declaration && findAncestor(declaration.parent, (n) => n.kind === 312 /* SourceFile */ ? true : n.kind === 267 /* ModuleDeclaration */ ? false : "quit")); - } - return false; - } - function isTypeParameterAtTopLevel(type, tp, depth = 0) { - return !!(type === tp || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isTypeParameterAtTopLevel(t, tp, depth)) || depth < 3 && type.flags & 16777216 /* Conditional */ && (isTypeParameterAtTopLevel(getTrueTypeFromConditionalType(type), tp, depth + 1) || isTypeParameterAtTopLevel(getFalseTypeFromConditionalType(type), tp, depth + 1))); - } - function isTypeParameterAtTopLevelInReturnType(signature, typeParameter) { - const typePredicate = getTypePredicateOfSignature(signature); - return typePredicate ? !!typePredicate.type && isTypeParameterAtTopLevel(typePredicate.type, typeParameter) : isTypeParameterAtTopLevel(getReturnTypeOfSignature(signature), typeParameter); - } - function createEmptyObjectTypeFromStringLiteral(type) { - const members = createSymbolTable(); - forEachType(type, (t) => { - if (!(t.flags & 128 /* StringLiteral */)) { - return; - } - const name = escapeLeadingUnderscores(t.value); - const literalProp = createSymbol(4 /* Property */, name); - literalProp.links.type = anyType; - if (t.symbol) { - literalProp.declarations = t.symbol.declarations; - literalProp.valueDeclaration = t.symbol.valueDeclaration; - } - members.set(name, literalProp); - }); - const indexInfos = type.flags & 4 /* String */ ? [createIndexInfo( - stringType, - emptyObjectType, - /*isReadonly*/ - false - )] : emptyArray; - return createAnonymousType( - /*symbol*/ - void 0, - members, - emptyArray, - emptyArray, - indexInfos - ); - } - function inferTypeForHomomorphicMappedType(source, target, constraint) { - const cacheKey = source.id + "," + target.id + "," + constraint.id; - if (reverseMappedCache.has(cacheKey)) { - return reverseMappedCache.get(cacheKey); - } - const recursionKey = source.id + "," + (target.target || target).id; - if (contains(homomorphicMappedTypeInferenceStack, recursionKey)) { - return void 0; - } - homomorphicMappedTypeInferenceStack.push(recursionKey); - const type = createReverseMappedType(source, target, constraint); - homomorphicMappedTypeInferenceStack.pop(); - reverseMappedCache.set(cacheKey, type); - return type; - } - function isPartiallyInferableType(type) { - return !(getObjectFlags(type) & 262144 /* NonInferrableType */) || isObjectLiteralType2(type) && some(getPropertiesOfType(type), (prop) => isPartiallyInferableType(getTypeOfSymbol(prop))) || isTupleType(type) && some(getElementTypes(type), isPartiallyInferableType); - } - function createReverseMappedType(source, target, constraint) { - if (!(getIndexInfoOfType(source, stringType) || getPropertiesOfType(source).length !== 0 && isPartiallyInferableType(source))) { - return void 0; - } - if (isArrayType(source)) { - return createArrayType(inferReverseMappedType(getTypeArguments(source)[0], target, constraint), isReadonlyArrayType(source)); - } - if (isTupleType(source)) { - const elementTypes = map(getElementTypes(source), (t) => inferReverseMappedType(t, target, constraint)); - const elementFlags = getMappedTypeModifiers(target) & 4 /* IncludeOptional */ ? sameMap(source.target.elementFlags, (f) => f & 2 /* Optional */ ? 1 /* Required */ : f) : source.target.elementFlags; - return createTupleType(elementTypes, elementFlags, source.target.readonly, source.target.labeledElementDeclarations); - } - const reversed = createObjectType( - 1024 /* ReverseMapped */ | 16 /* Anonymous */, - /*symbol*/ - void 0 - ); - reversed.source = source; - reversed.mappedType = target; - reversed.constraintType = constraint; - return reversed; - } - function getTypeOfReverseMappedSymbol(symbol) { - const links = getSymbolLinks(symbol); - if (!links.type) { - links.type = inferReverseMappedType(symbol.links.propertyType, symbol.links.mappedType, symbol.links.constraintType); - } - return links.type; - } - function inferReverseMappedType(sourceType, target, constraint) { - const typeParameter = getIndexedAccessType(constraint.type, getTypeParameterFromMappedType(target)); - const templateType = getTemplateTypeFromMappedType(target); - const inference = createInferenceInfo(typeParameter); - inferTypes([inference], sourceType, templateType); - return getTypeFromInference(inference) || unknownType; - } - function* getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties) { - const properties = getPropertiesOfType(target); - for (const targetProp of properties) { - if (isStaticPrivateIdentifierProperty(targetProp)) { - continue; - } - if (requireOptionalProperties || !(targetProp.flags & 16777216 /* Optional */ || getCheckFlags(targetProp) & 48 /* Partial */)) { - const sourceProp = getPropertyOfType(source, targetProp.escapedName); - if (!sourceProp) { - yield targetProp; - } else if (matchDiscriminantProperties) { - const targetType = getTypeOfSymbol(targetProp); - if (targetType.flags & 109472 /* Unit */) { - const sourceType = getTypeOfSymbol(sourceProp); - if (!(sourceType.flags & 1 /* Any */ || getRegularTypeOfLiteralType(sourceType) === getRegularTypeOfLiteralType(targetType))) { - yield targetProp; - } - } - } - } - } - } - function getUnmatchedProperty(source, target, requireOptionalProperties, matchDiscriminantProperties) { - return firstOrUndefinedIterator(getUnmatchedProperties(source, target, requireOptionalProperties, matchDiscriminantProperties)); - } - function tupleTypesDefinitelyUnrelated(source, target) { - return !(target.target.combinedFlags & 8 /* Variadic */) && target.target.minLength > source.target.minLength || !target.target.hasRestElement && (source.target.hasRestElement || target.target.fixedLength < source.target.fixedLength); - } - function typesDefinitelyUnrelated(source, target) { - return isTupleType(source) && isTupleType(target) ? tupleTypesDefinitelyUnrelated(source, target) : !!getUnmatchedProperty( - source, - target, - /*requireOptionalProperties*/ - false, - /*matchDiscriminantProperties*/ - true - ) && !!getUnmatchedProperty( - target, - source, - /*requireOptionalProperties*/ - false, - /*matchDiscriminantProperties*/ - false - ); - } - function getTypeFromInference(inference) { - return inference.candidates ? getUnionType(inference.candidates, 2 /* Subtype */) : inference.contraCandidates ? getIntersectionType(inference.contraCandidates) : void 0; - } - function hasSkipDirectInferenceFlag(node) { - return !!getNodeLinks(node).skipDirectInference; - } - function isFromInferenceBlockedSource(type) { - return !!(type.symbol && some(type.symbol.declarations, hasSkipDirectInferenceFlag)); - } - function templateLiteralTypesDefinitelyUnrelated(source, target) { - const sourceStart = source.texts[0]; - const targetStart = target.texts[0]; - const sourceEnd = source.texts[source.texts.length - 1]; - const targetEnd = target.texts[target.texts.length - 1]; - const startLen = Math.min(sourceStart.length, targetStart.length); - const endLen = Math.min(sourceEnd.length, targetEnd.length); - return sourceStart.slice(0, startLen) !== targetStart.slice(0, startLen) || sourceEnd.slice(sourceEnd.length - endLen) !== targetEnd.slice(targetEnd.length - endLen); - } - function isValidNumberString(s, roundTripOnly) { - if (s === "") - return false; - const n = +s; - return isFinite(n) && (!roundTripOnly || "" + n === s); - } - function parseBigIntLiteralType(text) { - return getBigIntLiteralType(parseValidBigInt(text)); - } - function isMemberOfStringMapping(source, target) { - if (target.flags & 1 /* Any */) { - return true; - } - if (target.flags & (4 /* String */ | 134217728 /* TemplateLiteral */)) { - return isTypeAssignableTo(source, target); - } - if (target.flags & 268435456 /* StringMapping */) { - const mappingStack = []; - while (target.flags & 268435456 /* StringMapping */) { - mappingStack.unshift(target.symbol); - target = target.type; - } - const mappedSource = reduceLeft(mappingStack, (memo, value) => getStringMappingType(value, memo), source); - return mappedSource === source && isMemberOfStringMapping(source, target); - } - return false; - } - function isValidTypeForTemplateLiteralPlaceholder(source, target) { - if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) { - return true; - } - if (source.flags & 128 /* StringLiteral */) { - const value = source.value; - return !!(target.flags & 8 /* Number */ && isValidNumberString( - value, - /*roundTripOnly*/ - false - ) || target.flags & 64 /* BigInt */ && isValidBigIntString( - value, - /*roundTripOnly*/ - false - ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target)); - } - if (source.flags & 134217728 /* TemplateLiteral */) { - const texts = source.texts; - return texts.length === 2 && texts[0] === "" && texts[1] === "" && isTypeAssignableTo(source.types[0], target); - } - return isTypeAssignableTo(source, target); - } - function inferTypesFromTemplateLiteralType(source, target) { - return source.flags & 128 /* StringLiteral */ ? inferFromLiteralPartsToTemplateLiteral([source.value], emptyArray, target) : source.flags & 134217728 /* TemplateLiteral */ ? arraysEqual(source.texts, target.texts) ? map(source.types, getStringLikeTypeForType) : inferFromLiteralPartsToTemplateLiteral(source.texts, source.types, target) : void 0; - } - function isTypeMatchedByTemplateLiteralType(source, target) { - const inferences = inferTypesFromTemplateLiteralType(source, target); - return !!inferences && every(inferences, (r, i) => isValidTypeForTemplateLiteralPlaceholder(r, target.types[i])); - } - function getStringLikeTypeForType(type) { - return type.flags & (1 /* Any */ | 402653316 /* StringLike */) ? type : getTemplateLiteralType(["", ""], [type]); - } - function inferFromLiteralPartsToTemplateLiteral(sourceTexts, sourceTypes, target) { - const lastSourceIndex = sourceTexts.length - 1; - const sourceStartText = sourceTexts[0]; - const sourceEndText = sourceTexts[lastSourceIndex]; - const targetTexts = target.texts; - const lastTargetIndex = targetTexts.length - 1; - const targetStartText = targetTexts[0]; - const targetEndText = targetTexts[lastTargetIndex]; - if (lastSourceIndex === 0 && sourceStartText.length < targetStartText.length + targetEndText.length || !sourceStartText.startsWith(targetStartText) || !sourceEndText.endsWith(targetEndText)) - return void 0; - const remainingEndText = sourceEndText.slice(0, sourceEndText.length - targetEndText.length); - const matches = []; - let seg = 0; - let pos = targetStartText.length; - for (let i = 1; i < lastTargetIndex; i++) { - const delim = targetTexts[i]; - if (delim.length > 0) { - let s = seg; - let p = pos; - while (true) { - p = getSourceText(s).indexOf(delim, p); - if (p >= 0) - break; - s++; - if (s === sourceTexts.length) - return void 0; - p = 0; - } - addMatch(s, p); - pos += delim.length; - } else if (pos < getSourceText(seg).length) { - addMatch(seg, pos + 1); - } else if (seg < lastSourceIndex) { - addMatch(seg + 1, 0); - } else { - return void 0; - } - } - addMatch(lastSourceIndex, getSourceText(lastSourceIndex).length); - return matches; - function getSourceText(index) { - return index < lastSourceIndex ? sourceTexts[index] : remainingEndText; - } - function addMatch(s, p) { - const matchType = s === seg ? getStringLiteralType(getSourceText(s).slice(pos, p)) : getTemplateLiteralType( - [sourceTexts[seg].slice(pos), ...sourceTexts.slice(seg + 1, s), getSourceText(s).slice(0, p)], - sourceTypes.slice(seg, s) - ); - matches.push(matchType); - seg = s; - pos = p; - } - } - function inferTypes(inferences, originalSource, originalTarget, priority = 0 /* None */, contravariant = false) { - let bivariant = false; - let propagationType; - let inferencePriority = 2048 /* MaxValue */; - let allowComplexConstraintInference = true; - let visited; - let sourceStack; - let targetStack; - let expandingFlags = 0 /* None */; - inferFromTypes(originalSource, originalTarget); - function inferFromTypes(source, target) { - if (!couldContainTypeVariables(target)) { - return; - } - if (source === wildcardType) { - const savePropagationType = propagationType; - propagationType = source; - inferFromTypes(target, target); - propagationType = savePropagationType; - return; - } - if (source.aliasSymbol && source.aliasSymbol === target.aliasSymbol) { - if (source.aliasTypeArguments) { - const params = getSymbolLinks(source.aliasSymbol).typeParameters; - const minParams = getMinTypeArgumentCount(params); - const sourceTypes = fillMissingTypeArguments(source.aliasTypeArguments, params, minParams, isInJSFile(source.aliasSymbol.valueDeclaration)); - const targetTypes = fillMissingTypeArguments(target.aliasTypeArguments, params, minParams, isInJSFile(source.aliasSymbol.valueDeclaration)); - inferFromTypeArguments(sourceTypes, targetTypes, getAliasVariances(source.aliasSymbol)); - } - return; - } - if (source === target && source.flags & 3145728 /* UnionOrIntersection */) { - for (const t of source.types) { - inferFromTypes(t, t); - } - return; - } - if (target.flags & 1048576 /* Union */) { - const [tempSources, tempTargets] = inferFromMatchingTypes(source.flags & 1048576 /* Union */ ? source.types : [source], target.types, isTypeOrBaseIdenticalTo); - const [sources, targets] = inferFromMatchingTypes(tempSources, tempTargets, isTypeCloselyMatchedBy); - if (targets.length === 0) { - return; - } - target = getUnionType(targets); - if (sources.length === 0) { - inferWithPriority(source, target, 1 /* NakedTypeVariable */); - return; - } - source = getUnionType(sources); - } else if (target.flags & 2097152 /* Intersection */ && !every(target.types, isNonGenericObjectType)) { - if (!(source.flags & 1048576 /* Union */)) { - const [sources, targets] = inferFromMatchingTypes(source.flags & 2097152 /* Intersection */ ? source.types : [source], target.types, isTypeIdenticalTo); - if (sources.length === 0 || targets.length === 0) { - return; - } - source = getIntersectionType(sources); - target = getIntersectionType(targets); - } - } else if (target.flags & (8388608 /* IndexedAccess */ | 33554432 /* Substitution */)) { - target = getActualTypeVariable(target); - } - if (target.flags & 8650752 /* TypeVariable */) { - if (isFromInferenceBlockedSource(source)) { - return; - } - const inference = getInferenceInfoForType(target); - if (inference) { - if (getObjectFlags(source) & 262144 /* NonInferrableType */ || source === nonInferrableAnyType) { - return; - } - if (!inference.isFixed) { - if (inference.priority === void 0 || priority < inference.priority) { - inference.candidates = void 0; - inference.contraCandidates = void 0; - inference.topLevel = true; - inference.priority = priority; - } - if (priority === inference.priority) { - const candidate = propagationType || source; - if (contravariant && !bivariant) { - if (!contains(inference.contraCandidates, candidate)) { - inference.contraCandidates = append(inference.contraCandidates, candidate); - clearCachedInferences(inferences); - } - } else if (!contains(inference.candidates, candidate)) { - inference.candidates = append(inference.candidates, candidate); - clearCachedInferences(inferences); - } - } - if (!(priority & 128 /* ReturnType */) && target.flags & 262144 /* TypeParameter */ && inference.topLevel && !isTypeParameterAtTopLevel(originalTarget, target)) { - inference.topLevel = false; - clearCachedInferences(inferences); - } - } - inferencePriority = Math.min(inferencePriority, priority); - return; - } - const simplified = getSimplifiedType( - target, - /*writing*/ - false - ); - if (simplified !== target) { - inferFromTypes(source, simplified); - } else if (target.flags & 8388608 /* IndexedAccess */) { - const indexType = getSimplifiedType( - target.indexType, - /*writing*/ - false - ); - if (indexType.flags & 465829888 /* Instantiable */) { - const simplified2 = distributeIndexOverObjectType( - getSimplifiedType( - target.objectType, - /*writing*/ - false - ), - indexType, - /*writing*/ - false - ); - if (simplified2 && simplified2 !== target) { - inferFromTypes(source, simplified2); - } - } - } - } - if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target)) && !(source.node && target.node)) { - inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target)); - } else if (source.flags & 4194304 /* Index */ && target.flags & 4194304 /* Index */) { - inferFromContravariantTypes(source.type, target.type); - } else if ((isLiteralType(source) || source.flags & 4 /* String */) && target.flags & 4194304 /* Index */) { - const empty = createEmptyObjectTypeFromStringLiteral(source); - inferFromContravariantTypesWithPriority(empty, target.type, 256 /* LiteralKeyof */); - } else if (source.flags & 8388608 /* IndexedAccess */ && target.flags & 8388608 /* IndexedAccess */) { - inferFromTypes(source.objectType, target.objectType); - inferFromTypes(source.indexType, target.indexType); - } else if (source.flags & 268435456 /* StringMapping */ && target.flags & 268435456 /* StringMapping */) { - if (source.symbol === target.symbol) { - inferFromTypes(source.type, target.type); - } - } else if (source.flags & 33554432 /* Substitution */) { - inferFromTypes(source.baseType, target); - inferWithPriority(getSubstitutionIntersection(source), target, 4 /* SubstituteSource */); - } else if (target.flags & 16777216 /* Conditional */) { - invokeOnce(source, target, inferToConditionalType); - } else if (target.flags & 3145728 /* UnionOrIntersection */) { - inferToMultipleTypes(source, target.types, target.flags); - } else if (source.flags & 1048576 /* Union */) { - const sourceTypes = source.types; - for (const sourceType of sourceTypes) { - inferFromTypes(sourceType, target); - } - } else if (target.flags & 134217728 /* TemplateLiteral */) { - inferToTemplateLiteralType(source, target); - } else { - source = getReducedType(source); - if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) { - const apparentSource = getApparentType(source); - if (apparentSource !== source && allowComplexConstraintInference && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) { - allowComplexConstraintInference = false; - return inferFromTypes(apparentSource, target); - } - source = apparentSource; - } - if (source.flags & (524288 /* Object */ | 2097152 /* Intersection */)) { - invokeOnce(source, target, inferFromObjectTypes); - } - } - } - function inferWithPriority(source, target, newPriority) { - const savePriority = priority; - priority |= newPriority; - inferFromTypes(source, target); - priority = savePriority; - } - function inferFromContravariantTypesWithPriority(source, target, newPriority) { - const savePriority = priority; - priority |= newPriority; - inferFromContravariantTypes(source, target); - priority = savePriority; - } - function inferToMultipleTypesWithPriority(source, targets, targetFlags, newPriority) { - const savePriority = priority; - priority |= newPriority; - inferToMultipleTypes(source, targets, targetFlags); - priority = savePriority; - } - function invokeOnce(source, target, action) { - const key = source.id + "," + target.id; - const status = visited && visited.get(key); - if (status !== void 0) { - inferencePriority = Math.min(inferencePriority, status); - return; - } - (visited || (visited = /* @__PURE__ */ new Map())).set(key, -1 /* Circularity */); - const saveInferencePriority = inferencePriority; - inferencePriority = 2048 /* MaxValue */; - const saveExpandingFlags = expandingFlags; - (sourceStack ?? (sourceStack = [])).push(source); - (targetStack ?? (targetStack = [])).push(target); - if (isDeeplyNestedType(source, sourceStack, sourceStack.length, 2)) - expandingFlags |= 1 /* Source */; - if (isDeeplyNestedType(target, targetStack, targetStack.length, 2)) - expandingFlags |= 2 /* Target */; - if (expandingFlags !== 3 /* Both */) { - action(source, target); - } else { - inferencePriority = -1 /* Circularity */; - } - targetStack.pop(); - sourceStack.pop(); - expandingFlags = saveExpandingFlags; - visited.set(key, inferencePriority); - inferencePriority = Math.min(inferencePriority, saveInferencePriority); - } - function inferFromMatchingTypes(sources, targets, matches) { - let matchedSources; - let matchedTargets; - for (const t of targets) { - for (const s of sources) { - if (matches(s, t)) { - inferFromTypes(s, t); - matchedSources = appendIfUnique(matchedSources, s); - matchedTargets = appendIfUnique(matchedTargets, t); - } - } - } - return [ - matchedSources ? filter(sources, (t) => !contains(matchedSources, t)) : sources, - matchedTargets ? filter(targets, (t) => !contains(matchedTargets, t)) : targets - ]; - } - function inferFromTypeArguments(sourceTypes, targetTypes, variances) { - const count = sourceTypes.length < targetTypes.length ? sourceTypes.length : targetTypes.length; - for (let i = 0; i < count; i++) { - if (i < variances.length && (variances[i] & 7 /* VarianceMask */) === 2 /* Contravariant */) { - inferFromContravariantTypes(sourceTypes[i], targetTypes[i]); - } else { - inferFromTypes(sourceTypes[i], targetTypes[i]); - } - } - } - function inferFromContravariantTypes(source, target) { - contravariant = !contravariant; - inferFromTypes(source, target); - contravariant = !contravariant; - } - function inferFromContravariantTypesIfStrictFunctionTypes(source, target) { - if (strictFunctionTypes || priority & 1024 /* AlwaysStrict */) { - inferFromContravariantTypes(source, target); - } else { - inferFromTypes(source, target); - } - } - function getInferenceInfoForType(type) { - if (type.flags & 8650752 /* TypeVariable */) { - for (const inference of inferences) { - if (type === inference.typeParameter) { - return inference; - } - } - } - return void 0; - } - function getSingleTypeVariableFromIntersectionTypes(types) { - let typeVariable; - for (const type of types) { - const t = type.flags & 2097152 /* Intersection */ && find(type.types, (t2) => !!getInferenceInfoForType(t2)); - if (!t || typeVariable && t !== typeVariable) { - return void 0; - } - typeVariable = t; - } - return typeVariable; - } - function inferToMultipleTypes(source, targets, targetFlags) { - let typeVariableCount = 0; - if (targetFlags & 1048576 /* Union */) { - let nakedTypeVariable; - const sources = source.flags & 1048576 /* Union */ ? source.types : [source]; - const matched = new Array(sources.length); - let inferenceCircularity = false; - for (const t of targets) { - if (getInferenceInfoForType(t)) { - nakedTypeVariable = t; - typeVariableCount++; - } else { - for (let i = 0; i < sources.length; i++) { - const saveInferencePriority = inferencePriority; - inferencePriority = 2048 /* MaxValue */; - inferFromTypes(sources[i], t); - if (inferencePriority === priority) - matched[i] = true; - inferenceCircularity = inferenceCircularity || inferencePriority === -1 /* Circularity */; - inferencePriority = Math.min(inferencePriority, saveInferencePriority); - } - } - } - if (typeVariableCount === 0) { - const intersectionTypeVariable = getSingleTypeVariableFromIntersectionTypes(targets); - if (intersectionTypeVariable) { - inferWithPriority(source, intersectionTypeVariable, 1 /* NakedTypeVariable */); - } - return; - } - if (typeVariableCount === 1 && !inferenceCircularity) { - const unmatched = flatMap(sources, (s, i) => matched[i] ? void 0 : s); - if (unmatched.length) { - inferFromTypes(getUnionType(unmatched), nakedTypeVariable); - return; - } - } - } else { - for (const t of targets) { - if (getInferenceInfoForType(t)) { - typeVariableCount++; - } else { - inferFromTypes(source, t); - } - } - } - if (targetFlags & 2097152 /* Intersection */ ? typeVariableCount === 1 : typeVariableCount > 0) { - for (const t of targets) { - if (getInferenceInfoForType(t)) { - inferWithPriority(source, t, 1 /* NakedTypeVariable */); - } - } - } - } - function inferToMappedType(source, target, constraintType) { - if (constraintType.flags & 1048576 /* Union */) { - let result = false; - for (const type of constraintType.types) { - result = inferToMappedType(source, target, type) || result; - } - return result; - } - if (constraintType.flags & 4194304 /* Index */) { - const inference = getInferenceInfoForType(constraintType.type); - if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) { - const inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType); - if (inferredType) { - inferWithPriority( - inferredType, - inference.typeParameter, - getObjectFlags(source) & 262144 /* NonInferrableType */ ? 16 /* PartialHomomorphicMappedType */ : 8 /* HomomorphicMappedType */ - ); - } - } - return true; - } - if (constraintType.flags & 262144 /* TypeParameter */) { - inferWithPriority(getIndexType( - source, - /*indexFlags*/ - !!source.pattern ? 2 /* NoIndexSignatures */ : 0 /* None */ - ), constraintType, 32 /* MappedTypeConstraint */); - const extendedConstraint = getConstraintOfType(constraintType); - if (extendedConstraint && inferToMappedType(source, target, extendedConstraint)) { - return true; - } - const propTypes = map(getPropertiesOfType(source), getTypeOfSymbol); - const indexTypes = map(getIndexInfosOfType(source), (info) => info !== enumNumberIndexInfo ? info.type : neverType); - inferFromTypes(getUnionType(concatenate(propTypes, indexTypes)), getTemplateTypeFromMappedType(target)); - return true; - } - return false; - } - function inferToConditionalType(source, target) { - if (source.flags & 16777216 /* Conditional */) { - inferFromTypes(source.checkType, target.checkType); - inferFromTypes(source.extendsType, target.extendsType); - inferFromTypes(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target)); - inferFromTypes(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target)); - } else { - const targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)]; - inferToMultipleTypesWithPriority(source, targetTypes, target.flags, contravariant ? 64 /* ContravariantConditional */ : 0); - } - } - function inferToTemplateLiteralType(source, target) { - const matches = inferTypesFromTemplateLiteralType(source, target); - const types = target.types; - if (matches || every(target.texts, (s) => s.length === 0)) { - for (let i = 0; i < types.length; i++) { - const source2 = matches ? matches[i] : neverType; - const target2 = types[i]; - if (source2.flags & 128 /* StringLiteral */ && target2.flags & 8650752 /* TypeVariable */) { - const inferenceContext = getInferenceInfoForType(target2); - const constraint = inferenceContext ? getBaseConstraintOfType(inferenceContext.typeParameter) : void 0; - if (constraint && !isTypeAny(constraint)) { - const constraintTypes = constraint.flags & 1048576 /* Union */ ? constraint.types : [constraint]; - let allTypeFlags = reduceLeft(constraintTypes, (flags, t) => flags | t.flags, 0); - if (!(allTypeFlags & 4 /* String */)) { - const str = source2.value; - if (allTypeFlags & 296 /* NumberLike */ && !isValidNumberString( - str, - /*roundTripOnly*/ - true - )) { - allTypeFlags &= ~296 /* NumberLike */; - } - if (allTypeFlags & 2112 /* BigIntLike */ && !isValidBigIntString( - str, - /*roundTripOnly*/ - true - )) { - allTypeFlags &= ~2112 /* BigIntLike */; - } - const matchingType = reduceLeft( - constraintTypes, - (left, right) => !(right.flags & allTypeFlags) ? left : left.flags & 4 /* String */ ? left : right.flags & 4 /* String */ ? source2 : left.flags & 134217728 /* TemplateLiteral */ ? left : right.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source2, right) ? source2 : left.flags & 268435456 /* StringMapping */ ? left : right.flags & 268435456 /* StringMapping */ && str === applyStringMapping(right.symbol, str) ? source2 : left.flags & 128 /* StringLiteral */ ? left : right.flags & 128 /* StringLiteral */ && right.value === str ? right : left.flags & 8 /* Number */ ? left : right.flags & 8 /* Number */ ? getNumberLiteralType(+str) : left.flags & 32 /* Enum */ ? left : right.flags & 32 /* Enum */ ? getNumberLiteralType(+str) : left.flags & 256 /* NumberLiteral */ ? left : right.flags & 256 /* NumberLiteral */ && right.value === +str ? right : left.flags & 64 /* BigInt */ ? left : right.flags & 64 /* BigInt */ ? parseBigIntLiteralType(str) : left.flags & 2048 /* BigIntLiteral */ ? left : right.flags & 2048 /* BigIntLiteral */ && pseudoBigIntToString(right.value) === str ? right : left.flags & 16 /* Boolean */ ? left : right.flags & 16 /* Boolean */ ? str === "true" ? trueType : str === "false" ? falseType : booleanType : left.flags & 512 /* BooleanLiteral */ ? left : right.flags & 512 /* BooleanLiteral */ && right.intrinsicName === str ? right : left.flags & 32768 /* Undefined */ ? left : right.flags & 32768 /* Undefined */ && right.intrinsicName === str ? right : left.flags & 65536 /* Null */ ? left : right.flags & 65536 /* Null */ && right.intrinsicName === str ? right : left, - neverType - ); - if (!(matchingType.flags & 131072 /* Never */)) { - inferFromTypes(matchingType, target2); - continue; - } - } - } - } - inferFromTypes(source2, target2); - } - } - } - function inferFromObjectTypes(source, target) { - var _a, _b; - if (getObjectFlags(source) & 4 /* Reference */ && getObjectFlags(target) & 4 /* Reference */ && (source.target === target.target || isArrayType(source) && isArrayType(target))) { - inferFromTypeArguments(getTypeArguments(source), getTypeArguments(target), getVariances(source.target)); - return; - } - if (isGenericMappedType(source) && isGenericMappedType(target)) { - inferFromTypes(getConstraintTypeFromMappedType(source), getConstraintTypeFromMappedType(target)); - inferFromTypes(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target)); - const sourceNameType = getNameTypeFromMappedType(source); - const targetNameType = getNameTypeFromMappedType(target); - if (sourceNameType && targetNameType) - inferFromTypes(sourceNameType, targetNameType); - } - if (getObjectFlags(target) & 32 /* Mapped */ && !target.declaration.nameType) { - const constraintType = getConstraintTypeFromMappedType(target); - if (inferToMappedType(source, target, constraintType)) { - return; - } - } - if (!typesDefinitelyUnrelated(source, target)) { - if (isArrayOrTupleType(source)) { - if (isTupleType(target)) { - const sourceArity = getTypeReferenceArity(source); - const targetArity = getTypeReferenceArity(target); - const elementTypes = getTypeArguments(target); - const elementFlags = target.target.elementFlags; - if (isTupleType(source) && isTupleTypeStructureMatching(source, target)) { - for (let i = 0; i < targetArity; i++) { - inferFromTypes(getTypeArguments(source)[i], elementTypes[i]); - } - return; - } - const startLength = isTupleType(source) ? Math.min(source.target.fixedLength, target.target.fixedLength) : 0; - const endLength = Math.min( - isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, - target.target.hasRestElement ? getEndElementCount(target.target, 3 /* Fixed */) : 0 - ); - for (let i = 0; i < startLength; i++) { - inferFromTypes(getTypeArguments(source)[i], elementTypes[i]); - } - if (!isTupleType(source) || sourceArity - startLength - endLength === 1 && source.target.elementFlags[startLength] & 4 /* Rest */) { - const restType = getTypeArguments(source)[startLength]; - for (let i = startLength; i < targetArity - endLength; i++) { - inferFromTypes(elementFlags[i] & 8 /* Variadic */ ? createArrayType(restType) : restType, elementTypes[i]); - } - } else { - const middleLength = targetArity - startLength - endLength; - if (middleLength === 2) { - if (elementFlags[startLength] & elementFlags[startLength + 1] & 8 /* Variadic */) { - const targetInfo = getInferenceInfoForType(elementTypes[startLength]); - if (targetInfo && targetInfo.impliedArity !== void 0) { - inferFromTypes(sliceTupleType(source, startLength, endLength + sourceArity - targetInfo.impliedArity), elementTypes[startLength]); - inferFromTypes(sliceTupleType(source, startLength + targetInfo.impliedArity, endLength), elementTypes[startLength + 1]); - } - } else if (elementFlags[startLength] & 8 /* Variadic */ && elementFlags[startLength + 1] & 4 /* Rest */) { - const param = (_a = getInferenceInfoForType(elementTypes[startLength])) == null ? void 0 : _a.typeParameter; - const constraint = param && getBaseConstraintOfType(param); - if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) { - const impliedArity = constraint.target.fixedLength; - inferFromTypes(sliceTupleType(source, startLength, sourceArity - (startLength + impliedArity)), elementTypes[startLength]); - inferFromTypes(getElementTypeOfSliceOfTupleType(source, startLength + impliedArity, endLength), elementTypes[startLength + 1]); - } - } else if (elementFlags[startLength] & 4 /* Rest */ && elementFlags[startLength + 1] & 8 /* Variadic */) { - const param = (_b = getInferenceInfoForType(elementTypes[startLength + 1])) == null ? void 0 : _b.typeParameter; - const constraint = param && getBaseConstraintOfType(param); - if (constraint && isTupleType(constraint) && !constraint.target.hasRestElement) { - const impliedArity = constraint.target.fixedLength; - const endIndex = sourceArity - getEndElementCount(target.target, 3 /* Fixed */); - const startIndex = endIndex - impliedArity; - const trailingSlice = createTupleType( - getTypeArguments(source).slice(startIndex, endIndex), - source.target.elementFlags.slice(startIndex, endIndex), - /*readonly*/ - false, - source.target.labeledElementDeclarations && source.target.labeledElementDeclarations.slice(startIndex, endIndex) - ); - inferFromTypes(getElementTypeOfSliceOfTupleType(source, startLength, endLength + impliedArity), elementTypes[startLength]); - inferFromTypes(trailingSlice, elementTypes[startLength + 1]); - } - } - } else if (middleLength === 1 && elementFlags[startLength] & 8 /* Variadic */) { - const endsInOptional = target.target.elementFlags[targetArity - 1] & 2 /* Optional */; - const sourceSlice = sliceTupleType(source, startLength, endLength); - inferWithPriority(sourceSlice, elementTypes[startLength], endsInOptional ? 2 /* SpeculativeTuple */ : 0); - } else if (middleLength === 1 && elementFlags[startLength] & 4 /* Rest */) { - const restType = getElementTypeOfSliceOfTupleType(source, startLength, endLength); - if (restType) { - inferFromTypes(restType, elementTypes[startLength]); - } - } - } - for (let i = 0; i < endLength; i++) { - inferFromTypes(getTypeArguments(source)[sourceArity - i - 1], elementTypes[targetArity - i - 1]); - } - return; - } - if (isArrayType(target)) { - inferFromIndexTypes(source, target); - return; - } - } - inferFromProperties(source, target); - inferFromSignatures(source, target, 0 /* Call */); - inferFromSignatures(source, target, 1 /* Construct */); - inferFromIndexTypes(source, target); - } - } - function inferFromProperties(source, target) { - const properties = getPropertiesOfObjectType(target); - for (const targetProp of properties) { - const sourceProp = getPropertyOfType(source, targetProp.escapedName); - if (sourceProp && !some(sourceProp.declarations, hasSkipDirectInferenceFlag)) { - inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); - } - } - } - function inferFromSignatures(source, target, kind) { - const sourceSignatures = getSignaturesOfType(source, kind); - const targetSignatures = getSignaturesOfType(target, kind); - const sourceLen = sourceSignatures.length; - const targetLen = targetSignatures.length; - const len = sourceLen < targetLen ? sourceLen : targetLen; - for (let i = 0; i < len; i++) { - inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i])); - } - } - function inferFromSignature(source, target) { - if (!(source.flags & 64 /* IsNonInferrable */)) { - const saveBivariant = bivariant; - const kind = target.declaration ? target.declaration.kind : 0 /* Unknown */; - bivariant = bivariant || kind === 174 /* MethodDeclaration */ || kind === 173 /* MethodSignature */ || kind === 176 /* Constructor */; - applyToParameterTypes(source, target, inferFromContravariantTypesIfStrictFunctionTypes); - bivariant = saveBivariant; - } - applyToReturnTypes(source, target, inferFromTypes); - } - function inferFromIndexTypes(source, target) { - const priority2 = getObjectFlags(source) & getObjectFlags(target) & 32 /* Mapped */ ? 8 /* HomomorphicMappedType */ : 0; - const indexInfos = getIndexInfosOfType(target); - if (isObjectTypeWithInferableIndex(source)) { - for (const targetInfo of indexInfos) { - const propTypes = []; - for (const prop of getPropertiesOfType(source)) { - if (isApplicableIndexType(getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */), targetInfo.keyType)) { - const propType = getTypeOfSymbol(prop); - propTypes.push(prop.flags & 16777216 /* Optional */ ? removeMissingOrUndefinedType(propType) : propType); - } - } - for (const info of getIndexInfosOfType(source)) { - if (isApplicableIndexType(info.keyType, targetInfo.keyType)) { - propTypes.push(info.type); - } - } - if (propTypes.length) { - inferWithPriority(getUnionType(propTypes), targetInfo.type, priority2); - } - } - } - for (const targetInfo of indexInfos) { - const sourceInfo = getApplicableIndexInfo(source, targetInfo.keyType); - if (sourceInfo) { - inferWithPriority(sourceInfo.type, targetInfo.type, priority2); - } - } - } - } - function isTypeOrBaseIdenticalTo(s, t) { - return t === missingType ? s === t : isTypeIdenticalTo(s, t) || !!(t.flags & 4 /* String */ && s.flags & 128 /* StringLiteral */ || t.flags & 8 /* Number */ && s.flags & 256 /* NumberLiteral */); - } - function isTypeCloselyMatchedBy(s, t) { - return !!(s.flags & 524288 /* Object */ && t.flags & 524288 /* Object */ && s.symbol && s.symbol === t.symbol || s.aliasSymbol && s.aliasTypeArguments && s.aliasSymbol === t.aliasSymbol); - } - function hasPrimitiveConstraint(type) { - const constraint = getConstraintOfTypeParameter(type); - return !!constraint && maybeTypeOfKind(constraint.flags & 16777216 /* Conditional */ ? getDefaultConstraintOfConditionalType(constraint) : constraint, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); - } - function isObjectLiteralType2(type) { - return !!(getObjectFlags(type) & 128 /* ObjectLiteral */); - } - function isObjectOrArrayLiteralType(type) { - return !!(getObjectFlags(type) & (128 /* ObjectLiteral */ | 16384 /* ArrayLiteral */)); - } - function unionObjectAndArrayLiteralCandidates(candidates) { - if (candidates.length > 1) { - const objectLiterals = filter(candidates, isObjectOrArrayLiteralType); - if (objectLiterals.length) { - const literalsType = getUnionType(objectLiterals, 2 /* Subtype */); - return concatenate(filter(candidates, (t) => !isObjectOrArrayLiteralType(t)), [literalsType]); - } - } - return candidates; - } - function getContravariantInference(inference) { - return inference.priority & 416 /* PriorityImpliesCombination */ ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates); - } - function getCovariantInference(inference, signature) { - const candidates = unionObjectAndArrayLiteralCandidates(inference.candidates); - const primitiveConstraint = hasPrimitiveConstraint(inference.typeParameter) || isConstTypeVariable(inference.typeParameter); - const widenLiteralTypes = !primitiveConstraint && inference.topLevel && (inference.isFixed || !isTypeParameterAtTopLevelInReturnType(signature, inference.typeParameter)); - const baseCandidates = primitiveConstraint ? sameMap(candidates, getRegularTypeOfLiteralType) : widenLiteralTypes ? sameMap(candidates, getWidenedLiteralType) : candidates; - const unwidenedType = inference.priority & 416 /* PriorityImpliesCombination */ ? getUnionType(baseCandidates, 2 /* Subtype */) : getCommonSupertype(baseCandidates); - return getWidenedType(unwidenedType); - } - function getInferredType(context, index) { - const inference = context.inferences[index]; - if (!inference.inferredType) { - let inferredType; - let fallbackType; - if (context.signature) { - const inferredCovariantType = inference.candidates ? getCovariantInference(inference, context.signature) : void 0; - const inferredContravariantType = inference.contraCandidates ? getContravariantInference(inference) : void 0; - if (inferredCovariantType || inferredContravariantType) { - const preferCovariantType = inferredCovariantType && (!inferredContravariantType || !(inferredCovariantType.flags & 131072 /* Never */) && some(inference.contraCandidates, (t) => isTypeSubtypeOf(inferredCovariantType, t)) && every(context.inferences, (other) => other !== inference && getConstraintOfTypeParameter(other.typeParameter) !== inference.typeParameter || every(other.candidates, (t) => isTypeSubtypeOf(t, inferredCovariantType)))); - inferredType = preferCovariantType ? inferredCovariantType : inferredContravariantType; - fallbackType = preferCovariantType ? inferredContravariantType : inferredCovariantType; - } else if (context.flags & 1 /* NoDefault */) { - inferredType = silentNeverType; - } else { - const defaultType = getDefaultFromTypeParameter(inference.typeParameter); - if (defaultType) { - inferredType = instantiateType(defaultType, mergeTypeMappers(createBackreferenceMapper(context, index), context.nonFixingMapper)); - } - } - } else { - inferredType = getTypeFromInference(inference); - } - inference.inferredType = inferredType || getDefaultTypeArgumentType(!!(context.flags & 2 /* AnyDefault */)); - const constraint = getConstraintOfTypeParameter(inference.typeParameter); - if (constraint) { - const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper); - if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { - inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; - } - } - } - return inference.inferredType; - } - function getDefaultTypeArgumentType(isInJavaScriptFile) { - return isInJavaScriptFile ? anyType : unknownType; - } - function getInferredTypes(context) { - const result = []; - for (let i = 0; i < context.inferences.length; i++) { - result.push(getInferredType(context, i)); - } - return result; - } - function getCannotFindNameDiagnosticForName(node) { - switch (node.escapedText) { - case "document": - case "console": - return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom; - case "$": - return compilerOptions.types ? Diagnostics.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 : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery; - case "describe": - case "suite": - case "it": - case "test": - return compilerOptions.types ? Diagnostics.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 : Diagnostics.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; - case "process": - case "require": - case "Buffer": - case "module": - return compilerOptions.types ? Diagnostics.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 : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode; - case "Map": - case "Set": - case "Promise": - case "Symbol": - case "WeakMap": - case "WeakSet": - case "Iterator": - case "AsyncIterator": - case "SharedArrayBuffer": - case "Atomics": - case "AsyncIterable": - case "AsyncIterableIterator": - case "AsyncGenerator": - case "AsyncGeneratorFunction": - case "BigInt": - case "Reflect": - case "BigInt64Array": - case "BigUint64Array": - return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later; - case "await": - if (isCallExpression(node.parent)) { - return Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function; - } - default: - if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { - return Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer; - } else { - return Diagnostics.Cannot_find_name_0; - } - } - } - function getResolvedSymbol(node) { - const links = getNodeLinks(node); - if (!links.resolvedSymbol) { - links.resolvedSymbol = !nodeIsMissing(node) && resolveName( - node, - node.escapedText, - 111551 /* Value */ | 1048576 /* ExportValue */, - getCannotFindNameDiagnosticForName(node), - node, - !isWriteOnlyAccess(node), - /*excludeGlobals*/ - false - ) || unknownSymbol; - } - return links.resolvedSymbol; - } - function isInAmbientOrTypeNode(node) { - return !!(node.flags & 33554432 /* Ambient */ || findAncestor(node, (n) => isInterfaceDeclaration(n) || isTypeAliasDeclaration(n) || isTypeLiteralNode(n))); - } - function getFlowCacheKey(node, declaredType, initialType, flowContainer) { - switch (node.kind) { - case 80 /* Identifier */: - if (!isThisInTypeQuery(node)) { - const symbol = getResolvedSymbol(node); - return symbol !== unknownSymbol ? `${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}|${getSymbolId(symbol)}` : void 0; - } - case 110 /* ThisKeyword */: - return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; - case 235 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: - return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - case 166 /* QualifiedName */: - const left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer); - return left && left + "." + node.right.escapedText; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - const propName = getAccessedPropertyName(node); - if (propName !== void 0) { - const key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer); - return key && key + "." + propName; - } - break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - return `${getNodeId(node)}#${getTypeId(declaredType)}`; - } - return void 0; - } - function isMatchingReference(source, target) { - switch (target.kind) { - case 217 /* ParenthesizedExpression */: - case 235 /* NonNullExpression */: - return isMatchingReference(source, target.expression); - case 226 /* BinaryExpression */: - return isAssignmentExpression(target) && isMatchingReference(source, target.left) || isBinaryExpression(target) && target.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source, target.right); - } - switch (source.kind) { - case 236 /* MetaProperty */: - return target.kind === 236 /* MetaProperty */ && source.keywordToken === target.keywordToken && source.name.escapedText === target.name.escapedText; - case 80 /* Identifier */: - case 81 /* PrivateIdentifier */: - return isThisInTypeQuery(source) ? target.kind === 110 /* ThisKeyword */ : target.kind === 80 /* Identifier */ && getResolvedSymbol(source) === getResolvedSymbol(target) || (isVariableDeclaration(target) || isBindingElement(target)) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfDeclaration(target); - case 110 /* ThisKeyword */: - return target.kind === 110 /* ThisKeyword */; - case 108 /* SuperKeyword */: - return target.kind === 108 /* SuperKeyword */; - case 235 /* NonNullExpression */: - case 217 /* ParenthesizedExpression */: - return isMatchingReference(source.expression, target); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - const sourcePropertyName = getAccessedPropertyName(source); - const targetPropertyName = isAccessExpression(target) ? getAccessedPropertyName(target) : void 0; - return sourcePropertyName !== void 0 && targetPropertyName !== void 0 && targetPropertyName === sourcePropertyName && isMatchingReference(source.expression, target.expression); - case 166 /* QualifiedName */: - return isAccessExpression(target) && source.right.escapedText === getAccessedPropertyName(target) && isMatchingReference(source.left, target.expression); - case 226 /* BinaryExpression */: - return isBinaryExpression(source) && source.operatorToken.kind === 28 /* CommaToken */ && isMatchingReference(source.right, target); - } - return false; - } - function getAccessedPropertyName(access) { - if (isPropertyAccessExpression(access)) { - return access.name.escapedText; - } - if (isElementAccessExpression(access)) { - return tryGetElementAccessExpressionName(access); - } - if (isBindingElement(access)) { - const name = getDestructuringPropertyName(access); - return name ? escapeLeadingUnderscores(name) : void 0; - } - if (isParameter(access)) { - return "" + access.parent.parameters.indexOf(access); - } - return void 0; - } - function tryGetNameFromType(type) { - return type.flags & 8192 /* UniqueESSymbol */ ? type.escapedName : type.flags & 384 /* StringOrNumberLiteral */ ? escapeLeadingUnderscores("" + type.value) : void 0; - } - function tryGetElementAccessExpressionName(node) { - return isStringOrNumericLiteralLike(node.argumentExpression) ? escapeLeadingUnderscores(node.argumentExpression.text) : isEntityNameExpression(node.argumentExpression) ? tryGetNameFromEntityNameExpression(node.argumentExpression) : void 0; - } - function tryGetNameFromEntityNameExpression(node) { - const symbol = resolveEntityName( - node, - 111551 /* Value */, - /*ignoreErrors*/ - true - ); - if (!symbol || !(isConstantVariable(symbol) || symbol.flags & 8 /* EnumMember */)) - return void 0; - const declaration = symbol.valueDeclaration; - if (declaration === void 0) - return void 0; - const type = tryGetTypeFromEffectiveTypeNode(declaration); - if (type) { - const name = tryGetNameFromType(type); - if (name !== void 0) { - return name; - } - } - if (hasOnlyExpressionInitializer(declaration) && isBlockScopedNameDeclaredBeforeUse(declaration, node)) { - const initializer = getEffectiveInitializer(declaration); - if (initializer) { - return tryGetNameFromType(getTypeOfExpression(initializer)); - } - if (isEnumMember(declaration)) { - return getTextOfPropertyName(declaration.name); - } - } - return void 0; - } - function containsMatchingReference(source, target) { - while (isAccessExpression(source)) { - source = source.expression; - if (isMatchingReference(source, target)) { - return true; - } - } - return false; - } - function optionalChainContainsReference(source, target) { - while (isOptionalChain(source)) { - source = source.expression; - if (isMatchingReference(source, target)) { - return true; - } - } - return false; - } - function isDiscriminantProperty(type, name) { - if (type && type.flags & 1048576 /* Union */) { - const prop = getUnionOrIntersectionProperty(type, name); - if (prop && getCheckFlags(prop) & 2 /* SyntheticProperty */) { - if (prop.links.isDiscriminantProperty === void 0) { - prop.links.isDiscriminantProperty = (prop.links.checkFlags & 192 /* Discriminant */) === 192 /* Discriminant */ && !isGenericType(getTypeOfSymbol(prop)); - } - return !!prop.links.isDiscriminantProperty; - } - } - return false; - } - function findDiscriminantProperties(sourceProperties, target) { - let result; - for (const sourceProperty of sourceProperties) { - if (isDiscriminantProperty(target, sourceProperty.escapedName)) { - if (result) { - result.push(sourceProperty); - continue; - } - result = [sourceProperty]; - } - } - return result; - } - function mapTypesByKeyProperty(types, name) { - const map2 = /* @__PURE__ */ new Map(); - let count = 0; - for (const type of types) { - if (type.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) { - const discriminant = getTypeOfPropertyOfType(type, name); - if (discriminant) { - if (!isLiteralType(discriminant)) { - return void 0; - } - let duplicate = false; - forEachType(discriminant, (t) => { - const id = getTypeId(getRegularTypeOfLiteralType(t)); - const existing = map2.get(id); - if (!existing) { - map2.set(id, type); - } else if (existing !== unknownType) { - map2.set(id, unknownType); - duplicate = true; - } - }); - if (!duplicate) - count++; - } - } - } - return count >= 10 && count * 2 >= types.length ? map2 : void 0; - } - function getKeyPropertyName(unionType) { - const types = unionType.types; - if (types.length < 10 || getObjectFlags(unionType) & 32768 /* PrimitiveUnion */ || countWhere(types, (t) => !!(t.flags & (524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */))) < 10) { - return void 0; - } - if (unionType.keyPropertyName === void 0) { - const keyPropertyName = forEach(types, (t) => t.flags & (524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ? forEach(getPropertiesOfType(t), (p) => isUnitType(getTypeOfSymbol(p)) ? p.escapedName : void 0) : void 0); - const mapByKeyProperty = keyPropertyName && mapTypesByKeyProperty(types, keyPropertyName); - unionType.keyPropertyName = mapByKeyProperty ? keyPropertyName : ""; - unionType.constituentMap = mapByKeyProperty; - } - return unionType.keyPropertyName.length ? unionType.keyPropertyName : void 0; - } - function getConstituentTypeForKeyType(unionType, keyType) { - var _a; - const result = (_a = unionType.constituentMap) == null ? void 0 : _a.get(getTypeId(getRegularTypeOfLiteralType(keyType))); - return result !== unknownType ? result : void 0; - } - function getMatchingUnionConstituentForType(unionType, type) { - const keyPropertyName = getKeyPropertyName(unionType); - const propType = keyPropertyName && getTypeOfPropertyOfType(type, keyPropertyName); - return propType && getConstituentTypeForKeyType(unionType, propType); - } - function getMatchingUnionConstituentForObjectLiteral(unionType, node) { - const keyPropertyName = getKeyPropertyName(unionType); - const propNode = keyPropertyName && find(node.properties, (p) => p.symbol && p.kind === 303 /* PropertyAssignment */ && p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer)); - const propType = propNode && getContextFreeTypeOfExpression(propNode.initializer); - return propType && getConstituentTypeForKeyType(unionType, propType); - } - function isOrContainsMatchingReference(source, target) { - return isMatchingReference(source, target) || containsMatchingReference(source, target); - } - function hasMatchingArgument(expression, reference) { - if (expression.arguments) { - for (const argument of expression.arguments) { - if (isOrContainsMatchingReference(reference, argument)) { - return true; - } - } - } - if (expression.expression.kind === 211 /* PropertyAccessExpression */ && isOrContainsMatchingReference(reference, expression.expression.expression)) { - return true; - } - return false; - } - function getFlowNodeId(flow) { - if (!flow.id || flow.id < 0) { - flow.id = nextFlowId; - nextFlowId++; - } - return flow.id; - } - function typeMaybeAssignableTo(source, target) { - if (!(source.flags & 1048576 /* Union */)) { - return isTypeAssignableTo(source, target); - } - for (const t of source.types) { - if (isTypeAssignableTo(t, target)) { - return true; - } - } - return false; - } - function getAssignmentReducedType(declaredType, assignedType) { - if (declaredType === assignedType) { - return declaredType; - } - if (assignedType.flags & 131072 /* Never */) { - return assignedType; - } - const key = `A${getTypeId(declaredType)},${getTypeId(assignedType)}`; - return getCachedType(key) ?? setCachedType(key, getAssignmentReducedTypeWorker(declaredType, assignedType)); - } - function getAssignmentReducedTypeWorker(declaredType, assignedType) { - const filteredType = filterType(declaredType, (t) => typeMaybeAssignableTo(assignedType, t)); - const reducedType = assignedType.flags & 512 /* BooleanLiteral */ && isFreshLiteralType(assignedType) ? mapType(filteredType, getFreshTypeOfLiteralType) : filteredType; - return isTypeAssignableTo(assignedType, reducedType) ? reducedType : declaredType; - } - function isFunctionObjectType(type) { - const resolved = resolveStructuredTypeMembers(type); - return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType)); - } - function getTypeFacts(type) { - if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) { - type = getBaseConstraintOfType(type) || unknownType; - } - const flags = type.flags; - if (flags & (4 /* String */ | 268435456 /* StringMapping */)) { - return strictNullChecks ? 16317953 /* StringStrictFacts */ : 16776705 /* StringFacts */; - } - if (flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */)) { - const isEmpty = flags & 128 /* StringLiteral */ && type.value === ""; - return strictNullChecks ? isEmpty ? 12123649 /* EmptyStringStrictFacts */ : 7929345 /* NonEmptyStringStrictFacts */ : isEmpty ? 12582401 /* EmptyStringFacts */ : 16776705 /* NonEmptyStringFacts */; - } - if (flags & (8 /* Number */ | 32 /* Enum */)) { - return strictNullChecks ? 16317698 /* NumberStrictFacts */ : 16776450 /* NumberFacts */; - } - if (flags & 256 /* NumberLiteral */) { - const isZero = type.value === 0; - return strictNullChecks ? isZero ? 12123394 /* ZeroNumberStrictFacts */ : 7929090 /* NonZeroNumberStrictFacts */ : isZero ? 12582146 /* ZeroNumberFacts */ : 16776450 /* NonZeroNumberFacts */; - } - if (flags & 64 /* BigInt */) { - return strictNullChecks ? 16317188 /* BigIntStrictFacts */ : 16775940 /* BigIntFacts */; - } - if (flags & 2048 /* BigIntLiteral */) { - const isZero = isZeroBigInt(type); - return strictNullChecks ? isZero ? 12122884 /* ZeroBigIntStrictFacts */ : 7928580 /* NonZeroBigIntStrictFacts */ : isZero ? 12581636 /* ZeroBigIntFacts */ : 16775940 /* NonZeroBigIntFacts */; - } - if (flags & 16 /* Boolean */) { - return strictNullChecks ? 16316168 /* BooleanStrictFacts */ : 16774920 /* BooleanFacts */; - } - if (flags & 528 /* BooleanLike */) { - return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */; - } - if (flags & 524288 /* Object */) { - return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */; - } - if (flags & 16384 /* Void */) { - return 9830144 /* VoidFacts */; - } - if (flags & 32768 /* Undefined */) { - return 26607360 /* UndefinedFacts */; - } - if (flags & 65536 /* Null */) { - return 42917664 /* NullFacts */; - } - if (flags & 12288 /* ESSymbolLike */) { - return strictNullChecks ? 7925520 /* SymbolStrictFacts */ : 16772880 /* SymbolFacts */; - } - if (flags & 67108864 /* NonPrimitive */) { - return strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */; - } - if (flags & 131072 /* Never */) { - return 0 /* None */; - } - if (flags & 1048576 /* Union */) { - return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */); - } - if (flags & 2097152 /* Intersection */) { - return getIntersectionTypeFacts(type); - } - return 83886079 /* UnknownFacts */; - } - function getIntersectionTypeFacts(type) { - const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */); - let oredFacts = 0 /* None */; - let andedFacts = 134217727 /* All */; - for (const t of type.types) { - if (!(ignoreObjects && t.flags & 524288 /* Object */)) { - const f = getTypeFacts(t); - oredFacts |= f; - andedFacts &= f; - } - } - return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */; - } - function getTypeWithFacts(type, include) { - return filterType(type, (t) => (getTypeFacts(t) & include) !== 0); - } - function getAdjustedTypeWithFacts(type, facts) { - const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts)); - if (strictNullChecks) { - switch (facts) { - case 524288 /* NEUndefined */: - return mapType(reduced, (t) => getTypeFacts(t) & 65536 /* EQUndefined */ ? getIntersectionType([t, getTypeFacts(t) & 131072 /* EQNull */ && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t); - case 1048576 /* NENull */: - return mapType(reduced, (t) => getTypeFacts(t) & 131072 /* EQNull */ ? getIntersectionType([t, getTypeFacts(t) & 65536 /* EQUndefined */ && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t); - case 2097152 /* NEUndefinedOrNull */: - case 4194304 /* Truthy */: - return mapType(reduced, (t) => getTypeFacts(t) & 262144 /* EQUndefinedOrNull */ ? getGlobalNonNullableTypeInstantiation(t) : t); - } - } - return reduced; - } - function recombineUnknownType(type) { - return type === unknownUnionType ? unknownType : type; - } - function getTypeWithDefault(type, defaultExpression) { - return defaultExpression ? getUnionType([getNonUndefinedType(type), getTypeOfExpression(defaultExpression)]) : type; - } - function getTypeOfDestructuredProperty(type, name) { - var _a; - const nameType = getLiteralTypeFromPropertyName(name); - if (!isTypeUsableAsPropertyName(nameType)) - return errorType; - const text = getPropertyNameFromType(nameType); - return getTypeOfPropertyOfType(type, text) || includeUndefinedInIndexSignature((_a = getApplicableIndexInfoForName(type, text)) == null ? void 0 : _a.type) || errorType; - } - function getTypeOfDestructuredArrayElement(type, index) { - return everyType(type, isTupleLikeType) && getTupleElementType(type, index) || includeUndefinedInIndexSignature(checkIteratedTypeOrElementType( - 65 /* Destructuring */, - type, - undefinedType, - /*errorNode*/ - void 0 - )) || errorType; - } - function includeUndefinedInIndexSignature(type) { - if (!type) - return type; - return compilerOptions.noUncheckedIndexedAccess ? getUnionType([type, missingType]) : type; - } - function getTypeOfDestructuredSpreadExpression(type) { - return createArrayType(checkIteratedTypeOrElementType( - 65 /* Destructuring */, - type, - undefinedType, - /*errorNode*/ - void 0 - ) || errorType); - } - function getAssignedTypeOfBinaryExpression(node) { - const isDestructuringDefaultAssignment = node.parent.kind === 209 /* ArrayLiteralExpression */ && isDestructuringAssignmentTarget(node.parent) || node.parent.kind === 303 /* PropertyAssignment */ && isDestructuringAssignmentTarget(node.parent.parent); - return isDestructuringDefaultAssignment ? getTypeWithDefault(getAssignedType(node), node.right) : getTypeOfExpression(node.right); - } - function isDestructuringAssignmentTarget(parent2) { - return parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.left === parent2 || parent2.parent.kind === 250 /* ForOfStatement */ && parent2.parent.initializer === parent2; - } - function getAssignedTypeOfArrayLiteralElement(node, element) { - return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element)); - } - function getAssignedTypeOfSpreadExpression(node) { - return getTypeOfDestructuredSpreadExpression(getAssignedType(node.parent)); - } - function getAssignedTypeOfPropertyAssignment(node) { - return getTypeOfDestructuredProperty(getAssignedType(node.parent), node.name); - } - function getAssignedTypeOfShorthandPropertyAssignment(node) { - return getTypeWithDefault(getAssignedTypeOfPropertyAssignment(node), node.objectAssignmentInitializer); - } - function getAssignedType(node) { - const { parent: parent2 } = node; - switch (parent2.kind) { - case 249 /* ForInStatement */: - return stringType; - case 250 /* ForOfStatement */: - return checkRightHandSideOfForOf(parent2) || errorType; - case 226 /* BinaryExpression */: - return getAssignedTypeOfBinaryExpression(parent2); - case 220 /* DeleteExpression */: - return undefinedType; - case 209 /* ArrayLiteralExpression */: - return getAssignedTypeOfArrayLiteralElement(parent2, node); - case 230 /* SpreadElement */: - return getAssignedTypeOfSpreadExpression(parent2); - case 303 /* PropertyAssignment */: - return getAssignedTypeOfPropertyAssignment(parent2); - case 304 /* ShorthandPropertyAssignment */: - return getAssignedTypeOfShorthandPropertyAssignment(parent2); - } - return errorType; - } - function getInitialTypeOfBindingElement(node) { - const pattern = node.parent; - const parentType = getInitialType(pattern.parent); - const type = pattern.kind === 206 /* ObjectBindingPattern */ ? getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) : !node.dotDotDotToken ? getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) : getTypeOfDestructuredSpreadExpression(parentType); - return getTypeWithDefault(type, node.initializer); - } - function getTypeOfInitializer(node) { - const links = getNodeLinks(node); - return links.resolvedType || getTypeOfExpression(node); - } - function getInitialTypeOfVariableDeclaration(node) { - if (node.initializer) { - return getTypeOfInitializer(node.initializer); - } - if (node.parent.parent.kind === 249 /* ForInStatement */) { - return stringType; - } - if (node.parent.parent.kind === 250 /* ForOfStatement */) { - return checkRightHandSideOfForOf(node.parent.parent) || errorType; - } - return errorType; - } - function getInitialType(node) { - return node.kind === 260 /* VariableDeclaration */ ? getInitialTypeOfVariableDeclaration(node) : getInitialTypeOfBindingElement(node); - } - function isEmptyArrayAssignment(node) { - return node.kind === 260 /* VariableDeclaration */ && node.initializer && isEmptyArrayLiteral2(node.initializer) || node.kind !== 208 /* BindingElement */ && node.parent.kind === 226 /* BinaryExpression */ && isEmptyArrayLiteral2(node.parent.right); - } - function getReferenceCandidate(node) { - switch (node.kind) { - case 217 /* ParenthesizedExpression */: - return getReferenceCandidate(node.expression); - case 226 /* BinaryExpression */: - switch (node.operatorToken.kind) { - case 64 /* EqualsToken */: - case 76 /* BarBarEqualsToken */: - case 77 /* AmpersandAmpersandEqualsToken */: - case 78 /* QuestionQuestionEqualsToken */: - return getReferenceCandidate(node.left); - case 28 /* CommaToken */: - return getReferenceCandidate(node.right); - } - } - return node; - } - function getReferenceRoot(node) { - const { parent: parent2 } = node; - return parent2.kind === 217 /* ParenthesizedExpression */ || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */ && parent2.left === node || parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 28 /* CommaToken */ && parent2.right === node ? getReferenceRoot(parent2) : node; - } - function getTypeOfSwitchClause(clause) { - if (clause.kind === 296 /* CaseClause */) { - return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression)); - } - return neverType; - } - function getSwitchClauseTypes(switchStatement) { - const links = getNodeLinks(switchStatement); - if (!links.switchTypes) { - links.switchTypes = []; - for (const clause of switchStatement.caseBlock.clauses) { - links.switchTypes.push(getTypeOfSwitchClause(clause)); - } - } - return links.switchTypes; - } - function getSwitchClauseTypeOfWitnesses(switchStatement) { - if (some(switchStatement.caseBlock.clauses, (clause) => clause.kind === 296 /* CaseClause */ && !isStringLiteralLike(clause.expression))) { - return void 0; - } - const witnesses = []; - for (const clause of switchStatement.caseBlock.clauses) { - const text = clause.kind === 296 /* CaseClause */ ? clause.expression.text : void 0; - witnesses.push(text && !contains(witnesses, text) ? text : void 0); - } - return witnesses; - } - function eachTypeContainedIn(source, types) { - return source.flags & 1048576 /* Union */ ? !forEach(source.types, (t) => !contains(types, t)) : contains(types, source); - } - function isTypeSubsetOf(source, target) { - return !!(source === target || source.flags & 131072 /* Never */ || target.flags & 1048576 /* Union */ && isTypeSubsetOfUnion(source, target)); - } - function isTypeSubsetOfUnion(source, target) { - if (source.flags & 1048576 /* Union */) { - for (const t of source.types) { - if (!containsType(target.types, t)) { - return false; - } - } - return true; - } - if (source.flags & 1056 /* EnumLike */ && getBaseTypeOfEnumLikeType(source) === target) { - return true; - } - return containsType(target.types, source); - } - function forEachType(type, f) { - return type.flags & 1048576 /* Union */ ? forEach(type.types, f) : f(type); - } - function someType(type, f) { - return type.flags & 1048576 /* Union */ ? some(type.types, f) : f(type); - } - function everyType(type, f) { - return type.flags & 1048576 /* Union */ ? every(type.types, f) : f(type); - } - function everyContainedType(type, f) { - return type.flags & 3145728 /* UnionOrIntersection */ ? every(type.types, f) : f(type); - } - function filterType(type, f) { - if (type.flags & 1048576 /* Union */) { - const types = type.types; - const filtered = filter(types, f); - if (filtered === types) { - return type; - } - const origin = type.origin; - let newOrigin; - if (origin && origin.flags & 1048576 /* Union */) { - const originTypes = origin.types; - const originFiltered = filter(originTypes, (t) => !!(t.flags & 1048576 /* Union */) || f(t)); - if (originTypes.length - originFiltered.length === types.length - filtered.length) { - if (originFiltered.length === 1) { - return originFiltered[0]; - } - newOrigin = createOriginUnionOrIntersectionType(1048576 /* Union */, originFiltered); - } - } - return getUnionTypeFromSortedList( - filtered, - type.objectFlags & (32768 /* PrimitiveUnion */ | 16777216 /* ContainsIntersections */), - /*aliasSymbol*/ - void 0, - /*aliasTypeArguments*/ - void 0, - newOrigin - ); - } - return type.flags & 131072 /* Never */ || f(type) ? type : neverType; - } - function removeType(type, targetType) { - return filterType(type, (t) => t !== targetType); - } - function countTypes(type) { - return type.flags & 1048576 /* Union */ ? type.types.length : 1; - } - function mapType(type, mapper, noReductions) { - if (type.flags & 131072 /* Never */) { - return type; - } - if (!(type.flags & 1048576 /* Union */)) { - return mapper(type); - } - const origin = type.origin; - const types = origin && origin.flags & 1048576 /* Union */ ? origin.types : type.types; - let mappedTypes; - let changed = false; - for (const t of types) { - const mapped = t.flags & 1048576 /* Union */ ? mapType(t, mapper, noReductions) : mapper(t); - changed || (changed = t !== mapped); - if (mapped) { - if (!mappedTypes) { - mappedTypes = [mapped]; - } else { - mappedTypes.push(mapped); - } - } - } - return changed ? mappedTypes && getUnionType(mappedTypes, noReductions ? 0 /* None */ : 1 /* Literal */) : type; - } - function mapTypeWithAlias(type, mapper, aliasSymbol, aliasTypeArguments) { - return type.flags & 1048576 /* Union */ && aliasSymbol ? getUnionType(map(type.types, mapper), 1 /* Literal */, aliasSymbol, aliasTypeArguments) : mapType(type, mapper); - } - function extractTypesOfKind(type, kind) { - return filterType(type, (t) => (t.flags & kind) !== 0); - } - function replacePrimitivesWithLiterals(typeWithPrimitives, typeWithLiterals) { - if (maybeTypeOfKind(typeWithPrimitives, 4 /* String */ | 134217728 /* TemplateLiteral */ | 8 /* Number */ | 64 /* BigInt */) && maybeTypeOfKind(typeWithLiterals, 128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */ | 256 /* NumberLiteral */ | 2048 /* BigIntLiteral */)) { - return mapType(typeWithPrimitives, (t) => t.flags & 4 /* String */ ? extractTypesOfKind(typeWithLiterals, 4 /* String */ | 128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) : isPatternLiteralType(t) && !maybeTypeOfKind(typeWithLiterals, 4 /* String */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) ? extractTypesOfKind(typeWithLiterals, 128 /* StringLiteral */) : t.flags & 8 /* Number */ ? extractTypesOfKind(typeWithLiterals, 8 /* Number */ | 256 /* NumberLiteral */) : t.flags & 64 /* BigInt */ ? extractTypesOfKind(typeWithLiterals, 64 /* BigInt */ | 2048 /* BigIntLiteral */) : t); - } - return typeWithPrimitives; - } - function isIncomplete(flowType) { - return flowType.flags === 0; - } - function getTypeFromFlowType(flowType) { - return flowType.flags === 0 ? flowType.type : flowType; - } - function createFlowType(type, incomplete) { - return incomplete ? { flags: 0, type: type.flags & 131072 /* Never */ ? silentNeverType : type } : type; - } - function createEvolvingArrayType(elementType) { - const result = createObjectType(256 /* EvolvingArray */); - result.elementType = elementType; - return result; - } - function getEvolvingArrayType(elementType) { - return evolvingArrayTypes[elementType.id] || (evolvingArrayTypes[elementType.id] = createEvolvingArrayType(elementType)); - } - function addEvolvingArrayElementType(evolvingArrayType, node) { - const elementType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(getContextFreeTypeOfExpression(node))); - return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType])); - } - function createFinalArrayType(elementType) { - return elementType.flags & 131072 /* Never */ ? autoArrayType : createArrayType(elementType.flags & 1048576 /* Union */ ? getUnionType(elementType.types, 2 /* Subtype */) : elementType); - } - function getFinalArrayType(evolvingArrayType) { - return evolvingArrayType.finalArrayType || (evolvingArrayType.finalArrayType = createFinalArrayType(evolvingArrayType.elementType)); - } - function finalizeEvolvingArrayType(type) { - return getObjectFlags(type) & 256 /* EvolvingArray */ ? getFinalArrayType(type) : type; - } - function getElementTypeOfEvolvingArrayType(type) { - return getObjectFlags(type) & 256 /* EvolvingArray */ ? type.elementType : neverType; - } - function isEvolvingArrayTypeList(types) { - let hasEvolvingArrayType = false; - for (const t of types) { - if (!(t.flags & 131072 /* Never */)) { - if (!(getObjectFlags(t) & 256 /* EvolvingArray */)) { - return false; - } - hasEvolvingArrayType = true; - } - } - return hasEvolvingArrayType; - } - function isEvolvingArrayOperationTarget(node) { - const root = getReferenceRoot(node); - const parent2 = root.parent; - const isLengthPushOrUnshift = isPropertyAccessExpression(parent2) && (parent2.name.escapedText === "length" || parent2.parent.kind === 213 /* CallExpression */ && isIdentifier(parent2.name) && isPushOrUnshiftIdentifier(parent2.name)); - const isElementAssignment = parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === root && parent2.parent.kind === 226 /* BinaryExpression */ && parent2.parent.operatorToken.kind === 64 /* EqualsToken */ && parent2.parent.left === parent2 && !isAssignmentTarget(parent2.parent) && isTypeAssignableToKind(getTypeOfExpression(parent2.argumentExpression), 296 /* NumberLike */); - return isLengthPushOrUnshift || isElementAssignment; - } - function isDeclarationWithExplicitTypeAnnotation(node) { - return (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isParameter(node)) && !!(getEffectiveTypeAnnotationNode(node) || isInJSFile(node) && hasInitializer(node) && node.initializer && isFunctionExpressionOrArrowFunction(node.initializer) && getEffectiveReturnTypeNode(node.initializer)); - } - function getExplicitTypeOfSymbol(symbol, diagnostic) { - symbol = resolveSymbol(symbol); - if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 512 /* ValueModule */)) { - return getTypeOfSymbol(symbol); - } - if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) { - if (getCheckFlags(symbol) & 262144 /* Mapped */) { - const origin = symbol.links.syntheticOrigin; - if (origin && getExplicitTypeOfSymbol(origin)) { - return getTypeOfSymbol(symbol); - } - } - const declaration = symbol.valueDeclaration; - if (declaration) { - if (isDeclarationWithExplicitTypeAnnotation(declaration)) { - return getTypeOfSymbol(symbol); - } - if (isVariableDeclaration(declaration) && declaration.parent.parent.kind === 250 /* ForOfStatement */) { - const statement = declaration.parent.parent; - const expressionType = getTypeOfDottedName( - statement.expression, - /*diagnostic*/ - void 0 - ); - if (expressionType) { - const use = statement.awaitModifier ? 15 /* ForAwaitOf */ : 13 /* ForOf */; - return checkIteratedTypeOrElementType( - use, - expressionType, - undefinedType, - /*errorNode*/ - void 0 - ); - } - } - if (diagnostic) { - addRelatedInfo(diagnostic, createDiagnosticForNode(declaration, Diagnostics._0_needs_an_explicit_type_annotation, symbolToString(symbol))); - } - } - } - } - function getTypeOfDottedName(node, diagnostic) { - if (!(node.flags & 67108864 /* InWithStatement */)) { - switch (node.kind) { - case 80 /* Identifier */: - const symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node)); - return getExplicitTypeOfSymbol(symbol, diagnostic); - case 110 /* ThisKeyword */: - return getExplicitThisType(node); - case 108 /* SuperKeyword */: - return checkSuperExpression(node); - case 211 /* PropertyAccessExpression */: { - const type = getTypeOfDottedName(node.expression, diagnostic); - if (type) { - const name = node.name; - let prop; - if (isPrivateIdentifier(name)) { - if (!type.symbol) { - return void 0; - } - prop = getPropertyOfType(type, getSymbolNameForPrivateIdentifier(type.symbol, name.escapedText)); - } else { - prop = getPropertyOfType(type, name.escapedText); - } - return prop && getExplicitTypeOfSymbol(prop, diagnostic); - } - return void 0; - } - case 217 /* ParenthesizedExpression */: - return getTypeOfDottedName(node.expression, diagnostic); - } - } - } - function getEffectsSignature(node) { - const links = getNodeLinks(node); - let signature = links.effectsSignature; - if (signature === void 0) { - let funcType; - if (node.parent.kind === 244 /* ExpressionStatement */) { - funcType = getTypeOfDottedName( - node.expression, - /*diagnostic*/ - void 0 - ); - } else if (node.expression.kind !== 108 /* SuperKeyword */) { - if (isOptionalChain(node)) { - funcType = checkNonNullType( - getOptionalExpressionType(checkExpression(node.expression), node.expression), - node.expression - ); - } else { - funcType = checkNonNullExpression(node.expression); - } - } - const signatures = getSignaturesOfType(funcType && getApparentType(funcType) || unknownType, 0 /* Call */); - const candidate = signatures.length === 1 && !signatures[0].typeParameters ? signatures[0] : some(signatures, hasTypePredicateOrNeverReturnType) ? getResolvedSignature(node) : void 0; - signature = links.effectsSignature = candidate && hasTypePredicateOrNeverReturnType(candidate) ? candidate : unknownSignature; - } - return signature === unknownSignature ? void 0 : signature; - } - function hasTypePredicateOrNeverReturnType(signature) { - return !!(getTypePredicateOfSignature(signature) || signature.declaration && (getReturnTypeFromAnnotation(signature.declaration) || unknownType).flags & 131072 /* Never */); - } - function getTypePredicateArgument(predicate, callExpression) { - if (predicate.kind === 1 /* Identifier */ || predicate.kind === 3 /* AssertsIdentifier */) { - return callExpression.arguments[predicate.parameterIndex]; - } - const invokedExpression = skipParentheses(callExpression.expression); - return isAccessExpression(invokedExpression) ? skipParentheses(invokedExpression.expression) : void 0; - } - function reportFlowControlError(node) { - const block = findAncestor(node, isFunctionOrModuleBlock); - const sourceFile = getSourceFileOfNode(node); - const span = getSpanOfTokenAtPosition(sourceFile, block.statements.pos); - diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_containing_function_or_module_body_is_too_large_for_control_flow_analysis)); - } - function isReachableFlowNode(flow) { - const result = isReachableFlowNodeWorker( - flow, - /*noCacheCheck*/ - false - ); - lastFlowNode = flow; - lastFlowNodeReachable = result; - return result; - } - function isFalseExpression(expr) { - const node = skipParentheses( - expr, - /*excludeJSDocTypeAssertions*/ - true - ); - return node.kind === 97 /* FalseKeyword */ || node.kind === 226 /* BinaryExpression */ && (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && (isFalseExpression(node.left) || isFalseExpression(node.right)) || node.operatorToken.kind === 57 /* BarBarToken */ && isFalseExpression(node.left) && isFalseExpression(node.right)); - } - function isReachableFlowNodeWorker(flow, noCacheCheck) { - while (true) { - if (flow === lastFlowNode) { - return lastFlowNodeReachable; - } - const flags = flow.flags; - if (flags & 4096 /* Shared */) { - if (!noCacheCheck) { - const id = getFlowNodeId(flow); - const reachable = flowNodeReachable[id]; - return reachable !== void 0 ? reachable : flowNodeReachable[id] = isReachableFlowNodeWorker( - flow, - /*noCacheCheck*/ - true - ); - } - noCacheCheck = false; - } - if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */)) { - flow = flow.antecedent; - } else if (flags & 512 /* Call */) { - const signature = getEffectsSignature(flow.node); - if (signature) { - const predicate = getTypePredicateOfSignature(signature); - if (predicate && predicate.kind === 3 /* AssertsIdentifier */ && !predicate.type) { - const predicateArgument = flow.node.arguments[predicate.parameterIndex]; - if (predicateArgument && isFalseExpression(predicateArgument)) { - return false; - } - } - if (getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { - return false; - } - } - flow = flow.antecedent; - } else if (flags & 4 /* BranchLabel */) { - return some(flow.antecedents, (f) => isReachableFlowNodeWorker( - f, - /*noCacheCheck*/ - false - )); - } else if (flags & 8 /* LoopLabel */) { - const antecedents = flow.antecedents; - if (antecedents === void 0 || antecedents.length === 0) { - return false; - } - flow = antecedents[0]; - } else if (flags & 128 /* SwitchClause */) { - if (flow.clauseStart === flow.clauseEnd && isExhaustiveSwitchStatement(flow.switchStatement)) { - return false; - } - flow = flow.antecedent; - } else if (flags & 1024 /* ReduceLabel */) { - lastFlowNode = void 0; - const target = flow.target; - const saveAntecedents = target.antecedents; - target.antecedents = flow.antecedents; - const result = isReachableFlowNodeWorker( - flow.antecedent, - /*noCacheCheck*/ - false - ); - target.antecedents = saveAntecedents; - return result; - } else { - return !(flags & 1 /* Unreachable */); - } - } - } - function isPostSuperFlowNode(flow, noCacheCheck) { - while (true) { - const flags = flow.flags; - if (flags & 4096 /* Shared */) { - if (!noCacheCheck) { - const id = getFlowNodeId(flow); - const postSuper = flowNodePostSuper[id]; - return postSuper !== void 0 ? postSuper : flowNodePostSuper[id] = isPostSuperFlowNode( - flow, - /*noCacheCheck*/ - true - ); - } - noCacheCheck = false; - } - if (flags & (16 /* Assignment */ | 96 /* Condition */ | 256 /* ArrayMutation */ | 128 /* SwitchClause */)) { - flow = flow.antecedent; - } else if (flags & 512 /* Call */) { - if (flow.node.expression.kind === 108 /* SuperKeyword */) { - return true; - } - flow = flow.antecedent; - } else if (flags & 4 /* BranchLabel */) { - return every(flow.antecedents, (f) => isPostSuperFlowNode( - f, - /*noCacheCheck*/ - false - )); - } else if (flags & 8 /* LoopLabel */) { - flow = flow.antecedents[0]; - } else if (flags & 1024 /* ReduceLabel */) { - const target = flow.target; - const saveAntecedents = target.antecedents; - target.antecedents = flow.antecedents; - const result = isPostSuperFlowNode( - flow.antecedent, - /*noCacheCheck*/ - false - ); - target.antecedents = saveAntecedents; - return result; - } else { - return !!(flags & 1 /* Unreachable */); - } - } - } - function isConstantReference(node) { - switch (node.kind) { - case 110 /* ThisKeyword */: - return true; - case 80 /* Identifier */: - if (!isThisInTypeQuery(node)) { - const symbol = getResolvedSymbol(node); - return isConstantVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol); - } - break; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol); - } - return false; - } - function getFlowTypeOfReference(reference, declaredType, initialType = declaredType, flowContainer, flowNode = ((_a) => (_a = tryCast(reference, canHaveFlowNode)) == null ? void 0 : _a.flowNode)()) { - let key; - let isKeySet = false; - let flowDepth = 0; - if (flowAnalysisDisabled) { - return errorType; - } - if (!flowNode) { - return declaredType; - } - flowInvocationCount++; - const sharedFlowStart = sharedFlowCount; - const evolvedType = getTypeFromFlowType(getTypeAtFlowNode(flowNode)); - sharedFlowCount = sharedFlowStart; - const resultType = getObjectFlags(evolvedType) & 256 /* EvolvingArray */ && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType); - if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 235 /* NonNullExpression */ && !(resultType.flags & 131072 /* Never */) && getTypeWithFacts(resultType, 2097152 /* NEUndefinedOrNull */).flags & 131072 /* Never */) { - return declaredType; - } - return resultType === nonNullUnknownType ? unknownType : resultType; - function getOrSetCacheKey() { - if (isKeySet) { - return key; - } - isKeySet = true; - return key = getFlowCacheKey(reference, declaredType, initialType, flowContainer); - } - function getTypeAtFlowNode(flow) { - var _a2; - if (flowDepth === 2e3) { - (_a2 = tracing) == null ? void 0 : _a2.instant(tracing.Phase.CheckTypes, "getTypeAtFlowNode_DepthLimit", { flowId: flow.id }); - flowAnalysisDisabled = true; - reportFlowControlError(reference); - return errorType; - } - flowDepth++; - let sharedFlow; - while (true) { - const flags = flow.flags; - if (flags & 4096 /* Shared */) { - for (let i = sharedFlowStart; i < sharedFlowCount; i++) { - if (sharedFlowNodes[i] === flow) { - flowDepth--; - return sharedFlowTypes[i]; - } - } - sharedFlow = flow; - } - let type; - if (flags & 16 /* Assignment */) { - type = getTypeAtFlowAssignment(flow); - if (!type) { - flow = flow.antecedent; - continue; - } - } else if (flags & 512 /* Call */) { - type = getTypeAtFlowCall(flow); - if (!type) { - flow = flow.antecedent; - continue; - } - } else if (flags & 96 /* Condition */) { - type = getTypeAtFlowCondition(flow); - } else if (flags & 128 /* SwitchClause */) { - type = getTypeAtSwitchClause(flow); - } else if (flags & 12 /* Label */) { - if (flow.antecedents.length === 1) { - flow = flow.antecedents[0]; - continue; - } - type = flags & 4 /* BranchLabel */ ? getTypeAtFlowBranchLabel(flow) : getTypeAtFlowLoopLabel(flow); - } else if (flags & 256 /* ArrayMutation */) { - type = getTypeAtFlowArrayMutation(flow); - if (!type) { - flow = flow.antecedent; - continue; - } - } else if (flags & 1024 /* ReduceLabel */) { - const target = flow.target; - const saveAntecedents = target.antecedents; - target.antecedents = flow.antecedents; - type = getTypeAtFlowNode(flow.antecedent); - target.antecedents = saveAntecedents; - } else if (flags & 2 /* Start */) { - const container = flow.node; - if (container && container !== flowContainer && reference.kind !== 211 /* PropertyAccessExpression */ && reference.kind !== 212 /* ElementAccessExpression */ && !(reference.kind === 110 /* ThisKeyword */ && container.kind !== 219 /* ArrowFunction */)) { - flow = container.flowNode; - continue; - } - type = initialType; - } else { - type = convertAutoToAny(declaredType); - } - if (sharedFlow) { - sharedFlowNodes[sharedFlowCount] = sharedFlow; - sharedFlowTypes[sharedFlowCount] = type; - sharedFlowCount++; - } - flowDepth--; - return type; - } - } - function getInitialOrAssignedType(flow) { - const node = flow.node; - return getNarrowableTypeForReference(node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); - } - function getTypeAtFlowAssignment(flow) { - const node = flow.node; - if (isMatchingReference(reference, node)) { - if (!isReachableFlowNode(flow)) { - return unreachableNeverType; - } - if (getAssignmentTargetKind(node) === 2 /* Compound */) { - const flowType = getTypeAtFlowNode(flow.antecedent); - return createFlowType(getBaseTypeOfLiteralType(getTypeFromFlowType(flowType)), isIncomplete(flowType)); - } - if (declaredType === autoType || declaredType === autoArrayType) { - if (isEmptyArrayAssignment(node)) { - return getEvolvingArrayType(neverType); - } - const assignedType = getWidenedLiteralType(getInitialOrAssignedType(flow)); - return isTypeAssignableTo(assignedType, declaredType) ? assignedType : anyArrayType; - } - if (declaredType.flags & 1048576 /* Union */) { - return getAssignmentReducedType(declaredType, getInitialOrAssignedType(flow)); - } - return declaredType; - } - if (containsMatchingReference(reference, node)) { - if (!isReachableFlowNode(flow)) { - return unreachableNeverType; - } - if (isVariableDeclaration(node) && (isInJSFile(node) || isVarConstLike(node))) { - const init = getDeclaredExpandoInitializer(node); - if (init && (init.kind === 218 /* FunctionExpression */ || init.kind === 219 /* ArrowFunction */)) { - return getTypeAtFlowNode(flow.antecedent); - } - } - return declaredType; - } - if (isVariableDeclaration(node) && node.parent.parent.kind === 249 /* ForInStatement */ && (isMatchingReference(reference, node.parent.parent.expression) || optionalChainContainsReference(node.parent.parent.expression, reference))) { - return getNonNullableTypeIfNeeded(finalizeEvolvingArrayType(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)))); - } - return void 0; - } - function narrowTypeByAssertion(type, expr) { - const node = skipParentheses( - expr, - /*excludeJSDocTypeAssertions*/ - true - ); - if (node.kind === 97 /* FalseKeyword */) { - return unreachableNeverType; - } - if (node.kind === 226 /* BinaryExpression */) { - if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) { - return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right); - } - if (node.operatorToken.kind === 57 /* BarBarToken */) { - return getUnionType([narrowTypeByAssertion(type, node.left), narrowTypeByAssertion(type, node.right)]); - } - } - return narrowType( - type, - node, - /*assumeTrue*/ - true - ); - } - function getTypeAtFlowCall(flow) { - const signature = getEffectsSignature(flow.node); - if (signature) { - const predicate = getTypePredicateOfSignature(signature); - if (predicate && (predicate.kind === 2 /* AssertsThis */ || predicate.kind === 3 /* AssertsIdentifier */)) { - const flowType = getTypeAtFlowNode(flow.antecedent); - const type = finalizeEvolvingArrayType(getTypeFromFlowType(flowType)); - const narrowedType = predicate.type ? narrowTypeByTypePredicate( - type, - predicate, - flow.node, - /*assumeTrue*/ - true - ) : predicate.kind === 3 /* AssertsIdentifier */ && predicate.parameterIndex >= 0 && predicate.parameterIndex < flow.node.arguments.length ? narrowTypeByAssertion(type, flow.node.arguments[predicate.parameterIndex]) : type; - return narrowedType === type ? flowType : createFlowType(narrowedType, isIncomplete(flowType)); - } - if (getReturnTypeOfSignature(signature).flags & 131072 /* Never */) { - return unreachableNeverType; - } - } - return void 0; - } - function getTypeAtFlowArrayMutation(flow) { - if (declaredType === autoType || declaredType === autoArrayType) { - const node = flow.node; - const expr = node.kind === 213 /* CallExpression */ ? node.expression.expression : node.left.expression; - if (isMatchingReference(reference, getReferenceCandidate(expr))) { - const flowType = getTypeAtFlowNode(flow.antecedent); - const type = getTypeFromFlowType(flowType); - if (getObjectFlags(type) & 256 /* EvolvingArray */) { - let evolvedType2 = type; - if (node.kind === 213 /* CallExpression */) { - for (const arg of node.arguments) { - evolvedType2 = addEvolvingArrayElementType(evolvedType2, arg); - } - } else { - const indexType = getContextFreeTypeOfExpression(node.left.argumentExpression); - if (isTypeAssignableToKind(indexType, 296 /* NumberLike */)) { - evolvedType2 = addEvolvingArrayElementType(evolvedType2, node.right); - } - } - return evolvedType2 === type ? flowType : createFlowType(evolvedType2, isIncomplete(flowType)); - } - return flowType; - } - } - return void 0; - } - function getTypeAtFlowCondition(flow) { - const flowType = getTypeAtFlowNode(flow.antecedent); - const type = getTypeFromFlowType(flowType); - if (type.flags & 131072 /* Never */) { - return flowType; - } - const assumeTrue = (flow.flags & 32 /* TrueCondition */) !== 0; - const nonEvolvingType = finalizeEvolvingArrayType(type); - const narrowedType = narrowType(nonEvolvingType, flow.node, assumeTrue); - if (narrowedType === nonEvolvingType) { - return flowType; - } - return createFlowType(narrowedType, isIncomplete(flowType)); - } - function getTypeAtSwitchClause(flow) { - const expr = flow.switchStatement.expression; - const flowType = getTypeAtFlowNode(flow.antecedent); - let type = getTypeFromFlowType(flowType); - if (isMatchingReference(reference, expr)) { - type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { - type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } else { - if (strictNullChecks) { - if (optionalChainContainsReference(expr, reference)) { - type = narrowTypeBySwitchOptionalChainContainment( - type, - flow.switchStatement, - flow.clauseStart, - flow.clauseEnd, - (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) - ); - } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { - type = narrowTypeBySwitchOptionalChainContainment( - type, - flow.switchStatement, - flow.clauseStart, - flow.clauseEnd, - (t) => !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined") - ); - } - } - const access = getDiscriminantPropertyAccess(expr, type); - if (access) { - type = narrowTypeBySwitchOnDiscriminantProperty(type, access, flow.switchStatement, flow.clauseStart, flow.clauseEnd); - } - } - return createFlowType(type, isIncomplete(flowType)); - } - function getTypeAtFlowBranchLabel(flow) { - const antecedentTypes = []; - let subtypeReduction = false; - let seenIncomplete = false; - let bypassFlow; - for (const antecedent of flow.antecedents) { - if (!bypassFlow && antecedent.flags & 128 /* SwitchClause */ && antecedent.clauseStart === antecedent.clauseEnd) { - bypassFlow = antecedent; - continue; - } - const flowType = getTypeAtFlowNode(antecedent); - const type = getTypeFromFlowType(flowType); - if (type === declaredType && declaredType === initialType) { - return type; - } - pushIfUnique(antecedentTypes, type); - if (!isTypeSubsetOf(type, initialType)) { - subtypeReduction = true; - } - if (isIncomplete(flowType)) { - seenIncomplete = true; - } - } - if (bypassFlow) { - const flowType = getTypeAtFlowNode(bypassFlow); - const type = getTypeFromFlowType(flowType); - if (!(type.flags & 131072 /* Never */) && !contains(antecedentTypes, type) && !isExhaustiveSwitchStatement(bypassFlow.switchStatement)) { - if (type === declaredType && declaredType === initialType) { - return type; - } - antecedentTypes.push(type); - if (!isTypeSubsetOf(type, initialType)) { - subtypeReduction = true; - } - if (isIncomplete(flowType)) { - seenIncomplete = true; - } - } - } - return createFlowType(getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 /* Subtype */ : 1 /* Literal */), seenIncomplete); - } - function getTypeAtFlowLoopLabel(flow) { - const id = getFlowNodeId(flow); - const cache = flowLoopCaches[id] || (flowLoopCaches[id] = /* @__PURE__ */ new Map()); - const key2 = getOrSetCacheKey(); - if (!key2) { - return declaredType; - } - const cached = cache.get(key2); - if (cached) { - return cached; - } - for (let i = flowLoopStart; i < flowLoopCount; i++) { - if (flowLoopNodes[i] === flow && flowLoopKeys[i] === key2 && flowLoopTypes[i].length) { - return createFlowType( - getUnionOrEvolvingArrayType(flowLoopTypes[i], 1 /* Literal */), - /*incomplete*/ - true - ); - } - } - const antecedentTypes = []; - let subtypeReduction = false; - let firstAntecedentType; - for (const antecedent of flow.antecedents) { - let flowType; - if (!firstAntecedentType) { - flowType = firstAntecedentType = getTypeAtFlowNode(antecedent); - } else { - flowLoopNodes[flowLoopCount] = flow; - flowLoopKeys[flowLoopCount] = key2; - flowLoopTypes[flowLoopCount] = antecedentTypes; - flowLoopCount++; - const saveFlowTypeCache = flowTypeCache; - flowTypeCache = void 0; - flowType = getTypeAtFlowNode(antecedent); - flowTypeCache = saveFlowTypeCache; - flowLoopCount--; - const cached2 = cache.get(key2); - if (cached2) { - return cached2; - } - } - const type = getTypeFromFlowType(flowType); - pushIfUnique(antecedentTypes, type); - if (!isTypeSubsetOf(type, initialType)) { - subtypeReduction = true; - } - if (type === declaredType) { - break; - } - } - const result = getUnionOrEvolvingArrayType(antecedentTypes, subtypeReduction ? 2 /* Subtype */ : 1 /* Literal */); - if (isIncomplete(firstAntecedentType)) { - return createFlowType( - result, - /*incomplete*/ - true - ); - } - cache.set(key2, result); - return result; - } - function getUnionOrEvolvingArrayType(types, subtypeReduction) { - if (isEvolvingArrayTypeList(types)) { - return getEvolvingArrayType(getUnionType(map(types, getElementTypeOfEvolvingArrayType))); - } - const result = recombineUnknownType(getUnionType(sameMap(types, finalizeEvolvingArrayType), subtypeReduction)); - if (result !== declaredType && result.flags & declaredType.flags & 1048576 /* Union */ && arraysEqual(result.types, declaredType.types)) { - return declaredType; - } - return result; - } - function getCandidateDiscriminantPropertyAccess(expr) { - if (isBindingPattern(reference) || isFunctionExpressionOrArrowFunction(reference) || isObjectLiteralMethod(reference)) { - if (isIdentifier(expr)) { - const symbol = getResolvedSymbol(expr); - const declaration = symbol.valueDeclaration; - if (declaration && (isBindingElement(declaration) || isParameter(declaration)) && reference === declaration.parent && !declaration.initializer && !declaration.dotDotDotToken) { - return declaration; - } - } - } else if (isAccessExpression(expr)) { - if (isMatchingReference(reference, expr.expression)) { - return expr; - } - } else if (isIdentifier(expr)) { - const symbol = getResolvedSymbol(expr); - if (isConstantVariable(symbol)) { - const declaration = symbol.valueDeclaration; - if (isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isAccessExpression(declaration.initializer) && isMatchingReference(reference, declaration.initializer.expression)) { - return declaration.initializer; - } - if (isBindingElement(declaration) && !declaration.initializer) { - const parent2 = declaration.parent.parent; - if (isVariableDeclaration(parent2) && !parent2.type && parent2.initializer && (isIdentifier(parent2.initializer) || isAccessExpression(parent2.initializer)) && isMatchingReference(reference, parent2.initializer)) { - return declaration; - } - } - } - } - return void 0; - } - function getDiscriminantPropertyAccess(expr, computedType) { - const type = declaredType.flags & 1048576 /* Union */ ? declaredType : computedType; - if (type.flags & 1048576 /* Union */) { - const access = getCandidateDiscriminantPropertyAccess(expr); - if (access) { - const name = getAccessedPropertyName(access); - if (name && isDiscriminantProperty(type, name)) { - return access; - } - } - } - return void 0; - } - function narrowTypeByDiscriminant(type, access, narrowType2) { - const propName = getAccessedPropertyName(access); - if (propName === void 0) { - return type; - } - const optionalChain = isOptionalChain(access); - const removeNullable = strictNullChecks && (optionalChain || isNonNullAccess(access)) && maybeTypeOfKind(type, 98304 /* Nullable */); - let propType = getTypeOfPropertyOfType(removeNullable ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type, propName); - if (!propType) { - return type; - } - propType = removeNullable && optionalChain ? getOptionalType(propType) : propType; - const narrowedPropType = narrowType2(propType); - return filterType(type, (t) => { - const discriminantType = getTypeOfPropertyOrIndexSignature(t, propName); - return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType); - }); - } - function narrowTypeByDiscriminantProperty(type, access, operator, value, assumeTrue) { - if ((operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */) && type.flags & 1048576 /* Union */) { - const keyPropertyName = getKeyPropertyName(type); - if (keyPropertyName && keyPropertyName === getAccessedPropertyName(access)) { - const candidate = getConstituentTypeForKeyType(type, getTypeOfExpression(value)); - if (candidate) { - return operator === (assumeTrue ? 37 /* EqualsEqualsEqualsToken */ : 38 /* ExclamationEqualsEqualsToken */) ? candidate : isUnitType(getTypeOfPropertyOfType(candidate, keyPropertyName) || unknownType) ? removeType(type, candidate) : type; - } - } - } - return narrowTypeByDiscriminant(type, access, (t) => narrowTypeByEquality(t, operator, value, assumeTrue)); - } - function narrowTypeBySwitchOnDiscriminantProperty(type, access, switchStatement, clauseStart, clauseEnd) { - if (clauseStart < clauseEnd && type.flags & 1048576 /* Union */ && getKeyPropertyName(type) === getAccessedPropertyName(access)) { - const clauseTypes = getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd); - const candidate = getUnionType(map(clauseTypes, (t) => getConstituentTypeForKeyType(type, t) || unknownType)); - if (candidate !== unknownType) { - return candidate; - } - } - return narrowTypeByDiscriminant(type, access, (t) => narrowTypeBySwitchOnDiscriminant(t, switchStatement, clauseStart, clauseEnd)); - } - function narrowTypeByTruthiness(type, expr, assumeTrue) { - if (isMatchingReference(reference, expr)) { - return getAdjustedTypeWithFacts(type, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */); - } - if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) { - type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); - } - const access = getDiscriminantPropertyAccess(expr, type); - if (access) { - return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(t, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */)); - } - return type; - } - function isTypePresencePossible(type, propName, assumeTrue) { - const prop = getPropertyOfType(type, propName); - return prop ? !!(prop.flags & 16777216 /* Optional */ || getCheckFlags(prop) & 48 /* Partial */) || assumeTrue : !!getApplicableIndexInfoForName(type, propName) || !assumeTrue; - } - function narrowTypeByInKeyword(type, nameType, assumeTrue) { - const name = getPropertyNameFromType(nameType); - const isKnownProperty2 = someType(type, (t) => isTypePresencePossible( - t, - name, - /*assumeTrue*/ - true - )); - if (isKnownProperty2) { - return filterType(type, (t) => isTypePresencePossible(t, name, assumeTrue)); - } - if (assumeTrue) { - const recordSymbol = getGlobalRecordSymbol(); - if (recordSymbol) { - return getIntersectionType([type, getTypeAliasInstantiation(recordSymbol, [nameType, unknownType])]); - } - } - return type; - } - function narrowTypeByBinaryExpression(type, expr, assumeTrue) { - switch (expr.operatorToken.kind) { - case 64 /* EqualsToken */: - case 76 /* BarBarEqualsToken */: - case 77 /* AmpersandAmpersandEqualsToken */: - case 78 /* QuestionQuestionEqualsToken */: - return narrowTypeByTruthiness(narrowType(type, expr.right, assumeTrue), expr.left, assumeTrue); - case 35 /* EqualsEqualsToken */: - case 36 /* ExclamationEqualsToken */: - case 37 /* EqualsEqualsEqualsToken */: - case 38 /* ExclamationEqualsEqualsToken */: - const operator = expr.operatorToken.kind; - const left = getReferenceCandidate(expr.left); - const right = getReferenceCandidate(expr.right); - if (left.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(right)) { - return narrowTypeByTypeof(type, left, operator, right, assumeTrue); - } - if (right.kind === 221 /* TypeOfExpression */ && isStringLiteralLike(left)) { - return narrowTypeByTypeof(type, right, operator, left, assumeTrue); - } - if (isMatchingReference(reference, left)) { - return narrowTypeByEquality(type, operator, right, assumeTrue); - } - if (isMatchingReference(reference, right)) { - return narrowTypeByEquality(type, operator, left, assumeTrue); - } - if (strictNullChecks) { - if (optionalChainContainsReference(left, reference)) { - type = narrowTypeByOptionalChainContainment(type, operator, right, assumeTrue); - } else if (optionalChainContainsReference(right, reference)) { - type = narrowTypeByOptionalChainContainment(type, operator, left, assumeTrue); - } - } - const leftAccess = getDiscriminantPropertyAccess(left, type); - if (leftAccess) { - return narrowTypeByDiscriminantProperty(type, leftAccess, operator, right, assumeTrue); - } - const rightAccess = getDiscriminantPropertyAccess(right, type); - if (rightAccess) { - return narrowTypeByDiscriminantProperty(type, rightAccess, operator, left, assumeTrue); - } - if (isMatchingConstructorReference(left)) { - return narrowTypeByConstructor(type, operator, right, assumeTrue); - } - if (isMatchingConstructorReference(right)) { - return narrowTypeByConstructor(type, operator, left, assumeTrue); - } - break; - case 104 /* InstanceOfKeyword */: - return narrowTypeByInstanceof(type, expr, assumeTrue); - case 103 /* InKeyword */: - if (isPrivateIdentifier(expr.left)) { - return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue); - } - const target = getReferenceCandidate(expr.right); - if (containsMissingType(type) && isAccessExpression(reference) && isMatchingReference(reference.expression, target)) { - const leftType = getTypeOfExpression(expr.left); - if (isTypeUsableAsPropertyName(leftType) && getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) { - return getTypeWithFacts(type, assumeTrue ? 524288 /* NEUndefined */ : 65536 /* EQUndefined */); - } - } - if (isMatchingReference(reference, target)) { - const leftType = getTypeOfExpression(expr.left); - if (isTypeUsableAsPropertyName(leftType)) { - return narrowTypeByInKeyword(type, leftType, assumeTrue); - } - } - break; - case 28 /* CommaToken */: - return narrowType(type, expr.right, assumeTrue); - case 56 /* AmpersandAmpersandToken */: - return assumeTrue ? narrowType( - narrowType( - type, - expr.left, - /*assumeTrue*/ - true - ), - expr.right, - /*assumeTrue*/ - true - ) : getUnionType([narrowType( - type, - expr.left, - /*assumeTrue*/ - false - ), narrowType( - type, - expr.right, - /*assumeTrue*/ - false - )]); - case 57 /* BarBarToken */: - return assumeTrue ? getUnionType([narrowType( - type, - expr.left, - /*assumeTrue*/ - true - ), narrowType( - type, - expr.right, - /*assumeTrue*/ - true - )]) : narrowType( - narrowType( - type, - expr.left, - /*assumeTrue*/ - false - ), - expr.right, - /*assumeTrue*/ - false - ); - } - return type; - } - function narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue) { - const target = getReferenceCandidate(expr.right); - if (!isMatchingReference(reference, target)) { - return type; - } - Debug.assertNode(expr.left, isPrivateIdentifier); - const symbol = getSymbolForPrivateIdentifierExpression(expr.left); - if (symbol === void 0) { - return type; - } - const classSymbol = symbol.parent; - const targetType = hasStaticModifier(Debug.checkDefined(symbol.valueDeclaration, "should always have a declaration")) ? getTypeOfSymbol(classSymbol) : getDeclaredTypeOfSymbol(classSymbol); - return getNarrowedType( - type, - targetType, - assumeTrue, - /*checkDerived*/ - true - ); - } - function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) { - const equalsOperator = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; - const nullableFlags = operator === 35 /* EqualsEqualsToken */ || operator === 36 /* ExclamationEqualsToken */ ? 98304 /* Nullable */ : 32768 /* Undefined */; - const valueType = getTypeOfExpression(value); - const removeNullable = equalsOperator !== assumeTrue && everyType(valueType, (t) => !!(t.flags & nullableFlags)) || equalsOperator === assumeTrue && everyType(valueType, (t) => !(t.flags & (3 /* AnyOrUnknown */ | nullableFlags))); - return removeNullable ? getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; - } - function narrowTypeByEquality(type, operator, value, assumeTrue) { - if (type.flags & 1 /* Any */) { - return type; - } - if (operator === 36 /* ExclamationEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } - const valueType = getTypeOfExpression(value); - const doubleEquals = operator === 35 /* EqualsEqualsToken */ || operator === 36 /* ExclamationEqualsToken */; - if (valueType.flags & 98304 /* Nullable */) { - if (!strictNullChecks) { - return type; - } - const facts = doubleEquals ? assumeTrue ? 262144 /* EQUndefinedOrNull */ : 2097152 /* NEUndefinedOrNull */ : valueType.flags & 65536 /* Null */ ? assumeTrue ? 131072 /* EQNull */ : 1048576 /* NENull */ : assumeTrue ? 65536 /* EQUndefined */ : 524288 /* NEUndefined */; - return getAdjustedTypeWithFacts(type, facts); - } - if (assumeTrue) { - if (!doubleEquals && (type.flags & 2 /* Unknown */ || someType(type, isEmptyAnonymousObjectType))) { - if (valueType.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */) || isEmptyAnonymousObjectType(valueType)) { - return valueType; - } - if (valueType.flags & 524288 /* Object */) { - return nonPrimitiveType; - } - } - const filteredType = filterType(type, (t) => areTypesComparable(t, valueType) || doubleEquals && isCoercibleUnderDoubleEquals(t, valueType)); - return replacePrimitivesWithLiterals(filteredType, valueType); - } - if (isUnitType(valueType)) { - return filterType(type, (t) => !(isUnitLikeType(t) && areTypesComparable(t, valueType))); - } - return type; - } - function narrowTypeByTypeof(type, typeOfExpr, operator, literal, assumeTrue) { - if (operator === 36 /* ExclamationEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } - const target = getReferenceCandidate(typeOfExpr.expression); - if (!isMatchingReference(reference, target)) { - if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal.text !== "undefined")) { - type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); - } - const propertyAccess = getDiscriminantPropertyAccess(target, type); - if (propertyAccess) { - return narrowTypeByDiscriminant(type, propertyAccess, (t) => narrowTypeByLiteralExpression(t, literal, assumeTrue)); - } - return type; - } - return narrowTypeByLiteralExpression(type, literal, assumeTrue); - } - function narrowTypeByLiteralExpression(type, literal, assumeTrue) { - return assumeTrue ? narrowTypeByTypeName(type, literal.text) : getAdjustedTypeWithFacts(type, typeofNEFacts.get(literal.text) || 32768 /* TypeofNEHostObject */); - } - function narrowTypeBySwitchOptionalChainContainment(type, switchStatement, clauseStart, clauseEnd, clauseCheck) { - const everyClauseChecks = clauseStart !== clauseEnd && every(getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd), clauseCheck); - return everyClauseChecks ? getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */) : type; - } - function narrowTypeBySwitchOnDiscriminant(type, switchStatement, clauseStart, clauseEnd) { - const switchTypes = getSwitchClauseTypes(switchStatement); - if (!switchTypes.length) { - return type; - } - const clauseTypes = switchTypes.slice(clauseStart, clauseEnd); - const hasDefaultClause = clauseStart === clauseEnd || contains(clauseTypes, neverType); - if (type.flags & 2 /* Unknown */ && !hasDefaultClause) { - let groundClauseTypes; - for (let i = 0; i < clauseTypes.length; i += 1) { - const t = clauseTypes[i]; - if (t.flags & (402784252 /* Primitive */ | 67108864 /* NonPrimitive */)) { - if (groundClauseTypes !== void 0) { - groundClauseTypes.push(t); - } - } else if (t.flags & 524288 /* Object */) { - if (groundClauseTypes === void 0) { - groundClauseTypes = clauseTypes.slice(0, i); - } - groundClauseTypes.push(nonPrimitiveType); - } else { - return type; - } - } - return getUnionType(groundClauseTypes === void 0 ? clauseTypes : groundClauseTypes); - } - const discriminantType = getUnionType(clauseTypes); - const caseType = discriminantType.flags & 131072 /* Never */ ? neverType : replacePrimitivesWithLiterals(filterType(type, (t) => areTypesComparable(discriminantType, t)), discriminantType); - if (!hasDefaultClause) { - return caseType; - } - const defaultType = filterType(type, (t) => !(isUnitLikeType(t) && contains(switchTypes, getRegularTypeOfLiteralType(extractUnitType(t))))); - return caseType.flags & 131072 /* Never */ ? defaultType : getUnionType([caseType, defaultType]); - } - function narrowTypeByTypeName(type, typeName) { - switch (typeName) { - case "string": - return narrowTypeByTypeFacts(type, stringType, 1 /* TypeofEQString */); - case "number": - return narrowTypeByTypeFacts(type, numberType, 2 /* TypeofEQNumber */); - case "bigint": - return narrowTypeByTypeFacts(type, bigintType, 4 /* TypeofEQBigInt */); - case "boolean": - return narrowTypeByTypeFacts(type, booleanType, 8 /* TypeofEQBoolean */); - case "symbol": - return narrowTypeByTypeFacts(type, esSymbolType, 16 /* TypeofEQSymbol */); - case "object": - return type.flags & 1 /* Any */ ? type : getUnionType([narrowTypeByTypeFacts(type, nonPrimitiveType, 32 /* TypeofEQObject */), narrowTypeByTypeFacts(type, nullType, 131072 /* EQNull */)]); - case "function": - return type.flags & 1 /* Any */ ? type : narrowTypeByTypeFacts(type, globalFunctionType, 64 /* TypeofEQFunction */); - case "undefined": - return narrowTypeByTypeFacts(type, undefinedType, 65536 /* EQUndefined */); - } - return narrowTypeByTypeFacts(type, nonPrimitiveType, 128 /* TypeofEQHostObject */); - } - function narrowTypeByTypeFacts(type, impliedType, facts) { - return mapType(type, (t) => ( - // We first check if a constituent is a subtype of the implied type. If so, we either keep or eliminate - // the constituent based on its type facts. We use the strict subtype relation because it treats `object` - // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`, - // but are classified as "function" according to `typeof`. - isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? getTypeFacts(t) & facts ? t : neverType : ( - // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied - // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`. - isTypeSubtypeOf(impliedType, t) ? impliedType : ( - // Neither the constituent nor the implied type is a subtype of the other, however their domains may still - // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate - // possible overlap, we form an intersection. Otherwise, we eliminate the constituent. - getTypeFacts(t) & facts ? getIntersectionType([t, impliedType]) : neverType - ) - ) - )); - } - function narrowTypeBySwitchOnTypeOf(type, switchStatement, clauseStart, clauseEnd) { - const witnesses = getSwitchClauseTypeOfWitnesses(switchStatement); - if (!witnesses) { - return type; - } - const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); - const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; - if (hasDefaultClause) { - const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); - return filterType(type, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts); - } - const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd); - return getUnionType(map(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType)); - } - function isMatchingConstructorReference(expr) { - return (isPropertyAccessExpression(expr) && idText(expr.name) === "constructor" || isElementAccessExpression(expr) && isStringLiteralLike(expr.argumentExpression) && expr.argumentExpression.text === "constructor") && isMatchingReference(reference, expr.expression); - } - function narrowTypeByConstructor(type, operator, identifier, assumeTrue) { - if (assumeTrue ? operator !== 35 /* EqualsEqualsToken */ && operator !== 37 /* EqualsEqualsEqualsToken */ : operator !== 36 /* ExclamationEqualsToken */ && operator !== 38 /* ExclamationEqualsEqualsToken */) { - return type; - } - const identifierType = getTypeOfExpression(identifier); - if (!isFunctionType(identifierType) && !isConstructorType(identifierType)) { - return type; - } - const prototypeProperty = getPropertyOfType(identifierType, "prototype"); - if (!prototypeProperty) { - return type; - } - const prototypeType = getTypeOfSymbol(prototypeProperty); - const candidate = !isTypeAny(prototypeType) ? prototypeType : void 0; - if (!candidate || candidate === globalObjectType || candidate === globalFunctionType) { - return type; - } - if (isTypeAny(type)) { - return candidate; - } - return filterType(type, (t) => isConstructedBy(t, candidate)); - function isConstructedBy(source, target) { - if (source.flags & 524288 /* Object */ && getObjectFlags(source) & 1 /* Class */ || target.flags & 524288 /* Object */ && getObjectFlags(target) & 1 /* Class */) { - return source.symbol === target.symbol; - } - return isTypeSubtypeOf(source, target); - } - } - function narrowTypeByInstanceof(type, expr, assumeTrue) { - const left = getReferenceCandidate(expr.left); - if (!isMatchingReference(reference, left)) { - if (assumeTrue && strictNullChecks && optionalChainContainsReference(left, reference)) { - return getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); - } - return type; - } - const rightType = getTypeOfExpression(expr.right); - if (!isTypeDerivedFrom(rightType, globalFunctionType)) { - return type; - } - const instanceType = mapType(rightType, getInstanceType); - if (isTypeAny(type) && (instanceType === globalObjectType || instanceType === globalFunctionType) || !assumeTrue && !(instanceType.flags & 524288 /* Object */ && !isEmptyAnonymousObjectType(instanceType))) { - return type; - } - return getNarrowedType( - type, - instanceType, - assumeTrue, - /*checkDerived*/ - true - ); - } - function getInstanceType(constructorType) { - const prototypePropertyType = getTypeOfPropertyOfType(constructorType, "prototype"); - if (prototypePropertyType && !isTypeAny(prototypePropertyType)) { - return prototypePropertyType; - } - const constructSignatures = getSignaturesOfType(constructorType, 1 /* Construct */); - if (constructSignatures.length) { - return getUnionType(map(constructSignatures, (signature) => getReturnTypeOfSignature(getErasedSignature(signature)))); - } - return emptyObjectType; - } - function getNarrowedType(type, candidate, assumeTrue, checkDerived) { - const key2 = type.flags & 1048576 /* Union */ ? `N${getTypeId(type)},${getTypeId(candidate)},${(assumeTrue ? 1 : 0) | (checkDerived ? 2 : 0)}` : void 0; - return getCachedType(key2) ?? setCachedType(key2, getNarrowedTypeWorker(type, candidate, assumeTrue, checkDerived)); - } - function getNarrowedTypeWorker(type, candidate, assumeTrue, checkDerived) { - if (!assumeTrue) { - if (checkDerived) { - return filterType(type, (t) => !isTypeDerivedFrom(t, candidate)); - } - const trueType2 = getNarrowedType( - type, - candidate, - /*assumeTrue*/ - true, - /*checkDerived*/ - false - ); - return filterType(type, (t) => !isTypeSubsetOf(t, trueType2)); - } - if (type.flags & 3 /* AnyOrUnknown */) { - return candidate; - } - const isRelated = checkDerived ? isTypeDerivedFrom : isTypeSubtypeOf; - const keyPropertyName = type.flags & 1048576 /* Union */ ? getKeyPropertyName(type) : void 0; - const narrowedType = mapType(candidate, (c) => { - const discriminant = keyPropertyName && getTypeOfPropertyOfType(c, keyPropertyName); - const matching = discriminant && getConstituentTypeForKeyType(type, discriminant); - const directlyRelated = mapType(matching || type, checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType); - return directlyRelated.flags & 131072 /* Never */ ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : directlyRelated; - }); - return !(narrowedType.flags & 131072 /* Never */) ? narrowedType : isTypeSubtypeOf(candidate, type) ? candidate : isTypeAssignableTo(type, candidate) ? type : isTypeAssignableTo(candidate, type) ? candidate : getIntersectionType([type, candidate]); - } - function narrowTypeByCallExpression(type, callExpression, assumeTrue) { - if (hasMatchingArgument(callExpression, reference)) { - const signature = assumeTrue || !isCallChain(callExpression) ? getEffectsSignature(callExpression) : void 0; - const predicate = signature && getTypePredicateOfSignature(signature); - if (predicate && (predicate.kind === 0 /* This */ || predicate.kind === 1 /* Identifier */)) { - return narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue); - } - } - if (containsMissingType(type) && isAccessExpression(reference) && isPropertyAccessExpression(callExpression.expression)) { - const callAccess = callExpression.expression; - if (isMatchingReference(reference.expression, getReferenceCandidate(callAccess.expression)) && isIdentifier(callAccess.name) && callAccess.name.escapedText === "hasOwnProperty" && callExpression.arguments.length === 1) { - const argument = callExpression.arguments[0]; - if (isStringLiteralLike(argument) && getAccessedPropertyName(reference) === escapeLeadingUnderscores(argument.text)) { - return getTypeWithFacts(type, assumeTrue ? 524288 /* NEUndefined */ : 65536 /* EQUndefined */); - } - } - } - return type; - } - function narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue) { - if (predicate.type && !(isTypeAny(type) && (predicate.type === globalObjectType || predicate.type === globalFunctionType))) { - const predicateArgument = getTypePredicateArgument(predicate, callExpression); - if (predicateArgument) { - if (isMatchingReference(reference, predicateArgument)) { - return getNarrowedType( - type, - predicate.type, - assumeTrue, - /*checkDerived*/ - false - ); - } - if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) { - type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); - } - const access = getDiscriminantPropertyAccess(predicateArgument, type); - if (access) { - return narrowTypeByDiscriminant(type, access, (t) => getNarrowedType( - t, - predicate.type, - assumeTrue, - /*checkDerived*/ - false - )); - } - } - } - return type; - } - function narrowType(type, expr, assumeTrue) { - if (isExpressionOfOptionalChainRoot(expr) || isBinaryExpression(expr.parent) && (expr.parent.operatorToken.kind === 61 /* QuestionQuestionToken */ || expr.parent.operatorToken.kind === 78 /* QuestionQuestionEqualsToken */) && expr.parent.left === expr) { - return narrowTypeByOptionality(type, expr, assumeTrue); - } - switch (expr.kind) { - case 80 /* Identifier */: - if (!isMatchingReference(reference, expr) && inlineLevel < 5) { - const symbol = getResolvedSymbol(expr); - if (isConstantVariable(symbol)) { - const declaration = symbol.valueDeclaration; - if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isConstantReference(reference)) { - inlineLevel++; - const result = narrowType(type, declaration.initializer, assumeTrue); - inlineLevel--; - return result; - } - } - } - case 110 /* ThisKeyword */: - case 108 /* SuperKeyword */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - return narrowTypeByTruthiness(type, expr, assumeTrue); - case 213 /* CallExpression */: - return narrowTypeByCallExpression(type, expr, assumeTrue); - case 217 /* ParenthesizedExpression */: - case 235 /* NonNullExpression */: - return narrowType(type, expr.expression, assumeTrue); - case 226 /* BinaryExpression */: - return narrowTypeByBinaryExpression(type, expr, assumeTrue); - case 224 /* PrefixUnaryExpression */: - if (expr.operator === 54 /* ExclamationToken */) { - return narrowType(type, expr.operand, !assumeTrue); - } - break; - } - return type; - } - function narrowTypeByOptionality(type, expr, assumePresent) { - if (isMatchingReference(reference, expr)) { - return getAdjustedTypeWithFacts(type, assumePresent ? 2097152 /* NEUndefinedOrNull */ : 262144 /* EQUndefinedOrNull */); - } - const access = getDiscriminantPropertyAccess(expr, type); - if (access) { - return narrowTypeByDiscriminant(type, access, (t) => getTypeWithFacts(t, assumePresent ? 2097152 /* NEUndefinedOrNull */ : 262144 /* EQUndefinedOrNull */)); - } - return type; - } - } - function getTypeOfSymbolAtLocation(symbol, location) { - symbol = getExportSymbolOfValueSymbolIfExported(symbol); - if (location.kind === 80 /* Identifier */ || location.kind === 81 /* PrivateIdentifier */) { - if (isRightSideOfQualifiedNameOrPropertyAccess(location)) { - location = location.parent; - } - if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { - const type = removeOptionalTypeMarker(getTypeOfExpression(location)); - if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { - return type; - } - } - } - if (isDeclarationName(location) && isSetAccessor(location.parent) && getAnnotatedAccessorTypeNode(location.parent)) { - return getWriteTypeOfAccessors(location.parent.symbol); - } - return getNonMissingTypeOfSymbol(symbol); - } - function getControlFlowContainer(node) { - return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */); - } - function isSymbolAssigned(symbol) { - if (!symbol.valueDeclaration) { - return false; - } - const parent2 = getRootDeclaration(symbol.valueDeclaration).parent; - const links = getNodeLinks(parent2); - if (!(links.flags & 131072 /* AssignmentsMarked */)) { - links.flags |= 131072 /* AssignmentsMarked */; - if (!hasParentWithAssignmentsMarked(parent2)) { - markNodeAssignments(parent2); - } - } - return symbol.isAssigned || false; - } - function hasParentWithAssignmentsMarked(node) { - return !!findAncestor(node.parent, (node2) => (isFunctionLike(node2) || isCatchClause(node2)) && !!(getNodeLinks(node2).flags & 131072 /* AssignmentsMarked */)); - } - function markNodeAssignments(node) { - if (node.kind === 80 /* Identifier */) { - if (isAssignmentTarget(node)) { - const symbol = getResolvedSymbol(node); - if (isParameterOrCatchClauseVariable(symbol)) { - symbol.isAssigned = true; - } - } - } else { - forEachChild(node, markNodeAssignments); - } - } - function isConstantVariable(symbol) { - return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */) !== 0; - } - function parameterInitializerContainsUndefined(declaration) { - const links = getNodeLinks(declaration); - if (links.parameterInitializerContainsUndefined === void 0) { - if (!pushTypeResolution(declaration, 9 /* ParameterInitializerContainsUndefined */)) { - reportCircularityError(declaration.symbol); - return true; - } - const containsUndefined = !!(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */); - if (!popTypeResolution()) { - reportCircularityError(declaration.symbol); - return true; - } - links.parameterInitializerContainsUndefined = containsUndefined; - } - return links.parameterInitializerContainsUndefined; - } - function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); - return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; - } - function isConstraintPosition(type, node) { - const parent2 = node.parent; - return parent2.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 166 /* QualifiedName */ || parent2.kind === 213 /* CallExpression */ && parent2.expression === node || parent2.kind === 212 /* ElementAccessExpression */ && parent2.expression === node && !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent2.argumentExpression))); - } - function isGenericTypeWithUnionConstraint(type) { - return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithUnionConstraint) : !!(type.flags & 465829888 /* Instantiable */ && getBaseConstraintOrType(type).flags & (98304 /* Nullable */ | 1048576 /* Union */)); - } - function isGenericTypeWithoutNullableConstraint(type) { - return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithoutNullableConstraint) : !!(type.flags & 465829888 /* Instantiable */ && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304 /* Nullable */)); - } - function hasContextualTypeWithNoGenericTypes(node, checkMode) { - const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 64 /* RestBindingElement */ ? getContextualType2(node, 8 /* SkipBindingPatterns */) : getContextualType2( - node, - /*contextFlags*/ - void 0 - )); - return contextualType && !isGenericType(contextualType); - } - function getNarrowableTypeForReference(type, reference, checkMode) { - const substituteConstraints = !(checkMode && checkMode & 2 /* Inferential */) && someType(type, isGenericTypeWithUnionConstraint) && (isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode)); - return substituteConstraints ? mapType(type, getBaseConstraintOrType) : type; - } - function isExportOrExportExpression(location) { - return !!findAncestor(location, (n) => { - const parent2 = n.parent; - if (parent2 === void 0) { - return "quit"; - } - if (isExportAssignment(parent2)) { - return parent2.expression === n && isEntityNameExpression(n); - } - if (isExportSpecifier(parent2)) { - return parent2.name === n || parent2.propertyName === n; - } - return false; - }); - } - function markAliasReferenced(symbol, location) { - if (!canCollectSymbolAliasAccessabilityData) { - return; - } - if (isNonLocalAlias( - symbol, - /*excludes*/ - 111551 /* Value */ - ) && !isInTypeQuery(location)) { - const target = resolveAlias(symbol); - if (getSymbolFlags( - symbol, - /*excludeTypeOnlyMeanings*/ - true - ) & (111551 /* Value */ | 1048576 /* ExportValue */)) { - if (getIsolatedModules(compilerOptions) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(getExportSymbolOfValueSymbolIfExported(target))) { - markAliasSymbolAsReferenced(symbol); - } else { - markConstEnumAliasAsReferenced(symbol); - } - } - } - } - function getNarrowedTypeOfSymbol(symbol, location) { - var _a; - const type = getTypeOfSymbol(symbol); - const declaration = symbol.valueDeclaration; - if (declaration) { - if (isBindingElement(declaration) && !declaration.initializer && !declaration.dotDotDotToken && declaration.parent.elements.length >= 2) { - const parent2 = declaration.parent.parent; - if (parent2.kind === 260 /* VariableDeclaration */ && getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || parent2.kind === 169 /* Parameter */) { - const links = getNodeLinks(parent2); - if (!(links.flags & 4194304 /* InCheckIdentifier */)) { - links.flags |= 4194304 /* InCheckIdentifier */; - const parentType = getTypeForBindingElementParent(parent2, 0 /* Normal */); - const parentTypeConstraint = parentType && mapType(parentType, getBaseConstraintOrType); - links.flags &= ~4194304 /* InCheckIdentifier */; - if (parentTypeConstraint && parentTypeConstraint.flags & 1048576 /* Union */ && !(parent2.kind === 169 /* Parameter */ && isSymbolAssigned(symbol))) { - const pattern = declaration.parent; - const narrowedType = getFlowTypeOfReference( - pattern, - parentTypeConstraint, - parentTypeConstraint, - /*flowContainer*/ - void 0, - location.flowNode - ); - if (narrowedType.flags & 131072 /* Never */) { - return neverType; - } - return getBindingElementTypeFromParentType(declaration, narrowedType); - } - } - } - } - if (isParameter(declaration) && !declaration.type && !declaration.initializer && !declaration.dotDotDotToken) { - const func = declaration.parent; - if (func.parameters.length >= 2 && isContextSensitiveFunctionOrObjectLiteralMethod(func)) { - const contextualSignature = getContextualSignature(func); - if (contextualSignature && contextualSignature.parameters.length === 1 && signatureHasRestParameter(contextualSignature)) { - const restType = getReducedApparentType(instantiateType(getTypeOfSymbol(contextualSignature.parameters[0]), (_a = getInferenceContext(func)) == null ? void 0 : _a.nonFixingMapper)); - if (restType.flags & 1048576 /* Union */ && everyType(restType, isTupleType) && !isSymbolAssigned(symbol)) { - const narrowedType = getFlowTypeOfReference( - func, - restType, - restType, - /*flowContainer*/ - void 0, - location.flowNode - ); - const index = func.parameters.indexOf(declaration) - (getThisParameter(func) ? 1 : 0); - return getIndexedAccessType(narrowedType, getNumberLiteralType(index)); - } - } - } - } - } - return type; - } - function checkIdentifier(node, checkMode) { - if (isThisInTypeQuery(node)) { - return checkThisExpression(node); - } - const symbol = getResolvedSymbol(node); - if (symbol === unknownSymbol) { - return errorType; - } - if (symbol === argumentsSymbol) { - if (isInPropertyInitializerOrClassStaticBlock(node)) { - error2(node, Diagnostics.arguments_cannot_be_referenced_in_property_initializers); - return errorType; - } - const container = getContainingFunction(node); - if (languageVersion < 2 /* ES2015 */) { - if (container.kind === 219 /* ArrowFunction */) { - error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); - } else if (hasSyntacticModifier(container, 512 /* Async */)) { - error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); - } - } - getNodeLinks(container).flags |= 512 /* CaptureArguments */; - return getTypeOfSymbol(symbol); - } - if (shouldMarkIdentifierAliasReferenced(node)) { - markAliasReferenced(symbol, node); - } - const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol); - const targetSymbol = resolveAliasWithDeprecationCheck(localOrExportSymbol, node); - if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) { - addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText); - } - let declaration = localOrExportSymbol.valueDeclaration; - if (declaration && localOrExportSymbol.flags & 32 /* Class */) { - if (isClassLike(declaration) && declaration.name !== node) { - let container = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - while (container.kind !== 312 /* SourceFile */ && container.parent !== declaration) { - container = getThisContainer( - container, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - } - if (container.kind !== 312 /* SourceFile */) { - getNodeLinks(declaration).flags |= 262144 /* ContainsConstructorReference */; - getNodeLinks(container).flags |= 262144 /* ContainsConstructorReference */; - getNodeLinks(node).flags |= 536870912 /* ConstructorReference */; - } - } - } - checkNestedBlockScopedBinding(node, symbol); - let type = getNarrowedTypeOfSymbol(localOrExportSymbol, node); - const assignmentKind = getAssignmentTargetKind(node); - if (assignmentKind) { - if (!(localOrExportSymbol.flags & 3 /* Variable */) && !(isInJSFile(node) && localOrExportSymbol.flags & 512 /* ValueModule */)) { - const assignmentError = localOrExportSymbol.flags & 384 /* Enum */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_enum : localOrExportSymbol.flags & 32 /* Class */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_class : localOrExportSymbol.flags & 1536 /* Module */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_namespace : localOrExportSymbol.flags & 16 /* Function */ ? Diagnostics.Cannot_assign_to_0_because_it_is_a_function : localOrExportSymbol.flags & 2097152 /* Alias */ ? Diagnostics.Cannot_assign_to_0_because_it_is_an_import : Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable; - error2(node, assignmentError, symbolToString(symbol)); - return errorType; - } - if (isReadonlySymbol(localOrExportSymbol)) { - if (localOrExportSymbol.flags & 3 /* Variable */) { - error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_constant, symbolToString(symbol)); - } else { - error2(node, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(symbol)); - } - return errorType; - } - } - const isAlias = localOrExportSymbol.flags & 2097152 /* Alias */; - if (localOrExportSymbol.flags & 3 /* Variable */) { - if (assignmentKind === 1 /* Definite */) { - return type; - } - } else if (isAlias) { - declaration = getDeclarationOfAliasSymbol(symbol); - } else { - return type; - } - if (!declaration) { - return type; - } - type = getNarrowableTypeForReference(type, node, checkMode); - const isParameter2 = getRootDeclaration(declaration).kind === 169 /* Parameter */; - const declarationContainer = getControlFlowContainer(declaration); - let flowContainer = getControlFlowContainer(node); - const isOuterVariable = flowContainer !== declarationContainer; - const isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent); - const isModuleExports = symbol.flags & 134217728 /* ModuleExports */; - const typeIsAutomatic = type === autoType || type === autoArrayType; - const isAutomaticTypeInNonNull = typeIsAutomatic && node.parent.kind === 235 /* NonNullExpression */; - while (flowContainer !== declarationContainer && (flowContainer.kind === 218 /* FunctionExpression */ || flowContainer.kind === 219 /* ArrowFunction */ || isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) && (isConstantVariable(localOrExportSymbol) && type !== autoArrayType || isParameter2 && !isSymbolAssigned(localOrExportSymbol))) { - flowContainer = getControlFlowContainer(flowContainer); - } - const assumeInitialized = isParameter2 || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || isSameScopedBindingElement(node, declaration) || type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */)) !== 0 || isInTypeQuery(node) || isInAmbientOrTypeNode(node) || node.parent.kind === 281 /* ExportSpecifier */) || node.parent.kind === 235 /* NonNullExpression */ || declaration.kind === 260 /* VariableDeclaration */ && declaration.exclamationToken || declaration.flags & 33554432 /* Ambient */; - const initialType = isAutomaticTypeInNonNull ? undefinedType : assumeInitialized ? isParameter2 ? removeOptionalityFromDeclaredType(type, declaration) : type : typeIsAutomatic ? undefinedType : getOptionalType(type); - const flowType = isAutomaticTypeInNonNull ? getNonNullableType(getFlowTypeOfReference(node, type, initialType, flowContainer)) : getFlowTypeOfReference(node, type, initialType, flowContainer); - if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) { - if (flowType === autoType || flowType === autoArrayType) { - if (noImplicitAny) { - error2(getNameOfDeclaration(declaration), Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined, symbolToString(symbol), typeToString(flowType)); - error2(node, Diagnostics.Variable_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType)); - } - return convertAutoToAny(flowType); - } - } else if (!assumeInitialized && !containsUndefinedType(type) && containsUndefinedType(flowType)) { - error2(node, Diagnostics.Variable_0_is_used_before_being_assigned, symbolToString(symbol)); - return type; - } - return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; - } - function isSameScopedBindingElement(node, declaration) { - if (isBindingElement(declaration)) { - const bindingElement = findAncestor(node, isBindingElement); - return bindingElement && getRootDeclaration(bindingElement) === getRootDeclaration(declaration); - } - } - function shouldMarkIdentifierAliasReferenced(node) { - var _a; - const parent2 = node.parent; - if (parent2) { - if (isPropertyAccessExpression(parent2) && parent2.expression === node) { - return false; - } - if (isExportSpecifier(parent2) && parent2.isTypeOnly) { - return false; - } - const greatGrandparent = (_a = parent2.parent) == null ? void 0 : _a.parent; - if (greatGrandparent && isExportDeclaration(greatGrandparent) && greatGrandparent.isTypeOnly) { - return false; - } - } - return true; - } - function isInsideFunctionOrInstancePropertyInitializer(node, threshold) { - return !!findAncestor(node, (n) => n === threshold ? "quit" : isFunctionLike(n) || n.parent && isPropertyDeclaration(n.parent) && !hasStaticModifier(n.parent) && n.parent.initializer === n); - } - function getPartOfForStatementContainingNode(node, container) { - return findAncestor(node, (n) => n === container ? "quit" : n === container.initializer || n === container.condition || n === container.incrementor || n === container.statement); - } - function getEnclosingIterationStatement(node) { - return findAncestor(node, (n) => !n || nodeStartsNewLexicalEnvironment(n) ? "quit" : isIterationStatement( - n, - /*lookInLabeledStatements*/ - false - )); - } - function checkNestedBlockScopedBinding(node, symbol) { - if (languageVersion >= 2 /* ES2015 */ || (symbol.flags & (2 /* BlockScopedVariable */ | 32 /* Class */)) === 0 || !symbol.valueDeclaration || isSourceFile(symbol.valueDeclaration) || symbol.valueDeclaration.parent.kind === 299 /* CatchClause */) { - return; - } - const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); - const isCaptured = isInsideFunctionOrInstancePropertyInitializer(node, container); - const enclosingIterationStatement = getEnclosingIterationStatement(container); - if (enclosingIterationStatement) { - if (isCaptured) { - let capturesBlockScopeBindingInLoopBody = true; - if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); - if (varDeclList && varDeclList.parent === container) { - const part = getPartOfForStatementContainingNode(node.parent, container); - if (part) { - const links = getNodeLinks(part); - links.flags |= 8192 /* ContainsCapturedBlockScopeBinding */; - const capturedBindings = links.capturedBlockScopeBindings || (links.capturedBlockScopeBindings = []); - pushIfUnique(capturedBindings, symbol); - if (part === container.initializer) { - capturesBlockScopeBindingInLoopBody = false; - } - } - } - } - if (capturesBlockScopeBindingInLoopBody) { - getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */; - } - } - if (isForStatement(container)) { - const varDeclList = getAncestor(symbol.valueDeclaration, 261 /* VariableDeclarationList */); - if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) { - getNodeLinks(symbol.valueDeclaration).flags |= 65536 /* NeedsLoopOutParameter */; - } - } - getNodeLinks(symbol.valueDeclaration).flags |= 32768 /* BlockScopedBindingInLoop */; - } - if (isCaptured) { - getNodeLinks(symbol.valueDeclaration).flags |= 16384 /* CapturedBlockScopedBinding */; - } - } - function isBindingCapturedByNode(node, decl) { - const links = getNodeLinks(node); - return !!links && contains(links.capturedBlockScopeBindings, getSymbolOfDeclaration(decl)); - } - function isAssignedInBodyOfForStatement(node, container) { - let current = node; - while (current.parent.kind === 217 /* ParenthesizedExpression */) { - current = current.parent; - } - let isAssigned = false; - if (isAssignmentTarget(current)) { - isAssigned = true; - } else if (current.parent.kind === 224 /* PrefixUnaryExpression */ || current.parent.kind === 225 /* PostfixUnaryExpression */) { - const expr = current.parent; - isAssigned = expr.operator === 46 /* PlusPlusToken */ || expr.operator === 47 /* MinusMinusToken */; - } - if (!isAssigned) { - return false; - } - return !!findAncestor(current, (n) => n === container ? "quit" : n === container.statement); - } - function captureLexicalThis(node, container) { - getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 172 /* PropertyDeclaration */ || container.kind === 176 /* Constructor */) { - const classNode = container.parent; - getNodeLinks(classNode).flags |= 4 /* CaptureThis */; - } else { - getNodeLinks(container).flags |= 4 /* CaptureThis */; - } - } - function findFirstSuperCall(node) { - return isSuperCall(node) ? node : isFunctionLike(node) ? void 0 : forEachChild(node, findFirstSuperCall); - } - function classDeclarationExtendsNull(classDecl) { - const classSymbol = getSymbolOfDeclaration(classDecl); - const classInstanceType = getDeclaredTypeOfSymbol(classSymbol); - const baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType); - return baseConstructorType === nullWideningType; - } - function checkThisBeforeSuper(node, container, diagnosticMessage) { - const containingClassDecl = container.parent; - const baseTypeNode = getClassExtendsHeritageElement(containingClassDecl); - if (baseTypeNode && !classDeclarationExtendsNull(containingClassDecl)) { - if (canHaveFlowNode(node) && node.flowNode && !isPostSuperFlowNode( - node.flowNode, - /*noCacheCheck*/ - false - )) { - error2(node, diagnosticMessage); - } - } - } - function checkThisInStaticClassFieldInitializerInDecoratedClass(thisExpression, container) { - if (isPropertyDeclaration(container) && hasStaticModifier(container) && legacyDecorators && container.initializer && textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && hasDecorators(container.parent)) { - error2(thisExpression, Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class); - } - } - function checkThisExpression(node) { - const isNodeInTypeQuery = isInTypeQuery(node); - let container = getThisContainer( - node, - /*includeArrowFunctions*/ - true, - /*includeClassComputedPropertyName*/ - true - ); - let capturedByArrowFunction = false; - let thisInComputedPropertyName = false; - if (container.kind === 176 /* Constructor */) { - checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class); - } - while (true) { - if (container.kind === 219 /* ArrowFunction */) { - container = getThisContainer( - container, - /*includeArrowFunctions*/ - false, - !thisInComputedPropertyName - ); - capturedByArrowFunction = true; - } - if (container.kind === 167 /* ComputedPropertyName */) { - container = getThisContainer( - container, - !capturedByArrowFunction, - /*includeClassComputedPropertyName*/ - false - ); - thisInComputedPropertyName = true; - continue; - } - break; - } - checkThisInStaticClassFieldInitializerInDecoratedClass(node, container); - if (thisInComputedPropertyName) { - error2(node, Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); - } else { - switch (container.kind) { - case 267 /* ModuleDeclaration */: - error2(node, Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); - break; - case 266 /* EnumDeclaration */: - error2(node, Diagnostics.this_cannot_be_referenced_in_current_location); - break; - case 176 /* Constructor */: - if (isInConstructorArgumentInitializer(node, container)) { - error2(node, Diagnostics.this_cannot_be_referenced_in_constructor_arguments); - } - break; - } - } - if (!isNodeInTypeQuery && capturedByArrowFunction && languageVersion < 2 /* ES2015 */) { - captureLexicalThis(node, container); - } - const type = tryGetThisTypeAt( - node, - /*includeGlobalThis*/ - true, - container - ); - if (noImplicitThis) { - const globalThisType2 = getTypeOfSymbol(globalThisSymbol); - if (type === globalThisType2 && capturedByArrowFunction) { - error2(node, Diagnostics.The_containing_arrow_function_captures_the_global_value_of_this); - } else if (!type) { - const diag2 = error2(node, Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation); - if (!isSourceFile(container)) { - const outsideThis = tryGetThisTypeAt(container); - if (outsideThis && outsideThis !== globalThisType2) { - addRelatedInfo(diag2, createDiagnosticForNode(container, Diagnostics.An_outer_value_of_this_is_shadowed_by_this_container)); - } - } - } - } - return type || anyType; - } - function tryGetThisTypeAt(node, includeGlobalThis = true, container = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - )) { - const isInJS = isInJSFile(node); - if (isFunctionLike(container) && (!isInParameterInitializerBeforeContainingFunction(node) || getThisParameter(container))) { - let thisType = getThisTypeOfDeclaration(container) || isInJS && getTypeForThisExpressionFromJSDoc(container); - if (!thisType) { - const className = getClassNameFromPrototypeMethod(container); - if (isInJS && className) { - const classSymbol = checkExpression(className).symbol; - if (classSymbol && classSymbol.members && classSymbol.flags & 16 /* Function */) { - thisType = getDeclaredTypeOfSymbol(classSymbol).thisType; - } - } else if (isJSConstructor(container)) { - thisType = getDeclaredTypeOfSymbol(getMergedSymbol(container.symbol)).thisType; - } - thisType || (thisType = getContextualThisParameterType(container)); - } - if (thisType) { - return getFlowTypeOfReference(node, thisType); - } - } - if (isClassLike(container.parent)) { - const symbol = getSymbolOfDeclaration(container.parent); - const type = isStatic(container) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType; - return getFlowTypeOfReference(node, type); - } - if (isSourceFile(container)) { - if (container.commonJsModuleIndicator) { - const fileSymbol = getSymbolOfDeclaration(container); - return fileSymbol && getTypeOfSymbol(fileSymbol); - } else if (container.externalModuleIndicator) { - return undefinedType; - } else if (includeGlobalThis) { - return getTypeOfSymbol(globalThisSymbol); - } - } - } - function getExplicitThisType(node) { - const container = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - if (isFunctionLike(container)) { - const signature = getSignatureFromDeclaration(container); - if (signature.thisParameter) { - return getExplicitTypeOfSymbol(signature.thisParameter); - } - } - if (isClassLike(container.parent)) { - const symbol = getSymbolOfDeclaration(container.parent); - return isStatic(container) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType; - } - } - function getClassNameFromPrototypeMethod(container) { - if (container.kind === 218 /* FunctionExpression */ && isBinaryExpression(container.parent) && getAssignmentDeclarationKind(container.parent) === 3 /* PrototypeProperty */) { - return container.parent.left.expression.expression; - } else if (container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent) && getAssignmentDeclarationKind(container.parent.parent) === 6 /* Prototype */) { - return container.parent.parent.left.expression; - } else if (container.kind === 218 /* FunctionExpression */ && container.parent.kind === 303 /* PropertyAssignment */ && container.parent.parent.kind === 210 /* ObjectLiteralExpression */ && isBinaryExpression(container.parent.parent.parent) && getAssignmentDeclarationKind(container.parent.parent.parent) === 6 /* Prototype */) { - return container.parent.parent.parent.left.expression; - } else if (container.kind === 218 /* FunctionExpression */ && isPropertyAssignment(container.parent) && isIdentifier(container.parent.name) && (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") && isObjectLiteralExpression(container.parent.parent) && isCallExpression(container.parent.parent.parent) && container.parent.parent.parent.arguments[2] === container.parent.parent && getAssignmentDeclarationKind(container.parent.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { - return container.parent.parent.parent.arguments[0].expression; - } else if (isMethodDeclaration(container) && isIdentifier(container.name) && (container.name.escapedText === "value" || container.name.escapedText === "get" || container.name.escapedText === "set") && isObjectLiteralExpression(container.parent) && isCallExpression(container.parent.parent) && container.parent.parent.arguments[2] === container.parent && getAssignmentDeclarationKind(container.parent.parent) === 9 /* ObjectDefinePrototypeProperty */) { - return container.parent.parent.arguments[0].expression; - } - } - function getTypeForThisExpressionFromJSDoc(node) { - const thisTag = getJSDocThisTag(node); - if (thisTag && thisTag.typeExpression) { - return getTypeFromTypeNode(thisTag.typeExpression); - } - const signature = getSignatureOfTypeTag(node); - if (signature) { - return getThisTypeOfSignature(signature); - } - } - function isInConstructorArgumentInitializer(node, constructorDecl) { - return !!findAncestor(node, (n) => isFunctionLikeDeclaration(n) ? "quit" : n.kind === 169 /* Parameter */ && n.parent === constructorDecl); - } - function checkSuperExpression(node) { - const isCallExpression2 = node.parent.kind === 213 /* CallExpression */ && node.parent.expression === node; - const immediateContainer = getSuperContainer( - node, - /*stopOnFunctions*/ - true - ); - let container = immediateContainer; - let needToCaptureLexicalThis = false; - let inAsyncFunction = false; - if (!isCallExpression2) { - while (container && container.kind === 219 /* ArrowFunction */) { - if (hasSyntacticModifier(container, 512 /* Async */)) - inAsyncFunction = true; - container = getSuperContainer( - container, - /*stopOnFunctions*/ - true - ); - needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */; - } - if (container && hasSyntacticModifier(container, 512 /* Async */)) - inAsyncFunction = true; - } - let nodeCheckFlag = 0; - if (!container || !isLegalUsageOfSuperExpression(container)) { - const current = findAncestor(node, (n) => n === container ? "quit" : n.kind === 167 /* ComputedPropertyName */); - if (current && current.kind === 167 /* ComputedPropertyName */) { - error2(node, Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); - } else if (isCallExpression2) { - error2(node, Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } else if (!container || !container.parent || !(isClassLike(container.parent) || container.parent.kind === 210 /* ObjectLiteralExpression */)) { - error2(node, Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions); - } else { - error2(node, Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); - } - return errorType; - } - if (!isCallExpression2 && immediateContainer.kind === 176 /* Constructor */) { - checkThisBeforeSuper(node, container, Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class); - } - if (isStatic(container) || isCallExpression2) { - nodeCheckFlag = 32 /* SuperStatic */; - if (!isCallExpression2 && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && (isPropertyDeclaration(container) || isClassStaticBlockDeclaration(container))) { - forEachEnclosingBlockScopeContainer(node.parent, (current) => { - if (!isSourceFile(current) || isExternalOrCommonJsModule(current)) { - getNodeLinks(current).flags |= 2097152 /* ContainsSuperPropertyInStaticInitializer */; - } - }); - } - } else { - nodeCheckFlag = 16 /* SuperInstance */; - } - getNodeLinks(node).flags |= nodeCheckFlag; - if (container.kind === 174 /* MethodDeclaration */ && inAsyncFunction) { - if (isSuperProperty(node.parent) && isAssignmentTarget(node.parent)) { - getNodeLinks(container).flags |= 256 /* MethodWithSuperPropertyAssignmentInAsync */; - } else { - getNodeLinks(container).flags |= 128 /* MethodWithSuperPropertyAccessInAsync */; - } - } - if (needToCaptureLexicalThis) { - captureLexicalThis(node.parent, container); - } - if (container.parent.kind === 210 /* ObjectLiteralExpression */) { - if (languageVersion < 2 /* ES2015 */) { - error2(node, Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher); - return errorType; - } else { - return anyType; - } - } - const classLikeDeclaration = container.parent; - if (!getClassExtendsHeritageElement(classLikeDeclaration)) { - error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); - return errorType; - } - const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration)); - const baseClassType = classType && getBaseTypes(classType)[0]; - if (!baseClassType) { - return errorType; - } - if (container.kind === 176 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { - error2(node, Diagnostics.super_cannot_be_referenced_in_constructor_arguments); - return errorType; - } - return nodeCheckFlag === 32 /* SuperStatic */ ? getBaseConstructorTypeOfClass(classType) : getTypeWithThisArgument(baseClassType, classType.thisType); - function isLegalUsageOfSuperExpression(container2) { - if (isCallExpression2) { - return container2.kind === 176 /* Constructor */; - } else { - if (isClassLike(container2.parent) || container2.parent.kind === 210 /* ObjectLiteralExpression */) { - if (isStatic(container2)) { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 175 /* ClassStaticBlockDeclaration */; - } else { - return container2.kind === 174 /* MethodDeclaration */ || container2.kind === 173 /* MethodSignature */ || container2.kind === 177 /* GetAccessor */ || container2.kind === 178 /* SetAccessor */ || container2.kind === 172 /* PropertyDeclaration */ || container2.kind === 171 /* PropertySignature */ || container2.kind === 176 /* Constructor */; - } - } - } - return false; - } - } - function getContainingObjectLiteral(func) { - return (func.kind === 174 /* MethodDeclaration */ || func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) && func.parent.kind === 210 /* ObjectLiteralExpression */ ? func.parent : func.kind === 218 /* FunctionExpression */ && func.parent.kind === 303 /* PropertyAssignment */ ? func.parent.parent : void 0; - } - function getThisTypeArgument(type) { - return getObjectFlags(type) & 4 /* Reference */ && type.target === globalThisType ? getTypeArguments(type)[0] : void 0; - } - function getThisTypeFromContextualType(type) { - return mapType(type, (t) => { - return t.flags & 2097152 /* Intersection */ ? forEach(t.types, getThisTypeArgument) : getThisTypeArgument(t); - }); - } - function getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType) { - let literal = containingLiteral; - let type = contextualType; - while (type) { - const thisType = getThisTypeFromContextualType(type); - if (thisType) { - return thisType; - } - if (literal.parent.kind !== 303 /* PropertyAssignment */) { - break; - } - literal = literal.parent.parent; - type = getApparentTypeOfContextualType( - literal, - /*contextFlags*/ - void 0 - ); - } - } - function getContextualThisParameterType(func) { - if (func.kind === 219 /* ArrowFunction */) { - return void 0; - } - if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) { - const contextualSignature = getContextualSignature(func); - if (contextualSignature) { - const thisParameter = contextualSignature.thisParameter; - if (thisParameter) { - return getTypeOfSymbol(thisParameter); - } - } - } - const inJs = isInJSFile(func); - if (noImplicitThis || inJs) { - const containingLiteral = getContainingObjectLiteral(func); - if (containingLiteral) { - const contextualType = getApparentTypeOfContextualType( - containingLiteral, - /*contextFlags*/ - void 0 - ); - const thisType = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); - if (thisType) { - return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral))); - } - return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); - } - const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */) { - const target = parent2.left; - if (isAccessExpression(target)) { - const { expression } = target; - if (inJs && isIdentifier(expression)) { - const sourceFile = getSourceFileOfNode(parent2); - if (sourceFile.commonJsModuleIndicator && getResolvedSymbol(expression) === sourceFile.symbol) { - return void 0; - } - } - return getWidenedType(checkExpressionCached(expression)); - } - } - } - return void 0; - } - function getContextuallyTypedParameterType(parameter) { - const func = parameter.parent; - if (!isContextSensitiveFunctionOrObjectLiteralMethod(func)) { - return void 0; - } - const iife = getImmediatelyInvokedFunctionExpression(func); - if (iife && iife.arguments) { - const args = getEffectiveCallArguments(iife); - const indexOfParameter = func.parameters.indexOf(parameter); - if (parameter.dotDotDotToken) { - return getSpreadArgumentType( - args, - indexOfParameter, - args.length, - anyType, - /*context*/ - void 0, - 0 /* Normal */ - ); - } - const links = getNodeLinks(iife); - const cached = links.resolvedSignature; - links.resolvedSignature = anySignature; - const type = indexOfParameter < args.length ? getWidenedLiteralType(checkExpression(args[indexOfParameter])) : parameter.initializer ? void 0 : undefinedWideningType; - links.resolvedSignature = cached; - return type; - } - const contextualSignature = getContextualSignature(func); - if (contextualSignature) { - const index = func.parameters.indexOf(parameter) - (getThisParameter(func) ? 1 : 0); - return parameter.dotDotDotToken && lastOrUndefined(func.parameters) === parameter ? getRestTypeAtPosition(contextualSignature, index) : tryGetTypeAtPosition(contextualSignature, index); - } - } - function getContextualTypeForVariableLikeDeclaration(declaration, contextFlags) { - const typeNode = getEffectiveTypeAnnotationNode(declaration) || (isInJSFile(declaration) ? tryGetJSDocSatisfiesTypeNode(declaration) : void 0); - if (typeNode) { - return getTypeFromTypeNode(typeNode); - } - switch (declaration.kind) { - case 169 /* Parameter */: - return getContextuallyTypedParameterType(declaration); - case 208 /* BindingElement */: - return getContextualTypeForBindingElement(declaration, contextFlags); - case 172 /* PropertyDeclaration */: - if (isStatic(declaration)) { - return getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags); - } - } - } - function getContextualTypeForBindingElement(declaration, contextFlags) { - const parent2 = declaration.parent.parent; - const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); - if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) - return void 0; - if (parent2.name.kind === 207 /* ArrayBindingPattern */) { - const index = indexOfNode(declaration.parent.elements, declaration); - if (index < 0) - return void 0; - return getContextualTypeForElementExpression(parentType, index); - } - const nameType = getLiteralTypeFromPropertyName(name); - if (isTypeUsableAsPropertyName(nameType)) { - const text = getPropertyNameFromType(nameType); - return getTypeOfPropertyOfType(parentType, text); - } - } - function getContextualTypeForStaticPropertyDeclaration(declaration, contextFlags) { - const parentType = isExpression(declaration.parent) && getContextualType2(declaration.parent, contextFlags); - if (!parentType) - return void 0; - return getTypeOfPropertyOfContextualType(parentType, getSymbolOfDeclaration(declaration).escapedName); - } - function getContextualTypeForInitializerExpression(node, contextFlags) { - const declaration = node.parent; - if (hasInitializer(declaration) && node === declaration.initializer) { - const result = getContextualTypeForVariableLikeDeclaration(declaration, contextFlags); - if (result) { - return result; - } - if (!(contextFlags & 8 /* SkipBindingPatterns */) && isBindingPattern(declaration.name) && declaration.name.elements.length > 0) { - return getTypeFromBindingPattern( - declaration.name, - /*includePatternInType*/ - true, - /*reportErrors*/ - false - ); - } - } - return void 0; - } - function getContextualTypeForReturnExpression(node, contextFlags) { - const func = getContainingFunction(node); - if (func) { - let contextualReturnType = getContextualReturnType(func, contextFlags); - if (contextualReturnType) { - const functionFlags = getFunctionFlags(func); - if (functionFlags & 1 /* Generator */) { - const isAsyncGenerator = (functionFlags & 2 /* Async */) !== 0; - if (contextualReturnType.flags & 1048576 /* Union */) { - contextualReturnType = filterType(contextualReturnType, (type) => !!getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, type, isAsyncGenerator)); - } - const iterationReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, contextualReturnType, (functionFlags & 2 /* Async */) !== 0); - if (!iterationReturnType) { - return void 0; - } - contextualReturnType = iterationReturnType; - } - if (functionFlags & 2 /* Async */) { - const contextualAwaitedType = mapType(contextualReturnType, getAwaitedTypeNoAlias); - return contextualAwaitedType && getUnionType([contextualAwaitedType, createPromiseLikeType(contextualAwaitedType)]); - } - return contextualReturnType; - } - } - return void 0; - } - function getContextualTypeForAwaitOperand(node, contextFlags) { - const contextualType = getContextualType2(node, contextFlags); - if (contextualType) { - const contextualAwaitedType = getAwaitedTypeNoAlias(contextualType); - return contextualAwaitedType && getUnionType([contextualAwaitedType, createPromiseLikeType(contextualAwaitedType)]); - } - return void 0; - } - function getContextualTypeForYieldOperand(node, contextFlags) { - const func = getContainingFunction(node); - if (func) { - const functionFlags = getFunctionFlags(func); - let contextualReturnType = getContextualReturnType(func, contextFlags); - if (contextualReturnType) { - const isAsyncGenerator = (functionFlags & 2 /* Async */) !== 0; - if (!node.asteriskToken && contextualReturnType.flags & 1048576 /* Union */) { - contextualReturnType = filterType(contextualReturnType, (type) => !!getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, type, isAsyncGenerator)); - } - return node.asteriskToken ? contextualReturnType : getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, contextualReturnType, isAsyncGenerator); - } - } - return void 0; - } - function isInParameterInitializerBeforeContainingFunction(node) { - let inBindingInitializer = false; - while (node.parent && !isFunctionLike(node.parent)) { - if (isParameter(node.parent) && (inBindingInitializer || node.parent.initializer === node)) { - return true; - } - if (isBindingElement(node.parent) && node.parent.initializer === node) { - inBindingInitializer = true; - } - node = node.parent; - } - return false; - } - function getContextualIterationType(kind, functionDecl) { - const isAsync = !!(getFunctionFlags(functionDecl) & 2 /* Async */); - const contextualReturnType = getContextualReturnType( - functionDecl, - /*contextFlags*/ - void 0 - ); - if (contextualReturnType) { - return getIterationTypeOfGeneratorFunctionReturnType(kind, contextualReturnType, isAsync) || void 0; - } - return void 0; - } - function getContextualReturnType(functionDecl, contextFlags) { - const returnType = getReturnTypeFromAnnotation(functionDecl); - if (returnType) { - return returnType; - } - const signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); - if (signature && !isResolvingReturnTypeOfSignature(signature)) { - return getReturnTypeOfSignature(signature); - } - const iife = getImmediatelyInvokedFunctionExpression(functionDecl); - if (iife) { - return getContextualType2(iife, contextFlags); - } - return void 0; - } - function getContextualTypeForArgument(callTarget, arg) { - const args = getEffectiveCallArguments(callTarget); - const argIndex = args.indexOf(arg); - return argIndex === -1 ? void 0 : getContextualTypeForArgumentAtIndex(callTarget, argIndex); - } - function getContextualTypeForArgumentAtIndex(callTarget, argIndex) { - if (isImportCall(callTarget)) { - return argIndex === 0 ? stringType : argIndex === 1 ? getGlobalImportCallOptionsType( - /*reportErrors*/ - false - ) : anyType; - } - const signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget); - if (isJsxOpeningLikeElement(callTarget) && argIndex === 0) { - return getEffectiveFirstArgumentForJsxSignature(signature, callTarget); - } - const restIndex = signature.parameters.length - 1; - return signatureHasRestParameter(signature) && argIndex >= restIndex ? getIndexedAccessType(getTypeOfSymbol(signature.parameters[restIndex]), getNumberLiteralType(argIndex - restIndex), 256 /* Contextual */) : getTypeAtPosition(signature, argIndex); - } - function getContextualTypeForDecorator(decorator) { - const signature = getDecoratorCallSignature(decorator); - return signature ? getOrCreateTypeFromSignature(signature) : void 0; - } - function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 215 /* TaggedTemplateExpression */) { - return getContextualTypeForArgument(template.parent, substitutionExpression); - } - return void 0; - } - function getContextualTypeForBinaryOperand(node, contextFlags) { - const binaryExpression = node.parent; - const { left, operatorToken, right } = binaryExpression; - switch (operatorToken.kind) { - case 64 /* EqualsToken */: - case 77 /* AmpersandAmpersandEqualsToken */: - case 76 /* BarBarEqualsToken */: - case 78 /* QuestionQuestionEqualsToken */: - return node === right ? getContextualTypeForAssignmentDeclaration(binaryExpression) : void 0; - case 57 /* BarBarToken */: - case 61 /* QuestionQuestionToken */: - const type = getContextualType2(binaryExpression, contextFlags); - return node === right && (type && type.pattern || !type && !isDefaultedExpandoInitializer(binaryExpression)) ? getTypeOfExpression(left) : type; - case 56 /* AmpersandAmpersandToken */: - case 28 /* CommaToken */: - return node === right ? getContextualType2(binaryExpression, contextFlags) : void 0; - default: - return void 0; - } - } - function getSymbolForExpression(e) { - if (canHaveSymbol(e) && e.symbol) { - return e.symbol; - } - if (isIdentifier(e)) { - return getResolvedSymbol(e); - } - if (isPropertyAccessExpression(e)) { - const lhsType = getTypeOfExpression(e.expression); - return isPrivateIdentifier(e.name) ? tryGetPrivateIdentifierPropertyOfType(lhsType, e.name) : getPropertyOfType(lhsType, e.name.escapedText); - } - if (isElementAccessExpression(e)) { - const propType = checkExpressionCached(e.argumentExpression); - if (!isTypeUsableAsPropertyName(propType)) { - return void 0; - } - const lhsType = getTypeOfExpression(e.expression); - return getPropertyOfType(lhsType, getPropertyNameFromType(propType)); - } - return void 0; - function tryGetPrivateIdentifierPropertyOfType(type, id) { - const lexicallyScopedSymbol = lookupSymbolForPrivateIdentifierDeclaration(id.escapedText, id); - return lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(type, lexicallyScopedSymbol); - } - } - function getContextualTypeForAssignmentDeclaration(binaryExpression) { - var _a, _b; - const kind = getAssignmentDeclarationKind(binaryExpression); - switch (kind) { - case 0 /* None */: - case 4 /* ThisProperty */: - const lhsSymbol = getSymbolForExpression(binaryExpression.left); - const decl = lhsSymbol && lhsSymbol.valueDeclaration; - if (decl && (isPropertyDeclaration(decl) || isPropertySignature(decl))) { - const overallAnnotation = getEffectiveTypeAnnotationNode(decl); - return overallAnnotation && instantiateType(getTypeFromTypeNode(overallAnnotation), getSymbolLinks(lhsSymbol).mapper) || (isPropertyDeclaration(decl) ? decl.initializer && getTypeOfExpression(binaryExpression.left) : void 0); - } - if (kind === 0 /* None */) { - return getTypeOfExpression(binaryExpression.left); - } - return getContextualTypeForThisPropertyAssignment(binaryExpression); - case 5 /* Property */: - if (isPossiblyAliasedThisProperty(binaryExpression, kind)) { - return getContextualTypeForThisPropertyAssignment(binaryExpression); - } else if (!canHaveSymbol(binaryExpression.left) || !binaryExpression.left.symbol) { - return getTypeOfExpression(binaryExpression.left); - } else { - const decl2 = binaryExpression.left.symbol.valueDeclaration; - if (!decl2) { - return void 0; - } - const lhs = cast(binaryExpression.left, isAccessExpression); - const overallAnnotation = getEffectiveTypeAnnotationNode(decl2); - if (overallAnnotation) { - return getTypeFromTypeNode(overallAnnotation); - } else if (isIdentifier(lhs.expression)) { - const id = lhs.expression; - const parentSymbol = resolveName( - id, - id.escapedText, - 111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - id.escapedText, - /*isUse*/ - true - ); - if (parentSymbol) { - const annotated2 = parentSymbol.valueDeclaration && getEffectiveTypeAnnotationNode(parentSymbol.valueDeclaration); - if (annotated2) { - const nameStr = getElementOrPropertyAccessName(lhs); - if (nameStr !== void 0) { - return getTypeOfPropertyOfContextualType(getTypeFromTypeNode(annotated2), nameStr); - } - } - return void 0; - } - } - return isInJSFile(decl2) || decl2 === binaryExpression.left ? void 0 : getTypeOfExpression(binaryExpression.left); - } - case 1 /* ExportsProperty */: - case 6 /* Prototype */: - case 3 /* PrototypeProperty */: - case 2 /* ModuleExports */: - let valueDeclaration; - if (kind !== 2 /* ModuleExports */) { - valueDeclaration = canHaveSymbol(binaryExpression.left) ? (_a = binaryExpression.left.symbol) == null ? void 0 : _a.valueDeclaration : void 0; - } - valueDeclaration || (valueDeclaration = (_b = binaryExpression.symbol) == null ? void 0 : _b.valueDeclaration); - const annotated = valueDeclaration && getEffectiveTypeAnnotationNode(valueDeclaration); - return annotated ? getTypeFromTypeNode(annotated) : void 0; - case 7 /* ObjectDefinePropertyValue */: - case 8 /* ObjectDefinePropertyExports */: - case 9 /* ObjectDefinePrototypeProperty */: - return Debug.fail("Does not apply"); - default: - return Debug.assertNever(kind); - } - } - function isPossiblyAliasedThisProperty(declaration, kind = getAssignmentDeclarationKind(declaration)) { - if (kind === 4 /* ThisProperty */) { - return true; - } - if (!isInJSFile(declaration) || kind !== 5 /* Property */ || !isIdentifier(declaration.left.expression)) { - return false; - } - const name = declaration.left.expression.escapedText; - const symbol = resolveName( - declaration.left, - name, - 111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - true, - /*excludeGlobals*/ - true - ); - return isThisInitializedDeclaration(symbol == null ? void 0 : symbol.valueDeclaration); - } - function getContextualTypeForThisPropertyAssignment(binaryExpression) { - if (!binaryExpression.symbol) - return getTypeOfExpression(binaryExpression.left); - if (binaryExpression.symbol.valueDeclaration) { - const annotated = getEffectiveTypeAnnotationNode(binaryExpression.symbol.valueDeclaration); - if (annotated) { - const type = getTypeFromTypeNode(annotated); - if (type) { - return type; - } - } - } - const thisAccess = cast(binaryExpression.left, isAccessExpression); - if (!isObjectLiteralMethod(getThisContainer( - thisAccess.expression, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ))) { - return void 0; - } - const thisType = checkThisExpression(thisAccess.expression); - const nameStr = getElementOrPropertyAccessName(thisAccess); - return nameStr !== void 0 && getTypeOfPropertyOfContextualType(thisType, nameStr) || void 0; - } - function isCircularMappedProperty(symbol) { - return !!(getCheckFlags(symbol) & 262144 /* Mapped */ && !symbol.links.type && findResolutionCycleStartIndex(symbol, 0 /* Type */) >= 0); - } - function getTypeOfPropertyOfContextualType(type, name, nameType) { - return mapType( - type, - (t) => { - var _a; - if (isGenericMappedType(t) && !t.declaration.nameType) { - const constraint = getConstraintTypeFromMappedType(t); - const constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint; - const propertyNameType = nameType || getStringLiteralType(unescapeLeadingUnderscores(name)); - if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) { - return substituteIndexedMappedType(t, propertyNameType); - } - } else if (t.flags & 3670016 /* StructuredType */) { - const prop = getPropertyOfType(t, name); - if (prop) { - return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop); - } - if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) { - const restType = getElementTypeOfSliceOfTupleType( - t, - t.target.fixedLength, - /*endSkipCount*/ - 0, - /*writing*/ - false, - /*noReductions*/ - true - ); - if (restType) { - return restType; - } - } - return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType || getStringLiteralType(unescapeLeadingUnderscores(name)))) == null ? void 0 : _a.type; - } - return void 0; - }, - /*noReductions*/ - true - ); - } - function getContextualTypeForObjectLiteralMethod(node, contextFlags) { - Debug.assert(isObjectLiteralMethod(node)); - if (node.flags & 67108864 /* InWithStatement */) { - return void 0; - } - return getContextualTypeForObjectLiteralElement(node, contextFlags); - } - function getContextualTypeForObjectLiteralElement(element, contextFlags) { - const objectLiteral = element.parent; - const propertyAssignmentType = isPropertyAssignment(element) && getContextualTypeForVariableLikeDeclaration(element, contextFlags); - if (propertyAssignmentType) { - return propertyAssignmentType; - } - const type = getApparentTypeOfContextualType(objectLiteral, contextFlags); - if (type) { - if (hasBindableName(element)) { - const symbol = getSymbolOfDeclaration(element); - return getTypeOfPropertyOfContextualType(type, symbol.escapedName, getSymbolLinks(symbol).nameType); - } - if (hasDynamicName(element)) { - const name = getNameOfDeclaration(element); - if (name && isComputedPropertyName(name)) { - const exprType = checkExpression(name.expression); - const propType = isTypeUsableAsPropertyName(exprType) && getTypeOfPropertyOfContextualType(type, getPropertyNameFromType(exprType)); - if (propType) { - return propType; - } - } - } - if (element.name) { - const nameType = getLiteralTypeFromPropertyName(element.name); - return mapType( - type, - (t) => { - var _a; - return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType)) == null ? void 0 : _a.type; - }, - /*noReductions*/ - true - ); - } - } - return void 0; - } - function getSpreadIndices(elements) { - let first2, last2; - for (let i = 0; i < elements.length; i++) { - if (isSpreadElement(elements[i])) { - first2 ?? (first2 = i); - last2 = i; - } - } - return { first: first2, last: last2 }; - } - function getContextualTypeForElementExpression(type, index, length2, firstSpreadIndex, lastSpreadIndex) { - return type && mapType( - type, - (t) => { - if (isTupleType(t)) { - if ((firstSpreadIndex === void 0 || index < firstSpreadIndex) && index < t.target.fixedLength) { - return getTypeArguments(t)[index]; - } - const offset = length2 !== void 0 && (lastSpreadIndex === void 0 || index > lastSpreadIndex) ? length2 - index : 0; - const fixedEndLength = offset > 0 && t.target.hasRestElement ? getEndElementCount(t.target, 3 /* Fixed */) : 0; - if (offset > 0 && offset <= fixedEndLength) { - return getTypeArguments(t)[getTypeReferenceArity(t) - offset]; - } - return getElementTypeOfSliceOfTupleType( - t, - firstSpreadIndex === void 0 ? t.target.fixedLength : Math.min(t.target.fixedLength, firstSpreadIndex), - length2 === void 0 || lastSpreadIndex === void 0 ? fixedEndLength : Math.min(fixedEndLength, length2 - lastSpreadIndex), - /*writing*/ - false, - /*noReductions*/ - true - ); - } - return (!firstSpreadIndex || index < firstSpreadIndex) && getTypeOfPropertyOfContextualType(t, "" + index) || getIteratedTypeOrElementType( - 1 /* Element */, - t, - undefinedType, - /*errorNode*/ - void 0, - /*checkAssignability*/ - false - ); - }, - /*noReductions*/ - true - ); - } - function getContextualTypeForConditionalOperand(node, contextFlags) { - const conditional = node.parent; - return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType2(conditional, contextFlags) : void 0; - } - function getContextualTypeForChildJsxExpression(node, child, contextFlags) { - const attributesType = getApparentTypeOfContextualType(node.openingElement.attributes, contextFlags); - const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node)); - if (!(attributesType && !isTypeAny(attributesType) && jsxChildrenPropertyName && jsxChildrenPropertyName !== "")) { - return void 0; - } - const realChildren = getSemanticJsxChildren(node.children); - const childIndex = realChildren.indexOf(child); - const childFieldType = getTypeOfPropertyOfContextualType(attributesType, jsxChildrenPropertyName); - return childFieldType && (realChildren.length === 1 ? childFieldType : mapType( - childFieldType, - (t) => { - if (isArrayLikeType(t)) { - return getIndexedAccessType(t, getNumberLiteralType(childIndex)); - } else { - return t; - } - }, - /*noReductions*/ - true - )); - } - function getContextualTypeForJsxExpression(node, contextFlags) { - const exprParent = node.parent; - return isJsxAttributeLike(exprParent) ? getContextualType2(node, contextFlags) : isJsxElement(exprParent) ? getContextualTypeForChildJsxExpression(exprParent, node, contextFlags) : void 0; - } - function getContextualTypeForJsxAttribute(attribute, contextFlags) { - if (isJsxAttribute(attribute)) { - const attributesType = getApparentTypeOfContextualType(attribute.parent, contextFlags); - if (!attributesType || isTypeAny(attributesType)) { - return void 0; - } - return getTypeOfPropertyOfContextualType(attributesType, getEscapedTextOfJsxAttributeName(attribute.name)); - } else { - return getContextualType2(attribute.parent, contextFlags); - } - } - function isPossiblyDiscriminantValue(node) { - switch (node.kind) { - case 11 /* StringLiteral */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 106 /* NullKeyword */: - case 80 /* Identifier */: - case 157 /* UndefinedKeyword */: - return true; - case 211 /* PropertyAccessExpression */: - case 217 /* ParenthesizedExpression */: - return isPossiblyDiscriminantValue(node.expression); - case 294 /* JsxExpression */: - return !node.expression || isPossiblyDiscriminantValue(node.expression); - } - return false; - } - function discriminateContextualTypeByObjectMembers(node, contextualType) { - return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems( - contextualType, - concatenate( - map( - filter(node.properties, (p) => !!p.symbol && p.kind === 303 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), - (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] - ), - map( - filter(getPropertiesOfType(contextualType), (s) => { - var _a; - return !!(s.flags & 16777216 /* Optional */) && !!((_a = node == null ? void 0 : node.symbol) == null ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); - }), - (s) => [() => undefinedType, s.escapedName] - ) - ), - isTypeAssignableTo - ); - } - function discriminateContextualTypeByJSXAttributes(node, contextualType) { - const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node)); - return discriminateTypeByDiscriminableItems( - contextualType, - concatenate( - map( - filter(node.properties, (p) => !!p.symbol && p.kind === 291 /* JsxAttribute */ && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer))), - (prop) => [!prop.initializer ? () => trueType : () => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] - ), - map( - filter(getPropertiesOfType(contextualType), (s) => { - var _a; - if (!(s.flags & 16777216 /* Optional */) || !((_a = node == null ? void 0 : node.symbol) == null ? void 0 : _a.members)) { - return false; - } - const element = node.parent.parent; - if (s.escapedName === jsxChildrenPropertyName && isJsxElement(element) && getSemanticJsxChildren(element.children).length) { - return false; - } - return !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); - }), - (s) => [() => undefinedType, s.escapedName] - ) - ), - isTypeAssignableTo - ); - } - function getApparentTypeOfContextualType(node, contextFlags) { - const contextualType = isObjectLiteralMethod(node) ? getContextualTypeForObjectLiteralMethod(node, contextFlags) : getContextualType2(node, contextFlags); - const instantiatedType = instantiateContextualType(contextualType, node, contextFlags); - if (instantiatedType && !(contextFlags && contextFlags & 2 /* NoConstraints */ && instantiatedType.flags & 8650752 /* TypeVariable */)) { - const apparentType = mapType( - instantiatedType, - // When obtaining apparent type of *contextual* type we don't want to get apparent type of mapped types. - // That would evaluate mapped types with array or tuple type constraints too eagerly - // and thus it would prevent `getTypeOfPropertyOfContextualType` from obtaining per-position contextual type for elements of array literal expressions. - // Apparent type of other mapped types is already the mapped type itself so we can just avoid calling `getApparentType` here for all mapped types. - (t) => getObjectFlags(t) & 32 /* Mapped */ ? t : getApparentType(t), - /*noReductions*/ - true - ); - return apparentType.flags & 1048576 /* Union */ && isObjectLiteralExpression(node) ? discriminateContextualTypeByObjectMembers(node, apparentType) : apparentType.flags & 1048576 /* Union */ && isJsxAttributes(node) ? discriminateContextualTypeByJSXAttributes(node, apparentType) : apparentType; - } - } - function instantiateContextualType(contextualType, node, contextFlags) { - if (contextualType && maybeTypeOfKind(contextualType, 465829888 /* Instantiable */)) { - const inferenceContext = getInferenceContext(node); - if (inferenceContext && contextFlags & 1 /* Signature */ && some(inferenceContext.inferences, hasInferenceCandidatesOrDefault)) { - return instantiateInstantiableTypes(contextualType, inferenceContext.nonFixingMapper); - } - if (inferenceContext == null ? void 0 : inferenceContext.returnMapper) { - const type = instantiateInstantiableTypes(contextualType, inferenceContext.returnMapper); - return type.flags & 1048576 /* Union */ && containsType(type.types, regularFalseType) && containsType(type.types, regularTrueType) ? filterType(type, (t) => t !== regularFalseType && t !== regularTrueType) : type; - } - } - return contextualType; - } - function instantiateInstantiableTypes(type, mapper) { - if (type.flags & 465829888 /* Instantiable */) { - return instantiateType(type, mapper); - } - if (type.flags & 1048576 /* Union */) { - return getUnionType(map(type.types, (t) => instantiateInstantiableTypes(t, mapper)), 0 /* None */); - } - if (type.flags & 2097152 /* Intersection */) { - return getIntersectionType(map(type.types, (t) => instantiateInstantiableTypes(t, mapper))); - } - return type; - } - function getContextualType2(node, contextFlags) { - var _a; - if (node.flags & 67108864 /* InWithStatement */) { - return void 0; - } - const index = findContextualNode( - node, - /*includeCaches*/ - !contextFlags - ); - if (index >= 0) { - return contextualTypes[index]; - } - const { parent: parent2 } = node; - switch (parent2.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 208 /* BindingElement */: - return getContextualTypeForInitializerExpression(node, contextFlags); - case 219 /* ArrowFunction */: - case 253 /* ReturnStatement */: - return getContextualTypeForReturnExpression(node, contextFlags); - case 229 /* YieldExpression */: - return getContextualTypeForYieldOperand(parent2, contextFlags); - case 223 /* AwaitExpression */: - return getContextualTypeForAwaitOperand(parent2, contextFlags); - case 213 /* CallExpression */: - case 214 /* NewExpression */: - return getContextualTypeForArgument(parent2, node); - case 170 /* Decorator */: - return getContextualTypeForDecorator(parent2); - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - return isConstTypeReference(parent2.type) ? getContextualType2(parent2, contextFlags) : getTypeFromTypeNode(parent2.type); - case 226 /* BinaryExpression */: - return getContextualTypeForBinaryOperand(node, contextFlags); - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - return getContextualTypeForObjectLiteralElement(parent2, contextFlags); - case 305 /* SpreadAssignment */: - return getContextualType2(parent2.parent, contextFlags); - case 209 /* ArrayLiteralExpression */: { - const arrayLiteral = parent2; - const type = getApparentTypeOfContextualType(arrayLiteral, contextFlags); - const elementIndex = indexOfNode(arrayLiteral.elements, node); - const spreadIndices = (_a = getNodeLinks(arrayLiteral)).spreadIndices ?? (_a.spreadIndices = getSpreadIndices(arrayLiteral.elements)); - return getContextualTypeForElementExpression(type, elementIndex, arrayLiteral.elements.length, spreadIndices.first, spreadIndices.last); - } - case 227 /* ConditionalExpression */: - return getContextualTypeForConditionalOperand(node, contextFlags); - case 239 /* TemplateSpan */: - Debug.assert(parent2.parent.kind === 228 /* TemplateExpression */); - return getContextualTypeForSubstitutionExpression(parent2.parent, node); - case 217 /* ParenthesizedExpression */: { - if (isInJSFile(parent2)) { - if (isJSDocSatisfiesExpression(parent2)) { - return getTypeFromTypeNode(getJSDocSatisfiesExpressionType(parent2)); - } - const typeTag = getJSDocTypeTag(parent2); - if (typeTag && !isConstTypeReference(typeTag.typeExpression.type)) { - return getTypeFromTypeNode(typeTag.typeExpression.type); - } - } - return getContextualType2(parent2, contextFlags); - } - case 235 /* NonNullExpression */: - return getContextualType2(parent2, contextFlags); - case 238 /* SatisfiesExpression */: - return getTypeFromTypeNode(parent2.type); - case 277 /* ExportAssignment */: - return tryGetTypeFromEffectiveTypeNode(parent2); - case 294 /* JsxExpression */: - return getContextualTypeForJsxExpression(parent2, contextFlags); - case 291 /* JsxAttribute */: - case 293 /* JsxSpreadAttribute */: - return getContextualTypeForJsxAttribute(parent2, contextFlags); - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: - return getContextualJsxElementAttributesType(parent2, contextFlags); - } - return void 0; - } - function pushCachedContextualType(node) { - pushContextualType( - node, - getContextualType2( - node, - /*contextFlags*/ - void 0 - ), - /*isCache*/ - true - ); - } - function pushContextualType(node, type, isCache) { - contextualTypeNodes[contextualTypeCount] = node; - contextualTypes[contextualTypeCount] = type; - contextualIsCache[contextualTypeCount] = isCache; - contextualTypeCount++; - } - function popContextualType() { - contextualTypeCount--; - } - function findContextualNode(node, includeCaches) { - for (let i = contextualTypeCount - 1; i >= 0; i--) { - if (node === contextualTypeNodes[i] && (includeCaches || !contextualIsCache[i])) { - return i; - } - } - return -1; - } - function pushInferenceContext(node, inferenceContext) { - inferenceContextNodes[inferenceContextCount] = node; - inferenceContexts[inferenceContextCount] = inferenceContext; - inferenceContextCount++; - } - function popInferenceContext() { - inferenceContextCount--; - } - function getInferenceContext(node) { - for (let i = inferenceContextCount - 1; i >= 0; i--) { - if (isNodeDescendantOf(node, inferenceContextNodes[i])) { - return inferenceContexts[i]; - } - } - } - function getContextualJsxElementAttributesType(node, contextFlags) { - if (isJsxOpeningElement(node) && contextFlags !== 4 /* Completions */) { - const index = findContextualNode( - node.parent, - /*includeCaches*/ - !contextFlags - ); - if (index >= 0) { - return contextualTypes[index]; - } - } - return getContextualTypeForArgumentAtIndex(node, 0); - } - function getEffectiveFirstArgumentForJsxSignature(signature, node) { - return getJsxReferenceKind(node) !== 0 /* Component */ ? getJsxPropsTypeFromCallSignature(signature, node) : getJsxPropsTypeFromClassType(signature, node); - } - function getJsxPropsTypeFromCallSignature(sig, context) { - let propsType = getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType); - propsType = getJsxManagedAttributesFromLocatedAttributes(context, getJsxNamespaceAt(context), propsType); - const intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context); - if (!isErrorType(intrinsicAttribs)) { - propsType = intersectTypes(intrinsicAttribs, propsType); - } - return propsType; - } - function getJsxPropsTypeForSignatureFromMember(sig, forcedLookupLocation) { - if (sig.compositeSignatures) { - const results = []; - for (const signature of sig.compositeSignatures) { - const instance = getReturnTypeOfSignature(signature); - if (isTypeAny(instance)) { - return instance; - } - const propType = getTypeOfPropertyOfType(instance, forcedLookupLocation); - if (!propType) { - return; - } - results.push(propType); - } - return getIntersectionType(results); - } - const instanceType = getReturnTypeOfSignature(sig); - return isTypeAny(instanceType) ? instanceType : getTypeOfPropertyOfType(instanceType, forcedLookupLocation); - } - function getStaticTypeOfReferencedJsxConstructor(context) { - if (isJsxIntrinsicTagName(context.tagName)) { - const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(context); - const fakeSignature = createSignatureForJSXIntrinsic(context, result); - return getOrCreateTypeFromSignature(fakeSignature); - } - const tagType = checkExpressionCached(context.tagName); - if (tagType.flags & 128 /* StringLiteral */) { - const result = getIntrinsicAttributesTypeFromStringLiteralType(tagType, context); - if (!result) { - return errorType; - } - const fakeSignature = createSignatureForJSXIntrinsic(context, result); - return getOrCreateTypeFromSignature(fakeSignature); - } - return tagType; - } - function getJsxManagedAttributesFromLocatedAttributes(context, ns, attributesType) { - const managedSym = getJsxLibraryManagedAttributes(ns); - if (managedSym) { - const ctorType = getStaticTypeOfReferencedJsxConstructor(context); - const result = instantiateAliasOrInterfaceWithDefaults(managedSym, isInJSFile(context), ctorType, attributesType); - if (result) { - return result; - } - } - return attributesType; - } - function getJsxPropsTypeFromClassType(sig, context) { - const ns = getJsxNamespaceAt(context); - const forcedLookupLocation = getJsxElementPropertiesName(ns); - let attributesType = forcedLookupLocation === void 0 ? getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType) : forcedLookupLocation === "" ? getReturnTypeOfSignature(sig) : getJsxPropsTypeForSignatureFromMember(sig, forcedLookupLocation); - if (!attributesType) { - if (!!forcedLookupLocation && !!length(context.attributes.properties)) { - error2(context, Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property, unescapeLeadingUnderscores(forcedLookupLocation)); - } - return unknownType; - } - attributesType = getJsxManagedAttributesFromLocatedAttributes(context, ns, attributesType); - if (isTypeAny(attributesType)) { - return attributesType; - } else { - let apparentAttributesType = attributesType; - const intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes, context); - if (!isErrorType(intrinsicClassAttribs)) { - const typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol); - const hostClassType = getReturnTypeOfSignature(sig); - let libraryManagedAttributeType; - if (typeParams) { - const inferredArgs = fillMissingTypeArguments([hostClassType], typeParams, getMinTypeArgumentCount(typeParams), isInJSFile(context)); - libraryManagedAttributeType = instantiateType(intrinsicClassAttribs, createTypeMapper(typeParams, inferredArgs)); - } else - libraryManagedAttributeType = intrinsicClassAttribs; - apparentAttributesType = intersectTypes(libraryManagedAttributeType, apparentAttributesType); - } - const intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context); - if (!isErrorType(intrinsicAttribs)) { - apparentAttributesType = intersectTypes(intrinsicAttribs, apparentAttributesType); - } - return apparentAttributesType; - } - } - function getIntersectedSignatures(signatures) { - return getStrictOptionValue(compilerOptions, "noImplicitAny") ? reduceLeft( - signatures, - (left, right) => left === right || !left ? left : compareTypeParametersIdentical(left.typeParameters, right.typeParameters) ? combineSignaturesOfIntersectionMembers(left, right) : void 0 - ) : void 0; - } - function combineIntersectionThisParam(left, right, mapper) { - if (!left || !right) { - return left || right; - } - const thisType = getUnionType([getTypeOfSymbol(left), instantiateType(getTypeOfSymbol(right), mapper)]); - return createSymbolWithType(left, thisType); - } - function combineIntersectionParameters(left, right, mapper) { - const leftCount = getParameterCount(left); - const rightCount = getParameterCount(right); - const longest = leftCount >= rightCount ? left : right; - const shorter = longest === left ? right : left; - const longestCount = longest === left ? leftCount : rightCount; - const eitherHasEffectiveRest = hasEffectiveRestParameter(left) || hasEffectiveRestParameter(right); - const needsExtraRestElement = eitherHasEffectiveRest && !hasEffectiveRestParameter(longest); - const params = new Array(longestCount + (needsExtraRestElement ? 1 : 0)); - for (let i = 0; i < longestCount; i++) { - let longestParamType = tryGetTypeAtPosition(longest, i); - if (longest === right) { - longestParamType = instantiateType(longestParamType, mapper); - } - let shorterParamType = tryGetTypeAtPosition(shorter, i) || unknownType; - if (shorter === right) { - shorterParamType = instantiateType(shorterParamType, mapper); - } - const unionParamType = getUnionType([longestParamType, shorterParamType]); - const isRestParam = eitherHasEffectiveRest && !needsExtraRestElement && i === longestCount - 1; - const isOptional = i >= getMinArgumentCount(longest) && i >= getMinArgumentCount(shorter); - const leftName = i >= leftCount ? void 0 : getParameterNameAtPosition(left, i); - const rightName = i >= rightCount ? void 0 : getParameterNameAtPosition(right, i); - const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0; - const paramSymbol = createSymbol( - 1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), - paramName || `arg${i}` - ); - paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType; - params[i] = paramSymbol; - } - if (needsExtraRestElement) { - const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args"); - restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount)); - if (shorter === right) { - restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper); - } - params[longestCount] = restParamSymbol; - } - return params; - } - function combineSignaturesOfIntersectionMembers(left, right) { - const typeParams = left.typeParameters || right.typeParameters; - let paramMapper; - if (left.typeParameters && right.typeParameters) { - paramMapper = createTypeMapper(right.typeParameters, left.typeParameters); - } - const declaration = left.declaration; - const params = combineIntersectionParameters(left, right, paramMapper); - const thisParam = combineIntersectionThisParam(left.thisParameter, right.thisParameter, paramMapper); - const minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount); - const result = createSignature( - declaration, - typeParams, - thisParam, - params, - /*resolvedReturnType*/ - void 0, - /*resolvedTypePredicate*/ - void 0, - minArgCount, - (left.flags | right.flags) & 167 /* PropagatingFlags */ - ); - result.compositeKind = 2097152 /* Intersection */; - result.compositeSignatures = concatenate(left.compositeKind === 2097152 /* Intersection */ && left.compositeSignatures || [left], [right]); - if (paramMapper) { - result.mapper = left.compositeKind === 2097152 /* Intersection */ && left.mapper && left.compositeSignatures ? combineTypeMappers(left.mapper, paramMapper) : paramMapper; - } - return result; - } - function getContextualCallSignature(type, node) { - const signatures = getSignaturesOfType(type, 0 /* Call */); - const applicableByArity = filter(signatures, (s) => !isAritySmaller(s, node)); - return applicableByArity.length === 1 ? applicableByArity[0] : getIntersectedSignatures(applicableByArity); - } - function isAritySmaller(signature, target) { - let targetParameterCount = 0; - for (; targetParameterCount < target.parameters.length; targetParameterCount++) { - const param = target.parameters[targetParameterCount]; - if (param.initializer || param.questionToken || param.dotDotDotToken || isJSDocOptionalParameter(param)) { - break; - } - } - if (target.parameters.length && parameterIsThisKeyword(target.parameters[0])) { - targetParameterCount--; - } - return !hasEffectiveRestParameter(signature) && getParameterCount(signature) < targetParameterCount; - } - function getContextualSignatureForFunctionLikeDeclaration(node) { - return isFunctionExpressionOrArrowFunction(node) || isObjectLiteralMethod(node) ? getContextualSignature(node) : void 0; - } - function getContextualSignature(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); - const typeTagSignature = getSignatureOfTypeTag(node); - if (typeTagSignature) { - return typeTagSignature; - } - const type = getApparentTypeOfContextualType(node, 1 /* Signature */); - if (!type) { - return void 0; - } - if (!(type.flags & 1048576 /* Union */)) { - return getContextualCallSignature(type, node); - } - let signatureList; - const types = type.types; - for (const current of types) { - const signature = getContextualCallSignature(current, node); - if (signature) { - if (!signatureList) { - signatureList = [signature]; - } else if (!compareSignaturesIdentical( - signatureList[0], - signature, - /*partialMatch*/ - false, - /*ignoreThisTypes*/ - true, - /*ignoreReturnTypes*/ - true, - compareTypesIdentical - )) { - return void 0; - } else { - signatureList.push(signature); - } - } - } - if (signatureList) { - return signatureList.length === 1 ? signatureList[0] : createUnionSignature(signatureList[0], signatureList); - } - } - function checkSpreadExpression(node, checkMode) { - if (languageVersion < 2 /* ES2015 */) { - checkExternalEmitHelpers(node, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); - } - const arrayOrIterableType = checkExpression(node.expression, checkMode); - return checkIteratedTypeOrElementType(33 /* Spread */, arrayOrIterableType, undefinedType, node.expression); - } - function checkSyntheticExpression(node) { - return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type; - } - function hasDefaultValue(node) { - return node.kind === 208 /* BindingElement */ && !!node.initializer || node.kind === 226 /* BinaryExpression */ && node.operatorToken.kind === 64 /* EqualsToken */; - } - function isSpreadIntoCallOrNew(node) { - const parent2 = walkUpParenthesizedExpressions(node.parent); - return isSpreadElement(parent2) && isCallOrNewExpression(parent2.parent); - } - function checkArrayLiteral(node, checkMode, forceTuple) { - const elements = node.elements; - const elementCount = elements.length; - const elementTypes = []; - const elementFlags = []; - pushCachedContextualType(node); - const inDestructuringPattern = isAssignmentTarget(node); - const inConstContext = isConstContext(node); - const contextualType = getApparentTypeOfContextualType( - node, - /*contextFlags*/ - void 0 - ); - const inTupleContext = isSpreadIntoCallOrNew(node) || !!contextualType && someType(contextualType, isTupleLikeType); - let hasOmittedExpression = false; - for (let i = 0; i < elementCount; i++) { - const e = elements[i]; - if (e.kind === 230 /* SpreadElement */) { - if (languageVersion < 2 /* ES2015 */) { - checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 /* SpreadIncludes */ : 1024 /* SpreadArray */); - } - const spreadType = checkExpression(e.expression, checkMode, forceTuple); - if (isArrayLikeType(spreadType)) { - elementTypes.push(spreadType); - elementFlags.push(8 /* Variadic */); - } else if (inDestructuringPattern) { - const restElementType = getIndexTypeOfType(spreadType, numberType) || getIteratedTypeOrElementType( - 65 /* Destructuring */, - spreadType, - undefinedType, - /*errorNode*/ - void 0, - /*checkAssignability*/ - false - ) || unknownType; - elementTypes.push(restElementType); - elementFlags.push(4 /* Rest */); - } else { - elementTypes.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, e.expression)); - elementFlags.push(4 /* Rest */); - } - } else if (exactOptionalPropertyTypes && e.kind === 232 /* OmittedExpression */) { - hasOmittedExpression = true; - elementTypes.push(undefinedOrMissingType); - elementFlags.push(2 /* Optional */); - } else { - const type = checkExpressionForMutableLocation(e, checkMode, forceTuple); - elementTypes.push(addOptionality( - type, - /*isProperty*/ - true, - hasOmittedExpression - )); - elementFlags.push(hasOmittedExpression ? 2 /* Optional */ : 1 /* Required */); - if (inTupleContext && checkMode && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(e)) { - const inferenceContext = getInferenceContext(node); - Debug.assert(inferenceContext); - addIntraExpressionInferenceSite(inferenceContext, e, type); - } - } - } - popContextualType(); - if (inDestructuringPattern) { - return createTupleType(elementTypes, elementFlags); - } - if (forceTuple || inConstContext || inTupleContext) { - return createArrayLiteralType(createTupleType( - elementTypes, - elementFlags, - /*readonly*/ - inConstContext - )); - } - return createArrayLiteralType(createArrayType(elementTypes.length ? getUnionType(sameMap(elementTypes, (t, i) => elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessTypeOrUndefined(t, numberType) || anyType : t), 2 /* Subtype */) : strictNullChecks ? implicitNeverType : undefinedWideningType, inConstContext)); - } - function createArrayLiteralType(type) { - if (!(getObjectFlags(type) & 4 /* Reference */)) { - return type; - } - let literalType = type.literalType; - if (!literalType) { - literalType = type.literalType = cloneTypeReference(type); - literalType.objectFlags |= 16384 /* ArrayLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */; - } - return literalType; - } - function isNumericName(name) { - switch (name.kind) { - case 167 /* ComputedPropertyName */: - return isNumericComputedName(name); - case 80 /* Identifier */: - return isNumericLiteralName(name.escapedText); - case 9 /* NumericLiteral */: - case 11 /* StringLiteral */: - return isNumericLiteralName(name.text); - default: - return false; - } - } - function isNumericComputedName(name) { - return isTypeAssignableToKind(checkComputedPropertyName(name), 296 /* NumberLike */); - } - function checkComputedPropertyName(node) { - const links = getNodeLinks(node.expression); - if (!links.resolvedType) { - if ((isTypeLiteralNode(node.parent.parent) || isClassLike(node.parent.parent) || isInterfaceDeclaration(node.parent.parent)) && isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 103 /* InKeyword */ && node.parent.kind !== 177 /* GetAccessor */ && node.parent.kind !== 178 /* SetAccessor */) { - return links.resolvedType = errorType; - } - links.resolvedType = checkExpression(node.expression); - if (isPropertyDeclaration(node.parent) && !hasStaticModifier(node.parent) && isClassExpression(node.parent.parent)) { - const container = getEnclosingBlockScopeContainer(node.parent.parent); - const enclosingIterationStatement = getEnclosingIterationStatement(container); - if (enclosingIterationStatement) { - getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */; - getNodeLinks(node).flags |= 32768 /* BlockScopedBindingInLoop */; - getNodeLinks(node.parent.parent).flags |= 32768 /* BlockScopedBindingInLoop */; - } - } - if (links.resolvedType.flags & 98304 /* Nullable */ || !isTypeAssignableToKind(links.resolvedType, 402653316 /* StringLike */ | 296 /* NumberLike */ | 12288 /* ESSymbolLike */) && !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) { - error2(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); - } - } - return links.resolvedType; - } - function isSymbolWithNumericName(symbol) { - var _a; - const firstDecl = (_a = symbol.declarations) == null ? void 0 : _a[0]; - return isNumericLiteralName(symbol.escapedName) || firstDecl && isNamedDeclaration(firstDecl) && isNumericName(firstDecl.name); - } - function isSymbolWithSymbolName(symbol) { - var _a; - const firstDecl = (_a = symbol.declarations) == null ? void 0 : _a[0]; - return isKnownSymbol(symbol) || firstDecl && isNamedDeclaration(firstDecl) && isComputedPropertyName(firstDecl.name) && isTypeAssignableToKind(checkComputedPropertyName(firstDecl.name), 4096 /* ESSymbol */); - } - function getObjectLiteralIndexInfo(node, offset, properties, keyType) { - const propTypes = []; - for (let i = offset; i < properties.length; i++) { - const prop = properties[i]; - if (keyType === stringType && !isSymbolWithSymbolName(prop) || keyType === numberType && isSymbolWithNumericName(prop) || keyType === esSymbolType && isSymbolWithSymbolName(prop)) { - propTypes.push(getTypeOfSymbol(properties[i])); - } - } - const unionType = propTypes.length ? getUnionType(propTypes, 2 /* Subtype */) : undefinedType; - return createIndexInfo(keyType, unionType, isConstContext(node)); - } - function getImmediateAliasedSymbol(symbol) { - Debug.assert((symbol.flags & 2097152 /* Alias */) !== 0, "Should only get Alias here."); - const links = getSymbolLinks(symbol); - if (!links.immediateTarget) { - const node = getDeclarationOfAliasSymbol(symbol); - if (!node) - return Debug.fail(); - links.immediateTarget = getTargetOfAliasDeclaration( - node, - /*dontRecursivelyResolve*/ - true - ); - } - return links.immediateTarget; - } - function checkObjectLiteral(node, checkMode = 0 /* Normal */) { - var _a; - const inDestructuringPattern = isAssignmentTarget(node); - checkGrammarObjectLiteralExpression(node, inDestructuringPattern); - const allPropertiesTable = strictNullChecks ? createSymbolTable() : void 0; - let propertiesTable = createSymbolTable(); - let propertiesArray = []; - let spread = emptyObjectType; - pushCachedContextualType(node); - const contextualType = getApparentTypeOfContextualType( - node, - /*contextFlags*/ - void 0 - ); - const contextualTypeHasPattern = contextualType && contextualType.pattern && (contextualType.pattern.kind === 206 /* ObjectBindingPattern */ || contextualType.pattern.kind === 210 /* ObjectLiteralExpression */); - const inConstContext = isConstContext(node); - const checkFlags = inConstContext ? 8 /* Readonly */ : 0; - const isInJavascript = isInJSFile(node) && !isInJsonFile(node); - const enumTag = isInJavascript ? getJSDocEnumTag(node) : void 0; - const isJSObjectLiteral = !contextualType && isInJavascript && !enumTag; - let objectFlags = freshObjectLiteralFlag; - let patternWithComputedProperties = false; - let hasComputedStringProperty = false; - let hasComputedNumberProperty = false; - let hasComputedSymbolProperty = false; - for (const elem of node.properties) { - if (elem.name && isComputedPropertyName(elem.name)) { - checkComputedPropertyName(elem.name); - } - } - let offset = 0; - for (const memberDecl of node.properties) { - let member = getSymbolOfDeclaration(memberDecl); - const computedNameType = memberDecl.name && memberDecl.name.kind === 167 /* ComputedPropertyName */ ? checkComputedPropertyName(memberDecl.name) : void 0; - if (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ || isObjectLiteralMethod(memberDecl)) { - let type = memberDecl.kind === 303 /* PropertyAssignment */ ? checkPropertyAssignment(memberDecl, checkMode) : ( - // avoid resolving the left side of the ShorthandPropertyAssignment outside of the destructuring - // for error recovery purposes. For example, if a user wrote `{ a = 100 }` instead of `{ a: 100 }`. - // we don't want to say "could not find 'a'". - memberDecl.kind === 304 /* ShorthandPropertyAssignment */ ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) : checkObjectLiteralMethod(memberDecl, checkMode) - ); - if (isInJavascript) { - const jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl); - if (jsDocType) { - checkTypeAssignableTo(type, jsDocType, memberDecl); - type = jsDocType; - } else if (enumTag && enumTag.typeExpression) { - checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl); - } - } - objectFlags |= getObjectFlags(type) & 458752 /* PropagatingFlags */; - const nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : void 0; - const prop = nameType ? createSymbol(4 /* Property */ | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096 /* Late */) : createSymbol(4 /* Property */ | member.flags, member.escapedName, checkFlags); - if (nameType) { - prop.links.nameType = nameType; - } - if (inDestructuringPattern) { - const isOptional = memberDecl.kind === 303 /* PropertyAssignment */ && hasDefaultValue(memberDecl.initializer) || memberDecl.kind === 304 /* ShorthandPropertyAssignment */ && memberDecl.objectAssignmentInitializer; - if (isOptional) { - prop.flags |= 16777216 /* Optional */; - } - } else if (contextualTypeHasPattern && !(getObjectFlags(contextualType) & 512 /* ObjectLiteralPatternWithComputedProperties */)) { - const impliedProp = getPropertyOfType(contextualType, member.escapedName); - if (impliedProp) { - prop.flags |= impliedProp.flags & 16777216 /* Optional */; - } else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, stringType)) { - error2( - memberDecl.name, - Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, - symbolToString(member), - typeToString(contextualType) - ); - } - } - prop.declarations = member.declarations; - prop.parent = member.parent; - if (member.valueDeclaration) { - prop.valueDeclaration = member.valueDeclaration; - } - prop.links.type = type; - prop.links.target = member; - member = prop; - allPropertiesTable == null ? void 0 : allPropertiesTable.set(prop.escapedName, prop); - if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && (memberDecl.kind === 303 /* PropertyAssignment */ || memberDecl.kind === 174 /* MethodDeclaration */) && isContextSensitive(memberDecl)) { - const inferenceContext = getInferenceContext(node); - Debug.assert(inferenceContext); - const inferenceNode = memberDecl.kind === 303 /* PropertyAssignment */ ? memberDecl.initializer : memberDecl; - addIntraExpressionInferenceSite(inferenceContext, inferenceNode, type); - } - } else if (memberDecl.kind === 305 /* SpreadAssignment */) { - if (languageVersion < 2 /* ES2015 */) { - checkExternalEmitHelpers(memberDecl, 2 /* Assign */); - } - if (propertiesArray.length > 0) { - spread = getSpreadType(spread, createObjectLiteralType(), node.symbol, objectFlags, inConstContext); - propertiesArray = []; - propertiesTable = createSymbolTable(); - hasComputedStringProperty = false; - hasComputedNumberProperty = false; - hasComputedSymbolProperty = false; - } - const type = getReducedType(checkExpression(memberDecl.expression, checkMode & 2 /* Inferential */)); - if (isValidSpreadType(type)) { - const mergedType = tryMergeUnionOfObjectTypeAndEmptyObject(type, inConstContext); - if (allPropertiesTable) { - checkSpreadPropOverrides(mergedType, allPropertiesTable, memberDecl); - } - offset = propertiesArray.length; - if (isErrorType(spread)) { - continue; - } - spread = getSpreadType(spread, mergedType, node.symbol, objectFlags, inConstContext); - } else { - error2(memberDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types); - spread = errorType; - } - continue; - } else { - Debug.assert(memberDecl.kind === 177 /* GetAccessor */ || memberDecl.kind === 178 /* SetAccessor */); - checkNodeDeferred(memberDecl); - } - if (computedNameType && !(computedNameType.flags & 8576 /* StringOrNumberLiteralOrUnique */)) { - if (isTypeAssignableTo(computedNameType, stringNumberSymbolType)) { - if (isTypeAssignableTo(computedNameType, numberType)) { - hasComputedNumberProperty = true; - } else if (isTypeAssignableTo(computedNameType, esSymbolType)) { - hasComputedSymbolProperty = true; - } else { - hasComputedStringProperty = true; - } - if (inDestructuringPattern) { - patternWithComputedProperties = true; - } - } - } else { - propertiesTable.set(member.escapedName, member); - } - propertiesArray.push(member); - } - popContextualType(); - if (contextualTypeHasPattern) { - const rootPatternParent = findAncestor( - contextualType.pattern.parent, - (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */ - ); - const spreadOrOutsideRootObject = findAncestor( - node, - (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */ - ); - if (spreadOrOutsideRootObject.kind !== 305 /* SpreadAssignment */) { - for (const prop of getPropertiesOfType(contextualType)) { - if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { - if (!(prop.flags & 16777216 /* Optional */)) { - error2( - prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), - Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value - ); - } - propertiesTable.set(prop.escapedName, prop); - propertiesArray.push(prop); - } - } - } - } - if (isErrorType(spread)) { - return errorType; - } - if (spread !== emptyObjectType) { - if (propertiesArray.length > 0) { - spread = getSpreadType(spread, createObjectLiteralType(), node.symbol, objectFlags, inConstContext); - propertiesArray = []; - propertiesTable = createSymbolTable(); - hasComputedStringProperty = false; - hasComputedNumberProperty = false; - } - return mapType(spread, (t) => t === emptyObjectType ? createObjectLiteralType() : t); - } - return createObjectLiteralType(); - function createObjectLiteralType() { - const indexInfos = []; - if (hasComputedStringProperty) - indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, stringType)); - if (hasComputedNumberProperty) - indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, numberType)); - if (hasComputedSymbolProperty) - indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, esSymbolType)); - const result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, indexInfos); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */; - if (isJSObjectLiteral) { - result.objectFlags |= 4096 /* JSLiteral */; - } - if (patternWithComputedProperties) { - result.objectFlags |= 512 /* ObjectLiteralPatternWithComputedProperties */; - } - if (inDestructuringPattern) { - result.pattern = node; - } - return result; - } - } - function isValidSpreadType(type) { - const t = removeDefinitelyFalsyTypes(mapType(type, getBaseConstraintOrType)); - return !!(t.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) || t.flags & 3145728 /* UnionOrIntersection */ && every(t.types, isValidSpreadType)); - } - function checkJsxSelfClosingElementDeferred(node) { - checkJsxOpeningLikeElementOrOpeningFragment(node); - } - function checkJsxSelfClosingElement(node, _checkMode) { - checkNodeDeferred(node); - return getJsxElementTypeAt(node) || anyType; - } - function checkJsxElementDeferred(node) { - checkJsxOpeningLikeElementOrOpeningFragment(node.openingElement); - if (isJsxIntrinsicTagName(node.closingElement.tagName)) { - getIntrinsicTagSymbol(node.closingElement); - } else { - checkExpression(node.closingElement.tagName); - } - checkJsxChildren(node); - } - function checkJsxElement(node, _checkMode) { - checkNodeDeferred(node); - return getJsxElementTypeAt(node) || anyType; - } - function checkJsxFragment(node) { - checkJsxOpeningLikeElementOrOpeningFragment(node.openingFragment); - const nodeSourceFile = getSourceFileOfNode(node); - if (getJSXTransformEnabled(compilerOptions) && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has("jsx")) && !compilerOptions.jsxFragmentFactory && !nodeSourceFile.pragmas.has("jsxfrag")) { - error2(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); - } - checkJsxChildren(node); - return getJsxElementTypeAt(node) || anyType; - } - function isHyphenatedJsxName(name) { - return stringContains(name, "-"); - } - function isJsxIntrinsicTagName(tagName) { - return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName); - } - function checkJsxAttribute(node, checkMode) { - return node.initializer ? checkExpressionForMutableLocation(node.initializer, checkMode) : trueType; - } - function createJsxAttributesTypeFromAttributesProperty(openingLikeElement, checkMode = 0 /* Normal */) { - const attributes = openingLikeElement.attributes; - const contextualType = getContextualType2(attributes, 0 /* None */); - const allAttributesTable = strictNullChecks ? createSymbolTable() : void 0; - let attributesTable = createSymbolTable(); - let spread = emptyJsxObjectType; - let hasSpreadAnyType = false; - let typeToIntersect; - let explicitlySpecifyChildrenAttribute = false; - let objectFlags = 2048 /* JsxAttributes */; - const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(openingLikeElement)); - for (const attributeDecl of attributes.properties) { - const member = attributeDecl.symbol; - if (isJsxAttribute(attributeDecl)) { - const exprType = checkJsxAttribute(attributeDecl, checkMode); - objectFlags |= getObjectFlags(exprType) & 458752 /* PropagatingFlags */; - const attributeSymbol = createSymbol(4 /* Property */ | member.flags, member.escapedName); - attributeSymbol.declarations = member.declarations; - attributeSymbol.parent = member.parent; - if (member.valueDeclaration) { - attributeSymbol.valueDeclaration = member.valueDeclaration; - } - attributeSymbol.links.type = exprType; - attributeSymbol.links.target = member; - attributesTable.set(attributeSymbol.escapedName, attributeSymbol); - allAttributesTable == null ? void 0 : allAttributesTable.set(attributeSymbol.escapedName, attributeSymbol); - if (getEscapedTextOfJsxAttributeName(attributeDecl.name) === jsxChildrenPropertyName) { - explicitlySpecifyChildrenAttribute = true; - } - if (contextualType) { - const prop = getPropertyOfType(contextualType, member.escapedName); - if (prop && prop.declarations && isDeprecatedSymbol(prop) && isIdentifier(attributeDecl.name)) { - addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText); - } - } - if (contextualType && checkMode & 2 /* Inferential */ && !(checkMode & 4 /* SkipContextSensitive */) && isContextSensitive(attributeDecl)) { - const inferenceContext = getInferenceContext(attributes); - Debug.assert(inferenceContext); - const inferenceNode = attributeDecl.initializer.expression; - addIntraExpressionInferenceSite(inferenceContext, inferenceNode, exprType); - } - } else { - Debug.assert(attributeDecl.kind === 293 /* JsxSpreadAttribute */); - if (attributesTable.size > 0) { - spread = getSpreadType( - spread, - createJsxAttributesType(), - attributes.symbol, - objectFlags, - /*readonly*/ - false - ); - attributesTable = createSymbolTable(); - } - const exprType = getReducedType(checkExpression(attributeDecl.expression, checkMode & 2 /* Inferential */)); - if (isTypeAny(exprType)) { - hasSpreadAnyType = true; - } - if (isValidSpreadType(exprType)) { - spread = getSpreadType( - spread, - exprType, - attributes.symbol, - objectFlags, - /*readonly*/ - false - ); - if (allAttributesTable) { - checkSpreadPropOverrides(exprType, allAttributesTable, attributeDecl); - } - } else { - error2(attributeDecl.expression, Diagnostics.Spread_types_may_only_be_created_from_object_types); - typeToIntersect = typeToIntersect ? getIntersectionType([typeToIntersect, exprType]) : exprType; - } - } - } - if (!hasSpreadAnyType) { - if (attributesTable.size > 0) { - spread = getSpreadType( - spread, - createJsxAttributesType(), - attributes.symbol, - objectFlags, - /*readonly*/ - false - ); - } - } - const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0; - if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { - const childrenTypes = checkJsxChildren(parent2, checkMode); - if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { - if (explicitlySpecifyChildrenAttribute) { - error2(attributes, Diagnostics._0_are_specified_twice_The_attribute_named_0_will_be_overwritten, unescapeLeadingUnderscores(jsxChildrenPropertyName)); - } - const contextualType2 = getApparentTypeOfContextualType( - openingLikeElement.attributes, - /*contextFlags*/ - void 0 - ); - const childrenContextualType = contextualType2 && getTypeOfPropertyOfContextualType(contextualType2, jsxChildrenPropertyName); - const childrenPropSymbol = createSymbol(4 /* Property */, jsxChildrenPropertyName); - childrenPropSymbol.links.type = childrenTypes.length === 1 ? childrenTypes[0] : childrenContextualType && someType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) : createArrayType(getUnionType(childrenTypes)); - childrenPropSymbol.valueDeclaration = factory.createPropertySignature( - /*modifiers*/ - void 0, - unescapeLeadingUnderscores(jsxChildrenPropertyName), - /*questionToken*/ - void 0, - /*type*/ - void 0 - ); - setParent(childrenPropSymbol.valueDeclaration, attributes); - childrenPropSymbol.valueDeclaration.symbol = childrenPropSymbol; - const childPropMap = createSymbolTable(); - childPropMap.set(jsxChildrenPropertyName, childrenPropSymbol); - spread = getSpreadType( - spread, - createAnonymousType(attributes.symbol, childPropMap, emptyArray, emptyArray, emptyArray), - attributes.symbol, - objectFlags, - /*readonly*/ - false - ); - } - } - if (hasSpreadAnyType) { - return anyType; - } - if (typeToIntersect && spread !== emptyJsxObjectType) { - return getIntersectionType([typeToIntersect, spread]); - } - return typeToIntersect || (spread === emptyJsxObjectType ? createJsxAttributesType() : spread); - function createJsxAttributesType() { - objectFlags |= freshObjectLiteralFlag; - const result = createAnonymousType(attributes.symbol, attributesTable, emptyArray, emptyArray, emptyArray); - result.objectFlags |= objectFlags | 128 /* ObjectLiteral */ | 131072 /* ContainsObjectOrArrayLiteral */; - return result; - } - } - function checkJsxChildren(node, checkMode) { - const childrenTypes = []; - for (const child of node.children) { - if (child.kind === 12 /* JsxText */) { - if (!child.containsOnlyTriviaWhiteSpaces) { - childrenTypes.push(stringType); - } - } else if (child.kind === 294 /* JsxExpression */ && !child.expression) { - continue; - } else { - childrenTypes.push(checkExpressionForMutableLocation(child, checkMode)); - } - } - return childrenTypes; - } - function checkSpreadPropOverrides(type, props, spread) { - for (const right of getPropertiesOfType(type)) { - if (!(right.flags & 16777216 /* Optional */)) { - const left = props.get(right.escapedName); - if (left) { - const diagnostic = error2(left.valueDeclaration, Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, unescapeLeadingUnderscores(left.escapedName)); - addRelatedInfo(diagnostic, createDiagnosticForNode(spread, Diagnostics.This_spread_always_overwrites_this_property)); - } - } - } - } - function checkJsxAttributes(node, checkMode) { - return createJsxAttributesTypeFromAttributesProperty(node.parent, checkMode); - } - function getJsxType(name, location) { - const namespace = getJsxNamespaceAt(location); - const exports = namespace && getExportsOfSymbol(namespace); - const typeSymbol = exports && getSymbol2(exports, name, 788968 /* Type */); - return typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType; - } - function getIntrinsicTagSymbol(node) { - const links = getNodeLinks(node); - if (!links.resolvedSymbol) { - const intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, node); - if (!isErrorType(intrinsicElementsType)) { - if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName)) - return Debug.fail(); - const intrinsicProp = getPropertyOfType(intrinsicElementsType, isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText); - if (intrinsicProp) { - links.jsxFlags |= 1 /* IntrinsicNamedElement */; - return links.resolvedSymbol = intrinsicProp; - } - const indexSignatureType = getIndexTypeOfType(intrinsicElementsType, stringType); - if (indexSignatureType) { - links.jsxFlags |= 2 /* IntrinsicIndexedElement */; - return links.resolvedSymbol = intrinsicElementsType.symbol; - } - error2(node, Diagnostics.Property_0_does_not_exist_on_type_1, intrinsicTagNameToString(node.tagName), "JSX." + JsxNames.IntrinsicElements); - return links.resolvedSymbol = unknownSymbol; - } else { - if (noImplicitAny) { - error2(node, Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists, unescapeLeadingUnderscores(JsxNames.IntrinsicElements)); - } - return links.resolvedSymbol = unknownSymbol; - } - } - return links.resolvedSymbol; - } - function getJsxNamespaceContainerForImplicitImport(location) { - const file = location && getSourceFileOfNode(location); - const links = file && getNodeLinks(file); - if (links && links.jsxImplicitImportContainer === false) { - return void 0; - } - if (links && links.jsxImplicitImportContainer) { - return links.jsxImplicitImportContainer; - } - const runtimeImportSpecifier = getJSXRuntimeImport(getJSXImplicitImportBase(compilerOptions, file), compilerOptions); - if (!runtimeImportSpecifier) { - return void 0; - } - const isClassic = getEmitModuleResolutionKind(compilerOptions) === 1 /* Classic */; - const errorMessage = isClassic ? Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_nodenext_or_to_add_aliases_to_the_paths_option : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations; - const mod = resolveExternalModule(location, runtimeImportSpecifier, errorMessage, location); - const result = mod && mod !== unknownSymbol ? getMergedSymbol(resolveSymbol(mod)) : void 0; - if (links) { - links.jsxImplicitImportContainer = result || false; - } - return result; - } - function getJsxNamespaceAt(location) { - const links = location && getNodeLinks(location); - if (links && links.jsxNamespace) { - return links.jsxNamespace; - } - if (!links || links.jsxNamespace !== false) { - let resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location); - if (!resolvedNamespace || resolvedNamespace === unknownSymbol) { - const namespaceName = getJsxNamespace(location); - resolvedNamespace = resolveName( - location, - namespaceName, - 1920 /* Namespace */, - /*nameNotFoundMessage*/ - void 0, - namespaceName, - /*isUse*/ - false - ); - } - if (resolvedNamespace) { - const candidate = resolveSymbol(getSymbol2(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */)); - if (candidate && candidate !== unknownSymbol) { - if (links) { - links.jsxNamespace = candidate; - } - return candidate; - } - } - if (links) { - links.jsxNamespace = false; - } - } - const s = resolveSymbol(getGlobalSymbol( - JsxNames.JSX, - 1920 /* Namespace */, - /*diagnostic*/ - void 0 - )); - if (s === unknownSymbol) { - return void 0; - } - return s; - } - function getNameFromJsxElementAttributesContainer(nameOfAttribPropContainer, jsxNamespace) { - const jsxElementAttribPropInterfaceSym = jsxNamespace && getSymbol2(jsxNamespace.exports, nameOfAttribPropContainer, 788968 /* Type */); - const jsxElementAttribPropInterfaceType = jsxElementAttribPropInterfaceSym && getDeclaredTypeOfSymbol(jsxElementAttribPropInterfaceSym); - const propertiesOfJsxElementAttribPropInterface = jsxElementAttribPropInterfaceType && getPropertiesOfType(jsxElementAttribPropInterfaceType); - if (propertiesOfJsxElementAttribPropInterface) { - if (propertiesOfJsxElementAttribPropInterface.length === 0) { - return ""; - } else if (propertiesOfJsxElementAttribPropInterface.length === 1) { - return propertiesOfJsxElementAttribPropInterface[0].escapedName; - } else if (propertiesOfJsxElementAttribPropInterface.length > 1 && jsxElementAttribPropInterfaceSym.declarations) { - error2(jsxElementAttribPropInterfaceSym.declarations[0], Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, unescapeLeadingUnderscores(nameOfAttribPropContainer)); - } - } - return void 0; - } - function getJsxLibraryManagedAttributes(jsxNamespace) { - return jsxNamespace && getSymbol2(jsxNamespace.exports, JsxNames.LibraryManagedAttributes, 788968 /* Type */); - } - function getJsxElementTypeSymbol(jsxNamespace) { - return jsxNamespace && getSymbol2(jsxNamespace.exports, JsxNames.ElementType, 788968 /* Type */); - } - function getJsxElementPropertiesName(jsxNamespace) { - return getNameFromJsxElementAttributesContainer(JsxNames.ElementAttributesPropertyNameContainer, jsxNamespace); - } - function getJsxElementChildrenPropertyName(jsxNamespace) { - return getNameFromJsxElementAttributesContainer(JsxNames.ElementChildrenAttributeNameContainer, jsxNamespace); - } - function getUninstantiatedJsxSignaturesOfType(elementType, caller) { - if (elementType.flags & 4 /* String */) { - return [anySignature]; - } else if (elementType.flags & 128 /* StringLiteral */) { - const intrinsicType = getIntrinsicAttributesTypeFromStringLiteralType(elementType, caller); - if (!intrinsicType) { - error2(caller, Diagnostics.Property_0_does_not_exist_on_type_1, elementType.value, "JSX." + JsxNames.IntrinsicElements); - return emptyArray; - } else { - const fakeSignature = createSignatureForJSXIntrinsic(caller, intrinsicType); - return [fakeSignature]; - } - } - const apparentElemType = getApparentType(elementType); - let signatures = getSignaturesOfType(apparentElemType, 1 /* Construct */); - if (signatures.length === 0) { - signatures = getSignaturesOfType(apparentElemType, 0 /* Call */); - } - if (signatures.length === 0 && apparentElemType.flags & 1048576 /* Union */) { - signatures = getUnionSignatures(map(apparentElemType.types, (t) => getUninstantiatedJsxSignaturesOfType(t, caller))); - } - return signatures; - } - function getIntrinsicAttributesTypeFromStringLiteralType(type, location) { - const intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, location); - if (!isErrorType(intrinsicElementsType)) { - const stringLiteralTypeName = type.value; - const intrinsicProp = getPropertyOfType(intrinsicElementsType, escapeLeadingUnderscores(stringLiteralTypeName)); - if (intrinsicProp) { - return getTypeOfSymbol(intrinsicProp); - } - const indexSignatureType = getIndexTypeOfType(intrinsicElementsType, stringType); - if (indexSignatureType) { - return indexSignatureType; - } - return void 0; - } - return anyType; - } - function checkJsxReturnAssignableToAppropriateBound(refKind, elemInstanceType, openingLikeElement) { - if (refKind === 1 /* Function */) { - const sfcReturnConstraint = getJsxStatelessElementTypeAt(openingLikeElement); - if (sfcReturnConstraint) { - checkTypeRelatedTo(elemInstanceType, sfcReturnConstraint, assignableRelation, openingLikeElement.tagName, Diagnostics.Its_return_type_0_is_not_a_valid_JSX_element, generateInitialErrorChain); - } - } else if (refKind === 0 /* Component */) { - const classConstraint = getJsxElementClassTypeAt(openingLikeElement); - if (classConstraint) { - checkTypeRelatedTo(elemInstanceType, classConstraint, assignableRelation, openingLikeElement.tagName, Diagnostics.Its_instance_type_0_is_not_a_valid_JSX_element, generateInitialErrorChain); - } - } else { - const sfcReturnConstraint = getJsxStatelessElementTypeAt(openingLikeElement); - const classConstraint = getJsxElementClassTypeAt(openingLikeElement); - if (!sfcReturnConstraint || !classConstraint) { - return; - } - const combined = getUnionType([sfcReturnConstraint, classConstraint]); - checkTypeRelatedTo(elemInstanceType, combined, assignableRelation, openingLikeElement.tagName, Diagnostics.Its_element_type_0_is_not_a_valid_JSX_element, generateInitialErrorChain); - } - function generateInitialErrorChain() { - const componentName = getTextOfNode(openingLikeElement.tagName); - return chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics._0_cannot_be_used_as_a_JSX_component, - componentName - ); - } - } - function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) { - Debug.assert(isJsxIntrinsicTagName(node.tagName)); - const links = getNodeLinks(node); - if (!links.resolvedJsxElementAttributesType) { - const symbol = getIntrinsicTagSymbol(node); - if (links.jsxFlags & 1 /* IntrinsicNamedElement */) { - return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol) || errorType; - } else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) { - return links.resolvedJsxElementAttributesType = getIndexTypeOfType(getJsxType(JsxNames.IntrinsicElements, node), stringType) || errorType; - } else { - return links.resolvedJsxElementAttributesType = errorType; - } - } - return links.resolvedJsxElementAttributesType; - } - function getJsxElementClassTypeAt(location) { - const type = getJsxType(JsxNames.ElementClass, location); - if (isErrorType(type)) - return void 0; - return type; - } - function getJsxElementTypeAt(location) { - return getJsxType(JsxNames.Element, location); - } - function getJsxStatelessElementTypeAt(location) { - const jsxElementType = getJsxElementTypeAt(location); - if (jsxElementType) { - return getUnionType([jsxElementType, nullType]); - } - } - function getJsxElementTypeTypeAt(location) { - const ns = getJsxNamespaceAt(location); - if (!ns) - return void 0; - const sym = getJsxElementTypeSymbol(ns); - if (!sym) - return void 0; - const type = instantiateAliasOrInterfaceWithDefaults(sym, isInJSFile(location)); - if (!type || isErrorType(type)) - return void 0; - return type; - } - function instantiateAliasOrInterfaceWithDefaults(managedSym, inJs, ...typeArguments) { - const declaredManagedType = getDeclaredTypeOfSymbol(managedSym); - if (managedSym.flags & 524288 /* TypeAlias */) { - const params = getSymbolLinks(managedSym).typeParameters; - if (length(params) >= typeArguments.length) { - const args = fillMissingTypeArguments(typeArguments, params, typeArguments.length, inJs); - return length(args) === 0 ? declaredManagedType : getTypeAliasInstantiation(managedSym, args); - } - } - if (length(declaredManagedType.typeParameters) >= typeArguments.length) { - const args = fillMissingTypeArguments(typeArguments, declaredManagedType.typeParameters, typeArguments.length, inJs); - return createTypeReference(declaredManagedType, args); - } - return void 0; - } - function getJsxIntrinsicTagNamesAt(location) { - const intrinsics = getJsxType(JsxNames.IntrinsicElements, location); - return intrinsics ? getPropertiesOfType(intrinsics) : emptyArray; - } - function checkJsxPreconditions(errorNode) { - if ((compilerOptions.jsx || 0 /* None */) === 0 /* None */) { - error2(errorNode, Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided); - } - if (getJsxElementTypeAt(errorNode) === void 0) { - if (noImplicitAny) { - error2(errorNode, Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist); - } - } - } - function checkJsxOpeningLikeElementOrOpeningFragment(node) { - const isNodeOpeningLikeElement = isJsxOpeningLikeElement(node); - if (isNodeOpeningLikeElement) { - checkGrammarJsxElement(node); - } - checkJsxPreconditions(node); - if (!getJsxNamespaceContainerForImplicitImport(node)) { - const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.Cannot_find_name_0 : void 0; - const jsxFactoryNamespace = getJsxNamespace(node); - const jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node; - let jsxFactorySym; - if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) { - jsxFactorySym = resolveName( - jsxFactoryLocation, - jsxFactoryNamespace, - 111551 /* Value */, - jsxFactoryRefErr, - jsxFactoryNamespace, - /*isUse*/ - true - ); - } - if (jsxFactorySym) { - jsxFactorySym.isReferenced = 67108863 /* All */; - if (canCollectSymbolAliasAccessabilityData && jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) { - markAliasSymbolAsReferenced(jsxFactorySym); - } - } - if (isJsxOpeningFragment(node)) { - const file = getSourceFileOfNode(node); - const localJsxNamespace = getLocalJsxNamespace(file); - if (localJsxNamespace) { - resolveName( - jsxFactoryLocation, - localJsxNamespace, - 111551 /* Value */, - jsxFactoryRefErr, - localJsxNamespace, - /*isUse*/ - true - ); - } - } - } - if (isNodeOpeningLikeElement) { - const jsxOpeningLikeNode = node; - const sig = getResolvedSignature(jsxOpeningLikeNode); - checkDeprecatedSignature(sig, node); - const elementTypeConstraint = getJsxElementTypeTypeAt(jsxOpeningLikeNode); - if (elementTypeConstraint !== void 0) { - const tagName = jsxOpeningLikeNode.tagName; - const tagType = isJsxIntrinsicTagName(tagName) ? getStringLiteralType(intrinsicTagNameToString(tagName)) : checkExpression(tagName); - checkTypeRelatedTo(tagType, elementTypeConstraint, assignableRelation, tagName, Diagnostics.Its_type_0_is_not_a_valid_JSX_element_type, () => { - const componentName = getTextOfNode(tagName); - return chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics._0_cannot_be_used_as_a_JSX_component, - componentName - ); - }); - } else { - checkJsxReturnAssignableToAppropriateBound(getJsxReferenceKind(jsxOpeningLikeNode), getReturnTypeOfSignature(sig), jsxOpeningLikeNode); - } - } - } - function isKnownProperty(targetType, name, isComparingJsxAttributes) { - if (targetType.flags & 524288 /* Object */) { - if (getPropertyOfObjectType(targetType, name) || getApplicableIndexInfoForName(targetType, name) || isLateBoundName(name) && getIndexInfoOfType(targetType, stringType) || isComparingJsxAttributes && isHyphenatedJsxName(name)) { - return true; - } - } else if (targetType.flags & 3145728 /* UnionOrIntersection */ && isExcessPropertyCheckTarget(targetType)) { - for (const t of targetType.types) { - if (isKnownProperty(t, name, isComparingJsxAttributes)) { - return true; - } - } - } - return false; - } - function isExcessPropertyCheckTarget(type) { - return !!(type.flags & 524288 /* Object */ && !(getObjectFlags(type) & 512 /* ObjectLiteralPatternWithComputedProperties */) || type.flags & 67108864 /* NonPrimitive */ || type.flags & 1048576 /* Union */ && some(type.types, isExcessPropertyCheckTarget) || type.flags & 2097152 /* Intersection */ && every(type.types, isExcessPropertyCheckTarget)); - } - function checkJsxExpression(node, checkMode) { - checkGrammarJsxExpression(node); - if (node.expression) { - const type = checkExpression(node.expression, checkMode); - if (node.dotDotDotToken && type !== anyType && !isArrayType(type)) { - error2(node, Diagnostics.JSX_spread_child_must_be_an_array_type); - } - return type; - } else { - return errorType; - } - } - function getDeclarationNodeFlagsFromSymbol(s) { - return s.valueDeclaration ? getCombinedNodeFlagsCached(s.valueDeclaration) : 0; - } - function isPrototypeProperty(symbol) { - if (symbol.flags & 8192 /* Method */ || getCheckFlags(symbol) & 4 /* SyntheticMethod */) { - return true; - } - if (isInJSFile(symbol.valueDeclaration)) { - const parent2 = symbol.valueDeclaration.parent; - return parent2 && isBinaryExpression(parent2) && getAssignmentDeclarationKind(parent2) === 3 /* PrototypeProperty */; - } - } - function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError = true) { - const errorNode = !reportError ? void 0 : node.kind === 166 /* QualifiedName */ ? node.right : node.kind === 205 /* ImportType */ ? node : node.kind === 208 /* BindingElement */ && node.propertyName ? node.propertyName : node.name; - return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); - } - function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { - const flags = getDeclarationModifierFlagsFromSymbol(prop, writing); - if (isSuper) { - if (languageVersion < 2 /* ES2015 */) { - if (symbolHasNonMethodDeclaration(prop)) { - if (errorNode) { - error2(errorNode, Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); - } - return false; - } - } - if (flags & 256 /* Abstract */) { - if (errorNode) { - error2( - errorNode, - Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, - symbolToString(prop), - typeToString(getDeclaringClass(prop)) - ); - } - return false; - } - } - if (flags & 256 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) { - const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); - if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) { - if (errorNode) { - error2( - errorNode, - Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, - symbolToString(prop), - getTextOfIdentifierOrLiteral(declaringClassDeclaration.name) - ); - } - return false; - } - } - if (!(flags & 24 /* NonPublicAccessibilityModifier */)) { - return true; - } - if (flags & 8 /* Private */) { - const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); - if (!isNodeWithinClass(location, declaringClassDeclaration)) { - if (errorNode) { - error2( - errorNode, - Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, - symbolToString(prop), - typeToString(getDeclaringClass(prop)) - ); - } - return false; - } - return true; - } - if (isSuper) { - return true; - } - let enclosingClass = forEachEnclosingClass(location, (enclosingDeclaration) => { - const enclosingClass2 = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(enclosingDeclaration)); - return isClassDerivedFromDeclaringClasses(enclosingClass2, prop, writing); - }); - if (!enclosingClass) { - enclosingClass = getEnclosingClassFromThisParameter(location); - enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing); - if (flags & 32 /* Static */ || !enclosingClass) { - if (errorNode) { - error2( - errorNode, - Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, - symbolToString(prop), - typeToString(getDeclaringClass(prop) || containingType) - ); - } - return false; - } - } - if (flags & 32 /* Static */) { - return true; - } - if (containingType.flags & 262144 /* TypeParameter */) { - containingType = containingType.isThisType ? getConstraintOfTypeParameter(containingType) : getBaseConstraintOfType(containingType); - } - if (!containingType || !hasBaseType(containingType, enclosingClass)) { - if (errorNode) { - error2( - errorNode, - Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, - symbolToString(prop), - typeToString(enclosingClass), - typeToString(containingType) - ); - } - return false; - } - return true; - } - function getEnclosingClassFromThisParameter(node) { - const thisParameter = getThisParameterFromNodeContext(node); - let thisType = (thisParameter == null ? void 0 : thisParameter.type) && getTypeFromTypeNode(thisParameter.type); - if (thisType && thisType.flags & 262144 /* TypeParameter */) { - thisType = getConstraintOfTypeParameter(thisType); - } - if (thisType && getObjectFlags(thisType) & (3 /* ClassOrInterface */ | 4 /* Reference */)) { - return getTargetType(thisType); - } - return void 0; - } - function getThisParameterFromNodeContext(node) { - const thisContainer = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - return thisContainer && isFunctionLike(thisContainer) ? getThisParameter(thisContainer) : void 0; - } - function symbolHasNonMethodDeclaration(symbol) { - return !!forEachProperty2(symbol, (prop) => !(prop.flags & 8192 /* Method */)); - } - function checkNonNullExpression(node) { - return checkNonNullType(checkExpression(node), node); - } - function isNullableType(type) { - return !!(getTypeFacts(type) & 50331648 /* IsUndefinedOrNull */); - } - function getNonNullableTypeIfNeeded(type) { - return isNullableType(type) ? getNonNullableType(type) : type; - } - function reportObjectPossiblyNullOrUndefinedError(node, facts) { - const nodeText2 = isEntityNameExpression(node) ? entityNameToString(node) : void 0; - if (node.kind === 106 /* NullKeyword */) { - error2(node, Diagnostics.The_value_0_cannot_be_used_here, "null"); - return; - } - if (nodeText2 !== void 0 && nodeText2.length < 100) { - if (isIdentifier(node) && nodeText2 === "undefined") { - error2(node, Diagnostics.The_value_0_cannot_be_used_here, "undefined"); - return; - } - error2( - node, - facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics._0_is_possibly_null_or_undefined : Diagnostics._0_is_possibly_undefined : Diagnostics._0_is_possibly_null, - nodeText2 - ); - } else { - error2( - node, - facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Object_is_possibly_null_or_undefined : Diagnostics.Object_is_possibly_undefined : Diagnostics.Object_is_possibly_null - ); - } - } - function reportCannotInvokePossiblyNullOrUndefinedError(node, facts) { - error2( - node, - facts & 16777216 /* IsUndefined */ ? facts & 33554432 /* IsNull */ ? Diagnostics.Cannot_invoke_an_object_which_is_possibly_null_or_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_undefined : Diagnostics.Cannot_invoke_an_object_which_is_possibly_null - ); - } - function checkNonNullTypeWithReporter(type, node, reportError) { - if (strictNullChecks && type.flags & 2 /* Unknown */) { - if (isEntityNameExpression(node)) { - const nodeText2 = entityNameToString(node); - if (nodeText2.length < 100) { - error2(node, Diagnostics._0_is_of_type_unknown, nodeText2); - return errorType; - } - } - error2(node, Diagnostics.Object_is_of_type_unknown); - return errorType; - } - const facts = getTypeFacts(type); - if (facts & 50331648 /* IsUndefinedOrNull */) { - reportError(node, facts); - const t = getNonNullableType(type); - return t.flags & (98304 /* Nullable */ | 131072 /* Never */) ? errorType : t; - } - return type; - } - function checkNonNullType(type, node) { - return checkNonNullTypeWithReporter(type, node, reportObjectPossiblyNullOrUndefinedError); - } - function checkNonNullNonVoidType(type, node) { - const nonNullType = checkNonNullType(type, node); - if (nonNullType.flags & 16384 /* Void */) { - if (isEntityNameExpression(node)) { - const nodeText2 = entityNameToString(node); - if (isIdentifier(node) && nodeText2 === "undefined") { - error2(node, Diagnostics.The_value_0_cannot_be_used_here, nodeText2); - return nonNullType; - } - if (nodeText2.length < 100) { - error2(node, Diagnostics._0_is_possibly_undefined, nodeText2); - return nonNullType; - } - } - error2(node, Diagnostics.Object_is_possibly_undefined); - } - return nonNullType; - } - function checkPropertyAccessExpression(node, checkMode, writeOnly) { - return node.flags & 64 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly); - } - function checkPropertyAccessChain(node, checkMode) { - const leftType = checkExpression(node.expression); - const nonOptionalType = getOptionalExpressionType(leftType, node.expression); - return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name, checkMode), node, nonOptionalType !== leftType); - } - function checkQualifiedName(node, checkMode) { - const leftType = isPartOfTypeQuery(node) && isThisIdentifier(node.left) ? checkNonNullType(checkThisExpression(node.left), node.left) : checkNonNullExpression(node.left); - return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode); - } - function isMethodAccessForCall(node) { - while (node.parent.kind === 217 /* ParenthesizedExpression */) { - node = node.parent; - } - return isCallOrNewExpression(node.parent) && node.parent.expression === node; - } - function lookupSymbolForPrivateIdentifierDeclaration(propName, location) { - for (let containingClass = getContainingClassExcludingClassDecorators(location); !!containingClass; containingClass = getContainingClass(containingClass)) { - const { symbol } = containingClass; - const name = getSymbolNameForPrivateIdentifier(symbol, propName); - const prop = symbol.members && symbol.members.get(name) || symbol.exports && symbol.exports.get(name); - if (prop) { - return prop; - } - } - } - function checkGrammarPrivateIdentifierExpression(privId) { - if (!getContainingClass(privId)) { - return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); - } - if (!isForInStatement(privId.parent)) { - if (!isExpressionNode(privId)) { - return grammarErrorOnNode(privId, Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression); - } - const isInOperation = isBinaryExpression(privId.parent) && privId.parent.operatorToken.kind === 103 /* InKeyword */; - if (!getSymbolForPrivateIdentifierExpression(privId) && !isInOperation) { - return grammarErrorOnNode(privId, Diagnostics.Cannot_find_name_0, idText(privId)); - } - } - return false; - } - function checkPrivateIdentifierExpression(privId) { - checkGrammarPrivateIdentifierExpression(privId); - const symbol = getSymbolForPrivateIdentifierExpression(privId); - if (symbol) { - markPropertyAsReferenced( - symbol, - /*nodeForCheckWriteOnly*/ - void 0, - /*isSelfTypeAccess*/ - false - ); - } - return anyType; - } - function getSymbolForPrivateIdentifierExpression(privId) { - if (!isExpressionNode(privId)) { - return void 0; - } - const links = getNodeLinks(privId); - if (links.resolvedSymbol === void 0) { - links.resolvedSymbol = lookupSymbolForPrivateIdentifierDeclaration(privId.escapedText, privId); - } - return links.resolvedSymbol; - } - function getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedIdentifier) { - return getPropertyOfType(leftType, lexicallyScopedIdentifier.escapedName); - } - function checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedIdentifier) { - let propertyOnType; - const properties = getPropertiesOfType(leftType); - if (properties) { - forEach(properties, (symbol) => { - const decl = symbol.valueDeclaration; - if (decl && isNamedDeclaration(decl) && isPrivateIdentifier(decl.name) && decl.name.escapedText === right.escapedText) { - propertyOnType = symbol; - return true; - } - }); - } - const diagName = diagnosticName(right); - if (propertyOnType) { - const typeValueDecl = Debug.checkDefined(propertyOnType.valueDeclaration); - const typeClass = Debug.checkDefined(getContainingClass(typeValueDecl)); - if (lexicallyScopedIdentifier == null ? void 0 : lexicallyScopedIdentifier.valueDeclaration) { - const lexicalValueDecl = lexicallyScopedIdentifier.valueDeclaration; - const lexicalClass = getContainingClass(lexicalValueDecl); - Debug.assert(!!lexicalClass); - if (findAncestor(lexicalClass, (n) => typeClass === n)) { - const diagnostic = error2( - right, - Diagnostics.The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling, - diagName, - typeToString(leftType) - ); - addRelatedInfo( - diagnostic, - createDiagnosticForNode( - lexicalValueDecl, - Diagnostics.The_shadowing_declaration_of_0_is_defined_here, - diagName - ), - createDiagnosticForNode( - typeValueDecl, - Diagnostics.The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here, - diagName - ) - ); - return true; - } - } - error2( - right, - Diagnostics.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier, - diagName, - diagnosticName(typeClass.name || anon) - ); - return true; - } - return false; - } - function isThisPropertyAccessInConstructor(node, prop) { - return (isConstructorDeclaredProperty(prop) || isThisProperty(node) && isAutoTypedProperty(prop)) && getThisContainer( - node, - /*includeArrowFunctions*/ - true, - /*includeClassComputedPropertyName*/ - false - ) === getDeclaringConstructor(prop); - } - function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode, writeOnly) { - const parentSymbol = getNodeLinks(left).resolvedSymbol; - const assignmentKind = getAssignmentTargetKind(node); - const apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType); - const isAnyLike = isTypeAny(apparentType) || apparentType === silentNeverType; - let prop; - if (isPrivateIdentifier(right)) { - if (languageVersion < 99 /* ESNext */) { - if (assignmentKind !== 0 /* None */) { - checkExternalEmitHelpers(node, 1048576 /* ClassPrivateFieldSet */); - } - if (assignmentKind !== 1 /* Definite */) { - checkExternalEmitHelpers(node, 524288 /* ClassPrivateFieldGet */); - } - } - const lexicallyScopedSymbol = lookupSymbolForPrivateIdentifierDeclaration(right.escapedText, right); - if (assignmentKind && lexicallyScopedSymbol && lexicallyScopedSymbol.valueDeclaration && isMethodDeclaration(lexicallyScopedSymbol.valueDeclaration)) { - grammarErrorOnNode(right, Diagnostics.Cannot_assign_to_private_method_0_Private_methods_are_not_writable, idText(right)); - } - if (isAnyLike) { - if (lexicallyScopedSymbol) { - return isErrorType(apparentType) ? errorType : apparentType; - } - if (getContainingClassExcludingClassDecorators(right) === void 0) { - grammarErrorOnNode(right, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); - return anyType; - } - } - prop = lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedSymbol); - if (prop === void 0) { - if (checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) { - return errorType; - } - const containingClass = getContainingClassExcludingClassDecorators(right); - if (containingClass && isPlainJsFile(getSourceFileOfNode(containingClass), compilerOptions.checkJs)) { - grammarErrorOnNode(right, Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class, idText(right)); - } - } else { - const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); - if (isSetonlyAccessor && assignmentKind !== 1 /* Definite */) { - error2(node, Diagnostics.Private_accessor_was_defined_without_a_getter); - } - } - } else { - if (isAnyLike) { - if (isIdentifier(left) && parentSymbol) { - markAliasReferenced(parentSymbol, node); - } - return isErrorType(apparentType) ? errorType : apparentType; - } - prop = getPropertyOfType( - apparentType, - right.escapedText, - /*skipObjectFunctionPropertyAugment*/ - false, - /*includeTypeOnlyMembers*/ - node.kind === 166 /* QualifiedName */ - ); - } - if (isIdentifier(left) && parentSymbol && (getIsolatedModules(compilerOptions) || !(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 /* EnumMember */ && node.parent.kind === 306 /* EnumMember */)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { - markAliasReferenced(parentSymbol, node); - } - let propType; - if (!prop) { - const indexInfo = !isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ? getApplicableIndexInfoForName(apparentType, right.escapedText) : void 0; - if (!(indexInfo && indexInfo.type)) { - const isUncheckedJS = isUncheckedJSSuggestion( - node, - leftType.symbol, - /*excludeClasses*/ - true - ); - if (!isUncheckedJS && isJSLiteralType(leftType)) { - return anyType; - } - if (leftType.symbol === globalThisSymbol) { - if (globalThisSymbol.exports.has(right.escapedText) && globalThisSymbol.exports.get(right.escapedText).flags & 418 /* BlockScoped */) { - error2(right, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(right.escapedText), typeToString(leftType)); - } else if (noImplicitAny) { - error2(right, Diagnostics.Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature, typeToString(leftType)); - } - return anyType; - } - if (right.escapedText && !checkAndReportErrorForExtendingInterface(node)) { - reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS); - } - return errorType; - } - if (indexInfo.isReadonly && (isAssignmentTarget(node) || isDeleteTarget(node))) { - error2(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType)); - } - propType = compilerOptions.noUncheckedIndexedAccess && !isAssignmentTarget(node) ? getUnionType([indexInfo.type, missingType]) : indexInfo.type; - if (compilerOptions.noPropertyAccessFromIndexSignature && isPropertyAccessExpression(node)) { - error2(right, Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0, unescapeLeadingUnderscores(right.escapedText)); - } - if (indexInfo.declaration && isDeprecatedDeclaration2(indexInfo.declaration)) { - addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText); - } - } else { - const targetPropSymbol = resolveAliasWithDeprecationCheck(prop, right); - if (isDeprecatedSymbol(targetPropSymbol) && isUncalledFunctionReference(node, targetPropSymbol) && targetPropSymbol.declarations) { - addDeprecatedSuggestion(right, targetPropSymbol.declarations, right.escapedText); - } - checkPropertyNotUsedBeforeDeclaration(prop, node, right); - markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol)); - getNodeLinks(node).resolvedSymbol = prop; - checkPropertyAccessibility(node, left.kind === 108 /* SuperKeyword */, isWriteAccess(node), apparentType, prop); - if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) { - error2(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right)); - return errorType; - } - propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); - } - return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode); - } - function isUncheckedJSSuggestion(node, suggestion, excludeClasses) { - const file = getSourceFileOfNode(node); - if (file) { - if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) { - const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode); - return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */); - } - } - return false; - } - function getFlowTypeOfAccessExpression(node, prop, propType, errorNode, checkMode) { - const assignmentKind = getAssignmentTargetKind(node); - if (assignmentKind === 1 /* Definite */) { - return removeMissingType(propType, !!(prop && prop.flags & 16777216 /* Optional */)); - } - if (prop && !(prop.flags & (3 /* Variable */ | 4 /* Property */ | 98304 /* Accessor */)) && !(prop.flags & 8192 /* Method */ && propType.flags & 1048576 /* Union */) && !isDuplicatedCommonJSExport(prop.declarations)) { - return propType; - } - if (propType === autoType) { - return getFlowTypeOfProperty(node, prop); - } - propType = getNarrowableTypeForReference(propType, node, checkMode); - let assumeUninitialized = false; - if (strictNullChecks && strictPropertyInitialization && isAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */) { - const declaration = prop && prop.valueDeclaration; - if (declaration && isPropertyWithoutInitializer(declaration)) { - if (!isStatic(declaration)) { - const flowContainer = getControlFlowContainer(node); - if (flowContainer.kind === 176 /* Constructor */ && flowContainer.parent === declaration.parent && !(declaration.flags & 33554432 /* Ambient */)) { - assumeUninitialized = true; - } - } - } - } else if (strictNullChecks && prop && prop.valueDeclaration && isPropertyAccessExpression(prop.valueDeclaration) && getAssignmentDeclarationPropertyAccessKind(prop.valueDeclaration) && getControlFlowContainer(node) === getControlFlowContainer(prop.valueDeclaration)) { - assumeUninitialized = true; - } - const flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType); - if (assumeUninitialized && !containsUndefinedType(propType) && containsUndefinedType(flowType)) { - error2(errorNode, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(prop)); - return propType; - } - return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; - } - function checkPropertyNotUsedBeforeDeclaration(prop, node, right) { - const { valueDeclaration } = prop; - if (!valueDeclaration || getSourceFileOfNode(node).isDeclarationFile) { - return; - } - let diagnosticMessage; - const declarationName = idText(right); - if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { - diagnosticMessage = error2(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); - } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { - diagnosticMessage = error2(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); - } - if (diagnosticMessage) { - addRelatedInfo( - diagnosticMessage, - createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName) - ); - } - } - function isInPropertyInitializerOrClassStaticBlock(node) { - return !!findAncestor(node, (node2) => { - switch (node2.kind) { - case 172 /* PropertyDeclaration */: - return true; - case 303 /* PropertyAssignment */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 305 /* SpreadAssignment */: - case 167 /* ComputedPropertyName */: - case 239 /* TemplateSpan */: - case 294 /* JsxExpression */: - case 291 /* JsxAttribute */: - case 292 /* JsxAttributes */: - case 293 /* JsxSpreadAttribute */: - case 286 /* JsxOpeningElement */: - case 233 /* ExpressionWithTypeArguments */: - case 298 /* HeritageClause */: - return false; - case 219 /* ArrowFunction */: - case 244 /* ExpressionStatement */: - return isBlock(node2.parent) && isClassStaticBlockDeclaration(node2.parent.parent) ? true : "quit"; - default: - return isExpressionNode(node2) ? false : "quit"; - } - }); - } - function isPropertyDeclaredInAncestorClass(prop) { - if (!(prop.parent.flags & 32 /* Class */)) { - return false; - } - let classType = getTypeOfSymbol(prop.parent); - while (true) { - classType = classType.symbol && getSuperClass(classType); - if (!classType) { - return false; - } - const superProperty = getPropertyOfType(classType, prop.escapedName); - if (superProperty && superProperty.valueDeclaration) { - return true; - } - } - } - function getSuperClass(classType) { - const x = getBaseTypes(classType); - if (x.length === 0) { - return void 0; - } - return getIntersectionType(x); - } - function reportNonexistentProperty(propNode, containingType, isUncheckedJS) { - let errorInfo; - let relatedInfo; - if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) { - for (const subtype of containingType.types) { - if (!getPropertyOfType(subtype, propNode.escapedText) && !getApplicableIndexInfoForName(subtype, propNode.escapedText)) { - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype)); - break; - } - } - } - if (typeHasStaticProperty(propNode.escapedText, containingType)) { - const propName = declarationNameToString(propNode); - const typeName = typeToString(containingType); - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "." + propName); - } else { - const promisedType = getPromisedTypeOfPromise(containingType); - if (promisedType && getPropertyOfType(promisedType, propNode.escapedText)) { - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(containingType)); - relatedInfo = createDiagnosticForNode(propNode, Diagnostics.Did_you_forget_to_use_await); - } else { - const missingProperty = declarationNameToString(propNode); - const container = typeToString(containingType); - const libSuggestion = getSuggestedLibForNonExistentProperty(missingProperty, containingType); - if (libSuggestion !== void 0) { - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.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, missingProperty, container, libSuggestion); - } else { - const suggestion = getSuggestedSymbolForNonexistentProperty(propNode, containingType); - if (suggestion !== void 0) { - const suggestedName = symbolName(suggestion); - const message = isUncheckedJS ? Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2 : Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2; - errorInfo = chainDiagnosticMessages(errorInfo, message, missingProperty, container, suggestedName); - relatedInfo = suggestion.valueDeclaration && createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestedName); - } else { - const diagnostic = containerSeemsToBeEmptyDomElement(containingType) ? Diagnostics.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom : Diagnostics.Property_0_does_not_exist_on_type_1; - errorInfo = chainDiagnosticMessages(elaborateNeverIntersection(errorInfo, containingType), diagnostic, missingProperty, container); - } - } - } - } - const resultDiagnostic = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(propNode), propNode, errorInfo); - if (relatedInfo) { - addRelatedInfo(resultDiagnostic, relatedInfo); - } - addErrorOrSuggestion(!isUncheckedJS || errorInfo.code !== Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, resultDiagnostic); - } - function containerSeemsToBeEmptyDomElement(containingType) { - return compilerOptions.lib && !compilerOptions.lib.includes("dom") && everyContainedType(containingType, (type) => type.symbol && /^(EventTarget|Node|((HTML[a-zA-Z]*)?Element))$/.test(unescapeLeadingUnderscores(type.symbol.escapedName))) && isEmptyObjectType(containingType); - } - function typeHasStaticProperty(propName, containingType) { - const prop = containingType.symbol && getPropertyOfType(getTypeOfSymbol(containingType.symbol), propName); - return prop !== void 0 && !!prop.valueDeclaration && isStatic(prop.valueDeclaration); - } - function getSuggestedLibForNonExistentName(name) { - const missingName = diagnosticName(name); - const allFeatures = getScriptTargetFeatures(); - const typeFeatures = allFeatures.get(missingName); - return typeFeatures && firstIterator(typeFeatures.keys()); - } - function getSuggestedLibForNonExistentProperty(missingProperty, containingType) { - const container = getApparentType(containingType).symbol; - if (!container) { - return void 0; - } - const containingTypeName = symbolName(container); - const allFeatures = getScriptTargetFeatures(); - const typeFeatures = allFeatures.get(containingTypeName); - if (typeFeatures) { - for (const [libTarget, featuresOfType] of typeFeatures) { - if (contains(featuresOfType, missingProperty)) { - return libTarget; - } - } - } - } - function getSuggestedSymbolForNonexistentClassMember(name, baseType) { - return getSpellingSuggestionForName(name, getPropertiesOfType(baseType), 106500 /* ClassMember */); - } - function getSuggestedSymbolForNonexistentProperty(name, containingType) { - let props = getPropertiesOfType(containingType); - if (typeof name !== "string") { - const parent2 = name.parent; - if (isPropertyAccessExpression(parent2)) { - props = filter(props, (prop) => isValidPropertyAccessForCompletions(parent2, containingType, prop)); - } - name = idText(name); - } - return getSpellingSuggestionForName(name, props, 111551 /* Value */); - } - function getSuggestedSymbolForNonexistentJSXAttribute(name, containingType) { - const strName = isString(name) ? name : idText(name); - const properties = getPropertiesOfType(containingType); - const jsxSpecific = strName === "for" ? find(properties, (x) => symbolName(x) === "htmlFor") : strName === "class" ? find(properties, (x) => symbolName(x) === "className") : void 0; - return jsxSpecific ?? getSpellingSuggestionForName(strName, properties, 111551 /* Value */); - } - function getSuggestionForNonexistentProperty(name, containingType) { - const suggestion = getSuggestedSymbolForNonexistentProperty(name, containingType); - return suggestion && symbolName(suggestion); - } - function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) { - Debug.assert(outerName !== void 0, "outername should always be defined"); - const result = resolveNameHelper( - location, - outerName, - meaning, - /*nameNotFoundMessage*/ - void 0, - outerName, - /*isUse*/ - false, - /*excludeGlobals*/ - false, - /*getSpellingSuggestions*/ - true, - (symbols, name, meaning2) => { - Debug.assertEqual(outerName, name, "name should equal outerName"); - const symbol = getSymbol2(symbols, name, meaning2); - if (symbol) - return symbol; - let candidates; - if (symbols === globals) { - const primitives = mapDefined( - ["string", "number", "boolean", "object", "bigint", "symbol"], - (s) => symbols.has(s.charAt(0).toUpperCase() + s.slice(1)) ? createSymbol(524288 /* TypeAlias */, s) : void 0 - ); - candidates = primitives.concat(arrayFrom(symbols.values())); - } else { - candidates = arrayFrom(symbols.values()); - } - return getSpellingSuggestionForName(unescapeLeadingUnderscores(name), candidates, meaning2); - } - ); - return result; - } - function getSuggestionForNonexistentSymbol(location, outerName, meaning) { - const symbolResult = getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning); - return symbolResult && symbolName(symbolResult); - } - function getSuggestedSymbolForNonexistentModule(name, targetModule) { - return targetModule.exports && getSpellingSuggestionForName(idText(name), getExportsOfModuleAsArray(targetModule), 2623475 /* ModuleMember */); - } - function getSuggestionForNonexistentExport(name, targetModule) { - const suggestion = getSuggestedSymbolForNonexistentModule(name, targetModule); - return suggestion && symbolName(suggestion); - } - function getSuggestionForNonexistentIndexSignature(objectType, expr, keyedType) { - function hasProp(name) { - const prop = getPropertyOfObjectType(objectType, name); - if (prop) { - const s = getSingleCallSignature(getTypeOfSymbol(prop)); - return !!s && getMinArgumentCount(s) >= 1 && isTypeAssignableTo(keyedType, getTypeAtPosition(s, 0)); - } - return false; - } - const suggestedMethod = isAssignmentTarget(expr) ? "set" : "get"; - if (!hasProp(suggestedMethod)) { - return void 0; - } - let suggestion = tryGetPropertyAccessOrIdentifierToString(expr.expression); - if (suggestion === void 0) { - suggestion = suggestedMethod; - } else { - suggestion += "." + suggestedMethod; - } - return suggestion; - } - function getSuggestedTypeForNonexistentStringLiteralType(source, target) { - const candidates = target.types.filter((type) => !!(type.flags & 128 /* StringLiteral */)); - return getSpellingSuggestion(source.value, candidates, (type) => type.value); - } - function getSpellingSuggestionForName(name, symbols, meaning) { - return getSpellingSuggestion(name, symbols, getCandidateName); - function getCandidateName(candidate) { - const candidateName = symbolName(candidate); - if (startsWith(candidateName, '"')) { - return void 0; - } - if (candidate.flags & meaning) { - return candidateName; - } - if (candidate.flags & 2097152 /* Alias */) { - const alias = tryResolveAlias(candidate); - if (alias && alias.flags & meaning) { - return candidateName; - } - } - return void 0; - } - } - function markPropertyAsReferenced(prop, nodeForCheckWriteOnly, isSelfTypeAccess2) { - const valueDeclaration = prop && prop.flags & 106500 /* ClassMember */ && prop.valueDeclaration; - if (!valueDeclaration) { - return; - } - const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 8 /* Private */); - const hasPrivateIdentifier = prop.valueDeclaration && isNamedDeclaration(prop.valueDeclaration) && isPrivateIdentifier(prop.valueDeclaration.name); - if (!hasPrivateModifier && !hasPrivateIdentifier) { - return; - } - if (nodeForCheckWriteOnly && isWriteOnlyAccess(nodeForCheckWriteOnly) && !(prop.flags & 65536 /* SetAccessor */)) { - return; - } - if (isSelfTypeAccess2) { - const containingMethod = findAncestor(nodeForCheckWriteOnly, isFunctionLikeDeclaration); - if (containingMethod && containingMethod.symbol === prop) { - return; - } - } - (getCheckFlags(prop) & 1 /* Instantiated */ ? getSymbolLinks(prop).target : prop).isReferenced = 67108863 /* All */; - } - function isSelfTypeAccess(name, parent2) { - return name.kind === 110 /* ThisKeyword */ || !!parent2 && isEntityNameExpression(name) && parent2 === getResolvedSymbol(getFirstIdentifier(name)); - } - function isValidPropertyAccess(node, propertyName) { - switch (node.kind) { - case 211 /* PropertyAccessExpression */: - return isValidPropertyAccessWithType(node, node.expression.kind === 108 /* SuperKeyword */, propertyName, getWidenedType(checkExpression(node.expression))); - case 166 /* QualifiedName */: - return isValidPropertyAccessWithType( - node, - /*isSuper*/ - false, - propertyName, - getWidenedType(checkExpression(node.left)) - ); - case 205 /* ImportType */: - return isValidPropertyAccessWithType( - node, - /*isSuper*/ - false, - propertyName, - getTypeFromTypeNode(node) - ); - } - } - function isValidPropertyAccessForCompletions(node, type, property) { - return isPropertyAccessible( - node, - node.kind === 211 /* PropertyAccessExpression */ && node.expression.kind === 108 /* SuperKeyword */, - /*isWrite*/ - false, - type, - property - ); - } - function isValidPropertyAccessWithType(node, isSuper, propertyName, type) { - if (isTypeAny(type)) { - return true; - } - const prop = getPropertyOfType(type, propertyName); - return !!prop && isPropertyAccessible( - node, - isSuper, - /*isWrite*/ - false, - type, - prop - ); - } - function isPropertyAccessible(node, isSuper, isWrite, containingType, property) { - if (isTypeAny(containingType)) { - return true; - } - if (property.valueDeclaration && isPrivateIdentifierClassElementDeclaration(property.valueDeclaration)) { - const declClass = getContainingClass(property.valueDeclaration); - return !isOptionalChain(node) && !!findAncestor(node, (parent2) => parent2 === declClass); - } - return checkPropertyAccessibilityAtLocation(node, isSuper, isWrite, containingType, property); - } - function getForInVariableSymbol(node) { - const initializer = node.initializer; - if (initializer.kind === 261 /* VariableDeclarationList */) { - const variable = initializer.declarations[0]; - if (variable && !isBindingPattern(variable.name)) { - return getSymbolOfDeclaration(variable); - } - } else if (initializer.kind === 80 /* Identifier */) { - return getResolvedSymbol(initializer); - } - return void 0; - } - function hasNumericPropertyNames(type) { - return getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, numberType); - } - function isForInVariableForNumericPropertyNames(expr) { - const e = skipParentheses(expr); - if (e.kind === 80 /* Identifier */) { - const symbol = getResolvedSymbol(e); - if (symbol.flags & 3 /* Variable */) { - let child = expr; - let node = expr.parent; - while (node) { - if (node.kind === 249 /* ForInStatement */ && child === node.statement && getForInVariableSymbol(node) === symbol && hasNumericPropertyNames(getTypeOfExpression(node.expression))) { - return true; - } - child = node; - node = node.parent; - } - } - } - return false; - } - function checkIndexedAccess(node, checkMode) { - return node.flags & 64 /* OptionalChain */ ? checkElementAccessChain(node, checkMode) : checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode); - } - function checkElementAccessChain(node, checkMode) { - const exprType = checkExpression(node.expression); - const nonOptionalType = getOptionalExpressionType(exprType, node.expression); - return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression), checkMode), node, nonOptionalType !== exprType); - } - function checkElementAccessExpression(node, exprType, checkMode) { - const objectType = getAssignmentTargetKind(node) !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType; - const indexExpression = node.argumentExpression; - const indexType = checkExpression(indexExpression); - if (isErrorType(objectType) || objectType === silentNeverType) { - return objectType; - } - if (isConstEnumObjectType(objectType) && !isStringLiteralLike(indexExpression)) { - error2(indexExpression, Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); - return errorType; - } - const effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType; - const accessFlags = isAssignmentTarget(node) ? 4 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) : 32 /* ExpressionPosition */; - const indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, accessFlags, node) || errorType; - return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node); - } - function callLikeExpressionMayHaveTypeArguments(node) { - return isCallOrNewExpression(node) || isTaggedTemplateExpression(node) || isJsxOpeningLikeElement(node); - } - function resolveUntypedCall(node) { - if (callLikeExpressionMayHaveTypeArguments(node)) { - forEach(node.typeArguments, checkSourceElement); - } - if (node.kind === 215 /* TaggedTemplateExpression */) { - checkExpression(node.template); - } else if (isJsxOpeningLikeElement(node)) { - checkExpression(node.attributes); - } else if (node.kind !== 170 /* Decorator */) { - forEach(node.arguments, (argument) => { - checkExpression(argument); - }); - } - return anySignature; - } - function resolveErrorCall(node) { - resolveUntypedCall(node); - return unknownSignature; - } - function reorderCandidates(signatures, result, callChainFlags) { - let lastParent; - let lastSymbol; - let cutoffIndex = 0; - let index; - let specializedIndex = -1; - let spliceIndex; - Debug.assert(!result.length); - for (const signature of signatures) { - const symbol = signature.declaration && getSymbolOfDeclaration(signature.declaration); - const parent2 = signature.declaration && signature.declaration.parent; - if (!lastSymbol || symbol === lastSymbol) { - if (lastParent && parent2 === lastParent) { - index = index + 1; - } else { - lastParent = parent2; - index = cutoffIndex; - } - } else { - index = cutoffIndex = result.length; - lastParent = parent2; - } - lastSymbol = symbol; - if (signatureHasLiteralTypes(signature)) { - specializedIndex++; - spliceIndex = specializedIndex; - cutoffIndex++; - } else { - spliceIndex = index; - } - result.splice(spliceIndex, 0, callChainFlags ? getOptionalCallSignature(signature, callChainFlags) : signature); - } - } - function isSpreadArgument(arg) { - return !!arg && (arg.kind === 230 /* SpreadElement */ || arg.kind === 237 /* SyntheticExpression */ && arg.isSpread); - } - function getSpreadArgumentIndex(args) { - return findIndex(args, isSpreadArgument); - } - function acceptsVoid(t) { - return !!(t.flags & 16384 /* Void */); - } - function acceptsVoidUndefinedUnknownOrAny(t) { - return !!(t.flags & (16384 /* Void */ | 32768 /* Undefined */ | 2 /* Unknown */ | 1 /* Any */)); - } - function hasCorrectArity(node, args, signature, signatureHelpTrailingComma = false) { - let argCount; - let callIsIncomplete = false; - let effectiveParameterCount = getParameterCount(signature); - let effectiveMinimumArguments = getMinArgumentCount(signature); - if (node.kind === 215 /* TaggedTemplateExpression */) { - argCount = args.length; - if (node.template.kind === 228 /* TemplateExpression */) { - const lastSpan = last(node.template.templateSpans); - callIsIncomplete = nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; - } else { - const templateLiteral = node.template; - Debug.assert(templateLiteral.kind === 15 /* NoSubstitutionTemplateLiteral */); - callIsIncomplete = !!templateLiteral.isUnterminated; - } - } else if (node.kind === 170 /* Decorator */) { - argCount = getDecoratorArgumentCount(node, signature); - } else if (isJsxOpeningLikeElement(node)) { - callIsIncomplete = node.attributes.end === node.end; - if (callIsIncomplete) { - return true; - } - argCount = effectiveMinimumArguments === 0 ? args.length : 1; - effectiveParameterCount = args.length === 0 ? effectiveParameterCount : 1; - effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1); - } else if (!node.arguments) { - Debug.assert(node.kind === 214 /* NewExpression */); - return getMinArgumentCount(signature) === 0; - } else { - argCount = signatureHelpTrailingComma ? args.length + 1 : args.length; - callIsIncomplete = node.arguments.end === node.end; - const spreadArgIndex = getSpreadArgumentIndex(args); - if (spreadArgIndex >= 0) { - return spreadArgIndex >= getMinArgumentCount(signature) && (hasEffectiveRestParameter(signature) || spreadArgIndex < getParameterCount(signature)); - } - } - if (!hasEffectiveRestParameter(signature) && argCount > effectiveParameterCount) { - return false; - } - if (callIsIncomplete || argCount >= effectiveMinimumArguments) { - return true; - } - for (let i = argCount; i < effectiveMinimumArguments; i++) { - const type = getTypeAtPosition(signature, i); - if (filterType(type, isInJSFile(node) && !strictNullChecks ? acceptsVoidUndefinedUnknownOrAny : acceptsVoid).flags & 131072 /* Never */) { - return false; - } - } - return true; - } - function hasCorrectTypeArgumentArity(signature, typeArguments) { - const numTypeParameters = length(signature.typeParameters); - const minTypeArgumentCount = getMinTypeArgumentCount(signature.typeParameters); - return !some(typeArguments) || typeArguments.length >= minTypeArgumentCount && typeArguments.length <= numTypeParameters; - } - function getSingleCallSignature(type) { - return getSingleSignature( - type, - 0 /* Call */, - /*allowMembers*/ - false - ); - } - function getSingleCallOrConstructSignature(type) { - return getSingleSignature( - type, - 0 /* Call */, - /*allowMembers*/ - false - ) || getSingleSignature( - type, - 1 /* Construct */, - /*allowMembers*/ - false - ); - } - function getSingleSignature(type, kind, allowMembers) { - if (type.flags & 524288 /* Object */) { - const resolved = resolveStructuredTypeMembers(type); - if (allowMembers || resolved.properties.length === 0 && resolved.indexInfos.length === 0) { - if (kind === 0 /* Call */ && resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0) { - return resolved.callSignatures[0]; - } - if (kind === 1 /* Construct */ && resolved.constructSignatures.length === 1 && resolved.callSignatures.length === 0) { - return resolved.constructSignatures[0]; - } - } - } - return void 0; - } - function instantiateSignatureInContextOf(signature, contextualSignature, inferenceContext, compareTypes) { - const context = createInferenceContext(signature.typeParameters, signature, 0 /* None */, compareTypes); - const restType = getEffectiveRestType(contextualSignature); - const mapper = inferenceContext && (restType && restType.flags & 262144 /* TypeParameter */ ? inferenceContext.nonFixingMapper : inferenceContext.mapper); - const sourceSignature = mapper ? instantiateSignature(contextualSignature, mapper) : contextualSignature; - applyToParameterTypes(sourceSignature, signature, (source, target) => { - inferTypes(context.inferences, source, target); - }); - if (!inferenceContext) { - applyToReturnTypes(contextualSignature, signature, (source, target) => { - inferTypes(context.inferences, source, target, 128 /* ReturnType */); - }); - } - return getSignatureInstantiation(signature, getInferredTypes(context), isInJSFile(contextualSignature.declaration)); - } - function inferJsxTypeArguments(node, signature, checkMode, context) { - const paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); - const checkAttrType = checkExpressionWithContextualType(node.attributes, paramType, context, checkMode); - inferTypes(context.inferences, checkAttrType, paramType); - return getInferredTypes(context); - } - function getThisArgumentType(thisArgumentNode) { - if (!thisArgumentNode) { - return voidType; - } - const thisArgumentType = checkExpression(thisArgumentNode); - return isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType; - } - function inferTypeArguments(node, signature, args, checkMode, context) { - if (isJsxOpeningLikeElement(node)) { - return inferJsxTypeArguments(node, signature, checkMode, context); - } - if (node.kind !== 170 /* Decorator */) { - const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); - const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); - if (contextualType) { - const inferenceTargetType = getReturnTypeOfSignature(signature); - if (couldContainTypeVariables(inferenceTargetType)) { - const outerContext = getInferenceContext(node); - const isFromBindingPattern = !skipBindingPatterns && getContextualType2(node, 8 /* SkipBindingPatterns */) !== contextualType; - if (!isFromBindingPattern) { - const outerMapper = getMapperFromContext(cloneInferenceContext(outerContext, 1 /* NoDefault */)); - const instantiatedType = instantiateType(contextualType, outerMapper); - const contextualSignature = getSingleCallSignature(instantiatedType); - const inferenceSourceType = contextualSignature && contextualSignature.typeParameters ? getOrCreateTypeFromSignature(getSignatureInstantiationWithoutFillingInTypeArguments(contextualSignature, contextualSignature.typeParameters)) : instantiatedType; - inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 128 /* ReturnType */); - } - const returnContext = createInferenceContext(signature.typeParameters, signature, context.flags); - const returnSourceType = instantiateType(contextualType, outerContext && outerContext.returnMapper); - inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType); - context.returnMapper = some(returnContext.inferences, hasInferenceCandidates) ? getMapperFromContext(cloneInferredPartOfContext(returnContext)) : void 0; - } - } - } - const restType = getNonArrayRestType(signature); - const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; - if (restType && restType.flags & 262144 /* TypeParameter */) { - const info = find(context.inferences, (info2) => info2.typeParameter === restType); - if (info) { - info.impliedArity = findIndex(args, isSpreadArgument, argCount) < 0 ? args.length - argCount : void 0; - } - } - const thisType = getThisTypeOfSignature(signature); - if (thisType && couldContainTypeVariables(thisType)) { - const thisArgumentNode = getThisArgumentOfCall(node); - inferTypes(context.inferences, getThisArgumentType(thisArgumentNode), thisType); - } - for (let i = 0; i < argCount; i++) { - const arg = args[i]; - if (arg.kind !== 232 /* OmittedExpression */) { - const paramType = getTypeAtPosition(signature, i); - if (couldContainTypeVariables(paramType)) { - const argType = checkExpressionWithContextualType(arg, paramType, context, checkMode); - inferTypes(context.inferences, argType, paramType); - } - } - } - if (restType && couldContainTypeVariables(restType)) { - const spreadType = getSpreadArgumentType(args, argCount, args.length, restType, context, checkMode); - inferTypes(context.inferences, spreadType, restType); - } - return getInferredTypes(context); - } - function getMutableArrayOrTupleType(type) { - return type.flags & 1048576 /* Union */ ? mapType(type, getMutableArrayOrTupleType) : type.flags & 1 /* Any */ || isMutableArrayOrTuple(getBaseConstraintOfType(type) || type) ? type : isTupleType(type) ? createTupleType( - getElementTypes(type), - type.target.elementFlags, - /*readonly*/ - false, - type.target.labeledElementDeclarations - ) : createTupleType([type], [8 /* Variadic */]); - } - function getSpreadArgumentType(args, index, argCount, restType, context, checkMode) { - const inConstContext = isConstTypeVariable(restType); - if (index >= argCount - 1) { - const arg = args[argCount - 1]; - if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpressionWithContextualType(arg.expression, restType, context, checkMode); - if (isArrayLikeType(spreadType)) { - return getMutableArrayOrTupleType(spreadType); - } - return createArrayType(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg), inConstContext); - } - } - const types = []; - const flags = []; - const names = []; - for (let i = index; i < argCount; i++) { - const arg = args[i]; - if (isSpreadArgument(arg)) { - const spreadType = arg.kind === 237 /* SyntheticExpression */ ? arg.type : checkExpression(arg.expression); - if (isArrayLikeType(spreadType)) { - types.push(spreadType); - flags.push(8 /* Variadic */); - } else { - types.push(checkIteratedTypeOrElementType(33 /* Spread */, spreadType, undefinedType, arg.kind === 230 /* SpreadElement */ ? arg.expression : arg)); - flags.push(4 /* Rest */); - } - } else { - const contextualType = isTupleType(restType) ? getContextualTypeForElementExpression(restType, i - index, argCount - index) || unknownType : getIndexedAccessType(restType, getNumberLiteralType(i - index), 256 /* Contextual */); - const argType = checkExpressionWithContextualType(arg, contextualType, context, checkMode); - const hasPrimitiveContextualType = inConstContext || maybeTypeOfKind(contextualType, 402784252 /* Primitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */); - types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); - flags.push(1 /* Required */); - } - if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) { - names.push(arg.tupleNameSource); - } - } - return createTupleType(types, flags, inConstContext, length(names) === length(types) ? names : void 0); - } - function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) { - const isJavascript = isInJSFile(signature.declaration); - const typeParameters = signature.typeParameters; - const typeArgumentTypes = fillMissingTypeArguments(map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isJavascript); - let mapper; - for (let i = 0; i < typeArgumentNodes.length; i++) { - Debug.assert(typeParameters[i] !== void 0, "Should not call checkTypeArguments with too many type arguments"); - const constraint = getConstraintOfTypeParameter(typeParameters[i]); - if (constraint) { - const errorInfo = reportErrors2 && headMessage ? () => chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Type_0_does_not_satisfy_the_constraint_1 - ) : void 0; - const typeArgumentHeadMessage = headMessage || Diagnostics.Type_0_does_not_satisfy_the_constraint_1; - if (!mapper) { - mapper = createTypeMapper(typeParameters, typeArgumentTypes); - } - const typeArgument = typeArgumentTypes[i]; - if (!checkTypeAssignableTo( - typeArgument, - getTypeWithThisArgument(instantiateType(constraint, mapper), typeArgument), - reportErrors2 ? typeArgumentNodes[i] : void 0, - typeArgumentHeadMessage, - errorInfo - )) { - return void 0; - } - } - } - return typeArgumentTypes; - } - function getJsxReferenceKind(node) { - if (isJsxIntrinsicTagName(node.tagName)) { - return 2 /* Mixed */; - } - const tagType = getApparentType(checkExpression(node.tagName)); - if (length(getSignaturesOfType(tagType, 1 /* Construct */))) { - return 0 /* Component */; - } - if (length(getSignaturesOfType(tagType, 0 /* Call */))) { - return 1 /* Function */; - } - return 2 /* Mixed */; - } - function checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors2, containingMessageChain, errorOutputContainer) { - const paramType = getEffectiveFirstArgumentForJsxSignature(signature, node); - const attributesType = checkExpressionWithContextualType( - node.attributes, - paramType, - /*inferenceContext*/ - void 0, - checkMode - ); - const checkAttributesType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(attributesType) : attributesType; - return checkTagNameDoesNotExpectTooManyArguments() && checkTypeRelatedToAndOptionallyElaborate( - checkAttributesType, - paramType, - relation, - reportErrors2 ? node.tagName : void 0, - node.attributes, - /*headMessage*/ - void 0, - containingMessageChain, - errorOutputContainer - ); - function checkTagNameDoesNotExpectTooManyArguments() { - var _a; - if (getJsxNamespaceContainerForImplicitImport(node)) { - return true; - } - const tagType = (isJsxOpeningElement(node) || isJsxSelfClosingElement(node)) && !(isJsxIntrinsicTagName(node.tagName) || isJsxNamespacedName(node.tagName)) ? checkExpression(node.tagName) : void 0; - if (!tagType) { - return true; - } - const tagCallSignatures = getSignaturesOfType(tagType, 0 /* Call */); - if (!length(tagCallSignatures)) { - return true; - } - const factory2 = getJsxFactoryEntity(node); - if (!factory2) { - return true; - } - const factorySymbol = resolveEntityName( - factory2, - 111551 /* Value */, - /*ignoreErrors*/ - true, - /*dontResolveAlias*/ - false, - node - ); - if (!factorySymbol) { - return true; - } - const factoryType = getTypeOfSymbol(factorySymbol); - const callSignatures = getSignaturesOfType(factoryType, 0 /* Call */); - if (!length(callSignatures)) { - return true; - } - let hasFirstParamSignatures = false; - let maxParamCount = 0; - for (const sig of callSignatures) { - const firstparam = getTypeAtPosition(sig, 0); - const signaturesOfParam = getSignaturesOfType(firstparam, 0 /* Call */); - if (!length(signaturesOfParam)) - continue; - for (const paramSig of signaturesOfParam) { - hasFirstParamSignatures = true; - if (hasEffectiveRestParameter(paramSig)) { - return true; - } - const paramCount = getParameterCount(paramSig); - if (paramCount > maxParamCount) { - maxParamCount = paramCount; - } - } - } - if (!hasFirstParamSignatures) { - return true; - } - let absoluteMinArgCount = Infinity; - for (const tagSig of tagCallSignatures) { - const tagRequiredArgCount = getMinArgumentCount(tagSig); - if (tagRequiredArgCount < absoluteMinArgCount) { - absoluteMinArgCount = tagRequiredArgCount; - } - } - if (absoluteMinArgCount <= maxParamCount) { - return true; - } - if (reportErrors2) { - const diag2 = createDiagnosticForNode(node.tagName, Diagnostics.Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3, entityNameToString(node.tagName), absoluteMinArgCount, entityNameToString(factory2), maxParamCount); - const tagNameDeclaration = (_a = getSymbolAtLocation(node.tagName)) == null ? void 0 : _a.valueDeclaration; - if (tagNameDeclaration) { - addRelatedInfo(diag2, createDiagnosticForNode(tagNameDeclaration, Diagnostics._0_is_declared_here, entityNameToString(node.tagName))); - } - if (errorOutputContainer && errorOutputContainer.skipLogging) { - (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); - } - if (!errorOutputContainer.skipLogging) { - diagnostics.add(diag2); - } - } - return false; - } - } - function getSignatureApplicabilityError(node, args, signature, relation, checkMode, reportErrors2, containingMessageChain) { - const errorOutputContainer = { errors: void 0, skipLogging: true }; - if (isJsxOpeningLikeElement(node)) { - if (!checkApplicableSignatureForJsxOpeningLikeElement(node, signature, relation, checkMode, reportErrors2, containingMessageChain, errorOutputContainer)) { - Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, "jsx should have errors when reporting errors"); - return errorOutputContainer.errors || emptyArray; - } - return void 0; - } - const thisType = getThisTypeOfSignature(signature); - if (thisType && thisType !== voidType && !(isNewExpression(node) || isCallExpression(node) && isSuperProperty(node.expression))) { - const thisArgumentNode = getThisArgumentOfCall(node); - const thisArgumentType = getThisArgumentType(thisArgumentNode); - const errorNode = reportErrors2 ? thisArgumentNode || node : void 0; - const headMessage2 = Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1; - if (!checkTypeRelatedTo(thisArgumentType, thisType, relation, errorNode, headMessage2, containingMessageChain, errorOutputContainer)) { - Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, "this parameter should have errors when reporting errors"); - return errorOutputContainer.errors || emptyArray; - } - } - const headMessage = Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1; - const restType = getNonArrayRestType(signature); - const argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length; - for (let i = 0; i < argCount; i++) { - const arg = args[i]; - if (arg.kind !== 232 /* OmittedExpression */) { - const paramType = getTypeAtPosition(signature, i); - const argType = checkExpressionWithContextualType( - arg, - paramType, - /*inferenceContext*/ - void 0, - checkMode - ); - const checkArgType = checkMode & 4 /* SkipContextSensitive */ ? getRegularTypeOfObjectLiteral(argType) : argType; - if (!checkTypeRelatedToAndOptionallyElaborate(checkArgType, paramType, relation, reportErrors2 ? arg : void 0, arg, headMessage, containingMessageChain, errorOutputContainer)) { - Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, "parameter should have errors when reporting errors"); - maybeAddMissingAwaitInfo(arg, checkArgType, paramType); - return errorOutputContainer.errors || emptyArray; - } - } - } - if (restType) { - const spreadType = getSpreadArgumentType( - args, - argCount, - args.length, - restType, - /*context*/ - void 0, - checkMode - ); - const restArgCount = args.length - argCount; - const errorNode = !reportErrors2 ? void 0 : restArgCount === 0 ? node : restArgCount === 1 ? args[argCount] : setTextRangePosEnd(createSyntheticExpression(node, spreadType), args[argCount].pos, args[args.length - 1].end); - if (!checkTypeRelatedTo( - spreadType, - restType, - relation, - errorNode, - headMessage, - /*containingMessageChain*/ - void 0, - errorOutputContainer - )) { - Debug.assert(!reportErrors2 || !!errorOutputContainer.errors, "rest parameter should have errors when reporting errors"); - maybeAddMissingAwaitInfo(errorNode, spreadType, restType); - return errorOutputContainer.errors || emptyArray; - } - } - return void 0; - function maybeAddMissingAwaitInfo(errorNode, source, target) { - if (errorNode && reportErrors2 && errorOutputContainer.errors && errorOutputContainer.errors.length) { - if (getAwaitedTypeOfPromise(target)) { - return; - } - const awaitedTypeOfSource = getAwaitedTypeOfPromise(source); - if (awaitedTypeOfSource && isTypeRelatedTo(awaitedTypeOfSource, target, relation)) { - addRelatedInfo(errorOutputContainer.errors[0], createDiagnosticForNode(errorNode, Diagnostics.Did_you_forget_to_use_await)); - } - } - } - } - function getThisArgumentOfCall(node) { - const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0; - if (expression) { - const callee = skipOuterExpressions(expression); - if (isAccessExpression(callee)) { - return callee.expression; - } - } - } - function createSyntheticExpression(parent2, type, isSpread, tupleNameSource) { - const result = parseNodeFactory.createSyntheticExpression(type, isSpread, tupleNameSource); - setTextRange(result, parent2); - setParent(result, parent2); - return result; - } - function getEffectiveCallArguments(node) { - if (node.kind === 215 /* TaggedTemplateExpression */) { - const template = node.template; - const args2 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())]; - if (template.kind === 228 /* TemplateExpression */) { - forEach(template.templateSpans, (span) => { - args2.push(span.expression); - }); - } - return args2; - } - if (node.kind === 170 /* Decorator */) { - return getEffectiveDecoratorArguments(node); - } - if (isJsxOpeningLikeElement(node)) { - return node.attributes.properties.length > 0 || isJsxOpeningElement(node) && node.parent.children.length > 0 ? [node.attributes] : emptyArray; - } - const args = node.arguments || emptyArray; - const spreadIndex = getSpreadArgumentIndex(args); - if (spreadIndex >= 0) { - const effectiveArgs = args.slice(0, spreadIndex); - for (let i = spreadIndex; i < args.length; i++) { - const arg = args[i]; - const spreadType = arg.kind === 230 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression)); - if (spreadType && isTupleType(spreadType)) { - forEach(getElementTypes(spreadType), (t, i2) => { - var _a; - const flags = spreadType.target.elementFlags[i2]; - const syntheticArg = createSyntheticExpression( - arg, - flags & 4 /* Rest */ ? createArrayType(t) : t, - !!(flags & 12 /* Variable */), - (_a = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a[i2] - ); - effectiveArgs.push(syntheticArg); - }); - } else { - effectiveArgs.push(arg); - } - } - return effectiveArgs; - } - return args; - } - function getEffectiveDecoratorArguments(node) { - const expr = node.expression; - const signature = getDecoratorCallSignature(node); - if (signature) { - const args = []; - for (const param of signature.parameters) { - const type = getTypeOfSymbol(param); - args.push(createSyntheticExpression(expr, type)); - } - return args; - } - return Debug.fail(); - } - function getDecoratorArgumentCount(node, signature) { - return compilerOptions.experimentalDecorators ? getLegacyDecoratorArgumentCount(node, signature) : 2; - } - function getLegacyDecoratorArgumentCount(node, signature) { - switch (node.parent.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - return 1; - case 172 /* PropertyDeclaration */: - return hasAccessorModifier(node.parent) ? 3 : 2; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return languageVersion === 0 /* ES3 */ || signature.parameters.length <= 2 ? 2 : 3; - case 169 /* Parameter */: - return 3; - default: - return Debug.fail(); - } - } - function getDiagnosticSpanForCallNode(node, doNotIncludeArguments) { - let start; - let length2; - const sourceFile = getSourceFileOfNode(node); - if (isPropertyAccessExpression(node.expression)) { - const nameSpan = getErrorSpanForNode(sourceFile, node.expression.name); - start = nameSpan.start; - length2 = doNotIncludeArguments ? nameSpan.length : node.end - start; - } else { - const expressionSpan = getErrorSpanForNode(sourceFile, node.expression); - start = expressionSpan.start; - length2 = doNotIncludeArguments ? expressionSpan.length : node.end - start; - } - return { start, length: length2, sourceFile }; - } - function getDiagnosticForCallNode(node, message, ...args) { - if (isCallExpression(node)) { - const { sourceFile, start, length: length2 } = getDiagnosticSpanForCallNode(node); - if ("message" in message) { - return createFileDiagnostic(sourceFile, start, length2, message, ...args); - } - return createDiagnosticForFileFromMessageChain(sourceFile, message); - } else { - if ("message" in message) { - return createDiagnosticForNode(node, message, ...args); - } - return createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(node), node, message); - } - } - function isPromiseResolveArityError(node) { - if (!isCallExpression(node) || !isIdentifier(node.expression)) - return false; - const symbol = resolveName( - node.expression, - node.expression.escapedText, - 111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - ); - const decl = symbol == null ? void 0 : symbol.valueDeclaration; - if (!decl || !isParameter(decl) || !isFunctionExpressionOrArrowFunction(decl.parent) || !isNewExpression(decl.parent.parent) || !isIdentifier(decl.parent.parent.expression)) { - return false; - } - const globalPromiseSymbol = getGlobalPromiseConstructorSymbol( - /*reportErrors*/ - false - ); - if (!globalPromiseSymbol) - return false; - const constructorSymbol = getSymbolAtLocation( - decl.parent.parent.expression, - /*ignoreErrors*/ - true - ); - return constructorSymbol === globalPromiseSymbol; - } - function getArgumentArityError(node, signatures, args, headMessage) { - var _a; - const spreadIndex = getSpreadArgumentIndex(args); - if (spreadIndex > -1) { - return createDiagnosticForNode(args[spreadIndex], Diagnostics.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter); - } - let min2 = Number.POSITIVE_INFINITY; - let max = Number.NEGATIVE_INFINITY; - let maxBelow = Number.NEGATIVE_INFINITY; - let minAbove = Number.POSITIVE_INFINITY; - let closestSignature; - for (const sig of signatures) { - const minParameter = getMinArgumentCount(sig); - const maxParameter = getParameterCount(sig); - if (minParameter < min2) { - min2 = minParameter; - closestSignature = sig; - } - max = Math.max(max, maxParameter); - if (minParameter < args.length && minParameter > maxBelow) - maxBelow = minParameter; - if (args.length < maxParameter && maxParameter < minAbove) - minAbove = maxParameter; - } - const hasRestParameter2 = some(signatures, hasEffectiveRestParameter); - const parameterRange = hasRestParameter2 ? min2 : min2 < max ? min2 + "-" + max : min2; - const isVoidPromiseError = !hasRestParameter2 && parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node); - if (isVoidPromiseError && isInJSFile(node)) { - return getDiagnosticForCallNode(node, Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments); - } - const error3 = isDecorator(node) ? hasRestParameter2 ? Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_at_least_0 : Diagnostics.The_runtime_will_invoke_the_decorator_with_1_arguments_but_the_decorator_expects_0 : hasRestParameter2 ? Diagnostics.Expected_at_least_0_arguments_but_got_1 : isVoidPromiseError ? Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : Diagnostics.Expected_0_arguments_but_got_1; - if (min2 < args.length && args.length < max) { - if (headMessage) { - let chain = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, - args.length, - maxBelow, - minAbove - ); - chain = chainDiagnosticMessages(chain, headMessage); - return getDiagnosticForCallNode(node, chain); - } - return getDiagnosticForCallNode(node, Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, args.length, maxBelow, minAbove); - } else if (args.length < min2) { - let diagnostic; - if (headMessage) { - let chain = chainDiagnosticMessages( - /*details*/ - void 0, - error3, - parameterRange, - args.length - ); - chain = chainDiagnosticMessages(chain, headMessage); - diagnostic = getDiagnosticForCallNode(node, chain); - } else { - diagnostic = getDiagnosticForCallNode(node, error3, parameterRange, args.length); - } - const parameter = (_a = closestSignature == null ? void 0 : closestSignature.declaration) == null ? void 0 : _a.parameters[closestSignature.thisParameter ? args.length + 1 : args.length]; - if (parameter) { - const messageAndArgs = isBindingPattern(parameter.name) ? [Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided] : isRestParameter(parameter) ? [Diagnostics.Arguments_for_the_rest_parameter_0_were_not_provided, idText(getFirstIdentifier(parameter.name))] : [Diagnostics.An_argument_for_0_was_not_provided, !parameter.name ? args.length : idText(getFirstIdentifier(parameter.name))]; - const parameterError = createDiagnosticForNode(parameter, ...messageAndArgs); - return addRelatedInfo(diagnostic, parameterError); - } - return diagnostic; - } else { - const errorSpan = factory.createNodeArray(args.slice(max)); - const pos = first(errorSpan).pos; - let end = last(errorSpan).end; - if (end === pos) { - end++; - } - setTextRangePosEnd(errorSpan, pos, end); - if (headMessage) { - let chain = chainDiagnosticMessages( - /*details*/ - void 0, - error3, - parameterRange, - args.length - ); - chain = chainDiagnosticMessages(chain, headMessage); - return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), errorSpan, chain); - } - return createDiagnosticForNodeArray(getSourceFileOfNode(node), errorSpan, error3, parameterRange, args.length); - } - } - function getTypeArgumentArityError(node, signatures, typeArguments, headMessage) { - const argCount = typeArguments.length; - if (signatures.length === 1) { - const sig = signatures[0]; - const min2 = getMinTypeArgumentCount(sig.typeParameters); - const max = length(sig.typeParameters); - if (headMessage) { - let chain = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Expected_0_type_arguments_but_got_1, - min2 < max ? min2 + "-" + max : min2, - argCount - ); - chain = chainDiagnosticMessages(chain, headMessage); - return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), typeArguments, chain); - } - return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, min2 < max ? min2 + "-" + max : min2, argCount); - } - let belowArgCount = -Infinity; - let aboveArgCount = Infinity; - for (const sig of signatures) { - const min2 = getMinTypeArgumentCount(sig.typeParameters); - const max = length(sig.typeParameters); - if (min2 > argCount) { - aboveArgCount = Math.min(aboveArgCount, min2); - } else if (max < argCount) { - belowArgCount = Math.max(belowArgCount, max); - } - } - if (belowArgCount !== -Infinity && aboveArgCount !== Infinity) { - if (headMessage) { - let chain = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments, - argCount, - belowArgCount, - aboveArgCount - ); - chain = chainDiagnosticMessages(chain, headMessage); - return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), typeArguments, chain); - } - return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments, argCount, belowArgCount, aboveArgCount); - } - if (headMessage) { - let chain = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Expected_0_type_arguments_but_got_1, - belowArgCount === -Infinity ? aboveArgCount : belowArgCount, - argCount - ); - chain = chainDiagnosticMessages(chain, headMessage); - return createDiagnosticForNodeArrayFromMessageChain(getSourceFileOfNode(node), typeArguments, chain); - } - return createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount); - } - function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, headMessage) { - const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; - const isDecorator2 = node.kind === 170 /* Decorator */; - const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); - const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; - let typeArguments; - if (!isDecorator2 && !isSuperCall(node)) { - typeArguments = node.typeArguments; - if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 108 /* SuperKeyword */) { - forEach(typeArguments, checkSourceElement); - } - } - const candidates = candidatesOutArray || []; - reorderCandidates(signatures, candidates, callChainFlags); - Debug.assert(candidates.length, "Revert #54442 and add a testcase with whatever triggered this"); - const args = getEffectiveCallArguments(node); - const isSingleNonGenericCandidate = candidates.length === 1 && !candidates[0].typeParameters; - let argCheckMode = !isDecorator2 && !isSingleNonGenericCandidate && some(args, isContextSensitive) ? 4 /* SkipContextSensitive */ : 0 /* Normal */; - let candidatesForArgumentError; - let candidateForArgumentArityError; - let candidateForTypeArgumentError; - let result; - const signatureHelpTrailingComma = !!(checkMode & 16 /* IsForSignatureHelp */) && node.kind === 213 /* CallExpression */ && node.arguments.hasTrailingComma; - if (candidates.length > 1) { - result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); - } - if (!result) { - result = chooseOverload(candidates, assignableRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma); - } - if (result) { - return result; - } - result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode); - getNodeLinks(node).resolvedSignature = result; - if (reportErrors2) { - if (candidatesForArgumentError) { - if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) { - const last2 = candidatesForArgumentError[candidatesForArgumentError.length - 1]; - let chain; - if (candidatesForArgumentError.length > 3) { - chain = chainDiagnosticMessages(chain, Diagnostics.The_last_overload_gave_the_following_error); - chain = chainDiagnosticMessages(chain, Diagnostics.No_overload_matches_this_call); - } - if (headMessage) { - chain = chainDiagnosticMessages(chain, headMessage); - } - const diags = getSignatureApplicabilityError( - node, - args, - last2, - assignableRelation, - 0 /* Normal */, - /*reportErrors*/ - true, - () => chain - ); - if (diags) { - for (const d of diags) { - if (last2.declaration && candidatesForArgumentError.length > 3) { - addRelatedInfo(d, createDiagnosticForNode(last2.declaration, Diagnostics.The_last_overload_is_declared_here)); - } - addImplementationSuccessElaboration(last2, d); - diagnostics.add(d); - } - } else { - Debug.fail("No error for last overload signature"); - } - } else { - const allDiagnostics = []; - let max = 0; - let min2 = Number.MAX_VALUE; - let minIndex = 0; - let i = 0; - for (const c of candidatesForArgumentError) { - const chain2 = () => chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Overload_0_of_1_2_gave_the_following_error, - i + 1, - candidates.length, - signatureToString(c) - ); - const diags2 = getSignatureApplicabilityError( - node, - args, - c, - assignableRelation, - 0 /* Normal */, - /*reportErrors*/ - true, - chain2 - ); - if (diags2) { - if (diags2.length <= min2) { - min2 = diags2.length; - minIndex = i; - } - max = Math.max(max, diags2.length); - allDiagnostics.push(diags2); - } else { - Debug.fail("No error for 3 or fewer overload signatures"); - } - i++; - } - const diags = max > 1 ? allDiagnostics[minIndex] : flatten(allDiagnostics); - Debug.assert(diags.length > 0, "No errors reported for 3 or fewer overload signatures"); - let chain = chainDiagnosticMessages( - map(diags, createDiagnosticMessageChainFromDiagnostic), - Diagnostics.No_overload_matches_this_call - ); - if (headMessage) { - chain = chainDiagnosticMessages(chain, headMessage); - } - const related = [...flatMap(diags, (d) => d.relatedInformation)]; - let diag2; - if (every(diags, (d) => d.start === diags[0].start && d.length === diags[0].length && d.file === diags[0].file)) { - const { file, start, length: length2 } = diags[0]; - diag2 = { file, start, length: length2, code: chain.code, category: chain.category, messageText: chain, relatedInformation: related }; - } else { - diag2 = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(node), node, chain, related); - } - addImplementationSuccessElaboration(candidatesForArgumentError[0], diag2); - diagnostics.add(diag2); - } - } else if (candidateForArgumentArityError) { - diagnostics.add(getArgumentArityError(node, [candidateForArgumentArityError], args, headMessage)); - } else if (candidateForTypeArgumentError) { - checkTypeArguments( - candidateForTypeArgumentError, - node.typeArguments, - /*reportErrors*/ - true, - headMessage - ); - } else { - const signaturesWithCorrectTypeArgumentArity = filter(signatures, (s) => hasCorrectTypeArgumentArity(s, typeArguments)); - if (signaturesWithCorrectTypeArgumentArity.length === 0) { - diagnostics.add(getTypeArgumentArityError(node, signatures, typeArguments, headMessage)); - } else { - diagnostics.add(getArgumentArityError(node, signaturesWithCorrectTypeArgumentArity, args, headMessage)); - } - } - } - return result; - function addImplementationSuccessElaboration(failed, diagnostic) { - var _a, _b; - const oldCandidatesForArgumentError = candidatesForArgumentError; - const oldCandidateForArgumentArityError = candidateForArgumentArityError; - const oldCandidateForTypeArgumentError = candidateForTypeArgumentError; - const failedSignatureDeclarations = ((_b = (_a = failed.declaration) == null ? void 0 : _a.symbol) == null ? void 0 : _b.declarations) || emptyArray; - const isOverload = failedSignatureDeclarations.length > 1; - const implDecl = isOverload ? find(failedSignatureDeclarations, (d) => isFunctionLikeDeclaration(d) && nodeIsPresent(d.body)) : void 0; - if (implDecl) { - const candidate = getSignatureFromDeclaration(implDecl); - const isSingleNonGenericCandidate2 = !candidate.typeParameters; - if (chooseOverload([candidate], assignableRelation, isSingleNonGenericCandidate2)) { - addRelatedInfo(diagnostic, createDiagnosticForNode(implDecl, Diagnostics.The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible)); - } - } - candidatesForArgumentError = oldCandidatesForArgumentError; - candidateForArgumentArityError = oldCandidateForArgumentArityError; - candidateForTypeArgumentError = oldCandidateForTypeArgumentError; - } - function chooseOverload(candidates2, relation, isSingleNonGenericCandidate2, signatureHelpTrailingComma2 = false) { - candidatesForArgumentError = void 0; - candidateForArgumentArityError = void 0; - candidateForTypeArgumentError = void 0; - if (isSingleNonGenericCandidate2) { - const candidate = candidates2[0]; - if (some(typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma2)) { - return void 0; - } - if (getSignatureApplicabilityError( - node, - args, - candidate, - relation, - 0 /* Normal */, - /*reportErrors*/ - false, - /*containingMessageChain*/ - void 0 - )) { - candidatesForArgumentError = [candidate]; - return void 0; - } - return candidate; - } - for (let candidateIndex = 0; candidateIndex < candidates2.length; candidateIndex++) { - const candidate = candidates2[candidateIndex]; - if (!hasCorrectTypeArgumentArity(candidate, typeArguments) || !hasCorrectArity(node, args, candidate, signatureHelpTrailingComma2)) { - continue; - } - let checkCandidate; - let inferenceContext; - if (candidate.typeParameters) { - let typeArgumentTypes; - if (some(typeArguments)) { - typeArgumentTypes = checkTypeArguments( - candidate, - typeArguments, - /*reportErrors*/ - false - ); - if (!typeArgumentTypes) { - candidateForTypeArgumentError = candidate; - continue; - } - } else { - inferenceContext = createInferenceContext( - candidate.typeParameters, - candidate, - /*flags*/ - isInJSFile(node) ? 2 /* AnyDefault */ : 0 /* None */ - ); - typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode | 8 /* SkipGenericFunctions */, inferenceContext); - argCheckMode |= inferenceContext.flags & 4 /* SkippedGenericFunction */ ? 8 /* SkipGenericFunctions */ : 0 /* Normal */; - } - checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext && inferenceContext.inferredTypeParameters); - if (getNonArrayRestType(candidate) && !hasCorrectArity(node, args, checkCandidate, signatureHelpTrailingComma2)) { - candidateForArgumentArityError = checkCandidate; - continue; - } - } else { - checkCandidate = candidate; - } - if (getSignatureApplicabilityError( - node, - args, - checkCandidate, - relation, - argCheckMode, - /*reportErrors*/ - false, - /*containingMessageChain*/ - void 0 - )) { - (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate); - continue; - } - if (argCheckMode) { - argCheckMode = 0 /* Normal */; - if (inferenceContext) { - const typeArgumentTypes = inferTypeArguments(node, candidate, args, argCheckMode, inferenceContext); - checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration), inferenceContext.inferredTypeParameters); - if (getNonArrayRestType(candidate) && !hasCorrectArity(node, args, checkCandidate, signatureHelpTrailingComma2)) { - candidateForArgumentArityError = checkCandidate; - continue; - } - } - if (getSignatureApplicabilityError( - node, - args, - checkCandidate, - relation, - argCheckMode, - /*reportErrors*/ - false, - /*containingMessageChain*/ - void 0 - )) { - (candidatesForArgumentError || (candidatesForArgumentError = [])).push(checkCandidate); - continue; - } - } - candidates2[candidateIndex] = checkCandidate; - return checkCandidate; - } - return void 0; - } - } - function getCandidateForOverloadFailure(node, candidates, args, hasCandidatesOutArray, checkMode) { - Debug.assert(candidates.length > 0); - checkNodeDeferred(node); - return hasCandidatesOutArray || candidates.length === 1 || candidates.some((c) => !!c.typeParameters) ? pickLongestCandidateSignature(node, candidates, args, checkMode) : createUnionOfSignaturesForOverloadFailure(candidates); - } - function createUnionOfSignaturesForOverloadFailure(candidates) { - const thisParameters = mapDefined(candidates, (c) => c.thisParameter); - let thisParameter; - if (thisParameters.length) { - thisParameter = createCombinedSymbolFromTypes(thisParameters, thisParameters.map(getTypeOfParameter)); - } - const { min: minArgumentCount, max: maxNonRestParam } = minAndMax(candidates, getNumNonRestParameters); - const parameters = []; - for (let i = 0; i < maxNonRestParam; i++) { - const symbols = mapDefined(candidates, (s) => signatureHasRestParameter(s) ? i < s.parameters.length - 1 ? s.parameters[i] : last(s.parameters) : i < s.parameters.length ? s.parameters[i] : void 0); - Debug.assert(symbols.length !== 0); - parameters.push(createCombinedSymbolFromTypes(symbols, mapDefined(candidates, (candidate) => tryGetTypeAtPosition(candidate, i)))); - } - const restParameterSymbols = mapDefined(candidates, (c) => signatureHasRestParameter(c) ? last(c.parameters) : void 0); - let flags = 128 /* IsSignatureCandidateForOverloadFailure */; - if (restParameterSymbols.length !== 0) { - const type = createArrayType(getUnionType(mapDefined(candidates, tryGetRestTypeOfSignature), 2 /* Subtype */)); - parameters.push(createCombinedSymbolForOverloadFailure(restParameterSymbols, type)); - flags |= 1 /* HasRestParameter */; - } - if (candidates.some(signatureHasLiteralTypes)) { - flags |= 2 /* HasLiteralTypes */; - } - return createSignature( - candidates[0].declaration, - /*typeParameters*/ - void 0, - // Before calling this we tested for `!candidates.some(c => !!c.typeParameters)`. - thisParameter, - parameters, - /*resolvedReturnType*/ - getIntersectionType(candidates.map(getReturnTypeOfSignature)), - /*resolvedTypePredicate*/ - void 0, - minArgumentCount, - flags - ); - } - function getNumNonRestParameters(signature) { - const numParams = signature.parameters.length; - return signatureHasRestParameter(signature) ? numParams - 1 : numParams; - } - function createCombinedSymbolFromTypes(sources, types) { - return createCombinedSymbolForOverloadFailure(sources, getUnionType(types, 2 /* Subtype */)); - } - function createCombinedSymbolForOverloadFailure(sources, type) { - return createSymbolWithType(first(sources), type); - } - function pickLongestCandidateSignature(node, candidates, args, checkMode) { - const bestIndex = getLongestCandidateIndex(candidates, apparentArgumentCount === void 0 ? args.length : apparentArgumentCount); - const candidate = candidates[bestIndex]; - const { typeParameters } = candidate; - if (!typeParameters) { - return candidate; - } - const typeArgumentNodes = callLikeExpressionMayHaveTypeArguments(node) ? node.typeArguments : void 0; - const instantiated = typeArgumentNodes ? createSignatureInstantiation(candidate, getTypeArgumentsFromNodes(typeArgumentNodes, typeParameters, isInJSFile(node))) : inferSignatureInstantiationForOverloadFailure(node, typeParameters, candidate, args, checkMode); - candidates[bestIndex] = instantiated; - return instantiated; - } - function getTypeArgumentsFromNodes(typeArgumentNodes, typeParameters, isJs) { - const typeArguments = typeArgumentNodes.map(getTypeOfNode); - while (typeArguments.length > typeParameters.length) { - typeArguments.pop(); - } - while (typeArguments.length < typeParameters.length) { - typeArguments.push(getDefaultFromTypeParameter(typeParameters[typeArguments.length]) || getConstraintOfTypeParameter(typeParameters[typeArguments.length]) || getDefaultTypeArgumentType(isJs)); - } - return typeArguments; - } - function inferSignatureInstantiationForOverloadFailure(node, typeParameters, candidate, args, checkMode) { - const inferenceContext = createInferenceContext( - typeParameters, - candidate, - /*flags*/ - isInJSFile(node) ? 2 /* AnyDefault */ : 0 /* None */ - ); - const typeArgumentTypes = inferTypeArguments(node, candidate, args, checkMode | 4 /* SkipContextSensitive */ | 8 /* SkipGenericFunctions */, inferenceContext); - return createSignatureInstantiation(candidate, typeArgumentTypes); - } - function getLongestCandidateIndex(candidates, argsCount) { - let maxParamsIndex = -1; - let maxParams = -1; - for (let i = 0; i < candidates.length; i++) { - const candidate = candidates[i]; - const paramCount = getParameterCount(candidate); - if (hasEffectiveRestParameter(candidate) || paramCount >= argsCount) { - return i; - } - if (paramCount > maxParams) { - maxParams = paramCount; - maxParamsIndex = i; - } - } - return maxParamsIndex; - } - function resolveCallExpression(node, candidatesOutArray, checkMode) { - if (node.expression.kind === 108 /* SuperKeyword */) { - const superType = checkSuperExpression(node.expression); - if (isTypeAny(superType)) { - for (const arg of node.arguments) { - checkExpression(arg); - } - return anySignature; - } - if (!isErrorType(superType)) { - const baseTypeNode = getEffectiveBaseTypeNode(getContainingClass(node)); - if (baseTypeNode) { - const baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode); - return resolveCall(node, baseConstructors, candidatesOutArray, checkMode, 0 /* None */); - } - } - return resolveUntypedCall(node); - } - let callChainFlags; - let funcType = checkExpression(node.expression); - if (isCallChain(node)) { - const nonOptionalType = getOptionalExpressionType(funcType, node.expression); - callChainFlags = nonOptionalType === funcType ? 0 /* None */ : isOutermostOptionalChain(node) ? 16 /* IsOuterCallChain */ : 8 /* IsInnerCallChain */; - funcType = nonOptionalType; - } else { - callChainFlags = 0 /* None */; - } - funcType = checkNonNullTypeWithReporter( - funcType, - node.expression, - reportCannotInvokePossiblyNullOrUndefinedError - ); - if (funcType === silentNeverType) { - return silentNeverSignature; - } - const apparentType = getApparentType(funcType); - if (isErrorType(apparentType)) { - return resolveErrorCall(node); - } - const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); - const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length; - if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) { - if (!isErrorType(funcType) && node.typeArguments) { - error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); - } - return resolveUntypedCall(node); - } - if (!callSignatures.length) { - if (numConstructSignatures) { - error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); - } else { - let relatedInformation; - if (node.arguments.length === 1) { - const text = getSourceFileOfNode(node).text; - if (isLineBreak(text.charCodeAt(skipTrivia( - text, - node.expression.end, - /*stopAfterLineBreak*/ - true - ) - 1))) { - relatedInformation = createDiagnosticForNode(node.expression, Diagnostics.Are_you_missing_a_semicolon); - } - } - invocationError(node.expression, apparentType, 0 /* Call */, relatedInformation); - } - return resolveErrorCall(node); - } - if (checkMode & 8 /* SkipGenericFunctions */ && !node.typeArguments && callSignatures.some(isGenericFunctionReturningFunction)) { - skippedGenericFunction(node, checkMode); - return resolvingSignature; - } - if (callSignatures.some((sig) => isInJSFile(sig.declaration) && !!getJSDocClassTag(sig.declaration))) { - error2(node, Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); - return resolveErrorCall(node); - } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, callChainFlags); - } - function isGenericFunctionReturningFunction(signature) { - return !!(signature.typeParameters && isFunctionType(getReturnTypeOfSignature(signature))); - } - function isUntypedFunctionCall(funcType, apparentFuncType, numCallSignatures, numConstructSignatures) { - return isTypeAny(funcType) || isTypeAny(apparentFuncType) && !!(funcType.flags & 262144 /* TypeParameter */) || !numCallSignatures && !numConstructSignatures && !(apparentFuncType.flags & 1048576 /* Union */) && !(getReducedType(apparentFuncType).flags & 131072 /* Never */) && isTypeAssignableTo(funcType, globalFunctionType); - } - function resolveNewExpression(node, candidatesOutArray, checkMode) { - if (node.arguments && languageVersion < 1 /* ES5 */) { - const spreadIndex = getSpreadArgumentIndex(node.arguments); - if (spreadIndex >= 0) { - error2(node.arguments[spreadIndex], Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); - } - } - let expressionType = checkNonNullExpression(node.expression); - if (expressionType === silentNeverType) { - return silentNeverSignature; - } - expressionType = getApparentType(expressionType); - if (isErrorType(expressionType)) { - return resolveErrorCall(node); - } - if (isTypeAny(expressionType)) { - if (node.typeArguments) { - error2(node, Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); - } - return resolveUntypedCall(node); - } - const constructSignatures = getSignaturesOfType(expressionType, 1 /* Construct */); - if (constructSignatures.length) { - if (!isConstructorAccessible(node, constructSignatures[0])) { - return resolveErrorCall(node); - } - if (someSignature(constructSignatures, (signature) => !!(signature.flags & 4 /* Abstract */))) { - error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); - return resolveErrorCall(node); - } - const valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol); - if (valueDecl && hasSyntacticModifier(valueDecl, 256 /* Abstract */)) { - error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); - return resolveErrorCall(node); - } - return resolveCall(node, constructSignatures, candidatesOutArray, checkMode, 0 /* None */); - } - const callSignatures = getSignaturesOfType(expressionType, 0 /* Call */); - if (callSignatures.length) { - const signature = resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); - if (!noImplicitAny) { - if (signature.declaration && !isJSConstructor(signature.declaration) && getReturnTypeOfSignature(signature) !== voidType) { - error2(node, Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); - } - if (getThisTypeOfSignature(signature) === voidType) { - error2(node, Diagnostics.A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void); - } - } - return signature; - } - invocationError(node.expression, expressionType, 1 /* Construct */); - return resolveErrorCall(node); - } - function someSignature(signatures, f) { - if (isArray(signatures)) { - return some(signatures, (signature) => someSignature(signature, f)); - } - return signatures.compositeKind === 1048576 /* Union */ ? some(signatures.compositeSignatures, f) : f(signatures); - } - function typeHasProtectedAccessibleBase(target, type) { - const baseTypes = getBaseTypes(type); - if (!length(baseTypes)) { - return false; - } - const firstBase = baseTypes[0]; - if (firstBase.flags & 2097152 /* Intersection */) { - const types = firstBase.types; - const mixinFlags = findMixins(types); - let i = 0; - for (const intersectionMember of firstBase.types) { - if (!mixinFlags[i]) { - if (getObjectFlags(intersectionMember) & (1 /* Class */ | 2 /* Interface */)) { - if (intersectionMember.symbol === target) { - return true; - } - if (typeHasProtectedAccessibleBase(target, intersectionMember)) { - return true; - } - } - } - i++; - } - return false; - } - if (firstBase.symbol === target) { - return true; - } - return typeHasProtectedAccessibleBase(target, firstBase); - } - function isConstructorAccessible(node, signature) { - if (!signature || !signature.declaration) { - return true; - } - const declaration = signature.declaration; - const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); - if (!modifiers || declaration.kind !== 176 /* Constructor */) { - return true; - } - const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(declaration.parent.symbol); - const declaringClass = getDeclaredTypeOfSymbol(declaration.parent.symbol); - if (!isNodeWithinClass(node, declaringClassDeclaration)) { - const containingClass = getContainingClass(node); - if (containingClass && modifiers & 16 /* Protected */) { - const containingType = getTypeOfNode(containingClass); - if (typeHasProtectedAccessibleBase(declaration.parent.symbol, containingType)) { - return true; - } - } - if (modifiers & 8 /* Private */) { - error2(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); - } - if (modifiers & 16 /* Protected */) { - error2(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); - } - return false; - } - return true; - } - function invocationErrorDetails(errorTarget, apparentType, kind) { - let errorInfo; - const isCall = kind === 0 /* Call */; - const awaitedType = getAwaitedType(apparentType); - const maybeMissingAwait = awaitedType && getSignaturesOfType(awaitedType, kind).length > 0; - if (apparentType.flags & 1048576 /* Union */) { - const types = apparentType.types; - let hasSignatures = false; - for (const constituent of types) { - const signatures = getSignaturesOfType(constituent, kind); - if (signatures.length !== 0) { - hasSignatures = true; - if (errorInfo) { - break; - } - } else { - if (!errorInfo) { - errorInfo = chainDiagnosticMessages( - errorInfo, - isCall ? Diagnostics.Type_0_has_no_call_signatures : Diagnostics.Type_0_has_no_construct_signatures, - typeToString(constituent) - ); - errorInfo = chainDiagnosticMessages( - errorInfo, - isCall ? Diagnostics.Not_all_constituents_of_type_0_are_callable : Diagnostics.Not_all_constituents_of_type_0_are_constructable, - typeToString(apparentType) - ); - } - if (hasSignatures) { - break; - } - } - } - if (!hasSignatures) { - errorInfo = chainDiagnosticMessages( - /*details*/ - void 0, - isCall ? Diagnostics.No_constituent_of_type_0_is_callable : Diagnostics.No_constituent_of_type_0_is_constructable, - typeToString(apparentType) - ); - } - if (!errorInfo) { - errorInfo = chainDiagnosticMessages( - errorInfo, - isCall ? Diagnostics.Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other : Diagnostics.Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other, - typeToString(apparentType) - ); - } - } else { - errorInfo = chainDiagnosticMessages( - errorInfo, - isCall ? Diagnostics.Type_0_has_no_call_signatures : Diagnostics.Type_0_has_no_construct_signatures, - typeToString(apparentType) - ); - } - let headMessage = isCall ? Diagnostics.This_expression_is_not_callable : Diagnostics.This_expression_is_not_constructable; - if (isCallExpression(errorTarget.parent) && errorTarget.parent.arguments.length === 0) { - const { resolvedSymbol } = getNodeLinks(errorTarget); - if (resolvedSymbol && resolvedSymbol.flags & 32768 /* GetAccessor */) { - headMessage = Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without; - } - } - return { - messageChain: chainDiagnosticMessages(errorInfo, headMessage), - relatedMessage: maybeMissingAwait ? Diagnostics.Did_you_forget_to_use_await : void 0 - }; - } - function invocationError(errorTarget, apparentType, kind, relatedInformation) { - const { messageChain, relatedMessage: relatedInfo } = invocationErrorDetails(errorTarget, apparentType, kind); - const diagnostic = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorTarget), errorTarget, messageChain); - if (relatedInfo) { - addRelatedInfo(diagnostic, createDiagnosticForNode(errorTarget, relatedInfo)); - } - if (isCallExpression(errorTarget.parent)) { - const { start, length: length2 } = getDiagnosticSpanForCallNode( - errorTarget.parent, - /*doNotIncludeArguments*/ - true - ); - diagnostic.start = start; - diagnostic.length = length2; - } - diagnostics.add(diagnostic); - invocationErrorRecovery(apparentType, kind, relatedInformation ? addRelatedInfo(diagnostic, relatedInformation) : diagnostic); - } - function invocationErrorRecovery(apparentType, kind, diagnostic) { - if (!apparentType.symbol) { - return; - } - const importNode = getSymbolLinks(apparentType.symbol).originatingImport; - if (importNode && !isImportCall(importNode)) { - const sigs = getSignaturesOfType(getTypeOfSymbol(getSymbolLinks(apparentType.symbol).target), kind); - if (!sigs || !sigs.length) - return; - addRelatedInfo( - diagnostic, - createDiagnosticForNode(importNode, Diagnostics.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) - ); - } - } - function resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode) { - const tagType = checkExpression(node.tag); - const apparentType = getApparentType(tagType); - if (isErrorType(apparentType)) { - return resolveErrorCall(node); - } - const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); - const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length; - if (isUntypedFunctionCall(tagType, apparentType, callSignatures.length, numConstructSignatures)) { - return resolveUntypedCall(node); - } - if (!callSignatures.length) { - if (isArrayLiteralExpression(node.parent)) { - const diagnostic = createDiagnosticForNode(node.tag, Diagnostics.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); - diagnostics.add(diagnostic); - return resolveErrorCall(node); - } - invocationError(node.tag, apparentType, 0 /* Call */); - return resolveErrorCall(node); - } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); - } - function getDiagnosticHeadMessageForDecoratorResolution(node) { - switch (node.parent.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - return Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression; - case 169 /* Parameter */: - return Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression; - case 172 /* PropertyDeclaration */: - return Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression; - default: - return Debug.fail(); - } - } - function resolveDecorator(node, candidatesOutArray, checkMode) { - const funcType = checkExpression(node.expression); - const apparentType = getApparentType(funcType); - if (isErrorType(apparentType)) { - return resolveErrorCall(node); - } - const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); - const numConstructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */).length; - if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) { - return resolveUntypedCall(node); - } - if (isPotentiallyUncalledDecorator(node, callSignatures) && !isParenthesizedExpression(node.expression)) { - const nodeStr = getTextOfNode( - node.expression, - /*includeTrivia*/ - false - ); - error2(node, Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0, nodeStr); - return resolveErrorCall(node); - } - const headMessage = getDiagnosticHeadMessageForDecoratorResolution(node); - if (!callSignatures.length) { - const errorDetails = invocationErrorDetails(node.expression, apparentType, 0 /* Call */); - const messageChain = chainDiagnosticMessages(errorDetails.messageChain, headMessage); - const diag2 = createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(node.expression), node.expression, messageChain); - if (errorDetails.relatedMessage) { - addRelatedInfo(diag2, createDiagnosticForNode(node.expression, errorDetails.relatedMessage)); - } - diagnostics.add(diag2); - invocationErrorRecovery(apparentType, 0 /* Call */, diag2); - return resolveErrorCall(node); - } - return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */, headMessage); - } - function createSignatureForJSXIntrinsic(node, result) { - const namespace = getJsxNamespaceAt(node); - const exports = namespace && getExportsOfSymbol(namespace); - const typeSymbol = exports && getSymbol2(exports, JsxNames.Element, 788968 /* Type */); - const returnNode = typeSymbol && nodeBuilder.symbolToEntityName(typeSymbol, 788968 /* Type */, node); - const declaration = factory.createFunctionTypeNode( - /*typeParameters*/ - void 0, - [factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "props", - /*questionToken*/ - void 0, - nodeBuilder.typeToTypeNode(result, node) - )], - returnNode ? factory.createTypeReferenceNode( - returnNode, - /*typeArguments*/ - void 0 - ) : factory.createKeywordTypeNode(133 /* AnyKeyword */) - ); - const parameterSymbol = createSymbol(1 /* FunctionScopedVariable */, "props"); - parameterSymbol.links.type = result; - return createSignature( - declaration, - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - [parameterSymbol], - typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, - /*resolvedTypePredicate*/ - void 0, - 1, - 0 /* None */ - ); - } - function resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode) { - if (isJsxIntrinsicTagName(node.tagName)) { - const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node); - const fakeSignature = createSignatureForJSXIntrinsic(node, result); - checkTypeAssignableToAndOptionallyElaborate(checkExpressionWithContextualType( - node.attributes, - getEffectiveFirstArgumentForJsxSignature(fakeSignature, node), - /*inferenceContext*/ - void 0, - 0 /* Normal */ - ), result, node.tagName, node.attributes); - if (length(node.typeArguments)) { - forEach(node.typeArguments, checkSourceElement); - diagnostics.add(createDiagnosticForNodeArray(getSourceFileOfNode(node), node.typeArguments, Diagnostics.Expected_0_type_arguments_but_got_1, 0, length(node.typeArguments))); - } - return fakeSignature; - } - const exprTypes = checkExpression(node.tagName); - const apparentType = getApparentType(exprTypes); - if (isErrorType(apparentType)) { - return resolveErrorCall(node); - } - const signatures = getUninstantiatedJsxSignaturesOfType(exprTypes, node); - if (isUntypedFunctionCall( - exprTypes, - apparentType, - signatures.length, - /*constructSignatures*/ - 0 - )) { - return resolveUntypedCall(node); - } - if (signatures.length === 0) { - error2(node.tagName, Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures, getTextOfNode(node.tagName)); - return resolveErrorCall(node); - } - return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); - } - function isPotentiallyUncalledDecorator(decorator, signatures) { - return signatures.length && every(signatures, (signature) => signature.minArgumentCount === 0 && !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature)); - } - function resolveSignature(node, candidatesOutArray, checkMode) { - switch (node.kind) { - case 213 /* CallExpression */: - return resolveCallExpression(node, candidatesOutArray, checkMode); - case 214 /* NewExpression */: - return resolveNewExpression(node, candidatesOutArray, checkMode); - case 215 /* TaggedTemplateExpression */: - return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode); - case 170 /* Decorator */: - return resolveDecorator(node, candidatesOutArray, checkMode); - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: - return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); - } - Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); - } - function getResolvedSignature(node, candidatesOutArray, checkMode) { - const links = getNodeLinks(node); - const cached = links.resolvedSignature; - if (cached && cached !== resolvingSignature && !candidatesOutArray) { - return cached; - } - links.resolvedSignature = resolvingSignature; - let result = resolveSignature(node, candidatesOutArray, checkMode || 0 /* Normal */); - if (result !== resolvingSignature) { - if (links.resolvedSignature !== resolvingSignature) { - result = links.resolvedSignature; - } - links.resolvedSignature = flowLoopStart === flowLoopCount ? result : cached; - } - return result; - } - function isJSConstructor(node) { - var _a; - if (!node || !isInJSFile(node)) { - return false; - } - const func = isFunctionDeclaration(node) || isFunctionExpression(node) ? node : (isVariableDeclaration(node) || isPropertyAssignment(node)) && node.initializer && isFunctionExpression(node.initializer) ? node.initializer : void 0; - if (func) { - if (getJSDocClassTag(node)) - return true; - if (isPropertyAssignment(walkUpParenthesizedExpressions(func.parent))) - return false; - const symbol = getSymbolOfDeclaration(func); - return !!((_a = symbol == null ? void 0 : symbol.members) == null ? void 0 : _a.size); - } - return false; - } - function mergeJSSymbols(target, source) { - var _a, _b; - if (source) { - const links = getSymbolLinks(source); - if (!links.inferredClassSymbol || !links.inferredClassSymbol.has(getSymbolId(target))) { - const inferred = isTransientSymbol(target) ? target : cloneSymbol(target); - inferred.exports = inferred.exports || createSymbolTable(); - inferred.members = inferred.members || createSymbolTable(); - inferred.flags |= source.flags & 32 /* Class */; - if ((_a = source.exports) == null ? void 0 : _a.size) { - mergeSymbolTable(inferred.exports, source.exports); - } - if ((_b = source.members) == null ? void 0 : _b.size) { - mergeSymbolTable(inferred.members, source.members); - } - (links.inferredClassSymbol || (links.inferredClassSymbol = /* @__PURE__ */ new Map())).set(getSymbolId(inferred), inferred); - return inferred; - } - return links.inferredClassSymbol.get(getSymbolId(target)); - } - } - function getAssignedClassSymbol(decl) { - var _a; - const assignmentSymbol = decl && getSymbolOfExpando( - decl, - /*allowDeclaration*/ - true - ); - const prototype = (_a = assignmentSymbol == null ? void 0 : assignmentSymbol.exports) == null ? void 0 : _a.get("prototype"); - const init = (prototype == null ? void 0 : prototype.valueDeclaration) && getAssignedJSPrototype(prototype.valueDeclaration); - return init ? getSymbolOfDeclaration(init) : void 0; - } - function getSymbolOfExpando(node, allowDeclaration) { - if (!node.parent) { - return void 0; - } - let name; - let decl; - if (isVariableDeclaration(node.parent) && node.parent.initializer === node) { - if (!isInJSFile(node) && !(isVarConstLike(node.parent) && isFunctionLikeDeclaration(node))) { - return void 0; - } - name = node.parent.name; - decl = node.parent; - } else if (isBinaryExpression(node.parent)) { - const parentNode = node.parent; - const parentNodeOperator = node.parent.operatorToken.kind; - if (parentNodeOperator === 64 /* EqualsToken */ && (allowDeclaration || parentNode.right === node)) { - name = parentNode.left; - decl = name; - } else if (parentNodeOperator === 57 /* BarBarToken */ || parentNodeOperator === 61 /* QuestionQuestionToken */) { - if (isVariableDeclaration(parentNode.parent) && parentNode.parent.initializer === parentNode) { - name = parentNode.parent.name; - decl = parentNode.parent; - } else if (isBinaryExpression(parentNode.parent) && parentNode.parent.operatorToken.kind === 64 /* EqualsToken */ && (allowDeclaration || parentNode.parent.right === parentNode)) { - name = parentNode.parent.left; - decl = name; - } - if (!name || !isBindableStaticNameExpression(name) || !isSameEntityName(name, parentNode.left)) { - return void 0; - } - } - } else if (allowDeclaration && isFunctionDeclaration(node)) { - name = node.name; - decl = node; - } - if (!decl || !name || !allowDeclaration && !getExpandoInitializer(node, isPrototypeAccess(name))) { - return void 0; - } - return getSymbolOfNode(decl); - } - function getAssignedJSPrototype(node) { - if (!node.parent) { - return false; - } - let parent2 = node.parent; - while (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { - parent2 = parent2.parent; - } - if (parent2 && isBinaryExpression(parent2) && isPrototypeAccess(parent2.left) && parent2.operatorToken.kind === 64 /* EqualsToken */) { - const right = getInitializerOfBinaryExpression(parent2); - return isObjectLiteralExpression(right) && right; - } - } - function checkCallExpression(node, checkMode) { - var _a, _b, _c; - checkGrammarTypeArguments(node, node.typeArguments); - const signature = getResolvedSignature( - node, - /*candidatesOutArray*/ - void 0, - checkMode - ); - if (signature === resolvingSignature) { - return silentNeverType; - } - checkDeprecatedSignature(signature, node); - if (node.expression.kind === 108 /* SuperKeyword */) { - return voidType; - } - if (node.kind === 214 /* NewExpression */) { - const declaration = signature.declaration; - if (declaration && declaration.kind !== 176 /* Constructor */ && declaration.kind !== 180 /* ConstructSignature */ && declaration.kind !== 185 /* ConstructorType */ && !(isJSDocSignature(declaration) && ((_b = (_a = getJSDocRoot(declaration)) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 176 /* Constructor */) && !isJSDocConstructSignature(declaration) && !isJSConstructor(declaration)) { - if (noImplicitAny) { - error2(node, Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); - } - return anyType; - } - } - if (isInJSFile(node) && shouldResolveJsRequire(compilerOptions) && isCommonJsRequire(node)) { - return resolveExternalModuleTypeByLiteral(node.arguments[0]); - } - const returnType = getReturnTypeOfSignature(signature); - if (returnType.flags & 12288 /* ESSymbolLike */ && isSymbolOrSymbolForCall(node)) { - return getESSymbolLikeTypeForNode(walkUpParenthesizedExpressions(node.parent)); - } - if (node.kind === 213 /* CallExpression */ && !node.questionDotToken && node.parent.kind === 244 /* ExpressionStatement */ && returnType.flags & 16384 /* Void */ && getTypePredicateOfSignature(signature)) { - if (!isDottedName(node.expression)) { - error2(node.expression, Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name); - } else if (!getEffectsSignature(node)) { - const diagnostic = error2(node.expression, Diagnostics.Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation); - getTypeOfDottedName(node.expression, diagnostic); - } - } - if (isInJSFile(node)) { - const jsSymbol = getSymbolOfExpando( - node, - /*allowDeclaration*/ - false - ); - if ((_c = jsSymbol == null ? void 0 : jsSymbol.exports) == null ? void 0 : _c.size) { - const jsAssignmentType = createAnonymousType(jsSymbol, jsSymbol.exports, emptyArray, emptyArray, emptyArray); - jsAssignmentType.objectFlags |= 4096 /* JSLiteral */; - return getIntersectionType([returnType, jsAssignmentType]); - } - } - return returnType; - } - function checkDeprecatedSignature(signature, node) { - if (signature.flags & 128 /* IsSignatureCandidateForOverloadFailure */) - return; - if (signature.declaration && signature.declaration.flags & 536870912 /* Deprecated */) { - const suggestionNode = getDeprecatedSuggestionNode(node); - const name = tryGetPropertyAccessOrIdentifierToString(getInvokedExpression(node)); - addDeprecatedSuggestionWithSignature(suggestionNode, signature.declaration, name, signatureToString(signature)); - } - } - function getDeprecatedSuggestionNode(node) { - node = skipParentheses(node); - switch (node.kind) { - case 213 /* CallExpression */: - case 170 /* Decorator */: - case 214 /* NewExpression */: - return getDeprecatedSuggestionNode(node.expression); - case 215 /* TaggedTemplateExpression */: - return getDeprecatedSuggestionNode(node.tag); - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: - return getDeprecatedSuggestionNode(node.tagName); - case 212 /* ElementAccessExpression */: - return node.argumentExpression; - case 211 /* PropertyAccessExpression */: - return node.name; - case 183 /* TypeReference */: - const typeReference = node; - return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; - default: - return node; - } - } - function isSymbolOrSymbolForCall(node) { - if (!isCallExpression(node)) - return false; - let left = node.expression; - if (isPropertyAccessExpression(left) && left.name.escapedText === "for") { - left = left.expression; - } - if (!isIdentifier(left) || left.escapedText !== "Symbol") { - return false; - } - const globalESSymbol = getGlobalESSymbolConstructorSymbol( - /*reportErrors*/ - false - ); - if (!globalESSymbol) { - return false; - } - return globalESSymbol === resolveName( - left, - "Symbol", - 111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - ); - } - function checkImportCallExpression(node) { - checkGrammarImportCallExpression(node); - if (node.arguments.length === 0) { - return createPromiseReturnType(node, anyType); - } - const specifier = node.arguments[0]; - const specifierType = checkExpressionCached(specifier); - const optionsType = node.arguments.length > 1 ? checkExpressionCached(node.arguments[1]) : void 0; - for (let i = 2; i < node.arguments.length; ++i) { - checkExpressionCached(node.arguments[i]); - } - if (specifierType.flags & 32768 /* Undefined */ || specifierType.flags & 65536 /* Null */ || !isTypeAssignableTo(specifierType, stringType)) { - error2(specifier, Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType)); - } - if (optionsType) { - const importCallOptionsType = getGlobalImportCallOptionsType( - /*reportErrors*/ - true - ); - if (importCallOptionsType !== emptyObjectType) { - checkTypeAssignableTo(optionsType, getNullableType(importCallOptionsType, 32768 /* Undefined */), node.arguments[1]); - } - } - const moduleSymbol = resolveExternalModuleName(node, specifier); - if (moduleSymbol) { - const esModuleSymbol = resolveESModuleSymbol( - moduleSymbol, - specifier, - /*dontResolveAlias*/ - true, - /*suppressInteropError*/ - false - ); - if (esModuleSymbol) { - return createPromiseReturnType( - node, - getTypeWithSyntheticDefaultOnly(getTypeOfSymbol(esModuleSymbol), esModuleSymbol, moduleSymbol, specifier) || getTypeWithSyntheticDefaultImportType(getTypeOfSymbol(esModuleSymbol), esModuleSymbol, moduleSymbol, specifier) - ); - } - } - return createPromiseReturnType(node, anyType); - } - function createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol) { - const memberTable = createSymbolTable(); - const newSymbol = createSymbol(2097152 /* Alias */, "default" /* Default */); - newSymbol.parent = originalSymbol; - newSymbol.links.nameType = getStringLiteralType("default"); - newSymbol.links.aliasTarget = resolveSymbol(symbol); - memberTable.set("default" /* Default */, newSymbol); - return createAnonymousType(anonymousSymbol, memberTable, emptyArray, emptyArray, emptyArray); - } - function getTypeWithSyntheticDefaultOnly(type, symbol, originalSymbol, moduleSpecifier) { - const hasDefaultOnly = isOnlyImportedAsDefault(moduleSpecifier); - if (hasDefaultOnly && type && !isErrorType(type)) { - const synthType = type; - if (!synthType.defaultOnlyType) { - const type2 = createDefaultPropertyWrapperForModule(symbol, originalSymbol); - synthType.defaultOnlyType = type2; - } - return synthType.defaultOnlyType; - } - return void 0; - } - function getTypeWithSyntheticDefaultImportType(type, symbol, originalSymbol, moduleSpecifier) { - var _a; - if (allowSyntheticDefaultImports && type && !isErrorType(type)) { - const synthType = type; - if (!synthType.syntheticType) { - const file = (_a = originalSymbol.declarations) == null ? void 0 : _a.find(isSourceFile); - const hasSyntheticDefault = canHaveSyntheticDefault( - file, - originalSymbol, - /*dontResolveAlias*/ - false, - moduleSpecifier - ); - if (hasSyntheticDefault) { - const anonymousSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */); - const defaultContainingObject = createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol); - anonymousSymbol.links.type = defaultContainingObject; - synthType.syntheticType = isValidSpreadType(type) ? getSpreadType( - type, - defaultContainingObject, - anonymousSymbol, - /*objectFlags*/ - 0, - /*readonly*/ - false - ) : defaultContainingObject; - } else { - synthType.syntheticType = type; - } - } - return synthType.syntheticType; - } - return type; - } - function isCommonJsRequire(node) { - if (!isRequireCall( - node, - /*requireStringLiteralLikeArgument*/ - true - )) { - return false; - } - if (!isIdentifier(node.expression)) - return Debug.fail(); - const resolvedRequire = resolveName( - node.expression, - node.expression.escapedText, - 111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - true - ); - if (resolvedRequire === requireSymbol) { - return true; - } - if (resolvedRequire.flags & 2097152 /* Alias */) { - return false; - } - const targetDeclarationKind = resolvedRequire.flags & 16 /* Function */ ? 262 /* FunctionDeclaration */ : resolvedRequire.flags & 3 /* Variable */ ? 260 /* VariableDeclaration */ : 0 /* Unknown */; - if (targetDeclarationKind !== 0 /* Unknown */) { - const decl = getDeclarationOfKind(resolvedRequire, targetDeclarationKind); - return !!decl && !!(decl.flags & 33554432 /* Ambient */); - } - return false; - } - function checkTaggedTemplateExpression(node) { - if (!checkGrammarTaggedTemplateChain(node)) - checkGrammarTypeArguments(node, node.typeArguments); - if (languageVersion < 2 /* ES2015 */) { - checkExternalEmitHelpers(node, 262144 /* MakeTemplateObject */); - } - const signature = getResolvedSignature(node); - checkDeprecatedSignature(signature, node); - return getReturnTypeOfSignature(signature); - } - function checkAssertion(node, checkMode) { - if (node.kind === 216 /* TypeAssertionExpression */) { - const file = getSourceFileOfNode(node); - if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) { - grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead); - } - } - return checkAssertionWorker(node, checkMode); - } - function isValidConstAssertionArgument(node) { - switch (node.kind) { - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 228 /* TemplateExpression */: - return true; - case 217 /* ParenthesizedExpression */: - return isValidConstAssertionArgument(node.expression); - case 224 /* PrefixUnaryExpression */: - const op = node.operator; - const arg = node.operand; - return op === 41 /* MinusToken */ && (arg.kind === 9 /* NumericLiteral */ || arg.kind === 10 /* BigIntLiteral */) || op === 40 /* PlusToken */ && arg.kind === 9 /* NumericLiteral */; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - const expr = skipParentheses(node.expression); - const symbol = isEntityNameExpression(expr) ? resolveEntityName( - expr, - 111551 /* Value */, - /*ignoreErrors*/ - true - ) : void 0; - return !!(symbol && symbol.flags & 384 /* Enum */); - } - return false; - } - function checkAssertionWorker(node, checkMode) { - const { type, expression } = getAssertionTypeAndExpression(node); - const exprType = checkExpression(expression, checkMode); - if (isConstTypeReference(type)) { - if (!isValidConstAssertionArgument(expression)) { - error2(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals); - } - return getRegularTypeOfLiteralType(exprType); - } - const links = getNodeLinks(node); - links.assertionExpressionType = exprType; - checkSourceElement(type); - checkNodeDeferred(node); - return getTypeFromTypeNode(type); - } - function getAssertionTypeAndExpression(node) { - let type; - let expression; - switch (node.kind) { - case 234 /* AsExpression */: - case 216 /* TypeAssertionExpression */: - type = node.type; - expression = node.expression; - break; - case 217 /* ParenthesizedExpression */: - type = getJSDocTypeAssertionType(node); - expression = node.expression; - break; - } - return { type, expression }; - } - function checkAssertionDeferred(node) { - const { type } = getAssertionTypeAndExpression(node); - const errNode = isParenthesizedExpression(node) ? type : node; - const links = getNodeLinks(node); - Debug.assertIsDefined(links.assertionExpressionType); - const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(links.assertionExpressionType)); - const targetType = getTypeFromTypeNode(type); - if (!isErrorType(targetType)) { - addLazyDiagnostic(() => { - const widenedType = getWidenedType(exprType); - if (!isTypeComparableTo(targetType, widenedType)) { - checkTypeComparableTo( - exprType, - targetType, - errNode, - 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 - ); - } - }); - } - } - function checkNonNullChain(node) { - const leftType = checkExpression(node.expression); - const nonOptionalType = getOptionalExpressionType(leftType, node.expression); - return propagateOptionalTypeMarker(getNonNullableType(nonOptionalType), node, nonOptionalType !== leftType); - } - function checkNonNullAssertion(node) { - return node.flags & 64 /* OptionalChain */ ? checkNonNullChain(node) : getNonNullableType(checkExpression(node.expression)); - } - function checkExpressionWithTypeArguments(node) { - checkGrammarExpressionWithTypeArguments(node); - forEach(node.typeArguments, checkSourceElement); - if (node.kind === 233 /* ExpressionWithTypeArguments */) { - const parent2 = walkUpParenthesizedExpressions(node.parent); - if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 104 /* InstanceOfKeyword */ && isNodeDescendantOf(node, parent2.right)) { - error2(node, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_not_be_an_instantiation_expression); - } - } - const exprType = node.kind === 233 /* ExpressionWithTypeArguments */ ? checkExpression(node.expression) : isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName); - return getInstantiationExpressionType(exprType, node); - } - function getInstantiationExpressionType(exprType, node) { - const typeArguments = node.typeArguments; - if (exprType === silentNeverType || isErrorType(exprType) || !some(typeArguments)) { - return exprType; - } - let hasSomeApplicableSignature = false; - let nonApplicableType; - const result = getInstantiatedType(exprType); - const errorType2 = hasSomeApplicableSignature ? nonApplicableType : exprType; - if (errorType2) { - diagnostics.add(createDiagnosticForNodeArray(getSourceFileOfNode(node), typeArguments, Diagnostics.Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable, typeToString(errorType2))); - } - return result; - function getInstantiatedType(type) { - let hasSignatures = false; - let hasApplicableSignature = false; - const result2 = getInstantiatedTypePart(type); - hasSomeApplicableSignature || (hasSomeApplicableSignature = hasApplicableSignature); - if (hasSignatures && !hasApplicableSignature) { - nonApplicableType ?? (nonApplicableType = type); - } - return result2; - function getInstantiatedTypePart(type2) { - if (type2.flags & 524288 /* Object */) { - const resolved = resolveStructuredTypeMembers(type2); - const callSignatures = getInstantiatedSignatures(resolved.callSignatures); - const constructSignatures = getInstantiatedSignatures(resolved.constructSignatures); - hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0); - hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0); - if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) { - const result3 = createAnonymousType( - /*symbol*/ - void 0, - resolved.members, - callSignatures, - constructSignatures, - resolved.indexInfos - ); - result3.objectFlags |= 8388608 /* InstantiationExpressionType */; - result3.node = node; - return result3; - } - } else if (type2.flags & 58982400 /* InstantiableNonPrimitive */) { - const constraint = getBaseConstraintOfType(type2); - if (constraint) { - const instantiated = getInstantiatedTypePart(constraint); - if (instantiated !== constraint) { - return instantiated; - } - } - } else if (type2.flags & 1048576 /* Union */) { - return mapType(type2, getInstantiatedType); - } else if (type2.flags & 2097152 /* Intersection */) { - return getIntersectionType(sameMap(type2.types, getInstantiatedTypePart)); - } - return type2; - } - } - function getInstantiatedSignatures(signatures) { - const applicableSignatures = filter(signatures, (sig) => !!sig.typeParameters && hasCorrectTypeArgumentArity(sig, typeArguments)); - return sameMap(applicableSignatures, (sig) => { - const typeArgumentTypes = checkTypeArguments( - sig, - typeArguments, - /*reportErrors*/ - true - ); - return typeArgumentTypes ? getSignatureInstantiation(sig, typeArgumentTypes, isInJSFile(sig.declaration)) : sig; - }); - } - } - function checkSatisfiesExpression(node) { - checkSourceElement(node.type); - return checkSatisfiesExpressionWorker(node.expression, node.type); - } - function checkSatisfiesExpressionWorker(expression, target, checkMode) { - const exprType = checkExpression(expression, checkMode); - const targetType = getTypeFromTypeNode(target); - if (isErrorType(targetType)) { - return targetType; - } - const errorNode = findAncestor(target.parent, (n) => n.kind === 238 /* SatisfiesExpression */ || n.kind === 357 /* JSDocSatisfiesTag */); - checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, errorNode, expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1); - return exprType; - } - function checkMetaProperty(node) { - checkGrammarMetaProperty(node); - if (node.keywordToken === 105 /* NewKeyword */) { - return checkNewTargetMetaProperty(node); - } - if (node.keywordToken === 102 /* ImportKeyword */) { - return checkImportMetaProperty(node); - } - return Debug.assertNever(node.keywordToken); - } - function checkMetaPropertyKeyword(node) { - switch (node.keywordToken) { - case 102 /* ImportKeyword */: - return getGlobalImportMetaExpressionType(); - case 105 /* NewKeyword */: - const type = checkNewTargetMetaProperty(node); - return isErrorType(type) ? errorType : createNewTargetExpressionType(type); - default: - Debug.assertNever(node.keywordToken); - } - } - function checkNewTargetMetaProperty(node) { - const container = getNewTargetContainer(node); - if (!container) { - error2(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); - return errorType; - } else if (container.kind === 176 /* Constructor */) { - const symbol = getSymbolOfDeclaration(container.parent); - return getTypeOfSymbol(symbol); - } else { - const symbol = getSymbolOfDeclaration(container); - return getTypeOfSymbol(symbol); - } - } - function checkImportMetaProperty(node) { - if (moduleKind === 100 /* Node16 */ || moduleKind === 199 /* NodeNext */) { - if (getSourceFileOfNode(node).impliedNodeFormat !== 99 /* ESNext */) { - error2(node, Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output); - } - } else if (moduleKind < 6 /* ES2020 */ && moduleKind !== 4 /* System */) { - error2(node, Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext); - } - const file = getSourceFileOfNode(node); - Debug.assert(!!(file.flags & 8388608 /* PossiblyContainsImportMeta */), "Containing file is missing import meta node flag."); - return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType; - } - function getTypeOfParameter(symbol) { - const type = getTypeOfSymbol(symbol); - if (strictNullChecks) { - const declaration = symbol.valueDeclaration; - if (declaration && hasInitializer(declaration)) { - return getOptionalType(type); - } - } - return type; - } - function getTupleElementLabel(d, index, restParameterName = "arg") { - if (!d) { - return `${restParameterName}_${index}`; - } - Debug.assert(isIdentifier(d.name)); - return d.name.escapedText; - } - function getParameterNameAtPosition(signature, pos, overrideRestType) { - const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); - if (pos < paramCount) { - return signature.parameters[pos].escapedName; - } - const restParameter = signature.parameters[paramCount] || unknownSymbol; - const restType = overrideRestType || getTypeOfSymbol(restParameter); - if (isTupleType(restType)) { - const associatedNames = restType.target.labeledElementDeclarations; - const index = pos - paramCount; - return getTupleElementLabel(associatedNames == null ? void 0 : associatedNames[index], index, restParameter.escapedName); - } - return restParameter.escapedName; - } - function getParameterIdentifierInfoAtPosition(signature, pos) { - var _a; - if (((_a = signature.declaration) == null ? void 0 : _a.kind) === 324 /* JSDocFunctionType */) { - return void 0; - } - const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); - if (pos < paramCount) { - const param = signature.parameters[pos]; - const paramIdent = getParameterDeclarationIdentifier(param); - return paramIdent ? { - parameter: paramIdent, - parameterName: param.escapedName, - isRestParameter: false - } : void 0; - } - const restParameter = signature.parameters[paramCount] || unknownSymbol; - const restIdent = getParameterDeclarationIdentifier(restParameter); - if (!restIdent) { - return void 0; - } - const restType = getTypeOfSymbol(restParameter); - if (isTupleType(restType)) { - const associatedNames = restType.target.labeledElementDeclarations; - const index = pos - paramCount; - const associatedName = associatedNames == null ? void 0 : associatedNames[index]; - const isRestTupleElement = !!(associatedName == null ? void 0 : associatedName.dotDotDotToken); - if (associatedName) { - Debug.assert(isIdentifier(associatedName.name)); - return { parameter: associatedName.name, parameterName: associatedName.name.escapedText, isRestParameter: isRestTupleElement }; - } - return void 0; - } - if (pos === paramCount) { - return { parameter: restIdent, parameterName: restParameter.escapedName, isRestParameter: true }; - } - return void 0; - } - function getParameterDeclarationIdentifier(symbol) { - return symbol.valueDeclaration && isParameter(symbol.valueDeclaration) && isIdentifier(symbol.valueDeclaration.name) && symbol.valueDeclaration.name; - } - function isValidDeclarationForTupleLabel(d) { - return d.kind === 202 /* NamedTupleMember */ || isParameter(d) && d.name && isIdentifier(d.name); - } - function getNameableDeclarationAtPosition(signature, pos) { - const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); - if (pos < paramCount) { - const decl = signature.parameters[pos].valueDeclaration; - return decl && isValidDeclarationForTupleLabel(decl) ? decl : void 0; - } - const restParameter = signature.parameters[paramCount] || unknownSymbol; - const restType = getTypeOfSymbol(restParameter); - if (isTupleType(restType)) { - const associatedNames = restType.target.labeledElementDeclarations; - const index = pos - paramCount; - return associatedNames && associatedNames[index]; - } - return restParameter.valueDeclaration && isValidDeclarationForTupleLabel(restParameter.valueDeclaration) ? restParameter.valueDeclaration : void 0; - } - function getTypeAtPosition(signature, pos) { - return tryGetTypeAtPosition(signature, pos) || anyType; - } - function tryGetTypeAtPosition(signature, pos) { - const paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); - if (pos < paramCount) { - return getTypeOfParameter(signature.parameters[pos]); - } - if (signatureHasRestParameter(signature)) { - const restType = getTypeOfSymbol(signature.parameters[paramCount]); - const index = pos - paramCount; - if (!isTupleType(restType) || restType.target.hasRestElement || index < restType.target.fixedLength) { - return getIndexedAccessType(restType, getNumberLiteralType(index)); - } - } - return void 0; - } - function getRestTypeAtPosition(source, pos) { - const parameterCount = getParameterCount(source); - const minArgumentCount = getMinArgumentCount(source); - const restType = getEffectiveRestType(source); - if (restType && pos >= parameterCount - 1) { - return pos === parameterCount - 1 ? restType : createArrayType(getIndexedAccessType(restType, numberType)); - } - const types = []; - const flags = []; - const names = []; - for (let i = pos; i < parameterCount; i++) { - if (!restType || i < parameterCount - 1) { - types.push(getTypeAtPosition(source, i)); - flags.push(i < minArgumentCount ? 1 /* Required */ : 2 /* Optional */); - } else { - types.push(restType); - flags.push(8 /* Variadic */); - } - const name = getNameableDeclarationAtPosition(source, i); - if (name) { - names.push(name); - } - } - return createTupleType( - types, - flags, - /*readonly*/ - false, - length(names) === length(types) ? names : void 0 - ); - } - function getParameterCount(signature) { - const length2 = signature.parameters.length; - if (signatureHasRestParameter(signature)) { - const restType = getTypeOfSymbol(signature.parameters[length2 - 1]); - if (isTupleType(restType)) { - return length2 + restType.target.fixedLength - (restType.target.hasRestElement ? 0 : 1); - } - } - return length2; - } - function getMinArgumentCount(signature, flags) { - const strongArityForUntypedJS = flags & 1 /* StrongArityForUntypedJS */; - const voidIsNonOptional = flags & 2 /* VoidIsNonOptional */; - if (voidIsNonOptional || signature.resolvedMinArgumentCount === void 0) { - let minArgumentCount; - if (signatureHasRestParameter(signature)) { - const restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); - if (isTupleType(restType)) { - const firstOptionalIndex = findIndex(restType.target.elementFlags, (f) => !(f & 1 /* Required */)); - const requiredCount = firstOptionalIndex < 0 ? restType.target.fixedLength : firstOptionalIndex; - if (requiredCount > 0) { - minArgumentCount = signature.parameters.length - 1 + requiredCount; - } - } - } - if (minArgumentCount === void 0) { - if (!strongArityForUntypedJS && signature.flags & 32 /* IsUntypedSignatureInJSFile */) { - return 0; - } - minArgumentCount = signature.minArgumentCount; - } - if (voidIsNonOptional) { - return minArgumentCount; - } - for (let i = minArgumentCount - 1; i >= 0; i--) { - const type = getTypeAtPosition(signature, i); - if (filterType(type, acceptsVoid).flags & 131072 /* Never */) { - break; - } - minArgumentCount = i; - } - signature.resolvedMinArgumentCount = minArgumentCount; - } - return signature.resolvedMinArgumentCount; - } - function hasEffectiveRestParameter(signature) { - if (signatureHasRestParameter(signature)) { - const restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); - return !isTupleType(restType) || restType.target.hasRestElement; - } - return false; - } - function getEffectiveRestType(signature) { - if (signatureHasRestParameter(signature)) { - const restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); - if (!isTupleType(restType)) { - return restType; - } - if (restType.target.hasRestElement) { - return sliceTupleType(restType, restType.target.fixedLength); - } - } - return void 0; - } - function getNonArrayRestType(signature) { - const restType = getEffectiveRestType(signature); - return restType && !isArrayType(restType) && !isTypeAny(restType) ? restType : void 0; - } - function getTypeOfFirstParameterOfSignature(signature) { - return getTypeOfFirstParameterOfSignatureWithFallback(signature, neverType); - } - function getTypeOfFirstParameterOfSignatureWithFallback(signature, fallbackType) { - return signature.parameters.length > 0 ? getTypeAtPosition(signature, 0) : fallbackType; - } - function inferFromAnnotatedParameters(signature, context, inferenceContext) { - const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); - for (let i = 0; i < len; i++) { - const declaration = signature.parameters[i].valueDeclaration; - if (declaration.type) { - const typeNode = getEffectiveTypeAnnotationNode(declaration); - if (typeNode) { - inferTypes(inferenceContext.inferences, getTypeFromTypeNode(typeNode), getTypeAtPosition(context, i)); - } - } - } - } - function assignContextualParameterTypes(signature, context) { - if (context.typeParameters) { - if (!signature.typeParameters) { - signature.typeParameters = context.typeParameters; - } else { - return; - } - } - if (context.thisParameter) { - const parameter = signature.thisParameter; - if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) { - if (!parameter) { - signature.thisParameter = createSymbolWithType( - context.thisParameter, - /*type*/ - void 0 - ); - } - assignParameterType(signature.thisParameter, getTypeOfSymbol(context.thisParameter)); - } - } - const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); - for (let i = 0; i < len; i++) { - const parameter = signature.parameters[i]; - if (!getEffectiveTypeAnnotationNode(parameter.valueDeclaration)) { - const contextualParameterType = tryGetTypeAtPosition(context, i); - assignParameterType(parameter, contextualParameterType); - } - } - if (signatureHasRestParameter(signature)) { - const parameter = last(signature.parameters); - if (parameter.valueDeclaration ? !getEffectiveTypeAnnotationNode(parameter.valueDeclaration) : !!(getCheckFlags(parameter) & 65536 /* DeferredType */)) { - const contextualParameterType = getRestTypeAtPosition(context, len); - assignParameterType(parameter, contextualParameterType); - } - } - } - function assignNonContextualParameterTypes(signature) { - if (signature.thisParameter) { - assignParameterType(signature.thisParameter); - } - for (const parameter of signature.parameters) { - assignParameterType(parameter); - } - } - function assignParameterType(parameter, type) { - const links = getSymbolLinks(parameter); - if (!links.type) { - const declaration = parameter.valueDeclaration; - links.type = type || (declaration ? getWidenedTypeForVariableLikeDeclaration( - declaration, - /*reportErrors*/ - true - ) : getTypeOfSymbol(parameter)); - if (declaration && declaration.name.kind !== 80 /* Identifier */) { - if (links.type === unknownType) { - links.type = getTypeFromBindingPattern(declaration.name); - } - assignBindingElementTypes(declaration.name, links.type); - } - } else if (type) { - Debug.assertEqual(links.type, type, "Parameter symbol already has a cached type which differs from newly assigned type"); - } - } - function assignBindingElementTypes(pattern, parentType) { - for (const element of pattern.elements) { - if (!isOmittedExpression(element)) { - const type = getBindingElementTypeFromParentType(element, parentType); - if (element.name.kind === 80 /* Identifier */) { - getSymbolLinks(getSymbolOfDeclaration(element)).type = type; - } else { - assignBindingElementTypes(element.name, type); - } - } - } - } - function createClassDecoratorContextType(classType) { - return tryCreateTypeReference(getGlobalClassDecoratorContextType( - /*reportErrors*/ - true - ), [classType]); - } - function createClassMethodDecoratorContextType(thisType, valueType) { - return tryCreateTypeReference(getGlobalClassMethodDecoratorContextType( - /*reportErrors*/ - true - ), [thisType, valueType]); - } - function createClassGetterDecoratorContextType(thisType, valueType) { - return tryCreateTypeReference(getGlobalClassGetterDecoratorContextType( - /*reportErrors*/ - true - ), [thisType, valueType]); - } - function createClassSetterDecoratorContextType(thisType, valueType) { - return tryCreateTypeReference(getGlobalClassSetterDecoratorContextType( - /*reportErrors*/ - true - ), [thisType, valueType]); - } - function createClassAccessorDecoratorContextType(thisType, valueType) { - return tryCreateTypeReference(getGlobalClassAccessorDecoratorContextType( - /*reportErrors*/ - true - ), [thisType, valueType]); - } - function createClassFieldDecoratorContextType(thisType, valueType) { - return tryCreateTypeReference(getGlobalClassFieldDecoratorContextType( - /*reportErrors*/ - true - ), [thisType, valueType]); - } - function getClassMemberDecoratorContextOverrideType(nameType, isPrivate, isStatic2) { - const key = `${isPrivate ? "p" : "P"}${isStatic2 ? "s" : "S"}${nameType.id}`; - let overrideType = decoratorContextOverrideTypeCache.get(key); - if (!overrideType) { - const members = createSymbolTable(); - members.set("name", createProperty("name", nameType)); - members.set("private", createProperty("private", isPrivate ? trueType : falseType)); - members.set("static", createProperty("static", isStatic2 ? trueType : falseType)); - overrideType = createAnonymousType( - /*symbol*/ - void 0, - members, - emptyArray, - emptyArray, - emptyArray - ); - decoratorContextOverrideTypeCache.set(key, overrideType); - } - return overrideType; - } - function createClassMemberDecoratorContextTypeForNode(node, thisType, valueType) { - const isStatic2 = hasStaticModifier(node); - const isPrivate = isPrivateIdentifier(node.name); - const nameType = isPrivate ? getStringLiteralType(idText(node.name)) : getLiteralTypeFromPropertyName(node.name); - const contextType = isMethodDeclaration(node) ? createClassMethodDecoratorContextType(thisType, valueType) : isGetAccessorDeclaration(node) ? createClassGetterDecoratorContextType(thisType, valueType) : isSetAccessorDeclaration(node) ? createClassSetterDecoratorContextType(thisType, valueType) : isAutoAccessorPropertyDeclaration(node) ? createClassAccessorDecoratorContextType(thisType, valueType) : isPropertyDeclaration(node) ? createClassFieldDecoratorContextType(thisType, valueType) : Debug.failBadSyntaxKind(node); - const overrideType = getClassMemberDecoratorContextOverrideType(nameType, isPrivate, isStatic2); - return getIntersectionType([contextType, overrideType]); - } - function createClassAccessorDecoratorTargetType(thisType, valueType) { - return tryCreateTypeReference(getGlobalClassAccessorDecoratorTargetType( - /*reportErrors*/ - true - ), [thisType, valueType]); - } - function createClassAccessorDecoratorResultType(thisType, valueType) { - return tryCreateTypeReference(getGlobalClassAccessorDecoratorResultType( - /*reportErrors*/ - true - ), [thisType, valueType]); - } - function createClassFieldDecoratorInitializerMutatorType(thisType, valueType) { - const thisParam = createParameter("this", thisType); - const valueParam = createParameter("value", valueType); - return createFunctionType( - /*typeParameters*/ - void 0, - thisParam, - [valueParam], - valueType, - /*typePredicate*/ - void 0, - 1 - ); - } - function createESDecoratorCallSignature(targetType, contextType, nonOptionalReturnType) { - const targetParam = createParameter("target", targetType); - const contextParam = createParameter("context", contextType); - const returnType = getUnionType([nonOptionalReturnType, voidType]); - return createCallSignature( - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - [targetParam, contextParam], - returnType - ); - } - function getESDecoratorCallSignature(decorator) { - const { parent: parent2 } = decorator; - const links = getNodeLinks(parent2); - if (!links.decoratorSignature) { - links.decoratorSignature = anySignature; - switch (parent2.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: { - const node = parent2; - const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); - const contextType = createClassDecoratorContextType(targetType); - links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, targetType); - break; - } - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { - const node = parent2; - if (!isClassLike(node.parent)) - break; - const valueType = isMethodDeclaration(node) ? getOrCreateTypeFromSignature(getSignatureFromDeclaration(node)) : getTypeOfNode(node); - const thisType = hasStaticModifier(node) ? getTypeOfSymbol(getSymbolOfDeclaration(node.parent)) : getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node.parent)); - const targetType = isGetAccessorDeclaration(node) ? createGetterFunctionType(valueType) : isSetAccessorDeclaration(node) ? createSetterFunctionType(valueType) : valueType; - const contextType = createClassMemberDecoratorContextTypeForNode(node, thisType, valueType); - const returnType = isGetAccessorDeclaration(node) ? createGetterFunctionType(valueType) : isSetAccessorDeclaration(node) ? createSetterFunctionType(valueType) : valueType; - links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); - break; - } - case 172 /* PropertyDeclaration */: { - const node = parent2; - if (!isClassLike(node.parent)) - break; - const valueType = getTypeOfNode(node); - const thisType = hasStaticModifier(node) ? getTypeOfSymbol(getSymbolOfDeclaration(node.parent)) : getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(node.parent)); - const targetType = hasAccessorModifier(node) ? createClassAccessorDecoratorTargetType(thisType, valueType) : undefinedType; - const contextType = createClassMemberDecoratorContextTypeForNode(node, thisType, valueType); - const returnType = hasAccessorModifier(node) ? createClassAccessorDecoratorResultType(thisType, valueType) : createClassFieldDecoratorInitializerMutatorType(thisType, valueType); - links.decoratorSignature = createESDecoratorCallSignature(targetType, contextType, returnType); - break; - } - } - } - return links.decoratorSignature === anySignature ? void 0 : links.decoratorSignature; - } - function getLegacyDecoratorCallSignature(decorator) { - const { parent: parent2 } = decorator; - const links = getNodeLinks(parent2); - if (!links.decoratorSignature) { - links.decoratorSignature = anySignature; - switch (parent2.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: { - const node = parent2; - const targetType = getTypeOfSymbol(getSymbolOfDeclaration(node)); - const targetParam = createParameter("target", targetType); - links.decoratorSignature = createCallSignature( - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - [targetParam], - getUnionType([targetType, voidType]) - ); - break; - } - case 169 /* Parameter */: { - const node = parent2; - if (!isConstructorDeclaration(node.parent) && !(isMethodDeclaration(node.parent) || isSetAccessorDeclaration(node.parent) && isClassLike(node.parent.parent))) { - break; - } - if (getThisParameter(node.parent) === node) { - break; - } - const index = getThisParameter(node.parent) ? node.parent.parameters.indexOf(node) - 1 : node.parent.parameters.indexOf(node); - Debug.assert(index >= 0); - const targetType = isConstructorDeclaration(node.parent) ? getTypeOfSymbol(getSymbolOfDeclaration(node.parent.parent)) : getParentTypeOfClassElement(node.parent); - const keyType = isConstructorDeclaration(node.parent) ? undefinedType : getClassElementPropertyKeyType(node.parent); - const indexType = getNumberLiteralType(index); - const targetParam = createParameter("target", targetType); - const keyParam = createParameter("propertyKey", keyType); - const indexParam = createParameter("parameterIndex", indexType); - links.decoratorSignature = createCallSignature( - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - [targetParam, keyParam, indexParam], - voidType - ); - break; - } - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 172 /* PropertyDeclaration */: { - const node = parent2; - if (!isClassLike(node.parent)) - break; - const targetType = getParentTypeOfClassElement(node); - const targetParam = createParameter("target", targetType); - const keyType = getClassElementPropertyKeyType(node); - const keyParam = createParameter("propertyKey", keyType); - const returnType = isPropertyDeclaration(node) ? voidType : createTypedPropertyDescriptorType(getTypeOfNode(node)); - const hasPropDesc = languageVersion !== 0 /* ES3 */ && (!isPropertyDeclaration(parent2) || hasAccessorModifier(parent2)); - if (hasPropDesc) { - const descriptorType = createTypedPropertyDescriptorType(getTypeOfNode(node)); - const descriptorParam = createParameter("descriptor", descriptorType); - links.decoratorSignature = createCallSignature( - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - [targetParam, keyParam, descriptorParam], - getUnionType([returnType, voidType]) - ); - } else { - links.decoratorSignature = createCallSignature( - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - [targetParam, keyParam], - getUnionType([returnType, voidType]) - ); - } - break; - } - } - } - return links.decoratorSignature === anySignature ? void 0 : links.decoratorSignature; - } - function getDecoratorCallSignature(decorator) { - return legacyDecorators ? getLegacyDecoratorCallSignature(decorator) : getESDecoratorCallSignature(decorator); - } - function createPromiseType(promisedType) { - const globalPromiseType = getGlobalPromiseType( - /*reportErrors*/ - true - ); - if (globalPromiseType !== emptyGenericType) { - promisedType = getAwaitedTypeNoAlias(unwrapAwaitedType(promisedType)) || unknownType; - return createTypeReference(globalPromiseType, [promisedType]); - } - return unknownType; - } - function createPromiseLikeType(promisedType) { - const globalPromiseLikeType = getGlobalPromiseLikeType( - /*reportErrors*/ - true - ); - if (globalPromiseLikeType !== emptyGenericType) { - promisedType = getAwaitedTypeNoAlias(unwrapAwaitedType(promisedType)) || unknownType; - return createTypeReference(globalPromiseLikeType, [promisedType]); - } - return unknownType; - } - function createPromiseReturnType(func, promisedType) { - const promiseType = createPromiseType(promisedType); - if (promiseType === unknownType) { - error2(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); - return errorType; - } else if (!getGlobalPromiseConstructorSymbol( - /*reportErrors*/ - true - )) { - error2(func, isImportCall(func) ? Diagnostics.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 : 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); - } - return promiseType; - } - function createNewTargetExpressionType(targetType) { - const symbol = createSymbol(0 /* None */, "NewTargetExpression"); - const targetPropertySymbol = createSymbol(4 /* Property */, "target", 8 /* Readonly */); - targetPropertySymbol.parent = symbol; - targetPropertySymbol.links.type = targetType; - const members = createSymbolTable([targetPropertySymbol]); - symbol.members = members; - return createAnonymousType(symbol, members, emptyArray, emptyArray, emptyArray); - } - function getReturnTypeFromBody(func, checkMode) { - if (!func.body) { - return errorType; - } - const functionFlags = getFunctionFlags(func); - const isAsync = (functionFlags & 2 /* Async */) !== 0; - const isGenerator = (functionFlags & 1 /* Generator */) !== 0; - let returnType; - let yieldType; - let nextType; - let fallbackReturnType = voidType; - if (func.body.kind !== 241 /* Block */) { - returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8 /* SkipGenericFunctions */); - if (isAsync) { - returnType = unwrapAwaitedType(checkAwaitedType( - returnType, - /*withAlias*/ - false, - /*errorNode*/ - func, - Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member - )); - } - } else if (isGenerator) { - const returnTypes = checkAndAggregateReturnExpressionTypes(func, checkMode); - if (!returnTypes) { - fallbackReturnType = neverType; - } else if (returnTypes.length > 0) { - returnType = getUnionType(returnTypes, 2 /* Subtype */); - } - const { yieldTypes, nextTypes } = checkAndAggregateYieldOperandTypes(func, checkMode); - yieldType = some(yieldTypes) ? getUnionType(yieldTypes, 2 /* Subtype */) : void 0; - nextType = some(nextTypes) ? getIntersectionType(nextTypes) : void 0; - } else { - const types = checkAndAggregateReturnExpressionTypes(func, checkMode); - if (!types) { - return functionFlags & 2 /* Async */ ? createPromiseReturnType(func, neverType) : neverType; - } - if (types.length === 0) { - const contextualReturnType = getContextualReturnType( - func, - /*contextFlags*/ - void 0 - ); - const returnType2 = contextualReturnType && (unwrapReturnType(contextualReturnType, functionFlags) || voidType).flags & 32768 /* Undefined */ ? undefinedType : voidType; - return functionFlags & 2 /* Async */ ? createPromiseReturnType(func, returnType2) : ( - // Async function - returnType2 - ); - } - returnType = getUnionType(types, 2 /* Subtype */); - } - if (returnType || yieldType || nextType) { - if (yieldType) - reportErrorsFromWidening(func, yieldType, 3 /* GeneratorYield */); - if (returnType) - reportErrorsFromWidening(func, returnType, 1 /* FunctionReturn */); - if (nextType) - reportErrorsFromWidening(func, nextType, 2 /* GeneratorNext */); - if (returnType && isUnitType(returnType) || yieldType && isUnitType(yieldType) || nextType && isUnitType(nextType)) { - const contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); - const contextualType = !contextualSignature ? void 0 : contextualSignature === getSignatureFromDeclaration(func) ? isGenerator ? void 0 : returnType : instantiateContextualType( - getReturnTypeOfSignature(contextualSignature), - func, - /*contextFlags*/ - void 0 - ); - if (isGenerator) { - yieldType = getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(yieldType, contextualType, 0 /* Yield */, isAsync); - returnType = getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(returnType, contextualType, 1 /* Return */, isAsync); - nextType = getWidenedLiteralLikeTypeForContextualIterationTypeIfNeeded(nextType, contextualType, 2 /* Next */, isAsync); - } else { - returnType = getWidenedLiteralLikeTypeForContextualReturnTypeIfNeeded(returnType, contextualType, isAsync); - } - } - if (yieldType) - yieldType = getWidenedType(yieldType); - if (returnType) - returnType = getWidenedType(returnType); - if (nextType) - nextType = getWidenedType(nextType); - } - if (isGenerator) { - return createGeneratorReturnType( - yieldType || neverType, - returnType || fallbackReturnType, - nextType || getContextualIterationType(2 /* Next */, func) || unknownType, - isAsync - ); - } else { - return isAsync ? createPromiseType(returnType || fallbackReturnType) : returnType || fallbackReturnType; - } - } - function createGeneratorReturnType(yieldType, returnType, nextType, isAsyncGenerator) { - const resolver = isAsyncGenerator ? asyncIterationTypesResolver : syncIterationTypesResolver; - const globalGeneratorType = resolver.getGlobalGeneratorType( - /*reportErrors*/ - false - ); - yieldType = resolver.resolveIterationType( - yieldType, - /*errorNode*/ - void 0 - ) || unknownType; - returnType = resolver.resolveIterationType( - returnType, - /*errorNode*/ - void 0 - ) || unknownType; - nextType = resolver.resolveIterationType( - nextType, - /*errorNode*/ - void 0 - ) || unknownType; - if (globalGeneratorType === emptyGenericType) { - const globalType = resolver.getGlobalIterableIteratorType( - /*reportErrors*/ - false - ); - const iterationTypes = globalType !== emptyGenericType ? getIterationTypesOfGlobalIterableType(globalType, resolver) : void 0; - const iterableIteratorReturnType = iterationTypes ? iterationTypes.returnType : anyType; - const iterableIteratorNextType = iterationTypes ? iterationTypes.nextType : undefinedType; - if (isTypeAssignableTo(returnType, iterableIteratorReturnType) && isTypeAssignableTo(iterableIteratorNextType, nextType)) { - if (globalType !== emptyGenericType) { - return createTypeFromGenericGlobalType(globalType, [yieldType]); - } - resolver.getGlobalIterableIteratorType( - /*reportErrors*/ - true - ); - return emptyObjectType; - } - resolver.getGlobalGeneratorType( - /*reportErrors*/ - true - ); - return emptyObjectType; - } - return createTypeFromGenericGlobalType(globalGeneratorType, [yieldType, returnType, nextType]); - } - function checkAndAggregateYieldOperandTypes(func, checkMode) { - const yieldTypes = []; - const nextTypes = []; - const isAsync = (getFunctionFlags(func) & 2 /* Async */) !== 0; - forEachYieldExpression(func.body, (yieldExpression) => { - const yieldExpressionType = yieldExpression.expression ? checkExpression(yieldExpression.expression, checkMode) : undefinedWideningType; - pushIfUnique(yieldTypes, getYieldedTypeOfYieldExpression(yieldExpression, yieldExpressionType, anyType, isAsync)); - let nextType; - if (yieldExpression.asteriskToken) { - const iterationTypes = getIterationTypesOfIterable( - yieldExpressionType, - isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, - yieldExpression.expression - ); - nextType = iterationTypes && iterationTypes.nextType; - } else { - nextType = getContextualType2( - yieldExpression, - /*contextFlags*/ - void 0 - ); - } - if (nextType) - pushIfUnique(nextTypes, nextType); - }); - return { yieldTypes, nextTypes }; - } - function getYieldedTypeOfYieldExpression(node, expressionType, sentType, isAsync) { - const errorNode = node.expression || node; - const yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, expressionType, sentType, errorNode) : expressionType; - return !isAsync ? yieldedType : getAwaitedType(yieldedType, errorNode, node.asteriskToken ? Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); - } - function getNotEqualFactsFromTypeofSwitch(start, end, witnesses) { - let facts = 0 /* None */; - for (let i = 0; i < witnesses.length; i++) { - const witness = i < start || i >= end ? witnesses[i] : void 0; - facts |= witness !== void 0 ? typeofNEFacts.get(witness) || 32768 /* TypeofNEHostObject */ : 0; - } - return facts; - } - function isExhaustiveSwitchStatement(node) { - const links = getNodeLinks(node); - if (links.isExhaustive === void 0) { - links.isExhaustive = 0; - const exhaustive = computeExhaustiveSwitchStatement(node); - if (links.isExhaustive === 0) { - links.isExhaustive = exhaustive; - } - } else if (links.isExhaustive === 0) { - links.isExhaustive = false; - } - return links.isExhaustive; - } - function computeExhaustiveSwitchStatement(node) { - if (node.expression.kind === 221 /* TypeOfExpression */) { - const witnesses = getSwitchClauseTypeOfWitnesses(node); - if (!witnesses) { - return false; - } - const operandConstraint = getBaseConstraintOrType(checkExpressionCached(node.expression.expression)); - const notEqualFacts = getNotEqualFactsFromTypeofSwitch(0, 0, witnesses); - if (operandConstraint.flags & 3 /* AnyOrUnknown */) { - return (556800 /* AllTypeofNE */ & notEqualFacts) === 556800 /* AllTypeofNE */; - } - return !someType(operandConstraint, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts); - } - const type = checkExpressionCached(node.expression); - if (!isLiteralType(type)) { - return false; - } - const switchTypes = getSwitchClauseTypes(node); - if (!switchTypes.length || some(switchTypes, isNeitherUnitTypeNorNever)) { - return false; - } - return eachTypeContainedIn(mapType(type, getRegularTypeOfLiteralType), switchTypes); - } - function functionHasImplicitReturn(func) { - return func.endFlowNode && isReachableFlowNode(func.endFlowNode); - } - function checkAndAggregateReturnExpressionTypes(func, checkMode) { - const functionFlags = getFunctionFlags(func); - const aggregatedTypes = []; - let hasReturnWithNoExpression = functionHasImplicitReturn(func); - let hasReturnOfTypeNever = false; - forEachReturnStatement(func.body, (returnStatement) => { - const expr = returnStatement.expression; - if (expr) { - if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { - hasReturnOfTypeNever = true; - return; - } - let type = checkExpressionCached(expr, checkMode && checkMode & ~8 /* SkipGenericFunctions */); - if (functionFlags & 2 /* Async */) { - type = unwrapAwaitedType(checkAwaitedType( - type, - /*withAlias*/ - false, - func, - Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member - )); - } - if (type.flags & 131072 /* Never */) { - hasReturnOfTypeNever = true; - } - pushIfUnique(aggregatedTypes, type); - } else { - hasReturnWithNoExpression = true; - } - }); - if (aggregatedTypes.length === 0 && !hasReturnWithNoExpression && (hasReturnOfTypeNever || mayReturnNever(func))) { - return void 0; - } - if (strictNullChecks && aggregatedTypes.length && hasReturnWithNoExpression && !(isJSConstructor(func) && aggregatedTypes.some((t) => t.symbol === func.symbol))) { - pushIfUnique(aggregatedTypes, undefinedType); - } - return aggregatedTypes; - } - function mayReturnNever(func) { - switch (func.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return true; - case 174 /* MethodDeclaration */: - return func.parent.kind === 210 /* ObjectLiteralExpression */; - default: - return false; - } - } - function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) { - addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics); - return; - function checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics() { - const functionFlags = getFunctionFlags(func); - const type = returnType && unwrapReturnType(returnType, functionFlags); - if (type && (maybeTypeOfKind(type, 16384 /* Void */) || type.flags & (1 /* Any */ | 32768 /* Undefined */))) { - return; - } - if (func.kind === 173 /* MethodSignature */ || nodeIsMissing(func.body) || func.body.kind !== 241 /* Block */ || !functionHasImplicitReturn(func)) { - return; - } - const hasExplicitReturn = func.flags & 1024 /* HasExplicitReturn */; - const errorNode = getEffectiveReturnTypeNode(func) || func; - if (type && type.flags & 131072 /* Never */) { - error2(errorNode, Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point); - } else if (type && !hasExplicitReturn) { - error2(errorNode, Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value); - } else if (type && strictNullChecks && !isTypeAssignableTo(undefinedType, type)) { - error2(errorNode, Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined); - } else if (compilerOptions.noImplicitReturns) { - if (!type) { - if (!hasExplicitReturn) { - return; - } - const inferredReturnType = getReturnTypeOfSignature(getSignatureFromDeclaration(func)); - if (isUnwrappedReturnTypeUndefinedVoidOrAny(func, inferredReturnType)) { - return; - } - } - error2(errorNode, Diagnostics.Not_all_code_paths_return_a_value); - } - } - } - function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); - checkNodeDeferred(node); - if (isFunctionExpression(node)) { - checkCollisionsForDeclarationName(node, node.name); - } - if (checkMode && checkMode & 4 /* SkipContextSensitive */ && isContextSensitive(node)) { - if (!getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) { - const contextualSignature = getContextualSignature(node); - if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) { - const links = getNodeLinks(node); - if (links.contextFreeType) { - return links.contextFreeType; - } - const returnType = getReturnTypeFromBody(node, checkMode); - const returnOnlySignature = createSignature( - /*declaration*/ - void 0, - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - emptyArray, - returnType, - /*resolvedTypePredicate*/ - void 0, - 0, - 64 /* IsNonInferrable */ - ); - const returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], emptyArray, emptyArray); - returnOnlyType.objectFlags |= 262144 /* NonInferrableType */; - return links.contextFreeType = returnOnlyType; - } - } - return anyFunctionType; - } - const hasGrammarError = checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 218 /* FunctionExpression */) { - checkGrammarForGenerator(node); - } - contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode); - return getTypeOfSymbol(getSymbolOfDeclaration(node)); - } - function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode) { - const links = getNodeLinks(node); - if (!(links.flags & 64 /* ContextChecked */)) { - const contextualSignature = getContextualSignature(node); - if (!(links.flags & 64 /* ContextChecked */)) { - links.flags |= 64 /* ContextChecked */; - const signature = firstOrUndefined(getSignaturesOfType(getTypeOfSymbol(getSymbolOfDeclaration(node)), 0 /* Call */)); - if (!signature) { - return; - } - if (isContextSensitive(node)) { - if (contextualSignature) { - const inferenceContext = getInferenceContext(node); - let instantiatedContextualSignature; - if (checkMode && checkMode & 2 /* Inferential */) { - inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); - const restType = getEffectiveRestType(contextualSignature); - if (restType && restType.flags & 262144 /* TypeParameter */) { - instantiatedContextualSignature = instantiateSignature(contextualSignature, inferenceContext.nonFixingMapper); - } - } - instantiatedContextualSignature || (instantiatedContextualSignature = inferenceContext ? instantiateSignature(contextualSignature, inferenceContext.mapper) : contextualSignature); - assignContextualParameterTypes(signature, instantiatedContextualSignature); - } else { - assignNonContextualParameterTypes(signature); - } - } else if (contextualSignature && !node.typeParameters && contextualSignature.parameters.length > node.parameters.length) { - const inferenceContext = getInferenceContext(node); - if (checkMode && checkMode & 2 /* Inferential */) { - inferFromAnnotatedParameters(signature, contextualSignature, inferenceContext); - } - } - if (contextualSignature && !getReturnTypeFromAnnotation(node) && !signature.resolvedReturnType) { - const returnType = getReturnTypeFromBody(node, checkMode); - if (!signature.resolvedReturnType) { - signature.resolvedReturnType = returnType; - } - } - checkSignatureDeclaration(node); - } - } - } - function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) { - Debug.assert(node.kind !== 174 /* MethodDeclaration */ || isObjectLiteralMethod(node)); - const functionFlags = getFunctionFlags(node); - const returnType = getReturnTypeFromAnnotation(node); - checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); - if (node.body) { - if (!getEffectiveReturnTypeNode(node)) { - getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - } - if (node.body.kind === 241 /* Block */) { - checkSourceElement(node.body); - } else { - const exprType = checkExpression(node.body); - const returnOrPromisedType = returnType && unwrapReturnType(returnType, functionFlags); - if (returnOrPromisedType) { - if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */) { - const awaitedType = checkAwaitedType( - exprType, - /*withAlias*/ - false, - node.body, - Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member - ); - checkTypeAssignableToAndOptionallyElaborate(awaitedType, returnOrPromisedType, node.body, node.body); - } else { - checkTypeAssignableToAndOptionallyElaborate(exprType, returnOrPromisedType, node.body, node.body); - } - } - } - } - } - function checkArithmeticOperandType(operand, type, diagnostic, isAwaitValid = false) { - if (!isTypeAssignableTo(type, numberOrBigIntType)) { - const awaitedType = isAwaitValid && getAwaitedTypeOfPromise(type); - errorAndMaybeSuggestAwait( - operand, - !!awaitedType && isTypeAssignableTo(awaitedType, numberOrBigIntType), - diagnostic - ); - return false; - } - return true; - } - function isReadonlyAssignmentDeclaration(d) { - if (!isCallExpression(d)) { - return false; - } - if (!isBindableObjectDefinePropertyCall(d)) { - return false; - } - const objectLitType = checkExpressionCached(d.arguments[2]); - const valueType = getTypeOfPropertyOfType(objectLitType, "value"); - if (valueType) { - const writableProp = getPropertyOfType(objectLitType, "writable"); - const writableType = writableProp && getTypeOfSymbol(writableProp); - if (!writableType || writableType === falseType || writableType === regularFalseType) { - return true; - } - if (writableProp && writableProp.valueDeclaration && isPropertyAssignment(writableProp.valueDeclaration)) { - const initializer = writableProp.valueDeclaration.initializer; - const rawOriginalType = checkExpression(initializer); - if (rawOriginalType === falseType || rawOriginalType === regularFalseType) { - return true; - } - } - return false; - } - const setProp = getPropertyOfType(objectLitType, "set"); - return !setProp; - } - function isReadonlySymbol(symbol) { - return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); - } - function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) { - var _a, _b; - if (assignmentKind === 0 /* None */) { - return false; - } - if (isReadonlySymbol(symbol)) { - if (symbol.flags & 4 /* Property */ && isAccessExpression(expr) && expr.expression.kind === 110 /* ThisKeyword */) { - const ctor = getContainingFunction(expr); - if (!(ctor && (ctor.kind === 176 /* Constructor */ || isJSConstructor(ctor)))) { - return true; - } - if (symbol.valueDeclaration) { - const isAssignmentDeclaration2 = isBinaryExpression(symbol.valueDeclaration); - const isLocalPropertyDeclaration = ctor.parent === symbol.valueDeclaration.parent; - const isLocalParameterProperty = ctor === symbol.valueDeclaration.parent; - const isLocalThisPropertyAssignment = isAssignmentDeclaration2 && ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) === ctor.parent; - const isLocalThisPropertyAssignmentConstructorFunction = isAssignmentDeclaration2 && ((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) === ctor; - const isWriteableSymbol = isLocalPropertyDeclaration || isLocalParameterProperty || isLocalThisPropertyAssignment || isLocalThisPropertyAssignmentConstructorFunction; - return !isWriteableSymbol; - } - } - return true; - } - if (isAccessExpression(expr)) { - const node = skipParentheses(expr.expression); - if (node.kind === 80 /* Identifier */) { - const symbol2 = getNodeLinks(node).resolvedSymbol; - if (symbol2.flags & 2097152 /* Alias */) { - const declaration = getDeclarationOfAliasSymbol(symbol2); - return !!declaration && declaration.kind === 274 /* NamespaceImport */; - } - } - } - return false; - } - function checkReferenceExpression(expr, invalidReferenceMessage, invalidOptionalChainMessage) { - const node = skipOuterExpressions(expr, 6 /* Assertions */ | 1 /* Parentheses */); - if (node.kind !== 80 /* Identifier */ && !isAccessExpression(node)) { - error2(expr, invalidReferenceMessage); - return false; - } - if (node.flags & 64 /* OptionalChain */) { - error2(expr, invalidOptionalChainMessage); - return false; - } - return true; - } - function checkDeleteExpression(node) { - checkExpression(node.expression); - const expr = skipParentheses(node.expression); - if (!isAccessExpression(expr)) { - error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference); - return booleanType; - } - if (isPropertyAccessExpression(expr) && isPrivateIdentifier(expr.name)) { - error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier); - } - const links = getNodeLinks(expr); - const symbol = getExportSymbolOfValueSymbolIfExported(links.resolvedSymbol); - if (symbol) { - if (isReadonlySymbol(symbol)) { - error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); - } - checkDeleteExpressionMustBeOptional(expr, symbol); - } - return booleanType; - } - function checkDeleteExpressionMustBeOptional(expr, symbol) { - const type = getTypeOfSymbol(symbol); - if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : getTypeFacts(type) & 16777216 /* IsUndefined */)) { - error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); - } - } - function checkTypeOfExpression(node) { - checkExpression(node.expression); - return typeofType; - } - function checkVoidExpression(node) { - checkExpression(node.expression); - return undefinedWideningType; - } - function checkAwaitGrammar(node) { - let hasError = false; - const container = getContainingFunctionOrClassStaticBlock(node); - if (container && isClassStaticBlockDeclaration(container)) { - const message = isAwaitExpression(node) ? Diagnostics.await_expression_cannot_be_used_inside_a_class_static_block : Diagnostics.await_using_statements_cannot_be_used_inside_a_class_static_block; - error2(node, message); - hasError = true; - } else if (!(node.flags & 65536 /* AwaitContext */)) { - if (isInTopLevelContext(node)) { - const sourceFile = getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - let span; - if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { - span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - const message = isAwaitExpression(node) ? 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 : Diagnostics.await_using_statements_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; - const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); - diagnostics.add(diagnostic); - hasError = true; - } - switch (moduleKind) { - case 100 /* Node16 */: - case 199 /* NodeNext */: - if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) { - span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - diagnostics.add( - createFileDiagnostic(sourceFile, span.start, span.length, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) - ); - hasError = true; - break; - } - case 7 /* ES2022 */: - case 99 /* ESNext */: - case 4 /* System */: - if (languageVersion >= 4 /* ES2017 */) { - break; - } - default: - span ?? (span = getSpanOfTokenAtPosition(sourceFile, node.pos)); - const message = isAwaitExpression(node) ? Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher : Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher; - diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message)); - hasError = true; - break; - } - } - } else { - const sourceFile = getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - const span = getSpanOfTokenAtPosition(sourceFile, node.pos); - const message = isAwaitExpression(node) ? Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules : Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules; - const diagnostic = createFileDiagnostic(sourceFile, span.start, span.length, message); - if (container && container.kind !== 176 /* Constructor */ && (getFunctionFlags(container) & 2 /* Async */) === 0) { - const relatedInfo = createDiagnosticForNode(container, Diagnostics.Did_you_mean_to_mark_this_function_as_async); - addRelatedInfo(diagnostic, relatedInfo); - } - diagnostics.add(diagnostic); - hasError = true; - } - } - } - if (isAwaitExpression(node) && isInParameterInitializerBeforeContainingFunction(node)) { - error2(node, Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer); - hasError = true; - } - return hasError; - } - function checkAwaitExpression(node) { - addLazyDiagnostic(() => checkAwaitGrammar(node)); - const operandType = checkExpression(node.expression); - const awaitedType = checkAwaitedType( - operandType, - /*withAlias*/ - true, - node, - Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member - ); - if (awaitedType === operandType && !isErrorType(awaitedType) && !(operandType.flags & 3 /* AnyOrUnknown */)) { - addErrorOrSuggestion( - /*isError*/ - false, - createDiagnosticForNode(node, Diagnostics.await_has_no_effect_on_the_type_of_this_expression) - ); - } - return awaitedType; - } - function checkPrefixUnaryExpression(node) { - const operandType = checkExpression(node.operand); - if (operandType === silentNeverType) { - return silentNeverType; - } - switch (node.operand.kind) { - case 9 /* NumericLiteral */: - switch (node.operator) { - case 41 /* MinusToken */: - return getFreshTypeOfLiteralType(getNumberLiteralType(-node.operand.text)); - case 40 /* PlusToken */: - return getFreshTypeOfLiteralType(getNumberLiteralType(+node.operand.text)); - } - break; - case 10 /* BigIntLiteral */: - if (node.operator === 41 /* MinusToken */) { - return getFreshTypeOfLiteralType(getBigIntLiteralType({ - negative: true, - base10Value: parsePseudoBigInt(node.operand.text) - })); - } - } - switch (node.operator) { - case 40 /* PlusToken */: - case 41 /* MinusToken */: - case 55 /* TildeToken */: - checkNonNullType(operandType, node.operand); - if (maybeTypeOfKindConsideringBaseConstraint(operandType, 12288 /* ESSymbolLike */)) { - error2(node.operand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(node.operator)); - } - if (node.operator === 40 /* PlusToken */) { - if (maybeTypeOfKindConsideringBaseConstraint(operandType, 2112 /* BigIntLike */)) { - error2(node.operand, Diagnostics.Operator_0_cannot_be_applied_to_type_1, tokenToString(node.operator), typeToString(getBaseTypeOfLiteralType(operandType))); - } - return numberType; - } - return getUnaryResultType(operandType); - case 54 /* ExclamationToken */: - checkTruthinessOfType(operandType, node.operand); - const facts = getTypeFacts(operandType) & (4194304 /* Truthy */ | 8388608 /* Falsy */); - return facts === 4194304 /* Truthy */ ? falseType : facts === 8388608 /* Falsy */ ? trueType : booleanType; - case 46 /* PlusPlusToken */: - case 47 /* MinusMinusToken */: - const ok = checkArithmeticOperandType( - node.operand, - checkNonNullType(operandType, node.operand), - Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type - ); - if (ok) { - checkReferenceExpression( - node.operand, - Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access, - Diagnostics.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access - ); - } - return getUnaryResultType(operandType); - } - return errorType; - } - function checkPostfixUnaryExpression(node) { - const operandType = checkExpression(node.operand); - if (operandType === silentNeverType) { - return silentNeverType; - } - const ok = checkArithmeticOperandType( - node.operand, - checkNonNullType(operandType, node.operand), - Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type - ); - if (ok) { - checkReferenceExpression( - node.operand, - Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access, - Diagnostics.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access - ); - } - return getUnaryResultType(operandType); - } - function getUnaryResultType(operandType) { - if (maybeTypeOfKind(operandType, 2112 /* BigIntLike */)) { - return isTypeAssignableToKind(operandType, 3 /* AnyOrUnknown */) || maybeTypeOfKind(operandType, 296 /* NumberLike */) ? numberOrBigIntType : bigintType; - } - return numberType; - } - function maybeTypeOfKindConsideringBaseConstraint(type, kind) { - if (maybeTypeOfKind(type, kind)) { - return true; - } - const baseConstraint = getBaseConstraintOrType(type); - return !!baseConstraint && maybeTypeOfKind(baseConstraint, kind); - } - function maybeTypeOfKind(type, kind) { - if (type.flags & kind) { - return true; - } - if (type.flags & 3145728 /* UnionOrIntersection */) { - const types = type.types; - for (const t of types) { - if (maybeTypeOfKind(t, kind)) { - return true; - } - } - } - return false; - } - function isTypeAssignableToKind(source, kind, strict) { - if (source.flags & kind) { - return true; - } - if (strict && source.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 32768 /* Undefined */ | 65536 /* Null */)) { - return false; - } - return !!(kind & 296 /* NumberLike */) && isTypeAssignableTo(source, numberType) || !!(kind & 2112 /* BigIntLike */) && isTypeAssignableTo(source, bigintType) || !!(kind & 402653316 /* StringLike */) && isTypeAssignableTo(source, stringType) || !!(kind & 528 /* BooleanLike */) && isTypeAssignableTo(source, booleanType) || !!(kind & 16384 /* Void */) && isTypeAssignableTo(source, voidType) || !!(kind & 131072 /* Never */) && isTypeAssignableTo(source, neverType) || !!(kind & 65536 /* Null */) && isTypeAssignableTo(source, nullType) || !!(kind & 32768 /* Undefined */) && isTypeAssignableTo(source, undefinedType) || !!(kind & 4096 /* ESSymbol */) && isTypeAssignableTo(source, esSymbolType) || !!(kind & 67108864 /* NonPrimitive */) && isTypeAssignableTo(source, nonPrimitiveType); - } - function allTypesAssignableToKind(source, kind, strict) { - return source.flags & 1048576 /* Union */ ? every(source.types, (subType) => allTypesAssignableToKind(subType, kind, strict)) : isTypeAssignableToKind(source, kind, strict); - } - function isConstEnumObjectType(type) { - return !!(getObjectFlags(type) & 16 /* Anonymous */) && !!type.symbol && isConstEnumSymbol(type.symbol); - } - function isConstEnumSymbol(symbol) { - return (symbol.flags & 128 /* ConstEnum */) !== 0; - } - function checkInstanceOfExpression(left, right, leftType, rightType) { - if (leftType === silentNeverType || rightType === silentNeverType) { - return silentNeverType; - } - if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { - error2(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); - } - if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error2(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); - } - return booleanType; - } - function hasEmptyObjectIntersection(type) { - return someType(type, (t) => t === unknownEmptyObjectType || !!(t.flags & 2097152 /* Intersection */) && isEmptyAnonymousObjectType(getBaseConstraintOrType(t))); - } - function checkInExpression(left, right, leftType, rightType) { - if (leftType === silentNeverType || rightType === silentNeverType) { - return silentNeverType; - } - if (isPrivateIdentifier(left)) { - if (languageVersion < 99 /* ESNext */) { - checkExternalEmitHelpers(left, 2097152 /* ClassPrivateFieldIn */); - } - if (!getNodeLinks(left).resolvedSymbol && getContainingClass(left)) { - const isUncheckedJS = isUncheckedJSSuggestion( - left, - rightType.symbol, - /*excludeClasses*/ - true - ); - reportNonexistentProperty(left, rightType, isUncheckedJS); - } - } else { - checkTypeAssignableTo(checkNonNullType(leftType, left), stringNumberSymbolType, left); - } - if (checkTypeAssignableTo(checkNonNullType(rightType, right), nonPrimitiveType, right)) { - if (hasEmptyObjectIntersection(rightType)) { - error2(right, Diagnostics.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, typeToString(rightType)); - } - } - return booleanType; - } - function checkObjectLiteralAssignment(node, sourceType, rightIsThis) { - const properties = node.properties; - if (strictNullChecks && properties.length === 0) { - return checkNonNullType(sourceType, node); - } - for (let i = 0; i < properties.length; i++) { - checkObjectLiteralDestructuringPropertyAssignment(node, sourceType, i, properties, rightIsThis); - } - return sourceType; - } - function checkObjectLiteralDestructuringPropertyAssignment(node, objectLiteralType, propertyIndex, allProperties, rightIsThis = false) { - const properties = node.properties; - const property = properties[propertyIndex]; - if (property.kind === 303 /* PropertyAssignment */ || property.kind === 304 /* ShorthandPropertyAssignment */) { - const name = property.name; - const exprType = getLiteralTypeFromPropertyName(name); - if (isTypeUsableAsPropertyName(exprType)) { - const text = getPropertyNameFromType(exprType); - const prop = getPropertyOfType(objectLiteralType, text); - if (prop) { - markPropertyAsReferenced(prop, property, rightIsThis); - checkPropertyAccessibility( - property, - /*isSuper*/ - false, - /*writing*/ - true, - objectLiteralType, - prop - ); - } - } - const elementType = getIndexedAccessType(objectLiteralType, exprType, 32 /* ExpressionPosition */, name); - const type = getFlowTypeOfDestructuring(property, elementType); - return checkDestructuringAssignment(property.kind === 304 /* ShorthandPropertyAssignment */ ? property : property.initializer, type); - } else if (property.kind === 305 /* SpreadAssignment */) { - if (propertyIndex < properties.length - 1) { - error2(property, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); - } else { - if (languageVersion < 99 /* ESNext */) { - checkExternalEmitHelpers(property, 4 /* Rest */); - } - const nonRestNames = []; - if (allProperties) { - for (const otherProperty of allProperties) { - if (!isSpreadAssignment(otherProperty)) { - nonRestNames.push(otherProperty.name); - } - } - } - const type = getRestType(objectLiteralType, nonRestNames, objectLiteralType.symbol); - checkGrammarForDisallowedTrailingComma(allProperties, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); - return checkDestructuringAssignment(property.expression, type); - } - } else { - error2(property, Diagnostics.Property_assignment_expected); - } - } - function checkArrayLiteralAssignment(node, sourceType, checkMode) { - const elements = node.elements; - if (languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { - checkExternalEmitHelpers(node, 512 /* Read */); - } - const possiblyOutOfBoundsType = checkIteratedTypeOrElementType(65 /* Destructuring */ | 128 /* PossiblyOutOfBounds */, sourceType, undefinedType, node) || errorType; - let inBoundsType = compilerOptions.noUncheckedIndexedAccess ? void 0 : possiblyOutOfBoundsType; - for (let i = 0; i < elements.length; i++) { - let type = possiblyOutOfBoundsType; - if (node.elements[i].kind === 230 /* SpreadElement */) { - type = inBoundsType = inBoundsType ?? (checkIteratedTypeOrElementType(65 /* Destructuring */, sourceType, undefinedType, node) || errorType); - } - checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); - } - return sourceType; - } - function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) { - const elements = node.elements; - const element = elements[elementIndex]; - if (element.kind !== 232 /* OmittedExpression */) { - if (element.kind !== 230 /* SpreadElement */) { - const indexType = getNumberLiteralType(elementIndex); - if (isArrayLikeType(sourceType)) { - const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(element) ? 16 /* NoTupleBoundsCheck */ : 0); - const elementType2 = getIndexedAccessTypeOrUndefined(sourceType, indexType, accessFlags, createSyntheticExpression(element, indexType)) || errorType; - const assignedType = hasDefaultValue(element) ? getTypeWithFacts(elementType2, 524288 /* NEUndefined */) : elementType2; - const type = getFlowTypeOfDestructuring(element, assignedType); - return checkDestructuringAssignment(element, type, checkMode); - } - return checkDestructuringAssignment(element, elementType, checkMode); - } - if (elementIndex < elements.length - 1) { - error2(element, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); - } else { - const restExpression = element.expression; - if (restExpression.kind === 226 /* BinaryExpression */ && restExpression.operatorToken.kind === 64 /* EqualsToken */) { - error2(restExpression.operatorToken, Diagnostics.A_rest_element_cannot_have_an_initializer); - } else { - checkGrammarForDisallowedTrailingComma(node.elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); - const type = everyType(sourceType, isTupleType) ? mapType(sourceType, (t) => sliceTupleType(t, elementIndex)) : createArrayType(elementType); - return checkDestructuringAssignment(restExpression, type, checkMode); - } - } - } - return void 0; - } - function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) { - let target; - if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) { - const prop = exprOrAssignment; - if (prop.objectAssignmentInitializer) { - if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { - sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); - } - checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode); - } - target = exprOrAssignment.name; - } else { - target = exprOrAssignment; - } - if (target.kind === 226 /* BinaryExpression */ && target.operatorToken.kind === 64 /* EqualsToken */) { - checkBinaryExpression(target, checkMode); - target = target.left; - if (strictNullChecks) { - sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); - } - } - if (target.kind === 210 /* ObjectLiteralExpression */) { - return checkObjectLiteralAssignment(target, sourceType, rightIsThis); - } - if (target.kind === 209 /* ArrayLiteralExpression */) { - return checkArrayLiteralAssignment(target, sourceType, checkMode); - } - return checkReferenceAssignment(target, sourceType, checkMode); - } - function checkReferenceAssignment(target, sourceType, checkMode) { - const targetType = checkExpression(target, checkMode); - const error3 = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access; - const optionalError = target.parent.kind === 305 /* SpreadAssignment */ ? Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access : Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access; - if (checkReferenceExpression(target, error3, optionalError)) { - checkTypeAssignableToAndOptionallyElaborate(sourceType, targetType, target, target); - } - if (isPrivateIdentifierPropertyAccessExpression(target)) { - checkExternalEmitHelpers(target.parent, 1048576 /* ClassPrivateFieldSet */); - } - return sourceType; - } - function isSideEffectFree(node) { - node = skipParentheses(node); - switch (node.kind) { - case 80 /* Identifier */: - case 11 /* StringLiteral */: - case 14 /* RegularExpressionLiteral */: - case 215 /* TaggedTemplateExpression */: - case 228 /* TemplateExpression */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 106 /* NullKeyword */: - case 157 /* UndefinedKeyword */: - case 218 /* FunctionExpression */: - case 231 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 221 /* TypeOfExpression */: - case 235 /* NonNullExpression */: - case 285 /* JsxSelfClosingElement */: - case 284 /* JsxElement */: - return true; - case 227 /* ConditionalExpression */: - return isSideEffectFree(node.whenTrue) && isSideEffectFree(node.whenFalse); - case 226 /* BinaryExpression */: - if (isAssignmentOperator(node.operatorToken.kind)) { - return false; - } - return isSideEffectFree(node.left) && isSideEffectFree(node.right); - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - switch (node.operator) { - case 54 /* ExclamationToken */: - case 40 /* PlusToken */: - case 41 /* MinusToken */: - case 55 /* TildeToken */: - return true; - } - return false; - case 222 /* VoidExpression */: - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - default: - return false; - } - } - function isTypeEqualityComparableTo(source, target) { - return (target.flags & 98304 /* Nullable */) !== 0 || isTypeComparableTo(source, target); - } - function createCheckBinaryExpression() { - const trampoline = createBinaryExpressionTrampoline(onEnter, onLeft, onOperator, onRight, onExit, foldState); - return (node, checkMode) => { - const result = trampoline(node, checkMode); - Debug.assertIsDefined(result); - return result; - }; - function onEnter(node, state, checkMode) { - if (state) { - state.stackIndex++; - state.skip = false; - setLeftType( - state, - /*type*/ - void 0 - ); - setLastResult( - state, - /*type*/ - void 0 - ); - } else { - state = { - checkMode, - skip: false, - stackIndex: 0, - typeStack: [void 0, void 0] - }; - } - if (isInJSFile(node) && getAssignedExpandoInitializer(node)) { - state.skip = true; - setLastResult(state, checkExpression(node.right, checkMode)); - return state; - } - checkGrammarNullishCoalesceWithLogicalExpression(node); - const operator = node.operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (node.left.kind === 210 /* ObjectLiteralExpression */ || node.left.kind === 209 /* ArrayLiteralExpression */)) { - state.skip = true; - setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 110 /* ThisKeyword */)); - return state; - } - return state; - } - function onLeft(left, state, _node) { - if (!state.skip) { - return maybeCheckExpression(state, left); - } - } - function onOperator(operatorToken, state, node) { - if (!state.skip) { - const leftType = getLastResult(state); - Debug.assertIsDefined(leftType); - setLeftType(state, leftType); - setLastResult( - state, - /*type*/ - void 0 - ); - const operator = operatorToken.kind; - if (isLogicalOrCoalescingBinaryOperator(operator)) { - let parent2 = node.parent; - while (parent2.kind === 217 /* ParenthesizedExpression */ || isLogicalOrCoalescingBinaryExpression(parent2)) { - parent2 = parent2.parent; - } - if (operator === 56 /* AmpersandAmpersandToken */ || isIfStatement(parent2)) { - checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, isIfStatement(parent2) ? parent2.thenStatement : void 0); - } - checkTruthinessOfType(leftType, node.left); - } - } - } - function onRight(right, state, _node) { - if (!state.skip) { - return maybeCheckExpression(state, right); - } - } - function onExit(node, state) { - let result; - if (state.skip) { - result = getLastResult(state); - } else { - const leftType = getLeftType(state); - Debug.assertIsDefined(leftType); - const rightType = getLastResult(state); - Debug.assertIsDefined(rightType); - result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, state.checkMode, node); - } - state.skip = false; - setLeftType( - state, - /*type*/ - void 0 - ); - setLastResult( - state, - /*type*/ - void 0 - ); - state.stackIndex--; - return result; - } - function foldState(state, result, _side) { - setLastResult(state, result); - return state; - } - function maybeCheckExpression(state, node) { - if (isBinaryExpression(node)) { - return node; - } - setLastResult(state, checkExpression(node, state.checkMode)); - } - function getLeftType(state) { - return state.typeStack[state.stackIndex]; - } - function setLeftType(state, type) { - state.typeStack[state.stackIndex] = type; - } - function getLastResult(state) { - return state.typeStack[state.stackIndex + 1]; - } - function setLastResult(state, type) { - state.typeStack[state.stackIndex + 1] = type; - } - } - function checkGrammarNullishCoalesceWithLogicalExpression(node) { - const { left, operatorToken, right } = node; - if (operatorToken.kind === 61 /* QuestionQuestionToken */) { - if (isBinaryExpression(left) && (left.operatorToken.kind === 57 /* BarBarToken */ || left.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) { - grammarErrorOnNode(left, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(left.operatorToken.kind), tokenToString(operatorToken.kind)); - } - if (isBinaryExpression(right) && (right.operatorToken.kind === 57 /* BarBarToken */ || right.operatorToken.kind === 56 /* AmpersandAmpersandToken */)) { - grammarErrorOnNode(right, Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses, tokenToString(right.operatorToken.kind), tokenToString(operatorToken.kind)); - } - } - } - function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) { - const operator = operatorToken.kind; - if (operator === 64 /* EqualsToken */ && (left.kind === 210 /* ObjectLiteralExpression */ || left.kind === 209 /* ArrayLiteralExpression */)) { - return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 110 /* ThisKeyword */); - } - let leftType; - if (isLogicalOrCoalescingBinaryOperator(operator)) { - leftType = checkTruthinessExpression(left, checkMode); - } else { - leftType = checkExpression(left, checkMode); - } - const rightType = checkExpression(right, checkMode); - return checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode); - } - function checkBinaryLikeExpressionWorker(left, operatorToken, right, leftType, rightType, checkMode, errorNode) { - const operator = operatorToken.kind; - switch (operator) { - case 42 /* AsteriskToken */: - case 43 /* AsteriskAsteriskToken */: - case 67 /* AsteriskEqualsToken */: - case 68 /* AsteriskAsteriskEqualsToken */: - case 44 /* SlashToken */: - case 69 /* SlashEqualsToken */: - case 45 /* PercentToken */: - case 70 /* PercentEqualsToken */: - case 41 /* MinusToken */: - case 66 /* MinusEqualsToken */: - case 48 /* LessThanLessThanToken */: - case 71 /* LessThanLessThanEqualsToken */: - case 49 /* GreaterThanGreaterThanToken */: - case 72 /* GreaterThanGreaterThanEqualsToken */: - case 50 /* GreaterThanGreaterThanGreaterThanToken */: - case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 52 /* BarToken */: - case 75 /* BarEqualsToken */: - case 53 /* CaretToken */: - case 79 /* CaretEqualsToken */: - case 51 /* AmpersandToken */: - case 74 /* AmpersandEqualsToken */: - if (leftType === silentNeverType || rightType === silentNeverType) { - return silentNeverType; - } - leftType = checkNonNullType(leftType, left); - rightType = checkNonNullType(rightType, right); - let suggestedOperator; - if (leftType.flags & 528 /* BooleanLike */ && rightType.flags & 528 /* BooleanLike */ && (suggestedOperator = getSuggestedBooleanOperator(operatorToken.kind)) !== void 0) { - error2(errorNode || operatorToken, Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, tokenToString(operatorToken.kind), tokenToString(suggestedOperator)); - return numberType; - } else { - const leftOk = checkArithmeticOperandType( - left, - leftType, - Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, - /*isAwaitValid*/ - true - ); - const rightOk = checkArithmeticOperandType( - right, - rightType, - Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, - /*isAwaitValid*/ - true - ); - let resultType2; - if (isTypeAssignableToKind(leftType, 3 /* AnyOrUnknown */) && isTypeAssignableToKind(rightType, 3 /* AnyOrUnknown */) || // Or, if neither could be bigint, implicit coercion results in a number result - !(maybeTypeOfKind(leftType, 2112 /* BigIntLike */) || maybeTypeOfKind(rightType, 2112 /* BigIntLike */))) { - resultType2 = numberType; - } else if (bothAreBigIntLike(leftType, rightType)) { - switch (operator) { - case 50 /* GreaterThanGreaterThanGreaterThanToken */: - case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - reportOperatorError(); - break; - case 43 /* AsteriskAsteriskToken */: - case 68 /* AsteriskAsteriskEqualsToken */: - if (languageVersion < 3 /* ES2016 */) { - error2(errorNode, Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later); - } - } - resultType2 = bigintType; - } else { - reportOperatorError(bothAreBigIntLike); - resultType2 = errorType; - } - if (leftOk && rightOk) { - checkAssignmentOperator(resultType2); - } - return resultType2; - } - case 40 /* PlusToken */: - case 65 /* PlusEqualsToken */: - if (leftType === silentNeverType || rightType === silentNeverType) { - return silentNeverType; - } - if (!isTypeAssignableToKind(leftType, 402653316 /* StringLike */) && !isTypeAssignableToKind(rightType, 402653316 /* StringLike */)) { - leftType = checkNonNullType(leftType, left); - rightType = checkNonNullType(rightType, right); - } - let resultType; - if (isTypeAssignableToKind( - leftType, - 296 /* NumberLike */, - /*strict*/ - true - ) && isTypeAssignableToKind( - rightType, - 296 /* NumberLike */, - /*strict*/ - true - )) { - resultType = numberType; - } else if (isTypeAssignableToKind( - leftType, - 2112 /* BigIntLike */, - /*strict*/ - true - ) && isTypeAssignableToKind( - rightType, - 2112 /* BigIntLike */, - /*strict*/ - true - )) { - resultType = bigintType; - } else if (isTypeAssignableToKind( - leftType, - 402653316 /* StringLike */, - /*strict*/ - true - ) || isTypeAssignableToKind( - rightType, - 402653316 /* StringLike */, - /*strict*/ - true - )) { - resultType = stringType; - } else if (isTypeAny(leftType) || isTypeAny(rightType)) { - resultType = isErrorType(leftType) || isErrorType(rightType) ? errorType : anyType; - } - if (resultType && !checkForDisallowedESSymbolOperand(operator)) { - return resultType; - } - if (!resultType) { - const closeEnoughKind = 296 /* NumberLike */ | 2112 /* BigIntLike */ | 402653316 /* StringLike */ | 3 /* AnyOrUnknown */; - reportOperatorError((left2, right2) => isTypeAssignableToKind(left2, closeEnoughKind) && isTypeAssignableToKind(right2, closeEnoughKind)); - return anyType; - } - if (operator === 65 /* PlusEqualsToken */) { - checkAssignmentOperator(resultType); - } - return resultType; - case 30 /* LessThanToken */: - case 32 /* GreaterThanToken */: - case 33 /* LessThanEqualsToken */: - case 34 /* GreaterThanEqualsToken */: - if (checkForDisallowedESSymbolOperand(operator)) { - leftType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(leftType, left)); - rightType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(rightType, right)); - reportOperatorErrorUnless((left2, right2) => { - if (isTypeAny(left2) || isTypeAny(right2)) { - return true; - } - const leftAssignableToNumber = isTypeAssignableTo(left2, numberOrBigIntType); - const rightAssignableToNumber = isTypeAssignableTo(right2, numberOrBigIntType); - return leftAssignableToNumber && rightAssignableToNumber || !leftAssignableToNumber && !rightAssignableToNumber && areTypesComparable(left2, right2); - }); - } - return booleanType; - case 35 /* EqualsEqualsToken */: - case 36 /* ExclamationEqualsToken */: - case 37 /* EqualsEqualsEqualsToken */: - case 38 /* ExclamationEqualsEqualsToken */: - if (!(checkMode && checkMode & 128 /* TypeOnly */)) { - if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or != - (!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) { - const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; - error2(errorNode, Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true"); - } - checkNaNEquality(errorNode, operator, left, right); - reportOperatorErrorUnless((left2, right2) => isTypeEqualityComparableTo(left2, right2) || isTypeEqualityComparableTo(right2, left2)); - } - return booleanType; - case 104 /* InstanceOfKeyword */: - return checkInstanceOfExpression(left, right, leftType, rightType); - case 103 /* InKeyword */: - return checkInExpression(left, right, leftType, rightType); - case 56 /* AmpersandAmpersandToken */: - case 77 /* AmpersandAmpersandEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 4194304 /* Truthy */ ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType; - if (operator === 77 /* AmpersandAmpersandEqualsToken */) { - checkAssignmentOperator(rightType); - } - return resultType2; - } - case 57 /* BarBarToken */: - case 76 /* BarBarEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 8388608 /* Falsy */ ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType; - if (operator === 76 /* BarBarEqualsToken */) { - checkAssignmentOperator(rightType); - } - return resultType2; - } - case 61 /* QuestionQuestionToken */: - case 78 /* QuestionQuestionEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 262144 /* EQUndefinedOrNull */ ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType; - if (operator === 78 /* QuestionQuestionEqualsToken */) { - checkAssignmentOperator(rightType); - } - return resultType2; - } - case 64 /* EqualsToken */: - const declKind = isBinaryExpression(left.parent) ? getAssignmentDeclarationKind(left.parent) : 0 /* None */; - checkAssignmentDeclaration(declKind, rightType); - if (isAssignmentDeclaration2(declKind)) { - if (!(rightType.flags & 524288 /* Object */) || declKind !== 2 /* ModuleExports */ && declKind !== 6 /* Prototype */ && !isEmptyObjectType(rightType) && !isFunctionObjectType(rightType) && !(getObjectFlags(rightType) & 1 /* Class */)) { - checkAssignmentOperator(rightType); - } - return leftType; - } else { - checkAssignmentOperator(rightType); - return rightType; - } - case 28 /* CommaToken */: - if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isIndirectCall(left.parent)) { - const sf = getSourceFileOfNode(left); - const sourceText = sf.text; - const start = skipTrivia(sourceText, left.pos); - const isInDiag2657 = sf.parseDiagnostics.some((diag2) => { - if (diag2.code !== Diagnostics.JSX_expressions_must_have_one_parent_element.code) - return false; - return textSpanContainsPosition(diag2, start); - }); - if (!isInDiag2657) - error2(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); - } - return rightType; - default: - return Debug.fail(); - } - function bothAreBigIntLike(left2, right2) { - return isTypeAssignableToKind(left2, 2112 /* BigIntLike */) && isTypeAssignableToKind(right2, 2112 /* BigIntLike */); - } - function checkAssignmentDeclaration(kind, rightType2) { - if (kind === 2 /* ModuleExports */) { - for (const prop of getPropertiesOfObjectType(rightType2)) { - const propType = getTypeOfSymbol(prop); - if (propType.symbol && propType.symbol.flags & 32 /* Class */) { - const name = prop.escapedName; - const symbol = resolveName( - prop.valueDeclaration, - name, - 788968 /* Type */, - /*nameNotFoundMessage*/ - void 0, - name, - /*isUse*/ - false - ); - if ((symbol == null ? void 0 : symbol.declarations) && symbol.declarations.some(isJSDocTypedefTag)) { - addDuplicateDeclarationErrorsForSymbols(symbol, Diagnostics.Duplicate_identifier_0, unescapeLeadingUnderscores(name), prop); - addDuplicateDeclarationErrorsForSymbols(prop, Diagnostics.Duplicate_identifier_0, unescapeLeadingUnderscores(name), symbol); - } - } - } - } - } - function isIndirectCall(node) { - return node.parent.kind === 217 /* ParenthesizedExpression */ && isNumericLiteral(node.left) && node.left.text === "0" && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === 215 /* TaggedTemplateExpression */) && // special-case for "eval" because it's the only non-access case where an indirect call actually affects behavior. - (isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval"); - } - function checkForDisallowedESSymbolOperand(operator2) { - const offendingSymbolOperand = maybeTypeOfKindConsideringBaseConstraint(leftType, 12288 /* ESSymbolLike */) ? left : maybeTypeOfKindConsideringBaseConstraint(rightType, 12288 /* ESSymbolLike */) ? right : void 0; - if (offendingSymbolOperand) { - error2(offendingSymbolOperand, Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, tokenToString(operator2)); - return false; - } - return true; - } - function getSuggestedBooleanOperator(operator2) { - switch (operator2) { - case 52 /* BarToken */: - case 75 /* BarEqualsToken */: - return 57 /* BarBarToken */; - case 53 /* CaretToken */: - case 79 /* CaretEqualsToken */: - return 38 /* ExclamationEqualsEqualsToken */; - case 51 /* AmpersandToken */: - case 74 /* AmpersandEqualsToken */: - return 56 /* AmpersandAmpersandToken */; - default: - return void 0; - } - } - function checkAssignmentOperator(valueType) { - if (isAssignmentOperator(operator)) { - addLazyDiagnostic(checkAssignmentOperatorWorker); - } - function checkAssignmentOperatorWorker() { - let assigneeType = leftType; - if (isCompoundAssignment(operatorToken.kind) && left.kind === 211 /* PropertyAccessExpression */) { - assigneeType = checkPropertyAccessExpression( - left, - /*checkMode*/ - void 0, - /*writeOnly*/ - true - ); - } - if (checkReferenceExpression( - left, - Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, - Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access - )) { - let headMessage; - if (exactOptionalPropertyTypes && isPropertyAccessExpression(left) && maybeTypeOfKind(valueType, 32768 /* Undefined */)) { - const target = getTypeOfPropertyOfType(getTypeOfExpression(left.expression), left.name.escapedText); - if (isExactOptionalPropertyMismatch(valueType, target)) { - headMessage = Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target; - } - } - checkTypeAssignableToAndOptionallyElaborate(valueType, assigneeType, left, right, headMessage); - } - } - } - function isAssignmentDeclaration2(kind) { - var _a; - switch (kind) { - case 2 /* ModuleExports */: - return true; - case 1 /* ExportsProperty */: - case 5 /* Property */: - case 6 /* Prototype */: - case 3 /* PrototypeProperty */: - case 4 /* ThisProperty */: - const symbol = getSymbolOfNode(left); - const init = getAssignedExpandoInitializer(right); - return !!init && isObjectLiteralExpression(init) && !!((_a = symbol == null ? void 0 : symbol.exports) == null ? void 0 : _a.size); - default: - return false; - } - } - function reportOperatorErrorUnless(typesAreCompatible) { - if (!typesAreCompatible(leftType, rightType)) { - reportOperatorError(typesAreCompatible); - return true; - } - return false; - } - function reportOperatorError(isRelated) { - let wouldWorkWithAwait = false; - const errNode = errorNode || operatorToken; - if (isRelated) { - const awaitedLeftType = getAwaitedTypeNoAlias(leftType); - const awaitedRightType = getAwaitedTypeNoAlias(rightType); - wouldWorkWithAwait = !(awaitedLeftType === leftType && awaitedRightType === rightType) && !!(awaitedLeftType && awaitedRightType) && isRelated(awaitedLeftType, awaitedRightType); - } - let effectiveLeft = leftType; - let effectiveRight = rightType; - if (!wouldWorkWithAwait && isRelated) { - [effectiveLeft, effectiveRight] = getBaseTypesIfUnrelated(leftType, rightType, isRelated); - } - const [leftStr, rightStr] = getTypeNamesForErrorDisplay(effectiveLeft, effectiveRight); - if (!tryGiveBetterPrimaryError(errNode, wouldWorkWithAwait, leftStr, rightStr)) { - errorAndMaybeSuggestAwait( - errNode, - wouldWorkWithAwait, - Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2, - tokenToString(operatorToken.kind), - leftStr, - rightStr - ); - } - } - function tryGiveBetterPrimaryError(errNode, maybeMissingAwait, leftStr, rightStr) { - switch (operatorToken.kind) { - case 37 /* EqualsEqualsEqualsToken */: - case 35 /* EqualsEqualsToken */: - case 38 /* ExclamationEqualsEqualsToken */: - case 36 /* ExclamationEqualsToken */: - return errorAndMaybeSuggestAwait( - errNode, - maybeMissingAwait, - Diagnostics.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap, - leftStr, - rightStr - ); - default: - return void 0; - } - } - function checkNaNEquality(errorNode2, operator2, left2, right2) { - const isLeftNaN = isGlobalNaN(skipParentheses(left2)); - const isRightNaN = isGlobalNaN(skipParentheses(right2)); - if (isLeftNaN || isRightNaN) { - const err = error2( - errorNode2, - Diagnostics.This_condition_will_always_return_0, - tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */) - ); - if (isLeftNaN && isRightNaN) - return; - const operatorString = operator2 === 38 /* ExclamationEqualsEqualsToken */ || operator2 === 36 /* ExclamationEqualsToken */ ? tokenToString(54 /* ExclamationToken */) : ""; - const location = isLeftNaN ? right2 : left2; - const expression = skipParentheses(location); - addRelatedInfo(err, createDiagnosticForNode( - location, - Diagnostics.Did_you_mean_0, - `${operatorString}Number.isNaN(${isEntityNameExpression(expression) ? entityNameToString(expression) : "..."})` - )); - } - } - function isGlobalNaN(expr) { - if (isIdentifier(expr) && expr.escapedText === "NaN") { - const globalNaNSymbol = getGlobalNaNSymbol(); - return !!globalNaNSymbol && globalNaNSymbol === getResolvedSymbol(expr); - } - return false; - } - } - function getBaseTypesIfUnrelated(leftType, rightType, isRelated) { - let effectiveLeft = leftType; - let effectiveRight = rightType; - const leftBase = getBaseTypeOfLiteralType(leftType); - const rightBase = getBaseTypeOfLiteralType(rightType); - if (!isRelated(leftBase, rightBase)) { - effectiveLeft = leftBase; - effectiveRight = rightBase; - } - return [effectiveLeft, effectiveRight]; - } - function checkYieldExpression(node) { - addLazyDiagnostic(checkYieldExpressionGrammar); - const func = getContainingFunction(node); - if (!func) - return anyType; - const functionFlags = getFunctionFlags(func); - if (!(functionFlags & 1 /* Generator */)) { - return anyType; - } - const isAsync = (functionFlags & 2 /* Async */) !== 0; - if (node.asteriskToken) { - if (isAsync && languageVersion < 99 /* ESNext */) { - checkExternalEmitHelpers(node, 26624 /* AsyncDelegatorIncludes */); - } - if (!isAsync && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { - checkExternalEmitHelpers(node, 256 /* Values */); - } - } - const returnType = getReturnTypeFromAnnotation(func); - const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync); - const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType; - const signatureNextType = iterationTypes && iterationTypes.nextType || anyType; - const resolvedSignatureNextType = isAsync ? getAwaitedType(signatureNextType) || anyType : signatureNextType; - const yieldExpressionType = node.expression ? checkExpression(node.expression) : undefinedWideningType; - const yieldedType = getYieldedTypeOfYieldExpression(node, yieldExpressionType, resolvedSignatureNextType, isAsync); - if (returnType && yieldedType) { - checkTypeAssignableToAndOptionallyElaborate(yieldedType, signatureYieldType, node.expression || node, node.expression); - } - if (node.asteriskToken) { - const use = isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */; - return getIterationTypeOfIterable(use, 1 /* Return */, yieldExpressionType, node.expression) || anyType; - } else if (returnType) { - return getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, isAsync) || anyType; - } - let type = getContextualIterationType(2 /* Next */, func); - if (!type) { - type = anyType; - addLazyDiagnostic(() => { - if (noImplicitAny && !expressionResultIsUnused(node)) { - const contextualType = getContextualType2( - node, - /*contextFlags*/ - void 0 - ); - if (!contextualType || isTypeAny(contextualType)) { - error2(node, Diagnostics.yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation); - } - } - }); - } - return type; - function checkYieldExpressionGrammar() { - if (!(node.flags & 16384 /* YieldContext */)) { - grammarErrorOnFirstToken(node, Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); - } - if (isInParameterInitializerBeforeContainingFunction(node)) { - error2(node, Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer); - } - } - } - function checkConditionalExpression(node, checkMode) { - const type = checkTruthinessExpression(node.condition, checkMode); - checkTestingKnownTruthyCallableOrAwaitableType(node.condition, type, node.whenTrue); - const type1 = checkExpression(node.whenTrue, checkMode); - const type2 = checkExpression(node.whenFalse, checkMode); - return getUnionType([type1, type2], 2 /* Subtype */); - } - function isTemplateLiteralContext(node) { - const parent2 = node.parent; - return isParenthesizedExpression(parent2) && isTemplateLiteralContext(parent2) || isElementAccessExpression(parent2) && parent2.argumentExpression === node; - } - function checkTemplateExpression(node) { - const texts = [node.head.text]; - const types = []; - for (const span of node.templateSpans) { - const type = checkExpression(span.expression); - if (maybeTypeOfKindConsideringBaseConstraint(type, 12288 /* ESSymbolLike */)) { - error2(span.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String); - } - texts.push(span.literal.text); - types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType); - } - if (isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType2( - node, - /*contextFlags*/ - void 0 - ) || unknownType, isTemplateLiteralContextualType)) { - return getTemplateLiteralType(texts, types); - } - const evaluated = node.parent.kind !== 215 /* TaggedTemplateExpression */ && evaluateTemplateExpression(node); - return evaluated ? getFreshTypeOfLiteralType(getStringLiteralType(evaluated)) : stringType; - } - function isTemplateLiteralContextualType(type) { - return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */)); - } - function getContextNode2(node) { - if (isJsxAttributes(node) && !isJsxSelfClosingElement(node.parent)) { - return node.parent.parent; - } - return node; - } - function checkExpressionWithContextualType(node, contextualType, inferenceContext, checkMode) { - const contextNode = getContextNode2(node); - pushContextualType( - contextNode, - contextualType, - /*isCache*/ - false - ); - pushInferenceContext(contextNode, inferenceContext); - const type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0)); - if (inferenceContext && inferenceContext.intraExpressionInferenceSites) { - inferenceContext.intraExpressionInferenceSites = void 0; - } - const result = maybeTypeOfKind(type, 2944 /* Literal */) && isLiteralOfContextualType(type, instantiateContextualType( - contextualType, - node, - /*contextFlags*/ - void 0 - )) ? getRegularTypeOfLiteralType(type) : type; - popInferenceContext(); - popContextualType(); - return result; - } - function checkExpressionCached(node, checkMode) { - if (checkMode) { - return checkExpression(node, checkMode); - } - const links = getNodeLinks(node); - if (!links.resolvedType) { - const saveFlowLoopStart = flowLoopStart; - const saveFlowTypeCache = flowTypeCache; - flowLoopStart = flowLoopCount; - flowTypeCache = void 0; - links.resolvedType = checkExpression(node, checkMode); - flowTypeCache = saveFlowTypeCache; - flowLoopStart = saveFlowLoopStart; - } - return links.resolvedType; - } - function isTypeAssertion(node) { - node = skipParentheses( - node, - /*excludeJSDocTypeAssertions*/ - true - ); - return node.kind === 216 /* TypeAssertionExpression */ || node.kind === 234 /* AsExpression */ || isJSDocTypeAssertion(node); - } - function checkDeclarationInitializer(declaration, checkMode, contextualType) { - const initializer = getEffectiveInitializer(declaration); - if (isInJSFile(declaration)) { - const typeNode = tryGetJSDocSatisfiesTypeNode(declaration); - if (typeNode) { - return checkSatisfiesExpressionWorker(initializer, typeNode, checkMode); - } - } - const type = getQuickTypeOfExpression(initializer) || (contextualType ? checkExpressionWithContextualType( - initializer, - contextualType, - /*inferenceContext*/ - void 0, - checkMode || 0 /* Normal */ - ) : checkExpressionCached(initializer, checkMode)); - return isParameter(declaration) && declaration.name.kind === 207 /* ArrayBindingPattern */ && isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ? padTupleType(type, declaration.name) : type; - } - function padTupleType(type, pattern) { - const patternElements = pattern.elements; - const elementTypes = getElementTypes(type).slice(); - const elementFlags = type.target.elementFlags.slice(); - for (let i = getTypeReferenceArity(type); i < patternElements.length; i++) { - const e = patternElements[i]; - if (i < patternElements.length - 1 || !(e.kind === 208 /* BindingElement */ && e.dotDotDotToken)) { - elementTypes.push(!isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement( - e, - /*includePatternInType*/ - false, - /*reportErrors*/ - false - ) : anyType); - elementFlags.push(2 /* Optional */); - if (!isOmittedExpression(e) && !hasDefaultValue(e)) { - reportImplicitAny(e, anyType); - } - } - } - return createTupleType(elementTypes, elementFlags, type.target.readonly); - } - function widenTypeInferredFromInitializer(declaration, type) { - const widened = getCombinedNodeFlagsCached(declaration) & 6 /* Constant */ || isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type); - if (isInJSFile(declaration)) { - if (isEmptyLiteralType(widened)) { - reportImplicitAny(declaration, anyType); - return anyType; - } else if (isEmptyArrayLiteralType(widened)) { - reportImplicitAny(declaration, anyArrayType); - return anyArrayType; - } - } - return widened; - } - function isLiteralOfContextualType(candidateType, contextualType) { - if (contextualType) { - if (contextualType.flags & 3145728 /* UnionOrIntersection */) { - const types = contextualType.types; - return some(types, (t) => isLiteralOfContextualType(candidateType, t)); - } - if (contextualType.flags & 58982400 /* InstantiableNonPrimitive */) { - const constraint = getBaseConstraintOfType(contextualType) || unknownType; - return maybeTypeOfKind(constraint, 4 /* String */) && maybeTypeOfKind(candidateType, 128 /* StringLiteral */) || maybeTypeOfKind(constraint, 8 /* Number */) && maybeTypeOfKind(candidateType, 256 /* NumberLiteral */) || maybeTypeOfKind(constraint, 64 /* BigInt */) && maybeTypeOfKind(candidateType, 2048 /* BigIntLiteral */) || maybeTypeOfKind(constraint, 4096 /* ESSymbol */) && maybeTypeOfKind(candidateType, 8192 /* UniqueESSymbol */) || isLiteralOfContextualType(candidateType, constraint); - } - return !!(contextualType.flags & (128 /* StringLiteral */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && maybeTypeOfKind(candidateType, 128 /* StringLiteral */) || contextualType.flags & 256 /* NumberLiteral */ && maybeTypeOfKind(candidateType, 256 /* NumberLiteral */) || contextualType.flags & 2048 /* BigIntLiteral */ && maybeTypeOfKind(candidateType, 2048 /* BigIntLiteral */) || contextualType.flags & 512 /* BooleanLiteral */ && maybeTypeOfKind(candidateType, 512 /* BooleanLiteral */) || contextualType.flags & 8192 /* UniqueESSymbol */ && maybeTypeOfKind(candidateType, 8192 /* UniqueESSymbol */)); - } - return false; - } - function isConstContext(node) { - const parent2 = node.parent; - return isAssertionExpression(parent2) && isConstTypeReference(parent2.type) || isJSDocTypeAssertion(parent2) && isConstTypeReference(getJSDocTypeAssertionType(parent2)) || isValidConstAssertionArgument(node) && isConstTypeVariable(getContextualType2(node, 0 /* None */)) || (isParenthesizedExpression(parent2) || isArrayLiteralExpression(parent2) || isSpreadElement(parent2)) && isConstContext(parent2) || (isPropertyAssignment(parent2) || isShorthandPropertyAssignment(parent2) || isTemplateSpan(parent2)) && isConstContext(parent2.parent); - } - function checkExpressionForMutableLocation(node, checkMode, forceTuple) { - const type = checkExpression(node, checkMode, forceTuple); - return isConstContext(node) || isCommonJsExportedExpression(node) ? getRegularTypeOfLiteralType(type) : isTypeAssertion(node) ? type : getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType( - getContextualType2( - node, - /*contextFlags*/ - void 0 - ), - node, - /*contextFlags*/ - void 0 - )); - } - function checkPropertyAssignment(node, checkMode) { - if (node.name.kind === 167 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - } - return checkExpressionForMutableLocation(node.initializer, checkMode); - } - function checkObjectLiteralMethod(node, checkMode) { - checkGrammarMethod(node); - if (node.name.kind === 167 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - } - const uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode); - } - function instantiateTypeWithSingleGenericCallSignature(node, type, checkMode) { - if (checkMode && checkMode & (2 /* Inferential */ | 8 /* SkipGenericFunctions */)) { - const callSignature = getSingleSignature( - type, - 0 /* Call */, - /*allowMembers*/ - true - ); - const constructSignature = getSingleSignature( - type, - 1 /* Construct */, - /*allowMembers*/ - true - ); - const signature = callSignature || constructSignature; - if (signature && signature.typeParameters) { - const contextualType = getApparentTypeOfContextualType(node, 2 /* NoConstraints */); - if (contextualType) { - const contextualSignature = getSingleSignature( - getNonNullableType(contextualType), - callSignature ? 0 /* Call */ : 1 /* Construct */, - /*allowMembers*/ - false - ); - if (contextualSignature && !contextualSignature.typeParameters) { - if (checkMode & 8 /* SkipGenericFunctions */) { - skippedGenericFunction(node, checkMode); - return anyFunctionType; - } - const context = getInferenceContext(node); - const returnType = context.signature && getReturnTypeOfSignature(context.signature); - const returnSignature = returnType && getSingleCallOrConstructSignature(returnType); - if (returnSignature && !returnSignature.typeParameters && !every(context.inferences, hasInferenceCandidates)) { - const uniqueTypeParameters = getUniqueTypeParameters(context, signature.typeParameters); - const instantiatedSignature = getSignatureInstantiationWithoutFillingInTypeArguments(signature, uniqueTypeParameters); - const inferences = map(context.inferences, (info) => createInferenceInfo(info.typeParameter)); - applyToParameterTypes(instantiatedSignature, contextualSignature, (source, target) => { - inferTypes( - inferences, - source, - target, - /*priority*/ - 0, - /*contravariant*/ - true - ); - }); - if (some(inferences, hasInferenceCandidates)) { - applyToReturnTypes(instantiatedSignature, contextualSignature, (source, target) => { - inferTypes(inferences, source, target); - }); - if (!hasOverlappingInferences(context.inferences, inferences)) { - mergeInferences(context.inferences, inferences); - context.inferredTypeParameters = concatenate(context.inferredTypeParameters, uniqueTypeParameters); - return getOrCreateTypeFromSignature(instantiatedSignature); - } - } - } - return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, context)); - } - } - } - } - return type; - } - function skippedGenericFunction(node, checkMode) { - if (checkMode & 2 /* Inferential */) { - const context = getInferenceContext(node); - context.flags |= 4 /* SkippedGenericFunction */; - } - } - function hasInferenceCandidates(info) { - return !!(info.candidates || info.contraCandidates); - } - function hasInferenceCandidatesOrDefault(info) { - return !!(info.candidates || info.contraCandidates || hasTypeParameterDefault(info.typeParameter)); - } - function hasOverlappingInferences(a, b) { - for (let i = 0; i < a.length; i++) { - if (hasInferenceCandidates(a[i]) && hasInferenceCandidates(b[i])) { - return true; - } - } - return false; - } - function mergeInferences(target, source) { - for (let i = 0; i < target.length; i++) { - if (!hasInferenceCandidates(target[i]) && hasInferenceCandidates(source[i])) { - target[i] = source[i]; - } - } - } - function getUniqueTypeParameters(context, typeParameters) { - const result = []; - let oldTypeParameters; - let newTypeParameters; - for (const tp of typeParameters) { - const name = tp.symbol.escapedName; - if (hasTypeParameterByName(context.inferredTypeParameters, name) || hasTypeParameterByName(result, name)) { - const newName = getUniqueTypeParameterName(concatenate(context.inferredTypeParameters, result), name); - const symbol = createSymbol(262144 /* TypeParameter */, newName); - const newTypeParameter = createTypeParameter(symbol); - newTypeParameter.target = tp; - oldTypeParameters = append(oldTypeParameters, tp); - newTypeParameters = append(newTypeParameters, newTypeParameter); - result.push(newTypeParameter); - } else { - result.push(tp); - } - } - if (newTypeParameters) { - const mapper = createTypeMapper(oldTypeParameters, newTypeParameters); - for (const tp of newTypeParameters) { - tp.mapper = mapper; - } - } - return result; - } - function hasTypeParameterByName(typeParameters, name) { - return some(typeParameters, (tp) => tp.symbol.escapedName === name); - } - function getUniqueTypeParameterName(typeParameters, baseName) { - let len = baseName.length; - while (len > 1 && baseName.charCodeAt(len - 1) >= 48 /* _0 */ && baseName.charCodeAt(len - 1) <= 57 /* _9 */) - len--; - const s = baseName.slice(0, len); - for (let index = 1; true; index++) { - const augmentedName = s + index; - if (!hasTypeParameterByName(typeParameters, augmentedName)) { - return augmentedName; - } - } - } - function getReturnTypeOfSingleNonGenericCallSignature(funcType) { - const signature = getSingleCallSignature(funcType); - if (signature && !signature.typeParameters) { - return getReturnTypeOfSignature(signature); - } - } - function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) { - const funcType = checkExpression(expr.expression); - const nonOptionalType = getOptionalExpressionType(funcType, expr.expression); - const returnType = getReturnTypeOfSingleNonGenericCallSignature(funcType); - return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType); - } - function getTypeOfExpression(node) { - const quickType = getQuickTypeOfExpression(node); - if (quickType) { - return quickType; - } - if (node.flags & 268435456 /* TypeCached */ && flowTypeCache) { - const cachedType = flowTypeCache[getNodeId(node)]; - if (cachedType) { - return cachedType; - } - } - const startInvocationCount = flowInvocationCount; - const type = checkExpression(node, 128 /* TypeOnly */); - if (flowInvocationCount !== startInvocationCount) { - const cache = flowTypeCache || (flowTypeCache = []); - cache[getNodeId(node)] = type; - setNodeFlags(node, node.flags | 268435456 /* TypeCached */); - } - return type; - } - function getQuickTypeOfExpression(node) { - let expr = skipParentheses( - node, - /*excludeJSDocTypeAssertions*/ - true - ); - if (isJSDocTypeAssertion(expr)) { - const type = getJSDocTypeAssertionType(expr); - if (!isConstTypeReference(type)) { - return getTypeFromTypeNode(type); - } - } - expr = skipParentheses(node); - if (isAwaitExpression(expr)) { - const type = getQuickTypeOfExpression(expr.expression); - return type ? getAwaitedType(type) : void 0; - } - if (isCallExpression(expr) && expr.expression.kind !== 108 /* SuperKeyword */ && !isRequireCall( - expr, - /*requireStringLiteralLikeArgument*/ - true - ) && !isSymbolOrSymbolForCall(expr)) { - return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression)); - } else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) { - return getTypeFromTypeNode(expr.type); - } else if (isLiteralExpression(node) || isBooleanLiteral(node)) { - return checkExpression(node); - } - return void 0; - } - function getContextFreeTypeOfExpression(node) { - const links = getNodeLinks(node); - if (links.contextFreeType) { - return links.contextFreeType; - } - pushContextualType( - node, - anyType, - /*isCache*/ - false - ); - const type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */); - popContextualType(); - return type; - } - function checkExpression(node, checkMode, forceTuple) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Check, "checkExpression", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath }); - const saveCurrentNode = currentNode; - currentNode = node; - instantiationCount = 0; - const uninstantiatedType = checkExpressionWorker(node, checkMode, forceTuple); - const type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, checkMode); - if (isConstEnumObjectType(type)) { - checkConstEnumAccess(node, type); - } - currentNode = saveCurrentNode; - (_b = tracing) == null ? void 0 : _b.pop(); - return type; - } - function checkConstEnumAccess(node, type) { - const ok = node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.expression === node || node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.expression === node || ((node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node) || node.parent.kind === 186 /* TypeQuery */ && node.parent.exprName === node) || node.parent.kind === 281 /* ExportSpecifier */; - if (!ok) { - error2(node, Diagnostics.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); - } - if (getIsolatedModules(compilerOptions)) { - Debug.assert(!!(type.symbol.flags & 128 /* ConstEnum */)); - const constEnumDeclaration = type.symbol.valueDeclaration; - if (constEnumDeclaration.flags & 33554432 /* Ambient */ && !isValidTypeOnlyAliasUseSite(node)) { - error2(node, Diagnostics.Cannot_access_ambient_const_enums_when_0_is_enabled, isolatedModulesLikeFlagName); - } - } - } - function checkParenthesizedExpression(node, checkMode) { - if (hasJSDocNodes(node)) { - if (isJSDocSatisfiesExpression(node)) { - return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode); - } - if (isJSDocTypeAssertion(node)) { - return checkAssertionWorker(node, checkMode); - } - } - return checkExpression(node.expression, checkMode); - } - function checkExpressionWorker(node, checkMode, forceTuple) { - const kind = node.kind; - if (cancellationToken) { - switch (kind) { - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - cancellationToken.throwIfCancellationRequested(); - } - } - switch (kind) { - case 80 /* Identifier */: - return checkIdentifier(node, checkMode); - case 81 /* PrivateIdentifier */: - return checkPrivateIdentifierExpression(node); - case 110 /* ThisKeyword */: - return checkThisExpression(node); - case 108 /* SuperKeyword */: - return checkSuperExpression(node); - case 106 /* NullKeyword */: - return nullWideningType; - case 15 /* NoSubstitutionTemplateLiteral */: - case 11 /* StringLiteral */: - return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); - case 9 /* NumericLiteral */: - checkGrammarNumericLiteral(node); - return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); - case 10 /* BigIntLiteral */: - checkGrammarBigIntLiteral(node); - return getFreshTypeOfLiteralType(getBigIntLiteralType({ - negative: false, - base10Value: parsePseudoBigInt(node.text) - })); - case 112 /* TrueKeyword */: - return trueType; - case 97 /* FalseKeyword */: - return falseType; - case 228 /* TemplateExpression */: - return checkTemplateExpression(node); - case 14 /* RegularExpressionLiteral */: - return globalRegExpType; - case 209 /* ArrayLiteralExpression */: - return checkArrayLiteral(node, checkMode, forceTuple); - case 210 /* ObjectLiteralExpression */: - return checkObjectLiteral(node, checkMode); - case 211 /* PropertyAccessExpression */: - return checkPropertyAccessExpression(node, checkMode); - case 166 /* QualifiedName */: - return checkQualifiedName(node, checkMode); - case 212 /* ElementAccessExpression */: - return checkIndexedAccess(node, checkMode); - case 213 /* CallExpression */: - if (node.expression.kind === 102 /* ImportKeyword */) { - return checkImportCallExpression(node); - } - case 214 /* NewExpression */: - return checkCallExpression(node, checkMode); - case 215 /* TaggedTemplateExpression */: - return checkTaggedTemplateExpression(node); - case 217 /* ParenthesizedExpression */: - return checkParenthesizedExpression(node, checkMode); - case 231 /* ClassExpression */: - return checkClassExpression(node); - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode); - case 221 /* TypeOfExpression */: - return checkTypeOfExpression(node); - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - return checkAssertion(node, checkMode); - case 235 /* NonNullExpression */: - return checkNonNullAssertion(node); - case 233 /* ExpressionWithTypeArguments */: - return checkExpressionWithTypeArguments(node); - case 238 /* SatisfiesExpression */: - return checkSatisfiesExpression(node); - case 236 /* MetaProperty */: - return checkMetaProperty(node); - case 220 /* DeleteExpression */: - return checkDeleteExpression(node); - case 222 /* VoidExpression */: - return checkVoidExpression(node); - case 223 /* AwaitExpression */: - return checkAwaitExpression(node); - case 224 /* PrefixUnaryExpression */: - return checkPrefixUnaryExpression(node); - case 225 /* PostfixUnaryExpression */: - return checkPostfixUnaryExpression(node); - case 226 /* BinaryExpression */: - return checkBinaryExpression(node, checkMode); - case 227 /* ConditionalExpression */: - return checkConditionalExpression(node, checkMode); - case 230 /* SpreadElement */: - return checkSpreadExpression(node, checkMode); - case 232 /* OmittedExpression */: - return undefinedWideningType; - case 229 /* YieldExpression */: - return checkYieldExpression(node); - case 237 /* SyntheticExpression */: - return checkSyntheticExpression(node); - case 294 /* JsxExpression */: - return checkJsxExpression(node, checkMode); - case 284 /* JsxElement */: - return checkJsxElement(node, checkMode); - case 285 /* JsxSelfClosingElement */: - return checkJsxSelfClosingElement(node, checkMode); - case 288 /* JsxFragment */: - return checkJsxFragment(node); - case 292 /* JsxAttributes */: - return checkJsxAttributes(node, checkMode); - case 286 /* JsxOpeningElement */: - Debug.fail("Shouldn't ever directly check a JsxOpeningElement"); - } - return errorType; - } - function checkTypeParameter(node) { - checkGrammarModifiers(node); - if (node.expression) { - grammarErrorOnFirstToken(node.expression, Diagnostics.Type_expected); - } - checkSourceElement(node.constraint); - checkSourceElement(node.default); - const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node)); - getBaseConstraintOfType(typeParameter); - if (!hasNonCircularTypeParameterDefault(typeParameter)) { - error2(node.default, Diagnostics.Type_parameter_0_has_a_circular_default, typeToString(typeParameter)); - } - const constraintType = getConstraintOfTypeParameter(typeParameter); - const defaultType = getDefaultFromTypeParameter(typeParameter); - if (constraintType && defaultType) { - checkTypeAssignableTo(defaultType, getTypeWithThisArgument(instantiateType(constraintType, makeUnaryTypeMapper(typeParameter, defaultType)), defaultType), node.default, Diagnostics.Type_0_does_not_satisfy_the_constraint_1); - } - checkNodeDeferred(node); - addLazyDiagnostic(() => checkTypeNameIsReserved(node.name, Diagnostics.Type_parameter_name_cannot_be_0)); - } - function checkTypeParameterDeferred(node) { - var _a, _b; - if (isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent)) { - const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node)); - const modifiers = getTypeParameterModifiers(typeParameter) & (32768 /* In */ | 65536 /* Out */); - if (modifiers) { - const symbol = getSymbolOfDeclaration(node.parent); - if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) { - error2(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); - } else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) { - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) }); - const source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); - const target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck); - const saveVarianceTypeParameter = typeParameter; - varianceTypeParameter = typeParameter; - checkTypeAssignableTo(source, target, node, Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation); - varianceTypeParameter = saveVarianceTypeParameter; - (_b = tracing) == null ? void 0 : _b.pop(); - } - } - } - } - function checkParameter(node) { - checkGrammarModifiers(node); - checkVariableLikeDeclaration(node); - const func = getContainingFunction(node); - if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { - error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); - } - if (func.kind === 176 /* Constructor */ && isIdentifier(node.name) && node.name.escapedText === "constructor") { - error2(node.name, Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name); - } - } - if (!node.initializer && isOptionalDeclaration(node) && isBindingPattern(node.name) && func.body) { - error2(node, Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); - } - if (node.name && isIdentifier(node.name) && (node.name.escapedText === "this" || node.name.escapedText === "new")) { - if (func.parameters.indexOf(node) !== 0) { - error2(node, Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText); - } - if (func.kind === 176 /* Constructor */ || func.kind === 180 /* ConstructSignature */ || func.kind === 185 /* ConstructorType */) { - error2(node, Diagnostics.A_constructor_cannot_have_a_this_parameter); - } - if (func.kind === 219 /* ArrowFunction */) { - error2(node, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); - } - if (func.kind === 177 /* GetAccessor */ || func.kind === 178 /* SetAccessor */) { - error2(node, Diagnostics.get_and_set_accessors_cannot_declare_this_parameters); - } - } - if (node.dotDotDotToken && !isBindingPattern(node.name) && !isTypeAssignableTo(getReducedType(getTypeOfSymbol(node.symbol)), anyReadonlyArrayType)) { - error2(node, Diagnostics.A_rest_parameter_must_be_of_an_array_type); - } - } - function checkTypePredicate(node) { - const parent2 = getTypePredicateParent(node); - if (!parent2) { - error2(node, Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - return; - } - const signature = getSignatureFromDeclaration(parent2); - const typePredicate = getTypePredicateOfSignature(signature); - if (!typePredicate) { - return; - } - checkSourceElement(node.type); - const { parameterName } = node; - if (typePredicate.kind === 0 /* This */ || typePredicate.kind === 2 /* AssertsThis */) { - getTypeFromThisTypeNode(parameterName); - } else { - if (typePredicate.parameterIndex >= 0) { - if (signatureHasRestParameter(signature) && typePredicate.parameterIndex === signature.parameters.length - 1) { - error2(parameterName, Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); - } else { - if (typePredicate.type) { - const leadingError = () => chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type - ); - checkTypeAssignableTo( - typePredicate.type, - getTypeOfSymbol(signature.parameters[typePredicate.parameterIndex]), - node.type, - /*headMessage*/ - void 0, - leadingError - ); - } - } - } else if (parameterName) { - let hasReportedError = false; - for (const { name } of parent2.parameters) { - if (isBindingPattern(name) && checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, parameterName, typePredicate.parameterName)) { - hasReportedError = true; - break; - } - } - if (!hasReportedError) { - error2(node.parameterName, Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); - } - } - } - } - function getTypePredicateParent(node) { - switch (node.parent.kind) { - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 184 /* FunctionType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - const parent2 = node.parent; - if (node === parent2.type) { - return parent2; - } - } - } - function checkIfTypePredicateVariableIsDeclaredInBindingPattern(pattern, predicateVariableNode, predicateVariableName) { - for (const element of pattern.elements) { - if (isOmittedExpression(element)) { - continue; - } - const name = element.name; - if (name.kind === 80 /* Identifier */ && name.escapedText === predicateVariableName) { - error2( - predicateVariableNode, - Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, - predicateVariableName - ); - return true; - } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { - if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( - name, - predicateVariableNode, - predicateVariableName - )) { - return true; - } - } - } - } - function checkSignatureDeclaration(node) { - if (node.kind === 181 /* IndexSignature */) { - checkGrammarIndexSignature(node); - } else if (node.kind === 184 /* FunctionType */ || node.kind === 262 /* FunctionDeclaration */ || node.kind === 185 /* ConstructorType */ || node.kind === 179 /* CallSignature */ || node.kind === 176 /* Constructor */ || node.kind === 180 /* ConstructSignature */) { - checkGrammarFunctionLikeDeclaration(node); - } - const functionFlags = getFunctionFlags(node); - if (!(functionFlags & 4 /* Invalid */)) { - if ((functionFlags & 3 /* AsyncGenerator */) === 3 /* AsyncGenerator */ && languageVersion < 99 /* ESNext */) { - checkExternalEmitHelpers(node, 6144 /* AsyncGeneratorIncludes */); - } - if ((functionFlags & 3 /* AsyncGenerator */) === 2 /* Async */ && languageVersion < 4 /* ES2017 */) { - checkExternalEmitHelpers(node, 64 /* Awaiter */); - } - if ((functionFlags & 3 /* AsyncGenerator */) !== 0 /* Normal */ && languageVersion < 2 /* ES2015 */) { - checkExternalEmitHelpers(node, 128 /* Generator */); - } - } - checkTypeParameters(getEffectiveTypeParameterDeclarations(node)); - checkUnmatchedJSDocParameters(node); - forEach(node.parameters, checkParameter); - if (node.type) { - checkSourceElement(node.type); - } - addLazyDiagnostic(checkSignatureDeclarationDiagnostics); - function checkSignatureDeclarationDiagnostics() { - checkCollisionWithArgumentsInGeneratedCode(node); - let returnTypeNode = getEffectiveReturnTypeNode(node); - let returnTypeErrorLocation = returnTypeNode; - if (isInJSFile(node)) { - const typeTag = getJSDocTypeTag(node); - if (typeTag && typeTag.typeExpression && isTypeReferenceNode(typeTag.typeExpression.type)) { - const signature = getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression)); - if (signature && signature.declaration) { - returnTypeNode = getEffectiveReturnTypeNode(signature.declaration); - returnTypeErrorLocation = typeTag.typeExpression.type; - } - } - } - if (noImplicitAny && !returnTypeNode) { - switch (node.kind) { - case 180 /* ConstructSignature */: - error2(node, Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); - break; - case 179 /* CallSignature */: - error2(node, Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); - break; - } - } - if (returnTypeNode && returnTypeErrorLocation) { - const functionFlags2 = getFunctionFlags(node); - if ((functionFlags2 & (4 /* Invalid */ | 1 /* Generator */)) === 1 /* Generator */) { - const returnType = getTypeFromTypeNode(returnTypeNode); - if (returnType === voidType) { - error2(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation); - } else { - const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType; - const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType; - const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType; - const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */)); - checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation); - } - } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) { - checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation); - } - } - if (node.kind !== 181 /* IndexSignature */ && node.kind !== 324 /* JSDocFunctionType */) { - registerForUnusedIdentifiersCheck(node); - } - } - } - function checkClassForDuplicateDeclarations(node) { - const instanceNames = /* @__PURE__ */ new Map(); - const staticNames = /* @__PURE__ */ new Map(); - const privateIdentifiers = /* @__PURE__ */ new Map(); - for (const member of node.members) { - if (member.kind === 176 /* Constructor */) { - for (const param of member.parameters) { - if (isParameterPropertyDeclaration(param, member) && !isBindingPattern(param.name)) { - addName(instanceNames, param.name, param.name.escapedText, 3 /* GetOrSetAccessor */); - } - } - } else { - const isStaticMember = isStatic(member); - const name = member.name; - if (!name) { - continue; - } - const isPrivate = isPrivateIdentifier(name); - const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0; - const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames; - const memberName = name && getPropertyNameForPropertyNameNode(name); - if (memberName) { - switch (member.kind) { - case 177 /* GetAccessor */: - addName(names, name, memberName, 1 /* GetAccessor */ | privateStaticFlags); - break; - case 178 /* SetAccessor */: - addName(names, name, memberName, 2 /* SetAccessor */ | privateStaticFlags); - break; - case 172 /* PropertyDeclaration */: - addName(names, name, memberName, 3 /* GetOrSetAccessor */ | privateStaticFlags); - break; - case 174 /* MethodDeclaration */: - addName(names, name, memberName, 8 /* Method */ | privateStaticFlags); - break; - } - } - } - } - function addName(names, location, name, meaning) { - const prev = names.get(name); - if (prev) { - if ((prev & 16 /* PrivateStatic */) !== (meaning & 16 /* PrivateStatic */)) { - error2(location, Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, getTextOfNode(location)); - } else { - const prevIsMethod = !!(prev & 8 /* Method */); - const isMethod = !!(meaning & 8 /* Method */); - if (prevIsMethod || isMethod) { - if (prevIsMethod !== isMethod) { - error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); - } - } else if (prev & meaning & ~16 /* PrivateStatic */) { - error2(location, Diagnostics.Duplicate_identifier_0, getTextOfNode(location)); - } else { - names.set(name, prev | meaning); - } - } - } else { - names.set(name, meaning); - } - } - } - function checkClassForStaticPropertyNameConflicts(node) { - for (const member of node.members) { - const memberNameNode = member.name; - const isStaticMember = isStatic(member); - if (isStaticMember && memberNameNode) { - const memberName = getPropertyNameForPropertyNameNode(memberNameNode); - switch (memberName) { - case "name": - case "length": - case "caller": - case "arguments": - if (useDefineForClassFields) { - break; - } - case "prototype": - const message = Diagnostics.Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1; - const className = getNameOfSymbolAsWritten(getSymbolOfDeclaration(node)); - error2(memberNameNode, message, memberName, className); - break; - } - } - } - } - function checkObjectTypeForDuplicateDeclarations(node) { - const names = /* @__PURE__ */ new Map(); - for (const member of node.members) { - if (member.kind === 171 /* PropertySignature */) { - let memberName; - const name = member.name; - switch (name.kind) { - case 11 /* StringLiteral */: - case 9 /* NumericLiteral */: - memberName = name.text; - break; - case 80 /* Identifier */: - memberName = idText(name); - break; - default: - continue; - } - if (names.get(memberName)) { - error2(getNameOfDeclaration(member.symbol.valueDeclaration), Diagnostics.Duplicate_identifier_0, memberName); - error2(member.name, Diagnostics.Duplicate_identifier_0, memberName); - } else { - names.set(memberName, true); - } - } - } - } - function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 264 /* InterfaceDeclaration */) { - const nodeSymbol = getSymbolOfDeclaration(node); - if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { - return; - } - } - const indexSymbol = getIndexSymbol(getSymbolOfDeclaration(node)); - if (indexSymbol == null ? void 0 : indexSymbol.declarations) { - const indexSignatureMap = /* @__PURE__ */ new Map(); - for (const declaration of indexSymbol.declarations) { - if (declaration.parameters.length === 1 && declaration.parameters[0].type) { - forEachType(getTypeFromTypeNode(declaration.parameters[0].type), (type) => { - const entry = indexSignatureMap.get(getTypeId(type)); - if (entry) { - entry.declarations.push(declaration); - } else { - indexSignatureMap.set(getTypeId(type), { type, declarations: [declaration] }); - } - }); - } - } - indexSignatureMap.forEach((entry) => { - if (entry.declarations.length > 1) { - for (const declaration of entry.declarations) { - error2(declaration, Diagnostics.Duplicate_index_signature_for_type_0, typeToString(entry.type)); - } - } - }); - } - } - function checkPropertyDeclaration(node) { - if (!checkGrammarModifiers(node) && !checkGrammarProperty(node)) - checkGrammarComputedPropertyName(node.name); - checkVariableLikeDeclaration(node); - setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { - error2(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); - } - } - function checkPropertySignature(node) { - if (isPrivateIdentifier(node.name)) { - error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); - } - return checkPropertyDeclaration(node); - } - function checkMethodDeclaration(node) { - if (!checkGrammarMethod(node)) - checkGrammarComputedPropertyName(node.name); - if (isMethodDeclaration(node) && node.asteriskToken && isIdentifier(node.name) && idText(node.name) === "constructor") { - error2(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); - } - checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { - error2(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); - } - if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { - error2(node, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); - } - setNodeLinksForPrivateIdentifierScope(node); - } - function setNodeLinksForPrivateIdentifierScope(node) { - if (isPrivateIdentifier(node.name) && languageVersion < 99 /* ESNext */) { - for (let lexicalScope = getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = getEnclosingBlockScopeContainer(lexicalScope)) { - getNodeLinks(lexicalScope).flags |= 1048576 /* ContainsClassWithPrivateIdentifiers */; - } - if (isClassExpression(node.parent)) { - const enclosingIterationStatement = getEnclosingIterationStatement(node.parent); - if (enclosingIterationStatement) { - getNodeLinks(node.name).flags |= 32768 /* BlockScopedBindingInLoop */; - getNodeLinks(enclosingIterationStatement).flags |= 4096 /* LoopWithCapturedBlockScopedBinding */; - } - } - } - } - function checkClassStaticBlockDeclaration(node) { - checkGrammarModifiers(node); - forEachChild(node, checkSourceElement); - } - function checkConstructorDeclaration(node) { - checkSignatureDeclaration(node); - if (!checkGrammarConstructorTypeParameters(node)) - checkGrammarConstructorTypeAnnotation(node); - checkSourceElement(node.body); - const symbol = getSymbolOfDeclaration(node); - const firstDeclaration = getDeclarationOfKind(symbol, node.kind); - if (node === firstDeclaration) { - checkFunctionOrConstructorSymbol(symbol); - } - if (nodeIsMissing(node.body)) { - return; - } - addLazyDiagnostic(checkConstructorDeclarationDiagnostics); - return; - function isInstancePropertyWithInitializerOrPrivateIdentifierProperty(n) { - if (isPrivateIdentifierClassElementDeclaration(n)) { - return true; - } - return n.kind === 172 /* PropertyDeclaration */ && !isStatic(n) && !!n.initializer; - } - function checkConstructorDeclarationDiagnostics() { - const containingClassDecl = node.parent; - if (getClassExtendsHeritageElement(containingClassDecl)) { - captureLexicalThis(node.parent, containingClassDecl); - const classExtendsNull = classDeclarationExtendsNull(containingClassDecl); - const superCall = findFirstSuperCall(node.body); - if (superCall) { - if (classExtendsNull) { - error2(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); - } - const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); - if (superCallShouldBeRootLevel) { - if (!superCallIsRootLevelInConstructor(superCall, node.body)) { - error2(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); - } else { - let superCallStatement; - for (const statement of node.body.statements) { - if (isExpressionStatement(statement) && isSuperCall(skipOuterExpressions(statement.expression))) { - superCallStatement = statement; - break; - } - if (nodeImmediatelyReferencesSuperOrThis(statement)) { - break; - } - } - if (superCallStatement === void 0) { - error2(node, Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers); - } - } - } - } else if (!classExtendsNull) { - error2(node, Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); - } - } - } - } - function superCallIsRootLevelInConstructor(superCall, body) { - const superCallParent = walkUpParenthesizedExpressions(superCall.parent); - return isExpressionStatement(superCallParent) && superCallParent.parent === body; - } - function nodeImmediatelyReferencesSuperOrThis(node) { - if (node.kind === 108 /* SuperKeyword */ || node.kind === 110 /* ThisKeyword */) { - return true; - } - if (isThisContainerOrFunctionBlock(node)) { - return false; - } - return !!forEachChild(node, nodeImmediatelyReferencesSuperOrThis); - } - function checkAccessorDeclaration(node) { - if (isIdentifier(node.name) && idText(node.name) === "constructor" && isClassLike(node.parent)) { - error2(node.name, Diagnostics.Class_constructor_may_not_be_an_accessor); - } - addLazyDiagnostic(checkAccessorDeclarationDiagnostics); - checkSourceElement(node.body); - setNodeLinksForPrivateIdentifierScope(node); - function checkAccessorDeclarationDiagnostics() { - if (!checkGrammarFunctionLikeDeclaration(node) && !checkGrammarAccessor(node)) - checkGrammarComputedPropertyName(node.name); - checkDecorators(node); - checkSignatureDeclaration(node); - if (node.kind === 177 /* GetAccessor */) { - if (!(node.flags & 33554432 /* Ambient */) && nodeIsPresent(node.body) && node.flags & 512 /* HasImplicitReturn */) { - if (!(node.flags & 1024 /* HasExplicitReturn */)) { - error2(node.name, Diagnostics.A_get_accessor_must_return_a_value); - } - } - } - if (node.name.kind === 167 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - } - if (hasBindableName(node)) { - const symbol = getSymbolOfDeclaration(node); - const getter = getDeclarationOfKind(symbol, 177 /* GetAccessor */); - const setter = getDeclarationOfKind(symbol, 178 /* SetAccessor */); - if (getter && setter && !(getNodeCheckFlags(getter) & 1 /* TypeChecked */)) { - getNodeLinks(getter).flags |= 1 /* TypeChecked */; - const getterFlags = getEffectiveModifierFlags(getter); - const setterFlags = getEffectiveModifierFlags(setter); - if ((getterFlags & 256 /* Abstract */) !== (setterFlags & 256 /* Abstract */)) { - error2(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); - error2(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); - } - if (getterFlags & 16 /* Protected */ && !(setterFlags & (16 /* Protected */ | 8 /* Private */)) || getterFlags & 8 /* Private */ && !(setterFlags & 8 /* Private */)) { - error2(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); - error2(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); - } - } - } - const returnType = getTypeOfAccessors(getSymbolOfDeclaration(node)); - if (node.kind === 177 /* GetAccessor */) { - checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType); - } - } - } - function checkMissingDeclaration(node) { - checkDecorators(node); - } - function getEffectiveTypeArgumentAtIndex(node, typeParameters, index) { - if (node.typeArguments && index < node.typeArguments.length) { - return getTypeFromTypeNode(node.typeArguments[index]); - } - return getEffectiveTypeArguments2(node, typeParameters)[index]; - } - function getEffectiveTypeArguments2(node, typeParameters) { - return fillMissingTypeArguments( - map(node.typeArguments, getTypeFromTypeNode), - typeParameters, - getMinTypeArgumentCount(typeParameters), - isInJSFile(node) - ); - } - function checkTypeArgumentConstraints(node, typeParameters) { - let typeArguments; - let mapper; - let result = true; - for (let i = 0; i < typeParameters.length; i++) { - const constraint = getConstraintOfTypeParameter(typeParameters[i]); - if (constraint) { - if (!typeArguments) { - typeArguments = getEffectiveTypeArguments2(node, typeParameters); - mapper = createTypeMapper(typeParameters, typeArguments); - } - result = result && checkTypeAssignableTo( - typeArguments[i], - instantiateType(constraint, mapper), - node.typeArguments[i], - Diagnostics.Type_0_does_not_satisfy_the_constraint_1 - ); - } - } - return result; - } - function getTypeParametersForTypeAndSymbol(type, symbol) { - if (!isErrorType(type)) { - return symbol.flags & 524288 /* TypeAlias */ && getSymbolLinks(symbol).typeParameters || (getObjectFlags(type) & 4 /* Reference */ ? type.target.localTypeParameters : void 0); - } - return void 0; - } - function getTypeParametersForTypeReferenceOrImport(node) { - const type = getTypeFromTypeNode(node); - if (!isErrorType(type)) { - const symbol = getNodeLinks(node).resolvedSymbol; - if (symbol) { - return getTypeParametersForTypeAndSymbol(type, symbol); - } - } - return void 0; - } - function checkTypeReferenceNode(node) { - checkGrammarTypeArguments(node, node.typeArguments); - if (node.kind === 183 /* TypeReference */ && !isInJSFile(node) && !isInJSDoc(node) && node.typeArguments && node.typeName.end !== node.typeArguments.pos) { - const sourceFile = getSourceFileOfNode(node); - if (scanTokenAtPosition(sourceFile, node.typeName.end) === 25 /* DotToken */) { - grammarErrorAtPos(node, skipTrivia(sourceFile.text, node.typeName.end), 1, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); - } - } - forEach(node.typeArguments, checkSourceElement); - checkTypeReferenceOrImport(node); - } - function checkTypeReferenceOrImport(node) { - const type = getTypeFromTypeNode(node); - if (!isErrorType(type)) { - if (node.typeArguments) { - addLazyDiagnostic(() => { - const typeParameters = getTypeParametersForTypeReferenceOrImport(node); - if (typeParameters) { - checkTypeArgumentConstraints(node, typeParameters); - } - }); - } - const symbol = getNodeLinks(node).resolvedSymbol; - if (symbol) { - if (some(symbol.declarations, (d) => isTypeDeclaration(d) && !!(d.flags & 536870912 /* Deprecated */))) { - addDeprecatedSuggestion( - getDeprecatedSuggestionNode(node), - symbol.declarations, - symbol.escapedName - ); - } - } - } - } - function getTypeArgumentConstraint(node) { - const typeReferenceNode = tryCast(node.parent, isTypeReferenceType); - if (!typeReferenceNode) - return void 0; - const typeParameters = getTypeParametersForTypeReferenceOrImport(typeReferenceNode); - if (!typeParameters) - return void 0; - const constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]); - return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments2(typeReferenceNode, typeParameters))); - } - function checkTypeQuery(node) { - getTypeFromTypeQueryNode(node); - } - function checkTypeLiteral(node) { - forEach(node.members, checkSourceElement); - addLazyDiagnostic(checkTypeLiteralDiagnostics); - function checkTypeLiteralDiagnostics() { - const type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - checkIndexConstraints(type, type.symbol); - checkTypeForDuplicateIndexSignatures(node); - checkObjectTypeForDuplicateDeclarations(node); - } - } - function checkArrayType(node) { - checkSourceElement(node.elementType); - } - function checkTupleType(node) { - const elementTypes = node.elements; - let seenOptionalElement = false; - let seenRestElement = false; - for (const e of elementTypes) { - const flags = getTupleElementFlags(e); - if (flags & 8 /* Variadic */) { - const type = getTypeFromTypeNode(e.type); - if (!isArrayLikeType(type)) { - error2(e, Diagnostics.A_rest_element_type_must_be_an_array_type); - break; - } - if (isArrayType(type) || isTupleType(type) && type.target.combinedFlags & 4 /* Rest */) { - seenRestElement = true; - } - } else if (flags & 4 /* Rest */) { - if (seenRestElement) { - grammarErrorOnNode(e, Diagnostics.A_rest_element_cannot_follow_another_rest_element); - break; - } - seenRestElement = true; - } else if (flags & 2 /* Optional */) { - if (seenRestElement) { - grammarErrorOnNode(e, Diagnostics.An_optional_element_cannot_follow_a_rest_element); - break; - } - seenOptionalElement = true; - } else if (seenOptionalElement) { - grammarErrorOnNode(e, Diagnostics.A_required_element_cannot_follow_an_optional_element); - break; - } - } - forEach(node.elements, checkSourceElement); - getTypeFromTypeNode(node); - } - function checkUnionOrIntersectionType(node) { - forEach(node.types, checkSourceElement); - getTypeFromTypeNode(node); - } - function checkIndexedAccessIndexType(type, accessNode) { - if (!(type.flags & 8388608 /* IndexedAccess */)) { - return type; - } - const objectType = type.objectType; - const indexType = type.indexType; - if (isTypeAssignableTo(indexType, getIndexType(objectType, 0 /* None */))) { - if (accessNode.kind === 212 /* ElementAccessExpression */ && isAssignmentTarget(accessNode) && getObjectFlags(objectType) & 32 /* Mapped */ && getMappedTypeModifiers(objectType) & 1 /* IncludeReadonly */) { - error2(accessNode, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType)); - } - return type; - } - const apparentObjectType = getApparentType(objectType); - if (getIndexInfoOfType(apparentObjectType, numberType) && isTypeAssignableToKind(indexType, 296 /* NumberLike */)) { - return type; - } - if (isGenericObjectType(objectType)) { - const propertyName = getPropertyNameFromIndex(indexType, accessNode); - if (propertyName) { - const propertySymbol = forEachType(apparentObjectType, (t) => getPropertyOfType(t, propertyName)); - if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 24 /* NonPublicAccessibilityModifier */) { - error2(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); - return errorType; - } - } - } - error2(accessNode, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(objectType)); - return errorType; - } - function checkIndexedAccessType(node) { - checkSourceElement(node.objectType); - checkSourceElement(node.indexType); - checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node); - } - function checkMappedType(node) { - checkGrammarMappedType(node); - checkSourceElement(node.typeParameter); - checkSourceElement(node.nameType); - checkSourceElement(node.type); - if (!node.type) { - reportImplicitAny(node, anyType); - } - const type = getTypeFromMappedTypeNode(node); - const nameType = getNameTypeFromMappedType(type); - if (nameType) { - checkTypeAssignableTo(nameType, keyofConstraintType, node.nameType); - } else { - const constraintType = getConstraintTypeFromMappedType(type); - checkTypeAssignableTo(constraintType, keyofConstraintType, getEffectiveConstraintOfTypeParameter(node.typeParameter)); - } - } - function checkGrammarMappedType(node) { - var _a; - if ((_a = node.members) == null ? void 0 : _a.length) { - return grammarErrorOnNode(node.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods); - } - } - function checkThisType(node) { - getTypeFromThisTypeNode(node); - } - function checkTypeOperator(node) { - checkGrammarTypeOperatorNode(node); - checkSourceElement(node.type); - } - function checkConditionalType(node) { - forEachChild(node, checkSourceElement); - } - function checkInferType(node) { - if (!findAncestor(node, (n) => n.parent && n.parent.kind === 194 /* ConditionalType */ && n.parent.extendsType === n)) { - grammarErrorOnNode(node, Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type); - } - checkSourceElement(node.typeParameter); - const symbol = getSymbolOfDeclaration(node.typeParameter); - if (symbol.declarations && symbol.declarations.length > 1) { - const links = getSymbolLinks(symbol); - if (!links.typeParametersChecked) { - links.typeParametersChecked = true; - const typeParameter = getDeclaredTypeOfTypeParameter(symbol); - const declarations = getDeclarationsOfKind(symbol, 168 /* TypeParameter */); - if (!areTypeParametersIdentical(declarations, [typeParameter], (decl) => [decl])) { - const name = symbolToString(symbol); - for (const declaration of declarations) { - error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_constraints, name); - } - } - } - } - registerForUnusedIdentifiersCheck(node); - } - function checkTemplateLiteralType(node) { - for (const span of node.templateSpans) { - checkSourceElement(span.type); - const type = getTypeFromTypeNode(span.type); - checkTypeAssignableTo(type, templateConstraintType, span.type); - } - getTypeFromTypeNode(node); - } - function checkImportType(node) { - checkSourceElement(node.argument); - if (node.assertions) { - const override = getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode); - if (override) { - if (!isNightly()) { - grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next); - } - if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) { - grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext); - } - } - } - checkTypeReferenceOrImport(node); - } - function checkNamedTupleMember(node) { - if (node.dotDotDotToken && node.questionToken) { - grammarErrorOnNode(node, Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest); - } - if (node.type.kind === 190 /* OptionalType */) { - grammarErrorOnNode(node.type, 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); - } - if (node.type.kind === 191 /* RestType */) { - grammarErrorOnNode(node.type, Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type); - } - checkSourceElement(node.type); - getTypeFromTypeNode(node); - } - function isPrivateWithinAmbient(node) { - return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); - } - function getEffectiveDeclarationFlags(n, flagsToCheck) { - let flags = getCombinedModifierFlagsCached(n); - if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { - const container = getEnclosingContainer(n); - if (container && container.flags & 128 /* ExportContext */ && !(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { - flags |= 1 /* Export */; - } - flags |= 2 /* Ambient */; - } - return flags & flagsToCheck; - } - function checkFunctionOrConstructorSymbol(symbol) { - addLazyDiagnostic(() => checkFunctionOrConstructorSymbolWorker(symbol)); - } - function checkFunctionOrConstructorSymbolWorker(symbol) { - function getCanonicalOverload(overloads, implementation) { - const implementationSharesContainerWithFirstOverload = implementation !== void 0 && implementation.parent === overloads[0].parent; - return implementationSharesContainerWithFirstOverload ? implementation : overloads[0]; - } - function checkFlagAgreementBetweenOverloads(overloads, implementation, flagsToCheck2, someOverloadFlags, allOverloadFlags) { - const someButNotAllOverloadFlags = someOverloadFlags ^ allOverloadFlags; - if (someButNotAllOverloadFlags !== 0) { - const canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck2); - forEach(overloads, (o) => { - const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags; - if (deviation & 1 /* Export */) { - error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); - } else if (deviation & 2 /* Ambient */) { - error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); - } else if (deviation & (8 /* Private */ | 16 /* Protected */)) { - error2(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); - } else if (deviation & 256 /* Abstract */) { - error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); - } - }); - } - } - function checkQuestionTokenAgreementBetweenOverloads(overloads, implementation, someHaveQuestionToken2, allHaveQuestionToken2) { - if (someHaveQuestionToken2 !== allHaveQuestionToken2) { - const canonicalHasQuestionToken = hasQuestionToken(getCanonicalOverload(overloads, implementation)); - forEach(overloads, (o) => { - const deviation = hasQuestionToken(o) !== canonicalHasQuestionToken; - if (deviation) { - error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_optional_or_required); - } - }); - } - } - const flagsToCheck = 1 /* Export */ | 2 /* Ambient */ | 8 /* Private */ | 16 /* Protected */ | 256 /* Abstract */; - let someNodeFlags = 0 /* None */; - let allNodeFlags = flagsToCheck; - let someHaveQuestionToken = false; - let allHaveQuestionToken = true; - let hasOverloads = false; - let bodyDeclaration; - let lastSeenNonAmbientDeclaration; - let previousDeclaration; - const declarations = symbol.declarations; - const isConstructor = (symbol.flags & 16384 /* Constructor */) !== 0; - function reportImplementationExpectedError(node) { - if (node.name && nodeIsMissing(node.name)) { - return; - } - let seen = false; - const subsequentNode = forEachChild(node.parent, (c) => { - if (seen) { - return c; - } else { - seen = c === node; - } - }); - if (subsequentNode && subsequentNode.pos === node.end) { - if (subsequentNode.kind === node.kind) { - const errorNode2 = subsequentNode.name || subsequentNode; - const subsequentName = subsequentNode.name; - if (node.name && subsequentName && // both are private identifiers - (isPrivateIdentifier(node.name) && isPrivateIdentifier(subsequentName) && node.name.escapedText === subsequentName.escapedText || // Both are computed property names - isComputedPropertyName(node.name) && isComputedPropertyName(subsequentName) && isTypeIdenticalTo(checkComputedPropertyName(node.name), checkComputedPropertyName(subsequentName)) || // Both are literal property names that are the same. - isPropertyNameLiteral(node.name) && isPropertyNameLiteral(subsequentName) && getEscapedTextOfIdentifierOrLiteral(node.name) === getEscapedTextOfIdentifierOrLiteral(subsequentName))) { - const reportError = (node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */) && isStatic(node) !== isStatic(subsequentNode); - if (reportError) { - const diagnostic = isStatic(node) ? Diagnostics.Function_overload_must_be_static : Diagnostics.Function_overload_must_not_be_static; - error2(errorNode2, diagnostic); - } - return; - } - if (nodeIsPresent(subsequentNode.body)) { - error2(errorNode2, Diagnostics.Function_implementation_name_must_be_0, declarationNameToString(node.name)); - return; - } - } - } - const errorNode = node.name || node; - if (isConstructor) { - error2(errorNode, Diagnostics.Constructor_implementation_is_missing); - } else { - if (hasSyntacticModifier(node, 256 /* Abstract */)) { - error2(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); - } else { - error2(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); - } - } - } - let duplicateFunctionDeclaration = false; - let multipleConstructorImplementation = false; - let hasNonAmbientClass = false; - const functionDeclarations = []; - if (declarations) { - for (const current of declarations) { - const node = current; - const inAmbientContext = node.flags & 33554432 /* Ambient */; - const inAmbientContextOrInterface = node.parent && (node.parent.kind === 264 /* InterfaceDeclaration */ || node.parent.kind === 187 /* TypeLiteral */) || inAmbientContext; - if (inAmbientContextOrInterface) { - previousDeclaration = void 0; - } - if ((node.kind === 263 /* ClassDeclaration */ || node.kind === 231 /* ClassExpression */) && !inAmbientContext) { - hasNonAmbientClass = true; - } - if (node.kind === 262 /* FunctionDeclaration */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 176 /* Constructor */) { - functionDeclarations.push(node); - const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); - someNodeFlags |= currentNodeFlags; - allNodeFlags &= currentNodeFlags; - someHaveQuestionToken = someHaveQuestionToken || hasQuestionToken(node); - allHaveQuestionToken = allHaveQuestionToken && hasQuestionToken(node); - const bodyIsPresent = nodeIsPresent(node.body); - if (bodyIsPresent && bodyDeclaration) { - if (isConstructor) { - multipleConstructorImplementation = true; - } else { - duplicateFunctionDeclaration = true; - } - } else if ((previousDeclaration == null ? void 0 : previousDeclaration.parent) === node.parent && previousDeclaration.end !== node.pos) { - reportImplementationExpectedError(previousDeclaration); - } - if (bodyIsPresent) { - if (!bodyDeclaration) { - bodyDeclaration = node; - } - } else { - hasOverloads = true; - } - previousDeclaration = node; - if (!inAmbientContextOrInterface) { - lastSeenNonAmbientDeclaration = node; - } - } - if (isInJSFile(current) && isFunctionLike(current) && current.jsDoc) { - for (const node2 of current.jsDoc) { - if (node2.tags) { - for (const tag of node2.tags) { - if (isJSDocOverloadTag(tag)) { - hasOverloads = true; - } - } - } - } - } - } - } - if (multipleConstructorImplementation) { - forEach(functionDeclarations, (declaration) => { - error2(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); - }); - } - if (duplicateFunctionDeclaration) { - forEach(functionDeclarations, (declaration) => { - error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_function_implementation); - }); - } - if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 /* Function */ && declarations) { - const relatedDiagnostics = filter(declarations, (d) => d.kind === 263 /* ClassDeclaration */).map((d) => createDiagnosticForNode(d, Diagnostics.Consider_adding_a_declare_modifier_to_this_class)); - forEach(declarations, (declaration) => { - const diagnostic = declaration.kind === 263 /* ClassDeclaration */ ? Diagnostics.Class_declaration_cannot_implement_overload_list_for_0 : declaration.kind === 262 /* FunctionDeclaration */ ? Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient : void 0; - if (diagnostic) { - addRelatedInfo( - error2(getNameOfDeclaration(declaration) || declaration, diagnostic, symbolName(symbol)), - ...relatedDiagnostics - ); - } - }); - } - if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 256 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) { - reportImplementationExpectedError(lastSeenNonAmbientDeclaration); - } - if (hasOverloads) { - if (declarations) { - checkFlagAgreementBetweenOverloads(declarations, bodyDeclaration, flagsToCheck, someNodeFlags, allNodeFlags); - checkQuestionTokenAgreementBetweenOverloads(declarations, bodyDeclaration, someHaveQuestionToken, allHaveQuestionToken); - } - if (bodyDeclaration) { - const signatures = getSignaturesOfSymbol(symbol); - const bodySignature = getSignatureFromDeclaration(bodyDeclaration); - for (const signature of signatures) { - if (!isImplementationCompatibleWithOverload(bodySignature, signature)) { - const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration; - addRelatedInfo( - error2(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature), - createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here) - ); - break; - } - } - } - } - } - function checkExportsOnMergedDeclarations(node) { - addLazyDiagnostic(() => checkExportsOnMergedDeclarationsWorker(node)); - } - function checkExportsOnMergedDeclarationsWorker(node) { - let symbol = node.localSymbol; - if (!symbol) { - symbol = getSymbolOfDeclaration(node); - if (!symbol.exportSymbol) { - return; - } - } - if (getDeclarationOfKind(symbol, node.kind) !== node) { - return; - } - let exportedDeclarationSpaces = 0 /* None */; - let nonExportedDeclarationSpaces = 0 /* None */; - let defaultExportedDeclarationSpaces = 0 /* None */; - for (const d of symbol.declarations) { - const declarationSpaces = getDeclarationSpaces(d); - const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 1 /* Export */ | 1024 /* Default */); - if (effectiveDeclarationFlags & 1 /* Export */) { - if (effectiveDeclarationFlags & 1024 /* Default */) { - defaultExportedDeclarationSpaces |= declarationSpaces; - } else { - exportedDeclarationSpaces |= declarationSpaces; - } - } else { - nonExportedDeclarationSpaces |= declarationSpaces; - } - } - const nonDefaultExportedDeclarationSpaces = exportedDeclarationSpaces | nonExportedDeclarationSpaces; - const commonDeclarationSpacesForExportsAndLocals = exportedDeclarationSpaces & nonExportedDeclarationSpaces; - const commonDeclarationSpacesForDefaultAndNonDefault = defaultExportedDeclarationSpaces & nonDefaultExportedDeclarationSpaces; - if (commonDeclarationSpacesForExportsAndLocals || commonDeclarationSpacesForDefaultAndNonDefault) { - for (const d of symbol.declarations) { - const declarationSpaces = getDeclarationSpaces(d); - const name = getNameOfDeclaration(d); - if (declarationSpaces & commonDeclarationSpacesForDefaultAndNonDefault) { - error2(name, Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead, declarationNameToString(name)); - } else if (declarationSpaces & commonDeclarationSpacesForExportsAndLocals) { - error2(name, Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, declarationNameToString(name)); - } - } - } - function getDeclarationSpaces(decl) { - let d = decl; - switch (d.kind) { - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 353 /* JSDocTypedefTag */: - case 345 /* JSDocCallbackTag */: - case 347 /* JSDocEnumTag */: - return 2 /* ExportType */; - case 267 /* ModuleDeclaration */: - return isAmbientModule(d) || getModuleInstanceState(d) !== 0 /* NonInstantiated */ ? 4 /* ExportNamespace */ | 1 /* ExportValue */ : 4 /* ExportNamespace */; - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - return 2 /* ExportType */ | 1 /* ExportValue */; - case 312 /* SourceFile */: - return 2 /* ExportType */ | 1 /* ExportValue */ | 4 /* ExportNamespace */; - case 277 /* ExportAssignment */: - case 226 /* BinaryExpression */: - const node2 = d; - const expression = isExportAssignment(node2) ? node2.expression : node2.right; - if (!isEntityNameExpression(expression)) { - return 1 /* ExportValue */; - } - d = expression; - case 271 /* ImportEqualsDeclaration */: - case 274 /* NamespaceImport */: - case 273 /* ImportClause */: - let result = 0 /* None */; - const target = resolveAlias(getSymbolOfDeclaration(d)); - forEach(target.declarations, (d2) => { - result |= getDeclarationSpaces(d2); - }); - return result; - case 260 /* VariableDeclaration */: - case 208 /* BindingElement */: - case 262 /* FunctionDeclaration */: - case 276 /* ImportSpecifier */: - case 80 /* Identifier */: - return 1 /* ExportValue */; - case 173 /* MethodSignature */: - case 171 /* PropertySignature */: - return 2 /* ExportType */; - default: - return Debug.failBadSyntaxKind(d); - } - } - } - function getAwaitedTypeOfPromise(type, errorNode, diagnosticMessage, ...args) { - const promisedType = getPromisedTypeOfPromise(type, errorNode); - return promisedType && getAwaitedType(promisedType, errorNode, diagnosticMessage, ...args); - } - function getPromisedTypeOfPromise(type, errorNode, thisTypeForErrorOut) { - if (isTypeAny(type)) { - return void 0; - } - const typeAsPromise = type; - if (typeAsPromise.promisedTypeOfPromise) { - return typeAsPromise.promisedTypeOfPromise; - } - if (isReferenceToType2(type, getGlobalPromiseType( - /*reportErrors*/ - false - ))) { - return typeAsPromise.promisedTypeOfPromise = getTypeArguments(type)[0]; - } - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { - return void 0; - } - const thenFunction = getTypeOfPropertyOfType(type, "then"); - if (isTypeAny(thenFunction)) { - return void 0; - } - const thenSignatures = thenFunction ? getSignaturesOfType(thenFunction, 0 /* Call */) : emptyArray; - if (thenSignatures.length === 0) { - if (errorNode) { - error2(errorNode, Diagnostics.A_promise_must_have_a_then_method); - } - return void 0; - } - let thisTypeForError; - let candidates; - for (const thenSignature of thenSignatures) { - const thisType = getThisTypeOfSignature(thenSignature); - if (thisType && thisType !== voidType && !isTypeRelatedTo(type, thisType, subtypeRelation)) { - thisTypeForError = thisType; - } else { - candidates = append(candidates, thenSignature); - } - } - if (!candidates) { - Debug.assertIsDefined(thisTypeForError); - if (thisTypeForErrorOut) { - thisTypeForErrorOut.value = thisTypeForError; - } - if (errorNode) { - error2(errorNode, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForError)); - } - return void 0; - } - const onfulfilledParameterType = getTypeWithFacts(getUnionType(map(candidates, getTypeOfFirstParameterOfSignature)), 2097152 /* NEUndefinedOrNull */); - if (isTypeAny(onfulfilledParameterType)) { - return void 0; - } - const onfulfilledParameterSignatures = getSignaturesOfType(onfulfilledParameterType, 0 /* Call */); - if (onfulfilledParameterSignatures.length === 0) { - if (errorNode) { - error2(errorNode, Diagnostics.The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback); - } - return void 0; - } - return typeAsPromise.promisedTypeOfPromise = getUnionType(map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), 2 /* Subtype */); - } - function checkAwaitedType(type, withAlias, errorNode, diagnosticMessage, ...args) { - const awaitedType = withAlias ? getAwaitedType(type, errorNode, diagnosticMessage, ...args) : getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, ...args); - return awaitedType || errorType; - } - function isThenableType(type) { - if (allTypesAssignableToKind(getBaseConstraintOrType(type), 402784252 /* Primitive */ | 131072 /* Never */)) { - return false; - } - const thenFunction = getTypeOfPropertyOfType(type, "then"); - return !!thenFunction && getSignaturesOfType(getTypeWithFacts(thenFunction, 2097152 /* NEUndefinedOrNull */), 0 /* Call */).length > 0; - } - function isAwaitedTypeInstantiation(type) { - var _a; - if (type.flags & 16777216 /* Conditional */) { - const awaitedSymbol = getGlobalAwaitedSymbol( - /*reportErrors*/ - false - ); - return !!awaitedSymbol && type.aliasSymbol === awaitedSymbol && ((_a = type.aliasTypeArguments) == null ? void 0 : _a.length) === 1; - } - return false; - } - function unwrapAwaitedType(type) { - return type.flags & 1048576 /* Union */ ? mapType(type, unwrapAwaitedType) : isAwaitedTypeInstantiation(type) ? type.aliasTypeArguments[0] : type; - } - function isAwaitedTypeNeeded(type) { - if (isTypeAny(type) || isAwaitedTypeInstantiation(type)) { - return false; - } - if (isGenericObjectType(type)) { - const baseConstraint = getBaseConstraintOfType(type); - if (baseConstraint ? baseConstraint.flags & 3 /* AnyOrUnknown */ || isEmptyObjectType(baseConstraint) || someType(baseConstraint, isThenableType) : maybeTypeOfKind(type, 8650752 /* TypeVariable */)) { - return true; - } - } - return false; - } - function tryCreateAwaitedType(type) { - const awaitedSymbol = getGlobalAwaitedSymbol( - /*reportErrors*/ - true - ); - if (awaitedSymbol) { - return getTypeAliasInstantiation(awaitedSymbol, [unwrapAwaitedType(type)]); - } - return void 0; - } - function createAwaitedTypeIfNeeded(type) { - if (isAwaitedTypeNeeded(type)) { - const awaitedType = tryCreateAwaitedType(type); - if (awaitedType) { - return awaitedType; - } - } - Debug.assert(isAwaitedTypeInstantiation(type) || getPromisedTypeOfPromise(type) === void 0, "type provided should not be a non-generic 'promise'-like."); - return type; - } - function getAwaitedType(type, errorNode, diagnosticMessage, ...args) { - const awaitedType = getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, ...args); - return awaitedType && createAwaitedTypeIfNeeded(awaitedType); - } - function getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, ...args) { - if (isTypeAny(type)) { - return type; - } - if (isAwaitedTypeInstantiation(type)) { - return type; - } - const typeAsAwaitable = type; - if (typeAsAwaitable.awaitedTypeOfType) { - return typeAsAwaitable.awaitedTypeOfType; - } - if (type.flags & 1048576 /* Union */) { - if (awaitedTypeStack.lastIndexOf(type.id) >= 0) { - if (errorNode) { - error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); - } - return void 0; - } - const mapper = errorNode ? (constituentType) => getAwaitedTypeNoAlias(constituentType, errorNode, diagnosticMessage, ...args) : getAwaitedTypeNoAlias; - awaitedTypeStack.push(type.id); - const mapped = mapType(type, mapper); - awaitedTypeStack.pop(); - return typeAsAwaitable.awaitedTypeOfType = mapped; - } - if (isAwaitedTypeNeeded(type)) { - return typeAsAwaitable.awaitedTypeOfType = type; - } - const thisTypeForErrorOut = { value: void 0 }; - const promisedType = getPromisedTypeOfPromise( - type, - /*errorNode*/ - void 0, - thisTypeForErrorOut - ); - if (promisedType) { - if (type.id === promisedType.id || awaitedTypeStack.lastIndexOf(promisedType.id) >= 0) { - if (errorNode) { - error2(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); - } - return void 0; - } - awaitedTypeStack.push(type.id); - const awaitedType = getAwaitedTypeNoAlias(promisedType, errorNode, diagnosticMessage, ...args); - awaitedTypeStack.pop(); - if (!awaitedType) { - return void 0; - } - return typeAsAwaitable.awaitedTypeOfType = awaitedType; - } - if (isThenableType(type)) { - if (errorNode) { - Debug.assertIsDefined(diagnosticMessage); - let chain; - if (thisTypeForErrorOut.value) { - chain = chainDiagnosticMessages(chain, Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1, typeToString(type), typeToString(thisTypeForErrorOut.value)); - } - chain = chainDiagnosticMessages(chain, diagnosticMessage, ...args); - diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorNode), errorNode, chain)); - } - return void 0; - } - return typeAsAwaitable.awaitedTypeOfType = type; - } - function checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation) { - const returnType = getTypeFromTypeNode(returnTypeNode); - if (languageVersion >= 2 /* ES2015 */) { - if (isErrorType(returnType)) { - return; - } - const globalPromiseType = getGlobalPromiseType( - /*reportErrors*/ - true - ); - if (globalPromiseType !== emptyGenericType && !isReferenceToType2(returnType, globalPromiseType)) { - reportErrorForInvalidReturnType(Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, returnTypeNode, returnTypeErrorLocation, typeToString(getAwaitedTypeNoAlias(returnType) || voidType)); - return; - } - } else { - markTypeNodeAsReferenced(returnTypeNode); - if (isErrorType(returnType)) { - return; - } - const promiseConstructorName = getEntityNameFromTypeNode(returnTypeNode); - if (promiseConstructorName === void 0) { - reportErrorForInvalidReturnType(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, returnTypeNode, returnTypeErrorLocation, typeToString(returnType)); - return; - } - const promiseConstructorSymbol = resolveEntityName( - promiseConstructorName, - 111551 /* Value */, - /*ignoreErrors*/ - true - ); - const promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : errorType; - if (isErrorType(promiseConstructorType)) { - if (promiseConstructorName.kind === 80 /* Identifier */ && promiseConstructorName.escapedText === "Promise" && getTargetType(returnType) === getGlobalPromiseType( - /*reportErrors*/ - false - )) { - error2(returnTypeErrorLocation, 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); - } else { - reportErrorForInvalidReturnType(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, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); - } - return; - } - const globalPromiseConstructorLikeType = getGlobalPromiseConstructorLikeType( - /*reportErrors*/ - true - ); - if (globalPromiseConstructorLikeType === emptyObjectType) { - reportErrorForInvalidReturnType(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, returnTypeNode, returnTypeErrorLocation, entityNameToString(promiseConstructorName)); - return; - } - const headMessage = 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; - const errorInfo = () => returnTypeNode === returnTypeErrorLocation ? void 0 : chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type - ); - if (!checkTypeAssignableTo(promiseConstructorType, globalPromiseConstructorLikeType, returnTypeErrorLocation, headMessage, errorInfo)) { - return; - } - const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); - const collidingSymbol = getSymbol2(node.locals, rootName.escapedText, 111551 /* Value */); - if (collidingSymbol) { - error2( - collidingSymbol.valueDeclaration, - Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, - idText(rootName), - entityNameToString(promiseConstructorName) - ); - return; - } - } - checkAwaitedType( - returnType, - /*withAlias*/ - false, - node, - Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member - ); - function reportErrorForInvalidReturnType(message, returnTypeNode2, returnTypeErrorLocation2, typeName) { - if (returnTypeNode2 === returnTypeErrorLocation2) { - error2(returnTypeErrorLocation2, message, typeName); - } else { - const diag2 = error2(returnTypeErrorLocation2, Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type); - addRelatedInfo(diag2, createDiagnosticForNode(returnTypeNode2, message, typeName)); - } - } - } - function checkDecorator(node) { - const signature = getResolvedSignature(node); - checkDeprecatedSignature(signature, node); - const returnType = getReturnTypeOfSignature(signature); - if (returnType.flags & 1 /* Any */) { - return; - } - const decoratorSignature = getDecoratorCallSignature(node); - if (!(decoratorSignature == null ? void 0 : decoratorSignature.resolvedReturnType)) - return; - let headMessage; - const expectedReturnType = decoratorSignature.resolvedReturnType; - switch (node.parent.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; - break; - case 172 /* PropertyDeclaration */: - if (!legacyDecorators) { - headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; - break; - } - case 169 /* Parameter */: - headMessage = Diagnostics.Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any; - break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - headMessage = Diagnostics.Decorator_function_return_type_0_is_not_assignable_to_type_1; - break; - default: - return Debug.failBadSyntaxKind(node.parent); - } - checkTypeAssignableTo(returnType, expectedReturnType, node.expression, headMessage); - } - function createCallSignature(typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount = parameters.length, flags = 0 /* None */) { - const decl = factory.createFunctionTypeNode( - /*typeParameters*/ - void 0, - emptyArray, - factory.createKeywordTypeNode(133 /* AnyKeyword */) - ); - return createSignature(decl, typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags); - } - function createFunctionType(typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags) { - const signature = createCallSignature(typeParameters, thisParameter, parameters, returnType, typePredicate, minArgumentCount, flags); - return getOrCreateTypeFromSignature(signature); - } - function createGetterFunctionType(type) { - return createFunctionType( - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - emptyArray, - type - ); - } - function createSetterFunctionType(type) { - const valueParam = createParameter("value", type); - return createFunctionType( - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - [valueParam], - voidType - ); - } - function markTypeNodeAsReferenced(node) { - markEntityNameOrEntityExpressionAsReference( - node && getEntityNameFromTypeNode(node), - /*forDecoratorMetadata*/ - false - ); - } - function markEntityNameOrEntityExpressionAsReference(typeName, forDecoratorMetadata) { - if (!typeName) - return; - const rootName = getFirstIdentifier(typeName); - const meaning = (typeName.kind === 80 /* Identifier */ ? 788968 /* Type */ : 1920 /* Namespace */) | 2097152 /* Alias */; - const rootSymbol = resolveName( - rootName, - rootName.escapedText, - meaning, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - true - ); - if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */) { - if (canCollectSymbolAliasAccessabilityData && symbolIsValue(rootSymbol) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(rootSymbol)) && !getTypeOnlyAliasDeclaration(rootSymbol)) { - markAliasSymbolAsReferenced(rootSymbol); - } else if (forDecoratorMetadata && getIsolatedModules(compilerOptions) && getEmitModuleKind(compilerOptions) >= 5 /* ES2015 */ && !symbolIsValue(rootSymbol) && !some(rootSymbol.declarations, isTypeOnlyImportOrExportDeclaration)) { - const diag2 = error2(typeName, Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled); - const aliasDeclaration = find(rootSymbol.declarations || emptyArray, isAliasSymbolDeclaration2); - if (aliasDeclaration) { - addRelatedInfo(diag2, createDiagnosticForNode(aliasDeclaration, Diagnostics._0_was_imported_here, idText(rootName))); - } - } - } - } - function markDecoratorMedataDataTypeNodeAsReferenced(node) { - const entityName = getEntityNameForDecoratorMetadata(node); - if (entityName && isEntityName(entityName)) { - markEntityNameOrEntityExpressionAsReference( - entityName, - /*forDecoratorMetadata*/ - true - ); - } - } - function getEntityNameForDecoratorMetadata(node) { - if (node) { - switch (node.kind) { - case 193 /* IntersectionType */: - case 192 /* UnionType */: - return getEntityNameForDecoratorMetadataFromTypeList(node.types); - case 194 /* ConditionalType */: - return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]); - case 196 /* ParenthesizedType */: - case 202 /* NamedTupleMember */: - return getEntityNameForDecoratorMetadata(node.type); - case 183 /* TypeReference */: - return node.typeName; - } - } - } - function getEntityNameForDecoratorMetadataFromTypeList(types) { - let commonEntityName; - for (let typeNode of types) { - while (typeNode.kind === 196 /* ParenthesizedType */ || typeNode.kind === 202 /* NamedTupleMember */) { - typeNode = typeNode.type; - } - if (typeNode.kind === 146 /* NeverKeyword */) { - continue; - } - if (!strictNullChecks && (typeNode.kind === 201 /* LiteralType */ && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { - continue; - } - const individualEntityName = getEntityNameForDecoratorMetadata(typeNode); - if (!individualEntityName) { - return void 0; - } - if (commonEntityName) { - if (!isIdentifier(commonEntityName) || !isIdentifier(individualEntityName) || commonEntityName.escapedText !== individualEntityName.escapedText) { - return void 0; - } - } else { - commonEntityName = individualEntityName; - } - } - return commonEntityName; - } - function getParameterTypeNodeForDecoratorCheck(node) { - const typeNode = getEffectiveTypeAnnotationNode(node); - return isRestParameter(node) ? getRestParameterElementType(typeNode) : typeNode; - } - function checkDecorators(node) { - if (!canHaveDecorators(node) || !hasDecorators(node) || !node.modifiers || !nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - return; - } - const firstDecorator = find(node.modifiers, isDecorator); - if (!firstDecorator) { - return; - } - if (legacyDecorators) { - checkExternalEmitHelpers(firstDecorator, 8 /* Decorate */); - if (node.kind === 169 /* Parameter */) { - checkExternalEmitHelpers(firstDecorator, 32 /* Param */); - } - } else if (languageVersion < 99 /* ESNext */) { - checkExternalEmitHelpers(firstDecorator, 8 /* ESDecorateAndRunInitializers */); - if (isClassDeclaration(node)) { - if (!node.name) { - checkExternalEmitHelpers(firstDecorator, 8388608 /* SetFunctionName */); - } else { - const member = getFirstTransformableStaticClassElement(node); - if (member) { - checkExternalEmitHelpers(firstDecorator, 8388608 /* SetFunctionName */); - } - } - } else if (!isClassExpression(node)) { - if (isPrivateIdentifier(node.name) && (isMethodDeclaration(node) || isAccessor(node) || isAutoAccessorPropertyDeclaration(node))) { - checkExternalEmitHelpers(firstDecorator, 8388608 /* SetFunctionName */); - } - if (isComputedPropertyName(node.name)) { - checkExternalEmitHelpers(firstDecorator, 16777216 /* PropKey */); - } - } - } - if (compilerOptions.emitDecoratorMetadata) { - checkExternalEmitHelpers(firstDecorator, 16 /* Metadata */); - switch (node.kind) { - case 263 /* ClassDeclaration */: - const constructor = getFirstConstructorWithBody(node); - if (constructor) { - for (const parameter of constructor.parameters) { - markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); - } - } - break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - const otherKind = node.kind === 177 /* GetAccessor */ ? 178 /* SetAccessor */ : 177 /* GetAccessor */; - const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(node), otherKind); - markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor)); - break; - case 174 /* MethodDeclaration */: - for (const parameter of node.parameters) { - markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); - } - markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(node)); - break; - case 172 /* PropertyDeclaration */: - markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveTypeAnnotationNode(node)); - break; - case 169 /* Parameter */: - markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node)); - const containingSignature = node.parent; - for (const parameter of containingSignature.parameters) { - markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter)); - } - markDecoratorMedataDataTypeNodeAsReferenced(getEffectiveReturnTypeNode(containingSignature)); - break; - } - } - for (const modifier of node.modifiers) { - if (isDecorator(modifier)) { - checkDecorator(modifier); - } - } - } - function checkFunctionDeclaration(node) { - addLazyDiagnostic(checkFunctionDeclarationDiagnostics); - function checkFunctionDeclarationDiagnostics() { - checkFunctionOrMethodDeclaration(node); - checkGrammarForGenerator(node); - checkCollisionsForDeclarationName(node, node.name); - } - } - function checkJSDocTypeAliasTag(node) { - if (!node.typeExpression) { - error2(node.name, Diagnostics.JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags); - } - if (node.name) { - checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); - } - checkSourceElement(node.typeExpression); - checkTypeParameters(getEffectiveTypeParameterDeclarations(node)); - } - function checkJSDocTemplateTag(node) { - checkSourceElement(node.constraint); - for (const tp of node.typeParameters) { - checkSourceElement(tp); - } - } - function checkJSDocTypeTag(node) { - checkSourceElement(node.typeExpression); - } - function checkJSDocSatisfiesTag(node) { - checkSourceElement(node.typeExpression); - const host2 = getEffectiveJSDocHost(node); - if (host2) { - const tags = getAllJSDocTags(host2, isJSDocSatisfiesTag); - if (length(tags) > 1) { - for (let i = 1; i < length(tags); i++) { - const tagName = tags[i].tagName; - error2(tagName, Diagnostics._0_tag_already_specified, idText(tagName)); - } - } - } - } - function checkJSDocLinkLikeTag(node) { - if (node.name) { - resolveJSDocMemberName( - node.name, - /*ignoreErrors*/ - true - ); - } - } - function checkJSDocParameterTag(node) { - checkSourceElement(node.typeExpression); - } - function checkJSDocPropertyTag(node) { - checkSourceElement(node.typeExpression); - } - function checkJSDocFunctionType(node) { - addLazyDiagnostic(checkJSDocFunctionTypeImplicitAny); - checkSignatureDeclaration(node); - function checkJSDocFunctionTypeImplicitAny() { - if (!node.type && !isJSDocConstructSignature(node)) { - reportImplicitAny(node, anyType); - } - } - } - function checkJSDocImplementsTag(node) { - const classLike = getEffectiveJSDocHost(node); - if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { - error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); - } - } - function checkJSDocAugmentsTag(node) { - const classLike = getEffectiveJSDocHost(node); - if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { - error2(classLike, Diagnostics.JSDoc_0_is_not_attached_to_a_class, idText(node.tagName)); - return; - } - const augmentsTags = getJSDocTags(classLike).filter(isJSDocAugmentsTag); - Debug.assert(augmentsTags.length > 0); - if (augmentsTags.length > 1) { - error2(augmentsTags[1], Diagnostics.Class_declarations_cannot_have_more_than_one_augments_or_extends_tag); - } - const name = getIdentifierFromEntityNameExpression(node.class.expression); - const extend2 = getClassExtendsHeritageElement(classLike); - if (extend2) { - const className = getIdentifierFromEntityNameExpression(extend2.expression); - if (className && name.escapedText !== className.escapedText) { - error2(name, Diagnostics.JSDoc_0_1_does_not_match_the_extends_2_clause, idText(node.tagName), idText(name), idText(className)); - } - } - } - function checkJSDocAccessibilityModifiers(node) { - const host2 = getJSDocHost(node); - if (host2 && isPrivateIdentifierClassElementDeclaration(host2)) { - error2(node, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); - } - } - function getIdentifierFromEntityNameExpression(node) { - switch (node.kind) { - case 80 /* Identifier */: - return node; - case 211 /* PropertyAccessExpression */: - return node.name; - default: - return void 0; - } - } - function checkFunctionOrMethodDeclaration(node) { - var _a; - checkDecorators(node); - checkSignatureDeclaration(node); - const functionFlags = getFunctionFlags(node); - if (node.name && node.name.kind === 167 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - } - if (hasBindableName(node)) { - const symbol = getSymbolOfDeclaration(node); - const localSymbol = node.localSymbol || symbol; - const firstDeclaration = (_a = localSymbol.declarations) == null ? void 0 : _a.find( - // Get first non javascript function declaration - (declaration) => declaration.kind === node.kind && !(declaration.flags & 524288 /* JavaScriptFile */) - ); - if (node === firstDeclaration) { - checkFunctionOrConstructorSymbol(localSymbol); - } - if (symbol.parent) { - checkFunctionOrConstructorSymbol(symbol); - } - } - const body = node.kind === 173 /* MethodSignature */ ? void 0 : node.body; - checkSourceElement(body); - checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node)); - addLazyDiagnostic(checkFunctionOrMethodDeclarationDiagnostics); - if (isInJSFile(node)) { - const typeTag = getJSDocTypeTag(node); - if (typeTag && typeTag.typeExpression && !getContextualCallSignature(getTypeFromTypeNode(typeTag.typeExpression), node)) { - error2(typeTag.typeExpression.type, Diagnostics.The_type_of_a_function_declaration_must_match_the_function_s_signature); - } - } - function checkFunctionOrMethodDeclarationDiagnostics() { - if (!getEffectiveReturnTypeNode(node)) { - if (nodeIsMissing(body) && !isPrivateWithinAmbient(node)) { - reportImplicitAny(node, anyType); - } - if (functionFlags & 1 /* Generator */ && nodeIsPresent(body)) { - getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - } - } - } - } - function registerForUnusedIdentifiersCheck(node) { - addLazyDiagnostic(registerForUnusedIdentifiersCheckDiagnostics); - function registerForUnusedIdentifiersCheckDiagnostics() { - const sourceFile = getSourceFileOfNode(node); - let potentiallyUnusedIdentifiers = allPotentiallyUnusedIdentifiers.get(sourceFile.path); - if (!potentiallyUnusedIdentifiers) { - potentiallyUnusedIdentifiers = []; - allPotentiallyUnusedIdentifiers.set(sourceFile.path, potentiallyUnusedIdentifiers); - } - potentiallyUnusedIdentifiers.push(node); - } - } - function checkUnusedIdentifiers(potentiallyUnusedIdentifiers, addDiagnostic) { - for (const node of potentiallyUnusedIdentifiers) { - switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - checkUnusedClassMembers(node, addDiagnostic); - checkUnusedTypeParameters(node, addDiagnostic); - break; - case 312 /* SourceFile */: - case 267 /* ModuleDeclaration */: - case 241 /* Block */: - case 269 /* CaseBlock */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - checkUnusedLocalsAndParameters(node, addDiagnostic); - break; - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - if (node.body) { - checkUnusedLocalsAndParameters(node, addDiagnostic); - } - checkUnusedTypeParameters(node, addDiagnostic); - break; - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: - checkUnusedTypeParameters(node, addDiagnostic); - break; - case 195 /* InferType */: - checkUnusedInferTypeParameter(node, addDiagnostic); - break; - default: - Debug.assertNever(node, "Node should not have been registered for unused identifiers check"); - } - } - } - function errorUnusedLocal(declaration, name, addDiagnostic) { - const node = getNameOfDeclaration(declaration) || declaration; - const message = isTypeDeclaration(declaration) ? Diagnostics._0_is_declared_but_never_used : Diagnostics._0_is_declared_but_its_value_is_never_read; - addDiagnostic(declaration, 0 /* Local */, createDiagnosticForNode(node, message, name)); - } - function isIdentifierThatStartsWithUnderscore(node) { - return isIdentifier(node) && idText(node).charCodeAt(0) === 95 /* _ */; - } - function checkUnusedClassMembers(node, addDiagnostic) { - for (const member of node.members) { - switch (member.kind) { - case 174 /* MethodDeclaration */: - case 172 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - if (member.kind === 178 /* SetAccessor */ && member.symbol.flags & 32768 /* GetAccessor */) { - break; - } - const symbol = getSymbolOfDeclaration(member); - if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { - addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); - } - break; - case 176 /* Constructor */: - for (const parameter of member.parameters) { - if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { - addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); - } - } - break; - case 181 /* IndexSignature */: - case 240 /* SemicolonClassElement */: - case 175 /* ClassStaticBlockDeclaration */: - break; - default: - Debug.fail("Unexpected class member"); - } - } - } - function checkUnusedInferTypeParameter(node, addDiagnostic) { - const { typeParameter } = node; - if (isTypeParameterUnused(typeParameter)) { - addDiagnostic(node, 1 /* Parameter */, createDiagnosticForNode(node, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(typeParameter.name))); - } - } - function checkUnusedTypeParameters(node, addDiagnostic) { - const declarations = getSymbolOfDeclaration(node).declarations; - if (!declarations || last(declarations) !== node) - return; - const typeParameters = getEffectiveTypeParameterDeclarations(node); - const seenParentsWithEveryUnused = /* @__PURE__ */ new Set(); - for (const typeParameter of typeParameters) { - if (!isTypeParameterUnused(typeParameter)) - continue; - const name = idText(typeParameter.name); - const { parent: parent2 } = typeParameter; - if (parent2.kind !== 195 /* InferType */ && parent2.typeParameters.every(isTypeParameterUnused)) { - if (tryAddToSet(seenParentsWithEveryUnused, parent2)) { - const sourceFile = getSourceFileOfNode(parent2); - const range = isJSDocTemplateTag(parent2) ? rangeOfNode(parent2) : rangeOfTypeParameters(sourceFile, parent2.typeParameters); - const only = parent2.typeParameters.length === 1; - const messageAndArg = only ? [Diagnostics._0_is_declared_but_its_value_is_never_read, name] : [Diagnostics.All_type_parameters_are_unused]; - addDiagnostic(typeParameter, 1 /* Parameter */, createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, ...messageAndArg)); - } - } else { - addDiagnostic(typeParameter, 1 /* Parameter */, createDiagnosticForNode(typeParameter, Diagnostics._0_is_declared_but_its_value_is_never_read, name)); - } - } - } - function isTypeParameterUnused(typeParameter) { - return !(getMergedSymbol(typeParameter.symbol).isReferenced & 262144 /* TypeParameter */) && !isIdentifierThatStartsWithUnderscore(typeParameter.name); - } - function addToGroup(map2, key, value, getKey) { - const keyString = String(getKey(key)); - const group2 = map2.get(keyString); - if (group2) { - group2[1].push(value); - } else { - map2.set(keyString, [key, [value]]); - } - } - function tryGetRootParameterDeclaration(node) { - return tryCast(getRootDeclaration(node), isParameter); - } - function isValidUnusedLocalDeclaration(declaration) { - if (isBindingElement(declaration)) { - if (isObjectBindingPattern(declaration.parent)) { - return !!(declaration.propertyName && isIdentifierThatStartsWithUnderscore(declaration.name)); - } - return isIdentifierThatStartsWithUnderscore(declaration.name); - } - return isAmbientModule(declaration) || (isVariableDeclaration(declaration) && isForInOrOfStatement(declaration.parent.parent) || isImportedDeclaration(declaration)) && isIdentifierThatStartsWithUnderscore(declaration.name); - } - function checkUnusedLocalsAndParameters(nodeWithLocals, addDiagnostic) { - const unusedImports = /* @__PURE__ */ new Map(); - const unusedDestructures = /* @__PURE__ */ new Map(); - const unusedVariables = /* @__PURE__ */ new Map(); - nodeWithLocals.locals.forEach((local) => { - if (local.flags & 262144 /* TypeParameter */ ? !(local.flags & 3 /* Variable */ && !(local.isReferenced & 3 /* Variable */)) : local.isReferenced || local.exportSymbol) { - return; - } - if (local.declarations) { - for (const declaration of local.declarations) { - if (isValidUnusedLocalDeclaration(declaration)) { - continue; - } - if (isImportedDeclaration(declaration)) { - addToGroup(unusedImports, importClauseFromImported(declaration), declaration, getNodeId); - } else if (isBindingElement(declaration) && isObjectBindingPattern(declaration.parent)) { - const lastElement = last(declaration.parent.elements); - if (declaration === lastElement || !last(declaration.parent.elements).dotDotDotToken) { - addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId); - } - } else if (isVariableDeclaration(declaration)) { - const blockScopeKind = getCombinedNodeFlagsCached(declaration) & 7 /* BlockScoped */; - const name = getNameOfDeclaration(declaration); - if (blockScopeKind !== 4 /* Using */ && blockScopeKind !== 6 /* AwaitUsing */ || !name || !isIdentifierThatStartsWithUnderscore(name)) { - addToGroup(unusedVariables, declaration.parent, declaration, getNodeId); - } - } else { - const parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration); - const name = local.valueDeclaration && getNameOfDeclaration(local.valueDeclaration); - if (parameter && name) { - if (!isParameterPropertyDeclaration(parameter, parameter.parent) && !parameterIsThisKeyword(parameter) && !isIdentifierThatStartsWithUnderscore(name)) { - if (isBindingElement(declaration) && isArrayBindingPattern(declaration.parent)) { - addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId); - } else { - addDiagnostic(parameter, 1 /* Parameter */, createDiagnosticForNode(name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolName(local))); - } - } - } else { - errorUnusedLocal(declaration, symbolName(local), addDiagnostic); - } - } - } - } - }); - unusedImports.forEach(([importClause, unuseds]) => { - const importDecl = importClause.parent; - const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); - if (nDeclarations === unuseds.length) { - addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); - } else { - for (const unused of unuseds) - errorUnusedLocal(unused, idText(unused.name), addDiagnostic); - } - }); - unusedDestructures.forEach(([bindingPattern, bindingElements]) => { - const kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 /* Parameter */ : 0 /* Local */; - if (bindingPattern.elements.length === bindingElements.length) { - if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) { - addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); - } else { - addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); - } - } else { - for (const e of bindingElements) { - addDiagnostic(e, kind, createDiagnosticForNode(e, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(e.name))); - } - } - }); - unusedVariables.forEach(([declarationList, declarations]) => { - if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); - } else { - for (const decl of declarations) { - addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); - } - } - }); - } - function checkPotentialUncheckedRenamedBindingElementsInTypes() { - var _a; - for (const node of potentialUnusedRenamedBindingElementsInTypes) { - if (!((_a = getSymbolOfDeclaration(node)) == null ? void 0 : _a.isReferenced)) { - const wrappingDeclaration = walkUpBindingElementsAndPatterns(node); - Debug.assert(isParameterDeclaration(wrappingDeclaration), "Only parameter declaration should be checked here"); - const diagnostic = createDiagnosticForNode(node.name, Diagnostics._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation, declarationNameToString(node.name), declarationNameToString(node.propertyName)); - if (!wrappingDeclaration.type) { - addRelatedInfo( - diagnostic, - createFileDiagnostic(getSourceFileOfNode(wrappingDeclaration), wrappingDeclaration.end, 1, Diagnostics.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here, declarationNameToString(node.propertyName)) - ); - } - diagnostics.add(diagnostic); - } - } - } - function bindingNameText(name) { - switch (name.kind) { - case 80 /* Identifier */: - return idText(name); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: - return bindingNameText(cast(first(name.elements), isBindingElement).name); - default: - return Debug.assertNever(name); - } - } - function isImportedDeclaration(node) { - return node.kind === 273 /* ImportClause */ || node.kind === 276 /* ImportSpecifier */ || node.kind === 274 /* NamespaceImport */; - } - function importClauseFromImported(decl) { - return decl.kind === 273 /* ImportClause */ ? decl : decl.kind === 274 /* NamespaceImport */ ? decl.parent : decl.parent.parent; - } - function checkBlock(node) { - if (node.kind === 241 /* Block */) { - checkGrammarStatementInAmbientContext(node); - } - if (isFunctionOrModuleBlock(node)) { - const saveFlowAnalysisDisabled = flowAnalysisDisabled; - forEach(node.statements, checkSourceElement); - flowAnalysisDisabled = saveFlowAnalysisDisabled; - } else { - forEach(node.statements, checkSourceElement); - } - if (node.locals) { - registerForUnusedIdentifiersCheck(node); - } - } - function checkCollisionWithArgumentsInGeneratedCode(node) { - if (languageVersion >= 2 /* ES2015 */ || !hasRestParameter(node) || node.flags & 33554432 /* Ambient */ || nodeIsMissing(node.body)) { - return; - } - forEach(node.parameters, (p) => { - if (p.name && !isBindingPattern(p.name) && p.name.escapedText === argumentsSymbol.escapedName) { - errorSkippedOn("noEmit", p, Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters); - } - }); - } - function needCollisionCheckForIdentifier(node, identifier, name) { - if ((identifier == null ? void 0 : identifier.escapedText) !== name) { - return false; - } - if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 174 /* MethodDeclaration */ || node.kind === 173 /* MethodSignature */ || node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */ || node.kind === 303 /* PropertyAssignment */) { - return false; - } - if (node.flags & 33554432 /* Ambient */) { - return false; - } - if (isImportClause(node) || isImportEqualsDeclaration(node) || isImportSpecifier(node)) { - if (isTypeOnlyImportOrExportDeclaration(node)) { - return false; - } - } - const root = getRootDeclaration(node); - if (isParameter(root) && nodeIsMissing(root.parent.body)) { - return false; - } - return true; - } - function checkIfThisIsCapturedInEnclosingScope(node) { - findAncestor(node, (current) => { - if (getNodeCheckFlags(current) & 4 /* CaptureThis */) { - const isDeclaration2 = node.kind !== 80 /* Identifier */; - if (isDeclaration2) { - error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); - } else { - error2(node, Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); - } - return true; - } - return false; - }); - } - function checkIfNewTargetIsCapturedInEnclosingScope(node) { - findAncestor(node, (current) => { - if (getNodeCheckFlags(current) & 8 /* CaptureNewTarget */) { - const isDeclaration2 = node.kind !== 80 /* Identifier */; - if (isDeclaration2) { - error2(getNameOfDeclaration(node), Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference); - } else { - error2(node, Diagnostics.Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference); - } - return true; - } - return false; - }); - } - function checkCollisionWithRequireExportsInGeneratedCode(node, name) { - if (moduleKind >= 5 /* ES2015 */ && !(moduleKind >= 100 /* Node16 */ && getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - return; - } - if (!name || !needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { - return; - } - if (isModuleDeclaration(node) && getModuleInstanceState(node) !== 1 /* Instantiated */) { - return; - } - const parent2 = getDeclarationContainer(node); - if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { - errorSkippedOn( - "noEmit", - name, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, - declarationNameToString(name), - declarationNameToString(name) - ); - } - } - function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) { - if (!name || languageVersion >= 4 /* ES2017 */ || !needCollisionCheckForIdentifier(node, name, "Promise")) { - return; - } - if (isModuleDeclaration(node) && getModuleInstanceState(node) !== 1 /* Instantiated */) { - return; - } - const parent2 = getDeclarationContainer(node); - if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 4096 /* HasAsyncFunctions */) { - errorSkippedOn( - "noEmit", - name, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, - declarationNameToString(name), - declarationNameToString(name) - ); - } - } - function recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name) { - if (languageVersion <= 8 /* ES2021 */ && (needCollisionCheckForIdentifier(node, name, "WeakMap") || needCollisionCheckForIdentifier(node, name, "WeakSet"))) { - potentialWeakMapSetCollisions.push(node); - } - } - function checkWeakMapSetCollision(node) { - const enclosingBlockScope = getEnclosingBlockScopeContainer(node); - if (getNodeCheckFlags(enclosingBlockScope) & 1048576 /* ContainsClassWithPrivateIdentifiers */) { - Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier"); - errorSkippedOn("noEmit", node, Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText); - } - } - function recordPotentialCollisionWithReflectInGeneratedCode(node, name) { - if (name && languageVersion >= 2 /* ES2015 */ && languageVersion <= 8 /* ES2021 */ && needCollisionCheckForIdentifier(node, name, "Reflect")) { - potentialReflectCollisions.push(node); - } - } - function checkReflectCollision(node) { - let hasCollision = false; - if (isClassExpression(node)) { - for (const member of node.members) { - if (getNodeCheckFlags(member) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { - hasCollision = true; - break; - } - } - } else if (isFunctionExpression(node)) { - if (getNodeCheckFlags(node) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { - hasCollision = true; - } - } else { - const container = getEnclosingBlockScopeContainer(node); - if (container && getNodeCheckFlags(container) & 2097152 /* ContainsSuperPropertyInStaticInitializer */) { - hasCollision = true; - } - } - if (hasCollision) { - Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name), "The target of a Reflect collision check should be an identifier"); - errorSkippedOn( - "noEmit", - node, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, - declarationNameToString(node.name), - "Reflect" - ); - } - } - function checkCollisionsForDeclarationName(node, name) { - if (!name) - return; - checkCollisionWithRequireExportsInGeneratedCode(node, name); - checkCollisionWithGlobalPromiseInGeneratedCode(node, name); - recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name); - recordPotentialCollisionWithReflectInGeneratedCode(node, name); - if (isClassLike(node)) { - checkTypeNameIsReserved(name, Diagnostics.Class_name_cannot_be_0); - if (!(node.flags & 33554432 /* Ambient */)) { - checkClassNameCollisionWithObject(name); - } - } else if (isEnumDeclaration(node)) { - checkTypeNameIsReserved(name, Diagnostics.Enum_name_cannot_be_0); - } - } - function checkVarDeclaredNamesNotShadowed(node) { - if ((getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */) !== 0 || isParameterDeclaration(node)) { - return; - } - const symbol = getSymbolOfDeclaration(node); - if (symbol.flags & 1 /* FunctionScopedVariable */) { - if (!isIdentifier(node.name)) - return Debug.fail(); - const localDeclarationSymbol = resolveName( - node, - node.name.escapedText, - 3 /* Variable */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - ); - if (localDeclarationSymbol && localDeclarationSymbol !== symbol && localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { - if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 7 /* BlockScoped */) { - const varDeclList = getAncestor(localDeclarationSymbol.valueDeclaration, 261 /* VariableDeclarationList */); - const container = varDeclList.parent.kind === 243 /* VariableStatement */ && varDeclList.parent.parent ? varDeclList.parent.parent : void 0; - const namesShareScope = container && (container.kind === 241 /* Block */ && isFunctionLike(container.parent) || container.kind === 268 /* ModuleBlock */ || container.kind === 267 /* ModuleDeclaration */ || container.kind === 312 /* SourceFile */); - if (!namesShareScope) { - const name = symbolToString(localDeclarationSymbol); - error2(node, Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name); - } - } - } - } - } - function convertAutoToAny(type) { - return type === autoType ? anyType : type === autoArrayType ? anyArrayType : type; - } - function checkVariableLikeDeclaration(node) { - var _a; - checkDecorators(node); - if (!isBindingElement(node)) { - checkSourceElement(node.type); - } - if (!node.name) { - return; - } - if (node.name.kind === 167 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - if (hasOnlyExpressionInitializer(node) && node.initializer) { - checkExpressionCached(node.initializer); - } - } - if (isBindingElement(node)) { - if (node.propertyName && isIdentifier(node.name) && isParameterDeclaration(node) && nodeIsMissing(getContainingFunction(node).body)) { - potentialUnusedRenamedBindingElementsInTypes.push(node); - return; - } - if (isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5 /* ES2018 */) { - checkExternalEmitHelpers(node, 4 /* Rest */); - } - if (node.propertyName && node.propertyName.kind === 167 /* ComputedPropertyName */) { - checkComputedPropertyName(node.propertyName); - } - const parent2 = node.parent.parent; - const parentCheckMode = node.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */; - const parentType = getTypeForBindingElementParent(parent2, parentCheckMode); - const name = node.propertyName || node.name; - if (parentType && !isBindingPattern(name)) { - const exprType = getLiteralTypeFromPropertyName(name); - if (isTypeUsableAsPropertyName(exprType)) { - const nameText = getPropertyNameFromType(exprType); - const property = getPropertyOfType(parentType, nameText); - if (property) { - markPropertyAsReferenced( - property, - /*nodeForCheckWriteOnly*/ - void 0, - /*isSelfTypeAccess*/ - false - ); - checkPropertyAccessibility( - node, - !!parent2.initializer && parent2.initializer.kind === 108 /* SuperKeyword */, - /*writing*/ - false, - parentType, - property - ); - } - } - } - } - if (isBindingPattern(node.name)) { - if (node.name.kind === 207 /* ArrayBindingPattern */ && languageVersion < 2 /* ES2015 */ && compilerOptions.downlevelIteration) { - checkExternalEmitHelpers(node, 512 /* Read */); - } - forEach(node.name.elements, checkSourceElement); - } - if (isParameter(node) && node.initializer && nodeIsMissing(getContainingFunction(node).body)) { - error2(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); - return; - } - if (isBindingPattern(node.name)) { - if (isInAmbientOrTypeNode(node)) { - return; - } - const needCheckInitializer = hasOnlyExpressionInitializer(node) && node.initializer && node.parent.parent.kind !== 249 /* ForInStatement */; - const needCheckWidenedType = !some(node.name.elements, not(isOmittedExpression)); - if (needCheckInitializer || needCheckWidenedType) { - const widenedType = getWidenedTypeForVariableLikeDeclaration(node); - if (needCheckInitializer) { - const initializerType = checkExpressionCached(node.initializer); - if (strictNullChecks && needCheckWidenedType) { - checkNonNullNonVoidType(initializerType, node); - } else { - checkTypeAssignableToAndOptionallyElaborate(initializerType, getWidenedTypeForVariableLikeDeclaration(node), node, node.initializer); - } - } - if (needCheckWidenedType) { - if (isArrayBindingPattern(node.name)) { - checkIteratedTypeOrElementType(65 /* Destructuring */, widenedType, undefinedType, node); - } else if (strictNullChecks) { - checkNonNullNonVoidType(widenedType, node); - } - } - } - return; - } - const symbol = getSymbolOfDeclaration(node); - if (symbol.flags & 2097152 /* Alias */ && (isVariableDeclarationInitializedToBareOrAccessedRequire(node) || isBindingElementOfBareOrAccessedRequire(node))) { - checkAliasSymbol(node); - return; - } - const type = convertAutoToAny(getTypeOfSymbol(symbol)); - if (node === symbol.valueDeclaration) { - const initializer = hasOnlyExpressionInitializer(node) && getEffectiveInitializer(node); - if (initializer) { - const isJSObjectLiteralInitializer = isInJSFile(node) && isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAccess(node.name)) && !!((_a = symbol.exports) == null ? void 0 : _a.size); - if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 249 /* ForInStatement */) { - const initializerType = checkExpressionCached(initializer); - checkTypeAssignableToAndOptionallyElaborate( - initializerType, - type, - node, - initializer, - /*headMessage*/ - void 0 - ); - const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; - if (blockScopeKind === 6 /* AwaitUsing */) { - const globalAsyncDisposableType = getGlobalAsyncDisposableType( - /*reportErrors*/ - true - ); - const globalDisposableType = getGlobalDisposableType( - /*reportErrors*/ - true - ); - if (globalAsyncDisposableType !== emptyObjectType && globalDisposableType !== emptyObjectType) { - const optionalDisposableType = getUnionType([globalAsyncDisposableType, globalDisposableType, nullType, undefinedType]); - checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_an_await_using_declaration_must_be_either_an_object_with_a_Symbol_asyncDispose_or_Symbol_dispose_method_or_be_null_or_undefined); - } - } else if (blockScopeKind === 4 /* Using */) { - const globalDisposableType = getGlobalDisposableType( - /*reportErrors*/ - true - ); - if (globalDisposableType !== emptyObjectType) { - const optionalDisposableType = getUnionType([globalDisposableType, nullType, undefinedType]); - checkTypeAssignableTo(initializerType, optionalDisposableType, initializer, Diagnostics.The_initializer_of_a_using_declaration_must_be_either_an_object_with_a_Symbol_dispose_method_or_be_null_or_undefined); - } - } - } - } - if (symbol.declarations && symbol.declarations.length > 1) { - if (some(symbol.declarations, (d) => d !== node && isVariableLike(d) && !areDeclarationFlagsIdentical(d, node))) { - error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); - } - } - } else { - const declarationType = convertAutoToAny(getWidenedTypeForVariableLikeDeclaration(node)); - if (!isErrorType(type) && !isErrorType(declarationType) && !isTypeIdenticalTo(type, declarationType) && !(symbol.flags & 67108864 /* Assignment */)) { - errorNextVariableOrPropertyDeclarationMustHaveSameType(symbol.valueDeclaration, type, node, declarationType); - } - if (hasOnlyExpressionInitializer(node) && node.initializer) { - checkTypeAssignableToAndOptionallyElaborate( - checkExpressionCached(node.initializer), - declarationType, - node, - node.initializer, - /*headMessage*/ - void 0 - ); - } - if (symbol.valueDeclaration && !areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) { - error2(node.name, Diagnostics.All_declarations_of_0_must_have_identical_modifiers, declarationNameToString(node.name)); - } - } - if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */) { - checkExportsOnMergedDeclarations(node); - if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { - checkVarDeclaredNamesNotShadowed(node); - } - checkCollisionsForDeclarationName(node, node.name); - } - } - function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) { - const nextDeclarationName = getNameOfDeclaration(nextDeclaration); - const message = nextDeclaration.kind === 172 /* PropertyDeclaration */ || nextDeclaration.kind === 171 /* PropertySignature */ ? Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2 : Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2; - const declName = declarationNameToString(nextDeclarationName); - const err = error2( - nextDeclarationName, - message, - declName, - typeToString(firstType), - typeToString(nextType) - ); - if (firstDeclaration) { - addRelatedInfo( - err, - createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName) - ); - } - } - function areDeclarationFlagsIdentical(left, right) { - if (left.kind === 169 /* Parameter */ && right.kind === 260 /* VariableDeclaration */ || left.kind === 260 /* VariableDeclaration */ && right.kind === 169 /* Parameter */) { - return true; - } - if (hasQuestionToken(left) !== hasQuestionToken(right)) { - return false; - } - const interestingFlags = 8 /* Private */ | 16 /* Protected */ | 512 /* Async */ | 256 /* Abstract */ | 64 /* Readonly */ | 32 /* Static */; - return getSelectedEffectiveModifierFlags(left, interestingFlags) === getSelectedEffectiveModifierFlags(right, interestingFlags); - } - function checkVariableDeclaration(node) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Check, "checkVariableDeclaration", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath }); - checkGrammarVariableDeclaration(node); - checkVariableLikeDeclaration(node); - (_b = tracing) == null ? void 0 : _b.pop(); - } - function checkBindingElement(node) { - checkGrammarBindingElement(node); - return checkVariableLikeDeclaration(node); - } - function checkVariableDeclarationList(node) { - const blockScopeKind = getCombinedNodeFlags(node) & 7 /* BlockScoped */; - if (blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */) { - checkExternalEmitHelpers(node, 33554432 /* AddDisposableResourceAndDisposeResources */); - } - forEach(node.declarations, checkSourceElement); - } - function checkVariableStatement(node) { - if (!checkGrammarModifiers(node) && !checkGrammarVariableDeclarationList(node.declarationList)) - checkGrammarForDisallowedBlockScopedVariableStatement(node); - checkVariableDeclarationList(node.declarationList); - } - function checkExpressionStatement(node) { - checkGrammarStatementInAmbientContext(node); - checkExpression(node.expression); - } - function checkIfStatement(node) { - checkGrammarStatementInAmbientContext(node); - const type = checkTruthinessExpression(node.expression); - checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement); - checkSourceElement(node.thenStatement); - if (node.thenStatement.kind === 242 /* EmptyStatement */) { - error2(node.thenStatement, Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement); - } - checkSourceElement(node.elseStatement); - } - function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, condType, body) { - if (!strictNullChecks) - return; - bothHelper(condExpr, body); - function bothHelper(condExpr2, body2) { - condExpr2 = skipParentheses(condExpr2); - helper(condExpr2, body2); - while (isBinaryExpression(condExpr2) && (condExpr2.operatorToken.kind === 57 /* BarBarToken */ || condExpr2.operatorToken.kind === 61 /* QuestionQuestionToken */)) { - condExpr2 = skipParentheses(condExpr2.left); - helper(condExpr2, body2); - } - } - function helper(condExpr2, body2) { - const location = isLogicalOrCoalescingBinaryExpression(condExpr2) ? skipParentheses(condExpr2.right) : condExpr2; - if (isModuleExportsAccessExpression(location)) { - return; - } - if (isLogicalOrCoalescingBinaryExpression(location)) { - bothHelper(location, body2); - return; - } - const type = location === condExpr2 ? condType : checkTruthinessExpression(location); - const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression); - if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast) - return; - const callSignatures = getSignaturesOfType(type, 0 /* Call */); - const isPromise = !!getAwaitedTypeOfPromise(type); - if (callSignatures.length === 0 && !isPromise) { - return; - } - const testedNode = isIdentifier(location) ? location : isPropertyAccessExpression(location) ? location.name : void 0; - const testedSymbol = testedNode && getSymbolAtLocation(testedNode); - if (!testedSymbol && !isPromise) { - return; - } - const isUsed = testedSymbol && isBinaryExpression(condExpr2.parent) && isSymbolUsedInBinaryExpressionChain(condExpr2.parent, testedSymbol) || testedSymbol && body2 && isSymbolUsedInConditionBody(condExpr2, body2, testedNode, testedSymbol); - if (!isUsed) { - if (isPromise) { - errorAndMaybeSuggestAwait( - location, - /*maybeMissingAwait*/ - true, - Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined, - getTypeNameForErrorDisplay(type) - ); - } else { - error2(location, Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead); - } - } - } - } - function isSymbolUsedInConditionBody(expr, body, testedNode, testedSymbol) { - return !!forEachChild(body, function check(childNode) { - if (isIdentifier(childNode)) { - const childSymbol = getSymbolAtLocation(childNode); - if (childSymbol && childSymbol === testedSymbol) { - if (isIdentifier(expr) || isIdentifier(testedNode) && isBinaryExpression(testedNode.parent)) { - return true; - } - let testedExpression = testedNode.parent; - let childExpression = childNode.parent; - while (testedExpression && childExpression) { - if (isIdentifier(testedExpression) && isIdentifier(childExpression) || testedExpression.kind === 110 /* ThisKeyword */ && childExpression.kind === 110 /* ThisKeyword */) { - return getSymbolAtLocation(testedExpression) === getSymbolAtLocation(childExpression); - } else if (isPropertyAccessExpression(testedExpression) && isPropertyAccessExpression(childExpression)) { - if (getSymbolAtLocation(testedExpression.name) !== getSymbolAtLocation(childExpression.name)) { - return false; - } - childExpression = childExpression.expression; - testedExpression = testedExpression.expression; - } else if (isCallExpression(testedExpression) && isCallExpression(childExpression)) { - childExpression = childExpression.expression; - testedExpression = testedExpression.expression; - } else { - return false; - } - } - } - } - return forEachChild(childNode, check); - }); - } - function isSymbolUsedInBinaryExpressionChain(node, testedSymbol) { - while (isBinaryExpression(node) && node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) { - const isUsed = forEachChild(node.right, function visit(child) { - if (isIdentifier(child)) { - const symbol = getSymbolAtLocation(child); - if (symbol && symbol === testedSymbol) { - return true; - } - } - return forEachChild(child, visit); - }); - if (isUsed) { - return true; - } - node = node.parent; - } - return false; - } - function checkDoStatement(node) { - checkGrammarStatementInAmbientContext(node); - checkSourceElement(node.statement); - checkTruthinessExpression(node.expression); - } - function checkWhileStatement(node) { - checkGrammarStatementInAmbientContext(node); - checkTruthinessExpression(node.expression); - checkSourceElement(node.statement); - } - function checkTruthinessOfType(type, node) { - if (type.flags & 16384 /* Void */) { - error2(node, Diagnostics.An_expression_of_type_void_cannot_be_tested_for_truthiness); - } - return type; - } - function checkTruthinessExpression(node, checkMode) { - return checkTruthinessOfType(checkExpression(node, checkMode), node); - } - function checkForStatement(node) { - if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind === 261 /* VariableDeclarationList */) { - checkGrammarVariableDeclarationList(node.initializer); - } - } - if (node.initializer) { - if (node.initializer.kind === 261 /* VariableDeclarationList */) { - checkVariableDeclarationList(node.initializer); - } else { - checkExpression(node.initializer); - } - } - if (node.condition) - checkTruthinessExpression(node.condition); - if (node.incrementor) - checkExpression(node.incrementor); - checkSourceElement(node.statement); - if (node.locals) { - registerForUnusedIdentifiersCheck(node); - } - } - function checkForOfStatement(node) { - checkGrammarForInOrForOfStatement(node); - const container = getContainingFunctionOrClassStaticBlock(node); - if (node.awaitModifier) { - if (container && isClassStaticBlockDeclaration(container)) { - grammarErrorOnNode(node.awaitModifier, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block); - } else { - const functionFlags = getFunctionFlags(container); - if ((functionFlags & (4 /* Invalid */ | 2 /* Async */)) === 2 /* Async */ && languageVersion < 99 /* ESNext */) { - checkExternalEmitHelpers(node, 16384 /* ForAwaitOfIncludes */); - } - } - } else if (compilerOptions.downlevelIteration && languageVersion < 2 /* ES2015 */) { - checkExternalEmitHelpers(node, 256 /* ForOfIncludes */); - } - if (node.initializer.kind === 261 /* VariableDeclarationList */) { - checkVariableDeclarationList(node.initializer); - } else { - const varExpr = node.initializer; - const iteratedType = checkRightHandSideOfForOf(node); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { - checkDestructuringAssignment(varExpr, iteratedType || errorType); - } else { - const leftType = checkExpression(varExpr); - checkReferenceExpression( - varExpr, - Diagnostics.The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access, - Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access - ); - if (iteratedType) { - checkTypeAssignableToAndOptionallyElaborate(iteratedType, leftType, varExpr, node.expression); - } - } - } - checkSourceElement(node.statement); - if (node.locals) { - registerForUnusedIdentifiersCheck(node); - } - } - function checkForInStatement(node) { - checkGrammarForInOrForOfStatement(node); - const rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression)); - if (node.initializer.kind === 261 /* VariableDeclarationList */) { - const variable = node.initializer.declarations[0]; - if (variable && isBindingPattern(variable.name)) { - error2(variable.name, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); - } - checkVariableDeclarationList(node.initializer); - } else { - const varExpr = node.initializer; - const leftType = checkExpression(varExpr); - if (varExpr.kind === 209 /* ArrayLiteralExpression */ || varExpr.kind === 210 /* ObjectLiteralExpression */) { - error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); - } else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) { - error2(varExpr, Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); - } else { - checkReferenceExpression( - varExpr, - Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access, - Diagnostics.The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access - ); - } - } - if (rightType === neverType || !isTypeAssignableToKind(rightType, 67108864 /* NonPrimitive */ | 58982400 /* InstantiableNonPrimitive */)) { - error2(node.expression, Diagnostics.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, typeToString(rightType)); - } - checkSourceElement(node.statement); - if (node.locals) { - registerForUnusedIdentifiersCheck(node); - } - } - function checkRightHandSideOfForOf(statement) { - const use = statement.awaitModifier ? 15 /* ForAwaitOf */ : 13 /* ForOf */; - return checkIteratedTypeOrElementType(use, checkNonNullExpression(statement.expression), undefinedType, statement.expression); - } - function checkIteratedTypeOrElementType(use, inputType, sentType, errorNode) { - if (isTypeAny(inputType)) { - return inputType; - } - return getIteratedTypeOrElementType( - use, - inputType, - sentType, - errorNode, - /*checkAssignability*/ - true - ) || anyType; - } - function getIteratedTypeOrElementType(use, inputType, sentType, errorNode, checkAssignability) { - const allowAsyncIterables = (use & 2 /* AllowsAsyncIterablesFlag */) !== 0; - if (inputType === neverType) { - reportTypeNotIterableError(errorNode, inputType, allowAsyncIterables); - return void 0; - } - const uplevelIteration = languageVersion >= 2 /* ES2015 */; - const downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration; - const possibleOutOfBounds = compilerOptions.noUncheckedIndexedAccess && !!(use & 128 /* PossiblyOutOfBounds */); - if (uplevelIteration || downlevelIteration || allowAsyncIterables) { - const iterationTypes = getIterationTypesOfIterable(inputType, use, uplevelIteration ? errorNode : void 0); - if (checkAssignability) { - if (iterationTypes) { - const diagnostic = use & 8 /* ForOfFlag */ ? Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0 : use & 32 /* SpreadFlag */ ? Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0 : use & 64 /* DestructuringFlag */ ? Diagnostics.Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0 : use & 16 /* YieldStarFlag */ ? 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; - if (diagnostic) { - checkTypeAssignableTo(sentType, iterationTypes.nextType, errorNode, diagnostic); - } - } - } - if (iterationTypes || uplevelIteration) { - return possibleOutOfBounds ? includeUndefinedInIndexSignature(iterationTypes && iterationTypes.yieldType) : iterationTypes && iterationTypes.yieldType; - } - } - let arrayType = inputType; - let reportedError = false; - let hasStringConstituent = false; - if (use & 4 /* AllowsStringInputFlag */) { - if (arrayType.flags & 1048576 /* Union */) { - const arrayTypes = inputType.types; - const filteredTypes = filter(arrayTypes, (t) => !(t.flags & 402653316 /* StringLike */)); - if (filteredTypes !== arrayTypes) { - arrayType = getUnionType(filteredTypes, 2 /* Subtype */); - } - } else if (arrayType.flags & 402653316 /* StringLike */) { - arrayType = neverType; - } - hasStringConstituent = arrayType !== inputType; - if (hasStringConstituent) { - if (languageVersion < 1 /* ES5 */) { - if (errorNode) { - error2(errorNode, Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); - reportedError = true; - } - } - if (arrayType.flags & 131072 /* Never */) { - return possibleOutOfBounds ? includeUndefinedInIndexSignature(stringType) : stringType; - } - } - } - if (!isArrayLikeType(arrayType)) { - if (errorNode && !reportedError) { - const allowsStrings = !!(use & 4 /* AllowsStringInputFlag */) && !hasStringConstituent; - const [defaultDiagnostic, maybeMissingAwait] = getIterationDiagnosticDetails(allowsStrings, downlevelIteration); - errorAndMaybeSuggestAwait( - errorNode, - maybeMissingAwait && !!getAwaitedTypeOfPromise(arrayType), - defaultDiagnostic, - typeToString(arrayType) - ); - } - return hasStringConstituent ? possibleOutOfBounds ? includeUndefinedInIndexSignature(stringType) : stringType : void 0; - } - const arrayElementType = getIndexTypeOfType(arrayType, numberType); - if (hasStringConstituent && arrayElementType) { - if (arrayElementType.flags & 402653316 /* StringLike */ && !compilerOptions.noUncheckedIndexedAccess) { - return stringType; - } - return getUnionType(possibleOutOfBounds ? [arrayElementType, stringType, undefinedType] : [arrayElementType, stringType], 2 /* Subtype */); - } - return use & 128 /* PossiblyOutOfBounds */ ? includeUndefinedInIndexSignature(arrayElementType) : arrayElementType; - function getIterationDiagnosticDetails(allowsStrings, downlevelIteration2) { - var _a; - if (downlevelIteration2) { - return allowsStrings ? [Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true] : [Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true]; - } - const yieldType = getIterationTypeOfIterable( - use, - 0 /* Yield */, - inputType, - /*errorNode*/ - void 0 - ); - if (yieldType) { - return [Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, false]; - } - if (isES2015OrLaterIterable((_a = inputType.symbol) == null ? void 0 : _a.escapedName)) { - return [Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, true]; - } - return allowsStrings ? [Diagnostics.Type_0_is_not_an_array_type_or_a_string_type, true] : [Diagnostics.Type_0_is_not_an_array_type, true]; - } - } - function isES2015OrLaterIterable(n) { - switch (n) { - case "Float32Array": - case "Float64Array": - case "Int16Array": - case "Int32Array": - case "Int8Array": - case "NodeList": - case "Uint16Array": - case "Uint32Array": - case "Uint8Array": - case "Uint8ClampedArray": - return true; - } - return false; - } - function getIterationTypeOfIterable(use, typeKind, inputType, errorNode) { - if (isTypeAny(inputType)) { - return void 0; - } - const iterationTypes = getIterationTypesOfIterable(inputType, use, errorNode); - return iterationTypes && iterationTypes[getIterationTypesKeyFromIterationTypeKind(typeKind)]; - } - function createIterationTypes(yieldType = neverType, returnType = neverType, nextType = unknownType) { - if (yieldType.flags & 67359327 /* Intrinsic */ && returnType.flags & (1 /* Any */ | 131072 /* Never */ | 2 /* Unknown */ | 16384 /* Void */ | 32768 /* Undefined */) && nextType.flags & (1 /* Any */ | 131072 /* Never */ | 2 /* Unknown */ | 16384 /* Void */ | 32768 /* Undefined */)) { - const id = getTypeListId([yieldType, returnType, nextType]); - let iterationTypes = iterationTypesCache.get(id); - if (!iterationTypes) { - iterationTypes = { yieldType, returnType, nextType }; - iterationTypesCache.set(id, iterationTypes); - } - return iterationTypes; - } - return { yieldType, returnType, nextType }; - } - function combineIterationTypes(array) { - let yieldTypes; - let returnTypes; - let nextTypes; - for (const iterationTypes of array) { - if (iterationTypes === void 0 || iterationTypes === noIterationTypes) { - continue; - } - if (iterationTypes === anyIterationTypes) { - return anyIterationTypes; - } - yieldTypes = append(yieldTypes, iterationTypes.yieldType); - returnTypes = append(returnTypes, iterationTypes.returnType); - nextTypes = append(nextTypes, iterationTypes.nextType); - } - if (yieldTypes || returnTypes || nextTypes) { - return createIterationTypes( - yieldTypes && getUnionType(yieldTypes), - returnTypes && getUnionType(returnTypes), - nextTypes && getIntersectionType(nextTypes) - ); - } - return noIterationTypes; - } - function getCachedIterationTypes(type, cacheKey) { - return type[cacheKey]; - } - function setCachedIterationTypes(type, cacheKey, cachedTypes2) { - return type[cacheKey] = cachedTypes2; - } - function getIterationTypesOfIterable(type, use, errorNode) { - var _a, _b; - if (isTypeAny(type)) { - return anyIterationTypes; - } - if (!(type.flags & 1048576 /* Union */)) { - const errorOutputContainer = errorNode ? { errors: void 0 } : void 0; - const iterationTypes2 = getIterationTypesOfIterableWorker(type, use, errorNode, errorOutputContainer); - if (iterationTypes2 === noIterationTypes) { - if (errorNode) { - const rootDiag = reportTypeNotIterableError(errorNode, type, !!(use & 2 /* AllowsAsyncIterablesFlag */)); - if (errorOutputContainer == null ? void 0 : errorOutputContainer.errors) { - addRelatedInfo(rootDiag, ...errorOutputContainer.errors); - } - } - return void 0; - } else if ((_a = errorOutputContainer == null ? void 0 : errorOutputContainer.errors) == null ? void 0 : _a.length) { - for (const diag2 of errorOutputContainer.errors) { - diagnostics.add(diag2); - } - } - return iterationTypes2; - } - const cacheKey = use & 2 /* AllowsAsyncIterablesFlag */ ? "iterationTypesOfAsyncIterable" : "iterationTypesOfIterable"; - const cachedTypes2 = getCachedIterationTypes(type, cacheKey); - if (cachedTypes2) - return cachedTypes2 === noIterationTypes ? void 0 : cachedTypes2; - let allIterationTypes; - for (const constituent of type.types) { - const errorOutputContainer = errorNode ? { errors: void 0 } : void 0; - const iterationTypes2 = getIterationTypesOfIterableWorker(constituent, use, errorNode, errorOutputContainer); - if (iterationTypes2 === noIterationTypes) { - if (errorNode) { - const rootDiag = reportTypeNotIterableError(errorNode, type, !!(use & 2 /* AllowsAsyncIterablesFlag */)); - if (errorOutputContainer == null ? void 0 : errorOutputContainer.errors) { - addRelatedInfo(rootDiag, ...errorOutputContainer.errors); - } - } - setCachedIterationTypes(type, cacheKey, noIterationTypes); - return void 0; - } else if ((_b = errorOutputContainer == null ? void 0 : errorOutputContainer.errors) == null ? void 0 : _b.length) { - for (const diag2 of errorOutputContainer.errors) { - diagnostics.add(diag2); - } - } - allIterationTypes = append(allIterationTypes, iterationTypes2); - } - const iterationTypes = allIterationTypes ? combineIterationTypes(allIterationTypes) : noIterationTypes; - setCachedIterationTypes(type, cacheKey, iterationTypes); - return iterationTypes === noIterationTypes ? void 0 : iterationTypes; - } - function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) { - if (iterationTypes === noIterationTypes) - return noIterationTypes; - if (iterationTypes === anyIterationTypes) - return anyIterationTypes; - const { yieldType, returnType, nextType } = iterationTypes; - if (errorNode) { - getGlobalAwaitedSymbol( - /*reportErrors*/ - true - ); - } - return createIterationTypes( - getAwaitedType(yieldType, errorNode) || anyType, - getAwaitedType(returnType, errorNode) || anyType, - nextType - ); - } - function getIterationTypesOfIterableWorker(type, use, errorNode, errorOutputContainer) { - if (isTypeAny(type)) { - return anyIterationTypes; - } - let noCache = false; - if (use & 2 /* AllowsAsyncIterablesFlag */) { - const iterationTypes = getIterationTypesOfIterableCached(type, asyncIterationTypesResolver) || getIterationTypesOfIterableFast(type, asyncIterationTypesResolver); - if (iterationTypes) { - if (iterationTypes === noIterationTypes && errorNode) { - noCache = true; - } else { - return use & 8 /* ForOfFlag */ ? getAsyncFromSyncIterationTypes(iterationTypes, errorNode) : iterationTypes; - } - } - } - if (use & 1 /* AllowsSyncIterablesFlag */) { - let iterationTypes = getIterationTypesOfIterableCached(type, syncIterationTypesResolver) || getIterationTypesOfIterableFast(type, syncIterationTypesResolver); - if (iterationTypes) { - if (iterationTypes === noIterationTypes && errorNode) { - noCache = true; - } else { - if (use & 2 /* AllowsAsyncIterablesFlag */) { - if (iterationTypes !== noIterationTypes) { - iterationTypes = getAsyncFromSyncIterationTypes(iterationTypes, errorNode); - return noCache ? iterationTypes : setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", iterationTypes); - } - } else { - return iterationTypes; - } - } - } - } - if (use & 2 /* AllowsAsyncIterablesFlag */) { - const iterationTypes = getIterationTypesOfIterableSlow(type, asyncIterationTypesResolver, errorNode, errorOutputContainer, noCache); - if (iterationTypes !== noIterationTypes) { - return iterationTypes; - } - } - if (use & 1 /* AllowsSyncIterablesFlag */) { - let iterationTypes = getIterationTypesOfIterableSlow(type, syncIterationTypesResolver, errorNode, errorOutputContainer, noCache); - if (iterationTypes !== noIterationTypes) { - if (use & 2 /* AllowsAsyncIterablesFlag */) { - iterationTypes = getAsyncFromSyncIterationTypes(iterationTypes, errorNode); - return noCache ? iterationTypes : setCachedIterationTypes(type, "iterationTypesOfAsyncIterable", iterationTypes); - } else { - return iterationTypes; - } - } - } - return noIterationTypes; - } - function getIterationTypesOfIterableCached(type, resolver) { - return getCachedIterationTypes(type, resolver.iterableCacheKey); - } - function getIterationTypesOfGlobalIterableType(globalType, resolver) { - const globalIterationTypes = getIterationTypesOfIterableCached(globalType, resolver) || getIterationTypesOfIterableSlow( - globalType, - resolver, - /*errorNode*/ - void 0, - /*errorOutputContainer*/ - void 0, - /*noCache*/ - false - ); - return globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes; - } - function getIterationTypesOfIterableFast(type, resolver) { - let globalType; - if (isReferenceToType2(type, globalType = resolver.getGlobalIterableType( - /*reportErrors*/ - false - )) || isReferenceToType2(type, globalType = resolver.getGlobalIterableIteratorType( - /*reportErrors*/ - false - ))) { - const [yieldType] = getTypeArguments(type); - const { returnType, nextType } = getIterationTypesOfGlobalIterableType(globalType, resolver); - return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType( - yieldType, - /*errorNode*/ - void 0 - ) || yieldType, resolver.resolveIterationType( - returnType, - /*errorNode*/ - void 0 - ) || returnType, nextType)); - } - if (isReferenceToType2(type, resolver.getGlobalGeneratorType( - /*reportErrors*/ - false - ))) { - const [yieldType, returnType, nextType] = getTypeArguments(type); - return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType( - yieldType, - /*errorNode*/ - void 0 - ) || yieldType, resolver.resolveIterationType( - returnType, - /*errorNode*/ - void 0 - ) || returnType, nextType)); - } - } - function getPropertyNameForKnownSymbolName(symbolName2) { - const ctorType = getGlobalESSymbolConstructorSymbol( - /*reportErrors*/ - false - ); - const uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), escapeLeadingUnderscores(symbolName2)); - return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : `__@${symbolName2}`; - } - function getIterationTypesOfIterableSlow(type, resolver, errorNode, errorOutputContainer, noCache) { - const method = getPropertyOfType(type, getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName)); - const methodType = method && !(method.flags & 16777216 /* Optional */) ? getTypeOfSymbol(method) : void 0; - if (isTypeAny(methodType)) { - return noCache ? anyIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes); - } - const signatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : void 0; - if (!some(signatures)) { - return noCache ? noIterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes); - } - const iteratorType = getIntersectionType(map(signatures, getReturnTypeOfSignature)); - const iterationTypes = getIterationTypesOfIteratorWorker(iteratorType, resolver, errorNode, errorOutputContainer, noCache) ?? noIterationTypes; - return noCache ? iterationTypes : setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes); - } - function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) { - const message = allowAsyncIterables ? Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator : Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator; - const suggestAwait = ( - // for (const x of Promise<...>) or [...Promise<...>] - !!getAwaitedTypeOfPromise(type) || !allowAsyncIterables && isForOfStatement(errorNode.parent) && errorNode.parent.expression === errorNode && getGlobalAsyncIterableType( - /*reportErrors*/ - false - ) !== emptyGenericType && isTypeAssignableTo( - type, - getGlobalAsyncIterableType( - /*reportErrors*/ - false - ) - ) - ); - return errorAndMaybeSuggestAwait(errorNode, suggestAwait, message, typeToString(type)); - } - function getIterationTypesOfIterator(type, resolver, errorNode, errorOutputContainer) { - return getIterationTypesOfIteratorWorker( - type, - resolver, - errorNode, - errorOutputContainer, - /*noCache*/ - false - ); - } - function getIterationTypesOfIteratorWorker(type, resolver, errorNode, errorOutputContainer, noCache) { - if (isTypeAny(type)) { - return anyIterationTypes; - } - let iterationTypes = getIterationTypesOfIteratorCached(type, resolver) || getIterationTypesOfIteratorFast(type, resolver); - if (iterationTypes === noIterationTypes && errorNode) { - iterationTypes = void 0; - noCache = true; - } - iterationTypes ?? (iterationTypes = getIterationTypesOfIteratorSlow(type, resolver, errorNode, errorOutputContainer, noCache)); - return iterationTypes === noIterationTypes ? void 0 : iterationTypes; - } - function getIterationTypesOfIteratorCached(type, resolver) { - return getCachedIterationTypes(type, resolver.iteratorCacheKey); - } - function getIterationTypesOfIteratorFast(type, resolver) { - const globalType = resolver.getGlobalIterableIteratorType( - /*reportErrors*/ - false - ); - if (isReferenceToType2(type, globalType)) { - const [yieldType] = getTypeArguments(type); - const globalIterationTypes = getIterationTypesOfIteratorCached(globalType, resolver) || getIterationTypesOfIteratorSlow( - globalType, - resolver, - /*errorNode*/ - void 0, - /*errorOutputContainer*/ - void 0, - /*noCache*/ - false - ); - const { returnType, nextType } = globalIterationTypes === noIterationTypes ? defaultIterationTypes : globalIterationTypes; - return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); - } - if (isReferenceToType2(type, resolver.getGlobalIteratorType( - /*reportErrors*/ - false - )) || isReferenceToType2(type, resolver.getGlobalGeneratorType( - /*reportErrors*/ - false - ))) { - const [yieldType, returnType, nextType] = getTypeArguments(type); - return setCachedIterationTypes(type, resolver.iteratorCacheKey, createIterationTypes(yieldType, returnType, nextType)); - } - } - function isIteratorResult(type, kind) { - const doneType = getTypeOfPropertyOfType(type, "done") || falseType; - return isTypeAssignableTo(kind === 0 /* Yield */ ? falseType : trueType, doneType); - } - function isYieldIteratorResult(type) { - return isIteratorResult(type, 0 /* Yield */); - } - function isReturnIteratorResult(type) { - return isIteratorResult(type, 1 /* Return */); - } - function getIterationTypesOfIteratorResult(type) { - if (isTypeAny(type)) { - return anyIterationTypes; - } - const cachedTypes2 = getCachedIterationTypes(type, "iterationTypesOfIteratorResult"); - if (cachedTypes2) { - return cachedTypes2; - } - if (isReferenceToType2(type, getGlobalIteratorYieldResultType( - /*reportErrors*/ - false - ))) { - const yieldType2 = getTypeArguments(type)[0]; - return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes( - yieldType2, - /*returnType*/ - void 0, - /*nextType*/ - void 0 - )); - } - if (isReferenceToType2(type, getGlobalIteratorReturnResultType( - /*reportErrors*/ - false - ))) { - const returnType2 = getTypeArguments(type)[0]; - return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes( - /*yieldType*/ - void 0, - returnType2, - /*nextType*/ - void 0 - )); - } - const yieldIteratorResult = filterType(type, isYieldIteratorResult); - const yieldType = yieldIteratorResult !== neverType ? getTypeOfPropertyOfType(yieldIteratorResult, "value") : void 0; - const returnIteratorResult = filterType(type, isReturnIteratorResult); - const returnType = returnIteratorResult !== neverType ? getTypeOfPropertyOfType(returnIteratorResult, "value") : void 0; - if (!yieldType && !returnType) { - return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", noIterationTypes); - } - return setCachedIterationTypes(type, "iterationTypesOfIteratorResult", createIterationTypes( - yieldType, - returnType || voidType, - /*nextType*/ - void 0 - )); - } - function getIterationTypesOfMethod(type, resolver, methodName, errorNode, errorOutputContainer) { - var _a, _b, _c, _d; - const method = getPropertyOfType(type, methodName); - if (!method && methodName !== "next") { - return void 0; - } - const methodType = method && !(methodName === "next" && method.flags & 16777216 /* Optional */) ? methodName === "next" ? getTypeOfSymbol(method) : getTypeWithFacts(getTypeOfSymbol(method), 2097152 /* NEUndefinedOrNull */) : void 0; - if (isTypeAny(methodType)) { - return methodName === "next" ? anyIterationTypes : anyIterationTypesExceptNext; - } - const methodSignatures = methodType ? getSignaturesOfType(methodType, 0 /* Call */) : emptyArray; - if (methodSignatures.length === 0) { - if (errorNode) { - const diagnostic = methodName === "next" ? resolver.mustHaveANextMethodDiagnostic : resolver.mustBeAMethodDiagnostic; - if (errorOutputContainer) { - errorOutputContainer.errors ?? (errorOutputContainer.errors = []); - errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, diagnostic, methodName)); - } else { - error2(errorNode, diagnostic, methodName); - } - } - return methodName === "next" ? noIterationTypes : void 0; - } - if ((methodType == null ? void 0 : methodType.symbol) && methodSignatures.length === 1) { - const globalGeneratorType = resolver.getGlobalGeneratorType( - /*reportErrors*/ - false - ); - const globalIteratorType = resolver.getGlobalIteratorType( - /*reportErrors*/ - false - ); - const isGeneratorMethod = ((_b = (_a = globalGeneratorType.symbol) == null ? void 0 : _a.members) == null ? void 0 : _b.get(methodName)) === methodType.symbol; - const isIteratorMethod = !isGeneratorMethod && ((_d = (_c = globalIteratorType.symbol) == null ? void 0 : _c.members) == null ? void 0 : _d.get(methodName)) === methodType.symbol; - if (isGeneratorMethod || isIteratorMethod) { - const globalType = isGeneratorMethod ? globalGeneratorType : globalIteratorType; - const { mapper } = methodType; - return createIterationTypes( - getMappedType(globalType.typeParameters[0], mapper), - getMappedType(globalType.typeParameters[1], mapper), - methodName === "next" ? getMappedType(globalType.typeParameters[2], mapper) : void 0 - ); - } - } - let methodParameterTypes; - let methodReturnTypes; - for (const signature of methodSignatures) { - if (methodName !== "throw" && some(signature.parameters)) { - methodParameterTypes = append(methodParameterTypes, getTypeAtPosition(signature, 0)); - } - methodReturnTypes = append(methodReturnTypes, getReturnTypeOfSignature(signature)); - } - let returnTypes; - let nextType; - if (methodName !== "throw") { - const methodParameterType = methodParameterTypes ? getUnionType(methodParameterTypes) : unknownType; - if (methodName === "next") { - nextType = methodParameterType; - } else if (methodName === "return") { - const resolvedMethodParameterType = resolver.resolveIterationType(methodParameterType, errorNode) || anyType; - returnTypes = append(returnTypes, resolvedMethodParameterType); - } - } - let yieldType; - const methodReturnType = methodReturnTypes ? getIntersectionType(methodReturnTypes) : neverType; - const resolvedMethodReturnType = resolver.resolveIterationType(methodReturnType, errorNode) || anyType; - const iterationTypes = getIterationTypesOfIteratorResult(resolvedMethodReturnType); - if (iterationTypes === noIterationTypes) { - if (errorNode) { - if (errorOutputContainer) { - errorOutputContainer.errors ?? (errorOutputContainer.errors = []); - errorOutputContainer.errors.push(createDiagnosticForNode(errorNode, resolver.mustHaveAValueDiagnostic, methodName)); - } else { - error2(errorNode, resolver.mustHaveAValueDiagnostic, methodName); - } - } - yieldType = anyType; - returnTypes = append(returnTypes, anyType); - } else { - yieldType = iterationTypes.yieldType; - returnTypes = append(returnTypes, iterationTypes.returnType); - } - return createIterationTypes(yieldType, getUnionType(returnTypes), nextType); - } - function getIterationTypesOfIteratorSlow(type, resolver, errorNode, errorOutputContainer, noCache) { - const iterationTypes = combineIterationTypes([ - getIterationTypesOfMethod(type, resolver, "next", errorNode, errorOutputContainer), - getIterationTypesOfMethod(type, resolver, "return", errorNode, errorOutputContainer), - getIterationTypesOfMethod(type, resolver, "throw", errorNode, errorOutputContainer) - ]); - return noCache ? iterationTypes : setCachedIterationTypes(type, resolver.iteratorCacheKey, iterationTypes); - } - function getIterationTypeOfGeneratorFunctionReturnType(kind, returnType, isAsyncGenerator) { - if (isTypeAny(returnType)) { - return void 0; - } - const iterationTypes = getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsyncGenerator); - return iterationTypes && iterationTypes[getIterationTypesKeyFromIterationTypeKind(kind)]; - } - function getIterationTypesOfGeneratorFunctionReturnType(type, isAsyncGenerator) { - if (isTypeAny(type)) { - return anyIterationTypes; - } - const use = isAsyncGenerator ? 2 /* AsyncGeneratorReturnType */ : 1 /* GeneratorReturnType */; - const resolver = isAsyncGenerator ? asyncIterationTypesResolver : syncIterationTypesResolver; - return getIterationTypesOfIterable( - type, - use, - /*errorNode*/ - void 0 - ) || getIterationTypesOfIterator( - type, - resolver, - /*errorNode*/ - void 0, - /*errorOutputContainer*/ - void 0 - ); - } - function checkBreakOrContinueStatement(node) { - if (!checkGrammarStatementInAmbientContext(node)) - checkGrammarBreakOrContinueStatement(node); - } - function unwrapReturnType(returnType, functionFlags) { - const isGenerator = !!(functionFlags & 1 /* Generator */); - const isAsync = !!(functionFlags & 2 /* Async */); - if (isGenerator) { - const returnIterationType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, isAsync); - if (!returnIterationType) { - return errorType; - } - return isAsync ? getAwaitedTypeNoAlias(unwrapAwaitedType(returnIterationType)) : returnIterationType; - } - return isAsync ? getAwaitedTypeNoAlias(returnType) || errorType : returnType; - } - function isUnwrappedReturnTypeUndefinedVoidOrAny(func, returnType) { - const type = unwrapReturnType(returnType, getFunctionFlags(func)); - return !!(type && (maybeTypeOfKind(type, 16384 /* Void */) || type.flags & (1 /* Any */ | 32768 /* Undefined */))); - } - function checkReturnStatement(node) { - if (checkGrammarStatementInAmbientContext(node)) { - return; - } - const container = getContainingFunctionOrClassStaticBlock(node); - if (container && isClassStaticBlockDeclaration(container)) { - grammarErrorOnFirstToken(node, Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block); - return; - } - if (!container) { - grammarErrorOnFirstToken(node, Diagnostics.A_return_statement_can_only_be_used_within_a_function_body); - return; - } - const signature = getSignatureFromDeclaration(container); - const returnType = getReturnTypeOfSignature(signature); - const functionFlags = getFunctionFlags(container); - if (strictNullChecks || node.expression || returnType.flags & 131072 /* Never */) { - const exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType; - if (container.kind === 178 /* SetAccessor */) { - if (node.expression) { - error2(node, Diagnostics.Setters_cannot_return_a_value); - } - } else if (container.kind === 176 /* Constructor */) { - if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) { - error2(node, Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); - } - } else if (getReturnTypeFromAnnotation(container)) { - const unwrappedReturnType = unwrapReturnType(returnType, functionFlags) ?? returnType; - const unwrappedExprType = functionFlags & 2 /* Async */ ? checkAwaitedType( - exprType, - /*withAlias*/ - false, - node, - Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member - ) : exprType; - if (unwrappedReturnType) { - checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression); - } - } - } else if (container.kind !== 176 /* Constructor */ && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeUndefinedVoidOrAny(container, returnType)) { - error2(node, Diagnostics.Not_all_code_paths_return_a_value); - } - } - function checkWithStatement(node) { - if (!checkGrammarStatementInAmbientContext(node)) { - if (node.flags & 65536 /* AwaitContext */) { - grammarErrorOnFirstToken(node, Diagnostics.with_statements_are_not_allowed_in_an_async_function_block); - } - } - checkExpression(node.expression); - const sourceFile = getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - const start = getSpanOfTokenAtPosition(sourceFile, node.pos).start; - const end = node.statement.pos; - grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any); - } - } - function checkSwitchStatement(node) { - checkGrammarStatementInAmbientContext(node); - let firstDefaultClause; - let hasDuplicateDefaultClause = false; - const expressionType = checkExpression(node.expression); - forEach(node.caseBlock.clauses, (clause) => { - if (clause.kind === 297 /* DefaultClause */ && !hasDuplicateDefaultClause) { - if (firstDefaultClause === void 0) { - firstDefaultClause = clause; - } else { - grammarErrorOnNode(clause, Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); - hasDuplicateDefaultClause = true; - } - } - if (clause.kind === 296 /* CaseClause */) { - addLazyDiagnostic(createLazyCaseClauseDiagnostics(clause)); - } - forEach(clause.statements, checkSourceElement); - if (compilerOptions.noFallthroughCasesInSwitch && clause.fallthroughFlowNode && isReachableFlowNode(clause.fallthroughFlowNode)) { - error2(clause, Diagnostics.Fallthrough_case_in_switch); - } - function createLazyCaseClauseDiagnostics(clause2) { - return () => { - const caseType = checkExpression(clause2.expression); - if (!isTypeEqualityComparableTo(expressionType, caseType)) { - checkTypeComparableTo( - caseType, - expressionType, - clause2.expression, - /*headMessage*/ - void 0 - ); - } - }; - } - }); - if (node.caseBlock.locals) { - registerForUnusedIdentifiersCheck(node.caseBlock); - } - } - function checkLabeledStatement(node) { - if (!checkGrammarStatementInAmbientContext(node)) { - findAncestor(node.parent, (current) => { - if (isFunctionLike(current)) { - return "quit"; - } - if (current.kind === 256 /* LabeledStatement */ && current.label.escapedText === node.label.escapedText) { - grammarErrorOnNode(node.label, Diagnostics.Duplicate_label_0, getTextOfNode(node.label)); - return true; - } - return false; - }); - } - checkSourceElement(node.statement); - } - function checkThrowStatement(node) { - if (!checkGrammarStatementInAmbientContext(node)) { - if (isIdentifier(node.expression) && !node.expression.escapedText) { - grammarErrorAfterFirstToken(node, Diagnostics.Line_break_not_permitted_here); - } - } - if (node.expression) { - checkExpression(node.expression); - } - } - function checkTryStatement(node) { - checkGrammarStatementInAmbientContext(node); - checkBlock(node.tryBlock); - const catchClause = node.catchClause; - if (catchClause) { - if (catchClause.variableDeclaration) { - const declaration = catchClause.variableDeclaration; - checkVariableLikeDeclaration(declaration); - const typeNode = getEffectiveTypeAnnotationNode(declaration); - if (typeNode) { - const type = getTypeFromTypeNode(typeNode); - if (type && !(type.flags & 3 /* AnyOrUnknown */)) { - grammarErrorOnFirstToken(typeNode, Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified); - } - } else if (declaration.initializer) { - grammarErrorOnFirstToken(declaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer); - } else { - const blockLocals = catchClause.block.locals; - if (blockLocals) { - forEachKey(catchClause.locals, (caughtName) => { - const blockLocal = blockLocals.get(caughtName); - if ((blockLocal == null ? void 0 : blockLocal.valueDeclaration) && (blockLocal.flags & 2 /* BlockScopedVariable */) !== 0) { - grammarErrorOnNode(blockLocal.valueDeclaration, Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, unescapeLeadingUnderscores(caughtName)); - } - }); - } - } - } - checkBlock(catchClause.block); - } - if (node.finallyBlock) { - checkBlock(node.finallyBlock); - } - } - function checkIndexConstraints(type, symbol, isStaticIndex) { - const indexInfos = getIndexInfosOfType(type); - if (indexInfos.length === 0) { - return; - } - for (const prop of getPropertiesOfObjectType(type)) { - if (!(isStaticIndex && prop.flags & 4194304 /* Prototype */)) { - checkIndexConstraintForProperty(type, prop, getLiteralTypeFromProperty( - prop, - 8576 /* StringOrNumberLiteralOrUnique */, - /*includeNonPublic*/ - true - ), getNonMissingTypeOfSymbol(prop)); - } - } - const typeDeclaration = symbol.valueDeclaration; - if (typeDeclaration && isClassLike(typeDeclaration)) { - for (const member of typeDeclaration.members) { - if (!isStatic(member) && !hasBindableName(member)) { - const symbol2 = getSymbolOfDeclaration(member); - checkIndexConstraintForProperty(type, symbol2, getTypeOfExpression(member.name.expression), getNonMissingTypeOfSymbol(symbol2)); - } - } - } - if (indexInfos.length > 1) { - for (const info of indexInfos) { - checkIndexConstraintForIndexSignature(type, info); - } - } - } - function checkIndexConstraintForProperty(type, prop, propNameType, propType) { - const declaration = prop.valueDeclaration; - const name = getNameOfDeclaration(declaration); - if (name && isPrivateIdentifier(name)) { - return; - } - const indexInfos = getApplicableIndexInfos(type, propNameType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; - const propDeclaration = declaration && declaration.kind === 226 /* BinaryExpression */ || name && name.kind === 167 /* ComputedPropertyName */ ? declaration : void 0; - const localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : void 0; - for (const info of indexInfos) { - const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; - const errorNode = localPropDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); - if (errorNode && !isTypeAssignableTo(propType, info.type)) { - const diagnostic = createError( - errorNode, - Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, - symbolToString(prop), - typeToString(propType), - typeToString(info.keyType), - typeToString(info.type) - ); - if (propDeclaration && errorNode !== propDeclaration) { - addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here, symbolToString(prop))); - } - diagnostics.add(diagnostic); - } - } - } - function checkIndexConstraintForIndexSignature(type, checkInfo) { - const declaration = checkInfo.declaration; - const indexInfos = getApplicableIndexInfos(type, checkInfo.keyType); - const interfaceDeclaration = getObjectFlags(type) & 2 /* Interface */ ? getDeclarationOfKind(type.symbol, 264 /* InterfaceDeclaration */) : void 0; - const localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfDeclaration(declaration)) === type.symbol ? declaration : void 0; - for (const info of indexInfos) { - if (info === checkInfo) - continue; - const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; - const errorNode = localCheckDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getIndexInfoOfType(base, checkInfo.keyType) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); - if (errorNode && !isTypeAssignableTo(checkInfo.type, info.type)) { - error2( - errorNode, - Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, - typeToString(checkInfo.keyType), - typeToString(checkInfo.type), - typeToString(info.keyType), - typeToString(info.type) - ); - } - } - } - function checkTypeNameIsReserved(name, message) { - switch (name.escapedText) { - case "any": - case "unknown": - case "never": - case "number": - case "bigint": - case "boolean": - case "string": - case "symbol": - case "void": - case "object": - error2(name, message, name.escapedText); - } - } - function checkClassNameCollisionWithObject(name) { - if (languageVersion >= 1 /* ES5 */ && name.escapedText === "Object" && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(name).impliedNodeFormat === 1 /* CommonJS */)) { - error2(name, Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ModuleKind[moduleKind]); - } - } - function checkUnmatchedJSDocParameters(node) { - const jsdocParameters = filter(getJSDocTags(node), isJSDocParameterTag); - if (!length(jsdocParameters)) - return; - const isJs = isInJSFile(node); - const parameters = /* @__PURE__ */ new Set(); - const excludedParameters = /* @__PURE__ */ new Set(); - forEach(node.parameters, ({ name }, index) => { - if (isIdentifier(name)) { - parameters.add(name.escapedText); - } - if (isBindingPattern(name)) { - excludedParameters.add(index); - } - }); - const containsArguments = containsArgumentsReference(node); - if (containsArguments) { - const lastJSDocParamIndex = jsdocParameters.length - 1; - const lastJSDocParam = jsdocParameters[lastJSDocParamIndex]; - if (isJs && lastJSDocParam && isIdentifier(lastJSDocParam.name) && lastJSDocParam.typeExpression && lastJSDocParam.typeExpression.type && !parameters.has(lastJSDocParam.name.escapedText) && !excludedParameters.has(lastJSDocParamIndex) && !isArrayType(getTypeFromTypeNode(lastJSDocParam.typeExpression.type))) { - error2(lastJSDocParam.name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, idText(lastJSDocParam.name)); - } - } else { - forEach(jsdocParameters, ({ name, isNameFirst }, index) => { - if (excludedParameters.has(index) || isIdentifier(name) && parameters.has(name.escapedText)) { - return; - } - if (isQualifiedName(name)) { - if (isJs) { - error2(name, Diagnostics.Qualified_name_0_is_not_allowed_without_a_leading_param_object_1, entityNameToString(name), entityNameToString(name.left)); - } - } else { - if (!isNameFirst) { - errorOrSuggestion(isJs, name, Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name, idText(name)); - } - } - }); - } - } - function checkTypeParameters(typeParameterDeclarations) { - let seenDefault = false; - if (typeParameterDeclarations) { - for (let i = 0; i < typeParameterDeclarations.length; i++) { - const node = typeParameterDeclarations[i]; - checkTypeParameter(node); - addLazyDiagnostic(createCheckTypeParameterDiagnostic(node, i)); - } - } - function createCheckTypeParameterDiagnostic(node, i) { - return () => { - if (node.default) { - seenDefault = true; - checkTypeParametersNotReferenced(node.default, typeParameterDeclarations, i); - } else if (seenDefault) { - error2(node, Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters); - } - for (let j = 0; j < i; j++) { - if (typeParameterDeclarations[j].symbol === node.symbol) { - error2(node.name, Diagnostics.Duplicate_identifier_0, declarationNameToString(node.name)); - } - } - }; - } - } - function checkTypeParametersNotReferenced(root, typeParameters, index) { - visit(root); - function visit(node) { - if (node.kind === 183 /* TypeReference */) { - const type = getTypeFromTypeReference(node); - if (type.flags & 262144 /* TypeParameter */) { - for (let i = index; i < typeParameters.length; i++) { - if (type.symbol === getSymbolOfDeclaration(typeParameters[i])) { - error2(node, Diagnostics.Type_parameter_defaults_can_only_reference_previously_declared_type_parameters); - } - } - } - } - forEachChild(node, visit); - } - } - function checkTypeParameterListsIdentical(symbol) { - if (symbol.declarations && symbol.declarations.length === 1) { - return; - } - const links = getSymbolLinks(symbol); - if (!links.typeParametersChecked) { - links.typeParametersChecked = true; - const declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol); - if (!declarations || declarations.length <= 1) { - return; - } - const type = getDeclaredTypeOfSymbol(symbol); - if (!areTypeParametersIdentical(declarations, type.localTypeParameters, getEffectiveTypeParameterDeclarations)) { - const name = symbolToString(symbol); - for (const declaration of declarations) { - error2(declaration.name, Diagnostics.All_declarations_of_0_must_have_identical_type_parameters, name); - } - } - } - } - function areTypeParametersIdentical(declarations, targetParameters, getTypeParameterDeclarations) { - const maxTypeArgumentCount = length(targetParameters); - const minTypeArgumentCount = getMinTypeArgumentCount(targetParameters); - for (const declaration of declarations) { - const sourceParameters = getTypeParameterDeclarations(declaration); - const numTypeParameters = sourceParameters.length; - if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) { - return false; - } - for (let i = 0; i < numTypeParameters; i++) { - const source = sourceParameters[i]; - const target = targetParameters[i]; - if (source.name.escapedText !== target.symbol.escapedName) { - return false; - } - const constraint = getEffectiveConstraintOfTypeParameter(source); - const sourceConstraint = constraint && getTypeFromTypeNode(constraint); - const targetConstraint = getConstraintOfTypeParameter(target); - if (sourceConstraint && targetConstraint && !isTypeIdenticalTo(sourceConstraint, targetConstraint)) { - return false; - } - const sourceDefault = source.default && getTypeFromTypeNode(source.default); - const targetDefault = getDefaultFromTypeParameter(target); - if (sourceDefault && targetDefault && !isTypeIdenticalTo(sourceDefault, targetDefault)) { - return false; - } - } - } - return true; - } - function getFirstTransformableStaticClassElement(node) { - const willTransformStaticElementsOfDecoratedClass = !legacyDecorators && languageVersion < 99 /* ESNext */ && classOrConstructorParameterIsDecorated( - /*useLegacyDecorators*/ - false, - node - ); - const willTransformPrivateElementsOrClassStaticBlocks = languageVersion <= 9 /* ES2022 */; - const willTransformInitializers = !emitStandardClassFields; - if (willTransformStaticElementsOfDecoratedClass || willTransformPrivateElementsOrClassStaticBlocks) { - for (const member of node.members) { - if (willTransformStaticElementsOfDecoratedClass && classElementOrClassElementParameterIsDecorated( - /*useLegacyDecorators*/ - false, - member, - node - )) { - return firstOrUndefined(getDecorators(node)) ?? node; - } else if (willTransformPrivateElementsOrClassStaticBlocks) { - if (isClassStaticBlockDeclaration(member)) { - return member; - } else if (isStatic(member)) { - if (isPrivateIdentifierClassElementDeclaration(member) || willTransformInitializers && isInitializedProperty(member)) { - return member; - } - } - } - } - } - } - function checkClassExpressionExternalHelpers(node) { - if (node.name) - return; - const parent2 = walkUpOuterExpressions(node); - if (!isNamedEvaluationSource(parent2)) - return; - const willTransformESDecorators = !legacyDecorators && languageVersion < 99 /* ESNext */; - let location; - if (willTransformESDecorators && classOrConstructorParameterIsDecorated( - /*useLegacyDecorators*/ - false, - node - )) { - location = firstOrUndefined(getDecorators(node)) ?? node; - } else { - location = getFirstTransformableStaticClassElement(node); - } - if (location) { - checkExternalEmitHelpers(location, 8388608 /* SetFunctionName */); - if ((isPropertyAssignment(parent2) || isPropertyDeclaration(parent2) || isBindingElement(parent2)) && isComputedPropertyName(parent2.name)) { - checkExternalEmitHelpers(location, 16777216 /* PropKey */); - } - } - } - function checkClassExpression(node) { - checkClassLikeDeclaration(node); - checkNodeDeferred(node); - checkClassExpressionExternalHelpers(node); - return getTypeOfSymbol(getSymbolOfDeclaration(node)); - } - function checkClassExpressionDeferred(node) { - forEach(node.members, checkSourceElement); - registerForUnusedIdentifiersCheck(node); - } - function checkClassDeclaration(node) { - const firstDecorator = find(node.modifiers, isDecorator); - if (legacyDecorators && firstDecorator && some(node.members, (p) => hasStaticModifier(p) && isPrivateIdentifierClassElementDeclaration(p))) { - grammarErrorOnNode(firstDecorator, Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator); - } - if (!node.name && !hasSyntacticModifier(node, 1024 /* Default */)) { - grammarErrorOnFirstToken(node, Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name); - } - checkClassLikeDeclaration(node); - forEach(node.members, checkSourceElement); - registerForUnusedIdentifiersCheck(node); - } - function checkClassLikeDeclaration(node) { - checkGrammarClassLikeDeclaration(node); - checkDecorators(node); - checkCollisionsForDeclarationName(node, node.name); - checkTypeParameters(getEffectiveTypeParameterDeclarations(node)); - checkExportsOnMergedDeclarations(node); - const symbol = getSymbolOfDeclaration(node); - const type = getDeclaredTypeOfSymbol(symbol); - const typeWithThis = getTypeWithThisArgument(type); - const staticType = getTypeOfSymbol(symbol); - checkTypeParameterListsIdentical(symbol); - checkFunctionOrConstructorSymbol(symbol); - checkClassForDuplicateDeclarations(node); - const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); - if (!nodeInAmbientContext) { - checkClassForStaticPropertyNameConflicts(node); - } - const baseTypeNode = getEffectiveBaseTypeNode(node); - if (baseTypeNode) { - forEach(baseTypeNode.typeArguments, checkSourceElement); - if (languageVersion < 2 /* ES2015 */) { - checkExternalEmitHelpers(baseTypeNode.parent, 1 /* Extends */); - } - const extendsNode = getClassExtendsHeritageElement(node); - if (extendsNode && extendsNode !== baseTypeNode) { - checkExpression(extendsNode.expression); - } - const baseTypes = getBaseTypes(type); - if (baseTypes.length) { - addLazyDiagnostic(() => { - const baseType = baseTypes[0]; - const baseConstructorType = getBaseConstructorTypeOfClass(type); - const staticBaseType = getApparentType(baseConstructorType); - checkBaseTypeAccessibility(staticBaseType, baseTypeNode); - checkSourceElement(baseTypeNode.expression); - if (some(baseTypeNode.typeArguments)) { - forEach(baseTypeNode.typeArguments, checkSourceElement); - for (const constructor of getConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode)) { - if (!checkTypeArgumentConstraints(baseTypeNode, constructor.typeParameters)) { - break; - } - } - } - const baseWithThis = getTypeWithThisArgument(baseType, type.thisType); - if (!checkTypeAssignableTo( - typeWithThis, - baseWithThis, - /*errorNode*/ - void 0 - )) { - issueMemberSpecificError(node, typeWithThis, baseWithThis, Diagnostics.Class_0_incorrectly_extends_base_class_1); - } else { - checkTypeAssignableTo( - staticType, - getTypeWithoutSignatures(staticBaseType), - node.name || node, - Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1 - ); - } - if (baseConstructorType.flags & 8650752 /* TypeVariable */) { - if (!isMixinConstructorType(staticType)) { - error2(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); - } else { - const constructSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); - if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 256 /* Abstract */)) { - error2(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); - } - } - } - if (!(staticBaseType.symbol && staticBaseType.symbol.flags & 32 /* Class */) && !(baseConstructorType.flags & 8650752 /* TypeVariable */)) { - const constructors = getInstantiatedConstructorsForTypeArguments(staticBaseType, baseTypeNode.typeArguments, baseTypeNode); - if (forEach(constructors, (sig) => !isJSConstructor(sig.declaration) && !isTypeIdenticalTo(getReturnTypeOfSignature(sig), baseType))) { - error2(baseTypeNode.expression, Diagnostics.Base_constructors_must_all_have_the_same_return_type); - } - } - checkKindsOfPropertyMemberOverrides(type, baseType); - }); - } - } - checkMembersForOverrideModifier(node, type, typeWithThis, staticType); - const implementedTypeNodes = getEffectiveImplementsTypeNodes(node); - if (implementedTypeNodes) { - for (const typeRefNode of implementedTypeNodes) { - if (!isEntityNameExpression(typeRefNode.expression) || isOptionalChain(typeRefNode.expression)) { - error2(typeRefNode.expression, Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); - } - checkTypeReferenceNode(typeRefNode); - addLazyDiagnostic(createImplementsDiagnostics(typeRefNode)); - } - } - addLazyDiagnostic(() => { - checkIndexConstraints(type, symbol); - checkIndexConstraints( - staticType, - symbol, - /*isStaticIndex*/ - true - ); - checkTypeForDuplicateIndexSignatures(node); - checkPropertyInitialization(node); - }); - function createImplementsDiagnostics(typeRefNode) { - return () => { - const t = getReducedType(getTypeFromTypeNode(typeRefNode)); - if (!isErrorType(t)) { - if (isValidBaseType(t)) { - const genericDiag = t.symbol && t.symbol.flags & 32 /* Class */ ? Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass : Diagnostics.Class_0_incorrectly_implements_interface_1; - const baseWithThis = getTypeWithThisArgument(t, type.thisType); - if (!checkTypeAssignableTo( - typeWithThis, - baseWithThis, - /*errorNode*/ - void 0 - )) { - issueMemberSpecificError(node, typeWithThis, baseWithThis, genericDiag); - } - } else { - error2(typeRefNode, Diagnostics.A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members); - } - } - }; - } - } - function checkMembersForOverrideModifier(node, type, typeWithThis, staticType) { - const baseTypeNode = getEffectiveBaseTypeNode(node); - const baseTypes = baseTypeNode && getBaseTypes(type); - const baseWithThis = (baseTypes == null ? void 0 : baseTypes.length) ? getTypeWithThisArgument(first(baseTypes), type.thisType) : void 0; - const baseStaticType = getBaseConstructorTypeOfClass(type); - for (const member of node.members) { - if (hasAmbientModifier(member)) { - continue; - } - if (isConstructorDeclaration(member)) { - forEach(member.parameters, (param) => { - if (isParameterPropertyDeclaration(param, member)) { - checkExistingMemberForOverrideModifier( - node, - staticType, - baseStaticType, - baseWithThis, - type, - typeWithThis, - param, - /*memberIsParameterProperty*/ - true - ); - } - }); - } - checkExistingMemberForOverrideModifier( - node, - staticType, - baseStaticType, - baseWithThis, - type, - typeWithThis, - member, - /*memberIsParameterProperty*/ - false - ); - } - } - function checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member, memberIsParameterProperty, reportErrors2 = true) { - const declaredProp = member.name && getSymbolAtLocation(member.name) || getSymbolAtLocation(member); - if (!declaredProp) { - return 0 /* Ok */; - } - return checkMemberForOverrideModifier( - node, - staticType, - baseStaticType, - baseWithThis, - type, - typeWithThis, - hasOverrideModifier(member), - hasAbstractModifier(member), - isStatic(member), - memberIsParameterProperty, - symbolName(declaredProp), - reportErrors2 ? member : void 0 - ); - } - function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, memberName, errorNode) { - const isJs = isInJSFile(node); - const nodeInAmbientContext = !!(node.flags & 33554432 /* Ambient */); - if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) { - const memberEscapedName = escapeLeadingUnderscores(memberName); - const thisType = memberIsStatic ? staticType : typeWithThis; - const baseType = memberIsStatic ? baseStaticType : baseWithThis; - const prop = getPropertyOfType(thisType, memberEscapedName); - const baseProp = getPropertyOfType(baseType, memberEscapedName); - const baseClassName = typeToString(baseWithThis); - if (prop && !baseProp && memberHasOverrideModifier) { - if (errorNode) { - const suggestion = getSuggestedSymbolForNonexistentClassMember(memberName, baseType); - suggestion ? error2( - errorNode, - isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, - baseClassName, - symbolToString(suggestion) - ) : error2( - errorNode, - isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 : Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, - baseClassName - ); - } - return 2 /* HasInvalidOverride */; - } else if (prop && (baseProp == null ? void 0 : baseProp.declarations) && compilerOptions.noImplicitOverride && !nodeInAmbientContext) { - const baseHasAbstract = some(baseProp.declarations, hasAbstractModifier); - if (memberHasOverrideModifier) { - return 0 /* Ok */; - } - if (!baseHasAbstract) { - if (errorNode) { - const diag2 = memberIsParameterProperty ? isJs ? Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 : isJs ? Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 : Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0; - error2(errorNode, diag2, baseClassName); - } - return 1 /* NeedsOverride */; - } else if (memberHasAbstractModifier && baseHasAbstract) { - if (errorNode) { - error2(errorNode, Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, baseClassName); - } - return 1 /* NeedsOverride */; - } - } - } else if (memberHasOverrideModifier) { - if (errorNode) { - const className = typeToString(type); - error2( - errorNode, - isJs ? Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class : Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, - className - ); - } - return 2 /* HasInvalidOverride */; - } - return 0 /* Ok */; - } - function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) { - let issuedMemberError = false; - for (const member of node.members) { - if (isStatic(member)) { - continue; - } - const declaredProp = member.name && getSymbolAtLocation(member.name) || getSymbolAtLocation(member); - if (declaredProp) { - const prop = getPropertyOfType(typeWithThis, declaredProp.escapedName); - const baseProp = getPropertyOfType(baseWithThis, declaredProp.escapedName); - if (prop && baseProp) { - const rootChain = () => chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2, - symbolToString(declaredProp), - typeToString(typeWithThis), - typeToString(baseWithThis) - ); - if (!checkTypeAssignableTo( - getTypeOfSymbol(prop), - getTypeOfSymbol(baseProp), - member.name || member, - /*headMessage*/ - void 0, - rootChain - )) { - issuedMemberError = true; - } - } - } - } - if (!issuedMemberError) { - checkTypeAssignableTo(typeWithThis, baseWithThis, node.name || node, broadDiag); - } - } - function checkBaseTypeAccessibility(type, node) { - const signatures = getSignaturesOfType(type, 1 /* Construct */); - if (signatures.length) { - const declaration = signatures[0].declaration; - if (declaration && hasEffectiveModifier(declaration, 8 /* Private */)) { - const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); - if (!isNodeWithinClass(node, typeClassDeclaration)) { - error2(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); - } - } - } - } - function getMemberOverrideModifierStatus(node, member, memberSymbol) { - if (!member.name) { - return 0 /* Ok */; - } - const classSymbol = getSymbolOfDeclaration(node); - const type = getDeclaredTypeOfSymbol(classSymbol); - const typeWithThis = getTypeWithThisArgument(type); - const staticType = getTypeOfSymbol(classSymbol); - const baseTypeNode = getEffectiveBaseTypeNode(node); - const baseTypes = baseTypeNode && getBaseTypes(type); - const baseWithThis = (baseTypes == null ? void 0 : baseTypes.length) ? getTypeWithThisArgument(first(baseTypes), type.thisType) : void 0; - const baseStaticType = getBaseConstructorTypeOfClass(type); - const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16384 /* Override */); - return checkMemberForOverrideModifier( - node, - staticType, - baseStaticType, - baseWithThis, - type, - typeWithThis, - memberHasOverrideModifier, - hasAbstractModifier(member), - isStatic(member), - /*memberIsParameterProperty*/ - false, - symbolName(memberSymbol) - ); - } - function getTargetSymbol(s) { - return getCheckFlags(s) & 1 /* Instantiated */ ? s.links.target : s; - } - function getClassOrInterfaceDeclarationsOfSymbol(symbol) { - return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */); - } - function checkKindsOfPropertyMemberOverrides(type, baseType) { - var _a, _b, _c, _d; - const baseProperties = getPropertiesOfType(baseType); - let inheritedAbstractMemberNotImplementedError; - basePropertyCheck: - for (const baseProperty of baseProperties) { - const base = getTargetSymbol(baseProperty); - if (base.flags & 4194304 /* Prototype */) { - continue; - } - const baseSymbol = getPropertyOfObjectType(type, base.escapedName); - if (!baseSymbol) { - continue; - } - const derived = getTargetSymbol(baseSymbol); - const baseDeclarationFlags = getDeclarationModifierFlagsFromSymbol(base); - Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration."); - if (derived === base) { - const derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol); - if (baseDeclarationFlags & 256 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 256 /* Abstract */))) { - for (const otherBaseType of getBaseTypes(type)) { - if (otherBaseType === baseType) - continue; - const baseSymbol2 = getPropertyOfObjectType(otherBaseType, base.escapedName); - const derivedElsewhere = baseSymbol2 && getTargetSymbol(baseSymbol2); - if (derivedElsewhere && derivedElsewhere !== base) { - continue basePropertyCheck; - } - } - if (!inheritedAbstractMemberNotImplementedError) { - inheritedAbstractMemberNotImplementedError = error2( - derivedClassDecl, - Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1, - typeToString(type), - typeToString(baseType) - ); - } - if (derivedClassDecl.kind === 231 /* ClassExpression */) { - addRelatedInfo( - inheritedAbstractMemberNotImplementedError, - createDiagnosticForNode( - baseProperty.valueDeclaration ?? (baseProperty.declarations && first(baseProperty.declarations)) ?? derivedClassDecl, - Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, - symbolToString(baseProperty), - typeToString(baseType) - ) - ); - } else { - addRelatedInfo( - inheritedAbstractMemberNotImplementedError, - createDiagnosticForNode( - baseProperty.valueDeclaration ?? (baseProperty.declarations && first(baseProperty.declarations)) ?? derivedClassDecl, - Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, - typeToString(type), - symbolToString(baseProperty), - typeToString(baseType) - ) - ); - } - } - } else { - const derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived); - if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) { - continue; - } - let errorMessage; - const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */; - const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */; - if (basePropertyFlags && derivedPropertyFlags) { - if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_a = base.declarations) == null ? void 0 : _a.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_b = base.declarations) == null ? void 0 : _b.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) { - continue; - } - const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */; - const overriddenInstanceAccessor = basePropertyFlags === 4 /* Property */ && derivedPropertyFlags !== 4 /* Property */; - if (overriddenInstanceProperty || overriddenInstanceAccessor) { - const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor; - error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); - } else if (useDefineForClassFields) { - const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer); - if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { - const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); - const propName = uninitialized.name; - if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { - const errorMessage2 = 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; - error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType)); - } - } - } - continue; - } else if (isPrototypeProperty(base)) { - if (isPrototypeProperty(derived) || derived.flags & 4 /* Property */) { - continue; - } else { - Debug.assert(!!(derived.flags & 98304 /* Accessor */)); - errorMessage = Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } - } else if (base.flags & 98304 /* Accessor */) { - errorMessage = Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function; - } else { - errorMessage = Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; - } - error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); - } - } - } - function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) { - return baseDeclarationFlags & 256 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent); - } - function getNonInheritedProperties(type, baseTypes, properties) { - if (!length(baseTypes)) { - return properties; - } - const seen = /* @__PURE__ */ new Map(); - forEach(properties, (p) => { - seen.set(p.escapedName, p); - }); - for (const base of baseTypes) { - const properties2 = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType)); - for (const prop of properties2) { - const existing = seen.get(prop.escapedName); - if (existing && prop.parent === existing.parent) { - seen.delete(prop.escapedName); - } - } - } - return arrayFrom(seen.values()); - } - function checkInheritedPropertiesAreIdentical(type, typeNode) { - const baseTypes = getBaseTypes(type); - if (baseTypes.length < 2) { - return true; - } - const seen = /* @__PURE__ */ new Map(); - forEach(resolveDeclaredMembers(type).declaredProperties, (p) => { - seen.set(p.escapedName, { prop: p, containingType: type }); - }); - let ok = true; - for (const base of baseTypes) { - const properties = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType)); - for (const prop of properties) { - const existing = seen.get(prop.escapedName); - if (!existing) { - seen.set(prop.escapedName, { prop, containingType: base }); - } else { - const isInheritedProperty = existing.containingType !== type; - if (isInheritedProperty && !isPropertyIdenticalTo(existing.prop, prop)) { - ok = false; - const typeName1 = typeToString(existing.containingType); - const typeName2 = typeToString(base); - let errorInfo = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, - symbolToString(prop), - typeName1, - typeName2 - ); - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2); - diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(typeNode), typeNode, errorInfo)); - } - } - } - } - return ok; - } - function checkPropertyInitialization(node) { - if (!strictNullChecks || !strictPropertyInitialization || node.flags & 33554432 /* Ambient */) { - return; - } - const constructor = findConstructorDeclaration(node); - for (const member of node.members) { - if (getEffectiveModifierFlags(member) & 2 /* Ambient */) { - continue; - } - if (!isStatic(member) && isPropertyWithoutInitializer(member)) { - const propName = member.name; - if (isIdentifier(propName) || isPrivateIdentifier(propName) || isComputedPropertyName(propName)) { - const type = getTypeOfSymbol(getSymbolOfDeclaration(member)); - if (!(type.flags & 3 /* AnyOrUnknown */ || containsUndefinedType(type))) { - if (!constructor || !isPropertyInitializedInConstructor(propName, type, constructor)) { - error2(member.name, Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor, declarationNameToString(propName)); - } - } - } - } - } - } - function isPropertyWithoutInitializer(node) { - return node.kind === 172 /* PropertyDeclaration */ && !hasAbstractModifier(node) && !node.exclamationToken && !node.initializer; - } - function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) { - for (const staticBlock of staticBlocks) { - if (staticBlock.pos >= startPos && staticBlock.pos <= endPos) { - const reference = factory.createPropertyAccessExpression(factory.createThis(), propName); - setParent(reference.expression, reference); - setParent(reference, staticBlock); - reference.flowNode = staticBlock.returnFlowNode; - const flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType)); - if (!containsUndefinedType(flowType)) { - return true; - } - } - } - return false; - } - function isPropertyInitializedInConstructor(propName, propType, constructor) { - const reference = isComputedPropertyName(propName) ? factory.createElementAccessExpression(factory.createThis(), propName.expression) : factory.createPropertyAccessExpression(factory.createThis(), propName); - setParent(reference.expression, reference); - setParent(reference, constructor); - reference.flowNode = constructor.returnFlowNode; - const flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType)); - return !containsUndefinedType(flowType); - } - function checkInterfaceDeclaration(node) { - if (!checkGrammarModifiers(node)) - checkGrammarInterfaceDeclaration(node); - checkTypeParameters(node.typeParameters); - addLazyDiagnostic(() => { - checkTypeNameIsReserved(node.name, Diagnostics.Interface_name_cannot_be_0); - checkExportsOnMergedDeclarations(node); - const symbol = getSymbolOfDeclaration(node); - checkTypeParameterListsIdentical(symbol); - const firstInterfaceDecl = getDeclarationOfKind(symbol, 264 /* InterfaceDeclaration */); - if (node === firstInterfaceDecl) { - const type = getDeclaredTypeOfSymbol(symbol); - const typeWithThis = getTypeWithThisArgument(type); - if (checkInheritedPropertiesAreIdentical(type, node.name)) { - for (const baseType of getBaseTypes(type)) { - checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType, type.thisType), node.name, Diagnostics.Interface_0_incorrectly_extends_interface_1); - } - checkIndexConstraints(type, symbol); - } - } - checkObjectTypeForDuplicateDeclarations(node); - }); - forEach(getInterfaceBaseTypeNodes(node), (heritageElement) => { - if (!isEntityNameExpression(heritageElement.expression) || isOptionalChain(heritageElement.expression)) { - error2(heritageElement.expression, Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); - } - checkTypeReferenceNode(heritageElement); - }); - forEach(node.members, checkSourceElement); - addLazyDiagnostic(() => { - checkTypeForDuplicateIndexSignatures(node); - registerForUnusedIdentifiersCheck(node); - }); - } - function checkTypeAliasDeclaration(node) { - checkGrammarModifiers(node); - checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); - checkExportsOnMergedDeclarations(node); - checkTypeParameters(node.typeParameters); - if (node.type.kind === 141 /* IntrinsicKeyword */) { - if (!intrinsicTypeKinds.has(node.name.escapedText) || length(node.typeParameters) !== 1) { - error2(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); - } - } else { - checkSourceElement(node.type); - registerForUnusedIdentifiersCheck(node); - } - } - function computeEnumMemberValues(node) { - const nodeLinks2 = getNodeLinks(node); - if (!(nodeLinks2.flags & 1024 /* EnumValuesComputed */)) { - nodeLinks2.flags |= 1024 /* EnumValuesComputed */; - let autoValue = 0; - for (const member of node.members) { - const value = computeMemberValue(member, autoValue); - getNodeLinks(member).enumMemberValue = value; - autoValue = typeof value === "number" ? value + 1 : void 0; - } - } - } - function computeMemberValue(member, autoValue) { - if (isComputedNonLiteralName(member.name)) { - error2(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums); - } else { - const text = getTextOfPropertyName(member.name); - if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) { - error2(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name); - } - } - if (member.initializer) { - return computeConstantValue(member); - } - if (member.parent.flags & 33554432 /* Ambient */ && !isEnumConst(member.parent)) { - return void 0; - } - if (autoValue !== void 0) { - return autoValue; - } - error2(member.name, Diagnostics.Enum_member_must_have_initializer); - return void 0; - } - function computeConstantValue(member) { - const isConstEnum = isEnumConst(member.parent); - const initializer = member.initializer; - const value = evaluate(initializer, member); - if (value !== void 0) { - if (isConstEnum && typeof value === "number" && !isFinite(value)) { - error2(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); - } - } else if (isConstEnum) { - error2(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); - } else if (member.parent.flags & 33554432 /* Ambient */) { - error2(initializer, Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression); - } else { - checkTypeAssignableTo(checkExpression(initializer), numberType, initializer, Diagnostics.Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values); - } - return value; - } - function evaluate(expr, location) { - switch (expr.kind) { - case 224 /* PrefixUnaryExpression */: - const value = evaluate(expr.operand, location); - if (typeof value === "number") { - switch (expr.operator) { - case 40 /* PlusToken */: - return value; - case 41 /* MinusToken */: - return -value; - case 55 /* TildeToken */: - return ~value; - } - } - break; - case 226 /* BinaryExpression */: - const left = evaluate(expr.left, location); - const right = evaluate(expr.right, location); - if (typeof left === "number" && typeof right === "number") { - switch (expr.operatorToken.kind) { - case 52 /* BarToken */: - return left | right; - case 51 /* AmpersandToken */: - return left & right; - case 49 /* GreaterThanGreaterThanToken */: - return left >> right; - case 50 /* GreaterThanGreaterThanGreaterThanToken */: - return left >>> right; - case 48 /* LessThanLessThanToken */: - return left << right; - case 53 /* CaretToken */: - return left ^ right; - case 42 /* AsteriskToken */: - return left * right; - case 44 /* SlashToken */: - return left / right; - case 40 /* PlusToken */: - return left + right; - case 41 /* MinusToken */: - return left - right; - case 45 /* PercentToken */: - return left % right; - case 43 /* AsteriskAsteriskToken */: - return left ** right; - } - } else if ((typeof left === "string" || typeof left === "number") && (typeof right === "string" || typeof right === "number") && expr.operatorToken.kind === 40 /* PlusToken */) { - return "" + left + right; - } - break; - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - return expr.text; - case 228 /* TemplateExpression */: - return evaluateTemplateExpression(expr, location); - case 9 /* NumericLiteral */: - checkGrammarNumericLiteral(expr); - return +expr.text; - case 217 /* ParenthesizedExpression */: - return evaluate(expr.expression, location); - case 80 /* Identifier */: { - const identifier = expr; - if (isInfinityOrNaNString(identifier.escapedText) && resolveEntityName( - identifier, - 111551 /* Value */, - /*ignoreErrors*/ - true - ) === getGlobalSymbol( - identifier.escapedText, - 111551 /* Value */, - /*diagnostic*/ - void 0 - )) { - return +identifier.escapedText; - } - } - case 211 /* PropertyAccessExpression */: - if (isEntityNameExpression(expr)) { - const symbol = resolveEntityName( - expr, - 111551 /* Value */, - /*ignoreErrors*/ - true - ); - if (symbol) { - if (symbol.flags & 8 /* EnumMember */) { - return location ? evaluateEnumMember(expr, symbol, location) : getEnumMemberValue(symbol.valueDeclaration); - } - if (isConstantVariable(symbol)) { - const declaration = symbol.valueDeclaration; - if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { - return evaluate(declaration.initializer, declaration); - } - } - } - } - break; - case 212 /* ElementAccessExpression */: - const root = expr.expression; - if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { - const rootSymbol = resolveEntityName( - root, - 111551 /* Value */, - /*ignoreErrors*/ - true - ); - if (rootSymbol && rootSymbol.flags & 384 /* Enum */) { - const name = escapeLeadingUnderscores(expr.argumentExpression.text); - const member = rootSymbol.exports.get(name); - if (member) { - return location ? evaluateEnumMember(expr, member, location) : getEnumMemberValue(member.valueDeclaration); - } - } - } - break; - } - return void 0; - } - function evaluateEnumMember(expr, symbol, location) { - const declaration = symbol.valueDeclaration; - if (!declaration || declaration === location) { - error2(expr, Diagnostics.Property_0_is_used_before_being_assigned, symbolToString(symbol)); - return void 0; - } - if (!isBlockScopedNameDeclaredBeforeUse(declaration, location)) { - error2(expr, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums); - return 0; - } - return getEnumMemberValue(declaration); - } - function evaluateTemplateExpression(expr, location) { - let result = expr.head.text; - for (const span of expr.templateSpans) { - const value = evaluate(span.expression, location); - if (value === void 0) { - return void 0; - } - result += value; - result += span.literal.text; - } - return result; - } - function checkEnumDeclaration(node) { - addLazyDiagnostic(() => checkEnumDeclarationWorker(node)); - } - function checkEnumDeclarationWorker(node) { - checkGrammarModifiers(node); - checkCollisionsForDeclarationName(node, node.name); - checkExportsOnMergedDeclarations(node); - node.members.forEach(checkEnumMember); - computeEnumMemberValues(node); - const enumSymbol = getSymbolOfDeclaration(node); - const firstDeclaration = getDeclarationOfKind(enumSymbol, node.kind); - if (node === firstDeclaration) { - if (enumSymbol.declarations && enumSymbol.declarations.length > 1) { - const enumIsConst = isEnumConst(node); - forEach(enumSymbol.declarations, (decl) => { - if (isEnumDeclaration(decl) && isEnumConst(decl) !== enumIsConst) { - error2(getNameOfDeclaration(decl), Diagnostics.Enum_declarations_must_all_be_const_or_non_const); - } - }); - } - let seenEnumMissingInitialInitializer = false; - forEach(enumSymbol.declarations, (declaration) => { - if (declaration.kind !== 266 /* EnumDeclaration */) { - return false; - } - const enumDeclaration = declaration; - if (!enumDeclaration.members.length) { - return false; - } - const firstEnumMember = enumDeclaration.members[0]; - if (!firstEnumMember.initializer) { - if (seenEnumMissingInitialInitializer) { - error2(firstEnumMember.name, Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); - } else { - seenEnumMissingInitialInitializer = true; - } - } - }); - } - } - function checkEnumMember(node) { - if (isPrivateIdentifier(node.name)) { - error2(node, Diagnostics.An_enum_member_cannot_be_named_with_a_private_identifier); - } - if (node.initializer) { - checkExpression(node.initializer); - } - } - function getFirstNonAmbientClassOrFunctionDeclaration(symbol) { - const declarations = symbol.declarations; - if (declarations) { - for (const declaration of declarations) { - if ((declaration.kind === 263 /* ClassDeclaration */ || declaration.kind === 262 /* FunctionDeclaration */ && nodeIsPresent(declaration.body)) && !(declaration.flags & 33554432 /* Ambient */)) { - return declaration; - } - } - } - return void 0; - } - function inSameLexicalScope(node1, node2) { - const container1 = getEnclosingBlockScopeContainer(node1); - const container2 = getEnclosingBlockScopeContainer(node2); - if (isGlobalSourceFile(container1)) { - return isGlobalSourceFile(container2); - } else if (isGlobalSourceFile(container2)) { - return false; - } else { - return container1 === container2; - } - } - function checkModuleDeclaration(node) { - if (node.body) { - checkSourceElement(node.body); - if (!isGlobalScopeAugmentation(node)) { - registerForUnusedIdentifiersCheck(node); - } - } - addLazyDiagnostic(checkModuleDeclarationDiagnostics); - function checkModuleDeclarationDiagnostics() { - var _a, _b; - const isGlobalAugmentation = isGlobalScopeAugmentation(node); - const inAmbientContext = node.flags & 33554432 /* Ambient */; - if (isGlobalAugmentation && !inAmbientContext) { - error2(node.name, Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context); - } - const isAmbientExternalModule = isAmbientModule(node); - const contextErrorMessage = isAmbientExternalModule ? Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file : Diagnostics.A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module; - if (checkGrammarModuleElementContext(node, contextErrorMessage)) { - return; - } - if (!checkGrammarModifiers(node)) { - if (!inAmbientContext && node.name.kind === 11 /* StringLiteral */) { - grammarErrorOnNode(node.name, Diagnostics.Only_ambient_modules_can_use_quoted_names); - } - } - if (isIdentifier(node.name)) { - checkCollisionsForDeclarationName(node, node.name); - } - checkExportsOnMergedDeclarations(node); - const symbol = getSymbolOfDeclaration(node); - if (symbol.flags & 512 /* ValueModule */ && !inAmbientContext && isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions))) { - if (getIsolatedModules(compilerOptions) && !getSourceFileOfNode(node).externalModuleIndicator) { - error2(node.name, Diagnostics.Namespaces_are_not_allowed_in_global_script_files_when_0_is_enabled_If_this_file_is_not_intended_to_be_a_global_script_set_moduleDetection_to_force_or_add_an_empty_export_statement, isolatedModulesLikeFlagName); - } - if (((_a = symbol.declarations) == null ? void 0 : _a.length) > 1) { - const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); - if (firstNonAmbientClassOrFunc) { - if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) { - error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); - } else if (node.pos < firstNonAmbientClassOrFunc.pos) { - error2(node.name, Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); - } - } - const mergedClass = getDeclarationOfKind(symbol, 263 /* ClassDeclaration */); - if (mergedClass && inSameLexicalScope(node, mergedClass)) { - getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; - } - } - if (compilerOptions.verbatimModuleSyntax && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || node.parent.impliedNodeFormat === 1 /* CommonJS */)) { - const exportModifier = (_b = node.modifiers) == null ? void 0 : _b.find((m) => m.kind === 95 /* ExportKeyword */); - if (exportModifier) { - error2(exportModifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); - } - } - } - if (isAmbientExternalModule) { - if (isExternalModuleAugmentation(node)) { - const checkBody = isGlobalAugmentation || getSymbolOfDeclaration(node).flags & 33554432 /* Transient */; - if (checkBody && node.body) { - for (const statement of node.body.statements) { - checkModuleAugmentationElement(statement, isGlobalAugmentation); - } - } - } else if (isGlobalSourceFile(node.parent)) { - if (isGlobalAugmentation) { - error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); - } else if (isExternalModuleNameRelative(getTextOfIdentifierOrLiteral(node.name))) { - error2(node.name, Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); - } - } else { - if (isGlobalAugmentation) { - error2(node.name, Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations); - } else { - error2(node.name, Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces); - } - } - } - } - } - function checkModuleAugmentationElement(node, isGlobalAugmentation) { - switch (node.kind) { - case 243 /* VariableStatement */: - for (const decl of node.declarationList.declarations) { - checkModuleAugmentationElement(decl, isGlobalAugmentation); - } - break; - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: - grammarErrorOnFirstToken(node, Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations); - break; - case 271 /* ImportEqualsDeclaration */: - case 272 /* ImportDeclaration */: - grammarErrorOnFirstToken(node, Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module); - break; - case 208 /* BindingElement */: - case 260 /* VariableDeclaration */: - const name = node.name; - if (isBindingPattern(name)) { - for (const el of name.elements) { - checkModuleAugmentationElement(el, isGlobalAugmentation); - } - break; - } - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 262 /* FunctionDeclaration */: - case 264 /* InterfaceDeclaration */: - case 267 /* ModuleDeclaration */: - case 265 /* TypeAliasDeclaration */: - if (isGlobalAugmentation) { - return; - } - break; - } - } - function getFirstNonModuleExportsIdentifier(node) { - switch (node.kind) { - case 80 /* Identifier */: - return node; - case 166 /* QualifiedName */: - do { - node = node.left; - } while (node.kind !== 80 /* Identifier */); - return node; - case 211 /* PropertyAccessExpression */: - do { - if (isModuleExportsAccessExpression(node.expression) && !isPrivateIdentifier(node.name)) { - return node.name; - } - node = node.expression; - } while (node.kind !== 80 /* Identifier */); - return node; - } - } - function checkExternalImportOrExportDeclaration(node) { - const moduleName = getExternalModuleName(node); - if (!moduleName || nodeIsMissing(moduleName)) { - return false; - } - if (!isStringLiteral(moduleName)) { - error2(moduleName, Diagnostics.String_literal_expected); - return false; - } - const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule) { - error2(moduleName, node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); - return false; - } - if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { - if (!isTopLevelInExternalModuleAugmentation(node)) { - error2(node, Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); - return false; - } - } - if (!isImportEqualsDeclaration(node) && node.assertClause) { - let hasError = false; - for (const clause of node.assertClause.elements) { - if (!isStringLiteral(clause.value)) { - hasError = true; - error2(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); - } - } - return !hasError; - } - return true; - } - function checkAliasSymbol(node) { - var _a, _b, _c, _d; - let symbol = getSymbolOfDeclaration(node); - const target = resolveAlias(symbol); - if (target !== unknownSymbol) { - symbol = getMergedSymbol(symbol.exportSymbol || symbol); - if (isInJSFile(node) && !(target.flags & 111551 /* Value */) && !isTypeOnlyImportOrExportDeclaration(node)) { - const errorNode = isImportOrExportSpecifier(node) ? node.propertyName || node.name : isNamedDeclaration(node) ? node.name : node; - Debug.assert(node.kind !== 280 /* NamespaceExport */); - if (node.kind === 281 /* ExportSpecifier */) { - const diag2 = error2(errorNode, Diagnostics.Types_cannot_appear_in_export_declarations_in_JavaScript_files); - const alreadyExportedSymbol = (_b = (_a = getSourceFileOfNode(node).symbol) == null ? void 0 : _a.exports) == null ? void 0 : _b.get((node.propertyName || node.name).escapedText); - if (alreadyExportedSymbol === target) { - const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode); - if (exportingDeclaration) { - addRelatedInfo(diag2, createDiagnosticForNode( - exportingDeclaration, - Diagnostics._0_is_automatically_exported_here, - unescapeLeadingUnderscores(alreadyExportedSymbol.escapedName) - )); - } - } - } else { - Debug.assert(node.kind !== 260 /* VariableDeclaration */); - const importDeclaration = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)); - const moduleSpecifier = (importDeclaration && ((_d = tryGetModuleSpecifierFromDeclaration(importDeclaration)) == null ? void 0 : _d.text)) ?? "..."; - const importedIdentifier = unescapeLeadingUnderscores(isIdentifier(errorNode) ? errorNode.escapedText : symbol.escapedName); - error2( - errorNode, - Diagnostics._0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation, - importedIdentifier, - `import("${moduleSpecifier}").${importedIdentifier}` - ); - } - return; - } - const targetFlags = getSymbolFlags(target); - const excludedMeanings = (symbol.flags & (111551 /* Value */ | 1048576 /* ExportValue */) ? 111551 /* Value */ : 0) | (symbol.flags & 788968 /* Type */ ? 788968 /* Type */ : 0) | (symbol.flags & 1920 /* Namespace */ ? 1920 /* Namespace */ : 0); - if (targetFlags & excludedMeanings) { - const message = node.kind === 281 /* ExportSpecifier */ ? Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; - error2(node, message, symbolToString(symbol)); - } - if (getIsolatedModules(compilerOptions) && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */)) { - const typeOnlyAlias = getTypeOnlyAliasDeclaration(symbol); - const isType = !(targetFlags & 111551 /* Value */); - if (isType || typeOnlyAlias) { - switch (node.kind) { - case 273 /* ImportClause */: - case 276 /* ImportSpecifier */: - case 271 /* ImportEqualsDeclaration */: { - if (compilerOptions.preserveValueImports || compilerOptions.verbatimModuleSyntax) { - Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name"); - const message = compilerOptions.verbatimModuleSyntax && isInternalModuleImportEqualsDeclaration(node) ? Diagnostics.An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled : isType ? compilerOptions.verbatimModuleSyntax ? Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled : compilerOptions.verbatimModuleSyntax ? Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled : Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled; - const name = idText(node.kind === 276 /* ImportSpecifier */ ? node.propertyName || node.name : node.name); - addTypeOnlyDeclarationRelatedInfo( - error2(node, message, name), - isType ? void 0 : typeOnlyAlias, - name - ); - } - if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { - error2(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); - } - break; - } - case 281 /* ExportSpecifier */: { - if (compilerOptions.verbatimModuleSyntax || getSourceFileOfNode(typeOnlyAlias) !== getSourceFileOfNode(node)) { - const name = idText(node.propertyName || node.name); - const diagnostic = isType ? error2(node, Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type, isolatedModulesLikeFlagName) : error2(node, Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled, name, isolatedModulesLikeFlagName); - addTypeOnlyDeclarationRelatedInfo(diagnostic, isType ? void 0 : typeOnlyAlias, name); - break; - } - } - } - } - if (compilerOptions.verbatimModuleSyntax && node.kind !== 271 /* ImportEqualsDeclaration */ && !isInJSFile(node) && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); - } - } - if (isImportSpecifier(node)) { - const targetSymbol = resolveAliasWithDeprecationCheck(symbol, node); - if (isDeprecatedSymbol(targetSymbol) && targetSymbol.declarations) { - addDeprecatedSuggestion(node, targetSymbol.declarations, targetSymbol.escapedName); - } - } - } - } - function resolveAliasWithDeprecationCheck(symbol, location) { - if (!(symbol.flags & 2097152 /* Alias */) || isDeprecatedSymbol(symbol) || !getDeclarationOfAliasSymbol(symbol)) { - return symbol; - } - const targetSymbol = resolveAlias(symbol); - if (targetSymbol === unknownSymbol) - return targetSymbol; - while (symbol.flags & 2097152 /* Alias */) { - const target = getImmediateAliasedSymbol(symbol); - if (target) { - if (target === targetSymbol) - break; - if (target.declarations && length(target.declarations)) { - if (isDeprecatedSymbol(target)) { - addDeprecatedSuggestion(location, target.declarations, target.escapedName); - break; - } else { - if (symbol === targetSymbol) - break; - symbol = target; - } - } - } else { - break; - } - } - return targetSymbol; - } - function checkImportBinding(node) { - checkCollisionsForDeclarationName(node, node.name); - checkAliasSymbol(node); - if (node.kind === 276 /* ImportSpecifier */ && idText(node.propertyName || node.name) === "default" && getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - checkExternalEmitHelpers(node, 131072 /* ImportDefault */); - } - } - function checkAssertClause(declaration) { - var _a; - if (declaration.assertClause) { - const validForTypeAssertions = isExclusivelyTypeOnlyImportOrExport(declaration); - const override = getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : void 0); - if (validForTypeAssertions && override) { - if (!isNightly()) { - grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next); - } - if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext); - } - return; - } - const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier); - if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */) { - return grammarErrorOnNode( - declaration.assertClause, - moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext - ); - } - if (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); - } - if (override) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports); - } - } - } - function checkImportDeclaration(node) { - if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { - return; - } - if (!checkGrammarModifiers(node) && hasEffectiveModifiers(node)) { - grammarErrorOnFirstToken(node, Diagnostics.An_import_declaration_cannot_have_modifiers); - } - if (checkExternalImportOrExportDeclaration(node)) { - const importClause = node.importClause; - if (importClause && !checkGrammarImportClause(importClause)) { - if (importClause.name) { - checkImportBinding(importClause); - } - if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { - checkImportBinding(importClause.namedBindings); - if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && getESModuleInterop(compilerOptions)) { - checkExternalEmitHelpers(node, 65536 /* ImportStar */); - } - } else { - const moduleExisted = resolveExternalModuleName(node, node.moduleSpecifier); - if (moduleExisted) { - forEach(importClause.namedBindings.elements, checkImportBinding); - } - } - } - } - } - checkAssertClause(node); - } - function checkImportEqualsDeclaration(node) { - if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { - return; - } - checkGrammarModifiers(node); - if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { - checkImportBinding(node); - if (hasSyntacticModifier(node, 1 /* Export */)) { - markExportAsReferenced(node); - } - if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { - const target = resolveAlias(getSymbolOfDeclaration(node)); - if (target !== unknownSymbol) { - const targetFlags = getSymbolFlags(target); - if (targetFlags & 111551 /* Value */) { - const moduleName = getFirstIdentifier(node.moduleReference); - if (!(resolveEntityName(moduleName, 111551 /* Value */ | 1920 /* Namespace */).flags & 1920 /* Namespace */)) { - error2(moduleName, Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, declarationNameToString(moduleName)); - } - } - if (targetFlags & 788968 /* Type */) { - checkTypeNameIsReserved(node.name, Diagnostics.Import_name_cannot_be_0); - } - } - if (node.isTypeOnly) { - grammarErrorOnNode(node, Diagnostics.An_import_alias_cannot_use_import_type); - } - } else { - if (moduleKind >= 5 /* ES2015 */ && getSourceFileOfNode(node).impliedNodeFormat === void 0 && !node.isTypeOnly && !(node.flags & 33554432 /* Ambient */)) { - grammarErrorOnNode(node, 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); - } - } - } - } - function checkExportDeclaration(node) { - if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { - return; - } - if (!checkGrammarModifiers(node) && hasSyntacticModifiers(node)) { - grammarErrorOnFirstToken(node, Diagnostics.An_export_declaration_cannot_have_modifiers); - } - if (node.moduleSpecifier && node.exportClause && isNamedExports(node.exportClause) && length(node.exportClause.elements) && languageVersion === 0 /* ES3 */) { - checkExternalEmitHelpers(node, 4194304 /* CreateBinding */); - } - checkGrammarExportDeclaration(node); - if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { - if (node.exportClause && !isNamespaceExport(node.exportClause)) { - forEach(node.exportClause.elements, checkExportSpecifier); - const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); - const inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 268 /* ModuleBlock */ && !node.moduleSpecifier && node.flags & 33554432 /* Ambient */; - if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) { - error2(node, Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); - } - } else { - const moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); - if (moduleSymbol && hasExportAssignmentSymbol(moduleSymbol)) { - error2(node.moduleSpecifier, Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); - } else if (node.exportClause) { - checkAliasSymbol(node.exportClause); - } - if (moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - if (node.exportClause) { - if (getESModuleInterop(compilerOptions)) { - checkExternalEmitHelpers(node, 65536 /* ImportStar */); - } - } else { - checkExternalEmitHelpers(node, 32768 /* ExportStar */); - } - } - } - } - checkAssertClause(node); - } - function checkGrammarExportDeclaration(node) { - var _a; - if (node.isTypeOnly && ((_a = node.exportClause) == null ? void 0 : _a.kind) === 279 /* NamedExports */) { - return checkGrammarNamedImportsOrExports(node.exportClause); - } - return false; - } - function checkGrammarModuleElementContext(node, errorMessage) { - const isInAppropriateContext = node.parent.kind === 312 /* SourceFile */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 267 /* ModuleDeclaration */; - if (!isInAppropriateContext) { - grammarErrorOnFirstToken(node, errorMessage); - } - return !isInAppropriateContext; - } - function importClauseContainsReferencedImport(importClause) { - return forEachImportClauseDeclaration(importClause, (declaration) => { - return !!getSymbolOfDeclaration(declaration).isReferenced; - }); - } - function importClauseContainsConstEnumUsedAsValue(importClause) { - return forEachImportClauseDeclaration(importClause, (declaration) => { - return !!getSymbolLinks(getSymbolOfDeclaration(declaration)).constEnumReferenced; - }); - } - function canConvertImportDeclarationToTypeOnly(statement) { - return isImportDeclaration(statement) && statement.importClause && !statement.importClause.isTypeOnly && importClauseContainsReferencedImport(statement.importClause) && !isReferencedAliasDeclaration( - statement.importClause, - /*checkChildren*/ - true - ) && !importClauseContainsConstEnumUsedAsValue(statement.importClause); - } - function canConvertImportEqualsDeclarationToTypeOnly(statement) { - return isImportEqualsDeclaration(statement) && isExternalModuleReference(statement.moduleReference) && !statement.isTypeOnly && getSymbolOfDeclaration(statement).isReferenced && !isReferencedAliasDeclaration( - statement, - /*checkChildren*/ - false - ) && !getSymbolLinks(getSymbolOfDeclaration(statement)).constEnumReferenced; - } - function checkImportsForTypeOnlyConversion(sourceFile) { - if (!canCollectSymbolAliasAccessabilityData) { - return; - } - for (const statement of sourceFile.statements) { - if (canConvertImportDeclarationToTypeOnly(statement) || canConvertImportEqualsDeclarationToTypeOnly(statement)) { - error2( - statement, - Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error - ); - } - } - } - function checkExportSpecifier(node) { - checkAliasSymbol(node); - if (getEmitDeclarations(compilerOptions)) { - collectLinkedAliases( - node.propertyName || node.name, - /*setVisibility*/ - true - ); - } - if (!node.parent.parent.moduleSpecifier) { - const exportedName = node.propertyName || node.name; - const symbol = resolveName( - exportedName, - exportedName.escapedText, - 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - true - ); - if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || symbol.declarations && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) { - error2(exportedName, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, idText(exportedName)); - } else { - if (!node.isTypeOnly && !node.parent.parent.isTypeOnly) { - markExportAsReferenced(node); - } - const target = symbol && (symbol.flags & 2097152 /* Alias */ ? resolveAlias(symbol) : symbol); - if (!target || getSymbolFlags(target) & 111551 /* Value */) { - checkExpressionCached(node.propertyName || node.name); - } - } - } else { - if (getESModuleInterop(compilerOptions) && moduleKind !== 4 /* System */ && (moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && idText(node.propertyName || node.name) === "default") { - checkExternalEmitHelpers(node, 131072 /* ImportDefault */); - } - } - } - function checkExportAssignment(node) { - const illegalContextMessage = node.isExportEquals ? Diagnostics.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration : Diagnostics.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration; - if (checkGrammarModuleElementContext(node, illegalContextMessage)) { - return; - } - const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { - if (node.isExportEquals) { - error2(node, Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); - } else { - error2(node, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); - } - return; - } - if (!checkGrammarModifiers(node) && hasEffectiveModifiers(node)) { - grammarErrorOnFirstToken(node, Diagnostics.An_export_assignment_cannot_have_modifiers); - } - const typeAnnotationNode = getEffectiveTypeAnnotationNode(node); - if (typeAnnotationNode) { - checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression); - } - const isIllegalExportDefaultInCJS = !node.isExportEquals && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */); - if (node.expression.kind === 80 /* Identifier */) { - const id = node.expression; - const sym = getExportSymbolOfValueSymbolIfExported(resolveEntityName( - id, - 67108863 /* All */, - /*ignoreErrors*/ - true, - /*dontResolveAlias*/ - true, - node - )); - if (sym) { - markAliasReferenced(sym, id); - if (getSymbolFlags(sym) & 111551 /* Value */) { - checkExpressionCached(id); - if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax && getTypeOnlyAliasDeclaration(sym, 111551 /* Value */)) { - error2( - id, - node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration : Diagnostics.An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration, - idText(id) - ); - } - } else if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && compilerOptions.verbatimModuleSyntax) { - error2( - id, - node.isExportEquals ? Diagnostics.An_export_declaration_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type : Diagnostics.An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type, - idText(id) - ); - } - } else { - checkExpressionCached(id); - } - if (getEmitDeclarations(compilerOptions)) { - collectLinkedAliases( - id, - /*setVisibility*/ - true - ); - } - } else { - checkExpressionCached(node.expression); - } - if (isIllegalExportDefaultInCJS) { - error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); - } - checkExternalModuleExports(container); - if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) { - grammarErrorOnNode(node.expression, Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context); - } - if (node.isExportEquals) { - if (moduleKind >= 5 /* ES2015 */ && (node.flags & 33554432 /* Ambient */ && getSourceFileOfNode(node).impliedNodeFormat === 99 /* ESNext */ || !(node.flags & 33554432 /* Ambient */) && getSourceFileOfNode(node).impliedNodeFormat !== 1 /* CommonJS */)) { - grammarErrorOnNode(node, Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead); - } else if (moduleKind === 4 /* System */ && !(node.flags & 33554432 /* Ambient */)) { - grammarErrorOnNode(node, Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system); - } - } - } - function hasExportedMembers(moduleSymbol) { - return forEachEntry(moduleSymbol.exports, (_, id) => id !== "export="); - } - function checkExternalModuleExports(node) { - const moduleSymbol = getSymbolOfDeclaration(node); - const links = getSymbolLinks(moduleSymbol); - if (!links.exportsChecked) { - const exportEqualsSymbol = moduleSymbol.exports.get("export="); - if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { - const declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; - if (declaration && !isTopLevelInExternalModuleAugmentation(declaration) && !isInJSFile(declaration)) { - error2(declaration, Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); - } - } - const exports = getExportsOfModule(moduleSymbol); - if (exports) { - exports.forEach(({ declarations, flags }, id) => { - if (id === "__export") { - return; - } - if (flags & (1920 /* Namespace */ | 384 /* Enum */)) { - return; - } - const exportedDeclarationsCount = countWhere(declarations, and(isNotOverloadAndNotAccessor, not(isInterfaceDeclaration))); - if (flags & 524288 /* TypeAlias */ && exportedDeclarationsCount <= 2) { - return; - } - if (exportedDeclarationsCount > 1) { - if (!isDuplicatedCommonJSExport(declarations)) { - for (const declaration of declarations) { - if (isNotOverload(declaration)) { - diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Cannot_redeclare_exported_variable_0, unescapeLeadingUnderscores(id))); - } - } - } - } - }); - } - links.exportsChecked = true; - } - } - function isDuplicatedCommonJSExport(declarations) { - return declarations && declarations.length > 1 && declarations.every((d) => isInJSFile(d) && isAccessExpression(d) && (isExportsIdentifier(d.expression) || isModuleExportsAccessExpression(d.expression))); - } - function checkSourceElement(node) { - if (node) { - const saveCurrentNode = currentNode; - currentNode = node; - instantiationCount = 0; - checkSourceElementWorker(node); - currentNode = saveCurrentNode; - } - } - function checkSourceElementWorker(node) { - if (canHaveJSDoc(node)) { - forEach(node.jsDoc, ({ comment, tags }) => { - checkJSDocCommentWorker(comment); - forEach(tags, (tag) => { - checkJSDocCommentWorker(tag.comment); - if (isInJSFile(node)) { - checkSourceElement(tag); - } - }); - }); - } - const kind = node.kind; - if (cancellationToken) { - switch (kind) { - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: - cancellationToken.throwIfCancellationRequested(); - } - } - if (kind >= 243 /* FirstStatement */ && kind <= 259 /* LastStatement */ && canHaveFlowNode(node) && node.flowNode && !isReachableFlowNode(node.flowNode)) { - errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, Diagnostics.Unreachable_code_detected); - } - switch (kind) { - case 168 /* TypeParameter */: - return checkTypeParameter(node); - case 169 /* Parameter */: - return checkParameter(node); - case 172 /* PropertyDeclaration */: - return checkPropertyDeclaration(node); - case 171 /* PropertySignature */: - return checkPropertySignature(node); - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 181 /* IndexSignature */: - return checkSignatureDeclaration(node); - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - return checkMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: - return checkClassStaticBlockDeclaration(node); - case 176 /* Constructor */: - return checkConstructorDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return checkAccessorDeclaration(node); - case 183 /* TypeReference */: - return checkTypeReferenceNode(node); - case 182 /* TypePredicate */: - return checkTypePredicate(node); - case 186 /* TypeQuery */: - return checkTypeQuery(node); - case 187 /* TypeLiteral */: - return checkTypeLiteral(node); - case 188 /* ArrayType */: - return checkArrayType(node); - case 189 /* TupleType */: - return checkTupleType(node); - case 192 /* UnionType */: - case 193 /* IntersectionType */: - return checkUnionOrIntersectionType(node); - case 196 /* ParenthesizedType */: - case 190 /* OptionalType */: - case 191 /* RestType */: - return checkSourceElement(node.type); - case 197 /* ThisType */: - return checkThisType(node); - case 198 /* TypeOperator */: - return checkTypeOperator(node); - case 194 /* ConditionalType */: - return checkConditionalType(node); - case 195 /* InferType */: - return checkInferType(node); - case 203 /* TemplateLiteralType */: - return checkTemplateLiteralType(node); - case 205 /* ImportType */: - return checkImportType(node); - case 202 /* NamedTupleMember */: - return checkNamedTupleMember(node); - case 335 /* JSDocAugmentsTag */: - return checkJSDocAugmentsTag(node); - case 336 /* JSDocImplementsTag */: - return checkJSDocImplementsTag(node); - case 353 /* JSDocTypedefTag */: - case 345 /* JSDocCallbackTag */: - case 347 /* JSDocEnumTag */: - return checkJSDocTypeAliasTag(node); - case 352 /* JSDocTemplateTag */: - return checkJSDocTemplateTag(node); - case 351 /* JSDocTypeTag */: - return checkJSDocTypeTag(node); - case 331 /* JSDocLink */: - case 332 /* JSDocLinkCode */: - case 333 /* JSDocLinkPlain */: - return checkJSDocLinkLikeTag(node); - case 348 /* JSDocParameterTag */: - return checkJSDocParameterTag(node); - case 355 /* JSDocPropertyTag */: - return checkJSDocPropertyTag(node); - case 324 /* JSDocFunctionType */: - checkJSDocFunctionType(node); - case 322 /* JSDocNonNullableType */: - case 321 /* JSDocNullableType */: - case 319 /* JSDocAllType */: - case 320 /* JSDocUnknownType */: - case 329 /* JSDocTypeLiteral */: - checkJSDocTypeIsInJsFile(node); - forEachChild(node, checkSourceElement); - return; - case 325 /* JSDocVariadicType */: - checkJSDocVariadicType(node); - return; - case 316 /* JSDocTypeExpression */: - return checkSourceElement(node.type); - case 340 /* JSDocPublicTag */: - case 342 /* JSDocProtectedTag */: - case 341 /* JSDocPrivateTag */: - return checkJSDocAccessibilityModifiers(node); - case 357 /* JSDocSatisfiesTag */: - return checkJSDocSatisfiesTag(node); - case 199 /* IndexedAccessType */: - return checkIndexedAccessType(node); - case 200 /* MappedType */: - return checkMappedType(node); - case 262 /* FunctionDeclaration */: - return checkFunctionDeclaration(node); - case 241 /* Block */: - case 268 /* ModuleBlock */: - return checkBlock(node); - case 243 /* VariableStatement */: - return checkVariableStatement(node); - case 244 /* ExpressionStatement */: - return checkExpressionStatement(node); - case 245 /* IfStatement */: - return checkIfStatement(node); - case 246 /* DoStatement */: - return checkDoStatement(node); - case 247 /* WhileStatement */: - return checkWhileStatement(node); - case 248 /* ForStatement */: - return checkForStatement(node); - case 249 /* ForInStatement */: - return checkForInStatement(node); - case 250 /* ForOfStatement */: - return checkForOfStatement(node); - case 251 /* ContinueStatement */: - case 252 /* BreakStatement */: - return checkBreakOrContinueStatement(node); - case 253 /* ReturnStatement */: - return checkReturnStatement(node); - case 254 /* WithStatement */: - return checkWithStatement(node); - case 255 /* SwitchStatement */: - return checkSwitchStatement(node); - case 256 /* LabeledStatement */: - return checkLabeledStatement(node); - case 257 /* ThrowStatement */: - return checkThrowStatement(node); - case 258 /* TryStatement */: - return checkTryStatement(node); - case 260 /* VariableDeclaration */: - return checkVariableDeclaration(node); - case 208 /* BindingElement */: - return checkBindingElement(node); - case 263 /* ClassDeclaration */: - return checkClassDeclaration(node); - case 264 /* InterfaceDeclaration */: - return checkInterfaceDeclaration(node); - case 265 /* TypeAliasDeclaration */: - return checkTypeAliasDeclaration(node); - case 266 /* EnumDeclaration */: - return checkEnumDeclaration(node); - case 267 /* ModuleDeclaration */: - return checkModuleDeclaration(node); - case 272 /* ImportDeclaration */: - return checkImportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: - return checkImportEqualsDeclaration(node); - case 278 /* ExportDeclaration */: - return checkExportDeclaration(node); - case 277 /* ExportAssignment */: - return checkExportAssignment(node); - case 242 /* EmptyStatement */: - case 259 /* DebuggerStatement */: - checkGrammarStatementInAmbientContext(node); - return; - case 282 /* MissingDeclaration */: - return checkMissingDeclaration(node); - } - } - function checkJSDocCommentWorker(node) { - if (isArray(node)) { - forEach(node, (tag) => { - if (isJSDocLinkLike(tag)) { - checkSourceElement(tag); - } - }); - } - } - function checkJSDocTypeIsInJsFile(node) { - if (!isInJSFile(node)) { - if (isJSDocNonNullableType(node) || isJSDocNullableType(node)) { - const token = tokenToString(isJSDocNonNullableType(node) ? 54 /* ExclamationToken */ : 58 /* QuestionToken */); - const diagnostic = node.postfix ? Diagnostics._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1 : Diagnostics._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1; - const typeNode = node.type; - const type = getTypeFromTypeNode(typeNode); - grammarErrorOnNode(node, diagnostic, token, typeToString( - isJSDocNullableType(node) && !(type === neverType || type === voidType) ? getUnionType(append([type, undefinedType], node.postfix ? void 0 : nullType)) : type - )); - } else { - grammarErrorOnNode(node, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); - } - } - } - function checkJSDocVariadicType(node) { - checkJSDocTypeIsInJsFile(node); - checkSourceElement(node.type); - const { parent: parent2 } = node; - if (isParameter(parent2) && isJSDocFunctionType(parent2.parent)) { - if (last(parent2.parent.parameters) !== parent2) { - error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); - } - return; - } - if (!isJSDocTypeExpression(parent2)) { - error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); - } - const paramTag = node.parent.parent; - if (!isJSDocParameterTag(paramTag)) { - error2(node, Diagnostics.JSDoc_may_only_appear_in_the_last_parameter_of_a_signature); - return; - } - const param = getParameterSymbolFromJSDoc(paramTag); - if (!param) { - return; - } - const host2 = getHostSignatureFromJSDoc(paramTag); - if (!host2 || last(host2.parameters).symbol !== param) { - error2(node, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); - } - } - function getTypeFromJSDocVariadicType(node) { - const type = getTypeFromTypeNode(node.type); - const { parent: parent2 } = node; - const paramTag = node.parent.parent; - if (isJSDocTypeExpression(node.parent) && isJSDocParameterTag(paramTag)) { - const host2 = getHostSignatureFromJSDoc(paramTag); - const isCallbackTag = isJSDocCallbackTag(paramTag.parent.parent); - if (host2 || isCallbackTag) { - const lastParamDeclaration = isCallbackTag ? lastOrUndefined(paramTag.parent.parent.typeExpression.parameters) : lastOrUndefined(host2.parameters); - const symbol = getParameterSymbolFromJSDoc(paramTag); - if (!lastParamDeclaration || symbol && lastParamDeclaration.symbol === symbol && isRestParameter(lastParamDeclaration)) { - return createArrayType(type); - } - } - } - if (isParameter(parent2) && isJSDocFunctionType(parent2.parent)) { - return createArrayType(type); - } - return addOptionality(type); - } - function checkNodeDeferred(node) { - const enclosingFile = getSourceFileOfNode(node); - const links = getNodeLinks(enclosingFile); - if (!(links.flags & 1 /* TypeChecked */)) { - links.deferredNodes || (links.deferredNodes = /* @__PURE__ */ new Set()); - links.deferredNodes.add(node); - } else { - Debug.assert(!links.deferredNodes, "A type-checked file should have no deferred nodes."); - } - } - function checkDeferredNodes(context) { - const links = getNodeLinks(context); - if (links.deferredNodes) { - links.deferredNodes.forEach(checkDeferredNode); - } - links.deferredNodes = void 0; - } - function checkDeferredNode(node) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Check, "checkDeferredNode", { kind: node.kind, pos: node.pos, end: node.end, path: node.tracingPath }); - const saveCurrentNode = currentNode; - currentNode = node; - instantiationCount = 0; - switch (node.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 215 /* TaggedTemplateExpression */: - case 170 /* Decorator */: - case 286 /* JsxOpeningElement */: - resolveUntypedCall(node); - break; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - checkFunctionExpressionOrObjectLiteralMethodDeferred(node); - break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - checkAccessorDeclaration(node); - break; - case 231 /* ClassExpression */: - checkClassExpressionDeferred(node); - break; - case 168 /* TypeParameter */: - checkTypeParameterDeferred(node); - break; - case 285 /* JsxSelfClosingElement */: - checkJsxSelfClosingElementDeferred(node); - break; - case 284 /* JsxElement */: - checkJsxElementDeferred(node); - break; - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - case 217 /* ParenthesizedExpression */: - checkAssertionDeferred(node); - } - currentNode = saveCurrentNode; - (_b = tracing) == null ? void 0 : _b.pop(); - } - function checkSourceFile(node) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push( - tracing.Phase.Check, - "checkSourceFile", - { path: node.path }, - /*separateBeginAndEnd*/ - true - ); - mark("beforeCheck"); - checkSourceFileWorker(node); - mark("afterCheck"); - measure("Check", "beforeCheck", "afterCheck"); - (_b = tracing) == null ? void 0 : _b.pop(); - } - function unusedIsError(kind, isAmbient) { - if (isAmbient) { - return false; - } - switch (kind) { - case 0 /* Local */: - return !!compilerOptions.noUnusedLocals; - case 1 /* Parameter */: - return !!compilerOptions.noUnusedParameters; - default: - return Debug.assertNever(kind); - } - } - function getPotentiallyUnusedIdentifiers(sourceFile) { - return allPotentiallyUnusedIdentifiers.get(sourceFile.path) || emptyArray; - } - function checkSourceFileWorker(node) { - const links = getNodeLinks(node); - if (!(links.flags & 1 /* TypeChecked */)) { - if (skipTypeChecking(node, compilerOptions, host)) { - return; - } - checkGrammarSourceFile(node); - clear(potentialThisCollisions); - clear(potentialNewTargetCollisions); - clear(potentialWeakMapSetCollisions); - clear(potentialReflectCollisions); - clear(potentialUnusedRenamedBindingElementsInTypes); - forEach(node.statements, checkSourceElement); - checkSourceElement(node.endOfFileToken); - checkDeferredNodes(node); - if (isExternalOrCommonJsModule(node)) { - registerForUnusedIdentifiersCheck(node); - } - addLazyDiagnostic(() => { - if (!node.isDeclarationFile && (compilerOptions.noUnusedLocals || compilerOptions.noUnusedParameters)) { - checkUnusedIdentifiers(getPotentiallyUnusedIdentifiers(node), (containingNode, kind, diag2) => { - if (!containsParseError(containingNode) && unusedIsError(kind, !!(containingNode.flags & 33554432 /* Ambient */))) { - diagnostics.add(diag2); - } - }); - } - if (!node.isDeclarationFile) { - checkPotentialUncheckedRenamedBindingElementsInTypes(); - } - }); - if (compilerOptions.importsNotUsedAsValues === 2 /* Error */ && !node.isDeclarationFile && isExternalModule(node)) { - checkImportsForTypeOnlyConversion(node); - } - if (isExternalOrCommonJsModule(node)) { - checkExternalModuleExports(node); - } - if (potentialThisCollisions.length) { - forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); - clear(potentialThisCollisions); - } - if (potentialNewTargetCollisions.length) { - forEach(potentialNewTargetCollisions, checkIfNewTargetIsCapturedInEnclosingScope); - clear(potentialNewTargetCollisions); - } - if (potentialWeakMapSetCollisions.length) { - forEach(potentialWeakMapSetCollisions, checkWeakMapSetCollision); - clear(potentialWeakMapSetCollisions); - } - if (potentialReflectCollisions.length) { - forEach(potentialReflectCollisions, checkReflectCollision); - clear(potentialReflectCollisions); - } - links.flags |= 1 /* TypeChecked */; - } - } - function getDiagnostics2(sourceFile, ct) { - try { - cancellationToken = ct; - return getDiagnosticsWorker(sourceFile); - } finally { - cancellationToken = void 0; - } - } - function ensurePendingDiagnosticWorkComplete() { - for (const cb of deferredDiagnosticsCallbacks) { - cb(); - } - deferredDiagnosticsCallbacks = []; - } - function checkSourceFileWithEagerDiagnostics(sourceFile) { - ensurePendingDiagnosticWorkComplete(); - const oldAddLazyDiagnostics = addLazyDiagnostic; - addLazyDiagnostic = (cb) => cb(); - checkSourceFile(sourceFile); - addLazyDiagnostic = oldAddLazyDiagnostics; - } - function getDiagnosticsWorker(sourceFile) { - if (sourceFile) { - ensurePendingDiagnosticWorkComplete(); - const previousGlobalDiagnostics = diagnostics.getGlobalDiagnostics(); - const previousGlobalDiagnosticsSize = previousGlobalDiagnostics.length; - checkSourceFileWithEagerDiagnostics(sourceFile); - const semanticDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName); - const currentGlobalDiagnostics = diagnostics.getGlobalDiagnostics(); - if (currentGlobalDiagnostics !== previousGlobalDiagnostics) { - const deferredGlobalDiagnostics = relativeComplement(previousGlobalDiagnostics, currentGlobalDiagnostics, compareDiagnostics); - return concatenate(deferredGlobalDiagnostics, semanticDiagnostics); - } else if (previousGlobalDiagnosticsSize === 0 && currentGlobalDiagnostics.length > 0) { - return concatenate(currentGlobalDiagnostics, semanticDiagnostics); - } - return semanticDiagnostics; - } - forEach(host.getSourceFiles(), checkSourceFileWithEagerDiagnostics); - return diagnostics.getDiagnostics(); - } - function getGlobalDiagnostics() { - ensurePendingDiagnosticWorkComplete(); - return diagnostics.getGlobalDiagnostics(); - } - function getSymbolsInScope(location, meaning) { - if (location.flags & 67108864 /* InWithStatement */) { - return []; - } - const symbols = createSymbolTable(); - let isStaticSymbol = false; - populateSymbols(); - symbols.delete("this" /* This */); - return symbolsToArray(symbols); - function populateSymbols() { - while (location) { - if (canHaveLocals(location) && location.locals && !isGlobalSourceFile(location)) { - copySymbols(location.locals, meaning); - } - switch (location.kind) { - case 312 /* SourceFile */: - if (!isExternalModule(location)) - break; - case 267 /* ModuleDeclaration */: - copyLocallyVisibleExportSymbols(getSymbolOfDeclaration(location).exports, meaning & 2623475 /* ModuleMember */); - break; - case 266 /* EnumDeclaration */: - copySymbols(getSymbolOfDeclaration(location).exports, meaning & 8 /* EnumMember */); - break; - case 231 /* ClassExpression */: - const className = location.name; - if (className) { - copySymbol(location.symbol, meaning); - } - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - if (!isStaticSymbol) { - copySymbols(getMembersOfSymbol(getSymbolOfDeclaration(location)), meaning & 788968 /* Type */); - } - break; - case 218 /* FunctionExpression */: - const funcName = location.name; - if (funcName) { - copySymbol(location.symbol, meaning); - } - break; - } - if (introducesArgumentsExoticObject(location)) { - copySymbol(argumentsSymbol, meaning); - } - isStaticSymbol = isStatic(location); - location = location.parent; - } - copySymbols(globals, meaning); - } - function copySymbol(symbol, meaning2) { - if (getCombinedLocalAndExportSymbolFlags(symbol) & meaning2) { - const id = symbol.escapedName; - if (!symbols.has(id)) { - symbols.set(id, symbol); - } - } - } - function copySymbols(source, meaning2) { - if (meaning2) { - source.forEach((symbol) => { - copySymbol(symbol, meaning2); - }); - } - } - function copyLocallyVisibleExportSymbols(source, meaning2) { - if (meaning2) { - source.forEach((symbol) => { - if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) { - copySymbol(symbol, meaning2); - } - }); - } - } - } - function isTypeDeclarationName(name) { - return name.kind === 80 /* Identifier */ && isTypeDeclaration(name.parent) && getNameOfDeclaration(name.parent) === name; - } - function isTypeReferenceIdentifier(node) { - while (node.parent.kind === 166 /* QualifiedName */) { - node = node.parent; - } - return node.parent.kind === 183 /* TypeReference */; - } - function isInNameOfExpressionWithTypeArguments(node) { - while (node.parent.kind === 211 /* PropertyAccessExpression */) { - node = node.parent; - } - return node.parent.kind === 233 /* ExpressionWithTypeArguments */; - } - function forEachEnclosingClass(node, callback) { - let result; - let containingClass = getContainingClass(node); - while (containingClass) { - if (result = callback(containingClass)) - break; - containingClass = getContainingClass(containingClass); - } - return result; - } - function isNodeUsedDuringClassInitialization(node) { - return !!findAncestor(node, (element) => { - if (isConstructorDeclaration(element) && nodeIsPresent(element.body) || isPropertyDeclaration(element)) { - return true; - } else if (isClassLike(element) || isFunctionLikeDeclaration(element)) { - return "quit"; - } - return false; - }); - } - function isNodeWithinClass(node, classDeclaration) { - return !!forEachEnclosingClass(node, (n) => n === classDeclaration); - } - function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 166 /* QualifiedName */) { - nodeOnRightSide = nodeOnRightSide.parent; - } - if (nodeOnRightSide.parent.kind === 271 /* ImportEqualsDeclaration */) { - return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : void 0; - } - if (nodeOnRightSide.parent.kind === 277 /* ExportAssignment */) { - return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : void 0; - } - return void 0; - } - function isInRightSideOfImportOrExportAssignment(node) { - return getLeftSideOfImportEqualsOrExportAssignment(node) !== void 0; - } - function getSpecialPropertyAssignmentSymbolFromEntityName(entityName) { - const specialPropertyAssignmentKind = getAssignmentDeclarationKind(entityName.parent.parent); - switch (specialPropertyAssignmentKind) { - case 1 /* ExportsProperty */: - case 3 /* PrototypeProperty */: - return getSymbolOfNode(entityName.parent); - case 4 /* ThisProperty */: - case 2 /* ModuleExports */: - case 5 /* Property */: - return getSymbolOfDeclaration(entityName.parent.parent); - } - } - function isImportTypeQualifierPart(node) { - let parent2 = node.parent; - while (isQualifiedName(parent2)) { - node = parent2; - parent2 = parent2.parent; - } - if (parent2 && parent2.kind === 205 /* ImportType */ && parent2.qualifier === node) { - return parent2; - } - return void 0; - } - function isThisPropertyAndThisTyped(node) { - if (node.expression.kind === 110 /* ThisKeyword */) { - const container = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - if (isFunctionLike(container)) { - const containingLiteral = getContainingObjectLiteral(container); - if (containingLiteral) { - const contextualType = getApparentTypeOfContextualType( - containingLiteral, - /*contextFlags*/ - void 0 - ); - const type = getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType); - return type && !isTypeAny(type); - } - } - } - } - function getSymbolOfNameOrPropertyAccessExpression(name) { - if (isDeclarationName(name)) { - return getSymbolOfNode(name.parent); - } - if (isInJSFile(name) && name.parent.kind === 211 /* PropertyAccessExpression */ && name.parent === name.parent.parent.left) { - if (!isPrivateIdentifier(name) && !isJSDocMemberName(name) && !isThisPropertyAndThisTyped(name.parent)) { - const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name); - if (specialPropertyAssignmentSymbol) { - return specialPropertyAssignmentSymbol; - } - } - } - if (name.parent.kind === 277 /* ExportAssignment */ && isEntityNameExpression(name)) { - const success = resolveEntityName( - name, - /*all meanings*/ - 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */, - /*ignoreErrors*/ - true - ); - if (success && success !== unknownSymbol) { - return success; - } - } else if (isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) { - const importEqualsDeclaration = getAncestor(name, 271 /* ImportEqualsDeclaration */); - Debug.assert(importEqualsDeclaration !== void 0); - return getSymbolOfPartOfRightHandSideOfImportEquals( - name, - /*dontResolveAlias*/ - true - ); - } - if (isEntityName(name)) { - const possibleImportNode = isImportTypeQualifierPart(name); - if (possibleImportNode) { - getTypeFromTypeNode(possibleImportNode); - const sym = getNodeLinks(name).resolvedSymbol; - return sym === unknownSymbol ? void 0 : sym; - } - } - while (isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(name)) { - name = name.parent; - } - if (isInNameOfExpressionWithTypeArguments(name)) { - let meaning = 0 /* None */; - if (name.parent.kind === 233 /* ExpressionWithTypeArguments */) { - meaning = isPartOfTypeNode(name) ? 788968 /* Type */ : 111551 /* Value */; - if (isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) { - meaning |= 111551 /* Value */; - } - } else { - meaning = 1920 /* Namespace */; - } - meaning |= 2097152 /* Alias */; - const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName( - name, - meaning, - /*ignoreErrors*/ - true - ) : void 0; - if (entityNameSymbol) { - return entityNameSymbol; - } - } - if (name.parent.kind === 348 /* JSDocParameterTag */) { - return getParameterSymbolFromJSDoc(name.parent); - } - if (name.parent.kind === 168 /* TypeParameter */ && name.parent.parent.kind === 352 /* JSDocTemplateTag */) { - Debug.assert(!isInJSFile(name)); - const typeParameter = getTypeParameterFromJsDoc(name.parent); - return typeParameter && typeParameter.symbol; - } - if (isExpressionNode(name)) { - if (nodeIsMissing(name)) { - return void 0; - } - const isJSDoc2 = findAncestor(name, or(isJSDocLinkLike, isJSDocNameReference, isJSDocMemberName)); - const meaning = isJSDoc2 ? 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */ : 111551 /* Value */; - if (name.kind === 80 /* Identifier */) { - if (isJSXTagName(name) && isJsxIntrinsicTagName(name)) { - const symbol = getIntrinsicTagSymbol(name.parent); - return symbol === unknownSymbol ? void 0 : symbol; - } - const result = resolveEntityName( - name, - meaning, - /*ignoreErrors*/ - true, - /*dontResolveAlias*/ - true, - getHostSignatureFromJSDoc(name) - ); - if (!result && isJSDoc2) { - const container = findAncestor(name, or(isClassLike, isInterfaceDeclaration)); - if (container) { - return resolveJSDocMemberName( - name, - /*ignoreErrors*/ - true, - getSymbolOfDeclaration(container) - ); - } - } - if (result && isJSDoc2) { - const container = getJSDocHost(name); - if (container && isEnumMember(container) && container === result.valueDeclaration) { - return resolveEntityName( - name, - meaning, - /*ignoreErrors*/ - true, - /*dontResolveAlias*/ - true, - getSourceFileOfNode(container) - ) || result; - } - } - return result; - } else if (isPrivateIdentifier(name)) { - return getSymbolForPrivateIdentifierExpression(name); - } else if (name.kind === 211 /* PropertyAccessExpression */ || name.kind === 166 /* QualifiedName */) { - const links = getNodeLinks(name); - if (links.resolvedSymbol) { - return links.resolvedSymbol; - } - if (name.kind === 211 /* PropertyAccessExpression */) { - checkPropertyAccessExpression(name, 0 /* Normal */); - if (!links.resolvedSymbol) { - const expressionType = checkExpressionCached(name.expression); - const infos = getApplicableIndexInfos(expressionType, getLiteralTypeFromPropertyName(name.name)); - if (infos.length && expressionType.members) { - const resolved = resolveStructuredTypeMembers(expressionType); - const symbol = resolved.members.get("__index" /* Index */); - if (infos === getIndexInfosOfType(expressionType)) { - links.resolvedSymbol = symbol; - } else if (symbol) { - const symbolLinks2 = getSymbolLinks(symbol); - const declarationList = mapDefined(infos, (i) => i.declaration); - const nodeListId = map(declarationList, getNodeId).join(","); - if (!symbolLinks2.filteredIndexSymbolCache) { - symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map(); - } - if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) { - links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId); - } else { - const copy = createSymbol(131072 /* Signature */, "__index" /* Index */); - copy.declarations = mapDefined(infos, (i) => i.declaration); - copy.parent = expressionType.aliasSymbol ? expressionType.aliasSymbol : expressionType.symbol ? expressionType.symbol : getSymbolAtLocation(copy.declarations[0].parent); - symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy); - links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId); - } - } - } - } - } else { - checkQualifiedName(name, 0 /* Normal */); - } - if (!links.resolvedSymbol && isJSDoc2 && isQualifiedName(name)) { - return resolveJSDocMemberName(name); - } - return links.resolvedSymbol; - } else if (isJSDocMemberName(name)) { - return resolveJSDocMemberName(name); - } - } else if (isTypeReferenceIdentifier(name)) { - const meaning = name.parent.kind === 183 /* TypeReference */ ? 788968 /* Type */ : 1920 /* Namespace */; - const symbol = resolveEntityName( - name, - meaning, - /*ignoreErrors*/ - false, - /*dontResolveAlias*/ - true - ); - return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name); - } - if (name.parent.kind === 182 /* TypePredicate */) { - return resolveEntityName( - name, - /*meaning*/ - 1 /* FunctionScopedVariable */ - ); - } - return void 0; - } - function resolveJSDocMemberName(name, ignoreErrors, container) { - if (isEntityName(name)) { - const meaning = 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */; - let symbol = resolveEntityName( - name, - meaning, - ignoreErrors, - /*dontResolveAlias*/ - true, - getHostSignatureFromJSDoc(name) - ); - if (!symbol && isIdentifier(name) && container) { - symbol = getMergedSymbol(getSymbol2(getExportsOfSymbol(container), name.escapedText, meaning)); - } - if (symbol) { - return symbol; - } - } - const left = isIdentifier(name) ? container : resolveJSDocMemberName(name.left, ignoreErrors, container); - const right = isIdentifier(name) ? name.escapedText : name.right.escapedText; - if (left) { - const proto = left.flags & 111551 /* Value */ && getPropertyOfType(getTypeOfSymbol(left), "prototype"); - const t = proto ? getTypeOfSymbol(proto) : getDeclaredTypeOfSymbol(left); - return getPropertyOfType(t, right); - } - } - function getSymbolAtLocation(node, ignoreErrors) { - if (isSourceFile(node)) { - return isExternalModule(node) ? getMergedSymbol(node.symbol) : void 0; - } - const { parent: parent2 } = node; - const grandParent = parent2.parent; - if (node.flags & 67108864 /* InWithStatement */) { - return void 0; - } - if (isDeclarationNameOrImportPropertyName(node)) { - const parentSymbol = getSymbolOfDeclaration(parent2); - return isImportOrExportSpecifier(node.parent) && node.parent.propertyName === node ? getImmediateAliasedSymbol(parentSymbol) : parentSymbol; - } else if (isLiteralComputedPropertyDeclarationName(node)) { - return getSymbolOfDeclaration(parent2.parent); - } - if (node.kind === 80 /* Identifier */) { - if (isInRightSideOfImportOrExportAssignment(node)) { - return getSymbolOfNameOrPropertyAccessExpression(node); - } else if (parent2.kind === 208 /* BindingElement */ && grandParent.kind === 206 /* ObjectBindingPattern */ && node === parent2.propertyName) { - const typeOfPattern = getTypeOfNode(grandParent); - const propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText); - if (propertyDeclaration) { - return propertyDeclaration; - } - } else if (isMetaProperty(parent2) && parent2.name === node) { - if (parent2.keywordToken === 105 /* NewKeyword */ && idText(node) === "target") { - return checkNewTargetMetaProperty(parent2).symbol; - } - if (parent2.keywordToken === 102 /* ImportKeyword */ && idText(node) === "meta") { - return getGlobalImportMetaExpressionType().members.get("meta"); - } - return void 0; - } - } - switch (node.kind) { - case 80 /* Identifier */: - case 81 /* PrivateIdentifier */: - case 211 /* PropertyAccessExpression */: - case 166 /* QualifiedName */: - if (!isThisInTypeQuery(node)) { - return getSymbolOfNameOrPropertyAccessExpression(node); - } - case 110 /* ThisKeyword */: - const container = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - if (isFunctionLike(container)) { - const sig = getSignatureFromDeclaration(container); - if (sig.thisParameter) { - return sig.thisParameter; - } - } - if (isInExpressionContext(node)) { - return checkExpression(node).symbol; - } - case 197 /* ThisType */: - return getTypeFromThisTypeNode(node).symbol; - case 108 /* SuperKeyword */: - return checkExpression(node).symbol; - case 137 /* ConstructorKeyword */: - const constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 176 /* Constructor */) { - return constructorDeclaration.parent.symbol; - } - return void 0; - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 272 /* ImportDeclaration */ || node.parent.kind === 278 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall( - node.parent, - /*requireStringLiteralLikeArgument*/ - false - ) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) { - return resolveExternalModuleName(node, node, ignoreErrors); - } - if (isCallExpression(parent2) && isBindableObjectDefinePropertyCall(parent2) && parent2.arguments[1] === node) { - return getSymbolOfDeclaration(parent2); - } - case 9 /* NumericLiteral */: - const objectType = isElementAccessExpression(parent2) ? parent2.argumentExpression === node ? getTypeOfExpression(parent2.expression) : void 0 : isLiteralTypeNode(parent2) && isIndexedAccessTypeNode(grandParent) ? getTypeFromTypeNode(grandParent.objectType) : void 0; - return objectType && getPropertyOfType(objectType, escapeLeadingUnderscores(node.text)); - case 90 /* DefaultKeyword */: - case 100 /* FunctionKeyword */: - case 39 /* EqualsGreaterThanToken */: - case 86 /* ClassKeyword */: - return getSymbolOfNode(node.parent); - case 205 /* ImportType */: - return isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : void 0; - case 95 /* ExportKeyword */: - return isExportAssignment(node.parent) ? Debug.checkDefined(node.parent.symbol) : void 0; - case 102 /* ImportKeyword */: - case 105 /* NewKeyword */: - return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; - case 236 /* MetaProperty */: - return checkExpression(node).symbol; - case 295 /* JsxNamespacedName */: - if (isJSXTagName(node) && isJsxIntrinsicTagName(node)) { - const symbol = getIntrinsicTagSymbol(node.parent); - return symbol === unknownSymbol ? void 0 : symbol; - } - default: - return void 0; - } - } - function getIndexInfosAtLocation(node) { - if (isIdentifier(node) && isPropertyAccessExpression(node.parent) && node.parent.name === node) { - const keyType = getLiteralTypeFromPropertyName(node); - const objectType = getTypeOfExpression(node.parent.expression); - const objectTypes = objectType.flags & 1048576 /* Union */ ? objectType.types : [objectType]; - return flatMap(objectTypes, (t) => filter(getIndexInfosOfType(t), (info) => isApplicableIndexType(keyType, info.keyType))); - } - return void 0; - } - function getShorthandAssignmentValueSymbol(location) { - if (location && location.kind === 304 /* ShorthandPropertyAssignment */) { - return resolveEntityName(location.name, 111551 /* Value */ | 2097152 /* Alias */); - } - return void 0; - } - function getExportSpecifierLocalTargetSymbol(node) { - if (isExportSpecifier(node)) { - return node.parent.parent.moduleSpecifier ? getExternalModuleMember(node.parent.parent, node) : resolveEntityName(node.propertyName || node.name, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); - } else { - return resolveEntityName(node, 111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */); - } - } - function getTypeOfNode(node) { - if (isSourceFile(node) && !isExternalModule(node)) { - return errorType; - } - if (node.flags & 67108864 /* InWithStatement */) { - return errorType; - } - const classDecl = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); - const classType = classDecl && getDeclaredTypeOfClassOrInterface(getSymbolOfDeclaration(classDecl.class)); - if (isPartOfTypeNode(node)) { - const typeFromTypeNode = getTypeFromTypeNode(node); - return classType ? getTypeWithThisArgument(typeFromTypeNode, classType.thisType) : typeFromTypeNode; - } - if (isExpressionNode(node)) { - return getRegularTypeOfExpression(node); - } - if (classType && !classDecl.isImplements) { - const baseType = firstOrUndefined(getBaseTypes(classType)); - return baseType ? getTypeWithThisArgument(baseType, classType.thisType) : errorType; - } - if (isTypeDeclaration(node)) { - const symbol = getSymbolOfDeclaration(node); - return getDeclaredTypeOfSymbol(symbol); - } - if (isTypeDeclarationName(node)) { - const symbol = getSymbolAtLocation(node); - return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType; - } - if (isBindingElement(node)) { - return getTypeForVariableLikeDeclaration( - node, - /*includeOptionality*/ - true, - 0 /* Normal */ - ) || errorType; - } - if (isDeclaration(node)) { - const symbol = getSymbolOfDeclaration(node); - return symbol ? getTypeOfSymbol(symbol) : errorType; - } - if (isDeclarationNameOrImportPropertyName(node)) { - const symbol = getSymbolAtLocation(node); - if (symbol) { - return getTypeOfSymbol(symbol); - } - return errorType; - } - if (isBindingPattern(node)) { - return getTypeForVariableLikeDeclaration( - node.parent, - /*includeOptionality*/ - true, - 0 /* Normal */ - ) || errorType; - } - if (isInRightSideOfImportOrExportAssignment(node)) { - const symbol = getSymbolAtLocation(node); - if (symbol) { - const declaredType = getDeclaredTypeOfSymbol(symbol); - return !isErrorType(declaredType) ? declaredType : getTypeOfSymbol(symbol); - } - } - if (isMetaProperty(node.parent) && node.parent.keywordToken === node.kind) { - return checkMetaPropertyKeyword(node.parent); - } - return errorType; - } - function getTypeOfAssignmentPattern(expr) { - Debug.assert(expr.kind === 210 /* ObjectLiteralExpression */ || expr.kind === 209 /* ArrayLiteralExpression */); - if (expr.parent.kind === 250 /* ForOfStatement */) { - const iteratedType = checkRightHandSideOfForOf(expr.parent); - return checkDestructuringAssignment(expr, iteratedType || errorType); - } - if (expr.parent.kind === 226 /* BinaryExpression */) { - const iteratedType = getTypeOfExpression(expr.parent.right); - return checkDestructuringAssignment(expr, iteratedType || errorType); - } - if (expr.parent.kind === 303 /* PropertyAssignment */) { - const node2 = cast(expr.parent.parent, isObjectLiteralExpression); - const typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node2) || errorType; - const propertyIndex = indexOfNode(node2.properties, expr.parent); - return checkObjectLiteralDestructuringPropertyAssignment(node2, typeOfParentObjectLiteral, propertyIndex); - } - const node = cast(expr.parent, isArrayLiteralExpression); - const typeOfArrayLiteral = getTypeOfAssignmentPattern(node) || errorType; - const elementType = checkIteratedTypeOrElementType(65 /* Destructuring */, typeOfArrayLiteral, undefinedType, expr.parent) || errorType; - return checkArrayLiteralDestructuringElementAssignment(node, typeOfArrayLiteral, node.elements.indexOf(expr), elementType); - } - function getPropertySymbolOfDestructuringAssignment(location) { - const typeOfObjectLiteral = getTypeOfAssignmentPattern(cast(location.parent.parent, isAssignmentPattern)); - return typeOfObjectLiteral && getPropertyOfType(typeOfObjectLiteral, location.escapedText); - } - function getRegularTypeOfExpression(expr) { - if (isRightSideOfQualifiedNameOrPropertyAccess(expr)) { - expr = expr.parent; - } - return getRegularTypeOfLiteralType(getTypeOfExpression(expr)); - } - function getParentTypeOfClassElement(node) { - const classSymbol = getSymbolOfNode(node.parent); - return isStatic(node) ? getTypeOfSymbol(classSymbol) : getDeclaredTypeOfSymbol(classSymbol); - } - function getClassElementPropertyKeyType(element) { - const name = element.name; - switch (name.kind) { - case 80 /* Identifier */: - return getStringLiteralType(idText(name)); - case 9 /* NumericLiteral */: - case 11 /* StringLiteral */: - return getStringLiteralType(name.text); - case 167 /* ComputedPropertyName */: - const nameType = checkComputedPropertyName(name); - return isTypeAssignableToKind(nameType, 12288 /* ESSymbolLike */) ? nameType : stringType; - default: - return Debug.fail("Unsupported property name."); - } - } - function getAugmentedPropertiesOfType(type) { - type = getApparentType(type); - const propsByName = createSymbolTable(getPropertiesOfType(type)); - const functionType = getSignaturesOfType(type, 0 /* Call */).length ? globalCallableFunctionType : getSignaturesOfType(type, 1 /* Construct */).length ? globalNewableFunctionType : void 0; - if (functionType) { - forEach(getPropertiesOfType(functionType), (p) => { - if (!propsByName.has(p.escapedName)) { - propsByName.set(p.escapedName, p); - } - }); - } - return getNamedMembers(propsByName); - } - function typeHasCallOrConstructSignatures(type) { - return getSignaturesOfType(type, 0 /* Call */).length !== 0 || getSignaturesOfType(type, 1 /* Construct */).length !== 0; - } - function getRootSymbols(symbol) { - const roots = getImmediateRootSymbols(symbol); - return roots ? flatMap(roots, getRootSymbols) : [symbol]; - } - function getImmediateRootSymbols(symbol) { - if (getCheckFlags(symbol) & 6 /* Synthetic */) { - return mapDefined(getSymbolLinks(symbol).containingType.types, (type) => getPropertyOfType(type, symbol.escapedName)); - } else if (symbol.flags & 33554432 /* Transient */) { - const { links: { leftSpread, rightSpread, syntheticOrigin } } = symbol; - return leftSpread ? [leftSpread, rightSpread] : syntheticOrigin ? [syntheticOrigin] : singleElementArray(tryGetTarget(symbol)); - } - return void 0; - } - function tryGetTarget(symbol) { - let target; - let next = symbol; - while (next = getSymbolLinks(next).target) { - target = next; - } - return target; - } - function isArgumentsLocalBinding(nodeIn) { - if (isGeneratedIdentifier(nodeIn)) - return false; - const node = getParseTreeNode(nodeIn, isIdentifier); - if (!node) - return false; - const parent2 = node.parent; - if (!parent2) - return false; - const isPropertyName2 = (isPropertyAccessExpression(parent2) || isPropertyAssignment(parent2)) && parent2.name === node; - return !isPropertyName2 && getReferencedValueSymbol(node) === argumentsSymbol; - } - function moduleExportsSomeValue(moduleReferenceExpression) { - let moduleSymbol = resolveExternalModuleName(moduleReferenceExpression.parent, moduleReferenceExpression); - if (!moduleSymbol || isShorthandAmbientModuleSymbol(moduleSymbol)) { - return true; - } - const hasExportAssignment = hasExportAssignmentSymbol(moduleSymbol); - moduleSymbol = resolveExternalModuleSymbol(moduleSymbol); - const symbolLinks2 = getSymbolLinks(moduleSymbol); - if (symbolLinks2.exportsSomeValue === void 0) { - symbolLinks2.exportsSomeValue = hasExportAssignment ? !!(moduleSymbol.flags & 111551 /* Value */) : forEachEntry(getExportsOfModule(moduleSymbol), isValue); - } - return symbolLinks2.exportsSomeValue; - function isValue(s) { - s = resolveSymbol(s); - return s && !!(getSymbolFlags(s) & 111551 /* Value */); - } - } - function isNameOfModuleOrEnumDeclaration(node) { - return isModuleOrEnumDeclaration(node.parent) && node === node.parent.name; - } - function getReferencedExportContainer(nodeIn, prefixLocals) { - var _a; - const node = getParseTreeNode(nodeIn, isIdentifier); - if (node) { - let symbol = getReferencedValueSymbol( - node, - /*startInDeclarationContainer*/ - isNameOfModuleOrEnumDeclaration(node) - ); - if (symbol) { - if (symbol.flags & 1048576 /* ExportValue */) { - const exportSymbol = getMergedSymbol(symbol.exportSymbol); - if (!prefixLocals && exportSymbol.flags & 944 /* ExportHasLocal */ && !(exportSymbol.flags & 3 /* Variable */)) { - return void 0; - } - symbol = exportSymbol; - } - const parentSymbol = getParentOfSymbol(symbol); - if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && ((_a = parentSymbol.valueDeclaration) == null ? void 0 : _a.kind) === 312 /* SourceFile */) { - const symbolFile = parentSymbol.valueDeclaration; - const referenceFile = getSourceFileOfNode(node); - const symbolIsUmdExport = symbolFile !== referenceFile; - return symbolIsUmdExport ? void 0 : symbolFile; - } - return findAncestor(node.parent, (n) => isModuleOrEnumDeclaration(n) && getSymbolOfDeclaration(n) === parentSymbol); - } - } - } - } - function getReferencedImportDeclaration(nodeIn) { - const specifier = getIdentifierGeneratedImportReference(nodeIn); - if (specifier) { - return specifier; - } - const node = getParseTreeNode(nodeIn, isIdentifier); - if (node) { - const symbol = getReferencedValueOrAliasSymbol(node); - if (isNonLocalAlias( - symbol, - /*excludes*/ - 111551 /* Value */ - ) && !getTypeOnlyAliasDeclaration(symbol, 111551 /* Value */)) { - return getDeclarationOfAliasSymbol(symbol); - } - } - return void 0; - } - function isSymbolOfDestructuredElementOfCatchBinding(symbol) { - return symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration) && walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 299 /* CatchClause */; - } - function isSymbolOfDeclarationWithCollidingName(symbol) { - if (symbol.flags & 418 /* BlockScoped */ && symbol.valueDeclaration && !isSourceFile(symbol.valueDeclaration)) { - const links = getSymbolLinks(symbol); - if (links.isDeclarationWithCollidingName === void 0) { - const container = getEnclosingBlockScopeContainer(symbol.valueDeclaration); - if (isStatementWithLocals(container) || isSymbolOfDestructuredElementOfCatchBinding(symbol)) { - const nodeLinks2 = getNodeLinks(symbol.valueDeclaration); - if (resolveName( - container.parent, - symbol.escapedName, - 111551 /* Value */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - false - )) { - links.isDeclarationWithCollidingName = true; - } else if (nodeLinks2.flags & 16384 /* CapturedBlockScopedBinding */) { - const isDeclaredInLoop = nodeLinks2.flags & 32768 /* BlockScopedBindingInLoop */; - const inLoopInitializer = isIterationStatement( - container, - /*lookInLabeledStatements*/ - false - ); - const inLoopBodyBlock = container.kind === 241 /* Block */ && isIterationStatement( - container.parent, - /*lookInLabeledStatements*/ - false - ); - links.isDeclarationWithCollidingName = !isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || !inLoopInitializer && !inLoopBodyBlock); - } else { - links.isDeclarationWithCollidingName = false; - } - } - } - return links.isDeclarationWithCollidingName; - } - return false; - } - function getReferencedDeclarationWithCollidingName(nodeIn) { - if (!isGeneratedIdentifier(nodeIn)) { - const node = getParseTreeNode(nodeIn, isIdentifier); - if (node) { - const symbol = getReferencedValueSymbol(node); - if (symbol && isSymbolOfDeclarationWithCollidingName(symbol)) { - return symbol.valueDeclaration; - } - } - } - return void 0; - } - function isDeclarationWithCollidingName(nodeIn) { - const node = getParseTreeNode(nodeIn, isDeclaration); - if (node) { - const symbol = getSymbolOfDeclaration(node); - if (symbol) { - return isSymbolOfDeclarationWithCollidingName(symbol); - } - } - return false; - } - function isValueAliasDeclaration(node) { - Debug.assert(canCollectSymbolAliasAccessabilityData); - switch (node.kind) { - case 271 /* ImportEqualsDeclaration */: - return isAliasResolvedToValue(getSymbolOfDeclaration(node)); - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: - const symbol = getSymbolOfDeclaration(node); - return !!symbol && isAliasResolvedToValue( - symbol, - /*excludeTypeOnlyValues*/ - true - ); - case 278 /* ExportDeclaration */: - const exportClause = node.exportClause; - return !!exportClause && (isNamespaceExport(exportClause) || some(exportClause.elements, isValueAliasDeclaration)); - case 277 /* ExportAssignment */: - return node.expression && node.expression.kind === 80 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfDeclaration(node)) : true; - } - return false; - } - function isTopLevelValueImportEqualsWithEntityName(nodeIn) { - const node = getParseTreeNode(nodeIn, isImportEqualsDeclaration); - if (node === void 0 || node.parent.kind !== 312 /* SourceFile */ || !isInternalModuleImportEqualsDeclaration(node)) { - return false; - } - const isValue = isAliasResolvedToValue(getSymbolOfDeclaration(node)); - return isValue && node.moduleReference && !nodeIsMissing(node.moduleReference); - } - function isAliasResolvedToValue(symbol, excludeTypeOnlyValues) { - if (!symbol) { - return false; - } - const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol)); - if (target === unknownSymbol) { - return true; - } - return !!(getSymbolFlags( - symbol, - excludeTypeOnlyValues, - /*excludeLocalMeanings*/ - true - ) & 111551 /* Value */) && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); - } - function isConstEnumOrConstEnumOnlyModule(s) { - return isConstEnumSymbol(s) || !!s.constEnumOnlyModule; - } - function isReferencedAliasDeclaration(node, checkChildren) { - Debug.assert(canCollectSymbolAliasAccessabilityData); - if (isAliasSymbolDeclaration2(node)) { - const symbol = getSymbolOfDeclaration(node); - const links = symbol && getSymbolLinks(symbol); - if (links == null ? void 0 : links.referenced) { - return true; - } - const target = getSymbolLinks(symbol).aliasTarget; - if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { - return true; - } - } - if (checkChildren) { - return !!forEachChild(node, (node2) => isReferencedAliasDeclaration(node2, checkChildren)); - } - return false; - } - function isImplementationOfOverload(node) { - if (nodeIsPresent(node.body)) { - if (isGetAccessor(node) || isSetAccessor(node)) - return false; - const symbol = getSymbolOfDeclaration(node); - const signaturesOfSymbol = getSignaturesOfSymbol(symbol); - return signaturesOfSymbol.length > 1 || // If there is single signature for the symbol, it is overload if that signature isn't coming from the node - // e.g.: function foo(a: string): string; - // function foo(a: any) { // This is implementation of the overloads - // return a; - // } - signaturesOfSymbol.length === 1 && signaturesOfSymbol[0].declaration !== node; - } - return false; - } - function isRequiredInitializedParameter(parameter) { - return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */); - } - function isOptionalUninitializedParameterProperty(parameter) { - return strictNullChecks && isOptionalParameter(parameter) && !parameter.initializer && hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */); - } - function isExpandoFunctionDeclaration(node) { - const declaration = getParseTreeNode(node, isFunctionDeclaration); - if (!declaration) { - return false; - } - const symbol = getSymbolOfDeclaration(declaration); - if (!symbol || !(symbol.flags & 16 /* Function */)) { - return false; - } - return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && p.valueDeclaration && isPropertyAccessExpression(p.valueDeclaration)); - } - function getPropertiesOfContainerFunction(node) { - const declaration = getParseTreeNode(node, isFunctionDeclaration); - if (!declaration) { - return emptyArray; - } - const symbol = getSymbolOfDeclaration(declaration); - return symbol && getPropertiesOfType(getTypeOfSymbol(symbol)) || emptyArray; - } - function getNodeCheckFlags(node) { - var _a; - const nodeId = node.id || 0; - if (nodeId < 0 || nodeId >= nodeLinks.length) - return 0; - return ((_a = nodeLinks[nodeId]) == null ? void 0 : _a.flags) || 0; - } - function getEnumMemberValue(node) { - computeEnumMemberValues(node.parent); - return getNodeLinks(node).enumMemberValue; - } - function canHaveConstantValue(node) { - switch (node.kind) { - case 306 /* EnumMember */: - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - return true; - } - return false; - } - function getConstantValue2(node) { - if (node.kind === 306 /* EnumMember */) { - return getEnumMemberValue(node); - } - const symbol = getNodeLinks(node).resolvedSymbol; - if (symbol && symbol.flags & 8 /* EnumMember */) { - const member = symbol.valueDeclaration; - if (isEnumConst(member.parent)) { - return getEnumMemberValue(member); - } - } - return void 0; - } - function isFunctionType(type) { - return !!(type.flags & 524288 /* Object */) && getSignaturesOfType(type, 0 /* Call */).length > 0; - } - function getTypeReferenceSerializationKind(typeNameIn, location) { - var _a; - const typeName = getParseTreeNode(typeNameIn, isEntityName); - if (!typeName) - return 0 /* Unknown */; - if (location) { - location = getParseTreeNode(location); - if (!location) - return 0 /* Unknown */; - } - let isTypeOnly = false; - if (isQualifiedName(typeName)) { - const rootValueSymbol = resolveEntityName( - getFirstIdentifier(typeName), - 111551 /* Value */, - /*ignoreErrors*/ - true, - /*dontResolveAlias*/ - true, - location - ); - isTypeOnly = !!((_a = rootValueSymbol == null ? void 0 : rootValueSymbol.declarations) == null ? void 0 : _a.every(isTypeOnlyImportOrExportDeclaration)); - } - const valueSymbol = resolveEntityName( - typeName, - 111551 /* Value */, - /*ignoreErrors*/ - true, - /*dontResolveAlias*/ - true, - location - ); - const resolvedSymbol = valueSymbol && valueSymbol.flags & 2097152 /* Alias */ ? resolveAlias(valueSymbol) : valueSymbol; - isTypeOnly || (isTypeOnly = !!(valueSymbol && getTypeOnlyAliasDeclaration(valueSymbol, 111551 /* Value */))); - const typeSymbol = resolveEntityName( - typeName, - 788968 /* Type */, - /*ignoreErrors*/ - true, - /*dontResolveAlias*/ - false, - location - ); - if (resolvedSymbol && resolvedSymbol === typeSymbol) { - const globalPromiseSymbol = getGlobalPromiseConstructorSymbol( - /*reportErrors*/ - false - ); - if (globalPromiseSymbol && resolvedSymbol === globalPromiseSymbol) { - return 9 /* Promise */; - } - const constructorType = getTypeOfSymbol(resolvedSymbol); - if (constructorType && isConstructorType(constructorType)) { - return isTypeOnly ? 10 /* TypeWithCallSignature */ : 1 /* TypeWithConstructSignatureAndValue */; - } - } - if (!typeSymbol) { - return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */; - } - const type = getDeclaredTypeOfSymbol(typeSymbol); - if (isErrorType(type)) { - return isTypeOnly ? 11 /* ObjectType */ : 0 /* Unknown */; - } else if (type.flags & 3 /* AnyOrUnknown */) { - return 11 /* ObjectType */; - } else if (isTypeAssignableToKind(type, 16384 /* Void */ | 98304 /* Nullable */ | 131072 /* Never */)) { - return 2 /* VoidNullableOrNeverType */; - } else if (isTypeAssignableToKind(type, 528 /* BooleanLike */)) { - return 6 /* BooleanType */; - } else if (isTypeAssignableToKind(type, 296 /* NumberLike */)) { - return 3 /* NumberLikeType */; - } else if (isTypeAssignableToKind(type, 2112 /* BigIntLike */)) { - return 4 /* BigIntLikeType */; - } else if (isTypeAssignableToKind(type, 402653316 /* StringLike */)) { - return 5 /* StringLikeType */; - } else if (isTupleType(type)) { - return 7 /* ArrayLikeType */; - } else if (isTypeAssignableToKind(type, 12288 /* ESSymbolLike */)) { - return 8 /* ESSymbolType */; - } else if (isFunctionType(type)) { - return 10 /* TypeWithCallSignature */; - } else if (isArrayType(type)) { - return 7 /* ArrayLikeType */; - } else { - return 11 /* ObjectType */; - } - } - function createTypeOfDeclaration(declarationIn, enclosingDeclaration, flags, tracker, addUndefined) { - const declaration = getParseTreeNode(declarationIn, isVariableLikeOrAccessor); - if (!declaration) { - return factory.createToken(133 /* AnyKeyword */); - } - const symbol = getSymbolOfDeclaration(declaration); - let type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) ? getWidenedLiteralType(getTypeOfSymbol(symbol)) : errorType; - if (type.flags & 8192 /* UniqueESSymbol */ && type.symbol === symbol) { - flags |= 1048576 /* AllowUniqueESSymbolType */; - } - if (addUndefined) { - type = getOptionalType(type); - } - return nodeBuilder.typeToTypeNode(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); - } - function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn, enclosingDeclaration, flags, tracker) { - const signatureDeclaration = getParseTreeNode(signatureDeclarationIn, isFunctionLike); - if (!signatureDeclaration) { - return factory.createToken(133 /* AnyKeyword */); - } - const signature = getSignatureFromDeclaration(signatureDeclaration); - return nodeBuilder.typeToTypeNode(getReturnTypeOfSignature(signature), enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); - } - function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) { - const expr = getParseTreeNode(exprIn, isExpression); - if (!expr) { - return factory.createToken(133 /* AnyKeyword */); - } - const type = getWidenedType(getRegularTypeOfExpression(expr)); - return nodeBuilder.typeToTypeNode(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */, tracker); - } - function hasGlobalName(name) { - return globals.has(escapeLeadingUnderscores(name)); - } - function getReferencedValueSymbol(reference, startInDeclarationContainer) { - const resolvedSymbol = getNodeLinks(reference).resolvedSymbol; - if (resolvedSymbol) { - return resolvedSymbol; - } - let location = reference; - if (startInDeclarationContainer) { - const parent2 = reference.parent; - if (isDeclaration(parent2) && reference === parent2.name) { - location = getDeclarationContainer(parent2); - } - } - return resolveName( - location, - reference.escapedText, - 111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - true - ); - } - function getReferencedValueOrAliasSymbol(reference) { - const resolvedSymbol = getNodeLinks(reference).resolvedSymbol; - if (resolvedSymbol && resolvedSymbol !== unknownSymbol) { - return resolvedSymbol; - } - return resolveName( - reference, - reference.escapedText, - 111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */, - /*nameNotFoundMessage*/ - void 0, - /*nameArg*/ - void 0, - /*isUse*/ - true, - /*excludeGlobals*/ - void 0, - /*getSpellingSuggestions*/ - void 0 - ); - } - function getReferencedValueDeclaration(referenceIn) { - if (!isGeneratedIdentifier(referenceIn)) { - const reference = getParseTreeNode(referenceIn, isIdentifier); - if (reference) { - const symbol = getReferencedValueSymbol(reference); - if (symbol) { - return getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration; - } - } - } - return void 0; - } - function getReferencedValueDeclarations(referenceIn) { - if (!isGeneratedIdentifier(referenceIn)) { - const reference = getParseTreeNode(referenceIn, isIdentifier); - if (reference) { - const symbol = getReferencedValueSymbol(reference); - if (symbol) { - return filter(getExportSymbolOfValueSymbolIfExported(symbol).declarations, (declaration) => { - switch (declaration.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 306 /* EnumMember */: - case 210 /* ObjectLiteralExpression */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 266 /* EnumDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 267 /* ModuleDeclaration */: - return true; - } - return false; - }); - } - } - } - return void 0; - } - function isLiteralConstDeclaration(node) { - if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node)) { - return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); - } - return false; - } - function literalTypeToNode(type, enclosing, tracker) { - const enumResult = type.flags & 1056 /* EnumLike */ ? nodeBuilder.symbolToExpression( - type.symbol, - 111551 /* Value */, - enclosing, - /*flags*/ - void 0, - tracker - ) : type === trueType ? factory.createTrue() : type === falseType && factory.createFalse(); - if (enumResult) - return enumResult; - const literalValue = type.value; - return typeof literalValue === "object" ? factory.createBigIntLiteral(literalValue) : typeof literalValue === "number" ? factory.createNumericLiteral(literalValue) : factory.createStringLiteral(literalValue); - } - function createLiteralConstValue(node, tracker) { - const type = getTypeOfSymbol(getSymbolOfDeclaration(node)); - return literalTypeToNode(type, node, tracker); - } - function getJsxFactoryEntity(location) { - return location ? (getJsxNamespace(location), getSourceFileOfNode(location).localJsxFactory || _jsxFactoryEntity) : _jsxFactoryEntity; - } - function getJsxFragmentFactoryEntity(location) { - if (location) { - const file = getSourceFileOfNode(location); - if (file) { - if (file.localJsxFragmentFactory) { - return file.localJsxFragmentFactory; - } - const jsxFragPragmas = file.pragmas.get("jsxfrag"); - const jsxFragPragma = isArray(jsxFragPragmas) ? jsxFragPragmas[0] : jsxFragPragmas; - if (jsxFragPragma) { - file.localJsxFragmentFactory = parseIsolatedEntityName(jsxFragPragma.arguments.factory, languageVersion); - return file.localJsxFragmentFactory; - } - } - } - if (compilerOptions.jsxFragmentFactory) { - return parseIsolatedEntityName(compilerOptions.jsxFragmentFactory, languageVersion); - } - } - function createResolver() { - const resolvedTypeReferenceDirectives = host.getResolvedTypeReferenceDirectives(); - let fileToDirective; - if (resolvedTypeReferenceDirectives) { - fileToDirective = /* @__PURE__ */ new Map(); - resolvedTypeReferenceDirectives.forEach(({ resolvedTypeReferenceDirective }, key, mode) => { - if (!(resolvedTypeReferenceDirective == null ? void 0 : resolvedTypeReferenceDirective.resolvedFileName)) { - return; - } - const file = host.getSourceFile(resolvedTypeReferenceDirective.resolvedFileName); - if (file) { - addReferencedFilesToTypeDirective(file, key, mode); - } - }); - } - return { - getReferencedExportContainer, - getReferencedImportDeclaration, - getReferencedDeclarationWithCollidingName, - isDeclarationWithCollidingName, - isValueAliasDeclaration: (nodeIn) => { - const node = getParseTreeNode(nodeIn); - return node && canCollectSymbolAliasAccessabilityData ? isValueAliasDeclaration(node) : true; - }, - hasGlobalName, - isReferencedAliasDeclaration: (nodeIn, checkChildren) => { - const node = getParseTreeNode(nodeIn); - return node && canCollectSymbolAliasAccessabilityData ? isReferencedAliasDeclaration(node, checkChildren) : true; - }, - getNodeCheckFlags: (nodeIn) => { - const node = getParseTreeNode(nodeIn); - return node ? getNodeCheckFlags(node) : 0; - }, - isTopLevelValueImportEqualsWithEntityName, - isDeclarationVisible, - isImplementationOfOverload, - isRequiredInitializedParameter, - isOptionalUninitializedParameterProperty, - isExpandoFunctionDeclaration, - getPropertiesOfContainerFunction, - createTypeOfDeclaration, - createReturnTypeOfSignatureDeclaration, - createTypeOfExpression, - createLiteralConstValue, - isSymbolAccessible, - isEntityNameVisible, - getConstantValue: (nodeIn) => { - const node = getParseTreeNode(nodeIn, canHaveConstantValue); - return node ? getConstantValue2(node) : void 0; - }, - collectLinkedAliases, - getReferencedValueDeclaration, - getReferencedValueDeclarations, - getTypeReferenceSerializationKind, - isOptionalParameter, - moduleExportsSomeValue, - isArgumentsLocalBinding, - getExternalModuleFileFromDeclaration: (nodeIn) => { - const node = getParseTreeNode(nodeIn, hasPossibleExternalModuleReference); - return node && getExternalModuleFileFromDeclaration(node); - }, - getTypeReferenceDirectivesForEntityName, - getTypeReferenceDirectivesForSymbol, - isLiteralConstDeclaration, - isLateBound: (nodeIn) => { - const node = getParseTreeNode(nodeIn, isDeclaration); - const symbol = node && getSymbolOfDeclaration(node); - return !!(symbol && getCheckFlags(symbol) & 4096 /* Late */); - }, - getJsxFactoryEntity, - getJsxFragmentFactoryEntity, - getAllAccessorDeclarations(accessor) { - accessor = getParseTreeNode(accessor, isGetOrSetAccessorDeclaration); - const otherKind = accessor.kind === 178 /* SetAccessor */ ? 177 /* GetAccessor */ : 178 /* SetAccessor */; - const otherAccessor = getDeclarationOfKind(getSymbolOfDeclaration(accessor), otherKind); - const firstAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? otherAccessor : accessor; - const secondAccessor = otherAccessor && otherAccessor.pos < accessor.pos ? accessor : otherAccessor; - const setAccessor = accessor.kind === 178 /* SetAccessor */ ? accessor : otherAccessor; - const getAccessor = accessor.kind === 177 /* GetAccessor */ ? accessor : otherAccessor; - return { - firstAccessor, - secondAccessor, - setAccessor, - getAccessor - }; - }, - getSymbolOfExternalModuleSpecifier: (moduleName) => resolveExternalModuleNameWorker( - moduleName, - moduleName, - /*moduleNotFoundError*/ - void 0 - ), - isBindingCapturedByNode: (node, decl) => { - const parseNode = getParseTreeNode(node); - const parseDecl = getParseTreeNode(decl); - return !!parseNode && !!parseDecl && (isVariableDeclaration(parseDecl) || isBindingElement(parseDecl)) && isBindingCapturedByNode(parseNode, parseDecl); - }, - getDeclarationStatementsForSourceFile: (node, flags, tracker, bundled) => { - const n = getParseTreeNode(node); - Debug.assert(n && n.kind === 312 /* SourceFile */, "Non-sourcefile node passed into getDeclarationsForSourceFile"); - const sym = getSymbolOfDeclaration(node); - if (!sym) { - return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled); - } - return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker, bundled); - }, - isImportRequiredByAugmentation - }; - function isImportRequiredByAugmentation(node) { - const file = getSourceFileOfNode(node); - if (!file.symbol) - return false; - const importTarget = getExternalModuleFileFromDeclaration(node); - if (!importTarget) - return false; - if (importTarget === file) - return false; - const exports = getExportsOfModule(file.symbol); - for (const s of arrayFrom(exports.values())) { - if (s.mergeId) { - const merged = getMergedSymbol(s); - if (merged.declarations) { - for (const d of merged.declarations) { - const declFile = getSourceFileOfNode(d); - if (declFile === importTarget) { - return true; - } - } - } - } - } - return false; - } - function isInHeritageClause(node) { - return node.parent && node.parent.kind === 233 /* ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 298 /* HeritageClause */; - } - function getTypeReferenceDirectivesForEntityName(node) { - if (!fileToDirective) { - return void 0; - } - let meaning; - if (node.parent.kind === 167 /* ComputedPropertyName */) { - meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } else { - meaning = 788968 /* Type */ | 1920 /* Namespace */; - if (node.kind === 80 /* Identifier */ && isInTypeQuery(node) || node.kind === 211 /* PropertyAccessExpression */ && !isInHeritageClause(node)) { - meaning = 111551 /* Value */ | 1048576 /* ExportValue */; - } - } - const symbol = resolveEntityName( - node, - meaning, - /*ignoreErrors*/ - true - ); - return symbol && symbol !== unknownSymbol ? getTypeReferenceDirectivesForSymbol(symbol, meaning) : void 0; - } - function getTypeReferenceDirectivesForSymbol(symbol, meaning) { - if (!fileToDirective || !isSymbolFromTypeDeclarationFile(symbol)) { - return void 0; - } - let typeReferenceDirectives; - for (const decl of symbol.declarations) { - if (decl.symbol && decl.symbol.flags & meaning) { - const file = getSourceFileOfNode(decl); - const typeReferenceDirective = fileToDirective.get(file.path); - if (typeReferenceDirective) { - (typeReferenceDirectives || (typeReferenceDirectives = [])).push(typeReferenceDirective); - } else { - return void 0; - } - } - } - return typeReferenceDirectives; - } - function isSymbolFromTypeDeclarationFile(symbol) { - if (!symbol.declarations) { - return false; - } - let current = symbol; - while (true) { - const parent2 = getParentOfSymbol(current); - if (parent2) { - current = parent2; - } else { - break; - } - } - if (current.valueDeclaration && current.valueDeclaration.kind === 312 /* SourceFile */ && current.flags & 512 /* ValueModule */) { - return false; - } - for (const decl of symbol.declarations) { - const file = getSourceFileOfNode(decl); - if (fileToDirective.has(file.path)) { - return true; - } - } - return false; - } - function addReferencedFilesToTypeDirective(file, key, mode) { - if (fileToDirective.has(file.path)) - return; - fileToDirective.set(file.path, [key, mode]); - for (const { fileName, resolutionMode } of file.referencedFiles) { - const resolvedFile = resolveTripleslashReference(fileName, file.fileName); - const referencedFile = host.getSourceFile(resolvedFile); - if (referencedFile) { - addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat); - } - } - } - } - function getExternalModuleFileFromDeclaration(declaration) { - const specifier = declaration.kind === 267 /* ModuleDeclaration */ ? tryCast(declaration.name, isStringLiteral) : getExternalModuleName(declaration); - const moduleSymbol = resolveExternalModuleNameWorker( - specifier, - specifier, - /*moduleNotFoundError*/ - void 0 - ); - if (!moduleSymbol) { - return void 0; - } - return getDeclarationOfKind(moduleSymbol, 312 /* SourceFile */); - } - function initializeTypeChecker() { - for (const file of host.getSourceFiles()) { - bindSourceFile(file, compilerOptions); - } - amalgamatedDuplicates = /* @__PURE__ */ new Map(); - let augmentations; - for (const file of host.getSourceFiles()) { - if (file.redirectInfo) { - continue; - } - if (!isExternalOrCommonJsModule(file)) { - const fileGlobalThisSymbol = file.locals.get("globalThis"); - if (fileGlobalThisSymbol == null ? void 0 : fileGlobalThisSymbol.declarations) { - for (const declaration of fileGlobalThisSymbol.declarations) { - diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0, "globalThis")); - } - } - mergeSymbolTable(globals, file.locals); - } - if (file.jsGlobalAugmentations) { - mergeSymbolTable(globals, file.jsGlobalAugmentations); - } - if (file.patternAmbientModules && file.patternAmbientModules.length) { - patternAmbientModules = concatenate(patternAmbientModules, file.patternAmbientModules); - } - if (file.moduleAugmentations.length) { - (augmentations || (augmentations = [])).push(file.moduleAugmentations); - } - if (file.symbol && file.symbol.globalExports) { - const source = file.symbol.globalExports; - source.forEach((sourceSymbol, id) => { - if (!globals.has(id)) { - globals.set(id, sourceSymbol); - } - }); - } - } - if (augmentations) { - for (const list of augmentations) { - for (const augmentation of list) { - if (!isGlobalScopeAugmentation(augmentation.parent)) - continue; - mergeModuleAugmentation(augmentation); - } - } - } - addToSymbolTable(globals, builtinGlobals, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0); - getSymbolLinks(undefinedSymbol).type = undefinedWideningType; - getSymbolLinks(argumentsSymbol).type = getGlobalType( - "IArguments", - /*arity*/ - 0, - /*reportErrors*/ - true - ); - getSymbolLinks(unknownSymbol).type = errorType; - getSymbolLinks(globalThisSymbol).type = createObjectType(16 /* Anonymous */, globalThisSymbol); - globalArrayType = getGlobalType( - "Array", - /*arity*/ - 1, - /*reportErrors*/ - true - ); - globalObjectType = getGlobalType( - "Object", - /*arity*/ - 0, - /*reportErrors*/ - true - ); - globalFunctionType = getGlobalType( - "Function", - /*arity*/ - 0, - /*reportErrors*/ - true - ); - globalCallableFunctionType = strictBindCallApply && getGlobalType( - "CallableFunction", - /*arity*/ - 0, - /*reportErrors*/ - true - ) || globalFunctionType; - globalNewableFunctionType = strictBindCallApply && getGlobalType( - "NewableFunction", - /*arity*/ - 0, - /*reportErrors*/ - true - ) || globalFunctionType; - globalStringType = getGlobalType( - "String", - /*arity*/ - 0, - /*reportErrors*/ - true - ); - globalNumberType = getGlobalType( - "Number", - /*arity*/ - 0, - /*reportErrors*/ - true - ); - globalBooleanType = getGlobalType( - "Boolean", - /*arity*/ - 0, - /*reportErrors*/ - true - ); - globalRegExpType = getGlobalType( - "RegExp", - /*arity*/ - 0, - /*reportErrors*/ - true - ); - anyArrayType = createArrayType(anyType); - autoArrayType = createArrayType(autoType); - if (autoArrayType === emptyObjectType) { - autoArrayType = createAnonymousType( - /*symbol*/ - void 0, - emptySymbols, - emptyArray, - emptyArray, - emptyArray - ); - } - globalReadonlyArrayType = getGlobalTypeOrUndefined( - "ReadonlyArray", - /*arity*/ - 1 - ) || globalArrayType; - anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType; - globalThisType = getGlobalTypeOrUndefined( - "ThisType", - /*arity*/ - 1 - ); - if (augmentations) { - for (const list of augmentations) { - for (const augmentation of list) { - if (isGlobalScopeAugmentation(augmentation.parent)) - continue; - mergeModuleAugmentation(augmentation); - } - } - } - amalgamatedDuplicates.forEach(({ firstFile, secondFile, conflictingSymbols }) => { - if (conflictingSymbols.size < 8) { - conflictingSymbols.forEach(({ isBlockScoped, firstFileLocations, secondFileLocations }, symbolName2) => { - const message = isBlockScoped ? Diagnostics.Cannot_redeclare_block_scoped_variable_0 : Diagnostics.Duplicate_identifier_0; - for (const node of firstFileLocations) { - addDuplicateDeclarationError(node, message, symbolName2, secondFileLocations); - } - for (const node of secondFileLocations) { - addDuplicateDeclarationError(node, message, symbolName2, firstFileLocations); - } - }); - } else { - const list = arrayFrom(conflictingSymbols.keys()).join(", "); - diagnostics.add(addRelatedInfo( - createDiagnosticForNode(firstFile, Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, list), - createDiagnosticForNode(secondFile, Diagnostics.Conflicts_are_in_this_file) - )); - diagnostics.add(addRelatedInfo( - createDiagnosticForNode(secondFile, Diagnostics.Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0, list), - createDiagnosticForNode(firstFile, Diagnostics.Conflicts_are_in_this_file) - )); - } - }); - amalgamatedDuplicates = void 0; - } - function checkExternalEmitHelpers(location, helpers) { - if ((requestedExternalEmitHelpers & helpers) !== helpers && compilerOptions.importHelpers) { - const sourceFile = getSourceFileOfNode(location); - if (isEffectiveExternalModule(sourceFile, compilerOptions) && !(location.flags & 33554432 /* Ambient */)) { - const helpersModule = resolveHelpersModule(sourceFile, location); - if (helpersModule !== unknownSymbol) { - const uncheckedHelpers = helpers & ~requestedExternalEmitHelpers; - for (let helper = 1 /* FirstEmitHelper */; helper <= 33554432 /* LastEmitHelper */; helper <<= 1) { - if (uncheckedHelpers & helper) { - for (const name of getHelperNames(helper)) { - if (requestedExternalEmitHelperNames.has(name)) - continue; - requestedExternalEmitHelperNames.add(name); - const symbol = resolveSymbol(getSymbol2(getExportsOfModule(helpersModule), escapeLeadingUnderscores(name), 111551 /* Value */)); - if (!symbol) { - error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name); - } else if (helper & 524288 /* ClassPrivateFieldGet */) { - if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 3)) { - error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 4); - } - } else if (helper & 1048576 /* ClassPrivateFieldSet */) { - if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 4)) { - error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 5); - } - } else if (helper & 1024 /* SpreadArray */) { - if (!some(getSignaturesOfSymbol(symbol), (signature) => getParameterCount(signature) > 2)) { - error2(location, Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, externalHelpersModuleNameText, name, 3); - } - } - } - } - } - } - requestedExternalEmitHelpers |= helpers; - } - } - } - function getHelperNames(helper) { - switch (helper) { - case 1 /* Extends */: - return ["__extends"]; - case 2 /* Assign */: - return ["__assign"]; - case 4 /* Rest */: - return ["__rest"]; - case 8 /* Decorate */: - return legacyDecorators ? ["__decorate"] : ["__esDecorate", "__runInitializers"]; - case 16 /* Metadata */: - return ["__metadata"]; - case 32 /* Param */: - return ["__param"]; - case 64 /* Awaiter */: - return ["__awaiter"]; - case 128 /* Generator */: - return ["__generator"]; - case 256 /* Values */: - return ["__values"]; - case 512 /* Read */: - return ["__read"]; - case 1024 /* SpreadArray */: - return ["__spreadArray"]; - case 2048 /* Await */: - return ["__await"]; - case 4096 /* AsyncGenerator */: - return ["__asyncGenerator"]; - case 8192 /* AsyncDelegator */: - return ["__asyncDelegator"]; - case 16384 /* AsyncValues */: - return ["__asyncValues"]; - case 32768 /* ExportStar */: - return ["__exportStar"]; - case 65536 /* ImportStar */: - return ["__importStar"]; - case 131072 /* ImportDefault */: - return ["__importDefault"]; - case 262144 /* MakeTemplateObject */: - return ["__makeTemplateObject"]; - case 524288 /* ClassPrivateFieldGet */: - return ["__classPrivateFieldGet"]; - case 1048576 /* ClassPrivateFieldSet */: - return ["__classPrivateFieldSet"]; - case 2097152 /* ClassPrivateFieldIn */: - return ["__classPrivateFieldIn"]; - case 4194304 /* CreateBinding */: - return ["__createBinding"]; - case 8388608 /* SetFunctionName */: - return ["__setFunctionName"]; - case 16777216 /* PropKey */: - return ["__propKey"]; - case 33554432 /* AddDisposableResourceAndDisposeResources */: - return ["__addDisposableResource", "__disposeResources"]; - default: - return Debug.fail("Unrecognized helper"); - } - } - function resolveHelpersModule(node, errorNode) { - if (!externalHelpersModule) { - externalHelpersModule = resolveExternalModule(node, externalHelpersModuleNameText, Diagnostics.This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found, errorNode) || unknownSymbol; - } - return externalHelpersModule; - } - function checkGrammarModifiers(node) { - const quickResult = reportObviousDecoratorErrors(node) || reportObviousModifierErrors(node); - if (quickResult !== void 0) { - return quickResult; - } - if (isParameter(node) && parameterIsThisKeyword(node)) { - return grammarErrorOnFirstToken(node, Diagnostics.Neither_decorators_nor_modifiers_may_be_applied_to_this_parameters); - } - const blockScopeKind = isVariableStatement(node) ? node.declarationList.flags & 7 /* BlockScoped */ : 0 /* None */; - let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator; - let flags = 0 /* None */; - let sawExportBeforeDecorators = false; - let hasLeadingDecorators = false; - for (const modifier of node.modifiers) { - if (isDecorator(modifier)) { - if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) { - if (node.kind === 174 /* MethodDeclaration */ && !nodeIsPresent(node.body)) { - return grammarErrorOnFirstToken(node, Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload); - } else { - return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); - } - } else if (legacyDecorators && (node.kind === 177 /* GetAccessor */ || node.kind === 178 /* SetAccessor */)) { - const accessors = getAllAccessorDeclarations(node.parent.members, node); - if (hasDecorators(accessors.firstAccessor) && node === accessors.secondAccessor) { - return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); - } - } - if (flags & ~(1025 /* ExportDefault */ | 131072 /* Decorator */)) { - return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here); - } - if (hasLeadingDecorators && flags & 126975 /* Modifier */) { - Debug.assertIsDefined(firstDecorator); - const sourceFile = getSourceFileOfNode(modifier); - if (!hasParseDiagnostics(sourceFile)) { - addRelatedInfo( - error2(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), - createDiagnosticForNode(firstDecorator, Diagnostics.Decorator_used_before_export_here) - ); - return true; - } - return false; - } - flags |= 131072 /* Decorator */; - if (!(flags & 126975 /* Modifier */)) { - hasLeadingDecorators = true; - } else if (flags & 1 /* Export */) { - sawExportBeforeDecorators = true; - } - firstDecorator ?? (firstDecorator = modifier); - } else { - if (modifier.kind !== 148 /* ReadonlyKeyword */) { - if (node.kind === 171 /* PropertySignature */ || node.kind === 173 /* MethodSignature */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_member, tokenToString(modifier.kind)); - } - if (node.kind === 181 /* IndexSignature */ && (modifier.kind !== 126 /* StaticKeyword */ || !isClassLike(node.parent))) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_index_signature, tokenToString(modifier.kind)); - } - } - if (modifier.kind !== 103 /* InKeyword */ && modifier.kind !== 147 /* OutKeyword */ && modifier.kind !== 87 /* ConstKeyword */) { - if (node.kind === 168 /* TypeParameter */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_type_parameter, tokenToString(modifier.kind)); - } - } - switch (modifier.kind) { - case 87 /* ConstKeyword */: - if (node.kind !== 266 /* EnumDeclaration */ && node.kind !== 168 /* TypeParameter */) { - return grammarErrorOnNode(node, Diagnostics.A_class_member_cannot_have_the_0_keyword, tokenToString(87 /* ConstKeyword */)); - } - const parent2 = node.parent; - if (node.kind === 168 /* TypeParameter */ && !(isFunctionLikeDeclaration(parent2) || isClassLike(parent2) || isFunctionTypeNode(parent2) || isConstructorTypeNode(parent2) || isCallSignatureDeclaration(parent2) || isConstructSignatureDeclaration(parent2) || isMethodSignature(parent2))) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_function_method_or_class, tokenToString(modifier.kind)); - } - break; - case 164 /* OverrideKeyword */: - if (flags & 16384 /* Override */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); - } else if (flags & 2 /* Ambient */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "override", "declare"); - } else if (flags & 64 /* Readonly */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "readonly"); - } else if (flags & 128 /* Accessor */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "accessor"); - } else if (flags & 512 /* Async */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "async"); - } - flags |= 16384 /* Override */; - lastOverride = modifier; - break; - case 125 /* PublicKeyword */: - case 124 /* ProtectedKeyword */: - case 123 /* PrivateKeyword */: - const text = visibilityToString(modifierToFlag(modifier.kind)); - if (flags & 28 /* AccessibilityModifier */) { - return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen); - } else if (flags & 16384 /* Override */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "override"); - } else if (flags & 32 /* Static */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); - } else if (flags & 128 /* Accessor */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "accessor"); - } else if (flags & 64 /* Readonly */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); - } else if (flags & 512 /* Async */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); - } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); - } else if (flags & 256 /* Abstract */) { - if (modifier.kind === 123 /* PrivateKeyword */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); - } else { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract"); - } - } else if (isPrivateIdentifierClassElementDeclaration(node)) { - return grammarErrorOnNode(modifier, Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier); - } - flags |= modifierToFlag(modifier.kind); - break; - case 126 /* StaticKeyword */: - if (flags & 32 /* Static */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); - } else if (flags & 64 /* Readonly */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "readonly"); - } else if (flags & 512 /* Async */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); - } else if (flags & 128 /* Accessor */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); - } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); - } else if (node.kind === 169 /* Parameter */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); - } else if (flags & 256 /* Abstract */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); - } else if (flags & 16384 /* Override */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "override"); - } - flags |= 32 /* Static */; - lastStatic = modifier; - break; - case 129 /* AccessorKeyword */: - if (flags & 128 /* Accessor */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "accessor"); - } else if (flags & 64 /* Readonly */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); - } else if (flags & 2 /* Ambient */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); - } else if (node.kind !== 172 /* PropertyDeclaration */) { - return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); - } - flags |= 128 /* Accessor */; - break; - case 148 /* ReadonlyKeyword */: - if (flags & 64 /* Readonly */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); - } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { - return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); - } else if (flags & 128 /* Accessor */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); - } - flags |= 64 /* Readonly */; - break; - case 95 /* ExportKeyword */: - if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later - node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { - return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); - } - if (flags & 1 /* Export */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "export"); - } else if (flags & 2 /* Ambient */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare"); - } else if (flags & 256 /* Abstract */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "abstract"); - } else if (flags & 512 /* Async */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); - } else if (isClassLike(node.parent)) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); - } else if (node.kind === 169 /* Parameter */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); - } else if (blockScopeKind === 4 /* Using */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "export"); - } else if (blockScopeKind === 6 /* AwaitUsing */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); - } - flags |= 1 /* Export */; - break; - case 90 /* DefaultKeyword */: - const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 267 /* ModuleDeclaration */ && !isAmbientModule(container)) { - return grammarErrorOnNode(modifier, Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module); - } else if (blockScopeKind === 4 /* Using */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); - } else if (blockScopeKind === 6 /* AwaitUsing */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); - } else if (!(flags & 1 /* Export */)) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); - } else if (sawExportBeforeDecorators) { - return grammarErrorOnNode(firstDecorator, Diagnostics.Decorators_are_not_valid_here); - } - flags |= 1024 /* Default */; - break; - case 138 /* DeclareKeyword */: - if (flags & 2 /* Ambient */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare"); - } else if (flags & 512 /* Async */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (flags & 16384 /* Override */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); - } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); - } else if (node.kind === 169 /* Parameter */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } else if (blockScopeKind === 4 /* Using */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "declare"); - } else if (blockScopeKind === 6 /* AwaitUsing */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "declare"); - } else if (node.parent.flags & 33554432 /* Ambient */ && node.parent.kind === 268 /* ModuleBlock */) { - return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); - } else if (isPrivateIdentifierClassElementDeclaration(node)) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); - } else if (flags & 128 /* Accessor */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "declare", "accessor"); - } - flags |= 2 /* Ambient */; - lastDeclare = modifier; - break; - case 128 /* AbstractKeyword */: - if (flags & 256 /* Abstract */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); - } - if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { - if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { - return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); - } - if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { - const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; - return grammarErrorOnNode(modifier, message); - } - if (flags & 32 /* Static */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); - } - if (flags & 8 /* Private */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract"); - } - if (flags & 512 /* Async */ && lastAsync) { - return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); - } - if (flags & 16384 /* Override */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "override"); - } - if (flags & 128 /* Accessor */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "accessor"); - } - } - if (isNamedDeclaration(node) && node.name.kind === 81 /* PrivateIdentifier */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); - } - flags |= 256 /* Abstract */; - break; - case 134 /* AsyncKeyword */: - if (flags & 512 /* Async */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); - } else if (flags & 2 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (node.kind === 169 /* Parameter */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); - } - if (flags & 256 /* Abstract */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); - } - flags |= 512 /* Async */; - lastAsync = modifier; - break; - case 103 /* InKeyword */: - case 147 /* OutKeyword */: - const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; - const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out"; - if (node.kind !== 168 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); - } - if (flags & inOutFlag) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, inOutText); - } - if (inOutFlag & 32768 /* In */ && flags & 65536 /* Out */) { - return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "in", "out"); - } - flags |= inOutFlag; - break; - } - } - } - if (node.kind === 176 /* Constructor */) { - if (flags & 32 /* Static */) { - return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); - } - if (flags & 16384 /* Override */) { - return grammarErrorOnNode(lastOverride, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "override"); - } - if (flags & 512 /* Async */) { - return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); - } - return false; - } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { - return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { - return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { - return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); - } - if (flags & 512 /* Async */) { - return checkGrammarAsyncModifier(node, lastAsync); - } - return false; - } - function reportObviousModifierErrors(node) { - if (!node.modifiers) - return false; - const modifier = findFirstIllegalModifier(node); - return modifier && grammarErrorOnFirstToken(modifier, Diagnostics.Modifiers_cannot_appear_here); - } - function findFirstModifierExcept(node, allowedModifier) { - const modifier = find(node.modifiers, isModifier); - return modifier && modifier.kind !== allowedModifier ? modifier : void 0; - } - function findFirstIllegalModifier(node) { - switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 181 /* IndexSignature */: - case 267 /* ModuleDeclaration */: - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 278 /* ExportDeclaration */: - case 277 /* ExportAssignment */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 169 /* Parameter */: - case 168 /* TypeParameter */: - return void 0; - case 175 /* ClassStaticBlockDeclaration */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 270 /* NamespaceExportDeclaration */: - case 282 /* MissingDeclaration */: - return find(node.modifiers, isModifier); - default: - if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { - return void 0; - } - switch (node.kind) { - case 262 /* FunctionDeclaration */: - return findFirstModifierExcept(node, 134 /* AsyncKeyword */); - case 263 /* ClassDeclaration */: - case 185 /* ConstructorType */: - return findFirstModifierExcept(node, 128 /* AbstractKeyword */); - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - return find(node.modifiers, isModifier); - case 243 /* VariableStatement */: - return node.declarationList.flags & 4 /* Using */ ? findFirstModifierExcept(node, 135 /* AwaitKeyword */) : find(node.modifiers, isModifier); - case 266 /* EnumDeclaration */: - return findFirstModifierExcept(node, 87 /* ConstKeyword */); - default: - Debug.assertNever(node); - } - } - } - function reportObviousDecoratorErrors(node) { - const decorator = findFirstIllegalDecorator(node); - return decorator && grammarErrorOnFirstToken(decorator, Diagnostics.Decorators_are_not_valid_here); - } - function findFirstIllegalDecorator(node) { - return canHaveIllegalDecorators(node) ? find(node.modifiers, isDecorator) : void 0; - } - function checkGrammarAsyncModifier(node, asyncModifier) { - switch (node.kind) { - case 174 /* MethodDeclaration */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return false; - } - return grammarErrorOnNode(asyncModifier, Diagnostics._0_modifier_cannot_be_used_here, "async"); - } - function checkGrammarForDisallowedTrailingComma(list, diag2 = Diagnostics.Trailing_comma_not_allowed) { - if (list && list.hasTrailingComma) { - return grammarErrorAtPos(list[0], list.end - ",".length, ",".length, diag2); - } - return false; - } - function checkGrammarTypeParameterList(typeParameters, file) { - if (typeParameters && typeParameters.length === 0) { - const start = typeParameters.pos - "<".length; - const end = skipTrivia(file.text, typeParameters.end) + ">".length; - return grammarErrorAtPos(file, start, end - start, Diagnostics.Type_parameter_list_cannot_be_empty); - } - return false; - } - function checkGrammarParameterList(parameters) { - let seenOptionalParameter = false; - const parameterCount = parameters.length; - for (let i = 0; i < parameterCount; i++) { - const parameter = parameters[i]; - if (parameter.dotDotDotToken) { - if (i !== parameterCount - 1) { - return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); - } - if (!(parameter.flags & 33554432 /* Ambient */)) { - checkGrammarForDisallowedTrailingComma(parameters, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); - } - if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, Diagnostics.A_rest_parameter_cannot_be_optional); - } - if (parameter.initializer) { - return grammarErrorOnNode(parameter.name, Diagnostics.A_rest_parameter_cannot_have_an_initializer); - } - } else if (isOptionalParameter(parameter)) { - seenOptionalParameter = true; - if (parameter.questionToken && parameter.initializer) { - return grammarErrorOnNode(parameter.name, Diagnostics.Parameter_cannot_have_question_mark_and_initializer); - } - } else if (seenOptionalParameter && !parameter.initializer) { - return grammarErrorOnNode(parameter.name, Diagnostics.A_required_parameter_cannot_follow_an_optional_parameter); - } - } - } - function getNonSimpleParameters(parameters) { - return filter(parameters, (parameter) => !!parameter.initializer || isBindingPattern(parameter.name) || isRestParameter(parameter)); - } - function checkGrammarForUseStrictSimpleParameterList(node) { - if (languageVersion >= 3 /* ES2016 */) { - const useStrictDirective = node.body && isBlock(node.body) && findUseStrictPrologue(node.body.statements); - if (useStrictDirective) { - const nonSimpleParameters = getNonSimpleParameters(node.parameters); - if (length(nonSimpleParameters)) { - forEach(nonSimpleParameters, (parameter) => { - addRelatedInfo( - error2(parameter, Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), - createDiagnosticForNode(useStrictDirective, Diagnostics.use_strict_directive_used_here) - ); - }); - const diagnostics2 = nonSimpleParameters.map((parameter, index) => index === 0 ? createDiagnosticForNode(parameter, Diagnostics.Non_simple_parameter_declared_here) : createDiagnosticForNode(parameter, Diagnostics.and_here)); - addRelatedInfo(error2(useStrictDirective, Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list), ...diagnostics2); - return true; - } - } - } - return false; - } - function checkGrammarFunctionLikeDeclaration(node) { - const file = getSourceFileOfNode(node); - return checkGrammarModifiers(node) || checkGrammarTypeParameterList(node.typeParameters, file) || checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file) || isFunctionLikeDeclaration(node) && checkGrammarForUseStrictSimpleParameterList(node); - } - function checkGrammarClassLikeDeclaration(node) { - const file = getSourceFileOfNode(node); - return checkGrammarClassDeclarationHeritageClauses(node) || checkGrammarTypeParameterList(node.typeParameters, file); - } - function checkGrammarArrowFunction(node, file) { - if (!isArrowFunction(node)) { - return false; - } - if (node.typeParameters && !(length(node.typeParameters) > 1 || node.typeParameters.hasTrailingComma || node.typeParameters[0].constraint)) { - if (file && fileExtensionIsOneOf(file.fileName, [".mts" /* Mts */, ".cts" /* Cts */])) { - grammarErrorOnNode(node.typeParameters[0], Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint); - } - } - const { equalsGreaterThanToken } = node; - const startLine = getLineAndCharacterOfPosition(file, equalsGreaterThanToken.pos).line; - const endLine = getLineAndCharacterOfPosition(file, equalsGreaterThanToken.end).line; - return startLine !== endLine && grammarErrorOnNode(equalsGreaterThanToken, Diagnostics.Line_terminator_not_permitted_before_arrow); - } - function checkGrammarIndexSignatureParameters(node) { - const parameter = node.parameters[0]; - if (node.parameters.length !== 1) { - if (parameter) { - return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_must_have_exactly_one_parameter); - } else { - return grammarErrorOnNode(node, Diagnostics.An_index_signature_must_have_exactly_one_parameter); - } - } - checkGrammarForDisallowedTrailingComma(node.parameters, Diagnostics.An_index_signature_cannot_have_a_trailing_comma); - if (parameter.dotDotDotToken) { - return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.An_index_signature_cannot_have_a_rest_parameter); - } - if (hasEffectiveModifiers(parameter)) { - return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier); - } - if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, Diagnostics.An_index_signature_parameter_cannot_have_a_question_mark); - } - if (parameter.initializer) { - return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_cannot_have_an_initializer); - } - if (!parameter.type) { - return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); - } - const type = getTypeFromTypeNode(parameter.type); - if (someType(type, (t) => !!(t.flags & 8576 /* StringOrNumberLiteralOrUnique */)) || isGenericType(type)) { - return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead); - } - if (!everyType(type, isValidIndexKeyType)) { - return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type); - } - if (!node.type) { - return grammarErrorOnNode(node, Diagnostics.An_index_signature_must_have_a_type_annotation); - } - return false; - } - function checkGrammarIndexSignature(node) { - return checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node); - } - function checkGrammarForAtLeastOneTypeArgument(node, typeArguments) { - if (typeArguments && typeArguments.length === 0) { - const sourceFile = getSourceFileOfNode(node); - const start = typeArguments.pos - "<".length; - const end = skipTrivia(sourceFile.text, typeArguments.end) + ">".length; - return grammarErrorAtPos(sourceFile, start, end - start, Diagnostics.Type_argument_list_cannot_be_empty); - } - return false; - } - function checkGrammarTypeArguments(node, typeArguments) { - return checkGrammarForDisallowedTrailingComma(typeArguments) || checkGrammarForAtLeastOneTypeArgument(node, typeArguments); - } - function checkGrammarTaggedTemplateChain(node) { - if (node.questionDotToken || node.flags & 64 /* OptionalChain */) { - return grammarErrorOnNode(node.template, Diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain); - } - return false; - } - function checkGrammarHeritageClause(node) { - const types = node.types; - if (checkGrammarForDisallowedTrailingComma(types)) { - return true; - } - if (types && types.length === 0) { - const listType = tokenToString(node.token); - return grammarErrorAtPos(node, types.pos, 0, Diagnostics._0_list_cannot_be_empty, listType); - } - return some(types, checkGrammarExpressionWithTypeArguments); - } - function checkGrammarExpressionWithTypeArguments(node) { - if (isExpressionWithTypeArguments(node) && isImportKeyword(node.expression) && node.typeArguments) { - return grammarErrorOnNode(node, Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments); - } - return checkGrammarTypeArguments(node, node.typeArguments); - } - function checkGrammarClassDeclarationHeritageClauses(node) { - let seenExtendsClause = false; - let seenImplementsClause = false; - if (!checkGrammarModifiers(node) && node.heritageClauses) { - for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 96 /* ExtendsKeyword */) { - if (seenExtendsClause) { - return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); - } - if (seenImplementsClause) { - return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_must_precede_implements_clause); - } - if (heritageClause.types.length > 1) { - return grammarErrorOnFirstToken(heritageClause.types[1], Diagnostics.Classes_can_only_extend_a_single_class); - } - seenExtendsClause = true; - } else { - Debug.assert(heritageClause.token === 119 /* ImplementsKeyword */); - if (seenImplementsClause) { - return grammarErrorOnFirstToken(heritageClause, Diagnostics.implements_clause_already_seen); - } - seenImplementsClause = true; - } - checkGrammarHeritageClause(heritageClause); - } - } - } - function checkGrammarInterfaceDeclaration(node) { - let seenExtendsClause = false; - if (node.heritageClauses) { - for (const heritageClause of node.heritageClauses) { - if (heritageClause.token === 96 /* ExtendsKeyword */) { - if (seenExtendsClause) { - return grammarErrorOnFirstToken(heritageClause, Diagnostics.extends_clause_already_seen); - } - seenExtendsClause = true; - } else { - Debug.assert(heritageClause.token === 119 /* ImplementsKeyword */); - return grammarErrorOnFirstToken(heritageClause, Diagnostics.Interface_declaration_cannot_have_implements_clause); - } - checkGrammarHeritageClause(heritageClause); - } - } - return false; - } - function checkGrammarComputedPropertyName(node) { - if (node.kind !== 167 /* ComputedPropertyName */) { - return false; - } - const computedPropertyName = node; - if (computedPropertyName.expression.kind === 226 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 28 /* CommaToken */) { - return grammarErrorOnNode(computedPropertyName.expression, Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); - } - return false; - } - function checkGrammarForGenerator(node) { - if (node.asteriskToken) { - Debug.assert( - node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */ || node.kind === 174 /* MethodDeclaration */ - ); - if (node.flags & 33554432 /* Ambient */) { - return grammarErrorOnNode(node.asteriskToken, Diagnostics.Generators_are_not_allowed_in_an_ambient_context); - } - if (!node.body) { - return grammarErrorOnNode(node.asteriskToken, Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); - } - } - } - function checkGrammarForInvalidQuestionMark(questionToken, message) { - return !!questionToken && grammarErrorOnNode(questionToken, message); - } - function checkGrammarForInvalidExclamationToken(exclamationToken, message) { - return !!exclamationToken && grammarErrorOnNode(exclamationToken, message); - } - function checkGrammarObjectLiteralExpression(node, inDestructuring) { - const seen = /* @__PURE__ */ new Map(); - for (const prop of node.properties) { - if (prop.kind === 305 /* SpreadAssignment */) { - if (inDestructuring) { - const expression = skipParentheses(prop.expression); - if (isArrayLiteralExpression(expression) || isObjectLiteralExpression(expression)) { - return grammarErrorOnNode(prop.expression, Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); - } - } - continue; - } - const name = prop.name; - if (name.kind === 167 /* ComputedPropertyName */) { - checkGrammarComputedPropertyName(name); - } - if (prop.kind === 304 /* ShorthandPropertyAssignment */ && !inDestructuring && prop.objectAssignmentInitializer) { - grammarErrorOnNode(prop.equalsToken, 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); - } - if (name.kind === 81 /* PrivateIdentifier */) { - grammarErrorOnNode(name, Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies); - } - if (canHaveModifiers(prop) && prop.modifiers) { - for (const mod of prop.modifiers) { - if (isModifier(mod) && (mod.kind !== 134 /* AsyncKeyword */ || prop.kind !== 174 /* MethodDeclaration */)) { - grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); - } - } - } else if (canHaveIllegalModifiers(prop) && prop.modifiers) { - for (const mod of prop.modifiers) { - if (isModifier(mod)) { - grammarErrorOnNode(mod, Diagnostics._0_modifier_cannot_be_used_here, getTextOfNode(mod)); - } - } - } - let currentKind; - switch (prop.kind) { - case 304 /* ShorthandPropertyAssignment */: - case 303 /* PropertyAssignment */: - checkGrammarForInvalidExclamationToken(prop.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); - checkGrammarForInvalidQuestionMark(prop.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional); - if (name.kind === 9 /* NumericLiteral */) { - checkGrammarNumericLiteral(name); - } - currentKind = 4 /* PropertyAssignment */; - break; - case 174 /* MethodDeclaration */: - currentKind = 8 /* Method */; - break; - case 177 /* GetAccessor */: - currentKind = 1 /* GetAccessor */; - break; - case 178 /* SetAccessor */: - currentKind = 2 /* SetAccessor */; - break; - default: - Debug.assertNever(prop, "Unexpected syntax kind:" + prop.kind); - } - if (!inDestructuring) { - const effectiveName = getEffectivePropertyNameForPropertyNameNode(name); - if (effectiveName === void 0) { - continue; - } - const existingKind = seen.get(effectiveName); - if (!existingKind) { - seen.set(effectiveName, currentKind); - } else { - if (currentKind & 8 /* Method */ && existingKind & 8 /* Method */) { - grammarErrorOnNode(name, Diagnostics.Duplicate_identifier_0, getTextOfNode(name)); - } else if (currentKind & 4 /* PropertyAssignment */ && existingKind & 4 /* PropertyAssignment */) { - grammarErrorOnNode(name, Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name, getTextOfNode(name)); - } else if (currentKind & 3 /* GetOrSetAccessor */ && existingKind & 3 /* GetOrSetAccessor */) { - if (existingKind !== 3 /* GetOrSetAccessor */ && currentKind !== existingKind) { - seen.set(effectiveName, currentKind | existingKind); - } else { - return grammarErrorOnNode(name, Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); - } - } else { - return grammarErrorOnNode(name, Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); - } - } - } - } - } - function checkGrammarJsxElement(node) { - checkGrammarJsxName(node.tagName); - checkGrammarTypeArguments(node, node.typeArguments); - const seen = /* @__PURE__ */ new Map(); - for (const attr of node.attributes.properties) { - if (attr.kind === 293 /* JsxSpreadAttribute */) { - continue; - } - const { name, initializer } = attr; - const escapedText = getEscapedTextOfJsxAttributeName(name); - if (!seen.get(escapedText)) { - seen.set(escapedText, true); - } else { - return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name); - } - if (initializer && initializer.kind === 294 /* JsxExpression */ && !initializer.expression) { - return grammarErrorOnNode(initializer, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression); - } - } - } - function checkGrammarJsxName(node) { - if (isPropertyAccessExpression(node) && isJsxNamespacedName(node.expression)) { - return grammarErrorOnNode(node.expression, Diagnostics.JSX_property_access_expressions_cannot_include_JSX_namespace_names); - } - if (isJsxNamespacedName(node) && getJSXTransformEnabled(compilerOptions) && !isIntrinsicJsxName(node.namespace.escapedText)) { - return grammarErrorOnNode(node, Diagnostics.React_components_cannot_include_JSX_namespace_names); - } - } - function checkGrammarJsxExpression(node) { - if (node.expression && isCommaSequence(node.expression)) { - return grammarErrorOnNode(node.expression, Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array); - } - } - function checkGrammarForInOrForOfStatement(forInOrOfStatement) { - if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { - return true; - } - if (forInOrOfStatement.kind === 250 /* ForOfStatement */ && forInOrOfStatement.awaitModifier) { - if (!(forInOrOfStatement.flags & 65536 /* AwaitContext */)) { - const sourceFile = getSourceFileOfNode(forInOrOfStatement); - if (isInTopLevelContext(forInOrOfStatement)) { - if (!hasParseDiagnostics(sourceFile)) { - if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { - diagnostics.add(createDiagnosticForNode( - forInOrOfStatement.awaitModifier, - Diagnostics.for_await_loops_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 - )); - } - switch (moduleKind) { - case 100 /* Node16 */: - case 199 /* NodeNext */: - if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) { - diagnostics.add( - createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level) - ); - break; - } - case 7 /* ES2022 */: - case 99 /* ESNext */: - case 4 /* System */: - if (languageVersion >= 4 /* ES2017 */) { - break; - } - default: - diagnostics.add( - createDiagnosticForNode( - forInOrOfStatement.awaitModifier, - Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher - ) - ); - break; - } - } - } else { - if (!hasParseDiagnostics(sourceFile)) { - const diagnostic = createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules); - const func = getContainingFunction(forInOrOfStatement); - if (func && func.kind !== 176 /* Constructor */) { - Debug.assert((getFunctionFlags(func) & 2 /* Async */) === 0, "Enclosing function should never be an async function."); - const relatedInfo = createDiagnosticForNode(func, Diagnostics.Did_you_mean_to_mark_this_function_as_async); - addRelatedInfo(diagnostic, relatedInfo); - } - diagnostics.add(diagnostic); - return true; - } - } - return false; - } - } - if (isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 65536 /* AwaitContext */) && isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") { - grammarErrorOnNode(forInOrOfStatement.initializer, Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async); - return false; - } - if (forInOrOfStatement.initializer.kind === 261 /* VariableDeclarationList */) { - const variableList = forInOrOfStatement.initializer; - if (!checkGrammarVariableDeclarationList(variableList)) { - const declarations = variableList.declarations; - if (!declarations.length) { - return false; - } - if (declarations.length > 1) { - const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement : Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; - return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); - } - const firstDeclaration = declarations[0]; - if (firstDeclaration.initializer) { - const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer : Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; - return grammarErrorOnNode(firstDeclaration.name, diagnostic); - } - if (firstDeclaration.type) { - const diagnostic = forInOrOfStatement.kind === 249 /* ForInStatement */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation : Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; - return grammarErrorOnNode(firstDeclaration, diagnostic); - } - } - } - return false; - } - function checkGrammarAccessor(accessor) { - if (!(accessor.flags & 33554432 /* Ambient */) && accessor.parent.kind !== 187 /* TypeLiteral */ && accessor.parent.kind !== 264 /* InterfaceDeclaration */) { - if (languageVersion < 1 /* ES5 */) { - return grammarErrorOnNode(accessor.name, Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); - } - if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(accessor.name)) { - return grammarErrorOnNode(accessor.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); - } - if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 256 /* Abstract */)) { - return grammarErrorAtPos(accessor, accessor.end - 1, ";".length, Diagnostics._0_expected, "{"); - } - } - if (accessor.body) { - if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { - return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); - } - if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) { - return grammarErrorOnNode(accessor.body, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); - } - } - if (accessor.typeParameters) { - return grammarErrorOnNode(accessor.name, Diagnostics.An_accessor_cannot_have_type_parameters); - } - if (!doesAccessorHaveCorrectParameterCount(accessor)) { - return grammarErrorOnNode( - accessor.name, - accessor.kind === 177 /* GetAccessor */ ? Diagnostics.A_get_accessor_cannot_have_parameters : Diagnostics.A_set_accessor_must_have_exactly_one_parameter - ); - } - if (accessor.kind === 178 /* SetAccessor */) { - if (accessor.type) { - return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); - } - const parameter = Debug.checkDefined(getSetAccessorValueParameter(accessor), "Return value does not match parameter count assertion."); - if (parameter.dotDotDotToken) { - return grammarErrorOnNode(parameter.dotDotDotToken, Diagnostics.A_set_accessor_cannot_have_rest_parameter); - } - if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, Diagnostics.A_set_accessor_cannot_have_an_optional_parameter); - } - if (parameter.initializer) { - return grammarErrorOnNode(accessor.name, Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer); - } - } - return false; - } - function doesAccessorHaveCorrectParameterCount(accessor) { - return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 0 : 1); - } - function getAccessorThisParameter(accessor) { - if (accessor.parameters.length === (accessor.kind === 177 /* GetAccessor */ ? 1 : 2)) { - return getThisParameter(accessor); - } - } - function checkGrammarTypeOperatorNode(node) { - if (node.operator === 158 /* UniqueKeyword */) { - if (node.type.kind !== 155 /* SymbolKeyword */) { - return grammarErrorOnNode(node.type, Diagnostics._0_expected, tokenToString(155 /* SymbolKeyword */)); - } - let parent2 = walkUpParenthesizedTypes(node.parent); - if (isInJSFile(parent2) && isJSDocTypeExpression(parent2)) { - const host2 = getJSDocHost(parent2); - if (host2) { - parent2 = getSingleVariableOfVariableStatement(host2) || host2; - } - } - switch (parent2.kind) { - case 260 /* VariableDeclaration */: - const decl = parent2; - if (decl.name.kind !== 80 /* Identifier */) { - return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name); - } - if (!isVariableDeclarationInVariableStatement(decl)) { - return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement); - } - if (!(decl.parent.flags & 2 /* Const */)) { - return grammarErrorOnNode(parent2.name, Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const); - } - break; - case 172 /* PropertyDeclaration */: - if (!isStatic(parent2) || !hasEffectiveReadonlyModifier(parent2)) { - return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly); - } - break; - case 171 /* PropertySignature */: - if (!hasSyntacticModifier(parent2, 64 /* Readonly */)) { - return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); - } - break; - default: - return grammarErrorOnNode(node, Diagnostics.unique_symbol_types_are_not_allowed_here); - } - } else if (node.operator === 148 /* ReadonlyKeyword */) { - if (node.type.kind !== 188 /* ArrayType */ && node.type.kind !== 189 /* TupleType */) { - return grammarErrorOnFirstToken(node, Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, tokenToString(155 /* SymbolKeyword */)); - } - } - } - function checkGrammarForInvalidDynamicName(node, message) { - if (isNonBindableDynamicName(node)) { - return grammarErrorOnNode(node, message); - } - } - function checkGrammarMethod(node) { - if (checkGrammarFunctionLikeDeclaration(node)) { - return true; - } - if (node.kind === 174 /* MethodDeclaration */) { - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { - if (node.modifiers && !(node.modifiers.length === 1 && first(node.modifiers).kind === 134 /* AsyncKeyword */)) { - return grammarErrorOnFirstToken(node, Diagnostics.Modifiers_cannot_appear_here); - } else if (checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_object_member_cannot_be_declared_optional)) { - return true; - } else if (checkGrammarForInvalidExclamationToken(node.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context)) { - return true; - } else if (node.body === void 0) { - return grammarErrorAtPos(node, node.end - 1, ";".length, Diagnostics._0_expected, "{"); - } - } - if (checkGrammarForGenerator(node)) { - return true; - } - } - if (isClassLike(node.parent)) { - if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) { - return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); - } - if (node.flags & 33554432 /* Ambient */) { - return checkGrammarForInvalidDynamicName(node.name, 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); - } else if (node.kind === 174 /* MethodDeclaration */ && !node.body) { - return checkGrammarForInvalidDynamicName(node.name, 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 (node.parent.kind === 264 /* InterfaceDeclaration */) { - return checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type); - } else if (node.parent.kind === 187 /* TypeLiteral */) { - return checkGrammarForInvalidDynamicName(node.name, 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 checkGrammarBreakOrContinueStatement(node) { - let current = node; - while (current) { - if (isFunctionLikeOrClassStaticBlockDeclaration(current)) { - return grammarErrorOnNode(node, Diagnostics.Jump_target_cannot_cross_function_boundary); - } - switch (current.kind) { - case 256 /* LabeledStatement */: - if (node.label && current.label.escapedText === node.label.escapedText) { - const isMisplacedContinueLabel = node.kind === 251 /* ContinueStatement */ && !isIterationStatement( - current.statement, - /*lookInLabeledStatements*/ - true - ); - if (isMisplacedContinueLabel) { - return grammarErrorOnNode(node, Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); - } - return false; - } - break; - case 255 /* SwitchStatement */: - if (node.kind === 252 /* BreakStatement */ && !node.label) { - return false; - } - break; - default: - if (isIterationStatement( - current, - /*lookInLabeledStatements*/ - false - ) && !node.label) { - return false; - } - break; - } - current = current.parent; - } - if (node.label) { - const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement : Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); - } else { - const message = node.kind === 252 /* BreakStatement */ ? Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement : Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); - } - } - function checkGrammarBindingElement(node) { - if (node.dotDotDotToken) { - const elements = node.parent.elements; - if (node !== last(elements)) { - return grammarErrorOnNode(node, Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern); - } - checkGrammarForDisallowedTrailingComma(elements, Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma); - if (node.propertyName) { - return grammarErrorOnNode(node.name, Diagnostics.A_rest_element_cannot_have_a_property_name); - } - } - if (node.dotDotDotToken && node.initializer) { - return grammarErrorAtPos(node, node.initializer.pos - 1, 1, Diagnostics.A_rest_element_cannot_have_an_initializer); - } - } - function isStringOrNumberLiteralExpression(expr) { - return isStringOrNumericLiteralLike(expr) || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 9 /* NumericLiteral */; - } - function isBigIntLiteralExpression(expr) { - return expr.kind === 10 /* BigIntLiteral */ || expr.kind === 224 /* PrefixUnaryExpression */ && expr.operator === 41 /* MinusToken */ && expr.operand.kind === 10 /* BigIntLiteral */; - } - function isSimpleLiteralEnumReference(expr) { - if ((isPropertyAccessExpression(expr) || isElementAccessExpression(expr) && isStringOrNumberLiteralExpression(expr.argumentExpression)) && isEntityNameExpression(expr.expression)) { - return !!(checkExpressionCached(expr).flags & 1056 /* EnumLike */); - } - } - function checkAmbientInitializer(node) { - const initializer = node.initializer; - if (initializer) { - const isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) || isSimpleLiteralEnumReference(initializer) || initializer.kind === 112 /* TrueKeyword */ || initializer.kind === 97 /* FalseKeyword */ || isBigIntLiteralExpression(initializer)); - const isConstOrReadonly = isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConstLike(node); - if (isConstOrReadonly && !node.type) { - if (isInvalidInitializer) { - return grammarErrorOnNode(initializer, Diagnostics.A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference); - } - } else { - return grammarErrorOnNode(initializer, Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); - } - } - } - function checkGrammarVariableDeclaration(node) { - const nodeFlags = getCombinedNodeFlagsCached(node); - const blockScopeKind = nodeFlags & 7 /* BlockScoped */; - if (isBindingPattern(node.name)) { - switch (blockScopeKind) { - case 6 /* AwaitUsing */: - return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "await using"); - case 4 /* Using */: - return grammarErrorOnNode(node, Diagnostics._0_declarations_may_not_have_binding_patterns, "using"); - } - } - if (node.parent.parent.kind !== 249 /* ForInStatement */ && node.parent.parent.kind !== 250 /* ForOfStatement */) { - if (nodeFlags & 33554432 /* Ambient */) { - checkAmbientInitializer(node); - } else if (!node.initializer) { - if (isBindingPattern(node.name) && !isBindingPattern(node.parent)) { - return grammarErrorOnNode(node, Diagnostics.A_destructuring_declaration_must_have_an_initializer); - } - switch (blockScopeKind) { - case 6 /* AwaitUsing */: - return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "await using"); - case 4 /* Using */: - return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "using"); - case 2 /* Const */: - return grammarErrorOnNode(node, Diagnostics._0_declarations_must_be_initialized, "const"); - } - } - } - if (node.exclamationToken && (node.parent.parent.kind !== 243 /* VariableStatement */ || !node.type || node.initializer || nodeFlags & 33554432 /* Ambient */)) { - const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; - return grammarErrorOnNode(node.exclamationToken, message); - } - if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { - checkESModuleMarker(node.name); - } - return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); - } - function checkESModuleMarker(name) { - if (name.kind === 80 /* Identifier */) { - if (idText(name) === "__esModule") { - return grammarErrorOnNodeSkippedOn("noEmit", name, Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules); - } - } else { - const elements = name.elements; - for (const element of elements) { - if (!isOmittedExpression(element)) { - return checkESModuleMarker(element.name); - } - } - } - return false; - } - function checkGrammarNameInLetOrConstDeclarations(name) { - if (name.kind === 80 /* Identifier */) { - if (name.escapedText === "let") { - return grammarErrorOnNode(name, Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); - } - } else { - const elements = name.elements; - for (const element of elements) { - if (!isOmittedExpression(element)) { - checkGrammarNameInLetOrConstDeclarations(element.name); - } - } - } - return false; - } - function checkGrammarVariableDeclarationList(declarationList) { - const declarations = declarationList.declarations; - if (checkGrammarForDisallowedTrailingComma(declarationList.declarations)) { - return true; - } - if (!declarationList.declarations.length) { - return grammarErrorAtPos(declarationList, declarations.pos, declarations.end - declarations.pos, Diagnostics.Variable_declaration_list_cannot_be_empty); - } - const blockScopeFlags = declarationList.flags & 7 /* BlockScoped */; - if ((blockScopeFlags === 4 /* Using */ || blockScopeFlags === 6 /* AwaitUsing */) && isForInStatement(declarationList.parent)) { - return grammarErrorOnNode( - declarationList, - blockScopeFlags === 4 /* Using */ ? Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration : Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration - ); - } - if (blockScopeFlags === 6 /* AwaitUsing */) { - return checkAwaitGrammar(declarationList); - } - return false; - } - function allowLetAndConstDeclarations(parent2) { - switch (parent2.kind) { - case 245 /* IfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 254 /* WithStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - return false; - case 256 /* LabeledStatement */: - return allowLetAndConstDeclarations(parent2.parent); - } - return true; - } - function checkGrammarForDisallowedBlockScopedVariableStatement(node) { - if (!allowLetAndConstDeclarations(node.parent)) { - const blockScopeKind = getCombinedNodeFlagsCached(node.declarationList) & 7 /* BlockScoped */; - if (blockScopeKind) { - const keyword = blockScopeKind === 1 /* Let */ ? "let" : blockScopeKind === 2 /* Const */ ? "const" : blockScopeKind === 4 /* Using */ ? "using" : blockScopeKind === 6 /* AwaitUsing */ ? "await using" : Debug.fail("Unknown BlockScope flag"); - return grammarErrorOnNode(node, Diagnostics._0_declarations_can_only_be_declared_inside_a_block, keyword); - } - } - } - function checkGrammarMetaProperty(node) { - const escapedText = node.name.escapedText; - switch (node.keywordToken) { - case 105 /* NewKeyword */: - if (escapedText !== "target") { - return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, unescapeLeadingUnderscores(node.name.escapedText), tokenToString(node.keywordToken), "target"); - } - break; - case 102 /* ImportKeyword */: - if (escapedText !== "meta") { - return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, unescapeLeadingUnderscores(node.name.escapedText), tokenToString(node.keywordToken), "meta"); - } - break; - } - } - function hasParseDiagnostics(sourceFile) { - return sourceFile.parseDiagnostics.length > 0; - } - function grammarErrorOnFirstToken(node, message, ...args) { - const sourceFile = getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - const span = getSpanOfTokenAtPosition(sourceFile, node.pos); - diagnostics.add(createFileDiagnostic(sourceFile, span.start, span.length, message, ...args)); - return true; - } - return false; - } - function grammarErrorAtPos(nodeForSourceFile, start, length2, message, ...args) { - const sourceFile = getSourceFileOfNode(nodeForSourceFile); - if (!hasParseDiagnostics(sourceFile)) { - diagnostics.add(createFileDiagnostic(sourceFile, start, length2, message, ...args)); - return true; - } - return false; - } - function grammarErrorOnNodeSkippedOn(key, node, message, ...args) { - const sourceFile = getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - errorSkippedOn(key, node, message, ...args); - return true; - } - return false; - } - function grammarErrorOnNode(node, message, ...args) { - const sourceFile = getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - diagnostics.add(createDiagnosticForNode(node, message, ...args)); - return true; - } - return false; - } - function checkGrammarConstructorTypeParameters(node) { - const jsdocTypeParameters = isInJSFile(node) ? getJSDocTypeParameterDeclarations(node) : void 0; - const range = node.typeParameters || jsdocTypeParameters && firstOrUndefined(jsdocTypeParameters); - if (range) { - const pos = range.pos === range.end ? range.pos : skipTrivia(getSourceFileOfNode(node).text, range.pos); - return grammarErrorAtPos(node, pos, range.end - pos, Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration); - } - } - function checkGrammarConstructorTypeAnnotation(node) { - const type = node.type || getEffectiveReturnTypeNode(node); - if (type) { - return grammarErrorOnNode(type, Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration); - } - } - function checkGrammarProperty(node) { - if (isComputedPropertyName(node.name) && isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 103 /* InKeyword */) { - return grammarErrorOnNode(node.parent.members[0], Diagnostics.A_mapped_type_may_not_declare_properties_or_methods); - } - if (isClassLike(node.parent)) { - if (isStringLiteral(node.name) && node.name.text === "constructor") { - return grammarErrorOnNode(node.name, Diagnostics.Classes_may_not_have_a_field_named_constructor); - } - if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type)) { - return true; - } - if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(node.name)) { - return grammarErrorOnNode(node.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); - } - if (languageVersion < 2 /* ES2015 */ && isAutoAccessorPropertyDeclaration(node)) { - return grammarErrorOnNode(node.name, Diagnostics.Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher); - } - if (isAutoAccessorPropertyDeclaration(node) && checkGrammarForInvalidQuestionMark(node.questionToken, Diagnostics.An_accessor_property_cannot_be_declared_optional)) { - return true; - } - } else if (node.parent.kind === 264 /* InterfaceDeclaration */) { - if (checkGrammarForInvalidDynamicName(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) { - return true; - } - Debug.assertNode(node, isPropertySignature); - if (node.initializer) { - return grammarErrorOnNode(node.initializer, Diagnostics.An_interface_property_cannot_have_an_initializer); - } - } else if (isTypeLiteralNode(node.parent)) { - if (checkGrammarForInvalidDynamicName(node.name, 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)) { - return true; - } - Debug.assertNode(node, isPropertySignature); - if (node.initializer) { - return grammarErrorOnNode(node.initializer, Diagnostics.A_type_literal_property_cannot_have_an_initializer); - } - } - if (node.flags & 33554432 /* Ambient */) { - checkAmbientInitializer(node); - } - if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & 33554432 /* Ambient */ || isStatic(node) || hasAbstractModifier(node))) { - const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; - return grammarErrorOnNode(node.exclamationToken, message); - } - } - function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { - return false; - } - return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); - } - function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { - for (const decl of file.statements) { - if (isDeclaration(decl) || decl.kind === 243 /* VariableStatement */) { - if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { - return true; - } - } - } - return false; - } - function checkGrammarSourceFile(node) { - return !!(node.flags & 33554432 /* Ambient */) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); - } - function checkGrammarStatementInAmbientContext(node) { - if (node.flags & 33554432 /* Ambient */) { - const links = getNodeLinks(node); - if (!links.hasReportedStatementInAmbientContext && (isFunctionLike(node.parent) || isAccessor(node.parent))) { - return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); - } - if (node.parent.kind === 241 /* Block */ || node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { - const links2 = getNodeLinks(node.parent); - if (!links2.hasReportedStatementInAmbientContext) { - return links2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, Diagnostics.Statements_are_not_allowed_in_ambient_contexts); - } - } else { - } - } - return false; - } - function checkGrammarNumericLiteral(node) { - const isFractional = getTextOfNode(node).indexOf(".") !== -1; - const isScientific = node.numericLiteralFlags & 16 /* Scientific */; - if (isFractional || isScientific) { - return; - } - const value = +node.text; - if (value <= 2 ** 53 - 1) { - return; - } - addErrorOrSuggestion( - /*isError*/ - false, - createDiagnosticForNode(node, Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers) - ); - } - function checkGrammarBigIntLiteral(node) { - const literalType = isLiteralTypeNode(node.parent) || isPrefixUnaryExpression(node.parent) && isLiteralTypeNode(node.parent.parent); - if (!literalType) { - if (languageVersion < 7 /* ES2020 */) { - if (grammarErrorOnNode(node, Diagnostics.BigInt_literals_are_not_available_when_targeting_lower_than_ES2020)) { - return true; - } - } - } - return false; - } - function grammarErrorAfterFirstToken(node, message, ...args) { - const sourceFile = getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - const span = getSpanOfTokenAtPosition(sourceFile, node.pos); - diagnostics.add(createFileDiagnostic( - sourceFile, - textSpanEnd(span), - /*length*/ - 0, - message, - ...args - )); - return true; - } - return false; - } - function getAmbientModules() { - if (!ambientModulesCache) { - ambientModulesCache = []; - globals.forEach((global2, sym) => { - if (ambientModuleSymbolRegex.test(sym)) { - ambientModulesCache.push(global2); - } - }); - } - return ambientModulesCache; - } - function checkGrammarImportClause(node) { - var _a; - if (node.isTypeOnly && node.name && node.namedBindings) { - return grammarErrorOnNode(node, Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both); - } - if (node.isTypeOnly && ((_a = node.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */) { - return checkGrammarNamedImportsOrExports(node.namedBindings); - } - return false; - } - function checkGrammarNamedImportsOrExports(namedBindings) { - return !!forEach(namedBindings.elements, (specifier) => { - if (specifier.isTypeOnly) { - return grammarErrorOnFirstToken( - specifier, - specifier.kind === 276 /* ImportSpecifier */ ? Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement : Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement - ); - } - }); - } - function checkGrammarImportCallExpression(node) { - if (compilerOptions.verbatimModuleSyntax && moduleKind === 1 /* CommonJS */) { - return grammarErrorOnNode(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); - } - if (moduleKind === 5 /* ES2015 */) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext); - } - if (node.typeArguments) { - return grammarErrorOnNode(node, Diagnostics.This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments); - } - const nodeArguments = node.arguments; - if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */) { - checkGrammarForDisallowedTrailingComma(nodeArguments); - if (nodeArguments.length > 1) { - const assertionArgument = nodeArguments[1]; - return grammarErrorOnNode(assertionArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); - } - } - if (nodeArguments.length === 0 || nodeArguments.length > 2) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments); - } - const spreadElement = find(nodeArguments, isSpreadElement); - if (spreadElement) { - return grammarErrorOnNode(spreadElement, Diagnostics.Argument_of_dynamic_import_cannot_be_spread_element); - } - return false; - } - function findMatchingTypeReferenceOrTypeAliasReference(source, unionTarget) { - const sourceObjectFlags = getObjectFlags(source); - if (sourceObjectFlags & (4 /* Reference */ | 16 /* Anonymous */) && unionTarget.flags & 1048576 /* Union */) { - return find(unionTarget.types, (target) => { - if (target.flags & 524288 /* Object */) { - const overlapObjFlags = sourceObjectFlags & getObjectFlags(target); - if (overlapObjFlags & 4 /* Reference */) { - return source.target === target.target; - } - if (overlapObjFlags & 16 /* Anonymous */) { - return !!source.aliasSymbol && source.aliasSymbol === target.aliasSymbol; - } - } - return false; - }); - } - } - function findBestTypeForObjectLiteral(source, unionTarget) { - if (getObjectFlags(source) & 128 /* ObjectLiteral */ && someType(unionTarget, isArrayLikeType)) { - return find(unionTarget.types, (t) => !isArrayLikeType(t)); - } - } - function findBestTypeForInvokable(source, unionTarget) { - let signatureKind = 0 /* Call */; - const hasSignatures = getSignaturesOfType(source, signatureKind).length > 0 || (signatureKind = 1 /* Construct */, getSignaturesOfType(source, signatureKind).length > 0); - if (hasSignatures) { - return find(unionTarget.types, (t) => getSignaturesOfType(t, signatureKind).length > 0); - } - } - function findMostOverlappyType(source, unionTarget) { - let bestMatch; - if (!(source.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { - let matchingCount = 0; - for (const target of unionTarget.types) { - if (!(target.flags & (402784252 /* Primitive */ | 406847488 /* InstantiablePrimitive */))) { - const overlap = getIntersectionType([getIndexType(source), getIndexType(target)]); - if (overlap.flags & 4194304 /* Index */) { - return target; - } else if (isUnitType(overlap) || overlap.flags & 1048576 /* Union */) { - const len = overlap.flags & 1048576 /* Union */ ? countWhere(overlap.types, isUnitType) : 1; - if (len >= matchingCount) { - bestMatch = target; - matchingCount = len; - } - } - } - } - } - return bestMatch; - } - function filterPrimitivesIfContainsNonPrimitive(type) { - if (maybeTypeOfKind(type, 67108864 /* NonPrimitive */)) { - const result = filterType(type, (t) => !(t.flags & 402784252 /* Primitive */)); - if (!(result.flags & 131072 /* Never */)) { - return result; - } - } - return type; - } - function findMatchingDiscriminantType(source, target, isRelatedTo) { - if (target.flags & 1048576 /* Union */ && source.flags & (2097152 /* Intersection */ | 524288 /* Object */)) { - const match = getMatchingUnionConstituentForType(target, source); - if (match) { - return match; - } - const sourceProperties = getPropertiesOfType(source); - if (sourceProperties) { - const sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target); - if (sourcePropertiesFiltered) { - const discriminated = discriminateTypeByDiscriminableItems(target, map(sourcePropertiesFiltered, (p) => [() => getTypeOfSymbol(p), p.escapedName]), isRelatedTo); - if (discriminated !== target) { - return discriminated; - } - } - } - } - return void 0; - } - function getEffectivePropertyNameForPropertyNameNode(node) { - const name = getPropertyNameForPropertyNameNode(node); - return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0; - } - function getCombinedModifierFlagsCached(node) { - if (lastGetCombinedModifierFlagsNode === node) { - return lastGetCombinedModifierFlagsResult; - } - lastGetCombinedModifierFlagsNode = node; - lastGetCombinedModifierFlagsResult = getCombinedModifierFlags(node); - return lastGetCombinedModifierFlagsResult; - } - function getCombinedNodeFlagsCached(node) { - if (lastGetCombinedNodeFlagsNode === node) { - return lastGetCombinedNodeFlagsResult; - } - lastGetCombinedNodeFlagsNode = node; - lastGetCombinedNodeFlagsResult = getCombinedNodeFlags(node); - return lastGetCombinedNodeFlagsResult; - } - function isVarConstLike(node) { - const blockScopeKind = getCombinedNodeFlagsCached(node) & 7 /* BlockScoped */; - return blockScopeKind === 2 /* Const */ || blockScopeKind === 4 /* Using */ || blockScopeKind === 6 /* AwaitUsing */; - } - } - function isNotAccessor(declaration) { - return !isAccessor(declaration); - } - function isNotOverload(declaration) { - return declaration.kind !== 262 /* FunctionDeclaration */ && declaration.kind !== 174 /* MethodDeclaration */ || !!declaration.body; - } - function isDeclarationNameOrImportPropertyName(name) { - switch (name.parent.kind) { - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: - return isIdentifier(name); - default: - return isDeclarationName(name); - } - } - function getIterationTypesKeyFromIterationTypeKind(typeKind) { - switch (typeKind) { - case 0 /* Yield */: - return "yieldType"; - case 1 /* Return */: - return "returnType"; - case 2 /* Next */: - return "nextType"; - } - } - function signatureHasRestParameter(s) { - return !!(s.flags & 1 /* HasRestParameter */); - } - function signatureHasLiteralTypes(s) { - return !!(s.flags & 2 /* HasLiteralTypes */); - } - function createBasicNodeBuilderModuleSpecifierResolutionHost(host) { - return { - getCommonSourceDirectory: !!host.getCommonSourceDirectory ? () => host.getCommonSourceDirectory() : () => "", - getCurrentDirectory: () => host.getCurrentDirectory(), - getSymlinkCache: maybeBind(host, host.getSymlinkCache), - getPackageJsonInfoCache: () => { - var _a; - return (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host); - }, - useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames), - redirectTargetsMap: host.redirectTargetsMap, - getProjectReferenceRedirect: (fileName) => host.getProjectReferenceRedirect(fileName), - isSourceOfProjectReferenceRedirect: (fileName) => host.isSourceOfProjectReferenceRedirect(fileName), - fileExists: (fileName) => host.fileExists(fileName), - getFileIncludeReasons: () => host.getFileIncludeReasons(), - readFile: host.readFile ? (fileName) => host.readFile(fileName) : void 0 - }; - } - var ambientModuleSymbolRegex, anon, nextSymbolId, nextNodeId, nextMergeId, nextFlowId, TypeFacts, typeofNEFacts, CheckMode, SignatureCheckMode, isNotOverloadAndNotAccessor, intrinsicTypeKinds, SymbolLinks, JsxNames, SymbolTrackerImpl; - var init_checker = __esm({ - "src/compiler/checker.ts"() { - "use strict"; - init_ts2(); - init_ts_moduleSpecifiers(); - init_ts_performance(); - ambientModuleSymbolRegex = /^".+"$/; - anon = "(anonymous)"; - nextSymbolId = 1; - nextNodeId = 1; - nextMergeId = 1; - nextFlowId = 1; - TypeFacts = /* @__PURE__ */ ((TypeFacts3) => { - TypeFacts3[TypeFacts3["None"] = 0] = "None"; - TypeFacts3[TypeFacts3["TypeofEQString"] = 1] = "TypeofEQString"; - TypeFacts3[TypeFacts3["TypeofEQNumber"] = 2] = "TypeofEQNumber"; - TypeFacts3[TypeFacts3["TypeofEQBigInt"] = 4] = "TypeofEQBigInt"; - TypeFacts3[TypeFacts3["TypeofEQBoolean"] = 8] = "TypeofEQBoolean"; - TypeFacts3[TypeFacts3["TypeofEQSymbol"] = 16] = "TypeofEQSymbol"; - TypeFacts3[TypeFacts3["TypeofEQObject"] = 32] = "TypeofEQObject"; - TypeFacts3[TypeFacts3["TypeofEQFunction"] = 64] = "TypeofEQFunction"; - TypeFacts3[TypeFacts3["TypeofEQHostObject"] = 128] = "TypeofEQHostObject"; - TypeFacts3[TypeFacts3["TypeofNEString"] = 256] = "TypeofNEString"; - TypeFacts3[TypeFacts3["TypeofNENumber"] = 512] = "TypeofNENumber"; - TypeFacts3[TypeFacts3["TypeofNEBigInt"] = 1024] = "TypeofNEBigInt"; - TypeFacts3[TypeFacts3["TypeofNEBoolean"] = 2048] = "TypeofNEBoolean"; - TypeFacts3[TypeFacts3["TypeofNESymbol"] = 4096] = "TypeofNESymbol"; - TypeFacts3[TypeFacts3["TypeofNEObject"] = 8192] = "TypeofNEObject"; - TypeFacts3[TypeFacts3["TypeofNEFunction"] = 16384] = "TypeofNEFunction"; - TypeFacts3[TypeFacts3["TypeofNEHostObject"] = 32768] = "TypeofNEHostObject"; - TypeFacts3[TypeFacts3["EQUndefined"] = 65536] = "EQUndefined"; - TypeFacts3[TypeFacts3["EQNull"] = 131072] = "EQNull"; - TypeFacts3[TypeFacts3["EQUndefinedOrNull"] = 262144] = "EQUndefinedOrNull"; - TypeFacts3[TypeFacts3["NEUndefined"] = 524288] = "NEUndefined"; - TypeFacts3[TypeFacts3["NENull"] = 1048576] = "NENull"; - TypeFacts3[TypeFacts3["NEUndefinedOrNull"] = 2097152] = "NEUndefinedOrNull"; - TypeFacts3[TypeFacts3["Truthy"] = 4194304] = "Truthy"; - TypeFacts3[TypeFacts3["Falsy"] = 8388608] = "Falsy"; - TypeFacts3[TypeFacts3["IsUndefined"] = 16777216] = "IsUndefined"; - TypeFacts3[TypeFacts3["IsNull"] = 33554432] = "IsNull"; - TypeFacts3[TypeFacts3["IsUndefinedOrNull"] = 50331648] = "IsUndefinedOrNull"; - TypeFacts3[TypeFacts3["All"] = 134217727] = "All"; - TypeFacts3[TypeFacts3["BaseStringStrictFacts"] = 3735041] = "BaseStringStrictFacts"; - TypeFacts3[TypeFacts3["BaseStringFacts"] = 12582401] = "BaseStringFacts"; - TypeFacts3[TypeFacts3["StringStrictFacts"] = 16317953] = "StringStrictFacts"; - TypeFacts3[TypeFacts3["StringFacts"] = 16776705] = "StringFacts"; - TypeFacts3[TypeFacts3["EmptyStringStrictFacts"] = 12123649] = "EmptyStringStrictFacts"; - TypeFacts3[TypeFacts3["EmptyStringFacts"] = 12582401 /* BaseStringFacts */] = "EmptyStringFacts"; - TypeFacts3[TypeFacts3["NonEmptyStringStrictFacts"] = 7929345] = "NonEmptyStringStrictFacts"; - TypeFacts3[TypeFacts3["NonEmptyStringFacts"] = 16776705] = "NonEmptyStringFacts"; - TypeFacts3[TypeFacts3["BaseNumberStrictFacts"] = 3734786] = "BaseNumberStrictFacts"; - TypeFacts3[TypeFacts3["BaseNumberFacts"] = 12582146] = "BaseNumberFacts"; - TypeFacts3[TypeFacts3["NumberStrictFacts"] = 16317698] = "NumberStrictFacts"; - TypeFacts3[TypeFacts3["NumberFacts"] = 16776450] = "NumberFacts"; - TypeFacts3[TypeFacts3["ZeroNumberStrictFacts"] = 12123394] = "ZeroNumberStrictFacts"; - TypeFacts3[TypeFacts3["ZeroNumberFacts"] = 12582146 /* BaseNumberFacts */] = "ZeroNumberFacts"; - TypeFacts3[TypeFacts3["NonZeroNumberStrictFacts"] = 7929090] = "NonZeroNumberStrictFacts"; - TypeFacts3[TypeFacts3["NonZeroNumberFacts"] = 16776450] = "NonZeroNumberFacts"; - TypeFacts3[TypeFacts3["BaseBigIntStrictFacts"] = 3734276] = "BaseBigIntStrictFacts"; - TypeFacts3[TypeFacts3["BaseBigIntFacts"] = 12581636] = "BaseBigIntFacts"; - TypeFacts3[TypeFacts3["BigIntStrictFacts"] = 16317188] = "BigIntStrictFacts"; - TypeFacts3[TypeFacts3["BigIntFacts"] = 16775940] = "BigIntFacts"; - TypeFacts3[TypeFacts3["ZeroBigIntStrictFacts"] = 12122884] = "ZeroBigIntStrictFacts"; - TypeFacts3[TypeFacts3["ZeroBigIntFacts"] = 12581636 /* BaseBigIntFacts */] = "ZeroBigIntFacts"; - TypeFacts3[TypeFacts3["NonZeroBigIntStrictFacts"] = 7928580] = "NonZeroBigIntStrictFacts"; - TypeFacts3[TypeFacts3["NonZeroBigIntFacts"] = 16775940] = "NonZeroBigIntFacts"; - TypeFacts3[TypeFacts3["BaseBooleanStrictFacts"] = 3733256] = "BaseBooleanStrictFacts"; - TypeFacts3[TypeFacts3["BaseBooleanFacts"] = 12580616] = "BaseBooleanFacts"; - TypeFacts3[TypeFacts3["BooleanStrictFacts"] = 16316168] = "BooleanStrictFacts"; - TypeFacts3[TypeFacts3["BooleanFacts"] = 16774920] = "BooleanFacts"; - TypeFacts3[TypeFacts3["FalseStrictFacts"] = 12121864] = "FalseStrictFacts"; - TypeFacts3[TypeFacts3["FalseFacts"] = 12580616 /* BaseBooleanFacts */] = "FalseFacts"; - TypeFacts3[TypeFacts3["TrueStrictFacts"] = 7927560] = "TrueStrictFacts"; - TypeFacts3[TypeFacts3["TrueFacts"] = 16774920] = "TrueFacts"; - TypeFacts3[TypeFacts3["SymbolStrictFacts"] = 7925520] = "SymbolStrictFacts"; - TypeFacts3[TypeFacts3["SymbolFacts"] = 16772880] = "SymbolFacts"; - TypeFacts3[TypeFacts3["ObjectStrictFacts"] = 7888800] = "ObjectStrictFacts"; - TypeFacts3[TypeFacts3["ObjectFacts"] = 16736160] = "ObjectFacts"; - TypeFacts3[TypeFacts3["FunctionStrictFacts"] = 7880640] = "FunctionStrictFacts"; - TypeFacts3[TypeFacts3["FunctionFacts"] = 16728e3] = "FunctionFacts"; - TypeFacts3[TypeFacts3["VoidFacts"] = 9830144] = "VoidFacts"; - TypeFacts3[TypeFacts3["UndefinedFacts"] = 26607360] = "UndefinedFacts"; - TypeFacts3[TypeFacts3["NullFacts"] = 42917664] = "NullFacts"; - TypeFacts3[TypeFacts3["EmptyObjectStrictFacts"] = 83427327] = "EmptyObjectStrictFacts"; - TypeFacts3[TypeFacts3["EmptyObjectFacts"] = 83886079] = "EmptyObjectFacts"; - TypeFacts3[TypeFacts3["UnknownFacts"] = 83886079] = "UnknownFacts"; - TypeFacts3[TypeFacts3["AllTypeofNE"] = 556800] = "AllTypeofNE"; - TypeFacts3[TypeFacts3["OrFactsMask"] = 8256] = "OrFactsMask"; - TypeFacts3[TypeFacts3["AndFactsMask"] = 134209471] = "AndFactsMask"; - return TypeFacts3; - })(TypeFacts || {}); - typeofNEFacts = new Map(Object.entries({ - string: 256 /* TypeofNEString */, - number: 512 /* TypeofNENumber */, - bigint: 1024 /* TypeofNEBigInt */, - boolean: 2048 /* TypeofNEBoolean */, - symbol: 4096 /* TypeofNESymbol */, - undefined: 524288 /* NEUndefined */, - object: 8192 /* TypeofNEObject */, - function: 16384 /* TypeofNEFunction */ - })); - CheckMode = /* @__PURE__ */ ((CheckMode3) => { - CheckMode3[CheckMode3["Normal"] = 0] = "Normal"; - CheckMode3[CheckMode3["Contextual"] = 1] = "Contextual"; - CheckMode3[CheckMode3["Inferential"] = 2] = "Inferential"; - CheckMode3[CheckMode3["SkipContextSensitive"] = 4] = "SkipContextSensitive"; - CheckMode3[CheckMode3["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; - CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; - CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; - CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; - CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; - return CheckMode3; - })(CheckMode || {}); - SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { - SignatureCheckMode3[SignatureCheckMode3["None"] = 0] = "None"; - SignatureCheckMode3[SignatureCheckMode3["BivariantCallback"] = 1] = "BivariantCallback"; - SignatureCheckMode3[SignatureCheckMode3["StrictCallback"] = 2] = "StrictCallback"; - SignatureCheckMode3[SignatureCheckMode3["IgnoreReturnTypes"] = 4] = "IgnoreReturnTypes"; - SignatureCheckMode3[SignatureCheckMode3["StrictArity"] = 8] = "StrictArity"; - SignatureCheckMode3[SignatureCheckMode3["StrictTopSignature"] = 16] = "StrictTopSignature"; - SignatureCheckMode3[SignatureCheckMode3["Callback"] = 3] = "Callback"; - return SignatureCheckMode3; - })(SignatureCheckMode || {}); - isNotOverloadAndNotAccessor = and(isNotOverload, isNotAccessor); - intrinsicTypeKinds = new Map(Object.entries({ - Uppercase: 0 /* Uppercase */, - Lowercase: 1 /* Lowercase */, - Capitalize: 2 /* Capitalize */, - Uncapitalize: 3 /* Uncapitalize */ - })); - SymbolLinks = class { - }; - ((JsxNames2) => { - JsxNames2.JSX = "JSX"; - JsxNames2.IntrinsicElements = "IntrinsicElements"; - JsxNames2.ElementClass = "ElementClass"; - JsxNames2.ElementAttributesPropertyNameContainer = "ElementAttributesProperty"; - JsxNames2.ElementChildrenAttributeNameContainer = "ElementChildrenAttribute"; - JsxNames2.Element = "Element"; - JsxNames2.ElementType = "ElementType"; - JsxNames2.IntrinsicAttributes = "IntrinsicAttributes"; - JsxNames2.IntrinsicClassAttributes = "IntrinsicClassAttributes"; - JsxNames2.LibraryManagedAttributes = "LibraryManagedAttributes"; - })(JsxNames || (JsxNames = {})); - SymbolTrackerImpl = class _SymbolTrackerImpl { - constructor(context, tracker, moduleResolverHost) { - this.moduleResolverHost = void 0; - this.inner = void 0; - this.disableTrackSymbol = false; - var _a; - while (tracker instanceof _SymbolTrackerImpl) { - tracker = tracker.inner; - } - this.inner = tracker; - this.moduleResolverHost = moduleResolverHost; - this.context = context; - this.canTrackSymbol = !!((_a = this.inner) == null ? void 0 : _a.trackSymbol); - } - trackSymbol(symbol, enclosingDeclaration, meaning) { - var _a; - if (((_a = this.inner) == null ? void 0 : _a.trackSymbol) && !this.disableTrackSymbol) { - if (this.inner.trackSymbol(symbol, enclosingDeclaration, meaning)) { - this.onDiagnosticReported(); - return true; - } - } - return false; - } - reportInaccessibleThisError() { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportInaccessibleThisError) { - this.onDiagnosticReported(); - this.inner.reportInaccessibleThisError(); - } - } - reportPrivateInBaseOfClassExpression(propertyName) { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportPrivateInBaseOfClassExpression) { - this.onDiagnosticReported(); - this.inner.reportPrivateInBaseOfClassExpression(propertyName); - } - } - reportInaccessibleUniqueSymbolError() { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportInaccessibleUniqueSymbolError) { - this.onDiagnosticReported(); - this.inner.reportInaccessibleUniqueSymbolError(); - } - } - reportCyclicStructureError() { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportCyclicStructureError) { - this.onDiagnosticReported(); - this.inner.reportCyclicStructureError(); - } - } - reportLikelyUnsafeImportRequiredError(specifier) { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportLikelyUnsafeImportRequiredError) { - this.onDiagnosticReported(); - this.inner.reportLikelyUnsafeImportRequiredError(specifier); - } - } - reportTruncationError() { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportTruncationError) { - this.onDiagnosticReported(); - this.inner.reportTruncationError(); - } - } - trackReferencedAmbientModule(decl, symbol) { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.trackReferencedAmbientModule) { - this.onDiagnosticReported(); - this.inner.trackReferencedAmbientModule(decl, symbol); - } - } - trackExternalModuleSymbolOfImportTypeNode(symbol) { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.trackExternalModuleSymbolOfImportTypeNode) { - this.onDiagnosticReported(); - this.inner.trackExternalModuleSymbolOfImportTypeNode(symbol); - } - } - reportNonlocalAugmentation(containingFile, parentSymbol, augmentingSymbol) { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportNonlocalAugmentation) { - this.onDiagnosticReported(); - this.inner.reportNonlocalAugmentation(containingFile, parentSymbol, augmentingSymbol); - } - } - reportNonSerializableProperty(propertyName) { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportNonSerializableProperty) { - this.onDiagnosticReported(); - this.inner.reportNonSerializableProperty(propertyName); - } - } - reportImportTypeNodeResolutionModeOverride() { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportImportTypeNodeResolutionModeOverride) { - this.onDiagnosticReported(); - this.inner.reportImportTypeNodeResolutionModeOverride(); - } - } - onDiagnosticReported() { - this.context.reportedDiagnostic = true; - } - }; - } - }); - - // src/compiler/visitorPublic.ts - function visitNode(node, visitor, test, lift) { - if (node === void 0) { - return node; - } - const visited = visitor(node); - let visitedNode; - if (visited === void 0) { - return void 0; - } else if (isArray(visited)) { - visitedNode = (lift || extractSingleNode)(visited); - } else { - visitedNode = visited; - } - Debug.assertNode(visitedNode, test); - return visitedNode; - } - function visitNodes2(nodes, visitor, test, start, count) { - if (nodes === void 0) { - return nodes; - } - const length2 = nodes.length; - if (start === void 0 || start < 0) { - start = 0; - } - if (count === void 0 || count > length2 - start) { - count = length2 - start; - } - let hasTrailingComma; - let pos = -1; - let end = -1; - if (start > 0 || count < length2) { - hasTrailingComma = nodes.hasTrailingComma && start + count === length2; - } else { - pos = nodes.pos; - end = nodes.end; - hasTrailingComma = nodes.hasTrailingComma; - } - const updated = visitArrayWorker(nodes, visitor, test, start, count); - if (updated !== nodes) { - const updatedArray = factory.createNodeArray(updated, hasTrailingComma); - setTextRangePosEnd(updatedArray, pos, end); - return updatedArray; - } - return nodes; - } - function visitArray(nodes, visitor, test, start, count) { - if (nodes === void 0) { - return nodes; - } - const length2 = nodes.length; - if (start === void 0 || start < 0) { - start = 0; - } - if (count === void 0 || count > length2 - start) { - count = length2 - start; - } - return visitArrayWorker(nodes, visitor, test, start, count); - } - function visitArrayWorker(nodes, visitor, test, start, count) { - let updated; - const length2 = nodes.length; - if (start > 0 || count < length2) { - updated = []; - } - for (let i = 0; i < count; i++) { - const node = nodes[i + start]; - const visited = node !== void 0 ? visitor ? visitor(node) : node : void 0; - if (updated !== void 0 || visited === void 0 || visited !== node) { - if (updated === void 0) { - updated = nodes.slice(0, i); - Debug.assertEachNode(updated, test); - } - if (visited) { - if (isArray(visited)) { - for (const visitedNode of visited) { - Debug.assertNode(visitedNode, test); - updated.push(visitedNode); - } - } else { - Debug.assertNode(visited, test); - updated.push(visited); - } - } - } - } - if (updated) { - return updated; - } - Debug.assertEachNode(nodes, test); - return nodes; - } - function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor = visitNodes2) { - context.startLexicalEnvironment(); - statements = nodesVisitor(statements, visitor, isStatement, start); - if (ensureUseStrict) - statements = context.factory.ensureUseStrict(statements); - return factory.mergeLexicalEnvironment(statements, context.endLexicalEnvironment()); - } - function visitParameterList(nodes, visitor, context, nodesVisitor = visitNodes2) { - let updated; - context.startLexicalEnvironment(); - if (nodes) { - context.setLexicalEnvironmentFlags(1 /* InParameters */, true); - updated = nodesVisitor(nodes, visitor, isParameter); - if (context.getLexicalEnvironmentFlags() & 2 /* VariablesHoistedInParameters */ && getEmitScriptTarget(context.getCompilerOptions()) >= 2 /* ES2015 */) { - updated = addDefaultValueAssignmentsIfNeeded(updated, context); - } - context.setLexicalEnvironmentFlags(1 /* InParameters */, false); - } - context.suspendLexicalEnvironment(); - return updated; - } - function addDefaultValueAssignmentsIfNeeded(parameters, context) { - let result; - for (let i = 0; i < parameters.length; i++) { - const parameter = parameters[i]; - const updated = addDefaultValueAssignmentIfNeeded(parameter, context); - if (result || updated !== parameter) { - if (!result) - result = parameters.slice(0, i); - result[i] = updated; - } - } - if (result) { - return setTextRange(context.factory.createNodeArray(result, parameters.hasTrailingComma), parameters); - } - return parameters; - } - function addDefaultValueAssignmentIfNeeded(parameter, context) { - return parameter.dotDotDotToken ? parameter : isBindingPattern(parameter.name) ? addDefaultValueAssignmentForBindingPattern(parameter, context) : parameter.initializer ? addDefaultValueAssignmentForInitializer(parameter, parameter.name, parameter.initializer, context) : parameter; - } - function addDefaultValueAssignmentForBindingPattern(parameter, context) { - const { factory: factory2 } = context; - context.addInitializationStatement( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - parameter.name, - /*exclamationToken*/ - void 0, - parameter.type, - parameter.initializer ? factory2.createConditionalExpression( - factory2.createStrictEquality( - factory2.getGeneratedNameForNode(parameter), - factory2.createVoidZero() - ), - /*questionToken*/ - void 0, - parameter.initializer, - /*colonToken*/ - void 0, - factory2.getGeneratedNameForNode(parameter) - ) : factory2.getGeneratedNameForNode(parameter) - ) - ]) - ) - ); - return factory2.updateParameterDeclaration( - parameter, - parameter.modifiers, - parameter.dotDotDotToken, - factory2.getGeneratedNameForNode(parameter), - parameter.questionToken, - parameter.type, - /*initializer*/ - void 0 - ); - } - function addDefaultValueAssignmentForInitializer(parameter, name, initializer, context) { - const factory2 = context.factory; - context.addInitializationStatement( - factory2.createIfStatement( - factory2.createTypeCheck(factory2.cloneNode(name), "undefined"), - setEmitFlags( - setTextRange( - factory2.createBlock([ - factory2.createExpressionStatement( - setEmitFlags( - setTextRange( - factory2.createAssignment( - setEmitFlags(factory2.cloneNode(name), 96 /* NoSourceMap */), - setEmitFlags(initializer, 96 /* NoSourceMap */ | getEmitFlags(initializer) | 3072 /* NoComments */) - ), - parameter - ), - 3072 /* NoComments */ - ) - ) - ]), - parameter - ), - 1 /* SingleLine */ | 64 /* NoTrailingSourceMap */ | 768 /* NoTokenSourceMaps */ | 3072 /* NoComments */ - ) - ) - ); - return factory2.updateParameterDeclaration( - parameter, - parameter.modifiers, - parameter.dotDotDotToken, - parameter.name, - parameter.questionToken, - parameter.type, - /*initializer*/ - void 0 - ); - } - function visitFunctionBody(node, visitor, context, nodeVisitor = visitNode) { - context.resumeLexicalEnvironment(); - const updated = nodeVisitor(node, visitor, isConciseBody); - const declarations = context.endLexicalEnvironment(); - if (some(declarations)) { - if (!updated) { - return context.factory.createBlock(declarations); - } - const block = context.factory.converters.convertToFunctionBlock(updated); - const statements = factory.mergeLexicalEnvironment(block.statements, declarations); - return context.factory.updateBlock(block, statements); - } - return updated; - } - function visitIterationBody(body, visitor, context, nodeVisitor = visitNode) { - context.startBlockScope(); - const updated = nodeVisitor(body, visitor, isStatement, context.factory.liftToBlock); - Debug.assert(updated); - const declarations = context.endBlockScope(); - if (some(declarations)) { - if (isBlock(updated)) { - declarations.push(...updated.statements); - return context.factory.updateBlock(updated, declarations); - } - declarations.push(updated); - return context.factory.createBlock(declarations); - } - return updated; - } - function visitCommaListElements(elements, visitor, discardVisitor = visitor) { - if (discardVisitor === visitor || elements.length <= 1) { - return visitNodes2(elements, visitor, isExpression); - } - let i = 0; - const length2 = elements.length; - return visitNodes2(elements, (node) => { - const discarded = i < length2 - 1; - i++; - return discarded ? discardVisitor(node) : visitor(node); - }, isExpression); - } - function visitEachChild(node, visitor, context, nodesVisitor = visitNodes2, tokenVisitor, nodeVisitor = visitNode) { - if (node === void 0) { - return void 0; - } - const fn = visitEachChildTable[node.kind]; - return fn === void 0 ? node : fn(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor); - } - function extractSingleNode(nodes) { - Debug.assert(nodes.length <= 1, "Too many nodes written to output."); - return singleOrUndefined(nodes); - } - var visitEachChildTable; - var init_visitorPublic = __esm({ - "src/compiler/visitorPublic.ts"() { - "use strict"; - init_ts2(); - visitEachChildTable = { - [166 /* QualifiedName */]: function visitEachChildOfQualifiedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateQualifiedName( - node, - Debug.checkDefined(nodeVisitor(node.left, visitor, isEntityName)), - Debug.checkDefined(nodeVisitor(node.right, visitor, isIdentifier)) - ); - }, - [167 /* ComputedPropertyName */]: function visitEachChildOfComputedPropertyName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateComputedPropertyName( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - // Signature elements - [168 /* TypeParameter */]: function visitEachChildOfTypeParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTypeParameterDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifier), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), - nodeVisitor(node.constraint, visitor, isTypeNode), - nodeVisitor(node.default, visitor, isTypeNode) - ); - }, - [169 /* Parameter */]: function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateParameterDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, - Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), - tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken, - nodeVisitor(node.type, visitor, isTypeNode), - nodeVisitor(node.initializer, visitor, isExpression) - ); - }, - [170 /* Decorator */]: function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateDecorator( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - // Type elements - [171 /* PropertySignature */]: function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updatePropertySignature( - node, - nodesVisitor(node.modifiers, visitor, isModifier), - Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), - tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken, - nodeVisitor(node.type, visitor, isTypeNode) - ); - }, - [172 /* PropertyDeclaration */]: function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updatePropertyDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), - // QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration - tokenVisitor ? nodeVisitor(node.questionToken ?? node.exclamationToken, tokenVisitor, isQuestionOrExclamationToken) : node.questionToken ?? node.exclamationToken, - nodeVisitor(node.type, visitor, isTypeNode), - nodeVisitor(node.initializer, visitor, isExpression) - ); - }, - [173 /* MethodSignature */]: function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateMethodSignature( - node, - nodesVisitor(node.modifiers, visitor, isModifier), - Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), - tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken, - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - nodesVisitor(node.parameters, visitor, isParameter), - nodeVisitor(node.type, visitor, isTypeNode) - ); - }, - [174 /* MethodDeclaration */]: function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateMethodDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, - Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), - tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken, - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - visitParameterList(node.parameters, visitor, context, nodesVisitor), - nodeVisitor(node.type, visitor, isTypeNode), - visitFunctionBody(node.body, visitor, context, nodeVisitor) - ); - }, - [176 /* Constructor */]: function visitEachChildOfConstructorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateConstructorDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - visitParameterList(node.parameters, visitor, context, nodesVisitor), - visitFunctionBody(node.body, visitor, context, nodeVisitor) - ); - }, - [177 /* GetAccessor */]: function visitEachChildOfGetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateGetAccessorDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), - visitParameterList(node.parameters, visitor, context, nodesVisitor), - nodeVisitor(node.type, visitor, isTypeNode), - visitFunctionBody(node.body, visitor, context, nodeVisitor) - ); - }, - [178 /* SetAccessor */]: function visitEachChildOfSetAccessorDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateSetAccessorDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), - visitParameterList(node.parameters, visitor, context, nodesVisitor), - visitFunctionBody(node.body, visitor, context, nodeVisitor) - ); - }, - [175 /* ClassStaticBlockDeclaration */]: function visitEachChildOfClassStaticBlockDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - context.startLexicalEnvironment(); - context.suspendLexicalEnvironment(); - return context.factory.updateClassStaticBlockDeclaration( - node, - visitFunctionBody(node.body, visitor, context, nodeVisitor) - ); - }, - [179 /* CallSignature */]: function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateCallSignature( - node, - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - nodesVisitor(node.parameters, visitor, isParameter), - nodeVisitor(node.type, visitor, isTypeNode) - ); - }, - [180 /* ConstructSignature */]: function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateConstructSignature( - node, - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - nodesVisitor(node.parameters, visitor, isParameter), - nodeVisitor(node.type, visitor, isTypeNode) - ); - }, - [181 /* IndexSignature */]: function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateIndexSignature( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - nodesVisitor(node.parameters, visitor, isParameter), - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - // Types - [182 /* TypePredicate */]: function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTypePredicateNode( - node, - nodeVisitor(node.assertsModifier, visitor, isAssertsKeyword), - Debug.checkDefined(nodeVisitor(node.parameterName, visitor, isIdentifierOrThisTypeNode)), - nodeVisitor(node.type, visitor, isTypeNode) - ); - }, - [183 /* TypeReference */]: function visitEachChildOfTypeReferenceNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTypeReferenceNode( - node, - Debug.checkDefined(nodeVisitor(node.typeName, visitor, isEntityName)), - nodesVisitor(node.typeArguments, visitor, isTypeNode) - ); - }, - [184 /* FunctionType */]: function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateFunctionTypeNode( - node, - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - nodesVisitor(node.parameters, visitor, isParameter), - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [185 /* ConstructorType */]: function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateConstructorTypeNode( - node, - nodesVisitor(node.modifiers, visitor, isModifier), - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - nodesVisitor(node.parameters, visitor, isParameter), - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [186 /* TypeQuery */]: function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTypeQueryNode( - node, - Debug.checkDefined(nodeVisitor(node.exprName, visitor, isEntityName)), - nodesVisitor(node.typeArguments, visitor, isTypeNode) - ); - }, - [187 /* TypeLiteral */]: function visitEachChildOfTypeLiteralNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateTypeLiteralNode( - node, - nodesVisitor(node.members, visitor, isTypeElement) - ); - }, - [188 /* ArrayType */]: function visitEachChildOfArrayTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateArrayTypeNode( - node, - Debug.checkDefined(nodeVisitor(node.elementType, visitor, isTypeNode)) - ); - }, - [189 /* TupleType */]: function visitEachChildOfTupleTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateTupleTypeNode( - node, - nodesVisitor(node.elements, visitor, isTypeNode) - ); - }, - [190 /* OptionalType */]: function visitEachChildOfOptionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateOptionalTypeNode( - node, - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [191 /* RestType */]: function visitEachChildOfRestTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateRestTypeNode( - node, - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [192 /* UnionType */]: function visitEachChildOfUnionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateUnionTypeNode( - node, - nodesVisitor(node.types, visitor, isTypeNode) - ); - }, - [193 /* IntersectionType */]: function visitEachChildOfIntersectionTypeNode(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateIntersectionTypeNode( - node, - nodesVisitor(node.types, visitor, isTypeNode) - ); - }, - [194 /* ConditionalType */]: function visitEachChildOfConditionalTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateConditionalTypeNode( - node, - Debug.checkDefined(nodeVisitor(node.checkType, visitor, isTypeNode)), - Debug.checkDefined(nodeVisitor(node.extendsType, visitor, isTypeNode)), - Debug.checkDefined(nodeVisitor(node.trueType, visitor, isTypeNode)), - Debug.checkDefined(nodeVisitor(node.falseType, visitor, isTypeNode)) - ); - }, - [195 /* InferType */]: function visitEachChildOfInferTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateInferTypeNode( - node, - Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)) - ); - }, - [205 /* ImportType */]: function visitEachChildOfImportTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateImportTypeNode( - node, - Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), - nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer), - nodeVisitor(node.qualifier, visitor, isEntityName), - nodesVisitor(node.typeArguments, visitor, isTypeNode), - node.isTypeOf - ); - }, - [302 /* ImportTypeAssertionContainer */]: function visitEachChildOfImportTypeAssertionContainer(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateImportTypeAssertionContainer( - node, - Debug.checkDefined(nodeVisitor(node.assertClause, visitor, isAssertClause)), - node.multiLine - ); - }, - [202 /* NamedTupleMember */]: function visitEachChildOfNamedTupleMember(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateNamedTupleMember( - node, - tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), - tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken) : node.questionToken, - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [196 /* ParenthesizedType */]: function visitEachChildOfParenthesizedType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateParenthesizedType( - node, - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [198 /* TypeOperator */]: function visitEachChildOfTypeOperatorNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTypeOperatorNode( - node, - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [199 /* IndexedAccessType */]: function visitEachChildOfIndexedAccessType(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateIndexedAccessTypeNode( - node, - Debug.checkDefined(nodeVisitor(node.objectType, visitor, isTypeNode)), - Debug.checkDefined(nodeVisitor(node.indexType, visitor, isTypeNode)) - ); - }, - [200 /* MappedType */]: function visitEachChildOfMappedType(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateMappedTypeNode( - node, - tokenVisitor ? nodeVisitor(node.readonlyToken, tokenVisitor, isReadonlyKeywordOrPlusOrMinusToken) : node.readonlyToken, - Debug.checkDefined(nodeVisitor(node.typeParameter, visitor, isTypeParameterDeclaration)), - nodeVisitor(node.nameType, visitor, isTypeNode), - tokenVisitor ? nodeVisitor(node.questionToken, tokenVisitor, isQuestionOrPlusOrMinusToken) : node.questionToken, - nodeVisitor(node.type, visitor, isTypeNode), - nodesVisitor(node.members, visitor, isTypeElement) - ); - }, - [201 /* LiteralType */]: function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateLiteralTypeNode( - node, - Debug.checkDefined(nodeVisitor(node.literal, visitor, isLiteralTypeLiteral)) - ); - }, - [203 /* TemplateLiteralType */]: function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTemplateLiteralType( - node, - Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), - nodesVisitor(node.templateSpans, visitor, isTemplateLiteralTypeSpan) - ); - }, - [204 /* TemplateLiteralTypeSpan */]: function visitEachChildOfTemplateLiteralTypeSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTemplateLiteralTypeSpan( - node, - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), - Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)) - ); - }, - // Binding patterns - [206 /* ObjectBindingPattern */]: function visitEachChildOfObjectBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateObjectBindingPattern( - node, - nodesVisitor(node.elements, visitor, isBindingElement) - ); - }, - [207 /* ArrayBindingPattern */]: function visitEachChildOfArrayBindingPattern(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateArrayBindingPattern( - node, - nodesVisitor(node.elements, visitor, isArrayBindingElement) - ); - }, - [208 /* BindingElement */]: function visitEachChildOfBindingElement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateBindingElement( - node, - tokenVisitor ? nodeVisitor(node.dotDotDotToken, tokenVisitor, isDotDotDotToken) : node.dotDotDotToken, - nodeVisitor(node.propertyName, visitor, isPropertyName), - Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), - nodeVisitor(node.initializer, visitor, isExpression) - ); - }, - // Expression - [209 /* ArrayLiteralExpression */]: function visitEachChildOfArrayLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateArrayLiteralExpression( - node, - nodesVisitor(node.elements, visitor, isExpression) - ); - }, - [210 /* ObjectLiteralExpression */]: function visitEachChildOfObjectLiteralExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateObjectLiteralExpression( - node, - nodesVisitor(node.properties, visitor, isObjectLiteralElementLike) - ); - }, - [211 /* PropertyAccessExpression */]: function visitEachChildOfPropertyAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { - return isPropertyAccessChain(node) ? context.factory.updatePropertyAccessChain( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken, - Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) - ) : context.factory.updatePropertyAccessExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - Debug.checkDefined(nodeVisitor(node.name, visitor, isMemberName)) - ); - }, - [212 /* ElementAccessExpression */]: function visitEachChildOfElementAccessExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { - return isElementAccessChain(node) ? context.factory.updateElementAccessChain( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken, - Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) - ) : context.factory.updateElementAccessExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - Debug.checkDefined(nodeVisitor(node.argumentExpression, visitor, isExpression)) - ); - }, - [213 /* CallExpression */]: function visitEachChildOfCallExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return isCallChain(node) ? context.factory.updateCallChain( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - tokenVisitor ? nodeVisitor(node.questionDotToken, tokenVisitor, isQuestionDotToken) : node.questionDotToken, - nodesVisitor(node.typeArguments, visitor, isTypeNode), - nodesVisitor(node.arguments, visitor, isExpression) - ) : context.factory.updateCallExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - nodesVisitor(node.typeArguments, visitor, isTypeNode), - nodesVisitor(node.arguments, visitor, isExpression) - ); - }, - [214 /* NewExpression */]: function visitEachChildOfNewExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateNewExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - nodesVisitor(node.typeArguments, visitor, isTypeNode), - nodesVisitor(node.arguments, visitor, isExpression) - ); - }, - [215 /* TaggedTemplateExpression */]: function visitEachChildOfTaggedTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTaggedTemplateExpression( - node, - Debug.checkDefined(nodeVisitor(node.tag, visitor, isExpression)), - nodesVisitor(node.typeArguments, visitor, isTypeNode), - Debug.checkDefined(nodeVisitor(node.template, visitor, isTemplateLiteral)) - ); - }, - [216 /* TypeAssertionExpression */]: function visitEachChildOfTypeAssertionExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTypeAssertion( - node, - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)), - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [217 /* ParenthesizedExpression */]: function visitEachChildOfParenthesizedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateParenthesizedExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [218 /* FunctionExpression */]: function visitEachChildOfFunctionExpression(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateFunctionExpression( - node, - nodesVisitor(node.modifiers, visitor, isModifier), - tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, - nodeVisitor(node.name, visitor, isIdentifier), - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - visitParameterList(node.parameters, visitor, context, nodesVisitor), - nodeVisitor(node.type, visitor, isTypeNode), - visitFunctionBody(node.body, visitor, context, nodeVisitor) - ); - }, - [219 /* ArrowFunction */]: function visitEachChildOfArrowFunction(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateArrowFunction( - node, - nodesVisitor(node.modifiers, visitor, isModifier), - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - visitParameterList(node.parameters, visitor, context, nodesVisitor), - nodeVisitor(node.type, visitor, isTypeNode), - tokenVisitor ? Debug.checkDefined(nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, isEqualsGreaterThanToken)) : node.equalsGreaterThanToken, - visitFunctionBody(node.body, visitor, context, nodeVisitor) - ); - }, - [220 /* DeleteExpression */]: function visitEachChildOfDeleteExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateDeleteExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [221 /* TypeOfExpression */]: function visitEachChildOfTypeOfExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTypeOfExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [222 /* VoidExpression */]: function visitEachChildOfVoidExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateVoidExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [223 /* AwaitExpression */]: function visitEachChildOfAwaitExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateAwaitExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [224 /* PrefixUnaryExpression */]: function visitEachChildOfPrefixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updatePrefixUnaryExpression( - node, - Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) - ); - }, - [225 /* PostfixUnaryExpression */]: function visitEachChildOfPostfixUnaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updatePostfixUnaryExpression( - node, - Debug.checkDefined(nodeVisitor(node.operand, visitor, isExpression)) - ); - }, - [226 /* BinaryExpression */]: function visitEachChildOfBinaryExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateBinaryExpression( - node, - Debug.checkDefined(nodeVisitor(node.left, visitor, isExpression)), - tokenVisitor ? Debug.checkDefined(nodeVisitor(node.operatorToken, tokenVisitor, isBinaryOperatorToken)) : node.operatorToken, - Debug.checkDefined(nodeVisitor(node.right, visitor, isExpression)) - ); - }, - [227 /* ConditionalExpression */]: function visitEachChildOfConditionalExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateConditionalExpression( - node, - Debug.checkDefined(nodeVisitor(node.condition, visitor, isExpression)), - tokenVisitor ? Debug.checkDefined(nodeVisitor(node.questionToken, tokenVisitor, isQuestionToken)) : node.questionToken, - Debug.checkDefined(nodeVisitor(node.whenTrue, visitor, isExpression)), - tokenVisitor ? Debug.checkDefined(nodeVisitor(node.colonToken, tokenVisitor, isColonToken)) : node.colonToken, - Debug.checkDefined(nodeVisitor(node.whenFalse, visitor, isExpression)) - ); - }, - [228 /* TemplateExpression */]: function visitEachChildOfTemplateExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTemplateExpression( - node, - Debug.checkDefined(nodeVisitor(node.head, visitor, isTemplateHead)), - nodesVisitor(node.templateSpans, visitor, isTemplateSpan) - ); - }, - [229 /* YieldExpression */]: function visitEachChildOfYieldExpression(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateYieldExpression( - node, - tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, - nodeVisitor(node.expression, visitor, isExpression) - ); - }, - [230 /* SpreadElement */]: function visitEachChildOfSpreadElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateSpreadElement( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [231 /* ClassExpression */]: function visitEachChildOfClassExpression(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateClassExpression( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - nodeVisitor(node.name, visitor, isIdentifier), - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - nodesVisitor(node.heritageClauses, visitor, isHeritageClause), - nodesVisitor(node.members, visitor, isClassElement) - ); - }, - [233 /* ExpressionWithTypeArguments */]: function visitEachChildOfExpressionWithTypeArguments(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateExpressionWithTypeArguments( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - nodesVisitor(node.typeArguments, visitor, isTypeNode) - ); - }, - [234 /* AsExpression */]: function visitEachChildOfAsExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateAsExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [238 /* SatisfiesExpression */]: function visitEachChildOfSatisfiesExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateSatisfiesExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [235 /* NonNullExpression */]: function visitEachChildOfNonNullExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return isOptionalChain(node) ? context.factory.updateNonNullChain( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ) : context.factory.updateNonNullExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [236 /* MetaProperty */]: function visitEachChildOfMetaProperty(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateMetaProperty( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) - ); - }, - // Misc - [239 /* TemplateSpan */]: function visitEachChildOfTemplateSpan(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTemplateSpan( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - Debug.checkDefined(nodeVisitor(node.literal, visitor, isTemplateMiddleOrTemplateTail)) - ); - }, - // Element - [241 /* Block */]: function visitEachChildOfBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateBlock( - node, - nodesVisitor(node.statements, visitor, isStatement) - ); - }, - [243 /* VariableStatement */]: function visitEachChildOfVariableStatement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateVariableStatement( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.declarationList, visitor, isVariableDeclarationList)) - ); - }, - [244 /* ExpressionStatement */]: function visitEachChildOfExpressionStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateExpressionStatement( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [245 /* IfStatement */]: function visitEachChildOfIfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateIfStatement( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - Debug.checkDefined(nodeVisitor(node.thenStatement, visitor, isStatement, context.factory.liftToBlock)), - nodeVisitor(node.elseStatement, visitor, isStatement, context.factory.liftToBlock) - ); - }, - [246 /* DoStatement */]: function visitEachChildOfDoStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateDoStatement( - node, - visitIterationBody(node.statement, visitor, context, nodeVisitor), - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [247 /* WhileStatement */]: function visitEachChildOfWhileStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateWhileStatement( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - visitIterationBody(node.statement, visitor, context, nodeVisitor) - ); - }, - [248 /* ForStatement */]: function visitEachChildOfForStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateForStatement( - node, - nodeVisitor(node.initializer, visitor, isForInitializer), - nodeVisitor(node.condition, visitor, isExpression), - nodeVisitor(node.incrementor, visitor, isExpression), - visitIterationBody(node.statement, visitor, context, nodeVisitor) - ); - }, - [249 /* ForInStatement */]: function visitEachChildOfForInStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateForInStatement( - node, - Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - visitIterationBody(node.statement, visitor, context, nodeVisitor) - ); - }, - [250 /* ForOfStatement */]: function visitEachChildOfForOfStatement(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateForOfStatement( - node, - tokenVisitor ? nodeVisitor(node.awaitModifier, tokenVisitor, isAwaitKeyword) : node.awaitModifier, - Debug.checkDefined(nodeVisitor(node.initializer, visitor, isForInitializer)), - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - visitIterationBody(node.statement, visitor, context, nodeVisitor) - ); - }, - [251 /* ContinueStatement */]: function visitEachChildOfContinueStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateContinueStatement( - node, - nodeVisitor(node.label, visitor, isIdentifier) - ); - }, - [252 /* BreakStatement */]: function visitEachChildOfBreakStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateBreakStatement( - node, - nodeVisitor(node.label, visitor, isIdentifier) - ); - }, - [253 /* ReturnStatement */]: function visitEachChildOfReturnStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateReturnStatement( - node, - nodeVisitor(node.expression, visitor, isExpression) - ); - }, - [254 /* WithStatement */]: function visitEachChildOfWithStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateWithStatement( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) - ); - }, - [255 /* SwitchStatement */]: function visitEachChildOfSwitchStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateSwitchStatement( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - Debug.checkDefined(nodeVisitor(node.caseBlock, visitor, isCaseBlock)) - ); - }, - [256 /* LabeledStatement */]: function visitEachChildOfLabeledStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateLabeledStatement( - node, - Debug.checkDefined(nodeVisitor(node.label, visitor, isIdentifier)), - Debug.checkDefined(nodeVisitor(node.statement, visitor, isStatement, context.factory.liftToBlock)) - ); - }, - [257 /* ThrowStatement */]: function visitEachChildOfThrowStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateThrowStatement( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [258 /* TryStatement */]: function visitEachChildOfTryStatement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTryStatement( - node, - Debug.checkDefined(nodeVisitor(node.tryBlock, visitor, isBlock)), - nodeVisitor(node.catchClause, visitor, isCatchClause), - nodeVisitor(node.finallyBlock, visitor, isBlock) - ); - }, - [260 /* VariableDeclaration */]: function visitEachChildOfVariableDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateVariableDeclaration( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isBindingName)), - tokenVisitor ? nodeVisitor(node.exclamationToken, tokenVisitor, isExclamationToken) : node.exclamationToken, - nodeVisitor(node.type, visitor, isTypeNode), - nodeVisitor(node.initializer, visitor, isExpression) - ); - }, - [261 /* VariableDeclarationList */]: function visitEachChildOfVariableDeclarationList(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateVariableDeclarationList( - node, - nodesVisitor(node.declarations, visitor, isVariableDeclaration) - ); - }, - [262 /* FunctionDeclaration */]: function visitEachChildOfFunctionDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) { - return context.factory.updateFunctionDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifier), - tokenVisitor ? nodeVisitor(node.asteriskToken, tokenVisitor, isAsteriskToken) : node.asteriskToken, - nodeVisitor(node.name, visitor, isIdentifier), - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - visitParameterList(node.parameters, visitor, context, nodesVisitor), - nodeVisitor(node.type, visitor, isTypeNode), - visitFunctionBody(node.body, visitor, context, nodeVisitor) - ); - }, - [263 /* ClassDeclaration */]: function visitEachChildOfClassDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateClassDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - nodeVisitor(node.name, visitor, isIdentifier), - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - nodesVisitor(node.heritageClauses, visitor, isHeritageClause), - nodesVisitor(node.members, visitor, isClassElement) - ); - }, - [264 /* InterfaceDeclaration */]: function visitEachChildOfInterfaceDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateInterfaceDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - nodesVisitor(node.heritageClauses, visitor, isHeritageClause), - nodesVisitor(node.members, visitor, isTypeElement) - ); - }, - [265 /* TypeAliasDeclaration */]: function visitEachChildOfTypeAliasDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateTypeAliasDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), - nodesVisitor(node.typeParameters, visitor, isTypeParameterDeclaration), - Debug.checkDefined(nodeVisitor(node.type, visitor, isTypeNode)) - ); - }, - [266 /* EnumDeclaration */]: function visitEachChildOfEnumDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateEnumDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), - nodesVisitor(node.members, visitor, isEnumMember) - ); - }, - [267 /* ModuleDeclaration */]: function visitEachChildOfModuleDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateModuleDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.name, visitor, isModuleName)), - nodeVisitor(node.body, visitor, isModuleBody) - ); - }, - [268 /* ModuleBlock */]: function visitEachChildOfModuleBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateModuleBlock( - node, - nodesVisitor(node.statements, visitor, isStatement) - ); - }, - [269 /* CaseBlock */]: function visitEachChildOfCaseBlock(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateCaseBlock( - node, - nodesVisitor(node.clauses, visitor, isCaseOrDefaultClause) - ); - }, - [270 /* NamespaceExportDeclaration */]: function visitEachChildOfNamespaceExportDeclaration(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateNamespaceExportDeclaration( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) - ); - }, - [271 /* ImportEqualsDeclaration */]: function visitEachChildOfImportEqualsDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateImportEqualsDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - node.isTypeOnly, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), - Debug.checkDefined(nodeVisitor(node.moduleReference, visitor, isModuleReference)) - ); - }, - [272 /* ImportDeclaration */]: function visitEachChildOfImportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateImportDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - nodeVisitor(node.importClause, visitor, isImportClause), - Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)), - nodeVisitor(node.assertClause, visitor, isAssertClause) - ); - }, - [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertClause( - node, - nodesVisitor(node.elements, visitor, isAssertEntry), - node.multiLine - ); - }, - [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertEntry( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), - Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) - ); - }, - [273 /* ImportClause */]: function visitEachChildOfImportClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateImportClause( - node, - node.isTypeOnly, - nodeVisitor(node.name, visitor, isIdentifier), - nodeVisitor(node.namedBindings, visitor, isNamedImportBindings) - ); - }, - [274 /* NamespaceImport */]: function visitEachChildOfNamespaceImport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateNamespaceImport( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) - ); - }, - [280 /* NamespaceExport */]: function visitEachChildOfNamespaceExport(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateNamespaceExport( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) - ); - }, - [275 /* NamedImports */]: function visitEachChildOfNamedImports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateNamedImports( - node, - nodesVisitor(node.elements, visitor, isImportSpecifier) - ); - }, - [276 /* ImportSpecifier */]: function visitEachChildOfImportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateImportSpecifier( - node, - node.isTypeOnly, - nodeVisitor(node.propertyName, visitor, isIdentifier), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) - ); - }, - [277 /* ExportAssignment */]: function visitEachChildOfExportAssignment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateExportAssignment( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [278 /* ExportDeclaration */]: function visitEachChildOfExportDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateExportDeclaration( - node, - nodesVisitor(node.modifiers, visitor, isModifierLike), - node.isTypeOnly, - nodeVisitor(node.exportClause, visitor, isNamedExportBindings), - nodeVisitor(node.moduleSpecifier, visitor, isExpression), - nodeVisitor(node.assertClause, visitor, isAssertClause) - ); - }, - [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateNamedExports( - node, - nodesVisitor(node.elements, visitor, isExportSpecifier) - ); - }, - [281 /* ExportSpecifier */]: function visitEachChildOfExportSpecifier(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateExportSpecifier( - node, - node.isTypeOnly, - nodeVisitor(node.propertyName, visitor, isIdentifier), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) - ); - }, - // Module references - [283 /* ExternalModuleReference */]: function visitEachChildOfExternalModuleReference(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateExternalModuleReference( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - // JSX - [284 /* JsxElement */]: function visitEachChildOfJsxElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxElement( - node, - Debug.checkDefined(nodeVisitor(node.openingElement, visitor, isJsxOpeningElement)), - nodesVisitor(node.children, visitor, isJsxChild), - Debug.checkDefined(nodeVisitor(node.closingElement, visitor, isJsxClosingElement)) - ); - }, - [285 /* JsxSelfClosingElement */]: function visitEachChildOfJsxSelfClosingElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxSelfClosingElement( - node, - Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), - nodesVisitor(node.typeArguments, visitor, isTypeNode), - Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) - ); - }, - [286 /* JsxOpeningElement */]: function visitEachChildOfJsxOpeningElement(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxOpeningElement( - node, - Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)), - nodesVisitor(node.typeArguments, visitor, isTypeNode), - Debug.checkDefined(nodeVisitor(node.attributes, visitor, isJsxAttributes)) - ); - }, - [287 /* JsxClosingElement */]: function visitEachChildOfJsxClosingElement(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxClosingElement( - node, - Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)) - ); - }, - [295 /* JsxNamespacedName */]: function forEachChildInJsxNamespacedName2(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxNamespacedName( - node, - Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier)), - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)) - ); - }, - [288 /* JsxFragment */]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxFragment( - node, - Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)), - nodesVisitor(node.children, visitor, isJsxChild), - Debug.checkDefined(nodeVisitor(node.closingFragment, visitor, isJsxClosingFragment)) - ); - }, - [291 /* JsxAttribute */]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxAttribute( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isJsxAttributeName)), - nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression) - ); - }, - [292 /* JsxAttributes */]: function visitEachChildOfJsxAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxAttributes( - node, - nodesVisitor(node.properties, visitor, isJsxAttributeLike) - ); - }, - [293 /* JsxSpreadAttribute */]: function visitEachChildOfJsxSpreadAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxSpreadAttribute( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [294 /* JsxExpression */]: function visitEachChildOfJsxExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateJsxExpression( - node, - nodeVisitor(node.expression, visitor, isExpression) - ); - }, - // Clauses - [296 /* CaseClause */]: function visitEachChildOfCaseClause(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateCaseClause( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)), - nodesVisitor(node.statements, visitor, isStatement) - ); - }, - [297 /* DefaultClause */]: function visitEachChildOfDefaultClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateDefaultClause( - node, - nodesVisitor(node.statements, visitor, isStatement) - ); - }, - [298 /* HeritageClause */]: function visitEachChildOfHeritageClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateHeritageClause( - node, - nodesVisitor(node.types, visitor, isExpressionWithTypeArguments) - ); - }, - [299 /* CatchClause */]: function visitEachChildOfCatchClause(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateCatchClause( - node, - nodeVisitor(node.variableDeclaration, visitor, isVariableDeclaration), - Debug.checkDefined(nodeVisitor(node.block, visitor, isBlock)) - ); - }, - // Property assignments - [303 /* PropertyAssignment */]: function visitEachChildOfPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updatePropertyAssignment( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), - Debug.checkDefined(nodeVisitor(node.initializer, visitor, isExpression)) - ); - }, - [304 /* ShorthandPropertyAssignment */]: function visitEachChildOfShorthandPropertyAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateShorthandPropertyAssignment( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)), - nodeVisitor(node.objectAssignmentInitializer, visitor, isExpression) - ); - }, - [305 /* SpreadAssignment */]: function visitEachChildOfSpreadAssignment(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateSpreadAssignment( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - // Enum - [306 /* EnumMember */]: function visitEachChildOfEnumMember(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateEnumMember( - node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isPropertyName)), - nodeVisitor(node.initializer, visitor, isExpression) - ); - }, - // Top-level nodes - [312 /* SourceFile */]: function visitEachChildOfSourceFile(node, visitor, context, _nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateSourceFile( - node, - visitLexicalEnvironment(node.statements, visitor, context) - ); - }, - // Transformation nodes - [360 /* PartiallyEmittedExpression */]: function visitEachChildOfPartiallyEmittedExpression(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updatePartiallyEmittedExpression( - node, - Debug.checkDefined(nodeVisitor(node.expression, visitor, isExpression)) - ); - }, - [361 /* CommaListExpression */]: function visitEachChildOfCommaListExpression(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateCommaListExpression( - node, - nodesVisitor(node.elements, visitor, isExpression) - ); - } - }; - } - }); - - // src/compiler/sourcemap.ts - function createSourceMapGenerator(host, file, sourceRoot, sourcesDirectoryPath, generatorOptions) { - var { enter, exit } = generatorOptions.extendedDiagnostics ? createTimer("Source Map", "beforeSourcemap", "afterSourcemap") : nullTimer; - var rawSources = []; - var sources = []; - var sourceToSourceIndexMap = /* @__PURE__ */ new Map(); - var sourcesContent; - var names = []; - var nameToNameIndexMap; - var mappingCharCodes = []; - var mappings = ""; - var lastGeneratedLine = 0; - var lastGeneratedCharacter = 0; - var lastSourceIndex = 0; - var lastSourceLine = 0; - var lastSourceCharacter = 0; - var lastNameIndex = 0; - var hasLast = false; - var pendingGeneratedLine = 0; - var pendingGeneratedCharacter = 0; - var pendingSourceIndex = 0; - var pendingSourceLine = 0; - var pendingSourceCharacter = 0; - var pendingNameIndex = 0; - var hasPending = false; - var hasPendingSource = false; - var hasPendingName = false; - return { - getSources: () => rawSources, - addSource, - setSourceContent, - addName, - addMapping, - appendSourceMap, - toJSON, - toString: () => JSON.stringify(toJSON()) - }; - function addSource(fileName) { - enter(); - const source = getRelativePathToDirectoryOrUrl( - sourcesDirectoryPath, - fileName, - host.getCurrentDirectory(), - host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ - true - ); - let sourceIndex = sourceToSourceIndexMap.get(source); - if (sourceIndex === void 0) { - sourceIndex = sources.length; - sources.push(source); - rawSources.push(fileName); - sourceToSourceIndexMap.set(source, sourceIndex); - } - exit(); - return sourceIndex; - } - function setSourceContent(sourceIndex, content) { - enter(); - if (content !== null) { - if (!sourcesContent) - sourcesContent = []; - while (sourcesContent.length < sourceIndex) { - sourcesContent.push(null); - } - sourcesContent[sourceIndex] = content; - } - exit(); - } - function addName(name) { - enter(); - if (!nameToNameIndexMap) - nameToNameIndexMap = /* @__PURE__ */ new Map(); - let nameIndex = nameToNameIndexMap.get(name); - if (nameIndex === void 0) { - nameIndex = names.length; - names.push(name); - nameToNameIndexMap.set(name, nameIndex); - } - exit(); - return nameIndex; - } - function isNewGeneratedPosition(generatedLine, generatedCharacter) { - return !hasPending || pendingGeneratedLine !== generatedLine || pendingGeneratedCharacter !== generatedCharacter; - } - function isBacktrackingSourcePosition(sourceIndex, sourceLine, sourceCharacter) { - return sourceIndex !== void 0 && sourceLine !== void 0 && sourceCharacter !== void 0 && pendingSourceIndex === sourceIndex && (pendingSourceLine > sourceLine || pendingSourceLine === sourceLine && pendingSourceCharacter > sourceCharacter); - } - function addMapping(generatedLine, generatedCharacter, sourceIndex, sourceLine, sourceCharacter, nameIndex) { - Debug.assert(generatedLine >= pendingGeneratedLine, "generatedLine cannot backtrack"); - Debug.assert(generatedCharacter >= 0, "generatedCharacter cannot be negative"); - Debug.assert(sourceIndex === void 0 || sourceIndex >= 0, "sourceIndex cannot be negative"); - Debug.assert(sourceLine === void 0 || sourceLine >= 0, "sourceLine cannot be negative"); - Debug.assert(sourceCharacter === void 0 || sourceCharacter >= 0, "sourceCharacter cannot be negative"); - enter(); - if (isNewGeneratedPosition(generatedLine, generatedCharacter) || isBacktrackingSourcePosition(sourceIndex, sourceLine, sourceCharacter)) { - commitPendingMapping(); - pendingGeneratedLine = generatedLine; - pendingGeneratedCharacter = generatedCharacter; - hasPendingSource = false; - hasPendingName = false; - hasPending = true; - } - if (sourceIndex !== void 0 && sourceLine !== void 0 && sourceCharacter !== void 0) { - pendingSourceIndex = sourceIndex; - pendingSourceLine = sourceLine; - pendingSourceCharacter = sourceCharacter; - hasPendingSource = true; - if (nameIndex !== void 0) { - pendingNameIndex = nameIndex; - hasPendingName = true; - } - } - exit(); - } - function appendSourceMap(generatedLine, generatedCharacter, map2, sourceMapPath, start, end) { - Debug.assert(generatedLine >= pendingGeneratedLine, "generatedLine cannot backtrack"); - Debug.assert(generatedCharacter >= 0, "generatedCharacter cannot be negative"); - enter(); - const sourceIndexToNewSourceIndexMap = []; - let nameIndexToNewNameIndexMap; - const mappingIterator = decodeMappings(map2.mappings); - for (const raw of mappingIterator) { - if (end && (raw.generatedLine > end.line || raw.generatedLine === end.line && raw.generatedCharacter > end.character)) { - break; - } - if (start && (raw.generatedLine < start.line || start.line === raw.generatedLine && raw.generatedCharacter < start.character)) { - continue; - } - let newSourceIndex; - let newSourceLine; - let newSourceCharacter; - let newNameIndex; - if (raw.sourceIndex !== void 0) { - newSourceIndex = sourceIndexToNewSourceIndexMap[raw.sourceIndex]; - if (newSourceIndex === void 0) { - const rawPath = map2.sources[raw.sourceIndex]; - const relativePath = map2.sourceRoot ? combinePaths(map2.sourceRoot, rawPath) : rawPath; - const combinedPath = combinePaths(getDirectoryPath(sourceMapPath), relativePath); - sourceIndexToNewSourceIndexMap[raw.sourceIndex] = newSourceIndex = addSource(combinedPath); - if (map2.sourcesContent && typeof map2.sourcesContent[raw.sourceIndex] === "string") { - setSourceContent(newSourceIndex, map2.sourcesContent[raw.sourceIndex]); - } - } - newSourceLine = raw.sourceLine; - newSourceCharacter = raw.sourceCharacter; - if (map2.names && raw.nameIndex !== void 0) { - if (!nameIndexToNewNameIndexMap) - nameIndexToNewNameIndexMap = []; - newNameIndex = nameIndexToNewNameIndexMap[raw.nameIndex]; - if (newNameIndex === void 0) { - nameIndexToNewNameIndexMap[raw.nameIndex] = newNameIndex = addName(map2.names[raw.nameIndex]); - } - } - } - const rawGeneratedLine = raw.generatedLine - (start ? start.line : 0); - const newGeneratedLine = rawGeneratedLine + generatedLine; - const rawGeneratedCharacter = start && start.line === raw.generatedLine ? raw.generatedCharacter - start.character : raw.generatedCharacter; - const newGeneratedCharacter = rawGeneratedLine === 0 ? rawGeneratedCharacter + generatedCharacter : rawGeneratedCharacter; - addMapping(newGeneratedLine, newGeneratedCharacter, newSourceIndex, newSourceLine, newSourceCharacter, newNameIndex); - } - exit(); - } - function shouldCommitMapping() { - return !hasLast || lastGeneratedLine !== pendingGeneratedLine || lastGeneratedCharacter !== pendingGeneratedCharacter || lastSourceIndex !== pendingSourceIndex || lastSourceLine !== pendingSourceLine || lastSourceCharacter !== pendingSourceCharacter || lastNameIndex !== pendingNameIndex; - } - function appendMappingCharCode(charCode) { - mappingCharCodes.push(charCode); - if (mappingCharCodes.length >= 1024) { - flushMappingBuffer(); - } - } - function commitPendingMapping() { - if (!hasPending || !shouldCommitMapping()) { - return; - } - enter(); - if (lastGeneratedLine < pendingGeneratedLine) { - do { - appendMappingCharCode(59 /* semicolon */); - lastGeneratedLine++; - } while (lastGeneratedLine < pendingGeneratedLine); - lastGeneratedCharacter = 0; - } else { - Debug.assertEqual(lastGeneratedLine, pendingGeneratedLine, "generatedLine cannot backtrack"); - if (hasLast) { - appendMappingCharCode(44 /* comma */); - } - } - appendBase64VLQ(pendingGeneratedCharacter - lastGeneratedCharacter); - lastGeneratedCharacter = pendingGeneratedCharacter; - if (hasPendingSource) { - appendBase64VLQ(pendingSourceIndex - lastSourceIndex); - lastSourceIndex = pendingSourceIndex; - appendBase64VLQ(pendingSourceLine - lastSourceLine); - lastSourceLine = pendingSourceLine; - appendBase64VLQ(pendingSourceCharacter - lastSourceCharacter); - lastSourceCharacter = pendingSourceCharacter; - if (hasPendingName) { - appendBase64VLQ(pendingNameIndex - lastNameIndex); - lastNameIndex = pendingNameIndex; - } - } - hasLast = true; - exit(); - } - function flushMappingBuffer() { - if (mappingCharCodes.length > 0) { - mappings += String.fromCharCode.apply(void 0, mappingCharCodes); - mappingCharCodes.length = 0; - } - } - function toJSON() { - commitPendingMapping(); - flushMappingBuffer(); - return { - version: 3, - file, - sourceRoot, - sources, - names, - mappings, - sourcesContent - }; - } - function appendBase64VLQ(inValue) { - if (inValue < 0) { - inValue = (-inValue << 1) + 1; - } else { - inValue = inValue << 1; - } - do { - let currentDigit = inValue & 31; - inValue = inValue >> 5; - if (inValue > 0) { - currentDigit = currentDigit | 32; - } - appendMappingCharCode(base64FormatEncode(currentDigit)); - } while (inValue > 0); - } - } - function getLineInfo(text, lineStarts) { - return { - getLineCount: () => lineStarts.length, - getLineText: (line) => text.substring(lineStarts[line], lineStarts[line + 1]) - }; - } - function tryGetSourceMappingURL(lineInfo) { - for (let index = lineInfo.getLineCount() - 1; index >= 0; index--) { - const line = lineInfo.getLineText(index); - const comment = sourceMapCommentRegExp.exec(line); - if (comment) { - return trimStringEnd(comment[1]); - } else if (!line.match(whitespaceOrMapCommentRegExp)) { - break; - } - } - } - function isStringOrNull(x) { - return typeof x === "string" || x === null; - } - function isRawSourceMap(x) { - return x !== null && typeof x === "object" && x.version === 3 && typeof x.file === "string" && typeof x.mappings === "string" && isArray(x.sources) && every(x.sources, isString) && (x.sourceRoot === void 0 || x.sourceRoot === null || typeof x.sourceRoot === "string") && (x.sourcesContent === void 0 || x.sourcesContent === null || isArray(x.sourcesContent) && every(x.sourcesContent, isStringOrNull)) && (x.names === void 0 || x.names === null || isArray(x.names) && every(x.names, isString)); - } - function tryParseRawSourceMap(text) { - try { - const parsed = JSON.parse(text); - if (isRawSourceMap(parsed)) { - return parsed; - } - } catch { - } - return void 0; - } - function decodeMappings(mappings) { - let done = false; - let pos = 0; - let generatedLine = 0; - let generatedCharacter = 0; - let sourceIndex = 0; - let sourceLine = 0; - let sourceCharacter = 0; - let nameIndex = 0; - let error2; - return { - get pos() { - return pos; - }, - get error() { - return error2; - }, - get state() { - return captureMapping( - /*hasSource*/ - true, - /*hasName*/ - true - ); - }, - next() { - while (!done && pos < mappings.length) { - const ch = mappings.charCodeAt(pos); - if (ch === 59 /* semicolon */) { - generatedLine++; - generatedCharacter = 0; - pos++; - continue; - } - if (ch === 44 /* comma */) { - pos++; - continue; - } - let hasSource = false; - let hasName = false; - generatedCharacter += base64VLQFormatDecode(); - if (hasReportedError()) - return stopIterating(); - if (generatedCharacter < 0) - return setErrorAndStopIterating("Invalid generatedCharacter found"); - if (!isSourceMappingSegmentEnd()) { - hasSource = true; - sourceIndex += base64VLQFormatDecode(); - if (hasReportedError()) - return stopIterating(); - if (sourceIndex < 0) - return setErrorAndStopIterating("Invalid sourceIndex found"); - if (isSourceMappingSegmentEnd()) - return setErrorAndStopIterating("Unsupported Format: No entries after sourceIndex"); - sourceLine += base64VLQFormatDecode(); - if (hasReportedError()) - return stopIterating(); - if (sourceLine < 0) - return setErrorAndStopIterating("Invalid sourceLine found"); - if (isSourceMappingSegmentEnd()) - return setErrorAndStopIterating("Unsupported Format: No entries after sourceLine"); - sourceCharacter += base64VLQFormatDecode(); - if (hasReportedError()) - return stopIterating(); - if (sourceCharacter < 0) - return setErrorAndStopIterating("Invalid sourceCharacter found"); - if (!isSourceMappingSegmentEnd()) { - hasName = true; - nameIndex += base64VLQFormatDecode(); - if (hasReportedError()) - return stopIterating(); - if (nameIndex < 0) - return setErrorAndStopIterating("Invalid nameIndex found"); - if (!isSourceMappingSegmentEnd()) - return setErrorAndStopIterating("Unsupported Error Format: Entries after nameIndex"); - } - } - return { value: captureMapping(hasSource, hasName), done }; - } - return stopIterating(); - }, - [Symbol.iterator]() { - return this; - } - }; - function captureMapping(hasSource, hasName) { - return { - generatedLine, - generatedCharacter, - sourceIndex: hasSource ? sourceIndex : void 0, - sourceLine: hasSource ? sourceLine : void 0, - sourceCharacter: hasSource ? sourceCharacter : void 0, - nameIndex: hasName ? nameIndex : void 0 - }; - } - function stopIterating() { - done = true; - return { value: void 0, done: true }; - } - function setError(message) { - if (error2 === void 0) { - error2 = message; - } - } - function setErrorAndStopIterating(message) { - setError(message); - return stopIterating(); - } - function hasReportedError() { - return error2 !== void 0; - } - function isSourceMappingSegmentEnd() { - return pos === mappings.length || mappings.charCodeAt(pos) === 44 /* comma */ || mappings.charCodeAt(pos) === 59 /* semicolon */; - } - function base64VLQFormatDecode() { - let moreDigits = true; - let shiftCount = 0; - let value = 0; - for (; moreDigits; pos++) { - if (pos >= mappings.length) - return setError("Error in decoding base64VLQFormatDecode, past the mapping string"), -1; - const currentByte = base64FormatDecode(mappings.charCodeAt(pos)); - if (currentByte === -1) - return setError("Invalid character in VLQ"), -1; - moreDigits = (currentByte & 32) !== 0; - value = value | (currentByte & 31) << shiftCount; - shiftCount += 5; - } - if ((value & 1) === 0) { - value = value >> 1; - } else { - value = value >> 1; - value = -value; - } - return value; - } - } - function sameMapping(left, right) { - return left === right || left.generatedLine === right.generatedLine && left.generatedCharacter === right.generatedCharacter && left.sourceIndex === right.sourceIndex && left.sourceLine === right.sourceLine && left.sourceCharacter === right.sourceCharacter && left.nameIndex === right.nameIndex; - } - function isSourceMapping(mapping) { - return mapping.sourceIndex !== void 0 && mapping.sourceLine !== void 0 && mapping.sourceCharacter !== void 0; - } - function base64FormatEncode(value) { - return value >= 0 && value < 26 ? 65 /* A */ + value : value >= 26 && value < 52 ? 97 /* a */ + value - 26 : value >= 52 && value < 62 ? 48 /* _0 */ + value - 52 : value === 62 ? 43 /* plus */ : value === 63 ? 47 /* slash */ : Debug.fail(`${value}: not a base64 value`); - } - function base64FormatDecode(ch) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ ? ch - 65 /* A */ : ch >= 97 /* a */ && ch <= 122 /* z */ ? ch - 97 /* a */ + 26 : ch >= 48 /* _0 */ && ch <= 57 /* _9 */ ? ch - 48 /* _0 */ + 52 : ch === 43 /* plus */ ? 62 : ch === 47 /* slash */ ? 63 : -1; - } - function isSourceMappedPosition(value) { - return value.sourceIndex !== void 0 && value.sourcePosition !== void 0; - } - function sameMappedPosition(left, right) { - return left.generatedPosition === right.generatedPosition && left.sourceIndex === right.sourceIndex && left.sourcePosition === right.sourcePosition; - } - function compareSourcePositions(left, right) { - Debug.assert(left.sourceIndex === right.sourceIndex); - return compareValues(left.sourcePosition, right.sourcePosition); - } - function compareGeneratedPositions(left, right) { - return compareValues(left.generatedPosition, right.generatedPosition); - } - function getSourcePositionOfMapping(value) { - return value.sourcePosition; - } - function getGeneratedPositionOfMapping(value) { - return value.generatedPosition; - } - function createDocumentPositionMapper(host, map2, mapPath) { - const mapDirectory = getDirectoryPath(mapPath); - const sourceRoot = map2.sourceRoot ? getNormalizedAbsolutePath(map2.sourceRoot, mapDirectory) : mapDirectory; - const generatedAbsoluteFilePath = getNormalizedAbsolutePath(map2.file, mapDirectory); - const generatedFile = host.getSourceFileLike(generatedAbsoluteFilePath); - const sourceFileAbsolutePaths = map2.sources.map((source) => getNormalizedAbsolutePath(source, sourceRoot)); - const sourceToSourceIndexMap = new Map(sourceFileAbsolutePaths.map((source, i) => [host.getCanonicalFileName(source), i])); - let decodedMappings; - let generatedMappings; - let sourceMappings; - return { - getSourcePosition, - getGeneratedPosition - }; - function processMapping(mapping) { - const generatedPosition = generatedFile !== void 0 ? getPositionOfLineAndCharacter( - generatedFile, - mapping.generatedLine, - mapping.generatedCharacter, - /*allowEdits*/ - true - ) : -1; - let source; - let sourcePosition; - if (isSourceMapping(mapping)) { - const sourceFile = host.getSourceFileLike(sourceFileAbsolutePaths[mapping.sourceIndex]); - source = map2.sources[mapping.sourceIndex]; - sourcePosition = sourceFile !== void 0 ? getPositionOfLineAndCharacter( - sourceFile, - mapping.sourceLine, - mapping.sourceCharacter, - /*allowEdits*/ - true - ) : -1; - } - return { - generatedPosition, - source, - sourceIndex: mapping.sourceIndex, - sourcePosition, - nameIndex: mapping.nameIndex - }; - } - function getDecodedMappings() { - if (decodedMappings === void 0) { - const decoder = decodeMappings(map2.mappings); - const mappings = arrayFrom(decoder, processMapping); - if (decoder.error !== void 0) { - if (host.log) { - host.log(`Encountered error while decoding sourcemap: ${decoder.error}`); - } - decodedMappings = emptyArray; - } else { - decodedMappings = mappings; - } - } - return decodedMappings; - } - function getSourceMappings(sourceIndex) { - if (sourceMappings === void 0) { - const lists = []; - for (const mapping of getDecodedMappings()) { - if (!isSourceMappedPosition(mapping)) - continue; - let list = lists[mapping.sourceIndex]; - if (!list) - lists[mapping.sourceIndex] = list = []; - list.push(mapping); - } - sourceMappings = lists.map((list) => sortAndDeduplicate(list, compareSourcePositions, sameMappedPosition)); - } - return sourceMappings[sourceIndex]; - } - function getGeneratedMappings() { - if (generatedMappings === void 0) { - const list = []; - for (const mapping of getDecodedMappings()) { - list.push(mapping); - } - generatedMappings = sortAndDeduplicate(list, compareGeneratedPositions, sameMappedPosition); - } - return generatedMappings; - } - function getGeneratedPosition(loc) { - const sourceIndex = sourceToSourceIndexMap.get(host.getCanonicalFileName(loc.fileName)); - if (sourceIndex === void 0) - return loc; - const sourceMappings2 = getSourceMappings(sourceIndex); - if (!some(sourceMappings2)) - return loc; - let targetIndex = binarySearchKey(sourceMappings2, loc.pos, getSourcePositionOfMapping, compareValues); - if (targetIndex < 0) { - targetIndex = ~targetIndex; - } - const mapping = sourceMappings2[targetIndex]; - if (mapping === void 0 || mapping.sourceIndex !== sourceIndex) { - return loc; - } - return { fileName: generatedAbsoluteFilePath, pos: mapping.generatedPosition }; - } - function getSourcePosition(loc) { - const generatedMappings2 = getGeneratedMappings(); - if (!some(generatedMappings2)) - return loc; - let targetIndex = binarySearchKey(generatedMappings2, loc.pos, getGeneratedPositionOfMapping, compareValues); - if (targetIndex < 0) { - targetIndex = ~targetIndex; - } - const mapping = generatedMappings2[targetIndex]; - if (mapping === void 0 || !isSourceMappedPosition(mapping)) { - return loc; - } - return { fileName: sourceFileAbsolutePaths[mapping.sourceIndex], pos: mapping.sourcePosition }; - } - } - var sourceMapCommentRegExpDontCareLineStart, sourceMapCommentRegExp, whitespaceOrMapCommentRegExp, identitySourceMapConsumer; - var init_sourcemap = __esm({ - "src/compiler/sourcemap.ts"() { - "use strict"; - init_ts2(); - init_ts_performance(); - sourceMapCommentRegExpDontCareLineStart = /\/\/[@#] source[M]appingURL=(.+)\r?\n?$/; - sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/; - whitespaceOrMapCommentRegExp = /^\s*(\/\/[@#] .*)?$/; - identitySourceMapConsumer = { - getSourcePosition: identity, - getGeneratedPosition: identity - }; - } - }); - - // src/compiler/transformers/utilities.ts - function getOriginalNodeId(node) { - node = getOriginalNode(node); - return node ? getNodeId(node) : 0; - } - function containsDefaultReference(node) { - if (!node) - return false; - if (!isNamedImports(node)) - return false; - return some(node.elements, isNamedDefaultReference); - } - function isNamedDefaultReference(e) { - return e.propertyName !== void 0 && e.propertyName.escapedText === "default" /* Default */; - } - function chainBundle(context, transformSourceFile) { - return transformSourceFileOrBundle; - function transformSourceFileOrBundle(node) { - return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); - } - function transformBundle(node) { - return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); - } - } - function getExportNeedsImportStarHelper(node) { - return !!getNamespaceDeclarationNode(node); - } - function getImportNeedsImportStarHelper(node) { - if (!!getNamespaceDeclarationNode(node)) { - return true; - } - const bindings = node.importClause && node.importClause.namedBindings; - if (!bindings) { - return false; - } - if (!isNamedImports(bindings)) - return false; - let defaultRefCount = 0; - for (const binding of bindings.elements) { - if (isNamedDefaultReference(binding)) { - defaultRefCount++; - } - } - return defaultRefCount > 0 && defaultRefCount !== bindings.elements.length || !!(bindings.elements.length - defaultRefCount) && isDefaultImport(node); - } - function getImportNeedsImportDefaultHelper(node) { - return !getImportNeedsImportStarHelper(node) && (isDefaultImport(node) || !!node.importClause && isNamedImports(node.importClause.namedBindings) && containsDefaultReference(node.importClause.namedBindings)); - } - function collectExternalModuleInfo(context, sourceFile) { - const resolver = context.getEmitResolver(); - const compilerOptions = context.getCompilerOptions(); - const externalImports = []; - const exportSpecifiers = new IdentifierNameMultiMap(); - const exportedBindings = []; - const uniqueExports = /* @__PURE__ */ new Map(); - let exportedNames; - let hasExportDefault = false; - let exportEquals; - let hasExportStarsToExportValues = false; - let hasImportStar = false; - let hasImportDefault = false; - for (const node of sourceFile.statements) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - externalImports.push(node); - if (!hasImportStar && getImportNeedsImportStarHelper(node)) { - hasImportStar = true; - } - if (!hasImportDefault && getImportNeedsImportDefaultHelper(node)) { - hasImportDefault = true; - } - break; - case 271 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 283 /* ExternalModuleReference */) { - externalImports.push(node); - } - break; - case 278 /* ExportDeclaration */: - if (node.moduleSpecifier) { - if (!node.exportClause) { - externalImports.push(node); - hasExportStarsToExportValues = true; - } else { - externalImports.push(node); - if (isNamedExports(node.exportClause)) { - addExportedNamesForExportDeclaration(node); - } else { - const name = node.exportClause.name; - if (!uniqueExports.get(idText(name))) { - multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name); - uniqueExports.set(idText(name), true); - exportedNames = append(exportedNames, name); - } - hasImportStar = true; - } - } - } else { - addExportedNamesForExportDeclaration(node); - } - break; - case 277 /* ExportAssignment */: - if (node.isExportEquals && !exportEquals) { - exportEquals = node; - } - break; - case 243 /* VariableStatement */: - if (hasSyntacticModifier(node, 1 /* Export */)) { - for (const decl of node.declarationList.declarations) { - exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings); - } - } - break; - case 262 /* FunctionDeclaration */: - if (hasSyntacticModifier(node, 1 /* Export */)) { - if (hasSyntacticModifier(node, 1024 /* Default */)) { - if (!hasExportDefault) { - multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node)); - hasExportDefault = true; - } - } else { - const name = node.name; - if (!uniqueExports.get(idText(name))) { - multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name); - uniqueExports.set(idText(name), true); - exportedNames = append(exportedNames, name); - } - } - } - break; - case 263 /* ClassDeclaration */: - if (hasSyntacticModifier(node, 1 /* Export */)) { - if (hasSyntacticModifier(node, 1024 /* Default */)) { - if (!hasExportDefault) { - multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node)); - hasExportDefault = true; - } - } else { - const name = node.name; - if (name && !uniqueExports.get(idText(name))) { - multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), name); - uniqueExports.set(idText(name), true); - exportedNames = append(exportedNames, name); - } - } - } - break; - } - } - const externalHelpersImportDeclaration = createExternalHelpersImportDeclarationIfNeeded(context.factory, context.getEmitHelperFactory(), sourceFile, compilerOptions, hasExportStarsToExportValues, hasImportStar, hasImportDefault); - if (externalHelpersImportDeclaration) { - externalImports.unshift(externalHelpersImportDeclaration); - } - return { externalImports, exportSpecifiers, exportEquals, hasExportStarsToExportValues, exportedBindings, exportedNames, externalHelpersImportDeclaration }; - function addExportedNamesForExportDeclaration(node) { - for (const specifier of cast(node.exportClause, isNamedExports).elements) { - if (!uniqueExports.get(idText(specifier.name))) { - const name = specifier.propertyName || specifier.name; - if (!node.moduleSpecifier) { - exportSpecifiers.add(name, specifier); - } - const decl = resolver.getReferencedImportDeclaration(name) || resolver.getReferencedValueDeclaration(name); - if (decl) { - multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(decl), specifier.name); - } - uniqueExports.set(idText(specifier.name), true); - exportedNames = append(exportedNames, specifier.name); - } - } - } - } - function collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings) { - if (isBindingPattern(decl.name)) { - for (const element of decl.name.elements) { - if (!isOmittedExpression(element)) { - exportedNames = collectExportedVariableInfo(element, uniqueExports, exportedNames, exportedBindings); - } - } - } else if (!isGeneratedIdentifier(decl.name)) { - const text = idText(decl.name); - if (!uniqueExports.get(text)) { - uniqueExports.set(text, true); - exportedNames = append(exportedNames, decl.name); - if (isLocalName(decl.name)) { - multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(decl), decl.name); - } - } - } - return exportedNames; - } - function multiMapSparseArrayAdd(map2, key, value) { - let values = map2[key]; - if (values) { - values.push(value); - } else { - map2[key] = values = [value]; - } - return values; - } - function isSimpleCopiableExpression(expression) { - return isStringLiteralLike(expression) || expression.kind === 9 /* NumericLiteral */ || isKeyword(expression.kind) || isIdentifier(expression); - } - function isSimpleInlineableExpression(expression) { - return !isIdentifier(expression) && isSimpleCopiableExpression(expression); - } - function isCompoundAssignment(kind) { - return kind >= 65 /* FirstCompoundAssignment */ && kind <= 79 /* LastCompoundAssignment */; - } - function getNonAssignmentOperatorForCompoundAssignment(kind) { - switch (kind) { - case 65 /* PlusEqualsToken */: - return 40 /* PlusToken */; - case 66 /* MinusEqualsToken */: - return 41 /* MinusToken */; - case 67 /* AsteriskEqualsToken */: - return 42 /* AsteriskToken */; - case 68 /* AsteriskAsteriskEqualsToken */: - return 43 /* AsteriskAsteriskToken */; - case 69 /* SlashEqualsToken */: - return 44 /* SlashToken */; - case 70 /* PercentEqualsToken */: - return 45 /* PercentToken */; - case 71 /* LessThanLessThanEqualsToken */: - return 48 /* LessThanLessThanToken */; - case 72 /* GreaterThanGreaterThanEqualsToken */: - return 49 /* GreaterThanGreaterThanToken */; - case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - return 50 /* GreaterThanGreaterThanGreaterThanToken */; - case 74 /* AmpersandEqualsToken */: - return 51 /* AmpersandToken */; - case 75 /* BarEqualsToken */: - return 52 /* BarToken */; - case 79 /* CaretEqualsToken */: - return 53 /* CaretToken */; - case 76 /* BarBarEqualsToken */: - return 57 /* BarBarToken */; - case 77 /* AmpersandAmpersandEqualsToken */: - return 56 /* AmpersandAmpersandToken */; - case 78 /* QuestionQuestionEqualsToken */: - return 61 /* QuestionQuestionToken */; - } - } - function getSuperCallFromStatement(statement) { - if (!isExpressionStatement(statement)) { - return void 0; - } - const expression = skipParentheses(statement.expression); - return isSuperCall(expression) ? expression : void 0; - } - function findSuperStatementIndexPathWorker(statements, start, indices) { - for (let i = start; i < statements.length; i += 1) { - const statement = statements[i]; - if (getSuperCallFromStatement(statement)) { - indices.unshift(i); - return true; - } else if (isTryStatement(statement) && findSuperStatementIndexPathWorker(statement.tryBlock.statements, 0, indices)) { - indices.unshift(i); - return true; - } - } - return false; - } - function findSuperStatementIndexPath(statements, start) { - const indices = []; - findSuperStatementIndexPathWorker(statements, start, indices); - return indices; - } - function getProperties(node, requireInitializer, isStatic2) { - return filter(node.members, (m) => isInitializedOrStaticProperty(m, requireInitializer, isStatic2)); - } - function isStaticPropertyDeclarationOrClassStaticBlockDeclaration(element) { - return isStaticPropertyDeclaration(element) || isClassStaticBlockDeclaration(element); - } - function getStaticPropertiesAndClassStaticBlock(node) { - return filter(node.members, isStaticPropertyDeclarationOrClassStaticBlockDeclaration); - } - function isInitializedOrStaticProperty(member, requireInitializer, isStatic2) { - return isPropertyDeclaration(member) && (!!member.initializer || !requireInitializer) && hasStaticModifier(member) === isStatic2; - } - function isStaticPropertyDeclaration(member) { - return isPropertyDeclaration(member) && hasStaticModifier(member); - } - function isInitializedProperty(member) { - return member.kind === 172 /* PropertyDeclaration */ && member.initializer !== void 0; - } - function isNonStaticMethodOrAccessorWithPrivateName(member) { - return !isStatic(member) && (isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member)) && isPrivateIdentifier(member.name); - } - function getDecoratorsOfParameters(node) { - let decorators; - if (node) { - const parameters = node.parameters; - const firstParameterIsThis = parameters.length > 0 && parameterIsThisKeyword(parameters[0]); - const firstParameterOffset = firstParameterIsThis ? 1 : 0; - const numParameters = firstParameterIsThis ? parameters.length - 1 : parameters.length; - for (let i = 0; i < numParameters; i++) { - const parameter = parameters[i + firstParameterOffset]; - if (decorators || hasDecorators(parameter)) { - if (!decorators) { - decorators = new Array(numParameters); - } - decorators[i] = getDecorators(parameter); - } - } - } - return decorators; - } - function getAllDecoratorsOfClass(node) { - const decorators = getDecorators(node); - const parameters = getDecoratorsOfParameters(getFirstConstructorWithBody(node)); - if (!some(decorators) && !some(parameters)) { - return void 0; - } - return { - decorators, - parameters - }; - } - function getAllDecoratorsOfClassElement(member, parent2, useLegacyDecorators) { - switch (member.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - if (!useLegacyDecorators) { - return getAllDecoratorsOfMethod(member); - } - return getAllDecoratorsOfAccessors(member, parent2); - case 174 /* MethodDeclaration */: - return getAllDecoratorsOfMethod(member); - case 172 /* PropertyDeclaration */: - return getAllDecoratorsOfProperty(member); - default: - return void 0; - } - } - function getAllDecoratorsOfAccessors(accessor, parent2) { - if (!accessor.body) { - return void 0; - } - const { firstAccessor, secondAccessor, getAccessor, setAccessor } = getAllAccessorDeclarations(parent2.members, accessor); - const firstAccessorWithDecorators = hasDecorators(firstAccessor) ? firstAccessor : secondAccessor && hasDecorators(secondAccessor) ? secondAccessor : void 0; - if (!firstAccessorWithDecorators || accessor !== firstAccessorWithDecorators) { - return void 0; - } - const decorators = getDecorators(firstAccessorWithDecorators); - const parameters = getDecoratorsOfParameters(setAccessor); - if (!some(decorators) && !some(parameters)) { - return void 0; - } - return { - decorators, - parameters, - getDecorators: getAccessor && getDecorators(getAccessor), - setDecorators: setAccessor && getDecorators(setAccessor) - }; - } - function getAllDecoratorsOfMethod(method) { - if (!method.body) { - return void 0; - } - const decorators = getDecorators(method); - const parameters = getDecoratorsOfParameters(method); - if (!some(decorators) && !some(parameters)) { - return void 0; - } - return { decorators, parameters }; - } - function getAllDecoratorsOfProperty(property) { - const decorators = getDecorators(property); - if (!some(decorators)) { - return void 0; - } - return { decorators }; - } - function walkUpLexicalEnvironments(env, cb) { - while (env) { - const result = cb(env); - if (result !== void 0) - return result; - env = env.previous; - } - } - function newPrivateEnvironment(data) { - return { data }; - } - function getPrivateIdentifier(privateEnv, name) { - var _a, _b; - return isGeneratedPrivateIdentifier(name) ? (_a = privateEnv == null ? void 0 : privateEnv.generatedIdentifiers) == null ? void 0 : _a.get(getNodeForGeneratedName(name)) : (_b = privateEnv == null ? void 0 : privateEnv.identifiers) == null ? void 0 : _b.get(name.escapedText); - } - function setPrivateIdentifier(privateEnv, name, entry) { - if (isGeneratedPrivateIdentifier(name)) { - privateEnv.generatedIdentifiers ?? (privateEnv.generatedIdentifiers = /* @__PURE__ */ new Map()); - privateEnv.generatedIdentifiers.set(getNodeForGeneratedName(name), entry); - } else { - privateEnv.identifiers ?? (privateEnv.identifiers = /* @__PURE__ */ new Map()); - privateEnv.identifiers.set(name.escapedText, entry); - } - } - function accessPrivateIdentifier(env, name) { - return walkUpLexicalEnvironments(env, (env2) => getPrivateIdentifier(env2.privateEnv, name)); - } - var IdentifierNameMap, IdentifierNameMultiMap; - var init_utilities3 = __esm({ - "src/compiler/transformers/utilities.ts"() { - "use strict"; - init_ts2(); - IdentifierNameMap = class _IdentifierNameMap { - constructor() { - this._map = /* @__PURE__ */ new Map(); - } - get size() { - return this._map.size; - } - has(key) { - return this._map.has(_IdentifierNameMap.toKey(key)); - } - get(key) { - return this._map.get(_IdentifierNameMap.toKey(key)); - } - set(key, value) { - this._map.set(_IdentifierNameMap.toKey(key), value); - return this; - } - delete(key) { - var _a; - return ((_a = this._map) == null ? void 0 : _a.delete(_IdentifierNameMap.toKey(key))) ?? false; - } - clear() { - this._map.clear(); - } - values() { - return this._map.values(); - } - static toKey(name) { - if (isGeneratedPrivateIdentifier(name) || isGeneratedIdentifier(name)) { - const autoGenerate = name.emitNode.autoGenerate; - if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) { - const node = getNodeForGeneratedName(name); - const baseName = isMemberName(node) && node !== name ? _IdentifierNameMap.toKey(node) : `(generated@${getNodeId(node)})`; - return formatGeneratedName( - /*privateName*/ - false, - autoGenerate.prefix, - baseName, - autoGenerate.suffix, - _IdentifierNameMap.toKey - ); - } else { - const baseName = `(auto@${autoGenerate.id})`; - return formatGeneratedName( - /*privateName*/ - false, - autoGenerate.prefix, - baseName, - autoGenerate.suffix, - _IdentifierNameMap.toKey - ); - } - } - if (isPrivateIdentifier(name)) { - return idText(name).slice(1); - } - return idText(name); - } - }; - IdentifierNameMultiMap = class extends IdentifierNameMap { - add(key, value) { - let values = this.get(key); - if (values) { - values.push(value); - } else { - this.set(key, values = [value]); - } - return values; - } - remove(key, value) { - const values = this.get(key); - if (values) { - unorderedRemoveItem(values, value); - if (!values.length) { - this.delete(key); - } - } - } - }; - } - }); - - // src/compiler/transformers/destructuring.ts - function flattenDestructuringAssignment(node, visitor, context, level, needsValue, createAssignmentCallback) { - let location = node; - let value; - if (isDestructuringAssignment(node)) { - value = node.right; - while (isEmptyArrayLiteral(node.left) || isEmptyObjectLiteral(node.left)) { - if (isDestructuringAssignment(value)) { - location = node = value; - value = node.right; - } else { - return Debug.checkDefined(visitNode(value, visitor, isExpression)); - } - } - } - let expressions; - const flattenContext = { - context, - level, - downlevelIteration: !!context.getCompilerOptions().downlevelIteration, - hoistTempVariables: true, - emitExpression, - emitBindingOrAssignment, - createArrayBindingOrAssignmentPattern: (elements) => makeArrayAssignmentPattern(context.factory, elements), - createObjectBindingOrAssignmentPattern: (elements) => makeObjectAssignmentPattern(context.factory, elements), - createArrayBindingOrAssignmentElement: makeAssignmentElement, - visitor - }; - if (value) { - value = visitNode(value, visitor, isExpression); - Debug.assert(value); - if (isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node)) { - value = ensureIdentifier( - flattenContext, - value, - /*reuseIdentifierExpressions*/ - false, - location - ); - } else if (needsValue) { - value = ensureIdentifier( - flattenContext, - value, - /*reuseIdentifierExpressions*/ - true, - location - ); - } else if (nodeIsSynthesized(node)) { - location = value; - } - } - flattenBindingOrAssignmentElement( - flattenContext, - node, - value, - location, - /*skipInitializer*/ - isDestructuringAssignment(node) - ); - if (value && needsValue) { - if (!some(expressions)) { - return value; - } - expressions.push(value); - } - return context.factory.inlineExpressions(expressions) || context.factory.createOmittedExpression(); - function emitExpression(expression) { - expressions = append(expressions, expression); - } - function emitBindingOrAssignment(target, value2, location2, original) { - Debug.assertNode(target, createAssignmentCallback ? isIdentifier : isExpression); - const expression = createAssignmentCallback ? createAssignmentCallback(target, value2, location2) : setTextRange( - context.factory.createAssignment(Debug.checkDefined(visitNode(target, visitor, isExpression)), value2), - location2 - ); - expression.original = original; - emitExpression(expression); - } - } - function bindingOrAssignmentElementAssignsToName(element, escapedName) { - const target = getTargetOfBindingOrAssignmentElement(element); - if (isBindingOrAssignmentPattern(target)) { - return bindingOrAssignmentPatternAssignsToName(target, escapedName); - } else if (isIdentifier(target)) { - return target.escapedText === escapedName; - } - return false; - } - function bindingOrAssignmentPatternAssignsToName(pattern, escapedName) { - const elements = getElementsOfBindingOrAssignmentPattern(pattern); - for (const element of elements) { - if (bindingOrAssignmentElementAssignsToName(element, escapedName)) { - return true; - } - } - return false; - } - function bindingOrAssignmentElementContainsNonLiteralComputedName(element) { - const propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(element); - if (propertyName && isComputedPropertyName(propertyName) && !isLiteralExpression(propertyName.expression)) { - return true; - } - const target = getTargetOfBindingOrAssignmentElement(element); - return !!target && isBindingOrAssignmentPattern(target) && bindingOrAssignmentPatternContainsNonLiteralComputedName(target); - } - function bindingOrAssignmentPatternContainsNonLiteralComputedName(pattern) { - return !!forEach(getElementsOfBindingOrAssignmentPattern(pattern), bindingOrAssignmentElementContainsNonLiteralComputedName); - } - function flattenDestructuringBinding(node, visitor, context, level, rval, hoistTempVariables = false, skipInitializer) { - let pendingExpressions; - const pendingDeclarations = []; - const declarations = []; - const flattenContext = { - context, - level, - downlevelIteration: !!context.getCompilerOptions().downlevelIteration, - hoistTempVariables, - emitExpression, - emitBindingOrAssignment, - createArrayBindingOrAssignmentPattern: (elements) => makeArrayBindingPattern(context.factory, elements), - createObjectBindingOrAssignmentPattern: (elements) => makeObjectBindingPattern(context.factory, elements), - createArrayBindingOrAssignmentElement: (name) => makeBindingElement(context.factory, name), - visitor - }; - if (isVariableDeclaration(node)) { - let initializer = getInitializerOfBindingOrAssignmentElement(node); - if (initializer && (isIdentifier(initializer) && bindingOrAssignmentElementAssignsToName(node, initializer.escapedText) || bindingOrAssignmentElementContainsNonLiteralComputedName(node))) { - initializer = ensureIdentifier( - flattenContext, - Debug.checkDefined(visitNode(initializer, flattenContext.visitor, isExpression)), - /*reuseIdentifierExpressions*/ - false, - initializer - ); - node = context.factory.updateVariableDeclaration( - node, - node.name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ); - } - } - flattenBindingOrAssignmentElement(flattenContext, node, rval, node, skipInitializer); - if (pendingExpressions) { - const temp = context.factory.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - if (hoistTempVariables) { - const value = context.factory.inlineExpressions(pendingExpressions); - pendingExpressions = void 0; - emitBindingOrAssignment( - temp, - value, - /*location*/ - void 0, - /*original*/ - void 0 - ); - } else { - context.hoistVariableDeclaration(temp); - const pendingDeclaration = last(pendingDeclarations); - pendingDeclaration.pendingExpressions = append( - pendingDeclaration.pendingExpressions, - context.factory.createAssignment(temp, pendingDeclaration.value) - ); - addRange(pendingDeclaration.pendingExpressions, pendingExpressions); - pendingDeclaration.value = temp; - } - } - for (const { pendingExpressions: pendingExpressions2, name, value, location, original } of pendingDeclarations) { - const variable = context.factory.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - pendingExpressions2 ? context.factory.inlineExpressions(append(pendingExpressions2, value)) : value - ); - variable.original = original; - setTextRange(variable, location); - declarations.push(variable); - } - return declarations; - function emitExpression(value) { - pendingExpressions = append(pendingExpressions, value); - } - function emitBindingOrAssignment(target, value, location, original) { - Debug.assertNode(target, isBindingName); - if (pendingExpressions) { - value = context.factory.inlineExpressions(append(pendingExpressions, value)); - pendingExpressions = void 0; - } - pendingDeclarations.push({ pendingExpressions, name: target, value, location, original }); - } - } - function flattenBindingOrAssignmentElement(flattenContext, element, value, location, skipInitializer) { - const bindingTarget = getTargetOfBindingOrAssignmentElement(element); - if (!skipInitializer) { - const initializer = visitNode(getInitializerOfBindingOrAssignmentElement(element), flattenContext.visitor, isExpression); - if (initializer) { - if (value) { - value = createDefaultValueCheck(flattenContext, value, initializer, location); - if (!isSimpleInlineableExpression(initializer) && isBindingOrAssignmentPattern(bindingTarget)) { - value = ensureIdentifier( - flattenContext, - value, - /*reuseIdentifierExpressions*/ - true, - location - ); - } - } else { - value = initializer; - } - } else if (!value) { - value = flattenContext.context.factory.createVoidZero(); - } - } - if (isObjectBindingOrAssignmentPattern(bindingTarget)) { - flattenObjectBindingOrAssignmentPattern(flattenContext, element, bindingTarget, value, location); - } else if (isArrayBindingOrAssignmentPattern(bindingTarget)) { - flattenArrayBindingOrAssignmentPattern(flattenContext, element, bindingTarget, value, location); - } else { - flattenContext.emitBindingOrAssignment( - bindingTarget, - value, - location, - /*original*/ - element - ); - } - } - function flattenObjectBindingOrAssignmentPattern(flattenContext, parent2, pattern, value, location) { - const elements = getElementsOfBindingOrAssignmentPattern(pattern); - const numElements = elements.length; - if (numElements !== 1) { - const reuseIdentifierExpressions = !isDeclarationBindingElement(parent2) || numElements !== 0; - value = ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location); - } - let bindingElements; - let computedTempVariables; - for (let i = 0; i < numElements; i++) { - const element = elements[i]; - if (!getRestIndicatorOfBindingOrAssignmentElement(element)) { - const propertyName = getPropertyNameOfBindingOrAssignmentElement(element); - if (flattenContext.level >= 1 /* ObjectRest */ && !(element.transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !(getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* ContainsRestOrSpread */ | 65536 /* ContainsObjectRestOrSpread */)) && !isComputedPropertyName(propertyName)) { - bindingElements = append(bindingElements, visitNode(element, flattenContext.visitor, isBindingOrAssignmentElement)); - } else { - if (bindingElements) { - flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern); - bindingElements = void 0; - } - const rhsValue = createDestructuringPropertyAccess(flattenContext, value, propertyName); - if (isComputedPropertyName(propertyName)) { - computedTempVariables = append(computedTempVariables, rhsValue.argumentExpression); - } - flattenBindingOrAssignmentElement( - flattenContext, - element, - rhsValue, - /*location*/ - element - ); - } - } else if (i === numElements - 1) { - if (bindingElements) { - flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern); - bindingElements = void 0; - } - const rhsValue = flattenContext.context.getEmitHelperFactory().createRestHelper(value, elements, computedTempVariables, pattern); - flattenBindingOrAssignmentElement(flattenContext, element, rhsValue, element); - } - } - if (bindingElements) { - flattenContext.emitBindingOrAssignment(flattenContext.createObjectBindingOrAssignmentPattern(bindingElements), value, location, pattern); - } - } - function flattenArrayBindingOrAssignmentPattern(flattenContext, parent2, pattern, value, location) { - const elements = getElementsOfBindingOrAssignmentPattern(pattern); - const numElements = elements.length; - if (flattenContext.level < 1 /* ObjectRest */ && flattenContext.downlevelIteration) { - value = ensureIdentifier( - flattenContext, - setTextRange( - flattenContext.context.getEmitHelperFactory().createReadHelper( - value, - numElements > 0 && getRestIndicatorOfBindingOrAssignmentElement(elements[numElements - 1]) ? void 0 : numElements - ), - location - ), - /*reuseIdentifierExpressions*/ - false, - location - ); - } else if (numElements !== 1 && (flattenContext.level < 1 /* ObjectRest */ || numElements === 0) || every(elements, isOmittedExpression)) { - const reuseIdentifierExpressions = !isDeclarationBindingElement(parent2) || numElements !== 0; - value = ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location); - } - let bindingElements; - let restContainingElements; - for (let i = 0; i < numElements; i++) { - const element = elements[i]; - if (flattenContext.level >= 1 /* ObjectRest */) { - if (element.transformFlags & 65536 /* ContainsObjectRestOrSpread */ || flattenContext.hasTransformedPriorElement && !isSimpleBindingOrAssignmentElement(element)) { - flattenContext.hasTransformedPriorElement = true; - const temp = flattenContext.context.factory.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - if (flattenContext.hoistTempVariables) { - flattenContext.context.hoistVariableDeclaration(temp); - } - restContainingElements = append(restContainingElements, [temp, element]); - bindingElements = append(bindingElements, flattenContext.createArrayBindingOrAssignmentElement(temp)); - } else { - bindingElements = append(bindingElements, element); - } - } else if (isOmittedExpression(element)) { - continue; - } else if (!getRestIndicatorOfBindingOrAssignmentElement(element)) { - const rhsValue = flattenContext.context.factory.createElementAccessExpression(value, i); - flattenBindingOrAssignmentElement( - flattenContext, - element, - rhsValue, - /*location*/ - element - ); - } else if (i === numElements - 1) { - const rhsValue = flattenContext.context.factory.createArraySliceCall(value, i); - flattenBindingOrAssignmentElement( - flattenContext, - element, - rhsValue, - /*location*/ - element - ); - } - } - if (bindingElements) { - flattenContext.emitBindingOrAssignment(flattenContext.createArrayBindingOrAssignmentPattern(bindingElements), value, location, pattern); - } - if (restContainingElements) { - for (const [id, element] of restContainingElements) { - flattenBindingOrAssignmentElement(flattenContext, element, id, element); - } - } - } - function isSimpleBindingOrAssignmentElement(element) { - const target = getTargetOfBindingOrAssignmentElement(element); - if (!target || isOmittedExpression(target)) - return true; - const propertyName = tryGetPropertyNameOfBindingOrAssignmentElement(element); - if (propertyName && !isPropertyNameLiteral(propertyName)) - return false; - const initializer = getInitializerOfBindingOrAssignmentElement(element); - if (initializer && !isSimpleInlineableExpression(initializer)) - return false; - if (isBindingOrAssignmentPattern(target)) - return every(getElementsOfBindingOrAssignmentPattern(target), isSimpleBindingOrAssignmentElement); - return isIdentifier(target); - } - function createDefaultValueCheck(flattenContext, value, defaultValue, location) { - value = ensureIdentifier( - flattenContext, - value, - /*reuseIdentifierExpressions*/ - true, - location - ); - return flattenContext.context.factory.createConditionalExpression( - flattenContext.context.factory.createTypeCheck(value, "undefined"), - /*questionToken*/ - void 0, - defaultValue, - /*colonToken*/ - void 0, - value - ); - } - function createDestructuringPropertyAccess(flattenContext, value, propertyName) { - const { factory: factory2 } = flattenContext.context; - if (isComputedPropertyName(propertyName)) { - const argumentExpression = ensureIdentifier( - flattenContext, - Debug.checkDefined(visitNode(propertyName.expression, flattenContext.visitor, isExpression)), - /*reuseIdentifierExpressions*/ - false, - /*location*/ - propertyName - ); - return flattenContext.context.factory.createElementAccessExpression(value, argumentExpression); - } else if (isStringOrNumericLiteralLike(propertyName)) { - const argumentExpression = factory2.cloneNode(propertyName); - return flattenContext.context.factory.createElementAccessExpression(value, argumentExpression); - } else { - const name = flattenContext.context.factory.createIdentifier(idText(propertyName)); - return flattenContext.context.factory.createPropertyAccessExpression(value, name); - } - } - function ensureIdentifier(flattenContext, value, reuseIdentifierExpressions, location) { - if (isIdentifier(value) && reuseIdentifierExpressions) { - return value; - } else { - const temp = flattenContext.context.factory.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - if (flattenContext.hoistTempVariables) { - flattenContext.context.hoistVariableDeclaration(temp); - flattenContext.emitExpression(setTextRange(flattenContext.context.factory.createAssignment(temp, value), location)); - } else { - flattenContext.emitBindingOrAssignment( - temp, - value, - location, - /*original*/ - void 0 - ); - } - return temp; - } - } - function makeArrayBindingPattern(factory2, elements) { - Debug.assertEachNode(elements, isArrayBindingElement); - return factory2.createArrayBindingPattern(elements); - } - function makeArrayAssignmentPattern(factory2, elements) { - Debug.assertEachNode(elements, isArrayBindingOrAssignmentElement); - return factory2.createArrayLiteralExpression(map(elements, factory2.converters.convertToArrayAssignmentElement)); - } - function makeObjectBindingPattern(factory2, elements) { - Debug.assertEachNode(elements, isBindingElement); - return factory2.createObjectBindingPattern(elements); - } - function makeObjectAssignmentPattern(factory2, elements) { - Debug.assertEachNode(elements, isObjectBindingOrAssignmentElement); - return factory2.createObjectLiteralExpression(map(elements, factory2.converters.convertToObjectAssignmentElement)); - } - function makeBindingElement(factory2, name) { - return factory2.createBindingElement( - /*dotDotDotToken*/ - void 0, - /*propertyName*/ - void 0, - name - ); - } - function makeAssignmentElement(name) { - return name; - } - var FlattenLevel; - var init_destructuring = __esm({ - "src/compiler/transformers/destructuring.ts"() { - "use strict"; - init_ts2(); - FlattenLevel = /* @__PURE__ */ ((FlattenLevel2) => { - FlattenLevel2[FlattenLevel2["All"] = 0] = "All"; - FlattenLevel2[FlattenLevel2["ObjectRest"] = 1] = "ObjectRest"; - return FlattenLevel2; - })(FlattenLevel || {}); - } - }); - - // src/compiler/transformers/classThis.ts - function createClassThisAssignmentBlock(factory2, classThis, thisExpression = factory2.createThis()) { - const expression = factory2.createAssignment(classThis, thisExpression); - const statement = factory2.createExpressionStatement(expression); - const body = factory2.createBlock( - [statement], - /*multiLine*/ - false - ); - const block = factory2.createClassStaticBlockDeclaration(body); - getOrCreateEmitNode(block).classThis = classThis; - return block; - } - function isClassThisAssignmentBlock(node) { - var _a; - if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { - return false; - } - const statement = node.body.statements[0]; - return isExpressionStatement(statement) && isAssignmentExpression( - statement.expression, - /*excludeCompoundAssignment*/ - true - ) && isIdentifier(statement.expression.left) && ((_a = node.emitNode) == null ? void 0 : _a.classThis) === statement.expression.left && statement.expression.right.kind === 110 /* ThisKeyword */; - } - function classHasClassThisAssignment(node) { - var _a; - return !!((_a = node.emitNode) == null ? void 0 : _a.classThis) && some(node.members, isClassThisAssignmentBlock); - } - function injectClassThisAssignmentIfMissing(factory2, node, classThis, thisExpression) { - if (classHasClassThisAssignment(node)) { - return node; - } - const staticBlock = createClassThisAssignmentBlock(factory2, classThis, thisExpression); - if (node.name) { - setSourceMapRange(staticBlock.body.statements[0], node.name); - } - const members = factory2.createNodeArray([staticBlock, ...node.members]); - setTextRange(members, node.members); - const updatedNode = isClassDeclaration(node) ? factory2.updateClassDeclaration( - node, - node.modifiers, - node.name, - node.typeParameters, - node.heritageClauses, - members - ) : factory2.updateClassExpression( - node, - node.modifiers, - node.name, - node.typeParameters, - node.heritageClauses, - members - ); - getOrCreateEmitNode(updatedNode).classThis = classThis; - return updatedNode; - } - var init_classThis = __esm({ - "src/compiler/transformers/classThis.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/namedEvaluation.ts - function getAssignedNameOfIdentifier(factory2, name, expression) { - const original = getOriginalNode(skipOuterExpressions(expression)); - if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 1024 /* Default */)) { - return factory2.createStringLiteral("default"); - } - return factory2.createStringLiteralFromNode(name); - } - function getAssignedNameOfPropertyName(context, name, assignedNameText) { - const { factory: factory2 } = context; - if (assignedNameText !== void 0) { - const assignedName2 = factory2.createStringLiteral(assignedNameText); - return { assignedName: assignedName2, name }; - } - if (isPropertyNameLiteral(name) || isPrivateIdentifier(name)) { - const assignedName2 = factory2.createStringLiteralFromNode(name); - return { assignedName: assignedName2, name }; - } - if (isPropertyNameLiteral(name.expression) && !isIdentifier(name.expression)) { - const assignedName2 = factory2.createStringLiteralFromNode(name.expression); - return { assignedName: assignedName2, name }; - } - const assignedName = factory2.getGeneratedNameForNode(name); - context.hoistVariableDeclaration(assignedName); - const key = context.getEmitHelperFactory().createPropKeyHelper(name.expression); - const assignment = factory2.createAssignment(assignedName, key); - const updatedName = factory2.updateComputedPropertyName(name, assignment); - return { assignedName, name: updatedName }; - } - function createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression = context.factory.createThis()) { - const { factory: factory2 } = context; - const expression = context.getEmitHelperFactory().createSetFunctionNameHelper(thisExpression, assignedName); - const statement = factory2.createExpressionStatement(expression); - const body = factory2.createBlock( - [statement], - /*multiLine*/ - false - ); - const block = factory2.createClassStaticBlockDeclaration(body); - getOrCreateEmitNode(block).assignedName = assignedName; - return block; - } - function isClassNamedEvaluationHelperBlock(node) { - var _a; - if (!isClassStaticBlockDeclaration(node) || node.body.statements.length !== 1) { - return false; - } - const statement = node.body.statements[0]; - return isExpressionStatement(statement) && isCallToHelper(statement.expression, "___setFunctionName") && statement.expression.arguments.length >= 2 && statement.expression.arguments[1] === ((_a = node.emitNode) == null ? void 0 : _a.assignedName); - } - function classHasExplicitlyAssignedName(node) { - var _a; - return !!((_a = node.emitNode) == null ? void 0 : _a.assignedName) && some(node.members, isClassNamedEvaluationHelperBlock); - } - function classHasDeclaredOrExplicitlyAssignedName(node) { - return !!node.name || classHasExplicitlyAssignedName(node); - } - function injectClassNamedEvaluationHelperBlockIfMissing(context, node, assignedName, thisExpression) { - if (classHasExplicitlyAssignedName(node)) { - return node; - } - const { factory: factory2 } = context; - const namedEvaluationBlock = createClassNamedEvaluationHelperBlock(context, assignedName, thisExpression); - if (node.name) { - setSourceMapRange(namedEvaluationBlock.body.statements[0], node.name); - } - const insertionIndex = findIndex(node.members, isClassThisAssignmentBlock) + 1; - const leading = node.members.slice(0, insertionIndex); - const trailing = node.members.slice(insertionIndex); - const members = factory2.createNodeArray([...leading, namedEvaluationBlock, ...trailing]); - setTextRange(members, node.members); - node = isClassDeclaration(node) ? factory2.updateClassDeclaration( - node, - node.modifiers, - node.name, - node.typeParameters, - node.heritageClauses, - members - ) : factory2.updateClassExpression( - node, - node.modifiers, - node.name, - node.typeParameters, - node.heritageClauses, - members - ); - getOrCreateEmitNode(node).assignedName = assignedName; - return node; - } - function finishTransformNamedEvaluation(context, expression, assignedName, ignoreEmptyStringLiteral) { - if (ignoreEmptyStringLiteral && isStringLiteral(assignedName) && isEmptyStringLiteral(assignedName)) { - return expression; - } - const { factory: factory2 } = context; - const innerExpression = skipOuterExpressions(expression); - const updatedExpression = isClassExpression(innerExpression) ? cast(injectClassNamedEvaluationHelperBlockIfMissing(context, innerExpression, assignedName), isClassExpression) : context.getEmitHelperFactory().createSetFunctionNameHelper(innerExpression, assignedName); - return factory2.restoreOuterExpressions(expression, updatedExpression); - } - function transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { - const { factory: factory2 } = context; - const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); - const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); - return factory2.updatePropertyAssignment( - node, - name, - initializer - ); - } - function transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedNameText) { - const { factory: factory2 } = context; - const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.objectAssignmentInitializer); - const objectAssignmentInitializer = finishTransformNamedEvaluation(context, node.objectAssignmentInitializer, assignedName, ignoreEmptyStringLiteral); - return factory2.updateShorthandPropertyAssignment( - node, - node.name, - objectAssignmentInitializer - ); - } - function transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { - const { factory: factory2 } = context; - const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); - const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); - return factory2.updateVariableDeclaration( - node, - node.name, - node.exclamationToken, - node.type, - initializer - ); - } - function transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { - const { factory: factory2 } = context; - const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); - const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); - return factory2.updateParameterDeclaration( - node, - node.modifiers, - node.dotDotDotToken, - node.name, - node.questionToken, - node.type, - initializer - ); - } - function transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedNameText) { - const { factory: factory2 } = context; - const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.name, node.initializer); - const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); - return factory2.updateBindingElement( - node, - node.dotDotDotToken, - node.propertyName, - node.name, - initializer - ); - } - function transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedNameText) { - const { factory: factory2 } = context; - const { assignedName, name } = getAssignedNameOfPropertyName(context, node.name, assignedNameText); - const initializer = finishTransformNamedEvaluation(context, node.initializer, assignedName, ignoreEmptyStringLiteral); - return factory2.updatePropertyDeclaration( - node, - node.modifiers, - name, - node.questionToken ?? node.exclamationToken, - node.type, - initializer - ); - } - function transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedNameText) { - const { factory: factory2 } = context; - const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : getAssignedNameOfIdentifier(factory2, node.left, node.right); - const right = finishTransformNamedEvaluation(context, node.right, assignedName, ignoreEmptyStringLiteral); - return factory2.updateBinaryExpression( - node, - node.left, - node.operatorToken, - right - ); - } - function transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedNameText) { - const { factory: factory2 } = context; - const assignedName = assignedNameText !== void 0 ? factory2.createStringLiteral(assignedNameText) : factory2.createStringLiteral(node.isExportEquals ? "" : "default"); - const expression = finishTransformNamedEvaluation(context, node.expression, assignedName, ignoreEmptyStringLiteral); - return factory2.updateExportAssignment( - node, - node.modifiers, - expression - ); - } - function transformNamedEvaluation(context, node, ignoreEmptyStringLiteral, assignedName) { - switch (node.kind) { - case 303 /* PropertyAssignment */: - return transformNamedEvaluationOfPropertyAssignment(context, node, ignoreEmptyStringLiteral, assignedName); - case 304 /* ShorthandPropertyAssignment */: - return transformNamedEvaluationOfShorthandAssignmentProperty(context, node, ignoreEmptyStringLiteral, assignedName); - case 260 /* VariableDeclaration */: - return transformNamedEvaluationOfVariableDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); - case 169 /* Parameter */: - return transformNamedEvaluationOfParameterDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); - case 208 /* BindingElement */: - return transformNamedEvaluationOfBindingElement(context, node, ignoreEmptyStringLiteral, assignedName); - case 172 /* PropertyDeclaration */: - return transformNamedEvaluationOfPropertyDeclaration(context, node, ignoreEmptyStringLiteral, assignedName); - case 226 /* BinaryExpression */: - return transformNamedEvaluationOfAssignmentExpression(context, node, ignoreEmptyStringLiteral, assignedName); - case 277 /* ExportAssignment */: - return transformNamedEvaluationOfExportAssignment(context, node, ignoreEmptyStringLiteral, assignedName); - } - } - var init_namedEvaluation = __esm({ - "src/compiler/transformers/namedEvaluation.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/taggedTemplate.ts - function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) { - const tag = visitNode(node.tag, visitor, isExpression); - Debug.assert(tag); - const templateArguments = [void 0]; - const cookedStrings = []; - const rawStrings = []; - const template = node.template; - if (level === 0 /* LiftRestriction */ && !hasInvalidEscape(template)) { - return visitEachChild(node, visitor, context); - } - const { factory: factory2 } = context; - if (isNoSubstitutionTemplateLiteral(template)) { - cookedStrings.push(createTemplateCooked(factory2, template)); - rawStrings.push(getRawLiteral(factory2, template, currentSourceFile)); - } else { - cookedStrings.push(createTemplateCooked(factory2, template.head)); - rawStrings.push(getRawLiteral(factory2, template.head, currentSourceFile)); - for (const templateSpan of template.templateSpans) { - cookedStrings.push(createTemplateCooked(factory2, templateSpan.literal)); - rawStrings.push(getRawLiteral(factory2, templateSpan.literal, currentSourceFile)); - templateArguments.push(Debug.checkDefined(visitNode(templateSpan.expression, visitor, isExpression))); - } - } - const helperCall = context.getEmitHelperFactory().createTemplateObjectHelper( - factory2.createArrayLiteralExpression(cookedStrings), - factory2.createArrayLiteralExpression(rawStrings) - ); - if (isExternalModule(currentSourceFile)) { - const tempVar = factory2.createUniqueName("templateObject"); - recordTaggedTemplateString(tempVar); - templateArguments[0] = factory2.createLogicalOr( - tempVar, - factory2.createAssignment( - tempVar, - helperCall - ) - ); - } else { - templateArguments[0] = helperCall; - } - return factory2.createCallExpression( - tag, - /*typeArguments*/ - void 0, - templateArguments - ); - } - function createTemplateCooked(factory2, template) { - return template.templateFlags & 26656 /* IsInvalid */ ? factory2.createVoidZero() : factory2.createStringLiteral(template.text); - } - function getRawLiteral(factory2, node, currentSourceFile) { - let text = node.rawText; - if (text === void 0) { - Debug.assertIsDefined( - currentSourceFile, - "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform." - ); - text = getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - const isLast = node.kind === 15 /* NoSubstitutionTemplateLiteral */ || node.kind === 18 /* TemplateTail */; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - } - text = text.replace(/\r\n?/g, "\n"); - return setTextRange(factory2.createStringLiteral(text), node); - } - var ProcessLevel; - var init_taggedTemplate = __esm({ - "src/compiler/transformers/taggedTemplate.ts"() { - "use strict"; - init_ts2(); - ProcessLevel = /* @__PURE__ */ ((ProcessLevel2) => { - ProcessLevel2[ProcessLevel2["LiftRestriction"] = 0] = "LiftRestriction"; - ProcessLevel2[ProcessLevel2["All"] = 1] = "All"; - return ProcessLevel2; - })(ProcessLevel || {}); - } - }); - - // src/compiler/transformers/ts.ts - function transformTypeScript(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - startLexicalEnvironment, - resumeLexicalEnvironment, - endLexicalEnvironment, - hoistVariableDeclaration - } = context; - const resolver = context.getEmitResolver(); - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); - const moduleKind = getEmitModuleKind(compilerOptions); - const legacyDecorators = !!compilerOptions.experimentalDecorators; - const typeSerializer = compilerOptions.emitDecoratorMetadata ? createRuntimeTypeSerializer(context) : void 0; - const previousOnEmitNode = context.onEmitNode; - const previousOnSubstituteNode = context.onSubstituteNode; - context.onEmitNode = onEmitNode; - context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - let currentSourceFile; - let currentNamespace; - let currentNamespaceContainerName; - let currentLexicalScope; - let currentScopeFirstDeclarationsOfName; - let currentClassHasParameterProperties; - let enabledSubstitutions; - let applicableSubstitutions; - return transformSourceFileOrBundle; - function transformSourceFileOrBundle(node) { - if (node.kind === 313 /* Bundle */) { - return transformBundle(node); - } - return transformSourceFile(node); - } - function transformBundle(node) { - return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 315 /* InputFiles */) { - return createUnparsedSourceFile(prepend, "js"); - } - return prepend; - })); - } - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - currentSourceFile = node; - const visited = saveStateAndInvoke(node, visitSourceFile); - addEmitHelpers(visited, context.readEmitHelpers()); - currentSourceFile = void 0; - return visited; - } - function saveStateAndInvoke(node, f) { - const savedCurrentScope = currentLexicalScope; - const savedCurrentScopeFirstDeclarationsOfName = currentScopeFirstDeclarationsOfName; - const savedCurrentClassHasParameterProperties = currentClassHasParameterProperties; - onBeforeVisitNode(node); - const visited = f(node); - if (currentLexicalScope !== savedCurrentScope) { - currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName; - } - currentLexicalScope = savedCurrentScope; - currentClassHasParameterProperties = savedCurrentClassHasParameterProperties; - return visited; - } - function onBeforeVisitNode(node) { - switch (node.kind) { - case 312 /* SourceFile */: - case 269 /* CaseBlock */: - case 268 /* ModuleBlock */: - case 241 /* Block */: - currentLexicalScope = node; - currentScopeFirstDeclarationsOfName = void 0; - break; - case 263 /* ClassDeclaration */: - case 262 /* FunctionDeclaration */: - if (hasSyntacticModifier(node, 2 /* Ambient */)) { - break; - } - if (node.name) { - recordEmittedDeclarationInScope(node); - } else { - Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); - } - break; - } - } - function visitor(node) { - return saveStateAndInvoke(node, visitorWorker); - } - function visitorWorker(node) { - if (node.transformFlags & 1 /* ContainsTypeScript */) { - return visitTypeScript(node); - } - return node; - } - function sourceElementVisitor(node) { - return saveStateAndInvoke(node, sourceElementVisitorWorker); - } - function sourceElementVisitorWorker(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: - return visitElidableStatement(node); - default: - return visitorWorker(node); - } - } - function visitElidableStatement(node) { - const parsed = getParseTreeNode(node); - if (parsed !== node) { - if (node.transformFlags & 1 /* ContainsTypeScript */) { - return visitEachChild(node, visitor, context); - } - return node; - } - switch (node.kind) { - case 272 /* ImportDeclaration */: - return visitImportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: - return visitImportEqualsDeclaration(node); - case 277 /* ExportAssignment */: - return visitExportAssignment(node); - case 278 /* ExportDeclaration */: - return visitExportDeclaration(node); - default: - Debug.fail("Unhandled ellided statement"); - } - } - function namespaceElementVisitor(node) { - return saveStateAndInvoke(node, namespaceElementVisitorWorker); - } - function namespaceElementVisitorWorker(node) { - if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) { - return void 0; - } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { - return visitTypeScript(node); - } - return node; - } - function getClassElementVisitor(parent2) { - return (node) => saveStateAndInvoke(node, (n) => classElementVisitorWorker(n, parent2)); - } - function classElementVisitorWorker(node, parent2) { - switch (node.kind) { - case 176 /* Constructor */: - return visitConstructor(node); - case 172 /* PropertyDeclaration */: - return visitPropertyDeclaration(node, parent2); - case 177 /* GetAccessor */: - return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: - return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: - return visitMethodDeclaration(node, parent2); - case 175 /* ClassStaticBlockDeclaration */: - return visitEachChild(node, visitor, context); - case 240 /* SemicolonClassElement */: - return node; - case 181 /* IndexSignature */: - return; - default: - return Debug.failBadSyntaxKind(node); - } - } - function getObjectLiteralElementVisitor(parent2) { - return (node) => saveStateAndInvoke(node, (n) => objectLiteralElementVisitorWorker(n, parent2)); - } - function objectLiteralElementVisitorWorker(node, parent2) { - switch (node.kind) { - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: - return visitor(node); - case 177 /* GetAccessor */: - return visitGetAccessor(node, parent2); - case 178 /* SetAccessor */: - return visitSetAccessor(node, parent2); - case 174 /* MethodDeclaration */: - return visitMethodDeclaration(node, parent2); - default: - return Debug.failBadSyntaxKind(node); - } - } - function decoratorElidingVisitor(node) { - return isDecorator(node) ? void 0 : visitor(node); - } - function modifierElidingVisitor(node) { - return isModifier(node) ? void 0 : visitor(node); - } - function modifierVisitor(node) { - if (isDecorator(node)) - return void 0; - if (modifierToFlag(node.kind) & 117086 /* TypeScriptModifier */) { - return void 0; - } else if (currentNamespace && node.kind === 95 /* ExportKeyword */) { - return void 0; - } - return node; - } - function visitTypeScript(node) { - if (isStatement(node) && hasSyntacticModifier(node, 2 /* Ambient */)) { - return factory2.createNotEmittedStatement(node); - } - switch (node.kind) { - case 95 /* ExportKeyword */: - case 90 /* DefaultKeyword */: - return currentNamespace ? void 0 : node; - case 125 /* PublicKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - case 128 /* AbstractKeyword */: - case 164 /* OverrideKeyword */: - case 87 /* ConstKeyword */: - case 138 /* DeclareKeyword */: - case 148 /* ReadonlyKeyword */: - case 103 /* InKeyword */: - case 147 /* OutKeyword */: - case 188 /* ArrayType */: - case 189 /* TupleType */: - case 190 /* OptionalType */: - case 191 /* RestType */: - case 187 /* TypeLiteral */: - case 182 /* TypePredicate */: - case 168 /* TypeParameter */: - case 133 /* AnyKeyword */: - case 159 /* UnknownKeyword */: - case 136 /* BooleanKeyword */: - case 154 /* StringKeyword */: - case 150 /* NumberKeyword */: - case 146 /* NeverKeyword */: - case 116 /* VoidKeyword */: - case 155 /* SymbolKeyword */: - case 185 /* ConstructorType */: - case 184 /* FunctionType */: - case 186 /* TypeQuery */: - case 183 /* TypeReference */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 194 /* ConditionalType */: - case 196 /* ParenthesizedType */: - case 197 /* ThisType */: - case 198 /* TypeOperator */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 201 /* LiteralType */: - case 181 /* IndexSignature */: - return void 0; - case 265 /* TypeAliasDeclaration */: - return factory2.createNotEmittedStatement(node); - case 270 /* NamespaceExportDeclaration */: - return void 0; - case 264 /* InterfaceDeclaration */: - return factory2.createNotEmittedStatement(node); - case 263 /* ClassDeclaration */: - return visitClassDeclaration(node); - case 231 /* ClassExpression */: - return visitClassExpression(node); - case 298 /* HeritageClause */: - return visitHeritageClause(node); - case 233 /* ExpressionWithTypeArguments */: - return visitExpressionWithTypeArguments(node); - case 210 /* ObjectLiteralExpression */: - return visitObjectLiteralExpression(node); - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 175 /* ClassStaticBlockDeclaration */: - return Debug.fail("Class and object literal elements must be visited with their respective visitors"); - case 262 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: - return visitFunctionExpression(node); - case 219 /* ArrowFunction */: - return visitArrowFunction(node); - case 169 /* Parameter */: - return visitParameter(node); - case 217 /* ParenthesizedExpression */: - return visitParenthesizedExpression(node); - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - return visitAssertionExpression(node); - case 238 /* SatisfiesExpression */: - return visitSatisfiesExpression(node); - case 213 /* CallExpression */: - return visitCallExpression(node); - case 214 /* NewExpression */: - return visitNewExpression(node); - case 215 /* TaggedTemplateExpression */: - return visitTaggedTemplateExpression(node); - case 235 /* NonNullExpression */: - return visitNonNullExpression(node); - case 266 /* EnumDeclaration */: - return visitEnumDeclaration(node); - case 243 /* VariableStatement */: - return visitVariableStatement(node); - case 260 /* VariableDeclaration */: - return visitVariableDeclaration(node); - case 267 /* ModuleDeclaration */: - return visitModuleDeclaration(node); - case 271 /* ImportEqualsDeclaration */: - return visitImportEqualsDeclaration(node); - case 285 /* JsxSelfClosingElement */: - return visitJsxSelfClosingElement(node); - case 286 /* JsxOpeningElement */: - return visitJsxJsxOpeningElement(node); - default: - return visitEachChild(node, visitor, context); - } - } - function visitSourceFile(node) { - const alwaysStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node); - return factory2.updateSourceFile( - node, - visitLexicalEnvironment( - node.statements, - sourceElementVisitor, - context, - /*start*/ - 0, - alwaysStrict - ) - ); - } - function visitObjectLiteralExpression(node) { - return factory2.updateObjectLiteralExpression( - node, - visitNodes2(node.properties, getObjectLiteralElementVisitor(node), isObjectLiteralElementLike) - ); - } - function getClassFacts(node) { - let facts = 0 /* None */; - if (some(getProperties( - node, - /*requireInitializer*/ - true, - /*isStatic*/ - true - ))) - facts |= 1 /* HasStaticInitializedProperties */; - const extendsClauseElement = getEffectiveBaseTypeNode(node); - if (extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */) - facts |= 64 /* IsDerivedClass */; - if (classOrConstructorParameterIsDecorated(legacyDecorators, node)) - facts |= 2 /* HasClassOrConstructorParameterDecorators */; - if (childIsDecorated(legacyDecorators, node)) - facts |= 4 /* HasMemberDecorators */; - if (isExportOfNamespace(node)) - facts |= 8 /* IsExportOfNamespace */; - else if (isDefaultExternalModuleExport(node)) - facts |= 32 /* IsDefaultExternalExport */; - else if (isNamedExternalModuleExport(node)) - facts |= 16 /* IsNamedExternalExport */; - return facts; - } - function hasTypeScriptClassSyntax(node) { - return !!(node.transformFlags & 8192 /* ContainsTypeScriptClassSyntax */); - } - function isClassLikeDeclarationWithTypeScriptSyntax(node) { - return hasDecorators(node) || some(node.typeParameters) || some(node.heritageClauses, hasTypeScriptClassSyntax) || some(node.members, hasTypeScriptClassSyntax); - } - function visitClassDeclaration(node) { - const facts = getClassFacts(node); - const promoteToIIFE = languageVersion <= 1 /* ES5 */ && !!(facts & 7 /* MayNeedImmediatelyInvokedFunctionExpression */); - if (!isClassLikeDeclarationWithTypeScriptSyntax(node) && !classOrConstructorParameterIsDecorated(legacyDecorators, node) && !isExportOfNamespace(node)) { - return factory2.updateClassDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - node.name, - /*typeParameters*/ - void 0, - visitNodes2(node.heritageClauses, visitor, isHeritageClause), - visitNodes2(node.members, getClassElementVisitor(node), isClassElement) - ); - } - if (promoteToIIFE) { - context.startLexicalEnvironment(); - } - const moveModifiers = promoteToIIFE || facts & 8 /* IsExportOfNamespace */; - let modifiers = moveModifiers ? visitNodes2(node.modifiers, modifierElidingVisitor, isModifierLike) : visitNodes2(node.modifiers, visitor, isModifierLike); - if (facts & 2 /* HasClassOrConstructorParameterDecorators */) { - modifiers = injectClassTypeMetadata(modifiers, node); - } - const needsName = moveModifiers && !node.name || facts & 4 /* HasMemberDecorators */ || facts & 1 /* HasStaticInitializedProperties */; - const name = needsName ? node.name ?? factory2.getGeneratedNameForNode(node) : node.name; - const classDeclaration = factory2.updateClassDeclaration( - node, - modifiers, - name, - /*typeParameters*/ - void 0, - visitNodes2(node.heritageClauses, visitor, isHeritageClause), - transformClassMembers(node) - ); - let emitFlags = getEmitFlags(node); - if (facts & 1 /* HasStaticInitializedProperties */) { - emitFlags |= 64 /* NoTrailingSourceMap */; - } - setEmitFlags(classDeclaration, emitFlags); - let statement; - if (promoteToIIFE) { - const statements = [classDeclaration]; - const closingBraceLocation = createTokenRange(skipTrivia(currentSourceFile.text, node.members.end), 20 /* CloseBraceToken */); - const localName = factory2.getInternalName(node); - const outer = factory2.createPartiallyEmittedExpression(localName); - setTextRangeEnd(outer, closingBraceLocation.end); - setEmitFlags(outer, 3072 /* NoComments */); - const returnStatement = factory2.createReturnStatement(outer); - setTextRangePos(returnStatement, closingBraceLocation.pos); - setEmitFlags(returnStatement, 3072 /* NoComments */ | 768 /* NoTokenSourceMaps */); - statements.push(returnStatement); - insertStatementsAfterStandardPrologue(statements, context.endLexicalEnvironment()); - const iife = factory2.createImmediatelyInvokedArrowFunction(statements); - setInternalEmitFlags(iife, 1 /* TypeScriptClassWrapper */); - const varDecl = factory2.createVariableDeclaration( - factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - false - ), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - iife - ); - setOriginalNode(varDecl, node); - const varStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([varDecl], 1 /* Let */) - ); - setOriginalNode(varStatement, node); - setCommentRange(varStatement, node); - setSourceMapRange(varStatement, moveRangePastDecorators(node)); - startOnNewLine(varStatement); - statement = varStatement; - } else { - statement = classDeclaration; - } - if (moveModifiers) { - if (facts & 8 /* IsExportOfNamespace */) { - return [ - statement, - createExportMemberAssignmentStatement(node) - ]; - } - if (facts & 32 /* IsDefaultExternalExport */) { - return [ - statement, - factory2.createExportDefault(factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - )) - ]; - } - if (facts & 16 /* IsNamedExternalExport */) { - return [ - statement, - factory2.createExternalModuleExport(factory2.getDeclarationName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - )) - ]; - } - } - return statement; - } - function visitClassExpression(node) { - let modifiers = visitNodes2(node.modifiers, modifierElidingVisitor, isModifierLike); - if (classOrConstructorParameterIsDecorated(legacyDecorators, node)) { - modifiers = injectClassTypeMetadata(modifiers, node); - } - return factory2.updateClassExpression( - node, - modifiers, - node.name, - /*typeParameters*/ - void 0, - visitNodes2(node.heritageClauses, visitor, isHeritageClause), - transformClassMembers(node) - ); - } - function transformClassMembers(node) { - const members = visitNodes2(node.members, getClassElementVisitor(node), isClassElement); - let newMembers; - const constructor = getFirstConstructorWithBody(node); - const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor)); - if (parametersWithPropertyAssignments) { - for (const parameter of parametersWithPropertyAssignments) { - const parameterProperty = factory2.createPropertyDeclaration( - /*modifiers*/ - void 0, - parameter.name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ); - setOriginalNode(parameterProperty, parameter); - newMembers = append(newMembers, parameterProperty); - } - } - if (newMembers) { - newMembers = addRange(newMembers, members); - return setTextRange( - factory2.createNodeArray(newMembers), - /*location*/ - node.members - ); - } - return members; - } - function injectClassTypeMetadata(modifiers, node) { - const metadata = getTypeMetadata(node, node); - if (some(metadata)) { - const modifiersArray = []; - addRange(modifiersArray, takeWhile(modifiers, isExportOrDefaultModifier)); - addRange(modifiersArray, filter(modifiers, isDecorator)); - addRange(modifiersArray, metadata); - addRange(modifiersArray, filter(skipWhile(modifiers, isExportOrDefaultModifier), isModifier)); - modifiers = setTextRange(factory2.createNodeArray(modifiersArray), modifiers); - } - return modifiers; - } - function injectClassElementTypeMetadata(modifiers, node, container) { - if (isClassLike(container) && classElementOrClassElementParameterIsDecorated(legacyDecorators, node, container)) { - const metadata = getTypeMetadata(node, container); - if (some(metadata)) { - const modifiersArray = []; - addRange(modifiersArray, filter(modifiers, isDecorator)); - addRange(modifiersArray, metadata); - addRange(modifiersArray, filter(modifiers, isModifier)); - modifiers = setTextRange(factory2.createNodeArray(modifiersArray), modifiers); - } - } - return modifiers; - } - function getTypeMetadata(node, container) { - if (!legacyDecorators) - return void 0; - return USE_NEW_TYPE_METADATA_FORMAT ? getNewTypeMetadata(node, container) : getOldTypeMetadata(node, container); - } - function getOldTypeMetadata(node, container) { - if (typeSerializer) { - let decorators; - if (shouldAddTypeMetadata(node)) { - const typeMetadata = emitHelpers().createMetadataHelper("design:type", typeSerializer.serializeTypeOfNode({ currentLexicalScope, currentNameScope: container }, node)); - decorators = append(decorators, factory2.createDecorator(typeMetadata)); - } - if (shouldAddParamTypesMetadata(node)) { - const paramTypesMetadata = emitHelpers().createMetadataHelper("design:paramtypes", typeSerializer.serializeParameterTypesOfNode({ currentLexicalScope, currentNameScope: container }, node, container)); - decorators = append(decorators, factory2.createDecorator(paramTypesMetadata)); - } - if (shouldAddReturnTypeMetadata(node)) { - const returnTypeMetadata = emitHelpers().createMetadataHelper("design:returntype", typeSerializer.serializeReturnTypeOfNode({ currentLexicalScope, currentNameScope: container }, node)); - decorators = append(decorators, factory2.createDecorator(returnTypeMetadata)); - } - return decorators; - } - } - function getNewTypeMetadata(node, container) { - if (typeSerializer) { - let properties; - if (shouldAddTypeMetadata(node)) { - const typeProperty = factory2.createPropertyAssignment("type", factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - [], - /*type*/ - void 0, - factory2.createToken(39 /* EqualsGreaterThanToken */), - typeSerializer.serializeTypeOfNode({ currentLexicalScope, currentNameScope: container }, node) - )); - properties = append(properties, typeProperty); - } - if (shouldAddParamTypesMetadata(node)) { - const paramTypeProperty = factory2.createPropertyAssignment("paramTypes", factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - [], - /*type*/ - void 0, - factory2.createToken(39 /* EqualsGreaterThanToken */), - typeSerializer.serializeParameterTypesOfNode({ currentLexicalScope, currentNameScope: container }, node, container) - )); - properties = append(properties, paramTypeProperty); - } - if (shouldAddReturnTypeMetadata(node)) { - const returnTypeProperty = factory2.createPropertyAssignment("returnType", factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - [], - /*type*/ - void 0, - factory2.createToken(39 /* EqualsGreaterThanToken */), - typeSerializer.serializeReturnTypeOfNode({ currentLexicalScope, currentNameScope: container }, node) - )); - properties = append(properties, returnTypeProperty); - } - if (properties) { - const typeInfoMetadata = emitHelpers().createMetadataHelper("design:typeinfo", factory2.createObjectLiteralExpression( - properties, - /*multiLine*/ - true - )); - return [factory2.createDecorator(typeInfoMetadata)]; - } - } - } - function shouldAddTypeMetadata(node) { - const kind = node.kind; - return kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */ || kind === 172 /* PropertyDeclaration */; - } - function shouldAddReturnTypeMetadata(node) { - return node.kind === 174 /* MethodDeclaration */; - } - function shouldAddParamTypesMetadata(node) { - switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - return getFirstConstructorWithBody(node) !== void 0; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return true; - } - return false; - } - function getExpressionForPropertyName(member, generateNameForComputedPropertyName) { - const name = member.name; - if (isPrivateIdentifier(name)) { - return factory2.createIdentifier(""); - } else if (isComputedPropertyName(name)) { - return generateNameForComputedPropertyName && !isSimpleInlineableExpression(name.expression) ? factory2.getGeneratedNameForNode(name) : name.expression; - } else if (isIdentifier(name)) { - return factory2.createStringLiteral(idText(name)); - } else { - return factory2.cloneNode(name); - } - } - function visitPropertyNameOfClassElement(member) { - const name = member.name; - if (isComputedPropertyName(name) && (!hasStaticModifier(member) && currentClassHasParameterProperties || hasDecorators(member) && legacyDecorators)) { - const expression = visitNode(name.expression, visitor, isExpression); - Debug.assert(expression); - const innerExpression = skipPartiallyEmittedExpressions(expression); - if (!isSimpleInlineableExpression(innerExpression)) { - const generatedName = factory2.getGeneratedNameForNode(name); - hoistVariableDeclaration(generatedName); - return factory2.updateComputedPropertyName(name, factory2.createAssignment(generatedName, expression)); - } - } - return Debug.checkDefined(visitNode(name, visitor, isPropertyName)); - } - function visitHeritageClause(node) { - if (node.token === 119 /* ImplementsKeyword */) { - return void 0; - } - return visitEachChild(node, visitor, context); - } - function visitExpressionWithTypeArguments(node) { - return factory2.updateExpressionWithTypeArguments( - node, - Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression)), - /*typeArguments*/ - void 0 - ); - } - function shouldEmitFunctionLikeDeclaration(node) { - return !nodeIsMissing(node.body); - } - function visitPropertyDeclaration(node, parent2) { - const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); - if (isAmbient && !(legacyDecorators && hasDecorators(node))) { - return void 0; - } - let modifiers = isClassLike(parent2) ? !isAmbient ? visitNodes2(node.modifiers, visitor, isModifierLike) : visitNodes2(node.modifiers, modifierElidingVisitor, isModifierLike) : visitNodes2(node.modifiers, decoratorElidingVisitor, isModifierLike); - modifiers = injectClassElementTypeMetadata(modifiers, node, parent2); - if (isAmbient) { - return factory2.updatePropertyDeclaration( - node, - concatenate(modifiers, factory2.createModifiersFromModifierFlags(2 /* Ambient */)), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ); - } - return factory2.updatePropertyDeclaration( - node, - modifiers, - visitPropertyNameOfClassElement(node), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); - } - function visitConstructor(node) { - if (!shouldEmitFunctionLikeDeclaration(node)) { - return void 0; - } - return factory2.updateConstructorDeclaration( - node, - /*modifiers*/ - void 0, - visitParameterList(node.parameters, visitor, context), - transformConstructorBody(node.body, node) - ); - } - function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { - const superStatementIndex = superPath[superPathDepth]; - const superStatement = statementsIn[superStatementIndex]; - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); - if (isTryStatement(superStatement)) { - const tryBlockStatements = []; - transformConstructorBodyWorker( - tryBlockStatements, - superStatement.tryBlock.statements, - /*statementOffset*/ - 0, - superPath, - superPathDepth + 1, - initializerStatements - ); - const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); - setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); - statementsOut.push(factory2.updateTryStatement( - superStatement, - factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), - visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock) - )); - } else { - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); - addRange(statementsOut, initializerStatements); - } - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); - } - function transformConstructorBody(body, constructor) { - const parametersWithPropertyAssignments = constructor && filter(constructor.parameters, (p) => isParameterPropertyDeclaration(p, constructor)); - if (!some(parametersWithPropertyAssignments)) { - return visitFunctionBody(body, visitor, context); - } - let statements = []; - resumeLexicalEnvironment(); - const prologueStatementCount = factory2.copyPrologue( - body.statements, - statements, - /*ensureUseStrict*/ - false, - visitor - ); - const superPath = findSuperStatementIndexPath(body.statements, prologueStatementCount); - const parameterPropertyAssignments = mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment); - if (superPath.length) { - transformConstructorBodyWorker( - statements, - body.statements, - prologueStatementCount, - superPath, - /*superPathDepth*/ - 0, - parameterPropertyAssignments - ); - } else { - addRange(statements, parameterPropertyAssignments); - addRange(statements, visitNodes2(body.statements, visitor, isStatement, prologueStatementCount)); - } - statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); - const block = factory2.createBlock( - setTextRange(factory2.createNodeArray(statements), body.statements), - /*multiLine*/ - true - ); - setTextRange( - block, - /*location*/ - body - ); - setOriginalNode(block, body); - return block; - } - function transformParameterWithPropertyAssignment(node) { - const name = node.name; - if (!isIdentifier(name)) { - return void 0; - } - const propertyName = setParent(setTextRange(factory2.cloneNode(name), name), name.parent); - setEmitFlags(propertyName, 3072 /* NoComments */ | 96 /* NoSourceMap */); - const localName = setParent(setTextRange(factory2.cloneNode(name), name), name.parent); - setEmitFlags(localName, 3072 /* NoComments */); - return startOnNewLine( - removeAllComments( - setTextRange( - setOriginalNode( - factory2.createExpressionStatement( - factory2.createAssignment( - setTextRange( - factory2.createPropertyAccessExpression( - factory2.createThis(), - propertyName - ), - node.name - ), - localName - ) - ), - node - ), - moveRangePos(node, -1) - ) - ) - ); - } - function visitMethodDeclaration(node, parent2) { - if (!(node.transformFlags & 1 /* ContainsTypeScript */)) { - return node; - } - if (!shouldEmitFunctionLikeDeclaration(node)) { - return void 0; - } - let modifiers = isClassLike(parent2) ? visitNodes2(node.modifiers, visitor, isModifierLike) : visitNodes2(node.modifiers, decoratorElidingVisitor, isModifierLike); - modifiers = injectClassElementTypeMetadata(modifiers, node, parent2); - return factory2.updateMethodDeclaration( - node, - modifiers, - node.asteriskToken, - visitPropertyNameOfClassElement(node), - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - visitFunctionBody(node.body, visitor, context) - ); - } - function shouldEmitAccessorDeclaration(node) { - return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 256 /* Abstract */)); - } - function visitGetAccessor(node, parent2) { - if (!(node.transformFlags & 1 /* ContainsTypeScript */)) { - return node; - } - if (!shouldEmitAccessorDeclaration(node)) { - return void 0; - } - let modifiers = isClassLike(parent2) ? visitNodes2(node.modifiers, visitor, isModifierLike) : visitNodes2(node.modifiers, decoratorElidingVisitor, isModifierLike); - modifiers = injectClassElementTypeMetadata(modifiers, node, parent2); - return factory2.updateGetAccessorDeclaration( - node, - modifiers, - visitPropertyNameOfClassElement(node), - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - visitFunctionBody(node.body, visitor, context) || factory2.createBlock([]) - ); - } - function visitSetAccessor(node, parent2) { - if (!(node.transformFlags & 1 /* ContainsTypeScript */)) { - return node; - } - if (!shouldEmitAccessorDeclaration(node)) { - return void 0; - } - let modifiers = isClassLike(parent2) ? visitNodes2(node.modifiers, visitor, isModifierLike) : visitNodes2(node.modifiers, decoratorElidingVisitor, isModifierLike); - modifiers = injectClassElementTypeMetadata(modifiers, node, parent2); - return factory2.updateSetAccessorDeclaration( - node, - modifiers, - visitPropertyNameOfClassElement(node), - visitParameterList(node.parameters, visitor, context), - visitFunctionBody(node.body, visitor, context) || factory2.createBlock([]) - ); - } - function visitFunctionDeclaration(node) { - if (!shouldEmitFunctionLikeDeclaration(node)) { - return factory2.createNotEmittedStatement(node); - } - const updated = factory2.updateFunctionDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - node.asteriskToken, - node.name, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - visitFunctionBody(node.body, visitor, context) || factory2.createBlock([]) - ); - if (isExportOfNamespace(node)) { - const statements = [updated]; - addExportMemberAssignment(statements, node); - return statements; - } - return updated; - } - function visitFunctionExpression(node) { - if (!shouldEmitFunctionLikeDeclaration(node)) { - return factory2.createOmittedExpression(); - } - const updated = factory2.updateFunctionExpression( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - node.asteriskToken, - node.name, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - visitFunctionBody(node.body, visitor, context) || factory2.createBlock([]) - ); - return updated; - } - function visitArrowFunction(node) { - const updated = factory2.updateArrowFunction( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - node.equalsGreaterThanToken, - visitFunctionBody(node.body, visitor, context) - ); - return updated; - } - function visitParameter(node) { - if (parameterIsThisKeyword(node)) { - return void 0; - } - const updated = factory2.updateParameterDeclaration( - node, - visitNodes2(node.modifiers, (node2) => isDecorator(node2) ? visitor(node2) : void 0, isModifierLike), - node.dotDotDotToken, - Debug.checkDefined(visitNode(node.name, visitor, isBindingName)), - /*questionToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); - if (updated !== node) { - setCommentRange(updated, node); - setTextRange(updated, moveRangePastModifiers(node)); - setSourceMapRange(updated, moveRangePastModifiers(node)); - setEmitFlags(updated.name, 64 /* NoTrailingSourceMap */); - } - return updated; - } - function visitVariableStatement(node) { - if (isExportOfNamespace(node)) { - const variables = getInitializedVariables(node.declarationList); - if (variables.length === 0) { - return void 0; - } - return setTextRange( - factory2.createExpressionStatement( - factory2.inlineExpressions( - map(variables, transformInitializedVariable) - ) - ), - node - ); - } else { - return visitEachChild(node, visitor, context); - } - } - function transformInitializedVariable(node) { - const name = node.name; - if (isBindingPattern(name)) { - return flattenDestructuringAssignment( - node, - visitor, - context, - 0 /* All */, - /*needsValue*/ - false, - createNamespaceExportExpression - ); - } else { - return setTextRange( - factory2.createAssignment( - getNamespaceMemberNameWithSourceMapsAndWithoutComments(name), - Debug.checkDefined(visitNode(node.initializer, visitor, isExpression)) - ), - /*location*/ - node - ); - } - } - function visitVariableDeclaration(node) { - const updated = factory2.updateVariableDeclaration( - node, - Debug.checkDefined(visitNode(node.name, visitor, isBindingName)), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); - if (node.type) { - setTypeNode(updated.name, node.type); - } - return updated; - } - function visitParenthesizedExpression(node) { - const innerExpression = skipOuterExpressions(node.expression, ~6 /* Assertions */); - if (isAssertionExpression(innerExpression)) { - const expression = visitNode(node.expression, visitor, isExpression); - Debug.assert(expression); - return factory2.createPartiallyEmittedExpression(expression, node); - } - return visitEachChild(node, visitor, context); - } - function visitAssertionExpression(node) { - const expression = visitNode(node.expression, visitor, isExpression); - Debug.assert(expression); - return factory2.createPartiallyEmittedExpression(expression, node); - } - function visitNonNullExpression(node) { - const expression = visitNode(node.expression, visitor, isLeftHandSideExpression); - Debug.assert(expression); - return factory2.createPartiallyEmittedExpression(expression, node); - } - function visitSatisfiesExpression(node) { - const expression = visitNode(node.expression, visitor, isExpression); - Debug.assert(expression); - return factory2.createPartiallyEmittedExpression(expression, node); - } - function visitCallExpression(node) { - return factory2.updateCallExpression( - node, - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - /*typeArguments*/ - void 0, - visitNodes2(node.arguments, visitor, isExpression) - ); - } - function visitNewExpression(node) { - return factory2.updateNewExpression( - node, - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - /*typeArguments*/ - void 0, - visitNodes2(node.arguments, visitor, isExpression) - ); - } - function visitTaggedTemplateExpression(node) { - return factory2.updateTaggedTemplateExpression( - node, - Debug.checkDefined(visitNode(node.tag, visitor, isExpression)), - /*typeArguments*/ - void 0, - Debug.checkDefined(visitNode(node.template, visitor, isTemplateLiteral)) - ); - } - function visitJsxSelfClosingElement(node) { - return factory2.updateJsxSelfClosingElement( - node, - Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)), - /*typeArguments*/ - void 0, - Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes)) - ); - } - function visitJsxJsxOpeningElement(node) { - return factory2.updateJsxOpeningElement( - node, - Debug.checkDefined(visitNode(node.tagName, visitor, isJsxTagNameExpression)), - /*typeArguments*/ - void 0, - Debug.checkDefined(visitNode(node.attributes, visitor, isJsxAttributes)) - ); - } - function shouldEmitEnumDeclaration(node) { - return !isEnumConst(node) || shouldPreserveConstEnums(compilerOptions); - } - function visitEnumDeclaration(node) { - if (!shouldEmitEnumDeclaration(node)) { - return factory2.createNotEmittedStatement(node); - } - const statements = []; - let emitFlags = 4 /* AdviseOnEmitNode */; - const varAdded = addVarForEnumOrModuleDeclaration(statements, node); - if (varAdded) { - if (moduleKind !== 4 /* System */ || currentLexicalScope !== currentSourceFile) { - emitFlags |= 1024 /* NoLeadingComments */; - } - } - const parameterName = getNamespaceParameterName(node); - const containerName = getNamespaceContainerName(node); - const exportName = isExportOfNamespace(node) ? factory2.getExternalModuleOrNamespaceExportName( - currentNamespaceContainerName, - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ) : factory2.getDeclarationName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ); - let moduleArg = factory2.createLogicalOr( - exportName, - factory2.createAssignment( - exportName, - factory2.createObjectLiteralExpression() - ) - ); - if (isExportOfNamespace(node)) { - const localName = factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ); - moduleArg = factory2.createAssignment(localName, moduleArg); - } - const enumStatement = factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - parameterName - )], - /*type*/ - void 0, - transformEnumBody(node, containerName) - ), - /*typeArguments*/ - void 0, - [moduleArg] - ) - ); - setOriginalNode(enumStatement, node); - if (varAdded) { - setSyntheticLeadingComments(enumStatement, void 0); - setSyntheticTrailingComments(enumStatement, void 0); - } - setTextRange(enumStatement, node); - addEmitFlags(enumStatement, emitFlags); - statements.push(enumStatement); - return statements; - } - function transformEnumBody(node, localName) { - const savedCurrentNamespaceLocalName = currentNamespaceContainerName; - currentNamespaceContainerName = localName; - const statements = []; - startLexicalEnvironment(); - const members = map(node.members, transformEnumMember); - insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); - addRange(statements, members); - currentNamespaceContainerName = savedCurrentNamespaceLocalName; - return factory2.createBlock( - setTextRange( - factory2.createNodeArray(statements), - /*location*/ - node.members - ), - /*multiLine*/ - true - ); - } - function transformEnumMember(member) { - const name = getExpressionForPropertyName( - member, - /*generateNameForComputedPropertyName*/ - false - ); - const valueExpression = transformEnumMemberDeclarationValue(member); - const innerAssignment = factory2.createAssignment( - factory2.createElementAccessExpression( - currentNamespaceContainerName, - name - ), - valueExpression - ); - const outerAssignment = valueExpression.kind === 11 /* StringLiteral */ ? innerAssignment : factory2.createAssignment( - factory2.createElementAccessExpression( - currentNamespaceContainerName, - innerAssignment - ), - name - ); - return setTextRange( - factory2.createExpressionStatement( - setTextRange( - outerAssignment, - member - ) - ), - member - ); - } - function transformEnumMemberDeclarationValue(member) { - const value = resolver.getConstantValue(member); - if (value !== void 0) { - return typeof value === "string" ? factory2.createStringLiteral(value) : factory2.createNumericLiteral(value); - } else { - enableSubstitutionForNonQualifiedEnumMembers(); - if (member.initializer) { - return Debug.checkDefined(visitNode(member.initializer, visitor, isExpression)); - } else { - return factory2.createVoidZero(); - } - } - } - function shouldEmitModuleDeclaration(nodeIn) { - const node = getParseTreeNode(nodeIn, isModuleDeclaration); - if (!node) { - return true; - } - return isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions)); - } - function recordEmittedDeclarationInScope(node) { - if (!currentScopeFirstDeclarationsOfName) { - currentScopeFirstDeclarationsOfName = /* @__PURE__ */ new Map(); - } - const name = declaredNameInScope(node); - if (!currentScopeFirstDeclarationsOfName.has(name)) { - currentScopeFirstDeclarationsOfName.set(name, node); - } - } - function isFirstEmittedDeclarationInScope(node) { - if (currentScopeFirstDeclarationsOfName) { - const name = declaredNameInScope(node); - return currentScopeFirstDeclarationsOfName.get(name) === node; - } - return true; - } - function declaredNameInScope(node) { - Debug.assertNode(node.name, isIdentifier); - return node.name.escapedText; - } - function addVarForEnumOrModuleDeclaration(statements, node) { - const varDecl = factory2.createVariableDeclaration(factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - )); - const varFlags = currentLexicalScope.kind === 312 /* SourceFile */ ? 0 /* None */ : 1 /* Let */; - const statement = factory2.createVariableStatement( - visitNodes2(node.modifiers, modifierVisitor, isModifier), - factory2.createVariableDeclarationList([varDecl], varFlags) - ); - setOriginalNode(varDecl, node); - setSyntheticLeadingComments(varDecl, void 0); - setSyntheticTrailingComments(varDecl, void 0); - setOriginalNode(statement, node); - recordEmittedDeclarationInScope(node); - if (isFirstEmittedDeclarationInScope(node)) { - if (node.kind === 266 /* EnumDeclaration */) { - setSourceMapRange(statement.declarationList, node); - } else { - setSourceMapRange(statement, node); - } - setCommentRange(statement, node); - addEmitFlags(statement, 2048 /* NoTrailingComments */); - statements.push(statement); - return true; - } - return false; - } - function visitModuleDeclaration(node) { - if (!shouldEmitModuleDeclaration(node)) { - return factory2.createNotEmittedStatement(node); - } - Debug.assertNode(node.name, isIdentifier, "A TypeScript namespace should have an Identifier name."); - enableSubstitutionForNamespaceExports(); - const statements = []; - let emitFlags = 4 /* AdviseOnEmitNode */; - const varAdded = addVarForEnumOrModuleDeclaration(statements, node); - if (varAdded) { - if (moduleKind !== 4 /* System */ || currentLexicalScope !== currentSourceFile) { - emitFlags |= 1024 /* NoLeadingComments */; - } - } - const parameterName = getNamespaceParameterName(node); - const containerName = getNamespaceContainerName(node); - const exportName = isExportOfNamespace(node) ? factory2.getExternalModuleOrNamespaceExportName( - currentNamespaceContainerName, - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ) : factory2.getDeclarationName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ); - let moduleArg = factory2.createLogicalOr( - exportName, - factory2.createAssignment( - exportName, - factory2.createObjectLiteralExpression() - ) - ); - if (isExportOfNamespace(node)) { - const localName = factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ); - moduleArg = factory2.createAssignment(localName, moduleArg); - } - const moduleStatement = factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - parameterName - )], - /*type*/ - void 0, - transformModuleBody(node, containerName) - ), - /*typeArguments*/ - void 0, - [moduleArg] - ) - ); - setOriginalNode(moduleStatement, node); - if (varAdded) { - setSyntheticLeadingComments(moduleStatement, void 0); - setSyntheticTrailingComments(moduleStatement, void 0); - } - setTextRange(moduleStatement, node); - addEmitFlags(moduleStatement, emitFlags); - statements.push(moduleStatement); - return statements; - } - function transformModuleBody(node, namespaceLocalName) { - const savedCurrentNamespaceContainerName = currentNamespaceContainerName; - const savedCurrentNamespace = currentNamespace; - const savedCurrentScopeFirstDeclarationsOfName = currentScopeFirstDeclarationsOfName; - currentNamespaceContainerName = namespaceLocalName; - currentNamespace = node; - currentScopeFirstDeclarationsOfName = void 0; - const statements = []; - startLexicalEnvironment(); - let statementsLocation; - let blockLocation; - if (node.body) { - if (node.body.kind === 268 /* ModuleBlock */) { - saveStateAndInvoke(node.body, (body) => addRange(statements, visitNodes2(body.statements, namespaceElementVisitor, isStatement))); - statementsLocation = node.body.statements; - blockLocation = node.body; - } else { - const result = visitModuleDeclaration(node.body); - if (result) { - if (isArray(result)) { - addRange(statements, result); - } else { - statements.push(result); - } - } - const moduleBlock = getInnerMostModuleDeclarationFromDottedModule(node).body; - statementsLocation = moveRangePos(moduleBlock.statements, -1); - } - } - insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); - currentNamespaceContainerName = savedCurrentNamespaceContainerName; - currentNamespace = savedCurrentNamespace; - currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName; - const block = factory2.createBlock( - setTextRange( - factory2.createNodeArray(statements), - /*location*/ - statementsLocation - ), - /*multiLine*/ - true - ); - setTextRange(block, blockLocation); - if (!node.body || node.body.kind !== 268 /* ModuleBlock */) { - setEmitFlags(block, getEmitFlags(block) | 3072 /* NoComments */); - } - return block; - } - function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { - const recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); - return recursiveInnerModule || moduleDeclaration.body; - } - } - function visitImportDeclaration(node) { - if (!node.importClause) { - return node; - } - if (node.importClause.isTypeOnly) { - return void 0; - } - const importClause = visitNode(node.importClause, visitImportClause, isImportClause); - return importClause || compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */ ? factory2.updateImportDeclaration( - node, - /*modifiers*/ - void 0, - importClause, - node.moduleSpecifier, - node.assertClause - ) : void 0; - } - function visitImportClause(node) { - Debug.assert(!node.isTypeOnly); - const name = shouldEmitAliasDeclaration(node) ? node.name : void 0; - const namedBindings = visitNode(node.namedBindings, visitNamedImportBindings, isNamedImportBindings); - return name || namedBindings ? factory2.updateImportClause( - node, - /*isTypeOnly*/ - false, - name, - namedBindings - ) : void 0; - } - function visitNamedImportBindings(node) { - if (node.kind === 274 /* NamespaceImport */) { - return shouldEmitAliasDeclaration(node) ? node : void 0; - } else { - const allowEmpty = compilerOptions.verbatimModuleSyntax || compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); - const elements = visitNodes2(node.elements, visitImportSpecifier, isImportSpecifier); - return allowEmpty || some(elements) ? factory2.updateNamedImports(node, elements) : void 0; - } - } - function visitImportSpecifier(node) { - return !node.isTypeOnly && shouldEmitAliasDeclaration(node) ? node : void 0; - } - function visitExportAssignment(node) { - return compilerOptions.verbatimModuleSyntax || resolver.isValueAliasDeclaration(node) ? visitEachChild(node, visitor, context) : void 0; - } - function visitExportDeclaration(node) { - if (node.isTypeOnly) { - return void 0; - } - if (!node.exportClause || isNamespaceExport(node.exportClause)) { - return node; - } - const allowEmpty = compilerOptions.verbatimModuleSyntax || !!node.moduleSpecifier && (compilerOptions.importsNotUsedAsValues === 1 /* Preserve */ || compilerOptions.importsNotUsedAsValues === 2 /* Error */); - const exportClause = visitNode( - node.exportClause, - (bindings) => visitNamedExportBindings(bindings, allowEmpty), - isNamedExportBindings - ); - return exportClause ? factory2.updateExportDeclaration( - node, - /*modifiers*/ - void 0, - node.isTypeOnly, - exportClause, - node.moduleSpecifier, - node.assertClause - ) : void 0; - } - function visitNamedExports(node, allowEmpty) { - const elements = visitNodes2(node.elements, visitExportSpecifier, isExportSpecifier); - return allowEmpty || some(elements) ? factory2.updateNamedExports(node, elements) : void 0; - } - function visitNamespaceExports(node) { - return factory2.updateNamespaceExport(node, Debug.checkDefined(visitNode(node.name, visitor, isIdentifier))); - } - function visitNamedExportBindings(node, allowEmpty) { - return isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty); - } - function visitExportSpecifier(node) { - return !node.isTypeOnly && (compilerOptions.verbatimModuleSyntax || resolver.isValueAliasDeclaration(node)) ? node : void 0; - } - function shouldEmitImportEqualsDeclaration(node) { - return shouldEmitAliasDeclaration(node) || !isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node); - } - function visitImportEqualsDeclaration(node) { - if (node.isTypeOnly) { - return void 0; - } - if (isExternalModuleImportEqualsDeclaration(node)) { - const isReferenced = shouldEmitAliasDeclaration(node); - if (!isReferenced && compilerOptions.importsNotUsedAsValues === 1 /* Preserve */) { - return setOriginalNode( - setTextRange( - factory2.createImportDeclaration( - /*modifiers*/ - void 0, - /*importClause*/ - void 0, - node.moduleReference.expression, - /*assertClause*/ - void 0 - ), - node - ), - node - ); - } - return isReferenced ? visitEachChild(node, visitor, context) : void 0; - } - if (!shouldEmitImportEqualsDeclaration(node)) { - return void 0; - } - const moduleReference = createExpressionFromEntityName(factory2, node.moduleReference); - setEmitFlags(moduleReference, 3072 /* NoComments */ | 4096 /* NoNestedComments */); - if (isNamedExternalModuleExport(node) || !isExportOfNamespace(node)) { - return setOriginalNode( - setTextRange( - factory2.createVariableStatement( - visitNodes2(node.modifiers, modifierVisitor, isModifier), - factory2.createVariableDeclarationList([ - setOriginalNode( - factory2.createVariableDeclaration( - node.name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - moduleReference - ), - node - ) - ]) - ), - node - ), - node - ); - } else { - return setOriginalNode( - createNamespaceExport( - node.name, - moduleReference, - node - ), - node - ); - } - } - function isExportOfNamespace(node) { - return currentNamespace !== void 0 && hasSyntacticModifier(node, 1 /* Export */); - } - function isExternalModuleExport(node) { - return currentNamespace === void 0 && hasSyntacticModifier(node, 1 /* Export */); - } - function isNamedExternalModuleExport(node) { - return isExternalModuleExport(node) && !hasSyntacticModifier(node, 1024 /* Default */); - } - function isDefaultExternalModuleExport(node) { - return isExternalModuleExport(node) && hasSyntacticModifier(node, 1024 /* Default */); - } - function createExportMemberAssignmentStatement(node) { - const expression = factory2.createAssignment( - factory2.getExternalModuleOrNamespaceExportName( - currentNamespaceContainerName, - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ), - factory2.getLocalName(node) - ); - setSourceMapRange(expression, createRange(node.name ? node.name.pos : node.pos, node.end)); - const statement = factory2.createExpressionStatement(expression); - setSourceMapRange(statement, createRange(-1, node.end)); - return statement; - } - function addExportMemberAssignment(statements, node) { - statements.push(createExportMemberAssignmentStatement(node)); - } - function createNamespaceExport(exportName, exportValue, location) { - return setTextRange( - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.getNamespaceMemberName( - currentNamespaceContainerName, - exportName, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ), - exportValue - ) - ), - location - ); - } - function createNamespaceExportExpression(exportName, exportValue, location) { - return setTextRange(factory2.createAssignment(getNamespaceMemberNameWithSourceMapsAndWithoutComments(exportName), exportValue), location); - } - function getNamespaceMemberNameWithSourceMapsAndWithoutComments(name) { - return factory2.getNamespaceMemberName( - currentNamespaceContainerName, - name, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ); - } - function getNamespaceParameterName(node) { - const name = factory2.getGeneratedNameForNode(node); - setSourceMapRange(name, node.name); - return name; - } - function getNamespaceContainerName(node) { - return factory2.getGeneratedNameForNode(node); - } - function enableSubstitutionForNonQualifiedEnumMembers() { - if ((enabledSubstitutions & 8 /* NonQualifiedEnumMembers */) === 0) { - enabledSubstitutions |= 8 /* NonQualifiedEnumMembers */; - context.enableSubstitution(80 /* Identifier */); - } - } - function enableSubstitutionForNamespaceExports() { - if ((enabledSubstitutions & 2 /* NamespaceExports */) === 0) { - enabledSubstitutions |= 2 /* NamespaceExports */; - context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(304 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(267 /* ModuleDeclaration */); - } - } - function isTransformedModuleDeclaration(node) { - return getOriginalNode(node).kind === 267 /* ModuleDeclaration */; - } - function isTransformedEnumDeclaration(node) { - return getOriginalNode(node).kind === 266 /* EnumDeclaration */; - } - function onEmitNode(hint, node, emitCallback) { - const savedApplicableSubstitutions = applicableSubstitutions; - const savedCurrentSourceFile = currentSourceFile; - if (isSourceFile(node)) { - currentSourceFile = node; - } - if (enabledSubstitutions & 2 /* NamespaceExports */ && isTransformedModuleDeclaration(node)) { - applicableSubstitutions |= 2 /* NamespaceExports */; - } - if (enabledSubstitutions & 8 /* NonQualifiedEnumMembers */ && isTransformedEnumDeclaration(node)) { - applicableSubstitutions |= 8 /* NonQualifiedEnumMembers */; - } - previousOnEmitNode(hint, node, emitCallback); - applicableSubstitutions = savedApplicableSubstitutions; - currentSourceFile = savedCurrentSourceFile; - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (hint === 1 /* Expression */) { - return substituteExpression(node); - } else if (isShorthandPropertyAssignment(node)) { - return substituteShorthandPropertyAssignment(node); - } - return node; - } - function substituteShorthandPropertyAssignment(node) { - if (enabledSubstitutions & 2 /* NamespaceExports */) { - const name = node.name; - const exportedName = trySubstituteNamespaceExportedName(name); - if (exportedName) { - if (node.objectAssignmentInitializer) { - const initializer = factory2.createAssignment(exportedName, node.objectAssignmentInitializer); - return setTextRange(factory2.createPropertyAssignment(name, initializer), node); - } - return setTextRange(factory2.createPropertyAssignment(name, exportedName), node); - } - } - return node; - } - function substituteExpression(node) { - switch (node.kind) { - case 80 /* Identifier */: - return substituteExpressionIdentifier(node); - case 211 /* PropertyAccessExpression */: - return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: - return substituteElementAccessExpression(node); - } - return node; - } - function substituteExpressionIdentifier(node) { - return trySubstituteNamespaceExportedName(node) || node; - } - function trySubstituteNamespaceExportedName(node) { - if (enabledSubstitutions & applicableSubstitutions && !isGeneratedIdentifier(node) && !isLocalName(node)) { - const container = resolver.getReferencedExportContainer( - node, - /*prefixLocals*/ - false - ); - if (container && container.kind !== 312 /* SourceFile */) { - const substitute = applicableSubstitutions & 2 /* NamespaceExports */ && container.kind === 267 /* ModuleDeclaration */ || applicableSubstitutions & 8 /* NonQualifiedEnumMembers */ && container.kind === 266 /* EnumDeclaration */; - if (substitute) { - return setTextRange( - factory2.createPropertyAccessExpression(factory2.getGeneratedNameForNode(container), node), - /*location*/ - node - ); - } - } - } - return void 0; - } - function substitutePropertyAccessExpression(node) { - return substituteConstantValue(node); - } - function substituteElementAccessExpression(node) { - return substituteConstantValue(node); - } - function safeMultiLineComment(value) { - return value.replace(/\*\//g, "*_/"); - } - function substituteConstantValue(node) { - const constantValue = tryGetConstEnumValue(node); - if (constantValue !== void 0) { - setConstantValue(node, constantValue); - const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue); - if (!compilerOptions.removeComments) { - const originalNode = getOriginalNode(node, isAccessExpression); - addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `); - } - return substitute; - } - return node; - } - function tryGetConstEnumValue(node) { - if (getIsolatedModules(compilerOptions)) { - return void 0; - } - return isPropertyAccessExpression(node) || isElementAccessExpression(node) ? resolver.getConstantValue(node) : void 0; - } - function shouldEmitAliasDeclaration(node) { - return compilerOptions.verbatimModuleSyntax || isInJSFile(node) || (compilerOptions.preserveValueImports ? resolver.isValueAliasDeclaration(node) : resolver.isReferencedAliasDeclaration(node)); - } - } - var USE_NEW_TYPE_METADATA_FORMAT; - var init_ts = __esm({ - "src/compiler/transformers/ts.ts"() { - "use strict"; - init_ts2(); - USE_NEW_TYPE_METADATA_FORMAT = false; - } - }); - - // src/compiler/transformers/classFields.ts - function transformClassFields(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - hoistVariableDeclaration, - endLexicalEnvironment, - startLexicalEnvironment, - resumeLexicalEnvironment, - addBlockScopedVariable - } = context; - const resolver = context.getEmitResolver(); - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); - const useDefineForClassFields = getUseDefineForClassFields(compilerOptions); - const legacyDecorators = !!compilerOptions.experimentalDecorators; - const shouldTransformInitializersUsingSet = !useDefineForClassFields; - const shouldTransformInitializersUsingDefine = useDefineForClassFields && languageVersion < 9 /* ES2022 */; - const shouldTransformInitializers = shouldTransformInitializersUsingSet || shouldTransformInitializersUsingDefine; - const shouldTransformPrivateElementsOrClassStaticBlocks = languageVersion < 9 /* ES2022 */; - const shouldTransformAutoAccessors = languageVersion < 99 /* ESNext */ ? -1 /* True */ : !useDefineForClassFields ? 3 /* Maybe */ : 0 /* False */; - const shouldTransformThisInStaticInitializers = languageVersion < 9 /* ES2022 */; - const shouldTransformSuperInStaticInitializers = shouldTransformThisInStaticInitializers && languageVersion >= 2 /* ES2015 */; - const shouldTransformAnything = shouldTransformInitializers || shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformAutoAccessors === -1 /* True */; - const previousOnSubstituteNode = context.onSubstituteNode; - context.onSubstituteNode = onSubstituteNode; - const previousOnEmitNode = context.onEmitNode; - context.onEmitNode = onEmitNode; - let shouldTransformPrivateStaticElementsInFile = false; - let enabledSubstitutions; - let classAliases; - let pendingExpressions; - let pendingStatements; - let lexicalEnvironment; - const lexicalEnvironmentMap = /* @__PURE__ */ new Map(); - const noSubstitution = /* @__PURE__ */ new Set(); - let currentClassContainer; - let currentClassElement; - let shouldSubstituteThisWithClassThis = false; - let previousShouldSubstituteThisWithClassThis = false; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - lexicalEnvironment = void 0; - shouldTransformPrivateStaticElementsInFile = !!(getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */); - if (!shouldTransformAnything && !shouldTransformPrivateStaticElementsInFile) { - return node; - } - const visited = visitEachChild(node, visitor, context); - addEmitHelpers(visited, context.readEmitHelpers()); - return visited; - } - function modifierVisitor(node) { - switch (node.kind) { - case 129 /* AccessorKeyword */: - return shouldTransformAutoAccessorsInCurrentClass() ? void 0 : node; - default: - return tryCast(node, isModifier); - } - } - function visitor(node) { - if (!(node.transformFlags & 16777216 /* ContainsClassFields */) && !(node.transformFlags & 134234112 /* ContainsLexicalThisOrSuper */)) { - return node; - } - switch (node.kind) { - case 129 /* AccessorKeyword */: - return Debug.fail("Use `modifierVisitor` instead."); - case 263 /* ClassDeclaration */: - return visitClassDeclaration(node); - case 231 /* ClassExpression */: - return visitClassExpression(node); - case 175 /* ClassStaticBlockDeclaration */: - case 172 /* PropertyDeclaration */: - return Debug.fail("Use `classElementVisitor` instead."); - case 303 /* PropertyAssignment */: - return visitPropertyAssignment(node); - case 243 /* VariableStatement */: - return visitVariableStatement(node); - case 260 /* VariableDeclaration */: - return visitVariableDeclaration(node); - case 169 /* Parameter */: - return visitParameterDeclaration(node); - case 208 /* BindingElement */: - return visitBindingElement(node); - case 277 /* ExportAssignment */: - return visitExportAssignment(node); - case 81 /* PrivateIdentifier */: - return visitPrivateIdentifier(node); - case 211 /* PropertyAccessExpression */: - return visitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: - return visitElementAccessExpression(node); - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - return visitPreOrPostfixUnaryExpression( - node, - /*discarded*/ - false - ); - case 226 /* BinaryExpression */: - return visitBinaryExpression( - node, - /*discarded*/ - false - ); - case 217 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false - ); - case 213 /* CallExpression */: - return visitCallExpression(node); - case 244 /* ExpressionStatement */: - return visitExpressionStatement(node); - case 215 /* TaggedTemplateExpression */: - return visitTaggedTemplateExpression(node); - case 248 /* ForStatement */: - return visitForStatement(node); - case 110 /* ThisKeyword */: - return visitThisExpression(node); - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - return setCurrentClassElementAnd( - /*classElement*/ - void 0, - fallbackVisitor, - node - ); - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { - return setCurrentClassElementAnd( - node, - fallbackVisitor, - node - ); - } - default: - return fallbackVisitor(node); - } - } - function fallbackVisitor(node) { - return visitEachChild(node, visitor, context); - } - function discardedValueVisitor(node) { - switch (node.kind) { - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - return visitPreOrPostfixUnaryExpression( - node, - /*discarded*/ - true - ); - case 226 /* BinaryExpression */: - return visitBinaryExpression( - node, - /*discarded*/ - true - ); - case 361 /* CommaListExpression */: - return visitCommaListExpression( - node, - /*discarded*/ - true - ); - case 217 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - true - ); - default: - return visitor(node); - } - } - function heritageClauseVisitor(node) { - switch (node.kind) { - case 298 /* HeritageClause */: - return visitEachChild(node, heritageClauseVisitor, context); - case 233 /* ExpressionWithTypeArguments */: - return visitExpressionWithTypeArgumentsInHeritageClause(node); - default: - return visitor(node); - } - } - function assignmentTargetVisitor(node) { - switch (node.kind) { - case 210 /* ObjectLiteralExpression */: - case 209 /* ArrayLiteralExpression */: - return visitAssignmentPattern(node); - default: - return visitor(node); - } - } - function classElementVisitor(node) { - switch (node.kind) { - case 176 /* Constructor */: - return setCurrentClassElementAnd( - node, - visitConstructorDeclaration, - node - ); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - return setCurrentClassElementAnd( - node, - visitMethodOrAccessorDeclaration, - node - ); - case 172 /* PropertyDeclaration */: - return setCurrentClassElementAnd( - node, - visitPropertyDeclaration, - node - ); - case 175 /* ClassStaticBlockDeclaration */: - return setCurrentClassElementAnd( - node, - visitClassStaticBlockDeclaration, - node - ); - case 167 /* ComputedPropertyName */: - return visitComputedPropertyName(node); - case 240 /* SemicolonClassElement */: - return node; - default: - return isModifierLike(node) ? modifierVisitor(node) : visitor(node); - } - } - function propertyNameVisitor(node) { - switch (node.kind) { - case 167 /* ComputedPropertyName */: - return visitComputedPropertyName(node); - default: - return visitor(node); - } - } - function accessorFieldResultVisitor(node) { - switch (node.kind) { - case 172 /* PropertyDeclaration */: - return transformFieldInitializer(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return classElementVisitor(node); - default: - Debug.assertMissingNode(node, "Expected node to either be a PropertyDeclaration, GetAccessorDeclaration, or SetAccessorDeclaration"); - break; - } - } - function visitPrivateIdentifier(node) { - if (!shouldTransformPrivateElementsOrClassStaticBlocks) { - return node; - } - if (isStatement(node.parent)) { - return node; - } - return setOriginalNode(factory2.createIdentifier(""), node); - } - function transformPrivateIdentifierInInExpression(node) { - const info = accessPrivateIdentifier2(node.left); - if (info) { - const receiver = visitNode(node.right, visitor, isExpression); - return setOriginalNode( - emitHelpers().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver), - node - ); - } - return visitEachChild(node, visitor, context); - } - function visitPropertyAssignment(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node); - } - return visitEachChild(node, visitor, context); - } - function visitVariableStatement(node) { - const savedPendingStatements = pendingStatements; - pendingStatements = []; - const visitedNode = visitEachChild(node, visitor, context); - const statement = some(pendingStatements) ? [visitedNode, ...pendingStatements] : visitedNode; - pendingStatements = savedPendingStatements; - return statement; - } - function visitVariableDeclaration(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node); - } - return visitEachChild(node, visitor, context); - } - function visitParameterDeclaration(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node); - } - return visitEachChild(node, visitor, context); - } - function visitBindingElement(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node); - } - return visitEachChild(node, visitor, context); - } - function visitExportAssignment(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation( - context, - node, - /*ignoreEmptyStringLiteral*/ - true, - node.isExportEquals ? "" : "default" - ); - } - return visitEachChild(node, visitor, context); - } - function injectPendingExpressions(expression) { - if (some(pendingExpressions)) { - if (isParenthesizedExpression(expression)) { - pendingExpressions.push(expression.expression); - expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions(pendingExpressions)); - } else { - pendingExpressions.push(expression); - expression = factory2.inlineExpressions(pendingExpressions); - } - pendingExpressions = void 0; - } - return expression; - } - function visitComputedPropertyName(node) { - const expression = visitNode(node.expression, visitor, isExpression); - return factory2.updateComputedPropertyName(node, injectPendingExpressions(expression)); - } - function visitConstructorDeclaration(node) { - if (currentClassContainer) { - return transformConstructor(node, currentClassContainer); - } - return fallbackVisitor(node); - } - function shouldTransformClassElementToWeakMap(node) { - if (shouldTransformPrivateElementsOrClassStaticBlocks) - return true; - if (hasStaticModifier(node) && getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) - return true; - return false; - } - function visitMethodOrAccessorDeclaration(node) { - Debug.assert(!hasDecorators(node)); - if (!isPrivateIdentifierClassElementDeclaration(node) || !shouldTransformClassElementToWeakMap(node)) { - return visitEachChild(node, classElementVisitor, context); - } - const info = accessPrivateIdentifier2(node.name); - Debug.assert(info, "Undeclared private name for property declaration."); - if (!info.isValid) { - return node; - } - const functionName = getHoistedFunctionName(node); - if (functionName) { - getPendingExpressions().push( - factory2.createAssignment( - functionName, - factory2.createFunctionExpression( - filter(node.modifiers, (m) => isModifier(m) && !isStaticModifier(m) && !isAccessorModifier(m)), - node.asteriskToken, - functionName, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - visitFunctionBody(node.body, visitor, context) - ) - ) - ); - } - return void 0; - } - function setCurrentClassElementAnd(classElement, visitor2, arg) { - if (classElement !== currentClassElement) { - const savedCurrentClassElement = currentClassElement; - currentClassElement = classElement; - const result = visitor2(arg); - currentClassElement = savedCurrentClassElement; - return result; - } - return visitor2(arg); - } - function getHoistedFunctionName(node) { - Debug.assert(isPrivateIdentifier(node.name)); - const info = accessPrivateIdentifier2(node.name); - Debug.assert(info, "Undeclared private name for property declaration."); - if (info.kind === "m" /* Method */) { - return info.methodName; - } - if (info.kind === "a" /* Accessor */) { - if (isGetAccessor(node)) { - return info.getterName; - } - if (isSetAccessor(node)) { - return info.setterName; - } - } - } - function getClassThis() { - const lex = getClassLexicalEnvironment(); - const classThis = lex.classThis ?? lex.classConstructor ?? (currentClassContainer == null ? void 0 : currentClassContainer.name); - return Debug.checkDefined(classThis); - } - function transformAutoAccessor(node) { - const commentRange = getCommentRange(node); - const sourceMapRange = getSourceMapRange(node); - const name = node.name; - let getterName = name; - let setterName = name; - if (isComputedPropertyName(name) && !isSimpleInlineableExpression(name.expression)) { - const cacheAssignment = findComputedPropertyNameCacheAssignment(name); - if (cacheAssignment) { - getterName = factory2.updateComputedPropertyName(name, visitNode(name.expression, visitor, isExpression)); - setterName = factory2.updateComputedPropertyName(name, cacheAssignment.left); - } else { - const temp = factory2.createTempVariable(hoistVariableDeclaration); - setSourceMapRange(temp, name.expression); - const expression = visitNode(name.expression, visitor, isExpression); - const assignment = factory2.createAssignment(temp, expression); - setSourceMapRange(assignment, name.expression); - getterName = factory2.updateComputedPropertyName(name, assignment); - setterName = factory2.updateComputedPropertyName(name, temp); - } - } - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const backingField = createAccessorPropertyBackingField(factory2, node, modifiers, node.initializer); - setOriginalNode(backingField, node); - setEmitFlags(backingField, 3072 /* NoComments */); - setSourceMapRange(backingField, sourceMapRange); - const receiver = isStatic(node) ? getClassThis() : factory2.createThis(); - const getter = createAccessorPropertyGetRedirector(factory2, node, modifiers, getterName, receiver); - setOriginalNode(getter, node); - setCommentRange(getter, commentRange); - setSourceMapRange(getter, sourceMapRange); - const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers)); - const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver); - setOriginalNode(setter, node); - setEmitFlags(setter, 3072 /* NoComments */); - setSourceMapRange(setter, sourceMapRange); - return visitArray([backingField, getter, setter], accessorFieldResultVisitor, isClassElement); - } - function transformPrivateFieldInitializer(node) { - if (shouldTransformClassElementToWeakMap(node)) { - const info = accessPrivateIdentifier2(node.name); - Debug.assert(info, "Undeclared private name for property declaration."); - if (!info.isValid) { - return node; - } - if (info.isStatic && !shouldTransformPrivateElementsOrClassStaticBlocks) { - const statement = transformPropertyOrClassStaticBlock(node, factory2.createThis()); - if (statement) { - return factory2.createClassStaticBlockDeclaration(factory2.createBlock( - [statement], - /*multiLine*/ - true - )); - } - } - return void 0; - } - if (shouldTransformInitializersUsingSet && !isStatic(node) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && lexicalEnvironment.data.facts & 16 /* WillHoistInitializersToConstructor */) { - return factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, visitor, isModifierLike), - node.name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ); - } - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node); - } - return factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - visitNode(node.name, propertyNameVisitor, isPropertyName), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); - } - function transformPublicFieldInitializer(node) { - if (shouldTransformInitializers && !isAutoAccessorPropertyDeclaration(node)) { - const expr = getPropertyNameExpressionIfNeeded( - node.name, - /*shouldHoist*/ - !!node.initializer || useDefineForClassFields - ); - if (expr) { - getPendingExpressions().push(...flattenCommaList(expr)); - } - if (isStatic(node) && !shouldTransformPrivateElementsOrClassStaticBlocks) { - const initializerStatement = transformPropertyOrClassStaticBlock(node, factory2.createThis()); - if (initializerStatement) { - const staticBlock = factory2.createClassStaticBlockDeclaration( - factory2.createBlock([initializerStatement]) - ); - setOriginalNode(staticBlock, node); - setCommentRange(staticBlock, node); - setCommentRange(initializerStatement, { pos: -1, end: -1 }); - setSyntheticLeadingComments(initializerStatement, void 0); - setSyntheticTrailingComments(initializerStatement, void 0); - return staticBlock; - } - } - return void 0; - } - return factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - visitNode(node.name, propertyNameVisitor, isPropertyName), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); - } - function transformFieldInitializer(node) { - Debug.assert(!hasDecorators(node), "Decorators should already have been transformed and elided."); - return isPrivateIdentifierClassElementDeclaration(node) ? transformPrivateFieldInitializer(node) : transformPublicFieldInitializer(node); - } - function shouldTransformAutoAccessorsInCurrentClass() { - return shouldTransformAutoAccessors === -1 /* True */ || shouldTransformAutoAccessors === 3 /* Maybe */ && !!(lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && !!(lexicalEnvironment.data.facts & 16 /* WillHoistInitializersToConstructor */); - } - function visitPropertyDeclaration(node) { - if (isAutoAccessorPropertyDeclaration(node) && (shouldTransformAutoAccessorsInCurrentClass() || hasStaticModifier(node) && getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */)) { - return transformAutoAccessor(node); - } - return transformFieldInitializer(node); - } - function shouldForceDynamicThis() { - return !!currentClassElement && hasStaticModifier(currentClassElement) && isAccessor(currentClassElement) && isAutoAccessorPropertyDeclaration(getOriginalNode(currentClassElement)); - } - function ensureDynamicThisIfNeeded(node) { - if (shouldForceDynamicThis()) { - const innerExpression = skipOuterExpressions(node); - if (innerExpression.kind === 110 /* ThisKeyword */) { - noSubstitution.add(innerExpression); - } - } - } - function createPrivateIdentifierAccess(info, receiver) { - receiver = visitNode(receiver, visitor, isExpression); - ensureDynamicThisIfNeeded(receiver); - return createPrivateIdentifierAccessHelper(info, receiver); - } - function createPrivateIdentifierAccessHelper(info, receiver) { - setCommentRange(receiver, moveRangePos(receiver, -1)); - switch (info.kind) { - case "a" /* Accessor */: - return emitHelpers().createClassPrivateFieldGetHelper( - receiver, - info.brandCheckIdentifier, - info.kind, - info.getterName - ); - case "m" /* Method */: - return emitHelpers().createClassPrivateFieldGetHelper( - receiver, - info.brandCheckIdentifier, - info.kind, - info.methodName - ); - case "f" /* Field */: - return emitHelpers().createClassPrivateFieldGetHelper( - receiver, - info.brandCheckIdentifier, - info.kind, - info.isStatic ? info.variableName : void 0 - ); - case "untransformed": - return Debug.fail("Access helpers should not be created for untransformed private elements"); - default: - Debug.assertNever(info, "Unknown private element type"); - } - } - function visitPropertyAccessExpression(node) { - if (isPrivateIdentifier(node.name)) { - const privateIdentifierInfo = accessPrivateIdentifier2(node.name); - if (privateIdentifierInfo) { - return setTextRange( - setOriginalNode( - createPrivateIdentifierAccess(privateIdentifierInfo, node.expression), - node - ), - node - ); - } - } - if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isIdentifier(node.name) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { - const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; - if (facts & 1 /* ClassWasDecorated */) { - return visitInvalidSuperProperty(node); - } - if (classConstructor && superClassReference) { - const superProperty = factory2.createReflectGetCall( - superClassReference, - factory2.createStringLiteralFromNode(node.name), - classConstructor - ); - setOriginalNode(superProperty, node.expression); - setTextRange(superProperty, node.expression); - return superProperty; - } - } - return visitEachChild(node, visitor, context); - } - function visitElementAccessExpression(node) { - if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { - const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; - if (facts & 1 /* ClassWasDecorated */) { - return visitInvalidSuperProperty(node); - } - if (classConstructor && superClassReference) { - const superProperty = factory2.createReflectGetCall( - superClassReference, - visitNode(node.argumentExpression, visitor, isExpression), - classConstructor - ); - setOriginalNode(superProperty, node.expression); - setTextRange(superProperty, node.expression); - return superProperty; - } - } - return visitEachChild(node, visitor, context); - } - function visitPreOrPostfixUnaryExpression(node, discarded) { - if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) { - const operand = skipParentheses(node.operand); - if (isPrivateIdentifierPropertyAccessExpression(operand)) { - let info; - if (info = accessPrivateIdentifier2(operand.name)) { - const receiver = visitNode(operand.expression, visitor, isExpression); - ensureDynamicThisIfNeeded(receiver); - const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); - let expression = createPrivateIdentifierAccess(info, readExpression); - const temp = isPrefixUnaryExpression(node) || discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); - expression = expandPreOrPostfixIncrementOrDecrementExpression(factory2, node, expression, hoistVariableDeclaration, temp); - expression = createPrivateIdentifierAssignment( - info, - initializeExpression || readExpression, - expression, - 64 /* EqualsToken */ - ); - setOriginalNode(expression, node); - setTextRange(expression, node); - if (temp) { - expression = factory2.createComma(expression, temp); - setTextRange(expression, node); - } - return expression; - } - } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(operand) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { - const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; - if (facts & 1 /* ClassWasDecorated */) { - const expression = visitInvalidSuperProperty(operand); - return isPrefixUnaryExpression(node) ? factory2.updatePrefixUnaryExpression(node, expression) : factory2.updatePostfixUnaryExpression(node, expression); - } - if (classConstructor && superClassReference) { - let setterName; - let getterName; - if (isPropertyAccessExpression(operand)) { - if (isIdentifier(operand.name)) { - getterName = setterName = factory2.createStringLiteralFromNode(operand.name); - } - } else { - if (isSimpleInlineableExpression(operand.argumentExpression)) { - getterName = setterName = operand.argumentExpression; - } else { - getterName = factory2.createTempVariable(hoistVariableDeclaration); - setterName = factory2.createAssignment(getterName, visitNode(operand.argumentExpression, visitor, isExpression)); - } - } - if (setterName && getterName) { - let expression = factory2.createReflectGetCall(superClassReference, getterName, classConstructor); - setTextRange(expression, operand); - const temp = discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); - expression = expandPreOrPostfixIncrementOrDecrementExpression(factory2, node, expression, hoistVariableDeclaration, temp); - expression = factory2.createReflectSetCall(superClassReference, setterName, expression, classConstructor); - setOriginalNode(expression, node); - setTextRange(expression, node); - if (temp) { - expression = factory2.createComma(expression, temp); - setTextRange(expression, node); - } - return expression; - } - } - } - } - return visitEachChild(node, visitor, context); - } - function visitForStatement(node) { - return factory2.updateForStatement( - node, - visitNode(node.initializer, discardedValueVisitor, isForInitializer), - visitNode(node.condition, visitor, isExpression), - visitNode(node.incrementor, discardedValueVisitor, isExpression), - visitIterationBody(node.statement, visitor, context) - ); - } - function visitExpressionStatement(node) { - return factory2.updateExpressionStatement( - node, - visitNode(node.expression, discardedValueVisitor, isExpression) - ); - } - function createCopiableReceiverExpr(receiver) { - const clone2 = nodeIsSynthesized(receiver) ? receiver : factory2.cloneNode(receiver); - if (receiver.kind === 110 /* ThisKeyword */ && noSubstitution.has(receiver)) { - noSubstitution.add(clone2); - } - if (isSimpleInlineableExpression(receiver)) { - return { readExpression: clone2, initializeExpression: void 0 }; - } - const readExpression = factory2.createTempVariable(hoistVariableDeclaration); - const initializeExpression = factory2.createAssignment(readExpression, clone2); - return { readExpression, initializeExpression }; - } - function visitCallExpression(node) { - var _a; - if (isPrivateIdentifierPropertyAccessExpression(node.expression) && accessPrivateIdentifier2(node.expression.name)) { - const { thisArg, target } = factory2.createCallBinding(node.expression, hoistVariableDeclaration, languageVersion); - if (isCallChain(node)) { - return factory2.updateCallChain( - node, - factory2.createPropertyAccessChain(visitNode(target, visitor, isExpression), node.questionDotToken, "call"), - /*questionDotToken*/ - void 0, - /*typeArguments*/ - void 0, - [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)] - ); - } - return factory2.updateCallExpression( - node, - factory2.createPropertyAccessExpression(visitNode(target, visitor, isExpression), "call"), - /*typeArguments*/ - void 0, - [visitNode(thisArg, visitor, isExpression), ...visitNodes2(node.arguments, visitor, isExpression)] - ); - } - if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.expression) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { - const invocation = factory2.createFunctionCallCall( - visitNode(node.expression, visitor, isExpression), - lexicalEnvironment.data.classConstructor, - visitNodes2(node.arguments, visitor, isExpression) - ); - setOriginalNode(invocation, node); - setTextRange(invocation, node); - return invocation; - } - return visitEachChild(node, visitor, context); - } - function visitTaggedTemplateExpression(node) { - var _a; - if (isPrivateIdentifierPropertyAccessExpression(node.tag) && accessPrivateIdentifier2(node.tag.name)) { - const { thisArg, target } = factory2.createCallBinding(node.tag, hoistVariableDeclaration, languageVersion); - return factory2.updateTaggedTemplateExpression( - node, - factory2.createCallExpression( - factory2.createPropertyAccessExpression(visitNode(target, visitor, isExpression), "bind"), - /*typeArguments*/ - void 0, - [visitNode(thisArg, visitor, isExpression)] - ), - /*typeArguments*/ - void 0, - visitNode(node.template, visitor, isTemplateLiteral) - ); - } - if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.tag) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.classConstructor)) { - const invocation = factory2.createFunctionBindCall( - visitNode(node.tag, visitor, isExpression), - lexicalEnvironment.data.classConstructor, - [] - ); - setOriginalNode(invocation, node); - setTextRange(invocation, node); - return factory2.updateTaggedTemplateExpression( - node, - invocation, - /*typeArguments*/ - void 0, - visitNode(node.template, visitor, isTemplateLiteral) - ); - } - return visitEachChild(node, visitor, context); - } - function transformClassStaticBlockDeclaration(node) { - if (lexicalEnvironment) { - lexicalEnvironmentMap.set(getOriginalNode(node), lexicalEnvironment); - } - if (shouldTransformPrivateElementsOrClassStaticBlocks) { - if (isClassThisAssignmentBlock(node)) { - const result = visitNode(node.body.statements[0].expression, visitor, isExpression); - if (isAssignmentExpression( - result, - /*excludeCompoundAssignment*/ - true - ) && result.left === result.right) { - return void 0; - } - return result; - } - if (isClassNamedEvaluationHelperBlock(node)) { - return visitNode(node.body.statements[0].expression, visitor, isExpression); - } - startLexicalEnvironment(); - let statements = setCurrentClassElementAnd( - node, - (statements2) => visitNodes2(statements2, visitor, isStatement), - node.body.statements - ); - statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); - const iife = factory2.createImmediatelyInvokedArrowFunction(statements); - setOriginalNode(skipParentheses(iife.expression), node); - addEmitFlags(skipParentheses(iife.expression), 4 /* AdviseOnEmitNode */); - setOriginalNode(iife, node); - setTextRange(iife, node); - return iife; - } - } - function isAnonymousClassNeedingAssignedName(node) { - if (isClassExpression(node) && !node.name) { - const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - if (some(staticPropertiesOrClassStaticBlocks, isClassNamedEvaluationHelperBlock)) { - return false; - } - const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || !!(getInternalEmitFlags(node) && 32 /* TransformPrivateStaticElements */)) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); - return hasTransformableStatics; - } - return false; - } - function visitBinaryExpression(node, discarded) { - if (isDestructuringAssignment(node)) { - const savedPendingExpressions = pendingExpressions; - pendingExpressions = void 0; - node = factory2.updateBinaryExpression( - node, - visitNode(node.left, assignmentTargetVisitor, isExpression), - node.operatorToken, - visitNode(node.right, visitor, isExpression) - ); - const expr = some(pendingExpressions) ? factory2.inlineExpressions(compact([...pendingExpressions, node])) : node; - pendingExpressions = savedPendingExpressions; - return expr; - } - if (isAssignmentExpression(node)) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node); - Debug.assertNode(node, isAssignmentExpression); - } - const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */); - if (isPrivateIdentifierPropertyAccessExpression(left)) { - const info = accessPrivateIdentifier2(left.name); - if (info) { - return setTextRange( - setOriginalNode( - createPrivateIdentifierAssignment(info, left.expression, node.right, node.operatorToken.kind), - node - ), - node - ); - } - } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node.left) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { - const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; - if (facts & 1 /* ClassWasDecorated */) { - return factory2.updateBinaryExpression( - node, - visitInvalidSuperProperty(node.left), - node.operatorToken, - visitNode(node.right, visitor, isExpression) - ); - } - if (classConstructor && superClassReference) { - let setterName = isElementAccessExpression(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; - if (setterName) { - let expression = visitNode(node.right, visitor, isExpression); - if (isCompoundAssignment(node.operatorToken.kind)) { - let getterName = setterName; - if (!isSimpleInlineableExpression(setterName)) { - getterName = factory2.createTempVariable(hoistVariableDeclaration); - setterName = factory2.createAssignment(getterName, setterName); - } - const superPropertyGet = factory2.createReflectGetCall( - superClassReference, - getterName, - classConstructor - ); - setOriginalNode(superPropertyGet, node.left); - setTextRange(superPropertyGet, node.left); - expression = factory2.createBinaryExpression( - superPropertyGet, - getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind), - expression - ); - setTextRange(expression, node); - } - const temp = discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); - if (temp) { - expression = factory2.createAssignment(temp, expression); - setTextRange(temp, node); - } - expression = factory2.createReflectSetCall( - superClassReference, - setterName, - expression, - classConstructor - ); - setOriginalNode(expression, node); - setTextRange(expression, node); - if (temp) { - expression = factory2.createComma(expression, temp); - setTextRange(expression, node); - } - return expression; - } - } - } - } - if (isPrivateIdentifierInExpression(node)) { - return transformPrivateIdentifierInInExpression(node); - } - return visitEachChild(node, visitor, context); - } - function visitCommaListExpression(node, discarded) { - const elements = discarded ? visitCommaListElements(node.elements, discardedValueVisitor) : visitCommaListElements(node.elements, visitor, discardedValueVisitor); - return factory2.updateCommaListExpression(node, elements); - } - function visitParenthesizedExpression(node, discarded) { - const visitorFunc = discarded ? discardedValueVisitor : visitor; - const expression = visitNode(node.expression, visitorFunc, isExpression); - return factory2.updateParenthesizedExpression(node, expression); - } - function createPrivateIdentifierAssignment(info, receiver, right, operator) { - receiver = visitNode(receiver, visitor, isExpression); - right = visitNode(right, visitor, isExpression); - ensureDynamicThisIfNeeded(receiver); - if (isCompoundAssignment(operator)) { - const { readExpression, initializeExpression } = createCopiableReceiverExpr(receiver); - receiver = initializeExpression || readExpression; - right = factory2.createBinaryExpression( - createPrivateIdentifierAccessHelper(info, readExpression), - getNonAssignmentOperatorForCompoundAssignment(operator), - right - ); - } - setCommentRange(receiver, moveRangePos(receiver, -1)); - switch (info.kind) { - case "a" /* Accessor */: - return emitHelpers().createClassPrivateFieldSetHelper( - receiver, - info.brandCheckIdentifier, - right, - info.kind, - info.setterName - ); - case "m" /* Method */: - return emitHelpers().createClassPrivateFieldSetHelper( - receiver, - info.brandCheckIdentifier, - right, - info.kind, - /*f*/ - void 0 - ); - case "f" /* Field */: - return emitHelpers().createClassPrivateFieldSetHelper( - receiver, - info.brandCheckIdentifier, - right, - info.kind, - info.isStatic ? info.variableName : void 0 - ); - case "untransformed": - return Debug.fail("Access helpers should not be created for untransformed private elements"); - default: - Debug.assertNever(info, "Unknown private element type"); - } - } - function getPrivateInstanceMethodsAndAccessors(node) { - return filter(node.members, isNonStaticMethodOrAccessorWithPrivateName); - } - function getClassFacts(node) { - var _a; - let facts = 0 /* None */; - const original = getOriginalNode(node); - if (isClassDeclaration(original) && classOrConstructorParameterIsDecorated(legacyDecorators, original)) { - facts |= 1 /* ClassWasDecorated */; - } - if (shouldTransformPrivateElementsOrClassStaticBlocks && (classHasClassThisAssignment(node) || classHasExplicitlyAssignedName(node))) { - facts |= 2 /* NeedsClassConstructorReference */; - } - let containsPublicInstanceFields = false; - let containsInitializedPublicInstanceFields = false; - let containsInstancePrivateElements = false; - let containsInstanceAutoAccessors = false; - for (const member of node.members) { - if (isStatic(member)) { - if (member.name && (isPrivateIdentifier(member.name) || isAutoAccessorPropertyDeclaration(member)) && shouldTransformPrivateElementsOrClassStaticBlocks) { - facts |= 2 /* NeedsClassConstructorReference */; - } else if (isAutoAccessorPropertyDeclaration(member) && shouldTransformAutoAccessors === -1 /* True */ && !node.name && !((_a = node.emitNode) == null ? void 0 : _a.classThis)) { - facts |= 2 /* NeedsClassConstructorReference */; - } - if (isPropertyDeclaration(member) || isClassStaticBlockDeclaration(member)) { - if (shouldTransformThisInStaticInitializers && member.transformFlags & 16384 /* ContainsLexicalThis */) { - facts |= 8 /* NeedsSubstitutionForThisInClassStaticField */; - if (!(facts & 1 /* ClassWasDecorated */)) { - facts |= 2 /* NeedsClassConstructorReference */; - } - } - if (shouldTransformSuperInStaticInitializers && member.transformFlags & 134217728 /* ContainsLexicalSuper */) { - if (!(facts & 1 /* ClassWasDecorated */)) { - facts |= 2 /* NeedsClassConstructorReference */ | 4 /* NeedsClassSuperReference */; - } - } - } - } else if (!hasAbstractModifier(getOriginalNode(member))) { - if (isAutoAccessorPropertyDeclaration(member)) { - containsInstanceAutoAccessors = true; - containsInstancePrivateElements || (containsInstancePrivateElements = isPrivateIdentifierClassElementDeclaration(member)); - } else if (isPrivateIdentifierClassElementDeclaration(member)) { - containsInstancePrivateElements = true; - if (resolver.getNodeCheckFlags(member) & 262144 /* ContainsConstructorReference */) { - facts |= 2 /* NeedsClassConstructorReference */; - } - } else if (isPropertyDeclaration(member)) { - containsPublicInstanceFields = true; - containsInitializedPublicInstanceFields || (containsInitializedPublicInstanceFields = !!member.initializer); - } - } - } - const willHoistInitializersToConstructor = shouldTransformInitializersUsingDefine && containsPublicInstanceFields || shouldTransformInitializersUsingSet && containsInitializedPublicInstanceFields || shouldTransformPrivateElementsOrClassStaticBlocks && containsInstancePrivateElements || shouldTransformPrivateElementsOrClassStaticBlocks && containsInstanceAutoAccessors && shouldTransformAutoAccessors === -1 /* True */; - if (willHoistInitializersToConstructor) { - facts |= 16 /* WillHoistInitializersToConstructor */; - } - return facts; - } - function visitExpressionWithTypeArgumentsInHeritageClause(node) { - var _a; - const facts = ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.facts) || 0 /* None */; - if (facts & 4 /* NeedsClassSuperReference */) { - const temp = factory2.createTempVariable( - hoistVariableDeclaration, - /*reservedInNestedScopes*/ - true - ); - getClassLexicalEnvironment().superClassReference = temp; - return factory2.updateExpressionWithTypeArguments( - node, - factory2.createAssignment( - temp, - visitNode(node.expression, visitor, isExpression) - ), - /*typeArguments*/ - void 0 - ); - } - return visitEachChild(node, visitor, context); - } - function visitInNewClassLexicalEnvironment(node, visitor2) { - var _a; - const savedCurrentClassContainer = currentClassContainer; - const savedPendingExpressions = pendingExpressions; - const savedLexicalEnvironment = lexicalEnvironment; - currentClassContainer = node; - pendingExpressions = void 0; - startClassLexicalEnvironment(); - const shouldAlwaysTransformPrivateStaticElements = getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */; - if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldAlwaysTransformPrivateStaticElements) { - const name = getNameOfDeclaration(node); - if (name && isIdentifier(name)) { - getPrivateIdentifierEnvironment().data.className = name; - } else if ((_a = node.emitNode) == null ? void 0 : _a.assignedName) { - if (isStringLiteral(node.emitNode.assignedName)) { - if (node.emitNode.assignedName.textSourceNode && isIdentifier(node.emitNode.assignedName.textSourceNode)) { - getPrivateIdentifierEnvironment().data.className = node.emitNode.assignedName.textSourceNode; - } else if (isIdentifierText(node.emitNode.assignedName.text, languageVersion)) { - const prefixName = factory2.createIdentifier(node.emitNode.assignedName.text); - getPrivateIdentifierEnvironment().data.className = prefixName; - } - } - } - } - if (shouldTransformPrivateElementsOrClassStaticBlocks) { - const privateInstanceMethodsAndAccessors = getPrivateInstanceMethodsAndAccessors(node); - if (some(privateInstanceMethodsAndAccessors)) { - getPrivateIdentifierEnvironment().data.weakSetName = createHoistedVariableForClass( - "instances", - privateInstanceMethodsAndAccessors[0].name - ); - } - } - const facts = getClassFacts(node); - if (facts) { - getClassLexicalEnvironment().facts = facts; - } - if (facts & 8 /* NeedsSubstitutionForThisInClassStaticField */) { - enableSubstitutionForClassStaticThisOrSuperReference(); - } - const result = visitor2(node, facts); - endClassLexicalEnvironment(); - Debug.assert(lexicalEnvironment === savedLexicalEnvironment); - currentClassContainer = savedCurrentClassContainer; - pendingExpressions = savedPendingExpressions; - return result; - } - function visitClassDeclaration(node) { - return visitInNewClassLexicalEnvironment(node, visitClassDeclarationInNewClassLexicalEnvironment); - } - function visitClassDeclarationInNewClassLexicalEnvironment(node, facts) { - var _a, _b; - let pendingClassReferenceAssignment; - if (facts & 2 /* NeedsClassConstructorReference */) { - if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a = node.emitNode) == null ? void 0 : _a.classThis)) { - getClassLexicalEnvironment().classConstructor = node.emitNode.classThis; - pendingClassReferenceAssignment = factory2.createAssignment(node.emitNode.classThis, factory2.getInternalName(node)); - } else { - const temp = factory2.createTempVariable( - hoistVariableDeclaration, - /*reservedInNestedScopes*/ - true - ); - getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp); - pendingClassReferenceAssignment = factory2.createAssignment(temp, factory2.getInternalName(node)); - } - } - if ((_b = node.emitNode) == null ? void 0 : _b.classThis) { - getClassLexicalEnvironment().classThis = node.emitNode.classThis; - } - const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */; - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); - let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause); - const { members, prologue } = transformClassMembers(node); - const statements = []; - if (pendingClassReferenceAssignment) { - getPendingExpressions().unshift(pendingClassReferenceAssignment); - } - if (some(pendingExpressions)) { - statements.push(factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))); - } - if (shouldTransformInitializersUsingSet || shouldTransformPrivateElementsOrClassStaticBlocks || getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) { - const staticProperties = getStaticPropertiesAndClassStaticBlock(node); - if (some(staticProperties)) { - addPropertyOrClassStaticBlockStatements(statements, staticProperties, factory2.getInternalName(node)); - } - } - if (statements.length > 0 && isExport && isDefault) { - modifiers = visitNodes2(modifiers, (node2) => isExportOrDefaultModifier(node2) ? void 0 : node2, isModifier); - statements.push(factory2.createExportAssignment( - /*modifiers*/ - void 0, - /*isExportEquals*/ - false, - factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ) - )); - } - const alias = getClassLexicalEnvironment().classConstructor; - if (isClassWithConstructorReference && alias) { - enableSubstitutionForClassAliases(); - classAliases[getOriginalNodeId(node)] = alias; - } - const classDecl = factory2.updateClassDeclaration( - node, - modifiers, - node.name, - /*typeParameters*/ - void 0, - heritageClauses, - members - ); - statements.unshift(classDecl); - if (prologue) { - statements.unshift(factory2.createExpressionStatement(prologue)); - } - return statements; - } - function visitClassExpression(node) { - return visitInNewClassLexicalEnvironment(node, visitClassExpressionInNewClassLexicalEnvironment); - } - function visitClassExpressionInNewClassLexicalEnvironment(node, facts) { - var _a, _b, _c; - const isDecoratedClassDeclaration = !!(facts & 1 /* ClassWasDecorated */); - const staticPropertiesOrClassStaticBlocks = getStaticPropertiesAndClassStaticBlock(node); - const classCheckFlags = resolver.getNodeCheckFlags(node); - const isClassWithConstructorReference = classCheckFlags & 262144 /* ContainsConstructorReference */; - let temp; - function createClassTempVar() { - var _a2; - if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_a2 = node.emitNode) == null ? void 0 : _a2.classThis)) { - return getClassLexicalEnvironment().classConstructor = node.emitNode.classThis; - } - const requiresBlockScopedVar = classCheckFlags & 32768 /* BlockScopedBindingInLoop */; - const temp2 = factory2.createTempVariable( - requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, - /*reservedInNestedScopes*/ - true - ); - getClassLexicalEnvironment().classConstructor = factory2.cloneNode(temp2); - return temp2; - } - if ((_a = node.emitNode) == null ? void 0 : _a.classThis) { - getClassLexicalEnvironment().classThis = node.emitNode.classThis; - } - if (facts & 2 /* NeedsClassConstructorReference */) { - temp ?? (temp = createClassTempVar()); - } - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause); - const { members, prologue } = transformClassMembers(node); - const classExpression = factory2.updateClassExpression( - node, - modifiers, - node.name, - /*typeParameters*/ - void 0, - heritageClauses, - members - ); - const expressions = []; - if (prologue) { - expressions.push(prologue); - } - const hasTransformableStatics = (shouldTransformPrivateElementsOrClassStaticBlocks || getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */) && some(staticPropertiesOrClassStaticBlocks, (node2) => isClassStaticBlockDeclaration(node2) || isPrivateIdentifierClassElementDeclaration(node2) || shouldTransformInitializers && isInitializedProperty(node2)); - if (hasTransformableStatics || some(pendingExpressions)) { - if (isDecoratedClassDeclaration) { - Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration."); - if (some(pendingExpressions)) { - addRange(pendingStatements, map(pendingExpressions, factory2.createExpressionStatement)); - } - if (some(staticPropertiesOrClassStaticBlocks)) { - addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, ((_b = node.emitNode) == null ? void 0 : _b.classThis) ?? factory2.getInternalName(node)); - } - if (temp) { - expressions.push(factory2.createAssignment(temp, classExpression)); - } else if (shouldTransformPrivateElementsOrClassStaticBlocks && ((_c = node.emitNode) == null ? void 0 : _c.classThis)) { - expressions.push(factory2.createAssignment(node.emitNode.classThis, classExpression)); - } else { - expressions.push(classExpression); - } - } else { - temp ?? (temp = createClassTempVar()); - if (isClassWithConstructorReference) { - enableSubstitutionForClassAliases(); - const alias = factory2.cloneNode(temp); - alias.emitNode.autoGenerate.flags &= ~8 /* ReservedInNestedScopes */; - classAliases[getOriginalNodeId(node)] = alias; - } - expressions.push(factory2.createAssignment(temp, classExpression)); - addRange(expressions, pendingExpressions); - addRange(expressions, generateInitializedPropertyExpressionsOrClassStaticBlock(staticPropertiesOrClassStaticBlocks, temp)); - expressions.push(factory2.cloneNode(temp)); - } - } else { - expressions.push(classExpression); - } - if (expressions.length > 1) { - addEmitFlags(classExpression, 131072 /* Indented */); - expressions.forEach(startOnNewLine); - } - return factory2.inlineExpressions(expressions); - } - function visitClassStaticBlockDeclaration(node) { - if (!shouldTransformPrivateElementsOrClassStaticBlocks) { - return visitEachChild(node, visitor, context); - } - return void 0; - } - function visitThisExpression(node) { - if (shouldTransformThisInStaticInitializers && currentClassElement && isClassStaticBlockDeclaration(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { - const { classThis, classConstructor } = lexicalEnvironment.data; - return classThis ?? classConstructor ?? node; - } - return node; - } - function transformClassMembers(node) { - const shouldTransformPrivateStaticElementsInClass = !!(getInternalEmitFlags(node) & 32 /* TransformPrivateStaticElements */); - if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformPrivateStaticElementsInFile) { - for (const member of node.members) { - if (isPrivateIdentifierClassElementDeclaration(member)) { - if (shouldTransformClassElementToWeakMap(member)) { - addPrivateIdentifierToEnvironment(member, member.name, addPrivateIdentifierClassElementToEnvironment); - } else { - const privateEnv = getPrivateIdentifierEnvironment(); - setPrivateIdentifier(privateEnv, member.name, { kind: "untransformed" }); - } - } - } - if (shouldTransformPrivateElementsOrClassStaticBlocks) { - if (some(getPrivateInstanceMethodsAndAccessors(node))) { - createBrandCheckWeakSetForPrivateMethods(); - } - } - if (shouldTransformAutoAccessorsInCurrentClass()) { - for (const member of node.members) { - if (isAutoAccessorPropertyDeclaration(member)) { - const storageName = factory2.getGeneratedPrivateNameForNode( - member.name, - /*prefix*/ - void 0, - "_accessor_storage" - ); - if (shouldTransformPrivateElementsOrClassStaticBlocks || shouldTransformPrivateStaticElementsInClass && hasStaticModifier(member)) { - addPrivateIdentifierToEnvironment(member, storageName, addPrivateIdentifierPropertyDeclarationToEnvironment); - } else { - const privateEnv = getPrivateIdentifierEnvironment(); - setPrivateIdentifier(privateEnv, storageName, { kind: "untransformed" }); - } - } - } - } - } - let members = visitNodes2(node.members, classElementVisitor, isClassElement); - let syntheticConstructor; - if (!some(members, isConstructorDeclaration)) { - syntheticConstructor = transformConstructor( - /*constructor*/ - void 0, - node - ); - } - let prologue; - let syntheticStaticBlock; - if (!shouldTransformPrivateElementsOrClassStaticBlocks && some(pendingExpressions)) { - let statement = factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions)); - if (statement.transformFlags & 134234112 /* ContainsLexicalThisOrSuper */) { - const temp = factory2.createTempVariable(hoistVariableDeclaration); - const arrow = factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - [], - /*type*/ - void 0, - /*equalsGreaterThanToken*/ - void 0, - factory2.createBlock([statement]) - ); - prologue = factory2.createAssignment(temp, arrow); - statement = factory2.createExpressionStatement(factory2.createCallExpression( - temp, - /*typeArguments*/ - void 0, - [] - )); - } - const block = factory2.createBlock([statement]); - syntheticStaticBlock = factory2.createClassStaticBlockDeclaration(block); - pendingExpressions = void 0; - } - if (syntheticConstructor || syntheticStaticBlock) { - let membersArray; - const classThisAssignmentBlock = find(members, isClassThisAssignmentBlock); - const classNamedEvaluationHelperBlock = find(members, isClassNamedEvaluationHelperBlock); - membersArray = append(membersArray, classThisAssignmentBlock); - membersArray = append(membersArray, classNamedEvaluationHelperBlock); - membersArray = append(membersArray, syntheticConstructor); - membersArray = append(membersArray, syntheticStaticBlock); - const remainingMembers = classThisAssignmentBlock || classNamedEvaluationHelperBlock ? filter(members, (member) => member !== classThisAssignmentBlock && member !== classNamedEvaluationHelperBlock) : members; - membersArray = addRange(membersArray, remainingMembers); - members = setTextRange( - factory2.createNodeArray(membersArray), - /*location*/ - node.members - ); - } - return { members, prologue }; - } - function createBrandCheckWeakSetForPrivateMethods() { - const { weakSetName } = getPrivateIdentifierEnvironment().data; - Debug.assert(weakSetName, "weakSetName should be set in private identifier environment"); - getPendingExpressions().push( - factory2.createAssignment( - weakSetName, - factory2.createNewExpression( - factory2.createIdentifier("WeakSet"), - /*typeArguments*/ - void 0, - [] - ) - ) - ); - } - function transformConstructor(constructor, container) { - constructor = visitNode(constructor, visitor, isConstructorDeclaration); - if (!(lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) || !(lexicalEnvironment.data.facts & 16 /* WillHoistInitializersToConstructor */)) { - return constructor; - } - const extendsClauseElement = getEffectiveBaseTypeNode(container); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */); - const parameters = visitParameterList(constructor ? constructor.parameters : void 0, visitor, context); - const body = transformConstructorBody(container, constructor, isDerivedClass); - if (!body) { - return constructor; - } - if (constructor) { - Debug.assert(parameters); - return factory2.updateConstructorDeclaration( - constructor, - /*modifiers*/ - void 0, - parameters, - body - ); - } - return startOnNewLine( - setOriginalNode( - setTextRange( - factory2.createConstructorDeclaration( - /*modifiers*/ - void 0, - parameters ?? [], - body - ), - constructor || container - ), - constructor - ) - ); - } - function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements, constructor) { - const superStatementIndex = superPath[superPathDepth]; - const superStatement = statementsIn[superStatementIndex]; - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); - statementOffset = superStatementIndex + 1; - if (isTryStatement(superStatement)) { - const tryBlockStatements = []; - transformConstructorBodyWorker( - tryBlockStatements, - superStatement.tryBlock.statements, - /*statementOffset*/ - 0, - superPath, - superPathDepth + 1, - initializerStatements, - constructor - ); - const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); - setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); - statementsOut.push(factory2.updateTryStatement( - superStatement, - factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), - visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock) - )); - } else { - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); - while (statementOffset < statementsIn.length) { - const statement = statementsIn[statementOffset]; - if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { - statementOffset++; - } else { - break; - } - } - addRange(statementsOut, initializerStatements); - } - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset)); - } - function transformConstructorBody(node, constructor, isDerivedClass) { - const instanceProperties = getProperties( - node, - /*requireInitializer*/ - false, - /*isStatic*/ - false - ); - let properties = instanceProperties; - if (!useDefineForClassFields) { - properties = filter(properties, (property) => !!property.initializer || isPrivateIdentifier(property.name) || hasAccessorModifier(property)); - } - const privateMethodsAndAccessors = getPrivateInstanceMethodsAndAccessors(node); - const needsConstructorBody = some(properties) || some(privateMethodsAndAccessors); - if (!constructor && !needsConstructorBody) { - return visitFunctionBody( - /*node*/ - void 0, - visitor, - context - ); - } - resumeLexicalEnvironment(); - const needsSyntheticConstructor = !constructor && isDerivedClass; - let statementOffset = 0; - let statements = []; - const initializerStatements = []; - const receiver = factory2.createThis(); - addInstanceMethodStatements(initializerStatements, privateMethodsAndAccessors, receiver); - if (constructor) { - const parameterProperties = filter(instanceProperties, (prop) => isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - const nonParameterProperties = filter(properties, (prop) => !isParameterPropertyDeclaration(getOriginalNode(prop), constructor)); - addPropertyOrClassStaticBlockStatements(initializerStatements, parameterProperties, receiver); - addPropertyOrClassStaticBlockStatements(initializerStatements, nonParameterProperties, receiver); - } else { - addPropertyOrClassStaticBlockStatements(initializerStatements, properties, receiver); - } - if (constructor == null ? void 0 : constructor.body) { - statementOffset = factory2.copyPrologue( - constructor.body.statements, - statements, - /*ensureUseStrict*/ - false, - visitor - ); - const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, statementOffset); - if (superStatementIndices.length) { - transformConstructorBodyWorker( - statements, - constructor.body.statements, - statementOffset, - superStatementIndices, - /*superPathDepth*/ - 0, - initializerStatements, - constructor - ); - } else { - while (statementOffset < constructor.body.statements.length) { - const statement = constructor.body.statements[statementOffset]; - if (isParameterPropertyDeclaration(getOriginalNode(statement), constructor)) { - statementOffset++; - } else { - break; - } - } - addRange(statements, initializerStatements); - addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, statementOffset)); - } - } else { - if (needsSyntheticConstructor) { - statements.push( - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createSuper(), - /*typeArguments*/ - void 0, - [factory2.createSpreadElement(factory2.createIdentifier("arguments"))] - ) - ) - ); - } - addRange(statements, initializerStatements); - } - statements = factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); - if (statements.length === 0 && !constructor) { - return void 0; - } - const multiLine = (constructor == null ? void 0 : constructor.body) && constructor.body.statements.length >= statements.length ? constructor.body.multiLine ?? statements.length > 0 : statements.length > 0; - return setTextRange( - factory2.createBlock( - setTextRange( - factory2.createNodeArray(statements), - /*location*/ - constructor ? constructor.body.statements : node.members - ), - multiLine - ), - /*location*/ - constructor ? constructor.body : void 0 - ); - } - function addPropertyOrClassStaticBlockStatements(statements, properties, receiver) { - for (const property of properties) { - if (isStatic(property) && !shouldTransformPrivateElementsOrClassStaticBlocks) { - continue; - } - const statement = transformPropertyOrClassStaticBlock(property, receiver); - if (!statement) { - continue; - } - statements.push(statement); - } - } - function transformPropertyOrClassStaticBlock(property, receiver) { - const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : transformProperty(property, receiver); - if (!expression) { - return void 0; - } - const statement = factory2.createExpressionStatement(expression); - setOriginalNode(statement, property); - addEmitFlags(statement, getEmitFlags(property) & 3072 /* NoComments */); - setCommentRange(statement, property); - const propertyOriginalNode = getOriginalNode(property); - if (isParameter(propertyOriginalNode)) { - setSourceMapRange(statement, propertyOriginalNode); - removeAllComments(statement); - } else { - setSourceMapRange(statement, moveRangePastModifiers(property)); - } - setSyntheticLeadingComments(expression, void 0); - setSyntheticTrailingComments(expression, void 0); - if (hasAccessorModifier(propertyOriginalNode)) { - addEmitFlags(statement, 3072 /* NoComments */); - } - return statement; - } - function generateInitializedPropertyExpressionsOrClassStaticBlock(propertiesOrClassStaticBlocks, receiver) { - const expressions = []; - for (const property of propertiesOrClassStaticBlocks) { - const expression = isClassStaticBlockDeclaration(property) ? setCurrentClassElementAnd(property, transformClassStaticBlockDeclaration, property) : setCurrentClassElementAnd( - property, - () => transformProperty(property, receiver), - /*arg*/ - void 0 - ); - if (!expression) { - continue; - } - startOnNewLine(expression); - setOriginalNode(expression, property); - addEmitFlags(expression, getEmitFlags(property) & 3072 /* NoComments */); - setSourceMapRange(expression, moveRangePastModifiers(property)); - setCommentRange(expression, property); - expressions.push(expression); - } - return expressions; - } - function transformProperty(property, receiver) { - var _a; - const savedCurrentClassElement = currentClassElement; - const transformed = transformPropertyWorker(property, receiver); - if (transformed && hasStaticModifier(property) && ((_a = lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) == null ? void 0 : _a.facts)) { - setOriginalNode(transformed, property); - addEmitFlags(transformed, 4 /* AdviseOnEmitNode */); - setSourceMapRange(transformed, getSourceMapRange(property.name)); - lexicalEnvironmentMap.set(getOriginalNode(property), lexicalEnvironment); - } - currentClassElement = savedCurrentClassElement; - return transformed; - } - function transformPropertyWorker(property, receiver) { - const emitAssignment = !useDefineForClassFields; - if (isNamedEvaluation(property, isAnonymousClassNeedingAssignedName)) { - property = transformNamedEvaluation(context, property); - } - const propertyName = hasAccessorModifier(property) ? factory2.getGeneratedPrivateNameForNode(property.name) : isComputedPropertyName(property.name) && !isSimpleInlineableExpression(property.name.expression) ? factory2.updateComputedPropertyName(property.name, factory2.getGeneratedNameForNode(property.name)) : property.name; - if (hasStaticModifier(property)) { - currentClassElement = property; - } - if (isPrivateIdentifier(propertyName) && shouldTransformClassElementToWeakMap(property)) { - const privateIdentifierInfo = accessPrivateIdentifier2(propertyName); - if (privateIdentifierInfo) { - if (privateIdentifierInfo.kind === "f" /* Field */) { - if (!privateIdentifierInfo.isStatic) { - return createPrivateInstanceFieldInitializer( - factory2, - receiver, - visitNode(property.initializer, visitor, isExpression), - privateIdentifierInfo.brandCheckIdentifier - ); - } else { - return createPrivateStaticFieldInitializer( - factory2, - privateIdentifierInfo.variableName, - visitNode(property.initializer, visitor, isExpression) - ); - } - } else { - return void 0; - } - } else { - Debug.fail("Undeclared private name for property declaration."); - } - } - if ((isPrivateIdentifier(propertyName) || hasStaticModifier(property)) && !property.initializer) { - return void 0; - } - const propertyOriginalNode = getOriginalNode(property); - if (hasSyntacticModifier(propertyOriginalNode, 256 /* Abstract */)) { - return void 0; - } - let initializer = visitNode(property.initializer, visitor, isExpression); - if (isParameterPropertyDeclaration(propertyOriginalNode, propertyOriginalNode.parent) && isIdentifier(propertyName)) { - const localName = factory2.cloneNode(propertyName); - if (initializer) { - if (isParenthesizedExpression(initializer) && isCommaExpression(initializer.expression) && isCallToHelper(initializer.expression.left, "___runInitializers") && isVoidExpression(initializer.expression.right) && isNumericLiteral(initializer.expression.right.expression)) { - initializer = initializer.expression.left; - } - initializer = factory2.inlineExpressions([initializer, localName]); - } else { - initializer = localName; - } - setEmitFlags(propertyName, 3072 /* NoComments */ | 96 /* NoSourceMap */); - setSourceMapRange(localName, propertyOriginalNode.name); - setEmitFlags(localName, 3072 /* NoComments */); - } else { - initializer ?? (initializer = factory2.createVoidZero()); - } - if (emitAssignment || isPrivateIdentifier(propertyName)) { - const memberAccess = createMemberAccessForPropertyName( - factory2, - receiver, - propertyName, - /*location*/ - propertyName - ); - addEmitFlags(memberAccess, 1024 /* NoLeadingComments */); - const expression = factory2.createAssignment(memberAccess, initializer); - return expression; - } else { - const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName; - const descriptor = factory2.createPropertyDescriptor({ value: initializer, configurable: true, writable: true, enumerable: true }); - return factory2.createObjectDefinePropertyCall(receiver, name, descriptor); - } - } - function enableSubstitutionForClassAliases() { - if ((enabledSubstitutions & 1 /* ClassAliases */) === 0) { - enabledSubstitutions |= 1 /* ClassAliases */; - context.enableSubstitution(80 /* Identifier */); - classAliases = []; - } - } - function enableSubstitutionForClassStaticThisOrSuperReference() { - if ((enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */) === 0) { - enabledSubstitutions |= 2 /* ClassStaticThisOrSuperReference */; - context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(262 /* FunctionDeclaration */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(172 /* PropertyDeclaration */); - context.enableEmitNotification(167 /* ComputedPropertyName */); - } - } - function addInstanceMethodStatements(statements, methods, receiver) { - if (!shouldTransformPrivateElementsOrClassStaticBlocks || !some(methods)) { - return; - } - const { weakSetName } = getPrivateIdentifierEnvironment().data; - Debug.assert(weakSetName, "weakSetName should be set in private identifier environment"); - statements.push( - factory2.createExpressionStatement( - createPrivateInstanceMethodInitializer(factory2, receiver, weakSetName) - ) - ); - } - function visitInvalidSuperProperty(node) { - return isPropertyAccessExpression(node) ? factory2.updatePropertyAccessExpression( - node, - factory2.createVoidZero(), - node.name - ) : factory2.updateElementAccessExpression( - node, - factory2.createVoidZero(), - visitNode(node.argumentExpression, visitor, isExpression) - ); - } - function getPropertyNameExpressionIfNeeded(name, shouldHoist) { - if (isComputedPropertyName(name)) { - const cacheAssignment = findComputedPropertyNameCacheAssignment(name); - const expression = visitNode(name.expression, visitor, isExpression); - const innerExpression = skipPartiallyEmittedExpressions(expression); - const inlinable = isSimpleInlineableExpression(innerExpression); - const alreadyTransformed = !!cacheAssignment || isAssignmentExpression(innerExpression) && isGeneratedIdentifier(innerExpression.left); - if (!alreadyTransformed && !inlinable && shouldHoist) { - const generatedName = factory2.getGeneratedNameForNode(name); - if (resolver.getNodeCheckFlags(name) & 32768 /* BlockScopedBindingInLoop */) { - addBlockScopedVariable(generatedName); - } else { - hoistVariableDeclaration(generatedName); - } - return factory2.createAssignment(generatedName, expression); - } - return inlinable || isIdentifier(innerExpression) ? void 0 : expression; - } - } - function startClassLexicalEnvironment() { - lexicalEnvironment = { previous: lexicalEnvironment, data: void 0 }; - } - function endClassLexicalEnvironment() { - lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; - } - function getClassLexicalEnvironment() { - Debug.assert(lexicalEnvironment); - return lexicalEnvironment.data ?? (lexicalEnvironment.data = { - facts: 0 /* None */, - classConstructor: void 0, - classThis: void 0, - superClassReference: void 0 - // privateIdentifierEnvironment: undefined, - }); - } - function getPrivateIdentifierEnvironment() { - Debug.assert(lexicalEnvironment); - return lexicalEnvironment.privateEnv ?? (lexicalEnvironment.privateEnv = newPrivateEnvironment({ - className: void 0, - weakSetName: void 0 - })); - } - function getPendingExpressions() { - return pendingExpressions ?? (pendingExpressions = []); - } - function addPrivateIdentifierClassElementToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo) { - if (isAutoAccessorPropertyDeclaration(node)) { - addPrivateIdentifierAutoAccessorPropertyDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo); - } else if (isPropertyDeclaration(node)) { - addPrivateIdentifierPropertyDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo); - } else if (isMethodDeclaration(node)) { - addPrivateIdentifierMethodDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo); - } else if (isGetAccessorDeclaration(node)) { - addPrivateIdentifierGetAccessorDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo); - } else if (isSetAccessorDeclaration(node)) { - addPrivateIdentifierSetAccessorDeclarationToEnvironment(node, name, lex, privateEnv, isStatic2, isValid, previousInfo); - } - } - function addPrivateIdentifierPropertyDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, _previousInfo) { - if (isStatic2) { - const brandCheckIdentifier = Debug.checkDefined(lex.classThis ?? lex.classConstructor, "classConstructor should be set in private identifier environment"); - const variableName = createHoistedVariableForPrivateName(name); - setPrivateIdentifier(privateEnv, name, { - kind: "f" /* Field */, - isStatic: true, - brandCheckIdentifier, - variableName, - isValid - }); - } else { - const weakMapName = createHoistedVariableForPrivateName(name); - setPrivateIdentifier(privateEnv, name, { - kind: "f" /* Field */, - isStatic: false, - brandCheckIdentifier: weakMapName, - isValid - }); - getPendingExpressions().push(factory2.createAssignment( - weakMapName, - factory2.createNewExpression( - factory2.createIdentifier("WeakMap"), - /*typeArguments*/ - void 0, - [] - ) - )); - } - } - function addPrivateIdentifierMethodDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, _previousInfo) { - const methodName = createHoistedVariableForPrivateName(name); - const brandCheckIdentifier = isStatic2 ? Debug.checkDefined(lex.classThis ?? lex.classConstructor, "classConstructor should be set in private identifier environment") : Debug.checkDefined(privateEnv.data.weakSetName, "weakSetName should be set in private identifier environment"); - setPrivateIdentifier(privateEnv, name, { - kind: "m" /* Method */, - methodName, - brandCheckIdentifier, - isStatic: isStatic2, - isValid - }); - } - function addPrivateIdentifierGetAccessorDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, previousInfo) { - const getterName = createHoistedVariableForPrivateName(name, "_get"); - const brandCheckIdentifier = isStatic2 ? Debug.checkDefined(lex.classThis ?? lex.classConstructor, "classConstructor should be set in private identifier environment") : Debug.checkDefined(privateEnv.data.weakSetName, "weakSetName should be set in private identifier environment"); - if ((previousInfo == null ? void 0 : previousInfo.kind) === "a" /* Accessor */ && previousInfo.isStatic === isStatic2 && !previousInfo.getterName) { - previousInfo.getterName = getterName; - } else { - setPrivateIdentifier(privateEnv, name, { - kind: "a" /* Accessor */, - getterName, - setterName: void 0, - brandCheckIdentifier, - isStatic: isStatic2, - isValid - }); - } - } - function addPrivateIdentifierSetAccessorDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, previousInfo) { - const setterName = createHoistedVariableForPrivateName(name, "_set"); - const brandCheckIdentifier = isStatic2 ? Debug.checkDefined(lex.classThis ?? lex.classConstructor, "classConstructor should be set in private identifier environment") : Debug.checkDefined(privateEnv.data.weakSetName, "weakSetName should be set in private identifier environment"); - if ((previousInfo == null ? void 0 : previousInfo.kind) === "a" /* Accessor */ && previousInfo.isStatic === isStatic2 && !previousInfo.setterName) { - previousInfo.setterName = setterName; - } else { - setPrivateIdentifier(privateEnv, name, { - kind: "a" /* Accessor */, - getterName: void 0, - setterName, - brandCheckIdentifier, - isStatic: isStatic2, - isValid - }); - } - } - function addPrivateIdentifierAutoAccessorPropertyDeclarationToEnvironment(_node, name, lex, privateEnv, isStatic2, isValid, _previousInfo) { - const getterName = createHoistedVariableForPrivateName(name, "_get"); - const setterName = createHoistedVariableForPrivateName(name, "_set"); - const brandCheckIdentifier = isStatic2 ? Debug.checkDefined(lex.classThis ?? lex.classConstructor, "classConstructor should be set in private identifier environment") : Debug.checkDefined(privateEnv.data.weakSetName, "weakSetName should be set in private identifier environment"); - setPrivateIdentifier(privateEnv, name, { - kind: "a" /* Accessor */, - getterName, - setterName, - brandCheckIdentifier, - isStatic: isStatic2, - isValid - }); - } - function addPrivateIdentifierToEnvironment(node, name, addDeclaration) { - const lex = getClassLexicalEnvironment(); - const privateEnv = getPrivateIdentifierEnvironment(); - const previousInfo = getPrivateIdentifier(privateEnv, name); - const isStatic2 = hasStaticModifier(node); - const isValid = !isReservedPrivateName(name) && previousInfo === void 0; - addDeclaration(node, name, lex, privateEnv, isStatic2, isValid, previousInfo); - } - function createHoistedVariableForClass(name, node, suffix) { - const { className } = getPrivateIdentifierEnvironment().data; - const prefix = className ? { prefix: "_", node: className, suffix: "_" } : "_"; - const identifier = typeof name === "object" ? factory2.getGeneratedNameForNode(name, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */, prefix, suffix) : typeof name === "string" ? factory2.createUniqueName(name, 16 /* Optimistic */, prefix, suffix) : factory2.createTempVariable( - /*recordTempVariable*/ - void 0, - /*reservedInNestedScopes*/ - true, - prefix, - suffix - ); - if (resolver.getNodeCheckFlags(node) & 32768 /* BlockScopedBindingInLoop */) { - addBlockScopedVariable(identifier); - } else { - hoistVariableDeclaration(identifier); - } - return identifier; - } - function createHoistedVariableForPrivateName(name, suffix) { - const text = tryGetTextOfPropertyName(name); - return createHoistedVariableForClass((text == null ? void 0 : text.substring(1)) ?? name, name, suffix); - } - function accessPrivateIdentifier2(name) { - const info = accessPrivateIdentifier(lexicalEnvironment, name); - return (info == null ? void 0 : info.kind) === "untransformed" ? void 0 : info; - } - function wrapPrivateIdentifierForDestructuringTarget(node) { - const parameter = factory2.getGeneratedNameForNode(node); - const info = accessPrivateIdentifier2(node.name); - if (!info) { - return visitEachChild(node, visitor, context); - } - let receiver = node.expression; - if (isThisProperty(node) || isSuperProperty(node) || !isSimpleCopiableExpression(node.expression)) { - receiver = factory2.createTempVariable( - hoistVariableDeclaration, - /*reservedInNestedScopes*/ - true - ); - getPendingExpressions().push(factory2.createBinaryExpression(receiver, 64 /* EqualsToken */, visitNode(node.expression, visitor, isExpression))); - } - return factory2.createAssignmentTargetWrapper( - parameter, - createPrivateIdentifierAssignment( - info, - receiver, - parameter, - 64 /* EqualsToken */ - ) - ); - } - function visitDestructuringAssignmentTarget(node) { - if (isObjectLiteralExpression(node) || isArrayLiteralExpression(node)) { - return visitAssignmentPattern(node); - } - if (isPrivateIdentifierPropertyAccessExpression(node)) { - return wrapPrivateIdentifierForDestructuringTarget(node); - } else if (shouldTransformSuperInStaticInitializers && currentClassElement && isSuperProperty(node) && isStaticPropertyDeclarationOrClassStaticBlock(currentClassElement) && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data)) { - const { classConstructor, superClassReference, facts } = lexicalEnvironment.data; - if (facts & 1 /* ClassWasDecorated */) { - return visitInvalidSuperProperty(node); - } else if (classConstructor && superClassReference) { - const name = isElementAccessExpression(node) ? visitNode(node.argumentExpression, visitor, isExpression) : isIdentifier(node.name) ? factory2.createStringLiteralFromNode(node.name) : void 0; - if (name) { - const temp = factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - return factory2.createAssignmentTargetWrapper( - temp, - factory2.createReflectSetCall( - superClassReference, - name, - temp, - classConstructor - ) - ); - } - } - } - return visitEachChild(node, visitor, context); - } - function visitAssignmentElement(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node); - } - if (isAssignmentExpression( - node, - /*excludeCompoundAssignment*/ - true - )) { - const left = visitDestructuringAssignmentTarget(node.left); - const right = visitNode(node.right, visitor, isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); - } - return visitDestructuringAssignmentTarget(node); - } - function visitAssignmentRestElement(node) { - if (isLeftHandSideExpression(node.expression)) { - const expression = visitDestructuringAssignmentTarget(node.expression); - return factory2.updateSpreadElement(node, expression); - } - return visitEachChild(node, visitor, context); - } - function visitArrayAssignmentElement(node) { - if (isArrayBindingOrAssignmentElement(node)) { - if (isSpreadElement(node)) - return visitAssignmentRestElement(node); - if (!isOmittedExpression(node)) - return visitAssignmentElement(node); - } - return visitEachChild(node, visitor, context); - } - function visitAssignmentProperty(node) { - const name = visitNode(node.name, visitor, isPropertyName); - if (isAssignmentExpression( - node.initializer, - /*excludeCompoundAssignment*/ - true - )) { - const assignmentElement = visitAssignmentElement(node.initializer); - return factory2.updatePropertyAssignment(node, name, assignmentElement); - } - if (isLeftHandSideExpression(node.initializer)) { - const assignmentElement = visitDestructuringAssignmentTarget(node.initializer); - return factory2.updatePropertyAssignment(node, name, assignmentElement); - } - return visitEachChild(node, visitor, context); - } - function visitShorthandAssignmentProperty(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node); - } - return visitEachChild(node, visitor, context); - } - function visitAssignmentRestProperty(node) { - if (isLeftHandSideExpression(node.expression)) { - const expression = visitDestructuringAssignmentTarget(node.expression); - return factory2.updateSpreadAssignment(node, expression); - } - return visitEachChild(node, visitor, context); - } - function visitObjectAssignmentElement(node) { - Debug.assertNode(node, isObjectBindingOrAssignmentElement); - if (isSpreadAssignment(node)) - return visitAssignmentRestProperty(node); - if (isShorthandPropertyAssignment(node)) - return visitShorthandAssignmentProperty(node); - if (isPropertyAssignment(node)) - return visitAssignmentProperty(node); - return visitEachChild(node, visitor, context); - } - function visitAssignmentPattern(node) { - if (isArrayLiteralExpression(node)) { - return factory2.updateArrayLiteralExpression( - node, - visitNodes2(node.elements, visitArrayAssignmentElement, isExpression) - ); - } else { - return factory2.updateObjectLiteralExpression( - node, - visitNodes2(node.properties, visitObjectAssignmentElement, isObjectLiteralElementLike) - ); - } - } - function onEmitNode(hint, node, emitCallback) { - const original = getOriginalNode(node); - const lex = lexicalEnvironmentMap.get(original); - if (lex) { - const savedLexicalEnvironment = lexicalEnvironment; - const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; - lexicalEnvironment = lex; - previousShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; - shouldSubstituteThisWithClassThis = !isClassStaticBlockDeclaration(original) || !(getInternalEmitFlags(original) & 32 /* TransformPrivateStaticElements */); - previousOnEmitNode(hint, node, emitCallback); - shouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; - previousShouldSubstituteThisWithClassThis = savedPreviousShouldSubstituteThisWithClassThis; - lexicalEnvironment = savedLexicalEnvironment; - return; - } - switch (node.kind) { - case 218 /* FunctionExpression */: - if (isArrowFunction(original) || getEmitFlags(node) & 524288 /* AsyncFunctionBody */) { - break; - } - case 262 /* FunctionDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - case 172 /* PropertyDeclaration */: { - const savedLexicalEnvironment = lexicalEnvironment; - const savedPreviousShouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; - lexicalEnvironment = void 0; - previousShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; - shouldSubstituteThisWithClassThis = false; - previousOnEmitNode(hint, node, emitCallback); - shouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; - previousShouldSubstituteThisWithClassThis = savedPreviousShouldSubstituteThisWithClassThis; - lexicalEnvironment = savedLexicalEnvironment; - return; - } - case 167 /* ComputedPropertyName */: { - const savedLexicalEnvironment = lexicalEnvironment; - const savedShouldSubstituteThisWithClassThis = shouldSubstituteThisWithClassThis; - lexicalEnvironment = lexicalEnvironment == null ? void 0 : lexicalEnvironment.previous; - shouldSubstituteThisWithClassThis = previousShouldSubstituteThisWithClassThis; - previousOnEmitNode(hint, node, emitCallback); - shouldSubstituteThisWithClassThis = savedShouldSubstituteThisWithClassThis; - lexicalEnvironment = savedLexicalEnvironment; - return; - } - } - previousOnEmitNode(hint, node, emitCallback); - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (hint === 1 /* Expression */) { - return substituteExpression(node); - } - return node; - } - function substituteExpression(node) { - switch (node.kind) { - case 80 /* Identifier */: - return substituteExpressionIdentifier(node); - case 110 /* ThisKeyword */: - return substituteThisExpression(node); - } - return node; - } - function substituteThisExpression(node) { - if (enabledSubstitutions & 2 /* ClassStaticThisOrSuperReference */ && (lexicalEnvironment == null ? void 0 : lexicalEnvironment.data) && !noSubstitution.has(node)) { - const { facts, classConstructor, classThis } = lexicalEnvironment.data; - const substituteThis = shouldSubstituteThisWithClassThis ? classThis ?? classConstructor : classConstructor; - if (substituteThis) { - return setTextRange( - setOriginalNode( - factory2.cloneNode(substituteThis), - node - ), - node - ); - } - if (facts & 1 /* ClassWasDecorated */ && legacyDecorators) { - return factory2.createParenthesizedExpression(factory2.createVoidZero()); - } - } - return node; - } - function substituteExpressionIdentifier(node) { - return trySubstituteClassAlias(node) || node; - } - function trySubstituteClassAlias(node) { - if (enabledSubstitutions & 1 /* ClassAliases */) { - if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { - const declaration = resolver.getReferencedValueDeclaration(node); - if (declaration) { - const classAlias = classAliases[declaration.id]; - if (classAlias) { - const clone2 = factory2.cloneNode(classAlias); - setSourceMapRange(clone2, node); - setCommentRange(clone2, node); - return clone2; - } - } - } - } - return void 0; - } - } - function createPrivateStaticFieldInitializer(factory2, variableName, initializer) { - return factory2.createAssignment( - variableName, - factory2.createObjectLiteralExpression([ - factory2.createPropertyAssignment("value", initializer || factory2.createVoidZero()) - ]) - ); - } - function createPrivateInstanceFieldInitializer(factory2, receiver, initializer, weakMapName) { - return factory2.createCallExpression( - factory2.createPropertyAccessExpression(weakMapName, "set"), - /*typeArguments*/ - void 0, - [receiver, initializer || factory2.createVoidZero()] - ); - } - function createPrivateInstanceMethodInitializer(factory2, receiver, weakSetName) { - return factory2.createCallExpression( - factory2.createPropertyAccessExpression(weakSetName, "add"), - /*typeArguments*/ - void 0, - [receiver] - ); - } - function isReservedPrivateName(node) { - return !isGeneratedPrivateIdentifier(node) && node.escapedText === "#constructor"; - } - function isPrivateIdentifierInExpression(node) { - return isPrivateIdentifier(node.left) && node.operatorToken.kind === 103 /* InKeyword */; - } - function isStaticPropertyDeclaration2(node) { - return isPropertyDeclaration(node) && hasStaticModifier(node); - } - function isStaticPropertyDeclarationOrClassStaticBlock(node) { - return isClassStaticBlockDeclaration(node) || isStaticPropertyDeclaration2(node); - } - var init_classFields = __esm({ - "src/compiler/transformers/classFields.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/typeSerializer.ts - function createRuntimeTypeSerializer(context) { - const { - factory: factory2, - hoistVariableDeclaration - } = context; - const resolver = context.getEmitResolver(); - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); - const strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks"); - let currentLexicalScope; - let currentNameScope; - return { - serializeTypeNode: (serializerContext, node) => setSerializerContextAnd(serializerContext, serializeTypeNode, node), - serializeTypeOfNode: (serializerContext, node) => setSerializerContextAnd(serializerContext, serializeTypeOfNode, node), - serializeParameterTypesOfNode: (serializerContext, node, container) => setSerializerContextAnd(serializerContext, serializeParameterTypesOfNode, node, container), - serializeReturnTypeOfNode: (serializerContext, node) => setSerializerContextAnd(serializerContext, serializeReturnTypeOfNode, node) - }; - function setSerializerContextAnd(serializerContext, cb, node, arg) { - const savedCurrentLexicalScope = currentLexicalScope; - const savedCurrentNameScope = currentNameScope; - currentLexicalScope = serializerContext.currentLexicalScope; - currentNameScope = serializerContext.currentNameScope; - const result = arg === void 0 ? cb(node) : cb(node, arg); - currentLexicalScope = savedCurrentLexicalScope; - currentNameScope = savedCurrentNameScope; - return result; - } - function getAccessorTypeNode(node) { - const accessors = resolver.getAllAccessorDeclarations(node); - return accessors.setAccessor && getSetAccessorTypeAnnotationNode(accessors.setAccessor) || accessors.getAccessor && getEffectiveReturnTypeNode(accessors.getAccessor); - } - function serializeTypeOfNode(node) { - switch (node.kind) { - case 172 /* PropertyDeclaration */: - case 169 /* Parameter */: - return serializeTypeNode(node.type); - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - return serializeTypeNode(getAccessorTypeNode(node)); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 174 /* MethodDeclaration */: - return factory2.createIdentifier("Function"); - default: - return factory2.createVoidZero(); - } - } - function serializeParameterTypesOfNode(node, container) { - const valueDeclaration = isClassLike(node) ? getFirstConstructorWithBody(node) : isFunctionLike(node) && nodeIsPresent(node.body) ? node : void 0; - const expressions = []; - if (valueDeclaration) { - const parameters = getParametersOfDecoratedDeclaration(valueDeclaration, container); - const numParameters = parameters.length; - for (let i = 0; i < numParameters; i++) { - const parameter = parameters[i]; - if (i === 0 && isIdentifier(parameter.name) && parameter.name.escapedText === "this") { - continue; - } - if (parameter.dotDotDotToken) { - expressions.push(serializeTypeNode(getRestParameterElementType(parameter.type))); - } else { - expressions.push(serializeTypeOfNode(parameter)); - } - } - } - return factory2.createArrayLiteralExpression(expressions); - } - function getParametersOfDecoratedDeclaration(node, container) { - if (container && node.kind === 177 /* GetAccessor */) { - const { setAccessor } = getAllAccessorDeclarations(container.members, node); - if (setAccessor) { - return setAccessor.parameters; - } - } - return node.parameters; - } - function serializeReturnTypeOfNode(node) { - if (isFunctionLike(node) && node.type) { - return serializeTypeNode(node.type); - } else if (isAsyncFunction(node)) { - return factory2.createIdentifier("Promise"); - } - return factory2.createVoidZero(); - } - function serializeTypeNode(node) { - if (node === void 0) { - return factory2.createIdentifier("Object"); - } - node = skipTypeParentheses(node); - switch (node.kind) { - case 116 /* VoidKeyword */: - case 157 /* UndefinedKeyword */: - case 146 /* NeverKeyword */: - return factory2.createVoidZero(); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - return factory2.createIdentifier("Function"); - case 188 /* ArrayType */: - case 189 /* TupleType */: - return factory2.createIdentifier("Array"); - case 182 /* TypePredicate */: - return node.assertsModifier ? factory2.createVoidZero() : factory2.createIdentifier("Boolean"); - case 136 /* BooleanKeyword */: - return factory2.createIdentifier("Boolean"); - case 203 /* TemplateLiteralType */: - case 154 /* StringKeyword */: - return factory2.createIdentifier("String"); - case 151 /* ObjectKeyword */: - return factory2.createIdentifier("Object"); - case 201 /* LiteralType */: - return serializeLiteralOfLiteralTypeNode(node.literal); - case 150 /* NumberKeyword */: - return factory2.createIdentifier("Number"); - case 163 /* BigIntKeyword */: - return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 155 /* SymbolKeyword */: - return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 183 /* TypeReference */: - return serializeTypeReferenceNode(node); - case 193 /* IntersectionType */: - return serializeUnionOrIntersectionConstituents( - node.types, - /*isIntersection*/ - true - ); - case 192 /* UnionType */: - return serializeUnionOrIntersectionConstituents( - node.types, - /*isIntersection*/ - false - ); - case 194 /* ConditionalType */: - return serializeUnionOrIntersectionConstituents( - [node.trueType, node.falseType], - /*isIntersection*/ - false - ); - case 198 /* TypeOperator */: - if (node.operator === 148 /* ReadonlyKeyword */) { - return serializeTypeNode(node.type); - } - break; - case 186 /* TypeQuery */: - case 199 /* IndexedAccessType */: - case 200 /* MappedType */: - case 187 /* TypeLiteral */: - case 133 /* AnyKeyword */: - case 159 /* UnknownKeyword */: - case 197 /* ThisType */: - case 205 /* ImportType */: - break; - case 319 /* JSDocAllType */: - case 320 /* JSDocUnknownType */: - case 324 /* JSDocFunctionType */: - case 325 /* JSDocVariadicType */: - case 326 /* JSDocNamepathType */: - break; - case 321 /* JSDocNullableType */: - case 322 /* JSDocNonNullableType */: - case 323 /* JSDocOptionalType */: - return serializeTypeNode(node.type); - default: - return Debug.failBadSyntaxKind(node); - } - return factory2.createIdentifier("Object"); - } - function serializeLiteralOfLiteralTypeNode(node) { - switch (node.kind) { - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - return factory2.createIdentifier("String"); - case 224 /* PrefixUnaryExpression */: { - const operand = node.operand; - switch (operand.kind) { - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - return serializeLiteralOfLiteralTypeNode(operand); - default: - return Debug.failBadSyntaxKind(operand); - } - } - case 9 /* NumericLiteral */: - return factory2.createIdentifier("Number"); - case 10 /* BigIntLiteral */: - return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - return factory2.createIdentifier("Boolean"); - case 106 /* NullKeyword */: - return factory2.createVoidZero(); - default: - return Debug.failBadSyntaxKind(node); - } - } - function serializeUnionOrIntersectionConstituents(types, isIntersection) { - let serializedType; - for (let typeNode of types) { - typeNode = skipTypeParentheses(typeNode); - if (typeNode.kind === 146 /* NeverKeyword */) { - if (isIntersection) - return factory2.createVoidZero(); - continue; - } - if (typeNode.kind === 159 /* UnknownKeyword */) { - if (!isIntersection) - return factory2.createIdentifier("Object"); - continue; - } - if (typeNode.kind === 133 /* AnyKeyword */) { - return factory2.createIdentifier("Object"); - } - if (!strictNullChecks && (isLiteralTypeNode(typeNode) && typeNode.literal.kind === 106 /* NullKeyword */ || typeNode.kind === 157 /* UndefinedKeyword */)) { - continue; - } - const serializedConstituent = serializeTypeNode(typeNode); - if (isIdentifier(serializedConstituent) && serializedConstituent.escapedText === "Object") { - return serializedConstituent; - } - if (serializedType) { - if (!equateSerializedTypeNodes(serializedType, serializedConstituent)) { - return factory2.createIdentifier("Object"); - } - } else { - serializedType = serializedConstituent; - } - } - return serializedType ?? factory2.createVoidZero(); - } - function equateSerializedTypeNodes(left, right) { - return ( - // temp vars used in fallback - isGeneratedIdentifier(left) ? isGeneratedIdentifier(right) : ( - // entity names - isIdentifier(left) ? isIdentifier(right) && left.escapedText === right.escapedText : isPropertyAccessExpression(left) ? isPropertyAccessExpression(right) && equateSerializedTypeNodes(left.expression, right.expression) && equateSerializedTypeNodes(left.name, right.name) : ( - // `void 0` - isVoidExpression(left) ? isVoidExpression(right) && isNumericLiteral(left.expression) && left.expression.text === "0" && isNumericLiteral(right.expression) && right.expression.text === "0" : ( - // `"undefined"` or `"function"` in `typeof` checks - isStringLiteral(left) ? isStringLiteral(right) && left.text === right.text : ( - // used in `typeof` checks for fallback - isTypeOfExpression(left) ? isTypeOfExpression(right) && equateSerializedTypeNodes(left.expression, right.expression) : ( - // parens in `typeof` checks with temps - isParenthesizedExpression(left) ? isParenthesizedExpression(right) && equateSerializedTypeNodes(left.expression, right.expression) : ( - // conditionals used in fallback - isConditionalExpression(left) ? isConditionalExpression(right) && equateSerializedTypeNodes(left.condition, right.condition) && equateSerializedTypeNodes(left.whenTrue, right.whenTrue) && equateSerializedTypeNodes(left.whenFalse, right.whenFalse) : ( - // logical binary and assignments used in fallback - isBinaryExpression(left) ? isBinaryExpression(right) && left.operatorToken.kind === right.operatorToken.kind && equateSerializedTypeNodes(left.left, right.left) && equateSerializedTypeNodes(left.right, right.right) : false - ) - ) - ) - ) - ) - ) - ) - ); - } - function serializeTypeReferenceNode(node) { - const kind = resolver.getTypeReferenceSerializationKind(node.typeName, currentNameScope ?? currentLexicalScope); - switch (kind) { - case 0 /* Unknown */: - if (findAncestor(node, (n) => n.parent && isConditionalTypeNode(n.parent) && (n.parent.trueType === n || n.parent.falseType === n))) { - return factory2.createIdentifier("Object"); - } - const serialized = serializeEntityNameAsExpressionFallback(node.typeName); - const temp = factory2.createTempVariable(hoistVariableDeclaration); - return factory2.createConditionalExpression( - factory2.createTypeCheck(factory2.createAssignment(temp, serialized), "function"), - /*questionToken*/ - void 0, - temp, - /*colonToken*/ - void 0, - factory2.createIdentifier("Object") - ); - case 1 /* TypeWithConstructSignatureAndValue */: - return serializeEntityNameAsExpression(node.typeName); - case 2 /* VoidNullableOrNeverType */: - return factory2.createVoidZero(); - case 4 /* BigIntLikeType */: - return getGlobalConstructor("BigInt", 7 /* ES2020 */); - case 6 /* BooleanType */: - return factory2.createIdentifier("Boolean"); - case 3 /* NumberLikeType */: - return factory2.createIdentifier("Number"); - case 5 /* StringLikeType */: - return factory2.createIdentifier("String"); - case 7 /* ArrayLikeType */: - return factory2.createIdentifier("Array"); - case 8 /* ESSymbolType */: - return getGlobalConstructor("Symbol", 2 /* ES2015 */); - case 10 /* TypeWithCallSignature */: - return factory2.createIdentifier("Function"); - case 9 /* Promise */: - return factory2.createIdentifier("Promise"); - case 11 /* ObjectType */: - return factory2.createIdentifier("Object"); - default: - return Debug.assertNever(kind); - } - } - function createCheckedValue(left, right) { - return factory2.createLogicalAnd( - factory2.createStrictInequality(factory2.createTypeOfExpression(left), factory2.createStringLiteral("undefined")), - right - ); - } - function serializeEntityNameAsExpressionFallback(node) { - if (node.kind === 80 /* Identifier */) { - const copied = serializeEntityNameAsExpression(node); - return createCheckedValue(copied, copied); - } - if (node.left.kind === 80 /* Identifier */) { - return createCheckedValue(serializeEntityNameAsExpression(node.left), serializeEntityNameAsExpression(node)); - } - const left = serializeEntityNameAsExpressionFallback(node.left); - const temp = factory2.createTempVariable(hoistVariableDeclaration); - return factory2.createLogicalAnd( - factory2.createLogicalAnd( - left.left, - factory2.createStrictInequality(factory2.createAssignment(temp, left.right), factory2.createVoidZero()) - ), - factory2.createPropertyAccessExpression(temp, node.right) - ); - } - function serializeEntityNameAsExpression(node) { - switch (node.kind) { - case 80 /* Identifier */: - const name = setParent(setTextRange(parseNodeFactory.cloneNode(node), node), node.parent); - name.original = void 0; - setParent(name, getParseTreeNode(currentLexicalScope)); - return name; - case 166 /* QualifiedName */: - return serializeQualifiedNameAsExpression(node); - } - } - function serializeQualifiedNameAsExpression(node) { - return factory2.createPropertyAccessExpression(serializeEntityNameAsExpression(node.left), node.right); - } - function getGlobalConstructorWithFallback(name) { - return factory2.createConditionalExpression( - factory2.createTypeCheck(factory2.createIdentifier(name), "function"), - /*questionToken*/ - void 0, - factory2.createIdentifier(name), - /*colonToken*/ - void 0, - factory2.createIdentifier("Object") - ); - } - function getGlobalConstructor(name, minLanguageVersion) { - return languageVersion < minLanguageVersion ? getGlobalConstructorWithFallback(name) : factory2.createIdentifier(name); - } - } - var init_typeSerializer = __esm({ - "src/compiler/transformers/typeSerializer.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/legacyDecorators.ts - function transformLegacyDecorators(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - hoistVariableDeclaration - } = context; - const resolver = context.getEmitResolver(); - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); - const previousOnSubstituteNode = context.onSubstituteNode; - context.onSubstituteNode = onSubstituteNode; - let classAliases; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - const visited = visitEachChild(node, visitor, context); - addEmitHelpers(visited, context.readEmitHelpers()); - return visited; - } - function modifierVisitor(node) { - return isDecorator(node) ? void 0 : node; - } - function visitor(node) { - if (!(node.transformFlags & 33554432 /* ContainsDecorators */)) { - return node; - } - switch (node.kind) { - case 170 /* Decorator */: - return void 0; - case 263 /* ClassDeclaration */: - return visitClassDeclaration(node); - case 231 /* ClassExpression */: - return visitClassExpression(node); - case 176 /* Constructor */: - return visitConstructorDeclaration(node); - case 174 /* MethodDeclaration */: - return visitMethodDeclaration(node); - case 178 /* SetAccessor */: - return visitSetAccessorDeclaration(node); - case 177 /* GetAccessor */: - return visitGetAccessorDeclaration(node); - case 172 /* PropertyDeclaration */: - return visitPropertyDeclaration(node); - case 169 /* Parameter */: - return visitParameterDeclaration(node); - default: - return visitEachChild(node, visitor, context); - } - } - function visitClassDeclaration(node) { - if (!(classOrConstructorParameterIsDecorated( - /*useLegacyDecorators*/ - true, - node - ) || childIsDecorated( - /*useLegacyDecorators*/ - true, - node - ))) { - return visitEachChild(node, visitor, context); - } - const statements = classOrConstructorParameterIsDecorated( - /*useLegacyDecorators*/ - true, - node - ) ? transformClassDeclarationWithClassDecorators(node, node.name) : transformClassDeclarationWithoutClassDecorators(node, node.name); - return singleOrMany(statements); - } - function decoratorContainsPrivateIdentifierInExpression(decorator) { - return !!(decorator.transformFlags & 536870912 /* ContainsPrivateIdentifierInExpression */); - } - function parameterDecoratorsContainPrivateIdentifierInExpression(parameterDecorators) { - return some(parameterDecorators, decoratorContainsPrivateIdentifierInExpression); - } - function hasClassElementWithDecoratorContainingPrivateIdentifierInExpression(node) { - for (const member of node.members) { - if (!canHaveDecorators(member)) - continue; - const allDecorators = getAllDecoratorsOfClassElement( - member, - node, - /*useLegacyDecorators*/ - true - ); - if (some(allDecorators == null ? void 0 : allDecorators.decorators, decoratorContainsPrivateIdentifierInExpression)) - return true; - if (some(allDecorators == null ? void 0 : allDecorators.parameters, parameterDecoratorsContainPrivateIdentifierInExpression)) - return true; - } - return false; - } - function transformDecoratorsOfClassElements(node, members) { - let decorationStatements = []; - addClassElementDecorationStatements( - decorationStatements, - node, - /*isStatic*/ - false - ); - addClassElementDecorationStatements( - decorationStatements, - node, - /*isStatic*/ - true - ); - if (hasClassElementWithDecoratorContainingPrivateIdentifierInExpression(node)) { - members = setTextRange(factory2.createNodeArray([ - ...members, - factory2.createClassStaticBlockDeclaration( - factory2.createBlock( - decorationStatements, - /*multiLine*/ - true - ) - ) - ]), members); - decorationStatements = void 0; - } - return { decorationStatements, members }; - } - function transformClassDeclarationWithoutClassDecorators(node, name) { - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); - let members = visitNodes2(node.members, visitor, isClassElement); - let decorationStatements = []; - ({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members)); - const updated = factory2.updateClassDeclaration( - node, - modifiers, - name, - /*typeParameters*/ - void 0, - heritageClauses, - members - ); - return addRange([updated], decorationStatements); - } - function transformClassDeclarationWithClassDecorators(node, name) { - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); - const modifiers = visitNodes2(node.modifiers, (node2) => isExportOrDefaultModifier(node2) || isDecorator(node2) ? void 0 : node2, isModifierLike); - const location = moveRangePastModifiers(node); - const classAlias = getClassAliasIfNeeded(node); - const declName = languageVersion < 2 /* ES2015 */ ? factory2.getInternalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ) : factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ); - const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); - let members = visitNodes2(node.members, visitor, isClassElement); - let decorationStatements = []; - ({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members)); - const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 32 /* Static */) || isClassStaticBlockDeclaration(member)); - if (assignClassAliasInStaticBlock) { - members = setTextRange(factory2.createNodeArray([ - factory2.createClassStaticBlockDeclaration( - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createAssignment(classAlias, factory2.createThis()) - ) - ]) - ), - ...members - ]), members); - } - const classExpression = factory2.createClassExpression( - modifiers, - name && isGeneratedIdentifier(name) ? void 0 : name, - /*typeParameters*/ - void 0, - heritageClauses, - members - ); - setOriginalNode(classExpression, node); - setTextRange(classExpression, location); - const varInitializer = classAlias && !assignClassAliasInStaticBlock ? factory2.createAssignment(classAlias, classExpression) : classExpression; - const varDecl = factory2.createVariableDeclaration( - declName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - varInitializer - ); - setOriginalNode(varDecl, node); - const varDeclList = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); - const varStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - varDeclList - ); - setOriginalNode(varStatement, node); - setTextRange(varStatement, location); - setCommentRange(varStatement, node); - const statements = [varStatement]; - addRange(statements, decorationStatements); - addConstructorDecorationStatement(statements, node); - if (isExport) { - if (isDefault) { - const exportStatement = factory2.createExportDefault(declName); - statements.push(exportStatement); - } else { - const exportStatement = factory2.createExternalModuleExport(factory2.getDeclarationName(node)); - statements.push(exportStatement); - } - } - return statements; - } - function visitClassExpression(node) { - return factory2.updateClassExpression( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - node.name, - /*typeParameters*/ - void 0, - visitNodes2(node.heritageClauses, visitor, isHeritageClause), - visitNodes2(node.members, visitor, isClassElement) - ); - } - function visitConstructorDeclaration(node) { - return factory2.updateConstructorDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock) - ); - } - function finishClassElement(updated, original) { - if (updated !== original) { - setCommentRange(updated, original); - setSourceMapRange(updated, moveRangePastModifiers(original)); - } - return updated; - } - function visitMethodDeclaration(node) { - return finishClassElement(factory2.updateMethodDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - node.asteriskToken, - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitNode(node.body, visitor, isBlock) - ), node); - } - function visitGetAccessorDeclaration(node) { - return finishClassElement(factory2.updateGetAccessorDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitNode(node.body, visitor, isBlock) - ), node); - } - function visitSetAccessorDeclaration(node) { - return finishClassElement(factory2.updateSetAccessorDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock) - ), node); - } - function visitPropertyDeclaration(node) { - if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { - return void 0; - } - return finishClassElement(factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ), node); - } - function visitParameterDeclaration(node) { - const updated = factory2.updateParameterDeclaration( - node, - elideNodes(factory2, node.modifiers), - node.dotDotDotToken, - Debug.checkDefined(visitNode(node.name, visitor, isBindingName)), - /*questionToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); - if (updated !== node) { - setCommentRange(updated, node); - setTextRange(updated, moveRangePastModifiers(node)); - setSourceMapRange(updated, moveRangePastModifiers(node)); - setEmitFlags(updated.name, 64 /* NoTrailingSourceMap */); - } - return updated; - } - function isSyntheticMetadataDecorator(node) { - return isCallToHelper(node.expression, "___metadata"); - } - function transformAllDecoratorsOfDeclaration(allDecorators) { - if (!allDecorators) { - return void 0; - } - const { false: decorators, true: metadata } = groupBy(allDecorators.decorators, isSyntheticMetadataDecorator); - const decoratorExpressions = []; - addRange(decoratorExpressions, map(decorators, transformDecorator)); - addRange(decoratorExpressions, flatMap(allDecorators.parameters, transformDecoratorsOfParameter)); - addRange(decoratorExpressions, map(metadata, transformDecorator)); - return decoratorExpressions; - } - function addClassElementDecorationStatements(statements, node, isStatic2) { - addRange(statements, map(generateClassElementDecorationExpressions(node, isStatic2), (expr) => factory2.createExpressionStatement(expr))); - } - function isDecoratedClassElement(member, isStaticElement, parent2) { - return nodeOrChildIsDecorated( - /*useLegacyDecorators*/ - true, - member, - parent2 - ) && isStaticElement === isStatic(member); - } - function getDecoratedClassElements(node, isStatic2) { - return filter(node.members, (m) => isDecoratedClassElement(m, isStatic2, node)); - } - function generateClassElementDecorationExpressions(node, isStatic2) { - const members = getDecoratedClassElements(node, isStatic2); - let expressions; - for (const member of members) { - expressions = append(expressions, generateClassElementDecorationExpression(node, member)); - } - return expressions; - } - function generateClassElementDecorationExpression(node, member) { - const allDecorators = getAllDecoratorsOfClassElement( - member, - node, - /*useLegacyDecorators*/ - true - ); - const decoratorExpressions = transformAllDecoratorsOfDeclaration(allDecorators); - if (!decoratorExpressions) { - return void 0; - } - const prefix = getClassMemberPrefix(node, member); - const memberName = getExpressionForPropertyName( - member, - /*generateNameForComputedPropertyName*/ - !hasSyntacticModifier(member, 2 /* Ambient */) - ); - const descriptor = languageVersion > 0 /* ES3 */ ? isPropertyDeclaration(member) && !hasAccessorModifier(member) ? factory2.createVoidZero() : factory2.createNull() : void 0; - const helper = emitHelpers().createDecorateHelper( - decoratorExpressions, - prefix, - memberName, - descriptor - ); - setEmitFlags(helper, 3072 /* NoComments */); - setSourceMapRange(helper, moveRangePastModifiers(member)); - return helper; - } - function addConstructorDecorationStatement(statements, node) { - const expression = generateConstructorDecorationExpression(node); - if (expression) { - statements.push(setOriginalNode(factory2.createExpressionStatement(expression), node)); - } - } - function generateConstructorDecorationExpression(node) { - const allDecorators = getAllDecoratorsOfClass(node); - const decoratorExpressions = transformAllDecoratorsOfDeclaration(allDecorators); - if (!decoratorExpressions) { - return void 0; - } - const classAlias = classAliases && classAliases[getOriginalNodeId(node)]; - const localName = languageVersion < 2 /* ES2015 */ ? factory2.getInternalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ) : factory2.getDeclarationName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ); - const decorate = emitHelpers().createDecorateHelper(decoratorExpressions, localName); - const expression = factory2.createAssignment(localName, classAlias ? factory2.createAssignment(classAlias, decorate) : decorate); - setEmitFlags(expression, 3072 /* NoComments */); - setSourceMapRange(expression, moveRangePastModifiers(node)); - return expression; - } - function transformDecorator(decorator) { - return Debug.checkDefined(visitNode(decorator.expression, visitor, isExpression)); - } - function transformDecoratorsOfParameter(decorators, parameterOffset) { - let expressions; - if (decorators) { - expressions = []; - for (const decorator of decorators) { - const helper = emitHelpers().createParamHelper( - transformDecorator(decorator), - parameterOffset - ); - setTextRange(helper, decorator.expression); - setEmitFlags(helper, 3072 /* NoComments */); - expressions.push(helper); - } - } - return expressions; - } - function getExpressionForPropertyName(member, generateNameForComputedPropertyName) { - const name = member.name; - if (isPrivateIdentifier(name)) { - return factory2.createIdentifier(""); - } else if (isComputedPropertyName(name)) { - return generateNameForComputedPropertyName && !isSimpleInlineableExpression(name.expression) ? factory2.getGeneratedNameForNode(name) : name.expression; - } else if (isIdentifier(name)) { - return factory2.createStringLiteral(idText(name)); - } else { - return factory2.cloneNode(name); - } - } - function enableSubstitutionForClassAliases() { - if (!classAliases) { - context.enableSubstitution(80 /* Identifier */); - classAliases = []; - } - } - function getClassAliasIfNeeded(node) { - if (resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */) { - enableSubstitutionForClassAliases(); - const classAlias = factory2.createUniqueName(node.name && !isGeneratedIdentifier(node.name) ? idText(node.name) : "default"); - classAliases[getOriginalNodeId(node)] = classAlias; - hoistVariableDeclaration(classAlias); - return classAlias; - } - } - function getClassPrototype(node) { - return factory2.createPropertyAccessExpression(factory2.getDeclarationName(node), "prototype"); - } - function getClassMemberPrefix(node, member) { - return isStatic(member) ? factory2.getDeclarationName(node) : getClassPrototype(node); - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (hint === 1 /* Expression */) { - return substituteExpression(node); - } - return node; - } - function substituteExpression(node) { - switch (node.kind) { - case 80 /* Identifier */: - return substituteExpressionIdentifier(node); - } - return node; - } - function substituteExpressionIdentifier(node) { - return trySubstituteClassAlias(node) ?? node; - } - function trySubstituteClassAlias(node) { - if (classAliases) { - if (resolver.getNodeCheckFlags(node) & 536870912 /* ConstructorReference */) { - const declaration = resolver.getReferencedValueDeclaration(node); - if (declaration) { - const classAlias = classAliases[declaration.id]; - if (classAlias) { - const clone2 = factory2.cloneNode(classAlias); - setSourceMapRange(clone2, node); - setCommentRange(clone2, node); - return clone2; - } - } - } - } - return void 0; - } - } - var init_legacyDecorators = __esm({ - "src/compiler/transformers/legacyDecorators.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/esDecorators.ts - function transformESDecorators(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - startLexicalEnvironment, - endLexicalEnvironment, - hoistVariableDeclaration - } = context; - const languageVersion = getEmitScriptTarget(context.getCompilerOptions()); - let top; - let classInfo; - let classThis; - let classSuper; - let pendingExpressions; - let shouldTransformPrivateStaticElementsInFile; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - top = void 0; - shouldTransformPrivateStaticElementsInFile = false; - const visited = visitEachChild(node, visitor, context); - addEmitHelpers(visited, context.readEmitHelpers()); - if (shouldTransformPrivateStaticElementsInFile) { - addInternalEmitFlags(visited, 32 /* TransformPrivateStaticElements */); - shouldTransformPrivateStaticElementsInFile = false; - } - return visited; - } - function updateState() { - classInfo = void 0; - classThis = void 0; - classSuper = void 0; - switch (top == null ? void 0 : top.kind) { - case "class": - classInfo = top.classInfo; - break; - case "class-element": - classInfo = top.next.classInfo; - classThis = top.classThis; - classSuper = top.classSuper; - break; - case "name": - const grandparent = top.next.next.next; - if ((grandparent == null ? void 0 : grandparent.kind) === "class-element") { - classInfo = grandparent.next.classInfo; - classThis = grandparent.classThis; - classSuper = grandparent.classSuper; - } - break; - } - } - function enterClass(classInfo2) { - top = { kind: "class", next: top, classInfo: classInfo2, savedPendingExpressions: pendingExpressions }; - pendingExpressions = void 0; - updateState(); - } - function exitClass() { - Debug.assert((top == null ? void 0 : top.kind) === "class", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class' but got '${top == null ? void 0 : top.kind}' instead.`); - pendingExpressions = top.savedPendingExpressions; - top = top.next; - updateState(); - } - function enterClassElement(node) { - var _a, _b; - Debug.assert((top == null ? void 0 : top.kind) === "class", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class' but got '${top == null ? void 0 : top.kind}' instead.`); - top = { kind: "class-element", next: top }; - if (isClassStaticBlockDeclaration(node) || isPropertyDeclaration(node) && hasStaticModifier(node)) { - top.classThis = (_a = top.next.classInfo) == null ? void 0 : _a.classThis; - top.classSuper = (_b = top.next.classInfo) == null ? void 0 : _b.classSuper; - } - updateState(); - } - function exitClassElement() { - var _a; - Debug.assert((top == null ? void 0 : top.kind) === "class-element", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class-element' but got '${top == null ? void 0 : top.kind}' instead.`); - Debug.assert(((_a = top.next) == null ? void 0 : _a.kind) === "class", "Incorrect value for top.next.kind.", () => { - var _a2; - return `Expected top.next.kind to be 'class' but got '${(_a2 = top.next) == null ? void 0 : _a2.kind}' instead.`; - }); - top = top.next; - updateState(); - } - function enterName() { - Debug.assert((top == null ? void 0 : top.kind) === "class-element", "Incorrect value for top.kind.", () => `Expected top.kind to be 'class-element' but got '${top == null ? void 0 : top.kind}' instead.`); - top = { kind: "name", next: top }; - updateState(); - } - function exitName() { - Debug.assert((top == null ? void 0 : top.kind) === "name", "Incorrect value for top.kind.", () => `Expected top.kind to be 'name' but got '${top == null ? void 0 : top.kind}' instead.`); - top = top.next; - updateState(); - } - function enterOther() { - if ((top == null ? void 0 : top.kind) === "other") { - Debug.assert(!pendingExpressions); - top.depth++; - } else { - top = { kind: "other", next: top, depth: 0, savedPendingExpressions: pendingExpressions }; - pendingExpressions = void 0; - updateState(); - } - } - function exitOther() { - Debug.assert((top == null ? void 0 : top.kind) === "other", "Incorrect value for top.kind.", () => `Expected top.kind to be 'other' but got '${top == null ? void 0 : top.kind}' instead.`); - if (top.depth > 0) { - Debug.assert(!pendingExpressions); - top.depth--; - } else { - pendingExpressions = top.savedPendingExpressions; - top = top.next; - updateState(); - } - } - function shouldVisitNode(node) { - return !!(node.transformFlags & 33554432 /* ContainsDecorators */) || !!classThis && !!(node.transformFlags & 16384 /* ContainsLexicalThis */) || !!classThis && !!classSuper && !!(node.transformFlags & 134217728 /* ContainsLexicalSuper */); - } - function visitor(node) { - if (!shouldVisitNode(node)) { - return node; - } - switch (node.kind) { - case 170 /* Decorator */: - return Debug.fail("Use `modifierVisitor` instead."); - case 263 /* ClassDeclaration */: - return visitClassDeclaration(node); - case 231 /* ClassExpression */: - return visitClassExpression(node); - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 175 /* ClassStaticBlockDeclaration */: - return Debug.fail("Not supported outside of a class. Use 'classElementVisitor' instead."); - case 169 /* Parameter */: - return visitParameterDeclaration(node); - case 226 /* BinaryExpression */: - return visitBinaryExpression( - node, - /*discarded*/ - false - ); - case 303 /* PropertyAssignment */: - return visitPropertyAssignment(node); - case 260 /* VariableDeclaration */: - return visitVariableDeclaration(node); - case 208 /* BindingElement */: - return visitBindingElement(node); - case 277 /* ExportAssignment */: - return visitExportAssignment(node); - case 110 /* ThisKeyword */: - return visitThisExpression(node); - case 248 /* ForStatement */: - return visitForStatement(node); - case 244 /* ExpressionStatement */: - return visitExpressionStatement(node); - case 361 /* CommaListExpression */: - return visitCommaListExpression( - node, - /*discarded*/ - false - ); - case 217 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - false - ); - case 360 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression( - node, - /*discarded*/ - false - ); - case 213 /* CallExpression */: - return visitCallExpression(node); - case 215 /* TaggedTemplateExpression */: - return visitTaggedTemplateExpression(node); - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - return visitPreOrPostfixUnaryExpression( - node, - /*discarded*/ - false - ); - case 211 /* PropertyAccessExpression */: - return visitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: - return visitElementAccessExpression(node); - case 167 /* ComputedPropertyName */: - return visitComputedPropertyName(node); - case 174 /* MethodDeclaration */: - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: { - enterOther(); - const result = visitEachChild(node, fallbackVisitor, context); - exitOther(); - return result; - } - default: - return visitEachChild(node, fallbackVisitor, context); - } - } - function fallbackVisitor(node) { - switch (node.kind) { - case 170 /* Decorator */: - return void 0; - default: - return visitor(node); - } - } - function modifierVisitor(node) { - switch (node.kind) { - case 170 /* Decorator */: - return void 0; - default: - return node; - } - } - function classElementVisitor(node) { - switch (node.kind) { - case 176 /* Constructor */: - return visitConstructorDeclaration(node); - case 174 /* MethodDeclaration */: - return visitMethodDeclaration(node); - case 177 /* GetAccessor */: - return visitGetAccessorDeclaration(node); - case 178 /* SetAccessor */: - return visitSetAccessorDeclaration(node); - case 172 /* PropertyDeclaration */: - return visitPropertyDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: - return visitClassStaticBlockDeclaration(node); - default: - return visitor(node); - } - } - function discardedValueVisitor(node) { - switch (node.kind) { - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - return visitPreOrPostfixUnaryExpression( - node, - /*discarded*/ - true - ); - case 226 /* BinaryExpression */: - return visitBinaryExpression( - node, - /*discarded*/ - true - ); - case 361 /* CommaListExpression */: - return visitCommaListExpression( - node, - /*discarded*/ - true - ); - case 217 /* ParenthesizedExpression */: - return visitParenthesizedExpression( - node, - /*discarded*/ - true - ); - default: - return visitor(node); - } - } - function getHelperVariableName(node) { - let declarationName = node.name && isIdentifier(node.name) && !isGeneratedIdentifier(node.name) ? idText(node.name) : node.name && isPrivateIdentifier(node.name) && !isGeneratedIdentifier(node.name) ? idText(node.name).slice(1) : node.name && isStringLiteral(node.name) && isIdentifierText(node.name.text, 99 /* ESNext */) ? node.name.text : isClassLike(node) ? "class" : "member"; - if (isGetAccessor(node)) - declarationName = `get_${declarationName}`; - if (isSetAccessor(node)) - declarationName = `set_${declarationName}`; - if (node.name && isPrivateIdentifier(node.name)) - declarationName = `private_${declarationName}`; - if (isStatic(node)) - declarationName = `static_${declarationName}`; - return "_" + declarationName; - } - function createHelperVariable(node, suffix) { - return factory2.createUniqueName(`${getHelperVariableName(node)}_${suffix}`, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */); - } - function createLet(name, initializer) { - return factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ) - ], 1 /* Let */) - ); - } - function createClassInfo(node) { - const metadataReference = factory2.createUniqueName("_metadata", 16 /* Optimistic */ | 32 /* FileLevel */); - let instanceExtraInitializersName; - let staticExtraInitializersName; - let hasStaticInitializers = false; - let hasNonAmbientInstanceFields = false; - let hasStaticPrivateClassElements = false; - for (const member of node.members) { - if (isNamedClassElement(member) && nodeOrChildIsDecorated( - /*useLegacyDecorators*/ - false, - member, - node - )) { - if (hasStaticModifier(member)) { - staticExtraInitializersName ?? (staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); - } else { - instanceExtraInitializersName ?? (instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); - } - } - if (isClassStaticBlockDeclaration(member)) { - if (!isClassNamedEvaluationHelperBlock(member)) { - hasStaticInitializers = true; - } - } else if (isPropertyDeclaration(member)) { - if (hasStaticModifier(member)) { - hasStaticInitializers || (hasStaticInitializers = !!member.initializer || hasDecorators(member)); - } else { - hasNonAmbientInstanceFields || (hasNonAmbientInstanceFields = !isAmbientPropertyDeclaration(member)); - } - } - if ((isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)) { - hasStaticPrivateClassElements = true; - } - if (staticExtraInitializersName && instanceExtraInitializersName && hasStaticInitializers && hasNonAmbientInstanceFields && hasStaticPrivateClassElements) { - break; - } - } - return { - class: node, - metadataReference, - instanceExtraInitializersName, - staticExtraInitializersName, - hasStaticInitializers, - hasNonAmbientInstanceFields, - hasStaticPrivateClassElements - }; - } - function transformClassLike(node) { - startLexicalEnvironment(); - if (!classHasDeclaredOrExplicitlyAssignedName(node) && classOrConstructorParameterIsDecorated( - /*useLegacyDecorators*/ - false, - node - )) { - node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, factory2.createStringLiteral("")); - } - const classReference = factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - false, - /*ignoreAssignedName*/ - true - ); - const classInfo2 = createClassInfo(node); - const classDefinitionStatements = []; - let leadingBlockStatements; - let trailingBlockStatements; - let syntheticConstructor; - let heritageClauses; - let shouldTransformPrivateStaticElementsInClass = false; - const classDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClass(node)); - if (classDecorators) { - classInfo2.classDecoratorsName = factory2.createUniqueName("_classDecorators", 16 /* Optimistic */ | 32 /* FileLevel */); - classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */); - classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */); - const needsUniqueClassThis = some(node.members, (member) => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)); - classInfo2.classThis = factory2.createUniqueName("_classThis", needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */); - classDefinitionStatements.push( - createLet(classInfo2.classDecoratorsName, factory2.createArrayLiteralExpression(classDecorators)), - createLet(classInfo2.classDescriptorName), - createLet(classInfo2.classExtraInitializersName, factory2.createArrayLiteralExpression()), - createLet(classInfo2.classThis) - ); - if (classInfo2.hasStaticPrivateClassElements) { - shouldTransformPrivateStaticElementsInClass = true; - shouldTransformPrivateStaticElementsInFile = true; - } - } - const extendsClause = getHeritageClause(node.heritageClauses, 96 /* ExtendsKeyword */); - const extendsElement = extendsClause && firstOrUndefined(extendsClause.types); - const extendsExpression = extendsElement && visitNode(extendsElement.expression, visitor, isExpression); - if (extendsExpression) { - classInfo2.classSuper = factory2.createUniqueName("_classSuper", 16 /* Optimistic */ | 32 /* FileLevel */); - const unwrapped = skipOuterExpressions(extendsExpression); - const safeExtendsExpression = isClassExpression(unwrapped) && !unwrapped.name || isFunctionExpression(unwrapped) && !unwrapped.name || isArrowFunction(unwrapped) ? factory2.createComma(factory2.createNumericLiteral(0), extendsExpression) : extendsExpression; - classDefinitionStatements.push(createLet(classInfo2.classSuper, safeExtendsExpression)); - const updatedExtendsElement = factory2.updateExpressionWithTypeArguments( - extendsElement, - classInfo2.classSuper, - /*typeArguments*/ - void 0 - ); - const updatedExtendsClause = factory2.updateHeritageClause(extendsClause, [updatedExtendsElement]); - heritageClauses = factory2.createNodeArray([updatedExtendsClause]); - } - const renamedClassThis = classInfo2.classThis ?? factory2.createThis(); - enterClass(classInfo2); - leadingBlockStatements = append(leadingBlockStatements, createMetadata(classInfo2.metadataReference, classInfo2.classSuper)); - let members = visitNodes2(node.members, classElementVisitor, isClassElement); - if (pendingExpressions) { - let outerThis; - for (let expression of pendingExpressions) { - expression = visitNode(expression, function thisVisitor(node2) { - if (!(node2.transformFlags & 16384 /* ContainsLexicalThis */)) { - return node2; - } - switch (node2.kind) { - case 110 /* ThisKeyword */: - if (!outerThis) { - outerThis = factory2.createUniqueName("_outerThis", 16 /* Optimistic */); - classDefinitionStatements.unshift(createLet(outerThis, factory2.createThis())); - } - return outerThis; - default: - return visitEachChild(node2, thisVisitor, context); - } - }, isExpression); - const statement = factory2.createExpressionStatement(expression); - leadingBlockStatements = append(leadingBlockStatements, statement); - } - pendingExpressions = void 0; - } - exitClass(); - if (classInfo2.instanceExtraInitializersName && !getFirstConstructorWithBody(node)) { - const initializerStatements = prepareConstructor(node, classInfo2); - if (initializerStatements) { - const extendsClauseElement = getEffectiveBaseTypeNode(node); - const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */); - const constructorStatements = []; - if (isDerivedClass) { - const spreadArguments = factory2.createSpreadElement(factory2.createIdentifier("arguments")); - const superCall = factory2.createCallExpression( - factory2.createSuper(), - /*typeArguments*/ - void 0, - [spreadArguments] - ); - constructorStatements.push(factory2.createExpressionStatement(superCall)); - } - addRange(constructorStatements, initializerStatements); - const constructorBody = factory2.createBlock( - constructorStatements, - /*multiLine*/ - true - ); - syntheticConstructor = factory2.createConstructorDeclaration( - /*modifiers*/ - void 0, - [], - constructorBody - ); - } - } - if (classInfo2.staticExtraInitializersName) { - classDefinitionStatements.push( - createLet(classInfo2.staticExtraInitializersName, factory2.createArrayLiteralExpression()) - ); - } - if (classInfo2.instanceExtraInitializersName) { - classDefinitionStatements.push( - createLet(classInfo2.instanceExtraInitializersName, factory2.createArrayLiteralExpression()) - ); - } - if (classInfo2.memberInfos) { - forEachEntry(classInfo2.memberInfos, (memberInfo, member) => { - if (isStatic(member)) { - classDefinitionStatements.push(createLet(memberInfo.memberDecoratorsName)); - if (memberInfo.memberInitializersName) { - classDefinitionStatements.push(createLet(memberInfo.memberInitializersName, factory2.createArrayLiteralExpression())); - } - if (memberInfo.memberDescriptorName) { - classDefinitionStatements.push(createLet(memberInfo.memberDescriptorName)); - } - } - }); - } - if (classInfo2.memberInfos) { - forEachEntry(classInfo2.memberInfos, (memberInfo, member) => { - if (!isStatic(member)) { - classDefinitionStatements.push(createLet(memberInfo.memberDecoratorsName)); - if (memberInfo.memberInitializersName) { - classDefinitionStatements.push(createLet(memberInfo.memberInitializersName, factory2.createArrayLiteralExpression())); - } - if (memberInfo.memberDescriptorName) { - classDefinitionStatements.push(createLet(memberInfo.memberDescriptorName)); - } - } - }); - } - leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.staticNonFieldDecorationStatements); - leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.nonStaticNonFieldDecorationStatements); - leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.staticFieldDecorationStatements); - leadingBlockStatements = addRange(leadingBlockStatements, classInfo2.nonStaticFieldDecorationStatements); - if (classInfo2.classDescriptorName && classInfo2.classDecoratorsName && classInfo2.classExtraInitializersName && classInfo2.classThis) { - leadingBlockStatements ?? (leadingBlockStatements = []); - const valueProperty = factory2.createPropertyAssignment("value", renamedClassThis); - const classDescriptor = factory2.createObjectLiteralExpression([valueProperty]); - const classDescriptorAssignment = factory2.createAssignment(classInfo2.classDescriptorName, classDescriptor); - const classNameReference = factory2.createPropertyAccessExpression(renamedClassThis, "name"); - const esDecorateHelper2 = emitHelpers().createESDecorateHelper( - factory2.createNull(), - classDescriptorAssignment, - classInfo2.classDecoratorsName, - { kind: "class", name: classNameReference, metadata: classInfo2.metadataReference }, - factory2.createNull(), - classInfo2.classExtraInitializersName - ); - const esDecorateStatement = factory2.createExpressionStatement(esDecorateHelper2); - setSourceMapRange(esDecorateStatement, moveRangePastDecorators(node)); - leadingBlockStatements.push(esDecorateStatement); - const classDescriptorValueReference = factory2.createPropertyAccessExpression(classInfo2.classDescriptorName, "value"); - const classThisAssignment = factory2.createAssignment(classInfo2.classThis, classDescriptorValueReference); - const classReferenceAssignment = factory2.createAssignment(classReference, classThisAssignment); - leadingBlockStatements.push(factory2.createExpressionStatement(classReferenceAssignment)); - } - leadingBlockStatements.push(createSymbolMetadata(renamedClassThis, classInfo2.metadataReference)); - if (classInfo2.staticExtraInitializersName) { - const runStaticInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo2.staticExtraInitializersName); - const runStaticInitializersStatement = factory2.createExpressionStatement(runStaticInitializersHelper); - setSourceMapRange(runStaticInitializersStatement, node.name ?? moveRangePastDecorators(node)); - leadingBlockStatements = append(leadingBlockStatements, runStaticInitializersStatement); - } - if (classInfo2.classExtraInitializersName) { - const runClassInitializersHelper = emitHelpers().createRunInitializersHelper(renamedClassThis, classInfo2.classExtraInitializersName); - const runClassInitializersStatement = factory2.createExpressionStatement(runClassInitializersHelper); - setSourceMapRange(runClassInitializersStatement, node.name ?? moveRangePastDecorators(node)); - trailingBlockStatements = append(trailingBlockStatements, runClassInitializersStatement); - } - if (leadingBlockStatements && trailingBlockStatements && !classInfo2.hasStaticInitializers) { - addRange(leadingBlockStatements, trailingBlockStatements); - trailingBlockStatements = void 0; - } - const leadingStaticBlock = leadingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( - leadingBlockStatements, - /*multiLine*/ - true - )); - if (leadingStaticBlock && shouldTransformPrivateStaticElementsInClass) { - setInternalEmitFlags(leadingStaticBlock, 32 /* TransformPrivateStaticElements */); - } - const trailingStaticBlock = trailingBlockStatements && factory2.createClassStaticBlockDeclaration(factory2.createBlock( - trailingBlockStatements, - /*multiLine*/ - true - )); - if (leadingStaticBlock || syntheticConstructor || trailingStaticBlock) { - const newMembers = []; - const existingNamedEvaluationHelperBlockIndex = members.findIndex(isClassNamedEvaluationHelperBlock); - if (leadingStaticBlock) { - addRange(newMembers, members, 0, existingNamedEvaluationHelperBlockIndex + 1); - newMembers.push(leadingStaticBlock); - addRange(newMembers, members, existingNamedEvaluationHelperBlockIndex + 1); - } else { - addRange(newMembers, members); - } - if (syntheticConstructor) { - newMembers.push(syntheticConstructor); - } - if (trailingStaticBlock) { - newMembers.push(trailingStaticBlock); - } - members = setTextRange(factory2.createNodeArray(newMembers), members); - } - const lexicalEnvironment = endLexicalEnvironment(); - let classExpression; - if (classDecorators) { - classExpression = factory2.createClassExpression( - /*modifiers*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - heritageClauses, - members - ); - if (classInfo2.classThis) { - classExpression = injectClassThisAssignmentIfMissing(factory2, classExpression, classInfo2.classThis); - } - const classReferenceDeclaration = factory2.createVariableDeclaration( - classReference, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - classExpression - ); - const classReferenceVarDeclList = factory2.createVariableDeclarationList([classReferenceDeclaration]); - const returnExpr = classInfo2.classThis ? factory2.createAssignment(classReference, classInfo2.classThis) : classReference; - classDefinitionStatements.push( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - classReferenceVarDeclList - ), - factory2.createReturnStatement(returnExpr) - ); - } else { - classExpression = factory2.createClassExpression( - /*modifiers*/ - void 0, - node.name, - /*typeParameters*/ - void 0, - heritageClauses, - members - ); - classDefinitionStatements.push(factory2.createReturnStatement(classExpression)); - } - if (shouldTransformPrivateStaticElementsInClass) { - addInternalEmitFlags(classExpression, 32 /* TransformPrivateStaticElements */); - for (const member of classExpression.members) { - if ((isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)) { - addInternalEmitFlags(member, 32 /* TransformPrivateStaticElements */); - } - } - } - setOriginalNode(classExpression, node); - return factory2.createImmediatelyInvokedArrowFunction(factory2.mergeLexicalEnvironment(classDefinitionStatements, lexicalEnvironment)); - } - function isDecoratedClassLike(node) { - return classOrConstructorParameterIsDecorated( - /*useLegacyDecorators*/ - false, - node - ) || childIsDecorated( - /*useLegacyDecorators*/ - false, - node - ); - } - function visitClassDeclaration(node) { - if (isDecoratedClassLike(node)) { - const statements = []; - const originalClass = getOriginalNode(node, isClassLike) ?? node; - const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); - if (!node.name) { - node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className); - } - if (isExport && isDefault) { - const iife = transformClassLike(node); - if (node.name) { - const varDecl = factory2.createVariableDeclaration( - factory2.getLocalName(node), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - iife - ); - setOriginalNode(varDecl, node); - const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); - const varStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - varDecls - ); - statements.push(varStatement); - const exportStatement = factory2.createExportDefault(factory2.getDeclarationName(node)); - setOriginalNode(exportStatement, node); - setCommentRange(exportStatement, getCommentRange(node)); - setSourceMapRange(exportStatement, moveRangePastDecorators(node)); - statements.push(exportStatement); - } else { - const exportStatement = factory2.createExportDefault(iife); - setOriginalNode(exportStatement, node); - setCommentRange(exportStatement, getCommentRange(node)); - setSourceMapRange(exportStatement, moveRangePastDecorators(node)); - statements.push(exportStatement); - } - } else { - Debug.assertIsDefined(node.name, "A class declaration that is not a default export must have a name."); - const iife = transformClassLike(node); - const modifierVisitorNoExport = isExport ? (node2) => isExportModifier(node2) ? void 0 : modifierVisitor(node2) : modifierVisitor; - const modifiers = visitNodes2(node.modifiers, modifierVisitorNoExport, isModifier); - const declName = factory2.getLocalName( - node, - /*allowComments*/ - false, - /*allowSourceMaps*/ - true - ); - const varDecl = factory2.createVariableDeclaration( - declName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - iife - ); - setOriginalNode(varDecl, node); - const varDecls = factory2.createVariableDeclarationList([varDecl], 1 /* Let */); - const varStatement = factory2.createVariableStatement(modifiers, varDecls); - setOriginalNode(varStatement, node); - setCommentRange(varStatement, getCommentRange(node)); - statements.push(varStatement); - if (isExport) { - const exportStatement = factory2.createExternalModuleExport(declName); - setOriginalNode(exportStatement, node); - statements.push(exportStatement); - } - } - return singleOrMany(statements); - } else { - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); - enterClass( - /*classInfo*/ - void 0 - ); - const members = visitNodes2(node.members, classElementVisitor, isClassElement); - exitClass(); - return factory2.updateClassDeclaration( - node, - modifiers, - node.name, - /*typeParameters*/ - void 0, - heritageClauses, - members - ); - } - } - function visitClassExpression(node) { - if (isDecoratedClassLike(node)) { - const iife = transformClassLike(node); - setOriginalNode(iife, node); - return iife; - } else { - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const heritageClauses = visitNodes2(node.heritageClauses, visitor, isHeritageClause); - enterClass( - /*classInfo*/ - void 0 - ); - const members = visitNodes2(node.members, classElementVisitor, isClassElement); - exitClass(); - return factory2.updateClassExpression( - node, - modifiers, - node.name, - /*typeParameters*/ - void 0, - heritageClauses, - members - ); - } - } - function prepareConstructor(_parent, classInfo2) { - if (classInfo2.instanceExtraInitializersName && !classInfo2.hasNonAmbientInstanceFields) { - const statements = []; - statements.push( - factory2.createExpressionStatement( - emitHelpers().createRunInitializersHelper( - factory2.createThis(), - classInfo2.instanceExtraInitializersName - ) - ) - ); - return statements; - } - } - function transformConstructorBodyWorker(statementsOut, statementsIn, statementOffset, superPath, superPathDepth, initializerStatements) { - const superStatementIndex = superPath[superPathDepth]; - const superStatement = statementsIn[superStatementIndex]; - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, superStatementIndex - statementOffset)); - if (isTryStatement(superStatement)) { - const tryBlockStatements = []; - transformConstructorBodyWorker( - tryBlockStatements, - superStatement.tryBlock.statements, - /*statementOffset*/ - 0, - superPath, - superPathDepth + 1, - initializerStatements - ); - const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); - setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); - statementsOut.push(factory2.updateTryStatement( - superStatement, - factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), - visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock) - )); - } else { - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex, 1)); - addRange(statementsOut, initializerStatements); - } - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); - } - function visitConstructorDeclaration(node) { - enterClassElement(node); - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - const parameters = visitNodes2(node.parameters, visitor, isParameter); - let body; - if (node.body && classInfo) { - const initializerStatements = prepareConstructor(classInfo.class, classInfo); - if (initializerStatements) { - const statements = []; - const nonPrologueStart = factory2.copyPrologue( - node.body.statements, - statements, - /*ensureUseStrict*/ - false, - visitor - ); - const superStatementIndices = findSuperStatementIndexPath(node.body.statements, nonPrologueStart); - if (superStatementIndices.length > 0) { - transformConstructorBodyWorker(statements, node.body.statements, nonPrologueStart, superStatementIndices, 0, initializerStatements); - } else { - addRange(statements, initializerStatements); - addRange(statements, visitNodes2(node.body.statements, visitor, isStatement)); - } - body = factory2.createBlock( - statements, - /*multiLine*/ - true - ); - setOriginalNode(body, node.body); - setTextRange(body, node.body); - } - } - body ?? (body = visitNode(node.body, visitor, isBlock)); - exitClassElement(); - return factory2.updateConstructorDeclaration(node, modifiers, parameters, body); - } - function finishClassElement(updated, original) { - if (updated !== original) { - setCommentRange(updated, original); - setSourceMapRange(updated, moveRangePastDecorators(original)); - } - return updated; - } - function partialTransformClassElement(member, classInfo2, createDescriptor) { - let referencedName; - let name; - let initializersName; - let thisArg; - let descriptorName; - if (!classInfo2) { - const modifiers2 = visitNodes2(member.modifiers, modifierVisitor, isModifier); - enterName(); - name = visitPropertyName(member.name); - exitName(); - return { modifiers: modifiers2, referencedName, name, initializersName, descriptorName, thisArg }; - } - const memberDecorators = transformAllDecoratorsOfDeclaration(getAllDecoratorsOfClassElement( - member, - classInfo2.class, - /*useLegacyDecorators*/ - false - )); - const modifiers = visitNodes2(member.modifiers, modifierVisitor, isModifier); - if (memberDecorators) { - const memberDecoratorsName = createHelperVariable(member, "decorators"); - const memberDecoratorsArray = factory2.createArrayLiteralExpression(memberDecorators); - const memberDecoratorsAssignment = factory2.createAssignment(memberDecoratorsName, memberDecoratorsArray); - const memberInfo = { memberDecoratorsName }; - classInfo2.memberInfos ?? (classInfo2.memberInfos = /* @__PURE__ */ new Map()); - classInfo2.memberInfos.set(member, memberInfo); - pendingExpressions ?? (pendingExpressions = []); - pendingExpressions.push(memberDecoratorsAssignment); - const statements = isMethodOrAccessor(member) || isAutoAccessorPropertyDeclaration(member) ? isStatic(member) ? classInfo2.staticNonFieldDecorationStatements ?? (classInfo2.staticNonFieldDecorationStatements = []) : classInfo2.nonStaticNonFieldDecorationStatements ?? (classInfo2.nonStaticNonFieldDecorationStatements = []) : isPropertyDeclaration(member) && !isAutoAccessorPropertyDeclaration(member) ? isStatic(member) ? classInfo2.staticFieldDecorationStatements ?? (classInfo2.staticFieldDecorationStatements = []) : classInfo2.nonStaticFieldDecorationStatements ?? (classInfo2.nonStaticFieldDecorationStatements = []) : Debug.fail(); - const kind = isGetAccessorDeclaration(member) ? "getter" : isSetAccessorDeclaration(member) ? "setter" : isMethodDeclaration(member) ? "method" : isAutoAccessorPropertyDeclaration(member) ? "accessor" : isPropertyDeclaration(member) ? "field" : Debug.fail(); - let propertyName; - if (isIdentifier(member.name) || isPrivateIdentifier(member.name)) { - propertyName = { computed: false, name: member.name }; - } else if (isPropertyNameLiteral(member.name)) { - propertyName = { computed: true, name: factory2.createStringLiteralFromNode(member.name) }; - } else { - const expression = member.name.expression; - if (isPropertyNameLiteral(expression) && !isIdentifier(expression)) { - propertyName = { computed: true, name: factory2.createStringLiteralFromNode(expression) }; - } else { - enterName(); - ({ referencedName, name } = visitReferencedPropertyName(member.name)); - propertyName = { computed: true, name: referencedName }; - exitName(); - } - } - const context2 = { - kind, - name: propertyName, - static: isStatic(member), - private: isPrivateIdentifier(member.name), - access: { - // 15.7.3 CreateDecoratorAccessObject (kind, name) - // 2. If _kind_ is ~field~, ~method~, ~accessor~, or ~getter~, then ... - get: isPropertyDeclaration(member) || isGetAccessorDeclaration(member) || isMethodDeclaration(member), - // 3. If _kind_ is ~field~, ~accessor~, or ~setter~, then ... - set: isPropertyDeclaration(member) || isSetAccessorDeclaration(member) - }, - metadata: classInfo2.metadataReference - }; - const extraInitializers = isStatic(member) ? classInfo2.staticExtraInitializersName ?? (classInfo2.staticExtraInitializersName = factory2.createUniqueName("_staticExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)) : classInfo2.instanceExtraInitializersName ?? (classInfo2.instanceExtraInitializersName = factory2.createUniqueName("_instanceExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */)); - if (isMethodOrAccessor(member)) { - let descriptor; - if (isPrivateIdentifierClassElementDeclaration(member) && createDescriptor) { - descriptor = createDescriptor(member, visitNodes2(modifiers, (node) => tryCast(node, isAsyncModifier), isModifier)); - memberInfo.memberDescriptorName = descriptorName = createHelperVariable(member, "descriptor"); - descriptor = factory2.createAssignment(descriptorName, descriptor); - } - const esDecorateExpression = emitHelpers().createESDecorateHelper(factory2.createThis(), descriptor ?? factory2.createNull(), memberDecoratorsName, context2, factory2.createNull(), extraInitializers); - const esDecorateStatement = factory2.createExpressionStatement(esDecorateExpression); - setSourceMapRange(esDecorateStatement, moveRangePastDecorators(member)); - statements.push(esDecorateStatement); - } else if (isPropertyDeclaration(member)) { - initializersName = memberInfo.memberInitializersName ?? (memberInfo.memberInitializersName = createHelperVariable(member, "initializers")); - if (isStatic(member)) { - thisArg = classInfo2.classThis; - } - let descriptor; - if (isPrivateIdentifierClassElementDeclaration(member) && hasAccessorModifier(member) && createDescriptor) { - descriptor = createDescriptor( - member, - /*modifiers*/ - void 0 - ); - memberInfo.memberDescriptorName = descriptorName = createHelperVariable(member, "descriptor"); - descriptor = factory2.createAssignment(descriptorName, descriptor); - } - const esDecorateExpression = emitHelpers().createESDecorateHelper( - isAutoAccessorPropertyDeclaration(member) ? factory2.createThis() : factory2.createNull(), - descriptor ?? factory2.createNull(), - memberDecoratorsName, - context2, - initializersName, - extraInitializers - ); - const esDecorateStatement = factory2.createExpressionStatement(esDecorateExpression); - setSourceMapRange(esDecorateStatement, moveRangePastDecorators(member)); - statements.push(esDecorateStatement); - } - } - if (name === void 0) { - enterName(); - name = visitPropertyName(member.name); - exitName(); - } - if (!some(modifiers) && (isMethodDeclaration(member) || isPropertyDeclaration(member))) { - setEmitFlags(name, 1024 /* NoLeadingComments */); - } - return { modifiers, referencedName, name, initializersName, descriptorName, thisArg }; - } - function visitMethodDeclaration(node) { - enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createMethodDescriptorObject); - if (descriptorName) { - exitClassElement(); - return finishClassElement(createMethodDescriptorForwarder(modifiers, name, descriptorName), node); - } else { - const parameters = visitNodes2(node.parameters, visitor, isParameter); - const body = visitNode(node.body, visitor, isBlock); - exitClassElement(); - return finishClassElement(factory2.updateMethodDeclaration( - node, - modifiers, - node.asteriskToken, - name, - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - parameters, - /*type*/ - void 0, - body - ), node); - } - } - function visitGetAccessorDeclaration(node) { - enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createGetAccessorDescriptorObject); - if (descriptorName) { - exitClassElement(); - return finishClassElement(createGetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); - } else { - const parameters = visitNodes2(node.parameters, visitor, isParameter); - const body = visitNode(node.body, visitor, isBlock); - exitClassElement(); - return finishClassElement(factory2.updateGetAccessorDeclaration( - node, - modifiers, - name, - parameters, - /*type*/ - void 0, - body - ), node); - } - } - function visitSetAccessorDeclaration(node) { - enterClassElement(node); - const { modifiers, name, descriptorName } = partialTransformClassElement(node, classInfo, createSetAccessorDescriptorObject); - if (descriptorName) { - exitClassElement(); - return finishClassElement(createSetAccessorDescriptorForwarder(modifiers, name, descriptorName), node); - } else { - const parameters = visitNodes2(node.parameters, visitor, isParameter); - const body = visitNode(node.body, visitor, isBlock); - exitClassElement(); - return finishClassElement(factory2.updateSetAccessorDeclaration(node, modifiers, name, parameters, body), node); - } - } - function visitClassStaticBlockDeclaration(node) { - enterClassElement(node); - let result; - if (isClassNamedEvaluationHelperBlock(node)) { - result = visitEachChild(node, visitor, context); - } else if (isClassThisAssignmentBlock(node)) { - const savedClassThis = classThis; - classThis = void 0; - result = visitEachChild(node, visitor, context); - classThis = savedClassThis; - } else { - if (classInfo) - classInfo.hasStaticInitializers = true; - result = visitEachChild(node, visitor, context); - } - exitClassElement(); - return result; - } - function visitPropertyDeclaration(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); - } - enterClassElement(node); - Debug.assert(!isAmbientPropertyDeclaration(node), "Not yet implemented."); - const { modifiers, name, initializersName, descriptorName, thisArg } = partialTransformClassElement(node, classInfo, hasAccessorModifier(node) ? createAccessorPropertyDescriptorObject : void 0); - startLexicalEnvironment(); - let initializer = visitNode(node.initializer, visitor, isExpression); - if (initializersName) { - initializer = emitHelpers().createRunInitializersHelper( - thisArg ?? factory2.createThis(), - initializersName, - initializer ?? factory2.createVoidZero() - ); - } - if (!isStatic(node) && (classInfo == null ? void 0 : classInfo.instanceExtraInitializersName) && !(classInfo == null ? void 0 : classInfo.hasInjectedInstanceInitializers)) { - classInfo.hasInjectedInstanceInitializers = true; - initializer ?? (initializer = factory2.createVoidZero()); - initializer = factory2.createParenthesizedExpression(factory2.createComma( - emitHelpers().createRunInitializersHelper( - factory2.createThis(), - classInfo.instanceExtraInitializersName - ), - initializer - )); - } - if (isStatic(node) && classInfo && initializer) { - classInfo.hasStaticInitializers = true; - } - const declarations = endLexicalEnvironment(); - if (some(declarations)) { - initializer = factory2.createImmediatelyInvokedArrowFunction([ - ...declarations, - factory2.createReturnStatement(initializer) - ]); - } - exitClassElement(); - if (hasAccessorModifier(node) && descriptorName) { - const commentRange = getCommentRange(node); - const sourceMapRange = getSourceMapRange(node); - const name2 = node.name; - let getterName = name2; - let setterName = name2; - if (isComputedPropertyName(name2) && !isSimpleInlineableExpression(name2.expression)) { - const cacheAssignment = findComputedPropertyNameCacheAssignment(name2); - if (cacheAssignment) { - getterName = factory2.updateComputedPropertyName(name2, visitNode(name2.expression, visitor, isExpression)); - setterName = factory2.updateComputedPropertyName(name2, cacheAssignment.left); - } else { - const temp = factory2.createTempVariable(hoistVariableDeclaration); - setSourceMapRange(temp, name2.expression); - const expression = visitNode(name2.expression, visitor, isExpression); - const assignment = factory2.createAssignment(temp, expression); - setSourceMapRange(assignment, name2.expression); - getterName = factory2.updateComputedPropertyName(name2, assignment); - setterName = factory2.updateComputedPropertyName(name2, temp); - } - } - const modifiersWithoutAccessor = visitNodes2(modifiers, (node2) => node2.kind !== 129 /* AccessorKeyword */ ? node2 : void 0, isModifier); - const backingField = createAccessorPropertyBackingField(factory2, node, modifiersWithoutAccessor, initializer); - setOriginalNode(backingField, node); - setEmitFlags(backingField, 3072 /* NoComments */); - setSourceMapRange(backingField, sourceMapRange); - setSourceMapRange(backingField.name, node.name); - const getter = createGetAccessorDescriptorForwarder(modifiersWithoutAccessor, getterName, descriptorName); - setOriginalNode(getter, node); - setCommentRange(getter, commentRange); - setSourceMapRange(getter, sourceMapRange); - const setter = createSetAccessorDescriptorForwarder(modifiersWithoutAccessor, setterName, descriptorName); - setOriginalNode(setter, node); - setEmitFlags(setter, 3072 /* NoComments */); - setSourceMapRange(setter, sourceMapRange); - return [backingField, getter, setter]; - } - return finishClassElement(factory2.updatePropertyDeclaration( - node, - modifiers, - name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ), node); - } - function visitThisExpression(node) { - return classThis ?? node; - } - function visitCallExpression(node) { - if (isSuperProperty(node.expression) && classThis) { - const expression = visitNode(node.expression, visitor, isExpression); - const argumentsList = visitNodes2(node.arguments, visitor, isExpression); - const invocation = factory2.createFunctionCallCall(expression, classThis, argumentsList); - setOriginalNode(invocation, node); - setTextRange(invocation, node); - return invocation; - } - return visitEachChild(node, visitor, context); - } - function visitTaggedTemplateExpression(node) { - if (isSuperProperty(node.tag) && classThis) { - const tag = visitNode(node.tag, visitor, isExpression); - const boundTag = factory2.createFunctionBindCall(tag, classThis, []); - setOriginalNode(boundTag, node); - setTextRange(boundTag, node); - const template = visitNode(node.template, visitor, isTemplateLiteral); - return factory2.updateTaggedTemplateExpression( - node, - boundTag, - /*typeArguments*/ - void 0, - template - ); - } - return visitEachChild(node, visitor, context); - } - function visitPropertyAccessExpression(node) { - if (isSuperProperty(node) && isIdentifier(node.name) && classThis && classSuper) { - const propertyName = factory2.createStringLiteralFromNode(node.name); - const superProperty = factory2.createReflectGetCall(classSuper, propertyName, classThis); - setOriginalNode(superProperty, node.expression); - setTextRange(superProperty, node.expression); - return superProperty; - } - return visitEachChild(node, visitor, context); - } - function visitElementAccessExpression(node) { - if (isSuperProperty(node) && classThis && classSuper) { - const propertyName = visitNode(node.argumentExpression, visitor, isExpression); - const superProperty = factory2.createReflectGetCall(classSuper, propertyName, classThis); - setOriginalNode(superProperty, node.expression); - setTextRange(superProperty, node.expression); - return superProperty; - } - return visitEachChild(node, visitor, context); - } - function visitParameterDeclaration(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); - } - const updated = factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - node.dotDotDotToken, - visitNode(node.name, visitor, isBindingName), - /*questionToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); - if (updated !== node) { - setCommentRange(updated, node); - setTextRange(updated, moveRangePastModifiers(node)); - setSourceMapRange(updated, moveRangePastModifiers(node)); - setEmitFlags(updated.name, 64 /* NoTrailingSourceMap */); - } - return updated; - } - function isAnonymousClassNeedingAssignedName(node) { - return isClassExpression(node) && !node.name && isDecoratedClassLike(node); - } - function canIgnoreEmptyStringLiteralInAssignedName(node) { - const innerExpression = skipOuterExpressions(node); - return isClassExpression(innerExpression) && !innerExpression.name && !classOrConstructorParameterIsDecorated( - /*useLegacyDecorators*/ - false, - innerExpression - ); - } - function visitForStatement(node) { - return factory2.updateForStatement( - node, - visitNode(node.initializer, discardedValueVisitor, isForInitializer), - visitNode(node.condition, visitor, isExpression), - visitNode(node.incrementor, discardedValueVisitor, isExpression), - visitIterationBody(node.statement, visitor, context) - ); - } - function visitExpressionStatement(node) { - return visitEachChild(node, discardedValueVisitor, context); - } - function visitBinaryExpression(node, discarded) { - if (isDestructuringAssignment(node)) { - const left = visitAssignmentPattern(node.left); - const right = visitNode(node.right, visitor, isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); - } - if (isAssignmentExpression(node)) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); - return visitEachChild(node, visitor, context); - } - if (isSuperProperty(node.left) && classThis && classSuper) { - let setterName = isElementAccessExpression(node.left) ? visitNode(node.left.argumentExpression, visitor, isExpression) : isIdentifier(node.left.name) ? factory2.createStringLiteralFromNode(node.left.name) : void 0; - if (setterName) { - let expression = visitNode(node.right, visitor, isExpression); - if (isCompoundAssignment(node.operatorToken.kind)) { - let getterName = setterName; - if (!isSimpleInlineableExpression(setterName)) { - getterName = factory2.createTempVariable(hoistVariableDeclaration); - setterName = factory2.createAssignment(getterName, setterName); - } - const superPropertyGet = factory2.createReflectGetCall( - classSuper, - getterName, - classThis - ); - setOriginalNode(superPropertyGet, node.left); - setTextRange(superPropertyGet, node.left); - expression = factory2.createBinaryExpression( - superPropertyGet, - getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind), - expression - ); - setTextRange(expression, node); - } - const temp = discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); - if (temp) { - expression = factory2.createAssignment(temp, expression); - setTextRange(temp, node); - } - expression = factory2.createReflectSetCall( - classSuper, - setterName, - expression, - classThis - ); - setOriginalNode(expression, node); - setTextRange(expression, node); - if (temp) { - expression = factory2.createComma(expression, temp); - setTextRange(expression, node); - } - return expression; - } - } - } - if (node.operatorToken.kind === 28 /* CommaToken */) { - const left = visitNode(node.left, discardedValueVisitor, isExpression); - const right = visitNode(node.right, discarded ? discardedValueVisitor : visitor, isExpression); - return factory2.updateBinaryExpression(node, left, node.operatorToken, right); - } - return visitEachChild(node, visitor, context); - } - function visitPreOrPostfixUnaryExpression(node, discarded) { - if (node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) { - const operand = skipParentheses(node.operand); - if (isSuperProperty(operand) && classThis && classSuper) { - let setterName = isElementAccessExpression(operand) ? visitNode(operand.argumentExpression, visitor, isExpression) : isIdentifier(operand.name) ? factory2.createStringLiteralFromNode(operand.name) : void 0; - if (setterName) { - let getterName = setterName; - if (!isSimpleInlineableExpression(setterName)) { - getterName = factory2.createTempVariable(hoistVariableDeclaration); - setterName = factory2.createAssignment(getterName, setterName); - } - let expression = factory2.createReflectGetCall(classSuper, getterName, classThis); - setOriginalNode(expression, node); - setTextRange(expression, node); - const temp = discarded ? void 0 : factory2.createTempVariable(hoistVariableDeclaration); - expression = expandPreOrPostfixIncrementOrDecrementExpression(factory2, node, expression, hoistVariableDeclaration, temp); - expression = factory2.createReflectSetCall(classSuper, setterName, expression, classThis); - setOriginalNode(expression, node); - setTextRange(expression, node); - if (temp) { - expression = factory2.createComma(expression, temp); - setTextRange(expression, node); - } - return expression; - } - } - } - return visitEachChild(node, visitor, context); - } - function visitCommaListExpression(node, discarded) { - const elements = discarded ? visitCommaListElements(node.elements, discardedValueVisitor) : visitCommaListElements(node.elements, visitor, discardedValueVisitor); - return factory2.updateCommaListExpression(node, elements); - } - function visitReferencedPropertyName(node) { - if (isPropertyNameLiteral(node) || isPrivateIdentifier(node)) { - const referencedName2 = factory2.createStringLiteralFromNode(node); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - if (isPropertyNameLiteral(node.expression) && !isIdentifier(node.expression)) { - const referencedName2 = factory2.createStringLiteralFromNode(node.expression); - const name2 = visitNode(node, visitor, isPropertyName); - return { referencedName: referencedName2, name: name2 }; - } - const referencedName = factory2.getGeneratedNameForNode(node); - hoistVariableDeclaration(referencedName); - const key = emitHelpers().createPropKeyHelper(visitNode(node.expression, visitor, isExpression)); - const assignment = factory2.createAssignment(referencedName, key); - const name = factory2.updateComputedPropertyName(node, injectPendingExpressions(assignment)); - return { referencedName, name }; - } - function visitPropertyName(node) { - if (isComputedPropertyName(node)) { - return visitComputedPropertyName(node); - } - return visitNode(node, visitor, isPropertyName); - } - function visitComputedPropertyName(node) { - let expression = visitNode(node.expression, visitor, isExpression); - if (!isSimpleInlineableExpression(expression)) { - expression = injectPendingExpressions(expression); - } - return factory2.updateComputedPropertyName(node, expression); - } - function visitPropertyAssignment(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); - } - return visitEachChild(node, visitor, context); - } - function visitVariableDeclaration(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); - } - return visitEachChild(node, visitor, context); - } - function visitBindingElement(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.initializer)); - } - return visitEachChild(node, visitor, context); - } - function visitDestructuringAssignmentTarget(node) { - if (isObjectLiteralExpression(node) || isArrayLiteralExpression(node)) { - return visitAssignmentPattern(node); - } - if (isSuperProperty(node) && classThis && classSuper) { - const propertyName = isElementAccessExpression(node) ? visitNode(node.argumentExpression, visitor, isExpression) : isIdentifier(node.name) ? factory2.createStringLiteralFromNode(node.name) : void 0; - if (propertyName) { - const paramName = factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const expression = factory2.createAssignmentTargetWrapper( - paramName, - factory2.createReflectSetCall( - classSuper, - propertyName, - paramName, - classThis - ) - ); - setOriginalNode(expression, node); - setTextRange(expression, node); - return expression; - } - } - return visitEachChild(node, visitor, context); - } - function visitAssignmentElement(node) { - if (isAssignmentExpression( - node, - /*excludeCompoundAssignment*/ - true - )) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.right)); - } - const assignmentTarget = visitDestructuringAssignmentTarget(node.left); - const initializer = visitNode(node.right, visitor, isExpression); - return factory2.updateBinaryExpression(node, assignmentTarget, node.operatorToken, initializer); - } else { - return visitDestructuringAssignmentTarget(node); - } - } - function visitAssignmentRestElement(node) { - if (isLeftHandSideExpression(node.expression)) { - const expression = visitDestructuringAssignmentTarget(node.expression); - return factory2.updateSpreadElement(node, expression); - } - return visitEachChild(node, visitor, context); - } - function visitArrayAssignmentElement(node) { - Debug.assertNode(node, isArrayBindingOrAssignmentElement); - if (isSpreadElement(node)) - return visitAssignmentRestElement(node); - if (!isOmittedExpression(node)) - return visitAssignmentElement(node); - return visitEachChild(node, visitor, context); - } - function visitAssignmentProperty(node) { - const name = visitNode(node.name, visitor, isPropertyName); - if (isAssignmentExpression( - node.initializer, - /*excludeCompoundAssignment*/ - true - )) { - const assignmentElement = visitAssignmentElement(node.initializer); - return factory2.updatePropertyAssignment(node, name, assignmentElement); - } - if (isLeftHandSideExpression(node.initializer)) { - const assignmentElement = visitDestructuringAssignmentTarget(node.initializer); - return factory2.updatePropertyAssignment(node, name, assignmentElement); - } - return visitEachChild(node, visitor, context); - } - function visitShorthandAssignmentProperty(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.objectAssignmentInitializer)); - } - return visitEachChild(node, visitor, context); - } - function visitAssignmentRestProperty(node) { - if (isLeftHandSideExpression(node.expression)) { - const expression = visitDestructuringAssignmentTarget(node.expression); - return factory2.updateSpreadAssignment(node, expression); - } - return visitEachChild(node, visitor, context); - } - function visitObjectAssignmentElement(node) { - Debug.assertNode(node, isObjectBindingOrAssignmentElement); - if (isSpreadAssignment(node)) - return visitAssignmentRestProperty(node); - if (isShorthandPropertyAssignment(node)) - return visitShorthandAssignmentProperty(node); - if (isPropertyAssignment(node)) - return visitAssignmentProperty(node); - return visitEachChild(node, visitor, context); - } - function visitAssignmentPattern(node) { - if (isArrayLiteralExpression(node)) { - const elements = visitNodes2(node.elements, visitArrayAssignmentElement, isExpression); - return factory2.updateArrayLiteralExpression(node, elements); - } else { - const properties = visitNodes2(node.properties, visitObjectAssignmentElement, isObjectLiteralElementLike); - return factory2.updateObjectLiteralExpression(node, properties); - } - } - function visitExportAssignment(node) { - if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) { - node = transformNamedEvaluation(context, node, canIgnoreEmptyStringLiteralInAssignedName(node.expression)); - } - return visitEachChild(node, visitor, context); - } - function visitParenthesizedExpression(node, discarded) { - const visitorFunc = discarded ? discardedValueVisitor : visitor; - const expression = visitNode(node.expression, visitorFunc, isExpression); - return factory2.updateParenthesizedExpression(node, expression); - } - function visitPartiallyEmittedExpression(node, discarded) { - const visitorFunc = discarded ? discardedValueVisitor : visitor; - const expression = visitNode(node.expression, visitorFunc, isExpression); - return factory2.updatePartiallyEmittedExpression(node, expression); - } - function injectPendingExpressions(expression) { - if (some(pendingExpressions)) { - if (isParenthesizedExpression(expression)) { - pendingExpressions.push(expression.expression); - expression = factory2.updateParenthesizedExpression(expression, factory2.inlineExpressions(pendingExpressions)); - } else { - pendingExpressions.push(expression); - expression = factory2.inlineExpressions(pendingExpressions); - } - pendingExpressions = void 0; - } - return expression; - } - function transformAllDecoratorsOfDeclaration(allDecorators) { - if (!allDecorators) { - return void 0; - } - const decoratorExpressions = []; - addRange(decoratorExpressions, map(allDecorators.decorators, transformDecorator)); - return decoratorExpressions; - } - function transformDecorator(decorator) { - const expression = visitNode(decorator.expression, visitor, isExpression); - setEmitFlags(expression, 3072 /* NoComments */); - const innerExpression = skipOuterExpressions(expression); - if (isAccessExpression(innerExpression)) { - const { target, thisArg } = factory2.createCallBinding( - expression, - hoistVariableDeclaration, - languageVersion, - /*cacheIdentifiers*/ - true - ); - return factory2.restoreOuterExpressions(expression, factory2.createFunctionBindCall(target, thisArg, [])); - } - return expression; - } - function createDescriptorMethod(original, name, modifiers, asteriskToken, kind, parameters, body) { - const func = factory2.createFunctionExpression( - modifiers, - asteriskToken, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - parameters, - /*type*/ - void 0, - body ?? factory2.createBlock([]) - ); - setOriginalNode(func, original); - setSourceMapRange(func, moveRangePastDecorators(original)); - setEmitFlags(func, 3072 /* NoComments */); - const prefix = kind === "get" || kind === "set" ? kind : void 0; - const functionName = factory2.createStringLiteralFromNode( - name, - /*isSingleQuote*/ - void 0 - ); - const namedFunction = emitHelpers().createSetFunctionNameHelper(func, functionName, prefix); - const method = factory2.createPropertyAssignment(factory2.createIdentifier(kind), namedFunction); - setOriginalNode(method, original); - setSourceMapRange(method, moveRangePastDecorators(original)); - setEmitFlags(method, 3072 /* NoComments */); - return method; - } - function createMethodDescriptorObject(node, modifiers) { - return factory2.createObjectLiteralExpression([ - createDescriptorMethod( - node, - node.name, - modifiers, - node.asteriskToken, - "value", - visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock) - ) - ]); - } - function createGetAccessorDescriptorObject(node, modifiers) { - return factory2.createObjectLiteralExpression([ - createDescriptorMethod( - node, - node.name, - modifiers, - /*asteriskToken*/ - void 0, - "get", - [], - visitNode(node.body, visitor, isBlock) - ) - ]); - } - function createSetAccessorDescriptorObject(node, modifiers) { - return factory2.createObjectLiteralExpression([ - createDescriptorMethod( - node, - node.name, - modifiers, - /*asteriskToken*/ - void 0, - "set", - visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock) - ) - ]); - } - function createAccessorPropertyDescriptorObject(node, modifiers) { - return factory2.createObjectLiteralExpression([ - createDescriptorMethod( - node, - node.name, - modifiers, - /*asteriskToken*/ - void 0, - "get", - [], - factory2.createBlock([ - factory2.createReturnStatement( - factory2.createPropertyAccessExpression( - factory2.createThis(), - factory2.getGeneratedPrivateNameForNode(node.name) - ) - ) - ]) - ), - createDescriptorMethod( - node, - node.name, - modifiers, - /*asteriskToken*/ - void 0, - "set", - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "value" - )], - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.createPropertyAccessExpression( - factory2.createThis(), - factory2.getGeneratedPrivateNameForNode(node.name) - ), - factory2.createIdentifier("value") - ) - ) - ]) - ) - ]); - } - function createMethodDescriptorForwarder(modifiers, name, descriptorName) { - modifiers = visitNodes2(modifiers, (node) => isStaticModifier(node) ? node : void 0, isModifier); - return factory2.createGetAccessorDeclaration( - modifiers, - name, - [], - /*type*/ - void 0, - factory2.createBlock([ - factory2.createReturnStatement( - factory2.createPropertyAccessExpression( - descriptorName, - factory2.createIdentifier("value") - ) - ) - ]) - ); - } - function createGetAccessorDescriptorForwarder(modifiers, name, descriptorName) { - modifiers = visitNodes2(modifiers, (node) => isStaticModifier(node) ? node : void 0, isModifier); - return factory2.createGetAccessorDeclaration( - modifiers, - name, - [], - /*type*/ - void 0, - factory2.createBlock([ - factory2.createReturnStatement( - factory2.createFunctionCallCall( - factory2.createPropertyAccessExpression( - descriptorName, - factory2.createIdentifier("get") - ), - factory2.createThis(), - [] - ) - ) - ]) - ); - } - function createSetAccessorDescriptorForwarder(modifiers, name, descriptorName) { - modifiers = visitNodes2(modifiers, (node) => isStaticModifier(node) ? node : void 0, isModifier); - return factory2.createSetAccessorDeclaration( - modifiers, - name, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "value" - )], - factory2.createBlock([ - factory2.createReturnStatement( - factory2.createFunctionCallCall( - factory2.createPropertyAccessExpression( - descriptorName, - factory2.createIdentifier("set") - ), - factory2.createThis(), - [factory2.createIdentifier("value")] - ) - ) - ]) - ); - } - function createMetadata(name, classSuper2) { - const varDecl = factory2.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createConditionalExpression( - factory2.createLogicalAnd( - factory2.createTypeCheck(factory2.createIdentifier("Symbol"), "function"), - factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") - ), - factory2.createToken(58 /* QuestionToken */), - factory2.createCallExpression( - factory2.createPropertyAccessExpression(factory2.createIdentifier("Object"), "create"), - /*typeArguments*/ - void 0, - [classSuper2 ? createSymbolMetadataReference(classSuper2) : factory2.createNull()] - ), - factory2.createToken(59 /* ColonToken */), - factory2.createVoidZero() - ) - ); - return factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([varDecl], 2 /* Const */) - ); - } - function createSymbolMetadata(target, value) { - const defineProperty = factory2.createObjectDefinePropertyCall( - target, - factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata"), - factory2.createPropertyDescriptor( - { configurable: true, writable: true, enumerable: true, value }, - /*singleLine*/ - true - ) - ); - return setEmitFlags( - factory2.createIfStatement(value, factory2.createExpressionStatement(defineProperty)), - 1 /* SingleLine */ - ); - } - function createSymbolMetadataReference(classSuper2) { - return factory2.createBinaryExpression( - factory2.createElementAccessExpression( - classSuper2, - factory2.createPropertyAccessExpression(factory2.createIdentifier("Symbol"), "metadata") - ), - 61 /* QuestionQuestionToken */, - factory2.createNull() - ); - } - } - var init_esDecorators = __esm({ - "src/compiler/transformers/esDecorators.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/es2017.ts - function transformES2017(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - resumeLexicalEnvironment, - endLexicalEnvironment, - hoistVariableDeclaration - } = context; - const resolver = context.getEmitResolver(); - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); - let enabledSubstitutions; - let enclosingSuperContainerFlags = 0; - let enclosingFunctionParameterNames; - let capturedSuperProperties; - let hasSuperElementAccess; - const substitutedSuperAccessors = []; - let contextFlags = 0 /* None */; - const previousOnEmitNode = context.onEmitNode; - const previousOnSubstituteNode = context.onSubstituteNode; - context.onEmitNode = onEmitNode; - context.onSubstituteNode = onSubstituteNode; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - setContextFlag(1 /* NonTopLevel */, false); - setContextFlag(2 /* HasLexicalThis */, !isEffectiveStrictModeSourceFile(node, compilerOptions)); - const visited = visitEachChild(node, visitor, context); - addEmitHelpers(visited, context.readEmitHelpers()); - return visited; - } - function setContextFlag(flag, val) { - contextFlags = val ? contextFlags | flag : contextFlags & ~flag; - } - function inContext(flags) { - return (contextFlags & flags) !== 0; - } - function inTopLevelContext() { - return !inContext(1 /* NonTopLevel */); - } - function inHasLexicalThisContext() { - return inContext(2 /* HasLexicalThis */); - } - function doWithContext(flags, cb, value) { - const contextFlagsToSet = flags & ~contextFlags; - if (contextFlagsToSet) { - setContextFlag( - contextFlagsToSet, - /*val*/ - true - ); - const result = cb(value); - setContextFlag( - contextFlagsToSet, - /*val*/ - false - ); - return result; - } - return cb(value); - } - function visitDefault(node) { - return visitEachChild(node, visitor, context); - } - function visitor(node) { - if ((node.transformFlags & 256 /* ContainsES2017 */) === 0) { - return node; - } - switch (node.kind) { - case 134 /* AsyncKeyword */: - return void 0; - case 223 /* AwaitExpression */: - return visitAwaitExpression(node); - case 174 /* MethodDeclaration */: - return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitMethodDeclaration, node); - case 262 /* FunctionDeclaration */: - return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionDeclaration, node); - case 218 /* FunctionExpression */: - return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitFunctionExpression, node); - case 219 /* ArrowFunction */: - return doWithContext(1 /* NonTopLevel */, visitArrowFunction, node); - case 211 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { - capturedSuperProperties.add(node.name.escapedText); - } - return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { - hasSuperElementAccess = true; - } - return visitEachChild(node, visitor, context); - case 177 /* GetAccessor */: - return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitGetAccessorDeclaration, node); - case 178 /* SetAccessor */: - return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitSetAccessorDeclaration, node); - case 176 /* Constructor */: - return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitConstructorDeclaration, node); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - return doWithContext(1 /* NonTopLevel */ | 2 /* HasLexicalThis */, visitDefault, node); - default: - return visitEachChild(node, visitor, context); - } - } - function asyncBodyVisitor(node) { - if (isNodeWithPossibleHoistedDeclaration(node)) { - switch (node.kind) { - case 243 /* VariableStatement */: - return visitVariableStatementInAsyncBody(node); - case 248 /* ForStatement */: - return visitForStatementInAsyncBody(node); - case 249 /* ForInStatement */: - return visitForInStatementInAsyncBody(node); - case 250 /* ForOfStatement */: - return visitForOfStatementInAsyncBody(node); - case 299 /* CatchClause */: - return visitCatchClauseInAsyncBody(node); - case 241 /* Block */: - case 255 /* SwitchStatement */: - case 269 /* CaseBlock */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - case 258 /* TryStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 245 /* IfStatement */: - case 254 /* WithStatement */: - case 256 /* LabeledStatement */: - return visitEachChild(node, asyncBodyVisitor, context); - default: - return Debug.assertNever(node, "Unhandled node."); - } - } - return visitor(node); - } - function visitCatchClauseInAsyncBody(node) { - const catchClauseNames = /* @__PURE__ */ new Set(); - recordDeclarationName(node.variableDeclaration, catchClauseNames); - let catchClauseUnshadowedNames; - catchClauseNames.forEach((_, escapedName) => { - if (enclosingFunctionParameterNames.has(escapedName)) { - if (!catchClauseUnshadowedNames) { - catchClauseUnshadowedNames = new Set(enclosingFunctionParameterNames); - } - catchClauseUnshadowedNames.delete(escapedName); - } - }); - if (catchClauseUnshadowedNames) { - const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; - enclosingFunctionParameterNames = catchClauseUnshadowedNames; - const result = visitEachChild(node, asyncBodyVisitor, context); - enclosingFunctionParameterNames = savedEnclosingFunctionParameterNames; - return result; - } else { - return visitEachChild(node, asyncBodyVisitor, context); - } - } - function visitVariableStatementInAsyncBody(node) { - if (isVariableDeclarationListWithCollidingName(node.declarationList)) { - const expression = visitVariableDeclarationListWithCollidingNames( - node.declarationList, - /*hasReceiver*/ - false - ); - return expression ? factory2.createExpressionStatement(expression) : void 0; - } - return visitEachChild(node, visitor, context); - } - function visitForInStatementInAsyncBody(node) { - return factory2.updateForInStatement( - node, - isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames( - node.initializer, - /*hasReceiver*/ - true - ) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)), - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - visitIterationBody(node.statement, asyncBodyVisitor, context) - ); - } - function visitForOfStatementInAsyncBody(node) { - return factory2.updateForOfStatement( - node, - visitNode(node.awaitModifier, visitor, isAwaitKeyword), - isVariableDeclarationListWithCollidingName(node.initializer) ? visitVariableDeclarationListWithCollidingNames( - node.initializer, - /*hasReceiver*/ - true - ) : Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)), - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - visitIterationBody(node.statement, asyncBodyVisitor, context) - ); - } - function visitForStatementInAsyncBody(node) { - const initializer = node.initializer; - return factory2.updateForStatement( - node, - isVariableDeclarationListWithCollidingName(initializer) ? visitVariableDeclarationListWithCollidingNames( - initializer, - /*hasReceiver*/ - false - ) : visitNode(node.initializer, visitor, isForInitializer), - visitNode(node.condition, visitor, isExpression), - visitNode(node.incrementor, visitor, isExpression), - visitIterationBody(node.statement, asyncBodyVisitor, context) - ); - } - function visitAwaitExpression(node) { - if (inTopLevelContext()) { - return visitEachChild(node, visitor, context); - } - return setOriginalNode( - setTextRange( - factory2.createYieldExpression( - /*asteriskToken*/ - void 0, - visitNode(node.expression, visitor, isExpression) - ), - node - ), - node - ); - } - function visitConstructorDeclaration(node) { - return factory2.updateConstructorDeclaration( - node, - visitNodes2(node.modifiers, visitor, isModifier), - visitParameterList(node.parameters, visitor, context), - transformMethodBody(node) - ); - } - function visitMethodDeclaration(node) { - return factory2.updateMethodDeclaration( - node, - visitNodes2(node.modifiers, visitor, isModifierLike), - node.asteriskToken, - node.name, - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - getFunctionFlags(node) & 2 /* Async */ ? transformAsyncFunctionBody(node) : transformMethodBody(node) - ); - } - function visitGetAccessorDeclaration(node) { - return factory2.updateGetAccessorDeclaration( - node, - visitNodes2(node.modifiers, visitor, isModifierLike), - node.name, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - transformMethodBody(node) - ); - } - function visitSetAccessorDeclaration(node) { - return factory2.updateSetAccessorDeclaration( - node, - visitNodes2(node.modifiers, visitor, isModifierLike), - node.name, - visitParameterList(node.parameters, visitor, context), - transformMethodBody(node) - ); - } - function visitFunctionDeclaration(node) { - return factory2.updateFunctionDeclaration( - node, - visitNodes2(node.modifiers, visitor, isModifierLike), - node.asteriskToken, - node.name, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - getFunctionFlags(node) & 2 /* Async */ ? transformAsyncFunctionBody(node) : visitFunctionBody(node.body, visitor, context) - ); - } - function visitFunctionExpression(node) { - return factory2.updateFunctionExpression( - node, - visitNodes2(node.modifiers, visitor, isModifier), - node.asteriskToken, - node.name, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - getFunctionFlags(node) & 2 /* Async */ ? transformAsyncFunctionBody(node) : visitFunctionBody(node.body, visitor, context) - ); - } - function visitArrowFunction(node) { - return factory2.updateArrowFunction( - node, - visitNodes2(node.modifiers, visitor, isModifier), - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - node.equalsGreaterThanToken, - getFunctionFlags(node) & 2 /* Async */ ? transformAsyncFunctionBody(node) : visitFunctionBody(node.body, visitor, context) - ); - } - function recordDeclarationName({ name }, names) { - if (isIdentifier(name)) { - names.add(name.escapedText); - } else { - for (const element of name.elements) { - if (!isOmittedExpression(element)) { - recordDeclarationName(element, names); - } - } - } - } - function isVariableDeclarationListWithCollidingName(node) { - return !!node && isVariableDeclarationList(node) && !(node.flags & 7 /* BlockScoped */) && node.declarations.some(collidesWithParameterName); - } - function visitVariableDeclarationListWithCollidingNames(node, hasReceiver) { - hoistVariableDeclarationList(node); - const variables = getInitializedVariables(node); - if (variables.length === 0) { - if (hasReceiver) { - return visitNode(factory2.converters.convertToAssignmentElementTarget(node.declarations[0].name), visitor, isExpression); - } - return void 0; - } - return factory2.inlineExpressions(map(variables, transformInitializedVariable)); - } - function hoistVariableDeclarationList(node) { - forEach(node.declarations, hoistVariable); - } - function hoistVariable({ name }) { - if (isIdentifier(name)) { - hoistVariableDeclaration(name); - } else { - for (const element of name.elements) { - if (!isOmittedExpression(element)) { - hoistVariable(element); - } - } - } - } - function transformInitializedVariable(node) { - const converted = setSourceMapRange( - factory2.createAssignment( - factory2.converters.convertToAssignmentElementTarget(node.name), - node.initializer - ), - node - ); - return Debug.checkDefined(visitNode(converted, visitor, isExpression)); - } - function collidesWithParameterName({ name }) { - if (isIdentifier(name)) { - return enclosingFunctionParameterNames.has(name.escapedText); - } else { - for (const element of name.elements) { - if (!isOmittedExpression(element) && collidesWithParameterName(element)) { - return true; - } - } - } - return false; - } - function transformMethodBody(node) { - Debug.assertIsDefined(node.body); - const savedCapturedSuperProperties = capturedSuperProperties; - const savedHasSuperElementAccess = hasSuperElementAccess; - capturedSuperProperties = /* @__PURE__ */ new Set(); - hasSuperElementAccess = false; - let updated = visitFunctionBody(node.body, visitor, context); - const originalMethod = getOriginalNode(node, isFunctionLikeDeclaration); - const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */) && (getFunctionFlags(originalMethod) & 3 /* AsyncGenerator */) !== 3 /* AsyncGenerator */; - if (emitSuperHelpers) { - enableSubstitutionForAsyncMethodsWithSuper(); - if (capturedSuperProperties.size) { - const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties); - substitutedSuperAccessors[getNodeId(variableStatement)] = true; - const statements = updated.statements.slice(); - insertStatementsAfterStandardPrologue(statements, [variableStatement]); - updated = factory2.updateBlock(updated, statements); - } - if (hasSuperElementAccess) { - if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { - addEmitHelper(updated, advancedAsyncSuperHelper); - } else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) { - addEmitHelper(updated, asyncSuperHelper); - } - } - } - capturedSuperProperties = savedCapturedSuperProperties; - hasSuperElementAccess = savedHasSuperElementAccess; - return updated; - } - function transformAsyncFunctionBody(node) { - resumeLexicalEnvironment(); - const original = getOriginalNode(node, isFunctionLike); - const nodeType = original.type; - const promiseConstructor = languageVersion < 2 /* ES2015 */ ? getPromiseConstructor(nodeType) : void 0; - const isArrowFunction2 = node.kind === 219 /* ArrowFunction */; - const hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 512 /* CaptureArguments */) !== 0; - const savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames; - enclosingFunctionParameterNames = /* @__PURE__ */ new Set(); - for (const parameter of node.parameters) { - recordDeclarationName(parameter, enclosingFunctionParameterNames); - } - const savedCapturedSuperProperties = capturedSuperProperties; - const savedHasSuperElementAccess = hasSuperElementAccess; - if (!isArrowFunction2) { - capturedSuperProperties = /* @__PURE__ */ new Set(); - hasSuperElementAccess = false; - } - let result; - if (!isArrowFunction2) { - const statements = []; - const statementOffset = factory2.copyPrologue( - node.body.statements, - statements, - /*ensureUseStrict*/ - false, - visitor - ); - statements.push( - factory2.createReturnStatement( - emitHelpers().createAwaiterHelper( - inHasLexicalThisContext(), - hasLexicalArguments, - promiseConstructor, - transformAsyncFunctionBodyWorker(node.body, statementOffset) - ) - ) - ); - insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); - const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */); - if (emitSuperHelpers) { - enableSubstitutionForAsyncMethodsWithSuper(); - if (capturedSuperProperties.size) { - const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties); - substitutedSuperAccessors[getNodeId(variableStatement)] = true; - insertStatementsAfterStandardPrologue(statements, [variableStatement]); - } - } - const block = factory2.createBlock( - statements, - /*multiLine*/ - true - ); - setTextRange(block, node.body); - if (emitSuperHelpers && hasSuperElementAccess) { - if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { - addEmitHelper(block, advancedAsyncSuperHelper); - } else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) { - addEmitHelper(block, asyncSuperHelper); - } - } - result = block; - } else { - const expression = emitHelpers().createAwaiterHelper( - inHasLexicalThisContext(), - hasLexicalArguments, - promiseConstructor, - transformAsyncFunctionBodyWorker(node.body) - ); - const declarations = endLexicalEnvironment(); - if (some(declarations)) { - const block = factory2.converters.convertToFunctionBlock(expression); - result = factory2.updateBlock(block, setTextRange(factory2.createNodeArray(concatenate(declarations, block.statements)), block.statements)); - } else { - result = expression; - } - } - enclosingFunctionParameterNames = savedEnclosingFunctionParameterNames; - if (!isArrowFunction2) { - capturedSuperProperties = savedCapturedSuperProperties; - hasSuperElementAccess = savedHasSuperElementAccess; - } - return result; - } - function transformAsyncFunctionBodyWorker(body, start) { - if (isBlock(body)) { - return factory2.updateBlock(body, visitNodes2(body.statements, asyncBodyVisitor, isStatement, start)); - } else { - return factory2.converters.convertToFunctionBlock(Debug.checkDefined(visitNode(body, asyncBodyVisitor, isConciseBody))); - } - } - function getPromiseConstructor(type) { - const typeName = type && getEntityNameFromTypeNode(type); - if (typeName && isEntityName(typeName)) { - const serializationKind = resolver.getTypeReferenceSerializationKind(typeName); - if (serializationKind === 1 /* TypeWithConstructSignatureAndValue */ || serializationKind === 0 /* Unknown */) { - return typeName; - } - } - return void 0; - } - function enableSubstitutionForAsyncMethodsWithSuper() { - if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { - enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(263 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(243 /* VariableStatement */); - } - } - function onEmitNode(hint, node, emitCallback) { - if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) { - const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */); - if (superContainerFlags !== enclosingSuperContainerFlags) { - const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags; - enclosingSuperContainerFlags = superContainerFlags; - previousOnEmitNode(hint, node, emitCallback); - enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags; - return; - } - } else if (enabledSubstitutions && substitutedSuperAccessors[getNodeId(node)]) { - const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags; - enclosingSuperContainerFlags = 0; - previousOnEmitNode(hint, node, emitCallback); - enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags; - return; - } - previousOnEmitNode(hint, node, emitCallback); - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (hint === 1 /* Expression */ && enclosingSuperContainerFlags) { - return substituteExpression(node); - } - return node; - } - function substituteExpression(node) { - switch (node.kind) { - case 211 /* PropertyAccessExpression */: - return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: - return substituteElementAccessExpression(node); - case 213 /* CallExpression */: - return substituteCallExpression(node); - } - return node; - } - function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 108 /* SuperKeyword */) { - return setTextRange( - factory2.createPropertyAccessExpression( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), - node.name - ), - node - ); - } - return node; - } - function substituteElementAccessExpression(node) { - if (node.expression.kind === 108 /* SuperKeyword */) { - return createSuperElementAccessInAsyncMethod( - node.argumentExpression, - node - ); - } - return node; - } - function substituteCallExpression(node) { - const expression = node.expression; - if (isSuperProperty(expression)) { - const argumentExpression = isPropertyAccessExpression(expression) ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression); - return factory2.createCallExpression( - factory2.createPropertyAccessExpression(argumentExpression, "call"), - /*typeArguments*/ - void 0, - [ - factory2.createThis(), - ...node.arguments - ] - ); - } - return node; - } - function isSuperContainer(node) { - const kind = node.kind; - return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; - } - function createSuperElementAccessInAsyncMethod(argumentExpression, location) { - if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { - return setTextRange( - factory2.createPropertyAccessExpression( - factory2.createCallExpression( - factory2.createUniqueName("_superIndex", 16 /* Optimistic */ | 32 /* FileLevel */), - /*typeArguments*/ - void 0, - [argumentExpression] - ), - "value" - ), - location - ); - } else { - return setTextRange( - factory2.createCallExpression( - factory2.createUniqueName("_superIndex", 16 /* Optimistic */ | 32 /* FileLevel */), - /*typeArguments*/ - void 0, - [argumentExpression] - ), - location - ); - } - } - } - function createSuperAccessVariableStatement(factory2, resolver, node, names) { - const hasBinding = (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) !== 0; - const accessors = []; - names.forEach((_, key) => { - const name = unescapeLeadingUnderscores(key); - const getterAndSetter = []; - getterAndSetter.push(factory2.createPropertyAssignment( - "get", - factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - /* parameters */ - [], - /*type*/ - void 0, - /*equalsGreaterThanToken*/ - void 0, - setEmitFlags( - factory2.createPropertyAccessExpression( - setEmitFlags( - factory2.createSuper(), - 8 /* NoSubstitution */ - ), - name - ), - 8 /* NoSubstitution */ - ) - ) - )); - if (hasBinding) { - getterAndSetter.push( - factory2.createPropertyAssignment( - "set", - factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - /* parameters */ - [ - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "v", - /*questionToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ) - ], - /*type*/ - void 0, - /*equalsGreaterThanToken*/ - void 0, - factory2.createAssignment( - setEmitFlags( - factory2.createPropertyAccessExpression( - setEmitFlags( - factory2.createSuper(), - 8 /* NoSubstitution */ - ), - name - ), - 8 /* NoSubstitution */ - ), - factory2.createIdentifier("v") - ) - ) - ) - ); - } - accessors.push( - factory2.createPropertyAssignment( - name, - factory2.createObjectLiteralExpression(getterAndSetter) - ) - ); - }); - return factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - [ - factory2.createVariableDeclaration( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createCallExpression( - factory2.createPropertyAccessExpression( - factory2.createIdentifier("Object"), - "create" - ), - /*typeArguments*/ - void 0, - [ - factory2.createNull(), - factory2.createObjectLiteralExpression( - accessors, - /*multiLine*/ - true - ) - ] - ) - ) - ], - 2 /* Const */ - ) - ); - } - var init_es2017 = __esm({ - "src/compiler/transformers/es2017.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/es2018.ts - function transformES2018(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - resumeLexicalEnvironment, - endLexicalEnvironment, - hoistVariableDeclaration - } = context; - const resolver = context.getEmitResolver(); - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); - const previousOnEmitNode = context.onEmitNode; - context.onEmitNode = onEmitNode; - const previousOnSubstituteNode = context.onSubstituteNode; - context.onSubstituteNode = onSubstituteNode; - let exportedVariableStatement = false; - let enabledSubstitutions; - let enclosingFunctionFlags; - let parametersWithPrecedingObjectRestOrSpread; - let enclosingSuperContainerFlags = 0; - let hierarchyFacts = 0; - let currentSourceFile; - let taggedTemplateStringDeclarations; - let capturedSuperProperties; - let hasSuperElementAccess; - const substitutedSuperAccessors = []; - return chainBundle(context, transformSourceFile); - function affectsSubtree(excludeFacts, includeFacts) { - return hierarchyFacts !== (hierarchyFacts & ~excludeFacts | includeFacts); - } - function enterSubtree(excludeFacts, includeFacts) { - const ancestorFacts = hierarchyFacts; - hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 3 /* AncestorFactsMask */; - return ancestorFacts; - } - function exitSubtree(ancestorFacts) { - hierarchyFacts = ancestorFacts; - } - function recordTaggedTemplateString(temp) { - taggedTemplateStringDeclarations = append( - taggedTemplateStringDeclarations, - factory2.createVariableDeclaration(temp) - ); - } - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - currentSourceFile = node; - const visited = visitSourceFile(node); - addEmitHelpers(visited, context.readEmitHelpers()); - currentSourceFile = void 0; - taggedTemplateStringDeclarations = void 0; - return visited; - } - function visitor(node) { - return visitorWorker( - node, - /*expressionResultIsUnused*/ - false - ); - } - function visitorWithUnusedExpressionResult(node) { - return visitorWorker( - node, - /*expressionResultIsUnused*/ - true - ); - } - function visitorNoAsyncModifier(node) { - if (node.kind === 134 /* AsyncKeyword */) { - return void 0; - } - return node; - } - function doWithHierarchyFacts(cb, value, excludeFacts, includeFacts) { - if (affectsSubtree(excludeFacts, includeFacts)) { - const ancestorFacts = enterSubtree(excludeFacts, includeFacts); - const result = cb(value); - exitSubtree(ancestorFacts); - return result; - } - return cb(value); - } - function visitDefault(node) { - return visitEachChild(node, visitor, context); - } - function visitorWorker(node, expressionResultIsUnused2) { - if ((node.transformFlags & 128 /* ContainsES2018 */) === 0) { - return node; - } - switch (node.kind) { - case 223 /* AwaitExpression */: - return visitAwaitExpression(node); - case 229 /* YieldExpression */: - return visitYieldExpression(node); - case 253 /* ReturnStatement */: - return visitReturnStatement(node); - case 256 /* LabeledStatement */: - return visitLabeledStatement(node); - case 210 /* ObjectLiteralExpression */: - return visitObjectLiteralExpression(node); - case 226 /* BinaryExpression */: - return visitBinaryExpression(node, expressionResultIsUnused2); - case 361 /* CommaListExpression */: - return visitCommaListExpression(node, expressionResultIsUnused2); - case 299 /* CatchClause */: - return visitCatchClause(node); - case 243 /* VariableStatement */: - return visitVariableStatement(node); - case 260 /* VariableDeclaration */: - return visitVariableDeclaration(node); - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 249 /* ForInStatement */: - return doWithHierarchyFacts( - visitDefault, - node, - 0 /* IterationStatementExcludes */, - 2 /* IterationStatementIncludes */ - ); - case 250 /* ForOfStatement */: - return visitForOfStatement( - node, - /*outermostLabeledStatement*/ - void 0 - ); - case 248 /* ForStatement */: - return doWithHierarchyFacts( - visitForStatement, - node, - 0 /* IterationStatementExcludes */, - 2 /* IterationStatementIncludes */ - ); - case 222 /* VoidExpression */: - return visitVoidExpression(node); - case 176 /* Constructor */: - return doWithHierarchyFacts( - visitConstructorDeclaration, - node, - 2 /* ClassOrFunctionExcludes */, - 1 /* ClassOrFunctionIncludes */ - ); - case 174 /* MethodDeclaration */: - return doWithHierarchyFacts( - visitMethodDeclaration, - node, - 2 /* ClassOrFunctionExcludes */, - 1 /* ClassOrFunctionIncludes */ - ); - case 177 /* GetAccessor */: - return doWithHierarchyFacts( - visitGetAccessorDeclaration, - node, - 2 /* ClassOrFunctionExcludes */, - 1 /* ClassOrFunctionIncludes */ - ); - case 178 /* SetAccessor */: - return doWithHierarchyFacts( - visitSetAccessorDeclaration, - node, - 2 /* ClassOrFunctionExcludes */, - 1 /* ClassOrFunctionIncludes */ - ); - case 262 /* FunctionDeclaration */: - return doWithHierarchyFacts( - visitFunctionDeclaration, - node, - 2 /* ClassOrFunctionExcludes */, - 1 /* ClassOrFunctionIncludes */ - ); - case 218 /* FunctionExpression */: - return doWithHierarchyFacts( - visitFunctionExpression, - node, - 2 /* ClassOrFunctionExcludes */, - 1 /* ClassOrFunctionIncludes */ - ); - case 219 /* ArrowFunction */: - return doWithHierarchyFacts( - visitArrowFunction, - node, - 2 /* ArrowFunctionExcludes */, - 0 /* ArrowFunctionIncludes */ - ); - case 169 /* Parameter */: - return visitParameter(node); - case 244 /* ExpressionStatement */: - return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: - return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 215 /* TaggedTemplateExpression */: - return visitTaggedTemplateExpression(node); - case 211 /* PropertyAccessExpression */: - if (capturedSuperProperties && isPropertyAccessExpression(node) && node.expression.kind === 108 /* SuperKeyword */) { - capturedSuperProperties.add(node.name.escapedText); - } - return visitEachChild(node, visitor, context); - case 212 /* ElementAccessExpression */: - if (capturedSuperProperties && node.expression.kind === 108 /* SuperKeyword */) { - hasSuperElementAccess = true; - } - return visitEachChild(node, visitor, context); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - return doWithHierarchyFacts( - visitDefault, - node, - 2 /* ClassOrFunctionExcludes */, - 1 /* ClassOrFunctionIncludes */ - ); - default: - return visitEachChild(node, visitor, context); - } - } - function visitAwaitExpression(node) { - if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) { - return setOriginalNode( - setTextRange( - factory2.createYieldExpression( - /*asteriskToken*/ - void 0, - emitHelpers().createAwaitHelper(visitNode(node.expression, visitor, isExpression)) - ), - /*location*/ - node - ), - node - ); - } - return visitEachChild(node, visitor, context); - } - function visitYieldExpression(node) { - if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) { - if (node.asteriskToken) { - const expression = visitNode(Debug.checkDefined(node.expression), visitor, isExpression); - return setOriginalNode( - setTextRange( - factory2.createYieldExpression( - /*asteriskToken*/ - void 0, - emitHelpers().createAwaitHelper( - factory2.updateYieldExpression( - node, - node.asteriskToken, - setTextRange( - emitHelpers().createAsyncDelegatorHelper( - setTextRange( - emitHelpers().createAsyncValuesHelper(expression), - expression - ) - ), - expression - ) - ) - ) - ), - node - ), - node - ); - } - return setOriginalNode( - setTextRange( - factory2.createYieldExpression( - /*asteriskToken*/ - void 0, - createDownlevelAwait( - node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero() - ) - ), - node - ), - node - ); - } - return visitEachChild(node, visitor, context); - } - function visitReturnStatement(node) { - if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) { - return factory2.updateReturnStatement(node, createDownlevelAwait( - node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero() - )); - } - return visitEachChild(node, visitor, context); - } - function visitLabeledStatement(node) { - if (enclosingFunctionFlags & 2 /* Async */) { - const statement = unwrapInnermostStatementOfLabel(node); - if (statement.kind === 250 /* ForOfStatement */ && statement.awaitModifier) { - return visitForOfStatement(statement, node); - } - return factory2.restoreEnclosingLabel(visitNode(statement, visitor, isStatement, factory2.liftToBlock), node); - } - return visitEachChild(node, visitor, context); - } - function chunkObjectLiteralElements(elements) { - let chunkObject; - const objects = []; - for (const e of elements) { - if (e.kind === 305 /* SpreadAssignment */) { - if (chunkObject) { - objects.push(factory2.createObjectLiteralExpression(chunkObject)); - chunkObject = void 0; - } - const target = e.expression; - objects.push(visitNode(target, visitor, isExpression)); - } else { - chunkObject = append(chunkObject, e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); - } - } - if (chunkObject) { - objects.push(factory2.createObjectLiteralExpression(chunkObject)); - } - return objects; - } - function visitObjectLiteralExpression(node) { - if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { - const objects = chunkObjectLiteralElements(node.properties); - if (objects.length && objects[0].kind !== 210 /* ObjectLiteralExpression */) { - objects.unshift(factory2.createObjectLiteralExpression()); - } - let expression = objects[0]; - if (objects.length > 1) { - for (let i = 1; i < objects.length; i++) { - expression = emitHelpers().createAssignHelper([expression, objects[i]]); - } - return expression; - } else { - return emitHelpers().createAssignHelper(objects); - } - } - return visitEachChild(node, visitor, context); - } - function visitExpressionStatement(node) { - return visitEachChild(node, visitorWithUnusedExpressionResult, context); - } - function visitParenthesizedExpression(node, expressionResultIsUnused2) { - return visitEachChild(node, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, context); - } - function visitSourceFile(node) { - const ancestorFacts = enterSubtree( - 2 /* SourceFileExcludes */, - isEffectiveStrictModeSourceFile(node, compilerOptions) ? 0 /* StrictModeSourceFileIncludes */ : 1 /* SourceFileIncludes */ - ); - exportedVariableStatement = false; - const visited = visitEachChild(node, visitor, context); - const statement = concatenate(visited.statements, taggedTemplateStringDeclarations && [ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList(taggedTemplateStringDeclarations) - ) - ]); - const result = factory2.updateSourceFile(visited, setTextRange(factory2.createNodeArray(statement), node.statements)); - exitSubtree(ancestorFacts); - return result; - } - function visitTaggedTemplateExpression(node) { - return processTaggedTemplateExpression( - context, - node, - visitor, - currentSourceFile, - recordTaggedTemplateString, - 0 /* LiftRestriction */ - ); - } - function visitBinaryExpression(node, expressionResultIsUnused2) { - if (isDestructuringAssignment(node) && containsObjectRestOrSpread(node.left)) { - return flattenDestructuringAssignment( - node, - visitor, - context, - 1 /* ObjectRest */, - !expressionResultIsUnused2 - ); - } - if (node.operatorToken.kind === 28 /* CommaToken */) { - return factory2.updateBinaryExpression( - node, - visitNode(node.left, visitorWithUnusedExpressionResult, isExpression), - node.operatorToken, - visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression) - ); - } - return visitEachChild(node, visitor, context); - } - function visitCommaListExpression(node, expressionResultIsUnused2) { - if (expressionResultIsUnused2) { - return visitEachChild(node, visitorWithUnusedExpressionResult, context); - } - let result; - for (let i = 0; i < node.elements.length; i++) { - const element = node.elements[i]; - const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression); - if (result || visited !== element) { - result || (result = node.elements.slice(0, i)); - result.push(visited); - } - } - const elements = result ? setTextRange(factory2.createNodeArray(result), node.elements) : node.elements; - return factory2.updateCommaListExpression(node, elements); - } - function visitCatchClause(node) { - if (node.variableDeclaration && isBindingPattern(node.variableDeclaration.name) && node.variableDeclaration.name.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { - const name = factory2.getGeneratedNameForNode(node.variableDeclaration.name); - const updatedDecl = factory2.updateVariableDeclaration( - node.variableDeclaration, - node.variableDeclaration.name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - name - ); - const visitedBindings = flattenDestructuringBinding(updatedDecl, visitor, context, 1 /* ObjectRest */); - let block = visitNode(node.block, visitor, isBlock); - if (some(visitedBindings)) { - block = factory2.updateBlock(block, [ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - visitedBindings - ), - ...block.statements - ]); - } - return factory2.updateCatchClause( - node, - factory2.updateVariableDeclaration( - node.variableDeclaration, - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ), - block - ); - } - return visitEachChild(node, visitor, context); - } - function visitVariableStatement(node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { - const savedExportedVariableStatement = exportedVariableStatement; - exportedVariableStatement = true; - const visited = visitEachChild(node, visitor, context); - exportedVariableStatement = savedExportedVariableStatement; - return visited; - } - return visitEachChild(node, visitor, context); - } - function visitVariableDeclaration(node) { - if (exportedVariableStatement) { - const savedExportedVariableStatement = exportedVariableStatement; - exportedVariableStatement = false; - const visited = visitVariableDeclarationWorker( - node, - /*exportedVariableStatement*/ - true - ); - exportedVariableStatement = savedExportedVariableStatement; - return visited; - } - return visitVariableDeclarationWorker( - node, - /*exportedVariableStatement*/ - false - ); - } - function visitVariableDeclarationWorker(node, exportedVariableStatement2) { - if (isBindingPattern(node.name) && node.name.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { - return flattenDestructuringBinding( - node, - visitor, - context, - 1 /* ObjectRest */, - /*rval*/ - void 0, - exportedVariableStatement2 - ); - } - return visitEachChild(node, visitor, context); - } - function visitForStatement(node) { - return factory2.updateForStatement( - node, - visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer), - visitNode(node.condition, visitor, isExpression), - visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression), - visitIterationBody(node.statement, visitor, context) - ); - } - function visitVoidExpression(node) { - return visitEachChild(node, visitorWithUnusedExpressionResult, context); - } - function visitForOfStatement(node, outermostLabeledStatement) { - const ancestorFacts = enterSubtree(0 /* IterationStatementExcludes */, 2 /* IterationStatementIncludes */); - if (node.initializer.transformFlags & 65536 /* ContainsObjectRestOrSpread */ || isAssignmentPattern(node.initializer) && containsObjectRestOrSpread(node.initializer)) { - node = transformForOfStatementWithObjectRest(node); - } - const result = node.awaitModifier ? transformForAwaitOfStatement(node, outermostLabeledStatement, ancestorFacts) : factory2.restoreEnclosingLabel(visitEachChild(node, visitor, context), outermostLabeledStatement); - exitSubtree(ancestorFacts); - return result; - } - function transformForOfStatementWithObjectRest(node) { - const initializerWithoutParens = skipParentheses(node.initializer); - if (isVariableDeclarationList(initializerWithoutParens) || isAssignmentPattern(initializerWithoutParens)) { - let bodyLocation; - let statementsLocation; - const temp = factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const statements = [createForOfBindingStatement(factory2, initializerWithoutParens, temp)]; - if (isBlock(node.statement)) { - addRange(statements, node.statement.statements); - bodyLocation = node.statement; - statementsLocation = node.statement.statements; - } else if (node.statement) { - append(statements, node.statement); - bodyLocation = node.statement; - statementsLocation = node.statement; - } - return factory2.updateForOfStatement( - node, - node.awaitModifier, - setTextRange( - factory2.createVariableDeclarationList( - [ - setTextRange(factory2.createVariableDeclaration(temp), node.initializer) - ], - 1 /* Let */ - ), - node.initializer - ), - node.expression, - setTextRange( - factory2.createBlock( - setTextRange(factory2.createNodeArray(statements), statementsLocation), - /*multiLine*/ - true - ), - bodyLocation - ) - ); - } - return node; - } - function convertForOfStatementHead(node, boundValue, nonUserCode) { - const value = factory2.createTempVariable(hoistVariableDeclaration); - const iteratorValueExpression = factory2.createAssignment(value, boundValue); - const iteratorValueStatement = factory2.createExpressionStatement(iteratorValueExpression); - setSourceMapRange(iteratorValueStatement, node.expression); - const exitNonUserCodeExpression = factory2.createAssignment(nonUserCode, factory2.createFalse()); - const exitNonUserCodeStatement = factory2.createExpressionStatement(exitNonUserCodeExpression); - setSourceMapRange(exitNonUserCodeStatement, node.expression); - const statements = [iteratorValueStatement, exitNonUserCodeStatement]; - const binding = createForOfBindingStatement(factory2, node.initializer, value); - statements.push(visitNode(binding, visitor, isStatement)); - let bodyLocation; - let statementsLocation; - const statement = visitIterationBody(node.statement, visitor, context); - if (isBlock(statement)) { - addRange(statements, statement.statements); - bodyLocation = statement; - statementsLocation = statement.statements; - } else { - statements.push(statement); - } - return setTextRange( - factory2.createBlock( - setTextRange(factory2.createNodeArray(statements), statementsLocation), - /*multiLine*/ - true - ), - bodyLocation - ); - } - function createDownlevelAwait(expression) { - return enclosingFunctionFlags & 1 /* Generator */ ? factory2.createYieldExpression( - /*asteriskToken*/ - void 0, - emitHelpers().createAwaitHelper(expression) - ) : factory2.createAwaitExpression(expression); - } - function transformForAwaitOfStatement(node, outermostLabeledStatement, ancestorFacts) { - const expression = visitNode(node.expression, visitor, isExpression); - const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const result = isIdentifier(expression) ? factory2.getGeneratedNameForNode(iterator) : factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const nonUserCode = factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const done = factory2.createTempVariable(hoistVariableDeclaration); - const errorRecord = factory2.createUniqueName("e"); - const catchVariable = factory2.getGeneratedNameForNode(errorRecord); - const returnMethod = factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const callValues = setTextRange(emitHelpers().createAsyncValuesHelper(expression), node.expression); - const callNext = factory2.createCallExpression( - factory2.createPropertyAccessExpression(iterator, "next"), - /*typeArguments*/ - void 0, - [] - ); - const getDone = factory2.createPropertyAccessExpression(result, "done"); - const getValue = factory2.createPropertyAccessExpression(result, "value"); - const callReturn = factory2.createFunctionCallCall(returnMethod, iterator, []); - hoistVariableDeclaration(errorRecord); - hoistVariableDeclaration(returnMethod); - const initializer = ancestorFacts & 2 /* IterationContainer */ ? factory2.inlineExpressions([factory2.createAssignment(errorRecord, factory2.createVoidZero()), callValues]) : callValues; - const forStatement = setEmitFlags( - setTextRange( - factory2.createForStatement( - /*initializer*/ - setEmitFlags( - setTextRange( - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - nonUserCode, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createTrue() - ), - setTextRange(factory2.createVariableDeclaration( - iterator, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ), node.expression), - factory2.createVariableDeclaration(result) - ]), - node.expression - ), - 4194304 /* NoHoisting */ - ), - /*condition*/ - factory2.inlineExpressions([ - factory2.createAssignment(result, createDownlevelAwait(callNext)), - factory2.createAssignment(done, getDone), - factory2.createLogicalNot(done) - ]), - /*incrementor*/ - factory2.createAssignment(nonUserCode, factory2.createTrue()), - /*statement*/ - convertForOfStatementHead(node, getValue, nonUserCode) - ), - /*location*/ - node - ), - 512 /* NoTokenTrailingSourceMaps */ - ); - setOriginalNode(forStatement, node); - return factory2.createTryStatement( - factory2.createBlock([ - factory2.restoreEnclosingLabel( - forStatement, - outermostLabeledStatement - ) - ]), - factory2.createCatchClause( - factory2.createVariableDeclaration(catchVariable), - setEmitFlags( - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createAssignment( - errorRecord, - factory2.createObjectLiteralExpression([ - factory2.createPropertyAssignment("error", catchVariable) - ]) - ) - ) - ]), - 1 /* SingleLine */ - ) - ), - factory2.createBlock([ - factory2.createTryStatement( - /*tryBlock*/ - factory2.createBlock([ - setEmitFlags( - factory2.createIfStatement( - factory2.createLogicalAnd( - factory2.createLogicalAnd( - factory2.createLogicalNot(nonUserCode), - factory2.createLogicalNot(done) - ), - factory2.createAssignment( - returnMethod, - factory2.createPropertyAccessExpression(iterator, "return") - ) - ), - factory2.createExpressionStatement(createDownlevelAwait(callReturn)) - ), - 1 /* SingleLine */ - ) - ]), - /*catchClause*/ - void 0, - /*finallyBlock*/ - setEmitFlags( - factory2.createBlock([ - setEmitFlags( - factory2.createIfStatement( - errorRecord, - factory2.createThrowStatement( - factory2.createPropertyAccessExpression(errorRecord, "error") - ) - ), - 1 /* SingleLine */ - ) - ]), - 1 /* SingleLine */ - ) - ) - ]) - ); - } - function parameterVisitor(node) { - Debug.assertNode(node, isParameter); - return visitParameter(node); - } - function visitParameter(node) { - if (parametersWithPrecedingObjectRestOrSpread == null ? void 0 : parametersWithPrecedingObjectRestOrSpread.has(node)) { - return factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - node.dotDotDotToken, - isBindingPattern(node.name) ? factory2.getGeneratedNameForNode(node) : node.name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ); - } - if (node.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { - return factory2.updateParameterDeclaration( - node, - /*modifiers*/ - void 0, - node.dotDotDotToken, - factory2.getGeneratedNameForNode(node), - /*questionToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ); - } - return visitEachChild(node, visitor, context); - } - function collectParametersWithPrecedingObjectRestOrSpread(node) { - let parameters; - for (const parameter of node.parameters) { - if (parameters) { - parameters.add(parameter); - } else if (parameter.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { - parameters = /* @__PURE__ */ new Set(); - } - } - return parameters; - } - function visitConstructorDeclaration(node) { - const savedEnclosingFunctionFlags = enclosingFunctionFlags; - const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread; - enclosingFunctionFlags = getFunctionFlags(node); - parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node); - const updated = factory2.updateConstructorDeclaration( - node, - node.modifiers, - visitParameterList(node.parameters, parameterVisitor, context), - transformFunctionBody2(node) - ); - enclosingFunctionFlags = savedEnclosingFunctionFlags; - parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread; - return updated; - } - function visitGetAccessorDeclaration(node) { - const savedEnclosingFunctionFlags = enclosingFunctionFlags; - const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread; - enclosingFunctionFlags = getFunctionFlags(node); - parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node); - const updated = factory2.updateGetAccessorDeclaration( - node, - node.modifiers, - visitNode(node.name, visitor, isPropertyName), - visitParameterList(node.parameters, parameterVisitor, context), - /*type*/ - void 0, - transformFunctionBody2(node) - ); - enclosingFunctionFlags = savedEnclosingFunctionFlags; - parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread; - return updated; - } - function visitSetAccessorDeclaration(node) { - const savedEnclosingFunctionFlags = enclosingFunctionFlags; - const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread; - enclosingFunctionFlags = getFunctionFlags(node); - parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node); - const updated = factory2.updateSetAccessorDeclaration( - node, - node.modifiers, - visitNode(node.name, visitor, isPropertyName), - visitParameterList(node.parameters, parameterVisitor, context), - transformFunctionBody2(node) - ); - enclosingFunctionFlags = savedEnclosingFunctionFlags; - parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread; - return updated; - } - function visitMethodDeclaration(node) { - const savedEnclosingFunctionFlags = enclosingFunctionFlags; - const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread; - enclosingFunctionFlags = getFunctionFlags(node); - parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node); - const updated = factory2.updateMethodDeclaration( - node, - enclosingFunctionFlags & 1 /* Generator */ ? visitNodes2(node.modifiers, visitorNoAsyncModifier, isModifierLike) : node.modifiers, - enclosingFunctionFlags & 2 /* Async */ ? void 0 : node.asteriskToken, - visitNode(node.name, visitor, isPropertyName), - visitNode( - /*node*/ - void 0, - visitor, - isQuestionToken - ), - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, parameterVisitor, context), - /*type*/ - void 0, - enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionBody(node) : transformFunctionBody2(node) - ); - enclosingFunctionFlags = savedEnclosingFunctionFlags; - parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread; - return updated; - } - function visitFunctionDeclaration(node) { - const savedEnclosingFunctionFlags = enclosingFunctionFlags; - const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread; - enclosingFunctionFlags = getFunctionFlags(node); - parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node); - const updated = factory2.updateFunctionDeclaration( - node, - enclosingFunctionFlags & 1 /* Generator */ ? visitNodes2(node.modifiers, visitorNoAsyncModifier, isModifier) : node.modifiers, - enclosingFunctionFlags & 2 /* Async */ ? void 0 : node.asteriskToken, - node.name, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, parameterVisitor, context), - /*type*/ - void 0, - enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionBody(node) : transformFunctionBody2(node) - ); - enclosingFunctionFlags = savedEnclosingFunctionFlags; - parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread; - return updated; - } - function visitArrowFunction(node) { - const savedEnclosingFunctionFlags = enclosingFunctionFlags; - const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread; - enclosingFunctionFlags = getFunctionFlags(node); - parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node); - const updated = factory2.updateArrowFunction( - node, - node.modifiers, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, parameterVisitor, context), - /*type*/ - void 0, - node.equalsGreaterThanToken, - transformFunctionBody2(node) - ); - enclosingFunctionFlags = savedEnclosingFunctionFlags; - parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread; - return updated; - } - function visitFunctionExpression(node) { - const savedEnclosingFunctionFlags = enclosingFunctionFlags; - const savedParametersWithPrecedingObjectRestOrSpread = parametersWithPrecedingObjectRestOrSpread; - enclosingFunctionFlags = getFunctionFlags(node); - parametersWithPrecedingObjectRestOrSpread = collectParametersWithPrecedingObjectRestOrSpread(node); - const updated = factory2.updateFunctionExpression( - node, - enclosingFunctionFlags & 1 /* Generator */ ? visitNodes2(node.modifiers, visitorNoAsyncModifier, isModifier) : node.modifiers, - enclosingFunctionFlags & 2 /* Async */ ? void 0 : node.asteriskToken, - node.name, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, parameterVisitor, context), - /*type*/ - void 0, - enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */ ? transformAsyncGeneratorFunctionBody(node) : transformFunctionBody2(node) - ); - enclosingFunctionFlags = savedEnclosingFunctionFlags; - parametersWithPrecedingObjectRestOrSpread = savedParametersWithPrecedingObjectRestOrSpread; - return updated; - } - function transformAsyncGeneratorFunctionBody(node) { - resumeLexicalEnvironment(); - const statements = []; - const statementOffset = factory2.copyPrologue( - node.body.statements, - statements, - /*ensureUseStrict*/ - false, - visitor - ); - appendObjectRestAssignmentsIfNeeded(statements, node); - const savedCapturedSuperProperties = capturedSuperProperties; - const savedHasSuperElementAccess = hasSuperElementAccess; - capturedSuperProperties = /* @__PURE__ */ new Set(); - hasSuperElementAccess = false; - const returnStatement = factory2.createReturnStatement( - emitHelpers().createAsyncGeneratorHelper( - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - factory2.createToken(42 /* AsteriskToken */), - node.name && factory2.getGeneratedNameForNode(node.name), - /*typeParameters*/ - void 0, - /*parameters*/ - [], - /*type*/ - void 0, - factory2.updateBlock( - node.body, - visitLexicalEnvironment(node.body.statements, visitor, context, statementOffset) - ) - ), - !!(hierarchyFacts & 1 /* HasLexicalThis */) - ) - ); - const emitSuperHelpers = languageVersion >= 2 /* ES2015 */ && resolver.getNodeCheckFlags(node) & (256 /* MethodWithSuperPropertyAssignmentInAsync */ | 128 /* MethodWithSuperPropertyAccessInAsync */); - if (emitSuperHelpers) { - enableSubstitutionForAsyncMethodsWithSuper(); - const variableStatement = createSuperAccessVariableStatement(factory2, resolver, node, capturedSuperProperties); - substitutedSuperAccessors[getNodeId(variableStatement)] = true; - insertStatementsAfterStandardPrologue(statements, [variableStatement]); - } - statements.push(returnStatement); - insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); - const block = factory2.updateBlock(node.body, statements); - if (emitSuperHelpers && hasSuperElementAccess) { - if (resolver.getNodeCheckFlags(node) & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { - addEmitHelper(block, advancedAsyncSuperHelper); - } else if (resolver.getNodeCheckFlags(node) & 128 /* MethodWithSuperPropertyAccessInAsync */) { - addEmitHelper(block, asyncSuperHelper); - } - } - capturedSuperProperties = savedCapturedSuperProperties; - hasSuperElementAccess = savedHasSuperElementAccess; - return block; - } - function transformFunctionBody2(node) { - resumeLexicalEnvironment(); - let statementOffset = 0; - const statements = []; - const body = visitNode(node.body, visitor, isConciseBody) ?? factory2.createBlock([]); - if (isBlock(body)) { - statementOffset = factory2.copyPrologue( - body.statements, - statements, - /*ensureUseStrict*/ - false, - visitor - ); - } - addRange(statements, appendObjectRestAssignmentsIfNeeded( - /*statements*/ - void 0, - node - )); - const leadingStatements = endLexicalEnvironment(); - if (statementOffset > 0 || some(statements) || some(leadingStatements)) { - const block = factory2.converters.convertToFunctionBlock( - body, - /*multiLine*/ - true - ); - insertStatementsAfterStandardPrologue(statements, leadingStatements); - addRange(statements, block.statements.slice(statementOffset)); - return factory2.updateBlock(block, setTextRange(factory2.createNodeArray(statements), block.statements)); - } - return body; - } - function appendObjectRestAssignmentsIfNeeded(statements, node) { - let containsPrecedingObjectRestOrSpread = false; - for (const parameter of node.parameters) { - if (containsPrecedingObjectRestOrSpread) { - if (isBindingPattern(parameter.name)) { - if (parameter.name.elements.length > 0) { - const declarations = flattenDestructuringBinding( - parameter, - visitor, - context, - 0 /* All */, - factory2.getGeneratedNameForNode(parameter) - ); - if (some(declarations)) { - const declarationList = factory2.createVariableDeclarationList(declarations); - const statement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - declarationList - ); - setEmitFlags(statement, 2097152 /* CustomPrologue */); - statements = append(statements, statement); - } - } else if (parameter.initializer) { - const name = factory2.getGeneratedNameForNode(parameter); - const initializer = visitNode(parameter.initializer, visitor, isExpression); - const assignment = factory2.createAssignment(name, initializer); - const statement = factory2.createExpressionStatement(assignment); - setEmitFlags(statement, 2097152 /* CustomPrologue */); - statements = append(statements, statement); - } - } else if (parameter.initializer) { - const name = factory2.cloneNode(parameter.name); - setTextRange(name, parameter.name); - setEmitFlags(name, 96 /* NoSourceMap */); - const initializer = visitNode(parameter.initializer, visitor, isExpression); - addEmitFlags(initializer, 96 /* NoSourceMap */ | 3072 /* NoComments */); - const assignment = factory2.createAssignment(name, initializer); - setTextRange(assignment, parameter); - setEmitFlags(assignment, 3072 /* NoComments */); - const block = factory2.createBlock([factory2.createExpressionStatement(assignment)]); - setTextRange(block, parameter); - setEmitFlags(block, 1 /* SingleLine */ | 64 /* NoTrailingSourceMap */ | 768 /* NoTokenSourceMaps */ | 3072 /* NoComments */); - const typeCheck = factory2.createTypeCheck(factory2.cloneNode(parameter.name), "undefined"); - const statement = factory2.createIfStatement(typeCheck, block); - startOnNewLine(statement); - setTextRange(statement, parameter); - setEmitFlags(statement, 768 /* NoTokenSourceMaps */ | 64 /* NoTrailingSourceMap */ | 2097152 /* CustomPrologue */ | 3072 /* NoComments */); - statements = append(statements, statement); - } - } else if (parameter.transformFlags & 65536 /* ContainsObjectRestOrSpread */) { - containsPrecedingObjectRestOrSpread = true; - const declarations = flattenDestructuringBinding( - parameter, - visitor, - context, - 1 /* ObjectRest */, - factory2.getGeneratedNameForNode(parameter), - /*hoistTempVariables*/ - false, - /*skipInitializer*/ - true - ); - if (some(declarations)) { - const declarationList = factory2.createVariableDeclarationList(declarations); - const statement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - declarationList - ); - setEmitFlags(statement, 2097152 /* CustomPrologue */); - statements = append(statements, statement); - } - } - } - return statements; - } - function enableSubstitutionForAsyncMethodsWithSuper() { - if ((enabledSubstitutions & 1 /* AsyncMethodsWithSuper */) === 0) { - enabledSubstitutions |= 1 /* AsyncMethodsWithSuper */; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(212 /* ElementAccessExpression */); - context.enableEmitNotification(263 /* ClassDeclaration */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(243 /* VariableStatement */); - } - } - function onEmitNode(hint, node, emitCallback) { - if (enabledSubstitutions & 1 /* AsyncMethodsWithSuper */ && isSuperContainer(node)) { - const superContainerFlags = resolver.getNodeCheckFlags(node) & (128 /* MethodWithSuperPropertyAccessInAsync */ | 256 /* MethodWithSuperPropertyAssignmentInAsync */); - if (superContainerFlags !== enclosingSuperContainerFlags) { - const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags; - enclosingSuperContainerFlags = superContainerFlags; - previousOnEmitNode(hint, node, emitCallback); - enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags; - return; - } - } else if (enabledSubstitutions && substitutedSuperAccessors[getNodeId(node)]) { - const savedEnclosingSuperContainerFlags = enclosingSuperContainerFlags; - enclosingSuperContainerFlags = 0; - previousOnEmitNode(hint, node, emitCallback); - enclosingSuperContainerFlags = savedEnclosingSuperContainerFlags; - return; - } - previousOnEmitNode(hint, node, emitCallback); - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (hint === 1 /* Expression */ && enclosingSuperContainerFlags) { - return substituteExpression(node); - } - return node; - } - function substituteExpression(node) { - switch (node.kind) { - case 211 /* PropertyAccessExpression */: - return substitutePropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: - return substituteElementAccessExpression(node); - case 213 /* CallExpression */: - return substituteCallExpression(node); - } - return node; - } - function substitutePropertyAccessExpression(node) { - if (node.expression.kind === 108 /* SuperKeyword */) { - return setTextRange( - factory2.createPropertyAccessExpression( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), - node.name - ), - node - ); - } - return node; - } - function substituteElementAccessExpression(node) { - if (node.expression.kind === 108 /* SuperKeyword */) { - return createSuperElementAccessInAsyncMethod( - node.argumentExpression, - node - ); - } - return node; - } - function substituteCallExpression(node) { - const expression = node.expression; - if (isSuperProperty(expression)) { - const argumentExpression = isPropertyAccessExpression(expression) ? substitutePropertyAccessExpression(expression) : substituteElementAccessExpression(expression); - return factory2.createCallExpression( - factory2.createPropertyAccessExpression(argumentExpression, "call"), - /*typeArguments*/ - void 0, - [ - factory2.createThis(), - ...node.arguments - ] - ); - } - return node; - } - function isSuperContainer(node) { - const kind = node.kind; - return kind === 263 /* ClassDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; - } - function createSuperElementAccessInAsyncMethod(argumentExpression, location) { - if (enclosingSuperContainerFlags & 256 /* MethodWithSuperPropertyAssignmentInAsync */) { - return setTextRange( - factory2.createPropertyAccessExpression( - factory2.createCallExpression( - factory2.createIdentifier("_superIndex"), - /*typeArguments*/ - void 0, - [argumentExpression] - ), - "value" - ), - location - ); - } else { - return setTextRange( - factory2.createCallExpression( - factory2.createIdentifier("_superIndex"), - /*typeArguments*/ - void 0, - [argumentExpression] - ), - location - ); - } - } - } - var init_es2018 = __esm({ - "src/compiler/transformers/es2018.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/es2019.ts - function transformES2019(context) { - const factory2 = context.factory; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - return visitEachChild(node, visitor, context); - } - function visitor(node) { - if ((node.transformFlags & 64 /* ContainsES2019 */) === 0) { - return node; - } - switch (node.kind) { - case 299 /* CatchClause */: - return visitCatchClause(node); - default: - return visitEachChild(node, visitor, context); - } - } - function visitCatchClause(node) { - if (!node.variableDeclaration) { - return factory2.updateCatchClause( - node, - factory2.createVariableDeclaration(factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - )), - visitNode(node.block, visitor, isBlock) - ); - } - return visitEachChild(node, visitor, context); - } - } - var init_es2019 = __esm({ - "src/compiler/transformers/es2019.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/es2020.ts - function transformES2020(context) { - const { - factory: factory2, - hoistVariableDeclaration - } = context; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - return visitEachChild(node, visitor, context); - } - function visitor(node) { - if ((node.transformFlags & 32 /* ContainsES2020 */) === 0) { - return node; - } - switch (node.kind) { - case 213 /* CallExpression */: { - const updated = visitNonOptionalCallExpression( - node, - /*captureThisArg*/ - false - ); - Debug.assertNotNode(updated, isSyntheticReference); - return updated; - } - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - if (isOptionalChain(node)) { - const updated = visitOptionalExpression( - node, - /*captureThisArg*/ - false, - /*isDelete*/ - false - ); - Debug.assertNotNode(updated, isSyntheticReference); - return updated; - } - return visitEachChild(node, visitor, context); - case 226 /* BinaryExpression */: - if (node.operatorToken.kind === 61 /* QuestionQuestionToken */) { - return transformNullishCoalescingExpression(node); - } - return visitEachChild(node, visitor, context); - case 220 /* DeleteExpression */: - return visitDeleteExpression(node); - default: - return visitEachChild(node, visitor, context); - } - } - function flattenChain(chain) { - Debug.assertNotNode(chain, isNonNullChain); - const links = [chain]; - while (!chain.questionDotToken && !isTaggedTemplateExpression(chain)) { - chain = cast(skipPartiallyEmittedExpressions(chain.expression), isOptionalChain); - Debug.assertNotNode(chain, isNonNullChain); - links.unshift(chain); - } - return { expression: chain.expression, chain: links }; - } - function visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete) { - const expression = visitNonOptionalExpression(node.expression, captureThisArg, isDelete); - if (isSyntheticReference(expression)) { - return factory2.createSyntheticReferenceExpression(factory2.updateParenthesizedExpression(node, expression.expression), expression.thisArg); - } - return factory2.updateParenthesizedExpression(node, expression); - } - function visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete) { - if (isOptionalChain(node)) { - return visitOptionalExpression(node, captureThisArg, isDelete); - } - let expression = visitNode(node.expression, visitor, isExpression); - Debug.assertNotNode(expression, isSyntheticReference); - let thisArg; - if (captureThisArg) { - if (!isSimpleCopiableExpression(expression)) { - thisArg = factory2.createTempVariable(hoistVariableDeclaration); - expression = factory2.createAssignment(thisArg, expression); - } else { - thisArg = expression; - } - } - expression = node.kind === 211 /* PropertyAccessExpression */ ? factory2.updatePropertyAccessExpression(node, expression, visitNode(node.name, visitor, isIdentifier)) : factory2.updateElementAccessExpression(node, expression, visitNode(node.argumentExpression, visitor, isExpression)); - return thisArg ? factory2.createSyntheticReferenceExpression(expression, thisArg) : expression; - } - function visitNonOptionalCallExpression(node, captureThisArg) { - if (isOptionalChain(node)) { - return visitOptionalExpression( - node, - captureThisArg, - /*isDelete*/ - false - ); - } - if (isParenthesizedExpression(node.expression) && isOptionalChain(skipParentheses(node.expression))) { - const expression = visitNonOptionalParenthesizedExpression( - node.expression, - /*captureThisArg*/ - true, - /*isDelete*/ - false - ); - const args = visitNodes2(node.arguments, visitor, isExpression); - if (isSyntheticReference(expression)) { - return setTextRange(factory2.createFunctionCallCall(expression.expression, expression.thisArg, args), node); - } - return factory2.updateCallExpression( - node, - expression, - /*typeArguments*/ - void 0, - args - ); - } - return visitEachChild(node, visitor, context); - } - function visitNonOptionalExpression(node, captureThisArg, isDelete) { - switch (node.kind) { - case 217 /* ParenthesizedExpression */: - return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete); - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete); - case 213 /* CallExpression */: - return visitNonOptionalCallExpression(node, captureThisArg); - default: - return visitNode(node, visitor, isExpression); - } - } - function visitOptionalExpression(node, captureThisArg, isDelete) { - const { expression, chain } = flattenChain(node); - const left = visitNonOptionalExpression( - skipPartiallyEmittedExpressions(expression), - isCallChain(chain[0]), - /*isDelete*/ - false - ); - let leftThisArg = isSyntheticReference(left) ? left.thisArg : void 0; - let capturedLeft = isSyntheticReference(left) ? left.expression : left; - let leftExpression = factory2.restoreOuterExpressions(expression, capturedLeft, 8 /* PartiallyEmittedExpressions */); - if (!isSimpleCopiableExpression(capturedLeft)) { - capturedLeft = factory2.createTempVariable(hoistVariableDeclaration); - leftExpression = factory2.createAssignment(capturedLeft, leftExpression); - } - let rightExpression = capturedLeft; - let thisArg; - for (let i = 0; i < chain.length; i++) { - const segment = chain[i]; - switch (segment.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - if (i === chain.length - 1 && captureThisArg) { - if (!isSimpleCopiableExpression(rightExpression)) { - thisArg = factory2.createTempVariable(hoistVariableDeclaration); - rightExpression = factory2.createAssignment(thisArg, rightExpression); - } else { - thisArg = rightExpression; - } - } - rightExpression = segment.kind === 211 /* PropertyAccessExpression */ ? factory2.createPropertyAccessExpression(rightExpression, visitNode(segment.name, visitor, isIdentifier)) : factory2.createElementAccessExpression(rightExpression, visitNode(segment.argumentExpression, visitor, isExpression)); - break; - case 213 /* CallExpression */: - if (i === 0 && leftThisArg) { - if (!isGeneratedIdentifier(leftThisArg)) { - leftThisArg = factory2.cloneNode(leftThisArg); - addEmitFlags(leftThisArg, 3072 /* NoComments */); - } - rightExpression = factory2.createFunctionCallCall( - rightExpression, - leftThisArg.kind === 108 /* SuperKeyword */ ? factory2.createThis() : leftThisArg, - visitNodes2(segment.arguments, visitor, isExpression) - ); - } else { - rightExpression = factory2.createCallExpression( - rightExpression, - /*typeArguments*/ - void 0, - visitNodes2(segment.arguments, visitor, isExpression) - ); - } - break; - } - setOriginalNode(rightExpression, segment); - } - const target = isDelete ? factory2.createConditionalExpression( - createNotNullCondition( - leftExpression, - capturedLeft, - /*invert*/ - true - ), - /*questionToken*/ - void 0, - factory2.createTrue(), - /*colonToken*/ - void 0, - factory2.createDeleteExpression(rightExpression) - ) : factory2.createConditionalExpression( - createNotNullCondition( - leftExpression, - capturedLeft, - /*invert*/ - true - ), - /*questionToken*/ - void 0, - factory2.createVoidZero(), - /*colonToken*/ - void 0, - rightExpression - ); - setTextRange(target, node); - return thisArg ? factory2.createSyntheticReferenceExpression(target, thisArg) : target; - } - function createNotNullCondition(left, right, invert) { - return factory2.createBinaryExpression( - factory2.createBinaryExpression( - left, - factory2.createToken(invert ? 37 /* EqualsEqualsEqualsToken */ : 38 /* ExclamationEqualsEqualsToken */), - factory2.createNull() - ), - factory2.createToken(invert ? 57 /* BarBarToken */ : 56 /* AmpersandAmpersandToken */), - factory2.createBinaryExpression( - right, - factory2.createToken(invert ? 37 /* EqualsEqualsEqualsToken */ : 38 /* ExclamationEqualsEqualsToken */), - factory2.createVoidZero() - ) - ); - } - function transformNullishCoalescingExpression(node) { - let left = visitNode(node.left, visitor, isExpression); - let right = left; - if (!isSimpleCopiableExpression(left)) { - right = factory2.createTempVariable(hoistVariableDeclaration); - left = factory2.createAssignment(right, left); - } - return setTextRange(factory2.createConditionalExpression( - createNotNullCondition(left, right), - /*questionToken*/ - void 0, - right, - /*colonToken*/ - void 0, - visitNode(node.right, visitor, isExpression) - ), node); - } - function visitDeleteExpression(node) { - return isOptionalChain(skipParentheses(node.expression)) ? setOriginalNode(visitNonOptionalExpression( - node.expression, - /*captureThisArg*/ - false, - /*isDelete*/ - true - ), node) : factory2.updateDeleteExpression(node, visitNode(node.expression, visitor, isExpression)); - } - } - var init_es2020 = __esm({ - "src/compiler/transformers/es2020.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/es2021.ts - function transformES2021(context) { - const { - hoistVariableDeclaration, - factory: factory2 - } = context; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - return visitEachChild(node, visitor, context); - } - function visitor(node) { - if ((node.transformFlags & 16 /* ContainsES2021 */) === 0) { - return node; - } - if (isLogicalOrCoalescingAssignmentExpression(node)) { - return transformLogicalAssignment(node); - } - return visitEachChild(node, visitor, context); - } - function transformLogicalAssignment(binaryExpression) { - const operator = binaryExpression.operatorToken; - const nonAssignmentOperator = getNonAssignmentOperatorForCompoundAssignment(operator.kind); - let left = skipParentheses(visitNode(binaryExpression.left, visitor, isLeftHandSideExpression)); - let assignmentTarget = left; - const right = skipParentheses(visitNode(binaryExpression.right, visitor, isExpression)); - if (isAccessExpression(left)) { - const propertyAccessTargetSimpleCopiable = isSimpleCopiableExpression(left.expression); - const propertyAccessTarget = propertyAccessTargetSimpleCopiable ? left.expression : factory2.createTempVariable(hoistVariableDeclaration); - const propertyAccessTargetAssignment = propertyAccessTargetSimpleCopiable ? left.expression : factory2.createAssignment( - propertyAccessTarget, - left.expression - ); - if (isPropertyAccessExpression(left)) { - assignmentTarget = factory2.createPropertyAccessExpression( - propertyAccessTarget, - left.name - ); - left = factory2.createPropertyAccessExpression( - propertyAccessTargetAssignment, - left.name - ); - } else { - const elementAccessArgumentSimpleCopiable = isSimpleCopiableExpression(left.argumentExpression); - const elementAccessArgument = elementAccessArgumentSimpleCopiable ? left.argumentExpression : factory2.createTempVariable(hoistVariableDeclaration); - assignmentTarget = factory2.createElementAccessExpression( - propertyAccessTarget, - elementAccessArgument - ); - left = factory2.createElementAccessExpression( - propertyAccessTargetAssignment, - elementAccessArgumentSimpleCopiable ? left.argumentExpression : factory2.createAssignment( - elementAccessArgument, - left.argumentExpression - ) - ); - } - } - return factory2.createBinaryExpression( - left, - nonAssignmentOperator, - factory2.createParenthesizedExpression( - factory2.createAssignment( - assignmentTarget, - right - ) - ) - ); - } - } - var init_es2021 = __esm({ - "src/compiler/transformers/es2021.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/esnext.ts - function transformESNext(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - hoistVariableDeclaration, - startLexicalEnvironment, - endLexicalEnvironment - } = context; - let exportBindings; - let exportVars; - let defaultExportBinding; - let exportEqualsBinding; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - const visited = visitNode(node, visitor, isSourceFile); - addEmitHelpers(visited, context.readEmitHelpers()); - exportVars = void 0; - exportBindings = void 0; - defaultExportBinding = void 0; - return visited; - } - function visitor(node) { - if ((node.transformFlags & 4 /* ContainsESNext */) === 0) { - return node; - } - switch (node.kind) { - case 312 /* SourceFile */: - return visitSourceFile(node); - case 241 /* Block */: - return visitBlock(node); - case 248 /* ForStatement */: - return visitForStatement(node); - case 250 /* ForOfStatement */: - return visitForOfStatement(node); - case 255 /* SwitchStatement */: - return visitSwitchStatement(node); - default: - return visitEachChild(node, visitor, context); - } - } - function visitSourceFile(node) { - const usingKind = getUsingKindOfStatements(node.statements); - if (usingKind) { - startLexicalEnvironment(); - exportBindings = new IdentifierNameMap(); - exportVars = []; - const prologueCount = countPrologueStatements(node.statements); - const topLevelStatements = []; - addRange(topLevelStatements, visitArray(node.statements, visitor, isStatement, 0, prologueCount)); - let pos = prologueCount; - while (pos < node.statements.length) { - const statement = node.statements[pos]; - if (getUsingKind(statement) !== 0 /* None */) { - if (pos > prologueCount) { - addRange(topLevelStatements, visitNodes2(node.statements, visitor, isStatement, prologueCount, pos - prologueCount)); - } - break; - } - pos++; - } - Debug.assert(pos < node.statements.length, "Should have encountered at least one 'using' statement."); - const envBinding = createEnvBinding(); - const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements); - if (exportBindings.size) { - append(topLevelStatements, factory2.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory2.createNamedExports(arrayFrom(exportBindings.values())) - )); - } - addRange(topLevelStatements, endLexicalEnvironment()); - if (exportVars.length) { - topLevelStatements.push(factory2.createVariableStatement( - factory2.createModifiersFromModifierFlags(1 /* Export */), - factory2.createVariableDeclarationList( - exportVars, - 1 /* Let */ - ) - )); - } - addRange(topLevelStatements, createDownlevelUsingStatements(bodyStatements, envBinding, usingKind === 2 /* Async */)); - if (exportEqualsBinding) { - topLevelStatements.push(factory2.createExportAssignment( - /*modifiers*/ - void 0, - /*isExportEquals*/ - true, - exportEqualsBinding - )); - } - return factory2.updateSourceFile(node, topLevelStatements); - } - return visitEachChild(node, visitor, context); - } - function visitBlock(node) { - const usingKind = getUsingKindOfStatements(node.statements); - if (usingKind) { - const prologueCount = countPrologueStatements(node.statements); - const envBinding = createEnvBinding(); - return factory2.updateBlock( - node, - [ - ...visitArray(node.statements, visitor, isStatement, 0, prologueCount), - ...createDownlevelUsingStatements( - transformUsingDeclarations( - node.statements, - prologueCount, - node.statements.length, - envBinding, - /*topLevelStatements*/ - void 0 - ), - envBinding, - usingKind === 2 /* Async */ - ) - ] - ); - } - return visitEachChild(node, visitor, context); - } - function visitForStatement(node) { - if (node.initializer && isUsingVariableDeclarationList(node.initializer)) { - return visitNode( - factory2.createBlock([ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - node.initializer - ), - factory2.updateForStatement( - node, - /*initializer*/ - void 0, - node.condition, - node.incrementor, - node.statement - ) - ]), - visitor, - isStatement - ); - } - return visitEachChild(node, visitor, context); - } - function visitForOfStatement(node) { - if (isUsingVariableDeclarationList(node.initializer)) { - const forInitializer = node.initializer; - Debug.assertNode(forInitializer, isUsingVariableDeclarationList); - Debug.assert(forInitializer.declarations.length === 1, "ForInitializer may only have one declaration"); - const forDecl = forInitializer.declarations[0]; - Debug.assert(!forDecl.initializer, "ForInitializer may not have an initializer"); - const isAwaitUsing = getUsingKindOfVariableDeclarationList(forInitializer) === 2 /* Async */; - const temp = factory2.getGeneratedNameForNode(forDecl.name); - const usingVar = factory2.updateVariableDeclaration( - forDecl, - forDecl.name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - temp - ); - const usingVarList = factory2.createVariableDeclarationList([usingVar], isAwaitUsing ? 6 /* AwaitUsing */ : 4 /* Using */); - const usingVarStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - usingVarList - ); - return visitNode( - factory2.updateForOfStatement( - node, - node.awaitModifier, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration(temp) - ], 2 /* Const */), - node.expression, - isBlock(node.statement) ? factory2.updateBlock(node.statement, [ - usingVarStatement, - ...node.statement.statements - ]) : factory2.createBlock( - [ - usingVarStatement, - node.statement - ], - /*multiLine*/ - true - ) - ), - visitor, - isStatement - ); - } - return visitEachChild(node, visitor, context); - } - function visitCaseOrDefaultClause(node, envBinding) { - if (getUsingKindOfStatements(node.statements) !== 0 /* None */) { - if (isCaseClause(node)) { - return factory2.updateCaseClause( - node, - visitNode(node.expression, visitor, isExpression), - transformUsingDeclarations( - node.statements, - /*start*/ - 0, - node.statements.length, - envBinding, - /*topLevelStatements*/ - void 0 - ) - ); - } else { - return factory2.updateDefaultClause( - node, - transformUsingDeclarations( - node.statements, - /*start*/ - 0, - node.statements.length, - envBinding, - /*topLevelStatements*/ - void 0 - ) - ); - } - } - return visitEachChild(node, visitor, context); - } - function visitSwitchStatement(node) { - const usingKind = getUsingKindOfCaseOrDefaultClauses(node.caseBlock.clauses); - if (usingKind) { - const envBinding = createEnvBinding(); - return createDownlevelUsingStatements( - [ - factory2.updateSwitchStatement( - node, - visitNode(node.expression, visitor, isExpression), - factory2.updateCaseBlock( - node.caseBlock, - node.caseBlock.clauses.map((clause) => visitCaseOrDefaultClause(clause, envBinding)) - ) - ) - ], - envBinding, - usingKind === 2 /* Async */ - ); - } - return visitEachChild(node, visitor, context); - } - function transformUsingDeclarations(statementsIn, start, end, envBinding, topLevelStatements) { - const statements = []; - for (let i = start; i < end; i++) { - const statement = statementsIn[i]; - const usingKind = getUsingKind(statement); - if (usingKind) { - Debug.assertNode(statement, isVariableStatement); - const declarations = []; - for (let declaration of statement.declarationList.declarations) { - if (!isIdentifier(declaration.name)) { - declarations.length = 0; - break; - } - if (isNamedEvaluation(declaration)) { - declaration = transformNamedEvaluation(context, declaration); - } - const initializer = visitNode(declaration.initializer, visitor, isExpression) ?? factory2.createVoidZero(); - declarations.push(factory2.updateVariableDeclaration( - declaration, - declaration.name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - emitHelpers().createAddDisposableResourceHelper( - envBinding, - initializer, - usingKind === 2 /* Async */ - ) - )); - } - if (declarations.length) { - const varList = factory2.createVariableDeclarationList(declarations, 2 /* Const */); - setOriginalNode(varList, statement.declarationList); - setTextRange(varList, statement.declarationList); - hoistOrAppendNode(factory2.updateVariableStatement( - statement, - /*modifiers*/ - void 0, - varList - )); - continue; - } - } - const result = visitor(statement); - if (isArray(result)) { - result.forEach(hoistOrAppendNode); - } else if (result) { - hoistOrAppendNode(result); - } - } - return statements; - function hoistOrAppendNode(node) { - Debug.assertNode(node, isStatement); - append(statements, hoist(node)); - } - function hoist(node) { - if (!topLevelStatements) - return node; - switch (node.kind) { - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 278 /* ExportDeclaration */: - case 262 /* FunctionDeclaration */: - return hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements); - case 277 /* ExportAssignment */: - return hoistExportAssignment(node); - case 263 /* ClassDeclaration */: - return hoistClassDeclaration(node); - case 243 /* VariableStatement */: - return hoistVariableStatement(node); - } - return node; - } - } - function hoistImportOrExportOrHoistedDeclaration(node, topLevelStatements) { - topLevelStatements.push(node); - return void 0; - } - function hoistExportAssignment(node) { - return node.isExportEquals ? hoistExportEquals(node) : hoistExportDefault(node); - } - function hoistExportDefault(node) { - if (defaultExportBinding) { - return node; - } - defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); - hoistBindingIdentifier( - defaultExportBinding, - /*isExport*/ - true, - "default", - node - ); - let expression = node.expression; - let innerExpression = skipOuterExpressions(expression); - if (isNamedEvaluation(innerExpression)) { - innerExpression = transformNamedEvaluation( - context, - innerExpression, - /*ignoreEmptyStringLiteral*/ - false, - "default" - ); - expression = factory2.restoreOuterExpressions(expression, innerExpression); - } - const assignment = factory2.createAssignment(defaultExportBinding, expression); - return factory2.createExpressionStatement(assignment); - } - function hoistExportEquals(node) { - if (exportEqualsBinding) { - return node; - } - exportEqualsBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); - hoistVariableDeclaration(exportEqualsBinding); - const assignment = factory2.createAssignment(exportEqualsBinding, node.expression); - return factory2.createExpressionStatement(assignment); - } - function hoistClassDeclaration(node) { - if (!node.name && defaultExportBinding) { - return node; - } - const isExported2 = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); - let expression = factory2.converters.convertToClassExpression(node); - if (node.name) { - hoistBindingIdentifier( - factory2.getLocalName(node), - isExported2 && !isDefault, - /*exportAlias*/ - void 0, - node - ); - expression = factory2.createAssignment(factory2.getDeclarationName(node), expression); - if (isNamedEvaluation(expression)) { - expression = transformNamedEvaluation( - context, - expression, - /*ignoreEmptyStringLiteral*/ - false - ); - } - setOriginalNode(expression, node); - setSourceMapRange(expression, node); - setCommentRange(expression, node); - } - if (isDefault && !defaultExportBinding) { - defaultExportBinding = factory2.createUniqueName("_default", 8 /* ReservedInNestedScopes */ | 32 /* FileLevel */ | 16 /* Optimistic */); - hoistBindingIdentifier( - defaultExportBinding, - /*isExport*/ - true, - "default", - node - ); - expression = factory2.createAssignment(defaultExportBinding, expression); - if (isNamedEvaluation(expression)) { - expression = transformNamedEvaluation( - context, - expression, - /*ignoreEmptyStringLiteral*/ - false, - "default" - ); - } - setOriginalNode(expression, node); - } - return factory2.createExpressionStatement(expression); - } - function hoistVariableStatement(node) { - let expressions; - const isExported2 = hasSyntacticModifier(node, 1 /* Export */); - for (const variable of node.declarationList.declarations) { - hoistBindingElement(variable, isExported2, variable); - if (variable.initializer) { - expressions = append(expressions, hoistInitializedVariable(variable)); - } - } - if (expressions) { - const statement = factory2.createExpressionStatement(factory2.inlineExpressions(expressions)); - setOriginalNode(statement, node); - setCommentRange(statement, node); - setSourceMapRange(statement, node); - return statement; - } - return void 0; - } - function hoistInitializedVariable(node) { - Debug.assertIsDefined(node.initializer); - let target; - if (isIdentifier(node.name)) { - target = factory2.cloneNode(node.name); - setEmitFlags(target, getEmitFlags(target) & ~(32768 /* LocalName */ | 16384 /* ExportName */ | 65536 /* InternalName */)); - } else { - target = factory2.converters.convertToAssignmentPattern(node.name); - } - const assignment = factory2.createAssignment(target, node.initializer); - setOriginalNode(assignment, node); - setCommentRange(assignment, node); - setSourceMapRange(assignment, node); - return assignment; - } - function hoistBindingElement(node, isExportedDeclaration, original) { - if (isBindingPattern(node.name)) { - for (const element of node.name.elements) { - if (!isOmittedExpression(element)) { - hoistBindingElement(element, isExportedDeclaration, original); - } - } - } else { - hoistBindingIdentifier( - node.name, - isExportedDeclaration, - /*exportAlias*/ - void 0, - original - ); - } - } - function hoistBindingIdentifier(node, isExport, exportAlias, original) { - const name = isGeneratedIdentifier(node) ? node : factory2.cloneNode(node); - if (isExport) { - if (exportAlias === void 0 && !isLocalName(name)) { - const varDecl = factory2.createVariableDeclaration(name); - if (original) { - setOriginalNode(varDecl, original); - } - exportVars.push(varDecl); - return; - } - const localName = exportAlias !== void 0 ? name : void 0; - const exportName = exportAlias !== void 0 ? exportAlias : name; - const specifier = factory2.createExportSpecifier( - /*isTypeOnly*/ - false, - localName, - exportName - ); - if (original) { - setOriginalNode(specifier, original); - } - exportBindings.set(name, specifier); - } - hoistVariableDeclaration(name); - } - function createEnvBinding() { - return factory2.createUniqueName("env"); - } - function createDownlevelUsingStatements(bodyStatements, envBinding, async) { - const statements = []; - const envObject = factory2.createObjectLiteralExpression([ - factory2.createPropertyAssignment("stack", factory2.createArrayLiteralExpression()), - factory2.createPropertyAssignment("error", factory2.createVoidZero()), - factory2.createPropertyAssignment("hasError", factory2.createFalse()) - ]); - const envVar = factory2.createVariableDeclaration( - envBinding, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - envObject - ); - const envVarList = factory2.createVariableDeclarationList([envVar], 2 /* Const */); - const envVarStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - envVarList - ); - statements.push(envVarStatement); - const tryBlock = factory2.createBlock( - bodyStatements, - /*multiLine*/ - true - ); - const bodyCatchBinding = factory2.createUniqueName("e"); - const catchClause = factory2.createCatchClause( - bodyCatchBinding, - factory2.createBlock( - [ - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.createPropertyAccessExpression(envBinding, "error"), - bodyCatchBinding - ) - ), - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.createPropertyAccessExpression(envBinding, "hasError"), - factory2.createTrue() - ) - ) - ], - /*multiLine*/ - true - ) - ); - let finallyBlock; - if (async) { - const result = factory2.createUniqueName("result"); - finallyBlock = factory2.createBlock( - [ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - result, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - emitHelpers().createDisposeResourcesHelper(envBinding) - ) - ], 2 /* Const */) - ), - factory2.createIfStatement(result, factory2.createExpressionStatement(factory2.createAwaitExpression(result))) - ], - /*multiLine*/ - true - ); - } else { - finallyBlock = factory2.createBlock( - [ - factory2.createExpressionStatement( - emitHelpers().createDisposeResourcesHelper(envBinding) - ) - ], - /*multiLine*/ - true - ); - } - const tryStatement = factory2.createTryStatement(tryBlock, catchClause, finallyBlock); - statements.push(tryStatement); - return statements; - } - } - function countPrologueStatements(statements) { - for (let i = 0; i < statements.length; i++) { - if (!isPrologueDirective(statements[i]) && !isCustomPrologue(statements[i])) { - return i; - } - } - return 0; - } - function isUsingVariableDeclarationList(node) { - return isVariableDeclarationList(node) && getUsingKindOfVariableDeclarationList(node) !== 0 /* None */; - } - function getUsingKindOfVariableDeclarationList(node) { - return (node.flags & 7 /* BlockScoped */) === 6 /* AwaitUsing */ ? 2 /* Async */ : (node.flags & 7 /* BlockScoped */) === 4 /* Using */ ? 1 /* Sync */ : 0 /* None */; - } - function getUsingKindOfVariableStatement(node) { - return getUsingKindOfVariableDeclarationList(node.declarationList); - } - function getUsingKind(statement) { - return isVariableStatement(statement) ? getUsingKindOfVariableStatement(statement) : 0 /* None */; - } - function getUsingKindOfStatements(statements) { - let result = 0 /* None */; - for (const statement of statements) { - const usingKind = getUsingKind(statement); - if (usingKind === 2 /* Async */) - return 2 /* Async */; - if (usingKind > result) - result = usingKind; - } - return result; - } - function getUsingKindOfCaseOrDefaultClauses(clauses) { - let result = 0 /* None */; - for (const clause of clauses) { - const usingKind = getUsingKindOfStatements(clause.statements); - if (usingKind === 2 /* Async */) - return 2 /* Async */; - if (usingKind > result) - result = usingKind; - } - return result; - } - var init_esnext = __esm({ - "src/compiler/transformers/esnext.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/jsx.ts - function transformJsx(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers - } = context; - const compilerOptions = context.getCompilerOptions(); - let currentSourceFile; - let currentFileState; - return chainBundle(context, transformSourceFile); - function getCurrentFileNameExpression() { - if (currentFileState.filenameDeclaration) { - return currentFileState.filenameDeclaration.name; - } - const declaration = factory2.createVariableDeclaration( - factory2.createUniqueName("_jsxFileName", 16 /* Optimistic */ | 32 /* FileLevel */), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createStringLiteral(currentSourceFile.fileName) - ); - currentFileState.filenameDeclaration = declaration; - return currentFileState.filenameDeclaration.name; - } - function getJsxFactoryCalleePrimitive(isStaticChildren) { - return compilerOptions.jsx === 5 /* ReactJSXDev */ ? "jsxDEV" : isStaticChildren ? "jsxs" : "jsx"; - } - function getJsxFactoryCallee(isStaticChildren) { - const type = getJsxFactoryCalleePrimitive(isStaticChildren); - return getImplicitImportForName(type); - } - function getImplicitJsxFragmentReference() { - return getImplicitImportForName("Fragment"); - } - function getImplicitImportForName(name) { - var _a, _b; - const importSource = name === "createElement" ? currentFileState.importSpecifier : getJSXRuntimeImport(currentFileState.importSpecifier, compilerOptions); - const existing = (_b = (_a = currentFileState.utilizedImplicitRuntimeImports) == null ? void 0 : _a.get(importSource)) == null ? void 0 : _b.get(name); - if (existing) { - return existing.name; - } - if (!currentFileState.utilizedImplicitRuntimeImports) { - currentFileState.utilizedImplicitRuntimeImports = /* @__PURE__ */ new Map(); - } - let specifierSourceImports = currentFileState.utilizedImplicitRuntimeImports.get(importSource); - if (!specifierSourceImports) { - specifierSourceImports = /* @__PURE__ */ new Map(); - currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports); - } - const generatedName = factory2.createUniqueName(`_${name}`, 16 /* Optimistic */ | 32 /* FileLevel */ | 64 /* AllowNameSubstitution */); - const specifier = factory2.createImportSpecifier( - /*isTypeOnly*/ - false, - factory2.createIdentifier(name), - generatedName - ); - setIdentifierGeneratedImportReference(generatedName, specifier); - specifierSourceImports.set(name, specifier); - return generatedName; - } - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - currentSourceFile = node; - currentFileState = {}; - currentFileState.importSpecifier = getJSXImplicitImportBase(compilerOptions, node); - let visited = visitEachChild(node, visitor, context); - addEmitHelpers(visited, context.readEmitHelpers()); - let statements = visited.statements; - if (currentFileState.filenameDeclaration) { - statements = insertStatementAfterCustomPrologue(statements.slice(), factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([currentFileState.filenameDeclaration], 2 /* Const */) - )); - } - if (currentFileState.utilizedImplicitRuntimeImports) { - for (const [importSource, importSpecifiersMap] of arrayFrom(currentFileState.utilizedImplicitRuntimeImports.entries())) { - if (isExternalModule(node)) { - const importStatement = factory2.createImportDeclaration( - /*modifiers*/ - void 0, - factory2.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ - void 0, - factory2.createNamedImports(arrayFrom(importSpecifiersMap.values())) - ), - factory2.createStringLiteral(importSource), - /*assertClause*/ - void 0 - ); - setParentRecursive( - importStatement, - /*incremental*/ - false - ); - statements = insertStatementAfterCustomPrologue(statements.slice(), importStatement); - } else if (isExternalOrCommonJsModule(node)) { - const requireStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - factory2.createObjectBindingPattern(arrayFrom(importSpecifiersMap.values(), (s) => factory2.createBindingElement( - /*dotDotDotToken*/ - void 0, - s.propertyName, - s.name - ))), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createCallExpression( - factory2.createIdentifier("require"), - /*typeArguments*/ - void 0, - [factory2.createStringLiteral(importSource)] - ) - ) - ], 2 /* Const */) - ); - setParentRecursive( - requireStatement, - /*incremental*/ - false - ); - statements = insertStatementAfterCustomPrologue(statements.slice(), requireStatement); - } else { - } - } - } - if (statements !== visited.statements) { - visited = factory2.updateSourceFile(visited, statements); - } - currentFileState = void 0; - return visited; - } - function visitor(node) { - if (node.transformFlags & 2 /* ContainsJsx */) { - return visitorWorker(node); - } else { - return node; - } - } - function visitorWorker(node) { - switch (node.kind) { - case 284 /* JsxElement */: - return visitJsxElement( - node, - /*isChild*/ - false - ); - case 285 /* JsxSelfClosingElement */: - return visitJsxSelfClosingElement( - node, - /*isChild*/ - false - ); - case 288 /* JsxFragment */: - return visitJsxFragment( - node, - /*isChild*/ - false - ); - case 294 /* JsxExpression */: - return visitJsxExpression(node); - default: - return visitEachChild(node, visitor, context); - } - } - function transformJsxChildToExpression(node) { - switch (node.kind) { - case 12 /* JsxText */: - return visitJsxText(node); - case 294 /* JsxExpression */: - return visitJsxExpression(node); - case 284 /* JsxElement */: - return visitJsxElement( - node, - /*isChild*/ - true - ); - case 285 /* JsxSelfClosingElement */: - return visitJsxSelfClosingElement( - node, - /*isChild*/ - true - ); - case 288 /* JsxFragment */: - return visitJsxFragment( - node, - /*isChild*/ - true - ); - default: - return Debug.failBadSyntaxKind(node); - } - } - function hasProto(obj) { - return obj.properties.some((p) => isPropertyAssignment(p) && (isIdentifier(p.name) && idText(p.name) === "__proto__" || isStringLiteral(p.name) && p.name.text === "__proto__")); - } - function hasKeyAfterPropsSpread(node) { - let spread = false; - for (const elem of node.attributes.properties) { - if (isJsxSpreadAttribute(elem) && (!isObjectLiteralExpression(elem.expression) || elem.expression.properties.some(isSpreadAssignment))) { - spread = true; - } else if (spread && isJsxAttribute(elem) && isIdentifier(elem.name) && elem.name.escapedText === "key") { - return true; - } - } - return false; - } - function shouldUseCreateElement(node) { - return currentFileState.importSpecifier === void 0 || hasKeyAfterPropsSpread(node); - } - function visitJsxElement(node, isChild) { - const tagTransform = shouldUseCreateElement(node.openingElement) ? visitJsxOpeningLikeElementCreateElement : visitJsxOpeningLikeElementJSX; - return tagTransform( - node.openingElement, - node.children, - isChild, - /*location*/ - node - ); - } - function visitJsxSelfClosingElement(node, isChild) { - const tagTransform = shouldUseCreateElement(node) ? visitJsxOpeningLikeElementCreateElement : visitJsxOpeningLikeElementJSX; - return tagTransform( - node, - /*children*/ - void 0, - isChild, - /*location*/ - node - ); - } - function visitJsxFragment(node, isChild) { - const tagTransform = currentFileState.importSpecifier === void 0 ? visitJsxOpeningFragmentCreateElement : visitJsxOpeningFragmentJSX; - return tagTransform( - node.openingFragment, - node.children, - isChild, - /*location*/ - node - ); - } - function convertJsxChildrenToChildrenPropObject(children) { - const prop = convertJsxChildrenToChildrenPropAssignment(children); - return prop && factory2.createObjectLiteralExpression([prop]); - } - function convertJsxChildrenToChildrenPropAssignment(children) { - const nonWhitespaceChildren = getSemanticJsxChildren(children); - if (length(nonWhitespaceChildren) === 1 && !nonWhitespaceChildren[0].dotDotDotToken) { - const result2 = transformJsxChildToExpression(nonWhitespaceChildren[0]); - return result2 && factory2.createPropertyAssignment("children", result2); - } - const result = mapDefined(children, transformJsxChildToExpression); - return length(result) ? factory2.createPropertyAssignment("children", factory2.createArrayLiteralExpression(result)) : void 0; - } - function visitJsxOpeningLikeElementJSX(node, children, isChild, location) { - const tagName = getTagName(node); - const childrenProp = children && children.length ? convertJsxChildrenToChildrenPropAssignment(children) : void 0; - const keyAttr = find(node.attributes.properties, (p) => !!p.name && isIdentifier(p.name) && p.name.escapedText === "key"); - const attrs = keyAttr ? filter(node.attributes.properties, (p) => p !== keyAttr) : node.attributes.properties; - const objectProperties = length(attrs) ? transformJsxAttributesToObjectProps(attrs, childrenProp) : factory2.createObjectLiteralExpression(childrenProp ? [childrenProp] : emptyArray); - return visitJsxOpeningLikeElementOrFragmentJSX( - tagName, - objectProperties, - keyAttr, - children || emptyArray, - isChild, - location - ); - } - function visitJsxOpeningLikeElementOrFragmentJSX(tagName, objectProperties, keyAttr, children, isChild, location) { - var _a; - const nonWhitespaceChildren = getSemanticJsxChildren(children); - const isStaticChildren = length(nonWhitespaceChildren) > 1 || !!((_a = nonWhitespaceChildren[0]) == null ? void 0 : _a.dotDotDotToken); - const args = [tagName, objectProperties]; - if (keyAttr) { - args.push(transformJsxAttributeInitializer(keyAttr.initializer)); - } - if (compilerOptions.jsx === 5 /* ReactJSXDev */) { - const originalFile = getOriginalNode(currentSourceFile); - if (originalFile && isSourceFile(originalFile)) { - if (keyAttr === void 0) { - args.push(factory2.createVoidZero()); - } - args.push(isStaticChildren ? factory2.createTrue() : factory2.createFalse()); - const lineCol = getLineAndCharacterOfPosition(originalFile, location.pos); - args.push(factory2.createObjectLiteralExpression([ - factory2.createPropertyAssignment("fileName", getCurrentFileNameExpression()), - factory2.createPropertyAssignment("lineNumber", factory2.createNumericLiteral(lineCol.line + 1)), - factory2.createPropertyAssignment("columnNumber", factory2.createNumericLiteral(lineCol.character + 1)) - ])); - args.push(factory2.createThis()); - } - } - const element = setTextRange( - factory2.createCallExpression( - getJsxFactoryCallee(isStaticChildren), - /*typeArguments*/ - void 0, - args - ), - location - ); - if (isChild) { - startOnNewLine(element); - } - return element; - } - function visitJsxOpeningLikeElementCreateElement(node, children, isChild, location) { - const tagName = getTagName(node); - const attrs = node.attributes.properties; - const objectProperties = length(attrs) ? transformJsxAttributesToObjectProps(attrs) : factory2.createNull(); - const callee = currentFileState.importSpecifier === void 0 ? createJsxFactoryExpression( - factory2, - context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), - compilerOptions.reactNamespace, - // TODO: GH#18217 - node - ) : getImplicitImportForName("createElement"); - const element = createExpressionForJsxElement( - factory2, - callee, - tagName, - objectProperties, - mapDefined(children, transformJsxChildToExpression), - location - ); - if (isChild) { - startOnNewLine(element); - } - return element; - } - function visitJsxOpeningFragmentJSX(_node, children, isChild, location) { - let childrenProps; - if (children && children.length) { - const result = convertJsxChildrenToChildrenPropObject(children); - if (result) { - childrenProps = result; - } - } - return visitJsxOpeningLikeElementOrFragmentJSX( - getImplicitJsxFragmentReference(), - childrenProps || factory2.createObjectLiteralExpression([]), - /*keyAttr*/ - void 0, - children, - isChild, - location - ); - } - function visitJsxOpeningFragmentCreateElement(node, children, isChild, location) { - const element = createExpressionForJsxFragment( - factory2, - context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), - context.getEmitResolver().getJsxFragmentFactoryEntity(currentSourceFile), - compilerOptions.reactNamespace, - // TODO: GH#18217 - mapDefined(children, transformJsxChildToExpression), - node, - location - ); - if (isChild) { - startOnNewLine(element); - } - return element; - } - function transformJsxSpreadAttributeToProps(node) { - if (isObjectLiteralExpression(node.expression) && !hasProto(node.expression)) { - return node.expression.properties; - } - return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))); - } - function transformJsxAttributesToObjectProps(attrs, children) { - const target = getEmitScriptTarget(compilerOptions); - return target && target >= 5 /* ES2018 */ ? factory2.createObjectLiteralExpression(transformJsxAttributesToProps(attrs, children)) : transformJsxAttributesToExpression(attrs, children); - } - function transformJsxAttributesToProps(attrs, children) { - const props = flatten(spanMap(attrs, isJsxSpreadAttribute, (attrs2, isSpread) => flatten(map(attrs2, (attr) => isSpread ? transformJsxSpreadAttributeToProps(attr) : transformJsxAttributeToObjectLiteralElement(attr))))); - if (children) { - props.push(children); - } - return props; - } - function transformJsxAttributesToExpression(attrs, children) { - const expressions = []; - let properties = []; - for (const attr of attrs) { - if (isJsxSpreadAttribute(attr)) { - if (isObjectLiteralExpression(attr.expression) && !hasProto(attr.expression)) { - for (const prop of attr.expression.properties) { - if (isSpreadAssignment(prop)) { - finishObjectLiteralIfNeeded(); - expressions.push(Debug.checkDefined(visitNode(prop.expression, visitor, isExpression))); - continue; - } - properties.push(Debug.checkDefined(visitNode(prop, visitor))); - } - continue; - } - finishObjectLiteralIfNeeded(); - expressions.push(Debug.checkDefined(visitNode(attr.expression, visitor, isExpression))); - continue; - } - properties.push(transformJsxAttributeToObjectLiteralElement(attr)); - } - if (children) { - properties.push(children); - } - finishObjectLiteralIfNeeded(); - if (expressions.length && !isObjectLiteralExpression(expressions[0])) { - expressions.unshift(factory2.createObjectLiteralExpression()); - } - return singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions); - function finishObjectLiteralIfNeeded() { - if (properties.length) { - expressions.push(factory2.createObjectLiteralExpression(properties)); - properties = []; - } - } - } - function transformJsxAttributeToObjectLiteralElement(node) { - const name = getAttributeName(node); - const expression = transformJsxAttributeInitializer(node.initializer); - return factory2.createPropertyAssignment(name, expression); - } - function transformJsxAttributeInitializer(node) { - if (node === void 0) { - return factory2.createTrue(); - } - if (node.kind === 11 /* StringLiteral */) { - const singleQuote = node.singleQuote !== void 0 ? node.singleQuote : !isStringDoubleQuoted(node, currentSourceFile); - const literal = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote); - return setTextRange(literal, node); - } - if (node.kind === 294 /* JsxExpression */) { - if (node.expression === void 0) { - return factory2.createTrue(); - } - return Debug.checkDefined(visitNode(node.expression, visitor, isExpression)); - } - if (isJsxElement(node)) { - return visitJsxElement( - node, - /*isChild*/ - false - ); - } - if (isJsxSelfClosingElement(node)) { - return visitJsxSelfClosingElement( - node, - /*isChild*/ - false - ); - } - if (isJsxFragment(node)) { - return visitJsxFragment( - node, - /*isChild*/ - false - ); - } - return Debug.failBadSyntaxKind(node); - } - function visitJsxText(node) { - const fixed = fixupWhitespaceAndDecodeEntities(node.text); - return fixed === void 0 ? void 0 : factory2.createStringLiteral(fixed); - } - function fixupWhitespaceAndDecodeEntities(text) { - let acc; - let firstNonWhitespace = 0; - let lastNonWhitespace = -1; - for (let i = 0; i < text.length; i++) { - const c = text.charCodeAt(i); - if (isLineBreak(c)) { - if (firstNonWhitespace !== -1 && lastNonWhitespace !== -1) { - acc = addLineOfJsxText(acc, text.substr(firstNonWhitespace, lastNonWhitespace - firstNonWhitespace + 1)); - } - firstNonWhitespace = -1; - } else if (!isWhiteSpaceSingleLine(c)) { - lastNonWhitespace = i; - if (firstNonWhitespace === -1) { - firstNonWhitespace = i; - } - } - } - return firstNonWhitespace !== -1 ? addLineOfJsxText(acc, text.substr(firstNonWhitespace)) : acc; - } - function addLineOfJsxText(acc, trimmedLine) { - const decoded = decodeEntities(trimmedLine); - return acc === void 0 ? decoded : acc + " " + decoded; - } - function decodeEntities(text) { - return text.replace(/&((#((\d+)|x([\da-fA-F]+)))|(\w+));/g, (match, _all, _number, _digits, decimal, hex, word) => { - if (decimal) { - return utf16EncodeAsString(parseInt(decimal, 10)); - } else if (hex) { - return utf16EncodeAsString(parseInt(hex, 16)); - } else { - const ch = entities.get(word); - return ch ? utf16EncodeAsString(ch) : match; - } - }); - } - function tryDecodeEntities(text) { - const decoded = decodeEntities(text); - return decoded === text ? void 0 : decoded; - } - function getTagName(node) { - if (node.kind === 284 /* JsxElement */) { - return getTagName(node.openingElement); - } else { - const tagName = node.tagName; - if (isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText)) { - return factory2.createStringLiteral(idText(tagName)); - } else if (isJsxNamespacedName(tagName)) { - return factory2.createStringLiteral(idText(tagName.namespace) + ":" + idText(tagName.name)); - } else { - return createExpressionFromEntityName(factory2, tagName); - } - } - } - function getAttributeName(node) { - const name = node.name; - if (isIdentifier(name)) { - const text = idText(name); - return /^[A-Za-z_]\w*$/.test(text) ? name : factory2.createStringLiteral(text); - } - return factory2.createStringLiteral(idText(name.namespace) + ":" + idText(name.name)); - } - function visitJsxExpression(node) { - const expression = visitNode(node.expression, visitor, isExpression); - return node.dotDotDotToken ? factory2.createSpreadElement(expression) : expression; - } - } - var entities; - var init_jsx = __esm({ - "src/compiler/transformers/jsx.ts"() { - "use strict"; - init_ts2(); - entities = new Map(Object.entries({ - 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 - })); - } - }); - - // src/compiler/transformers/es2016.ts - function transformES2016(context) { - const { - factory: factory2, - hoistVariableDeclaration - } = context; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - return visitEachChild(node, visitor, context); - } - function visitor(node) { - if ((node.transformFlags & 512 /* ContainsES2016 */) === 0) { - return node; - } - switch (node.kind) { - case 226 /* BinaryExpression */: - return visitBinaryExpression(node); - default: - return visitEachChild(node, visitor, context); - } - } - function visitBinaryExpression(node) { - switch (node.operatorToken.kind) { - case 68 /* AsteriskAsteriskEqualsToken */: - return visitExponentiationAssignmentExpression(node); - case 43 /* AsteriskAsteriskToken */: - return visitExponentiationExpression(node); - default: - return visitEachChild(node, visitor, context); - } - } - function visitExponentiationAssignmentExpression(node) { - let target; - let value; - const left = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, visitor, isExpression); - if (isElementAccessExpression(left)) { - const expressionTemp = factory2.createTempVariable(hoistVariableDeclaration); - const argumentExpressionTemp = factory2.createTempVariable(hoistVariableDeclaration); - target = setTextRange( - factory2.createElementAccessExpression( - setTextRange(factory2.createAssignment(expressionTemp, left.expression), left.expression), - setTextRange(factory2.createAssignment(argumentExpressionTemp, left.argumentExpression), left.argumentExpression) - ), - left - ); - value = setTextRange( - factory2.createElementAccessExpression( - expressionTemp, - argumentExpressionTemp - ), - left - ); - } else if (isPropertyAccessExpression(left)) { - const expressionTemp = factory2.createTempVariable(hoistVariableDeclaration); - target = setTextRange( - factory2.createPropertyAccessExpression( - setTextRange(factory2.createAssignment(expressionTemp, left.expression), left.expression), - left.name - ), - left - ); - value = setTextRange( - factory2.createPropertyAccessExpression( - expressionTemp, - left.name - ), - left - ); - } else { - target = left; - value = left; - } - return setTextRange( - factory2.createAssignment( - target, - setTextRange(factory2.createGlobalMethodCall("Math", "pow", [value, right]), node) - ), - node - ); - } - function visitExponentiationExpression(node) { - const left = visitNode(node.left, visitor, isExpression); - const right = visitNode(node.right, visitor, isExpression); - return setTextRange(factory2.createGlobalMethodCall("Math", "pow", [left, right]), node); - } - } - var init_es2016 = __esm({ - "src/compiler/transformers/es2016.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/es2015.ts - function createSpreadSegment(kind, expression) { - return { kind, expression }; - } - function transformES2015(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - startLexicalEnvironment, - resumeLexicalEnvironment, - endLexicalEnvironment, - hoistVariableDeclaration - } = context; - const compilerOptions = context.getCompilerOptions(); - const resolver = context.getEmitResolver(); - const previousOnSubstituteNode = context.onSubstituteNode; - const previousOnEmitNode = context.onEmitNode; - context.onEmitNode = onEmitNode; - context.onSubstituteNode = onSubstituteNode; - let currentSourceFile; - let currentText; - let hierarchyFacts; - let taggedTemplateStringDeclarations; - function recordTaggedTemplateString(temp) { - taggedTemplateStringDeclarations = append( - taggedTemplateStringDeclarations, - factory2.createVariableDeclaration(temp) - ); - } - let convertedLoopState; - let enabledSubstitutions; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - currentSourceFile = node; - currentText = node.text; - const visited = visitSourceFile(node); - addEmitHelpers(visited, context.readEmitHelpers()); - currentSourceFile = void 0; - currentText = void 0; - taggedTemplateStringDeclarations = void 0; - hierarchyFacts = 0 /* None */; - return visited; - } - function enterSubtree(excludeFacts, includeFacts) { - const ancestorFacts = hierarchyFacts; - hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 32767 /* AncestorFactsMask */; - return ancestorFacts; - } - function exitSubtree(ancestorFacts, excludeFacts, includeFacts) { - hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; - } - function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; - } - function isOrMayContainReturnCompletion(node) { - return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( - node, - /*lookInLabeledStatements*/ - false - ) || isBlock(node)); - } - function shouldVisitNode(node) { - return (node.transformFlags & 1024 /* ContainsES2015 */) !== 0 || convertedLoopState !== void 0 || hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */ && isOrMayContainReturnCompletion(node) || isIterationStatement( - node, - /*lookInLabeledStatements*/ - false - ) && shouldConvertIterationStatement(node) || (getInternalEmitFlags(node) & 1 /* TypeScriptClassWrapper */) !== 0; - } - function visitor(node) { - return shouldVisitNode(node) ? visitorWorker( - node, - /*expressionResultIsUnused*/ - false - ) : node; - } - function visitorWithUnusedExpressionResult(node) { - return shouldVisitNode(node) ? visitorWorker( - node, - /*expressionResultIsUnused*/ - true - ) : node; - } - function classWrapperStatementVisitor(node) { - if (shouldVisitNode(node)) { - const original = getOriginalNode(node); - if (isPropertyDeclaration(original) && hasStaticModifier(original)) { - const ancestorFacts = enterSubtree( - 32670 /* StaticInitializerExcludes */, - 16449 /* StaticInitializerIncludes */ - ); - const result = visitorWorker( - node, - /*expressionResultIsUnused*/ - false - ); - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); - return result; - } - return visitorWorker( - node, - /*expressionResultIsUnused*/ - false - ); - } - return node; - } - function callExpressionVisitor(node) { - if (node.kind === 108 /* SuperKeyword */) { - return visitSuperKeyword( - /*isExpressionOfCall*/ - true - ); - } - return visitor(node); - } - function visitorWorker(node, expressionResultIsUnused2) { - switch (node.kind) { - case 126 /* StaticKeyword */: - return void 0; - case 263 /* ClassDeclaration */: - return visitClassDeclaration(node); - case 231 /* ClassExpression */: - return visitClassExpression(node); - case 169 /* Parameter */: - return visitParameter(node); - case 262 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 219 /* ArrowFunction */: - return visitArrowFunction(node); - case 218 /* FunctionExpression */: - return visitFunctionExpression(node); - case 260 /* VariableDeclaration */: - return visitVariableDeclaration(node); - case 80 /* Identifier */: - return visitIdentifier(node); - case 261 /* VariableDeclarationList */: - return visitVariableDeclarationList(node); - case 255 /* SwitchStatement */: - return visitSwitchStatement(node); - case 269 /* CaseBlock */: - return visitCaseBlock(node); - case 241 /* Block */: - return visitBlock( - node, - /*isFunctionBody*/ - false - ); - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: - return visitBreakOrContinueStatement(node); - case 256 /* LabeledStatement */: - return visitLabeledStatement(node); - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - return visitDoOrWhileStatement( - node, - /*outermostLabeledStatement*/ - void 0 - ); - case 248 /* ForStatement */: - return visitForStatement( - node, - /*outermostLabeledStatement*/ - void 0 - ); - case 249 /* ForInStatement */: - return visitForInStatement( - node, - /*outermostLabeledStatement*/ - void 0 - ); - case 250 /* ForOfStatement */: - return visitForOfStatement( - node, - /*outermostLabeledStatement*/ - void 0 - ); - case 244 /* ExpressionStatement */: - return visitExpressionStatement(node); - case 210 /* ObjectLiteralExpression */: - return visitObjectLiteralExpression(node); - case 299 /* CatchClause */: - return visitCatchClause(node); - case 304 /* ShorthandPropertyAssignment */: - return visitShorthandPropertyAssignment(node); - case 167 /* ComputedPropertyName */: - return visitComputedPropertyName(node); - case 209 /* ArrayLiteralExpression */: - return visitArrayLiteralExpression(node); - case 213 /* CallExpression */: - return visitCallExpression(node); - case 214 /* NewExpression */: - return visitNewExpression(node); - case 217 /* ParenthesizedExpression */: - return visitParenthesizedExpression(node, expressionResultIsUnused2); - case 226 /* BinaryExpression */: - return visitBinaryExpression(node, expressionResultIsUnused2); - case 361 /* CommaListExpression */: - return visitCommaListExpression(node, expressionResultIsUnused2); - case 15 /* NoSubstitutionTemplateLiteral */: - case 16 /* TemplateHead */: - case 17 /* TemplateMiddle */: - case 18 /* TemplateTail */: - return visitTemplateLiteral(node); - case 11 /* StringLiteral */: - return visitStringLiteral(node); - case 9 /* NumericLiteral */: - return visitNumericLiteral(node); - case 215 /* TaggedTemplateExpression */: - return visitTaggedTemplateExpression(node); - case 228 /* TemplateExpression */: - return visitTemplateExpression(node); - case 229 /* YieldExpression */: - return visitYieldExpression(node); - case 230 /* SpreadElement */: - return visitSpreadElement(node); - case 108 /* SuperKeyword */: - return visitSuperKeyword( - /*isExpressionOfCall*/ - false - ); - case 110 /* ThisKeyword */: - return visitThisKeyword(node); - case 236 /* MetaProperty */: - return visitMetaProperty(node); - case 174 /* MethodDeclaration */: - return visitMethodDeclaration(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return visitAccessorDeclaration(node); - case 243 /* VariableStatement */: - return visitVariableStatement(node); - case 253 /* ReturnStatement */: - return visitReturnStatement(node); - case 222 /* VoidExpression */: - return visitVoidExpression(node); - default: - return visitEachChild(node, visitor, context); - } - } - function visitSourceFile(node) { - const ancestorFacts = enterSubtree(8064 /* SourceFileExcludes */, 64 /* SourceFileIncludes */); - const prologue = []; - const statements = []; - startLexicalEnvironment(); - const statementOffset = factory2.copyPrologue( - node.statements, - prologue, - /*ensureUseStrict*/ - false, - visitor - ); - addRange(statements, visitNodes2(node.statements, visitor, isStatement, statementOffset)); - if (taggedTemplateStringDeclarations) { - statements.push( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList(taggedTemplateStringDeclarations) - ) - ); - } - factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureThisForNodeIfNeeded(prologue, node); - exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */); - return factory2.updateSourceFile( - node, - setTextRange(factory2.createNodeArray(concatenate(prologue, statements)), node.statements) - ); - } - function visitSwitchStatement(node) { - if (convertedLoopState !== void 0) { - const savedAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps; - convertedLoopState.allowedNonLabeledJumps |= 2 /* Break */; - const result = visitEachChild(node, visitor, context); - convertedLoopState.allowedNonLabeledJumps = savedAllowedNonLabeledJumps; - return result; - } - return visitEachChild(node, visitor, context); - } - function visitCaseBlock(node) { - const ancestorFacts = enterSubtree(7104 /* BlockScopeExcludes */, 0 /* BlockScopeIncludes */); - const updated = visitEachChild(node, visitor, context); - exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */); - return updated; - } - function returnCapturedThis(node) { - return setOriginalNode(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */)), node); - } - function visitReturnStatement(node) { - if (convertedLoopState) { - convertedLoopState.nonLocalJumps |= 8 /* Return */; - if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) { - node = returnCapturedThis(node); - } - return factory2.createReturnStatement( - factory2.createObjectLiteralExpression( - [ - factory2.createPropertyAssignment( - factory2.createIdentifier("value"), - node.expression ? Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) : factory2.createVoidZero() - ) - ] - ) - ); - } else if (isReturnVoidStatementInConstructorWithCapturedSuper(node)) { - return returnCapturedThis(node); - } - return visitEachChild(node, visitor, context); - } - function visitThisKeyword(node) { - if (hierarchyFacts & 2 /* ArrowFunction */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) { - hierarchyFacts |= 65536 /* CapturedLexicalThis */; - } - if (convertedLoopState) { - if (hierarchyFacts & 2 /* ArrowFunction */) { - convertedLoopState.containsLexicalThis = true; - return node; - } - return convertedLoopState.thisName || (convertedLoopState.thisName = factory2.createUniqueName("this")); - } - return node; - } - function visitVoidExpression(node) { - return visitEachChild(node, visitorWithUnusedExpressionResult, context); - } - function visitIdentifier(node) { - if (convertedLoopState) { - if (resolver.isArgumentsLocalBinding(node)) { - return convertedLoopState.argumentsName || (convertedLoopState.argumentsName = factory2.createUniqueName("arguments")); - } - } - if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { - return setOriginalNode(setTextRange( - factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), - node - ), node); - } - return node; - } - function visitBreakOrContinueStatement(node) { - if (convertedLoopState) { - const jump = node.kind === 252 /* BreakStatement */ ? 2 /* Break */ : 4 /* Continue */; - const canUseBreakOrContinue = node.label && convertedLoopState.labels && convertedLoopState.labels.get(idText(node.label)) || !node.label && convertedLoopState.allowedNonLabeledJumps & jump; - if (!canUseBreakOrContinue) { - let labelMarker; - const label = node.label; - if (!label) { - if (node.kind === 252 /* BreakStatement */) { - convertedLoopState.nonLocalJumps |= 2 /* Break */; - labelMarker = "break"; - } else { - convertedLoopState.nonLocalJumps |= 4 /* Continue */; - labelMarker = "continue"; - } - } else { - if (node.kind === 252 /* BreakStatement */) { - labelMarker = `break-${label.escapedText}`; - setLabeledJump( - convertedLoopState, - /*isBreak*/ - true, - idText(label), - labelMarker - ); - } else { - labelMarker = `continue-${label.escapedText}`; - setLabeledJump( - convertedLoopState, - /*isBreak*/ - false, - idText(label), - labelMarker - ); - } - } - let returnExpression = factory2.createStringLiteral(labelMarker); - if (convertedLoopState.loopOutParameters.length) { - const outParams = convertedLoopState.loopOutParameters; - let expr; - for (let i = 0; i < outParams.length; i++) { - const copyExpr = copyOutParameter(outParams[i], 1 /* ToOutParameter */); - if (i === 0) { - expr = copyExpr; - } else { - expr = factory2.createBinaryExpression(expr, 28 /* CommaToken */, copyExpr); - } - } - returnExpression = factory2.createBinaryExpression(expr, 28 /* CommaToken */, returnExpression); - } - return factory2.createReturnStatement(returnExpression); - } - } - return visitEachChild(node, visitor, context); - } - function visitClassDeclaration(node) { - const variable = factory2.createVariableDeclaration( - factory2.getLocalName( - node, - /*allowComments*/ - true - ), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - transformClassLikeDeclarationToExpression(node) - ); - setOriginalNode(variable, node); - const statements = []; - const statement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([variable]) - ); - setOriginalNode(statement, node); - setTextRange(statement, node); - startOnNewLine(statement); - statements.push(statement); - if (hasSyntacticModifier(node, 1 /* Export */)) { - const exportStatement = hasSyntacticModifier(node, 1024 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node)); - setOriginalNode(exportStatement, statement); - statements.push(exportStatement); - } - return singleOrMany(statements); - } - function visitClassExpression(node) { - return transformClassLikeDeclarationToExpression(node); - } - function transformClassLikeDeclarationToExpression(node) { - if (node.name) { - enableSubstitutionsForBlockScopedBindings(); - } - const extendsClauseElement = getClassExtendsHeritageElement(node); - const classFunction = factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - extendsClauseElement ? [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */) - )] : [], - /*type*/ - void 0, - transformClassBody(node, extendsClauseElement) - ); - setEmitFlags(classFunction, getEmitFlags(node) & 131072 /* Indented */ | 1048576 /* ReuseTempVariableScope */); - const inner = factory2.createPartiallyEmittedExpression(classFunction); - setTextRangeEnd(inner, node.end); - setEmitFlags(inner, 3072 /* NoComments */); - const outer = factory2.createPartiallyEmittedExpression(inner); - setTextRangeEnd(outer, skipTrivia(currentText, node.pos)); - setEmitFlags(outer, 3072 /* NoComments */); - const result = factory2.createParenthesizedExpression( - factory2.createCallExpression( - outer, - /*typeArguments*/ - void 0, - extendsClauseElement ? [Debug.checkDefined(visitNode(extendsClauseElement.expression, visitor, isExpression))] : [] - ) - ); - addSyntheticLeadingComment(result, 3 /* MultiLineCommentTrivia */, "* @class "); - return result; - } - function transformClassBody(node, extendsClauseElement) { - const statements = []; - const name = factory2.getInternalName(node); - const constructorLikeName = isIdentifierANonContextualKeyword(name) ? factory2.getGeneratedNameForNode(name) : name; - startLexicalEnvironment(); - addExtendsHelperIfNeeded(statements, node, extendsClauseElement); - addConstructor(statements, node, constructorLikeName, extendsClauseElement); - addClassMembers(statements, node); - const closingBraceLocation = createTokenRange(skipTrivia(currentText, node.members.end), 20 /* CloseBraceToken */); - const outer = factory2.createPartiallyEmittedExpression(constructorLikeName); - setTextRangeEnd(outer, closingBraceLocation.end); - setEmitFlags(outer, 3072 /* NoComments */); - const statement = factory2.createReturnStatement(outer); - setTextRangePos(statement, closingBraceLocation.pos); - setEmitFlags(statement, 3072 /* NoComments */ | 768 /* NoTokenSourceMaps */); - statements.push(statement); - insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); - const block = factory2.createBlock( - setTextRange( - factory2.createNodeArray(statements), - /*location*/ - node.members - ), - /*multiLine*/ - true - ); - setEmitFlags(block, 3072 /* NoComments */); - return block; - } - function addExtendsHelperIfNeeded(statements, node, extendsClauseElement) { - if (extendsClauseElement) { - statements.push( - setTextRange( - factory2.createExpressionStatement( - emitHelpers().createExtendsHelper(factory2.getInternalName(node)) - ), - /*location*/ - extendsClauseElement - ) - ); - } - } - function addConstructor(statements, node, name, extendsClauseElement) { - const savedConvertedLoopState = convertedLoopState; - convertedLoopState = void 0; - const ancestorFacts = enterSubtree(32662 /* ConstructorExcludes */, 73 /* ConstructorIncludes */); - const constructor = getFirstConstructorWithBody(node); - const hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== void 0); - const constructorFunction = factory2.createFunctionDeclaration( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - name, - /*typeParameters*/ - void 0, - transformConstructorParameters(constructor, hasSynthesizedSuper), - /*type*/ - void 0, - transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) - ); - setTextRange(constructorFunction, constructor || node); - if (extendsClauseElement) { - setEmitFlags(constructorFunction, 16 /* CapturesThis */); - } - statements.push(constructorFunction); - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); - convertedLoopState = savedConvertedLoopState; - } - function transformConstructorParameters(constructor, hasSynthesizedSuper) { - return visitParameterList(constructor && !hasSynthesizedSuper ? constructor.parameters : void 0, visitor, context) || []; - } - function createDefaultConstructorBody(node, isDerivedClass) { - const statements = []; - resumeLexicalEnvironment(); - factory2.mergeLexicalEnvironment(statements, endLexicalEnvironment()); - if (isDerivedClass) { - statements.push(factory2.createReturnStatement(createDefaultSuperCallOrThis())); - } - const statementsArray = factory2.createNodeArray(statements); - setTextRange(statementsArray, node.members); - const block = factory2.createBlock( - statementsArray, - /*multiLine*/ - true - ); - setTextRange(block, node); - setEmitFlags(block, 3072 /* NoComments */); - return block; - } - function transformConstructorBodyWorker(prologueOut, statementsOut, statementsIn, statementOffset, superPath, superPathDepth, constructor, isDerivedClass, hasSynthesizedSuper, isFirstStatement) { - let mayReplaceThis = false; - const superStatementIndex = superPathDepth < superPath.length ? superPath[superPathDepth] : -1; - const leadingStatementsEnd = superStatementIndex >= 0 ? superStatementIndex : statementsIn.length; - if (isFirstStatement && superStatementIndex >= 0) { - let firstMaterialIndex = statementOffset; - while (isFirstStatement && firstMaterialIndex < superStatementIndex) { - const statement = constructor.body.statements[firstMaterialIndex]; - if (!isUninitializedVariableStatement(statement) && !isUsingDeclarationStateVariableStatement(statement)) - break; - firstMaterialIndex++; - } - isFirstStatement = superStatementIndex === firstMaterialIndex; - } - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, leadingStatementsEnd - statementOffset)); - const superStatement = superStatementIndex >= 0 ? statementsIn[superStatementIndex] : void 0; - if (superStatement && isTryStatement(superStatement)) { - const tryBlockStatements = []; - mayReplaceThis = transformConstructorBodyWorker( - prologueOut, - tryBlockStatements, - superStatement.tryBlock.statements, - /*statementOffset*/ - 0, - superPath, - superPathDepth + 1, - constructor, - isDerivedClass, - hasSynthesizedSuper, - isFirstStatement - ); - const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); - setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); - statementsOut.push(factory2.updateTryStatement( - superStatement, - factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), - visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock) - )); - } else { - const superCall = superStatement && getSuperCallFromStatement(superStatement); - let superCallExpression; - if (hasSynthesizedSuper) { - superCallExpression = createDefaultSuperCallOrThis(); - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; - } else if (superCall) { - superCallExpression = visitSuperCallInBody(superCall); - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; - } - if (isDerivedClass || superCallExpression) { - if (superCallExpression && superStatementIndex === statementsIn.length - 1 && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { - const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); - const returnStatement = factory2.createReturnStatement(superCallExpression); - setCommentRange(returnStatement, getCommentRange(superCall2)); - setEmitFlags(superCall2, 3072 /* NoComments */); - statementsOut.push(returnStatement); - return false; - } else { - if (isFirstStatement) { - insertCaptureThisForNode(statementsOut, constructor, superCallExpression || createActualThis()); - } else { - insertCaptureThisForNode(prologueOut, constructor, createActualThis()); - if (superCallExpression) { - addSuperThisCaptureThisForNode(statementsOut, superCallExpression); - } - } - mayReplaceThis = true; - } - } else { - insertCaptureThisForNodeIfNeeded(prologueOut, constructor); - } - } - if (superStatementIndex >= 0) { - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); - } - return mayReplaceThis; - } - function isUninitializedVariableStatement(node) { - return isVariableStatement(node) && every(node.declarationList.declarations, (decl) => isIdentifier(decl.name) && !decl.initializer); - } - function isUsingDeclarationStateVariableStatement(node) { - if (!isVariableStatement(node) || node.declarationList.declarations.length !== 1) - return false; - const varDecl = node.declarationList.declarations[0]; - if (!isIdentifier(varDecl.name) || !varDecl.initializer) - return false; - const initializer = varDecl.initializer; - if (!isObjectLiteralExpression(initializer) || initializer.properties.length !== 3) - return false; - const [stackProp, errorProp, hasErrorProp] = initializer.properties; - if (!isPropertyAssignment(stackProp) || !isIdentifier(stackProp.name) || idText(stackProp.name) !== "stack" || !isArrayLiteralExpression(stackProp.initializer)) - return false; - if (!isPropertyAssignment(errorProp) || !isIdentifier(errorProp.name) || idText(errorProp.name) !== "error" || !isVoidExpression(errorProp.initializer) || !isNumericLiteral(errorProp.initializer.expression)) - return false; - if (!isPropertyAssignment(hasErrorProp) || !isIdentifier(hasErrorProp.name) || idText(hasErrorProp.name) !== "hasError" || hasErrorProp.initializer.kind !== 97 /* FalseKeyword */) - return false; - return true; - } - function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { - const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */; - if (!constructor) - return createDefaultConstructorBody(node, isDerivedClass); - const prologue = []; - const statements = []; - resumeLexicalEnvironment(); - const standardPrologueEnd = factory2.copyStandardPrologue( - constructor.body.statements, - prologue, - /*statementOffset*/ - 0 - ); - const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, standardPrologueEnd); - if (hasSynthesizedSuper || superStatementIndices.length > 0) { - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; - } - const mayReplaceThis = transformConstructorBodyWorker( - prologue, - statements, - constructor.body.statements, - standardPrologueEnd, - superStatementIndices, - /*superPathDepth*/ - 0, - constructor, - isDerivedClass, - hasSynthesizedSuper, - /*isFirstStatement*/ - true - // NOTE: this will be recalculated inside of transformConstructorBodyWorker - ); - addDefaultValueAssignmentsIfNeeded2(prologue, constructor); - addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); - insertCaptureNewTargetIfNeeded(prologue, constructor); - factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) { - statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); - } - const body = factory2.createBlock( - setTextRange( - factory2.createNodeArray( - [ - ...prologue, - ...statements - ] - ), - /*location*/ - constructor.body.statements - ), - /*multiLine*/ - true - ); - setTextRange(body, constructor.body); - return body; - } - function isSufficientlyCoveredByReturnStatements(statement) { - if (statement.kind === 253 /* ReturnStatement */) { - return true; - } else if (statement.kind === 245 /* IfStatement */) { - const ifStatement = statement; - if (ifStatement.elseStatement) { - return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) && isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement); - } - } else if (statement.kind === 241 /* Block */) { - const lastStatement = lastOrUndefined(statement.statements); - if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) { - return true; - } - } - return false; - } - function createActualThis() { - return setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */); - } - function createDefaultSuperCallOrThis() { - return factory2.createLogicalOr( - factory2.createLogicalAnd( - factory2.createStrictInequality( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), - factory2.createNull() - ), - factory2.createFunctionApplyCall( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), - createActualThis(), - factory2.createIdentifier("arguments") - ) - ), - createActualThis() - ); - } - function visitParameter(node) { - if (node.dotDotDotToken) { - return void 0; - } else if (isBindingPattern(node.name)) { - return setOriginalNode( - setTextRange( - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - factory2.getGeneratedNameForNode(node), - /*questionToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ), - /*location*/ - node - ), - /*original*/ - node - ); - } else if (node.initializer) { - return setOriginalNode( - setTextRange( - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - node.name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ), - /*location*/ - node - ), - /*original*/ - node - ); - } else { - return node; - } - } - function hasDefaultValueOrBindingPattern(node) { - return node.initializer !== void 0 || isBindingPattern(node.name); - } - function addDefaultValueAssignmentsIfNeeded2(statements, node) { - if (!some(node.parameters, hasDefaultValueOrBindingPattern)) { - return false; - } - let added = false; - for (const parameter of node.parameters) { - const { name, initializer, dotDotDotToken } = parameter; - if (dotDotDotToken) { - continue; - } - if (isBindingPattern(name)) { - added = insertDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer) || added; - } else if (initializer) { - insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer); - added = true; - } - } - return added; - } - function insertDefaultValueAssignmentForBindingPattern(statements, parameter, name, initializer) { - if (name.elements.length > 0) { - insertStatementAfterCustomPrologue( - statements, - setEmitFlags( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - flattenDestructuringBinding( - parameter, - visitor, - context, - 0 /* All */, - factory2.getGeneratedNameForNode(parameter) - ) - ) - ), - 2097152 /* CustomPrologue */ - ) - ); - return true; - } else if (initializer) { - insertStatementAfterCustomPrologue( - statements, - setEmitFlags( - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.getGeneratedNameForNode(parameter), - Debug.checkDefined(visitNode(initializer, visitor, isExpression)) - ) - ), - 2097152 /* CustomPrologue */ - ) - ); - return true; - } - return false; - } - function insertDefaultValueAssignmentForInitializer(statements, parameter, name, initializer) { - initializer = Debug.checkDefined(visitNode(initializer, visitor, isExpression)); - const statement = factory2.createIfStatement( - factory2.createTypeCheck(factory2.cloneNode(name), "undefined"), - setEmitFlags( - setTextRange( - factory2.createBlock([ - factory2.createExpressionStatement( - setEmitFlags( - setTextRange( - factory2.createAssignment( - // TODO(rbuckton): Does this need to be parented? - setEmitFlags(setParent(setTextRange(factory2.cloneNode(name), name), name.parent), 96 /* NoSourceMap */), - setEmitFlags(initializer, 96 /* NoSourceMap */ | getEmitFlags(initializer) | 3072 /* NoComments */) - ), - parameter - ), - 3072 /* NoComments */ - ) - ) - ]), - parameter - ), - 1 /* SingleLine */ | 64 /* NoTrailingSourceMap */ | 768 /* NoTokenSourceMaps */ | 3072 /* NoComments */ - ) - ); - startOnNewLine(statement); - setTextRange(statement, parameter); - setEmitFlags(statement, 768 /* NoTokenSourceMaps */ | 64 /* NoTrailingSourceMap */ | 2097152 /* CustomPrologue */ | 3072 /* NoComments */); - insertStatementAfterCustomPrologue(statements, statement); - } - function shouldAddRestParameter(node, inConstructorWithSynthesizedSuper) { - return !!(node && node.dotDotDotToken && !inConstructorWithSynthesizedSuper); - } - function addRestParameterIfNeeded(statements, node, inConstructorWithSynthesizedSuper) { - const prologueStatements = []; - const parameter = lastOrUndefined(node.parameters); - if (!shouldAddRestParameter(parameter, inConstructorWithSynthesizedSuper)) { - return false; - } - const declarationName = parameter.name.kind === 80 /* Identifier */ ? setParent(setTextRange(factory2.cloneNode(parameter.name), parameter.name), parameter.name.parent) : factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - setEmitFlags(declarationName, 96 /* NoSourceMap */); - const expressionName = parameter.name.kind === 80 /* Identifier */ ? factory2.cloneNode(parameter.name) : declarationName; - const restIndex = node.parameters.length - 1; - const temp = factory2.createLoopVariable(); - prologueStatements.push( - setEmitFlags( - setTextRange( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - declarationName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createArrayLiteralExpression([]) - ) - ]) - ), - /*location*/ - parameter - ), - 2097152 /* CustomPrologue */ - ) - ); - const forStatement = factory2.createForStatement( - setTextRange( - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - temp, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createNumericLiteral(restIndex) - ) - ]), - parameter - ), - setTextRange( - factory2.createLessThan( - temp, - factory2.createPropertyAccessExpression(factory2.createIdentifier("arguments"), "length") - ), - parameter - ), - setTextRange(factory2.createPostfixIncrement(temp), parameter), - factory2.createBlock([ - startOnNewLine( - setTextRange( - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.createElementAccessExpression( - expressionName, - restIndex === 0 ? temp : factory2.createSubtract(temp, factory2.createNumericLiteral(restIndex)) - ), - factory2.createElementAccessExpression(factory2.createIdentifier("arguments"), temp) - ) - ), - /*location*/ - parameter - ) - ) - ]) - ); - setEmitFlags(forStatement, 2097152 /* CustomPrologue */); - startOnNewLine(forStatement); - prologueStatements.push(forStatement); - if (parameter.name.kind !== 80 /* Identifier */) { - prologueStatements.push( - setEmitFlags( - setTextRange( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - flattenDestructuringBinding(parameter, visitor, context, 0 /* All */, expressionName) - ) - ), - parameter - ), - 2097152 /* CustomPrologue */ - ) - ); - } - insertStatementsAfterCustomPrologue(statements, prologueStatements); - return true; - } - function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { - insertCaptureThisForNode(statements, node, factory2.createThis()); - return true; - } - return false; - } - function addSuperThisCaptureThisForNode(statements, superExpression) { - enableSubstitutionsForCapturedThis(); - const assignSuperExpression = factory2.createExpressionStatement( - factory2.createBinaryExpression( - factory2.createThis(), - 64 /* EqualsToken */, - superExpression - ) - ); - statements.push(assignSuperExpression); - setCommentRange(assignSuperExpression, getOriginalNode(superExpression).parent); - } - function insertCaptureThisForNode(statements, node, initializer) { - enableSubstitutionsForCapturedThis(); - const captureThisStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ) - ]) - ); - setEmitFlags(captureThisStatement, 3072 /* NoComments */ | 2097152 /* CustomPrologue */); - setSourceMapRange(captureThisStatement, node); - insertStatementAfterCustomPrologue(statements, captureThisStatement); - } - function insertCaptureNewTargetIfNeeded(statements, node) { - if (hierarchyFacts & 32768 /* NewTarget */) { - let newTarget; - switch (node.kind) { - case 219 /* ArrowFunction */: - return statements; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - newTarget = factory2.createVoidZero(); - break; - case 176 /* Constructor */: - newTarget = factory2.createPropertyAccessExpression( - setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), - "constructor" - ); - break; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - newTarget = factory2.createConditionalExpression( - factory2.createLogicalAnd( - setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), - factory2.createBinaryExpression( - setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), - 104 /* InstanceOfKeyword */, - factory2.getLocalName(node) - ) - ), - /*questionToken*/ - void 0, - factory2.createPropertyAccessExpression( - setEmitFlags(factory2.createThis(), 8 /* NoSubstitution */), - "constructor" - ), - /*colonToken*/ - void 0, - factory2.createVoidZero() - ); - break; - default: - return Debug.failBadSyntaxKind(node); - } - const captureNewTargetStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - factory2.createUniqueName("_newTarget", 16 /* Optimistic */ | 32 /* FileLevel */), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - newTarget - ) - ]) - ); - setEmitFlags(captureNewTargetStatement, 3072 /* NoComments */ | 2097152 /* CustomPrologue */); - insertStatementAfterCustomPrologue(statements, captureNewTargetStatement); - } - return statements; - } - function addClassMembers(statements, node) { - for (const member of node.members) { - switch (member.kind) { - case 240 /* SemicolonClassElement */: - statements.push(transformSemicolonClassElementToStatement(member)); - break; - case 174 /* MethodDeclaration */: - statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node)); - break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - const accessors = getAllAccessorDeclarations(node.members, member); - if (member === accessors.firstAccessor) { - statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node)); - } - break; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: - break; - default: - Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName); - break; - } - } - } - function transformSemicolonClassElementToStatement(member) { - return setTextRange(factory2.createEmptyStatement(), member); - } - function transformClassMethodDeclarationToStatement(receiver, member, container) { - const commentRange = getCommentRange(member); - const sourceMapRange = getSourceMapRange(member); - const memberFunction = transformFunctionLikeToExpression( - member, - /*location*/ - member, - /*name*/ - void 0, - container - ); - const propertyName = visitNode(member.name, visitor, isPropertyName); - Debug.assert(propertyName); - let e; - if (!isPrivateIdentifier(propertyName) && getUseDefineForClassFields(context.getCompilerOptions())) { - const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName; - e = factory2.createObjectDefinePropertyCall(receiver, name, factory2.createPropertyDescriptor({ value: memberFunction, enumerable: false, writable: true, configurable: true })); - } else { - const memberName = createMemberAccessForPropertyName( - factory2, - receiver, - propertyName, - /*location*/ - member.name - ); - e = factory2.createAssignment(memberName, memberFunction); - } - setEmitFlags(memberFunction, 3072 /* NoComments */); - setSourceMapRange(memberFunction, sourceMapRange); - const statement = setTextRange( - factory2.createExpressionStatement(e), - /*location*/ - member - ); - setOriginalNode(statement, member); - setCommentRange(statement, commentRange); - setEmitFlags(statement, 96 /* NoSourceMap */); - return statement; - } - function transformAccessorsToStatement(receiver, accessors, container) { - const statement = factory2.createExpressionStatement(transformAccessorsToExpression( - receiver, - accessors, - container, - /*startsOnNewLine*/ - false - )); - setEmitFlags(statement, 3072 /* NoComments */); - setSourceMapRange(statement, getSourceMapRange(accessors.firstAccessor)); - return statement; - } - function transformAccessorsToExpression(receiver, { firstAccessor, getAccessor, setAccessor }, container, startsOnNewLine) { - const target = setParent(setTextRange(factory2.cloneNode(receiver), receiver), receiver.parent); - setEmitFlags(target, 3072 /* NoComments */ | 64 /* NoTrailingSourceMap */); - setSourceMapRange(target, firstAccessor.name); - const visitedAccessorName = visitNode(firstAccessor.name, visitor, isPropertyName); - Debug.assert(visitedAccessorName); - if (isPrivateIdentifier(visitedAccessorName)) { - return Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015."); - } - const propertyName = createExpressionForPropertyName(factory2, visitedAccessorName); - setEmitFlags(propertyName, 3072 /* NoComments */ | 32 /* NoLeadingSourceMap */); - setSourceMapRange(propertyName, firstAccessor.name); - const properties = []; - if (getAccessor) { - const getterFunction = transformFunctionLikeToExpression( - getAccessor, - /*location*/ - void 0, - /*name*/ - void 0, - container - ); - setSourceMapRange(getterFunction, getSourceMapRange(getAccessor)); - setEmitFlags(getterFunction, 1024 /* NoLeadingComments */); - const getter = factory2.createPropertyAssignment("get", getterFunction); - setCommentRange(getter, getCommentRange(getAccessor)); - properties.push(getter); - } - if (setAccessor) { - const setterFunction = transformFunctionLikeToExpression( - setAccessor, - /*location*/ - void 0, - /*name*/ - void 0, - container - ); - setSourceMapRange(setterFunction, getSourceMapRange(setAccessor)); - setEmitFlags(setterFunction, 1024 /* NoLeadingComments */); - const setter = factory2.createPropertyAssignment("set", setterFunction); - setCommentRange(setter, getCommentRange(setAccessor)); - properties.push(setter); - } - properties.push( - factory2.createPropertyAssignment("enumerable", getAccessor || setAccessor ? factory2.createFalse() : factory2.createTrue()), - factory2.createPropertyAssignment("configurable", factory2.createTrue()) - ); - const call = factory2.createCallExpression( - factory2.createPropertyAccessExpression(factory2.createIdentifier("Object"), "defineProperty"), - /*typeArguments*/ - void 0, - [ - target, - propertyName, - factory2.createObjectLiteralExpression( - properties, - /*multiLine*/ - true - ) - ] - ); - if (startsOnNewLine) { - startOnNewLine(call); - } - return call; - } - function visitArrowFunction(node) { - if (node.transformFlags & 16384 /* ContainsLexicalThis */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) { - hierarchyFacts |= 65536 /* CapturedLexicalThis */; - } - const savedConvertedLoopState = convertedLoopState; - convertedLoopState = void 0; - const ancestorFacts = enterSubtree(15232 /* ArrowFunctionExcludes */, 66 /* ArrowFunctionIncludes */); - const func = factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - transformFunctionBody2(node) - ); - setTextRange(func, node); - setOriginalNode(func, node); - setEmitFlags(func, 16 /* CapturesThis */); - exitSubtree(ancestorFacts, 0 /* ArrowFunctionSubtreeExcludes */, 0 /* None */); - convertedLoopState = savedConvertedLoopState; - return func; - } - function visitFunctionExpression(node) { - const ancestorFacts = getEmitFlags(node) & 524288 /* AsyncFunctionBody */ ? enterSubtree(32662 /* AsyncFunctionBodyExcludes */, 69 /* AsyncFunctionBodyIncludes */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); - const savedConvertedLoopState = convertedLoopState; - convertedLoopState = void 0; - const parameters = visitParameterList(node.parameters, visitor, context); - const body = transformFunctionBody2(node); - const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name; - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); - convertedLoopState = savedConvertedLoopState; - return factory2.updateFunctionExpression( - node, - /*modifiers*/ - void 0, - node.asteriskToken, - name, - /*typeParameters*/ - void 0, - parameters, - /*type*/ - void 0, - body - ); - } - function visitFunctionDeclaration(node) { - const savedConvertedLoopState = convertedLoopState; - convertedLoopState = void 0; - const ancestorFacts = enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); - const parameters = visitParameterList(node.parameters, visitor, context); - const body = transformFunctionBody2(node); - const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name; - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); - convertedLoopState = savedConvertedLoopState; - return factory2.updateFunctionDeclaration( - node, - visitNodes2(node.modifiers, visitor, isModifier), - node.asteriskToken, - name, - /*typeParameters*/ - void 0, - parameters, - /*type*/ - void 0, - body - ); - } - function transformFunctionLikeToExpression(node, location, name, container) { - const savedConvertedLoopState = convertedLoopState; - convertedLoopState = void 0; - const ancestorFacts = container && isClassLike(container) && !isStatic(node) ? enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */ | 8 /* NonStaticClassElement */) : enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); - const parameters = visitParameterList(node.parameters, visitor, context); - const body = transformFunctionBody2(node); - if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { - name = factory2.getGeneratedNameForNode(node); - } - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); - convertedLoopState = savedConvertedLoopState; - return setOriginalNode( - setTextRange( - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - node.asteriskToken, - name, - /*typeParameters*/ - void 0, - parameters, - /*type*/ - void 0, - body - ), - location - ), - /*original*/ - node - ); - } - function transformFunctionBody2(node) { - let multiLine = false; - let singleLine = false; - let statementsLocation; - let closeBraceLocation; - const prologue = []; - const statements = []; - const body = node.body; - let statementOffset; - resumeLexicalEnvironment(); - if (isBlock(body)) { - statementOffset = factory2.copyStandardPrologue( - body.statements, - prologue, - 0, - /*ensureUseStrict*/ - false - ); - statementOffset = factory2.copyCustomPrologue(body.statements, statements, statementOffset, visitor, isHoistedFunction); - statementOffset = factory2.copyCustomPrologue(body.statements, statements, statementOffset, visitor, isHoistedVariableStatement); - } - multiLine = addDefaultValueAssignmentsIfNeeded2(statements, node) || multiLine; - multiLine = addRestParameterIfNeeded( - statements, - node, - /*inConstructorWithSynthesizedSuper*/ - false - ) || multiLine; - if (isBlock(body)) { - statementOffset = factory2.copyCustomPrologue(body.statements, statements, statementOffset, visitor); - statementsLocation = body.statements; - addRange(statements, visitNodes2(body.statements, visitor, isStatement, statementOffset)); - if (!multiLine && body.multiLine) { - multiLine = true; - } - } else { - Debug.assert(node.kind === 219 /* ArrowFunction */); - statementsLocation = moveRangeEnd(body, -1); - const equalsGreaterThanToken = node.equalsGreaterThanToken; - if (!nodeIsSynthesized(equalsGreaterThanToken) && !nodeIsSynthesized(body)) { - if (rangeEndIsOnSameLineAsRangeStart(equalsGreaterThanToken, body, currentSourceFile)) { - singleLine = true; - } else { - multiLine = true; - } - } - const expression = visitNode(body, visitor, isExpression); - const returnStatement = factory2.createReturnStatement(expression); - setTextRange(returnStatement, body); - moveSyntheticComments(returnStatement, body); - setEmitFlags(returnStatement, 768 /* NoTokenSourceMaps */ | 64 /* NoTrailingSourceMap */ | 2048 /* NoTrailingComments */); - statements.push(returnStatement); - closeBraceLocation = body; - } - factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); - insertCaptureNewTargetIfNeeded(prologue, node); - insertCaptureThisForNodeIfNeeded(prologue, node); - if (some(prologue)) { - multiLine = true; - } - statements.unshift(...prologue); - if (isBlock(body) && arrayIsEqualTo(statements, body.statements)) { - return body; - } - const block = factory2.createBlock(setTextRange(factory2.createNodeArray(statements), statementsLocation), multiLine); - setTextRange(block, node.body); - if (!multiLine && singleLine) { - setEmitFlags(block, 1 /* SingleLine */); - } - if (closeBraceLocation) { - setTokenSourceMapRange(block, 20 /* CloseBraceToken */, closeBraceLocation); - } - setOriginalNode(block, node.body); - return block; - } - function visitBlock(node, isFunctionBody2) { - if (isFunctionBody2) { - return visitEachChild(node, visitor, context); - } - const ancestorFacts = hierarchyFacts & 256 /* IterationStatement */ ? enterSubtree(7104 /* IterationStatementBlockExcludes */, 512 /* IterationStatementBlockIncludes */) : enterSubtree(6976 /* BlockExcludes */, 128 /* BlockIncludes */); - const updated = visitEachChild(node, visitor, context); - exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */); - return updated; - } - function visitExpressionStatement(node) { - return visitEachChild(node, visitorWithUnusedExpressionResult, context); - } - function visitParenthesizedExpression(node, expressionResultIsUnused2) { - return visitEachChild(node, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, context); - } - function visitBinaryExpression(node, expressionResultIsUnused2) { - if (isDestructuringAssignment(node)) { - return flattenDestructuringAssignment( - node, - visitor, - context, - 0 /* All */, - !expressionResultIsUnused2 - ); - } - if (node.operatorToken.kind === 28 /* CommaToken */) { - return factory2.updateBinaryExpression( - node, - Debug.checkDefined(visitNode(node.left, visitorWithUnusedExpressionResult, isExpression)), - node.operatorToken, - Debug.checkDefined(visitNode(node.right, expressionResultIsUnused2 ? visitorWithUnusedExpressionResult : visitor, isExpression)) - ); - } - return visitEachChild(node, visitor, context); - } - function visitCommaListExpression(node, expressionResultIsUnused2) { - if (expressionResultIsUnused2) { - return visitEachChild(node, visitorWithUnusedExpressionResult, context); - } - let result; - for (let i = 0; i < node.elements.length; i++) { - const element = node.elements[i]; - const visited = visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, isExpression); - if (result || visited !== element) { - result || (result = node.elements.slice(0, i)); - Debug.assert(visited); - result.push(visited); - } - } - const elements = result ? setTextRange(factory2.createNodeArray(result), node.elements) : node.elements; - return factory2.updateCommaListExpression(node, elements); - } - function isVariableStatementOfTypeScriptClassWrapper(node) { - return node.declarationList.declarations.length === 1 && !!node.declarationList.declarations[0].initializer && !!(getInternalEmitFlags(node.declarationList.declarations[0].initializer) & 1 /* TypeScriptClassWrapper */); - } - function visitVariableStatement(node) { - const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); - let updated; - if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { - let assignments; - for (const decl of node.declarationList.declarations) { - hoistVariableDeclarationDeclaredInConvertedLoop(convertedLoopState, decl); - if (decl.initializer) { - let assignment; - if (isBindingPattern(decl.name)) { - assignment = flattenDestructuringAssignment( - decl, - visitor, - context, - 0 /* All */ - ); - } else { - assignment = factory2.createBinaryExpression(decl.name, 64 /* EqualsToken */, Debug.checkDefined(visitNode(decl.initializer, visitor, isExpression))); - setTextRange(assignment, decl); - } - assignments = append(assignments, assignment); - } - } - if (assignments) { - updated = setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(assignments)), node); - } else { - updated = void 0; - } - } else { - updated = visitEachChild(node, visitor, context); - } - exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */); - return updated; - } - function visitVariableDeclarationList(node) { - if (node.flags & 7 /* BlockScoped */ || node.transformFlags & 524288 /* ContainsBindingPattern */) { - if (node.flags & 7 /* BlockScoped */) { - enableSubstitutionsForBlockScopedBindings(); - } - const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration); - const declarationList = factory2.createVariableDeclarationList(declarations); - setOriginalNode(declarationList, node); - setTextRange(declarationList, node); - setCommentRange(declarationList, node); - if (node.transformFlags & 524288 /* ContainsBindingPattern */ && (isBindingPattern(node.declarations[0].name) || isBindingPattern(last(node.declarations).name))) { - setSourceMapRange(declarationList, getRangeUnion(declarations)); - } - return declarationList; - } - return visitEachChild(node, visitor, context); - } - function getRangeUnion(declarations) { - let pos = -1, end = -1; - for (const node of declarations) { - pos = pos === -1 ? node.pos : node.pos === -1 ? pos : Math.min(pos, node.pos); - end = Math.max(end, node.end); - } - return createRange(pos, end); - } - function shouldEmitExplicitInitializerForLetDeclaration(node) { - const flags = resolver.getNodeCheckFlags(node); - const isCapturedInFunction = flags & 16384 /* CapturedBlockScopedBinding */; - const isDeclaredInLoop = flags & 32768 /* BlockScopedBindingInLoop */; - const emittedAsTopLevel = (hierarchyFacts & 64 /* TopLevel */) !== 0 || isCapturedInFunction && isDeclaredInLoop && (hierarchyFacts & 512 /* IterationStatementBlock */) !== 0; - const emitExplicitInitializer = !emittedAsTopLevel && (hierarchyFacts & 4096 /* ForInOrForOfStatement */) === 0 && (!resolver.isDeclarationWithCollidingName(node) || isDeclaredInLoop && !isCapturedInFunction && (hierarchyFacts & (2048 /* ForStatement */ | 4096 /* ForInOrForOfStatement */)) === 0); - return emitExplicitInitializer; - } - function visitVariableDeclarationInLetDeclarationList(node) { - const name = node.name; - if (isBindingPattern(name)) { - return visitVariableDeclaration(node); - } - if (!node.initializer && shouldEmitExplicitInitializerForLetDeclaration(node)) { - return factory2.updateVariableDeclaration( - node, - node.name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createVoidZero() - ); - } - return visitEachChild(node, visitor, context); - } - function visitVariableDeclaration(node) { - const ancestorFacts = enterSubtree(32 /* ExportedVariableStatement */, 0 /* None */); - let updated; - if (isBindingPattern(node.name)) { - updated = flattenDestructuringBinding( - node, - visitor, - context, - 0 /* All */, - /*rval*/ - void 0, - (ancestorFacts & 32 /* ExportedVariableStatement */) !== 0 - ); - } else { - updated = visitEachChild(node, visitor, context); - } - exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */); - return updated; - } - function recordLabel(node) { - convertedLoopState.labels.set(idText(node.label), true); - } - function resetLabel(node) { - convertedLoopState.labels.set(idText(node.label), false); - } - function visitLabeledStatement(node) { - if (convertedLoopState && !convertedLoopState.labels) { - convertedLoopState.labels = /* @__PURE__ */ new Map(); - } - const statement = unwrapInnermostStatementOfLabel(node, convertedLoopState && recordLabel); - return isIterationStatement( - statement, - /*lookInLabeledStatements*/ - false - ) ? visitIterationStatement( - statement, - /*outermostLabeledStatement*/ - node - ) : factory2.restoreEnclosingLabel(Debug.checkDefined(visitNode(statement, visitor, isStatement, factory2.liftToBlock)), node, convertedLoopState && resetLabel); - } - function visitIterationStatement(node, outermostLabeledStatement) { - switch (node.kind) { - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - return visitDoOrWhileStatement(node, outermostLabeledStatement); - case 248 /* ForStatement */: - return visitForStatement(node, outermostLabeledStatement); - case 249 /* ForInStatement */: - return visitForInStatement(node, outermostLabeledStatement); - case 250 /* ForOfStatement */: - return visitForOfStatement(node, outermostLabeledStatement); - } - } - function visitIterationStatementWithFacts(excludeFacts, includeFacts, node, outermostLabeledStatement, convert) { - const ancestorFacts = enterSubtree(excludeFacts, includeFacts); - const updated = convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, ancestorFacts, convert); - exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */); - return updated; - } - function visitDoOrWhileStatement(node, outermostLabeledStatement) { - return visitIterationStatementWithFacts( - 0 /* DoOrWhileStatementExcludes */, - 1280 /* DoOrWhileStatementIncludes */, - node, - outermostLabeledStatement - ); - } - function visitForStatement(node, outermostLabeledStatement) { - return visitIterationStatementWithFacts( - 5056 /* ForStatementExcludes */, - 3328 /* ForStatementIncludes */, - node, - outermostLabeledStatement - ); - } - function visitEachChildOfForStatement2(node) { - return factory2.updateForStatement( - node, - visitNode(node.initializer, visitorWithUnusedExpressionResult, isForInitializer), - visitNode(node.condition, visitor, isExpression), - visitNode(node.incrementor, visitorWithUnusedExpressionResult, isExpression), - Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)) - ); - } - function visitForInStatement(node, outermostLabeledStatement) { - return visitIterationStatementWithFacts( - 3008 /* ForInOrForOfStatementExcludes */, - 5376 /* ForInOrForOfStatementIncludes */, - node, - outermostLabeledStatement - ); - } - function visitForOfStatement(node, outermostLabeledStatement) { - return visitIterationStatementWithFacts( - 3008 /* ForInOrForOfStatementExcludes */, - 5376 /* ForInOrForOfStatementIncludes */, - node, - outermostLabeledStatement, - compilerOptions.downlevelIteration ? convertForOfStatementForIterable : convertForOfStatementForArray - ); - } - function convertForOfStatementHead(node, boundValue, convertedLoopBodyStatements) { - const statements = []; - const initializer = node.initializer; - if (isVariableDeclarationList(initializer)) { - if (node.initializer.flags & 7 /* BlockScoped */) { - enableSubstitutionsForBlockScopedBindings(); - } - const firstOriginalDeclaration = firstOrUndefined(initializer.declarations); - if (firstOriginalDeclaration && isBindingPattern(firstOriginalDeclaration.name)) { - const declarations = flattenDestructuringBinding( - firstOriginalDeclaration, - visitor, - context, - 0 /* All */, - boundValue - ); - const declarationList = setTextRange(factory2.createVariableDeclarationList(declarations), node.initializer); - setOriginalNode(declarationList, node.initializer); - setSourceMapRange(declarationList, createRange(declarations[0].pos, last(declarations).end)); - statements.push( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - declarationList - ) - ); - } else { - statements.push( - setTextRange( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - setOriginalNode( - setTextRange( - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - firstOriginalDeclaration ? firstOriginalDeclaration.name : factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - boundValue - ) - ]), - moveRangePos(initializer, -1) - ), - initializer - ) - ), - moveRangeEnd(initializer, -1) - ) - ); - } - } else { - const assignment = factory2.createAssignment(initializer, boundValue); - if (isDestructuringAssignment(assignment)) { - statements.push(factory2.createExpressionStatement(visitBinaryExpression( - assignment, - /*expressionResultIsUnused*/ - true - ))); - } else { - setTextRangeEnd(assignment, initializer.end); - statements.push(setTextRange(factory2.createExpressionStatement(Debug.checkDefined(visitNode(assignment, visitor, isExpression))), moveRangeEnd(initializer, -1))); - } - } - if (convertedLoopBodyStatements) { - return createSyntheticBlockForConvertedStatements(addRange(statements, convertedLoopBodyStatements)); - } else { - const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock); - Debug.assert(statement); - if (isBlock(statement)) { - return factory2.updateBlock(statement, setTextRange(factory2.createNodeArray(concatenate(statements, statement.statements)), statement.statements)); - } else { - statements.push(statement); - return createSyntheticBlockForConvertedStatements(statements); - } - } - } - function createSyntheticBlockForConvertedStatements(statements) { - return setEmitFlags( - factory2.createBlock( - factory2.createNodeArray(statements), - /*multiLine*/ - true - ), - 96 /* NoSourceMap */ | 768 /* NoTokenSourceMaps */ - ); - } - function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) { - const expression = visitNode(node.expression, visitor, isExpression); - Debug.assert(expression); - const counter = factory2.createLoopVariable(); - const rhsReference = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - setEmitFlags(expression, 96 /* NoSourceMap */ | getEmitFlags(expression)); - const forStatement = setTextRange( - factory2.createForStatement( - /*initializer*/ - setEmitFlags( - setTextRange( - factory2.createVariableDeclarationList([ - setTextRange(factory2.createVariableDeclaration( - counter, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createNumericLiteral(0) - ), moveRangePos(node.expression, -1)), - setTextRange(factory2.createVariableDeclaration( - rhsReference, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - expression - ), node.expression) - ]), - node.expression - ), - 4194304 /* NoHoisting */ - ), - /*condition*/ - setTextRange( - factory2.createLessThan( - counter, - factory2.createPropertyAccessExpression(rhsReference, "length") - ), - node.expression - ), - /*incrementor*/ - setTextRange(factory2.createPostfixIncrement(counter), node.expression), - /*statement*/ - convertForOfStatementHead( - node, - factory2.createElementAccessExpression(rhsReference, counter), - convertedLoopBodyStatements - ) - ), - /*location*/ - node - ); - setEmitFlags(forStatement, 512 /* NoTokenTrailingSourceMaps */); - setTextRange(forStatement, node); - return factory2.restoreEnclosingLabel(forStatement, outermostLabeledStatement, convertedLoopState && resetLabel); - } - function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) { - const expression = visitNode(node.expression, visitor, isExpression); - Debug.assert(expression); - const iterator = isIdentifier(expression) ? factory2.getGeneratedNameForNode(expression) : factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const result = isIdentifier(expression) ? factory2.getGeneratedNameForNode(iterator) : factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const errorRecord = factory2.createUniqueName("e"); - const catchVariable = factory2.getGeneratedNameForNode(errorRecord); - const returnMethod = factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const values = setTextRange(emitHelpers().createValuesHelper(expression), node.expression); - const next = factory2.createCallExpression( - factory2.createPropertyAccessExpression(iterator, "next"), - /*typeArguments*/ - void 0, - [] - ); - hoistVariableDeclaration(errorRecord); - hoistVariableDeclaration(returnMethod); - const initializer = ancestorFacts & 1024 /* IterationContainer */ ? factory2.inlineExpressions([factory2.createAssignment(errorRecord, factory2.createVoidZero()), values]) : values; - const forStatement = setEmitFlags( - setTextRange( - factory2.createForStatement( - /*initializer*/ - setEmitFlags( - setTextRange( - factory2.createVariableDeclarationList([ - setTextRange(factory2.createVariableDeclaration( - iterator, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - initializer - ), node.expression), - factory2.createVariableDeclaration( - result, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - next - ) - ]), - node.expression - ), - 4194304 /* NoHoisting */ - ), - /*condition*/ - factory2.createLogicalNot(factory2.createPropertyAccessExpression(result, "done")), - /*incrementor*/ - factory2.createAssignment(result, next), - /*statement*/ - convertForOfStatementHead( - node, - factory2.createPropertyAccessExpression(result, "value"), - convertedLoopBodyStatements - ) - ), - /*location*/ - node - ), - 512 /* NoTokenTrailingSourceMaps */ - ); - return factory2.createTryStatement( - factory2.createBlock([ - factory2.restoreEnclosingLabel( - forStatement, - outermostLabeledStatement, - convertedLoopState && resetLabel - ) - ]), - factory2.createCatchClause( - factory2.createVariableDeclaration(catchVariable), - setEmitFlags( - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createAssignment( - errorRecord, - factory2.createObjectLiteralExpression([ - factory2.createPropertyAssignment("error", catchVariable) - ]) - ) - ) - ]), - 1 /* SingleLine */ - ) - ), - factory2.createBlock([ - factory2.createTryStatement( - /*tryBlock*/ - factory2.createBlock([ - setEmitFlags( - factory2.createIfStatement( - factory2.createLogicalAnd( - factory2.createLogicalAnd( - result, - factory2.createLogicalNot( - factory2.createPropertyAccessExpression(result, "done") - ) - ), - factory2.createAssignment( - returnMethod, - factory2.createPropertyAccessExpression(iterator, "return") - ) - ), - factory2.createExpressionStatement( - factory2.createFunctionCallCall(returnMethod, iterator, []) - ) - ), - 1 /* SingleLine */ - ) - ]), - /*catchClause*/ - void 0, - /*finallyBlock*/ - setEmitFlags( - factory2.createBlock([ - setEmitFlags( - factory2.createIfStatement( - errorRecord, - factory2.createThrowStatement( - factory2.createPropertyAccessExpression(errorRecord, "error") - ) - ), - 1 /* SingleLine */ - ) - ]), - 1 /* SingleLine */ - ) - ) - ]) - ); - } - function visitObjectLiteralExpression(node) { - const properties = node.properties; - let numInitialProperties = -1, hasComputed = false; - for (let i = 0; i < properties.length; i++) { - const property = properties[i]; - if (property.transformFlags & 1048576 /* ContainsYield */ && hierarchyFacts & 4 /* AsyncFunctionBody */ || (hasComputed = Debug.checkDefined(property.name).kind === 167 /* ComputedPropertyName */)) { - numInitialProperties = i; - break; - } - } - if (numInitialProperties < 0) { - return visitEachChild(node, visitor, context); - } - const temp = factory2.createTempVariable(hoistVariableDeclaration); - const expressions = []; - const assignment = factory2.createAssignment( - temp, - setEmitFlags( - factory2.createObjectLiteralExpression( - visitNodes2(properties, visitor, isObjectLiteralElementLike, 0, numInitialProperties), - node.multiLine - ), - hasComputed ? 131072 /* Indented */ : 0 - ) - ); - if (node.multiLine) { - startOnNewLine(assignment); - } - expressions.push(assignment); - addObjectLiteralMembers(expressions, node, temp, numInitialProperties); - expressions.push(node.multiLine ? startOnNewLine(setParent(setTextRange(factory2.cloneNode(temp), temp), temp.parent)) : temp); - return factory2.inlineExpressions(expressions); - } - function shouldConvertPartOfIterationStatement(node) { - return (resolver.getNodeCheckFlags(node) & 8192 /* ContainsCapturedBlockScopeBinding */) !== 0; - } - function shouldConvertInitializerOfForStatement(node) { - return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer); - } - function shouldConvertConditionOfForStatement(node) { - return isForStatement(node) && !!node.condition && shouldConvertPartOfIterationStatement(node.condition); - } - function shouldConvertIncrementorOfForStatement(node) { - return isForStatement(node) && !!node.incrementor && shouldConvertPartOfIterationStatement(node.incrementor); - } - function shouldConvertIterationStatement(node) { - return shouldConvertBodyOfIterationStatement(node) || shouldConvertInitializerOfForStatement(node); - } - function shouldConvertBodyOfIterationStatement(node) { - return (resolver.getNodeCheckFlags(node) & 4096 /* LoopWithCapturedBlockScopedBinding */) !== 0; - } - function hoistVariableDeclarationDeclaredInConvertedLoop(state, node) { - if (!state.hoistedLocalVariables) { - state.hoistedLocalVariables = []; - } - visit(node.name); - function visit(node2) { - if (node2.kind === 80 /* Identifier */) { - state.hoistedLocalVariables.push(node2); - } else { - for (const element of node2.elements) { - if (!isOmittedExpression(element)) { - visit(element.name); - } - } - } - } - } - function convertIterationStatementBodyIfNecessary(node, outermostLabeledStatement, ancestorFacts, convert) { - if (!shouldConvertIterationStatement(node)) { - let saveAllowedNonLabeledJumps; - if (convertedLoopState) { - saveAllowedNonLabeledJumps = convertedLoopState.allowedNonLabeledJumps; - convertedLoopState.allowedNonLabeledJumps = 2 /* Break */ | 4 /* Continue */; - } - const result = convert ? convert( - node, - outermostLabeledStatement, - /*convertedLoopBodyStatements*/ - void 0, - ancestorFacts - ) : factory2.restoreEnclosingLabel( - isForStatement(node) ? visitEachChildOfForStatement2(node) : visitEachChild(node, visitor, context), - outermostLabeledStatement, - convertedLoopState && resetLabel - ); - if (convertedLoopState) { - convertedLoopState.allowedNonLabeledJumps = saveAllowedNonLabeledJumps; - } - return result; - } - const currentState = createConvertedLoopState(node); - const statements = []; - const outerConvertedLoopState = convertedLoopState; - convertedLoopState = currentState; - const initializerFunction = shouldConvertInitializerOfForStatement(node) ? createFunctionForInitializerOfForStatement(node, currentState) : void 0; - const bodyFunction = shouldConvertBodyOfIterationStatement(node) ? createFunctionForBodyOfIterationStatement(node, currentState, outerConvertedLoopState) : void 0; - convertedLoopState = outerConvertedLoopState; - if (initializerFunction) - statements.push(initializerFunction.functionDeclaration); - if (bodyFunction) - statements.push(bodyFunction.functionDeclaration); - addExtraDeclarationsForConvertedLoop(statements, currentState, outerConvertedLoopState); - if (initializerFunction) { - statements.push(generateCallToConvertedLoopInitializer(initializerFunction.functionName, initializerFunction.containsYield)); - } - let loop; - if (bodyFunction) { - if (convert) { - loop = convert(node, outermostLabeledStatement, bodyFunction.part, ancestorFacts); - } else { - const clone2 = convertIterationStatementCore(node, initializerFunction, factory2.createBlock( - bodyFunction.part, - /*multiLine*/ - true - )); - loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel); - } - } else { - const clone2 = convertIterationStatementCore(node, initializerFunction, Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))); - loop = factory2.restoreEnclosingLabel(clone2, outermostLabeledStatement, convertedLoopState && resetLabel); - } - statements.push(loop); - return statements; - } - function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) { - switch (node.kind) { - case 248 /* ForStatement */: - return convertForStatement(node, initializerFunction, convertedLoopBody); - case 249 /* ForInStatement */: - return convertForInStatement(node, convertedLoopBody); - case 250 /* ForOfStatement */: - return convertForOfStatement(node, convertedLoopBody); - case 246 /* DoStatement */: - return convertDoStatement(node, convertedLoopBody); - case 247 /* WhileStatement */: - return convertWhileStatement(node, convertedLoopBody); - default: - return Debug.failBadSyntaxKind(node, "IterationStatement expected"); - } - } - function convertForStatement(node, initializerFunction, convertedLoopBody) { - const shouldConvertCondition = node.condition && shouldConvertPartOfIterationStatement(node.condition); - const shouldConvertIncrementor = shouldConvertCondition || node.incrementor && shouldConvertPartOfIterationStatement(node.incrementor); - return factory2.updateForStatement( - node, - visitNode(initializerFunction ? initializerFunction.part : node.initializer, visitorWithUnusedExpressionResult, isForInitializer), - visitNode(shouldConvertCondition ? void 0 : node.condition, visitor, isExpression), - visitNode(shouldConvertIncrementor ? void 0 : node.incrementor, visitorWithUnusedExpressionResult, isExpression), - convertedLoopBody - ); - } - function convertForOfStatement(node, convertedLoopBody) { - return factory2.updateForOfStatement( - node, - /*awaitModifier*/ - void 0, - Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)), - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - convertedLoopBody - ); - } - function convertForInStatement(node, convertedLoopBody) { - return factory2.updateForInStatement( - node, - Debug.checkDefined(visitNode(node.initializer, visitor, isForInitializer)), - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - convertedLoopBody - ); - } - function convertDoStatement(node, convertedLoopBody) { - return factory2.updateDoStatement( - node, - convertedLoopBody, - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)) - ); - } - function convertWhileStatement(node, convertedLoopBody) { - return factory2.updateWhileStatement( - node, - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - convertedLoopBody - ); - } - function createConvertedLoopState(node) { - let loopInitializer; - switch (node.kind) { - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - const initializer = node.initializer; - if (initializer && initializer.kind === 261 /* VariableDeclarationList */) { - loopInitializer = initializer; - } - break; - } - const loopParameters = []; - const loopOutParameters = []; - if (loopInitializer && getCombinedNodeFlags(loopInitializer) & 7 /* BlockScoped */) { - const hasCapturedBindingsInForHead = shouldConvertInitializerOfForStatement(node) || shouldConvertConditionOfForStatement(node) || shouldConvertIncrementorOfForStatement(node); - for (const decl of loopInitializer.declarations) { - processLoopVariableDeclaration(node, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForHead); - } - } - const currentState = { loopParameters, loopOutParameters }; - if (convertedLoopState) { - if (convertedLoopState.argumentsName) { - currentState.argumentsName = convertedLoopState.argumentsName; - } - if (convertedLoopState.thisName) { - currentState.thisName = convertedLoopState.thisName; - } - if (convertedLoopState.hoistedLocalVariables) { - currentState.hoistedLocalVariables = convertedLoopState.hoistedLocalVariables; - } - } - return currentState; - } - function addExtraDeclarationsForConvertedLoop(statements, state, outerState) { - let extraVariableDeclarations; - if (state.argumentsName) { - if (outerState) { - outerState.argumentsName = state.argumentsName; - } else { - (extraVariableDeclarations || (extraVariableDeclarations = [])).push( - factory2.createVariableDeclaration( - state.argumentsName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createIdentifier("arguments") - ) - ); - } - } - if (state.thisName) { - if (outerState) { - outerState.thisName = state.thisName; - } else { - (extraVariableDeclarations || (extraVariableDeclarations = [])).push( - factory2.createVariableDeclaration( - state.thisName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createIdentifier("this") - ) - ); - } - } - if (state.hoistedLocalVariables) { - if (outerState) { - outerState.hoistedLocalVariables = state.hoistedLocalVariables; - } else { - if (!extraVariableDeclarations) { - extraVariableDeclarations = []; - } - for (const identifier of state.hoistedLocalVariables) { - extraVariableDeclarations.push(factory2.createVariableDeclaration(identifier)); - } - } - } - if (state.loopOutParameters.length) { - if (!extraVariableDeclarations) { - extraVariableDeclarations = []; - } - for (const outParam of state.loopOutParameters) { - extraVariableDeclarations.push(factory2.createVariableDeclaration(outParam.outParamName)); - } - } - if (state.conditionVariable) { - if (!extraVariableDeclarations) { - extraVariableDeclarations = []; - } - extraVariableDeclarations.push(factory2.createVariableDeclaration( - state.conditionVariable, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createFalse() - )); - } - if (extraVariableDeclarations) { - statements.push(factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList(extraVariableDeclarations) - )); - } - } - function createOutVariable(p) { - return factory2.createVariableDeclaration( - p.originalName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - p.outParamName - ); - } - function createFunctionForInitializerOfForStatement(node, currentState) { - const functionName = factory2.createUniqueName("_loop_init"); - const containsYield = (node.initializer.transformFlags & 1048576 /* ContainsYield */) !== 0; - let emitFlags = 0 /* None */; - if (currentState.containsLexicalThis) - emitFlags |= 16 /* CapturesThis */; - if (containsYield && hierarchyFacts & 4 /* AsyncFunctionBody */) - emitFlags |= 524288 /* AsyncFunctionBody */; - const statements = []; - statements.push(factory2.createVariableStatement( - /*modifiers*/ - void 0, - node.initializer - )); - copyOutParameters(currentState.loopOutParameters, 2 /* Initializer */, 1 /* ToOutParameter */, statements); - const functionDeclaration = factory2.createVariableStatement( - /*modifiers*/ - void 0, - setEmitFlags( - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - functionName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - setEmitFlags( - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - containsYield ? factory2.createToken(42 /* AsteriskToken */) : void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - void 0, - /*type*/ - void 0, - Debug.checkDefined(visitNode( - factory2.createBlock( - statements, - /*multiLine*/ - true - ), - visitor, - isBlock - )) - ), - emitFlags - ) - ) - ]), - 4194304 /* NoHoisting */ - ) - ); - const part = factory2.createVariableDeclarationList(map(currentState.loopOutParameters, createOutVariable)); - return { functionName, containsYield, functionDeclaration, part }; - } - function createFunctionForBodyOfIterationStatement(node, currentState, outerState) { - const functionName = factory2.createUniqueName("_loop"); - startLexicalEnvironment(); - const statement = visitNode(node.statement, visitor, isStatement, factory2.liftToBlock); - const lexicalEnvironment = endLexicalEnvironment(); - const statements = []; - if (shouldConvertConditionOfForStatement(node) || shouldConvertIncrementorOfForStatement(node)) { - currentState.conditionVariable = factory2.createUniqueName("inc"); - if (node.incrementor) { - statements.push(factory2.createIfStatement( - currentState.conditionVariable, - factory2.createExpressionStatement(Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression))), - factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue())) - )); - } else { - statements.push(factory2.createIfStatement( - factory2.createLogicalNot(currentState.conditionVariable), - factory2.createExpressionStatement(factory2.createAssignment(currentState.conditionVariable, factory2.createTrue())) - )); - } - if (shouldConvertConditionOfForStatement(node)) { - statements.push(factory2.createIfStatement( - factory2.createPrefixUnaryExpression(54 /* ExclamationToken */, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))), - Debug.checkDefined(visitNode(factory2.createBreakStatement(), visitor, isStatement)) - )); - } - } - Debug.assert(statement); - if (isBlock(statement)) { - addRange(statements, statement.statements); - } else { - statements.push(statement); - } - copyOutParameters(currentState.loopOutParameters, 1 /* Body */, 1 /* ToOutParameter */, statements); - insertStatementsAfterStandardPrologue(statements, lexicalEnvironment); - const loopBody = factory2.createBlock( - statements, - /*multiLine*/ - true - ); - if (isBlock(statement)) - setOriginalNode(loopBody, statement); - const containsYield = (node.statement.transformFlags & 1048576 /* ContainsYield */) !== 0; - let emitFlags = 1048576 /* ReuseTempVariableScope */; - if (currentState.containsLexicalThis) - emitFlags |= 16 /* CapturesThis */; - if (containsYield && (hierarchyFacts & 4 /* AsyncFunctionBody */) !== 0) - emitFlags |= 524288 /* AsyncFunctionBody */; - const functionDeclaration = factory2.createVariableStatement( - /*modifiers*/ - void 0, - setEmitFlags( - factory2.createVariableDeclarationList( - [ - factory2.createVariableDeclaration( - functionName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - setEmitFlags( - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - containsYield ? factory2.createToken(42 /* AsteriskToken */) : void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - currentState.loopParameters, - /*type*/ - void 0, - loopBody - ), - emitFlags - ) - ) - ] - ), - 4194304 /* NoHoisting */ - ) - ); - const part = generateCallToConvertedLoop(functionName, currentState, outerState, containsYield); - return { functionName, containsYield, functionDeclaration, part }; - } - function copyOutParameter(outParam, copyDirection) { - const source = copyDirection === 0 /* ToOriginal */ ? outParam.outParamName : outParam.originalName; - const target = copyDirection === 0 /* ToOriginal */ ? outParam.originalName : outParam.outParamName; - return factory2.createBinaryExpression(target, 64 /* EqualsToken */, source); - } - function copyOutParameters(outParams, partFlags, copyDirection, statements) { - for (const outParam of outParams) { - if (outParam.flags & partFlags) { - statements.push(factory2.createExpressionStatement(copyOutParameter(outParam, copyDirection))); - } - } - } - function generateCallToConvertedLoopInitializer(initFunctionExpressionName, containsYield) { - const call = factory2.createCallExpression( - initFunctionExpressionName, - /*typeArguments*/ - void 0, - [] - ); - const callResult = containsYield ? factory2.createYieldExpression( - factory2.createToken(42 /* AsteriskToken */), - setEmitFlags(call, 8388608 /* Iterator */) - ) : call; - return factory2.createExpressionStatement(callResult); - } - function generateCallToConvertedLoop(loopFunctionExpressionName, state, outerState, containsYield) { - const statements = []; - const isSimpleLoop = !(state.nonLocalJumps & ~4 /* Continue */) && !state.labeledNonLocalBreaks && !state.labeledNonLocalContinues; - const call = factory2.createCallExpression( - loopFunctionExpressionName, - /*typeArguments*/ - void 0, - map(state.loopParameters, (p) => p.name) - ); - const callResult = containsYield ? factory2.createYieldExpression( - factory2.createToken(42 /* AsteriskToken */), - setEmitFlags(call, 8388608 /* Iterator */) - ) : call; - if (isSimpleLoop) { - statements.push(factory2.createExpressionStatement(callResult)); - copyOutParameters(state.loopOutParameters, 1 /* Body */, 0 /* ToOriginal */, statements); - } else { - const loopResultName = factory2.createUniqueName("state"); - const stateVariable = factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - [factory2.createVariableDeclaration( - loopResultName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - callResult - )] - ) - ); - statements.push(stateVariable); - copyOutParameters(state.loopOutParameters, 1 /* Body */, 0 /* ToOriginal */, statements); - if (state.nonLocalJumps & 8 /* Return */) { - let returnStatement; - if (outerState) { - outerState.nonLocalJumps |= 8 /* Return */; - returnStatement = factory2.createReturnStatement(loopResultName); - } else { - returnStatement = factory2.createReturnStatement(factory2.createPropertyAccessExpression(loopResultName, "value")); - } - statements.push( - factory2.createIfStatement( - factory2.createTypeCheck(loopResultName, "object"), - returnStatement - ) - ); - } - if (state.nonLocalJumps & 2 /* Break */) { - statements.push( - factory2.createIfStatement( - factory2.createStrictEquality( - loopResultName, - factory2.createStringLiteral("break") - ), - factory2.createBreakStatement() - ) - ); - } - if (state.labeledNonLocalBreaks || state.labeledNonLocalContinues) { - const caseClauses = []; - processLabeledJumps( - state.labeledNonLocalBreaks, - /*isBreak*/ - true, - loopResultName, - outerState, - caseClauses - ); - processLabeledJumps( - state.labeledNonLocalContinues, - /*isBreak*/ - false, - loopResultName, - outerState, - caseClauses - ); - statements.push( - factory2.createSwitchStatement( - loopResultName, - factory2.createCaseBlock(caseClauses) - ) - ); - } - } - return statements; - } - function setLabeledJump(state, isBreak, labelText, labelMarker) { - if (isBreak) { - if (!state.labeledNonLocalBreaks) { - state.labeledNonLocalBreaks = /* @__PURE__ */ new Map(); - } - state.labeledNonLocalBreaks.set(labelText, labelMarker); - } else { - if (!state.labeledNonLocalContinues) { - state.labeledNonLocalContinues = /* @__PURE__ */ new Map(); - } - state.labeledNonLocalContinues.set(labelText, labelMarker); - } - } - function processLabeledJumps(table, isBreak, loopResultName, outerLoop, caseClauses) { - if (!table) { - return; - } - table.forEach((labelMarker, labelText) => { - const statements = []; - if (!outerLoop || outerLoop.labels && outerLoop.labels.get(labelText)) { - const label = factory2.createIdentifier(labelText); - statements.push(isBreak ? factory2.createBreakStatement(label) : factory2.createContinueStatement(label)); - } else { - setLabeledJump(outerLoop, isBreak, labelText, labelMarker); - statements.push(factory2.createReturnStatement(loopResultName)); - } - caseClauses.push(factory2.createCaseClause(factory2.createStringLiteral(labelMarker), statements)); - }); - } - function processLoopVariableDeclaration(container, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForHead) { - const name = decl.name; - if (isBindingPattern(name)) { - for (const element of name.elements) { - if (!isOmittedExpression(element)) { - processLoopVariableDeclaration(container, element, loopParameters, loopOutParameters, hasCapturedBindingsInForHead); - } - } - } else { - loopParameters.push(factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - name - )); - const checkFlags = resolver.getNodeCheckFlags(decl); - if (checkFlags & 65536 /* NeedsLoopOutParameter */ || hasCapturedBindingsInForHead) { - const outParamName = factory2.createUniqueName("out_" + idText(name)); - let flags = 0 /* None */; - if (checkFlags & 65536 /* NeedsLoopOutParameter */) { - flags |= 1 /* Body */; - } - if (isForStatement(container)) { - if (container.initializer && resolver.isBindingCapturedByNode(container.initializer, decl)) { - flags |= 2 /* Initializer */; - } - if (container.condition && resolver.isBindingCapturedByNode(container.condition, decl) || container.incrementor && resolver.isBindingCapturedByNode(container.incrementor, decl)) { - flags |= 1 /* Body */; - } - } - loopOutParameters.push({ flags, originalName: name, outParamName }); - } - } - } - function addObjectLiteralMembers(expressions, node, receiver, start) { - const properties = node.properties; - const numProperties = properties.length; - for (let i = start; i < numProperties; i++) { - const property = properties[i]; - switch (property.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - const accessors = getAllAccessorDeclarations(node.properties, property); - if (property === accessors.firstAccessor) { - expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine)); - } - break; - case 174 /* MethodDeclaration */: - expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine)); - break; - case 303 /* PropertyAssignment */: - expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine)); - break; - case 304 /* ShorthandPropertyAssignment */: - expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine)); - break; - default: - Debug.failBadSyntaxKind(node); - break; - } - } - } - function transformPropertyAssignmentToExpression(property, receiver, startsOnNewLine) { - const expression = factory2.createAssignment( - createMemberAccessForPropertyName( - factory2, - receiver, - Debug.checkDefined(visitNode(property.name, visitor, isPropertyName)) - ), - Debug.checkDefined(visitNode(property.initializer, visitor, isExpression)) - ); - setTextRange(expression, property); - if (startsOnNewLine) { - startOnNewLine(expression); - } - return expression; - } - function transformShorthandPropertyAssignmentToExpression(property, receiver, startsOnNewLine) { - const expression = factory2.createAssignment( - createMemberAccessForPropertyName( - factory2, - receiver, - Debug.checkDefined(visitNode(property.name, visitor, isPropertyName)) - ), - factory2.cloneNode(property.name) - ); - setTextRange(expression, property); - if (startsOnNewLine) { - startOnNewLine(expression); - } - return expression; - } - function transformObjectLiteralMethodDeclarationToExpression(method, receiver, container, startsOnNewLine) { - const expression = factory2.createAssignment( - createMemberAccessForPropertyName( - factory2, - receiver, - Debug.checkDefined(visitNode(method.name, visitor, isPropertyName)) - ), - transformFunctionLikeToExpression( - method, - /*location*/ - method, - /*name*/ - void 0, - container - ) - ); - setTextRange(expression, method); - if (startsOnNewLine) { - startOnNewLine(expression); - } - return expression; - } - function visitCatchClause(node) { - const ancestorFacts = enterSubtree(7104 /* BlockScopeExcludes */, 0 /* BlockScopeIncludes */); - let updated; - Debug.assert(!!node.variableDeclaration, "Catch clause variable should always be present when downleveling ES2015."); - if (isBindingPattern(node.variableDeclaration.name)) { - const temp = factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - const newVariableDeclaration = factory2.createVariableDeclaration(temp); - setTextRange(newVariableDeclaration, node.variableDeclaration); - const vars = flattenDestructuringBinding( - node.variableDeclaration, - visitor, - context, - 0 /* All */, - temp - ); - const list = factory2.createVariableDeclarationList(vars); - setTextRange(list, node.variableDeclaration); - const destructure = factory2.createVariableStatement( - /*modifiers*/ - void 0, - list - ); - updated = factory2.updateCatchClause(node, newVariableDeclaration, addStatementToStartOfBlock(node.block, destructure)); - } else { - updated = visitEachChild(node, visitor, context); - } - exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */); - return updated; - } - function addStatementToStartOfBlock(block, statement) { - const transformedStatements = visitNodes2(block.statements, visitor, isStatement); - return factory2.updateBlock(block, [statement, ...transformedStatements]); - } - function visitMethodDeclaration(node) { - Debug.assert(!isComputedPropertyName(node.name)); - const functionExpression = transformFunctionLikeToExpression( - node, - /*location*/ - moveRangePos(node, -1), - /*name*/ - void 0, - /*container*/ - void 0 - ); - setEmitFlags(functionExpression, 1024 /* NoLeadingComments */ | getEmitFlags(functionExpression)); - return setTextRange( - factory2.createPropertyAssignment( - node.name, - functionExpression - ), - /*location*/ - node - ); - } - function visitAccessorDeclaration(node) { - Debug.assert(!isComputedPropertyName(node.name)); - const savedConvertedLoopState = convertedLoopState; - convertedLoopState = void 0; - const ancestorFacts = enterSubtree(32670 /* FunctionExcludes */, 65 /* FunctionIncludes */); - let updated; - const parameters = visitParameterList(node.parameters, visitor, context); - const body = transformFunctionBody2(node); - if (node.kind === 177 /* GetAccessor */) { - updated = factory2.updateGetAccessorDeclaration(node, node.modifiers, node.name, parameters, node.type, body); - } else { - updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); - } - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); - convertedLoopState = savedConvertedLoopState; - return updated; - } - function visitShorthandPropertyAssignment(node) { - return setTextRange( - factory2.createPropertyAssignment( - node.name, - visitIdentifier(factory2.cloneNode(node.name)) - ), - /*location*/ - node - ); - } - function visitComputedPropertyName(node) { - return visitEachChild(node, visitor, context); - } - function visitYieldExpression(node) { - return visitEachChild(node, visitor, context); - } - function visitArrayLiteralExpression(node) { - if (some(node.elements, isSpreadElement)) { - return transformAndSpreadElements( - node.elements, - /*isArgumentList*/ - false, - !!node.multiLine, - /*hasTrailingComma*/ - !!node.elements.hasTrailingComma - ); - } - return visitEachChild(node, visitor, context); - } - function visitCallExpression(node) { - if (getInternalEmitFlags(node) & 1 /* TypeScriptClassWrapper */) { - return visitTypeScriptClassWrapper(node); - } - const expression = skipOuterExpressions(node.expression); - if (expression.kind === 108 /* SuperKeyword */ || isSuperProperty(expression) || some(node.arguments, isSpreadElement)) { - return visitCallExpressionWithPotentialCapturedThisAssignment( - node, - /*assignToCapturedThis*/ - true - ); - } - return factory2.updateCallExpression( - node, - Debug.checkDefined(visitNode(node.expression, callExpressionVisitor, isExpression)), - /*typeArguments*/ - void 0, - visitNodes2(node.arguments, visitor, isExpression) - ); - } - function visitTypeScriptClassWrapper(node) { - const body = cast(cast(skipOuterExpressions(node.expression), isArrowFunction).body, isBlock); - const isVariableStatementWithInitializer = (stmt) => isVariableStatement(stmt) && !!first(stmt.declarationList.declarations).initializer; - const savedConvertedLoopState = convertedLoopState; - convertedLoopState = void 0; - const bodyStatements = visitNodes2(body.statements, classWrapperStatementVisitor, isStatement); - convertedLoopState = savedConvertedLoopState; - const classStatements = filter(bodyStatements, isVariableStatementWithInitializer); - const remainingStatements = filter(bodyStatements, (stmt) => !isVariableStatementWithInitializer(stmt)); - const varStatement = cast(first(classStatements), isVariableStatement); - const variable = varStatement.declarationList.declarations[0]; - const initializer = skipOuterExpressions(variable.initializer); - let aliasAssignment = tryCast(initializer, isAssignmentExpression); - if (!aliasAssignment && isBinaryExpression(initializer) && initializer.operatorToken.kind === 28 /* CommaToken */) { - aliasAssignment = tryCast(initializer.left, isAssignmentExpression); - } - const call = cast(aliasAssignment ? skipOuterExpressions(aliasAssignment.right) : initializer, isCallExpression); - const func = cast(skipOuterExpressions(call.expression), isFunctionExpression); - const funcStatements = func.body.statements; - let classBodyStart = 0; - let classBodyEnd = -1; - const statements = []; - if (aliasAssignment) { - const extendsCall = tryCast(funcStatements[classBodyStart], isExpressionStatement); - if (extendsCall) { - statements.push(extendsCall); - classBodyStart++; - } - statements.push(funcStatements[classBodyStart]); - classBodyStart++; - statements.push( - factory2.createExpressionStatement( - factory2.createAssignment( - aliasAssignment.left, - cast(variable.name, isIdentifier) - ) - ) - ); - } - while (!isReturnStatement(elementAt(funcStatements, classBodyEnd))) { - classBodyEnd--; - } - addRange(statements, funcStatements, classBodyStart, classBodyEnd); - if (classBodyEnd < -1) { - addRange(statements, funcStatements, classBodyEnd + 1); - } - const returnStatement = tryCast(elementAt(funcStatements, classBodyEnd), isReturnStatement); - for (const statement of remainingStatements) { - if (isReturnStatement(statement) && (returnStatement == null ? void 0 : returnStatement.expression) && !isIdentifier(returnStatement.expression)) { - statements.push(returnStatement); - } else { - statements.push(statement); - } - } - addRange( - statements, - classStatements, - /*start*/ - 1 - ); - return factory2.restoreOuterExpressions( - node.expression, - factory2.restoreOuterExpressions( - variable.initializer, - factory2.restoreOuterExpressions( - aliasAssignment && aliasAssignment.right, - factory2.updateCallExpression( - call, - factory2.restoreOuterExpressions( - call.expression, - factory2.updateFunctionExpression( - func, - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - func.parameters, - /*type*/ - void 0, - factory2.updateBlock( - func.body, - statements - ) - ) - ), - /*typeArguments*/ - void 0, - call.arguments - ) - ) - ) - ); - } - function visitSuperCallInBody(node) { - return visitCallExpressionWithPotentialCapturedThisAssignment( - node, - /*assignToCapturedThis*/ - false - ); - } - function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { - if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 108 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { - const { target, thisArg } = factory2.createCallBinding(node.expression, hoistVariableDeclaration); - if (node.expression.kind === 108 /* SuperKeyword */) { - setEmitFlags(thisArg, 8 /* NoSubstitution */); - } - let resultingCall; - if (node.transformFlags & 32768 /* ContainsRestOrSpread */) { - resultingCall = factory2.createFunctionApplyCall( - Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 108 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), - transformAndSpreadElements( - node.arguments, - /*isArgumentList*/ - true, - /*multiLine*/ - false, - /*hasTrailingComma*/ - false - ) - ); - } else { - resultingCall = setTextRange( - factory2.createFunctionCallCall( - Debug.checkDefined(visitNode(target, callExpressionVisitor, isExpression)), - node.expression.kind === 108 /* SuperKeyword */ ? thisArg : Debug.checkDefined(visitNode(thisArg, visitor, isExpression)), - visitNodes2(node.arguments, visitor, isExpression) - ), - node - ); - } - if (node.expression.kind === 108 /* SuperKeyword */) { - const initializer = factory2.createLogicalOr( - resultingCall, - createActualThis() - ); - resultingCall = assignToCapturedThis ? factory2.createAssignment(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), initializer) : initializer; - } - return setOriginalNode(resultingCall, node); - } - return visitEachChild(node, visitor, context); - } - function visitNewExpression(node) { - if (some(node.arguments, isSpreadElement)) { - const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration); - return factory2.createNewExpression( - factory2.createFunctionApplyCall( - Debug.checkDefined(visitNode(target, visitor, isExpression)), - thisArg, - transformAndSpreadElements( - factory2.createNodeArray([factory2.createVoidZero(), ...node.arguments]), - /*isArgumentList*/ - true, - /*multiLine*/ - false, - /*hasTrailingComma*/ - false - ) - ), - /*typeArguments*/ - void 0, - [] - ); - } - return visitEachChild(node, visitor, context); - } - function transformAndSpreadElements(elements, isArgumentList, multiLine, hasTrailingComma) { - const numElements = elements.length; - const segments = flatten( - // As we visit each element, we return one of two functions to use as the "key": - // - `visitSpanOfSpreads` for one or more contiguous `...` spread expressions, i.e. `...a, ...b` in `[1, 2, ...a, ...b]` - // - `visitSpanOfNonSpreads` for one or more contiguous non-spread elements, i.e. `1, 2`, in `[1, 2, ...a, ...b]` - spanMap( - elements, - partitionSpread, - (partition, visitPartition, _start, end) => visitPartition(partition, multiLine, hasTrailingComma && end === numElements) - ) - ); - if (segments.length === 1) { - const firstSegment = segments[0]; - if (isArgumentList && !compilerOptions.downlevelIteration || isPackedArrayLiteral(firstSegment.expression) || isCallToHelper(firstSegment.expression, "___spreadArray")) { - return firstSegment.expression; - } - } - const helpers = emitHelpers(); - const startsWithSpread = segments[0].kind !== 0 /* None */; - let expression = startsWithSpread ? factory2.createArrayLiteralExpression() : segments[0].expression; - for (let i = startsWithSpread ? 0 : 1; i < segments.length; i++) { - const segment = segments[i]; - expression = helpers.createSpreadArrayHelper( - expression, - segment.expression, - segment.kind === 1 /* UnpackedSpread */ && !isArgumentList - ); - } - return expression; - } - function partitionSpread(node) { - return isSpreadElement(node) ? visitSpanOfSpreads : visitSpanOfNonSpreads; - } - function visitSpanOfSpreads(chunk) { - return map(chunk, visitExpressionOfSpread); - } - function visitExpressionOfSpread(node) { - Debug.assertNode(node, isSpreadElement); - let expression = visitNode(node.expression, visitor, isExpression); - Debug.assert(expression); - const isCallToReadHelper = isCallToHelper(expression, "___read"); - let kind = isCallToReadHelper || isPackedArrayLiteral(expression) ? 2 /* PackedSpread */ : 1 /* UnpackedSpread */; - if (compilerOptions.downlevelIteration && kind === 1 /* UnpackedSpread */ && !isArrayLiteralExpression(expression) && !isCallToReadHelper) { - expression = emitHelpers().createReadHelper( - expression, - /*count*/ - void 0 - ); - kind = 2 /* PackedSpread */; - } - return createSpreadSegment(kind, expression); - } - function visitSpanOfNonSpreads(chunk, multiLine, hasTrailingComma) { - const expression = factory2.createArrayLiteralExpression( - visitNodes2(factory2.createNodeArray(chunk, hasTrailingComma), visitor, isExpression), - multiLine - ); - return createSpreadSegment(0 /* None */, expression); - } - function visitSpreadElement(node) { - return visitNode(node.expression, visitor, isExpression); - } - function visitTemplateLiteral(node) { - return setTextRange(factory2.createStringLiteral(node.text), node); - } - function visitStringLiteral(node) { - if (node.hasExtendedUnicodeEscape) { - return setTextRange(factory2.createStringLiteral(node.text), node); - } - return node; - } - function visitNumericLiteral(node) { - if (node.numericLiteralFlags & 384 /* BinaryOrOctalSpecifier */) { - return setTextRange(factory2.createNumericLiteral(node.text), node); - } - return node; - } - function visitTaggedTemplateExpression(node) { - return processTaggedTemplateExpression( - context, - node, - visitor, - currentSourceFile, - recordTaggedTemplateString, - 1 /* All */ - ); - } - function visitTemplateExpression(node) { - let expression = factory2.createStringLiteral(node.head.text); - for (const span of node.templateSpans) { - const args = [Debug.checkDefined(visitNode(span.expression, visitor, isExpression))]; - if (span.literal.text.length > 0) { - args.push(factory2.createStringLiteral(span.literal.text)); - } - expression = factory2.createCallExpression( - factory2.createPropertyAccessExpression(expression, "concat"), - /*typeArguments*/ - void 0, - args - ); - } - return setTextRange(expression, node); - } - function visitSuperKeyword(isExpressionOfCall) { - return hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), "prototype") : factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); - } - function visitMetaProperty(node) { - if (node.keywordToken === 105 /* NewKeyword */ && node.name.escapedText === "target") { - hierarchyFacts |= 32768 /* NewTarget */; - return factory2.createUniqueName("_newTarget", 16 /* Optimistic */ | 32 /* FileLevel */); - } - return node; - } - function onEmitNode(hint, node, emitCallback) { - if (enabledSubstitutions & 1 /* CapturedThis */ && isFunctionLike(node)) { - const ancestorFacts = enterSubtree( - 32670 /* FunctionExcludes */, - getEmitFlags(node) & 16 /* CapturesThis */ ? 65 /* FunctionIncludes */ | 16 /* CapturesThis */ : 65 /* FunctionIncludes */ - ); - previousOnEmitNode(hint, node, emitCallback); - exitSubtree(ancestorFacts, 0 /* None */, 0 /* None */); - return; - } - previousOnEmitNode(hint, node, emitCallback); - } - function enableSubstitutionsForBlockScopedBindings() { - if ((enabledSubstitutions & 2 /* BlockScopedBindings */) === 0) { - enabledSubstitutions |= 2 /* BlockScopedBindings */; - context.enableSubstitution(80 /* Identifier */); - } - } - function enableSubstitutionsForCapturedThis() { - if ((enabledSubstitutions & 1 /* CapturedThis */) === 0) { - enabledSubstitutions |= 1 /* CapturedThis */; - context.enableSubstitution(110 /* ThisKeyword */); - context.enableEmitNotification(176 /* Constructor */); - context.enableEmitNotification(174 /* MethodDeclaration */); - context.enableEmitNotification(177 /* GetAccessor */); - context.enableEmitNotification(178 /* SetAccessor */); - context.enableEmitNotification(219 /* ArrowFunction */); - context.enableEmitNotification(218 /* FunctionExpression */); - context.enableEmitNotification(262 /* FunctionDeclaration */); - } - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (hint === 1 /* Expression */) { - return substituteExpression(node); - } - if (isIdentifier(node)) { - return substituteIdentifier(node); - } - return node; - } - function substituteIdentifier(node) { - if (enabledSubstitutions & 2 /* BlockScopedBindings */ && !isInternalName(node)) { - const original = getParseTreeNode(node, isIdentifier); - if (original && isNameOfDeclarationWithCollidingName(original)) { - return setTextRange(factory2.getGeneratedNameForNode(original), node); - } - } - return node; - } - function isNameOfDeclarationWithCollidingName(node) { - switch (node.parent.kind) { - case 208 /* BindingElement */: - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 260 /* VariableDeclaration */: - return node.parent.name === node && resolver.isDeclarationWithCollidingName(node.parent); - } - return false; - } - function substituteExpression(node) { - switch (node.kind) { - case 80 /* Identifier */: - return substituteExpressionIdentifier(node); - case 110 /* ThisKeyword */: - return substituteThisKeyword(node); - } - return node; - } - function substituteExpressionIdentifier(node) { - if (enabledSubstitutions & 2 /* BlockScopedBindings */ && !isInternalName(node)) { - const declaration = resolver.getReferencedDeclarationWithCollidingName(node); - if (declaration && !(isClassLike(declaration) && isPartOfClassBody(declaration, node))) { - return setTextRange(factory2.getGeneratedNameForNode(getNameOfDeclaration(declaration)), node); - } - } - return node; - } - function isPartOfClassBody(declaration, node) { - let currentNode = getParseTreeNode(node); - if (!currentNode || currentNode === declaration || currentNode.end <= declaration.pos || currentNode.pos >= declaration.end) { - return false; - } - const blockScope = getEnclosingBlockScopeContainer(declaration); - while (currentNode) { - if (currentNode === blockScope || currentNode === declaration) { - return false; - } - if (isClassElement(currentNode) && currentNode.parent === declaration) { - return true; - } - currentNode = currentNode.parent; - } - return false; - } - function substituteThisKeyword(node) { - if (enabledSubstitutions & 1 /* CapturedThis */ && hierarchyFacts & 16 /* CapturesThis */) { - return setTextRange(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), node); - } - return node; - } - function getClassMemberPrefix(node, member) { - return isStatic(member) ? factory2.getInternalName(node) : factory2.createPropertyAccessExpression(factory2.getInternalName(node), "prototype"); - } - function hasSynthesizedDefaultSuperCall(constructor, hasExtendsClause) { - if (!constructor || !hasExtendsClause) { - return false; - } - if (some(constructor.parameters)) { - return false; - } - const statement = firstOrUndefined(constructor.body.statements); - if (!statement || !nodeIsSynthesized(statement) || statement.kind !== 244 /* ExpressionStatement */) { - return false; - } - const statementExpression = statement.expression; - if (!nodeIsSynthesized(statementExpression) || statementExpression.kind !== 213 /* CallExpression */) { - return false; - } - const callTarget = statementExpression.expression; - if (!nodeIsSynthesized(callTarget) || callTarget.kind !== 108 /* SuperKeyword */) { - return false; - } - const callArgument = singleOrUndefined(statementExpression.arguments); - if (!callArgument || !nodeIsSynthesized(callArgument) || callArgument.kind !== 230 /* SpreadElement */) { - return false; - } - const expression = callArgument.expression; - return isIdentifier(expression) && expression.escapedText === "arguments"; - } - } - var init_es2015 = __esm({ - "src/compiler/transformers/es2015.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/es5.ts - function transformES5(context) { - const { factory: factory2 } = context; - const compilerOptions = context.getCompilerOptions(); - let previousOnEmitNode; - let noSubstitution; - if (compilerOptions.jsx === 1 /* Preserve */ || compilerOptions.jsx === 3 /* ReactNative */) { - previousOnEmitNode = context.onEmitNode; - context.onEmitNode = onEmitNode; - context.enableEmitNotification(286 /* JsxOpeningElement */); - context.enableEmitNotification(287 /* JsxClosingElement */); - context.enableEmitNotification(285 /* JsxSelfClosingElement */); - noSubstitution = []; - } - const previousOnSubstituteNode = context.onSubstituteNode; - context.onSubstituteNode = onSubstituteNode; - context.enableSubstitution(211 /* PropertyAccessExpression */); - context.enableSubstitution(303 /* PropertyAssignment */); - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - return node; - } - function onEmitNode(hint, node, emitCallback) { - switch (node.kind) { - case 286 /* JsxOpeningElement */: - case 287 /* JsxClosingElement */: - case 285 /* JsxSelfClosingElement */: - const tagName = node.tagName; - noSubstitution[getOriginalNodeId(tagName)] = true; - break; - } - previousOnEmitNode(hint, node, emitCallback); - } - function onSubstituteNode(hint, node) { - if (node.id && noSubstitution && noSubstitution[node.id]) { - return previousOnSubstituteNode(hint, node); - } - node = previousOnSubstituteNode(hint, node); - if (isPropertyAccessExpression(node)) { - return substitutePropertyAccessExpression(node); - } else if (isPropertyAssignment(node)) { - return substitutePropertyAssignment(node); - } - return node; - } - function substitutePropertyAccessExpression(node) { - if (isPrivateIdentifier(node.name)) { - return node; - } - const literalName = trySubstituteReservedName(node.name); - if (literalName) { - return setTextRange(factory2.createElementAccessExpression(node.expression, literalName), node); - } - return node; - } - function substitutePropertyAssignment(node) { - const literalName = isIdentifier(node.name) && trySubstituteReservedName(node.name); - if (literalName) { - return factory2.updatePropertyAssignment(node, literalName, node.initializer); - } - return node; - } - function trySubstituteReservedName(name) { - const token = identifierToKeywordKind(name); - if (token !== void 0 && token >= 83 /* FirstReservedWord */ && token <= 118 /* LastReservedWord */) { - return setTextRange(factory2.createStringLiteralFromNode(name), name); - } - return void 0; - } - } - var init_es5 = __esm({ - "src/compiler/transformers/es5.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/generators.ts - function getInstructionName(instruction) { - switch (instruction) { - case 2 /* Return */: - return "return"; - case 3 /* Break */: - return "break"; - case 4 /* Yield */: - return "yield"; - case 5 /* YieldStar */: - return "yield*"; - case 7 /* Endfinally */: - return "endfinally"; - default: - return void 0; - } - } - function transformGenerators(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - resumeLexicalEnvironment, - endLexicalEnvironment, - hoistFunctionDeclaration, - hoistVariableDeclaration - } = context; - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); - const resolver = context.getEmitResolver(); - const previousOnSubstituteNode = context.onSubstituteNode; - context.onSubstituteNode = onSubstituteNode; - let renamedCatchVariables; - let renamedCatchVariableDeclarations; - let inGeneratorFunctionBody; - let inStatementContainingYield; - let blocks; - let blockOffsets; - let blockActions; - let blockStack; - let labelOffsets; - let labelExpressions; - let nextLabelId = 1; - let operations; - let operationArguments; - let operationLocations; - let state; - let blockIndex = 0; - let labelNumber = 0; - let labelNumbers; - let lastOperationWasAbrupt; - let lastOperationWasCompletion; - let clauses; - let statements; - let exceptionBlockStack; - let currentExceptionBlock; - let withBlockStack; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile || (node.transformFlags & 2048 /* ContainsGenerator */) === 0) { - return node; - } - const visited = visitEachChild(node, visitor, context); - addEmitHelpers(visited, context.readEmitHelpers()); - return visited; - } - function visitor(node) { - const transformFlags = node.transformFlags; - if (inStatementContainingYield) { - return visitJavaScriptInStatementContainingYield(node); - } else if (inGeneratorFunctionBody) { - return visitJavaScriptInGeneratorFunctionBody(node); - } else if (isFunctionLikeDeclaration(node) && node.asteriskToken) { - return visitGenerator(node); - } else if (transformFlags & 2048 /* ContainsGenerator */) { - return visitEachChild(node, visitor, context); - } else { - return node; - } - } - function visitJavaScriptInStatementContainingYield(node) { - switch (node.kind) { - case 246 /* DoStatement */: - return visitDoStatement(node); - case 247 /* WhileStatement */: - return visitWhileStatement(node); - case 255 /* SwitchStatement */: - return visitSwitchStatement(node); - case 256 /* LabeledStatement */: - return visitLabeledStatement(node); - default: - return visitJavaScriptInGeneratorFunctionBody(node); - } - } - function visitJavaScriptInGeneratorFunctionBody(node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: - return visitFunctionExpression(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return visitAccessorDeclaration(node); - case 243 /* VariableStatement */: - return visitVariableStatement(node); - case 248 /* ForStatement */: - return visitForStatement(node); - case 249 /* ForInStatement */: - return visitForInStatement(node); - case 252 /* BreakStatement */: - return visitBreakStatement(node); - case 251 /* ContinueStatement */: - return visitContinueStatement(node); - case 253 /* ReturnStatement */: - return visitReturnStatement(node); - default: - if (node.transformFlags & 1048576 /* ContainsYield */) { - return visitJavaScriptContainingYield(node); - } else if (node.transformFlags & (2048 /* ContainsGenerator */ | 4194304 /* ContainsHoistedDeclarationOrCompletion */)) { - return visitEachChild(node, visitor, context); - } else { - return node; - } - } - } - function visitJavaScriptContainingYield(node) { - switch (node.kind) { - case 226 /* BinaryExpression */: - return visitBinaryExpression(node); - case 361 /* CommaListExpression */: - return visitCommaListExpression(node); - case 227 /* ConditionalExpression */: - return visitConditionalExpression(node); - case 229 /* YieldExpression */: - return visitYieldExpression(node); - case 209 /* ArrayLiteralExpression */: - return visitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: - return visitObjectLiteralExpression(node); - case 212 /* ElementAccessExpression */: - return visitElementAccessExpression(node); - case 213 /* CallExpression */: - return visitCallExpression(node); - case 214 /* NewExpression */: - return visitNewExpression(node); - default: - return visitEachChild(node, visitor, context); - } - } - function visitGenerator(node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 218 /* FunctionExpression */: - return visitFunctionExpression(node); - default: - return Debug.failBadSyntaxKind(node); - } - } - function visitFunctionDeclaration(node) { - if (node.asteriskToken) { - node = setOriginalNode( - setTextRange( - factory2.createFunctionDeclaration( - node.modifiers, - /*asteriskToken*/ - void 0, - node.name, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - transformGeneratorFunctionBody(node.body) - ), - /*location*/ - node - ), - node - ); - } else { - const savedInGeneratorFunctionBody = inGeneratorFunctionBody; - const savedInStatementContainingYield = inStatementContainingYield; - inGeneratorFunctionBody = false; - inStatementContainingYield = false; - node = visitEachChild(node, visitor, context); - inGeneratorFunctionBody = savedInGeneratorFunctionBody; - inStatementContainingYield = savedInStatementContainingYield; - } - if (inGeneratorFunctionBody) { - hoistFunctionDeclaration(node); - return void 0; - } else { - return node; - } - } - function visitFunctionExpression(node) { - if (node.asteriskToken) { - node = setOriginalNode( - setTextRange( - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - node.name, - /*typeParameters*/ - void 0, - visitParameterList(node.parameters, visitor, context), - /*type*/ - void 0, - transformGeneratorFunctionBody(node.body) - ), - /*location*/ - node - ), - node - ); - } else { - const savedInGeneratorFunctionBody = inGeneratorFunctionBody; - const savedInStatementContainingYield = inStatementContainingYield; - inGeneratorFunctionBody = false; - inStatementContainingYield = false; - node = visitEachChild(node, visitor, context); - inGeneratorFunctionBody = savedInGeneratorFunctionBody; - inStatementContainingYield = savedInStatementContainingYield; - } - return node; - } - function visitAccessorDeclaration(node) { - const savedInGeneratorFunctionBody = inGeneratorFunctionBody; - const savedInStatementContainingYield = inStatementContainingYield; - inGeneratorFunctionBody = false; - inStatementContainingYield = false; - node = visitEachChild(node, visitor, context); - inGeneratorFunctionBody = savedInGeneratorFunctionBody; - inStatementContainingYield = savedInStatementContainingYield; - return node; - } - function transformGeneratorFunctionBody(body) { - const statements2 = []; - const savedInGeneratorFunctionBody = inGeneratorFunctionBody; - const savedInStatementContainingYield = inStatementContainingYield; - const savedBlocks = blocks; - const savedBlockOffsets = blockOffsets; - const savedBlockActions = blockActions; - const savedBlockStack = blockStack; - const savedLabelOffsets = labelOffsets; - const savedLabelExpressions = labelExpressions; - const savedNextLabelId = nextLabelId; - const savedOperations = operations; - const savedOperationArguments = operationArguments; - const savedOperationLocations = operationLocations; - const savedState = state; - inGeneratorFunctionBody = true; - inStatementContainingYield = false; - blocks = void 0; - blockOffsets = void 0; - blockActions = void 0; - blockStack = void 0; - labelOffsets = void 0; - labelExpressions = void 0; - nextLabelId = 1; - operations = void 0; - operationArguments = void 0; - operationLocations = void 0; - state = factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - resumeLexicalEnvironment(); - const statementOffset = factory2.copyPrologue( - body.statements, - statements2, - /*ensureUseStrict*/ - false, - visitor - ); - transformAndEmitStatements(body.statements, statementOffset); - const buildResult = build2(); - insertStatementsAfterStandardPrologue(statements2, endLexicalEnvironment()); - statements2.push(factory2.createReturnStatement(buildResult)); - inGeneratorFunctionBody = savedInGeneratorFunctionBody; - inStatementContainingYield = savedInStatementContainingYield; - blocks = savedBlocks; - blockOffsets = savedBlockOffsets; - blockActions = savedBlockActions; - blockStack = savedBlockStack; - labelOffsets = savedLabelOffsets; - labelExpressions = savedLabelExpressions; - nextLabelId = savedNextLabelId; - operations = savedOperations; - operationArguments = savedOperationArguments; - operationLocations = savedOperationLocations; - state = savedState; - return setTextRange(factory2.createBlock(statements2, body.multiLine), body); - } - function visitVariableStatement(node) { - if (node.transformFlags & 1048576 /* ContainsYield */) { - transformAndEmitVariableDeclarationList(node.declarationList); - return void 0; - } else { - if (getEmitFlags(node) & 2097152 /* CustomPrologue */) { - return node; - } - for (const variable of node.declarationList.declarations) { - hoistVariableDeclaration(variable.name); - } - const variables = getInitializedVariables(node.declarationList); - if (variables.length === 0) { - return void 0; - } - return setSourceMapRange( - factory2.createExpressionStatement( - factory2.inlineExpressions( - map(variables, transformInitializedVariable) - ) - ), - node - ); - } - } - function visitBinaryExpression(node) { - const assoc = getExpressionAssociativity(node); - switch (assoc) { - case 0 /* Left */: - return visitLeftAssociativeBinaryExpression(node); - case 1 /* Right */: - return visitRightAssociativeBinaryExpression(node); - default: - return Debug.assertNever(assoc); - } - } - function visitRightAssociativeBinaryExpression(node) { - const { left, right } = node; - if (containsYield(right)) { - let target; - switch (left.kind) { - case 211 /* PropertyAccessExpression */: - target = factory2.updatePropertyAccessExpression( - left, - cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), - left.name - ); - break; - case 212 /* ElementAccessExpression */: - target = factory2.updateElementAccessExpression( - left, - cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), - cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression))) - ); - break; - default: - target = Debug.checkDefined(visitNode(left, visitor, isExpression)); - break; - } - const operator = node.operatorToken.kind; - if (isCompoundAssignment(operator)) { - return setTextRange( - factory2.createAssignment( - target, - setTextRange( - factory2.createBinaryExpression( - cacheExpression(target), - getNonAssignmentOperatorForCompoundAssignment(operator), - Debug.checkDefined(visitNode(right, visitor, isExpression)) - ), - node - ) - ), - node - ); - } else { - return factory2.updateBinaryExpression(node, target, node.operatorToken, Debug.checkDefined(visitNode(right, visitor, isExpression))); - } - } - return visitEachChild(node, visitor, context); - } - function visitLeftAssociativeBinaryExpression(node) { - if (containsYield(node.right)) { - if (isLogicalOperator(node.operatorToken.kind)) { - return visitLogicalBinaryExpression(node); - } else if (node.operatorToken.kind === 28 /* CommaToken */) { - return visitCommaExpression(node); - } - return factory2.updateBinaryExpression( - node, - cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))), - node.operatorToken, - Debug.checkDefined(visitNode(node.right, visitor, isExpression)) - ); - } - return visitEachChild(node, visitor, context); - } - function visitCommaExpression(node) { - let pendingExpressions = []; - visit(node.left); - visit(node.right); - return factory2.inlineExpressions(pendingExpressions); - function visit(node2) { - if (isBinaryExpression(node2) && node2.operatorToken.kind === 28 /* CommaToken */) { - visit(node2.left); - visit(node2.right); - } else { - if (containsYield(node2) && pendingExpressions.length > 0) { - emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]); - pendingExpressions = []; - } - pendingExpressions.push(Debug.checkDefined(visitNode(node2, visitor, isExpression))); - } - } - } - function visitCommaListExpression(node) { - let pendingExpressions = []; - for (const elem of node.elements) { - if (isBinaryExpression(elem) && elem.operatorToken.kind === 28 /* CommaToken */) { - pendingExpressions.push(visitCommaExpression(elem)); - } else { - if (containsYield(elem) && pendingExpressions.length > 0) { - emitWorker(1 /* Statement */, [factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))]); - pendingExpressions = []; - } - pendingExpressions.push(Debug.checkDefined(visitNode(elem, visitor, isExpression))); - } - } - return factory2.inlineExpressions(pendingExpressions); - } - function visitLogicalBinaryExpression(node) { - const resultLabel = defineLabel(); - const resultLocal = declareLocal(); - emitAssignment( - resultLocal, - Debug.checkDefined(visitNode(node.left, visitor, isExpression)), - /*location*/ - node.left - ); - if (node.operatorToken.kind === 56 /* AmpersandAmpersandToken */) { - emitBreakWhenFalse( - resultLabel, - resultLocal, - /*location*/ - node.left - ); - } else { - emitBreakWhenTrue( - resultLabel, - resultLocal, - /*location*/ - node.left - ); - } - emitAssignment( - resultLocal, - Debug.checkDefined(visitNode(node.right, visitor, isExpression)), - /*location*/ - node.right - ); - markLabel(resultLabel); - return resultLocal; - } - function visitConditionalExpression(node) { - if (containsYield(node.whenTrue) || containsYield(node.whenFalse)) { - const whenFalseLabel = defineLabel(); - const resultLabel = defineLabel(); - const resultLocal = declareLocal(); - emitBreakWhenFalse( - whenFalseLabel, - Debug.checkDefined(visitNode(node.condition, visitor, isExpression)), - /*location*/ - node.condition - ); - emitAssignment( - resultLocal, - Debug.checkDefined(visitNode(node.whenTrue, visitor, isExpression)), - /*location*/ - node.whenTrue - ); - emitBreak(resultLabel); - markLabel(whenFalseLabel); - emitAssignment( - resultLocal, - Debug.checkDefined(visitNode(node.whenFalse, visitor, isExpression)), - /*location*/ - node.whenFalse - ); - markLabel(resultLabel); - return resultLocal; - } - return visitEachChild(node, visitor, context); - } - function visitYieldExpression(node) { - const resumeLabel = defineLabel(); - const expression = visitNode(node.expression, visitor, isExpression); - if (node.asteriskToken) { - const iterator = (getEmitFlags(node.expression) & 8388608 /* Iterator */) === 0 ? setTextRange(emitHelpers().createValuesHelper(expression), node) : expression; - emitYieldStar( - iterator, - /*location*/ - node - ); - } else { - emitYield( - expression, - /*location*/ - node - ); - } - markLabel(resumeLabel); - return createGeneratorResume( - /*location*/ - node - ); - } - function visitArrayLiteralExpression(node) { - return visitElements( - node.elements, - /*leadingElement*/ - void 0, - /*location*/ - void 0, - node.multiLine - ); - } - function visitElements(elements, leadingElement, location, multiLine) { - const numInitialElements = countInitialNodesWithoutYield(elements); - let temp; - if (numInitialElements > 0) { - temp = declareLocal(); - const initialElements = visitNodes2(elements, visitor, isExpression, 0, numInitialElements); - emitAssignment( - temp, - factory2.createArrayLiteralExpression( - leadingElement ? [leadingElement, ...initialElements] : initialElements - ) - ); - leadingElement = void 0; - } - const expressions = reduceLeft(elements, reduceElement, [], numInitialElements); - return temp ? factory2.createArrayConcatCall(temp, [factory2.createArrayLiteralExpression(expressions, multiLine)]) : setTextRange( - factory2.createArrayLiteralExpression(leadingElement ? [leadingElement, ...expressions] : expressions, multiLine), - location - ); - function reduceElement(expressions2, element) { - if (containsYield(element) && expressions2.length > 0) { - const hasAssignedTemp = temp !== void 0; - if (!temp) { - temp = declareLocal(); - } - emitAssignment( - temp, - hasAssignedTemp ? factory2.createArrayConcatCall( - temp, - [factory2.createArrayLiteralExpression(expressions2, multiLine)] - ) : factory2.createArrayLiteralExpression( - leadingElement ? [leadingElement, ...expressions2] : expressions2, - multiLine - ) - ); - leadingElement = void 0; - expressions2 = []; - } - expressions2.push(Debug.checkDefined(visitNode(element, visitor, isExpression))); - return expressions2; - } - } - function visitObjectLiteralExpression(node) { - const properties = node.properties; - const multiLine = node.multiLine; - const numInitialProperties = countInitialNodesWithoutYield(properties); - const temp = declareLocal(); - emitAssignment( - temp, - factory2.createObjectLiteralExpression( - visitNodes2(properties, visitor, isObjectLiteralElementLike, 0, numInitialProperties), - multiLine - ) - ); - const expressions = reduceLeft(properties, reduceProperty, [], numInitialProperties); - expressions.push(multiLine ? startOnNewLine(setParent(setTextRange(factory2.cloneNode(temp), temp), temp.parent)) : temp); - return factory2.inlineExpressions(expressions); - function reduceProperty(expressions2, property) { - if (containsYield(property) && expressions2.length > 0) { - emitStatement(factory2.createExpressionStatement(factory2.inlineExpressions(expressions2))); - expressions2 = []; - } - const expression = createExpressionForObjectLiteralElementLike(factory2, node, property, temp); - const visited = visitNode(expression, visitor, isExpression); - if (visited) { - if (multiLine) { - startOnNewLine(visited); - } - expressions2.push(visited); - } - return expressions2; - } - } - function visitElementAccessExpression(node) { - if (containsYield(node.argumentExpression)) { - return factory2.updateElementAccessExpression( - node, - cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))), - Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)) - ); - } - return visitEachChild(node, visitor, context); - } - function visitCallExpression(node) { - if (!isImportCall(node) && forEach(node.arguments, containsYield)) { - const { target, thisArg } = factory2.createCallBinding( - node.expression, - hoistVariableDeclaration, - languageVersion, - /*cacheIdentifiers*/ - true - ); - return setOriginalNode( - setTextRange( - factory2.createFunctionApplyCall( - cacheExpression(Debug.checkDefined(visitNode(target, visitor, isLeftHandSideExpression))), - thisArg, - visitElements(node.arguments) - ), - node - ), - node - ); - } - return visitEachChild(node, visitor, context); - } - function visitNewExpression(node) { - if (forEach(node.arguments, containsYield)) { - const { target, thisArg } = factory2.createCallBinding(factory2.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration); - return setOriginalNode( - setTextRange( - factory2.createNewExpression( - factory2.createFunctionApplyCall( - cacheExpression(Debug.checkDefined(visitNode(target, visitor, isExpression))), - thisArg, - visitElements( - node.arguments, - /*leadingElement*/ - factory2.createVoidZero() - ) - ), - /*typeArguments*/ - void 0, - [] - ), - node - ), - node - ); - } - return visitEachChild(node, visitor, context); - } - function transformAndEmitStatements(statements2, start = 0) { - const numStatements = statements2.length; - for (let i = start; i < numStatements; i++) { - transformAndEmitStatement(statements2[i]); - } - } - function transformAndEmitEmbeddedStatement(node) { - if (isBlock(node)) { - transformAndEmitStatements(node.statements); - } else { - transformAndEmitStatement(node); - } - } - function transformAndEmitStatement(node) { - const savedInStatementContainingYield = inStatementContainingYield; - if (!inStatementContainingYield) { - inStatementContainingYield = containsYield(node); - } - transformAndEmitStatementWorker(node); - inStatementContainingYield = savedInStatementContainingYield; - } - function transformAndEmitStatementWorker(node) { - switch (node.kind) { - case 241 /* Block */: - return transformAndEmitBlock(node); - case 244 /* ExpressionStatement */: - return transformAndEmitExpressionStatement(node); - case 245 /* IfStatement */: - return transformAndEmitIfStatement(node); - case 246 /* DoStatement */: - return transformAndEmitDoStatement(node); - case 247 /* WhileStatement */: - return transformAndEmitWhileStatement(node); - case 248 /* ForStatement */: - return transformAndEmitForStatement(node); - case 249 /* ForInStatement */: - return transformAndEmitForInStatement(node); - case 251 /* ContinueStatement */: - return transformAndEmitContinueStatement(node); - case 252 /* BreakStatement */: - return transformAndEmitBreakStatement(node); - case 253 /* ReturnStatement */: - return transformAndEmitReturnStatement(node); - case 254 /* WithStatement */: - return transformAndEmitWithStatement(node); - case 255 /* SwitchStatement */: - return transformAndEmitSwitchStatement(node); - case 256 /* LabeledStatement */: - return transformAndEmitLabeledStatement(node); - case 257 /* ThrowStatement */: - return transformAndEmitThrowStatement(node); - case 258 /* TryStatement */: - return transformAndEmitTryStatement(node); - default: - return emitStatement(visitNode(node, visitor, isStatement)); - } - } - function transformAndEmitBlock(node) { - if (containsYield(node)) { - transformAndEmitStatements(node.statements); - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } - function transformAndEmitExpressionStatement(node) { - emitStatement(visitNode(node, visitor, isStatement)); - } - function transformAndEmitVariableDeclarationList(node) { - for (const variable of node.declarations) { - const name = factory2.cloneNode(variable.name); - setCommentRange(name, variable.name); - hoistVariableDeclaration(name); - } - const variables = getInitializedVariables(node); - const numVariables = variables.length; - let variablesWritten = 0; - let pendingExpressions = []; - while (variablesWritten < numVariables) { - for (let i = variablesWritten; i < numVariables; i++) { - const variable = variables[i]; - if (containsYield(variable.initializer) && pendingExpressions.length > 0) { - break; - } - pendingExpressions.push(transformInitializedVariable(variable)); - } - if (pendingExpressions.length) { - emitStatement(factory2.createExpressionStatement(factory2.inlineExpressions(pendingExpressions))); - variablesWritten += pendingExpressions.length; - pendingExpressions = []; - } - } - return void 0; - } - function transformInitializedVariable(node) { - return setSourceMapRange( - factory2.createAssignment( - setSourceMapRange(factory2.cloneNode(node.name), node.name), - Debug.checkDefined(visitNode(node.initializer, visitor, isExpression)) - ), - node - ); - } - function transformAndEmitIfStatement(node) { - if (containsYield(node)) { - if (containsYield(node.thenStatement) || containsYield(node.elseStatement)) { - const endLabel = defineLabel(); - const elseLabel = node.elseStatement ? defineLabel() : void 0; - emitBreakWhenFalse( - node.elseStatement ? elseLabel : endLabel, - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - /*location*/ - node.expression - ); - transformAndEmitEmbeddedStatement(node.thenStatement); - if (node.elseStatement) { - emitBreak(endLabel); - markLabel(elseLabel); - transformAndEmitEmbeddedStatement(node.elseStatement); - } - markLabel(endLabel); - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } - function transformAndEmitDoStatement(node) { - if (containsYield(node)) { - const conditionLabel = defineLabel(); - const loopLabel = defineLabel(); - beginLoopBlock( - /*continueLabel*/ - conditionLabel - ); - markLabel(loopLabel); - transformAndEmitEmbeddedStatement(node.statement); - markLabel(conditionLabel); - emitBreakWhenTrue(loopLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))); - endLoopBlock(); - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } - function visitDoStatement(node) { - if (inStatementContainingYield) { - beginScriptLoopBlock(); - node = visitEachChild(node, visitor, context); - endLoopBlock(); - return node; - } else { - return visitEachChild(node, visitor, context); - } - } - function transformAndEmitWhileStatement(node) { - if (containsYield(node)) { - const loopLabel = defineLabel(); - const endLabel = beginLoopBlock(loopLabel); - markLabel(loopLabel); - emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))); - transformAndEmitEmbeddedStatement(node.statement); - emitBreak(loopLabel); - endLoopBlock(); - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } - function visitWhileStatement(node) { - if (inStatementContainingYield) { - beginScriptLoopBlock(); - node = visitEachChild(node, visitor, context); - endLoopBlock(); - return node; - } else { - return visitEachChild(node, visitor, context); - } - } - function transformAndEmitForStatement(node) { - if (containsYield(node)) { - const conditionLabel = defineLabel(); - const incrementLabel = defineLabel(); - const endLabel = beginLoopBlock(incrementLabel); - if (node.initializer) { - const initializer = node.initializer; - if (isVariableDeclarationList(initializer)) { - transformAndEmitVariableDeclarationList(initializer); - } else { - emitStatement( - setTextRange( - factory2.createExpressionStatement( - Debug.checkDefined(visitNode(initializer, visitor, isExpression)) - ), - initializer - ) - ); - } - } - markLabel(conditionLabel); - if (node.condition) { - emitBreakWhenFalse(endLabel, Debug.checkDefined(visitNode(node.condition, visitor, isExpression))); - } - transformAndEmitEmbeddedStatement(node.statement); - markLabel(incrementLabel); - if (node.incrementor) { - emitStatement( - setTextRange( - factory2.createExpressionStatement( - Debug.checkDefined(visitNode(node.incrementor, visitor, isExpression)) - ), - node.incrementor - ) - ); - } - emitBreak(conditionLabel); - endLoopBlock(); - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } - function visitForStatement(node) { - if (inStatementContainingYield) { - beginScriptLoopBlock(); - } - const initializer = node.initializer; - if (initializer && isVariableDeclarationList(initializer)) { - for (const variable of initializer.declarations) { - hoistVariableDeclaration(variable.name); - } - const variables = getInitializedVariables(initializer); - node = factory2.updateForStatement( - node, - variables.length > 0 ? factory2.inlineExpressions(map(variables, transformInitializedVariable)) : void 0, - visitNode(node.condition, visitor, isExpression), - visitNode(node.incrementor, visitor, isExpression), - visitIterationBody(node.statement, visitor, context) - ); - } else { - node = visitEachChild(node, visitor, context); - } - if (inStatementContainingYield) { - endLoopBlock(); - } - return node; - } - function transformAndEmitForInStatement(node) { - if (containsYield(node)) { - const obj = declareLocal(); - const keysArray = declareLocal(); - const key = declareLocal(); - const keysIndex = factory2.createLoopVariable(); - const initializer = node.initializer; - hoistVariableDeclaration(keysIndex); - emitAssignment(obj, Debug.checkDefined(visitNode(node.expression, visitor, isExpression))); - emitAssignment(keysArray, factory2.createArrayLiteralExpression()); - emitStatement( - factory2.createForInStatement( - key, - obj, - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createPropertyAccessExpression(keysArray, "push"), - /*typeArguments*/ - void 0, - [key] - ) - ) - ) - ); - emitAssignment(keysIndex, factory2.createNumericLiteral(0)); - const conditionLabel = defineLabel(); - const incrementLabel = defineLabel(); - const endLoopLabel = beginLoopBlock(incrementLabel); - markLabel(conditionLabel); - emitBreakWhenFalse(endLoopLabel, factory2.createLessThan(keysIndex, factory2.createPropertyAccessExpression(keysArray, "length"))); - emitAssignment(key, factory2.createElementAccessExpression(keysArray, keysIndex)); - emitBreakWhenFalse(incrementLabel, factory2.createBinaryExpression(key, 103 /* InKeyword */, obj)); - let variable; - if (isVariableDeclarationList(initializer)) { - for (const variable2 of initializer.declarations) { - hoistVariableDeclaration(variable2.name); - } - variable = factory2.cloneNode(initializer.declarations[0].name); - } else { - variable = Debug.checkDefined(visitNode(initializer, visitor, isExpression)); - Debug.assert(isLeftHandSideExpression(variable)); - } - emitAssignment(variable, key); - transformAndEmitEmbeddedStatement(node.statement); - markLabel(incrementLabel); - emitStatement(factory2.createExpressionStatement(factory2.createPostfixIncrement(keysIndex))); - emitBreak(conditionLabel); - endLoopBlock(); - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } - function visitForInStatement(node) { - if (inStatementContainingYield) { - beginScriptLoopBlock(); - } - const initializer = node.initializer; - if (isVariableDeclarationList(initializer)) { - for (const variable of initializer.declarations) { - hoistVariableDeclaration(variable.name); - } - node = factory2.updateForInStatement( - node, - initializer.declarations[0].name, - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)) - ); - } else { - node = visitEachChild(node, visitor, context); - } - if (inStatementContainingYield) { - endLoopBlock(); - } - return node; - } - function transformAndEmitContinueStatement(node) { - const label = findContinueTarget(node.label ? idText(node.label) : void 0); - if (label > 0) { - emitBreak( - label, - /*location*/ - node - ); - } else { - emitStatement(node); - } - } - function visitContinueStatement(node) { - if (inStatementContainingYield) { - const label = findContinueTarget(node.label && idText(node.label)); - if (label > 0) { - return createInlineBreak( - label, - /*location*/ - node - ); - } - } - return visitEachChild(node, visitor, context); - } - function transformAndEmitBreakStatement(node) { - const label = findBreakTarget(node.label ? idText(node.label) : void 0); - if (label > 0) { - emitBreak( - label, - /*location*/ - node - ); - } else { - emitStatement(node); - } - } - function visitBreakStatement(node) { - if (inStatementContainingYield) { - const label = findBreakTarget(node.label && idText(node.label)); - if (label > 0) { - return createInlineBreak( - label, - /*location*/ - node - ); - } - } - return visitEachChild(node, visitor, context); - } - function transformAndEmitReturnStatement(node) { - emitReturn( - visitNode(node.expression, visitor, isExpression), - /*location*/ - node - ); - } - function visitReturnStatement(node) { - return createInlineReturn( - visitNode(node.expression, visitor, isExpression), - /*location*/ - node - ); - } - function transformAndEmitWithStatement(node) { - if (containsYield(node)) { - beginWithBlock(cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression)))); - transformAndEmitEmbeddedStatement(node.statement); - endWithBlock(); - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } - function transformAndEmitSwitchStatement(node) { - if (containsYield(node.caseBlock)) { - const caseBlock = node.caseBlock; - const numClauses = caseBlock.clauses.length; - const endLabel = beginSwitchBlock(); - const expression = cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))); - const clauseLabels = []; - let defaultClauseIndex = -1; - for (let i = 0; i < numClauses; i++) { - const clause = caseBlock.clauses[i]; - clauseLabels.push(defineLabel()); - if (clause.kind === 297 /* DefaultClause */ && defaultClauseIndex === -1) { - defaultClauseIndex = i; - } - } - let clausesWritten = 0; - let pendingClauses = []; - while (clausesWritten < numClauses) { - let defaultClausesSkipped = 0; - for (let i = clausesWritten; i < numClauses; i++) { - const clause = caseBlock.clauses[i]; - if (clause.kind === 296 /* CaseClause */) { - if (containsYield(clause.expression) && pendingClauses.length > 0) { - break; - } - pendingClauses.push( - factory2.createCaseClause( - Debug.checkDefined(visitNode(clause.expression, visitor, isExpression)), - [ - createInlineBreak( - clauseLabels[i], - /*location*/ - clause.expression - ) - ] - ) - ); - } else { - defaultClausesSkipped++; - } - } - if (pendingClauses.length) { - emitStatement(factory2.createSwitchStatement(expression, factory2.createCaseBlock(pendingClauses))); - clausesWritten += pendingClauses.length; - pendingClauses = []; - } - if (defaultClausesSkipped > 0) { - clausesWritten += defaultClausesSkipped; - defaultClausesSkipped = 0; - } - } - if (defaultClauseIndex >= 0) { - emitBreak(clauseLabels[defaultClauseIndex]); - } else { - emitBreak(endLabel); - } - for (let i = 0; i < numClauses; i++) { - markLabel(clauseLabels[i]); - transformAndEmitStatements(caseBlock.clauses[i].statements); - } - endSwitchBlock(); - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } - function visitSwitchStatement(node) { - if (inStatementContainingYield) { - beginScriptSwitchBlock(); - } - node = visitEachChild(node, visitor, context); - if (inStatementContainingYield) { - endSwitchBlock(); - } - return node; - } - function transformAndEmitLabeledStatement(node) { - if (containsYield(node)) { - beginLabeledBlock(idText(node.label)); - transformAndEmitEmbeddedStatement(node.statement); - endLabeledBlock(); - } else { - emitStatement(visitNode(node, visitor, isStatement)); - } - } - function visitLabeledStatement(node) { - if (inStatementContainingYield) { - beginScriptLabeledBlock(idText(node.label)); - } - node = visitEachChild(node, visitor, context); - if (inStatementContainingYield) { - endLabeledBlock(); - } - return node; - } - function transformAndEmitThrowStatement(node) { - emitThrow( - Debug.checkDefined(visitNode(node.expression ?? factory2.createVoidZero(), visitor, isExpression)), - /*location*/ - node - ); - } - function transformAndEmitTryStatement(node) { - if (containsYield(node)) { - beginExceptionBlock(); - transformAndEmitEmbeddedStatement(node.tryBlock); - if (node.catchClause) { - beginCatchBlock(node.catchClause.variableDeclaration); - transformAndEmitEmbeddedStatement(node.catchClause.block); - } - if (node.finallyBlock) { - beginFinallyBlock(); - transformAndEmitEmbeddedStatement(node.finallyBlock); - } - endExceptionBlock(); - } else { - emitStatement(visitEachChild(node, visitor, context)); - } - } - function containsYield(node) { - return !!node && (node.transformFlags & 1048576 /* ContainsYield */) !== 0; - } - function countInitialNodesWithoutYield(nodes) { - const numNodes = nodes.length; - for (let i = 0; i < numNodes; i++) { - if (containsYield(nodes[i])) { - return i; - } - } - return -1; - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (hint === 1 /* Expression */) { - return substituteExpression(node); - } - return node; - } - function substituteExpression(node) { - if (isIdentifier(node)) { - return substituteExpressionIdentifier(node); - } - return node; - } - function substituteExpressionIdentifier(node) { - if (!isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(idText(node))) { - const original = getOriginalNode(node); - if (isIdentifier(original) && original.parent) { - const declaration = resolver.getReferencedValueDeclaration(original); - if (declaration) { - const name = renamedCatchVariableDeclarations[getOriginalNodeId(declaration)]; - if (name) { - const clone2 = setParent(setTextRange(factory2.cloneNode(name), name), name.parent); - setSourceMapRange(clone2, node); - setCommentRange(clone2, node); - return clone2; - } - } - } - } - return node; - } - function cacheExpression(node) { - if (isGeneratedIdentifier(node) || getEmitFlags(node) & 8192 /* HelperName */) { - return node; - } - const temp = factory2.createTempVariable(hoistVariableDeclaration); - emitAssignment( - temp, - node, - /*location*/ - node - ); - return temp; - } - function declareLocal(name) { - const temp = name ? factory2.createUniqueName(name) : factory2.createTempVariable( - /*recordTempVariable*/ - void 0 - ); - hoistVariableDeclaration(temp); - return temp; - } - function defineLabel() { - if (!labelOffsets) { - labelOffsets = []; - } - const label = nextLabelId; - nextLabelId++; - labelOffsets[label] = -1; - return label; - } - function markLabel(label) { - Debug.assert(labelOffsets !== void 0, "No labels were defined."); - labelOffsets[label] = operations ? operations.length : 0; - } - function beginBlock(block) { - if (!blocks) { - blocks = []; - blockActions = []; - blockOffsets = []; - blockStack = []; - } - const index = blockActions.length; - blockActions[index] = 0 /* Open */; - blockOffsets[index] = operations ? operations.length : 0; - blocks[index] = block; - blockStack.push(block); - return index; - } - function endBlock() { - const block = peekBlock(); - if (block === void 0) - return Debug.fail("beginBlock was never called."); - const index = blockActions.length; - blockActions[index] = 1 /* Close */; - blockOffsets[index] = operations ? operations.length : 0; - blocks[index] = block; - blockStack.pop(); - return block; - } - function peekBlock() { - return lastOrUndefined(blockStack); - } - function peekBlockKind() { - const block = peekBlock(); - return block && block.kind; - } - function beginWithBlock(expression) { - const startLabel = defineLabel(); - const endLabel = defineLabel(); - markLabel(startLabel); - beginBlock({ - kind: 1 /* With */, - expression, - startLabel, - endLabel - }); - } - function endWithBlock() { - Debug.assert(peekBlockKind() === 1 /* With */); - const block = endBlock(); - markLabel(block.endLabel); - } - function beginExceptionBlock() { - const startLabel = defineLabel(); - const endLabel = defineLabel(); - markLabel(startLabel); - beginBlock({ - kind: 0 /* Exception */, - state: 0 /* Try */, - startLabel, - endLabel - }); - emitNop(); - return endLabel; - } - function beginCatchBlock(variable) { - Debug.assert(peekBlockKind() === 0 /* Exception */); - let name; - if (isGeneratedIdentifier(variable.name)) { - name = variable.name; - hoistVariableDeclaration(variable.name); - } else { - const text = idText(variable.name); - name = declareLocal(text); - if (!renamedCatchVariables) { - renamedCatchVariables = /* @__PURE__ */ new Map(); - renamedCatchVariableDeclarations = []; - context.enableSubstitution(80 /* Identifier */); - } - renamedCatchVariables.set(text, true); - renamedCatchVariableDeclarations[getOriginalNodeId(variable)] = name; - } - const exception = peekBlock(); - Debug.assert(exception.state < 1 /* Catch */); - const endLabel = exception.endLabel; - emitBreak(endLabel); - const catchLabel = defineLabel(); - markLabel(catchLabel); - exception.state = 1 /* Catch */; - exception.catchVariable = name; - exception.catchLabel = catchLabel; - emitAssignment(name, factory2.createCallExpression( - factory2.createPropertyAccessExpression(state, "sent"), - /*typeArguments*/ - void 0, - [] - )); - emitNop(); - } - function beginFinallyBlock() { - Debug.assert(peekBlockKind() === 0 /* Exception */); - const exception = peekBlock(); - Debug.assert(exception.state < 2 /* Finally */); - const endLabel = exception.endLabel; - emitBreak(endLabel); - const finallyLabel = defineLabel(); - markLabel(finallyLabel); - exception.state = 2 /* Finally */; - exception.finallyLabel = finallyLabel; - } - function endExceptionBlock() { - Debug.assert(peekBlockKind() === 0 /* Exception */); - const exception = endBlock(); - const state2 = exception.state; - if (state2 < 2 /* Finally */) { - emitBreak(exception.endLabel); - } else { - emitEndfinally(); - } - markLabel(exception.endLabel); - emitNop(); - exception.state = 3 /* Done */; - } - function beginScriptLoopBlock() { - beginBlock({ - kind: 3 /* Loop */, - isScript: true, - breakLabel: -1, - continueLabel: -1 - }); - } - function beginLoopBlock(continueLabel) { - const breakLabel = defineLabel(); - beginBlock({ - kind: 3 /* Loop */, - isScript: false, - breakLabel, - continueLabel - }); - return breakLabel; - } - function endLoopBlock() { - Debug.assert(peekBlockKind() === 3 /* Loop */); - const block = endBlock(); - const breakLabel = block.breakLabel; - if (!block.isScript) { - markLabel(breakLabel); - } - } - function beginScriptSwitchBlock() { - beginBlock({ - kind: 2 /* Switch */, - isScript: true, - breakLabel: -1 - }); - } - function beginSwitchBlock() { - const breakLabel = defineLabel(); - beginBlock({ - kind: 2 /* Switch */, - isScript: false, - breakLabel - }); - return breakLabel; - } - function endSwitchBlock() { - Debug.assert(peekBlockKind() === 2 /* Switch */); - const block = endBlock(); - const breakLabel = block.breakLabel; - if (!block.isScript) { - markLabel(breakLabel); - } - } - function beginScriptLabeledBlock(labelText) { - beginBlock({ - kind: 4 /* Labeled */, - isScript: true, - labelText, - breakLabel: -1 - }); - } - function beginLabeledBlock(labelText) { - const breakLabel = defineLabel(); - beginBlock({ - kind: 4 /* Labeled */, - isScript: false, - labelText, - breakLabel - }); - } - function endLabeledBlock() { - Debug.assert(peekBlockKind() === 4 /* Labeled */); - const block = endBlock(); - if (!block.isScript) { - markLabel(block.breakLabel); - } - } - function supportsUnlabeledBreak(block) { - return block.kind === 2 /* Switch */ || block.kind === 3 /* Loop */; - } - function supportsLabeledBreakOrContinue(block) { - return block.kind === 4 /* Labeled */; - } - function supportsUnlabeledContinue(block) { - return block.kind === 3 /* Loop */; - } - function hasImmediateContainingLabeledBlock(labelText, start) { - for (let j = start; j >= 0; j--) { - const containingBlock = blockStack[j]; - if (supportsLabeledBreakOrContinue(containingBlock)) { - if (containingBlock.labelText === labelText) { - return true; - } - } else { - break; - } - } - return false; - } - function findBreakTarget(labelText) { - if (blockStack) { - if (labelText) { - for (let i = blockStack.length - 1; i >= 0; i--) { - const block = blockStack[i]; - if (supportsLabeledBreakOrContinue(block) && block.labelText === labelText) { - return block.breakLabel; - } else if (supportsUnlabeledBreak(block) && hasImmediateContainingLabeledBlock(labelText, i - 1)) { - return block.breakLabel; - } - } - } else { - for (let i = blockStack.length - 1; i >= 0; i--) { - const block = blockStack[i]; - if (supportsUnlabeledBreak(block)) { - return block.breakLabel; - } - } - } - } - return 0; - } - function findContinueTarget(labelText) { - if (blockStack) { - if (labelText) { - for (let i = blockStack.length - 1; i >= 0; i--) { - const block = blockStack[i]; - if (supportsUnlabeledContinue(block) && hasImmediateContainingLabeledBlock(labelText, i - 1)) { - return block.continueLabel; - } - } - } else { - for (let i = blockStack.length - 1; i >= 0; i--) { - const block = blockStack[i]; - if (supportsUnlabeledContinue(block)) { - return block.continueLabel; - } - } - } - } - return 0; - } - function createLabel(label) { - if (label !== void 0 && label > 0) { - if (labelExpressions === void 0) { - labelExpressions = []; - } - const expression = factory2.createNumericLiteral(-1); - if (labelExpressions[label] === void 0) { - labelExpressions[label] = [expression]; - } else { - labelExpressions[label].push(expression); - } - return expression; - } - return factory2.createOmittedExpression(); - } - function createInstruction(instruction) { - const literal = factory2.createNumericLiteral(instruction); - addSyntheticTrailingComment(literal, 3 /* MultiLineCommentTrivia */, getInstructionName(instruction)); - return literal; - } - function createInlineBreak(label, location) { - Debug.assertLessThan(0, label, "Invalid label"); - return setTextRange( - factory2.createReturnStatement( - factory2.createArrayLiteralExpression([ - createInstruction(3 /* Break */), - createLabel(label) - ]) - ), - location - ); - } - function createInlineReturn(expression, location) { - return setTextRange( - factory2.createReturnStatement( - factory2.createArrayLiteralExpression( - expression ? [createInstruction(2 /* Return */), expression] : [createInstruction(2 /* Return */)] - ) - ), - location - ); - } - function createGeneratorResume(location) { - return setTextRange( - factory2.createCallExpression( - factory2.createPropertyAccessExpression(state, "sent"), - /*typeArguments*/ - void 0, - [] - ), - location - ); - } - function emitNop() { - emitWorker(0 /* Nop */); - } - function emitStatement(node) { - if (node) { - emitWorker(1 /* Statement */, [node]); - } else { - emitNop(); - } - } - function emitAssignment(left, right, location) { - emitWorker(2 /* Assign */, [left, right], location); - } - function emitBreak(label, location) { - emitWorker(3 /* Break */, [label], location); - } - function emitBreakWhenTrue(label, condition, location) { - emitWorker(4 /* BreakWhenTrue */, [label, condition], location); - } - function emitBreakWhenFalse(label, condition, location) { - emitWorker(5 /* BreakWhenFalse */, [label, condition], location); - } - function emitYieldStar(expression, location) { - emitWorker(7 /* YieldStar */, [expression], location); - } - function emitYield(expression, location) { - emitWorker(6 /* Yield */, [expression], location); - } - function emitReturn(expression, location) { - emitWorker(8 /* Return */, [expression], location); - } - function emitThrow(expression, location) { - emitWorker(9 /* Throw */, [expression], location); - } - function emitEndfinally() { - emitWorker(10 /* Endfinally */); - } - function emitWorker(code, args, location) { - if (operations === void 0) { - operations = []; - operationArguments = []; - operationLocations = []; - } - if (labelOffsets === void 0) { - markLabel(defineLabel()); - } - const operationIndex = operations.length; - operations[operationIndex] = code; - operationArguments[operationIndex] = args; - operationLocations[operationIndex] = location; - } - function build2() { - blockIndex = 0; - labelNumber = 0; - labelNumbers = void 0; - lastOperationWasAbrupt = false; - lastOperationWasCompletion = false; - clauses = void 0; - statements = void 0; - exceptionBlockStack = void 0; - currentExceptionBlock = void 0; - withBlockStack = void 0; - const buildResult = buildStatements(); - return emitHelpers().createGeneratorHelper( - setEmitFlags( - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - state - )], - /*type*/ - void 0, - factory2.createBlock( - buildResult, - /*multiLine*/ - buildResult.length > 0 - ) - ), - 1048576 /* ReuseTempVariableScope */ - ) - ); - } - function buildStatements() { - if (operations) { - for (let operationIndex = 0; operationIndex < operations.length; operationIndex++) { - writeOperation(operationIndex); - } - flushFinalLabel(operations.length); - } else { - flushFinalLabel(0); - } - if (clauses) { - const labelExpression = factory2.createPropertyAccessExpression(state, "label"); - const switchStatement = factory2.createSwitchStatement(labelExpression, factory2.createCaseBlock(clauses)); - return [startOnNewLine(switchStatement)]; - } - if (statements) { - return statements; - } - return []; - } - function flushLabel() { - if (!statements) { - return; - } - appendLabel( - /*markLabelEnd*/ - !lastOperationWasAbrupt - ); - lastOperationWasAbrupt = false; - lastOperationWasCompletion = false; - labelNumber++; - } - function flushFinalLabel(operationIndex) { - if (isFinalLabelReachable(operationIndex)) { - tryEnterLabel(operationIndex); - withBlockStack = void 0; - writeReturn( - /*expression*/ - void 0, - /*operationLocation*/ - void 0 - ); - } - if (statements && clauses) { - appendLabel( - /*markLabelEnd*/ - false - ); - } - updateLabelExpressions(); - } - function isFinalLabelReachable(operationIndex) { - if (!lastOperationWasCompletion) { - return true; - } - if (!labelOffsets || !labelExpressions) { - return false; - } - for (let label = 0; label < labelOffsets.length; label++) { - if (labelOffsets[label] === operationIndex && labelExpressions[label]) { - return true; - } - } - return false; - } - function appendLabel(markLabelEnd) { - if (!clauses) { - clauses = []; - } - if (statements) { - if (withBlockStack) { - for (let i = withBlockStack.length - 1; i >= 0; i--) { - const withBlock = withBlockStack[i]; - statements = [factory2.createWithStatement(withBlock.expression, factory2.createBlock(statements))]; - } - } - if (currentExceptionBlock) { - const { startLabel, catchLabel, finallyLabel, endLabel } = currentExceptionBlock; - statements.unshift( - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createPropertyAccessExpression(factory2.createPropertyAccessExpression(state, "trys"), "push"), - /*typeArguments*/ - void 0, - [ - factory2.createArrayLiteralExpression([ - createLabel(startLabel), - createLabel(catchLabel), - createLabel(finallyLabel), - createLabel(endLabel) - ]) - ] - ) - ) - ); - currentExceptionBlock = void 0; - } - if (markLabelEnd) { - statements.push( - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.createPropertyAccessExpression(state, "label"), - factory2.createNumericLiteral(labelNumber + 1) - ) - ) - ); - } - } - clauses.push( - factory2.createCaseClause( - factory2.createNumericLiteral(labelNumber), - statements || [] - ) - ); - statements = void 0; - } - function tryEnterLabel(operationIndex) { - if (!labelOffsets) { - return; - } - for (let label = 0; label < labelOffsets.length; label++) { - if (labelOffsets[label] === operationIndex) { - flushLabel(); - if (labelNumbers === void 0) { - labelNumbers = []; - } - if (labelNumbers[labelNumber] === void 0) { - labelNumbers[labelNumber] = [label]; - } else { - labelNumbers[labelNumber].push(label); - } - } - } - } - function updateLabelExpressions() { - if (labelExpressions !== void 0 && labelNumbers !== void 0) { - for (let labelNumber2 = 0; labelNumber2 < labelNumbers.length; labelNumber2++) { - const labels = labelNumbers[labelNumber2]; - if (labels !== void 0) { - for (const label of labels) { - const expressions = labelExpressions[label]; - if (expressions !== void 0) { - for (const expression of expressions) { - expression.text = String(labelNumber2); - } - } - } - } - } - } - } - function tryEnterOrLeaveBlock(operationIndex) { - if (blocks) { - for (; blockIndex < blockActions.length && blockOffsets[blockIndex] <= operationIndex; blockIndex++) { - const block = blocks[blockIndex]; - const blockAction = blockActions[blockIndex]; - switch (block.kind) { - case 0 /* Exception */: - if (blockAction === 0 /* Open */) { - if (!exceptionBlockStack) { - exceptionBlockStack = []; - } - if (!statements) { - statements = []; - } - exceptionBlockStack.push(currentExceptionBlock); - currentExceptionBlock = block; - } else if (blockAction === 1 /* Close */) { - currentExceptionBlock = exceptionBlockStack.pop(); - } - break; - case 1 /* With */: - if (blockAction === 0 /* Open */) { - if (!withBlockStack) { - withBlockStack = []; - } - withBlockStack.push(block); - } else if (blockAction === 1 /* Close */) { - withBlockStack.pop(); - } - break; - } - } - } - } - function writeOperation(operationIndex) { - tryEnterLabel(operationIndex); - tryEnterOrLeaveBlock(operationIndex); - if (lastOperationWasAbrupt) { - return; - } - lastOperationWasAbrupt = false; - lastOperationWasCompletion = false; - const opcode = operations[operationIndex]; - if (opcode === 0 /* Nop */) { - return; - } else if (opcode === 10 /* Endfinally */) { - return writeEndfinally(); - } - const args = operationArguments[operationIndex]; - if (opcode === 1 /* Statement */) { - return writeStatement(args[0]); - } - const location = operationLocations[operationIndex]; - switch (opcode) { - case 2 /* Assign */: - return writeAssign(args[0], args[1], location); - case 3 /* Break */: - return writeBreak(args[0], location); - case 4 /* BreakWhenTrue */: - return writeBreakWhenTrue(args[0], args[1], location); - case 5 /* BreakWhenFalse */: - return writeBreakWhenFalse(args[0], args[1], location); - case 6 /* Yield */: - return writeYield(args[0], location); - case 7 /* YieldStar */: - return writeYieldStar(args[0], location); - case 8 /* Return */: - return writeReturn(args[0], location); - case 9 /* Throw */: - return writeThrow(args[0], location); - } - } - function writeStatement(statement) { - if (statement) { - if (!statements) { - statements = [statement]; - } else { - statements.push(statement); - } - } - } - function writeAssign(left, right, operationLocation) { - writeStatement(setTextRange(factory2.createExpressionStatement(factory2.createAssignment(left, right)), operationLocation)); - } - function writeThrow(expression, operationLocation) { - lastOperationWasAbrupt = true; - lastOperationWasCompletion = true; - writeStatement(setTextRange(factory2.createThrowStatement(expression), operationLocation)); - } - function writeReturn(expression, operationLocation) { - lastOperationWasAbrupt = true; - lastOperationWasCompletion = true; - writeStatement( - setEmitFlags( - setTextRange( - factory2.createReturnStatement( - factory2.createArrayLiteralExpression( - expression ? [createInstruction(2 /* Return */), expression] : [createInstruction(2 /* Return */)] - ) - ), - operationLocation - ), - 768 /* NoTokenSourceMaps */ - ) - ); - } - function writeBreak(label, operationLocation) { - lastOperationWasAbrupt = true; - writeStatement( - setEmitFlags( - setTextRange( - factory2.createReturnStatement( - factory2.createArrayLiteralExpression([ - createInstruction(3 /* Break */), - createLabel(label) - ]) - ), - operationLocation - ), - 768 /* NoTokenSourceMaps */ - ) - ); - } - function writeBreakWhenTrue(label, condition, operationLocation) { - writeStatement( - setEmitFlags( - factory2.createIfStatement( - condition, - setEmitFlags( - setTextRange( - factory2.createReturnStatement( - factory2.createArrayLiteralExpression([ - createInstruction(3 /* Break */), - createLabel(label) - ]) - ), - operationLocation - ), - 768 /* NoTokenSourceMaps */ - ) - ), - 1 /* SingleLine */ - ) - ); - } - function writeBreakWhenFalse(label, condition, operationLocation) { - writeStatement( - setEmitFlags( - factory2.createIfStatement( - factory2.createLogicalNot(condition), - setEmitFlags( - setTextRange( - factory2.createReturnStatement( - factory2.createArrayLiteralExpression([ - createInstruction(3 /* Break */), - createLabel(label) - ]) - ), - operationLocation - ), - 768 /* NoTokenSourceMaps */ - ) - ), - 1 /* SingleLine */ - ) - ); - } - function writeYield(expression, operationLocation) { - lastOperationWasAbrupt = true; - writeStatement( - setEmitFlags( - setTextRange( - factory2.createReturnStatement( - factory2.createArrayLiteralExpression( - expression ? [createInstruction(4 /* Yield */), expression] : [createInstruction(4 /* Yield */)] - ) - ), - operationLocation - ), - 768 /* NoTokenSourceMaps */ - ) - ); - } - function writeYieldStar(expression, operationLocation) { - lastOperationWasAbrupt = true; - writeStatement( - setEmitFlags( - setTextRange( - factory2.createReturnStatement( - factory2.createArrayLiteralExpression([ - createInstruction(5 /* YieldStar */), - expression - ]) - ), - operationLocation - ), - 768 /* NoTokenSourceMaps */ - ) - ); - } - function writeEndfinally() { - lastOperationWasAbrupt = true; - writeStatement( - factory2.createReturnStatement( - factory2.createArrayLiteralExpression([ - createInstruction(7 /* Endfinally */) - ]) - ) - ); - } - } - var init_generators = __esm({ - "src/compiler/transformers/generators.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/module/module.ts - function transformModule(context) { - function getTransformModuleDelegate(moduleKind2) { - switch (moduleKind2) { - case 2 /* AMD */: - return transformAMDModule; - case 3 /* UMD */: - return transformUMDModule; - default: - return transformCommonJSModule; - } - } - const { - factory: factory2, - getEmitHelperFactory: emitHelpers, - startLexicalEnvironment, - endLexicalEnvironment, - hoistVariableDeclaration - } = context; - const compilerOptions = context.getCompilerOptions(); - const resolver = context.getEmitResolver(); - const host = context.getEmitHost(); - const languageVersion = getEmitScriptTarget(compilerOptions); - const moduleKind = getEmitModuleKind(compilerOptions); - const previousOnSubstituteNode = context.onSubstituteNode; - const previousOnEmitNode = context.onEmitNode; - context.onSubstituteNode = onSubstituteNode; - context.onEmitNode = onEmitNode; - context.enableSubstitution(213 /* CallExpression */); - context.enableSubstitution(215 /* TaggedTemplateExpression */); - context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(226 /* BinaryExpression */); - context.enableSubstitution(304 /* ShorthandPropertyAssignment */); - context.enableEmitNotification(312 /* SourceFile */); - const moduleInfoMap = []; - let currentSourceFile; - let currentModuleInfo; - const noSubstitution = []; - let needUMDDynamicImportHelper; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 8388608 /* ContainsDynamicImport */ || isJsonSourceFile(node) && hasJsonModuleEmitEnabled(compilerOptions) && outFile(compilerOptions))) { - return node; - } - currentSourceFile = node; - currentModuleInfo = collectExternalModuleInfo(context, node); - moduleInfoMap[getOriginalNodeId(node)] = currentModuleInfo; - const transformModule2 = getTransformModuleDelegate(moduleKind); - const updated = transformModule2(node); - currentSourceFile = void 0; - currentModuleInfo = void 0; - needUMDDynamicImportHelper = false; - return updated; - } - function shouldEmitUnderscoreUnderscoreESModule() { - if (!currentModuleInfo.exportEquals && isExternalModule(currentSourceFile)) { - return true; - } - return false; - } - function transformCommonJSModule(node) { - startLexicalEnvironment(); - const statements = []; - const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || !compilerOptions.noImplicitUseStrict && isExternalModule(currentSourceFile); - const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict && !isJsonSourceFile(node), topLevelVisitor); - if (shouldEmitUnderscoreUnderscoreESModule()) { - append(statements, createUnderscoreUnderscoreESModule()); - } - if (length(currentModuleInfo.exportedNames)) { - const chunkSize = 50; - for (let i = 0; i < currentModuleInfo.exportedNames.length; i += chunkSize) { - append( - statements, - factory2.createExpressionStatement( - reduceLeft( - currentModuleInfo.exportedNames.slice(i, i + chunkSize), - (prev, nextId) => factory2.createAssignment(factory2.createPropertyAccessExpression(factory2.createIdentifier("exports"), factory2.createIdentifier(idText(nextId))), prev), - factory2.createVoidZero() - ) - ) - ); - } - } - append(statements, visitNode(currentModuleInfo.externalHelpersImportDeclaration, topLevelVisitor, isStatement)); - addRange(statements, visitNodes2(node.statements, topLevelVisitor, isStatement, statementOffset)); - addExportEqualsIfNeeded( - statements, - /*emitAsReturn*/ - false - ); - insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); - const updated = factory2.updateSourceFile(node, setTextRange(factory2.createNodeArray(statements), node.statements)); - addEmitHelpers(updated, context.readEmitHelpers()); - return updated; - } - function transformAMDModule(node) { - const define = factory2.createIdentifier("define"); - const moduleName = tryGetModuleNameFromFile(factory2, node, host, compilerOptions); - const jsonSourceFile = isJsonSourceFile(node) && node; - const { aliasedModuleNames, unaliasedModuleNames, importAliasNames } = collectAsynchronousDependencies( - node, - /*includeNonAmdDependencies*/ - true - ); - const updated = factory2.updateSourceFile( - node, - setTextRange( - factory2.createNodeArray([ - factory2.createExpressionStatement( - factory2.createCallExpression( - define, - /*typeArguments*/ - void 0, - [ - // Add the module name (if provided). - ...moduleName ? [moduleName] : [], - // Add the dependency array argument: - // - // ["require", "exports", module1", "module2", ...] - factory2.createArrayLiteralExpression(jsonSourceFile ? emptyArray : [ - factory2.createStringLiteral("require"), - factory2.createStringLiteral("exports"), - ...aliasedModuleNames, - ...unaliasedModuleNames - ]), - // Add the module body function argument: - // - // function (require, exports, module1, module2) ... - jsonSourceFile ? jsonSourceFile.statements.length ? jsonSourceFile.statements[0].expression : factory2.createObjectLiteralExpression() : factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - [ - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "require" - ), - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "exports" - ), - ...importAliasNames - ], - /*type*/ - void 0, - transformAsynchronousModuleBody(node) - ) - ] - ) - ) - ]), - /*location*/ - node.statements - ) - ); - addEmitHelpers(updated, context.readEmitHelpers()); - return updated; - } - function transformUMDModule(node) { - const { aliasedModuleNames, unaliasedModuleNames, importAliasNames } = collectAsynchronousDependencies( - node, - /*includeNonAmdDependencies*/ - false - ); - const moduleName = tryGetModuleNameFromFile(factory2, node, host, compilerOptions); - const umdHeader = factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "factory" - )], - /*type*/ - void 0, - setTextRange( - factory2.createBlock( - [ - factory2.createIfStatement( - factory2.createLogicalAnd( - factory2.createTypeCheck(factory2.createIdentifier("module"), "object"), - factory2.createTypeCheck(factory2.createPropertyAccessExpression(factory2.createIdentifier("module"), "exports"), "object") - ), - factory2.createBlock([ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - [ - factory2.createVariableDeclaration( - "v", - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createCallExpression( - factory2.createIdentifier("factory"), - /*typeArguments*/ - void 0, - [ - factory2.createIdentifier("require"), - factory2.createIdentifier("exports") - ] - ) - ) - ] - ), - setEmitFlags( - factory2.createIfStatement( - factory2.createStrictInequality( - factory2.createIdentifier("v"), - factory2.createIdentifier("undefined") - ), - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.createPropertyAccessExpression(factory2.createIdentifier("module"), "exports"), - factory2.createIdentifier("v") - ) - ) - ), - 1 /* SingleLine */ - ) - ]), - factory2.createIfStatement( - factory2.createLogicalAnd( - factory2.createTypeCheck(factory2.createIdentifier("define"), "function"), - factory2.createPropertyAccessExpression(factory2.createIdentifier("define"), "amd") - ), - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createIdentifier("define"), - /*typeArguments*/ - void 0, - [ - // Add the module name (if provided). - ...moduleName ? [moduleName] : [], - factory2.createArrayLiteralExpression([ - factory2.createStringLiteral("require"), - factory2.createStringLiteral("exports"), - ...aliasedModuleNames, - ...unaliasedModuleNames - ]), - factory2.createIdentifier("factory") - ] - ) - ) - ]) - ) - ) - ], - /*multiLine*/ - true - ), - /*location*/ - void 0 - ) - ); - const updated = factory2.updateSourceFile( - node, - setTextRange( - factory2.createNodeArray([ - factory2.createExpressionStatement( - factory2.createCallExpression( - umdHeader, - /*typeArguments*/ - void 0, - [ - // Add the module body function argument: - // - // function (require, exports) ... - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - [ - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "require" - ), - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "exports" - ), - ...importAliasNames - ], - /*type*/ - void 0, - transformAsynchronousModuleBody(node) - ) - ] - ) - ) - ]), - /*location*/ - node.statements - ) - ); - addEmitHelpers(updated, context.readEmitHelpers()); - return updated; - } - function collectAsynchronousDependencies(node, includeNonAmdDependencies) { - const aliasedModuleNames = []; - const unaliasedModuleNames = []; - const importAliasNames = []; - for (const amdDependency of node.amdDependencies) { - if (amdDependency.name) { - aliasedModuleNames.push(factory2.createStringLiteral(amdDependency.path)); - importAliasNames.push(factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - amdDependency.name - )); - } else { - unaliasedModuleNames.push(factory2.createStringLiteral(amdDependency.path)); - } - } - for (const importNode of currentModuleInfo.externalImports) { - const externalModuleName = getExternalModuleNameLiteral(factory2, importNode, currentSourceFile, host, resolver, compilerOptions); - const importAliasName = getLocalNameForExternalImport(factory2, importNode, currentSourceFile); - if (externalModuleName) { - if (includeNonAmdDependencies && importAliasName) { - setEmitFlags(importAliasName, 8 /* NoSubstitution */); - aliasedModuleNames.push(externalModuleName); - importAliasNames.push(factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - importAliasName - )); - } else { - unaliasedModuleNames.push(externalModuleName); - } - } - } - return { aliasedModuleNames, unaliasedModuleNames, importAliasNames }; - } - function getAMDImportExpressionForImport(node) { - if (isImportEqualsDeclaration(node) || isExportDeclaration(node) || !getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions)) { - return void 0; - } - const name = getLocalNameForExternalImport(factory2, node, currentSourceFile); - const expr = getHelperExpressionForImport(node, name); - if (expr === name) { - return void 0; - } - return factory2.createExpressionStatement(factory2.createAssignment(name, expr)); - } - function transformAsynchronousModuleBody(node) { - startLexicalEnvironment(); - const statements = []; - const statementOffset = factory2.copyPrologue( - node.statements, - statements, - /*ensureUseStrict*/ - !compilerOptions.noImplicitUseStrict, - topLevelVisitor - ); - if (shouldEmitUnderscoreUnderscoreESModule()) { - append(statements, createUnderscoreUnderscoreESModule()); - } - if (length(currentModuleInfo.exportedNames)) { - append(statements, factory2.createExpressionStatement(reduceLeft(currentModuleInfo.exportedNames, (prev, nextId) => factory2.createAssignment(factory2.createPropertyAccessExpression(factory2.createIdentifier("exports"), factory2.createIdentifier(idText(nextId))), prev), factory2.createVoidZero()))); - } - append(statements, visitNode(currentModuleInfo.externalHelpersImportDeclaration, topLevelVisitor, isStatement)); - if (moduleKind === 2 /* AMD */) { - addRange(statements, mapDefined(currentModuleInfo.externalImports, getAMDImportExpressionForImport)); - } - addRange(statements, visitNodes2(node.statements, topLevelVisitor, isStatement, statementOffset)); - addExportEqualsIfNeeded( - statements, - /*emitAsReturn*/ - true - ); - insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); - const body = factory2.createBlock( - statements, - /*multiLine*/ - true - ); - if (needUMDDynamicImportHelper) { - addEmitHelper(body, dynamicImportUMDHelper); - } - return body; - } - function addExportEqualsIfNeeded(statements, emitAsReturn) { - if (currentModuleInfo.exportEquals) { - const expressionResult = visitNode(currentModuleInfo.exportEquals.expression, visitor, isExpression); - if (expressionResult) { - if (emitAsReturn) { - const statement = factory2.createReturnStatement(expressionResult); - setTextRange(statement, currentModuleInfo.exportEquals); - setEmitFlags(statement, 768 /* NoTokenSourceMaps */ | 3072 /* NoComments */); - statements.push(statement); - } else { - const statement = factory2.createExpressionStatement( - factory2.createAssignment( - factory2.createPropertyAccessExpression( - factory2.createIdentifier("module"), - "exports" - ), - expressionResult - ) - ); - setTextRange(statement, currentModuleInfo.exportEquals); - setEmitFlags(statement, 3072 /* NoComments */); - statements.push(statement); - } - } - } - } - function topLevelVisitor(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - return visitTopLevelImportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: - return visitTopLevelImportEqualsDeclaration(node); - case 278 /* ExportDeclaration */: - return visitTopLevelExportDeclaration(node); - case 277 /* ExportAssignment */: - return visitTopLevelExportAssignment(node); - default: - return topLevelNestedVisitor(node); - } - } - function topLevelNestedVisitor(node) { - switch (node.kind) { - case 243 /* VariableStatement */: - return visitVariableStatement(node); - case 262 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 263 /* ClassDeclaration */: - return visitClassDeclaration(node); - case 248 /* ForStatement */: - return visitForStatement( - node, - /*isTopLevel*/ - true - ); - case 249 /* ForInStatement */: - return visitForInStatement(node); - case 250 /* ForOfStatement */: - return visitForOfStatement(node); - case 246 /* DoStatement */: - return visitDoStatement(node); - case 247 /* WhileStatement */: - return visitWhileStatement(node); - case 256 /* LabeledStatement */: - return visitLabeledStatement(node); - case 254 /* WithStatement */: - return visitWithStatement(node); - case 245 /* IfStatement */: - return visitIfStatement(node); - case 255 /* SwitchStatement */: - return visitSwitchStatement(node); - case 269 /* CaseBlock */: - return visitCaseBlock(node); - case 296 /* CaseClause */: - return visitCaseClause(node); - case 297 /* DefaultClause */: - return visitDefaultClause(node); - case 258 /* TryStatement */: - return visitTryStatement(node); - case 299 /* CatchClause */: - return visitCatchClause(node); - case 241 /* Block */: - return visitBlock(node); - default: - return visitor(node); - } - } - function visitorWorker(node, valueIsDiscarded) { - if (!(node.transformFlags & (8388608 /* ContainsDynamicImport */ | 4096 /* ContainsDestructuringAssignment */ | 268435456 /* ContainsUpdateExpressionForIdentifier */))) { - return node; - } - switch (node.kind) { - case 248 /* ForStatement */: - return visitForStatement( - node, - /*isTopLevel*/ - false - ); - case 244 /* ExpressionStatement */: - return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: - return visitParenthesizedExpression(node, valueIsDiscarded); - case 360 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 213 /* CallExpression */: - if (isImportCall(node) && currentSourceFile.impliedNodeFormat === void 0) { - return visitImportCallExpression(node); - } - break; - case 226 /* BinaryExpression */: - if (isDestructuringAssignment(node)) { - return visitDestructuringAssignment(node, valueIsDiscarded); - } - break; - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded); - } - return visitEachChild(node, visitor, context); - } - function visitor(node) { - return visitorWorker( - node, - /*valueIsDiscarded*/ - false - ); - } - function discardedValueVisitor(node) { - return visitorWorker( - node, - /*valueIsDiscarded*/ - true - ); - } - function destructuringNeedsFlattening(node) { - if (isObjectLiteralExpression(node)) { - for (const elem of node.properties) { - switch (elem.kind) { - case 303 /* PropertyAssignment */: - if (destructuringNeedsFlattening(elem.initializer)) { - return true; - } - break; - case 304 /* ShorthandPropertyAssignment */: - if (destructuringNeedsFlattening(elem.name)) { - return true; - } - break; - case 305 /* SpreadAssignment */: - if (destructuringNeedsFlattening(elem.expression)) { - return true; - } - break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return false; - default: - Debug.assertNever(elem, "Unhandled object member kind"); - } - } - } else if (isArrayLiteralExpression(node)) { - for (const elem of node.elements) { - if (isSpreadElement(elem)) { - if (destructuringNeedsFlattening(elem.expression)) { - return true; - } - } else if (destructuringNeedsFlattening(elem)) { - return true; - } - } - } else if (isIdentifier(node)) { - return length(getExports(node)) > (isExportName(node) ? 1 : 0); - } - return false; - } - function visitDestructuringAssignment(node, valueIsDiscarded) { - if (destructuringNeedsFlattening(node.left)) { - return flattenDestructuringAssignment(node, visitor, context, 0 /* All */, !valueIsDiscarded, createAllExportExpressions); - } - return visitEachChild(node, visitor, context); - } - function visitForStatement(node, isTopLevel) { - if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { - const exportStatements = appendExportsOfVariableDeclarationList( - /*statements*/ - void 0, - node.initializer, - /*isForInOrOfInitializer*/ - false - ); - if (exportStatements) { - const statements = []; - const varDeclList = visitNode(node.initializer, discardedValueVisitor, isVariableDeclarationList); - const varStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - varDeclList - ); - statements.push(varStatement); - addRange(statements, exportStatements); - const condition = visitNode(node.condition, visitor, isExpression); - const incrementor = visitNode(node.incrementor, discardedValueVisitor, isExpression); - const body = visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context); - statements.push(factory2.updateForStatement( - node, - /*initializer*/ - void 0, - condition, - incrementor, - body - )); - return statements; - } - } - return factory2.updateForStatement( - node, - visitNode(node.initializer, discardedValueVisitor, isForInitializer), - visitNode(node.condition, visitor, isExpression), - visitNode(node.incrementor, discardedValueVisitor, isExpression), - visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context) - ); - } - function visitForInStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { - const exportStatements = appendExportsOfVariableDeclarationList( - /*statements*/ - void 0, - node.initializer, - /*isForInOrOfInitializer*/ - true - ); - if (some(exportStatements)) { - const initializer = visitNode(node.initializer, discardedValueVisitor, isForInitializer); - const expression = visitNode(node.expression, visitor, isExpression); - const body = visitIterationBody(node.statement, topLevelNestedVisitor, context); - const mergedBody = isBlock(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock( - [...exportStatements, body], - /*multiLine*/ - true - ); - return factory2.updateForInStatement(node, initializer, expression, mergedBody); - } - } - return factory2.updateForInStatement( - node, - visitNode(node.initializer, discardedValueVisitor, isForInitializer), - visitNode(node.expression, visitor, isExpression), - visitIterationBody(node.statement, topLevelNestedVisitor, context) - ); - } - function visitForOfStatement(node) { - if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 7 /* BlockScoped */)) { - const exportStatements = appendExportsOfVariableDeclarationList( - /*statements*/ - void 0, - node.initializer, - /*isForInOrOfInitializer*/ - true - ); - const initializer = visitNode(node.initializer, discardedValueVisitor, isForInitializer); - const expression = visitNode(node.expression, visitor, isExpression); - let body = visitIterationBody(node.statement, topLevelNestedVisitor, context); - if (some(exportStatements)) { - body = isBlock(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock( - [...exportStatements, body], - /*multiLine*/ - true - ); - } - return factory2.updateForOfStatement(node, node.awaitModifier, initializer, expression, body); - } - return factory2.updateForOfStatement( - node, - node.awaitModifier, - visitNode(node.initializer, discardedValueVisitor, isForInitializer), - visitNode(node.expression, visitor, isExpression), - visitIterationBody(node.statement, topLevelNestedVisitor, context) - ); - } - function visitDoStatement(node) { - return factory2.updateDoStatement( - node, - visitIterationBody(node.statement, topLevelNestedVisitor, context), - visitNode(node.expression, visitor, isExpression) - ); - } - function visitWhileStatement(node) { - return factory2.updateWhileStatement( - node, - visitNode(node.expression, visitor, isExpression), - visitIterationBody(node.statement, topLevelNestedVisitor, context) - ); - } - function visitLabeledStatement(node) { - return factory2.updateLabeledStatement( - node, - node.label, - Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)) - ); - } - function visitWithStatement(node) { - return factory2.updateWithStatement( - node, - visitNode(node.expression, visitor, isExpression), - Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)) - ); - } - function visitIfStatement(node) { - return factory2.updateIfStatement( - node, - visitNode(node.expression, visitor, isExpression), - Debug.checkDefined(visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)), - visitNode(node.elseStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) - ); - } - function visitSwitchStatement(node) { - return factory2.updateSwitchStatement( - node, - visitNode(node.expression, visitor, isExpression), - Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)) - ); - } - function visitCaseBlock(node) { - return factory2.updateCaseBlock( - node, - visitNodes2(node.clauses, topLevelNestedVisitor, isCaseOrDefaultClause) - ); - } - function visitCaseClause(node) { - return factory2.updateCaseClause( - node, - visitNode(node.expression, visitor, isExpression), - visitNodes2(node.statements, topLevelNestedVisitor, isStatement) - ); - } - function visitDefaultClause(node) { - return visitEachChild(node, topLevelNestedVisitor, context); - } - function visitTryStatement(node) { - return visitEachChild(node, topLevelNestedVisitor, context); - } - function visitCatchClause(node) { - return factory2.updateCatchClause( - node, - node.variableDeclaration, - Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock)) - ); - } - function visitBlock(node) { - node = visitEachChild(node, topLevelNestedVisitor, context); - return node; - } - function visitExpressionStatement(node) { - return factory2.updateExpressionStatement( - node, - visitNode(node.expression, discardedValueVisitor, isExpression) - ); - } - function visitParenthesizedExpression(node, valueIsDiscarded) { - return factory2.updateParenthesizedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression)); - } - function visitPartiallyEmittedExpression(node, valueIsDiscarded) { - return factory2.updatePartiallyEmittedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression)); - } - function visitPreOrPostfixUnaryExpression(node, valueIsDiscarded) { - if ((node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) && isIdentifier(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand) && !isDeclarationNameOfEnumOrNamespace(node.operand)) { - const exportedNames = getExports(node.operand); - if (exportedNames) { - let temp; - let expression = visitNode(node.operand, visitor, isExpression); - if (isPrefixUnaryExpression(node)) { - expression = factory2.updatePrefixUnaryExpression(node, expression); - } else { - expression = factory2.updatePostfixUnaryExpression(node, expression); - if (!valueIsDiscarded) { - temp = factory2.createTempVariable(hoistVariableDeclaration); - expression = factory2.createAssignment(temp, expression); - setTextRange(expression, node); - } - expression = factory2.createComma(expression, factory2.cloneNode(node.operand)); - setTextRange(expression, node); - } - for (const exportName of exportedNames) { - noSubstitution[getNodeId(expression)] = true; - expression = createExportExpression(exportName, expression); - setTextRange(expression, node); - } - if (temp) { - noSubstitution[getNodeId(expression)] = true; - expression = factory2.createComma(expression, temp); - setTextRange(expression, node); - } - return expression; - } - } - return visitEachChild(node, visitor, context); - } - function visitImportCallExpression(node) { - if (moduleKind === 0 /* None */ && languageVersion >= 7 /* ES2020 */) { - return visitEachChild(node, visitor, context); - } - const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions); - const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression); - const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument; - const containsLexicalThis = !!(node.transformFlags & 16384 /* ContainsLexicalThis */); - switch (compilerOptions.module) { - case 2 /* AMD */: - return createImportCallExpressionAMD(argument, containsLexicalThis); - case 3 /* UMD */: - return createImportCallExpressionUMD(argument ?? factory2.createVoidZero(), containsLexicalThis); - case 1 /* CommonJS */: - default: - return createImportCallExpressionCommonJS(argument); - } - } - function createImportCallExpressionUMD(arg, containsLexicalThis) { - needUMDDynamicImportHelper = true; - if (isSimpleCopiableExpression(arg)) { - const argClone = isGeneratedIdentifier(arg) ? arg : isStringLiteral(arg) ? factory2.createStringLiteralFromNode(arg) : setEmitFlags(setTextRange(factory2.cloneNode(arg), arg), 3072 /* NoComments */); - return factory2.createConditionalExpression( - /*condition*/ - factory2.createIdentifier("__syncRequire"), - /*questionToken*/ - void 0, - /*whenTrue*/ - createImportCallExpressionCommonJS(arg), - /*colonToken*/ - void 0, - /*whenFalse*/ - createImportCallExpressionAMD(argClone, containsLexicalThis) - ); - } else { - const temp = factory2.createTempVariable(hoistVariableDeclaration); - return factory2.createComma(factory2.createAssignment(temp, arg), factory2.createConditionalExpression( - /*condition*/ - factory2.createIdentifier("__syncRequire"), - /*questionToken*/ - void 0, - /*whenTrue*/ - createImportCallExpressionCommonJS( - temp, - /*isInlineable*/ - true - ), - /*colonToken*/ - void 0, - /*whenFalse*/ - createImportCallExpressionAMD(temp, containsLexicalThis) - )); - } - } - function createImportCallExpressionAMD(arg, containsLexicalThis) { - const resolve = factory2.createUniqueName("resolve"); - const reject = factory2.createUniqueName("reject"); - const parameters = [ - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - /*name*/ - resolve - ), - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - /*name*/ - reject - ) - ]; - const body = factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createIdentifier("require"), - /*typeArguments*/ - void 0, - [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve, reject] - ) - ) - ]); - let func; - if (languageVersion >= 2 /* ES2015 */) { - func = factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - parameters, - /*type*/ - void 0, - /*equalsGreaterThanToken*/ - void 0, - body - ); - } else { - func = factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - parameters, - /*type*/ - void 0, - body - ); - if (containsLexicalThis) { - setEmitFlags(func, 16 /* CapturesThis */); - } - } - const promise = factory2.createNewExpression( - factory2.createIdentifier("Promise"), - /*typeArguments*/ - void 0, - [func] - ); - if (getESModuleInterop(compilerOptions)) { - return factory2.createCallExpression( - factory2.createPropertyAccessExpression(promise, factory2.createIdentifier("then")), - /*typeArguments*/ - void 0, - [emitHelpers().createImportStarCallbackHelper()] - ); - } - return promise; - } - function createImportCallExpressionCommonJS(arg, isInlineable) { - const needSyncEval = arg && !isSimpleInlineableExpression(arg) && !isInlineable; - const promiseResolveCall = factory2.createCallExpression( - factory2.createPropertyAccessExpression(factory2.createIdentifier("Promise"), "resolve"), - /*typeArguments*/ - void 0, - /*argumentsArray*/ - needSyncEval ? languageVersion >= 2 /* ES2015 */ ? [ - factory2.createTemplateExpression(factory2.createTemplateHead(""), [ - factory2.createTemplateSpan(arg, factory2.createTemplateTail("")) - ]) - ] : [ - factory2.createCallExpression( - factory2.createPropertyAccessExpression(factory2.createStringLiteral(""), "concat"), - /*typeArguments*/ - void 0, - [arg] - ) - ] : [] - ); - let requireCall = factory2.createCallExpression( - factory2.createIdentifier("require"), - /*typeArguments*/ - void 0, - needSyncEval ? [factory2.createIdentifier("s")] : arg ? [arg] : [] - ); - if (getESModuleInterop(compilerOptions)) { - requireCall = emitHelpers().createImportStarHelper(requireCall); - } - const parameters = needSyncEval ? [ - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - /*name*/ - "s" - ) - ] : []; - let func; - if (languageVersion >= 2 /* ES2015 */) { - func = factory2.createArrowFunction( - /*modifiers*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - parameters, - /*type*/ - void 0, - /*equalsGreaterThanToken*/ - void 0, - requireCall - ); - } else { - func = factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - parameters, - /*type*/ - void 0, - factory2.createBlock([factory2.createReturnStatement(requireCall)]) - ); - } - const downleveledImport = factory2.createCallExpression( - factory2.createPropertyAccessExpression(promiseResolveCall, "then"), - /*typeArguments*/ - void 0, - [func] - ); - return downleveledImport; - } - function getHelperExpressionForExport(node, innerExpr) { - if (!getESModuleInterop(compilerOptions) || getInternalEmitFlags(node) & 2 /* NeverApplyImportHelper */) { - return innerExpr; - } - if (getExportNeedsImportStarHelper(node)) { - return emitHelpers().createImportStarHelper(innerExpr); - } - return innerExpr; - } - function getHelperExpressionForImport(node, innerExpr) { - if (!getESModuleInterop(compilerOptions) || getInternalEmitFlags(node) & 2 /* NeverApplyImportHelper */) { - return innerExpr; - } - if (getImportNeedsImportStarHelper(node)) { - return emitHelpers().createImportStarHelper(innerExpr); - } - if (getImportNeedsImportDefaultHelper(node)) { - return emitHelpers().createImportDefaultHelper(innerExpr); - } - return innerExpr; - } - function visitTopLevelImportDeclaration(node) { - let statements; - const namespaceDeclaration = getNamespaceDeclarationNode(node); - if (moduleKind !== 2 /* AMD */) { - if (!node.importClause) { - return setOriginalNode(setTextRange(factory2.createExpressionStatement(createRequireCall2(node)), node), node); - } else { - const variables = []; - if (namespaceDeclaration && !isDefaultImport(node)) { - variables.push( - factory2.createVariableDeclaration( - factory2.cloneNode(namespaceDeclaration.name), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - getHelperExpressionForImport(node, createRequireCall2(node)) - ) - ); - } else { - variables.push( - factory2.createVariableDeclaration( - factory2.getGeneratedNameForNode(node), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - getHelperExpressionForImport(node, createRequireCall2(node)) - ) - ); - if (namespaceDeclaration && isDefaultImport(node)) { - variables.push( - factory2.createVariableDeclaration( - factory2.cloneNode(namespaceDeclaration.name), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.getGeneratedNameForNode(node) - ) - ); - } - } - statements = append( - statements, - setOriginalNode( - setTextRange( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - variables, - languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */ - ) - ), - /*location*/ - node - ), - /*original*/ - node - ) - ); - } - } else if (namespaceDeclaration && isDefaultImport(node)) { - statements = append( - statements, - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - [ - setOriginalNode( - setTextRange( - factory2.createVariableDeclaration( - factory2.cloneNode(namespaceDeclaration.name), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.getGeneratedNameForNode(node) - ), - /*location*/ - node - ), - /*original*/ - node - ) - ], - languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */ - ) - ) - ); - } - statements = appendExportsOfImportDeclaration(statements, node); - return singleOrMany(statements); - } - function createRequireCall2(importNode) { - const moduleName = getExternalModuleNameLiteral(factory2, importNode, currentSourceFile, host, resolver, compilerOptions); - const args = []; - if (moduleName) { - args.push(moduleName); - } - return factory2.createCallExpression( - factory2.createIdentifier("require"), - /*typeArguments*/ - void 0, - args - ); - } - function visitTopLevelImportEqualsDeclaration(node) { - Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); - let statements; - if (moduleKind !== 2 /* AMD */) { - if (hasSyntacticModifier(node, 1 /* Export */)) { - statements = append( - statements, - setOriginalNode( - setTextRange( - factory2.createExpressionStatement( - createExportExpression( - node.name, - createRequireCall2(node) - ) - ), - node - ), - node - ) - ); - } else { - statements = append( - statements, - setOriginalNode( - setTextRange( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - [ - factory2.createVariableDeclaration( - factory2.cloneNode(node.name), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - createRequireCall2(node) - ) - ], - /*flags*/ - languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */ - ) - ), - node - ), - node - ) - ); - } - } else { - if (hasSyntacticModifier(node, 1 /* Export */)) { - statements = append( - statements, - setOriginalNode( - setTextRange( - factory2.createExpressionStatement( - createExportExpression(factory2.getExportName(node), factory2.getLocalName(node)) - ), - node - ), - node - ) - ); - } - } - statements = appendExportsOfImportEqualsDeclaration(statements, node); - return singleOrMany(statements); - } - function visitTopLevelExportDeclaration(node) { - if (!node.moduleSpecifier) { - return void 0; - } - const generatedName = factory2.getGeneratedNameForNode(node); - if (node.exportClause && isNamedExports(node.exportClause)) { - const statements = []; - if (moduleKind !== 2 /* AMD */) { - statements.push( - setOriginalNode( - setTextRange( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - generatedName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - createRequireCall2(node) - ) - ]) - ), - /*location*/ - node - ), - /* original */ - node - ) - ); - } - for (const specifier of node.exportClause.elements) { - if (languageVersion === 0 /* ES3 */) { - statements.push( - setOriginalNode( - setTextRange( - factory2.createExpressionStatement( - emitHelpers().createCreateBindingHelper(generatedName, factory2.createStringLiteralFromNode(specifier.propertyName || specifier.name), specifier.propertyName ? factory2.createStringLiteralFromNode(specifier.name) : void 0) - ), - specifier - ), - specifier - ) - ); - } else { - const exportNeedsImportDefault = !!getESModuleInterop(compilerOptions) && !(getInternalEmitFlags(node) & 2 /* NeverApplyImportHelper */) && idText(specifier.propertyName || specifier.name) === "default"; - const exportedValue = factory2.createPropertyAccessExpression( - exportNeedsImportDefault ? emitHelpers().createImportDefaultHelper(generatedName) : generatedName, - specifier.propertyName || specifier.name - ); - statements.push( - setOriginalNode( - setTextRange( - factory2.createExpressionStatement( - createExportExpression( - factory2.getExportName(specifier), - exportedValue, - /*location*/ - void 0, - /*liveBinding*/ - true - ) - ), - specifier - ), - specifier - ) - ); - } - } - return singleOrMany(statements); - } else if (node.exportClause) { - const statements = []; - statements.push( - setOriginalNode( - setTextRange( - factory2.createExpressionStatement( - createExportExpression( - factory2.cloneNode(node.exportClause.name), - getHelperExpressionForExport(node, moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : factory2.createIdentifier(idText(node.exportClause.name))) - ) - ), - node - ), - node - ) - ); - return singleOrMany(statements); - } else { - return setOriginalNode( - setTextRange( - factory2.createExpressionStatement( - emitHelpers().createExportStarHelper(moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : generatedName) - ), - node - ), - node - ); - } - } - function visitTopLevelExportAssignment(node) { - if (node.isExportEquals) { - return void 0; - } - return createExportStatement( - factory2.createIdentifier("default"), - visitNode(node.expression, visitor, isExpression), - /*location*/ - node, - /*allowComments*/ - true - ); - } - function visitFunctionDeclaration(node) { - let statements; - if (hasSyntacticModifier(node, 1 /* Export */)) { - statements = append( - statements, - setOriginalNode( - setTextRange( - factory2.createFunctionDeclaration( - visitNodes2(node.modifiers, modifierVisitor, isModifier), - node.asteriskToken, - factory2.getDeclarationName( - node, - /*allowComments*/ - true, - /*allowSourceMaps*/ - true - ), - /*typeParameters*/ - void 0, - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitEachChild(node.body, visitor, context) - ), - /*location*/ - node - ), - /*original*/ - node - ) - ); - } else { - statements = append(statements, visitEachChild(node, visitor, context)); - } - statements = appendExportsOfHoistedDeclaration(statements, node); - return singleOrMany(statements); - } - function visitClassDeclaration(node) { - let statements; - if (hasSyntacticModifier(node, 1 /* Export */)) { - statements = append( - statements, - setOriginalNode( - setTextRange( - factory2.createClassDeclaration( - visitNodes2(node.modifiers, modifierVisitor, isModifierLike), - factory2.getDeclarationName( - node, - /*allowComments*/ - true, - /*allowSourceMaps*/ - true - ), - /*typeParameters*/ - void 0, - visitNodes2(node.heritageClauses, visitor, isHeritageClause), - visitNodes2(node.members, visitor, isClassElement) - ), - node - ), - node - ) - ); - } else { - statements = append(statements, visitEachChild(node, visitor, context)); - } - statements = appendExportsOfHoistedDeclaration(statements, node); - return singleOrMany(statements); - } - function visitVariableStatement(node) { - let statements; - let variables; - let expressions; - if (hasSyntacticModifier(node, 1 /* Export */)) { - let modifiers; - let removeCommentsOnExpressions = false; - for (const variable of node.declarationList.declarations) { - if (isIdentifier(variable.name) && isLocalName(variable.name)) { - if (!modifiers) { - modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); - } - if (variable.initializer) { - const updatedVariable = factory2.updateVariableDeclaration( - variable, - variable.name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - createExportExpression( - variable.name, - visitNode(variable.initializer, visitor, isExpression) - ) - ); - variables = append(variables, updatedVariable); - } else { - variables = append(variables, variable); - } - } else if (variable.initializer) { - if (!isBindingPattern(variable.name) && (isArrowFunction(variable.initializer) || isFunctionExpression(variable.initializer) || isClassExpression(variable.initializer))) { - const expression = factory2.createAssignment( - setTextRange( - factory2.createPropertyAccessExpression( - factory2.createIdentifier("exports"), - variable.name - ), - /*location*/ - variable.name - ), - factory2.createIdentifier(getTextOfIdentifierOrLiteral(variable.name)) - ); - const updatedVariable = factory2.createVariableDeclaration( - variable.name, - variable.exclamationToken, - variable.type, - visitNode(variable.initializer, visitor, isExpression) - ); - variables = append(variables, updatedVariable); - expressions = append(expressions, expression); - removeCommentsOnExpressions = true; - } else { - expressions = append(expressions, transformInitializedVariable(variable)); - } - } - } - if (variables) { - statements = append(statements, factory2.updateVariableStatement(node, modifiers, factory2.updateVariableDeclarationList(node.declarationList, variables))); - } - if (expressions) { - const statement = setOriginalNode(setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node), node); - if (removeCommentsOnExpressions) { - removeAllComments(statement); - } - statements = append(statements, statement); - } - } else { - statements = append(statements, visitEachChild(node, visitor, context)); - } - statements = appendExportsOfVariableStatement(statements, node); - return singleOrMany(statements); - } - function createAllExportExpressions(name, value, location) { - const exportedNames = getExports(name); - if (exportedNames) { - let expression = isExportName(name) ? value : factory2.createAssignment(name, value); - for (const exportName of exportedNames) { - setEmitFlags(expression, 8 /* NoSubstitution */); - expression = createExportExpression( - exportName, - expression, - /*location*/ - location - ); - } - return expression; - } - return factory2.createAssignment(name, value); - } - function transformInitializedVariable(node) { - if (isBindingPattern(node.name)) { - return flattenDestructuringAssignment( - visitNode(node, visitor, isInitializedVariable), - visitor, - context, - 0 /* All */, - /*needsValue*/ - false, - createAllExportExpressions - ); - } else { - return factory2.createAssignment( - setTextRange( - factory2.createPropertyAccessExpression( - factory2.createIdentifier("exports"), - node.name - ), - /*location*/ - node.name - ), - node.initializer ? visitNode(node.initializer, visitor, isExpression) : factory2.createVoidZero() - ); - } - } - function appendExportsOfImportDeclaration(statements, decl) { - if (currentModuleInfo.exportEquals) { - return statements; - } - const importClause = decl.importClause; - if (!importClause) { - return statements; - } - const seen = new IdentifierNameMap(); - if (importClause.name) { - statements = appendExportsOfDeclaration(statements, seen, importClause); - } - const namedBindings = importClause.namedBindings; - if (namedBindings) { - switch (namedBindings.kind) { - case 274 /* NamespaceImport */: - statements = appendExportsOfDeclaration(statements, seen, namedBindings); - break; - case 275 /* NamedImports */: - for (const importBinding of namedBindings.elements) { - statements = appendExportsOfDeclaration( - statements, - seen, - importBinding, - /*liveBinding*/ - true - ); - } - break; - } - } - return statements; - } - function appendExportsOfImportEqualsDeclaration(statements, decl) { - if (currentModuleInfo.exportEquals) { - return statements; - } - return appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); - } - function appendExportsOfVariableStatement(statements, node) { - return appendExportsOfVariableDeclarationList( - statements, - node.declarationList, - /*isForInOrOfInitializer*/ - false - ); - } - function appendExportsOfVariableDeclarationList(statements, node, isForInOrOfInitializer) { - if (currentModuleInfo.exportEquals) { - return statements; - } - for (const decl of node.declarations) { - statements = appendExportsOfBindingElement(statements, decl, isForInOrOfInitializer); - } - return statements; - } - function appendExportsOfBindingElement(statements, decl, isForInOrOfInitializer) { - if (currentModuleInfo.exportEquals) { - return statements; - } - if (isBindingPattern(decl.name)) { - for (const element of decl.name.elements) { - if (!isOmittedExpression(element)) { - statements = appendExportsOfBindingElement(statements, element, isForInOrOfInitializer); - } - } - } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer || isForInOrOfInitializer)) { - statements = appendExportsOfDeclaration(statements, new IdentifierNameMap(), decl); - } - return statements; - } - function appendExportsOfHoistedDeclaration(statements, decl) { - if (currentModuleInfo.exportEquals) { - return statements; - } - const seen = new IdentifierNameMap(); - if (hasSyntacticModifier(decl, 1 /* Export */)) { - const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); - statements = appendExportStatement( - statements, - seen, - exportName, - factory2.getLocalName(decl), - /*location*/ - decl - ); - } - if (decl.name) { - statements = appendExportsOfDeclaration(statements, seen, decl); - } - return statements; - } - function appendExportsOfDeclaration(statements, seen, decl, liveBinding) { - const name = factory2.getDeclarationName(decl); - const exportSpecifiers = currentModuleInfo.exportSpecifiers.get(name); - if (exportSpecifiers) { - for (const exportSpecifier of exportSpecifiers) { - statements = appendExportStatement( - statements, - seen, - exportSpecifier.name, - name, - /*location*/ - exportSpecifier.name, - /*allowComments*/ - void 0, - liveBinding - ); - } - } - return statements; - } - function appendExportStatement(statements, seen, exportName, expression, location, allowComments, liveBinding) { - if (!seen.has(exportName)) { - seen.set(exportName, true); - statements = append(statements, createExportStatement(exportName, expression, location, allowComments, liveBinding)); - } - return statements; - } - function createUnderscoreUnderscoreESModule() { - let statement; - if (languageVersion === 0 /* ES3 */) { - statement = factory2.createExpressionStatement( - createExportExpression( - factory2.createIdentifier("__esModule"), - factory2.createTrue() - ) - ); - } else { - statement = factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createPropertyAccessExpression(factory2.createIdentifier("Object"), "defineProperty"), - /*typeArguments*/ - void 0, - [ - factory2.createIdentifier("exports"), - factory2.createStringLiteral("__esModule"), - factory2.createObjectLiteralExpression([ - factory2.createPropertyAssignment("value", factory2.createTrue()) - ]) - ] - ) - ); - } - setEmitFlags(statement, 2097152 /* CustomPrologue */); - return statement; - } - function createExportStatement(name, value, location, allowComments, liveBinding) { - const statement = setTextRange(factory2.createExpressionStatement(createExportExpression( - name, - value, - /*location*/ - void 0, - liveBinding - )), location); - startOnNewLine(statement); - if (!allowComments) { - setEmitFlags(statement, 3072 /* NoComments */); - } - return statement; - } - function createExportExpression(name, value, location, liveBinding) { - return setTextRange( - liveBinding && languageVersion !== 0 /* ES3 */ ? factory2.createCallExpression( - factory2.createPropertyAccessExpression( - factory2.createIdentifier("Object"), - "defineProperty" - ), - /*typeArguments*/ - void 0, - [ - factory2.createIdentifier("exports"), - factory2.createStringLiteralFromNode(name), - factory2.createObjectLiteralExpression([ - factory2.createPropertyAssignment("enumerable", factory2.createTrue()), - factory2.createPropertyAssignment("get", factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - [], - /*type*/ - void 0, - factory2.createBlock([factory2.createReturnStatement(value)]) - )) - ]) - ] - ) : factory2.createAssignment( - factory2.createPropertyAccessExpression( - factory2.createIdentifier("exports"), - factory2.cloneNode(name) - ), - value - ), - location - ); - } - function modifierVisitor(node) { - switch (node.kind) { - case 95 /* ExportKeyword */: - case 90 /* DefaultKeyword */: - return void 0; - } - return node; - } - function onEmitNode(hint, node, emitCallback) { - if (node.kind === 312 /* SourceFile */) { - currentSourceFile = node; - currentModuleInfo = moduleInfoMap[getOriginalNodeId(currentSourceFile)]; - previousOnEmitNode(hint, node, emitCallback); - currentSourceFile = void 0; - currentModuleInfo = void 0; - } else { - previousOnEmitNode(hint, node, emitCallback); - } - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (node.id && noSubstitution[node.id]) { - return node; - } - if (hint === 1 /* Expression */) { - return substituteExpression(node); - } else if (isShorthandPropertyAssignment(node)) { - return substituteShorthandPropertyAssignment(node); - } - return node; - } - function substituteShorthandPropertyAssignment(node) { - const name = node.name; - const exportedOrImportedName = substituteExpressionIdentifier(name); - if (exportedOrImportedName !== name) { - if (node.objectAssignmentInitializer) { - const initializer = factory2.createAssignment(exportedOrImportedName, node.objectAssignmentInitializer); - return setTextRange(factory2.createPropertyAssignment(name, initializer), node); - } - return setTextRange(factory2.createPropertyAssignment(name, exportedOrImportedName), node); - } - return node; - } - function substituteExpression(node) { - switch (node.kind) { - case 80 /* Identifier */: - return substituteExpressionIdentifier(node); - case 213 /* CallExpression */: - return substituteCallExpression(node); - case 215 /* TaggedTemplateExpression */: - return substituteTaggedTemplateExpression(node); - case 226 /* BinaryExpression */: - return substituteBinaryExpression(node); - } - return node; - } - function substituteCallExpression(node) { - if (isIdentifier(node.expression)) { - const expression = substituteExpressionIdentifier(node.expression); - noSubstitution[getNodeId(expression)] = true; - if (!isIdentifier(expression) && !(getEmitFlags(node.expression) & 8192 /* HelperName */)) { - return addInternalEmitFlags( - factory2.updateCallExpression( - node, - expression, - /*typeArguments*/ - void 0, - node.arguments - ), - 16 /* IndirectCall */ - ); - } - } - return node; - } - function substituteTaggedTemplateExpression(node) { - if (isIdentifier(node.tag)) { - const tag = substituteExpressionIdentifier(node.tag); - noSubstitution[getNodeId(tag)] = true; - if (!isIdentifier(tag) && !(getEmitFlags(node.tag) & 8192 /* HelperName */)) { - return addInternalEmitFlags( - factory2.updateTaggedTemplateExpression( - node, - tag, - /*typeArguments*/ - void 0, - node.template - ), - 16 /* IndirectCall */ - ); - } - } - return node; - } - function substituteExpressionIdentifier(node) { - var _a, _b; - if (getEmitFlags(node) & 8192 /* HelperName */) { - const externalHelpersModuleName = getExternalHelpersModuleName(currentSourceFile); - if (externalHelpersModuleName) { - return factory2.createPropertyAccessExpression(externalHelpersModuleName, node); - } - return node; - } else if (!(isGeneratedIdentifier(node) && !(node.emitNode.autoGenerate.flags & 64 /* AllowNameSubstitution */)) && !isLocalName(node)) { - const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); - if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { - return setTextRange( - factory2.createPropertyAccessExpression( - factory2.createIdentifier("exports"), - factory2.cloneNode(node) - ), - /*location*/ - node - ); - } - const importDeclaration = resolver.getReferencedImportDeclaration(node); - if (importDeclaration) { - if (isImportClause(importDeclaration)) { - return setTextRange( - factory2.createPropertyAccessExpression( - factory2.getGeneratedNameForNode(importDeclaration.parent), - factory2.createIdentifier("default") - ), - /*location*/ - node - ); - } else if (isImportSpecifier(importDeclaration)) { - const name = importDeclaration.propertyName || importDeclaration.name; - return setTextRange( - factory2.createPropertyAccessExpression( - factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration), - factory2.cloneNode(name) - ), - /*location*/ - node - ); - } - } - } - return node; - } - function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { - const exportedNames = getExports(node.left); - if (exportedNames) { - let expression = node; - for (const exportName of exportedNames) { - noSubstitution[getNodeId(expression)] = true; - expression = createExportExpression( - exportName, - expression, - /*location*/ - node - ); - } - return expression; - } - } - return node; - } - function getExports(name) { - if (!isGeneratedIdentifier(name)) { - const importDeclaration = resolver.getReferencedImportDeclaration(name); - if (importDeclaration) { - return currentModuleInfo == null ? void 0 : currentModuleInfo.exportedBindings[getOriginalNodeId(importDeclaration)]; - } - const bindingsSet = /* @__PURE__ */ new Set(); - const declarations = resolver.getReferencedValueDeclarations(name); - if (declarations) { - for (const declaration of declarations) { - const bindings = currentModuleInfo == null ? void 0 : currentModuleInfo.exportedBindings[getOriginalNodeId(declaration)]; - if (bindings) { - for (const binding of bindings) { - bindingsSet.add(binding); - } - } - } - if (bindingsSet.size) { - return arrayFrom(bindingsSet); - } - } - } else if (isFileLevelReservedGeneratedIdentifier(name)) { - const exportSpecifiers = currentModuleInfo == null ? void 0 : currentModuleInfo.exportSpecifiers.get(name); - if (exportSpecifiers) { - const exportedNames = []; - for (const exportSpecifier of exportSpecifiers) { - exportedNames.push(exportSpecifier.name); - } - return exportedNames; - } - } - } - } - var dynamicImportUMDHelper; - var init_module = __esm({ - "src/compiler/transformers/module/module.ts"() { - "use strict"; - init_ts2(); - dynamicImportUMDHelper = { - name: "typescript:dynamicimport-sync-require", - scoped: true, - text: ` - var __syncRequire = typeof module === "object" && typeof module.exports === "object";` - }; - } - }); - - // src/compiler/transformers/module/system.ts - function transformSystemModule(context) { - const { - factory: factory2, - startLexicalEnvironment, - endLexicalEnvironment, - hoistVariableDeclaration - } = context; - const compilerOptions = context.getCompilerOptions(); - const resolver = context.getEmitResolver(); - const host = context.getEmitHost(); - const previousOnSubstituteNode = context.onSubstituteNode; - const previousOnEmitNode = context.onEmitNode; - context.onSubstituteNode = onSubstituteNode; - context.onEmitNode = onEmitNode; - context.enableSubstitution(80 /* Identifier */); - context.enableSubstitution(304 /* ShorthandPropertyAssignment */); - context.enableSubstitution(226 /* BinaryExpression */); - context.enableSubstitution(236 /* MetaProperty */); - context.enableEmitNotification(312 /* SourceFile */); - const moduleInfoMap = []; - const exportFunctionsMap = []; - const noSubstitutionMap = []; - const contextObjectMap = []; - let currentSourceFile; - let moduleInfo; - let exportFunction; - let contextObject; - let hoistedStatements; - let enclosingBlockScopedContainer; - let noSubstitution; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile || !(isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 8388608 /* ContainsDynamicImport */)) { - return node; - } - const id = getOriginalNodeId(node); - currentSourceFile = node; - enclosingBlockScopedContainer = node; - moduleInfo = moduleInfoMap[id] = collectExternalModuleInfo(context, node); - exportFunction = factory2.createUniqueName("exports"); - exportFunctionsMap[id] = exportFunction; - contextObject = contextObjectMap[id] = factory2.createUniqueName("context"); - const dependencyGroups = collectDependencyGroups(moduleInfo.externalImports); - const moduleBodyBlock = createSystemModuleBody(node, dependencyGroups); - const moduleBodyFunction = factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - [ - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - exportFunction - ), - factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - contextObject - ) - ], - /*type*/ - void 0, - moduleBodyBlock - ); - const moduleName = tryGetModuleNameFromFile(factory2, node, host, compilerOptions); - const dependencies = factory2.createArrayLiteralExpression(map(dependencyGroups, (dependencyGroup) => dependencyGroup.name)); - const updated = setEmitFlags( - factory2.updateSourceFile( - node, - setTextRange( - factory2.createNodeArray([ - factory2.createExpressionStatement( - factory2.createCallExpression( - factory2.createPropertyAccessExpression(factory2.createIdentifier("System"), "register"), - /*typeArguments*/ - void 0, - moduleName ? [moduleName, dependencies, moduleBodyFunction] : [dependencies, moduleBodyFunction] - ) - ) - ]), - node.statements - ) - ), - 2048 /* NoTrailingComments */ - ); - if (!outFile(compilerOptions)) { - moveEmitHelpers(updated, moduleBodyBlock, (helper) => !helper.scoped); - } - if (noSubstitution) { - noSubstitutionMap[id] = noSubstitution; - noSubstitution = void 0; - } - currentSourceFile = void 0; - moduleInfo = void 0; - exportFunction = void 0; - contextObject = void 0; - hoistedStatements = void 0; - enclosingBlockScopedContainer = void 0; - return updated; - } - function collectDependencyGroups(externalImports) { - const groupIndices = /* @__PURE__ */ new Map(); - const dependencyGroups = []; - for (const externalImport of externalImports) { - const externalModuleName = getExternalModuleNameLiteral(factory2, externalImport, currentSourceFile, host, resolver, compilerOptions); - if (externalModuleName) { - const text = externalModuleName.text; - const groupIndex = groupIndices.get(text); - if (groupIndex !== void 0) { - dependencyGroups[groupIndex].externalImports.push(externalImport); - } else { - groupIndices.set(text, dependencyGroups.length); - dependencyGroups.push({ - name: externalModuleName, - externalImports: [externalImport] - }); - } - } - } - return dependencyGroups; - } - function createSystemModuleBody(node, dependencyGroups) { - const statements = []; - startLexicalEnvironment(); - const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || !compilerOptions.noImplicitUseStrict && isExternalModule(currentSourceFile); - const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict, topLevelVisitor); - statements.push( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - "__moduleName", - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createLogicalAnd( - contextObject, - factory2.createPropertyAccessExpression(contextObject, "id") - ) - ) - ]) - ) - ); - visitNode(moduleInfo.externalHelpersImportDeclaration, topLevelVisitor, isStatement); - const executeStatements = visitNodes2(node.statements, topLevelVisitor, isStatement, statementOffset); - addRange(statements, hoistedStatements); - insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); - const exportStarFunction = addExportStarIfNeeded(statements); - const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(512 /* Async */) : void 0; - const moduleObject = factory2.createObjectLiteralExpression( - [ - factory2.createPropertyAssignment( - "setters", - createSettersArray(exportStarFunction, dependencyGroups) - ), - factory2.createPropertyAssignment( - "execute", - factory2.createFunctionExpression( - modifiers, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - [], - /*type*/ - void 0, - factory2.createBlock( - executeStatements, - /*multiLine*/ - true - ) - ) - ) - ], - /*multiLine*/ - true - ); - statements.push(factory2.createReturnStatement(moduleObject)); - return factory2.createBlock( - statements, - /*multiLine*/ - true - ); - } - function addExportStarIfNeeded(statements) { - if (!moduleInfo.hasExportStarsToExportValues) { - return; - } - if (!moduleInfo.exportedNames && moduleInfo.exportSpecifiers.size === 0) { - let hasExportDeclarationWithExportClause = false; - for (const externalImport of moduleInfo.externalImports) { - if (externalImport.kind === 278 /* ExportDeclaration */ && externalImport.exportClause) { - hasExportDeclarationWithExportClause = true; - break; - } - } - if (!hasExportDeclarationWithExportClause) { - const exportStarFunction2 = createExportStarFunction( - /*localNames*/ - void 0 - ); - statements.push(exportStarFunction2); - return exportStarFunction2.name; - } - } - const exportedNames = []; - if (moduleInfo.exportedNames) { - for (const exportedLocalName of moduleInfo.exportedNames) { - if (exportedLocalName.escapedText === "default") { - continue; - } - exportedNames.push( - factory2.createPropertyAssignment( - factory2.createStringLiteralFromNode(exportedLocalName), - factory2.createTrue() - ) - ); - } - } - const exportedNamesStorageRef = factory2.createUniqueName("exportedNames"); - statements.push( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - exportedNamesStorageRef, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createObjectLiteralExpression( - exportedNames, - /*multiLine*/ - true - ) - ) - ]) - ) - ); - const exportStarFunction = createExportStarFunction(exportedNamesStorageRef); - statements.push(exportStarFunction); - return exportStarFunction.name; - } - function createExportStarFunction(localNames) { - const exportStarFunction = factory2.createUniqueName("exportStar"); - const m = factory2.createIdentifier("m"); - const n = factory2.createIdentifier("n"); - const exports = factory2.createIdentifier("exports"); - let condition = factory2.createStrictInequality(n, factory2.createStringLiteral("default")); - if (localNames) { - condition = factory2.createLogicalAnd( - condition, - factory2.createLogicalNot( - factory2.createCallExpression( - factory2.createPropertyAccessExpression(localNames, "hasOwnProperty"), - /*typeArguments*/ - void 0, - [n] - ) - ) - ); - } - return factory2.createFunctionDeclaration( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - exportStarFunction, - /*typeParameters*/ - void 0, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - m - )], - /*type*/ - void 0, - factory2.createBlock( - [ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration( - exports, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createObjectLiteralExpression([]) - ) - ]) - ), - factory2.createForInStatement( - factory2.createVariableDeclarationList([ - factory2.createVariableDeclaration(n) - ]), - m, - factory2.createBlock([ - setEmitFlags( - factory2.createIfStatement( - condition, - factory2.createExpressionStatement( - factory2.createAssignment( - factory2.createElementAccessExpression(exports, n), - factory2.createElementAccessExpression(m, n) - ) - ) - ), - 1 /* SingleLine */ - ) - ]) - ), - factory2.createExpressionStatement( - factory2.createCallExpression( - exportFunction, - /*typeArguments*/ - void 0, - [exports] - ) - ) - ], - /*multiLine*/ - true - ) - ); - } - function createSettersArray(exportStarFunction, dependencyGroups) { - const setters = []; - for (const group2 of dependencyGroups) { - const localName = forEach(group2.externalImports, (i) => getLocalNameForExternalImport(factory2, i, currentSourceFile)); - const parameterName = localName ? factory2.getGeneratedNameForNode(localName) : factory2.createUniqueName(""); - const statements = []; - for (const entry of group2.externalImports) { - const importVariableName = getLocalNameForExternalImport(factory2, entry, currentSourceFile); - switch (entry.kind) { - case 272 /* ImportDeclaration */: - if (!entry.importClause) { - break; - } - case 271 /* ImportEqualsDeclaration */: - Debug.assert(importVariableName !== void 0); - statements.push( - factory2.createExpressionStatement( - factory2.createAssignment(importVariableName, parameterName) - ) - ); - if (hasSyntacticModifier(entry, 1 /* Export */)) { - statements.push( - factory2.createExpressionStatement( - factory2.createCallExpression( - exportFunction, - /*typeArguments*/ - void 0, - [ - factory2.createStringLiteral(idText(importVariableName)), - parameterName - ] - ) - ) - ); - } - break; - case 278 /* ExportDeclaration */: - Debug.assert(importVariableName !== void 0); - if (entry.exportClause) { - if (isNamedExports(entry.exportClause)) { - const properties = []; - for (const e of entry.exportClause.elements) { - properties.push( - factory2.createPropertyAssignment( - factory2.createStringLiteral(idText(e.name)), - factory2.createElementAccessExpression( - parameterName, - factory2.createStringLiteral(idText(e.propertyName || e.name)) - ) - ) - ); - } - statements.push( - factory2.createExpressionStatement( - factory2.createCallExpression( - exportFunction, - /*typeArguments*/ - void 0, - [factory2.createObjectLiteralExpression( - properties, - /*multiLine*/ - true - )] - ) - ) - ); - } else { - statements.push( - factory2.createExpressionStatement( - factory2.createCallExpression( - exportFunction, - /*typeArguments*/ - void 0, - [ - factory2.createStringLiteral(idText(entry.exportClause.name)), - parameterName - ] - ) - ) - ); - } - } else { - statements.push( - factory2.createExpressionStatement( - factory2.createCallExpression( - exportStarFunction, - /*typeArguments*/ - void 0, - [parameterName] - ) - ) - ); - } - break; - } - } - setters.push( - factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - [factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - parameterName - )], - /*type*/ - void 0, - factory2.createBlock( - statements, - /*multiLine*/ - true - ) - ) - ); - } - return factory2.createArrayLiteralExpression( - setters, - /*multiLine*/ - true - ); - } - function topLevelVisitor(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - return visitImportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: - return visitImportEqualsDeclaration(node); - case 278 /* ExportDeclaration */: - return visitExportDeclaration(node); - case 277 /* ExportAssignment */: - return visitExportAssignment(node); - default: - return topLevelNestedVisitor(node); - } - } - function visitImportDeclaration(node) { - let statements; - if (node.importClause) { - hoistVariableDeclaration(getLocalNameForExternalImport(factory2, node, currentSourceFile)); - } - return singleOrMany(appendExportsOfImportDeclaration(statements, node)); - } - function visitExportDeclaration(node) { - Debug.assertIsDefined(node); - return void 0; - } - function visitImportEqualsDeclaration(node) { - Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); - let statements; - hoistVariableDeclaration(getLocalNameForExternalImport(factory2, node, currentSourceFile)); - return singleOrMany(appendExportsOfImportEqualsDeclaration(statements, node)); - } - function visitExportAssignment(node) { - if (node.isExportEquals) { - return void 0; - } - const expression = visitNode(node.expression, visitor, isExpression); - return createExportStatement( - factory2.createIdentifier("default"), - expression, - /*allowComments*/ - true - ); - } - function visitFunctionDeclaration(node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { - hoistedStatements = append( - hoistedStatements, - factory2.updateFunctionDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifierLike), - node.asteriskToken, - factory2.getDeclarationName( - node, - /*allowComments*/ - true, - /*allowSourceMaps*/ - true - ), - /*typeParameters*/ - void 0, - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitNode(node.body, visitor, isBlock) - ) - ); - } else { - hoistedStatements = append(hoistedStatements, visitEachChild(node, visitor, context)); - } - hoistedStatements = appendExportsOfHoistedDeclaration(hoistedStatements, node); - return void 0; - } - function visitClassDeclaration(node) { - let statements; - const name = factory2.getLocalName(node); - hoistVariableDeclaration(name); - statements = append( - statements, - setTextRange( - factory2.createExpressionStatement( - factory2.createAssignment( - name, - setTextRange( - factory2.createClassExpression( - visitNodes2(node.modifiers, modifierVisitor, isModifierLike), - node.name, - /*typeParameters*/ - void 0, - visitNodes2(node.heritageClauses, visitor, isHeritageClause), - visitNodes2(node.members, visitor, isClassElement) - ), - node - ) - ) - ), - node - ) - ); - statements = appendExportsOfHoistedDeclaration(statements, node); - return singleOrMany(statements); - } - function visitVariableStatement(node) { - if (!shouldHoistVariableDeclarationList(node.declarationList)) { - return visitNode(node, visitor, isStatement); - } - let statements; - if (isVarUsing(node.declarationList) || isVarAwaitUsing(node.declarationList)) { - const modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifierLike); - const declarations = []; - for (const variable of node.declarationList.declarations) { - declarations.push(factory2.updateVariableDeclaration( - variable, - factory2.getGeneratedNameForNode(variable.name), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - transformInitializedVariable( - variable, - /*isExportedDeclaration*/ - false - ) - )); - } - const declarationList = factory2.updateVariableDeclarationList( - node.declarationList, - declarations - ); - statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList)); - } else { - let expressions; - const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); - for (const variable of node.declarationList.declarations) { - if (variable.initializer) { - expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); - } else { - hoistBindingElement(variable); - } - } - if (expressions) { - statements = append(statements, setTextRange(factory2.createExpressionStatement(factory2.inlineExpressions(expressions)), node)); - } - } - statements = appendExportsOfVariableStatement( - statements, - node, - /*exportSelf*/ - false - ); - return singleOrMany(statements); - } - function hoistBindingElement(node) { - if (isBindingPattern(node.name)) { - for (const element of node.name.elements) { - if (!isOmittedExpression(element)) { - hoistBindingElement(element); - } - } - } else { - hoistVariableDeclaration(factory2.cloneNode(node.name)); - } - } - function shouldHoistVariableDeclarationList(node) { - return (getEmitFlags(node) & 4194304 /* NoHoisting */) === 0 && (enclosingBlockScopedContainer.kind === 312 /* SourceFile */ || (getOriginalNode(node).flags & 7 /* BlockScoped */) === 0); - } - function transformInitializedVariable(node, isExportedDeclaration) { - const createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment; - return isBindingPattern(node.name) ? flattenDestructuringAssignment( - node, - visitor, - context, - 0 /* All */, - /*needsValue*/ - false, - createAssignment - ) : node.initializer ? createAssignment(node.name, visitNode(node.initializer, visitor, isExpression)) : node.name; - } - function createExportedVariableAssignment(name, value, location) { - return createVariableAssignment( - name, - value, - location, - /*isExportedDeclaration*/ - true - ); - } - function createNonExportedVariableAssignment(name, value, location) { - return createVariableAssignment( - name, - value, - location, - /*isExportedDeclaration*/ - false - ); - } - function createVariableAssignment(name, value, location, isExportedDeclaration) { - hoistVariableDeclaration(factory2.cloneNode(name)); - return isExportedDeclaration ? createExportExpression(name, preventSubstitution(setTextRange(factory2.createAssignment(name, value), location))) : preventSubstitution(setTextRange(factory2.createAssignment(name, value), location)); - } - function appendExportsOfImportDeclaration(statements, decl) { - if (moduleInfo.exportEquals) { - return statements; - } - const importClause = decl.importClause; - if (!importClause) { - return statements; - } - if (importClause.name) { - statements = appendExportsOfDeclaration(statements, importClause); - } - const namedBindings = importClause.namedBindings; - if (namedBindings) { - switch (namedBindings.kind) { - case 274 /* NamespaceImport */: - statements = appendExportsOfDeclaration(statements, namedBindings); - break; - case 275 /* NamedImports */: - for (const importBinding of namedBindings.elements) { - statements = appendExportsOfDeclaration(statements, importBinding); - } - break; - } - } - return statements; - } - function appendExportsOfImportEqualsDeclaration(statements, decl) { - if (moduleInfo.exportEquals) { - return statements; - } - return appendExportsOfDeclaration(statements, decl); - } - function appendExportsOfVariableStatement(statements, node, exportSelf) { - if (moduleInfo.exportEquals) { - return statements; - } - for (const decl of node.declarationList.declarations) { - if (decl.initializer || exportSelf) { - statements = appendExportsOfBindingElement(statements, decl, exportSelf); - } - } - return statements; - } - function appendExportsOfBindingElement(statements, decl, exportSelf) { - if (moduleInfo.exportEquals) { - return statements; - } - if (isBindingPattern(decl.name)) { - for (const element of decl.name.elements) { - if (!isOmittedExpression(element)) { - statements = appendExportsOfBindingElement(statements, element, exportSelf); - } - } - } else if (!isGeneratedIdentifier(decl.name)) { - let excludeName; - if (exportSelf) { - statements = appendExportStatement(statements, decl.name, factory2.getLocalName(decl)); - excludeName = idText(decl.name); - } - statements = appendExportsOfDeclaration(statements, decl, excludeName); - } - return statements; - } - function appendExportsOfHoistedDeclaration(statements, decl) { - if (moduleInfo.exportEquals) { - return statements; - } - let excludeName; - if (hasSyntacticModifier(decl, 1 /* Export */)) { - const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createStringLiteral("default") : decl.name; - statements = appendExportStatement(statements, exportName, factory2.getLocalName(decl)); - excludeName = getTextOfIdentifierOrLiteral(exportName); - } - if (decl.name) { - statements = appendExportsOfDeclaration(statements, decl, excludeName); - } - return statements; - } - function appendExportsOfDeclaration(statements, decl, excludeName) { - if (moduleInfo.exportEquals) { - return statements; - } - const name = factory2.getDeclarationName(decl); - const exportSpecifiers = moduleInfo.exportSpecifiers.get(name); - if (exportSpecifiers) { - for (const exportSpecifier of exportSpecifiers) { - if (exportSpecifier.name.escapedText !== excludeName) { - statements = appendExportStatement(statements, exportSpecifier.name, name); - } - } - } - return statements; - } - function appendExportStatement(statements, exportName, expression, allowComments) { - statements = append(statements, createExportStatement(exportName, expression, allowComments)); - return statements; - } - function createExportStatement(name, value, allowComments) { - const statement = factory2.createExpressionStatement(createExportExpression(name, value)); - startOnNewLine(statement); - if (!allowComments) { - setEmitFlags(statement, 3072 /* NoComments */); - } - return statement; - } - function createExportExpression(name, value) { - const exportName = isIdentifier(name) ? factory2.createStringLiteralFromNode(name) : name; - setEmitFlags(value, getEmitFlags(value) | 3072 /* NoComments */); - return setCommentRange(factory2.createCallExpression( - exportFunction, - /*typeArguments*/ - void 0, - [exportName, value] - ), value); - } - function topLevelNestedVisitor(node) { - switch (node.kind) { - case 243 /* VariableStatement */: - return visitVariableStatement(node); - case 262 /* FunctionDeclaration */: - return visitFunctionDeclaration(node); - case 263 /* ClassDeclaration */: - return visitClassDeclaration(node); - case 248 /* ForStatement */: - return visitForStatement( - node, - /*isTopLevel*/ - true - ); - case 249 /* ForInStatement */: - return visitForInStatement(node); - case 250 /* ForOfStatement */: - return visitForOfStatement(node); - case 246 /* DoStatement */: - return visitDoStatement(node); - case 247 /* WhileStatement */: - return visitWhileStatement(node); - case 256 /* LabeledStatement */: - return visitLabeledStatement(node); - case 254 /* WithStatement */: - return visitWithStatement(node); - case 245 /* IfStatement */: - return visitIfStatement(node); - case 255 /* SwitchStatement */: - return visitSwitchStatement(node); - case 269 /* CaseBlock */: - return visitCaseBlock(node); - case 296 /* CaseClause */: - return visitCaseClause(node); - case 297 /* DefaultClause */: - return visitDefaultClause(node); - case 258 /* TryStatement */: - return visitTryStatement(node); - case 299 /* CatchClause */: - return visitCatchClause(node); - case 241 /* Block */: - return visitBlock(node); - default: - return visitor(node); - } - } - function visitForStatement(node, isTopLevel) { - const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; - enclosingBlockScopedContainer = node; - node = factory2.updateForStatement( - node, - visitNode(node.initializer, isTopLevel ? visitForInitializer : discardedValueVisitor, isForInitializer), - visitNode(node.condition, visitor, isExpression), - visitNode(node.incrementor, discardedValueVisitor, isExpression), - visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context) - ); - enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; - return node; - } - function visitForInStatement(node) { - const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; - enclosingBlockScopedContainer = node; - node = factory2.updateForInStatement( - node, - visitForInitializer(node.initializer), - visitNode(node.expression, visitor, isExpression), - visitIterationBody(node.statement, topLevelNestedVisitor, context) - ); - enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; - return node; - } - function visitForOfStatement(node) { - const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; - enclosingBlockScopedContainer = node; - node = factory2.updateForOfStatement( - node, - node.awaitModifier, - visitForInitializer(node.initializer), - visitNode(node.expression, visitor, isExpression), - visitIterationBody(node.statement, topLevelNestedVisitor, context) - ); - enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; - return node; - } - function shouldHoistForInitializer(node) { - return isVariableDeclarationList(node) && shouldHoistVariableDeclarationList(node); - } - function visitForInitializer(node) { - if (shouldHoistForInitializer(node)) { - let expressions; - for (const variable of node.declarations) { - expressions = append(expressions, transformInitializedVariable( - variable, - /*isExportedDeclaration*/ - false - )); - if (!variable.initializer) { - hoistBindingElement(variable); - } - } - return expressions ? factory2.inlineExpressions(expressions) : factory2.createOmittedExpression(); - } else { - return visitNode(node, discardedValueVisitor, isForInitializer); - } - } - function visitDoStatement(node) { - return factory2.updateDoStatement( - node, - visitIterationBody(node.statement, topLevelNestedVisitor, context), - visitNode(node.expression, visitor, isExpression) - ); - } - function visitWhileStatement(node) { - return factory2.updateWhileStatement( - node, - visitNode(node.expression, visitor, isExpression), - visitIterationBody(node.statement, topLevelNestedVisitor, context) - ); - } - function visitLabeledStatement(node) { - return factory2.updateLabeledStatement( - node, - node.label, - Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)) - ); - } - function visitWithStatement(node) { - return factory2.updateWithStatement( - node, - visitNode(node.expression, visitor, isExpression), - Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)) - ); - } - function visitIfStatement(node) { - return factory2.updateIfStatement( - node, - visitNode(node.expression, visitor, isExpression), - Debug.checkDefined(visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)), - visitNode(node.elseStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock) - ); - } - function visitSwitchStatement(node) { - return factory2.updateSwitchStatement( - node, - visitNode(node.expression, visitor, isExpression), - Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock)) - ); - } - function visitCaseBlock(node) { - const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; - enclosingBlockScopedContainer = node; - node = factory2.updateCaseBlock( - node, - visitNodes2(node.clauses, topLevelNestedVisitor, isCaseOrDefaultClause) - ); - enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; - return node; - } - function visitCaseClause(node) { - return factory2.updateCaseClause( - node, - visitNode(node.expression, visitor, isExpression), - visitNodes2(node.statements, topLevelNestedVisitor, isStatement) - ); - } - function visitDefaultClause(node) { - return visitEachChild(node, topLevelNestedVisitor, context); - } - function visitTryStatement(node) { - return visitEachChild(node, topLevelNestedVisitor, context); - } - function visitCatchClause(node) { - const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; - enclosingBlockScopedContainer = node; - node = factory2.updateCatchClause( - node, - node.variableDeclaration, - Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock)) - ); - enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; - return node; - } - function visitBlock(node) { - const savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer; - enclosingBlockScopedContainer = node; - node = visitEachChild(node, topLevelNestedVisitor, context); - enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer; - return node; - } - function visitorWorker(node, valueIsDiscarded) { - if (!(node.transformFlags & (4096 /* ContainsDestructuringAssignment */ | 8388608 /* ContainsDynamicImport */ | 268435456 /* ContainsUpdateExpressionForIdentifier */))) { - return node; - } - switch (node.kind) { - case 248 /* ForStatement */: - return visitForStatement( - node, - /*isTopLevel*/ - false - ); - case 244 /* ExpressionStatement */: - return visitExpressionStatement(node); - case 217 /* ParenthesizedExpression */: - return visitParenthesizedExpression(node, valueIsDiscarded); - case 360 /* PartiallyEmittedExpression */: - return visitPartiallyEmittedExpression(node, valueIsDiscarded); - case 226 /* BinaryExpression */: - if (isDestructuringAssignment(node)) { - return visitDestructuringAssignment(node, valueIsDiscarded); - } - break; - case 213 /* CallExpression */: - if (isImportCall(node)) { - return visitImportCallExpression(node); - } - break; - case 224 /* PrefixUnaryExpression */: - case 225 /* PostfixUnaryExpression */: - return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded); - } - return visitEachChild(node, visitor, context); - } - function visitor(node) { - return visitorWorker( - node, - /*valueIsDiscarded*/ - false - ); - } - function discardedValueVisitor(node) { - return visitorWorker( - node, - /*valueIsDiscarded*/ - true - ); - } - function visitExpressionStatement(node) { - return factory2.updateExpressionStatement(node, visitNode(node.expression, discardedValueVisitor, isExpression)); - } - function visitParenthesizedExpression(node, valueIsDiscarded) { - return factory2.updateParenthesizedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression)); - } - function visitPartiallyEmittedExpression(node, valueIsDiscarded) { - return factory2.updatePartiallyEmittedExpression(node, visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, isExpression)); - } - function visitImportCallExpression(node) { - const externalModuleName = getExternalModuleNameLiteral(factory2, node, currentSourceFile, host, resolver, compilerOptions); - const firstArgument = visitNode(firstOrUndefined(node.arguments), visitor, isExpression); - const argument = externalModuleName && (!firstArgument || !isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument; - return factory2.createCallExpression( - factory2.createPropertyAccessExpression( - contextObject, - factory2.createIdentifier("import") - ), - /*typeArguments*/ - void 0, - argument ? [argument] : [] - ); - } - function visitDestructuringAssignment(node, valueIsDiscarded) { - if (hasExportedReferenceInDestructuringTarget(node.left)) { - return flattenDestructuringAssignment( - node, - visitor, - context, - 0 /* All */, - !valueIsDiscarded - ); - } - return visitEachChild(node, visitor, context); - } - function hasExportedReferenceInDestructuringTarget(node) { - if (isAssignmentExpression( - node, - /*excludeCompoundAssignment*/ - true - )) { - return hasExportedReferenceInDestructuringTarget(node.left); - } else if (isSpreadElement(node)) { - return hasExportedReferenceInDestructuringTarget(node.expression); - } else if (isObjectLiteralExpression(node)) { - return some(node.properties, hasExportedReferenceInDestructuringTarget); - } else if (isArrayLiteralExpression(node)) { - return some(node.elements, hasExportedReferenceInDestructuringTarget); - } else if (isShorthandPropertyAssignment(node)) { - return hasExportedReferenceInDestructuringTarget(node.name); - } else if (isPropertyAssignment(node)) { - return hasExportedReferenceInDestructuringTarget(node.initializer); - } else if (isIdentifier(node)) { - const container = resolver.getReferencedExportContainer(node); - return container !== void 0 && container.kind === 312 /* SourceFile */; - } else { - return false; - } - } - function visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded) { - if ((node.operator === 46 /* PlusPlusToken */ || node.operator === 47 /* MinusMinusToken */) && isIdentifier(node.operand) && !isGeneratedIdentifier(node.operand) && !isLocalName(node.operand) && !isDeclarationNameOfEnumOrNamespace(node.operand)) { - const exportedNames = getExports(node.operand); - if (exportedNames) { - let temp; - let expression = visitNode(node.operand, visitor, isExpression); - if (isPrefixUnaryExpression(node)) { - expression = factory2.updatePrefixUnaryExpression(node, expression); - } else { - expression = factory2.updatePostfixUnaryExpression(node, expression); - if (!valueIsDiscarded) { - temp = factory2.createTempVariable(hoistVariableDeclaration); - expression = factory2.createAssignment(temp, expression); - setTextRange(expression, node); - } - expression = factory2.createComma(expression, factory2.cloneNode(node.operand)); - setTextRange(expression, node); - } - for (const exportName of exportedNames) { - expression = createExportExpression(exportName, preventSubstitution(expression)); - } - if (temp) { - expression = factory2.createComma(expression, temp); - setTextRange(expression, node); - } - return expression; - } - } - return visitEachChild(node, visitor, context); - } - function modifierVisitor(node) { - switch (node.kind) { - case 95 /* ExportKeyword */: - case 90 /* DefaultKeyword */: - return void 0; - } - return node; - } - function onEmitNode(hint, node, emitCallback) { - if (node.kind === 312 /* SourceFile */) { - const id = getOriginalNodeId(node); - currentSourceFile = node; - moduleInfo = moduleInfoMap[id]; - exportFunction = exportFunctionsMap[id]; - noSubstitution = noSubstitutionMap[id]; - contextObject = contextObjectMap[id]; - if (noSubstitution) { - delete noSubstitutionMap[id]; - } - previousOnEmitNode(hint, node, emitCallback); - currentSourceFile = void 0; - moduleInfo = void 0; - exportFunction = void 0; - contextObject = void 0; - noSubstitution = void 0; - } else { - previousOnEmitNode(hint, node, emitCallback); - } - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (isSubstitutionPrevented(node)) { - return node; - } - if (hint === 1 /* Expression */) { - return substituteExpression(node); - } else if (hint === 4 /* Unspecified */) { - return substituteUnspecified(node); - } - return node; - } - function substituteUnspecified(node) { - switch (node.kind) { - case 304 /* ShorthandPropertyAssignment */: - return substituteShorthandPropertyAssignment(node); - } - return node; - } - function substituteShorthandPropertyAssignment(node) { - var _a, _b; - const name = node.name; - if (!isGeneratedIdentifier(name) && !isLocalName(name)) { - const importDeclaration = resolver.getReferencedImportDeclaration(name); - if (importDeclaration) { - if (isImportClause(importDeclaration)) { - return setTextRange( - factory2.createPropertyAssignment( - factory2.cloneNode(name), - factory2.createPropertyAccessExpression( - factory2.getGeneratedNameForNode(importDeclaration.parent), - factory2.createIdentifier("default") - ) - ), - /*location*/ - node - ); - } else if (isImportSpecifier(importDeclaration)) { - return setTextRange( - factory2.createPropertyAssignment( - factory2.cloneNode(name), - factory2.createPropertyAccessExpression( - factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration), - factory2.cloneNode(importDeclaration.propertyName || importDeclaration.name) - ) - ), - /*location*/ - node - ); - } - } - } - return node; - } - function substituteExpression(node) { - switch (node.kind) { - case 80 /* Identifier */: - return substituteExpressionIdentifier(node); - case 226 /* BinaryExpression */: - return substituteBinaryExpression(node); - case 236 /* MetaProperty */: - return substituteMetaProperty(node); - } - return node; - } - function substituteExpressionIdentifier(node) { - var _a, _b; - if (getEmitFlags(node) & 8192 /* HelperName */) { - const externalHelpersModuleName = getExternalHelpersModuleName(currentSourceFile); - if (externalHelpersModuleName) { - return factory2.createPropertyAccessExpression(externalHelpersModuleName, node); - } - return node; - } - if (!isGeneratedIdentifier(node) && !isLocalName(node)) { - const importDeclaration = resolver.getReferencedImportDeclaration(node); - if (importDeclaration) { - if (isImportClause(importDeclaration)) { - return setTextRange( - factory2.createPropertyAccessExpression( - factory2.getGeneratedNameForNode(importDeclaration.parent), - factory2.createIdentifier("default") - ), - /*location*/ - node - ); - } else if (isImportSpecifier(importDeclaration)) { - return setTextRange( - factory2.createPropertyAccessExpression( - factory2.getGeneratedNameForNode(((_b = (_a = importDeclaration.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.parent) || importDeclaration), - factory2.cloneNode(importDeclaration.propertyName || importDeclaration.name) - ), - /*location*/ - node - ); - } - } - } - return node; - } - function substituteBinaryExpression(node) { - if (isAssignmentOperator(node.operatorToken.kind) && isIdentifier(node.left) && (!isGeneratedIdentifier(node.left) || isFileLevelReservedGeneratedIdentifier(node.left)) && !isLocalName(node.left)) { - const exportedNames = getExports(node.left); - if (exportedNames) { - let expression = node; - for (const exportName of exportedNames) { - expression = createExportExpression(exportName, preventSubstitution(expression)); - } - return expression; - } - } - return node; - } - function substituteMetaProperty(node) { - if (isImportMeta(node)) { - return factory2.createPropertyAccessExpression(contextObject, factory2.createIdentifier("meta")); - } - return node; - } - function getExports(name) { - let exportedNames; - const valueDeclaration = getReferencedDeclaration(name); - if (valueDeclaration) { - const exportContainer = resolver.getReferencedExportContainer( - name, - /*prefixLocals*/ - false - ); - if (exportContainer && exportContainer.kind === 312 /* SourceFile */) { - exportedNames = append(exportedNames, factory2.getDeclarationName(valueDeclaration)); - } - exportedNames = addRange(exportedNames, moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)]); - } else if (isGeneratedIdentifier(name) && isFileLevelReservedGeneratedIdentifier(name)) { - const exportSpecifiers = moduleInfo == null ? void 0 : moduleInfo.exportSpecifiers.get(name); - if (exportSpecifiers) { - const exportedNames2 = []; - for (const exportSpecifier of exportSpecifiers) { - exportedNames2.push(exportSpecifier.name); - } - return exportedNames2; - } - } - return exportedNames; - } - function getReferencedDeclaration(name) { - if (!isGeneratedIdentifier(name)) { - const importDeclaration = resolver.getReferencedImportDeclaration(name); - if (importDeclaration) - return importDeclaration; - const valueDeclaration = resolver.getReferencedValueDeclaration(name); - if (valueDeclaration && (moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(valueDeclaration)])) - return valueDeclaration; - const declarations = resolver.getReferencedValueDeclarations(name); - if (declarations) { - for (const declaration of declarations) { - if (declaration !== valueDeclaration && (moduleInfo == null ? void 0 : moduleInfo.exportedBindings[getOriginalNodeId(declaration)])) - return declaration; - } - } - return valueDeclaration; - } - } - function preventSubstitution(node) { - if (noSubstitution === void 0) - noSubstitution = []; - noSubstitution[getNodeId(node)] = true; - return node; - } - function isSubstitutionPrevented(node) { - return noSubstitution && node.id && noSubstitution[node.id]; - } - } - var init_system = __esm({ - "src/compiler/transformers/module/system.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/module/esnextAnd2015.ts - function transformECMAScriptModule(context) { - const { - factory: factory2, - getEmitHelperFactory: emitHelpers - } = context; - const host = context.getEmitHost(); - const resolver = context.getEmitResolver(); - const compilerOptions = context.getCompilerOptions(); - const languageVersion = getEmitScriptTarget(compilerOptions); - const previousOnEmitNode = context.onEmitNode; - const previousOnSubstituteNode = context.onSubstituteNode; - context.onEmitNode = onEmitNode; - context.onSubstituteNode = onSubstituteNode; - context.enableEmitNotification(312 /* SourceFile */); - context.enableSubstitution(80 /* Identifier */); - let helperNameSubstitutions; - let currentSourceFile; - let importRequireStatements; - return chainBundle(context, transformSourceFile); - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - if (isExternalModule(node) || getIsolatedModules(compilerOptions)) { - currentSourceFile = node; - importRequireStatements = void 0; - let result = updateExternalModule(node); - currentSourceFile = void 0; - if (importRequireStatements) { - result = factory2.updateSourceFile( - result, - setTextRange(factory2.createNodeArray(insertStatementsAfterCustomPrologue(result.statements.slice(), importRequireStatements)), result.statements) - ); - } - if (!isExternalModule(node) || some(result.statements, isExternalModuleIndicator)) { - return result; - } - return factory2.updateSourceFile( - result, - setTextRange(factory2.createNodeArray([...result.statements, createEmptyExports(factory2)]), result.statements) - ); - } - return node; - } - function updateExternalModule(node) { - const externalHelpersImportDeclaration = createExternalHelpersImportDeclarationIfNeeded(factory2, emitHelpers(), node, compilerOptions); - if (externalHelpersImportDeclaration) { - const statements = []; - const statementOffset = factory2.copyPrologue(node.statements, statements); - append(statements, externalHelpersImportDeclaration); - addRange(statements, visitNodes2(node.statements, visitor, isStatement, statementOffset)); - return factory2.updateSourceFile( - node, - setTextRange(factory2.createNodeArray(statements), node.statements) - ); - } else { - return visitEachChild(node, visitor, context); - } - } - function visitor(node) { - switch (node.kind) { - case 271 /* ImportEqualsDeclaration */: - return getEmitModuleKind(compilerOptions) >= 100 /* Node16 */ ? visitImportEqualsDeclaration(node) : void 0; - case 277 /* ExportAssignment */: - return visitExportAssignment(node); - case 278 /* ExportDeclaration */: - const exportDecl = node; - return visitExportDeclaration(exportDecl); - } - return node; - } - function createRequireCall2(importNode) { - const moduleName = getExternalModuleNameLiteral(factory2, importNode, Debug.checkDefined(currentSourceFile), host, resolver, compilerOptions); - const args = []; - if (moduleName) { - args.push(moduleName); - } - if (!importRequireStatements) { - const createRequireName = factory2.createUniqueName("_createRequire", 16 /* Optimistic */ | 32 /* FileLevel */); - const importStatement = factory2.createImportDeclaration( - /*modifiers*/ - void 0, - factory2.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ - void 0, - factory2.createNamedImports([ - factory2.createImportSpecifier( - /*isTypeOnly*/ - false, - factory2.createIdentifier("createRequire"), - createRequireName - ) - ]) - ), - factory2.createStringLiteral("module") - ); - const requireHelperName = factory2.createUniqueName("__require", 16 /* Optimistic */ | 32 /* FileLevel */); - const requireStatement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - [ - factory2.createVariableDeclaration( - requireHelperName, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory2.createCallExpression( - factory2.cloneNode(createRequireName), - /*typeArguments*/ - void 0, - [ - factory2.createPropertyAccessExpression(factory2.createMetaProperty(102 /* ImportKeyword */, factory2.createIdentifier("meta")), factory2.createIdentifier("url")) - ] - ) - ) - ], - /*flags*/ - languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */ - ) - ); - importRequireStatements = [importStatement, requireStatement]; - } - const name = importRequireStatements[1].declarationList.declarations[0].name; - Debug.assertNode(name, isIdentifier); - return factory2.createCallExpression( - factory2.cloneNode(name), - /*typeArguments*/ - void 0, - args - ); - } - function visitImportEqualsDeclaration(node) { - Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); - let statements; - statements = append( - statements, - setOriginalNode( - setTextRange( - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - [ - factory2.createVariableDeclaration( - factory2.cloneNode(node.name), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - createRequireCall2(node) - ) - ], - /*flags*/ - languageVersion >= 2 /* ES2015 */ ? 2 /* Const */ : 0 /* None */ - ) - ), - node - ), - node - ) - ); - statements = appendExportsOfImportEqualsDeclaration(statements, node); - return singleOrMany(statements); - } - function appendExportsOfImportEqualsDeclaration(statements, node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { - statements = append(statements, factory2.createExportDeclaration( - /*modifiers*/ - void 0, - node.isTypeOnly, - factory2.createNamedExports([factory2.createExportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ - void 0, - idText(node.name) - )]) - )); - } - return statements; - } - function visitExportAssignment(node) { - return node.isExportEquals ? void 0 : node; - } - function visitExportDeclaration(node) { - if (compilerOptions.module !== void 0 && compilerOptions.module > 5 /* ES2015 */) { - return node; - } - if (!node.exportClause || !isNamespaceExport(node.exportClause) || !node.moduleSpecifier) { - return node; - } - const oldIdentifier = node.exportClause.name; - const synthName = factory2.getGeneratedNameForNode(oldIdentifier); - const importDecl = factory2.createImportDeclaration( - /*modifiers*/ - void 0, - factory2.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ - void 0, - factory2.createNamespaceImport( - synthName - ) - ), - node.moduleSpecifier, - node.assertClause - ); - setOriginalNode(importDecl, node.exportClause); - const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory2.createExportDefault(synthName) : factory2.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory2.createNamedExports([factory2.createExportSpecifier( - /*isTypeOnly*/ - false, - synthName, - oldIdentifier - )]) - ); - setOriginalNode(exportDecl, node); - return [importDecl, exportDecl]; - } - function onEmitNode(hint, node, emitCallback) { - if (isSourceFile(node)) { - if ((isExternalModule(node) || getIsolatedModules(compilerOptions)) && compilerOptions.importHelpers) { - helperNameSubstitutions = /* @__PURE__ */ new Map(); - } - previousOnEmitNode(hint, node, emitCallback); - helperNameSubstitutions = void 0; - } else { - previousOnEmitNode(hint, node, emitCallback); - } - } - function onSubstituteNode(hint, node) { - node = previousOnSubstituteNode(hint, node); - if (helperNameSubstitutions && isIdentifier(node) && getEmitFlags(node) & 8192 /* HelperName */) { - return substituteHelperName(node); - } - return node; - } - function substituteHelperName(node) { - const name = idText(node); - let substitution = helperNameSubstitutions.get(name); - if (!substitution) { - helperNameSubstitutions.set(name, substitution = factory2.createUniqueName(name, 16 /* Optimistic */ | 32 /* FileLevel */)); - } - return substitution; - } - } - var init_esnextAnd2015 = __esm({ - "src/compiler/transformers/module/esnextAnd2015.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/module/node.ts - function transformNodeModule(context) { - const previousOnSubstituteNode = context.onSubstituteNode; - const previousOnEmitNode = context.onEmitNode; - const esmTransform = transformECMAScriptModule(context); - const esmOnSubstituteNode = context.onSubstituteNode; - const esmOnEmitNode = context.onEmitNode; - context.onSubstituteNode = previousOnSubstituteNode; - context.onEmitNode = previousOnEmitNode; - const cjsTransform = transformModule(context); - const cjsOnSubstituteNode = context.onSubstituteNode; - const cjsOnEmitNode = context.onEmitNode; - context.onSubstituteNode = onSubstituteNode; - context.onEmitNode = onEmitNode; - context.enableSubstitution(312 /* SourceFile */); - context.enableEmitNotification(312 /* SourceFile */); - let currentSourceFile; - return transformSourceFileOrBundle; - function onSubstituteNode(hint, node) { - if (isSourceFile(node)) { - currentSourceFile = node; - return previousOnSubstituteNode(hint, node); - } else { - if (!currentSourceFile) { - return previousOnSubstituteNode(hint, node); - } - if (currentSourceFile.impliedNodeFormat === 99 /* ESNext */) { - return esmOnSubstituteNode(hint, node); - } - return cjsOnSubstituteNode(hint, node); - } - } - function onEmitNode(hint, node, emitCallback) { - if (isSourceFile(node)) { - currentSourceFile = node; - } - if (!currentSourceFile) { - return previousOnEmitNode(hint, node, emitCallback); - } - if (currentSourceFile.impliedNodeFormat === 99 /* ESNext */) { - return esmOnEmitNode(hint, node, emitCallback); - } - return cjsOnEmitNode(hint, node, emitCallback); - } - function getModuleTransformForFile(file) { - return file.impliedNodeFormat === 99 /* ESNext */ ? esmTransform : cjsTransform; - } - function transformSourceFile(node) { - if (node.isDeclarationFile) { - return node; - } - currentSourceFile = node; - const result = getModuleTransformForFile(node)(node); - currentSourceFile = void 0; - Debug.assert(isSourceFile(result)); - return result; - } - function transformSourceFileOrBundle(node) { - return node.kind === 312 /* SourceFile */ ? transformSourceFile(node) : transformBundle(node); - } - function transformBundle(node) { - return context.factory.createBundle(map(node.sourceFiles, transformSourceFile), node.prepends); - } - } - var init_node = __esm({ - "src/compiler/transformers/module/node.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/declarations/diagnostics.ts - function canProduceDiagnostics(node) { - return isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isBindingElement(node) || isSetAccessor(node) || isGetAccessor(node) || isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isParameter(node) || isTypeParameterDeclaration(node) || isExpressionWithTypeArguments(node) || isImportEqualsDeclaration(node) || isTypeAliasDeclaration(node) || isConstructorDeclaration(node) || isIndexSignatureDeclaration(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isJSDocTypeAlias(node); - } - function createGetSymbolAccessibilityDiagnosticForNodeName(node) { - if (isSetAccessor(node) || isGetAccessor(node)) { - return getAccessorNameVisibilityError; - } else if (isMethodSignature(node) || isMethodDeclaration(node)) { - return getMethodNameVisibilityError; - } else { - return createGetSymbolAccessibilityDiagnosticForNode(node); - } - function getAccessorNameVisibilityError(symbolAccessibilityResult) { - const diagnosticMessage = getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult); - return diagnosticMessage !== void 0 ? { - diagnosticMessage, - errorNode: node, - typeName: node.name - } : void 0; - } - function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (isStatic(node)) { - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 263 /* ClassDeclaration */) { - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; - } else { - return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; - } - } - function getMethodNameVisibilityError(symbolAccessibilityResult) { - const diagnosticMessage = getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult); - return diagnosticMessage !== void 0 ? { - diagnosticMessage, - errorNode: node, - typeName: node.name - } : void 0; - } - function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (isStatic(node)) { - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 263 /* ClassDeclaration */) { - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; - } else { - return symbolAccessibilityResult.errorModuleName ? Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; - } - } - } - function createGetSymbolAccessibilityDiagnosticForNode(node) { - if (isVariableDeclaration(node) || isPropertyDeclaration(node) || isPropertySignature(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node) || isBinaryExpression(node) || isBindingElement(node) || isConstructorDeclaration(node)) { - return getVariableDeclarationTypeVisibilityError; - } else if (isSetAccessor(node) || isGetAccessor(node)) { - return getAccessorDeclarationTypeVisibilityError; - } else if (isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isIndexSignatureDeclaration(node)) { - return getReturnTypeVisibilityError; - } else if (isParameter(node)) { - if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 8 /* Private */)) { - return getVariableDeclarationTypeVisibilityError; - } - return getParameterDeclarationTypeVisibilityError; - } else if (isTypeParameterDeclaration(node)) { - return getTypeParameterConstraintVisibilityError; - } else if (isExpressionWithTypeArguments(node)) { - return getHeritageClauseVisibilityError; - } else if (isImportEqualsDeclaration(node)) { - return getImportEntityNameVisibilityError; - } else if (isTypeAliasDeclaration(node) || isJSDocTypeAlias(node)) { - return getTypeAliasDeclarationVisibilityError; - } else { - return Debug.assertNever(node, `Attempted to set a declaration diagnostic context for unhandled node kind: ${Debug.formatSyntaxKind(node.kind)}`); - } - function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { - if (isStatic(node)) { - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) { - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; - } else { - return symbolAccessibilityResult.errorModuleName ? Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; - } - } - } - function getVariableDeclarationTypeVisibilityError(symbolAccessibilityResult) { - const diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult); - return diagnosticMessage !== void 0 ? { - diagnosticMessage, - errorNode: node, - typeName: node.name - } : void 0; - } - function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) { - let diagnosticMessage; - if (node.kind === 178 /* SetAccessor */) { - if (isStatic(node)) { - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1; - } else { - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1; - } - } else { - if (isStatic(node)) { - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? 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 : Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1; - } else { - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1; - } - } - return { - diagnosticMessage, - errorNode: node.name, - typeName: node.name - }; - } - function getReturnTypeVisibilityError(symbolAccessibilityResult) { - let diagnosticMessage; - switch (node.kind) { - case 180 /* ConstructSignature */: - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; - break; - case 179 /* CallSignature */: - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; - break; - case 181 /* IndexSignature */: - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; - break; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - if (isStatic(node)) { - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } else if (node.parent.kind === 263 /* ClassDeclaration */) { - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; - } else { - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; - } - break; - case 262 /* FunctionDeclaration */: - diagnosticMessage = symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; - break; - default: - return Debug.fail("This is unknown kind for signature: " + node.kind); - } - return { - diagnosticMessage, - errorNode: node.name || node - }; - } - function getParameterDeclarationTypeVisibilityError(symbolAccessibilityResult) { - const diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult); - return diagnosticMessage !== void 0 ? { - diagnosticMessage, - errorNode: node, - typeName: node.name - } : void 0; - } - function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { - switch (node.parent.kind) { - case 176 /* Constructor */: - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 180 /* ConstructSignature */: - case 185 /* ConstructorType */: - return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 179 /* CallSignature */: - return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 181 /* IndexSignature */: - return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - if (isStatic(node.parent)) { - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; - } else { - return symbolAccessibilityResult.errorModuleName ? Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; - } - case 262 /* FunctionDeclaration */: - case 184 /* FunctionType */: - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - case 178 /* SetAccessor */: - case 177 /* GetAccessor */: - return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1; - default: - return Debug.fail(`Unknown parent for parameter: ${Debug.formatSyntaxKind(node.parent.kind)}`); - } - } - function getTypeParameterConstraintVisibilityError() { - let diagnosticMessage; - switch (node.parent.kind) { - case 263 /* ClassDeclaration */: - diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; - break; - case 264 /* InterfaceDeclaration */: - diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; - break; - case 200 /* MappedType */: - diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1; - break; - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - diagnosticMessage = Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - break; - case 179 /* CallSignature */: - diagnosticMessage = Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - break; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - if (isStatic(node.parent)) { - diagnosticMessage = Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } else if (node.parent.parent.kind === 263 /* ClassDeclaration */) { - diagnosticMessage = Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; - } else { - diagnosticMessage = Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; - } - break; - case 184 /* FunctionType */: - case 262 /* FunctionDeclaration */: - diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; - break; - case 195 /* InferType */: - diagnosticMessage = Diagnostics.Extends_clause_for_inferred_type_0_has_or_is_using_private_name_1; - break; - case 265 /* TypeAliasDeclaration */: - diagnosticMessage = Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1; - break; - default: - return Debug.fail("This is unknown parent for type parameter: " + node.parent.kind); - } - return { - diagnosticMessage, - errorNode: node, - typeName: node.name - }; - } - function getHeritageClauseVisibilityError() { - let diagnosticMessage; - if (isClassDeclaration(node.parent.parent)) { - diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === 119 /* ImplementsKeyword */ ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; - } else { - diagnosticMessage = Diagnostics.extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; - } - return { - diagnosticMessage, - errorNode: node, - typeName: getNameOfDeclaration(node.parent.parent) - }; - } - function getImportEntityNameVisibilityError() { - return { - diagnosticMessage: Diagnostics.Import_declaration_0_is_using_private_name_1, - errorNode: node, - typeName: node.name - }; - } - function getTypeAliasDeclarationVisibilityError(symbolAccessibilityResult) { - return { - diagnosticMessage: symbolAccessibilityResult.errorModuleName ? Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2 : Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1, - errorNode: isJSDocTypeAlias(node) ? Debug.checkDefined(node.typeExpression) : node.type, - typeName: isJSDocTypeAlias(node) ? getNameOfDeclaration(node) : node.name - }; - } - } - var init_diagnostics = __esm({ - "src/compiler/transformers/declarations/diagnostics.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/transformers/declarations.ts - function getDeclarationDiagnostics(host, resolver, file) { - const compilerOptions = host.getCompilerOptions(); - const result = transformNodes( - resolver, - host, - factory, - compilerOptions, - file ? [file] : filter(host.getSourceFiles(), isSourceFileNotJson), - [transformDeclarations], - /*allowDtsFiles*/ - false - ); - return result.diagnostics; - } - function hasInternalAnnotation(range, currentSourceFile) { - const comment = currentSourceFile.text.substring(range.pos, range.end); - return stringContains(comment, "@internal"); - } - function isInternalDeclaration(node, currentSourceFile) { - const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === 169 /* Parameter */) { - const paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode); - const previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : void 0; - const text = currentSourceFile.text; - const commentRanges = previousSibling ? concatenate( - // to handle - // ... parameters, /** @internal */ - // public param: string - getTrailingCommentRanges(text, skipTrivia( - text, - previousSibling.end + 1, - /*stopAfterLineBreak*/ - false, - /*stopAtComments*/ - true - )), - getLeadingCommentRanges(text, node.pos) - ) : getTrailingCommentRanges(text, skipTrivia( - text, - node.pos, - /*stopAfterLineBreak*/ - false, - /*stopAtComments*/ - true - )); - return commentRanges && commentRanges.length && hasInternalAnnotation(last(commentRanges), currentSourceFile); - } - const leadingCommentRanges = parseTreeNode && getLeadingCommentRangesOfNode(parseTreeNode, currentSourceFile); - return !!forEach(leadingCommentRanges, (range) => { - return hasInternalAnnotation(range, currentSourceFile); - }); - } - function transformDeclarations(context) { - const throwDiagnostic = () => Debug.fail("Diagnostic emitted without context"); - let getSymbolAccessibilityDiagnostic = throwDiagnostic; - let needsDeclare = true; - let isBundledEmit = false; - let resultHasExternalModuleIndicator = false; - let needsScopeFixMarker = false; - let resultHasScopeMarker = false; - let enclosingDeclaration; - let necessaryTypeReferences; - let lateMarkedStatements; - let lateStatementReplacementMap; - let suppressNewDiagnosticContexts; - let exportedModulesFromDeclarationEmit; - const { factory: factory2 } = context; - const host = context.getEmitHost(); - const symbolTracker = { - trackSymbol, - reportInaccessibleThisError, - reportInaccessibleUniqueSymbolError, - reportCyclicStructureError, - reportPrivateInBaseOfClassExpression, - reportLikelyUnsafeImportRequiredError, - reportTruncationError, - moduleResolverHost: host, - trackReferencedAmbientModule, - trackExternalModuleSymbolOfImportTypeNode, - reportNonlocalAugmentation, - reportNonSerializableProperty, - reportImportTypeNodeResolutionModeOverride - }; - let errorNameNode; - let errorFallbackNode; - let currentSourceFile; - let refs; - let libs2; - let emittedImports; - const resolver = context.getEmitResolver(); - const options = context.getCompilerOptions(); - const { noResolve, stripInternal } = options; - return transformRoot; - function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives) { - if (!typeReferenceDirectives) { - return; - } - necessaryTypeReferences = necessaryTypeReferences || /* @__PURE__ */ new Set(); - for (const ref of typeReferenceDirectives) { - necessaryTypeReferences.add(ref); - } - } - function trackReferencedAmbientModule(node, symbol) { - const directives = resolver.getTypeReferenceDirectivesForSymbol(symbol, 67108863 /* All */); - if (length(directives)) { - return recordTypeReferenceDirectivesIfNecessary(directives); - } - const container = getSourceFileOfNode(node); - refs.set(getOriginalNodeId(container), container); - } - function handleSymbolAccessibilityError(symbolAccessibilityResult) { - if (symbolAccessibilityResult.accessibility === 0 /* Accessible */) { - if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) { - if (!lateMarkedStatements) { - lateMarkedStatements = symbolAccessibilityResult.aliasesToMakeVisible; - } else { - for (const ref of symbolAccessibilityResult.aliasesToMakeVisible) { - pushIfUnique(lateMarkedStatements, ref); - } - } - } - } else { - const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); - if (errorInfo) { - if (errorInfo.typeName) { - context.addDiagnostic(createDiagnosticForNode( - symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - getTextOfNode(errorInfo.typeName), - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName - )); - } else { - context.addDiagnostic(createDiagnosticForNode( - symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName - )); - } - return true; - } - } - return false; - } - function trackExternalModuleSymbolOfImportTypeNode(symbol) { - if (!isBundledEmit) { - (exportedModulesFromDeclarationEmit || (exportedModulesFromDeclarationEmit = [])).push(symbol); - } - } - function trackSymbol(symbol, enclosingDeclaration2, meaning) { - if (symbol.flags & 262144 /* TypeParameter */) - return false; - const issuedDiagnostic = handleSymbolAccessibilityError(resolver.isSymbolAccessible( - symbol, - enclosingDeclaration2, - meaning, - /*shouldComputeAliasToMarkVisible*/ - true - )); - recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning)); - return issuedDiagnostic; - } - function reportPrivateInBaseOfClassExpression(propertyName) { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic( - createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName) - ); - } - } - function errorDeclarationNameWithFallback() { - return errorNameNode ? declarationNameToString(errorNameNode) : errorFallbackNode && getNameOfDeclaration(errorFallbackNode) ? declarationNameToString(getNameOfDeclaration(errorFallbackNode)) : errorFallbackNode && isExportAssignment(errorFallbackNode) ? errorFallbackNode.isExportEquals ? "export=" : "default" : "(Missing)"; - } - function reportInaccessibleUniqueSymbolError() { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - "unique symbol" - )); - } - } - function reportCyclicStructureError() { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback() - )); - } - } - function reportInaccessibleThisError() { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - "this" - )); - } - } - function reportLikelyUnsafeImportRequiredError(specifier) { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - specifier - )); - } - } - function reportTruncationError() { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed)); - } - } - function reportNonlocalAugmentation(containingFile, parentSymbol, symbol) { - var _a; - const primaryDeclaration = (_a = parentSymbol.declarations) == null ? void 0 : _a.find((d) => getSourceFileOfNode(d) === containingFile); - const augmentingDeclarations = filter(symbol.declarations, (d) => getSourceFileOfNode(d) !== containingFile); - if (primaryDeclaration && augmentingDeclarations) { - for (const augmentations of augmentingDeclarations) { - context.addDiagnostic(addRelatedInfo( - createDiagnosticForNode(augmentations, Diagnostics.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized), - createDiagnosticForNode(primaryDeclaration, Diagnostics.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file) - )); - } - } - } - function reportNonSerializableProperty(propertyName) { - if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName)); - } - } - function reportImportTypeNodeResolutionModeOverride() { - if (!isNightly() && (errorNameNode || errorFallbackNode)) { - context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - } - function transformDeclarationsForJS(sourceFile, bundled) { - const oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = (s) => s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : { - diagnosticMessage: s.errorModuleName ? Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit : Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit, - errorNode: s.errorNode || sourceFile - }; - const result = resolver.getDeclarationStatementsForSourceFile(sourceFile, declarationEmitNodeBuilderFlags, symbolTracker, bundled); - getSymbolAccessibilityDiagnostic = oldDiag; - return result; - } - function transformRoot(node) { - if (node.kind === 312 /* SourceFile */ && node.isDeclarationFile) { - return node; - } - if (node.kind === 313 /* Bundle */) { - isBundledEmit = true; - refs = /* @__PURE__ */ new Map(); - libs2 = /* @__PURE__ */ new Map(); - let hasNoDefaultLib = false; - const bundle = factory2.createBundle(map( - node.sourceFiles, - (sourceFile) => { - if (sourceFile.isDeclarationFile) - return void 0; - hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib; - currentSourceFile = sourceFile; - enclosingDeclaration = sourceFile; - lateMarkedStatements = void 0; - suppressNewDiagnosticContexts = false; - lateStatementReplacementMap = /* @__PURE__ */ new Map(); - getSymbolAccessibilityDiagnostic = throwDiagnostic; - needsScopeFixMarker = false; - resultHasScopeMarker = false; - collectReferences(sourceFile, refs); - collectLibs(sourceFile, libs2); - if (isExternalOrCommonJsModule(sourceFile) || isJsonSourceFile(sourceFile)) { - resultHasExternalModuleIndicator = false; - needsDeclare = false; - const statements = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS( - sourceFile, - /*bundled*/ - true - )) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement); - const newFile = factory2.updateSourceFile( - sourceFile, - [factory2.createModuleDeclaration( - [factory2.createModifier(138 /* DeclareKeyword */)], - factory2.createStringLiteral(getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), - factory2.createModuleBlock(setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)) - )], - /*isDeclarationFile*/ - true, - /*referencedFiles*/ - [], - /*typeReferences*/ - [], - /*hasNoDefaultLib*/ - false, - /*libReferences*/ - [] - ); - return newFile; - } - needsDeclare = true; - const updated2 = isSourceFileJS(sourceFile) ? factory2.createNodeArray(transformDeclarationsForJS(sourceFile)) : visitNodes2(sourceFile.statements, visitDeclarationStatements, isStatement); - return factory2.updateSourceFile( - sourceFile, - transformAndReplaceLatePaintedStatements(updated2), - /*isDeclarationFile*/ - true, - /*referencedFiles*/ - [], - /*typeReferences*/ - [], - /*hasNoDefaultLib*/ - false, - /*libReferences*/ - [] - ); - } - ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 315 /* InputFiles */) { - const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); - hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; - collectReferences(sourceFile, refs); - recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, (ref) => [ref.fileName, ref.resolutionMode])); - collectLibs(sourceFile, libs2); - return sourceFile; - } - return prepend; - })); - bundle.syntheticFileReferences = []; - bundle.syntheticTypeReferences = getFileReferencesForUsedTypeReferences(); - bundle.syntheticLibReferences = getLibReferences(); - bundle.hasNoDefaultLib = hasNoDefaultLib; - const outputFilePath2 = getDirectoryPath(normalizeSlashes(getOutputPathsFor( - node, - host, - /*forceDtsPaths*/ - true - ).declarationFilePath)); - const referenceVisitor2 = mapReferencesIntoArray(bundle.syntheticFileReferences, outputFilePath2); - refs.forEach(referenceVisitor2); - return bundle; - } - needsDeclare = true; - needsScopeFixMarker = false; - resultHasScopeMarker = false; - enclosingDeclaration = node; - currentSourceFile = node; - getSymbolAccessibilityDiagnostic = throwDiagnostic; - isBundledEmit = false; - resultHasExternalModuleIndicator = false; - suppressNewDiagnosticContexts = false; - lateMarkedStatements = void 0; - lateStatementReplacementMap = /* @__PURE__ */ new Map(); - necessaryTypeReferences = void 0; - refs = collectReferences(currentSourceFile, /* @__PURE__ */ new Map()); - libs2 = collectLibs(currentSourceFile, /* @__PURE__ */ new Map()); - const references = []; - const outputFilePath = getDirectoryPath(normalizeSlashes(getOutputPathsFor( - node, - host, - /*forceDtsPaths*/ - true - ).declarationFilePath)); - const referenceVisitor = mapReferencesIntoArray(references, outputFilePath); - let combinedStatements; - if (isSourceFileJS(currentSourceFile)) { - combinedStatements = factory2.createNodeArray(transformDeclarationsForJS(node)); - refs.forEach(referenceVisitor); - emittedImports = filter(combinedStatements, isAnyImportSyntax); - } else { - const statements = visitNodes2(node.statements, visitDeclarationStatements, isStatement); - combinedStatements = setTextRange(factory2.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements); - refs.forEach(referenceVisitor); - emittedImports = filter(combinedStatements, isAnyImportSyntax); - if (isExternalModule(node) && (!resultHasExternalModuleIndicator || needsScopeFixMarker && !resultHasScopeMarker)) { - combinedStatements = setTextRange(factory2.createNodeArray([...combinedStatements, createEmptyExports(factory2)]), combinedStatements); - } - } - const updated = factory2.updateSourceFile( - node, - combinedStatements, - /*isDeclarationFile*/ - true, - references, - getFileReferencesForUsedTypeReferences(), - node.hasNoDefaultLib, - getLibReferences() - ); - updated.exportedModulesFromDeclarationEmit = exportedModulesFromDeclarationEmit; - return updated; - function getLibReferences() { - return arrayFrom(libs2.keys(), (lib) => ({ fileName: lib, pos: -1, end: -1 })); - } - function getFileReferencesForUsedTypeReferences() { - return necessaryTypeReferences ? mapDefined(arrayFrom(necessaryTypeReferences.keys()), getFileReferenceForSpecifierModeTuple) : []; - } - function getFileReferenceForSpecifierModeTuple([typeName, mode]) { - if (emittedImports) { - for (const importStatement of emittedImports) { - if (isImportEqualsDeclaration(importStatement) && isExternalModuleReference(importStatement.moduleReference)) { - const expr = importStatement.moduleReference.expression; - if (isStringLiteralLike(expr) && expr.text === typeName) { - return void 0; - } - } else if (isImportDeclaration(importStatement) && isStringLiteral(importStatement.moduleSpecifier) && importStatement.moduleSpecifier.text === typeName) { - return void 0; - } - } - } - return { fileName: typeName, pos: -1, end: -1, ...mode ? { resolutionMode: mode } : void 0 }; - } - function mapReferencesIntoArray(references2, outputFilePath2) { - return (file) => { - let declFileName; - if (file.isDeclarationFile) { - declFileName = file.fileName; - } else { - if (isBundledEmit && contains(node.sourceFiles, file)) - return; - const paths = getOutputPathsFor( - file, - host, - /*forceDtsPaths*/ - true - ); - declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName; - } - if (declFileName) { - const specifier = getModuleSpecifier( - options, - currentSourceFile, - toPath(outputFilePath2, host.getCurrentDirectory(), host.getCanonicalFileName), - toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), - host - ); - if (!pathIsRelative(specifier)) { - recordTypeReferenceDirectivesIfNecessary([[ - specifier, - /*mode*/ - void 0 - ]]); - return; - } - let fileName = getRelativePathToDirectoryOrUrl( - outputFilePath2, - declFileName, - host.getCurrentDirectory(), - host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ - false - ); - if (startsWith(fileName, "./") && hasExtension(fileName)) { - fileName = fileName.substring(2); - } - if (startsWith(fileName, "node_modules/") || pathContainsNodeModules(fileName)) { - return; - } - references2.push({ pos: -1, end: -1, fileName }); - } - }; - } - } - function collectReferences(sourceFile, ret) { - if (noResolve || !isUnparsedSource(sourceFile) && isSourceFileJS(sourceFile)) - return ret; - forEach(sourceFile.referencedFiles, (f) => { - const elem = host.getSourceFileFromReference(sourceFile, f); - if (elem) { - ret.set(getOriginalNodeId(elem), elem); - } - }); - return ret; - } - function collectLibs(sourceFile, ret) { - forEach(sourceFile.libReferenceDirectives, (ref) => { - const lib = host.getLibFileFromReference(ref); - if (lib) { - ret.set(toFileNameLowerCase(ref.fileName), true); - } - }); - return ret; - } - function filterBindingPatternInitializersAndRenamings(name) { - if (name.kind === 80 /* Identifier */) { - return name; - } else { - if (name.kind === 207 /* ArrayBindingPattern */) { - return factory2.updateArrayBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isArrayBindingElement)); - } else { - return factory2.updateObjectBindingPattern(name, visitNodes2(name.elements, visitBindingElement, isBindingElement)); - } - } - function visitBindingElement(elem) { - if (elem.kind === 232 /* OmittedExpression */) { - return elem; - } - if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { - return factory2.updateBindingElement( - elem, - elem.dotDotDotToken, - /*propertyName*/ - void 0, - elem.propertyName, - shouldPrintWithInitializer(elem) ? elem.initializer : void 0 - ); - } - return factory2.updateBindingElement( - elem, - elem.dotDotDotToken, - elem.propertyName, - filterBindingPatternInitializersAndRenamings(elem.name), - shouldPrintWithInitializer(elem) ? elem.initializer : void 0 - ); - } - } - function ensureParameter(p, modifierMask, type) { - let oldDiag; - if (!suppressNewDiagnosticContexts) { - oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p); - } - const newParam = factory2.updateParameterDeclaration( - p, - maskModifiers(factory2, p, modifierMask), - p.dotDotDotToken, - filterBindingPatternInitializersAndRenamings(p.name), - resolver.isOptionalParameter(p) ? p.questionToken || factory2.createToken(58 /* QuestionToken */) : void 0, - ensureType( - p, - type || p.type, - /*ignorePrivate*/ - true - ), - // Ignore private param props, since this type is going straight back into a param - ensureNoInitializer(p) - ); - if (!suppressNewDiagnosticContexts) { - getSymbolAccessibilityDiagnostic = oldDiag; - } - return newParam; - } - function shouldPrintWithInitializer(node) { - return canHaveLiteralInitializer(node) && resolver.isLiteralConstDeclaration(getParseTreeNode(node)); - } - function ensureNoInitializer(node) { - if (shouldPrintWithInitializer(node)) { - return resolver.createLiteralConstValue(getParseTreeNode(node), symbolTracker); - } - return void 0; - } - function ensureType(node, type, ignorePrivate) { - if (!ignorePrivate && hasEffectiveModifier(node, 8 /* Private */)) { - return; - } - if (shouldPrintWithInitializer(node)) { - return; - } - const shouldUseResolverType = node.kind === 169 /* Parameter */ && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); - if (type && !shouldUseResolverType) { - return visitNode(type, visitDeclarationSubtree, isTypeNode); - } - if (!getParseTreeNode(node)) { - return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory2.createKeywordTypeNode(133 /* AnyKeyword */); - } - if (node.kind === 178 /* SetAccessor */) { - return factory2.createKeywordTypeNode(133 /* AnyKeyword */); - } - errorNameNode = node.name; - let oldDiag; - if (!suppressNewDiagnosticContexts) { - oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); - } - if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { - return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); - } - if (node.kind === 169 /* Parameter */ || node.kind === 172 /* PropertyDeclaration */ || node.kind === 171 /* PropertySignature */) { - if (isPropertySignature(node) || !node.initializer) - return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); - return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); - } - return cleanup(resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); - function cleanup(returnValue) { - errorNameNode = void 0; - if (!suppressNewDiagnosticContexts) { - getSymbolAccessibilityDiagnostic = oldDiag; - } - return returnValue || factory2.createKeywordTypeNode(133 /* AnyKeyword */); - } - } - function isDeclarationAndNotVisible(node) { - node = getParseTreeNode(node); - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 267 /* ModuleDeclaration */: - case 264 /* InterfaceDeclaration */: - case 263 /* ClassDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 266 /* EnumDeclaration */: - return !resolver.isDeclarationVisible(node); - case 260 /* VariableDeclaration */: - return !getBindingNameVisible(node); - case 271 /* ImportEqualsDeclaration */: - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 277 /* ExportAssignment */: - return false; - case 175 /* ClassStaticBlockDeclaration */: - return true; - } - return false; - } - function shouldEmitFunctionProperties(input) { - var _a; - if (input.body) { - return true; - } - const overloadSignatures = (_a = input.symbol.declarations) == null ? void 0 : _a.filter((decl) => isFunctionDeclaration(decl) && !decl.body); - return !overloadSignatures || overloadSignatures.indexOf(input) === overloadSignatures.length - 1; - } - function getBindingNameVisible(elem) { - if (isOmittedExpression(elem)) { - return false; - } - if (isBindingPattern(elem.name)) { - return some(elem.name.elements, getBindingNameVisible); - } else { - return resolver.isDeclarationVisible(elem); - } - } - function updateParamsList(node, params, modifierMask) { - if (hasEffectiveModifier(node, 8 /* Private */)) { - return factory2.createNodeArray(); - } - const newParams = map(params, (p) => ensureParameter(p, modifierMask)); - if (!newParams) { - return factory2.createNodeArray(); - } - return factory2.createNodeArray(newParams, params.hasTrailingComma); - } - function updateAccessorParamsList(input, isPrivate) { - let newParams; - if (!isPrivate) { - const thisParameter = getThisParameter(input); - if (thisParameter) { - newParams = [ensureParameter(thisParameter)]; - } - } - if (isSetAccessorDeclaration(input)) { - let newValueParameter; - if (!isPrivate) { - const valueParameter = getSetAccessorValueParameter(input); - if (valueParameter) { - const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); - newValueParameter = ensureParameter( - valueParameter, - /*modifierMask*/ - void 0, - accessorType - ); - } - } - if (!newValueParameter) { - newValueParameter = factory2.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "value" - ); - } - newParams = append(newParams, newValueParameter); - } - return factory2.createNodeArray(newParams || emptyArray); - } - function ensureTypeParams(node, params) { - return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration); - } - function isEnclosingDeclaration(node) { - return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); - } - function checkEntityNameVisibility(entityName, enclosingDeclaration2) { - const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration2); - handleSymbolAccessibilityError(visibilityResult); - recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); - } - function preserveJsDoc(updated, original) { - if (hasJSDocNodes(updated) && hasJSDocNodes(original)) { - updated.jsDoc = original.jsDoc; - } - return setCommentRange(updated, getCommentRange(original)); - } - function rewriteModuleSpecifier(parent2, input) { - if (!input) - return void 0; - resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent2.kind !== 267 /* ModuleDeclaration */ && parent2.kind !== 205 /* ImportType */; - if (isStringLiteralLike(input)) { - if (isBundledEmit) { - const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent2); - if (newName) { - return factory2.createStringLiteral(newName); - } - } else { - const symbol = resolver.getSymbolOfExternalModuleSpecifier(input); - if (symbol) { - (exportedModulesFromDeclarationEmit || (exportedModulesFromDeclarationEmit = [])).push(symbol); - } - } - } - return input; - } - function transformImportEqualsDeclaration(decl) { - if (!resolver.isDeclarationVisible(decl)) - return; - if (decl.moduleReference.kind === 283 /* ExternalModuleReference */) { - const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); - return factory2.updateImportEqualsDeclaration( - decl, - decl.modifiers, - decl.isTypeOnly, - decl.name, - factory2.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier(decl, specifier)) - ); - } else { - const oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(decl); - checkEntityNameVisibility(decl.moduleReference, enclosingDeclaration); - getSymbolAccessibilityDiagnostic = oldDiag; - return decl; - } - } - function transformImportDeclaration(decl) { - if (!decl.importClause) { - return factory2.updateImportDeclaration( - decl, - decl.modifiers, - decl.importClause, - rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) - ); - } - const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0; - if (!decl.importClause.namedBindings) { - return visibleDefaultBinding && factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - /*namedBindings*/ - void 0 - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); - } - if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) { - const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( - /*namedBindings*/ - void 0 - ); - return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - namedBindings - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : void 0; - } - const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver.isDeclarationVisible(b) ? b : void 0); - if (bindingList && bindingList.length || visibleDefaultBinding) { - return factory2.updateImportDeclaration( - decl, - decl.modifiers, - factory2.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0 - ), - rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) - ); - } - if (resolver.isImportRequiredByAugmentation(decl)) { - return factory2.updateImportDeclaration( - decl, - decl.modifiers, - /*importClause*/ - void 0, - rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) - ); - } - } - function getResolutionModeOverrideForClauseInNightly(assertClause) { - const mode = getResolutionModeOverrideForClause(assertClause); - if (mode !== void 0) { - if (!isNightly()) { - context.addDiagnostic(createDiagnosticForNode(assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - return assertClause; - } - return void 0; - } - function transformAndReplaceLatePaintedStatements(statements) { - while (length(lateMarkedStatements)) { - const i = lateMarkedStatements.shift(); - if (!isLateVisibilityPaintedStatement(i)) { - return Debug.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${Debug.formatSyntaxKind(i.kind)}`); - } - const priorNeedsDeclare = needsDeclare; - needsDeclare = i.parent && isSourceFile(i.parent) && !(isExternalModule(i.parent) && isBundledEmit); - const result = transformTopLevelDeclaration(i); - needsDeclare = priorNeedsDeclare; - lateStatementReplacementMap.set(getOriginalNodeId(i), result); - } - return visitNodes2(statements, visitLateVisibilityMarkedStatements, isStatement); - function visitLateVisibilityMarkedStatements(statement) { - if (isLateVisibilityPaintedStatement(statement)) { - const key = getOriginalNodeId(statement); - if (lateStatementReplacementMap.has(key)) { - const result = lateStatementReplacementMap.get(key); - lateStatementReplacementMap.delete(key); - if (result) { - if (isArray(result) ? some(result, needsScopeMarker) : needsScopeMarker(result)) { - needsScopeFixMarker = true; - } - if (isSourceFile(statement.parent) && (isArray(result) ? some(result, isExternalModuleIndicator) : isExternalModuleIndicator(result))) { - resultHasExternalModuleIndicator = true; - } - } - return result; - } - } - return statement; - } - } - function visitDeclarationSubtree(input) { - if (shouldStripInternal(input)) - return; - if (isDeclaration(input)) { - if (isDeclarationAndNotVisible(input)) - return; - if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input))) { - return; - } - } - if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) - return; - if (isSemicolonClassElement(input)) - return; - let previousEnclosingDeclaration; - if (isEnclosingDeclaration(input)) { - previousEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = input; - } - const oldDiag = getSymbolAccessibilityDiagnostic; - const canProduceDiagnostic = canProduceDiagnostics(input); - const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */; - if (isMethodDeclaration(input) || isMethodSignature(input)) { - if (hasEffectiveModifier(input, 8 /* Private */)) { - if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) - return; - return cleanup(factory2.createPropertyDeclaration( - ensureModifiers(input), - input.name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - )); - } - } - if (canProduceDiagnostic && !suppressNewDiagnosticContexts) { - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(input); - } - if (isTypeQueryNode(input)) { - checkEntityNameVisibility(input.exprName, enclosingDeclaration); - } - if (shouldEnterSuppressNewDiagnosticsContextContext) { - suppressNewDiagnosticContexts = true; - } - if (isProcessedComponent(input)) { - switch (input.kind) { - case 233 /* ExpressionWithTypeArguments */: { - if (isEntityName(input.expression) || isEntityNameExpression(input.expression)) { - checkEntityNameVisibility(input.expression, enclosingDeclaration); - } - const node = visitEachChild(input, visitDeclarationSubtree, context); - return cleanup(factory2.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); - } - case 183 /* TypeReference */: { - checkEntityNameVisibility(input.typeName, enclosingDeclaration); - const node = visitEachChild(input, visitDeclarationSubtree, context); - return cleanup(factory2.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); - } - case 180 /* ConstructSignature */: - return cleanup(factory2.updateConstructSignature( - input, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type) - )); - case 176 /* Constructor */: { - const ctor = factory2.createConstructorDeclaration( - /*modifiers*/ - ensureModifiers(input), - updateParamsList(input, input.parameters, 0 /* None */), - /*body*/ - void 0 - ); - return cleanup(ctor); - } - case 174 /* MethodDeclaration */: { - if (isPrivateIdentifier(input.name)) { - return cleanup( - /*returnValue*/ - void 0 - ); - } - const sig = factory2.createMethodDeclaration( - ensureModifiers(input), - /*asteriskToken*/ - void 0, - input.name, - input.questionToken, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type), - /*body*/ - void 0 - ); - return cleanup(sig); - } - case 177 /* GetAccessor */: { - if (isPrivateIdentifier(input.name)) { - return cleanup( - /*returnValue*/ - void 0 - ); - } - const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); - return cleanup(factory2.updateGetAccessorDeclaration( - input, - ensureModifiers(input), - input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)), - ensureType(input, accessorType), - /*body*/ - void 0 - )); - } - case 178 /* SetAccessor */: { - if (isPrivateIdentifier(input.name)) { - return cleanup( - /*returnValue*/ - void 0 - ); - } - return cleanup(factory2.updateSetAccessorDeclaration( - input, - ensureModifiers(input), - input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)), - /*body*/ - void 0 - )); - } - case 172 /* PropertyDeclaration */: - if (isPrivateIdentifier(input.name)) { - return cleanup( - /*returnValue*/ - void 0 - ); - } - return cleanup(factory2.updatePropertyDeclaration( - input, - ensureModifiers(input), - input.name, - input.questionToken, - ensureType(input, input.type), - ensureNoInitializer(input) - )); - case 171 /* PropertySignature */: - if (isPrivateIdentifier(input.name)) { - return cleanup( - /*returnValue*/ - void 0 - ); - } - return cleanup(factory2.updatePropertySignature( - input, - ensureModifiers(input), - input.name, - input.questionToken, - ensureType(input, input.type) - )); - case 173 /* MethodSignature */: { - if (isPrivateIdentifier(input.name)) { - return cleanup( - /*returnValue*/ - void 0 - ); - } - return cleanup(factory2.updateMethodSignature( - input, - ensureModifiers(input), - input.name, - input.questionToken, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type) - )); - } - case 179 /* CallSignature */: { - return cleanup(factory2.updateCallSignature( - input, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type) - )); - } - case 181 /* IndexSignature */: { - return cleanup(factory2.updateIndexSignature( - input, - ensureModifiers(input), - updateParamsList(input, input.parameters), - visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory2.createKeywordTypeNode(133 /* AnyKeyword */) - )); - } - case 260 /* VariableDeclaration */: { - if (isBindingPattern(input.name)) { - return recreateBindingPattern(input.name); - } - shouldEnterSuppressNewDiagnosticsContextContext = true; - suppressNewDiagnosticContexts = true; - return cleanup(factory2.updateVariableDeclaration( - input, - input.name, - /*exclamationToken*/ - void 0, - ensureType(input, input.type), - ensureNoInitializer(input) - )); - } - case 168 /* TypeParameter */: { - if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { - return cleanup(factory2.updateTypeParameterDeclaration( - input, - input.modifiers, - input.name, - /*constraint*/ - void 0, - /*defaultType*/ - void 0 - )); - } - return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); - } - case 194 /* ConditionalType */: { - const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); - const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); - const oldEnclosingDecl = enclosingDeclaration; - enclosingDeclaration = input.trueType; - const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode); - enclosingDeclaration = oldEnclosingDecl; - const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode); - Debug.assert(checkType); - Debug.assert(extendsType); - Debug.assert(trueType); - Debug.assert(falseType); - return cleanup(factory2.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); - } - case 184 /* FunctionType */: { - return cleanup(factory2.updateFunctionTypeNode(input, visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); - } - case 185 /* ConstructorType */: { - return cleanup(factory2.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); - } - case 205 /* ImportType */: { - if (!isLiteralImportTypeNode(input)) - return cleanup(input); - return cleanup(factory2.updateImportTypeNode( - input, - factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), - input.assertions, - input.qualifier, - visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode), - input.isTypeOf - )); - } - default: - Debug.assertNever(input, `Attempted to process unhandled node kind: ${Debug.formatSyntaxKind(input.kind)}`); - } - } - if (isTupleTypeNode(input) && getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === getLineAndCharacterOfPosition(currentSourceFile, input.end).line) { - setEmitFlags(input, 1 /* SingleLine */); - } - return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); - function cleanup(returnValue) { - if (returnValue && canProduceDiagnostic && hasDynamicName(input)) { - checkName(input); - } - if (isEnclosingDeclaration(input)) { - enclosingDeclaration = previousEnclosingDeclaration; - } - if (canProduceDiagnostic && !suppressNewDiagnosticContexts) { - getSymbolAccessibilityDiagnostic = oldDiag; - } - if (shouldEnterSuppressNewDiagnosticsContextContext) { - suppressNewDiagnosticContexts = oldWithinObjectLiteralType; - } - if (returnValue === input) { - return returnValue; - } - return returnValue && setOriginalNode(preserveJsDoc(returnValue, input), input); - } - } - function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); - } - function visitDeclarationStatements(input) { - if (!isPreservedDeclarationStatement(input)) { - return; - } - if (shouldStripInternal(input)) - return; - switch (input.kind) { - case 278 /* ExportDeclaration */: { - if (isSourceFile(input.parent)) { - resultHasExternalModuleIndicator = true; - } - resultHasScopeMarker = true; - return factory2.updateExportDeclaration( - input, - input.modifiers, - input.isTypeOnly, - input.exportClause, - rewriteModuleSpecifier(input, input.moduleSpecifier), - getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 - ); - } - case 277 /* ExportAssignment */: { - if (isSourceFile(input.parent)) { - resultHasExternalModuleIndicator = true; - } - resultHasScopeMarker = true; - if (input.expression.kind === 80 /* Identifier */) { - return input; - } else { - const newId = factory2.createUniqueName("_default", 16 /* Optimistic */); - getSymbolAccessibilityDiagnostic = () => ({ - diagnosticMessage: Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0, - errorNode: input - }); - errorFallbackNode = input; - const varDecl = factory2.createVariableDeclaration( - newId, - /*exclamationToken*/ - void 0, - resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), - /*initializer*/ - void 0 - ); - errorFallbackNode = void 0; - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(138 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); - preserveJsDoc(statement, input); - removeAllComments(input); - return [statement, factory2.updateExportAssignment(input, input.modifiers, newId)]; - } - } - } - const result = transformTopLevelDeclaration(input); - lateStatementReplacementMap.set(getOriginalNodeId(input), result); - return input; - } - function stripExportModifiers(statement) { - if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 1024 /* Default */) || !canHaveModifiers(statement)) { - return statement; - } - const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (258047 /* All */ ^ 1 /* Export */)); - return factory2.updateModifiers(statement, modifiers); - } - function updateModuleDeclarationAndKeyword(node, modifiers, name, body) { - const updated = factory2.updateModuleDeclaration(node, modifiers, name, body); - if (isAmbientModule(updated) || updated.flags & 32 /* Namespace */) { - return updated; - } - const fixed = factory2.createModuleDeclaration( - updated.modifiers, - updated.name, - updated.body, - updated.flags | 32 /* Namespace */ - ); - setOriginalNode(fixed, updated); - setTextRange(fixed, updated); - return fixed; - } - function transformTopLevelDeclaration(input) { - if (lateMarkedStatements) { - while (orderedRemoveItem(lateMarkedStatements, input)) - ; - } - if (shouldStripInternal(input)) - return; - switch (input.kind) { - case 271 /* ImportEqualsDeclaration */: { - return transformImportEqualsDeclaration(input); - } - case 272 /* ImportDeclaration */: { - return transformImportDeclaration(input); - } - } - if (isDeclaration(input) && isDeclarationAndNotVisible(input)) - return; - if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) - return; - let previousEnclosingDeclaration; - if (isEnclosingDeclaration(input)) { - previousEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = input; - } - const canProdiceDiagnostic = canProduceDiagnostics(input); - const oldDiag = getSymbolAccessibilityDiagnostic; - if (canProdiceDiagnostic) { - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(input); - } - const previousNeedsDeclare = needsDeclare; - switch (input.kind) { - case 265 /* TypeAliasDeclaration */: { - needsDeclare = false; - const clean2 = cleanup(factory2.updateTypeAliasDeclaration( - input, - ensureModifiers(input), - input.name, - visitNodes2(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)) - )); - needsDeclare = previousNeedsDeclare; - return clean2; - } - case 264 /* InterfaceDeclaration */: { - return cleanup(factory2.updateInterfaceDeclaration( - input, - ensureModifiers(input), - input.name, - ensureTypeParams(input, input.typeParameters), - transformHeritageClauses(input.heritageClauses), - visitNodes2(input.members, visitDeclarationSubtree, isTypeElement) - )); - } - case 262 /* FunctionDeclaration */: { - const clean2 = cleanup(factory2.updateFunctionDeclaration( - input, - ensureModifiers(input), - /*asteriskToken*/ - void 0, - input.name, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type), - /*body*/ - void 0 - )); - if (clean2 && resolver.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) { - const props = resolver.getPropertiesOfContainerFunction(input); - const fakespace = parseNodeFactory.createModuleDeclaration( - /*modifiers*/ - void 0, - clean2.name || factory2.createIdentifier("_default"), - factory2.createModuleBlock([]), - 32 /* Namespace */ - ); - setParent(fakespace, enclosingDeclaration); - fakespace.locals = createSymbolTable(props); - fakespace.symbol = props[0].parent; - const exportMappings = []; - let declarations = mapDefined(props, (p) => { - if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) { - return void 0; - } - const nameStr = unescapeLeadingUnderscores(p.escapedName); - if (!isIdentifierText(nameStr, 99 /* ESNext */)) { - return void 0; - } - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration); - const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker); - getSymbolAccessibilityDiagnostic = oldDiag; - const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr); - const name = isNonContextualKeywordName ? factory2.getGeneratedNameForNode(p.valueDeclaration) : factory2.createIdentifier(nameStr); - if (isNonContextualKeywordName) { - exportMappings.push([name, nameStr]); - } - const varDecl = factory2.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - type, - /*initializer*/ - void 0 - ); - return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(95 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); - }); - if (!exportMappings.length) { - declarations = mapDefined(declarations, (declaration) => factory2.updateModifiers(declaration, 0 /* None */)); - } else { - declarations.push(factory2.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory2.createNamedExports(map(exportMappings, ([gen, exp]) => { - return factory2.createExportSpecifier( - /*isTypeOnly*/ - false, - gen, - exp - ); - })) - )); - } - const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */); - if (!hasEffectiveModifier(clean2, 1024 /* Default */)) { - return [clean2, namespaceDecl]; - } - const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~1025 /* ExportDefault */ | 2 /* Ambient */); - const cleanDeclaration = factory2.updateFunctionDeclaration( - clean2, - modifiers, - /*asteriskToken*/ - void 0, - clean2.name, - clean2.typeParameters, - clean2.parameters, - clean2.type, - /*body*/ - void 0 - ); - const namespaceDeclaration = factory2.updateModuleDeclaration( - namespaceDecl, - modifiers, - namespaceDecl.name, - namespaceDecl.body - ); - const exportDefaultDeclaration = factory2.createExportAssignment( - /*modifiers*/ - void 0, - /*isExportEquals*/ - false, - namespaceDecl.name - ); - if (isSourceFile(input.parent)) { - resultHasExternalModuleIndicator = true; - } - resultHasScopeMarker = true; - return [cleanDeclaration, namespaceDeclaration, exportDefaultDeclaration]; - } else { - return clean2; - } - } - case 267 /* ModuleDeclaration */: { - needsDeclare = false; - const inner = input.body; - if (inner && inner.kind === 268 /* ModuleBlock */) { - const oldNeedsScopeFix = needsScopeFixMarker; - const oldHasScopeFix = resultHasScopeMarker; - resultHasScopeMarker = false; - needsScopeFixMarker = false; - const statements = visitNodes2(inner.statements, visitDeclarationStatements, isStatement); - let lateStatements = transformAndReplaceLatePaintedStatements(statements); - if (input.flags & 33554432 /* Ambient */) { - needsScopeFixMarker = false; - } - if (!isGlobalScopeAugmentation(input) && !hasScopeMarker2(lateStatements) && !resultHasScopeMarker) { - if (needsScopeFixMarker) { - lateStatements = factory2.createNodeArray([...lateStatements, createEmptyExports(factory2)]); - } else { - lateStatements = visitNodes2(lateStatements, stripExportModifiers, isStatement); - } - } - const body = factory2.updateModuleBlock(inner, lateStatements); - needsDeclare = previousNeedsDeclare; - needsScopeFixMarker = oldNeedsScopeFix; - resultHasScopeMarker = oldHasScopeFix; - const mods = ensureModifiers(input); - return cleanup(updateModuleDeclarationAndKeyword( - input, - mods, - isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, - body - )); - } else { - needsDeclare = previousNeedsDeclare; - const mods = ensureModifiers(input); - needsDeclare = false; - visitNode(inner, visitDeclarationStatements); - const id = getOriginalNodeId(inner); - const body = lateStatementReplacementMap.get(id); - lateStatementReplacementMap.delete(id); - return cleanup(updateModuleDeclarationAndKeyword( - input, - mods, - input.name, - body - )); - } - } - case 263 /* ClassDeclaration */: { - errorNameNode = input.name; - errorFallbackNode = input; - const modifiers = factory2.createNodeArray(ensureModifiers(input)); - const typeParameters = ensureTypeParams(input, input.typeParameters); - const ctor = getFirstConstructorWithBody(input); - let parameterProperties; - if (ctor) { - const oldDiag2 = getSymbolAccessibilityDiagnostic; - parameterProperties = compact(flatMap(ctor.parameters, (param) => { - if (!hasSyntacticModifier(param, 16476 /* ParameterPropertyModifier */) || shouldStripInternal(param)) - return; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(param); - if (param.name.kind === 80 /* Identifier */) { - return preserveJsDoc(factory2.createPropertyDeclaration( - ensureModifiers(param), - param.name, - param.questionToken, - ensureType(param, param.type), - ensureNoInitializer(param) - ), param); - } else { - return walkBindingPattern(param.name); - } - function walkBindingPattern(pattern) { - let elems; - for (const elem of pattern.elements) { - if (isOmittedExpression(elem)) - continue; - if (isBindingPattern(elem.name)) { - elems = concatenate(elems, walkBindingPattern(elem.name)); - } - elems = elems || []; - elems.push(factory2.createPropertyDeclaration( - ensureModifiers(param), - elem.name, - /*questionOrExclamationToken*/ - void 0, - ensureType( - elem, - /*type*/ - void 0 - ), - /*initializer*/ - void 0 - )); - } - return elems; - } - })); - getSymbolAccessibilityDiagnostic = oldDiag2; - } - const hasPrivateIdentifier = some(input.members, (member) => !!member.name && isPrivateIdentifier(member.name)); - const privateIdentifier = hasPrivateIdentifier ? [ - factory2.createPropertyDeclaration( - /*modifiers*/ - void 0, - factory2.createPrivateIdentifier("#private"), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ) - ] : void 0; - const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes2(input.members, visitDeclarationSubtree, isClassElement)); - const members = factory2.createNodeArray(memberNodes); - const extendsClause = getEffectiveBaseTypeNode(input); - if (extendsClause && !isEntityNameExpression(extendsClause.expression) && extendsClause.expression.kind !== 106 /* NullKeyword */) { - const oldId = input.name ? unescapeLeadingUnderscores(input.name.escapedText) : "default"; - const newId = factory2.createUniqueName(`${oldId}_base`, 16 /* Optimistic */); - getSymbolAccessibilityDiagnostic = () => ({ - diagnosticMessage: Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1, - errorNode: extendsClause, - typeName: input.name - }); - const varDecl = factory2.createVariableDeclaration( - newId, - /*exclamationToken*/ - void 0, - resolver.createTypeOfExpression(extendsClause.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), - /*initializer*/ - void 0 - ); - const statement = factory2.createVariableStatement(needsDeclare ? [factory2.createModifier(138 /* DeclareKeyword */)] : [], factory2.createVariableDeclarationList([varDecl], 2 /* Const */)); - const heritageClauses = factory2.createNodeArray(map(input.heritageClauses, (clause) => { - if (clause.token === 96 /* ExtendsKeyword */) { - const oldDiag2 = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]); - const newClause = factory2.updateHeritageClause(clause, map(clause.types, (t) => factory2.updateExpressionWithTypeArguments(t, newId, visitNodes2(t.typeArguments, visitDeclarationSubtree, isTypeNode)))); - getSymbolAccessibilityDiagnostic = oldDiag2; - return newClause; - } - return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 106 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); - })); - return [statement, cleanup(factory2.updateClassDeclaration( - input, - modifiers, - input.name, - typeParameters, - heritageClauses, - members - ))]; - } else { - const heritageClauses = transformHeritageClauses(input.heritageClauses); - return cleanup(factory2.updateClassDeclaration( - input, - modifiers, - input.name, - typeParameters, - heritageClauses, - members - )); - } - } - case 243 /* VariableStatement */: { - return cleanup(transformVariableStatement(input)); - } - case 266 /* EnumDeclaration */: { - return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { - if (shouldStripInternal(m)) - return; - const constValue = resolver.getConstantValue(m); - return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m); - })))); - } - } - return Debug.assertNever(input, `Unhandled top-level node in declaration emit: ${Debug.formatSyntaxKind(input.kind)}`); - function cleanup(node) { - if (isEnclosingDeclaration(input)) { - enclosingDeclaration = previousEnclosingDeclaration; - } - if (canProdiceDiagnostic) { - getSymbolAccessibilityDiagnostic = oldDiag; - } - if (input.kind === 267 /* ModuleDeclaration */) { - needsDeclare = previousNeedsDeclare; - } - if (node === input) { - return node; - } - errorFallbackNode = void 0; - errorNameNode = void 0; - return node && setOriginalNode(preserveJsDoc(node, input), input); - } - } - function transformVariableStatement(input) { - if (!forEach(input.declarationList.declarations, getBindingNameVisible)) - return; - const nodes = visitNodes2(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration); - if (!length(nodes)) - return; - const modifiers = factory2.createNodeArray(ensureModifiers(input)); - let declList; - if (isVarUsing(input.declarationList) || isVarAwaitUsing(input.declarationList)) { - declList = factory2.createVariableDeclarationList(nodes, 2 /* Const */); - setOriginalNode(declList, input.declarationList); - setTextRange(declList, input.declarationList); - setCommentRange(declList, input.declarationList); - } else { - declList = factory2.updateVariableDeclarationList(input.declarationList, nodes); - } - return factory2.updateVariableStatement(input, modifiers, declList); - } - function recreateBindingPattern(d) { - return flatten(mapDefined(d.elements, (e) => recreateBindingElement(e))); - } - function recreateBindingElement(e) { - if (e.kind === 232 /* OmittedExpression */) { - return; - } - if (e.name) { - if (!getBindingNameVisible(e)) - return; - if (isBindingPattern(e.name)) { - return recreateBindingPattern(e.name); - } else { - return factory2.createVariableDeclaration( - e.name, - /*exclamationToken*/ - void 0, - ensureType( - e, - /*type*/ - void 0 - ), - /*initializer*/ - void 0 - ); - } - } - } - function checkName(node) { - let oldDiag; - if (!suppressNewDiagnosticContexts) { - oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNodeName(node); - } - errorNameNode = node.name; - Debug.assert(resolver.isLateBound(getParseTreeNode(node))); - const decl = node; - const entityName = decl.name.expression; - checkEntityNameVisibility(entityName, enclosingDeclaration); - if (!suppressNewDiagnosticContexts) { - getSymbolAccessibilityDiagnostic = oldDiag; - } - errorNameNode = void 0; - } - function shouldStripInternal(node) { - return !!stripInternal && !!node && isInternalDeclaration(node, currentSourceFile); - } - function isScopeMarker2(node) { - return isExportAssignment(node) || isExportDeclaration(node); - } - function hasScopeMarker2(statements) { - return some(statements, isScopeMarker2); - } - function ensureModifiers(node) { - const currentFlags = getEffectiveModifierFlags(node); - const newFlags = ensureModifierFlags(node); - if (currentFlags === newFlags) { - return visitArray(node.modifiers, (n) => tryCast(n, isModifier), isModifier); - } - return factory2.createModifiersFromModifierFlags(newFlags); - } - function ensureModifierFlags(node) { - let mask2 = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); - let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; - const parentIsFile = node.parent.kind === 312 /* SourceFile */; - if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { - mask2 ^= 2 /* Ambient */; - additions = 0 /* None */; - } - return maskModifierFlags(node, mask2, additions); - } - function getTypeAnnotationFromAllAccessorDeclarations(node, accessors) { - let accessorType = getTypeAnnotationFromAccessor(node); - if (!accessorType && node !== accessors.firstAccessor) { - accessorType = getTypeAnnotationFromAccessor(accessors.firstAccessor); - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(accessors.firstAccessor); - } - if (!accessorType && accessors.secondAccessor && node !== accessors.secondAccessor) { - accessorType = getTypeAnnotationFromAccessor(accessors.secondAccessor); - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(accessors.secondAccessor); - } - return accessorType; - } - function transformHeritageClauses(nodes) { - return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => { - return isEntityNameExpression(t.expression) || clause.token === 96 /* ExtendsKeyword */ && t.expression.kind === 106 /* NullKeyword */; - })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length)); - } - } - function isAlwaysType(node) { - if (node.kind === 264 /* InterfaceDeclaration */) { - return true; - } - return false; - } - function maskModifiers(factory2, node, modifierMask, modifierAdditions) { - return factory2.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions)); - } - function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public */, modifierAdditions = 0 /* None */) { - let flags = getEffectiveModifierFlags(node) & modifierMask | modifierAdditions; - if (flags & 1024 /* Default */ && !(flags & 1 /* Export */)) { - flags ^= 1 /* Export */; - } - if (flags & 1024 /* Default */ && flags & 2 /* Ambient */) { - flags ^= 2 /* Ambient */; - } - return flags; - } - function getTypeAnnotationFromAccessor(accessor) { - if (accessor) { - return accessor.kind === 177 /* GetAccessor */ ? accessor.type : accessor.parameters.length > 0 ? accessor.parameters[0].type : void 0; - } - } - function canHaveLiteralInitializer(node) { - switch (node.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - return !hasEffectiveModifier(node, 8 /* Private */); - case 169 /* Parameter */: - case 260 /* VariableDeclaration */: - return true; - } - return false; - } - function isPreservedDeclarationStatement(node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 267 /* ModuleDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 264 /* InterfaceDeclaration */: - case 263 /* ClassDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 266 /* EnumDeclaration */: - case 243 /* VariableStatement */: - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 277 /* ExportAssignment */: - return true; - } - return false; - } - function isProcessedComponent(node) { - switch (node.kind) { - case 180 /* ConstructSignature */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 181 /* IndexSignature */: - case 260 /* VariableDeclaration */: - case 168 /* TypeParameter */: - case 233 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: - case 194 /* ConditionalType */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 205 /* ImportType */: - return true; - } - return false; - } - var declarationEmitNodeBuilderFlags; - var init_declarations = __esm({ - "src/compiler/transformers/declarations.ts"() { - "use strict"; - init_ts2(); - init_ts_moduleSpecifiers(); - declarationEmitNodeBuilderFlags = 1024 /* MultilineObjectLiterals */ | 2048 /* WriteClassExpressionAsTypeLiteral */ | 4096 /* UseTypeOfFunction */ | 8 /* UseStructuralFallback */ | 524288 /* AllowEmptyTuple */ | 4 /* GenerateNamesForShadowedTypeParams */ | 1 /* NoTruncation */; - } - }); - - // src/compiler/transformer.ts - function getModuleTransformer(moduleKind) { - switch (moduleKind) { - case 99 /* ESNext */: - case 7 /* ES2022 */: - case 6 /* ES2020 */: - case 5 /* ES2015 */: - return transformECMAScriptModule; - case 4 /* System */: - return transformSystemModule; - case 100 /* Node16 */: - case 199 /* NodeNext */: - return transformNodeModule; - default: - return transformModule; - } - } - function getTransformers(compilerOptions, customTransformers, emitOnly) { - return { - scriptTransformers: getScriptTransformers(compilerOptions, customTransformers, emitOnly), - declarationTransformers: getDeclarationTransformers(customTransformers) - }; - } - function getScriptTransformers(compilerOptions, customTransformers, emitOnly) { - if (emitOnly) - return emptyArray; - const languageVersion = getEmitScriptTarget(compilerOptions); - const moduleKind = getEmitModuleKind(compilerOptions); - const useDefineForClassFields = getUseDefineForClassFields(compilerOptions); - const transformers = []; - addRange(transformers, customTransformers && map(customTransformers.before, wrapScriptTransformerFactory)); - transformers.push(transformTypeScript); - if (compilerOptions.experimentalDecorators) { - transformers.push(transformLegacyDecorators); - } - if (getJSXTransformEnabled(compilerOptions)) { - transformers.push(transformJsx); - } - if (languageVersion < 99 /* ESNext */) { - transformers.push(transformESNext); - } - if (!compilerOptions.experimentalDecorators && (languageVersion < 99 /* ESNext */ || !useDefineForClassFields)) { - transformers.push(transformESDecorators); - } - transformers.push(transformClassFields); - if (languageVersion < 8 /* ES2021 */) { - transformers.push(transformES2021); - } - if (languageVersion < 7 /* ES2020 */) { - transformers.push(transformES2020); - } - if (languageVersion < 6 /* ES2019 */) { - transformers.push(transformES2019); - } - if (languageVersion < 5 /* ES2018 */) { - transformers.push(transformES2018); - } - if (languageVersion < 4 /* ES2017 */) { - transformers.push(transformES2017); - } - if (languageVersion < 3 /* ES2016 */) { - transformers.push(transformES2016); - } - if (languageVersion < 2 /* ES2015 */) { - transformers.push(transformES2015); - transformers.push(transformGenerators); - } - transformers.push(getModuleTransformer(moduleKind)); - if (languageVersion < 1 /* ES5 */) { - transformers.push(transformES5); - } - addRange(transformers, customTransformers && map(customTransformers.after, wrapScriptTransformerFactory)); - return transformers; - } - function getDeclarationTransformers(customTransformers) { - const transformers = []; - transformers.push(transformDeclarations); - addRange(transformers, customTransformers && map(customTransformers.afterDeclarations, wrapDeclarationTransformerFactory)); - return transformers; - } - function wrapCustomTransformer(transformer) { - return (node) => isBundle(node) ? transformer.transformBundle(node) : transformer.transformSourceFile(node); - } - function wrapCustomTransformerFactory(transformer, handleDefault) { - return (context) => { - const customTransformer = transformer(context); - return typeof customTransformer === "function" ? handleDefault(context, customTransformer) : wrapCustomTransformer(customTransformer); - }; - } - function wrapScriptTransformerFactory(transformer) { - return wrapCustomTransformerFactory(transformer, chainBundle); - } - function wrapDeclarationTransformerFactory(transformer) { - return wrapCustomTransformerFactory(transformer, (_, node) => node); - } - function noEmitSubstitution(_hint, node) { - return node; - } - function noEmitNotification(hint, node, callback) { - callback(hint, node); - } - function transformNodes(resolver, host, factory2, options, nodes, transformers, allowDtsFiles) { - var _a, _b; - const enabledSyntaxKindFeatures = new Array(363 /* Count */); - let lexicalEnvironmentVariableDeclarations; - let lexicalEnvironmentFunctionDeclarations; - let lexicalEnvironmentStatements; - let lexicalEnvironmentFlags = 0 /* None */; - let lexicalEnvironmentVariableDeclarationsStack = []; - let lexicalEnvironmentFunctionDeclarationsStack = []; - let lexicalEnvironmentStatementsStack = []; - let lexicalEnvironmentFlagsStack = []; - let lexicalEnvironmentStackOffset = 0; - let lexicalEnvironmentSuspended = false; - let blockScopedVariableDeclarationsStack = []; - let blockScopeStackOffset = 0; - let blockScopedVariableDeclarations; - let emitHelpers; - let onSubstituteNode = noEmitSubstitution; - let onEmitNode = noEmitNotification; - let state = 0 /* Uninitialized */; - const diagnostics = []; - const context = { - factory: factory2, - getCompilerOptions: () => options, - getEmitResolver: () => resolver, - // TODO: GH#18217 - getEmitHost: () => host, - // TODO: GH#18217 - getEmitHelperFactory: memoize(() => createEmitHelperFactory(context)), - startLexicalEnvironment, - suspendLexicalEnvironment, - resumeLexicalEnvironment, - endLexicalEnvironment, - setLexicalEnvironmentFlags, - getLexicalEnvironmentFlags, - hoistVariableDeclaration, - hoistFunctionDeclaration, - addInitializationStatement, - startBlockScope, - endBlockScope, - addBlockScopedVariable, - requestEmitHelper, - readEmitHelpers, - enableSubstitution, - enableEmitNotification, - isSubstitutionEnabled, - isEmitNotificationEnabled, - get onSubstituteNode() { - return onSubstituteNode; - }, - set onSubstituteNode(value) { - Debug.assert(state < 1 /* Initialized */, "Cannot modify transformation hooks after initialization has completed."); - Debug.assert(value !== void 0, "Value must not be 'undefined'"); - onSubstituteNode = value; - }, - get onEmitNode() { - return onEmitNode; - }, - set onEmitNode(value) { - Debug.assert(state < 1 /* Initialized */, "Cannot modify transformation hooks after initialization has completed."); - Debug.assert(value !== void 0, "Value must not be 'undefined'"); - onEmitNode = value; - }, - addDiagnostic(diag2) { - diagnostics.push(diag2); - } - }; - for (const node of nodes) { - disposeEmitNodes(getSourceFileOfNode(getParseTreeNode(node))); - } - mark("beforeTransform"); - const transformersWithContext = transformers.map((t) => t(context)); - const transformation = (node) => { - for (const transform2 of transformersWithContext) { - node = transform2(node); - } - return node; - }; - state = 1 /* Initialized */; - const transformed = []; - for (const node of nodes) { - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "transformNodes", node.kind === 312 /* SourceFile */ ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end }); - transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); - (_b = tracing) == null ? void 0 : _b.pop(); - } - state = 2 /* Completed */; - mark("afterTransform"); - measure("transformTime", "beforeTransform", "afterTransform"); - return { - transformed, - substituteNode, - emitNodeWithNotification, - isEmitNotificationEnabled, - dispose, - diagnostics - }; - function transformRoot(node) { - return node && (!isSourceFile(node) || !node.isDeclarationFile) ? transformation(node) : node; - } - function enableSubstitution(kind) { - Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed."); - enabledSyntaxKindFeatures[kind] |= 1 /* Substitution */; - } - function isSubstitutionEnabled(node) { - return (enabledSyntaxKindFeatures[node.kind] & 1 /* Substitution */) !== 0 && (getEmitFlags(node) & 8 /* NoSubstitution */) === 0; - } - function substituteNode(hint, node) { - Debug.assert(state < 3 /* Disposed */, "Cannot substitute a node after the result is disposed."); - return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node; - } - function enableEmitNotification(kind) { - Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed."); - enabledSyntaxKindFeatures[kind] |= 2 /* EmitNotifications */; - } - function isEmitNotificationEnabled(node) { - return (enabledSyntaxKindFeatures[node.kind] & 2 /* EmitNotifications */) !== 0 || (getEmitFlags(node) & 4 /* AdviseOnEmitNode */) !== 0; - } - function emitNodeWithNotification(hint, node, emitCallback) { - Debug.assert(state < 3 /* Disposed */, "Cannot invoke TransformationResult callbacks after the result is disposed."); - if (node) { - if (isEmitNotificationEnabled(node)) { - onEmitNode(hint, node, emitCallback); - } else { - emitCallback(hint, node); - } - } - } - function hoistVariableDeclaration(name) { - Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed."); - const decl = setEmitFlags(factory2.createVariableDeclaration(name), 128 /* NoNestedSourceMaps */); - if (!lexicalEnvironmentVariableDeclarations) { - lexicalEnvironmentVariableDeclarations = [decl]; - } else { - lexicalEnvironmentVariableDeclarations.push(decl); - } - if (lexicalEnvironmentFlags & 1 /* InParameters */) { - lexicalEnvironmentFlags |= 2 /* VariablesHoistedInParameters */; - } - } - function hoistFunctionDeclaration(func) { - Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed."); - setEmitFlags(func, 2097152 /* CustomPrologue */); - if (!lexicalEnvironmentFunctionDeclarations) { - lexicalEnvironmentFunctionDeclarations = [func]; - } else { - lexicalEnvironmentFunctionDeclarations.push(func); - } - } - function addInitializationStatement(node) { - Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed."); - setEmitFlags(node, 2097152 /* CustomPrologue */); - if (!lexicalEnvironmentStatements) { - lexicalEnvironmentStatements = [node]; - } else { - lexicalEnvironmentStatements.push(node); - } - } - function startLexicalEnvironment() { - Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed."); - Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended."); - lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentVariableDeclarations; - lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFunctionDeclarations; - lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentStatements; - lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFlags; - lexicalEnvironmentStackOffset++; - lexicalEnvironmentVariableDeclarations = void 0; - lexicalEnvironmentFunctionDeclarations = void 0; - lexicalEnvironmentStatements = void 0; - lexicalEnvironmentFlags = 0 /* None */; - } - function suspendLexicalEnvironment() { - Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed."); - Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is already suspended."); - lexicalEnvironmentSuspended = true; - } - function resumeLexicalEnvironment() { - Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed."); - Debug.assert(lexicalEnvironmentSuspended, "Lexical environment is not suspended."); - lexicalEnvironmentSuspended = false; - } - function endLexicalEnvironment() { - Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot modify the lexical environment after transformation has completed."); - Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended."); - let statements; - if (lexicalEnvironmentVariableDeclarations || lexicalEnvironmentFunctionDeclarations || lexicalEnvironmentStatements) { - if (lexicalEnvironmentFunctionDeclarations) { - statements = [...lexicalEnvironmentFunctionDeclarations]; - } - if (lexicalEnvironmentVariableDeclarations) { - const statement = factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList(lexicalEnvironmentVariableDeclarations) - ); - setEmitFlags(statement, 2097152 /* CustomPrologue */); - if (!statements) { - statements = [statement]; - } else { - statements.push(statement); - } - } - if (lexicalEnvironmentStatements) { - if (!statements) { - statements = [...lexicalEnvironmentStatements]; - } else { - statements = [...statements, ...lexicalEnvironmentStatements]; - } - } - } - lexicalEnvironmentStackOffset--; - lexicalEnvironmentVariableDeclarations = lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset]; - lexicalEnvironmentFunctionDeclarations = lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset]; - lexicalEnvironmentStatements = lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset]; - lexicalEnvironmentFlags = lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset]; - if (lexicalEnvironmentStackOffset === 0) { - lexicalEnvironmentVariableDeclarationsStack = []; - lexicalEnvironmentFunctionDeclarationsStack = []; - lexicalEnvironmentStatementsStack = []; - lexicalEnvironmentFlagsStack = []; - } - return statements; - } - function setLexicalEnvironmentFlags(flags, value) { - lexicalEnvironmentFlags = value ? lexicalEnvironmentFlags | flags : lexicalEnvironmentFlags & ~flags; - } - function getLexicalEnvironmentFlags() { - return lexicalEnvironmentFlags; - } - function startBlockScope() { - Debug.assert(state > 0 /* Uninitialized */, "Cannot start a block scope during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot start a block scope after transformation has completed."); - blockScopedVariableDeclarationsStack[blockScopeStackOffset] = blockScopedVariableDeclarations; - blockScopeStackOffset++; - blockScopedVariableDeclarations = void 0; - } - function endBlockScope() { - Debug.assert(state > 0 /* Uninitialized */, "Cannot end a block scope during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot end a block scope after transformation has completed."); - const statements = some(blockScopedVariableDeclarations) ? [ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList( - blockScopedVariableDeclarations.map((identifier) => factory2.createVariableDeclaration(identifier)), - 1 /* Let */ - ) - ) - ] : void 0; - blockScopeStackOffset--; - blockScopedVariableDeclarations = blockScopedVariableDeclarationsStack[blockScopeStackOffset]; - if (blockScopeStackOffset === 0) { - blockScopedVariableDeclarationsStack = []; - } - return statements; - } - function addBlockScopedVariable(name) { - Debug.assert(blockScopeStackOffset > 0, "Cannot add a block scoped variable outside of an iteration body."); - (blockScopedVariableDeclarations || (blockScopedVariableDeclarations = [])).push(name); - } - function requestEmitHelper(helper) { - Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed."); - Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); - if (helper.dependencies) { - for (const h of helper.dependencies) { - requestEmitHelper(h); - } - } - emitHelpers = append(emitHelpers, helper); - } - function readEmitHelpers() { - Debug.assert(state > 0 /* Uninitialized */, "Cannot modify the transformation context during initialization."); - Debug.assert(state < 2 /* Completed */, "Cannot modify the transformation context after transformation has completed."); - const helpers = emitHelpers; - emitHelpers = void 0; - return helpers; - } - function dispose() { - if (state < 3 /* Disposed */) { - for (const node of nodes) { - disposeEmitNodes(getSourceFileOfNode(getParseTreeNode(node))); - } - lexicalEnvironmentVariableDeclarations = void 0; - lexicalEnvironmentVariableDeclarationsStack = void 0; - lexicalEnvironmentFunctionDeclarations = void 0; - lexicalEnvironmentFunctionDeclarationsStack = void 0; - onSubstituteNode = void 0; - onEmitNode = void 0; - emitHelpers = void 0; - state = 3 /* Disposed */; - } - } - } - var noTransformers, nullTransformationContext; - var init_transformer = __esm({ - "src/compiler/transformer.ts"() { - "use strict"; - init_ts2(); - init_ts_performance(); - noTransformers = { scriptTransformers: emptyArray, declarationTransformers: emptyArray }; - nullTransformationContext = { - factory, - // eslint-disable-line object-shorthand - getCompilerOptions: () => ({}), - getEmitResolver: notImplemented, - getEmitHost: notImplemented, - getEmitHelperFactory: notImplemented, - startLexicalEnvironment: noop, - resumeLexicalEnvironment: noop, - suspendLexicalEnvironment: noop, - endLexicalEnvironment: returnUndefined, - setLexicalEnvironmentFlags: noop, - getLexicalEnvironmentFlags: () => 0, - hoistVariableDeclaration: noop, - hoistFunctionDeclaration: noop, - addInitializationStatement: noop, - startBlockScope: noop, - endBlockScope: returnUndefined, - addBlockScopedVariable: noop, - requestEmitHelper: noop, - readEmitHelpers: notImplemented, - enableSubstitution: noop, - enableEmitNotification: noop, - isSubstitutionEnabled: notImplemented, - isEmitNotificationEnabled: notImplemented, - onSubstituteNode: noEmitSubstitution, - onEmitNode: noEmitNotification, - addDiagnostic: noop - }; - } - }); - - // src/compiler/emitter.ts - function isBuildInfoFile(file) { - return fileExtensionIs(file, ".tsbuildinfo" /* TsBuildInfo */); - } - function forEachEmittedFile(host, action, sourceFilesOrTargetSourceFile, forceDtsEmit = false, onlyBuildInfo, includeBuildInfo) { - const sourceFiles = isArray(sourceFilesOrTargetSourceFile) ? sourceFilesOrTargetSourceFile : getSourceFilesToEmit(host, sourceFilesOrTargetSourceFile, forceDtsEmit); - const options = host.getCompilerOptions(); - if (outFile(options)) { - const prepends = host.getPrependNodes(); - if (sourceFiles.length || prepends.length) { - const bundle = factory.createBundle(sourceFiles, prepends); - const result = action(getOutputPathsFor(bundle, host, forceDtsEmit), bundle); - if (result) { - return result; - } - } - } else { - if (!onlyBuildInfo) { - for (const sourceFile of sourceFiles) { - const result = action(getOutputPathsFor(sourceFile, host, forceDtsEmit), sourceFile); - if (result) { - return result; - } - } - } - if (includeBuildInfo) { - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); - if (buildInfoPath) - return action( - { buildInfoPath }, - /*sourceFileOrBundle*/ - void 0 - ); - } - } - } - function getTsBuildInfoEmitOutputFilePath(options) { - const configFile = options.configFilePath; - if (!isIncrementalCompilation(options)) - return void 0; - if (options.tsBuildInfoFile) - return options.tsBuildInfoFile; - const outPath = outFile(options); - let buildInfoExtensionLess; - if (outPath) { - buildInfoExtensionLess = removeFileExtension(outPath); - } else { - if (!configFile) - return void 0; - const configFileExtensionLess = removeFileExtension(configFile); - buildInfoExtensionLess = options.outDir ? options.rootDir ? resolvePath(options.outDir, getRelativePathFromDirectory( - options.rootDir, - configFileExtensionLess, - /*ignoreCase*/ - true - )) : combinePaths(options.outDir, getBaseFileName(configFileExtensionLess)) : configFileExtensionLess; - } - return buildInfoExtensionLess + ".tsbuildinfo" /* TsBuildInfo */; - } - function getOutputPathsForBundle(options, forceDtsPaths) { - const outPath = outFile(options); - const jsFilePath = options.emitDeclarationOnly ? void 0 : outPath; - const sourceMapFilePath = jsFilePath && getSourceMapFilePath(jsFilePath, options); - const declarationFilePath = forceDtsPaths || getEmitDeclarations(options) ? removeFileExtension(outPath) + ".d.ts" /* Dts */ : void 0; - const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + ".map" : void 0; - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); - return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath }; - } - function getOutputPathsFor(sourceFile, host, forceDtsPaths) { - const options = host.getCompilerOptions(); - if (sourceFile.kind === 313 /* Bundle */) { - return getOutputPathsForBundle(options, forceDtsPaths); - } else { - const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); - const isJsonFile = isJsonSourceFile(sourceFile); - const isJsonEmittedToSameLocation = isJsonFile && comparePaths(sourceFile.fileName, ownOutputFilePath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */; - const jsFilePath = options.emitDeclarationOnly || isJsonEmittedToSameLocation ? void 0 : ownOutputFilePath; - const sourceMapFilePath = !jsFilePath || isJsonSourceFile(sourceFile) ? void 0 : getSourceMapFilePath(jsFilePath, options); - const declarationFilePath = forceDtsPaths || getEmitDeclarations(options) && !isJsonFile ? getDeclarationEmitOutputFilePath(sourceFile.fileName, host) : void 0; - const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + ".map" : void 0; - return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath: void 0 }; - } - } - function getSourceMapFilePath(jsFilePath, options) { - return options.sourceMap && !options.inlineSourceMap ? jsFilePath + ".map" : void 0; - } - function getOutputExtension(fileName, options) { - return fileExtensionIs(fileName, ".json" /* Json */) ? ".json" /* Json */ : options.jsx === 1 /* Preserve */ && fileExtensionIsOneOf(fileName, [".jsx" /* Jsx */, ".tsx" /* Tsx */]) ? ".jsx" /* Jsx */ : fileExtensionIsOneOf(fileName, [".mts" /* Mts */, ".mjs" /* Mjs */]) ? ".mjs" /* Mjs */ : fileExtensionIsOneOf(fileName, [".cts" /* Cts */, ".cjs" /* Cjs */]) ? ".cjs" /* Cjs */ : ".js" /* Js */; - } - function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir, getCommonSourceDirectory2) { - return outputDir ? resolvePath( - outputDir, - getRelativePathFromDirectory(getCommonSourceDirectory2 ? getCommonSourceDirectory2() : getCommonSourceDirectoryOfConfig(configFile, ignoreCase), inputFileName, ignoreCase) - ) : inputFileName; - } - function getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2) { - return changeExtension( - getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.declarationDir || configFile.options.outDir, getCommonSourceDirectory2), - getDeclarationEmitExtensionForPath(inputFileName) - ); - } - function getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2) { - if (configFile.options.emitDeclarationOnly) - return void 0; - const isJsonFile = fileExtensionIs(inputFileName, ".json" /* Json */); - const outputFileName = changeExtension( - getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.outDir, getCommonSourceDirectory2), - getOutputExtension(inputFileName, configFile.options) - ); - return !isJsonFile || comparePaths(inputFileName, outputFileName, Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 /* EqualTo */ ? outputFileName : void 0; - } - function createAddOutput() { - let outputs; - return { addOutput, getOutputs }; - function addOutput(path) { - if (path) { - (outputs || (outputs = [])).push(path); - } - } - function getOutputs() { - return outputs || emptyArray; - } - } - function getSingleOutputFileNames(configFile, addOutput) { - const { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath } = getOutputPathsForBundle( - configFile.options, - /*forceDtsPaths*/ - false - ); - addOutput(jsFilePath); - addOutput(sourceMapFilePath); - addOutput(declarationFilePath); - addOutput(declarationMapPath); - addOutput(buildInfoPath); - } - function getOwnOutputFileNames(configFile, inputFileName, ignoreCase, addOutput, getCommonSourceDirectory2) { - if (isDeclarationFileName(inputFileName)) - return; - const js = getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2); - addOutput(js); - if (fileExtensionIs(inputFileName, ".json" /* Json */)) - return; - if (js && configFile.options.sourceMap) { - addOutput(`${js}.map`); - } - if (getEmitDeclarations(configFile.options)) { - const dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2); - addOutput(dts); - if (configFile.options.declarationMap) { - addOutput(`${dts}.map`); - } - } - } - function getCommonSourceDirectory(options, emittedFiles, currentDirectory, getCanonicalFileName, checkSourceFilesBelongToPath) { - let commonSourceDirectory; - if (options.rootDir) { - commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory); - checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(options.rootDir); - } else if (options.composite && options.configFilePath) { - commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath)); - checkSourceFilesBelongToPath == null ? void 0 : checkSourceFilesBelongToPath(commonSourceDirectory); - } else { - commonSourceDirectory = computeCommonSourceDirectoryOfFilenames(emittedFiles(), currentDirectory, getCanonicalFileName); - } - if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== directorySeparator) { - commonSourceDirectory += directorySeparator; - } - return commonSourceDirectory; - } - function getCommonSourceDirectoryOfConfig({ options, fileNames }, ignoreCase) { - return getCommonSourceDirectory( - options, - () => filter(fileNames, (file) => !(options.noEmitForJsFiles && fileExtensionIsOneOf(file, supportedJSExtensionsFlat)) && !isDeclarationFileName(file)), - getDirectoryPath(normalizeSlashes(Debug.checkDefined(options.configFilePath))), - createGetCanonicalFileName(!ignoreCase) - ); - } - function getAllProjectOutputs(configFile, ignoreCase) { - const { addOutput, getOutputs } = createAddOutput(); - if (outFile(configFile.options)) { - getSingleOutputFileNames(configFile, addOutput); - } else { - const getCommonSourceDirectory2 = memoize(() => getCommonSourceDirectoryOfConfig(configFile, ignoreCase)); - for (const inputFileName of configFile.fileNames) { - getOwnOutputFileNames(configFile, inputFileName, ignoreCase, addOutput, getCommonSourceDirectory2); - } - addOutput(getTsBuildInfoEmitOutputFilePath(configFile.options)); - } - return getOutputs(); - } - function getOutputFileNames(commandLine, inputFileName, ignoreCase) { - inputFileName = normalizePath(inputFileName); - Debug.assert(contains(commandLine.fileNames, inputFileName), `Expected fileName to be present in command line`); - const { addOutput, getOutputs } = createAddOutput(); - if (outFile(commandLine.options)) { - getSingleOutputFileNames(commandLine, addOutput); - } else { - getOwnOutputFileNames(commandLine, inputFileName, ignoreCase, addOutput); - } - return getOutputs(); - } - function getFirstProjectOutput(configFile, ignoreCase) { - if (outFile(configFile.options)) { - const { jsFilePath, declarationFilePath } = getOutputPathsForBundle( - configFile.options, - /*forceDtsPaths*/ - false - ); - return Debug.checkDefined(jsFilePath || declarationFilePath, `project ${configFile.options.configFilePath} expected to have at least one output`); - } - const getCommonSourceDirectory2 = memoize(() => getCommonSourceDirectoryOfConfig(configFile, ignoreCase)); - for (const inputFileName of configFile.fileNames) { - if (isDeclarationFileName(inputFileName)) - continue; - const jsFilePath = getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2); - if (jsFilePath) - return jsFilePath; - if (fileExtensionIs(inputFileName, ".json" /* Json */)) - continue; - if (getEmitDeclarations(configFile.options)) { - return getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory2); - } - } - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options); - if (buildInfoPath) - return buildInfoPath; - return Debug.fail(`project ${configFile.options.configFilePath} expected to have at least one output`); - } - function emitFiles(resolver, host, targetSourceFile, { scriptTransformers, declarationTransformers }, emitOnly, onlyBuildInfo, forceDtsEmit) { - var compilerOptions = host.getCompilerOptions(); - var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap || getAreDeclarationMapsEnabled(compilerOptions) ? [] : void 0; - var emittedFilesList = compilerOptions.listEmittedFiles ? [] : void 0; - var emitterDiagnostics = createDiagnosticCollection(); - var newLine = getNewLineCharacter(compilerOptions); - var writer = createTextWriter(newLine); - var { enter, exit } = createTimer("printTime", "beforePrint", "afterPrint"); - var bundleBuildInfo; - var emitSkipped = false; - enter(); - forEachEmittedFile( - host, - emitSourceFileOrBundle, - getSourceFilesToEmit(host, targetSourceFile, forceDtsEmit), - forceDtsEmit, - onlyBuildInfo, - !targetSourceFile - ); - exit(); - return { - emitSkipped, - diagnostics: emitterDiagnostics.getDiagnostics(), - emittedFiles: emittedFilesList, - sourceMaps: sourceMapDataList - }; - function emitSourceFileOrBundle({ jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath }, sourceFileOrBundle) { - var _a, _b, _c, _d, _e, _f; - let buildInfoDirectory; - if (buildInfoPath && sourceFileOrBundle && isBundle(sourceFileOrBundle)) { - buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); - bundleBuildInfo = { - commonSourceDirectory: relativeToBuildInfo(host.getCommonSourceDirectory()), - sourceFiles: sourceFileOrBundle.sourceFiles.map((file) => relativeToBuildInfo(getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()))) - }; - } - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Emit, "emitJsFileOrBundle", { jsFilePath }); - emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo); - (_b = tracing) == null ? void 0 : _b.pop(); - (_c = tracing) == null ? void 0 : _c.push(tracing.Phase.Emit, "emitDeclarationFileOrBundle", { declarationFilePath }); - emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo); - (_d = tracing) == null ? void 0 : _d.pop(); - (_e = tracing) == null ? void 0 : _e.push(tracing.Phase.Emit, "emitBuildInfo", { buildInfoPath }); - emitBuildInfo(bundleBuildInfo, buildInfoPath); - (_f = tracing) == null ? void 0 : _f.pop(); - if (!emitSkipped && emittedFilesList) { - if (!emitOnly) { - if (jsFilePath) { - emittedFilesList.push(jsFilePath); - } - if (sourceMapFilePath) { - emittedFilesList.push(sourceMapFilePath); - } - if (buildInfoPath) { - emittedFilesList.push(buildInfoPath); - } - } - if (emitOnly !== 0 /* Js */) { - if (declarationFilePath) { - emittedFilesList.push(declarationFilePath); - } - if (declarationMapPath) { - emittedFilesList.push(declarationMapPath); - } - } - } - function relativeToBuildInfo(path) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path, host.getCanonicalFileName)); - } - } - function emitBuildInfo(bundle, buildInfoPath) { - if (!buildInfoPath || targetSourceFile || emitSkipped) - return; - if (host.isEmitBlocked(buildInfoPath)) { - emitSkipped = true; - return; - } - const buildInfo = host.getBuildInfo(bundle) || createBuildInfo( - /*program*/ - void 0, - bundle - ); - writeFile( - host, - emitterDiagnostics, - buildInfoPath, - getBuildInfoText(buildInfo), - /*writeByteOrderMark*/ - false, - /*sourceFiles*/ - void 0, - { buildInfo } - ); - } - function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo) { - if (!sourceFileOrBundle || emitOnly || !jsFilePath) { - return; - } - if (host.isEmitBlocked(jsFilePath) || compilerOptions.noEmit) { - emitSkipped = true; - return; - } - const transform2 = transformNodes( - resolver, - host, - factory, - compilerOptions, - [sourceFileOrBundle], - scriptTransformers, - /*allowDtsFiles*/ - false - ); - const printerOptions = { - removeComments: compilerOptions.removeComments, - newLine: compilerOptions.newLine, - noEmitHelpers: compilerOptions.noEmitHelpers, - module: compilerOptions.module, - target: compilerOptions.target, - sourceMap: compilerOptions.sourceMap, - inlineSourceMap: compilerOptions.inlineSourceMap, - inlineSources: compilerOptions.inlineSources, - extendedDiagnostics: compilerOptions.extendedDiagnostics, - writeBundleFileInfo: !!bundleBuildInfo, - relativeToBuildInfo - }; - const printer = createPrinter(printerOptions, { - // resolver hooks - hasGlobalName: resolver.hasGlobalName, - // transform hooks - onEmitNode: transform2.emitNodeWithNotification, - isEmitNotificationEnabled: transform2.isEmitNotificationEnabled, - substituteNode: transform2.substituteNode - }); - Debug.assert(transform2.transformed.length === 1, "Should only see one output from the transform"); - printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, compilerOptions); - transform2.dispose(); - if (bundleBuildInfo) - bundleBuildInfo.js = printer.bundleFileInfo; - } - function emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo) { - if (!sourceFileOrBundle || emitOnly === 0 /* Js */) - return; - if (!declarationFilePath) { - if (emitOnly || compilerOptions.emitDeclarationOnly) - emitSkipped = true; - return; - } - const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles; - const filesForEmit = forceDtsEmit ? sourceFiles : filter(sourceFiles, isSourceFileNotJson); - const inputListOrBundle = outFile(compilerOptions) ? [factory.createBundle(filesForEmit, !isSourceFile(sourceFileOrBundle) ? sourceFileOrBundle.prepends : void 0)] : filesForEmit; - if (emitOnly && !getEmitDeclarations(compilerOptions)) { - filesForEmit.forEach(collectLinkedAliases); - } - const declarationTransform = transformNodes( - resolver, - host, - factory, - compilerOptions, - inputListOrBundle, - declarationTransformers, - /*allowDtsFiles*/ - false - ); - if (length(declarationTransform.diagnostics)) { - for (const diagnostic of declarationTransform.diagnostics) { - emitterDiagnostics.add(diagnostic); - } - } - const printerOptions = { - removeComments: compilerOptions.removeComments, - newLine: compilerOptions.newLine, - noEmitHelpers: true, - module: compilerOptions.module, - target: compilerOptions.target, - sourceMap: !forceDtsEmit && compilerOptions.declarationMap, - inlineSourceMap: compilerOptions.inlineSourceMap, - extendedDiagnostics: compilerOptions.extendedDiagnostics, - onlyPrintJsDocStyle: true, - writeBundleFileInfo: !!bundleBuildInfo, - recordInternalSection: !!bundleBuildInfo, - relativeToBuildInfo - }; - const declarationPrinter = createPrinter(printerOptions, { - // resolver hooks - hasGlobalName: resolver.hasGlobalName, - // transform hooks - onEmitNode: declarationTransform.emitNodeWithNotification, - isEmitNotificationEnabled: declarationTransform.isEmitNotificationEnabled, - substituteNode: declarationTransform.substituteNode - }); - const declBlocked = !!declarationTransform.diagnostics && !!declarationTransform.diagnostics.length || !!host.isEmitBlocked(declarationFilePath) || !!compilerOptions.noEmit; - emitSkipped = emitSkipped || declBlocked; - if (!declBlocked || forceDtsEmit) { - Debug.assert(declarationTransform.transformed.length === 1, "Should only see one output from the decl transform"); - printSourceFileOrBundle( - declarationFilePath, - declarationMapPath, - declarationTransform, - declarationPrinter, - { - sourceMap: printerOptions.sourceMap, - sourceRoot: compilerOptions.sourceRoot, - mapRoot: compilerOptions.mapRoot, - extendedDiagnostics: compilerOptions.extendedDiagnostics - // Explicitly do not passthru either `inline` option - } - ); - } - declarationTransform.dispose(); - if (bundleBuildInfo) - bundleBuildInfo.dts = declarationPrinter.bundleFileInfo; - } - function collectLinkedAliases(node) { - if (isExportAssignment(node)) { - if (node.expression.kind === 80 /* Identifier */) { - resolver.collectLinkedAliases( - node.expression, - /*setVisibility*/ - true - ); - } - return; - } else if (isExportSpecifier(node)) { - resolver.collectLinkedAliases( - node.propertyName || node.name, - /*setVisibility*/ - true - ); - return; - } - forEachChild(node, collectLinkedAliases); - } - function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, transform2, printer, mapOptions) { - const sourceFileOrBundle = transform2.transformed[0]; - const bundle = sourceFileOrBundle.kind === 313 /* Bundle */ ? sourceFileOrBundle : void 0; - const sourceFile = sourceFileOrBundle.kind === 312 /* SourceFile */ ? sourceFileOrBundle : void 0; - const sourceFiles = bundle ? bundle.sourceFiles : [sourceFile]; - let sourceMapGenerator; - if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) { - sourceMapGenerator = createSourceMapGenerator( - host, - getBaseFileName(normalizeSlashes(jsFilePath)), - getSourceRoot(mapOptions), - getSourceMapDirectory(mapOptions, jsFilePath, sourceFile), - mapOptions - ); - } - if (bundle) { - printer.writeBundle(bundle, writer, sourceMapGenerator); - } else { - printer.writeFile(sourceFile, writer, sourceMapGenerator); - } - let sourceMapUrlPos; - if (sourceMapGenerator) { - if (sourceMapDataList) { - sourceMapDataList.push({ - inputSourceFileNames: sourceMapGenerator.getSources(), - sourceMap: sourceMapGenerator.toJSON() - }); - } - const sourceMappingURL = getSourceMappingURL( - mapOptions, - sourceMapGenerator, - jsFilePath, - sourceMapFilePath, - sourceFile - ); - if (sourceMappingURL) { - if (!writer.isAtStartOfLine()) - writer.rawWrite(newLine); - sourceMapUrlPos = writer.getTextPos(); - writer.writeComment(`//# ${"sourceMappingURL"}=${sourceMappingURL}`); - } - if (sourceMapFilePath) { - const sourceMap = sourceMapGenerator.toString(); - writeFile( - host, - emitterDiagnostics, - sourceMapFilePath, - sourceMap, - /*writeByteOrderMark*/ - false, - sourceFiles - ); - if (printer.bundleFileInfo) - printer.bundleFileInfo.mapHash = computeSignature(sourceMap, host); - } - } else { - writer.writeLine(); - } - const text = writer.getText(); - writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, { sourceMapUrlPos, diagnostics: transform2.diagnostics }); - if (printer.bundleFileInfo) - printer.bundleFileInfo.hash = computeSignature(text, host); - writer.clear(); - } - function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) { - return (mapOptions.sourceMap || mapOptions.inlineSourceMap) && (sourceFileOrBundle.kind !== 312 /* SourceFile */ || !fileExtensionIs(sourceFileOrBundle.fileName, ".json" /* Json */)); - } - function getSourceRoot(mapOptions) { - const sourceRoot = normalizeSlashes(mapOptions.sourceRoot || ""); - return sourceRoot ? ensureTrailingDirectorySeparator(sourceRoot) : sourceRoot; - } - function getSourceMapDirectory(mapOptions, filePath, sourceFile) { - if (mapOptions.sourceRoot) - return host.getCommonSourceDirectory(); - if (mapOptions.mapRoot) { - let sourceMapDir = normalizeSlashes(mapOptions.mapRoot); - if (sourceFile) { - sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFile.fileName, host, sourceMapDir)); - } - if (getRootLength(sourceMapDir) === 0) { - sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir); - } - return sourceMapDir; - } - return getDirectoryPath(normalizePath(filePath)); - } - function getSourceMappingURL(mapOptions, sourceMapGenerator, filePath, sourceMapFilePath, sourceFile) { - if (mapOptions.inlineSourceMap) { - const sourceMapText = sourceMapGenerator.toString(); - const base64SourceMapText = base64encode(sys, sourceMapText); - return `data:application/json;base64,${base64SourceMapText}`; - } - const sourceMapFile = getBaseFileName(normalizeSlashes(Debug.checkDefined(sourceMapFilePath))); - if (mapOptions.mapRoot) { - let sourceMapDir = normalizeSlashes(mapOptions.mapRoot); - if (sourceFile) { - sourceMapDir = getDirectoryPath(getSourceFilePathInNewDir(sourceFile.fileName, host, sourceMapDir)); - } - if (getRootLength(sourceMapDir) === 0) { - sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir); - return encodeURI( - getRelativePathToDirectoryOrUrl( - getDirectoryPath(normalizePath(filePath)), - // get the relative sourceMapDir path based on jsFilePath - combinePaths(sourceMapDir, sourceMapFile), - // this is where user expects to see sourceMap - host.getCurrentDirectory(), - host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ - true - ) - ); - } else { - return encodeURI(combinePaths(sourceMapDir, sourceMapFile)); - } - } - return encodeURI(sourceMapFile); - } - } - function createBuildInfo(program, bundle) { - return { bundle, program, version }; - } - function getBuildInfoText(buildInfo) { - return JSON.stringify(buildInfo); - } - function getBuildInfo(buildInfoFile, buildInfoText) { - return readJsonOrUndefined(buildInfoFile, buildInfoText); - } - function createSourceFilesFromBundleBuildInfo(bundle, buildInfoDirectory, host) { - var _a; - const jsBundle = Debug.checkDefined(bundle.js); - const prologueMap = ((_a = jsBundle.sources) == null ? void 0 : _a.prologues) && arrayToMap(jsBundle.sources.prologues, (prologueInfo) => prologueInfo.file); - return bundle.sourceFiles.map((fileName, index) => { - const prologueInfo = prologueMap == null ? void 0 : prologueMap.get(index); - const statements = prologueInfo == null ? void 0 : prologueInfo.directives.map((directive) => { - const literal = setTextRange(factory.createStringLiteral(directive.expression.text), directive.expression); - const statement = setTextRange(factory.createExpressionStatement(literal), directive); - setParent(literal, statement); - return statement; - }); - const eofToken = factory.createToken(1 /* EndOfFileToken */); - const sourceFile = factory.createSourceFile(statements ?? [], eofToken, 0 /* None */); - sourceFile.fileName = getRelativePathFromDirectory( - host.getCurrentDirectory(), - getNormalizedAbsolutePath(fileName, buildInfoDirectory), - !host.useCaseSensitiveFileNames() - ); - sourceFile.text = (prologueInfo == null ? void 0 : prologueInfo.text) ?? ""; - setTextRangePosWidth(sourceFile, 0, (prologueInfo == null ? void 0 : prologueInfo.text.length) ?? 0); - setEachParent(sourceFile.statements, sourceFile); - setTextRangePosWidth(eofToken, sourceFile.end, 0); - setParent(eofToken, sourceFile); - return sourceFile; - }); - } - function emitUsingBuildInfo(config, host, getCommandLine, customTransformers) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push( - tracing.Phase.Emit, - "emitUsingBuildInfo", - {}, - /*separateBeginAndEnd*/ - true - ); - mark("beforeEmit"); - const result = emitUsingBuildInfoWorker(config, host, getCommandLine, customTransformers); - mark("afterEmit"); - measure("Emit", "beforeEmit", "afterEmit"); - (_b = tracing) == null ? void 0 : _b.pop(); - return result; - } - function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransformers) { - const { buildInfoPath, jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath } = getOutputPathsForBundle( - config.options, - /*forceDtsPaths*/ - false - ); - const buildInfo = host.getBuildInfo(buildInfoPath, config.options.configFilePath); - if (!buildInfo) - return buildInfoPath; - if (!buildInfo.bundle || !buildInfo.bundle.js || declarationFilePath && !buildInfo.bundle.dts) - return buildInfoPath; - const jsFileText = host.readFile(Debug.checkDefined(jsFilePath)); - if (!jsFileText) - return jsFilePath; - if (computeSignature(jsFileText, host) !== buildInfo.bundle.js.hash) - return jsFilePath; - const sourceMapText = sourceMapFilePath && host.readFile(sourceMapFilePath); - if (sourceMapFilePath && !sourceMapText || config.options.inlineSourceMap) - return sourceMapFilePath || "inline sourcemap decoding"; - if (sourceMapFilePath && computeSignature(sourceMapText, host) !== buildInfo.bundle.js.mapHash) - return sourceMapFilePath; - const declarationText = declarationFilePath && host.readFile(declarationFilePath); - if (declarationFilePath && !declarationText) - return declarationFilePath; - if (declarationFilePath && computeSignature(declarationText, host) !== buildInfo.bundle.dts.hash) - return declarationFilePath; - const declarationMapText = declarationMapPath && host.readFile(declarationMapPath); - if (declarationMapPath && !declarationMapText || config.options.inlineSourceMap) - return declarationMapPath || "inline sourcemap decoding"; - if (declarationMapPath && computeSignature(declarationMapText, host) !== buildInfo.bundle.dts.mapHash) - return declarationMapPath; - const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); - const ownPrependInput = createInputFilesWithFileTexts( - jsFilePath, - jsFileText, - sourceMapFilePath, - sourceMapText, - declarationFilePath, - declarationText, - declarationMapPath, - declarationMapText, - buildInfoPath, - buildInfo, - /*oldFileOfCurrentEmit*/ - true - ); - const outputFiles = []; - const prependNodes = createPrependNodes(config.projectReferences, getCommandLine, (f) => host.readFile(f), host); - const sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host); - let changedDtsText; - let changedDtsData; - const emitHost = { - getPrependNodes: memoize(() => [...prependNodes, ownPrependInput]), - getCanonicalFileName: host.getCanonicalFileName, - getCommonSourceDirectory: () => getNormalizedAbsolutePath(buildInfo.bundle.commonSourceDirectory, buildInfoDirectory), - getCompilerOptions: () => config.options, - getCurrentDirectory: () => host.getCurrentDirectory(), - getSourceFile: returnUndefined, - getSourceFileByPath: returnUndefined, - getSourceFiles: () => sourceFilesForJsEmit, - getLibFileFromReference: notImplemented, - isSourceFileFromExternalLibrary: returnFalse, - getResolvedProjectReferenceToRedirect: returnUndefined, - getProjectReferenceRedirect: returnUndefined, - isSourceOfProjectReferenceRedirect: returnFalse, - writeFile: (name, text, writeByteOrderMark, _onError, _sourceFiles, data) => { - switch (name) { - case jsFilePath: - if (jsFileText === text) - return; - break; - case sourceMapFilePath: - if (sourceMapText === text) - return; - break; - case buildInfoPath: - break; - case declarationFilePath: - if (declarationText === text) - return; - changedDtsText = text; - changedDtsData = data; - break; - case declarationMapPath: - if (declarationMapText === text) - return; - break; - default: - Debug.fail(`Unexpected path: ${name}`); - } - outputFiles.push({ name, text, writeByteOrderMark, data }); - }, - isEmitBlocked: returnFalse, - readFile: (f) => host.readFile(f), - fileExists: (f) => host.fileExists(f), - useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(), - getBuildInfo: (bundle) => { - const program = buildInfo.program; - if (program && changedDtsText !== void 0 && config.options.composite) { - program.outSignature = computeSignature(changedDtsText, host, changedDtsData); - } - const { js, dts, sourceFiles } = buildInfo.bundle; - bundle.js.sources = js.sources; - if (dts) { - bundle.dts.sources = dts.sources; - } - bundle.sourceFiles = sourceFiles; - return createBuildInfo(program, bundle); - }, - getSourceFileFromReference: returnUndefined, - redirectTargetsMap: createMultiMap(), - getFileIncludeReasons: notImplemented, - createHash: maybeBind(host, host.createHash) - }; - emitFiles( - notImplementedResolver, - emitHost, - /*targetSourceFile*/ - void 0, - getTransformers(config.options, customTransformers) - ); - return outputFiles; - } - function createPrinter(printerOptions = {}, handlers = {}) { - var { - hasGlobalName, - onEmitNode = noEmitNotification, - isEmitNotificationEnabled, - substituteNode = noEmitSubstitution, - onBeforeEmitNode, - onAfterEmitNode, - onBeforeEmitNodeArray, - onAfterEmitNodeArray, - onBeforeEmitToken, - onAfterEmitToken - } = handlers; - var extendedDiagnostics = !!printerOptions.extendedDiagnostics; - var newLine = getNewLineCharacter(printerOptions); - var moduleKind = getEmitModuleKind(printerOptions); - var bundledHelpers = /* @__PURE__ */ new Map(); - var currentSourceFile; - var nodeIdToGeneratedName; - var nodeIdToGeneratedPrivateName; - var autoGeneratedIdToGeneratedName; - var generatedNames; - var formattedNameTempFlagsStack; - var formattedNameTempFlags; - var privateNameTempFlagsStack; - var privateNameTempFlags; - var tempFlagsStack; - var tempFlags; - var reservedNamesStack; - var reservedNames; - var reservedPrivateNamesStack; - var reservedPrivateNames; - var preserveSourceNewlines = printerOptions.preserveSourceNewlines; - var nextListElementPos; - var writer; - var ownWriter; - var write = writeBase; - var isOwnFileEmit; - var bundleFileInfo = printerOptions.writeBundleFileInfo ? { sections: [] } : void 0; - var relativeToBuildInfo = bundleFileInfo ? Debug.checkDefined(printerOptions.relativeToBuildInfo) : void 0; - var recordInternalSection = printerOptions.recordInternalSection; - var sourceFileTextPos = 0; - var sourceFileTextKind = "text" /* Text */; - var sourceMapsDisabled = true; - var sourceMapGenerator; - var sourceMapSource; - var sourceMapSourceIndex = -1; - var mostRecentlyAddedSourceMapSource; - var mostRecentlyAddedSourceMapSourceIndex = -1; - var containerPos = -1; - var containerEnd = -1; - var declarationListContainerEnd = -1; - var currentLineMap; - var detachedCommentsInfo; - var hasWrittenComment = false; - var commentsDisabled = !!printerOptions.removeComments; - var lastSubstitution; - var currentParenthesizerRule; - var { enter: enterComment, exit: exitComment } = createTimerIf(extendedDiagnostics, "commentTime", "beforeComment", "afterComment"); - var parenthesizer = factory.parenthesizer; - var typeArgumentParenthesizerRuleSelector = { - select: (index) => index === 0 ? parenthesizer.parenthesizeLeadingTypeArgument : void 0 - }; - var emitBinaryExpression = createEmitBinaryExpression(); - reset2(); - return { - // public API - printNode, - printList, - printFile, - printBundle, - // internal API - writeNode, - writeList, - writeFile: writeFile2, - writeBundle, - bundleFileInfo - }; - function printNode(hint, node, sourceFile) { - switch (hint) { - case 0 /* SourceFile */: - Debug.assert(isSourceFile(node), "Expected a SourceFile node."); - break; - case 2 /* IdentifierName */: - Debug.assert(isIdentifier(node), "Expected an Identifier node."); - break; - case 1 /* Expression */: - Debug.assert(isExpression(node), "Expected an Expression node."); - break; - } - switch (node.kind) { - case 312 /* SourceFile */: - return printFile(node); - case 313 /* Bundle */: - return printBundle(node); - case 314 /* UnparsedSource */: - return printUnparsedSource(node); - } - writeNode(hint, node, sourceFile, beginPrint()); - return endPrint(); - } - function printList(format, nodes, sourceFile) { - writeList(format, nodes, sourceFile, beginPrint()); - return endPrint(); - } - function printBundle(bundle) { - writeBundle( - bundle, - beginPrint(), - /*sourceMapGenerator*/ - void 0 - ); - return endPrint(); - } - function printFile(sourceFile) { - writeFile2( - sourceFile, - beginPrint(), - /*sourceMapGenerator*/ - void 0 - ); - return endPrint(); - } - function printUnparsedSource(unparsed) { - writeUnparsedSource(unparsed, beginPrint()); - return endPrint(); - } - function writeNode(hint, node, sourceFile, output) { - const previousWriter = writer; - setWriter( - output, - /*_sourceMapGenerator*/ - void 0 - ); - print(hint, node, sourceFile); - reset2(); - writer = previousWriter; - } - function writeList(format, nodes, sourceFile, output) { - const previousWriter = writer; - setWriter( - output, - /*_sourceMapGenerator*/ - void 0 - ); - if (sourceFile) { - setSourceFile(sourceFile); - } - emitList( - /*parentNode*/ - void 0, - nodes, - format - ); - reset2(); - writer = previousWriter; - } - function getTextPosWithWriteLine() { - return writer.getTextPosWithWriteLine ? writer.getTextPosWithWriteLine() : writer.getTextPos(); - } - function updateOrPushBundleFileTextLike(pos, end, kind) { - const last2 = lastOrUndefined(bundleFileInfo.sections); - if (last2 && last2.kind === kind) { - last2.end = end; - } else { - bundleFileInfo.sections.push({ pos, end, kind }); - } - } - function recordBundleFileInternalSectionStart(node) { - if (recordInternalSection && bundleFileInfo && currentSourceFile && (isDeclaration(node) || isVariableStatement(node)) && isInternalDeclaration(node, currentSourceFile) && sourceFileTextKind !== "internal" /* Internal */) { - const prevSourceFileTextKind = sourceFileTextKind; - recordBundleFileTextLikeSection(writer.getTextPos()); - sourceFileTextPos = getTextPosWithWriteLine(); - sourceFileTextKind = "internal" /* Internal */; - return prevSourceFileTextKind; - } - return void 0; - } - function recordBundleFileInternalSectionEnd(prevSourceFileTextKind) { - if (prevSourceFileTextKind) { - recordBundleFileTextLikeSection(writer.getTextPos()); - sourceFileTextPos = getTextPosWithWriteLine(); - sourceFileTextKind = prevSourceFileTextKind; - } - } - function recordBundleFileTextLikeSection(end) { - if (sourceFileTextPos < end) { - updateOrPushBundleFileTextLike(sourceFileTextPos, end, sourceFileTextKind); - return true; - } - return false; - } - function writeBundle(bundle, output, sourceMapGenerator2) { - isOwnFileEmit = false; - const previousWriter = writer; - setWriter(output, sourceMapGenerator2); - emitShebangIfNeeded(bundle); - emitPrologueDirectivesIfNeeded(bundle); - emitHelpers(bundle); - emitSyntheticTripleSlashReferencesIfNeeded(bundle); - for (const prepend of bundle.prepends) { - writeLine(); - const pos = writer.getTextPos(); - const savedSections = bundleFileInfo && bundleFileInfo.sections; - if (savedSections) - bundleFileInfo.sections = []; - print( - 4 /* Unspecified */, - prepend, - /*sourceFile*/ - void 0 - ); - if (bundleFileInfo) { - const newSections = bundleFileInfo.sections; - bundleFileInfo.sections = savedSections; - if (prepend.oldFileOfCurrentEmit) - bundleFileInfo.sections.push(...newSections); - else { - newSections.forEach((section) => Debug.assert(isBundleFileTextLike(section))); - bundleFileInfo.sections.push({ - pos, - end: writer.getTextPos(), - kind: "prepend" /* Prepend */, - data: relativeToBuildInfo(prepend.fileName), - texts: newSections - }); - } - } - } - sourceFileTextPos = getTextPosWithWriteLine(); - for (const sourceFile of bundle.sourceFiles) { - print(0 /* SourceFile */, sourceFile, sourceFile); - } - if (bundleFileInfo && bundle.sourceFiles.length) { - const end = writer.getTextPos(); - if (recordBundleFileTextLikeSection(end)) { - const prologues = getPrologueDirectivesFromBundledSourceFiles(bundle); - if (prologues) { - if (!bundleFileInfo.sources) - bundleFileInfo.sources = {}; - bundleFileInfo.sources.prologues = prologues; - } - const helpers = getHelpersFromBundledSourceFiles(bundle); - if (helpers) { - if (!bundleFileInfo.sources) - bundleFileInfo.sources = {}; - bundleFileInfo.sources.helpers = helpers; - } - } - } - reset2(); - writer = previousWriter; - } - function writeUnparsedSource(unparsed, output) { - const previousWriter = writer; - setWriter( - output, - /*_sourceMapGenerator*/ - void 0 - ); - print( - 4 /* Unspecified */, - unparsed, - /*sourceFile*/ - void 0 - ); - reset2(); - writer = previousWriter; - } - function writeFile2(sourceFile, output, sourceMapGenerator2) { - isOwnFileEmit = true; - const previousWriter = writer; - setWriter(output, sourceMapGenerator2); - emitShebangIfNeeded(sourceFile); - emitPrologueDirectivesIfNeeded(sourceFile); - print(0 /* SourceFile */, sourceFile, sourceFile); - reset2(); - writer = previousWriter; - } - function beginPrint() { - return ownWriter || (ownWriter = createTextWriter(newLine)); - } - function endPrint() { - const text = ownWriter.getText(); - ownWriter.clear(); - return text; - } - function print(hint, node, sourceFile) { - if (sourceFile) { - setSourceFile(sourceFile); - } - pipelineEmit( - hint, - node, - /*parenthesizerRule*/ - void 0 - ); - } - function setSourceFile(sourceFile) { - currentSourceFile = sourceFile; - currentLineMap = void 0; - detachedCommentsInfo = void 0; - if (sourceFile) { - setSourceMapSource(sourceFile); - } - } - function setWriter(_writer, _sourceMapGenerator) { - if (_writer && printerOptions.omitTrailingSemicolon) { - _writer = getTrailingSemicolonDeferringWriter(_writer); - } - writer = _writer; - sourceMapGenerator = _sourceMapGenerator; - sourceMapsDisabled = !writer || !sourceMapGenerator; - } - function reset2() { - nodeIdToGeneratedName = []; - nodeIdToGeneratedPrivateName = []; - autoGeneratedIdToGeneratedName = []; - generatedNames = /* @__PURE__ */ new Set(); - formattedNameTempFlagsStack = []; - formattedNameTempFlags = /* @__PURE__ */ new Map(); - privateNameTempFlagsStack = []; - privateNameTempFlags = 0 /* Auto */; - tempFlagsStack = []; - tempFlags = 0 /* Auto */; - reservedNamesStack = []; - reservedNames = void 0; - reservedPrivateNamesStack = []; - reservedPrivateNames = void 0; - currentSourceFile = void 0; - currentLineMap = void 0; - detachedCommentsInfo = void 0; - setWriter( - /*output*/ - void 0, - /*_sourceMapGenerator*/ - void 0 - ); - } - function getCurrentLineMap() { - return currentLineMap || (currentLineMap = getLineStarts(Debug.checkDefined(currentSourceFile))); - } - function emit(node, parenthesizerRule) { - if (node === void 0) - return; - const prevSourceFileTextKind = recordBundleFileInternalSectionStart(node); - pipelineEmit(4 /* Unspecified */, node, parenthesizerRule); - recordBundleFileInternalSectionEnd(prevSourceFileTextKind); - } - function emitIdentifierName(node) { - if (node === void 0) - return; - pipelineEmit( - 2 /* IdentifierName */, - node, - /*parenthesizerRule*/ - void 0 - ); - } - function emitExpression(node, parenthesizerRule) { - if (node === void 0) - return; - pipelineEmit(1 /* Expression */, node, parenthesizerRule); - } - function emitJsxAttributeValue(node) { - pipelineEmit(isStringLiteral(node) ? 6 /* JsxAttributeValue */ : 4 /* Unspecified */, node); - } - function beforeEmitNode(node) { - if (preserveSourceNewlines && getInternalEmitFlags(node) & 4 /* IgnoreSourceNewlines */) { - preserveSourceNewlines = false; - } - } - function afterEmitNode(savedPreserveSourceNewlines) { - preserveSourceNewlines = savedPreserveSourceNewlines; - } - function pipelineEmit(emitHint, node, parenthesizerRule) { - currentParenthesizerRule = parenthesizerRule; - const pipelinePhase = getPipelinePhase(0 /* Notification */, emitHint, node); - pipelinePhase(emitHint, node); - currentParenthesizerRule = void 0; - } - function shouldEmitComments(node) { - return !commentsDisabled && !isSourceFile(node); - } - function shouldEmitSourceMaps(node) { - return !sourceMapsDisabled && !isSourceFile(node) && !isInJsonFile(node) && !isUnparsedSource(node) && !isUnparsedPrepend(node); - } - function getPipelinePhase(phase, emitHint, node) { - switch (phase) { - case 0 /* Notification */: - if (onEmitNode !== noEmitNotification && (!isEmitNotificationEnabled || isEmitNotificationEnabled(node))) { - return pipelineEmitWithNotification; - } - case 1 /* Substitution */: - if (substituteNode !== noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node) || node) !== node) { - if (currentParenthesizerRule) { - lastSubstitution = currentParenthesizerRule(lastSubstitution); - } - return pipelineEmitWithSubstitution; - } - case 2 /* Comments */: - if (shouldEmitComments(node)) { - return pipelineEmitWithComments; - } - case 3 /* SourceMaps */: - if (shouldEmitSourceMaps(node)) { - return pipelineEmitWithSourceMaps; - } - case 4 /* Emit */: - return pipelineEmitWithHint; - default: - return Debug.assertNever(phase); - } - } - function getNextPipelinePhase(currentPhase, emitHint, node) { - return getPipelinePhase(currentPhase + 1, emitHint, node); - } - function pipelineEmitWithNotification(hint, node) { - const pipelinePhase = getNextPipelinePhase(0 /* Notification */, hint, node); - onEmitNode(hint, node, pipelinePhase); - } - function pipelineEmitWithHint(hint, node) { - onBeforeEmitNode == null ? void 0 : onBeforeEmitNode(node); - if (preserveSourceNewlines) { - const savedPreserveSourceNewlines = preserveSourceNewlines; - beforeEmitNode(node); - pipelineEmitWithHintWorker(hint, node); - afterEmitNode(savedPreserveSourceNewlines); - } else { - pipelineEmitWithHintWorker(hint, node); - } - onAfterEmitNode == null ? void 0 : onAfterEmitNode(node); - currentParenthesizerRule = void 0; - } - function pipelineEmitWithHintWorker(hint, node, allowSnippets = true) { - if (allowSnippets) { - const snippet = getSnippetElement(node); - if (snippet) { - return emitSnippetNode(hint, node, snippet); - } - } - if (hint === 0 /* SourceFile */) - return emitSourceFile(cast(node, isSourceFile)); - if (hint === 2 /* IdentifierName */) - return emitIdentifier(cast(node, isIdentifier)); - if (hint === 6 /* JsxAttributeValue */) - return emitLiteral( - cast(node, isStringLiteral), - /*jsxAttributeEscape*/ - true - ); - if (hint === 3 /* MappedTypeParameter */) - return emitMappedTypeParameter(cast(node, isTypeParameterDeclaration)); - if (hint === 5 /* EmbeddedStatement */) { - Debug.assertNode(node, isEmptyStatement); - return emitEmptyStatement( - /*isEmbeddedStatement*/ - true - ); - } - if (hint === 4 /* Unspecified */) { - switch (node.kind) { - case 16 /* TemplateHead */: - case 17 /* TemplateMiddle */: - case 18 /* TemplateTail */: - return emitLiteral( - node, - /*jsxAttributeEscape*/ - false - ); - case 80 /* Identifier */: - return emitIdentifier(node); - case 81 /* PrivateIdentifier */: - return emitPrivateIdentifier(node); - case 166 /* QualifiedName */: - return emitQualifiedName(node); - case 167 /* ComputedPropertyName */: - return emitComputedPropertyName(node); - case 168 /* TypeParameter */: - return emitTypeParameter(node); - case 169 /* Parameter */: - return emitParameter(node); - case 170 /* Decorator */: - return emitDecorator(node); - case 171 /* PropertySignature */: - return emitPropertySignature(node); - case 172 /* PropertyDeclaration */: - return emitPropertyDeclaration(node); - case 173 /* MethodSignature */: - return emitMethodSignature(node); - case 174 /* MethodDeclaration */: - return emitMethodDeclaration(node); - case 175 /* ClassStaticBlockDeclaration */: - return emitClassStaticBlockDeclaration(node); - case 176 /* Constructor */: - return emitConstructor(node); - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return emitAccessorDeclaration(node); - case 179 /* CallSignature */: - return emitCallSignature(node); - case 180 /* ConstructSignature */: - return emitConstructSignature(node); - case 181 /* IndexSignature */: - return emitIndexSignature(node); - case 182 /* TypePredicate */: - return emitTypePredicate(node); - case 183 /* TypeReference */: - return emitTypeReference(node); - case 184 /* FunctionType */: - return emitFunctionType(node); - case 185 /* ConstructorType */: - return emitConstructorType(node); - case 186 /* TypeQuery */: - return emitTypeQuery(node); - case 187 /* TypeLiteral */: - return emitTypeLiteral(node); - case 188 /* ArrayType */: - return emitArrayType(node); - case 189 /* TupleType */: - return emitTupleType(node); - case 190 /* OptionalType */: - return emitOptionalType(node); - case 192 /* UnionType */: - return emitUnionType(node); - case 193 /* IntersectionType */: - return emitIntersectionType(node); - case 194 /* ConditionalType */: - return emitConditionalType(node); - case 195 /* InferType */: - return emitInferType(node); - case 196 /* ParenthesizedType */: - return emitParenthesizedType(node); - case 233 /* ExpressionWithTypeArguments */: - return emitExpressionWithTypeArguments(node); - case 197 /* ThisType */: - return emitThisType(); - case 198 /* TypeOperator */: - return emitTypeOperator(node); - case 199 /* IndexedAccessType */: - return emitIndexedAccessType(node); - case 200 /* MappedType */: - return emitMappedType(node); - case 201 /* LiteralType */: - return emitLiteralType(node); - case 202 /* NamedTupleMember */: - return emitNamedTupleMember(node); - case 203 /* TemplateLiteralType */: - return emitTemplateType(node); - case 204 /* TemplateLiteralTypeSpan */: - return emitTemplateTypeSpan(node); - case 205 /* ImportType */: - return emitImportTypeNode(node); - case 206 /* ObjectBindingPattern */: - return emitObjectBindingPattern(node); - case 207 /* ArrayBindingPattern */: - return emitArrayBindingPattern(node); - case 208 /* BindingElement */: - return emitBindingElement(node); - case 239 /* TemplateSpan */: - return emitTemplateSpan(node); - case 240 /* SemicolonClassElement */: - return emitSemicolonClassElement(); - case 241 /* Block */: - return emitBlock(node); - case 243 /* VariableStatement */: - return emitVariableStatement(node); - case 242 /* EmptyStatement */: - return emitEmptyStatement( - /*isEmbeddedStatement*/ - false - ); - case 244 /* ExpressionStatement */: - return emitExpressionStatement(node); - case 245 /* IfStatement */: - return emitIfStatement(node); - case 246 /* DoStatement */: - return emitDoStatement(node); - case 247 /* WhileStatement */: - return emitWhileStatement(node); - case 248 /* ForStatement */: - return emitForStatement(node); - case 249 /* ForInStatement */: - return emitForInStatement(node); - case 250 /* ForOfStatement */: - return emitForOfStatement(node); - case 251 /* ContinueStatement */: - return emitContinueStatement(node); - case 252 /* BreakStatement */: - return emitBreakStatement(node); - case 253 /* ReturnStatement */: - return emitReturnStatement(node); - case 254 /* WithStatement */: - return emitWithStatement(node); - case 255 /* SwitchStatement */: - return emitSwitchStatement(node); - case 256 /* LabeledStatement */: - return emitLabeledStatement(node); - case 257 /* ThrowStatement */: - return emitThrowStatement(node); - case 258 /* TryStatement */: - return emitTryStatement(node); - case 259 /* DebuggerStatement */: - return emitDebuggerStatement(node); - case 260 /* VariableDeclaration */: - return emitVariableDeclaration(node); - case 261 /* VariableDeclarationList */: - return emitVariableDeclarationList(node); - case 262 /* FunctionDeclaration */: - return emitFunctionDeclaration(node); - case 263 /* ClassDeclaration */: - return emitClassDeclaration(node); - case 264 /* InterfaceDeclaration */: - return emitInterfaceDeclaration(node); - case 265 /* TypeAliasDeclaration */: - return emitTypeAliasDeclaration(node); - case 266 /* EnumDeclaration */: - return emitEnumDeclaration(node); - case 267 /* ModuleDeclaration */: - return emitModuleDeclaration(node); - case 268 /* ModuleBlock */: - return emitModuleBlock(node); - case 269 /* CaseBlock */: - return emitCaseBlock(node); - case 270 /* NamespaceExportDeclaration */: - return emitNamespaceExportDeclaration(node); - case 271 /* ImportEqualsDeclaration */: - return emitImportEqualsDeclaration(node); - case 272 /* ImportDeclaration */: - return emitImportDeclaration(node); - case 273 /* ImportClause */: - return emitImportClause(node); - case 274 /* NamespaceImport */: - return emitNamespaceImport(node); - case 280 /* NamespaceExport */: - return emitNamespaceExport(node); - case 275 /* NamedImports */: - return emitNamedImports(node); - case 276 /* ImportSpecifier */: - return emitImportSpecifier(node); - case 277 /* ExportAssignment */: - return emitExportAssignment(node); - case 278 /* ExportDeclaration */: - return emitExportDeclaration(node); - case 279 /* NamedExports */: - return emitNamedExports(node); - case 281 /* ExportSpecifier */: - return emitExportSpecifier(node); - case 300 /* AssertClause */: - return emitAssertClause(node); - case 301 /* AssertEntry */: - return emitAssertEntry(node); - case 282 /* MissingDeclaration */: - return; - case 283 /* ExternalModuleReference */: - return emitExternalModuleReference(node); - case 12 /* JsxText */: - return emitJsxText(node); - case 286 /* JsxOpeningElement */: - case 289 /* JsxOpeningFragment */: - return emitJsxOpeningElementOrFragment(node); - case 287 /* JsxClosingElement */: - case 290 /* JsxClosingFragment */: - return emitJsxClosingElementOrFragment(node); - case 291 /* JsxAttribute */: - return emitJsxAttribute(node); - case 292 /* JsxAttributes */: - return emitJsxAttributes(node); - case 293 /* JsxSpreadAttribute */: - return emitJsxSpreadAttribute(node); - case 294 /* JsxExpression */: - return emitJsxExpression(node); - case 295 /* JsxNamespacedName */: - return emitJsxNamespacedName(node); - case 296 /* CaseClause */: - return emitCaseClause(node); - case 297 /* DefaultClause */: - return emitDefaultClause(node); - case 298 /* HeritageClause */: - return emitHeritageClause(node); - case 299 /* CatchClause */: - return emitCatchClause(node); - case 303 /* PropertyAssignment */: - return emitPropertyAssignment(node); - case 304 /* ShorthandPropertyAssignment */: - return emitShorthandPropertyAssignment(node); - case 305 /* SpreadAssignment */: - return emitSpreadAssignment(node); - case 306 /* EnumMember */: - return emitEnumMember(node); - case 307 /* UnparsedPrologue */: - return writeUnparsedNode(node); - case 314 /* UnparsedSource */: - case 308 /* UnparsedPrepend */: - return emitUnparsedSourceOrPrepend(node); - case 309 /* UnparsedText */: - case 310 /* UnparsedInternalText */: - return emitUnparsedTextLike(node); - case 311 /* UnparsedSyntheticReference */: - return emitUnparsedSyntheticReference(node); - case 312 /* SourceFile */: - return emitSourceFile(node); - case 313 /* Bundle */: - return Debug.fail("Bundles should be printed using printBundle"); - case 315 /* InputFiles */: - return Debug.fail("InputFiles should not be printed"); - case 316 /* JSDocTypeExpression */: - return emitJSDocTypeExpression(node); - case 317 /* JSDocNameReference */: - return emitJSDocNameReference(node); - case 319 /* JSDocAllType */: - return writePunctuation("*"); - case 320 /* JSDocUnknownType */: - return writePunctuation("?"); - case 321 /* JSDocNullableType */: - return emitJSDocNullableType(node); - case 322 /* JSDocNonNullableType */: - return emitJSDocNonNullableType(node); - case 323 /* JSDocOptionalType */: - return emitJSDocOptionalType(node); - case 324 /* JSDocFunctionType */: - return emitJSDocFunctionType(node); - case 191 /* RestType */: - case 325 /* JSDocVariadicType */: - return emitRestOrJSDocVariadicType(node); - case 326 /* JSDocNamepathType */: - return; - case 327 /* JSDoc */: - return emitJSDoc(node); - case 329 /* JSDocTypeLiteral */: - return emitJSDocTypeLiteral(node); - case 330 /* JSDocSignature */: - return emitJSDocSignature(node); - case 334 /* JSDocTag */: - case 339 /* JSDocClassTag */: - case 344 /* JSDocOverrideTag */: - return emitJSDocSimpleTag(node); - case 335 /* JSDocAugmentsTag */: - case 336 /* JSDocImplementsTag */: - return emitJSDocHeritageTag(node); - case 337 /* JSDocAuthorTag */: - case 338 /* JSDocDeprecatedTag */: - return; - case 340 /* JSDocPublicTag */: - case 341 /* JSDocPrivateTag */: - case 342 /* JSDocProtectedTag */: - case 343 /* JSDocReadonlyTag */: - return; - case 345 /* JSDocCallbackTag */: - return emitJSDocCallbackTag(node); - case 346 /* JSDocOverloadTag */: - return emitJSDocOverloadTag(node); - case 348 /* JSDocParameterTag */: - case 355 /* JSDocPropertyTag */: - return emitJSDocPropertyLikeTag(node); - case 347 /* JSDocEnumTag */: - case 349 /* JSDocReturnTag */: - case 350 /* JSDocThisTag */: - case 351 /* JSDocTypeTag */: - case 356 /* JSDocThrowsTag */: - case 357 /* JSDocSatisfiesTag */: - return emitJSDocSimpleTypedTag(node); - case 352 /* JSDocTemplateTag */: - return emitJSDocTemplateTag(node); - case 353 /* JSDocTypedefTag */: - return emitJSDocTypedefTag(node); - case 354 /* JSDocSeeTag */: - return emitJSDocSeeTag(node); - case 359 /* NotEmittedStatement */: - return; - } - if (isExpression(node)) { - hint = 1 /* Expression */; - if (substituteNode !== noEmitSubstitution) { - const substitute = substituteNode(hint, node) || node; - if (substitute !== node) { - node = substitute; - if (currentParenthesizerRule) { - node = currentParenthesizerRule(node); - } - } - } - } - } - if (hint === 1 /* Expression */) { - switch (node.kind) { - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - return emitNumericOrBigIntLiteral(node); - case 11 /* StringLiteral */: - case 14 /* RegularExpressionLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - return emitLiteral( - node, - /*jsxAttributeEscape*/ - false - ); - case 80 /* Identifier */: - return emitIdentifier(node); - case 81 /* PrivateIdentifier */: - return emitPrivateIdentifier(node); - case 209 /* ArrayLiteralExpression */: - return emitArrayLiteralExpression(node); - case 210 /* ObjectLiteralExpression */: - return emitObjectLiteralExpression(node); - case 211 /* PropertyAccessExpression */: - return emitPropertyAccessExpression(node); - case 212 /* ElementAccessExpression */: - return emitElementAccessExpression(node); - case 213 /* CallExpression */: - return emitCallExpression(node); - case 214 /* NewExpression */: - return emitNewExpression(node); - case 215 /* TaggedTemplateExpression */: - return emitTaggedTemplateExpression(node); - case 216 /* TypeAssertionExpression */: - return emitTypeAssertionExpression(node); - case 217 /* ParenthesizedExpression */: - return emitParenthesizedExpression(node); - case 218 /* FunctionExpression */: - return emitFunctionExpression(node); - case 219 /* ArrowFunction */: - return emitArrowFunction(node); - case 220 /* DeleteExpression */: - return emitDeleteExpression(node); - case 221 /* TypeOfExpression */: - return emitTypeOfExpression(node); - case 222 /* VoidExpression */: - return emitVoidExpression(node); - case 223 /* AwaitExpression */: - return emitAwaitExpression(node); - case 224 /* PrefixUnaryExpression */: - return emitPrefixUnaryExpression(node); - case 225 /* PostfixUnaryExpression */: - return emitPostfixUnaryExpression(node); - case 226 /* BinaryExpression */: - return emitBinaryExpression(node); - case 227 /* ConditionalExpression */: - return emitConditionalExpression(node); - case 228 /* TemplateExpression */: - return emitTemplateExpression(node); - case 229 /* YieldExpression */: - return emitYieldExpression(node); - case 230 /* SpreadElement */: - return emitSpreadElement(node); - case 231 /* ClassExpression */: - return emitClassExpression(node); - case 232 /* OmittedExpression */: - return; - case 234 /* AsExpression */: - return emitAsExpression(node); - case 235 /* NonNullExpression */: - return emitNonNullExpression(node); - case 233 /* ExpressionWithTypeArguments */: - return emitExpressionWithTypeArguments(node); - case 238 /* SatisfiesExpression */: - return emitSatisfiesExpression(node); - case 236 /* MetaProperty */: - return emitMetaProperty(node); - case 237 /* SyntheticExpression */: - return Debug.fail("SyntheticExpression should never be printed."); - case 282 /* MissingDeclaration */: - return; - case 284 /* JsxElement */: - return emitJsxElement(node); - case 285 /* JsxSelfClosingElement */: - return emitJsxSelfClosingElement(node); - case 288 /* JsxFragment */: - return emitJsxFragment(node); - case 358 /* SyntaxList */: - return Debug.fail("SyntaxList should not be printed"); - case 359 /* NotEmittedStatement */: - return; - case 360 /* PartiallyEmittedExpression */: - return emitPartiallyEmittedExpression(node); - case 361 /* CommaListExpression */: - return emitCommaList(node); - case 362 /* SyntheticReferenceExpression */: - return Debug.fail("SyntheticReferenceExpression should not be printed"); - } - } - if (isKeyword(node.kind)) - return writeTokenNode(node, writeKeyword); - if (isTokenKind(node.kind)) - return writeTokenNode(node, writePunctuation); - Debug.fail(`Unhandled SyntaxKind: ${Debug.formatSyntaxKind(node.kind)}.`); - } - function emitMappedTypeParameter(node) { - emit(node.name); - writeSpace(); - writeKeyword("in"); - writeSpace(); - emit(node.constraint); - } - function pipelineEmitWithSubstitution(hint, node) { - const pipelinePhase = getNextPipelinePhase(1 /* Substitution */, hint, node); - Debug.assertIsDefined(lastSubstitution); - node = lastSubstitution; - lastSubstitution = void 0; - pipelinePhase(hint, node); - } - function getHelpersFromBundledSourceFiles(bundle) { - let result; - if (moduleKind === 0 /* None */ || printerOptions.noEmitHelpers) { - return void 0; - } - const bundledHelpers2 = /* @__PURE__ */ new Map(); - for (const sourceFile of bundle.sourceFiles) { - const shouldSkip = getExternalHelpersModuleName(sourceFile) !== void 0; - const helpers = getSortedEmitHelpers(sourceFile); - if (!helpers) - continue; - for (const helper of helpers) { - if (!helper.scoped && !shouldSkip && !bundledHelpers2.get(helper.name)) { - bundledHelpers2.set(helper.name, true); - (result || (result = [])).push(helper.name); - } - } - } - return result; - } - function emitHelpers(node) { - let helpersEmitted = false; - const bundle = node.kind === 313 /* Bundle */ ? node : void 0; - if (bundle && moduleKind === 0 /* None */) { - return; - } - const numPrepends = bundle ? bundle.prepends.length : 0; - const numNodes = bundle ? bundle.sourceFiles.length + numPrepends : 1; - for (let i = 0; i < numNodes; i++) { - const currentNode = bundle ? i < numPrepends ? bundle.prepends[i] : bundle.sourceFiles[i - numPrepends] : node; - const sourceFile = isSourceFile(currentNode) ? currentNode : isUnparsedSource(currentNode) ? void 0 : currentSourceFile; - const shouldSkip = printerOptions.noEmitHelpers || !!sourceFile && hasRecordedExternalHelpers(sourceFile); - const shouldBundle = (isSourceFile(currentNode) || isUnparsedSource(currentNode)) && !isOwnFileEmit; - const helpers = isUnparsedSource(currentNode) ? currentNode.helpers : getSortedEmitHelpers(currentNode); - if (helpers) { - for (const helper of helpers) { - if (!helper.scoped) { - if (shouldSkip) - continue; - if (shouldBundle) { - if (bundledHelpers.get(helper.name)) { - continue; - } - bundledHelpers.set(helper.name, true); - } - } else if (bundle) { - continue; - } - const pos = getTextPosWithWriteLine(); - if (typeof helper.text === "string") { - writeLines(helper.text); - } else { - writeLines(helper.text(makeFileLevelOptimisticUniqueName)); - } - if (bundleFileInfo) - bundleFileInfo.sections.push({ pos, end: writer.getTextPos(), kind: "emitHelpers" /* EmitHelpers */, data: helper.name }); - helpersEmitted = true; - } - } - } - return helpersEmitted; - } - function getSortedEmitHelpers(node) { - const helpers = getEmitHelpers(node); - return helpers && stableSort(helpers, compareEmitHelpers); - } - function emitNumericOrBigIntLiteral(node) { - emitLiteral( - node, - /*jsxAttributeEscape*/ - false - ); - } - function emitLiteral(node, jsxAttributeEscape) { - const text = getLiteralTextOfNode(node, printerOptions.neverAsciiEscape, jsxAttributeEscape); - if ((printerOptions.sourceMap || printerOptions.inlineSourceMap) && (node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind))) { - writeLiteral(text); - } else { - writeStringLiteral(text); - } - } - function emitUnparsedSourceOrPrepend(unparsed) { - for (const text of unparsed.texts) { - writeLine(); - emit(text); - } - } - function writeUnparsedNode(unparsed) { - writer.rawWrite(unparsed.parent.text.substring(unparsed.pos, unparsed.end)); - } - function emitUnparsedTextLike(unparsed) { - const pos = getTextPosWithWriteLine(); - writeUnparsedNode(unparsed); - if (bundleFileInfo) { - updateOrPushBundleFileTextLike( - pos, - writer.getTextPos(), - unparsed.kind === 309 /* UnparsedText */ ? "text" /* Text */ : "internal" /* Internal */ - ); - } - } - function emitUnparsedSyntheticReference(unparsed) { - const pos = getTextPosWithWriteLine(); - writeUnparsedNode(unparsed); - if (bundleFileInfo) { - const section = clone(unparsed.section); - section.pos = pos; - section.end = writer.getTextPos(); - bundleFileInfo.sections.push(section); - } - } - function emitSnippetNode(hint, node, snippet) { - switch (snippet.kind) { - case 1 /* Placeholder */: - emitPlaceholder(hint, node, snippet); - break; - case 0 /* TabStop */: - emitTabStop(hint, node, snippet); - break; - } - } - function emitPlaceholder(hint, node, snippet) { - nonEscapingWrite(`\${${snippet.order}:`); - pipelineEmitWithHintWorker( - hint, - node, - /*allowSnippets*/ - false - ); - nonEscapingWrite(`}`); - } - function emitTabStop(hint, node, snippet) { - Debug.assert( - node.kind === 242 /* EmptyStatement */, - `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` - ); - Debug.assert( - hint !== 5 /* EmbeddedStatement */, - `A tab stop cannot be attached to an embedded statement.` - ); - nonEscapingWrite(`$${snippet.order}`); - } - function emitIdentifier(node) { - const writeText = node.symbol ? writeSymbol : write; - writeText(getTextOfNode2( - node, - /*includeTrivia*/ - false - ), node.symbol); - emitList(node, getIdentifierTypeArguments(node), 53776 /* TypeParameters */); - } - function emitPrivateIdentifier(node) { - write(getTextOfNode2( - node, - /*includeTrivia*/ - false - )); - } - function emitQualifiedName(node) { - emitEntityName(node.left); - writePunctuation("."); - emit(node.right); - } - function emitEntityName(node) { - if (node.kind === 80 /* Identifier */) { - emitExpression(node); - } else { - emit(node); - } - } - function emitComputedPropertyName(node) { - const savedPrivateNameTempFlags = privateNameTempFlags; - const savedReservedMemberNames = reservedPrivateNames; - popPrivateNameGenerationScope(); - writePunctuation("["); - emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfComputedPropertyName); - writePunctuation("]"); - pushPrivateNameGenerationScope(savedPrivateNameTempFlags, savedReservedMemberNames); - } - function emitTypeParameter(node) { - emitModifierList(node, node.modifiers); - emit(node.name); - if (node.constraint) { - writeSpace(); - writeKeyword("extends"); - writeSpace(); - emit(node.constraint); - } - if (node.default) { - writeSpace(); - writeOperator("="); - writeSpace(); - emit(node.default); - } - } - function emitParameter(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - true - ); - emit(node.dotDotDotToken); - emitNodeWithWriter(node.name, writeParameter); - emit(node.questionToken); - if (node.parent && node.parent.kind === 324 /* JSDocFunctionType */ && !node.name) { - emit(node.type); - } else { - emitTypeAnnotation(node.type); - } - emitInitializer(node.initializer, node.type ? node.type.end : node.questionToken ? node.questionToken.end : node.name ? node.name.end : node.modifiers ? node.modifiers.end : node.pos, node, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - function emitDecorator(decorator) { - writePunctuation("@"); - emitExpression(decorator.expression, parenthesizer.parenthesizeLeftSideOfAccess); - } - function emitPropertySignature(node) { - emitModifierList(node, node.modifiers); - emitNodeWithWriter(node.name, writeProperty); - emit(node.questionToken); - emitTypeAnnotation(node.type); - writeTrailingSemicolon(); - } - function emitPropertyDeclaration(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - true - ); - emit(node.name); - emit(node.questionToken); - emit(node.exclamationToken); - emitTypeAnnotation(node.type); - emitInitializer(node.initializer, node.type ? node.type.end : node.questionToken ? node.questionToken.end : node.name.end, node); - writeTrailingSemicolon(); - } - function emitMethodSignature(node) { - pushNameGenerationScope(node); - emitModifierList(node, node.modifiers); - emit(node.name); - emit(node.questionToken); - emitTypeParameters(node, node.typeParameters); - emitParameters(node, node.parameters); - emitTypeAnnotation(node.type); - writeTrailingSemicolon(); - popNameGenerationScope(node); - } - function emitMethodDeclaration(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - true - ); - emit(node.asteriskToken); - emit(node.name); - emit(node.questionToken); - emitSignatureAndBody(node, emitSignatureHead); - } - function emitClassStaticBlockDeclaration(node) { - writeKeyword("static"); - emitBlockFunctionBody(node.body); - } - function emitConstructor(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - writeKeyword("constructor"); - emitSignatureAndBody(node, emitSignatureHead); - } - function emitAccessorDeclaration(node) { - const pos = emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - true - ); - const token = node.kind === 177 /* GetAccessor */ ? 139 /* GetKeyword */ : 153 /* SetKeyword */; - emitTokenWithComment(token, pos, writeKeyword, node); - writeSpace(); - emit(node.name); - emitSignatureAndBody(node, emitSignatureHead); - } - function emitCallSignature(node) { - pushNameGenerationScope(node); - emitTypeParameters(node, node.typeParameters); - emitParameters(node, node.parameters); - emitTypeAnnotation(node.type); - writeTrailingSemicolon(); - popNameGenerationScope(node); - } - function emitConstructSignature(node) { - pushNameGenerationScope(node); - writeKeyword("new"); - writeSpace(); - emitTypeParameters(node, node.typeParameters); - emitParameters(node, node.parameters); - emitTypeAnnotation(node.type); - writeTrailingSemicolon(); - popNameGenerationScope(node); - } - function emitIndexSignature(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - emitParametersForIndexSignature(node, node.parameters); - emitTypeAnnotation(node.type); - writeTrailingSemicolon(); - } - function emitTemplateTypeSpan(node) { - emit(node.type); - emit(node.literal); - } - function emitSemicolonClassElement() { - writeTrailingSemicolon(); - } - function emitTypePredicate(node) { - if (node.assertsModifier) { - emit(node.assertsModifier); - writeSpace(); - } - emit(node.parameterName); - if (node.type) { - writeSpace(); - writeKeyword("is"); - writeSpace(); - emit(node.type); - } - } - function emitTypeReference(node) { - emit(node.typeName); - emitTypeArguments(node, node.typeArguments); - } - function emitFunctionType(node) { - pushNameGenerationScope(node); - emitTypeParameters(node, node.typeParameters); - emitParametersForArrow(node, node.parameters); - writeSpace(); - writePunctuation("=>"); - writeSpace(); - emit(node.type); - popNameGenerationScope(node); - } - function emitJSDocFunctionType(node) { - writeKeyword("function"); - emitParameters(node, node.parameters); - writePunctuation(":"); - emit(node.type); - } - function emitJSDocNullableType(node) { - writePunctuation("?"); - emit(node.type); - } - function emitJSDocNonNullableType(node) { - writePunctuation("!"); - emit(node.type); - } - function emitJSDocOptionalType(node) { - emit(node.type); - writePunctuation("="); - } - function emitConstructorType(node) { - pushNameGenerationScope(node); - emitModifierList(node, node.modifiers); - writeKeyword("new"); - writeSpace(); - emitTypeParameters(node, node.typeParameters); - emitParameters(node, node.parameters); - writeSpace(); - writePunctuation("=>"); - writeSpace(); - emit(node.type); - popNameGenerationScope(node); - } - function emitTypeQuery(node) { - writeKeyword("typeof"); - writeSpace(); - emit(node.exprName); - emitTypeArguments(node, node.typeArguments); - } - function emitTypeLiteral(node) { - pushPrivateNameGenerationScope( - 0 /* Auto */, - /*newReservedMemberNames*/ - void 0 - ); - writePunctuation("{"); - const flags = getEmitFlags(node) & 1 /* SingleLine */ ? 768 /* SingleLineTypeLiteralMembers */ : 32897 /* MultiLineTypeLiteralMembers */; - emitList(node, node.members, flags | 524288 /* NoSpaceIfEmpty */); - writePunctuation("}"); - popPrivateNameGenerationScope(); - } - function emitArrayType(node) { - emit(node.elementType, parenthesizer.parenthesizeNonArrayTypeOfPostfixType); - writePunctuation("["); - writePunctuation("]"); - } - function emitRestOrJSDocVariadicType(node) { - writePunctuation("..."); - emit(node.type); - } - function emitTupleType(node) { - emitTokenWithComment(23 /* OpenBracketToken */, node.pos, writePunctuation, node); - const flags = getEmitFlags(node) & 1 /* SingleLine */ ? 528 /* SingleLineTupleTypeElements */ : 657 /* MultiLineTupleTypeElements */; - emitList(node, node.elements, flags | 524288 /* NoSpaceIfEmpty */, parenthesizer.parenthesizeElementTypeOfTupleType); - emitTokenWithComment(24 /* CloseBracketToken */, node.elements.end, writePunctuation, node); - } - function emitNamedTupleMember(node) { - emit(node.dotDotDotToken); - emit(node.name); - emit(node.questionToken); - emitTokenWithComment(59 /* ColonToken */, node.name.end, writePunctuation, node); - writeSpace(); - emit(node.type); - } - function emitOptionalType(node) { - emit(node.type, parenthesizer.parenthesizeTypeOfOptionalType); - writePunctuation("?"); - } - function emitUnionType(node) { - emitList(node, node.types, 516 /* UnionTypeConstituents */, parenthesizer.parenthesizeConstituentTypeOfUnionType); - } - function emitIntersectionType(node) { - emitList(node, node.types, 520 /* IntersectionTypeConstituents */, parenthesizer.parenthesizeConstituentTypeOfIntersectionType); - } - function emitConditionalType(node) { - emit(node.checkType, parenthesizer.parenthesizeCheckTypeOfConditionalType); - writeSpace(); - writeKeyword("extends"); - writeSpace(); - emit(node.extendsType, parenthesizer.parenthesizeExtendsTypeOfConditionalType); - writeSpace(); - writePunctuation("?"); - writeSpace(); - emit(node.trueType); - writeSpace(); - writePunctuation(":"); - writeSpace(); - emit(node.falseType); - } - function emitInferType(node) { - writeKeyword("infer"); - writeSpace(); - emit(node.typeParameter); - } - function emitParenthesizedType(node) { - writePunctuation("("); - emit(node.type); - writePunctuation(")"); - } - function emitThisType() { - writeKeyword("this"); - } - function emitTypeOperator(node) { - writeTokenText(node.operator, writeKeyword); - writeSpace(); - const parenthesizerRule = node.operator === 148 /* ReadonlyKeyword */ ? parenthesizer.parenthesizeOperandOfReadonlyTypeOperator : parenthesizer.parenthesizeOperandOfTypeOperator; - emit(node.type, parenthesizerRule); - } - function emitIndexedAccessType(node) { - emit(node.objectType, parenthesizer.parenthesizeNonArrayTypeOfPostfixType); - writePunctuation("["); - emit(node.indexType); - writePunctuation("]"); - } - function emitMappedType(node) { - const emitFlags = getEmitFlags(node); - writePunctuation("{"); - if (emitFlags & 1 /* SingleLine */) { - writeSpace(); - } else { - writeLine(); - increaseIndent(); - } - if (node.readonlyToken) { - emit(node.readonlyToken); - if (node.readonlyToken.kind !== 148 /* ReadonlyKeyword */) { - writeKeyword("readonly"); - } - writeSpace(); - } - writePunctuation("["); - pipelineEmit(3 /* MappedTypeParameter */, node.typeParameter); - if (node.nameType) { - writeSpace(); - writeKeyword("as"); - writeSpace(); - emit(node.nameType); - } - writePunctuation("]"); - if (node.questionToken) { - emit(node.questionToken); - if (node.questionToken.kind !== 58 /* QuestionToken */) { - writePunctuation("?"); - } - } - writePunctuation(":"); - writeSpace(); - emit(node.type); - writeTrailingSemicolon(); - if (emitFlags & 1 /* SingleLine */) { - writeSpace(); - } else { - writeLine(); - decreaseIndent(); - } - emitList(node, node.members, 2 /* PreserveLines */); - writePunctuation("}"); - } - function emitLiteralType(node) { - emitExpression(node.literal); - } - function emitTemplateType(node) { - emit(node.head); - emitList(node, node.templateSpans, 262144 /* TemplateExpressionSpans */); - } - function emitImportTypeNode(node) { - if (node.isTypeOf) { - writeKeyword("typeof"); - writeSpace(); - } - writeKeyword("import"); - writePunctuation("("); - emit(node.argument); - if (node.assertions) { - writePunctuation(","); - writeSpace(); - writePunctuation("{"); - writeSpace(); - writeKeyword("assert"); - writePunctuation(":"); - writeSpace(); - const elements = node.assertions.assertClause.elements; - emitList(node.assertions.assertClause, elements, 526226 /* ImportClauseEntries */); - writeSpace(); - writePunctuation("}"); - } - writePunctuation(")"); - if (node.qualifier) { - writePunctuation("."); - emit(node.qualifier); - } - emitTypeArguments(node, node.typeArguments); - } - function emitObjectBindingPattern(node) { - writePunctuation("{"); - emitList(node, node.elements, 525136 /* ObjectBindingPatternElements */); - writePunctuation("}"); - } - function emitArrayBindingPattern(node) { - writePunctuation("["); - emitList(node, node.elements, 524880 /* ArrayBindingPatternElements */); - writePunctuation("]"); - } - function emitBindingElement(node) { - emit(node.dotDotDotToken); - if (node.propertyName) { - emit(node.propertyName); - writePunctuation(":"); - writeSpace(); - } - emit(node.name); - emitInitializer(node.initializer, node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - function emitArrayLiteralExpression(node) { - const elements = node.elements; - const preferNewLine = node.multiLine ? 65536 /* PreferNewLine */ : 0 /* None */; - emitExpressionList(node, elements, 8914 /* ArrayLiteralExpressionElements */ | preferNewLine, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - function emitObjectLiteralExpression(node) { - pushPrivateNameGenerationScope( - 0 /* Auto */, - /*newReservedMemberNames*/ - void 0 - ); - forEach(node.properties, generateMemberNames); - const indentedFlag = getEmitFlags(node) & 131072 /* Indented */; - if (indentedFlag) { - increaseIndent(); - } - const preferNewLine = node.multiLine ? 65536 /* PreferNewLine */ : 0 /* None */; - const allowTrailingComma = currentSourceFile && currentSourceFile.languageVersion >= 1 /* ES5 */ && !isJsonSourceFile(currentSourceFile) ? 64 /* AllowTrailingComma */ : 0 /* None */; - emitList(node, node.properties, 526226 /* ObjectLiteralExpressionProperties */ | allowTrailingComma | preferNewLine); - if (indentedFlag) { - decreaseIndent(); - } - popPrivateNameGenerationScope(); - } - function emitPropertyAccessExpression(node) { - emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess); - const token = node.questionDotToken || setTextRangePosEnd(factory.createToken(25 /* DotToken */), node.expression.end, node.name.pos); - const linesBeforeDot = getLinesBetweenNodes(node, node.expression, token); - const linesAfterDot = getLinesBetweenNodes(node, token, node.name); - writeLinesAndIndent( - linesBeforeDot, - /*writeSpaceIfNotIndenting*/ - false - ); - const shouldEmitDotDot = token.kind !== 29 /* QuestionDotToken */ && mayNeedDotDotForPropertyAccess(node.expression) && !writer.hasTrailingComment() && !writer.hasTrailingWhitespace(); - if (shouldEmitDotDot) { - writePunctuation("."); - } - if (node.questionDotToken) { - emit(token); - } else { - emitTokenWithComment(token.kind, node.expression.end, writePunctuation, node); - } - writeLinesAndIndent( - linesAfterDot, - /*writeSpaceIfNotIndenting*/ - false - ); - emit(node.name); - decreaseIndentIf(linesBeforeDot, linesAfterDot); - } - function mayNeedDotDotForPropertyAccess(expression) { - expression = skipPartiallyEmittedExpressions(expression); - if (isNumericLiteral(expression)) { - const text = getLiteralTextOfNode( - expression, - /*neverAsciiEscape*/ - true, - /*jsxAttributeEscape*/ - false - ); - return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */)); - } else if (isAccessExpression(expression)) { - const constantValue = getConstantValue(expression); - return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue; - } - } - function emitElementAccessExpression(node) { - emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess); - emit(node.questionDotToken); - emitTokenWithComment(23 /* OpenBracketToken */, node.expression.end, writePunctuation, node); - emitExpression(node.argumentExpression); - emitTokenWithComment(24 /* CloseBracketToken */, node.argumentExpression.end, writePunctuation, node); - } - function emitCallExpression(node) { - const indirectCall = getInternalEmitFlags(node) & 16 /* IndirectCall */; - if (indirectCall) { - writePunctuation("("); - writeLiteral("0"); - writePunctuation(","); - writeSpace(); - } - emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess); - if (indirectCall) { - writePunctuation(")"); - } - emit(node.questionDotToken); - emitTypeArguments(node, node.typeArguments); - emitExpressionList(node, node.arguments, 2576 /* CallExpressionArguments */, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - function emitNewExpression(node) { - emitTokenWithComment(105 /* NewKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfNew); - emitTypeArguments(node, node.typeArguments); - emitExpressionList(node, node.arguments, 18960 /* NewExpressionArguments */, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - function emitTaggedTemplateExpression(node) { - const indirectCall = getInternalEmitFlags(node) & 16 /* IndirectCall */; - if (indirectCall) { - writePunctuation("("); - writeLiteral("0"); - writePunctuation(","); - writeSpace(); - } - emitExpression(node.tag, parenthesizer.parenthesizeLeftSideOfAccess); - if (indirectCall) { - writePunctuation(")"); - } - emitTypeArguments(node, node.typeArguments); - writeSpace(); - emitExpression(node.template); - } - function emitTypeAssertionExpression(node) { - writePunctuation("<"); - emit(node.type); - writePunctuation(">"); - emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); - } - function emitParenthesizedExpression(node) { - const openParenPos = emitTokenWithComment(21 /* OpenParenToken */, node.pos, writePunctuation, node); - const indented = writeLineSeparatorsAndIndentBefore(node.expression, node); - emitExpression( - node.expression, - /*parenthesizerRule*/ - void 0 - ); - writeLineSeparatorsAfter(node.expression, node); - decreaseIndentIf(indented); - emitTokenWithComment(22 /* CloseParenToken */, node.expression ? node.expression.end : openParenPos, writePunctuation, node); - } - function emitFunctionExpression(node) { - generateNameIfNeeded(node.name); - emitFunctionDeclarationOrExpression(node); - } - function emitArrowFunction(node) { - emitModifierList(node, node.modifiers); - emitSignatureAndBody(node, emitArrowFunctionHead); - } - function emitArrowFunctionHead(node) { - emitTypeParameters(node, node.typeParameters); - emitParametersForArrow(node, node.parameters); - emitTypeAnnotation(node.type); - writeSpace(); - emit(node.equalsGreaterThanToken); - } - function emitDeleteExpression(node) { - emitTokenWithComment(91 /* DeleteKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); - } - function emitTypeOfExpression(node) { - emitTokenWithComment(114 /* TypeOfKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); - } - function emitVoidExpression(node) { - emitTokenWithComment(116 /* VoidKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); - } - function emitAwaitExpression(node) { - emitTokenWithComment(135 /* AwaitKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary); - } - function emitPrefixUnaryExpression(node) { - writeTokenText(node.operator, writeOperator); - if (shouldEmitWhitespaceBeforeOperand(node)) { - writeSpace(); - } - emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPrefixUnary); - } - function shouldEmitWhitespaceBeforeOperand(node) { - const operand = node.operand; - return operand.kind === 224 /* PrefixUnaryExpression */ && (node.operator === 40 /* PlusToken */ && (operand.operator === 40 /* PlusToken */ || operand.operator === 46 /* PlusPlusToken */) || node.operator === 41 /* MinusToken */ && (operand.operator === 41 /* MinusToken */ || operand.operator === 47 /* MinusMinusToken */)); - } - function emitPostfixUnaryExpression(node) { - emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary); - writeTokenText(node.operator, writeOperator); - } - function createEmitBinaryExpression() { - return createBinaryExpressionTrampoline( - onEnter, - onLeft, - onOperator, - onRight, - onExit, - /*foldState*/ - void 0 - ); - function onEnter(node, state) { - if (state) { - state.stackIndex++; - state.preserveSourceNewlinesStack[state.stackIndex] = preserveSourceNewlines; - state.containerPosStack[state.stackIndex] = containerPos; - state.containerEndStack[state.stackIndex] = containerEnd; - state.declarationListContainerEndStack[state.stackIndex] = declarationListContainerEnd; - const emitComments2 = state.shouldEmitCommentsStack[state.stackIndex] = shouldEmitComments(node); - const emitSourceMaps = state.shouldEmitSourceMapsStack[state.stackIndex] = shouldEmitSourceMaps(node); - onBeforeEmitNode == null ? void 0 : onBeforeEmitNode(node); - if (emitComments2) - emitCommentsBeforeNode(node); - if (emitSourceMaps) - emitSourceMapsBeforeNode(node); - beforeEmitNode(node); - } else { - state = { - stackIndex: 0, - preserveSourceNewlinesStack: [void 0], - containerPosStack: [-1], - containerEndStack: [-1], - declarationListContainerEndStack: [-1], - shouldEmitCommentsStack: [false], - shouldEmitSourceMapsStack: [false] - }; - } - return state; - } - function onLeft(next, _workArea, parent2) { - return maybeEmitExpression(next, parent2, "left"); - } - function onOperator(operatorToken, _state, node) { - const isCommaOperator = operatorToken.kind !== 28 /* CommaToken */; - const linesBeforeOperator = getLinesBetweenNodes(node, node.left, operatorToken); - const linesAfterOperator = getLinesBetweenNodes(node, operatorToken, node.right); - writeLinesAndIndent(linesBeforeOperator, isCommaOperator); - emitLeadingCommentsOfPosition(operatorToken.pos); - writeTokenNode(operatorToken, operatorToken.kind === 103 /* InKeyword */ ? writeKeyword : writeOperator); - emitTrailingCommentsOfPosition( - operatorToken.end, - /*prefixSpace*/ - true - ); - writeLinesAndIndent( - linesAfterOperator, - /*writeSpaceIfNotIndenting*/ - true - ); - } - function onRight(next, _workArea, parent2) { - return maybeEmitExpression(next, parent2, "right"); - } - function onExit(node, state) { - const linesBeforeOperator = getLinesBetweenNodes(node, node.left, node.operatorToken); - const linesAfterOperator = getLinesBetweenNodes(node, node.operatorToken, node.right); - decreaseIndentIf(linesBeforeOperator, linesAfterOperator); - if (state.stackIndex > 0) { - const savedPreserveSourceNewlines = state.preserveSourceNewlinesStack[state.stackIndex]; - const savedContainerPos = state.containerPosStack[state.stackIndex]; - const savedContainerEnd = state.containerEndStack[state.stackIndex]; - const savedDeclarationListContainerEnd = state.declarationListContainerEndStack[state.stackIndex]; - const shouldEmitComments2 = state.shouldEmitCommentsStack[state.stackIndex]; - const shouldEmitSourceMaps2 = state.shouldEmitSourceMapsStack[state.stackIndex]; - afterEmitNode(savedPreserveSourceNewlines); - if (shouldEmitSourceMaps2) - emitSourceMapsAfterNode(node); - if (shouldEmitComments2) - emitCommentsAfterNode(node, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd); - onAfterEmitNode == null ? void 0 : onAfterEmitNode(node); - state.stackIndex--; - } - } - function maybeEmitExpression(next, parent2, side) { - const parenthesizerRule = side === "left" ? parenthesizer.getParenthesizeLeftSideOfBinaryForOperator(parent2.operatorToken.kind) : parenthesizer.getParenthesizeRightSideOfBinaryForOperator(parent2.operatorToken.kind); - let pipelinePhase = getPipelinePhase(0 /* Notification */, 1 /* Expression */, next); - if (pipelinePhase === pipelineEmitWithSubstitution) { - Debug.assertIsDefined(lastSubstitution); - next = parenthesizerRule(cast(lastSubstitution, isExpression)); - pipelinePhase = getNextPipelinePhase(1 /* Substitution */, 1 /* Expression */, next); - lastSubstitution = void 0; - } - if (pipelinePhase === pipelineEmitWithComments || pipelinePhase === pipelineEmitWithSourceMaps || pipelinePhase === pipelineEmitWithHint) { - if (isBinaryExpression(next)) { - return next; - } - } - currentParenthesizerRule = parenthesizerRule; - pipelinePhase(1 /* Expression */, next); - } - } - function emitConditionalExpression(node) { - const linesBeforeQuestion = getLinesBetweenNodes(node, node.condition, node.questionToken); - const linesAfterQuestion = getLinesBetweenNodes(node, node.questionToken, node.whenTrue); - const linesBeforeColon = getLinesBetweenNodes(node, node.whenTrue, node.colonToken); - const linesAfterColon = getLinesBetweenNodes(node, node.colonToken, node.whenFalse); - emitExpression(node.condition, parenthesizer.parenthesizeConditionOfConditionalExpression); - writeLinesAndIndent( - linesBeforeQuestion, - /*writeSpaceIfNotIndenting*/ - true - ); - emit(node.questionToken); - writeLinesAndIndent( - linesAfterQuestion, - /*writeSpaceIfNotIndenting*/ - true - ); - emitExpression(node.whenTrue, parenthesizer.parenthesizeBranchOfConditionalExpression); - decreaseIndentIf(linesBeforeQuestion, linesAfterQuestion); - writeLinesAndIndent( - linesBeforeColon, - /*writeSpaceIfNotIndenting*/ - true - ); - emit(node.colonToken); - writeLinesAndIndent( - linesAfterColon, - /*writeSpaceIfNotIndenting*/ - true - ); - emitExpression(node.whenFalse, parenthesizer.parenthesizeBranchOfConditionalExpression); - decreaseIndentIf(linesBeforeColon, linesAfterColon); - } - function emitTemplateExpression(node) { - emit(node.head); - emitList(node, node.templateSpans, 262144 /* TemplateExpressionSpans */); - } - function emitYieldExpression(node) { - emitTokenWithComment(127 /* YieldKeyword */, node.pos, writeKeyword, node); - emit(node.asteriskToken); - emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma); - } - function emitSpreadElement(node) { - emitTokenWithComment(26 /* DotDotDotToken */, node.pos, writePunctuation, node); - emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - function emitClassExpression(node) { - generateNameIfNeeded(node.name); - emitClassDeclarationOrExpression(node); - } - function emitExpressionWithTypeArguments(node) { - emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess); - emitTypeArguments(node, node.typeArguments); - } - function emitAsExpression(node) { - emitExpression( - node.expression, - /*parenthesizerRule*/ - void 0 - ); - if (node.type) { - writeSpace(); - writeKeyword("as"); - writeSpace(); - emit(node.type); - } - } - function emitNonNullExpression(node) { - emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess); - writeOperator("!"); - } - function emitSatisfiesExpression(node) { - emitExpression( - node.expression, - /*parenthesizerRule*/ - void 0 - ); - if (node.type) { - writeSpace(); - writeKeyword("satisfies"); - writeSpace(); - emit(node.type); - } - } - function emitMetaProperty(node) { - writeToken(node.keywordToken, node.pos, writePunctuation); - writePunctuation("."); - emit(node.name); - } - function emitTemplateSpan(node) { - emitExpression(node.expression); - emit(node.literal); - } - function emitBlock(node) { - emitBlockStatements( - node, - /*forceSingleLine*/ - !node.multiLine && isEmptyBlock(node) - ); - } - function emitBlockStatements(node, forceSingleLine) { - emitTokenWithComment( - 19 /* OpenBraceToken */, - node.pos, - writePunctuation, - /*contextNode*/ - node - ); - const format = forceSingleLine || getEmitFlags(node) & 1 /* SingleLine */ ? 768 /* SingleLineBlockStatements */ : 129 /* MultiLineBlockStatements */; - emitList(node, node.statements, format); - emitTokenWithComment( - 20 /* CloseBraceToken */, - node.statements.end, - writePunctuation, - /*contextNode*/ - node, - /*indentLeading*/ - !!(format & 1 /* MultiLine */) - ); - } - function emitVariableStatement(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - emit(node.declarationList); - writeTrailingSemicolon(); - } - function emitEmptyStatement(isEmbeddedStatement) { - if (isEmbeddedStatement) { - writePunctuation(";"); - } else { - writeTrailingSemicolon(); - } - } - function emitExpressionStatement(node) { - emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfExpressionStatement); - if (!currentSourceFile || !isJsonSourceFile(currentSourceFile) || nodeIsSynthesized(node.expression)) { - writeTrailingSemicolon(); - } - } - function emitIfStatement(node) { - const openParenPos = emitTokenWithComment(101 /* IfKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); - emitExpression(node.expression); - emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); - emitEmbeddedStatement(node, node.thenStatement); - if (node.elseStatement) { - writeLineOrSpace(node, node.thenStatement, node.elseStatement); - emitTokenWithComment(93 /* ElseKeyword */, node.thenStatement.end, writeKeyword, node); - if (node.elseStatement.kind === 245 /* IfStatement */) { - writeSpace(); - emit(node.elseStatement); - } else { - emitEmbeddedStatement(node, node.elseStatement); - } - } - } - function emitWhileClause(node, startPos) { - const openParenPos = emitTokenWithComment(117 /* WhileKeyword */, startPos, writeKeyword, node); - writeSpace(); - emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); - emitExpression(node.expression); - emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); - } - function emitDoStatement(node) { - emitTokenWithComment(92 /* DoKeyword */, node.pos, writeKeyword, node); - emitEmbeddedStatement(node, node.statement); - if (isBlock(node.statement) && !preserveSourceNewlines) { - writeSpace(); - } else { - writeLineOrSpace(node, node.statement, node.expression); - } - emitWhileClause(node, node.statement.end); - writeTrailingSemicolon(); - } - function emitWhileStatement(node) { - emitWhileClause(node, node.pos); - emitEmbeddedStatement(node, node.statement); - } - function emitForStatement(node) { - const openParenPos = emitTokenWithComment(99 /* ForKeyword */, node.pos, writeKeyword, node); - writeSpace(); - let pos = emitTokenWithComment( - 21 /* OpenParenToken */, - openParenPos, - writePunctuation, - /*contextNode*/ - node - ); - emitForBinding(node.initializer); - pos = emitTokenWithComment(27 /* SemicolonToken */, node.initializer ? node.initializer.end : pos, writePunctuation, node); - emitExpressionWithLeadingSpace(node.condition); - pos = emitTokenWithComment(27 /* SemicolonToken */, node.condition ? node.condition.end : pos, writePunctuation, node); - emitExpressionWithLeadingSpace(node.incrementor); - emitTokenWithComment(22 /* CloseParenToken */, node.incrementor ? node.incrementor.end : pos, writePunctuation, node); - emitEmbeddedStatement(node, node.statement); - } - function emitForInStatement(node) { - const openParenPos = emitTokenWithComment(99 /* ForKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); - emitForBinding(node.initializer); - writeSpace(); - emitTokenWithComment(103 /* InKeyword */, node.initializer.end, writeKeyword, node); - writeSpace(); - emitExpression(node.expression); - emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); - emitEmbeddedStatement(node, node.statement); - } - function emitForOfStatement(node) { - const openParenPos = emitTokenWithComment(99 /* ForKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitWithTrailingSpace(node.awaitModifier); - emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); - emitForBinding(node.initializer); - writeSpace(); - emitTokenWithComment(165 /* OfKeyword */, node.initializer.end, writeKeyword, node); - writeSpace(); - emitExpression(node.expression); - emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); - emitEmbeddedStatement(node, node.statement); - } - function emitForBinding(node) { - if (node !== void 0) { - if (node.kind === 261 /* VariableDeclarationList */) { - emit(node); - } else { - emitExpression(node); - } - } - } - function emitContinueStatement(node) { - emitTokenWithComment(88 /* ContinueKeyword */, node.pos, writeKeyword, node); - emitWithLeadingSpace(node.label); - writeTrailingSemicolon(); - } - function emitBreakStatement(node) { - emitTokenWithComment(83 /* BreakKeyword */, node.pos, writeKeyword, node); - emitWithLeadingSpace(node.label); - writeTrailingSemicolon(); - } - function emitTokenWithComment(token, pos, writer2, contextNode, indentLeading) { - const node = getParseTreeNode(contextNode); - const isSimilarNode = node && node.kind === contextNode.kind; - const startPos = pos; - if (isSimilarNode && currentSourceFile) { - pos = skipTrivia(currentSourceFile.text, pos); - } - if (isSimilarNode && contextNode.pos !== startPos) { - const needsIndent = indentLeading && currentSourceFile && !positionsAreOnSameLine(startPos, pos, currentSourceFile); - if (needsIndent) { - increaseIndent(); - } - emitLeadingCommentsOfPosition(startPos); - if (needsIndent) { - decreaseIndent(); - } - } - pos = writeTokenText(token, writer2, pos); - if (isSimilarNode && contextNode.end !== pos) { - const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */; - emitTrailingCommentsOfPosition( - pos, - /*prefixSpace*/ - !isJsxExprContext, - /*forceNoNewline*/ - isJsxExprContext - ); - } - return pos; - } - function commentWillEmitNewLine(node) { - return node.kind === 2 /* SingleLineCommentTrivia */ || !!node.hasTrailingNewLine; - } - function willEmitLeadingNewLine(node) { - if (!currentSourceFile) - return false; - if (some(getLeadingCommentRanges(currentSourceFile.text, node.pos), commentWillEmitNewLine)) - return true; - if (some(getSyntheticLeadingComments(node), commentWillEmitNewLine)) - return true; - if (isPartiallyEmittedExpression(node)) { - if (node.pos !== node.expression.pos) { - if (some(getTrailingCommentRanges(currentSourceFile.text, node.expression.pos), commentWillEmitNewLine)) - return true; - } - return willEmitLeadingNewLine(node.expression); - } - return false; - } - function parenthesizeExpressionForNoAsi(node) { - if (!commentsDisabled && isPartiallyEmittedExpression(node) && willEmitLeadingNewLine(node)) { - const parseNode = getParseTreeNode(node); - if (parseNode && isParenthesizedExpression(parseNode)) { - const parens = factory.createParenthesizedExpression(node.expression); - setOriginalNode(parens, node); - setTextRange(parens, parseNode); - return parens; - } - return factory.createParenthesizedExpression(node); - } - return node; - } - function parenthesizeExpressionForNoAsiAndDisallowedComma(node) { - return parenthesizeExpressionForNoAsi(parenthesizer.parenthesizeExpressionForDisallowedComma(node)); - } - function emitReturnStatement(node) { - emitTokenWithComment( - 107 /* ReturnKeyword */, - node.pos, - writeKeyword, - /*contextNode*/ - node - ); - emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi); - writeTrailingSemicolon(); - } - function emitWithStatement(node) { - const openParenPos = emitTokenWithComment(118 /* WithKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); - emitExpression(node.expression); - emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); - emitEmbeddedStatement(node, node.statement); - } - function emitSwitchStatement(node) { - const openParenPos = emitTokenWithComment(109 /* SwitchKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); - emitExpression(node.expression); - emitTokenWithComment(22 /* CloseParenToken */, node.expression.end, writePunctuation, node); - writeSpace(); - emit(node.caseBlock); - } - function emitLabeledStatement(node) { - emit(node.label); - emitTokenWithComment(59 /* ColonToken */, node.label.end, writePunctuation, node); - writeSpace(); - emit(node.statement); - } - function emitThrowStatement(node) { - emitTokenWithComment(111 /* ThrowKeyword */, node.pos, writeKeyword, node); - emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi); - writeTrailingSemicolon(); - } - function emitTryStatement(node) { - emitTokenWithComment(113 /* TryKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emit(node.tryBlock); - if (node.catchClause) { - writeLineOrSpace(node, node.tryBlock, node.catchClause); - emit(node.catchClause); - } - if (node.finallyBlock) { - writeLineOrSpace(node, node.catchClause || node.tryBlock, node.finallyBlock); - emitTokenWithComment(98 /* FinallyKeyword */, (node.catchClause || node.tryBlock).end, writeKeyword, node); - writeSpace(); - emit(node.finallyBlock); - } - } - function emitDebuggerStatement(node) { - writeToken(89 /* DebuggerKeyword */, node.pos, writeKeyword); - writeTrailingSemicolon(); - } - function emitVariableDeclaration(node) { - var _a, _b, _c; - emit(node.name); - emit(node.exclamationToken); - emitTypeAnnotation(node.type); - emitInitializer(node.initializer, ((_a = node.type) == null ? void 0 : _a.end) ?? ((_c = (_b = node.name.emitNode) == null ? void 0 : _b.typeNode) == null ? void 0 : _c.end) ?? node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - function emitVariableDeclarationList(node) { - if (isVarAwaitUsing(node)) { - writeKeyword("await"); - writeSpace(); - writeKeyword("using"); - } else { - const head = isLet(node) ? "let" : isVarConst(node) ? "const" : isVarUsing(node) ? "using" : "var"; - writeKeyword(head); - } - writeSpace(); - emitList(node, node.declarations, 528 /* VariableDeclarationList */); - } - function emitFunctionDeclaration(node) { - emitFunctionDeclarationOrExpression(node); - } - function emitFunctionDeclarationOrExpression(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - writeKeyword("function"); - emit(node.asteriskToken); - writeSpace(); - emitIdentifierName(node.name); - emitSignatureAndBody(node, emitSignatureHead); - } - function emitSignatureAndBody(node, emitSignatureHead2) { - const body = node.body; - if (body) { - if (isBlock(body)) { - const indentedFlag = getEmitFlags(node) & 131072 /* Indented */; - if (indentedFlag) { - increaseIndent(); - } - pushNameGenerationScope(node); - forEach(node.parameters, generateNames); - generateNames(node.body); - emitSignatureHead2(node); - emitBlockFunctionBody(body); - popNameGenerationScope(node); - if (indentedFlag) { - decreaseIndent(); - } - } else { - emitSignatureHead2(node); - writeSpace(); - emitExpression(body, parenthesizer.parenthesizeConciseBodyOfArrowFunction); - } - } else { - emitSignatureHead2(node); - writeTrailingSemicolon(); - } - } - function emitSignatureHead(node) { - emitTypeParameters(node, node.typeParameters); - emitParameters(node, node.parameters); - emitTypeAnnotation(node.type); - } - function shouldEmitBlockFunctionBodyOnSingleLine(body) { - if (getEmitFlags(body) & 1 /* SingleLine */) { - return true; - } - if (body.multiLine) { - return false; - } - if (!nodeIsSynthesized(body) && currentSourceFile && !rangeIsOnSingleLine(body, currentSourceFile)) { - return false; - } - if (getLeadingLineTerminatorCount(body, firstOrUndefined(body.statements), 2 /* PreserveLines */) || getClosingLineTerminatorCount(body, lastOrUndefined(body.statements), 2 /* PreserveLines */, body.statements)) { - return false; - } - let previousStatement; - for (const statement of body.statements) { - if (getSeparatingLineTerminatorCount(previousStatement, statement, 2 /* PreserveLines */) > 0) { - return false; - } - previousStatement = statement; - } - return true; - } - function emitBlockFunctionBody(body) { - onBeforeEmitNode == null ? void 0 : onBeforeEmitNode(body); - writeSpace(); - writePunctuation("{"); - increaseIndent(); - const emitBlockFunctionBody2 = shouldEmitBlockFunctionBodyOnSingleLine(body) ? emitBlockFunctionBodyOnSingleLine : emitBlockFunctionBodyWorker; - emitBodyWithDetachedComments(body, body.statements, emitBlockFunctionBody2); - decreaseIndent(); - writeToken(20 /* CloseBraceToken */, body.statements.end, writePunctuation, body); - onAfterEmitNode == null ? void 0 : onAfterEmitNode(body); - } - function emitBlockFunctionBodyOnSingleLine(body) { - emitBlockFunctionBodyWorker( - body, - /*emitBlockFunctionBodyOnSingleLine*/ - true - ); - } - function emitBlockFunctionBodyWorker(body, emitBlockFunctionBodyOnSingleLine2) { - const statementOffset = emitPrologueDirectives(body.statements); - const pos = writer.getTextPos(); - emitHelpers(body); - if (statementOffset === 0 && pos === writer.getTextPos() && emitBlockFunctionBodyOnSingleLine2) { - decreaseIndent(); - emitList(body, body.statements, 768 /* SingleLineFunctionBodyStatements */); - increaseIndent(); - } else { - emitList( - body, - body.statements, - 1 /* MultiLineFunctionBodyStatements */, - /*parenthesizerRule*/ - void 0, - statementOffset - ); - } - } - function emitClassDeclaration(node) { - emitClassDeclarationOrExpression(node); - } - function emitClassDeclarationOrExpression(node) { - pushPrivateNameGenerationScope( - 0 /* Auto */, - /*newReservedMemberNames*/ - void 0 - ); - forEach(node.members, generateMemberNames); - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - true - ); - emitTokenWithComment(86 /* ClassKeyword */, moveRangePastModifiers(node).pos, writeKeyword, node); - if (node.name) { - writeSpace(); - emitIdentifierName(node.name); - } - const indentedFlag = getEmitFlags(node) & 131072 /* Indented */; - if (indentedFlag) { - increaseIndent(); - } - emitTypeParameters(node, node.typeParameters); - emitList(node, node.heritageClauses, 0 /* ClassHeritageClauses */); - writeSpace(); - writePunctuation("{"); - emitList(node, node.members, 129 /* ClassMembers */); - writePunctuation("}"); - if (indentedFlag) { - decreaseIndent(); - } - popPrivateNameGenerationScope(); - } - function emitInterfaceDeclaration(node) { - pushPrivateNameGenerationScope( - 0 /* Auto */, - /*newReservedMemberNames*/ - void 0 - ); - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - writeKeyword("interface"); - writeSpace(); - emit(node.name); - emitTypeParameters(node, node.typeParameters); - emitList(node, node.heritageClauses, 512 /* HeritageClauses */); - writeSpace(); - writePunctuation("{"); - emitList(node, node.members, 129 /* InterfaceMembers */); - writePunctuation("}"); - popPrivateNameGenerationScope(); - } - function emitTypeAliasDeclaration(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - writeKeyword("type"); - writeSpace(); - emit(node.name); - emitTypeParameters(node, node.typeParameters); - writeSpace(); - writePunctuation("="); - writeSpace(); - emit(node.type); - writeTrailingSemicolon(); - } - function emitEnumDeclaration(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - writeKeyword("enum"); - writeSpace(); - emit(node.name); - writeSpace(); - writePunctuation("{"); - emitList(node, node.members, 145 /* EnumMembers */); - writePunctuation("}"); - } - function emitModuleDeclaration(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - if (~node.flags & 2048 /* GlobalAugmentation */) { - writeKeyword(node.flags & 32 /* Namespace */ ? "namespace" : "module"); - writeSpace(); - } - emit(node.name); - let body = node.body; - if (!body) - return writeTrailingSemicolon(); - while (body && isModuleDeclaration(body)) { - writePunctuation("."); - emit(body.name); - body = body.body; - } - writeSpace(); - emit(body); - } - function emitModuleBlock(node) { - pushNameGenerationScope(node); - forEach(node.statements, generateNames); - emitBlockStatements( - node, - /*forceSingleLine*/ - isEmptyBlock(node) - ); - popNameGenerationScope(node); - } - function emitCaseBlock(node) { - emitTokenWithComment(19 /* OpenBraceToken */, node.pos, writePunctuation, node); - emitList(node, node.clauses, 129 /* CaseBlockClauses */); - emitTokenWithComment( - 20 /* CloseBraceToken */, - node.clauses.end, - writePunctuation, - node, - /*indentLeading*/ - true - ); - } - function emitImportEqualsDeclaration(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - emitTokenWithComment(102 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); - writeSpace(); - if (node.isTypeOnly) { - emitTokenWithComment(156 /* TypeKeyword */, node.pos, writeKeyword, node); - writeSpace(); - } - emit(node.name); - writeSpace(); - emitTokenWithComment(64 /* EqualsToken */, node.name.end, writePunctuation, node); - writeSpace(); - emitModuleReference(node.moduleReference); - writeTrailingSemicolon(); - } - function emitModuleReference(node) { - if (node.kind === 80 /* Identifier */) { - emitExpression(node); - } else { - emit(node); - } - } - function emitImportDeclaration(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - emitTokenWithComment(102 /* ImportKeyword */, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node); - writeSpace(); - if (node.importClause) { - emit(node.importClause); - writeSpace(); - emitTokenWithComment(161 /* FromKeyword */, node.importClause.end, writeKeyword, node); - writeSpace(); - } - emitExpression(node.moduleSpecifier); - if (node.assertClause) { - emitWithLeadingSpace(node.assertClause); - } - writeTrailingSemicolon(); - } - function emitImportClause(node) { - if (node.isTypeOnly) { - emitTokenWithComment(156 /* TypeKeyword */, node.pos, writeKeyword, node); - writeSpace(); - } - emit(node.name); - if (node.name && node.namedBindings) { - emitTokenWithComment(28 /* CommaToken */, node.name.end, writePunctuation, node); - writeSpace(); - } - emit(node.namedBindings); - } - function emitNamespaceImport(node) { - const asPos = emitTokenWithComment(42 /* AsteriskToken */, node.pos, writePunctuation, node); - writeSpace(); - emitTokenWithComment(130 /* AsKeyword */, asPos, writeKeyword, node); - writeSpace(); - emit(node.name); - } - function emitNamedImports(node) { - emitNamedImportsOrExports(node); - } - function emitImportSpecifier(node) { - emitImportOrExportSpecifier(node); - } - function emitExportAssignment(node) { - const nextPos = emitTokenWithComment(95 /* ExportKeyword */, node.pos, writeKeyword, node); - writeSpace(); - if (node.isExportEquals) { - emitTokenWithComment(64 /* EqualsToken */, nextPos, writeOperator, node); - } else { - emitTokenWithComment(90 /* DefaultKeyword */, nextPos, writeKeyword, node); - } - writeSpace(); - emitExpression(node.expression, node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(64 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault); - writeTrailingSemicolon(); - } - function emitExportDeclaration(node) { - emitDecoratorsAndModifiers( - node, - node.modifiers, - /*allowDecorators*/ - false - ); - let nextPos = emitTokenWithComment(95 /* ExportKeyword */, node.pos, writeKeyword, node); - writeSpace(); - if (node.isTypeOnly) { - nextPos = emitTokenWithComment(156 /* TypeKeyword */, nextPos, writeKeyword, node); - writeSpace(); - } - if (node.exportClause) { - emit(node.exportClause); - } else { - nextPos = emitTokenWithComment(42 /* AsteriskToken */, nextPos, writePunctuation, node); - } - if (node.moduleSpecifier) { - writeSpace(); - const fromPos = node.exportClause ? node.exportClause.end : nextPos; - emitTokenWithComment(161 /* FromKeyword */, fromPos, writeKeyword, node); - writeSpace(); - emitExpression(node.moduleSpecifier); - } - if (node.assertClause) { - emitWithLeadingSpace(node.assertClause); - } - writeTrailingSemicolon(); - } - function emitAssertClause(node) { - emitTokenWithComment(132 /* AssertKeyword */, node.pos, writeKeyword, node); - writeSpace(); - const elements = node.elements; - emitList(node, elements, 526226 /* ImportClauseEntries */); - } - function emitAssertEntry(node) { - emit(node.name); - writePunctuation(":"); - writeSpace(); - const value = node.value; - if ((getEmitFlags(value) & 1024 /* NoLeadingComments */) === 0) { - const commentRange = getCommentRange(value); - emitTrailingCommentsOfPosition(commentRange.pos); - } - emit(value); - } - function emitNamespaceExportDeclaration(node) { - let nextPos = emitTokenWithComment(95 /* ExportKeyword */, node.pos, writeKeyword, node); - writeSpace(); - nextPos = emitTokenWithComment(130 /* AsKeyword */, nextPos, writeKeyword, node); - writeSpace(); - nextPos = emitTokenWithComment(145 /* NamespaceKeyword */, nextPos, writeKeyword, node); - writeSpace(); - emit(node.name); - writeTrailingSemicolon(); - } - function emitNamespaceExport(node) { - const asPos = emitTokenWithComment(42 /* AsteriskToken */, node.pos, writePunctuation, node); - writeSpace(); - emitTokenWithComment(130 /* AsKeyword */, asPos, writeKeyword, node); - writeSpace(); - emit(node.name); - } - function emitNamedExports(node) { - emitNamedImportsOrExports(node); - } - function emitExportSpecifier(node) { - emitImportOrExportSpecifier(node); - } - function emitNamedImportsOrExports(node) { - writePunctuation("{"); - emitList(node, node.elements, 525136 /* NamedImportsOrExportsElements */); - writePunctuation("}"); - } - function emitImportOrExportSpecifier(node) { - if (node.isTypeOnly) { - writeKeyword("type"); - writeSpace(); - } - if (node.propertyName) { - emit(node.propertyName); - writeSpace(); - emitTokenWithComment(130 /* AsKeyword */, node.propertyName.end, writeKeyword, node); - writeSpace(); - } - emit(node.name); - } - function emitExternalModuleReference(node) { - writeKeyword("require"); - writePunctuation("("); - emitExpression(node.expression); - writePunctuation(")"); - } - function emitJsxElement(node) { - emit(node.openingElement); - emitList(node, node.children, 262144 /* JsxElementOrFragmentChildren */); - emit(node.closingElement); - } - function emitJsxSelfClosingElement(node) { - writePunctuation("<"); - emitJsxTagName(node.tagName); - emitTypeArguments(node, node.typeArguments); - writeSpace(); - emit(node.attributes); - writePunctuation("/>"); - } - function emitJsxFragment(node) { - emit(node.openingFragment); - emitList(node, node.children, 262144 /* JsxElementOrFragmentChildren */); - emit(node.closingFragment); - } - function emitJsxOpeningElementOrFragment(node) { - writePunctuation("<"); - if (isJsxOpeningElement(node)) { - const indented = writeLineSeparatorsAndIndentBefore(node.tagName, node); - emitJsxTagName(node.tagName); - emitTypeArguments(node, node.typeArguments); - if (node.attributes.properties && node.attributes.properties.length > 0) { - writeSpace(); - } - emit(node.attributes); - writeLineSeparatorsAfter(node.attributes, node); - decreaseIndentIf(indented); - } - writePunctuation(">"); - } - function emitJsxText(node) { - writer.writeLiteral(node.text); - } - function emitJsxClosingElementOrFragment(node) { - writePunctuation(""); - } - function emitJsxAttributes(node) { - emitList(node, node.properties, 262656 /* JsxElementAttributes */); - } - function emitJsxAttribute(node) { - emit(node.name); - emitNodeWithPrefix("=", writePunctuation, node.initializer, emitJsxAttributeValue); - } - function emitJsxSpreadAttribute(node) { - writePunctuation("{..."); - emitExpression(node.expression); - writePunctuation("}"); - } - function hasTrailingCommentsAtPosition(pos) { - let result = false; - forEachTrailingCommentRange((currentSourceFile == null ? void 0 : currentSourceFile.text) || "", pos + 1, () => result = true); - return result; - } - function hasLeadingCommentsAtPosition(pos) { - let result = false; - forEachLeadingCommentRange((currentSourceFile == null ? void 0 : currentSourceFile.text) || "", pos + 1, () => result = true); - return result; - } - function hasCommentsAtPosition(pos) { - return hasTrailingCommentsAtPosition(pos) || hasLeadingCommentsAtPosition(pos); - } - function emitJsxExpression(node) { - var _a; - if (node.expression || !commentsDisabled && !nodeIsSynthesized(node) && hasCommentsAtPosition(node.pos)) { - const isMultiline = currentSourceFile && !nodeIsSynthesized(node) && getLineAndCharacterOfPosition(currentSourceFile, node.pos).line !== getLineAndCharacterOfPosition(currentSourceFile, node.end).line; - if (isMultiline) { - writer.increaseIndent(); - } - const end = emitTokenWithComment(19 /* OpenBraceToken */, node.pos, writePunctuation, node); - emit(node.dotDotDotToken); - emitExpression(node.expression); - emitTokenWithComment(20 /* CloseBraceToken */, ((_a = node.expression) == null ? void 0 : _a.end) || end, writePunctuation, node); - if (isMultiline) { - writer.decreaseIndent(); - } - } - } - function emitJsxNamespacedName(node) { - emitIdentifierName(node.namespace); - writePunctuation(":"); - emitIdentifierName(node.name); - } - function emitJsxTagName(node) { - if (node.kind === 80 /* Identifier */) { - emitExpression(node); - } else { - emit(node); - } - } - function emitCaseClause(node) { - emitTokenWithComment(84 /* CaseKeyword */, node.pos, writeKeyword, node); - writeSpace(); - emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma); - emitCaseOrDefaultClauseRest(node, node.statements, node.expression.end); - } - function emitDefaultClause(node) { - const pos = emitTokenWithComment(90 /* DefaultKeyword */, node.pos, writeKeyword, node); - emitCaseOrDefaultClauseRest(node, node.statements, pos); - } - function emitCaseOrDefaultClauseRest(parentNode, statements, colonPos) { - const emitAsSingleStatement = statements.length === 1 && // treat synthesized nodes as located on the same line for emit purposes - (!currentSourceFile || nodeIsSynthesized(parentNode) || nodeIsSynthesized(statements[0]) || rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile)); - let format = 163969 /* CaseOrDefaultClauseStatements */; - if (emitAsSingleStatement) { - writeToken(59 /* ColonToken */, colonPos, writePunctuation, parentNode); - writeSpace(); - format &= ~(1 /* MultiLine */ | 128 /* Indented */); - } else { - emitTokenWithComment(59 /* ColonToken */, colonPos, writePunctuation, parentNode); - } - emitList(parentNode, statements, format); - } - function emitHeritageClause(node) { - writeSpace(); - writeTokenText(node.token, writeKeyword); - writeSpace(); - emitList(node, node.types, 528 /* HeritageClauseTypes */); - } - function emitCatchClause(node) { - const openParenPos = emitTokenWithComment(85 /* CatchKeyword */, node.pos, writeKeyword, node); - writeSpace(); - if (node.variableDeclaration) { - emitTokenWithComment(21 /* OpenParenToken */, openParenPos, writePunctuation, node); - emit(node.variableDeclaration); - emitTokenWithComment(22 /* CloseParenToken */, node.variableDeclaration.end, writePunctuation, node); - writeSpace(); - } - emit(node.block); - } - function emitPropertyAssignment(node) { - emit(node.name); - writePunctuation(":"); - writeSpace(); - const initializer = node.initializer; - if ((getEmitFlags(initializer) & 1024 /* NoLeadingComments */) === 0) { - const commentRange = getCommentRange(initializer); - emitTrailingCommentsOfPosition(commentRange.pos); - } - emitExpression(initializer, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - function emitShorthandPropertyAssignment(node) { - emit(node.name); - if (node.objectAssignmentInitializer) { - writeSpace(); - writePunctuation("="); - writeSpace(); - emitExpression(node.objectAssignmentInitializer, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - } - function emitSpreadAssignment(node) { - if (node.expression) { - emitTokenWithComment(26 /* DotDotDotToken */, node.pos, writePunctuation, node); - emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - } - function emitEnumMember(node) { - emit(node.name); - emitInitializer(node.initializer, node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma); - } - function emitJSDoc(node) { - write("/**"); - if (node.comment) { - const text = getTextOfJSDocComment(node.comment); - if (text) { - const lines = text.split(/\r\n?|\n/g); - for (const line of lines) { - writeLine(); - writeSpace(); - writePunctuation("*"); - writeSpace(); - write(line); - } - } - } - if (node.tags) { - if (node.tags.length === 1 && node.tags[0].kind === 351 /* JSDocTypeTag */ && !node.comment) { - writeSpace(); - emit(node.tags[0]); - } else { - emitList(node, node.tags, 33 /* JSDocComment */); - } - } - writeSpace(); - write("*/"); - } - function emitJSDocSimpleTypedTag(tag) { - emitJSDocTagName(tag.tagName); - emitJSDocTypeExpression(tag.typeExpression); - emitJSDocComment(tag.comment); - } - function emitJSDocSeeTag(tag) { - emitJSDocTagName(tag.tagName); - emit(tag.name); - emitJSDocComment(tag.comment); - } - function emitJSDocNameReference(node) { - writeSpace(); - writePunctuation("{"); - emit(node.name); - writePunctuation("}"); - } - function emitJSDocHeritageTag(tag) { - emitJSDocTagName(tag.tagName); - writeSpace(); - writePunctuation("{"); - emit(tag.class); - writePunctuation("}"); - emitJSDocComment(tag.comment); - } - function emitJSDocTemplateTag(tag) { - emitJSDocTagName(tag.tagName); - emitJSDocTypeExpression(tag.constraint); - writeSpace(); - emitList(tag, tag.typeParameters, 528 /* CommaListElements */); - emitJSDocComment(tag.comment); - } - function emitJSDocTypedefTag(tag) { - emitJSDocTagName(tag.tagName); - if (tag.typeExpression) { - if (tag.typeExpression.kind === 316 /* JSDocTypeExpression */) { - emitJSDocTypeExpression(tag.typeExpression); - } else { - writeSpace(); - writePunctuation("{"); - write("Object"); - if (tag.typeExpression.isArrayType) { - writePunctuation("["); - writePunctuation("]"); - } - writePunctuation("}"); - } - } - if (tag.fullName) { - writeSpace(); - emit(tag.fullName); - } - emitJSDocComment(tag.comment); - if (tag.typeExpression && tag.typeExpression.kind === 329 /* JSDocTypeLiteral */) { - emitJSDocTypeLiteral(tag.typeExpression); - } - } - function emitJSDocCallbackTag(tag) { - emitJSDocTagName(tag.tagName); - if (tag.name) { - writeSpace(); - emit(tag.name); - } - emitJSDocComment(tag.comment); - emitJSDocSignature(tag.typeExpression); - } - function emitJSDocOverloadTag(tag) { - emitJSDocComment(tag.comment); - emitJSDocSignature(tag.typeExpression); - } - function emitJSDocSimpleTag(tag) { - emitJSDocTagName(tag.tagName); - emitJSDocComment(tag.comment); - } - function emitJSDocTypeLiteral(lit) { - emitList(lit, factory.createNodeArray(lit.jsDocPropertyTags), 33 /* JSDocComment */); - } - function emitJSDocSignature(sig) { - if (sig.typeParameters) { - emitList(sig, factory.createNodeArray(sig.typeParameters), 33 /* JSDocComment */); - } - if (sig.parameters) { - emitList(sig, factory.createNodeArray(sig.parameters), 33 /* JSDocComment */); - } - if (sig.type) { - writeLine(); - writeSpace(); - writePunctuation("*"); - writeSpace(); - emit(sig.type); - } - } - function emitJSDocPropertyLikeTag(param) { - emitJSDocTagName(param.tagName); - emitJSDocTypeExpression(param.typeExpression); - writeSpace(); - if (param.isBracketed) { - writePunctuation("["); - } - emit(param.name); - if (param.isBracketed) { - writePunctuation("]"); - } - emitJSDocComment(param.comment); - } - function emitJSDocTagName(tagName) { - writePunctuation("@"); - emit(tagName); - } - function emitJSDocComment(comment) { - const text = getTextOfJSDocComment(comment); - if (text) { - writeSpace(); - write(text); - } - } - function emitJSDocTypeExpression(typeExpression) { - if (typeExpression) { - writeSpace(); - writePunctuation("{"); - emit(typeExpression.type); - writePunctuation("}"); - } - } - function emitSourceFile(node) { - writeLine(); - const statements = node.statements; - const shouldEmitDetachedComment = statements.length === 0 || !isPrologueDirective(statements[0]) || nodeIsSynthesized(statements[0]); - if (shouldEmitDetachedComment) { - emitBodyWithDetachedComments(node, statements, emitSourceFileWorker); - return; - } - emitSourceFileWorker(node); - } - function emitSyntheticTripleSlashReferencesIfNeeded(node) { - emitTripleSlashDirectives(!!node.hasNoDefaultLib, node.syntheticFileReferences || [], node.syntheticTypeReferences || [], node.syntheticLibReferences || []); - for (const prepend of node.prepends) { - if (isUnparsedSource(prepend) && prepend.syntheticReferences) { - for (const ref of prepend.syntheticReferences) { - emit(ref); - writeLine(); - } - } - } - } - function emitTripleSlashDirectivesIfNeeded(node) { - if (node.isDeclarationFile) - emitTripleSlashDirectives(node.hasNoDefaultLib, node.referencedFiles, node.typeReferenceDirectives, node.libReferenceDirectives); - } - function emitTripleSlashDirectives(hasNoDefaultLib, files, types, libs2) { - if (hasNoDefaultLib) { - const pos = writer.getTextPos(); - writeComment(`/// `); - if (bundleFileInfo) - bundleFileInfo.sections.push({ pos, end: writer.getTextPos(), kind: "no-default-lib" /* NoDefaultLib */ }); - writeLine(); - } - if (currentSourceFile && currentSourceFile.moduleName) { - writeComment(`/// `); - writeLine(); - } - if (currentSourceFile && currentSourceFile.amdDependencies) { - for (const dep of currentSourceFile.amdDependencies) { - if (dep.name) { - writeComment(`/// `); - } else { - writeComment(`/// `); - } - writeLine(); - } - } - for (const directive of files) { - const pos = writer.getTextPos(); - writeComment(`/// `); - if (bundleFileInfo) - bundleFileInfo.sections.push({ pos, end: writer.getTextPos(), kind: "reference" /* Reference */, data: directive.fileName }); - writeLine(); - } - for (const directive of types) { - const pos = writer.getTextPos(); - const resolutionMode = directive.resolutionMode && directive.resolutionMode !== (currentSourceFile == null ? void 0 : currentSourceFile.impliedNodeFormat) ? `resolution-mode="${directive.resolutionMode === 99 /* ESNext */ ? "import" : "require"}"` : ""; - writeComment(`/// `); - if (bundleFileInfo) - bundleFileInfo.sections.push({ pos, end: writer.getTextPos(), kind: !directive.resolutionMode ? "type" /* Type */ : directive.resolutionMode === 99 /* ESNext */ ? "type-import" /* TypeResolutionModeImport */ : "type-require" /* TypeResolutionModeRequire */, data: directive.fileName }); - writeLine(); - } - for (const directive of libs2) { - const pos = writer.getTextPos(); - writeComment(`/// `); - if (bundleFileInfo) - bundleFileInfo.sections.push({ pos, end: writer.getTextPos(), kind: "lib" /* Lib */, data: directive.fileName }); - writeLine(); - } - } - function emitSourceFileWorker(node) { - const statements = node.statements; - pushNameGenerationScope(node); - forEach(node.statements, generateNames); - emitHelpers(node); - const index = findIndex(statements, (statement) => !isPrologueDirective(statement)); - emitTripleSlashDirectivesIfNeeded(node); - emitList( - node, - statements, - 1 /* MultiLine */, - /*parenthesizerRule*/ - void 0, - index === -1 ? statements.length : index - ); - popNameGenerationScope(node); - } - function emitPartiallyEmittedExpression(node) { - const emitFlags = getEmitFlags(node); - if (!(emitFlags & 1024 /* NoLeadingComments */) && node.pos !== node.expression.pos) { - emitTrailingCommentsOfPosition(node.expression.pos); - } - emitExpression(node.expression); - if (!(emitFlags & 2048 /* NoTrailingComments */) && node.end !== node.expression.end) { - emitLeadingCommentsOfPosition(node.expression.end); - } - } - function emitCommaList(node) { - emitExpressionList( - node, - node.elements, - 528 /* CommaListElements */, - /*parenthesizerRule*/ - void 0 - ); - } - function emitPrologueDirectives(statements, sourceFile, seenPrologueDirectives, recordBundleFileSection) { - let needsToSetSourceFile = !!sourceFile; - for (let i = 0; i < statements.length; i++) { - const statement = statements[i]; - if (isPrologueDirective(statement)) { - const shouldEmitPrologueDirective = seenPrologueDirectives ? !seenPrologueDirectives.has(statement.expression.text) : true; - if (shouldEmitPrologueDirective) { - if (needsToSetSourceFile) { - needsToSetSourceFile = false; - setSourceFile(sourceFile); - } - writeLine(); - const pos = writer.getTextPos(); - emit(statement); - if (recordBundleFileSection && bundleFileInfo) - bundleFileInfo.sections.push({ pos, end: writer.getTextPos(), kind: "prologue" /* Prologue */, data: statement.expression.text }); - if (seenPrologueDirectives) { - seenPrologueDirectives.add(statement.expression.text); - } - } - } else { - return i; - } - } - return statements.length; - } - function emitUnparsedPrologues(prologues, seenPrologueDirectives) { - for (const prologue of prologues) { - if (!seenPrologueDirectives.has(prologue.data)) { - writeLine(); - const pos = writer.getTextPos(); - emit(prologue); - if (bundleFileInfo) - bundleFileInfo.sections.push({ pos, end: writer.getTextPos(), kind: "prologue" /* Prologue */, data: prologue.data }); - if (seenPrologueDirectives) { - seenPrologueDirectives.add(prologue.data); - } - } - } - } - function emitPrologueDirectivesIfNeeded(sourceFileOrBundle) { - if (isSourceFile(sourceFileOrBundle)) { - emitPrologueDirectives(sourceFileOrBundle.statements, sourceFileOrBundle); - } else { - const seenPrologueDirectives = /* @__PURE__ */ new Set(); - for (const prepend of sourceFileOrBundle.prepends) { - emitUnparsedPrologues(prepend.prologues, seenPrologueDirectives); - } - for (const sourceFile of sourceFileOrBundle.sourceFiles) { - emitPrologueDirectives( - sourceFile.statements, - sourceFile, - seenPrologueDirectives, - /*recordBundleFileSection*/ - true - ); - } - setSourceFile(void 0); - } - } - function getPrologueDirectivesFromBundledSourceFiles(bundle) { - const seenPrologueDirectives = /* @__PURE__ */ new Set(); - let prologues; - for (let index = 0; index < bundle.sourceFiles.length; index++) { - const sourceFile = bundle.sourceFiles[index]; - let directives; - let end = 0; - for (const statement of sourceFile.statements) { - if (!isPrologueDirective(statement)) - break; - if (seenPrologueDirectives.has(statement.expression.text)) - continue; - seenPrologueDirectives.add(statement.expression.text); - (directives || (directives = [])).push({ - pos: statement.pos, - end: statement.end, - expression: { - pos: statement.expression.pos, - end: statement.expression.end, - text: statement.expression.text - } - }); - end = end < statement.end ? statement.end : end; - } - if (directives) - (prologues || (prologues = [])).push({ file: index, text: sourceFile.text.substring(0, end), directives }); - } - return prologues; - } - function emitShebangIfNeeded(sourceFileOrBundle) { - if (isSourceFile(sourceFileOrBundle) || isUnparsedSource(sourceFileOrBundle)) { - const shebang = getShebang(sourceFileOrBundle.text); - if (shebang) { - writeComment(shebang); - writeLine(); - return true; - } - } else { - for (const prepend of sourceFileOrBundle.prepends) { - Debug.assertNode(prepend, isUnparsedSource); - if (emitShebangIfNeeded(prepend)) { - return true; - } - } - for (const sourceFile of sourceFileOrBundle.sourceFiles) { - if (emitShebangIfNeeded(sourceFile)) { - return true; - } - } - } - } - function emitNodeWithWriter(node, writer2) { - if (!node) - return; - const savedWrite = write; - write = writer2; - emit(node); - write = savedWrite; - } - function emitDecoratorsAndModifiers(node, modifiers, allowDecorators) { - if (modifiers == null ? void 0 : modifiers.length) { - if (every(modifiers, isModifier)) { - return emitModifierList(node, modifiers); - } - if (every(modifiers, isDecorator)) { - if (allowDecorators) { - return emitDecoratorList(node, modifiers); - } - return node.pos; - } - onBeforeEmitNodeArray == null ? void 0 : onBeforeEmitNodeArray(modifiers); - let lastMode; - let mode; - let start = 0; - let pos = 0; - let lastModifier; - while (start < modifiers.length) { - while (pos < modifiers.length) { - lastModifier = modifiers[pos]; - mode = isDecorator(lastModifier) ? "decorators" : "modifiers"; - if (lastMode === void 0) { - lastMode = mode; - } else if (mode !== lastMode) { - break; - } - pos++; - } - const textRange = { pos: -1, end: -1 }; - if (start === 0) - textRange.pos = modifiers.pos; - if (pos === modifiers.length - 1) - textRange.end = modifiers.end; - if (lastMode === "modifiers" || allowDecorators) { - emitNodeListItems( - emit, - node, - modifiers, - lastMode === "modifiers" ? 2359808 /* Modifiers */ : 2146305 /* Decorators */, - /*parenthesizerRule*/ - void 0, - start, - pos - start, - /*hasTrailingComma*/ - false, - textRange - ); - } - start = pos; - lastMode = mode; - pos++; - } - onAfterEmitNodeArray == null ? void 0 : onAfterEmitNodeArray(modifiers); - if (lastModifier && !positionIsSynthesized(lastModifier.end)) { - return lastModifier.end; - } - } - return node.pos; - } - function emitModifierList(node, modifiers) { - emitList(node, modifiers, 2359808 /* Modifiers */); - const lastModifier = lastOrUndefined(modifiers); - return lastModifier && !positionIsSynthesized(lastModifier.end) ? lastModifier.end : node.pos; - } - function emitTypeAnnotation(node) { - if (node) { - writePunctuation(":"); - writeSpace(); - emit(node); - } - } - function emitInitializer(node, equalCommentStartPos, container, parenthesizerRule) { - if (node) { - writeSpace(); - emitTokenWithComment(64 /* EqualsToken */, equalCommentStartPos, writeOperator, container); - writeSpace(); - emitExpression(node, parenthesizerRule); - } - } - function emitNodeWithPrefix(prefix, prefixWriter, node, emit2) { - if (node) { - prefixWriter(prefix); - emit2(node); - } - } - function emitWithLeadingSpace(node) { - if (node) { - writeSpace(); - emit(node); - } - } - function emitExpressionWithLeadingSpace(node, parenthesizerRule) { - if (node) { - writeSpace(); - emitExpression(node, parenthesizerRule); - } - } - function emitWithTrailingSpace(node) { - if (node) { - emit(node); - writeSpace(); - } - } - function emitEmbeddedStatement(parent2, node) { - if (isBlock(node) || getEmitFlags(parent2) & 1 /* SingleLine */ || preserveSourceNewlines && !getLeadingLineTerminatorCount(parent2, node, 0 /* None */)) { - writeSpace(); - emit(node); - } else { - writeLine(); - increaseIndent(); - if (isEmptyStatement(node)) { - pipelineEmit(5 /* EmbeddedStatement */, node); - } else { - emit(node); - } - decreaseIndent(); - } - } - function emitDecoratorList(parentNode, decorators) { - emitList(parentNode, decorators, 2146305 /* Decorators */); - const lastDecorator = lastOrUndefined(decorators); - return lastDecorator && !positionIsSynthesized(lastDecorator.end) ? lastDecorator.end : parentNode.pos; - } - function emitTypeArguments(parentNode, typeArguments) { - emitList(parentNode, typeArguments, 53776 /* TypeArguments */, typeArgumentParenthesizerRuleSelector); - } - function emitTypeParameters(parentNode, typeParameters) { - if (isFunctionLike(parentNode) && parentNode.typeArguments) { - return emitTypeArguments(parentNode, parentNode.typeArguments); - } - emitList(parentNode, typeParameters, 53776 /* TypeParameters */); - } - function emitParameters(parentNode, parameters) { - emitList(parentNode, parameters, 2576 /* Parameters */); - } - function canEmitSimpleArrowHead(parentNode, parameters) { - const parameter = singleOrUndefined(parameters); - return parameter && parameter.pos === parentNode.pos && isArrowFunction(parentNode) && !parentNode.type && !some(parentNode.modifiers) && !some(parentNode.typeParameters) && !some(parameter.modifiers) && !parameter.dotDotDotToken && !parameter.questionToken && !parameter.type && !parameter.initializer && isIdentifier(parameter.name); - } - function emitParametersForArrow(parentNode, parameters) { - if (canEmitSimpleArrowHead(parentNode, parameters)) { - emitList(parentNode, parameters, 2576 /* Parameters */ & ~2048 /* Parenthesis */); - } else { - emitParameters(parentNode, parameters); - } - } - function emitParametersForIndexSignature(parentNode, parameters) { - emitList(parentNode, parameters, 8848 /* IndexSignatureParameters */); - } - function writeDelimiter(format) { - switch (format & 60 /* DelimitersMask */) { - case 0 /* None */: - break; - case 16 /* CommaDelimited */: - writePunctuation(","); - break; - case 4 /* BarDelimited */: - writeSpace(); - writePunctuation("|"); - break; - case 32 /* AsteriskDelimited */: - writeSpace(); - writePunctuation("*"); - writeSpace(); - break; - case 8 /* AmpersandDelimited */: - writeSpace(); - writePunctuation("&"); - break; - } - } - function emitList(parentNode, children, format, parenthesizerRule, start, count) { - emitNodeList( - emit, - parentNode, - children, - format | (parentNode && getEmitFlags(parentNode) & 2 /* MultiLine */ ? 65536 /* PreferNewLine */ : 0), - parenthesizerRule, - start, - count - ); - } - function emitExpressionList(parentNode, children, format, parenthesizerRule, start, count) { - emitNodeList(emitExpression, parentNode, children, format, parenthesizerRule, start, count); - } - function emitNodeList(emit2, parentNode, children, format, parenthesizerRule, start = 0, count = children ? children.length - start : 0) { - const isUndefined = children === void 0; - if (isUndefined && format & 16384 /* OptionalIfUndefined */) { - return; - } - const isEmpty = children === void 0 || start >= children.length || count === 0; - if (isEmpty && format & 32768 /* OptionalIfEmpty */) { - onBeforeEmitNodeArray == null ? void 0 : onBeforeEmitNodeArray(children); - onAfterEmitNodeArray == null ? void 0 : onAfterEmitNodeArray(children); - return; - } - if (format & 15360 /* BracketsMask */) { - writePunctuation(getOpeningBracket(format)); - if (isEmpty && children) { - emitTrailingCommentsOfPosition( - children.pos, - /*prefixSpace*/ - true - ); - } - } - onBeforeEmitNodeArray == null ? void 0 : onBeforeEmitNodeArray(children); - if (isEmpty) { - if (format & 1 /* MultiLine */ && !(preserveSourceNewlines && (!parentNode || currentSourceFile && rangeIsOnSingleLine(parentNode, currentSourceFile)))) { - writeLine(); - } else if (format & 256 /* SpaceBetweenBraces */ && !(format & 524288 /* NoSpaceIfEmpty */)) { - writeSpace(); - } - } else { - emitNodeListItems(emit2, parentNode, children, format, parenthesizerRule, start, count, children.hasTrailingComma, children); - } - onAfterEmitNodeArray == null ? void 0 : onAfterEmitNodeArray(children); - if (format & 15360 /* BracketsMask */) { - if (isEmpty && children) { - emitLeadingCommentsOfPosition(children.end); - } - writePunctuation(getClosingBracket(format)); - } - } - function emitNodeListItems(emit2, parentNode, children, format, parenthesizerRule, start, count, hasTrailingComma, childrenTextRange) { - const mayEmitInterveningComments = (format & 262144 /* NoInterveningComments */) === 0; - let shouldEmitInterveningComments = mayEmitInterveningComments; - const leadingLineTerminatorCount = getLeadingLineTerminatorCount(parentNode, children[start], format); - if (leadingLineTerminatorCount) { - writeLine(leadingLineTerminatorCount); - shouldEmitInterveningComments = false; - } else if (format & 256 /* SpaceBetweenBraces */) { - writeSpace(); - } - if (format & 128 /* Indented */) { - increaseIndent(); - } - const emitListItem = getEmitListItem(emit2, parenthesizerRule); - let previousSibling; - let previousSourceFileTextKind; - let shouldDecreaseIndentAfterEmit = false; - for (let i = 0; i < count; i++) { - const child = children[start + i]; - if (format & 32 /* AsteriskDelimited */) { - writeLine(); - writeDelimiter(format); - } else if (previousSibling) { - if (format & 60 /* DelimitersMask */ && previousSibling.end !== (parentNode ? parentNode.end : -1)) { - const previousSiblingEmitFlags = getEmitFlags(previousSibling); - if (!(previousSiblingEmitFlags & 2048 /* NoTrailingComments */)) { - emitLeadingCommentsOfPosition(previousSibling.end); - } - } - writeDelimiter(format); - recordBundleFileInternalSectionEnd(previousSourceFileTextKind); - const separatingLineTerminatorCount = getSeparatingLineTerminatorCount(previousSibling, child, format); - if (separatingLineTerminatorCount > 0) { - if ((format & (3 /* LinesMask */ | 128 /* Indented */)) === 0 /* SingleLine */) { - increaseIndent(); - shouldDecreaseIndentAfterEmit = true; - } - writeLine(separatingLineTerminatorCount); - shouldEmitInterveningComments = false; - } else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) { - writeSpace(); - } - } - previousSourceFileTextKind = recordBundleFileInternalSectionStart(child); - if (shouldEmitInterveningComments) { - const commentRange = getCommentRange(child); - emitTrailingCommentsOfPosition(commentRange.pos); - } else { - shouldEmitInterveningComments = mayEmitInterveningComments; - } - nextListElementPos = child.pos; - emitListItem(child, emit2, parenthesizerRule, i); - if (shouldDecreaseIndentAfterEmit) { - decreaseIndent(); - shouldDecreaseIndentAfterEmit = false; - } - previousSibling = child; - } - const emitFlags = previousSibling ? getEmitFlags(previousSibling) : 0; - const skipTrailingComments = commentsDisabled || !!(emitFlags & 2048 /* NoTrailingComments */); - const emitTrailingComma = hasTrailingComma && format & 64 /* AllowTrailingComma */ && format & 16 /* CommaDelimited */; - if (emitTrailingComma) { - if (previousSibling && !skipTrailingComments) { - emitTokenWithComment(28 /* CommaToken */, previousSibling.end, writePunctuation, previousSibling); - } else { - writePunctuation(","); - } - } - if (previousSibling && (parentNode ? parentNode.end : -1) !== previousSibling.end && format & 60 /* DelimitersMask */ && !skipTrailingComments) { - emitLeadingCommentsOfPosition(emitTrailingComma && (childrenTextRange == null ? void 0 : childrenTextRange.end) ? childrenTextRange.end : previousSibling.end); - } - if (format & 128 /* Indented */) { - decreaseIndent(); - } - recordBundleFileInternalSectionEnd(previousSourceFileTextKind); - const closingLineTerminatorCount = getClosingLineTerminatorCount(parentNode, children[start + count - 1], format, childrenTextRange); - if (closingLineTerminatorCount) { - writeLine(closingLineTerminatorCount); - } else if (format & (2097152 /* SpaceAfterList */ | 256 /* SpaceBetweenBraces */)) { - writeSpace(); - } - } - function writeLiteral(s) { - writer.writeLiteral(s); - } - function writeStringLiteral(s) { - writer.writeStringLiteral(s); - } - function writeBase(s) { - writer.write(s); - } - function writeSymbol(s, sym) { - writer.writeSymbol(s, sym); - } - function writePunctuation(s) { - writer.writePunctuation(s); - } - function writeTrailingSemicolon() { - writer.writeTrailingSemicolon(";"); - } - function writeKeyword(s) { - writer.writeKeyword(s); - } - function writeOperator(s) { - writer.writeOperator(s); - } - function writeParameter(s) { - writer.writeParameter(s); - } - function writeComment(s) { - writer.writeComment(s); - } - function writeSpace() { - writer.writeSpace(" "); - } - function writeProperty(s) { - writer.writeProperty(s); - } - function nonEscapingWrite(s) { - if (writer.nonEscapingWrite) { - writer.nonEscapingWrite(s); - } else { - writer.write(s); - } - } - function writeLine(count = 1) { - for (let i = 0; i < count; i++) { - writer.writeLine(i > 0); - } - } - function increaseIndent() { - writer.increaseIndent(); - } - function decreaseIndent() { - writer.decreaseIndent(); - } - function writeToken(token, pos, writer2, contextNode) { - return !sourceMapsDisabled ? emitTokenWithSourceMap(contextNode, token, writer2, pos, writeTokenText) : writeTokenText(token, writer2, pos); - } - function writeTokenNode(node, writer2) { - if (onBeforeEmitToken) { - onBeforeEmitToken(node); - } - writer2(tokenToString(node.kind)); - if (onAfterEmitToken) { - onAfterEmitToken(node); - } - } - function writeTokenText(token, writer2, pos) { - const tokenString = tokenToString(token); - writer2(tokenString); - return pos < 0 ? pos : pos + tokenString.length; - } - function writeLineOrSpace(parentNode, prevChildNode, nextChildNode) { - if (getEmitFlags(parentNode) & 1 /* SingleLine */) { - writeSpace(); - } else if (preserveSourceNewlines) { - const lines = getLinesBetweenNodes(parentNode, prevChildNode, nextChildNode); - if (lines) { - writeLine(lines); - } else { - writeSpace(); - } - } else { - writeLine(); - } - } - function writeLines(text) { - const lines = text.split(/\r\n?|\n/g); - const indentation = guessIndentation(lines); - for (const lineText of lines) { - const line = indentation ? lineText.slice(indentation) : lineText; - if (line.length) { - writeLine(); - write(line); - } - } - } - function writeLinesAndIndent(lineCount, writeSpaceIfNotIndenting) { - if (lineCount) { - increaseIndent(); - writeLine(lineCount); - } else if (writeSpaceIfNotIndenting) { - writeSpace(); - } - } - function decreaseIndentIf(value1, value2) { - if (value1) { - decreaseIndent(); - } - if (value2) { - decreaseIndent(); - } - } - function getLeadingLineTerminatorCount(parentNode, firstChild, format) { - if (format & 2 /* PreserveLines */ || preserveSourceNewlines) { - if (format & 65536 /* PreferNewLine */) { - return 1; - } - if (firstChild === void 0) { - return !parentNode || currentSourceFile && rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1; - } - if (firstChild.pos === nextListElementPos) { - return 0; - } - if (firstChild.kind === 12 /* JsxText */) { - return 0; - } - if (currentSourceFile && parentNode && !positionIsSynthesized(parentNode.pos) && !nodeIsSynthesized(firstChild) && (!firstChild.parent || getOriginalNode(firstChild.parent) === getOriginalNode(parentNode))) { - if (preserveSourceNewlines) { - return getEffectiveLines( - (includeComments) => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter( - firstChild.pos, - parentNode.pos, - currentSourceFile, - includeComments - ) - ); - } - return rangeStartPositionsAreOnSameLine(parentNode, firstChild, currentSourceFile) ? 0 : 1; - } - if (synthesizedNodeStartsOnNewLine(firstChild, format)) { - return 1; - } - } - return format & 1 /* MultiLine */ ? 1 : 0; - } - function getSeparatingLineTerminatorCount(previousNode, nextNode, format) { - if (format & 2 /* PreserveLines */ || preserveSourceNewlines) { - if (previousNode === void 0 || nextNode === void 0) { - return 0; - } - if (nextNode.kind === 12 /* JsxText */) { - return 0; - } else if (currentSourceFile && !nodeIsSynthesized(previousNode) && !nodeIsSynthesized(nextNode)) { - if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) { - return getEffectiveLines( - (includeComments) => getLinesBetweenRangeEndAndRangeStart( - previousNode, - nextNode, - currentSourceFile, - includeComments - ) - ); - } else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) { - return rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1; - } - return format & 65536 /* PreferNewLine */ ? 1 : 0; - } else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) { - return 1; - } - } else if (getStartsOnNewLine(nextNode)) { - return 1; - } - return format & 1 /* MultiLine */ ? 1 : 0; - } - function getClosingLineTerminatorCount(parentNode, lastChild, format, childrenTextRange) { - if (format & 2 /* PreserveLines */ || preserveSourceNewlines) { - if (format & 65536 /* PreferNewLine */) { - return 1; - } - if (lastChild === void 0) { - return !parentNode || currentSourceFile && rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1; - } - if (currentSourceFile && parentNode && !positionIsSynthesized(parentNode.pos) && !nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) { - if (preserveSourceNewlines) { - const end = childrenTextRange && !positionIsSynthesized(childrenTextRange.end) ? childrenTextRange.end : lastChild.end; - return getEffectiveLines( - (includeComments) => getLinesBetweenPositionAndNextNonWhitespaceCharacter( - end, - parentNode.end, - currentSourceFile, - includeComments - ) - ); - } - return rangeEndPositionsAreOnSameLine(parentNode, lastChild, currentSourceFile) ? 0 : 1; - } - if (synthesizedNodeStartsOnNewLine(lastChild, format)) { - return 1; - } - } - if (format & 1 /* MultiLine */ && !(format & 131072 /* NoTrailingNewLine */)) { - return 1; - } - return 0; - } - function getEffectiveLines(getLineDifference) { - Debug.assert(!!preserveSourceNewlines); - const lines = getLineDifference( - /*includeComments*/ - true - ); - if (lines === 0) { - return getLineDifference( - /*includeComments*/ - false - ); - } - return lines; - } - function writeLineSeparatorsAndIndentBefore(node, parent2) { - const leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent2, node, 0 /* None */); - if (leadingNewlines) { - writeLinesAndIndent( - leadingNewlines, - /*writeSpaceIfNotIndenting*/ - false - ); - } - return !!leadingNewlines; - } - function writeLineSeparatorsAfter(node, parent2) { - const trailingNewlines = preserveSourceNewlines && getClosingLineTerminatorCount( - parent2, - node, - 0 /* None */, - /*childrenTextRange*/ - void 0 - ); - if (trailingNewlines) { - writeLine(trailingNewlines); - } - } - function synthesizedNodeStartsOnNewLine(node, format) { - if (nodeIsSynthesized(node)) { - const startsOnNewLine = getStartsOnNewLine(node); - if (startsOnNewLine === void 0) { - return (format & 65536 /* PreferNewLine */) !== 0; - } - return startsOnNewLine; - } - return (format & 65536 /* PreferNewLine */) !== 0; - } - function getLinesBetweenNodes(parent2, node1, node2) { - if (getEmitFlags(parent2) & 262144 /* NoIndentation */) { - return 0; - } - parent2 = skipSynthesizedParentheses(parent2); - node1 = skipSynthesizedParentheses(node1); - node2 = skipSynthesizedParentheses(node2); - if (getStartsOnNewLine(node2)) { - return 1; - } - if (currentSourceFile && !nodeIsSynthesized(parent2) && !nodeIsSynthesized(node1) && !nodeIsSynthesized(node2)) { - if (preserveSourceNewlines) { - return getEffectiveLines( - (includeComments) => getLinesBetweenRangeEndAndRangeStart( - node1, - node2, - currentSourceFile, - includeComments - ) - ); - } - return rangeEndIsOnSameLineAsRangeStart(node1, node2, currentSourceFile) ? 0 : 1; - } - return 0; - } - function isEmptyBlock(block) { - return block.statements.length === 0 && (!currentSourceFile || rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile)); - } - function skipSynthesizedParentheses(node) { - while (node.kind === 217 /* ParenthesizedExpression */ && nodeIsSynthesized(node)) { - node = node.expression; - } - return node; - } - function getTextOfNode2(node, includeTrivia) { - if (isGeneratedIdentifier(node) || isGeneratedPrivateIdentifier(node)) { - return generateName(node); - } - if (isStringLiteral(node) && node.textSourceNode) { - return getTextOfNode2(node.textSourceNode, includeTrivia); - } - const sourceFile = currentSourceFile; - const canUseSourceFile = !!sourceFile && !!node.parent && !nodeIsSynthesized(node); - if (isMemberName(node)) { - if (!canUseSourceFile || getSourceFileOfNode(node) !== getOriginalNode(sourceFile)) { - return idText(node); - } - } else if (isJsxNamespacedName(node)) { - if (!canUseSourceFile || getSourceFileOfNode(node) !== getOriginalNode(sourceFile)) { - return getTextOfJsxNamespacedName(node); - } - } else { - Debug.assertNode(node, isLiteralExpression); - if (!canUseSourceFile) { - return node.text; - } - } - return getSourceTextOfNodeFromSourceFile(sourceFile, node, includeTrivia); - } - function getLiteralTextOfNode(node, neverAsciiEscape, jsxAttributeEscape) { - if (node.kind === 11 /* StringLiteral */ && node.textSourceNode) { - const textSourceNode = node.textSourceNode; - if (isIdentifier(textSourceNode) || isPrivateIdentifier(textSourceNode) || isNumericLiteral(textSourceNode) || isJsxNamespacedName(textSourceNode)) { - const text = isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode2(textSourceNode); - return jsxAttributeEscape ? `"${escapeJsxAttributeString(text)}"` : neverAsciiEscape || getEmitFlags(node) & 16777216 /* NoAsciiEscaping */ ? `"${escapeString(text)}"` : `"${escapeNonAsciiString(text)}"`; - } else { - return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape); - } - } - const flags = (neverAsciiEscape ? 1 /* NeverAsciiEscape */ : 0) | (jsxAttributeEscape ? 2 /* JsxAttributeEscape */ : 0) | (printerOptions.terminateUnterminatedLiterals ? 4 /* TerminateUnterminatedLiterals */ : 0) | (printerOptions.target && printerOptions.target === 99 /* ESNext */ ? 8 /* AllowNumericSeparator */ : 0); - return getLiteralText(node, currentSourceFile, flags); - } - function pushNameGenerationScope(node) { - if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { - return; - } - tempFlagsStack.push(tempFlags); - tempFlags = 0 /* Auto */; - formattedNameTempFlagsStack.push(formattedNameTempFlags); - formattedNameTempFlags = void 0; - reservedNamesStack.push(reservedNames); - } - function popNameGenerationScope(node) { - if (node && getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { - return; - } - tempFlags = tempFlagsStack.pop(); - formattedNameTempFlags = formattedNameTempFlagsStack.pop(); - reservedNames = reservedNamesStack.pop(); - } - function reserveNameInNestedScopes(name) { - if (!reservedNames || reservedNames === lastOrUndefined(reservedNamesStack)) { - reservedNames = /* @__PURE__ */ new Set(); - } - reservedNames.add(name); - } - function pushPrivateNameGenerationScope(newPrivateNameTempFlags, newReservedMemberNames) { - privateNameTempFlagsStack.push(privateNameTempFlags); - privateNameTempFlags = newPrivateNameTempFlags; - reservedPrivateNamesStack.push(reservedNames); - reservedPrivateNames = newReservedMemberNames; - } - function popPrivateNameGenerationScope() { - privateNameTempFlags = privateNameTempFlagsStack.pop(); - reservedPrivateNames = reservedPrivateNamesStack.pop(); - } - function reservePrivateNameInNestedScopes(name) { - if (!reservedPrivateNames || reservedPrivateNames === lastOrUndefined(reservedPrivateNamesStack)) { - reservedPrivateNames = /* @__PURE__ */ new Set(); - } - reservedPrivateNames.add(name); - } - function generateNames(node) { - if (!node) - return; - switch (node.kind) { - case 241 /* Block */: - forEach(node.statements, generateNames); - break; - case 256 /* LabeledStatement */: - case 254 /* WithStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - generateNames(node.statement); - break; - case 245 /* IfStatement */: - generateNames(node.thenStatement); - generateNames(node.elseStatement); - break; - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: - case 249 /* ForInStatement */: - generateNames(node.initializer); - generateNames(node.statement); - break; - case 255 /* SwitchStatement */: - generateNames(node.caseBlock); - break; - case 269 /* CaseBlock */: - forEach(node.clauses, generateNames); - break; - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - forEach(node.statements, generateNames); - break; - case 258 /* TryStatement */: - generateNames(node.tryBlock); - generateNames(node.catchClause); - generateNames(node.finallyBlock); - break; - case 299 /* CatchClause */: - generateNames(node.variableDeclaration); - generateNames(node.block); - break; - case 243 /* VariableStatement */: - generateNames(node.declarationList); - break; - case 261 /* VariableDeclarationList */: - forEach(node.declarations, generateNames); - break; - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 263 /* ClassDeclaration */: - generateNameIfNeeded(node.name); - break; - case 262 /* FunctionDeclaration */: - generateNameIfNeeded(node.name); - if (getEmitFlags(node) & 1048576 /* ReuseTempVariableScope */) { - forEach(node.parameters, generateNames); - generateNames(node.body); - } - break; - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - forEach(node.elements, generateNames); - break; - case 272 /* ImportDeclaration */: - generateNames(node.importClause); - break; - case 273 /* ImportClause */: - generateNameIfNeeded(node.name); - generateNames(node.namedBindings); - break; - case 274 /* NamespaceImport */: - generateNameIfNeeded(node.name); - break; - case 280 /* NamespaceExport */: - generateNameIfNeeded(node.name); - break; - case 275 /* NamedImports */: - forEach(node.elements, generateNames); - break; - case 276 /* ImportSpecifier */: - generateNameIfNeeded(node.propertyName || node.name); - break; - } - } - function generateMemberNames(node) { - if (!node) - return; - switch (node.kind) { - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - generateNameIfNeeded(node.name); - break; - } - } - function generateNameIfNeeded(name) { - if (name) { - if (isGeneratedIdentifier(name) || isGeneratedPrivateIdentifier(name)) { - generateName(name); - } else if (isBindingPattern(name)) { - generateNames(name); - } - } - } - function generateName(name) { - const autoGenerate = name.emitNode.autoGenerate; - if ((autoGenerate.flags & 7 /* KindMask */) === 4 /* Node */) { - return generateNameCached(getNodeForGeneratedName(name), isPrivateIdentifier(name), autoGenerate.flags, autoGenerate.prefix, autoGenerate.suffix); - } else { - const autoGenerateId = autoGenerate.id; - return autoGeneratedIdToGeneratedName[autoGenerateId] || (autoGeneratedIdToGeneratedName[autoGenerateId] = makeName(name)); - } - } - function generateNameCached(node, privateName, flags, prefix, suffix) { - const nodeId = getNodeId(node); - const cache = privateName ? nodeIdToGeneratedPrivateName : nodeIdToGeneratedName; - return cache[nodeId] || (cache[nodeId] = generateNameForNode(node, privateName, flags ?? 0 /* None */, formatGeneratedNamePart(prefix, generateName), formatGeneratedNamePart(suffix))); - } - function isUniqueName(name, privateName) { - return isFileLevelUniqueNameInCurrentFile(name, privateName) && !isReservedName(name, privateName) && !generatedNames.has(name); - } - function isReservedName(name, privateName) { - return privateName ? !!(reservedPrivateNames == null ? void 0 : reservedPrivateNames.has(name)) : !!(reservedNames == null ? void 0 : reservedNames.has(name)); - } - function isFileLevelUniqueNameInCurrentFile(name, _isPrivate) { - return currentSourceFile ? isFileLevelUniqueName(currentSourceFile, name, hasGlobalName) : true; - } - function isUniqueLocalName(name, container) { - for (let node = container; node && isNodeDescendantOf(node, container); node = node.nextContainer) { - if (canHaveLocals(node) && node.locals) { - const local = node.locals.get(escapeLeadingUnderscores(name)); - if (local && local.flags & (111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */)) { - return false; - } - } - } - return true; - } - function getTempFlags(formattedNameKey) { - switch (formattedNameKey) { - case "": - return tempFlags; - case "#": - return privateNameTempFlags; - default: - return (formattedNameTempFlags == null ? void 0 : formattedNameTempFlags.get(formattedNameKey)) ?? 0 /* Auto */; - } - } - function setTempFlags(formattedNameKey, flags) { - switch (formattedNameKey) { - case "": - tempFlags = flags; - break; - case "#": - privateNameTempFlags = flags; - break; - default: - formattedNameTempFlags ?? (formattedNameTempFlags = /* @__PURE__ */ new Map()); - formattedNameTempFlags.set(formattedNameKey, flags); - break; - } - } - function makeTempVariableName(flags, reservedInNestedScopes, privateName, prefix, suffix) { - if (prefix.length > 0 && prefix.charCodeAt(0) === 35 /* hash */) { - prefix = prefix.slice(1); - } - const key = formatGeneratedName(privateName, prefix, "", suffix); - let tempFlags2 = getTempFlags(key); - if (flags && !(tempFlags2 & flags)) { - const name = flags === 268435456 /* _i */ ? "_i" : "_n"; - const fullName = formatGeneratedName(privateName, prefix, name, suffix); - if (isUniqueName(fullName, privateName)) { - tempFlags2 |= flags; - if (privateName) { - reservePrivateNameInNestedScopes(fullName); - } else if (reservedInNestedScopes) { - reserveNameInNestedScopes(fullName); - } - setTempFlags(key, tempFlags2); - return fullName; - } - } - while (true) { - const count = tempFlags2 & 268435455 /* CountMask */; - tempFlags2++; - if (count !== 8 && count !== 13) { - const name = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26); - const fullName = formatGeneratedName(privateName, prefix, name, suffix); - if (isUniqueName(fullName, privateName)) { - if (privateName) { - reservePrivateNameInNestedScopes(fullName); - } else if (reservedInNestedScopes) { - reserveNameInNestedScopes(fullName); - } - setTempFlags(key, tempFlags2); - return fullName; - } - } - } - } - function makeUniqueName2(baseName, checkFn = isUniqueName, optimistic, scoped, privateName, prefix, suffix) { - if (baseName.length > 0 && baseName.charCodeAt(0) === 35 /* hash */) { - baseName = baseName.slice(1); - } - if (prefix.length > 0 && prefix.charCodeAt(0) === 35 /* hash */) { - prefix = prefix.slice(1); - } - if (optimistic) { - const fullName = formatGeneratedName(privateName, prefix, baseName, suffix); - if (checkFn(fullName, privateName)) { - if (privateName) { - reservePrivateNameInNestedScopes(fullName); - } else if (scoped) { - reserveNameInNestedScopes(fullName); - } else { - generatedNames.add(fullName); - } - return fullName; - } - } - if (baseName.charCodeAt(baseName.length - 1) !== 95 /* _ */) { - baseName += "_"; - } - let i = 1; - while (true) { - const fullName = formatGeneratedName(privateName, prefix, baseName + i, suffix); - if (checkFn(fullName, privateName)) { - if (privateName) { - reservePrivateNameInNestedScopes(fullName); - } else if (scoped) { - reserveNameInNestedScopes(fullName); - } else { - generatedNames.add(fullName); - } - return fullName; - } - i++; - } - } - function makeFileLevelOptimisticUniqueName(name) { - return makeUniqueName2( - name, - isFileLevelUniqueNameInCurrentFile, - /*optimistic*/ - true, - /*scoped*/ - false, - /*privateName*/ - false, - /*prefix*/ - "", - /*suffix*/ - "" - ); - } - function generateNameForModuleOrEnum(node) { - const name = getTextOfNode2(node.name); - return isUniqueLocalName(name, tryCast(node, canHaveLocals)) ? name : makeUniqueName2( - name, - isUniqueName, - /*optimistic*/ - false, - /*scoped*/ - false, - /*privateName*/ - false, - /*prefix*/ - "", - /*suffix*/ - "" - ); - } - function generateNameForImportOrExportDeclaration(node) { - const expr = getExternalModuleName(node); - const baseName = isStringLiteral(expr) ? makeIdentifierFromModuleName(expr.text) : "module"; - return makeUniqueName2( - baseName, - isUniqueName, - /*optimistic*/ - false, - /*scoped*/ - false, - /*privateName*/ - false, - /*prefix*/ - "", - /*suffix*/ - "" - ); - } - function generateNameForExportDefault() { - return makeUniqueName2( - "default", - isUniqueName, - /*optimistic*/ - false, - /*scoped*/ - false, - /*privateName*/ - false, - /*prefix*/ - "", - /*suffix*/ - "" - ); - } - function generateNameForClassExpression() { - return makeUniqueName2( - "class", - isUniqueName, - /*optimistic*/ - false, - /*scoped*/ - false, - /*privateName*/ - false, - /*prefix*/ - "", - /*suffix*/ - "" - ); - } - function generateNameForMethodOrAccessor(node, privateName, prefix, suffix) { - if (isIdentifier(node.name)) { - return generateNameCached(node.name, privateName); - } - return makeTempVariableName( - 0 /* Auto */, - /*reservedInNestedScopes*/ - false, - privateName, - prefix, - suffix - ); - } - function generateNameForNode(node, privateName, flags, prefix, suffix) { - switch (node.kind) { - case 80 /* Identifier */: - case 81 /* PrivateIdentifier */: - return makeUniqueName2( - getTextOfNode2(node), - isUniqueName, - !!(flags & 16 /* Optimistic */), - !!(flags & 8 /* ReservedInNestedScopes */), - privateName, - prefix, - suffix - ); - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - Debug.assert(!prefix && !suffix && !privateName); - return generateNameForModuleOrEnum(node); - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - Debug.assert(!prefix && !suffix && !privateName); - return generateNameForImportOrExportDeclaration(node); - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: { - Debug.assert(!prefix && !suffix && !privateName); - const name = node.name; - if (name && !isGeneratedIdentifier(name)) { - return generateNameForNode( - name, - /*privateName*/ - false, - flags, - prefix, - suffix - ); - } - return generateNameForExportDefault(); - } - case 277 /* ExportAssignment */: - Debug.assert(!prefix && !suffix && !privateName); - return generateNameForExportDefault(); - case 231 /* ClassExpression */: - Debug.assert(!prefix && !suffix && !privateName); - return generateNameForClassExpression(); - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return generateNameForMethodOrAccessor(node, privateName, prefix, suffix); - case 167 /* ComputedPropertyName */: - return makeTempVariableName( - 0 /* Auto */, - /*reservedInNestedScopes*/ - true, - privateName, - prefix, - suffix - ); - default: - return makeTempVariableName( - 0 /* Auto */, - /*reservedInNestedScopes*/ - false, - privateName, - prefix, - suffix - ); - } - } - function makeName(name) { - const autoGenerate = name.emitNode.autoGenerate; - const prefix = formatGeneratedNamePart(autoGenerate.prefix, generateName); - const suffix = formatGeneratedNamePart(autoGenerate.suffix); - switch (autoGenerate.flags & 7 /* KindMask */) { - case 1 /* Auto */: - return makeTempVariableName(0 /* Auto */, !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */), isPrivateIdentifier(name), prefix, suffix); - case 2 /* Loop */: - Debug.assertNode(name, isIdentifier); - return makeTempVariableName( - 268435456 /* _i */, - !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */), - /*privateName*/ - false, - prefix, - suffix - ); - case 3 /* Unique */: - return makeUniqueName2( - idText(name), - autoGenerate.flags & 32 /* FileLevel */ ? isFileLevelUniqueNameInCurrentFile : isUniqueName, - !!(autoGenerate.flags & 16 /* Optimistic */), - !!(autoGenerate.flags & 8 /* ReservedInNestedScopes */), - isPrivateIdentifier(name), - prefix, - suffix - ); - } - return Debug.fail(`Unsupported GeneratedIdentifierKind: ${Debug.formatEnum( - autoGenerate.flags & 7 /* KindMask */, - GeneratedIdentifierFlags, - /*isFlags*/ - true - )}.`); - } - function pipelineEmitWithComments(hint, node) { - const pipelinePhase = getNextPipelinePhase(2 /* Comments */, hint, node); - const savedContainerPos = containerPos; - const savedContainerEnd = containerEnd; - const savedDeclarationListContainerEnd = declarationListContainerEnd; - emitCommentsBeforeNode(node); - pipelinePhase(hint, node); - emitCommentsAfterNode(node, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd); - } - function emitCommentsBeforeNode(node) { - const emitFlags = getEmitFlags(node); - const commentRange = getCommentRange(node); - emitLeadingCommentsOfNode(node, emitFlags, commentRange.pos, commentRange.end); - if (emitFlags & 4096 /* NoNestedComments */) { - commentsDisabled = true; - } - } - function emitCommentsAfterNode(node, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd) { - const emitFlags = getEmitFlags(node); - const commentRange = getCommentRange(node); - if (emitFlags & 4096 /* NoNestedComments */) { - commentsDisabled = false; - } - emitTrailingCommentsOfNode(node, emitFlags, commentRange.pos, commentRange.end, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd); - const typeNode = getTypeNode(node); - if (typeNode) { - emitTrailingCommentsOfNode(node, emitFlags, typeNode.pos, typeNode.end, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd); - } - } - function emitLeadingCommentsOfNode(node, emitFlags, pos, end) { - enterComment(); - hasWrittenComment = false; - const skipLeadingComments = pos < 0 || (emitFlags & 1024 /* NoLeadingComments */) !== 0 || node.kind === 12 /* JsxText */; - const skipTrailingComments = end < 0 || (emitFlags & 2048 /* NoTrailingComments */) !== 0 || node.kind === 12 /* JsxText */; - if ((pos > 0 || end > 0) && pos !== end) { - if (!skipLeadingComments) { - emitLeadingComments( - pos, - /*isEmittedNode*/ - node.kind !== 359 /* NotEmittedStatement */ - ); - } - if (!skipLeadingComments || pos >= 0 && (emitFlags & 1024 /* NoLeadingComments */) !== 0) { - containerPos = pos; - } - if (!skipTrailingComments || end >= 0 && (emitFlags & 2048 /* NoTrailingComments */) !== 0) { - containerEnd = end; - if (node.kind === 261 /* VariableDeclarationList */) { - declarationListContainerEnd = end; - } - } - } - forEach(getSyntheticLeadingComments(node), emitLeadingSynthesizedComment); - exitComment(); - } - function emitTrailingCommentsOfNode(node, emitFlags, pos, end, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd) { - enterComment(); - const skipTrailingComments = end < 0 || (emitFlags & 2048 /* NoTrailingComments */) !== 0 || node.kind === 12 /* JsxText */; - forEach(getSyntheticTrailingComments(node), emitTrailingSynthesizedComment); - if ((pos > 0 || end > 0) && pos !== end) { - containerPos = savedContainerPos; - containerEnd = savedContainerEnd; - declarationListContainerEnd = savedDeclarationListContainerEnd; - if (!skipTrailingComments && node.kind !== 359 /* NotEmittedStatement */) { - emitTrailingComments(end); - } - } - exitComment(); - } - function emitLeadingSynthesizedComment(comment) { - if (comment.hasLeadingNewline || comment.kind === 2 /* SingleLineCommentTrivia */) { - writer.writeLine(); - } - writeSynthesizedComment(comment); - if (comment.hasTrailingNewLine || comment.kind === 2 /* SingleLineCommentTrivia */) { - writer.writeLine(); - } else { - writer.writeSpace(" "); - } - } - function emitTrailingSynthesizedComment(comment) { - if (!writer.isAtStartOfLine()) { - writer.writeSpace(" "); - } - writeSynthesizedComment(comment); - if (comment.hasTrailingNewLine) { - writer.writeLine(); - } - } - function writeSynthesizedComment(comment) { - const text = formatSynthesizedComment(comment); - const lineMap = comment.kind === 3 /* MultiLineCommentTrivia */ ? computeLineStarts(text) : void 0; - writeCommentRange(text, lineMap, writer, 0, text.length, newLine); - } - function formatSynthesizedComment(comment) { - return comment.kind === 3 /* MultiLineCommentTrivia */ ? `/*${comment.text}*/` : `//${comment.text}`; - } - function emitBodyWithDetachedComments(node, detachedRange, emitCallback) { - enterComment(); - const { pos, end } = detachedRange; - const emitFlags = getEmitFlags(node); - const skipLeadingComments = pos < 0 || (emitFlags & 1024 /* NoLeadingComments */) !== 0; - const skipTrailingComments = commentsDisabled || end < 0 || (emitFlags & 2048 /* NoTrailingComments */) !== 0; - if (!skipLeadingComments) { - emitDetachedCommentsAndUpdateCommentsInfo(detachedRange); - } - exitComment(); - if (emitFlags & 4096 /* NoNestedComments */ && !commentsDisabled) { - commentsDisabled = true; - emitCallback(node); - commentsDisabled = false; - } else { - emitCallback(node); - } - enterComment(); - if (!skipTrailingComments) { - emitLeadingComments( - detachedRange.end, - /*isEmittedNode*/ - true - ); - if (hasWrittenComment && !writer.isAtStartOfLine()) { - writer.writeLine(); - } - } - exitComment(); - } - function originalNodesHaveSameParent(nodeA, nodeB) { - nodeA = getOriginalNode(nodeA); - return nodeA.parent && nodeA.parent === getOriginalNode(nodeB).parent; - } - function siblingNodePositionsAreComparable(previousNode, nextNode) { - if (nextNode.pos < previousNode.end) { - return false; - } - previousNode = getOriginalNode(previousNode); - nextNode = getOriginalNode(nextNode); - const parent2 = previousNode.parent; - if (!parent2 || parent2 !== nextNode.parent) { - return false; - } - const parentNodeArray = getContainingNodeArray(previousNode); - const prevNodeIndex = parentNodeArray == null ? void 0 : parentNodeArray.indexOf(previousNode); - return prevNodeIndex !== void 0 && prevNodeIndex > -1 && parentNodeArray.indexOf(nextNode) === prevNodeIndex + 1; - } - function emitLeadingComments(pos, isEmittedNode) { - hasWrittenComment = false; - if (isEmittedNode) { - if (pos === 0 && (currentSourceFile == null ? void 0 : currentSourceFile.isDeclarationFile)) { - forEachLeadingCommentToEmit(pos, emitNonTripleSlashLeadingComment); - } else { - forEachLeadingCommentToEmit(pos, emitLeadingComment); - } - } else if (pos === 0) { - forEachLeadingCommentToEmit(pos, emitTripleSlashLeadingComment); - } - } - function emitTripleSlashLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos) { - if (isTripleSlashComment(commentPos, commentEnd)) { - emitLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos); - } - } - function emitNonTripleSlashLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos) { - if (!isTripleSlashComment(commentPos, commentEnd)) { - emitLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos); - } - } - function shouldWriteComment(text, pos) { - if (printerOptions.onlyPrintJsDocStyle) { - return isJSDocLikeText(text, pos) || isPinnedComment(text, pos); - } - return true; - } - function emitLeadingComment(commentPos, commentEnd, kind, hasTrailingNewLine, rangePos) { - if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) - return; - if (!hasWrittenComment) { - emitNewLineBeforeLeadingCommentOfPosition(getCurrentLineMap(), writer, rangePos, commentPos); - hasWrittenComment = true; - } - emitPos(commentPos); - writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); - emitPos(commentEnd); - if (hasTrailingNewLine) { - writer.writeLine(); - } else if (kind === 3 /* MultiLineCommentTrivia */) { - writer.writeSpace(" "); - } - } - function emitLeadingCommentsOfPosition(pos) { - if (commentsDisabled || pos === -1) { - return; - } - emitLeadingComments( - pos, - /*isEmittedNode*/ - true - ); - } - function emitTrailingComments(pos) { - forEachTrailingCommentToEmit(pos, emitTrailingComment); - } - function emitTrailingComment(commentPos, commentEnd, _kind, hasTrailingNewLine) { - if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) - return; - if (!writer.isAtStartOfLine()) { - writer.writeSpace(" "); - } - emitPos(commentPos); - writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); - emitPos(commentEnd); - if (hasTrailingNewLine) { - writer.writeLine(); - } - } - function emitTrailingCommentsOfPosition(pos, prefixSpace, forceNoNewline) { - if (commentsDisabled) { - return; - } - enterComment(); - forEachTrailingCommentToEmit(pos, prefixSpace ? emitTrailingComment : forceNoNewline ? emitTrailingCommentOfPositionNoNewline : emitTrailingCommentOfPosition); - exitComment(); - } - function emitTrailingCommentOfPositionNoNewline(commentPos, commentEnd, kind) { - if (!currentSourceFile) - return; - emitPos(commentPos); - writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); - emitPos(commentEnd); - if (kind === 2 /* SingleLineCommentTrivia */) { - writer.writeLine(); - } - } - function emitTrailingCommentOfPosition(commentPos, commentEnd, _kind, hasTrailingNewLine) { - if (!currentSourceFile) - return; - emitPos(commentPos); - writeCommentRange(currentSourceFile.text, getCurrentLineMap(), writer, commentPos, commentEnd, newLine); - emitPos(commentEnd); - if (hasTrailingNewLine) { - writer.writeLine(); - } else { - writer.writeSpace(" "); - } - } - function forEachLeadingCommentToEmit(pos, cb) { - if (currentSourceFile && (containerPos === -1 || pos !== containerPos)) { - if (hasDetachedComments(pos)) { - forEachLeadingCommentWithoutDetachedComments(cb); - } else { - forEachLeadingCommentRange( - currentSourceFile.text, - pos, - cb, - /*state*/ - pos - ); - } - } - } - function forEachTrailingCommentToEmit(end, cb) { - if (currentSourceFile && (containerEnd === -1 || end !== containerEnd && end !== declarationListContainerEnd)) { - forEachTrailingCommentRange(currentSourceFile.text, end, cb); - } - } - function hasDetachedComments(pos) { - return detachedCommentsInfo !== void 0 && last(detachedCommentsInfo).nodePos === pos; - } - function forEachLeadingCommentWithoutDetachedComments(cb) { - if (!currentSourceFile) - return; - const pos = last(detachedCommentsInfo).detachedCommentEndPos; - if (detachedCommentsInfo.length - 1) { - detachedCommentsInfo.pop(); - } else { - detachedCommentsInfo = void 0; - } - forEachLeadingCommentRange( - currentSourceFile.text, - pos, - cb, - /*state*/ - pos - ); - } - function emitDetachedCommentsAndUpdateCommentsInfo(range) { - const currentDetachedCommentInfo = currentSourceFile && emitDetachedComments(currentSourceFile.text, getCurrentLineMap(), writer, emitComment, range, newLine, commentsDisabled); - if (currentDetachedCommentInfo) { - if (detachedCommentsInfo) { - detachedCommentsInfo.push(currentDetachedCommentInfo); - } else { - detachedCommentsInfo = [currentDetachedCommentInfo]; - } - } - } - function emitComment(text, lineMap, writer2, commentPos, commentEnd, newLine2) { - if (!currentSourceFile || !shouldWriteComment(currentSourceFile.text, commentPos)) - return; - emitPos(commentPos); - writeCommentRange(text, lineMap, writer2, commentPos, commentEnd, newLine2); - emitPos(commentEnd); - } - function isTripleSlashComment(commentPos, commentEnd) { - return !!currentSourceFile && isRecognizedTripleSlashComment(currentSourceFile.text, commentPos, commentEnd); - } - function getParsedSourceMap(node) { - if (node.parsedSourceMap === void 0 && node.sourceMapText !== void 0) { - node.parsedSourceMap = tryParseRawSourceMap(node.sourceMapText) || false; - } - return node.parsedSourceMap || void 0; - } - function pipelineEmitWithSourceMaps(hint, node) { - const pipelinePhase = getNextPipelinePhase(3 /* SourceMaps */, hint, node); - emitSourceMapsBeforeNode(node); - pipelinePhase(hint, node); - emitSourceMapsAfterNode(node); - } - function emitSourceMapsBeforeNode(node) { - const emitFlags = getEmitFlags(node); - const sourceMapRange = getSourceMapRange(node); - if (isUnparsedNode(node)) { - Debug.assertIsDefined(node.parent, "UnparsedNodes must have parent pointers"); - const parsed = getParsedSourceMap(node.parent); - if (parsed && sourceMapGenerator) { - sourceMapGenerator.appendSourceMap( - writer.getLine(), - writer.getColumn(), - parsed, - node.parent.sourceMapPath, - node.parent.getLineAndCharacterOfPosition(node.pos), - node.parent.getLineAndCharacterOfPosition(node.end) - ); - } - } else { - const source = sourceMapRange.source || sourceMapSource; - if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 32 /* NoLeadingSourceMap */) === 0 && sourceMapRange.pos >= 0) { - emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos)); - } - if (emitFlags & 128 /* NoNestedSourceMaps */) { - sourceMapsDisabled = true; - } - } - } - function emitSourceMapsAfterNode(node) { - const emitFlags = getEmitFlags(node); - const sourceMapRange = getSourceMapRange(node); - if (!isUnparsedNode(node)) { - if (emitFlags & 128 /* NoNestedSourceMaps */) { - sourceMapsDisabled = false; - } - if (node.kind !== 359 /* NotEmittedStatement */ && (emitFlags & 64 /* NoTrailingSourceMap */) === 0 && sourceMapRange.end >= 0) { - emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end); - } - } - } - function skipSourceTrivia(source, pos) { - return source.skipTrivia ? source.skipTrivia(pos) : skipTrivia(source.text, pos); - } - function emitPos(pos) { - if (sourceMapsDisabled || positionIsSynthesized(pos) || isJsonSourceMapSource(sourceMapSource)) { - return; - } - const { line: sourceLine, character: sourceCharacter } = getLineAndCharacterOfPosition(sourceMapSource, pos); - sourceMapGenerator.addMapping( - writer.getLine(), - writer.getColumn(), - sourceMapSourceIndex, - sourceLine, - sourceCharacter, - /*nameIndex*/ - void 0 - ); - } - function emitSourcePos(source, pos) { - if (source !== sourceMapSource) { - const savedSourceMapSource = sourceMapSource; - const savedSourceMapSourceIndex = sourceMapSourceIndex; - setSourceMapSource(source); - emitPos(pos); - resetSourceMapSource(savedSourceMapSource, savedSourceMapSourceIndex); - } else { - emitPos(pos); - } - } - function emitTokenWithSourceMap(node, token, writer2, tokenPos, emitCallback) { - if (sourceMapsDisabled || node && isInJsonFile(node)) { - return emitCallback(token, writer2, tokenPos); - } - const emitNode = node && node.emitNode; - const emitFlags = emitNode && emitNode.flags || 0 /* None */; - const range = emitNode && emitNode.tokenSourceMapRanges && emitNode.tokenSourceMapRanges[token]; - const source = range && range.source || sourceMapSource; - tokenPos = skipSourceTrivia(source, range ? range.pos : tokenPos); - if ((emitFlags & 256 /* NoTokenLeadingSourceMaps */) === 0 && tokenPos >= 0) { - emitSourcePos(source, tokenPos); - } - tokenPos = emitCallback(token, writer2, tokenPos); - if (range) - tokenPos = range.end; - if ((emitFlags & 512 /* NoTokenTrailingSourceMaps */) === 0 && tokenPos >= 0) { - emitSourcePos(source, tokenPos); - } - return tokenPos; - } - function setSourceMapSource(source) { - if (sourceMapsDisabled) { - return; - } - sourceMapSource = source; - if (source === mostRecentlyAddedSourceMapSource) { - sourceMapSourceIndex = mostRecentlyAddedSourceMapSourceIndex; - return; - } - if (isJsonSourceMapSource(source)) { - return; - } - sourceMapSourceIndex = sourceMapGenerator.addSource(source.fileName); - if (printerOptions.inlineSources) { - sourceMapGenerator.setSourceContent(sourceMapSourceIndex, source.text); - } - mostRecentlyAddedSourceMapSource = source; - mostRecentlyAddedSourceMapSourceIndex = sourceMapSourceIndex; - } - function resetSourceMapSource(source, sourceIndex) { - sourceMapSource = source; - sourceMapSourceIndex = sourceIndex; - } - function isJsonSourceMapSource(sourceFile) { - return fileExtensionIs(sourceFile.fileName, ".json" /* Json */); - } - } - function createBracketsMap() { - const brackets2 = []; - brackets2[1024 /* Braces */] = ["{", "}"]; - brackets2[2048 /* Parenthesis */] = ["(", ")"]; - brackets2[4096 /* AngleBrackets */] = ["<", ">"]; - brackets2[8192 /* SquareBrackets */] = ["[", "]"]; - return brackets2; - } - function getOpeningBracket(format) { - return brackets[format & 15360 /* BracketsMask */][0]; - } - function getClosingBracket(format) { - return brackets[format & 15360 /* BracketsMask */][1]; - } - function emitListItemNoParenthesizer(node, emit, _parenthesizerRule, _index) { - emit(node); - } - function emitListItemWithParenthesizerRuleSelector(node, emit, parenthesizerRuleSelector, index) { - emit(node, parenthesizerRuleSelector.select(index)); - } - function emitListItemWithParenthesizerRule(node, emit, parenthesizerRule, _index) { - emit(node, parenthesizerRule); - } - function getEmitListItem(emit, parenthesizerRule) { - return emit.length === 1 ? emitListItemNoParenthesizer : typeof parenthesizerRule === "object" ? emitListItemWithParenthesizerRuleSelector : emitListItemWithParenthesizerRule; - } - var brackets, notImplementedResolver, createPrinterWithDefaults, createPrinterWithRemoveComments, createPrinterWithRemoveCommentsNeverAsciiEscape, createPrinterWithRemoveCommentsOmitTrailingSemicolon; - var init_emitter = __esm({ - "src/compiler/emitter.ts"() { - "use strict"; - init_ts2(); - init_ts2(); - init_ts_performance(); - brackets = createBracketsMap(); - notImplementedResolver = { - hasGlobalName: notImplemented, - getReferencedExportContainer: notImplemented, - getReferencedImportDeclaration: notImplemented, - getReferencedDeclarationWithCollidingName: notImplemented, - isDeclarationWithCollidingName: notImplemented, - isValueAliasDeclaration: notImplemented, - isReferencedAliasDeclaration: notImplemented, - isTopLevelValueImportEqualsWithEntityName: notImplemented, - getNodeCheckFlags: notImplemented, - isDeclarationVisible: notImplemented, - isLateBound: (_node) => false, - collectLinkedAliases: notImplemented, - isImplementationOfOverload: notImplemented, - isRequiredInitializedParameter: notImplemented, - isOptionalUninitializedParameterProperty: notImplemented, - isExpandoFunctionDeclaration: notImplemented, - getPropertiesOfContainerFunction: notImplemented, - createTypeOfDeclaration: notImplemented, - createReturnTypeOfSignatureDeclaration: notImplemented, - createTypeOfExpression: notImplemented, - createLiteralConstValue: notImplemented, - isSymbolAccessible: notImplemented, - isEntityNameVisible: notImplemented, - // Returns the constant value this property access resolves to: notImplemented, or 'undefined' for a non-constant - getConstantValue: notImplemented, - getReferencedValueDeclaration: notImplemented, - getReferencedValueDeclarations: notImplemented, - getTypeReferenceSerializationKind: notImplemented, - isOptionalParameter: notImplemented, - moduleExportsSomeValue: notImplemented, - isArgumentsLocalBinding: notImplemented, - getExternalModuleFileFromDeclaration: notImplemented, - getTypeReferenceDirectivesForEntityName: notImplemented, - getTypeReferenceDirectivesForSymbol: notImplemented, - isLiteralConstDeclaration: notImplemented, - getJsxFactoryEntity: notImplemented, - getJsxFragmentFactoryEntity: notImplemented, - getAllAccessorDeclarations: notImplemented, - getSymbolOfExternalModuleSpecifier: notImplemented, - isBindingCapturedByNode: notImplemented, - getDeclarationStatementsForSourceFile: notImplemented, - isImportRequiredByAugmentation: notImplemented - }; - createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({})); - createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true })); - createPrinterWithRemoveCommentsNeverAsciiEscape = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true, neverAsciiEscape: true })); - createPrinterWithRemoveCommentsOmitTrailingSemicolon = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true, omitTrailingSemicolon: true })); - } - }); - - // src/compiler/watchUtilities.ts - function createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2) { - if (!host.getDirectories || !host.readDirectory) { - return void 0; - } - const cachedReadDirectoryResult = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); - return { - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - fileExists, - readFile: (path, encoding) => host.readFile(path, encoding), - directoryExists: host.directoryExists && directoryExists, - getDirectories, - readDirectory, - createDirectory: host.createDirectory && createDirectory, - writeFile: host.writeFile && writeFile2, - addOrDeleteFileOrDirectory, - addOrDeleteFile, - clearCache, - realpath: host.realpath && realpath - }; - function toPath3(fileName) { - return toPath(fileName, currentDirectory, getCanonicalFileName); - } - function getCachedFileSystemEntries(rootDirPath) { - return cachedReadDirectoryResult.get(ensureTrailingDirectorySeparator(rootDirPath)); - } - function getCachedFileSystemEntriesForBaseDir(path) { - const entries = getCachedFileSystemEntries(getDirectoryPath(path)); - if (!entries) { - return entries; - } - if (!entries.sortedAndCanonicalizedFiles) { - entries.sortedAndCanonicalizedFiles = entries.files.map(getCanonicalFileName).sort(); - entries.sortedAndCanonicalizedDirectories = entries.directories.map(getCanonicalFileName).sort(); - } - return entries; - } - function getBaseNameOfFileName(fileName) { - return getBaseFileName(normalizePath(fileName)); - } - function createCachedFileSystemEntries(rootDir, rootDirPath) { - var _a; - if (!host.realpath || ensureTrailingDirectorySeparator(toPath3(host.realpath(rootDir))) === rootDirPath) { - const resultFromHost = { - files: map(host.readDirectory( - rootDir, - /*extensions*/ - void 0, - /*exclude*/ - void 0, - /*include*/ - ["*.*"] - ), getBaseNameOfFileName) || [], - directories: host.getDirectories(rootDir) || [] - }; - cachedReadDirectoryResult.set(ensureTrailingDirectorySeparator(rootDirPath), resultFromHost); - return resultFromHost; - } - if ((_a = host.directoryExists) == null ? void 0 : _a.call(host, rootDir)) { - cachedReadDirectoryResult.set(rootDirPath, false); - return false; - } - return void 0; - } - function tryReadDirectory2(rootDir, rootDirPath) { - rootDirPath = ensureTrailingDirectorySeparator(rootDirPath); - const cachedResult = getCachedFileSystemEntries(rootDirPath); - if (cachedResult) { - return cachedResult; - } - try { - return createCachedFileSystemEntries(rootDir, rootDirPath); - } catch (_e) { - Debug.assert(!cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(rootDirPath))); - return void 0; - } - } - function hasEntry(entries, name) { - const index = binarySearch(entries, name, identity, compareStringsCaseSensitive); - return index >= 0; - } - function writeFile2(fileName, data, writeByteOrderMark) { - const path = toPath3(fileName); - const result = getCachedFileSystemEntriesForBaseDir(path); - if (result) { - updateFilesOfFileSystemEntry( - result, - getBaseNameOfFileName(fileName), - /*fileExists*/ - true - ); - } - return host.writeFile(fileName, data, writeByteOrderMark); - } - function fileExists(fileName) { - const path = toPath3(fileName); - const result = getCachedFileSystemEntriesForBaseDir(path); - return result && hasEntry(result.sortedAndCanonicalizedFiles, getCanonicalFileName(getBaseNameOfFileName(fileName))) || host.fileExists(fileName); - } - function directoryExists(dirPath) { - const path = toPath3(dirPath); - return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path)) || host.directoryExists(dirPath); - } - function createDirectory(dirPath) { - const path = toPath3(dirPath); - const result = getCachedFileSystemEntriesForBaseDir(path); - if (result) { - const baseName = getBaseNameOfFileName(dirPath); - const canonicalizedBaseName = getCanonicalFileName(baseName); - const canonicalizedDirectories = result.sortedAndCanonicalizedDirectories; - if (insertSorted(canonicalizedDirectories, canonicalizedBaseName, compareStringsCaseSensitive)) { - result.directories.push(baseName); - } - } - host.createDirectory(dirPath); - } - function getDirectories(rootDir) { - const rootDirPath = toPath3(rootDir); - const result = tryReadDirectory2(rootDir, rootDirPath); - if (result) { - return result.directories.slice(); - } - return host.getDirectories(rootDir); - } - function readDirectory(rootDir, extensions, excludes, includes, depth) { - const rootDirPath = toPath3(rootDir); - const rootResult = tryReadDirectory2(rootDir, rootDirPath); - let rootSymLinkResult; - if (rootResult !== void 0) { - return matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath); - } - return host.readDirectory(rootDir, extensions, excludes, includes, depth); - function getFileSystemEntries(dir) { - const path = toPath3(dir); - if (path === rootDirPath) { - return rootResult || getFileSystemEntriesFromHost(dir, path); - } - const result = tryReadDirectory2(dir, path); - return result !== void 0 ? result || getFileSystemEntriesFromHost(dir, path) : emptyFileSystemEntries; - } - function getFileSystemEntriesFromHost(dir, path) { - if (rootSymLinkResult && path === rootDirPath) - return rootSymLinkResult; - const result = { - files: map(host.readDirectory( - dir, - /*extensions*/ - void 0, - /*exclude*/ - void 0, - /*include*/ - ["*.*"] - ), getBaseNameOfFileName) || emptyArray, - directories: host.getDirectories(dir) || emptyArray - }; - if (path === rootDirPath) - rootSymLinkResult = result; - return result; - } - } - function realpath(s) { - return host.realpath ? host.realpath(s) : s; - } - function addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath) { - const existingResult = getCachedFileSystemEntries(fileOrDirectoryPath); - if (existingResult !== void 0) { - clearCache(); - return void 0; - } - const parentResult = getCachedFileSystemEntriesForBaseDir(fileOrDirectoryPath); - if (!parentResult) { - return void 0; - } - if (!host.directoryExists) { - clearCache(); - return void 0; - } - const baseName = getBaseNameOfFileName(fileOrDirectory); - const fsQueryResult = { - fileExists: host.fileExists(fileOrDirectoryPath), - directoryExists: host.directoryExists(fileOrDirectoryPath) - }; - if (fsQueryResult.directoryExists || hasEntry(parentResult.sortedAndCanonicalizedDirectories, getCanonicalFileName(baseName))) { - clearCache(); - } else { - updateFilesOfFileSystemEntry(parentResult, baseName, fsQueryResult.fileExists); - } - return fsQueryResult; - } - function addOrDeleteFile(fileName, filePath, eventKind) { - if (eventKind === 1 /* Changed */) { - return; - } - const parentResult = getCachedFileSystemEntriesForBaseDir(filePath); - if (parentResult) { - updateFilesOfFileSystemEntry(parentResult, getBaseNameOfFileName(fileName), eventKind === 0 /* Created */); - } - } - function updateFilesOfFileSystemEntry(parentResult, baseName, fileExists2) { - const canonicalizedFiles = parentResult.sortedAndCanonicalizedFiles; - const canonicalizedBaseName = getCanonicalFileName(baseName); - if (fileExists2) { - if (insertSorted(canonicalizedFiles, canonicalizedBaseName, compareStringsCaseSensitive)) { - parentResult.files.push(baseName); - } - } else { - const sortedIndex = binarySearch(canonicalizedFiles, canonicalizedBaseName, identity, compareStringsCaseSensitive); - if (sortedIndex >= 0) { - canonicalizedFiles.splice(sortedIndex, 1); - const unsortedIndex = parentResult.files.findIndex((entry) => getCanonicalFileName(entry) === canonicalizedBaseName); - parentResult.files.splice(unsortedIndex, 1); - } - } - } - function clearCache() { - cachedReadDirectoryResult.clear(); - } - } - function updateSharedExtendedConfigFileWatcher(projectPath, options, extendedConfigFilesMap, createExtendedConfigFileWatch, toPath3) { - var _a; - const extendedConfigs = arrayToMap(((_a = options == null ? void 0 : options.configFile) == null ? void 0 : _a.extendedSourceFiles) || emptyArray, toPath3); - extendedConfigFilesMap.forEach((watcher, extendedConfigFilePath) => { - if (!extendedConfigs.has(extendedConfigFilePath)) { - watcher.projects.delete(projectPath); - watcher.close(); - } - }); - extendedConfigs.forEach((extendedConfigFileName, extendedConfigFilePath) => { - const existing = extendedConfigFilesMap.get(extendedConfigFilePath); - if (existing) { - existing.projects.add(projectPath); - } else { - extendedConfigFilesMap.set(extendedConfigFilePath, { - projects: /* @__PURE__ */ new Set([projectPath]), - watcher: createExtendedConfigFileWatch(extendedConfigFileName, extendedConfigFilePath), - close: () => { - const existing2 = extendedConfigFilesMap.get(extendedConfigFilePath); - if (!existing2 || existing2.projects.size !== 0) - return; - existing2.watcher.close(); - extendedConfigFilesMap.delete(extendedConfigFilePath); - } - }); - } - }); - } - function clearSharedExtendedConfigFileWatcher(projectPath, extendedConfigFilesMap) { - extendedConfigFilesMap.forEach((watcher) => { - if (watcher.projects.delete(projectPath)) - watcher.close(); - }); - } - function cleanExtendedConfigCache(extendedConfigCache, extendedConfigFilePath, toPath3) { - if (!extendedConfigCache.delete(extendedConfigFilePath)) - return; - extendedConfigCache.forEach(({ extendedResult }, key) => { - var _a; - if ((_a = extendedResult.extendedSourceFiles) == null ? void 0 : _a.some((extendedFile) => toPath3(extendedFile) === extendedConfigFilePath)) { - cleanExtendedConfigCache(extendedConfigCache, key, toPath3); - } - }); - } - function updatePackageJsonWatch(lookups, packageJsonWatches, createPackageJsonWatch) { - const newMap = new Map(lookups); - mutateMap( - packageJsonWatches, - newMap, - { - createNewValue: createPackageJsonWatch, - onDeleteValue: closeFileWatcher - } - ); - } - function updateMissingFilePathsWatch(program, missingFileWatches, createMissingFileWatch) { - const missingFilePaths = program.getMissingFilePaths(); - const newMissingFilePathMap = arrayToMap(missingFilePaths, identity, returnTrue); - mutateMap( - missingFileWatches, - newMissingFilePathMap, - { - // Watch the missing files - createNewValue: createMissingFileWatch, - // Files that are no longer missing (e.g. because they are no longer required) - // should no longer be watched. - onDeleteValue: closeFileWatcher - } - ); - } - function updateWatchingWildcardDirectories(existingWatchedForWildcards, wildcardDirectories, watchDirectory) { - mutateMap( - existingWatchedForWildcards, - wildcardDirectories, - { - // Create new watch and recursive info - createNewValue: createWildcardDirectoryWatcher, - // Close existing watch thats not needed any more - onDeleteValue: closeFileWatcherOf, - // Close existing watch that doesnt match in the flags - onExistingValue: updateWildcardDirectoryWatcher - } - ); - function createWildcardDirectoryWatcher(directory, flags) { - return { - watcher: watchDirectory(directory, flags), - flags - }; - } - function updateWildcardDirectoryWatcher(existingWatcher, flags, directory) { - if (existingWatcher.flags === flags) { - return; - } - existingWatcher.watcher.close(); - existingWatchedForWildcards.set(directory, createWildcardDirectoryWatcher(directory, flags)); - } - } - function isIgnoredFileFromWildCardWatching({ - watchedDirPath, - fileOrDirectory, - fileOrDirectoryPath, - configFileName, - options, - program, - extraFileExtensions, - currentDirectory, - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - writeLog, - toPath: toPath3 - }) { - const newPath = removeIgnoredPath(fileOrDirectoryPath); - if (!newPath) { - writeLog(`Project: ${configFileName} Detected ignored path: ${fileOrDirectory}`); - return true; - } - fileOrDirectoryPath = newPath; - if (fileOrDirectoryPath === watchedDirPath) - return false; - if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) { - writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`); - return true; - } - if (isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames2, currentDirectory)) { - writeLog(`Project: ${configFileName} Detected excluded file: ${fileOrDirectory}`); - return true; - } - if (!program) - return false; - if (outFile(options) || options.outDir) - return false; - if (isDeclarationFileName(fileOrDirectoryPath)) { - if (options.declarationDir) - return false; - } else if (!fileExtensionIsOneOf(fileOrDirectoryPath, supportedJSExtensionsFlat)) { - return false; - } - const filePathWithoutExtension = removeFileExtension(fileOrDirectoryPath); - const realProgram = isArray(program) ? void 0 : isBuilderProgram(program) ? program.getProgramOrUndefined() : program; - const builderProgram = !realProgram && !isArray(program) ? program : void 0; - if (hasSourceFile(filePathWithoutExtension + ".ts" /* Ts */) || hasSourceFile(filePathWithoutExtension + ".tsx" /* Tsx */)) { - writeLog(`Project: ${configFileName} Detected output file: ${fileOrDirectory}`); - return true; - } - return false; - function hasSourceFile(file) { - return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file); - } - } - function isBuilderProgram(program) { - return !!program.getState; - } - function isEmittedFileOfProgram(program, file) { - if (!program) { - return false; - } - return program.isEmittedFile(file); - } - function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo2) { - setSysLog(watchLogLevel === 2 /* Verbose */ ? log : noop); - const plainInvokeFactory = { - watchFile: (file, callback, pollingInterval, options) => host.watchFile(file, callback, pollingInterval, options), - watchDirectory: (directory, callback, flags, options) => host.watchDirectory(directory, callback, (flags & 1 /* Recursive */) !== 0, options) - }; - const triggerInvokingFactory = watchLogLevel !== 0 /* None */ ? { - watchFile: createTriggerLoggingAddWatch("watchFile"), - watchDirectory: createTriggerLoggingAddWatch("watchDirectory") - } : void 0; - const factory2 = watchLogLevel === 2 /* Verbose */ ? { - watchFile: createFileWatcherWithLogging, - watchDirectory: createDirectoryWatcherWithLogging - } : triggerInvokingFactory || plainInvokeFactory; - const excludeWatcherFactory = watchLogLevel === 2 /* Verbose */ ? createExcludeWatcherWithLogging : returnNoopFileWatcher; - return { - watchFile: createExcludeHandlingAddWatch("watchFile"), - watchDirectory: createExcludeHandlingAddWatch("watchDirectory") - }; - function createExcludeHandlingAddWatch(key) { - return (file, cb, flags, options, detailInfo1, detailInfo2) => { - var _a; - return !matchesExclude(file, key === "watchFile" ? options == null ? void 0 : options.excludeFiles : options == null ? void 0 : options.excludeDirectories, useCaseSensitiveFileNames2(), ((_a = host.getCurrentDirectory) == null ? void 0 : _a.call(host)) || "") ? factory2[key].call( - /*thisArgs*/ - void 0, - file, - cb, - flags, - options, - detailInfo1, - detailInfo2 - ) : excludeWatcherFactory(file, flags, options, detailInfo1, detailInfo2); - }; - } - function useCaseSensitiveFileNames2() { - return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames(); - } - function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) { - log(`ExcludeWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`); - return { - close: () => log(`ExcludeWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`) - }; - } - function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) { - log(`FileWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`); - const watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2); - return { - close: () => { - log(`FileWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`); - watcher.close(); - } - }; - } - function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) { - const watchInfo = `DirectoryWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`; - log(watchInfo); - const start = timestamp(); - const watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2); - const elapsed = timestamp() - start; - log(`Elapsed:: ${elapsed}ms ${watchInfo}`); - return { - close: () => { - const watchInfo2 = `DirectoryWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`; - log(watchInfo2); - const start2 = timestamp(); - watcher.close(); - const elapsed2 = timestamp() - start2; - log(`Elapsed:: ${elapsed2}ms ${watchInfo2}`); - } - }; - } - function createTriggerLoggingAddWatch(key) { - return (file, cb, flags, options, detailInfo1, detailInfo2) => plainInvokeFactory[key].call( - /*thisArgs*/ - void 0, - file, - (...args) => { - const triggerredInfo = `${key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"}:: Triggered with ${args[0]} ${args[1] !== void 0 ? args[1] : ""}:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`; - log(triggerredInfo); - const start = timestamp(); - cb.call( - /*thisArg*/ - void 0, - ...args - ); - const elapsed = timestamp() - start; - log(`Elapsed:: ${elapsed}ms ${triggerredInfo}`); - }, - flags, - options, - detailInfo1, - detailInfo2 - ); - } - function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo3) { - return `WatchInfo: ${file} ${flags} ${JSON.stringify(options)} ${getDetailWatchInfo3 ? getDetailWatchInfo3(detailInfo1, detailInfo2) : detailInfo2 === void 0 ? detailInfo1 : `${detailInfo1} ${detailInfo2}`}`; - } - } - function getFallbackOptions(options) { - const fallbackPolling = options == null ? void 0 : options.fallbackPolling; - return { - watchFile: fallbackPolling !== void 0 ? fallbackPolling : 1 /* PriorityPollingInterval */ - }; - } - function closeFileWatcherOf(objWithWatcher) { - objWithWatcher.watcher.close(); - } - var ConfigFileProgramReloadLevel, WatchLogLevel; - var init_watchUtilities = __esm({ - "src/compiler/watchUtilities.ts"() { - "use strict"; - init_ts2(); - ConfigFileProgramReloadLevel = /* @__PURE__ */ ((ConfigFileProgramReloadLevel2) => { - ConfigFileProgramReloadLevel2[ConfigFileProgramReloadLevel2["None"] = 0] = "None"; - ConfigFileProgramReloadLevel2[ConfigFileProgramReloadLevel2["Partial"] = 1] = "Partial"; - ConfigFileProgramReloadLevel2[ConfigFileProgramReloadLevel2["Full"] = 2] = "Full"; - return ConfigFileProgramReloadLevel2; - })(ConfigFileProgramReloadLevel || {}); - WatchLogLevel = /* @__PURE__ */ ((WatchLogLevel2) => { - WatchLogLevel2[WatchLogLevel2["None"] = 0] = "None"; - WatchLogLevel2[WatchLogLevel2["TriggerOnly"] = 1] = "TriggerOnly"; - WatchLogLevel2[WatchLogLevel2["Verbose"] = 2] = "Verbose"; - return WatchLogLevel2; - })(WatchLogLevel || {}); - } - }); - - // src/compiler/program.ts - function findConfigFile(searchPath, fileExists, configName = "tsconfig.json") { - return forEachAncestorDirectory(searchPath, (ancestor) => { - const fileName = combinePaths(ancestor, configName); - return fileExists(fileName) ? fileName : void 0; - }); - } - function resolveTripleslashReference(moduleName, containingFile) { - const basePath = getDirectoryPath(containingFile); - const referencedFileName = isRootedDiskPath(moduleName) ? moduleName : combinePaths(basePath, moduleName); - return normalizePath(referencedFileName); - } - function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, getCanonicalFileName) { - let commonPathComponents; - const failed = forEach(fileNames, (sourceFile) => { - const sourcePathComponents = getNormalizedPathComponents(sourceFile, currentDirectory); - sourcePathComponents.pop(); - if (!commonPathComponents) { - commonPathComponents = sourcePathComponents; - return; - } - const n = Math.min(commonPathComponents.length, sourcePathComponents.length); - for (let i = 0; i < n; i++) { - if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) { - if (i === 0) { - return true; - } - commonPathComponents.length = i; - break; - } - } - if (sourcePathComponents.length < commonPathComponents.length) { - commonPathComponents.length = sourcePathComponents.length; - } - }); - if (failed) { - return ""; - } - if (!commonPathComponents) { - return currentDirectory; - } - return getPathFromPathComponents(commonPathComponents); - } - function createCompilerHost(options, setParentNodes) { - return createCompilerHostWorker(options, setParentNodes); - } - function createGetSourceFile(readFile, getCompilerOptions, setParentNodes) { - return (fileName, languageVersionOrOptions, onError) => { - let text; - try { - mark("beforeIORead"); - text = readFile(fileName, getCompilerOptions().charset); - mark("afterIORead"); - measure("I/O Read", "beforeIORead", "afterIORead"); - } catch (e) { - if (onError) { - onError(e.message); - } - text = ""; - } - return text !== void 0 ? createSourceFile(fileName, text, languageVersionOrOptions, setParentNodes) : void 0; - }; - } - function createWriteFileMeasuringIO(actualWriteFile, createDirectory, directoryExists) { - return (fileName, data, writeByteOrderMark, onError) => { - try { - mark("beforeIOWrite"); - writeFileEnsuringDirectories( - fileName, - data, - writeByteOrderMark, - actualWriteFile, - createDirectory, - directoryExists - ); - mark("afterIOWrite"); - measure("I/O Write", "beforeIOWrite", "afterIOWrite"); - } catch (e) { - if (onError) { - onError(e.message); - } - } - }; - } - function createCompilerHostWorker(options, setParentNodes, system = sys) { - const existingDirectories = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(system.useCaseSensitiveFileNames); - function directoryExists(directoryPath) { - if (existingDirectories.has(directoryPath)) { - return true; - } - if ((compilerHost.directoryExists || system.directoryExists)(directoryPath)) { - existingDirectories.set(directoryPath, true); - return true; - } - return false; - } - function getDefaultLibLocation() { - return getDirectoryPath(normalizePath(system.getExecutingFilePath())); - } - const newLine = getNewLineCharacter(options); - const realpath = system.realpath && ((path) => system.realpath(path)); - const compilerHost = { - getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), () => options, setParentNodes), - getDefaultLibLocation, - getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)), - writeFile: createWriteFileMeasuringIO( - (path, data, writeByteOrderMark) => system.writeFile(path, data, writeByteOrderMark), - (path) => (compilerHost.createDirectory || system.createDirectory)(path), - (path) => directoryExists(path) - ), - getCurrentDirectory: memoize(() => system.getCurrentDirectory()), - useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames, - getCanonicalFileName, - getNewLine: () => newLine, - fileExists: (fileName) => system.fileExists(fileName), - readFile: (fileName) => system.readFile(fileName), - trace: (s) => system.write(s + newLine), - directoryExists: (directoryName) => system.directoryExists(directoryName), - getEnvironmentVariable: (name) => system.getEnvironmentVariable ? system.getEnvironmentVariable(name) : "", - getDirectories: (path) => system.getDirectories(path), - realpath, - readDirectory: (path, extensions, include, exclude, depth) => system.readDirectory(path, extensions, include, exclude, depth), - createDirectory: (d) => system.createDirectory(d), - createHash: maybeBind(system, system.createHash) - }; - return compilerHost; - } - function changeCompilerHostLikeToUseCache(host, toPath3, getSourceFile) { - const originalReadFile = host.readFile; - const originalFileExists = host.fileExists; - const originalDirectoryExists = host.directoryExists; - const originalCreateDirectory = host.createDirectory; - const originalWriteFile = host.writeFile; - const readFileCache = /* @__PURE__ */ new Map(); - const fileExistsCache = /* @__PURE__ */ new Map(); - const directoryExistsCache = /* @__PURE__ */ new Map(); - const sourceFileCache = /* @__PURE__ */ new Map(); - const readFileWithCache = (fileName) => { - const key = toPath3(fileName); - const value = readFileCache.get(key); - if (value !== void 0) - return value !== false ? value : void 0; - return setReadFileCache(key, fileName); - }; - const setReadFileCache = (key, fileName) => { - const newValue = originalReadFile.call(host, fileName); - readFileCache.set(key, newValue !== void 0 ? newValue : false); - return newValue; - }; - host.readFile = (fileName) => { - const key = toPath3(fileName); - const value = readFileCache.get(key); - if (value !== void 0) - return value !== false ? value : void 0; - if (!fileExtensionIs(fileName, ".json" /* Json */) && !isBuildInfoFile(fileName)) { - return originalReadFile.call(host, fileName); - } - return setReadFileCache(key, fileName); - }; - const getSourceFileWithCache = getSourceFile ? (fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) => { - const key = toPath3(fileName); - const impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : void 0; - const forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat); - const value = forImpliedNodeFormat == null ? void 0 : forImpliedNodeFormat.get(key); - if (value) - return value; - const sourceFile = getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile); - if (sourceFile && (isDeclarationFileName(fileName) || fileExtensionIs(fileName, ".json" /* Json */))) { - sourceFileCache.set(impliedNodeFormat, (forImpliedNodeFormat || /* @__PURE__ */ new Map()).set(key, sourceFile)); - } - return sourceFile; - } : void 0; - host.fileExists = (fileName) => { - const key = toPath3(fileName); - const value = fileExistsCache.get(key); - if (value !== void 0) - return value; - const newValue = originalFileExists.call(host, fileName); - fileExistsCache.set(key, !!newValue); - return newValue; - }; - if (originalWriteFile) { - host.writeFile = (fileName, data, ...rest) => { - const key = toPath3(fileName); - fileExistsCache.delete(key); - const value = readFileCache.get(key); - if (value !== void 0 && value !== data) { - readFileCache.delete(key); - sourceFileCache.forEach((map2) => map2.delete(key)); - } else if (getSourceFileWithCache) { - sourceFileCache.forEach((map2) => { - const sourceFile = map2.get(key); - if (sourceFile && sourceFile.text !== data) { - map2.delete(key); - } - }); - } - originalWriteFile.call(host, fileName, data, ...rest); - }; - } - if (originalDirectoryExists) { - host.directoryExists = (directory) => { - const key = toPath3(directory); - const value = directoryExistsCache.get(key); - if (value !== void 0) - return value; - const newValue = originalDirectoryExists.call(host, directory); - directoryExistsCache.set(key, !!newValue); - return newValue; - }; - if (originalCreateDirectory) { - host.createDirectory = (directory) => { - const key = toPath3(directory); - directoryExistsCache.delete(key); - originalCreateDirectory.call(host, directory); - }; - } - } - return { - originalReadFile, - originalFileExists, - originalDirectoryExists, - originalCreateDirectory, - originalWriteFile, - getSourceFileWithCache, - readFileWithCache - }; - } - function getPreEmitDiagnostics(program, sourceFile, cancellationToken) { - let diagnostics; - diagnostics = addRange(diagnostics, program.getConfigFileParsingDiagnostics()); - diagnostics = addRange(diagnostics, program.getOptionsDiagnostics(cancellationToken)); - diagnostics = addRange(diagnostics, program.getSyntacticDiagnostics(sourceFile, cancellationToken)); - diagnostics = addRange(diagnostics, program.getGlobalDiagnostics(cancellationToken)); - diagnostics = addRange(diagnostics, program.getSemanticDiagnostics(sourceFile, cancellationToken)); - if (getEmitDeclarations(program.getCompilerOptions())) { - diagnostics = addRange(diagnostics, program.getDeclarationDiagnostics(sourceFile, cancellationToken)); - } - return sortAndDeduplicateDiagnostics(diagnostics || emptyArray); - } - function formatDiagnostics(diagnostics, host) { - let output = ""; - for (const diagnostic of diagnostics) { - output += formatDiagnostic(diagnostic, host); - } - return output; - } - function formatDiagnostic(diagnostic, host) { - const errorMessage = `${diagnosticCategoryName(diagnostic)} TS${diagnostic.code}: ${flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())}${host.getNewLine()}`; - if (diagnostic.file) { - const { line, character } = getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start); - const fileName = diagnostic.file.fileName; - const relativeFileName = convertToRelativePath(fileName, host.getCurrentDirectory(), (fileName2) => host.getCanonicalFileName(fileName2)); - return `${relativeFileName}(${line + 1},${character + 1}): ` + errorMessage; - } - return errorMessage; - } - function getCategoryFormat(category) { - switch (category) { - case 1 /* Error */: - return "\x1B[91m" /* Red */; - case 0 /* Warning */: - return "\x1B[93m" /* Yellow */; - case 2 /* Suggestion */: - return Debug.fail("Should never get an Info diagnostic on the command line."); - case 3 /* Message */: - return "\x1B[94m" /* Blue */; - } - } - function formatColorAndReset(text, formatStyle) { - return formatStyle + text + resetEscapeSequence; - } - function formatCodeSpan(file, start, length2, indent3, squiggleColor, host) { - const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start); - const { line: lastLine, character: lastLineChar } = getLineAndCharacterOfPosition(file, start + length2); - const lastLineInFile = getLineAndCharacterOfPosition(file, file.text.length).line; - const hasMoreThanFiveLines = lastLine - firstLine >= 4; - let gutterWidth = (lastLine + 1 + "").length; - if (hasMoreThanFiveLines) { - gutterWidth = Math.max(ellipsis.length, gutterWidth); - } - let context = ""; - for (let i = firstLine; i <= lastLine; i++) { - context += host.getNewLine(); - if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent3 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); - i = lastLine - 1; - } - const lineStart = getPositionOfLineAndCharacter(file, i, 0); - const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length; - let lineContent = file.text.slice(lineStart, lineEnd); - lineContent = trimStringEnd(lineContent); - lineContent = lineContent.replace(/\t/g, " "); - context += indent3 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; - context += lineContent + host.getNewLine(); - context += indent3 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; - context += squiggleColor; - if (i === firstLine) { - const lastCharForLine = i === lastLine ? lastLineChar : void 0; - context += lineContent.slice(0, firstLineChar).replace(/\S/g, " "); - context += lineContent.slice(firstLineChar, lastCharForLine).replace(/./g, "~"); - } else if (i === lastLine) { - context += lineContent.slice(0, lastLineChar).replace(/./g, "~"); - } else { - context += lineContent.replace(/./g, "~"); - } - context += resetEscapeSequence; - } - return context; - } - function formatLocation(file, start, host, color = formatColorAndReset) { - const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start); - const relativeFileName = host ? convertToRelativePath(file.fileName, host.getCurrentDirectory(), (fileName) => host.getCanonicalFileName(fileName)) : file.fileName; - let output = ""; - output += color(relativeFileName, "\x1B[96m" /* Cyan */); - output += ":"; - output += color(`${firstLine + 1}`, "\x1B[93m" /* Yellow */); - output += ":"; - output += color(`${firstLineChar + 1}`, "\x1B[93m" /* Yellow */); - return output; - } - function formatDiagnosticsWithColorAndContext(diagnostics, host) { - let output = ""; - for (const diagnostic of diagnostics) { - if (diagnostic.file) { - const { file, start } = diagnostic; - output += formatLocation(file, start, host); - output += " - "; - } - output += formatColorAndReset(diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category)); - output += formatColorAndReset(` TS${diagnostic.code}: `, "\x1B[90m" /* Grey */); - output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine()); - if (diagnostic.file && diagnostic.code !== Diagnostics.File_appears_to_be_binary.code) { - output += host.getNewLine(); - output += formatCodeSpan(diagnostic.file, diagnostic.start, diagnostic.length, "", getCategoryFormat(diagnostic.category), host); - } - if (diagnostic.relatedInformation) { - output += host.getNewLine(); - for (const { file, start, length: length2, messageText } of diagnostic.relatedInformation) { - if (file) { - output += host.getNewLine(); - output += halfIndent + formatLocation(file, start, host); - output += formatCodeSpan(file, start, length2, indent, "\x1B[96m" /* Cyan */, host); - } - output += host.getNewLine(); - output += indent + flattenDiagnosticMessageText(messageText, host.getNewLine()); - } - } - output += host.getNewLine(); - } - return output; - } - function flattenDiagnosticMessageText(diag2, newLine, indent3 = 0) { - if (isString(diag2)) { - return diag2; - } else if (diag2 === void 0) { - return ""; - } - let result = ""; - if (indent3) { - result += newLine; - for (let i = 0; i < indent3; i++) { - result += " "; - } - } - result += diag2.messageText; - indent3++; - if (diag2.next) { - for (const kid of diag2.next) { - result += flattenDiagnosticMessageText(kid, newLine, indent3); - } - } - return result; - } - function getModeForFileReference(ref, containingFileMode) { - return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode; - } - function getModeForResolutionAtIndex(file, index) { - if (file.impliedNodeFormat === void 0) - return void 0; - return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index)); - } - function isExclusivelyTypeOnlyImportOrExport(decl) { - var _a; - if (isExportDeclaration(decl)) { - return decl.isTypeOnly; - } - if ((_a = decl.importClause) == null ? void 0 : _a.isTypeOnly) { - return true; - } - return false; - } - function getModeForUsageLocation(file, usage) { - var _a, _b; - if (file.impliedNodeFormat === void 0) - return void 0; - if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent)) { - const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent); - if (isTypeOnly) { - const override = getResolutionModeOverrideForClause(usage.parent.assertClause); - if (override) { - return override; - } - } - } - if (usage.parent.parent && isImportTypeNode(usage.parent.parent)) { - const override = getResolutionModeOverrideForClause((_a = usage.parent.parent.assertions) == null ? void 0 : _a.assertClause); - if (override) { - return override; - } - } - if (file.impliedNodeFormat !== 99 /* ESNext */) { - return isImportCall(walkUpParenthesizedExpressions(usage.parent)) ? 99 /* ESNext */ : 1 /* CommonJS */; - } - const exprParentParent = (_b = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _b.parent; - return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? 1 /* CommonJS */ : 99 /* ESNext */; - } - function getResolutionModeOverrideForClause(clause, grammarErrorOnNode) { - if (!clause) - return void 0; - if (length(clause.elements) !== 1) { - grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(clause, Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require); - return void 0; - } - const elem = clause.elements[0]; - if (!isStringLiteralLike(elem.name)) - return void 0; - if (elem.name.text !== "resolution-mode") { - grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(elem.name, Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions); - return void 0; - } - if (!isStringLiteralLike(elem.value)) - return void 0; - if (elem.value.text !== "import" && elem.value.text !== "require") { - grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(elem.value, Diagnostics.resolution_mode_should_be_either_require_or_import); - return void 0; - } - return elem.value.text === "import" ? 99 /* ESNext */ : 1 /* CommonJS */; - } - function getModuleResolutionName(literal) { - return literal.text; - } - function createModuleResolutionLoader(containingFile, redirectedReference, options, host, cache) { - return { - nameAndMode: moduleResolutionNameAndModeGetter, - resolve: (moduleName, resolutionMode) => resolveModuleName( - moduleName, - containingFile, - options, - host, - cache, - redirectedReference, - resolutionMode - ) - }; - } - function getTypeReferenceResolutionName(entry) { - return !isString(entry) ? toFileNameLowerCase(entry.fileName) : entry; - } - function createTypeReferenceResolutionLoader(containingFile, redirectedReference, options, host, cache) { - return { - nameAndMode: typeReferenceResolutionNameAndModeGetter, - resolve: (typeRef, resoluionMode) => resolveTypeReferenceDirective( - typeRef, - containingFile, - options, - host, - redirectedReference, - cache, - resoluionMode - ) - }; - } - function loadWithModeAwareCache(entries, containingFile, redirectedReference, options, containingSourceFile, host, resolutionCache, createLoader) { - if (entries.length === 0) - return emptyArray; - const resolutions = []; - const cache = /* @__PURE__ */ new Map(); - const loader = createLoader(containingFile, redirectedReference, options, host, resolutionCache); - for (const entry of entries) { - const name = loader.nameAndMode.getName(entry); - const mode = loader.nameAndMode.getMode(entry, containingSourceFile); - const key = createModeAwareCacheKey(name, mode); - let result = cache.get(key); - if (!result) { - cache.set(key, result = loader.resolve(name, mode)); - } - resolutions.push(result); - } - return resolutions; - } - function forEachResolvedProjectReference(resolvedProjectReferences, cb) { - return forEachProjectReference( - /*projectReferences*/ - void 0, - resolvedProjectReferences, - (resolvedRef, parent2) => resolvedRef && cb(resolvedRef, parent2) - ); - } - function forEachProjectReference(projectReferences, resolvedProjectReferences, cbResolvedRef, cbRef) { - let seenResolvedRefs; - return worker( - projectReferences, - resolvedProjectReferences, - /*parent*/ - void 0 - ); - function worker(projectReferences2, resolvedProjectReferences2, parent2) { - if (cbRef) { - const result = cbRef(projectReferences2, parent2); - if (result) - return result; - } - return forEach(resolvedProjectReferences2, (resolvedRef, index) => { - if (resolvedRef && (seenResolvedRefs == null ? void 0 : seenResolvedRefs.has(resolvedRef.sourceFile.path))) { - return void 0; - } - const result = cbResolvedRef(resolvedRef, parent2, index); - if (result || !resolvedRef) - return result; - (seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Set())).add(resolvedRef.sourceFile.path); - return worker(resolvedRef.commandLine.projectReferences, resolvedRef.references, resolvedRef); - }); - } - } - function getInferredLibraryNameResolveFrom(options, currentDirectory, libFileName) { - const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory; - return combinePaths(containingDirectory, `__lib_node_modules_lookup_${libFileName}__.ts`); - } - function getLibraryNameFromLibFileName(libFileName) { - const components = libFileName.split("."); - let path = components[1]; - let i = 2; - while (components[i] && components[i] !== "d") { - path += (i === 2 ? "/" : "-") + components[i]; - i++; - } - return "@typescript/lib-" + path; - } - function getLibFileNameFromLibReference(libReference) { - const libName = toFileNameLowerCase(libReference.fileName); - const libFileName = libMap.get(libName); - return { libName, libFileName }; - } - function isReferencedFile(reason) { - switch (reason == null ? void 0 : reason.kind) { - case 3 /* Import */: - case 4 /* ReferenceFile */: - case 5 /* TypeReferenceDirective */: - case 7 /* LibReferenceDirective */: - return true; - default: - return false; - } - } - function isReferenceFileLocation(location) { - return location.pos !== void 0; - } - function getReferencedFileLocation(getSourceFileByPath, ref) { - var _a, _b, _c, _d, _e, _f; - const file = Debug.checkDefined(getSourceFileByPath(ref.file)); - const { kind, index } = ref; - let pos, end, packageId, resolutionMode; - switch (kind) { - case 3 /* Import */: - const importLiteral = getModuleNameStringLiteralAt(file, index); - packageId = (_c = (_b = (_a = file.resolvedModules) == null ? void 0 : _a.get(importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.packageId; - if (importLiteral.pos === -1) - return { file, packageId, text: importLiteral.text }; - pos = skipTrivia(file.text, importLiteral.pos); - end = importLiteral.end; - break; - case 4 /* ReferenceFile */: - ({ pos, end } = file.referencedFiles[index]); - break; - case 5 /* TypeReferenceDirective */: - ({ pos, end, resolutionMode } = file.typeReferenceDirectives[index]); - packageId = (_f = (_e = (_d = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _d.get(toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _e.resolvedTypeReferenceDirective) == null ? void 0 : _f.packageId; - break; - case 7 /* LibReferenceDirective */: - ({ pos, end } = file.libReferenceDirectives[index]); - break; - default: - return Debug.assertNever(kind); - } - return { file, pos, end, packageId }; - } - function isProgramUptoDate(program, rootFileNames, newOptions, getSourceVersion, fileExists, hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences) { - if (!program || (hasChangedAutomaticTypeDirectiveNames == null ? void 0 : hasChangedAutomaticTypeDirectiveNames())) - return false; - if (!arrayIsEqualTo(program.getRootFileNames(), rootFileNames)) - return false; - let seenResolvedRefs; - if (!arrayIsEqualTo(program.getProjectReferences(), projectReferences, projectReferenceUptoDate)) - return false; - if (program.getSourceFiles().some(sourceFileNotUptoDate)) - return false; - if (program.getMissingFilePaths().some(fileExists)) - return false; - const currentOptions = program.getCompilerOptions(); - if (!compareDataObjects(currentOptions, newOptions)) - return false; - if (program.resolvedLibReferences && forEachEntry(program.resolvedLibReferences, (_value, libFileName) => hasInvalidatedLibResolutions(libFileName))) - return false; - if (currentOptions.configFile && newOptions.configFile) - return currentOptions.configFile.text === newOptions.configFile.text; - return true; - function sourceFileNotUptoDate(sourceFile) { - return !sourceFileVersionUptoDate(sourceFile) || hasInvalidatedResolutions(sourceFile.path); - } - function sourceFileVersionUptoDate(sourceFile) { - return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName); - } - function projectReferenceUptoDate(oldRef, newRef, index) { - return projectReferenceIsEqualTo(oldRef, newRef) && resolvedProjectReferenceUptoDate(program.getResolvedProjectReferences()[index], oldRef); - } - function resolvedProjectReferenceUptoDate(oldResolvedRef, oldRef) { - if (oldResolvedRef) { - if (contains(seenResolvedRefs, oldResolvedRef)) - return true; - const refPath2 = resolveProjectReferencePath(oldRef); - const newParsedCommandLine = getParsedCommandLine(refPath2); - if (!newParsedCommandLine) - return false; - if (oldResolvedRef.commandLine.options.configFile !== newParsedCommandLine.options.configFile) - return false; - if (!arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newParsedCommandLine.fileNames)) - return false; - (seenResolvedRefs || (seenResolvedRefs = [])).push(oldResolvedRef); - return !forEach(oldResolvedRef.references, (childResolvedRef, index) => !resolvedProjectReferenceUptoDate(childResolvedRef, oldResolvedRef.commandLine.projectReferences[index])); - } - const refPath = resolveProjectReferencePath(oldRef); - return !getParsedCommandLine(refPath); - } - } - function getConfigFileParsingDiagnostics(configFileParseResult) { - return configFileParseResult.options.configFile ? [...configFileParseResult.options.configFile.parseDiagnostics, ...configFileParseResult.errors] : configFileParseResult.errors; - } - function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, options) { - const result = getImpliedNodeFormatForFileWorker(fileName, packageJsonInfoCache, host, options); - return typeof result === "object" ? result.impliedNodeFormat : result; - } - function getImpliedNodeFormatForFileWorker(fileName, packageJsonInfoCache, host, options) { - switch (getEmitModuleResolutionKind(options)) { - case 3 /* Node16 */: - case 99 /* NodeNext */: - return fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".mjs" /* Mjs */]) ? 99 /* ESNext */ : fileExtensionIsOneOf(fileName, [".d.cts" /* Dcts */, ".cts" /* Cts */, ".cjs" /* Cjs */]) ? 1 /* CommonJS */ : fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */]) ? lookupFromPackageJson() : void 0; - default: - return void 0; - } - function lookupFromPackageJson() { - const state = getTemporaryModuleResolutionState(packageJsonInfoCache, host, options); - const packageJsonLocations = []; - state.failedLookupLocations = packageJsonLocations; - state.affectingLocations = packageJsonLocations; - const packageJsonScope = getPackageScopeForPath(fileName, state); - const impliedNodeFormat = (packageJsonScope == null ? void 0 : packageJsonScope.contents.packageJsonContent.type) === "module" ? 99 /* ESNext */ : 1 /* CommonJS */; - return { impliedNodeFormat, packageJsonLocations, packageJsonScope }; - } - } - function shouldProgramCreateNewSourceFiles(program, newOptions) { - if (!program) - return false; - return optionsHaveChanges(program.getCompilerOptions(), newOptions, sourceFileAffectingCompilerOptions); - } - function createCreateProgramOptions(rootNames, options, host, oldProgram, configFileParsingDiagnostics, typeScriptVersion3) { - return { - rootNames, - options, - host, - oldProgram, - configFileParsingDiagnostics, - typeScriptVersion: typeScriptVersion3 - }; - } - function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p; - const createProgramOptions = isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions; - const { rootNames, options, configFileParsingDiagnostics, projectReferences, typeScriptVersion: typeScriptVersion3 } = createProgramOptions; - let { oldProgram } = createProgramOptions; - const reportInvalidIgnoreDeprecations = memoize(() => createOptionValueDiagnostic("ignoreDeprecations", Diagnostics.Invalid_value_for_ignoreDeprecations)); - let processingDefaultLibFiles; - let processingOtherFiles; - let files; - let symlinks; - let commonSourceDirectory; - let typeChecker; - let classifiableNames; - const ambientModuleNameToUnmodifiedFileName = /* @__PURE__ */ new Map(); - let fileReasons = createMultiMap(); - const cachedBindAndCheckDiagnosticsForFile = {}; - const cachedDeclarationDiagnosticsForFile = {}; - let resolvedTypeReferenceDirectives = createModeAwareCache(); - let fileProcessingDiagnostics; - let automaticTypeDirectiveNames; - let automaticTypeDirectiveResolutions; - let resolvedLibReferences; - let resolvedLibProcessing; - let packageMap; - const maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0; - let currentNodeModulesDepth = 0; - const modulesWithElidedImports = /* @__PURE__ */ new Map(); - const sourceFilesFoundSearchingNodeModules = /* @__PURE__ */ new Map(); - (_a = tracing) == null ? void 0 : _a.push( - tracing.Phase.Program, - "createProgram", - { configFilePath: options.configFilePath, rootDir: options.rootDir }, - /*separateBeginAndEnd*/ - true - ); - mark("beforeProgram"); - const host = createProgramOptions.host || createCompilerHost(options); - const configParsingHost = parseConfigHostFromCompilerHostLike(host); - let skipDefaultLib = options.noLib; - const getDefaultLibraryFileName = memoize(() => host.getDefaultLibFileName(options)); - const defaultLibraryPath = host.getDefaultLibLocation ? host.getDefaultLibLocation() : getDirectoryPath(getDefaultLibraryFileName()); - const programDiagnostics = createDiagnosticCollection(); - const currentDirectory = host.getCurrentDirectory(); - const supportedExtensions = getSupportedExtensions(options); - const supportedExtensionsWithJsonIfResolveJsonModule = getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions); - const hasEmitBlockingDiagnostics = /* @__PURE__ */ new Map(); - let _compilerOptionsObjectLiteralSyntax; - let moduleResolutionCache; - let actualResolveModuleNamesWorker; - const hasInvalidatedResolutions = host.hasInvalidatedResolutions || returnFalse; - if (host.resolveModuleNameLiterals) { - actualResolveModuleNamesWorker = host.resolveModuleNameLiterals.bind(host); - moduleResolutionCache = (_b = host.getModuleResolutionCache) == null ? void 0 : _b.call(host); - } else if (host.resolveModuleNames) { - actualResolveModuleNamesWorker = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile, reusedNames) => host.resolveModuleNames( - moduleNames.map(getModuleResolutionName), - containingFile, - reusedNames == null ? void 0 : reusedNames.map(getModuleResolutionName), - redirectedReference, - options2, - containingSourceFile - ).map( - (resolved) => resolved ? resolved.extension !== void 0 ? { resolvedModule: resolved } : ( - // An older host may have omitted extension, in which case we should infer it from the file extension of resolvedFileName. - { resolvedModule: { ...resolved, extension: extensionFromPath(resolved.resolvedFileName) } } - ) : emptyResolution - ); - moduleResolutionCache = (_c = host.getModuleResolutionCache) == null ? void 0 : _c.call(host); - } else { - moduleResolutionCache = createModuleResolutionCache(currentDirectory, getCanonicalFileName, options); - actualResolveModuleNamesWorker = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( - moduleNames, - containingFile, - redirectedReference, - options2, - containingSourceFile, - host, - moduleResolutionCache, - createModuleResolutionLoader - ); - } - let actualResolveTypeReferenceDirectiveNamesWorker; - if (host.resolveTypeReferenceDirectiveReferences) { - actualResolveTypeReferenceDirectiveNamesWorker = host.resolveTypeReferenceDirectiveReferences.bind(host); - } else if (host.resolveTypeReferenceDirectives) { - actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => host.resolveTypeReferenceDirectives( - typeDirectiveNames.map(getTypeReferenceResolutionName), - containingFile, - redirectedReference, - options2, - containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat - ).map((resolvedTypeReferenceDirective) => ({ resolvedTypeReferenceDirective })); - } else { - const typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache( - currentDirectory, - getCanonicalFileName, - /*options*/ - void 0, - moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache() - ); - actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( - typeDirectiveNames, - containingFile, - redirectedReference, - options2, - containingSourceFile, - host, - typeReferenceDirectiveResolutionCache, - createTypeReferenceResolutionLoader - ); - } - const hasInvalidatedLibResolutions = host.hasInvalidatedLibResolutions || returnFalse; - let actualResolveLibrary; - if (host.resolveLibrary) { - actualResolveLibrary = host.resolveLibrary.bind(host); - } else { - const libraryResolutionCache = createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache()); - actualResolveLibrary = (libraryName, resolveFrom, options2) => resolveLibrary(libraryName, resolveFrom, options2, host, libraryResolutionCache); - } - const packageIdToSourceFile = /* @__PURE__ */ new Map(); - let sourceFileToPackageName = /* @__PURE__ */ new Map(); - let redirectTargetsMap = createMultiMap(); - let usesUriStyleNodeCoreModules = false; - const filesByName = /* @__PURE__ */ new Map(); - let missingFilePaths; - const filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? /* @__PURE__ */ new Map() : void 0; - let resolvedProjectReferences; - let projectReferenceRedirects; - let mapFromFileToProjectReferenceRedirects; - let mapFromToProjectReferenceRedirectSource; - const useSourceOfProjectReferenceRedirect = !!((_d = host.useSourceOfProjectReferenceRedirect) == null ? void 0 : _d.call(host)) && !options.disableSourceOfProjectReferenceRedirect; - const { onProgramCreateComplete, fileExists, directoryExists } = updateHostForUseSourceOfProjectReferenceRedirect({ - compilerHost: host, - getSymlinkCache, - useSourceOfProjectReferenceRedirect, - toPath: toPath3, - getResolvedProjectReferences, - getSourceOfProjectReferenceRedirect, - forEachResolvedProjectReference: forEachResolvedProjectReference2 - }); - const readFile = host.readFile.bind(host); - (_e = tracing) == null ? void 0 : _e.push(tracing.Phase.Program, "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!oldProgram }); - const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options); - (_f = tracing) == null ? void 0 : _f.pop(); - let structureIsReused; - (_g = tracing) == null ? void 0 : _g.push(tracing.Phase.Program, "tryReuseStructureFromOldProgram", {}); - structureIsReused = tryReuseStructureFromOldProgram(); - (_h = tracing) == null ? void 0 : _h.pop(); - if (structureIsReused !== 2 /* Completely */) { - processingDefaultLibFiles = []; - processingOtherFiles = []; - if (projectReferences) { - if (!resolvedProjectReferences) { - resolvedProjectReferences = projectReferences.map(parseProjectReferenceConfigFile); - } - if (rootNames.length) { - resolvedProjectReferences == null ? void 0 : resolvedProjectReferences.forEach((parsedRef, index) => { - if (!parsedRef) - return; - const out = outFile(parsedRef.commandLine.options); - if (useSourceOfProjectReferenceRedirect) { - if (out || getEmitModuleKind(parsedRef.commandLine.options) === 0 /* None */) { - for (const fileName of parsedRef.commandLine.fileNames) { - processProjectReferenceFile(fileName, { kind: 1 /* SourceFromProjectReference */, index }); - } - } - } else { - if (out) { - processProjectReferenceFile(changeExtension(out, ".d.ts"), { kind: 2 /* OutputFromProjectReference */, index }); - } else if (getEmitModuleKind(parsedRef.commandLine.options) === 0 /* None */) { - const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(parsedRef.commandLine, !host.useCaseSensitiveFileNames())); - for (const fileName of parsedRef.commandLine.fileNames) { - if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) { - processProjectReferenceFile(getOutputDeclarationFileName(fileName, parsedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3), { kind: 2 /* OutputFromProjectReference */, index }); - } - } - } - } - }); - } - } - (_i = tracing) == null ? void 0 : _i.push(tracing.Phase.Program, "processRootFiles", { count: rootNames.length }); - forEach(rootNames, (name, index) => processRootFile( - name, - /*isDefaultLib*/ - false, - /*ignoreNoDefaultLib*/ - false, - { kind: 0 /* RootFile */, index } - )); - (_j = tracing) == null ? void 0 : _j.pop(); - automaticTypeDirectiveNames ?? (automaticTypeDirectiveNames = rootNames.length ? getAutomaticTypeDirectiveNames(options, host) : emptyArray); - automaticTypeDirectiveResolutions = createModeAwareCache(); - if (automaticTypeDirectiveNames.length) { - (_k = tracing) == null ? void 0 : _k.push(tracing.Phase.Program, "processTypeReferences", { count: automaticTypeDirectiveNames.length }); - const containingDirectory = options.configFilePath ? getDirectoryPath(options.configFilePath) : currentDirectory; - const containingFilename = combinePaths(containingDirectory, inferredTypesContainingFile); - const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(automaticTypeDirectiveNames, containingFilename); - for (let i = 0; i < automaticTypeDirectiveNames.length; i++) { - automaticTypeDirectiveResolutions.set( - automaticTypeDirectiveNames[i], - /*mode*/ - void 0, - resolutions[i] - ); - processTypeReferenceDirective( - automaticTypeDirectiveNames[i], - /*mode*/ - void 0, - resolutions[i], - { - kind: 8 /* AutomaticTypeDirectiveFile */, - typeReference: automaticTypeDirectiveNames[i], - packageId: (_m = (_l = resolutions[i]) == null ? void 0 : _l.resolvedTypeReferenceDirective) == null ? void 0 : _m.packageId - } - ); - } - (_n = tracing) == null ? void 0 : _n.pop(); - } - if (rootNames.length && !skipDefaultLib) { - const defaultLibraryFileName = getDefaultLibraryFileName(); - if (!options.lib && defaultLibraryFileName) { - processRootFile( - defaultLibraryFileName, - /*isDefaultLib*/ - true, - /*ignoreNoDefaultLib*/ - false, - { kind: 6 /* LibFile */ } - ); - } else { - forEach(options.lib, (libFileName, index) => { - processRootFile( - pathForLibFile(libFileName), - /*isDefaultLib*/ - true, - /*ignoreNoDefaultLib*/ - false, - { kind: 6 /* LibFile */, index } - ); - }); - } - } - missingFilePaths = arrayFrom(mapDefinedIterator(filesByName.entries(), ([path, file]) => file === void 0 ? path : void 0)); - files = stableSort(processingDefaultLibFiles, compareDefaultLibFiles).concat(processingOtherFiles); - processingDefaultLibFiles = void 0; - processingOtherFiles = void 0; - } - Debug.assert(!!missingFilePaths); - if (oldProgram && host.onReleaseOldSourceFile) { - const oldSourceFiles = oldProgram.getSourceFiles(); - for (const oldSourceFile of oldSourceFiles) { - const newFile = getSourceFileByPath(oldSourceFile.resolvedPath); - if (shouldCreateNewSourceFile || !newFile || newFile.impliedNodeFormat !== oldSourceFile.impliedNodeFormat || // old file wasn't redirect but new file is - oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path) { - host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); - } - } - if (!host.getParsedCommandLine) { - oldProgram.forEachResolvedProjectReference((resolvedProjectReference) => { - if (!getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) { - host.onReleaseOldSourceFile( - resolvedProjectReference.sourceFile, - oldProgram.getCompilerOptions(), - /*hasSourceFileByPath*/ - false - ); - } - }); - } - } - if (oldProgram && host.onReleaseParsedCommandLine) { - forEachProjectReference( - oldProgram.getProjectReferences(), - oldProgram.getResolvedProjectReferences(), - (oldResolvedRef, parent2, index) => { - const oldReference = (parent2 == null ? void 0 : parent2.commandLine.projectReferences[index]) || oldProgram.getProjectReferences()[index]; - const oldRefPath = resolveProjectReferencePath(oldReference); - if (!(projectReferenceRedirects == null ? void 0 : projectReferenceRedirects.has(toPath3(oldRefPath)))) { - host.onReleaseParsedCommandLine(oldRefPath, oldResolvedRef, oldProgram.getCompilerOptions()); - } - } - ); - } - oldProgram = void 0; - resolvedLibProcessing = void 0; - const program = { - getRootFileNames: () => rootNames, - getSourceFile, - getSourceFileByPath, - getSourceFiles: () => files, - getMissingFilePaths: () => missingFilePaths, - // TODO: GH#18217 - getModuleResolutionCache: () => moduleResolutionCache, - getFilesByNameMap: () => filesByName, - getCompilerOptions: () => options, - getSyntacticDiagnostics, - getOptionsDiagnostics, - getGlobalDiagnostics, - getSemanticDiagnostics, - getCachedSemanticDiagnostics, - getSuggestionDiagnostics, - getDeclarationDiagnostics: getDeclarationDiagnostics2, - getBindAndCheckDiagnostics, - getProgramDiagnostics, - getTypeChecker, - getClassifiableNames, - getCommonSourceDirectory: getCommonSourceDirectory2, - emit, - getCurrentDirectory: () => currentDirectory, - getNodeCount: () => getTypeChecker().getNodeCount(), - getIdentifierCount: () => getTypeChecker().getIdentifierCount(), - getSymbolCount: () => getTypeChecker().getSymbolCount(), - getTypeCount: () => getTypeChecker().getTypeCount(), - getInstantiationCount: () => getTypeChecker().getInstantiationCount(), - getRelationCacheSizes: () => getTypeChecker().getRelationCacheSizes(), - getFileProcessingDiagnostics: () => fileProcessingDiagnostics, - getResolvedTypeReferenceDirectives: () => resolvedTypeReferenceDirectives, - getAutomaticTypeDirectiveNames: () => automaticTypeDirectiveNames, - getAutomaticTypeDirectiveResolutions: () => automaticTypeDirectiveResolutions, - isSourceFileFromExternalLibrary, - isSourceFileDefaultLibrary, - getSourceFileFromReference, - getLibFileFromReference, - sourceFileToPackageName, - redirectTargetsMap, - usesUriStyleNodeCoreModules, - resolvedLibReferences, - getCurrentPackagesMap: () => packageMap, - typesPackageExists, - packageBundlesTypes, - isEmittedFile, - getConfigFileParsingDiagnostics: getConfigFileParsingDiagnostics2, - getProjectReferences, - getResolvedProjectReferences, - getProjectReferenceRedirect, - getResolvedProjectReferenceToRedirect, - getResolvedProjectReferenceByPath, - forEachResolvedProjectReference: forEachResolvedProjectReference2, - isSourceOfProjectReferenceRedirect, - emitBuildInfo, - fileExists, - readFile, - directoryExists, - getSymlinkCache, - realpath: (_o = host.realpath) == null ? void 0 : _o.bind(host), - useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(), - getCanonicalFileName, - getFileIncludeReasons: () => fileReasons, - structureIsReused, - writeFile: writeFile2 - }; - onProgramCreateComplete(); - fileProcessingDiagnostics == null ? void 0 : fileProcessingDiagnostics.forEach((diagnostic) => { - switch (diagnostic.kind) { - case 1 /* FilePreprocessingFileExplainingDiagnostic */: - return programDiagnostics.add(createDiagnosticExplainingFile(diagnostic.file && getSourceFileByPath(diagnostic.file), diagnostic.fileProcessingReason, diagnostic.diagnostic, diagnostic.args || emptyArray)); - case 0 /* FilePreprocessingReferencedDiagnostic */: - const { file, pos, end } = getReferencedFileLocation(getSourceFileByPath, diagnostic.reason); - return programDiagnostics.add(createFileDiagnostic(file, Debug.checkDefined(pos), Debug.checkDefined(end) - pos, diagnostic.diagnostic, ...diagnostic.args || emptyArray)); - case 2 /* ResolutionDiagnostics */: - return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d)); - default: - Debug.assertNever(diagnostic); - } - }); - verifyCompilerOptions(); - mark("afterProgram"); - measure("Program", "beforeProgram", "afterProgram"); - (_p = tracing) == null ? void 0 : _p.pop(); - return program; - function getPackagesMap() { - if (packageMap) - return packageMap; - packageMap = /* @__PURE__ */ new Map(); - files.forEach((sf) => { - if (!sf.resolvedModules) - return; - sf.resolvedModules.forEach(({ resolvedModule }) => { - if (resolvedModule == null ? void 0 : resolvedModule.packageId) - packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name)); - }); - }); - return packageMap; - } - function typesPackageExists(packageName) { - return getPackagesMap().has(getTypesPackageName(packageName)); - } - function packageBundlesTypes(packageName) { - return !!getPackagesMap().get(packageName); - } - function addResolutionDiagnostics(resolution) { - var _a2; - if (!((_a2 = resolution.resolutionDiagnostics) == null ? void 0 : _a2.length)) - return; - (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({ - kind: 2 /* ResolutionDiagnostics */, - diagnostics: resolution.resolutionDiagnostics - }); - } - function addResolutionDiagnosticsFromResolutionOrCache(containingFile, name, resolution, mode) { - if (host.resolveModuleNameLiterals || !host.resolveModuleNames) - return addResolutionDiagnostics(resolution); - if (!moduleResolutionCache || isExternalModuleNameRelative(name)) - return; - const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory); - const containingDir = getDirectoryPath(containingFileName); - const redirectedReference = getRedirectReferenceForResolution(containingFile); - const fromCache = moduleResolutionCache.getFromNonRelativeNameCache(name, mode, containingDir, redirectedReference); - if (fromCache) - addResolutionDiagnostics(fromCache); - } - function resolveModuleNamesWorker(moduleNames, containingFile, reusedNames) { - var _a2, _b2; - if (!moduleNames.length) - return emptyArray; - const containingFileName = getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory); - const redirectedReference = getRedirectReferenceForResolution(containingFile); - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "resolveModuleNamesWorker", { containingFileName }); - mark("beforeResolveModule"); - const result = actualResolveModuleNamesWorker(moduleNames, containingFileName, redirectedReference, options, containingFile, reusedNames); - mark("afterResolveModule"); - measure("ResolveModule", "beforeResolveModule", "afterResolveModule"); - (_b2 = tracing) == null ? void 0 : _b2.pop(); - return result; - } - function resolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFile, reusedNames) { - var _a2, _b2; - if (!typeDirectiveNames.length) - return []; - const containingSourceFile = !isString(containingFile) ? containingFile : void 0; - const containingFileName = !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile; - const redirectedReference = containingSourceFile && getRedirectReferenceForResolution(containingSourceFile); - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "resolveTypeReferenceDirectiveNamesWorker", { containingFileName }); - mark("beforeResolveTypeReference"); - const result = actualResolveTypeReferenceDirectiveNamesWorker(typeDirectiveNames, containingFileName, redirectedReference, options, containingSourceFile, reusedNames); - mark("afterResolveTypeReference"); - measure("ResolveTypeReference", "beforeResolveTypeReference", "afterResolveTypeReference"); - (_b2 = tracing) == null ? void 0 : _b2.pop(); - return result; - } - function getRedirectReferenceForResolution(file) { - const redirect = getResolvedProjectReferenceToRedirect(file.originalFileName); - if (redirect || !isDeclarationFileName(file.originalFileName)) - return redirect; - const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path); - if (resultFromDts) - return resultFromDts; - if (!host.realpath || !options.preserveSymlinks || !stringContains(file.originalFileName, nodeModulesPathPart)) - return void 0; - const realDeclarationPath = toPath3(host.realpath(file.originalFileName)); - return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath); - } - function getRedirectReferenceForResolutionFromSourceOfProject(filePath) { - const source = getSourceOfProjectReferenceRedirect(filePath); - if (isString(source)) - return getResolvedProjectReferenceToRedirect(source); - if (!source) - return void 0; - return forEachResolvedProjectReference2((resolvedRef) => { - const out = outFile(resolvedRef.commandLine.options); - if (!out) - return void 0; - return toPath3(out) === filePath ? resolvedRef : void 0; - }); - } - function compareDefaultLibFiles(a, b) { - return compareValues(getDefaultLibFilePriority(a), getDefaultLibFilePriority(b)); - } - function getDefaultLibFilePriority(a) { - if (containsPath( - defaultLibraryPath, - a.fileName, - /*ignoreCase*/ - false - )) { - const basename = getBaseFileName(a.fileName); - if (basename === "lib.d.ts" || basename === "lib.es6.d.ts") - return 0; - const name = removeSuffix(removePrefix(basename, "lib."), ".d.ts"); - const index = libs.indexOf(name); - if (index !== -1) - return index + 1; - } - return libs.length + 2; - } - function toPath3(fileName) { - return toPath(fileName, currentDirectory, getCanonicalFileName); - } - function getCommonSourceDirectory2() { - if (commonSourceDirectory === void 0) { - const emittedFiles = filter(files, (file) => sourceFileMayBeEmitted(file, program)); - commonSourceDirectory = getCommonSourceDirectory( - options, - () => mapDefined(emittedFiles, (file) => file.isDeclarationFile ? void 0 : file.fileName), - currentDirectory, - getCanonicalFileName, - (commonSourceDirectory2) => checkSourceFilesBelongToPath(emittedFiles, commonSourceDirectory2) - ); - } - return commonSourceDirectory; - } - function getClassifiableNames() { - var _a2; - if (!classifiableNames) { - getTypeChecker(); - classifiableNames = /* @__PURE__ */ new Set(); - for (const sourceFile of files) { - (_a2 = sourceFile.classifiableNames) == null ? void 0 : _a2.forEach((value) => classifiableNames.add(value)); - } - } - return classifiableNames; - } - function resolveModuleNamesReusingOldState(moduleNames, file) { - var _a2; - if (structureIsReused === 0 /* Not */ && !file.ambientModuleNames.length) { - return resolveModuleNamesWorker( - moduleNames, - file, - /*reusedNames*/ - void 0 - ); - } - const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName); - if (oldSourceFile !== file && file.resolvedModules) { - const result2 = []; - for (const moduleName of moduleNames) { - const resolvedModule = file.resolvedModules.get(moduleName.text, getModeForUsageLocation(file, moduleName)); - result2.push(resolvedModule); - } - return result2; - } - let unknownModuleNames; - let result; - let reusedNames; - const predictedToResolveToAmbientModuleMarker = emptyResolution; - for (let i = 0; i < moduleNames.length; i++) { - const moduleName = moduleNames[i]; - if (file === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path)) { - const mode = getModeForUsageLocation(file, moduleName); - const oldResolution = (_a2 = oldSourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleName.text, mode); - if (oldResolution == null ? void 0 : oldResolution.resolvedModule) { - if (isTraceEnabled(options, host)) { - trace( - host, - oldResolution.resolvedModule.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2, - moduleName.text, - getNormalizedAbsolutePath(file.originalFileName, currentDirectory), - oldResolution.resolvedModule.resolvedFileName, - oldResolution.resolvedModule.packageId && packageIdToString(oldResolution.resolvedModule.packageId) - ); - } - (result ?? (result = new Array(moduleNames.length)))[i] = oldResolution; - (reusedNames ?? (reusedNames = [])).push(moduleName); - continue; - } - } - let resolvesToAmbientModuleInNonModifiedFile = false; - if (contains(file.ambientModuleNames, moduleName.text)) { - resolvesToAmbientModuleInNonModifiedFile = true; - if (isTraceEnabled(options, host)) { - trace(host, Diagnostics.Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1, moduleName.text, getNormalizedAbsolutePath(file.originalFileName, currentDirectory)); - } - } else { - resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName); - } - if (resolvesToAmbientModuleInNonModifiedFile) { - (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker; - } else { - (unknownModuleNames ?? (unknownModuleNames = [])).push(moduleName); - } - } - const resolutions = unknownModuleNames && unknownModuleNames.length ? resolveModuleNamesWorker(unknownModuleNames, file, reusedNames) : emptyArray; - if (!result) { - Debug.assert(resolutions.length === moduleNames.length); - return resolutions; - } - let j = 0; - for (let i = 0; i < result.length; i++) { - if (!result[i]) { - result[i] = resolutions[j]; - j++; - } - } - Debug.assert(j === resolutions.length); - return result; - function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) { - const resolutionToFile = getResolvedModule(oldSourceFile, moduleName.text, getModeForUsageLocation(file, moduleName)); - const resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName); - if (resolutionToFile && resolvedFile) { - return false; - } - const unmodifiedFile = ambientModuleNameToUnmodifiedFileName.get(moduleName.text); - if (!unmodifiedFile) { - return false; - } - if (isTraceEnabled(options, host)) { - trace(host, Diagnostics.Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified, moduleName.text, unmodifiedFile); - } - return true; - } - } - function resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectiveNames, containingFile) { - var _a2; - if (structureIsReused === 0 /* Not */) { - return resolveTypeReferenceDirectiveNamesWorker( - typeDirectiveNames, - containingFile, - /*reusedNames*/ - void 0 - ); - } - const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0; - if (!isString(containingFile)) { - if (oldSourceFile !== containingFile && containingFile.resolvedTypeReferenceDirectiveNames) { - const result2 = []; - for (const typeDirectiveName of typeDirectiveNames) { - const resolvedTypeReferenceDirective = containingFile.resolvedTypeReferenceDirectiveNames.get(getTypeReferenceResolutionName(typeDirectiveName), getModeForFileReference(typeDirectiveName, containingFile.impliedNodeFormat)); - result2.push(resolvedTypeReferenceDirective); - } - return result2; - } - } - let unknownTypeReferenceDirectiveNames; - let result; - let reusedNames; - const containingSourceFile = !isString(containingFile) ? containingFile : void 0; - const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path) : !hasInvalidatedResolutions(toPath3(containingFile)); - for (let i = 0; i < typeDirectiveNames.length; i++) { - const entry = typeDirectiveNames[i]; - if (canReuseResolutions) { - const typeDirectiveName = getTypeReferenceResolutionName(entry); - const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat); - const oldResolution = (_a2 = !isString(containingFile) ? oldSourceFile == null ? void 0 : oldSourceFile.resolvedTypeReferenceDirectiveNames : oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(typeDirectiveName, mode); - if (oldResolution == null ? void 0 : oldResolution.resolvedTypeReferenceDirective) { - if (isTraceEnabled(options, host)) { - trace( - host, - oldResolution.resolvedTypeReferenceDirective.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2, - typeDirectiveName, - !isString(containingFile) ? getNormalizedAbsolutePath(containingFile.originalFileName, currentDirectory) : containingFile, - oldResolution.resolvedTypeReferenceDirective.resolvedFileName, - oldResolution.resolvedTypeReferenceDirective.packageId && packageIdToString(oldResolution.resolvedTypeReferenceDirective.packageId) - ); - } - (result ?? (result = new Array(typeDirectiveNames.length)))[i] = oldResolution; - (reusedNames ?? (reusedNames = [])).push(entry); - continue; - } - } - (unknownTypeReferenceDirectiveNames ?? (unknownTypeReferenceDirectiveNames = [])).push(entry); - } - if (!unknownTypeReferenceDirectiveNames) - return result || emptyArray; - const resolutions = resolveTypeReferenceDirectiveNamesWorker( - unknownTypeReferenceDirectiveNames, - containingFile, - reusedNames - ); - if (!result) { - Debug.assert(resolutions.length === typeDirectiveNames.length); - return resolutions; - } - let j = 0; - for (let i = 0; i < result.length; i++) { - if (!result[i]) { - result[i] = resolutions[j]; - j++; - } - } - Debug.assert(j === resolutions.length); - return result; - } - function canReuseProjectReferences() { - return !forEachProjectReference( - oldProgram.getProjectReferences(), - oldProgram.getResolvedProjectReferences(), - (oldResolvedRef, parent2, index) => { - const newRef = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[index]; - const newResolvedRef = parseProjectReferenceConfigFile(newRef); - if (oldResolvedRef) { - return !newResolvedRef || newResolvedRef.sourceFile !== oldResolvedRef.sourceFile || !arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newResolvedRef.commandLine.fileNames); - } else { - return newResolvedRef !== void 0; - } - }, - (oldProjectReferences, parent2) => { - const newReferences = parent2 ? getResolvedProjectReferenceByPath(parent2.sourceFile.path).commandLine.projectReferences : projectReferences; - return !arrayIsEqualTo(oldProjectReferences, newReferences, projectReferenceIsEqualTo); - } - ); - } - function tryReuseStructureFromOldProgram() { - var _a2; - if (!oldProgram) { - return 0 /* Not */; - } - const oldOptions = oldProgram.getCompilerOptions(); - if (changesAffectModuleResolution(oldOptions, options)) { - return 0 /* Not */; - } - const oldRootNames = oldProgram.getRootFileNames(); - if (!arrayIsEqualTo(oldRootNames, rootNames)) { - return 0 /* Not */; - } - if (!canReuseProjectReferences()) { - return 0 /* Not */; - } - if (projectReferences) { - resolvedProjectReferences = projectReferences.map(parseProjectReferenceConfigFile); - } - const newSourceFiles = []; - const modifiedSourceFiles = []; - structureIsReused = 2 /* Completely */; - if (oldProgram.getMissingFilePaths().some((missingFilePath) => host.fileExists(missingFilePath))) { - return 0 /* Not */; - } - const oldSourceFiles = oldProgram.getSourceFiles(); - let SeenPackageName; - ((SeenPackageName2) => { - SeenPackageName2[SeenPackageName2["Exists"] = 0] = "Exists"; - SeenPackageName2[SeenPackageName2["Modified"] = 1] = "Modified"; - })(SeenPackageName || (SeenPackageName = {})); - const seenPackageNames = /* @__PURE__ */ new Map(); - for (const oldSourceFile of oldSourceFiles) { - const sourceFileOptions = getCreateSourceFileOptions(oldSourceFile.fileName, moduleResolutionCache, host, options); - let newSourceFile = host.getSourceFileByPath ? host.getSourceFileByPath( - oldSourceFile.fileName, - oldSourceFile.resolvedPath, - sourceFileOptions, - /*onError*/ - void 0, - shouldCreateNewSourceFile - ) : host.getSourceFile( - oldSourceFile.fileName, - sourceFileOptions, - /*onError*/ - void 0, - shouldCreateNewSourceFile - ); - if (!newSourceFile) { - return 0 /* Not */; - } - newSourceFile.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0; - newSourceFile.packageJsonScope = sourceFileOptions.packageJsonScope; - Debug.assert(!newSourceFile.redirectInfo, "Host should not return a redirect source file from `getSourceFile`"); - let fileChanged; - if (oldSourceFile.redirectInfo) { - if (newSourceFile !== oldSourceFile.redirectInfo.unredirected) { - return 0 /* Not */; - } - fileChanged = false; - newSourceFile = oldSourceFile; - } else if (oldProgram.redirectTargetsMap.has(oldSourceFile.path)) { - if (newSourceFile !== oldSourceFile) { - return 0 /* Not */; - } - fileChanged = false; - } else { - fileChanged = newSourceFile !== oldSourceFile; - } - newSourceFile.path = oldSourceFile.path; - newSourceFile.originalFileName = oldSourceFile.originalFileName; - newSourceFile.resolvedPath = oldSourceFile.resolvedPath; - newSourceFile.fileName = oldSourceFile.fileName; - const packageName = oldProgram.sourceFileToPackageName.get(oldSourceFile.path); - if (packageName !== void 0) { - const prevKind = seenPackageNames.get(packageName); - const newKind = fileChanged ? 1 /* Modified */ : 0 /* Exists */; - if (prevKind !== void 0 && newKind === 1 /* Modified */ || prevKind === 1 /* Modified */) { - return 0 /* Not */; - } - seenPackageNames.set(packageName, newKind); - } - if (fileChanged) { - if (oldSourceFile.impliedNodeFormat !== newSourceFile.impliedNodeFormat) { - structureIsReused = 1 /* SafeModules */; - } else if (!arrayIsEqualTo(oldSourceFile.libReferenceDirectives, newSourceFile.libReferenceDirectives, fileReferenceIsEqualTo)) { - structureIsReused = 1 /* SafeModules */; - } else if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) { - structureIsReused = 1 /* SafeModules */; - } else if (!arrayIsEqualTo(oldSourceFile.referencedFiles, newSourceFile.referencedFiles, fileReferenceIsEqualTo)) { - structureIsReused = 1 /* SafeModules */; - } else { - collectExternalModuleReferences(newSourceFile); - if (!arrayIsEqualTo(oldSourceFile.imports, newSourceFile.imports, moduleNameIsEqualTo)) { - structureIsReused = 1 /* SafeModules */; - } else if (!arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations, moduleNameIsEqualTo)) { - structureIsReused = 1 /* SafeModules */; - } else if ((oldSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */) !== (newSourceFile.flags & 12582912 /* PermanentlySetIncrementalFlags */)) { - structureIsReused = 1 /* SafeModules */; - } else if (!arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) { - structureIsReused = 1 /* SafeModules */; - } - } - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); - } else if (hasInvalidatedResolutions(oldSourceFile.path)) { - structureIsReused = 1 /* SafeModules */; - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); - } - newSourceFiles.push(newSourceFile); - } - if (structureIsReused !== 2 /* Completely */) { - return structureIsReused; - } - const modifiedFiles = modifiedSourceFiles.map((f) => f.oldFile); - for (const oldFile of oldSourceFiles) { - if (!contains(modifiedFiles, oldFile)) { - for (const moduleName of oldFile.ambientModuleNames) { - ambientModuleNameToUnmodifiedFileName.set(moduleName, oldFile.fileName); - } - } - } - for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) { - const moduleNames = getModuleNames(newSourceFile); - const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile); - const resolutionsChanged = hasChangesInResolutions(moduleNames, newSourceFile, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo, moduleResolutionNameAndModeGetter); - if (resolutionsChanged) { - structureIsReused = 1 /* SafeModules */; - newSourceFile.resolvedModules = zipToModeAwareCache(newSourceFile, moduleNames, resolutions, moduleResolutionNameAndModeGetter); - } else { - newSourceFile.resolvedModules = oldSourceFile.resolvedModules; - } - const typesReferenceDirectives = newSourceFile.typeReferenceDirectives; - const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile); - const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, newSourceFile, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, typeDirectiveIsEqualTo, typeReferenceResolutionNameAndModeGetter); - if (typeReferenceResolutionsChanged) { - structureIsReused = 1 /* SafeModules */; - newSourceFile.resolvedTypeReferenceDirectiveNames = zipToModeAwareCache(newSourceFile, typesReferenceDirectives, typeReferenceResolutions, typeReferenceResolutionNameAndModeGetter); - } else { - newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames; - } - } - if (structureIsReused !== 2 /* Completely */) { - return structureIsReused; - } - if (changesAffectingProgramStructure(oldOptions, options)) { - return 1 /* SafeModules */; - } - if (oldProgram.resolvedLibReferences && forEachEntry(oldProgram.resolvedLibReferences, (resolution, libFileName) => pathForLibFileWorker(libFileName).actual !== resolution.actual)) { - return 1 /* SafeModules */; - } - if (host.hasChangedAutomaticTypeDirectiveNames) { - if (host.hasChangedAutomaticTypeDirectiveNames()) - return 1 /* SafeModules */; - } else { - automaticTypeDirectiveNames = getAutomaticTypeDirectiveNames(options, host); - if (!arrayIsEqualTo(oldProgram.getAutomaticTypeDirectiveNames(), automaticTypeDirectiveNames)) - return 1 /* SafeModules */; - } - missingFilePaths = oldProgram.getMissingFilePaths(); - Debug.assert(newSourceFiles.length === oldProgram.getSourceFiles().length); - for (const newSourceFile of newSourceFiles) { - filesByName.set(newSourceFile.path, newSourceFile); - } - const oldFilesByNameMap = oldProgram.getFilesByNameMap(); - oldFilesByNameMap.forEach((oldFile, path) => { - if (!oldFile) { - filesByName.set(path, oldFile); - return; - } - if (oldFile.path === path) { - if (oldProgram.isSourceFileFromExternalLibrary(oldFile)) { - sourceFilesFoundSearchingNodeModules.set(oldFile.path, true); - } - return; - } - filesByName.set(path, filesByName.get(oldFile.path)); - }); - files = newSourceFiles; - fileReasons = oldProgram.getFileIncludeReasons(); - fileProcessingDiagnostics = oldProgram.getFileProcessingDiagnostics(); - resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives(); - automaticTypeDirectiveNames = oldProgram.getAutomaticTypeDirectiveNames(); - automaticTypeDirectiveResolutions = oldProgram.getAutomaticTypeDirectiveResolutions(); - sourceFileToPackageName = oldProgram.sourceFileToPackageName; - redirectTargetsMap = oldProgram.redirectTargetsMap; - usesUriStyleNodeCoreModules = oldProgram.usesUriStyleNodeCoreModules; - resolvedLibReferences = oldProgram.resolvedLibReferences; - packageMap = oldProgram.getCurrentPackagesMap(); - return 2 /* Completely */; - } - function getEmitHost(writeFileCallback) { - return { - getPrependNodes, - getCanonicalFileName, - getCommonSourceDirectory: program.getCommonSourceDirectory, - getCompilerOptions: program.getCompilerOptions, - getCurrentDirectory: () => currentDirectory, - getSourceFile: program.getSourceFile, - getSourceFileByPath: program.getSourceFileByPath, - getSourceFiles: program.getSourceFiles, - getLibFileFromReference: program.getLibFileFromReference, - isSourceFileFromExternalLibrary, - getResolvedProjectReferenceToRedirect, - getProjectReferenceRedirect, - isSourceOfProjectReferenceRedirect, - getSymlinkCache, - writeFile: writeFileCallback || writeFile2, - isEmitBlocked, - readFile: (f) => host.readFile(f), - fileExists: (f) => { - const path = toPath3(f); - if (getSourceFileByPath(path)) - return true; - if (contains(missingFilePaths, path)) - return false; - return host.fileExists(f); - }, - useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(), - getBuildInfo: (bundle) => { - var _a2; - return (_a2 = program.getBuildInfo) == null ? void 0 : _a2.call(program, bundle); - }, - getSourceFileFromReference: (file, ref) => program.getSourceFileFromReference(file, ref), - redirectTargetsMap, - getFileIncludeReasons: program.getFileIncludeReasons, - createHash: maybeBind(host, host.createHash) - }; - } - function writeFile2(fileName, text, writeByteOrderMark, onError, sourceFiles, data) { - host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data); - } - function emitBuildInfo(writeFileCallback) { - var _a2, _b2; - Debug.assert(!outFile(options)); - (_a2 = tracing) == null ? void 0 : _a2.push( - tracing.Phase.Emit, - "emitBuildInfo", - {}, - /*separateBeginAndEnd*/ - true - ); - mark("beforeEmit"); - const emitResult = emitFiles( - notImplementedResolver, - getEmitHost(writeFileCallback), - /*targetSourceFile*/ - void 0, - /*transformers*/ - noTransformers, - /*emitOnly*/ - false, - /*onlyBuildInfo*/ - true - ); - mark("afterEmit"); - measure("Emit", "beforeEmit", "afterEmit"); - (_b2 = tracing) == null ? void 0 : _b2.pop(); - return emitResult; - } - function getResolvedProjectReferences() { - return resolvedProjectReferences; - } - function getProjectReferences() { - return projectReferences; - } - function getPrependNodes() { - return createPrependNodes( - projectReferences, - (_ref, index) => { - var _a2; - return (_a2 = resolvedProjectReferences[index]) == null ? void 0 : _a2.commandLine; - }, - (fileName) => { - const path = toPath3(fileName); - const sourceFile = getSourceFileByPath(path); - return sourceFile ? sourceFile.text : filesByName.has(path) ? void 0 : host.readFile(path); - }, - host - ); - } - function isSourceFileFromExternalLibrary(file) { - return !!sourceFilesFoundSearchingNodeModules.get(file.path); - } - function isSourceFileDefaultLibrary(file) { - if (!file.isDeclarationFile) { - return false; - } - if (file.hasNoDefaultLib) { - return true; - } - if (!options.noLib) { - return false; - } - const equalityComparer = host.useCaseSensitiveFileNames() ? equateStringsCaseSensitive : equateStringsCaseInsensitive; - if (!options.lib) { - return equalityComparer(file.fileName, getDefaultLibraryFileName()); - } else { - return some(options.lib, (libFileName) => equalityComparer(file.fileName, resolvedLibReferences.get(libFileName).actual)); - } - } - function getTypeChecker() { - return typeChecker || (typeChecker = createTypeChecker(program)); - } - function emit(sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit) { - var _a2, _b2; - (_a2 = tracing) == null ? void 0 : _a2.push( - tracing.Phase.Emit, - "emit", - { path: sourceFile == null ? void 0 : sourceFile.path }, - /*separateBeginAndEnd*/ - true - ); - const result = runWithCancellationToken(() => emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnly, transformers, forceDtsEmit)); - (_b2 = tracing) == null ? void 0 : _b2.pop(); - return result; - } - function isEmitBlocked(emitFileName) { - return hasEmitBlockingDiagnostics.has(toPath3(emitFileName)); - } - function emitWorker(program2, sourceFile, writeFileCallback, cancellationToken, emitOnly, customTransformers, forceDtsEmit) { - if (!forceDtsEmit) { - const result = handleNoEmitOptions(program2, sourceFile, writeFileCallback, cancellationToken); - if (result) - return result; - } - const emitResolver = getTypeChecker().getEmitResolver(outFile(options) ? void 0 : sourceFile, cancellationToken); - mark("beforeEmit"); - const emitResult = emitFiles( - emitResolver, - getEmitHost(writeFileCallback), - sourceFile, - getTransformers(options, customTransformers, emitOnly), - emitOnly, - /*onlyBuildInfo*/ - false, - forceDtsEmit - ); - mark("afterEmit"); - measure("Emit", "beforeEmit", "afterEmit"); - return emitResult; - } - function getSourceFile(fileName) { - return getSourceFileByPath(toPath3(fileName)); - } - function getSourceFileByPath(path) { - return filesByName.get(path) || void 0; - } - function getDiagnosticsHelper(sourceFile, getDiagnostics2, cancellationToken) { - if (sourceFile) { - return sortAndDeduplicateDiagnostics(getDiagnostics2(sourceFile, cancellationToken)); - } - return sortAndDeduplicateDiagnostics(flatMap(program.getSourceFiles(), (sourceFile2) => { - if (cancellationToken) { - cancellationToken.throwIfCancellationRequested(); - } - return getDiagnostics2(sourceFile2, cancellationToken); - })); - } - function getSyntacticDiagnostics(sourceFile, cancellationToken) { - return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile, cancellationToken); - } - function getSemanticDiagnostics(sourceFile, cancellationToken) { - return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile, cancellationToken); - } - function getCachedSemanticDiagnostics(sourceFile) { - var _a2; - return sourceFile ? (_a2 = cachedBindAndCheckDiagnosticsForFile.perFile) == null ? void 0 : _a2.get(sourceFile.path) : cachedBindAndCheckDiagnosticsForFile.allDiagnostics; - } - function getBindAndCheckDiagnostics(sourceFile, cancellationToken) { - return getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken); - } - function getProgramDiagnostics(sourceFile) { - var _a2; - if (skipTypeChecking(sourceFile, options, program)) { - return emptyArray; - } - const programDiagnosticsInFile = programDiagnostics.getDiagnostics(sourceFile.fileName); - if (!((_a2 = sourceFile.commentDirectives) == null ? void 0 : _a2.length)) { - return programDiagnosticsInFile; - } - return getDiagnosticsWithPrecedingDirectives(sourceFile, sourceFile.commentDirectives, programDiagnosticsInFile).diagnostics; - } - function getDeclarationDiagnostics2(sourceFile, cancellationToken) { - const options2 = program.getCompilerOptions(); - if (!sourceFile || outFile(options2)) { - return getDeclarationDiagnosticsWorker(sourceFile, cancellationToken); - } else { - return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile, cancellationToken); - } - } - function getSyntacticDiagnosticsForFile(sourceFile) { - if (isSourceFileJS(sourceFile)) { - if (!sourceFile.additionalSyntacticDiagnostics) { - sourceFile.additionalSyntacticDiagnostics = getJSSyntacticDiagnosticsForFile(sourceFile); - } - return concatenate(sourceFile.additionalSyntacticDiagnostics, sourceFile.parseDiagnostics); - } - return sourceFile.parseDiagnostics; - } - function runWithCancellationToken(func) { - try { - return func(); - } catch (e) { - if (e instanceof OperationCanceledException) { - typeChecker = void 0; - } - throw e; - } - } - function getSemanticDiagnosticsForFile(sourceFile, cancellationToken) { - return concatenate( - filterSemanticDiagnostics(getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken), options), - getProgramDiagnostics(sourceFile) - ); - } - function getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken) { - return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFile, getBindAndCheckDiagnosticsForFileNoCache); - } - function getBindAndCheckDiagnosticsForFileNoCache(sourceFile, cancellationToken) { - return runWithCancellationToken(() => { - if (skipTypeChecking(sourceFile, options, program)) { - return emptyArray; - } - const typeChecker2 = getTypeChecker(); - Debug.assert(!!sourceFile.bindDiagnostics); - const isJs = sourceFile.scriptKind === 1 /* JS */ || sourceFile.scriptKind === 2 /* JSX */; - const isCheckJs = isJs && isCheckJsEnabledForFile(sourceFile, options); - const isPlainJs = isPlainJsFile(sourceFile, options.checkJs); - const isTsNoCheck = !!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false; - const includeBindAndCheckDiagnostics = !isTsNoCheck && (sourceFile.scriptKind === 3 /* TS */ || sourceFile.scriptKind === 4 /* TSX */ || sourceFile.scriptKind === 5 /* External */ || isPlainJs || isCheckJs || sourceFile.scriptKind === 7 /* Deferred */); - let bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray; - let checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker2.getDiagnostics(sourceFile, cancellationToken) : emptyArray; - if (isPlainJs) { - bindDiagnostics = filter(bindDiagnostics, (d) => plainJSErrors.has(d.code)); - checkDiagnostics = filter(checkDiagnostics, (d) => plainJSErrors.has(d.code)); - } - return getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics && !isPlainJs, bindDiagnostics, checkDiagnostics, isCheckJs ? sourceFile.jsDocDiagnostics : void 0); - }); - } - function getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics, ...allDiagnostics) { - var _a2; - const flatDiagnostics = flatten(allDiagnostics); - if (!includeBindAndCheckDiagnostics || !((_a2 = sourceFile.commentDirectives) == null ? void 0 : _a2.length)) { - return flatDiagnostics; - } - const { diagnostics, directives } = getDiagnosticsWithPrecedingDirectives(sourceFile, sourceFile.commentDirectives, flatDiagnostics); - for (const errorExpectation of directives.getUnusedExpectations()) { - diagnostics.push(createDiagnosticForRange(sourceFile, errorExpectation.range, Diagnostics.Unused_ts_expect_error_directive)); - } - return diagnostics; - } - function getDiagnosticsWithPrecedingDirectives(sourceFile, commentDirectives, flatDiagnostics) { - const directives = createCommentDirectivesMap(sourceFile, commentDirectives); - const diagnostics = flatDiagnostics.filter((diagnostic) => markPrecedingCommentDirectiveLine(diagnostic, directives) === -1); - return { diagnostics, directives }; - } - function getSuggestionDiagnostics(sourceFile, cancellationToken) { - return runWithCancellationToken(() => { - return getTypeChecker().getSuggestionDiagnostics(sourceFile, cancellationToken); - }); - } - function markPrecedingCommentDirectiveLine(diagnostic, directives) { - const { file, start } = diagnostic; - if (!file) { - return -1; - } - const lineStarts = getLineStarts(file); - let line = computeLineAndCharacterOfPosition(lineStarts, start).line - 1; - while (line >= 0) { - if (directives.markUsed(line)) { - return line; - } - const lineText = file.text.slice(lineStarts[line], lineStarts[line + 1]).trim(); - if (lineText !== "" && !/^(\s*)\/\/(.*)$/.test(lineText)) { - return -1; - } - line--; - } - return -1; - } - function getJSSyntacticDiagnosticsForFile(sourceFile) { - return runWithCancellationToken(() => { - const diagnostics = []; - walk(sourceFile, sourceFile); - forEachChildRecursively(sourceFile, walk, walkArray); - return diagnostics; - function walk(node, parent2) { - switch (parent2.kind) { - case 169 /* Parameter */: - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - if (parent2.questionToken === node) { - diagnostics.push(createDiagnosticForNode2(node, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?")); - return "skip"; - } - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 260 /* VariableDeclaration */: - if (parent2.type === node) { - diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files)); - return "skip"; - } - } - switch (node.kind) { - case 273 /* ImportClause */: - if (node.isTypeOnly) { - diagnostics.push(createDiagnosticForNode2(parent2, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); - return "skip"; - } - break; - case 278 /* ExportDeclaration */: - if (node.isTypeOnly) { - diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type")); - return "skip"; - } - break; - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: - if (node.isTypeOnly) { - diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, isImportSpecifier(node) ? "import...type" : "export...type")); - return "skip"; - } - break; - case 271 /* ImportEqualsDeclaration */: - diagnostics.push(createDiagnosticForNode2(node, Diagnostics.import_can_only_be_used_in_TypeScript_files)); - return "skip"; - case 277 /* ExportAssignment */: - if (node.isExportEquals) { - diagnostics.push(createDiagnosticForNode2(node, Diagnostics.export_can_only_be_used_in_TypeScript_files)); - return "skip"; - } - break; - case 298 /* HeritageClause */: - const heritageClause = node; - if (heritageClause.token === 119 /* ImplementsKeyword */) { - diagnostics.push(createDiagnosticForNode2(node, Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files)); - return "skip"; - } - break; - case 264 /* InterfaceDeclaration */: - const interfaceKeyword = tokenToString(120 /* InterfaceKeyword */); - Debug.assertIsDefined(interfaceKeyword); - diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword)); - return "skip"; - case 267 /* ModuleDeclaration */: - const moduleKeyword = node.flags & 32 /* Namespace */ ? tokenToString(145 /* NamespaceKeyword */) : tokenToString(144 /* ModuleKeyword */); - Debug.assertIsDefined(moduleKeyword); - diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword)); - return "skip"; - case 265 /* TypeAliasDeclaration */: - diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files)); - return "skip"; - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 262 /* FunctionDeclaration */: - if (!node.body) { - diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Signature_declarations_can_only_be_used_in_TypeScript_files)); - return "skip"; - } - return; - case 266 /* EnumDeclaration */: - const enumKeyword = Debug.checkDefined(tokenToString(94 /* EnumKeyword */)); - diagnostics.push(createDiagnosticForNode2(node, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword)); - return "skip"; - case 235 /* NonNullExpression */: - diagnostics.push(createDiagnosticForNode2(node, Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files)); - return "skip"; - case 234 /* AsExpression */: - diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files)); - return "skip"; - case 238 /* SatisfiesExpression */: - diagnostics.push(createDiagnosticForNode2(node.type, Diagnostics.Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files)); - return "skip"; - case 216 /* TypeAssertionExpression */: - Debug.fail(); - } - } - function walkArray(nodes, parent2) { - if (canHaveIllegalDecorators(parent2)) { - const decorator = find(parent2.modifiers, isDecorator); - if (decorator) { - diagnostics.push(createDiagnosticForNode2(decorator, Diagnostics.Decorators_are_not_valid_here)); - } - } else if (canHaveDecorators(parent2) && parent2.modifiers) { - const decoratorIndex = findIndex(parent2.modifiers, isDecorator); - if (decoratorIndex >= 0) { - if (isParameter(parent2) && !options.experimentalDecorators) { - diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here)); - } else if (isClassDeclaration(parent2)) { - const exportIndex = findIndex(parent2.modifiers, isExportModifier); - if (exportIndex >= 0) { - const defaultIndex = findIndex(parent2.modifiers, isDefaultModifier); - if (decoratorIndex > exportIndex && defaultIndex >= 0 && decoratorIndex < defaultIndex) { - diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here)); - } else if (exportIndex >= 0 && decoratorIndex < exportIndex) { - const trailingDecoratorIndex = findIndex(parent2.modifiers, isDecorator, exportIndex); - if (trailingDecoratorIndex >= 0) { - diagnostics.push(addRelatedInfo( - createDiagnosticForNode2(parent2.modifiers[trailingDecoratorIndex], Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export), - createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorator_used_before_export_here) - )); - } - } - } - } - } - } - switch (parent2.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - if (nodes === parent2.typeParameters) { - diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files)); - return "skip"; - } - case 243 /* VariableStatement */: - if (nodes === parent2.modifiers) { - checkModifiers(parent2.modifiers, parent2.kind === 243 /* VariableStatement */); - return "skip"; - } - break; - case 172 /* PropertyDeclaration */: - if (nodes === parent2.modifiers) { - for (const modifier of nodes) { - if (isModifier(modifier) && modifier.kind !== 126 /* StaticKeyword */ && modifier.kind !== 129 /* AccessorKeyword */) { - diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); - } - } - return "skip"; - } - break; - case 169 /* Parameter */: - if (nodes === parent2.modifiers && some(nodes, isModifier)) { - diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files)); - return "skip"; - } - break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 233 /* ExpressionWithTypeArguments */: - case 285 /* JsxSelfClosingElement */: - case 286 /* JsxOpeningElement */: - case 215 /* TaggedTemplateExpression */: - if (nodes === parent2.typeArguments) { - diagnostics.push(createDiagnosticForNodeArray2(nodes, Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files)); - return "skip"; - } - break; - } - } - function checkModifiers(modifiers, isConstValid) { - for (const modifier of modifiers) { - switch (modifier.kind) { - case 87 /* ConstKeyword */: - if (isConstValid) { - continue; - } - case 125 /* PublicKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - case 148 /* ReadonlyKeyword */: - case 138 /* DeclareKeyword */: - case 128 /* AbstractKeyword */: - case 164 /* OverrideKeyword */: - case 103 /* InKeyword */: - case 147 /* OutKeyword */: - diagnostics.push(createDiagnosticForNode2(modifier, Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, tokenToString(modifier.kind))); - break; - case 126 /* StaticKeyword */: - case 95 /* ExportKeyword */: - case 90 /* DefaultKeyword */: - case 129 /* AccessorKeyword */: - } - } - } - function createDiagnosticForNodeArray2(nodes, message, ...args) { - const start = nodes.pos; - return createFileDiagnostic(sourceFile, start, nodes.end - start, message, ...args); - } - function createDiagnosticForNode2(node, message, ...args) { - return createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args); - } - }); - } - function getDeclarationDiagnosticsWorker(sourceFile, cancellationToken) { - return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedDeclarationDiagnosticsForFile, getDeclarationDiagnosticsForFileNoCache); - } - function getDeclarationDiagnosticsForFileNoCache(sourceFile, cancellationToken) { - return runWithCancellationToken(() => { - const resolver = getTypeChecker().getEmitResolver(sourceFile, cancellationToken); - return getDeclarationDiagnostics(getEmitHost(noop), resolver, sourceFile) || emptyArray; - }); - } - function getAndCacheDiagnostics(sourceFile, cancellationToken, cache, getDiagnostics2) { - var _a2; - const cachedResult = sourceFile ? (_a2 = cache.perFile) == null ? void 0 : _a2.get(sourceFile.path) : cache.allDiagnostics; - if (cachedResult) { - return cachedResult; - } - const result = getDiagnostics2(sourceFile, cancellationToken); - if (sourceFile) { - (cache.perFile || (cache.perFile = /* @__PURE__ */ new Map())).set(sourceFile.path, result); - } else { - cache.allDiagnostics = result; - } - return result; - } - function getDeclarationDiagnosticsForFile(sourceFile, cancellationToken) { - return sourceFile.isDeclarationFile ? [] : getDeclarationDiagnosticsWorker(sourceFile, cancellationToken); - } - function getOptionsDiagnostics() { - return sortAndDeduplicateDiagnostics(concatenate( - programDiagnostics.getGlobalDiagnostics(), - getOptionsDiagnosticsOfConfigFile() - )); - } - function getOptionsDiagnosticsOfConfigFile() { - if (!options.configFile) - return emptyArray; - let diagnostics = programDiagnostics.getDiagnostics(options.configFile.fileName); - forEachResolvedProjectReference2((resolvedRef) => { - diagnostics = concatenate(diagnostics, programDiagnostics.getDiagnostics(resolvedRef.sourceFile.fileName)); - }); - return diagnostics; - } - function getGlobalDiagnostics() { - return rootNames.length ? sortAndDeduplicateDiagnostics(getTypeChecker().getGlobalDiagnostics().slice()) : emptyArray; - } - function getConfigFileParsingDiagnostics2() { - return configFileParsingDiagnostics || emptyArray; - } - function processRootFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason) { - processSourceFile( - normalizePath(fileName), - isDefaultLib, - ignoreNoDefaultLib, - /*packageId*/ - void 0, - reason - ); - } - function fileReferenceIsEqualTo(a, b) { - return a.fileName === b.fileName; - } - function moduleNameIsEqualTo(a, b) { - return a.kind === 80 /* Identifier */ ? b.kind === 80 /* Identifier */ && a.escapedText === b.escapedText : b.kind === 11 /* StringLiteral */ && a.text === b.text; - } - function createSyntheticImport(text, file) { - const externalHelpersModuleReference = factory.createStringLiteral(text); - const importDecl = factory.createImportDeclaration( - /*modifiers*/ - void 0, - /*importClause*/ - void 0, - externalHelpersModuleReference, - /*assertClause*/ - void 0 - ); - addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */); - setParent(externalHelpersModuleReference, importDecl); - setParent(importDecl, file); - externalHelpersModuleReference.flags &= ~16 /* Synthesized */; - importDecl.flags &= ~16 /* Synthesized */; - return externalHelpersModuleReference; - } - function collectExternalModuleReferences(file) { - if (file.imports) { - return; - } - const isJavaScriptFile = isSourceFileJS(file); - const isExternalModuleFile = isExternalModule(file); - let imports; - let moduleAugmentations; - let ambientModules; - if ((getIsolatedModules(options) || isExternalModuleFile) && !file.isDeclarationFile) { - if (options.importHelpers) { - imports = [createSyntheticImport(externalHelpersModuleNameText, file)]; - } - const jsxImport = getJSXRuntimeImport(getJSXImplicitImportBase(options, file), options); - if (jsxImport) { - (imports || (imports = [])).push(createSyntheticImport(jsxImport, file)); - } - } - for (const node of file.statements) { - collectModuleReferences( - node, - /*inAmbientModule*/ - false - ); - } - const shouldProcessRequires = isJavaScriptFile && shouldResolveJsRequire(options); - if (file.flags & 4194304 /* PossiblyContainsDynamicImport */ || shouldProcessRequires) { - collectDynamicImportOrRequireCalls(file); - } - file.imports = imports || emptyArray; - file.moduleAugmentations = moduleAugmentations || emptyArray; - file.ambientModuleNames = ambientModules || emptyArray; - return; - function collectModuleReferences(node, inAmbientModule) { - if (isAnyImportOrReExport(node)) { - const moduleNameExpr = getExternalModuleName(node); - if (moduleNameExpr && isStringLiteral(moduleNameExpr) && moduleNameExpr.text && (!inAmbientModule || !isExternalModuleNameRelative(moduleNameExpr.text))) { - setParentRecursive( - node, - /*incremental*/ - false - ); - imports = append(imports, moduleNameExpr); - if (!usesUriStyleNodeCoreModules && currentNodeModulesDepth === 0 && !file.isDeclarationFile) { - usesUriStyleNodeCoreModules = startsWith(moduleNameExpr.text, "node:"); - } - } - } else if (isModuleDeclaration(node)) { - if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 2 /* Ambient */) || file.isDeclarationFile)) { - node.name.parent = node; - const nameText = getTextOfIdentifierOrLiteral(node.name); - if (isExternalModuleFile || inAmbientModule && !isExternalModuleNameRelative(nameText)) { - (moduleAugmentations || (moduleAugmentations = [])).push(node.name); - } else if (!inAmbientModule) { - if (file.isDeclarationFile) { - (ambientModules || (ambientModules = [])).push(nameText); - } - const body = node.body; - if (body) { - for (const statement of body.statements) { - collectModuleReferences( - statement, - /*inAmbientModule*/ - true - ); - } - } - } - } - } - } - function collectDynamicImportOrRequireCalls(file2) { - const r = /import|require/g; - while (r.exec(file2.text) !== null) { - const node = getNodeAtPosition(file2, r.lastIndex); - if (shouldProcessRequires && isRequireCall( - node, - /*requireStringLiteralLikeArgument*/ - true - )) { - setParentRecursive( - node, - /*incremental*/ - false - ); - imports = append(imports, node.arguments[0]); - } else if (isImportCall(node) && node.arguments.length >= 1 && isStringLiteralLike(node.arguments[0])) { - setParentRecursive( - node, - /*incremental*/ - false - ); - imports = append(imports, node.arguments[0]); - } else if (isLiteralImportTypeNode(node)) { - setParentRecursive( - node, - /*incremental*/ - false - ); - imports = append(imports, node.argument.literal); - } - } - } - function getNodeAtPosition(sourceFile, position) { - let current = sourceFile; - const getContainingChild = (child) => { - if (child.pos <= position && (position < child.end || position === child.end && child.kind === 1 /* EndOfFileToken */)) { - return child; - } - }; - while (true) { - const child = isJavaScriptFile && hasJSDocNodes(current) && forEach(current.jsDoc, getContainingChild) || forEachChild(current, getContainingChild); - if (!child) { - return current; - } - current = child; - } - } - } - function getLibFileFromReference(ref) { - var _a2; - const { libFileName } = getLibFileNameFromLibReference(ref); - const actualFileName = libFileName && ((_a2 = resolvedLibReferences == null ? void 0 : resolvedLibReferences.get(libFileName)) == null ? void 0 : _a2.actual); - return actualFileName !== void 0 ? getSourceFile(actualFileName) : void 0; - } - function getSourceFileFromReference(referencingFile, ref) { - return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), getSourceFile); - } - function getSourceFileFromReferenceWorker(fileName, getSourceFile2, fail, reason) { - if (hasExtension(fileName)) { - const canonicalFileName = host.getCanonicalFileName(fileName); - if (!options.allowNonTsExtensions && !forEach(flatten(supportedExtensionsWithJsonIfResolveJsonModule), (extension) => fileExtensionIs(canonicalFileName, extension))) { - if (fail) { - if (hasJSFileExtension(canonicalFileName)) { - fail(Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName); - } else { - fail(Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + flatten(supportedExtensions).join("', '") + "'"); - } - } - return void 0; - } - const sourceFile = getSourceFile2(fileName); - if (fail) { - if (!sourceFile) { - const redirect = getProjectReferenceRedirect(fileName); - if (redirect) { - fail(Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, fileName); - } else { - fail(Diagnostics.File_0_not_found, fileName); - } - } else if (isReferencedFile(reason) && canonicalFileName === host.getCanonicalFileName(getSourceFileByPath(reason.file).fileName)) { - fail(Diagnostics.A_file_cannot_have_a_reference_to_itself); - } - } - return sourceFile; - } else { - const sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile2(fileName); - if (sourceFileNoExtension) - return sourceFileNoExtension; - if (fail && options.allowNonTsExtensions) { - fail(Diagnostics.File_0_not_found, fileName); - return void 0; - } - const sourceFileWithAddedExtension = forEach(supportedExtensions[0], (extension) => getSourceFile2(fileName + extension)); - if (fail && !sourceFileWithAddedExtension) - fail(Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName, "'" + flatten(supportedExtensions).join("', '") + "'"); - return sourceFileWithAddedExtension; - } - } - function processSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, packageId, reason) { - getSourceFileFromReferenceWorker( - fileName, - (fileName2) => findSourceFile(fileName2, isDefaultLib, ignoreNoDefaultLib, reason, packageId), - // TODO: GH#18217 - (diagnostic, ...args) => addFilePreprocessingFileExplainingDiagnostic( - /*file*/ - void 0, - reason, - diagnostic, - args - ), - reason - ); - } - function processProjectReferenceFile(fileName, reason) { - return processSourceFile( - fileName, - /*isDefaultLib*/ - false, - /*ignoreNoDefaultLib*/ - false, - /*packageId*/ - void 0, - reason - ); - } - function reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason) { - const hasExistingReasonToReportErrorOn = !isReferencedFile(reason) && some(fileReasons.get(existingFile.path), isReferencedFile); - if (hasExistingReasonToReportErrorOn) { - addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.Already_included_file_name_0_differs_from_file_name_1_only_in_casing, [existingFile.fileName, fileName]); - } else { - addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [fileName, existingFile.fileName]); - } - } - function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path, resolvedPath, originalFileName, sourceFileOptions) { - var _a2; - const redirect = parseNodeFactory.createRedirectedSourceFile({ redirectTarget, unredirected }); - redirect.fileName = fileName; - redirect.path = path; - redirect.resolvedPath = resolvedPath; - redirect.originalFileName = originalFileName; - redirect.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0; - redirect.packageJsonScope = sourceFileOptions.packageJsonScope; - sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0); - return redirect; - } - function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { - var _a2, _b2; - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "findSourceFile", { - fileName, - isDefaultLib: isDefaultLib || void 0, - fileIncludeKind: FileIncludeKind[reason.kind] - }); - const result = findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId); - (_b2 = tracing) == null ? void 0 : _b2.pop(); - return result; - } - function getCreateSourceFileOptions(fileName, moduleResolutionCache2, host2, options2) { - const result = getImpliedNodeFormatForFileWorker(getNormalizedAbsolutePath(fileName, currentDirectory), moduleResolutionCache2 == null ? void 0 : moduleResolutionCache2.getPackageJsonInfoCache(), host2, options2); - const languageVersion = getEmitScriptTarget(options2); - const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2); - return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 }; - } - function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { - var _a2; - const path = toPath3(fileName); - if (useSourceOfProjectReferenceRedirect) { - let source = getSourceOfProjectReferenceRedirect(path); - if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && stringContains(fileName, nodeModulesPathPart)) { - const realPath2 = toPath3(host.realpath(fileName)); - if (realPath2 !== path) - source = getSourceOfProjectReferenceRedirect(realPath2); - } - if (source) { - const file2 = isString(source) ? findSourceFile(source, isDefaultLib, ignoreNoDefaultLib, reason, packageId) : void 0; - if (file2) - addFileToFilesByName( - file2, - path, - /*redirectedPath*/ - void 0 - ); - return file2; - } - } - const originalFileName = fileName; - if (filesByName.has(path)) { - const file2 = filesByName.get(path); - addFileIncludeReason(file2 || void 0, reason); - if (file2 && !(options.forceConsistentCasingInFileNames === false)) { - const checkedName = file2.fileName; - const isRedirect = toPath3(checkedName) !== toPath3(fileName); - if (isRedirect) { - fileName = getProjectReferenceRedirect(fileName) || fileName; - } - const checkedAbsolutePath = getNormalizedAbsolutePathWithoutRoot(checkedName, currentDirectory); - const inputAbsolutePath = getNormalizedAbsolutePathWithoutRoot(fileName, currentDirectory); - if (checkedAbsolutePath !== inputAbsolutePath) { - reportFileNamesDifferOnlyInCasingError(fileName, file2, reason); - } - } - if (file2 && sourceFilesFoundSearchingNodeModules.get(file2.path) && currentNodeModulesDepth === 0) { - sourceFilesFoundSearchingNodeModules.set(file2.path, false); - if (!options.noResolve) { - processReferencedFiles(file2, isDefaultLib); - processTypeReferenceDirectives(file2); - } - if (!options.noLib) { - processLibReferenceDirectives(file2); - } - modulesWithElidedImports.set(file2.path, false); - processImportedModules(file2); - } else if (file2 && modulesWithElidedImports.get(file2.path)) { - if (currentNodeModulesDepth < maxNodeModuleJsDepth) { - modulesWithElidedImports.set(file2.path, false); - processImportedModules(file2); - } - } - return file2 || void 0; - } - let redirectedPath; - if (isReferencedFile(reason) && !useSourceOfProjectReferenceRedirect) { - const redirectProject = getProjectReferenceRedirectProject(fileName); - if (redirectProject) { - if (outFile(redirectProject.commandLine.options)) { - return void 0; - } - const redirect = getProjectReferenceOutputName(redirectProject, fileName); - fileName = redirect; - redirectedPath = toPath3(redirect); - } - } - const sourceFileOptions = getCreateSourceFileOptions(fileName, moduleResolutionCache, host, options); - const file = host.getSourceFile( - fileName, - sourceFileOptions, - (hostErrorMessage) => addFilePreprocessingFileExplainingDiagnostic( - /*file*/ - void 0, - reason, - Diagnostics.Cannot_read_file_0_Colon_1, - [fileName, hostErrorMessage] - ), - shouldCreateNewSourceFile - ); - if (packageId) { - const packageIdKey = packageIdToString(packageId); - const fileFromPackageId = packageIdToSourceFile.get(packageIdKey); - if (fileFromPackageId) { - const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path, toPath3(fileName), originalFileName, sourceFileOptions); - redirectTargetsMap.add(fileFromPackageId.path, fileName); - addFileToFilesByName(dupFile, path, redirectedPath); - addFileIncludeReason(dupFile, reason); - sourceFileToPackageName.set(path, packageIdToPackageName(packageId)); - processingOtherFiles.push(dupFile); - return dupFile; - } else if (file) { - packageIdToSourceFile.set(packageIdKey, file); - sourceFileToPackageName.set(path, packageIdToPackageName(packageId)); - } - } - addFileToFilesByName(file, path, redirectedPath); - if (file) { - sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0); - file.fileName = fileName; - file.path = path; - file.resolvedPath = toPath3(fileName); - file.originalFileName = originalFileName; - file.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0; - file.packageJsonScope = sourceFileOptions.packageJsonScope; - addFileIncludeReason(file, reason); - if (host.useCaseSensitiveFileNames()) { - const pathLowerCase = toFileNameLowerCase(path); - const existingFile = filesByNameIgnoreCase.get(pathLowerCase); - if (existingFile) { - reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason); - } else { - filesByNameIgnoreCase.set(pathLowerCase, file); - } - } - skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib && !ignoreNoDefaultLib; - if (!options.noResolve) { - processReferencedFiles(file, isDefaultLib); - processTypeReferenceDirectives(file); - } - if (!options.noLib) { - processLibReferenceDirectives(file); - } - processImportedModules(file); - if (isDefaultLib) { - processingDefaultLibFiles.push(file); - } else { - processingOtherFiles.push(file); - } - } - return file; - } - function addFileIncludeReason(file, reason) { - if (file) - fileReasons.add(file.path, reason); - } - function addFileToFilesByName(file, path, redirectedPath) { - if (redirectedPath) { - filesByName.set(redirectedPath, file); - filesByName.set(path, file || false); - } else { - filesByName.set(path, file); - } - } - function getProjectReferenceRedirect(fileName) { - const referencedProject = getProjectReferenceRedirectProject(fileName); - return referencedProject && getProjectReferenceOutputName(referencedProject, fileName); - } - function getProjectReferenceRedirectProject(fileName) { - if (!resolvedProjectReferences || !resolvedProjectReferences.length || isDeclarationFileName(fileName) || fileExtensionIs(fileName, ".json" /* Json */)) { - return void 0; - } - return getResolvedProjectReferenceToRedirect(fileName); - } - function getProjectReferenceOutputName(referencedProject, fileName) { - const out = outFile(referencedProject.commandLine.options); - return out ? changeExtension(out, ".d.ts" /* Dts */) : getOutputDeclarationFileName(fileName, referencedProject.commandLine, !host.useCaseSensitiveFileNames()); - } - function getResolvedProjectReferenceToRedirect(fileName) { - if (mapFromFileToProjectReferenceRedirects === void 0) { - mapFromFileToProjectReferenceRedirects = /* @__PURE__ */ new Map(); - forEachResolvedProjectReference2((referencedProject) => { - if (toPath3(options.configFilePath) !== referencedProject.sourceFile.path) { - referencedProject.commandLine.fileNames.forEach((f) => mapFromFileToProjectReferenceRedirects.set(toPath3(f), referencedProject.sourceFile.path)); - } - }); - } - const referencedProjectPath = mapFromFileToProjectReferenceRedirects.get(toPath3(fileName)); - return referencedProjectPath && getResolvedProjectReferenceByPath(referencedProjectPath); - } - function forEachResolvedProjectReference2(cb) { - return forEachResolvedProjectReference(resolvedProjectReferences, cb); - } - function getSourceOfProjectReferenceRedirect(path) { - if (!isDeclarationFileName(path)) - return void 0; - if (mapFromToProjectReferenceRedirectSource === void 0) { - mapFromToProjectReferenceRedirectSource = /* @__PURE__ */ new Map(); - forEachResolvedProjectReference2((resolvedRef) => { - const out = outFile(resolvedRef.commandLine.options); - if (out) { - const outputDts = changeExtension(out, ".d.ts" /* Dts */); - mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), true); - } else { - const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames())); - forEach(resolvedRef.commandLine.fileNames, (fileName) => { - if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) { - const outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3); - mapFromToProjectReferenceRedirectSource.set(toPath3(outputDts), fileName); - } - }); - } - }); - } - return mapFromToProjectReferenceRedirectSource.get(path); - } - function isSourceOfProjectReferenceRedirect(fileName) { - return useSourceOfProjectReferenceRedirect && !!getResolvedProjectReferenceToRedirect(fileName); - } - function getResolvedProjectReferenceByPath(projectReferencePath) { - if (!projectReferenceRedirects) { - return void 0; - } - return projectReferenceRedirects.get(projectReferencePath) || void 0; - } - function processReferencedFiles(file, isDefaultLib) { - forEach(file.referencedFiles, (ref, index) => { - processSourceFile( - resolveTripleslashReference(ref.fileName, file.fileName), - isDefaultLib, - /*ignoreNoDefaultLib*/ - false, - /*packageId*/ - void 0, - { kind: 4 /* ReferenceFile */, file: file.path, index } - ); - }); - } - function processTypeReferenceDirectives(file) { - const typeDirectives = file.typeReferenceDirectives; - if (!typeDirectives.length) { - file.resolvedTypeReferenceDirectiveNames = void 0; - return; - } - const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file); - for (let index = 0; index < typeDirectives.length; index++) { - const ref = file.typeReferenceDirectives[index]; - const resolvedTypeReferenceDirective = resolutions[index]; - const fileName = toFileNameLowerCase(ref.fileName); - setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective, getModeForFileReference(ref, file.impliedNodeFormat)); - const mode = ref.resolutionMode || file.impliedNodeFormat; - if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) { - (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({ - kind: 2 /* ResolutionDiagnostics */, - diagnostics: [ - createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext) - ] - }); - } - processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index }); - } - } - function processTypeReferenceDirective(typeReferenceDirective, mode, resolution, reason) { - var _a2, _b2; - (_a2 = tracing) == null ? void 0 : _a2.push(tracing.Phase.Program, "processTypeReferenceDirective", { directive: typeReferenceDirective, hasResolved: !!resolution.resolvedTypeReferenceDirective, refKind: reason.kind, refPath: isReferencedFile(reason) ? reason.file : void 0 }); - processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolution, reason); - (_b2 = tracing) == null ? void 0 : _b2.pop(); - } - function processTypeReferenceDirectiveWorker(typeReferenceDirective, mode, resolution, reason) { - var _a2; - addResolutionDiagnostics(resolution); - const previousResolution = (_a2 = resolvedTypeReferenceDirectives.get(typeReferenceDirective, mode)) == null ? void 0 : _a2.resolvedTypeReferenceDirective; - if (previousResolution && previousResolution.primary) { - return; - } - let saveResolution = true; - const { resolvedTypeReferenceDirective } = resolution; - if (resolvedTypeReferenceDirective) { - if (resolvedTypeReferenceDirective.isExternalLibraryImport) - currentNodeModulesDepth++; - if (resolvedTypeReferenceDirective.primary) { - processSourceFile( - resolvedTypeReferenceDirective.resolvedFileName, - /*isDefaultLib*/ - false, - /*ignoreNoDefaultLib*/ - false, - resolvedTypeReferenceDirective.packageId, - reason - ); - } else { - if (previousResolution) { - if (resolvedTypeReferenceDirective.resolvedFileName !== previousResolution.resolvedFileName) { - const otherFileText = host.readFile(resolvedTypeReferenceDirective.resolvedFileName); - const existingFile = getSourceFile(previousResolution.resolvedFileName); - if (otherFileText !== existingFile.text) { - addFilePreprocessingFileExplainingDiagnostic( - existingFile, - reason, - Diagnostics.Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict, - [typeReferenceDirective, resolvedTypeReferenceDirective.resolvedFileName, previousResolution.resolvedFileName] - ); - } - } - saveResolution = false; - } else { - processSourceFile( - resolvedTypeReferenceDirective.resolvedFileName, - /*isDefaultLib*/ - false, - /*ignoreNoDefaultLib*/ - false, - resolvedTypeReferenceDirective.packageId, - reason - ); - } - } - if (resolvedTypeReferenceDirective.isExternalLibraryImport) - currentNodeModulesDepth--; - } else { - addFilePreprocessingFileExplainingDiagnostic( - /*file*/ - void 0, - reason, - Diagnostics.Cannot_find_type_definition_file_for_0, - [typeReferenceDirective] - ); - } - if (saveResolution) { - resolvedTypeReferenceDirectives.set(typeReferenceDirective, mode, resolution); - } - } - function pathForLibFile(libFileName) { - const existing = resolvedLibReferences == null ? void 0 : resolvedLibReferences.get(libFileName); - if (existing) - return existing.actual; - const result = pathForLibFileWorker(libFileName); - (resolvedLibReferences ?? (resolvedLibReferences = /* @__PURE__ */ new Map())).set(libFileName, result); - return result.actual; - } - function pathForLibFileWorker(libFileName) { - var _a2, _b2, _c2, _d2, _e2; - const existing = resolvedLibProcessing == null ? void 0 : resolvedLibProcessing.get(libFileName); - if (existing) - return existing; - if (structureIsReused !== 0 /* Not */ && oldProgram && !hasInvalidatedLibResolutions(libFileName)) { - const oldResolution = (_a2 = oldProgram.resolvedLibReferences) == null ? void 0 : _a2.get(libFileName); - if (oldResolution) { - if (oldResolution.resolution && isTraceEnabled(options, host)) { - const libraryName2 = getLibraryNameFromLibFileName(libFileName); - const resolveFrom2 = getInferredLibraryNameResolveFrom(options, currentDirectory, libFileName); - trace( - host, - oldResolution.resolution.resolvedModule ? oldResolution.resolution.resolvedModule.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, - libraryName2, - getNormalizedAbsolutePath(resolveFrom2, currentDirectory), - (_b2 = oldResolution.resolution.resolvedModule) == null ? void 0 : _b2.resolvedFileName, - ((_c2 = oldResolution.resolution.resolvedModule) == null ? void 0 : _c2.packageId) && packageIdToString(oldResolution.resolution.resolvedModule.packageId) - ); - } - (resolvedLibProcessing ?? (resolvedLibProcessing = /* @__PURE__ */ new Map())).set(libFileName, oldResolution); - return oldResolution; - } - } - const libraryName = getLibraryNameFromLibFileName(libFileName); - const resolveFrom = getInferredLibraryNameResolveFrom(options, currentDirectory, libFileName); - (_d2 = tracing) == null ? void 0 : _d2.push(tracing.Phase.Program, "resolveLibrary", { resolveFrom }); - mark("beforeResolveLibrary"); - const resolution = actualResolveLibrary(libraryName, resolveFrom, options, libFileName); - mark("afterResolveLibrary"); - measure("ResolveLibrary", "beforeResolveLibrary", "afterResolveLibrary"); - (_e2 = tracing) == null ? void 0 : _e2.pop(); - const result = { - resolution, - actual: resolution.resolvedModule ? resolution.resolvedModule.resolvedFileName : combinePaths(defaultLibraryPath, libFileName) - }; - (resolvedLibProcessing ?? (resolvedLibProcessing = /* @__PURE__ */ new Map())).set(libFileName, result); - return result; - } - function processLibReferenceDirectives(file) { - forEach(file.libReferenceDirectives, (libReference, index) => { - const { libName, libFileName } = getLibFileNameFromLibReference(libReference); - if (libFileName) { - processRootFile( - pathForLibFile(libFileName), - /*isDefaultLib*/ - true, - /*ignoreNoDefaultLib*/ - true, - { kind: 7 /* LibReferenceDirective */, file: file.path, index } - ); - } else { - const unqualifiedLibName = removeSuffix(removePrefix(libName, "lib."), ".d.ts"); - const suggestion = getSpellingSuggestion(unqualifiedLibName, libs, identity); - const diagnostic = suggestion ? Diagnostics.Cannot_find_lib_definition_for_0_Did_you_mean_1 : Diagnostics.Cannot_find_lib_definition_for_0; - const args = suggestion ? [libName, suggestion] : [libName]; - (fileProcessingDiagnostics || (fileProcessingDiagnostics = [])).push({ - kind: 0 /* FilePreprocessingReferencedDiagnostic */, - reason: { kind: 7 /* LibReferenceDirective */, file: file.path, index }, - diagnostic, - args - }); - } - }); - } - function getCanonicalFileName(fileName) { - return host.getCanonicalFileName(fileName); - } - function processImportedModules(file) { - var _a2; - collectExternalModuleReferences(file); - if (file.imports.length || file.moduleAugmentations.length) { - const moduleNames = getModuleNames(file); - const resolutions = resolveModuleNamesReusingOldState(moduleNames, file); - Debug.assert(resolutions.length === moduleNames.length); - const optionsForFile = (useSourceOfProjectReferenceRedirect ? (_a2 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a2.commandLine.options : void 0) || options; - for (let index = 0; index < moduleNames.length; index++) { - const resolution = resolutions[index].resolvedModule; - const moduleName = moduleNames[index].text; - const mode = getModeForUsageLocation(file, moduleNames[index]); - setResolvedModule(file, moduleName, resolutions[index], mode); - addResolutionDiagnosticsFromResolutionOrCache(file, moduleName, resolutions[index], mode); - if (!resolution) { - continue; - } - const isFromNodeModulesSearch = resolution.isExternalLibraryImport; - const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension); - const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile; - const resolvedFileName = resolution.resolvedFileName; - if (isFromNodeModulesSearch) { - currentNodeModulesDepth++; - } - const elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth; - const shouldAddFile = resolvedFileName && !getResolutionDiagnostic(optionsForFile, resolution, file) && !optionsForFile.noResolve && index < file.imports.length && !elideImport && !(isJsFile && !getAllowJSCompilerOption(optionsForFile)) && (isInJSFile(file.imports[index]) || !(file.imports[index].flags & 16777216 /* JSDoc */)); - if (elideImport) { - modulesWithElidedImports.set(file.path, true); - } else if (shouldAddFile) { - findSourceFile( - resolvedFileName, - /*isDefaultLib*/ - false, - /*ignoreNoDefaultLib*/ - false, - { kind: 3 /* Import */, file: file.path, index }, - resolution.packageId - ); - } - if (isFromNodeModulesSearch) { - currentNodeModulesDepth--; - } - } - } else { - file.resolvedModules = void 0; - } - } - function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { - let allFilesBelongToPath = true; - const absoluteRootDirectoryPath = host.getCanonicalFileName(getNormalizedAbsolutePath(rootDirectory, currentDirectory)); - for (const sourceFile of sourceFiles) { - if (!sourceFile.isDeclarationFile) { - const absoluteSourceFilePath = host.getCanonicalFileName(getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory)); - if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) { - addProgramDiagnosticExplainingFile( - sourceFile, - Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, - [sourceFile.fileName, rootDirectory] - ); - allFilesBelongToPath = false; - } - } - } - return allFilesBelongToPath; - } - function parseProjectReferenceConfigFile(ref) { - if (!projectReferenceRedirects) { - projectReferenceRedirects = /* @__PURE__ */ new Map(); - } - const refPath = resolveProjectReferencePath(ref); - const sourceFilePath = toPath3(refPath); - const fromCache = projectReferenceRedirects.get(sourceFilePath); - if (fromCache !== void 0) { - return fromCache || void 0; - } - let commandLine; - let sourceFile; - if (host.getParsedCommandLine) { - commandLine = host.getParsedCommandLine(refPath); - if (!commandLine) { - addFileToFilesByName( - /*file*/ - void 0, - sourceFilePath, - /*redirectedPath*/ - void 0 - ); - projectReferenceRedirects.set(sourceFilePath, false); - return void 0; - } - sourceFile = Debug.checkDefined(commandLine.options.configFile); - Debug.assert(!sourceFile.path || sourceFile.path === sourceFilePath); - addFileToFilesByName( - sourceFile, - sourceFilePath, - /*redirectedPath*/ - void 0 - ); - } else { - const basePath = getNormalizedAbsolutePath(getDirectoryPath(refPath), currentDirectory); - sourceFile = host.getSourceFile(refPath, 100 /* JSON */); - addFileToFilesByName( - sourceFile, - sourceFilePath, - /*redirectedPath*/ - void 0 - ); - if (sourceFile === void 0) { - projectReferenceRedirects.set(sourceFilePath, false); - return void 0; - } - commandLine = parseJsonSourceFileConfigFileContent( - sourceFile, - configParsingHost, - basePath, - /*existingOptions*/ - void 0, - refPath - ); - } - sourceFile.fileName = refPath; - sourceFile.path = sourceFilePath; - sourceFile.resolvedPath = sourceFilePath; - sourceFile.originalFileName = refPath; - const resolvedRef = { commandLine, sourceFile }; - projectReferenceRedirects.set(sourceFilePath, resolvedRef); - if (commandLine.projectReferences) { - resolvedRef.references = commandLine.projectReferences.map(parseProjectReferenceConfigFile); - } - return resolvedRef; - } - function verifyCompilerOptions() { - if (options.strictPropertyInitialization && !getStrictOptionValue(options, "strictNullChecks")) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks"); - } - if (options.exactOptionalPropertyTypes && !getStrictOptionValue(options, "strictNullChecks")) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "exactOptionalPropertyTypes", "strictNullChecks"); - } - if (options.isolatedModules || options.verbatimModuleSyntax) { - if (options.out) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "out", options.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"); - } - if (options.outFile) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "outFile", options.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules"); - } - } - if (options.inlineSourceMap) { - if (options.sourceMap) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "sourceMap", "inlineSourceMap"); - } - if (options.mapRoot) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "mapRoot", "inlineSourceMap"); - } - } - if (options.composite) { - if (options.declaration === false) { - createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_declaration_emit, "declaration"); - } - if (options.incremental === false) { - createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_incremental_compilation, "declaration"); - } - } - const outputFile = outFile(options); - if (options.tsBuildInfoFile) { - if (!isIncrementalCompilation(options)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "tsBuildInfoFile", "incremental", "composite"); - } - } else if (options.incremental && !outputFile && !options.configFilePath) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); - } - verifyDeprecatedCompilerOptions(); - verifyProjectReferences(); - if (options.composite) { - const rootPaths = new Set(rootNames.map(toPath3)); - for (const file of files) { - if (sourceFileMayBeEmitted(file, program) && !rootPaths.has(file.path)) { - addProgramDiagnosticExplainingFile( - file, - Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, - [file.fileName, options.configFilePath || ""] - ); - } - } - } - if (options.paths) { - for (const key in options.paths) { - if (!hasProperty(options.paths, key)) { - continue; - } - if (!hasZeroOrOneAsteriskCharacter(key)) { - createDiagnosticForOptionPaths( - /*onKey*/ - true, - key, - Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character, - key - ); - } - if (isArray(options.paths[key])) { - const len = options.paths[key].length; - if (len === 0) { - createDiagnosticForOptionPaths( - /*onKey*/ - false, - key, - Diagnostics.Substitutions_for_pattern_0_shouldn_t_be_an_empty_array, - key - ); - } - for (let i = 0; i < len; i++) { - const subst = options.paths[key][i]; - const typeOfSubst = typeof subst; - if (typeOfSubst === "string") { - if (!hasZeroOrOneAsteriskCharacter(subst)) { - createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, subst, key); - } - if (!options.baseUrl && !pathIsRelative(subst) && !pathIsAbsolute(subst)) { - createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash); - } - } else { - createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2, subst, key, typeOfSubst); - } - } - } else { - createDiagnosticForOptionPaths( - /*onKey*/ - false, - key, - Diagnostics.Substitutions_for_pattern_0_should_be_an_array, - key - ); - } - } - } - if (!options.sourceMap && !options.inlineSourceMap) { - if (options.inlineSources) { - createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "inlineSources"); - } - if (options.sourceRoot) { - createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided, "sourceRoot"); - } - } - if (options.out && options.outFile) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "out", "outFile"); - } - if (options.mapRoot && !(options.sourceMap || options.declarationMap)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "mapRoot", "sourceMap", "declarationMap"); - } - if (options.declarationDir) { - if (!getEmitDeclarations(options)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationDir", "declaration", "composite"); - } - if (outputFile) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "declarationDir", options.out ? "out" : "outFile"); - } - } - if (options.declarationMap && !getEmitDeclarations(options)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationMap", "declaration", "composite"); - } - if (options.lib && options.noLib) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "lib", "noLib"); - } - if (options.noImplicitUseStrict && getStrictOptionValue(options, "alwaysStrict")) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noImplicitUseStrict", "alwaysStrict"); - } - const languageVersion = getEmitScriptTarget(options); - const firstNonAmbientExternalModuleSourceFile = find(files, (f) => isExternalModule(f) && !f.isDeclarationFile); - if (options.isolatedModules || options.verbatimModuleSyntax) { - if (options.module === 0 /* None */ && languageVersion < 2 /* ES2015 */ && options.isolatedModules) { - createDiagnosticForOptionName(Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher, "isolatedModules", "target"); - } - if (options.preserveConstEnums === false) { - createDiagnosticForOptionName(Diagnostics.Option_preserveConstEnums_cannot_be_disabled_when_0_is_enabled, options.verbatimModuleSyntax ? "verbatimModuleSyntax" : "isolatedModules", "preserveConstEnums"); - } - } else if (firstNonAmbientExternalModuleSourceFile && languageVersion < 2 /* ES2015 */ && options.module === 0 /* None */) { - const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator); - programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_use_imports_exports_or_module_augmentations_when_module_is_none)); - } - if (outputFile && !options.emitDeclarationOnly) { - if (options.module && !(options.module === 2 /* AMD */ || options.module === 4 /* System */)) { - createDiagnosticForOptionName(Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0, options.out ? "out" : "outFile", "module"); - } else if (options.module === void 0 && firstNonAmbientExternalModuleSourceFile) { - const span = getErrorSpanForNode(firstNonAmbientExternalModuleSourceFile, typeof firstNonAmbientExternalModuleSourceFile.externalModuleIndicator === "boolean" ? firstNonAmbientExternalModuleSourceFile : firstNonAmbientExternalModuleSourceFile.externalModuleIndicator); - programDiagnostics.add(createFileDiagnostic(firstNonAmbientExternalModuleSourceFile, span.start, span.length, Diagnostics.Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system, options.out ? "out" : "outFile")); - } - } - if (getResolveJsonModule(options)) { - if (getEmitModuleResolutionKind(options) === 1 /* Classic */) { - createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_when_moduleResolution_is_set_to_classic, "resolveJsonModule"); - } else if (!hasJsonModuleEmitEnabled(options)) { - createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext, "resolveJsonModule", "module"); - } - } - if (options.outDir || // there is --outDir specified - options.rootDir || // there is --rootDir specified - options.sourceRoot || // there is --sourceRoot specified - options.mapRoot) { - const dir = getCommonSourceDirectory2(); - if (options.outDir && dir === "" && files.some((file) => getRootLength(file.fileName) > 1)) { - createDiagnosticForOptionName(Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files, "outDir"); - } - } - if (options.useDefineForClassFields && languageVersion === 0 /* ES3 */) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_target_is_ES3, "useDefineForClassFields"); - } - if (options.checkJs && !getAllowJSCompilerOption(options)) { - programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs")); - } - if (options.emitDeclarationOnly) { - if (!getEmitDeclarations(options)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "emitDeclarationOnly", "declaration", "composite"); - } - if (options.noEmit) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "emitDeclarationOnly", "noEmit"); - } - } - if (options.emitDecoratorMetadata && !options.experimentalDecorators) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"); - } - if (options.jsxFactory) { - if (options.reactNamespace) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "reactNamespace", "jsxFactory"); - } - if (options.jsx === 4 /* ReactJSX */ || options.jsx === 5 /* ReactJSXDev */) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFactory", inverseJsxOptionMap.get("" + options.jsx)); - } - if (!parseIsolatedEntityName(options.jsxFactory, languageVersion)) { - createOptionValueDiagnostic("jsxFactory", Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name, options.jsxFactory); - } - } else if (options.reactNamespace && !isIdentifierText(options.reactNamespace, languageVersion)) { - createOptionValueDiagnostic("reactNamespace", Diagnostics.Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier, options.reactNamespace); - } - if (options.jsxFragmentFactory) { - if (!options.jsxFactory) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "jsxFragmentFactory", "jsxFactory"); - } - if (options.jsx === 4 /* ReactJSX */ || options.jsx === 5 /* ReactJSXDev */) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFragmentFactory", inverseJsxOptionMap.get("" + options.jsx)); - } - if (!parseIsolatedEntityName(options.jsxFragmentFactory, languageVersion)) { - createOptionValueDiagnostic("jsxFragmentFactory", Diagnostics.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name, options.jsxFragmentFactory); - } - } - if (options.reactNamespace) { - if (options.jsx === 4 /* ReactJSX */ || options.jsx === 5 /* ReactJSXDev */) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "reactNamespace", inverseJsxOptionMap.get("" + options.jsx)); - } - } - if (options.jsxImportSource) { - if (options.jsx === 2 /* React */) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxImportSource", inverseJsxOptionMap.get("" + options.jsx)); - } - } - if (options.preserveValueImports && getEmitModuleKind(options) < 5 /* ES2015 */) { - createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later, "preserveValueImports"); - } - const moduleKind = getEmitModuleKind(options); - if (options.verbatimModuleSyntax) { - if (moduleKind === 2 /* AMD */ || moduleKind === 3 /* UMD */ || moduleKind === 4 /* System */) { - createDiagnosticForOptionName(Diagnostics.Option_verbatimModuleSyntax_cannot_be_used_when_module_is_set_to_UMD_AMD_or_System, "verbatimModuleSyntax"); - } - if (options.preserveValueImports) { - createRedundantOptionDiagnostic("preserveValueImports", "verbatimModuleSyntax"); - } - if (options.importsNotUsedAsValues) { - createRedundantOptionDiagnostic("importsNotUsedAsValues", "verbatimModuleSyntax"); - } - } - if (options.allowImportingTsExtensions && !(options.noEmit || options.emitDeclarationOnly)) { - createOptionValueDiagnostic("allowImportingTsExtensions", Diagnostics.Option_allowImportingTsExtensions_can_only_be_used_when_either_noEmit_or_emitDeclarationOnly_is_set); - } - const moduleResolution = getEmitModuleResolutionKind(options); - if (options.resolvePackageJsonExports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { - createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonExports"); - } - if (options.resolvePackageJsonImports && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { - createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "resolvePackageJsonImports"); - } - if (options.customConditions && !moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { - createDiagnosticForOptionName(Diagnostics.Option_0_can_only_be_used_when_moduleResolution_is_set_to_node16_nodenext_or_bundler, "customConditions"); - } - if (moduleResolution === 100 /* Bundler */ && !emitModuleKindIsNonNodeESM(moduleKind)) { - createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_0_can_only_be_used_when_module_is_set_to_es2015_or_later, "bundler"); - } - if (ModuleKind[moduleKind] && (100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */) && !(3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) { - const moduleKindName = ModuleKind[moduleKind]; - createOptionValueDiagnostic("moduleResolution", Diagnostics.Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_module_is_set_to_1, moduleKindName, moduleKindName); - } else if (ModuleResolutionKind[moduleResolution] && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */) && !(100 /* Node16 */ <= moduleKind && moduleKind <= 199 /* NodeNext */)) { - const moduleResolutionName = ModuleResolutionKind[moduleResolution]; - createOptionValueDiagnostic("module", Diagnostics.Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1, moduleResolutionName, moduleResolutionName); - } - if (!options.noEmit && !options.suppressOutputPathCheck) { - const emitHost = getEmitHost(); - const emitFilesSeen = /* @__PURE__ */ new Set(); - forEachEmittedFile(emitHost, (emitFileNames) => { - if (!options.emitDeclarationOnly) { - verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen); - } - verifyEmitFilePath(emitFileNames.declarationFilePath, emitFilesSeen); - }); - } - function verifyEmitFilePath(emitFileName, emitFilesSeen) { - if (emitFileName) { - const emitFilePath = toPath3(emitFileName); - if (filesByName.has(emitFilePath)) { - let chain; - if (!options.configFilePath) { - chain = chainDiagnosticMessages( - /*details*/ - void 0, - 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 - ); - } - chain = chainDiagnosticMessages(chain, Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file, emitFileName); - blockEmittingOfFile(emitFileName, createCompilerDiagnosticFromMessageChain(chain)); - } - const emitFileKey = !host.useCaseSensitiveFileNames() ? toFileNameLowerCase(emitFilePath) : emitFilePath; - if (emitFilesSeen.has(emitFileKey)) { - blockEmittingOfFile(emitFileName, createCompilerDiagnostic(Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files, emitFileName)); - } else { - emitFilesSeen.add(emitFileKey); - } - } - } - } - function getIgnoreDeprecationsVersion() { - const ignoreDeprecations = options.ignoreDeprecations; - if (ignoreDeprecations) { - if (ignoreDeprecations === "5.0") { - return new Version(ignoreDeprecations); - } - reportInvalidIgnoreDeprecations(); - } - return Version.zero; - } - function checkDeprecations(deprecatedIn, removedIn, createDiagnostic, fn) { - const deprecatedInVersion = new Version(deprecatedIn); - const removedInVersion = new Version(removedIn); - const typescriptVersion = new Version(typeScriptVersion3 || versionMajorMinor); - const ignoreDeprecationsVersion = getIgnoreDeprecationsVersion(); - const mustBeRemoved = !(removedInVersion.compareTo(typescriptVersion) === 1 /* GreaterThan */); - const canBeSilenced = !mustBeRemoved && ignoreDeprecationsVersion.compareTo(deprecatedInVersion) === -1 /* LessThan */; - if (mustBeRemoved || canBeSilenced) { - fn((name, value, useInstead) => { - if (mustBeRemoved) { - if (value === void 0) { - createDiagnostic(name, value, useInstead, Diagnostics.Option_0_has_been_removed_Please_remove_it_from_your_configuration, name); - } else { - createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_has_been_removed_Please_remove_it_from_your_configuration, name, value); - } - } else { - if (value === void 0) { - createDiagnostic(name, value, useInstead, Diagnostics.Option_0_is_deprecated_and_will_stop_functioning_in_TypeScript_1_Specify_compilerOption_ignoreDeprecations_Colon_2_to_silence_this_error, name, removedIn, deprecatedIn); - } else { - createDiagnostic(name, value, useInstead, Diagnostics.Option_0_1_is_deprecated_and_will_stop_functioning_in_TypeScript_2_Specify_compilerOption_ignoreDeprecations_Colon_3_to_silence_this_error, name, value, removedIn, deprecatedIn); - } - } - }); - } - } - function verifyDeprecatedCompilerOptions() { - function createDiagnostic(name, value, useInstead, message, ...args) { - if (useInstead) { - const details = chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Use_0_instead, - useInstead - ); - const chain = chainDiagnosticMessages(details, message, ...args); - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - chain - ); - } else { - createDiagnosticForOption( - /*onKey*/ - !value, - name, - /*option2*/ - void 0, - message, - ...args - ); - } - } - checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { - if (options.target === 0 /* ES3 */) { - createDeprecatedDiagnostic("target", "ES3"); - } - if (options.noImplicitUseStrict) { - createDeprecatedDiagnostic("noImplicitUseStrict"); - } - if (options.keyofStringsOnly) { - createDeprecatedDiagnostic("keyofStringsOnly"); - } - if (options.suppressExcessPropertyErrors) { - createDeprecatedDiagnostic("suppressExcessPropertyErrors"); - } - if (options.suppressImplicitAnyIndexErrors) { - createDeprecatedDiagnostic("suppressImplicitAnyIndexErrors"); - } - if (options.noStrictGenericChecks) { - createDeprecatedDiagnostic("noStrictGenericChecks"); - } - if (options.charset) { - createDeprecatedDiagnostic("charset"); - } - if (options.out) { - createDeprecatedDiagnostic( - "out", - /*value*/ - void 0, - "outFile" - ); - } - if (options.importsNotUsedAsValues) { - createDeprecatedDiagnostic( - "importsNotUsedAsValues", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } - if (options.preserveValueImports) { - createDeprecatedDiagnostic( - "preserveValueImports", - /*value*/ - void 0, - "verbatimModuleSyntax" - ); - } - }); - } - function verifyDeprecatedProjectReference(ref, parentFile, index) { - function createDiagnostic(_name, _value, _useInstead, message, ...args) { - createDiagnosticForReference(parentFile, index, message, ...args); - } - checkDeprecations("5.0", "5.5", createDiagnostic, (createDeprecatedDiagnostic) => { - if (ref.prepend) { - createDeprecatedDiagnostic("prepend"); - } - }); - } - function createDiagnosticExplainingFile(file, fileProcessingReason, diagnostic, args) { - var _a2; - let fileIncludeReasons; - let relatedInfo; - let locationReason = isReferencedFile(fileProcessingReason) ? fileProcessingReason : void 0; - if (file) - (_a2 = fileReasons.get(file.path)) == null ? void 0 : _a2.forEach(processReason); - if (fileProcessingReason) - processReason(fileProcessingReason); - if (locationReason && (fileIncludeReasons == null ? void 0 : fileIncludeReasons.length) === 1) - fileIncludeReasons = void 0; - const location = locationReason && getReferencedFileLocation(getSourceFileByPath, locationReason); - const fileIncludeReasonDetails = fileIncludeReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon); - const redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file); - const chain = chainDiagnosticMessages(redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails, diagnostic, ...args || emptyArray); - return location && isReferenceFileLocation(location) ? createFileDiagnosticFromMessageChain(location.file, location.pos, location.end - location.pos, chain, relatedInfo) : createCompilerDiagnosticFromMessageChain(chain, relatedInfo); - function processReason(reason) { - (fileIncludeReasons || (fileIncludeReasons = [])).push(fileIncludeReasonToDiagnostics(program, reason)); - if (!locationReason && isReferencedFile(reason)) { - locationReason = reason; - } else if (locationReason !== reason) { - relatedInfo = append(relatedInfo, fileIncludeReasonToRelatedInformation(reason)); - } - if (reason === fileProcessingReason) - fileProcessingReason = void 0; - } - } - function addFilePreprocessingFileExplainingDiagnostic(file, fileProcessingReason, diagnostic, args) { - (fileProcessingDiagnostics || (fileProcessingDiagnostics = [])).push({ - kind: 1 /* FilePreprocessingFileExplainingDiagnostic */, - file: file && file.path, - fileProcessingReason, - diagnostic, - args - }); - } - function addProgramDiagnosticExplainingFile(file, diagnostic, args) { - programDiagnostics.add(createDiagnosticExplainingFile( - file, - /*fileProcessingReason*/ - void 0, - diagnostic, - args - )); - } - function fileIncludeReasonToRelatedInformation(reason) { - if (isReferencedFile(reason)) { - const referenceLocation = getReferencedFileLocation(getSourceFileByPath, reason); - let message2; - switch (reason.kind) { - case 3 /* Import */: - message2 = Diagnostics.File_is_included_via_import_here; - break; - case 4 /* ReferenceFile */: - message2 = Diagnostics.File_is_included_via_reference_here; - break; - case 5 /* TypeReferenceDirective */: - message2 = Diagnostics.File_is_included_via_type_library_reference_here; - break; - case 7 /* LibReferenceDirective */: - message2 = Diagnostics.File_is_included_via_library_reference_here; - break; - default: - Debug.assertNever(reason); - } - return isReferenceFileLocation(referenceLocation) ? createFileDiagnostic( - referenceLocation.file, - referenceLocation.pos, - referenceLocation.end - referenceLocation.pos, - message2 - ) : void 0; - } - if (!options.configFile) - return void 0; - let configFileNode; - let message; - switch (reason.kind) { - case 0 /* RootFile */: - if (!options.configFile.configFileSpecs) - return void 0; - const fileName = getNormalizedAbsolutePath(rootNames[reason.index], currentDirectory); - const matchedByFiles = getMatchedFileSpec(program, fileName); - if (matchedByFiles) { - configFileNode = getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles); - message = Diagnostics.File_is_matched_by_files_list_specified_here; - break; - } - const matchedByInclude = getMatchedIncludeSpec(program, fileName); - if (!matchedByInclude || !isString(matchedByInclude)) - return void 0; - configFileNode = getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude); - message = Diagnostics.File_is_matched_by_include_pattern_specified_here; - break; - case 1 /* SourceFromProjectReference */: - case 2 /* OutputFromProjectReference */: - const referencedResolvedRef = Debug.checkDefined(resolvedProjectReferences == null ? void 0 : resolvedProjectReferences[reason.index]); - const referenceInfo = forEachProjectReference( - projectReferences, - resolvedProjectReferences, - (resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent2 == null ? void 0 : parent2.sourceFile) || options.configFile, index: index2 } : void 0 - ); - if (!referenceInfo) - return void 0; - const { sourceFile, index } = referenceInfo; - const referencesSyntax = forEachTsConfigPropArray( - sourceFile, - "references", - (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 - ); - return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile( - sourceFile, - referencesSyntax.elements[index], - reason.kind === 2 /* OutputFromProjectReference */ ? Diagnostics.File_is_output_from_referenced_project_specified_here : Diagnostics.File_is_source_from_referenced_project_specified_here - ) : void 0; - case 8 /* AutomaticTypeDirectiveFile */: - if (!options.types) - return void 0; - configFileNode = getOptionsSyntaxByArrayElementValue("types", reason.typeReference); - message = Diagnostics.File_is_entry_point_of_type_library_specified_here; - break; - case 6 /* LibFile */: - if (reason.index !== void 0) { - configFileNode = getOptionsSyntaxByArrayElementValue("lib", options.lib[reason.index]); - message = Diagnostics.File_is_library_specified_here; - break; - } - const target = forEachEntry(targetOptionDeclaration.type, (value, key) => value === getEmitScriptTarget(options) ? key : void 0); - configFileNode = target ? getOptionsSyntaxByValue("target", target) : void 0; - message = Diagnostics.File_is_default_library_for_target_specified_here; - break; - default: - Debug.assertNever(reason); - } - return configFileNode && createDiagnosticForNodeInSourceFile( - options.configFile, - configFileNode, - message - ); - } - function verifyProjectReferences() { - const buildInfoPath = !options.suppressOutputPathCheck ? getTsBuildInfoEmitOutputFilePath(options) : void 0; - forEachProjectReference(projectReferences, resolvedProjectReferences, (resolvedRef, parent2, index) => { - const ref = (parent2 ? parent2.commandLine.projectReferences : projectReferences)[index]; - const parentFile = parent2 && parent2.sourceFile; - verifyDeprecatedProjectReference(ref, parentFile, index); - if (!resolvedRef) { - createDiagnosticForReference(parentFile, index, Diagnostics.File_0_not_found, ref.path); - return; - } - const options2 = resolvedRef.commandLine.options; - if (!options2.composite || options2.noEmit) { - const inputs = parent2 ? parent2.commandLine.fileNames : rootNames; - if (inputs.length) { - if (!options2.composite) - createDiagnosticForReference(parentFile, index, Diagnostics.Referenced_project_0_must_have_setting_composite_Colon_true, ref.path); - if (options2.noEmit) - createDiagnosticForReference(parentFile, index, Diagnostics.Referenced_project_0_may_not_disable_emit, ref.path); - } - } - if (ref.prepend) { - const out = outFile(options2); - if (out) { - if (!host.fileExists(out)) { - createDiagnosticForReference(parentFile, index, Diagnostics.Output_file_0_from_project_1_does_not_exist, out, ref.path); - } - } else { - createDiagnosticForReference(parentFile, index, Diagnostics.Cannot_prepend_project_0_because_it_does_not_have_outFile_set, ref.path); - } - } - if (!parent2 && buildInfoPath && buildInfoPath === getTsBuildInfoEmitOutputFilePath(options2)) { - createDiagnosticForReference(parentFile, index, Diagnostics.Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1, buildInfoPath, ref.path); - hasEmitBlockingDiagnostics.set(toPath3(buildInfoPath), true); - } - }); - } - function createDiagnosticForOptionPathKeyValue(key, valueIndex, message, ...args) { - let needCompilerDiagnostic = true; - forEachOptionPathsSyntax((pathProp) => { - if (isObjectLiteralExpression(pathProp.initializer)) { - forEachPropertyAssignment(pathProp.initializer, key, (keyProps) => { - const initializer = keyProps.initializer; - if (isArrayLiteralExpression(initializer) && initializer.elements.length > valueIndex) { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, initializer.elements[valueIndex], message, ...args)); - needCompilerDiagnostic = false; - } - }); - } - }); - if (needCompilerDiagnostic) { - programDiagnostics.add(createCompilerDiagnostic(message, ...args)); - } - } - function createDiagnosticForOptionPaths(onKey, key, message, ...args) { - let needCompilerDiagnostic = true; - forEachOptionPathsSyntax((pathProp) => { - if (isObjectLiteralExpression(pathProp.initializer) && createOptionDiagnosticInObjectLiteralSyntax( - pathProp.initializer, - onKey, - key, - /*key2*/ - void 0, - message, - ...args - )) { - needCompilerDiagnostic = false; - } - }); - if (needCompilerDiagnostic) { - programDiagnostics.add(createCompilerDiagnostic(message, ...args)); - } - } - function forEachOptionsSyntaxByName(name, callback) { - return forEachPropertyAssignment(getCompilerOptionsObjectLiteralSyntax(), name, callback); - } - function forEachOptionPathsSyntax(callback) { - return forEachOptionsSyntaxByName("paths", callback); - } - function getOptionsSyntaxByValue(name, value) { - return forEachOptionsSyntaxByName(name, (property) => isStringLiteral(property.initializer) && property.initializer.text === value ? property.initializer : void 0); - } - function getOptionsSyntaxByArrayElementValue(name, value) { - const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax(); - return compilerOptionsObjectLiteralSyntax && getPropertyArrayElementValue(compilerOptionsObjectLiteralSyntax, name, value); - } - function createDiagnosticForOptionName(message, option1, option2, option3) { - createDiagnosticForOption( - /*onKey*/ - true, - option1, - option2, - message, - option1, - option2, - option3 - ); - } - function createOptionValueDiagnostic(option1, message, ...args) { - createDiagnosticForOption( - /*onKey*/ - false, - option1, - /*option2*/ - void 0, - message, - ...args - ); - } - function createDiagnosticForReference(sourceFile, index, message, ...args) { - const referencesSyntax = forEachTsConfigPropArray( - sourceFile || options.configFile, - "references", - (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 - ); - if (referencesSyntax && referencesSyntax.elements.length > index) { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args)); - } else { - programDiagnostics.add(createCompilerDiagnostic(message, ...args)); - } - } - function createDiagnosticForOption(onKey, option1, option2, message, ...args) { - const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax(); - const needCompilerDiagnostic = !compilerOptionsObjectLiteralSyntax || !createOptionDiagnosticInObjectLiteralSyntax(compilerOptionsObjectLiteralSyntax, onKey, option1, option2, message, ...args); - if (needCompilerDiagnostic) { - if ("messageText" in message) { - programDiagnostics.add(createCompilerDiagnosticFromMessageChain(message)); - } else { - programDiagnostics.add(createCompilerDiagnostic(message, ...args)); - } - } - } - function getCompilerOptionsObjectLiteralSyntax() { - if (_compilerOptionsObjectLiteralSyntax === void 0) { - _compilerOptionsObjectLiteralSyntax = forEachPropertyAssignment( - getTsConfigObjectLiteralExpression(options.configFile), - "compilerOptions", - (prop) => isObjectLiteralExpression(prop.initializer) ? prop.initializer : void 0 - ) || false; - } - return _compilerOptionsObjectLiteralSyntax || void 0; - } - function createOptionDiagnosticInObjectLiteralSyntax(objectLiteral, onKey, key1, key2, message, ...args) { - let needsCompilerDiagnostic = false; - forEachPropertyAssignment(objectLiteral, key1, (prop) => { - if ("messageText" in message) { - programDiagnostics.add(createDiagnosticForNodeFromMessageChain(options.configFile, onKey ? prop.name : prop.initializer, message)); - } else { - programDiagnostics.add(createDiagnosticForNodeInSourceFile(options.configFile, onKey ? prop.name : prop.initializer, message, ...args)); - } - needsCompilerDiagnostic = true; - }, key2); - return needsCompilerDiagnostic; - } - function createRedundantOptionDiagnostic(errorOnOption, redundantWithOption) { - const compilerOptionsObjectLiteralSyntax = getCompilerOptionsObjectLiteralSyntax(); - if (compilerOptionsObjectLiteralSyntax) { - createOptionDiagnosticInObjectLiteralSyntax( - compilerOptionsObjectLiteralSyntax, - /*onKey*/ - true, - errorOnOption, - /*key2*/ - void 0, - Diagnostics.Option_0_is_redundant_and_cannot_be_specified_with_option_1, - errorOnOption, - redundantWithOption - ); - } else { - createDiagnosticForOptionName(Diagnostics.Option_0_is_redundant_and_cannot_be_specified_with_option_1, errorOnOption, redundantWithOption); - } - } - function blockEmittingOfFile(emitFileName, diag2) { - hasEmitBlockingDiagnostics.set(toPath3(emitFileName), true); - programDiagnostics.add(diag2); - } - function isEmittedFile(file) { - if (options.noEmit) { - return false; - } - const filePath = toPath3(file); - if (getSourceFileByPath(filePath)) { - return false; - } - const out = outFile(options); - if (out) { - return isSameFile(filePath, out) || isSameFile(filePath, removeFileExtension(out) + ".d.ts" /* Dts */); - } - if (options.declarationDir && containsPath(options.declarationDir, filePath, currentDirectory, !host.useCaseSensitiveFileNames())) { - return true; - } - if (options.outDir) { - return containsPath(options.outDir, filePath, currentDirectory, !host.useCaseSensitiveFileNames()); - } - if (fileExtensionIsOneOf(filePath, supportedJSExtensionsFlat) || isDeclarationFileName(filePath)) { - const filePathWithoutExtension = removeFileExtension(filePath); - return !!getSourceFileByPath(filePathWithoutExtension + ".ts" /* Ts */) || !!getSourceFileByPath(filePathWithoutExtension + ".tsx" /* Tsx */); - } - return false; - } - function isSameFile(file1, file2) { - return comparePaths(file1, file2, currentDirectory, !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */; - } - function getSymlinkCache() { - if (host.getSymlinkCache) { - return host.getSymlinkCache(); - } - if (!symlinks) { - symlinks = createSymlinkCache(currentDirectory, getCanonicalFileName); - } - if (files && automaticTypeDirectiveResolutions && !symlinks.hasProcessedResolutions()) { - symlinks.setSymlinksFromResolutions(files, automaticTypeDirectiveResolutions); - } - return symlinks; - } - } - function updateHostForUseSourceOfProjectReferenceRedirect(host) { - let setOfDeclarationDirectories; - const originalFileExists = host.compilerHost.fileExists; - const originalDirectoryExists = host.compilerHost.directoryExists; - const originalGetDirectories = host.compilerHost.getDirectories; - const originalRealpath = host.compilerHost.realpath; - if (!host.useSourceOfProjectReferenceRedirect) - return { onProgramCreateComplete: noop, fileExists }; - host.compilerHost.fileExists = fileExists; - let directoryExists; - if (originalDirectoryExists) { - directoryExists = host.compilerHost.directoryExists = (path) => { - if (originalDirectoryExists.call(host.compilerHost, path)) { - handleDirectoryCouldBeSymlink(path); - return true; - } - if (!host.getResolvedProjectReferences()) - return false; - if (!setOfDeclarationDirectories) { - setOfDeclarationDirectories = /* @__PURE__ */ new Set(); - host.forEachResolvedProjectReference((ref) => { - const out = outFile(ref.commandLine.options); - if (out) { - setOfDeclarationDirectories.add(getDirectoryPath(host.toPath(out))); - } else { - const declarationDir = ref.commandLine.options.declarationDir || ref.commandLine.options.outDir; - if (declarationDir) { - setOfDeclarationDirectories.add(host.toPath(declarationDir)); - } - } - }); - } - return fileOrDirectoryExistsUsingSource( - path, - /*isFile*/ - false - ); - }; - } - if (originalGetDirectories) { - host.compilerHost.getDirectories = (path) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path) ? originalGetDirectories.call(host.compilerHost, path) : []; - } - if (originalRealpath) { - host.compilerHost.realpath = (s) => { - var _a; - return ((_a = host.getSymlinkCache().getSymlinkedFiles()) == null ? void 0 : _a.get(host.toPath(s))) || originalRealpath.call(host.compilerHost, s); - }; - } - return { onProgramCreateComplete, fileExists, directoryExists }; - function onProgramCreateComplete() { - host.compilerHost.fileExists = originalFileExists; - host.compilerHost.directoryExists = originalDirectoryExists; - host.compilerHost.getDirectories = originalGetDirectories; - } - function fileExists(file) { - if (originalFileExists.call(host.compilerHost, file)) - return true; - if (!host.getResolvedProjectReferences()) - return false; - if (!isDeclarationFileName(file)) - return false; - return fileOrDirectoryExistsUsingSource( - file, - /*isFile*/ - true - ); - } - function fileExistsIfProjectReferenceDts(file) { - const source = host.getSourceOfProjectReferenceRedirect(host.toPath(file)); - return source !== void 0 ? isString(source) ? originalFileExists.call(host.compilerHost, source) : true : void 0; - } - function directoryExistsIfProjectReferenceDeclDir(dir) { - const dirPath = host.toPath(dir); - const dirPathWithTrailingDirectorySeparator = `${dirPath}${directorySeparator}`; - return forEachKey( - setOfDeclarationDirectories, - (declDirPath) => dirPath === declDirPath || // Any parent directory of declaration dir - startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) || // Any directory inside declaration dir - startsWith(dirPath, `${declDirPath}/`) - ); - } - function handleDirectoryCouldBeSymlink(directory) { - var _a; - if (!host.getResolvedProjectReferences() || containsIgnoredPath(directory)) - return; - if (!originalRealpath || !stringContains(directory, nodeModulesPathPart)) - return; - const symlinkCache = host.getSymlinkCache(); - const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory)); - if ((_a = symlinkCache.getSymlinkedDirectories()) == null ? void 0 : _a.has(directoryPath)) - return; - const real = normalizePath(originalRealpath.call(host.compilerHost, directory)); - let realPath2; - if (real === directory || (realPath2 = ensureTrailingDirectorySeparator(host.toPath(real))) === directoryPath) { - symlinkCache.setSymlinkedDirectory(directoryPath, false); - return; - } - symlinkCache.setSymlinkedDirectory(directory, { - real: ensureTrailingDirectorySeparator(real), - realPath: realPath2 - }); - } - function fileOrDirectoryExistsUsingSource(fileOrDirectory, isFile) { - var _a; - const fileOrDirectoryExistsUsingSource2 = isFile ? (file) => fileExistsIfProjectReferenceDts(file) : (dir) => directoryExistsIfProjectReferenceDeclDir(dir); - const result = fileOrDirectoryExistsUsingSource2(fileOrDirectory); - if (result !== void 0) - return result; - const symlinkCache = host.getSymlinkCache(); - const symlinkedDirectories = symlinkCache.getSymlinkedDirectories(); - if (!symlinkedDirectories) - return false; - const fileOrDirectoryPath = host.toPath(fileOrDirectory); - if (!stringContains(fileOrDirectoryPath, nodeModulesPathPart)) - return false; - if (isFile && ((_a = symlinkCache.getSymlinkedFiles()) == null ? void 0 : _a.has(fileOrDirectoryPath))) - return true; - return firstDefinedIterator( - symlinkedDirectories.entries(), - ([directoryPath, symlinkedDirectory]) => { - if (!symlinkedDirectory || !startsWith(fileOrDirectoryPath, directoryPath)) - return void 0; - const result2 = fileOrDirectoryExistsUsingSource2(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath)); - if (isFile && result2) { - const absolutePath = getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory()); - symlinkCache.setSymlinkedFile( - fileOrDirectoryPath, - `${symlinkedDirectory.real}${absolutePath.replace(new RegExp(directoryPath, "i"), "")}` - ); - } - return result2; - } - ) || false; - } - } - function handleNoEmitOptions(program, sourceFile, writeFile2, cancellationToken) { - const options = program.getCompilerOptions(); - if (options.noEmit) { - program.getSemanticDiagnostics(sourceFile, cancellationToken); - return sourceFile || outFile(options) ? emitSkippedWithNoDiagnostics : program.emitBuildInfo(writeFile2, cancellationToken); - } - if (!options.noEmitOnError) - return void 0; - let diagnostics = [ - ...program.getOptionsDiagnostics(cancellationToken), - ...program.getSyntacticDiagnostics(sourceFile, cancellationToken), - ...program.getGlobalDiagnostics(cancellationToken), - ...program.getSemanticDiagnostics(sourceFile, cancellationToken) - ]; - if (diagnostics.length === 0 && getEmitDeclarations(program.getCompilerOptions())) { - diagnostics = program.getDeclarationDiagnostics( - /*sourceFile*/ - void 0, - cancellationToken - ); - } - if (!diagnostics.length) - return void 0; - let emittedFiles; - if (!sourceFile && !outFile(options)) { - const emitResult = program.emitBuildInfo(writeFile2, cancellationToken); - if (emitResult.diagnostics) - diagnostics = [...diagnostics, ...emitResult.diagnostics]; - emittedFiles = emitResult.emittedFiles; - } - return { diagnostics, sourceMaps: void 0, emittedFiles, emitSkipped: true }; - } - function filterSemanticDiagnostics(diagnostic, option) { - return filter(diagnostic, (d) => !d.skippedOn || !option[d.skippedOn]); - } - function parseConfigHostFromCompilerHostLike(host, directoryStructureHost = host) { - return { - fileExists: (f) => directoryStructureHost.fileExists(f), - readDirectory(root, extensions, excludes, includes, depth) { - Debug.assertIsDefined(directoryStructureHost.readDirectory, "'CompilerHost.readDirectory' must be implemented to correctly process 'projectReferences'"); - return directoryStructureHost.readDirectory(root, extensions, excludes, includes, depth); - }, - readFile: (f) => directoryStructureHost.readFile(f), - directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists), - getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories), - realpath: maybeBind(directoryStructureHost, directoryStructureHost.realpath), - useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), - getCurrentDirectory: () => host.getCurrentDirectory(), - onUnRecoverableConfigFileDiagnostic: host.onUnRecoverableConfigFileDiagnostic || returnUndefined, - trace: host.trace ? (s) => host.trace(s) : void 0 - }; - } - function createPrependNodes(projectReferences, getCommandLine, readFile, host) { - if (!projectReferences) - return emptyArray; - let nodes; - for (let i = 0; i < projectReferences.length; i++) { - const ref = projectReferences[i]; - const resolvedRefOpts = getCommandLine(ref, i); - if (ref.prepend && resolvedRefOpts && resolvedRefOpts.options) { - const out = outFile(resolvedRefOpts.options); - if (!out) - continue; - const { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath } = getOutputPathsForBundle( - resolvedRefOpts.options, - /*forceDtsPaths*/ - true - ); - const node = createInputFilesWithFilePaths(readFile, jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath, host, resolvedRefOpts.options); - (nodes || (nodes = [])).push(node); - } - } - return nodes || emptyArray; - } - function resolveProjectReferencePath(ref) { - return resolveConfigFileProjectName(ref.path); - } - function getResolutionDiagnostic(options, { extension }, { isDeclarationFile }) { - switch (extension) { - case ".ts" /* Ts */: - case ".d.ts" /* Dts */: - case ".mts" /* Mts */: - case ".d.mts" /* Dmts */: - case ".cts" /* Cts */: - case ".d.cts" /* Dcts */: - return void 0; - case ".tsx" /* Tsx */: - return needJsx(); - case ".jsx" /* Jsx */: - return needJsx() || needAllowJs(); - case ".js" /* Js */: - case ".mjs" /* Mjs */: - case ".cjs" /* Cjs */: - return needAllowJs(); - case ".json" /* Json */: - return needResolveJsonModule(); - default: - return needAllowArbitraryExtensions(); - } - function needJsx() { - return options.jsx ? void 0 : Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set; - } - function needAllowJs() { - return getAllowJSCompilerOption(options) || !getStrictOptionValue(options, "noImplicitAny") ? void 0 : Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type; - } - function needResolveJsonModule() { - return getResolveJsonModule(options) ? void 0 : Diagnostics.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used; - } - function needAllowArbitraryExtensions() { - return isDeclarationFile || options.allowArbitraryExtensions ? void 0 : Diagnostics.Module_0_was_resolved_to_1_but_allowArbitraryExtensions_is_not_set; - } - } - function getModuleNames({ imports, moduleAugmentations }) { - const res = imports.map((i) => i); - for (const aug of moduleAugmentations) { - if (aug.kind === 11 /* StringLiteral */) { - res.push(aug); - } - } - return res; - } - function getModuleNameStringLiteralAt({ imports, moduleAugmentations }, index) { - if (index < imports.length) - return imports[index]; - let augIndex = imports.length; - for (const aug of moduleAugmentations) { - if (aug.kind === 11 /* StringLiteral */) { - if (index === augIndex) - return aug; - augIndex++; - } - } - Debug.fail("should never ask for module name at index higher than possible module name"); - } - var ForegroundColorEscapeSequences, gutterStyleSequence, gutterSeparator, resetEscapeSequence, ellipsis, halfIndent, indent, emptyResolution, moduleResolutionNameAndModeGetter, typeReferenceResolutionNameAndModeGetter, inferredTypesContainingFile, plainJSErrors, emitSkippedWithNoDiagnostics; - var init_program = __esm({ - "src/compiler/program.ts"() { - "use strict"; - init_ts2(); - init_ts_performance(); - ForegroundColorEscapeSequences = /* @__PURE__ */ ((ForegroundColorEscapeSequences2) => { - ForegroundColorEscapeSequences2["Grey"] = "\x1B[90m"; - ForegroundColorEscapeSequences2["Red"] = "\x1B[91m"; - ForegroundColorEscapeSequences2["Yellow"] = "\x1B[93m"; - ForegroundColorEscapeSequences2["Blue"] = "\x1B[94m"; - ForegroundColorEscapeSequences2["Cyan"] = "\x1B[96m"; - return ForegroundColorEscapeSequences2; - })(ForegroundColorEscapeSequences || {}); - gutterStyleSequence = "\x1B[7m"; - gutterSeparator = " "; - resetEscapeSequence = "\x1B[0m"; - ellipsis = "..."; - halfIndent = " "; - indent = " "; - emptyResolution = { - resolvedModule: void 0, - resolvedTypeReferenceDirective: void 0 - }; - moduleResolutionNameAndModeGetter = { - getName: getModuleResolutionName, - getMode: (entry, file) => getModeForUsageLocation(file, entry) - }; - typeReferenceResolutionNameAndModeGetter = { - getName: getTypeReferenceResolutionName, - getMode: (entry, file) => getModeForFileReference(entry, file == null ? void 0 : file.impliedNodeFormat) - }; - inferredTypesContainingFile = "__inferred type names__.ts"; - plainJSErrors = /* @__PURE__ */ new Set([ - // binder errors - Diagnostics.Cannot_redeclare_block_scoped_variable_0.code, - Diagnostics.A_module_cannot_have_multiple_default_exports.code, - Diagnostics.Another_export_default_is_here.code, - Diagnostics.The_first_export_default_is_here.code, - Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module.code, - Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode.code, - Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here.code, - Diagnostics.constructor_is_a_reserved_word.code, - Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode.code, - Diagnostics.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode.code, - Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code, - Diagnostics.Invalid_use_of_0_in_strict_mode.code, - Diagnostics.A_label_is_not_allowed_here.code, - Diagnostics.with_statements_are_not_allowed_in_strict_mode.code, - // grammar errors - Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code, - Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement.code, - Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name.code, - Diagnostics.A_class_member_cannot_have_the_0_keyword.code, - Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name.code, - Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement.code, - Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code, - Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement.code, - Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement.code, - Diagnostics.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration.code, - Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context.code, - Diagnostics.A_destructuring_declaration_must_have_an_initializer.code, - Diagnostics.A_get_accessor_cannot_have_parameters.code, - Diagnostics.A_rest_element_cannot_contain_a_binding_pattern.code, - Diagnostics.A_rest_element_cannot_have_a_property_name.code, - Diagnostics.A_rest_element_cannot_have_an_initializer.code, - Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern.code, - Diagnostics.A_rest_parameter_cannot_have_an_initializer.code, - Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list.code, - Diagnostics.A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma.code, - Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block.code, - Diagnostics.A_set_accessor_cannot_have_rest_parameter.code, - Diagnostics.A_set_accessor_must_have_exactly_one_parameter.code, - Diagnostics.An_export_declaration_can_only_be_used_at_the_top_level_of_a_module.code, - Diagnostics.An_export_declaration_cannot_have_modifiers.code, - Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module.code, - Diagnostics.An_import_declaration_cannot_have_modifiers.code, - Diagnostics.An_object_member_cannot_be_declared_optional.code, - Diagnostics.Argument_of_dynamic_import_cannot_be_spread_element.code, - Diagnostics.Cannot_assign_to_private_method_0_Private_methods_are_not_writable.code, - Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause.code, - Diagnostics.Catch_clause_variable_cannot_have_an_initializer.code, - Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator.code, - Diagnostics.Classes_can_only_extend_a_single_class.code, - Diagnostics.Classes_may_not_have_a_field_named_constructor.code, - 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, - Diagnostics.Duplicate_label_0.code, - Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, - Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, - Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, - Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, - Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array.code, - Diagnostics.JSX_property_access_expressions_cannot_include_JSX_namespace_names.code, - Diagnostics.Jump_target_cannot_cross_function_boundary.code, - Diagnostics.Line_terminator_not_permitted_before_arrow.code, - Diagnostics.Modifiers_cannot_appear_here.code, - Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement.code, - Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement.code, - Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies.code, - Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code, - Diagnostics.Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier.code, - Diagnostics.Tagged_template_expressions_are_not_permitted_in_an_optional_chain.code, - Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async.code, - Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer.code, - Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer.code, - Diagnostics.Trailing_comma_not_allowed.code, - Diagnostics.Variable_declaration_list_cannot_be_empty.code, - Diagnostics._0_and_1_operations_cannot_be_mixed_without_parentheses.code, - Diagnostics._0_expected.code, - Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2.code, - Diagnostics._0_list_cannot_be_empty.code, - Diagnostics._0_modifier_already_seen.code, - Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration.code, - Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element.code, - Diagnostics._0_modifier_cannot_appear_on_a_parameter.code, - Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind.code, - Diagnostics._0_modifier_cannot_be_used_here.code, - Diagnostics._0_modifier_must_precede_1_modifier.code, - Diagnostics._0_declarations_can_only_be_declared_inside_a_block.code, - Diagnostics._0_declarations_must_be_initialized.code, - Diagnostics.extends_clause_already_seen.code, - Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code, - Diagnostics.Class_constructor_may_not_be_a_generator.code, - Diagnostics.Class_constructor_may_not_be_an_accessor.code, - Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, - Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, - Diagnostics.Private_field_0_must_be_declared_in_an_enclosing_class.code, - // Type errors - Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value.code - ]); - emitSkippedWithNoDiagnostics = { diagnostics: emptyArray, sourceMaps: void 0, emittedFiles: void 0, emitSkipped: true }; - } - }); - - // src/compiler/builderStatePublic.ts - var init_builderStatePublic = __esm({ - "src/compiler/builderStatePublic.ts"() { - "use strict"; - } - }); - - // src/compiler/builderState.ts - function getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit) { - const outputFiles = []; - const { emitSkipped, diagnostics } = program.emit(sourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit); - return { outputFiles, emitSkipped, diagnostics }; - function writeFile2(fileName, text, writeByteOrderMark) { - outputFiles.push({ name: fileName, writeByteOrderMark, text }); - } - } - var BuilderState; - var init_builderState = __esm({ - "src/compiler/builderState.ts"() { - "use strict"; - init_ts2(); - ((BuilderState2) => { - function createManyToManyPathMap() { - function create2(forward, reverse, deleted) { - const map2 = { - getKeys: (v) => reverse.get(v), - getValues: (k) => forward.get(k), - keys: () => forward.keys(), - deleteKey: (k) => { - (deleted || (deleted = /* @__PURE__ */ new Set())).add(k); - const set = forward.get(k); - if (!set) { - return false; - } - set.forEach((v) => deleteFromMultimap(reverse, v, k)); - forward.delete(k); - return true; - }, - set: (k, vSet) => { - deleted == null ? void 0 : deleted.delete(k); - const existingVSet = forward.get(k); - forward.set(k, vSet); - existingVSet == null ? void 0 : existingVSet.forEach((v) => { - if (!vSet.has(v)) { - deleteFromMultimap(reverse, v, k); - } - }); - vSet.forEach((v) => { - if (!(existingVSet == null ? void 0 : existingVSet.has(v))) { - addToMultimap(reverse, v, k); - } - }); - return map2; - } - }; - return map2; - } - return create2( - /* @__PURE__ */ new Map(), - /* @__PURE__ */ new Map(), - /*deleted*/ - void 0 - ); - } - BuilderState2.createManyToManyPathMap = createManyToManyPathMap; - function addToMultimap(map2, k, v) { - let set = map2.get(k); - if (!set) { - set = /* @__PURE__ */ new Set(); - map2.set(k, set); - } - set.add(v); - } - function deleteFromMultimap(map2, k, v) { - const set = map2.get(k); - if (set == null ? void 0 : set.delete(v)) { - if (!set.size) { - map2.delete(k); - } - return true; - } - return false; - } - function getReferencedFilesFromImportedModuleSymbol(symbol) { - return mapDefined(symbol.declarations, (declaration) => { - var _a; - return (_a = getSourceFileOfNode(declaration)) == null ? void 0 : _a.resolvedPath; - }); - } - function getReferencedFilesFromImportLiteral(checker, importName) { - const symbol = checker.getSymbolAtLocation(importName); - return symbol && getReferencedFilesFromImportedModuleSymbol(symbol); - } - function getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName) { - return toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName); - } - function getReferencedFiles(program, sourceFile, getCanonicalFileName) { - let referencedFiles; - if (sourceFile.imports && sourceFile.imports.length > 0) { - const checker = program.getTypeChecker(); - for (const importName of sourceFile.imports) { - const declarationSourceFilePaths = getReferencedFilesFromImportLiteral(checker, importName); - declarationSourceFilePaths == null ? void 0 : declarationSourceFilePaths.forEach(addReferencedFile); - } - } - const sourceFileDirectory = getDirectoryPath(sourceFile.resolvedPath); - if (sourceFile.referencedFiles && sourceFile.referencedFiles.length > 0) { - for (const referencedFile of sourceFile.referencedFiles) { - const referencedPath = getReferencedFileFromFileName(program, referencedFile.fileName, sourceFileDirectory, getCanonicalFileName); - addReferencedFile(referencedPath); - } - } - if (sourceFile.resolvedTypeReferenceDirectiveNames) { - sourceFile.resolvedTypeReferenceDirectiveNames.forEach(({ resolvedTypeReferenceDirective }) => { - if (!resolvedTypeReferenceDirective) { - return; - } - const fileName = resolvedTypeReferenceDirective.resolvedFileName; - const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName); - addReferencedFile(typeFilePath); - }); - } - if (sourceFile.moduleAugmentations.length) { - const checker = program.getTypeChecker(); - for (const moduleName of sourceFile.moduleAugmentations) { - if (!isStringLiteral(moduleName)) - continue; - const symbol = checker.getSymbolAtLocation(moduleName); - if (!symbol) - continue; - addReferenceFromAmbientModule(symbol); - } - } - for (const ambientModule of program.getTypeChecker().getAmbientModules()) { - if (ambientModule.declarations && ambientModule.declarations.length > 1) { - addReferenceFromAmbientModule(ambientModule); - } - } - return referencedFiles; - function addReferenceFromAmbientModule(symbol) { - if (!symbol.declarations) { - return; - } - for (const declaration of symbol.declarations) { - const declarationSourceFile = getSourceFileOfNode(declaration); - if (declarationSourceFile && declarationSourceFile !== sourceFile) { - addReferencedFile(declarationSourceFile.resolvedPath); - } - } - } - function addReferencedFile(referencedPath) { - (referencedFiles || (referencedFiles = /* @__PURE__ */ new Set())).add(referencedPath); - } - } - function canReuseOldState(newReferencedMap, oldState) { - return oldState && !oldState.referencedMap === !newReferencedMap; - } - BuilderState2.canReuseOldState = canReuseOldState; - function create(newProgram, oldState, disableUseFileVersionAsSignature) { - var _a, _b, _c; - const fileInfos = /* @__PURE__ */ new Map(); - const options = newProgram.getCompilerOptions(); - const isOutFile = outFile(options); - const referencedMap = options.module !== 0 /* None */ && !isOutFile ? createManyToManyPathMap() : void 0; - const exportedModulesMap = referencedMap ? createManyToManyPathMap() : void 0; - const useOldState = canReuseOldState(referencedMap, oldState); - newProgram.getTypeChecker(); - for (const sourceFile of newProgram.getSourceFiles()) { - const version2 = Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); - const oldUncommittedSignature = useOldState ? (_a = oldState.oldSignatures) == null ? void 0 : _a.get(sourceFile.resolvedPath) : void 0; - const signature = oldUncommittedSignature === void 0 ? useOldState ? (_b = oldState.fileInfos.get(sourceFile.resolvedPath)) == null ? void 0 : _b.signature : void 0 : oldUncommittedSignature || void 0; - if (referencedMap) { - const newReferences = getReferencedFiles(newProgram, sourceFile, newProgram.getCanonicalFileName); - if (newReferences) { - referencedMap.set(sourceFile.resolvedPath, newReferences); - } - if (useOldState) { - const oldUncommittedExportedModules = (_c = oldState.oldExportedModulesMap) == null ? void 0 : _c.get(sourceFile.resolvedPath); - const exportedModules = oldUncommittedExportedModules === void 0 ? oldState.exportedModulesMap.getValues(sourceFile.resolvedPath) : oldUncommittedExportedModules || void 0; - if (exportedModules) { - exportedModulesMap.set(sourceFile.resolvedPath, exportedModules); - } - } - } - fileInfos.set(sourceFile.resolvedPath, { - version: version2, - signature, - // No need to calculate affectsGlobalScope with --out since its not used at all - affectsGlobalScope: !isOutFile ? isFileAffectingGlobalScope(sourceFile) || void 0 : void 0, - impliedFormat: sourceFile.impliedNodeFormat - }); - } - return { - fileInfos, - referencedMap, - exportedModulesMap, - useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState - }; - } - BuilderState2.create = create; - function releaseCache2(state) { - state.allFilesExcludingDefaultLibraryFile = void 0; - state.allFileNames = void 0; - } - BuilderState2.releaseCache = releaseCache2; - function getFilesAffectedBy(state, programOfThisState, path, cancellationToken, host) { - var _a, _b; - const result = getFilesAffectedByWithOldState( - state, - programOfThisState, - path, - cancellationToken, - host - ); - (_a = state.oldSignatures) == null ? void 0 : _a.clear(); - (_b = state.oldExportedModulesMap) == null ? void 0 : _b.clear(); - return result; - } - BuilderState2.getFilesAffectedBy = getFilesAffectedBy; - function getFilesAffectedByWithOldState(state, programOfThisState, path, cancellationToken, host) { - const sourceFile = programOfThisState.getSourceFileByPath(path); - if (!sourceFile) { - return emptyArray; - } - if (!updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, host)) { - return [sourceFile]; - } - return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, host); - } - BuilderState2.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState; - function updateSignatureOfFile(state, signature, path) { - state.fileInfos.get(path).signature = signature; - (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path); - } - BuilderState2.updateSignatureOfFile = updateSignatureOfFile; - function computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, onNewSignature) { - programOfThisState.emit( - sourceFile, - (fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => { - Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`); - onNewSignature(computeSignatureWithDiagnostics( - programOfThisState, - sourceFile, - text, - host, - data - ), sourceFiles); - }, - cancellationToken, - /*emitOnly*/ - true, - /*customTransformers*/ - void 0, - /*forceDtsEmit*/ - true - ); - } - BuilderState2.computeDtsSignature = computeDtsSignature; - function updateShapeSignature(state, programOfThisState, sourceFile, cancellationToken, host, useFileVersionAsSignature = state.useFileVersionAsSignature) { - var _a; - if ((_a = state.hasCalledUpdateShapeSignature) == null ? void 0 : _a.has(sourceFile.resolvedPath)) - return false; - const info = state.fileInfos.get(sourceFile.resolvedPath); - const prevSignature = info.signature; - let latestSignature; - if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) { - computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, (signature, sourceFiles) => { - latestSignature = signature; - if (latestSignature !== prevSignature) { - updateExportedModules(state, sourceFile, sourceFiles[0].exportedModulesFromDeclarationEmit); - } - }); - } - if (latestSignature === void 0) { - latestSignature = sourceFile.version; - if (state.exportedModulesMap && latestSignature !== prevSignature) { - (state.oldExportedModulesMap || (state.oldExportedModulesMap = /* @__PURE__ */ new Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false); - const references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : void 0; - if (references) { - state.exportedModulesMap.set(sourceFile.resolvedPath, references); - } else { - state.exportedModulesMap.deleteKey(sourceFile.resolvedPath); - } - } - } - (state.oldSignatures || (state.oldSignatures = /* @__PURE__ */ new Map())).set(sourceFile.resolvedPath, prevSignature || false); - (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(sourceFile.resolvedPath); - info.signature = latestSignature; - return latestSignature !== prevSignature; - } - BuilderState2.updateShapeSignature = updateShapeSignature; - function updateExportedModules(state, sourceFile, exportedModulesFromDeclarationEmit) { - if (!state.exportedModulesMap) - return; - (state.oldExportedModulesMap || (state.oldExportedModulesMap = /* @__PURE__ */ new Map())).set(sourceFile.resolvedPath, state.exportedModulesMap.getValues(sourceFile.resolvedPath) || false); - const exportedModules = getExportedModules(exportedModulesFromDeclarationEmit); - if (exportedModules) { - state.exportedModulesMap.set(sourceFile.resolvedPath, exportedModules); - } else { - state.exportedModulesMap.deleteKey(sourceFile.resolvedPath); - } - } - BuilderState2.updateExportedModules = updateExportedModules; - function getExportedModules(exportedModulesFromDeclarationEmit) { - let exportedModules; - exportedModulesFromDeclarationEmit == null ? void 0 : exportedModulesFromDeclarationEmit.forEach( - (symbol) => getReferencedFilesFromImportedModuleSymbol(symbol).forEach( - (path) => (exportedModules ?? (exportedModules = /* @__PURE__ */ new Set())).add(path) - ) - ); - return exportedModules; - } - BuilderState2.getExportedModules = getExportedModules; - function getAllDependencies(state, programOfThisState, sourceFile) { - const compilerOptions = programOfThisState.getCompilerOptions(); - if (outFile(compilerOptions)) { - return getAllFileNames(state, programOfThisState); - } - if (!state.referencedMap || isFileAffectingGlobalScope(sourceFile)) { - return getAllFileNames(state, programOfThisState); - } - const seenMap = /* @__PURE__ */ new Set(); - const queue = [sourceFile.resolvedPath]; - while (queue.length) { - const path = queue.pop(); - if (!seenMap.has(path)) { - seenMap.add(path); - const references = state.referencedMap.getValues(path); - if (references) { - for (const key of references.keys()) { - queue.push(key); - } - } - } - } - return arrayFrom(mapDefinedIterator(seenMap.keys(), (path) => { - var _a; - return ((_a = programOfThisState.getSourceFileByPath(path)) == null ? void 0 : _a.fileName) ?? path; - })); - } - BuilderState2.getAllDependencies = getAllDependencies; - function getAllFileNames(state, programOfThisState) { - if (!state.allFileNames) { - const sourceFiles = programOfThisState.getSourceFiles(); - state.allFileNames = sourceFiles === emptyArray ? emptyArray : sourceFiles.map((file) => file.fileName); - } - return state.allFileNames; - } - function getReferencedByPaths(state, referencedFilePath) { - const keys = state.referencedMap.getKeys(referencedFilePath); - return keys ? arrayFrom(keys.keys()) : []; - } - BuilderState2.getReferencedByPaths = getReferencedByPaths; - function containsOnlyAmbientModules(sourceFile) { - for (const statement of sourceFile.statements) { - if (!isModuleWithStringLiteralName(statement)) { - return false; - } - } - return true; - } - function containsGlobalScopeAugmentation(sourceFile) { - return some(sourceFile.moduleAugmentations, (augmentation) => isGlobalScopeAugmentation(augmentation.parent)); - } - function isFileAffectingGlobalScope(sourceFile) { - return containsGlobalScopeAugmentation(sourceFile) || !isExternalOrCommonJsModule(sourceFile) && !isJsonSourceFile(sourceFile) && !containsOnlyAmbientModules(sourceFile); - } - function getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, firstSourceFile) { - if (state.allFilesExcludingDefaultLibraryFile) { - return state.allFilesExcludingDefaultLibraryFile; - } - let result; - if (firstSourceFile) - addSourceFile(firstSourceFile); - for (const sourceFile of programOfThisState.getSourceFiles()) { - if (sourceFile !== firstSourceFile) { - addSourceFile(sourceFile); - } - } - state.allFilesExcludingDefaultLibraryFile = result || emptyArray; - return state.allFilesExcludingDefaultLibraryFile; - function addSourceFile(sourceFile) { - if (!programOfThisState.isSourceFileDefaultLibrary(sourceFile)) { - (result || (result = [])).push(sourceFile); - } - } - } - BuilderState2.getAllFilesExcludingDefaultLibraryFile = getAllFilesExcludingDefaultLibraryFile; - function getFilesAffectedByUpdatedShapeWhenNonModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape) { - const compilerOptions = programOfThisState.getCompilerOptions(); - if (compilerOptions && outFile(compilerOptions)) { - return [sourceFileWithUpdatedShape]; - } - return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape); - } - function getFilesAffectedByUpdatedShapeWhenModuleEmit(state, programOfThisState, sourceFileWithUpdatedShape, cancellationToken, host) { - if (isFileAffectingGlobalScope(sourceFileWithUpdatedShape)) { - return getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, sourceFileWithUpdatedShape); - } - const compilerOptions = programOfThisState.getCompilerOptions(); - if (compilerOptions && (getIsolatedModules(compilerOptions) || outFile(compilerOptions))) { - return [sourceFileWithUpdatedShape]; - } - const seenFileNamesMap = /* @__PURE__ */ new Map(); - seenFileNamesMap.set(sourceFileWithUpdatedShape.resolvedPath, sourceFileWithUpdatedShape); - const queue = getReferencedByPaths(state, sourceFileWithUpdatedShape.resolvedPath); - while (queue.length > 0) { - const currentPath = queue.pop(); - if (!seenFileNamesMap.has(currentPath)) { - const currentSourceFile = programOfThisState.getSourceFileByPath(currentPath); - seenFileNamesMap.set(currentPath, currentSourceFile); - if (currentSourceFile && updateShapeSignature(state, programOfThisState, currentSourceFile, cancellationToken, host)) { - queue.push(...getReferencedByPaths(state, currentSourceFile.resolvedPath)); - } - } - } - return arrayFrom(mapDefinedIterator(seenFileNamesMap.values(), (value) => value)); - } - })(BuilderState || (BuilderState = {})); - } - }); - - // src/compiler/builder.ts - function getBuilderFileEmit(options) { - let result = 1 /* Js */; - if (options.sourceMap) - result = result | 2 /* JsMap */; - if (options.inlineSourceMap) - result = result | 4 /* JsInlineMap */; - if (getEmitDeclarations(options)) - result = result | 8 /* Dts */; - if (options.declarationMap) - result = result | 16 /* DtsMap */; - if (options.emitDeclarationOnly) - result = result & 24 /* AllDts */; - return result; - } - function getPendingEmitKind(optionsOrEmitKind, oldOptionsOrEmitKind) { - const oldEmitKind = oldOptionsOrEmitKind && (isNumber(oldOptionsOrEmitKind) ? oldOptionsOrEmitKind : getBuilderFileEmit(oldOptionsOrEmitKind)); - const emitKind = isNumber(optionsOrEmitKind) ? optionsOrEmitKind : getBuilderFileEmit(optionsOrEmitKind); - if (oldEmitKind === emitKind) - return 0 /* None */; - if (!oldEmitKind || !emitKind) - return emitKind; - const diff = oldEmitKind ^ emitKind; - let result = 0 /* None */; - if (diff & 7 /* AllJs */) - result = emitKind & 7 /* AllJs */; - if (diff & 24 /* AllDts */) - result = result | emitKind & 24 /* AllDts */; - return result; - } - function hasSameKeys(map1, map2) { - return map1 === map2 || map1 !== void 0 && map2 !== void 0 && map1.size === map2.size && !forEachKey(map1, (key) => !map2.has(key)); - } - function createBuilderProgramState(newProgram, oldState) { - var _a, _b; - const state = BuilderState.create( - newProgram, - oldState, - /*disableUseFileVersionAsSignature*/ - false - ); - state.program = newProgram; - const compilerOptions = newProgram.getCompilerOptions(); - state.compilerOptions = compilerOptions; - const outFilePath = outFile(compilerOptions); - if (!outFilePath) { - state.semanticDiagnosticsPerFile = /* @__PURE__ */ new Map(); - } else if (compilerOptions.composite && (oldState == null ? void 0 : oldState.outSignature) && outFilePath === outFile(oldState == null ? void 0 : oldState.compilerOptions)) { - state.outSignature = oldState.outSignature && getEmitSignatureFromOldSignature(compilerOptions, oldState.compilerOptions, oldState.outSignature); - } - state.changedFilesSet = /* @__PURE__ */ new Set(); - state.latestChangedDtsFile = compilerOptions.composite ? oldState == null ? void 0 : oldState.latestChangedDtsFile : void 0; - const useOldState = BuilderState.canReuseOldState(state.referencedMap, oldState); - const oldCompilerOptions = useOldState ? oldState.compilerOptions : void 0; - const canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile && !compilerOptionsAffectSemanticDiagnostics(compilerOptions, oldCompilerOptions); - const canCopyEmitSignatures = compilerOptions.composite && (oldState == null ? void 0 : oldState.emitSignatures) && !outFilePath && !compilerOptionsAffectDeclarationPath(compilerOptions, oldState.compilerOptions); - if (useOldState) { - (_a = oldState.changedFilesSet) == null ? void 0 : _a.forEach((value) => state.changedFilesSet.add(value)); - if (!outFilePath && ((_b = oldState.affectedFilesPendingEmit) == null ? void 0 : _b.size)) { - state.affectedFilesPendingEmit = new Map(oldState.affectedFilesPendingEmit); - state.seenAffectedFiles = /* @__PURE__ */ new Set(); - } - state.programEmitPending = oldState.programEmitPending; - } else { - state.buildInfoEmitPending = true; - } - const referencedMap = state.referencedMap; - const oldReferencedMap = useOldState ? oldState.referencedMap : void 0; - const copyDeclarationFileDiagnostics = canCopySemanticDiagnostics && !compilerOptions.skipLibCheck === !oldCompilerOptions.skipLibCheck; - const copyLibFileDiagnostics = copyDeclarationFileDiagnostics && !compilerOptions.skipDefaultLibCheck === !oldCompilerOptions.skipDefaultLibCheck; - state.fileInfos.forEach((info, sourceFilePath) => { - let oldInfo; - let newReferences; - if (!useOldState || // File wasn't present in old state - !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match - oldInfo.version !== info.version || // Implied formats dont match - oldInfo.impliedFormat !== info.impliedFormat || // Referenced files changed - !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || // Referenced file was deleted in the new program - newReferences && forEachKey(newReferences, (path) => !state.fileInfos.has(path) && oldState.fileInfos.has(path))) { - addFileToChangeSet(state, sourceFilePath); - } else if (canCopySemanticDiagnostics) { - const sourceFile = newProgram.getSourceFileByPath(sourceFilePath); - if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics) - return; - if (sourceFile.hasNoDefaultLib && !copyLibFileDiagnostics) - return; - const diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath); - if (diagnostics) { - state.semanticDiagnosticsPerFile.set( - sourceFilePath, - oldState.hasReusableDiagnostic ? convertToDiagnostics(diagnostics, newProgram) : repopulateDiagnostics(diagnostics, newProgram) - ); - if (!state.semanticDiagnosticsFromOldState) { - state.semanticDiagnosticsFromOldState = /* @__PURE__ */ new Set(); - } - state.semanticDiagnosticsFromOldState.add(sourceFilePath); - } - } - if (canCopyEmitSignatures) { - const oldEmitSignature = oldState.emitSignatures.get(sourceFilePath); - if (oldEmitSignature) { - (state.emitSignatures ?? (state.emitSignatures = /* @__PURE__ */ new Map())).set(sourceFilePath, getEmitSignatureFromOldSignature(compilerOptions, oldState.compilerOptions, oldEmitSignature)); - } - } - }); - if (useOldState && forEachEntry(oldState.fileInfos, (info, sourceFilePath) => { - if (state.fileInfos.has(sourceFilePath)) - return false; - if (outFilePath || info.affectsGlobalScope) - return true; - state.buildInfoEmitPending = true; - return false; - })) { - BuilderState.getAllFilesExcludingDefaultLibraryFile( - state, - newProgram, - /*firstSourceFile*/ - void 0 - ).forEach((file) => addFileToChangeSet(state, file.resolvedPath)); - } else if (oldCompilerOptions) { - const pendingEmitKind = compilerOptionsAffectEmit(compilerOptions, oldCompilerOptions) ? getBuilderFileEmit(compilerOptions) : getPendingEmitKind(compilerOptions, oldCompilerOptions); - if (pendingEmitKind !== 0 /* None */) { - if (!outFilePath) { - newProgram.getSourceFiles().forEach((f) => { - if (!state.changedFilesSet.has(f.resolvedPath)) { - addToAffectedFilesPendingEmit( - state, - f.resolvedPath, - pendingEmitKind - ); - } - }); - Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size); - state.seenAffectedFiles = state.seenAffectedFiles || /* @__PURE__ */ new Set(); - state.buildInfoEmitPending = true; - } else { - state.programEmitPending = state.programEmitPending ? state.programEmitPending | pendingEmitKind : pendingEmitKind; - } - } - } - if (outFilePath && !state.changedFilesSet.size) { - if (useOldState) - state.bundle = oldState.bundle; - if (some(newProgram.getProjectReferences(), (ref) => !!ref.prepend)) - state.programEmitPending = getBuilderFileEmit(compilerOptions); - } - return state; - } - function addFileToChangeSet(state, path) { - state.changedFilesSet.add(path); - state.buildInfoEmitPending = true; - state.programEmitPending = void 0; - } - function getEmitSignatureFromOldSignature(options, oldOptions, oldEmitSignature) { - return !!options.declarationMap === !!oldOptions.declarationMap ? ( - // Use same format of signature - oldEmitSignature - ) : ( - // Convert to different format - isString(oldEmitSignature) ? [oldEmitSignature] : oldEmitSignature[0] - ); - } - function repopulateDiagnostics(diagnostics, newProgram) { - if (!diagnostics.length) - return diagnostics; - return sameMap(diagnostics, (diag2) => { - if (isString(diag2.messageText)) - return diag2; - const repopulatedChain = convertOrRepopulateDiagnosticMessageChain(diag2.messageText, diag2.file, newProgram, (chain) => { - var _a; - return (_a = chain.repopulateInfo) == null ? void 0 : _a.call(chain); - }); - return repopulatedChain === diag2.messageText ? diag2 : { ...diag2, messageText: repopulatedChain }; - }); - } - function convertOrRepopulateDiagnosticMessageChain(chain, sourceFile, newProgram, repopulateInfo) { - const info = repopulateInfo(chain); - if (info) { - return { - ...createModuleNotFoundChain(sourceFile, newProgram, info.moduleReference, info.mode, info.packageName || info.moduleReference), - next: convertOrRepopulateDiagnosticMessageChainArray(chain.next, sourceFile, newProgram, repopulateInfo) - }; - } - const next = convertOrRepopulateDiagnosticMessageChainArray(chain.next, sourceFile, newProgram, repopulateInfo); - return next === chain.next ? chain : { ...chain, next }; - } - function convertOrRepopulateDiagnosticMessageChainArray(array, sourceFile, newProgram, repopulateInfo) { - return sameMap(array, (chain) => convertOrRepopulateDiagnosticMessageChain(chain, sourceFile, newProgram, repopulateInfo)); - } - function convertToDiagnostics(diagnostics, newProgram) { - if (!diagnostics.length) - return emptyArray; - let buildInfoDirectory; - return diagnostics.map((diagnostic) => { - const result = convertToDiagnosticRelatedInformation(diagnostic, newProgram, toPathInBuildInfoDirectory); - result.reportsUnnecessary = diagnostic.reportsUnnecessary; - result.reportsDeprecated = diagnostic.reportDeprecated; - result.source = diagnostic.source; - result.skippedOn = diagnostic.skippedOn; - const { relatedInformation } = diagnostic; - result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => convertToDiagnosticRelatedInformation(r, newProgram, toPathInBuildInfoDirectory)) : [] : void 0; - return result; - }); - function toPathInBuildInfoDirectory(path) { - buildInfoDirectory ?? (buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(newProgram.getCompilerOptions()), newProgram.getCurrentDirectory()))); - return toPath(path, buildInfoDirectory, newProgram.getCanonicalFileName); - } - } - function convertToDiagnosticRelatedInformation(diagnostic, newProgram, toPath3) { - const { file } = diagnostic; - const sourceFile = file ? newProgram.getSourceFileByPath(toPath3(file)) : void 0; - return { - ...diagnostic, - file: sourceFile, - messageText: isString(diagnostic.messageText) ? diagnostic.messageText : convertOrRepopulateDiagnosticMessageChain(diagnostic.messageText, sourceFile, newProgram, (chain) => chain.info) - }; - } - function releaseCache(state) { - BuilderState.releaseCache(state); - state.program = void 0; - } - function backupBuilderProgramEmitState(state) { - const outFilePath = outFile(state.compilerOptions); - Debug.assert(!state.changedFilesSet.size || outFilePath); - return { - affectedFilesPendingEmit: state.affectedFilesPendingEmit && new Map(state.affectedFilesPendingEmit), - seenEmittedFiles: state.seenEmittedFiles && new Map(state.seenEmittedFiles), - programEmitPending: state.programEmitPending, - emitSignatures: state.emitSignatures && new Map(state.emitSignatures), - outSignature: state.outSignature, - latestChangedDtsFile: state.latestChangedDtsFile, - hasChangedEmitSignature: state.hasChangedEmitSignature, - changedFilesSet: outFilePath ? new Set(state.changedFilesSet) : void 0 - }; - } - function restoreBuilderProgramEmitState(state, savedEmitState) { - state.affectedFilesPendingEmit = savedEmitState.affectedFilesPendingEmit; - state.seenEmittedFiles = savedEmitState.seenEmittedFiles; - state.programEmitPending = savedEmitState.programEmitPending; - state.emitSignatures = savedEmitState.emitSignatures; - state.outSignature = savedEmitState.outSignature; - state.latestChangedDtsFile = savedEmitState.latestChangedDtsFile; - state.hasChangedEmitSignature = savedEmitState.hasChangedEmitSignature; - if (savedEmitState.changedFilesSet) - state.changedFilesSet = savedEmitState.changedFilesSet; - } - function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) { - Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath)); - } - function getNextAffectedFile(state, cancellationToken, host) { - var _a, _b; - while (true) { - const { affectedFiles } = state; - if (affectedFiles) { - const seenAffectedFiles = state.seenAffectedFiles; - let affectedFilesIndex = state.affectedFilesIndex; - while (affectedFilesIndex < affectedFiles.length) { - const affectedFile = affectedFiles[affectedFilesIndex]; - if (!seenAffectedFiles.has(affectedFile.resolvedPath)) { - state.affectedFilesIndex = affectedFilesIndex; - addToAffectedFilesPendingEmit(state, affectedFile.resolvedPath, getBuilderFileEmit(state.compilerOptions)); - handleDtsMayChangeOfAffectedFile( - state, - affectedFile, - cancellationToken, - host - ); - return affectedFile; - } - affectedFilesIndex++; - } - state.changedFilesSet.delete(state.currentChangedFilePath); - state.currentChangedFilePath = void 0; - (_a = state.oldSignatures) == null ? void 0 : _a.clear(); - (_b = state.oldExportedModulesMap) == null ? void 0 : _b.clear(); - state.affectedFiles = void 0; - } - const nextKey = state.changedFilesSet.keys().next(); - if (nextKey.done) { - return void 0; - } - const program = Debug.checkDefined(state.program); - const compilerOptions = program.getCompilerOptions(); - if (outFile(compilerOptions)) { - Debug.assert(!state.semanticDiagnosticsPerFile); - return program; - } - state.affectedFiles = BuilderState.getFilesAffectedByWithOldState( - state, - program, - nextKey.value, - cancellationToken, - host - ); - state.currentChangedFilePath = nextKey.value; - state.affectedFilesIndex = 0; - if (!state.seenAffectedFiles) - state.seenAffectedFiles = /* @__PURE__ */ new Set(); - } - } - function clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles) { - var _a; - if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) - return; - if (!emitOnlyDtsFiles) - return state.affectedFilesPendingEmit = void 0; - state.affectedFilesPendingEmit.forEach((emitKind, path) => { - const pending = emitKind & 7 /* AllJs */; - if (!pending) - state.affectedFilesPendingEmit.delete(path); - else - state.affectedFilesPendingEmit.set(path, pending); - }); - } - function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles) { - var _a; - if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) - return void 0; - return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path) => { - var _a2; - const affectedFile = state.program.getSourceFileByPath(path); - if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) { - state.affectedFilesPendingEmit.delete(path); - return void 0; - } - const seenKind = (_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath); - let pendingKind = getPendingEmitKind(emitKind, seenKind); - if (emitOnlyDtsFiles) - pendingKind = pendingKind & 24 /* AllDts */; - if (pendingKind) - return { affectedFile, emitKind: pendingKind }; - }); - } - function removeDiagnosticsOfLibraryFiles(state) { - if (!state.cleanedDiagnosticsOfLibFiles) { - state.cleanedDiagnosticsOfLibFiles = true; - const program = Debug.checkDefined(state.program); - const options = program.getCompilerOptions(); - forEach( - program.getSourceFiles(), - (f) => program.isSourceFileDefaultLibrary(f) && !skipTypeChecking(f, options, program) && removeSemanticDiagnosticsOf(state, f.resolvedPath) - ); - } - } - function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, host) { - removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath); - if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) { - removeDiagnosticsOfLibraryFiles(state); - BuilderState.updateShapeSignature( - state, - Debug.checkDefined(state.program), - affectedFile, - cancellationToken, - host - ); - return; - } - if (state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) - return; - handleDtsMayChangeOfReferencingExportOfAffectedFile( - state, - affectedFile, - cancellationToken, - host - ); - } - function handleDtsMayChangeOf(state, path, cancellationToken, host) { - removeSemanticDiagnosticsOf(state, path); - if (!state.changedFilesSet.has(path)) { - const program = Debug.checkDefined(state.program); - const sourceFile = program.getSourceFileByPath(path); - if (sourceFile) { - BuilderState.updateShapeSignature( - state, - program, - sourceFile, - cancellationToken, - host, - /*useFileVersionAsSignature*/ - true - ); - if (getEmitDeclarations(state.compilerOptions)) { - addToAffectedFilesPendingEmit(state, path, state.compilerOptions.declarationMap ? 24 /* AllDts */ : 8 /* Dts */); - } - } - } - } - function removeSemanticDiagnosticsOf(state, path) { - if (!state.semanticDiagnosticsFromOldState) { - return true; - } - state.semanticDiagnosticsFromOldState.delete(path); - state.semanticDiagnosticsPerFile.delete(path); - return !state.semanticDiagnosticsFromOldState.size; - } - function isChangedSignature(state, path) { - const oldSignature = Debug.checkDefined(state.oldSignatures).get(path) || void 0; - const newSignature = Debug.checkDefined(state.fileInfos.get(path)).signature; - return newSignature !== oldSignature; - } - function handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, host) { - var _a; - if (!((_a = state.fileInfos.get(filePath)) == null ? void 0 : _a.affectsGlobalScope)) - return false; - BuilderState.getAllFilesExcludingDefaultLibraryFile( - state, - state.program, - /*firstSourceFile*/ - void 0 - ).forEach((file) => handleDtsMayChangeOf( - state, - file.resolvedPath, - cancellationToken, - host - )); - removeDiagnosticsOfLibraryFiles(state); - return true; - } - function handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, host) { - var _a; - if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath)) - return; - if (!isChangedSignature(state, affectedFile.resolvedPath)) - return; - if (getIsolatedModules(state.compilerOptions)) { - const seenFileNamesMap = /* @__PURE__ */ new Map(); - seenFileNamesMap.set(affectedFile.resolvedPath, true); - const queue = BuilderState.getReferencedByPaths(state, affectedFile.resolvedPath); - while (queue.length > 0) { - const currentPath = queue.pop(); - if (!seenFileNamesMap.has(currentPath)) { - seenFileNamesMap.set(currentPath, true); - if (handleDtsMayChangeOfGlobalScope(state, currentPath, cancellationToken, host)) - return; - handleDtsMayChangeOf(state, currentPath, cancellationToken, host); - if (isChangedSignature(state, currentPath)) { - const currentSourceFile = Debug.checkDefined(state.program).getSourceFileByPath(currentPath); - queue.push(...BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); - } - } - } - } - const seenFileAndExportsOfFile = /* @__PURE__ */ new Set(); - (_a = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) == null ? void 0 : _a.forEach((exportedFromPath) => { - if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, host)) - return true; - const references = state.referencedMap.getKeys(exportedFromPath); - return references && forEachKey( - references, - (filePath) => handleDtsMayChangeOfFileAndExportsOfFile( - state, - filePath, - seenFileAndExportsOfFile, - cancellationToken, - host - ) - ); - }); - } - function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, host) { - var _a, _b; - if (!tryAddToSet(seenFileAndExportsOfFile, filePath)) - return void 0; - if (handleDtsMayChangeOfGlobalScope(state, filePath, cancellationToken, host)) - return true; - handleDtsMayChangeOf(state, filePath, cancellationToken, host); - (_a = state.exportedModulesMap.getKeys(filePath)) == null ? void 0 : _a.forEach( - (exportedFromPath) => handleDtsMayChangeOfFileAndExportsOfFile( - state, - exportedFromPath, - seenFileAndExportsOfFile, - cancellationToken, - host - ) - ); - (_b = state.referencedMap.getKeys(filePath)) == null ? void 0 : _b.forEach( - (referencingFilePath) => !seenFileAndExportsOfFile.has(referencingFilePath) && // Not already removed diagnostic file - handleDtsMayChangeOf( - // Dont add to seen since this is not yet done with the export removal - state, - referencingFilePath, - cancellationToken, - host - ) - ); - return void 0; - } - function getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken) { - return concatenate( - getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken), - Debug.checkDefined(state.program).getProgramDiagnostics(sourceFile) - ); - } - function getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken) { - const path = sourceFile.resolvedPath; - if (state.semanticDiagnosticsPerFile) { - const cachedDiagnostics = state.semanticDiagnosticsPerFile.get(path); - if (cachedDiagnostics) { - return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions); - } - } - const diagnostics = Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken); - if (state.semanticDiagnosticsPerFile) { - state.semanticDiagnosticsPerFile.set(path, diagnostics); - } - return filterSemanticDiagnostics(diagnostics, state.compilerOptions); - } - function isProgramBundleEmitBuildInfo(info) { - return !!outFile(info.options || {}); - } - function getBuildInfo2(state, bundle) { - var _a, _b, _c; - const currentDirectory = Debug.checkDefined(state.program).getCurrentDirectory(); - const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory)); - const latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : void 0; - const fileNames = []; - const fileNameToFileId = /* @__PURE__ */ new Map(); - const root = []; - if (outFile(state.compilerOptions)) { - const fileInfos2 = arrayFrom(state.fileInfos.entries(), ([key, value]) => { - const fileId = toFileId(key); - tryAddRoot(key, fileId); - return value.impliedFormat ? { version: value.version, impliedFormat: value.impliedFormat, signature: void 0, affectsGlobalScope: void 0 } : value.version; - }); - const program2 = { - fileNames, - fileInfos: fileInfos2, - root, - options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions), - outSignature: state.outSignature, - latestChangedDtsFile, - pendingEmit: !state.programEmitPending ? void 0 : ( - // Pending is undefined or None is encoded as undefined - state.programEmitPending === getBuilderFileEmit(state.compilerOptions) ? false : ( - // Pending emit is same as deteremined by compilerOptions - state.programEmitPending - ) - ) - // Actual value - }; - const { js, dts, commonSourceDirectory, sourceFiles } = bundle; - state.bundle = bundle = { - commonSourceDirectory, - sourceFiles, - js: js || (!state.compilerOptions.emitDeclarationOnly ? (_a = state.bundle) == null ? void 0 : _a.js : void 0), - dts: dts || (getEmitDeclarations(state.compilerOptions) ? (_b = state.bundle) == null ? void 0 : _b.dts : void 0) - }; - return createBuildInfo(program2, bundle); - } - let fileIdsList; - let fileNamesToFileIdListId; - let emitSignatures; - const fileInfos = arrayFrom(state.fileInfos.entries(), ([key, value]) => { - var _a2, _b2; - const fileId = toFileId(key); - tryAddRoot(key, fileId); - Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key)); - const oldSignature = (_a2 = state.oldSignatures) == null ? void 0 : _a2.get(key); - const actualSignature = oldSignature !== void 0 ? oldSignature || void 0 : value.signature; - if (state.compilerOptions.composite) { - const file = state.program.getSourceFileByPath(key); - if (!isJsonSourceFile(file) && sourceFileMayBeEmitted(file, state.program)) { - const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(key); - if (emitSignature !== actualSignature) { - (emitSignatures || (emitSignatures = [])).push(emitSignature === void 0 ? fileId : ( - // There is no emit, encode as false - // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature - [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature] - )); - } - } - } - return value.version === actualSignature ? value.affectsGlobalScope || value.impliedFormat ? ( - // If file version is same as signature, dont serialize signature - { version: value.version, signature: void 0, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } - ) : ( - // If file info only contains version and signature and both are same we can just write string - value.version - ) : actualSignature !== void 0 ? ( - // If signature is not same as version, encode signature in the fileInfo - oldSignature === void 0 ? ( - // If we havent computed signature, use fileInfo as is - value - ) : ( - // Serialize fileInfo with new updated signature - { version: value.version, signature: actualSignature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } - ) - ) : ( - // Signature of the FileInfo is undefined, serialize it as false - { version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } - ); - }); - let referencedMap; - if (state.referencedMap) { - referencedMap = arrayFrom(state.referencedMap.keys()).sort(compareStringsCaseSensitive).map((key) => [ - toFileId(key), - toFileIdListId(state.referencedMap.getValues(key)) - ]); - } - let exportedModulesMap; - if (state.exportedModulesMap) { - exportedModulesMap = mapDefined(arrayFrom(state.exportedModulesMap.keys()).sort(compareStringsCaseSensitive), (key) => { - var _a2; - const oldValue = (_a2 = state.oldExportedModulesMap) == null ? void 0 : _a2.get(key); - if (oldValue === void 0) - return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))]; - if (oldValue) - return [toFileId(key), toFileIdListId(oldValue)]; - return void 0; - }); - } - let semanticDiagnosticsPerFile; - if (state.semanticDiagnosticsPerFile) { - for (const key of arrayFrom(state.semanticDiagnosticsPerFile.keys()).sort(compareStringsCaseSensitive)) { - const value = state.semanticDiagnosticsPerFile.get(key); - (semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push( - value.length ? [ - toFileId(key), - convertToReusableDiagnostics(value, relativeToBuildInfo) - ] : toFileId(key) - ); - } - } - let affectedFilesPendingEmit; - if ((_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.size) { - const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions); - const seenFiles = /* @__PURE__ */ new Set(); - for (const path of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) { - if (tryAddToSet(seenFiles, path)) { - const file = state.program.getSourceFileByPath(path); - if (!file || !sourceFileMayBeEmitted(file, state.program)) - continue; - const fileId = toFileId(path), pendingEmit = state.affectedFilesPendingEmit.get(path); - (affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push( - pendingEmit === fullEmitForOptions ? fileId : ( - // Pending full emit per options - pendingEmit === 8 /* Dts */ ? [fileId] : ( - // Pending on Dts only - [fileId, pendingEmit] - ) - ) - // Anything else - ); - } - } - } - let changeFileSet; - if (state.changedFilesSet.size) { - for (const path of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) { - (changeFileSet || (changeFileSet = [])).push(toFileId(path)); - } - } - const program = { - fileNames, - fileInfos, - root, - options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions), - fileIdsList, - referencedMap, - exportedModulesMap, - semanticDiagnosticsPerFile, - affectedFilesPendingEmit, - changeFileSet, - emitSignatures, - latestChangedDtsFile - }; - return createBuildInfo(program, bundle); - function relativeToBuildInfoEnsuringAbsolutePath(path) { - return relativeToBuildInfo(getNormalizedAbsolutePath(path, currentDirectory)); - } - function relativeToBuildInfo(path) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path, state.program.getCanonicalFileName)); - } - function toFileId(path) { - let fileId = fileNameToFileId.get(path); - if (fileId === void 0) { - fileNames.push(relativeToBuildInfo(path)); - fileNameToFileId.set(path, fileId = fileNames.length); - } - return fileId; - } - function toFileIdListId(set) { - const fileIds = arrayFrom(set.keys(), toFileId).sort(compareValues); - const key = fileIds.join(); - let fileIdListId = fileNamesToFileIdListId == null ? void 0 : fileNamesToFileIdListId.get(key); - if (fileIdListId === void 0) { - (fileIdsList || (fileIdsList = [])).push(fileIds); - (fileNamesToFileIdListId || (fileNamesToFileIdListId = /* @__PURE__ */ new Map())).set(key, fileIdListId = fileIdsList.length); - } - return fileIdListId; - } - function tryAddRoot(path, fileId) { - const file = state.program.getSourceFile(path); - if (!state.program.getFileIncludeReasons().get(file.path).some((r) => r.kind === 0 /* RootFile */)) - return; - if (!root.length) - return root.push(fileId); - const last2 = root[root.length - 1]; - const isLastStartEnd = isArray(last2); - if (isLastStartEnd && last2[1] === fileId - 1) - return last2[1] = fileId; - if (isLastStartEnd || root.length === 1 || last2 !== fileId - 1) - return root.push(fileId); - const lastButOne = root[root.length - 2]; - if (!isNumber(lastButOne) || lastButOne !== last2 - 1) - return root.push(fileId); - root[root.length - 2] = [lastButOne, fileId]; - return root.length = root.length - 1; - } - function convertToProgramBuildInfoCompilerOptions(options) { - let result; - const { optionsNameMap } = getOptionsNameMap(); - for (const name of getOwnKeys(options).sort(compareStringsCaseSensitive)) { - const optionInfo = optionsNameMap.get(name.toLowerCase()); - if (optionInfo == null ? void 0 : optionInfo.affectsBuildInfo) { - (result || (result = {}))[name] = convertToReusableCompilerOptionValue( - optionInfo, - options[name], - relativeToBuildInfoEnsuringAbsolutePath - ); - } - } - return result; - } - } - function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) { - if (option) { - Debug.assert(option.type !== "listOrElement"); - if (option.type === "list") { - const values = value; - if (option.element.isFilePath && values.length) { - return values.map(relativeToBuildInfo); - } - } else if (option.isFilePath) { - return relativeToBuildInfo(value); - } - } - return value; - } - function convertToReusableDiagnostics(diagnostics, relativeToBuildInfo) { - Debug.assert(!!diagnostics.length); - return diagnostics.map((diagnostic) => { - const result = convertToReusableDiagnosticRelatedInformation(diagnostic, relativeToBuildInfo); - result.reportsUnnecessary = diagnostic.reportsUnnecessary; - result.reportDeprecated = diagnostic.reportsDeprecated; - result.source = diagnostic.source; - result.skippedOn = diagnostic.skippedOn; - const { relatedInformation } = diagnostic; - result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => convertToReusableDiagnosticRelatedInformation(r, relativeToBuildInfo)) : [] : void 0; - return result; - }); - } - function convertToReusableDiagnosticRelatedInformation(diagnostic, relativeToBuildInfo) { - const { file } = diagnostic; - return { - ...diagnostic, - file: file ? relativeToBuildInfo(file.resolvedPath) : void 0, - messageText: isString(diagnostic.messageText) ? diagnostic.messageText : convertToReusableDiagnosticMessageChain(diagnostic.messageText) - }; - } - function convertToReusableDiagnosticMessageChain(chain) { - if (chain.repopulateInfo) { - return { - info: chain.repopulateInfo(), - next: convertToReusableDiagnosticMessageChainArray(chain.next) - }; - } - const next = convertToReusableDiagnosticMessageChainArray(chain.next); - return next === chain.next ? chain : { ...chain, next }; - } - function convertToReusableDiagnosticMessageChainArray(array) { - if (!array) - return array; - return forEach(array, (chain, index) => { - const reusable = convertToReusableDiagnosticMessageChain(chain); - if (chain === reusable) - return void 0; - const result = index > 0 ? array.slice(0, index - 1) : []; - result.push(reusable); - for (let i = index + 1; i < array.length; i++) { - result.push(convertToReusableDiagnosticMessageChain(array[i])); - } - return result; - }) || array; - } - function getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) { - let host; - let newProgram; - let oldProgram; - if (newProgramOrRootNames === void 0) { - Debug.assert(hostOrOptions === void 0); - host = oldProgramOrHost; - oldProgram = configFileParsingDiagnosticsOrOldProgram; - Debug.assert(!!oldProgram); - newProgram = oldProgram.getProgram(); - } else if (isArray(newProgramOrRootNames)) { - oldProgram = configFileParsingDiagnosticsOrOldProgram; - newProgram = createProgram({ - rootNames: newProgramOrRootNames, - options: hostOrOptions, - host: oldProgramOrHost, - oldProgram: oldProgram && oldProgram.getProgramOrUndefined(), - configFileParsingDiagnostics, - projectReferences - }); - host = oldProgramOrHost; - } else { - newProgram = newProgramOrRootNames; - host = hostOrOptions; - oldProgram = oldProgramOrHost; - configFileParsingDiagnostics = configFileParsingDiagnosticsOrOldProgram; - } - return { host, newProgram, oldProgram, configFileParsingDiagnostics: configFileParsingDiagnostics || emptyArray }; - } - function getTextHandlingSourceMapForSignature(text, data) { - return (data == null ? void 0 : data.sourceMapUrlPos) !== void 0 ? text.substring(0, data.sourceMapUrlPos) : text; - } - function computeSignatureWithDiagnostics(program, sourceFile, text, host, data) { - var _a; - text = getTextHandlingSourceMapForSignature(text, data); - let sourceFileDirectory; - if ((_a = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a.length) { - text += data.diagnostics.map( - (diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}` - ).join("\n"); - } - return (host.createHash ?? generateDjb2Hash)(text); - function flattenDiagnosticMessageText2(diagnostic) { - return isString(diagnostic) ? diagnostic : diagnostic === void 0 ? "" : !diagnostic.next ? diagnostic.messageText : diagnostic.messageText + diagnostic.next.map(flattenDiagnosticMessageText2).join("\n"); - } - function locationInfo(diagnostic) { - if (diagnostic.file.resolvedPath === sourceFile.resolvedPath) - return `(${diagnostic.start},${diagnostic.length})`; - if (sourceFileDirectory === void 0) - sourceFileDirectory = getDirectoryPath(sourceFile.resolvedPath); - return `${ensurePathIsNonModuleName(getRelativePathFromDirectory( - sourceFileDirectory, - diagnostic.file.resolvedPath, - program.getCanonicalFileName - ))}(${diagnostic.start},${diagnostic.length})`; - } - } - function computeSignature(text, host, data) { - return (host.createHash ?? generateDjb2Hash)(getTextHandlingSourceMapForSignature(text, data)); - } - function createBuilderProgram(kind, { newProgram, host, oldProgram, configFileParsingDiagnostics }) { - let oldState = oldProgram && oldProgram.getState(); - if (oldState && newProgram === oldState.program && configFileParsingDiagnostics === newProgram.getConfigFileParsingDiagnostics()) { - newProgram = void 0; - oldState = void 0; - return oldProgram; - } - const state = createBuilderProgramState(newProgram, oldState); - newProgram.getBuildInfo = (bundle) => getBuildInfo2(state, bundle); - newProgram = void 0; - oldProgram = void 0; - oldState = void 0; - const getState = () => state; - const builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics); - builderProgram.getState = getState; - builderProgram.saveEmitState = () => backupBuilderProgramEmitState(state); - builderProgram.restoreEmitState = (saved) => restoreBuilderProgramEmitState(state, saved); - builderProgram.hasChangedEmitSignature = () => !!state.hasChangedEmitSignature; - builderProgram.getAllDependencies = (sourceFile) => BuilderState.getAllDependencies(state, Debug.checkDefined(state.program), sourceFile); - builderProgram.getSemanticDiagnostics = getSemanticDiagnostics; - builderProgram.emit = emit; - builderProgram.releaseProgram = () => releaseCache(state); - if (kind === 0 /* SemanticDiagnosticsBuilderProgram */) { - builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile; - } else if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) { - builderProgram.getSemanticDiagnosticsOfNextAffectedFile = getSemanticDiagnosticsOfNextAffectedFile; - builderProgram.emitNextAffectedFile = emitNextAffectedFile; - builderProgram.emitBuildInfo = emitBuildInfo; - } else { - notImplemented(); - } - return builderProgram; - function emitBuildInfo(writeFile2, cancellationToken) { - if (state.buildInfoEmitPending) { - const result = Debug.checkDefined(state.program).emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken); - state.buildInfoEmitPending = false; - return result; - } - return emitSkippedWithNoDiagnostics; - } - function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) { - var _a, _b, _c; - let affected = getNextAffectedFile(state, cancellationToken, host); - const programEmitKind = getBuilderFileEmit(state.compilerOptions); - let emitKind = emitOnlyDtsFiles ? programEmitKind & 24 /* AllDts */ : programEmitKind; - if (!affected) { - if (!outFile(state.compilerOptions)) { - const pendingAffectedFile = getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles); - if (!pendingAffectedFile) { - if (!state.buildInfoEmitPending) - return void 0; - const affected2 = state.program; - const result2 = affected2.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken); - state.buildInfoEmitPending = false; - return { result: result2, affected: affected2 }; - } - ({ affectedFile: affected, emitKind } = pendingAffectedFile); - } else { - if (!state.programEmitPending) - return void 0; - emitKind = state.programEmitPending; - if (emitOnlyDtsFiles) - emitKind = emitKind & 24 /* AllDts */; - if (!emitKind) - return void 0; - affected = state.program; - } - } - let emitOnly; - if (emitKind & 7 /* AllJs */) - emitOnly = 0 /* Js */; - if (emitKind & 24 /* AllDts */) - emitOnly = emitOnly === void 0 ? 1 /* Dts */ : void 0; - if (affected === state.program) { - state.programEmitPending = state.changedFilesSet.size ? getPendingEmitKind(programEmitKind, emitKind) : state.programEmitPending ? getPendingEmitKind(state.programEmitPending, emitKind) : void 0; - } - const result = state.program.emit( - affected === state.program ? void 0 : affected, - getWriteFileCallback(writeFile2, customTransformers), - cancellationToken, - emitOnly, - customTransformers - ); - if (affected !== state.program) { - const affectedSourceFile = affected; - state.seenAffectedFiles.add(affectedSourceFile.resolvedPath); - if (state.affectedFilesIndex !== void 0) - state.affectedFilesIndex++; - state.buildInfoEmitPending = true; - const existing = ((_a = state.seenEmittedFiles) == null ? void 0 : _a.get(affectedSourceFile.resolvedPath)) || 0 /* None */; - (state.seenEmittedFiles ?? (state.seenEmittedFiles = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, emitKind | existing); - const existingPending = ((_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.get(affectedSourceFile.resolvedPath)) || programEmitKind; - const pendingKind = getPendingEmitKind(existingPending, emitKind | existing); - if (pendingKind) - (state.affectedFilesPendingEmit ?? (state.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(affectedSourceFile.resolvedPath, pendingKind); - else - (_c = state.affectedFilesPendingEmit) == null ? void 0 : _c.delete(affectedSourceFile.resolvedPath); - } else { - state.changedFilesSet.clear(); - } - return { result, affected }; - } - function getWriteFileCallback(writeFile2, customTransformers) { - if (!getEmitDeclarations(state.compilerOptions)) - return writeFile2 || maybeBind(host, host.writeFile); - return (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => { - var _a, _b, _c, _d; - if (isDeclarationFileName(fileName)) { - if (!outFile(state.compilerOptions)) { - Debug.assert((sourceFiles == null ? void 0 : sourceFiles.length) === 1); - let emitSignature; - if (!customTransformers) { - const file = sourceFiles[0]; - const info = state.fileInfos.get(file.resolvedPath); - if (info.signature === file.version) { - const signature = computeSignatureWithDiagnostics( - state.program, - file, - text, - host, - data - ); - if (!((_a = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a.length)) - emitSignature = signature; - if (signature !== file.version) { - if (host.storeFilesChangingSignatureDuringEmit) - (state.filesChangingSignature ?? (state.filesChangingSignature = /* @__PURE__ */ new Set())).add(file.resolvedPath); - if (state.exportedModulesMap) - BuilderState.updateExportedModules(state, file, file.exportedModulesFromDeclarationEmit); - if (state.affectedFiles) { - const existing = (_b = state.oldSignatures) == null ? void 0 : _b.get(file.resolvedPath); - if (existing === void 0) - (state.oldSignatures ?? (state.oldSignatures = /* @__PURE__ */ new Map())).set(file.resolvedPath, info.signature || false); - info.signature = signature; - } else { - info.signature = signature; - (_c = state.oldExportedModulesMap) == null ? void 0 : _c.clear(); - } - } - } - } - if (state.compilerOptions.composite) { - const filePath = sourceFiles[0].resolvedPath; - emitSignature = handleNewSignature((_d = state.emitSignatures) == null ? void 0 : _d.get(filePath), emitSignature); - if (!emitSignature) - return; - (state.emitSignatures ?? (state.emitSignatures = /* @__PURE__ */ new Map())).set(filePath, emitSignature); - } - } else if (state.compilerOptions.composite) { - const newSignature = handleNewSignature( - state.outSignature, - /*newSignature*/ - void 0 - ); - if (!newSignature) - return; - state.outSignature = newSignature; - } - } - if (writeFile2) - writeFile2(fileName, text, writeByteOrderMark, onError, sourceFiles, data); - else if (host.writeFile) - host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data); - else - state.program.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data); - function handleNewSignature(oldSignatureFormat, newSignature) { - const oldSignature = !oldSignatureFormat || isString(oldSignatureFormat) ? oldSignatureFormat : oldSignatureFormat[0]; - newSignature ?? (newSignature = computeSignature(text, host, data)); - if (newSignature === oldSignature) { - if (oldSignatureFormat === oldSignature) - return void 0; - else if (data) - data.differsOnlyInMap = true; - else - data = { differsOnlyInMap: true }; - } else { - state.hasChangedEmitSignature = true; - state.latestChangedDtsFile = fileName; - } - return newSignature; - } - }; - } - function emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) { - if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) { - assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile); - } - const result = handleNoEmitOptions(builderProgram, targetSourceFile, writeFile2, cancellationToken); - if (result) - return result; - if (!targetSourceFile) { - if (kind === 1 /* EmitAndSemanticDiagnosticsBuilderProgram */) { - let sourceMaps = []; - let emitSkipped = false; - let diagnostics; - let emittedFiles = []; - let affectedEmitResult; - while (affectedEmitResult = emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers)) { - emitSkipped = emitSkipped || affectedEmitResult.result.emitSkipped; - diagnostics = addRange(diagnostics, affectedEmitResult.result.diagnostics); - emittedFiles = addRange(emittedFiles, affectedEmitResult.result.emittedFiles); - sourceMaps = addRange(sourceMaps, affectedEmitResult.result.sourceMaps); - } - return { - emitSkipped, - diagnostics: diagnostics || emptyArray, - emittedFiles, - sourceMaps - }; - } else { - clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles); - } - } - return Debug.checkDefined(state.program).emit( - targetSourceFile, - getWriteFileCallback(writeFile2, customTransformers), - cancellationToken, - emitOnlyDtsFiles, - customTransformers - ); - } - function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) { - while (true) { - const affected = getNextAffectedFile(state, cancellationToken, host); - let result; - if (!affected) - return void 0; - else if (affected !== state.program) { - const affectedSourceFile = affected; - if (!ignoreSourceFile || !ignoreSourceFile(affectedSourceFile)) { - result = getSemanticDiagnosticsOfFile(state, affectedSourceFile, cancellationToken); - } - state.seenAffectedFiles.add(affectedSourceFile.resolvedPath); - state.affectedFilesIndex++; - state.buildInfoEmitPending = true; - if (!result) - continue; - } else { - result = state.program.getSemanticDiagnostics( - /*sourceFile*/ - void 0, - cancellationToken - ); - state.changedFilesSet.clear(); - state.programEmitPending = getBuilderFileEmit(state.compilerOptions); - } - return { result, affected }; - } - } - function getSemanticDiagnostics(sourceFile, cancellationToken) { - assertSourceFileOkWithoutNextAffectedCall(state, sourceFile); - const compilerOptions = Debug.checkDefined(state.program).getCompilerOptions(); - if (outFile(compilerOptions)) { - Debug.assert(!state.semanticDiagnosticsPerFile); - return Debug.checkDefined(state.program).getSemanticDiagnostics(sourceFile, cancellationToken); - } - if (sourceFile) { - return getSemanticDiagnosticsOfFile(state, sourceFile, cancellationToken); - } - while (getSemanticDiagnosticsOfNextAffectedFile(cancellationToken)) { - } - let diagnostics; - for (const sourceFile2 of Debug.checkDefined(state.program).getSourceFiles()) { - diagnostics = addRange(diagnostics, getSemanticDiagnosticsOfFile(state, sourceFile2, cancellationToken)); - } - return diagnostics || emptyArray; - } - } - function addToAffectedFilesPendingEmit(state, affectedFilePendingEmit, kind) { - var _a; - const existingKind = ((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.get(affectedFilePendingEmit)) || 0 /* None */; - (state.affectedFilesPendingEmit ?? (state.affectedFilesPendingEmit = /* @__PURE__ */ new Map())).set(affectedFilePendingEmit, existingKind | kind); - } - function toBuilderStateFileInfoForMultiEmit(fileInfo) { - return isString(fileInfo) ? { version: fileInfo, signature: fileInfo, affectsGlobalScope: void 0, impliedFormat: void 0 } : isString(fileInfo.signature) ? fileInfo : { version: fileInfo.version, signature: fileInfo.signature === false ? void 0 : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat }; - } - function toBuilderFileEmit(value, fullEmitForOptions) { - return isNumber(value) ? fullEmitForOptions : value[1] || 8 /* Dts */; - } - function toProgramEmitPending(value, options) { - return !value ? getBuilderFileEmit(options || {}) : value; - } - function createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host) { - var _a, _b, _c, _d; - const program = buildInfo.program; - const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); - const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); - let state; - const filePaths = (_a = program.fileNames) == null ? void 0 : _a.map(toPathInBuildInfoDirectory); - let filePathsSetList; - const latestChangedDtsFile = program.latestChangedDtsFile ? toAbsolutePath(program.latestChangedDtsFile) : void 0; - if (isProgramBundleEmitBuildInfo(program)) { - const fileInfos = /* @__PURE__ */ new Map(); - program.fileInfos.forEach((fileInfo, index) => { - const path = toFilePath(index + 1); - fileInfos.set(path, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo); - }); - state = { - fileInfos, - compilerOptions: program.options ? convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {}, - latestChangedDtsFile, - outSignature: program.outSignature, - programEmitPending: program.pendingEmit === void 0 ? void 0 : toProgramEmitPending(program.pendingEmit, program.options), - bundle: buildInfo.bundle - }; - } else { - filePathsSetList = (_b = program.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath))); - const fileInfos = /* @__PURE__ */ new Map(); - const emitSignatures = ((_c = program.options) == null ? void 0 : _c.composite) && !outFile(program.options) ? /* @__PURE__ */ new Map() : void 0; - program.fileInfos.forEach((fileInfo, index) => { - const path = toFilePath(index + 1); - const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo); - fileInfos.set(path, stateFileInfo); - if (emitSignatures && stateFileInfo.signature) - emitSignatures.set(path, stateFileInfo.signature); - }); - (_d = program.emitSignatures) == null ? void 0 : _d.forEach((value) => { - if (isNumber(value)) - emitSignatures.delete(toFilePath(value)); - else { - const key = toFilePath(value[0]); - emitSignatures.set( - key, - !isString(value[1]) && !value[1].length ? ( - // File signature is emit signature but differs in map - [emitSignatures.get(key)] - ) : value[1] - ); - } - }); - const fullEmitForOptions = program.affectedFilesPendingEmit ? getBuilderFileEmit(program.options || {}) : void 0; - state = { - fileInfos, - compilerOptions: program.options ? convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {}, - referencedMap: toManyToManyPathMap(program.referencedMap), - exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap), - semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && arrayToMap(program.semanticDiagnosticsPerFile, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => isNumber(value) ? emptyArray : value[1]), - hasReusableDiagnostic: true, - affectedFilesPendingEmit: program.affectedFilesPendingEmit && arrayToMap(program.affectedFilesPendingEmit, (value) => toFilePath(isNumber(value) ? value : value[0]), (value) => toBuilderFileEmit(value, fullEmitForOptions)), - changedFilesSet: new Set(map(program.changeFileSet, toFilePath)), - latestChangedDtsFile, - emitSignatures: (emitSignatures == null ? void 0 : emitSignatures.size) ? emitSignatures : void 0 - }; - } - return { - getState: () => state, - saveEmitState: noop, - restoreEmitState: noop, - getProgram: notImplemented, - getProgramOrUndefined: returnUndefined, - releaseProgram: noop, - getCompilerOptions: () => state.compilerOptions, - getSourceFile: notImplemented, - getSourceFiles: notImplemented, - getOptionsDiagnostics: notImplemented, - getGlobalDiagnostics: notImplemented, - getConfigFileParsingDiagnostics: notImplemented, - getSyntacticDiagnostics: notImplemented, - getDeclarationDiagnostics: notImplemented, - getSemanticDiagnostics: notImplemented, - emit: notImplemented, - getAllDependencies: notImplemented, - getCurrentDirectory: notImplemented, - emitNextAffectedFile: notImplemented, - getSemanticDiagnosticsOfNextAffectedFile: notImplemented, - emitBuildInfo: notImplemented, - close: noop, - hasChangedEmitSignature: returnFalse - }; - function toPathInBuildInfoDirectory(path) { - return toPath(path, buildInfoDirectory, getCanonicalFileName); - } - function toAbsolutePath(path) { - return getNormalizedAbsolutePath(path, buildInfoDirectory); - } - function toFilePath(fileId) { - return filePaths[fileId - 1]; - } - function toFilePathsSet(fileIdsListId) { - return filePathsSetList[fileIdsListId - 1]; - } - function toManyToManyPathMap(referenceMap) { - if (!referenceMap) { - return void 0; - } - const map2 = BuilderState.createManyToManyPathMap(); - referenceMap.forEach( - ([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId)) - ); - return map2; - } - } - function getBuildInfoFileVersionMap(program, buildInfoPath, host) { - const buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory())); - const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); - const fileInfos = /* @__PURE__ */ new Map(); - let rootIndex = 0; - const roots = []; - program.fileInfos.forEach((fileInfo, index) => { - const path = toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName); - const version2 = isString(fileInfo) ? fileInfo : fileInfo.version; - fileInfos.set(path, version2); - if (rootIndex < program.root.length) { - const current = program.root[rootIndex]; - const fileId = index + 1; - if (isArray(current)) { - if (current[0] <= fileId && fileId <= current[1]) { - roots.push(path); - if (current[1] === fileId) - rootIndex++; - } - } else if (current === fileId) { - roots.push(path); - rootIndex++; - } - } - }); - return { fileInfos, roots }; - } - function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) { - return { - getState: notImplemented, - saveEmitState: noop, - restoreEmitState: noop, - getProgram, - getProgramOrUndefined: () => getState().program, - releaseProgram: () => getState().program = void 0, - getCompilerOptions: () => getState().compilerOptions, - getSourceFile: (fileName) => getProgram().getSourceFile(fileName), - getSourceFiles: () => getProgram().getSourceFiles(), - getOptionsDiagnostics: (cancellationToken) => getProgram().getOptionsDiagnostics(cancellationToken), - getGlobalDiagnostics: (cancellationToken) => getProgram().getGlobalDiagnostics(cancellationToken), - getConfigFileParsingDiagnostics: () => configFileParsingDiagnostics, - getSyntacticDiagnostics: (sourceFile, cancellationToken) => getProgram().getSyntacticDiagnostics(sourceFile, cancellationToken), - getDeclarationDiagnostics: (sourceFile, cancellationToken) => getProgram().getDeclarationDiagnostics(sourceFile, cancellationToken), - getSemanticDiagnostics: (sourceFile, cancellationToken) => getProgram().getSemanticDiagnostics(sourceFile, cancellationToken), - emit: (sourceFile, writeFile2, cancellationToken, emitOnlyDts, customTransformers) => getProgram().emit(sourceFile, writeFile2, cancellationToken, emitOnlyDts, customTransformers), - emitBuildInfo: (writeFile2, cancellationToken) => getProgram().emitBuildInfo(writeFile2, cancellationToken), - getAllDependencies: notImplemented, - getCurrentDirectory: () => getProgram().getCurrentDirectory(), - close: noop - }; - function getProgram() { - return Debug.checkDefined(getState().program); - } - } - var BuilderFileEmit, BuilderProgramKind; - var init_builder = __esm({ - "src/compiler/builder.ts"() { - "use strict"; - init_ts2(); - BuilderFileEmit = /* @__PURE__ */ ((BuilderFileEmit2) => { - BuilderFileEmit2[BuilderFileEmit2["None"] = 0] = "None"; - BuilderFileEmit2[BuilderFileEmit2["Js"] = 1] = "Js"; - BuilderFileEmit2[BuilderFileEmit2["JsMap"] = 2] = "JsMap"; - BuilderFileEmit2[BuilderFileEmit2["JsInlineMap"] = 4] = "JsInlineMap"; - BuilderFileEmit2[BuilderFileEmit2["Dts"] = 8] = "Dts"; - BuilderFileEmit2[BuilderFileEmit2["DtsMap"] = 16] = "DtsMap"; - BuilderFileEmit2[BuilderFileEmit2["AllJs"] = 7] = "AllJs"; - BuilderFileEmit2[BuilderFileEmit2["AllDts"] = 24] = "AllDts"; - BuilderFileEmit2[BuilderFileEmit2["All"] = 31] = "All"; - return BuilderFileEmit2; - })(BuilderFileEmit || {}); - BuilderProgramKind = /* @__PURE__ */ ((BuilderProgramKind2) => { - BuilderProgramKind2[BuilderProgramKind2["SemanticDiagnosticsBuilderProgram"] = 0] = "SemanticDiagnosticsBuilderProgram"; - BuilderProgramKind2[BuilderProgramKind2["EmitAndSemanticDiagnosticsBuilderProgram"] = 1] = "EmitAndSemanticDiagnosticsBuilderProgram"; - return BuilderProgramKind2; - })(BuilderProgramKind || {}); - } - }); - - // src/compiler/builderPublic.ts - function createSemanticDiagnosticsBuilderProgram(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) { - return createBuilderProgram(0 /* SemanticDiagnosticsBuilderProgram */, getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences)); - } - function createEmitAndSemanticDiagnosticsBuilderProgram(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) { - return createBuilderProgram(1 /* EmitAndSemanticDiagnosticsBuilderProgram */, getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences)); - } - function createAbstractBuilder(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) { - const { newProgram, configFileParsingDiagnostics: newConfigFileParsingDiagnostics } = getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences); - return createRedirectedBuilderProgram(() => ({ program: newProgram, compilerOptions: newProgram.getCompilerOptions() }), newConfigFileParsingDiagnostics); - } - var init_builderPublic = __esm({ - "src/compiler/builderPublic.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/resolutionCache.ts - function removeIgnoredPath(path) { - if (endsWith(path, "/node_modules/.staging")) { - return removeSuffix(path, "/.staging"); - } - return some(ignoredPaths, (searchPath) => stringContains(path, searchPath)) ? void 0 : path; - } - function perceivedOsRootLengthForWatching(pathComponents2, length2) { - if (length2 <= 1) - return 1; - let userCheckIndex = 1; - let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0; - if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths - pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) { - if (length2 === 2) - return 2; - userCheckIndex = 2; - isDosStyle = true; - } - if (isDosStyle && !pathComponents2[userCheckIndex].match(/^users$/i)) { - return userCheckIndex; - } - return userCheckIndex + 2; - } - function canWatchDirectoryOrFile(pathComponents2, length2) { - if (length2 === void 0) - length2 = pathComponents2.length; - if (length2 <= 2) - return false; - const perceivedOsRootLength = perceivedOsRootLengthForWatching(pathComponents2, length2); - return length2 > perceivedOsRootLength + 1; - } - function canWatchAtTypes(atTypes) { - return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(getDirectoryPath(atTypes)); - } - function isInDirectoryPath(dirComponents, fileOrDirComponents) { - if (fileOrDirComponents.length < fileOrDirComponents.length) - return false; - for (let i = 0; i < dirComponents.length; i++) { - if (fileOrDirComponents[i] !== dirComponents[i]) - return false; - } - return true; - } - function canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(fileOrDirPath) { - return canWatchDirectoryOrFile(getPathComponents(fileOrDirPath)); - } - function canWatchAffectingLocation(filePath) { - return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(filePath); - } - function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath, rootDir, rootPath, rootPathComponents, getCurrentDirectory) { - const failedLookupPathComponents = getPathComponents(failedLookupLocationPath); - failedLookupLocation = isRootedDiskPath(failedLookupLocation) ? normalizePath(failedLookupLocation) : getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory()); - const failedLookupComponents = getPathComponents(failedLookupLocation); - const perceivedOsRootLength = perceivedOsRootLengthForWatching(failedLookupPathComponents, failedLookupPathComponents.length); - if (failedLookupPathComponents.length <= perceivedOsRootLength + 1) - return void 0; - const nodeModulesIndex = failedLookupPathComponents.indexOf("node_modules"); - if (nodeModulesIndex !== -1 && nodeModulesIndex + 1 <= perceivedOsRootLength + 1) - return void 0; - if (isInDirectoryPath(rootPathComponents, failedLookupPathComponents)) { - if (failedLookupPathComponents.length > rootPathComponents.length + 1) { - return getDirectoryOfFailedLookupWatch(failedLookupComponents, failedLookupPathComponents, Math.max(rootPathComponents.length + 1, perceivedOsRootLength + 1)); - } else { - return { - dir: rootDir, - dirPath: rootPath, - nonRecursive: true - }; - } - } - return getDirectoryToWatchFromFailedLookupLocationDirectory( - failedLookupComponents, - failedLookupPathComponents, - failedLookupPathComponents.length - 1, - perceivedOsRootLength, - nodeModulesIndex, - rootPathComponents - ); - } - function getDirectoryToWatchFromFailedLookupLocationDirectory(dirComponents, dirPathComponents, dirPathComponentsLength, perceivedOsRootLength, nodeModulesIndex, rootPathComponents) { - if (nodeModulesIndex !== -1) { - return getDirectoryOfFailedLookupWatch(dirComponents, dirPathComponents, nodeModulesIndex + 1); - } - let nonRecursive = true; - let length2 = dirPathComponentsLength; - for (let i = 0; i < dirPathComponentsLength; i++) { - if (dirPathComponents[i] !== rootPathComponents[i]) { - nonRecursive = false; - length2 = Math.max(i + 1, perceivedOsRootLength + 1); - break; - } - } - return getDirectoryOfFailedLookupWatch(dirComponents, dirPathComponents, length2, nonRecursive); - } - function getDirectoryOfFailedLookupWatch(dirComponents, dirPathComponents, length2, nonRecursive) { - return { - dir: getPathFromPathComponents(dirComponents, length2), - dirPath: getPathFromPathComponents(dirPathComponents, length2), - nonRecursive - }; - } - function getDirectoryToWatchFailedLookupLocationFromTypeRoot(typeRoot, typeRootPath, rootPath, rootPathComponents, getCurrentDirectory, filterCustomPath) { - const typeRootPathComponents = getPathComponents(typeRootPath); - if (isInDirectoryPath(rootPathComponents, typeRootPathComponents)) { - return rootPath; - } - typeRoot = isRootedDiskPath(typeRoot) ? normalizePath(typeRoot) : getNormalizedAbsolutePath(typeRoot, getCurrentDirectory()); - const toWatch = getDirectoryToWatchFromFailedLookupLocationDirectory( - getPathComponents(typeRoot), - typeRootPathComponents, - typeRootPathComponents.length, - perceivedOsRootLengthForWatching(typeRootPathComponents, typeRootPathComponents.length), - typeRootPathComponents.indexOf("node_modules"), - rootPathComponents - ); - return toWatch && filterCustomPath(toWatch.dirPath) ? toWatch.dirPath : void 0; - } - function getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory) { - const normalized = getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()); - return !isDiskPathRoot(normalized) ? removeTrailingDirectorySeparator(normalized) : normalized; - } - function getRootPathSplitLength(rootPath) { - return rootPath.split(directorySeparator).length - (hasTrailingDirectorySeparator(rootPath) ? 1 : 0); - } - function createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) { - let filesWithChangedSetOfUnresolvedImports; - let filesWithInvalidatedResolutions; - let filesWithInvalidatedNonRelativeUnresolvedImports; - const nonRelativeExternalModuleResolutions = createMultiMap(); - const resolutionsWithFailedLookups = /* @__PURE__ */ new Set(); - const resolutionsWithOnlyAffectingLocations = /* @__PURE__ */ new Set(); - const resolvedFileToResolution = /* @__PURE__ */ new Map(); - const impliedFormatPackageJsons = /* @__PURE__ */ new Map(); - let hasChangedAutomaticTypeDirectiveNames = false; - let affectingPathChecksForFile; - let affectingPathChecks; - let failedLookupChecks; - let startsWithPathChecks; - let isInDirectoryChecks; - let allModuleAndTypeResolutionsAreInvalidated = false; - const getCurrentDirectory = memoize(() => resolutionHost.getCurrentDirectory()); - const cachedDirectoryStructureHost = resolutionHost.getCachedDirectoryStructureHost(); - const resolvedModuleNames = /* @__PURE__ */ new Map(); - const moduleResolutionCache = createModuleResolutionCache( - getCurrentDirectory(), - resolutionHost.getCanonicalFileName, - resolutionHost.getCompilationSettings() - ); - const resolvedTypeReferenceDirectives = /* @__PURE__ */ new Map(); - const typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache( - getCurrentDirectory(), - resolutionHost.getCanonicalFileName, - resolutionHost.getCompilationSettings(), - moduleResolutionCache.getPackageJsonInfoCache() - ); - const resolvedLibraries = /* @__PURE__ */ new Map(); - const libraryResolutionCache = createModuleResolutionCache( - getCurrentDirectory(), - resolutionHost.getCanonicalFileName, - getOptionsForLibraryResolution(resolutionHost.getCompilationSettings()), - moduleResolutionCache.getPackageJsonInfoCache() - ); - const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map(); - const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map(); - const rootDir = getRootDirectoryOfResolutionCache(rootDirForResolution, getCurrentDirectory); - const rootPath = resolutionHost.toPath(rootDir); - const rootPathComponents = getPathComponents(rootPath); - const typeRootsWatches = /* @__PURE__ */ new Map(); - return { - getModuleResolutionCache: () => moduleResolutionCache, - startRecordingFilesWithChangedResolutions, - finishRecordingFilesWithChangedResolutions, - // perDirectoryResolvedModuleNames and perDirectoryResolvedTypeReferenceDirectives could be non empty if there was exception during program update - // (between startCachingPerDirectoryResolution and finishCachingPerDirectoryResolution) - startCachingPerDirectoryResolution, - finishCachingPerDirectoryResolution, - resolveModuleNameLiterals, - resolveTypeReferenceDirectiveReferences, - resolveLibrary: resolveLibrary2, - resolveSingleModuleNameWithoutWatching, - removeResolutionsFromProjectReferenceRedirects, - removeResolutionsOfFile, - hasChangedAutomaticTypeDirectiveNames: () => hasChangedAutomaticTypeDirectiveNames, - invalidateResolutionOfFile, - invalidateResolutionsOfFailedLookupLocations, - setFilesWithInvalidatedNonRelativeUnresolvedImports, - createHasInvalidatedResolutions, - isFileWithInvalidatedNonRelativeUnresolvedImports, - updateTypeRootsWatch, - closeTypeRootsWatch, - clear: clear2, - onChangesAffectModuleResolution - }; - function getResolvedModule2(resolution) { - return resolution.resolvedModule; - } - function getResolvedTypeReferenceDirective2(resolution) { - return resolution.resolvedTypeReferenceDirective; - } - function clear2() { - clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf); - clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf); - nonRelativeExternalModuleResolutions.clear(); - closeTypeRootsWatch(); - resolvedModuleNames.clear(); - resolvedTypeReferenceDirectives.clear(); - resolvedFileToResolution.clear(); - resolutionsWithFailedLookups.clear(); - resolutionsWithOnlyAffectingLocations.clear(); - failedLookupChecks = void 0; - startsWithPathChecks = void 0; - isInDirectoryChecks = void 0; - affectingPathChecks = void 0; - affectingPathChecksForFile = void 0; - allModuleAndTypeResolutionsAreInvalidated = false; - moduleResolutionCache.clear(); - typeReferenceDirectiveResolutionCache.clear(); - moduleResolutionCache.update(resolutionHost.getCompilationSettings()); - typeReferenceDirectiveResolutionCache.update(resolutionHost.getCompilationSettings()); - libraryResolutionCache.clear(); - impliedFormatPackageJsons.clear(); - resolvedLibraries.clear(); - hasChangedAutomaticTypeDirectiveNames = false; - } - function onChangesAffectModuleResolution() { - allModuleAndTypeResolutionsAreInvalidated = true; - moduleResolutionCache.clearAllExceptPackageJsonInfoCache(); - typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache(); - moduleResolutionCache.update(resolutionHost.getCompilationSettings()); - typeReferenceDirectiveResolutionCache.update(resolutionHost.getCompilationSettings()); - } - function startRecordingFilesWithChangedResolutions() { - filesWithChangedSetOfUnresolvedImports = []; - } - function finishRecordingFilesWithChangedResolutions() { - const collected = filesWithChangedSetOfUnresolvedImports; - filesWithChangedSetOfUnresolvedImports = void 0; - return collected; - } - function isFileWithInvalidatedNonRelativeUnresolvedImports(path) { - if (!filesWithInvalidatedNonRelativeUnresolvedImports) { - return false; - } - const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path); - return !!value && !!value.length; - } - function createHasInvalidatedResolutions(customHasInvalidatedResolutions, customHasInvalidatedLibResolutions) { - invalidateResolutionsOfFailedLookupLocations(); - const collected = filesWithInvalidatedResolutions; - filesWithInvalidatedResolutions = void 0; - return { - hasInvalidatedResolutions: (path) => customHasInvalidatedResolutions(path) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? void 0 : collected.has(path)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path), - hasInvalidatedLibResolutions: (libFileName) => { - var _a; - return customHasInvalidatedLibResolutions(libFileName) || !!((_a = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName)) == null ? void 0 : _a.isInvalidated); - } - }; - } - function startCachingPerDirectoryResolution() { - moduleResolutionCache.clearAllExceptPackageJsonInfoCache(); - typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache(); - libraryResolutionCache.clearAllExceptPackageJsonInfoCache(); - nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfNonRelativeModuleResolutions); - nonRelativeExternalModuleResolutions.clear(); - } - function cleanupLibResolutionWatching(newProgram) { - resolvedLibraries.forEach((resolution, libFileName) => { - var _a; - if (!((_a = newProgram == null ? void 0 : newProgram.resolvedLibReferences) == null ? void 0 : _a.has(libFileName))) { - stopWatchFailedLookupLocationOfResolution( - resolution, - resolutionHost.toPath(getInferredLibraryNameResolveFrom(newProgram.getCompilerOptions(), getCurrentDirectory(), libFileName)), - getResolvedModule2 - ); - resolvedLibraries.delete(libFileName); - } - }); - } - function finishCachingPerDirectoryResolution(newProgram, oldProgram) { - filesWithInvalidatedNonRelativeUnresolvedImports = void 0; - allModuleAndTypeResolutionsAreInvalidated = false; - nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfNonRelativeModuleResolutions); - nonRelativeExternalModuleResolutions.clear(); - if (newProgram !== oldProgram) { - cleanupLibResolutionWatching(newProgram); - newProgram == null ? void 0 : newProgram.getSourceFiles().forEach((newFile) => { - var _a; - const expected = isExternalOrCommonJsModule(newFile) ? ((_a = newFile.packageJsonLocations) == null ? void 0 : _a.length) ?? 0 : 0; - const existing = impliedFormatPackageJsons.get(newFile.path) ?? emptyArray; - for (let i = existing.length; i < expected; i++) { - createFileWatcherOfAffectingLocation( - newFile.packageJsonLocations[i], - /*forResolution*/ - false - ); - } - if (existing.length > expected) { - for (let i = expected; i < existing.length; i++) { - fileWatchesOfAffectingLocations.get(existing[i]).files--; - } - } - if (expected) - impliedFormatPackageJsons.set(newFile.path, newFile.packageJsonLocations); - else - impliedFormatPackageJsons.delete(newFile.path); - }); - impliedFormatPackageJsons.forEach((existing, path) => { - if (!(newProgram == null ? void 0 : newProgram.getSourceFileByPath(path))) { - existing.forEach((location) => fileWatchesOfAffectingLocations.get(location).files--); - impliedFormatPackageJsons.delete(path); - } - }); - } - directoryWatchesOfFailedLookups.forEach((watcher, path) => { - if (watcher.refCount === 0) { - directoryWatchesOfFailedLookups.delete(path); - watcher.watcher.close(); - } - }); - fileWatchesOfAffectingLocations.forEach((watcher, path) => { - if (watcher.files === 0 && watcher.resolutions === 0) { - fileWatchesOfAffectingLocations.delete(path); - watcher.watcher.close(); - } - }); - hasChangedAutomaticTypeDirectiveNames = false; - } - function resolveModuleName2(moduleName, containingFile, compilerOptions, redirectedReference, mode) { - var _a; - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; - const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); - if (!resolutionHost.getGlobalCache) { - return primaryResult; - } - const globalCache = resolutionHost.getGlobalCache(); - if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { - const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( - Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), - resolutionHost.projectName, - compilerOptions, - host, - globalCache, - moduleResolutionCache - ); - if (resolvedModule) { - primaryResult.resolvedModule = resolvedModule; - primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations); - primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations); - primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics); - return primaryResult; - } - } - return primaryResult; - } - function createModuleResolutionLoader2(containingFile, redirectedReference, options) { - return { - nameAndMode: moduleResolutionNameAndModeGetter, - resolve: (moduleName, resoluionMode) => resolveModuleName2( - moduleName, - containingFile, - options, - redirectedReference, - resoluionMode - ) - }; - } - function resolveNamesWithLocalCache({ - entries, - containingFile, - containingSourceFile, - redirectedReference, - options, - perFileCache, - reusedNames, - loader, - getResolutionWithResolvedFileName, - deferWatchingNonRelativeResolution, - shouldRetryResolution, - logChanges - }) { - var _a; - const path = resolutionHost.toPath(containingFile); - const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path); - const resolvedModules = []; - const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - const program = resolutionHost.getCurrentProgram(); - const oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); - const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference; - const seenNamesInFile = createModeAwareCache(); - for (const entry of entries) { - const name = loader.nameAndMode.getName(entry); - const mode = loader.nameAndMode.getMode(entry, containingSourceFile); - let resolution = resolutionsInFile.get(name, mode); - if (!seenNamesInFile.has(name, mode) && (allModuleAndTypeResolutionsAreInvalidated || unmatchedRedirects || !resolution || resolution.isInvalidated || // If the name is unresolved import that was invalidated, recalculate - hasInvalidatedNonRelativeUnresolvedImport && !isExternalModuleNameRelative(name) && shouldRetryResolution(resolution))) { - const existingResolution = resolution; - resolution = loader.resolve(name, mode); - if (resolutionHost.onDiscoveredSymlink && resolutionIsSymlink(resolution)) { - resolutionHost.onDiscoveredSymlink(); - } - resolutionsInFile.set(name, mode, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); - if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); - } - if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) { - filesWithChangedSetOfUnresolvedImports.push(path); - logChanges = false; - } - } else { - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; - if (isTraceEnabled(options, host) && !seenNamesInFile.has(name, mode)) { - const resolved = getResolutionWithResolvedFileName(resolution); - trace( - host, - perFileCache === resolvedModuleNames ? (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved : (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved, - name, - containingFile, - resolved == null ? void 0 : resolved.resolvedFileName, - (resolved == null ? void 0 : resolved.packageId) && packageIdToString(resolved.packageId) - ); - } - } - Debug.assert(resolution !== void 0 && !resolution.isInvalidated); - seenNamesInFile.set(name, mode, true); - resolvedModules.push(resolution); - } - reusedNames == null ? void 0 : reusedNames.forEach((entry) => seenNamesInFile.set( - loader.nameAndMode.getName(entry), - loader.nameAndMode.getMode(entry, containingSourceFile), - true - )); - if (resolutionsInFile.size() !== seenNamesInFile.size()) { - resolutionsInFile.forEach((resolution, name, mode) => { - if (!seenNamesInFile.has(name, mode)) { - stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName); - resolutionsInFile.delete(name, mode); - } - }); - } - return resolvedModules; - function resolutionIsEqualTo(oldResolution, newResolution) { - if (oldResolution === newResolution) { - return true; - } - if (!oldResolution || !newResolution) { - return false; - } - const oldResult = getResolutionWithResolvedFileName(oldResolution); - const newResult = getResolutionWithResolvedFileName(newResolution); - if (oldResult === newResult) { - return true; - } - if (!oldResult || !newResult) { - return false; - } - return oldResult.resolvedFileName === newResult.resolvedFileName; - } - } - function resolveTypeReferenceDirectiveReferences(typeDirectiveReferences, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { - var _a; - return resolveNamesWithLocalCache({ - entries: typeDirectiveReferences, - containingFile, - containingSourceFile, - redirectedReference, - options, - reusedNames, - perFileCache: resolvedTypeReferenceDirectives, - loader: createTypeReferenceResolutionLoader( - containingFile, - redirectedReference, - options, - ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost, - typeReferenceDirectiveResolutionCache - ), - getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective2, - shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0, - deferWatchingNonRelativeResolution: false - }); - } - function resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { - return resolveNamesWithLocalCache({ - entries: moduleLiterals, - containingFile, - containingSourceFile, - redirectedReference, - options, - reusedNames, - perFileCache: resolvedModuleNames, - loader: createModuleResolutionLoader2( - containingFile, - redirectedReference, - options - ), - getResolutionWithResolvedFileName: getResolvedModule2, - shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension), - logChanges: logChangesWhenResolvingModule, - deferWatchingNonRelativeResolution: true - // Defer non relative resolution watch because we could be using ambient modules - }); - } - function resolveLibrary2(libraryName, resolveFrom, options, libFileName) { - var _a; - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; - let resolution = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName); - if (!resolution || resolution.isInvalidated) { - const existingResolution = resolution; - resolution = resolveLibrary(libraryName, resolveFrom, options, host, libraryResolutionCache); - const path = resolutionHost.toPath(resolveFrom); - watchFailedLookupLocationsOfExternalModuleResolutions( - libraryName, - resolution, - path, - getResolvedModule2, - /*deferWatchingNonRelativeResolution*/ - false - ); - resolvedLibraries.set(libFileName, resolution); - if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModule2); - } - } else { - if (isTraceEnabled(options, host)) { - const resolved = getResolvedModule2(resolution); - trace( - host, - (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, - libraryName, - resolveFrom, - resolved == null ? void 0 : resolved.resolvedFileName, - (resolved == null ? void 0 : resolved.packageId) && packageIdToString(resolved.packageId) - ); - } - } - return resolution; - } - function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) { - const path = resolutionHost.toPath(containingFile); - const resolutionsInFile = resolvedModuleNames.get(path); - const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get( - moduleName, - /*mode*/ - void 0 - ); - if (resolution && !resolution.isInvalidated) - return resolution; - return resolveModuleName2(moduleName, containingFile, resolutionHost.getCompilationSettings()); - } - function isNodeModulesAtTypesDirectory(dirPath) { - return endsWith(dirPath, "/node_modules/@types"); - } - function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution) { - var _a; - if (resolution.refCount) { - resolution.refCount++; - Debug.assertIsDefined(resolution.files); - } else { - resolution.refCount = 1; - Debug.assert(!((_a = resolution.files) == null ? void 0 : _a.size)); - if (!deferWatchingNonRelativeResolution || isExternalModuleNameRelative(name)) { - watchFailedLookupLocationOfResolution(resolution); - } else { - nonRelativeExternalModuleResolutions.add(name, resolution); - } - const resolved = getResolutionWithResolvedFileName(resolution); - if (resolved && resolved.resolvedFileName) { - const key = resolutionHost.toPath(resolved.resolvedFileName); - let resolutions = resolvedFileToResolution.get(key); - if (!resolutions) - resolvedFileToResolution.set(key, resolutions = /* @__PURE__ */ new Set()); - resolutions.add(resolution); - } - } - (resolution.files ?? (resolution.files = /* @__PURE__ */ new Set())).add(filePath); - } - function watchFailedLookupLocation(failedLookupLocation, setAtRoot) { - const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); - const toWatch = getDirectoryToWatchFailedLookupLocation( - failedLookupLocation, - failedLookupLocationPath, - rootDir, - rootPath, - rootPathComponents, - getCurrentDirectory - ); - if (toWatch) { - const { dir, dirPath, nonRecursive } = toWatch; - if (dirPath === rootPath) { - Debug.assert(nonRecursive); - setAtRoot = true; - } else { - setDirectoryWatcher(dir, dirPath, nonRecursive); - } - } - return setAtRoot; - } - function watchFailedLookupLocationOfResolution(resolution) { - Debug.assert(!!resolution.refCount); - const { failedLookupLocations, affectingLocations, node10Result } = resolution; - if (!(failedLookupLocations == null ? void 0 : failedLookupLocations.length) && !(affectingLocations == null ? void 0 : affectingLocations.length) && !node10Result) - return; - if ((failedLookupLocations == null ? void 0 : failedLookupLocations.length) || node10Result) - resolutionsWithFailedLookups.add(resolution); - let setAtRoot = false; - if (failedLookupLocations) { - for (const failedLookupLocation of failedLookupLocations) { - setAtRoot = watchFailedLookupLocation(failedLookupLocation, setAtRoot); - } - } - if (node10Result) - setAtRoot = watchFailedLookupLocation(node10Result, setAtRoot); - if (setAtRoot) { - setDirectoryWatcher( - rootDir, - rootPath, - /*nonRecursive*/ - true - ); - } - watchAffectingLocationsOfResolution(resolution, !(failedLookupLocations == null ? void 0 : failedLookupLocations.length) && !node10Result); - } - function watchAffectingLocationsOfResolution(resolution, addToResolutionsWithOnlyAffectingLocations) { - Debug.assert(!!resolution.refCount); - const { affectingLocations } = resolution; - if (!(affectingLocations == null ? void 0 : affectingLocations.length)) - return; - if (addToResolutionsWithOnlyAffectingLocations) - resolutionsWithOnlyAffectingLocations.add(resolution); - for (const affectingLocation of affectingLocations) { - createFileWatcherOfAffectingLocation( - affectingLocation, - /*forResolution*/ - true - ); - } - } - function createFileWatcherOfAffectingLocation(affectingLocation, forResolution) { - const fileWatcher = fileWatchesOfAffectingLocations.get(affectingLocation); - if (fileWatcher) { - if (forResolution) - fileWatcher.resolutions++; - else - fileWatcher.files++; - return; - } - let locationToWatch = affectingLocation; - if (resolutionHost.realpath) { - locationToWatch = resolutionHost.realpath(affectingLocation); - if (affectingLocation !== locationToWatch) { - const fileWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch); - if (fileWatcher2) { - if (forResolution) - fileWatcher2.resolutions++; - else - fileWatcher2.files++; - fileWatcher2.paths.add(affectingLocation); - fileWatchesOfAffectingLocations.set(affectingLocation, fileWatcher2); - return; - } - } - } - const paths = /* @__PURE__ */ new Set(); - paths.add(locationToWatch); - let actualWatcher = canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => { - cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind); - const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap(); - paths.forEach((path) => { - if (watcher.resolutions) - (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path); - if (watcher.files) - (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path); - packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path)); - }); - resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); - }) : noopFileWatcher; - const watcher = { - watcher: actualWatcher !== noopFileWatcher ? { - close: () => { - actualWatcher.close(); - actualWatcher = noopFileWatcher; - } - } : actualWatcher, - resolutions: forResolution ? 1 : 0, - files: forResolution ? 0 : 1, - paths - }; - fileWatchesOfAffectingLocations.set(locationToWatch, watcher); - if (affectingLocation !== locationToWatch) { - fileWatchesOfAffectingLocations.set(affectingLocation, watcher); - paths.add(affectingLocation); - } - } - function watchFailedLookupLocationOfNonRelativeModuleResolutions(resolutions, name) { - const program = resolutionHost.getCurrentProgram(); - if (!program || !program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(name)) { - resolutions.forEach(watchFailedLookupLocationOfResolution); - } else { - resolutions.forEach((resolution) => watchAffectingLocationsOfResolution( - resolution, - /*addToResolutionsWithOnlyAffectingLocations*/ - true - )); - } - } - function setDirectoryWatcher(dir, dirPath, nonRecursive) { - const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath); - if (dirWatcher) { - Debug.assert(!!nonRecursive === !!dirWatcher.nonRecursive); - dirWatcher.refCount++; - } else { - directoryWatchesOfFailedLookups.set(dirPath, { watcher: createDirectoryWatcher(dir, dirPath, nonRecursive), refCount: 1, nonRecursive }); - } - } - function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot) { - const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); - const toWatch = getDirectoryToWatchFailedLookupLocation( - failedLookupLocation, - failedLookupLocationPath, - rootDir, - rootPath, - rootPathComponents, - getCurrentDirectory - ); - if (toWatch) { - const { dirPath } = toWatch; - if (dirPath === rootPath) { - removeAtRoot = true; - } else { - removeDirectoryWatcher(dirPath); - } - } - return removeAtRoot; - } - function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) { - Debug.checkDefined(resolution.files).delete(filePath); - resolution.refCount--; - if (resolution.refCount) { - return; - } - const resolved = getResolutionWithResolvedFileName(resolution); - if (resolved && resolved.resolvedFileName) { - const key = resolutionHost.toPath(resolved.resolvedFileName); - const resolutions = resolvedFileToResolution.get(key); - if ((resolutions == null ? void 0 : resolutions.delete(resolution)) && !resolutions.size) - resolvedFileToResolution.delete(key); - } - const { failedLookupLocations, affectingLocations, node10Result } = resolution; - if (resolutionsWithFailedLookups.delete(resolution)) { - let removeAtRoot = false; - if (failedLookupLocations) { - for (const failedLookupLocation of failedLookupLocations) { - removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot); - } - } - if (node10Result) - removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot); - if (removeAtRoot) - removeDirectoryWatcher(rootPath); - } else if (affectingLocations == null ? void 0 : affectingLocations.length) { - resolutionsWithOnlyAffectingLocations.delete(resolution); - } - if (affectingLocations) { - for (const affectingLocation of affectingLocations) { - const watcher = fileWatchesOfAffectingLocations.get(affectingLocation); - watcher.resolutions--; - } - } - } - function removeDirectoryWatcher(dirPath) { - const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath); - dirWatcher.refCount--; - } - function createDirectoryWatcher(directory, dirPath, nonRecursive) { - return resolutionHost.watchDirectoryOfFailedLookupLocation(directory, (fileOrDirectory) => { - const fileOrDirectoryPath = resolutionHost.toPath(fileOrDirectory); - if (cachedDirectoryStructureHost) { - cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); - } - scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath); - }, nonRecursive ? 0 /* None */ : 1 /* Recursive */); - } - function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) { - const resolutions = cache.get(filePath); - if (resolutions) { - resolutions.forEach((resolution) => stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName)); - cache.delete(filePath); - } - } - function removeResolutionsFromProjectReferenceRedirects(filePath) { - if (!fileExtensionIs(filePath, ".json" /* Json */)) - return; - const program = resolutionHost.getCurrentProgram(); - if (!program) - return; - const resolvedProjectReference = program.getResolvedProjectReferenceByPath(filePath); - if (!resolvedProjectReference) - return; - resolvedProjectReference.commandLine.fileNames.forEach((f) => removeResolutionsOfFile(resolutionHost.toPath(f))); - } - function removeResolutionsOfFile(filePath) { - removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule2); - removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective2); - } - function invalidateResolutions(resolutions, canInvalidate) { - if (!resolutions) - return false; - let invalidated = false; - resolutions.forEach((resolution) => { - if (resolution.isInvalidated || !canInvalidate(resolution)) - return; - resolution.isInvalidated = invalidated = true; - for (const containingFilePath of Debug.checkDefined(resolution.files)) { - (filesWithInvalidatedResolutions ?? (filesWithInvalidatedResolutions = /* @__PURE__ */ new Set())).add(containingFilePath); - hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames || endsWith(containingFilePath, inferredTypesContainingFile); - } - }); - return invalidated; - } - function invalidateResolutionOfFile(filePath) { - removeResolutionsOfFile(filePath); - const prevHasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames; - if (invalidateResolutions(resolvedFileToResolution.get(filePath), returnTrue) && hasChangedAutomaticTypeDirectiveNames && !prevHasChangedAutomaticTypeDirectiveNames) { - resolutionHost.onChangedAutomaticTypeDirectiveNames(); - } - } - function setFilesWithInvalidatedNonRelativeUnresolvedImports(filesMap) { - Debug.assert(filesWithInvalidatedNonRelativeUnresolvedImports === filesMap || filesWithInvalidatedNonRelativeUnresolvedImports === void 0); - filesWithInvalidatedNonRelativeUnresolvedImports = filesMap; - } - function scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, isCreatingWatchedDirectory) { - if (isCreatingWatchedDirectory) { - (isInDirectoryChecks || (isInDirectoryChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath); - } else { - const updatedPath = removeIgnoredPath(fileOrDirectoryPath); - if (!updatedPath) - return false; - fileOrDirectoryPath = updatedPath; - if (resolutionHost.fileIsOpen(fileOrDirectoryPath)) { - return false; - } - const dirOfFileOrDirectory = getDirectoryPath(fileOrDirectoryPath); - if (isNodeModulesAtTypesDirectory(fileOrDirectoryPath) || isNodeModulesDirectory(fileOrDirectoryPath) || isNodeModulesAtTypesDirectory(dirOfFileOrDirectory) || isNodeModulesDirectory(dirOfFileOrDirectory)) { - (failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath); - (startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath); - } else { - if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) { - return false; - } - if (fileExtensionIs(fileOrDirectoryPath, ".map")) { - return false; - } - (failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath); - const packagePath = parseNodeModuleFromPath( - fileOrDirectoryPath, - /*isFolder*/ - true - ); - if (packagePath) - (startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(packagePath); - } - } - resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); - } - function invalidatePackageJsonMap() { - const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap(); - if (packageJsonMap && (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks)) { - packageJsonMap.forEach((_value, path) => isInvalidatedFailedLookup(path) ? packageJsonMap.delete(path) : void 0); - } - } - function invalidateResolutionsOfFailedLookupLocations() { - var _a; - if (allModuleAndTypeResolutionsAreInvalidated) { - affectingPathChecksForFile = void 0; - invalidatePackageJsonMap(); - if (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks || affectingPathChecks) { - invalidateResolutions(resolvedLibraries, canInvalidateFailedLookupResolution); - } - failedLookupChecks = void 0; - startsWithPathChecks = void 0; - isInDirectoryChecks = void 0; - affectingPathChecks = void 0; - return true; - } - let invalidated = false; - if (affectingPathChecksForFile) { - (_a = resolutionHost.getCurrentProgram()) == null ? void 0 : _a.getSourceFiles().forEach((f) => { - if (some(f.packageJsonLocations, (location) => affectingPathChecksForFile.has(location))) { - (filesWithInvalidatedResolutions ?? (filesWithInvalidatedResolutions = /* @__PURE__ */ new Set())).add(f.path); - invalidated = true; - } - }); - affectingPathChecksForFile = void 0; - } - if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks && !affectingPathChecks) { - return invalidated; - } - invalidated = invalidateResolutions(resolutionsWithFailedLookups, canInvalidateFailedLookupResolution) || invalidated; - invalidatePackageJsonMap(); - failedLookupChecks = void 0; - startsWithPathChecks = void 0; - isInDirectoryChecks = void 0; - invalidated = invalidateResolutions(resolutionsWithOnlyAffectingLocations, canInvalidatedFailedLookupResolutionWithAffectingLocation) || invalidated; - affectingPathChecks = void 0; - return invalidated; - } - function canInvalidateFailedLookupResolution(resolution) { - var _a; - if (canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution)) - return true; - if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks) - return false; - return ((_a = resolution.failedLookupLocations) == null ? void 0 : _a.some((location) => isInvalidatedFailedLookup(resolutionHost.toPath(location)))) || !!resolution.node10Result && isInvalidatedFailedLookup(resolutionHost.toPath(resolution.node10Result)); - } - function isInvalidatedFailedLookup(locationPath) { - return (failedLookupChecks == null ? void 0 : failedLookupChecks.has(locationPath)) || firstDefinedIterator((startsWithPathChecks == null ? void 0 : startsWithPathChecks.keys()) || [], (fileOrDirectoryPath) => startsWith(locationPath, fileOrDirectoryPath) ? true : void 0) || firstDefinedIterator((isInDirectoryChecks == null ? void 0 : isInDirectoryChecks.keys()) || [], (dirPath) => locationPath.length > dirPath.length && startsWith(locationPath, dirPath) && (isDiskPathRoot(dirPath) || locationPath[dirPath.length] === directorySeparator) ? true : void 0); - } - function canInvalidatedFailedLookupResolutionWithAffectingLocation(resolution) { - var _a; - return !!affectingPathChecks && ((_a = resolution.affectingLocations) == null ? void 0 : _a.some((location) => affectingPathChecks.has(location))); - } - function closeTypeRootsWatch() { - clearMap(typeRootsWatches, closeFileWatcher); - } - function createTypeRootsWatch(typeRootPath, typeRoot) { - return canWatchTypeRootPath(typeRootPath) ? resolutionHost.watchTypeRootsDirectory(typeRoot, (fileOrDirectory) => { - const fileOrDirectoryPath = resolutionHost.toPath(fileOrDirectory); - if (cachedDirectoryStructureHost) { - cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); - } - hasChangedAutomaticTypeDirectiveNames = true; - resolutionHost.onChangedAutomaticTypeDirectiveNames(); - const dirPath = getDirectoryToWatchFailedLookupLocationFromTypeRoot( - typeRoot, - typeRootPath, - rootPath, - rootPathComponents, - getCurrentDirectory, - (dirPath2) => directoryWatchesOfFailedLookups.has(dirPath2) - ); - if (dirPath) { - scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath); - } - }, 1 /* Recursive */) : noopFileWatcher; - } - function updateTypeRootsWatch() { - const options = resolutionHost.getCompilationSettings(); - if (options.types) { - closeTypeRootsWatch(); - return; - } - const typeRoots = getEffectiveTypeRoots(options, { getCurrentDirectory }); - if (typeRoots) { - mutateMap( - typeRootsWatches, - arrayToMap(typeRoots, (tr) => resolutionHost.toPath(tr)), - { - createNewValue: createTypeRootsWatch, - onDeleteValue: closeFileWatcher - } - ); - } else { - closeTypeRootsWatch(); - } - } - function canWatchTypeRootPath(typeRoot) { - if (resolutionHost.getCompilationSettings().typeRoots) - return true; - return canWatchAtTypes(resolutionHost.toPath(typeRoot)); - } - } - function resolutionIsSymlink(resolution) { - var _a, _b; - return !!(((_a = resolution.resolvedModule) == null ? void 0 : _a.originalPath) || ((_b = resolution.resolvedTypeReferenceDirective) == null ? void 0 : _b.originalPath)); - } - var init_resolutionCache = __esm({ - "src/compiler/resolutionCache.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/watch.ts - function createDiagnosticReporter(system, pretty) { - const host = system === sys && sysFormatDiagnosticsHost ? sysFormatDiagnosticsHost : { - getCurrentDirectory: () => system.getCurrentDirectory(), - getNewLine: () => system.newLine, - getCanonicalFileName: createGetCanonicalFileName(system.useCaseSensitiveFileNames) - }; - if (!pretty) { - return (diagnostic) => system.write(formatDiagnostic(diagnostic, host)); - } - const diagnostics = new Array(1); - return (diagnostic) => { - diagnostics[0] = diagnostic; - system.write(formatDiagnosticsWithColorAndContext(diagnostics, host) + host.getNewLine()); - diagnostics[0] = void 0; - }; - } - function clearScreenIfNotWatchingForFileChanges(system, diagnostic, options) { - if (system.clearScreen && !options.preserveWatchOutput && !options.extendedDiagnostics && !options.diagnostics && contains(screenStartingMessageCodes, diagnostic.code)) { - system.clearScreen(); - return true; - } - return false; - } - function getPlainDiagnosticFollowingNewLines(diagnostic, newLine) { - return contains(screenStartingMessageCodes, diagnostic.code) ? newLine + newLine : newLine; - } - function getLocaleTimeString(system) { - return !system.now ? (/* @__PURE__ */ new Date()).toLocaleTimeString() : ( - // On some systems / builds of Node, there's a non-breaking space between the time and AM/PM. - // This branch is solely for testing, so just switch it to a normal space for baseline stability. - // See: - // - https://github.com/nodejs/node/issues/45171 - // - https://github.com/nodejs/node/issues/45753 - system.now().toLocaleTimeString("en-US", { timeZone: "UTC" }).replace("\u202F", " ") - ); - } - function createWatchStatusReporter(system, pretty) { - return pretty ? (diagnostic, newLine, options) => { - clearScreenIfNotWatchingForFileChanges(system, diagnostic, options); - let output = `[${formatColorAndReset(getLocaleTimeString(system), "\x1B[90m" /* Grey */)}] `; - output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${newLine + newLine}`; - system.write(output); - } : (diagnostic, newLine, options) => { - let output = ""; - if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) { - output += newLine; - } - output += `${getLocaleTimeString(system)} - `; - output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${getPlainDiagnosticFollowingNewLines(diagnostic, newLine)}`; - system.write(output); - }; - } - function parseConfigFileWithSystem(configFileName, optionsToExtend, extendedConfigCache, watchOptionsToExtend, system, reportDiagnostic) { - const host = system; - host.onUnRecoverableConfigFileDiagnostic = (diagnostic) => reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic); - const result = getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend); - host.onUnRecoverableConfigFileDiagnostic = void 0; - return result; - } - function getErrorCountForSummary(diagnostics) { - return countWhere(diagnostics, (diagnostic) => diagnostic.category === 1 /* Error */); - } - function getFilesInErrorForSummary(diagnostics) { - const filesInError = filter(diagnostics, (diagnostic) => diagnostic.category === 1 /* Error */).map( - (errorDiagnostic) => { - if (errorDiagnostic.file === void 0) - return; - return `${errorDiagnostic.file.fileName}`; - } - ); - return filesInError.map((fileName) => { - if (fileName === void 0) { - return void 0; - } - const diagnosticForFileName = find( - diagnostics, - (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName - ); - if (diagnosticForFileName !== void 0) { - const { line } = getLineAndCharacterOfPosition(diagnosticForFileName.file, diagnosticForFileName.start); - return { - fileName, - line: line + 1 - }; - } - }); - } - function getWatchErrorSummaryDiagnosticMessage(errorCount) { - return errorCount === 1 ? Diagnostics.Found_1_error_Watching_for_file_changes : Diagnostics.Found_0_errors_Watching_for_file_changes; - } - function prettyPathForFileError(error2, cwd) { - const line = formatColorAndReset(":" + error2.line, "\x1B[90m" /* Grey */); - if (pathIsAbsolute(error2.fileName) && pathIsAbsolute(cwd)) { - return getRelativePathFromDirectory( - cwd, - error2.fileName, - /*ignoreCase*/ - false - ) + line; - } - return error2.fileName + line; - } - function getErrorSummaryText(errorCount, filesInError, newLine, host) { - if (errorCount === 0) - return ""; - const nonNilFiles = filesInError.filter((fileInError) => fileInError !== void 0); - const distinctFileNamesWithLines = nonNilFiles.map((fileInError) => `${fileInError.fileName}:${fileInError.line}`).filter((value, index, self) => self.indexOf(value) === index); - const firstFileReference = nonNilFiles[0] && prettyPathForFileError(nonNilFiles[0], host.getCurrentDirectory()); - let messageAndArgs; - if (errorCount === 1) { - messageAndArgs = filesInError[0] !== void 0 ? [Diagnostics.Found_1_error_in_0, firstFileReference] : [Diagnostics.Found_1_error]; - } else { - messageAndArgs = distinctFileNamesWithLines.length === 0 ? [Diagnostics.Found_0_errors, errorCount] : distinctFileNamesWithLines.length === 1 ? [Diagnostics.Found_0_errors_in_the_same_file_starting_at_Colon_1, errorCount, firstFileReference] : [Diagnostics.Found_0_errors_in_1_files, errorCount, distinctFileNamesWithLines.length]; - } - const d = createCompilerDiagnostic(...messageAndArgs); - const suffix = distinctFileNamesWithLines.length > 1 ? createTabularErrorsDisplay(nonNilFiles, host) : ""; - return `${newLine}${flattenDiagnosticMessageText(d.messageText, newLine)}${newLine}${newLine}${suffix}`; - } - function createTabularErrorsDisplay(filesInError, host) { - const distinctFiles = filesInError.filter((value, index, self) => index === self.findIndex((file) => (file == null ? void 0 : file.fileName) === (value == null ? void 0 : value.fileName))); - if (distinctFiles.length === 0) - return ""; - const numberLength = (num) => Math.log(num) * Math.LOG10E + 1; - const fileToErrorCount = distinctFiles.map((file) => [file, countWhere(filesInError, (fileInError) => fileInError.fileName === file.fileName)]); - const maxErrors = fileToErrorCount.reduce((acc, value) => Math.max(acc, value[1] || 0), 0); - const headerRow = Diagnostics.Errors_Files.message; - const leftColumnHeadingLength = headerRow.split(" ")[0].length; - const leftPaddingGoal = Math.max(leftColumnHeadingLength, numberLength(maxErrors)); - const headerPadding = Math.max(numberLength(maxErrors) - leftColumnHeadingLength, 0); - let tabularData = ""; - tabularData += " ".repeat(headerPadding) + headerRow + "\n"; - fileToErrorCount.forEach((row) => { - const [file, errorCount] = row; - const errorCountDigitsLength = Math.log(errorCount) * Math.LOG10E + 1 | 0; - const leftPadding = errorCountDigitsLength < leftPaddingGoal ? " ".repeat(leftPaddingGoal - errorCountDigitsLength) : ""; - const fileRef = prettyPathForFileError(file, host.getCurrentDirectory()); - tabularData += `${leftPadding}${errorCount} ${fileRef} -`; - }); - return tabularData; - } - function isBuilderProgram2(program) { - return !!program.getState; - } - function listFiles(program, write) { - const options = program.getCompilerOptions(); - if (options.explainFiles) { - explainFiles(isBuilderProgram2(program) ? program.getProgram() : program, write); - } else if (options.listFiles || options.listFilesOnly) { - forEach(program.getSourceFiles(), (file) => { - write(file.fileName); - }); - } - } - function explainFiles(program, write) { - var _a, _b; - const reasons = program.getFileIncludeReasons(); - const relativeFileName = (fileName) => convertToRelativePath(fileName, program.getCurrentDirectory(), program.getCanonicalFileName); - for (const file of program.getSourceFiles()) { - write(`${toFileName(file, relativeFileName)}`); - (_a = reasons.get(file.path)) == null ? void 0 : _a.forEach((reason) => write(` ${fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText}`)); - (_b = explainIfFileIsRedirectAndImpliedFormat(file, relativeFileName)) == null ? void 0 : _b.forEach((d) => write(` ${d.messageText}`)); - } - } - function explainIfFileIsRedirectAndImpliedFormat(file, fileNameConvertor) { - var _a; - let result; - if (file.path !== file.resolvedPath) { - (result ?? (result = [])).push(chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.File_is_output_of_project_reference_source_0, - toFileName(file.originalFileName, fileNameConvertor) - )); - } - if (file.redirectInfo) { - (result ?? (result = [])).push(chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.File_redirects_to_file_0, - toFileName(file.redirectInfo.redirectTarget, fileNameConvertor) - )); - } - if (isExternalOrCommonJsModule(file)) { - switch (file.impliedNodeFormat) { - case 99 /* ESNext */: - if (file.packageJsonScope) { - (result ?? (result = [])).push(chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.File_is_ECMAScript_module_because_0_has_field_type_with_value_module, - toFileName(last(file.packageJsonLocations), fileNameConvertor) - )); - } - break; - case 1 /* CommonJS */: - if (file.packageJsonScope) { - (result ?? (result = [])).push(chainDiagnosticMessages( - /*details*/ - void 0, - file.packageJsonScope.contents.packageJsonContent.type ? Diagnostics.File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module : Diagnostics.File_is_CommonJS_module_because_0_does_not_have_field_type, - toFileName(last(file.packageJsonLocations), fileNameConvertor) - )); - } else if ((_a = file.packageJsonLocations) == null ? void 0 : _a.length) { - (result ?? (result = [])).push(chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.File_is_CommonJS_module_because_package_json_was_not_found - )); - } - break; - } - } - return result; - } - function getMatchedFileSpec(program, fileName) { - var _a; - const configFile = program.getCompilerOptions().configFile; - if (!((_a = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _a.validatedFilesSpec)) - return void 0; - const filePath = program.getCanonicalFileName(fileName); - const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory())); - return find(configFile.configFileSpecs.validatedFilesSpec, (fileSpec) => program.getCanonicalFileName(getNormalizedAbsolutePath(fileSpec, basePath)) === filePath); - } - function getMatchedIncludeSpec(program, fileName) { - var _a, _b; - const configFile = program.getCompilerOptions().configFile; - if (!((_a = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _a.validatedIncludeSpecs)) - return void 0; - if (configFile.configFileSpecs.isDefaultIncludeSpec) - return true; - const isJsonFile = fileExtensionIs(fileName, ".json" /* Json */); - const basePath = getDirectoryPath(getNormalizedAbsolutePath(configFile.fileName, program.getCurrentDirectory())); - const useCaseSensitiveFileNames2 = program.useCaseSensitiveFileNames(); - return find((_b = configFile == null ? void 0 : configFile.configFileSpecs) == null ? void 0 : _b.validatedIncludeSpecs, (includeSpec) => { - if (isJsonFile && !endsWith(includeSpec, ".json" /* Json */)) - return false; - const pattern = getPatternFromSpec(includeSpec, basePath, "files"); - return !!pattern && getRegexFromPattern(`(${pattern})$`, useCaseSensitiveFileNames2).test(fileName); - }); - } - function fileIncludeReasonToDiagnostics(program, reason, fileNameConvertor) { - var _a, _b; - const options = program.getCompilerOptions(); - if (isReferencedFile(reason)) { - const referenceLocation = getReferencedFileLocation((path) => program.getSourceFileByPath(path), reason); - const referenceText = isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : `"${referenceLocation.text}"`; - let message; - Debug.assert(isReferenceFileLocation(referenceLocation) || reason.kind === 3 /* Import */, "Only synthetic references are imports"); - switch (reason.kind) { - case 3 /* Import */: - if (isReferenceFileLocation(referenceLocation)) { - message = referenceLocation.packageId ? Diagnostics.Imported_via_0_from_file_1_with_packageId_2 : Diagnostics.Imported_via_0_from_file_1; - } else if (referenceLocation.text === externalHelpersModuleNameText) { - message = referenceLocation.packageId ? Diagnostics.Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions : Diagnostics.Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions; - } else { - message = referenceLocation.packageId ? Diagnostics.Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions : Diagnostics.Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions; - } - break; - case 4 /* ReferenceFile */: - Debug.assert(!referenceLocation.packageId); - message = Diagnostics.Referenced_via_0_from_file_1; - break; - case 5 /* TypeReferenceDirective */: - message = referenceLocation.packageId ? Diagnostics.Type_library_referenced_via_0_from_file_1_with_packageId_2 : Diagnostics.Type_library_referenced_via_0_from_file_1; - break; - case 7 /* LibReferenceDirective */: - Debug.assert(!referenceLocation.packageId); - message = Diagnostics.Library_referenced_via_0_from_file_1; - break; - default: - Debug.assertNever(reason); - } - return chainDiagnosticMessages( - /*details*/ - void 0, - message, - referenceText, - toFileName(referenceLocation.file, fileNameConvertor), - referenceLocation.packageId && packageIdToString(referenceLocation.packageId) - ); - } - switch (reason.kind) { - case 0 /* RootFile */: - if (!((_a = options.configFile) == null ? void 0 : _a.configFileSpecs)) - return chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Root_file_specified_for_compilation - ); - const fileName = getNormalizedAbsolutePath(program.getRootFileNames()[reason.index], program.getCurrentDirectory()); - const matchedByFiles = getMatchedFileSpec(program, fileName); - if (matchedByFiles) - return chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Part_of_files_list_in_tsconfig_json - ); - const matchedByInclude = getMatchedIncludeSpec(program, fileName); - return isString(matchedByInclude) ? chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Matched_by_include_pattern_0_in_1, - matchedByInclude, - toFileName(options.configFile, fileNameConvertor) - ) : ( - // Could be additional files specified as roots or matched by default include - chainDiagnosticMessages( - /*details*/ - void 0, - matchedByInclude ? Diagnostics.Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk : Diagnostics.Root_file_specified_for_compilation - ) - ); - case 1 /* SourceFromProjectReference */: - case 2 /* OutputFromProjectReference */: - const isOutput = reason.kind === 2 /* OutputFromProjectReference */; - const referencedResolvedRef = Debug.checkDefined((_b = program.getResolvedProjectReferences()) == null ? void 0 : _b[reason.index]); - return chainDiagnosticMessages( - /*details*/ - void 0, - outFile(options) ? isOutput ? Diagnostics.Output_from_referenced_project_0_included_because_1_specified : Diagnostics.Source_from_referenced_project_0_included_because_1_specified : isOutput ? Diagnostics.Output_from_referenced_project_0_included_because_module_is_specified_as_none : Diagnostics.Source_from_referenced_project_0_included_because_module_is_specified_as_none, - toFileName(referencedResolvedRef.sourceFile.fileName, fileNameConvertor), - options.outFile ? "--outFile" : "--out" - ); - case 8 /* AutomaticTypeDirectiveFile */: { - const messageAndArgs = options.types ? reason.packageId ? [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_of_type_library_0_specified_in_compilerOptions, reason.typeReference] : reason.packageId ? [Diagnostics.Entry_point_for_implicit_type_library_0_with_packageId_1, reason.typeReference, packageIdToString(reason.packageId)] : [Diagnostics.Entry_point_for_implicit_type_library_0, reason.typeReference]; - return chainDiagnosticMessages( - /*details*/ - void 0, - ...messageAndArgs - ); - } - case 6 /* LibFile */: { - if (reason.index !== void 0) - return chainDiagnosticMessages( - /*details*/ - void 0, - Diagnostics.Library_0_specified_in_compilerOptions, - options.lib[reason.index] - ); - const target = forEachEntry(targetOptionDeclaration.type, (value, key) => value === getEmitScriptTarget(options) ? key : void 0); - const messageAndArgs = target ? [Diagnostics.Default_library_for_target_0, target] : [Diagnostics.Default_library]; - return chainDiagnosticMessages( - /*details*/ - void 0, - ...messageAndArgs - ); - } - default: - Debug.assertNever(reason); - } - } - function toFileName(file, fileNameConvertor) { - const fileName = isString(file) ? file : file.fileName; - return fileNameConvertor ? fileNameConvertor(fileName) : fileName; - } - function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) { - const isListFilesOnly = !!program.getCompilerOptions().listFilesOnly; - const allDiagnostics = program.getConfigFileParsingDiagnostics().slice(); - const configFileParsingDiagnosticsLength = allDiagnostics.length; - addRange(allDiagnostics, program.getSyntacticDiagnostics( - /*sourceFile*/ - void 0, - cancellationToken - )); - if (allDiagnostics.length === configFileParsingDiagnosticsLength) { - addRange(allDiagnostics, program.getOptionsDiagnostics(cancellationToken)); - if (!isListFilesOnly) { - addRange(allDiagnostics, program.getGlobalDiagnostics(cancellationToken)); - if (allDiagnostics.length === configFileParsingDiagnosticsLength) { - addRange(allDiagnostics, program.getSemanticDiagnostics( - /*sourceFile*/ - void 0, - cancellationToken - )); - } - } - } - const emitResult = isListFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit( - /*targetSourceFile*/ - void 0, - writeFile2, - cancellationToken, - emitOnlyDtsFiles, - customTransformers - ); - const { emittedFiles, diagnostics: emitDiagnostics } = emitResult; - addRange(allDiagnostics, emitDiagnostics); - const diagnostics = sortAndDeduplicateDiagnostics(allDiagnostics); - diagnostics.forEach(reportDiagnostic); - if (write) { - const currentDir = program.getCurrentDirectory(); - forEach(emittedFiles, (file) => { - const filepath = getNormalizedAbsolutePath(file, currentDir); - write(`TSFILE: ${filepath}`); - }); - listFiles(program, write); - } - if (reportSummary) { - reportSummary(getErrorCountForSummary(diagnostics), getFilesInErrorForSummary(diagnostics)); - } - return { - emitResult, - diagnostics - }; - } - function emitFilesAndReportErrorsAndGetExitStatus(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) { - const { emitResult, diagnostics } = emitFilesAndReportErrors( - program, - reportDiagnostic, - write, - reportSummary, - writeFile2, - cancellationToken, - emitOnlyDtsFiles, - customTransformers - ); - if (emitResult.emitSkipped && diagnostics.length > 0) { - return 1 /* DiagnosticsPresent_OutputsSkipped */; - } else if (diagnostics.length > 0) { - return 2 /* DiagnosticsPresent_OutputsGenerated */; - } - return 0 /* Success */; - } - function createWatchHost(system = sys, reportWatchStatus2) { - const onWatchStatusChange = reportWatchStatus2 || createWatchStatusReporter(system); - return { - onWatchStatusChange, - watchFile: maybeBind(system, system.watchFile) || returnNoopFileWatcher, - watchDirectory: maybeBind(system, system.watchDirectory) || returnNoopFileWatcher, - setTimeout: maybeBind(system, system.setTimeout) || noop, - clearTimeout: maybeBind(system, system.clearTimeout) || noop - }; - } - function createWatchFactory(host, options) { - const watchLogLevel = host.trace ? options.extendedDiagnostics ? 2 /* Verbose */ : options.diagnostics ? 1 /* TriggerOnly */ : 0 /* None */ : 0 /* None */; - const writeLog = watchLogLevel !== 0 /* None */ ? (s) => host.trace(s) : noop; - const result = getWatchFactory(host, watchLogLevel, writeLog); - result.writeLog = writeLog; - return result; - } - function createCompilerHostFromProgramHost(host, getCompilerOptions, directoryStructureHost = host) { - const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); - const compilerHost = { - getSourceFile: createGetSourceFile( - (fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding), - getCompilerOptions, - /*setParentNodes*/ - void 0 - ), - getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation), - getDefaultLibFileName: (options) => host.getDefaultLibFileName(options), - writeFile: createWriteFileMeasuringIO( - (path, data, writeByteOrderMark) => host.writeFile(path, data, writeByteOrderMark), - (path) => host.createDirectory(path), - (path) => host.directoryExists(path) - ), - getCurrentDirectory: memoize(() => host.getCurrentDirectory()), - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, - getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2), - getNewLine: () => getNewLineCharacter(getCompilerOptions()), - fileExists: (f) => host.fileExists(f), - readFile: (f) => host.readFile(f), - trace: maybeBind(host, host.trace), - directoryExists: maybeBind(directoryStructureHost, directoryStructureHost.directoryExists), - getDirectories: maybeBind(directoryStructureHost, directoryStructureHost.getDirectories), - realpath: maybeBind(host, host.realpath), - getEnvironmentVariable: maybeBind(host, host.getEnvironmentVariable) || (() => ""), - createHash: maybeBind(host, host.createHash), - readDirectory: maybeBind(host, host.readDirectory), - storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit - }; - return compilerHost; - } - function getSourceFileVersionAsHashFromText(host, text) { - if (text.match(sourceMapCommentRegExpDontCareLineStart)) { - let lineEnd = text.length; - let lineStart = lineEnd; - for (let pos = lineEnd - 1; pos >= 0; pos--) { - const ch = text.charCodeAt(pos); - switch (ch) { - case 10 /* lineFeed */: - if (pos && text.charCodeAt(pos - 1) === 13 /* carriageReturn */) { - pos--; - } - case 13 /* carriageReturn */: - break; - default: - if (ch < 127 /* maxAsciiCharacter */ || !isLineBreak(ch)) { - lineStart = pos; - continue; - } - break; - } - const line = text.substring(lineStart, lineEnd); - if (line.match(sourceMapCommentRegExp)) { - text = text.substring(0, lineStart); - break; - } else if (!line.match(whitespaceOrMapCommentRegExp)) { - break; - } - lineEnd = lineStart; - } - } - return (host.createHash || generateDjb2Hash)(text); - } - function setGetSourceFileAsHashVersioned(compilerHost) { - const originalGetSourceFile = compilerHost.getSourceFile; - compilerHost.getSourceFile = (...args) => { - const result = originalGetSourceFile.call(compilerHost, ...args); - if (result) { - result.version = getSourceFileVersionAsHashFromText(compilerHost, result.text); - } - return result; - }; - } - function createProgramHost(system, createProgram2) { - const getDefaultLibLocation = memoize(() => getDirectoryPath(normalizePath(system.getExecutingFilePath()))); - return { - useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames, - getNewLine: () => system.newLine, - getCurrentDirectory: memoize(() => system.getCurrentDirectory()), - getDefaultLibLocation, - getDefaultLibFileName: (options) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)), - fileExists: (path) => system.fileExists(path), - readFile: (path, encoding) => system.readFile(path, encoding), - directoryExists: (path) => system.directoryExists(path), - getDirectories: (path) => system.getDirectories(path), - readDirectory: (path, extensions, exclude, include, depth) => system.readDirectory(path, extensions, exclude, include, depth), - realpath: maybeBind(system, system.realpath), - getEnvironmentVariable: maybeBind(system, system.getEnvironmentVariable), - trace: (s) => system.write(s + system.newLine), - createDirectory: (path) => system.createDirectory(path), - writeFile: (path, data, writeByteOrderMark) => system.writeFile(path, data, writeByteOrderMark), - createHash: maybeBind(system, system.createHash), - createProgram: createProgram2 || createEmitAndSemanticDiagnosticsBuilderProgram, - storeFilesChangingSignatureDuringEmit: system.storeFilesChangingSignatureDuringEmit, - now: maybeBind(system, system.now) - }; - } - function createWatchCompilerHost(system = sys, createProgram2, reportDiagnostic, reportWatchStatus2) { - const write = (s) => system.write(s + system.newLine); - const result = createProgramHost(system, createProgram2); - copyProperties(result, createWatchHost(system, reportWatchStatus2)); - result.afterProgramCreate = (builderProgram) => { - const compilerOptions = builderProgram.getCompilerOptions(); - const newLine = getNewLineCharacter(compilerOptions); - emitFilesAndReportErrors( - builderProgram, - reportDiagnostic, - write, - (errorCount) => result.onWatchStatusChange( - createCompilerDiagnostic(getWatchErrorSummaryDiagnosticMessage(errorCount), errorCount), - newLine, - compilerOptions, - errorCount - ) - ); - }; - return result; - } - function reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic) { - reportDiagnostic(diagnostic); - system.exit(1 /* DiagnosticsPresent_OutputsSkipped */); - } - function createWatchCompilerHostOfConfigFile({ - configFileName, - optionsToExtend, - watchOptionsToExtend, - extraFileExtensions, - system, - createProgram: createProgram2, - reportDiagnostic, - reportWatchStatus: reportWatchStatus2 - }) { - const diagnosticReporter = reportDiagnostic || createDiagnosticReporter(system); - const host = createWatchCompilerHost(system, createProgram2, diagnosticReporter, reportWatchStatus2); - host.onUnRecoverableConfigFileDiagnostic = (diagnostic) => reportUnrecoverableDiagnostic(system, diagnosticReporter, diagnostic); - host.configFileName = configFileName; - host.optionsToExtend = optionsToExtend; - host.watchOptionsToExtend = watchOptionsToExtend; - host.extraFileExtensions = extraFileExtensions; - return host; - } - function createWatchCompilerHostOfFilesAndCompilerOptions({ - rootFiles, - options, - watchOptions, - projectReferences, - system, - createProgram: createProgram2, - reportDiagnostic, - reportWatchStatus: reportWatchStatus2 - }) { - const host = createWatchCompilerHost(system, createProgram2, reportDiagnostic || createDiagnosticReporter(system), reportWatchStatus2); - host.rootFiles = rootFiles; - host.options = options; - host.watchOptions = watchOptions; - host.projectReferences = projectReferences; - return host; - } - function performIncrementalCompilation(input) { - const system = input.system || sys; - const host = input.host || (input.host = createIncrementalCompilerHost(input.options, system)); - const builderProgram = createIncrementalProgram(input); - const exitStatus = emitFilesAndReportErrorsAndGetExitStatus( - builderProgram, - input.reportDiagnostic || createDiagnosticReporter(system), - (s) => host.trace && host.trace(s), - input.reportErrorSummary || input.options.pretty ? (errorCount, filesInError) => system.write(getErrorSummaryText(errorCount, filesInError, system.newLine, host)) : void 0 - ); - if (input.afterProgramEmitAndDiagnostics) - input.afterProgramEmitAndDiagnostics(builderProgram); - return exitStatus; - } - var sysFormatDiagnosticsHost, screenStartingMessageCodes, noopFileWatcher, returnNoopFileWatcher, WatchType; - var init_watch = __esm({ - "src/compiler/watch.ts"() { - "use strict"; - init_ts2(); - sysFormatDiagnosticsHost = sys ? { - getCurrentDirectory: () => sys.getCurrentDirectory(), - getNewLine: () => sys.newLine, - getCanonicalFileName: createGetCanonicalFileName(sys.useCaseSensitiveFileNames) - } : void 0; - screenStartingMessageCodes = [ - Diagnostics.Starting_compilation_in_watch_mode.code, - Diagnostics.File_change_detected_Starting_incremental_compilation.code - ]; - noopFileWatcher = { close: noop }; - returnNoopFileWatcher = () => noopFileWatcher; - WatchType = { - ConfigFile: "Config file", - ExtendedConfigFile: "Extended config file", - SourceFile: "Source file", - MissingFile: "Missing file", - WildcardDirectory: "Wild card directory", - FailedLookupLocations: "Failed Lookup Locations", - AffectingFileLocation: "File location affecting resolution", - TypeRoots: "Type roots", - ConfigFileOfReferencedProject: "Config file of referened project", - ExtendedConfigOfReferencedProject: "Extended config file of referenced project", - WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project", - PackageJson: "package.json file", - ClosedScriptInfo: "Closed Script info", - ConfigFileForInferredRoot: "Config file for the inferred project root", - NodeModules: "node_modules for closed script infos and package.jsons affecting module specifier cache", - MissingSourceMapFile: "Missing source map file", - NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root", - MissingGeneratedFile: "Missing generated file", - NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation", - TypingInstallerLocationFile: "File location for typing installer", - TypingInstallerLocationDirectory: "Directory location for typing installer" - }; - } - }); - - // src/compiler/watchPublic.ts - function readBuilderProgram(compilerOptions, host) { - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(compilerOptions); - if (!buildInfoPath) - return void 0; - let buildInfo; - if (host.getBuildInfo) { - buildInfo = host.getBuildInfo(buildInfoPath, compilerOptions.configFilePath); - } else { - const content = host.readFile(buildInfoPath); - if (!content) - return void 0; - buildInfo = getBuildInfo(buildInfoPath, content); - } - if (!buildInfo || buildInfo.version !== version || !buildInfo.program) - return void 0; - return createBuilderProgramUsingProgramBuildInfo(buildInfo, buildInfoPath, host); - } - function createIncrementalCompilerHost(options, system = sys) { - const host = createCompilerHostWorker( - options, - /*setParentNodes*/ - void 0, - system - ); - host.createHash = maybeBind(system, system.createHash); - host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit; - setGetSourceFileAsHashVersioned(host); - changeCompilerHostLikeToUseCache(host, (fileName) => toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName)); - return host; - } - function createIncrementalProgram({ - rootNames, - options, - configFileParsingDiagnostics, - projectReferences, - host, - createProgram: createProgram2 - }) { - host = host || createIncrementalCompilerHost(options); - createProgram2 = createProgram2 || createEmitAndSemanticDiagnosticsBuilderProgram; - const oldProgram = readBuilderProgram(options, host); - return createProgram2(rootNames, options, host, oldProgram, configFileParsingDiagnostics, projectReferences); - } - function createWatchCompilerHost2(rootFilesOrConfigFileName, options, system, createProgram2, reportDiagnostic, reportWatchStatus2, projectReferencesOrWatchOptionsToExtend, watchOptionsOrExtraFileExtensions) { - if (isArray(rootFilesOrConfigFileName)) { - return createWatchCompilerHostOfFilesAndCompilerOptions({ - rootFiles: rootFilesOrConfigFileName, - options, - watchOptions: watchOptionsOrExtraFileExtensions, - projectReferences: projectReferencesOrWatchOptionsToExtend, - system, - createProgram: createProgram2, - reportDiagnostic, - reportWatchStatus: reportWatchStatus2 - }); - } else { - return createWatchCompilerHostOfConfigFile({ - configFileName: rootFilesOrConfigFileName, - optionsToExtend: options, - watchOptionsToExtend: projectReferencesOrWatchOptionsToExtend, - extraFileExtensions: watchOptionsOrExtraFileExtensions, - system, - createProgram: createProgram2, - reportDiagnostic, - reportWatchStatus: reportWatchStatus2 - }); - } - } - function createWatchProgram(host) { - let builderProgram; - let reloadLevel; - let missingFilesMap; - let watchedWildcardDirectories; - let timerToUpdateProgram; - let timerToInvalidateFailedLookupResolutions; - let parsedConfigs; - let sharedExtendedConfigFileWatchers; - let extendedConfigCache = host.extendedConfigCache; - let reportFileChangeDetectedOnCreateProgram = false; - const sourceFilesCache = /* @__PURE__ */ new Map(); - let missingFilePathsRequestedForRelease; - let hasChangedCompilerOptions = false; - const useCaseSensitiveFileNames2 = host.useCaseSensitiveFileNames(); - const currentDirectory = host.getCurrentDirectory(); - const { configFileName, optionsToExtend: optionsToExtendForConfigFile = {}, watchOptionsToExtend, extraFileExtensions, createProgram: createProgram2 } = host; - let { rootFiles: rootFileNames, options: compilerOptions, watchOptions, projectReferences } = host; - let wildcardDirectories; - let configFileParsingDiagnostics; - let canConfigFileJsonReportNoInputFiles = false; - let hasChangedConfigFileParsingErrors = false; - const cachedDirectoryStructureHost = configFileName === void 0 ? void 0 : createCachedDirectoryStructureHost(host, currentDirectory, useCaseSensitiveFileNames2); - const directoryStructureHost = cachedDirectoryStructureHost || host; - const parseConfigFileHost = parseConfigHostFromCompilerHostLike(host, directoryStructureHost); - let newLine = updateNewLine(); - if (configFileName && host.configFileParsingResult) { - setConfigFileParsingResult(host.configFileParsingResult); - newLine = updateNewLine(); - } - reportWatchDiagnostic(Diagnostics.Starting_compilation_in_watch_mode); - if (configFileName && !host.configFileParsingResult) { - newLine = getNewLineCharacter(optionsToExtendForConfigFile); - Debug.assert(!rootFileNames); - parseConfigFile2(); - newLine = updateNewLine(); - } - Debug.assert(compilerOptions); - Debug.assert(rootFileNames); - const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(host, compilerOptions); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); - writeLog(`Current directory: ${currentDirectory} CaseSensitiveFileNames: ${useCaseSensitiveFileNames2}`); - let configFileWatcher; - if (configFileName) { - configFileWatcher = watchFile2(configFileName, scheduleProgramReload, 2e3 /* High */, watchOptions, WatchType.ConfigFile); - } - const compilerHost = createCompilerHostFromProgramHost(host, () => compilerOptions, directoryStructureHost); - setGetSourceFileAsHashVersioned(compilerHost); - const getNewSourceFile = compilerHost.getSourceFile; - compilerHost.getSourceFile = (fileName, ...args) => getVersionedSourceFileByPath(fileName, toPath3(fileName), ...args); - compilerHost.getSourceFileByPath = getVersionedSourceFileByPath; - compilerHost.getNewLine = () => newLine; - compilerHost.fileExists = fileExists; - compilerHost.onReleaseOldSourceFile = onReleaseOldSourceFile; - compilerHost.onReleaseParsedCommandLine = onReleaseParsedCommandLine; - compilerHost.toPath = toPath3; - compilerHost.getCompilationSettings = () => compilerOptions; - compilerHost.useSourceOfProjectReferenceRedirect = maybeBind(host, host.useSourceOfProjectReferenceRedirect); - compilerHost.watchDirectoryOfFailedLookupLocation = (dir, cb, flags) => watchDirectory(dir, cb, flags, watchOptions, WatchType.FailedLookupLocations); - compilerHost.watchAffectingFileLocation = (file, cb) => watchFile2(file, cb, 2e3 /* High */, watchOptions, WatchType.AffectingFileLocation); - compilerHost.watchTypeRootsDirectory = (dir, cb, flags) => watchDirectory(dir, cb, flags, watchOptions, WatchType.TypeRoots); - compilerHost.getCachedDirectoryStructureHost = () => cachedDirectoryStructureHost; - compilerHost.scheduleInvalidateResolutionsOfFailedLookupLocations = scheduleInvalidateResolutionsOfFailedLookupLocations; - compilerHost.onInvalidatedResolution = scheduleProgramUpdate; - compilerHost.onChangedAutomaticTypeDirectiveNames = scheduleProgramUpdate; - compilerHost.fileIsOpen = returnFalse; - compilerHost.getCurrentProgram = getCurrentProgram; - compilerHost.writeLog = writeLog; - compilerHost.getParsedCommandLine = getParsedCommandLine; - const resolutionCache = createResolutionCache( - compilerHost, - configFileName ? getDirectoryPath(getNormalizedAbsolutePath(configFileName, currentDirectory)) : currentDirectory, - /*logChangesWhenResolvingModule*/ - false - ); - compilerHost.resolveModuleNameLiterals = maybeBind(host, host.resolveModuleNameLiterals); - compilerHost.resolveModuleNames = maybeBind(host, host.resolveModuleNames); - if (!compilerHost.resolveModuleNameLiterals && !compilerHost.resolveModuleNames) { - compilerHost.resolveModuleNameLiterals = resolutionCache.resolveModuleNameLiterals.bind(resolutionCache); - } - compilerHost.resolveTypeReferenceDirectiveReferences = maybeBind(host, host.resolveTypeReferenceDirectiveReferences); - compilerHost.resolveTypeReferenceDirectives = maybeBind(host, host.resolveTypeReferenceDirectives); - if (!compilerHost.resolveTypeReferenceDirectiveReferences && !compilerHost.resolveTypeReferenceDirectives) { - compilerHost.resolveTypeReferenceDirectiveReferences = resolutionCache.resolveTypeReferenceDirectiveReferences.bind(resolutionCache); - } - compilerHost.resolveLibrary = !host.resolveLibrary ? resolutionCache.resolveLibrary.bind(resolutionCache) : host.resolveLibrary.bind(host); - compilerHost.getModuleResolutionCache = host.resolveModuleNameLiterals || host.resolveModuleNames ? maybeBind(host, host.getModuleResolutionCache) : () => resolutionCache.getModuleResolutionCache(); - const userProvidedResolution = !!host.resolveModuleNameLiterals || !!host.resolveTypeReferenceDirectiveReferences || !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives; - const customHasInvalidatedResolutions = userProvidedResolution ? maybeBind(host, host.hasInvalidatedResolutions) || returnTrue : returnFalse; - const customHasInvalidLibResolutions = host.resolveLibrary ? maybeBind(host, host.hasInvalidatedLibResolutions) || returnTrue : returnFalse; - builderProgram = readBuilderProgram(compilerOptions, compilerHost); - synchronizeProgram(); - watchConfigFileWildCardDirectories(); - if (configFileName) - updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile); - return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close }; - function close() { - clearInvalidateResolutionsOfFailedLookupLocations(); - resolutionCache.clear(); - clearMap(sourceFilesCache, (value) => { - if (value && value.fileWatcher) { - value.fileWatcher.close(); - value.fileWatcher = void 0; - } - }); - if (configFileWatcher) { - configFileWatcher.close(); - configFileWatcher = void 0; - } - extendedConfigCache == null ? void 0 : extendedConfigCache.clear(); - extendedConfigCache = void 0; - if (sharedExtendedConfigFileWatchers) { - clearMap(sharedExtendedConfigFileWatchers, closeFileWatcherOf); - sharedExtendedConfigFileWatchers = void 0; - } - if (watchedWildcardDirectories) { - clearMap(watchedWildcardDirectories, closeFileWatcherOf); - watchedWildcardDirectories = void 0; - } - if (missingFilesMap) { - clearMap(missingFilesMap, closeFileWatcher); - missingFilesMap = void 0; - } - if (parsedConfigs) { - clearMap(parsedConfigs, (config) => { - var _a; - (_a = config.watcher) == null ? void 0 : _a.close(); - config.watcher = void 0; - if (config.watchedDirectories) - clearMap(config.watchedDirectories, closeFileWatcherOf); - config.watchedDirectories = void 0; - }); - parsedConfigs = void 0; - } - } - function getCurrentBuilderProgram() { - return builderProgram; - } - function getCurrentProgram() { - return builderProgram && builderProgram.getProgramOrUndefined(); - } - function synchronizeProgram() { - writeLog(`Synchronizing program`); - Debug.assert(compilerOptions); - Debug.assert(rootFileNames); - clearInvalidateResolutionsOfFailedLookupLocations(); - const program = getCurrentBuilderProgram(); - if (hasChangedCompilerOptions) { - newLine = updateNewLine(); - if (program && changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) { - resolutionCache.onChangesAffectModuleResolution(); - } - } - const { hasInvalidatedResolutions, hasInvalidatedLibResolutions } = resolutionCache.createHasInvalidatedResolutions(customHasInvalidatedResolutions, customHasInvalidLibResolutions); - const { - originalReadFile, - originalFileExists, - originalDirectoryExists, - originalCreateDirectory, - originalWriteFile, - readFileWithCache - } = changeCompilerHostLikeToUseCache(compilerHost, toPath3); - if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path) => getSourceVersion(path, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { - if (hasChangedConfigFileParsingErrors) { - if (reportFileChangeDetectedOnCreateProgram) { - reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation); - } - builderProgram = createProgram2( - /*rootNames*/ - void 0, - /*options*/ - void 0, - compilerHost, - builderProgram, - configFileParsingDiagnostics, - projectReferences - ); - hasChangedConfigFileParsingErrors = false; - } - } else { - if (reportFileChangeDetectedOnCreateProgram) { - reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation); - } - createNewProgram(hasInvalidatedResolutions, hasInvalidatedLibResolutions); - } - reportFileChangeDetectedOnCreateProgram = false; - if (host.afterProgramCreate && program !== builderProgram) { - host.afterProgramCreate(builderProgram); - } - compilerHost.readFile = originalReadFile; - compilerHost.fileExists = originalFileExists; - compilerHost.directoryExists = originalDirectoryExists; - compilerHost.createDirectory = originalCreateDirectory; - compilerHost.writeFile = originalWriteFile; - return builderProgram; - } - function createNewProgram(hasInvalidatedResolutions, hasInvalidatedLibResolutions) { - writeLog("CreatingProgramWith::"); - writeLog(` roots: ${JSON.stringify(rootFileNames)}`); - writeLog(` options: ${JSON.stringify(compilerOptions)}`); - if (projectReferences) - writeLog(` projectReferences: ${JSON.stringify(projectReferences)}`); - const needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram(); - hasChangedCompilerOptions = false; - hasChangedConfigFileParsingErrors = false; - resolutionCache.startCachingPerDirectoryResolution(); - compilerHost.hasInvalidatedResolutions = hasInvalidatedResolutions; - compilerHost.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions; - compilerHost.hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames; - const oldProgram = getCurrentProgram(); - builderProgram = createProgram2(rootFileNames, compilerOptions, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); - resolutionCache.finishCachingPerDirectoryResolution(builderProgram.getProgram(), oldProgram); - updateMissingFilePathsWatch(builderProgram.getProgram(), missingFilesMap || (missingFilesMap = /* @__PURE__ */ new Map()), watchMissingFilePath); - if (needsUpdateInTypeRootWatch) { - resolutionCache.updateTypeRootsWatch(); - } - if (missingFilePathsRequestedForRelease) { - for (const missingFilePath of missingFilePathsRequestedForRelease) { - if (!missingFilesMap.has(missingFilePath)) { - sourceFilesCache.delete(missingFilePath); - } - } - missingFilePathsRequestedForRelease = void 0; - } - } - function updateRootFileNames(files) { - Debug.assert(!configFileName, "Cannot update root file names with config file watch mode"); - rootFileNames = files; - scheduleProgramUpdate(); - } - function updateNewLine() { - return getNewLineCharacter(compilerOptions || optionsToExtendForConfigFile); - } - function toPath3(fileName) { - return toPath(fileName, currentDirectory, getCanonicalFileName); - } - function isFileMissingOnHost(hostSourceFile) { - return typeof hostSourceFile === "boolean"; - } - function isFilePresenceUnknownOnHost(hostSourceFile) { - return typeof hostSourceFile.version === "boolean"; - } - function fileExists(fileName) { - const path = toPath3(fileName); - if (isFileMissingOnHost(sourceFilesCache.get(path))) { - return false; - } - return directoryStructureHost.fileExists(fileName); - } - function getVersionedSourceFileByPath(fileName, path, languageVersionOrOptions, onError, shouldCreateNewSourceFile) { - const hostSourceFile = sourceFilesCache.get(path); - if (isFileMissingOnHost(hostSourceFile)) { - return void 0; - } - const impliedNodeFormat = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : void 0; - if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile) || hostSourceFile.sourceFile.impliedNodeFormat !== impliedNodeFormat) { - const sourceFile = getNewSourceFile(fileName, languageVersionOrOptions, onError); - if (hostSourceFile) { - if (sourceFile) { - hostSourceFile.sourceFile = sourceFile; - hostSourceFile.version = sourceFile.version; - if (!hostSourceFile.fileWatcher) { - hostSourceFile.fileWatcher = watchFilePath(path, fileName, onSourceFileChange, 250 /* Low */, watchOptions, WatchType.SourceFile); - } - } else { - if (hostSourceFile.fileWatcher) { - hostSourceFile.fileWatcher.close(); - } - sourceFilesCache.set(path, false); - } - } else { - if (sourceFile) { - const fileWatcher = watchFilePath(path, fileName, onSourceFileChange, 250 /* Low */, watchOptions, WatchType.SourceFile); - sourceFilesCache.set(path, { sourceFile, version: sourceFile.version, fileWatcher }); - } else { - sourceFilesCache.set(path, false); - } - } - return sourceFile; - } - return hostSourceFile.sourceFile; - } - function nextSourceFileVersion(path) { - const hostSourceFile = sourceFilesCache.get(path); - if (hostSourceFile !== void 0) { - if (isFileMissingOnHost(hostSourceFile)) { - sourceFilesCache.set(path, { version: false }); - } else { - hostSourceFile.version = false; - } - } - } - function getSourceVersion(path, readFileWithCache) { - const hostSourceFile = sourceFilesCache.get(path); - if (!hostSourceFile) - return void 0; - if (hostSourceFile.version) - return hostSourceFile.version; - const text = readFileWithCache(path); - return text !== void 0 ? getSourceFileVersionAsHashFromText(compilerHost, text) : void 0; - } - function onReleaseOldSourceFile(oldSourceFile, _oldOptions, hasSourceFileByPath) { - const hostSourceFileInfo = sourceFilesCache.get(oldSourceFile.resolvedPath); - if (hostSourceFileInfo !== void 0) { - if (isFileMissingOnHost(hostSourceFileInfo)) { - (missingFilePathsRequestedForRelease || (missingFilePathsRequestedForRelease = [])).push(oldSourceFile.path); - } else if (hostSourceFileInfo.sourceFile === oldSourceFile) { - if (hostSourceFileInfo.fileWatcher) { - hostSourceFileInfo.fileWatcher.close(); - } - sourceFilesCache.delete(oldSourceFile.resolvedPath); - if (!hasSourceFileByPath) { - resolutionCache.removeResolutionsOfFile(oldSourceFile.path); - } - } - } - } - function reportWatchDiagnostic(message) { - if (host.onWatchStatusChange) { - host.onWatchStatusChange(createCompilerDiagnostic(message), newLine, compilerOptions || optionsToExtendForConfigFile); - } - } - function hasChangedAutomaticTypeDirectiveNames() { - return resolutionCache.hasChangedAutomaticTypeDirectiveNames(); - } - function clearInvalidateResolutionsOfFailedLookupLocations() { - if (!timerToInvalidateFailedLookupResolutions) - return false; - host.clearTimeout(timerToInvalidateFailedLookupResolutions); - timerToInvalidateFailedLookupResolutions = void 0; - return true; - } - function scheduleInvalidateResolutionsOfFailedLookupLocations() { - if (!host.setTimeout || !host.clearTimeout) { - return resolutionCache.invalidateResolutionsOfFailedLookupLocations(); - } - const pending = clearInvalidateResolutionsOfFailedLookupLocations(); - writeLog(`Scheduling invalidateFailedLookup${pending ? ", Cancelled earlier one" : ""}`); - timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250, "timerToInvalidateFailedLookupResolutions"); - } - function invalidateResolutionsOfFailedLookup() { - timerToInvalidateFailedLookupResolutions = void 0; - if (resolutionCache.invalidateResolutionsOfFailedLookupLocations()) { - scheduleProgramUpdate(); - } - } - function scheduleProgramUpdate() { - if (!host.setTimeout || !host.clearTimeout) { - return; - } - if (timerToUpdateProgram) { - host.clearTimeout(timerToUpdateProgram); - } - writeLog("Scheduling update"); - timerToUpdateProgram = host.setTimeout(updateProgramWithWatchStatus, 250, "timerToUpdateProgram"); - } - function scheduleProgramReload() { - Debug.assert(!!configFileName); - reloadLevel = 2 /* Full */; - scheduleProgramUpdate(); - } - function updateProgramWithWatchStatus() { - timerToUpdateProgram = void 0; - reportFileChangeDetectedOnCreateProgram = true; - updateProgram(); - } - function updateProgram() { - var _a, _b, _c, _d; - switch (reloadLevel) { - case 1 /* Partial */: - (_a = perfLogger) == null ? void 0 : _a.logStartUpdateProgram("PartialConfigReload"); - reloadFileNamesFromConfigFile(); - break; - case 2 /* Full */: - (_b = perfLogger) == null ? void 0 : _b.logStartUpdateProgram("FullConfigReload"); - reloadConfigFile(); - break; - default: - (_c = perfLogger) == null ? void 0 : _c.logStartUpdateProgram("SynchronizeProgram"); - synchronizeProgram(); - break; - } - (_d = perfLogger) == null ? void 0 : _d.logStopUpdateProgram("Done"); - return getCurrentBuilderProgram(); - } - function reloadFileNamesFromConfigFile() { - writeLog("Reloading new file names and options"); - Debug.assert(compilerOptions); - Debug.assert(configFileName); - reloadLevel = 0 /* None */; - rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions); - if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) { - hasChangedConfigFileParsingErrors = true; - } - synchronizeProgram(); - } - function reloadConfigFile() { - Debug.assert(configFileName); - writeLog(`Reloading config file: ${configFileName}`); - reloadLevel = 0 /* None */; - if (cachedDirectoryStructureHost) { - cachedDirectoryStructureHost.clearCache(); - } - parseConfigFile2(); - hasChangedCompilerOptions = true; - synchronizeProgram(); - watchConfigFileWildCardDirectories(); - updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile); - } - function parseConfigFile2() { - Debug.assert(configFileName); - setConfigFileParsingResult(getParsedCommandLineOfConfigFile( - configFileName, - optionsToExtendForConfigFile, - parseConfigFileHost, - extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()), - watchOptionsToExtend, - extraFileExtensions - )); - } - function setConfigFileParsingResult(configFileParseResult) { - rootFileNames = configFileParseResult.fileNames; - compilerOptions = configFileParseResult.options; - watchOptions = configFileParseResult.watchOptions; - projectReferences = configFileParseResult.projectReferences; - wildcardDirectories = configFileParseResult.wildcardDirectories; - configFileParsingDiagnostics = getConfigFileParsingDiagnostics(configFileParseResult).slice(); - canConfigFileJsonReportNoInputFiles = canJsonReportNoInputFiles(configFileParseResult.raw); - hasChangedConfigFileParsingErrors = true; - } - function getParsedCommandLine(configFileName2) { - const configPath = toPath3(configFileName2); - let config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); - if (config) { - if (!config.reloadLevel) - return config.parsedCommandLine; - if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) { - writeLog("Reloading new file names and options"); - Debug.assert(compilerOptions); - const fileNames = getFileNamesFromConfigSpecs( - config.parsedCommandLine.options.configFile.configFileSpecs, - getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory), - compilerOptions, - parseConfigFileHost - ); - config.parsedCommandLine = { ...config.parsedCommandLine, fileNames }; - config.reloadLevel = void 0; - return config.parsedCommandLine; - } - } - writeLog(`Loading config file: ${configFileName2}`); - const parsedCommandLine = host.getParsedCommandLine ? host.getParsedCommandLine(configFileName2) : getParsedCommandLineFromConfigFileHost(configFileName2); - if (config) { - config.parsedCommandLine = parsedCommandLine; - config.reloadLevel = void 0; - } else { - (parsedConfigs || (parsedConfigs = /* @__PURE__ */ new Map())).set(configPath, config = { parsedCommandLine }); - } - watchReferencedProject(configFileName2, configPath, config); - return parsedCommandLine; - } - function getParsedCommandLineFromConfigFileHost(configFileName2) { - const onUnRecoverableConfigFileDiagnostic = parseConfigFileHost.onUnRecoverableConfigFileDiagnostic; - parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = noop; - const parsedCommandLine = getParsedCommandLineOfConfigFile( - configFileName2, - /*optionsToExtend*/ - void 0, - parseConfigFileHost, - extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()), - watchOptionsToExtend - ); - parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = onUnRecoverableConfigFileDiagnostic; - return parsedCommandLine; - } - function onReleaseParsedCommandLine(fileName) { - var _a; - const path = toPath3(fileName); - const config = parsedConfigs == null ? void 0 : parsedConfigs.get(path); - if (!config) - return; - parsedConfigs.delete(path); - if (config.watchedDirectories) - clearMap(config.watchedDirectories, closeFileWatcherOf); - (_a = config.watcher) == null ? void 0 : _a.close(); - clearSharedExtendedConfigFileWatcher(path, sharedExtendedConfigFileWatchers); - } - function watchFilePath(path, file, callback, pollingInterval, options, watchType) { - return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path), pollingInterval, options, watchType); - } - function onSourceFileChange(fileName, eventKind, path) { - updateCachedSystemWithFile(fileName, path, eventKind); - if (eventKind === 2 /* Deleted */ && sourceFilesCache.has(path)) { - resolutionCache.invalidateResolutionOfFile(path); - } - nextSourceFileVersion(path); - scheduleProgramUpdate(); - } - function updateCachedSystemWithFile(fileName, path, eventKind) { - if (cachedDirectoryStructureHost) { - cachedDirectoryStructureHost.addOrDeleteFile(fileName, path, eventKind); - } - } - function watchMissingFilePath(missingFilePath) { - return (parsedConfigs == null ? void 0 : parsedConfigs.has(missingFilePath)) ? noopFileWatcher : watchFilePath(missingFilePath, missingFilePath, onMissingFileChange, 500 /* Medium */, watchOptions, WatchType.MissingFile); - } - function onMissingFileChange(fileName, eventKind, missingFilePath) { - updateCachedSystemWithFile(fileName, missingFilePath, eventKind); - if (eventKind === 0 /* Created */ && missingFilesMap.has(missingFilePath)) { - missingFilesMap.get(missingFilePath).close(); - missingFilesMap.delete(missingFilePath); - nextSourceFileVersion(missingFilePath); - scheduleProgramUpdate(); - } - } - function watchConfigFileWildCardDirectories() { - if (wildcardDirectories) { - updateWatchingWildcardDirectories( - watchedWildcardDirectories || (watchedWildcardDirectories = /* @__PURE__ */ new Map()), - new Map(Object.entries(wildcardDirectories)), - watchWildcardDirectory - ); - } else if (watchedWildcardDirectories) { - clearMap(watchedWildcardDirectories, closeFileWatcherOf); - } - } - function watchWildcardDirectory(directory, flags) { - return watchDirectory( - directory, - (fileOrDirectory) => { - Debug.assert(configFileName); - Debug.assert(compilerOptions); - const fileOrDirectoryPath = toPath3(fileOrDirectory); - if (cachedDirectoryStructureHost) { - cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); - } - nextSourceFileVersion(fileOrDirectoryPath); - if (isIgnoredFileFromWildCardWatching({ - watchedDirPath: toPath3(directory), - fileOrDirectory, - fileOrDirectoryPath, - configFileName, - extraFileExtensions, - options: compilerOptions, - program: getCurrentBuilderProgram() || rootFileNames, - currentDirectory, - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - writeLog, - toPath: toPath3 - })) - return; - if (reloadLevel !== 2 /* Full */) { - reloadLevel = 1 /* Partial */; - scheduleProgramUpdate(); - } - }, - flags, - watchOptions, - WatchType.WildcardDirectory - ); - } - function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) { - updateSharedExtendedConfigFileWatcher( - forProjectPath, - options, - sharedExtendedConfigFileWatchers || (sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map()), - (extendedConfigFileName, extendedConfigFilePath) => watchFile2( - extendedConfigFileName, - (_fileName, eventKind) => { - var _a; - updateCachedSystemWithFile(extendedConfigFileName, extendedConfigFilePath, eventKind); - if (extendedConfigCache) - cleanExtendedConfigCache(extendedConfigCache, extendedConfigFilePath, toPath3); - const projects = (_a = sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) == null ? void 0 : _a.projects; - if (!(projects == null ? void 0 : projects.size)) - return; - projects.forEach((projectPath) => { - if (configFileName && toPath3(configFileName) === projectPath) { - reloadLevel = 2 /* Full */; - } else { - const config = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath); - if (config) - config.reloadLevel = 2 /* Full */; - resolutionCache.removeResolutionsFromProjectReferenceRedirects(projectPath); - } - scheduleProgramUpdate(); - }); - }, - 2e3 /* High */, - watchOptions2, - watchType - ), - toPath3 - ); - } - function watchReferencedProject(configFileName2, configPath, commandLine) { - var _a, _b, _c, _d, _e; - commandLine.watcher || (commandLine.watcher = watchFile2( - configFileName2, - (_fileName, eventKind) => { - updateCachedSystemWithFile(configFileName2, configPath, eventKind); - const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); - if (config) - config.reloadLevel = 2 /* Full */; - resolutionCache.removeResolutionsFromProjectReferenceRedirects(configPath); - scheduleProgramUpdate(); - }, - 2e3 /* High */, - ((_a = commandLine.parsedCommandLine) == null ? void 0 : _a.watchOptions) || watchOptions, - WatchType.ConfigFileOfReferencedProject - )); - if ((_b = commandLine.parsedCommandLine) == null ? void 0 : _b.wildcardDirectories) { - updateWatchingWildcardDirectories( - commandLine.watchedDirectories || (commandLine.watchedDirectories = /* @__PURE__ */ new Map()), - new Map(Object.entries((_c = commandLine.parsedCommandLine) == null ? void 0 : _c.wildcardDirectories)), - (directory, flags) => { - var _a2; - return watchDirectory( - directory, - (fileOrDirectory) => { - const fileOrDirectoryPath = toPath3(fileOrDirectory); - if (cachedDirectoryStructureHost) { - cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); - } - nextSourceFileVersion(fileOrDirectoryPath); - const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); - if (!(config == null ? void 0 : config.parsedCommandLine)) - return; - if (isIgnoredFileFromWildCardWatching({ - watchedDirPath: toPath3(directory), - fileOrDirectory, - fileOrDirectoryPath, - configFileName: configFileName2, - options: config.parsedCommandLine.options, - program: config.parsedCommandLine.fileNames, - currentDirectory, - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - writeLog, - toPath: toPath3 - })) - return; - if (config.reloadLevel !== 2 /* Full */) { - config.reloadLevel = 1 /* Partial */; - scheduleProgramUpdate(); - } - }, - flags, - ((_a2 = commandLine.parsedCommandLine) == null ? void 0 : _a2.watchOptions) || watchOptions, - WatchType.WildcardDirectoryOfReferencedProject - ); - } - ); - } else if (commandLine.watchedDirectories) { - clearMap(commandLine.watchedDirectories, closeFileWatcherOf); - commandLine.watchedDirectories = void 0; - } - updateExtendedConfigFilesWatches( - configPath, - (_d = commandLine.parsedCommandLine) == null ? void 0 : _d.options, - ((_e = commandLine.parsedCommandLine) == null ? void 0 : _e.watchOptions) || watchOptions, - WatchType.ExtendedConfigOfReferencedProject - ); - } - } - var init_watchPublic = __esm({ - "src/compiler/watchPublic.ts"() { - "use strict"; - init_ts2(); - } - }); - - // src/compiler/tsbuild.ts - function resolveConfigFileProjectName(project) { - if (fileExtensionIs(project, ".json" /* Json */)) { - return project; - } - return combinePaths(project, "tsconfig.json"); - } - var UpToDateStatusType; - var init_tsbuild = __esm({ - "src/compiler/tsbuild.ts"() { - "use strict"; - init_ts2(); - UpToDateStatusType = /* @__PURE__ */ ((UpToDateStatusType2) => { - UpToDateStatusType2[UpToDateStatusType2["Unbuildable"] = 0] = "Unbuildable"; - UpToDateStatusType2[UpToDateStatusType2["UpToDate"] = 1] = "UpToDate"; - UpToDateStatusType2[UpToDateStatusType2["UpToDateWithUpstreamTypes"] = 2] = "UpToDateWithUpstreamTypes"; - UpToDateStatusType2[UpToDateStatusType2["OutOfDateWithPrepend"] = 3] = "OutOfDateWithPrepend"; - UpToDateStatusType2[UpToDateStatusType2["OutputMissing"] = 4] = "OutputMissing"; - UpToDateStatusType2[UpToDateStatusType2["ErrorReadingFile"] = 5] = "ErrorReadingFile"; - UpToDateStatusType2[UpToDateStatusType2["OutOfDateWithSelf"] = 6] = "OutOfDateWithSelf"; - UpToDateStatusType2[UpToDateStatusType2["OutOfDateWithUpstream"] = 7] = "OutOfDateWithUpstream"; - UpToDateStatusType2[UpToDateStatusType2["OutOfDateBuildInfo"] = 8] = "OutOfDateBuildInfo"; - UpToDateStatusType2[UpToDateStatusType2["OutOfDateOptions"] = 9] = "OutOfDateOptions"; - UpToDateStatusType2[UpToDateStatusType2["OutOfDateRoots"] = 10] = "OutOfDateRoots"; - UpToDateStatusType2[UpToDateStatusType2["UpstreamOutOfDate"] = 11] = "UpstreamOutOfDate"; - UpToDateStatusType2[UpToDateStatusType2["UpstreamBlocked"] = 12] = "UpstreamBlocked"; - UpToDateStatusType2[UpToDateStatusType2["ComputingUpstream"] = 13] = "ComputingUpstream"; - UpToDateStatusType2[UpToDateStatusType2["TsVersionOutputOfDate"] = 14] = "TsVersionOutputOfDate"; - UpToDateStatusType2[UpToDateStatusType2["UpToDateWithInputFileText"] = 15] = "UpToDateWithInputFileText"; - UpToDateStatusType2[UpToDateStatusType2["ContainerOnly"] = 16] = "ContainerOnly"; - UpToDateStatusType2[UpToDateStatusType2["ForceBuild"] = 17] = "ForceBuild"; - return UpToDateStatusType2; - })(UpToDateStatusType || {}); - } - }); - - // src/compiler/tsbuildPublic.ts - function getOrCreateValueFromConfigFileMap(configFileMap, resolved, createT) { - const existingValue = configFileMap.get(resolved); - let newValue; - if (!existingValue) { - newValue = createT(); - configFileMap.set(resolved, newValue); - } - return existingValue || newValue; - } - function getOrCreateValueMapFromConfigFileMap(configFileMap, resolved) { - return getOrCreateValueFromConfigFileMap(configFileMap, resolved, () => /* @__PURE__ */ new Map()); - } - function getCurrentTime(host) { - return host.now ? host.now() : /* @__PURE__ */ new Date(); - } - function isCircularBuildOrder(buildOrder) { - return !!buildOrder && !!buildOrder.buildOrder; - } - function getBuildOrderFromAnyBuildOrder(anyBuildOrder) { - return isCircularBuildOrder(anyBuildOrder) ? anyBuildOrder.buildOrder : anyBuildOrder; - } - function createBuilderStatusReporter(system, pretty) { - return (diagnostic) => { - let output = pretty ? `[${formatColorAndReset(getLocaleTimeString(system), "\x1B[90m" /* Grey */)}] ` : `${getLocaleTimeString(system)} - `; - output += `${flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)}${system.newLine + system.newLine}`; - system.write(output); - }; - } - function createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus) { - const host = createProgramHost(system, createProgram2); - host.getModifiedTime = system.getModifiedTime ? (path) => system.getModifiedTime(path) : returnUndefined; - host.setModifiedTime = system.setModifiedTime ? (path, date) => system.setModifiedTime(path, date) : noop; - host.deleteFile = system.deleteFile ? (path) => system.deleteFile(path) : noop; - host.reportDiagnostic = reportDiagnostic || createDiagnosticReporter(system); - host.reportSolutionBuilderStatus = reportSolutionBuilderStatus || createBuilderStatusReporter(system); - host.now = maybeBind(system, system.now); - return host; - } - function createSolutionBuilderHost(system = sys, createProgram2, reportDiagnostic, reportSolutionBuilderStatus, reportErrorSummary2) { - const host = createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus); - host.reportErrorSummary = reportErrorSummary2; - return host; - } - function createSolutionBuilderWithWatchHost(system = sys, createProgram2, reportDiagnostic, reportSolutionBuilderStatus, reportWatchStatus2) { - const host = createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus); - const watchHost = createWatchHost(system, reportWatchStatus2); - copyProperties(host, watchHost); - return host; - } - function getCompilerOptionsOfBuildOptions(buildOptions) { - const result = {}; - commonOptionsWithBuild.forEach((option) => { - if (hasProperty(buildOptions, option.name)) - result[option.name] = buildOptions[option.name]; - }); - return result; - } - function createSolutionBuilder(host, rootNames, defaultOptions) { - return createSolutionBuilderWorker( - /*watch*/ - false, - host, - rootNames, - defaultOptions - ); - } - function createSolutionBuilderWithWatch(host, rootNames, defaultOptions, baseWatchOptions) { - return createSolutionBuilderWorker( - /*watch*/ - true, - host, - rootNames, - defaultOptions, - baseWatchOptions - ); - } - function createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions) { - const host = hostOrHostWithWatch; - const hostWithWatch = hostOrHostWithWatch; - const baseCompilerOptions = getCompilerOptionsOfBuildOptions(options); - const compilerHost = createCompilerHostFromProgramHost(host, () => state.projectCompilerOptions); - setGetSourceFileAsHashVersioned(compilerHost); - compilerHost.getParsedCommandLine = (fileName) => parseConfigFile(state, fileName, toResolvedConfigFilePath(state, fileName)); - compilerHost.resolveModuleNameLiterals = maybeBind(host, host.resolveModuleNameLiterals); - compilerHost.resolveTypeReferenceDirectiveReferences = maybeBind(host, host.resolveTypeReferenceDirectiveReferences); - compilerHost.resolveLibrary = maybeBind(host, host.resolveLibrary); - compilerHost.resolveModuleNames = maybeBind(host, host.resolveModuleNames); - compilerHost.resolveTypeReferenceDirectives = maybeBind(host, host.resolveTypeReferenceDirectives); - compilerHost.getModuleResolutionCache = maybeBind(host, host.getModuleResolutionCache); - let moduleResolutionCache, typeReferenceDirectiveResolutionCache; - if (!compilerHost.resolveModuleNameLiterals && !compilerHost.resolveModuleNames) { - moduleResolutionCache = createModuleResolutionCache(compilerHost.getCurrentDirectory(), compilerHost.getCanonicalFileName); - compilerHost.resolveModuleNameLiterals = (moduleNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( - moduleNames, - containingFile, - redirectedReference, - options2, - containingSourceFile, - host, - moduleResolutionCache, - createModuleResolutionLoader - ); - compilerHost.getModuleResolutionCache = () => moduleResolutionCache; - } - if (!compilerHost.resolveTypeReferenceDirectiveReferences && !compilerHost.resolveTypeReferenceDirectives) { - typeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache( - compilerHost.getCurrentDirectory(), - compilerHost.getCanonicalFileName, - /*options*/ - void 0, - moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache() - ); - compilerHost.resolveTypeReferenceDirectiveReferences = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( - typeDirectiveNames, - containingFile, - redirectedReference, - options2, - containingSourceFile, - host, - typeReferenceDirectiveResolutionCache, - createTypeReferenceResolutionLoader - ); - } - let libraryResolutionCache; - if (!compilerHost.resolveLibrary) { - libraryResolutionCache = createModuleResolutionCache( - compilerHost.getCurrentDirectory(), - compilerHost.getCanonicalFileName, - /*options*/ - void 0, - moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache() - ); - compilerHost.resolveLibrary = (libraryName, resolveFrom, options2) => resolveLibrary( - libraryName, - resolveFrom, - options2, - host, - libraryResolutionCache - ); - } - compilerHost.getBuildInfo = (fileName, configFilePath) => getBuildInfo3( - state, - fileName, - toResolvedConfigFilePath(state, configFilePath), - /*modifiedTime*/ - void 0 - ); - const { watchFile: watchFile2, watchDirectory, writeLog } = createWatchFactory(hostWithWatch, options); - const state = { - host, - hostWithWatch, - parseConfigFileHost: parseConfigHostFromCompilerHostLike(host), - write: maybeBind(host, host.trace), - // State of solution - options, - baseCompilerOptions, - rootNames, - baseWatchOptions, - resolvedConfigFilePaths: /* @__PURE__ */ new Map(), - configFileCache: /* @__PURE__ */ new Map(), - projectStatus: /* @__PURE__ */ new Map(), - extendedConfigCache: /* @__PURE__ */ new Map(), - buildInfoCache: /* @__PURE__ */ new Map(), - outputTimeStamps: /* @__PURE__ */ new Map(), - builderPrograms: /* @__PURE__ */ new Map(), - diagnostics: /* @__PURE__ */ new Map(), - projectPendingBuild: /* @__PURE__ */ new Map(), - projectErrorsReported: /* @__PURE__ */ new Map(), - compilerHost, - moduleResolutionCache, - typeReferenceDirectiveResolutionCache, - libraryResolutionCache, - // Mutable state - buildOrder: void 0, - readFileWithCache: (f) => host.readFile(f), - projectCompilerOptions: baseCompilerOptions, - cache: void 0, - allProjectBuildPending: true, - needsSummary: true, - watchAllProjectsPending: watch, - // Watch state - watch, - allWatchedWildcardDirectories: /* @__PURE__ */ new Map(), - allWatchedInputFiles: /* @__PURE__ */ new Map(), - allWatchedConfigFiles: /* @__PURE__ */ new Map(), - allWatchedExtendedConfigFiles: /* @__PURE__ */ new Map(), - allWatchedPackageJsonFiles: /* @__PURE__ */ new Map(), - filesWatched: /* @__PURE__ */ new Map(), - lastCachedPackageJsonLookups: /* @__PURE__ */ new Map(), - timerToBuildInvalidatedProject: void 0, - reportFileChangeDetected: false, - watchFile: watchFile2, - watchDirectory, - writeLog - }; - return state; - } - function toPath2(state, fileName) { - return toPath(fileName, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName); - } - function toResolvedConfigFilePath(state, fileName) { - const { resolvedConfigFilePaths } = state; - const path = resolvedConfigFilePaths.get(fileName); - if (path !== void 0) - return path; - const resolvedPath = toPath2(state, fileName); - resolvedConfigFilePaths.set(fileName, resolvedPath); - return resolvedPath; - } - function isParsedCommandLine(entry) { - return !!entry.options; - } - function getCachedParsedConfigFile(state, configFilePath) { - const value = state.configFileCache.get(configFilePath); - return value && isParsedCommandLine(value) ? value : void 0; - } - function parseConfigFile(state, configFileName, configFilePath) { - const { configFileCache } = state; - const value = configFileCache.get(configFilePath); - if (value) { - return isParsedCommandLine(value) ? value : void 0; - } - mark("SolutionBuilder::beforeConfigFileParsing"); - let diagnostic; - const { parseConfigFileHost, baseCompilerOptions, baseWatchOptions, extendedConfigCache, host } = state; - let parsed; - if (host.getParsedCommandLine) { - parsed = host.getParsedCommandLine(configFileName); - if (!parsed) - diagnostic = createCompilerDiagnostic(Diagnostics.File_0_not_found, configFileName); - } else { - parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = (d) => diagnostic = d; - parsed = getParsedCommandLineOfConfigFile(configFileName, baseCompilerOptions, parseConfigFileHost, extendedConfigCache, baseWatchOptions); - parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = noop; - } - configFileCache.set(configFilePath, parsed || diagnostic); - mark("SolutionBuilder::afterConfigFileParsing"); - measure("SolutionBuilder::Config file parsing", "SolutionBuilder::beforeConfigFileParsing", "SolutionBuilder::afterConfigFileParsing"); - return parsed; - } - function resolveProjectName(state, name) { - return resolveConfigFileProjectName(resolvePath(state.compilerHost.getCurrentDirectory(), name)); - } - function createBuildOrder(state, roots) { - const temporaryMarks = /* @__PURE__ */ new Map(); - const permanentMarks = /* @__PURE__ */ new Map(); - const circularityReportStack = []; - let buildOrder; - let circularDiagnostics; - for (const root of roots) { - visit(root); - } - return circularDiagnostics ? { buildOrder: buildOrder || emptyArray, circularDiagnostics } : buildOrder || emptyArray; - function visit(configFileName, inCircularContext) { - const projPath = toResolvedConfigFilePath(state, configFileName); - if (permanentMarks.has(projPath)) - return; - if (temporaryMarks.has(projPath)) { - if (!inCircularContext) { - (circularDiagnostics || (circularDiagnostics = [])).push( - createCompilerDiagnostic( - Diagnostics.Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0, - circularityReportStack.join("\r\n") - ) - ); - } - return; - } - temporaryMarks.set(projPath, true); - circularityReportStack.push(configFileName); - const parsed = parseConfigFile(state, configFileName, projPath); - if (parsed && parsed.projectReferences) { - for (const ref of parsed.projectReferences) { - const resolvedRefPath = resolveProjectName(state, ref.path); - visit(resolvedRefPath, inCircularContext || ref.circular); - } - } - circularityReportStack.pop(); - permanentMarks.set(projPath, true); - (buildOrder || (buildOrder = [])).push(configFileName); - } - } - function getBuildOrder(state) { - return state.buildOrder || createStateBuildOrder(state); - } - function createStateBuildOrder(state) { - const buildOrder = createBuildOrder(state, state.rootNames.map((f) => resolveProjectName(state, f))); - state.resolvedConfigFilePaths.clear(); - const currentProjects = new Map( - getBuildOrderFromAnyBuildOrder(buildOrder).map( - (resolved) => [toResolvedConfigFilePath(state, resolved), true] - ) - ); - const noopOnDelete = { onDeleteValue: noop }; - mutateMapSkippingNewValues(state.configFileCache, currentProjects, noopOnDelete); - mutateMapSkippingNewValues(state.projectStatus, currentProjects, noopOnDelete); - mutateMapSkippingNewValues(state.builderPrograms, currentProjects, noopOnDelete); - mutateMapSkippingNewValues(state.diagnostics, currentProjects, noopOnDelete); - mutateMapSkippingNewValues(state.projectPendingBuild, currentProjects, noopOnDelete); - mutateMapSkippingNewValues(state.projectErrorsReported, currentProjects, noopOnDelete); - mutateMapSkippingNewValues(state.buildInfoCache, currentProjects, noopOnDelete); - mutateMapSkippingNewValues(state.outputTimeStamps, currentProjects, noopOnDelete); - if (state.watch) { - mutateMapSkippingNewValues( - state.allWatchedConfigFiles, - currentProjects, - { onDeleteValue: closeFileWatcher } - ); - state.allWatchedExtendedConfigFiles.forEach((watcher) => { - watcher.projects.forEach((project) => { - if (!currentProjects.has(project)) { - watcher.projects.delete(project); - } - }); - watcher.close(); - }); - mutateMapSkippingNewValues( - state.allWatchedWildcardDirectories, - currentProjects, - { onDeleteValue: (existingMap) => existingMap.forEach(closeFileWatcherOf) } - ); - mutateMapSkippingNewValues( - state.allWatchedInputFiles, - currentProjects, - { onDeleteValue: (existingMap) => existingMap.forEach(closeFileWatcher) } - ); - mutateMapSkippingNewValues( - state.allWatchedPackageJsonFiles, - currentProjects, - { onDeleteValue: (existingMap) => existingMap.forEach(closeFileWatcher) } - ); - } - return state.buildOrder = buildOrder; - } - function getBuildOrderFor(state, project, onlyReferences) { - const resolvedProject = project && resolveProjectName(state, project); - const buildOrderFromState = getBuildOrder(state); - if (isCircularBuildOrder(buildOrderFromState)) - return buildOrderFromState; - if (resolvedProject) { - const projectPath = toResolvedConfigFilePath(state, resolvedProject); - const projectIndex = findIndex( - buildOrderFromState, - (configFileName) => toResolvedConfigFilePath(state, configFileName) === projectPath - ); - if (projectIndex === -1) - return void 0; - } - const buildOrder = resolvedProject ? createBuildOrder(state, [resolvedProject]) : buildOrderFromState; - Debug.assert(!isCircularBuildOrder(buildOrder)); - Debug.assert(!onlyReferences || resolvedProject !== void 0); - Debug.assert(!onlyReferences || buildOrder[buildOrder.length - 1] === resolvedProject); - return onlyReferences ? buildOrder.slice(0, buildOrder.length - 1) : buildOrder; - } - function enableCache(state) { - if (state.cache) { - disableCache(state); - } - const { compilerHost, host } = state; - const originalReadFileWithCache = state.readFileWithCache; - const originalGetSourceFile = compilerHost.getSourceFile; - const { - originalReadFile, - originalFileExists, - originalDirectoryExists, - originalCreateDirectory, - originalWriteFile, - getSourceFileWithCache, - readFileWithCache - } = changeCompilerHostLikeToUseCache( - host, - (fileName) => toPath2(state, fileName), - (...args) => originalGetSourceFile.call(compilerHost, ...args) - ); - state.readFileWithCache = readFileWithCache; - compilerHost.getSourceFile = getSourceFileWithCache; - state.cache = { - originalReadFile, - originalFileExists, - originalDirectoryExists, - originalCreateDirectory, - originalWriteFile, - originalReadFileWithCache, - originalGetSourceFile - }; - } - function disableCache(state) { - if (!state.cache) - return; - const { cache, host, compilerHost, extendedConfigCache, moduleResolutionCache, typeReferenceDirectiveResolutionCache, libraryResolutionCache } = state; - host.readFile = cache.originalReadFile; - host.fileExists = cache.originalFileExists; - host.directoryExists = cache.originalDirectoryExists; - host.createDirectory = cache.originalCreateDirectory; - host.writeFile = cache.originalWriteFile; - compilerHost.getSourceFile = cache.originalGetSourceFile; - state.readFileWithCache = cache.originalReadFileWithCache; - extendedConfigCache.clear(); - moduleResolutionCache == null ? void 0 : moduleResolutionCache.clear(); - typeReferenceDirectiveResolutionCache == null ? void 0 : typeReferenceDirectiveResolutionCache.clear(); - libraryResolutionCache == null ? void 0 : libraryResolutionCache.clear(); - state.cache = void 0; - } - function clearProjectStatus(state, resolved) { - state.projectStatus.delete(resolved); - state.diagnostics.delete(resolved); - } - function addProjToQueue({ projectPendingBuild }, proj, reloadLevel) { - const value = projectPendingBuild.get(proj); - if (value === void 0) { - projectPendingBuild.set(proj, reloadLevel); - } else if (value < reloadLevel) { - projectPendingBuild.set(proj, reloadLevel); - } - } - function setupInitialBuild(state, cancellationToken) { - if (!state.allProjectBuildPending) - return; - state.allProjectBuildPending = false; - if (state.options.watch) - reportWatchStatus(state, Diagnostics.Starting_compilation_in_watch_mode); - enableCache(state); - const buildOrder = getBuildOrderFromAnyBuildOrder(getBuildOrder(state)); - buildOrder.forEach( - (configFileName) => state.projectPendingBuild.set( - toResolvedConfigFilePath(state, configFileName), - 0 /* None */ - ) - ); - if (cancellationToken) { - cancellationToken.throwIfCancellationRequested(); - } - } - function doneInvalidatedProject(state, projectPath) { - state.projectPendingBuild.delete(projectPath); - return state.diagnostics.has(projectPath) ? 1 /* DiagnosticsPresent_OutputsSkipped */ : 0 /* Success */; - } - function createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder) { - let updateOutputFileStampsPending = true; - return { - kind: 2 /* UpdateOutputFileStamps */, - project, - projectPath, - buildOrder, - getCompilerOptions: () => config.options, - getCurrentDirectory: () => state.compilerHost.getCurrentDirectory(), - updateOutputFileStatmps: () => { - updateOutputTimestamps(state, config, projectPath); - updateOutputFileStampsPending = false; - }, - done: () => { - if (updateOutputFileStampsPending) { - updateOutputTimestamps(state, config, projectPath); - } - mark("SolutionBuilder::Timestamps only updates"); - return doneInvalidatedProject(state, projectPath); - } - }; - } - function createBuildOrUpdateInvalidedProject(kind, state, project, projectPath, projectIndex, config, buildOrder) { - let step = kind === 0 /* Build */ ? 0 /* CreateProgram */ : 4 /* EmitBundle */; - let program; - let buildResult; - let invalidatedProjectOfBundle; - return kind === 0 /* Build */ ? { - kind, - project, - projectPath, - buildOrder, - getCompilerOptions: () => config.options, - getCurrentDirectory: () => state.compilerHost.getCurrentDirectory(), - getBuilderProgram: () => withProgramOrUndefined(identity), - getProgram: () => withProgramOrUndefined( - (program2) => program2.getProgramOrUndefined() - ), - getSourceFile: (fileName) => withProgramOrUndefined( - (program2) => program2.getSourceFile(fileName) - ), - getSourceFiles: () => withProgramOrEmptyArray( - (program2) => program2.getSourceFiles() - ), - getOptionsDiagnostics: (cancellationToken) => withProgramOrEmptyArray( - (program2) => program2.getOptionsDiagnostics(cancellationToken) - ), - getGlobalDiagnostics: (cancellationToken) => withProgramOrEmptyArray( - (program2) => program2.getGlobalDiagnostics(cancellationToken) - ), - getConfigFileParsingDiagnostics: () => withProgramOrEmptyArray( - (program2) => program2.getConfigFileParsingDiagnostics() - ), - getSyntacticDiagnostics: (sourceFile, cancellationToken) => withProgramOrEmptyArray( - (program2) => program2.getSyntacticDiagnostics(sourceFile, cancellationToken) - ), - getAllDependencies: (sourceFile) => withProgramOrEmptyArray( - (program2) => program2.getAllDependencies(sourceFile) - ), - getSemanticDiagnostics: (sourceFile, cancellationToken) => withProgramOrEmptyArray( - (program2) => program2.getSemanticDiagnostics(sourceFile, cancellationToken) - ), - getSemanticDiagnosticsOfNextAffectedFile: (cancellationToken, ignoreSourceFile) => withProgramOrUndefined( - (program2) => program2.getSemanticDiagnosticsOfNextAffectedFile && program2.getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) - ), - emit: (targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) => { - if (targetSourceFile || emitOnlyDtsFiles) { - return withProgramOrUndefined( - (program2) => { - var _a, _b; - return program2.emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a, project))); - } - ); - } - executeSteps(2 /* SemanticDiagnostics */, cancellationToken); - if (step === 5 /* EmitBuildInfo */) { - return emitBuildInfo(writeFile2, cancellationToken); - } - if (step !== 3 /* Emit */) - return void 0; - return emit(writeFile2, cancellationToken, customTransformers); - }, - done - } : { - kind, - project, - projectPath, - buildOrder, - getCompilerOptions: () => config.options, - getCurrentDirectory: () => state.compilerHost.getCurrentDirectory(), - emit: (writeFile2, customTransformers) => { - if (step !== 4 /* EmitBundle */) - return invalidatedProjectOfBundle; - return emitBundle(writeFile2, customTransformers); - }, - done - }; - function done(cancellationToken, writeFile2, customTransformers) { - executeSteps(8 /* Done */, cancellationToken, writeFile2, customTransformers); - if (kind === 0 /* Build */) - mark("SolutionBuilder::Projects built"); - else - mark("SolutionBuilder::Bundles updated"); - return doneInvalidatedProject(state, projectPath); - } - function withProgramOrUndefined(action) { - executeSteps(0 /* CreateProgram */); - return program && action(program); - } - function withProgramOrEmptyArray(action) { - return withProgramOrUndefined(action) || emptyArray; - } - function createProgram2() { - var _a, _b; - Debug.assert(program === void 0); - if (state.options.dry) { - reportStatus(state, Diagnostics.A_non_dry_build_would_build_project_0, project); - buildResult = 1 /* Success */; - step = 7 /* QueueReferencingProjects */; - return; - } - if (state.options.verbose) - reportStatus(state, Diagnostics.Building_project_0, project); - if (config.fileNames.length === 0) { - reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); - buildResult = 0 /* None */; - step = 7 /* QueueReferencingProjects */; - return; - } - const { host, compilerHost } = state; - state.projectCompilerOptions = config.options; - (_a = state.moduleResolutionCache) == null ? void 0 : _a.update(config.options); - (_b = state.typeReferenceDirectiveResolutionCache) == null ? void 0 : _b.update(config.options); - program = host.createProgram( - config.fileNames, - config.options, - compilerHost, - getOldProgram(state, projectPath, config), - getConfigFileParsingDiagnostics(config), - config.projectReferences - ); - if (state.watch) { - state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && map( - state.moduleResolutionCache.getPackageJsonInfoCache().entries(), - ([path, data]) => [state.host.realpath && data ? toPath2(state, state.host.realpath(path)) : path, data] - )); - state.builderPrograms.set(projectPath, program); - } - step++; - } - function handleDiagnostics(diagnostics, errorFlags, errorType) { - if (diagnostics.length) { - ({ buildResult, step } = buildErrors( - state, - projectPath, - program, - config, - diagnostics, - errorFlags, - errorType - )); - } else { - step++; - } - } - function getSyntaxDiagnostics(cancellationToken) { - Debug.assertIsDefined(program); - handleDiagnostics( - [ - ...program.getConfigFileParsingDiagnostics(), - ...program.getOptionsDiagnostics(cancellationToken), - ...program.getGlobalDiagnostics(cancellationToken), - ...program.getSyntacticDiagnostics( - /*sourceFile*/ - void 0, - cancellationToken - ) - ], - 8 /* SyntaxErrors */, - "Syntactic" - ); - } - function getSemanticDiagnostics(cancellationToken) { - handleDiagnostics( - Debug.checkDefined(program).getSemanticDiagnostics( - /*sourceFile*/ - void 0, - cancellationToken - ), - 16 /* TypeErrors */, - "Semantic" - ); - } - function emit(writeFileCallback, cancellationToken, customTransformers) { - var _a, _b, _c; - Debug.assertIsDefined(program); - Debug.assert(step === 3 /* Emit */); - const saved = program.saveEmitState(); - let declDiagnostics; - const reportDeclarationDiagnostics = (d) => (declDiagnostics || (declDiagnostics = [])).push(d); - const outputFiles = []; - const { emitResult } = emitFilesAndReportErrors( - program, - reportDeclarationDiagnostics, - /*write*/ - void 0, - /*reportSummary*/ - void 0, - (name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, data }), - cancellationToken, - /*emitOnlyDtsFiles*/ - false, - customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a, project)) - ); - if (declDiagnostics) { - program.restoreEmitState(saved); - ({ buildResult, step } = buildErrors( - state, - projectPath, - program, - config, - declDiagnostics, - 32 /* DeclarationEmitErrors */, - "Declaration file" - )); - return { - emitSkipped: true, - diagnostics: emitResult.diagnostics - }; - } - const { host, compilerHost } = state; - const resultFlags = ((_c = program.hasChangedEmitSignature) == null ? void 0 : _c.call(program)) ? 0 /* None */ : 2 /* DeclarationOutputUnchanged */; - const emitterDiagnostics = createDiagnosticCollection(); - const emittedOutputs = /* @__PURE__ */ new Map(); - const options = program.getCompilerOptions(); - const isIncremental = isIncrementalCompilation(options); - let outputTimeStampMap; - let now; - outputFiles.forEach(({ name, text, writeByteOrderMark, data }) => { - const path = toPath2(state, name); - emittedOutputs.set(toPath2(state, name), name); - if (data == null ? void 0 : data.buildInfo) - setBuildInfo(state, data.buildInfo, projectPath, options, resultFlags); - const modifiedTime = (data == null ? void 0 : data.differsOnlyInMap) ? getModifiedTime(state.host, name) : void 0; - writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); - if (data == null ? void 0 : data.differsOnlyInMap) - state.host.setModifiedTime(name, modifiedTime); - else if (!isIncremental && state.watch) { - (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host))); - } - }); - finishEmit( - emitterDiagnostics, - emittedOutputs, - outputFiles.length ? outputFiles[0].name : getFirstProjectOutput(config, !host.useCaseSensitiveFileNames()), - resultFlags - ); - return emitResult; - } - function emitBuildInfo(writeFileCallback, cancellationToken) { - Debug.assertIsDefined(program); - Debug.assert(step === 5 /* EmitBuildInfo */); - const emitResult = program.emitBuildInfo((name, text, writeByteOrderMark, onError, sourceFiles, data) => { - if (data == null ? void 0 : data.buildInfo) - setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions(), 2 /* DeclarationOutputUnchanged */); - if (writeFileCallback) - writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data); - else - state.compilerHost.writeFile(name, text, writeByteOrderMark, onError, sourceFiles, data); - }, cancellationToken); - if (emitResult.diagnostics.length) { - reportErrors(state, emitResult.diagnostics); - state.diagnostics.set(projectPath, [...state.diagnostics.get(projectPath), ...emitResult.diagnostics]); - buildResult = 64 /* EmitErrors */ & buildResult; - } - if (emitResult.emittedFiles && state.write) { - emitResult.emittedFiles.forEach((name) => listEmittedFile(state, config, name)); - } - afterProgramDone(state, program, config); - step = 7 /* QueueReferencingProjects */; - return emitResult; - } - function finishEmit(emitterDiagnostics, emittedOutputs, oldestOutputFileName, resultFlags) { - const emitDiagnostics = emitterDiagnostics.getDiagnostics(); - if (emitDiagnostics.length) { - ({ buildResult, step } = buildErrors( - state, - projectPath, - program, - config, - emitDiagnostics, - 64 /* EmitErrors */, - "Emit" - )); - return emitDiagnostics; - } - if (state.write) { - emittedOutputs.forEach((name) => listEmittedFile(state, config, name)); - } - updateOutputTimestampsWorker(state, config, projectPath, Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs); - state.diagnostics.delete(projectPath); - state.projectStatus.set(projectPath, { - type: 1 /* UpToDate */, - oldestOutputFileName - }); - afterProgramDone(state, program, config); - step = 7 /* QueueReferencingProjects */; - buildResult = resultFlags; - return emitDiagnostics; - } - function emitBundle(writeFileCallback, customTransformers) { - var _a, _b, _c, _d; - Debug.assert(kind === 1 /* UpdateBundle */); - if (state.options.dry) { - reportStatus(state, Diagnostics.A_non_dry_build_would_update_output_of_project_0, project); - buildResult = 1 /* Success */; - step = 7 /* QueueReferencingProjects */; - return void 0; - } - if (state.options.verbose) - reportStatus(state, Diagnostics.Updating_output_of_project_0, project); - const { compilerHost } = state; - state.projectCompilerOptions = config.options; - (_b = (_a = state.host).beforeEmitBundle) == null ? void 0 : _b.call(_a, config); - const outputFiles = emitUsingBuildInfo( - config, - compilerHost, - (ref) => { - const refName = resolveProjectName(state, ref.path); - return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName)); - }, - customTransformers || ((_d = (_c = state.host).getCustomTransformers) == null ? void 0 : _d.call(_c, project)) - ); - if (isString(outputFiles)) { - reportStatus(state, Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles)); - step = 6 /* BuildInvalidatedProjectOfBundle */; - return invalidatedProjectOfBundle = createBuildOrUpdateInvalidedProject( - 0 /* Build */, - state, - project, - projectPath, - projectIndex, - config, - buildOrder - ); - } - Debug.assert(!!outputFiles.length); - const emitterDiagnostics = createDiagnosticCollection(); - const emittedOutputs = /* @__PURE__ */ new Map(); - let resultFlags = 2 /* DeclarationOutputUnchanged */; - const existingBuildInfo = state.buildInfoCache.get(projectPath).buildInfo || void 0; - outputFiles.forEach(({ name, text, writeByteOrderMark, data }) => { - var _a2, _b2; - emittedOutputs.set(toPath2(state, name), name); - if (data == null ? void 0 : data.buildInfo) { - if (((_a2 = data.buildInfo.program) == null ? void 0 : _a2.outSignature) !== ((_b2 = existingBuildInfo == null ? void 0 : existingBuildInfo.program) == null ? void 0 : _b2.outSignature)) { - resultFlags &= ~2 /* DeclarationOutputUnchanged */; - } - setBuildInfo(state, data.buildInfo, projectPath, config.options, resultFlags); - } - writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); - }); - const emitDiagnostics = finishEmit( - emitterDiagnostics, - emittedOutputs, - outputFiles[0].name, - resultFlags - ); - return { emitSkipped: false, diagnostics: emitDiagnostics }; - } - function executeSteps(till, cancellationToken, writeFile2, customTransformers) { - while (step <= till && step < 8 /* Done */) { - const currentStep = step; - switch (step) { - case 0 /* CreateProgram */: - createProgram2(); - break; - case 1 /* SyntaxDiagnostics */: - getSyntaxDiagnostics(cancellationToken); - break; - case 2 /* SemanticDiagnostics */: - getSemanticDiagnostics(cancellationToken); - break; - case 3 /* Emit */: - emit(writeFile2, cancellationToken, customTransformers); - break; - case 5 /* EmitBuildInfo */: - emitBuildInfo(writeFile2, cancellationToken); - break; - case 4 /* EmitBundle */: - emitBundle(writeFile2, customTransformers); - break; - case 6 /* BuildInvalidatedProjectOfBundle */: - Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken, writeFile2, customTransformers); - step = 8 /* Done */; - break; - case 7 /* QueueReferencingProjects */: - queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.checkDefined(buildResult)); - step++; - break; - case 8 /* Done */: - default: - assertType(step); - } - Debug.assert(step > currentStep); - } - } - } - function needsBuild({ options }, status, config) { - if (status.type !== 3 /* OutOfDateWithPrepend */ || options.force) - return true; - return config.fileNames.length === 0 || !!getConfigFileParsingDiagnostics(config).length || !isIncrementalCompilation(config.options); - } - function getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue) { - if (!state.projectPendingBuild.size) - return void 0; - if (isCircularBuildOrder(buildOrder)) - return void 0; - const { options, projectPendingBuild } = state; - for (let projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) { - const project = buildOrder[projectIndex]; - const projectPath = toResolvedConfigFilePath(state, project); - const reloadLevel = state.projectPendingBuild.get(projectPath); - if (reloadLevel === void 0) - continue; - if (reportQueue) { - reportQueue = false; - reportBuildQueue(state, buildOrder); - } - const config = parseConfigFile(state, project, projectPath); - if (!config) { - reportParseConfigFileDiagnostic(state, projectPath); - projectPendingBuild.delete(projectPath); - continue; - } - if (reloadLevel === 2 /* Full */) { - watchConfigFile(state, project, projectPath, config); - watchExtendedConfigFiles(state, projectPath, config); - watchWildCardDirectories(state, project, projectPath, config); - watchInputFiles(state, project, projectPath, config); - watchPackageJsonFiles(state, project, projectPath, config); - } else if (reloadLevel === 1 /* Partial */) { - config.fileNames = getFileNamesFromConfigSpecs(config.options.configFile.configFileSpecs, getDirectoryPath(project), config.options, state.parseConfigFileHost); - updateErrorForNoInputFiles(config.fileNames, project, config.options.configFile.configFileSpecs, config.errors, canJsonReportNoInputFiles(config.raw)); - watchInputFiles(state, project, projectPath, config); - watchPackageJsonFiles(state, project, projectPath, config); - } - const status = getUpToDateStatus(state, config, projectPath); - if (!options.force) { - if (status.type === 1 /* UpToDate */) { - verboseReportProjectStatus(state, project, status); - reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); - projectPendingBuild.delete(projectPath); - if (options.dry) { - reportStatus(state, Diagnostics.Project_0_is_up_to_date, project); - } - continue; - } - if (status.type === 2 /* UpToDateWithUpstreamTypes */ || status.type === 15 /* UpToDateWithInputFileText */) { - reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); - return { - kind: 2 /* UpdateOutputFileStamps */, - status, - project, - projectPath, - projectIndex, - config - }; - } - } - if (status.type === 12 /* UpstreamBlocked */) { - verboseReportProjectStatus(state, project, status); - reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); - projectPendingBuild.delete(projectPath); - if (options.verbose) { - reportStatus( - state, - status.upstreamProjectBlocked ? Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_was_not_built : Diagnostics.Skipping_build_of_project_0_because_its_dependency_1_has_errors, - project, - status.upstreamProjectName - ); - } - continue; - } - if (status.type === 16 /* ContainerOnly */) { - verboseReportProjectStatus(state, project, status); - reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config)); - projectPendingBuild.delete(projectPath); - continue; - } - return { - kind: needsBuild(state, status, config) ? 0 /* Build */ : 1 /* UpdateBundle */, - status, - project, - projectPath, - projectIndex, - config - }; - } - return void 0; - } - function createInvalidatedProjectWithInfo(state, info, buildOrder) { - verboseReportProjectStatus(state, info.project, info.status); - return info.kind !== 2 /* UpdateOutputFileStamps */ ? createBuildOrUpdateInvalidedProject( - info.kind, - state, - info.project, - info.projectPath, - info.projectIndex, - info.config, - buildOrder - ) : createUpdateOutputFileStampsProject( - state, - info.project, - info.projectPath, - info.config, - buildOrder - ); - } - function getNextInvalidatedProject(state, buildOrder, reportQueue) { - const info = getNextInvalidatedProjectCreateInfo(state, buildOrder, reportQueue); - if (!info) - return info; - return createInvalidatedProjectWithInfo(state, info, buildOrder); - } - function listEmittedFile({ write }, proj, file) { - if (write && proj.options.listEmittedFiles) { - write(`TSFILE: ${file}`); - } - } - function getOldProgram({ options, builderPrograms, compilerHost }, proj, parsed) { - if (options.force) - return void 0; - const value = builderPrograms.get(proj); - if (value) - return value; - return readBuilderProgram(parsed.options, compilerHost); - } - function afterProgramDone(state, program, config) { - if (program) { - if (state.write) - listFiles(program, state.write); - if (state.host.afterProgramEmitAndDiagnostics) { - state.host.afterProgramEmitAndDiagnostics(program); - } - program.releaseProgram(); - } else if (state.host.afterEmitBundle) { - state.host.afterEmitBundle(config); - } - state.projectCompilerOptions = state.baseCompilerOptions; - } - function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) { - const canEmitBuildInfo = program && !outFile(program.getCompilerOptions()); - reportAndStoreErrors(state, resolvedPath, diagnostics); - state.projectStatus.set(resolvedPath, { type: 0 /* Unbuildable */, reason: `${errorType} errors` }); - if (canEmitBuildInfo) - return { buildResult, step: 5 /* EmitBuildInfo */ }; - afterProgramDone(state, program, config); - return { buildResult, step: 7 /* QueueReferencingProjects */ }; - } - function isFileWatcherWithModifiedTime(value) { - return !!value.watcher; - } - function getModifiedTime2(state, fileName) { - const path = toPath2(state, fileName); - const existing = state.filesWatched.get(path); - if (state.watch && !!existing) { - if (!isFileWatcherWithModifiedTime(existing)) - return existing; - if (existing.modifiedTime) - return existing.modifiedTime; - } - const result = getModifiedTime(state.host, fileName); - if (state.watch) { - if (existing) - existing.modifiedTime = result; - else - state.filesWatched.set(path, result); - } - return result; - } - function watchFile(state, file, callback, pollingInterval, options, watchType, project) { - const path = toPath2(state, file); - const existing = state.filesWatched.get(path); - if (existing && isFileWatcherWithModifiedTime(existing)) { - existing.callbacks.push(callback); - } else { - const watcher = state.watchFile( - file, - (fileName, eventKind, modifiedTime) => { - const existing2 = Debug.checkDefined(state.filesWatched.get(path)); - Debug.assert(isFileWatcherWithModifiedTime(existing2)); - existing2.modifiedTime = modifiedTime; - existing2.callbacks.forEach((cb) => cb(fileName, eventKind, modifiedTime)); - }, - pollingInterval, - options, - watchType, - project - ); - state.filesWatched.set(path, { callbacks: [callback], watcher, modifiedTime: existing }); - } - return { - close: () => { - const existing2 = Debug.checkDefined(state.filesWatched.get(path)); - Debug.assert(isFileWatcherWithModifiedTime(existing2)); - if (existing2.callbacks.length === 1) { - state.filesWatched.delete(path); - closeFileWatcherOf(existing2); - } else { - unorderedRemoveItem(existing2.callbacks, callback); - } - } - }; - } - function getOutputTimeStampMap(state, resolvedConfigFilePath) { - if (!state.watch) - return void 0; - let result = state.outputTimeStamps.get(resolvedConfigFilePath); - if (!result) - state.outputTimeStamps.set(resolvedConfigFilePath, result = /* @__PURE__ */ new Map()); - return result; - } - function setBuildInfo(state, buildInfo, resolvedConfigPath, options, resultFlags) { - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); - const existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath); - const modifiedTime = getCurrentTime(state.host); - if (existing) { - existing.buildInfo = buildInfo; - existing.modifiedTime = modifiedTime; - if (!(resultFlags & 2 /* DeclarationOutputUnchanged */)) - existing.latestChangedDtsTime = modifiedTime; - } else { - state.buildInfoCache.set(resolvedConfigPath, { - path: toPath2(state, buildInfoPath), - buildInfo, - modifiedTime, - latestChangedDtsTime: resultFlags & 2 /* DeclarationOutputUnchanged */ ? void 0 : modifiedTime - }); - } - } - function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) { - const path = toPath2(state, buildInfoPath); - const existing = state.buildInfoCache.get(resolvedConfigPath); - return (existing == null ? void 0 : existing.path) === path ? existing : void 0; - } - function getBuildInfo3(state, buildInfoPath, resolvedConfigPath, modifiedTime) { - const path = toPath2(state, buildInfoPath); - const existing = state.buildInfoCache.get(resolvedConfigPath); - if (existing !== void 0 && existing.path === path) { - return existing.buildInfo || void 0; - } - const value = state.readFileWithCache(buildInfoPath); - const buildInfo = value ? getBuildInfo(buildInfoPath, value) : void 0; - state.buildInfoCache.set(resolvedConfigPath, { path, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime }); - return buildInfo; - } - function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) { - const tsconfigTime = getModifiedTime2(state, configFile); - if (oldestOutputFileTime < tsconfigTime) { - return { - type: 6 /* OutOfDateWithSelf */, - outOfDateOutputFileName: oldestOutputFileName, - newerInputFileName: configFile - }; - } - } - function getUpToDateStatusWorker(state, project, resolvedPath) { - var _a, _b; - if (!project.fileNames.length && !canJsonReportNoInputFiles(project.raw)) { - return { - type: 16 /* ContainerOnly */ - }; - } - let referenceStatuses; - const force = !!state.options.force; - if (project.projectReferences) { - state.projectStatus.set(resolvedPath, { type: 13 /* ComputingUpstream */ }); - for (const ref of project.projectReferences) { - const resolvedRef = resolveProjectReferencePath(ref); - const resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef); - const resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath); - const refStatus = getUpToDateStatus(state, resolvedConfig, resolvedRefPath); - if (refStatus.type === 13 /* ComputingUpstream */ || refStatus.type === 16 /* ContainerOnly */) { - continue; - } - if (refStatus.type === 0 /* Unbuildable */ || refStatus.type === 12 /* UpstreamBlocked */) { - return { - type: 12 /* UpstreamBlocked */, - upstreamProjectName: ref.path, - upstreamProjectBlocked: refStatus.type === 12 /* UpstreamBlocked */ - }; - } - if (refStatus.type !== 1 /* UpToDate */) { - return { - type: 11 /* UpstreamOutOfDate */, - upstreamProjectName: ref.path - }; - } - if (!force) - (referenceStatuses || (referenceStatuses = [])).push({ ref, refStatus, resolvedRefPath, resolvedConfig }); - } - } - if (force) - return { type: 17 /* ForceBuild */ }; - const { host } = state; - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(project.options); - let oldestOutputFileName; - let oldestOutputFileTime = maximumDate; - let buildInfoTime; - let buildInfoProgram; - let buildInfoVersionMap; - if (buildInfoPath) { - const buildInfoCacheEntry2 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath); - buildInfoTime = (buildInfoCacheEntry2 == null ? void 0 : buildInfoCacheEntry2.modifiedTime) || getModifiedTime(host, buildInfoPath); - if (buildInfoTime === missingFileModifiedTime) { - if (!buildInfoCacheEntry2) { - state.buildInfoCache.set(resolvedPath, { - path: toPath2(state, buildInfoPath), - buildInfo: false, - modifiedTime: buildInfoTime - }); - } - return { - type: 4 /* OutputMissing */, - missingOutputFileName: buildInfoPath - }; - } - const buildInfo = getBuildInfo3(state, buildInfoPath, resolvedPath, buildInfoTime); - if (!buildInfo) { - return { - type: 5 /* ErrorReadingFile */, - fileName: buildInfoPath - }; - } - if ((buildInfo.bundle || buildInfo.program) && buildInfo.version !== version) { - return { - type: 14 /* TsVersionOutputOfDate */, - version: buildInfo.version - }; - } - if (buildInfo.program) { - if (((_a = buildInfo.program.changeFileSet) == null ? void 0 : _a.length) || (!project.options.noEmit ? (_b = buildInfo.program.affectedFilesPendingEmit) == null ? void 0 : _b.length : some(buildInfo.program.semanticDiagnosticsPerFile, isArray))) { - return { - type: 8 /* OutOfDateBuildInfo */, - buildInfoFile: buildInfoPath - }; - } - if (!project.options.noEmit && getPendingEmitKind(project.options, buildInfo.program.options || {})) { - return { - type: 9 /* OutOfDateOptions */, - buildInfoFile: buildInfoPath - }; - } - buildInfoProgram = buildInfo.program; - } - oldestOutputFileTime = buildInfoTime; - oldestOutputFileName = buildInfoPath; - } - let newestInputFileName = void 0; - let newestInputFileTime = minimumDate; - let pseudoInputUpToDate = false; - const seenRoots = /* @__PURE__ */ new Set(); - for (const inputFile of project.fileNames) { - const inputTime = getModifiedTime2(state, inputFile); - if (inputTime === missingFileModifiedTime) { - return { - type: 0 /* Unbuildable */, - reason: `${inputFile} does not exist` - }; - } - if (buildInfoTime && buildInfoTime < inputTime) { - let version2; - let currentVersion; - if (buildInfoProgram) { - if (!buildInfoVersionMap) - buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host); - version2 = buildInfoVersionMap.fileInfos.get(toPath2(state, inputFile)); - const text = version2 ? state.readFileWithCache(inputFile) : void 0; - currentVersion = text !== void 0 ? getSourceFileVersionAsHashFromText(host, text) : void 0; - if (version2 && version2 === currentVersion) - pseudoInputUpToDate = true; - } - if (!version2 || version2 !== currentVersion) { - return { - type: 6 /* OutOfDateWithSelf */, - outOfDateOutputFileName: buildInfoPath, - newerInputFileName: inputFile - }; - } - } - if (inputTime > newestInputFileTime) { - newestInputFileName = inputFile; - newestInputFileTime = inputTime; - } - if (buildInfoProgram) - seenRoots.add(toPath2(state, inputFile)); - } - if (buildInfoProgram) { - if (!buildInfoVersionMap) - buildInfoVersionMap = getBuildInfoFileVersionMap(buildInfoProgram, buildInfoPath, host); - for (const existingRoot of buildInfoVersionMap.roots) { - if (!seenRoots.has(existingRoot)) { - return { - type: 10 /* OutOfDateRoots */, - buildInfoFile: buildInfoPath, - inputFile: existingRoot - }; - } - } - } - if (!buildInfoPath) { - const outputs = getAllProjectOutputs(project, !host.useCaseSensitiveFileNames()); - const outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath); - for (const output of outputs) { - const path = toPath2(state, output); - let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path); - if (!outputTime) { - outputTime = getModifiedTime(state.host, output); - outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(path, outputTime); - } - if (outputTime === missingFileModifiedTime) { - return { - type: 4 /* OutputMissing */, - missingOutputFileName: output - }; - } - if (outputTime < newestInputFileTime) { - return { - type: 6 /* OutOfDateWithSelf */, - outOfDateOutputFileName: output, - newerInputFileName: newestInputFileName - }; - } - if (outputTime < oldestOutputFileTime) { - oldestOutputFileTime = outputTime; - oldestOutputFileName = output; - } - } - } - const buildInfoCacheEntry = state.buildInfoCache.get(resolvedPath); - let pseudoUpToDate = false; - let usesPrepend = false; - let upstreamChangedProject; - if (referenceStatuses) { - for (const { ref, refStatus, resolvedConfig, resolvedRefPath } of referenceStatuses) { - usesPrepend = usesPrepend || !!ref.prepend; - if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) { - continue; - } - if (buildInfoCacheEntry && hasSameBuildInfo(state, buildInfoCacheEntry, resolvedRefPath)) { - return { - type: 7 /* OutOfDateWithUpstream */, - outOfDateOutputFileName: buildInfoPath, - newerProjectName: ref.path - }; - } - const newestDeclarationFileContentChangedTime = getLatestChangedDtsTime(state, resolvedConfig.options, resolvedRefPath); - if (newestDeclarationFileContentChangedTime && newestDeclarationFileContentChangedTime <= oldestOutputFileTime) { - pseudoUpToDate = true; - upstreamChangedProject = ref.path; - continue; - } - Debug.assert(oldestOutputFileName !== void 0, "Should have an oldest output filename here"); - return { - type: 7 /* OutOfDateWithUpstream */, - outOfDateOutputFileName: oldestOutputFileName, - newerProjectName: ref.path - }; - } - } - const configStatus = checkConfigFileUpToDateStatus(state, project.options.configFilePath, oldestOutputFileTime, oldestOutputFileName); - if (configStatus) - return configStatus; - const extendedConfigStatus = forEach(project.options.configFile.extendedSourceFiles || emptyArray, (configFile) => checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName)); - if (extendedConfigStatus) - return extendedConfigStatus; - const dependentPackageFileStatus = forEach( - state.lastCachedPackageJsonLookups.get(resolvedPath) || emptyArray, - ([path]) => checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName) - ); - if (dependentPackageFileStatus) - return dependentPackageFileStatus; - if (usesPrepend && pseudoUpToDate) { - return { - type: 3 /* OutOfDateWithPrepend */, - outOfDateOutputFileName: oldestOutputFileName, - newerProjectName: upstreamChangedProject - }; - } - return { - type: pseudoUpToDate ? 2 /* UpToDateWithUpstreamTypes */ : pseudoInputUpToDate ? 15 /* UpToDateWithInputFileText */ : 1 /* UpToDate */, - newestInputFileTime, - newestInputFileName, - oldestOutputFileName - }; - } - function hasSameBuildInfo(state, buildInfoCacheEntry, resolvedRefPath) { - const refBuildInfo = state.buildInfoCache.get(resolvedRefPath); - return refBuildInfo.path === buildInfoCacheEntry.path; - } - function getUpToDateStatus(state, project, resolvedPath) { - if (project === void 0) { - return { type: 0 /* Unbuildable */, reason: "File deleted mid-build" }; - } - const prior = state.projectStatus.get(resolvedPath); - if (prior !== void 0) { - return prior; - } - mark("SolutionBuilder::beforeUpToDateCheck"); - const actual = getUpToDateStatusWorker(state, project, resolvedPath); - mark("SolutionBuilder::afterUpToDateCheck"); - measure("SolutionBuilder::Up-to-date check", "SolutionBuilder::beforeUpToDateCheck", "SolutionBuilder::afterUpToDateCheck"); - state.projectStatus.set(resolvedPath, actual); - return actual; - } - function updateOutputTimestampsWorker(state, proj, projectPath, verboseMessage, skipOutputs) { - if (proj.options.noEmit) - return; - let now; - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(proj.options); - if (buildInfoPath) { - if (!(skipOutputs == null ? void 0 : skipOutputs.has(toPath2(state, buildInfoPath)))) { - if (!!state.options.verbose) - reportStatus(state, verboseMessage, proj.options.configFilePath); - state.host.setModifiedTime(buildInfoPath, now = getCurrentTime(state.host)); - getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now; - } - state.outputTimeStamps.delete(projectPath); - return; - } - const { host } = state; - const outputs = getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames()); - const outputTimeStampMap = getOutputTimeStampMap(state, projectPath); - const modifiedOutputs = outputTimeStampMap ? /* @__PURE__ */ new Set() : void 0; - if (!skipOutputs || outputs.length !== skipOutputs.size) { - let reportVerbose = !!state.options.verbose; - for (const file of outputs) { - const path = toPath2(state, file); - if (skipOutputs == null ? void 0 : skipOutputs.has(path)) - continue; - if (reportVerbose) { - reportVerbose = false; - reportStatus(state, verboseMessage, proj.options.configFilePath); - } - host.setModifiedTime(file, now || (now = getCurrentTime(state.host))); - if (outputTimeStampMap) { - outputTimeStampMap.set(path, now); - modifiedOutputs.add(path); - } - } - } - outputTimeStampMap == null ? void 0 : outputTimeStampMap.forEach((_value, key) => { - if (!(skipOutputs == null ? void 0 : skipOutputs.has(key)) && !modifiedOutputs.has(key)) - outputTimeStampMap.delete(key); - }); - } - function getLatestChangedDtsTime(state, options, resolvedConfigPath) { - if (!options.composite) - return void 0; - const entry = Debug.checkDefined(state.buildInfoCache.get(resolvedConfigPath)); - if (entry.latestChangedDtsTime !== void 0) - return entry.latestChangedDtsTime || void 0; - const latestChangedDtsTime = entry.buildInfo && entry.buildInfo.program && entry.buildInfo.program.latestChangedDtsFile ? state.host.getModifiedTime(getNormalizedAbsolutePath(entry.buildInfo.program.latestChangedDtsFile, getDirectoryPath(entry.path))) : void 0; - entry.latestChangedDtsTime = latestChangedDtsTime || false; - return latestChangedDtsTime; - } - function updateOutputTimestamps(state, proj, resolvedPath) { - if (state.options.dry) { - return reportStatus(state, Diagnostics.A_non_dry_build_would_update_timestamps_for_output_of_project_0, proj.options.configFilePath); - } - updateOutputTimestampsWorker(state, proj, resolvedPath, Diagnostics.Updating_output_timestamps_of_project_0); - state.projectStatus.set(resolvedPath, { - type: 1 /* UpToDate */, - oldestOutputFileName: getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames()) - }); - } - function queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, buildResult) { - if (buildResult & 124 /* AnyErrors */) - return; - if (!config.options.composite) - return; - for (let index = projectIndex + 1; index < buildOrder.length; index++) { - const nextProject = buildOrder[index]; - const nextProjectPath = toResolvedConfigFilePath(state, nextProject); - if (state.projectPendingBuild.has(nextProjectPath)) - continue; - const nextProjectConfig = parseConfigFile(state, nextProject, nextProjectPath); - if (!nextProjectConfig || !nextProjectConfig.projectReferences) - continue; - for (const ref of nextProjectConfig.projectReferences) { - const resolvedRefPath = resolveProjectName(state, ref.path); - if (toResolvedConfigFilePath(state, resolvedRefPath) !== projectPath) - continue; - const status = state.projectStatus.get(nextProjectPath); - if (status) { - switch (status.type) { - case 1 /* UpToDate */: - if (buildResult & 2 /* DeclarationOutputUnchanged */) { - if (ref.prepend) { - state.projectStatus.set(nextProjectPath, { - type: 3 /* OutOfDateWithPrepend */, - outOfDateOutputFileName: status.oldestOutputFileName, - newerProjectName: project - }); - } else { - status.type = 2 /* UpToDateWithUpstreamTypes */; - } - break; - } - case 15 /* UpToDateWithInputFileText */: - case 2 /* UpToDateWithUpstreamTypes */: - case 3 /* OutOfDateWithPrepend */: - if (!(buildResult & 2 /* DeclarationOutputUnchanged */)) { - state.projectStatus.set(nextProjectPath, { - type: 7 /* OutOfDateWithUpstream */, - outOfDateOutputFileName: status.type === 3 /* OutOfDateWithPrepend */ ? status.outOfDateOutputFileName : status.oldestOutputFileName, - newerProjectName: project - }); - } - break; - case 12 /* UpstreamBlocked */: - if (toResolvedConfigFilePath(state, resolveProjectName(state, status.upstreamProjectName)) === projectPath) { - clearProjectStatus(state, nextProjectPath); - } - break; - } - } - addProjToQueue(state, nextProjectPath, 0 /* None */); - break; - } - } - } - function build(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) { - mark("SolutionBuilder::beforeBuild"); - const result = buildWorker(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences); - mark("SolutionBuilder::afterBuild"); - measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild"); - return result; - } - function buildWorker(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) { - const buildOrder = getBuildOrderFor(state, project, onlyReferences); - if (!buildOrder) - return 3 /* InvalidProject_OutputsSkipped */; - setupInitialBuild(state, cancellationToken); - let reportQueue = true; - let successfulProjects = 0; - while (true) { - const invalidatedProject = getNextInvalidatedProject(state, buildOrder, reportQueue); - if (!invalidatedProject) - break; - reportQueue = false; - invalidatedProject.done(cancellationToken, writeFile2, getCustomTransformers == null ? void 0 : getCustomTransformers(invalidatedProject.project)); - if (!state.diagnostics.has(invalidatedProject.projectPath)) - successfulProjects++; - } - disableCache(state); - reportErrorSummary(state, buildOrder); - startWatching(state, buildOrder); - return isCircularBuildOrder(buildOrder) ? 4 /* ProjectReferenceCycle_OutputsSkipped */ : !buildOrder.some((p) => state.diagnostics.has(toResolvedConfigFilePath(state, p))) ? 0 /* Success */ : successfulProjects ? 2 /* DiagnosticsPresent_OutputsGenerated */ : 1 /* DiagnosticsPresent_OutputsSkipped */; - } - function clean(state, project, onlyReferences) { - mark("SolutionBuilder::beforeClean"); - const result = cleanWorker(state, project, onlyReferences); - mark("SolutionBuilder::afterClean"); - measure("SolutionBuilder::Clean", "SolutionBuilder::beforeClean", "SolutionBuilder::afterClean"); - return result; - } - function cleanWorker(state, project, onlyReferences) { - const buildOrder = getBuildOrderFor(state, project, onlyReferences); - if (!buildOrder) - return 3 /* InvalidProject_OutputsSkipped */; - if (isCircularBuildOrder(buildOrder)) { - reportErrors(state, buildOrder.circularDiagnostics); - return 4 /* ProjectReferenceCycle_OutputsSkipped */; - } - const { options, host } = state; - const filesToDelete = options.dry ? [] : void 0; - for (const proj of buildOrder) { - const resolvedPath = toResolvedConfigFilePath(state, proj); - const parsed = parseConfigFile(state, proj, resolvedPath); - if (parsed === void 0) { - reportParseConfigFileDiagnostic(state, resolvedPath); - continue; - } - const outputs = getAllProjectOutputs(parsed, !host.useCaseSensitiveFileNames()); - if (!outputs.length) - continue; - const inputFileNames = new Set(parsed.fileNames.map((f) => toPath2(state, f))); - for (const output of outputs) { - if (inputFileNames.has(toPath2(state, output))) - continue; - if (host.fileExists(output)) { - if (filesToDelete) { - filesToDelete.push(output); - } else { - host.deleteFile(output); - invalidateProject(state, resolvedPath, 0 /* None */); - } - } - } - } - if (filesToDelete) { - reportStatus(state, Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map((f) => `\r - * ${f}`).join("")); - } - return 0 /* Success */; - } - function invalidateProject(state, resolved, reloadLevel) { - if (state.host.getParsedCommandLine && reloadLevel === 1 /* Partial */) { - reloadLevel = 2 /* Full */; - } - if (reloadLevel === 2 /* Full */) { - state.configFileCache.delete(resolved); - state.buildOrder = void 0; - } - state.needsSummary = true; - clearProjectStatus(state, resolved); - addProjToQueue(state, resolved, reloadLevel); - enableCache(state); - } - function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) { - state.reportFileChangeDetected = true; - invalidateProject(state, resolvedPath, reloadLevel); - scheduleBuildInvalidatedProject( - state, - 250, - /*changeDetected*/ - true - ); - } - function scheduleBuildInvalidatedProject(state, time, changeDetected) { - const { hostWithWatch } = state; - if (!hostWithWatch.setTimeout || !hostWithWatch.clearTimeout) { - return; - } - if (state.timerToBuildInvalidatedProject) { - hostWithWatch.clearTimeout(state.timerToBuildInvalidatedProject); - } - state.timerToBuildInvalidatedProject = hostWithWatch.setTimeout(buildNextInvalidatedProject, time, "timerToBuildInvalidatedProject", state, changeDetected); - } - function buildNextInvalidatedProject(_timeoutType, state, changeDetected) { - mark("SolutionBuilder::beforeBuild"); - const buildOrder = buildNextInvalidatedProjectWorker(state, changeDetected); - mark("SolutionBuilder::afterBuild"); - measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild"); - if (buildOrder) - reportErrorSummary(state, buildOrder); - } - function buildNextInvalidatedProjectWorker(state, changeDetected) { - state.timerToBuildInvalidatedProject = void 0; - if (state.reportFileChangeDetected) { - state.reportFileChangeDetected = false; - state.projectErrorsReported.clear(); - reportWatchStatus(state, Diagnostics.File_change_detected_Starting_incremental_compilation); - } - let projectsBuilt = 0; - const buildOrder = getBuildOrder(state); - const invalidatedProject = getNextInvalidatedProject( - state, - buildOrder, - /*reportQueue*/ - false - ); - if (invalidatedProject) { - invalidatedProject.done(); - projectsBuilt++; - while (state.projectPendingBuild.size) { - if (state.timerToBuildInvalidatedProject) - return; - const info = getNextInvalidatedProjectCreateInfo( - state, - buildOrder, - /*reportQueue*/ - false - ); - if (!info) - break; - if (info.kind !== 2 /* UpdateOutputFileStamps */ && (changeDetected || projectsBuilt === 5)) { - scheduleBuildInvalidatedProject( - state, - 100, - /*changeDetected*/ - false - ); - return; - } - const project = createInvalidatedProjectWithInfo(state, info, buildOrder); - project.done(); - if (info.kind !== 2 /* UpdateOutputFileStamps */) - projectsBuilt++; - } - } - disableCache(state); - return buildOrder; - } - function watchConfigFile(state, resolved, resolvedPath, parsed) { - if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath)) - return; - state.allWatchedConfigFiles.set(resolvedPath, watchFile( - state, - resolved, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 2 /* Full */), - 2e3 /* High */, - parsed == null ? void 0 : parsed.watchOptions, - WatchType.ConfigFile, - resolved - )); - } - function watchExtendedConfigFiles(state, resolvedPath, parsed) { - updateSharedExtendedConfigFileWatcher( - resolvedPath, - parsed == null ? void 0 : parsed.options, - state.allWatchedExtendedConfigFiles, - (extendedConfigFileName, extendedConfigFilePath) => watchFile( - state, - extendedConfigFileName, - () => { - var _a; - return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) == null ? void 0 : _a.projects.forEach((projectConfigFilePath) => invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, 2 /* Full */)); - }, - 2e3 /* High */, - parsed == null ? void 0 : parsed.watchOptions, - WatchType.ExtendedConfigFile - ), - (fileName) => toPath2(state, fileName) - ); - } - function watchWildCardDirectories(state, resolved, resolvedPath, parsed) { - if (!state.watch) - return; - updateWatchingWildcardDirectories( - getOrCreateValueMapFromConfigFileMap(state.allWatchedWildcardDirectories, resolvedPath), - new Map(Object.entries(parsed.wildcardDirectories)), - (dir, flags) => state.watchDirectory( - dir, - (fileOrDirectory) => { - var _a; - if (isIgnoredFileFromWildCardWatching({ - watchedDirPath: toPath2(state, dir), - fileOrDirectory, - fileOrDirectoryPath: toPath2(state, fileOrDirectory), - configFileName: resolved, - currentDirectory: state.compilerHost.getCurrentDirectory(), - options: parsed.options, - program: state.builderPrograms.get(resolvedPath) || ((_a = getCachedParsedConfigFile(state, resolvedPath)) == null ? void 0 : _a.fileNames), - useCaseSensitiveFileNames: state.parseConfigFileHost.useCaseSensitiveFileNames, - writeLog: (s) => state.writeLog(s), - toPath: (fileName) => toPath2(state, fileName) - })) - return; - invalidateProjectAndScheduleBuilds(state, resolvedPath, 1 /* Partial */); - }, - flags, - parsed == null ? void 0 : parsed.watchOptions, - WatchType.WildcardDirectory, - resolved - ) - ); - } - function watchInputFiles(state, resolved, resolvedPath, parsed) { - if (!state.watch) - return; - mutateMap( - getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), - arrayToMap(parsed.fileNames, (fileName) => toPath2(state, fileName)), - { - createNewValue: (_path, input) => watchFile( - state, - input, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* None */), - 250 /* Low */, - parsed == null ? void 0 : parsed.watchOptions, - WatchType.SourceFile, - resolved - ), - onDeleteValue: closeFileWatcher - } - ); - } - function watchPackageJsonFiles(state, resolved, resolvedPath, parsed) { - if (!state.watch || !state.lastCachedPackageJsonLookups) - return; - mutateMap( - getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), - new Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), - { - createNewValue: (path, _input) => watchFile( - state, - path, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* None */), - 2e3 /* High */, - parsed == null ? void 0 : parsed.watchOptions, - WatchType.PackageJson, - resolved - ), - onDeleteValue: closeFileWatcher - } - ); - } - function startWatching(state, buildOrder) { - if (!state.watchAllProjectsPending) - return; - mark("SolutionBuilder::beforeWatcherCreation"); - state.watchAllProjectsPending = false; - for (const resolved of getBuildOrderFromAnyBuildOrder(buildOrder)) { - const resolvedPath = toResolvedConfigFilePath(state, resolved); - const cfg = parseConfigFile(state, resolved, resolvedPath); - watchConfigFile(state, resolved, resolvedPath, cfg); - watchExtendedConfigFiles(state, resolvedPath, cfg); - if (cfg) { - watchWildCardDirectories(state, resolved, resolvedPath, cfg); - watchInputFiles(state, resolved, resolvedPath, cfg); - watchPackageJsonFiles(state, resolved, resolvedPath, cfg); - } - } - mark("SolutionBuilder::afterWatcherCreation"); - measure("SolutionBuilder::Watcher creation", "SolutionBuilder::beforeWatcherCreation", "SolutionBuilder::afterWatcherCreation"); - } - function stopWatching(state) { - clearMap(state.allWatchedConfigFiles, closeFileWatcher); - clearMap(state.allWatchedExtendedConfigFiles, closeFileWatcherOf); - clearMap(state.allWatchedWildcardDirectories, (watchedWildcardDirectories) => clearMap(watchedWildcardDirectories, closeFileWatcherOf)); - clearMap(state.allWatchedInputFiles, (watchedWildcardDirectories) => clearMap(watchedWildcardDirectories, closeFileWatcher)); - clearMap(state.allWatchedPackageJsonFiles, (watchedPacageJsonFiles) => clearMap(watchedPacageJsonFiles, closeFileWatcher)); - } - function createSolutionBuilderWorker(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions) { - const state = createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions); - return { - build: (project, cancellationToken, writeFile2, getCustomTransformers) => build(state, project, cancellationToken, writeFile2, getCustomTransformers), - clean: (project) => clean(state, project), - buildReferences: (project, cancellationToken, writeFile2, getCustomTransformers) => build( - state, - project, - cancellationToken, - writeFile2, - getCustomTransformers, - /*onlyReferences*/ - true - ), - cleanReferences: (project) => clean( - state, - project, - /*onlyReferences*/ - true - ), - getNextInvalidatedProject: (cancellationToken) => { - setupInitialBuild(state, cancellationToken); - return getNextInvalidatedProject( - state, - getBuildOrder(state), - /*reportQueue*/ - false - ); - }, - getBuildOrder: () => getBuildOrder(state), - getUpToDateStatusOfProject: (project) => { - const configFileName = resolveProjectName(state, project); - const configFilePath = toResolvedConfigFilePath(state, configFileName); - return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath); - }, - invalidateProject: (configFilePath, reloadLevel) => invalidateProject(state, configFilePath, reloadLevel || 0 /* None */), - close: () => stopWatching(state) - }; - } - function relName(state, path) { - return convertToRelativePath(path, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName); - } - function reportStatus(state, message, ...args) { - state.host.reportSolutionBuilderStatus(createCompilerDiagnostic(message, ...args)); - } - function reportWatchStatus(state, message, ...args) { - var _a, _b; - (_b = (_a = state.hostWithWatch).onWatchStatusChange) == null ? void 0 : _b.call(_a, createCompilerDiagnostic(message, ...args), state.host.getNewLine(), state.baseCompilerOptions); - } - function reportErrors({ host }, errors) { - errors.forEach((err) => host.reportDiagnostic(err)); - } - function reportAndStoreErrors(state, proj, errors) { - reportErrors(state, errors); - state.projectErrorsReported.set(proj, true); - if (errors.length) { - state.diagnostics.set(proj, errors); - } - } - function reportParseConfigFileDiagnostic(state, proj) { - reportAndStoreErrors(state, proj, [state.configFileCache.get(proj)]); - } - function reportErrorSummary(state, buildOrder) { - if (!state.needsSummary) - return; - state.needsSummary = false; - const canReportSummary = state.watch || !!state.host.reportErrorSummary; - const { diagnostics } = state; - let totalErrors = 0; - let filesInError = []; - if (isCircularBuildOrder(buildOrder)) { - reportBuildQueue(state, buildOrder.buildOrder); - reportErrors(state, buildOrder.circularDiagnostics); - if (canReportSummary) - totalErrors += getErrorCountForSummary(buildOrder.circularDiagnostics); - if (canReportSummary) - filesInError = [...filesInError, ...getFilesInErrorForSummary(buildOrder.circularDiagnostics)]; - } else { - buildOrder.forEach((project) => { - const projectPath = toResolvedConfigFilePath(state, project); - if (!state.projectErrorsReported.has(projectPath)) { - reportErrors(state, diagnostics.get(projectPath) || emptyArray); - } - }); - if (canReportSummary) - diagnostics.forEach((singleProjectErrors) => totalErrors += getErrorCountForSummary(singleProjectErrors)); - if (canReportSummary) - diagnostics.forEach((singleProjectErrors) => [...filesInError, ...getFilesInErrorForSummary(singleProjectErrors)]); - } - if (state.watch) { - reportWatchStatus(state, getWatchErrorSummaryDiagnosticMessage(totalErrors), totalErrors); - } else if (state.host.reportErrorSummary) { - state.host.reportErrorSummary(totalErrors, filesInError); - } - } - function reportBuildQueue(state, buildQueue) { - if (state.options.verbose) { - reportStatus(state, Diagnostics.Projects_in_this_build_Colon_0, buildQueue.map((s) => "\r\n * " + relName(state, s)).join("")); - } - } - function reportUpToDateStatus(state, configFileName, status) { - switch (status.type) { - case 6 /* OutOfDateWithSelf */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, - relName(state, configFileName), - relName(state, status.outOfDateOutputFileName), - relName(state, status.newerInputFileName) - ); - case 7 /* OutOfDateWithUpstream */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_output_1_is_older_than_input_2, - relName(state, configFileName), - relName(state, status.outOfDateOutputFileName), - relName(state, status.newerProjectName) - ); - case 4 /* OutputMissing */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_output_file_1_does_not_exist, - relName(state, configFileName), - relName(state, status.missingOutputFileName) - ); - case 5 /* ErrorReadingFile */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_there_was_error_reading_file_1, - relName(state, configFileName), - relName(state, status.fileName) - ); - case 8 /* OutOfDateBuildInfo */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted, - relName(state, configFileName), - relName(state, status.buildInfoFile) - ); - case 9 /* OutOfDateOptions */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions, - relName(state, configFileName), - relName(state, status.buildInfoFile) - ); - case 10 /* OutOfDateRoots */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_file_2_was_root_file_of_compilation_but_not_any_more, - relName(state, configFileName), - relName(state, status.buildInfoFile), - relName(state, status.inputFile) - ); - case 1 /* UpToDate */: - if (status.newestInputFileTime !== void 0) { - return reportStatus( - state, - Diagnostics.Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2, - relName(state, configFileName), - relName(state, status.newestInputFileName || ""), - relName(state, status.oldestOutputFileName || "") - ); - } - break; - case 3 /* OutOfDateWithPrepend */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed, - relName(state, configFileName), - relName(state, status.newerProjectName) - ); - case 2 /* UpToDateWithUpstreamTypes */: - return reportStatus( - state, - Diagnostics.Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies, - relName(state, configFileName) - ); - case 15 /* UpToDateWithInputFileText */: - return reportStatus( - state, - Diagnostics.Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files, - relName(state, configFileName) - ); - case 11 /* UpstreamOutOfDate */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date, - relName(state, configFileName), - relName(state, status.upstreamProjectName) - ); - case 12 /* UpstreamBlocked */: - return reportStatus( - state, - status.upstreamProjectBlocked ? Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_was_not_built : Diagnostics.Project_0_can_t_be_built_because_its_dependency_1_has_errors, - relName(state, configFileName), - relName(state, status.upstreamProjectName) - ); - case 0 /* Unbuildable */: - return reportStatus( - state, - Diagnostics.Failed_to_parse_file_0_Colon_1, - relName(state, configFileName), - status.reason - ); - case 14 /* TsVersionOutputOfDate */: - return reportStatus( - state, - Diagnostics.Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2, - relName(state, configFileName), - status.version, - version - ); - case 17 /* ForceBuild */: - return reportStatus( - state, - Diagnostics.Project_0_is_being_forcibly_rebuilt, - relName(state, configFileName) - ); - case 16 /* ContainerOnly */: - case 13 /* ComputingUpstream */: - break; - default: - assertType(status); - } - } - function verboseReportProjectStatus(state, configFileName, status) { - if (state.options.verbose) { - reportUpToDateStatus(state, configFileName, status); - } - } - var minimumDate, maximumDate, InvalidatedProjectKind; - var init_tsbuildPublic = __esm({ - "src/compiler/tsbuildPublic.ts"() { - "use strict"; - init_ts2(); - init_ts_performance(); - minimumDate = /* @__PURE__ */ new Date(-864e13); - maximumDate = /* @__PURE__ */ new Date(864e13); - InvalidatedProjectKind = /* @__PURE__ */ ((InvalidatedProjectKind2) => { - InvalidatedProjectKind2[InvalidatedProjectKind2["Build"] = 0] = "Build"; - InvalidatedProjectKind2[InvalidatedProjectKind2["UpdateBundle"] = 1] = "UpdateBundle"; - InvalidatedProjectKind2[InvalidatedProjectKind2["UpdateOutputFileStamps"] = 2] = "UpdateOutputFileStamps"; - return InvalidatedProjectKind2; - })(InvalidatedProjectKind || {}); - } - }); - - // src/compiler/_namespaces/ts.ts - var init_ts2 = __esm({ - "src/compiler/_namespaces/ts.ts"() { - "use strict"; - init_corePublic(); - init_core(); - init_debug(); - init_semver(); - init_performanceCore(); - init_perfLogger(); - init_tracing(); - init_types(); - init_sys(); - init_path(); - init_diagnosticInformationMap_generated(); - init_scanner(); - init_utilitiesPublic(); - init_utilities(); - init_baseNodeFactory(); - init_parenthesizerRules(); - init_nodeConverters(); - init_nodeFactory(); - init_emitNode(); - init_emitHelpers(); - init_nodeTests(); - init_utilities2(); - init_utilitiesPublic2(); - init_parser(); - init_commandLineParser(); - init_moduleNameResolver(); - init_binder(); - init_symbolWalker(); - init_checker(); - init_visitorPublic(); - init_sourcemap(); - init_utilities3(); - init_destructuring(); - init_classThis(); - init_namedEvaluation(); - init_taggedTemplate(); - init_ts(); - init_classFields(); - init_typeSerializer(); - init_legacyDecorators(); - init_esDecorators(); - init_es2017(); - init_es2018(); - init_es2019(); - init_es2020(); - init_es2021(); - init_esnext(); - init_jsx(); - init_es2016(); - init_es2015(); - init_es5(); - init_generators(); - init_module(); - init_system(); - init_esnextAnd2015(); - init_node(); - init_diagnostics(); - init_declarations(); - init_transformer(); - init_emitter(); - init_watchUtilities(); - init_program(); - init_builderStatePublic(); - init_builderState(); - init_builder(); - init_builderPublic(); - init_resolutionCache(); - init_watch(); - init_watchPublic(); - init_tsbuild(); - init_tsbuildPublic(); - init_ts_moduleSpecifiers(); - init_ts_performance(); - } - }); - - // src/jsTyping/jsTyping.ts - function isTypingUpToDate(cachedTyping, availableTypingVersions) { - const availableVersion = new Version(getProperty(availableTypingVersions, `ts${versionMajorMinor}`) || getProperty(availableTypingVersions, "latest")); - return availableVersion.compareTo(cachedTyping.version) <= 0; - } - function nonRelativeModuleNameForTypingCache(moduleName) { - return nodeCoreModules.has(moduleName) ? "node" : moduleName; - } - function loadSafeList(host, safeListPath) { - const result = readConfigFile(safeListPath, (path) => host.readFile(path)); - return new Map(Object.entries(result.config)); - } - function loadTypesMap(host, typesMapPath) { - var _a; - const result = readConfigFile(typesMapPath, (path) => host.readFile(path)); - if ((_a = result.config) == null ? void 0 : _a.simpleMap) { - return new Map(Object.entries(result.config.simpleMap)); - } - return void 0; - } - function discoverTypings(host, log, fileNames, projectRootPath, safeList, packageNameToTypingLocation, typeAcquisition, unresolvedImports, typesRegistry, compilerOptions) { - if (!typeAcquisition || !typeAcquisition.enable) { - return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] }; - } - const inferredTypings = /* @__PURE__ */ new Map(); - fileNames = mapDefined(fileNames, (fileName) => { - const path = normalizePath(fileName); - if (hasJSFileExtension(path)) { - return path; - } - }); - const filesToWatch = []; - if (typeAcquisition.include) - addInferredTypings(typeAcquisition.include, "Explicitly included types"); - const exclude = typeAcquisition.exclude || []; - if (!compilerOptions.types) { - const possibleSearchDirs = new Set(fileNames.map(getDirectoryPath)); - possibleSearchDirs.add(projectRootPath); - possibleSearchDirs.forEach((searchDir) => { - getTypingNames(searchDir, "bower.json", "bower_components", filesToWatch); - getTypingNames(searchDir, "package.json", "node_modules", filesToWatch); - }); - } - if (!typeAcquisition.disableFilenameBasedTypeAcquisition) { - getTypingNamesFromSourceFileNames(fileNames); - } - if (unresolvedImports) { - const module2 = deduplicate( - unresolvedImports.map(nonRelativeModuleNameForTypingCache), - equateStringsCaseSensitive, - compareStringsCaseSensitive - ); - addInferredTypings(module2, "Inferred typings from unresolved imports"); - } - packageNameToTypingLocation.forEach((typing, name) => { - const registryEntry = typesRegistry.get(name); - if (inferredTypings.has(name) && inferredTypings.get(name) === void 0 && registryEntry !== void 0 && isTypingUpToDate(typing, registryEntry)) { - inferredTypings.set(name, typing.typingLocation); - } - }); - for (const excludeTypingName of exclude) { - const didDelete = inferredTypings.delete(excludeTypingName); - if (didDelete && log) - log(`Typing for ${excludeTypingName} is in exclude list, will be ignored.`); - } - const newTypingNames = []; - const cachedTypingPaths = []; - inferredTypings.forEach((inferred, typing) => { - if (inferred !== void 0) { - cachedTypingPaths.push(inferred); - } else { - newTypingNames.push(typing); - } - }); - const result = { cachedTypingPaths, newTypingNames, filesToWatch }; - if (log) - log(`Result: ${JSON.stringify(result)}`); - return result; - function addInferredTyping(typingName) { - if (!inferredTypings.has(typingName)) { - inferredTypings.set(typingName, void 0); - } - } - function addInferredTypings(typingNames, message) { - if (log) - log(`${message}: ${JSON.stringify(typingNames)}`); - forEach(typingNames, addInferredTyping); - } - function getTypingNames(projectRootPath2, manifestName, modulesDirName, filesToWatch2) { - const manifestPath = combinePaths(projectRootPath2, manifestName); - let manifest; - let manifestTypingNames; - if (host.fileExists(manifestPath)) { - filesToWatch2.push(manifestPath); - manifest = readConfigFile(manifestPath, (path) => host.readFile(path)).config; - manifestTypingNames = flatMap([manifest.dependencies, manifest.devDependencies, manifest.optionalDependencies, manifest.peerDependencies], getOwnKeys); - addInferredTypings(manifestTypingNames, `Typing names in '${manifestPath}' dependencies`); - } - const packagesFolderPath = combinePaths(projectRootPath2, modulesDirName); - filesToWatch2.push(packagesFolderPath); - if (!host.directoryExists(packagesFolderPath)) { - return; - } - const packageNames = []; - const dependencyManifestNames = manifestTypingNames ? manifestTypingNames.map((typingName) => combinePaths(packagesFolderPath, typingName, manifestName)) : host.readDirectory( - packagesFolderPath, - [".json" /* Json */], - /*excludes*/ - void 0, - /*includes*/ - void 0, - /*depth*/ - 3 - ).filter((manifestPath2) => { - if (getBaseFileName(manifestPath2) !== manifestName) { - return false; - } - const pathComponents2 = getPathComponents(normalizePath(manifestPath2)); - const isScoped = pathComponents2[pathComponents2.length - 3][0] === "@"; - return isScoped && toFileNameLowerCase(pathComponents2[pathComponents2.length - 4]) === modulesDirName || // `node_modules/@foo/bar` - !isScoped && toFileNameLowerCase(pathComponents2[pathComponents2.length - 3]) === modulesDirName; - }); - if (log) - log(`Searching for typing names in ${packagesFolderPath}; all files: ${JSON.stringify(dependencyManifestNames)}`); - for (const manifestPath2 of dependencyManifestNames) { - const normalizedFileName = normalizePath(manifestPath2); - const result2 = readConfigFile(normalizedFileName, (path) => host.readFile(path)); - const manifest2 = result2.config; - if (!manifest2.name) { - continue; - } - const ownTypes = manifest2.types || manifest2.typings; - if (ownTypes) { - const absolutePath = getNormalizedAbsolutePath(ownTypes, getDirectoryPath(normalizedFileName)); - if (host.fileExists(absolutePath)) { - if (log) - log(` Package '${manifest2.name}' provides its own types.`); - inferredTypings.set(manifest2.name, absolutePath); - } else { - if (log) - log(` Package '${manifest2.name}' provides its own types but they are missing.`); - } - } else { - packageNames.push(manifest2.name); - } - } - addInferredTypings(packageNames, " Found package names"); - } - function getTypingNamesFromSourceFileNames(fileNames2) { - const fromFileNames = mapDefined(fileNames2, (j) => { - if (!hasJSFileExtension(j)) - return void 0; - const inferredTypingName = removeFileExtension(toFileNameLowerCase(getBaseFileName(j))); - const cleanedTypingName = removeMinAndVersionNumbers(inferredTypingName); - return safeList.get(cleanedTypingName); - }); - if (fromFileNames.length) { - addInferredTypings(fromFileNames, "Inferred typings from file names"); - } - const hasJsxFile = some(fileNames2, (f) => fileExtensionIs(f, ".jsx" /* Jsx */)); - if (hasJsxFile) { - if (log) - log(`Inferred 'react' typings due to presence of '.jsx' extension`); - addInferredTyping("react"); - } - } - } - function validatePackageName(packageName) { - return validatePackageNameWorker( - packageName, - /*supportScopedPackage*/ - true - ); - } - function validatePackageNameWorker(packageName, supportScopedPackage) { - if (!packageName) { - return 1 /* EmptyName */; - } - if (packageName.length > maxPackageNameLength) { - return 2 /* NameTooLong */; - } - if (packageName.charCodeAt(0) === 46 /* dot */) { - return 3 /* NameStartsWithDot */; - } - if (packageName.charCodeAt(0) === 95 /* _ */) { - return 4 /* NameStartsWithUnderscore */; - } - if (supportScopedPackage) { - const matches = /^@([^/]+)\/([^/]+)$/.exec(packageName); - if (matches) { - const scopeResult = validatePackageNameWorker( - matches[1], - /*supportScopedPackage*/ - false - ); - if (scopeResult !== 0 /* Ok */) { - return { name: matches[1], isScopeName: true, result: scopeResult }; - } - const packageResult = validatePackageNameWorker( - matches[2], - /*supportScopedPackage*/ - false - ); - if (packageResult !== 0 /* Ok */) { - return { name: matches[2], isScopeName: false, result: packageResult }; - } - return 0 /* Ok */; - } - } - if (encodeURIComponent(packageName) !== packageName) { - return 5 /* NameContainsNonURISafeCharacters */; - } - return 0 /* Ok */; - } - function renderPackageNameValidationFailure(result, typing) { - return typeof result === "object" ? renderPackageNameValidationFailureWorker(typing, result.result, result.name, result.isScopeName) : renderPackageNameValidationFailureWorker( - typing, - result, - typing, - /*isScopeName*/ - false - ); - } - function renderPackageNameValidationFailureWorker(typing, result, name, isScopeName) { - const kind = isScopeName ? "Scope" : "Package"; - switch (result) { - case 1 /* EmptyName */: - return `'${typing}':: ${kind} name '${name}' cannot be empty`; - case 2 /* NameTooLong */: - return `'${typing}':: ${kind} name '${name}' should be less than ${maxPackageNameLength} characters`; - case 3 /* NameStartsWithDot */: - return `'${typing}':: ${kind} name '${name}' cannot start with '.'`; - case 4 /* NameStartsWithUnderscore */: - return `'${typing}':: ${kind} name '${name}' cannot start with '_'`; - case 5 /* NameContainsNonURISafeCharacters */: - return `'${typing}':: ${kind} name '${name}' contains non URI safe characters`; - case 0 /* Ok */: - return Debug.fail(); - default: - Debug.assertNever(result); - } - } - var unprefixedNodeCoreModuleList, prefixedNodeCoreModuleList, nodeCoreModuleList, nodeCoreModules, NameValidationResult, maxPackageNameLength; - var init_jsTyping = __esm({ - "src/jsTyping/jsTyping.ts"() { - "use strict"; - init_ts3(); - unprefixedNodeCoreModuleList = [ - "assert", - "assert/strict", - "async_hooks", - "buffer", - "child_process", - "cluster", - "console", - "constants", - "crypto", - "dgram", - "diagnostics_channel", - "dns", - "dns/promises", - "domain", - "events", - "fs", - "fs/promises", - "http", - "https", - "http2", - "inspector", - "module", - "net", - "os", - "path", - "perf_hooks", - "process", - "punycode", - "querystring", - "readline", - "repl", - "stream", - "stream/promises", - "string_decoder", - "timers", - "timers/promises", - "tls", - "trace_events", - "tty", - "url", - "util", - "util/types", - "v8", - "vm", - "wasi", - "worker_threads", - "zlib" - ]; - prefixedNodeCoreModuleList = unprefixedNodeCoreModuleList.map((name) => `node:${name}`); - nodeCoreModuleList = [...unprefixedNodeCoreModuleList, ...prefixedNodeCoreModuleList]; - nodeCoreModules = new Set(nodeCoreModuleList); - NameValidationResult = /* @__PURE__ */ ((NameValidationResult2) => { - NameValidationResult2[NameValidationResult2["Ok"] = 0] = "Ok"; - NameValidationResult2[NameValidationResult2["EmptyName"] = 1] = "EmptyName"; - NameValidationResult2[NameValidationResult2["NameTooLong"] = 2] = "NameTooLong"; - NameValidationResult2[NameValidationResult2["NameStartsWithDot"] = 3] = "NameStartsWithDot"; - NameValidationResult2[NameValidationResult2["NameStartsWithUnderscore"] = 4] = "NameStartsWithUnderscore"; - NameValidationResult2[NameValidationResult2["NameContainsNonURISafeCharacters"] = 5] = "NameContainsNonURISafeCharacters"; - return NameValidationResult2; - })(NameValidationResult || {}); - maxPackageNameLength = 214; - } - }); - - // src/jsTyping/_namespaces/ts.JsTyping.ts - var ts_JsTyping_exports = {}; - __export(ts_JsTyping_exports, { - NameValidationResult: () => NameValidationResult, - discoverTypings: () => discoverTypings, - isTypingUpToDate: () => isTypingUpToDate, - loadSafeList: () => loadSafeList, - loadTypesMap: () => loadTypesMap, - nodeCoreModuleList: () => nodeCoreModuleList, - nodeCoreModules: () => nodeCoreModules, - nonRelativeModuleNameForTypingCache: () => nonRelativeModuleNameForTypingCache, - prefixedNodeCoreModuleList: () => prefixedNodeCoreModuleList, - renderPackageNameValidationFailure: () => renderPackageNameValidationFailure, - validatePackageName: () => validatePackageName - }); - var init_ts_JsTyping = __esm({ - "src/jsTyping/_namespaces/ts.JsTyping.ts"() { - "use strict"; - init_jsTyping(); - } - }); - - // src/jsTyping/shared.ts - function hasArgument(argumentName) { - return sys.args.indexOf(argumentName) >= 0; - } - function findArgument(argumentName) { - const index = sys.args.indexOf(argumentName); - return index >= 0 && index < sys.args.length - 1 ? sys.args[index + 1] : void 0; - } - function nowString() { - const d = /* @__PURE__ */ new Date(); - return `${padLeft(d.getHours().toString(), 2, "0")}:${padLeft(d.getMinutes().toString(), 2, "0")}:${padLeft(d.getSeconds().toString(), 2, "0")}.${padLeft(d.getMilliseconds().toString(), 3, "0")}`; - } - var ActionSet, ActionInvalidate, ActionPackageInstalled, EventTypesRegistry, EventBeginInstallTypes, EventEndInstallTypes, EventInitializationFailed, ActionWatchTypingLocations, Arguments; - var init_shared = __esm({ - "src/jsTyping/shared.ts"() { - "use strict"; - init_ts3(); - ActionSet = "action::set"; - ActionInvalidate = "action::invalidate"; - ActionPackageInstalled = "action::packageInstalled"; - EventTypesRegistry = "event::typesRegistry"; - EventBeginInstallTypes = "event::beginInstallTypes"; - EventEndInstallTypes = "event::endInstallTypes"; - EventInitializationFailed = "event::initializationFailed"; - ActionWatchTypingLocations = "action::watchTypingLocations"; - ((Arguments2) => { - Arguments2.GlobalCacheLocation = "--globalTypingsCacheLocation"; - Arguments2.LogFile = "--logFile"; - Arguments2.EnableTelemetry = "--enableTelemetry"; - Arguments2.TypingSafeListLocation = "--typingSafeListLocation"; - Arguments2.TypesMapLocation = "--typesMapLocation"; - Arguments2.NpmLocation = "--npmLocation"; - Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation"; - })(Arguments || (Arguments = {})); - } - }); - - // src/jsTyping/types.ts - var init_types2 = __esm({ - "src/jsTyping/types.ts"() { - "use strict"; - } - }); - - // src/jsTyping/_namespaces/ts.server.ts - var init_ts_server = __esm({ - "src/jsTyping/_namespaces/ts.server.ts"() { - "use strict"; - init_shared(); - init_types2(); - } - }); - - // src/jsTyping/_namespaces/ts.ts - var init_ts3 = __esm({ - "src/jsTyping/_namespaces/ts.ts"() { - "use strict"; - init_ts2(); - init_ts_JsTyping(); - init_ts_server(); - } - }); - - // src/services/types.ts - function getDefaultFormatCodeSettings(newLineCharacter) { - return { - indentSize: 4, - tabSize: 4, - newLineCharacter: newLineCharacter || "\n", - convertTabsToSpaces: true, - indentStyle: 2 /* Smart */, - insertSpaceAfterConstructor: false, - insertSpaceAfterCommaDelimiter: true, - insertSpaceAfterSemicolonInForStatements: true, - insertSpaceBeforeAndAfterBinaryOperators: true, - insertSpaceAfterKeywordsInControlFlowStatements: true, - insertSpaceAfterFunctionKeywordForAnonymousFunctions: false, - insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false, - insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false, - insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true, - insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false, - insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false, - insertSpaceBeforeFunctionParenthesis: false, - placeOpenBraceOnNewLineForFunctions: false, - placeOpenBraceOnNewLineForControlBlocks: false, - semicolons: "ignore" /* Ignore */, - trimTrailingWhitespace: true, - indentSwitchCase: true - }; - } - var ScriptSnapshot, PackageJsonDependencyGroup, PackageJsonAutoImportPreference, LanguageServiceMode, emptyOptions, SemanticClassificationFormat, OrganizeImportsMode, CompletionTriggerKind, InlayHintKind, HighlightSpanKind, IndentStyle, SemicolonPreference, testFormatSettings, SymbolDisplayPartKind, CompletionInfoFlags, OutliningSpanKind, OutputFileType, EndOfLineState, TokenClass, ScriptElementKind, ScriptElementKindModifier, ClassificationTypeNames, ClassificationType; - var init_types3 = __esm({ - "src/services/types.ts"() { - "use strict"; - ((ScriptSnapshot2) => { - class StringScriptSnapshot { - constructor(text) { - this.text = text; - } - getText(start, end) { - return start === 0 && end === this.text.length ? this.text : this.text.substring(start, end); - } - getLength() { - return this.text.length; - } - getChangeRange() { - return void 0; - } - } - function fromString(text) { - return new StringScriptSnapshot(text); - } - ScriptSnapshot2.fromString = fromString; - })(ScriptSnapshot || (ScriptSnapshot = {})); - PackageJsonDependencyGroup = /* @__PURE__ */ ((PackageJsonDependencyGroup2) => { - PackageJsonDependencyGroup2[PackageJsonDependencyGroup2["Dependencies"] = 1] = "Dependencies"; - PackageJsonDependencyGroup2[PackageJsonDependencyGroup2["DevDependencies"] = 2] = "DevDependencies"; - PackageJsonDependencyGroup2[PackageJsonDependencyGroup2["PeerDependencies"] = 4] = "PeerDependencies"; - PackageJsonDependencyGroup2[PackageJsonDependencyGroup2["OptionalDependencies"] = 8] = "OptionalDependencies"; - PackageJsonDependencyGroup2[PackageJsonDependencyGroup2["All"] = 15] = "All"; - return PackageJsonDependencyGroup2; - })(PackageJsonDependencyGroup || {}); - PackageJsonAutoImportPreference = /* @__PURE__ */ ((PackageJsonAutoImportPreference2) => { - PackageJsonAutoImportPreference2[PackageJsonAutoImportPreference2["Off"] = 0] = "Off"; - PackageJsonAutoImportPreference2[PackageJsonAutoImportPreference2["On"] = 1] = "On"; - PackageJsonAutoImportPreference2[PackageJsonAutoImportPreference2["Auto"] = 2] = "Auto"; - return PackageJsonAutoImportPreference2; - })(PackageJsonAutoImportPreference || {}); - LanguageServiceMode = /* @__PURE__ */ ((LanguageServiceMode2) => { - LanguageServiceMode2[LanguageServiceMode2["Semantic"] = 0] = "Semantic"; - LanguageServiceMode2[LanguageServiceMode2["PartialSemantic"] = 1] = "PartialSemantic"; - LanguageServiceMode2[LanguageServiceMode2["Syntactic"] = 2] = "Syntactic"; - return LanguageServiceMode2; - })(LanguageServiceMode || {}); - emptyOptions = {}; - SemanticClassificationFormat = /* @__PURE__ */ ((SemanticClassificationFormat3) => { - SemanticClassificationFormat3["Original"] = "original"; - SemanticClassificationFormat3["TwentyTwenty"] = "2020"; - return SemanticClassificationFormat3; - })(SemanticClassificationFormat || {}); - OrganizeImportsMode = /* @__PURE__ */ ((OrganizeImportsMode3) => { - OrganizeImportsMode3["All"] = "All"; - OrganizeImportsMode3["SortAndCombine"] = "SortAndCombine"; - OrganizeImportsMode3["RemoveUnused"] = "RemoveUnused"; - return OrganizeImportsMode3; - })(OrganizeImportsMode || {}); - CompletionTriggerKind = /* @__PURE__ */ ((CompletionTriggerKind4) => { - CompletionTriggerKind4[CompletionTriggerKind4["Invoked"] = 1] = "Invoked"; - CompletionTriggerKind4[CompletionTriggerKind4["TriggerCharacter"] = 2] = "TriggerCharacter"; - CompletionTriggerKind4[CompletionTriggerKind4["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions"; - return CompletionTriggerKind4; - })(CompletionTriggerKind || {}); - InlayHintKind = /* @__PURE__ */ ((InlayHintKind2) => { - InlayHintKind2["Type"] = "Type"; - InlayHintKind2["Parameter"] = "Parameter"; - InlayHintKind2["Enum"] = "Enum"; - return InlayHintKind2; - })(InlayHintKind || {}); - HighlightSpanKind = /* @__PURE__ */ ((HighlightSpanKind2) => { - HighlightSpanKind2["none"] = "none"; - HighlightSpanKind2["definition"] = "definition"; - HighlightSpanKind2["reference"] = "reference"; - HighlightSpanKind2["writtenReference"] = "writtenReference"; - return HighlightSpanKind2; - })(HighlightSpanKind || {}); - IndentStyle = /* @__PURE__ */ ((IndentStyle3) => { - IndentStyle3[IndentStyle3["None"] = 0] = "None"; - IndentStyle3[IndentStyle3["Block"] = 1] = "Block"; - IndentStyle3[IndentStyle3["Smart"] = 2] = "Smart"; - return IndentStyle3; - })(IndentStyle || {}); - SemicolonPreference = /* @__PURE__ */ ((SemicolonPreference3) => { - SemicolonPreference3["Ignore"] = "ignore"; - SemicolonPreference3["Insert"] = "insert"; - SemicolonPreference3["Remove"] = "remove"; - return SemicolonPreference3; - })(SemicolonPreference || {}); - testFormatSettings = getDefaultFormatCodeSettings("\n"); - SymbolDisplayPartKind = /* @__PURE__ */ ((SymbolDisplayPartKind2) => { - SymbolDisplayPartKind2[SymbolDisplayPartKind2["aliasName"] = 0] = "aliasName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["className"] = 1] = "className"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["enumName"] = 2] = "enumName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["fieldName"] = 3] = "fieldName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["interfaceName"] = 4] = "interfaceName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["keyword"] = 5] = "keyword"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["lineBreak"] = 6] = "lineBreak"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["numericLiteral"] = 7] = "numericLiteral"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["stringLiteral"] = 8] = "stringLiteral"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["localName"] = 9] = "localName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["methodName"] = 10] = "methodName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["moduleName"] = 11] = "moduleName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["operator"] = 12] = "operator"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["parameterName"] = 13] = "parameterName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["propertyName"] = 14] = "propertyName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["punctuation"] = 15] = "punctuation"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["space"] = 16] = "space"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["text"] = 17] = "text"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["typeParameterName"] = 18] = "typeParameterName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["enumMemberName"] = 19] = "enumMemberName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["functionName"] = 20] = "functionName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["regularExpressionLiteral"] = 21] = "regularExpressionLiteral"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["link"] = 22] = "link"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["linkName"] = 23] = "linkName"; - SymbolDisplayPartKind2[SymbolDisplayPartKind2["linkText"] = 24] = "linkText"; - return SymbolDisplayPartKind2; - })(SymbolDisplayPartKind || {}); - CompletionInfoFlags = /* @__PURE__ */ ((CompletionInfoFlags2) => { - CompletionInfoFlags2[CompletionInfoFlags2["None"] = 0] = "None"; - CompletionInfoFlags2[CompletionInfoFlags2["MayIncludeAutoImports"] = 1] = "MayIncludeAutoImports"; - CompletionInfoFlags2[CompletionInfoFlags2["IsImportStatementCompletion"] = 2] = "IsImportStatementCompletion"; - CompletionInfoFlags2[CompletionInfoFlags2["IsContinuation"] = 4] = "IsContinuation"; - CompletionInfoFlags2[CompletionInfoFlags2["ResolvedModuleSpecifiers"] = 8] = "ResolvedModuleSpecifiers"; - CompletionInfoFlags2[CompletionInfoFlags2["ResolvedModuleSpecifiersBeyondLimit"] = 16] = "ResolvedModuleSpecifiersBeyondLimit"; - CompletionInfoFlags2[CompletionInfoFlags2["MayIncludeMethodSnippets"] = 32] = "MayIncludeMethodSnippets"; - return CompletionInfoFlags2; - })(CompletionInfoFlags || {}); - OutliningSpanKind = /* @__PURE__ */ ((OutliningSpanKind2) => { - OutliningSpanKind2["Comment"] = "comment"; - OutliningSpanKind2["Region"] = "region"; - OutliningSpanKind2["Code"] = "code"; - OutliningSpanKind2["Imports"] = "imports"; - return OutliningSpanKind2; - })(OutliningSpanKind || {}); - OutputFileType = /* @__PURE__ */ ((OutputFileType2) => { - OutputFileType2[OutputFileType2["JavaScript"] = 0] = "JavaScript"; - OutputFileType2[OutputFileType2["SourceMap"] = 1] = "SourceMap"; - OutputFileType2[OutputFileType2["Declaration"] = 2] = "Declaration"; - return OutputFileType2; - })(OutputFileType || {}); - EndOfLineState = /* @__PURE__ */ ((EndOfLineState3) => { - EndOfLineState3[EndOfLineState3["None"] = 0] = "None"; - EndOfLineState3[EndOfLineState3["InMultiLineCommentTrivia"] = 1] = "InMultiLineCommentTrivia"; - EndOfLineState3[EndOfLineState3["InSingleQuoteStringLiteral"] = 2] = "InSingleQuoteStringLiteral"; - EndOfLineState3[EndOfLineState3["InDoubleQuoteStringLiteral"] = 3] = "InDoubleQuoteStringLiteral"; - EndOfLineState3[EndOfLineState3["InTemplateHeadOrNoSubstitutionTemplate"] = 4] = "InTemplateHeadOrNoSubstitutionTemplate"; - EndOfLineState3[EndOfLineState3["InTemplateMiddleOrTail"] = 5] = "InTemplateMiddleOrTail"; - EndOfLineState3[EndOfLineState3["InTemplateSubstitutionPosition"] = 6] = "InTemplateSubstitutionPosition"; - return EndOfLineState3; - })(EndOfLineState || {}); - TokenClass = /* @__PURE__ */ ((TokenClass2) => { - TokenClass2[TokenClass2["Punctuation"] = 0] = "Punctuation"; - TokenClass2[TokenClass2["Keyword"] = 1] = "Keyword"; - TokenClass2[TokenClass2["Operator"] = 2] = "Operator"; - TokenClass2[TokenClass2["Comment"] = 3] = "Comment"; - TokenClass2[TokenClass2["Whitespace"] = 4] = "Whitespace"; - TokenClass2[TokenClass2["Identifier"] = 5] = "Identifier"; - TokenClass2[TokenClass2["NumberLiteral"] = 6] = "NumberLiteral"; - TokenClass2[TokenClass2["BigIntLiteral"] = 7] = "BigIntLiteral"; - TokenClass2[TokenClass2["StringLiteral"] = 8] = "StringLiteral"; - TokenClass2[TokenClass2["RegExpLiteral"] = 9] = "RegExpLiteral"; - return TokenClass2; - })(TokenClass || {}); - ScriptElementKind = /* @__PURE__ */ ((ScriptElementKind2) => { - ScriptElementKind2["unknown"] = ""; - ScriptElementKind2["warning"] = "warning"; - ScriptElementKind2["keyword"] = "keyword"; - ScriptElementKind2["scriptElement"] = "script"; - ScriptElementKind2["moduleElement"] = "module"; - ScriptElementKind2["classElement"] = "class"; - ScriptElementKind2["localClassElement"] = "local class"; - ScriptElementKind2["interfaceElement"] = "interface"; - ScriptElementKind2["typeElement"] = "type"; - ScriptElementKind2["enumElement"] = "enum"; - ScriptElementKind2["enumMemberElement"] = "enum member"; - ScriptElementKind2["variableElement"] = "var"; - ScriptElementKind2["localVariableElement"] = "local var"; - ScriptElementKind2["variableUsingElement"] = "using"; - ScriptElementKind2["variableAwaitUsingElement"] = "await using"; - ScriptElementKind2["functionElement"] = "function"; - ScriptElementKind2["localFunctionElement"] = "local function"; - ScriptElementKind2["memberFunctionElement"] = "method"; - ScriptElementKind2["memberGetAccessorElement"] = "getter"; - ScriptElementKind2["memberSetAccessorElement"] = "setter"; - ScriptElementKind2["memberVariableElement"] = "property"; - ScriptElementKind2["memberAccessorVariableElement"] = "accessor"; - ScriptElementKind2["constructorImplementationElement"] = "constructor"; - ScriptElementKind2["callSignatureElement"] = "call"; - ScriptElementKind2["indexSignatureElement"] = "index"; - ScriptElementKind2["constructSignatureElement"] = "construct"; - ScriptElementKind2["parameterElement"] = "parameter"; - ScriptElementKind2["typeParameterElement"] = "type parameter"; - ScriptElementKind2["primitiveType"] = "primitive type"; - ScriptElementKind2["label"] = "label"; - ScriptElementKind2["alias"] = "alias"; - ScriptElementKind2["constElement"] = "const"; - ScriptElementKind2["letElement"] = "let"; - ScriptElementKind2["directory"] = "directory"; - ScriptElementKind2["externalModuleName"] = "external module name"; - ScriptElementKind2["jsxAttribute"] = "JSX attribute"; - ScriptElementKind2["string"] = "string"; - ScriptElementKind2["link"] = "link"; - ScriptElementKind2["linkName"] = "link name"; - ScriptElementKind2["linkText"] = "link text"; - return ScriptElementKind2; - })(ScriptElementKind || {}); - ScriptElementKindModifier = /* @__PURE__ */ ((ScriptElementKindModifier2) => { - ScriptElementKindModifier2["none"] = ""; - ScriptElementKindModifier2["publicMemberModifier"] = "public"; - ScriptElementKindModifier2["privateMemberModifier"] = "private"; - ScriptElementKindModifier2["protectedMemberModifier"] = "protected"; - ScriptElementKindModifier2["exportedModifier"] = "export"; - ScriptElementKindModifier2["ambientModifier"] = "declare"; - ScriptElementKindModifier2["staticModifier"] = "static"; - ScriptElementKindModifier2["abstractModifier"] = "abstract"; - ScriptElementKindModifier2["optionalModifier"] = "optional"; - ScriptElementKindModifier2["deprecatedModifier"] = "deprecated"; - ScriptElementKindModifier2["dtsModifier"] = ".d.ts"; - ScriptElementKindModifier2["tsModifier"] = ".ts"; - ScriptElementKindModifier2["tsxModifier"] = ".tsx"; - ScriptElementKindModifier2["jsModifier"] = ".js"; - ScriptElementKindModifier2["jsxModifier"] = ".jsx"; - ScriptElementKindModifier2["jsonModifier"] = ".json"; - ScriptElementKindModifier2["dmtsModifier"] = ".d.mts"; - ScriptElementKindModifier2["mtsModifier"] = ".mts"; - ScriptElementKindModifier2["mjsModifier"] = ".mjs"; - ScriptElementKindModifier2["dctsModifier"] = ".d.cts"; - ScriptElementKindModifier2["ctsModifier"] = ".cts"; - ScriptElementKindModifier2["cjsModifier"] = ".cjs"; - return ScriptElementKindModifier2; - })(ScriptElementKindModifier || {}); - ClassificationTypeNames = /* @__PURE__ */ ((ClassificationTypeNames2) => { - ClassificationTypeNames2["comment"] = "comment"; - ClassificationTypeNames2["identifier"] = "identifier"; - ClassificationTypeNames2["keyword"] = "keyword"; - ClassificationTypeNames2["numericLiteral"] = "number"; - ClassificationTypeNames2["bigintLiteral"] = "bigint"; - ClassificationTypeNames2["operator"] = "operator"; - ClassificationTypeNames2["stringLiteral"] = "string"; - ClassificationTypeNames2["whiteSpace"] = "whitespace"; - ClassificationTypeNames2["text"] = "text"; - ClassificationTypeNames2["punctuation"] = "punctuation"; - ClassificationTypeNames2["className"] = "class name"; - ClassificationTypeNames2["enumName"] = "enum name"; - ClassificationTypeNames2["interfaceName"] = "interface name"; - ClassificationTypeNames2["moduleName"] = "module name"; - ClassificationTypeNames2["typeParameterName"] = "type parameter name"; - ClassificationTypeNames2["typeAliasName"] = "type alias name"; - ClassificationTypeNames2["parameterName"] = "parameter name"; - ClassificationTypeNames2["docCommentTagName"] = "doc comment tag name"; - ClassificationTypeNames2["jsxOpenTagName"] = "jsx open tag name"; - ClassificationTypeNames2["jsxCloseTagName"] = "jsx close tag name"; - ClassificationTypeNames2["jsxSelfClosingTagName"] = "jsx self closing tag name"; - ClassificationTypeNames2["jsxAttribute"] = "jsx attribute"; - ClassificationTypeNames2["jsxText"] = "jsx text"; - ClassificationTypeNames2["jsxAttributeStringLiteralValue"] = "jsx attribute string literal value"; - return ClassificationTypeNames2; - })(ClassificationTypeNames || {}); - ClassificationType = /* @__PURE__ */ ((ClassificationType3) => { - ClassificationType3[ClassificationType3["comment"] = 1] = "comment"; - ClassificationType3[ClassificationType3["identifier"] = 2] = "identifier"; - ClassificationType3[ClassificationType3["keyword"] = 3] = "keyword"; - ClassificationType3[ClassificationType3["numericLiteral"] = 4] = "numericLiteral"; - ClassificationType3[ClassificationType3["operator"] = 5] = "operator"; - ClassificationType3[ClassificationType3["stringLiteral"] = 6] = "stringLiteral"; - ClassificationType3[ClassificationType3["regularExpressionLiteral"] = 7] = "regularExpressionLiteral"; - ClassificationType3[ClassificationType3["whiteSpace"] = 8] = "whiteSpace"; - ClassificationType3[ClassificationType3["text"] = 9] = "text"; - ClassificationType3[ClassificationType3["punctuation"] = 10] = "punctuation"; - ClassificationType3[ClassificationType3["className"] = 11] = "className"; - ClassificationType3[ClassificationType3["enumName"] = 12] = "enumName"; - ClassificationType3[ClassificationType3["interfaceName"] = 13] = "interfaceName"; - ClassificationType3[ClassificationType3["moduleName"] = 14] = "moduleName"; - ClassificationType3[ClassificationType3["typeParameterName"] = 15] = "typeParameterName"; - ClassificationType3[ClassificationType3["typeAliasName"] = 16] = "typeAliasName"; - ClassificationType3[ClassificationType3["parameterName"] = 17] = "parameterName"; - ClassificationType3[ClassificationType3["docCommentTagName"] = 18] = "docCommentTagName"; - ClassificationType3[ClassificationType3["jsxOpenTagName"] = 19] = "jsxOpenTagName"; - ClassificationType3[ClassificationType3["jsxCloseTagName"] = 20] = "jsxCloseTagName"; - ClassificationType3[ClassificationType3["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName"; - ClassificationType3[ClassificationType3["jsxAttribute"] = 22] = "jsxAttribute"; - ClassificationType3[ClassificationType3["jsxText"] = 23] = "jsxText"; - ClassificationType3[ClassificationType3["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue"; - ClassificationType3[ClassificationType3["bigintLiteral"] = 25] = "bigintLiteral"; - return ClassificationType3; - })(ClassificationType || {}); - } - }); - - // src/services/utilities.ts - function getMeaningFromDeclaration(node) { - switch (node.kind) { - case 260 /* VariableDeclaration */: - return isInJSFile(node) && getJSDocEnumTag(node) ? 7 /* All */ : 1 /* Value */; - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 299 /* CatchClause */: - case 291 /* JsxAttribute */: - return 1 /* Value */; - case 168 /* TypeParameter */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 187 /* TypeLiteral */: - return 2 /* Type */; - case 353 /* JSDocTypedefTag */: - return node.name === void 0 ? 1 /* Value */ | 2 /* Type */ : 2 /* Type */; - case 306 /* EnumMember */: - case 263 /* ClassDeclaration */: - return 1 /* Value */ | 2 /* Type */; - case 267 /* ModuleDeclaration */: - if (isAmbientModule(node)) { - return 4 /* Namespace */ | 1 /* Value */; - } else if (getModuleInstanceState(node) === 1 /* Instantiated */) { - return 4 /* Namespace */ | 1 /* Value */; - } else { - return 4 /* Namespace */; - } - case 266 /* EnumDeclaration */: - case 275 /* NamedImports */: - case 276 /* ImportSpecifier */: - case 271 /* ImportEqualsDeclaration */: - case 272 /* ImportDeclaration */: - case 277 /* ExportAssignment */: - case 278 /* ExportDeclaration */: - return 7 /* All */; - case 312 /* SourceFile */: - return 4 /* Namespace */ | 1 /* Value */; - } - return 7 /* All */; - } - function getMeaningFromLocation(node) { - node = getAdjustedReferenceLocation(node); - const parent2 = node.parent; - if (node.kind === 312 /* SourceFile */) { - return 1 /* Value */; - } else if (isExportAssignment(parent2) || isExportSpecifier(parent2) || isExternalModuleReference(parent2) || isImportSpecifier(parent2) || isImportClause(parent2) || isImportEqualsDeclaration(parent2) && node === parent2.name) { - return 7 /* All */; - } else if (isInRightSideOfInternalImportEqualsDeclaration(node)) { - return getMeaningFromRightHandSideOfImportEquals(node); - } else if (isDeclarationName(node)) { - return getMeaningFromDeclaration(parent2); - } else if (isEntityName(node) && findAncestor(node, or(isJSDocNameReference, isJSDocLinkLike, isJSDocMemberName))) { - return 7 /* All */; - } else if (isTypeReference(node)) { - return 2 /* Type */; - } else if (isNamespaceReference(node)) { - return 4 /* Namespace */; - } else if (isTypeParameterDeclaration(parent2)) { - Debug.assert(isJSDocTemplateTag(parent2.parent)); - return 2 /* Type */; - } else if (isLiteralTypeNode(parent2)) { - return 2 /* Type */ | 1 /* Value */; - } else { - return 1 /* Value */; - } - } - function getMeaningFromRightHandSideOfImportEquals(node) { - const name = node.kind === 166 /* QualifiedName */ ? node : isQualifiedName(node.parent) && node.parent.right === node ? node.parent : void 0; - return name && name.parent.kind === 271 /* ImportEqualsDeclaration */ ? 7 /* All */ : 4 /* Namespace */; - } - function isInRightSideOfInternalImportEqualsDeclaration(node) { - while (node.parent.kind === 166 /* QualifiedName */) { - node = node.parent; - } - return isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; - } - function isNamespaceReference(node) { - return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node); - } - function isQualifiedNameNamespaceReference(node) { - let root = node; - let isLastClause = true; - if (root.parent.kind === 166 /* QualifiedName */) { - while (root.parent && root.parent.kind === 166 /* QualifiedName */) { - root = root.parent; - } - isLastClause = root.right === node; - } - return root.parent.kind === 183 /* TypeReference */ && !isLastClause; - } - function isPropertyAccessNamespaceReference(node) { - let root = node; - let isLastClause = true; - if (root.parent.kind === 211 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 211 /* PropertyAccessExpression */) { - root = root.parent; - } - isLastClause = root.name === node; - } - if (!isLastClause && root.parent.kind === 233 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 298 /* HeritageClause */) { - const decl = root.parent.parent.parent; - return decl.kind === 263 /* ClassDeclaration */ && root.parent.parent.token === 119 /* ImplementsKeyword */ || decl.kind === 264 /* InterfaceDeclaration */ && root.parent.parent.token === 96 /* ExtendsKeyword */; - } - return false; - } - function isTypeReference(node) { - if (isRightSideOfQualifiedNameOrPropertyAccess(node)) { - node = node.parent; - } - switch (node.kind) { - case 110 /* ThisKeyword */: - return !isExpressionNode(node); - case 197 /* ThisType */: - return true; - } - switch (node.parent.kind) { - case 183 /* TypeReference */: - return true; - case 205 /* ImportType */: - return !node.parent.isTypeOf; - case 233 /* ExpressionWithTypeArguments */: - return isPartOfTypeNode(node.parent); - } - return false; - } - function isCallExpressionTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) { - return isCalleeWorker(node, isCallExpression, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); - } - function isNewExpressionTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) { - return isCalleeWorker(node, isNewExpression, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); - } - function isCallOrNewExpressionTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) { - return isCalleeWorker(node, isCallOrNewExpression, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); - } - function isTaggedTemplateTag(node, includeElementAccess = false, skipPastOuterExpressions = false) { - return isCalleeWorker(node, isTaggedTemplateExpression, selectTagOfTaggedTemplateExpression, includeElementAccess, skipPastOuterExpressions); - } - function isDecoratorTarget(node, includeElementAccess = false, skipPastOuterExpressions = false) { - return isCalleeWorker(node, isDecorator, selectExpressionOfCallOrNewExpressionOrDecorator, includeElementAccess, skipPastOuterExpressions); - } - function isJsxOpeningLikeElementTagName(node, includeElementAccess = false, skipPastOuterExpressions = false) { - return isCalleeWorker(node, isJsxOpeningLikeElement, selectTagNameOfJsxOpeningLikeElement, includeElementAccess, skipPastOuterExpressions); - } - function selectExpressionOfCallOrNewExpressionOrDecorator(node) { - return node.expression; - } - function selectTagOfTaggedTemplateExpression(node) { - return node.tag; - } - function selectTagNameOfJsxOpeningLikeElement(node) { - return node.tagName; - } - function isCalleeWorker(node, pred, calleeSelector, includeElementAccess, skipPastOuterExpressions) { - let target = includeElementAccess ? climbPastPropertyOrElementAccess(node) : climbPastPropertyAccess(node); - if (skipPastOuterExpressions) { - target = skipOuterExpressions(target); - } - return !!target && !!target.parent && pred(target.parent) && calleeSelector(target.parent) === target; - } - function climbPastPropertyAccess(node) { - return isRightSideOfPropertyAccess(node) ? node.parent : node; - } - function climbPastPropertyOrElementAccess(node) { - return isRightSideOfPropertyAccess(node) || isArgumentExpressionOfElementAccess(node) ? node.parent : node; - } - function getTargetLabel(referenceNode, labelName) { - while (referenceNode) { - if (referenceNode.kind === 256 /* LabeledStatement */ && referenceNode.label.escapedText === labelName) { - return referenceNode.label; - } - referenceNode = referenceNode.parent; - } - return void 0; - } - function hasPropertyAccessExpressionWithName(node, funcName) { - if (!isPropertyAccessExpression(node.expression)) { - return false; - } - return node.expression.name.text === funcName; - } - function isJumpStatementTarget(node) { - var _a; - return isIdentifier(node) && ((_a = tryCast(node.parent, isBreakOrContinueStatement)) == null ? void 0 : _a.label) === node; - } - function isLabelOfLabeledStatement(node) { - var _a; - return isIdentifier(node) && ((_a = tryCast(node.parent, isLabeledStatement)) == null ? void 0 : _a.label) === node; - } - function isLabelName(node) { - return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); - } - function isTagName(node) { - var _a; - return ((_a = tryCast(node.parent, isJSDocTag)) == null ? void 0 : _a.tagName) === node; - } - function isRightSideOfQualifiedName(node) { - var _a; - return ((_a = tryCast(node.parent, isQualifiedName)) == null ? void 0 : _a.right) === node; - } - function isRightSideOfPropertyAccess(node) { - var _a; - return ((_a = tryCast(node.parent, isPropertyAccessExpression)) == null ? void 0 : _a.name) === node; - } - function isArgumentExpressionOfElementAccess(node) { - var _a; - return ((_a = tryCast(node.parent, isElementAccessExpression)) == null ? void 0 : _a.argumentExpression) === node; - } - function isNameOfModuleDeclaration(node) { - var _a; - return ((_a = tryCast(node.parent, isModuleDeclaration)) == null ? void 0 : _a.name) === node; - } - function isNameOfFunctionDeclaration(node) { - var _a; - return isIdentifier(node) && ((_a = tryCast(node.parent, isFunctionLike)) == null ? void 0 : _a.name) === node; - } - function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { - switch (node.parent.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 303 /* PropertyAssignment */: - case 306 /* EnumMember */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 267 /* ModuleDeclaration */: - return getNameOfDeclaration(node.parent) === node; - case 212 /* ElementAccessExpression */: - return node.parent.argumentExpression === node; - case 167 /* ComputedPropertyName */: - return true; - case 201 /* LiteralType */: - return node.parent.parent.kind === 199 /* IndexedAccessType */; - default: - return false; - } - } - function isExpressionOfExternalModuleImportEqualsDeclaration(node) { - return isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node; - } - function getContainerNode(node) { - if (isJSDocTypeAlias(node)) { - node = node.parent.parent; - } - while (true) { - node = node.parent; - if (!node) { - return void 0; - } - switch (node.kind) { - case 312 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 267 /* ModuleDeclaration */: - return node; - } - } - } - function getNodeKind(node) { - switch (node.kind) { - case 312 /* SourceFile */: - return isExternalModule(node) ? "module" /* moduleElement */ : "script" /* scriptElement */; - case 267 /* ModuleDeclaration */: - return "module" /* moduleElement */; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - return "class" /* classElement */; - case 264 /* InterfaceDeclaration */: - return "interface" /* interfaceElement */; - case 265 /* TypeAliasDeclaration */: - case 345 /* JSDocCallbackTag */: - case 353 /* JSDocTypedefTag */: - return "type" /* typeElement */; - case 266 /* EnumDeclaration */: - return "enum" /* enumElement */; - case 260 /* VariableDeclaration */: - return getKindOfVariableDeclaration(node); - case 208 /* BindingElement */: - return getKindOfVariableDeclaration(getRootDeclaration(node)); - case 219 /* ArrowFunction */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - return "function" /* functionElement */; - case 177 /* GetAccessor */: - return "getter" /* memberGetAccessorElement */; - case 178 /* SetAccessor */: - return "setter" /* memberSetAccessorElement */; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - return "method" /* memberFunctionElement */; - case 303 /* PropertyAssignment */: - const { initializer } = node; - return isFunctionLike(initializer) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: - return "property" /* memberVariableElement */; - case 181 /* IndexSignature */: - return "index" /* indexSignatureElement */; - case 180 /* ConstructSignature */: - return "construct" /* constructSignatureElement */; - case 179 /* CallSignature */: - return "call" /* callSignatureElement */; - case 176 /* Constructor */: - case 175 /* ClassStaticBlockDeclaration */: - return "constructor" /* constructorImplementationElement */; - case 168 /* TypeParameter */: - return "type parameter" /* typeParameterElement */; - case 306 /* EnumMember */: - return "enum member" /* enumMemberElement */; - case 169 /* Parameter */: - return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; - case 271 /* ImportEqualsDeclaration */: - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: - case 274 /* NamespaceImport */: - case 280 /* NamespaceExport */: - return "alias" /* alias */; - case 226 /* BinaryExpression */: - const kind = getAssignmentDeclarationKind(node); - const { right } = node; - switch (kind) { - case 7 /* ObjectDefinePropertyValue */: - case 8 /* ObjectDefinePropertyExports */: - case 9 /* ObjectDefinePrototypeProperty */: - case 0 /* None */: - return "" /* unknown */; - case 1 /* ExportsProperty */: - case 2 /* ModuleExports */: - const rightKind = getNodeKind(right); - return rightKind === "" /* unknown */ ? "const" /* constElement */ : rightKind; - case 3 /* PrototypeProperty */: - return isFunctionExpression(right) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 4 /* ThisProperty */: - return "property" /* memberVariableElement */; - case 5 /* Property */: - return isFunctionExpression(right) ? "method" /* memberFunctionElement */ : "property" /* memberVariableElement */; - case 6 /* Prototype */: - return "local class" /* localClassElement */; - default: { - assertType(kind); - return "" /* unknown */; - } - } - case 80 /* Identifier */: - return isImportClause(node.parent) ? "alias" /* alias */ : "" /* unknown */; - case 277 /* ExportAssignment */: - const scriptKind = getNodeKind(node.expression); - return scriptKind === "" /* unknown */ ? "const" /* constElement */ : scriptKind; - default: - return "" /* unknown */; - } - function getKindOfVariableDeclaration(v) { - return isVarConst(v) ? "const" /* constElement */ : isLet(v) ? "let" /* letElement */ : "var" /* variableElement */; - } - } - function isThis(node) { - switch (node.kind) { - case 110 /* ThisKeyword */: - return true; - case 80 /* Identifier */: - return identifierIsThisKeyword(node) && node.parent.kind === 169 /* Parameter */; - default: - return false; - } - } - function getLineStartPositionForPosition(position, sourceFile) { - const lineStarts = getLineStarts(sourceFile); - const line = sourceFile.getLineAndCharacterOfPosition(position).line; - return lineStarts[line]; - } - function rangeContainsRange(r1, r2) { - return startEndContainsRange(r1.pos, r1.end, r2); - } - function rangeContainsRangeExclusive(r1, r2) { - return rangeContainsPositionExclusive(r1, r2.pos) && rangeContainsPositionExclusive(r1, r2.end); - } - function rangeContainsPosition(r, pos) { - return r.pos <= pos && pos <= r.end; - } - function rangeContainsPositionExclusive(r, pos) { - return r.pos < pos && pos < r.end; - } - function startEndContainsRange(start, end, range) { - return start <= range.pos && end >= range.end; - } - function rangeContainsStartEnd(range, start, end) { - return range.pos <= start && range.end >= end; - } - function rangeOverlapsWithStartEnd(r1, start, end) { - return startEndOverlapsWithStartEnd(r1.pos, r1.end, start, end); - } - function nodeOverlapsWithStartEnd(node, sourceFile, start, end) { - return startEndOverlapsWithStartEnd(node.getStart(sourceFile), node.end, start, end); - } - function startEndOverlapsWithStartEnd(start1, end1, start2, end2) { - const start = Math.max(start1, start2); - const end = Math.min(end1, end2); - return start < end; - } - function positionBelongsToNode(candidate, position, sourceFile) { - Debug.assert(candidate.pos <= position); - return position < candidate.end || !isCompletedNode(candidate, sourceFile); - } - function isCompletedNode(n, sourceFile) { - if (n === void 0 || nodeIsMissing(n)) { - return false; - } - switch (n.kind) { - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 210 /* ObjectLiteralExpression */: - case 206 /* ObjectBindingPattern */: - case 187 /* TypeLiteral */: - case 241 /* Block */: - case 268 /* ModuleBlock */: - case 269 /* CaseBlock */: - case 275 /* NamedImports */: - case 279 /* NamedExports */: - return nodeEndsWith(n, 20 /* CloseBraceToken */, sourceFile); - case 299 /* CatchClause */: - return isCompletedNode(n.block, sourceFile); - case 214 /* NewExpression */: - if (!n.arguments) { - return true; - } - case 213 /* CallExpression */: - case 217 /* ParenthesizedExpression */: - case 196 /* ParenthesizedType */: - return nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile); - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - return isCompletedNode(n.type, sourceFile); - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 180 /* ConstructSignature */: - case 179 /* CallSignature */: - case 219 /* ArrowFunction */: - if (n.body) { - return isCompletedNode(n.body, sourceFile); - } - if (n.type) { - return isCompletedNode(n.type, sourceFile); - } - return hasChildOfKind(n, 22 /* CloseParenToken */, sourceFile); - case 267 /* ModuleDeclaration */: - return !!n.body && isCompletedNode(n.body, sourceFile); - case 245 /* IfStatement */: - if (n.elseStatement) { - return isCompletedNode(n.elseStatement, sourceFile); - } - return isCompletedNode(n.thenStatement, sourceFile); - case 244 /* ExpressionStatement */: - return isCompletedNode(n.expression, sourceFile) || hasChildOfKind(n, 27 /* SemicolonToken */, sourceFile); - case 209 /* ArrayLiteralExpression */: - case 207 /* ArrayBindingPattern */: - case 212 /* ElementAccessExpression */: - case 167 /* ComputedPropertyName */: - case 189 /* TupleType */: - return nodeEndsWith(n, 24 /* CloseBracketToken */, sourceFile); - case 181 /* IndexSignature */: - if (n.type) { - return isCompletedNode(n.type, sourceFile); - } - return hasChildOfKind(n, 24 /* CloseBracketToken */, sourceFile); - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - return false; - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 247 /* WhileStatement */: - return isCompletedNode(n.statement, sourceFile); - case 246 /* DoStatement */: - return hasChildOfKind(n, 117 /* WhileKeyword */, sourceFile) ? nodeEndsWith(n, 22 /* CloseParenToken */, sourceFile) : isCompletedNode(n.statement, sourceFile); - case 186 /* TypeQuery */: - return isCompletedNode(n.exprName, sourceFile); - case 221 /* TypeOfExpression */: - case 220 /* DeleteExpression */: - case 222 /* VoidExpression */: - case 229 /* YieldExpression */: - case 230 /* SpreadElement */: - const unaryWordExpression = n; - return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 215 /* TaggedTemplateExpression */: - return isCompletedNode(n.template, sourceFile); - case 228 /* TemplateExpression */: - const lastSpan = lastOrUndefined(n.templateSpans); - return isCompletedNode(lastSpan, sourceFile); - case 239 /* TemplateSpan */: - return nodeIsPresent(n.literal); - case 278 /* ExportDeclaration */: - case 272 /* ImportDeclaration */: - return nodeIsPresent(n.moduleSpecifier); - case 224 /* PrefixUnaryExpression */: - return isCompletedNode(n.operand, sourceFile); - case 226 /* BinaryExpression */: - return isCompletedNode(n.right, sourceFile); - case 227 /* ConditionalExpression */: - return isCompletedNode(n.whenFalse, sourceFile); - default: - return true; - } - } - function nodeEndsWith(n, expectedLastToken, sourceFile) { - const children = n.getChildren(sourceFile); - if (children.length) { - const lastChild = last(children); - if (lastChild.kind === expectedLastToken) { - return true; - } else if (lastChild.kind === 27 /* SemicolonToken */ && children.length !== 1) { - return children[children.length - 2].kind === expectedLastToken; - } - } - return false; - } - function findListItemInfo(node) { - const list = findContainingList(node); - if (!list) { - return void 0; - } - const children = list.getChildren(); - const listItemIndex = indexOfNode(children, node); - return { - listItemIndex, - list - }; - } - function hasChildOfKind(n, kind, sourceFile) { - return !!findChildOfKind(n, kind, sourceFile); - } - function findChildOfKind(n, kind, sourceFile) { - return find(n.getChildren(sourceFile), (c) => c.kind === kind); - } - function findContainingList(node) { - const syntaxList = find(node.parent.getChildren(), (c) => isSyntaxList(c) && rangeContainsRange(c, node)); - Debug.assert(!syntaxList || contains(syntaxList.getChildren(), node)); - return syntaxList; - } - function isDefaultModifier2(node) { - return node.kind === 90 /* DefaultKeyword */; - } - function isClassKeyword(node) { - return node.kind === 86 /* ClassKeyword */; - } - function isFunctionKeyword(node) { - return node.kind === 100 /* FunctionKeyword */; - } - function getAdjustedLocationForClass(node) { - if (isNamedDeclaration(node)) { - return node.name; - } - if (isClassDeclaration(node)) { - const defaultModifier = node.modifiers && find(node.modifiers, isDefaultModifier2); - if (defaultModifier) - return defaultModifier; - } - if (isClassExpression(node)) { - const classKeyword = find(node.getChildren(), isClassKeyword); - if (classKeyword) - return classKeyword; - } - } - function getAdjustedLocationForFunction(node) { - if (isNamedDeclaration(node)) { - return node.name; - } - if (isFunctionDeclaration(node)) { - const defaultModifier = find(node.modifiers, isDefaultModifier2); - if (defaultModifier) - return defaultModifier; - } - if (isFunctionExpression(node)) { - const functionKeyword = find(node.getChildren(), isFunctionKeyword); - if (functionKeyword) - return functionKeyword; - } - } - function getAncestorTypeNode(node) { - let lastTypeNode; - findAncestor(node, (a) => { - if (isTypeNode(a)) { - lastTypeNode = a; - } - return !isQualifiedName(a.parent) && !isTypeNode(a.parent) && !isTypeElement(a.parent); - }); - return lastTypeNode; - } - function getContextualTypeFromParentOrAncestorTypeNode(node, checker) { - if (node.flags & (16777216 /* JSDoc */ & ~524288 /* JavaScriptFile */)) - return void 0; - const contextualType = getContextualTypeFromParent(node, checker); - if (contextualType) - return contextualType; - const ancestorTypeNode = getAncestorTypeNode(node); - return ancestorTypeNode && checker.getTypeAtLocation(ancestorTypeNode); - } - function getAdjustedLocationForDeclaration(node, forRename) { - if (!forRename) { - switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - return getAdjustedLocationForClass(node); - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - return getAdjustedLocationForFunction(node); - case 176 /* Constructor */: - return node; - } - } - if (isNamedDeclaration(node)) { - return node.name; - } - } - function getAdjustedLocationForImportDeclaration(node, forRename) { - if (node.importClause) { - if (node.importClause.name && node.importClause.namedBindings) { - return; - } - if (node.importClause.name) { - return node.importClause.name; - } - if (node.importClause.namedBindings) { - if (isNamedImports(node.importClause.namedBindings)) { - const onlyBinding = singleOrUndefined(node.importClause.namedBindings.elements); - if (!onlyBinding) { - return; - } - return onlyBinding.name; - } else if (isNamespaceImport(node.importClause.namedBindings)) { - return node.importClause.namedBindings.name; - } - } - } - if (!forRename) { - return node.moduleSpecifier; - } - } - function getAdjustedLocationForExportDeclaration(node, forRename) { - if (node.exportClause) { - if (isNamedExports(node.exportClause)) { - const onlyBinding = singleOrUndefined(node.exportClause.elements); - if (!onlyBinding) { - return; - } - return node.exportClause.elements[0].name; - } else if (isNamespaceExport(node.exportClause)) { - return node.exportClause.name; - } - } - if (!forRename) { - return node.moduleSpecifier; - } - } - function getAdjustedLocationForHeritageClause(node) { - if (node.types.length === 1) { - return node.types[0].expression; - } - } - function getAdjustedLocation(node, forRename) { - const { parent: parent2 } = node; - if (isModifier(node) && (forRename || node.kind !== 90 /* DefaultKeyword */) ? canHaveModifiers(parent2) && contains(parent2.modifiers, node) : node.kind === 86 /* ClassKeyword */ ? isClassDeclaration(parent2) || isClassExpression(node) : node.kind === 100 /* FunctionKeyword */ ? isFunctionDeclaration(parent2) || isFunctionExpression(node) : node.kind === 120 /* InterfaceKeyword */ ? isInterfaceDeclaration(parent2) : node.kind === 94 /* EnumKeyword */ ? isEnumDeclaration(parent2) : node.kind === 156 /* TypeKeyword */ ? isTypeAliasDeclaration(parent2) : node.kind === 145 /* NamespaceKeyword */ || node.kind === 144 /* ModuleKeyword */ ? isModuleDeclaration(parent2) : node.kind === 102 /* ImportKeyword */ ? isImportEqualsDeclaration(parent2) : node.kind === 139 /* GetKeyword */ ? isGetAccessorDeclaration(parent2) : node.kind === 153 /* SetKeyword */ && isSetAccessorDeclaration(parent2)) { - const location = getAdjustedLocationForDeclaration(parent2, forRename); - if (location) { - return location; - } - } - if ((node.kind === 115 /* VarKeyword */ || node.kind === 87 /* ConstKeyword */ || node.kind === 121 /* LetKeyword */) && isVariableDeclarationList(parent2) && parent2.declarations.length === 1) { - const decl = parent2.declarations[0]; - if (isIdentifier(decl.name)) { - return decl.name; - } - } - if (node.kind === 156 /* TypeKeyword */) { - if (isImportClause(parent2) && parent2.isTypeOnly) { - const location = getAdjustedLocationForImportDeclaration(parent2.parent, forRename); - if (location) { - return location; - } - } - if (isExportDeclaration(parent2) && parent2.isTypeOnly) { - const location = getAdjustedLocationForExportDeclaration(parent2, forRename); - if (location) { - return location; - } - } - } - if (node.kind === 130 /* AsKeyword */) { - if (isImportSpecifier(parent2) && parent2.propertyName || isExportSpecifier(parent2) && parent2.propertyName || isNamespaceImport(parent2) || isNamespaceExport(parent2)) { - return parent2.name; - } - if (isExportDeclaration(parent2) && parent2.exportClause && isNamespaceExport(parent2.exportClause)) { - return parent2.exportClause.name; - } - } - if (node.kind === 102 /* ImportKeyword */ && isImportDeclaration(parent2)) { - const location = getAdjustedLocationForImportDeclaration(parent2, forRename); - if (location) { - return location; - } - } - if (node.kind === 95 /* ExportKeyword */) { - if (isExportDeclaration(parent2)) { - const location = getAdjustedLocationForExportDeclaration(parent2, forRename); - if (location) { - return location; - } - } - if (isExportAssignment(parent2)) { - return skipOuterExpressions(parent2.expression); - } - } - if (node.kind === 149 /* RequireKeyword */ && isExternalModuleReference(parent2)) { - return parent2.expression; - } - if (node.kind === 161 /* FromKeyword */ && (isImportDeclaration(parent2) || isExportDeclaration(parent2)) && parent2.moduleSpecifier) { - return parent2.moduleSpecifier; - } - if ((node.kind === 96 /* ExtendsKeyword */ || node.kind === 119 /* ImplementsKeyword */) && isHeritageClause(parent2) && parent2.token === node.kind) { - const location = getAdjustedLocationForHeritageClause(parent2); - if (location) { - return location; - } - } - if (node.kind === 96 /* ExtendsKeyword */) { - if (isTypeParameterDeclaration(parent2) && parent2.constraint && isTypeReferenceNode(parent2.constraint)) { - return parent2.constraint.typeName; - } - if (isConditionalTypeNode(parent2) && isTypeReferenceNode(parent2.extendsType)) { - return parent2.extendsType.typeName; - } - } - if (node.kind === 140 /* InferKeyword */ && isInferTypeNode(parent2)) { - return parent2.typeParameter.name; - } - if (node.kind === 103 /* InKeyword */ && isTypeParameterDeclaration(parent2) && isMappedTypeNode(parent2.parent)) { - return parent2.name; - } - if (node.kind === 143 /* KeyOfKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 143 /* KeyOfKeyword */ && isTypeReferenceNode(parent2.type)) { - return parent2.type.typeName; - } - if (node.kind === 148 /* ReadonlyKeyword */ && isTypeOperatorNode(parent2) && parent2.operator === 148 /* ReadonlyKeyword */ && isArrayTypeNode(parent2.type) && isTypeReferenceNode(parent2.type.elementType)) { - return parent2.type.elementType.typeName; - } - if (!forRename) { - if (node.kind === 105 /* NewKeyword */ && isNewExpression(parent2) || node.kind === 116 /* VoidKeyword */ && isVoidExpression(parent2) || node.kind === 114 /* TypeOfKeyword */ && isTypeOfExpression(parent2) || node.kind === 135 /* AwaitKeyword */ && isAwaitExpression(parent2) || node.kind === 127 /* YieldKeyword */ && isYieldExpression(parent2) || node.kind === 91 /* DeleteKeyword */ && isDeleteExpression(parent2)) { - if (parent2.expression) { - return skipOuterExpressions(parent2.expression); - } - } - if ((node.kind === 103 /* InKeyword */ || node.kind === 104 /* InstanceOfKeyword */) && isBinaryExpression(parent2) && parent2.operatorToken === node) { - return skipOuterExpressions(parent2.right); - } - if (node.kind === 130 /* AsKeyword */ && isAsExpression(parent2) && isTypeReferenceNode(parent2.type)) { - return parent2.type.typeName; - } - if (node.kind === 103 /* InKeyword */ && isForInStatement(parent2) || node.kind === 165 /* OfKeyword */ && isForOfStatement(parent2)) { - return skipOuterExpressions(parent2.expression); - } - } - return node; - } - function getAdjustedReferenceLocation(node) { - return getAdjustedLocation( - node, - /*forRename*/ - false - ); - } - function getAdjustedRenameLocation(node) { - return getAdjustedLocation( - node, - /*forRename*/ - true - ); - } - function getTouchingPropertyName(sourceFile, position) { - return getTouchingToken(sourceFile, position, (n) => isPropertyNameLiteral(n) || isKeyword(n.kind) || isPrivateIdentifier(n)); - } - function getTouchingToken(sourceFile, position, includePrecedingTokenAtEndPosition) { - return getTokenAtPositionWorker( - sourceFile, - position, - /*allowPositionInLeadingTrivia*/ - false, - includePrecedingTokenAtEndPosition, - /*includeEndPosition*/ - false - ); - } - function getTokenAtPosition(sourceFile, position) { - return getTokenAtPositionWorker( - sourceFile, - position, - /*allowPositionInLeadingTrivia*/ - true, - /*includePrecedingTokenAtEndPosition*/ - void 0, - /*includeEndPosition*/ - false - ); - } - function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includePrecedingTokenAtEndPosition, includeEndPosition) { - let current = sourceFile; - let foundToken; - outer: - while (true) { - const children = current.getChildren(sourceFile); - const i = binarySearchKey(children, position, (_, i2) => i2, (middle, _) => { - const end = children[middle].getEnd(); - if (end < position) { - return -1 /* LessThan */; - } - const start = allowPositionInLeadingTrivia ? children[middle].getFullStart() : children[middle].getStart( - sourceFile, - /*includeJsDocComment*/ - true - ); - if (start > position) { - return 1 /* GreaterThan */; - } - if (nodeContainsPosition(children[middle], start, end)) { - if (children[middle - 1]) { - if (nodeContainsPosition(children[middle - 1])) { - return 1 /* GreaterThan */; - } - } - return 0 /* EqualTo */; - } - if (includePrecedingTokenAtEndPosition && start === position && children[middle - 1] && children[middle - 1].getEnd() === position && nodeContainsPosition(children[middle - 1])) { - return 1 /* GreaterThan */; - } - return -1 /* LessThan */; - }); - if (foundToken) { - return foundToken; - } - if (i >= 0 && children[i]) { - current = children[i]; - continue outer; - } - return current; - } - function nodeContainsPosition(node, start, end) { - end ?? (end = node.getEnd()); - if (end < position) { - return false; - } - start ?? (start = allowPositionInLeadingTrivia ? node.getFullStart() : node.getStart( - sourceFile, - /*includeJsDocComment*/ - true - )); - if (start > position) { - return false; - } - if (position < end || position === end && (node.kind === 1 /* EndOfFileToken */ || includeEndPosition)) { - return true; - } else if (includePrecedingTokenAtEndPosition && end === position) { - const previousToken = findPrecedingToken(position, sourceFile, node); - if (previousToken && includePrecedingTokenAtEndPosition(previousToken)) { - foundToken = previousToken; - return true; - } - } - return false; - } - } - function findFirstNonJsxWhitespaceToken(sourceFile, position) { - let tokenAtPosition = getTokenAtPosition(sourceFile, position); - while (isWhiteSpaceOnlyJsxText(tokenAtPosition)) { - const nextToken = findNextToken(tokenAtPosition, tokenAtPosition.parent, sourceFile); - if (!nextToken) - return; - tokenAtPosition = nextToken; - } - return tokenAtPosition; - } - function findTokenOnLeftOfPosition(file, position) { - const tokenAtPosition = getTokenAtPosition(file, position); - if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) { - return tokenAtPosition; - } - return findPrecedingToken(position, file); - } - function findNextToken(previousToken, parent2, sourceFile) { - return find2(parent2); - function find2(n) { - if (isToken(n) && n.pos === previousToken.end) { - return n; - } - return firstDefined(n.getChildren(sourceFile), (child) => { - const shouldDiveInChildNode = ( - // previous token is enclosed somewhere in the child - child.pos <= previousToken.pos && child.end > previousToken.end || // previous token ends exactly at the beginning of child - child.pos === previousToken.end - ); - return shouldDiveInChildNode && nodeHasTokens(child, sourceFile) ? find2(child) : void 0; - }); - } - } - function findPrecedingToken(position, sourceFile, startNode2, excludeJsdoc) { - const result = find2(startNode2 || sourceFile); - Debug.assert(!(result && isWhiteSpaceOnlyJsxText(result))); - return result; - function find2(n) { - if (isNonWhitespaceToken(n) && n.kind !== 1 /* EndOfFileToken */) { - return n; - } - const children = n.getChildren(sourceFile); - const i = binarySearchKey(children, position, (_, i2) => i2, (middle, _) => { - if (position < children[middle].end) { - if (!children[middle - 1] || position >= children[middle - 1].end) { - return 0 /* EqualTo */; - } - return 1 /* GreaterThan */; - } - return -1 /* LessThan */; - }); - if (i >= 0 && children[i]) { - const child = children[i]; - if (position < child.end) { - const start = child.getStart( - sourceFile, - /*includeJsDoc*/ - !excludeJsdoc - ); - const lookInPreviousChild = start >= position || // cursor in the leading trivia - !nodeHasTokens(child, sourceFile) || isWhiteSpaceOnlyJsxText(child); - if (lookInPreviousChild) { - const candidate2 = findRightmostChildNodeWithTokens( - children, - /*exclusiveStartPosition*/ - i, - sourceFile, - n.kind - ); - if (candidate2) { - if (!excludeJsdoc && isJSDocCommentContainingNode(candidate2) && candidate2.getChildren(sourceFile).length) { - return find2(candidate2); - } - return findRightmostToken(candidate2, sourceFile); - } - return void 0; - } else { - return find2(child); - } - } - } - Debug.assert(startNode2 !== void 0 || n.kind === 312 /* SourceFile */ || n.kind === 1 /* EndOfFileToken */ || isJSDocCommentContainingNode(n)); - const candidate = findRightmostChildNodeWithTokens( - children, - /*exclusiveStartPosition*/ - children.length, - sourceFile, - n.kind - ); - return candidate && findRightmostToken(candidate, sourceFile); - } - } - function isNonWhitespaceToken(n) { - return isToken(n) && !isWhiteSpaceOnlyJsxText(n); - } - function findRightmostToken(n, sourceFile) { - if (isNonWhitespaceToken(n)) { - return n; - } - const children = n.getChildren(sourceFile); - if (children.length === 0) { - return n; - } - const candidate = findRightmostChildNodeWithTokens( - children, - /*exclusiveStartPosition*/ - children.length, - sourceFile, - n.kind - ); - return candidate && findRightmostToken(candidate, sourceFile); - } - function findRightmostChildNodeWithTokens(children, exclusiveStartPosition, sourceFile, parentKind) { - for (let i = exclusiveStartPosition - 1; i >= 0; i--) { - const child = children[i]; - if (isWhiteSpaceOnlyJsxText(child)) { - if (i === 0 && (parentKind === 12 /* JsxText */ || parentKind === 285 /* JsxSelfClosingElement */)) { - Debug.fail("`JsxText` tokens should not be the first child of `JsxElement | JsxSelfClosingElement`"); - } - } else if (nodeHasTokens(children[i], sourceFile)) { - return children[i]; - } - } - } - function isInString(sourceFile, position, previousToken = findPrecedingToken(position, sourceFile)) { - if (previousToken && isStringTextContainingNode(previousToken)) { - const start = previousToken.getStart(sourceFile); - const end = previousToken.getEnd(); - if (start < position && position < end) { - return true; - } - if (position === end) { - return !!previousToken.isUnterminated; - } - } - return false; - } - function isInsideJsxElementOrAttribute(sourceFile, position) { - const token = getTokenAtPosition(sourceFile, position); - if (!token) { - return false; - } - if (token.kind === 12 /* JsxText */) { - return true; - } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 12 /* JsxText */) { - return true; - } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 294 /* JsxExpression */) { - return true; - } - if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 294 /* JsxExpression */) { - return true; - } - if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 287 /* JsxClosingElement */) { - return true; - } - return false; - } - function isWhiteSpaceOnlyJsxText(node) { - return isJsxText(node) && node.containsOnlyTriviaWhiteSpaces; - } - function isInTemplateString(sourceFile, position) { - const token = getTokenAtPosition(sourceFile, position); - return isTemplateLiteralKind(token.kind) && position > token.getStart(sourceFile); - } - function isInJSXText(sourceFile, position) { - const token = getTokenAtPosition(sourceFile, position); - if (isJsxText(token)) { - return true; - } - if (token.kind === 19 /* OpenBraceToken */ && isJsxExpression(token.parent) && isJsxElement(token.parent.parent)) { - return true; - } - if (token.kind === 30 /* LessThanToken */ && isJsxOpeningLikeElement(token.parent) && isJsxElement(token.parent.parent)) { - return true; - } - return false; - } - function isInsideJsxElement(sourceFile, position) { - function isInsideJsxElementTraversal(node) { - while (node) { - if (node.kind >= 285 /* JsxSelfClosingElement */ && node.kind <= 294 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) { - node = node.parent; - } else if (node.kind === 284 /* JsxElement */) { - if (position > node.getStart(sourceFile)) - return true; - node = node.parent; - } else { - return false; - } - } - return false; - } - return isInsideJsxElementTraversal(getTokenAtPosition(sourceFile, position)); - } - function findPrecedingMatchingToken(token, matchingTokenKind, sourceFile) { - const closeTokenText = tokenToString(token.kind); - const matchingTokenText = tokenToString(matchingTokenKind); - const tokenFullStart = token.getFullStart(); - const bestGuessIndex = sourceFile.text.lastIndexOf(matchingTokenText, tokenFullStart); - if (bestGuessIndex === -1) { - return void 0; - } - if (sourceFile.text.lastIndexOf(closeTokenText, tokenFullStart - 1) < bestGuessIndex) { - const nodeAtGuess = findPrecedingToken(bestGuessIndex + 1, sourceFile); - if (nodeAtGuess && nodeAtGuess.kind === matchingTokenKind) { - return nodeAtGuess; - } - } - const tokenKind = token.kind; - let remainingMatchingTokens = 0; - while (true) { - const preceding = findPrecedingToken(token.getFullStart(), sourceFile); - if (!preceding) { - return void 0; - } - token = preceding; - if (token.kind === matchingTokenKind) { - if (remainingMatchingTokens === 0) { - return token; - } - remainingMatchingTokens--; - } else if (token.kind === tokenKind) { - remainingMatchingTokens++; - } - } - } - function removeOptionality(type, isOptionalExpression, isOptionalChain2) { - return isOptionalExpression ? type.getNonNullableType() : isOptionalChain2 ? type.getNonOptionalType() : type; - } - function isPossiblyTypeArgumentPosition(token, sourceFile, checker) { - const info = getPossibleTypeArgumentsInfo(token, sourceFile); - return info !== void 0 && (isPartOfTypeNode(info.called) || getPossibleGenericSignatures(info.called, info.nTypeArguments, checker).length !== 0 || isPossiblyTypeArgumentPosition(info.called, sourceFile, checker)); - } - function getPossibleGenericSignatures(called, typeArgumentCount, checker) { - let type = checker.getTypeAtLocation(called); - if (isOptionalChain(called.parent)) { - type = removeOptionality( - type, - isOptionalChainRoot(called.parent), - /*isOptionalChain*/ - true - ); - } - const signatures = isNewExpression(called.parent) ? type.getConstructSignatures() : type.getCallSignatures(); - return signatures.filter((candidate) => !!candidate.typeParameters && candidate.typeParameters.length >= typeArgumentCount); - } - function getPossibleTypeArgumentsInfo(tokenIn, sourceFile) { - if (sourceFile.text.lastIndexOf("<", tokenIn ? tokenIn.pos : sourceFile.text.length) === -1) { - return void 0; - } - let token = tokenIn; - let remainingLessThanTokens = 0; - let nTypeArguments = 0; - while (token) { - switch (token.kind) { - case 30 /* LessThanToken */: - token = findPrecedingToken(token.getFullStart(), sourceFile); - if (token && token.kind === 29 /* QuestionDotToken */) { - token = findPrecedingToken(token.getFullStart(), sourceFile); - } - if (!token || !isIdentifier(token)) - return void 0; - if (!remainingLessThanTokens) { - return isDeclarationName(token) ? void 0 : { called: token, nTypeArguments }; - } - remainingLessThanTokens--; - break; - case 50 /* GreaterThanGreaterThanGreaterThanToken */: - remainingLessThanTokens = 3; - break; - case 49 /* GreaterThanGreaterThanToken */: - remainingLessThanTokens = 2; - break; - case 32 /* GreaterThanToken */: - remainingLessThanTokens++; - break; - case 20 /* CloseBraceToken */: - token = findPrecedingMatchingToken(token, 19 /* OpenBraceToken */, sourceFile); - if (!token) - return void 0; - break; - case 22 /* CloseParenToken */: - token = findPrecedingMatchingToken(token, 21 /* OpenParenToken */, sourceFile); - if (!token) - return void 0; - break; - case 24 /* CloseBracketToken */: - token = findPrecedingMatchingToken(token, 23 /* OpenBracketToken */, sourceFile); - if (!token) - return void 0; - break; - case 28 /* CommaToken */: - nTypeArguments++; - break; - case 39 /* EqualsGreaterThanToken */: - case 80 /* Identifier */: - case 11 /* StringLiteral */: - case 9 /* NumericLiteral */: - case 10 /* BigIntLiteral */: - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 114 /* TypeOfKeyword */: - case 96 /* ExtendsKeyword */: - case 143 /* KeyOfKeyword */: - case 25 /* DotToken */: - case 52 /* BarToken */: - case 58 /* QuestionToken */: - case 59 /* ColonToken */: - break; - default: - if (isTypeNode(token)) { - break; - } - return void 0; - } - token = findPrecedingToken(token.getFullStart(), sourceFile); - } - return void 0; - } - function isInComment(sourceFile, position, tokenAtPosition) { - return ts_formatting_exports.getRangeOfEnclosingComment( - sourceFile, - position, - /*precedingToken*/ - void 0, - tokenAtPosition - ); - } - function hasDocComment(sourceFile, position) { - const token = getTokenAtPosition(sourceFile, position); - return !!findAncestor(token, isJSDoc); - } - function nodeHasTokens(n, sourceFile) { - return n.kind === 1 /* EndOfFileToken */ ? !!n.jsDoc : n.getWidth(sourceFile) !== 0; - } - function getNodeModifiers(node, excludeFlags = 0 /* None */) { - const result = []; - const flags = isDeclaration(node) ? getCombinedNodeFlagsAlwaysIncludeJSDoc(node) & ~excludeFlags : 0 /* None */; - if (flags & 8 /* Private */) - result.push("private" /* privateMemberModifier */); - if (flags & 16 /* Protected */) - result.push("protected" /* protectedMemberModifier */); - if (flags & 4 /* Public */) - result.push("public" /* publicMemberModifier */); - if (flags & 32 /* Static */ || isClassStaticBlockDeclaration(node)) - result.push("static" /* staticModifier */); - if (flags & 256 /* Abstract */) - result.push("abstract" /* abstractModifier */); - if (flags & 1 /* Export */) - result.push("export" /* exportedModifier */); - if (flags & 8192 /* Deprecated */) - result.push("deprecated" /* deprecatedModifier */); - if (node.flags & 33554432 /* Ambient */) - result.push("declare" /* ambientModifier */); - if (node.kind === 277 /* ExportAssignment */) - result.push("export" /* exportedModifier */); - return result.length > 0 ? result.join(",") : "" /* none */; - } - function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 183 /* TypeReference */ || node.kind === 213 /* CallExpression */) { - return node.typeArguments; - } - if (isFunctionLike(node) || node.kind === 263 /* ClassDeclaration */ || node.kind === 264 /* InterfaceDeclaration */) { - return node.typeParameters; - } - return void 0; - } - function isComment(kind) { - return kind === 2 /* SingleLineCommentTrivia */ || kind === 3 /* MultiLineCommentTrivia */; - } - function isStringOrRegularExpressionOrTemplateLiteral(kind) { - if (kind === 11 /* StringLiteral */ || kind === 14 /* RegularExpressionLiteral */ || isTemplateLiteralKind(kind)) { - return true; - } - return false; - } - function areIntersectedTypesAvoidingStringReduction(checker, t1, t2) { - return !!(t1.flags & 4 /* String */) && checker.isEmptyAnonymousObjectType(t2); - } - function isStringAndEmptyAnonymousObjectIntersection(type) { - if (!type.isIntersection()) { - return false; - } - const { types, checker } = type; - return types.length === 2 && (areIntersectedTypesAvoidingStringReduction(checker, types[0], types[1]) || areIntersectedTypesAvoidingStringReduction(checker, types[1], types[0])); - } - function isInsideTemplateLiteral(node, position, sourceFile) { - return isTemplateLiteralKind(node.kind) && (node.getStart(sourceFile) < position && position < node.end) || !!node.isUnterminated && position === node.end; - } - function isAccessibilityModifier(kind) { - switch (kind) { - case 125 /* PublicKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - return true; - } - return false; - } - function cloneCompilerOptions(options) { - const result = clone(options); - setConfigFileInOptions(result, options && options.configFile); - return result; - } - function isArrayLiteralOrObjectLiteralDestructuringPattern(node) { - if (node.kind === 209 /* ArrayLiteralExpression */ || node.kind === 210 /* ObjectLiteralExpression */) { - if (node.parent.kind === 226 /* BinaryExpression */ && node.parent.left === node && node.parent.operatorToken.kind === 64 /* EqualsToken */) { - return true; - } - if (node.parent.kind === 250 /* ForOfStatement */ && node.parent.initializer === node) { - return true; - } - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.kind === 303 /* PropertyAssignment */ ? node.parent.parent : node.parent)) { - return true; - } - } - return false; - } - function isInReferenceComment(sourceFile, position) { - return isInReferenceCommentWorker( - sourceFile, - position, - /*shouldBeReference*/ - true - ); - } - function isInNonReferenceComment(sourceFile, position) { - return isInReferenceCommentWorker( - sourceFile, - position, - /*shouldBeReference*/ - false - ); - } - function isInReferenceCommentWorker(sourceFile, position, shouldBeReference) { - const range = isInComment( - sourceFile, - position, - /*tokenAtPosition*/ - void 0 - ); - return !!range && shouldBeReference === tripleSlashDirectivePrefixRegex.test(sourceFile.text.substring(range.pos, range.end)); - } - function getReplacementSpanForContextToken(contextToken) { - if (!contextToken) - return void 0; - switch (contextToken.kind) { - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - return createTextSpanFromStringLiteralLikeContent(contextToken); - default: - return createTextSpanFromNode(contextToken); - } - } - function createTextSpanFromNode(node, sourceFile, endNode2) { - return createTextSpanFromBounds(node.getStart(sourceFile), (endNode2 || node).getEnd()); - } - function createTextSpanFromStringLiteralLikeContent(node) { - if (node.isUnterminated) - return void 0; - return createTextSpanFromBounds(node.getStart() + 1, node.getEnd() - 1); - } - function createTextRangeFromNode(node, sourceFile) { - return createRange(node.getStart(sourceFile), node.end); - } - function createTextSpanFromRange(range) { - return createTextSpanFromBounds(range.pos, range.end); - } - function createTextRangeFromSpan(span) { - return createRange(span.start, span.start + span.length); - } - function createTextChangeFromStartLength(start, length2, newText) { - return createTextChange(createTextSpan(start, length2), newText); - } - function createTextChange(span, newText) { - return { span, newText }; - } - function isTypeKeyword(kind) { - return contains(typeKeywords, kind); - } - function isTypeKeywordToken(node) { - return node.kind === 156 /* TypeKeyword */; - } - function isTypeKeywordTokenOrIdentifier(node) { - return isTypeKeywordToken(node) || isIdentifier(node) && node.text === "type"; - } - function isExternalModuleSymbol(moduleSymbol) { - return !!(moduleSymbol.flags & 1536 /* Module */) && moduleSymbol.name.charCodeAt(0) === 34 /* doubleQuote */; - } - function nodeSeenTracker() { - const seen = []; - return (node) => { - const id = getNodeId(node); - return !seen[id] && (seen[id] = true); - }; - } - function getSnapshotText(snap) { - return snap.getText(0, snap.getLength()); - } - function repeatString(str, count) { - let result = ""; - for (let i = 0; i < count; i++) { - result += str; - } - return result; - } - function skipConstraint(type) { - return type.isTypeParameter() ? type.getConstraint() || type : type; - } - function getNameFromPropertyName(name) { - return name.kind === 167 /* ComputedPropertyName */ ? isStringOrNumericLiteralLike(name.expression) ? name.expression.text : void 0 : isPrivateIdentifier(name) ? idText(name) : getTextOfIdentifierOrLiteral(name); - } - function programContainsModules(program) { - return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!(s.externalModuleIndicator || s.commonJsModuleIndicator)); - } - function programContainsEsModules(program) { - return program.getSourceFiles().some((s) => !s.isDeclarationFile && !program.isSourceFileFromExternalLibrary(s) && !!s.externalModuleIndicator); - } - function compilerOptionsIndicateEsModules(compilerOptions) { - return !!compilerOptions.module || getEmitScriptTarget(compilerOptions) >= 2 /* ES2015 */ || !!compilerOptions.noEmit; - } - function createModuleSpecifierResolutionHost(program, host) { - return { - fileExists: (fileName) => program.fileExists(fileName), - getCurrentDirectory: () => host.getCurrentDirectory(), - readFile: maybeBind(host, host.readFile), - useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames), - getSymlinkCache: maybeBind(host, host.getSymlinkCache) || program.getSymlinkCache, - getModuleSpecifierCache: maybeBind(host, host.getModuleSpecifierCache), - getPackageJsonInfoCache: () => { - var _a; - return (_a = program.getModuleResolutionCache()) == null ? void 0 : _a.getPackageJsonInfoCache(); - }, - getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation), - redirectTargetsMap: program.redirectTargetsMap, - getProjectReferenceRedirect: (fileName) => program.getProjectReferenceRedirect(fileName), - isSourceOfProjectReferenceRedirect: (fileName) => program.isSourceOfProjectReferenceRedirect(fileName), - getNearestAncestorDirectoryWithPackageJson: maybeBind(host, host.getNearestAncestorDirectoryWithPackageJson), - getFileIncludeReasons: () => program.getFileIncludeReasons() - }; - } - function getModuleSpecifierResolverHost(program, host) { - return { - ...createModuleSpecifierResolutionHost(program, host), - getCommonSourceDirectory: () => program.getCommonSourceDirectory() - }; - } - function moduleResolutionUsesNodeModules(moduleResolution) { - return moduleResolution === 2 /* Node10 */ || moduleResolution >= 3 /* Node16 */ && moduleResolution <= 99 /* NodeNext */ || moduleResolution === 100 /* Bundler */; - } - function makeImportIfNecessary(defaultImport, namedImports, moduleSpecifier, quotePreference) { - return defaultImport || namedImports && namedImports.length ? makeImport(defaultImport, namedImports, moduleSpecifier, quotePreference) : void 0; - } - function makeImport(defaultImport, namedImports, moduleSpecifier, quotePreference, isTypeOnly) { - return factory.createImportDeclaration( - /*modifiers*/ - void 0, - defaultImport || namedImports ? factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0, - typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier, - /*assertClause*/ - void 0 - ); - } - function makeStringLiteral(text, quotePreference) { - return factory.createStringLiteral(text, quotePreference === 0 /* Single */); - } - function quotePreferenceFromString(str, sourceFile) { - return isStringDoubleQuoted(str, sourceFile) ? 1 /* Double */ : 0 /* Single */; - } - function getQuotePreference(sourceFile, preferences) { - if (preferences.quotePreference && preferences.quotePreference !== "auto") { - return preferences.quotePreference === "single" ? 0 /* Single */ : 1 /* Double */; - } else { - const firstModuleSpecifier = sourceFile.imports && find(sourceFile.imports, (n) => isStringLiteral(n) && !nodeIsSynthesized(n.parent)); - return firstModuleSpecifier ? quotePreferenceFromString(firstModuleSpecifier, sourceFile) : 1 /* Double */; - } - } - function getQuoteFromPreference(qp) { - switch (qp) { - case 0 /* Single */: - return "'"; - case 1 /* Double */: - return '"'; - default: - return Debug.assertNever(qp); - } - } - function symbolNameNoDefault(symbol) { - const escaped = symbolEscapedNameNoDefault(symbol); - return escaped === void 0 ? void 0 : unescapeLeadingUnderscores(escaped); - } - function symbolEscapedNameNoDefault(symbol) { - if (symbol.escapedName !== "default" /* Default */) { - return symbol.escapedName; - } - return firstDefined(symbol.declarations, (decl) => { - const name = getNameOfDeclaration(decl); - return name && name.kind === 80 /* Identifier */ ? name.escapedText : void 0; - }); - } - function isModuleSpecifierLike(node) { - return isStringLiteralLike(node) && (isExternalModuleReference(node.parent) || isImportDeclaration(node.parent) || isRequireCall( - node.parent, - /*requireStringLiteralLikeArgument*/ - false - ) && node.parent.arguments[0] === node || isImportCall(node.parent) && node.parent.arguments[0] === node); - } - function isObjectBindingElementWithoutPropertyName(bindingElement) { - return isBindingElement(bindingElement) && isObjectBindingPattern(bindingElement.parent) && isIdentifier(bindingElement.name) && !bindingElement.propertyName; - } - function getPropertySymbolFromBindingElement(checker, bindingElement) { - const typeOfPattern = checker.getTypeAtLocation(bindingElement.parent); - return typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text); - } - function getParentNodeInSpan(node, file, span) { - if (!node) - return void 0; - while (node.parent) { - if (isSourceFile(node.parent) || !spanContainsNode(span, node.parent, file)) { - return node; - } - node = node.parent; - } - } - function spanContainsNode(span, node, file) { - return textSpanContainsPosition(span, node.getStart(file)) && node.getEnd() <= textSpanEnd(span); - } - function findModifier(node, kind) { - return canHaveModifiers(node) ? find(node.modifiers, (m) => m.kind === kind) : void 0; - } - function insertImports(changes, sourceFile, imports, blankLineBetween, preferences) { - const decl = isArray(imports) ? imports[0] : imports; - const importKindPredicate = decl.kind === 243 /* VariableStatement */ ? isRequireVariableStatement : isAnyImportSyntax; - const existingImportStatements = filter(sourceFile.statements, importKindPredicate); - let sortKind = isArray(imports) ? ts_OrganizeImports_exports.detectImportDeclarationSorting(imports, preferences) : 3 /* Both */; - const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); - const sortedNewImports = isArray(imports) ? stableSort(imports, (a, b) => ts_OrganizeImports_exports.compareImportsOrRequireStatements(a, b, comparer)) : [imports]; - if (!existingImportStatements.length) { - changes.insertNodesAtTopOfFile(sourceFile, sortedNewImports, blankLineBetween); - } else if (existingImportStatements && (sortKind = ts_OrganizeImports_exports.detectImportDeclarationSorting(existingImportStatements, preferences))) { - const comparer2 = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); - for (const newImport of sortedNewImports) { - const insertionIndex = ts_OrganizeImports_exports.getImportDeclarationInsertionIndex(existingImportStatements, newImport, comparer2); - if (insertionIndex === 0) { - const options = existingImportStatements[0] === sourceFile.statements[0] ? { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude } : {}; - changes.insertNodeBefore( - sourceFile, - existingImportStatements[0], - newImport, - /*blankLineBetween*/ - false, - options - ); - } else { - const prevImport = existingImportStatements[insertionIndex - 1]; - changes.insertNodeAfter(sourceFile, prevImport, newImport); - } - } - } else { - const lastExistingImport = lastOrUndefined(existingImportStatements); - if (lastExistingImport) { - changes.insertNodesAfter(sourceFile, lastExistingImport, sortedNewImports); - } else { - changes.insertNodesAtTopOfFile(sourceFile, sortedNewImports, blankLineBetween); - } - } - } - function getTypeKeywordOfTypeOnlyImport(importClause, sourceFile) { - Debug.assert(importClause.isTypeOnly); - return cast(importClause.getChildAt(0, sourceFile), isTypeKeywordToken); - } - function textSpansEqual(a, b) { - return !!a && !!b && a.start === b.start && a.length === b.length; - } - function documentSpansEqual(a, b) { - return a.fileName === b.fileName && textSpansEqual(a.textSpan, b.textSpan); - } - function forEachUnique(array, callback) { - if (array) { - for (let i = 0; i < array.length; i++) { - if (array.indexOf(array[i]) === i) { - const result = callback(array[i], i); - if (result) { - return result; - } - } - } - } - return void 0; - } - function isTextWhiteSpaceLike(text, startPos, endPos) { - for (let i = startPos; i < endPos; i++) { - if (!isWhiteSpaceLike(text.charCodeAt(i))) { - return false; - } - } - return true; - } - function getMappedLocation(location, sourceMapper, fileExists) { - const mapsTo = sourceMapper.tryGetSourcePosition(location); - return mapsTo && (!fileExists || fileExists(normalizePath(mapsTo.fileName)) ? mapsTo : void 0); - } - function getMappedDocumentSpan(documentSpan, sourceMapper, fileExists) { - const { fileName, textSpan } = documentSpan; - const newPosition = getMappedLocation({ fileName, pos: textSpan.start }, sourceMapper, fileExists); - if (!newPosition) - return void 0; - const newEndPosition = getMappedLocation({ fileName, pos: textSpan.start + textSpan.length }, sourceMapper, fileExists); - const newLength = newEndPosition ? newEndPosition.pos - newPosition.pos : textSpan.length; - return { - fileName: newPosition.fileName, - textSpan: { - start: newPosition.pos, - length: newLength - }, - originalFileName: documentSpan.fileName, - originalTextSpan: documentSpan.textSpan, - contextSpan: getMappedContextSpan(documentSpan, sourceMapper, fileExists), - originalContextSpan: documentSpan.contextSpan - }; - } - function getMappedContextSpan(documentSpan, sourceMapper, fileExists) { - const contextSpanStart = documentSpan.contextSpan && getMappedLocation( - { fileName: documentSpan.fileName, pos: documentSpan.contextSpan.start }, - sourceMapper, - fileExists - ); - const contextSpanEnd = documentSpan.contextSpan && getMappedLocation( - { fileName: documentSpan.fileName, pos: documentSpan.contextSpan.start + documentSpan.contextSpan.length }, - sourceMapper, - fileExists - ); - return contextSpanStart && contextSpanEnd ? { start: contextSpanStart.pos, length: contextSpanEnd.pos - contextSpanStart.pos } : void 0; - } - function isFirstDeclarationOfSymbolParameter(symbol) { - const declaration = symbol.declarations ? firstOrUndefined(symbol.declarations) : void 0; - return !!findAncestor(declaration, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : "quit"); - } - function getDisplayPartWriter() { - const absoluteMaximumLength = defaultMaximumTruncationLength * 10; - let displayParts; - let lineStart; - let indent3; - let length2; - resetWriter(); - const unknownWrite = (text) => writeKind(text, 17 /* text */); - return { - displayParts: () => { - const finalText = displayParts.length && displayParts[displayParts.length - 1].text; - if (length2 > absoluteMaximumLength && finalText && finalText !== "...") { - if (!isWhiteSpaceLike(finalText.charCodeAt(finalText.length - 1))) { - displayParts.push(displayPart(" ", 16 /* space */)); - } - displayParts.push(displayPart("...", 15 /* punctuation */)); - } - return displayParts; - }, - writeKeyword: (text) => writeKind(text, 5 /* keyword */), - writeOperator: (text) => writeKind(text, 12 /* operator */), - writePunctuation: (text) => writeKind(text, 15 /* punctuation */), - writeTrailingSemicolon: (text) => writeKind(text, 15 /* punctuation */), - writeSpace: (text) => writeKind(text, 16 /* space */), - writeStringLiteral: (text) => writeKind(text, 8 /* stringLiteral */), - writeParameter: (text) => writeKind(text, 13 /* parameterName */), - writeProperty: (text) => writeKind(text, 14 /* propertyName */), - writeLiteral: (text) => writeKind(text, 8 /* stringLiteral */), - writeSymbol, - writeLine, - write: unknownWrite, - writeComment: unknownWrite, - getText: () => "", - getTextPos: () => 0, - getColumn: () => 0, - getLine: () => 0, - isAtStartOfLine: () => false, - hasTrailingWhitespace: () => false, - hasTrailingComment: () => false, - rawWrite: notImplemented, - getIndent: () => indent3, - increaseIndent: () => { - indent3++; - }, - decreaseIndent: () => { - indent3--; - }, - clear: resetWriter - }; - function writeIndent() { - if (length2 > absoluteMaximumLength) - return; - if (lineStart) { - const indentString = getIndentString(indent3); - if (indentString) { - length2 += indentString.length; - displayParts.push(displayPart(indentString, 16 /* space */)); - } - lineStart = false; - } - } - function writeKind(text, kind) { - if (length2 > absoluteMaximumLength) - return; - writeIndent(); - length2 += text.length; - displayParts.push(displayPart(text, kind)); - } - function writeSymbol(text, symbol) { - if (length2 > absoluteMaximumLength) - return; - writeIndent(); - length2 += text.length; - displayParts.push(symbolPart(text, symbol)); - } - function writeLine() { - if (length2 > absoluteMaximumLength) - return; - length2 += 1; - displayParts.push(lineBreakPart()); - lineStart = true; - } - function resetWriter() { - displayParts = []; - lineStart = true; - indent3 = 0; - length2 = 0; - } - } - function symbolPart(text, symbol) { - return displayPart(text, displayPartKind(symbol)); - function displayPartKind(symbol2) { - const flags = symbol2.flags; - if (flags & 3 /* Variable */) { - return isFirstDeclarationOfSymbolParameter(symbol2) ? 13 /* parameterName */ : 9 /* localName */; - } - if (flags & 4 /* Property */) - return 14 /* propertyName */; - if (flags & 32768 /* GetAccessor */) - return 14 /* propertyName */; - if (flags & 65536 /* SetAccessor */) - return 14 /* propertyName */; - if (flags & 8 /* EnumMember */) - return 19 /* enumMemberName */; - if (flags & 16 /* Function */) - return 20 /* functionName */; - if (flags & 32 /* Class */) - return 1 /* className */; - if (flags & 64 /* Interface */) - return 4 /* interfaceName */; - if (flags & 384 /* Enum */) - return 2 /* enumName */; - if (flags & 1536 /* Module */) - return 11 /* moduleName */; - if (flags & 8192 /* Method */) - return 10 /* methodName */; - if (flags & 262144 /* TypeParameter */) - return 18 /* typeParameterName */; - if (flags & 524288 /* TypeAlias */) - return 0 /* aliasName */; - if (flags & 2097152 /* Alias */) - return 0 /* aliasName */; - return 17 /* text */; - } - } - function displayPart(text, kind) { - return { text, kind: SymbolDisplayPartKind[kind] }; - } - function spacePart() { - return displayPart(" ", 16 /* space */); - } - function keywordPart(kind) { - return displayPart(tokenToString(kind), 5 /* keyword */); - } - function punctuationPart(kind) { - return displayPart(tokenToString(kind), 15 /* punctuation */); - } - function operatorPart(kind) { - return displayPart(tokenToString(kind), 12 /* operator */); - } - function parameterNamePart(text) { - return displayPart(text, 13 /* parameterName */); - } - function propertyNamePart(text) { - return displayPart(text, 14 /* propertyName */); - } - function textOrKeywordPart(text) { - const kind = stringToToken(text); - return kind === void 0 ? textPart(text) : keywordPart(kind); - } - function textPart(text) { - return displayPart(text, 17 /* text */); - } - function typeAliasNamePart(text) { - return displayPart(text, 0 /* aliasName */); - } - function typeParameterNamePart(text) { - return displayPart(text, 18 /* typeParameterName */); - } - function linkTextPart(text) { - return displayPart(text, 24 /* linkText */); - } - function linkNamePart(text, target) { - return { - text, - kind: SymbolDisplayPartKind[23 /* linkName */], - target: { - fileName: getSourceFileOfNode(target).fileName, - textSpan: createTextSpanFromNode(target) - } - }; - } - function linkPart(text) { - return displayPart(text, 22 /* link */); - } - function buildLinkParts(link, checker) { - var _a; - const prefix = isJSDocLink(link) ? "link" : isJSDocLinkCode(link) ? "linkcode" : "linkplain"; - const parts = [linkPart(`{@${prefix} `)]; - if (!link.name) { - if (link.text) { - parts.push(linkTextPart(link.text)); - } - } else { - const symbol = checker == null ? void 0 : checker.getSymbolAtLocation(link.name); - const suffix = findLinkNameEnd(link.text); - const name = getTextOfNode(link.name) + link.text.slice(0, suffix); - const text = skipSeparatorFromLinkText(link.text.slice(suffix)); - const decl = (symbol == null ? void 0 : symbol.valueDeclaration) || ((_a = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _a[0]); - if (decl) { - parts.push(linkNamePart(name, decl)); - if (text) - parts.push(linkTextPart(text)); - } else { - parts.push(linkTextPart(name + (suffix ? "" : " ") + text)); - } - } - parts.push(linkPart("}")); - return parts; - } - function skipSeparatorFromLinkText(text) { - let pos = 0; - if (text.charCodeAt(pos++) === 124 /* bar */) { - while (pos < text.length && text.charCodeAt(pos) === 32 /* space */) - pos++; - return text.slice(pos); - } - return text; - } - function findLinkNameEnd(text) { - let pos = text.indexOf("://"); - if (pos === 0) { - while (pos < text.length && text.charCodeAt(pos) !== 124 /* bar */) - pos++; - return pos; - } - if (text.indexOf("()") === 0) - return 2; - if (text.charAt(0) === "<") { - let brackets2 = 0; - let i = 0; - while (i < text.length) { - if (text[i] === "<") - brackets2++; - if (text[i] === ">") - brackets2--; - i++; - if (!brackets2) - return i; - } - } - return 0; - } - function getNewLineOrDefaultFromHost(host, formatSettings) { - var _a; - return (formatSettings == null ? void 0 : formatSettings.newLineCharacter) || ((_a = host.getNewLine) == null ? void 0 : _a.call(host)) || lineFeed2; - } - function lineBreakPart() { - return displayPart("\n", 6 /* lineBreak */); - } - function mapToDisplayParts(writeDisplayParts) { - try { - writeDisplayParts(displayPartWriter); - return displayPartWriter.displayParts(); - } finally { - displayPartWriter.clear(); - } - } - function typeToDisplayParts(typechecker, type, enclosingDeclaration, flags = 0 /* None */) { - return mapToDisplayParts((writer) => { - typechecker.writeType(type, enclosingDeclaration, flags | 1024 /* MultilineObjectLiterals */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer); - }); - } - function symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration, meaning, flags = 0 /* None */) { - return mapToDisplayParts((writer) => { - typeChecker.writeSymbol(symbol, enclosingDeclaration, meaning, flags | 8 /* UseAliasDefinedOutsideCurrentScope */, writer); - }); - } - function signatureToDisplayParts(typechecker, signature, enclosingDeclaration, flags = 0 /* None */) { - flags |= 16384 /* UseAliasDefinedOutsideCurrentScope */ | 1024 /* MultilineObjectLiterals */ | 32 /* WriteTypeArgumentsOfSignature */ | 8192 /* OmitParameterModifiers */; - return mapToDisplayParts((writer) => { - typechecker.writeSignature( - signature, - enclosingDeclaration, - flags, - /*kind*/ - void 0, - writer - ); - }); - } - function nodeToDisplayParts(node, enclosingDeclaration) { - const file = enclosingDeclaration.getSourceFile(); - return mapToDisplayParts((writer) => { - const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); - printer.writeNode(4 /* Unspecified */, node, file, writer); - }); - } - function isImportOrExportSpecifierName(location) { - return !!location.parent && isImportOrExportSpecifier(location.parent) && location.parent.propertyName === location; - } - function getScriptKind(fileName, host) { - return ensureScriptKind(fileName, host.getScriptKind && host.getScriptKind(fileName)); - } - function getSymbolTarget(symbol, checker) { - let next = symbol; - while (isAliasSymbol(next) || isTransientSymbol(next) && next.links.target) { - if (isTransientSymbol(next) && next.links.target) { - next = next.links.target; - } else { - next = skipAlias(next, checker); - } - } - return next; - } - function isAliasSymbol(symbol) { - return (symbol.flags & 2097152 /* Alias */) !== 0; - } - function getUniqueSymbolId(symbol, checker) { - return getSymbolId(skipAlias(symbol, checker)); - } - function getFirstNonSpaceCharacterPosition(text, position) { - while (isWhiteSpaceLike(text.charCodeAt(position))) { - position += 1; - } - return position; - } - function getPrecedingNonSpaceCharacterPosition(text, position) { - while (position > -1 && isWhiteSpaceSingleLine(text.charCodeAt(position))) { - position -= 1; - } - return position + 1; - } - function getSynthesizedDeepClone(node, includeTrivia = true) { - const clone2 = node && getSynthesizedDeepCloneWorker(node); - if (clone2 && !includeTrivia) - suppressLeadingAndTrailingTrivia(clone2); - return clone2; - } - function getSynthesizedDeepCloneWithReplacements(node, includeTrivia, replaceNode) { - let clone2 = replaceNode(node); - if (clone2) { - setOriginalNode(clone2, node); - } else { - clone2 = getSynthesizedDeepCloneWorker(node, replaceNode); - } - if (clone2 && !includeTrivia) - suppressLeadingAndTrailingTrivia(clone2); - return clone2; - } - function getSynthesizedDeepCloneWorker(node, replaceNode) { - const nodeClone = replaceNode ? (n) => getSynthesizedDeepCloneWithReplacements( - n, - /*includeTrivia*/ - true, - replaceNode - ) : getSynthesizedDeepClone; - const nodesClone = replaceNode ? (ns) => ns && getSynthesizedDeepClonesWithReplacements( - ns, - /*includeTrivia*/ - true, - replaceNode - ) : (ns) => ns && getSynthesizedDeepClones(ns); - const visited = visitEachChild(node, nodeClone, nullTransformationContext, nodesClone, nodeClone); - if (visited === node) { - const clone2 = isStringLiteral(node) ? setOriginalNode(factory.createStringLiteralFromNode(node), node) : isNumericLiteral(node) ? setOriginalNode(factory.createNumericLiteral(node.text, node.numericLiteralFlags), node) : factory.cloneNode(node); - return setTextRange(clone2, node); - } - visited.parent = void 0; - return visited; - } - function getSynthesizedDeepClones(nodes, includeTrivia = true) { - if (nodes) { - const cloned = factory.createNodeArray(nodes.map((n) => getSynthesizedDeepClone(n, includeTrivia)), nodes.hasTrailingComma); - setTextRange(cloned, nodes); - return cloned; - } - return nodes; - } - function getSynthesizedDeepClonesWithReplacements(nodes, includeTrivia, replaceNode) { - return factory.createNodeArray(nodes.map((n) => getSynthesizedDeepCloneWithReplacements(n, includeTrivia, replaceNode)), nodes.hasTrailingComma); - } - function suppressLeadingAndTrailingTrivia(node) { - suppressLeadingTrivia(node); - suppressTrailingTrivia(node); - } - function suppressLeadingTrivia(node) { - addEmitFlagsRecursively(node, 1024 /* NoLeadingComments */, getFirstChild); - } - function suppressTrailingTrivia(node) { - addEmitFlagsRecursively(node, 2048 /* NoTrailingComments */, getLastChild); - } - function copyComments(sourceNode, targetNode) { - const sourceFile = sourceNode.getSourceFile(); - const text = sourceFile.text; - if (hasLeadingLineBreak(sourceNode, text)) { - copyLeadingComments(sourceNode, targetNode, sourceFile); - } else { - copyTrailingAsLeadingComments(sourceNode, targetNode, sourceFile); - } - copyTrailingComments(sourceNode, targetNode, sourceFile); - } - function hasLeadingLineBreak(node, text) { - const start = node.getFullStart(); - const end = node.getStart(); - for (let i = start; i < end; i++) { - if (text.charCodeAt(i) === 10 /* lineFeed */) - return true; - } - return false; - } - function addEmitFlagsRecursively(node, flag, getChild) { - addEmitFlags(node, flag); - const child = getChild(node); - if (child) - addEmitFlagsRecursively(child, flag, getChild); - } - function getFirstChild(node) { - return node.forEachChild((child) => child); - } - function getUniqueName(baseName, sourceFile) { - let nameText = baseName; - for (let i = 1; !isFileLevelUniqueName(sourceFile, nameText); i++) { - nameText = `${baseName}_${i}`; - } - return nameText; - } - function getRenameLocation(edits, renameFilename, name, preferLastLocation) { - let delta = 0; - let lastPos = -1; - for (const { fileName, textChanges: textChanges2 } of edits) { - Debug.assert(fileName === renameFilename); - for (const change of textChanges2) { - const { span, newText } = change; - const index = indexInTextChange(newText, escapeString(name)); - if (index !== -1) { - lastPos = span.start + delta + index; - if (!preferLastLocation) { - return lastPos; - } - } - delta += newText.length - span.length; - } - } - Debug.assert(preferLastLocation); - Debug.assert(lastPos >= 0); - return lastPos; - } - function copyLeadingComments(sourceNode, targetNode, sourceFile, commentKind, hasTrailingNewLine) { - forEachLeadingCommentRange(sourceFile.text, sourceNode.pos, getAddCommentsFunction(targetNode, sourceFile, commentKind, hasTrailingNewLine, addSyntheticLeadingComment)); - } - function copyTrailingComments(sourceNode, targetNode, sourceFile, commentKind, hasTrailingNewLine) { - forEachTrailingCommentRange(sourceFile.text, sourceNode.end, getAddCommentsFunction(targetNode, sourceFile, commentKind, hasTrailingNewLine, addSyntheticTrailingComment)); - } - function copyTrailingAsLeadingComments(sourceNode, targetNode, sourceFile, commentKind, hasTrailingNewLine) { - forEachTrailingCommentRange(sourceFile.text, sourceNode.pos, getAddCommentsFunction(targetNode, sourceFile, commentKind, hasTrailingNewLine, addSyntheticLeadingComment)); - } - function getAddCommentsFunction(targetNode, sourceFile, commentKind, hasTrailingNewLine, cb) { - return (pos, end, kind, htnl) => { - if (kind === 3 /* MultiLineCommentTrivia */) { - pos += 2; - end -= 2; - } else { - pos += 2; - } - cb(targetNode, commentKind || kind, sourceFile.text.slice(pos, end), hasTrailingNewLine !== void 0 ? hasTrailingNewLine : htnl); - }; - } - function indexInTextChange(change, name) { - if (startsWith(change, name)) - return 0; - let idx = change.indexOf(" " + name); - if (idx === -1) - idx = change.indexOf("." + name); - if (idx === -1) - idx = change.indexOf('"' + name); - return idx === -1 ? -1 : idx + 1; - } - function needsParentheses(expression) { - return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || isAsExpression(expression) && isObjectLiteralExpression(expression.expression); - } - function getContextualTypeFromParent(node, checker, contextFlags) { - const parent2 = walkUpParenthesizedExpressions(node.parent); - switch (parent2.kind) { - case 214 /* NewExpression */: - return checker.getContextualType(parent2, contextFlags); - case 226 /* BinaryExpression */: { - const { left, operatorToken, right } = parent2; - return isEqualityOperatorKind(operatorToken.kind) ? checker.getTypeAtLocation(node === right ? left : right) : checker.getContextualType(node, contextFlags); - } - case 296 /* CaseClause */: - return getSwitchedType(parent2, checker); - default: - return checker.getContextualType(node, contextFlags); - } - } - function quote(sourceFile, preferences, text) { - const quotePreference = getQuotePreference(sourceFile, preferences); - const quoted = JSON.stringify(text); - return quotePreference === 0 /* Single */ ? `'${stripQuotes(quoted).replace(/'/g, "\\'").replace(/\\"/g, '"')}'` : quoted; - } - function isEqualityOperatorKind(kind) { - switch (kind) { - case 37 /* EqualsEqualsEqualsToken */: - case 35 /* EqualsEqualsToken */: - case 38 /* ExclamationEqualsEqualsToken */: - case 36 /* ExclamationEqualsToken */: - return true; - default: - return false; - } - } - function isStringLiteralOrTemplate(node) { - switch (node.kind) { - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: - case 215 /* TaggedTemplateExpression */: - return true; - default: - return false; - } - } - function hasIndexSignature(type) { - return !!type.getStringIndexType() || !!type.getNumberIndexType(); - } - function getSwitchedType(caseClause, checker) { - return checker.getTypeAtLocation(caseClause.parent.parent.expression); - } - function getTypeNodeIfAccessible(type, enclosingScope, program, host) { - const checker = program.getTypeChecker(); - let typeIsAccessible = true; - const notAccessible = () => typeIsAccessible = false; - const res = checker.typeToTypeNode(type, enclosingScope, 1 /* NoTruncation */, { - trackSymbol: (symbol, declaration, meaning) => { - typeIsAccessible = typeIsAccessible && checker.isSymbolAccessible( - symbol, - declaration, - meaning, - /*shouldComputeAliasToMarkVisible*/ - false - ).accessibility === 0 /* Accessible */; - return !typeIsAccessible; - }, - reportInaccessibleThisError: notAccessible, - reportPrivateInBaseOfClassExpression: notAccessible, - reportInaccessibleUniqueSymbolError: notAccessible, - moduleResolverHost: getModuleSpecifierResolverHost(program, host) - }); - return typeIsAccessible ? res : void 0; - } - function syntaxRequiresTrailingCommaOrSemicolonOrASI(kind) { - return kind === 179 /* CallSignature */ || kind === 180 /* ConstructSignature */ || kind === 181 /* IndexSignature */ || kind === 171 /* PropertySignature */ || kind === 173 /* MethodSignature */; - } - function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) { - return kind === 262 /* FunctionDeclaration */ || kind === 176 /* Constructor */ || kind === 174 /* MethodDeclaration */ || kind === 177 /* GetAccessor */ || kind === 178 /* SetAccessor */; - } - function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) { - return kind === 267 /* ModuleDeclaration */; - } - function syntaxRequiresTrailingSemicolonOrASI(kind) { - return kind === 243 /* VariableStatement */ || kind === 244 /* ExpressionStatement */ || kind === 246 /* DoStatement */ || kind === 251 /* ContinueStatement */ || kind === 252 /* BreakStatement */ || kind === 253 /* ReturnStatement */ || kind === 257 /* ThrowStatement */ || kind === 259 /* DebuggerStatement */ || kind === 172 /* PropertyDeclaration */ || kind === 265 /* TypeAliasDeclaration */ || kind === 272 /* ImportDeclaration */ || kind === 271 /* ImportEqualsDeclaration */ || kind === 278 /* ExportDeclaration */ || kind === 270 /* NamespaceExportDeclaration */ || kind === 277 /* ExportAssignment */; - } - function nodeIsASICandidate(node, sourceFile) { - const lastToken = node.getLastToken(sourceFile); - if (lastToken && lastToken.kind === 27 /* SemicolonToken */) { - return false; - } - if (syntaxRequiresTrailingCommaOrSemicolonOrASI(node.kind)) { - if (lastToken && lastToken.kind === 28 /* CommaToken */) { - return false; - } - } else if (syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(node.kind)) { - const lastChild = last(node.getChildren(sourceFile)); - if (lastChild && isModuleBlock(lastChild)) { - return false; - } - } else if (syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(node.kind)) { - const lastChild = last(node.getChildren(sourceFile)); - if (lastChild && isFunctionBlock(lastChild)) { - return false; - } - } else if (!syntaxRequiresTrailingSemicolonOrASI(node.kind)) { - return false; - } - if (node.kind === 246 /* DoStatement */) { - return true; - } - const topNode = findAncestor(node, (ancestor) => !ancestor.parent); - const nextToken = findNextToken(node, topNode, sourceFile); - if (!nextToken || nextToken.kind === 20 /* CloseBraceToken */) { - return true; - } - const startLine = sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line; - const endLine = sourceFile.getLineAndCharacterOfPosition(nextToken.getStart(sourceFile)).line; - return startLine !== endLine; - } - function positionIsASICandidate(pos, context, sourceFile) { - const contextAncestor = findAncestor(context, (ancestor) => { - if (ancestor.end !== pos) { - return "quit"; - } - return syntaxMayBeASICandidate(ancestor.kind); - }); - return !!contextAncestor && nodeIsASICandidate(contextAncestor, sourceFile); - } - function probablyUsesSemicolons(sourceFile) { - let withSemicolon = 0; - let withoutSemicolon = 0; - const nStatementsToObserve = 5; - forEachChild(sourceFile, function visit(node) { - if (syntaxRequiresTrailingSemicolonOrASI(node.kind)) { - const lastToken = node.getLastToken(sourceFile); - if ((lastToken == null ? void 0 : lastToken.kind) === 27 /* SemicolonToken */) { - withSemicolon++; - } else { - withoutSemicolon++; - } - } else if (syntaxRequiresTrailingCommaOrSemicolonOrASI(node.kind)) { - const lastToken = node.getLastToken(sourceFile); - if ((lastToken == null ? void 0 : lastToken.kind) === 27 /* SemicolonToken */) { - withSemicolon++; - } else if (lastToken && lastToken.kind !== 28 /* CommaToken */) { - const lastTokenLine = getLineAndCharacterOfPosition(sourceFile, lastToken.getStart(sourceFile)).line; - const nextTokenLine = getLineAndCharacterOfPosition(sourceFile, getSpanOfTokenAtPosition(sourceFile, lastToken.end).start).line; - if (lastTokenLine !== nextTokenLine) { - withoutSemicolon++; - } - } - } - if (withSemicolon + withoutSemicolon >= nStatementsToObserve) { - return true; - } - return forEachChild(node, visit); - }); - if (withSemicolon === 0 && withoutSemicolon <= 1) { - return true; - } - return withSemicolon / withoutSemicolon > 1 / nStatementsToObserve; - } - function tryGetDirectories(host, directoryName) { - return tryIOAndConsumeErrors(host, host.getDirectories, directoryName) || []; - } - function tryReadDirectory(host, path, extensions, exclude, include) { - return tryIOAndConsumeErrors(host, host.readDirectory, path, extensions, exclude, include) || emptyArray; - } - function tryFileExists(host, path) { - return tryIOAndConsumeErrors(host, host.fileExists, path); - } - function tryDirectoryExists(host, path) { - return tryAndIgnoreErrors(() => directoryProbablyExists(path, host)) || false; - } - function tryAndIgnoreErrors(cb) { - try { - return cb(); - } catch { - return void 0; - } - } - function tryIOAndConsumeErrors(host, toApply, ...args) { - return tryAndIgnoreErrors(() => toApply && toApply.apply(host, args)); - } - function findPackageJsons(startDirectory, host, stopDirectory) { - const paths = []; - forEachAncestorDirectory(startDirectory, (ancestor) => { - if (ancestor === stopDirectory) { - return true; - } - const currentConfigPath = combinePaths(ancestor, "package.json"); - if (tryFileExists(host, currentConfigPath)) { - paths.push(currentConfigPath); - } - }); - return paths; - } - function findPackageJson(directory, host) { - let packageJson; - forEachAncestorDirectory(directory, (ancestor) => { - if (ancestor === "node_modules") - return true; - packageJson = findConfigFile(ancestor, (f) => tryFileExists(host, f), "package.json"); - if (packageJson) { - return true; - } - }); - return packageJson; - } - function getPackageJsonsVisibleToFile(fileName, host) { - if (!host.fileExists) { - return []; - } - const packageJsons = []; - forEachAncestorDirectory(getDirectoryPath(fileName), (ancestor) => { - const packageJsonFileName = combinePaths(ancestor, "package.json"); - if (host.fileExists(packageJsonFileName)) { - const info = createPackageJsonInfo(packageJsonFileName, host); - if (info) { - packageJsons.push(info); - } - } - }); - return packageJsons; - } - function createPackageJsonInfo(fileName, host) { - if (!host.readFile) { - return void 0; - } - const dependencyKeys = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"]; - const stringContent = host.readFile(fileName) || ""; - const content = tryParseJson(stringContent); - const info = {}; - if (content) { - for (const key of dependencyKeys) { - const dependencies = content[key]; - if (!dependencies) { - continue; - } - const dependencyMap = /* @__PURE__ */ new Map(); - for (const packageName in dependencies) { - dependencyMap.set(packageName, dependencies[packageName]); - } - info[key] = dependencyMap; - } - } - const dependencyGroups = [ - [1 /* Dependencies */, info.dependencies], - [2 /* DevDependencies */, info.devDependencies], - [8 /* OptionalDependencies */, info.optionalDependencies], - [4 /* PeerDependencies */, info.peerDependencies] - ]; - return { - ...info, - parseable: !!content, - fileName, - get, - has(dependencyName, inGroups) { - return !!get(dependencyName, inGroups); - } - }; - function get(dependencyName, inGroups = 15 /* All */) { - for (const [group2, deps] of dependencyGroups) { - if (deps && inGroups & group2) { - const dep = deps.get(dependencyName); - if (dep !== void 0) { - return dep; - } - } - } - } - } - function createPackageJsonImportFilter(fromFile, preferences, host) { - const packageJsons = (host.getPackageJsonsVisibleToFile && host.getPackageJsonsVisibleToFile(fromFile.fileName) || getPackageJsonsVisibleToFile(fromFile.fileName, host)).filter((p) => p.parseable); - let usesNodeCoreModules; - let ambientModuleCache; - let sourceFileCache; - return { - allowsImportingAmbientModule, - allowsImportingSourceFile, - allowsImportingSpecifier - }; - function moduleSpecifierIsCoveredByPackageJson(specifier) { - const packageName = getNodeModuleRootSpecifier(specifier); - for (const packageJson of packageJsons) { - if (packageJson.has(packageName) || packageJson.has(getTypesPackageName(packageName))) { - return true; - } - } - return false; - } - function allowsImportingAmbientModule(moduleSymbol, moduleSpecifierResolutionHost) { - if (!packageJsons.length || !moduleSymbol.valueDeclaration) { - return true; - } - if (!ambientModuleCache) { - ambientModuleCache = /* @__PURE__ */ new Map(); - } else { - const cached = ambientModuleCache.get(moduleSymbol); - if (cached !== void 0) { - return cached; - } - } - const declaredModuleSpecifier = stripQuotes(moduleSymbol.getName()); - if (isAllowedCoreNodeModulesImport(declaredModuleSpecifier)) { - ambientModuleCache.set(moduleSymbol, true); - return true; - } - const declaringSourceFile = moduleSymbol.valueDeclaration.getSourceFile(); - const declaringNodeModuleName = getNodeModulesPackageNameFromFileName(declaringSourceFile.fileName, moduleSpecifierResolutionHost); - if (typeof declaringNodeModuleName === "undefined") { - ambientModuleCache.set(moduleSymbol, true); - return true; - } - const result = moduleSpecifierIsCoveredByPackageJson(declaringNodeModuleName) || moduleSpecifierIsCoveredByPackageJson(declaredModuleSpecifier); - ambientModuleCache.set(moduleSymbol, result); - return result; - } - function allowsImportingSourceFile(sourceFile, moduleSpecifierResolutionHost) { - if (!packageJsons.length) { - return true; - } - if (!sourceFileCache) { - sourceFileCache = /* @__PURE__ */ new Map(); - } else { - const cached = sourceFileCache.get(sourceFile); - if (cached !== void 0) { - return cached; - } - } - const moduleSpecifier = getNodeModulesPackageNameFromFileName(sourceFile.fileName, moduleSpecifierResolutionHost); - if (!moduleSpecifier) { - sourceFileCache.set(sourceFile, true); - return true; - } - const result = moduleSpecifierIsCoveredByPackageJson(moduleSpecifier); - sourceFileCache.set(sourceFile, result); - return result; - } - function allowsImportingSpecifier(moduleSpecifier) { - if (!packageJsons.length || isAllowedCoreNodeModulesImport(moduleSpecifier)) { - return true; - } - if (pathIsRelative(moduleSpecifier) || isRootedDiskPath(moduleSpecifier)) { - return true; - } - return moduleSpecifierIsCoveredByPackageJson(moduleSpecifier); - } - function isAllowedCoreNodeModulesImport(moduleSpecifier) { - if (isSourceFileJS(fromFile) && ts_JsTyping_exports.nodeCoreModules.has(moduleSpecifier)) { - if (usesNodeCoreModules === void 0) { - usesNodeCoreModules = consumesNodeCoreModules(fromFile); - } - if (usesNodeCoreModules) { - return true; - } - } - return false; - } - function getNodeModulesPackageNameFromFileName(importedFileName, moduleSpecifierResolutionHost) { - if (!stringContains(importedFileName, "node_modules")) { - return void 0; - } - const specifier = ts_moduleSpecifiers_exports.getNodeModulesPackageName( - host.getCompilationSettings(), - fromFile, - importedFileName, - moduleSpecifierResolutionHost, - preferences - ); - if (!specifier) { - return void 0; - } - if (!pathIsRelative(specifier) && !isRootedDiskPath(specifier)) { - return getNodeModuleRootSpecifier(specifier); - } - } - function getNodeModuleRootSpecifier(fullSpecifier) { - const components = getPathComponents(getPackageNameFromTypesPackageName(fullSpecifier)).slice(1); - if (startsWith(components[0], "@")) { - return `${components[0]}/${components[1]}`; - } - return components[0]; - } - } - function tryParseJson(text) { - try { - return JSON.parse(text); - } catch { - return void 0; - } - } - function consumesNodeCoreModules(sourceFile) { - return some(sourceFile.imports, ({ text }) => ts_JsTyping_exports.nodeCoreModules.has(text)); - } - function isInsideNodeModules(fileOrDirectory) { - return contains(getPathComponents(fileOrDirectory), "node_modules"); - } - function isDiagnosticWithLocation(diagnostic) { - return diagnostic.file !== void 0 && diagnostic.start !== void 0 && diagnostic.length !== void 0; - } - function findDiagnosticForNode(node, sortedFileDiagnostics) { - const span = createTextSpanFromNode(node); - const index = binarySearchKey(sortedFileDiagnostics, span, identity, compareTextSpans); - if (index >= 0) { - const diagnostic = sortedFileDiagnostics[index]; - Debug.assertEqual(diagnostic.file, node.getSourceFile(), "Diagnostics proided to 'findDiagnosticForNode' must be from a single SourceFile"); - return cast(diagnostic, isDiagnosticWithLocation); - } - } - function getDiagnosticsWithinSpan(span, sortedFileDiagnostics) { - var _a; - let index = binarySearchKey(sortedFileDiagnostics, span.start, (diag2) => diag2.start, compareValues); - if (index < 0) { - index = ~index; - } - while (((_a = sortedFileDiagnostics[index - 1]) == null ? void 0 : _a.start) === span.start) { - index--; - } - const result = []; - const end = textSpanEnd(span); - while (true) { - const diagnostic = tryCast(sortedFileDiagnostics[index], isDiagnosticWithLocation); - if (!diagnostic || diagnostic.start > end) { - break; - } - if (textSpanContainsTextSpan(span, diagnostic)) { - result.push(diagnostic); - } - index++; - } - return result; - } - function getRefactorContextSpan({ startPosition, endPosition }) { - return createTextSpanFromBounds(startPosition, endPosition === void 0 ? startPosition : endPosition); - } - function getFixableErrorSpanExpression(sourceFile, span) { - const token = getTokenAtPosition(sourceFile, span.start); - const expression = findAncestor(token, (node) => { - if (node.getStart(sourceFile) < span.start || node.getEnd() > textSpanEnd(span)) { - return "quit"; - } - return isExpression(node) && textSpansEqual(span, createTextSpanFromNode(node, sourceFile)); - }); - return expression; - } - function mapOneOrMany(valueOrArray, f, resultSelector = identity) { - return valueOrArray ? isArray(valueOrArray) ? resultSelector(map(valueOrArray, f)) : f(valueOrArray, 0) : void 0; - } - function firstOrOnly(valueOrArray) { - return isArray(valueOrArray) ? first(valueOrArray) : valueOrArray; - } - function getNamesForExportedSymbol(symbol, scriptTarget) { - if (needsNameFromDeclaration(symbol)) { - const fromDeclaration = getDefaultLikeExportNameFromDeclaration(symbol); - if (fromDeclaration) - return fromDeclaration; - const fileNameCase = ts_codefix_exports.moduleSymbolToValidIdentifier( - getSymbolParentOrFail(symbol), - scriptTarget, - /*forceCapitalize*/ - false - ); - const capitalized = ts_codefix_exports.moduleSymbolToValidIdentifier( - getSymbolParentOrFail(symbol), - scriptTarget, - /*forceCapitalize*/ - true - ); - if (fileNameCase === capitalized) - return fileNameCase; - return [fileNameCase, capitalized]; - } - return symbol.name; - } - function getNameForExportedSymbol(symbol, scriptTarget, preferCapitalized) { - if (needsNameFromDeclaration(symbol)) { - return getDefaultLikeExportNameFromDeclaration(symbol) || ts_codefix_exports.moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget, !!preferCapitalized); - } - return symbol.name; - } - function needsNameFromDeclaration(symbol) { - return !(symbol.flags & 33554432 /* Transient */) && (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */); - } - function getDefaultLikeExportNameFromDeclaration(symbol) { - return firstDefined(symbol.declarations, (d) => { - var _a, _b, _c; - if (isExportAssignment(d)) { - return (_a = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a.text; - } - if (isExportSpecifier(d) && d.symbol.flags === 2097152 /* Alias */) { - return (_b = tryCast(d.propertyName, isIdentifier)) == null ? void 0 : _b.text; - } - return (_c = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _c.text; - }); - } - function getSymbolParentOrFail(symbol) { - var _a; - return Debug.checkDefined( - symbol.parent, - `Symbol parent was undefined. Flags: ${Debug.formatSymbolFlags(symbol.flags)}. Declarations: ${(_a = symbol.declarations) == null ? void 0 : _a.map((d) => { - const kind = Debug.formatSyntaxKind(d.kind); - const inJS = isInJSFile(d); - const { expression } = d; - return (inJS ? "[JS]" : "") + kind + (expression ? ` (expression: ${Debug.formatSyntaxKind(expression.kind)})` : ""); - }).join(", ")}.` - ); - } - function stringContainsAt(haystack, needle, startIndex) { - const needleLength = needle.length; - if (needleLength + startIndex > haystack.length) { - return false; - } - for (let i = 0; i < needleLength; i++) { - if (needle.charCodeAt(i) !== haystack.charCodeAt(i + startIndex)) - return false; - } - return true; - } - function startsWithUnderscore(name) { - return name.charCodeAt(0) === 95 /* _ */; - } - function isGlobalDeclaration(declaration) { - return !isNonGlobalDeclaration(declaration); - } - function isNonGlobalDeclaration(declaration) { - const sourceFile = declaration.getSourceFile(); - if (!sourceFile.externalModuleIndicator && !sourceFile.commonJsModuleIndicator) { - return false; - } - return isInJSFile(declaration) || !findAncestor(declaration, (d) => isModuleDeclaration(d) && isGlobalScopeAugmentation(d)); - } - function isDeprecatedDeclaration(decl) { - return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 8192 /* Deprecated */); - } - function shouldUseUriStyleNodeCoreModules(file, program) { - const decisionFromFile = firstDefined(file.imports, (node) => { - if (ts_JsTyping_exports.nodeCoreModules.has(node.text)) { - return startsWith(node.text, "node:"); - } - }); - return decisionFromFile ?? program.usesUriStyleNodeCoreModules; - } - function getNewLineKind(newLineCharacter) { - return newLineCharacter === "\n" ? 1 /* LineFeed */ : 0 /* CarriageReturnLineFeed */; - } - function diagnosticToString(diag2) { - return isArray(diag2) ? formatStringFromArgs(getLocaleSpecificMessage(diag2[0]), diag2.slice(1)) : getLocaleSpecificMessage(diag2); - } - function getFormatCodeSettingsForWriting({ options }, sourceFile) { - const shouldAutoDetectSemicolonPreference = !options.semicolons || options.semicolons === "ignore" /* Ignore */; - const shouldRemoveSemicolons = options.semicolons === "remove" /* Remove */ || shouldAutoDetectSemicolonPreference && !probablyUsesSemicolons(sourceFile); - return { - ...options, - semicolons: shouldRemoveSemicolons ? "remove" /* Remove */ : "ignore" /* Ignore */ - }; - } - function jsxModeNeedsExplicitImport(jsx) { - return jsx === 2 /* React */ || jsx === 3 /* ReactNative */; - } - function isSourceFileFromLibrary(program, node) { - return program.isSourceFileFromExternalLibrary(node) || program.isSourceFileDefaultLibrary(node); - } - function newCaseClauseTracker(checker, clauses) { - const existingStrings = /* @__PURE__ */ new Set(); - const existingNumbers = /* @__PURE__ */ new Set(); - const existingBigInts = /* @__PURE__ */ new Set(); - for (const clause of clauses) { - if (!isDefaultClause(clause)) { - const expression = skipParentheses(clause.expression); - if (isLiteralExpression(expression)) { - switch (expression.kind) { - case 15 /* NoSubstitutionTemplateLiteral */: - case 11 /* StringLiteral */: - existingStrings.add(expression.text); - break; - case 9 /* NumericLiteral */: - existingNumbers.add(parseInt(expression.text)); - break; - case 10 /* BigIntLiteral */: - const parsedBigInt = parseBigInt(endsWith(expression.text, "n") ? expression.text.slice(0, -1) : expression.text); - if (parsedBigInt) { - existingBigInts.add(pseudoBigIntToString(parsedBigInt)); - } - break; - } - } else { - const symbol = checker.getSymbolAtLocation(clause.expression); - if (symbol && symbol.valueDeclaration && isEnumMember(symbol.valueDeclaration)) { - const enumValue = checker.getConstantValue(symbol.valueDeclaration); - if (enumValue !== void 0) { - addValue(enumValue); - } - } - } - } - } - return { - addValue, - hasValue - }; - function addValue(value) { - switch (typeof value) { - case "string": - existingStrings.add(value); - break; - case "number": - existingNumbers.add(value); - } - } - function hasValue(value) { - switch (typeof value) { - case "string": - return existingStrings.has(value); - case "number": - return existingNumbers.has(value); - case "object": - return existingBigInts.has(pseudoBigIntToString(value)); - } - } - } - function fileShouldUseJavaScriptRequire(file, program, host, preferRequire) { - var _a; - const fileName = typeof file === "string" ? file : file.fileName; - if (!hasJSFileExtension(fileName)) { - return false; - } - const compilerOptions = program.getCompilerOptions(); - const moduleKind = getEmitModuleKind(compilerOptions); - const impliedNodeFormat = typeof file === "string" ? getImpliedNodeFormatForFile(toPath(file, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), (_a = program.getPackageJsonInfoCache) == null ? void 0 : _a.call(program), host, compilerOptions) : file.impliedNodeFormat; - if (impliedNodeFormat === 99 /* ESNext */) { - return false; - } - if (impliedNodeFormat === 1 /* CommonJS */) { - return true; - } - if (compilerOptions.verbatimModuleSyntax && moduleKind === 1 /* CommonJS */) { - return true; - } - if (compilerOptions.verbatimModuleSyntax && emitModuleKindIsNonNodeESM(moduleKind)) { - return false; - } - if (typeof file === "object") { - if (file.commonJsModuleIndicator) { - return true; - } - if (file.externalModuleIndicator) { - return false; - } - } - return preferRequire; - } - var scanner, SemanticMeaning, tripleSlashDirectivePrefixRegex, typeKeywords, QuotePreference, displayPartWriter, lineFeed2, ANONYMOUS, syntaxMayBeASICandidate; - var init_utilities4 = __esm({ - "src/services/utilities.ts"() { - "use strict"; - init_ts4(); - scanner = createScanner( - 99 /* Latest */, - /*skipTrivia*/ - true - ); - SemanticMeaning = /* @__PURE__ */ ((SemanticMeaning3) => { - SemanticMeaning3[SemanticMeaning3["None"] = 0] = "None"; - SemanticMeaning3[SemanticMeaning3["Value"] = 1] = "Value"; - SemanticMeaning3[SemanticMeaning3["Type"] = 2] = "Type"; - SemanticMeaning3[SemanticMeaning3["Namespace"] = 4] = "Namespace"; - SemanticMeaning3[SemanticMeaning3["All"] = 7] = "All"; - return SemanticMeaning3; - })(SemanticMeaning || {}); - tripleSlashDirectivePrefixRegex = /^\/\/\/\s* { - QuotePreference7[QuotePreference7["Single"] = 0] = "Single"; - QuotePreference7[QuotePreference7["Double"] = 1] = "Double"; - return QuotePreference7; - })(QuotePreference || {}); - displayPartWriter = getDisplayPartWriter(); - lineFeed2 = "\n"; - ANONYMOUS = "anonymous function"; - syntaxMayBeASICandidate = or( - syntaxRequiresTrailingCommaOrSemicolonOrASI, - syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI, - syntaxRequiresTrailingModuleBlockOrSemicolonOrASI, - syntaxRequiresTrailingSemicolonOrASI - ); - } - }); - - // src/services/exportInfoMap.ts - function createCacheableExportInfoMap(host) { - let exportInfoId = 1; - const exportInfo = createMultiMap(); - const symbols = /* @__PURE__ */ new Map(); - const packages = /* @__PURE__ */ new Map(); - let usableByFileName; - const cache = { - isUsableByFile: (importingFile) => importingFile === usableByFileName, - isEmpty: () => !exportInfo.size, - clear: () => { - exportInfo.clear(); - symbols.clear(); - usableByFileName = void 0; - }, - add: (importingFile, symbol, symbolTableKey, moduleSymbol, moduleFile, exportKind, isFromPackageJson, checker) => { - if (importingFile !== usableByFileName) { - cache.clear(); - usableByFileName = importingFile; - } - let packageName; - if (moduleFile) { - const nodeModulesPathParts = getNodeModulePathParts(moduleFile.fileName); - if (nodeModulesPathParts) { - const { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex } = nodeModulesPathParts; - packageName = unmangleScopedPackageName(getPackageNameFromTypesPackageName(moduleFile.fileName.substring(topLevelPackageNameIndex + 1, packageRootIndex))); - if (startsWith(importingFile, moduleFile.path.substring(0, topLevelNodeModulesIndex))) { - const prevDeepestNodeModulesPath = packages.get(packageName); - const nodeModulesPath = moduleFile.fileName.substring(0, topLevelPackageNameIndex + 1); - if (prevDeepestNodeModulesPath) { - const prevDeepestNodeModulesIndex = prevDeepestNodeModulesPath.indexOf(nodeModulesPathPart); - if (topLevelNodeModulesIndex > prevDeepestNodeModulesIndex) { - packages.set(packageName, nodeModulesPath); - } - } else { - packages.set(packageName, nodeModulesPath); - } - } - } - } - const isDefault = exportKind === 1 /* Default */; - const namedSymbol = isDefault && getLocalSymbolForExportDefault(symbol) || symbol; - const names = exportKind === 0 /* Named */ || isExternalModuleSymbol(namedSymbol) ? unescapeLeadingUnderscores(symbolTableKey) : getNamesForExportedSymbol( - namedSymbol, - /*scriptTarget*/ - void 0 - ); - const symbolName2 = typeof names === "string" ? names : names[0]; - const capitalizedSymbolName = typeof names === "string" ? void 0 : names[1]; - const moduleName = stripQuotes(moduleSymbol.name); - const id = exportInfoId++; - const target = skipAlias(symbol, checker); - const storedSymbol = symbol.flags & 33554432 /* Transient */ ? void 0 : symbol; - const storedModuleSymbol = moduleSymbol.flags & 33554432 /* Transient */ ? void 0 : moduleSymbol; - if (!storedSymbol || !storedModuleSymbol) - symbols.set(id, [symbol, moduleSymbol]); - exportInfo.add(key(symbolName2, symbol, isExternalModuleNameRelative(moduleName) ? void 0 : moduleName, checker), { - id, - symbolTableKey, - symbolName: symbolName2, - capitalizedSymbolName, - moduleName, - moduleFile, - moduleFileName: moduleFile == null ? void 0 : moduleFile.fileName, - packageName, - exportKind, - targetFlags: target.flags, - isFromPackageJson, - symbol: storedSymbol, - moduleSymbol: storedModuleSymbol - }); - }, - get: (importingFile, key2) => { - if (importingFile !== usableByFileName) - return; - const result = exportInfo.get(key2); - return result == null ? void 0 : result.map(rehydrateCachedInfo); - }, - search: (importingFile, preferCapitalized, matches, action) => { - if (importingFile !== usableByFileName) - return; - return forEachEntry(exportInfo, (info, key2) => { - const { symbolName: symbolName2, ambientModuleName } = parseKey(key2); - const name = preferCapitalized && info[0].capitalizedSymbolName || symbolName2; - if (matches(name, info[0].targetFlags)) { - const rehydrated = info.map(rehydrateCachedInfo); - const filtered = rehydrated.filter((r, i) => isNotShadowedByDeeperNodeModulesPackage(r, info[i].packageName)); - if (filtered.length) { - const res = action(filtered, name, !!ambientModuleName, key2); - if (res !== void 0) - return res; - } - } - }); - }, - releaseSymbols: () => { - symbols.clear(); - }, - onFileChanged: (oldSourceFile, newSourceFile, typeAcquisitionEnabled) => { - if (fileIsGlobalOnly(oldSourceFile) && fileIsGlobalOnly(newSourceFile)) { - return false; - } - if (usableByFileName && usableByFileName !== newSourceFile.path || // If ATA is enabled, auto-imports uses existing imports to guess whether you want auto-imports from node. - // Adding or removing imports from node could change the outcome of that guess, so could change the suggestions list. - typeAcquisitionEnabled && consumesNodeCoreModules(oldSourceFile) !== consumesNodeCoreModules(newSourceFile) || // Module agumentation and ambient module changes can add or remove exports available to be auto-imported. - // Changes elsewhere in the file can change the *type* of an export in a module augmentation, - // but type info is gathered in getCompletionEntryDetails, which doesn't use the cache. - !arrayIsEqualTo(oldSourceFile.moduleAugmentations, newSourceFile.moduleAugmentations) || !ambientModuleDeclarationsAreEqual(oldSourceFile, newSourceFile)) { - cache.clear(); - return true; - } - usableByFileName = newSourceFile.path; - return false; - } - }; - if (Debug.isDebugging) { - Object.defineProperty(cache, "__cache", { get: () => exportInfo }); - } - return cache; - function rehydrateCachedInfo(info) { - if (info.symbol && info.moduleSymbol) - return info; - const { id, exportKind, targetFlags, isFromPackageJson, moduleFileName } = info; - const [cachedSymbol, cachedModuleSymbol] = symbols.get(id) || emptyArray; - if (cachedSymbol && cachedModuleSymbol) { - return { - symbol: cachedSymbol, - moduleSymbol: cachedModuleSymbol, - moduleFileName, - exportKind, - targetFlags, - isFromPackageJson - }; - } - const checker = (isFromPackageJson ? host.getPackageJsonAutoImportProvider() : host.getCurrentProgram()).getTypeChecker(); - const moduleSymbol = info.moduleSymbol || cachedModuleSymbol || Debug.checkDefined(info.moduleFile ? checker.getMergedSymbol(info.moduleFile.symbol) : checker.tryFindAmbientModule(info.moduleName)); - const symbol = info.symbol || cachedSymbol || Debug.checkDefined( - exportKind === 2 /* ExportEquals */ ? checker.resolveExternalModuleSymbol(moduleSymbol) : checker.tryGetMemberInModuleExportsAndProperties(unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), - `Could not find symbol '${info.symbolName}' by key '${info.symbolTableKey}' in module ${moduleSymbol.name}` - ); - symbols.set(id, [symbol, moduleSymbol]); - return { - symbol, - moduleSymbol, - moduleFileName, - exportKind, - targetFlags, - isFromPackageJson - }; - } - function key(importedName, symbol, ambientModuleName, checker) { - const moduleKey = ambientModuleName || ""; - return `${importedName}|${getSymbolId(skipAlias(symbol, checker))}|${moduleKey}`; - } - function parseKey(key2) { - const symbolName2 = key2.substring(0, key2.indexOf("|")); - const moduleKey = key2.substring(key2.lastIndexOf("|") + 1); - const ambientModuleName = moduleKey === "" ? void 0 : moduleKey; - return { symbolName: symbolName2, ambientModuleName }; - } - function fileIsGlobalOnly(file) { - return !file.commonJsModuleIndicator && !file.externalModuleIndicator && !file.moduleAugmentations && !file.ambientModuleNames; - } - function ambientModuleDeclarationsAreEqual(oldSourceFile, newSourceFile) { - if (!arrayIsEqualTo(oldSourceFile.ambientModuleNames, newSourceFile.ambientModuleNames)) { - return false; - } - let oldFileStatementIndex = -1; - let newFileStatementIndex = -1; - for (const ambientModuleName of newSourceFile.ambientModuleNames) { - const isMatchingModuleDeclaration = (node) => isNonGlobalAmbientModule(node) && node.name.text === ambientModuleName; - oldFileStatementIndex = findIndex(oldSourceFile.statements, isMatchingModuleDeclaration, oldFileStatementIndex + 1); - newFileStatementIndex = findIndex(newSourceFile.statements, isMatchingModuleDeclaration, newFileStatementIndex + 1); - if (oldSourceFile.statements[oldFileStatementIndex] !== newSourceFile.statements[newFileStatementIndex]) { - return false; - } - } - return true; - } - function isNotShadowedByDeeperNodeModulesPackage(info, packageName) { - if (!packageName || !info.moduleFileName) - return true; - const typingsCacheLocation = host.getGlobalTypingsCacheLocation(); - if (typingsCacheLocation && startsWith(info.moduleFileName, typingsCacheLocation)) - return true; - const packageDeepestNodeModulesPath = packages.get(packageName); - return !packageDeepestNodeModulesPath || startsWith(info.moduleFileName, packageDeepestNodeModulesPath); - } - } - function isImportableFile(program, from, to, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache) { - var _a; - if (from === to) - return false; - const cachedResult = moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.get(from.path, to.path, preferences, {}); - if ((cachedResult == null ? void 0 : cachedResult.isBlockedByPackageJsonDependencies) !== void 0) { - return !cachedResult.isBlockedByPackageJsonDependencies; - } - const getCanonicalFileName = hostGetCanonicalFileName(moduleSpecifierResolutionHost); - const globalTypingsCache = (_a = moduleSpecifierResolutionHost.getGlobalTypingsCacheLocation) == null ? void 0 : _a.call(moduleSpecifierResolutionHost); - const hasImportablePath = !!ts_moduleSpecifiers_exports.forEachFileNameOfModule( - from.fileName, - to.fileName, - moduleSpecifierResolutionHost, - /*preferSymlinks*/ - false, - (toPath3) => { - const toFile = program.getSourceFile(toPath3); - return (toFile === to || !toFile) && isImportablePath(from.fileName, toPath3, getCanonicalFileName, globalTypingsCache); - } - ); - if (packageJsonFilter) { - const isAutoImportable = hasImportablePath && packageJsonFilter.allowsImportingSourceFile(to, moduleSpecifierResolutionHost); - moduleSpecifierCache == null ? void 0 : moduleSpecifierCache.setBlockedByPackageJsonDependencies(from.path, to.path, preferences, {}, !isAutoImportable); - return isAutoImportable; - } - return hasImportablePath; - } - function isImportablePath(fromPath, toPath3, getCanonicalFileName, globalCachePath) { - const toNodeModules = forEachAncestorDirectory(toPath3, (ancestor) => getBaseFileName(ancestor) === "node_modules" ? ancestor : void 0); - const toNodeModulesParent = toNodeModules && getDirectoryPath(getCanonicalFileName(toNodeModules)); - return toNodeModulesParent === void 0 || startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || !!globalCachePath && startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent); - } - function forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, cb) { - var _a, _b; - const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); - const excludePatterns = preferences.autoImportFileExcludePatterns && mapDefined(preferences.autoImportFileExcludePatterns, (spec) => { - const pattern = getPatternFromSpec(spec, "", "exclude"); - return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : void 0; - }); - forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), excludePatterns, (module2, file) => cb( - module2, - file, - program, - /*isFromPackageJson*/ - false - )); - const autoImportProvider = useAutoImportProvider && ((_a = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a.call(host)); - if (autoImportProvider) { - const start = timestamp(); - const checker = program.getTypeChecker(); - forEachExternalModule(autoImportProvider.getTypeChecker(), autoImportProvider.getSourceFiles(), excludePatterns, (module2, file) => { - if (file && !program.getSourceFile(file.fileName) || !file && !checker.resolveName( - module2.name, - /*location*/ - void 0, - 1536 /* Module */, - /*excludeGlobals*/ - false - )) { - cb( - module2, - file, - autoImportProvider, - /*isFromPackageJson*/ - true - ); - } - }); - (_b = host.log) == null ? void 0 : _b.call(host, `forEachExternalModuleToImportFrom autoImportProvider: ${timestamp() - start}`); - } - } - function forEachExternalModule(checker, allSourceFiles, excludePatterns, cb) { - var _a; - const isExcluded = excludePatterns && ((fileName) => excludePatterns.some((p) => p.test(fileName))); - for (const ambient of checker.getAmbientModules()) { - if (!stringContains(ambient.name, "*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) { - cb( - ambient, - /*sourceFile*/ - void 0 - ); - } - } - for (const sourceFile of allSourceFiles) { - if (isExternalOrCommonJsModule(sourceFile) && !(isExcluded == null ? void 0 : isExcluded(sourceFile.fileName))) { - cb(checker.getMergedSymbol(sourceFile.symbol), sourceFile); - } - } - } - function getExportInfoMap(importingFile, host, program, preferences, cancellationToken) { - var _a, _b, _c, _d, _e; - const start = timestamp(); - (_a = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a.call(host); - const cache = ((_b = host.getCachedExportInfoMap) == null ? void 0 : _b.call(host)) || createCacheableExportInfoMap({ - getCurrentProgram: () => program, - getPackageJsonAutoImportProvider: () => { - var _a2; - return (_a2 = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a2.call(host); - }, - getGlobalTypingsCacheLocation: () => { - var _a2; - return (_a2 = host.getGlobalTypingsCacheLocation) == null ? void 0 : _a2.call(host); - } - }); - if (cache.isUsableByFile(importingFile.path)) { - (_c = host.log) == null ? void 0 : _c.call(host, "getExportInfoMap: cache hit"); - return cache; - } - (_d = host.log) == null ? void 0 : _d.call(host, "getExportInfoMap: cache miss or empty; calculating new results"); - const compilerOptions = program.getCompilerOptions(); - let moduleCount = 0; - try { - forEachExternalModuleToImportFrom( - program, - host, - preferences, - /*useAutoImportProvider*/ - true, - (moduleSymbol, moduleFile, program2, isFromPackageJson) => { - if (++moduleCount % 100 === 0) - cancellationToken == null ? void 0 : cancellationToken.throwIfCancellationRequested(); - const seenExports = /* @__PURE__ */ new Map(); - const checker = program2.getTypeChecker(); - const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions); - if (defaultInfo && isImportableSymbol(defaultInfo.symbol, checker)) { - cache.add( - importingFile.path, - defaultInfo.symbol, - defaultInfo.exportKind === 1 /* Default */ ? "default" /* Default */ : "export=" /* ExportEquals */, - moduleSymbol, - moduleFile, - defaultInfo.exportKind, - isFromPackageJson, - checker - ); - } - checker.forEachExportAndPropertyOfModule(moduleSymbol, (exported, key) => { - if (exported !== (defaultInfo == null ? void 0 : defaultInfo.symbol) && isImportableSymbol(exported, checker) && addToSeen(seenExports, key)) { - cache.add( - importingFile.path, - exported, - key, - moduleSymbol, - moduleFile, - 0 /* Named */, - isFromPackageJson, - checker - ); - } - }); - } - ); - } catch (err) { - cache.clear(); - throw err; - } - (_e = host.log) == null ? void 0 : _e.call(host, `getExportInfoMap: done in ${timestamp() - start} ms`); - return cache; - } - function getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions) { - const exported = getDefaultLikeExportWorker(moduleSymbol, checker); - if (!exported) - return void 0; - const { symbol, exportKind } = exported; - const info = getDefaultExportInfoWorker(symbol, checker, compilerOptions); - return info && { symbol, exportKind, ...info }; - } - function isImportableSymbol(symbol, checker) { - return !checker.isUndefinedSymbol(symbol) && !checker.isUnknownSymbol(symbol) && !isKnownSymbol(symbol) && !isPrivateIdentifierSymbol(symbol); - } - function getDefaultLikeExportWorker(moduleSymbol, checker) { - const exportEquals = checker.resolveExternalModuleSymbol(moduleSymbol); - if (exportEquals !== moduleSymbol) - return { symbol: exportEquals, exportKind: 2 /* ExportEquals */ }; - const defaultExport = checker.tryGetMemberInModuleExports("default" /* Default */, moduleSymbol); - if (defaultExport) - return { symbol: defaultExport, exportKind: 1 /* Default */ }; - } - function getDefaultExportInfoWorker(defaultExport, checker, compilerOptions) { - const localSymbol = getLocalSymbolForExportDefault(defaultExport); - if (localSymbol) - return { resolvedSymbol: localSymbol, name: localSymbol.name }; - const name = getNameForExportDefault(defaultExport); - if (name !== void 0) - return { resolvedSymbol: defaultExport, name }; - if (defaultExport.flags & 2097152 /* Alias */) { - const aliased = checker.getImmediateAliasedSymbol(defaultExport); - if (aliased && aliased.parent) { - return getDefaultExportInfoWorker(aliased, checker, compilerOptions); - } - } - if (defaultExport.escapedName !== "default" /* Default */ && defaultExport.escapedName !== "export=" /* ExportEquals */) { - return { resolvedSymbol: defaultExport, name: defaultExport.getName() }; - } - return { resolvedSymbol: defaultExport, name: getNameForExportedSymbol(defaultExport, compilerOptions.target) }; - } - function getNameForExportDefault(symbol) { - return symbol.declarations && firstDefined(symbol.declarations, (declaration) => { - var _a; - if (isExportAssignment(declaration)) { - return (_a = tryCast(skipOuterExpressions(declaration.expression), isIdentifier)) == null ? void 0 : _a.text; - } else if (isExportSpecifier(declaration)) { - Debug.assert(declaration.name.text === "default" /* Default */, "Expected the specifier to be a default export"); - return declaration.propertyName && declaration.propertyName.text; - } - }); - } - var ImportKind, ExportKind; - var init_exportInfoMap = __esm({ - "src/services/exportInfoMap.ts"() { - "use strict"; - init_ts4(); - ImportKind = /* @__PURE__ */ ((ImportKind2) => { - ImportKind2[ImportKind2["Named"] = 0] = "Named"; - ImportKind2[ImportKind2["Default"] = 1] = "Default"; - ImportKind2[ImportKind2["Namespace"] = 2] = "Namespace"; - ImportKind2[ImportKind2["CommonJS"] = 3] = "CommonJS"; - return ImportKind2; - })(ImportKind || {}); - ExportKind = /* @__PURE__ */ ((ExportKind3) => { - ExportKind3[ExportKind3["Named"] = 0] = "Named"; - ExportKind3[ExportKind3["Default"] = 1] = "Default"; - ExportKind3[ExportKind3["ExportEquals"] = 2] = "ExportEquals"; - ExportKind3[ExportKind3["UMD"] = 3] = "UMD"; - return ExportKind3; - })(ExportKind || {}); - } - }); - - // src/services/classifier.ts - function createClassifier() { - const scanner2 = createScanner( - 99 /* Latest */, - /*skipTrivia*/ - false - ); - function getClassificationsForLine(text, lexState, syntacticClassifierAbsent) { - return convertClassificationsToResult(getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent), text); - } - function getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent) { - let token = 0 /* Unknown */; - let lastNonTriviaToken = 0 /* Unknown */; - const templateStack = []; - const { prefix, pushTemplate } = getPrefixFromLexState(lexState); - text = prefix + text; - const offset = prefix.length; - if (pushTemplate) { - templateStack.push(16 /* TemplateHead */); - } - scanner2.setText(text); - let endOfLineState = 0 /* None */; - const spans = []; - let angleBracketStack = 0; - do { - token = scanner2.scan(); - if (!isTrivia(token)) { - handleToken(); - lastNonTriviaToken = token; - } - const end = scanner2.getTokenEnd(); - pushEncodedClassification(scanner2.getTokenStart(), end, offset, classFromKind(token), spans); - if (end >= text.length) { - const end2 = getNewEndOfLineState(scanner2, token, lastOrUndefined(templateStack)); - if (end2 !== void 0) { - endOfLineState = end2; - } - } - } while (token !== 1 /* EndOfFileToken */); - function handleToken() { - switch (token) { - case 44 /* SlashToken */: - case 69 /* SlashEqualsToken */: - if (!noRegexTable[lastNonTriviaToken] && scanner2.reScanSlashToken() === 14 /* RegularExpressionLiteral */) { - token = 14 /* RegularExpressionLiteral */; - } - break; - case 30 /* LessThanToken */: - if (lastNonTriviaToken === 80 /* Identifier */) { - angleBracketStack++; - } - break; - case 32 /* GreaterThanToken */: - if (angleBracketStack > 0) { - angleBracketStack--; - } - break; - case 133 /* AnyKeyword */: - case 154 /* StringKeyword */: - case 150 /* NumberKeyword */: - case 136 /* BooleanKeyword */: - case 155 /* SymbolKeyword */: - if (angleBracketStack > 0 && !syntacticClassifierAbsent) { - token = 80 /* Identifier */; - } - break; - case 16 /* TemplateHead */: - templateStack.push(token); - break; - case 19 /* OpenBraceToken */: - if (templateStack.length > 0) { - templateStack.push(token); - } - break; - case 20 /* CloseBraceToken */: - if (templateStack.length > 0) { - const lastTemplateStackToken = lastOrUndefined(templateStack); - if (lastTemplateStackToken === 16 /* TemplateHead */) { - token = scanner2.reScanTemplateToken( - /*isTaggedTemplate*/ - false - ); - if (token === 18 /* TemplateTail */) { - templateStack.pop(); - } else { - Debug.assertEqual(token, 17 /* TemplateMiddle */, "Should have been a template middle."); - } - } else { - Debug.assertEqual(lastTemplateStackToken, 19 /* OpenBraceToken */, "Should have been an open brace"); - templateStack.pop(); - } - } - break; - default: - if (!isKeyword(token)) { - break; - } - if (lastNonTriviaToken === 25 /* DotToken */) { - token = 80 /* Identifier */; - } else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) { - token = 80 /* Identifier */; - } - } - } - return { endOfLineState, spans }; - } - return { getClassificationsForLine, getEncodedLexicalClassifications }; - } - function getNewEndOfLineState(scanner2, token, lastOnTemplateStack) { - switch (token) { - case 11 /* StringLiteral */: { - if (!scanner2.isUnterminated()) - return void 0; - const tokenText = scanner2.getTokenText(); - const lastCharIndex = tokenText.length - 1; - let numBackslashes = 0; - while (tokenText.charCodeAt(lastCharIndex - numBackslashes) === 92 /* backslash */) { - numBackslashes++; - } - if ((numBackslashes & 1) === 0) - return void 0; - return tokenText.charCodeAt(0) === 34 /* doubleQuote */ ? 3 /* InDoubleQuoteStringLiteral */ : 2 /* InSingleQuoteStringLiteral */; - } - case 3 /* MultiLineCommentTrivia */: - return scanner2.isUnterminated() ? 1 /* InMultiLineCommentTrivia */ : void 0; - default: - if (isTemplateLiteralKind(token)) { - if (!scanner2.isUnterminated()) { - return void 0; - } - switch (token) { - case 18 /* TemplateTail */: - return 5 /* InTemplateMiddleOrTail */; - case 15 /* NoSubstitutionTemplateLiteral */: - return 4 /* InTemplateHeadOrNoSubstitutionTemplate */; - default: - return Debug.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #" + token); - } - } - return lastOnTemplateStack === 16 /* TemplateHead */ ? 6 /* InTemplateSubstitutionPosition */ : void 0; - } - } - function pushEncodedClassification(start, end, offset, classification, result) { - if (classification === 8 /* whiteSpace */) { - return; - } - if (start === 0 && offset > 0) { - start += offset; - } - const length2 = end - start; - if (length2 > 0) { - result.push(start - offset, length2, classification); - } - } - function convertClassificationsToResult(classifications, text) { - const entries = []; - const dense = classifications.spans; - let lastEnd = 0; - for (let i = 0; i < dense.length; i += 3) { - const start = dense[i]; - const length2 = dense[i + 1]; - const type = dense[i + 2]; - if (lastEnd >= 0) { - const whitespaceLength2 = start - lastEnd; - if (whitespaceLength2 > 0) { - entries.push({ length: whitespaceLength2, classification: 4 /* Whitespace */ }); - } - } - entries.push({ length: length2, classification: convertClassification(type) }); - lastEnd = start + length2; - } - const whitespaceLength = text.length - lastEnd; - if (whitespaceLength > 0) { - entries.push({ length: whitespaceLength, classification: 4 /* Whitespace */ }); - } - return { entries, finalLexState: classifications.endOfLineState }; - } - function convertClassification(type) { - switch (type) { - case 1 /* comment */: - return 3 /* Comment */; - case 3 /* keyword */: - return 1 /* Keyword */; - case 4 /* numericLiteral */: - return 6 /* NumberLiteral */; - case 25 /* bigintLiteral */: - return 7 /* BigIntLiteral */; - case 5 /* operator */: - return 2 /* Operator */; - case 6 /* stringLiteral */: - return 8 /* StringLiteral */; - case 8 /* whiteSpace */: - return 4 /* Whitespace */; - case 10 /* punctuation */: - return 0 /* Punctuation */; - case 2 /* identifier */: - case 11 /* className */: - case 12 /* enumName */: - case 13 /* interfaceName */: - case 14 /* moduleName */: - case 15 /* typeParameterName */: - case 16 /* typeAliasName */: - case 9 /* text */: - case 17 /* parameterName */: - return 5 /* Identifier */; - default: - return void 0; - } - } - function canFollow(keyword1, keyword2) { - if (!isAccessibilityModifier(keyword1)) { - return true; - } - switch (keyword2) { - case 139 /* GetKeyword */: - case 153 /* SetKeyword */: - case 137 /* ConstructorKeyword */: - case 126 /* StaticKeyword */: - case 129 /* AccessorKeyword */: - return true; - default: - return false; - } - } - function getPrefixFromLexState(lexState) { - switch (lexState) { - case 3 /* InDoubleQuoteStringLiteral */: - return { prefix: '"\\\n' }; - case 2 /* InSingleQuoteStringLiteral */: - return { prefix: "'\\\n" }; - case 1 /* InMultiLineCommentTrivia */: - return { prefix: "/*\n" }; - case 4 /* InTemplateHeadOrNoSubstitutionTemplate */: - return { prefix: "`\n" }; - case 5 /* InTemplateMiddleOrTail */: - return { prefix: "}\n", pushTemplate: true }; - case 6 /* InTemplateSubstitutionPosition */: - return { prefix: "", pushTemplate: true }; - case 0 /* None */: - return { prefix: "" }; - default: - return Debug.assertNever(lexState); - } - } - function isBinaryExpressionOperatorToken(token) { - switch (token) { - case 42 /* AsteriskToken */: - case 44 /* SlashToken */: - case 45 /* PercentToken */: - case 40 /* PlusToken */: - case 41 /* MinusToken */: - case 48 /* LessThanLessThanToken */: - case 49 /* GreaterThanGreaterThanToken */: - case 50 /* GreaterThanGreaterThanGreaterThanToken */: - case 30 /* LessThanToken */: - case 32 /* GreaterThanToken */: - case 33 /* LessThanEqualsToken */: - case 34 /* GreaterThanEqualsToken */: - case 104 /* InstanceOfKeyword */: - case 103 /* InKeyword */: - case 130 /* AsKeyword */: - case 152 /* SatisfiesKeyword */: - case 35 /* EqualsEqualsToken */: - case 36 /* ExclamationEqualsToken */: - case 37 /* EqualsEqualsEqualsToken */: - case 38 /* ExclamationEqualsEqualsToken */: - case 51 /* AmpersandToken */: - case 53 /* CaretToken */: - case 52 /* BarToken */: - case 56 /* AmpersandAmpersandToken */: - case 57 /* BarBarToken */: - case 75 /* BarEqualsToken */: - case 74 /* AmpersandEqualsToken */: - case 79 /* CaretEqualsToken */: - case 71 /* LessThanLessThanEqualsToken */: - case 72 /* GreaterThanGreaterThanEqualsToken */: - case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 65 /* PlusEqualsToken */: - case 66 /* MinusEqualsToken */: - case 67 /* AsteriskEqualsToken */: - case 69 /* SlashEqualsToken */: - case 70 /* PercentEqualsToken */: - case 64 /* EqualsToken */: - case 28 /* CommaToken */: - case 61 /* QuestionQuestionToken */: - case 76 /* BarBarEqualsToken */: - case 77 /* AmpersandAmpersandEqualsToken */: - case 78 /* QuestionQuestionEqualsToken */: - return true; - default: - return false; - } - } - function isPrefixUnaryExpressionOperatorToken(token) { - switch (token) { - case 40 /* PlusToken */: - case 41 /* MinusToken */: - case 55 /* TildeToken */: - case 54 /* ExclamationToken */: - case 46 /* PlusPlusToken */: - case 47 /* MinusMinusToken */: - return true; - default: - return false; - } - } - function classFromKind(token) { - if (isKeyword(token)) { - return 3 /* keyword */; - } else if (isBinaryExpressionOperatorToken(token) || isPrefixUnaryExpressionOperatorToken(token)) { - return 5 /* operator */; - } else if (token >= 19 /* FirstPunctuation */ && token <= 79 /* LastPunctuation */) { - return 10 /* punctuation */; - } - switch (token) { - case 9 /* NumericLiteral */: - return 4 /* numericLiteral */; - case 10 /* BigIntLiteral */: - return 25 /* bigintLiteral */; - case 11 /* StringLiteral */: - return 6 /* stringLiteral */; - case 14 /* RegularExpressionLiteral */: - return 7 /* regularExpressionLiteral */; - case 7 /* ConflictMarkerTrivia */: - case 3 /* MultiLineCommentTrivia */: - case 2 /* SingleLineCommentTrivia */: - return 1 /* comment */; - case 5 /* WhitespaceTrivia */: - case 4 /* NewLineTrivia */: - return 8 /* whiteSpace */; - case 80 /* Identifier */: - default: - if (isTemplateLiteralKind(token)) { - return 6 /* stringLiteral */; - } - return 2 /* identifier */; - } - } - function getSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames, span) { - return convertClassificationsToSpans(getEncodedSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames, span)); - } - function checkForClassificationCancellation(cancellationToken, kind) { - switch (kind) { - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - cancellationToken.throwIfCancellationRequested(); - } - } - function getEncodedSemanticClassifications(typeChecker, cancellationToken, sourceFile, classifiableNames, span) { - const spans = []; - sourceFile.forEachChild(function cb(node) { - if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { - return; - } - checkForClassificationCancellation(cancellationToken, node.kind); - if (isIdentifier(node) && !nodeIsMissing(node) && classifiableNames.has(node.escapedText)) { - const symbol = typeChecker.getSymbolAtLocation(node); - const type = symbol && classifySymbol(symbol, getMeaningFromLocation(node), typeChecker); - if (type) { - pushClassification(node.getStart(sourceFile), node.getEnd(), type); - } - } - node.forEachChild(cb); - }); - return { spans, endOfLineState: 0 /* None */ }; - function pushClassification(start, end, type) { - const length2 = end - start; - Debug.assert(length2 > 0, `Classification had non-positive length of ${length2}`); - spans.push(start); - spans.push(length2); - spans.push(type); - } - } - function classifySymbol(symbol, meaningAtPosition, checker) { - const flags = symbol.getFlags(); - if ((flags & 2885600 /* Classifiable */) === 0 /* None */) { - return void 0; - } else if (flags & 32 /* Class */) { - return 11 /* className */; - } else if (flags & 384 /* Enum */) { - return 12 /* enumName */; - } else if (flags & 524288 /* TypeAlias */) { - return 16 /* typeAliasName */; - } else if (flags & 1536 /* Module */) { - return meaningAtPosition & 4 /* Namespace */ || meaningAtPosition & 1 /* Value */ && hasValueSideModule(symbol) ? 14 /* moduleName */ : void 0; - } else if (flags & 2097152 /* Alias */) { - return classifySymbol(checker.getAliasedSymbol(symbol), meaningAtPosition, checker); - } else if (meaningAtPosition & 2 /* Type */) { - return flags & 64 /* Interface */ ? 13 /* interfaceName */ : flags & 262144 /* TypeParameter */ ? 15 /* typeParameterName */ : void 0; - } else { - return void 0; - } - } - function hasValueSideModule(symbol) { - return some(symbol.declarations, (declaration) => isModuleDeclaration(declaration) && getModuleInstanceState(declaration) === 1 /* Instantiated */); - } - function getClassificationTypeName(type) { - switch (type) { - case 1 /* comment */: - return "comment" /* comment */; - case 2 /* identifier */: - return "identifier" /* identifier */; - case 3 /* keyword */: - return "keyword" /* keyword */; - case 4 /* numericLiteral */: - return "number" /* numericLiteral */; - case 25 /* bigintLiteral */: - return "bigint" /* bigintLiteral */; - case 5 /* operator */: - return "operator" /* operator */; - case 6 /* stringLiteral */: - return "string" /* stringLiteral */; - case 8 /* whiteSpace */: - return "whitespace" /* whiteSpace */; - case 9 /* text */: - return "text" /* text */; - case 10 /* punctuation */: - return "punctuation" /* punctuation */; - case 11 /* className */: - return "class name" /* className */; - case 12 /* enumName */: - return "enum name" /* enumName */; - case 13 /* interfaceName */: - return "interface name" /* interfaceName */; - case 14 /* moduleName */: - return "module name" /* moduleName */; - case 15 /* typeParameterName */: - return "type parameter name" /* typeParameterName */; - case 16 /* typeAliasName */: - return "type alias name" /* typeAliasName */; - case 17 /* parameterName */: - return "parameter name" /* parameterName */; - case 18 /* docCommentTagName */: - return "doc comment tag name" /* docCommentTagName */; - case 19 /* jsxOpenTagName */: - return "jsx open tag name" /* jsxOpenTagName */; - case 20 /* jsxCloseTagName */: - return "jsx close tag name" /* jsxCloseTagName */; - case 21 /* jsxSelfClosingTagName */: - return "jsx self closing tag name" /* jsxSelfClosingTagName */; - case 22 /* jsxAttribute */: - return "jsx attribute" /* jsxAttribute */; - case 23 /* jsxText */: - return "jsx text" /* jsxText */; - case 24 /* jsxAttributeStringLiteralValue */: - return "jsx attribute string literal value" /* jsxAttributeStringLiteralValue */; - default: - return void 0; - } - } - function convertClassificationsToSpans(classifications) { - Debug.assert(classifications.spans.length % 3 === 0); - const dense = classifications.spans; - const result = []; - for (let i = 0; i < dense.length; i += 3) { - result.push({ - textSpan: createTextSpan(dense[i], dense[i + 1]), - classificationType: getClassificationTypeName(dense[i + 2]) - }); - } - return result; - } - function getSyntacticClassifications(cancellationToken, sourceFile, span) { - return convertClassificationsToSpans(getEncodedSyntacticClassifications(cancellationToken, sourceFile, span)); - } - function getEncodedSyntacticClassifications(cancellationToken, sourceFile, span) { - const spanStart = span.start; - const spanLength = span.length; - const triviaScanner = createScanner( - 99 /* Latest */, - /*skipTrivia*/ - false, - sourceFile.languageVariant, - sourceFile.text - ); - const mergeConflictScanner = createScanner( - 99 /* Latest */, - /*skipTrivia*/ - false, - sourceFile.languageVariant, - sourceFile.text - ); - const result = []; - processElement(sourceFile); - return { spans: result, endOfLineState: 0 /* None */ }; - function pushClassification(start, length2, type) { - result.push(start); - result.push(length2); - result.push(type); - } - function classifyLeadingTriviaAndGetTokenStart(token) { - triviaScanner.resetTokenState(token.pos); - while (true) { - const start = triviaScanner.getTokenEnd(); - if (!couldStartTrivia(sourceFile.text, start)) { - return start; - } - const kind = triviaScanner.scan(); - const end = triviaScanner.getTokenEnd(); - const width = end - start; - if (!isTrivia(kind)) { - return start; - } - switch (kind) { - case 4 /* NewLineTrivia */: - case 5 /* WhitespaceTrivia */: - continue; - case 2 /* SingleLineCommentTrivia */: - case 3 /* MultiLineCommentTrivia */: - classifyComment(token, kind, start, width); - triviaScanner.resetTokenState(end); - continue; - case 7 /* ConflictMarkerTrivia */: - const text = sourceFile.text; - const ch = text.charCodeAt(start); - if (ch === 60 /* lessThan */ || ch === 62 /* greaterThan */) { - pushClassification(start, width, 1 /* comment */); - continue; - } - Debug.assert(ch === 124 /* bar */ || ch === 61 /* equals */); - classifyDisabledMergeCode(text, start, end); - break; - case 6 /* ShebangTrivia */: - break; - default: - Debug.assertNever(kind); - } - } - } - function classifyComment(token, kind, start, width) { - if (kind === 3 /* MultiLineCommentTrivia */) { - const docCommentAndDiagnostics = parseIsolatedJSDocComment(sourceFile.text, start, width); - if (docCommentAndDiagnostics && docCommentAndDiagnostics.jsDoc) { - setParent(docCommentAndDiagnostics.jsDoc, token); - classifyJSDocComment(docCommentAndDiagnostics.jsDoc); - return; - } - } else if (kind === 2 /* SingleLineCommentTrivia */) { - if (tryClassifyTripleSlashComment(start, width)) { - return; - } - } - pushCommentRange(start, width); - } - function pushCommentRange(start, width) { - pushClassification(start, width, 1 /* comment */); - } - function classifyJSDocComment(docComment) { - var _a, _b, _c, _d, _e, _f, _g, _h; - let pos = docComment.pos; - if (docComment.tags) { - for (const tag of docComment.tags) { - if (tag.pos !== pos) { - pushCommentRange(pos, tag.pos - pos); - } - pushClassification(tag.pos, 1, 10 /* punctuation */); - pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); - pos = tag.tagName.end; - let commentStart = tag.tagName.end; - switch (tag.kind) { - case 348 /* JSDocParameterTag */: - const param = tag; - processJSDocParameterTag(param); - commentStart = param.isNameFirst && ((_a = param.typeExpression) == null ? void 0 : _a.end) || param.name.end; - break; - case 355 /* JSDocPropertyTag */: - const prop = tag; - commentStart = prop.isNameFirst && ((_b = prop.typeExpression) == null ? void 0 : _b.end) || prop.name.end; - break; - case 352 /* JSDocTemplateTag */: - processJSDocTemplateTag(tag); - pos = tag.end; - commentStart = tag.typeParameters.end; - break; - case 353 /* JSDocTypedefTag */: - const type = tag; - commentStart = ((_c = type.typeExpression) == null ? void 0 : _c.kind) === 316 /* JSDocTypeExpression */ && ((_d = type.fullName) == null ? void 0 : _d.end) || ((_e = type.typeExpression) == null ? void 0 : _e.end) || commentStart; - break; - case 345 /* JSDocCallbackTag */: - commentStart = tag.typeExpression.end; - break; - case 351 /* JSDocTypeTag */: - processElement(tag.typeExpression); - pos = tag.end; - commentStart = tag.typeExpression.end; - break; - case 350 /* JSDocThisTag */: - case 347 /* JSDocEnumTag */: - commentStart = tag.typeExpression.end; - break; - case 349 /* JSDocReturnTag */: - processElement(tag.typeExpression); - pos = tag.end; - commentStart = ((_f = tag.typeExpression) == null ? void 0 : _f.end) || commentStart; - break; - case 354 /* JSDocSeeTag */: - commentStart = ((_g = tag.name) == null ? void 0 : _g.end) || commentStart; - break; - case 335 /* JSDocAugmentsTag */: - case 336 /* JSDocImplementsTag */: - commentStart = tag.class.end; - break; - case 356 /* JSDocThrowsTag */: - processElement(tag.typeExpression); - pos = tag.end; - commentStart = ((_h = tag.typeExpression) == null ? void 0 : _h.end) || commentStart; - break; - } - if (typeof tag.comment === "object") { - pushCommentRange(tag.comment.pos, tag.comment.end - tag.comment.pos); - } else if (typeof tag.comment === "string") { - pushCommentRange(commentStart, tag.end - commentStart); - } - } - } - if (pos !== docComment.end) { - pushCommentRange(pos, docComment.end - pos); - } - return; - function processJSDocParameterTag(tag) { - if (tag.isNameFirst) { - pushCommentRange(pos, tag.name.pos - pos); - pushClassification(tag.name.pos, tag.name.end - tag.name.pos, 17 /* parameterName */); - pos = tag.name.end; - } - if (tag.typeExpression) { - pushCommentRange(pos, tag.typeExpression.pos - pos); - processElement(tag.typeExpression); - pos = tag.typeExpression.end; - } - if (!tag.isNameFirst) { - pushCommentRange(pos, tag.name.pos - pos); - pushClassification(tag.name.pos, tag.name.end - tag.name.pos, 17 /* parameterName */); - pos = tag.name.end; - } - } - } - function tryClassifyTripleSlashComment(start, width) { - const tripleSlashXMLCommentRegEx = /^(\/\/\/\s*)(<)(?:(\S+)((?:[^/]|\/[^>])*)(\/>)?)?/im; - const attributeRegex = /(\s)(\S+)(\s*)(=)(\s*)('[^']+'|"[^"]+")/img; - const text = sourceFile.text.substr(start, width); - const match = tripleSlashXMLCommentRegEx.exec(text); - if (!match) { - return false; - } - if (!match[3] || !(match[3] in commentPragmas)) { - return false; - } - let pos = start; - pushCommentRange(pos, match[1].length); - pos += match[1].length; - pushClassification(pos, match[2].length, 10 /* punctuation */); - pos += match[2].length; - pushClassification(pos, match[3].length, 21 /* jsxSelfClosingTagName */); - pos += match[3].length; - const attrText = match[4]; - let attrPos = pos; - while (true) { - const attrMatch = attributeRegex.exec(attrText); - if (!attrMatch) { - break; - } - const newAttrPos = pos + attrMatch.index + attrMatch[1].length; - if (newAttrPos > attrPos) { - pushCommentRange(attrPos, newAttrPos - attrPos); - attrPos = newAttrPos; - } - pushClassification(attrPos, attrMatch[2].length, 22 /* jsxAttribute */); - attrPos += attrMatch[2].length; - if (attrMatch[3].length) { - pushCommentRange(attrPos, attrMatch[3].length); - attrPos += attrMatch[3].length; - } - pushClassification(attrPos, attrMatch[4].length, 5 /* operator */); - attrPos += attrMatch[4].length; - if (attrMatch[5].length) { - pushCommentRange(attrPos, attrMatch[5].length); - attrPos += attrMatch[5].length; - } - pushClassification(attrPos, attrMatch[6].length, 24 /* jsxAttributeStringLiteralValue */); - attrPos += attrMatch[6].length; - } - pos += match[4].length; - if (pos > attrPos) { - pushCommentRange(attrPos, pos - attrPos); - } - if (match[5]) { - pushClassification(pos, match[5].length, 10 /* punctuation */); - pos += match[5].length; - } - const end = start + width; - if (pos < end) { - pushCommentRange(pos, end - pos); - } - return true; - } - function processJSDocTemplateTag(tag) { - for (const child of tag.getChildren()) { - processElement(child); - } - } - function classifyDisabledMergeCode(text, start, end) { - let i; - for (i = start; i < end; i++) { - if (isLineBreak(text.charCodeAt(i))) { - break; - } - } - pushClassification(start, i - start, 1 /* comment */); - mergeConflictScanner.resetTokenState(i); - while (mergeConflictScanner.getTokenEnd() < end) { - classifyDisabledCodeToken(); - } - } - function classifyDisabledCodeToken() { - const start = mergeConflictScanner.getTokenEnd(); - const tokenKind = mergeConflictScanner.scan(); - const end = mergeConflictScanner.getTokenEnd(); - const type = classifyTokenType(tokenKind); - if (type) { - pushClassification(start, end - start, type); - } - } - function tryClassifyNode(node) { - if (isJSDoc(node)) { - return true; - } - if (nodeIsMissing(node)) { - return true; - } - const classifiedElementName = tryClassifyJsxElementName(node); - if (!isToken(node) && node.kind !== 12 /* JsxText */ && classifiedElementName === void 0) { - return false; - } - const tokenStart = node.kind === 12 /* JsxText */ ? node.pos : classifyLeadingTriviaAndGetTokenStart(node); - const tokenWidth = node.end - tokenStart; - Debug.assert(tokenWidth >= 0); - if (tokenWidth > 0) { - const type = classifiedElementName || classifyTokenType(node.kind, node); - if (type) { - pushClassification(tokenStart, tokenWidth, type); - } - } - return true; - } - function tryClassifyJsxElementName(token) { - switch (token.parent && token.parent.kind) { - case 286 /* JsxOpeningElement */: - if (token.parent.tagName === token) { - return 19 /* jsxOpenTagName */; - } - break; - case 287 /* JsxClosingElement */: - if (token.parent.tagName === token) { - return 20 /* jsxCloseTagName */; - } - break; - case 285 /* JsxSelfClosingElement */: - if (token.parent.tagName === token) { - return 21 /* jsxSelfClosingTagName */; - } - break; - case 291 /* JsxAttribute */: - if (token.parent.name === token) { - return 22 /* jsxAttribute */; - } - break; - } - return void 0; - } - function classifyTokenType(tokenKind, token) { - if (isKeyword(tokenKind)) { - return 3 /* keyword */; - } - if (tokenKind === 30 /* LessThanToken */ || tokenKind === 32 /* GreaterThanToken */) { - if (token && getTypeArgumentOrTypeParameterList(token.parent)) { - return 10 /* punctuation */; - } - } - if (isPunctuation(tokenKind)) { - if (token) { - const parent2 = token.parent; - if (tokenKind === 64 /* EqualsToken */) { - if (parent2.kind === 260 /* VariableDeclaration */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 169 /* Parameter */ || parent2.kind === 291 /* JsxAttribute */) { - return 5 /* operator */; - } - } - if (parent2.kind === 226 /* BinaryExpression */ || parent2.kind === 224 /* PrefixUnaryExpression */ || parent2.kind === 225 /* PostfixUnaryExpression */ || parent2.kind === 227 /* ConditionalExpression */) { - return 5 /* operator */; - } - } - return 10 /* punctuation */; - } else if (tokenKind === 9 /* NumericLiteral */) { - return 4 /* numericLiteral */; - } else if (tokenKind === 10 /* BigIntLiteral */) { - return 25 /* bigintLiteral */; - } else if (tokenKind === 11 /* StringLiteral */) { - return token && token.parent.kind === 291 /* JsxAttribute */ ? 24 /* jsxAttributeStringLiteralValue */ : 6 /* stringLiteral */; - } else if (tokenKind === 14 /* RegularExpressionLiteral */) { - return 6 /* stringLiteral */; - } else if (isTemplateLiteralKind(tokenKind)) { - return 6 /* stringLiteral */; - } else if (tokenKind === 12 /* JsxText */) { - return 23 /* jsxText */; - } else if (tokenKind === 80 /* Identifier */) { - if (token) { - switch (token.parent.kind) { - case 263 /* ClassDeclaration */: - if (token.parent.name === token) { - return 11 /* className */; - } - return; - case 168 /* TypeParameter */: - if (token.parent.name === token) { - return 15 /* typeParameterName */; - } - return; - case 264 /* InterfaceDeclaration */: - if (token.parent.name === token) { - return 13 /* interfaceName */; - } - return; - case 266 /* EnumDeclaration */: - if (token.parent.name === token) { - return 12 /* enumName */; - } - return; - case 267 /* ModuleDeclaration */: - if (token.parent.name === token) { - return 14 /* moduleName */; - } - return; - case 169 /* Parameter */: - if (token.parent.name === token) { - return isThisIdentifier(token) ? 3 /* keyword */ : 17 /* parameterName */; - } - return; - } - if (isConstTypeReference(token.parent)) { - return 3 /* keyword */; - } - } - return 2 /* identifier */; - } - } - function processElement(element) { - if (!element) { - return; - } - if (decodedTextSpanIntersectsWith(spanStart, spanLength, element.pos, element.getFullWidth())) { - checkForClassificationCancellation(cancellationToken, element.kind); - for (const child of element.getChildren(sourceFile)) { - if (!tryClassifyNode(child)) { - processElement(child); - } - } - } - } - } - var noRegexTable; - var init_classifier = __esm({ - "src/services/classifier.ts"() { - "use strict"; - init_ts4(); - noRegexTable = arrayToNumericMap([ - 80 /* Identifier */, - 11 /* StringLiteral */, - 9 /* NumericLiteral */, - 10 /* BigIntLiteral */, - 14 /* RegularExpressionLiteral */, - 110 /* ThisKeyword */, - 46 /* PlusPlusToken */, - 47 /* MinusMinusToken */, - 22 /* CloseParenToken */, - 24 /* CloseBracketToken */, - 20 /* CloseBraceToken */, - 112 /* TrueKeyword */, - 97 /* FalseKeyword */ - ], (token) => token, () => true); - } - }); - - // src/services/documentHighlights.ts - var DocumentHighlights; - var init_documentHighlights = __esm({ - "src/services/documentHighlights.ts"() { - "use strict"; - init_ts4(); - ((DocumentHighlights3) => { - function getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch) { - const node = getTouchingPropertyName(sourceFile, position); - if (node.parent && (isJsxOpeningElement(node.parent) && node.parent.tagName === node || isJsxClosingElement(node.parent))) { - const { openingElement, closingElement } = node.parent.parent; - const highlightSpans = [openingElement, closingElement].map(({ tagName }) => getHighlightSpanForNode(tagName, sourceFile)); - return [{ fileName: sourceFile.fileName, highlightSpans }]; - } - return getSemanticDocumentHighlights(position, node, program, cancellationToken, sourceFilesToSearch) || getSyntacticDocumentHighlights(node, sourceFile); - } - DocumentHighlights3.getDocumentHighlights = getDocumentHighlights; - function getHighlightSpanForNode(node, sourceFile) { - return { - fileName: sourceFile.fileName, - textSpan: createTextSpanFromNode(node, sourceFile), - kind: "none" /* none */ - }; - } - function getSemanticDocumentHighlights(position, node, program, cancellationToken, sourceFilesToSearch) { - const sourceFilesSet = new Set(sourceFilesToSearch.map((f) => f.fileName)); - const referenceEntries = ts_FindAllReferences_exports.getReferenceEntriesForNode( - position, - node, - program, - sourceFilesToSearch, - cancellationToken, - /*options*/ - void 0, - sourceFilesSet - ); - if (!referenceEntries) - return void 0; - const map2 = arrayToMultiMap(referenceEntries.map(ts_FindAllReferences_exports.toHighlightSpan), (e) => e.fileName, (e) => e.span); - const getCanonicalFileName = createGetCanonicalFileName(program.useCaseSensitiveFileNames()); - return arrayFrom(mapDefinedIterator(map2.entries(), ([fileName, highlightSpans]) => { - if (!sourceFilesSet.has(fileName)) { - if (!program.redirectTargetsMap.has(toPath(fileName, program.getCurrentDirectory(), getCanonicalFileName))) { - return void 0; - } - const redirectTarget = program.getSourceFile(fileName); - const redirect = find(sourceFilesToSearch, (f) => !!f.redirectInfo && f.redirectInfo.redirectTarget === redirectTarget); - fileName = redirect.fileName; - Debug.assert(sourceFilesSet.has(fileName)); - } - return { fileName, highlightSpans }; - })); - } - function getSyntacticDocumentHighlights(node, sourceFile) { - const highlightSpans = getHighlightSpans(node, sourceFile); - return highlightSpans && [{ fileName: sourceFile.fileName, highlightSpans }]; - } - function getHighlightSpans(node, sourceFile) { - switch (node.kind) { - case 101 /* IfKeyword */: - case 93 /* ElseKeyword */: - return isIfStatement(node.parent) ? getIfElseOccurrences(node.parent, sourceFile) : void 0; - case 107 /* ReturnKeyword */: - return useParent(node.parent, isReturnStatement, getReturnOccurrences); - case 111 /* ThrowKeyword */: - return useParent(node.parent, isThrowStatement, getThrowOccurrences); - case 113 /* TryKeyword */: - case 85 /* CatchKeyword */: - case 98 /* FinallyKeyword */: - const tryStatement = node.kind === 85 /* CatchKeyword */ ? node.parent.parent : node.parent; - return useParent(tryStatement, isTryStatement, getTryCatchFinallyOccurrences); - case 109 /* SwitchKeyword */: - return useParent(node.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences); - case 84 /* CaseKeyword */: - case 90 /* DefaultKeyword */: { - if (isDefaultClause(node.parent) || isCaseClause(node.parent)) { - return useParent(node.parent.parent.parent, isSwitchStatement, getSwitchCaseDefaultOccurrences); - } - return void 0; - } - case 83 /* BreakKeyword */: - case 88 /* ContinueKeyword */: - return useParent(node.parent, isBreakOrContinueStatement, getBreakOrContinueStatementOccurrences); - case 99 /* ForKeyword */: - case 117 /* WhileKeyword */: - case 92 /* DoKeyword */: - return useParent(node.parent, (n) => isIterationStatement( - n, - /*lookInLabeledStatements*/ - true - ), getLoopBreakContinueOccurrences); - case 137 /* ConstructorKeyword */: - return getFromAllDeclarations(isConstructorDeclaration, [137 /* ConstructorKeyword */]); - case 139 /* GetKeyword */: - case 153 /* SetKeyword */: - return getFromAllDeclarations(isAccessor, [139 /* GetKeyword */, 153 /* SetKeyword */]); - case 135 /* AwaitKeyword */: - return useParent(node.parent, isAwaitExpression, getAsyncAndAwaitOccurrences); - case 134 /* AsyncKeyword */: - return highlightSpans(getAsyncAndAwaitOccurrences(node)); - case 127 /* YieldKeyword */: - return highlightSpans(getYieldOccurrences(node)); - case 103 /* InKeyword */: - return void 0; - default: - return isModifierKind(node.kind) && (isDeclaration(node.parent) || isVariableStatement(node.parent)) ? highlightSpans(getModifierOccurrences(node.kind, node.parent)) : void 0; - } - function getFromAllDeclarations(nodeTest, keywords) { - return useParent(node.parent, nodeTest, (decl) => { - var _a; - return mapDefined((_a = tryCast(decl, canHaveSymbol)) == null ? void 0 : _a.symbol.declarations, (d) => nodeTest(d) ? find(d.getChildren(sourceFile), (c) => contains(keywords, c.kind)) : void 0); - }); - } - function useParent(node2, nodeTest, getNodes4) { - return nodeTest(node2) ? highlightSpans(getNodes4(node2, sourceFile)) : void 0; - } - function highlightSpans(nodes) { - return nodes && nodes.map((node2) => getHighlightSpanForNode(node2, sourceFile)); - } - } - function aggregateOwnedThrowStatements(node) { - if (isThrowStatement(node)) { - return [node]; - } else if (isTryStatement(node)) { - return concatenate( - node.catchClause ? aggregateOwnedThrowStatements(node.catchClause) : node.tryBlock && aggregateOwnedThrowStatements(node.tryBlock), - node.finallyBlock && aggregateOwnedThrowStatements(node.finallyBlock) - ); - } - return isFunctionLike(node) ? void 0 : flatMapChildren(node, aggregateOwnedThrowStatements); - } - function getThrowStatementOwner(throwStatement) { - let child = throwStatement; - while (child.parent) { - const parent2 = child.parent; - if (isFunctionBlock(parent2) || parent2.kind === 312 /* SourceFile */) { - return parent2; - } - if (isTryStatement(parent2) && parent2.tryBlock === child && parent2.catchClause) { - return child; - } - child = parent2; - } - return void 0; - } - function aggregateAllBreakAndContinueStatements(node) { - return isBreakOrContinueStatement(node) ? [node] : isFunctionLike(node) ? void 0 : flatMapChildren(node, aggregateAllBreakAndContinueStatements); - } - function flatMapChildren(node, cb) { - const result = []; - node.forEachChild((child) => { - const value = cb(child); - if (value !== void 0) { - result.push(...toArray(value)); - } - }); - return result; - } - function ownsBreakOrContinueStatement(owner, statement) { - const actualOwner = getBreakOrContinueOwner(statement); - return !!actualOwner && actualOwner === owner; - } - function getBreakOrContinueOwner(statement) { - return findAncestor(statement, (node) => { - switch (node.kind) { - case 255 /* SwitchStatement */: - if (statement.kind === 251 /* ContinueStatement */) { - return false; - } - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 247 /* WhileStatement */: - case 246 /* DoStatement */: - return !statement.label || isLabeledBy(node, statement.label.escapedText); - default: - return isFunctionLike(node) && "quit"; - } - }); - } - function getModifierOccurrences(modifier, declaration) { - return mapDefined(getNodesToSearchForModifier(declaration, modifierToFlag(modifier)), (node) => findModifier(node, modifier)); - } - function getNodesToSearchForModifier(declaration, modifierFlag) { - const container = declaration.parent; - switch (container.kind) { - case 268 /* ModuleBlock */: - case 312 /* SourceFile */: - case 241 /* Block */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { - return [...declaration.members, declaration]; - } else { - return container.statements; - } - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 262 /* FunctionDeclaration */: - return [...container.parameters, ...isClassLike(container.parent) ? container.parent.members : []]; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 187 /* TypeLiteral */: - const nodes = container.members; - if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { - const constructor = find(container.members, isConstructorDeclaration); - if (constructor) { - return [...nodes, ...constructor.parameters]; - } - } else if (modifierFlag & 256 /* Abstract */) { - return [...nodes, container]; - } - return nodes; - case 210 /* ObjectLiteralExpression */: - return void 0; - default: - Debug.assertNever(container, "Invalid container kind."); - } - } - function pushKeywordIf(keywordList, token, ...expected) { - if (token && contains(expected, token.kind)) { - keywordList.push(token); - return true; - } - return false; - } - function getLoopBreakContinueOccurrences(loopNode) { - const keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 99 /* ForKeyword */, 117 /* WhileKeyword */, 92 /* DoKeyword */)) { - if (loopNode.kind === 246 /* DoStatement */) { - const loopTokens = loopNode.getChildren(); - for (let i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 117 /* WhileKeyword */)) { - break; - } - } - } - } - forEach(aggregateAllBreakAndContinueStatements(loopNode.statement), (statement) => { - if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 83 /* BreakKeyword */, 88 /* ContinueKeyword */); - } - }); - return keywords; - } - function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) { - const owner = getBreakOrContinueOwner(breakOrContinueStatement); - if (owner) { - switch (owner.kind) { - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - return getLoopBreakContinueOccurrences(owner); - case 255 /* SwitchStatement */: - return getSwitchCaseDefaultOccurrences(owner); - } - } - return void 0; - } - function getSwitchCaseDefaultOccurrences(switchStatement) { - const keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 109 /* SwitchKeyword */); - forEach(switchStatement.caseBlock.clauses, (clause) => { - pushKeywordIf(keywords, clause.getFirstToken(), 84 /* CaseKeyword */, 90 /* DefaultKeyword */); - forEach(aggregateAllBreakAndContinueStatements(clause), (statement) => { - if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 83 /* BreakKeyword */); - } - }); - }); - return keywords; - } - function getTryCatchFinallyOccurrences(tryStatement, sourceFile) { - const keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 113 /* TryKeyword */); - if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 85 /* CatchKeyword */); - } - if (tryStatement.finallyBlock) { - const finallyKeyword = findChildOfKind(tryStatement, 98 /* FinallyKeyword */, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 98 /* FinallyKeyword */); - } - return keywords; - } - function getThrowOccurrences(throwStatement, sourceFile) { - const owner = getThrowStatementOwner(throwStatement); - if (!owner) { - return void 0; - } - const keywords = []; - forEach(aggregateOwnedThrowStatements(owner), (throwStatement2) => { - keywords.push(findChildOfKind(throwStatement2, 111 /* ThrowKeyword */, sourceFile)); - }); - if (isFunctionBlock(owner)) { - forEachReturnStatement(owner, (returnStatement) => { - keywords.push(findChildOfKind(returnStatement, 107 /* ReturnKeyword */, sourceFile)); - }); - } - return keywords; - } - function getReturnOccurrences(returnStatement, sourceFile) { - const func = getContainingFunction(returnStatement); - if (!func) { - return void 0; - } - const keywords = []; - forEachReturnStatement(cast(func.body, isBlock), (returnStatement2) => { - keywords.push(findChildOfKind(returnStatement2, 107 /* ReturnKeyword */, sourceFile)); - }); - forEach(aggregateOwnedThrowStatements(func.body), (throwStatement) => { - keywords.push(findChildOfKind(throwStatement, 111 /* ThrowKeyword */, sourceFile)); - }); - return keywords; - } - function getAsyncAndAwaitOccurrences(node) { - const func = getContainingFunction(node); - if (!func) { - return void 0; - } - const keywords = []; - if (func.modifiers) { - func.modifiers.forEach((modifier) => { - pushKeywordIf(keywords, modifier, 134 /* AsyncKeyword */); - }); - } - forEachChild(func, (child) => { - traverseWithoutCrossingFunction(child, (node2) => { - if (isAwaitExpression(node2)) { - pushKeywordIf(keywords, node2.getFirstToken(), 135 /* AwaitKeyword */); - } - }); - }); - return keywords; - } - function getYieldOccurrences(node) { - const func = getContainingFunction(node); - if (!func) { - return void 0; - } - const keywords = []; - forEachChild(func, (child) => { - traverseWithoutCrossingFunction(child, (node2) => { - if (isYieldExpression(node2)) { - pushKeywordIf(keywords, node2.getFirstToken(), 127 /* YieldKeyword */); - } - }); - }); - return keywords; - } - function traverseWithoutCrossingFunction(node, cb) { - cb(node); - if (!isFunctionLike(node) && !isClassLike(node) && !isInterfaceDeclaration(node) && !isModuleDeclaration(node) && !isTypeAliasDeclaration(node) && !isTypeNode(node)) { - forEachChild(node, (child) => traverseWithoutCrossingFunction(child, cb)); - } - } - function getIfElseOccurrences(ifStatement, sourceFile) { - const keywords = getIfElseKeywords(ifStatement, sourceFile); - const result = []; - for (let i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 93 /* ElseKeyword */ && i < keywords.length - 1) { - const elseKeyword = keywords[i]; - const ifKeyword = keywords[i + 1]; - let shouldCombineElseAndIf = true; - for (let j = ifKeyword.getStart(sourceFile) - 1; j >= elseKeyword.end; j--) { - if (!isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(j))) { - shouldCombineElseAndIf = false; - break; - } - } - if (shouldCombineElseAndIf) { - result.push({ - fileName: sourceFile.fileName, - textSpan: createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end), - kind: "reference" /* reference */ - }); - i++; - continue; - } - } - result.push(getHighlightSpanForNode(keywords[i], sourceFile)); - } - return result; - } - function getIfElseKeywords(ifStatement, sourceFile) { - const keywords = []; - while (isIfStatement(ifStatement.parent) && ifStatement.parent.elseStatement === ifStatement) { - ifStatement = ifStatement.parent; - } - while (true) { - const children = ifStatement.getChildren(sourceFile); - pushKeywordIf(keywords, children[0], 101 /* IfKeyword */); - for (let i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 93 /* ElseKeyword */)) { - break; - } - } - if (!ifStatement.elseStatement || !isIfStatement(ifStatement.elseStatement)) { - break; - } - ifStatement = ifStatement.elseStatement; - } - return keywords; - } - function isLabeledBy(node, labelName) { - return !!findAncestor(node.parent, (owner) => !isLabeledStatement(owner) ? "quit" : owner.label.escapedText === labelName); - } - })(DocumentHighlights || (DocumentHighlights = {})); - } - }); - - // src/services/documentRegistry.ts - function isDocumentRegistryEntry(entry) { - return !!entry.sourceFile; - } - function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) { - return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory); - } - function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) { - const buckets = /* @__PURE__ */ new Map(); - const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2); - function reportStats() { - const bucketInfoArray = arrayFrom(buckets.keys()).filter((name) => name && name.charAt(0) === "_").map((name) => { - const entries = buckets.get(name); - const sourceFiles = []; - entries.forEach((entry, name2) => { - if (isDocumentRegistryEntry(entry)) { - sourceFiles.push({ - name: name2, - scriptKind: entry.sourceFile.scriptKind, - refCount: entry.languageServiceRefCount - }); - } else { - entry.forEach((value, scriptKind) => sourceFiles.push({ name: name2, scriptKind, refCount: value.languageServiceRefCount })); - } - }); - sourceFiles.sort((x, y) => y.refCount - x.refCount); - return { - bucket: name, - sourceFiles - }; - }); - return JSON.stringify(bucketInfoArray, void 0, 2); - } - function getCompilationSettings(settingsOrHost) { - if (typeof settingsOrHost.getCompilationSettings === "function") { - return settingsOrHost.getCompilationSettings(); - } - return settingsOrHost; - } - function acquireDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) { - const path = toPath(fileName, currentDirectory, getCanonicalFileName); - const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings)); - return acquireDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions); - } - function acquireDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) { - return acquireOrUpdateDocument( - fileName, - path, - compilationSettings, - key, - scriptSnapshot, - version2, - /*acquiring*/ - true, - scriptKind, - languageVersionOrOptions - ); - } - function updateDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) { - const path = toPath(fileName, currentDirectory, getCanonicalFileName); - const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings)); - return updateDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions); - } - function updateDocumentWithKey(fileName, path, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) { - return acquireOrUpdateDocument( - fileName, - path, - getCompilationSettings(compilationSettings), - key, - scriptSnapshot, - version2, - /*acquiring*/ - false, - scriptKind, - languageVersionOrOptions - ); - } - function getDocumentRegistryEntry(bucketEntry, scriptKind) { - const entry = isDocumentRegistryEntry(bucketEntry) ? bucketEntry : bucketEntry.get(Debug.checkDefined(scriptKind, "If there are more than one scriptKind's for same document the scriptKind should be provided")); - Debug.assert(scriptKind === void 0 || !entry || entry.sourceFile.scriptKind === scriptKind, `Script kind should match provided ScriptKind:${scriptKind} and sourceFile.scriptKind: ${entry == null ? void 0 : entry.sourceFile.scriptKind}, !entry: ${!entry}`); - return entry; - } - function acquireOrUpdateDocument(fileName, path, compilationSettingsOrHost, key, scriptSnapshot, version2, acquiring, scriptKind, languageVersionOrOptions) { - var _a, _b, _c, _d; - scriptKind = ensureScriptKind(fileName, scriptKind); - const compilationSettings = getCompilationSettings(compilationSettingsOrHost); - const host = compilationSettingsOrHost === compilationSettings ? void 0 : compilationSettingsOrHost; - const scriptTarget = scriptKind === 6 /* JSON */ ? 100 /* JSON */ : getEmitScriptTarget(compilationSettings); - const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { - languageVersion: scriptTarget, - impliedNodeFormat: host && getImpliedNodeFormatForFile(path, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings), - setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings) - }; - sourceFileOptions.languageVersion = scriptTarget; - const oldBucketCount = buckets.size; - const keyWithMode = getDocumentRegistryBucketKeyWithMode(key, sourceFileOptions.impliedNodeFormat); - const bucket = getOrUpdate(buckets, keyWithMode, () => /* @__PURE__ */ new Map()); - if (tracing) { - if (buckets.size > oldBucketCount) { - tracing.instant(tracing.Phase.Session, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: keyWithMode }); - } - const otherBucketKey = !isDeclarationFileName(path) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path) && bucketKey); - if (otherBucketKey) { - tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path, key1: otherBucketKey, key2: keyWithMode }); - } - } - const bucketEntry = bucket.get(path); - let entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind); - if (!entry && externalCache) { - const sourceFile = externalCache.getDocument(keyWithMode, path); - if (sourceFile) { - Debug.assert(acquiring); - entry = { - sourceFile, - languageServiceRefCount: 0 - }; - setBucketEntry(); - } - } - if (!entry) { - const sourceFile = createLanguageServiceSourceFile( - fileName, - scriptSnapshot, - sourceFileOptions, - version2, - /*setNodeParents*/ - false, - scriptKind - ); - if (externalCache) { - externalCache.setDocument(keyWithMode, path, sourceFile); - } - entry = { - sourceFile, - languageServiceRefCount: 1 - }; - setBucketEntry(); - } else { - if (entry.sourceFile.version !== version2) { - entry.sourceFile = updateLanguageServiceSourceFile( - entry.sourceFile, - scriptSnapshot, - version2, - scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot) - ); - if (externalCache) { - externalCache.setDocument(keyWithMode, path, entry.sourceFile); - } - } - if (acquiring) { - entry.languageServiceRefCount++; - } - } - Debug.assert(entry.languageServiceRefCount !== 0); - return entry.sourceFile; - function setBucketEntry() { - if (!bucketEntry) { - bucket.set(path, entry); - } else if (isDocumentRegistryEntry(bucketEntry)) { - const scriptKindMap = /* @__PURE__ */ new Map(); - scriptKindMap.set(bucketEntry.sourceFile.scriptKind, bucketEntry); - scriptKindMap.set(scriptKind, entry); - bucket.set(path, scriptKindMap); - } else { - bucketEntry.set(scriptKind, entry); - } - } - } - function releaseDocument(fileName, compilationSettings, scriptKind, impliedNodeFormat) { - const path = toPath(fileName, currentDirectory, getCanonicalFileName); - const key = getKeyForCompilationSettings(compilationSettings); - return releaseDocumentWithKey(path, key, scriptKind, impliedNodeFormat); - } - function releaseDocumentWithKey(path, key, scriptKind, impliedNodeFormat) { - const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(key, impliedNodeFormat))); - const bucketEntry = bucket.get(path); - const entry = getDocumentRegistryEntry(bucketEntry, scriptKind); - entry.languageServiceRefCount--; - Debug.assert(entry.languageServiceRefCount >= 0); - if (entry.languageServiceRefCount === 0) { - if (isDocumentRegistryEntry(bucketEntry)) { - bucket.delete(path); - } else { - bucketEntry.delete(scriptKind); - if (bucketEntry.size === 1) { - bucket.set(path, firstDefinedIterator(bucketEntry.values(), identity)); - } - } - } - } - return { - acquireDocument, - acquireDocumentWithKey, - updateDocument, - updateDocumentWithKey, - releaseDocument, - releaseDocumentWithKey, - getKeyForCompilationSettings, - getDocumentRegistryBucketKeyWithMode, - reportStats, - getBuckets: () => buckets - }; - } - function getKeyForCompilationSettings(settings) { - return getKeyForCompilerOptions(settings, sourceFileAffectingCompilerOptions); - } - function getDocumentRegistryBucketKeyWithMode(key, mode) { - return mode ? `${key}|${mode}` : key; - } - var init_documentRegistry = __esm({ - "src/services/documentRegistry.ts"() { - "use strict"; - init_ts4(); - } - }); - - // src/services/getEditsForFileRename.ts - function getEditsForFileRename(program, oldFileOrDirPath, newFileOrDirPath, host, formatContext, preferences, sourceMapper) { - const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); - const oldToNew = getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper); - const newToOld = getPathUpdater(newFileOrDirPath, oldFileOrDirPath, getCanonicalFileName, sourceMapper); - return ts_textChanges_exports.ChangeTracker.with({ host, formatContext, preferences }, (changeTracker) => { - updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, host.getCurrentDirectory(), useCaseSensitiveFileNames2); - updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName); - }); - } - function getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper) { - const canonicalOldPath = getCanonicalFileName(oldFileOrDirPath); - return (path) => { - const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path, pos: 0 }); - const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path); - return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path, getCanonicalFileName) : updatedPath; - }; - function getUpdatedPath(pathToUpdate) { - if (getCanonicalFileName(pathToUpdate) === canonicalOldPath) - return newFileOrDirPath; - const suffix = tryRemoveDirectoryPrefix(pathToUpdate, canonicalOldPath, getCanonicalFileName); - return suffix === void 0 ? void 0 : newFileOrDirPath + "/" + suffix; - } - } - function makeCorrespondingRelativeChange(a0, b0, a1, getCanonicalFileName) { - const rel = getRelativePathFromFile(a0, b0, getCanonicalFileName); - return combinePathsSafe(getDirectoryPath(a1), rel); - } - function updateTsconfigFiles(program, changeTracker, oldToNew, oldFileOrDirPath, newFileOrDirPath, currentDirectory, useCaseSensitiveFileNames2) { - const { configFile } = program.getCompilerOptions(); - if (!configFile) - return; - const configDir = getDirectoryPath(configFile.fileName); - const jsonObjectLiteral = getTsConfigObjectLiteralExpression(configFile); - if (!jsonObjectLiteral) - return; - forEachProperty(jsonObjectLiteral, (property, propertyName) => { - switch (propertyName) { - case "files": - case "include": - case "exclude": { - const foundExactMatch = updatePaths(property); - if (foundExactMatch || propertyName !== "include" || !isArrayLiteralExpression(property.initializer)) - return; - const includes = mapDefined(property.initializer.elements, (e) => isStringLiteral(e) ? e.text : void 0); - if (includes.length === 0) - return; - const matchers = getFileMatcherPatterns( - configDir, - /*excludes*/ - [], - includes, - useCaseSensitiveFileNames2, - currentDirectory - ); - if (getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(oldFileOrDirPath) && !getRegexFromPattern(Debug.checkDefined(matchers.includeFilePattern), useCaseSensitiveFileNames2).test(newFileOrDirPath)) { - changeTracker.insertNodeAfter(configFile, last(property.initializer.elements), factory.createStringLiteral(relativePath(newFileOrDirPath))); - } - return; - } - case "compilerOptions": - forEachProperty(property.initializer, (property2, propertyName2) => { - const option = getOptionFromName(propertyName2); - Debug.assert((option == null ? void 0 : option.type) !== "listOrElement"); - if (option && (option.isFilePath || option.type === "list" && option.element.isFilePath)) { - updatePaths(property2); - } else if (propertyName2 === "paths") { - forEachProperty(property2.initializer, (pathsProperty) => { - if (!isArrayLiteralExpression(pathsProperty.initializer)) - return; - for (const e of pathsProperty.initializer.elements) { - tryUpdateString(e); - } - }); - } - }); - return; - } - }); - function updatePaths(property) { - const elements = isArrayLiteralExpression(property.initializer) ? property.initializer.elements : [property.initializer]; - let foundExactMatch = false; - for (const element of elements) { - foundExactMatch = tryUpdateString(element) || foundExactMatch; - } - return foundExactMatch; - } - function tryUpdateString(element) { - if (!isStringLiteral(element)) - return false; - const elementFileName = combinePathsSafe(configDir, element.text); - const updated = oldToNew(elementFileName); - if (updated !== void 0) { - changeTracker.replaceRangeWithText(configFile, createStringRange(element, configFile), relativePath(updated)); - return true; - } - return false; - } - function relativePath(path) { - return getRelativePathFromDirectory( - configDir, - path, - /*ignoreCase*/ - !useCaseSensitiveFileNames2 - ); - } - } - function updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName) { - const allFiles = program.getSourceFiles(); - for (const sourceFile of allFiles) { - const newFromOld = oldToNew(sourceFile.fileName); - const newImportFromPath = newFromOld ?? sourceFile.fileName; - const newImportFromDirectory = getDirectoryPath(newImportFromPath); - const oldFromNew = newToOld(sourceFile.fileName); - const oldImportFromPath = oldFromNew || sourceFile.fileName; - const oldImportFromDirectory = getDirectoryPath(oldImportFromPath); - const importingSourceFileMoved = newFromOld !== void 0 || oldFromNew !== void 0; - updateImportsWorker( - sourceFile, - changeTracker, - (referenceText) => { - if (!pathIsRelative(referenceText)) - return void 0; - const oldAbsolute = combinePathsSafe(oldImportFromDirectory, referenceText); - const newAbsolute = oldToNew(oldAbsolute); - return newAbsolute === void 0 ? void 0 : ensurePathIsNonModuleName(getRelativePathFromDirectory(newImportFromDirectory, newAbsolute, getCanonicalFileName)); - }, - (importLiteral) => { - const importedModuleSymbol = program.getTypeChecker().getSymbolAtLocation(importLiteral); - if ((importedModuleSymbol == null ? void 0 : importedModuleSymbol.declarations) && importedModuleSymbol.declarations.some((d) => isAmbientModule(d))) - return void 0; - const toImport = oldFromNew !== void 0 ? getSourceFileToImportFromResolved( - importLiteral, - resolveModuleName(importLiteral.text, oldImportFromPath, program.getCompilerOptions(), host), - oldToNew, - allFiles - ) : getSourceFileToImport(importedModuleSymbol, importLiteral, sourceFile, program, host, oldToNew); - return toImport !== void 0 && (toImport.updated || importingSourceFileMoved && pathIsRelative(importLiteral.text)) ? ts_moduleSpecifiers_exports.updateModuleSpecifier(program.getCompilerOptions(), sourceFile, getCanonicalFileName(newImportFromPath), toImport.newFileName, createModuleSpecifierResolutionHost(program, host), importLiteral.text) : void 0; - } - ); - } - } - function combineNormal(pathA, pathB) { - return normalizePath(combinePaths(pathA, pathB)); - } - function combinePathsSafe(pathA, pathB) { - return ensurePathIsNonModuleName(combineNormal(pathA, pathB)); - } - function getSourceFileToImport(importedModuleSymbol, importLiteral, importingSourceFile, program, host, oldToNew) { - var _a; - if (importedModuleSymbol) { - const oldFileName = find(importedModuleSymbol.declarations, isSourceFile).fileName; - const newFileName = oldToNew(oldFileName); - return newFileName === void 0 ? { newFileName: oldFileName, updated: false } : { newFileName, updated: true }; - } else { - const mode = getModeForUsageLocation(importingSourceFile, importLiteral); - const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ? (_a = importingSourceFile.resolvedModules) == null ? void 0 : _a.get(importLiteral.text, mode) : host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName, mode); - return getSourceFileToImportFromResolved(importLiteral, resolved, oldToNew, program.getSourceFiles()); - } - } - function getSourceFileToImportFromResolved(importLiteral, resolved, oldToNew, sourceFiles) { - if (!resolved) - return void 0; - if (resolved.resolvedModule) { - const result2 = tryChange(resolved.resolvedModule.resolvedFileName); - if (result2) - return result2; - } - const result = forEach(resolved.failedLookupLocations, tryChangeWithIgnoringPackageJsonExisting) || pathIsRelative(importLiteral.text) && forEach(resolved.failedLookupLocations, tryChangeWithIgnoringPackageJson); - if (result) - return result; - return resolved.resolvedModule && { newFileName: resolved.resolvedModule.resolvedFileName, updated: false }; - function tryChangeWithIgnoringPackageJsonExisting(oldFileName) { - const newFileName = oldToNew(oldFileName); - return newFileName && find(sourceFiles, (src) => src.fileName === newFileName) ? tryChangeWithIgnoringPackageJson(oldFileName) : void 0; - } - function tryChangeWithIgnoringPackageJson(oldFileName) { - return !endsWith(oldFileName, "/package.json") ? tryChange(oldFileName) : void 0; - } - function tryChange(oldFileName) { - const newFileName = oldToNew(oldFileName); - return newFileName && { newFileName, updated: true }; - } - } - function updateImportsWorker(sourceFile, changeTracker, updateRef, updateImport2) { - for (const ref of sourceFile.referencedFiles || emptyArray) { - const updated = updateRef(ref.fileName); - if (updated !== void 0 && updated !== sourceFile.text.slice(ref.pos, ref.end)) - changeTracker.replaceRangeWithText(sourceFile, ref, updated); - } - for (const importStringLiteral of sourceFile.imports) { - const updated = updateImport2(importStringLiteral); - if (updated !== void 0 && updated !== importStringLiteral.text) - changeTracker.replaceRangeWithText(sourceFile, createStringRange(importStringLiteral, sourceFile), updated); - } - } - function createStringRange(node, sourceFile) { - return createRange(node.getStart(sourceFile) + 1, node.end - 1); - } - function forEachProperty(objectLiteral, cb) { - if (!isObjectLiteralExpression(objectLiteral)) - return; - for (const property of objectLiteral.properties) { - if (isPropertyAssignment(property) && isStringLiteral(property.name)) { - cb(property, property.name.text); - } - } - } - var init_getEditsForFileRename = __esm({ - "src/services/getEditsForFileRename.ts"() { - "use strict"; - init_ts4(); - } - }); - - // src/services/patternMatcher.ts - function createPatternMatch(kind, isCaseSensitive) { - return { - kind, - isCaseSensitive - }; - } - function createPatternMatcher(pattern) { - const stringToWordSpans = /* @__PURE__ */ new Map(); - const dotSeparatedSegments = pattern.trim().split(".").map((p) => createSegment(p.trim())); - if (dotSeparatedSegments.some((segment) => !segment.subWordTextChunks.length)) - return void 0; - return { - getFullMatch: (containers, candidate) => getFullMatch(containers, candidate, dotSeparatedSegments, stringToWordSpans), - getMatchForLastSegmentOfPattern: (candidate) => matchSegment(candidate, last(dotSeparatedSegments), stringToWordSpans), - patternContainsDots: dotSeparatedSegments.length > 1 - }; - } - function getFullMatch(candidateContainers, candidate, dotSeparatedSegments, stringToWordSpans) { - const candidateMatch = matchSegment(candidate, last(dotSeparatedSegments), stringToWordSpans); - if (!candidateMatch) { - return void 0; - } - if (dotSeparatedSegments.length - 1 > candidateContainers.length) { - return void 0; - } - let bestMatch; - for (let i = dotSeparatedSegments.length - 2, j = candidateContainers.length - 1; i >= 0; i -= 1, j -= 1) { - bestMatch = betterMatch(bestMatch, matchSegment(candidateContainers[j], dotSeparatedSegments[i], stringToWordSpans)); - } - return bestMatch; - } - function getWordSpans(word, stringToWordSpans) { - let spans = stringToWordSpans.get(word); - if (!spans) { - stringToWordSpans.set(word, spans = breakIntoWordSpans(word)); - } - return spans; - } - function matchTextChunk(candidate, chunk, stringToWordSpans) { - const index = indexOfIgnoringCase(candidate, chunk.textLowerCase); - if (index === 0) { - return createPatternMatch( - chunk.text.length === candidate.length ? 0 /* exact */ : 1 /* prefix */, - /*isCaseSensitive:*/ - startsWith(candidate, chunk.text) - ); - } - if (chunk.isLowerCase) { - if (index === -1) - return void 0; - const wordSpans = getWordSpans(candidate, stringToWordSpans); - for (const span of wordSpans) { - if (partStartsWith( - candidate, - span, - chunk.text, - /*ignoreCase*/ - true - )) { - return createPatternMatch( - 2 /* substring */, - /*isCaseSensitive:*/ - partStartsWith( - candidate, - span, - chunk.text, - /*ignoreCase*/ - false - ) - ); - } - } - if (chunk.text.length < candidate.length && isUpperCaseLetter(candidate.charCodeAt(index))) { - return createPatternMatch( - 2 /* substring */, - /*isCaseSensitive*/ - false - ); - } - } else { - if (candidate.indexOf(chunk.text) > 0) { - return createPatternMatch( - 2 /* substring */, - /*isCaseSensitive*/ - true - ); - } - if (chunk.characterSpans.length > 0) { - const candidateParts = getWordSpans(candidate, stringToWordSpans); - const isCaseSensitive = tryCamelCaseMatch( - candidate, - candidateParts, - chunk, - /*ignoreCase*/ - false - ) ? true : tryCamelCaseMatch( - candidate, - candidateParts, - chunk, - /*ignoreCase*/ - true - ) ? false : void 0; - if (isCaseSensitive !== void 0) { - return createPatternMatch(3 /* camelCase */, isCaseSensitive); - } - } - } - } - function matchSegment(candidate, segment, stringToWordSpans) { - if (every2(segment.totalTextChunk.text, (ch) => ch !== 32 /* space */ && ch !== 42 /* asterisk */)) { - const match = matchTextChunk(candidate, segment.totalTextChunk, stringToWordSpans); - if (match) - return match; - } - const subWordTextChunks = segment.subWordTextChunks; - let bestMatch; - for (const subWordTextChunk of subWordTextChunks) { - bestMatch = betterMatch(bestMatch, matchTextChunk(candidate, subWordTextChunk, stringToWordSpans)); - } - return bestMatch; - } - function betterMatch(a, b) { - return min([a, b], compareMatches); - } - function compareMatches(a, b) { - return a === void 0 ? 1 /* GreaterThan */ : b === void 0 ? -1 /* LessThan */ : compareValues(a.kind, b.kind) || compareBooleans(!a.isCaseSensitive, !b.isCaseSensitive); - } - function partStartsWith(candidate, candidateSpan, pattern, ignoreCase, patternSpan = { start: 0, length: pattern.length }) { - return patternSpan.length <= candidateSpan.length && everyInRange(0, patternSpan.length, (i) => equalChars(pattern.charCodeAt(patternSpan.start + i), candidate.charCodeAt(candidateSpan.start + i), ignoreCase)); - } - function equalChars(ch1, ch2, ignoreCase) { - return ignoreCase ? toLowerCase2(ch1) === toLowerCase2(ch2) : ch1 === ch2; - } - function tryCamelCaseMatch(candidate, candidateParts, chunk, ignoreCase) { - const chunkCharacterSpans = chunk.characterSpans; - let currentCandidate = 0; - let currentChunkSpan = 0; - let firstMatch; - let contiguous; - while (true) { - if (currentChunkSpan === chunkCharacterSpans.length) { - return true; - } else if (currentCandidate === candidateParts.length) { - return false; - } - let candidatePart = candidateParts[currentCandidate]; - let gotOneMatchThisCandidate = false; - for (; currentChunkSpan < chunkCharacterSpans.length; currentChunkSpan++) { - const chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan]; - if (gotOneMatchThisCandidate) { - if (!isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan - 1].start)) || !isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan].start))) { - break; - } - } - if (!partStartsWith(candidate, candidatePart, chunk.text, ignoreCase, chunkCharacterSpan)) { - break; - } - gotOneMatchThisCandidate = true; - firstMatch = firstMatch === void 0 ? currentCandidate : firstMatch; - contiguous = contiguous === void 0 ? true : contiguous; - candidatePart = createTextSpan(candidatePart.start + chunkCharacterSpan.length, candidatePart.length - chunkCharacterSpan.length); - } - if (!gotOneMatchThisCandidate && contiguous !== void 0) { - contiguous = false; - } - currentCandidate++; - } - } - function createSegment(text) { - return { - totalTextChunk: createTextChunk(text), - subWordTextChunks: breakPatternIntoTextChunks(text) - }; - } - function isUpperCaseLetter(ch) { - if (ch >= 65 /* A */ && ch <= 90 /* Z */) { - return true; - } - if (ch < 127 /* maxAsciiCharacter */ || !isUnicodeIdentifierStart(ch, 99 /* Latest */)) { - return false; - } - const str = String.fromCharCode(ch); - return str === str.toUpperCase(); - } - function isLowerCaseLetter(ch) { - if (ch >= 97 /* a */ && ch <= 122 /* z */) { - return true; - } - if (ch < 127 /* maxAsciiCharacter */ || !isUnicodeIdentifierStart(ch, 99 /* Latest */)) { - return false; - } - const str = String.fromCharCode(ch); - return str === str.toLowerCase(); - } - function indexOfIgnoringCase(str, value) { - const n = str.length - value.length; - for (let start = 0; start <= n; start++) { - if (every2(value, (valueChar, i) => toLowerCase2(str.charCodeAt(i + start)) === valueChar)) { - return start; - } - } - return -1; - } - function toLowerCase2(ch) { - if (ch >= 65 /* A */ && ch <= 90 /* Z */) { - return 97 /* a */ + (ch - 65 /* A */); - } - if (ch < 127 /* maxAsciiCharacter */) { - return ch; - } - return String.fromCharCode(ch).toLowerCase().charCodeAt(0); - } - function isDigit2(ch) { - return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; - } - function isWordChar(ch) { - return isUpperCaseLetter(ch) || isLowerCaseLetter(ch) || isDigit2(ch) || ch === 95 /* _ */ || ch === 36 /* $ */; - } - function breakPatternIntoTextChunks(pattern) { - const result = []; - let wordStart = 0; - let wordLength = 0; - for (let i = 0; i < pattern.length; i++) { - const ch = pattern.charCodeAt(i); - if (isWordChar(ch)) { - if (wordLength === 0) { - wordStart = i; - } - wordLength++; - } else { - if (wordLength > 0) { - result.push(createTextChunk(pattern.substr(wordStart, wordLength))); - wordLength = 0; - } - } - } - if (wordLength > 0) { - result.push(createTextChunk(pattern.substr(wordStart, wordLength))); - } - return result; - } - function createTextChunk(text) { - const textLowerCase = text.toLowerCase(); - return { - text, - textLowerCase, - isLowerCase: text === textLowerCase, - characterSpans: breakIntoCharacterSpans(text) - }; - } - function breakIntoCharacterSpans(identifier) { - return breakIntoSpans( - identifier, - /*word*/ - false - ); - } - function breakIntoWordSpans(identifier) { - return breakIntoSpans( - identifier, - /*word*/ - true - ); - } - function breakIntoSpans(identifier, word) { - const result = []; - let wordStart = 0; - for (let i = 1; i < identifier.length; i++) { - const lastIsDigit = isDigit2(identifier.charCodeAt(i - 1)); - const currentIsDigit = isDigit2(identifier.charCodeAt(i)); - const hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i); - const hasTransitionFromUpperToLower = word && transitionFromUpperToLower(identifier, i, wordStart); - if (charIsPunctuation(identifier.charCodeAt(i - 1)) || charIsPunctuation(identifier.charCodeAt(i)) || lastIsDigit !== currentIsDigit || hasTransitionFromLowerToUpper || hasTransitionFromUpperToLower) { - if (!isAllPunctuation(identifier, wordStart, i)) { - result.push(createTextSpan(wordStart, i - wordStart)); - } - wordStart = i; - } - } - if (!isAllPunctuation(identifier, wordStart, identifier.length)) { - result.push(createTextSpan(wordStart, identifier.length - wordStart)); - } - return result; - } - function charIsPunctuation(ch) { - switch (ch) { - case 33 /* exclamation */: - case 34 /* doubleQuote */: - case 35 /* hash */: - case 37 /* percent */: - case 38 /* ampersand */: - case 39 /* singleQuote */: - case 40 /* openParen */: - case 41 /* closeParen */: - case 42 /* asterisk */: - case 44 /* comma */: - case 45 /* minus */: - case 46 /* dot */: - case 47 /* slash */: - case 58 /* colon */: - case 59 /* semicolon */: - case 63 /* question */: - case 64 /* at */: - case 91 /* openBracket */: - case 92 /* backslash */: - case 93 /* closeBracket */: - case 95 /* _ */: - case 123 /* openBrace */: - case 125 /* closeBrace */: - return true; - } - return false; - } - function isAllPunctuation(identifier, start, end) { - return every2(identifier, (ch) => charIsPunctuation(ch) && ch !== 95 /* _ */, start, end); - } - function transitionFromUpperToLower(identifier, index, wordStart) { - return index !== wordStart && index + 1 < identifier.length && isUpperCaseLetter(identifier.charCodeAt(index)) && isLowerCaseLetter(identifier.charCodeAt(index + 1)) && every2(identifier, isUpperCaseLetter, wordStart, index); - } - function transitionFromLowerToUpper(identifier, word, index) { - const lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1)); - const currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); - return currentIsUpper && (!word || !lastIsUpper); - } - function everyInRange(start, end, pred) { - for (let i = start; i < end; i++) { - if (!pred(i)) { - return false; - } - } - return true; - } - function every2(s, pred, start = 0, end = s.length) { - return everyInRange(start, end, (i) => pred(s.charCodeAt(i), i)); - } - var PatternMatchKind; - var init_patternMatcher = __esm({ - "src/services/patternMatcher.ts"() { - "use strict"; - init_ts4(); - PatternMatchKind = /* @__PURE__ */ ((PatternMatchKind2) => { - PatternMatchKind2[PatternMatchKind2["exact"] = 0] = "exact"; - PatternMatchKind2[PatternMatchKind2["prefix"] = 1] = "prefix"; - PatternMatchKind2[PatternMatchKind2["substring"] = 2] = "substring"; - PatternMatchKind2[PatternMatchKind2["camelCase"] = 3] = "camelCase"; - return PatternMatchKind2; - })(PatternMatchKind || {}); - } - }); - - // src/services/preProcess.ts - function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImports = false) { - const pragmaContext = { - languageVersion: 1 /* ES5 */, - // controls whether the token scanner considers unicode identifiers or not - shouldn't matter, since we're only using it for trivia - pragmas: void 0, - checkJsDirective: void 0, - referencedFiles: [], - typeReferenceDirectives: [], - libReferenceDirectives: [], - amdDependencies: [], - hasNoDefaultLib: void 0, - moduleName: void 0 - }; - const importedFiles = []; - let ambientExternalModules; - let lastToken; - let currentToken; - let braceNesting = 0; - let externalModule = false; - function nextToken() { - lastToken = currentToken; - currentToken = scanner.scan(); - if (currentToken === 19 /* OpenBraceToken */) { - braceNesting++; - } else if (currentToken === 20 /* CloseBraceToken */) { - braceNesting--; - } - return currentToken; - } - function getFileReference() { - const fileName = scanner.getTokenValue(); - const pos = scanner.getTokenStart(); - return { fileName, pos, end: pos + fileName.length }; - } - function recordAmbientExternalModule() { - if (!ambientExternalModules) { - ambientExternalModules = []; - } - ambientExternalModules.push({ ref: getFileReference(), depth: braceNesting }); - } - function recordModuleName() { - importedFiles.push(getFileReference()); - markAsExternalModuleIfTopLevel(); - } - function markAsExternalModuleIfTopLevel() { - if (braceNesting === 0) { - externalModule = true; - } - } - function tryConsumeDeclare() { - let token = scanner.getToken(); - if (token === 138 /* DeclareKeyword */) { - token = nextToken(); - if (token === 144 /* ModuleKeyword */) { - token = nextToken(); - if (token === 11 /* StringLiteral */) { - recordAmbientExternalModule(); - } - } - return true; - } - return false; - } - function tryConsumeImport() { - if (lastToken === 25 /* DotToken */) { - return false; - } - let token = scanner.getToken(); - if (token === 102 /* ImportKeyword */) { - token = nextToken(); - if (token === 21 /* OpenParenToken */) { - token = nextToken(); - if (token === 11 /* StringLiteral */ || token === 15 /* NoSubstitutionTemplateLiteral */) { - recordModuleName(); - return true; - } - } else if (token === 11 /* StringLiteral */) { - recordModuleName(); - return true; - } else { - if (token === 156 /* TypeKeyword */) { - const skipTypeKeyword = scanner.lookAhead(() => { - const token2 = scanner.scan(); - return token2 !== 161 /* FromKeyword */ && (token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */ || token2 === 80 /* Identifier */ || isKeyword(token2)); - }); - if (skipTypeKeyword) { - token = nextToken(); - } - } - if (token === 80 /* Identifier */ || isKeyword(token)) { - token = nextToken(); - if (token === 161 /* FromKeyword */) { - token = nextToken(); - if (token === 11 /* StringLiteral */) { - recordModuleName(); - return true; - } - } else if (token === 64 /* EqualsToken */) { - if (tryConsumeRequireCall( - /*skipCurrentToken*/ - true - )) { - return true; - } - } else if (token === 28 /* CommaToken */) { - token = nextToken(); - } else { - return true; - } - } - if (token === 19 /* OpenBraceToken */) { - token = nextToken(); - while (token !== 20 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { - token = nextToken(); - } - if (token === 20 /* CloseBraceToken */) { - token = nextToken(); - if (token === 161 /* FromKeyword */) { - token = nextToken(); - if (token === 11 /* StringLiteral */) { - recordModuleName(); - } - } - } - } else if (token === 42 /* AsteriskToken */) { - token = nextToken(); - if (token === 130 /* AsKeyword */) { - token = nextToken(); - if (token === 80 /* Identifier */ || isKeyword(token)) { - token = nextToken(); - if (token === 161 /* FromKeyword */) { - token = nextToken(); - if (token === 11 /* StringLiteral */) { - recordModuleName(); - } - } - } - } - } - } - return true; - } - return false; - } - function tryConsumeExport() { - let token = scanner.getToken(); - if (token === 95 /* ExportKeyword */) { - markAsExternalModuleIfTopLevel(); - token = nextToken(); - if (token === 156 /* TypeKeyword */) { - const skipTypeKeyword = scanner.lookAhead(() => { - const token2 = scanner.scan(); - return token2 === 42 /* AsteriskToken */ || token2 === 19 /* OpenBraceToken */; - }); - if (skipTypeKeyword) { - token = nextToken(); - } - } - if (token === 19 /* OpenBraceToken */) { - token = nextToken(); - while (token !== 20 /* CloseBraceToken */ && token !== 1 /* EndOfFileToken */) { - token = nextToken(); - } - if (token === 20 /* CloseBraceToken */) { - token = nextToken(); - if (token === 161 /* FromKeyword */) { - token = nextToken(); - if (token === 11 /* StringLiteral */) { - recordModuleName(); - } - } - } - } else if (token === 42 /* AsteriskToken */) { - token = nextToken(); - if (token === 161 /* FromKeyword */) { - token = nextToken(); - if (token === 11 /* StringLiteral */) { - recordModuleName(); - } - } - } else if (token === 102 /* ImportKeyword */) { - token = nextToken(); - if (token === 156 /* TypeKeyword */) { - const skipTypeKeyword = scanner.lookAhead(() => { - const token2 = scanner.scan(); - return token2 === 80 /* Identifier */ || isKeyword(token2); - }); - if (skipTypeKeyword) { - token = nextToken(); - } - } - if (token === 80 /* Identifier */ || isKeyword(token)) { - token = nextToken(); - if (token === 64 /* EqualsToken */) { - if (tryConsumeRequireCall( - /*skipCurrentToken*/ - true - )) { - return true; - } - } - } - } - return true; - } - return false; - } - function tryConsumeRequireCall(skipCurrentToken, allowTemplateLiterals = false) { - let token = skipCurrentToken ? nextToken() : scanner.getToken(); - if (token === 149 /* RequireKeyword */) { - token = nextToken(); - if (token === 21 /* OpenParenToken */) { - token = nextToken(); - if (token === 11 /* StringLiteral */ || allowTemplateLiterals && token === 15 /* NoSubstitutionTemplateLiteral */) { - recordModuleName(); - } - } - return true; - } - return false; - } - function tryConsumeDefine() { - let token = scanner.getToken(); - if (token === 80 /* Identifier */ && scanner.getTokenValue() === "define") { - token = nextToken(); - if (token !== 21 /* OpenParenToken */) { - return true; - } - token = nextToken(); - if (token === 11 /* StringLiteral */ || token === 15 /* NoSubstitutionTemplateLiteral */) { - token = nextToken(); - if (token === 28 /* CommaToken */) { - token = nextToken(); - } else { - return true; - } - } - if (token !== 23 /* OpenBracketToken */) { - return true; - } - token = nextToken(); - while (token !== 24 /* CloseBracketToken */ && token !== 1 /* EndOfFileToken */) { - if (token === 11 /* StringLiteral */ || token === 15 /* NoSubstitutionTemplateLiteral */) { - recordModuleName(); - } - token = nextToken(); - } - return true; - } - return false; - } - function processImports() { - scanner.setText(sourceText); - nextToken(); - while (true) { - if (scanner.getToken() === 1 /* EndOfFileToken */) { - break; - } - if (scanner.getToken() === 16 /* TemplateHead */) { - const stack = [scanner.getToken()]; - loop: - while (length(stack)) { - const token = scanner.scan(); - switch (token) { - case 1 /* EndOfFileToken */: - break loop; - case 102 /* ImportKeyword */: - tryConsumeImport(); - break; - case 16 /* TemplateHead */: - stack.push(token); - break; - case 19 /* OpenBraceToken */: - if (length(stack)) { - stack.push(token); - } - break; - case 20 /* CloseBraceToken */: - if (length(stack)) { - if (lastOrUndefined(stack) === 16 /* TemplateHead */) { - if (scanner.reScanTemplateToken( - /*isTaggedTemplate*/ - false - ) === 18 /* TemplateTail */) { - stack.pop(); - } - } else { - stack.pop(); - } - } - break; - } - } - nextToken(); - } - if (tryConsumeDeclare() || tryConsumeImport() || tryConsumeExport() || detectJavaScriptImports && (tryConsumeRequireCall( - /*skipCurrentToken*/ - false, - /*allowTemplateLiterals*/ - true - ) || tryConsumeDefine())) { - continue; - } else { - nextToken(); - } - } - scanner.setText(void 0); - } - if (readImportFiles) { - processImports(); - } - processCommentPragmas(pragmaContext, sourceText); - processPragmasIntoFields(pragmaContext, noop); - if (externalModule) { - if (ambientExternalModules) { - for (const decl of ambientExternalModules) { - importedFiles.push(decl.ref); - } - } - return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: !!pragmaContext.hasNoDefaultLib, ambientExternalModules: void 0 }; - } else { - let ambientModuleNames; - if (ambientExternalModules) { - for (const decl of ambientExternalModules) { - if (decl.depth === 0) { - if (!ambientModuleNames) { - ambientModuleNames = []; - } - ambientModuleNames.push(decl.ref.fileName); - } else { - importedFiles.push(decl.ref); - } - } - } - return { referencedFiles: pragmaContext.referencedFiles, typeReferenceDirectives: pragmaContext.typeReferenceDirectives, libReferenceDirectives: pragmaContext.libReferenceDirectives, importedFiles, isLibFile: !!pragmaContext.hasNoDefaultLib, ambientExternalModules: ambientModuleNames }; - } - } - var init_preProcess = __esm({ - "src/services/preProcess.ts"() { - "use strict"; - init_ts4(); - } - }); - - // src/services/sourcemaps.ts - function getSourceMapper(host) { - const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); - const currentDirectory = host.getCurrentDirectory(); - const sourceFileLike = /* @__PURE__ */ new Map(); - const documentPositionMappers = /* @__PURE__ */ new Map(); - return { tryGetSourcePosition, tryGetGeneratedPosition, toLineColumnOffset, clearCache }; - function toPath3(fileName) { - return toPath(fileName, currentDirectory, getCanonicalFileName); - } - function getDocumentPositionMapper2(generatedFileName, sourceFileName) { - const path = toPath3(generatedFileName); - const value = documentPositionMappers.get(path); - if (value) - return value; - let mapper; - if (host.getDocumentPositionMapper) { - mapper = host.getDocumentPositionMapper(generatedFileName, sourceFileName); - } else if (host.readFile) { - const file = getSourceFileLike(generatedFileName); - mapper = file && getDocumentPositionMapper( - { getSourceFileLike, getCanonicalFileName, log: (s) => host.log(s) }, - generatedFileName, - getLineInfo(file.text, getLineStarts(file)), - (f) => !host.fileExists || host.fileExists(f) ? host.readFile(f) : void 0 - ); - } - documentPositionMappers.set(path, mapper || identitySourceMapConsumer); - return mapper || identitySourceMapConsumer; - } - function tryGetSourcePosition(info) { - if (!isDeclarationFileName(info.fileName)) - return void 0; - const file = getSourceFile(info.fileName); - if (!file) - return void 0; - const newLoc = getDocumentPositionMapper2(info.fileName).getSourcePosition(info); - return !newLoc || newLoc === info ? void 0 : tryGetSourcePosition(newLoc) || newLoc; - } - function tryGetGeneratedPosition(info) { - if (isDeclarationFileName(info.fileName)) - return void 0; - const sourceFile = getSourceFile(info.fileName); - if (!sourceFile) - return void 0; - const program = host.getProgram(); - if (program.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) { - return void 0; - } - const options = program.getCompilerOptions(); - const outPath = outFile(options); - const declarationPath = outPath ? removeFileExtension(outPath) + ".d.ts" /* Dts */ : getDeclarationEmitOutputFilePathWorker(info.fileName, program.getCompilerOptions(), currentDirectory, program.getCommonSourceDirectory(), getCanonicalFileName); - if (declarationPath === void 0) - return void 0; - const newLoc = getDocumentPositionMapper2(declarationPath, info.fileName).getGeneratedPosition(info); - return newLoc === info ? void 0 : newLoc; - } - function getSourceFile(fileName) { - const program = host.getProgram(); - if (!program) - return void 0; - const path = toPath3(fileName); - const file = program.getSourceFileByPath(path); - return file && file.resolvedPath === path ? file : void 0; - } - function getOrCreateSourceFileLike(fileName) { - const path = toPath3(fileName); - const fileFromCache = sourceFileLike.get(path); - if (fileFromCache !== void 0) - return fileFromCache ? fileFromCache : void 0; - if (!host.readFile || host.fileExists && !host.fileExists(path)) { - sourceFileLike.set(path, false); - return void 0; - } - const text = host.readFile(path); - const file = text ? createSourceFileLike(text) : false; - sourceFileLike.set(path, file); - return file ? file : void 0; - } - function getSourceFileLike(fileName) { - return !host.getSourceFileLike ? getSourceFile(fileName) || getOrCreateSourceFileLike(fileName) : host.getSourceFileLike(fileName); - } - function toLineColumnOffset(fileName, position) { - const file = getSourceFileLike(fileName); - return file.getLineAndCharacterOfPosition(position); - } - function clearCache() { - sourceFileLike.clear(); - documentPositionMappers.clear(); - } - } - function getDocumentPositionMapper(host, generatedFileName, generatedFileLineInfo, readMapFile) { - let mapFileName = tryGetSourceMappingURL(generatedFileLineInfo); - if (mapFileName) { - const match = base64UrlRegExp.exec(mapFileName); - if (match) { - if (match[1]) { - const base64Object = match[1]; - return convertDocumentToSourceMapper(host, base64decode(sys, base64Object), generatedFileName); - } - mapFileName = void 0; - } - } - const possibleMapLocations = []; - if (mapFileName) { - possibleMapLocations.push(mapFileName); - } - possibleMapLocations.push(generatedFileName + ".map"); - const originalMapFileName = mapFileName && getNormalizedAbsolutePath(mapFileName, getDirectoryPath(generatedFileName)); - for (const location of possibleMapLocations) { - const mapFileName2 = getNormalizedAbsolutePath(location, getDirectoryPath(generatedFileName)); - const mapFileContents = readMapFile(mapFileName2, originalMapFileName); - if (isString(mapFileContents)) { - return convertDocumentToSourceMapper(host, mapFileContents, mapFileName2); - } - if (mapFileContents !== void 0) { - return mapFileContents || void 0; - } - } - return void 0; - } - function convertDocumentToSourceMapper(host, contents, mapFileName) { - const map2 = tryParseRawSourceMap(contents); - if (!map2 || !map2.sources || !map2.file || !map2.mappings) { - return void 0; - } - if (map2.sourcesContent && map2.sourcesContent.some(isString)) - return void 0; - return createDocumentPositionMapper(host, map2, mapFileName); - } - function createSourceFileLike(text, lineMap) { - return { - text, - lineMap, - getLineAndCharacterOfPosition(pos) { - return computeLineAndCharacterOfPosition(getLineStarts(this), pos); - } - }; - } - var base64UrlRegExp; - var init_sourcemaps = __esm({ - "src/services/sourcemaps.ts"() { - "use strict"; - init_ts4(); - base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/; - } - }); - - // src/services/suggestionDiagnostics.ts - function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { - program.getSemanticDiagnostics(sourceFile, cancellationToken); - const diags = []; - const checker = program.getTypeChecker(); - const isCommonJSFile = sourceFile.impliedNodeFormat === 1 /* CommonJS */ || fileExtensionIsOneOf(sourceFile.fileName, [".cts" /* Cts */, ".cjs" /* Cjs */]); - if (!isCommonJSFile && sourceFile.commonJsModuleIndicator && (programContainsEsModules(program) || compilerOptionsIndicateEsModules(program.getCompilerOptions())) && containsTopLevelCommonjs(sourceFile)) { - diags.push(createDiagnosticForNode(getErrorNodeFromCommonJsIndicator(sourceFile.commonJsModuleIndicator), Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module)); - } - const isJsFile = isSourceFileJS(sourceFile); - visitedNestedConvertibleFunctions.clear(); - check(sourceFile); - if (getAllowSyntheticDefaultImports(program.getCompilerOptions())) { - for (const moduleSpecifier of sourceFile.imports) { - const importNode = importFromModuleSpecifier(moduleSpecifier); - const name = importNameForConvertToDefaultImport(importNode); - if (!name) - continue; - const module2 = getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); - const resolvedFile = module2 && program.getSourceFile(module2.resolvedFileName); - if (resolvedFile && resolvedFile.externalModuleIndicator && resolvedFile.externalModuleIndicator !== true && isExportAssignment(resolvedFile.externalModuleIndicator) && resolvedFile.externalModuleIndicator.isExportEquals) { - diags.push(createDiagnosticForNode(name, Diagnostics.Import_may_be_converted_to_a_default_import)); - } - } - } - addRange(diags, sourceFile.bindSuggestionDiagnostics); - addRange(diags, program.getSuggestionDiagnostics(sourceFile, cancellationToken)); - return diags.sort((d1, d2) => d1.start - d2.start); - function check(node) { - if (isJsFile) { - if (canBeConvertedToClass(node, checker)) { - diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) ? node.parent.name : node, Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); - } - } else { - if (isVariableStatement(node) && node.parent === sourceFile && node.declarationList.flags & 2 /* Const */ && node.declarationList.declarations.length === 1) { - const init = node.declarationList.declarations[0].initializer; - if (init && isRequireCall( - init, - /*requireStringLiteralLikeArgument*/ - true - )) { - diags.push(createDiagnosticForNode(init, Diagnostics.require_call_may_be_converted_to_an_import)); - } - } - const jsdocTypedefNodes = ts_codefix_exports.getJSDocTypedefNodes(node); - for (const jsdocTypedefNode of jsdocTypedefNodes) { - diags.push(createDiagnosticForNode(jsdocTypedefNode, Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type)); - } - if (ts_codefix_exports.parameterShouldGetTypeFromJSDoc(node)) { - diags.push(createDiagnosticForNode(node.name || node, Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types)); - } - } - if (canBeConvertedToAsync(node)) { - addConvertToAsyncFunctionDiagnostics(node, checker, diags); - } - node.forEachChild(check); - } - } - function containsTopLevelCommonjs(sourceFile) { - return sourceFile.statements.some((statement) => { - switch (statement.kind) { - case 243 /* VariableStatement */: - return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall( - propertyAccessLeftHandSide(decl.initializer), - /*requireStringLiteralLikeArgument*/ - true - )); - case 244 /* ExpressionStatement */: { - const { expression } = statement; - if (!isBinaryExpression(expression)) - return isRequireCall( - expression, - /*requireStringLiteralLikeArgument*/ - true - ); - const kind = getAssignmentDeclarationKind(expression); - return kind === 1 /* ExportsProperty */ || kind === 2 /* ModuleExports */; - } - default: - return false; - } - }); - } - function propertyAccessLeftHandSide(node) { - return isPropertyAccessExpression(node) ? propertyAccessLeftHandSide(node.expression) : node; - } - function importNameForConvertToDefaultImport(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - const { importClause, moduleSpecifier } = node; - return importClause && !importClause.name && importClause.namedBindings && importClause.namedBindings.kind === 274 /* NamespaceImport */ && isStringLiteral(moduleSpecifier) ? importClause.namedBindings.name : void 0; - case 271 /* ImportEqualsDeclaration */: - return node.name; - default: - return void 0; - } - } - function addConvertToAsyncFunctionDiagnostics(node, checker, diags) { - if (isConvertibleFunction(node, checker) && !visitedNestedConvertibleFunctions.has(getKeyFromNode(node))) { - diags.push(createDiagnosticForNode( - !node.name && isVariableDeclaration(node.parent) && isIdentifier(node.parent.name) ? node.parent.name : node, - Diagnostics.This_may_be_converted_to_an_async_function - )); - } - } - function isConvertibleFunction(node, checker) { - return !isAsyncFunction(node) && node.body && isBlock(node.body) && hasReturnStatementWithPromiseHandler(node.body, checker) && returnsPromise(node, checker); - } - function returnsPromise(node, checker) { - const signature = checker.getSignatureFromDeclaration(node); - const returnType = signature ? checker.getReturnTypeOfSignature(signature) : void 0; - return !!returnType && !!checker.getPromisedTypeOfPromise(returnType); - } - function getErrorNodeFromCommonJsIndicator(commonJsModuleIndicator) { - return isBinaryExpression(commonJsModuleIndicator) ? commonJsModuleIndicator.left : commonJsModuleIndicator; - } - function hasReturnStatementWithPromiseHandler(body, checker) { - return !!forEachReturnStatement(body, (statement) => isReturnStatementWithFixablePromiseHandler(statement, checker)); - } - function isReturnStatementWithFixablePromiseHandler(node, checker) { - return isReturnStatement(node) && !!node.expression && isFixablePromiseHandler(node.expression, checker); - } - function isFixablePromiseHandler(node, checker) { - if (!isPromiseHandler(node) || !hasSupportedNumberOfArguments(node) || !node.arguments.every((arg) => isFixablePromiseArgument(arg, checker))) { - return false; - } - let currentNode = node.expression.expression; - while (isPromiseHandler(currentNode) || isPropertyAccessExpression(currentNode)) { - if (isCallExpression(currentNode)) { - if (!hasSupportedNumberOfArguments(currentNode) || !currentNode.arguments.every((arg) => isFixablePromiseArgument(arg, checker))) { - return false; - } - currentNode = currentNode.expression.expression; - } else { - currentNode = currentNode.expression; - } - } - return true; - } - function isPromiseHandler(node) { - return isCallExpression(node) && (hasPropertyAccessExpressionWithName(node, "then") || hasPropertyAccessExpressionWithName(node, "catch") || hasPropertyAccessExpressionWithName(node, "finally")); - } - function hasSupportedNumberOfArguments(node) { - const name = node.expression.name.text; - const maxArguments = name === "then" ? 2 : name === "catch" ? 1 : name === "finally" ? 1 : 0; - if (node.arguments.length > maxArguments) - return false; - if (node.arguments.length < maxArguments) - return true; - return maxArguments === 1 || some(node.arguments, (arg) => { - return arg.kind === 106 /* NullKeyword */ || isIdentifier(arg) && arg.text === "undefined"; - }); - } - function isFixablePromiseArgument(arg, checker) { - switch (arg.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - const functionFlags = getFunctionFlags(arg); - if (functionFlags & 1 /* Generator */) { - return false; - } - case 219 /* ArrowFunction */: - visitedNestedConvertibleFunctions.set(getKeyFromNode(arg), true); - case 106 /* NullKeyword */: - return true; - case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: { - const symbol = checker.getSymbolAtLocation(arg); - if (!symbol) { - return false; - } - return checker.isUndefinedSymbol(symbol) || some(skipAlias(symbol, checker).declarations, (d) => isFunctionLike(d) || hasInitializer(d) && !!d.initializer && isFunctionLike(d.initializer)); - } - default: - return false; - } - } - function getKeyFromNode(exp) { - return `${exp.pos.toString()}:${exp.end.toString()}`; - } - function canBeConvertedToClass(node, checker) { - var _a, _b, _c, _d; - if (isFunctionExpression(node)) { - if (isVariableDeclaration(node.parent) && ((_a = node.symbol.members) == null ? void 0 : _a.size)) { - return true; - } - const symbol = checker.getSymbolOfExpando( - node, - /*allowDeclaration*/ - false - ); - return !!(symbol && (((_b = symbol.exports) == null ? void 0 : _b.size) || ((_c = symbol.members) == null ? void 0 : _c.size))); - } - if (isFunctionDeclaration(node)) { - return !!((_d = node.symbol.members) == null ? void 0 : _d.size); - } - return false; - } - function canBeConvertedToAsync(node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return true; - default: - return false; - } - } - var visitedNestedConvertibleFunctions; - var init_suggestionDiagnostics = __esm({ - "src/services/suggestionDiagnostics.ts"() { - "use strict"; - init_ts4(); - visitedNestedConvertibleFunctions = /* @__PURE__ */ new Map(); - } - }); - - // src/services/transpile.ts - function transpileModule(input, transpileOptions) { - const diagnostics = []; - const options = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : {}; - const defaultOptions = getDefaultCompilerOptions2(); - for (const key in defaultOptions) { - if (hasProperty(defaultOptions, key) && options[key] === void 0) { - options[key] = defaultOptions[key]; - } - } - for (const option of transpileOptionValueCompilerOptions) { - if (options.verbatimModuleSyntax && optionsRedundantWithVerbatimModuleSyntax.has(option.name)) { - continue; - } - options[option.name] = option.transpileOptionValue; - } - options.suppressOutputPathCheck = true; - options.allowNonTsExtensions = true; - const newLine = getNewLineCharacter(options); - const compilerHost = { - getSourceFile: (fileName) => fileName === normalizePath(inputFileName) ? sourceFile : void 0, - writeFile: (name, text) => { - if (fileExtensionIs(name, ".map")) { - Debug.assertEqual(sourceMapText, void 0, "Unexpected multiple source map outputs, file:", name); - sourceMapText = text; - } else { - Debug.assertEqual(outputText, void 0, "Unexpected multiple outputs, file:", name); - outputText = text; - } - }, - getDefaultLibFileName: () => "lib.d.ts", - useCaseSensitiveFileNames: () => false, - getCanonicalFileName: (fileName) => fileName, - getCurrentDirectory: () => "", - getNewLine: () => newLine, - fileExists: (fileName) => fileName === inputFileName, - readFile: () => "", - directoryExists: () => true, - getDirectories: () => [] - }; - const inputFileName = transpileOptions.fileName || (transpileOptions.compilerOptions && transpileOptions.compilerOptions.jsx ? "module.tsx" : "module.ts"); - const sourceFile = createSourceFile( - inputFileName, - input, - { - languageVersion: getEmitScriptTarget(options), - impliedNodeFormat: getImpliedNodeFormatForFile( - toPath(inputFileName, "", compilerHost.getCanonicalFileName), - /*packageJsonInfoCache*/ - void 0, - compilerHost, - options - ), - setExternalModuleIndicator: getSetExternalModuleIndicator(options) - } - ); - if (transpileOptions.moduleName) { - sourceFile.moduleName = transpileOptions.moduleName; - } - if (transpileOptions.renamedDependencies) { - sourceFile.renamedDependencies = new Map(Object.entries(transpileOptions.renamedDependencies)); - } - let outputText; - let sourceMapText; - const program = createProgram([inputFileName], options, compilerHost); - if (transpileOptions.reportDiagnostics) { - addRange( - /*to*/ - diagnostics, - /*from*/ - program.getSyntacticDiagnostics(sourceFile) - ); - addRange( - /*to*/ - diagnostics, - /*from*/ - program.getOptionsDiagnostics() - ); - } - program.emit( - /*targetSourceFile*/ - void 0, - /*writeFile*/ - void 0, - /*cancellationToken*/ - void 0, - /*emitOnlyDtsFiles*/ - void 0, - transpileOptions.transformers - ); - if (outputText === void 0) - return Debug.fail("Output generation failed"); - return { outputText, diagnostics, sourceMapText }; - } - function transpile(input, compilerOptions, fileName, diagnostics, moduleName) { - const output = transpileModule(input, { compilerOptions, fileName, reportDiagnostics: !!diagnostics, moduleName }); - addRange(diagnostics, output.diagnostics); - return output.outputText; - } - function fixupCompilerOptions(options, diagnostics) { - commandLineOptionsStringToEnum = commandLineOptionsStringToEnum || filter(optionDeclarations, (o) => typeof o.type === "object" && !forEachEntry(o.type, (v) => typeof v !== "number")); - options = cloneCompilerOptions(options); - for (const opt of commandLineOptionsStringToEnum) { - if (!hasProperty(options, opt.name)) { - continue; - } - const value = options[opt.name]; - if (isString(value)) { - options[opt.name] = parseCustomTypeOption(opt, value, diagnostics); - } else { - if (!forEachEntry(opt.type, (v) => v === value)) { - diagnostics.push(createCompilerDiagnosticForInvalidCustomType(opt)); - } - } - } - return options; - } - var optionsRedundantWithVerbatimModuleSyntax, commandLineOptionsStringToEnum; - var init_transpile = __esm({ - "src/services/transpile.ts"() { - "use strict"; - init_ts4(); - optionsRedundantWithVerbatimModuleSyntax = /* @__PURE__ */ new Set([ - "isolatedModules", - "preserveValueImports", - "importsNotUsedAsValues" - ]); - } - }); - - // src/services/navigateTo.ts - function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) { - const patternMatcher = createPatternMatcher(searchValue); - if (!patternMatcher) - return emptyArray; - const rawItems = []; - for (const sourceFile of sourceFiles) { - cancellationToken.throwIfCancellationRequested(); - if (excludeDtsFiles && sourceFile.isDeclarationFile) { - continue; - } - sourceFile.getNamedDeclarations().forEach((declarations, name) => { - getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, rawItems); - }); - } - rawItems.sort(compareNavigateToItems); - return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem); - } - function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, rawItems) { - const match = patternMatcher.getMatchForLastSegmentOfPattern(name); - if (!match) { - return; - } - for (const declaration of declarations) { - if (!shouldKeepItem(declaration, checker)) - continue; - if (patternMatcher.patternContainsDots) { - const fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name); - if (fullMatch) { - rawItems.push({ name, fileName, matchKind: fullMatch.kind, isCaseSensitive: fullMatch.isCaseSensitive, declaration }); - } - } else { - rawItems.push({ name, fileName, matchKind: match.kind, isCaseSensitive: match.isCaseSensitive, declaration }); - } - } - } - function shouldKeepItem(declaration, checker) { - switch (declaration.kind) { - case 273 /* ImportClause */: - case 276 /* ImportSpecifier */: - case 271 /* ImportEqualsDeclaration */: - const importer = checker.getSymbolAtLocation(declaration.name); - const imported = checker.getAliasedSymbol(importer); - return importer.escapedName !== imported.escapedName; - default: - return true; - } - } - function tryAddSingleDeclarationName(declaration, containers) { - const name = getNameOfDeclaration(declaration); - return !!name && (pushLiteral(name, containers) || name.kind === 167 /* ComputedPropertyName */ && tryAddComputedPropertyName(name.expression, containers)); - } - function tryAddComputedPropertyName(expression, containers) { - return pushLiteral(expression, containers) || isPropertyAccessExpression(expression) && (containers.push(expression.name.text), true) && tryAddComputedPropertyName(expression.expression, containers); - } - function pushLiteral(node, containers) { - return isPropertyNameLiteral(node) && (containers.push(getTextOfIdentifierOrLiteral(node)), true); - } - function getContainers(declaration) { - const containers = []; - const name = getNameOfDeclaration(declaration); - if (name && name.kind === 167 /* ComputedPropertyName */ && !tryAddComputedPropertyName(name.expression, containers)) { - return emptyArray; - } - containers.shift(); - let container = getContainerNode(declaration); - while (container) { - if (!tryAddSingleDeclarationName(container, containers)) { - return emptyArray; - } - container = getContainerNode(container); - } - return containers.reverse(); - } - function compareNavigateToItems(i1, i2) { - return compareValues(i1.matchKind, i2.matchKind) || compareStringsCaseSensitiveUI(i1.name, i2.name); - } - function createNavigateToItem(rawItem) { - const declaration = rawItem.declaration; - const container = getContainerNode(declaration); - const containerName = container && getNameOfDeclaration(container); - return { - name: rawItem.name, - kind: getNodeKind(declaration), - kindModifiers: getNodeModifiers(declaration), - matchKind: PatternMatchKind[rawItem.matchKind], - isCaseSensitive: rawItem.isCaseSensitive, - fileName: rawItem.fileName, - textSpan: createTextSpanFromNode(declaration), - // TODO(jfreeman): What should be the containerName when the container has a computed name? - containerName: containerName ? containerName.text : "", - containerKind: containerName ? getNodeKind(container) : "" /* unknown */ - }; - } - var init_navigateTo = __esm({ - "src/services/navigateTo.ts"() { - "use strict"; - init_ts4(); - } - }); - - // src/services/_namespaces/ts.NavigateTo.ts - var ts_NavigateTo_exports = {}; - __export(ts_NavigateTo_exports, { - getNavigateToItems: () => getNavigateToItems - }); - var init_ts_NavigateTo = __esm({ - "src/services/_namespaces/ts.NavigateTo.ts"() { - "use strict"; - init_navigateTo(); - } - }); - - // src/services/navigationBar.ts - function getNavigationBarItems(sourceFile, cancellationToken) { - curCancellationToken = cancellationToken; - curSourceFile = sourceFile; - try { - return map(primaryNavBarMenuItems(rootNavigationBarNode(sourceFile)), convertToPrimaryNavBarMenuItem); - } finally { - reset(); - } - } - function getNavigationTree(sourceFile, cancellationToken) { - curCancellationToken = cancellationToken; - curSourceFile = sourceFile; - try { - return convertToTree(rootNavigationBarNode(sourceFile)); - } finally { - reset(); - } - } - function reset() { - curSourceFile = void 0; - curCancellationToken = void 0; - parentsStack = []; - parent = void 0; - emptyChildItemArray = []; - } - function nodeText(node) { - return cleanText(node.getText(curSourceFile)); - } - function navigationBarNodeKind(n) { - return n.node.kind; - } - function pushChild(parent2, child) { - if (parent2.children) { - parent2.children.push(child); - } else { - parent2.children = [child]; - } - } - function rootNavigationBarNode(sourceFile) { - Debug.assert(!parentsStack.length); - const root = { node: sourceFile, name: void 0, additionalNodes: void 0, parent: void 0, children: void 0, indent: 0 }; - parent = root; - for (const statement of sourceFile.statements) { - addChildrenRecursively(statement); - } - endNode(); - Debug.assert(!parent && !parentsStack.length); - return root; - } - function addLeafNode(node, name) { - pushChild(parent, emptyNavigationBarNode(node, name)); - } - function emptyNavigationBarNode(node, name) { - return { - node, - name: name || (isDeclaration(node) || isExpression(node) ? getNameOfDeclaration(node) : void 0), - additionalNodes: void 0, - parent, - children: void 0, - indent: parent.indent + 1 - }; - } - function addTrackedEs5Class(name) { - if (!trackedEs5Classes) { - trackedEs5Classes = /* @__PURE__ */ new Map(); - } - trackedEs5Classes.set(name, true); - } - function endNestedNodes(depth) { - for (let i = 0; i < depth; i++) - endNode(); - } - function startNestedNodes(targetNode, entityName) { - const names = []; - while (!isPropertyNameLiteral(entityName)) { - const name = getNameOrArgument(entityName); - const nameText = getElementOrPropertyAccessName(entityName); - entityName = entityName.expression; - if (nameText === "prototype" || isPrivateIdentifier(name)) - continue; - names.push(name); - } - names.push(entityName); - for (let i = names.length - 1; i > 0; i--) { - const name = names[i]; - startNode(targetNode, name); - } - return [names.length - 1, names[0]]; - } - function startNode(node, name) { - const navNode = emptyNavigationBarNode(node, name); - pushChild(parent, navNode); - parentsStack.push(parent); - trackedEs5ClassesStack.push(trackedEs5Classes); - trackedEs5Classes = void 0; - parent = navNode; - } - function endNode() { - if (parent.children) { - mergeChildren(parent.children, parent); - sortChildren(parent.children); - } - parent = parentsStack.pop(); - trackedEs5Classes = trackedEs5ClassesStack.pop(); - } - function addNodeWithRecursiveChild(node, child, name) { - startNode(node, name); - addChildrenRecursively(child); - endNode(); - } - function addNodeWithRecursiveInitializer(node) { - if (node.initializer && isFunctionOrClassExpression(node.initializer)) { - startNode(node); - forEachChild(node.initializer, addChildrenRecursively); - endNode(); - } else { - addNodeWithRecursiveChild(node, node.initializer); - } - } - function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 226 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; - } - function addChildrenRecursively(node) { - curCancellationToken.throwIfCancellationRequested(); - if (!node || isToken(node)) { - return; - } - switch (node.kind) { - case 176 /* Constructor */: - const ctr = node; - addNodeWithRecursiveChild(ctr, ctr.body); - for (const param of ctr.parameters) { - if (isParameterPropertyDeclaration(param, ctr)) { - addLeafNode(param); - } - } - break; - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 173 /* MethodSignature */: - if (hasNavigationBarName(node)) { - addNodeWithRecursiveChild(node, node.body); - } - break; - case 172 /* PropertyDeclaration */: - if (hasNavigationBarName(node)) { - addNodeWithRecursiveInitializer(node); - } - break; - case 171 /* PropertySignature */: - if (hasNavigationBarName(node)) { - addLeafNode(node); - } - break; - case 273 /* ImportClause */: - const importClause = node; - if (importClause.name) { - addLeafNode(importClause.name); - } - const { namedBindings } = importClause; - if (namedBindings) { - if (namedBindings.kind === 274 /* NamespaceImport */) { - addLeafNode(namedBindings); - } else { - for (const element of namedBindings.elements) { - addLeafNode(element); - } - } - } - break; - case 304 /* ShorthandPropertyAssignment */: - addNodeWithRecursiveChild(node, node.name); - break; - case 305 /* SpreadAssignment */: - const { expression } = node; - isIdentifier(expression) ? addLeafNode(node, expression) : addLeafNode(node); - break; - case 208 /* BindingElement */: - case 303 /* PropertyAssignment */: - case 260 /* VariableDeclaration */: { - const child = node; - if (isBindingPattern(child.name)) { - addChildrenRecursively(child.name); - } else { - addNodeWithRecursiveInitializer(child); - } - break; - } - case 262 /* FunctionDeclaration */: - const nameNode = node.name; - if (nameNode && isIdentifier(nameNode)) { - addTrackedEs5Class(nameNode.text); - } - addNodeWithRecursiveChild(node, node.body); - break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - addNodeWithRecursiveChild(node, node.body); - break; - case 266 /* EnumDeclaration */: - startNode(node); - for (const member of node.members) { - if (!isComputedProperty(member)) { - addLeafNode(member); - } - } - endNode(); - break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - startNode(node); - for (const member of node.members) { - addChildrenRecursively(member); - } - endNode(); - break; - case 267 /* ModuleDeclaration */: - addNodeWithRecursiveChild(node, getInteriorModule(node).body); - break; - case 277 /* ExportAssignment */: { - const expression2 = node.expression; - const child = isObjectLiteralExpression(expression2) || isCallExpression(expression2) ? expression2 : isArrowFunction(expression2) || isFunctionExpression(expression2) ? expression2.body : void 0; - if (child) { - startNode(node); - addChildrenRecursively(child); - endNode(); - } else { - addLeafNode(node); - } - break; - } - case 281 /* ExportSpecifier */: - case 271 /* ImportEqualsDeclaration */: - case 181 /* IndexSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 265 /* TypeAliasDeclaration */: - addLeafNode(node); - break; - case 213 /* CallExpression */: - case 226 /* BinaryExpression */: { - const special = getAssignmentDeclarationKind(node); - switch (special) { - case 1 /* ExportsProperty */: - case 2 /* ModuleExports */: - addNodeWithRecursiveChild(node, node.right); - return; - case 6 /* Prototype */: - case 3 /* PrototypeProperty */: { - const binaryExpression = node; - const assignmentTarget = binaryExpression.left; - const prototypeAccess = special === 3 /* PrototypeProperty */ ? assignmentTarget.expression : assignmentTarget; - let depth = 0; - let className; - if (isIdentifier(prototypeAccess.expression)) { - addTrackedEs5Class(prototypeAccess.expression.text); - className = prototypeAccess.expression; - } else { - [depth, className] = startNestedNodes(binaryExpression, prototypeAccess.expression); - } - if (special === 6 /* Prototype */) { - if (isObjectLiteralExpression(binaryExpression.right)) { - if (binaryExpression.right.properties.length > 0) { - startNode(binaryExpression, className); - forEachChild(binaryExpression.right, addChildrenRecursively); - endNode(); - } - } - } else if (isFunctionExpression(binaryExpression.right) || isArrowFunction(binaryExpression.right)) { - addNodeWithRecursiveChild( - node, - binaryExpression.right, - className - ); - } else { - startNode(binaryExpression, className); - addNodeWithRecursiveChild(node, binaryExpression.right, assignmentTarget.name); - endNode(); - } - endNestedNodes(depth); - return; - } - case 7 /* ObjectDefinePropertyValue */: - case 9 /* ObjectDefinePrototypeProperty */: { - const defineCall = node; - const className = special === 7 /* ObjectDefinePropertyValue */ ? defineCall.arguments[0] : defineCall.arguments[0].expression; - const memberName = defineCall.arguments[1]; - const [depth, classNameIdentifier] = startNestedNodes(node, className); - startNode(node, classNameIdentifier); - startNode(node, setTextRange(factory.createIdentifier(memberName.text), memberName)); - addChildrenRecursively(node.arguments[2]); - endNode(); - endNode(); - endNestedNodes(depth); - return; - } - case 5 /* Property */: { - const binaryExpression = node; - const assignmentTarget = binaryExpression.left; - const targetFunction = assignmentTarget.expression; - if (isIdentifier(targetFunction) && getElementOrPropertyAccessName(assignmentTarget) !== "prototype" && trackedEs5Classes && trackedEs5Classes.has(targetFunction.text)) { - if (isFunctionExpression(binaryExpression.right) || isArrowFunction(binaryExpression.right)) { - addNodeWithRecursiveChild(node, binaryExpression.right, targetFunction); - } else if (isBindableStaticAccessExpression(assignmentTarget)) { - startNode(binaryExpression, targetFunction); - addNodeWithRecursiveChild(binaryExpression.left, binaryExpression.right, getNameOrArgument(assignmentTarget)); - endNode(); - } - return; - } - break; - } - case 4 /* ThisProperty */: - case 0 /* None */: - case 8 /* ObjectDefinePropertyExports */: - break; - default: - Debug.assertNever(special); - } - } - default: - if (hasJSDocNodes(node)) { - forEach(node.jsDoc, (jsDoc) => { - forEach(jsDoc.tags, (tag) => { - if (isJSDocTypeAlias(tag)) { - addLeafNode(tag); - } - }); - }); - } - forEachChild(node, addChildrenRecursively); - } - } - function mergeChildren(children, node) { - const nameToItems = /* @__PURE__ */ new Map(); - filterMutate(children, (child, index) => { - const declName = child.name || getNameOfDeclaration(child.node); - const name = declName && nodeText(declName); - if (!name) { - return true; - } - const itemsWithSameName = nameToItems.get(name); - if (!itemsWithSameName) { - nameToItems.set(name, child); - return true; - } - if (itemsWithSameName instanceof Array) { - for (const itemWithSameName of itemsWithSameName) { - if (tryMerge(itemWithSameName, child, index, node)) { - return false; - } - } - itemsWithSameName.push(child); - return true; - } else { - const itemWithSameName = itemsWithSameName; - if (tryMerge(itemWithSameName, child, index, node)) { - return false; - } - nameToItems.set(name, [itemWithSameName, child]); - return true; - } - }); - } - function tryMergeEs5Class(a, b, bIndex, parent2) { - function isPossibleConstructor(node) { - return isFunctionExpression(node) || isFunctionDeclaration(node) || isVariableDeclaration(node); - } - const bAssignmentDeclarationKind = isBinaryExpression(b.node) || isCallExpression(b.node) ? getAssignmentDeclarationKind(b.node) : 0 /* None */; - const aAssignmentDeclarationKind = isBinaryExpression(a.node) || isCallExpression(a.node) ? getAssignmentDeclarationKind(a.node) : 0 /* None */; - if (isEs5ClassMember[bAssignmentDeclarationKind] && isEs5ClassMember[aAssignmentDeclarationKind] || isPossibleConstructor(a.node) && isEs5ClassMember[bAssignmentDeclarationKind] || isPossibleConstructor(b.node) && isEs5ClassMember[aAssignmentDeclarationKind] || isClassDeclaration(a.node) && isSynthesized(a.node) && isEs5ClassMember[bAssignmentDeclarationKind] || isClassDeclaration(b.node) && isEs5ClassMember[aAssignmentDeclarationKind] || isClassDeclaration(a.node) && isSynthesized(a.node) && isPossibleConstructor(b.node) || isClassDeclaration(b.node) && isPossibleConstructor(a.node) && isSynthesized(a.node)) { - let lastANode = a.additionalNodes && lastOrUndefined(a.additionalNodes) || a.node; - if (!isClassDeclaration(a.node) && !isClassDeclaration(b.node) || isPossibleConstructor(a.node) || isPossibleConstructor(b.node)) { - const ctorFunction = isPossibleConstructor(a.node) ? a.node : isPossibleConstructor(b.node) ? b.node : void 0; - if (ctorFunction !== void 0) { - const ctorNode = setTextRange( - factory.createConstructorDeclaration( - /*modifiers*/ - void 0, - [], - /*body*/ - void 0 - ), - ctorFunction - ); - const ctor = emptyNavigationBarNode(ctorNode); - ctor.indent = a.indent + 1; - ctor.children = a.node === ctorFunction ? a.children : b.children; - a.children = a.node === ctorFunction ? concatenate([ctor], b.children || [b]) : concatenate(a.children || [{ ...a }], [ctor]); - } else { - if (a.children || b.children) { - a.children = concatenate(a.children || [{ ...a }], b.children || [b]); - if (a.children) { - mergeChildren(a.children, a); - sortChildren(a.children); - } - } - } - lastANode = a.node = setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - a.name || factory.createIdentifier("__class__"), - /*typeParameters*/ - void 0, - /*heritageClauses*/ - void 0, - [] - ), a.node); - } else { - a.children = concatenate(a.children, b.children); - if (a.children) { - mergeChildren(a.children, a); - } - } - const bNode = b.node; - if (parent2.children[bIndex - 1].node.end === lastANode.end) { - setTextRange(lastANode, { pos: lastANode.pos, end: bNode.end }); - } else { - if (!a.additionalNodes) - a.additionalNodes = []; - a.additionalNodes.push(setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - a.name || factory.createIdentifier("__class__"), - /*typeParameters*/ - void 0, - /*heritageClauses*/ - void 0, - [] - ), b.node)); - } - return true; - } - return bAssignmentDeclarationKind === 0 /* None */ ? false : true; - } - function tryMerge(a, b, bIndex, parent2) { - if (tryMergeEs5Class(a, b, bIndex, parent2)) { - return true; - } - if (shouldReallyMerge(a.node, b.node, parent2)) { - merge(a, b); - return true; - } - return false; - } - function shouldReallyMerge(a, b, parent2) { - if (a.kind !== b.kind || a.parent !== b.parent && !(isOwnChild(a, parent2) && isOwnChild(b, parent2))) { - return false; - } - switch (a.kind) { - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return isStatic(a) === isStatic(b); - case 267 /* ModuleDeclaration */: - return areSameModule(a, b) && getFullyQualifiedModuleName(a) === getFullyQualifiedModuleName(b); - default: - return true; - } - } - function isSynthesized(node) { - return !!(node.flags & 16 /* Synthesized */); - } - function isOwnChild(n, parent2) { - const par = isModuleBlock(n.parent) ? n.parent.parent : n.parent; - return par === parent2.node || contains(parent2.additionalNodes, par); - } - function areSameModule(a, b) { - if (!a.body || !b.body) { - return a.body === b.body; - } - return a.body.kind === b.body.kind && (a.body.kind !== 267 /* ModuleDeclaration */ || areSameModule(a.body, b.body)); - } - function merge(target, source) { - target.additionalNodes = target.additionalNodes || []; - target.additionalNodes.push(source.node); - if (source.additionalNodes) { - target.additionalNodes.push(...source.additionalNodes); - } - target.children = concatenate(target.children, source.children); - if (target.children) { - mergeChildren(target.children, target); - sortChildren(target.children); - } - } - function sortChildren(children) { - children.sort(compareChildren); - } - function compareChildren(child1, child2) { - return compareStringsCaseSensitiveUI(tryGetName(child1.node), tryGetName(child2.node)) || compareValues(navigationBarNodeKind(child1), navigationBarNodeKind(child2)); - } - function tryGetName(node) { - if (node.kind === 267 /* ModuleDeclaration */) { - return getModuleName(node); - } - const declName = getNameOfDeclaration(node); - if (declName && isPropertyName(declName)) { - const propertyName = getPropertyNameForPropertyNameNode(declName); - return propertyName && unescapeLeadingUnderscores(propertyName); - } - switch (node.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 231 /* ClassExpression */: - return getFunctionOrClassName(node); - default: - return void 0; - } - } - function getItemName(node, name) { - if (node.kind === 267 /* ModuleDeclaration */) { - return cleanText(getModuleName(node)); - } - if (name) { - const text = isIdentifier(name) ? name.text : isElementAccessExpression(name) ? `[${nodeText(name.argumentExpression)}]` : nodeText(name); - if (text.length > 0) { - return cleanText(text); - } - } - switch (node.kind) { - case 312 /* SourceFile */: - const sourceFile = node; - return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath(sourceFile.fileName))))}"` : ""; - case 277 /* ExportAssignment */: - return isExportAssignment(node) && node.isExportEquals ? "export=" /* ExportEquals */ : "default" /* Default */; - case 219 /* ArrowFunction */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - if (getSyntacticModifierFlags(node) & 1024 /* Default */) { - return "default"; - } - return getFunctionOrClassName(node); - case 176 /* Constructor */: - return "constructor"; - case 180 /* ConstructSignature */: - return "new()"; - case 179 /* CallSignature */: - return "()"; - case 181 /* IndexSignature */: - return "[]"; - default: - return ""; - } - } - function primaryNavBarMenuItems(root) { - const primaryNavBarMenuItems2 = []; - function recur(item) { - if (shouldAppearInPrimaryNavBarMenu(item)) { - primaryNavBarMenuItems2.push(item); - if (item.children) { - for (const child of item.children) { - recur(child); - } - } - } - } - recur(root); - return primaryNavBarMenuItems2; - function shouldAppearInPrimaryNavBarMenu(item) { - if (item.children) { - return true; - } - switch (navigationBarNodeKind(item)) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 266 /* EnumDeclaration */: - case 264 /* InterfaceDeclaration */: - case 267 /* ModuleDeclaration */: - case 312 /* SourceFile */: - case 265 /* TypeAliasDeclaration */: - case 353 /* JSDocTypedefTag */: - case 345 /* JSDocCallbackTag */: - return true; - case 219 /* ArrowFunction */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - return isTopLevelFunctionDeclaration(item); - default: - return false; - } - function isTopLevelFunctionDeclaration(item2) { - if (!item2.node.body) { - return false; - } - switch (navigationBarNodeKind(item2.parent)) { - case 268 /* ModuleBlock */: - case 312 /* SourceFile */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - return true; - default: - return false; - } - } - } - } - function convertToTree(n) { - return { - text: getItemName(n.node, n.name), - kind: getNodeKind(n.node), - kindModifiers: getModifiers2(n.node), - spans: getSpans(n), - nameSpan: n.name && getNodeSpan(n.name), - childItems: map(n.children, convertToTree) - }; - } - function convertToPrimaryNavBarMenuItem(n) { - return { - text: getItemName(n.node, n.name), - kind: getNodeKind(n.node), - kindModifiers: getModifiers2(n.node), - spans: getSpans(n), - childItems: map(n.children, convertToSecondaryNavBarMenuItem) || emptyChildItemArray, - indent: n.indent, - bolded: false, - grayed: false - }; - function convertToSecondaryNavBarMenuItem(n2) { - return { - text: getItemName(n2.node, n2.name), - kind: getNodeKind(n2.node), - kindModifiers: getNodeModifiers(n2.node), - spans: getSpans(n2), - childItems: emptyChildItemArray, - indent: 0, - bolded: false, - grayed: false - }; - } - } - function getSpans(n) { - const spans = [getNodeSpan(n.node)]; - if (n.additionalNodes) { - for (const node of n.additionalNodes) { - spans.push(getNodeSpan(node)); - } - } - return spans; - } - function getModuleName(moduleDeclaration) { - if (isAmbientModule(moduleDeclaration)) { - return getTextOfNode(moduleDeclaration.name); - } - return getFullyQualifiedModuleName(moduleDeclaration); - } - function getFullyQualifiedModuleName(moduleDeclaration) { - const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; - while (moduleDeclaration.body && moduleDeclaration.body.kind === 267 /* ModuleDeclaration */) { - moduleDeclaration = moduleDeclaration.body; - result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); - } - return result.join("."); - } - function getInteriorModule(decl) { - return decl.body && isModuleDeclaration(decl.body) ? getInteriorModule(decl.body) : decl; - } - function isComputedProperty(member) { - return !member.name || member.name.kind === 167 /* ComputedPropertyName */; - } - function getNodeSpan(node) { - return node.kind === 312 /* SourceFile */ ? createTextSpanFromRange(node) : createTextSpanFromNode(node, curSourceFile); - } - function getModifiers2(node) { - if (node.parent && node.parent.kind === 260 /* VariableDeclaration */) { - node = node.parent; - } - return getNodeModifiers(node); - } - function getFunctionOrClassName(node) { - const { parent: parent2 } = node; - if (node.name && getFullWidth(node.name) > 0) { - return cleanText(declarationNameToString(node.name)); - } else if (isVariableDeclaration(parent2)) { - return cleanText(declarationNameToString(parent2.name)); - } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */) { - return nodeText(parent2.left).replace(whiteSpaceRegex, ""); - } else if (isPropertyAssignment(parent2)) { - return nodeText(parent2.name); - } else if (getSyntacticModifierFlags(node) & 1024 /* Default */) { - return "default"; - } else if (isClassLike(node)) { - return ""; - } else if (isCallExpression(parent2)) { - let name = getCalledExpressionName(parent2.expression); - if (name !== void 0) { - name = cleanText(name); - if (name.length > maxLength) { - return `${name} callback`; - } - const args = cleanText(mapDefined(parent2.arguments, (a) => isStringLiteralLike(a) ? a.getText(curSourceFile) : void 0).join(", ")); - return `${name}(${args}) callback`; - } - } - return ""; - } - function getCalledExpressionName(expr) { - if (isIdentifier(expr)) { - return expr.text; - } else if (isPropertyAccessExpression(expr)) { - const left = getCalledExpressionName(expr.expression); - const right = expr.name.text; - return left === void 0 ? right : `${left}.${right}`; - } else { - return void 0; - } - } - function isFunctionOrClassExpression(node) { - switch (node.kind) { - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 231 /* ClassExpression */: - return true; - default: - return false; - } - } - function cleanText(text) { - text = text.length > maxLength ? text.substring(0, maxLength) + "..." : text; - return text.replace(/\\?(\r?\n|\r|\u2028|\u2029)/g, ""); - } - var whiteSpaceRegex, maxLength, curCancellationToken, curSourceFile, parentsStack, parent, trackedEs5ClassesStack, trackedEs5Classes, emptyChildItemArray, isEs5ClassMember; - var init_navigationBar = __esm({ - "src/services/navigationBar.ts"() { - "use strict"; - init_ts4(); - whiteSpaceRegex = /\s+/g; - maxLength = 150; - parentsStack = []; - trackedEs5ClassesStack = []; - emptyChildItemArray = []; - isEs5ClassMember = { - [5 /* Property */]: true, - [3 /* PrototypeProperty */]: true, - [7 /* ObjectDefinePropertyValue */]: true, - [9 /* ObjectDefinePrototypeProperty */]: true, - [0 /* None */]: false, - [1 /* ExportsProperty */]: false, - [2 /* ModuleExports */]: false, - [8 /* ObjectDefinePropertyExports */]: false, - [6 /* Prototype */]: true, - [4 /* ThisProperty */]: false - }; - } - }); - - // src/services/_namespaces/ts.NavigationBar.ts - var ts_NavigationBar_exports = {}; - __export(ts_NavigationBar_exports, { - getNavigationBarItems: () => getNavigationBarItems, - getNavigationTree: () => getNavigationTree - }); - var init_ts_NavigationBar = __esm({ - "src/services/_namespaces/ts.NavigationBar.ts"() { - "use strict"; - init_navigationBar(); - } - }); - - // src/services/refactorProvider.ts - function registerRefactor(name, refactor) { - refactors.set(name, refactor); - } - function getApplicableRefactors(context, includeInteractiveActions) { - return arrayFrom(flatMapIterator(refactors.values(), (refactor) => { - var _a; - return context.cancellationToken && context.cancellationToken.isCancellationRequested() || !((_a = refactor.kinds) == null ? void 0 : _a.some((kind) => refactorKindBeginsWith(kind, context.kind))) ? void 0 : refactor.getAvailableActions(context, includeInteractiveActions); - })); - } - function getEditsForRefactor(context, refactorName14, actionName2, interactiveRefactorArguments) { - const refactor = refactors.get(refactorName14); - return refactor && refactor.getEditsForAction(context, actionName2, interactiveRefactorArguments); - } - var refactors; - var init_refactorProvider = __esm({ - "src/services/refactorProvider.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactors = /* @__PURE__ */ new Map(); - } - }); - - // src/services/refactors/convertExport.ts - function getInfo2(context, considerPartialSpans = true) { - const { file, program } = context; - const span = getRefactorContextSpan(context); - const token = getTokenAtPosition(file, span.start); - const exportNode = !!(token.parent && getSyntacticModifierFlags(token.parent) & 1 /* Export */) && considerPartialSpans ? token.parent : getParentNodeInSpan(token, file, span); - if (!exportNode || !isSourceFile(exportNode.parent) && !(isModuleBlock(exportNode.parent) && isAmbientModule(exportNode.parent.parent))) { - return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_export_statement) }; - } - const checker = program.getTypeChecker(); - const exportingModuleSymbol = getExportingModuleSymbol(exportNode.parent, checker); - const flags = getSyntacticModifierFlags(exportNode) || (isExportAssignment(exportNode) && !exportNode.isExportEquals ? 1025 /* ExportDefault */ : 0 /* None */); - const wasDefault = !!(flags & 1024 /* Default */); - if (!(flags & 1 /* Export */) || !wasDefault && exportingModuleSymbol.exports.has("default" /* Default */)) { - return { error: getLocaleSpecificMessage(Diagnostics.This_file_already_has_a_default_export) }; - } - const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; - switch (exportNode.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 267 /* ModuleDeclaration */: { - const node = exportNode; - if (!node.name) - return void 0; - return noSymbolError(node.name) || { exportNode: node, exportName: node.name, wasDefault, exportingModuleSymbol }; - } - case 243 /* VariableStatement */: { - const vs = exportNode; - if (!(vs.declarationList.flags & 2 /* Const */) || vs.declarationList.declarations.length !== 1) { - return void 0; - } - const decl = first(vs.declarationList.declarations); - if (!decl.initializer) - return void 0; - Debug.assert(!wasDefault, "Can't have a default flag here"); - return noSymbolError(decl.name) || { exportNode: vs, exportName: decl.name, wasDefault, exportingModuleSymbol }; - } - case 277 /* ExportAssignment */: { - const node = exportNode; - if (node.isExportEquals) - return void 0; - return noSymbolError(node.expression) || { exportNode: node, exportName: node.expression, wasDefault, exportingModuleSymbol }; - } - default: - return void 0; - } - } - function doChange(exportingSourceFile, program, info, changes, cancellationToken) { - changeExport(exportingSourceFile, info, changes, program.getTypeChecker()); - changeImports(program, info, changes, cancellationToken); - } - function changeExport(exportingSourceFile, { wasDefault, exportNode, exportName }, changes, checker) { - if (wasDefault) { - if (isExportAssignment(exportNode) && !exportNode.isExportEquals) { - const exp = exportNode.expression; - const spec = makeExportSpecifier(exp.text, exp.text); - changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([spec]) - )); - } else { - changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, 90 /* DefaultKeyword */), "Should find a default keyword in modifier list")); - } - } else { - const exportKeyword = Debug.checkDefined(findModifier(exportNode, 95 /* ExportKeyword */), "Should find an export keyword in modifier list"); - switch (exportNode.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(90 /* DefaultKeyword */)); - break; - case 243 /* VariableStatement */: - const decl = first(exportNode.declarationList.declarations); - if (!ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) { - changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, "Initializer was previously known to be present"))); - break; - } - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 267 /* ModuleDeclaration */: - changes.deleteModifier(exportingSourceFile, exportKeyword); - changes.insertNodeAfter(exportingSourceFile, exportNode, factory.createExportDefault(factory.createIdentifier(exportName.text))); - break; - default: - Debug.fail(`Unexpected exportNode kind ${exportNode.kind}`); - } - } - } - function changeImports(program, { wasDefault, exportName, exportingModuleSymbol }, changes, cancellationToken) { - const checker = program.getTypeChecker(); - const exportSymbol = Debug.checkDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); - ts_FindAllReferences_exports.Core.eachExportReference(program.getSourceFiles(), checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName.text, wasDefault, (ref) => { - if (exportName === ref) - return; - const importingSourceFile = ref.getSourceFile(); - if (wasDefault) { - changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName.text); - } else { - changeNamedToDefaultImport(importingSourceFile, ref, changes); - } - }); - } - function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName) { - const { parent: parent2 } = ref; - switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: - changes.replaceNode(importingSourceFile, ref, factory.createIdentifier(exportName)); - break; - case 276 /* ImportSpecifier */: - case 281 /* ExportSpecifier */: { - const spec = parent2; - changes.replaceNode(importingSourceFile, spec, makeImportSpecifier(exportName, spec.name.text)); - break; - } - case 273 /* ImportClause */: { - const clause = parent2; - Debug.assert(clause.name === ref, "Import clause name should match provided ref"); - const spec = makeImportSpecifier(exportName, ref.text); - const { namedBindings } = clause; - if (!namedBindings) { - changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec])); - } else if (namedBindings.kind === 274 /* NamespaceImport */) { - changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) }); - const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */; - const newImport = makeImport( - /*defaultImport*/ - void 0, - [makeImportSpecifier(exportName, ref.text)], - clause.parent.moduleSpecifier, - quotePreference - ); - changes.insertNodeAfter(importingSourceFile, clause.parent, newImport); - } else { - changes.delete(importingSourceFile, ref); - changes.insertNodeAtEndOfList(importingSourceFile, namedBindings.elements, spec); - } - break; - } - case 205 /* ImportType */: - const importTypeNode = parent2; - changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); - break; - default: - Debug.failBadSyntaxKind(parent2); - } - } - function changeNamedToDefaultImport(importingSourceFile, ref, changes) { - const parent2 = ref.parent; - switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: - changes.replaceNode(importingSourceFile, ref, factory.createIdentifier("default")); - break; - case 276 /* ImportSpecifier */: { - const defaultImport = factory.createIdentifier(parent2.name.text); - if (parent2.parent.elements.length === 1) { - changes.replaceNode(importingSourceFile, parent2.parent, defaultImport); - } else { - changes.delete(importingSourceFile, parent2); - changes.insertNodeBefore(importingSourceFile, parent2.parent, defaultImport); - } - break; - } - case 281 /* ExportSpecifier */: { - changes.replaceNode(importingSourceFile, parent2, makeExportSpecifier("default", parent2.name.text)); - break; - } - default: - Debug.assertNever(parent2, `Unexpected parent kind ${parent2.kind}`); - } - } - function makeImportSpecifier(propertyName, name) { - return factory.createImportSpecifier( - /*isTypeOnly*/ - false, - propertyName === name ? void 0 : factory.createIdentifier(propertyName), - factory.createIdentifier(name) - ); - } - function makeExportSpecifier(propertyName, name) { - return factory.createExportSpecifier( - /*isTypeOnly*/ - false, - propertyName === name ? void 0 : factory.createIdentifier(propertyName), - factory.createIdentifier(name) - ); - } - function getExportingModuleSymbol(parent2, checker) { - if (isSourceFile(parent2)) { - return parent2.symbol; - } - const symbol = parent2.parent.symbol; - if (symbol.valueDeclaration && isExternalModuleAugmentation(symbol.valueDeclaration)) { - return checker.getMergedSymbol(symbol); - } - return symbol; - } - var refactorName, defaultToNamedAction, namedToDefaultAction; - var init_convertExport = __esm({ - "src/services/refactors/convertExport.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName = "Convert export"; - defaultToNamedAction = { - name: "Convert default export to named export", - description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), - kind: "refactor.rewrite.export.named" - }; - namedToDefaultAction = { - name: "Convert named export to default export", - description: getLocaleSpecificMessage(Diagnostics.Convert_named_export_to_default_export), - kind: "refactor.rewrite.export.default" - }; - registerRefactor(refactorName, { - kinds: [ - defaultToNamedAction.kind, - namedToDefaultAction.kind - ], - getAvailableActions: function getRefactorActionsToConvertBetweenNamedAndDefaultExports(context) { - const info = getInfo2(context, context.triggerReason === "invoked"); - if (!info) - return emptyArray; - if (!isRefactorErrorInfo(info)) { - const action = info.wasDefault ? defaultToNamedAction : namedToDefaultAction; - return [{ name: refactorName, description: action.description, actions: [action] }]; - } - if (context.preferences.provideRefactorNotApplicableReason) { - return [ - { name: refactorName, description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), actions: [ - { ...defaultToNamedAction, notApplicableReason: info.error }, - { ...namedToDefaultAction, notApplicableReason: info.error } - ] } - ]; - } - return emptyArray; - }, - getEditsForAction: function getRefactorEditsToConvertBetweenNamedAndDefaultExports(context, actionName2) { - Debug.assert(actionName2 === defaultToNamedAction.name || actionName2 === namedToDefaultAction.name, "Unexpected action name"); - const info = getInfo2(context); - Debug.assert(info && !isRefactorErrorInfo(info), "Expected applicable refactor info"); - const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange(context.file, context.program, info, t, context.cancellationToken)); - return { edits, renameFilename: void 0, renameLocation: void 0 }; - } - }); - } - }); - - // src/services/refactors/convertImport.ts - function getImportConversionInfo(context, considerPartialSpans = true) { - const { file } = context; - const span = getRefactorContextSpan(context); - const token = getTokenAtPosition(file, span.start); - const importDecl = considerPartialSpans ? findAncestor(token, isImportDeclaration) : getParentNodeInSpan(token, file, span); - if (!importDecl || !isImportDeclaration(importDecl)) - return { error: "Selection is not an import declaration." }; - const end = span.start + span.length; - const nextToken = findNextToken(importDecl, importDecl.parent, file); - if (nextToken && end > nextToken.getStart()) - return void 0; - const { importClause } = importDecl; - if (!importClause) { - return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_import_clause) }; - } - if (!importClause.namedBindings) { - return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_namespace_import_or_named_imports) }; - } - if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { - return { convertTo: 0 /* Named */, import: importClause.namedBindings }; - } - const shouldUseDefault = getShouldUseDefault(context.program, importClause); - return shouldUseDefault ? { convertTo: 1 /* Default */, import: importClause.namedBindings } : { convertTo: 2 /* Namespace */, import: importClause.namedBindings }; - } - function getShouldUseDefault(program, importClause) { - return getAllowSyntheticDefaultImports(program.getCompilerOptions()) && isExportEqualsModule(importClause.parent.moduleSpecifier, program.getTypeChecker()); - } - function doChange2(sourceFile, program, changes, info) { - const checker = program.getTypeChecker(); - if (info.convertTo === 0 /* Named */) { - doChangeNamespaceToNamed(sourceFile, checker, changes, info.import, getAllowSyntheticDefaultImports(program.getCompilerOptions())); - } else { - doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, info.import, info.convertTo === 1 /* Default */); - } - } - function doChangeNamespaceToNamed(sourceFile, checker, changes, toConvert, allowSyntheticDefaultImports) { - let usedAsNamespaceOrDefault = false; - const nodesToReplace = []; - const conflictingNames = /* @__PURE__ */ new Map(); - ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(toConvert.name, checker, sourceFile, (id) => { - if (!isPropertyAccessOrQualifiedName(id.parent)) { - usedAsNamespaceOrDefault = true; - } else { - const exportName = getRightOfPropertyAccessOrQualifiedName(id.parent).text; - if (checker.resolveName( - exportName, - id, - 67108863 /* All */, - /*excludeGlobals*/ - true - )) { - conflictingNames.set(exportName, true); - } - Debug.assert(getLeftOfPropertyAccessOrQualifiedName(id.parent) === id, "Parent expression should match id"); - nodesToReplace.push(id.parent); - } - }); - const exportNameToImportName = /* @__PURE__ */ new Map(); - for (const propertyAccessOrQualifiedName of nodesToReplace) { - const exportName = getRightOfPropertyAccessOrQualifiedName(propertyAccessOrQualifiedName).text; - let importName = exportNameToImportName.get(exportName); - if (importName === void 0) { - exportNameToImportName.set(exportName, importName = conflictingNames.has(exportName) ? getUniqueName(exportName, sourceFile) : exportName); - } - changes.replaceNode(sourceFile, propertyAccessOrQualifiedName, factory.createIdentifier(importName)); - } - const importSpecifiers = []; - exportNameToImportName.forEach((name, propertyName) => { - importSpecifiers.push(factory.createImportSpecifier( - /*isTypeOnly*/ - false, - name === propertyName ? void 0 : factory.createIdentifier(propertyName), - factory.createIdentifier(name) - )); - }); - const importDecl = toConvert.parent.parent; - if (usedAsNamespaceOrDefault && !allowSyntheticDefaultImports) { - changes.insertNodeAfter(sourceFile, importDecl, updateImport( - importDecl, - /*defaultImportName*/ - void 0, - importSpecifiers - )); - } else { - changes.replaceNode(sourceFile, importDecl, updateImport(importDecl, usedAsNamespaceOrDefault ? factory.createIdentifier(toConvert.name.text) : void 0, importSpecifiers)); - } - } - function getRightOfPropertyAccessOrQualifiedName(propertyAccessOrQualifiedName) { - return isPropertyAccessExpression(propertyAccessOrQualifiedName) ? propertyAccessOrQualifiedName.name : propertyAccessOrQualifiedName.right; - } - function getLeftOfPropertyAccessOrQualifiedName(propertyAccessOrQualifiedName) { - return isPropertyAccessExpression(propertyAccessOrQualifiedName) ? propertyAccessOrQualifiedName.expression : propertyAccessOrQualifiedName.left; - } - function doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, toConvert, shouldUseDefault = getShouldUseDefault(program, toConvert.parent)) { - const checker = program.getTypeChecker(); - const importDecl = toConvert.parent.parent; - const { moduleSpecifier } = importDecl; - const toConvertSymbols = /* @__PURE__ */ new Set(); - toConvert.elements.forEach((namedImport) => { - const symbol = checker.getSymbolAtLocation(namedImport.name); - if (symbol) { - toConvertSymbols.add(symbol); - } - }); - const preferredName = moduleSpecifier && isStringLiteral(moduleSpecifier) ? ts_codefix_exports.moduleSpecifierToValidIdentifier(moduleSpecifier.text, 99 /* ESNext */) : "module"; - function hasNamespaceNameConflict(namedImport) { - return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(namedImport.name, checker, sourceFile, (id) => { - const symbol = checker.resolveName( - preferredName, - id, - 67108863 /* All */, - /*excludeGlobals*/ - true - ); - if (symbol) { - if (toConvertSymbols.has(symbol)) { - return isExportSpecifier(id.parent); - } - return true; - } - return false; - }); - } - const namespaceNameConflicts = toConvert.elements.some(hasNamespaceNameConflict); - const namespaceImportName = namespaceNameConflicts ? getUniqueName(preferredName, sourceFile) : preferredName; - const neededNamedImports = /* @__PURE__ */ new Set(); - for (const element of toConvert.elements) { - const propertyName = (element.propertyName || element.name).text; - ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(element.name, checker, sourceFile, (id) => { - const access = factory.createPropertyAccessExpression(factory.createIdentifier(namespaceImportName), propertyName); - if (isShorthandPropertyAssignment(id.parent)) { - changes.replaceNode(sourceFile, id.parent, factory.createPropertyAssignment(id.text, access)); - } else if (isExportSpecifier(id.parent)) { - neededNamedImports.add(element); - } else { - changes.replaceNode(sourceFile, id, access); - } - }); - } - changes.replaceNode(sourceFile, toConvert, shouldUseDefault ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName))); - if (neededNamedImports.size) { - const newNamedImports = arrayFrom(neededNamedImports.values(), (element) => factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.createIdentifier(element.propertyName.text), factory.createIdentifier(element.name.text))); - changes.insertNodeAfter(sourceFile, toConvert.parent.parent, updateImport( - importDecl, - /*defaultImportName*/ - void 0, - newNamedImports - )); - } - } - function isExportEqualsModule(moduleSpecifier, checker) { - const externalModule = checker.resolveExternalModuleName(moduleSpecifier); - if (!externalModule) - return false; - const exportEquals = checker.resolveExternalModuleSymbol(externalModule); - return externalModule !== exportEquals; - } - function updateImport(old, defaultImportName, elements) { - return factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - defaultImportName, - elements && elements.length ? factory.createNamedImports(elements) : void 0 - ), - old.moduleSpecifier, - /*assertClause*/ - void 0 - ); - } - var refactorName2, actions; - var init_convertImport = __esm({ - "src/services/refactors/convertImport.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName2 = "Convert import"; - actions = { - [0 /* Named */]: { - name: "Convert namespace import to named imports", - description: getLocaleSpecificMessage(Diagnostics.Convert_namespace_import_to_named_imports), - kind: "refactor.rewrite.import.named" - }, - [2 /* Namespace */]: { - name: "Convert named imports to namespace import", - description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_namespace_import), - kind: "refactor.rewrite.import.namespace" - }, - [1 /* Default */]: { - name: "Convert named imports to default import", - description: getLocaleSpecificMessage(Diagnostics.Convert_named_imports_to_default_import), - kind: "refactor.rewrite.import.default" - } - }; - registerRefactor(refactorName2, { - kinds: getOwnValues(actions).map((a) => a.kind), - getAvailableActions: function getRefactorActionsToConvertBetweenNamedAndNamespacedImports(context) { - const info = getImportConversionInfo(context, context.triggerReason === "invoked"); - if (!info) - return emptyArray; - if (!isRefactorErrorInfo(info)) { - const action = actions[info.convertTo]; - return [{ name: refactorName2, description: action.description, actions: [action] }]; - } - if (context.preferences.provideRefactorNotApplicableReason) { - return getOwnValues(actions).map((action) => ({ - name: refactorName2, - description: action.description, - actions: [{ ...action, notApplicableReason: info.error }] - })); - } - return emptyArray; - }, - getEditsForAction: function getRefactorEditsToConvertBetweenNamedAndNamespacedImports(context, actionName2) { - Debug.assert(some(getOwnValues(actions), (action) => action.name === actionName2), "Unexpected action name"); - const info = getImportConversionInfo(context); - Debug.assert(info && !isRefactorErrorInfo(info), "Expected applicable refactor info"); - const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange2(context.file, context.program, t, info)); - return { edits, renameFilename: void 0, renameLocation: void 0 }; - } - }); - } - }); - - // src/services/refactors/extractType.ts - function getRangeToExtract(context, considerEmptySpans = true) { - const { file, startPosition } = context; - const isJS = isSourceFileJS(file); - const current = getTokenAtPosition(file, startPosition); - const range = createTextRangeFromSpan(getRefactorContextSpan(context)); - const cursorRequest = range.pos === range.end && considerEmptySpans; - const selection = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (cursorRequest || nodeOverlapsWithStartEnd(current, file, range.pos, range.end))); - if (!selection || !isTypeNode(selection)) - return { error: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_type_node) }; - const checker = context.program.getTypeChecker(); - const enclosingNode = getEnclosingNode(selection, isJS); - if (enclosingNode === void 0) - return { error: getLocaleSpecificMessage(Diagnostics.No_type_could_be_extracted_from_this_type_node) }; - const typeParameters = collectTypeParameters(checker, selection, enclosingNode, file); - if (!typeParameters) - return { error: getLocaleSpecificMessage(Diagnostics.No_type_could_be_extracted_from_this_type_node) }; - const typeElements = flattenTypeLiteralNodeReference(checker, selection); - return { isJS, selection, enclosingNode, typeParameters, typeElements }; - } - function flattenTypeLiteralNodeReference(checker, node) { - if (!node) - return void 0; - if (isIntersectionTypeNode(node)) { - const result = []; - const seen = /* @__PURE__ */ new Map(); - for (const type of node.types) { - const flattenedTypeMembers = flattenTypeLiteralNodeReference(checker, type); - if (!flattenedTypeMembers || !flattenedTypeMembers.every((type2) => type2.name && addToSeen(seen, getNameFromPropertyName(type2.name)))) { - return void 0; - } - addRange(result, flattenedTypeMembers); - } - return result; - } else if (isParenthesizedTypeNode(node)) { - return flattenTypeLiteralNodeReference(checker, node.type); - } else if (isTypeLiteralNode(node)) { - return node.members; - } - return void 0; - } - function rangeContainsSkipTrivia(r1, node, file) { - return rangeContainsStartEnd(r1, skipTrivia(file.text, node.pos), node.end); - } - function collectTypeParameters(checker, selection, enclosingNode, file) { - const result = []; - return visitor(selection) ? void 0 : result; - function visitor(node) { - if (isTypeReferenceNode(node)) { - if (isIdentifier(node.typeName)) { - const typeName = node.typeName; - const symbol = checker.resolveName( - typeName.text, - typeName, - 262144 /* TypeParameter */, - /*excludeGlobals*/ - true - ); - for (const decl of (symbol == null ? void 0 : symbol.declarations) || emptyArray) { - if (isTypeParameterDeclaration(decl) && decl.getSourceFile() === file) { - if (decl.name.escapedText === typeName.escapedText && rangeContainsSkipTrivia(decl, selection, file)) { - return true; - } - if (rangeContainsSkipTrivia(enclosingNode, decl, file) && !rangeContainsSkipTrivia(selection, decl, file)) { - pushIfUnique(result, decl); - break; - } - } - } - } - } else if (isInferTypeNode(node)) { - const conditionalTypeNode = findAncestor(node, (n) => isConditionalTypeNode(n) && rangeContainsSkipTrivia(n.extendsType, node, file)); - if (!conditionalTypeNode || !rangeContainsSkipTrivia(selection, conditionalTypeNode, file)) { - return true; - } - } else if (isTypePredicateNode(node) || isThisTypeNode(node)) { - const functionLikeNode = findAncestor(node.parent, isFunctionLike); - if (functionLikeNode && functionLikeNode.type && rangeContainsSkipTrivia(functionLikeNode.type, node, file) && !rangeContainsSkipTrivia(selection, functionLikeNode, file)) { - return true; - } - } else if (isTypeQueryNode(node)) { - if (isIdentifier(node.exprName)) { - const symbol = checker.resolveName( - node.exprName.text, - node.exprName, - 111551 /* Value */, - /*excludeGlobals*/ - false - ); - if ((symbol == null ? void 0 : symbol.valueDeclaration) && rangeContainsSkipTrivia(enclosingNode, symbol.valueDeclaration, file) && !rangeContainsSkipTrivia(selection, symbol.valueDeclaration, file)) { - return true; - } - } else { - if (isThisIdentifier(node.exprName.left) && !rangeContainsSkipTrivia(selection, node.parent, file)) { - return true; - } - } - } - if (file && isTupleTypeNode(node) && getLineAndCharacterOfPosition(file, node.pos).line === getLineAndCharacterOfPosition(file, node.end).line) { - setEmitFlags(node, 1 /* SingleLine */); - } - return forEachChild(node, visitor); - } - } - function doTypeAliasChange(changes, file, name, info) { - const { enclosingNode, selection, typeParameters } = info; - const newTypeNode = factory.createTypeAliasDeclaration( - /*modifiers*/ - void 0, - name, - typeParameters.map((id) => factory.updateTypeParameterDeclaration( - id, - id.modifiers, - id.name, - id.constraint, - /*defaultType*/ - void 0 - )), - selection - ); - changes.insertNodeBefore( - file, - enclosingNode, - ignoreSourceNewlines(newTypeNode), - /*blankLineBetween*/ - true - ); - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( - id.name, - /*typeArguments*/ - void 0 - ))), { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.ExcludeWhitespace }); - } - function doInterfaceChange(changes, file, name, info) { - var _a; - const { enclosingNode, selection, typeParameters, typeElements } = info; - const newTypeNode = factory.createInterfaceDeclaration( - /*modifiers*/ - void 0, - name, - typeParameters, - /*heritageClauses*/ - void 0, - typeElements - ); - setTextRange(newTypeNode, (_a = typeElements[0]) == null ? void 0 : _a.parent); - changes.insertNodeBefore( - file, - enclosingNode, - ignoreSourceNewlines(newTypeNode), - /*blankLineBetween*/ - true - ); - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( - id.name, - /*typeArguments*/ - void 0 - ))), { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.ExcludeWhitespace }); - } - function doTypedefChange(changes, context, file, name, info) { - var _a; - const { enclosingNode, selection, typeParameters } = info; - setEmitFlags(selection, 3072 /* NoComments */ | 4096 /* NoNestedComments */); - const node = factory.createJSDocTypedefTag( - factory.createIdentifier("typedef"), - factory.createJSDocTypeExpression(selection), - factory.createIdentifier(name) - ); - const templates = []; - forEach(typeParameters, (typeParameter) => { - const constraint = getEffectiveConstraintOfTypeParameter(typeParameter); - const parameter = factory.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - typeParameter.name - ); - const template = factory.createJSDocTemplateTag( - factory.createIdentifier("template"), - constraint && cast(constraint, isJSDocTypeExpression), - [parameter] - ); - templates.push(template); - }); - const jsDoc = factory.createJSDocComment( - /*comment*/ - void 0, - factory.createNodeArray(concatenate(templates, [node])) - ); - if (isJSDoc(enclosingNode)) { - const pos = enclosingNode.getStart(file); - const newLineCharacter = getNewLineOrDefaultFromHost(context.host, (_a = context.formatContext) == null ? void 0 : _a.options); - changes.insertNodeAt(file, enclosingNode.getStart(file), jsDoc, { - suffix: newLineCharacter + newLineCharacter + file.text.slice(getPrecedingNonSpaceCharacterPosition(file.text, pos - 1), pos) - }); - } else { - changes.insertNodeBefore( - file, - enclosingNode, - jsDoc, - /*blankLineBetween*/ - true - ); - } - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( - id.name, - /*typeArguments*/ - void 0 - )))); - } - function getEnclosingNode(node, isJS) { - return findAncestor(node, isStatement) || (isJS ? findAncestor(node, isJSDoc) : void 0); - } - var refactorName3, extractToTypeAliasAction, extractToInterfaceAction, extractToTypeDefAction; - var init_extractType = __esm({ - "src/services/refactors/extractType.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName3 = "Extract type"; - extractToTypeAliasAction = { - name: "Extract to type alias", - description: getLocaleSpecificMessage(Diagnostics.Extract_to_type_alias), - kind: "refactor.extract.type" - }; - extractToInterfaceAction = { - name: "Extract to interface", - description: getLocaleSpecificMessage(Diagnostics.Extract_to_interface), - kind: "refactor.extract.interface" - }; - extractToTypeDefAction = { - name: "Extract to typedef", - description: getLocaleSpecificMessage(Diagnostics.Extract_to_typedef), - kind: "refactor.extract.typedef" - }; - registerRefactor(refactorName3, { - kinds: [ - extractToTypeAliasAction.kind, - extractToInterfaceAction.kind, - extractToTypeDefAction.kind - ], - getAvailableActions: function getRefactorActionsToExtractType(context) { - const info = getRangeToExtract(context, context.triggerReason === "invoked"); - if (!info) - return emptyArray; - if (!isRefactorErrorInfo(info)) { - return [{ - name: refactorName3, - description: getLocaleSpecificMessage(Diagnostics.Extract_type), - actions: info.isJS ? [extractToTypeDefAction] : append([extractToTypeAliasAction], info.typeElements && extractToInterfaceAction) - }]; - } - if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorName3, - description: getLocaleSpecificMessage(Diagnostics.Extract_type), - actions: [ - { ...extractToTypeDefAction, notApplicableReason: info.error }, - { ...extractToTypeAliasAction, notApplicableReason: info.error }, - { ...extractToInterfaceAction, notApplicableReason: info.error } - ] - }]; - } - return emptyArray; - }, - getEditsForAction: function getRefactorEditsToExtractType(context, actionName2) { - const { file } = context; - const info = getRangeToExtract(context); - Debug.assert(info && !isRefactorErrorInfo(info), "Expected to find a range to extract"); - const name = getUniqueName("NewType", file); - const edits = ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - switch (actionName2) { - case extractToTypeAliasAction.name: - Debug.assert(!info.isJS, "Invalid actionName/JS combo"); - return doTypeAliasChange(changes, file, name, info); - case extractToTypeDefAction.name: - Debug.assert(info.isJS, "Invalid actionName/JS combo"); - return doTypedefChange(changes, context, file, name, info); - case extractToInterfaceAction.name: - Debug.assert(!info.isJS && !!info.typeElements, "Invalid actionName/JS combo"); - return doInterfaceChange(changes, file, name, info); - default: - Debug.fail("Unexpected action name"); - } - }); - const renameFilename = file.fileName; - const renameLocation = getRenameLocation( - edits, - renameFilename, - name, - /*preferLastLocation*/ - false - ); - return { edits, renameFilename, renameLocation }; - } - }); - } - }); - - // src/services/refactors/helpers.ts - function isRefactorErrorInfo(info) { - return info.error !== void 0; - } - function refactorKindBeginsWith(known, requested) { - if (!requested) - return true; - return known.substr(0, requested.length) === requested; - } - var init_helpers = __esm({ - "src/services/refactors/helpers.ts"() { - "use strict"; - } - }); - - // src/services/refactors/inlineVariable.ts - function getInliningInfo(file, startPosition, tryWithReferenceToken, program) { - var _a, _b; - const checker = program.getTypeChecker(); - const token = getTouchingPropertyName(file, startPosition); - const parent2 = token.parent; - if (!isIdentifier(token)) { - return void 0; - } - if (isInitializedVariable(parent2) && isVariableDeclarationInVariableStatement(parent2) && isIdentifier(parent2.name)) { - if (((_a = checker.getMergedSymbol(parent2.symbol).declarations) == null ? void 0 : _a.length) !== 1) { - return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; - } - if (isDeclarationExported(parent2)) { - return void 0; - } - const references = getReferenceNodes(parent2, checker, file); - return references && { references, declaration: parent2, replacement: parent2.initializer }; - } - if (tryWithReferenceToken) { - let definition = checker.resolveName( - token.text, - token, - 111551 /* Value */, - /*excludeGlobals*/ - false - ); - definition = definition && checker.getMergedSymbol(definition); - if (((_b = definition == null ? void 0 : definition.declarations) == null ? void 0 : _b.length) !== 1) { - return { error: getLocaleSpecificMessage(Diagnostics.Variables_with_multiple_declarations_cannot_be_inlined) }; - } - const declaration = definition.declarations[0]; - if (!isInitializedVariable(declaration) || !isVariableDeclarationInVariableStatement(declaration) || !isIdentifier(declaration.name)) { - return void 0; - } - if (isDeclarationExported(declaration)) { - return void 0; - } - const references = getReferenceNodes(declaration, checker, file); - return references && { references, declaration, replacement: declaration.initializer }; - } - return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_variable_to_inline) }; - } - function isDeclarationExported(declaration) { - const variableStatement = cast(declaration.parent.parent, isVariableStatement); - return some(variableStatement.modifiers, isExportModifier); - } - function getReferenceNodes(declaration, checker, file) { - const references = []; - const cannotInline = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(declaration.name, checker, file, (ref) => { - if (ts_FindAllReferences_exports.isWriteAccessForReference(ref)) { - return true; - } - if (isExportSpecifier(ref.parent) || isExportAssignment(ref.parent)) { - return true; - } - if (isTypeQueryNode(ref.parent)) { - return true; - } - if (textRangeContainsPositionInclusive(declaration, ref.pos)) { - return true; - } - references.push(ref); - }); - return references.length === 0 || cannotInline ? void 0 : references; - } - function getReplacementExpression(reference, replacement) { - replacement = getSynthesizedDeepClone(replacement); - const { parent: parent2 } = reference; - if (isExpression(parent2) && (getExpressionPrecedence(replacement) < getExpressionPrecedence(parent2) || needsParentheses(parent2))) { - return factory.createParenthesizedExpression(replacement); - } - if (isFunctionLike(replacement) && (isCallLikeExpression(parent2) || isPropertyAccessExpression(parent2))) { - return factory.createParenthesizedExpression(replacement); - } - if (isPropertyAccessExpression(parent2) && (isNumericLiteral(replacement) || isObjectLiteralExpression(replacement))) { - return factory.createParenthesizedExpression(replacement); - } - return replacement; - } - var refactorName4, refactorDescription, inlineVariableAction; - var init_inlineVariable = __esm({ - "src/services/refactors/inlineVariable.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName4 = "Inline variable"; - refactorDescription = getLocaleSpecificMessage(Diagnostics.Inline_variable); - inlineVariableAction = { - name: refactorName4, - description: refactorDescription, - kind: "refactor.inline.variable" - }; - registerRefactor(refactorName4, { - kinds: [inlineVariableAction.kind], - getAvailableActions(context) { - const { - file, - program, - preferences, - startPosition, - triggerReason - } = context; - const info = getInliningInfo(file, startPosition, triggerReason === "invoked", program); - if (!info) { - return emptyArray; - } - if (!ts_refactor_exports.isRefactorErrorInfo(info)) { - return [{ - name: refactorName4, - description: refactorDescription, - actions: [inlineVariableAction] - }]; - } - if (preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorName4, - description: refactorDescription, - actions: [{ - ...inlineVariableAction, - notApplicableReason: info.error - }] - }]; - } - return emptyArray; - }, - getEditsForAction(context, actionName2) { - Debug.assert(actionName2 === refactorName4, "Unexpected refactor invoked"); - const { file, program, startPosition } = context; - const info = getInliningInfo( - file, - startPosition, - /*tryWithReferenceToken*/ - true, - program - ); - if (!info || ts_refactor_exports.isRefactorErrorInfo(info)) { - return void 0; - } - const { references, declaration, replacement } = info; - const edits = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { - for (const node of references) { - tracker.replaceNode(file, node, getReplacementExpression(node, replacement)); - } - tracker.delete(file, declaration); - }); - return { edits }; - } - }); - } - }); - - // src/services/refactors/moveToNewFile.ts - function doChange3(oldFile, program, toMove, changes, host, preferences, context) { - const checker = program.getTypeChecker(); - const usage = getUsageInfo(oldFile, toMove.all, checker); - const newFilename = createNewFileName(oldFile, program, context, host); - changes.createNewFile(oldFile, newFilename, getNewStatementsAndRemoveFromOldFile(oldFile, usage, changes, toMove, program, host, newFilename, preferences)); - addNewFileToTsconfig(program, changes, oldFile.fileName, newFilename, hostGetCanonicalFileName(host)); - } - function getNewStatementsAndRemoveFromOldFile(oldFile, usage, changes, toMove, program, host, newFilename, preferences) { - const checker = program.getTypeChecker(); - const prologueDirectives = takeWhile(oldFile.statements, isPrologueDirective); - if (oldFile.externalModuleIndicator === void 0 && oldFile.commonJsModuleIndicator === void 0 && usage.oldImportsNeededByTargetFile.size === 0) { - deleteMovedStatements(oldFile, toMove.ranges, changes); - return [...prologueDirectives, ...toMove.all]; - } - const useEsModuleSyntax = !fileShouldUseJavaScriptRequire(newFilename, program, host, !!oldFile.commonJsModuleIndicator); - const quotePreference = getQuotePreference(oldFile, preferences); - const importsFromNewFile = createOldFileImportsFromTargetFile(oldFile, usage.oldFileImportsFromTargetFile, newFilename, program, host, useEsModuleSyntax, quotePreference); - if (importsFromNewFile) { - insertImports( - changes, - oldFile, - importsFromNewFile, - /*blankLineBetween*/ - true, - preferences - ); - } - deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); - deleteMovedStatements(oldFile, toMove.ranges, changes); - updateImportsInOtherFiles(changes, program, host, oldFile, usage.movedSymbols, newFilename, quotePreference); - const imports = getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, changes, checker, program, host, useEsModuleSyntax, quotePreference); - const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax); - if (imports.length && body.length) { - return [ - ...prologueDirectives, - ...imports, - 4 /* NewLineTrivia */, - ...body - ]; - } - return [ - ...prologueDirectives, - ...imports, - ...body - ]; - } - function getNewFileImportsAndAddExportInOldFile(oldFile, importsToCopy, newFileImportsFromOldFile, changes, checker, program, host, useEsModuleSyntax, quotePreference) { - const copiedOldImports = []; - for (const oldStatement of oldFile.statements) { - forEachImportInStatement(oldStatement, (i) => { - append(copiedOldImports, filterImport(i, moduleSpecifierFromImport(i), (name) => importsToCopy.has(checker.getSymbolAtLocation(name)))); - }); - } - let oldFileDefault; - const oldFileNamedImports = []; - const markSeenTop = nodeSeenTracker(); - newFileImportsFromOldFile.forEach((symbol) => { - if (!symbol.declarations) { - return; - } - for (const decl of symbol.declarations) { - if (!isTopLevelDeclaration(decl)) - continue; - const name = nameOfTopLevelDeclaration(decl); - if (!name) - continue; - const top = getTopLevelDeclarationStatement(decl); - if (markSeenTop(top)) { - addExportToChanges(oldFile, top, name, changes, useEsModuleSyntax); - } - if (hasSyntacticModifier(decl, 1024 /* Default */)) { - oldFileDefault = name; - } else { - oldFileNamedImports.push(name.text); - } - } - }); - append(copiedOldImports, makeImportOrRequire(oldFile, oldFileDefault, oldFileNamedImports, getBaseFileName(oldFile.fileName), program, host, useEsModuleSyntax, quotePreference)); - return copiedOldImports; - } - var refactorName5, description, moveToNewFileAction; - var init_moveToNewFile = __esm({ - "src/services/refactors/moveToNewFile.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName5 = "Move to a new file"; - description = getLocaleSpecificMessage(Diagnostics.Move_to_a_new_file); - moveToNewFileAction = { - name: refactorName5, - description, - kind: "refactor.move.newFile" - }; - registerRefactor(refactorName5, { - kinds: [moveToNewFileAction.kind], - getAvailableActions: function getRefactorActionsToMoveToNewFile(context) { - const statements = getStatementsToMove(context); - if (context.preferences.allowTextChangesInNewFiles && statements) { - return [{ name: refactorName5, description, actions: [moveToNewFileAction] }]; - } - if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorName5, - description, - actions: [{ ...moveToNewFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] - }]; - } - return emptyArray; - }, - getEditsForAction: function getRefactorEditsToMoveToNewFile(context, actionName2) { - Debug.assert(actionName2 === refactorName5, "Wrong refactor invoked"); - const statements = Debug.checkDefined(getStatementsToMove(context)); - const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange3(context.file, context.program, statements, t, context.host, context.preferences, context)); - return { edits, renameFilename: void 0, renameLocation: void 0 }; - } - }); - } - }); - - // src/services/refactors/moveToFile.ts - function error(notApplicableReason) { - return { edits: [], renameFilename: void 0, renameLocation: void 0, notApplicableReason }; - } - function doChange4(context, oldFile, targetFile, program, toMove, changes, host, preferences) { - const checker = program.getTypeChecker(); - const usage = getUsageInfo(oldFile, toMove.all, checker); - if (!host.fileExists(targetFile)) { - changes.createNewFile(oldFile, targetFile, getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, usage, changes, toMove, program, host, preferences)); - addNewFileToTsconfig(program, changes, oldFile.fileName, targetFile, hostGetCanonicalFileName(host)); - } else { - const targetSourceFile = Debug.checkDefined(program.getSourceFile(targetFile)); - const importAdder = ts_codefix_exports.createImportAdder(targetSourceFile, context.program, context.preferences, context.host); - getNewStatementsAndRemoveFromOldFile2(oldFile, targetSourceFile, usage, changes, toMove, program, host, preferences, importAdder); - } - } - function getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, usage, changes, toMove, program, host, preferences, importAdder) { - const checker = program.getTypeChecker(); - const prologueDirectives = takeWhile(oldFile.statements, isPrologueDirective); - if (oldFile.externalModuleIndicator === void 0 && oldFile.commonJsModuleIndicator === void 0 && usage.oldImportsNeededByTargetFile.size === 0 && usage.targetFileImportsFromOldFile.size === 0 && typeof targetFile === "string") { - deleteMovedStatements(oldFile, toMove.ranges, changes); - return [...prologueDirectives, ...toMove.all]; - } - const targetFileName = typeof targetFile === "string" ? targetFile : targetFile.fileName; - const useEsModuleSyntax = !fileShouldUseJavaScriptRequire(targetFileName, program, host, !!oldFile.commonJsModuleIndicator); - const quotePreference = getQuotePreference(oldFile, preferences); - const importsFromTargetFile = createOldFileImportsFromTargetFile(oldFile, usage.oldFileImportsFromTargetFile, targetFileName, program, host, useEsModuleSyntax, quotePreference); - if (importsFromTargetFile) { - insertImports( - changes, - oldFile, - importsFromTargetFile, - /*blankLineBetween*/ - true, - preferences - ); - } - deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); - deleteMovedStatements(oldFile, toMove.ranges, changes); - updateImportsInOtherFiles(changes, program, host, oldFile, usage.movedSymbols, targetFileName, quotePreference); - const imports = getTargetFileImportsAndAddExportInOldFile(oldFile, targetFileName, usage.oldImportsNeededByTargetFile, usage.targetFileImportsFromOldFile, changes, checker, program, host, useEsModuleSyntax, quotePreference, importAdder); - const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromTargetFile, useEsModuleSyntax); - if (typeof targetFile !== "string") { - if (targetFile.statements.length > 0) { - moveStatementsToTargetFile(changes, program, body, targetFile, toMove); - } else { - changes.insertNodesAtEndOfFile( - targetFile, - body, - /*blankLineBetween*/ - false - ); - } - if (imports.length > 0) { - insertImports( - changes, - targetFile, - imports, - /*blankLineBetween*/ - true, - preferences - ); - } - } - if (importAdder) { - importAdder.writeFixes(changes, quotePreference); - } - if (imports.length && body.length) { - return [ - ...prologueDirectives, - ...imports, - 4 /* NewLineTrivia */, - ...body - ]; - } - return [ - ...prologueDirectives, - ...imports, - ...body - ]; - } - function getTargetFileImportsAndAddExportInOldFile(oldFile, targetFile, importsToCopy, targetFileImportsFromOldFile, changes, checker, program, host, useEsModuleSyntax, quotePreference, importAdder) { - const copiedOldImports = []; - if (importAdder) { - importsToCopy.forEach((isValidTypeOnlyUseSite, symbol) => { - try { - importAdder.addImportFromExportedSymbol(skipAlias(symbol, checker), isValidTypeOnlyUseSite); - } catch { - for (const oldStatement of oldFile.statements) { - forEachImportInStatement(oldStatement, (i) => { - append(copiedOldImports, filterImport(i, factory.createStringLiteral(moduleSpecifierFromImport(i).text), (name) => importsToCopy.has(checker.getSymbolAtLocation(name)))); - }); - } - } - }); - } else { - const targetSourceFile = program.getSourceFile(targetFile); - for (const oldStatement of oldFile.statements) { - forEachImportInStatement(oldStatement, (i) => { - var _a, _b; - const moduleSpecifier = moduleSpecifierFromImport(i); - const resolved = (_a = oldFile.resolvedModules) == null ? void 0 : _a.get(moduleSpecifier.text, getModeForUsageLocation(oldFile, moduleSpecifier)); - const fileName = (_b = resolved == null ? void 0 : resolved.resolvedModule) == null ? void 0 : _b.resolvedFileName; - if (fileName && targetSourceFile) { - const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), targetSourceFile, targetSourceFile.path, fileName, createModuleSpecifierResolutionHost(program, host)); - append(copiedOldImports, filterImport(i, makeStringLiteral(newModuleSpecifier, quotePreference), (name) => importsToCopy.has(checker.getSymbolAtLocation(name)))); - } else { - append(copiedOldImports, filterImport(i, factory.createStringLiteral(moduleSpecifierFromImport(i).text), (name) => importsToCopy.has(checker.getSymbolAtLocation(name)))); - } - }); - } - } - const targetFileSourceFile = program.getSourceFile(targetFile); - let oldFileDefault; - const oldFileNamedImports = []; - const markSeenTop = nodeSeenTracker(); - targetFileImportsFromOldFile.forEach((symbol) => { - if (!symbol.declarations) { - return; - } - for (const decl of symbol.declarations) { - if (!isTopLevelDeclaration(decl)) - continue; - const name = nameOfTopLevelDeclaration(decl); - if (!name) - continue; - const top = getTopLevelDeclarationStatement(decl); - if (markSeenTop(top)) { - addExportToChanges(oldFile, top, name, changes, useEsModuleSyntax); - } - if (importAdder && checker.isUnknownSymbol(symbol)) { - importAdder.addImportFromExportedSymbol(skipAlias(symbol, checker)); - } else { - if (hasSyntacticModifier(decl, 1024 /* Default */)) { - oldFileDefault = name; - } else { - oldFileNamedImports.push(name.text); - } - } - } - }); - return targetFileSourceFile ? append(copiedOldImports, makeImportOrRequire(targetFileSourceFile, oldFileDefault, oldFileNamedImports, oldFile.fileName, program, host, useEsModuleSyntax, quotePreference)) : append(copiedOldImports, makeImportOrRequire(oldFile, oldFileDefault, oldFileNamedImports, oldFile.fileName, program, host, useEsModuleSyntax, quotePreference)); - } - function addNewFileToTsconfig(program, changes, oldFileName, newFileNameWithExtension, getCanonicalFileName) { - const cfg = program.getCompilerOptions().configFile; - if (!cfg) - return; - const newFileAbsolutePath = normalizePath(combinePaths(oldFileName, "..", newFileNameWithExtension)); - const newFilePath = getRelativePathFromFile(cfg.fileName, newFileAbsolutePath, getCanonicalFileName); - const cfgObject = cfg.statements[0] && tryCast(cfg.statements[0].expression, isObjectLiteralExpression); - const filesProp = cfgObject && find(cfgObject.properties, (prop) => isPropertyAssignment(prop) && isStringLiteral(prop.name) && prop.name.text === "files"); - if (filesProp && isArrayLiteralExpression(filesProp.initializer)) { - changes.insertNodeInListAfter(cfg, last(filesProp.initializer.elements), factory.createStringLiteral(newFilePath), filesProp.initializer.elements); - } - } - function deleteMovedStatements(sourceFile, moved, changes) { - for (const { first: first2, afterLast } of moved) { - changes.deleteNodeRangeExcludingEnd(sourceFile, first2, afterLast); - } - } - function deleteUnusedOldImports(oldFile, toMove, changes, toDelete, checker) { - for (const statement of oldFile.statements) { - if (contains(toMove, statement)) - continue; - forEachImportInStatement(statement, (i) => deleteUnusedImports(oldFile, i, changes, (name) => toDelete.has(checker.getSymbolAtLocation(name)))); - } - } - function updateImportsInOtherFiles(changes, program, host, oldFile, movedSymbols, targetFileName, quotePreference) { - const checker = program.getTypeChecker(); - for (const sourceFile of program.getSourceFiles()) { - if (sourceFile === oldFile) - continue; - for (const statement of sourceFile.statements) { - forEachImportInStatement(statement, (importNode) => { - if (checker.getSymbolAtLocation(moduleSpecifierFromImport(importNode)) !== oldFile.symbol) - return; - const shouldMove = (name) => { - const symbol = isBindingElement(name.parent) ? getPropertySymbolFromBindingElement(checker, name.parent) : skipAlias(checker.getSymbolAtLocation(name), checker); - return !!symbol && movedSymbols.has(symbol); - }; - deleteUnusedImports(sourceFile, importNode, changes, shouldMove); - const pathToTargetFileWithExtension = resolvePath(getDirectoryPath(oldFile.path), targetFileName); - const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.path, pathToTargetFileWithExtension, createModuleSpecifierResolutionHost(program, host)); - const newImportDeclaration = filterImport(importNode, makeStringLiteral(newModuleSpecifier, quotePreference), shouldMove); - if (newImportDeclaration) - changes.insertNodeAfter(sourceFile, statement, newImportDeclaration); - const ns = getNamespaceLikeImport(importNode); - if (ns) - updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, ns, importNode, quotePreference); - }); - } - } - } - function getNamespaceLikeImport(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - return node.importClause && node.importClause.namedBindings && node.importClause.namedBindings.kind === 274 /* NamespaceImport */ ? node.importClause.namedBindings.name : void 0; - case 271 /* ImportEqualsDeclaration */: - return node.name; - case 260 /* VariableDeclaration */: - return tryCast(node.name, isIdentifier); - default: - return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); - } - } - function updateNamespaceLikeImport(changes, sourceFile, checker, movedSymbols, newModuleSpecifier, oldImportId, oldImportNode, quotePreference) { - const preferredNewNamespaceName = ts_codefix_exports.moduleSpecifierToValidIdentifier(newModuleSpecifier, 99 /* ESNext */); - let needUniqueName = false; - const toChange = []; - ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(oldImportId, checker, sourceFile, (ref) => { - if (!isPropertyAccessExpression(ref.parent)) - return; - needUniqueName = needUniqueName || !!checker.resolveName( - preferredNewNamespaceName, - ref, - 67108863 /* All */, - /*excludeGlobals*/ - true - ); - if (movedSymbols.has(checker.getSymbolAtLocation(ref.parent.name))) { - toChange.push(ref); - } - }); - if (toChange.length) { - const newNamespaceName = needUniqueName ? getUniqueName(preferredNewNamespaceName, sourceFile) : preferredNewNamespaceName; - for (const ref of toChange) { - changes.replaceNode(sourceFile, ref, factory.createIdentifier(newNamespaceName)); - } - changes.insertNodeAfter(sourceFile, oldImportNode, updateNamespaceLikeImportNode(oldImportNode, preferredNewNamespaceName, newModuleSpecifier, quotePreference)); - } - } - function updateNamespaceLikeImportNode(node, newNamespaceName, newModuleSpecifier, quotePreference) { - const newNamespaceId = factory.createIdentifier(newNamespaceName); - const newModuleString = makeStringLiteral(newModuleSpecifier, quotePreference); - switch (node.kind) { - case 272 /* ImportDeclaration */: - return factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ - void 0, - factory.createNamespaceImport(newNamespaceId) - ), - newModuleString, - /*assertClause*/ - void 0 - ); - case 271 /* ImportEqualsDeclaration */: - return factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - newNamespaceId, - factory.createExternalModuleReference(newModuleString) - ); - case 260 /* VariableDeclaration */: - return factory.createVariableDeclaration( - newNamespaceId, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - createRequireCall(newModuleString) - ); - default: - return Debug.assertNever(node, `Unexpected node kind ${node.kind}`); - } - } - function createRequireCall(moduleSpecifier) { - return factory.createCallExpression( - factory.createIdentifier("require"), - /*typeArguments*/ - void 0, - [moduleSpecifier] - ); - } - function moduleSpecifierFromImport(i) { - return i.kind === 272 /* ImportDeclaration */ ? i.moduleSpecifier : i.kind === 271 /* ImportEqualsDeclaration */ ? i.moduleReference.expression : i.initializer.arguments[0]; - } - function forEachImportInStatement(statement, cb) { - if (isImportDeclaration(statement)) { - if (isStringLiteral(statement.moduleSpecifier)) - cb(statement); - } else if (isImportEqualsDeclaration(statement)) { - if (isExternalModuleReference(statement.moduleReference) && isStringLiteralLike(statement.moduleReference.expression)) { - cb(statement); - } - } else if (isVariableStatement(statement)) { - for (const decl of statement.declarationList.declarations) { - if (decl.initializer && isRequireCall( - decl.initializer, - /*requireStringLiteralLikeArgument*/ - true - )) { - cb(decl); - } - } - } - } - function createOldFileImportsFromTargetFile(sourceFile, targetFileNeedExport, targetFileNameWithExtension, program, host, useEs6Imports, quotePreference) { - let defaultImport; - const imports = []; - targetFileNeedExport.forEach((symbol) => { - if (symbol.escapedName === "default" /* Default */) { - defaultImport = factory.createIdentifier(symbolNameNoDefault(symbol)); - } else { - imports.push(symbol.name); - } - }); - return makeImportOrRequire(sourceFile, defaultImport, imports, targetFileNameWithExtension, program, host, useEs6Imports, quotePreference); - } - function makeImportOrRequire(sourceFile, defaultImport, imports, targetFileNameWithExtension, program, host, useEs6Imports, quotePreference) { - const pathToTargetFile = resolvePath(getDirectoryPath(sourceFile.path), targetFileNameWithExtension); - const pathToTargetFileWithCorrectExtension = getModuleSpecifier(program.getCompilerOptions(), sourceFile, sourceFile.path, pathToTargetFile, createModuleSpecifierResolutionHost(program, host)); - if (useEs6Imports) { - const specifiers = imports.map((i) => factory.createImportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ - void 0, - factory.createIdentifier(i) - )); - return makeImportIfNecessary(defaultImport, specifiers, pathToTargetFileWithCorrectExtension, quotePreference); - } else { - Debug.assert(!defaultImport, "No default import should exist"); - const bindingElements = imports.map((i) => factory.createBindingElement( - /*dotDotDotToken*/ - void 0, - /*propertyName*/ - void 0, - i - )); - return bindingElements.length ? makeVariableStatement( - factory.createObjectBindingPattern(bindingElements), - /*type*/ - void 0, - createRequireCall(makeStringLiteral(pathToTargetFileWithCorrectExtension, quotePreference)) - ) : void 0; - } - } - function makeVariableStatement(name, type, initializer, flags = 2 /* Const */) { - return factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([factory.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - type, - initializer - )], flags) - ); - } - function addExports(sourceFile, toMove, needExport, useEs6Exports) { - return flatMap(toMove, (statement) => { - if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, (d) => { - var _a; - return needExport.has(Debug.checkDefined((_a = tryCast(d, canHaveSymbol)) == null ? void 0 : _a.symbol)); - })) { - const exports = addExport(getSynthesizedDeepClone(statement), useEs6Exports); - if (exports) - return exports; - } - return getSynthesizedDeepClone(statement); - }); - } - function isExported(sourceFile, decl, useEs6Exports, name) { - var _a; - if (useEs6Exports) { - return !isExpressionStatement(decl) && hasSyntacticModifier(decl, 1 /* Export */) || !!(name && sourceFile.symbol && ((_a = sourceFile.symbol.exports) == null ? void 0 : _a.has(name.escapedText))); - } - return !!sourceFile.symbol && !!sourceFile.symbol.exports && getNamesToExportInCommonJS(decl).some((name2) => sourceFile.symbol.exports.has(escapeLeadingUnderscores(name2))); - } - function deleteUnusedImports(sourceFile, importDecl, changes, isUnused) { - switch (importDecl.kind) { - case 272 /* ImportDeclaration */: - deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused); - break; - case 271 /* ImportEqualsDeclaration */: - if (isUnused(importDecl.name)) { - changes.delete(sourceFile, importDecl); - } - break; - case 260 /* VariableDeclaration */: - deleteUnusedImportsInVariableDeclaration(sourceFile, importDecl, changes, isUnused); - break; - default: - Debug.assertNever(importDecl, `Unexpected import decl kind ${importDecl.kind}`); - } - } - function deleteUnusedImportsInDeclaration(sourceFile, importDecl, changes, isUnused) { - if (!importDecl.importClause) - return; - const { name, namedBindings } = importDecl.importClause; - const defaultUnused = !name || isUnused(name); - const namedBindingsUnused = !namedBindings || (namedBindings.kind === 274 /* NamespaceImport */ ? isUnused(namedBindings.name) : namedBindings.elements.length !== 0 && namedBindings.elements.every((e) => isUnused(e.name))); - if (defaultUnused && namedBindingsUnused) { - changes.delete(sourceFile, importDecl); - } else { - if (name && defaultUnused) { - changes.delete(sourceFile, name); - } - if (namedBindings) { - if (namedBindingsUnused) { - changes.replaceNode( - sourceFile, - importDecl.importClause, - factory.updateImportClause( - importDecl.importClause, - importDecl.importClause.isTypeOnly, - name, - /*namedBindings*/ - void 0 - ) - ); - } else if (namedBindings.kind === 275 /* NamedImports */) { - for (const element of namedBindings.elements) { - if (isUnused(element.name)) - changes.delete(sourceFile, element); - } - } - } - } - } - function deleteUnusedImportsInVariableDeclaration(sourceFile, varDecl, changes, isUnused) { - const { name } = varDecl; - switch (name.kind) { - case 80 /* Identifier */: - if (isUnused(name)) { - if (varDecl.initializer && isRequireCall( - varDecl.initializer, - /*requireStringLiteralLikeArgument*/ - true - )) { - changes.delete( - sourceFile, - isVariableDeclarationList(varDecl.parent) && length(varDecl.parent.declarations) === 1 ? varDecl.parent.parent : varDecl - ); - } else { - changes.delete(sourceFile, name); - } - } - break; - case 207 /* ArrayBindingPattern */: - break; - case 206 /* ObjectBindingPattern */: - if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { - changes.delete( - sourceFile, - isVariableDeclarationList(varDecl.parent) && varDecl.parent.declarations.length === 1 ? varDecl.parent.parent : varDecl - ); - } else { - for (const element of name.elements) { - if (isIdentifier(element.name) && isUnused(element.name)) { - changes.delete(sourceFile, element.name); - } - } - } - break; - } - } - function isTopLevelDeclarationStatement(node) { - Debug.assert(isSourceFile(node.parent), "Node parent should be a SourceFile"); - return isNonVariableTopLevelDeclaration(node) || isVariableStatement(node); - } - function addExport(decl, useEs6Exports) { - return useEs6Exports ? [addEs6Export(decl)] : addCommonjsExport(decl); - } - function addEs6Export(d) { - const modifiers = canHaveModifiers(d) ? concatenate([factory.createModifier(95 /* ExportKeyword */)], getModifiers(d)) : void 0; - switch (d.kind) { - case 262 /* FunctionDeclaration */: - return factory.updateFunctionDeclaration(d, modifiers, d.asteriskToken, d.name, d.typeParameters, d.parameters, d.type, d.body); - case 263 /* ClassDeclaration */: - const decorators = canHaveDecorators(d) ? getDecorators(d) : void 0; - return factory.updateClassDeclaration(d, concatenate(decorators, modifiers), d.name, d.typeParameters, d.heritageClauses, d.members); - case 243 /* VariableStatement */: - return factory.updateVariableStatement(d, modifiers, d.declarationList); - case 267 /* ModuleDeclaration */: - return factory.updateModuleDeclaration(d, modifiers, d.name, d.body); - case 266 /* EnumDeclaration */: - return factory.updateEnumDeclaration(d, modifiers, d.name, d.members); - case 265 /* TypeAliasDeclaration */: - return factory.updateTypeAliasDeclaration(d, modifiers, d.name, d.typeParameters, d.type); - case 264 /* InterfaceDeclaration */: - return factory.updateInterfaceDeclaration(d, modifiers, d.name, d.typeParameters, d.heritageClauses, d.members); - case 271 /* ImportEqualsDeclaration */: - return factory.updateImportEqualsDeclaration(d, modifiers, d.isTypeOnly, d.name, d.moduleReference); - case 244 /* ExpressionStatement */: - return Debug.fail(); - default: - return Debug.assertNever(d, `Unexpected declaration kind ${d.kind}`); - } - } - function addCommonjsExport(decl) { - return [decl, ...getNamesToExportInCommonJS(decl).map(createExportAssignment)]; - } - function createExportAssignment(name) { - return factory.createExpressionStatement( - factory.createBinaryExpression( - factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.createIdentifier(name)), - 64 /* EqualsToken */, - factory.createIdentifier(name) - ) - ); - } - function getNamesToExportInCommonJS(decl) { - switch (decl.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - return [decl.name.text]; - case 243 /* VariableStatement */: - return mapDefined(decl.declarationList.declarations, (d) => isIdentifier(d.name) ? d.name.text : void 0); - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: - case 271 /* ImportEqualsDeclaration */: - return emptyArray; - case 244 /* ExpressionStatement */: - return Debug.fail("Can't export an ExpressionStatement"); - default: - return Debug.assertNever(decl, `Unexpected decl kind ${decl.kind}`); - } - } - function filterImport(i, moduleSpecifier, keep) { - switch (i.kind) { - case 272 /* ImportDeclaration */: { - const clause = i.importClause; - if (!clause) - return void 0; - const defaultImport = clause.name && keep(clause.name) ? clause.name : void 0; - const namedBindings = clause.namedBindings && filterNamedBindings(clause.namedBindings, keep); - return defaultImport || namedBindings ? factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause(clause.isTypeOnly, defaultImport, namedBindings), - getSynthesizedDeepClone(moduleSpecifier), - /*assertClause*/ - void 0 - ) : void 0; - } - case 271 /* ImportEqualsDeclaration */: - return keep(i.name) ? i : void 0; - case 260 /* VariableDeclaration */: { - const name = filterBindingName(i.name, keep); - return name ? makeVariableStatement(name, i.type, createRequireCall(moduleSpecifier), i.parent.flags) : void 0; - } - default: - return Debug.assertNever(i, `Unexpected import kind ${i.kind}`); - } - } - function filterNamedBindings(namedBindings, keep) { - if (namedBindings.kind === 274 /* NamespaceImport */) { - return keep(namedBindings.name) ? namedBindings : void 0; - } else { - const newElements = namedBindings.elements.filter((e) => keep(e.name)); - return newElements.length ? factory.createNamedImports(newElements) : void 0; - } - } - function filterBindingName(name, keep) { - switch (name.kind) { - case 80 /* Identifier */: - return keep(name) ? name : void 0; - case 207 /* ArrayBindingPattern */: - return name; - case 206 /* ObjectBindingPattern */: { - const newElements = name.elements.filter((prop) => prop.propertyName || !isIdentifier(prop.name) || keep(prop.name)); - return newElements.length ? factory.createObjectBindingPattern(newElements) : void 0; - } - } - } - function nameOfTopLevelDeclaration(d) { - return isExpressionStatement(d) ? tryCast(d.expression.left.name, isIdentifier) : tryCast(d.name, isIdentifier); - } - function getTopLevelDeclarationStatement(d) { - switch (d.kind) { - case 260 /* VariableDeclaration */: - return d.parent.parent; - case 208 /* BindingElement */: - return getTopLevelDeclarationStatement( - cast(d.parent.parent, (p) => isVariableDeclaration(p) || isBindingElement(p)) - ); - default: - return d; - } - } - function addExportToChanges(sourceFile, decl, name, changes, useEs6Exports) { - if (isExported(sourceFile, decl, useEs6Exports, name)) - return; - if (useEs6Exports) { - if (!isExpressionStatement(decl)) - changes.insertExportModifier(sourceFile, decl); - } else { - const names = getNamesToExportInCommonJS(decl); - if (names.length !== 0) - changes.insertNodesAfter(sourceFile, decl, names.map(createExportAssignment)); - } - } - function createNewFileName(oldFile, program, context, host) { - const checker = program.getTypeChecker(); - const toMove = getStatementsToMove(context); - let usage; - if (toMove) { - usage = getUsageInfo(oldFile, toMove.all, checker); - const currentDirectory = getDirectoryPath(oldFile.fileName); - const extension = extensionFromPath(oldFile.fileName); - const newFileName = combinePaths( - // new file is always placed in the same directory as the old file - currentDirectory, - // ensures the filename computed below isn't already taken - makeUniqueFilename( - // infers a name for the new file from the symbols being moved - inferNewFileName(usage.oldFileImportsFromTargetFile, usage.movedSymbols), - extension, - currentDirectory, - host - ) - ) + extension; - return newFileName; - } - return ""; - } - function getRangeToMove(context) { - const { file } = context; - const range = createTextRangeFromSpan(getRefactorContextSpan(context)); - const { statements } = file; - let startNodeIndex = findIndex(statements, (s) => s.end > range.pos); - if (startNodeIndex === -1) - return void 0; - const startStatement = statements[startNodeIndex]; - const overloadRangeToMove = getOverloadRangeToMove(file, startStatement); - if (overloadRangeToMove) { - startNodeIndex = overloadRangeToMove.start; - } - let endNodeIndex = findIndex(statements, (s) => s.end >= range.end, startNodeIndex); - if (endNodeIndex !== -1 && range.end <= statements[endNodeIndex].getStart()) { - endNodeIndex--; - } - const endingOverloadRangeToMove = getOverloadRangeToMove(file, statements[endNodeIndex]); - if (endingOverloadRangeToMove) { - endNodeIndex = endingOverloadRangeToMove.end; - } - return { - toMove: statements.slice(startNodeIndex, endNodeIndex === -1 ? statements.length : endNodeIndex + 1), - afterLast: endNodeIndex === -1 ? void 0 : statements[endNodeIndex + 1] - }; - } - function getStatementsToMove(context) { - const rangeToMove = getRangeToMove(context); - if (rangeToMove === void 0) - return void 0; - const all = []; - const ranges = []; - const { toMove, afterLast } = rangeToMove; - getRangesWhere(toMove, isAllowedStatementToMove, (start, afterEndIndex) => { - for (let i = start; i < afterEndIndex; i++) - all.push(toMove[i]); - ranges.push({ first: toMove[start], afterLast }); - }); - return all.length === 0 ? void 0 : { all, ranges }; - } - function isAllowedStatementToMove(statement) { - return !isPureImport(statement) && !isPrologueDirective(statement); - } - function isPureImport(node) { - switch (node.kind) { - case 272 /* ImportDeclaration */: - return true; - case 271 /* ImportEqualsDeclaration */: - return !hasSyntacticModifier(node, 1 /* Export */); - case 243 /* VariableStatement */: - return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( - d.initializer, - /*requireStringLiteralLikeArgument*/ - true - )); - default: - return false; - } - } - function getUsageInfo(oldFile, toMove, checker) { - const movedSymbols = /* @__PURE__ */ new Set(); - const oldImportsNeededByTargetFile = /* @__PURE__ */ new Map(); - const targetFileImportsFromOldFile = /* @__PURE__ */ new Set(); - const containsJsx = find(toMove, (statement) => !!(statement.transformFlags & 2 /* ContainsJsx */)); - const jsxNamespaceSymbol = getJsxNamespaceSymbol(containsJsx); - if (jsxNamespaceSymbol) { - oldImportsNeededByTargetFile.set(jsxNamespaceSymbol, false); - } - for (const statement of toMove) { - forEachTopLevelDeclaration(statement, (decl) => { - movedSymbols.add(Debug.checkDefined(isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); - }); - } - for (const statement of toMove) { - forEachReference(statement, checker, (symbol, isValidTypeOnlyUseSite) => { - if (!symbol.declarations) - return; - for (const decl of symbol.declarations) { - if (isInImport(decl)) { - const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol); - oldImportsNeededByTargetFile.set(symbol, prevIsTypeOnly === void 0 ? isValidTypeOnlyUseSite : prevIsTypeOnly && isValidTypeOnlyUseSite); - } else if (isTopLevelDeclaration(decl) && sourceFileOfTopLevelDeclaration(decl) === oldFile && !movedSymbols.has(symbol)) { - targetFileImportsFromOldFile.add(symbol); - } - } - }); - } - const unusedImportsFromOldFile = new Set(oldImportsNeededByTargetFile.keys()); - const oldFileImportsFromTargetFile = /* @__PURE__ */ new Set(); - for (const statement of oldFile.statements) { - if (contains(toMove, statement)) - continue; - if (jsxNamespaceSymbol && !!(statement.transformFlags & 2 /* ContainsJsx */)) { - unusedImportsFromOldFile.delete(jsxNamespaceSymbol); - } - forEachReference(statement, checker, (symbol) => { - if (movedSymbols.has(symbol)) - oldFileImportsFromTargetFile.add(symbol); - unusedImportsFromOldFile.delete(symbol); - }); - } - return { movedSymbols, targetFileImportsFromOldFile, oldFileImportsFromTargetFile, oldImportsNeededByTargetFile, unusedImportsFromOldFile }; - function getJsxNamespaceSymbol(containsJsx2) { - if (containsJsx2 === void 0) { - return void 0; - } - const jsxNamespace = checker.getJsxNamespace(containsJsx2); - const jsxNamespaceSymbol2 = checker.resolveName( - jsxNamespace, - containsJsx2, - 1920 /* Namespace */, - /*excludeGlobals*/ - true - ); - return !!jsxNamespaceSymbol2 && some(jsxNamespaceSymbol2.declarations, isInImport) ? jsxNamespaceSymbol2 : void 0; - } - } - function makeUniqueFilename(proposedFilename, extension, inDirectory, host) { - let newFilename = proposedFilename; - for (let i = 1; ; i++) { - const name = combinePaths(inDirectory, newFilename + extension); - if (!host.fileExists(name)) - return newFilename; - newFilename = `${proposedFilename}.${i}`; - } - } - function inferNewFileName(importsFromNewFile, movedSymbols) { - return forEachKey(importsFromNewFile, symbolNameNoDefault) || forEachKey(movedSymbols, symbolNameNoDefault) || "newFile"; - } - function forEachReference(node, checker, onReference) { - node.forEachChild(function cb(node2) { - if (isIdentifier(node2) && !isDeclarationName(node2)) { - const sym = checker.getSymbolAtLocation(node2); - if (sym) - onReference(sym, isValidTypeOnlyAliasUseSite(node2)); - } else { - node2.forEachChild(cb); - } - }); - } - function forEachTopLevelDeclaration(statement, cb) { - switch (statement.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: - case 271 /* ImportEqualsDeclaration */: - return cb(statement); - case 243 /* VariableStatement */: - return firstDefined(statement.declarationList.declarations, (decl) => forEachTopLevelDeclarationInBindingName(decl.name, cb)); - case 244 /* ExpressionStatement */: { - const { expression } = statement; - return isBinaryExpression(expression) && getAssignmentDeclarationKind(expression) === 1 /* ExportsProperty */ ? cb(statement) : void 0; - } - } - } - function isInImport(decl) { - switch (decl.kind) { - case 271 /* ImportEqualsDeclaration */: - case 276 /* ImportSpecifier */: - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: - return true; - case 260 /* VariableDeclaration */: - return isVariableDeclarationInImport(decl); - case 208 /* BindingElement */: - return isVariableDeclaration(decl.parent.parent) && isVariableDeclarationInImport(decl.parent.parent); - default: - return false; - } - } - function isVariableDeclarationInImport(decl) { - return isSourceFile(decl.parent.parent.parent) && !!decl.initializer && isRequireCall( - decl.initializer, - /*requireStringLiteralLikeArgument*/ - true - ); - } - function isTopLevelDeclaration(node) { - return isNonVariableTopLevelDeclaration(node) && isSourceFile(node.parent) || isVariableDeclaration(node) && isSourceFile(node.parent.parent.parent); - } - function sourceFileOfTopLevelDeclaration(node) { - return isVariableDeclaration(node) ? node.parent.parent.parent : node.parent; - } - function forEachTopLevelDeclarationInBindingName(name, cb) { - switch (name.kind) { - case 80 /* Identifier */: - return cb(cast(name.parent, (x) => isVariableDeclaration(x) || isBindingElement(x))); - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: - return firstDefined(name.elements, (em) => isOmittedExpression(em) ? void 0 : forEachTopLevelDeclarationInBindingName(em.name, cb)); - default: - return Debug.assertNever(name, `Unexpected name kind ${name.kind}`); - } - } - function isNonVariableTopLevelDeclaration(node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 264 /* InterfaceDeclaration */: - case 271 /* ImportEqualsDeclaration */: - return true; - default: - return false; - } - } - function moveStatementsToTargetFile(changes, program, statements, targetFile, toMove) { - var _a; - const removedExports = /* @__PURE__ */ new Set(); - const targetExports = (_a = targetFile.symbol) == null ? void 0 : _a.exports; - if (targetExports) { - const checker = program.getTypeChecker(); - const targetToSourceExports = /* @__PURE__ */ new Map(); - for (const node of toMove.all) { - if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 1 /* Export */)) { - forEachTopLevelDeclaration(node, (declaration) => { - var _a2; - const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0; - const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0); - if (exportDeclaration && exportDeclaration.moduleSpecifier) { - targetToSourceExports.set( - exportDeclaration, - (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration) - ); - } - }); - } - } - for (const [exportDeclaration, topLevelDeclarations] of arrayFrom(targetToSourceExports)) { - if (exportDeclaration.exportClause && isNamedExports(exportDeclaration.exportClause) && length(exportDeclaration.exportClause.elements)) { - const elements = exportDeclaration.exportClause.elements; - const updatedElements = filter(elements, (elem) => find(skipAlias(elem.symbol, checker).declarations, (d) => isTopLevelDeclaration(d) && topLevelDeclarations.has(d)) === void 0); - if (length(updatedElements) === 0) { - changes.deleteNode(targetFile, exportDeclaration); - removedExports.add(exportDeclaration); - continue; - } - if (length(updatedElements) < length(elements)) { - changes.replaceNode( - targetFile, - exportDeclaration, - factory.updateExportDeclaration( - exportDeclaration, - exportDeclaration.modifiers, - exportDeclaration.isTypeOnly, - factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), - exportDeclaration.moduleSpecifier, - exportDeclaration.assertClause - ) - ); - } - } - } - } - const lastReExport = findLast(targetFile.statements, (n) => isExportDeclaration(n) && !!n.moduleSpecifier && !removedExports.has(n)); - if (lastReExport) { - changes.insertNodesBefore( - targetFile, - lastReExport, - statements, - /*blankLineBetween*/ - true - ); - } else { - changes.insertNodesAfter(targetFile, targetFile.statements[targetFile.statements.length - 1], statements); - } - } - function getOverloadRangeToMove(sourceFile, statement) { - if (isFunctionLikeDeclaration(statement)) { - const declarations = statement.symbol.declarations; - if (declarations === void 0 || length(declarations) <= 1 || !contains(declarations, statement)) { - return void 0; - } - const firstDecl = declarations[0]; - const lastDecl = declarations[length(declarations) - 1]; - const statementsToMove = mapDefined(declarations, (d) => getSourceFileOfNode(d) === sourceFile && isStatement(d) ? d : void 0); - const end = findIndex(sourceFile.statements, (s) => s.end >= lastDecl.end); - const start = findIndex(sourceFile.statements, (s) => s.end >= firstDecl.end); - return { toMove: statementsToMove, start, end }; - } - return void 0; - } - var refactorNameForMoveToFile, description2, moveToFileAction; - var init_moveToFile = __esm({ - "src/services/refactors/moveToFile.ts"() { - "use strict"; - init_moduleSpecifiers(); - init_ts4(); - init_refactorProvider(); - refactorNameForMoveToFile = "Move to file"; - description2 = getLocaleSpecificMessage(Diagnostics.Move_to_file); - moveToFileAction = { - name: "Move to file", - description: description2, - kind: "refactor.move.file" - }; - registerRefactor(refactorNameForMoveToFile, { - kinds: [moveToFileAction.kind], - getAvailableActions: function getRefactorActionsToMoveToFile(context, interactiveRefactorArguments) { - const statements = getStatementsToMove(context); - if (!interactiveRefactorArguments) { - return emptyArray; - } - if (context.preferences.allowTextChangesInNewFiles && statements) { - return [{ name: refactorNameForMoveToFile, description: description2, actions: [moveToFileAction] }]; - } - if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorNameForMoveToFile, - description: description2, - actions: [{ ...moveToFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] - }]; - } - return emptyArray; - }, - getEditsForAction: function getRefactorEditsToMoveToFile(context, actionName2, interactiveRefactorArguments) { - Debug.assert(actionName2 === refactorNameForMoveToFile, "Wrong refactor invoked"); - const statements = Debug.checkDefined(getStatementsToMove(context)); - const { host, program } = context; - Debug.assert(interactiveRefactorArguments, "No interactive refactor arguments available"); - const targetFile = interactiveRefactorArguments.targetFile; - if (hasJSFileExtension(targetFile) || hasTSFileExtension(targetFile)) { - if (host.fileExists(targetFile) && program.getSourceFile(targetFile) === void 0) { - return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_statements_to_the_selected_file)); - } - const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange4(context, context.file, interactiveRefactorArguments.targetFile, context.program, statements, t, context.host, context.preferences)); - return { edits, renameFilename: void 0, renameLocation: void 0 }; - } - return error(getLocaleSpecificMessage(Diagnostics.Cannot_move_to_file_selected_file_is_invalid)); - } - }); - } - }); - - // src/services/refactors/convertOverloadListToSingleSignature.ts - function getRefactorActionsToConvertOverloadsToOneSignature(context) { - const { file, startPosition, program } = context; - const info = getConvertableOverloadListAtPosition(file, startPosition, program); - if (!info) - return emptyArray; - return [{ - name: refactorName6, - description: refactorDescription2, - actions: [functionOverloadAction] - }]; - } - function getRefactorEditsToConvertOverloadsToOneSignature(context) { - const { file, startPosition, program } = context; - const signatureDecls = getConvertableOverloadListAtPosition(file, startPosition, program); - if (!signatureDecls) - return void 0; - const checker = program.getTypeChecker(); - const lastDeclaration = signatureDecls[signatureDecls.length - 1]; - let updated = lastDeclaration; - switch (lastDeclaration.kind) { - case 173 /* MethodSignature */: { - updated = factory.updateMethodSignature( - lastDeclaration, - lastDeclaration.modifiers, - lastDeclaration.name, - lastDeclaration.questionToken, - lastDeclaration.typeParameters, - getNewParametersForCombinedSignature(signatureDecls), - lastDeclaration.type - ); - break; - } - case 174 /* MethodDeclaration */: { - updated = factory.updateMethodDeclaration( - lastDeclaration, - lastDeclaration.modifiers, - lastDeclaration.asteriskToken, - lastDeclaration.name, - lastDeclaration.questionToken, - lastDeclaration.typeParameters, - getNewParametersForCombinedSignature(signatureDecls), - lastDeclaration.type, - lastDeclaration.body - ); - break; - } - case 179 /* CallSignature */: { - updated = factory.updateCallSignature( - lastDeclaration, - lastDeclaration.typeParameters, - getNewParametersForCombinedSignature(signatureDecls), - lastDeclaration.type - ); - break; - } - case 176 /* Constructor */: { - updated = factory.updateConstructorDeclaration( - lastDeclaration, - lastDeclaration.modifiers, - getNewParametersForCombinedSignature(signatureDecls), - lastDeclaration.body - ); - break; - } - case 180 /* ConstructSignature */: { - updated = factory.updateConstructSignature( - lastDeclaration, - lastDeclaration.typeParameters, - getNewParametersForCombinedSignature(signatureDecls), - lastDeclaration.type - ); - break; - } - case 262 /* FunctionDeclaration */: { - updated = factory.updateFunctionDeclaration( - lastDeclaration, - lastDeclaration.modifiers, - lastDeclaration.asteriskToken, - lastDeclaration.name, - lastDeclaration.typeParameters, - getNewParametersForCombinedSignature(signatureDecls), - lastDeclaration.type, - lastDeclaration.body - ); - break; - } - default: - return Debug.failBadSyntaxKind(lastDeclaration, "Unhandled signature kind in overload list conversion refactoring"); - } - if (updated === lastDeclaration) { - return; - } - const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => { - t.replaceNodeRange(file, signatureDecls[0], signatureDecls[signatureDecls.length - 1], updated); - }); - return { renameFilename: void 0, renameLocation: void 0, edits }; - function getNewParametersForCombinedSignature(signatureDeclarations) { - const lastSig = signatureDeclarations[signatureDeclarations.length - 1]; - if (isFunctionLikeDeclaration(lastSig) && lastSig.body) { - signatureDeclarations = signatureDeclarations.slice(0, signatureDeclarations.length - 1); - } - return factory.createNodeArray([ - factory.createParameterDeclaration( - /*modifiers*/ - void 0, - factory.createToken(26 /* DotDotDotToken */), - "args", - /*questionToken*/ - void 0, - factory.createUnionTypeNode(map(signatureDeclarations, convertSignatureParametersToTuple)) - ) - ]); - } - function convertSignatureParametersToTuple(decl) { - const members = map(decl.parameters, convertParameterToNamedTupleMember); - return setEmitFlags(factory.createTupleTypeNode(members), some(members, (m) => !!length(getSyntheticLeadingComments(m))) ? 0 /* None */ : 1 /* SingleLine */); - } - function convertParameterToNamedTupleMember(p) { - Debug.assert(isIdentifier(p.name)); - const result = setTextRange(factory.createNamedTupleMember( - p.dotDotDotToken, - p.name, - p.questionToken, - p.type || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ), p); - const parameterDocComment = p.symbol && p.symbol.getDocumentationComment(checker); - if (parameterDocComment) { - const newComment = displayPartsToString(parameterDocComment); - if (newComment.length) { - setSyntheticLeadingComments(result, [{ - text: `* -${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} - `, - kind: 3 /* MultiLineCommentTrivia */, - pos: -1, - end: -1, - hasTrailingNewLine: true, - hasLeadingNewline: true - }]); - } - } - return result; - } - } - function isConvertableSignatureDeclaration(d) { - switch (d.kind) { - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 180 /* ConstructSignature */: - case 262 /* FunctionDeclaration */: - return true; - } - return false; - } - function getConvertableOverloadListAtPosition(file, startPosition, program) { - const node = getTokenAtPosition(file, startPosition); - const containingDecl = findAncestor(node, isConvertableSignatureDeclaration); - if (!containingDecl) { - return; - } - if (isFunctionLikeDeclaration(containingDecl) && containingDecl.body && rangeContainsPosition(containingDecl.body, startPosition)) { - return; - } - const checker = program.getTypeChecker(); - const signatureSymbol = containingDecl.symbol; - if (!signatureSymbol) { - return; - } - const decls = signatureSymbol.declarations; - if (length(decls) <= 1) { - return; - } - if (!every(decls, (d) => getSourceFileOfNode(d) === file)) { - return; - } - if (!isConvertableSignatureDeclaration(decls[0])) { - return; - } - const kindOne = decls[0].kind; - if (!every(decls, (d) => d.kind === kindOne)) { - return; - } - const signatureDecls = decls; - if (some(signatureDecls, (d) => !!d.typeParameters || some(d.parameters, (p) => !!p.modifiers || !isIdentifier(p.name)))) { - return; - } - const signatures = mapDefined(signatureDecls, (d) => checker.getSignatureFromDeclaration(d)); - if (length(signatures) !== length(decls)) { - return; - } - const returnOne = checker.getReturnTypeOfSignature(signatures[0]); - if (!every(signatures, (s) => checker.getReturnTypeOfSignature(s) === returnOne)) { - return; - } - return signatureDecls; - } - var refactorName6, refactorDescription2, functionOverloadAction; - var init_convertOverloadListToSingleSignature = __esm({ - "src/services/refactors/convertOverloadListToSingleSignature.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName6 = "Convert overload list to single signature"; - refactorDescription2 = getLocaleSpecificMessage(Diagnostics.Convert_overload_list_to_single_signature); - functionOverloadAction = { - name: refactorName6, - description: refactorDescription2, - kind: "refactor.rewrite.function.overloadList" - }; - registerRefactor(refactorName6, { - kinds: [functionOverloadAction.kind], - getEditsForAction: getRefactorEditsToConvertOverloadsToOneSignature, - getAvailableActions: getRefactorActionsToConvertOverloadsToOneSignature - }); - } - }); - - // src/services/refactors/addOrRemoveBracesToArrowFunction.ts - function getRefactorActionsToRemoveFunctionBraces(context) { - const { file, startPosition, triggerReason } = context; - const info = getConvertibleArrowFunctionAtPosition(file, startPosition, triggerReason === "invoked"); - if (!info) - return emptyArray; - if (!isRefactorErrorInfo(info)) { - return [{ - name: refactorName7, - description: refactorDescription3, - actions: [ - info.addBraces ? addBracesAction : removeBracesAction - ] - }]; - } - if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorName7, - description: refactorDescription3, - actions: [ - { ...addBracesAction, notApplicableReason: info.error }, - { ...removeBracesAction, notApplicableReason: info.error } - ] - }]; - } - return emptyArray; - } - function getRefactorEditsToRemoveFunctionBraces(context, actionName2) { - const { file, startPosition } = context; - const info = getConvertibleArrowFunctionAtPosition(file, startPosition); - Debug.assert(info && !isRefactorErrorInfo(info), "Expected applicable refactor info"); - const { expression, returnStatement, func } = info; - let body; - if (actionName2 === addBracesAction.name) { - const returnStatement2 = factory.createReturnStatement(expression); - body = factory.createBlock( - [returnStatement2], - /*multiLine*/ - true - ); - copyLeadingComments( - expression, - returnStatement2, - file, - 3 /* MultiLineCommentTrivia */, - /*hasTrailingNewLine*/ - true - ); - } else if (actionName2 === removeBracesAction.name && returnStatement) { - const actualExpression = expression || factory.createVoidZero(); - body = needsParentheses(actualExpression) ? factory.createParenthesizedExpression(actualExpression) : actualExpression; - copyTrailingAsLeadingComments( - returnStatement, - body, - file, - 3 /* MultiLineCommentTrivia */, - /*hasTrailingNewLine*/ - false - ); - copyLeadingComments( - returnStatement, - body, - file, - 3 /* MultiLineCommentTrivia */, - /*hasTrailingNewLine*/ - false - ); - copyTrailingComments( - returnStatement, - body, - file, - 3 /* MultiLineCommentTrivia */, - /*hasTrailingNewLine*/ - false - ); - } else { - Debug.fail("invalid action"); - } - const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => { - t.replaceNode(file, func.body, body); - }); - return { renameFilename: void 0, renameLocation: void 0, edits }; - } - function getConvertibleArrowFunctionAtPosition(file, startPosition, considerFunctionBodies = true, kind) { - const node = getTokenAtPosition(file, startPosition); - const func = getContainingFunction(node); - if (!func) { - return { - error: getLocaleSpecificMessage(Diagnostics.Could_not_find_a_containing_arrow_function) - }; - } - if (!isArrowFunction(func)) { - return { - error: getLocaleSpecificMessage(Diagnostics.Containing_function_is_not_an_arrow_function) - }; - } - if (!rangeContainsRange(func, node) || rangeContainsRange(func.body, node) && !considerFunctionBodies) { - return void 0; - } - if (refactorKindBeginsWith(addBracesAction.kind, kind) && isExpression(func.body)) { - return { func, addBraces: true, expression: func.body }; - } else if (refactorKindBeginsWith(removeBracesAction.kind, kind) && isBlock(func.body) && func.body.statements.length === 1) { - const firstStatement = first(func.body.statements); - if (isReturnStatement(firstStatement)) { - return { func, addBraces: false, expression: firstStatement.expression, returnStatement: firstStatement }; - } - } - return void 0; - } - var refactorName7, refactorDescription3, addBracesAction, removeBracesAction; - var init_addOrRemoveBracesToArrowFunction = __esm({ - "src/services/refactors/addOrRemoveBracesToArrowFunction.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName7 = "Add or remove braces in an arrow function"; - refactorDescription3 = getLocaleSpecificMessage(Diagnostics.Add_or_remove_braces_in_an_arrow_function); - addBracesAction = { - name: "Add braces to arrow function", - description: getLocaleSpecificMessage(Diagnostics.Add_braces_to_arrow_function), - kind: "refactor.rewrite.arrow.braces.add" - }; - removeBracesAction = { - name: "Remove braces from arrow function", - description: getLocaleSpecificMessage(Diagnostics.Remove_braces_from_arrow_function), - kind: "refactor.rewrite.arrow.braces.remove" - }; - registerRefactor(refactorName7, { - kinds: [removeBracesAction.kind], - getEditsForAction: getRefactorEditsToRemoveFunctionBraces, - getAvailableActions: getRefactorActionsToRemoveFunctionBraces - }); - } - }); - - // src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts - var ts_refactor_addOrRemoveBracesToArrowFunction_exports = {}; - var init_ts_refactor_addOrRemoveBracesToArrowFunction = __esm({ - "src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts"() { - "use strict"; - init_convertOverloadListToSingleSignature(); - init_addOrRemoveBracesToArrowFunction(); - } - }); - - // src/services/refactors/convertArrowFunctionOrFunctionExpression.ts - function getRefactorActionsToConvertFunctionExpressions(context) { - const { file, startPosition, program, kind } = context; - const info = getFunctionInfo(file, startPosition, program); - if (!info) - return emptyArray; - const { selectedVariableDeclaration, func } = info; - const possibleActions = []; - const errors = []; - if (refactorKindBeginsWith(toNamedFunctionAction.kind, kind)) { - const error2 = selectedVariableDeclaration || isArrowFunction(func) && isVariableDeclaration(func.parent) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_named_function); - if (error2) { - errors.push({ ...toNamedFunctionAction, notApplicableReason: error2 }); - } else { - possibleActions.push(toNamedFunctionAction); - } - } - if (refactorKindBeginsWith(toAnonymousFunctionAction.kind, kind)) { - const error2 = !selectedVariableDeclaration && isArrowFunction(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_anonymous_function); - if (error2) { - errors.push({ ...toAnonymousFunctionAction, notApplicableReason: error2 }); - } else { - possibleActions.push(toAnonymousFunctionAction); - } - } - if (refactorKindBeginsWith(toArrowFunctionAction.kind, kind)) { - const error2 = isFunctionExpression(func) ? void 0 : getLocaleSpecificMessage(Diagnostics.Could_not_convert_to_arrow_function); - if (error2) { - errors.push({ ...toArrowFunctionAction, notApplicableReason: error2 }); - } else { - possibleActions.push(toArrowFunctionAction); - } - } - return [{ - name: refactorName8, - description: refactorDescription4, - actions: possibleActions.length === 0 && context.preferences.provideRefactorNotApplicableReason ? errors : possibleActions - }]; - } - function getRefactorEditsToConvertFunctionExpressions(context, actionName2) { - const { file, startPosition, program } = context; - const info = getFunctionInfo(file, startPosition, program); - if (!info) - return void 0; - const { func } = info; - const edits = []; - switch (actionName2) { - case toAnonymousFunctionAction.name: - edits.push(...getEditInfoForConvertToAnonymousFunction(context, func)); - break; - case toNamedFunctionAction.name: - const variableInfo = getVariableInfo(func); - if (!variableInfo) - return void 0; - edits.push(...getEditInfoForConvertToNamedFunction(context, func, variableInfo)); - break; - case toArrowFunctionAction.name: - if (!isFunctionExpression(func)) - return void 0; - edits.push(...getEditInfoForConvertToArrowFunction(context, func)); - break; - default: - return Debug.fail("invalid action"); - } - return { renameFilename: void 0, renameLocation: void 0, edits }; - } - function containingThis(node) { - let containsThis = false; - node.forEachChild(function checkThis(child) { - if (isThis(child)) { - containsThis = true; - return; - } - if (!isClassLike(child) && !isFunctionDeclaration(child) && !isFunctionExpression(child)) { - forEachChild(child, checkThis); - } - }); - return containsThis; - } - function getFunctionInfo(file, startPosition, program) { - const token = getTokenAtPosition(file, startPosition); - const typeChecker = program.getTypeChecker(); - const func = tryGetFunctionFromVariableDeclaration(file, typeChecker, token.parent); - if (func && !containingThis(func.body) && !typeChecker.containsArgumentsReference(func)) { - return { selectedVariableDeclaration: true, func }; - } - const maybeFunc = getContainingFunction(token); - if (maybeFunc && (isFunctionExpression(maybeFunc) || isArrowFunction(maybeFunc)) && !rangeContainsRange(maybeFunc.body, token) && !containingThis(maybeFunc.body) && !typeChecker.containsArgumentsReference(maybeFunc)) { - if (isFunctionExpression(maybeFunc) && isFunctionReferencedInFile(file, typeChecker, maybeFunc)) - return void 0; - return { selectedVariableDeclaration: false, func: maybeFunc }; - } - return void 0; - } - function isSingleVariableDeclaration(parent2) { - return isVariableDeclaration(parent2) || isVariableDeclarationList(parent2) && parent2.declarations.length === 1; - } - function tryGetFunctionFromVariableDeclaration(sourceFile, typeChecker, parent2) { - if (!isSingleVariableDeclaration(parent2)) { - return void 0; - } - const variableDeclaration = isVariableDeclaration(parent2) ? parent2 : first(parent2.declarations); - const initializer = variableDeclaration.initializer; - if (initializer && (isArrowFunction(initializer) || isFunctionExpression(initializer) && !isFunctionReferencedInFile(sourceFile, typeChecker, initializer))) { - return initializer; - } - return void 0; - } - function convertToBlock(body) { - if (isExpression(body)) { - const returnStatement = factory.createReturnStatement(body); - const file = body.getSourceFile(); - setTextRange(returnStatement, body); - suppressLeadingAndTrailingTrivia(returnStatement); - copyTrailingAsLeadingComments( - body, - returnStatement, - file, - /*commentKind*/ - void 0, - /*hasTrailingNewLine*/ - true - ); - return factory.createBlock( - [returnStatement], - /*multiLine*/ - true - ); - } else { - return body; - } - } - function getVariableInfo(func) { - const variableDeclaration = func.parent; - if (!isVariableDeclaration(variableDeclaration) || !isVariableDeclarationInVariableStatement(variableDeclaration)) - return void 0; - const variableDeclarationList = variableDeclaration.parent; - const statement = variableDeclarationList.parent; - if (!isVariableDeclarationList(variableDeclarationList) || !isVariableStatement(statement) || !isIdentifier(variableDeclaration.name)) - return void 0; - return { variableDeclaration, variableDeclarationList, statement, name: variableDeclaration.name }; - } - function getEditInfoForConvertToAnonymousFunction(context, func) { - const { file } = context; - const body = convertToBlock(func.body); - const newNode = factory.createFunctionExpression( - func.modifiers, - func.asteriskToken, - /*name*/ - void 0, - func.typeParameters, - func.parameters, - func.type, - body - ); - return ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(file, func, newNode)); - } - function getEditInfoForConvertToNamedFunction(context, func, variableInfo) { - const { file } = context; - const body = convertToBlock(func.body); - const { variableDeclaration, variableDeclarationList, statement, name } = variableInfo; - suppressLeadingTrivia(statement); - const modifiersFlags = getCombinedModifierFlags(variableDeclaration) & 1 /* Export */ | getEffectiveModifierFlags(func); - const modifiers = factory.createModifiersFromModifierFlags(modifiersFlags); - const newNode = factory.createFunctionDeclaration(length(modifiers) ? modifiers : void 0, func.asteriskToken, name, func.typeParameters, func.parameters, func.type, body); - if (variableDeclarationList.declarations.length === 1) { - return ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(file, statement, newNode)); - } else { - return ts_textChanges_exports.ChangeTracker.with(context, (t) => { - t.delete(file, variableDeclaration); - t.insertNodeAfter(file, statement, newNode); - }); - } - } - function getEditInfoForConvertToArrowFunction(context, func) { - const { file } = context; - const statements = func.body.statements; - const head = statements[0]; - let body; - if (canBeConvertedToExpression(func.body, head)) { - body = head.expression; - suppressLeadingAndTrailingTrivia(body); - copyComments(head, body); - } else { - body = func.body; - } - const newNode = factory.createArrowFunction(func.modifiers, func.typeParameters, func.parameters, func.type, factory.createToken(39 /* EqualsGreaterThanToken */), body); - return ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(file, func, newNode)); - } - function canBeConvertedToExpression(body, head) { - return body.statements.length === 1 && (isReturnStatement(head) && !!head.expression); - } - function isFunctionReferencedInFile(sourceFile, typeChecker, node) { - return !!node.name && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(node.name, typeChecker, sourceFile); - } - var refactorName8, refactorDescription4, toAnonymousFunctionAction, toNamedFunctionAction, toArrowFunctionAction; - var init_convertArrowFunctionOrFunctionExpression = __esm({ - "src/services/refactors/convertArrowFunctionOrFunctionExpression.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName8 = "Convert arrow function or function expression"; - refactorDescription4 = getLocaleSpecificMessage(Diagnostics.Convert_arrow_function_or_function_expression); - toAnonymousFunctionAction = { - name: "Convert to anonymous function", - description: getLocaleSpecificMessage(Diagnostics.Convert_to_anonymous_function), - kind: "refactor.rewrite.function.anonymous" - }; - toNamedFunctionAction = { - name: "Convert to named function", - description: getLocaleSpecificMessage(Diagnostics.Convert_to_named_function), - kind: "refactor.rewrite.function.named" - }; - toArrowFunctionAction = { - name: "Convert to arrow function", - description: getLocaleSpecificMessage(Diagnostics.Convert_to_arrow_function), - kind: "refactor.rewrite.function.arrow" - }; - registerRefactor(refactorName8, { - kinds: [ - toAnonymousFunctionAction.kind, - toNamedFunctionAction.kind, - toArrowFunctionAction.kind - ], - getEditsForAction: getRefactorEditsToConvertFunctionExpressions, - getAvailableActions: getRefactorActionsToConvertFunctionExpressions - }); - } - }); - - // src/services/_namespaces/ts.refactor.convertArrowFunctionOrFunctionExpression.ts - var ts_refactor_convertArrowFunctionOrFunctionExpression_exports = {}; - var init_ts_refactor_convertArrowFunctionOrFunctionExpression = __esm({ - "src/services/_namespaces/ts.refactor.convertArrowFunctionOrFunctionExpression.ts"() { - "use strict"; - init_convertArrowFunctionOrFunctionExpression(); - } - }); - - // src/services/refactors/convertParamsToDestructuredObject.ts - function getRefactorActionsToConvertParametersToDestructuredObject(context) { - const { file, startPosition } = context; - const isJSFile = isSourceFileJS(file); - if (isJSFile) - return emptyArray; - const functionDeclaration = getFunctionDeclarationAtPosition(file, startPosition, context.program.getTypeChecker()); - if (!functionDeclaration) - return emptyArray; - return [{ - name: refactorName9, - description: refactorDescription5, - actions: [toDestructuredAction] - }]; - } - function getRefactorEditsToConvertParametersToDestructuredObject(context, actionName2) { - Debug.assert(actionName2 === refactorName9, "Unexpected action name"); - const { file, startPosition, program, cancellationToken, host } = context; - const functionDeclaration = getFunctionDeclarationAtPosition(file, startPosition, program.getTypeChecker()); - if (!functionDeclaration || !cancellationToken) - return void 0; - const groupedReferences = getGroupedReferences(functionDeclaration, program, cancellationToken); - if (groupedReferences.valid) { - const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange5(file, program, host, t, functionDeclaration, groupedReferences)); - return { renameFilename: void 0, renameLocation: void 0, edits }; - } - return { edits: [] }; - } - function doChange5(sourceFile, program, host, changes, functionDeclaration, groupedReferences) { - const signature = groupedReferences.signature; - const newFunctionDeclarationParams = map(createNewParameters(functionDeclaration, program, host), (param) => getSynthesizedDeepClone(param)); - if (signature) { - const newSignatureParams = map(createNewParameters(signature, program, host), (param) => getSynthesizedDeepClone(param)); - replaceParameters(signature, newSignatureParams); - } - replaceParameters(functionDeclaration, newFunctionDeclarationParams); - const functionCalls = sortAndDeduplicate( - groupedReferences.functionCalls, - /*comparer*/ - (a, b) => compareValues(a.pos, b.pos) - ); - for (const call of functionCalls) { - if (call.arguments && call.arguments.length) { - const newArgument = getSynthesizedDeepClone( - createNewArgument(functionDeclaration, call.arguments), - /*includeTrivia*/ - true - ); - changes.replaceNodeRange( - getSourceFileOfNode(call), - first(call.arguments), - last(call.arguments), - newArgument, - { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include } - ); - } - } - function replaceParameters(declarationOrSignature, parameterDeclarations) { - changes.replaceNodeRangeWithNodes( - sourceFile, - first(declarationOrSignature.parameters), - last(declarationOrSignature.parameters), - parameterDeclarations, - { - joiner: ", ", - // indentation is set to 0 because otherwise the object parameter will be indented if there is a `this` parameter - indentation: 0, - leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll, - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include - } - ); - } - } - function getGroupedReferences(functionDeclaration, program, cancellationToken) { - const functionNames = getFunctionNames(functionDeclaration); - const classNames = isConstructorDeclaration(functionDeclaration) ? getClassNames(functionDeclaration) : []; - const names = deduplicate([...functionNames, ...classNames], equateValues); - const checker = program.getTypeChecker(); - const references = flatMap( - names, - /*mapfn*/ - (name) => ts_FindAllReferences_exports.getReferenceEntriesForNode(-1, name, program, program.getSourceFiles(), cancellationToken) - ); - const groupedReferences = groupReferences(references); - if (!every( - groupedReferences.declarations, - /*callback*/ - (decl) => contains(names, decl) - )) { - groupedReferences.valid = false; - } - return groupedReferences; - function groupReferences(referenceEntries) { - const classReferences = { accessExpressions: [], typeUsages: [] }; - const groupedReferences2 = { functionCalls: [], declarations: [], classReferences, valid: true }; - const functionSymbols = map(functionNames, getSymbolTargetAtLocation); - const classSymbols = map(classNames, getSymbolTargetAtLocation); - const isConstructor = isConstructorDeclaration(functionDeclaration); - const contextualSymbols = map(functionNames, (name) => getSymbolForContextualType(name, checker)); - for (const entry of referenceEntries) { - if (entry.kind === ts_FindAllReferences_exports.EntryKind.Span) { - groupedReferences2.valid = false; - continue; - } - if (contains(contextualSymbols, getSymbolTargetAtLocation(entry.node))) { - if (isValidMethodSignature(entry.node.parent)) { - groupedReferences2.signature = entry.node.parent; - continue; - } - const call = entryToFunctionCall(entry); - if (call) { - groupedReferences2.functionCalls.push(call); - continue; - } - } - const contextualSymbol = getSymbolForContextualType(entry.node, checker); - if (contextualSymbol && contains(contextualSymbols, contextualSymbol)) { - const decl = entryToDeclaration(entry); - if (decl) { - groupedReferences2.declarations.push(decl); - continue; - } - } - if (contains(functionSymbols, getSymbolTargetAtLocation(entry.node)) || isNewExpressionTarget(entry.node)) { - const importOrExportReference = entryToImportOrExport(entry); - if (importOrExportReference) { - continue; - } - const decl = entryToDeclaration(entry); - if (decl) { - groupedReferences2.declarations.push(decl); - continue; - } - const call = entryToFunctionCall(entry); - if (call) { - groupedReferences2.functionCalls.push(call); - continue; - } - } - if (isConstructor && contains(classSymbols, getSymbolTargetAtLocation(entry.node))) { - const importOrExportReference = entryToImportOrExport(entry); - if (importOrExportReference) { - continue; - } - const decl = entryToDeclaration(entry); - if (decl) { - groupedReferences2.declarations.push(decl); - continue; - } - const accessExpression = entryToAccessExpression(entry); - if (accessExpression) { - classReferences.accessExpressions.push(accessExpression); - continue; - } - if (isClassDeclaration(functionDeclaration.parent)) { - const type = entryToType(entry); - if (type) { - classReferences.typeUsages.push(type); - continue; - } - } - } - groupedReferences2.valid = false; - } - return groupedReferences2; - } - function getSymbolTargetAtLocation(node) { - const symbol = checker.getSymbolAtLocation(node); - return symbol && getSymbolTarget(symbol, checker); - } - } - function getSymbolForContextualType(node, checker) { - const element = getContainingObjectLiteralElement(node); - if (element) { - const contextualType = checker.getContextualTypeForObjectLiteralElement(element); - const symbol = contextualType == null ? void 0 : contextualType.getSymbol(); - if (symbol && !(getCheckFlags(symbol) & 6 /* Synthetic */)) { - return symbol; - } - } - } - function entryToImportOrExport(entry) { - const node = entry.node; - if (isImportSpecifier(node.parent) || isImportClause(node.parent) || isImportEqualsDeclaration(node.parent) || isNamespaceImport(node.parent)) { - return node; - } - if (isExportSpecifier(node.parent) || isExportAssignment(node.parent)) { - return node; - } - return void 0; - } - function entryToDeclaration(entry) { - if (isDeclaration(entry.node.parent)) { - return entry.node; - } - return void 0; - } - function entryToFunctionCall(entry) { - if (entry.node.parent) { - const functionReference = entry.node; - const parent2 = functionReference.parent; - switch (parent2.kind) { - case 213 /* CallExpression */: - case 214 /* NewExpression */: - const callOrNewExpression = tryCast(parent2, isCallOrNewExpression); - if (callOrNewExpression && callOrNewExpression.expression === functionReference) { - return callOrNewExpression; - } - break; - case 211 /* PropertyAccessExpression */: - const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); - if (propertyAccessExpression && propertyAccessExpression.parent && propertyAccessExpression.name === functionReference) { - const callOrNewExpression2 = tryCast(propertyAccessExpression.parent, isCallOrNewExpression); - if (callOrNewExpression2 && callOrNewExpression2.expression === propertyAccessExpression) { - return callOrNewExpression2; - } - } - break; - case 212 /* ElementAccessExpression */: - const elementAccessExpression = tryCast(parent2, isElementAccessExpression); - if (elementAccessExpression && elementAccessExpression.parent && elementAccessExpression.argumentExpression === functionReference) { - const callOrNewExpression2 = tryCast(elementAccessExpression.parent, isCallOrNewExpression); - if (callOrNewExpression2 && callOrNewExpression2.expression === elementAccessExpression) { - return callOrNewExpression2; - } - } - break; - } - } - return void 0; - } - function entryToAccessExpression(entry) { - if (entry.node.parent) { - const reference = entry.node; - const parent2 = reference.parent; - switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: - const propertyAccessExpression = tryCast(parent2, isPropertyAccessExpression); - if (propertyAccessExpression && propertyAccessExpression.expression === reference) { - return propertyAccessExpression; - } - break; - case 212 /* ElementAccessExpression */: - const elementAccessExpression = tryCast(parent2, isElementAccessExpression); - if (elementAccessExpression && elementAccessExpression.expression === reference) { - return elementAccessExpression; - } - break; - } - } - return void 0; - } - function entryToType(entry) { - const reference = entry.node; - if (getMeaningFromLocation(reference) === 2 /* Type */ || isExpressionWithTypeArgumentsInClassExtendsClause(reference.parent)) { - return reference; - } - return void 0; - } - function getFunctionDeclarationAtPosition(file, startPosition, checker) { - const node = getTouchingToken(file, startPosition); - const functionDeclaration = getContainingFunctionDeclaration(node); - if (isTopLevelJSDoc(node)) - return void 0; - if (functionDeclaration && isValidFunctionDeclaration(functionDeclaration, checker) && rangeContainsRange(functionDeclaration, node) && !(functionDeclaration.body && rangeContainsRange(functionDeclaration.body, node))) - return functionDeclaration; - return void 0; - } - function isTopLevelJSDoc(node) { - const containingJSDoc = findAncestor(node, isJSDocNode); - if (containingJSDoc) { - const containingNonJSDoc = findAncestor(containingJSDoc, (n) => !isJSDocNode(n)); - return !!containingNonJSDoc && isFunctionLikeDeclaration(containingNonJSDoc); - } - return false; - } - function isValidMethodSignature(node) { - return isMethodSignature(node) && (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)); - } - function isValidFunctionDeclaration(functionDeclaration, checker) { - var _a; - if (!isValidParameterNodeArray(functionDeclaration.parameters, checker)) - return false; - switch (functionDeclaration.kind) { - case 262 /* FunctionDeclaration */: - return hasNameOrDefault(functionDeclaration) && isSingleImplementation(functionDeclaration, checker); - case 174 /* MethodDeclaration */: - if (isObjectLiteralExpression(functionDeclaration.parent)) { - const contextualSymbol = getSymbolForContextualType(functionDeclaration.name, checker); - return ((_a = contextualSymbol == null ? void 0 : contextualSymbol.declarations) == null ? void 0 : _a.length) === 1 && isSingleImplementation(functionDeclaration, checker); - } - return isSingleImplementation(functionDeclaration, checker); - case 176 /* Constructor */: - if (isClassDeclaration(functionDeclaration.parent)) { - return hasNameOrDefault(functionDeclaration.parent) && isSingleImplementation(functionDeclaration, checker); - } else { - return isValidVariableDeclaration(functionDeclaration.parent.parent) && isSingleImplementation(functionDeclaration, checker); - } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return isValidVariableDeclaration(functionDeclaration.parent); - } - return false; - } - function isSingleImplementation(functionDeclaration, checker) { - return !!functionDeclaration.body && !checker.isImplementationOfOverload(functionDeclaration); - } - function hasNameOrDefault(functionOrClassDeclaration) { - if (!functionOrClassDeclaration.name) { - const defaultKeyword = findModifier(functionOrClassDeclaration, 90 /* DefaultKeyword */); - return !!defaultKeyword; - } - return true; - } - function isValidParameterNodeArray(parameters, checker) { - return getRefactorableParametersLength(parameters) >= minimumParameterLength && every( - parameters, - /*callback*/ - (paramDecl) => isValidParameterDeclaration(paramDecl, checker) - ); - } - function isValidParameterDeclaration(parameterDeclaration, checker) { - if (isRestParameter(parameterDeclaration)) { - const type = checker.getTypeAtLocation(parameterDeclaration); - if (!checker.isArrayType(type) && !checker.isTupleType(type)) - return false; - } - return !parameterDeclaration.modifiers && isIdentifier(parameterDeclaration.name); - } - function isValidVariableDeclaration(node) { - return isVariableDeclaration(node) && isVarConst(node) && isIdentifier(node.name) && !node.type; - } - function hasThisParameter(parameters) { - return parameters.length > 0 && isThis(parameters[0].name); - } - function getRefactorableParametersLength(parameters) { - if (hasThisParameter(parameters)) { - return parameters.length - 1; - } - return parameters.length; - } - function getRefactorableParameters(parameters) { - if (hasThisParameter(parameters)) { - parameters = factory.createNodeArray(parameters.slice(1), parameters.hasTrailingComma); - } - return parameters; - } - function createPropertyOrShorthandAssignment(name, initializer) { - if (isIdentifier(initializer) && getTextOfIdentifierOrLiteral(initializer) === name) { - return factory.createShorthandPropertyAssignment(name); - } - return factory.createPropertyAssignment(name, initializer); - } - function createNewArgument(functionDeclaration, functionArguments) { - const parameters = getRefactorableParameters(functionDeclaration.parameters); - const hasRestParameter2 = isRestParameter(last(parameters)); - const nonRestArguments = hasRestParameter2 ? functionArguments.slice(0, parameters.length - 1) : functionArguments; - const properties = map(nonRestArguments, (arg, i) => { - const parameterName = getParameterName(parameters[i]); - const property = createPropertyOrShorthandAssignment(parameterName, arg); - suppressLeadingAndTrailingTrivia(property.name); - if (isPropertyAssignment(property)) - suppressLeadingAndTrailingTrivia(property.initializer); - copyComments(arg, property); - return property; - }); - if (hasRestParameter2 && functionArguments.length >= parameters.length) { - const restArguments = functionArguments.slice(parameters.length - 1); - const restProperty = factory.createPropertyAssignment(getParameterName(last(parameters)), factory.createArrayLiteralExpression(restArguments)); - properties.push(restProperty); - } - const objectLiteral = factory.createObjectLiteralExpression( - properties, - /*multiLine*/ - false - ); - return objectLiteral; - } - function createNewParameters(functionDeclaration, program, host) { - const checker = program.getTypeChecker(); - const refactorableParameters = getRefactorableParameters(functionDeclaration.parameters); - const bindingElements = map(refactorableParameters, createBindingElementFromParameterDeclaration); - const objectParameterName = factory.createObjectBindingPattern(bindingElements); - const objectParameterType = createParameterTypeNode(refactorableParameters); - let objectInitializer; - if (every(refactorableParameters, isOptionalParameter)) { - objectInitializer = factory.createObjectLiteralExpression(); - } - const objectParameter = factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - objectParameterName, - /*questionToken*/ - void 0, - objectParameterType, - objectInitializer - ); - if (hasThisParameter(functionDeclaration.parameters)) { - const thisParameter = functionDeclaration.parameters[0]; - const newThisParameter = factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - thisParameter.name, - /*questionToken*/ - void 0, - thisParameter.type - ); - suppressLeadingAndTrailingTrivia(newThisParameter.name); - copyComments(thisParameter.name, newThisParameter.name); - if (thisParameter.type) { - suppressLeadingAndTrailingTrivia(newThisParameter.type); - copyComments(thisParameter.type, newThisParameter.type); - } - return factory.createNodeArray([newThisParameter, objectParameter]); - } - return factory.createNodeArray([objectParameter]); - function createBindingElementFromParameterDeclaration(parameterDeclaration) { - const element = factory.createBindingElement( - /*dotDotDotToken*/ - void 0, - /*propertyName*/ - void 0, - getParameterName(parameterDeclaration), - isRestParameter(parameterDeclaration) && isOptionalParameter(parameterDeclaration) ? factory.createArrayLiteralExpression() : parameterDeclaration.initializer - ); - suppressLeadingAndTrailingTrivia(element); - if (parameterDeclaration.initializer && element.initializer) { - copyComments(parameterDeclaration.initializer, element.initializer); - } - return element; - } - function createParameterTypeNode(parameters) { - const members = map(parameters, createPropertySignatureFromParameterDeclaration); - const typeNode = addEmitFlags(factory.createTypeLiteralNode(members), 1 /* SingleLine */); - return typeNode; - } - function createPropertySignatureFromParameterDeclaration(parameterDeclaration) { - let parameterType = parameterDeclaration.type; - if (!parameterType && (parameterDeclaration.initializer || isRestParameter(parameterDeclaration))) { - parameterType = getTypeNode3(parameterDeclaration); - } - const propertySignature = factory.createPropertySignature( - /*modifiers*/ - void 0, - getParameterName(parameterDeclaration), - isOptionalParameter(parameterDeclaration) ? factory.createToken(58 /* QuestionToken */) : parameterDeclaration.questionToken, - parameterType - ); - suppressLeadingAndTrailingTrivia(propertySignature); - copyComments(parameterDeclaration.name, propertySignature.name); - if (parameterDeclaration.type && propertySignature.type) { - copyComments(parameterDeclaration.type, propertySignature.type); - } - return propertySignature; - } - function getTypeNode3(node) { - const type = checker.getTypeAtLocation(node); - return getTypeNodeIfAccessible(type, node, program, host); - } - function isOptionalParameter(parameterDeclaration) { - if (isRestParameter(parameterDeclaration)) { - const type = checker.getTypeAtLocation(parameterDeclaration); - return !checker.isTupleType(type); - } - return checker.isOptionalParameter(parameterDeclaration); - } - } - function getParameterName(paramDeclaration) { - return getTextOfIdentifierOrLiteral(paramDeclaration.name); - } - function getClassNames(constructorDeclaration) { - switch (constructorDeclaration.parent.kind) { - case 263 /* ClassDeclaration */: - const classDeclaration = constructorDeclaration.parent; - if (classDeclaration.name) - return [classDeclaration.name]; - const defaultModifier = Debug.checkDefined( - findModifier(classDeclaration, 90 /* DefaultKeyword */), - "Nameless class declaration should be a default export" - ); - return [defaultModifier]; - case 231 /* ClassExpression */: - const classExpression = constructorDeclaration.parent; - const variableDeclaration = constructorDeclaration.parent.parent; - const className = classExpression.name; - if (className) - return [className, variableDeclaration.name]; - return [variableDeclaration.name]; - } - } - function getFunctionNames(functionDeclaration) { - switch (functionDeclaration.kind) { - case 262 /* FunctionDeclaration */: - if (functionDeclaration.name) - return [functionDeclaration.name]; - const defaultModifier = Debug.checkDefined( - findModifier(functionDeclaration, 90 /* DefaultKeyword */), - "Nameless function declaration should be a default export" - ); - return [defaultModifier]; - case 174 /* MethodDeclaration */: - return [functionDeclaration.name]; - case 176 /* Constructor */: - const ctrKeyword = Debug.checkDefined( - findChildOfKind(functionDeclaration, 137 /* ConstructorKeyword */, functionDeclaration.getSourceFile()), - "Constructor declaration should have constructor keyword" - ); - if (functionDeclaration.parent.kind === 231 /* ClassExpression */) { - const variableDeclaration = functionDeclaration.parent.parent; - return [variableDeclaration.name, ctrKeyword]; - } - return [ctrKeyword]; - case 219 /* ArrowFunction */: - return [functionDeclaration.parent.name]; - case 218 /* FunctionExpression */: - if (functionDeclaration.name) - return [functionDeclaration.name, functionDeclaration.parent.name]; - return [functionDeclaration.parent.name]; - default: - return Debug.assertNever(functionDeclaration, `Unexpected function declaration kind ${functionDeclaration.kind}`); - } - } - var refactorName9, minimumParameterLength, refactorDescription5, toDestructuredAction; - var init_convertParamsToDestructuredObject = __esm({ - "src/services/refactors/convertParamsToDestructuredObject.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName9 = "Convert parameters to destructured object"; - minimumParameterLength = 1; - refactorDescription5 = getLocaleSpecificMessage(Diagnostics.Convert_parameters_to_destructured_object); - toDestructuredAction = { - name: refactorName9, - description: refactorDescription5, - kind: "refactor.rewrite.parameters.toDestructured" - }; - registerRefactor(refactorName9, { - kinds: [toDestructuredAction.kind], - getEditsForAction: getRefactorEditsToConvertParametersToDestructuredObject, - getAvailableActions: getRefactorActionsToConvertParametersToDestructuredObject - }); - } - }); - - // src/services/_namespaces/ts.refactor.convertParamsToDestructuredObject.ts - var ts_refactor_convertParamsToDestructuredObject_exports = {}; - var init_ts_refactor_convertParamsToDestructuredObject = __esm({ - "src/services/_namespaces/ts.refactor.convertParamsToDestructuredObject.ts"() { - "use strict"; - init_convertParamsToDestructuredObject(); - } - }); - - // src/services/refactors/convertStringOrTemplateLiteral.ts - function getRefactorActionsToConvertToTemplateString(context) { - const { file, startPosition } = context; - const node = getNodeOrParentOfParentheses(file, startPosition); - const maybeBinary = getParentBinaryExpression(node); - const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] }; - if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) { - refactorInfo.actions.push(convertStringAction); - return [refactorInfo]; - } else if (context.preferences.provideRefactorNotApplicableReason) { - refactorInfo.actions.push({ - ...convertStringAction, - notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation) - }); - return [refactorInfo]; - } - return emptyArray; - } - function getNodeOrParentOfParentheses(file, startPosition) { - const node = getTokenAtPosition(file, startPosition); - const nestedBinary = getParentBinaryExpression(node); - const isNonStringBinary = !treeToArray(nestedBinary).isValidConcatenation; - if (isNonStringBinary && isParenthesizedExpression(nestedBinary.parent) && isBinaryExpression(nestedBinary.parent.parent)) { - return nestedBinary.parent.parent; - } - return node; - } - function getRefactorEditsToConvertToTemplateString(context, actionName2) { - const { file, startPosition } = context; - const node = getNodeOrParentOfParentheses(file, startPosition); - switch (actionName2) { - case refactorDescription6: - return { edits: getEditsForToTemplateLiteral(context, node) }; - default: - return Debug.fail("invalid action"); - } - } - function getEditsForToTemplateLiteral(context, node) { - const maybeBinary = getParentBinaryExpression(node); - const file = context.file; - const templateLiteral = nodesToTemplate(treeToArray(maybeBinary), file); - const trailingCommentRanges = getTrailingCommentRanges(file.text, maybeBinary.end); - if (trailingCommentRanges) { - const lastComment = trailingCommentRanges[trailingCommentRanges.length - 1]; - const trailingRange = { pos: trailingCommentRanges[0].pos, end: lastComment.end }; - return ts_textChanges_exports.ChangeTracker.with(context, (t) => { - t.deleteRange(file, trailingRange); - t.replaceNode(file, maybeBinary, templateLiteral); - }); - } else { - return ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(file, maybeBinary, templateLiteral)); - } - } - function isNotEqualsOperator(node) { - return !(node.operatorToken.kind === 64 /* EqualsToken */ || node.operatorToken.kind === 65 /* PlusEqualsToken */); - } - function getParentBinaryExpression(expr) { - const container = findAncestor(expr.parent, (n) => { - switch (n.kind) { - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - return false; - case 228 /* TemplateExpression */: - case 226 /* BinaryExpression */: - return !(isBinaryExpression(n.parent) && isNotEqualsOperator(n.parent)); - default: - return "quit"; - } - }); - return container || expr; - } - function treeToArray(current) { - const loop = (current2) => { - if (!isBinaryExpression(current2)) { - return { - nodes: [current2], - operators: [], - validOperators: true, - hasString: isStringLiteral(current2) || isNoSubstitutionTemplateLiteral(current2) - }; - } - const { nodes: nodes2, operators: operators2, hasString: leftHasString, validOperators: leftOperatorValid } = loop(current2.left); - if (!(leftHasString || isStringLiteral(current2.right) || isTemplateExpression(current2.right))) { - return { nodes: [current2], operators: [], hasString: false, validOperators: true }; - } - const currentOperatorValid = current2.operatorToken.kind === 40 /* PlusToken */; - const validOperators2 = leftOperatorValid && currentOperatorValid; - nodes2.push(current2.right); - operators2.push(current2.operatorToken); - return { nodes: nodes2, operators: operators2, hasString: true, validOperators: validOperators2 }; - }; - const { nodes, operators, validOperators, hasString } = loop(current); - return { nodes, operators, isValidConcatenation: validOperators && hasString }; - } - function escapeRawStringForTemplate(s) { - return s.replace(/\\.|[$`]/g, (m) => m[0] === "\\" ? m : "\\" + m); - } - function getRawTextOfTemplate(node) { - const rightShaving = isTemplateHead(node) || isTemplateMiddle(node) ? -2 : -1; - return getTextOfNode(node).slice(1, rightShaving); - } - function concatConsecutiveString(index, nodes) { - const indexes = []; - let text = "", rawText = ""; - while (index < nodes.length) { - const node = nodes[index]; - if (isStringLiteralLike(node)) { - text += node.text; - rawText += escapeRawStringForTemplate(getTextOfNode(node).slice(1, -1)); - indexes.push(index); - index++; - } else if (isTemplateExpression(node)) { - text += node.head.text; - rawText += getRawTextOfTemplate(node.head); - break; - } else { - break; - } - } - return [index, text, rawText, indexes]; - } - function nodesToTemplate({ nodes, operators }, file) { - const copyOperatorComments = copyTrailingOperatorComments(operators, file); - const copyCommentFromStringLiterals = copyCommentFromMultiNode(nodes, file, copyOperatorComments); - const [begin, headText, rawHeadText, headIndexes] = concatConsecutiveString(0, nodes); - if (begin === nodes.length) { - const noSubstitutionTemplateLiteral = factory.createNoSubstitutionTemplateLiteral(headText, rawHeadText); - copyCommentFromStringLiterals(headIndexes, noSubstitutionTemplateLiteral); - return noSubstitutionTemplateLiteral; - } - const templateSpans = []; - const templateHead = factory.createTemplateHead(headText, rawHeadText); - copyCommentFromStringLiterals(headIndexes, templateHead); - for (let i = begin; i < nodes.length; i++) { - const currentNode = getExpressionFromParenthesesOrExpression(nodes[i]); - copyOperatorComments(i, currentNode); - const [newIndex, subsequentText, rawSubsequentText, stringIndexes] = concatConsecutiveString(i + 1, nodes); - i = newIndex - 1; - const isLast = i === nodes.length - 1; - if (isTemplateExpression(currentNode)) { - const spans = map(currentNode.templateSpans, (span, index) => { - copyExpressionComments(span); - const isLastSpan = index === currentNode.templateSpans.length - 1; - const text = span.literal.text + (isLastSpan ? subsequentText : ""); - const rawText = getRawTextOfTemplate(span.literal) + (isLastSpan ? rawSubsequentText : ""); - return factory.createTemplateSpan(span.expression, isLast && isLastSpan ? factory.createTemplateTail(text, rawText) : factory.createTemplateMiddle(text, rawText)); - }); - templateSpans.push(...spans); - } else { - const templatePart = isLast ? factory.createTemplateTail(subsequentText, rawSubsequentText) : factory.createTemplateMiddle(subsequentText, rawSubsequentText); - copyCommentFromStringLiterals(stringIndexes, templatePart); - templateSpans.push(factory.createTemplateSpan(currentNode, templatePart)); - } - } - return factory.createTemplateExpression(templateHead, templateSpans); - } - function copyExpressionComments(node) { - const file = node.getSourceFile(); - copyTrailingComments( - node, - node.expression, - file, - 3 /* MultiLineCommentTrivia */, - /*hasTrailingNewLine*/ - false - ); - copyTrailingAsLeadingComments( - node.expression, - node.expression, - file, - 3 /* MultiLineCommentTrivia */, - /*hasTrailingNewLine*/ - false - ); - } - function getExpressionFromParenthesesOrExpression(node) { - if (isParenthesizedExpression(node)) { - copyExpressionComments(node); - node = node.expression; - } - return node; - } - var refactorName10, refactorDescription6, convertStringAction, copyTrailingOperatorComments, copyCommentFromMultiNode; - var init_convertStringOrTemplateLiteral = __esm({ - "src/services/refactors/convertStringOrTemplateLiteral.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName10 = "Convert to template string"; - refactorDescription6 = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string); - convertStringAction = { - name: refactorName10, - description: refactorDescription6, - kind: "refactor.rewrite.string" - }; - registerRefactor(refactorName10, { - kinds: [convertStringAction.kind], - getEditsForAction: getRefactorEditsToConvertToTemplateString, - getAvailableActions: getRefactorActionsToConvertToTemplateString - }); - copyTrailingOperatorComments = (operators, file) => (index, targetNode) => { - if (index < operators.length) { - copyTrailingComments( - operators[index], - targetNode, - file, - 3 /* MultiLineCommentTrivia */, - /*hasTrailingNewLine*/ - false - ); - } - }; - copyCommentFromMultiNode = (nodes, file, copyOperatorComments) => (indexes, targetNode) => { - while (indexes.length > 0) { - const index = indexes.shift(); - copyTrailingComments( - nodes[index], - targetNode, - file, - 3 /* MultiLineCommentTrivia */, - /*hasTrailingNewLine*/ - false - ); - copyOperatorComments(index, targetNode); - } - }; - } - }); - - // src/services/_namespaces/ts.refactor.convertStringOrTemplateLiteral.ts - var ts_refactor_convertStringOrTemplateLiteral_exports = {}; - var init_ts_refactor_convertStringOrTemplateLiteral = __esm({ - "src/services/_namespaces/ts.refactor.convertStringOrTemplateLiteral.ts"() { - "use strict"; - init_convertStringOrTemplateLiteral(); - } - }); - - // src/services/refactors/convertToOptionalChainExpression.ts - function getRefactorActionsToConvertToOptionalChain(context) { - const info = getInfo3(context, context.triggerReason === "invoked"); - if (!info) - return emptyArray; - if (!isRefactorErrorInfo(info)) { - return [{ - name: refactorName11, - description: convertToOptionalChainExpressionMessage, - actions: [toOptionalChainAction] - }]; - } - if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorName11, - description: convertToOptionalChainExpressionMessage, - actions: [{ ...toOptionalChainAction, notApplicableReason: info.error }] - }]; - } - return emptyArray; - } - function getRefactorEditsToConvertToOptionalChain(context, actionName2) { - const info = getInfo3(context); - Debug.assert(info && !isRefactorErrorInfo(info), "Expected applicable refactor info"); - const edits = ts_textChanges_exports.ChangeTracker.with( - context, - (t) => doChange6(context.file, context.program.getTypeChecker(), t, info, actionName2) - ); - return { edits, renameFilename: void 0, renameLocation: void 0 }; - } - function isValidExpression(node) { - return isBinaryExpression(node) || isConditionalExpression(node); - } - function isValidStatement(node) { - return isExpressionStatement(node) || isReturnStatement(node) || isVariableStatement(node); - } - function isValidExpressionOrStatement(node) { - return isValidExpression(node) || isValidStatement(node); - } - function getInfo3(context, considerEmptySpans = true) { - const { file, program } = context; - const span = getRefactorContextSpan(context); - const forEmptySpan = span.length === 0; - if (forEmptySpan && !considerEmptySpans) - return void 0; - const startToken = getTokenAtPosition(file, span.start); - const endToken = findTokenOnLeftOfPosition(file, span.start + span.length); - const adjustedSpan = createTextSpanFromBounds(startToken.pos, endToken && endToken.end >= startToken.pos ? endToken.getEnd() : startToken.getEnd()); - const parent2 = forEmptySpan ? getValidParentNodeOfEmptySpan(startToken) : getValidParentNodeContainingSpan(startToken, adjustedSpan); - const expression = parent2 && isValidExpressionOrStatement(parent2) ? getExpression(parent2) : void 0; - if (!expression) - return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) }; - const checker = program.getTypeChecker(); - return isConditionalExpression(expression) ? getConditionalInfo(expression, checker) : getBinaryInfo(expression); - } - function getConditionalInfo(expression, checker) { - const condition = expression.condition; - const finalExpression = getFinalExpressionInChain(expression.whenTrue); - if (!finalExpression || checker.isNullableType(checker.getTypeAtLocation(finalExpression))) { - return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) }; - } - if ((isPropertyAccessExpression(condition) || isIdentifier(condition)) && getMatchingStart(condition, finalExpression.expression)) { - return { finalExpression, occurrences: [condition], expression }; - } else if (isBinaryExpression(condition)) { - const occurrences = getOccurrencesInExpression(finalExpression.expression, condition); - return occurrences ? { finalExpression, occurrences, expression } : { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_matching_access_expressions) }; - } - } - function getBinaryInfo(expression) { - if (expression.operatorToken.kind !== 56 /* AmpersandAmpersandToken */) { - return { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_logical_AND_access_chains) }; - } - const finalExpression = getFinalExpressionInChain(expression.right); - if (!finalExpression) - return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) }; - const occurrences = getOccurrencesInExpression(finalExpression.expression, expression.left); - return occurrences ? { finalExpression, occurrences, expression } : { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_matching_access_expressions) }; - } - function getOccurrencesInExpression(matchTo, expression) { - const occurrences = []; - while (isBinaryExpression(expression) && expression.operatorToken.kind === 56 /* AmpersandAmpersandToken */) { - const match = getMatchingStart(skipParentheses(matchTo), skipParentheses(expression.right)); - if (!match) { - break; - } - occurrences.push(match); - matchTo = match; - expression = expression.left; - } - const finalMatch = getMatchingStart(matchTo, expression); - if (finalMatch) { - occurrences.push(finalMatch); - } - return occurrences.length > 0 ? occurrences : void 0; - } - function getMatchingStart(chain, subchain) { - if (!isIdentifier(subchain) && !isPropertyAccessExpression(subchain) && !isElementAccessExpression(subchain)) { - return void 0; - } - return chainStartsWith(chain, subchain) ? subchain : void 0; - } - function chainStartsWith(chain, subchain) { - while (isCallExpression(chain) || isPropertyAccessExpression(chain) || isElementAccessExpression(chain)) { - if (getTextOfChainNode(chain) === getTextOfChainNode(subchain)) - break; - chain = chain.expression; - } - while (isPropertyAccessExpression(chain) && isPropertyAccessExpression(subchain) || isElementAccessExpression(chain) && isElementAccessExpression(subchain)) { - if (getTextOfChainNode(chain) !== getTextOfChainNode(subchain)) - return false; - chain = chain.expression; - subchain = subchain.expression; - } - return isIdentifier(chain) && isIdentifier(subchain) && chain.getText() === subchain.getText(); - } - function getTextOfChainNode(node) { - if (isIdentifier(node) || isStringOrNumericLiteralLike(node)) { - return node.getText(); - } - if (isPropertyAccessExpression(node)) { - return getTextOfChainNode(node.name); - } - if (isElementAccessExpression(node)) { - return getTextOfChainNode(node.argumentExpression); - } - return void 0; - } - function getValidParentNodeContainingSpan(node, span) { - while (node.parent) { - if (isValidExpressionOrStatement(node) && span.length !== 0 && node.end >= span.start + span.length) { - return node; - } - node = node.parent; - } - return void 0; - } - function getValidParentNodeOfEmptySpan(node) { - while (node.parent) { - if (isValidExpressionOrStatement(node) && !isValidExpressionOrStatement(node.parent)) { - return node; - } - node = node.parent; - } - return void 0; - } - function getExpression(node) { - if (isValidExpression(node)) { - return node; - } - if (isVariableStatement(node)) { - const variable = getSingleVariableOfVariableStatement(node); - const initializer = variable == null ? void 0 : variable.initializer; - return initializer && isValidExpression(initializer) ? initializer : void 0; - } - return node.expression && isValidExpression(node.expression) ? node.expression : void 0; - } - function getFinalExpressionInChain(node) { - node = skipParentheses(node); - if (isBinaryExpression(node)) { - return getFinalExpressionInChain(node.left); - } else if ((isPropertyAccessExpression(node) || isElementAccessExpression(node) || isCallExpression(node)) && !isOptionalChain(node)) { - return node; - } - return void 0; - } - function convertOccurrences(checker, toConvert, occurrences) { - if (isPropertyAccessExpression(toConvert) || isElementAccessExpression(toConvert) || isCallExpression(toConvert)) { - const chain = convertOccurrences(checker, toConvert.expression, occurrences); - const lastOccurrence = occurrences.length > 0 ? occurrences[occurrences.length - 1] : void 0; - const isOccurrence = (lastOccurrence == null ? void 0 : lastOccurrence.getText()) === toConvert.expression.getText(); - if (isOccurrence) - occurrences.pop(); - if (isCallExpression(toConvert)) { - return isOccurrence ? factory.createCallChain(chain, factory.createToken(29 /* QuestionDotToken */), toConvert.typeArguments, toConvert.arguments) : factory.createCallChain(chain, toConvert.questionDotToken, toConvert.typeArguments, toConvert.arguments); - } else if (isPropertyAccessExpression(toConvert)) { - return isOccurrence ? factory.createPropertyAccessChain(chain, factory.createToken(29 /* QuestionDotToken */), toConvert.name) : factory.createPropertyAccessChain(chain, toConvert.questionDotToken, toConvert.name); - } else if (isElementAccessExpression(toConvert)) { - return isOccurrence ? factory.createElementAccessChain(chain, factory.createToken(29 /* QuestionDotToken */), toConvert.argumentExpression) : factory.createElementAccessChain(chain, toConvert.questionDotToken, toConvert.argumentExpression); - } - } - return toConvert; - } - function doChange6(sourceFile, checker, changes, info, _actionName) { - const { finalExpression, occurrences, expression } = info; - const firstOccurrence = occurrences[occurrences.length - 1]; - const convertedChain = convertOccurrences(checker, finalExpression, occurrences); - if (convertedChain && (isPropertyAccessExpression(convertedChain) || isElementAccessExpression(convertedChain) || isCallExpression(convertedChain))) { - if (isBinaryExpression(expression)) { - changes.replaceNodeRange(sourceFile, firstOccurrence, finalExpression, convertedChain); - } else if (isConditionalExpression(expression)) { - changes.replaceNode( - sourceFile, - expression, - factory.createBinaryExpression(convertedChain, factory.createToken(61 /* QuestionQuestionToken */), expression.whenFalse) - ); - } - } - } - var refactorName11, convertToOptionalChainExpressionMessage, toOptionalChainAction; - var init_convertToOptionalChainExpression = __esm({ - "src/services/refactors/convertToOptionalChainExpression.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName11 = "Convert to optional chain expression"; - convertToOptionalChainExpressionMessage = getLocaleSpecificMessage(Diagnostics.Convert_to_optional_chain_expression); - toOptionalChainAction = { - name: refactorName11, - description: convertToOptionalChainExpressionMessage, - kind: "refactor.rewrite.expression.optionalChain" - }; - registerRefactor(refactorName11, { - kinds: [toOptionalChainAction.kind], - getEditsForAction: getRefactorEditsToConvertToOptionalChain, - getAvailableActions: getRefactorActionsToConvertToOptionalChain - }); - } - }); - - // src/services/_namespaces/ts.refactor.convertToOptionalChainExpression.ts - var ts_refactor_convertToOptionalChainExpression_exports = {}; - var init_ts_refactor_convertToOptionalChainExpression = __esm({ - "src/services/_namespaces/ts.refactor.convertToOptionalChainExpression.ts"() { - "use strict"; - init_convertToOptionalChainExpression(); - } - }); - - // src/services/refactors/extractSymbol.ts - function getRefactorActionsToExtractSymbol(context) { - const requestedRefactor = context.kind; - const rangeToExtract = getRangeToExtract2(context.file, getRefactorContextSpan(context), context.triggerReason === "invoked"); - const targetRange = rangeToExtract.targetRange; - if (targetRange === void 0) { - if (!rangeToExtract.errors || rangeToExtract.errors.length === 0 || !context.preferences.provideRefactorNotApplicableReason) { - return emptyArray; - } - const errors = []; - if (refactorKindBeginsWith(extractFunctionAction.kind, requestedRefactor)) { - errors.push({ - name: refactorName12, - description: extractFunctionAction.description, - actions: [{ ...extractFunctionAction, notApplicableReason: getStringError(rangeToExtract.errors) }] - }); - } - if (refactorKindBeginsWith(extractConstantAction.kind, requestedRefactor)) { - errors.push({ - name: refactorName12, - description: extractConstantAction.description, - actions: [{ ...extractConstantAction, notApplicableReason: getStringError(rangeToExtract.errors) }] - }); - } - return errors; - } - const extractions = getPossibleExtractions(targetRange, context); - if (extractions === void 0) { - return emptyArray; - } - const functionActions = []; - const usedFunctionNames = /* @__PURE__ */ new Map(); - let innermostErrorFunctionAction; - const constantActions = []; - const usedConstantNames = /* @__PURE__ */ new Map(); - let innermostErrorConstantAction; - let i = 0; - for (const { functionExtraction, constantExtraction } of extractions) { - if (refactorKindBeginsWith(extractFunctionAction.kind, requestedRefactor)) { - const description3 = functionExtraction.description; - if (functionExtraction.errors.length === 0) { - if (!usedFunctionNames.has(description3)) { - usedFunctionNames.set(description3, true); - functionActions.push({ - description: description3, - name: `function_scope_${i}`, - kind: extractFunctionAction.kind - }); - } - } else if (!innermostErrorFunctionAction) { - innermostErrorFunctionAction = { - description: description3, - name: `function_scope_${i}`, - notApplicableReason: getStringError(functionExtraction.errors), - kind: extractFunctionAction.kind - }; - } - } - if (refactorKindBeginsWith(extractConstantAction.kind, requestedRefactor)) { - const description3 = constantExtraction.description; - if (constantExtraction.errors.length === 0) { - if (!usedConstantNames.has(description3)) { - usedConstantNames.set(description3, true); - constantActions.push({ - description: description3, - name: `constant_scope_${i}`, - kind: extractConstantAction.kind - }); - } - } else if (!innermostErrorConstantAction) { - innermostErrorConstantAction = { - description: description3, - name: `constant_scope_${i}`, - notApplicableReason: getStringError(constantExtraction.errors), - kind: extractConstantAction.kind - }; - } - } - i++; - } - const infos = []; - if (functionActions.length) { - infos.push({ - name: refactorName12, - description: getLocaleSpecificMessage(Diagnostics.Extract_function), - actions: functionActions - }); - } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorFunctionAction) { - infos.push({ - name: refactorName12, - description: getLocaleSpecificMessage(Diagnostics.Extract_function), - actions: [innermostErrorFunctionAction] - }); - } - if (constantActions.length) { - infos.push({ - name: refactorName12, - description: getLocaleSpecificMessage(Diagnostics.Extract_constant), - actions: constantActions - }); - } else if (context.preferences.provideRefactorNotApplicableReason && innermostErrorConstantAction) { - infos.push({ - name: refactorName12, - description: getLocaleSpecificMessage(Diagnostics.Extract_constant), - actions: [innermostErrorConstantAction] - }); - } - return infos.length ? infos : emptyArray; - function getStringError(errors) { - let error2 = errors[0].messageText; - if (typeof error2 !== "string") { - error2 = error2.messageText; - } - return error2; - } - } - function getRefactorEditsToExtractSymbol(context, actionName2) { - const rangeToExtract = getRangeToExtract2(context.file, getRefactorContextSpan(context)); - const targetRange = rangeToExtract.targetRange; - const parsedFunctionIndexMatch = /^function_scope_(\d+)$/.exec(actionName2); - if (parsedFunctionIndexMatch) { - const index = +parsedFunctionIndexMatch[1]; - Debug.assert(isFinite(index), "Expected to parse a finite number from the function scope index"); - return getFunctionExtractionAtIndex(targetRange, context, index); - } - const parsedConstantIndexMatch = /^constant_scope_(\d+)$/.exec(actionName2); - if (parsedConstantIndexMatch) { - const index = +parsedConstantIndexMatch[1]; - Debug.assert(isFinite(index), "Expected to parse a finite number from the constant scope index"); - return getConstantExtractionAtIndex(targetRange, context, index); - } - Debug.fail("Unrecognized action name"); - } - function getRangeToExtract2(sourceFile, span, invoked = true) { - const { length: length2 } = span; - if (length2 === 0 && !invoked) { - return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractEmpty)] }; - } - const cursorRequest = length2 === 0 && invoked; - const startToken = findFirstNonJsxWhitespaceToken(sourceFile, span.start); - const endToken = findTokenOnLeftOfPosition(sourceFile, textSpanEnd(span)); - const adjustedSpan = startToken && endToken && invoked ? getAdjustedSpanFromNodes(startToken, endToken, sourceFile) : span; - const start = cursorRequest ? getExtractableParent(startToken) : getParentNodeInSpan(startToken, sourceFile, adjustedSpan); - const end = cursorRequest ? start : getParentNodeInSpan(endToken, sourceFile, adjustedSpan); - let rangeFacts = 0 /* None */; - let thisNode; - if (!start || !end) { - return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] }; - } - if (start.flags & 16777216 /* JSDoc */) { - return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractJSDoc)] }; - } - if (start.parent !== end.parent) { - return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] }; - } - if (start !== end) { - if (!isBlockLike(start.parent)) { - return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] }; - } - const statements = []; - for (const statement of start.parent.statements) { - if (statement === start || statements.length) { - const errors2 = checkNode(statement); - if (errors2) { - return { errors: errors2 }; - } - statements.push(statement); - } - if (statement === end) { - break; - } - } - if (!statements.length) { - return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] }; - } - return { targetRange: { range: statements, facts: rangeFacts, thisNode } }; - } - if (isReturnStatement(start) && !start.expression) { - return { errors: [createFileDiagnostic(sourceFile, span.start, length2, Messages.cannotExtractRange)] }; - } - const node = refineNode(start); - const errors = checkRootNode(node) || checkNode(node); - if (errors) { - return { errors }; - } - return { targetRange: { range: getStatementOrExpressionRange(node), facts: rangeFacts, thisNode } }; - function refineNode(node2) { - if (isReturnStatement(node2)) { - if (node2.expression) { - return node2.expression; - } - } else if (isVariableStatement(node2) || isVariableDeclarationList(node2)) { - const declarations = isVariableStatement(node2) ? node2.declarationList.declarations : node2.declarations; - let numInitializers = 0; - let lastInitializer; - for (const declaration of declarations) { - if (declaration.initializer) { - numInitializers++; - lastInitializer = declaration.initializer; - } - } - if (numInitializers === 1) { - return lastInitializer; - } - } else if (isVariableDeclaration(node2)) { - if (node2.initializer) { - return node2.initializer; - } - } - return node2; - } - function checkRootNode(node2) { - if (isIdentifier(isExpressionStatement(node2) ? node2.expression : node2)) { - return [createDiagnosticForNode(node2, Messages.cannotExtractIdentifier)]; - } - return void 0; - } - function checkForStaticContext(nodeToCheck, containingClass) { - let current = nodeToCheck; - while (current !== containingClass) { - if (current.kind === 172 /* PropertyDeclaration */) { - if (isStatic(current)) { - rangeFacts |= 32 /* InStaticRegion */; - } - break; - } else if (current.kind === 169 /* Parameter */) { - const ctorOrMethod = getContainingFunction(current); - if (ctorOrMethod.kind === 176 /* Constructor */) { - rangeFacts |= 32 /* InStaticRegion */; - } - break; - } else if (current.kind === 174 /* MethodDeclaration */) { - if (isStatic(current)) { - rangeFacts |= 32 /* InStaticRegion */; - } - } - current = current.parent; - } - } - function checkNode(nodeToCheck) { - let PermittedJumps; - ((PermittedJumps2) => { - PermittedJumps2[PermittedJumps2["None"] = 0] = "None"; - PermittedJumps2[PermittedJumps2["Break"] = 1] = "Break"; - PermittedJumps2[PermittedJumps2["Continue"] = 2] = "Continue"; - PermittedJumps2[PermittedJumps2["Return"] = 4] = "Return"; - })(PermittedJumps || (PermittedJumps = {})); - Debug.assert(nodeToCheck.pos <= nodeToCheck.end, "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (1)"); - Debug.assert(!positionIsSynthesized(nodeToCheck.pos), "This failure could trigger https://github.com/Microsoft/TypeScript/issues/20809 (2)"); - if (!isStatement(nodeToCheck) && !(isExpressionNode(nodeToCheck) && isExtractableExpression(nodeToCheck)) && !isStringLiteralJsxAttribute(nodeToCheck)) { - return [createDiagnosticForNode(nodeToCheck, Messages.statementOrExpressionExpected)]; - } - if (nodeToCheck.flags & 33554432 /* Ambient */) { - return [createDiagnosticForNode(nodeToCheck, Messages.cannotExtractAmbientBlock)]; - } - const containingClass = getContainingClass(nodeToCheck); - if (containingClass) { - checkForStaticContext(nodeToCheck, containingClass); - } - let errors2; - let permittedJumps = 4 /* Return */; - let seenLabels; - visit(nodeToCheck); - if (rangeFacts & 8 /* UsesThis */) { - const container = getThisContainer( - nodeToCheck, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - if (container.kind === 262 /* FunctionDeclaration */ || container.kind === 174 /* MethodDeclaration */ && container.parent.kind === 210 /* ObjectLiteralExpression */ || container.kind === 218 /* FunctionExpression */) { - rangeFacts |= 16 /* UsesThisInFunction */; - } - } - return errors2; - function visit(node2) { - if (errors2) { - return true; - } - if (isDeclaration(node2)) { - const declaringNode = node2.kind === 260 /* VariableDeclaration */ ? node2.parent.parent : node2; - if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { - (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); - return true; - } - } - switch (node2.kind) { - case 272 /* ImportDeclaration */: - (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractImport)); - return true; - case 277 /* ExportAssignment */: - (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); - return true; - case 108 /* SuperKeyword */: - if (node2.parent.kind === 213 /* CallExpression */) { - const containingClass2 = getContainingClass(node2); - if (containingClass2 === void 0 || containingClass2.pos < span.start || containingClass2.end >= span.start + span.length) { - (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractSuper)); - return true; - } - } else { - rangeFacts |= 8 /* UsesThis */; - thisNode = node2; - } - break; - case 219 /* ArrowFunction */: - forEachChild(node2, function check(n) { - if (isThis(n)) { - rangeFacts |= 8 /* UsesThis */; - thisNode = node2; - } else if (isClassLike(n) || isFunctionLike(n) && !isArrowFunction(n)) { - return false; - } else { - forEachChild(n, check); - } - }); - case 263 /* ClassDeclaration */: - case 262 /* FunctionDeclaration */: - if (isSourceFile(node2.parent) && node2.parent.externalModuleIndicator === void 0) { - (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.functionWillNotBeVisibleInTheNewScope)); - } - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return false; - } - const savedPermittedJumps = permittedJumps; - switch (node2.kind) { - case 245 /* IfStatement */: - permittedJumps &= ~4 /* Return */; - break; - case 258 /* TryStatement */: - permittedJumps = 0 /* None */; - break; - case 241 /* Block */: - if (node2.parent && node2.parent.kind === 258 /* TryStatement */ && node2.parent.finallyBlock === node2) { - permittedJumps = 4 /* Return */; - } - break; - case 297 /* DefaultClause */: - case 296 /* CaseClause */: - permittedJumps |= 1 /* Break */; - break; - default: - if (isIterationStatement( - node2, - /*lookInLabeledStatements*/ - false - )) { - permittedJumps |= 1 /* Break */ | 2 /* Continue */; - } - break; - } - switch (node2.kind) { - case 197 /* ThisType */: - case 110 /* ThisKeyword */: - rangeFacts |= 8 /* UsesThis */; - thisNode = node2; - break; - case 256 /* LabeledStatement */: { - const label = node2.label; - (seenLabels || (seenLabels = [])).push(label.escapedText); - forEachChild(node2, visit); - seenLabels.pop(); - break; - } - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: { - const label = node2.label; - if (label) { - if (!contains(seenLabels, label.escapedText)) { - (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); - } - } else { - if (!(permittedJumps & (node2.kind === 252 /* BreakStatement */ ? 1 /* Break */ : 2 /* Continue */))) { - (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); - } - } - break; - } - case 223 /* AwaitExpression */: - rangeFacts |= 4 /* IsAsyncFunction */; - break; - case 229 /* YieldExpression */: - rangeFacts |= 2 /* IsGenerator */; - break; - case 253 /* ReturnStatement */: - if (permittedJumps & 4 /* Return */) { - rangeFacts |= 1 /* HasReturn */; - } else { - (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractRangeContainingConditionalReturnStatement)); - } - break; - default: - forEachChild(node2, visit); - break; - } - permittedJumps = savedPermittedJumps; - } - } - } - function getAdjustedSpanFromNodes(startNode2, endNode2, sourceFile) { - const start = startNode2.getStart(sourceFile); - let end = endNode2.getEnd(); - if (sourceFile.text.charCodeAt(end) === 59 /* semicolon */) { - end++; - } - return { start, length: end - start }; - } - function getStatementOrExpressionRange(node) { - if (isStatement(node)) { - return [node]; - } - if (isExpressionNode(node)) { - return isExpressionStatement(node.parent) ? [node.parent] : node; - } - if (isStringLiteralJsxAttribute(node)) { - return node; - } - return void 0; - } - function isScope(node) { - return isArrowFunction(node) ? isFunctionBody(node.body) : isFunctionLikeDeclaration(node) || isSourceFile(node) || isModuleBlock(node) || isClassLike(node); - } - function collectEnclosingScopes(range) { - let current = isReadonlyArray(range.range) ? first(range.range) : range.range; - if (range.facts & 8 /* UsesThis */ && !(range.facts & 16 /* UsesThisInFunction */)) { - const containingClass = getContainingClass(current); - if (containingClass) { - const containingFunction = findAncestor(current, isFunctionLikeDeclaration); - return containingFunction ? [containingFunction, containingClass] : [containingClass]; - } - } - const scopes = []; - while (true) { - current = current.parent; - if (current.kind === 169 /* Parameter */) { - current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent; - } - if (isScope(current)) { - scopes.push(current); - if (current.kind === 312 /* SourceFile */) { - return scopes; - } - } - } - } - function getFunctionExtractionAtIndex(targetRange, context, requestedChangesIndex) { - const { scopes, readsAndWrites: { target, usagesPerScope, functionErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context); - Debug.assert(!functionErrorsPerScope[requestedChangesIndex].length, "The extraction went missing? How?"); - context.cancellationToken.throwIfCancellationRequested(); - return extractFunctionInScope(target, scopes[requestedChangesIndex], usagesPerScope[requestedChangesIndex], exposedVariableDeclarations, targetRange, context); - } - function getConstantExtractionAtIndex(targetRange, context, requestedChangesIndex) { - const { scopes, readsAndWrites: { target, usagesPerScope, constantErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context); - Debug.assert(!constantErrorsPerScope[requestedChangesIndex].length, "The extraction went missing? How?"); - Debug.assert(exposedVariableDeclarations.length === 0, "Extract constant accepted a range containing a variable declaration?"); - context.cancellationToken.throwIfCancellationRequested(); - const expression = isExpression(target) ? target : target.statements[0].expression; - return extractConstantInScope(expression, scopes[requestedChangesIndex], usagesPerScope[requestedChangesIndex], targetRange.facts, context); - } - function getPossibleExtractions(targetRange, context) { - const { scopes, readsAndWrites: { functionErrorsPerScope, constantErrorsPerScope } } = getPossibleExtractionsWorker(targetRange, context); - const extractions = scopes.map((scope, i) => { - const functionDescriptionPart = getDescriptionForFunctionInScope(scope); - const constantDescriptionPart = getDescriptionForConstantInScope(scope); - const scopeDescription = isFunctionLikeDeclaration(scope) ? getDescriptionForFunctionLikeDeclaration(scope) : isClassLike(scope) ? getDescriptionForClassLikeDeclaration(scope) : getDescriptionForModuleLikeDeclaration(scope); - let functionDescription; - let constantDescription; - if (scopeDescription === 1 /* Global */) { - functionDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1_scope), [functionDescriptionPart, "global"]); - constantDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1_scope), [constantDescriptionPart, "global"]); - } else if (scopeDescription === 0 /* Module */) { - functionDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1_scope), [functionDescriptionPart, "module"]); - constantDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1_scope), [constantDescriptionPart, "module"]); - } else { - functionDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1), [functionDescriptionPart, scopeDescription]); - constantDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_1), [constantDescriptionPart, scopeDescription]); - } - if (i === 0 && !isClassLike(scope)) { - constantDescription = formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Extract_to_0_in_enclosing_scope), [constantDescriptionPart]); - } - return { - functionExtraction: { - description: functionDescription, - errors: functionErrorsPerScope[i] - }, - constantExtraction: { - description: constantDescription, - errors: constantErrorsPerScope[i] - } - }; - }); - return extractions; - } - function getPossibleExtractionsWorker(targetRange, context) { - const { file: sourceFile } = context; - const scopes = collectEnclosingScopes(targetRange); - const enclosingTextRange = getEnclosingTextRange(targetRange, sourceFile); - const readsAndWrites = collectReadsAndWrites( - targetRange, - scopes, - enclosingTextRange, - sourceFile, - context.program.getTypeChecker(), - context.cancellationToken - ); - return { scopes, readsAndWrites }; - } - function getDescriptionForFunctionInScope(scope) { - return isFunctionLikeDeclaration(scope) ? "inner function" : isClassLike(scope) ? "method" : "function"; - } - function getDescriptionForConstantInScope(scope) { - return isClassLike(scope) ? "readonly field" : "constant"; - } - function getDescriptionForFunctionLikeDeclaration(scope) { - switch (scope.kind) { - case 176 /* Constructor */: - return "constructor"; - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - return scope.name ? `function '${scope.name.text}'` : ANONYMOUS; - case 219 /* ArrowFunction */: - return "arrow function"; - case 174 /* MethodDeclaration */: - return `method '${scope.name.getText()}'`; - case 177 /* GetAccessor */: - return `'get ${scope.name.getText()}'`; - case 178 /* SetAccessor */: - return `'set ${scope.name.getText()}'`; - default: - Debug.assertNever(scope, `Unexpected scope kind ${scope.kind}`); - } - } - function getDescriptionForClassLikeDeclaration(scope) { - return scope.kind === 263 /* ClassDeclaration */ ? scope.name ? `class '${scope.name.text}'` : "anonymous class declaration" : scope.name ? `class expression '${scope.name.text}'` : "anonymous class expression"; - } - function getDescriptionForModuleLikeDeclaration(scope) { - return scope.kind === 268 /* ModuleBlock */ ? `namespace '${scope.parent.name.getText()}'` : scope.externalModuleIndicator ? 0 /* Module */ : 1 /* Global */; - } - function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParameterUsages, substitutions }, exposedVariableDeclarations, range, context) { - const checker = context.program.getTypeChecker(); - const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const importAdder = ts_codefix_exports.createImportAdder(context.file, context.program, context.preferences, context.host); - const file = scope.getSourceFile(); - const functionNameText = getUniqueName(isClassLike(scope) ? "newMethod" : "newFunction", file); - const isJS = isInJSFile(scope); - const functionName = factory.createIdentifier(functionNameText); - let returnType; - const parameters = []; - const callArguments = []; - let writes; - usagesInScope.forEach((usage, name) => { - let typeNode; - if (!isJS) { - let type = checker.getTypeOfSymbolAtLocation(usage.symbol, usage.node); - type = checker.getBaseTypeOfLiteralType(type); - typeNode = ts_codefix_exports.typeToAutoImportableTypeNode(checker, importAdder, type, scope, scriptTarget, 1 /* NoTruncation */); - } - const paramDecl = factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - /*name*/ - name, - /*questionToken*/ - void 0, - typeNode - ); - parameters.push(paramDecl); - if (usage.usage === 2 /* Write */) { - (writes || (writes = [])).push(usage); - } - callArguments.push(factory.createIdentifier(name)); - }); - const typeParametersAndDeclarations = arrayFrom(typeParameterUsages.values(), (type) => ({ type, declaration: getFirstDeclarationBeforePosition(type, context.startPosition) })); - const sortedTypeParametersAndDeclarations = typeParametersAndDeclarations.sort(compareTypesByDeclarationOrder); - const typeParameters = sortedTypeParametersAndDeclarations.length === 0 ? void 0 : mapDefined(sortedTypeParametersAndDeclarations, ({ declaration }) => declaration); - const callTypeArguments = typeParameters !== void 0 ? typeParameters.map((decl) => factory.createTypeReferenceNode( - decl.name, - /*typeArguments*/ - void 0 - )) : void 0; - if (isExpression(node) && !isJS) { - const contextualType = checker.getContextualType(node); - returnType = checker.typeToTypeNode(contextualType, scope, 1 /* NoTruncation */); - } - const { body, returnValueProperty } = transformFunctionBody(node, exposedVariableDeclarations, writes, substitutions, !!(range.facts & 1 /* HasReturn */)); - suppressLeadingAndTrailingTrivia(body); - let newFunction; - const callThis = !!(range.facts & 16 /* UsesThisInFunction */); - if (isClassLike(scope)) { - const modifiers = isJS ? [] : [factory.createModifier(123 /* PrivateKeyword */)]; - if (range.facts & 32 /* InStaticRegion */) { - modifiers.push(factory.createModifier(126 /* StaticKeyword */)); - } - if (range.facts & 4 /* IsAsyncFunction */) { - modifiers.push(factory.createModifier(134 /* AsyncKeyword */)); - } - newFunction = factory.createMethodDeclaration( - modifiers.length ? modifiers : void 0, - range.facts & 2 /* IsGenerator */ ? factory.createToken(42 /* AsteriskToken */) : void 0, - functionName, - /*questionToken*/ - void 0, - typeParameters, - parameters, - returnType, - body - ); - } else { - if (callThis) { - parameters.unshift( - factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - /*name*/ - "this", - /*questionToken*/ - void 0, - checker.typeToTypeNode( - checker.getTypeAtLocation(range.thisNode), - scope, - 1 /* NoTruncation */ - ), - /*initializer*/ - void 0 - ) - ); - } - newFunction = factory.createFunctionDeclaration( - range.facts & 4 /* IsAsyncFunction */ ? [factory.createToken(134 /* AsyncKeyword */)] : void 0, - range.facts & 2 /* IsGenerator */ ? factory.createToken(42 /* AsteriskToken */) : void 0, - functionName, - typeParameters, - parameters, - returnType, - body - ); - } - const changeTracker = ts_textChanges_exports.ChangeTracker.fromContext(context); - const minInsertionPos = (isReadonlyArray(range.range) ? last(range.range) : range.range).end; - const nodeToInsertBefore = getNodeToInsertFunctionBefore(minInsertionPos, scope); - if (nodeToInsertBefore) { - changeTracker.insertNodeBefore( - context.file, - nodeToInsertBefore, - newFunction, - /*blankLineBetween*/ - true - ); - } else { - changeTracker.insertNodeAtEndOfScope(context.file, scope, newFunction); - } - importAdder.writeFixes(changeTracker); - const newNodes = []; - const called = getCalledExpression(scope, range, functionNameText); - if (callThis) { - callArguments.unshift(factory.createIdentifier("this")); - } - let call = factory.createCallExpression( - callThis ? factory.createPropertyAccessExpression( - called, - "call" - ) : called, - callTypeArguments, - // Note that no attempt is made to take advantage of type argument inference - callArguments - ); - if (range.facts & 2 /* IsGenerator */) { - call = factory.createYieldExpression(factory.createToken(42 /* AsteriskToken */), call); - } - if (range.facts & 4 /* IsAsyncFunction */) { - call = factory.createAwaitExpression(call); - } - if (isInJSXContent(node)) { - call = factory.createJsxExpression( - /*dotDotDotToken*/ - void 0, - call - ); - } - if (exposedVariableDeclarations.length && !writes) { - Debug.assert(!returnValueProperty, "Expected no returnValueProperty"); - Debug.assert(!(range.facts & 1 /* HasReturn */), "Expected RangeFacts.HasReturn flag to be unset"); - if (exposedVariableDeclarations.length === 1) { - const variableDeclaration = exposedVariableDeclarations[0]; - newNodes.push(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList( - [factory.createVariableDeclaration( - getSynthesizedDeepClone(variableDeclaration.name), - /*exclamationToken*/ - void 0, - /*type*/ - getSynthesizedDeepClone(variableDeclaration.type), - /*initializer*/ - call - )], - variableDeclaration.parent.flags - ) - )); - } else { - const bindingElements = []; - const typeElements = []; - let commonNodeFlags = exposedVariableDeclarations[0].parent.flags; - let sawExplicitType = false; - for (const variableDeclaration of exposedVariableDeclarations) { - bindingElements.push(factory.createBindingElement( - /*dotDotDotToken*/ - void 0, - /*propertyName*/ - void 0, - /*name*/ - getSynthesizedDeepClone(variableDeclaration.name) - )); - const variableType = checker.typeToTypeNode( - checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(variableDeclaration)), - scope, - 1 /* NoTruncation */ - ); - typeElements.push(factory.createPropertySignature( - /*modifiers*/ - void 0, - /*name*/ - variableDeclaration.symbol.name, - /*questionToken*/ - void 0, - /*type*/ - variableType - )); - sawExplicitType = sawExplicitType || variableDeclaration.type !== void 0; - commonNodeFlags = commonNodeFlags & variableDeclaration.parent.flags; - } - const typeLiteral = sawExplicitType ? factory.createTypeLiteralNode(typeElements) : void 0; - if (typeLiteral) { - setEmitFlags(typeLiteral, 1 /* SingleLine */); - } - newNodes.push(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList( - [factory.createVariableDeclaration( - factory.createObjectBindingPattern(bindingElements), - /*exclamationToken*/ - void 0, - /*type*/ - typeLiteral, - /*initializer*/ - call - )], - commonNodeFlags - ) - )); - } - } else if (exposedVariableDeclarations.length || writes) { - if (exposedVariableDeclarations.length) { - for (const variableDeclaration of exposedVariableDeclarations) { - let flags = variableDeclaration.parent.flags; - if (flags & 2 /* Const */) { - flags = flags & ~2 /* Const */ | 1 /* Let */; - } - newNodes.push(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList( - [factory.createVariableDeclaration( - variableDeclaration.symbol.name, - /*exclamationToken*/ - void 0, - getTypeDeepCloneUnionUndefined(variableDeclaration.type) - )], - flags - ) - )); - } - } - if (returnValueProperty) { - newNodes.push(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList( - [factory.createVariableDeclaration( - returnValueProperty, - /*exclamationToken*/ - void 0, - getTypeDeepCloneUnionUndefined(returnType) - )], - 1 /* Let */ - ) - )); - } - const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes); - if (returnValueProperty) { - assignments.unshift(factory.createShorthandPropertyAssignment(returnValueProperty)); - } - if (assignments.length === 1) { - Debug.assert(!returnValueProperty, "Shouldn't have returnValueProperty here"); - newNodes.push(factory.createExpressionStatement(factory.createAssignment(assignments[0].name, call))); - if (range.facts & 1 /* HasReturn */) { - newNodes.push(factory.createReturnStatement()); - } - } else { - newNodes.push(factory.createExpressionStatement(factory.createAssignment(factory.createObjectLiteralExpression(assignments), call))); - if (returnValueProperty) { - newNodes.push(factory.createReturnStatement(factory.createIdentifier(returnValueProperty))); - } - } - } else { - if (range.facts & 1 /* HasReturn */) { - newNodes.push(factory.createReturnStatement(call)); - } else if (isReadonlyArray(range.range)) { - newNodes.push(factory.createExpressionStatement(call)); - } else { - newNodes.push(call); - } - } - if (isReadonlyArray(range.range)) { - changeTracker.replaceNodeRangeWithNodes(context.file, first(range.range), last(range.range), newNodes); - } else { - changeTracker.replaceNodeWithNodes(context.file, range.range, newNodes); - } - const edits = changeTracker.getChanges(); - const renameRange = isReadonlyArray(range.range) ? first(range.range) : range.range; - const renameFilename = renameRange.getSourceFile().fileName; - const renameLocation = getRenameLocation( - edits, - renameFilename, - functionNameText, - /*preferLastLocation*/ - false - ); - return { renameFilename, renameLocation, edits }; - function getTypeDeepCloneUnionUndefined(typeNode) { - if (typeNode === void 0) { - return void 0; - } - const clone2 = getSynthesizedDeepClone(typeNode); - let withoutParens = clone2; - while (isParenthesizedTypeNode(withoutParens)) { - withoutParens = withoutParens.type; - } - return isUnionTypeNode(withoutParens) && find(withoutParens.types, (t) => t.kind === 157 /* UndefinedKeyword */) ? clone2 : factory.createUnionTypeNode([clone2, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); - } - } - function extractConstantInScope(node, scope, { substitutions }, rangeFacts, context) { - const checker = context.program.getTypeChecker(); - const file = scope.getSourceFile(); - const localNameText = isPropertyAccessExpression(node) && !isClassLike(scope) && !checker.resolveName( - node.name.text, - node, - 111551 /* Value */, - /*excludeGlobals*/ - false - ) && !isPrivateIdentifier(node.name) && !identifierToKeywordKind(node.name) ? node.name.text : getUniqueName(isClassLike(scope) ? "newProperty" : "newLocal", file); - const isJS = isInJSFile(scope); - let variableType = isJS || !checker.isContextSensitive(node) ? void 0 : checker.typeToTypeNode(checker.getContextualType(node), scope, 1 /* NoTruncation */); - let initializer = transformConstantInitializer(skipParentheses(node), substitutions); - ({ variableType, initializer } = transformFunctionInitializerAndType(variableType, initializer)); - suppressLeadingAndTrailingTrivia(initializer); - const changeTracker = ts_textChanges_exports.ChangeTracker.fromContext(context); - if (isClassLike(scope)) { - Debug.assert(!isJS, "Cannot extract to a JS class"); - const modifiers = []; - modifiers.push(factory.createModifier(123 /* PrivateKeyword */)); - if (rangeFacts & 32 /* InStaticRegion */) { - modifiers.push(factory.createModifier(126 /* StaticKeyword */)); - } - modifiers.push(factory.createModifier(148 /* ReadonlyKeyword */)); - const newVariable = factory.createPropertyDeclaration( - modifiers, - localNameText, - /*questionOrExclamationToken*/ - void 0, - variableType, - initializer - ); - let localReference = factory.createPropertyAccessExpression( - rangeFacts & 32 /* InStaticRegion */ ? factory.createIdentifier(scope.name.getText()) : factory.createThis(), - factory.createIdentifier(localNameText) - ); - if (isInJSXContent(node)) { - localReference = factory.createJsxExpression( - /*dotDotDotToken*/ - void 0, - localReference - ); - } - const maxInsertionPos = node.pos; - const nodeToInsertBefore = getNodeToInsertPropertyBefore(maxInsertionPos, scope); - changeTracker.insertNodeBefore( - context.file, - nodeToInsertBefore, - newVariable, - /*blankLineBetween*/ - true - ); - changeTracker.replaceNode(context.file, node, localReference); - } else { - const newVariableDeclaration = factory.createVariableDeclaration( - localNameText, - /*exclamationToken*/ - void 0, - variableType, - initializer - ); - const oldVariableDeclaration = getContainingVariableDeclarationIfInList(node, scope); - if (oldVariableDeclaration) { - changeTracker.insertNodeBefore(context.file, oldVariableDeclaration, newVariableDeclaration); - const localReference = factory.createIdentifier(localNameText); - changeTracker.replaceNode(context.file, node, localReference); - } else if (node.parent.kind === 244 /* ExpressionStatement */ && scope === findAncestor(node, isScope)) { - const newVariableStatement = factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([newVariableDeclaration], 2 /* Const */) - ); - changeTracker.replaceNode(context.file, node.parent, newVariableStatement); - } else { - const newVariableStatement = factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([newVariableDeclaration], 2 /* Const */) - ); - const nodeToInsertBefore = getNodeToInsertConstantBefore(node, scope); - if (nodeToInsertBefore.pos === 0) { - changeTracker.insertNodeAtTopOfFile( - context.file, - newVariableStatement, - /*blankLineBetween*/ - false - ); - } else { - changeTracker.insertNodeBefore( - context.file, - nodeToInsertBefore, - newVariableStatement, - /*blankLineBetween*/ - false - ); - } - if (node.parent.kind === 244 /* ExpressionStatement */) { - changeTracker.delete(context.file, node.parent); - } else { - let localReference = factory.createIdentifier(localNameText); - if (isInJSXContent(node)) { - localReference = factory.createJsxExpression( - /*dotDotDotToken*/ - void 0, - localReference - ); - } - changeTracker.replaceNode(context.file, node, localReference); - } - } - } - const edits = changeTracker.getChanges(); - const renameFilename = node.getSourceFile().fileName; - const renameLocation = getRenameLocation( - edits, - renameFilename, - localNameText, - /*preferLastLocation*/ - true - ); - return { renameFilename, renameLocation, edits }; - function transformFunctionInitializerAndType(variableType2, initializer2) { - if (variableType2 === void 0) - return { variableType: variableType2, initializer: initializer2 }; - if (!isFunctionExpression(initializer2) && !isArrowFunction(initializer2) || !!initializer2.typeParameters) - return { variableType: variableType2, initializer: initializer2 }; - const functionType = checker.getTypeAtLocation(node); - const functionSignature = singleOrUndefined(checker.getSignaturesOfType(functionType, 0 /* Call */)); - if (!functionSignature) - return { variableType: variableType2, initializer: initializer2 }; - if (!!functionSignature.getTypeParameters()) - return { variableType: variableType2, initializer: initializer2 }; - const parameters = []; - let hasAny = false; - for (const p of initializer2.parameters) { - if (p.type) { - parameters.push(p); - } else { - const paramType = checker.getTypeAtLocation(p); - if (paramType === checker.getAnyType()) - hasAny = true; - parameters.push(factory.updateParameterDeclaration( - p, - p.modifiers, - p.dotDotDotToken, - p.name, - p.questionToken, - p.type || checker.typeToTypeNode(paramType, scope, 1 /* NoTruncation */), - p.initializer - )); - } - } - if (hasAny) - return { variableType: variableType2, initializer: initializer2 }; - variableType2 = void 0; - if (isArrowFunction(initializer2)) { - initializer2 = factory.updateArrowFunction( - initializer2, - canHaveModifiers(node) ? getModifiers(node) : void 0, - initializer2.typeParameters, - parameters, - initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), - initializer2.equalsGreaterThanToken, - initializer2.body - ); - } else { - if (functionSignature && !!functionSignature.thisParameter) { - const firstParameter = firstOrUndefined(parameters); - if (!firstParameter || isIdentifier(firstParameter.name) && firstParameter.name.escapedText !== "this") { - const thisType = checker.getTypeOfSymbolAtLocation(functionSignature.thisParameter, node); - parameters.splice(0, 0, factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "this", - /*questionToken*/ - void 0, - checker.typeToTypeNode(thisType, scope, 1 /* NoTruncation */) - )); - } - } - initializer2 = factory.updateFunctionExpression( - initializer2, - canHaveModifiers(node) ? getModifiers(node) : void 0, - initializer2.asteriskToken, - initializer2.name, - initializer2.typeParameters, - parameters, - initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), - initializer2.body - ); - } - return { variableType: variableType2, initializer: initializer2 }; - } - } - function getContainingVariableDeclarationIfInList(node, scope) { - let prevNode; - while (node !== void 0 && node !== scope) { - if (isVariableDeclaration(node) && node.initializer === prevNode && isVariableDeclarationList(node.parent) && node.parent.declarations.length > 1) { - return node; - } - prevNode = node; - node = node.parent; - } - } - function getFirstDeclarationBeforePosition(type, position) { - let firstDeclaration; - const symbol = type.symbol; - if (symbol && symbol.declarations) { - for (const declaration of symbol.declarations) { - if ((firstDeclaration === void 0 || declaration.pos < firstDeclaration.pos) && declaration.pos < position) { - firstDeclaration = declaration; - } - } - } - return firstDeclaration; - } - function compareTypesByDeclarationOrder({ type: type1, declaration: declaration1 }, { type: type2, declaration: declaration2 }) { - return compareProperties(declaration1, declaration2, "pos", compareValues) || compareStringsCaseSensitive( - type1.symbol ? type1.symbol.getName() : "", - type2.symbol ? type2.symbol.getName() : "" - ) || compareValues(type1.id, type2.id); - } - function getCalledExpression(scope, range, functionNameText) { - const functionReference = factory.createIdentifier(functionNameText); - if (isClassLike(scope)) { - const lhs = range.facts & 32 /* InStaticRegion */ ? factory.createIdentifier(scope.name.text) : factory.createThis(); - return factory.createPropertyAccessExpression(lhs, functionReference); - } else { - return functionReference; - } - } - function transformFunctionBody(body, exposedVariableDeclarations, writes, substitutions, hasReturn2) { - const hasWritesOrVariableDeclarations = writes !== void 0 || exposedVariableDeclarations.length > 0; - if (isBlock(body) && !hasWritesOrVariableDeclarations && substitutions.size === 0) { - return { body: factory.createBlock( - body.statements, - /*multiLine*/ - true - ), returnValueProperty: void 0 }; - } - let returnValueProperty; - let ignoreReturns = false; - const statements = factory.createNodeArray(isBlock(body) ? body.statements.slice(0) : [isStatement(body) ? body : factory.createReturnStatement(skipParentheses(body))]); - if (hasWritesOrVariableDeclarations || substitutions.size) { - const rewrittenStatements = visitNodes2(statements, visitor, isStatement).slice(); - if (hasWritesOrVariableDeclarations && !hasReturn2 && isStatement(body)) { - const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes); - if (assignments.length === 1) { - rewrittenStatements.push(factory.createReturnStatement(assignments[0].name)); - } else { - rewrittenStatements.push(factory.createReturnStatement(factory.createObjectLiteralExpression(assignments))); - } - } - return { body: factory.createBlock( - rewrittenStatements, - /*multiLine*/ - true - ), returnValueProperty }; - } else { - return { body: factory.createBlock( - statements, - /*multiLine*/ - true - ), returnValueProperty: void 0 }; - } - function visitor(node) { - if (!ignoreReturns && isReturnStatement(node) && hasWritesOrVariableDeclarations) { - const assignments = getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes); - if (node.expression) { - if (!returnValueProperty) { - returnValueProperty = "__return"; - } - assignments.unshift(factory.createPropertyAssignment(returnValueProperty, visitNode(node.expression, visitor, isExpression))); - } - if (assignments.length === 1) { - return factory.createReturnStatement(assignments[0].name); - } else { - return factory.createReturnStatement(factory.createObjectLiteralExpression(assignments)); - } - } else { - const oldIgnoreReturns = ignoreReturns; - ignoreReturns = ignoreReturns || isFunctionLikeDeclaration(node) || isClassLike(node); - const substitution = substitutions.get(getNodeId(node).toString()); - const result = substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(node, visitor, nullTransformationContext); - ignoreReturns = oldIgnoreReturns; - return result; - } - } - } - function transformConstantInitializer(initializer, substitutions) { - return substitutions.size ? visitor(initializer) : initializer; - function visitor(node) { - const substitution = substitutions.get(getNodeId(node).toString()); - return substitution ? getSynthesizedDeepClone(substitution) : visitEachChild(node, visitor, nullTransformationContext); - } - } - function getStatementsOrClassElements(scope) { - if (isFunctionLikeDeclaration(scope)) { - const body = scope.body; - if (isBlock(body)) { - return body.statements; - } - } else if (isModuleBlock(scope) || isSourceFile(scope)) { - return scope.statements; - } else if (isClassLike(scope)) { - return scope.members; - } else { - assertType(scope); - } - return emptyArray; - } - function getNodeToInsertFunctionBefore(minPos, scope) { - return find(getStatementsOrClassElements(scope), (child) => child.pos >= minPos && isFunctionLikeDeclaration(child) && !isConstructorDeclaration(child)); - } - function getNodeToInsertPropertyBefore(maxPos, scope) { - const members = scope.members; - Debug.assert(members.length > 0, "Found no members"); - let prevMember; - let allProperties = true; - for (const member of members) { - if (member.pos > maxPos) { - return prevMember || members[0]; - } - if (allProperties && !isPropertyDeclaration(member)) { - if (prevMember !== void 0) { - return member; - } - allProperties = false; - } - prevMember = member; - } - if (prevMember === void 0) - return Debug.fail(); - return prevMember; - } - function getNodeToInsertConstantBefore(node, scope) { - Debug.assert(!isClassLike(scope)); - let prevScope; - for (let curr = node; curr !== scope; curr = curr.parent) { - if (isScope(curr)) { - prevScope = curr; - } - } - for (let curr = (prevScope || node).parent; ; curr = curr.parent) { - if (isBlockLike(curr)) { - let prevStatement; - for (const statement of curr.statements) { - if (statement.pos > node.pos) { - break; - } - prevStatement = statement; - } - if (!prevStatement && isCaseClause(curr)) { - Debug.assert(isSwitchStatement(curr.parent.parent), "Grandparent isn't a switch statement"); - return curr.parent.parent; - } - return Debug.checkDefined(prevStatement, "prevStatement failed to get set"); - } - Debug.assert(curr !== scope, "Didn't encounter a block-like before encountering scope"); - } - } - function getPropertyAssignmentsForWritesAndVariableDeclarations(exposedVariableDeclarations, writes) { - const variableAssignments = map(exposedVariableDeclarations, (v) => factory.createShorthandPropertyAssignment(v.symbol.name)); - const writeAssignments = map(writes, (w) => factory.createShorthandPropertyAssignment(w.symbol.name)); - return variableAssignments === void 0 ? writeAssignments : writeAssignments === void 0 ? variableAssignments : variableAssignments.concat(writeAssignments); - } - function isReadonlyArray(v) { - return isArray(v); - } - function getEnclosingTextRange(targetRange, sourceFile) { - return isReadonlyArray(targetRange.range) ? { pos: first(targetRange.range).getStart(sourceFile), end: last(targetRange.range).getEnd() } : targetRange.range; - } - function collectReadsAndWrites(targetRange, scopes, enclosingTextRange, sourceFile, checker, cancellationToken) { - const allTypeParameterUsages = /* @__PURE__ */ new Map(); - const usagesPerScope = []; - const substitutionsPerScope = []; - const functionErrorsPerScope = []; - const constantErrorsPerScope = []; - const visibleDeclarationsInExtractedRange = []; - const exposedVariableSymbolSet = /* @__PURE__ */ new Map(); - const exposedVariableDeclarations = []; - let firstExposedNonVariableDeclaration; - const expression = !isReadonlyArray(targetRange.range) ? targetRange.range : targetRange.range.length === 1 && isExpressionStatement(targetRange.range[0]) ? targetRange.range[0].expression : void 0; - let expressionDiagnostic; - if (expression === void 0) { - const statements = targetRange.range; - const start = first(statements).getStart(); - const end = last(statements).end; - expressionDiagnostic = createFileDiagnostic(sourceFile, start, end - start, Messages.expressionExpected); - } else if (checker.getTypeAtLocation(expression).flags & (16384 /* Void */ | 131072 /* Never */)) { - expressionDiagnostic = createDiagnosticForNode(expression, Messages.uselessConstantType); - } - for (const scope of scopes) { - usagesPerScope.push({ usages: /* @__PURE__ */ new Map(), typeParameterUsages: /* @__PURE__ */ new Map(), substitutions: /* @__PURE__ */ new Map() }); - substitutionsPerScope.push(/* @__PURE__ */ new Map()); - functionErrorsPerScope.push([]); - const constantErrors = []; - if (expressionDiagnostic) { - constantErrors.push(expressionDiagnostic); - } - if (isClassLike(scope) && isInJSFile(scope)) { - constantErrors.push(createDiagnosticForNode(scope, Messages.cannotExtractToJSClass)); - } - if (isArrowFunction(scope) && !isBlock(scope.body)) { - constantErrors.push(createDiagnosticForNode(scope, Messages.cannotExtractToExpressionArrowFunction)); - } - constantErrorsPerScope.push(constantErrors); - } - const seenUsages = /* @__PURE__ */ new Map(); - const target = isReadonlyArray(targetRange.range) ? factory.createBlock(targetRange.range) : targetRange.range; - const unmodifiedNode = isReadonlyArray(targetRange.range) ? first(targetRange.range) : targetRange.range; - const inGenericContext = isInGenericContext(unmodifiedNode); - collectUsages(target); - if (inGenericContext && !isReadonlyArray(targetRange.range) && !isJsxAttribute(targetRange.range)) { - const contextualType = checker.getContextualType(targetRange.range); - recordTypeParameterUsages(contextualType); - } - if (allTypeParameterUsages.size > 0) { - const seenTypeParameterUsages = /* @__PURE__ */ new Map(); - let i = 0; - for (let curr = unmodifiedNode; curr !== void 0 && i < scopes.length; curr = curr.parent) { - if (curr === scopes[i]) { - seenTypeParameterUsages.forEach((typeParameter, id) => { - usagesPerScope[i].typeParameterUsages.set(id, typeParameter); - }); - i++; - } - if (isDeclarationWithTypeParameters(curr)) { - for (const typeParameterDecl of getEffectiveTypeParameterDeclarations(curr)) { - const typeParameter = checker.getTypeAtLocation(typeParameterDecl); - if (allTypeParameterUsages.has(typeParameter.id.toString())) { - seenTypeParameterUsages.set(typeParameter.id.toString(), typeParameter); - } - } - } - } - Debug.assert(i === scopes.length, "Should have iterated all scopes"); - } - if (visibleDeclarationsInExtractedRange.length) { - const containingLexicalScopeOfExtraction = isBlockScope(scopes[0], scopes[0].parent) ? scopes[0] : getEnclosingBlockScopeContainer(scopes[0]); - forEachChild(containingLexicalScopeOfExtraction, checkForUsedDeclarations); - } - for (let i = 0; i < scopes.length; i++) { - const scopeUsages = usagesPerScope[i]; - if (i > 0 && (scopeUsages.usages.size > 0 || scopeUsages.typeParameterUsages.size > 0)) { - const errorNode = isReadonlyArray(targetRange.range) ? targetRange.range[0] : targetRange.range; - constantErrorsPerScope[i].push(createDiagnosticForNode(errorNode, Messages.cannotAccessVariablesFromNestedScopes)); - } - if (targetRange.facts & 16 /* UsesThisInFunction */ && isClassLike(scopes[i])) { - functionErrorsPerScope[i].push(createDiagnosticForNode(targetRange.thisNode, Messages.cannotExtractFunctionsContainingThisToMethod)); - } - let hasWrite = false; - let readonlyClassPropertyWrite; - usagesPerScope[i].usages.forEach((value) => { - if (value.usage === 2 /* Write */) { - hasWrite = true; - if (value.symbol.flags & 106500 /* ClassMember */ && value.symbol.valueDeclaration && hasEffectiveModifier(value.symbol.valueDeclaration, 64 /* Readonly */)) { - readonlyClassPropertyWrite = value.symbol.valueDeclaration; - } - } - }); - Debug.assert(isReadonlyArray(targetRange.range) || exposedVariableDeclarations.length === 0, "No variable declarations expected if something was extracted"); - if (hasWrite && !isReadonlyArray(targetRange.range)) { - const diag2 = createDiagnosticForNode(targetRange.range, Messages.cannotWriteInExpression); - functionErrorsPerScope[i].push(diag2); - constantErrorsPerScope[i].push(diag2); - } else if (readonlyClassPropertyWrite && i > 0) { - const diag2 = createDiagnosticForNode(readonlyClassPropertyWrite, Messages.cannotExtractReadonlyPropertyInitializerOutsideConstructor); - functionErrorsPerScope[i].push(diag2); - constantErrorsPerScope[i].push(diag2); - } else if (firstExposedNonVariableDeclaration) { - const diag2 = createDiagnosticForNode(firstExposedNonVariableDeclaration, Messages.cannotExtractExportedEntity); - functionErrorsPerScope[i].push(diag2); - constantErrorsPerScope[i].push(diag2); - } - } - return { target, usagesPerScope, functionErrorsPerScope, constantErrorsPerScope, exposedVariableDeclarations }; - function isInGenericContext(node) { - return !!findAncestor(node, (n) => isDeclarationWithTypeParameters(n) && getEffectiveTypeParameterDeclarations(n).length !== 0); - } - function recordTypeParameterUsages(type) { - const symbolWalker = checker.getSymbolWalker(() => (cancellationToken.throwIfCancellationRequested(), true)); - const { visitedTypes } = symbolWalker.walkType(type); - for (const visitedType of visitedTypes) { - if (visitedType.isTypeParameter()) { - allTypeParameterUsages.set(visitedType.id.toString(), visitedType); - } - } - } - function collectUsages(node, valueUsage = 1 /* Read */) { - if (inGenericContext) { - const type = checker.getTypeAtLocation(node); - recordTypeParameterUsages(type); - } - if (isDeclaration(node) && node.symbol) { - visibleDeclarationsInExtractedRange.push(node); - } - if (isAssignmentExpression(node)) { - collectUsages(node.left, 2 /* Write */); - collectUsages(node.right); - } else if (isUnaryExpressionWithWrite(node)) { - collectUsages(node.operand, 2 /* Write */); - } else if (isPropertyAccessExpression(node) || isElementAccessExpression(node)) { - forEachChild(node, collectUsages); - } else if (isIdentifier(node)) { - if (!node.parent) { - return; - } - if (isQualifiedName(node.parent) && node !== node.parent.left) { - return; - } - if (isPropertyAccessExpression(node.parent) && node !== node.parent.expression) { - return; - } - recordUsage( - node, - valueUsage, - /*isTypeNode*/ - isPartOfTypeNode(node) - ); - } else { - forEachChild(node, collectUsages); - } - } - function recordUsage(n, usage, isTypeNode2) { - const symbolId = recordUsagebySymbol(n, usage, isTypeNode2); - if (symbolId) { - for (let i = 0; i < scopes.length; i++) { - const substitution = substitutionsPerScope[i].get(symbolId); - if (substitution) { - usagesPerScope[i].substitutions.set(getNodeId(n).toString(), substitution); - } - } - } - } - function recordUsagebySymbol(identifier, usage, isTypeName) { - const symbol = getSymbolReferencedByIdentifier(identifier); - if (!symbol) { - return void 0; - } - const symbolId = getSymbolId(symbol).toString(); - const lastUsage = seenUsages.get(symbolId); - if (lastUsage && lastUsage >= usage) { - return symbolId; - } - seenUsages.set(symbolId, usage); - if (lastUsage) { - for (const perScope of usagesPerScope) { - const prevEntry = perScope.usages.get(identifier.text); - if (prevEntry) { - perScope.usages.set(identifier.text, { usage, symbol, node: identifier }); - } - } - return symbolId; - } - const decls = symbol.getDeclarations(); - const declInFile = decls && find(decls, (d) => d.getSourceFile() === sourceFile); - if (!declInFile) { - return void 0; - } - if (rangeContainsStartEnd(enclosingTextRange, declInFile.getStart(), declInFile.end)) { - return void 0; - } - if (targetRange.facts & 2 /* IsGenerator */ && usage === 2 /* Write */) { - const diag2 = createDiagnosticForNode(identifier, Messages.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators); - for (const errors of functionErrorsPerScope) { - errors.push(diag2); - } - for (const errors of constantErrorsPerScope) { - errors.push(diag2); - } - } - for (let i = 0; i < scopes.length; i++) { - const scope = scopes[i]; - const resolvedSymbol = checker.resolveName( - symbol.name, - scope, - symbol.flags, - /*excludeGlobals*/ - false - ); - if (resolvedSymbol === symbol) { - continue; - } - if (!substitutionsPerScope[i].has(symbolId)) { - const substitution = tryReplaceWithQualifiedNameOrPropertyAccess(symbol.exportSymbol || symbol, scope, isTypeName); - if (substitution) { - substitutionsPerScope[i].set(symbolId, substitution); - } else if (isTypeName) { - if (!(symbol.flags & 262144 /* TypeParameter */)) { - const diag2 = createDiagnosticForNode(identifier, Messages.typeWillNotBeVisibleInTheNewScope); - functionErrorsPerScope[i].push(diag2); - constantErrorsPerScope[i].push(diag2); - } - } else { - usagesPerScope[i].usages.set(identifier.text, { usage, symbol, node: identifier }); - } - } - } - return symbolId; - } - function checkForUsedDeclarations(node) { - if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.indexOf(node) >= 0) { - return; - } - const sym = isIdentifier(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node); - if (sym) { - const decl = find(visibleDeclarationsInExtractedRange, (d) => d.symbol === sym); - if (decl) { - if (isVariableDeclaration(decl)) { - const idString = decl.symbol.id.toString(); - if (!exposedVariableSymbolSet.has(idString)) { - exposedVariableDeclarations.push(decl); - exposedVariableSymbolSet.set(idString, true); - } - } else { - firstExposedNonVariableDeclaration = firstExposedNonVariableDeclaration || decl; - } - } - } - forEachChild(node, checkForUsedDeclarations); - } - function getSymbolReferencedByIdentifier(identifier) { - return identifier.parent && isShorthandPropertyAssignment(identifier.parent) && identifier.parent.name === identifier ? checker.getShorthandAssignmentValueSymbol(identifier.parent) : checker.getSymbolAtLocation(identifier); - } - function tryReplaceWithQualifiedNameOrPropertyAccess(symbol, scopeDecl, isTypeNode2) { - if (!symbol) { - return void 0; - } - const decls = symbol.getDeclarations(); - if (decls && decls.some((d) => d.parent === scopeDecl)) { - return factory.createIdentifier(symbol.name); - } - const prefix = tryReplaceWithQualifiedNameOrPropertyAccess(symbol.parent, scopeDecl, isTypeNode2); - if (prefix === void 0) { - return void 0; - } - return isTypeNode2 ? factory.createQualifiedName(prefix, factory.createIdentifier(symbol.name)) : factory.createPropertyAccessExpression(prefix, symbol.name); - } - } - function getExtractableParent(node) { - return findAncestor(node, (node2) => node2.parent && isExtractableExpression(node2) && !isBinaryExpression(node2.parent)); - } - function isExtractableExpression(node) { - const { parent: parent2 } = node; - switch (parent2.kind) { - case 306 /* EnumMember */: - return false; - } - switch (node.kind) { - case 11 /* StringLiteral */: - return parent2.kind !== 272 /* ImportDeclaration */ && parent2.kind !== 276 /* ImportSpecifier */; - case 230 /* SpreadElement */: - case 206 /* ObjectBindingPattern */: - case 208 /* BindingElement */: - return false; - case 80 /* Identifier */: - return parent2.kind !== 208 /* BindingElement */ && parent2.kind !== 276 /* ImportSpecifier */ && parent2.kind !== 281 /* ExportSpecifier */; - } - return true; - } - function isBlockLike(node) { - switch (node.kind) { - case 241 /* Block */: - case 312 /* SourceFile */: - case 268 /* ModuleBlock */: - case 296 /* CaseClause */: - return true; - default: - return false; - } - } - function isInJSXContent(node) { - return isStringLiteralJsxAttribute(node) || (isJsxElement(node) || isJsxSelfClosingElement(node) || isJsxFragment(node)) && (isJsxElement(node.parent) || isJsxFragment(node.parent)); - } - function isStringLiteralJsxAttribute(node) { - return isStringLiteral(node) && node.parent && isJsxAttribute(node.parent); - } - var refactorName12, extractConstantAction, extractFunctionAction, Messages, RangeFacts; - var init_extractSymbol = __esm({ - "src/services/refactors/extractSymbol.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName12 = "Extract Symbol"; - extractConstantAction = { - name: "Extract Constant", - description: getLocaleSpecificMessage(Diagnostics.Extract_constant), - kind: "refactor.extract.constant" - }; - extractFunctionAction = { - name: "Extract Function", - description: getLocaleSpecificMessage(Diagnostics.Extract_function), - kind: "refactor.extract.function" - }; - registerRefactor(refactorName12, { - kinds: [ - extractConstantAction.kind, - extractFunctionAction.kind - ], - getEditsForAction: getRefactorEditsToExtractSymbol, - getAvailableActions: getRefactorActionsToExtractSymbol - }); - ((Messages2) => { - function createMessage(message) { - return { message, code: 0, category: 3 /* Message */, key: message }; - } - Messages2.cannotExtractRange = createMessage("Cannot extract range."); - Messages2.cannotExtractImport = createMessage("Cannot extract import statement."); - Messages2.cannotExtractSuper = createMessage("Cannot extract super call."); - Messages2.cannotExtractJSDoc = createMessage("Cannot extract JSDoc."); - Messages2.cannotExtractEmpty = createMessage("Cannot extract empty range."); - Messages2.expressionExpected = createMessage("expression expected."); - Messages2.uselessConstantType = createMessage("No reason to extract constant of type."); - Messages2.statementOrExpressionExpected = createMessage("Statement or expression expected."); - Messages2.cannotExtractRangeContainingConditionalBreakOrContinueStatements = createMessage("Cannot extract range containing conditional break or continue statements."); - Messages2.cannotExtractRangeContainingConditionalReturnStatement = createMessage("Cannot extract range containing conditional return statement."); - Messages2.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange = createMessage("Cannot extract range containing labeled break or continue with target outside of the range."); - Messages2.cannotExtractRangeThatContainsWritesToReferencesLocatedOutsideOfTheTargetRangeInGenerators = createMessage("Cannot extract range containing writes to references located outside of the target range in generators."); - Messages2.typeWillNotBeVisibleInTheNewScope = createMessage("Type will not visible in the new scope."); - Messages2.functionWillNotBeVisibleInTheNewScope = createMessage("Function will not visible in the new scope."); - Messages2.cannotExtractIdentifier = createMessage("Select more than a single identifier."); - Messages2.cannotExtractExportedEntity = createMessage("Cannot extract exported declaration"); - Messages2.cannotWriteInExpression = createMessage("Cannot write back side-effects when extracting an expression"); - Messages2.cannotExtractReadonlyPropertyInitializerOutsideConstructor = createMessage("Cannot move initialization of read-only class property outside of the constructor"); - Messages2.cannotExtractAmbientBlock = createMessage("Cannot extract code from ambient contexts"); - Messages2.cannotAccessVariablesFromNestedScopes = createMessage("Cannot access variables from nested scopes"); - Messages2.cannotExtractToJSClass = createMessage("Cannot extract constant to a class scope in JS"); - Messages2.cannotExtractToExpressionArrowFunction = createMessage("Cannot extract constant to an arrow function without a block"); - Messages2.cannotExtractFunctionsContainingThisToMethod = createMessage("Cannot extract functions containing this to method"); - })(Messages || (Messages = {})); - RangeFacts = /* @__PURE__ */ ((RangeFacts2) => { - RangeFacts2[RangeFacts2["None"] = 0] = "None"; - RangeFacts2[RangeFacts2["HasReturn"] = 1] = "HasReturn"; - RangeFacts2[RangeFacts2["IsGenerator"] = 2] = "IsGenerator"; - RangeFacts2[RangeFacts2["IsAsyncFunction"] = 4] = "IsAsyncFunction"; - RangeFacts2[RangeFacts2["UsesThis"] = 8] = "UsesThis"; - RangeFacts2[RangeFacts2["UsesThisInFunction"] = 16] = "UsesThisInFunction"; - RangeFacts2[RangeFacts2["InStaticRegion"] = 32] = "InStaticRegion"; - return RangeFacts2; - })(RangeFacts || {}); - } - }); - - // src/services/_namespaces/ts.refactor.extractSymbol.ts - var ts_refactor_extractSymbol_exports = {}; - __export(ts_refactor_extractSymbol_exports, { - Messages: () => Messages, - RangeFacts: () => RangeFacts, - getRangeToExtract: () => getRangeToExtract2, - getRefactorActionsToExtractSymbol: () => getRefactorActionsToExtractSymbol, - getRefactorEditsToExtractSymbol: () => getRefactorEditsToExtractSymbol - }); - var init_ts_refactor_extractSymbol = __esm({ - "src/services/_namespaces/ts.refactor.extractSymbol.ts"() { - "use strict"; - init_extractSymbol(); - } - }); - - // src/services/refactors/generateGetAccessorAndSetAccessor.ts - var actionName, actionDescription, generateGetSetAction; - var init_generateGetAccessorAndSetAccessor = __esm({ - "src/services/refactors/generateGetAccessorAndSetAccessor.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - actionName = "Generate 'get' and 'set' accessors"; - actionDescription = getLocaleSpecificMessage(Diagnostics.Generate_get_and_set_accessors); - generateGetSetAction = { - name: actionName, - description: actionDescription, - kind: "refactor.rewrite.property.generateAccessors" - }; - registerRefactor(actionName, { - kinds: [generateGetSetAction.kind], - getEditsForAction: function getRefactorActionsToGenerateGetAndSetAccessors(context, actionName2) { - if (!context.endPosition) - return void 0; - const info = ts_codefix_exports.getAccessorConvertiblePropertyAtPosition(context.file, context.program, context.startPosition, context.endPosition); - Debug.assert(info && !isRefactorErrorInfo(info), "Expected applicable refactor info"); - const edits = ts_codefix_exports.generateAccessorFromProperty(context.file, context.program, context.startPosition, context.endPosition, context, actionName2); - if (!edits) - return void 0; - const renameFilename = context.file.fileName; - const nameNeedRename = info.renameAccessor ? info.accessorName : info.fieldName; - const renameLocationOffset = isIdentifier(nameNeedRename) ? 0 : -1; - const renameLocation = renameLocationOffset + getRenameLocation( - edits, - renameFilename, - nameNeedRename.text, - /*preferLastLocation*/ - isParameter(info.declaration) - ); - return { renameFilename, renameLocation, edits }; - }, - getAvailableActions(context) { - if (!context.endPosition) - return emptyArray; - const info = ts_codefix_exports.getAccessorConvertiblePropertyAtPosition(context.file, context.program, context.startPosition, context.endPosition, context.triggerReason === "invoked"); - if (!info) - return emptyArray; - if (!isRefactorErrorInfo(info)) { - return [{ - name: actionName, - description: actionDescription, - actions: [generateGetSetAction] - }]; - } - if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: actionName, - description: actionDescription, - actions: [{ ...generateGetSetAction, notApplicableReason: info.error }] - }]; - } - return emptyArray; - } - }); - } - }); - - // src/services/_namespaces/ts.refactor.generateGetAccessorAndSetAccessor.ts - var ts_refactor_generateGetAccessorAndSetAccessor_exports = {}; - var init_ts_refactor_generateGetAccessorAndSetAccessor = __esm({ - "src/services/_namespaces/ts.refactor.generateGetAccessorAndSetAccessor.ts"() { - "use strict"; - init_generateGetAccessorAndSetAccessor(); - } - }); - - // src/services/refactors/inferFunctionReturnType.ts - function getRefactorEditsToInferReturnType(context) { - const info = getInfo4(context); - if (info && !isRefactorErrorInfo(info)) { - const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange7(context.file, t, info.declaration, info.returnTypeNode)); - return { renameFilename: void 0, renameLocation: void 0, edits }; - } - return void 0; - } - function getRefactorActionsToInferReturnType(context) { - const info = getInfo4(context); - if (!info) - return emptyArray; - if (!isRefactorErrorInfo(info)) { - return [{ - name: refactorName13, - description: refactorDescription7, - actions: [inferReturnTypeAction] - }]; - } - if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorName13, - description: refactorDescription7, - actions: [{ ...inferReturnTypeAction, notApplicableReason: info.error }] - }]; - } - return emptyArray; - } - function doChange7(sourceFile, changes, declaration, typeNode) { - const closeParen = findChildOfKind(declaration, 22 /* CloseParenToken */, sourceFile); - const needParens = isArrowFunction(declaration) && closeParen === void 0; - const endNode2 = needParens ? first(declaration.parameters) : closeParen; - if (endNode2) { - if (needParens) { - changes.insertNodeBefore(sourceFile, endNode2, factory.createToken(21 /* OpenParenToken */)); - changes.insertNodeAfter(sourceFile, endNode2, factory.createToken(22 /* CloseParenToken */)); - } - changes.insertNodeAt(sourceFile, endNode2.end, typeNode, { prefix: ": " }); - } - } - function getInfo4(context) { - if (isInJSFile(context.file) || !refactorKindBeginsWith(inferReturnTypeAction.kind, context.kind)) - return; - const token = getTokenAtPosition(context.file, context.startPosition); - const declaration = findAncestor(token, (n) => isBlock(n) || n.parent && isArrowFunction(n.parent) && (n.kind === 39 /* EqualsGreaterThanToken */ || n.parent.body === n) ? "quit" : isConvertibleDeclaration(n)); - if (!declaration || !declaration.body || declaration.type) { - return { error: getLocaleSpecificMessage(Diagnostics.Return_type_must_be_inferred_from_a_function) }; - } - const typeChecker = context.program.getTypeChecker(); - const returnType = tryGetReturnType(typeChecker, declaration); - if (!returnType) { - return { error: getLocaleSpecificMessage(Diagnostics.Could_not_determine_function_return_type) }; - } - const returnTypeNode = typeChecker.typeToTypeNode(returnType, declaration, 1 /* NoTruncation */); - if (returnTypeNode) { - return { declaration, returnTypeNode }; - } - } - function isConvertibleDeclaration(node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - return true; - default: - return false; - } - } - function tryGetReturnType(typeChecker, node) { - if (typeChecker.isImplementationOfOverload(node)) { - const signatures = typeChecker.getTypeAtLocation(node).getCallSignatures(); - if (signatures.length > 1) { - return typeChecker.getUnionType(mapDefined(signatures, (s) => s.getReturnType())); - } - } - const signature = typeChecker.getSignatureFromDeclaration(node); - if (signature) { - return typeChecker.getReturnTypeOfSignature(signature); - } - } - var refactorName13, refactorDescription7, inferReturnTypeAction; - var init_inferFunctionReturnType = __esm({ - "src/services/refactors/inferFunctionReturnType.ts"() { - "use strict"; - init_ts4(); - init_ts_refactor(); - refactorName13 = "Infer function return type"; - refactorDescription7 = getLocaleSpecificMessage(Diagnostics.Infer_function_return_type); - inferReturnTypeAction = { - name: refactorName13, - description: refactorDescription7, - kind: "refactor.rewrite.function.returnType" - }; - registerRefactor(refactorName13, { - kinds: [inferReturnTypeAction.kind], - getEditsForAction: getRefactorEditsToInferReturnType, - getAvailableActions: getRefactorActionsToInferReturnType - }); - } - }); - - // src/services/_namespaces/ts.refactor.inferFunctionReturnType.ts - var ts_refactor_inferFunctionReturnType_exports = {}; - var init_ts_refactor_inferFunctionReturnType = __esm({ - "src/services/_namespaces/ts.refactor.inferFunctionReturnType.ts"() { - "use strict"; - init_inferFunctionReturnType(); - } - }); - - // src/services/_namespaces/ts.refactor.ts - var ts_refactor_exports = {}; - __export(ts_refactor_exports, { - addExportToChanges: () => addExportToChanges, - addExports: () => addExports, - addNewFileToTsconfig: () => addNewFileToTsconfig, - addOrRemoveBracesToArrowFunction: () => ts_refactor_addOrRemoveBracesToArrowFunction_exports, - convertArrowFunctionOrFunctionExpression: () => ts_refactor_convertArrowFunctionOrFunctionExpression_exports, - convertParamsToDestructuredObject: () => ts_refactor_convertParamsToDestructuredObject_exports, - convertStringOrTemplateLiteral: () => ts_refactor_convertStringOrTemplateLiteral_exports, - convertToOptionalChainExpression: () => ts_refactor_convertToOptionalChainExpression_exports, - createNewFileName: () => createNewFileName, - createOldFileImportsFromTargetFile: () => createOldFileImportsFromTargetFile, - deleteMovedStatements: () => deleteMovedStatements, - deleteUnusedImports: () => deleteUnusedImports, - deleteUnusedOldImports: () => deleteUnusedOldImports, - doChangeNamedToNamespaceOrDefault: () => doChangeNamedToNamespaceOrDefault, - extractSymbol: () => ts_refactor_extractSymbol_exports, - filterImport: () => filterImport, - forEachImportInStatement: () => forEachImportInStatement, - generateGetAccessorAndSetAccessor: () => ts_refactor_generateGetAccessorAndSetAccessor_exports, - getApplicableRefactors: () => getApplicableRefactors, - getEditsForRefactor: () => getEditsForRefactor, - getStatementsToMove: () => getStatementsToMove, - getTopLevelDeclarationStatement: () => getTopLevelDeclarationStatement, - getUsageInfo: () => getUsageInfo, - inferFunctionReturnType: () => ts_refactor_inferFunctionReturnType_exports, - isRefactorErrorInfo: () => isRefactorErrorInfo, - isTopLevelDeclaration: () => isTopLevelDeclaration, - makeImportOrRequire: () => makeImportOrRequire, - moduleSpecifierFromImport: () => moduleSpecifierFromImport, - nameOfTopLevelDeclaration: () => nameOfTopLevelDeclaration, - refactorKindBeginsWith: () => refactorKindBeginsWith, - registerRefactor: () => registerRefactor, - updateImportsInOtherFiles: () => updateImportsInOtherFiles - }); - var init_ts_refactor = __esm({ - "src/services/_namespaces/ts.refactor.ts"() { - "use strict"; - init_refactorProvider(); - init_convertExport(); - init_convertImport(); - init_extractType(); - init_helpers(); - init_inlineVariable(); - init_moveToNewFile(); - init_moveToFile(); - init_ts_refactor_addOrRemoveBracesToArrowFunction(); - init_ts_refactor_convertArrowFunctionOrFunctionExpression(); - init_ts_refactor_convertParamsToDestructuredObject(); - init_ts_refactor_convertStringOrTemplateLiteral(); - init_ts_refactor_convertToOptionalChainExpression(); - init_ts_refactor_extractSymbol(); - init_ts_refactor_generateGetAccessorAndSetAccessor(); - init_ts_refactor_inferFunctionReturnType(); - } - }); - - // src/services/classifier2020.ts - function getSemanticClassifications2(program, cancellationToken, sourceFile, span) { - const classifications = getEncodedSemanticClassifications2(program, cancellationToken, sourceFile, span); - Debug.assert(classifications.spans.length % 3 === 0); - const dense = classifications.spans; - const result = []; - for (let i = 0; i < dense.length; i += 3) { - result.push({ - textSpan: createTextSpan(dense[i], dense[i + 1]), - classificationType: dense[i + 2] - }); - } - return result; - } - function getEncodedSemanticClassifications2(program, cancellationToken, sourceFile, span) { - return { - spans: getSemanticTokens(program, sourceFile, span, cancellationToken), - endOfLineState: 0 /* None */ - }; - } - function getSemanticTokens(program, sourceFile, span, cancellationToken) { - const resultTokens = []; - const collector = (node, typeIdx, modifierSet) => { - resultTokens.push(node.getStart(sourceFile), node.getWidth(sourceFile), (typeIdx + 1 << 8 /* typeOffset */) + modifierSet); - }; - if (program && sourceFile) { - collectTokens(program, sourceFile, span, collector, cancellationToken); - } - return resultTokens; - } - function collectTokens(program, sourceFile, span, collector, cancellationToken) { - const typeChecker = program.getTypeChecker(); - let inJSXElement = false; - function visit(node) { - switch (node.kind) { - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - cancellationToken.throwIfCancellationRequested(); - } - if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { - return; - } - const prevInJSXElement = inJSXElement; - if (isJsxElement(node) || isJsxSelfClosingElement(node)) { - inJSXElement = true; - } - if (isJsxExpression(node)) { - inJSXElement = false; - } - if (isIdentifier(node) && !inJSXElement && !inImportClause(node) && !isInfinityOrNaNString(node.escapedText)) { - let symbol = typeChecker.getSymbolAtLocation(node); - if (symbol) { - if (symbol.flags & 2097152 /* Alias */) { - symbol = typeChecker.getAliasedSymbol(symbol); - } - let typeIdx = classifySymbol2(symbol, getMeaningFromLocation(node)); - if (typeIdx !== void 0) { - let modifierSet = 0; - if (node.parent) { - const parentIsDeclaration = isBindingElement(node.parent) || tokenFromDeclarationMapping.get(node.parent.kind) === typeIdx; - if (parentIsDeclaration && node.parent.name === node) { - modifierSet = 1 << 0 /* declaration */; - } - } - if (typeIdx === 6 /* parameter */ && isRightSideOfQualifiedNameOrPropertyAccess2(node)) { - typeIdx = 9 /* property */; - } - typeIdx = reclassifyByType(typeChecker, node, typeIdx); - const decl = symbol.valueDeclaration; - if (decl) { - const modifiers = getCombinedModifierFlags(decl); - const nodeFlags = getCombinedNodeFlags(decl); - if (modifiers & 32 /* Static */) { - modifierSet |= 1 << 1 /* static */; - } - if (modifiers & 512 /* Async */) { - modifierSet |= 1 << 2 /* async */; - } - if (typeIdx !== 0 /* class */ && typeIdx !== 2 /* interface */) { - if (modifiers & 64 /* Readonly */ || nodeFlags & 2 /* Const */ || symbol.getFlags() & 8 /* EnumMember */) { - modifierSet |= 1 << 3 /* readonly */; - } - } - if ((typeIdx === 7 /* variable */ || typeIdx === 10 /* function */) && isLocalDeclaration(decl, sourceFile)) { - modifierSet |= 1 << 5 /* local */; - } - if (program.isSourceFileDefaultLibrary(decl.getSourceFile())) { - modifierSet |= 1 << 4 /* defaultLibrary */; - } - } else if (symbol.declarations && symbol.declarations.some((d) => program.isSourceFileDefaultLibrary(d.getSourceFile()))) { - modifierSet |= 1 << 4 /* defaultLibrary */; - } - collector(node, typeIdx, modifierSet); - } - } - } - forEachChild(node, visit); - inJSXElement = prevInJSXElement; - } - visit(sourceFile); - } - function classifySymbol2(symbol, meaning) { - const flags = symbol.getFlags(); - if (flags & 32 /* Class */) { - return 0 /* class */; - } else if (flags & 384 /* Enum */) { - return 1 /* enum */; - } else if (flags & 524288 /* TypeAlias */) { - return 5 /* type */; - } else if (flags & 64 /* Interface */) { - if (meaning & 2 /* Type */) { - return 2 /* interface */; - } - } else if (flags & 262144 /* TypeParameter */) { - return 4 /* typeParameter */; - } - let decl = symbol.valueDeclaration || symbol.declarations && symbol.declarations[0]; - if (decl && isBindingElement(decl)) { - decl = getDeclarationForBindingElement(decl); - } - return decl && tokenFromDeclarationMapping.get(decl.kind); - } - function reclassifyByType(typeChecker, node, typeIdx) { - if (typeIdx === 7 /* variable */ || typeIdx === 9 /* property */ || typeIdx === 6 /* parameter */) { - const type = typeChecker.getTypeAtLocation(node); - if (type) { - const test = (condition) => { - return condition(type) || type.isUnion() && type.types.some(condition); - }; - if (typeIdx !== 6 /* parameter */ && test((t) => t.getConstructSignatures().length > 0)) { - return 0 /* class */; - } - if (test((t) => t.getCallSignatures().length > 0) && !test((t) => t.getProperties().length > 0) || isExpressionInCallExpression(node)) { - return typeIdx === 9 /* property */ ? 11 /* member */ : 10 /* function */; - } - } - } - return typeIdx; - } - function isLocalDeclaration(decl, sourceFile) { - if (isBindingElement(decl)) { - decl = getDeclarationForBindingElement(decl); - } - if (isVariableDeclaration(decl)) { - return (!isSourceFile(decl.parent.parent.parent) || isCatchClause(decl.parent)) && decl.getSourceFile() === sourceFile; - } else if (isFunctionDeclaration(decl)) { - return !isSourceFile(decl.parent) && decl.getSourceFile() === sourceFile; - } - return false; - } - function getDeclarationForBindingElement(element) { - while (true) { - if (isBindingElement(element.parent.parent)) { - element = element.parent.parent; - } else { - return element.parent.parent; - } - } - } - function inImportClause(node) { - const parent2 = node.parent; - return parent2 && (isImportClause(parent2) || isImportSpecifier(parent2) || isNamespaceImport(parent2)); - } - function isExpressionInCallExpression(node) { - while (isRightSideOfQualifiedNameOrPropertyAccess2(node)) { - node = node.parent; - } - return isCallExpression(node.parent) && node.parent.expression === node; - } - function isRightSideOfQualifiedNameOrPropertyAccess2(node) { - return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node; - } - var TokenEncodingConsts, TokenType, TokenModifier, tokenFromDeclarationMapping; - var init_classifier2020 = __esm({ - "src/services/classifier2020.ts"() { - "use strict"; - init_ts4(); - TokenEncodingConsts = /* @__PURE__ */ ((TokenEncodingConsts2) => { - TokenEncodingConsts2[TokenEncodingConsts2["typeOffset"] = 8] = "typeOffset"; - TokenEncodingConsts2[TokenEncodingConsts2["modifierMask"] = 255] = "modifierMask"; - return TokenEncodingConsts2; - })(TokenEncodingConsts || {}); - TokenType = /* @__PURE__ */ ((TokenType2) => { - TokenType2[TokenType2["class"] = 0] = "class"; - TokenType2[TokenType2["enum"] = 1] = "enum"; - TokenType2[TokenType2["interface"] = 2] = "interface"; - TokenType2[TokenType2["namespace"] = 3] = "namespace"; - TokenType2[TokenType2["typeParameter"] = 4] = "typeParameter"; - TokenType2[TokenType2["type"] = 5] = "type"; - TokenType2[TokenType2["parameter"] = 6] = "parameter"; - TokenType2[TokenType2["variable"] = 7] = "variable"; - TokenType2[TokenType2["enumMember"] = 8] = "enumMember"; - TokenType2[TokenType2["property"] = 9] = "property"; - TokenType2[TokenType2["function"] = 10] = "function"; - TokenType2[TokenType2["member"] = 11] = "member"; - return TokenType2; - })(TokenType || {}); - TokenModifier = /* @__PURE__ */ ((TokenModifier2) => { - TokenModifier2[TokenModifier2["declaration"] = 0] = "declaration"; - TokenModifier2[TokenModifier2["static"] = 1] = "static"; - TokenModifier2[TokenModifier2["async"] = 2] = "async"; - TokenModifier2[TokenModifier2["readonly"] = 3] = "readonly"; - TokenModifier2[TokenModifier2["defaultLibrary"] = 4] = "defaultLibrary"; - TokenModifier2[TokenModifier2["local"] = 5] = "local"; - return TokenModifier2; - })(TokenModifier || {}); - tokenFromDeclarationMapping = /* @__PURE__ */ new Map([ - [260 /* VariableDeclaration */, 7 /* variable */], - [169 /* Parameter */, 6 /* parameter */], - [172 /* PropertyDeclaration */, 9 /* property */], - [267 /* ModuleDeclaration */, 3 /* namespace */], - [266 /* EnumDeclaration */, 1 /* enum */], - [306 /* EnumMember */, 8 /* enumMember */], - [263 /* ClassDeclaration */, 0 /* class */], - [174 /* MethodDeclaration */, 11 /* member */], - [262 /* FunctionDeclaration */, 10 /* function */], - [218 /* FunctionExpression */, 10 /* function */], - [173 /* MethodSignature */, 11 /* member */], - [177 /* GetAccessor */, 9 /* property */], - [178 /* SetAccessor */, 9 /* property */], - [171 /* PropertySignature */, 9 /* property */], - [264 /* InterfaceDeclaration */, 2 /* interface */], - [265 /* TypeAliasDeclaration */, 5 /* type */], - [168 /* TypeParameter */, 4 /* typeParameter */], - [303 /* PropertyAssignment */, 9 /* property */], - [304 /* ShorthandPropertyAssignment */, 9 /* property */] - ]); - } - }); - - // src/services/services.ts - function createNode(kind, pos, end, parent2) { - const node = isNodeKind(kind) ? new NodeObject(kind, pos, end) : kind === 80 /* Identifier */ ? new IdentifierObject(80 /* Identifier */, pos, end) : kind === 81 /* PrivateIdentifier */ ? new PrivateIdentifierObject(81 /* PrivateIdentifier */, pos, end) : new TokenObject(kind, pos, end); - node.parent = parent2; - node.flags = parent2.flags & 101441536 /* ContextFlags */; - return node; - } - function createChildren(node, sourceFile) { - if (!isNodeKind(node.kind)) { - return emptyArray; - } - const children = []; - if (isJSDocCommentContainingNode(node)) { - node.forEachChild((child) => { - children.push(child); - }); - return children; - } - scanner.setText((sourceFile || node.getSourceFile()).text); - let pos = node.pos; - const processNode = (child) => { - addSyntheticNodes(children, pos, child.pos, node); - children.push(child); - pos = child.end; - }; - const processNodes = (nodes) => { - addSyntheticNodes(children, pos, nodes.pos, node); - children.push(createSyntaxList(nodes, node)); - pos = nodes.end; - }; - forEach(node.jsDoc, processNode); - pos = node.pos; - node.forEachChild(processNode, processNodes); - addSyntheticNodes(children, pos, node.end, node); - scanner.setText(void 0); - return children; - } - function addSyntheticNodes(nodes, pos, end, parent2) { - scanner.resetTokenState(pos); - while (pos < end) { - const token = scanner.scan(); - const textPos = scanner.getTokenEnd(); - if (textPos <= end) { - if (token === 80 /* Identifier */) { - if (hasTabstop(parent2)) { - continue; - } - Debug.fail(`Did not expect ${Debug.formatSyntaxKind(parent2.kind)} to have an Identifier in its trivia`); - } - nodes.push(createNode(token, pos, textPos, parent2)); - } - pos = textPos; - if (token === 1 /* EndOfFileToken */) { - break; - } - } - } - function createSyntaxList(nodes, parent2) { - const list = createNode(358 /* SyntaxList */, nodes.pos, nodes.end, parent2); - list._children = []; - let pos = nodes.pos; - for (const node of nodes) { - addSyntheticNodes(list._children, pos, node.pos, parent2); - list._children.push(node); - pos = node.end; - } - addSyntheticNodes(list._children, pos, nodes.end, parent2); - return list; - } - function hasJSDocInheritDocTag(node) { - return getJSDocTags(node).some((tag) => tag.tagName.text === "inheritDoc" || tag.tagName.text === "inheritdoc"); - } - function getJsDocTagsOfDeclarations(declarations, checker) { - if (!declarations) - return emptyArray; - let tags = ts_JsDoc_exports.getJsDocTagsFromDeclarations(declarations, checker); - if (checker && (tags.length === 0 || declarations.some(hasJSDocInheritDocTag))) { - const seenSymbols = /* @__PURE__ */ new Set(); - for (const declaration of declarations) { - const inheritedTags = findBaseOfDeclaration(checker, declaration, (symbol) => { - var _a; - if (!seenSymbols.has(symbol)) { - seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { - return symbol.getContextualJsDocTags(declaration, checker); - } - return ((_a = symbol.declarations) == null ? void 0 : _a.length) === 1 ? symbol.getJsDocTags() : void 0; - } - }); - if (inheritedTags) { - tags = [...inheritedTags, ...tags]; - } - } - } - return tags; - } - function getDocumentationComment(declarations, checker) { - if (!declarations) - return emptyArray; - let doc = ts_JsDoc_exports.getJsDocCommentsFromDeclarations(declarations, checker); - if (checker && (doc.length === 0 || declarations.some(hasJSDocInheritDocTag))) { - const seenSymbols = /* @__PURE__ */ new Set(); - for (const declaration of declarations) { - const inheritedDocs = findBaseOfDeclaration(checker, declaration, (symbol) => { - if (!seenSymbols.has(symbol)) { - seenSymbols.add(symbol); - if (declaration.kind === 177 /* GetAccessor */ || declaration.kind === 178 /* SetAccessor */) { - return symbol.getContextualDocumentationComment(declaration, checker); - } - return symbol.getDocumentationComment(checker); - } - }); - if (inheritedDocs) - doc = doc.length === 0 ? inheritedDocs.slice() : inheritedDocs.concat(lineBreakPart(), doc); - } - } - return doc; - } - function findBaseOfDeclaration(checker, declaration, cb) { - var _a; - const classOrInterfaceDeclaration = ((_a = declaration.parent) == null ? void 0 : _a.kind) === 176 /* Constructor */ ? declaration.parent.parent : declaration.parent; - if (!classOrInterfaceDeclaration) - return; - const isStaticMember = hasStaticModifier(declaration); - return firstDefined(getAllSuperTypeNodes(classOrInterfaceDeclaration), (superTypeNode) => { - const baseType = checker.getTypeAtLocation(superTypeNode); - const type = isStaticMember && baseType.symbol ? checker.getTypeOfSymbol(baseType.symbol) : baseType; - const symbol = checker.getPropertyOfType(type, declaration.symbol.name); - return symbol ? cb(symbol) : void 0; - }); - } - function getServicesObjectAllocator() { - return { - getNodeConstructor: () => NodeObject, - getTokenConstructor: () => TokenObject, - getIdentifierConstructor: () => IdentifierObject, - getPrivateIdentifierConstructor: () => PrivateIdentifierObject, - getSourceFileConstructor: () => SourceFileObject, - getSymbolConstructor: () => SymbolObject, - getTypeConstructor: () => TypeObject, - getSignatureConstructor: () => SignatureObject, - getSourceMapSourceConstructor: () => SourceMapSourceObject - }; - } - function toEditorSettings(optionsAsMap) { - let allPropertiesAreCamelCased = true; - for (const key in optionsAsMap) { - if (hasProperty(optionsAsMap, key) && !isCamelCase(key)) { - allPropertiesAreCamelCased = false; - break; - } - } - if (allPropertiesAreCamelCased) { - return optionsAsMap; - } - const settings = {}; - for (const key in optionsAsMap) { - if (hasProperty(optionsAsMap, key)) { - const newKey = isCamelCase(key) ? key : key.charAt(0).toLowerCase() + key.substr(1); - settings[newKey] = optionsAsMap[key]; - } - } - return settings; - } - function isCamelCase(s) { - return !s.length || s.charAt(0) === s.charAt(0).toLowerCase(); - } - function displayPartsToString(displayParts) { - if (displayParts) { - return map(displayParts, (displayPart2) => displayPart2.text).join(""); - } - return ""; - } - function getDefaultCompilerOptions2() { - return { - target: 1 /* ES5 */, - jsx: 1 /* Preserve */ - }; - } - function getSupportedCodeFixes() { - return ts_codefix_exports.getSupportedErrorCodes(); - } - function setSourceFileFields(sourceFile, scriptSnapshot, version2) { - sourceFile.version = version2; - sourceFile.scriptSnapshot = scriptSnapshot; - } - function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTargetOrOptions, version2, setNodeParents, scriptKind) { - const sourceFile = createSourceFile(fileName, getSnapshotText(scriptSnapshot), scriptTargetOrOptions, setNodeParents, scriptKind); - setSourceFileFields(sourceFile, scriptSnapshot, version2); - return sourceFile; - } - function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version2, textChangeRange, aggressiveChecks) { - if (textChangeRange) { - if (version2 !== sourceFile.version) { - let newText; - const prefix = textChangeRange.span.start !== 0 ? sourceFile.text.substr(0, textChangeRange.span.start) : ""; - const suffix = textSpanEnd(textChangeRange.span) !== sourceFile.text.length ? sourceFile.text.substr(textSpanEnd(textChangeRange.span)) : ""; - if (textChangeRange.newLength === 0) { - newText = prefix && suffix ? prefix + suffix : prefix || suffix; - } else { - const changedText = scriptSnapshot.getText(textChangeRange.span.start, textChangeRange.span.start + textChangeRange.newLength); - newText = prefix && suffix ? prefix + changedText + suffix : prefix ? prefix + changedText : changedText + suffix; - } - const newSourceFile = updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks); - setSourceFileFields(newSourceFile, scriptSnapshot, version2); - newSourceFile.nameTable = void 0; - if (sourceFile !== newSourceFile && sourceFile.scriptSnapshot) { - if (sourceFile.scriptSnapshot.dispose) { - sourceFile.scriptSnapshot.dispose(); - } - sourceFile.scriptSnapshot = void 0; - } - return newSourceFile; - } - } - const options = { - languageVersion: sourceFile.languageVersion, - impliedNodeFormat: sourceFile.impliedNodeFormat, - setExternalModuleIndicator: sourceFile.setExternalModuleIndicator - }; - return createLanguageServiceSourceFile( - sourceFile.fileName, - scriptSnapshot, - options, - version2, - /*setNodeParents*/ - true, - sourceFile.scriptKind - ); - } - function createLanguageService(host, documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()), syntaxOnlyOrLanguageServiceMode) { - var _a; - let languageServiceMode; - if (syntaxOnlyOrLanguageServiceMode === void 0) { - languageServiceMode = 0 /* Semantic */; - } else if (typeof syntaxOnlyOrLanguageServiceMode === "boolean") { - languageServiceMode = syntaxOnlyOrLanguageServiceMode ? 2 /* Syntactic */ : 0 /* Semantic */; - } else { - languageServiceMode = syntaxOnlyOrLanguageServiceMode; - } - const syntaxTreeCache = new SyntaxTreeCache(host); - let program; - let lastProjectVersion; - let lastTypesRootVersion = 0; - const cancellationToken = host.getCancellationToken ? new CancellationTokenObject(host.getCancellationToken()) : NoopCancellationToken; - const currentDirectory = host.getCurrentDirectory(); - maybeSetLocalizedDiagnosticMessages((_a = host.getLocalizedDiagnosticMessages) == null ? void 0 : _a.bind(host)); - function log(message) { - if (host.log) { - host.log(message); - } - } - const useCaseSensitiveFileNames2 = hostUsesCaseSensitiveFileNames(host); - const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2); - const sourceMapper = getSourceMapper({ - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, - getCurrentDirectory: () => currentDirectory, - getProgram, - fileExists: maybeBind(host, host.fileExists), - readFile: maybeBind(host, host.readFile), - getDocumentPositionMapper: maybeBind(host, host.getDocumentPositionMapper), - getSourceFileLike: maybeBind(host, host.getSourceFileLike), - log - }); - function getValidSourceFile(fileName) { - const sourceFile = program.getSourceFile(fileName); - if (!sourceFile) { - const error2 = new Error(`Could not find source file: '${fileName}'.`); - error2.ProgramFiles = program.getSourceFiles().map((f) => f.fileName); - throw error2; - } - return sourceFile; - } - function synchronizeHostData() { - var _a2, _b, _c; - Debug.assert(languageServiceMode !== 2 /* Syntactic */); - if (host.getProjectVersion) { - const hostProjectVersion = host.getProjectVersion(); - if (hostProjectVersion) { - if (lastProjectVersion === hostProjectVersion && !((_a2 = host.hasChangedAutomaticTypeDirectiveNames) == null ? void 0 : _a2.call(host))) { - return; - } - lastProjectVersion = hostProjectVersion; - } - } - const typeRootsVersion = host.getTypeRootsVersion ? host.getTypeRootsVersion() : 0; - if (lastTypesRootVersion !== typeRootsVersion) { - log("TypeRoots version has changed; provide new program"); - program = void 0; - lastTypesRootVersion = typeRootsVersion; - } - const rootFileNames = host.getScriptFileNames().slice(); - const newSettings = host.getCompilationSettings() || getDefaultCompilerOptions2(); - const hasInvalidatedResolutions = host.hasInvalidatedResolutions || returnFalse; - const hasInvalidatedLibResolutions = maybeBind(host, host.hasInvalidatedLibResolutions) || returnFalse; - const hasChangedAutomaticTypeDirectiveNames = maybeBind(host, host.hasChangedAutomaticTypeDirectiveNames); - const projectReferences = (_b = host.getProjectReferences) == null ? void 0 : _b.call(host); - let parsedCommandLines; - let compilerHost = { - getSourceFile: getOrCreateSourceFile, - getSourceFileByPath: getOrCreateSourceFileByPath, - getCancellationToken: () => cancellationToken, - getCanonicalFileName, - useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2, - getNewLine: () => getNewLineCharacter(newSettings), - getDefaultLibFileName: (options2) => host.getDefaultLibFileName(options2), - writeFile: noop, - getCurrentDirectory: () => currentDirectory, - fileExists: (fileName) => host.fileExists(fileName), - readFile: (fileName) => host.readFile && host.readFile(fileName), - getSymlinkCache: maybeBind(host, host.getSymlinkCache), - realpath: maybeBind(host, host.realpath), - directoryExists: (directoryName) => { - return directoryProbablyExists(directoryName, host); - }, - getDirectories: (path) => { - return host.getDirectories ? host.getDirectories(path) : []; - }, - readDirectory: (path, extensions, exclude, include, depth) => { - Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'"); - return host.readDirectory(path, extensions, exclude, include, depth); - }, - onReleaseOldSourceFile, - onReleaseParsedCommandLine, - hasInvalidatedResolutions, - hasInvalidatedLibResolutions, - hasChangedAutomaticTypeDirectiveNames, - trace: maybeBind(host, host.trace), - resolveModuleNames: maybeBind(host, host.resolveModuleNames), - getModuleResolutionCache: maybeBind(host, host.getModuleResolutionCache), - createHash: maybeBind(host, host.createHash), - resolveTypeReferenceDirectives: maybeBind(host, host.resolveTypeReferenceDirectives), - resolveModuleNameLiterals: maybeBind(host, host.resolveModuleNameLiterals), - resolveTypeReferenceDirectiveReferences: maybeBind(host, host.resolveTypeReferenceDirectiveReferences), - resolveLibrary: maybeBind(host, host.resolveLibrary), - useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect), - getParsedCommandLine - }; - const originalGetSourceFile = compilerHost.getSourceFile; - const { getSourceFileWithCache } = changeCompilerHostLikeToUseCache( - compilerHost, - (fileName) => toPath(fileName, currentDirectory, getCanonicalFileName), - (...args) => originalGetSourceFile.call(compilerHost, ...args) - ); - compilerHost.getSourceFile = getSourceFileWithCache; - (_c = host.setCompilerHost) == null ? void 0 : _c.call(host, compilerHost); - const parseConfigHost = { - useCaseSensitiveFileNames: useCaseSensitiveFileNames2, - fileExists: (fileName) => compilerHost.fileExists(fileName), - readFile: (fileName) => compilerHost.readFile(fileName), - directoryExists: (f) => compilerHost.directoryExists(f), - getDirectories: (f) => compilerHost.getDirectories(f), - realpath: compilerHost.realpath, - readDirectory: (...args) => compilerHost.readDirectory(...args), - trace: compilerHost.trace, - getCurrentDirectory: compilerHost.getCurrentDirectory, - onUnRecoverableConfigFileDiagnostic: noop - }; - const documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings); - let releasedScriptKinds = /* @__PURE__ */ new Set(); - if (isProgramUptoDate(program, rootFileNames, newSettings, (_path, fileName) => host.getScriptVersion(fileName), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { - compilerHost = void 0; - parsedCommandLines = void 0; - releasedScriptKinds = void 0; - return; - } - const options = { - rootNames: rootFileNames, - options: newSettings, - host: compilerHost, - oldProgram: program, - projectReferences - }; - program = createProgram(options); - compilerHost = void 0; - parsedCommandLines = void 0; - releasedScriptKinds = void 0; - sourceMapper.clearCache(); - program.getTypeChecker(); - return; - function getParsedCommandLine(fileName) { - const path = toPath(fileName, currentDirectory, getCanonicalFileName); - const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(path); - if (existing !== void 0) - return existing || void 0; - const result = host.getParsedCommandLine ? host.getParsedCommandLine(fileName) : getParsedCommandLineOfConfigFileUsingSourceFile(fileName); - (parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(path, result || false); - return result; - } - function getParsedCommandLineOfConfigFileUsingSourceFile(configFileName) { - const result = getOrCreateSourceFile(configFileName, 100 /* JSON */); - if (!result) - return void 0; - result.path = toPath(configFileName, currentDirectory, getCanonicalFileName); - result.resolvedPath = result.path; - result.originalFileName = result.fileName; - return parseJsonSourceFileConfigFileContent( - result, - parseConfigHost, - getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), - /*existingOptions*/ - void 0, - getNormalizedAbsolutePath(configFileName, currentDirectory) - ); - } - function onReleaseParsedCommandLine(configFileName, oldResolvedRef, oldOptions) { - var _a3; - if (host.getParsedCommandLine) { - (_a3 = host.onReleaseParsedCommandLine) == null ? void 0 : _a3.call(host, configFileName, oldResolvedRef, oldOptions); - } else if (oldResolvedRef) { - onReleaseOldSourceFile(oldResolvedRef.sourceFile, oldOptions); - } - } - function onReleaseOldSourceFile(oldSourceFile, oldOptions) { - const oldSettingsKey = documentRegistry.getKeyForCompilationSettings(oldOptions); - documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, oldSettingsKey, oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat); - } - function getOrCreateSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) { - return getOrCreateSourceFileByPath(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), languageVersionOrOptions, onError, shouldCreateNewSourceFile); - } - function getOrCreateSourceFileByPath(fileName, path, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) { - Debug.assert(compilerHost, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host."); - const scriptSnapshot = host.getScriptSnapshot(fileName); - if (!scriptSnapshot) { - return void 0; - } - const scriptKind = getScriptKind(fileName, host); - const scriptVersion = host.getScriptVersion(fileName); - if (!shouldCreateNewSourceFile) { - const oldSourceFile = program && program.getSourceFileByPath(path); - if (oldSourceFile) { - if (scriptKind === oldSourceFile.scriptKind || releasedScriptKinds.has(oldSourceFile.resolvedPath)) { - return documentRegistry.updateDocumentWithKey(fileName, path, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions); - } else { - documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()), oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat); - releasedScriptKinds.add(oldSourceFile.resolvedPath); - } - } - } - return documentRegistry.acquireDocumentWithKey(fileName, path, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions); - } - } - function getProgram() { - if (languageServiceMode === 2 /* Syntactic */) { - Debug.assert(program === void 0); - return void 0; - } - synchronizeHostData(); - return program; - } - function getAutoImportProvider() { - var _a2; - return (_a2 = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a2.call(host); - } - function updateIsDefinitionOfReferencedSymbols(referencedSymbols, knownSymbolSpans) { - const checker = program.getTypeChecker(); - const symbol = getSymbolForProgram(); - if (!symbol) - return false; - for (const referencedSymbol of referencedSymbols) { - for (const ref of referencedSymbol.references) { - const refNode = getNodeForSpan(ref); - Debug.assertIsDefined(refNode); - if (knownSymbolSpans.has(ref) || ts_FindAllReferences_exports.isDeclarationOfSymbol(refNode, symbol)) { - knownSymbolSpans.add(ref); - ref.isDefinition = true; - const mappedSpan = getMappedDocumentSpan(ref, sourceMapper, maybeBind(host, host.fileExists)); - if (mappedSpan) { - knownSymbolSpans.add(mappedSpan); - } - } else { - ref.isDefinition = false; - } - } - } - return true; - function getSymbolForProgram() { - for (const referencedSymbol of referencedSymbols) { - for (const ref of referencedSymbol.references) { - if (knownSymbolSpans.has(ref)) { - const refNode = getNodeForSpan(ref); - Debug.assertIsDefined(refNode); - return checker.getSymbolAtLocation(refNode); - } - const mappedSpan = getMappedDocumentSpan(ref, sourceMapper, maybeBind(host, host.fileExists)); - if (mappedSpan && knownSymbolSpans.has(mappedSpan)) { - const refNode = getNodeForSpan(mappedSpan); - if (refNode) { - return checker.getSymbolAtLocation(refNode); - } - } - } - } - return void 0; - } - function getNodeForSpan(docSpan) { - const sourceFile = program.getSourceFile(docSpan.fileName); - if (!sourceFile) - return void 0; - const rawNode = getTouchingPropertyName(sourceFile, docSpan.textSpan.start); - const adjustedNode = ts_FindAllReferences_exports.Core.getAdjustedNode(rawNode, { use: ts_FindAllReferences_exports.FindReferencesUse.References }); - return adjustedNode; - } - } - function cleanupSemanticCache() { - if (program) { - const key = documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()); - forEach(program.getSourceFiles(), (f) => documentRegistry.releaseDocumentWithKey(f.resolvedPath, key, f.scriptKind, f.impliedNodeFormat)); - program = void 0; - } - } - function dispose() { - cleanupSemanticCache(); - host = void 0; - } - function getSyntacticDiagnostics(fileName) { - synchronizeHostData(); - return program.getSyntacticDiagnostics(getValidSourceFile(fileName), cancellationToken).slice(); - } - function getSemanticDiagnostics(fileName) { - synchronizeHostData(); - const targetSourceFile = getValidSourceFile(fileName); - const semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile, cancellationToken); - if (!getEmitDeclarations(program.getCompilerOptions())) { - return semanticDiagnostics.slice(); - } - const declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile, cancellationToken); - return [...semanticDiagnostics, ...declarationDiagnostics]; - } - function getSuggestionDiagnostics(fileName) { - synchronizeHostData(); - return computeSuggestionDiagnostics(getValidSourceFile(fileName), program, cancellationToken); - } - function getCompilerOptionsDiagnostics() { - synchronizeHostData(); - return [...program.getOptionsDiagnostics(cancellationToken), ...program.getGlobalDiagnostics(cancellationToken)]; - } - function getCompletionsAtPosition2(fileName, position, options = emptyOptions, formattingSettings) { - const fullPreferences = { - ...identity(options), - // avoid excess property check - includeCompletionsForModuleExports: options.includeCompletionsForModuleExports || options.includeExternalModuleExports, - includeCompletionsWithInsertText: options.includeCompletionsWithInsertText || options.includeInsertTextCompletions - }; - synchronizeHostData(); - return ts_Completions_exports.getCompletionsAtPosition( - host, - program, - log, - getValidSourceFile(fileName), - position, - fullPreferences, - options.triggerCharacter, - options.triggerKind, - cancellationToken, - formattingSettings && ts_formatting_exports.getFormatContext(formattingSettings, host), - options.includeSymbol - ); - } - function getCompletionEntryDetails2(fileName, position, name, formattingOptions, source, preferences = emptyOptions, data) { - synchronizeHostData(); - return ts_Completions_exports.getCompletionEntryDetails( - program, - log, - getValidSourceFile(fileName), - position, - { name, source, data }, - host, - formattingOptions && ts_formatting_exports.getFormatContext(formattingOptions, host), - // TODO: GH#18217 - preferences, - cancellationToken - ); - } - function getCompletionEntrySymbol2(fileName, position, name, source, preferences = emptyOptions) { - synchronizeHostData(); - return ts_Completions_exports.getCompletionEntrySymbol(program, log, getValidSourceFile(fileName), position, { name, source }, host, preferences); - } - function getQuickInfoAtPosition(fileName, position) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - const node = getTouchingPropertyName(sourceFile, position); - if (node === sourceFile) { - return void 0; - } - const typeChecker = program.getTypeChecker(); - const nodeForQuickInfo = getNodeForQuickInfo(node); - const symbol = getSymbolAtLocationForQuickInfo(nodeForQuickInfo, typeChecker); - if (!symbol || typeChecker.isUnknownSymbol(symbol)) { - const type = shouldGetType(sourceFile, nodeForQuickInfo, position) ? typeChecker.getTypeAtLocation(nodeForQuickInfo) : void 0; - return type && { - kind: "" /* unknown */, - kindModifiers: "" /* none */, - textSpan: createTextSpanFromNode(nodeForQuickInfo, sourceFile), - displayParts: typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => typeToDisplayParts(typeChecker2, type, getContainerNode(nodeForQuickInfo))), - documentation: type.symbol ? type.symbol.getDocumentationComment(typeChecker) : void 0, - tags: type.symbol ? type.symbol.getJsDocTags(typeChecker) : void 0 - }; - } - const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken( - cancellationToken, - (typeChecker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker2, symbol, sourceFile, getContainerNode(nodeForQuickInfo), nodeForQuickInfo) - ); - return { - kind: symbolKind, - kindModifiers: ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), - textSpan: createTextSpanFromNode(nodeForQuickInfo, sourceFile), - displayParts, - documentation, - tags - }; - } - function getNodeForQuickInfo(node) { - if (isNewExpression(node.parent) && node.pos === node.parent.pos) { - return node.parent.expression; - } - if (isNamedTupleMember(node.parent) && node.pos === node.parent.pos) { - return node.parent; - } - if (isImportMeta(node.parent) && node.parent.name === node) { - return node.parent; - } - if (isJsxNamespacedName(node.parent)) { - return node.parent; - } - return node; - } - function shouldGetType(sourceFile, node, position) { - switch (node.kind) { - case 80 /* Identifier */: - return !isLabelName(node) && !isTagName(node) && !isConstTypeReference(node.parent); - case 211 /* PropertyAccessExpression */: - case 166 /* QualifiedName */: - return !isInComment(sourceFile, position); - case 110 /* ThisKeyword */: - case 197 /* ThisType */: - case 108 /* SuperKeyword */: - case 202 /* NamedTupleMember */: - return true; - case 236 /* MetaProperty */: - return isImportMeta(node); - default: - return false; - } - } - function getDefinitionAtPosition2(fileName, position, searchOtherFilesOnly, stopAtAlias) { - synchronizeHostData(); - return ts_GoToDefinition_exports.getDefinitionAtPosition(program, getValidSourceFile(fileName), position, searchOtherFilesOnly, stopAtAlias); - } - function getDefinitionAndBoundSpan2(fileName, position) { - synchronizeHostData(); - return ts_GoToDefinition_exports.getDefinitionAndBoundSpan(program, getValidSourceFile(fileName), position); - } - function getTypeDefinitionAtPosition2(fileName, position) { - synchronizeHostData(); - return ts_GoToDefinition_exports.getTypeDefinitionAtPosition(program.getTypeChecker(), getValidSourceFile(fileName), position); - } - function getImplementationAtPosition(fileName, position) { - synchronizeHostData(); - return ts_FindAllReferences_exports.getImplementationsAtPosition(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position); - } - function getDocumentHighlights(fileName, position, filesToSearch) { - const normalizedFileName = normalizePath(fileName); - Debug.assert(filesToSearch.some((f) => normalizePath(f) === normalizedFileName)); - synchronizeHostData(); - const sourceFilesToSearch = mapDefined(filesToSearch, (fileName2) => program.getSourceFile(fileName2)); - const sourceFile = getValidSourceFile(fileName); - return DocumentHighlights.getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch); - } - function findRenameLocations(fileName, position, findInStrings, findInComments, preferences) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - const node = getAdjustedRenameLocation(getTouchingPropertyName(sourceFile, position)); - if (!ts_Rename_exports.nodeIsEligibleForRename(node)) - return void 0; - if (isIdentifier(node) && (isJsxOpeningElement(node.parent) || isJsxClosingElement(node.parent)) && isIntrinsicJsxName(node.escapedText)) { - const { openingElement, closingElement } = node.parent.parent; - return [openingElement, closingElement].map((node2) => { - const textSpan = createTextSpanFromNode(node2.tagName, sourceFile); - return { - fileName: sourceFile.fileName, - textSpan, - ...ts_FindAllReferences_exports.toContextSpan(textSpan, sourceFile, node2.parent) - }; - }); - } else { - const quotePreference = getQuotePreference(sourceFile, preferences ?? emptyOptions); - const providePrefixAndSuffixTextForRename = typeof preferences === "boolean" ? preferences : preferences == null ? void 0 : preferences.providePrefixAndSuffixTextForRename; - return getReferencesWorker2( - node, - position, - { findInStrings, findInComments, providePrefixAndSuffixTextForRename, use: ts_FindAllReferences_exports.FindReferencesUse.Rename }, - (entry, originalNode, checker) => ts_FindAllReferences_exports.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false, quotePreference) - ); - } - } - function getReferencesAtPosition(fileName, position) { - synchronizeHostData(); - return getReferencesWorker2(getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: ts_FindAllReferences_exports.FindReferencesUse.References }, ts_FindAllReferences_exports.toReferenceEntry); - } - function getReferencesWorker2(node, position, options, cb) { - synchronizeHostData(); - const sourceFiles = options && options.use === ts_FindAllReferences_exports.FindReferencesUse.Rename ? program.getSourceFiles().filter((sourceFile) => !program.isSourceFileDefaultLibrary(sourceFile)) : program.getSourceFiles(); - return ts_FindAllReferences_exports.findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, cb); - } - function findReferences(fileName, position) { - synchronizeHostData(); - return ts_FindAllReferences_exports.findReferencedSymbols(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position); - } - function getFileReferences(fileName) { - synchronizeHostData(); - return ts_FindAllReferences_exports.Core.getReferencesForFileName(fileName, program, program.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry); - } - function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false) { - synchronizeHostData(); - const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles(); - return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles); - } - function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - const customTransformers = host.getCustomTransformers && host.getCustomTransformers(); - return getFileEmitOutput(program, sourceFile, !!emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit); - } - function getSignatureHelpItems2(fileName, position, { triggerReason } = emptyOptions) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - return ts_SignatureHelp_exports.getSignatureHelpItems(program, sourceFile, position, triggerReason, cancellationToken); - } - function getNonBoundSourceFile(fileName) { - return syntaxTreeCache.getCurrentSourceFile(fileName); - } - function getNameOrDottedNameSpan(fileName, startPos, _endPos) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const node = getTouchingPropertyName(sourceFile, startPos); - if (node === sourceFile) { - return void 0; - } - switch (node.kind) { - case 211 /* PropertyAccessExpression */: - case 166 /* QualifiedName */: - case 11 /* StringLiteral */: - case 97 /* FalseKeyword */: - case 112 /* TrueKeyword */: - case 106 /* NullKeyword */: - case 108 /* SuperKeyword */: - case 110 /* ThisKeyword */: - case 197 /* ThisType */: - case 80 /* Identifier */: - break; - default: - return void 0; - } - let nodeForStartPos = node; - while (true) { - if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { - nodeForStartPos = nodeForStartPos.parent; - } else if (isNameOfModuleDeclaration(nodeForStartPos)) { - if (nodeForStartPos.parent.parent.kind === 267 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { - nodeForStartPos = nodeForStartPos.parent.parent.name; - } else { - break; - } - } else { - break; - } - } - return createTextSpanFromBounds(nodeForStartPos.getStart(), node.getEnd()); - } - function getBreakpointStatementAtPosition(fileName, position) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts_BreakpointResolver_exports.spanInSourceFileAtLocation(sourceFile, position); - } - function getNavigationBarItems2(fileName) { - return getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken); - } - function getNavigationTree2(fileName) { - return getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName), cancellationToken); - } - function getSemanticClassifications3(fileName, span, format) { - synchronizeHostData(); - const responseFormat = format || "original" /* Original */; - if (responseFormat === "2020" /* TwentyTwenty */) { - return getSemanticClassifications2(program, cancellationToken, getValidSourceFile(fileName), span); - } else { - return getSemanticClassifications(program.getTypeChecker(), cancellationToken, getValidSourceFile(fileName), program.getClassifiableNames(), span); - } - } - function getEncodedSemanticClassifications3(fileName, span, format) { - synchronizeHostData(); - const responseFormat = format || "original" /* Original */; - if (responseFormat === "original" /* Original */) { - return getEncodedSemanticClassifications(program.getTypeChecker(), cancellationToken, getValidSourceFile(fileName), program.getClassifiableNames(), span); - } else { - return getEncodedSemanticClassifications2(program, cancellationToken, getValidSourceFile(fileName), span); - } - } - function getSyntacticClassifications2(fileName, span) { - return getSyntacticClassifications(cancellationToken, syntaxTreeCache.getCurrentSourceFile(fileName), span); - } - function getEncodedSyntacticClassifications2(fileName, span) { - return getEncodedSyntacticClassifications(cancellationToken, syntaxTreeCache.getCurrentSourceFile(fileName), span); - } - function getOutliningSpans(fileName) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts_OutliningElementsCollector_exports.collectElements(sourceFile, cancellationToken); - } - const braceMatching = new Map(Object.entries({ - [19 /* OpenBraceToken */]: 20 /* CloseBraceToken */, - [21 /* OpenParenToken */]: 22 /* CloseParenToken */, - [23 /* OpenBracketToken */]: 24 /* CloseBracketToken */, - [32 /* GreaterThanToken */]: 30 /* LessThanToken */ - })); - braceMatching.forEach((value, key) => braceMatching.set(value.toString(), Number(key))); - function getBraceMatchingAtPosition(fileName, position) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const token = getTouchingToken(sourceFile, position); - const matchKind = token.getStart(sourceFile) === position ? braceMatching.get(token.kind.toString()) : void 0; - const match = matchKind && findChildOfKind(token.parent, matchKind, sourceFile); - return match ? [createTextSpanFromNode(token, sourceFile), createTextSpanFromNode(match, sourceFile)].sort((a, b) => a.start - b.start) : emptyArray; - } - function getIndentationAtPosition(fileName, position, editorOptions) { - let start = timestamp(); - const settings = toEditorSettings(editorOptions); - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - log("getIndentationAtPosition: getCurrentSourceFile: " + (timestamp() - start)); - start = timestamp(); - const result = ts_formatting_exports.SmartIndenter.getIndentation(position, sourceFile, settings); - log("getIndentationAtPosition: computeIndentation : " + (timestamp() - start)); - return result; - } - function getFormattingEditsForRange(fileName, start, end, options) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts_formatting_exports.formatSelection(start, end, sourceFile, ts_formatting_exports.getFormatContext(toEditorSettings(options), host)); - } - function getFormattingEditsForDocument(fileName, options) { - return ts_formatting_exports.formatDocument(syntaxTreeCache.getCurrentSourceFile(fileName), ts_formatting_exports.getFormatContext(toEditorSettings(options), host)); - } - function getFormattingEditsAfterKeystroke(fileName, position, key, options) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const formatContext = ts_formatting_exports.getFormatContext(toEditorSettings(options), host); - if (!isInComment(sourceFile, position)) { - switch (key) { - case "{": - return ts_formatting_exports.formatOnOpeningCurly(position, sourceFile, formatContext); - case "}": - return ts_formatting_exports.formatOnClosingCurly(position, sourceFile, formatContext); - case ";": - return ts_formatting_exports.formatOnSemicolon(position, sourceFile, formatContext); - case "\n": - return ts_formatting_exports.formatOnEnter(position, sourceFile, formatContext); - } - } - return []; - } - function getCodeFixesAtPosition(fileName, start, end, errorCodes64, formatOptions, preferences = emptyOptions) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - const span = createTextSpanFromBounds(start, end); - const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host); - return flatMap(deduplicate(errorCodes64, equateValues, compareValues), (errorCode) => { - cancellationToken.throwIfCancellationRequested(); - return ts_codefix_exports.getFixes({ errorCode, sourceFile, span, program, host, cancellationToken, formatContext, preferences }); - }); - } - function getCombinedCodeFix(scope, fixId52, formatOptions, preferences = emptyOptions) { - synchronizeHostData(); - Debug.assert(scope.type === "file"); - const sourceFile = getValidSourceFile(scope.fileName); - const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host); - return ts_codefix_exports.getAllFixes({ fixId: fixId52, sourceFile, program, host, cancellationToken, formatContext, preferences }); - } - function organizeImports2(args, formatOptions, preferences = emptyOptions) { - synchronizeHostData(); - Debug.assert(args.type === "file"); - const sourceFile = getValidSourceFile(args.fileName); - const formatContext = ts_formatting_exports.getFormatContext(formatOptions, host); - const mode = args.mode ?? (args.skipDestructiveCodeActions ? "SortAndCombine" /* SortAndCombine */ : "All" /* All */); - return ts_OrganizeImports_exports.organizeImports(sourceFile, formatContext, host, program, preferences, mode); - } - function getEditsForFileRename2(oldFilePath, newFilePath, formatOptions, preferences = emptyOptions) { - return getEditsForFileRename(getProgram(), oldFilePath, newFilePath, host, ts_formatting_exports.getFormatContext(formatOptions, host), preferences, sourceMapper); - } - function applyCodeActionCommand(fileName, actionOrFormatSettingsOrUndefined) { - const action = typeof fileName === "string" ? actionOrFormatSettingsOrUndefined : fileName; - return isArray(action) ? Promise.all(action.map((a) => applySingleCodeActionCommand(a))) : applySingleCodeActionCommand(action); - } - function applySingleCodeActionCommand(action) { - const getPath = (path) => toPath(path, currentDirectory, getCanonicalFileName); - Debug.assertEqual(action.type, "install package"); - return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`"); - } - function getDocCommentTemplateAtPosition2(fileName, position, options, formatOptions) { - const formatSettings = formatOptions ? ts_formatting_exports.getFormatContext(formatOptions, host).options : void 0; - return ts_JsDoc_exports.getDocCommentTemplateAtPosition(getNewLineOrDefaultFromHost(host, formatSettings), syntaxTreeCache.getCurrentSourceFile(fileName), position, options); - } - function isValidBraceCompletionAtPosition(fileName, position, openingBrace) { - if (openingBrace === 60 /* lessThan */) { - return false; - } - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - if (isInString(sourceFile, position)) { - return false; - } - if (isInsideJsxElementOrAttribute(sourceFile, position)) { - return openingBrace === 123 /* openBrace */; - } - if (isInTemplateString(sourceFile, position)) { - return false; - } - switch (openingBrace) { - case 39 /* singleQuote */: - case 34 /* doubleQuote */: - case 96 /* backtick */: - return !isInComment(sourceFile, position); - } - return true; - } - function getJsxClosingTagAtPosition(fileName, position) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const token = findPrecedingToken(position, sourceFile); - if (!token) - return void 0; - const element = token.kind === 32 /* GreaterThanToken */ && isJsxOpeningElement(token.parent) ? token.parent.parent : isJsxText(token) && isJsxElement(token.parent) ? token.parent : void 0; - if (element && isUnclosedTag(element)) { - return { newText: `` }; - } - const fragment = token.kind === 32 /* GreaterThanToken */ && isJsxOpeningFragment(token.parent) ? token.parent.parent : isJsxText(token) && isJsxFragment(token.parent) ? token.parent : void 0; - if (fragment && isUnclosedFragment(fragment)) { - return { newText: "" }; - } - } - function getLinkedEditingRangeAtPosition(fileName, position) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const token = findPrecedingToken(position, sourceFile); - if (!token || token.parent.kind === 312 /* SourceFile */) - return void 0; - const jsxTagWordPattern = "[a-zA-Z0-9:\\-\\._$]*"; - if (isJsxFragment(token.parent.parent)) { - const openFragment = token.parent.parent.openingFragment; - const closeFragment = token.parent.parent.closingFragment; - if (containsParseError(openFragment) || containsParseError(closeFragment)) - return void 0; - const openPos = openFragment.getStart(sourceFile) + 1; - const closePos = closeFragment.getStart(sourceFile) + 2; - if (position !== openPos && position !== closePos) - return void 0; - return { - ranges: [{ start: openPos, length: 0 }, { start: closePos, length: 0 }], - wordPattern: jsxTagWordPattern - }; - } else { - const tag = findAncestor( - token.parent, - (n) => { - if (isJsxOpeningElement(n) || isJsxClosingElement(n)) { - return true; - } - return false; - } - ); - if (!tag) - return void 0; - Debug.assert(isJsxOpeningElement(tag) || isJsxClosingElement(tag), "tag should be opening or closing element"); - const openTag = tag.parent.openingElement; - const closeTag = tag.parent.closingElement; - const openTagStart = openTag.tagName.getStart(sourceFile); - const openTagEnd = openTag.tagName.end; - const closeTagStart = closeTag.tagName.getStart(sourceFile); - const closeTagEnd = closeTag.tagName.end; - if (!(openTagStart <= position && position <= openTagEnd || closeTagStart <= position && position <= closeTagEnd)) - return void 0; - const openingTagText = openTag.tagName.getText(sourceFile); - if (openingTagText !== closeTag.tagName.getText(sourceFile)) - return void 0; - return { - ranges: [{ start: openTagStart, length: openTagEnd - openTagStart }, { start: closeTagStart, length: closeTagEnd - closeTagStart }], - wordPattern: jsxTagWordPattern - }; - } - } - function getLinesForRange(sourceFile, textRange) { - return { - lineStarts: sourceFile.getLineStarts(), - firstLine: sourceFile.getLineAndCharacterOfPosition(textRange.pos).line, - lastLine: sourceFile.getLineAndCharacterOfPosition(textRange.end).line - }; - } - function toggleLineComment(fileName, textRange, insertComment) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const textChanges2 = []; - const { lineStarts, firstLine, lastLine } = getLinesForRange(sourceFile, textRange); - let isCommenting = insertComment || false; - let leftMostPosition = Number.MAX_VALUE; - const lineTextStarts = /* @__PURE__ */ new Map(); - const firstNonWhitespaceCharacterRegex = new RegExp(/\S/); - const isJsx = isInsideJsxElement(sourceFile, lineStarts[firstLine]); - const openComment = isJsx ? "{/*" : "//"; - for (let i = firstLine; i <= lastLine; i++) { - const lineText = sourceFile.text.substring(lineStarts[i], sourceFile.getLineEndOfPosition(lineStarts[i])); - const regExec = firstNonWhitespaceCharacterRegex.exec(lineText); - if (regExec) { - leftMostPosition = Math.min(leftMostPosition, regExec.index); - lineTextStarts.set(i.toString(), regExec.index); - if (lineText.substr(regExec.index, openComment.length) !== openComment) { - isCommenting = insertComment === void 0 || insertComment; - } - } - } - for (let i = firstLine; i <= lastLine; i++) { - if (firstLine !== lastLine && lineStarts[i] === textRange.end) { - continue; - } - const lineTextStart = lineTextStarts.get(i.toString()); - if (lineTextStart !== void 0) { - if (isJsx) { - textChanges2.push.apply(textChanges2, toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx)); - } else if (isCommenting) { - textChanges2.push({ - newText: openComment, - span: { - length: 0, - start: lineStarts[i] + leftMostPosition - } - }); - } else if (sourceFile.text.substr(lineStarts[i] + lineTextStart, openComment.length) === openComment) { - textChanges2.push({ - newText: "", - span: { - length: openComment.length, - start: lineStarts[i] + lineTextStart - } - }); - } - } - } - return textChanges2; - } - function toggleMultilineComment(fileName, textRange, insertComment, isInsideJsx) { - var _a2; - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const textChanges2 = []; - const { text } = sourceFile; - let hasComment = false; - let isCommenting = insertComment || false; - const positions = []; - let { pos } = textRange; - const isJsx = isInsideJsx !== void 0 ? isInsideJsx : isInsideJsxElement(sourceFile, pos); - const openMultiline = isJsx ? "{/*" : "/*"; - const closeMultiline = isJsx ? "*/}" : "*/"; - const openMultilineRegex = isJsx ? "\\{\\/\\*" : "\\/\\*"; - const closeMultilineRegex = isJsx ? "\\*\\/\\}" : "\\*\\/"; - while (pos <= textRange.end) { - const offset = text.substr(pos, openMultiline.length) === openMultiline ? openMultiline.length : 0; - const commentRange = isInComment(sourceFile, pos + offset); - if (commentRange) { - if (isJsx) { - commentRange.pos--; - commentRange.end++; - } - positions.push(commentRange.pos); - if (commentRange.kind === 3 /* MultiLineCommentTrivia */) { - positions.push(commentRange.end); - } - hasComment = true; - pos = commentRange.end + 1; - } else { - const newPos = text.substring(pos, textRange.end).search(`(${openMultilineRegex})|(${closeMultilineRegex})`); - isCommenting = insertComment !== void 0 ? insertComment : isCommenting || !isTextWhiteSpaceLike(text, pos, newPos === -1 ? textRange.end : pos + newPos); - pos = newPos === -1 ? textRange.end + 1 : pos + newPos + closeMultiline.length; - } - } - if (isCommenting || !hasComment) { - if (((_a2 = isInComment(sourceFile, textRange.pos)) == null ? void 0 : _a2.kind) !== 2 /* SingleLineCommentTrivia */) { - insertSorted(positions, textRange.pos, compareValues); - } - insertSorted(positions, textRange.end, compareValues); - const firstPos = positions[0]; - if (text.substr(firstPos, openMultiline.length) !== openMultiline) { - textChanges2.push({ - newText: openMultiline, - span: { - length: 0, - start: firstPos - } - }); - } - for (let i = 1; i < positions.length - 1; i++) { - if (text.substr(positions[i] - closeMultiline.length, closeMultiline.length) !== closeMultiline) { - textChanges2.push({ - newText: closeMultiline, - span: { - length: 0, - start: positions[i] - } - }); - } - if (text.substr(positions[i], openMultiline.length) !== openMultiline) { - textChanges2.push({ - newText: openMultiline, - span: { - length: 0, - start: positions[i] - } - }); - } - } - if (textChanges2.length % 2 !== 0) { - textChanges2.push({ - newText: closeMultiline, - span: { - length: 0, - start: positions[positions.length - 1] - } - }); - } - } else { - for (const pos2 of positions) { - const from = pos2 - closeMultiline.length > 0 ? pos2 - closeMultiline.length : 0; - const offset = text.substr(from, closeMultiline.length) === closeMultiline ? closeMultiline.length : 0; - textChanges2.push({ - newText: "", - span: { - length: openMultiline.length, - start: pos2 - offset - } - }); - } - } - return textChanges2; - } - function commentSelection(fileName, textRange) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const { firstLine, lastLine } = getLinesForRange(sourceFile, textRange); - return firstLine === lastLine && textRange.pos !== textRange.end ? toggleMultilineComment( - fileName, - textRange, - /*insertComment*/ - true - ) : toggleLineComment( - fileName, - textRange, - /*insertComment*/ - true - ); - } - function uncommentSelection(fileName, textRange) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const textChanges2 = []; - const { pos } = textRange; - let { end } = textRange; - if (pos === end) { - end += isInsideJsxElement(sourceFile, pos) ? 2 : 1; - } - for (let i = pos; i <= end; i++) { - const commentRange = isInComment(sourceFile, i); - if (commentRange) { - switch (commentRange.kind) { - case 2 /* SingleLineCommentTrivia */: - textChanges2.push.apply(textChanges2, toggleLineComment( - fileName, - { end: commentRange.end, pos: commentRange.pos + 1 }, - /*insertComment*/ - false - )); - break; - case 3 /* MultiLineCommentTrivia */: - textChanges2.push.apply(textChanges2, toggleMultilineComment( - fileName, - { end: commentRange.end, pos: commentRange.pos + 1 }, - /*insertComment*/ - false - )); - } - i = commentRange.end + 1; - } - } - return textChanges2; - } - function isUnclosedTag({ openingElement, closingElement, parent: parent2 }) { - return !tagNamesAreEquivalent(openingElement.tagName, closingElement.tagName) || isJsxElement(parent2) && tagNamesAreEquivalent(openingElement.tagName, parent2.openingElement.tagName) && isUnclosedTag(parent2); - } - function isUnclosedFragment({ closingFragment, parent: parent2 }) { - return !!(closingFragment.flags & 262144 /* ThisNodeHasError */) || isJsxFragment(parent2) && isUnclosedFragment(parent2); - } - function getSpanOfEnclosingComment(fileName, position, onlyMultiLine) { - const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - const range = ts_formatting_exports.getRangeOfEnclosingComment(sourceFile, position); - return range && (!onlyMultiLine || range.kind === 3 /* MultiLineCommentTrivia */) ? createTextSpanFromRange(range) : void 0; - } - function getTodoComments(fileName, descriptors) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - cancellationToken.throwIfCancellationRequested(); - const fileContents = sourceFile.text; - const result = []; - if (descriptors.length > 0 && !isNodeModulesFile(sourceFile.fileName)) { - const regExp = getTodoCommentsRegExp(); - let matchArray; - while (matchArray = regExp.exec(fileContents)) { - cancellationToken.throwIfCancellationRequested(); - const firstDescriptorCaptureIndex = 3; - Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex); - const preamble = matchArray[1]; - const matchPosition = matchArray.index + preamble.length; - if (!isInComment(sourceFile, matchPosition)) { - continue; - } - let descriptor; - for (let i = 0; i < descriptors.length; i++) { - if (matchArray[i + firstDescriptorCaptureIndex]) { - descriptor = descriptors[i]; - } - } - if (descriptor === void 0) - return Debug.fail(); - if (isLetterOrDigit(fileContents.charCodeAt(matchPosition + descriptor.text.length))) { - continue; - } - const message = matchArray[2]; - result.push({ descriptor, message, position: matchPosition }); - } - } - return result; - function escapeRegExp(str) { - return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&"); - } - function getTodoCommentsRegExp() { - const singleLineCommentStart = /(?:\/\/+\s*)/.source; - const multiLineCommentStart = /(?:\/\*+\s*)/.source; - const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - const preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; - const literals = "(?:" + map(descriptors, (d) => "(" + escapeRegExp(d.text) + ")").join("|") + ")"; - const endOfLineOrEndOfComment = /(?:$|\*\/)/.source; - const messageRemainder = /(?:.*?)/.source; - const messagePortion = "(" + literals + messageRemainder + ")"; - const regExpString = preamble + messagePortion + endOfLineOrEndOfComment; - return new RegExp(regExpString, "gim"); - } - function isLetterOrDigit(char) { - return char >= 97 /* a */ && char <= 122 /* z */ || char >= 65 /* A */ && char <= 90 /* Z */ || char >= 48 /* _0 */ && char <= 57 /* _9 */; - } - function isNodeModulesFile(path) { - return stringContains(path, "/node_modules/"); - } - } - function getRenameInfo2(fileName, position, preferences) { - synchronizeHostData(); - return ts_Rename_exports.getRenameInfo(program, getValidSourceFile(fileName), position, preferences || {}); - } - function getRefactorContext(file, positionOrRange, preferences, formatOptions, triggerReason, kind) { - const [startPosition, endPosition] = typeof positionOrRange === "number" ? [positionOrRange, void 0] : [positionOrRange.pos, positionOrRange.end]; - return { - file, - startPosition, - endPosition, - program: getProgram(), - host, - formatContext: ts_formatting_exports.getFormatContext(formatOptions, host), - // TODO: GH#18217 - cancellationToken, - preferences, - triggerReason, - kind - }; - } - function getInlayHintsContext(file, span, preferences) { - return { - file, - program: getProgram(), - host, - span, - preferences, - cancellationToken - }; - } - function getSmartSelectionRange2(fileName, position) { - return ts_SmartSelectionRange_exports.getSmartSelectionRange(position, syntaxTreeCache.getCurrentSourceFile(fileName)); - } - function getApplicableRefactors2(fileName, positionOrRange, preferences = emptyOptions, triggerReason, kind, includeInteractiveActions) { - synchronizeHostData(); - const file = getValidSourceFile(fileName); - return ts_refactor_exports.getApplicableRefactors(getRefactorContext(file, positionOrRange, preferences, emptyOptions, triggerReason, kind), includeInteractiveActions); - } - function getMoveToRefactoringFileSuggestions(fileName, positionOrRange, preferences = emptyOptions) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - const allFiles = Debug.checkDefined(program.getSourceFiles()); - const extension = extensionFromPath(fileName); - const files = mapDefined(allFiles, (file) => !(program == null ? void 0 : program.isSourceFileFromExternalLibrary(sourceFile)) && !(sourceFile === getValidSourceFile(file.fileName) || extension === ".ts" /* Ts */ && extensionFromPath(file.fileName) === ".d.ts" /* Dts */ || extension === ".d.ts" /* Dts */ && startsWith(getBaseFileName(file.fileName), "lib.") && extensionFromPath(file.fileName) === ".d.ts" /* Dts */) && extension === extensionFromPath(file.fileName) ? file.fileName : void 0); - const newFileName = createNewFileName(sourceFile, program, getRefactorContext(sourceFile, positionOrRange, preferences, emptyOptions), host); - return { newFileName, files }; - } - function getEditsForRefactor2(fileName, formatOptions, positionOrRange, refactorName14, actionName2, preferences = emptyOptions, interactiveRefactorArguments) { - synchronizeHostData(); - const file = getValidSourceFile(fileName); - return ts_refactor_exports.getEditsForRefactor(getRefactorContext(file, positionOrRange, preferences, formatOptions), refactorName14, actionName2, interactiveRefactorArguments); - } - function toLineColumnOffset(fileName, position) { - if (position === 0) { - return { line: 0, character: 0 }; - } - return sourceMapper.toLineColumnOffset(fileName, position); - } - function prepareCallHierarchy(fileName, position) { - synchronizeHostData(); - const declarations = ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(program, getTouchingPropertyName(getValidSourceFile(fileName), position)); - return declarations && mapOneOrMany(declarations, (declaration) => ts_CallHierarchy_exports.createCallHierarchyItem(program, declaration)); - } - function provideCallHierarchyIncomingCalls(fileName, position) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - const declaration = firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(program, position === 0 ? sourceFile : getTouchingPropertyName(sourceFile, position))); - return declaration ? ts_CallHierarchy_exports.getIncomingCalls(program, declaration, cancellationToken) : []; - } - function provideCallHierarchyOutgoingCalls(fileName, position) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - const declaration = firstOrOnly(ts_CallHierarchy_exports.resolveCallHierarchyDeclaration(program, position === 0 ? sourceFile : getTouchingPropertyName(sourceFile, position))); - return declaration ? ts_CallHierarchy_exports.getOutgoingCalls(program, declaration) : []; - } - function provideInlayHints2(fileName, span, preferences = emptyOptions) { - synchronizeHostData(); - const sourceFile = getValidSourceFile(fileName); - return ts_InlayHints_exports.provideInlayHints(getInlayHintsContext(sourceFile, span, preferences)); - } - const ls = { - dispose, - cleanupSemanticCache, - getSyntacticDiagnostics, - getSemanticDiagnostics, - getSuggestionDiagnostics, - getCompilerOptionsDiagnostics, - getSyntacticClassifications: getSyntacticClassifications2, - getSemanticClassifications: getSemanticClassifications3, - getEncodedSyntacticClassifications: getEncodedSyntacticClassifications2, - getEncodedSemanticClassifications: getEncodedSemanticClassifications3, - getCompletionsAtPosition: getCompletionsAtPosition2, - getCompletionEntryDetails: getCompletionEntryDetails2, - getCompletionEntrySymbol: getCompletionEntrySymbol2, - getSignatureHelpItems: getSignatureHelpItems2, - getQuickInfoAtPosition, - getDefinitionAtPosition: getDefinitionAtPosition2, - getDefinitionAndBoundSpan: getDefinitionAndBoundSpan2, - getImplementationAtPosition, - getTypeDefinitionAtPosition: getTypeDefinitionAtPosition2, - getReferencesAtPosition, - findReferences, - getFileReferences, - getDocumentHighlights, - getNameOrDottedNameSpan, - getBreakpointStatementAtPosition, - getNavigateToItems: getNavigateToItems2, - getRenameInfo: getRenameInfo2, - getSmartSelectionRange: getSmartSelectionRange2, - findRenameLocations, - getNavigationBarItems: getNavigationBarItems2, - getNavigationTree: getNavigationTree2, - getOutliningSpans, - getTodoComments, - getBraceMatchingAtPosition, - getIndentationAtPosition, - getFormattingEditsForRange, - getFormattingEditsForDocument, - getFormattingEditsAfterKeystroke, - getDocCommentTemplateAtPosition: getDocCommentTemplateAtPosition2, - isValidBraceCompletionAtPosition, - getJsxClosingTagAtPosition, - getLinkedEditingRangeAtPosition, - getSpanOfEnclosingComment, - getCodeFixesAtPosition, - getCombinedCodeFix, - applyCodeActionCommand, - organizeImports: organizeImports2, - getEditsForFileRename: getEditsForFileRename2, - getEmitOutput, - getNonBoundSourceFile, - getProgram, - getCurrentProgram: () => program, - getAutoImportProvider, - updateIsDefinitionOfReferencedSymbols, - getApplicableRefactors: getApplicableRefactors2, - getEditsForRefactor: getEditsForRefactor2, - getMoveToRefactoringFileSuggestions, - toLineColumnOffset, - getSourceMapper: () => sourceMapper, - clearSourceMapperCache: () => sourceMapper.clearCache(), - prepareCallHierarchy, - provideCallHierarchyIncomingCalls, - provideCallHierarchyOutgoingCalls, - toggleLineComment, - toggleMultilineComment, - commentSelection, - uncommentSelection, - provideInlayHints: provideInlayHints2, - getSupportedCodeFixes - }; - switch (languageServiceMode) { - case 0 /* Semantic */: - break; - case 1 /* PartialSemantic */: - invalidOperationsInPartialSemanticMode.forEach( - (key) => ls[key] = () => { - throw new Error(`LanguageService Operation: ${key} not allowed in LanguageServiceMode.PartialSemantic`); - } - ); - break; - case 2 /* Syntactic */: - invalidOperationsInSyntacticMode.forEach( - (key) => ls[key] = () => { - throw new Error(`LanguageService Operation: ${key} not allowed in LanguageServiceMode.Syntactic`); - } - ); - break; - default: - Debug.assertNever(languageServiceMode); - } - return ls; - } - function getNameTable(sourceFile) { - if (!sourceFile.nameTable) { - initializeNameTable(sourceFile); - } - return sourceFile.nameTable; - } - function initializeNameTable(sourceFile) { - const nameTable = sourceFile.nameTable = /* @__PURE__ */ new Map(); - sourceFile.forEachChild(function walk(node) { - if (isIdentifier(node) && !isTagName(node) && node.escapedText || isStringOrNumericLiteralLike(node) && literalIsName(node)) { - const text = getEscapedTextOfIdentifierOrLiteral(node); - nameTable.set(text, nameTable.get(text) === void 0 ? node.pos : -1); - } else if (isPrivateIdentifier(node)) { - const text = node.escapedText; - nameTable.set(text, nameTable.get(text) === void 0 ? node.pos : -1); - } - forEachChild(node, walk); - if (hasJSDocNodes(node)) { - for (const jsDoc of node.jsDoc) { - forEachChild(jsDoc, walk); - } - } - }); - } - function literalIsName(node) { - return isDeclarationName(node) || node.parent.kind === 283 /* ExternalModuleReference */ || isArgumentOfElementAccessExpression(node) || isLiteralComputedPropertyDeclarationName(node); - } - function getContainingObjectLiteralElement(node) { - const element = getContainingObjectLiteralElementWorker(node); - return element && (isObjectLiteralExpression(element.parent) || isJsxAttributes(element.parent)) ? element : void 0; - } - function getContainingObjectLiteralElementWorker(node) { - switch (node.kind) { - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 9 /* NumericLiteral */: - if (node.parent.kind === 167 /* ComputedPropertyName */) { - return isObjectLiteralElement(node.parent.parent) ? node.parent.parent : void 0; - } - case 80 /* Identifier */: - return isObjectLiteralElement(node.parent) && (node.parent.parent.kind === 210 /* ObjectLiteralExpression */ || node.parent.parent.kind === 292 /* JsxAttributes */) && node.parent.name === node ? node.parent : void 0; - } - return void 0; - } - function getSymbolAtLocationForQuickInfo(node, checker) { - const object = getContainingObjectLiteralElement(node); - if (object) { - const contextualType = checker.getContextualType(object.parent); - const properties = contextualType && getPropertySymbolsFromContextualType( - object, - checker, - contextualType, - /*unionSymbolOk*/ - false - ); - if (properties && properties.length === 1) { - return first(properties); - } - } - return checker.getSymbolAtLocation(node); - } - function getPropertySymbolsFromContextualType(node, checker, contextualType, unionSymbolOk) { - const name = getNameFromPropertyName(node.name); - if (!name) - return emptyArray; - if (!contextualType.isUnion()) { - const symbol = contextualType.getProperty(name); - return symbol ? [symbol] : emptyArray; - } - const discriminatedPropertySymbols = mapDefined(contextualType.types, (t) => (isObjectLiteralExpression(node.parent) || isJsxAttributes(node.parent)) && checker.isTypeInvalidDueToUnionDiscriminant(t, node.parent) ? void 0 : t.getProperty(name)); - if (unionSymbolOk && (discriminatedPropertySymbols.length === 0 || discriminatedPropertySymbols.length === contextualType.types.length)) { - const symbol = contextualType.getProperty(name); - if (symbol) - return [symbol]; - } - if (discriminatedPropertySymbols.length === 0) { - return mapDefined(contextualType.types, (t) => t.getProperty(name)); - } - return discriminatedPropertySymbols; - } - function isArgumentOfElementAccessExpression(node) { - return node && node.parent && node.parent.kind === 212 /* ElementAccessExpression */ && node.parent.argumentExpression === node; - } - function getDefaultLibFilePath(options) { - if (sys) { - return combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), getDefaultLibFileName(options)); - } - throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. "); - } - var servicesVersion, NodeObject, TokenOrIdentifierObject, SymbolObject, TokenObject, IdentifierObject, PrivateIdentifierObject, TypeObject, SignatureObject, SourceFileObject, SourceMapSourceObject, SyntaxTreeCache, NoopCancellationToken, CancellationTokenObject, ThrottledCancellationToken, invalidOperationsInPartialSemanticMode, invalidOperationsInSyntacticMode; - var init_services = __esm({ - "src/services/services.ts"() { - "use strict"; - init_ts4(); - init_ts_NavigateTo(); - init_ts_NavigationBar(); - init_ts_refactor(); - init_classifier(); - init_classifier2020(); - servicesVersion = "0.8"; - NodeObject = class { - constructor(kind, pos, end) { - this.pos = pos; - this.end = end; - this.flags = 0 /* None */; - this.modifierFlagsCache = 0 /* None */; - this.transformFlags = 0 /* None */; - this.parent = void 0; - this.kind = kind; - } - assertHasRealPosition(message) { - Debug.assert(!positionIsSynthesized(this.pos) && !positionIsSynthesized(this.end), message || "Node must have a real position for this operation"); - } - getSourceFile() { - return getSourceFileOfNode(this); - } - getStart(sourceFile, includeJsDocComment) { - this.assertHasRealPosition(); - return getTokenPosOfNode(this, sourceFile, includeJsDocComment); - } - getFullStart() { - this.assertHasRealPosition(); - return this.pos; - } - getEnd() { - this.assertHasRealPosition(); - return this.end; - } - getWidth(sourceFile) { - this.assertHasRealPosition(); - return this.getEnd() - this.getStart(sourceFile); - } - getFullWidth() { - this.assertHasRealPosition(); - return this.end - this.pos; - } - getLeadingTriviaWidth(sourceFile) { - this.assertHasRealPosition(); - return this.getStart(sourceFile) - this.pos; - } - getFullText(sourceFile) { - this.assertHasRealPosition(); - return (sourceFile || this.getSourceFile()).text.substring(this.pos, this.end); - } - getText(sourceFile) { - this.assertHasRealPosition(); - if (!sourceFile) { - sourceFile = this.getSourceFile(); - } - return sourceFile.text.substring(this.getStart(sourceFile), this.getEnd()); - } - getChildCount(sourceFile) { - return this.getChildren(sourceFile).length; - } - getChildAt(index, sourceFile) { - return this.getChildren(sourceFile)[index]; - } - getChildren(sourceFile) { - this.assertHasRealPosition("Node without a real position cannot be scanned and thus has no token nodes - use forEachChild and collect the result if that's fine"); - return this._children || (this._children = createChildren(this, sourceFile)); - } - getFirstToken(sourceFile) { - this.assertHasRealPosition(); - const children = this.getChildren(sourceFile); - if (!children.length) { - return void 0; - } - const child = find(children, (kid) => kid.kind < 316 /* FirstJSDocNode */ || kid.kind > 357 /* LastJSDocNode */); - return child.kind < 166 /* FirstNode */ ? child : child.getFirstToken(sourceFile); - } - getLastToken(sourceFile) { - this.assertHasRealPosition(); - const children = this.getChildren(sourceFile); - const child = lastOrUndefined(children); - if (!child) { - return void 0; - } - return child.kind < 166 /* FirstNode */ ? child : child.getLastToken(sourceFile); - } - forEachChild(cbNode, cbNodeArray) { - return forEachChild(this, cbNode, cbNodeArray); - } - }; - TokenOrIdentifierObject = class { - constructor(pos, end) { - this.pos = pos; - this.end = end; - this.flags = 0 /* None */; - this.modifierFlagsCache = 0 /* None */; - this.transformFlags = 0 /* None */; - this.parent = void 0; - } - getSourceFile() { - return getSourceFileOfNode(this); - } - getStart(sourceFile, includeJsDocComment) { - return getTokenPosOfNode(this, sourceFile, includeJsDocComment); - } - getFullStart() { - return this.pos; - } - getEnd() { - return this.end; - } - getWidth(sourceFile) { - return this.getEnd() - this.getStart(sourceFile); - } - getFullWidth() { - return this.end - this.pos; - } - getLeadingTriviaWidth(sourceFile) { - return this.getStart(sourceFile) - this.pos; - } - getFullText(sourceFile) { - return (sourceFile || this.getSourceFile()).text.substring(this.pos, this.end); - } - getText(sourceFile) { - if (!sourceFile) { - sourceFile = this.getSourceFile(); - } - return sourceFile.text.substring(this.getStart(sourceFile), this.getEnd()); - } - getChildCount() { - return this.getChildren().length; - } - getChildAt(index) { - return this.getChildren()[index]; - } - getChildren() { - return this.kind === 1 /* EndOfFileToken */ ? this.jsDoc || emptyArray : emptyArray; - } - getFirstToken() { - return void 0; - } - getLastToken() { - return void 0; - } - forEachChild() { - return void 0; - } - }; - SymbolObject = class { - constructor(flags, name) { - this.id = 0; - this.mergeId = 0; - this.flags = flags; - this.escapedName = name; - } - getFlags() { - return this.flags; - } - get name() { - return symbolName(this); - } - getEscapedName() { - return this.escapedName; - } - getName() { - return this.name; - } - getDeclarations() { - return this.declarations; - } - getDocumentationComment(checker) { - if (!this.documentationComment) { - this.documentationComment = emptyArray; - if (!this.declarations && isTransientSymbol(this) && this.links.target && isTransientSymbol(this.links.target) && this.links.target.links.tupleLabelDeclaration) { - const labelDecl = this.links.target.links.tupleLabelDeclaration; - this.documentationComment = getDocumentationComment([labelDecl], checker); - } else { - this.documentationComment = getDocumentationComment(this.declarations, checker); - } - } - return this.documentationComment; - } - getContextualDocumentationComment(context, checker) { - if (context) { - if (isGetAccessor(context)) { - if (!this.contextualGetAccessorDocumentationComment) { - this.contextualGetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isGetAccessor), checker); - } - if (length(this.contextualGetAccessorDocumentationComment)) { - return this.contextualGetAccessorDocumentationComment; - } - } - if (isSetAccessor(context)) { - if (!this.contextualSetAccessorDocumentationComment) { - this.contextualSetAccessorDocumentationComment = getDocumentationComment(filter(this.declarations, isSetAccessor), checker); - } - if (length(this.contextualSetAccessorDocumentationComment)) { - return this.contextualSetAccessorDocumentationComment; - } - } - } - return this.getDocumentationComment(checker); - } - getJsDocTags(checker) { - if (this.tags === void 0) { - this.tags = getJsDocTagsOfDeclarations(this.declarations, checker); - } - return this.tags; - } - getContextualJsDocTags(context, checker) { - if (context) { - if (isGetAccessor(context)) { - if (!this.contextualGetAccessorTags) { - this.contextualGetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isGetAccessor), checker); - } - if (length(this.contextualGetAccessorTags)) { - return this.contextualGetAccessorTags; - } - } - if (isSetAccessor(context)) { - if (!this.contextualSetAccessorTags) { - this.contextualSetAccessorTags = getJsDocTagsOfDeclarations(filter(this.declarations, isSetAccessor), checker); - } - if (length(this.contextualSetAccessorTags)) { - return this.contextualSetAccessorTags; - } - } - } - return this.getJsDocTags(checker); - } - }; - TokenObject = class extends TokenOrIdentifierObject { - constructor(kind, pos, end) { - super(pos, end); - this.kind = kind; - } - }; - IdentifierObject = class extends TokenOrIdentifierObject { - constructor(_kind, pos, end) { - super(pos, end); - this.kind = 80 /* Identifier */; - } - get text() { - return idText(this); - } - }; - IdentifierObject.prototype.kind = 80 /* Identifier */; - PrivateIdentifierObject = class extends TokenOrIdentifierObject { - constructor(_kind, pos, end) { - super(pos, end); - this.kind = 81 /* PrivateIdentifier */; - } - get text() { - return idText(this); - } - }; - PrivateIdentifierObject.prototype.kind = 81 /* PrivateIdentifier */; - TypeObject = class { - constructor(checker, flags) { - this.checker = checker; - this.flags = flags; - } - getFlags() { - return this.flags; - } - getSymbol() { - return this.symbol; - } - getProperties() { - return this.checker.getPropertiesOfType(this); - } - getProperty(propertyName) { - return this.checker.getPropertyOfType(this, propertyName); - } - getApparentProperties() { - return this.checker.getAugmentedPropertiesOfType(this); - } - getCallSignatures() { - return this.checker.getSignaturesOfType(this, 0 /* Call */); - } - getConstructSignatures() { - return this.checker.getSignaturesOfType(this, 1 /* Construct */); - } - getStringIndexType() { - return this.checker.getIndexTypeOfType(this, 0 /* String */); - } - getNumberIndexType() { - return this.checker.getIndexTypeOfType(this, 1 /* Number */); - } - getBaseTypes() { - return this.isClassOrInterface() ? this.checker.getBaseTypes(this) : void 0; - } - isNullableType() { - return this.checker.isNullableType(this); - } - getNonNullableType() { - return this.checker.getNonNullableType(this); - } - getNonOptionalType() { - return this.checker.getNonOptionalType(this); - } - getConstraint() { - return this.checker.getBaseConstraintOfType(this); - } - getDefault() { - return this.checker.getDefaultFromTypeParameter(this); - } - isUnion() { - return !!(this.flags & 1048576 /* Union */); - } - isIntersection() { - return !!(this.flags & 2097152 /* Intersection */); - } - isUnionOrIntersection() { - return !!(this.flags & 3145728 /* UnionOrIntersection */); - } - isLiteral() { - return !!(this.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */ | 2048 /* BigIntLiteral */)); - } - isStringLiteral() { - return !!(this.flags & 128 /* StringLiteral */); - } - isNumberLiteral() { - return !!(this.flags & 256 /* NumberLiteral */); - } - isTypeParameter() { - return !!(this.flags & 262144 /* TypeParameter */); - } - isClassOrInterface() { - return !!(getObjectFlags(this) & 3 /* ClassOrInterface */); - } - isClass() { - return !!(getObjectFlags(this) & 1 /* Class */); - } - isIndexType() { - return !!(this.flags & 4194304 /* Index */); - } - /** - * This polyfills `referenceType.typeArguments` for API consumers - */ - get typeArguments() { - if (getObjectFlags(this) & 4 /* Reference */) { - return this.checker.getTypeArguments(this); - } - return void 0; - } - }; - SignatureObject = class { - // same - constructor(checker, flags) { - this.checker = checker; - this.flags = flags; - } - getDeclaration() { - return this.declaration; - } - getTypeParameters() { - return this.typeParameters; - } - getParameters() { - return this.parameters; - } - getReturnType() { - return this.checker.getReturnTypeOfSignature(this); - } - getTypeParameterAtPosition(pos) { - const type = this.checker.getParameterType(this, pos); - if (type.isIndexType() && isThisTypeParameter(type.type)) { - const constraint = type.type.getConstraint(); - if (constraint) { - return this.checker.getIndexType(constraint); - } - } - return type; - } - getDocumentationComment() { - return this.documentationComment || (this.documentationComment = getDocumentationComment(singleElementArray(this.declaration), this.checker)); - } - getJsDocTags() { - return this.jsDocTags || (this.jsDocTags = getJsDocTagsOfDeclarations(singleElementArray(this.declaration), this.checker)); - } - }; - SourceFileObject = class extends NodeObject { - constructor(kind, pos, end) { - super(kind, pos, end); - this.kind = 312 /* SourceFile */; - } - update(newText, textChangeRange) { - return updateSourceFile(this, newText, textChangeRange); - } - getLineAndCharacterOfPosition(position) { - return getLineAndCharacterOfPosition(this, position); - } - getLineStarts() { - return getLineStarts(this); - } - getPositionOfLineAndCharacter(line, character, allowEdits) { - return computePositionOfLineAndCharacter(getLineStarts(this), line, character, this.text, allowEdits); - } - getLineEndOfPosition(pos) { - const { line } = this.getLineAndCharacterOfPosition(pos); - const lineStarts = this.getLineStarts(); - let lastCharPos; - if (line + 1 >= lineStarts.length) { - lastCharPos = this.getEnd(); - } - if (!lastCharPos) { - lastCharPos = lineStarts[line + 1] - 1; - } - const fullText = this.getFullText(); - return fullText[lastCharPos] === "\n" && fullText[lastCharPos - 1] === "\r" ? lastCharPos - 1 : lastCharPos; - } - getNamedDeclarations() { - if (!this.namedDeclarations) { - this.namedDeclarations = this.computeNamedDeclarations(); - } - return this.namedDeclarations; - } - computeNamedDeclarations() { - const result = createMultiMap(); - this.forEachChild(visit); - return result; - function addDeclaration(declaration) { - const name = getDeclarationName(declaration); - if (name) { - result.add(name, declaration); - } - } - function getDeclarations(name) { - let declarations = result.get(name); - if (!declarations) { - result.set(name, declarations = []); - } - return declarations; - } - function getDeclarationName(declaration) { - const name = getNonAssignedNameOfDeclaration(declaration); - return name && (isComputedPropertyName(name) && isPropertyAccessExpression(name.expression) ? name.expression.name.text : isPropertyName(name) ? getNameFromPropertyName(name) : void 0); - } - function visit(node) { - switch (node.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - const functionDeclaration = node; - const declarationName = getDeclarationName(functionDeclaration); - if (declarationName) { - const declarations = getDeclarations(declarationName); - const lastDeclaration = lastOrUndefined(declarations); - if (lastDeclaration && functionDeclaration.parent === lastDeclaration.parent && functionDeclaration.symbol === lastDeclaration.symbol) { - if (functionDeclaration.body && !lastDeclaration.body) { - declarations[declarations.length - 1] = functionDeclaration; - } - } else { - declarations.push(functionDeclaration); - } - } - forEachChild(node, visit); - break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 266 /* EnumDeclaration */: - case 267 /* ModuleDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 281 /* ExportSpecifier */: - case 276 /* ImportSpecifier */: - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 187 /* TypeLiteral */: - addDeclaration(node); - forEachChild(node, visit); - break; - case 169 /* Parameter */: - if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { - break; - } - case 260 /* VariableDeclaration */: - case 208 /* BindingElement */: { - const decl = node; - if (isBindingPattern(decl.name)) { - forEachChild(decl.name, visit); - break; - } - if (decl.initializer) { - visit(decl.initializer); - } - } - case 306 /* EnumMember */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - addDeclaration(node); - break; - case 278 /* ExportDeclaration */: - const exportDeclaration = node; - if (exportDeclaration.exportClause) { - if (isNamedExports(exportDeclaration.exportClause)) { - forEach(exportDeclaration.exportClause.elements, visit); - } else { - visit(exportDeclaration.exportClause.name); - } - } - break; - case 272 /* ImportDeclaration */: - const importClause = node.importClause; - if (importClause) { - if (importClause.name) { - addDeclaration(importClause.name); - } - if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 274 /* NamespaceImport */) { - addDeclaration(importClause.namedBindings); - } else { - forEach(importClause.namedBindings.elements, visit); - } - } - } - break; - case 226 /* BinaryExpression */: - if (getAssignmentDeclarationKind(node) !== 0 /* None */) { - addDeclaration(node); - } - default: - forEachChild(node, visit); - } - } - } - }; - SourceMapSourceObject = class { - constructor(fileName, text, skipTrivia2) { - this.fileName = fileName; - this.text = text; - this.skipTrivia = skipTrivia2; - } - getLineAndCharacterOfPosition(pos) { - return getLineAndCharacterOfPosition(this, pos); - } - }; - SyntaxTreeCache = class { - constructor(host) { - this.host = host; - } - getCurrentSourceFile(fileName) { - var _a, _b, _c, _d, _e, _f, _g, _h; - const scriptSnapshot = this.host.getScriptSnapshot(fileName); - if (!scriptSnapshot) { - throw new Error("Could not find file: '" + fileName + "'."); - } - const scriptKind = getScriptKind(fileName, this.host); - const version2 = this.host.getScriptVersion(fileName); - let sourceFile; - if (this.currentFileName !== fileName) { - const options = { - languageVersion: 99 /* Latest */, - impliedNodeFormat: getImpliedNodeFormatForFile( - toPath(fileName, this.host.getCurrentDirectory(), ((_c = (_b = (_a = this.host).getCompilerHost) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.getCanonicalFileName) || hostGetCanonicalFileName(this.host)), - (_h = (_g = (_f = (_e = (_d = this.host).getCompilerHost) == null ? void 0 : _e.call(_d)) == null ? void 0 : _f.getModuleResolutionCache) == null ? void 0 : _g.call(_f)) == null ? void 0 : _h.getPackageJsonInfoCache(), - this.host, - this.host.getCompilationSettings() - ), - setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings()) - }; - sourceFile = createLanguageServiceSourceFile( - fileName, - scriptSnapshot, - options, - version2, - /*setNodeParents*/ - true, - scriptKind - ); - } else if (this.currentFileVersion !== version2) { - const editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot); - sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version2, editRange); - } - if (sourceFile) { - this.currentFileVersion = version2; - this.currentFileName = fileName; - this.currentFileScriptSnapshot = scriptSnapshot; - this.currentSourceFile = sourceFile; - } - return this.currentSourceFile; - } - }; - NoopCancellationToken = { - isCancellationRequested: returnFalse, - throwIfCancellationRequested: noop - }; - CancellationTokenObject = class { - constructor(cancellationToken) { - this.cancellationToken = cancellationToken; - } - isCancellationRequested() { - return this.cancellationToken.isCancellationRequested(); - } - throwIfCancellationRequested() { - var _a; - if (this.isCancellationRequested()) { - (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "cancellationThrown", { kind: "CancellationTokenObject" }); - throw new OperationCanceledException(); - } - } - }; - ThrottledCancellationToken = class { - constructor(hostCancellationToken, throttleWaitMilliseconds = 20) { - this.hostCancellationToken = hostCancellationToken; - this.throttleWaitMilliseconds = throttleWaitMilliseconds; - // Store when we last tried to cancel. Checking cancellation can be expensive (as we have - // to marshall over to the host layer). So we only bother actually checking once enough - // time has passed. - this.lastCancellationCheckTime = 0; - } - isCancellationRequested() { - const time = timestamp(); - const duration = Math.abs(time - this.lastCancellationCheckTime); - if (duration >= this.throttleWaitMilliseconds) { - this.lastCancellationCheckTime = time; - return this.hostCancellationToken.isCancellationRequested(); - } - return false; - } - throwIfCancellationRequested() { - var _a; - if (this.isCancellationRequested()) { - (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "cancellationThrown", { kind: "ThrottledCancellationToken" }); - throw new OperationCanceledException(); - } - } - }; - invalidOperationsInPartialSemanticMode = [ - "getSemanticDiagnostics", - "getSuggestionDiagnostics", - "getCompilerOptionsDiagnostics", - "getSemanticClassifications", - "getEncodedSemanticClassifications", - "getCodeFixesAtPosition", - "getCombinedCodeFix", - "applyCodeActionCommand", - "organizeImports", - "getEditsForFileRename", - "getEmitOutput", - "getApplicableRefactors", - "getEditsForRefactor", - "prepareCallHierarchy", - "provideCallHierarchyIncomingCalls", - "provideCallHierarchyOutgoingCalls", - "provideInlayHints", - "getSupportedCodeFixes" - ]; - invalidOperationsInSyntacticMode = [ - ...invalidOperationsInPartialSemanticMode, - "getCompletionsAtPosition", - "getCompletionEntryDetails", - "getCompletionEntrySymbol", - "getSignatureHelpItems", - "getQuickInfoAtPosition", - "getDefinitionAtPosition", - "getDefinitionAndBoundSpan", - "getImplementationAtPosition", - "getTypeDefinitionAtPosition", - "getReferencesAtPosition", - "findReferences", - "getDocumentHighlights", - "getNavigateToItems", - "getRenameInfo", - "findRenameLocations", - "getApplicableRefactors" - ]; - setObjectAllocator(getServicesObjectAllocator()); - } - }); - - // src/services/transform.ts - function transform(source, transformers, compilerOptions) { - const diagnostics = []; - compilerOptions = fixupCompilerOptions(compilerOptions, diagnostics); - const nodes = isArray(source) ? source : [source]; - const result = transformNodes( - /*resolver*/ - void 0, - /*host*/ - void 0, - factory, - compilerOptions, - nodes, - transformers, - /*allowDtsFiles*/ - true - ); - result.diagnostics = concatenate(result.diagnostics, diagnostics); - return result; - } - var init_transform = __esm({ - "src/services/transform.ts"() { - "use strict"; - init_ts4(); - } - }); - - // src/services/shims.ts - function logInternalError(logger, err) { - if (logger) { - logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message); - } - } - function simpleForwardCall(logger, actionDescription2, action, logPerformance) { - let start; - if (logPerformance) { - logger.log(actionDescription2); - start = timestamp(); - } - const result = action(); - if (logPerformance) { - const end = timestamp(); - logger.log(`${actionDescription2} completed in ${end - start} msec`); - if (isString(result)) { - let str = result; - if (str.length > 128) { - str = str.substring(0, 128) + "..."; - } - logger.log(` result.length=${str.length}, result='${JSON.stringify(str)}'`); - } - } - return result; - } - function forwardJSONCall(logger, actionDescription2, action, logPerformance) { - return forwardCall( - logger, - actionDescription2, - /*returnJson*/ - true, - action, - logPerformance - ); - } - function forwardCall(logger, actionDescription2, returnJson, action, logPerformance) { - try { - const result = simpleForwardCall(logger, actionDescription2, action, logPerformance); - return returnJson ? JSON.stringify({ result }) : result; - } catch (err) { - if (err instanceof OperationCanceledException) { - return JSON.stringify({ canceled: true }); - } - logInternalError(logger, err); - err.description = actionDescription2; - return JSON.stringify({ error: err }); - } - } - function realizeDiagnostics(diagnostics, newLine) { - return diagnostics.map((d) => realizeDiagnostic(d, newLine)); - } - function realizeDiagnostic(diagnostic, newLine) { - return { - message: flattenDiagnosticMessageText(diagnostic.messageText, newLine), - start: diagnostic.start, - // TODO: GH#18217 - length: diagnostic.length, - // TODO: GH#18217 - category: diagnosticCategoryName(diagnostic), - code: diagnostic.code, - reportsUnnecessary: diagnostic.reportsUnnecessary, - reportsDeprecated: diagnostic.reportsDeprecated - }; - } - function convertClassifications(classifications) { - return { spans: classifications.spans.join(","), endOfLineState: classifications.endOfLineState }; - } - var debugObjectHost, ScriptSnapshotShimAdapter, LanguageServiceShimHostAdapter, CoreServicesShimHostAdapter, ShimBase, LanguageServiceShimObject, ClassifierShimObject, CoreServicesShimObject, TypeScriptServicesFactory; - var init_shims = __esm({ - "src/services/shims.ts"() { - "use strict"; - init_ts4(); - debugObjectHost = function() { - return this; - }(); - ScriptSnapshotShimAdapter = class { - constructor(scriptSnapshotShim) { - this.scriptSnapshotShim = scriptSnapshotShim; - } - getText(start, end) { - return this.scriptSnapshotShim.getText(start, end); - } - getLength() { - return this.scriptSnapshotShim.getLength(); - } - getChangeRange(oldSnapshot) { - const oldSnapshotShim = oldSnapshot; - const encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim); - if (encoded === null) { - return null; - } - const decoded = JSON.parse(encoded); - return createTextChangeRange( - createTextSpan(decoded.span.start, decoded.span.length), - decoded.newLength - ); - } - dispose() { - if ("dispose" in this.scriptSnapshotShim) { - this.scriptSnapshotShim.dispose(); - } - } - }; - LanguageServiceShimHostAdapter = class { - constructor(shimHost) { - this.shimHost = shimHost; - this.loggingEnabled = false; - this.tracingEnabled = false; - if ("getModuleResolutionsForFile" in this.shimHost) { - this.resolveModuleNames = (moduleNames, containingFile) => { - const resolutionsInFile = JSON.parse(this.shimHost.getModuleResolutionsForFile(containingFile)); - return map(moduleNames, (name) => { - const result = getProperty(resolutionsInFile, name); - return result ? { resolvedFileName: result, extension: extensionFromPath(result), isExternalLibraryImport: false } : void 0; - }); - }; - } - if ("directoryExists" in this.shimHost) { - this.directoryExists = (directoryName) => this.shimHost.directoryExists(directoryName); - } - if ("getTypeReferenceDirectiveResolutionsForFile" in this.shimHost) { - this.resolveTypeReferenceDirectives = (typeDirectiveNames, containingFile) => { - const typeDirectivesForFile = JSON.parse(this.shimHost.getTypeReferenceDirectiveResolutionsForFile(containingFile)); - return map(typeDirectiveNames, (name) => getProperty(typeDirectivesForFile, isString(name) ? name : toFileNameLowerCase(name.fileName))); - }; - } - } - log(s) { - if (this.loggingEnabled) { - this.shimHost.log(s); - } - } - trace(s) { - if (this.tracingEnabled) { - this.shimHost.trace(s); - } - } - error(s) { - this.shimHost.error(s); - } - getProjectVersion() { - if (!this.shimHost.getProjectVersion) { - return void 0; - } - return this.shimHost.getProjectVersion(); - } - getTypeRootsVersion() { - if (!this.shimHost.getTypeRootsVersion) { - return 0; - } - return this.shimHost.getTypeRootsVersion(); - } - useCaseSensitiveFileNames() { - return this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false; - } - getCompilationSettings() { - const settingsJson = this.shimHost.getCompilationSettings(); - if (settingsJson === null || settingsJson === "") { - throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); - } - const compilerOptions = JSON.parse(settingsJson); - compilerOptions.allowNonTsExtensions = true; - return compilerOptions; - } - getScriptFileNames() { - const encoded = this.shimHost.getScriptFileNames(); - return JSON.parse(encoded); - } - getScriptSnapshot(fileName) { - const scriptSnapshot = this.shimHost.getScriptSnapshot(fileName); - return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot); - } - getScriptKind(fileName) { - if ("getScriptKind" in this.shimHost) { - return this.shimHost.getScriptKind(fileName); - } else { - return 0 /* Unknown */; - } - } - getScriptVersion(fileName) { - return this.shimHost.getScriptVersion(fileName); - } - getLocalizedDiagnosticMessages() { - const diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages(); - if (diagnosticMessagesJson === null || diagnosticMessagesJson === "") { - return null; - } - try { - return JSON.parse(diagnosticMessagesJson); - } catch (e) { - this.log(e.description || "diagnosticMessages.generated.json has invalid JSON format"); - return null; - } - } - getCancellationToken() { - const hostCancellationToken = this.shimHost.getCancellationToken(); - return new ThrottledCancellationToken(hostCancellationToken); - } - getCurrentDirectory() { - return this.shimHost.getCurrentDirectory(); - } - getDirectories(path) { - return JSON.parse(this.shimHost.getDirectories(path)); - } - getDefaultLibFileName(options) { - return this.shimHost.getDefaultLibFileName(JSON.stringify(options)); - } - readDirectory(path, extensions, exclude, include, depth) { - const pattern = getFileMatcherPatterns( - path, - exclude, - include, - this.shimHost.useCaseSensitiveFileNames(), - this.shimHost.getCurrentDirectory() - ); - return JSON.parse(this.shimHost.readDirectory( - path, - JSON.stringify(extensions), - JSON.stringify(pattern.basePaths), - pattern.excludePattern, - pattern.includeFilePattern, - pattern.includeDirectoryPattern, - depth - )); - } - readFile(path, encoding) { - return this.shimHost.readFile(path, encoding); - } - fileExists(path) { - return this.shimHost.fileExists(path); - } - }; - CoreServicesShimHostAdapter = class { - constructor(shimHost) { - this.shimHost = shimHost; - this.useCaseSensitiveFileNames = this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false; - if ("directoryExists" in this.shimHost) { - this.directoryExists = (directoryName) => this.shimHost.directoryExists(directoryName); - } else { - this.directoryExists = void 0; - } - if ("realpath" in this.shimHost) { - this.realpath = (path) => this.shimHost.realpath(path); - } else { - this.realpath = void 0; - } - } - readDirectory(rootDir, extensions, exclude, include, depth) { - const pattern = getFileMatcherPatterns( - rootDir, - exclude, - include, - this.shimHost.useCaseSensitiveFileNames(), - this.shimHost.getCurrentDirectory() - ); - return JSON.parse(this.shimHost.readDirectory( - rootDir, - JSON.stringify(extensions), - JSON.stringify(pattern.basePaths), - pattern.excludePattern, - pattern.includeFilePattern, - pattern.includeDirectoryPattern, - depth - )); - } - fileExists(fileName) { - return this.shimHost.fileExists(fileName); - } - readFile(fileName) { - return this.shimHost.readFile(fileName); - } - getDirectories(path) { - return JSON.parse(this.shimHost.getDirectories(path)); - } - }; - ShimBase = class { - constructor(factory2) { - this.factory = factory2; - factory2.registerShim(this); - } - dispose(_dummy) { - this.factory.unregisterShim(this); - } - }; - LanguageServiceShimObject = class extends ShimBase { - constructor(factory2, host, languageService) { - super(factory2); - this.host = host; - this.languageService = languageService; - this.logPerformance = false; - this.logger = this.host; - } - forwardJSONCall(actionDescription2, action) { - return forwardJSONCall(this.logger, actionDescription2, action, this.logPerformance); - } - /// DISPOSE - /** - * Ensure (almost) deterministic release of internal Javascript resources when - * some external native objects holds onto us (e.g. Com/Interop). - */ - dispose(dummy) { - this.logger.log("dispose()"); - this.languageService.dispose(); - this.languageService = null; - if (debugObjectHost && debugObjectHost.CollectGarbage) { - debugObjectHost.CollectGarbage(); - this.logger.log("CollectGarbage()"); - } - this.logger = null; - super.dispose(dummy); - } - /// REFRESH - /** - * Update the list of scripts known to the compiler - */ - refresh(throwOnError) { - this.forwardJSONCall( - `refresh(${throwOnError})`, - () => null - // eslint-disable-line no-null/no-null - ); - } - cleanupSemanticCache() { - this.forwardJSONCall( - "cleanupSemanticCache()", - () => { - this.languageService.cleanupSemanticCache(); - return null; - } - ); - } - realizeDiagnostics(diagnostics) { - const newLine = getNewLineOrDefaultFromHost( - this.host, - /*formatSettings*/ - void 0 - ); - return realizeDiagnostics(diagnostics, newLine); - } - getSyntacticClassifications(fileName, start, length2) { - return this.forwardJSONCall( - `getSyntacticClassifications('${fileName}', ${start}, ${length2})`, - () => this.languageService.getSyntacticClassifications(fileName, createTextSpan(start, length2)) - ); - } - getSemanticClassifications(fileName, start, length2) { - return this.forwardJSONCall( - `getSemanticClassifications('${fileName}', ${start}, ${length2})`, - () => this.languageService.getSemanticClassifications(fileName, createTextSpan(start, length2)) - ); - } - getEncodedSyntacticClassifications(fileName, start, length2) { - return this.forwardJSONCall( - `getEncodedSyntacticClassifications('${fileName}', ${start}, ${length2})`, - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - () => convertClassifications(this.languageService.getEncodedSyntacticClassifications(fileName, createTextSpan(start, length2))) - ); - } - getEncodedSemanticClassifications(fileName, start, length2) { - return this.forwardJSONCall( - `getEncodedSemanticClassifications('${fileName}', ${start}, ${length2})`, - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - () => convertClassifications(this.languageService.getEncodedSemanticClassifications(fileName, createTextSpan(start, length2))) - ); - } - getSyntacticDiagnostics(fileName) { - return this.forwardJSONCall( - `getSyntacticDiagnostics('${fileName}')`, - () => { - const diagnostics = this.languageService.getSyntacticDiagnostics(fileName); - return this.realizeDiagnostics(diagnostics); - } - ); - } - getSemanticDiagnostics(fileName) { - return this.forwardJSONCall( - `getSemanticDiagnostics('${fileName}')`, - () => { - const diagnostics = this.languageService.getSemanticDiagnostics(fileName); - return this.realizeDiagnostics(diagnostics); - } - ); - } - getSuggestionDiagnostics(fileName) { - return this.forwardJSONCall(`getSuggestionDiagnostics('${fileName}')`, () => this.realizeDiagnostics(this.languageService.getSuggestionDiagnostics(fileName))); - } - getCompilerOptionsDiagnostics() { - return this.forwardJSONCall( - "getCompilerOptionsDiagnostics()", - () => { - const diagnostics = this.languageService.getCompilerOptionsDiagnostics(); - return this.realizeDiagnostics(diagnostics); - } - ); - } - /// QUICKINFO - /** - * Computes a string representation of the type at the requested position - * in the active file. - */ - getQuickInfoAtPosition(fileName, position) { - return this.forwardJSONCall( - `getQuickInfoAtPosition('${fileName}', ${position})`, - () => this.languageService.getQuickInfoAtPosition(fileName, position) - ); - } - /// NAMEORDOTTEDNAMESPAN - /** - * Computes span information of the name or dotted name at the requested position - * in the active file. - */ - getNameOrDottedNameSpan(fileName, startPos, endPos) { - return this.forwardJSONCall( - `getNameOrDottedNameSpan('${fileName}', ${startPos}, ${endPos})`, - () => this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos) - ); - } - /** - * STATEMENTSPAN - * Computes span information of statement at the requested position in the active file. - */ - getBreakpointStatementAtPosition(fileName, position) { - return this.forwardJSONCall( - `getBreakpointStatementAtPosition('${fileName}', ${position})`, - () => this.languageService.getBreakpointStatementAtPosition(fileName, position) - ); - } - /// SIGNATUREHELP - getSignatureHelpItems(fileName, position, options) { - return this.forwardJSONCall( - `getSignatureHelpItems('${fileName}', ${position})`, - () => this.languageService.getSignatureHelpItems(fileName, position, options) - ); - } - /// GOTO DEFINITION - /** - * Computes the definition location and file for the symbol - * at the requested position. - */ - getDefinitionAtPosition(fileName, position) { - return this.forwardJSONCall( - `getDefinitionAtPosition('${fileName}', ${position})`, - () => this.languageService.getDefinitionAtPosition(fileName, position) - ); - } - /** - * Computes the definition location and file for the symbol - * at the requested position. - */ - getDefinitionAndBoundSpan(fileName, position) { - return this.forwardJSONCall( - `getDefinitionAndBoundSpan('${fileName}', ${position})`, - () => this.languageService.getDefinitionAndBoundSpan(fileName, position) - ); - } - /// GOTO Type - /** - * Computes the definition location of the type of the symbol - * at the requested position. - */ - getTypeDefinitionAtPosition(fileName, position) { - return this.forwardJSONCall( - `getTypeDefinitionAtPosition('${fileName}', ${position})`, - () => this.languageService.getTypeDefinitionAtPosition(fileName, position) - ); - } - /// GOTO Implementation - /** - * Computes the implementation location of the symbol - * at the requested position. - */ - getImplementationAtPosition(fileName, position) { - return this.forwardJSONCall( - `getImplementationAtPosition('${fileName}', ${position})`, - () => this.languageService.getImplementationAtPosition(fileName, position) - ); - } - getRenameInfo(fileName, position, preferences) { - return this.forwardJSONCall( - `getRenameInfo('${fileName}', ${position})`, - () => this.languageService.getRenameInfo(fileName, position, preferences) - ); - } - getSmartSelectionRange(fileName, position) { - return this.forwardJSONCall( - `getSmartSelectionRange('${fileName}', ${position})`, - () => this.languageService.getSmartSelectionRange(fileName, position) - ); - } - findRenameLocations(fileName, position, findInStrings, findInComments, preferences) { - return this.forwardJSONCall( - `findRenameLocations('${fileName}', ${position}, ${findInStrings}, ${findInComments})`, - () => this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments, preferences) - ); - } - /// GET BRACE MATCHING - getBraceMatchingAtPosition(fileName, position) { - return this.forwardJSONCall( - `getBraceMatchingAtPosition('${fileName}', ${position})`, - () => this.languageService.getBraceMatchingAtPosition(fileName, position) - ); - } - isValidBraceCompletionAtPosition(fileName, position, openingBrace) { - return this.forwardJSONCall( - `isValidBraceCompletionAtPosition('${fileName}', ${position}, ${openingBrace})`, - () => this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace) - ); - } - getSpanOfEnclosingComment(fileName, position, onlyMultiLine) { - return this.forwardJSONCall( - `getSpanOfEnclosingComment('${fileName}', ${position})`, - () => this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine) - ); - } - /// GET SMART INDENT - getIndentationAtPosition(fileName, position, options) { - return this.forwardJSONCall( - `getIndentationAtPosition('${fileName}', ${position})`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getIndentationAtPosition(fileName, position, localOptions); - } - ); - } - /// GET REFERENCES - getReferencesAtPosition(fileName, position) { - return this.forwardJSONCall( - `getReferencesAtPosition('${fileName}', ${position})`, - () => this.languageService.getReferencesAtPosition(fileName, position) - ); - } - findReferences(fileName, position) { - return this.forwardJSONCall( - `findReferences('${fileName}', ${position})`, - () => this.languageService.findReferences(fileName, position) - ); - } - getFileReferences(fileName) { - return this.forwardJSONCall( - `getFileReferences('${fileName})`, - () => this.languageService.getFileReferences(fileName) - ); - } - getDocumentHighlights(fileName, position, filesToSearch) { - return this.forwardJSONCall( - `getDocumentHighlights('${fileName}', ${position})`, - () => { - const results = this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); - const normalizedName = toFileNameLowerCase(normalizeSlashes(fileName)); - return filter(results, (r) => toFileNameLowerCase(normalizeSlashes(r.fileName)) === normalizedName); - } - ); - } - /// COMPLETION LISTS - /** - * Get a string based representation of the completions - * to provide at the given source position and providing a member completion - * list if requested. - */ - getCompletionsAtPosition(fileName, position, preferences, formattingSettings) { - return this.forwardJSONCall( - `getCompletionsAtPosition('${fileName}', ${position}, ${preferences}, ${formattingSettings})`, - () => this.languageService.getCompletionsAtPosition(fileName, position, preferences, formattingSettings) - ); - } - /** Get a string based representation of a completion list entry details */ - getCompletionEntryDetails(fileName, position, entryName, formatOptions, source, preferences, data) { - return this.forwardJSONCall( - `getCompletionEntryDetails('${fileName}', ${position}, '${entryName}')`, - () => { - const localOptions = formatOptions === void 0 ? void 0 : JSON.parse(formatOptions); - return this.languageService.getCompletionEntryDetails(fileName, position, entryName, localOptions, source, preferences, data); - } - ); - } - getFormattingEditsForRange(fileName, start, end, options) { - return this.forwardJSONCall( - `getFormattingEditsForRange('${fileName}', ${start}, ${end})`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions); - } - ); - } - getFormattingEditsForDocument(fileName, options) { - return this.forwardJSONCall( - `getFormattingEditsForDocument('${fileName}')`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getFormattingEditsForDocument(fileName, localOptions); - } - ); - } - getFormattingEditsAfterKeystroke(fileName, position, key, options) { - return this.forwardJSONCall( - `getFormattingEditsAfterKeystroke('${fileName}', ${position}, '${key}')`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions); - } - ); - } - getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) { - return this.forwardJSONCall( - `getDocCommentTemplateAtPosition('${fileName}', ${position})`, - () => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) - ); - } - /// NAVIGATE TO - /** Return a list of symbols that are interesting to navigate to */ - getNavigateToItems(searchValue, maxResultCount, fileName) { - return this.forwardJSONCall( - `getNavigateToItems('${searchValue}', ${maxResultCount}, ${fileName})`, - () => this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName) - ); - } - getNavigationBarItems(fileName) { - return this.forwardJSONCall( - `getNavigationBarItems('${fileName}')`, - () => this.languageService.getNavigationBarItems(fileName) - ); - } - getNavigationTree(fileName) { - return this.forwardJSONCall( - `getNavigationTree('${fileName}')`, - () => this.languageService.getNavigationTree(fileName) - ); - } - getOutliningSpans(fileName) { - return this.forwardJSONCall( - `getOutliningSpans('${fileName}')`, - () => this.languageService.getOutliningSpans(fileName) - ); - } - getTodoComments(fileName, descriptors) { - return this.forwardJSONCall( - `getTodoComments('${fileName}')`, - () => this.languageService.getTodoComments(fileName, JSON.parse(descriptors)) - ); - } - /// CALL HIERARCHY - prepareCallHierarchy(fileName, position) { - return this.forwardJSONCall( - `prepareCallHierarchy('${fileName}', ${position})`, - () => this.languageService.prepareCallHierarchy(fileName, position) - ); - } - provideCallHierarchyIncomingCalls(fileName, position) { - return this.forwardJSONCall( - `provideCallHierarchyIncomingCalls('${fileName}', ${position})`, - () => this.languageService.provideCallHierarchyIncomingCalls(fileName, position) - ); - } - provideCallHierarchyOutgoingCalls(fileName, position) { - return this.forwardJSONCall( - `provideCallHierarchyOutgoingCalls('${fileName}', ${position})`, - () => this.languageService.provideCallHierarchyOutgoingCalls(fileName, position) - ); - } - provideInlayHints(fileName, span, preference) { - return this.forwardJSONCall( - `provideInlayHints('${fileName}', '${JSON.stringify(span)}', ${JSON.stringify(preference)})`, - () => this.languageService.provideInlayHints(fileName, span, preference) - ); - } - /// Emit - getEmitOutput(fileName) { - return this.forwardJSONCall( - `getEmitOutput('${fileName}')`, - () => { - const { diagnostics, ...rest } = this.languageService.getEmitOutput(fileName); - return { ...rest, diagnostics: this.realizeDiagnostics(diagnostics) }; - } - ); - } - getEmitOutputObject(fileName) { - return forwardCall( - this.logger, - `getEmitOutput('${fileName}')`, - /*returnJson*/ - false, - () => this.languageService.getEmitOutput(fileName), - this.logPerformance - ); - } - toggleLineComment(fileName, textRange) { - return this.forwardJSONCall( - `toggleLineComment('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.toggleLineComment(fileName, textRange) - ); - } - toggleMultilineComment(fileName, textRange) { - return this.forwardJSONCall( - `toggleMultilineComment('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.toggleMultilineComment(fileName, textRange) - ); - } - commentSelection(fileName, textRange) { - return this.forwardJSONCall( - `commentSelection('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.commentSelection(fileName, textRange) - ); - } - uncommentSelection(fileName, textRange) { - return this.forwardJSONCall( - `uncommentSelection('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.uncommentSelection(fileName, textRange) - ); - } - }; - ClassifierShimObject = class extends ShimBase { - constructor(factory2, logger) { - super(factory2); - this.logger = logger; - this.logPerformance = false; - this.classifier = createClassifier(); - } - getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent = false) { - return forwardJSONCall( - this.logger, - "getEncodedLexicalClassifications", - () => convertClassifications(this.classifier.getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent)), - this.logPerformance - ); - } - /// COLORIZATION - getClassificationsForLine(text, lexState, classifyKeywordsInGenerics = false) { - const classification = this.classifier.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics); - let result = ""; - for (const item of classification.entries) { - result += item.length + "\n"; - result += item.classification + "\n"; - } - result += classification.finalLexState; - return result; - } - }; - CoreServicesShimObject = class extends ShimBase { - constructor(factory2, logger, host) { - super(factory2); - this.logger = logger; - this.host = host; - this.logPerformance = false; - } - forwardJSONCall(actionDescription2, action) { - return forwardJSONCall(this.logger, actionDescription2, action, this.logPerformance); - } - resolveModuleName(fileName, moduleName, compilerOptionsJson) { - return this.forwardJSONCall(`resolveModuleName('${fileName}')`, () => { - const compilerOptions = JSON.parse(compilerOptionsJson); - const result = resolveModuleName(moduleName, normalizeSlashes(fileName), compilerOptions, this.host); - let resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : void 0; - if (result.resolvedModule && result.resolvedModule.extension !== ".ts" /* Ts */ && result.resolvedModule.extension !== ".tsx" /* Tsx */ && result.resolvedModule.extension !== ".d.ts" /* Dts */) { - resolvedFileName = void 0; - } - return { - resolvedFileName, - failedLookupLocations: result.failedLookupLocations, - affectingLocations: result.affectingLocations - }; - }); - } - resolveTypeReferenceDirective(fileName, typeReferenceDirective, compilerOptionsJson) { - return this.forwardJSONCall(`resolveTypeReferenceDirective(${fileName})`, () => { - const compilerOptions = JSON.parse(compilerOptionsJson); - const result = resolveTypeReferenceDirective(typeReferenceDirective, normalizeSlashes(fileName), compilerOptions, this.host); - return { - resolvedFileName: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.resolvedFileName : void 0, - primary: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.primary : true, - failedLookupLocations: result.failedLookupLocations - }; - }); - } - getPreProcessedFileInfo(fileName, sourceTextSnapshot) { - return this.forwardJSONCall( - `getPreProcessedFileInfo('${fileName}')`, - () => { - const result = preProcessFile( - getSnapshotText(sourceTextSnapshot), - /*readImportFiles*/ - true, - /*detectJavaScriptImports*/ - true - ); - return { - referencedFiles: this.convertFileReferences(result.referencedFiles), - importedFiles: this.convertFileReferences(result.importedFiles), - ambientExternalModules: result.ambientExternalModules, - isLibFile: result.isLibFile, - typeReferenceDirectives: this.convertFileReferences(result.typeReferenceDirectives), - libReferenceDirectives: this.convertFileReferences(result.libReferenceDirectives) - }; - } - ); - } - getAutomaticTypeDirectiveNames(compilerOptionsJson) { - return this.forwardJSONCall( - `getAutomaticTypeDirectiveNames('${compilerOptionsJson}')`, - () => { - const compilerOptions = JSON.parse(compilerOptionsJson); - return getAutomaticTypeDirectiveNames(compilerOptions, this.host); - } - ); - } - convertFileReferences(refs) { - if (!refs) { - return void 0; - } - const result = []; - for (const ref of refs) { - result.push({ - path: normalizeSlashes(ref.fileName), - position: ref.pos, - length: ref.end - ref.pos - }); - } - return result; - } - getTSConfigFileInfo(fileName, sourceTextSnapshot) { - return this.forwardJSONCall( - `getTSConfigFileInfo('${fileName}')`, - () => { - const result = parseJsonText(fileName, getSnapshotText(sourceTextSnapshot)); - const normalizedFileName = normalizeSlashes(fileName); - const configFile = parseJsonSourceFileConfigFileContent( - result, - this.host, - getDirectoryPath(normalizedFileName), - /*existingOptions*/ - {}, - normalizedFileName - ); - return { - options: configFile.options, - typeAcquisition: configFile.typeAcquisition, - files: configFile.fileNames, - raw: configFile.raw, - errors: realizeDiagnostics([...result.parseDiagnostics, ...configFile.errors], "\r\n") - }; - } - ); - } - getDefaultCompilationSettings() { - return this.forwardJSONCall( - "getDefaultCompilationSettings()", - () => getDefaultCompilerOptions2() - ); - } - discoverTypings(discoverTypingsJson) { - const getCanonicalFileName = createGetCanonicalFileName( - /*useCaseSensitiveFileNames*/ - false - ); - return this.forwardJSONCall("discoverTypings()", () => { - const info = JSON.parse(discoverTypingsJson); - if (this.safeList === void 0) { - this.safeList = ts_JsTyping_exports.loadSafeList(this.host, toPath(info.safeListPath, info.safeListPath, getCanonicalFileName)); - } - return ts_JsTyping_exports.discoverTypings( - this.host, - (msg) => this.logger.log(msg), - info.fileNames, - toPath(info.projectRootPath, info.projectRootPath, getCanonicalFileName), - this.safeList, - info.packageNameToTypingLocation, - info.typeAcquisition, - info.unresolvedImports, - info.typesRegistry, - emptyOptions - ); - }); - } - }; - TypeScriptServicesFactory = class { - constructor() { - this._shims = []; - } - /* - * Returns script API version. - */ - getServicesVersion() { - return servicesVersion; - } - createLanguageServiceShim(host) { - try { - if (this.documentRegistry === void 0) { - this.documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); - } - const hostAdapter = new LanguageServiceShimHostAdapter(host); - const languageService = createLanguageService( - hostAdapter, - this.documentRegistry, - /*syntaxOnlyOrLanguageServiceMode*/ - false - ); - return new LanguageServiceShimObject(this, host, languageService); - } catch (err) { - logInternalError(host, err); - throw err; - } - } - createClassifierShim(logger) { - try { - return new ClassifierShimObject(this, logger); - } catch (err) { - logInternalError(logger, err); - throw err; - } - } - createCoreServicesShim(host) { - try { - const adapter = new CoreServicesShimHostAdapter(host); - return new CoreServicesShimObject(this, host, adapter); - } catch (err) { - logInternalError(host, err); - throw err; - } - } - close() { - clear(this._shims); - this.documentRegistry = void 0; - } - registerShim(shim) { - this._shims.push(shim); - } - unregisterShim(shim) { - for (let i = 0; i < this._shims.length; i++) { - if (this._shims[i] === shim) { - delete this._shims[i]; - return; - } - } - throw new Error("Invalid operation"); - } - }; - } - }); - - // src/services/breakpoints.ts - function spanInSourceFileAtLocation(sourceFile, position) { - if (sourceFile.isDeclarationFile) { - return void 0; - } - let tokenAtLocation = getTokenAtPosition(sourceFile, position); - const lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line; - if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) { - const preceding = findPrecedingToken(tokenAtLocation.pos, sourceFile); - if (!preceding || sourceFile.getLineAndCharacterOfPosition(preceding.getEnd()).line !== lineOfPosition) { - return void 0; - } - tokenAtLocation = preceding; - } - if (tokenAtLocation.flags & 33554432 /* Ambient */) { - return void 0; - } - return spanInNode(tokenAtLocation); - function textSpan(startNode2, endNode2) { - const lastDecorator = canHaveDecorators(startNode2) ? findLast(startNode2.modifiers, isDecorator) : void 0; - const start = lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : startNode2.getStart(sourceFile); - return createTextSpanFromBounds(start, (endNode2 || startNode2).getEnd()); - } - function textSpanEndingAtNextToken(startNode2, previousTokenToFindNextEndToken) { - return textSpan(startNode2, findNextToken(previousTokenToFindNextEndToken, previousTokenToFindNextEndToken.parent, sourceFile)); - } - function spanInNodeIfStartsOnSameLine(node, otherwiseOnNode) { - if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line) { - return spanInNode(node); - } - return spanInNode(otherwiseOnNode); - } - function spanInNodeArray(nodeArray, node, match) { - if (nodeArray) { - const index = nodeArray.indexOf(node); - if (index >= 0) { - let start = index; - let end = index + 1; - while (start > 0 && match(nodeArray[start - 1])) - start--; - while (end < nodeArray.length && match(nodeArray[end])) - end++; - return createTextSpanFromBounds(skipTrivia(sourceFile.text, nodeArray[start].pos), nodeArray[end - 1].end); - } - } - return textSpan(node); - } - function spanInPreviousNode(node) { - return spanInNode(findPrecedingToken(node.pos, sourceFile)); - } - function spanInNextNode(node) { - return spanInNode(findNextToken(node, node.parent, sourceFile)); - } - function spanInNode(node) { - if (node) { - const { parent: parent2 } = node; - switch (node.kind) { - case 243 /* VariableStatement */: - return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 260 /* VariableDeclaration */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - return spanInVariableDeclaration(node); - case 169 /* Parameter */: - return spanInParameterDeclaration(node); - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return spanInFunctionDeclaration(node); - case 241 /* Block */: - if (isFunctionBlock(node)) { - return spanInFunctionBlock(node); - } - case 268 /* ModuleBlock */: - return spanInBlock(node); - case 299 /* CatchClause */: - return spanInBlock(node.block); - case 244 /* ExpressionStatement */: - return textSpan(node.expression); - case 253 /* ReturnStatement */: - return textSpan(node.getChildAt(0), node.expression); - case 247 /* WhileStatement */: - return textSpanEndingAtNextToken(node, node.expression); - case 246 /* DoStatement */: - return spanInNode(node.statement); - case 259 /* DebuggerStatement */: - return textSpan(node.getChildAt(0)); - case 245 /* IfStatement */: - return textSpanEndingAtNextToken(node, node.expression); - case 256 /* LabeledStatement */: - return spanInNode(node.statement); - case 252 /* BreakStatement */: - case 251 /* ContinueStatement */: - return textSpan(node.getChildAt(0), node.label); - case 248 /* ForStatement */: - return spanInForStatement(node); - case 249 /* ForInStatement */: - return textSpanEndingAtNextToken(node, node.expression); - case 250 /* ForOfStatement */: - return spanInInitializerOfForLike(node); - case 255 /* SwitchStatement */: - return textSpanEndingAtNextToken(node, node.expression); - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - return spanInNode(node.statements[0]); - case 258 /* TryStatement */: - return spanInBlock(node.tryBlock); - case 257 /* ThrowStatement */: - return textSpan(node, node.expression); - case 277 /* ExportAssignment */: - return textSpan(node, node.expression); - case 271 /* ImportEqualsDeclaration */: - return textSpan(node, node.moduleReference); - case 272 /* ImportDeclaration */: - return textSpan(node, node.moduleSpecifier); - case 278 /* ExportDeclaration */: - return textSpan(node, node.moduleSpecifier); - case 267 /* ModuleDeclaration */: - if (getModuleInstanceState(node) !== 1 /* Instantiated */) { - return void 0; - } - case 263 /* ClassDeclaration */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 208 /* BindingElement */: - return textSpan(node); - case 254 /* WithStatement */: - return spanInNode(node.statement); - case 170 /* Decorator */: - return spanInNodeArray(parent2.modifiers, node, isDecorator); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - return spanInBindingPattern(node); - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - return void 0; - case 27 /* SemicolonToken */: - case 1 /* EndOfFileToken */: - return spanInNodeIfStartsOnSameLine(findPrecedingToken(node.pos, sourceFile)); - case 28 /* CommaToken */: - return spanInPreviousNode(node); - case 19 /* OpenBraceToken */: - return spanInOpenBraceToken(node); - case 20 /* CloseBraceToken */: - return spanInCloseBraceToken(node); - case 24 /* CloseBracketToken */: - return spanInCloseBracketToken(node); - case 21 /* OpenParenToken */: - return spanInOpenParenToken(node); - case 22 /* CloseParenToken */: - return spanInCloseParenToken(node); - case 59 /* ColonToken */: - return spanInColonToken(node); - case 32 /* GreaterThanToken */: - case 30 /* LessThanToken */: - return spanInGreaterThanOrLessThanToken(node); - case 117 /* WhileKeyword */: - return spanInWhileKeyword(node); - case 93 /* ElseKeyword */: - case 85 /* CatchKeyword */: - case 98 /* FinallyKeyword */: - return spanInNextNode(node); - case 165 /* OfKeyword */: - return spanInOfKeyword(node); - default: - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node)) { - return spanInArrayLiteralOrObjectLiteralDestructuringPattern(node); - } - if ((node.kind === 80 /* Identifier */ || node.kind === 230 /* SpreadElement */ || node.kind === 303 /* PropertyAssignment */ || node.kind === 304 /* ShorthandPropertyAssignment */) && isArrayLiteralOrObjectLiteralDestructuringPattern(parent2)) { - return textSpan(node); - } - if (node.kind === 226 /* BinaryExpression */) { - const { left, operatorToken } = node; - if (isArrayLiteralOrObjectLiteralDestructuringPattern(left)) { - return spanInArrayLiteralOrObjectLiteralDestructuringPattern( - left - ); - } - if (operatorToken.kind === 64 /* EqualsToken */ && isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent)) { - return textSpan(node); - } - if (operatorToken.kind === 28 /* CommaToken */) { - return spanInNode(left); - } - } - if (isExpressionNode(node)) { - switch (parent2.kind) { - case 246 /* DoStatement */: - return spanInPreviousNode(node); - case 170 /* Decorator */: - return spanInNode(node.parent); - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: - return textSpan(node); - case 226 /* BinaryExpression */: - if (node.parent.operatorToken.kind === 28 /* CommaToken */) { - return textSpan(node); - } - break; - case 219 /* ArrowFunction */: - if (node.parent.body === node) { - return textSpan(node); - } - break; - } - } - switch (node.parent.kind) { - case 303 /* PropertyAssignment */: - if (node.parent.name === node && !isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent.parent)) { - return spanInNode(node.parent.initializer); - } - break; - case 216 /* TypeAssertionExpression */: - if (node.parent.type === node) { - return spanInNextNode(node.parent.type); - } - break; - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: { - const { initializer, type } = node.parent; - if (initializer === node || type === node || isAssignmentOperator(node.kind)) { - return spanInPreviousNode(node); - } - break; - } - case 226 /* BinaryExpression */: { - const { left } = node.parent; - if (isArrayLiteralOrObjectLiteralDestructuringPattern(left) && node !== left) { - return spanInPreviousNode(node); - } - break; - } - default: - if (isFunctionLike(node.parent) && node.parent.type === node) { - return spanInPreviousNode(node); - } - } - return spanInNode(node.parent); - } - } - function textSpanFromVariableDeclaration(variableDeclaration) { - if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] === variableDeclaration) { - return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); - } else { - return textSpan(variableDeclaration); - } - } - function spanInVariableDeclaration(variableDeclaration) { - if (variableDeclaration.parent.parent.kind === 249 /* ForInStatement */) { - return spanInNode(variableDeclaration.parent.parent); - } - const parent2 = variableDeclaration.parent; - if (isBindingPattern(variableDeclaration.name)) { - return spanInBindingPattern(variableDeclaration.name); - } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) { - return textSpanFromVariableDeclaration(variableDeclaration); - } - if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { - return spanInNode(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent)); - } - } - function canHaveSpanInParameterDeclaration(parameter) { - return !!parameter.initializer || parameter.dotDotDotToken !== void 0 || hasSyntacticModifier(parameter, 4 /* Public */ | 8 /* Private */); - } - function spanInParameterDeclaration(parameter) { - if (isBindingPattern(parameter.name)) { - return spanInBindingPattern(parameter.name); - } else if (canHaveSpanInParameterDeclaration(parameter)) { - return textSpan(parameter); - } else { - const functionDeclaration = parameter.parent; - const indexOfParameter = functionDeclaration.parameters.indexOf(parameter); - Debug.assert(indexOfParameter !== -1); - if (indexOfParameter !== 0) { - return spanInParameterDeclaration(functionDeclaration.parameters[indexOfParameter - 1]); - } else { - return spanInNode(functionDeclaration.body); - } - } - } - function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; - } - function spanInFunctionDeclaration(functionDeclaration) { - if (!functionDeclaration.body) { - return void 0; - } - if (canFunctionHaveSpanInWholeDeclaration(functionDeclaration)) { - return textSpan(functionDeclaration); - } - return spanInNode(functionDeclaration.body); - } - function spanInFunctionBlock(block) { - const nodeForSpanInBlock = block.statements.length ? block.statements[0] : block.getLastToken(); - if (canFunctionHaveSpanInWholeDeclaration(block.parent)) { - return spanInNodeIfStartsOnSameLine(block.parent, nodeForSpanInBlock); - } - return spanInNode(nodeForSpanInBlock); - } - function spanInBlock(block) { - switch (block.parent.kind) { - case 267 /* ModuleDeclaration */: - if (getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { - return void 0; - } - case 247 /* WhileStatement */: - case 245 /* IfStatement */: - case 249 /* ForInStatement */: - return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: - return spanInNodeIfStartsOnSameLine(findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); - } - return spanInNode(block.statements[0]); - } - function spanInInitializerOfForLike(forLikeStatement) { - if (forLikeStatement.initializer.kind === 261 /* VariableDeclarationList */) { - const variableDeclarationList = forLikeStatement.initializer; - if (variableDeclarationList.declarations.length > 0) { - return spanInNode(variableDeclarationList.declarations[0]); - } - } else { - return spanInNode(forLikeStatement.initializer); - } - } - function spanInForStatement(forStatement) { - if (forStatement.initializer) { - return spanInInitializerOfForLike(forStatement); - } - if (forStatement.condition) { - return textSpan(forStatement.condition); - } - if (forStatement.incrementor) { - return textSpan(forStatement.incrementor); - } - } - function spanInBindingPattern(bindingPattern) { - const firstBindingElement = forEach( - bindingPattern.elements, - (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 - ); - if (firstBindingElement) { - return spanInNode(firstBindingElement); - } - if (bindingPattern.parent.kind === 208 /* BindingElement */) { - return textSpan(bindingPattern.parent); - } - return textSpanFromVariableDeclaration(bindingPattern.parent); - } - function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { - Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); - const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; - const firstBindingElement = forEach( - elements, - (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 - ); - if (firstBindingElement) { - return spanInNode(firstBindingElement); - } - return textSpan(node2.parent.kind === 226 /* BinaryExpression */ ? node2.parent : node2); - } - function spanInOpenBraceToken(node2) { - switch (node2.parent.kind) { - case 266 /* EnumDeclaration */: - const enumDeclaration = node2.parent; - return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 263 /* ClassDeclaration */: - const classDeclaration = node2.parent; - return spanInNodeIfStartsOnSameLine(findPrecedingToken(node2.pos, sourceFile, node2.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 269 /* CaseBlock */: - return spanInNodeIfStartsOnSameLine(node2.parent.parent, node2.parent.clauses[0]); - } - return spanInNode(node2.parent); - } - function spanInCloseBraceToken(node2) { - switch (node2.parent.kind) { - case 268 /* ModuleBlock */: - if (getModuleInstanceState(node2.parent.parent) !== 1 /* Instantiated */) { - return void 0; - } - case 266 /* EnumDeclaration */: - case 263 /* ClassDeclaration */: - return textSpan(node2); - case 241 /* Block */: - if (isFunctionBlock(node2.parent)) { - return textSpan(node2); - } - case 299 /* CatchClause */: - return spanInNode(lastOrUndefined(node2.parent.statements)); - case 269 /* CaseBlock */: - const caseBlock = node2.parent; - const lastClause = lastOrUndefined(caseBlock.clauses); - if (lastClause) { - return spanInNode(lastOrUndefined(lastClause.statements)); - } - return void 0; - case 206 /* ObjectBindingPattern */: - const bindingPattern = node2.parent; - return spanInNode(lastOrUndefined(bindingPattern.elements) || bindingPattern); - default: - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node2.parent)) { - const objectLiteral = node2.parent; - return textSpan(lastOrUndefined(objectLiteral.properties) || objectLiteral); - } - return spanInNode(node2.parent); - } - } - function spanInCloseBracketToken(node2) { - switch (node2.parent.kind) { - case 207 /* ArrayBindingPattern */: - const bindingPattern = node2.parent; - return textSpan(lastOrUndefined(bindingPattern.elements) || bindingPattern); - default: - if (isArrayLiteralOrObjectLiteralDestructuringPattern(node2.parent)) { - const arrayLiteral = node2.parent; - return textSpan(lastOrUndefined(arrayLiteral.elements) || arrayLiteral); - } - return spanInNode(node2.parent); - } - } - function spanInOpenParenToken(node2) { - if (node2.parent.kind === 246 /* DoStatement */ || // Go to while keyword and do action instead - node2.parent.kind === 213 /* CallExpression */ || node2.parent.kind === 214 /* NewExpression */) { - return spanInPreviousNode(node2); - } - if (node2.parent.kind === 217 /* ParenthesizedExpression */) { - return spanInNextNode(node2); - } - return spanInNode(node2.parent); - } - function spanInCloseParenToken(node2) { - switch (node2.parent.kind) { - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 176 /* Constructor */: - case 247 /* WhileStatement */: - case 246 /* DoStatement */: - case 248 /* ForStatement */: - case 250 /* ForOfStatement */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 217 /* ParenthesizedExpression */: - return spanInPreviousNode(node2); - default: - return spanInNode(node2.parent); - } - } - function spanInColonToken(node2) { - if (isFunctionLike(node2.parent) || node2.parent.kind === 303 /* PropertyAssignment */ || node2.parent.kind === 169 /* Parameter */) { - return spanInPreviousNode(node2); - } - return spanInNode(node2.parent); - } - function spanInGreaterThanOrLessThanToken(node2) { - if (node2.parent.kind === 216 /* TypeAssertionExpression */) { - return spanInNextNode(node2); - } - return spanInNode(node2.parent); - } - function spanInWhileKeyword(node2) { - if (node2.parent.kind === 246 /* DoStatement */) { - return textSpanEndingAtNextToken(node2, node2.parent.expression); - } - return spanInNode(node2.parent); - } - function spanInOfKeyword(node2) { - if (node2.parent.kind === 250 /* ForOfStatement */) { - return spanInNextNode(node2); - } - return spanInNode(node2.parent); - } - } - } - var init_breakpoints = __esm({ - "src/services/breakpoints.ts"() { - "use strict"; - init_ts4(); - } - }); - - // src/services/_namespaces/ts.BreakpointResolver.ts - var ts_BreakpointResolver_exports = {}; - __export(ts_BreakpointResolver_exports, { - spanInSourceFileAtLocation: () => spanInSourceFileAtLocation - }); - var init_ts_BreakpointResolver = __esm({ - "src/services/_namespaces/ts.BreakpointResolver.ts"() { - "use strict"; - init_breakpoints(); - } - }); - - // src/services/callHierarchy.ts - function isNamedExpression(node) { - return (isFunctionExpression(node) || isClassExpression(node)) && isNamedDeclaration(node); - } - function isConstNamedExpression(node) { - return (isFunctionExpression(node) || isArrowFunction(node) || isClassExpression(node)) && isVariableDeclaration(node.parent) && node === node.parent.initializer && isIdentifier(node.parent.name) && !!(getCombinedNodeFlags(node.parent) & 2 /* Const */); - } - function isPossibleCallHierarchyDeclaration(node) { - return isSourceFile(node) || isModuleDeclaration(node) || isFunctionDeclaration(node) || isFunctionExpression(node) || isClassDeclaration(node) || isClassExpression(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node); - } - function isValidCallHierarchyDeclaration(node) { - return isSourceFile(node) || isModuleDeclaration(node) && isIdentifier(node.name) || isFunctionDeclaration(node) || isClassDeclaration(node) || isClassStaticBlockDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isGetAccessorDeclaration(node) || isSetAccessorDeclaration(node) || isNamedExpression(node) || isConstNamedExpression(node); - } - function getCallHierarchyDeclarationReferenceNode(node) { - if (isSourceFile(node)) - return node; - if (isNamedDeclaration(node)) - return node.name; - if (isConstNamedExpression(node)) - return node.parent.name; - return Debug.checkDefined(node.modifiers && find(node.modifiers, isDefaultModifier3)); - } - function isDefaultModifier3(node) { - return node.kind === 90 /* DefaultKeyword */; - } - function getSymbolOfCallHierarchyDeclaration(typeChecker, node) { - const location = getCallHierarchyDeclarationReferenceNode(node); - return location && typeChecker.getSymbolAtLocation(location); - } - function getCallHierarchyItemName(program, node) { - if (isSourceFile(node)) { - return { text: node.fileName, pos: 0, end: 0 }; - } - if ((isFunctionDeclaration(node) || isClassDeclaration(node)) && !isNamedDeclaration(node)) { - const defaultModifier = node.modifiers && find(node.modifiers, isDefaultModifier3); - if (defaultModifier) { - return { text: "default", pos: defaultModifier.getStart(), end: defaultModifier.getEnd() }; - } - } - if (isClassStaticBlockDeclaration(node)) { - const sourceFile = node.getSourceFile(); - const pos = skipTrivia(sourceFile.text, moveRangePastModifiers(node).pos); - const end = pos + 6; - const typeChecker = program.getTypeChecker(); - const symbol = typeChecker.getSymbolAtLocation(node.parent); - const prefix = symbol ? `${typeChecker.symbolToString(symbol, node.parent)} ` : ""; - return { text: `${prefix}static {}`, pos, end }; - } - const declName = isConstNamedExpression(node) ? node.parent.name : Debug.checkDefined(getNameOfDeclaration(node), "Expected call hierarchy item to have a name"); - let text = isIdentifier(declName) ? idText(declName) : isStringOrNumericLiteralLike(declName) ? declName.text : isComputedPropertyName(declName) ? isStringOrNumericLiteralLike(declName.expression) ? declName.expression.text : void 0 : void 0; - if (text === void 0) { - const typeChecker = program.getTypeChecker(); - const symbol = typeChecker.getSymbolAtLocation(declName); - if (symbol) { - text = typeChecker.symbolToString(symbol, node); - } - } - if (text === void 0) { - const printer = createPrinterWithRemoveCommentsOmitTrailingSemicolon(); - text = usingSingleLineStringWriter((writer) => printer.writeNode(4 /* Unspecified */, node, node.getSourceFile(), writer)); - } - return { text, pos: declName.getStart(), end: declName.getEnd() }; - } - function getCallHierarchItemContainerName(node) { - var _a, _b; - if (isConstNamedExpression(node)) { - if (isModuleBlock(node.parent.parent.parent.parent) && isIdentifier(node.parent.parent.parent.parent.parent.name)) { - return node.parent.parent.parent.parent.parent.name.getText(); - } - return; - } - switch (node.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - if (node.parent.kind === 210 /* ObjectLiteralExpression */) { - return (_a = getAssignedName(node.parent)) == null ? void 0 : _a.getText(); - } - return (_b = getNameOfDeclaration(node.parent)) == null ? void 0 : _b.getText(); - case 262 /* FunctionDeclaration */: - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: - if (isModuleBlock(node.parent) && isIdentifier(node.parent.parent.name)) { - return node.parent.parent.name.getText(); - } - } - } - function findImplementation(typeChecker, node) { - if (node.body) { - return node; - } - if (isConstructorDeclaration(node)) { - return getFirstConstructorWithBody(node.parent); - } - if (isFunctionDeclaration(node) || isMethodDeclaration(node)) { - const symbol = getSymbolOfCallHierarchyDeclaration(typeChecker, node); - if (symbol && symbol.valueDeclaration && isFunctionLikeDeclaration(symbol.valueDeclaration) && symbol.valueDeclaration.body) { - return symbol.valueDeclaration; - } - return void 0; - } - return node; - } - function findAllInitialDeclarations(typeChecker, node) { - const symbol = getSymbolOfCallHierarchyDeclaration(typeChecker, node); - let declarations; - if (symbol && symbol.declarations) { - const indices = indicesOf(symbol.declarations); - const keys = map(symbol.declarations, (decl) => ({ file: decl.getSourceFile().fileName, pos: decl.pos })); - indices.sort((a, b) => compareStringsCaseSensitive(keys[a].file, keys[b].file) || keys[a].pos - keys[b].pos); - const sortedDeclarations = map(indices, (i) => symbol.declarations[i]); - let lastDecl; - for (const decl of sortedDeclarations) { - if (isValidCallHierarchyDeclaration(decl)) { - if (!lastDecl || lastDecl.parent !== decl.parent || lastDecl.end !== decl.pos) { - declarations = append(declarations, decl); - } - lastDecl = decl; - } - } - } - return declarations; - } - function findImplementationOrAllInitialDeclarations(typeChecker, node) { - if (isClassStaticBlockDeclaration(node)) { - return node; - } - if (isFunctionLikeDeclaration(node)) { - return findImplementation(typeChecker, node) ?? findAllInitialDeclarations(typeChecker, node) ?? node; - } - return findAllInitialDeclarations(typeChecker, node) ?? node; - } - function resolveCallHierarchyDeclaration(program, location) { - const typeChecker = program.getTypeChecker(); - let followingSymbol = false; - while (true) { - if (isValidCallHierarchyDeclaration(location)) { - return findImplementationOrAllInitialDeclarations(typeChecker, location); - } - if (isPossibleCallHierarchyDeclaration(location)) { - const ancestor = findAncestor(location, isValidCallHierarchyDeclaration); - return ancestor && findImplementationOrAllInitialDeclarations(typeChecker, ancestor); - } - if (isDeclarationName(location)) { - if (isValidCallHierarchyDeclaration(location.parent)) { - return findImplementationOrAllInitialDeclarations(typeChecker, location.parent); - } - if (isPossibleCallHierarchyDeclaration(location.parent)) { - const ancestor = findAncestor(location.parent, isValidCallHierarchyDeclaration); - return ancestor && findImplementationOrAllInitialDeclarations(typeChecker, ancestor); - } - if (isVariableDeclaration(location.parent) && location.parent.initializer && isConstNamedExpression(location.parent.initializer)) { - return location.parent.initializer; - } - return void 0; - } - if (isConstructorDeclaration(location)) { - if (isValidCallHierarchyDeclaration(location.parent)) { - return location.parent; - } - return void 0; - } - if (location.kind === 126 /* StaticKeyword */ && isClassStaticBlockDeclaration(location.parent)) { - location = location.parent; - continue; - } - if (isVariableDeclaration(location) && location.initializer && isConstNamedExpression(location.initializer)) { - return location.initializer; - } - if (!followingSymbol) { - let symbol = typeChecker.getSymbolAtLocation(location); - if (symbol) { - if (symbol.flags & 2097152 /* Alias */) { - symbol = typeChecker.getAliasedSymbol(symbol); - } - if (symbol.valueDeclaration) { - followingSymbol = true; - location = symbol.valueDeclaration; - continue; - } - } - } - return void 0; - } - } - function createCallHierarchyItem(program, node) { - const sourceFile = node.getSourceFile(); - const name = getCallHierarchyItemName(program, node); - const containerName = getCallHierarchItemContainerName(node); - const kind = getNodeKind(node); - const kindModifiers = getNodeModifiers(node); - const span = createTextSpanFromBounds(skipTrivia( - sourceFile.text, - node.getFullStart(), - /*stopAfterLineBreak*/ - false, - /*stopAtComments*/ - true - ), node.getEnd()); - const selectionSpan = createTextSpanFromBounds(name.pos, name.end); - return { file: sourceFile.fileName, kind, kindModifiers, name: name.text, containerName, span, selectionSpan }; - } - function isDefined(x) { - return x !== void 0; - } - function convertEntryToCallSite(entry) { - if (entry.kind === ts_FindAllReferences_exports.EntryKind.Node) { - const { node } = entry; - if (isCallOrNewExpressionTarget( - node, - /*includeElementAccess*/ - true, - /*skipPastOuterExpressions*/ - true - ) || isTaggedTemplateTag( - node, - /*includeElementAccess*/ - true, - /*skipPastOuterExpressions*/ - true - ) || isDecoratorTarget( - node, - /*includeElementAccess*/ - true, - /*skipPastOuterExpressions*/ - true - ) || isJsxOpeningLikeElementTagName( - node, - /*includeElementAccess*/ - true, - /*skipPastOuterExpressions*/ - true - ) || isRightSideOfPropertyAccess(node) || isArgumentExpressionOfElementAccess(node)) { - const sourceFile = node.getSourceFile(); - const ancestor = findAncestor(node, isValidCallHierarchyDeclaration) || sourceFile; - return { declaration: ancestor, range: createTextRangeFromNode(node, sourceFile) }; - } - } - } - function getCallSiteGroupKey(entry) { - return getNodeId(entry.declaration); - } - function createCallHierarchyIncomingCall(from, fromSpans) { - return { from, fromSpans }; - } - function convertCallSiteGroupToIncomingCall(program, entries) { - return createCallHierarchyIncomingCall(createCallHierarchyItem(program, entries[0].declaration), map(entries, (entry) => createTextSpanFromRange(entry.range))); - } - function getIncomingCalls(program, declaration, cancellationToken) { - if (isSourceFile(declaration) || isModuleDeclaration(declaration) || isClassStaticBlockDeclaration(declaration)) { - return []; - } - const location = getCallHierarchyDeclarationReferenceNode(declaration); - const calls = filter(ts_FindAllReferences_exports.findReferenceOrRenameEntries( - program, - cancellationToken, - program.getSourceFiles(), - location, - /*position*/ - 0, - { use: ts_FindAllReferences_exports.FindReferencesUse.References }, - convertEntryToCallSite - ), isDefined); - return calls ? group(calls, getCallSiteGroupKey, (entries) => convertCallSiteGroupToIncomingCall(program, entries)) : []; - } - function createCallSiteCollector(program, callSites) { - function recordCallSite(node) { - const target = isTaggedTemplateExpression(node) ? node.tag : isJsxOpeningLikeElement(node) ? node.tagName : isAccessExpression(node) ? node : isClassStaticBlockDeclaration(node) ? node : node.expression; - const declaration = resolveCallHierarchyDeclaration(program, target); - if (declaration) { - const range = createTextRangeFromNode(target, node.getSourceFile()); - if (isArray(declaration)) { - for (const decl of declaration) { - callSites.push({ declaration: decl, range }); - } - } else { - callSites.push({ declaration, range }); - } - } - } - function collect(node) { - if (!node) - return; - if (node.flags & 33554432 /* Ambient */) { - return; - } - if (isValidCallHierarchyDeclaration(node)) { - if (isClassLike(node)) { - for (const member of node.members) { - if (member.name && isComputedPropertyName(member.name)) { - collect(member.name.expression); - } - } - } - return; - } - switch (node.kind) { - case 80 /* Identifier */: - case 271 /* ImportEqualsDeclaration */: - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - return; - case 175 /* ClassStaticBlockDeclaration */: - recordCallSite(node); - return; - case 216 /* TypeAssertionExpression */: - case 234 /* AsExpression */: - collect(node.expression); - return; - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - collect(node.name); - collect(node.initializer); - return; - case 213 /* CallExpression */: - recordCallSite(node); - collect(node.expression); - forEach(node.arguments, collect); - return; - case 214 /* NewExpression */: - recordCallSite(node); - collect(node.expression); - forEach(node.arguments, collect); - return; - case 215 /* TaggedTemplateExpression */: - recordCallSite(node); - collect(node.tag); - collect(node.template); - return; - case 286 /* JsxOpeningElement */: - case 285 /* JsxSelfClosingElement */: - recordCallSite(node); - collect(node.tagName); - collect(node.attributes); - return; - case 170 /* Decorator */: - recordCallSite(node); - collect(node.expression); - return; - case 211 /* PropertyAccessExpression */: - case 212 /* ElementAccessExpression */: - recordCallSite(node); - forEachChild(node, collect); - break; - case 238 /* SatisfiesExpression */: - collect(node.expression); - return; - } - if (isPartOfTypeNode(node)) { - return; - } - forEachChild(node, collect); - } - return collect; - } - function collectCallSitesOfSourceFile(node, collect) { - forEach(node.statements, collect); - } - function collectCallSitesOfModuleDeclaration(node, collect) { - if (!hasSyntacticModifier(node, 2 /* Ambient */) && node.body && isModuleBlock(node.body)) { - forEach(node.body.statements, collect); - } - } - function collectCallSitesOfFunctionLikeDeclaration(typeChecker, node, collect) { - const implementation = findImplementation(typeChecker, node); - if (implementation) { - forEach(implementation.parameters, collect); - collect(implementation.body); - } - } - function collectCallSitesOfClassStaticBlockDeclaration(node, collect) { - collect(node.body); - } - function collectCallSitesOfClassLikeDeclaration(node, collect) { - forEach(node.modifiers, collect); - const heritage = getClassExtendsHeritageElement(node); - if (heritage) { - collect(heritage.expression); - } - for (const member of node.members) { - if (canHaveModifiers(member)) { - forEach(member.modifiers, collect); - } - if (isPropertyDeclaration(member)) { - collect(member.initializer); - } else if (isConstructorDeclaration(member) && member.body) { - forEach(member.parameters, collect); - collect(member.body); - } else if (isClassStaticBlockDeclaration(member)) { - collect(member); - } - } - } - function collectCallSites(program, node) { - const callSites = []; - const collect = createCallSiteCollector(program, callSites); - switch (node.kind) { - case 312 /* SourceFile */: - collectCallSitesOfSourceFile(node, collect); - break; - case 267 /* ModuleDeclaration */: - collectCallSitesOfModuleDeclaration(node, collect); - break; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - collectCallSitesOfFunctionLikeDeclaration(program.getTypeChecker(), node, collect); - break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - collectCallSitesOfClassLikeDeclaration(node, collect); - break; - case 175 /* ClassStaticBlockDeclaration */: - collectCallSitesOfClassStaticBlockDeclaration(node, collect); - break; - default: - Debug.assertNever(node); - } - return callSites; - } - function createCallHierarchyOutgoingCall(to, fromSpans) { - return { to, fromSpans }; - } - function convertCallSiteGroupToOutgoingCall(program, entries) { - return createCallHierarchyOutgoingCall(createCallHierarchyItem(program, entries[0].declaration), map(entries, (entry) => createTextSpanFromRange(entry.range))); - } - function getOutgoingCalls(program, declaration) { - if (declaration.flags & 33554432 /* Ambient */ || isMethodSignature(declaration)) { - return []; - } - return group(collectCallSites(program, declaration), getCallSiteGroupKey, (entries) => convertCallSiteGroupToOutgoingCall(program, entries)); - } - var init_callHierarchy = __esm({ - "src/services/callHierarchy.ts"() { - "use strict"; - init_ts4(); - } - }); - - // src/services/_namespaces/ts.CallHierarchy.ts - var ts_CallHierarchy_exports = {}; - __export(ts_CallHierarchy_exports, { - createCallHierarchyItem: () => createCallHierarchyItem, - getIncomingCalls: () => getIncomingCalls, - getOutgoingCalls: () => getOutgoingCalls, - resolveCallHierarchyDeclaration: () => resolveCallHierarchyDeclaration - }); - var init_ts_CallHierarchy = __esm({ - "src/services/_namespaces/ts.CallHierarchy.ts"() { - "use strict"; - init_callHierarchy(); - } - }); - - // src/services/_namespaces/ts.classifier.v2020.ts - var ts_classifier_v2020_exports = {}; - __export(ts_classifier_v2020_exports, { - TokenEncodingConsts: () => TokenEncodingConsts, - TokenModifier: () => TokenModifier, - TokenType: () => TokenType, - getEncodedSemanticClassifications: () => getEncodedSemanticClassifications2, - getSemanticClassifications: () => getSemanticClassifications2 - }); - var init_ts_classifier_v2020 = __esm({ - "src/services/_namespaces/ts.classifier.v2020.ts"() { - "use strict"; - init_classifier2020(); - } - }); - - // src/services/_namespaces/ts.classifier.ts - var ts_classifier_exports = {}; - __export(ts_classifier_exports, { - v2020: () => ts_classifier_v2020_exports - }); - var init_ts_classifier = __esm({ - "src/services/_namespaces/ts.classifier.ts"() { - "use strict"; - init_ts_classifier_v2020(); - } - }); - - // src/services/codeFixProvider.ts - function createCodeFixActionWithoutFixAll(fixName8, changes, description3) { - return createCodeFixActionWorker( - fixName8, - diagnosticToString(description3), - changes, - /*fixId*/ - void 0, - /*fixAllDescription*/ - void 0 - ); - } - function createCodeFixAction(fixName8, changes, description3, fixId52, fixAllDescription, command) { - return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId52, diagnosticToString(fixAllDescription), command); - } - function createCodeFixActionMaybeFixAll(fixName8, changes, description3, fixId52, fixAllDescription, command) { - return createCodeFixActionWorker(fixName8, diagnosticToString(description3), changes, fixId52, fixAllDescription && diagnosticToString(fixAllDescription), command); - } - function createCodeFixActionWorker(fixName8, description3, changes, fixId52, fixAllDescription, command) { - return { fixName: fixName8, description: description3, changes, fixId: fixId52, fixAllDescription, commands: command ? [command] : void 0 }; - } - function registerCodeFix(reg) { - for (const error2 of reg.errorCodes) { - errorCodeToFixesArray = void 0; - errorCodeToFixes.add(String(error2), reg); - } - if (reg.fixIds) { - for (const fixId52 of reg.fixIds) { - Debug.assert(!fixIdToRegistration.has(fixId52)); - fixIdToRegistration.set(fixId52, reg); - } - } - } - function getSupportedErrorCodes() { - return errorCodeToFixesArray ?? (errorCodeToFixesArray = arrayFrom(errorCodeToFixes.keys())); - } - function removeFixIdIfFixAllUnavailable(registration, diagnostics) { - const { errorCodes: errorCodes64 } = registration; - let maybeFixableDiagnostics = 0; - for (const diag2 of diagnostics) { - if (contains(errorCodes64, diag2.code)) - maybeFixableDiagnostics++; - if (maybeFixableDiagnostics > 1) - break; - } - const fixAllUnavailable = maybeFixableDiagnostics < 2; - return ({ fixId: fixId52, fixAllDescription, ...action }) => { - return fixAllUnavailable ? action : { ...action, fixId: fixId52, fixAllDescription }; - }; - } - function getFixes(context) { - const diagnostics = getDiagnostics(context); - const registrations = errorCodeToFixes.get(String(context.errorCode)); - return flatMap(registrations, (f) => map(f.getCodeActions(context), removeFixIdIfFixAllUnavailable(f, diagnostics))); - } - function getAllFixes(context) { - return fixIdToRegistration.get(cast(context.fixId, isString)).getAllCodeActions(context); - } - function createCombinedCodeActions(changes, commands) { - return { changes, commands }; - } - function createFileTextChanges(fileName, textChanges2) { - return { fileName, textChanges: textChanges2 }; - } - function codeFixAll(context, errorCodes64, use) { - const commands = []; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => eachDiagnostic(context, errorCodes64, (diag2) => use(t, diag2, commands))); - return createCombinedCodeActions(changes, commands.length === 0 ? void 0 : commands); - } - function eachDiagnostic(context, errorCodes64, cb) { - for (const diag2 of getDiagnostics(context)) { - if (contains(errorCodes64, diag2.code)) { - cb(diag2); - } - } - } - function getDiagnostics({ program, sourceFile, cancellationToken }) { - return [ - ...program.getSemanticDiagnostics(sourceFile, cancellationToken), - ...program.getSyntacticDiagnostics(sourceFile, cancellationToken), - ...computeSuggestionDiagnostics(sourceFile, program, cancellationToken) - ]; - } - var errorCodeToFixes, fixIdToRegistration, errorCodeToFixesArray; - var init_codeFixProvider = __esm({ - "src/services/codeFixProvider.ts"() { - "use strict"; - init_ts4(); - errorCodeToFixes = createMultiMap(); - fixIdToRegistration = /* @__PURE__ */ new Map(); - } - }); - - // src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts - function makeChange(changeTracker, sourceFile, assertion) { - const replacement = isAsExpression(assertion) ? factory.createAsExpression(assertion.expression, factory.createKeywordTypeNode(159 /* UnknownKeyword */)) : factory.createTypeAssertion(factory.createKeywordTypeNode(159 /* UnknownKeyword */), assertion.expression); - changeTracker.replaceNode(sourceFile, assertion.expression, replacement); - } - function getAssertion(sourceFile, pos) { - if (isInJSFile(sourceFile)) - return void 0; - return findAncestor(getTokenAtPosition(sourceFile, pos), (n) => isAsExpression(n) || isTypeAssertionExpression(n)); - } - var fixId, errorCodes; - var init_addConvertToUnknownForNonOverlappingTypes = __esm({ - "src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId = "addConvertToUnknownForNonOverlappingTypes"; - errorCodes = [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]; - registerCodeFix({ - errorCodes, - getCodeActions: function getCodeActionsToAddConvertToUnknownForNonOverlappingTypes(context) { - const assertion = getAssertion(context.sourceFile, context.span.start); - if (assertion === void 0) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange(t, context.sourceFile, assertion)); - return [createCodeFixAction(fixId, changes, Diagnostics.Add_unknown_conversion_for_non_overlapping_types, fixId, Diagnostics.Add_unknown_to_all_conversions_of_non_overlapping_types)]; - }, - fixIds: [fixId], - getAllCodeActions: (context) => codeFixAll(context, errorCodes, (changes, diag2) => { - const assertion = getAssertion(diag2.file, diag2.start); - if (assertion) { - makeChange(changes, diag2.file, assertion); - } - }) - }); - } - }); - - // src/services/codefixes/addEmptyExportDeclaration.ts - var init_addEmptyExportDeclaration = __esm({ - "src/services/codefixes/addEmptyExportDeclaration.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - registerCodeFix({ - errorCodes: [ - 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, - Diagnostics.await_using_statements_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, - Diagnostics.for_await_loops_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 getCodeActionsToAddEmptyExportDeclaration(context) { - const { sourceFile } = context; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => { - const exportDeclaration = factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([]), - /*moduleSpecifier*/ - void 0 - ); - changes2.insertNodeAtEndOfScope(sourceFile, sourceFile, exportDeclaration); - }); - return [createCodeFixActionWithoutFixAll("addEmptyExportDeclaration", changes, Diagnostics.Add_export_to_make_this_file_into_a_module)]; - } - }); - } - }); - - // src/services/codefixes/addMissingAsync.ts - function getFix(context, decl, trackChanges, fixedDeclarations) { - const changes = trackChanges((t) => makeChange2(t, context.sourceFile, decl, fixedDeclarations)); - return createCodeFixAction(fixId2, changes, Diagnostics.Add_async_modifier_to_containing_function, fixId2, Diagnostics.Add_all_missing_async_modifiers); - } - function makeChange2(changeTracker, sourceFile, insertionSite, fixedDeclarations) { - if (fixedDeclarations) { - if (fixedDeclarations.has(getNodeId(insertionSite))) { - return; - } - } - fixedDeclarations == null ? void 0 : fixedDeclarations.add(getNodeId(insertionSite)); - const cloneWithModifier = factory.updateModifiers( - getSynthesizedDeepClone( - insertionSite, - /*includeTrivia*/ - true - ), - factory.createNodeArray(factory.createModifiersFromModifierFlags(getSyntacticModifierFlags(insertionSite) | 512 /* Async */)) - ); - changeTracker.replaceNode( - sourceFile, - insertionSite, - cloneWithModifier - ); - } - function getFixableErrorSpanDeclaration(sourceFile, span) { - if (!span) - return void 0; - const token = getTokenAtPosition(sourceFile, span.start); - const decl = findAncestor(token, (node) => { - if (node.getStart(sourceFile) < span.start || node.getEnd() > textSpanEnd(span)) { - return "quit"; - } - return (isArrowFunction(node) || isMethodDeclaration(node) || isFunctionExpression(node) || isFunctionDeclaration(node)) && textSpansEqual(span, createTextSpanFromNode(node, sourceFile)); - }); - return decl; - } - function getIsMatchingAsyncError(span, errorCode) { - return ({ start, length: length2, relatedInformation, code }) => isNumber(start) && isNumber(length2) && textSpansEqual({ start, length: length2 }, span) && code === errorCode && !!relatedInformation && some(relatedInformation, (related) => related.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code); - } - var fixId2, errorCodes2; - var init_addMissingAsync = __esm({ - "src/services/codefixes/addMissingAsync.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId2 = "addMissingAsync"; - errorCodes2 = [ - Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, - Diagnostics.Type_0_is_not_assignable_to_type_1.code, - Diagnostics.Type_0_is_not_comparable_to_type_1.code - ]; - registerCodeFix({ - fixIds: [fixId2], - errorCodes: errorCodes2, - getCodeActions: function getCodeActionsToAddMissingAsync(context) { - const { sourceFile, errorCode, cancellationToken, program, span } = context; - const diagnostic = find(program.getTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode)); - const directSpan = diagnostic && diagnostic.relatedInformation && find(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code); - const decl = getFixableErrorSpanDeclaration(sourceFile, directSpan); - if (!decl) { - return; - } - const trackChanges = (cb) => ts_textChanges_exports.ChangeTracker.with(context, cb); - return [getFix(context, decl, trackChanges)]; - }, - getAllCodeActions: (context) => { - const { sourceFile } = context; - const fixedDeclarations = /* @__PURE__ */ new Set(); - return codeFixAll(context, errorCodes2, (t, diagnostic) => { - const span = diagnostic.relatedInformation && find(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code); - const decl = getFixableErrorSpanDeclaration(sourceFile, span); - if (!decl) { - return; - } - const trackChanges = (cb) => (cb(t), []); - return getFix(context, decl, trackChanges, fixedDeclarations); - }); - } - }); - } - }); - - // src/services/codefixes/addMissingAwait.ts - function getAwaitErrorSpanExpression(sourceFile, errorCode, span, cancellationToken, program) { - const expression = getFixableErrorSpanExpression(sourceFile, span); - return expression && isMissingAwaitError(sourceFile, errorCode, span, cancellationToken, program) && isInsideAwaitableBody(expression) ? expression : void 0; - } - function getDeclarationSiteFix(context, expression, errorCode, checker, trackChanges, fixedDeclarations) { - const { sourceFile, program, cancellationToken } = context; - const awaitableInitializers = findAwaitableInitializers(expression, sourceFile, cancellationToken, program, checker); - if (awaitableInitializers) { - const initializerChanges = trackChanges((t) => { - forEach(awaitableInitializers.initializers, ({ expression: expression2 }) => makeChange3(t, errorCode, sourceFile, checker, expression2, fixedDeclarations)); - if (fixedDeclarations && awaitableInitializers.needsSecondPassForFixAll) { - makeChange3(t, errorCode, sourceFile, checker, expression, fixedDeclarations); - } - }); - return createCodeFixActionWithoutFixAll( - "addMissingAwaitToInitializer", - initializerChanges, - awaitableInitializers.initializers.length === 1 ? [Diagnostics.Add_await_to_initializer_for_0, awaitableInitializers.initializers[0].declarationSymbol.name] : Diagnostics.Add_await_to_initializers - ); - } - } - function getUseSiteFix(context, expression, errorCode, checker, trackChanges, fixedDeclarations) { - const changes = trackChanges((t) => makeChange3(t, errorCode, context.sourceFile, checker, expression, fixedDeclarations)); - return createCodeFixAction(fixId3, changes, Diagnostics.Add_await, fixId3, Diagnostics.Fix_all_expressions_possibly_missing_await); - } - function isMissingAwaitError(sourceFile, errorCode, span, cancellationToken, program) { - const checker = program.getTypeChecker(); - const diagnostics = checker.getDiagnostics(sourceFile, cancellationToken); - return some(diagnostics, ({ start, length: length2, relatedInformation, code }) => isNumber(start) && isNumber(length2) && textSpansEqual({ start, length: length2 }, span) && code === errorCode && !!relatedInformation && some(relatedInformation, (related) => related.code === Diagnostics.Did_you_forget_to_use_await.code)); - } - function findAwaitableInitializers(expression, sourceFile, cancellationToken, program, checker) { - const identifiers = getIdentifiersFromErrorSpanExpression(expression, checker); - if (!identifiers) { - return; - } - let isCompleteFix = identifiers.isCompleteFix; - let initializers; - for (const identifier of identifiers.identifiers) { - const symbol = checker.getSymbolAtLocation(identifier); - if (!symbol) { - continue; - } - const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); - const variableName = declaration && tryCast(declaration.name, isIdentifier); - const variableStatement = getAncestor(declaration, 243 /* VariableStatement */); - if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { - isCompleteFix = false; - continue; - } - const diagnostics = program.getSemanticDiagnostics(sourceFile, cancellationToken); - const isUsedElsewhere = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(variableName, checker, sourceFile, (reference) => { - return identifier !== reference && !symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, checker); - }); - if (isUsedElsewhere) { - isCompleteFix = false; - continue; - } - (initializers || (initializers = [])).push({ - expression: declaration.initializer, - declarationSymbol: symbol - }); - } - return initializers && { - initializers, - needsSecondPassForFixAll: !isCompleteFix - }; - } - function getIdentifiersFromErrorSpanExpression(expression, checker) { - if (isPropertyAccessExpression(expression.parent) && isIdentifier(expression.parent.expression)) { - return { identifiers: [expression.parent.expression], isCompleteFix: true }; - } - if (isIdentifier(expression)) { - return { identifiers: [expression], isCompleteFix: true }; - } - if (isBinaryExpression(expression)) { - let sides; - let isCompleteFix = true; - for (const side of [expression.left, expression.right]) { - const type = checker.getTypeAtLocation(side); - if (checker.getPromisedTypeOfPromise(type)) { - if (!isIdentifier(side)) { - isCompleteFix = false; - continue; - } - (sides || (sides = [])).push(side); - } - } - return sides && { identifiers: sides, isCompleteFix }; - } - } - function symbolReferenceIsAlsoMissingAwait(reference, diagnostics, sourceFile, checker) { - const errorNode = isPropertyAccessExpression(reference.parent) ? reference.parent.name : isBinaryExpression(reference.parent) ? reference.parent : reference; - const diagnostic = find(diagnostics, (diagnostic2) => diagnostic2.start === errorNode.getStart(sourceFile) && diagnostic2.start + diagnostic2.length === errorNode.getEnd()); - return diagnostic && contains(errorCodes3, diagnostic.code) || // A Promise is usually not correct in a binary expression (it's not valid - // in an arithmetic expression and an equality comparison seems unusual), - // but if the other side of the binary expression has an error, the side - // is typed `any` which will squash the error that would identify this - // Promise as an invalid operand. So if the whole binary expression is - // typed `any` as a result, there is a strong likelihood that this Promise - // is accidentally missing `await`. - checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; - } - function isInsideAwaitableBody(node) { - return node.kind & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); - } - function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { - if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { - const exprType = checker.getTypeAtLocation(insertionSite); - const asyncIter = checker.getAsyncIterableType(); - if (asyncIter && checker.isTypeAssignableTo(exprType, asyncIter)) { - const forOf = insertionSite.parent; - changeTracker.replaceNode(sourceFile, forOf, factory.updateForOfStatement(forOf, factory.createToken(135 /* AwaitKeyword */), forOf.initializer, forOf.expression, forOf.statement)); - return; - } - } - if (isBinaryExpression(insertionSite)) { - for (const side of [insertionSite.left, insertionSite.right]) { - if (fixedDeclarations && isIdentifier(side)) { - const symbol = checker.getSymbolAtLocation(side); - if (symbol && fixedDeclarations.has(getSymbolId(symbol))) { - continue; - } - } - const type = checker.getTypeAtLocation(side); - const newNode = checker.getPromisedTypeOfPromise(type) ? factory.createAwaitExpression(side) : side; - changeTracker.replaceNode(sourceFile, side, newNode); - } - } else if (errorCode === propertyAccessCode && isPropertyAccessExpression(insertionSite.parent)) { - if (fixedDeclarations && isIdentifier(insertionSite.parent.expression)) { - const symbol = checker.getSymbolAtLocation(insertionSite.parent.expression); - if (symbol && fixedDeclarations.has(getSymbolId(symbol))) { - return; - } - } - changeTracker.replaceNode( - sourceFile, - insertionSite.parent.expression, - factory.createParenthesizedExpression(factory.createAwaitExpression(insertionSite.parent.expression)) - ); - insertLeadingSemicolonIfNeeded(changeTracker, insertionSite.parent.expression, sourceFile); - } else if (contains(callableConstructableErrorCodes, errorCode) && isCallOrNewExpression(insertionSite.parent)) { - if (fixedDeclarations && isIdentifier(insertionSite)) { - const symbol = checker.getSymbolAtLocation(insertionSite); - if (symbol && fixedDeclarations.has(getSymbolId(symbol))) { - return; - } - } - changeTracker.replaceNode(sourceFile, insertionSite, factory.createParenthesizedExpression(factory.createAwaitExpression(insertionSite))); - insertLeadingSemicolonIfNeeded(changeTracker, insertionSite, sourceFile); - } else { - if (fixedDeclarations && isVariableDeclaration(insertionSite.parent) && isIdentifier(insertionSite.parent.name)) { - const symbol = checker.getSymbolAtLocation(insertionSite.parent.name); - if (symbol && !tryAddToSet(fixedDeclarations, getSymbolId(symbol))) { - return; - } - } - changeTracker.replaceNode(sourceFile, insertionSite, factory.createAwaitExpression(insertionSite)); - } - } - function insertLeadingSemicolonIfNeeded(changeTracker, beforeNode, sourceFile) { - const precedingToken = findPrecedingToken(beforeNode.pos, sourceFile); - if (precedingToken && positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) { - changeTracker.insertText(sourceFile, beforeNode.getStart(sourceFile), ";"); - } - } - var fixId3, propertyAccessCode, callableConstructableErrorCodes, errorCodes3; - var init_addMissingAwait = __esm({ - "src/services/codefixes/addMissingAwait.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId3 = "addMissingAwait"; - propertyAccessCode = Diagnostics.Property_0_does_not_exist_on_type_1.code; - callableConstructableErrorCodes = [ - Diagnostics.This_expression_is_not_callable.code, - Diagnostics.This_expression_is_not_constructable.code - ]; - errorCodes3 = [ - Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type.code, - Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code, - Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type.code, - Diagnostics.Operator_0_cannot_be_applied_to_type_1.code, - Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2.code, - Diagnostics.This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap.code, - Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined.code, - Diagnostics.Type_0_is_not_an_array_type.code, - Diagnostics.Type_0_is_not_an_array_type_or_a_string_type.code, - Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher.code, - 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, - Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator.code, - Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator.code, - Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator.code, - Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, - propertyAccessCode, - ...callableConstructableErrorCodes - ]; - registerCodeFix({ - fixIds: [fixId3], - errorCodes: errorCodes3, - getCodeActions: function getCodeActionsToAddMissingAwait(context) { - const { sourceFile, errorCode, span, cancellationToken, program } = context; - const expression = getAwaitErrorSpanExpression(sourceFile, errorCode, span, cancellationToken, program); - if (!expression) { - return; - } - const checker = context.program.getTypeChecker(); - const trackChanges = (cb) => ts_textChanges_exports.ChangeTracker.with(context, cb); - return compact([ - getDeclarationSiteFix(context, expression, errorCode, checker, trackChanges), - getUseSiteFix(context, expression, errorCode, checker, trackChanges) - ]); - }, - getAllCodeActions: (context) => { - const { sourceFile, program, cancellationToken } = context; - const checker = context.program.getTypeChecker(); - const fixedDeclarations = /* @__PURE__ */ new Set(); - return codeFixAll(context, errorCodes3, (t, diagnostic) => { - const expression = getAwaitErrorSpanExpression(sourceFile, diagnostic.code, diagnostic, cancellationToken, program); - if (!expression) { - return; - } - const trackChanges = (cb) => (cb(t), []); - return getDeclarationSiteFix(context, expression, diagnostic.code, checker, trackChanges, fixedDeclarations) || getUseSiteFix(context, expression, diagnostic.code, checker, trackChanges, fixedDeclarations); - }); - } - }); - } - }); - - // src/services/codefixes/addMissingConst.ts - function makeChange4(changeTracker, sourceFile, pos, program, fixedNodes) { - const token = getTokenAtPosition(sourceFile, pos); - const forInitializer = findAncestor( - token, - (node) => isForInOrOfStatement(node.parent) ? node.parent.initializer === node : isPossiblyPartOfDestructuring(node) ? false : "quit" - ); - if (forInitializer) - return applyChange(changeTracker, forInitializer, sourceFile, fixedNodes); - const parent2 = token.parent; - if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */ && isExpressionStatement(parent2.parent)) { - return applyChange(changeTracker, token, sourceFile, fixedNodes); - } - if (isArrayLiteralExpression(parent2)) { - const checker = program.getTypeChecker(); - if (!every(parent2.elements, (element) => arrayElementCouldBeVariableDeclaration(element, checker))) { - return; - } - return applyChange(changeTracker, parent2, sourceFile, fixedNodes); - } - const commaExpression = findAncestor( - token, - (node) => isExpressionStatement(node.parent) ? true : isPossiblyPartOfCommaSeperatedInitializer(node) ? false : "quit" - ); - if (commaExpression) { - const checker = program.getTypeChecker(); - if (!expressionCouldBeVariableDeclaration(commaExpression, checker)) { - return; - } - return applyChange(changeTracker, commaExpression, sourceFile, fixedNodes); - } - } - function applyChange(changeTracker, initializer, sourceFile, fixedNodes) { - if (!fixedNodes || tryAddToSet(fixedNodes, initializer)) { - changeTracker.insertModifierBefore(sourceFile, 87 /* ConstKeyword */, initializer); - } - } - function isPossiblyPartOfDestructuring(node) { - switch (node.kind) { - case 80 /* Identifier */: - case 209 /* ArrayLiteralExpression */: - case 210 /* ObjectLiteralExpression */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - return true; - default: - return false; - } - } - function arrayElementCouldBeVariableDeclaration(expression, checker) { - const identifier = isIdentifier(expression) ? expression : isAssignmentExpression( - expression, - /*excludeCompoundAssignment*/ - true - ) && isIdentifier(expression.left) ? expression.left : void 0; - return !!identifier && !checker.getSymbolAtLocation(identifier); - } - function isPossiblyPartOfCommaSeperatedInitializer(node) { - switch (node.kind) { - case 80 /* Identifier */: - case 226 /* BinaryExpression */: - case 28 /* CommaToken */: - return true; - default: - return false; - } - } - function expressionCouldBeVariableDeclaration(expression, checker) { - if (!isBinaryExpression(expression)) { - return false; - } - if (expression.operatorToken.kind === 28 /* CommaToken */) { - return every([expression.left, expression.right], (expression2) => expressionCouldBeVariableDeclaration(expression2, checker)); - } - return expression.operatorToken.kind === 64 /* EqualsToken */ && isIdentifier(expression.left) && !checker.getSymbolAtLocation(expression.left); - } - var fixId4, errorCodes4; - var init_addMissingConst = __esm({ - "src/services/codefixes/addMissingConst.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId4 = "addMissingConst"; - errorCodes4 = [ - Diagnostics.Cannot_find_name_0.code, - Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code - ]; - registerCodeFix({ - errorCodes: errorCodes4, - getCodeActions: function getCodeActionsToAddMissingConst(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange4(t, context.sourceFile, context.span.start, context.program)); - if (changes.length > 0) { - return [createCodeFixAction(fixId4, changes, Diagnostics.Add_const_to_unresolved_variable, fixId4, Diagnostics.Add_const_to_all_unresolved_variables)]; - } - }, - fixIds: [fixId4], - getAllCodeActions: (context) => { - const fixedNodes = /* @__PURE__ */ new Set(); - return codeFixAll(context, errorCodes4, (changes, diag2) => makeChange4(changes, diag2.file, diag2.start, context.program, fixedNodes)); - } - }); - } - }); - - // src/services/codefixes/addMissingDeclareProperty.ts - function makeChange5(changeTracker, sourceFile, pos, fixedNodes) { - const token = getTokenAtPosition(sourceFile, pos); - if (!isIdentifier(token)) { - return; - } - const declaration = token.parent; - if (declaration.kind === 172 /* PropertyDeclaration */ && (!fixedNodes || tryAddToSet(fixedNodes, declaration))) { - changeTracker.insertModifierBefore(sourceFile, 138 /* DeclareKeyword */, declaration); - } - } - var fixId5, errorCodes5; - var init_addMissingDeclareProperty = __esm({ - "src/services/codefixes/addMissingDeclareProperty.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId5 = "addMissingDeclareProperty"; - errorCodes5 = [ - 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 - ]; - registerCodeFix({ - errorCodes: errorCodes5, - getCodeActions: function getCodeActionsToAddMissingDeclareOnProperty(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange5(t, context.sourceFile, context.span.start)); - if (changes.length > 0) { - return [createCodeFixAction(fixId5, changes, Diagnostics.Prefix_with_declare, fixId5, Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)]; - } - }, - fixIds: [fixId5], - getAllCodeActions: (context) => { - const fixedNodes = /* @__PURE__ */ new Set(); - return codeFixAll(context, errorCodes5, (changes, diag2) => makeChange5(changes, diag2.file, diag2.start, fixedNodes)); - } - }); - } - }); - - // src/services/codefixes/addMissingInvocationForDecorator.ts - function makeChange6(changeTracker, sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - const decorator = findAncestor(token, isDecorator); - Debug.assert(!!decorator, "Expected position to be owned by a decorator."); - const replacement = factory.createCallExpression( - decorator.expression, - /*typeArguments*/ - void 0, - /*argumentsArray*/ - void 0 - ); - changeTracker.replaceNode(sourceFile, decorator.expression, replacement); - } - var fixId6, errorCodes6; - var init_addMissingInvocationForDecorator = __esm({ - "src/services/codefixes/addMissingInvocationForDecorator.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId6 = "addMissingInvocationForDecorator"; - errorCodes6 = [Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code]; - registerCodeFix({ - errorCodes: errorCodes6, - getCodeActions: function getCodeActionsToAddMissingInvocationForDecorator(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange6(t, context.sourceFile, context.span.start)); - return [createCodeFixAction(fixId6, changes, Diagnostics.Call_decorator_expression, fixId6, Diagnostics.Add_to_all_uncalled_decorators)]; - }, - fixIds: [fixId6], - getAllCodeActions: (context) => codeFixAll(context, errorCodes6, (changes, diag2) => makeChange6(changes, diag2.file, diag2.start)) - }); - } - }); - - // src/services/codefixes/addNameToNamelessParameter.ts - function makeChange7(changeTracker, sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - const param = token.parent; - if (!isParameter(param)) { - return Debug.fail("Tried to add a parameter name to a non-parameter: " + Debug.formatSyntaxKind(token.kind)); - } - const i = param.parent.parameters.indexOf(param); - Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one."); - Debug.assert(i > -1, "Parameter not found in parent parameter list."); - const typeNode = factory.createTypeReferenceNode( - param.name, - /*typeArguments*/ - void 0 - ); - const replacement = factory.createParameterDeclaration( - param.modifiers, - param.dotDotDotToken, - "arg" + i, - param.questionToken, - param.dotDotDotToken ? factory.createArrayTypeNode(typeNode) : typeNode, - param.initializer - ); - changeTracker.replaceNode(sourceFile, param, replacement); - } - var fixId7, errorCodes7; - var init_addNameToNamelessParameter = __esm({ - "src/services/codefixes/addNameToNamelessParameter.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId7 = "addNameToNamelessParameter"; - errorCodes7 = [Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code]; - registerCodeFix({ - errorCodes: errorCodes7, - getCodeActions: function getCodeActionsToAddNameToNamelessParameter(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange7(t, context.sourceFile, context.span.start)); - return [createCodeFixAction(fixId7, changes, Diagnostics.Add_parameter_name, fixId7, Diagnostics.Add_names_to_all_parameters_without_names)]; - }, - fixIds: [fixId7], - getAllCodeActions: (context) => codeFixAll(context, errorCodes7, (changes, diag2) => makeChange7(changes, diag2.file, diag2.start)) - }); - } - }); - - // src/services/codefixes/addOptionalPropertyUndefined.ts - function getPropertiesToAdd(file, span, checker) { - var _a, _b; - const sourceTarget = getSourceTarget(getFixableErrorSpanExpression(file, span), checker); - if (!sourceTarget) { - return emptyArray; - } - const { source: sourceNode, target: targetNode } = sourceTarget; - const target = shouldUseParentTypeOfProperty(sourceNode, targetNode, checker) ? checker.getTypeAtLocation(targetNode.expression) : checker.getTypeAtLocation(targetNode); - if ((_b = (_a = target.symbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b.some((d) => getSourceFileOfNode(d).fileName.match(/\.d\.ts$/))) { - return emptyArray; - } - return checker.getExactOptionalProperties(target); - } - function shouldUseParentTypeOfProperty(sourceNode, targetNode, checker) { - return isPropertyAccessExpression(targetNode) && !!checker.getExactOptionalProperties(checker.getTypeAtLocation(targetNode.expression)).length && checker.getTypeAtLocation(sourceNode) === checker.getUndefinedType(); - } - function getSourceTarget(errorNode, checker) { - var _a; - if (!errorNode) { - return void 0; - } else if (isBinaryExpression(errorNode.parent) && errorNode.parent.operatorToken.kind === 64 /* EqualsToken */) { - return { source: errorNode.parent.right, target: errorNode.parent.left }; - } else if (isVariableDeclaration(errorNode.parent) && errorNode.parent.initializer) { - return { source: errorNode.parent.initializer, target: errorNode.parent.name }; - } else if (isCallExpression(errorNode.parent)) { - const n = checker.getSymbolAtLocation(errorNode.parent.expression); - if (!(n == null ? void 0 : n.valueDeclaration) || !isFunctionLikeKind(n.valueDeclaration.kind)) - return void 0; - if (!isExpression(errorNode)) - return void 0; - const i = errorNode.parent.arguments.indexOf(errorNode); - if (i === -1) - return void 0; - const name = n.valueDeclaration.parameters[i].name; - if (isIdentifier(name)) - return { source: errorNode, target: name }; - } else if (isPropertyAssignment(errorNode.parent) && isIdentifier(errorNode.parent.name) || isShorthandPropertyAssignment(errorNode.parent)) { - const parentTarget = getSourceTarget(errorNode.parent.parent, checker); - if (!parentTarget) - return void 0; - const prop = checker.getPropertyOfType(checker.getTypeAtLocation(parentTarget.target), errorNode.parent.name.text); - const declaration = (_a = prop == null ? void 0 : prop.declarations) == null ? void 0 : _a[0]; - if (!declaration) - return void 0; - return { - source: isPropertyAssignment(errorNode.parent) ? errorNode.parent.initializer : errorNode.parent.name, - target: declaration - }; - } - return void 0; - } - function addUndefinedToOptionalProperty(changes, toAdd) { - for (const add of toAdd) { - const d = add.valueDeclaration; - if (d && (isPropertySignature(d) || isPropertyDeclaration(d)) && d.type) { - const t = factory.createUnionTypeNode([ - ...d.type.kind === 192 /* UnionType */ ? d.type.types : [d.type], - factory.createTypeReferenceNode("undefined") - ]); - changes.replaceNode(d.getSourceFile(), d.type, t); - } - } - } - var addOptionalPropertyUndefined, errorCodes8; - var init_addOptionalPropertyUndefined = __esm({ - "src/services/codefixes/addOptionalPropertyUndefined.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - addOptionalPropertyUndefined = "addOptionalPropertyUndefined"; - errorCodes8 = [ - Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target.code, - Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, - Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code - ]; - registerCodeFix({ - errorCodes: errorCodes8, - getCodeActions(context) { - const typeChecker = context.program.getTypeChecker(); - const toAdd = getPropertiesToAdd(context.sourceFile, context.span, typeChecker); - if (!toAdd.length) { - return void 0; - } - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addUndefinedToOptionalProperty(t, toAdd)); - return [createCodeFixActionWithoutFixAll(addOptionalPropertyUndefined, changes, Diagnostics.Add_undefined_to_optional_property_type)]; - }, - fixIds: [addOptionalPropertyUndefined] - }); - } - }); - - // src/services/codefixes/annotateWithTypeFromJSDoc.ts - function getDeclaration(file, pos) { - const name = getTokenAtPosition(file, pos); - return tryCast(isParameter(name.parent) ? name.parent.parent : name.parent, parameterShouldGetTypeFromJSDoc); - } - function parameterShouldGetTypeFromJSDoc(node) { - return isDeclarationWithType(node) && hasUsableJSDoc(node); - } - function hasUsableJSDoc(decl) { - return isFunctionLikeDeclaration(decl) ? decl.parameters.some(hasUsableJSDoc) || !decl.type && !!getJSDocReturnType(decl) : !decl.type && !!getJSDocType(decl); - } - function doChange8(changes, sourceFile, decl) { - if (isFunctionLikeDeclaration(decl) && (getJSDocReturnType(decl) || decl.parameters.some((p) => !!getJSDocType(p)))) { - if (!decl.typeParameters) { - const typeParameters = getJSDocTypeParameterDeclarations(decl); - if (typeParameters.length) - changes.insertTypeParameters(sourceFile, decl, typeParameters); - } - const needParens = isArrowFunction(decl) && !findChildOfKind(decl, 21 /* OpenParenToken */, sourceFile); - if (needParens) - changes.insertNodeBefore(sourceFile, first(decl.parameters), factory.createToken(21 /* OpenParenToken */)); - for (const param of decl.parameters) { - if (!param.type) { - const paramType = getJSDocType(param); - if (paramType) - changes.tryInsertTypeAnnotation(sourceFile, param, visitNode(paramType, transformJSDocType, isTypeNode)); - } - } - if (needParens) - changes.insertNodeAfter(sourceFile, last(decl.parameters), factory.createToken(22 /* CloseParenToken */)); - if (!decl.type) { - const returnType = getJSDocReturnType(decl); - if (returnType) - changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(returnType, transformJSDocType, isTypeNode)); - } - } else { - const jsdocType = Debug.checkDefined(getJSDocType(decl), "A JSDocType for this declaration should exist"); - Debug.assert(!decl.type, "The JSDocType decl should have a type"); - changes.tryInsertTypeAnnotation(sourceFile, decl, visitNode(jsdocType, transformJSDocType, isTypeNode)); - } - } - function isDeclarationWithType(node) { - return isFunctionLikeDeclaration(node) || node.kind === 260 /* VariableDeclaration */ || node.kind === 171 /* PropertySignature */ || node.kind === 172 /* PropertyDeclaration */; - } - function transformJSDocType(node) { - switch (node.kind) { - case 319 /* JSDocAllType */: - case 320 /* JSDocUnknownType */: - return factory.createTypeReferenceNode("any", emptyArray); - case 323 /* JSDocOptionalType */: - return transformJSDocOptionalType(node); - case 322 /* JSDocNonNullableType */: - return transformJSDocType(node.type); - case 321 /* JSDocNullableType */: - return transformJSDocNullableType(node); - case 325 /* JSDocVariadicType */: - return transformJSDocVariadicType(node); - case 324 /* JSDocFunctionType */: - return transformJSDocFunctionType(node); - case 183 /* TypeReference */: - return transformJSDocTypeReference(node); - case 329 /* JSDocTypeLiteral */: - return transformJSDocTypeLiteral(node); - default: - const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); - setEmitFlags(visited, 1 /* SingleLine */); - return visited; - } - } - function transformJSDocTypeLiteral(node) { - const typeNode = factory.createTypeLiteralNode(map(node.jsDocPropertyTags, (tag) => factory.createPropertySignature( - /*modifiers*/ - void 0, - isIdentifier(tag.name) ? tag.name : tag.name.right, - isOptionalJSDocPropertyLikeTag(tag) ? factory.createToken(58 /* QuestionToken */) : void 0, - tag.typeExpression && visitNode(tag.typeExpression.type, transformJSDocType, isTypeNode) || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ))); - setEmitFlags(typeNode, 1 /* SingleLine */); - return typeNode; - } - function transformJSDocOptionalType(node) { - return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("undefined", emptyArray)]); - } - function transformJSDocNullableType(node) { - return factory.createUnionTypeNode([visitNode(node.type, transformJSDocType, isTypeNode), factory.createTypeReferenceNode("null", emptyArray)]); - } - function transformJSDocVariadicType(node) { - return factory.createArrayTypeNode(visitNode(node.type, transformJSDocType, isTypeNode)); - } - function transformJSDocFunctionType(node) { - return factory.createFunctionTypeNode(emptyArray, node.parameters.map(transformJSDocParameter), node.type ?? factory.createKeywordTypeNode(133 /* AnyKeyword */)); - } - function transformJSDocParameter(node) { - const index = node.parent.parameters.indexOf(node); - const isRest = node.type.kind === 325 /* JSDocVariadicType */ && index === node.parent.parameters.length - 1; - const name = node.name || (isRest ? "rest" : "arg" + index); - const dotdotdot = isRest ? factory.createToken(26 /* DotDotDotToken */) : node.dotDotDotToken; - return factory.createParameterDeclaration(node.modifiers, dotdotdot, name, node.questionToken, visitNode(node.type, transformJSDocType, isTypeNode), node.initializer); - } - function transformJSDocTypeReference(node) { - let name = node.typeName; - let args = node.typeArguments; - if (isIdentifier(node.typeName)) { - if (isJSDocIndexSignature(node)) { - return transformJSDocIndexSignature(node); - } - let text = node.typeName.text; - switch (node.typeName.text) { - case "String": - case "Boolean": - case "Object": - case "Number": - text = text.toLowerCase(); - break; - case "array": - case "date": - case "promise": - text = text[0].toUpperCase() + text.slice(1); - break; - } - name = factory.createIdentifier(text); - if ((text === "Array" || text === "Promise") && !node.typeArguments) { - args = factory.createNodeArray([factory.createTypeReferenceNode("any", emptyArray)]); - } else { - args = visitNodes2(node.typeArguments, transformJSDocType, isTypeNode); - } - } - return factory.createTypeReferenceNode(name, args); - } - function transformJSDocIndexSignature(node) { - const index = factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - node.typeArguments[0].kind === 150 /* NumberKeyword */ ? "n" : "s", - /*questionToken*/ - void 0, - factory.createTypeReferenceNode(node.typeArguments[0].kind === 150 /* NumberKeyword */ ? "number" : "string", []), - /*initializer*/ - void 0 - ); - const indexSignature = factory.createTypeLiteralNode([factory.createIndexSignature( - /*modifiers*/ - void 0, - [index], - node.typeArguments[1] - )]); - setEmitFlags(indexSignature, 1 /* SingleLine */); - return indexSignature; - } - var fixId8, errorCodes9; - var init_annotateWithTypeFromJSDoc = __esm({ - "src/services/codefixes/annotateWithTypeFromJSDoc.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId8 = "annotateWithTypeFromJSDoc"; - errorCodes9 = [Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code]; - registerCodeFix({ - errorCodes: errorCodes9, - getCodeActions(context) { - const decl = getDeclaration(context.sourceFile, context.span.start); - if (!decl) - return; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange8(t, context.sourceFile, decl)); - return [createCodeFixAction(fixId8, changes, Diagnostics.Annotate_with_type_from_JSDoc, fixId8, Diagnostics.Annotate_everything_with_types_from_JSDoc)]; - }, - fixIds: [fixId8], - getAllCodeActions: (context) => codeFixAll(context, errorCodes9, (changes, diag2) => { - const decl = getDeclaration(diag2.file, diag2.start); - if (decl) - doChange8(changes, diag2.file, decl); - }) - }); - } - }); - - // src/services/codefixes/convertFunctionToEs6Class.ts - function doChange9(changes, sourceFile, position, checker, preferences, compilerOptions) { - const ctorSymbol = checker.getSymbolAtLocation(getTokenAtPosition(sourceFile, position)); - if (!ctorSymbol || !ctorSymbol.valueDeclaration || !(ctorSymbol.flags & (16 /* Function */ | 3 /* Variable */))) { - return void 0; - } - const ctorDeclaration = ctorSymbol.valueDeclaration; - if (isFunctionDeclaration(ctorDeclaration) || isFunctionExpression(ctorDeclaration)) { - changes.replaceNode(sourceFile, ctorDeclaration, createClassFromFunction(ctorDeclaration)); - } else if (isVariableDeclaration(ctorDeclaration)) { - const classDeclaration = createClassFromVariableDeclaration(ctorDeclaration); - if (!classDeclaration) { - return void 0; - } - const ancestor = ctorDeclaration.parent.parent; - if (isVariableDeclarationList(ctorDeclaration.parent) && ctorDeclaration.parent.declarations.length > 1) { - changes.delete(sourceFile, ctorDeclaration); - changes.insertNodeAfter(sourceFile, ancestor, classDeclaration); - } else { - changes.replaceNode(sourceFile, ancestor, classDeclaration); - } - } - function createClassElementsFromSymbol(symbol) { - const memberElements = []; - if (symbol.exports) { - symbol.exports.forEach((member) => { - if (member.name === "prototype" && member.declarations) { - const firstDeclaration = member.declarations[0]; - if (member.declarations.length === 1 && isPropertyAccessExpression(firstDeclaration) && isBinaryExpression(firstDeclaration.parent) && firstDeclaration.parent.operatorToken.kind === 64 /* EqualsToken */ && isObjectLiteralExpression(firstDeclaration.parent.right)) { - const prototypes = firstDeclaration.parent.right; - createClassElement( - prototypes.symbol, - /*modifiers*/ - void 0, - memberElements - ); - } - } else { - createClassElement(member, [factory.createToken(126 /* StaticKeyword */)], memberElements); - } - }); - } - if (symbol.members) { - symbol.members.forEach((member, key) => { - var _a, _b, _c, _d; - if (key === "constructor" && member.valueDeclaration) { - const prototypeAssignment = (_d = (_c = (_b = (_a = symbol.exports) == null ? void 0 : _a.get("prototype")) == null ? void 0 : _b.declarations) == null ? void 0 : _c[0]) == null ? void 0 : _d.parent; - if (prototypeAssignment && isBinaryExpression(prototypeAssignment) && isObjectLiteralExpression(prototypeAssignment.right) && some(prototypeAssignment.right.properties, isConstructorAssignment)) { - } else { - changes.delete(sourceFile, member.valueDeclaration.parent); - } - return; - } - createClassElement( - member, - /*modifiers*/ - void 0, - memberElements - ); - }); - } - return memberElements; - function shouldConvertDeclaration(_target, source) { - if (isAccessExpression(_target)) { - if (isPropertyAccessExpression(_target) && isConstructorAssignment(_target)) - return true; - return isFunctionLike(source); - } else { - return every(_target.properties, (property) => { - if (isMethodDeclaration(property) || isGetOrSetAccessorDeclaration(property)) - return true; - if (isPropertyAssignment(property) && isFunctionExpression(property.initializer) && !!property.name) - return true; - if (isConstructorAssignment(property)) - return true; - return false; - }); - } - } - function createClassElement(symbol2, modifiers, members) { - if (!(symbol2.flags & 8192 /* Method */) && !(symbol2.flags & 4096 /* ObjectLiteral */)) { - return; - } - const memberDeclaration = symbol2.valueDeclaration; - const assignmentBinaryExpression = memberDeclaration.parent; - const assignmentExpr = assignmentBinaryExpression.right; - if (!shouldConvertDeclaration(memberDeclaration, assignmentExpr)) { - return; - } - if (some(members, (m) => { - const name = getNameOfDeclaration(m); - if (name && isIdentifier(name) && idText(name) === symbolName(symbol2)) { - return true; - } - return false; - })) { - return; - } - const nodeToDelete = assignmentBinaryExpression.parent && assignmentBinaryExpression.parent.kind === 244 /* ExpressionStatement */ ? assignmentBinaryExpression.parent : assignmentBinaryExpression; - changes.delete(sourceFile, nodeToDelete); - if (!assignmentExpr) { - members.push(factory.createPropertyDeclaration( - modifiers, - symbol2.name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - )); - return; - } - if (isAccessExpression(memberDeclaration) && (isFunctionExpression(assignmentExpr) || isArrowFunction(assignmentExpr))) { - const quotePreference = getQuotePreference(sourceFile, preferences); - const name = tryGetPropertyName(memberDeclaration, compilerOptions, quotePreference); - if (name) { - createFunctionLikeExpressionMember(members, assignmentExpr, name); - } - return; - } else if (isObjectLiteralExpression(assignmentExpr)) { - forEach( - assignmentExpr.properties, - (property) => { - if (isMethodDeclaration(property) || isGetOrSetAccessorDeclaration(property)) { - members.push(property); - } - if (isPropertyAssignment(property) && isFunctionExpression(property.initializer)) { - createFunctionLikeExpressionMember(members, property.initializer, property.name); - } - if (isConstructorAssignment(property)) - return; - return; - } - ); - return; - } else { - if (isSourceFileJS(sourceFile)) - return; - if (!isPropertyAccessExpression(memberDeclaration)) - return; - const prop = factory.createPropertyDeclaration( - modifiers, - memberDeclaration.name, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - assignmentExpr - ); - copyLeadingComments(assignmentBinaryExpression.parent, prop, sourceFile); - members.push(prop); - return; - } - function createFunctionLikeExpressionMember(members2, expression, name) { - if (isFunctionExpression(expression)) - return createFunctionExpressionMember(members2, expression, name); - else - return createArrowFunctionExpressionMember(members2, expression, name); - } - function createFunctionExpressionMember(members2, functionExpression, name) { - const fullModifiers = concatenate(modifiers, getModifierKindFromSource(functionExpression, 134 /* AsyncKeyword */)); - const method = factory.createMethodDeclaration( - fullModifiers, - /*asteriskToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - functionExpression.parameters, - /*type*/ - void 0, - functionExpression.body - ); - copyLeadingComments(assignmentBinaryExpression, method, sourceFile); - members2.push(method); - return; - } - function createArrowFunctionExpressionMember(members2, arrowFunction, name) { - const arrowFunctionBody = arrowFunction.body; - let bodyBlock; - if (arrowFunctionBody.kind === 241 /* Block */) { - bodyBlock = arrowFunctionBody; - } else { - bodyBlock = factory.createBlock([factory.createReturnStatement(arrowFunctionBody)]); - } - const fullModifiers = concatenate(modifiers, getModifierKindFromSource(arrowFunction, 134 /* AsyncKeyword */)); - const method = factory.createMethodDeclaration( - fullModifiers, - /*asteriskToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - arrowFunction.parameters, - /*type*/ - void 0, - bodyBlock - ); - copyLeadingComments(assignmentBinaryExpression, method, sourceFile); - members2.push(method); - } - } - } - function createClassFromVariableDeclaration(node) { - const initializer = node.initializer; - if (!initializer || !isFunctionExpression(initializer) || !isIdentifier(node.name)) { - return void 0; - } - const memberElements = createClassElementsFromSymbol(node.symbol); - if (initializer.body) { - memberElements.unshift(factory.createConstructorDeclaration( - /*modifiers*/ - void 0, - initializer.parameters, - initializer.body - )); - } - const modifiers = getModifierKindFromSource(node.parent.parent, 95 /* ExportKeyword */); - const cls = factory.createClassDeclaration( - modifiers, - node.name, - /*typeParameters*/ - void 0, - /*heritageClauses*/ - void 0, - memberElements - ); - return cls; - } - function createClassFromFunction(node) { - const memberElements = createClassElementsFromSymbol(ctorSymbol); - if (node.body) { - memberElements.unshift(factory.createConstructorDeclaration( - /*modifiers*/ - void 0, - node.parameters, - node.body - )); - } - const modifiers = getModifierKindFromSource(node, 95 /* ExportKeyword */); - const cls = factory.createClassDeclaration( - modifiers, - node.name, - /*typeParameters*/ - void 0, - /*heritageClauses*/ - void 0, - memberElements - ); - return cls; - } - } - function getModifierKindFromSource(source, kind) { - return canHaveModifiers(source) ? filter(source.modifiers, (modifier) => modifier.kind === kind) : void 0; - } - function isConstructorAssignment(x) { - if (!x.name) - return false; - if (isIdentifier(x.name) && x.name.text === "constructor") - return true; - return false; - } - function tryGetPropertyName(node, compilerOptions, quotePreference) { - if (isPropertyAccessExpression(node)) { - return node.name; - } - const propName = node.argumentExpression; - if (isNumericLiteral(propName)) { - return propName; - } - if (isStringLiteralLike(propName)) { - return isIdentifierText(propName.text, getEmitScriptTarget(compilerOptions)) ? factory.createIdentifier(propName.text) : isNoSubstitutionTemplateLiteral(propName) ? factory.createStringLiteral(propName.text, quotePreference === 0 /* Single */) : propName; - } - return void 0; - } - var fixId9, errorCodes10; - var init_convertFunctionToEs6Class = __esm({ - "src/services/codefixes/convertFunctionToEs6Class.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId9 = "convertFunctionToEs6Class"; - errorCodes10 = [Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration.code]; - registerCodeFix({ - errorCodes: errorCodes10, - getCodeActions(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange9(t, context.sourceFile, context.span.start, context.program.getTypeChecker(), context.preferences, context.program.getCompilerOptions())); - return [createCodeFixAction(fixId9, changes, Diagnostics.Convert_function_to_an_ES2015_class, fixId9, Diagnostics.Convert_all_constructor_functions_to_classes)]; - }, - fixIds: [fixId9], - getAllCodeActions: (context) => codeFixAll(context, errorCodes10, (changes, err) => doChange9(changes, err.file, err.start, context.program.getTypeChecker(), context.preferences, context.program.getCompilerOptions())) - }); - } - }); - - // src/services/codefixes/convertToAsyncFunction.ts - function convertToAsyncFunction(changes, sourceFile, position, checker) { - const tokenAtPosition = getTokenAtPosition(sourceFile, position); - let functionToConvert; - if (isIdentifier(tokenAtPosition) && isVariableDeclaration(tokenAtPosition.parent) && tokenAtPosition.parent.initializer && isFunctionLikeDeclaration(tokenAtPosition.parent.initializer)) { - functionToConvert = tokenAtPosition.parent.initializer; - } else { - functionToConvert = tryCast(getContainingFunction(getTokenAtPosition(sourceFile, position)), canBeConvertedToAsync); - } - if (!functionToConvert) { - return; - } - const synthNamesMap = /* @__PURE__ */ new Map(); - const isInJavascript = isInJSFile(functionToConvert); - const setOfExpressionsToReturn = getAllPromiseExpressionsToReturn(functionToConvert, checker); - const functionToConvertRenamed = renameCollidingVarNames(functionToConvert, checker, synthNamesMap); - if (!returnsPromise(functionToConvertRenamed, checker)) { - return; - } - const returnStatements = functionToConvertRenamed.body && isBlock(functionToConvertRenamed.body) ? getReturnStatementsWithPromiseHandlers(functionToConvertRenamed.body, checker) : emptyArray; - const transformer = { checker, synthNamesMap, setOfExpressionsToReturn, isInJSFile: isInJavascript }; - if (!returnStatements.length) { - return; - } - const pos = skipTrivia(sourceFile.text, moveRangePastModifiers(functionToConvert).pos); - changes.insertModifierAt(sourceFile, pos, 134 /* AsyncKeyword */, { suffix: " " }); - for (const returnStatement of returnStatements) { - forEachChild(returnStatement, function visit(node) { - if (isCallExpression(node)) { - const newNodes = transformExpression( - node, - node, - transformer, - /*hasContinuation*/ - false - ); - if (hasFailed()) { - return true; - } - changes.replaceNodeWithNodes(sourceFile, returnStatement, newNodes); - } else if (!isFunctionLike(node)) { - forEachChild(node, visit); - if (hasFailed()) { - return true; - } - } - }); - if (hasFailed()) { - return; - } - } - } - function getReturnStatementsWithPromiseHandlers(body, checker) { - const res = []; - forEachReturnStatement(body, (ret) => { - if (isReturnStatementWithFixablePromiseHandler(ret, checker)) - res.push(ret); - }); - return res; - } - function getAllPromiseExpressionsToReturn(func, checker) { - if (!func.body) { - return /* @__PURE__ */ new Set(); - } - const setOfExpressionsToReturn = /* @__PURE__ */ new Set(); - forEachChild(func.body, function visit(node) { - if (isPromiseReturningCallExpression(node, checker, "then")) { - setOfExpressionsToReturn.add(getNodeId(node)); - forEach(node.arguments, visit); - } else if (isPromiseReturningCallExpression(node, checker, "catch") || isPromiseReturningCallExpression(node, checker, "finally")) { - setOfExpressionsToReturn.add(getNodeId(node)); - forEachChild(node, visit); - } else if (isPromiseTypedExpression(node, checker)) { - setOfExpressionsToReturn.add(getNodeId(node)); - } else { - forEachChild(node, visit); - } - }); - return setOfExpressionsToReturn; - } - function isPromiseReturningCallExpression(node, checker, name) { - if (!isCallExpression(node)) - return false; - const isExpressionOfName = hasPropertyAccessExpressionWithName(node, name); - const nodeType = isExpressionOfName && checker.getTypeAtLocation(node); - return !!(nodeType && checker.getPromisedTypeOfPromise(nodeType)); - } - function isReferenceToType(type, target) { - return (getObjectFlags(type) & 4 /* Reference */) !== 0 && type.target === target; - } - function getExplicitPromisedTypeOfPromiseReturningCallExpression(node, callback, checker) { - if (node.expression.name.escapedText === "finally") { - return void 0; - } - const promiseType = checker.getTypeAtLocation(node.expression.expression); - if (isReferenceToType(promiseType, checker.getPromiseType()) || isReferenceToType(promiseType, checker.getPromiseLikeType())) { - if (node.expression.name.escapedText === "then") { - if (callback === elementAt(node.arguments, 0)) { - return elementAt(node.typeArguments, 0); - } else if (callback === elementAt(node.arguments, 1)) { - return elementAt(node.typeArguments, 1); - } - } else { - return elementAt(node.typeArguments, 0); - } - } - } - function isPromiseTypedExpression(node, checker) { - if (!isExpression(node)) - return false; - return !!checker.getPromisedTypeOfPromise(checker.getTypeAtLocation(node)); - } - function renameCollidingVarNames(nodeToRename, checker, synthNamesMap) { - const identsToRenameMap = /* @__PURE__ */ new Map(); - const collidingSymbolMap = createMultiMap(); - forEachChild(nodeToRename, function visit(node) { - if (!isIdentifier(node)) { - forEachChild(node, visit); - return; - } - const symbol = checker.getSymbolAtLocation(node); - if (symbol) { - const type = checker.getTypeAtLocation(node); - const lastCallSignature = getLastCallSignature(type, checker); - const symbolIdString = getSymbolId(symbol).toString(); - if (lastCallSignature && !isParameter(node.parent) && !isFunctionLikeDeclaration(node.parent) && !synthNamesMap.has(symbolIdString)) { - const firstParameter = firstOrUndefined(lastCallSignature.parameters); - const ident = (firstParameter == null ? void 0 : firstParameter.valueDeclaration) && isParameter(firstParameter.valueDeclaration) && tryCast(firstParameter.valueDeclaration.name, isIdentifier) || factory.createUniqueName("result", 16 /* Optimistic */); - const synthName = getNewNameIfConflict(ident, collidingSymbolMap); - synthNamesMap.set(symbolIdString, synthName); - collidingSymbolMap.add(ident.text, symbol); - } else if (node.parent && (isParameter(node.parent) || isVariableDeclaration(node.parent) || isBindingElement(node.parent))) { - const originalName = node.text; - const collidingSymbols = collidingSymbolMap.get(originalName); - if (collidingSymbols && collidingSymbols.some((prevSymbol) => prevSymbol !== symbol)) { - const newName = getNewNameIfConflict(node, collidingSymbolMap); - identsToRenameMap.set(symbolIdString, newName.identifier); - synthNamesMap.set(symbolIdString, newName); - collidingSymbolMap.add(originalName, symbol); - } else { - const identifier = getSynthesizedDeepClone(node); - synthNamesMap.set(symbolIdString, createSynthIdentifier(identifier)); - collidingSymbolMap.add(originalName, symbol); - } - } - } - }); - return getSynthesizedDeepCloneWithReplacements( - nodeToRename, - /*includeTrivia*/ - true, - (original) => { - if (isBindingElement(original) && isIdentifier(original.name) && isObjectBindingPattern(original.parent)) { - const symbol = checker.getSymbolAtLocation(original.name); - const renameInfo = symbol && identsToRenameMap.get(String(getSymbolId(symbol))); - if (renameInfo && renameInfo.text !== (original.name || original.propertyName).getText()) { - return factory.createBindingElement( - original.dotDotDotToken, - original.propertyName || original.name, - renameInfo, - original.initializer - ); - } - } else if (isIdentifier(original)) { - const symbol = checker.getSymbolAtLocation(original); - const renameInfo = symbol && identsToRenameMap.get(String(getSymbolId(symbol))); - if (renameInfo) { - return factory.createIdentifier(renameInfo.text); - } - } - } - ); - } - function getNewNameIfConflict(name, originalNames) { - const numVarsSameName = (originalNames.get(name.text) || emptyArray).length; - const identifier = numVarsSameName === 0 ? name : factory.createIdentifier(name.text + "_" + numVarsSameName); - return createSynthIdentifier(identifier); - } - function hasFailed() { - return !codeActionSucceeded; - } - function silentFail() { - codeActionSucceeded = false; - return emptyArray; - } - function transformExpression(returnContextNode, node, transformer, hasContinuation, continuationArgName) { - if (isPromiseReturningCallExpression(node, transformer.checker, "then")) { - return transformThen(node, elementAt(node.arguments, 0), elementAt(node.arguments, 1), transformer, hasContinuation, continuationArgName); - } - if (isPromiseReturningCallExpression(node, transformer.checker, "catch")) { - return transformCatch(node, elementAt(node.arguments, 0), transformer, hasContinuation, continuationArgName); - } - if (isPromiseReturningCallExpression(node, transformer.checker, "finally")) { - return transformFinally(node, elementAt(node.arguments, 0), transformer, hasContinuation, continuationArgName); - } - if (isPropertyAccessExpression(node)) { - return transformExpression(returnContextNode, node.expression, transformer, hasContinuation, continuationArgName); - } - const nodeType = transformer.checker.getTypeAtLocation(node); - if (nodeType && transformer.checker.getPromisedTypeOfPromise(nodeType)) { - Debug.assertNode(getOriginalNode(node).parent, isPropertyAccessExpression); - return transformPromiseExpressionOfPropertyAccess(returnContextNode, node, transformer, hasContinuation, continuationArgName); - } - return silentFail(); - } - function isNullOrUndefined2({ checker }, node) { - if (node.kind === 106 /* NullKeyword */) - return true; - if (isIdentifier(node) && !isGeneratedIdentifier(node) && idText(node) === "undefined") { - const symbol = checker.getSymbolAtLocation(node); - return !symbol || checker.isUndefinedSymbol(symbol); - } - return false; - } - function createUniqueSynthName(prevArgName) { - const renamedPrevArg = factory.createUniqueName(prevArgName.identifier.text, 16 /* Optimistic */); - return createSynthIdentifier(renamedPrevArg); - } - function getPossibleNameForVarDecl(node, transformer, continuationArgName) { - let possibleNameForVarDecl; - if (continuationArgName && !shouldReturn(node, transformer)) { - if (isSynthIdentifier(continuationArgName)) { - possibleNameForVarDecl = continuationArgName; - transformer.synthNamesMap.forEach((val, key) => { - if (val.identifier.text === continuationArgName.identifier.text) { - const newSynthName = createUniqueSynthName(continuationArgName); - transformer.synthNamesMap.set(key, newSynthName); - } - }); - } else { - possibleNameForVarDecl = createSynthIdentifier(factory.createUniqueName("result", 16 /* Optimistic */), continuationArgName.types); - } - declareSynthIdentifier(possibleNameForVarDecl); - } - return possibleNameForVarDecl; - } - function finishCatchOrFinallyTransform(node, transformer, tryStatement, possibleNameForVarDecl, continuationArgName) { - const statements = []; - let varDeclIdentifier; - if (possibleNameForVarDecl && !shouldReturn(node, transformer)) { - varDeclIdentifier = getSynthesizedDeepClone(declareSynthIdentifier(possibleNameForVarDecl)); - const typeArray = possibleNameForVarDecl.types; - const unionType = transformer.checker.getUnionType(typeArray, 2 /* Subtype */); - const unionTypeNode = transformer.isInJSFile ? void 0 : transformer.checker.typeToTypeNode( - unionType, - /*enclosingDeclaration*/ - void 0, - /*flags*/ - void 0 - ); - const varDecl = [factory.createVariableDeclaration( - varDeclIdentifier, - /*exclamationToken*/ - void 0, - unionTypeNode - )]; - const varDeclList = factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList(varDecl, 1 /* Let */) - ); - statements.push(varDeclList); - } - statements.push(tryStatement); - if (continuationArgName && varDeclIdentifier && isSynthBindingPattern(continuationArgName)) { - statements.push(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList( - [ - factory.createVariableDeclaration( - getSynthesizedDeepClone(declareSynthBindingPattern(continuationArgName)), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - varDeclIdentifier - ) - ], - 2 /* Const */ - ) - )); - } - return statements; - } - function transformFinally(node, onFinally, transformer, hasContinuation, continuationArgName) { - if (!onFinally || isNullOrUndefined2(transformer, onFinally)) { - return transformExpression( - /* returnContextNode */ - node, - node.expression.expression, - transformer, - hasContinuation, - continuationArgName - ); - } - const possibleNameForVarDecl = getPossibleNameForVarDecl(node, transformer, continuationArgName); - const inlinedLeftHandSide = transformExpression( - /*returnContextNode*/ - node, - node.expression.expression, - transformer, - /*hasContinuation*/ - true, - possibleNameForVarDecl - ); - if (hasFailed()) - return silentFail(); - const inlinedCallback = transformCallbackArgument( - onFinally, - hasContinuation, - /*continuationArgName*/ - void 0, - /*inputArgName*/ - void 0, - node, - transformer - ); - if (hasFailed()) - return silentFail(); - const tryBlock = factory.createBlock(inlinedLeftHandSide); - const finallyBlock = factory.createBlock(inlinedCallback); - const tryStatement = factory.createTryStatement( - tryBlock, - /*catchClause*/ - void 0, - finallyBlock - ); - return finishCatchOrFinallyTransform(node, transformer, tryStatement, possibleNameForVarDecl, continuationArgName); - } - function transformCatch(node, onRejected, transformer, hasContinuation, continuationArgName) { - if (!onRejected || isNullOrUndefined2(transformer, onRejected)) { - return transformExpression( - /* returnContextNode */ - node, - node.expression.expression, - transformer, - hasContinuation, - continuationArgName - ); - } - const inputArgName = getArgBindingName(onRejected, transformer); - const possibleNameForVarDecl = getPossibleNameForVarDecl(node, transformer, continuationArgName); - const inlinedLeftHandSide = transformExpression( - /*returnContextNode*/ - node, - node.expression.expression, - transformer, - /*hasContinuation*/ - true, - possibleNameForVarDecl - ); - if (hasFailed()) - return silentFail(); - const inlinedCallback = transformCallbackArgument(onRejected, hasContinuation, possibleNameForVarDecl, inputArgName, node, transformer); - if (hasFailed()) - return silentFail(); - const tryBlock = factory.createBlock(inlinedLeftHandSide); - const catchClause = factory.createCatchClause(inputArgName && getSynthesizedDeepClone(declareSynthBindingName(inputArgName)), factory.createBlock(inlinedCallback)); - const tryStatement = factory.createTryStatement( - tryBlock, - catchClause, - /*finallyBlock*/ - void 0 - ); - return finishCatchOrFinallyTransform(node, transformer, tryStatement, possibleNameForVarDecl, continuationArgName); - } - function transformThen(node, onFulfilled, onRejected, transformer, hasContinuation, continuationArgName) { - if (!onFulfilled || isNullOrUndefined2(transformer, onFulfilled)) { - return transformCatch(node, onRejected, transformer, hasContinuation, continuationArgName); - } - if (onRejected && !isNullOrUndefined2(transformer, onRejected)) { - return silentFail(); - } - const inputArgName = getArgBindingName(onFulfilled, transformer); - const inlinedLeftHandSide = transformExpression( - node.expression.expression, - node.expression.expression, - transformer, - /*hasContinuation*/ - true, - inputArgName - ); - if (hasFailed()) - return silentFail(); - const inlinedCallback = transformCallbackArgument(onFulfilled, hasContinuation, continuationArgName, inputArgName, node, transformer); - if (hasFailed()) - return silentFail(); - return concatenate(inlinedLeftHandSide, inlinedCallback); - } - function transformPromiseExpressionOfPropertyAccess(returnContextNode, node, transformer, hasContinuation, continuationArgName) { - if (shouldReturn(returnContextNode, transformer)) { - let returnValue = getSynthesizedDeepClone(node); - if (hasContinuation) { - returnValue = factory.createAwaitExpression(returnValue); - } - return [factory.createReturnStatement(returnValue)]; - } - return createVariableOrAssignmentOrExpressionStatement( - continuationArgName, - factory.createAwaitExpression(node), - /*typeAnnotation*/ - void 0 - ); - } - function createVariableOrAssignmentOrExpressionStatement(variableName, rightHandSide, typeAnnotation) { - if (!variableName || isEmptyBindingName(variableName)) { - return [factory.createExpressionStatement(rightHandSide)]; - } - if (isSynthIdentifier(variableName) && variableName.hasBeenDeclared) { - return [factory.createExpressionStatement(factory.createAssignment(getSynthesizedDeepClone(referenceSynthIdentifier(variableName)), rightHandSide))]; - } - return [ - factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList( - [ - factory.createVariableDeclaration( - getSynthesizedDeepClone(declareSynthBindingName(variableName)), - /*exclamationToken*/ - void 0, - typeAnnotation, - rightHandSide - ) - ], - 2 /* Const */ - ) - ) - ]; - } - function maybeAnnotateAndReturn(expressionToReturn, typeAnnotation) { - if (typeAnnotation && expressionToReturn) { - const name = factory.createUniqueName("result", 16 /* Optimistic */); - return [ - ...createVariableOrAssignmentOrExpressionStatement(createSynthIdentifier(name), expressionToReturn, typeAnnotation), - factory.createReturnStatement(name) - ]; - } - return [factory.createReturnStatement(expressionToReturn)]; - } - function transformCallbackArgument(func, hasContinuation, continuationArgName, inputArgName, parent2, transformer) { - var _a; - switch (func.kind) { - case 106 /* NullKeyword */: - break; - case 211 /* PropertyAccessExpression */: - case 80 /* Identifier */: - if (!inputArgName) { - break; - } - const synthCall = factory.createCallExpression( - getSynthesizedDeepClone(func), - /*typeArguments*/ - void 0, - isSynthIdentifier(inputArgName) ? [referenceSynthIdentifier(inputArgName)] : [] - ); - if (shouldReturn(parent2, transformer)) { - return maybeAnnotateAndReturn(synthCall, getExplicitPromisedTypeOfPromiseReturningCallExpression(parent2, func, transformer.checker)); - } - const type = transformer.checker.getTypeAtLocation(func); - const callSignatures = transformer.checker.getSignaturesOfType(type, 0 /* Call */); - if (!callSignatures.length) { - return silentFail(); - } - const returnType = callSignatures[0].getReturnType(); - const varDeclOrAssignment = createVariableOrAssignmentOrExpressionStatement(continuationArgName, factory.createAwaitExpression(synthCall), getExplicitPromisedTypeOfPromiseReturningCallExpression(parent2, func, transformer.checker)); - if (continuationArgName) { - continuationArgName.types.push(transformer.checker.getAwaitedType(returnType) || returnType); - } - return varDeclOrAssignment; - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: { - const funcBody = func.body; - const returnType2 = (_a = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)) == null ? void 0 : _a.getReturnType(); - if (isBlock(funcBody)) { - let refactoredStmts = []; - let seenReturnStatement = false; - for (const statement of funcBody.statements) { - if (isReturnStatement(statement)) { - seenReturnStatement = true; - if (isReturnStatementWithFixablePromiseHandler(statement, transformer.checker)) { - refactoredStmts = refactoredStmts.concat(transformReturnStatementWithFixablePromiseHandler(transformer, statement, hasContinuation, continuationArgName)); - } else { - const possiblyAwaitedRightHandSide = returnType2 && statement.expression ? getPossiblyAwaitedRightHandSide(transformer.checker, returnType2, statement.expression) : statement.expression; - refactoredStmts.push(...maybeAnnotateAndReturn(possiblyAwaitedRightHandSide, getExplicitPromisedTypeOfPromiseReturningCallExpression(parent2, func, transformer.checker))); - } - } else if (hasContinuation && forEachReturnStatement(statement, returnTrue)) { - return silentFail(); - } else { - refactoredStmts.push(statement); - } - } - return shouldReturn(parent2, transformer) ? refactoredStmts.map((s) => getSynthesizedDeepClone(s)) : removeReturns( - refactoredStmts, - continuationArgName, - transformer, - seenReturnStatement - ); - } else { - const inlinedStatements = isFixablePromiseHandler(funcBody, transformer.checker) ? transformReturnStatementWithFixablePromiseHandler(transformer, factory.createReturnStatement(funcBody), hasContinuation, continuationArgName) : emptyArray; - if (inlinedStatements.length > 0) { - return inlinedStatements; - } - if (returnType2) { - const possiblyAwaitedRightHandSide = getPossiblyAwaitedRightHandSide(transformer.checker, returnType2, funcBody); - if (!shouldReturn(parent2, transformer)) { - const transformedStatement = createVariableOrAssignmentOrExpressionStatement( - continuationArgName, - possiblyAwaitedRightHandSide, - /*typeAnnotation*/ - void 0 - ); - if (continuationArgName) { - continuationArgName.types.push(transformer.checker.getAwaitedType(returnType2) || returnType2); - } - return transformedStatement; - } else { - return maybeAnnotateAndReturn(possiblyAwaitedRightHandSide, getExplicitPromisedTypeOfPromiseReturningCallExpression(parent2, func, transformer.checker)); - } - } else { - return silentFail(); - } - } - } - default: - return silentFail(); - } - return emptyArray; - } - function getPossiblyAwaitedRightHandSide(checker, type, expr) { - const rightHandSide = getSynthesizedDeepClone(expr); - return !!checker.getPromisedTypeOfPromise(type) ? factory.createAwaitExpression(rightHandSide) : rightHandSide; - } - function getLastCallSignature(type, checker) { - const callSignatures = checker.getSignaturesOfType(type, 0 /* Call */); - return lastOrUndefined(callSignatures); - } - function removeReturns(stmts, prevArgName, transformer, seenReturnStatement) { - const ret = []; - for (const stmt of stmts) { - if (isReturnStatement(stmt)) { - if (stmt.expression) { - const possiblyAwaitedExpression = isPromiseTypedExpression(stmt.expression, transformer.checker) ? factory.createAwaitExpression(stmt.expression) : stmt.expression; - if (prevArgName === void 0) { - ret.push(factory.createExpressionStatement(possiblyAwaitedExpression)); - } else if (isSynthIdentifier(prevArgName) && prevArgName.hasBeenDeclared) { - ret.push(factory.createExpressionStatement(factory.createAssignment(referenceSynthIdentifier(prevArgName), possiblyAwaitedExpression))); - } else { - ret.push(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([factory.createVariableDeclaration( - declareSynthBindingName(prevArgName), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - possiblyAwaitedExpression - )], 2 /* Const */) - )); - } - } - } else { - ret.push(getSynthesizedDeepClone(stmt)); - } - } - if (!seenReturnStatement && prevArgName !== void 0) { - ret.push(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([factory.createVariableDeclaration( - declareSynthBindingName(prevArgName), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory.createIdentifier("undefined") - )], 2 /* Const */) - )); - } - return ret; - } - function transformReturnStatementWithFixablePromiseHandler(transformer, innerRetStmt, hasContinuation, continuationArgName) { - let innerCbBody = []; - forEachChild(innerRetStmt, function visit(node) { - if (isCallExpression(node)) { - const temp = transformExpression(node, node, transformer, hasContinuation, continuationArgName); - innerCbBody = innerCbBody.concat(temp); - if (innerCbBody.length > 0) { - return; - } - } else if (!isFunctionLike(node)) { - forEachChild(node, visit); - } - }); - return innerCbBody; - } - function getArgBindingName(funcNode, transformer) { - const types = []; - let name; - if (isFunctionLikeDeclaration(funcNode)) { - if (funcNode.parameters.length > 0) { - const param = funcNode.parameters[0].name; - name = getMappedBindingNameOrDefault(param); - } - } else if (isIdentifier(funcNode)) { - name = getMapEntryOrDefault(funcNode); - } else if (isPropertyAccessExpression(funcNode) && isIdentifier(funcNode.name)) { - name = getMapEntryOrDefault(funcNode.name); - } - if (!name || "identifier" in name && name.identifier.text === "undefined") { - return void 0; - } - return name; - function getMappedBindingNameOrDefault(bindingName) { - if (isIdentifier(bindingName)) - return getMapEntryOrDefault(bindingName); - const elements = flatMap(bindingName.elements, (element) => { - if (isOmittedExpression(element)) - return []; - return [getMappedBindingNameOrDefault(element.name)]; - }); - return createSynthBindingPattern(bindingName, elements); - } - function getMapEntryOrDefault(identifier) { - const originalNode = getOriginalNode2(identifier); - const symbol = getSymbol2(originalNode); - if (!symbol) { - return createSynthIdentifier(identifier, types); - } - const mapEntry = transformer.synthNamesMap.get(getSymbolId(symbol).toString()); - return mapEntry || createSynthIdentifier(identifier, types); - } - function getSymbol2(node) { - var _a; - return ((_a = tryCast(node, canHaveSymbol)) == null ? void 0 : _a.symbol) ?? transformer.checker.getSymbolAtLocation(node); - } - function getOriginalNode2(node) { - return node.original ? node.original : node; - } - } - function isEmptyBindingName(bindingName) { - if (!bindingName) { - return true; - } - if (isSynthIdentifier(bindingName)) { - return !bindingName.identifier.text; - } - return every(bindingName.elements, isEmptyBindingName); - } - function createSynthIdentifier(identifier, types = []) { - return { kind: 0 /* Identifier */, identifier, types, hasBeenDeclared: false, hasBeenReferenced: false }; - } - function createSynthBindingPattern(bindingPattern, elements = emptyArray, types = []) { - return { kind: 1 /* BindingPattern */, bindingPattern, elements, types }; - } - function referenceSynthIdentifier(synthId) { - synthId.hasBeenReferenced = true; - return synthId.identifier; - } - function declareSynthBindingName(synthName) { - return isSynthIdentifier(synthName) ? declareSynthIdentifier(synthName) : declareSynthBindingPattern(synthName); - } - function declareSynthBindingPattern(synthPattern) { - for (const element of synthPattern.elements) { - declareSynthBindingName(element); - } - return synthPattern.bindingPattern; - } - function declareSynthIdentifier(synthId) { - synthId.hasBeenDeclared = true; - return synthId.identifier; - } - function isSynthIdentifier(bindingName) { - return bindingName.kind === 0 /* Identifier */; - } - function isSynthBindingPattern(bindingName) { - return bindingName.kind === 1 /* BindingPattern */; - } - function shouldReturn(expression, transformer) { - return !!expression.original && transformer.setOfExpressionsToReturn.has(getNodeId(expression.original)); - } - var fixId10, errorCodes11, codeActionSucceeded; - var init_convertToAsyncFunction = __esm({ - "src/services/codefixes/convertToAsyncFunction.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId10 = "convertToAsyncFunction"; - errorCodes11 = [Diagnostics.This_may_be_converted_to_an_async_function.code]; - codeActionSucceeded = true; - registerCodeFix({ - errorCodes: errorCodes11, - getCodeActions(context) { - codeActionSucceeded = true; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => convertToAsyncFunction(t, context.sourceFile, context.span.start, context.program.getTypeChecker())); - return codeActionSucceeded ? [createCodeFixAction(fixId10, changes, Diagnostics.Convert_to_async_function, fixId10, Diagnostics.Convert_all_to_async_functions)] : []; - }, - fixIds: [fixId10], - getAllCodeActions: (context) => codeFixAll(context, errorCodes11, (changes, err) => convertToAsyncFunction(changes, err.file, err.start, context.program.getTypeChecker())) - }); - } - }); - - // src/services/codefixes/convertToEsModule.ts - function fixImportOfModuleExports(importingFile, exportingFile, changes, quotePreference) { - for (const moduleSpecifier of importingFile.imports) { - const imported = getResolvedModule(importingFile, moduleSpecifier.text, getModeForUsageLocation(importingFile, moduleSpecifier)); - if (!imported || imported.resolvedFileName !== exportingFile.fileName) { - continue; - } - const importNode = importFromModuleSpecifier(moduleSpecifier); - switch (importNode.kind) { - case 271 /* ImportEqualsDeclaration */: - changes.replaceNode(importingFile, importNode, makeImport( - importNode.name, - /*namedImports*/ - void 0, - moduleSpecifier, - quotePreference - )); - break; - case 213 /* CallExpression */: - if (isRequireCall( - importNode, - /*requireStringLiteralLikeArgument*/ - false - )) { - changes.replaceNode(importingFile, importNode, factory.createPropertyAccessExpression(getSynthesizedDeepClone(importNode), "default")); - } - break; - } - } - } - function convertFileToEsModule(sourceFile, checker, changes, target, quotePreference) { - const identifiers = { original: collectFreeIdentifiers(sourceFile), additional: /* @__PURE__ */ new Set() }; - const exports = collectExportRenames(sourceFile, checker, identifiers); - convertExportsAccesses(sourceFile, exports, changes); - let moduleExportsChangedToDefault = false; - let useSitesToUnqualify; - for (const statement of filter(sourceFile.statements, isVariableStatement)) { - const newUseSites = convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); - if (newUseSites) { - copyEntries(newUseSites, useSitesToUnqualify ?? (useSitesToUnqualify = /* @__PURE__ */ new Map())); - } - } - for (const statement of filter(sourceFile.statements, (s) => !isVariableStatement(s))) { - const moduleExportsChanged = convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference); - moduleExportsChangedToDefault = moduleExportsChangedToDefault || moduleExportsChanged; - } - useSitesToUnqualify == null ? void 0 : useSitesToUnqualify.forEach((replacement, original) => { - changes.replaceNode(sourceFile, original, replacement); - }); - return moduleExportsChangedToDefault; - } - function collectExportRenames(sourceFile, checker, identifiers) { - const res = /* @__PURE__ */ new Map(); - forEachExportReference(sourceFile, (node) => { - const { text } = node.name; - if (!res.has(text) && (isIdentifierANonContextualKeyword(node.name) || checker.resolveName( - text, - node, - 111551 /* Value */, - /*excludeGlobals*/ - true - ))) { - res.set(text, makeUniqueName(`_${text}`, identifiers)); - } - }); - return res; - } - function convertExportsAccesses(sourceFile, exports, changes) { - forEachExportReference(sourceFile, (node, isAssignmentLhs) => { - if (isAssignmentLhs) { - return; - } - const { text } = node.name; - changes.replaceNode(sourceFile, node, factory.createIdentifier(exports.get(text) || text)); - }); - } - function forEachExportReference(sourceFile, cb) { - sourceFile.forEachChild(function recur(node) { - if (isPropertyAccessExpression(node) && isExportsOrModuleExportsOrAlias(sourceFile, node.expression) && isIdentifier(node.name)) { - const { parent: parent2 } = node; - cb(node, isBinaryExpression(parent2) && parent2.left === node && parent2.operatorToken.kind === 64 /* EqualsToken */); - } - node.forEachChild(recur); - }); - } - function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) { - switch (statement.kind) { - case 243 /* VariableStatement */: - convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference); - return false; - case 244 /* ExpressionStatement */: { - const { expression } = statement; - switch (expression.kind) { - case 213 /* CallExpression */: { - if (isRequireCall( - expression, - /*requireStringLiteralLikeArgument*/ - true - )) { - changes.replaceNode(sourceFile, statement, makeImport( - /*defaultImport*/ - void 0, - /*namedImports*/ - void 0, - expression.arguments[0], - quotePreference - )); - } - return false; - } - case 226 /* BinaryExpression */: { - const { operatorToken } = expression; - return operatorToken.kind === 64 /* EqualsToken */ && convertAssignment(sourceFile, checker, expression, changes, exports, useSitesToUnqualify); - } - } - } - default: - return false; - } - } - function convertVariableStatement(sourceFile, statement, changes, checker, identifiers, target, quotePreference) { - const { declarationList } = statement; - let foundImport = false; - const converted = map(declarationList.declarations, (decl) => { - const { name, initializer } = decl; - if (initializer) { - if (isExportsOrModuleExportsOrAlias(sourceFile, initializer)) { - foundImport = true; - return convertedImports([]); - } else if (isRequireCall( - initializer, - /*requireStringLiteralLikeArgument*/ - true - )) { - foundImport = true; - return convertSingleImport(name, initializer.arguments[0], checker, identifiers, target, quotePreference); - } else if (isPropertyAccessExpression(initializer) && isRequireCall( - initializer.expression, - /*requireStringLiteralLikeArgument*/ - true - )) { - foundImport = true; - return convertPropertyAccessImport(name, initializer.name.text, initializer.expression.arguments[0], identifiers, quotePreference); - } - } - return convertedImports([factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([decl], declarationList.flags) - )]); - }); - if (foundImport) { - changes.replaceNodeWithNodes(sourceFile, statement, flatMap(converted, (c) => c.newImports)); - let combinedUseSites; - forEach(converted, (c) => { - if (c.useSitesToUnqualify) { - copyEntries(c.useSitesToUnqualify, combinedUseSites ?? (combinedUseSites = /* @__PURE__ */ new Map())); - } - }); - return combinedUseSites; - } - } - function convertPropertyAccessImport(name, propertyName, moduleSpecifier, identifiers, quotePreference) { - switch (name.kind) { - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: { - const tmp = makeUniqueName(propertyName, identifiers); - return convertedImports([ - makeSingleImport(tmp, propertyName, moduleSpecifier, quotePreference), - makeConst( - /*modifiers*/ - void 0, - name, - factory.createIdentifier(tmp) - ) - ]); - } - case 80 /* Identifier */: - return convertedImports([makeSingleImport(name.text, propertyName, moduleSpecifier, quotePreference)]); - default: - return Debug.assertNever(name, `Convert to ES module got invalid syntax form ${name.kind}`); - } - } - function convertAssignment(sourceFile, checker, assignment, changes, exports, useSitesToUnqualify) { - const { left, right } = assignment; - if (!isPropertyAccessExpression(left)) { - return false; - } - if (isExportsOrModuleExportsOrAlias(sourceFile, left)) { - if (isExportsOrModuleExportsOrAlias(sourceFile, right)) { - changes.delete(sourceFile, assignment.parent); - } else { - const replacement = isObjectLiteralExpression(right) ? tryChangeModuleExportsObject(right, useSitesToUnqualify) : isRequireCall( - right, - /*requireStringLiteralLikeArgument*/ - true - ) ? convertReExportAll(right.arguments[0], checker) : void 0; - if (replacement) { - changes.replaceNodeWithNodes(sourceFile, assignment.parent, replacement[0]); - return replacement[1]; - } else { - changes.replaceRangeWithText(sourceFile, createRange(left.getStart(sourceFile), right.pos), "export default"); - return true; - } - } - } else if (isExportsOrModuleExportsOrAlias(sourceFile, left.expression)) { - convertNamedExport(sourceFile, assignment, changes, exports); - } - return false; - } - function tryChangeModuleExportsObject(object, useSitesToUnqualify) { - const statements = mapAllOrFail(object.properties, (prop) => { - switch (prop.kind) { - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 304 /* ShorthandPropertyAssignment */: - case 305 /* SpreadAssignment */: - return void 0; - case 303 /* PropertyAssignment */: - return !isIdentifier(prop.name) ? void 0 : convertExportsDotXEquals_replaceNode(prop.name.text, prop.initializer, useSitesToUnqualify); - case 174 /* MethodDeclaration */: - return !isIdentifier(prop.name) ? void 0 : functionExpressionToDeclaration(prop.name.text, [factory.createToken(95 /* ExportKeyword */)], prop, useSitesToUnqualify); - default: - Debug.assertNever(prop, `Convert to ES6 got invalid prop kind ${prop.kind}`); - } - }); - return statements && [statements, false]; - } - function convertNamedExport(sourceFile, assignment, changes, exports) { - const { text } = assignment.left.name; - const rename = exports.get(text); - if (rename !== void 0) { - const newNodes = [ - makeConst( - /*modifiers*/ - void 0, - rename, - assignment.right - ), - makeExportDeclaration([factory.createExportSpecifier( - /*isTypeOnly*/ - false, - rename, - text - )]) - ]; - changes.replaceNodeWithNodes(sourceFile, assignment.parent, newNodes); - } else { - convertExportsPropertyAssignment(assignment, sourceFile, changes); - } - } - function convertReExportAll(reExported, checker) { - const moduleSpecifier = reExported.text; - const moduleSymbol = checker.getSymbolAtLocation(reExported); - const exports = moduleSymbol ? moduleSymbol.exports : emptyMap; - return exports.has("export=" /* ExportEquals */) ? [[reExportDefault(moduleSpecifier)], true] : !exports.has("default" /* Default */) ? [[reExportStar(moduleSpecifier)], false] : ( - // If there's some non-default export, must include both `export *` and `export default`. - exports.size > 1 ? [[reExportStar(moduleSpecifier), reExportDefault(moduleSpecifier)], true] : [[reExportDefault(moduleSpecifier)], true] - ); - } - function reExportStar(moduleSpecifier) { - return makeExportDeclaration( - /*exportSpecifiers*/ - void 0, - moduleSpecifier - ); - } - function reExportDefault(moduleSpecifier) { - return makeExportDeclaration([factory.createExportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ - void 0, - "default" - )], moduleSpecifier); - } - function convertExportsPropertyAssignment({ left, right, parent: parent2 }, sourceFile, changes) { - const name = left.name.text; - if ((isFunctionExpression(right) || isArrowFunction(right) || isClassExpression(right)) && (!right.name || right.name.text === name)) { - changes.replaceRange(sourceFile, { pos: left.getStart(sourceFile), end: right.getStart(sourceFile) }, factory.createToken(95 /* ExportKeyword */), { suffix: " " }); - if (!right.name) - changes.insertName(sourceFile, right, name); - const semi = findChildOfKind(parent2, 27 /* SemicolonToken */, sourceFile); - if (semi) - changes.delete(sourceFile, semi); - } else { - changes.replaceNodeRangeWithNodes( - sourceFile, - left.expression, - findChildOfKind(left, 25 /* DotToken */, sourceFile), - [factory.createToken(95 /* ExportKeyword */), factory.createToken(87 /* ConstKeyword */)], - { joiner: " ", suffix: " " } - ); - } - } - function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { - const modifiers = [factory.createToken(95 /* ExportKeyword */)]; - switch (exported.kind) { - case 218 /* FunctionExpression */: { - const { name: expressionName } = exported; - if (expressionName && expressionName.text !== name) { - return exportConst(); - } - } - case 219 /* ArrowFunction */: - return functionExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - case 231 /* ClassExpression */: - return classExpressionToDeclaration(name, modifiers, exported, useSitesToUnqualify); - default: - return exportConst(); - } - function exportConst() { - return makeConst(modifiers, factory.createIdentifier(name), replaceImportUseSites(exported, useSitesToUnqualify)); - } - } - function replaceImportUseSites(nodeOrNodes, useSitesToUnqualify) { - if (!useSitesToUnqualify || !some(arrayFrom(useSitesToUnqualify.keys()), (original) => rangeContainsRange(nodeOrNodes, original))) { - return nodeOrNodes; - } - return isArray(nodeOrNodes) ? getSynthesizedDeepClonesWithReplacements( - nodeOrNodes, - /*includeTrivia*/ - true, - replaceNode - ) : getSynthesizedDeepCloneWithReplacements( - nodeOrNodes, - /*includeTrivia*/ - true, - replaceNode - ); - function replaceNode(original) { - if (original.kind === 211 /* PropertyAccessExpression */) { - const replacement = useSitesToUnqualify.get(original); - useSitesToUnqualify.delete(original); - return replacement; - } - } - } - function convertSingleImport(name, moduleSpecifier, checker, identifiers, target, quotePreference) { - switch (name.kind) { - case 206 /* ObjectBindingPattern */: { - const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier2(e.propertyName && e.propertyName.text, e.name.text)); - if (importSpecifiers) { - return convertedImports([makeImport( - /*defaultImport*/ - void 0, - importSpecifiers, - moduleSpecifier, - quotePreference - )]); - } - } - case 207 /* ArrayBindingPattern */: { - const tmp = makeUniqueName(moduleSpecifierToValidIdentifier(moduleSpecifier.text, target), identifiers); - return convertedImports([ - makeImport( - factory.createIdentifier(tmp), - /*namedImports*/ - void 0, - moduleSpecifier, - quotePreference - ), - makeConst( - /*modifiers*/ - void 0, - getSynthesizedDeepClone(name), - factory.createIdentifier(tmp) - ) - ]); - } - case 80 /* Identifier */: - return convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference); - default: - return Debug.assertNever(name, `Convert to ES module got invalid name kind ${name.kind}`); - } - } - function convertSingleIdentifierImport(name, moduleSpecifier, checker, identifiers, quotePreference) { - const nameSymbol = checker.getSymbolAtLocation(name); - const namedBindingsNames = /* @__PURE__ */ new Map(); - let needDefaultImport = false; - let useSitesToUnqualify; - for (const use of identifiers.original.get(name.text)) { - if (checker.getSymbolAtLocation(use) !== nameSymbol || use === name) { - continue; - } - const { parent: parent2 } = use; - if (isPropertyAccessExpression(parent2)) { - const { name: { text: propertyName } } = parent2; - if (propertyName === "default") { - needDefaultImport = true; - const importDefaultName = use.getText(); - (useSitesToUnqualify ?? (useSitesToUnqualify = /* @__PURE__ */ new Map())).set(parent2, factory.createIdentifier(importDefaultName)); - } else { - Debug.assert(parent2.expression === use, "Didn't expect expression === use"); - let idName = namedBindingsNames.get(propertyName); - if (idName === void 0) { - idName = makeUniqueName(propertyName, identifiers); - namedBindingsNames.set(propertyName, idName); - } - (useSitesToUnqualify ?? (useSitesToUnqualify = /* @__PURE__ */ new Map())).set(parent2, factory.createIdentifier(idName)); - } - } else { - needDefaultImport = true; - } - } - const namedBindings = namedBindingsNames.size === 0 ? void 0 : arrayFrom(mapIterator(namedBindingsNames.entries(), ([propertyName, idName]) => factory.createImportSpecifier( - /*isTypeOnly*/ - false, - propertyName === idName ? void 0 : factory.createIdentifier(propertyName), - factory.createIdentifier(idName) - ))); - if (!namedBindings) { - needDefaultImport = true; - } - return convertedImports( - [makeImport(needDefaultImport ? getSynthesizedDeepClone(name) : void 0, namedBindings, moduleSpecifier, quotePreference)], - useSitesToUnqualify - ); - } - function makeUniqueName(name, identifiers) { - while (identifiers.original.has(name) || identifiers.additional.has(name)) { - name = `_${name}`; - } - identifiers.additional.add(name); - return name; - } - function collectFreeIdentifiers(file) { - const map2 = createMultiMap(); - forEachFreeIdentifier(file, (id) => map2.add(id.text, id)); - return map2; - } - function forEachFreeIdentifier(node, cb) { - if (isIdentifier(node) && isFreeIdentifier(node)) - cb(node); - node.forEachChild((child) => forEachFreeIdentifier(child, cb)); - } - function isFreeIdentifier(node) { - const { parent: parent2 } = node; - switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: - return parent2.name !== node; - case 208 /* BindingElement */: - return parent2.propertyName !== node; - case 276 /* ImportSpecifier */: - return parent2.propertyName !== node; - default: - return true; - } - } - function functionExpressionToDeclaration(name, additionalModifiers, fn, useSitesToUnqualify) { - return factory.createFunctionDeclaration( - concatenate(additionalModifiers, getSynthesizedDeepClones(fn.modifiers)), - getSynthesizedDeepClone(fn.asteriskToken), - name, - getSynthesizedDeepClones(fn.typeParameters), - getSynthesizedDeepClones(fn.parameters), - getSynthesizedDeepClone(fn.type), - factory.converters.convertToFunctionBlock(replaceImportUseSites(fn.body, useSitesToUnqualify)) - ); - } - function classExpressionToDeclaration(name, additionalModifiers, cls, useSitesToUnqualify) { - return factory.createClassDeclaration( - concatenate(additionalModifiers, getSynthesizedDeepClones(cls.modifiers)), - name, - getSynthesizedDeepClones(cls.typeParameters), - getSynthesizedDeepClones(cls.heritageClauses), - replaceImportUseSites(cls.members, useSitesToUnqualify) - ); - } - function makeSingleImport(localName, propertyName, moduleSpecifier, quotePreference) { - return propertyName === "default" ? makeImport( - factory.createIdentifier(localName), - /*namedImports*/ - void 0, - moduleSpecifier, - quotePreference - ) : makeImport( - /*defaultImport*/ - void 0, - [makeImportSpecifier2(propertyName, localName)], - moduleSpecifier, - quotePreference - ); - } - function makeImportSpecifier2(propertyName, name) { - return factory.createImportSpecifier( - /*isTypeOnly*/ - false, - propertyName !== void 0 && propertyName !== name ? factory.createIdentifier(propertyName) : void 0, - factory.createIdentifier(name) - ); - } - function makeConst(modifiers, name, init) { - return factory.createVariableStatement( - modifiers, - factory.createVariableDeclarationList( - [factory.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - init - )], - 2 /* Const */ - ) - ); - } - function makeExportDeclaration(exportSpecifiers, moduleSpecifier) { - return factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - exportSpecifiers && factory.createNamedExports(exportSpecifiers), - moduleSpecifier === void 0 ? void 0 : factory.createStringLiteral(moduleSpecifier) - ); - } - function convertedImports(newImports, useSitesToUnqualify) { - return { - newImports, - useSitesToUnqualify - }; - } - var init_convertToEsModule = __esm({ - "src/services/codefixes/convertToEsModule.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - registerCodeFix({ - errorCodes: [Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code], - getCodeActions(context) { - const { sourceFile, program, preferences } = context; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => { - const moduleExportsChangedToDefault = convertFileToEsModule(sourceFile, program.getTypeChecker(), changes2, getEmitScriptTarget(program.getCompilerOptions()), getQuotePreference(sourceFile, preferences)); - if (moduleExportsChangedToDefault) { - for (const importingFile of program.getSourceFiles()) { - fixImportOfModuleExports(importingFile, sourceFile, changes2, getQuotePreference(importingFile, preferences)); - } - } - }); - return [createCodeFixActionWithoutFixAll("convertToEsModule", changes, Diagnostics.Convert_to_ES_module)]; - } - }); - } - }); - - // src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts - function getQualifiedName(sourceFile, pos) { - const qualifiedName = findAncestor(getTokenAtPosition(sourceFile, pos), isQualifiedName); - Debug.assert(!!qualifiedName, "Expected position to be owned by a qualified name."); - return isIdentifier(qualifiedName.left) ? qualifiedName : void 0; - } - function doChange10(changeTracker, sourceFile, qualifiedName) { - const rightText = qualifiedName.right.text; - const replacement = factory.createIndexedAccessTypeNode( - factory.createTypeReferenceNode( - qualifiedName.left, - /*typeArguments*/ - void 0 - ), - factory.createLiteralTypeNode(factory.createStringLiteral(rightText)) - ); - changeTracker.replaceNode(sourceFile, qualifiedName, replacement); - } - var fixId11, errorCodes12; - var init_correctQualifiedNameToIndexedAccessType = __esm({ - "src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId11 = "correctQualifiedNameToIndexedAccessType"; - errorCodes12 = [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.code]; - registerCodeFix({ - errorCodes: errorCodes12, - getCodeActions(context) { - const qualifiedName = getQualifiedName(context.sourceFile, context.span.start); - if (!qualifiedName) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange10(t, context.sourceFile, qualifiedName)); - const newText = `${qualifiedName.left.text}["${qualifiedName.right.text}"]`; - return [createCodeFixAction(fixId11, changes, [Diagnostics.Rewrite_as_the_indexed_access_type_0, newText], fixId11, Diagnostics.Rewrite_all_as_indexed_access_types)]; - }, - fixIds: [fixId11], - getAllCodeActions: (context) => codeFixAll(context, errorCodes12, (changes, diag2) => { - const q = getQualifiedName(diag2.file, diag2.start); - if (q) { - doChange10(changes, diag2.file, q); - } - }) - }); - } - }); - - // src/services/codefixes/convertToTypeOnlyExport.ts - function getExportSpecifierForDiagnosticSpan(span, sourceFile) { - return tryCast(getTokenAtPosition(sourceFile, span.start).parent, isExportSpecifier); - } - function fixSingleExportDeclaration(changes, exportSpecifier, context) { - if (!exportSpecifier) { - return; - } - const exportClause = exportSpecifier.parent; - const exportDeclaration = exportClause.parent; - const typeExportSpecifiers = getTypeExportSpecifiers(exportSpecifier, context); - if (typeExportSpecifiers.length === exportClause.elements.length) { - changes.insertModifierBefore(context.sourceFile, 156 /* TypeKeyword */, exportClause); - } else { - const valueExportDeclaration = factory.updateExportDeclaration( - exportDeclaration, - exportDeclaration.modifiers, - /*isTypeOnly*/ - false, - factory.updateNamedExports(exportClause, filter(exportClause.elements, (e) => !contains(typeExportSpecifiers, e))), - exportDeclaration.moduleSpecifier, - /*assertClause*/ - void 0 - ); - const typeExportDeclaration = factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - true, - factory.createNamedExports(typeExportSpecifiers), - exportDeclaration.moduleSpecifier, - /*assertClause*/ - void 0 - ); - changes.replaceNode(context.sourceFile, exportDeclaration, valueExportDeclaration, { - leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll, - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude - }); - changes.insertNodeAfter(context.sourceFile, exportDeclaration, typeExportDeclaration); - } - } - function getTypeExportSpecifiers(originExportSpecifier, context) { - const exportClause = originExportSpecifier.parent; - if (exportClause.elements.length === 1) { - return exportClause.elements; - } - const diagnostics = getDiagnosticsWithinSpan( - createTextSpanFromNode(exportClause), - context.program.getSemanticDiagnostics(context.sourceFile, context.cancellationToken) - ); - return filter(exportClause.elements, (element) => { - var _a; - return element === originExportSpecifier || ((_a = findDiagnosticForNode(element, diagnostics)) == null ? void 0 : _a.code) === errorCodes13[0]; - }); - } - var errorCodes13, fixId12; - var init_convertToTypeOnlyExport = __esm({ - "src/services/codefixes/convertToTypeOnlyExport.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - errorCodes13 = [Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code]; - fixId12 = "convertToTypeOnlyExport"; - registerCodeFix({ - errorCodes: errorCodes13, - getCodeActions: function getCodeActionsToConvertToTypeOnlyExport(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => fixSingleExportDeclaration(t, getExportSpecifierForDiagnosticSpan(context.span, context.sourceFile), context)); - if (changes.length) { - return [createCodeFixAction(fixId12, changes, Diagnostics.Convert_to_type_only_export, fixId12, Diagnostics.Convert_all_re_exported_types_to_type_only_exports)]; - } - }, - fixIds: [fixId12], - getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyExport(context) { - const fixedExportDeclarations = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes13, (changes, diag2) => { - const exportSpecifier = getExportSpecifierForDiagnosticSpan(diag2, context.sourceFile); - if (exportSpecifier && addToSeen(fixedExportDeclarations, getNodeId(exportSpecifier.parent.parent))) { - fixSingleExportDeclaration(changes, exportSpecifier, context); - } - }); - } - }); - } - }); - - // src/services/codefixes/convertToTypeOnlyImport.ts - function getDeclaration2(sourceFile, pos) { - const { parent: parent2 } = getTokenAtPosition(sourceFile, pos); - return isImportSpecifier(parent2) || isImportDeclaration(parent2) && parent2.importClause ? parent2 : void 0; - } - function canConvertImportDeclarationForSpecifier(specifier, sourceFile, program) { - if (specifier.parent.parent.name) { - return false; - } - const nonTypeOnlySpecifiers = specifier.parent.elements.filter((e) => !e.isTypeOnly); - if (nonTypeOnlySpecifiers.length === 1) { - return true; - } - const checker = program.getTypeChecker(); - for (const specifier2 of nonTypeOnlySpecifiers) { - const isUsedAsValue = ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(specifier2.name, checker, sourceFile, (usage) => { - return !isValidTypeOnlyAliasUseSite(usage); - }); - if (isUsedAsValue) { - return false; - } - } - return true; - } - function doChange11(changes, sourceFile, declaration) { - var _a; - if (isImportSpecifier(declaration)) { - changes.replaceNode(sourceFile, declaration, factory.updateImportSpecifier( - declaration, - /*isTypeOnly*/ - true, - declaration.propertyName, - declaration.name - )); - } else { - const importClause = declaration.importClause; - if (importClause.name && importClause.namedBindings) { - changes.replaceNodeWithNodes(sourceFile, declaration, [ - factory.createImportDeclaration( - getSynthesizedDeepClones( - declaration.modifiers, - /*includeTrivia*/ - true - ), - factory.createImportClause( - /*isTypeOnly*/ - true, - getSynthesizedDeepClone( - importClause.name, - /*includeTrivia*/ - true - ), - /*namedBindings*/ - void 0 - ), - getSynthesizedDeepClone( - declaration.moduleSpecifier, - /*includeTrivia*/ - true - ), - getSynthesizedDeepClone( - declaration.assertClause, - /*includeTrivia*/ - true - ) - ), - factory.createImportDeclaration( - getSynthesizedDeepClones( - declaration.modifiers, - /*includeTrivia*/ - true - ), - factory.createImportClause( - /*isTypeOnly*/ - true, - /*name*/ - void 0, - getSynthesizedDeepClone( - importClause.namedBindings, - /*includeTrivia*/ - true - ) - ), - getSynthesizedDeepClone( - declaration.moduleSpecifier, - /*includeTrivia*/ - true - ), - getSynthesizedDeepClone( - declaration.assertClause, - /*includeTrivia*/ - true - ) - ) - ]); - } else { - const newNamedBindings = ((_a = importClause.namedBindings) == null ? void 0 : _a.kind) === 275 /* NamedImports */ ? factory.updateNamedImports( - importClause.namedBindings, - sameMap(importClause.namedBindings.elements, (e) => factory.updateImportSpecifier( - e, - /*isTypeOnly*/ - false, - e.propertyName, - e.name - )) - ) : importClause.namedBindings; - const importDeclaration = factory.updateImportDeclaration( - declaration, - declaration.modifiers, - factory.updateImportClause( - importClause, - /*isTypeOnly*/ - true, - importClause.name, - newNamedBindings - ), - declaration.moduleSpecifier, - declaration.assertClause - ); - changes.replaceNode(sourceFile, declaration, importDeclaration); - } - } - } - var errorCodes14, fixId13; - var init_convertToTypeOnlyImport = __esm({ - "src/services/codefixes/convertToTypeOnlyImport.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - errorCodes14 = [ - Diagnostics.This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error.code, - Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code - ]; - fixId13 = "convertToTypeOnlyImport"; - registerCodeFix({ - errorCodes: errorCodes14, - getCodeActions: function getCodeActionsToConvertToTypeOnlyImport(context) { - var _a; - const declaration = getDeclaration2(context.sourceFile, context.span.start); - if (declaration) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration)); - const importDeclarationChanges = declaration.kind === 276 /* ImportSpecifier */ && canConvertImportDeclarationForSpecifier(declaration, context.sourceFile, context.program) ? ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange11(t, context.sourceFile, declaration.parent.parent.parent)) : void 0; - const mainAction = createCodeFixAction( - fixId13, - changes, - declaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Use_type_0, ((_a = declaration.propertyName) == null ? void 0 : _a.text) ?? declaration.name.text] : Diagnostics.Use_import_type, - fixId13, - Diagnostics.Fix_all_with_type_only_imports - ); - if (some(importDeclarationChanges)) { - return [ - createCodeFixActionWithoutFixAll(fixId13, importDeclarationChanges, Diagnostics.Use_import_type), - mainAction - ]; - } - return [mainAction]; - } - return void 0; - }, - fixIds: [fixId13], - getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) { - const fixedImportDeclarations = /* @__PURE__ */ new Set(); - return codeFixAll(context, errorCodes14, (changes, diag2) => { - const errorDeclaration = getDeclaration2(diag2.file, diag2.start); - if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 272 /* ImportDeclaration */ && !fixedImportDeclarations.has(errorDeclaration)) { - doChange11(changes, diag2.file, errorDeclaration); - fixedImportDeclarations.add(errorDeclaration); - } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */ && !fixedImportDeclarations.has(errorDeclaration.parent.parent.parent) && canConvertImportDeclarationForSpecifier(errorDeclaration, diag2.file, context.program)) { - doChange11(changes, diag2.file, errorDeclaration.parent.parent.parent); - fixedImportDeclarations.add(errorDeclaration.parent.parent.parent); - } else if ((errorDeclaration == null ? void 0 : errorDeclaration.kind) === 276 /* ImportSpecifier */) { - doChange11(changes, diag2.file, errorDeclaration); - } - }); - } - }); - } - }); - - // src/services/codefixes/convertTypedefToType.ts - function doChange12(changes, node, sourceFile, newLine, fixAll = false) { - if (!isJSDocTypedefTag(node)) - return; - const declaration = createDeclaration(node); - if (!declaration) - return; - const commentNode = node.parent; - const { leftSibling, rightSibling } = getLeftAndRightSiblings(node); - let pos = commentNode.getStart(); - let prefix = ""; - if (!leftSibling && commentNode.comment) { - pos = findEndOfTextBetween(commentNode, commentNode.getStart(), node.getStart()); - prefix = `${newLine} */${newLine}`; - } - if (leftSibling) { - if (fixAll && isJSDocTypedefTag(leftSibling)) { - pos = node.getStart(); - prefix = ""; - } else { - pos = findEndOfTextBetween(commentNode, leftSibling.getStart(), node.getStart()); - prefix = `${newLine} */${newLine}`; - } - } - let end = commentNode.getEnd(); - let suffix = ""; - if (rightSibling) { - if (fixAll && isJSDocTypedefTag(rightSibling)) { - end = rightSibling.getStart(); - suffix = `${newLine}${newLine}`; - } else { - end = rightSibling.getStart(); - suffix = `${newLine}/**${newLine} * `; - } - } - changes.replaceRange(sourceFile, { pos, end }, declaration, { prefix, suffix }); - } - function getLeftAndRightSiblings(typedefNode) { - const commentNode = typedefNode.parent; - const maxChildIndex = commentNode.getChildCount() - 1; - const currentNodeIndex = commentNode.getChildren().findIndex( - (n) => n.getStart() === typedefNode.getStart() && n.getEnd() === typedefNode.getEnd() - ); - const leftSibling = currentNodeIndex > 0 ? commentNode.getChildAt(currentNodeIndex - 1) : void 0; - const rightSibling = currentNodeIndex < maxChildIndex ? commentNode.getChildAt(currentNodeIndex + 1) : void 0; - return { leftSibling, rightSibling }; - } - function findEndOfTextBetween(jsDocComment, from, to) { - const comment = jsDocComment.getText().substring(from - jsDocComment.getStart(), to - jsDocComment.getStart()); - for (let i = comment.length; i > 0; i--) { - if (!/[*/\s]/g.test(comment.substring(i - 1, i))) { - return from + i; - } - } - return to; - } - function createDeclaration(tag) { - var _a; - const { typeExpression } = tag; - if (!typeExpression) - return; - const typeName = (_a = tag.name) == null ? void 0 : _a.getText(); - if (!typeName) - return; - if (typeExpression.kind === 329 /* JSDocTypeLiteral */) { - return createInterfaceForTypeLiteral(typeName, typeExpression); - } - if (typeExpression.kind === 316 /* JSDocTypeExpression */) { - return createTypeAliasForTypeExpression(typeName, typeExpression); - } - } - function createInterfaceForTypeLiteral(typeName, typeLiteral) { - const propertySignatures = createSignatureFromTypeLiteral(typeLiteral); - if (!some(propertySignatures)) - return; - return factory.createInterfaceDeclaration( - /*modifiers*/ - void 0, - typeName, - /*typeParameters*/ - void 0, - /*heritageClauses*/ - void 0, - propertySignatures - ); - } - function createTypeAliasForTypeExpression(typeName, typeExpression) { - const typeReference = getSynthesizedDeepClone(typeExpression.type); - if (!typeReference) - return; - return factory.createTypeAliasDeclaration( - /*modifiers*/ - void 0, - factory.createIdentifier(typeName), - /*typeParameters*/ - void 0, - typeReference - ); - } - function createSignatureFromTypeLiteral(typeLiteral) { - const propertyTags = typeLiteral.jsDocPropertyTags; - if (!some(propertyTags)) - return; - const getSignature = (tag) => { - var _a; - const name = getPropertyName(tag); - const type = (_a = tag.typeExpression) == null ? void 0 : _a.type; - const isOptional = tag.isBracketed; - let typeReference; - if (type && isJSDocTypeLiteral(type)) { - const signatures = createSignatureFromTypeLiteral(type); - typeReference = factory.createTypeLiteralNode(signatures); - } else if (type) { - typeReference = getSynthesizedDeepClone(type); - } - if (typeReference && name) { - const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; - return factory.createPropertySignature( - /*modifiers*/ - void 0, - name, - questionToken, - typeReference - ); - } - }; - return mapDefined(propertyTags, getSignature); - } - function getPropertyName(tag) { - return tag.name.kind === 80 /* Identifier */ ? tag.name.text : tag.name.right.text; - } - function getJSDocTypedefNodes(node) { - if (hasJSDocNodes(node)) { - return flatMap(node.jsDoc, (doc) => { - var _a; - return (_a = doc.tags) == null ? void 0 : _a.filter((tag) => isJSDocTypedefTag(tag)); - }); - } - return []; - } - var fixId14, errorCodes15; - var init_convertTypedefToType = __esm({ - "src/services/codefixes/convertTypedefToType.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId14 = "convertTypedefToType"; - errorCodes15 = [Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type.code]; - registerCodeFix({ - fixIds: [fixId14], - errorCodes: errorCodes15, - getCodeActions(context) { - const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); - const node = getTokenAtPosition( - context.sourceFile, - context.span.start - ); - if (!node) - return; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange12(t, node, context.sourceFile, newLineCharacter)); - if (changes.length > 0) { - return [ - createCodeFixAction( - fixId14, - changes, - Diagnostics.Convert_typedef_to_TypeScript_type, - fixId14, - Diagnostics.Convert_all_typedef_to_TypeScript_types - ) - ]; - } - }, - getAllCodeActions: (context) => codeFixAll( - context, - errorCodes15, - (changes, diag2) => { - const newLineCharacter = getNewLineOrDefaultFromHost(context.host, context.formatContext.options); - const node = getTokenAtPosition(diag2.file, diag2.start); - const fixAll = true; - if (node) - doChange12(changes, node, diag2.file, newLineCharacter, fixAll); - } - ) - }); - } - }); - - // src/services/codefixes/convertLiteralTypeToMappedType.ts - function getInfo5(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - if (isIdentifier(token)) { - const propertySignature = cast(token.parent.parent, isPropertySignature); - const propertyName = token.getText(sourceFile); - return { - container: cast(propertySignature.parent, isTypeLiteralNode), - typeNode: propertySignature.type, - constraint: propertyName, - name: propertyName === "K" ? "P" : "K" - }; - } - return void 0; - } - function doChange13(changes, sourceFile, { container, typeNode, constraint, name }) { - changes.replaceNode(sourceFile, container, factory.createMappedTypeNode( - /*readonlyToken*/ - void 0, - factory.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - name, - factory.createTypeReferenceNode(constraint) - ), - /*nameType*/ - void 0, - /*questionToken*/ - void 0, - typeNode, - /*members*/ - void 0 - )); - } - var fixId15, errorCodes16; - var init_convertLiteralTypeToMappedType = __esm({ - "src/services/codefixes/convertLiteralTypeToMappedType.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId15 = "convertLiteralTypeToMappedType"; - errorCodes16 = [Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code]; - registerCodeFix({ - errorCodes: errorCodes16, - getCodeActions: function getCodeActionsToConvertLiteralTypeToMappedType(context) { - const { sourceFile, span } = context; - const info = getInfo5(sourceFile, span.start); - if (!info) { - return void 0; - } - const { name, constraint } = info; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange13(t, sourceFile, info)); - return [createCodeFixAction(fixId15, changes, [Diagnostics.Convert_0_to_1_in_0, constraint, name], fixId15, Diagnostics.Convert_all_type_literals_to_mapped_type)]; - }, - fixIds: [fixId15], - getAllCodeActions: (context) => codeFixAll(context, errorCodes16, (changes, diag2) => { - const info = getInfo5(diag2.file, diag2.start); - if (info) { - doChange13(changes, diag2.file, info); - } - }) - }); - } - }); - - // src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts - function getClass(sourceFile, pos) { - return Debug.checkDefined(getContainingClass(getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); - } - function symbolPointsToNonPrivateMember(symbol) { - return !symbol.valueDeclaration || !(getEffectiveModifierFlags(symbol.valueDeclaration) & 8 /* Private */); - } - function addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, changeTracker, preferences) { - const checker = context.program.getTypeChecker(); - const maybeHeritageClauseSymbol = getHeritageClauseSymbolTable(classDeclaration, checker); - const implementedType = checker.getTypeAtLocation(implementedTypeNode); - const implementedTypeSymbols = checker.getPropertiesOfType(implementedType); - const nonPrivateAndNotExistedInHeritageClauseMembers = implementedTypeSymbols.filter(and(symbolPointsToNonPrivateMember, (symbol) => !maybeHeritageClauseSymbol.has(symbol.escapedName))); - const classType = checker.getTypeAtLocation(classDeclaration); - const constructor = find(classDeclaration.members, (m) => isConstructorDeclaration(m)); - if (!classType.getNumberIndexType()) { - createMissingIndexSignatureDeclaration(implementedType, 1 /* Number */); - } - if (!classType.getStringIndexType()) { - createMissingIndexSignatureDeclaration(implementedType, 0 /* String */); - } - const importAdder = createImportAdder(sourceFile, context.program, preferences, context.host); - createMissingMemberNodes(classDeclaration, nonPrivateAndNotExistedInHeritageClauseMembers, sourceFile, context, preferences, importAdder, (member) => insertInterfaceMemberNode(sourceFile, classDeclaration, member)); - importAdder.writeFixes(changeTracker); - function createMissingIndexSignatureDeclaration(type, kind) { - const indexInfoOfKind = checker.getIndexInfoOfType(type, kind); - if (indexInfoOfKind) { - insertInterfaceMemberNode(sourceFile, classDeclaration, checker.indexInfoToIndexSignatureDeclaration( - indexInfoOfKind, - classDeclaration, - /*flags*/ - void 0, - getNoopSymbolTrackerWithResolver(context) - )); - } - } - function insertInterfaceMemberNode(sourceFile2, cls, newElement) { - if (constructor) { - changeTracker.insertNodeAfter(sourceFile2, constructor, newElement); - } else { - changeTracker.insertMemberAtStart(sourceFile2, cls, newElement); - } - } - } - function getHeritageClauseSymbolTable(classDeclaration, checker) { - const heritageClauseNode = getEffectiveBaseTypeNode(classDeclaration); - if (!heritageClauseNode) - return createSymbolTable(); - const heritageClauseType = checker.getTypeAtLocation(heritageClauseNode); - const heritageClauseTypeSymbols = checker.getPropertiesOfType(heritageClauseType); - return createSymbolTable(heritageClauseTypeSymbols.filter(symbolPointsToNonPrivateMember)); - } - var errorCodes17, fixId16; - var init_fixClassIncorrectlyImplementsInterface = __esm({ - "src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - errorCodes17 = [ - Diagnostics.Class_0_incorrectly_implements_interface_1.code, - Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass.code - ]; - fixId16 = "fixClassIncorrectlyImplementsInterface"; - registerCodeFix({ - errorCodes: errorCodes17, - getCodeActions(context) { - const { sourceFile, span } = context; - const classDeclaration = getClass(sourceFile, span.start); - return mapDefined(getEffectiveImplementsTypeNodes(classDeclaration), (implementedTypeNode) => { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, t, context.preferences)); - return changes.length === 0 ? void 0 : createCodeFixAction(fixId16, changes, [Diagnostics.Implement_interface_0, implementedTypeNode.getText(sourceFile)], fixId16, Diagnostics.Implement_all_unimplemented_interfaces); - }); - }, - fixIds: [fixId16], - getAllCodeActions(context) { - const seenClassDeclarations = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes17, (changes, diag2) => { - const classDeclaration = getClass(diag2.file, diag2.start); - if (addToSeen(seenClassDeclarations, getNodeId(classDeclaration))) { - for (const implementedTypeNode of getEffectiveImplementsTypeNodes(classDeclaration)) { - addMissingDeclarations(context, implementedTypeNode, diag2.file, classDeclaration, changes, context.preferences); - } - } - }); - } - }); - } - }); - - // src/services/codefixes/importFixes.ts - function createImportAdder(sourceFile, program, preferences, host, cancellationToken) { - return createImportAdderWorker( - sourceFile, - program, - /*useAutoImportProvider*/ - false, - preferences, - host, - cancellationToken - ); - } - function createImportAdderWorker(sourceFile, program, useAutoImportProvider, preferences, host, cancellationToken) { - const compilerOptions = program.getCompilerOptions(); - const addToNamespace = []; - const importType = []; - const addToExisting = /* @__PURE__ */ new Map(); - const newImports = /* @__PURE__ */ new Map(); - return { addImportFromDiagnostic, addImportFromExportedSymbol, writeFixes, hasFixes }; - function addImportFromDiagnostic(diagnostic, context) { - const info = getFixInfos(context, diagnostic.code, diagnostic.start, useAutoImportProvider); - if (!info || !info.length) - return; - addImport(first(info)); - } - function addImportFromExportedSymbol(exportedSymbol, isValidTypeOnlyUseSite) { - const moduleSymbol = Debug.checkDefined(exportedSymbol.parent); - const symbolName2 = getNameForExportedSymbol(exportedSymbol, getEmitScriptTarget(compilerOptions)); - const checker = program.getTypeChecker(); - const symbol = checker.getMergedSymbol(skipAlias(exportedSymbol, checker)); - const exportInfo = getAllExportInfoForSymbol( - sourceFile, - symbol, - symbolName2, - moduleSymbol, - /*preferCapitalized*/ - false, - program, - host, - preferences, - cancellationToken - ); - const useRequire = shouldUseRequire(sourceFile, program); - const fix = getImportFixForSymbol( - sourceFile, - Debug.checkDefined(exportInfo), - program, - /*position*/ - void 0, - !!isValidTypeOnlyUseSite, - useRequire, - host, - preferences - ); - if (fix) { - addImport({ fix, symbolName: symbolName2, errorIdentifierText: void 0 }); - } - } - function addImport(info) { - var _a, _b; - const { fix, symbolName: symbolName2 } = info; - switch (fix.kind) { - case 0 /* UseNamespace */: - addToNamespace.push(fix); - break; - case 1 /* JsdocTypeImport */: - importType.push(fix); - break; - case 2 /* AddToExisting */: { - const { importClauseOrBindingPattern, importKind, addAsTypeOnly } = fix; - const key = String(getNodeId(importClauseOrBindingPattern)); - let entry = addToExisting.get(key); - if (!entry) { - addToExisting.set(key, entry = { importClauseOrBindingPattern, defaultImport: void 0, namedImports: /* @__PURE__ */ new Map() }); - } - if (importKind === 0 /* Named */) { - const prevValue = entry == null ? void 0 : entry.namedImports.get(symbolName2); - entry.namedImports.set(symbolName2, reduceAddAsTypeOnlyValues(prevValue, addAsTypeOnly)); - } else { - Debug.assert(entry.defaultImport === void 0 || entry.defaultImport.name === symbolName2, "(Add to Existing) Default import should be missing or match symbolName"); - entry.defaultImport = { - name: symbolName2, - addAsTypeOnly: reduceAddAsTypeOnlyValues((_a = entry.defaultImport) == null ? void 0 : _a.addAsTypeOnly, addAsTypeOnly) - }; - } - break; - } - case 3 /* AddNew */: { - const { moduleSpecifier, importKind, useRequire, addAsTypeOnly } = fix; - const entry = getNewImportEntry(moduleSpecifier, importKind, useRequire, addAsTypeOnly); - Debug.assert(entry.useRequire === useRequire, "(Add new) Tried to add an `import` and a `require` for the same module"); - switch (importKind) { - case 1 /* Default */: - Debug.assert(entry.defaultImport === void 0 || entry.defaultImport.name === symbolName2, "(Add new) Default import should be missing or match symbolName"); - entry.defaultImport = { name: symbolName2, addAsTypeOnly: reduceAddAsTypeOnlyValues((_b = entry.defaultImport) == null ? void 0 : _b.addAsTypeOnly, addAsTypeOnly) }; - break; - case 0 /* Named */: - const prevValue = (entry.namedImports || (entry.namedImports = /* @__PURE__ */ new Map())).get(symbolName2); - entry.namedImports.set(symbolName2, reduceAddAsTypeOnlyValues(prevValue, addAsTypeOnly)); - break; - case 3 /* CommonJS */: - case 2 /* Namespace */: - Debug.assert(entry.namespaceLikeImport === void 0 || entry.namespaceLikeImport.name === symbolName2, "Namespacelike import shoudl be missing or match symbolName"); - entry.namespaceLikeImport = { importKind, name: symbolName2, addAsTypeOnly }; - break; - } - break; - } - case 4 /* PromoteTypeOnly */: - break; - default: - Debug.assertNever(fix, `fix wasn't never - got kind ${fix.kind}`); - } - function reduceAddAsTypeOnlyValues(prevValue, newValue) { - return Math.max(prevValue ?? 0, newValue); - } - function getNewImportEntry(moduleSpecifier, importKind, useRequire, addAsTypeOnly) { - const typeOnlyKey = newImportsKey( - moduleSpecifier, - /*topLevelTypeOnly*/ - true - ); - const nonTypeOnlyKey = newImportsKey( - moduleSpecifier, - /*topLevelTypeOnly*/ - false - ); - const typeOnlyEntry = newImports.get(typeOnlyKey); - const nonTypeOnlyEntry = newImports.get(nonTypeOnlyKey); - const newEntry = { - defaultImport: void 0, - namedImports: void 0, - namespaceLikeImport: void 0, - useRequire - }; - if (importKind === 1 /* Default */ && addAsTypeOnly === 2 /* Required */) { - if (typeOnlyEntry) - return typeOnlyEntry; - newImports.set(typeOnlyKey, newEntry); - return newEntry; - } - if (addAsTypeOnly === 1 /* Allowed */ && (typeOnlyEntry || nonTypeOnlyEntry)) { - return typeOnlyEntry || nonTypeOnlyEntry; - } - if (nonTypeOnlyEntry) { - return nonTypeOnlyEntry; - } - newImports.set(nonTypeOnlyKey, newEntry); - return newEntry; - } - function newImportsKey(moduleSpecifier, topLevelTypeOnly) { - return `${topLevelTypeOnly ? 1 : 0}|${moduleSpecifier}`; - } - } - function writeFixes(changeTracker, oldFileQuotePreference) { - let quotePreference; - if (sourceFile.imports.length === 0 && oldFileQuotePreference !== void 0) { - quotePreference = oldFileQuotePreference; - } else { - quotePreference = getQuotePreference(sourceFile, preferences); - } - for (const fix of addToNamespace) { - addNamespaceQualifier(changeTracker, sourceFile, fix); - } - for (const fix of importType) { - addImportType(changeTracker, sourceFile, fix, quotePreference); - } - addToExisting.forEach(({ importClauseOrBindingPattern, defaultImport, namedImports }) => { - doAddExistingFix( - changeTracker, - sourceFile, - importClauseOrBindingPattern, - defaultImport, - arrayFrom(namedImports.entries(), ([name, addAsTypeOnly]) => ({ addAsTypeOnly, name })), - preferences - ); - }); - let newDeclarations; - newImports.forEach(({ useRequire, defaultImport, namedImports, namespaceLikeImport }, key) => { - const moduleSpecifier = key.slice(2); - const getDeclarations = useRequire ? getNewRequires : getNewImports; - const declarations = getDeclarations( - moduleSpecifier, - quotePreference, - defaultImport, - namedImports && arrayFrom(namedImports.entries(), ([name, addAsTypeOnly]) => ({ addAsTypeOnly, name })), - namespaceLikeImport, - compilerOptions - ); - newDeclarations = combine(newDeclarations, declarations); - }); - if (newDeclarations) { - insertImports( - changeTracker, - sourceFile, - newDeclarations, - /*blankLineBetween*/ - true, - preferences - ); - } - } - function hasFixes() { - return addToNamespace.length > 0 || importType.length > 0 || addToExisting.size > 0 || newImports.size > 0; - } - } - function createImportSpecifierResolver(importingFile, program, host, preferences) { - const packageJsonImportFilter = createPackageJsonImportFilter(importingFile, preferences, host); - const importMap = createExistingImportMap(program.getTypeChecker(), importingFile, program.getCompilerOptions()); - return { getModuleSpecifierForBestExportInfo }; - function getModuleSpecifierForBestExportInfo(exportInfo, position, isValidTypeOnlyUseSite, fromCacheOnly) { - const { fixes, computedWithoutCacheCount } = getImportFixes( - exportInfo, - position, - isValidTypeOnlyUseSite, - /*useRequire*/ - false, - program, - importingFile, - host, - preferences, - importMap, - fromCacheOnly - ); - const result = getBestFix(fixes, importingFile, program, packageJsonImportFilter, host); - return result && { ...result, computedWithoutCacheCount }; - } - } - function getImportCompletionAction(targetSymbol, moduleSymbol, exportMapKey, sourceFile, symbolName2, isJsxTagName, host, program, formatContext, position, preferences, cancellationToken) { - const compilerOptions = program.getCompilerOptions(); - let exportInfos; - if (exportMapKey) { - exportInfos = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken).get(sourceFile.path, exportMapKey); - Debug.assertIsDefined(exportInfos, "Some exportInfo should match the specified exportMapKey"); - } else { - exportInfos = pathIsBareSpecifier(stripQuotes(moduleSymbol.name)) ? [getSingleExportInfoForSymbol(targetSymbol, symbolName2, moduleSymbol, program, host)] : getAllExportInfoForSymbol(sourceFile, targetSymbol, symbolName2, moduleSymbol, isJsxTagName, program, host, preferences, cancellationToken); - Debug.assertIsDefined(exportInfos, "Some exportInfo should match the specified symbol / moduleSymbol"); - } - const useRequire = shouldUseRequire(sourceFile, program); - const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(getTokenAtPosition(sourceFile, position)); - const fix = Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences)); - return { - moduleSpecifier: fix.moduleSpecifier, - codeAction: codeFixActionToCodeAction(codeActionForFix( - { host, formatContext, preferences }, - sourceFile, - symbolName2, - fix, - /*includeSymbolNameInDescription*/ - false, - compilerOptions, - preferences - )) - }; - } - function getPromoteTypeOnlyCompletionAction(sourceFile, symbolToken, program, host, formatContext, preferences) { - const compilerOptions = program.getCompilerOptions(); - const symbolName2 = single(getSymbolNamesToImport(sourceFile, program.getTypeChecker(), symbolToken, compilerOptions)); - const fix = getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName2, program); - const includeSymbolNameInDescription = symbolName2 !== symbolToken.text; - return fix && codeFixActionToCodeAction(codeActionForFix({ host, formatContext, preferences }, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences)); - } - function getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences) { - const packageJsonImportFilter = createPackageJsonImportFilter(sourceFile, preferences, host); - return getBestFix(getImportFixes(exportInfos, position, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes, sourceFile, program, packageJsonImportFilter, host); - } - function codeFixActionToCodeAction({ description: description3, changes, commands }) { - return { description: description3, changes, commands }; - } - function getAllExportInfoForSymbol(importingFile, symbol, symbolName2, moduleSymbol, preferCapitalized, program, host, preferences, cancellationToken) { - const getChecker = createGetChecker(program, host); - return getExportInfoMap(importingFile, host, program, preferences, cancellationToken).search(importingFile.path, preferCapitalized, (name) => name === symbolName2, (info) => { - if (skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson)) === symbol && info.some((i) => i.moduleSymbol === moduleSymbol || i.symbol.parent === moduleSymbol)) { - return info; - } - }); - } - function getSingleExportInfoForSymbol(symbol, symbolName2, moduleSymbol, program, host) { - var _a, _b; - const compilerOptions = program.getCompilerOptions(); - const mainProgramInfo = getInfoWithChecker( - program.getTypeChecker(), - /*isFromPackageJson*/ - false - ); - if (mainProgramInfo) { - return mainProgramInfo; - } - const autoImportProvider = (_b = (_a = host.getPackageJsonAutoImportProvider) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getTypeChecker(); - return Debug.checkDefined(autoImportProvider && getInfoWithChecker( - autoImportProvider, - /*isFromPackageJson*/ - true - ), `Could not find symbol in specified module for code actions`); - function getInfoWithChecker(checker, isFromPackageJson) { - const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions); - if (defaultInfo && skipAlias(defaultInfo.symbol, checker) === symbol) { - return { symbol: defaultInfo.symbol, moduleSymbol, moduleFileName: void 0, exportKind: defaultInfo.exportKind, targetFlags: skipAlias(symbol, checker).flags, isFromPackageJson }; - } - const named = checker.tryGetMemberInModuleExportsAndProperties(symbolName2, moduleSymbol); - if (named && skipAlias(named, checker) === symbol) { - return { symbol: named, moduleSymbol, moduleFileName: void 0, exportKind: 0 /* Named */, targetFlags: skipAlias(symbol, checker).flags, isFromPackageJson }; - } - } - } - function getImportFixes(exportInfos, usagePosition, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences, importMap = createExistingImportMap(program.getTypeChecker(), sourceFile, program.getCompilerOptions()), fromCacheOnly) { - const checker = program.getTypeChecker(); - const existingImports = flatMap(exportInfos, importMap.getImportsForExportInfo); - const useNamespace = usagePosition !== void 0 && tryUseExistingNamespaceImport(existingImports, usagePosition); - const addToExisting = tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, program.getCompilerOptions()); - if (addToExisting) { - return { - computedWithoutCacheCount: 0, - fixes: [...useNamespace ? [useNamespace] : emptyArray, addToExisting] - }; - } - const { fixes, computedWithoutCacheCount = 0 } = getFixesForAddImport( - exportInfos, - existingImports, - program, - sourceFile, - usagePosition, - isValidTypeOnlyUseSite, - useRequire, - host, - preferences, - fromCacheOnly - ); - return { - computedWithoutCacheCount, - fixes: [...useNamespace ? [useNamespace] : emptyArray, ...fixes] - }; - } - function tryUseExistingNamespaceImport(existingImports, position) { - return firstDefined(existingImports, ({ declaration, importKind }) => { - var _a; - if (importKind !== 0 /* Named */) - return void 0; - const namespacePrefix = getNamespaceLikeImportText(declaration); - const moduleSpecifier = namespacePrefix && ((_a = tryGetModuleSpecifierFromDeclaration(declaration)) == null ? void 0 : _a.text); - if (moduleSpecifier) { - return { kind: 0 /* UseNamespace */, namespacePrefix, usagePosition: position, moduleSpecifier }; - } - }); - } - function getNamespaceLikeImportText(declaration) { - var _a, _b, _c; - switch (declaration.kind) { - case 260 /* VariableDeclaration */: - return (_a = tryCast(declaration.name, isIdentifier)) == null ? void 0 : _a.text; - case 271 /* ImportEqualsDeclaration */: - return declaration.name.text; - case 272 /* ImportDeclaration */: - return (_c = tryCast((_b = declaration.importClause) == null ? void 0 : _b.namedBindings, isNamespaceImport)) == null ? void 0 : _c.name.text; - default: - return Debug.assertNever(declaration); - } - } - function getAddAsTypeOnly(isValidTypeOnlyUseSite, isForNewImportDeclaration, symbol, targetFlags, checker, compilerOptions) { - if (!isValidTypeOnlyUseSite) { - return 4 /* NotAllowed */; - } - if (isForNewImportDeclaration && compilerOptions.importsNotUsedAsValues === 2 /* Error */) { - return 2 /* Required */; - } - if (importNameElisionDisabled(compilerOptions) && (!(targetFlags & 111551 /* Value */) || !!checker.getTypeOnlyAliasDeclaration(symbol))) { - return 2 /* Required */; - } - return 1 /* Allowed */; - } - function tryAddToExistingImport(existingImports, isValidTypeOnlyUseSite, checker, compilerOptions) { - let best; - for (const existingImport of existingImports) { - const fix = getAddToExistingImportFix(existingImport); - if (!fix) - continue; - const isTypeOnly = isTypeOnlyImportDeclaration(fix.importClauseOrBindingPattern); - if (fix.addAsTypeOnly !== 4 /* NotAllowed */ && isTypeOnly || fix.addAsTypeOnly === 4 /* NotAllowed */ && !isTypeOnly) { - return fix; - } - best ?? (best = fix); - } - return best; - function getAddToExistingImportFix({ declaration, importKind, symbol, targetFlags }) { - if (importKind === 3 /* CommonJS */ || importKind === 2 /* Namespace */ || declaration.kind === 271 /* ImportEqualsDeclaration */) { - return void 0; - } - if (declaration.kind === 260 /* VariableDeclaration */) { - return (importKind === 0 /* Named */ || importKind === 1 /* Default */) && declaration.name.kind === 206 /* ObjectBindingPattern */ ? { kind: 2 /* AddToExisting */, importClauseOrBindingPattern: declaration.name, importKind, moduleSpecifier: declaration.initializer.arguments[0].text, addAsTypeOnly: 4 /* NotAllowed */ } : void 0; - } - const { importClause } = declaration; - if (!importClause || !isStringLiteralLike(declaration.moduleSpecifier)) { - return void 0; - } - const { name, namedBindings } = importClause; - if (importClause.isTypeOnly && !(importKind === 0 /* Named */ && namedBindings)) { - return void 0; - } - const addAsTypeOnly = getAddAsTypeOnly( - isValidTypeOnlyUseSite, - /*isForNewImportDeclaration*/ - false, - symbol, - targetFlags, - checker, - compilerOptions - ); - if (importKind === 1 /* Default */ && (name || // Cannot add a default import to a declaration that already has one - addAsTypeOnly === 2 /* Required */ && namedBindings)) { - return void 0; - } - if (importKind === 0 /* Named */ && (namedBindings == null ? void 0 : namedBindings.kind) === 274 /* NamespaceImport */) { - return void 0; - } - return { - kind: 2 /* AddToExisting */, - importClauseOrBindingPattern: importClause, - importKind, - moduleSpecifier: declaration.moduleSpecifier.text, - addAsTypeOnly - }; - } - } - function createExistingImportMap(checker, importingFile, compilerOptions) { - let importMap; - for (const moduleSpecifier of importingFile.imports) { - const i = importFromModuleSpecifier(moduleSpecifier); - if (isVariableDeclarationInitializedToRequire(i.parent)) { - const moduleSymbol = checker.resolveExternalModuleName(moduleSpecifier); - if (moduleSymbol) { - (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i.parent); - } - } else if (i.kind === 272 /* ImportDeclaration */ || i.kind === 271 /* ImportEqualsDeclaration */) { - const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); - if (moduleSymbol) { - (importMap || (importMap = createMultiMap())).add(getSymbolId(moduleSymbol), i); - } - } - } - return { - getImportsForExportInfo: ({ moduleSymbol, exportKind, targetFlags, symbol }) => { - if (!(targetFlags & 111551 /* Value */) && isSourceFileJS(importingFile)) - return emptyArray; - const matchingDeclarations = importMap == null ? void 0 : importMap.get(getSymbolId(moduleSymbol)); - if (!matchingDeclarations) - return emptyArray; - const importKind = getImportKind(importingFile, exportKind, compilerOptions); - return matchingDeclarations.map((declaration) => ({ declaration, importKind, symbol, targetFlags })); - } - }; - } - function shouldUseRequire(sourceFile, program) { - if (!isSourceFileJS(sourceFile)) { - return false; - } - if (sourceFile.commonJsModuleIndicator && !sourceFile.externalModuleIndicator) - return true; - if (sourceFile.externalModuleIndicator && !sourceFile.commonJsModuleIndicator) - return false; - const compilerOptions = program.getCompilerOptions(); - if (compilerOptions.configFile) { - return getEmitModuleKind(compilerOptions) < 5 /* ES2015 */; - } - if (sourceFile.impliedNodeFormat === 1 /* CommonJS */) - return true; - if (sourceFile.impliedNodeFormat === 99 /* ESNext */) - return false; - for (const otherFile of program.getSourceFiles()) { - if (otherFile === sourceFile || !isSourceFileJS(otherFile) || program.isSourceFileFromExternalLibrary(otherFile)) - continue; - if (otherFile.commonJsModuleIndicator && !otherFile.externalModuleIndicator) - return true; - if (otherFile.externalModuleIndicator && !otherFile.commonJsModuleIndicator) - return false; - } - return true; - } - function createGetChecker(program, host) { - return memoizeOne((isFromPackageJson) => isFromPackageJson ? host.getPackageJsonAutoImportProvider().getTypeChecker() : program.getTypeChecker()); - } - function getNewImportFixes(program, sourceFile, usagePosition, isValidTypeOnlyUseSite, useRequire, exportInfo, host, preferences, fromCacheOnly) { - const isJs = isSourceFileJS(sourceFile); - const compilerOptions = program.getCompilerOptions(); - const moduleSpecifierResolutionHost = createModuleSpecifierResolutionHost(program, host); - const getChecker = createGetChecker(program, host); - const moduleResolution = getEmitModuleResolutionKind(compilerOptions); - const rejectNodeModulesRelativePaths = moduleResolutionUsesNodeModules(moduleResolution); - const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences); - let computedWithoutCacheCount = 0; - const fixes = flatMap(exportInfo, (exportInfo2, i) => { - const checker = getChecker(exportInfo2.isFromPackageJson); - const { computedWithoutCache, moduleSpecifiers } = getModuleSpecifiers2(exportInfo2.moduleSymbol, checker); - const importedSymbolHasValueMeaning = !!(exportInfo2.targetFlags & 111551 /* Value */); - const addAsTypeOnly = getAddAsTypeOnly( - isValidTypeOnlyUseSite, - /*isForNewImportDeclaration*/ - true, - exportInfo2.symbol, - exportInfo2.targetFlags, - checker, - compilerOptions - ); - computedWithoutCacheCount += computedWithoutCache ? 1 : 0; - return mapDefined(moduleSpecifiers, (moduleSpecifier) => { - var _a; - if (rejectNodeModulesRelativePaths && pathContainsNodeModules(moduleSpecifier)) { - return void 0; - } - if (!importedSymbolHasValueMeaning && isJs && usagePosition !== void 0) { - return { kind: 1 /* JsdocTypeImport */, moduleSpecifier, usagePosition, exportInfo: exportInfo2, isReExport: i > 0 }; - } - const importKind = getImportKind(sourceFile, exportInfo2.exportKind, compilerOptions); - let qualification; - if (usagePosition !== void 0 && importKind === 3 /* CommonJS */ && exportInfo2.exportKind === 0 /* Named */) { - const exportEquals = checker.resolveExternalModuleSymbol(exportInfo2.moduleSymbol); - let namespacePrefix; - if (exportEquals !== exportInfo2.moduleSymbol) { - namespacePrefix = (_a = getDefaultExportInfoWorker(exportEquals, checker, compilerOptions)) == null ? void 0 : _a.name; - } - namespacePrefix || (namespacePrefix = moduleSymbolToValidIdentifier( - exportInfo2.moduleSymbol, - getEmitScriptTarget(compilerOptions), - /*forceCapitalize*/ - false - )); - qualification = { namespacePrefix, usagePosition }; - } - return { - kind: 3 /* AddNew */, - moduleSpecifier, - importKind, - useRequire, - addAsTypeOnly, - exportInfo: exportInfo2, - isReExport: i > 0, - qualification - }; - }); - }); - return { computedWithoutCacheCount, fixes }; - } - function getFixesForAddImport(exportInfos, existingImports, program, sourceFile, usagePosition, isValidTypeOnlyUseSite, useRequire, host, preferences, fromCacheOnly) { - const existingDeclaration = firstDefined(existingImports, (info) => newImportInfoFromExistingSpecifier(info, isValidTypeOnlyUseSite, useRequire, program.getTypeChecker(), program.getCompilerOptions())); - return existingDeclaration ? { fixes: [existingDeclaration] } : getNewImportFixes(program, sourceFile, usagePosition, isValidTypeOnlyUseSite, useRequire, exportInfos, host, preferences, fromCacheOnly); - } - function newImportInfoFromExistingSpecifier({ declaration, importKind, symbol, targetFlags }, isValidTypeOnlyUseSite, useRequire, checker, compilerOptions) { - var _a; - const moduleSpecifier = (_a = tryGetModuleSpecifierFromDeclaration(declaration)) == null ? void 0 : _a.text; - if (moduleSpecifier) { - const addAsTypeOnly = useRequire ? 4 /* NotAllowed */ : getAddAsTypeOnly( - isValidTypeOnlyUseSite, - /*isForNewImportDeclaration*/ - true, - symbol, - targetFlags, - checker, - compilerOptions - ); - return { kind: 3 /* AddNew */, moduleSpecifier, importKind, addAsTypeOnly, useRequire }; - } - } - function getFixInfos(context, errorCode, pos, useAutoImportProvider) { - const symbolToken = getTokenAtPosition(context.sourceFile, pos); - let info; - if (errorCode === Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) { - info = getFixesInfoForUMDImport(context, symbolToken); - } else if (!isIdentifier(symbolToken)) { - return void 0; - } else if (errorCode === Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code) { - const symbolName2 = single(getSymbolNamesToImport(context.sourceFile, context.program.getTypeChecker(), symbolToken, context.program.getCompilerOptions())); - const fix = getTypeOnlyPromotionFix(context.sourceFile, symbolToken, symbolName2, context.program); - return fix && [{ fix, symbolName: symbolName2, errorIdentifierText: symbolToken.text }]; - } else { - info = getFixesInfoForNonUMDImport(context, symbolToken, useAutoImportProvider); - } - const packageJsonImportFilter = createPackageJsonImportFilter(context.sourceFile, context.preferences, context.host); - return info && sortFixInfo(info, context.sourceFile, context.program, packageJsonImportFilter, context.host); - } - function sortFixInfo(fixes, sourceFile, program, packageJsonImportFilter, host) { - const _toPath = (fileName) => toPath(fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host)); - return sort(fixes, (a, b) => compareBooleans(!!a.isJsxNamespaceFix, !!b.isJsxNamespaceFix) || compareValues(a.fix.kind, b.fix.kind) || compareModuleSpecifiers(a.fix, b.fix, sourceFile, program, packageJsonImportFilter.allowsImportingSpecifier, _toPath)); - } - function getBestFix(fixes, sourceFile, program, packageJsonImportFilter, host) { - if (!some(fixes)) - return; - if (fixes[0].kind === 0 /* UseNamespace */ || fixes[0].kind === 2 /* AddToExisting */) { - return fixes[0]; - } - return fixes.reduce( - (best, fix) => ( - // Takes true branch of conditional if `fix` is better than `best` - compareModuleSpecifiers( - fix, - best, - sourceFile, - program, - packageJsonImportFilter.allowsImportingSpecifier, - (fileName) => toPath(fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host)) - ) === -1 /* LessThan */ ? fix : best - ) - ); - } - function compareModuleSpecifiers(a, b, importingFile, program, allowsImportingSpecifier, toPath3) { - if (a.kind !== 0 /* UseNamespace */ && b.kind !== 0 /* UseNamespace */) { - return compareBooleans(allowsImportingSpecifier(b.moduleSpecifier), allowsImportingSpecifier(a.moduleSpecifier)) || compareNodeCoreModuleSpecifiers(a.moduleSpecifier, b.moduleSpecifier, importingFile, program) || compareBooleans( - isFixPossiblyReExportingImportingFile(a, importingFile, program.getCompilerOptions(), toPath3), - isFixPossiblyReExportingImportingFile(b, importingFile, program.getCompilerOptions(), toPath3) - ) || compareNumberOfDirectorySeparators(a.moduleSpecifier, b.moduleSpecifier); - } - return 0 /* EqualTo */; - } - function isFixPossiblyReExportingImportingFile(fix, importingFile, compilerOptions, toPath3) { - var _a; - if (fix.isReExport && ((_a = fix.exportInfo) == null ? void 0 : _a.moduleFileName) && getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */ && isIndexFileName(fix.exportInfo.moduleFileName)) { - const reExportDir = toPath3(getDirectoryPath(fix.exportInfo.moduleFileName)); - return startsWith(importingFile.path, reExportDir); - } - return false; - } - function isIndexFileName(fileName) { - return getBaseFileName( - fileName, - [".js", ".jsx", ".d.ts", ".ts", ".tsx"], - /*ignoreCase*/ - true - ) === "index"; - } - function compareNodeCoreModuleSpecifiers(a, b, importingFile, program) { - if (startsWith(a, "node:") && !startsWith(b, "node:")) - return shouldUseUriStyleNodeCoreModules(importingFile, program) ? -1 /* LessThan */ : 1 /* GreaterThan */; - if (startsWith(b, "node:") && !startsWith(a, "node:")) - return shouldUseUriStyleNodeCoreModules(importingFile, program) ? 1 /* GreaterThan */ : -1 /* LessThan */; - return 0 /* EqualTo */; - } - function getFixesInfoForUMDImport({ sourceFile, program, host, preferences }, token) { - const checker = program.getTypeChecker(); - const umdSymbol = getUmdSymbol(token, checker); - if (!umdSymbol) - return void 0; - const symbol = checker.getAliasedSymbol(umdSymbol); - const symbolName2 = umdSymbol.name; - const exportInfo = [{ symbol: umdSymbol, moduleSymbol: symbol, moduleFileName: void 0, exportKind: 3 /* UMD */, targetFlags: symbol.flags, isFromPackageJson: false }]; - const useRequire = shouldUseRequire(sourceFile, program); - const fixes = getImportFixes( - exportInfo, - /*usagePosition*/ - void 0, - /*isValidTypeOnlyUseSite*/ - false, - useRequire, - program, - sourceFile, - host, - preferences - ).fixes; - return fixes.map((fix) => { - var _a; - return { fix, symbolName: symbolName2, errorIdentifierText: (_a = tryCast(token, isIdentifier)) == null ? void 0 : _a.text }; - }); - } - function getUmdSymbol(token, checker) { - const umdSymbol = isIdentifier(token) ? checker.getSymbolAtLocation(token) : void 0; - if (isUMDExportSymbol(umdSymbol)) - return umdSymbol; - const { parent: parent2 } = token; - if (isJsxOpeningLikeElement(parent2) && parent2.tagName === token || isJsxOpeningFragment(parent2)) { - const parentSymbol = checker.resolveName( - checker.getJsxNamespace(parent2), - isJsxOpeningLikeElement(parent2) ? token : parent2, - 111551 /* Value */, - /*excludeGlobals*/ - false - ); - if (isUMDExportSymbol(parentSymbol)) { - return parentSymbol; - } - } - return void 0; - } - function getImportKind(importingFile, exportKind, compilerOptions, forceImportKeyword) { - if (compilerOptions.verbatimModuleSyntax && (getEmitModuleKind(compilerOptions) === 1 /* CommonJS */ || importingFile.impliedNodeFormat === 1 /* CommonJS */)) { - return 3 /* CommonJS */; - } - switch (exportKind) { - case 0 /* Named */: - return 0 /* Named */; - case 1 /* Default */: - return 1 /* Default */; - case 2 /* ExportEquals */: - return getExportEqualsImportKind(importingFile, compilerOptions, !!forceImportKeyword); - case 3 /* UMD */: - return getUmdImportKind(importingFile, compilerOptions, !!forceImportKeyword); - default: - return Debug.assertNever(exportKind); - } - } - function getUmdImportKind(importingFile, compilerOptions, forceImportKeyword) { - if (getAllowSyntheticDefaultImports(compilerOptions)) { - return 1 /* Default */; - } - const moduleKind = getEmitModuleKind(compilerOptions); - switch (moduleKind) { - case 2 /* AMD */: - case 1 /* CommonJS */: - case 3 /* UMD */: - if (isInJSFile(importingFile)) { - return isExternalModule(importingFile) || forceImportKeyword ? 2 /* Namespace */ : 3 /* CommonJS */; - } - return 3 /* CommonJS */; - case 4 /* System */: - case 5 /* ES2015 */: - case 6 /* ES2020 */: - case 7 /* ES2022 */: - case 99 /* ESNext */: - case 0 /* None */: - return 2 /* Namespace */; - case 100 /* Node16 */: - case 199 /* NodeNext */: - return importingFile.impliedNodeFormat === 99 /* ESNext */ ? 2 /* Namespace */ : 3 /* CommonJS */; - default: - return Debug.assertNever(moduleKind, `Unexpected moduleKind ${moduleKind}`); - } - } - function getFixesInfoForNonUMDImport({ sourceFile, program, cancellationToken, host, preferences }, symbolToken, useAutoImportProvider) { - const checker = program.getTypeChecker(); - const compilerOptions = program.getCompilerOptions(); - return flatMap(getSymbolNamesToImport(sourceFile, checker, symbolToken, compilerOptions), (symbolName2) => { - if (symbolName2 === "default" /* Default */) { - return void 0; - } - const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(symbolToken); - const useRequire = shouldUseRequire(sourceFile, program); - const exportInfo = getExportInfos(symbolName2, isJSXTagName(symbolToken), getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, program, useAutoImportProvider, host, preferences); - return arrayFrom( - flatMapIterator(exportInfo.values(), (exportInfos) => getImportFixes(exportInfos, symbolToken.getStart(sourceFile), isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes), - (fix) => ({ fix, symbolName: symbolName2, errorIdentifierText: symbolToken.text, isJsxNamespaceFix: symbolName2 !== symbolToken.text }) - ); - }); - } - function getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName2, program) { - const checker = program.getTypeChecker(); - const symbol = checker.resolveName( - symbolName2, - symbolToken, - 111551 /* Value */, - /*excludeGlobals*/ - true - ); - if (!symbol) - return void 0; - const typeOnlyAliasDeclaration = checker.getTypeOnlyAliasDeclaration(symbol); - if (!typeOnlyAliasDeclaration || getSourceFileOfNode(typeOnlyAliasDeclaration) !== sourceFile) - return void 0; - return { kind: 4 /* PromoteTypeOnly */, typeOnlyAliasDeclaration }; - } - function getSymbolNamesToImport(sourceFile, checker, symbolToken, compilerOptions) { - const parent2 = symbolToken.parent; - if ((isJsxOpeningLikeElement(parent2) || isJsxClosingElement(parent2)) && parent2.tagName === symbolToken && jsxModeNeedsExplicitImport(compilerOptions.jsx)) { - const jsxNamespace = checker.getJsxNamespace(sourceFile); - if (needsJsxNamespaceFix(jsxNamespace, symbolToken, checker)) { - const needsComponentNameFix = !isIntrinsicJsxName(symbolToken.text) && !checker.resolveName( - symbolToken.text, - symbolToken, - 111551 /* Value */, - /*excludeGlobals*/ - false - ); - return needsComponentNameFix ? [symbolToken.text, jsxNamespace] : [jsxNamespace]; - } - } - return [symbolToken.text]; - } - function needsJsxNamespaceFix(jsxNamespace, symbolToken, checker) { - if (isIntrinsicJsxName(symbolToken.text)) - return true; - const namespaceSymbol = checker.resolveName( - jsxNamespace, - symbolToken, - 111551 /* Value */, - /*excludeGlobals*/ - true - ); - return !namespaceSymbol || some(namespaceSymbol.declarations, isTypeOnlyImportOrExportDeclaration) && !(namespaceSymbol.flags & 111551 /* Value */); - } - function getExportInfos(symbolName2, isJsxTagName, currentTokenMeaning, cancellationToken, fromFile, program, useAutoImportProvider, host, preferences) { - var _a; - const originalSymbolToExportInfos = createMultiMap(); - const packageJsonFilter = createPackageJsonImportFilter(fromFile, preferences, host); - const moduleSpecifierCache = (_a = host.getModuleSpecifierCache) == null ? void 0 : _a.call(host); - const getModuleSpecifierResolutionHost = memoizeOne((isFromPackageJson) => { - return createModuleSpecifierResolutionHost(isFromPackageJson ? host.getPackageJsonAutoImportProvider() : program, host); - }); - function addSymbol(moduleSymbol, toFile, exportedSymbol, exportKind, program2, isFromPackageJson) { - const moduleSpecifierResolutionHost = getModuleSpecifierResolutionHost(isFromPackageJson); - if (toFile && isImportableFile(program2, fromFile, toFile, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache) || !toFile && packageJsonFilter.allowsImportingAmbientModule(moduleSymbol, moduleSpecifierResolutionHost)) { - const checker = program2.getTypeChecker(); - originalSymbolToExportInfos.add(getUniqueSymbolId(exportedSymbol, checker).toString(), { symbol: exportedSymbol, moduleSymbol, moduleFileName: toFile == null ? void 0 : toFile.fileName, exportKind, targetFlags: skipAlias(exportedSymbol, checker).flags, isFromPackageJson }); - } - } - forEachExternalModuleToImportFrom(program, host, preferences, useAutoImportProvider, (moduleSymbol, sourceFile, program2, isFromPackageJson) => { - const checker = program2.getTypeChecker(); - cancellationToken.throwIfCancellationRequested(); - const compilerOptions = program2.getCompilerOptions(); - const defaultInfo = getDefaultLikeExportInfo(moduleSymbol, checker, compilerOptions); - if (defaultInfo && (defaultInfo.name === symbolName2 || moduleSymbolToValidIdentifier(moduleSymbol, getEmitScriptTarget(compilerOptions), isJsxTagName) === symbolName2) && symbolHasMeaning(defaultInfo.resolvedSymbol, currentTokenMeaning)) { - addSymbol(moduleSymbol, sourceFile, defaultInfo.symbol, defaultInfo.exportKind, program2, isFromPackageJson); - } - const exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExportsAndProperties(symbolName2, moduleSymbol); - if (exportSymbolWithIdenticalName && symbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) { - addSymbol(moduleSymbol, sourceFile, exportSymbolWithIdenticalName, 0 /* Named */, program2, isFromPackageJson); - } - }); - return originalSymbolToExportInfos; - } - function getExportEqualsImportKind(importingFile, compilerOptions, forceImportKeyword) { - const allowSyntheticDefaults = getAllowSyntheticDefaultImports(compilerOptions); - const isJS = isInJSFile(importingFile); - if (!isJS && getEmitModuleKind(compilerOptions) >= 5 /* ES2015 */) { - return allowSyntheticDefaults ? 1 /* Default */ : 2 /* Namespace */; - } - if (isJS) { - return isExternalModule(importingFile) || forceImportKeyword ? allowSyntheticDefaults ? 1 /* Default */ : 2 /* Namespace */ : 3 /* CommonJS */; - } - for (const statement of importingFile.statements) { - if (isImportEqualsDeclaration(statement) && !nodeIsMissing(statement.moduleReference)) { - return 3 /* CommonJS */; - } - } - return allowSyntheticDefaults ? 1 /* Default */ : 3 /* CommonJS */; - } - function codeActionForFix(context, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences) { - let diag2; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { - diag2 = codeActionForFixWorker(tracker, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences); - }); - return createCodeFixAction(importFixName, changes, diag2, importFixId, Diagnostics.Add_all_missing_imports); - } - function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences) { - const quotePreference = getQuotePreference(sourceFile, preferences); - switch (fix.kind) { - case 0 /* UseNamespace */: - addNamespaceQualifier(changes, sourceFile, fix); - return [Diagnostics.Change_0_to_1, symbolName2, `${fix.namespacePrefix}.${symbolName2}`]; - case 1 /* JsdocTypeImport */: - addImportType(changes, sourceFile, fix, quotePreference); - return [Diagnostics.Change_0_to_1, symbolName2, getImportTypePrefix(fix.moduleSpecifier, quotePreference) + symbolName2]; - case 2 /* AddToExisting */: { - const { importClauseOrBindingPattern, importKind, addAsTypeOnly, moduleSpecifier } = fix; - doAddExistingFix( - changes, - sourceFile, - importClauseOrBindingPattern, - importKind === 1 /* Default */ ? { name: symbolName2, addAsTypeOnly } : void 0, - importKind === 0 /* Named */ ? [{ name: symbolName2, addAsTypeOnly }] : emptyArray, - preferences - ); - const moduleSpecifierWithoutQuotes = stripQuotes(moduleSpecifier); - return includeSymbolNameInDescription ? [Diagnostics.Import_0_from_1, symbolName2, moduleSpecifierWithoutQuotes] : [Diagnostics.Update_import_from_0, moduleSpecifierWithoutQuotes]; - } - case 3 /* AddNew */: { - const { importKind, moduleSpecifier, addAsTypeOnly, useRequire, qualification } = fix; - const getDeclarations = useRequire ? getNewRequires : getNewImports; - const defaultImport = importKind === 1 /* Default */ ? { name: symbolName2, addAsTypeOnly } : void 0; - const namedImports = importKind === 0 /* Named */ ? [{ name: symbolName2, addAsTypeOnly }] : void 0; - const namespaceLikeImport = importKind === 2 /* Namespace */ || importKind === 3 /* CommonJS */ ? { importKind, name: (qualification == null ? void 0 : qualification.namespacePrefix) || symbolName2, addAsTypeOnly } : void 0; - insertImports( - changes, - sourceFile, - getDeclarations( - moduleSpecifier, - quotePreference, - defaultImport, - namedImports, - namespaceLikeImport, - compilerOptions - ), - /*blankLineBetween*/ - true, - preferences - ); - if (qualification) { - addNamespaceQualifier(changes, sourceFile, qualification); - } - return includeSymbolNameInDescription ? [Diagnostics.Import_0_from_1, symbolName2, moduleSpecifier] : [Diagnostics.Add_import_from_0, moduleSpecifier]; - } - case 4 /* PromoteTypeOnly */: { - const { typeOnlyAliasDeclaration } = fix; - const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile, preferences); - return promotedDeclaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; - } - default: - return Debug.assertNever(fix, `Unexpected fix kind ${fix.kind}`); - } - } - function getModuleSpecifierText(promotedDeclaration) { - var _a, _b; - return promotedDeclaration.kind === 271 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; - } - function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceFile, preferences) { - const convertExistingToTypeOnly = importNameElisionDisabled(compilerOptions); - switch (aliasDeclaration.kind) { - case 276 /* ImportSpecifier */: - if (aliasDeclaration.isTypeOnly) { - const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences); - if (aliasDeclaration.parent.elements.length > 1 && sortKind) { - changes.delete(sourceFile, aliasDeclaration); - const newSpecifier = factory.updateImportSpecifier( - aliasDeclaration, - /*isTypeOnly*/ - false, - aliasDeclaration.propertyName, - aliasDeclaration.name - ); - const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); - const insertionIndex = ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(aliasDeclaration.parent.elements, newSpecifier, comparer); - changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex); - } else { - changes.deleteRange(sourceFile, aliasDeclaration.getFirstToken()); - } - return aliasDeclaration; - } else { - Debug.assert(aliasDeclaration.parent.parent.isTypeOnly); - promoteImportClause(aliasDeclaration.parent.parent); - return aliasDeclaration.parent.parent; - } - case 273 /* ImportClause */: - promoteImportClause(aliasDeclaration); - return aliasDeclaration; - case 274 /* NamespaceImport */: - promoteImportClause(aliasDeclaration.parent); - return aliasDeclaration.parent; - case 271 /* ImportEqualsDeclaration */: - changes.deleteRange(sourceFile, aliasDeclaration.getChildAt(1)); - return aliasDeclaration; - default: - Debug.failBadSyntaxKind(aliasDeclaration); - } - function promoteImportClause(importClause) { - changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile)); - if (!compilerOptions.allowImportingTsExtensions) { - const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent); - const resolvedModule = moduleSpecifier && getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); - if (resolvedModule == null ? void 0 : resolvedModule.resolvedUsingTsExtension) { - const changedExtension = changeAnyExtension(moduleSpecifier.text, getOutputExtension(moduleSpecifier.text, compilerOptions)); - changes.replaceNode(sourceFile, moduleSpecifier, factory.createStringLiteral(changedExtension)); - } - } - if (convertExistingToTypeOnly) { - const namedImports = tryCast(importClause.namedBindings, isNamedImports); - if (namedImports && namedImports.elements.length > 1) { - if (ts_OrganizeImports_exports.detectImportSpecifierSorting(namedImports.elements, preferences) && aliasDeclaration.kind === 276 /* ImportSpecifier */ && namedImports.elements.indexOf(aliasDeclaration) !== 0) { - changes.delete(sourceFile, aliasDeclaration); - changes.insertImportSpecifierAtIndex(sourceFile, aliasDeclaration, namedImports, 0); - } - for (const element of namedImports.elements) { - if (element !== aliasDeclaration && !element.isTypeOnly) { - changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, element); - } - } - } - } - } - } - function doAddExistingFix(changes, sourceFile, clause, defaultImport, namedImports, preferences) { - var _a; - if (clause.kind === 206 /* ObjectBindingPattern */) { - if (defaultImport) { - addElementToBindingPattern(clause, defaultImport.name, "default"); - } - for (const specifier of namedImports) { - addElementToBindingPattern( - clause, - specifier.name, - /*propertyName*/ - void 0 - ); - } - return; - } - const promoteFromTypeOnly2 = clause.isTypeOnly && some([defaultImport, ...namedImports], (i) => (i == null ? void 0 : i.addAsTypeOnly) === 4 /* NotAllowed */); - const existingSpecifiers = clause.namedBindings && ((_a = tryCast(clause.namedBindings, isNamedImports)) == null ? void 0 : _a.elements); - if (defaultImport) { - Debug.assert(!clause.name, "Cannot add a default import to an import clause that already has one"); - changes.insertNodeAt(sourceFile, clause.getStart(sourceFile), factory.createIdentifier(defaultImport.name), { suffix: ", " }); - } - if (namedImports.length) { - let ignoreCaseForSorting; - if (typeof preferences.organizeImportsIgnoreCase === "boolean") { - ignoreCaseForSorting = preferences.organizeImportsIgnoreCase; - } else if (existingSpecifiers) { - const targetImportSorting = ts_OrganizeImports_exports.detectImportSpecifierSorting(existingSpecifiers, preferences); - if (targetImportSorting !== 3 /* Both */) { - ignoreCaseForSorting = targetImportSorting === 2 /* CaseInsensitive */; - } - } - if (ignoreCaseForSorting === void 0) { - ignoreCaseForSorting = ts_OrganizeImports_exports.detectSorting(sourceFile, preferences) === 2 /* CaseInsensitive */; - } - const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, ignoreCaseForSorting); - const newSpecifiers = stableSort( - namedImports.map((namedImport) => factory.createImportSpecifier( - (!clause.isTypeOnly || promoteFromTypeOnly2) && needsTypeOnly(namedImport), - /*propertyName*/ - void 0, - factory.createIdentifier(namedImport.name) - )), - (s1, s2) => ts_OrganizeImports_exports.compareImportOrExportSpecifiers(s1, s2, comparer) - ); - const specifierSort = (existingSpecifiers == null ? void 0 : existingSpecifiers.length) && ts_OrganizeImports_exports.detectImportSpecifierSorting(existingSpecifiers, preferences); - if (specifierSort && !(ignoreCaseForSorting && specifierSort === 1 /* CaseSensitive */)) { - for (const spec of newSpecifiers) { - const insertionIndex = promoteFromTypeOnly2 && !spec.isTypeOnly ? 0 : ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(existingSpecifiers, spec, comparer); - changes.insertImportSpecifierAtIndex(sourceFile, spec, clause.namedBindings, insertionIndex); - } - } else if (existingSpecifiers == null ? void 0 : existingSpecifiers.length) { - for (const spec of newSpecifiers) { - changes.insertNodeInListAfter(sourceFile, last(existingSpecifiers), spec, existingSpecifiers); - } - } else { - if (newSpecifiers.length) { - const namedImports2 = factory.createNamedImports(newSpecifiers); - if (clause.namedBindings) { - changes.replaceNode(sourceFile, clause.namedBindings, namedImports2); - } else { - changes.insertNodeAfter(sourceFile, Debug.checkDefined(clause.name, "Import clause must have either named imports or a default import"), namedImports2); - } - } - } - } - if (promoteFromTypeOnly2) { - changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(clause, sourceFile)); - if (existingSpecifiers) { - for (const specifier of existingSpecifiers) { - changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, specifier); - } - } - } - function addElementToBindingPattern(bindingPattern, name, propertyName) { - const element = factory.createBindingElement( - /*dotDotDotToken*/ - void 0, - propertyName, - name - ); - if (bindingPattern.elements.length) { - changes.insertNodeInListAfter(sourceFile, last(bindingPattern.elements), element); - } else { - changes.replaceNode(sourceFile, bindingPattern, factory.createObjectBindingPattern([element])); - } - } - } - function addNamespaceQualifier(changes, sourceFile, { namespacePrefix, usagePosition }) { - changes.insertText(sourceFile, usagePosition, namespacePrefix + "."); - } - function addImportType(changes, sourceFile, { moduleSpecifier, usagePosition: position }, quotePreference) { - changes.insertText(sourceFile, position, getImportTypePrefix(moduleSpecifier, quotePreference)); - } - function getImportTypePrefix(moduleSpecifier, quotePreference) { - const quote2 = getQuoteFromPreference(quotePreference); - return `import(${quote2}${moduleSpecifier}${quote2}).`; - } - function needsTypeOnly({ addAsTypeOnly }) { - return addAsTypeOnly === 2 /* Required */; - } - function getNewImports(moduleSpecifier, quotePreference, defaultImport, namedImports, namespaceLikeImport, compilerOptions) { - const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference); - let statements; - if (defaultImport !== void 0 || (namedImports == null ? void 0 : namedImports.length)) { - const topLevelTypeOnly = (!defaultImport || needsTypeOnly(defaultImport)) && every(namedImports, needsTypeOnly) || compilerOptions.verbatimModuleSyntax && (defaultImport == null ? void 0 : defaultImport.addAsTypeOnly) !== 4 /* NotAllowed */ && !some(namedImports, (i) => i.addAsTypeOnly === 4 /* NotAllowed */); - statements = combine(statements, makeImport( - defaultImport && factory.createIdentifier(defaultImport.name), - namedImports == null ? void 0 : namedImports.map(({ addAsTypeOnly, name }) => factory.createImportSpecifier( - !topLevelTypeOnly && addAsTypeOnly === 2 /* Required */, - /*propertyName*/ - void 0, - factory.createIdentifier(name) - )), - moduleSpecifier, - quotePreference, - topLevelTypeOnly - )); - } - if (namespaceLikeImport) { - const declaration = namespaceLikeImport.importKind === 3 /* CommonJS */ ? factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - needsTypeOnly(namespaceLikeImport), - factory.createIdentifier(namespaceLikeImport.name), - factory.createExternalModuleReference(quotedModuleSpecifier) - ) : factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - needsTypeOnly(namespaceLikeImport), - /*name*/ - void 0, - factory.createNamespaceImport(factory.createIdentifier(namespaceLikeImport.name)) - ), - quotedModuleSpecifier, - /*assertClause*/ - void 0 - ); - statements = combine(statements, declaration); - } - return Debug.checkDefined(statements); - } - function getNewRequires(moduleSpecifier, quotePreference, defaultImport, namedImports, namespaceLikeImport) { - const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference); - let statements; - if (defaultImport || (namedImports == null ? void 0 : namedImports.length)) { - const bindingElements = (namedImports == null ? void 0 : namedImports.map(({ name }) => factory.createBindingElement( - /*dotDotDotToken*/ - void 0, - /*propertyName*/ - void 0, - name - ))) || []; - if (defaultImport) { - bindingElements.unshift(factory.createBindingElement( - /*dotDotDotToken*/ - void 0, - "default", - defaultImport.name - )); - } - const declaration = createConstEqualsRequireDeclaration(factory.createObjectBindingPattern(bindingElements), quotedModuleSpecifier); - statements = combine(statements, declaration); - } - if (namespaceLikeImport) { - const declaration = createConstEqualsRequireDeclaration(namespaceLikeImport.name, quotedModuleSpecifier); - statements = combine(statements, declaration); - } - return Debug.checkDefined(statements); - } - function createConstEqualsRequireDeclaration(name, quotedModuleSpecifier) { - return factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList( - [ - factory.createVariableDeclaration( - typeof name === "string" ? factory.createIdentifier(name) : name, - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - factory.createCallExpression( - factory.createIdentifier("require"), - /*typeArguments*/ - void 0, - [quotedModuleSpecifier] - ) - ) - ], - 2 /* Const */ - ) - ); - } - function symbolHasMeaning({ declarations }, meaning) { - return some(declarations, (decl) => !!(getMeaningFromDeclaration(decl) & meaning)); - } - function moduleSymbolToValidIdentifier(moduleSymbol, target, forceCapitalize) { - return moduleSpecifierToValidIdentifier(removeFileExtension(stripQuotes(moduleSymbol.name)), target, forceCapitalize); - } - function moduleSpecifierToValidIdentifier(moduleSpecifier, target, forceCapitalize) { - const baseName = getBaseFileName(removeSuffix(moduleSpecifier, "/index")); - let res = ""; - let lastCharWasValid = true; - const firstCharCode = baseName.charCodeAt(0); - if (isIdentifierStart(firstCharCode, target)) { - res += String.fromCharCode(firstCharCode); - if (forceCapitalize) { - res = res.toUpperCase(); - } - } else { - lastCharWasValid = false; - } - for (let i = 1; i < baseName.length; i++) { - const ch = baseName.charCodeAt(i); - const isValid = isIdentifierPart(ch, target); - if (isValid) { - let char = String.fromCharCode(ch); - if (!lastCharWasValid) { - char = char.toUpperCase(); - } - res += char; - } - lastCharWasValid = isValid; - } - return !isStringANonContextualKeyword(res) ? res || "_" : `_${res}`; - } - var importFixName, importFixId, errorCodes18; - var init_importFixes = __esm({ - "src/services/codefixes/importFixes.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - importFixName = "import"; - importFixId = "fixMissingImport"; - errorCodes18 = [ - Diagnostics.Cannot_find_name_0.code, - Diagnostics.Cannot_find_name_0_Did_you_mean_1.code, - Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, - Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code, - Diagnostics.Cannot_find_namespace_0.code, - Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code, - Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here.code, - Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer.code, - Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type.code - ]; - registerCodeFix({ - errorCodes: errorCodes18, - getCodeActions(context) { - const { errorCode, preferences, sourceFile, span, program } = context; - const info = getFixInfos( - context, - errorCode, - span.start, - /*useAutoImportProvider*/ - true - ); - if (!info) - return void 0; - return info.map(({ fix, symbolName: symbolName2, errorIdentifierText }) => codeActionForFix( - context, - sourceFile, - symbolName2, - fix, - /*includeSymbolNameInDescription*/ - symbolName2 !== errorIdentifierText, - program.getCompilerOptions(), - preferences - )); - }, - fixIds: [importFixId], - getAllCodeActions: (context) => { - const { sourceFile, program, preferences, host, cancellationToken } = context; - const importAdder = createImportAdderWorker( - sourceFile, - program, - /*useAutoImportProvider*/ - true, - preferences, - host, - cancellationToken - ); - eachDiagnostic(context, errorCodes18, (diag2) => importAdder.addImportFromDiagnostic(diag2, context)); - return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, importAdder.writeFixes)); - } - }); - } - }); - - // src/services/codefixes/fixAddMissingConstraint.ts - function getInfo6(program, sourceFile, span) { - const diag2 = find(program.getSemanticDiagnostics(sourceFile), (diag3) => diag3.start === span.start && diag3.length === span.length); - if (diag2 === void 0 || diag2.relatedInformation === void 0) - return; - const related = find(diag2.relatedInformation, (related2) => related2.code === Diagnostics.This_type_parameter_might_need_an_extends_0_constraint.code); - if (related === void 0 || related.file === void 0 || related.start === void 0 || related.length === void 0) - return; - let declaration = findAncestorMatchingSpan(related.file, createTextSpan(related.start, related.length)); - if (declaration === void 0) - return; - if (isIdentifier(declaration) && isTypeParameterDeclaration(declaration.parent)) { - declaration = declaration.parent; - } - if (isTypeParameterDeclaration(declaration)) { - if (isMappedTypeNode(declaration.parent)) - return; - const token = getTokenAtPosition(sourceFile, span.start); - const checker = program.getTypeChecker(); - const constraint = tryGetConstraintType(checker, token) || tryGetConstraintFromDiagnosticMessage(related.messageText); - return { constraint, declaration, token }; - } - return void 0; - } - function addMissingConstraint(changes, program, preferences, host, sourceFile, info) { - const { declaration, constraint } = info; - const checker = program.getTypeChecker(); - if (isString(constraint)) { - changes.insertText(sourceFile, declaration.name.end, ` extends ${constraint}`); - } else { - const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); - const tracker = getNoopSymbolTrackerWithResolver({ program, host }); - const importAdder = createImportAdder(sourceFile, program, preferences, host); - const typeNode = typeToAutoImportableTypeNode( - checker, - importAdder, - constraint, - /*contextNode*/ - void 0, - scriptTarget, - /*flags*/ - void 0, - tracker - ); - if (typeNode) { - changes.replaceNode(sourceFile, declaration, factory.updateTypeParameterDeclaration( - declaration, - /*modifiers*/ - void 0, - declaration.name, - typeNode, - declaration.default - )); - importAdder.writeFixes(changes); - } - } - } - function tryGetConstraintFromDiagnosticMessage(messageText) { - const [_, constraint] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/`extends (.*)`/) || []; - return constraint; - } - function tryGetConstraintType(checker, node) { - if (isTypeNode(node.parent)) { - return checker.getTypeArgumentConstraint(node.parent); - } - const contextualType = isExpression(node) ? checker.getContextualType(node) : void 0; - return contextualType || checker.getTypeAtLocation(node); - } - var fixId17, errorCodes19; - var init_fixAddMissingConstraint = __esm({ - "src/services/codefixes/fixAddMissingConstraint.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId17 = "addMissingConstraint"; - errorCodes19 = [ - // We want errors this could be attached to: - // Diagnostics.This_type_parameter_probably_needs_an_extends_0_constraint - Diagnostics.Type_0_is_not_comparable_to_type_1.code, - Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code, - Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, - Diagnostics.Type_0_is_not_assignable_to_type_1.code, - Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties.code, - Diagnostics.Property_0_is_incompatible_with_index_signature.code, - Diagnostics.Property_0_in_type_1_is_not_assignable_to_type_2.code, - Diagnostics.Type_0_does_not_satisfy_the_constraint_1.code - ]; - registerCodeFix({ - errorCodes: errorCodes19, - getCodeActions(context) { - const { sourceFile, span, program, preferences, host } = context; - const info = getInfo6(program, sourceFile, span); - if (info === void 0) - return; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingConstraint(t, program, preferences, host, sourceFile, info)); - return [createCodeFixAction(fixId17, changes, Diagnostics.Add_extends_constraint, fixId17, Diagnostics.Add_extends_constraint_to_all_type_parameters)]; - }, - fixIds: [fixId17], - getAllCodeActions: (context) => { - const { program, preferences, host } = context; - const seen = /* @__PURE__ */ new Map(); - return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - eachDiagnostic(context, errorCodes19, (diag2) => { - const info = getInfo6(program, diag2.file, createTextSpan(diag2.start, diag2.length)); - if (info) { - if (addToSeen(seen, getNodeId(info.declaration))) { - return addMissingConstraint(changes, program, preferences, host, diag2.file, info); - } - } - return void 0; - }); - })); - } - }); - } - }); - - // src/services/codefixes/fixOverrideModifier.ts - function dispatchChanges(changeTracker, context, errorCode, pos) { - switch (errorCode) { - case Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code: - case Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code: - case Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code: - case Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code: - case Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code: - return doAddOverrideModifierChange(changeTracker, context.sourceFile, pos); - case Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code: - case Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code: - case Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code: - case Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code: - return doRemoveOverrideModifierChange(changeTracker, context.sourceFile, pos); - default: - Debug.fail("Unexpected error code: " + errorCode); - } - } - function doAddOverrideModifierChange(changeTracker, sourceFile, pos) { - const classElement = findContainerClassElementLike(sourceFile, pos); - if (isSourceFileJS(sourceFile)) { - changeTracker.addJSDocTags(sourceFile, classElement, [factory.createJSDocOverrideTag(factory.createIdentifier("override"))]); - return; - } - const modifiers = classElement.modifiers || emptyArray; - const staticModifier = find(modifiers, isStaticModifier); - const abstractModifier = find(modifiers, isAbstractModifier); - const accessibilityModifier = find(modifiers, (m) => isAccessibilityModifier(m.kind)); - const lastDecorator = findLast(modifiers, isDecorator); - const modifierPos = abstractModifier ? abstractModifier.end : staticModifier ? staticModifier.end : accessibilityModifier ? accessibilityModifier.end : lastDecorator ? skipTrivia(sourceFile.text, lastDecorator.end) : classElement.getStart(sourceFile); - const options = accessibilityModifier || staticModifier || abstractModifier ? { prefix: " " } : { suffix: " " }; - changeTracker.insertModifierAt(sourceFile, modifierPos, 164 /* OverrideKeyword */, options); - } - function doRemoveOverrideModifierChange(changeTracker, sourceFile, pos) { - const classElement = findContainerClassElementLike(sourceFile, pos); - if (isSourceFileJS(sourceFile)) { - changeTracker.filterJSDocTags(sourceFile, classElement, not(isJSDocOverrideTag)); - return; - } - const overrideModifier = find(classElement.modifiers, isOverrideModifier); - Debug.assertIsDefined(overrideModifier); - changeTracker.deleteModifier(sourceFile, overrideModifier); - } - function isClassElementLikeHasJSDoc(node) { - switch (node.kind) { - case 176 /* Constructor */: - case 172 /* PropertyDeclaration */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return true; - case 169 /* Parameter */: - return isParameterPropertyDeclaration(node, node.parent); - default: - return false; - } - } - function findContainerClassElementLike(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - const classElement = findAncestor(token, (node) => { - if (isClassLike(node)) - return "quit"; - return isClassElementLikeHasJSDoc(node); - }); - Debug.assert(classElement && isClassElementLikeHasJSDoc(classElement)); - return classElement; - } - var fixName, fixAddOverrideId, fixRemoveOverrideId, errorCodes20, errorCodeFixIdMap; - var init_fixOverrideModifier = __esm({ - "src/services/codefixes/fixOverrideModifier.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixName = "fixOverrideModifier"; - fixAddOverrideId = "fixAddOverrideModifier"; - fixRemoveOverrideId = "fixRemoveOverrideModifier"; - errorCodes20 = [ - Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code, - Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code, - Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code, - Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code, - Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code, - Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code, - Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code, - Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code, - Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code - ]; - errorCodeFixIdMap = { - // case #1: - [Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0.code]: { - descriptions: Diagnostics.Add_override_modifier, - fixId: fixAddOverrideId, - fixAllDescriptions: Diagnostics.Add_all_missing_override_modifiers - }, - [Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]: { - descriptions: Diagnostics.Add_override_modifier, - fixId: fixAddOverrideId, - fixAllDescriptions: Diagnostics.Add_all_missing_override_modifiers - }, - // case #2: - [Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class.code]: { - descriptions: Diagnostics.Remove_override_modifier, - fixId: fixRemoveOverrideId, - fixAllDescriptions: Diagnostics.Remove_all_unnecessary_override_modifiers - }, - [Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class.code]: { - descriptions: Diagnostics.Remove_override_modifier, - fixId: fixRemoveOverrideId, - fixAllDescriptions: Diagnostics.Remove_override_modifier - }, - // case #3: - [Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0.code]: { - descriptions: Diagnostics.Add_override_modifier, - fixId: fixAddOverrideId, - fixAllDescriptions: Diagnostics.Add_all_missing_override_modifiers - }, - [Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0.code]: { - descriptions: Diagnostics.Add_override_modifier, - fixId: fixAddOverrideId, - fixAllDescriptions: Diagnostics.Add_all_missing_override_modifiers - }, - // case #4: - [Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0.code]: { - descriptions: Diagnostics.Add_override_modifier, - fixId: fixAddOverrideId, - fixAllDescriptions: Diagnostics.Remove_all_unnecessary_override_modifiers - }, - // case #5: - [Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0.code]: { - descriptions: Diagnostics.Remove_override_modifier, - fixId: fixRemoveOverrideId, - fixAllDescriptions: Diagnostics.Remove_all_unnecessary_override_modifiers - }, - [Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0.code]: { - descriptions: Diagnostics.Remove_override_modifier, - fixId: fixRemoveOverrideId, - fixAllDescriptions: Diagnostics.Remove_all_unnecessary_override_modifiers - } - }; - registerCodeFix({ - errorCodes: errorCodes20, - getCodeActions: function getCodeActionsToFixOverrideModifierIssues(context) { - const { errorCode, span } = context; - const info = errorCodeFixIdMap[errorCode]; - if (!info) - return emptyArray; - const { descriptions, fixId: fixId52, fixAllDescriptions } = info; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => dispatchChanges(changes2, context, errorCode, span.start)); - return [ - createCodeFixActionMaybeFixAll(fixName, changes, descriptions, fixId52, fixAllDescriptions) - ]; - }, - fixIds: [fixName, fixAddOverrideId, fixRemoveOverrideId], - getAllCodeActions: (context) => codeFixAll(context, errorCodes20, (changes, diag2) => { - const { code, start } = diag2; - const info = errorCodeFixIdMap[code]; - if (!info || info.fixId !== context.fixId) { - return; - } - dispatchChanges(changes, context, code, start); - }) - }); - } - }); - - // src/services/codefixes/fixNoPropertyAccessFromIndexSignature.ts - function doChange14(changes, sourceFile, node, preferences) { - const quotePreference = getQuotePreference(sourceFile, preferences); - const argumentsExpression = factory.createStringLiteral(node.name.text, quotePreference === 0 /* Single */); - changes.replaceNode( - sourceFile, - node, - isPropertyAccessChain(node) ? factory.createElementAccessChain(node.expression, node.questionDotToken, argumentsExpression) : factory.createElementAccessExpression(node.expression, argumentsExpression) - ); - } - function getPropertyAccessExpression(sourceFile, pos) { - return cast(getTokenAtPosition(sourceFile, pos).parent, isPropertyAccessExpression); - } - var fixId18, errorCodes21; - var init_fixNoPropertyAccessFromIndexSignature = __esm({ - "src/services/codefixes/fixNoPropertyAccessFromIndexSignature.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId18 = "fixNoPropertyAccessFromIndexSignature"; - errorCodes21 = [ - Diagnostics.Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0.code - ]; - registerCodeFix({ - errorCodes: errorCodes21, - fixIds: [fixId18], - getCodeActions(context) { - const { sourceFile, span, preferences } = context; - const property = getPropertyAccessExpression(sourceFile, span.start); - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange14(t, context.sourceFile, property, preferences)); - return [createCodeFixAction(fixId18, changes, [Diagnostics.Use_element_access_for_0, property.name.text], fixId18, Diagnostics.Use_element_access_for_all_undeclared_properties)]; - }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes21, (changes, diag2) => doChange14(changes, diag2.file, getPropertyAccessExpression(diag2.file, diag2.start), context.preferences)) - }); - } - }); - - // src/services/codefixes/fixImplicitThis.ts - function doChange15(changes, sourceFile, pos, checker) { - const token = getTokenAtPosition(sourceFile, pos); - if (!isThis(token)) - return void 0; - const fn = getThisContainer( - token, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - if (!isFunctionDeclaration(fn) && !isFunctionExpression(fn)) - return void 0; - if (!isSourceFile(getThisContainer( - fn, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ))) { - const fnKeyword = Debug.checkDefined(findChildOfKind(fn, 100 /* FunctionKeyword */, sourceFile)); - const { name } = fn; - const body = Debug.checkDefined(fn.body); - if (isFunctionExpression(fn)) { - if (name && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(name, checker, sourceFile, body)) { - return void 0; - } - changes.delete(sourceFile, fnKeyword); - if (name) { - changes.delete(sourceFile, name); - } - changes.insertText(sourceFile, body.pos, " =>"); - return [Diagnostics.Convert_function_expression_0_to_arrow_function, name ? name.text : ANONYMOUS]; - } else { - changes.replaceNode(sourceFile, fnKeyword, factory.createToken(87 /* ConstKeyword */)); - changes.insertText(sourceFile, name.end, " = "); - changes.insertText(sourceFile, body.pos, " =>"); - return [Diagnostics.Convert_function_declaration_0_to_arrow_function, name.text]; - } - } - } - var fixId19, errorCodes22; - var init_fixImplicitThis = __esm({ - "src/services/codefixes/fixImplicitThis.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId19 = "fixImplicitThis"; - errorCodes22 = [Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code]; - registerCodeFix({ - errorCodes: errorCodes22, - getCodeActions: function getCodeActionsToFixImplicitThis(context) { - const { sourceFile, program, span } = context; - let diagnostic; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => { - diagnostic = doChange15(t, sourceFile, span.start, program.getTypeChecker()); - }); - return diagnostic ? [createCodeFixAction(fixId19, changes, diagnostic, fixId19, Diagnostics.Fix_all_implicit_this_errors)] : emptyArray; - }, - fixIds: [fixId19], - getAllCodeActions: (context) => codeFixAll(context, errorCodes22, (changes, diag2) => { - doChange15(changes, diag2.file, diag2.start, context.program.getTypeChecker()); - }) - }); - } - }); - - // src/services/codefixes/fixImportNonExportedMember.ts - function getInfo7(sourceFile, pos, program) { - var _a; - const token = getTokenAtPosition(sourceFile, pos); - if (isIdentifier(token)) { - const importDeclaration = findAncestor(token, isImportDeclaration); - if (importDeclaration === void 0) - return void 0; - const moduleSpecifier = isStringLiteral(importDeclaration.moduleSpecifier) ? importDeclaration.moduleSpecifier.text : void 0; - if (moduleSpecifier === void 0) - return void 0; - const resolvedModule = getResolvedModule( - sourceFile, - moduleSpecifier, - /*mode*/ - void 0 - ); - if (resolvedModule === void 0) - return void 0; - const moduleSourceFile = program.getSourceFile(resolvedModule.resolvedFileName); - if (moduleSourceFile === void 0 || isSourceFileFromLibrary(program, moduleSourceFile)) - return void 0; - const moduleSymbol = moduleSourceFile.symbol; - const locals = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals; - if (locals === void 0) - return void 0; - const localSymbol = locals.get(token.escapedText); - if (localSymbol === void 0) - return void 0; - const node = getNodeOfSymbol(localSymbol); - if (node === void 0) - return void 0; - const exportName = { node: token, isTypeOnly: isTypeDeclaration(node) }; - return { exportName, node, moduleSourceFile, moduleSpecifier }; - } - return void 0; - } - function doChange16(changes, program, { exportName, node, moduleSourceFile }) { - const exportDeclaration = tryGetExportDeclaration(moduleSourceFile, exportName.isTypeOnly); - if (exportDeclaration) { - updateExport(changes, program, moduleSourceFile, exportDeclaration, [exportName]); - } else if (canHaveExportModifier(node)) { - changes.insertExportModifier(moduleSourceFile, node); - } else { - createExport(changes, program, moduleSourceFile, [exportName]); - } - } - function doChanges(changes, program, sourceFile, moduleExports, node) { - if (length(moduleExports)) { - if (node) { - updateExport(changes, program, sourceFile, node, moduleExports); - } else { - createExport(changes, program, sourceFile, moduleExports); - } - } - } - function tryGetExportDeclaration(sourceFile, isTypeOnly) { - const predicate = (node) => isExportDeclaration(node) && (isTypeOnly && node.isTypeOnly || !node.isTypeOnly); - return findLast(sourceFile.statements, predicate); - } - function updateExport(changes, program, sourceFile, node, names) { - const namedExports = node.exportClause && isNamedExports(node.exportClause) ? node.exportClause.elements : factory.createNodeArray([]); - const allowTypeModifier = !node.isTypeOnly && !!(getIsolatedModules(program.getCompilerOptions()) || find(namedExports, (e) => e.isTypeOnly)); - changes.replaceNode( - sourceFile, - node, - factory.updateExportDeclaration( - node, - node.modifiers, - node.isTypeOnly, - factory.createNamedExports( - factory.createNodeArray( - [...namedExports, ...createExportSpecifiers(names, allowTypeModifier)], - /*hasTrailingComma*/ - namedExports.hasTrailingComma - ) - ), - node.moduleSpecifier, - node.assertClause - ) - ); - } - function createExport(changes, program, sourceFile, names) { - changes.insertNodeAtEndOfScope( - sourceFile, - sourceFile, - factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(createExportSpecifiers( - names, - /*allowTypeModifier*/ - getIsolatedModules(program.getCompilerOptions()) - )), - /*moduleSpecifier*/ - void 0, - /*assertClause*/ - void 0 - ) - ); - } - function createExportSpecifiers(names, allowTypeModifier) { - return factory.createNodeArray(map(names, (n) => factory.createExportSpecifier( - allowTypeModifier && n.isTypeOnly, - /*propertyName*/ - void 0, - n.node - ))); - } - function getNodeOfSymbol(symbol) { - if (symbol.valueDeclaration === void 0) { - return firstOrUndefined(symbol.declarations); - } - const declaration = symbol.valueDeclaration; - const variableStatement = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : void 0; - return variableStatement && length(variableStatement.declarationList.declarations) === 1 ? variableStatement : declaration; - } - var fixId20, errorCodes23; - var init_fixImportNonExportedMember = __esm({ - "src/services/codefixes/fixImportNonExportedMember.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId20 = "fixImportNonExportedMember"; - errorCodes23 = [ - Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported.code - ]; - registerCodeFix({ - errorCodes: errorCodes23, - fixIds: [fixId20], - getCodeActions(context) { - const { sourceFile, span, program } = context; - const info = getInfo7(sourceFile, span.start, program); - if (info === void 0) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange16(t, program, info)); - return [createCodeFixAction(fixId20, changes, [Diagnostics.Export_0_from_module_1, info.exportName.node.text, info.moduleSpecifier], fixId20, Diagnostics.Export_all_referenced_locals)]; - }, - getAllCodeActions(context) { - const { program } = context; - return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - const exports = /* @__PURE__ */ new Map(); - eachDiagnostic(context, errorCodes23, (diag2) => { - const info = getInfo7(diag2.file, diag2.start, program); - if (info === void 0) - return void 0; - const { exportName, node, moduleSourceFile } = info; - if (tryGetExportDeclaration(moduleSourceFile, exportName.isTypeOnly) === void 0 && canHaveExportModifier(node)) { - changes.insertExportModifier(moduleSourceFile, node); - } else { - const moduleExports = exports.get(moduleSourceFile) || { typeOnlyExports: [], exports: [] }; - if (exportName.isTypeOnly) { - moduleExports.typeOnlyExports.push(exportName); - } else { - moduleExports.exports.push(exportName); - } - exports.set(moduleSourceFile, moduleExports); - } - }); - exports.forEach((moduleExports, moduleSourceFile) => { - const exportDeclaration = tryGetExportDeclaration( - moduleSourceFile, - /*isTypeOnly*/ - true - ); - if (exportDeclaration && exportDeclaration.isTypeOnly) { - doChanges(changes, program, moduleSourceFile, moduleExports.typeOnlyExports, exportDeclaration); - doChanges(changes, program, moduleSourceFile, moduleExports.exports, tryGetExportDeclaration( - moduleSourceFile, - /*isTypeOnly*/ - false - )); - } else { - doChanges(changes, program, moduleSourceFile, [...moduleExports.exports, ...moduleExports.typeOnlyExports], exportDeclaration); - } - }); - })); - } - }); - } - }); - - // src/services/codefixes/fixIncorrectNamedTupleSyntax.ts - function getNamedTupleMember(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - return findAncestor(token, (t) => t.kind === 202 /* NamedTupleMember */); - } - function doChange17(changes, sourceFile, namedTupleMember) { - if (!namedTupleMember) { - return; - } - let unwrappedType = namedTupleMember.type; - let sawOptional = false; - let sawRest = false; - while (unwrappedType.kind === 190 /* OptionalType */ || unwrappedType.kind === 191 /* RestType */ || unwrappedType.kind === 196 /* ParenthesizedType */) { - if (unwrappedType.kind === 190 /* OptionalType */) { - sawOptional = true; - } else if (unwrappedType.kind === 191 /* RestType */) { - sawRest = true; - } - unwrappedType = unwrappedType.type; - } - const updated = factory.updateNamedTupleMember( - namedTupleMember, - namedTupleMember.dotDotDotToken || (sawRest ? factory.createToken(26 /* DotDotDotToken */) : void 0), - namedTupleMember.name, - namedTupleMember.questionToken || (sawOptional ? factory.createToken(58 /* QuestionToken */) : void 0), - unwrappedType - ); - if (updated === namedTupleMember) { - return; - } - changes.replaceNode(sourceFile, namedTupleMember, updated); - } - var fixId21, errorCodes24; - var init_fixIncorrectNamedTupleSyntax = __esm({ - "src/services/codefixes/fixIncorrectNamedTupleSyntax.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId21 = "fixIncorrectNamedTupleSyntax"; - errorCodes24 = [ - 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, - Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type.code - ]; - registerCodeFix({ - errorCodes: errorCodes24, - getCodeActions: function getCodeActionsToFixIncorrectNamedTupleSyntax(context) { - const { sourceFile, span } = context; - const namedTupleMember = getNamedTupleMember(sourceFile, span.start); - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange17(t, sourceFile, namedTupleMember)); - return [createCodeFixAction(fixId21, changes, Diagnostics.Move_labeled_tuple_element_modifiers_to_labels, fixId21, Diagnostics.Move_labeled_tuple_element_modifiers_to_labels)]; - }, - fixIds: [fixId21] - }); - } - }); - - // src/services/codefixes/fixSpelling.ts - function getInfo8(sourceFile, pos, context, errorCode) { - const node = getTokenAtPosition(sourceFile, pos); - const parent2 = node.parent; - if ((errorCode === Diagnostics.No_overload_matches_this_call.code || errorCode === Diagnostics.Type_0_is_not_assignable_to_type_1.code) && !isJsxAttribute(parent2)) - return void 0; - const checker = context.program.getTypeChecker(); - let suggestedSymbol; - if (isPropertyAccessExpression(parent2) && parent2.name === node) { - Debug.assert(isMemberName(node), "Expected an identifier for spelling (property access)"); - let containingType = checker.getTypeAtLocation(parent2.expression); - if (parent2.flags & 64 /* OptionalChain */) { - containingType = checker.getNonNullableType(containingType); - } - suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); - } else if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 103 /* InKeyword */ && parent2.left === node && isPrivateIdentifier(node)) { - const receiverType = checker.getTypeAtLocation(parent2.right); - suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, receiverType); - } else if (isQualifiedName(parent2) && parent2.right === node) { - const symbol = checker.getSymbolAtLocation(parent2.left); - if (symbol && symbol.flags & 1536 /* Module */) { - suggestedSymbol = checker.getSuggestedSymbolForNonexistentModule(parent2.right, symbol); - } - } else if (isImportSpecifier(parent2) && parent2.name === node) { - Debug.assertNode(node, isIdentifier, "Expected an identifier for spelling (import)"); - const importDeclaration = findAncestor(node, isImportDeclaration); - const resolvedSourceFile = getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration); - if (resolvedSourceFile && resolvedSourceFile.symbol) { - suggestedSymbol = checker.getSuggestedSymbolForNonexistentModule(node, resolvedSourceFile.symbol); - } - } else if (isJsxAttribute(parent2) && parent2.name === node) { - Debug.assertNode(node, isIdentifier, "Expected an identifier for JSX attribute"); - const tag = findAncestor(node, isJsxOpeningLikeElement); - const props = checker.getContextualTypeForArgumentAtIndex(tag, 0); - suggestedSymbol = checker.getSuggestedSymbolForNonexistentJSXAttribute(node, props); - } else if (hasSyntacticModifier(parent2, 16384 /* Override */) && isClassElement(parent2) && parent2.name === node) { - const baseDeclaration = findAncestor(node, isClassLike); - const baseTypeNode = baseDeclaration ? getEffectiveBaseTypeNode(baseDeclaration) : void 0; - const baseType = baseTypeNode ? checker.getTypeAtLocation(baseTypeNode) : void 0; - if (baseType) { - suggestedSymbol = checker.getSuggestedSymbolForNonexistentClassMember(getTextOfNode(node), baseType); - } - } else { - const meaning = getMeaningFromLocation(node); - const name = getTextOfNode(node); - Debug.assert(name !== void 0, "name should be defined"); - suggestedSymbol = checker.getSuggestedSymbolForNonexistentSymbol(node, name, convertSemanticMeaningToSymbolFlags(meaning)); - } - return suggestedSymbol === void 0 ? void 0 : { node, suggestedSymbol }; - } - function doChange18(changes, sourceFile, node, suggestedSymbol, target) { - const suggestion = symbolName(suggestedSymbol); - if (!isIdentifierText(suggestion, target) && isPropertyAccessExpression(node.parent)) { - const valDecl = suggestedSymbol.valueDeclaration; - if (valDecl && isNamedDeclaration(valDecl) && isPrivateIdentifier(valDecl.name)) { - changes.replaceNode(sourceFile, node, factory.createIdentifier(suggestion)); - } else { - changes.replaceNode(sourceFile, node.parent, factory.createElementAccessExpression(node.parent.expression, factory.createStringLiteral(suggestion))); - } - } else { - changes.replaceNode(sourceFile, node, factory.createIdentifier(suggestion)); - } - } - function convertSemanticMeaningToSymbolFlags(meaning) { - let flags = 0; - if (meaning & 4 /* Namespace */) { - flags |= 1920 /* Namespace */; - } - if (meaning & 2 /* Type */) { - flags |= 788968 /* Type */; - } - if (meaning & 1 /* Value */) { - flags |= 111551 /* Value */; - } - return flags; - } - function getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration) { - if (!importDeclaration || !isStringLiteralLike(importDeclaration.moduleSpecifier)) - return void 0; - const resolvedModule = getResolvedModule(sourceFile, importDeclaration.moduleSpecifier.text, getModeForUsageLocation(sourceFile, importDeclaration.moduleSpecifier)); - if (!resolvedModule) - return void 0; - return context.program.getSourceFile(resolvedModule.resolvedFileName); - } - var fixId22, errorCodes25; - var init_fixSpelling = __esm({ - "src/services/codefixes/fixSpelling.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId22 = "fixSpelling"; - errorCodes25 = [ - Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, - Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, - Diagnostics.Cannot_find_name_0_Did_you_mean_1.code, - Diagnostics.Could_not_find_name_0_Did_you_mean_1.code, - Diagnostics.Cannot_find_namespace_0_Did_you_mean_1.code, - Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, - Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code, - Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2.code, - Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code, - Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1.code, - // for JSX class components - Diagnostics.No_overload_matches_this_call.code, - // for JSX FC - Diagnostics.Type_0_is_not_assignable_to_type_1.code - ]; - registerCodeFix({ - errorCodes: errorCodes25, - getCodeActions(context) { - const { sourceFile, errorCode } = context; - const info = getInfo8(sourceFile, context.span.start, context, errorCode); - if (!info) - return void 0; - const { node, suggestedSymbol } = info; - const target = getEmitScriptTarget(context.host.getCompilationSettings()); - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange18(t, sourceFile, node, suggestedSymbol, target)); - return [createCodeFixAction("spelling", changes, [Diagnostics.Change_spelling_to_0, symbolName(suggestedSymbol)], fixId22, Diagnostics.Fix_all_detected_spelling_errors)]; - }, - fixIds: [fixId22], - getAllCodeActions: (context) => codeFixAll(context, errorCodes25, (changes, diag2) => { - const info = getInfo8(diag2.file, diag2.start, context, diag2.code); - const target = getEmitScriptTarget(context.host.getCompilationSettings()); - if (info) - doChange18(changes, context.sourceFile, info.node, info.suggestedSymbol, target); - }) - }); - } - }); - - // src/services/codefixes/returnValueCorrect.ts - function createObjectTypeFromLabeledExpression(checker, label, expression) { - const member = checker.createSymbol(4 /* Property */, label.escapedText); - member.links.type = checker.getTypeAtLocation(expression); - const members = createSymbolTable([member]); - return checker.createAnonymousType( - /*symbol*/ - void 0, - members, - [], - [], - [] - ); - } - function getFixInfo(checker, declaration, expectType, isFunctionType) { - if (!declaration.body || !isBlock(declaration.body) || length(declaration.body.statements) !== 1) - return void 0; - const firstStatement = first(declaration.body.statements); - if (isExpressionStatement(firstStatement) && checkFixedAssignableTo(checker, declaration, checker.getTypeAtLocation(firstStatement.expression), expectType, isFunctionType)) { - return { - declaration, - kind: 0 /* MissingReturnStatement */, - expression: firstStatement.expression, - statement: firstStatement, - commentSource: firstStatement.expression - }; - } else if (isLabeledStatement(firstStatement) && isExpressionStatement(firstStatement.statement)) { - const node = factory.createObjectLiteralExpression([factory.createPropertyAssignment(firstStatement.label, firstStatement.statement.expression)]); - const nodeType = createObjectTypeFromLabeledExpression(checker, firstStatement.label, firstStatement.statement.expression); - if (checkFixedAssignableTo(checker, declaration, nodeType, expectType, isFunctionType)) { - return isArrowFunction(declaration) ? { - declaration, - kind: 1 /* MissingParentheses */, - expression: node, - statement: firstStatement, - commentSource: firstStatement.statement.expression - } : { - declaration, - kind: 0 /* MissingReturnStatement */, - expression: node, - statement: firstStatement, - commentSource: firstStatement.statement.expression - }; - } - } else if (isBlock(firstStatement) && length(firstStatement.statements) === 1) { - const firstBlockStatement = first(firstStatement.statements); - if (isLabeledStatement(firstBlockStatement) && isExpressionStatement(firstBlockStatement.statement)) { - const node = factory.createObjectLiteralExpression([factory.createPropertyAssignment(firstBlockStatement.label, firstBlockStatement.statement.expression)]); - const nodeType = createObjectTypeFromLabeledExpression(checker, firstBlockStatement.label, firstBlockStatement.statement.expression); - if (checkFixedAssignableTo(checker, declaration, nodeType, expectType, isFunctionType)) { - return { - declaration, - kind: 0 /* MissingReturnStatement */, - expression: node, - statement: firstStatement, - commentSource: firstBlockStatement - }; - } - } - } - return void 0; - } - function checkFixedAssignableTo(checker, declaration, exprType, type, isFunctionType) { - if (isFunctionType) { - const sig = checker.getSignatureFromDeclaration(declaration); - if (sig) { - if (hasSyntacticModifier(declaration, 512 /* Async */)) { - exprType = checker.createPromiseType(exprType); - } - const newSig = checker.createSignature( - declaration, - sig.typeParameters, - sig.thisParameter, - sig.parameters, - exprType, - /*typePredicate*/ - void 0, - sig.minArgumentCount, - sig.flags - ); - exprType = checker.createAnonymousType( - /*symbol*/ - void 0, - createSymbolTable(), - [newSig], - [], - [] - ); - } else { - exprType = checker.getAnyType(); - } - } - return checker.isTypeAssignableTo(exprType, type); - } - function getInfo9(checker, sourceFile, position, errorCode) { - const node = getTokenAtPosition(sourceFile, position); - if (!node.parent) - return void 0; - const declaration = findAncestor(node.parent, isFunctionLikeDeclaration); - switch (errorCode) { - case Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code: - if (!declaration || !declaration.body || !declaration.type || !rangeContainsRange(declaration.type, node)) - return void 0; - return getFixInfo( - checker, - declaration, - checker.getTypeFromTypeNode(declaration.type), - /*isFunctionType*/ - false - ); - case Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code: - if (!declaration || !isCallExpression(declaration.parent) || !declaration.body) - return void 0; - const pos = declaration.parent.arguments.indexOf(declaration); - if (pos === -1) - return void 0; - const type = checker.getContextualTypeForArgumentAtIndex(declaration.parent, pos); - if (!type) - return void 0; - return getFixInfo( - checker, - declaration, - type, - /*isFunctionType*/ - true - ); - case Diagnostics.Type_0_is_not_assignable_to_type_1.code: - if (!isDeclarationName(node) || !isVariableLike(node.parent) && !isJsxAttribute(node.parent)) - return void 0; - const initializer = getVariableLikeInitializer(node.parent); - if (!initializer || !isFunctionLikeDeclaration(initializer) || !initializer.body) - return void 0; - return getFixInfo( - checker, - initializer, - checker.getTypeAtLocation(node.parent), - /*isFunctionType*/ - true - ); - } - return void 0; - } - function getVariableLikeInitializer(declaration) { - switch (declaration.kind) { - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 208 /* BindingElement */: - case 172 /* PropertyDeclaration */: - case 303 /* PropertyAssignment */: - return declaration.initializer; - case 291 /* JsxAttribute */: - return declaration.initializer && (isJsxExpression(declaration.initializer) ? declaration.initializer.expression : void 0); - case 304 /* ShorthandPropertyAssignment */: - case 171 /* PropertySignature */: - case 306 /* EnumMember */: - case 355 /* JSDocPropertyTag */: - case 348 /* JSDocParameterTag */: - return void 0; - } - } - function addReturnStatement(changes, sourceFile, expression, statement) { - suppressLeadingAndTrailingTrivia(expression); - const probablyNeedSemi = probablyUsesSemicolons(sourceFile); - changes.replaceNode(sourceFile, statement, factory.createReturnStatement(expression), { - leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude, - suffix: probablyNeedSemi ? ";" : void 0 - }); - } - function removeBlockBodyBrace(changes, sourceFile, declaration, expression, commentSource, withParen) { - const newBody = withParen || needsParentheses(expression) ? factory.createParenthesizedExpression(expression) : expression; - suppressLeadingAndTrailingTrivia(commentSource); - copyComments(commentSource, newBody); - changes.replaceNode(sourceFile, declaration.body, newBody); - } - function wrapBlockWithParen(changes, sourceFile, declaration, expression) { - changes.replaceNode(sourceFile, declaration.body, factory.createParenthesizedExpression(expression)); - } - function getActionForfixAddReturnStatement(context, expression, statement) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addReturnStatement(t, context.sourceFile, expression, statement)); - return createCodeFixAction(fixId23, changes, Diagnostics.Add_a_return_statement, fixIdAddReturnStatement, Diagnostics.Add_all_missing_return_statement); - } - function getActionForFixRemoveBracesFromArrowFunctionBody(context, declaration, expression, commentSource) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => removeBlockBodyBrace( - t, - context.sourceFile, - declaration, - expression, - commentSource, - /*withParen*/ - false - )); - return createCodeFixAction(fixId23, changes, Diagnostics.Remove_braces_from_arrow_function_body, fixRemoveBracesFromArrowFunctionBody, Diagnostics.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues); - } - function getActionForfixWrapTheBlockWithParen(context, declaration, expression) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => wrapBlockWithParen(t, context.sourceFile, declaration, expression)); - return createCodeFixAction(fixId23, changes, Diagnostics.Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal, fixIdWrapTheBlockWithParen, Diagnostics.Wrap_all_object_literal_with_parentheses); - } - var fixId23, fixIdAddReturnStatement, fixRemoveBracesFromArrowFunctionBody, fixIdWrapTheBlockWithParen, errorCodes26; - var init_returnValueCorrect = __esm({ - "src/services/codefixes/returnValueCorrect.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId23 = "returnValueCorrect"; - fixIdAddReturnStatement = "fixAddReturnStatement"; - fixRemoveBracesFromArrowFunctionBody = "fixRemoveBracesFromArrowFunctionBody"; - fixIdWrapTheBlockWithParen = "fixWrapTheBlockWithParen"; - errorCodes26 = [ - Diagnostics.A_function_whose_declared_type_is_neither_undefined_void_nor_any_must_return_a_value.code, - Diagnostics.Type_0_is_not_assignable_to_type_1.code, - Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code - ]; - registerCodeFix({ - errorCodes: errorCodes26, - fixIds: [fixIdAddReturnStatement, fixRemoveBracesFromArrowFunctionBody, fixIdWrapTheBlockWithParen], - getCodeActions: function getCodeActionsToCorrectReturnValue(context) { - const { program, sourceFile, span: { start }, errorCode } = context; - const info = getInfo9(program.getTypeChecker(), sourceFile, start, errorCode); - if (!info) - return void 0; - if (info.kind === 0 /* MissingReturnStatement */) { - return append( - [getActionForfixAddReturnStatement(context, info.expression, info.statement)], - isArrowFunction(info.declaration) ? getActionForFixRemoveBracesFromArrowFunctionBody(context, info.declaration, info.expression, info.commentSource) : void 0 - ); - } else { - return [getActionForfixWrapTheBlockWithParen(context, info.declaration, info.expression)]; - } - }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes26, (changes, diag2) => { - const info = getInfo9(context.program.getTypeChecker(), diag2.file, diag2.start, diag2.code); - if (!info) - return void 0; - switch (context.fixId) { - case fixIdAddReturnStatement: - addReturnStatement(changes, diag2.file, info.expression, info.statement); - break; - case fixRemoveBracesFromArrowFunctionBody: - if (!isArrowFunction(info.declaration)) - return void 0; - removeBlockBodyBrace( - changes, - diag2.file, - info.declaration, - info.expression, - info.commentSource, - /*withParen*/ - false - ); - break; - case fixIdWrapTheBlockWithParen: - if (!isArrowFunction(info.declaration)) - return void 0; - wrapBlockWithParen(changes, diag2.file, info.declaration, info.expression); - break; - default: - Debug.fail(JSON.stringify(context.fixId)); - } - }) - }); - } - }); - - // src/services/codefixes/fixAddMissingMember.ts - function getInfo10(sourceFile, tokenPos, errorCode, checker, program) { - var _a; - const token = getTokenAtPosition(sourceFile, tokenPos); - const parent2 = token.parent; - if (errorCode === Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code) { - if (!(token.kind === 19 /* OpenBraceToken */ && isObjectLiteralExpression(parent2) && isCallExpression(parent2.parent))) - return void 0; - const argIndex = findIndex(parent2.parent.arguments, (arg) => arg === parent2); - if (argIndex < 0) - return void 0; - const signature = checker.getResolvedSignature(parent2.parent); - if (!(signature && signature.declaration && signature.parameters[argIndex])) - return void 0; - const param = signature.parameters[argIndex].valueDeclaration; - if (!(param && isParameter(param) && isIdentifier(param.name))) - return void 0; - const properties = arrayFrom(checker.getUnmatchedProperties( - checker.getTypeAtLocation(parent2), - checker.getParameterType(signature, argIndex), - /*requireOptionalProperties*/ - false, - /*matchDiscriminantProperties*/ - false - )); - if (!length(properties)) - return void 0; - return { kind: 3 /* ObjectLiteral */, token: param.name, properties, parentDeclaration: parent2 }; - } - if (!isMemberName(token)) - return void 0; - if (isIdentifier(token) && hasInitializer(parent2) && parent2.initializer && isObjectLiteralExpression(parent2.initializer)) { - const targetType = checker.getContextualType(token) || checker.getTypeAtLocation(token); - const properties = arrayFrom(checker.getUnmatchedProperties( - checker.getTypeAtLocation(parent2.initializer), - targetType, - /*requireOptionalProperties*/ - false, - /*matchDiscriminantProperties*/ - false - )); - if (!length(properties)) - return void 0; - return { kind: 3 /* ObjectLiteral */, token, properties, parentDeclaration: parent2.initializer }; - } - if (isIdentifier(token) && isJsxOpeningLikeElement(token.parent)) { - const target = getEmitScriptTarget(program.getCompilerOptions()); - const attributes = getUnmatchedAttributes(checker, target, token.parent); - if (!length(attributes)) - return void 0; - return { kind: 4 /* JsxAttributes */, token, attributes, parentDeclaration: token.parent }; - } - if (isIdentifier(token)) { - const type = (_a = checker.getContextualType(token)) == null ? void 0 : _a.getNonNullableType(); - if (type && getObjectFlags(type) & 16 /* Anonymous */) { - const signature = firstOrUndefined(checker.getSignaturesOfType(type, 0 /* Call */)); - if (signature === void 0) - return void 0; - return { kind: 5 /* Signature */, token, signature, sourceFile, parentDeclaration: findScope(token) }; - } - if (isCallExpression(parent2) && parent2.expression === token) { - return { kind: 2 /* Function */, token, call: parent2, sourceFile, modifierFlags: 0 /* None */, parentDeclaration: findScope(token) }; - } - } - if (!isPropertyAccessExpression(parent2)) - return void 0; - const leftExpressionType = skipConstraint(checker.getTypeAtLocation(parent2.expression)); - const symbol = leftExpressionType.symbol; - if (!symbol || !symbol.declarations) - return void 0; - if (isIdentifier(token) && isCallExpression(parent2.parent)) { - const moduleDeclaration = find(symbol.declarations, isModuleDeclaration); - const moduleDeclarationSourceFile = moduleDeclaration == null ? void 0 : moduleDeclaration.getSourceFile(); - if (moduleDeclaration && moduleDeclarationSourceFile && !isSourceFileFromLibrary(program, moduleDeclarationSourceFile)) { - return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile, modifierFlags: 1 /* Export */, parentDeclaration: moduleDeclaration }; - } - const moduleSourceFile = find(symbol.declarations, isSourceFile); - if (sourceFile.commonJsModuleIndicator) - return void 0; - if (moduleSourceFile && !isSourceFileFromLibrary(program, moduleSourceFile)) { - return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile: moduleSourceFile, modifierFlags: 1 /* Export */, parentDeclaration: moduleSourceFile }; - } - } - const classDeclaration = find(symbol.declarations, isClassLike); - if (!classDeclaration && isPrivateIdentifier(token)) - return void 0; - const declaration = classDeclaration || find(symbol.declarations, (d) => isInterfaceDeclaration(d) || isTypeLiteralNode(d)); - if (declaration && !isSourceFileFromLibrary(program, declaration.getSourceFile())) { - const makeStatic = !isTypeLiteralNode(declaration) && (leftExpressionType.target || leftExpressionType) !== checker.getDeclaredTypeOfSymbol(symbol); - if (makeStatic && (isPrivateIdentifier(token) || isInterfaceDeclaration(declaration))) - return void 0; - const declSourceFile = declaration.getSourceFile(); - const modifierFlags = isTypeLiteralNode(declaration) ? 0 /* None */ : (makeStatic ? 32 /* Static */ : 0 /* None */) | (startsWithUnderscore(token.text) ? 8 /* Private */ : 0 /* None */); - const isJSFile = isSourceFileJS(declSourceFile); - const call = tryCast(parent2.parent, isCallExpression); - return { kind: 0 /* TypeLikeDeclaration */, token, call, modifierFlags, parentDeclaration: declaration, declSourceFile, isJSFile }; - } - const enumDeclaration = find(symbol.declarations, isEnumDeclaration); - if (enumDeclaration && !(leftExpressionType.flags & 1056 /* EnumLike */) && !isPrivateIdentifier(token) && !isSourceFileFromLibrary(program, enumDeclaration.getSourceFile())) { - return { kind: 1 /* Enum */, token, parentDeclaration: enumDeclaration }; - } - return void 0; - } - function getActionsForMissingMemberDeclaration(context, info) { - return info.isJSFile ? singleElementArray(createActionForAddMissingMemberInJavascriptFile(context, info)) : createActionsForAddMissingMemberInTypeScriptFile(context, info); - } - function createActionForAddMissingMemberInJavascriptFile(context, { parentDeclaration, declSourceFile, modifierFlags, token }) { - if (isInterfaceDeclaration(parentDeclaration) || isTypeLiteralNode(parentDeclaration)) { - return void 0; - } - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMemberInJs(t, declSourceFile, parentDeclaration, token, !!(modifierFlags & 32 /* Static */))); - if (changes.length === 0) { - return void 0; - } - const diagnostic = modifierFlags & 32 /* Static */ ? Diagnostics.Initialize_static_property_0 : isPrivateIdentifier(token) ? Diagnostics.Declare_a_private_field_named_0 : Diagnostics.Initialize_property_0_in_the_constructor; - return createCodeFixAction(fixMissingMember, changes, [diagnostic, token.text], fixMissingMember, Diagnostics.Add_all_missing_members); - } - function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { - const tokenName = token.text; - if (makeStatic) { - if (classDeclaration.kind === 231 /* ClassExpression */) { - return; - } - const className = classDeclaration.name.getText(); - const staticInitialization = initializePropertyToUndefined(factory.createIdentifier(className), tokenName); - changeTracker.insertNodeAfter(sourceFile, classDeclaration, staticInitialization); - } else if (isPrivateIdentifier(token)) { - const property = factory.createPropertyDeclaration( - /*modifiers*/ - void 0, - tokenName, - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - /*initializer*/ - void 0 - ); - const lastProp = getNodeToInsertPropertyAfter(classDeclaration); - if (lastProp) { - changeTracker.insertNodeAfter(sourceFile, lastProp, property); - } else { - changeTracker.insertMemberAtStart(sourceFile, classDeclaration, property); - } - } else { - const classConstructor = getFirstConstructorWithBody(classDeclaration); - if (!classConstructor) { - return; - } - const propertyInitialization = initializePropertyToUndefined(factory.createThis(), tokenName); - changeTracker.insertNodeAtConstructorEnd(sourceFile, classConstructor, propertyInitialization); - } - } - function initializePropertyToUndefined(obj, propertyName) { - return factory.createExpressionStatement(factory.createAssignment(factory.createPropertyAccessExpression(obj, propertyName), createUndefined())); - } - function createActionsForAddMissingMemberInTypeScriptFile(context, { parentDeclaration, declSourceFile, modifierFlags, token }) { - const memberName = token.text; - const isStatic2 = modifierFlags & 32 /* Static */; - const typeNode = getTypeNode2(context.program.getTypeChecker(), parentDeclaration, token); - const addPropertyDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addPropertyDeclaration(t, declSourceFile, parentDeclaration, memberName, typeNode, modifierFlags2)); - const actions2 = [createCodeFixAction(fixMissingMember, addPropertyDeclarationChanges(modifierFlags & 32 /* Static */), [isStatic2 ? Diagnostics.Declare_static_property_0 : Diagnostics.Declare_property_0, memberName], fixMissingMember, Diagnostics.Add_all_missing_members)]; - if (isStatic2 || isPrivateIdentifier(token)) { - return actions2; - } - if (modifierFlags & 8 /* Private */) { - actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addPropertyDeclarationChanges(8 /* Private */), [Diagnostics.Declare_private_property_0, memberName])); - } - actions2.push(createAddIndexSignatureAction(context, declSourceFile, parentDeclaration, token.text, typeNode)); - return actions2; - } - function getTypeNode2(checker, node, token) { - let typeNode; - if (token.parent.parent.kind === 226 /* BinaryExpression */) { - const binaryExpression = token.parent.parent; - const otherExpression = token.parent === binaryExpression.left ? binaryExpression.right : binaryExpression.left; - const widenedType = checker.getWidenedType(checker.getBaseTypeOfLiteralType(checker.getTypeAtLocation(otherExpression))); - typeNode = checker.typeToTypeNode(widenedType, node, 1 /* NoTruncation */); - } else { - const contextualType = checker.getContextualType(token.parent); - typeNode = contextualType ? checker.typeToTypeNode( - contextualType, - /*enclosingDeclaration*/ - void 0, - 1 /* NoTruncation */ - ) : void 0; - } - return typeNode || factory.createKeywordTypeNode(133 /* AnyKeyword */); - } - function addPropertyDeclaration(changeTracker, sourceFile, node, tokenName, typeNode, modifierFlags) { - const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0; - const property = isClassLike(node) ? factory.createPropertyDeclaration( - modifiers, - tokenName, - /*questionOrExclamationToken*/ - void 0, - typeNode, - /*initializer*/ - void 0 - ) : factory.createPropertySignature( - /*modifiers*/ - void 0, - tokenName, - /*questionToken*/ - void 0, - typeNode - ); - const lastProp = getNodeToInsertPropertyAfter(node); - if (lastProp) { - changeTracker.insertNodeAfter(sourceFile, lastProp, property); - } else { - changeTracker.insertMemberAtStart(sourceFile, node, property); - } - } - function getNodeToInsertPropertyAfter(node) { - let res; - for (const member of node.members) { - if (!isPropertyDeclaration(member)) - break; - res = member; - } - return res; - } - function createAddIndexSignatureAction(context, sourceFile, node, tokenName, typeNode) { - const stringTypeNode = factory.createKeywordTypeNode(154 /* StringKeyword */); - const indexingParameter = factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "x", - /*questionToken*/ - void 0, - stringTypeNode, - /*initializer*/ - void 0 - ); - const indexSignature = factory.createIndexSignature( - /*modifiers*/ - void 0, - [indexingParameter], - typeNode - ); - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => t.insertMemberAtStart(sourceFile, node, indexSignature)); - return createCodeFixActionWithoutFixAll(fixMissingMember, changes, [Diagnostics.Add_index_signature_for_property_0, tokenName]); - } - function getActionsForMissingMethodDeclaration(context, info) { - const { parentDeclaration, declSourceFile, modifierFlags, token, call } = info; - if (call === void 0) { - return void 0; - } - const methodName = token.text; - const addMethodDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addMethodDeclaration(context, t, call, token, modifierFlags2, parentDeclaration, declSourceFile)); - const actions2 = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & 32 /* Static */), [modifierFlags & 32 /* Static */ ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)]; - if (modifierFlags & 8 /* Private */) { - actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addMethodDeclarationChanges(8 /* Private */), [Diagnostics.Declare_private_method_0, methodName])); - } - return actions2; - } - function addMethodDeclaration(context, changes, callExpression, name, modifierFlags, parentDeclaration, sourceFile) { - const importAdder = createImportAdder(sourceFile, context.program, context.preferences, context.host); - const kind = isClassLike(parentDeclaration) ? 174 /* MethodDeclaration */ : 173 /* MethodSignature */; - const signatureDeclaration = createSignatureDeclarationFromCallExpression(kind, context, importAdder, callExpression, name, modifierFlags, parentDeclaration); - const containingMethodDeclaration = tryGetContainingMethodDeclaration(parentDeclaration, callExpression); - if (containingMethodDeclaration) { - changes.insertNodeAfter(sourceFile, containingMethodDeclaration, signatureDeclaration); - } else { - changes.insertMemberAtStart(sourceFile, parentDeclaration, signatureDeclaration); - } - importAdder.writeFixes(changes); - } - function addEnumMemberDeclaration(changes, checker, { token, parentDeclaration }) { - const hasStringInitializer = some(parentDeclaration.members, (member) => { - const type = checker.getTypeAtLocation(member); - return !!(type && type.flags & 402653316 /* StringLike */); - }); - const enumMember = factory.createEnumMember(token, hasStringInitializer ? factory.createStringLiteral(token.text) : void 0); - changes.replaceNode(parentDeclaration.getSourceFile(), parentDeclaration, factory.updateEnumDeclaration( - parentDeclaration, - parentDeclaration.modifiers, - parentDeclaration.name, - concatenate(parentDeclaration.members, singleElementArray(enumMember)) - ), { - leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll, - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude - }); - } - function addFunctionDeclaration(changes, context, info) { - const quotePreference = getQuotePreference(context.sourceFile, context.preferences); - const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const functionDeclaration = info.kind === 2 /* Function */ ? createSignatureDeclarationFromCallExpression(262 /* FunctionDeclaration */, context, importAdder, info.call, idText(info.token), info.modifierFlags, info.parentDeclaration) : createSignatureDeclarationFromSignature( - 262 /* FunctionDeclaration */, - context, - quotePreference, - info.signature, - createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), - info.token, - /*modifiers*/ - void 0, - /*optional*/ - void 0, - /*enclosingDeclaration*/ - void 0, - importAdder - ); - if (functionDeclaration === void 0) { - Debug.fail("fixMissingFunctionDeclaration codefix got unexpected error."); - } - isReturnStatement(info.parentDeclaration) ? changes.insertNodeBefore( - info.sourceFile, - info.parentDeclaration, - functionDeclaration, - /*blankLineBetween*/ - true - ) : changes.insertNodeAtEndOfScope(info.sourceFile, info.parentDeclaration, functionDeclaration); - importAdder.writeFixes(changes); - } - function addJsxAttributes(changes, context, info) { - const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const quotePreference = getQuotePreference(context.sourceFile, context.preferences); - const checker = context.program.getTypeChecker(); - const jsxAttributesNode = info.parentDeclaration.attributes; - const hasSpreadAttribute = some(jsxAttributesNode.properties, isJsxSpreadAttribute); - const attrs = map(info.attributes, (attr) => { - const value = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(attr), info.parentDeclaration); - const name = factory.createIdentifier(attr.name); - const jsxAttribute = factory.createJsxAttribute(name, factory.createJsxExpression( - /*dotDotDotToken*/ - void 0, - value - )); - setParent(name, jsxAttribute); - return jsxAttribute; - }); - const jsxAttributes = factory.createJsxAttributes(hasSpreadAttribute ? [...attrs, ...jsxAttributesNode.properties] : [...jsxAttributesNode.properties, ...attrs]); - const options = { prefix: jsxAttributesNode.pos === jsxAttributesNode.end ? " " : void 0 }; - changes.replaceNode(context.sourceFile, jsxAttributesNode, jsxAttributes, options); - importAdder.writeFixes(changes); - } - function addObjectLiteralProperties(changes, context, info) { - const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const quotePreference = getQuotePreference(context.sourceFile, context.preferences); - const target = getEmitScriptTarget(context.program.getCompilerOptions()); - const checker = context.program.getTypeChecker(); - const props = map(info.properties, (prop) => { - const initializer = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), info.parentDeclaration); - return factory.createPropertyAssignment(createPropertyNameFromSymbol(prop, target, quotePreference, checker), initializer); - }); - const options = { - leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude, - indentation: info.indentation - }; - changes.replaceNode(context.sourceFile, info.parentDeclaration, factory.createObjectLiteralExpression( - [...info.parentDeclaration.properties, ...props], - /*multiLine*/ - true - ), options); - importAdder.writeFixes(changes); - } - function tryGetValueFromType(context, checker, importAdder, quotePreference, type, enclosingDeclaration) { - if (type.flags & 3 /* AnyOrUnknown */) { - return createUndefined(); - } - if (type.flags & (4 /* String */ | 134217728 /* TemplateLiteral */)) { - return factory.createStringLiteral( - "", - /* isSingleQuote */ - quotePreference === 0 /* Single */ - ); - } - if (type.flags & 8 /* Number */) { - return factory.createNumericLiteral(0); - } - if (type.flags & 64 /* BigInt */) { - return factory.createBigIntLiteral("0n"); - } - if (type.flags & 16 /* Boolean */) { - return factory.createFalse(); - } - if (type.flags & 1056 /* EnumLike */) { - const enumMember = type.symbol.exports ? firstOrUndefinedIterator(type.symbol.exports.values()) : type.symbol; - const name = checker.symbolToExpression( - type.symbol.parent ? type.symbol.parent : type.symbol, - 111551 /* Value */, - /*enclosingDeclaration*/ - void 0, - /*flags*/ - void 0 - ); - return enumMember === void 0 || name === void 0 ? factory.createNumericLiteral(0) : factory.createPropertyAccessExpression(name, checker.symbolToString(enumMember)); - } - if (type.flags & 256 /* NumberLiteral */) { - return factory.createNumericLiteral(type.value); - } - if (type.flags & 2048 /* BigIntLiteral */) { - return factory.createBigIntLiteral(type.value); - } - if (type.flags & 128 /* StringLiteral */) { - return factory.createStringLiteral( - type.value, - /* isSingleQuote */ - quotePreference === 0 /* Single */ - ); - } - if (type.flags & 512 /* BooleanLiteral */) { - return type === checker.getFalseType() || type === checker.getFalseType( - /*fresh*/ - true - ) ? factory.createFalse() : factory.createTrue(); - } - if (type.flags & 65536 /* Null */) { - return factory.createNull(); - } - if (type.flags & 1048576 /* Union */) { - const expression = firstDefined(type.types, (t) => tryGetValueFromType(context, checker, importAdder, quotePreference, t, enclosingDeclaration)); - return expression ?? createUndefined(); - } - if (checker.isArrayLikeType(type)) { - return factory.createArrayLiteralExpression(); - } - if (isObjectLiteralType(type)) { - const props = map(checker.getPropertiesOfType(type), (prop) => { - const initializer = tryGetValueFromType(context, checker, importAdder, quotePreference, checker.getTypeOfSymbol(prop), enclosingDeclaration); - return factory.createPropertyAssignment(prop.name, initializer); - }); - return factory.createObjectLiteralExpression( - props, - /*multiLine*/ - true - ); - } - if (getObjectFlags(type) & 16 /* Anonymous */) { - const decl = find(type.symbol.declarations || emptyArray, or(isFunctionTypeNode, isMethodSignature, isMethodDeclaration)); - if (decl === void 0) - return createUndefined(); - const signature = checker.getSignaturesOfType(type, 0 /* Call */); - if (signature === void 0) - return createUndefined(); - const func = createSignatureDeclarationFromSignature( - 218 /* FunctionExpression */, - context, - quotePreference, - signature[0], - createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference), - /*name*/ - void 0, - /*modifiers*/ - void 0, - /*optional*/ - void 0, - /*enclosingDeclaration*/ - enclosingDeclaration, - importAdder - ); - return func ?? createUndefined(); - } - if (getObjectFlags(type) & 1 /* Class */) { - const classDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); - if (classDeclaration === void 0 || hasAbstractModifier(classDeclaration)) - return createUndefined(); - const constructorDeclaration = getFirstConstructorWithBody(classDeclaration); - if (constructorDeclaration && length(constructorDeclaration.parameters)) - return createUndefined(); - return factory.createNewExpression( - factory.createIdentifier(type.symbol.name), - /*typeArguments*/ - void 0, - /*argumentsArray*/ - void 0 - ); - } - return createUndefined(); - } - function createUndefined() { - return factory.createIdentifier("undefined"); - } - function isObjectLiteralType(type) { - return type.flags & 524288 /* Object */ && (getObjectFlags(type) & 128 /* ObjectLiteral */ || type.symbol && tryCast(singleOrUndefined(type.symbol.declarations), isTypeLiteralNode)); - } - function getUnmatchedAttributes(checker, target, source) { - const attrsType = checker.getContextualType(source.attributes); - if (attrsType === void 0) - return emptyArray; - const targetProps = attrsType.getProperties(); - if (!length(targetProps)) - return emptyArray; - const seenNames = /* @__PURE__ */ new Set(); - for (const sourceProp of source.attributes.properties) { - if (isJsxAttribute(sourceProp)) { - seenNames.add(getEscapedTextOfJsxAttributeName(sourceProp.name)); - } - if (isJsxSpreadAttribute(sourceProp)) { - const type = checker.getTypeAtLocation(sourceProp.expression); - for (const prop of type.getProperties()) { - seenNames.add(prop.escapedName); - } - } - } - return filter(targetProps, (targetProp) => isIdentifierText(targetProp.name, target, 1 /* JSX */) && !(targetProp.flags & 16777216 /* Optional */ || getCheckFlags(targetProp) & 48 /* Partial */ || seenNames.has(targetProp.escapedName))); - } - function tryGetContainingMethodDeclaration(node, callExpression) { - if (isTypeLiteralNode(node)) { - return void 0; - } - const declaration = findAncestor(callExpression, (n) => isMethodDeclaration(n) || isConstructorDeclaration(n)); - return declaration && declaration.parent === node ? declaration : void 0; - } - function createPropertyNameFromSymbol(symbol, target, quotePreference, checker) { - if (isTransientSymbol(symbol)) { - const prop = checker.symbolToNode( - symbol, - 111551 /* Value */, - /*enclosingDeclaration*/ - void 0, - 1073741824 /* WriteComputedProps */ - ); - if (prop && isComputedPropertyName(prop)) - return prop; - } - return createPropertyNameNodeForIdentifierOrLiteral(symbol.name, target, quotePreference === 0 /* Single */); - } - function findScope(node) { - if (findAncestor(node, isJsxExpression)) { - const returnStatement = findAncestor(node.parent, isReturnStatement); - if (returnStatement) - return returnStatement; - } - return getSourceFileOfNode(node); - } - var fixMissingMember, fixMissingProperties, fixMissingAttributes, fixMissingFunctionDeclaration, errorCodes27; - var init_fixAddMissingMember = __esm({ - "src/services/codefixes/fixAddMissingMember.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixMissingMember = "fixMissingMember"; - fixMissingProperties = "fixMissingProperties"; - fixMissingAttributes = "fixMissingAttributes"; - fixMissingFunctionDeclaration = "fixMissingFunctionDeclaration"; - errorCodes27 = [ - Diagnostics.Property_0_does_not_exist_on_type_1.code, - Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, - Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2.code, - Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2.code, - Diagnostics.Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more.code, - Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, - Diagnostics.Cannot_find_name_0.code - ]; - registerCodeFix({ - errorCodes: errorCodes27, - getCodeActions(context) { - const typeChecker = context.program.getTypeChecker(); - const info = getInfo10(context.sourceFile, context.span.start, context.errorCode, typeChecker, context.program); - if (!info) { - return void 0; - } - if (info.kind === 3 /* ObjectLiteral */) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addObjectLiteralProperties(t, context, info)); - return [createCodeFixAction(fixMissingProperties, changes, Diagnostics.Add_missing_properties, fixMissingProperties, Diagnostics.Add_all_missing_properties)]; - } - if (info.kind === 4 /* JsxAttributes */) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addJsxAttributes(t, context, info)); - return [createCodeFixAction(fixMissingAttributes, changes, Diagnostics.Add_missing_attributes, fixMissingAttributes, Diagnostics.Add_all_missing_attributes)]; - } - if (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addFunctionDeclaration(t, context, info)); - return [createCodeFixAction(fixMissingFunctionDeclaration, changes, [Diagnostics.Add_missing_function_declaration_0, info.token.text], fixMissingFunctionDeclaration, Diagnostics.Add_all_missing_function_declarations)]; - } - if (info.kind === 1 /* Enum */) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addEnumMemberDeclaration(t, context.program.getTypeChecker(), info)); - return [createCodeFixAction(fixMissingMember, changes, [Diagnostics.Add_missing_enum_member_0, info.token.text], fixMissingMember, Diagnostics.Add_all_missing_members)]; - } - return concatenate(getActionsForMissingMethodDeclaration(context, info), getActionsForMissingMemberDeclaration(context, info)); - }, - fixIds: [fixMissingMember, fixMissingFunctionDeclaration, fixMissingProperties, fixMissingAttributes], - getAllCodeActions: (context) => { - const { program, fixId: fixId52 } = context; - const checker = program.getTypeChecker(); - const seen = /* @__PURE__ */ new Map(); - const typeDeclToMembers = /* @__PURE__ */ new Map(); - return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - eachDiagnostic(context, errorCodes27, (diag2) => { - const info = getInfo10(diag2.file, diag2.start, diag2.code, checker, context.program); - if (!info || !addToSeen(seen, getNodeId(info.parentDeclaration) + "#" + info.token.text)) { - return; - } - if (fixId52 === fixMissingFunctionDeclaration && (info.kind === 2 /* Function */ || info.kind === 5 /* Signature */)) { - addFunctionDeclaration(changes, context, info); - } else if (fixId52 === fixMissingProperties && info.kind === 3 /* ObjectLiteral */) { - addObjectLiteralProperties(changes, context, info); - } else if (fixId52 === fixMissingAttributes && info.kind === 4 /* JsxAttributes */) { - addJsxAttributes(changes, context, info); - } else { - if (info.kind === 1 /* Enum */) { - addEnumMemberDeclaration(changes, checker, info); - } - if (info.kind === 0 /* TypeLikeDeclaration */) { - const { parentDeclaration, token } = info; - const infos = getOrUpdate(typeDeclToMembers, parentDeclaration, () => []); - if (!infos.some((i) => i.token.text === token.text)) { - infos.push(info); - } - } - } - }); - typeDeclToMembers.forEach((infos, declaration) => { - const supers = isTypeLiteralNode(declaration) ? void 0 : getAllSupers(declaration, checker); - for (const info of infos) { - if (supers == null ? void 0 : supers.some((superClassOrInterface) => { - const superInfos = typeDeclToMembers.get(superClassOrInterface); - return !!superInfos && superInfos.some(({ token: token2 }) => token2.text === info.token.text); - })) - continue; - const { parentDeclaration, declSourceFile, modifierFlags, token, call, isJSFile } = info; - if (call && !isPrivateIdentifier(token)) { - addMethodDeclaration(context, changes, call, token, modifierFlags & 32 /* Static */, parentDeclaration, declSourceFile); - } else { - if (isJSFile && !isInterfaceDeclaration(parentDeclaration) && !isTypeLiteralNode(parentDeclaration)) { - addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, !!(modifierFlags & 32 /* Static */)); - } else { - const typeNode = getTypeNode2(checker, parentDeclaration, token); - addPropertyDeclaration(changes, declSourceFile, parentDeclaration, token.text, typeNode, modifierFlags & 32 /* Static */); - } - } - } - }); - })); - } - }); - } - }); - - // src/services/codefixes/fixAddMissingNewOperator.ts - function addMissingNewOperator(changes, sourceFile, span) { - const call = cast(findAncestorMatchingSpan2(sourceFile, span), isCallExpression); - const newExpression = factory.createNewExpression(call.expression, call.typeArguments, call.arguments); - changes.replaceNode(sourceFile, call, newExpression); - } - function findAncestorMatchingSpan2(sourceFile, span) { - let token = getTokenAtPosition(sourceFile, span.start); - const end = textSpanEnd(span); - while (token.end < end) { - token = token.parent; - } - return token; - } - var fixId24, errorCodes28; - var init_fixAddMissingNewOperator = __esm({ - "src/services/codefixes/fixAddMissingNewOperator.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId24 = "addMissingNewOperator"; - errorCodes28 = [Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code]; - registerCodeFix({ - errorCodes: errorCodes28, - getCodeActions(context) { - const { sourceFile, span } = context; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingNewOperator(t, sourceFile, span)); - return [createCodeFixAction(fixId24, changes, Diagnostics.Add_missing_new_operator_to_call, fixId24, Diagnostics.Add_missing_new_operator_to_all_calls)]; - }, - fixIds: [fixId24], - getAllCodeActions: (context) => codeFixAll(context, errorCodes28, (changes, diag2) => addMissingNewOperator(changes, context.sourceFile, diag2)) - }); - } - }); - - // src/services/codefixes/fixCannotFindModule.ts - function getInstallCommand(fileName, packageName) { - return { type: "install package", file: fileName, packageName }; - } - function tryGetImportedPackageName(sourceFile, pos) { - const moduleSpecifierText = tryCast(getTokenAtPosition(sourceFile, pos), isStringLiteral); - if (!moduleSpecifierText) - return void 0; - const moduleName = moduleSpecifierText.text; - const { packageName } = parsePackageName(moduleName); - return isExternalModuleNameRelative(packageName) ? void 0 : packageName; - } - function getTypesPackageNameToInstall(packageName, host, diagCode) { - var _a; - return diagCode === errorCodeCannotFindModule ? ts_JsTyping_exports.nodeCoreModules.has(packageName) ? "@types/node" : void 0 : ((_a = host.isKnownTypesPackageName) == null ? void 0 : _a.call(host, packageName)) ? getTypesPackageName(packageName) : void 0; - } - var fixName2, fixIdInstallTypesPackage, errorCodeCannotFindModule, errorCodes29; - var init_fixCannotFindModule = __esm({ - "src/services/codefixes/fixCannotFindModule.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixName2 = "fixCannotFindModule"; - fixIdInstallTypesPackage = "installTypesPackage"; - errorCodeCannotFindModule = Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code; - errorCodes29 = [ - errorCodeCannotFindModule, - Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type.code - ]; - registerCodeFix({ - errorCodes: errorCodes29, - getCodeActions: function getCodeActionsToFixNotFoundModule(context) { - const { host, sourceFile, span: { start } } = context; - const packageName = tryGetImportedPackageName(sourceFile, start); - if (packageName === void 0) - return void 0; - const typesPackageName = getTypesPackageNameToInstall(packageName, host, context.errorCode); - return typesPackageName === void 0 ? [] : [createCodeFixAction( - fixName2, - /*changes*/ - [], - [Diagnostics.Install_0, typesPackageName], - fixIdInstallTypesPackage, - Diagnostics.Install_all_missing_types_packages, - getInstallCommand(sourceFile.fileName, typesPackageName) - )]; - }, - fixIds: [fixIdInstallTypesPackage], - getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes29, (_changes, diag2, commands) => { - const packageName = tryGetImportedPackageName(diag2.file, diag2.start); - if (packageName === void 0) - return void 0; - switch (context.fixId) { - case fixIdInstallTypesPackage: { - const pkg = getTypesPackageNameToInstall(packageName, context.host, diag2.code); - if (pkg) { - commands.push(getInstallCommand(diag2.file.fileName, pkg)); - } - break; - } - default: - Debug.fail(`Bad fixId: ${context.fixId}`); - } - }); - } - }); - } - }); - - // src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts - function getClass2(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - return cast(token.parent, isClassLike); - } - function addMissingMembers(classDeclaration, sourceFile, context, changeTracker, preferences) { - const extendsNode = getEffectiveBaseTypeNode(classDeclaration); - const checker = context.program.getTypeChecker(); - const instantiatedExtendsType = checker.getTypeAtLocation(extendsNode); - const abstractAndNonPrivateExtendsSymbols = checker.getPropertiesOfType(instantiatedExtendsType).filter(symbolPointsToNonPrivateAndAbstractMember); - const importAdder = createImportAdder(sourceFile, context.program, preferences, context.host); - createMissingMemberNodes(classDeclaration, abstractAndNonPrivateExtendsSymbols, sourceFile, context, preferences, importAdder, (member) => changeTracker.insertMemberAtStart(sourceFile, classDeclaration, member)); - importAdder.writeFixes(changeTracker); - } - function symbolPointsToNonPrivateAndAbstractMember(symbol) { - const flags = getSyntacticModifierFlags(first(symbol.getDeclarations())); - return !(flags & 8 /* Private */) && !!(flags & 256 /* Abstract */); - } - var errorCodes30, fixId25; - var init_fixClassDoesntImplementInheritedAbstractMember = __esm({ - "src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - errorCodes30 = [ - Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1.code - ]; - fixId25 = "fixClassDoesntImplementInheritedAbstractMember"; - registerCodeFix({ - errorCodes: errorCodes30, - getCodeActions: function getCodeActionsToFixClassNotImplementingInheritedMembers(context) { - const { sourceFile, span } = context; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMembers(getClass2(sourceFile, span.start), sourceFile, context, t, context.preferences)); - return changes.length === 0 ? void 0 : [createCodeFixAction(fixId25, changes, Diagnostics.Implement_inherited_abstract_class, fixId25, Diagnostics.Implement_all_inherited_abstract_classes)]; - }, - fixIds: [fixId25], - getAllCodeActions: function getAllCodeActionsToFixClassDoesntImplementInheritedAbstractMember(context) { - const seenClassDeclarations = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes30, (changes, diag2) => { - const classDeclaration = getClass2(diag2.file, diag2.start); - if (addToSeen(seenClassDeclarations, getNodeId(classDeclaration))) { - addMissingMembers(classDeclaration, context.sourceFile, context, changes, context.preferences); - } - }); - } - }); - } - }); - - // src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts - function doChange19(changes, sourceFile, constructor, superCall) { - changes.insertNodeAtConstructorStart(sourceFile, constructor, superCall); - changes.delete(sourceFile, superCall); - } - function getNodes(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - if (token.kind !== 110 /* ThisKeyword */) - return void 0; - const constructor = getContainingFunction(token); - const superCall = findSuperCall(constructor.body); - return superCall && !superCall.expression.arguments.some((arg) => isPropertyAccessExpression(arg) && arg.expression === token) ? { constructor, superCall } : void 0; - } - function findSuperCall(n) { - return isExpressionStatement(n) && isSuperCall(n.expression) ? n : isFunctionLike(n) ? void 0 : forEachChild(n, findSuperCall); - } - var fixId26, errorCodes31; - var init_fixClassSuperMustPrecedeThisAccess = __esm({ - "src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId26 = "classSuperMustPrecedeThisAccess"; - errorCodes31 = [Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code]; - registerCodeFix({ - errorCodes: errorCodes31, - getCodeActions(context) { - const { sourceFile, span } = context; - const nodes = getNodes(sourceFile, span.start); - if (!nodes) - return void 0; - const { constructor, superCall } = nodes; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange19(t, sourceFile, constructor, superCall)); - return [createCodeFixAction(fixId26, changes, Diagnostics.Make_super_call_the_first_statement_in_the_constructor, fixId26, Diagnostics.Make_all_super_calls_the_first_statement_in_their_constructor)]; - }, - fixIds: [fixId26], - getAllCodeActions(context) { - const { sourceFile } = context; - const seenClasses = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes31, (changes, diag2) => { - const nodes = getNodes(diag2.file, diag2.start); - if (!nodes) - return; - const { constructor, superCall } = nodes; - if (addToSeen(seenClasses, getNodeId(constructor.parent))) { - doChange19(changes, sourceFile, constructor, superCall); - } - }); - } - }); - } - }); - - // src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts - function getNode(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - Debug.assert(isConstructorDeclaration(token.parent), "token should be at the constructor declaration"); - return token.parent; - } - function doChange20(changes, sourceFile, ctr) { - const superCall = factory.createExpressionStatement(factory.createCallExpression( - factory.createSuper(), - /*typeArguments*/ - void 0, - /*argumentsArray*/ - emptyArray - )); - changes.insertNodeAtConstructorStart(sourceFile, ctr, superCall); - } - var fixId27, errorCodes32; - var init_fixConstructorForDerivedNeedSuperCall = __esm({ - "src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId27 = "constructorForDerivedNeedSuperCall"; - errorCodes32 = [Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code]; - registerCodeFix({ - errorCodes: errorCodes32, - getCodeActions(context) { - const { sourceFile, span } = context; - const ctr = getNode(sourceFile, span.start); - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange20(t, sourceFile, ctr)); - return [createCodeFixAction(fixId27, changes, Diagnostics.Add_missing_super_call, fixId27, Diagnostics.Add_all_missing_super_calls)]; - }, - fixIds: [fixId27], - getAllCodeActions: (context) => codeFixAll(context, errorCodes32, (changes, diag2) => doChange20(changes, context.sourceFile, getNode(diag2.file, diag2.start))) - }); - } - }); - - // src/services/codefixes/fixEnableJsxFlag.ts - function doChange21(changeTracker, configFile) { - setJsonCompilerOptionValue(changeTracker, configFile, "jsx", factory.createStringLiteral("react")); - } - var fixID, errorCodes33; - var init_fixEnableJsxFlag = __esm({ - "src/services/codefixes/fixEnableJsxFlag.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixID = "fixEnableJsxFlag"; - errorCodes33 = [Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code]; - registerCodeFix({ - errorCodes: errorCodes33, - getCodeActions: function getCodeActionsToFixEnableJsxFlag(context) { - const { configFile } = context.program.getCompilerOptions(); - if (configFile === void 0) { - return void 0; - } - const changes = ts_textChanges_exports.ChangeTracker.with( - context, - (changeTracker) => doChange21(changeTracker, configFile) - ); - return [ - createCodeFixActionWithoutFixAll(fixID, changes, Diagnostics.Enable_the_jsx_flag_in_your_configuration_file) - ]; - }, - fixIds: [fixID], - getAllCodeActions: (context) => codeFixAll(context, errorCodes33, (changes) => { - const { configFile } = context.program.getCompilerOptions(); - if (configFile === void 0) { - return void 0; - } - doChange21(changes, configFile); - }) - }); - } - }); - - // src/services/codefixes/fixNaNEquality.ts - function getInfo11(program, sourceFile, span) { - const diag2 = find(program.getSemanticDiagnostics(sourceFile), (diag3) => diag3.start === span.start && diag3.length === span.length); - if (diag2 === void 0 || diag2.relatedInformation === void 0) - return; - const related = find(diag2.relatedInformation, (related2) => related2.code === Diagnostics.Did_you_mean_0.code); - if (related === void 0 || related.file === void 0 || related.start === void 0 || related.length === void 0) - return; - const token = findAncestorMatchingSpan(related.file, createTextSpan(related.start, related.length)); - if (token === void 0) - return; - if (isExpression(token) && isBinaryExpression(token.parent)) { - return { suggestion: getSuggestion(related.messageText), expression: token.parent, arg: token }; - } - return void 0; - } - function doChange22(changes, sourceFile, arg, expression) { - const callExpression = factory.createCallExpression( - factory.createPropertyAccessExpression(factory.createIdentifier("Number"), factory.createIdentifier("isNaN")), - /*typeArguments*/ - void 0, - [arg] - ); - const operator = expression.operatorToken.kind; - changes.replaceNode( - sourceFile, - expression, - operator === 38 /* ExclamationEqualsEqualsToken */ || operator === 36 /* ExclamationEqualsToken */ ? factory.createPrefixUnaryExpression(54 /* ExclamationToken */, callExpression) : callExpression - ); - } - function getSuggestion(messageText) { - const [_, suggestion] = flattenDiagnosticMessageText(messageText, "\n", 0).match(/'(.*)'/) || []; - return suggestion; - } - var fixId28, errorCodes34; - var init_fixNaNEquality = __esm({ - "src/services/codefixes/fixNaNEquality.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId28 = "fixNaNEquality"; - errorCodes34 = [ - Diagnostics.This_condition_will_always_return_0.code - ]; - registerCodeFix({ - errorCodes: errorCodes34, - getCodeActions(context) { - const { sourceFile, span, program } = context; - const info = getInfo11(program, sourceFile, span); - if (info === void 0) - return; - const { suggestion, expression, arg } = info; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange22(t, sourceFile, arg, expression)); - return [createCodeFixAction(fixId28, changes, [Diagnostics.Use_0, suggestion], fixId28, Diagnostics.Use_Number_isNaN_in_all_conditions)]; - }, - fixIds: [fixId28], - getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes34, (changes, diag2) => { - const info = getInfo11(context.program, diag2.file, createTextSpan(diag2.start, diag2.length)); - if (info) { - doChange22(changes, diag2.file, info.arg, info.expression); - } - }); - } - }); - } - }); - - // src/services/codefixes/fixModuleAndTargetOptions.ts - var init_fixModuleAndTargetOptions = __esm({ - "src/services/codefixes/fixModuleAndTargetOptions.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - registerCodeFix({ - errorCodes: [ - Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, - Diagnostics.Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code, - Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code - ], - getCodeActions: function getCodeActionsToFixModuleAndTarget(context) { - const compilerOptions = context.program.getCompilerOptions(); - const { configFile } = compilerOptions; - if (configFile === void 0) { - return void 0; - } - const codeFixes = []; - const moduleKind = getEmitModuleKind(compilerOptions); - const moduleOutOfRange = moduleKind >= 5 /* ES2015 */ && moduleKind < 99 /* ESNext */; - if (moduleOutOfRange) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => { - setJsonCompilerOptionValue(changes2, configFile, "module", factory.createStringLiteral("esnext")); - }); - codeFixes.push(createCodeFixActionWithoutFixAll("fixModuleOption", changes, [Diagnostics.Set_the_module_option_in_your_configuration_file_to_0, "esnext"])); - } - const target = getEmitScriptTarget(compilerOptions); - const targetOutOfRange = target < 4 /* ES2017 */ || target > 99 /* ESNext */; - if (targetOutOfRange) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { - const configObject = getTsConfigObjectLiteralExpression(configFile); - if (!configObject) - return; - const options = [["target", factory.createStringLiteral("es2017")]]; - if (moduleKind === 1 /* CommonJS */) { - options.push(["module", factory.createStringLiteral("commonjs")]); - } - setJsonCompilerOptionValues(tracker, configFile, options); - }); - codeFixes.push(createCodeFixActionWithoutFixAll("fixTargetOption", changes, [Diagnostics.Set_the_target_option_in_your_configuration_file_to_0, "es2017"])); - } - return codeFixes.length ? codeFixes : void 0; - } - }); - } - }); - - // src/services/codefixes/fixPropertyAssignment.ts - function doChange23(changes, sourceFile, node) { - changes.replaceNode(sourceFile, node, factory.createPropertyAssignment(node.name, node.objectAssignmentInitializer)); - } - function getProperty2(sourceFile, pos) { - return cast(getTokenAtPosition(sourceFile, pos).parent, isShorthandPropertyAssignment); - } - var fixId29, errorCodes35; - var init_fixPropertyAssignment = __esm({ - "src/services/codefixes/fixPropertyAssignment.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId29 = "fixPropertyAssignment"; - errorCodes35 = [ - 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 - ]; - registerCodeFix({ - errorCodes: errorCodes35, - fixIds: [fixId29], - getCodeActions(context) { - const { sourceFile, span } = context; - const property = getProperty2(sourceFile, span.start); - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange23(t, context.sourceFile, property)); - return [createCodeFixAction(fixId29, changes, [Diagnostics.Change_0_to_1, "=", ":"], fixId29, [Diagnostics.Switch_each_misused_0_to_1, "=", ":"])]; - }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes35, (changes, diag2) => doChange23(changes, diag2.file, getProperty2(diag2.file, diag2.start))) - }); - } - }); - - // src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts - function getNodes2(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - const heritageClauses = getContainingClass(token).heritageClauses; - const extendsToken = heritageClauses[0].getFirstToken(); - return extendsToken.kind === 96 /* ExtendsKeyword */ ? { extendsToken, heritageClauses } : void 0; - } - function doChanges2(changes, sourceFile, extendsToken, heritageClauses) { - changes.replaceNode(sourceFile, extendsToken, factory.createToken(119 /* ImplementsKeyword */)); - if (heritageClauses.length === 2 && heritageClauses[0].token === 96 /* ExtendsKeyword */ && heritageClauses[1].token === 119 /* ImplementsKeyword */) { - const implementsToken = heritageClauses[1].getFirstToken(); - const implementsFullStart = implementsToken.getFullStart(); - changes.replaceRange(sourceFile, { pos: implementsFullStart, end: implementsFullStart }, factory.createToken(28 /* CommaToken */)); - const text = sourceFile.text; - let end = implementsToken.end; - while (end < text.length && isWhiteSpaceSingleLine(text.charCodeAt(end))) { - end++; - } - changes.deleteRange(sourceFile, { pos: implementsToken.getStart(), end }); - } - } - var fixId30, errorCodes36; - var init_fixExtendsInterfaceBecomesImplements = __esm({ - "src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId30 = "extendsInterfaceBecomesImplements"; - errorCodes36 = [Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code]; - registerCodeFix({ - errorCodes: errorCodes36, - getCodeActions(context) { - const { sourceFile } = context; - const nodes = getNodes2(sourceFile, context.span.start); - if (!nodes) - return void 0; - const { extendsToken, heritageClauses } = nodes; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChanges2(t, sourceFile, extendsToken, heritageClauses)); - return [createCodeFixAction(fixId30, changes, Diagnostics.Change_extends_to_implements, fixId30, Diagnostics.Change_all_extended_interfaces_to_implements)]; - }, - fixIds: [fixId30], - getAllCodeActions: (context) => codeFixAll(context, errorCodes36, (changes, diag2) => { - const nodes = getNodes2(diag2.file, diag2.start); - if (nodes) - doChanges2(changes, diag2.file, nodes.extendsToken, nodes.heritageClauses); - }) - }); - } - }); - - // src/services/codefixes/fixForgottenThisPropertyAccess.ts - function getInfo12(sourceFile, pos, diagCode) { - const node = getTokenAtPosition(sourceFile, pos); - if (isIdentifier(node) || isPrivateIdentifier(node)) { - return { node, className: diagCode === didYouMeanStaticMemberCode ? getContainingClass(node).name.text : void 0 }; - } - } - function doChange24(changes, sourceFile, { node, className }) { - suppressLeadingAndTrailingTrivia(node); - changes.replaceNode(sourceFile, node, factory.createPropertyAccessExpression(className ? factory.createIdentifier(className) : factory.createThis(), node)); - } - var fixId31, didYouMeanStaticMemberCode, errorCodes37; - var init_fixForgottenThisPropertyAccess = __esm({ - "src/services/codefixes/fixForgottenThisPropertyAccess.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId31 = "forgottenThisPropertyAccess"; - didYouMeanStaticMemberCode = Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code; - errorCodes37 = [ - Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, - Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression.code, - didYouMeanStaticMemberCode - ]; - registerCodeFix({ - errorCodes: errorCodes37, - getCodeActions(context) { - const { sourceFile } = context; - const info = getInfo12(sourceFile, context.span.start, context.errorCode); - if (!info) { - return void 0; - } - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange24(t, sourceFile, info)); - return [createCodeFixAction(fixId31, changes, [Diagnostics.Add_0_to_unresolved_variable, info.className || "this"], fixId31, Diagnostics.Add_qualifier_to_all_unresolved_variables_matching_a_member_name)]; - }, - fixIds: [fixId31], - getAllCodeActions: (context) => codeFixAll(context, errorCodes37, (changes, diag2) => { - const info = getInfo12(diag2.file, diag2.start, diag2.code); - if (info) - doChange24(changes, context.sourceFile, info); - }) - }); - } - }); - - // src/services/codefixes/fixInvalidJsxCharacters.ts - function isValidCharacter(character) { - return hasProperty(htmlEntity, character); - } - function doChange25(changes, preferences, sourceFile, start, useHtmlEntity) { - const character = sourceFile.getText()[start]; - if (!isValidCharacter(character)) { - return; - } - const replacement = useHtmlEntity ? htmlEntity[character] : `{${quote(sourceFile, preferences, character)}}`; - changes.replaceRangeWithText(sourceFile, { pos: start, end: start + 1 }, replacement); - } - var fixIdExpression, fixIdHtmlEntity, errorCodes38, htmlEntity; - var init_fixInvalidJsxCharacters = __esm({ - "src/services/codefixes/fixInvalidJsxCharacters.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixIdExpression = "fixInvalidJsxCharacters_expression"; - fixIdHtmlEntity = "fixInvalidJsxCharacters_htmlEntity"; - errorCodes38 = [ - Diagnostics.Unexpected_token_Did_you_mean_or_gt.code, - Diagnostics.Unexpected_token_Did_you_mean_or_rbrace.code - ]; - registerCodeFix({ - errorCodes: errorCodes38, - fixIds: [fixIdExpression, fixIdHtmlEntity], - getCodeActions(context) { - const { sourceFile, preferences, span } = context; - const changeToExpression = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange25( - t, - preferences, - sourceFile, - span.start, - /*useHtmlEntity*/ - false - )); - const changeToHtmlEntity = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange25( - t, - preferences, - sourceFile, - span.start, - /*useHtmlEntity*/ - true - )); - return [ - createCodeFixAction(fixIdExpression, changeToExpression, Diagnostics.Wrap_invalid_character_in_an_expression_container, fixIdExpression, Diagnostics.Wrap_all_invalid_characters_in_an_expression_container), - createCodeFixAction(fixIdHtmlEntity, changeToHtmlEntity, Diagnostics.Convert_invalid_character_to_its_html_entity_code, fixIdHtmlEntity, Diagnostics.Convert_all_invalid_characters_to_HTML_entity_code) - ]; - }, - getAllCodeActions(context) { - return codeFixAll(context, errorCodes38, (changes, diagnostic) => doChange25(changes, context.preferences, diagnostic.file, diagnostic.start, context.fixId === fixIdHtmlEntity)); - } - }); - htmlEntity = { - ">": ">", - "}": "}" - }; - } - }); - - // src/services/codefixes/fixUnmatchedParameter.ts - function getDeleteAction(context, { name, jsDocHost, jsDocParameterTag }) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.filterJSDocTags(context.sourceFile, jsDocHost, (t) => t !== jsDocParameterTag)); - return createCodeFixAction( - deleteUnmatchedParameter, - changes, - [Diagnostics.Delete_unused_param_tag_0, name.getText(context.sourceFile)], - deleteUnmatchedParameter, - Diagnostics.Delete_all_unused_param_tags - ); - } - function getRenameAction(context, { name, jsDocHost, signature, jsDocParameterTag }) { - if (!length(signature.parameters)) - return void 0; - const sourceFile = context.sourceFile; - const tags = getJSDocTags(signature); - const names = /* @__PURE__ */ new Set(); - for (const tag of tags) { - if (isJSDocParameterTag(tag) && isIdentifier(tag.name)) { - names.add(tag.name.escapedText); - } - } - const parameterName = firstDefined(signature.parameters, (p) => isIdentifier(p.name) && !names.has(p.name.escapedText) ? p.name.getText(sourceFile) : void 0); - if (parameterName === void 0) - return void 0; - const newJSDocParameterTag = factory.updateJSDocParameterTag( - jsDocParameterTag, - jsDocParameterTag.tagName, - factory.createIdentifier(parameterName), - jsDocParameterTag.isBracketed, - jsDocParameterTag.typeExpression, - jsDocParameterTag.isNameFirst, - jsDocParameterTag.comment - ); - const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => changeTracker.replaceJSDocComment(sourceFile, jsDocHost, map(tags, (t) => t === jsDocParameterTag ? newJSDocParameterTag : t))); - return createCodeFixActionWithoutFixAll(renameUnmatchedParameter, changes, [Diagnostics.Rename_param_tag_name_0_to_1, name.getText(sourceFile), parameterName]); - } - function getInfo13(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - if (token.parent && isJSDocParameterTag(token.parent) && isIdentifier(token.parent.name)) { - const jsDocParameterTag = token.parent; - const jsDocHost = getJSDocHost(jsDocParameterTag); - const signature = getHostSignatureFromJSDoc(jsDocParameterTag); - if (jsDocHost && signature) { - return { jsDocHost, signature, name: token.parent.name, jsDocParameterTag }; - } - } - return void 0; - } - var deleteUnmatchedParameter, renameUnmatchedParameter, errorCodes39; - var init_fixUnmatchedParameter = __esm({ - "src/services/codefixes/fixUnmatchedParameter.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - deleteUnmatchedParameter = "deleteUnmatchedParameter"; - renameUnmatchedParameter = "renameUnmatchedParameter"; - errorCodes39 = [ - Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name.code - ]; - registerCodeFix({ - fixIds: [deleteUnmatchedParameter, renameUnmatchedParameter], - errorCodes: errorCodes39, - getCodeActions: function getCodeActionsToFixUnmatchedParameter(context) { - const { sourceFile, span } = context; - const actions2 = []; - const info = getInfo13(sourceFile, span.start); - if (info) { - append(actions2, getDeleteAction(context, info)); - append(actions2, getRenameAction(context, info)); - return actions2; - } - return void 0; - }, - getAllCodeActions: function getAllCodeActionsToFixUnmatchedParameter(context) { - const tagsToSignature = /* @__PURE__ */ new Map(); - return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - eachDiagnostic(context, errorCodes39, ({ file, start }) => { - const info = getInfo13(file, start); - if (info) { - tagsToSignature.set(info.signature, append(tagsToSignature.get(info.signature), info.jsDocParameterTag)); - } - }); - tagsToSignature.forEach((tags, signature) => { - if (context.fixId === deleteUnmatchedParameter) { - const tagsSet = new Set(tags); - changes.filterJSDocTags(signature.getSourceFile(), signature, (t) => !tagsSet.has(t)); - } - }); - })); - } - }); - } - }); - - // src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts - function getImportDeclaration(sourceFile, program, start) { - const identifier = tryCast(getTokenAtPosition(sourceFile, start), isIdentifier); - if (!identifier || identifier.parent.kind !== 183 /* TypeReference */) - return; - const checker = program.getTypeChecker(); - const symbol = checker.getSymbolAtLocation(identifier); - return find((symbol == null ? void 0 : symbol.declarations) || emptyArray, or(isImportClause, isImportSpecifier, isImportEqualsDeclaration)); - } - function doTypeOnlyImportChange(changes, sourceFile, importDeclaration, program) { - if (importDeclaration.kind === 271 /* ImportEqualsDeclaration */) { - changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, importDeclaration.name); - return; - } - const importClause = importDeclaration.kind === 273 /* ImportClause */ ? importDeclaration : importDeclaration.parent.parent; - if (importClause.name && importClause.namedBindings) { - return; - } - const checker = program.getTypeChecker(); - const importsValue = !!forEachImportClauseDeclaration(importClause, (decl) => { - if (skipAlias(decl.symbol, checker).flags & 111551 /* Value */) - return true; - }); - if (importsValue) { - return; - } - changes.insertModifierBefore(sourceFile, 156 /* TypeKeyword */, importClause); - } - function doNamespaceImportChange(changes, sourceFile, importDeclaration, program) { - ts_refactor_exports.doChangeNamedToNamespaceOrDefault(sourceFile, program, changes, importDeclaration.parent); - } - var fixId32, errorCodes40; - var init_fixUnreferenceableDecoratorMetadata = __esm({ - "src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId32 = "fixUnreferenceableDecoratorMetadata"; - errorCodes40 = [Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code]; - registerCodeFix({ - errorCodes: errorCodes40, - getCodeActions: (context) => { - const importDeclaration = getImportDeclaration(context.sourceFile, context.program, context.span.start); - if (!importDeclaration) - return; - const namespaceChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => importDeclaration.kind === 276 /* ImportSpecifier */ && doNamespaceImportChange(t, context.sourceFile, importDeclaration, context.program)); - const typeOnlyChanges = ts_textChanges_exports.ChangeTracker.with(context, (t) => doTypeOnlyImportChange(t, context.sourceFile, importDeclaration, context.program)); - let actions2; - if (namespaceChanges.length) { - actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, namespaceChanges, Diagnostics.Convert_named_imports_to_namespace_import)); - } - if (typeOnlyChanges.length) { - actions2 = append(actions2, createCodeFixActionWithoutFixAll(fixId32, typeOnlyChanges, Diagnostics.Use_import_type)); - } - return actions2; - }, - fixIds: [fixId32] - }); - } - }); - - // src/services/codefixes/fixUnusedIdentifier.ts - function changeInferToUnknown(changes, sourceFile, token) { - changes.replaceNode(sourceFile, token.parent, factory.createKeywordTypeNode(159 /* UnknownKeyword */)); - } - function createDeleteFix(changes, diag2) { - return createCodeFixAction(fixName3, changes, diag2, fixIdDelete, Diagnostics.Delete_all_unused_declarations); - } - function deleteTypeParameters(changes, sourceFile, token) { - changes.delete(sourceFile, Debug.checkDefined(cast(token.parent, isDeclarationWithTypeParameterChildren).typeParameters, "The type parameter to delete should exist")); - } - function isImport(token) { - return token.kind === 102 /* ImportKeyword */ || token.kind === 80 /* Identifier */ && (token.parent.kind === 276 /* ImportSpecifier */ || token.parent.kind === 273 /* ImportClause */); - } - function tryGetFullImport(token) { - return token.kind === 102 /* ImportKeyword */ ? tryCast(token.parent, isImportDeclaration) : void 0; - } - function canDeleteEntireVariableStatement(sourceFile, token) { - return isVariableDeclarationList(token.parent) && first(token.parent.getChildren(sourceFile)) === token; - } - function deleteEntireVariableStatement(changes, sourceFile, node) { - changes.delete(sourceFile, node.parent.kind === 243 /* VariableStatement */ ? node.parent : node); - } - function deleteDestructuringElements(changes, sourceFile, node) { - forEach(node.elements, (n) => changes.delete(sourceFile, n)); - } - function deleteDestructuring(context, changes, sourceFile, { parent: parent2 }) { - if (isVariableDeclaration(parent2) && parent2.initializer && isCallLikeExpression(parent2.initializer)) { - if (isVariableDeclarationList(parent2.parent) && length(parent2.parent.declarations) > 1) { - const varStatement = parent2.parent.parent; - const pos = varStatement.getStart(sourceFile); - const end = varStatement.end; - changes.delete(sourceFile, parent2); - changes.insertNodeAt(sourceFile, end, parent2.initializer, { - prefix: getNewLineOrDefaultFromHost(context.host, context.formatContext.options) + sourceFile.text.slice(getPrecedingNonSpaceCharacterPosition(sourceFile.text, pos - 1), pos), - suffix: probablyUsesSemicolons(sourceFile) ? ";" : "" - }); - } else { - changes.replaceNode(sourceFile, parent2.parent, parent2.initializer); - } - } else { - changes.delete(sourceFile, parent2); - } - } - function tryPrefixDeclaration(changes, errorCode, sourceFile, token) { - if (errorCode === Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code) - return; - if (token.kind === 140 /* InferKeyword */) { - token = cast(token.parent, isInferTypeNode).typeParameter.name; - } - if (isIdentifier(token) && canPrefix(token)) { - changes.replaceNode(sourceFile, token, factory.createIdentifier(`_${token.text}`)); - if (isParameter(token.parent)) { - getJSDocParameterTags(token.parent).forEach((tag) => { - if (isIdentifier(tag.name)) { - changes.replaceNode(sourceFile, tag.name, factory.createIdentifier(`_${tag.name.text}`)); - } - }); - } - } - } - function canPrefix(token) { - switch (token.parent.kind) { - case 169 /* Parameter */: - case 168 /* TypeParameter */: - return true; - case 260 /* VariableDeclaration */: { - const varDecl = token.parent; - switch (varDecl.parent.parent.kind) { - case 250 /* ForOfStatement */: - case 249 /* ForInStatement */: - return true; - } - } - } - return false; - } - function tryDeleteDeclaration(sourceFile, token, changes, checker, sourceFiles, program, cancellationToken, isFixAll) { - tryDeleteDeclarationWorker(token, changes, sourceFile, checker, sourceFiles, program, cancellationToken, isFixAll); - if (isIdentifier(token)) { - ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(token, checker, sourceFile, (ref) => { - if (isPropertyAccessExpression(ref.parent) && ref.parent.name === ref) - ref = ref.parent; - if (!isFixAll && mayDeleteExpression(ref)) { - changes.delete(sourceFile, ref.parent.parent); - } - }); - } - } - function tryDeleteDeclarationWorker(token, changes, sourceFile, checker, sourceFiles, program, cancellationToken, isFixAll) { - const { parent: parent2 } = token; - if (isParameter(parent2)) { - tryDeleteParameter(changes, sourceFile, parent2, checker, sourceFiles, program, cancellationToken, isFixAll); - } else if (!(isFixAll && isIdentifier(token) && ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(token, checker, sourceFile))) { - const node = isImportClause(parent2) ? token : isComputedPropertyName(parent2) ? parent2.parent : parent2; - Debug.assert(node !== sourceFile, "should not delete whole source file"); - changes.delete(sourceFile, node); - } - } - function tryDeleteParameter(changes, sourceFile, parameter, checker, sourceFiles, program, cancellationToken, isFixAll = false) { - if (mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll)) { - if (parameter.modifiers && parameter.modifiers.length > 0 && (!isIdentifier(parameter.name) || ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(parameter.name, checker, sourceFile))) { - for (const modifier of parameter.modifiers) { - if (isModifier(modifier)) { - changes.deleteModifier(sourceFile, modifier); - } - } - } else if (!parameter.initializer && isNotProvidedArguments(parameter, checker, sourceFiles)) { - changes.delete(sourceFile, parameter); - } - } - } - function isNotProvidedArguments(parameter, checker, sourceFiles) { - const index = parameter.parent.parameters.indexOf(parameter); - return !ts_FindAllReferences_exports.Core.someSignatureUsage(parameter.parent, sourceFiles, checker, (_, call) => !call || call.arguments.length > index); - } - function mayDeleteParameter(checker, sourceFile, parameter, sourceFiles, program, cancellationToken, isFixAll) { - const { parent: parent2 } = parameter; - switch (parent2.kind) { - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - const index = parent2.parameters.indexOf(parameter); - const referent = isMethodDeclaration(parent2) ? parent2.name : parent2; - const entries = ts_FindAllReferences_exports.Core.getReferencedSymbolsForNode(parent2.pos, referent, program, sourceFiles, cancellationToken); - if (entries) { - for (const entry of entries) { - for (const reference of entry.references) { - if (reference.kind === ts_FindAllReferences_exports.EntryKind.Node) { - const isSuperCall2 = isSuperKeyword(reference.node) && isCallExpression(reference.node.parent) && reference.node.parent.arguments.length > index; - const isSuperMethodCall = isPropertyAccessExpression(reference.node.parent) && isSuperKeyword(reference.node.parent.expression) && isCallExpression(reference.node.parent.parent) && reference.node.parent.parent.arguments.length > index; - const isOverriddenMethod = (isMethodDeclaration(reference.node.parent) || isMethodSignature(reference.node.parent)) && reference.node.parent !== parameter.parent && reference.node.parent.parameters.length > index; - if (isSuperCall2 || isSuperMethodCall || isOverriddenMethod) - return false; - } - } - } - } - return true; - case 262 /* FunctionDeclaration */: { - if (parent2.name && isCallbackLike(checker, sourceFile, parent2.name)) { - return isLastParameter(parent2, parameter, isFixAll); - } - return true; - } - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return isLastParameter(parent2, parameter, isFixAll); - case 178 /* SetAccessor */: - return false; - case 177 /* GetAccessor */: - return true; - default: - return Debug.failBadSyntaxKind(parent2); - } - } - function isCallbackLike(checker, sourceFile, name) { - return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.indexOf(reference) >= 0); - } - function isLastParameter(func, parameter, isFixAll) { - const parameters = func.parameters; - const index = parameters.indexOf(parameter); - Debug.assert(index !== -1, "The parameter should already be in the list"); - return isFixAll ? parameters.slice(index + 1).every((p) => isIdentifier(p.name) && !p.symbol.isReferenced) : index === parameters.length - 1; - } - function mayDeleteExpression(node) { - return (isBinaryExpression(node.parent) && node.parent.left === node || (isPostfixUnaryExpression(node.parent) || isPrefixUnaryExpression(node.parent)) && node.parent.operand === node) && isExpressionStatement(node.parent.parent); - } - var fixName3, fixIdPrefix, fixIdDelete, fixIdDeleteImports, fixIdInfer, errorCodes41; - var init_fixUnusedIdentifier = __esm({ - "src/services/codefixes/fixUnusedIdentifier.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixName3 = "unusedIdentifier"; - fixIdPrefix = "unusedIdentifier_prefix"; - fixIdDelete = "unusedIdentifier_delete"; - fixIdDeleteImports = "unusedIdentifier_deleteImports"; - fixIdInfer = "unusedIdentifier_infer"; - errorCodes41 = [ - Diagnostics._0_is_declared_but_its_value_is_never_read.code, - Diagnostics._0_is_declared_but_never_used.code, - Diagnostics.Property_0_is_declared_but_its_value_is_never_read.code, - Diagnostics.All_imports_in_import_declaration_are_unused.code, - Diagnostics.All_destructured_elements_are_unused.code, - Diagnostics.All_variables_are_unused.code, - Diagnostics.All_type_parameters_are_unused.code - ]; - registerCodeFix({ - errorCodes: errorCodes41, - getCodeActions(context) { - const { errorCode, sourceFile, program, cancellationToken } = context; - const checker = program.getTypeChecker(); - const sourceFiles = program.getSourceFiles(); - const token = getTokenAtPosition(sourceFile, context.span.start); - if (isJSDocTemplateTag(token)) { - return [createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => t.delete(sourceFile, token)), Diagnostics.Remove_template_tag)]; - } - if (token.kind === 30 /* LessThanToken */) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteTypeParameters(t, sourceFile, token)); - return [createDeleteFix(changes, Diagnostics.Remove_type_parameters)]; - } - const importDecl = tryGetFullImport(token); - if (importDecl) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => t.delete(sourceFile, importDecl)); - return [createCodeFixAction(fixName3, changes, [Diagnostics.Remove_import_from_0, showModuleSpecifier(importDecl)], fixIdDeleteImports, Diagnostics.Delete_all_unused_imports)]; - } else if (isImport(token)) { - const deletion = ts_textChanges_exports.ChangeTracker.with(context, (t) => tryDeleteDeclaration( - sourceFile, - token, - t, - checker, - sourceFiles, - program, - cancellationToken, - /*isFixAll*/ - false - )); - if (deletion.length) { - return [createCodeFixAction(fixName3, deletion, [Diagnostics.Remove_unused_declaration_for_Colon_0, token.getText(sourceFile)], fixIdDeleteImports, Diagnostics.Delete_all_unused_imports)]; - } - } - if (isObjectBindingPattern(token.parent) || isArrayBindingPattern(token.parent)) { - if (isParameter(token.parent.parent)) { - const elements = token.parent.elements; - const diagnostic = [ - elements.length > 1 ? Diagnostics.Remove_unused_declarations_for_Colon_0 : Diagnostics.Remove_unused_declaration_for_Colon_0, - map(elements, (e) => e.getText(sourceFile)).join(", ") - ]; - return [ - createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteDestructuringElements(t, sourceFile, token.parent)), diagnostic) - ]; - } - return [ - createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteDestructuring(context, t, sourceFile, token.parent)), Diagnostics.Remove_unused_destructuring_declaration) - ]; - } - if (canDeleteEntireVariableStatement(sourceFile, token)) { - return [ - createDeleteFix(ts_textChanges_exports.ChangeTracker.with(context, (t) => deleteEntireVariableStatement(t, sourceFile, token.parent)), Diagnostics.Remove_variable_statement) - ]; - } - const result = []; - if (token.kind === 140 /* InferKeyword */) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => changeInferToUnknown(t, sourceFile, token)); - const name = cast(token.parent, isInferTypeNode).typeParameter.name.text; - result.push(createCodeFixAction(fixName3, changes, [Diagnostics.Replace_infer_0_with_unknown, name], fixIdInfer, Diagnostics.Replace_all_unused_infer_with_unknown)); - } else { - const deletion = ts_textChanges_exports.ChangeTracker.with(context, (t) => tryDeleteDeclaration( - sourceFile, - token, - t, - checker, - sourceFiles, - program, - cancellationToken, - /*isFixAll*/ - false - )); - if (deletion.length) { - const name = isComputedPropertyName(token.parent) ? token.parent : token; - result.push(createDeleteFix(deletion, [Diagnostics.Remove_unused_declaration_for_Colon_0, name.getText(sourceFile)])); - } - } - const prefix = ts_textChanges_exports.ChangeTracker.with(context, (t) => tryPrefixDeclaration(t, errorCode, sourceFile, token)); - if (prefix.length) { - result.push(createCodeFixAction(fixName3, prefix, [Diagnostics.Prefix_0_with_an_underscore, token.getText(sourceFile)], fixIdPrefix, Diagnostics.Prefix_all_unused_declarations_with_where_possible)); - } - return result; - }, - fixIds: [fixIdPrefix, fixIdDelete, fixIdDeleteImports, fixIdInfer], - getAllCodeActions: (context) => { - const { sourceFile, program, cancellationToken } = context; - const checker = program.getTypeChecker(); - const sourceFiles = program.getSourceFiles(); - return codeFixAll(context, errorCodes41, (changes, diag2) => { - const token = getTokenAtPosition(sourceFile, diag2.start); - switch (context.fixId) { - case fixIdPrefix: - tryPrefixDeclaration(changes, diag2.code, sourceFile, token); - break; - case fixIdDeleteImports: { - const importDecl = tryGetFullImport(token); - if (importDecl) { - changes.delete(sourceFile, importDecl); - } else if (isImport(token)) { - tryDeleteDeclaration( - sourceFile, - token, - changes, - checker, - sourceFiles, - program, - cancellationToken, - /*isFixAll*/ - true - ); - } - break; - } - case fixIdDelete: { - if (token.kind === 140 /* InferKeyword */ || isImport(token)) { - break; - } else if (isJSDocTemplateTag(token)) { - changes.delete(sourceFile, token); - } else if (token.kind === 30 /* LessThanToken */) { - deleteTypeParameters(changes, sourceFile, token); - } else if (isObjectBindingPattern(token.parent)) { - if (token.parent.parent.initializer) { - break; - } else if (!isParameter(token.parent.parent) || isNotProvidedArguments(token.parent.parent, checker, sourceFiles)) { - changes.delete(sourceFile, token.parent.parent); - } - } else if (isArrayBindingPattern(token.parent.parent) && token.parent.parent.parent.initializer) { - break; - } else if (canDeleteEntireVariableStatement(sourceFile, token)) { - deleteEntireVariableStatement(changes, sourceFile, token.parent); - } else { - tryDeleteDeclaration( - sourceFile, - token, - changes, - checker, - sourceFiles, - program, - cancellationToken, - /*isFixAll*/ - true - ); - } - break; - } - case fixIdInfer: - if (token.kind === 140 /* InferKeyword */) { - changeInferToUnknown(changes, sourceFile, token); - } - break; - default: - Debug.fail(JSON.stringify(context.fixId)); - } - }); - } - }); - } - }); - - // src/services/codefixes/fixUnreachableCode.ts - function doChange26(changes, sourceFile, start, length2, errorCode) { - const token = getTokenAtPosition(sourceFile, start); - const statement = findAncestor(token, isStatement); - if (statement.getStart(sourceFile) !== token.getStart(sourceFile)) { - const logData = JSON.stringify({ - statementKind: Debug.formatSyntaxKind(statement.kind), - tokenKind: Debug.formatSyntaxKind(token.kind), - errorCode, - start, - length: length2 - }); - Debug.fail("Token and statement should start at the same point. " + logData); - } - const container = (isBlock(statement.parent) ? statement.parent : statement).parent; - if (!isBlock(statement.parent) || statement === first(statement.parent.statements)) { - switch (container.kind) { - case 245 /* IfStatement */: - if (container.elseStatement) { - if (isBlock(statement.parent)) { - break; - } else { - changes.replaceNode(sourceFile, statement, factory.createBlock(emptyArray)); - } - return; - } - case 247 /* WhileStatement */: - case 248 /* ForStatement */: - changes.delete(sourceFile, container); - return; - } - } - if (isBlock(statement.parent)) { - const end = start + length2; - const lastStatement = Debug.checkDefined(lastWhere(sliceAfter(statement.parent.statements, statement), (s) => s.pos < end), "Some statement should be last"); - changes.deleteNodeRange(sourceFile, statement, lastStatement); - } else { - changes.delete(sourceFile, statement); - } - } - function lastWhere(a, pred) { - let last2; - for (const value of a) { - if (!pred(value)) - break; - last2 = value; - } - return last2; - } - var fixId33, errorCodes42; - var init_fixUnreachableCode = __esm({ - "src/services/codefixes/fixUnreachableCode.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId33 = "fixUnreachableCode"; - errorCodes42 = [Diagnostics.Unreachable_code_detected.code]; - registerCodeFix({ - errorCodes: errorCodes42, - getCodeActions(context) { - const syntacticDiagnostics = context.program.getSyntacticDiagnostics(context.sourceFile, context.cancellationToken); - if (syntacticDiagnostics.length) - return; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange26(t, context.sourceFile, context.span.start, context.span.length, context.errorCode)); - return [createCodeFixAction(fixId33, changes, Diagnostics.Remove_unreachable_code, fixId33, Diagnostics.Remove_all_unreachable_code)]; - }, - fixIds: [fixId33], - getAllCodeActions: (context) => codeFixAll(context, errorCodes42, (changes, diag2) => doChange26(changes, diag2.file, diag2.start, diag2.length, diag2.code)) - }); - } - }); - - // src/services/codefixes/fixUnusedLabel.ts - function doChange27(changes, sourceFile, start) { - const token = getTokenAtPosition(sourceFile, start); - const labeledStatement = cast(token.parent, isLabeledStatement); - const pos = token.getStart(sourceFile); - const statementPos = labeledStatement.statement.getStart(sourceFile); - const end = positionsAreOnSameLine(pos, statementPos, sourceFile) ? statementPos : skipTrivia( - sourceFile.text, - findChildOfKind(labeledStatement, 59 /* ColonToken */, sourceFile).end, - /*stopAfterLineBreak*/ - true - ); - changes.deleteRange(sourceFile, { pos, end }); - } - var fixId34, errorCodes43; - var init_fixUnusedLabel = __esm({ - "src/services/codefixes/fixUnusedLabel.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId34 = "fixUnusedLabel"; - errorCodes43 = [Diagnostics.Unused_label.code]; - registerCodeFix({ - errorCodes: errorCodes43, - getCodeActions(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange27(t, context.sourceFile, context.span.start)); - return [createCodeFixAction(fixId34, changes, Diagnostics.Remove_unused_label, fixId34, Diagnostics.Remove_all_unused_labels)]; - }, - fixIds: [fixId34], - getAllCodeActions: (context) => codeFixAll(context, errorCodes43, (changes, diag2) => doChange27(changes, diag2.file, diag2.start)) - }); - } - }); - - // src/services/codefixes/fixJSDocTypes.ts - function doChange28(changes, sourceFile, oldTypeNode, newType, checker) { - changes.replaceNode(sourceFile, oldTypeNode, checker.typeToTypeNode( - newType, - /*enclosingDeclaration*/ - oldTypeNode, - /*flags*/ - void 0 - )); - } - function getInfo14(sourceFile, pos, checker) { - const decl = findAncestor(getTokenAtPosition(sourceFile, pos), isTypeContainer); - const typeNode = decl && decl.type; - return typeNode && { typeNode, type: getType(checker, typeNode) }; - } - function isTypeContainer(node) { - switch (node.kind) { - case 234 /* AsExpression */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 262 /* FunctionDeclaration */: - case 177 /* GetAccessor */: - case 181 /* IndexSignature */: - case 200 /* MappedType */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 169 /* Parameter */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 178 /* SetAccessor */: - case 265 /* TypeAliasDeclaration */: - case 216 /* TypeAssertionExpression */: - case 260 /* VariableDeclaration */: - return true; - default: - return false; - } - } - function getType(checker, node) { - if (isJSDocNullableType(node)) { - const type = checker.getTypeFromTypeNode(node.type); - if (type === checker.getNeverType() || type === checker.getVoidType()) { - return type; - } - return checker.getUnionType( - append([type, checker.getUndefinedType()], node.postfix ? void 0 : checker.getNullType()) - ); - } - return checker.getTypeFromTypeNode(node); - } - var fixIdPlain, fixIdNullable, errorCodes44; - var init_fixJSDocTypes = __esm({ - "src/services/codefixes/fixJSDocTypes.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixIdPlain = "fixJSDocTypes_plain"; - fixIdNullable = "fixJSDocTypes_nullable"; - errorCodes44 = [ - Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments.code, - Diagnostics._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code, - Diagnostics._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1.code - ]; - registerCodeFix({ - errorCodes: errorCodes44, - getCodeActions(context) { - const { sourceFile } = context; - const checker = context.program.getTypeChecker(); - const info = getInfo14(sourceFile, context.span.start, checker); - if (!info) - return void 0; - const { typeNode, type } = info; - const original = typeNode.getText(sourceFile); - const actions2 = [fix(type, fixIdPlain, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript)]; - if (typeNode.kind === 321 /* JSDocNullableType */) { - actions2.push(fix(type, fixIdNullable, Diagnostics.Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types)); - } - return actions2; - function fix(type2, fixId52, fixAllDescription) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange28(t, sourceFile, typeNode, type2, checker)); - return createCodeFixAction("jdocTypes", changes, [Diagnostics.Change_0_to_1, original, checker.typeToString(type2)], fixId52, fixAllDescription); - } - }, - fixIds: [fixIdPlain, fixIdNullable], - getAllCodeActions(context) { - const { fixId: fixId52, program, sourceFile } = context; - const checker = program.getTypeChecker(); - return codeFixAll(context, errorCodes44, (changes, err) => { - const info = getInfo14(err.file, err.start, checker); - if (!info) - return; - const { typeNode, type } = info; - const fixedType = typeNode.kind === 321 /* JSDocNullableType */ && fixId52 === fixIdNullable ? checker.getNullableType(type, 32768 /* Undefined */) : type; - doChange28(changes, sourceFile, typeNode, fixedType, checker); - }); - } - }); - } - }); - - // src/services/codefixes/fixMissingCallParentheses.ts - function doChange29(changes, sourceFile, name) { - changes.replaceNodeWithText(sourceFile, name, `${name.text}()`); - } - function getCallName(sourceFile, start) { - const token = getTokenAtPosition(sourceFile, start); - if (isPropertyAccessExpression(token.parent)) { - let current = token.parent; - while (isPropertyAccessExpression(current.parent)) { - current = current.parent; - } - return current.name; - } - if (isIdentifier(token)) { - return token; - } - return void 0; - } - var fixId35, errorCodes45; - var init_fixMissingCallParentheses = __esm({ - "src/services/codefixes/fixMissingCallParentheses.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId35 = "fixMissingCallParentheses"; - errorCodes45 = [ - Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead.code - ]; - registerCodeFix({ - errorCodes: errorCodes45, - fixIds: [fixId35], - getCodeActions(context) { - const { sourceFile, span } = context; - const callName = getCallName(sourceFile, span.start); - if (!callName) - return; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange29(t, context.sourceFile, callName)); - return [createCodeFixAction(fixId35, changes, Diagnostics.Add_missing_call_parentheses, fixId35, Diagnostics.Add_all_missing_call_parentheses)]; - }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes45, (changes, diag2) => { - const callName = getCallName(diag2.file, diag2.start); - if (callName) - doChange29(changes, diag2.file, callName); - }) - }); - } - }); - - // src/services/codefixes/fixAwaitInSyncFunction.ts - function getReturnType(expr) { - if (expr.type) { - return expr.type; - } - if (isVariableDeclaration(expr.parent) && expr.parent.type && isFunctionTypeNode(expr.parent.type)) { - return expr.parent.type.type; - } - } - function getNodes3(sourceFile, start) { - const token = getTokenAtPosition(sourceFile, start); - const containingFunction = getContainingFunction(token); - if (!containingFunction) { - return; - } - let insertBefore; - switch (containingFunction.kind) { - case 174 /* MethodDeclaration */: - insertBefore = containingFunction.name; - break; - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - insertBefore = findChildOfKind(containingFunction, 100 /* FunctionKeyword */, sourceFile); - break; - case 219 /* ArrowFunction */: - const kind = containingFunction.typeParameters ? 30 /* LessThanToken */ : 21 /* OpenParenToken */; - insertBefore = findChildOfKind(containingFunction, kind, sourceFile) || first(containingFunction.parameters); - break; - default: - return; - } - return insertBefore && { - insertBefore, - returnType: getReturnType(containingFunction) - }; - } - function doChange30(changes, sourceFile, { insertBefore, returnType }) { - if (returnType) { - const entityName = getEntityNameFromTypeNode(returnType); - if (!entityName || entityName.kind !== 80 /* Identifier */ || entityName.text !== "Promise") { - changes.replaceNode(sourceFile, returnType, factory.createTypeReferenceNode("Promise", factory.createNodeArray([returnType]))); - } - } - changes.insertModifierBefore(sourceFile, 134 /* AsyncKeyword */, insertBefore); - } - var fixId36, errorCodes46; - var init_fixAwaitInSyncFunction = __esm({ - "src/services/codefixes/fixAwaitInSyncFunction.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId36 = "fixAwaitInSyncFunction"; - errorCodes46 = [ - Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, - Diagnostics.await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, - Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code, - Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function.code - ]; - registerCodeFix({ - errorCodes: errorCodes46, - getCodeActions(context) { - const { sourceFile, span } = context; - const nodes = getNodes3(sourceFile, span.start); - if (!nodes) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange30(t, sourceFile, nodes)); - return [createCodeFixAction(fixId36, changes, Diagnostics.Add_async_modifier_to_containing_function, fixId36, Diagnostics.Add_all_missing_async_modifiers)]; - }, - fixIds: [fixId36], - getAllCodeActions: function getAllCodeActionsToFixAwaitInSyncFunction(context) { - const seen = /* @__PURE__ */ new Map(); - return codeFixAll(context, errorCodes46, (changes, diag2) => { - const nodes = getNodes3(diag2.file, diag2.start); - if (!nodes || !addToSeen(seen, getNodeId(nodes.insertBefore))) - return; - doChange30(changes, context.sourceFile, nodes); - }); - } - }); - } - }); - - // src/services/codefixes/fixPropertyOverrideAccessor.ts - function doChange31(file, start, length2, code, context) { - let startPosition; - let endPosition; - if (code === Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code) { - startPosition = start; - endPosition = start + length2; - } else if (code === Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code) { - const checker = context.program.getTypeChecker(); - const node = getTokenAtPosition(file, start).parent; - Debug.assert(isAccessor(node), "error span of fixPropertyOverrideAccessor should only be on an accessor"); - const containingClass = node.parent; - Debug.assert(isClassLike(containingClass), "erroneous accessors should only be inside classes"); - const base = singleOrUndefined(getAllSupers(containingClass, checker)); - if (!base) - return []; - const name = unescapeLeadingUnderscores(getTextOfPropertyName(node.name)); - const baseProp = checker.getPropertyOfType(checker.getTypeAtLocation(base), name); - if (!baseProp || !baseProp.valueDeclaration) - return []; - startPosition = baseProp.valueDeclaration.pos; - endPosition = baseProp.valueDeclaration.end; - file = getSourceFileOfNode(baseProp.valueDeclaration); - } else { - Debug.fail("fixPropertyOverrideAccessor codefix got unexpected error code " + code); - } - return generateAccessorFromProperty(file, context.program, startPosition, endPosition, context, Diagnostics.Generate_get_and_set_accessors.message); - } - var errorCodes47, fixId37; - var init_fixPropertyOverrideAccessor = __esm({ - "src/services/codefixes/fixPropertyOverrideAccessor.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - errorCodes47 = [ - Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code, - Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor.code - ]; - fixId37 = "fixPropertyOverrideAccessor"; - registerCodeFix({ - errorCodes: errorCodes47, - getCodeActions(context) { - const edits = doChange31(context.sourceFile, context.span.start, context.span.length, context.errorCode, context); - if (edits) { - return [createCodeFixAction(fixId37, edits, Diagnostics.Generate_get_and_set_accessors, fixId37, Diagnostics.Generate_get_and_set_accessors_for_all_overriding_properties)]; - } - }, - fixIds: [fixId37], - getAllCodeActions: (context) => codeFixAll(context, errorCodes47, (changes, diag2) => { - const edits = doChange31(diag2.file, diag2.start, diag2.length, diag2.code, context); - if (edits) { - for (const edit of edits) { - changes.pushRaw(context.sourceFile, edit); - } - } - }) - }); - } - }); - - // src/services/codefixes/inferFromUsage.ts - function getDiagnostic(errorCode, token) { - switch (errorCode) { - case Diagnostics.Parameter_0_implicitly_has_an_1_type.code: - case Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: - return isSetAccessorDeclaration(getContainingFunction(token)) ? Diagnostics.Infer_type_of_0_from_usage : Diagnostics.Infer_parameter_types_from_usage; - case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: - case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code: - return Diagnostics.Infer_parameter_types_from_usage; - case Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: - return Diagnostics.Infer_this_type_of_0_from_usage; - default: - return Diagnostics.Infer_type_of_0_from_usage; - } - } - function mapSuggestionDiagnostic(errorCode) { - switch (errorCode) { - case Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code: - return Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code; - case Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: - return Diagnostics.Variable_0_implicitly_has_an_1_type.code; - case Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: - return Diagnostics.Parameter_0_implicitly_has_an_1_type.code; - case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code: - return Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code; - case Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code: - return Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code; - case Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code: - return Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code; - case Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code: - return Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code; - case Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code: - return Diagnostics.Member_0_implicitly_has_an_1_type.code; - } - return errorCode; - } - function doChange32(changes, sourceFile, token, errorCode, program, cancellationToken, markSeen, host, preferences) { - if (!isParameterPropertyModifier(token.kind) && token.kind !== 80 /* Identifier */ && token.kind !== 26 /* DotDotDotToken */ && token.kind !== 110 /* ThisKeyword */) { - return void 0; - } - const { parent: parent2 } = token; - const importAdder = createImportAdder(sourceFile, program, preferences, host); - errorCode = mapSuggestionDiagnostic(errorCode); - switch (errorCode) { - case Diagnostics.Member_0_implicitly_has_an_1_type.code: - case Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code: - if (isVariableDeclaration(parent2) && markSeen(parent2) || isPropertyDeclaration(parent2) || isPropertySignature(parent2)) { - annotateVariableDeclaration(changes, importAdder, sourceFile, parent2, program, host, cancellationToken); - importAdder.writeFixes(changes); - return parent2; - } - if (isPropertyAccessExpression(parent2)) { - const type = inferTypeForVariableFromUsage(parent2.name, program, cancellationToken); - const typeNode = getTypeNodeIfAccessible(type, parent2, program, host); - if (typeNode) { - const typeTag = factory.createJSDocTypeTag( - /*tagName*/ - void 0, - factory.createJSDocTypeExpression(typeNode), - /*comment*/ - void 0 - ); - changes.addJSDocTags(sourceFile, cast(parent2.parent.parent, isExpressionStatement), [typeTag]); - } - importAdder.writeFixes(changes); - return parent2; - } - return void 0; - case Diagnostics.Variable_0_implicitly_has_an_1_type.code: { - const symbol = program.getTypeChecker().getSymbolAtLocation(token); - if (symbol && symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) && markSeen(symbol.valueDeclaration)) { - annotateVariableDeclaration(changes, importAdder, getSourceFileOfNode(symbol.valueDeclaration), symbol.valueDeclaration, program, host, cancellationToken); - importAdder.writeFixes(changes); - return symbol.valueDeclaration; - } - return void 0; - } - } - const containingFunction = getContainingFunction(token); - if (containingFunction === void 0) { - return void 0; - } - let declaration; - switch (errorCode) { - case Diagnostics.Parameter_0_implicitly_has_an_1_type.code: - if (isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); - declaration = containingFunction; - break; - } - case Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code: - if (markSeen(containingFunction)) { - const param = cast(parent2, isParameter); - annotateParameters(changes, importAdder, sourceFile, param, containingFunction, program, host, cancellationToken); - declaration = param; - } - break; - case Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code: - case Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code: - if (isGetAccessorDeclaration(containingFunction) && isIdentifier(containingFunction.name)) { - annotate(changes, importAdder, sourceFile, containingFunction, inferTypeForVariableFromUsage(containingFunction.name, program, cancellationToken), program, host); - declaration = containingFunction; - } - break; - case Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code: - if (isSetAccessorDeclaration(containingFunction)) { - annotateSetAccessor(changes, importAdder, sourceFile, containingFunction, program, host, cancellationToken); - declaration = containingFunction; - } - break; - case Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code: - if (ts_textChanges_exports.isThisTypeAnnotatable(containingFunction) && markSeen(containingFunction)) { - annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken); - declaration = containingFunction; - } - break; - default: - return Debug.fail(String(errorCode)); - } - importAdder.writeFixes(changes); - return declaration; - } - function annotateVariableDeclaration(changes, importAdder, sourceFile, declaration, program, host, cancellationToken) { - if (isIdentifier(declaration.name)) { - annotate(changes, importAdder, sourceFile, declaration, inferTypeForVariableFromUsage(declaration.name, program, cancellationToken), program, host); - } - } - function annotateParameters(changes, importAdder, sourceFile, parameterDeclaration, containingFunction, program, host, cancellationToken) { - if (!isIdentifier(parameterDeclaration.name)) { - return; - } - const parameterInferences = inferTypeForParametersFromUsage(containingFunction, sourceFile, program, cancellationToken); - Debug.assert(containingFunction.parameters.length === parameterInferences.length, "Parameter count and inference count should match"); - if (isInJSFile(containingFunction)) { - annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host); - } else { - const needParens = isArrowFunction(containingFunction) && !findChildOfKind(containingFunction, 21 /* OpenParenToken */, sourceFile); - if (needParens) - changes.insertNodeBefore(sourceFile, first(containingFunction.parameters), factory.createToken(21 /* OpenParenToken */)); - for (const { declaration, type } of parameterInferences) { - if (declaration && !declaration.type && !declaration.initializer) { - annotate(changes, importAdder, sourceFile, declaration, type, program, host); - } - } - if (needParens) - changes.insertNodeAfter(sourceFile, last(containingFunction.parameters), factory.createToken(22 /* CloseParenToken */)); - } - } - function annotateThis(changes, sourceFile, containingFunction, program, host, cancellationToken) { - const references = getFunctionReferences(containingFunction, sourceFile, program, cancellationToken); - if (!references || !references.length) { - return; - } - const thisInference = inferTypeFromReferences(program, references, cancellationToken).thisParameter(); - const typeNode = getTypeNodeIfAccessible(thisInference, containingFunction, program, host); - if (!typeNode) { - return; - } - if (isInJSFile(containingFunction)) { - annotateJSDocThis(changes, sourceFile, containingFunction, typeNode); - } else { - changes.tryInsertThisTypeAnnotation(sourceFile, containingFunction, typeNode); - } - } - function annotateJSDocThis(changes, sourceFile, containingFunction, typeNode) { - changes.addJSDocTags(sourceFile, containingFunction, [ - factory.createJSDocThisTag( - /*tagName*/ - void 0, - factory.createJSDocTypeExpression(typeNode) - ) - ]); - } - function annotateSetAccessor(changes, importAdder, sourceFile, setAccessorDeclaration, program, host, cancellationToken) { - const param = firstOrUndefined(setAccessorDeclaration.parameters); - if (param && isIdentifier(setAccessorDeclaration.name) && isIdentifier(param.name)) { - let type = inferTypeForVariableFromUsage(setAccessorDeclaration.name, program, cancellationToken); - if (type === program.getTypeChecker().getAnyType()) { - type = inferTypeForVariableFromUsage(param.name, program, cancellationToken); - } - if (isInJSFile(setAccessorDeclaration)) { - annotateJSDocParameters(changes, sourceFile, [{ declaration: param, type }], program, host); - } else { - annotate(changes, importAdder, sourceFile, param, type, program, host); - } - } - } - function annotate(changes, importAdder, sourceFile, declaration, type, program, host) { - const typeNode = getTypeNodeIfAccessible(type, declaration, program, host); - if (typeNode) { - if (isInJSFile(sourceFile) && declaration.kind !== 171 /* PropertySignature */) { - const parent2 = isVariableDeclaration(declaration) ? tryCast(declaration.parent.parent, isVariableStatement) : declaration; - if (!parent2) { - return; - } - const typeExpression = factory.createJSDocTypeExpression(typeNode); - const typeTag = isGetAccessorDeclaration(declaration) ? factory.createJSDocReturnTag( - /*tagName*/ - void 0, - typeExpression, - /*comment*/ - void 0 - ) : factory.createJSDocTypeTag( - /*tagName*/ - void 0, - typeExpression, - /*comment*/ - void 0 - ); - changes.addJSDocTags(sourceFile, parent2, [typeTag]); - } else if (!tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, sourceFile, changes, importAdder, getEmitScriptTarget(program.getCompilerOptions()))) { - changes.tryInsertTypeAnnotation(sourceFile, declaration, typeNode); - } - } - } - function tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, sourceFile, changes, importAdder, scriptTarget) { - const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); - if (importableReference && changes.tryInsertTypeAnnotation(sourceFile, declaration, importableReference.typeNode)) { - forEach(importableReference.symbols, (s) => importAdder.addImportFromExportedSymbol( - s, - /*isValidTypeOnlyUseSite*/ - true - )); - return true; - } - return false; - } - function annotateJSDocParameters(changes, sourceFile, parameterInferences, program, host) { - const signature = parameterInferences.length && parameterInferences[0].declaration.parent; - if (!signature) { - return; - } - const inferences = mapDefined(parameterInferences, (inference) => { - const param = inference.declaration; - if (param.initializer || getJSDocType(param) || !isIdentifier(param.name)) { - return; - } - const typeNode = inference.type && getTypeNodeIfAccessible(inference.type, param, program, host); - if (typeNode) { - const name = factory.cloneNode(param.name); - setEmitFlags(name, 3072 /* NoComments */ | 4096 /* NoNestedComments */); - return { name: factory.cloneNode(param.name), param, isOptional: !!inference.isOptional, typeNode }; - } - }); - if (!inferences.length) { - return; - } - if (isArrowFunction(signature) || isFunctionExpression(signature)) { - const needParens = isArrowFunction(signature) && !findChildOfKind(signature, 21 /* OpenParenToken */, sourceFile); - if (needParens) { - changes.insertNodeBefore(sourceFile, first(signature.parameters), factory.createToken(21 /* OpenParenToken */)); - } - forEach(inferences, ({ typeNode, param }) => { - const typeTag = factory.createJSDocTypeTag( - /*tagName*/ - void 0, - factory.createJSDocTypeExpression(typeNode) - ); - const jsDoc = factory.createJSDocComment( - /*comment*/ - void 0, - [typeTag] - ); - changes.insertNodeAt(sourceFile, param.getStart(sourceFile), jsDoc, { suffix: " " }); - }); - if (needParens) { - changes.insertNodeAfter(sourceFile, last(signature.parameters), factory.createToken(22 /* CloseParenToken */)); - } - } else { - const paramTags = map(inferences, ({ name, typeNode, isOptional }) => factory.createJSDocParameterTag( - /*tagName*/ - void 0, - name, - /*isBracketed*/ - !!isOptional, - factory.createJSDocTypeExpression(typeNode), - /*isNameFirst*/ - false, - /*comment*/ - void 0 - )); - changes.addJSDocTags(sourceFile, signature, paramTags); - } - } - function getReferences(token, program, cancellationToken) { - return mapDefined(ts_FindAllReferences_exports.getReferenceEntriesForNode(-1, token, program, program.getSourceFiles(), cancellationToken), (entry) => entry.kind !== ts_FindAllReferences_exports.EntryKind.Span ? tryCast(entry.node, isIdentifier) : void 0); - } - function inferTypeForVariableFromUsage(token, program, cancellationToken) { - const references = getReferences(token, program, cancellationToken); - return inferTypeFromReferences(program, references, cancellationToken).single(); - } - function inferTypeForParametersFromUsage(func, sourceFile, program, cancellationToken) { - const references = getFunctionReferences(func, sourceFile, program, cancellationToken); - return references && inferTypeFromReferences(program, references, cancellationToken).parameters(func) || func.parameters.map((p) => ({ - declaration: p, - type: isIdentifier(p.name) ? inferTypeForVariableFromUsage(p.name, program, cancellationToken) : program.getTypeChecker().getAnyType() - })); - } - function getFunctionReferences(containingFunction, sourceFile, program, cancellationToken) { - let searchToken; - switch (containingFunction.kind) { - case 176 /* Constructor */: - searchToken = findChildOfKind(containingFunction, 137 /* ConstructorKeyword */, sourceFile); - break; - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - const parent2 = containingFunction.parent; - searchToken = (isVariableDeclaration(parent2) || isPropertyDeclaration(parent2)) && isIdentifier(parent2.name) ? parent2.name : containingFunction.name; - break; - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - searchToken = containingFunction.name; - break; - } - if (!searchToken) { - return void 0; - } - return getReferences(searchToken, program, cancellationToken); - } - function inferTypeFromReferences(program, references, cancellationToken) { - const checker = program.getTypeChecker(); - const builtinConstructors = { - string: () => checker.getStringType(), - number: () => checker.getNumberType(), - Array: (t) => checker.createArrayType(t), - Promise: (t) => checker.createPromiseType(t) - }; - const builtins = [ - checker.getStringType(), - checker.getNumberType(), - checker.createArrayType(checker.getAnyType()), - checker.createPromiseType(checker.getAnyType()) - ]; - return { - single: single2, - parameters, - thisParameter - }; - function createEmptyUsage() { - return { - isNumber: void 0, - isString: void 0, - isNumberOrString: void 0, - candidateTypes: void 0, - properties: void 0, - calls: void 0, - constructs: void 0, - numberIndex: void 0, - stringIndex: void 0, - candidateThisTypes: void 0, - inferredTypes: void 0 - }; - } - function combineUsages(usages) { - const combinedProperties = /* @__PURE__ */ new Map(); - for (const u of usages) { - if (u.properties) { - u.properties.forEach((p, name) => { - if (!combinedProperties.has(name)) { - combinedProperties.set(name, []); - } - combinedProperties.get(name).push(p); - }); - } - } - const properties = /* @__PURE__ */ new Map(); - combinedProperties.forEach((ps, name) => { - properties.set(name, combineUsages(ps)); - }); - return { - isNumber: usages.some((u) => u.isNumber), - isString: usages.some((u) => u.isString), - isNumberOrString: usages.some((u) => u.isNumberOrString), - candidateTypes: flatMap(usages, (u) => u.candidateTypes), - properties, - calls: flatMap(usages, (u) => u.calls), - constructs: flatMap(usages, (u) => u.constructs), - numberIndex: forEach(usages, (u) => u.numberIndex), - stringIndex: forEach(usages, (u) => u.stringIndex), - candidateThisTypes: flatMap(usages, (u) => u.candidateThisTypes), - inferredTypes: void 0 - // clear type cache - }; - } - function single2() { - return combineTypes(inferTypesFromReferencesSingle(references)); - } - function parameters(declaration) { - if (references.length === 0 || !declaration.parameters) { - return void 0; - } - const usage = createEmptyUsage(); - for (const reference of references) { - cancellationToken.throwIfCancellationRequested(); - calculateUsageOfNode(reference, usage); - } - const calls = [...usage.constructs || [], ...usage.calls || []]; - return declaration.parameters.map((parameter, parameterIndex) => { - const types = []; - const isRest = isRestParameter(parameter); - let isOptional = false; - for (const call of calls) { - if (call.argumentTypes.length <= parameterIndex) { - isOptional = isInJSFile(declaration); - types.push(checker.getUndefinedType()); - } else if (isRest) { - for (let i = parameterIndex; i < call.argumentTypes.length; i++) { - types.push(checker.getBaseTypeOfLiteralType(call.argumentTypes[i])); - } - } else { - types.push(checker.getBaseTypeOfLiteralType(call.argumentTypes[parameterIndex])); - } - } - if (isIdentifier(parameter.name)) { - const inferred = inferTypesFromReferencesSingle(getReferences(parameter.name, program, cancellationToken)); - types.push(...isRest ? mapDefined(inferred, checker.getElementTypeOfArrayType) : inferred); - } - const type = combineTypes(types); - return { - type: isRest ? checker.createArrayType(type) : type, - isOptional: isOptional && !isRest, - declaration: parameter - }; - }); - } - function thisParameter() { - const usage = createEmptyUsage(); - for (const reference of references) { - cancellationToken.throwIfCancellationRequested(); - calculateUsageOfNode(reference, usage); - } - return combineTypes(usage.candidateThisTypes || emptyArray); - } - function inferTypesFromReferencesSingle(references2) { - const usage = createEmptyUsage(); - for (const reference of references2) { - cancellationToken.throwIfCancellationRequested(); - calculateUsageOfNode(reference, usage); - } - return inferTypes(usage); - } - function calculateUsageOfNode(node, usage) { - while (isRightSideOfQualifiedNameOrPropertyAccess(node)) { - node = node.parent; - } - switch (node.parent.kind) { - case 244 /* ExpressionStatement */: - inferTypeFromExpressionStatement(node, usage); - break; - case 225 /* PostfixUnaryExpression */: - usage.isNumber = true; - break; - case 224 /* PrefixUnaryExpression */: - inferTypeFromPrefixUnaryExpression(node.parent, usage); - break; - case 226 /* BinaryExpression */: - inferTypeFromBinaryExpression(node, node.parent, usage); - break; - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - inferTypeFromSwitchStatementLabel(node.parent, usage); - break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: - if (node.parent.expression === node) { - inferTypeFromCallExpression(node.parent, usage); - } else { - inferTypeFromContextualType(node, usage); - } - break; - case 211 /* PropertyAccessExpression */: - inferTypeFromPropertyAccessExpression(node.parent, usage); - break; - case 212 /* ElementAccessExpression */: - inferTypeFromPropertyElementExpression(node.parent, node, usage); - break; - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - inferTypeFromPropertyAssignment(node.parent, usage); - break; - case 172 /* PropertyDeclaration */: - inferTypeFromPropertyDeclaration(node.parent, usage); - break; - case 260 /* VariableDeclaration */: { - const { name, initializer } = node.parent; - if (node === name) { - if (initializer) { - addCandidateType(usage, checker.getTypeAtLocation(initializer)); - } - break; - } - } - default: - return inferTypeFromContextualType(node, usage); - } - } - function inferTypeFromContextualType(node, usage) { - if (isExpressionNode(node)) { - addCandidateType(usage, checker.getContextualType(node)); - } - } - function inferTypeFromExpressionStatement(node, usage) { - addCandidateType(usage, isCallExpression(node) ? checker.getVoidType() : checker.getAnyType()); - } - function inferTypeFromPrefixUnaryExpression(node, usage) { - switch (node.operator) { - case 46 /* PlusPlusToken */: - case 47 /* MinusMinusToken */: - case 41 /* MinusToken */: - case 55 /* TildeToken */: - usage.isNumber = true; - break; - case 40 /* PlusToken */: - usage.isNumberOrString = true; - break; - } - } - function inferTypeFromBinaryExpression(node, parent2, usage) { - switch (parent2.operatorToken.kind) { - case 43 /* AsteriskAsteriskToken */: - case 42 /* AsteriskToken */: - case 44 /* SlashToken */: - case 45 /* PercentToken */: - case 48 /* LessThanLessThanToken */: - case 49 /* GreaterThanGreaterThanToken */: - case 50 /* GreaterThanGreaterThanGreaterThanToken */: - case 51 /* AmpersandToken */: - case 52 /* BarToken */: - case 53 /* CaretToken */: - case 66 /* MinusEqualsToken */: - case 68 /* AsteriskAsteriskEqualsToken */: - case 67 /* AsteriskEqualsToken */: - case 69 /* SlashEqualsToken */: - case 70 /* PercentEqualsToken */: - case 74 /* AmpersandEqualsToken */: - case 75 /* BarEqualsToken */: - case 79 /* CaretEqualsToken */: - case 71 /* LessThanLessThanEqualsToken */: - case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 72 /* GreaterThanGreaterThanEqualsToken */: - case 41 /* MinusToken */: - case 30 /* LessThanToken */: - case 33 /* LessThanEqualsToken */: - case 32 /* GreaterThanToken */: - case 34 /* GreaterThanEqualsToken */: - const operandType = checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left); - if (operandType.flags & 1056 /* EnumLike */) { - addCandidateType(usage, operandType); - } else { - usage.isNumber = true; - } - break; - case 65 /* PlusEqualsToken */: - case 40 /* PlusToken */: - const otherOperandType = checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left); - if (otherOperandType.flags & 1056 /* EnumLike */) { - addCandidateType(usage, otherOperandType); - } else if (otherOperandType.flags & 296 /* NumberLike */) { - usage.isNumber = true; - } else if (otherOperandType.flags & 402653316 /* StringLike */) { - usage.isString = true; - } else if (otherOperandType.flags & 1 /* Any */) { - } else { - usage.isNumberOrString = true; - } - break; - case 64 /* EqualsToken */: - case 35 /* EqualsEqualsToken */: - case 37 /* EqualsEqualsEqualsToken */: - case 38 /* ExclamationEqualsEqualsToken */: - case 36 /* ExclamationEqualsToken */: - case 77 /* AmpersandAmpersandEqualsToken */: - case 78 /* QuestionQuestionEqualsToken */: - case 76 /* BarBarEqualsToken */: - addCandidateType(usage, checker.getTypeAtLocation(parent2.left === node ? parent2.right : parent2.left)); - break; - case 103 /* InKeyword */: - if (node === parent2.left) { - usage.isString = true; - } - break; - case 57 /* BarBarToken */: - case 61 /* QuestionQuestionToken */: - if (node === parent2.left && (node.parent.parent.kind === 260 /* VariableDeclaration */ || isAssignmentExpression( - node.parent.parent, - /*excludeCompoundAssignment*/ - true - ))) { - addCandidateType(usage, checker.getTypeAtLocation(parent2.right)); - } - break; - case 56 /* AmpersandAmpersandToken */: - case 28 /* CommaToken */: - case 104 /* InstanceOfKeyword */: - break; - } - } - function inferTypeFromSwitchStatementLabel(parent2, usage) { - addCandidateType(usage, checker.getTypeAtLocation(parent2.parent.parent.expression)); - } - function inferTypeFromCallExpression(parent2, usage) { - const call = { - argumentTypes: [], - return_: createEmptyUsage() - }; - if (parent2.arguments) { - for (const argument of parent2.arguments) { - call.argumentTypes.push(checker.getTypeAtLocation(argument)); - } - } - calculateUsageOfNode(parent2, call.return_); - if (parent2.kind === 213 /* CallExpression */) { - (usage.calls || (usage.calls = [])).push(call); - } else { - (usage.constructs || (usage.constructs = [])).push(call); - } - } - function inferTypeFromPropertyAccessExpression(parent2, usage) { - const name = escapeLeadingUnderscores(parent2.name.text); - if (!usage.properties) { - usage.properties = /* @__PURE__ */ new Map(); - } - const propertyUsage = usage.properties.get(name) || createEmptyUsage(); - calculateUsageOfNode(parent2, propertyUsage); - usage.properties.set(name, propertyUsage); - } - function inferTypeFromPropertyElementExpression(parent2, node, usage) { - if (node === parent2.argumentExpression) { - usage.isNumberOrString = true; - return; - } else { - const indexType = checker.getTypeAtLocation(parent2.argumentExpression); - const indexUsage = createEmptyUsage(); - calculateUsageOfNode(parent2, indexUsage); - if (indexType.flags & 296 /* NumberLike */) { - usage.numberIndex = indexUsage; - } else { - usage.stringIndex = indexUsage; - } - } - } - function inferTypeFromPropertyAssignment(assignment, usage) { - const nodeWithRealType = isVariableDeclaration(assignment.parent.parent) ? assignment.parent.parent : assignment.parent; - addCandidateThisType(usage, checker.getTypeAtLocation(nodeWithRealType)); - } - function inferTypeFromPropertyDeclaration(declaration, usage) { - addCandidateThisType(usage, checker.getTypeAtLocation(declaration.parent)); - } - function removeLowPriorityInferences(inferences, priorities) { - const toRemove = []; - for (const i of inferences) { - for (const { high, low } of priorities) { - if (high(i)) { - Debug.assert(!low(i), "Priority can't have both low and high"); - toRemove.push(low); - } - } - } - return inferences.filter((i) => toRemove.every((f) => !f(i))); - } - function combineFromUsage(usage) { - return combineTypes(inferTypes(usage)); - } - function combineTypes(inferences) { - if (!inferences.length) - return checker.getAnyType(); - const stringNumber = checker.getUnionType([checker.getStringType(), checker.getNumberType()]); - const priorities = [ - { - high: (t) => t === checker.getStringType() || t === checker.getNumberType(), - low: (t) => t === stringNumber - }, - { - high: (t) => !(t.flags & (1 /* Any */ | 16384 /* Void */)), - low: (t) => !!(t.flags & (1 /* Any */ | 16384 /* Void */)) - }, - { - high: (t) => !(t.flags & (98304 /* Nullable */ | 1 /* Any */ | 16384 /* Void */)) && !(getObjectFlags(t) & 16 /* Anonymous */), - low: (t) => !!(getObjectFlags(t) & 16 /* Anonymous */) - } - ]; - let good = removeLowPriorityInferences(inferences, priorities); - const anons = good.filter((i) => getObjectFlags(i) & 16 /* Anonymous */); - if (anons.length) { - good = good.filter((i) => !(getObjectFlags(i) & 16 /* Anonymous */)); - good.push(combineAnonymousTypes(anons)); - } - return checker.getWidenedType(checker.getUnionType(good.map(checker.getBaseTypeOfLiteralType), 2 /* Subtype */)); - } - function combineAnonymousTypes(anons) { - if (anons.length === 1) { - return anons[0]; - } - const calls = []; - const constructs = []; - const stringIndices = []; - const numberIndices = []; - let stringIndexReadonly = false; - let numberIndexReadonly = false; - const props = createMultiMap(); - for (const anon2 of anons) { - for (const p of checker.getPropertiesOfType(anon2)) { - props.add(p.escapedName, p.valueDeclaration ? checker.getTypeOfSymbolAtLocation(p, p.valueDeclaration) : checker.getAnyType()); - } - calls.push(...checker.getSignaturesOfType(anon2, 0 /* Call */)); - constructs.push(...checker.getSignaturesOfType(anon2, 1 /* Construct */)); - const stringIndexInfo = checker.getIndexInfoOfType(anon2, 0 /* String */); - if (stringIndexInfo) { - stringIndices.push(stringIndexInfo.type); - stringIndexReadonly = stringIndexReadonly || stringIndexInfo.isReadonly; - } - const numberIndexInfo = checker.getIndexInfoOfType(anon2, 1 /* Number */); - if (numberIndexInfo) { - numberIndices.push(numberIndexInfo.type); - numberIndexReadonly = numberIndexReadonly || numberIndexInfo.isReadonly; - } - } - const members = mapEntries(props, (name, types) => { - const isOptional = types.length < anons.length ? 16777216 /* Optional */ : 0; - const s = checker.createSymbol(4 /* Property */ | isOptional, name); - s.links.type = checker.getUnionType(types); - return [name, s]; - }); - const indexInfos = []; - if (stringIndices.length) - indexInfos.push(checker.createIndexInfo(checker.getStringType(), checker.getUnionType(stringIndices), stringIndexReadonly)); - if (numberIndices.length) - indexInfos.push(checker.createIndexInfo(checker.getNumberType(), checker.getUnionType(numberIndices), numberIndexReadonly)); - return checker.createAnonymousType( - anons[0].symbol, - members, - calls, - constructs, - indexInfos - ); - } - function inferTypes(usage) { - var _a, _b, _c; - const types = []; - if (usage.isNumber) { - types.push(checker.getNumberType()); - } - if (usage.isString) { - types.push(checker.getStringType()); - } - if (usage.isNumberOrString) { - types.push(checker.getUnionType([checker.getStringType(), checker.getNumberType()])); - } - if (usage.numberIndex) { - types.push(checker.createArrayType(combineFromUsage(usage.numberIndex))); - } - if (((_a = usage.properties) == null ? void 0 : _a.size) || ((_b = usage.constructs) == null ? void 0 : _b.length) || usage.stringIndex) { - types.push(inferStructuralType(usage)); - } - const candidateTypes = (usage.candidateTypes || []).map((t) => checker.getBaseTypeOfLiteralType(t)); - const callsType = ((_c = usage.calls) == null ? void 0 : _c.length) ? inferStructuralType(usage) : void 0; - if (callsType && candidateTypes) { - types.push(checker.getUnionType([callsType, ...candidateTypes], 2 /* Subtype */)); - } else { - if (callsType) { - types.push(callsType); - } - if (length(candidateTypes)) { - types.push(...candidateTypes); - } - } - types.push(...inferNamedTypesFromProperties(usage)); - return types; - } - function inferStructuralType(usage) { - const members = /* @__PURE__ */ new Map(); - if (usage.properties) { - usage.properties.forEach((u, name) => { - const symbol = checker.createSymbol(4 /* Property */, name); - symbol.links.type = combineFromUsage(u); - members.set(name, symbol); - }); - } - const callSignatures = usage.calls ? [getSignatureFromCalls(usage.calls)] : []; - const constructSignatures = usage.constructs ? [getSignatureFromCalls(usage.constructs)] : []; - const indexInfos = usage.stringIndex ? [checker.createIndexInfo( - checker.getStringType(), - combineFromUsage(usage.stringIndex), - /*isReadonly*/ - false - )] : []; - return checker.createAnonymousType( - /*symbol*/ - void 0, - members, - callSignatures, - constructSignatures, - indexInfos - ); - } - function inferNamedTypesFromProperties(usage) { - if (!usage.properties || !usage.properties.size) - return []; - const types = builtins.filter((t) => allPropertiesAreAssignableToUsage(t, usage)); - if (0 < types.length && types.length < 3) { - return types.map((t) => inferInstantiationFromUsage(t, usage)); - } - return []; - } - function allPropertiesAreAssignableToUsage(type, usage) { - if (!usage.properties) - return false; - return !forEachEntry(usage.properties, (propUsage, name) => { - const source = checker.getTypeOfPropertyOfType(type, name); - if (!source) { - return true; - } - if (propUsage.calls) { - const sigs = checker.getSignaturesOfType(source, 0 /* Call */); - return !sigs.length || !checker.isTypeAssignableTo(source, getFunctionFromCalls(propUsage.calls)); - } else { - return !checker.isTypeAssignableTo(source, combineFromUsage(propUsage)); - } - }); - } - function inferInstantiationFromUsage(type, usage) { - if (!(getObjectFlags(type) & 4 /* Reference */) || !usage.properties) { - return type; - } - const generic = type.target; - const singleTypeParameter = singleOrUndefined(generic.typeParameters); - if (!singleTypeParameter) - return type; - const types = []; - usage.properties.forEach((propUsage, name) => { - const genericPropertyType = checker.getTypeOfPropertyOfType(generic, name); - Debug.assert(!!genericPropertyType, "generic should have all the properties of its reference."); - types.push(...inferTypeParameters(genericPropertyType, combineFromUsage(propUsage), singleTypeParameter)); - }); - return builtinConstructors[type.symbol.escapedName](combineTypes(types)); - } - function inferTypeParameters(genericType, usageType, typeParameter) { - if (genericType === typeParameter) { - return [usageType]; - } else if (genericType.flags & 3145728 /* UnionOrIntersection */) { - return flatMap(genericType.types, (t) => inferTypeParameters(t, usageType, typeParameter)); - } else if (getObjectFlags(genericType) & 4 /* Reference */ && getObjectFlags(usageType) & 4 /* Reference */) { - const genericArgs = checker.getTypeArguments(genericType); - const usageArgs = checker.getTypeArguments(usageType); - const types = []; - if (genericArgs && usageArgs) { - for (let i = 0; i < genericArgs.length; i++) { - if (usageArgs[i]) { - types.push(...inferTypeParameters(genericArgs[i], usageArgs[i], typeParameter)); - } - } - } - return types; - } - const genericSigs = checker.getSignaturesOfType(genericType, 0 /* Call */); - const usageSigs = checker.getSignaturesOfType(usageType, 0 /* Call */); - if (genericSigs.length === 1 && usageSigs.length === 1) { - return inferFromSignatures(genericSigs[0], usageSigs[0], typeParameter); - } - return []; - } - function inferFromSignatures(genericSig, usageSig, typeParameter) { - var _a; - const types = []; - for (let i = 0; i < genericSig.parameters.length; i++) { - const genericParam = genericSig.parameters[i]; - const usageParam = usageSig.parameters[i]; - const isRest = genericSig.declaration && isRestParameter(genericSig.declaration.parameters[i]); - if (!usageParam) { - break; - } - let genericParamType = genericParam.valueDeclaration ? checker.getTypeOfSymbolAtLocation(genericParam, genericParam.valueDeclaration) : checker.getAnyType(); - const elementType = isRest && checker.getElementTypeOfArrayType(genericParamType); - if (elementType) { - genericParamType = elementType; - } - const targetType = ((_a = tryCast(usageParam, isTransientSymbol)) == null ? void 0 : _a.links.type) || (usageParam.valueDeclaration ? checker.getTypeOfSymbolAtLocation(usageParam, usageParam.valueDeclaration) : checker.getAnyType()); - types.push(...inferTypeParameters(genericParamType, targetType, typeParameter)); - } - const genericReturn = checker.getReturnTypeOfSignature(genericSig); - const usageReturn = checker.getReturnTypeOfSignature(usageSig); - types.push(...inferTypeParameters(genericReturn, usageReturn, typeParameter)); - return types; - } - function getFunctionFromCalls(calls) { - return checker.createAnonymousType( - /*symbol*/ - void 0, - createSymbolTable(), - [getSignatureFromCalls(calls)], - emptyArray, - emptyArray - ); - } - function getSignatureFromCalls(calls) { - const parameters2 = []; - const length2 = Math.max(...calls.map((c) => c.argumentTypes.length)); - for (let i = 0; i < length2; i++) { - const symbol = checker.createSymbol(1 /* FunctionScopedVariable */, escapeLeadingUnderscores(`arg${i}`)); - symbol.links.type = combineTypes(calls.map((call) => call.argumentTypes[i] || checker.getUndefinedType())); - if (calls.some((call) => call.argumentTypes[i] === void 0)) { - symbol.flags |= 16777216 /* Optional */; - } - parameters2.push(symbol); - } - const returnType = combineFromUsage(combineUsages(calls.map((call) => call.return_))); - return checker.createSignature( - /*declaration*/ - void 0, - /*typeParameters*/ - void 0, - /*thisParameter*/ - void 0, - parameters2, - returnType, - /*typePredicate*/ - void 0, - length2, - 0 /* None */ - ); - } - function addCandidateType(usage, type) { - if (type && !(type.flags & 1 /* Any */) && !(type.flags & 131072 /* Never */)) { - (usage.candidateTypes || (usage.candidateTypes = [])).push(type); - } - } - function addCandidateThisType(usage, type) { - if (type && !(type.flags & 1 /* Any */) && !(type.flags & 131072 /* Never */)) { - (usage.candidateThisTypes || (usage.candidateThisTypes = [])).push(type); - } - } - } - var fixId38, errorCodes48; - var init_inferFromUsage = __esm({ - "src/services/codefixes/inferFromUsage.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId38 = "inferFromUsage"; - errorCodes48 = [ - // Variable declarations - Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined.code, - // Variable uses - Diagnostics.Variable_0_implicitly_has_an_1_type.code, - // Parameter declarations - Diagnostics.Parameter_0_implicitly_has_an_1_type.code, - Diagnostics.Rest_parameter_0_implicitly_has_an_any_type.code, - // Get Accessor declarations - Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation.code, - Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type.code, - // Set Accessor declarations - Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation.code, - // Property declarations - Diagnostics.Member_0_implicitly_has_an_1_type.code, - //// Suggestions - // Variable declarations - Diagnostics.Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage.code, - // Variable uses - Diagnostics.Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, - // Parameter declarations - Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, - Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage.code, - // Get Accessor declarations - Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage.code, - Diagnostics._0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage.code, - // Set Accessor declarations - Diagnostics.Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage.code, - // Property declarations - Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage.code, - // Function expressions and declarations - Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code - ]; - registerCodeFix({ - errorCodes: errorCodes48, - getCodeActions(context) { - const { sourceFile, program, span: { start }, errorCode, cancellationToken, host, preferences } = context; - const token = getTokenAtPosition(sourceFile, start); - let declaration; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (changes2) => { - declaration = doChange32( - changes2, - sourceFile, - token, - errorCode, - program, - cancellationToken, - /*markSeen*/ - returnTrue, - host, - preferences - ); - }); - const name = declaration && getNameOfDeclaration(declaration); - return !name || changes.length === 0 ? void 0 : [createCodeFixAction(fixId38, changes, [getDiagnostic(errorCode, token), getTextOfNode(name)], fixId38, Diagnostics.Infer_all_types_from_usage)]; - }, - fixIds: [fixId38], - getAllCodeActions(context) { - const { sourceFile, program, cancellationToken, host, preferences } = context; - const markSeen = nodeSeenTracker(); - return codeFixAll(context, errorCodes48, (changes, err) => { - doChange32(changes, sourceFile, getTokenAtPosition(err.file, err.start), err.code, program, cancellationToken, markSeen, host, preferences); - }); - } - }); - } - }); - - // src/services/codefixes/fixReturnTypeInAsyncFunction.ts - function getInfo15(sourceFile, checker, pos) { - if (isInJSFile(sourceFile)) { - return void 0; - } - const token = getTokenAtPosition(sourceFile, pos); - const func = findAncestor(token, isFunctionLikeDeclaration); - const returnTypeNode = func == null ? void 0 : func.type; - if (!returnTypeNode) { - return void 0; - } - const returnType = checker.getTypeFromTypeNode(returnTypeNode); - const promisedType = checker.getAwaitedType(returnType) || checker.getVoidType(); - const promisedTypeNode = checker.typeToTypeNode( - promisedType, - /*enclosingDeclaration*/ - returnTypeNode, - /*flags*/ - void 0 - ); - if (promisedTypeNode) { - return { returnTypeNode, returnType, promisedTypeNode, promisedType }; - } - } - function doChange33(changes, sourceFile, returnTypeNode, promisedTypeNode) { - changes.replaceNode(sourceFile, returnTypeNode, factory.createTypeReferenceNode("Promise", [promisedTypeNode])); - } - var fixId39, errorCodes49; - var init_fixReturnTypeInAsyncFunction = __esm({ - "src/services/codefixes/fixReturnTypeInAsyncFunction.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId39 = "fixReturnTypeInAsyncFunction"; - errorCodes49 = [ - Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0.code - ]; - registerCodeFix({ - errorCodes: errorCodes49, - fixIds: [fixId39], - getCodeActions: function getCodeActionsToFixReturnTypeInAsyncFunction(context) { - const { sourceFile, program, span } = context; - const checker = program.getTypeChecker(); - const info = getInfo15(sourceFile, program.getTypeChecker(), span.start); - if (!info) { - return void 0; - } - const { returnTypeNode, returnType, promisedTypeNode, promisedType } = info; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange33(t, sourceFile, returnTypeNode, promisedTypeNode)); - return [createCodeFixAction( - fixId39, - changes, - [ - Diagnostics.Replace_0_with_Promise_1, - checker.typeToString(returnType), - checker.typeToString(promisedType) - ], - fixId39, - Diagnostics.Fix_all_incorrect_return_type_of_an_async_functions - )]; - }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes49, (changes, diag2) => { - const info = getInfo15(diag2.file, context.program.getTypeChecker(), diag2.start); - if (info) { - doChange33(changes, diag2.file, info.returnTypeNode, info.promisedTypeNode); - } - }) - }); - } - }); - - // src/services/codefixes/disableJsDiagnostics.ts - function makeChange8(changes, sourceFile, position, seenLines) { - const { line: lineNumber } = getLineAndCharacterOfPosition(sourceFile, position); - if (!seenLines || tryAddToSet(seenLines, lineNumber)) { - changes.insertCommentBeforeLine(sourceFile, lineNumber, position, " @ts-ignore"); - } - } - var fixName4, fixId40, errorCodes50; - var init_disableJsDiagnostics = __esm({ - "src/services/codefixes/disableJsDiagnostics.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixName4 = "disableJsDiagnostics"; - fixId40 = "disableJsDiagnostics"; - errorCodes50 = mapDefined(Object.keys(Diagnostics), (key) => { - const diag2 = Diagnostics[key]; - return diag2.category === 1 /* Error */ ? diag2.code : void 0; - }); - registerCodeFix({ - errorCodes: errorCodes50, - getCodeActions: function getCodeActionsToDisableJsDiagnostics(context) { - const { sourceFile, program, span, host, formatContext } = context; - if (!isInJSFile(sourceFile) || !isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) { - return void 0; - } - const newLineCharacter = sourceFile.checkJsDirective ? "" : getNewLineOrDefaultFromHost(host, formatContext.options); - const fixes = [ - // fixId unnecessary because adding `// @ts-nocheck` even once will ignore every error in the file. - createCodeFixActionWithoutFixAll( - fixName4, - [createFileTextChanges(sourceFile.fileName, [ - createTextChange(sourceFile.checkJsDirective ? createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end) : createTextSpan(0, 0), `// @ts-nocheck${newLineCharacter}`) - ])], - Diagnostics.Disable_checking_for_this_file - ) - ]; - if (ts_textChanges_exports.isValidLocationToAddComment(sourceFile, span.start)) { - fixes.unshift(createCodeFixAction(fixName4, ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange8(t, sourceFile, span.start)), Diagnostics.Ignore_this_error_message, fixId40, Diagnostics.Add_ts_ignore_to_all_error_messages)); - } - return fixes; - }, - fixIds: [fixId40], - getAllCodeActions: (context) => { - const seenLines = /* @__PURE__ */ new Set(); - return codeFixAll(context, errorCodes50, (changes, diag2) => { - if (ts_textChanges_exports.isValidLocationToAddComment(diag2.file, diag2.start)) { - makeChange8(changes, diag2.file, diag2.start, seenLines); - } - }); - } - }); - } - }); - - // src/services/codefixes/helpers.ts - function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, sourceFile, context, preferences, importAdder, addClassElement) { - const classMembers = classDeclaration.symbol.members; - for (const symbol of possiblyMissingSymbols) { - if (!classMembers.has(symbol.escapedName)) { - addNewNodeForMemberSymbol( - symbol, - classDeclaration, - sourceFile, - context, - preferences, - importAdder, - addClassElement, - /*body*/ - void 0 - ); - } - } - } - function getNoopSymbolTrackerWithResolver(context) { - return { - trackSymbol: () => false, - moduleResolverHost: getModuleSpecifierResolverHost(context.program, context.host) - }; - } - function addNewNodeForMemberSymbol(symbol, enclosingDeclaration, sourceFile, context, preferences, importAdder, addClassElement, body, preserveOptional = 3 /* All */, isAmbient = false) { - const declarations = symbol.getDeclarations(); - const declaration = firstOrUndefined(declarations); - const checker = context.program.getTypeChecker(); - const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const kind = (declaration == null ? void 0 : declaration.kind) ?? 171 /* PropertySignature */; - const declarationName = createDeclarationName(symbol, declaration); - const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; - let modifierFlags = effectiveModifierFlags & 32 /* Static */; - modifierFlags |= effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; - if (declaration && isAutoAccessorPropertyDeclaration(declaration)) { - modifierFlags |= 128 /* Accessor */; - } - const modifiers = createModifiers(); - const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); - const optional = !!(symbol.flags & 16777216 /* Optional */); - const ambient = !!(enclosingDeclaration.flags & 33554432 /* Ambient */) || isAmbient; - const quotePreference = getQuotePreference(sourceFile, preferences); - switch (kind) { - case 171 /* PropertySignature */: - case 172 /* PropertyDeclaration */: - const flags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : void 0; - let typeNode = checker.typeToTypeNode(type, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); - if (importAdder) { - const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); - if (importableReference) { - typeNode = importableReference.typeNode; - importSymbols(importAdder, importableReference.symbols); - } - } - addClassElement(factory.createPropertyDeclaration( - modifiers, - declaration ? createName(declarationName) : symbol.getName(), - optional && preserveOptional & 2 /* Property */ ? factory.createToken(58 /* QuestionToken */) : void 0, - typeNode, - /*initializer*/ - void 0 - )); - break; - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: { - Debug.assertIsDefined(declarations); - let typeNode2 = checker.typeToTypeNode( - type, - enclosingDeclaration, - /*flags*/ - void 0, - getNoopSymbolTrackerWithResolver(context) - ); - const allAccessors = getAllAccessorDeclarations(declarations, declaration); - const orderedAccessors = allAccessors.secondAccessor ? [allAccessors.firstAccessor, allAccessors.secondAccessor] : [allAccessors.firstAccessor]; - if (importAdder) { - const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode2, scriptTarget); - if (importableReference) { - typeNode2 = importableReference.typeNode; - importSymbols(importAdder, importableReference.symbols); - } - } - for (const accessor of orderedAccessors) { - if (isGetAccessorDeclaration(accessor)) { - addClassElement(factory.createGetAccessorDeclaration( - modifiers, - createName(declarationName), - emptyArray, - createTypeNode(typeNode2), - createBody(body, quotePreference, ambient) - )); - } else { - Debug.assertNode(accessor, isSetAccessorDeclaration, "The counterpart to a getter should be a setter"); - const parameter = getSetAccessorValueParameter(accessor); - const parameterName = parameter && isIdentifier(parameter.name) ? idText(parameter.name) : void 0; - addClassElement(factory.createSetAccessorDeclaration( - modifiers, - createName(declarationName), - createDummyParameters( - 1, - [parameterName], - [createTypeNode(typeNode2)], - 1, - /*inJs*/ - false - ), - createBody(body, quotePreference, ambient) - )); - } - } - break; - } - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: - Debug.assertIsDefined(declarations); - const signatures = type.isUnion() ? flatMap(type.types, (t) => t.getCallSignatures()) : type.getCallSignatures(); - if (!some(signatures)) { - break; - } - if (declarations.length === 1) { - Debug.assert(signatures.length === 1, "One declaration implies one signature"); - const signature = signatures[0]; - outputMethod(quotePreference, signature, modifiers, createName(declarationName), createBody(body, quotePreference, ambient)); - break; - } - for (const signature of signatures) { - outputMethod(quotePreference, signature, modifiers, createName(declarationName)); - } - if (!ambient) { - if (declarations.length > signatures.length) { - const signature = checker.getSignatureFromDeclaration(declarations[declarations.length - 1]); - outputMethod(quotePreference, signature, modifiers, createName(declarationName), createBody(body, quotePreference)); - } else { - Debug.assert(declarations.length === signatures.length, "Declarations and signatures should match count"); - addClassElement(createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, createName(declarationName), optional && !!(preserveOptional & 1 /* Method */), modifiers, quotePreference, body)); - } - } - break; - } - function outputMethod(quotePreference2, signature, modifiers2, name, body2) { - const method = createSignatureDeclarationFromSignature(174 /* MethodDeclaration */, context, quotePreference2, signature, body2, name, modifiers2, optional && !!(preserveOptional & 1 /* Method */), enclosingDeclaration, importAdder); - if (method) - addClassElement(method); - } - function createModifiers() { - let modifiers2; - if (modifierFlags) { - modifiers2 = combine(modifiers2, factory.createModifiersFromModifierFlags(modifierFlags)); - } - if (shouldAddOverrideKeyword()) { - modifiers2 = append(modifiers2, factory.createToken(164 /* OverrideKeyword */)); - } - return modifiers2 && factory.createNodeArray(modifiers2); - } - function shouldAddOverrideKeyword() { - return !!(context.program.getCompilerOptions().noImplicitOverride && declaration && hasAbstractModifier(declaration)); - } - function createName(node) { - if (isIdentifier(node) && node.escapedText === "constructor") { - return factory.createComputedPropertyName(factory.createStringLiteral(idText(node), quotePreference === 0 /* Single */)); - } - return getSynthesizedDeepClone( - node, - /*includeTrivia*/ - false - ); - } - function createBody(block, quotePreference2, ambient2) { - return ambient2 ? void 0 : getSynthesizedDeepClone( - block, - /*includeTrivia*/ - false - ) || createStubbedMethodBody(quotePreference2); - } - function createTypeNode(typeNode) { - return getSynthesizedDeepClone( - typeNode, - /*includeTrivia*/ - false - ); - } - function createDeclarationName(symbol2, declaration2) { - if (getCheckFlags(symbol2) & 262144 /* Mapped */) { - const nameType = symbol2.links.nameType; - if (nameType && isTypeUsableAsPropertyName(nameType)) { - return factory.createIdentifier(unescapeLeadingUnderscores(getPropertyNameFromType(nameType))); - } - } - return getSynthesizedDeepClone( - getNameOfDeclaration(declaration2), - /*includeTrivia*/ - false - ); - } - } - function createSignatureDeclarationFromSignature(kind, context, quotePreference, signature, body, name, modifiers, optional, enclosingDeclaration, importAdder) { - const program = context.program; - const checker = program.getTypeChecker(); - const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); - const isJs = isInJSFile(enclosingDeclaration); - const flags = 1 /* NoTruncation */ | 256 /* SuppressAnyReturnType */ | 524288 /* AllowEmptyTuple */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); - const signatureDeclaration = checker.signatureToSignatureDeclaration(signature, kind, enclosingDeclaration, flags, getNoopSymbolTrackerWithResolver(context)); - if (!signatureDeclaration) { - return void 0; - } - let typeParameters = isJs ? void 0 : signatureDeclaration.typeParameters; - let parameters = signatureDeclaration.parameters; - let type = isJs ? void 0 : signatureDeclaration.type; - if (importAdder) { - if (typeParameters) { - const newTypeParameters = sameMap(typeParameters, (typeParameterDecl) => { - let constraint = typeParameterDecl.constraint; - let defaultType = typeParameterDecl.default; - if (constraint) { - const importableReference = tryGetAutoImportableReferenceFromTypeNode(constraint, scriptTarget); - if (importableReference) { - constraint = importableReference.typeNode; - importSymbols(importAdder, importableReference.symbols); - } - } - if (defaultType) { - const importableReference = tryGetAutoImportableReferenceFromTypeNode(defaultType, scriptTarget); - if (importableReference) { - defaultType = importableReference.typeNode; - importSymbols(importAdder, importableReference.symbols); - } - } - return factory.updateTypeParameterDeclaration( - typeParameterDecl, - typeParameterDecl.modifiers, - typeParameterDecl.name, - constraint, - defaultType - ); - }); - if (typeParameters !== newTypeParameters) { - typeParameters = setTextRange(factory.createNodeArray(newTypeParameters, typeParameters.hasTrailingComma), typeParameters); - } - } - const newParameters = sameMap(parameters, (parameterDecl) => { - let type2 = isJs ? void 0 : parameterDecl.type; - if (type2) { - const importableReference = tryGetAutoImportableReferenceFromTypeNode(type2, scriptTarget); - if (importableReference) { - type2 = importableReference.typeNode; - importSymbols(importAdder, importableReference.symbols); - } - } - return factory.updateParameterDeclaration( - parameterDecl, - parameterDecl.modifiers, - parameterDecl.dotDotDotToken, - parameterDecl.name, - isJs ? void 0 : parameterDecl.questionToken, - type2, - parameterDecl.initializer - ); - }); - if (parameters !== newParameters) { - parameters = setTextRange(factory.createNodeArray(newParameters, parameters.hasTrailingComma), parameters); - } - if (type) { - const importableReference = tryGetAutoImportableReferenceFromTypeNode(type, scriptTarget); - if (importableReference) { - type = importableReference.typeNode; - importSymbols(importAdder, importableReference.symbols); - } - } - } - const questionToken = optional ? factory.createToken(58 /* QuestionToken */) : void 0; - const asteriskToken = signatureDeclaration.asteriskToken; - if (isFunctionExpression(signatureDeclaration)) { - return factory.updateFunctionExpression(signatureDeclaration, modifiers, signatureDeclaration.asteriskToken, tryCast(name, isIdentifier), typeParameters, parameters, type, body ?? signatureDeclaration.body); - } - if (isArrowFunction(signatureDeclaration)) { - return factory.updateArrowFunction(signatureDeclaration, modifiers, typeParameters, parameters, type, signatureDeclaration.equalsGreaterThanToken, body ?? signatureDeclaration.body); - } - if (isMethodDeclaration(signatureDeclaration)) { - return factory.updateMethodDeclaration(signatureDeclaration, modifiers, asteriskToken, name ?? factory.createIdentifier(""), questionToken, typeParameters, parameters, type, body); - } - if (isFunctionDeclaration(signatureDeclaration)) { - return factory.updateFunctionDeclaration(signatureDeclaration, modifiers, signatureDeclaration.asteriskToken, tryCast(name, isIdentifier), typeParameters, parameters, type, body ?? signatureDeclaration.body); - } - return void 0; - } - function createSignatureDeclarationFromCallExpression(kind, context, importAdder, call, name, modifierFlags, contextNode) { - const quotePreference = getQuotePreference(context.sourceFile, context.preferences); - const scriptTarget = getEmitScriptTarget(context.program.getCompilerOptions()); - const tracker = getNoopSymbolTrackerWithResolver(context); - const checker = context.program.getTypeChecker(); - const isJs = isInJSFile(contextNode); - const { typeArguments, arguments: args, parent: parent2 } = call; - const contextualType = isJs ? void 0 : checker.getContextualType(call); - const names = map(args, (arg) => isIdentifier(arg) ? arg.text : isPropertyAccessExpression(arg) && isIdentifier(arg.name) ? arg.name.text : void 0); - const instanceTypes = isJs ? [] : map(args, (arg) => checker.getTypeAtLocation(arg)); - const { argumentTypeNodes, argumentTypeParameters } = getArgumentTypesAndTypeParameters( - checker, - importAdder, - instanceTypes, - contextNode, - scriptTarget, - 1 /* NoTruncation */, - tracker - ); - const modifiers = modifierFlags ? factory.createNodeArray(factory.createModifiersFromModifierFlags(modifierFlags)) : void 0; - const asteriskToken = isYieldExpression(parent2) ? factory.createToken(42 /* AsteriskToken */) : void 0; - const typeParameters = isJs ? void 0 : createTypeParametersForArguments(checker, argumentTypeParameters, typeArguments); - const parameters = createDummyParameters( - args.length, - names, - argumentTypeNodes, - /*minArgumentCount*/ - void 0, - isJs - ); - const type = isJs || contextualType === void 0 ? void 0 : checker.typeToTypeNode( - contextualType, - contextNode, - /*flags*/ - void 0, - tracker - ); - switch (kind) { - case 174 /* MethodDeclaration */: - return factory.createMethodDeclaration( - modifiers, - asteriskToken, - name, - /*questionToken*/ - void 0, - typeParameters, - parameters, - type, - createStubbedMethodBody(quotePreference) - ); - case 173 /* MethodSignature */: - return factory.createMethodSignature( - modifiers, - name, - /*questionToken*/ - void 0, - typeParameters, - parameters, - type === void 0 ? factory.createKeywordTypeNode(159 /* UnknownKeyword */) : type - ); - case 262 /* FunctionDeclaration */: - Debug.assert(typeof name === "string" || isIdentifier(name), "Unexpected name"); - return factory.createFunctionDeclaration( - modifiers, - asteriskToken, - name, - typeParameters, - parameters, - type, - createStubbedBody(Diagnostics.Function_not_implemented.message, quotePreference) - ); - default: - Debug.fail("Unexpected kind"); - } - } - function createTypeParametersForArguments(checker, argumentTypeParameters, typeArguments) { - const usedNames = new Set(argumentTypeParameters.map((pair) => pair[0])); - const constraintsByName = new Map(argumentTypeParameters); - if (typeArguments) { - const typeArgumentsWithNewTypes = typeArguments.filter((typeArgument) => !argumentTypeParameters.some((pair) => { - var _a; - return checker.getTypeAtLocation(typeArgument) === ((_a = pair[1]) == null ? void 0 : _a.argumentType); - })); - const targetSize = usedNames.size + typeArgumentsWithNewTypes.length; - for (let i = 0; usedNames.size < targetSize; i += 1) { - usedNames.add(createTypeParameterName(i)); - } - } - return arrayFrom( - usedNames.values(), - (usedName) => { - var _a; - return factory.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - usedName, - (_a = constraintsByName.get(usedName)) == null ? void 0 : _a.constraint - ); - } - ); - } - function createTypeParameterName(index) { - return 84 /* T */ + index <= 90 /* Z */ ? String.fromCharCode(84 /* T */ + index) : `T${index}`; - } - function typeToAutoImportableTypeNode(checker, importAdder, type, contextNode, scriptTarget, flags, tracker) { - let typeNode = checker.typeToTypeNode(type, contextNode, flags, tracker); - if (typeNode && isImportTypeNode(typeNode)) { - const importableReference = tryGetAutoImportableReferenceFromTypeNode(typeNode, scriptTarget); - if (importableReference) { - importSymbols(importAdder, importableReference.symbols); - typeNode = importableReference.typeNode; - } - } - return getSynthesizedDeepClone(typeNode); - } - function typeContainsTypeParameter(type) { - if (type.isUnionOrIntersection()) { - return type.types.some(typeContainsTypeParameter); - } - return type.flags & 262144 /* TypeParameter */; - } - function getArgumentTypesAndTypeParameters(checker, importAdder, instanceTypes, contextNode, scriptTarget, flags, tracker) { - const argumentTypeNodes = []; - const argumentTypeParameters = /* @__PURE__ */ new Map(); - for (let i = 0; i < instanceTypes.length; i += 1) { - const instanceType = instanceTypes[i]; - if (instanceType.isUnionOrIntersection() && instanceType.types.some(typeContainsTypeParameter)) { - const synthesizedTypeParameterName = createTypeParameterName(i); - argumentTypeNodes.push(factory.createTypeReferenceNode(synthesizedTypeParameterName)); - argumentTypeParameters.set(synthesizedTypeParameterName, void 0); - continue; - } - const widenedInstanceType = checker.getBaseTypeOfLiteralType(instanceType); - const argumentTypeNode = typeToAutoImportableTypeNode(checker, importAdder, widenedInstanceType, contextNode, scriptTarget, flags, tracker); - if (!argumentTypeNode) { - continue; - } - argumentTypeNodes.push(argumentTypeNode); - const argumentTypeParameter = getFirstTypeParameterName(instanceType); - const instanceTypeConstraint = instanceType.isTypeParameter() && instanceType.constraint && !isAnonymousObjectConstraintType(instanceType.constraint) ? typeToAutoImportableTypeNode(checker, importAdder, instanceType.constraint, contextNode, scriptTarget, flags, tracker) : void 0; - if (argumentTypeParameter) { - argumentTypeParameters.set(argumentTypeParameter, { argumentType: instanceType, constraint: instanceTypeConstraint }); - } - } - return { argumentTypeNodes, argumentTypeParameters: arrayFrom(argumentTypeParameters.entries()) }; - } - function isAnonymousObjectConstraintType(type) { - return type.flags & 524288 /* Object */ && type.objectFlags === 16 /* Anonymous */; - } - function getFirstTypeParameterName(type) { - var _a; - if (type.flags & (1048576 /* Union */ | 2097152 /* Intersection */)) { - for (const subType of type.types) { - const subTypeName = getFirstTypeParameterName(subType); - if (subTypeName) { - return subTypeName; - } - } - } - return type.flags & 262144 /* TypeParameter */ ? (_a = type.getSymbol()) == null ? void 0 : _a.getName() : void 0; - } - function createDummyParameters(argCount, names, types, minArgumentCount, inJs) { - const parameters = []; - const parameterNameCounts = /* @__PURE__ */ new Map(); - for (let i = 0; i < argCount; i++) { - const parameterName = (names == null ? void 0 : names[i]) || `arg${i}`; - const parameterNameCount = parameterNameCounts.get(parameterName); - parameterNameCounts.set(parameterName, (parameterNameCount || 0) + 1); - const newParameter = factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - /*name*/ - parameterName + (parameterNameCount || ""), - /*questionToken*/ - minArgumentCount !== void 0 && i >= minArgumentCount ? factory.createToken(58 /* QuestionToken */) : void 0, - /*type*/ - inJs ? void 0 : (types == null ? void 0 : types[i]) || factory.createKeywordTypeNode(159 /* UnknownKeyword */), - /*initializer*/ - void 0 - ); - parameters.push(newParameter); - } - return parameters; - } - function createMethodImplementingSignatures(checker, context, enclosingDeclaration, signatures, name, optional, modifiers, quotePreference, body) { - let maxArgsSignature = signatures[0]; - let minArgumentCount = signatures[0].minArgumentCount; - let someSigHasRestParameter = false; - for (const sig of signatures) { - minArgumentCount = Math.min(sig.minArgumentCount, minArgumentCount); - if (signatureHasRestParameter(sig)) { - someSigHasRestParameter = true; - } - if (sig.parameters.length >= maxArgsSignature.parameters.length && (!signatureHasRestParameter(sig) || signatureHasRestParameter(maxArgsSignature))) { - maxArgsSignature = sig; - } - } - const maxNonRestArgs = maxArgsSignature.parameters.length - (signatureHasRestParameter(maxArgsSignature) ? 1 : 0); - const maxArgsParameterSymbolNames = maxArgsSignature.parameters.map((symbol) => symbol.name); - const parameters = createDummyParameters( - maxNonRestArgs, - maxArgsParameterSymbolNames, - /*types*/ - void 0, - minArgumentCount, - /*inJs*/ - false - ); - if (someSigHasRestParameter) { - const restParameter = factory.createParameterDeclaration( - /*modifiers*/ - void 0, - factory.createToken(26 /* DotDotDotToken */), - maxArgsParameterSymbolNames[maxNonRestArgs] || "rest", - /*questionToken*/ - maxNonRestArgs >= minArgumentCount ? factory.createToken(58 /* QuestionToken */) : void 0, - factory.createArrayTypeNode(factory.createKeywordTypeNode(159 /* UnknownKeyword */)), - /*initializer*/ - void 0 - ); - parameters.push(restParameter); - } - return createStubbedMethod( - modifiers, - name, - optional, - /*typeParameters*/ - void 0, - parameters, - getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration), - quotePreference, - body - ); - } - function getReturnTypeFromSignatures(signatures, checker, context, enclosingDeclaration) { - if (length(signatures)) { - const type = checker.getUnionType(map(signatures, checker.getReturnTypeOfSignature)); - return checker.typeToTypeNode(type, enclosingDeclaration, 1 /* NoTruncation */, getNoopSymbolTrackerWithResolver(context)); - } - } - function createStubbedMethod(modifiers, name, optional, typeParameters, parameters, returnType, quotePreference, body) { - return factory.createMethodDeclaration( - modifiers, - /*asteriskToken*/ - void 0, - name, - optional ? factory.createToken(58 /* QuestionToken */) : void 0, - typeParameters, - parameters, - returnType, - body || createStubbedMethodBody(quotePreference) - ); - } - function createStubbedMethodBody(quotePreference) { - return createStubbedBody(Diagnostics.Method_not_implemented.message, quotePreference); - } - function createStubbedBody(text, quotePreference) { - return factory.createBlock( - [factory.createThrowStatement( - factory.createNewExpression( - factory.createIdentifier("Error"), - /*typeArguments*/ - void 0, - // TODO Handle auto quote preference. - [factory.createStringLiteral( - text, - /*isSingleQuote*/ - quotePreference === 0 /* Single */ - )] - ) - )], - /*multiLine*/ - true - ); - } - function setJsonCompilerOptionValues(changeTracker, configFile, options) { - const tsconfigObjectLiteral = getTsConfigObjectLiteralExpression(configFile); - if (!tsconfigObjectLiteral) - return void 0; - const compilerOptionsProperty = findJsonProperty(tsconfigObjectLiteral, "compilerOptions"); - if (compilerOptionsProperty === void 0) { - changeTracker.insertNodeAtObjectStart(configFile, tsconfigObjectLiteral, createJsonPropertyAssignment( - "compilerOptions", - factory.createObjectLiteralExpression( - options.map(([optionName, optionValue]) => createJsonPropertyAssignment(optionName, optionValue)), - /*multiLine*/ - true - ) - )); - return; - } - const compilerOptions = compilerOptionsProperty.initializer; - if (!isObjectLiteralExpression(compilerOptions)) { - return; - } - for (const [optionName, optionValue] of options) { - const optionProperty = findJsonProperty(compilerOptions, optionName); - if (optionProperty === void 0) { - changeTracker.insertNodeAtObjectStart(configFile, compilerOptions, createJsonPropertyAssignment(optionName, optionValue)); - } else { - changeTracker.replaceNode(configFile, optionProperty.initializer, optionValue); - } - } - } - function setJsonCompilerOptionValue(changeTracker, configFile, optionName, optionValue) { - setJsonCompilerOptionValues(changeTracker, configFile, [[optionName, optionValue]]); - } - function createJsonPropertyAssignment(name, initializer) { - return factory.createPropertyAssignment(factory.createStringLiteral(name), initializer); - } - function findJsonProperty(obj, name) { - return find(obj.properties, (p) => isPropertyAssignment(p) && !!p.name && isStringLiteral(p.name) && p.name.text === name); - } - function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) { - let symbols; - const typeNode = visitNode(importTypeNode, visit, isTypeNode); - if (symbols && typeNode) { - return { typeNode, symbols }; - } - function visit(node) { - if (isLiteralImportTypeNode(node) && node.qualifier) { - const firstIdentifier = getFirstIdentifier(node.qualifier); - const name = getNameForExportedSymbol(firstIdentifier.symbol, scriptTarget); - const qualifier = name !== firstIdentifier.text ? replaceFirstIdentifierOfEntityName(node.qualifier, factory.createIdentifier(name)) : node.qualifier; - symbols = append(symbols, firstIdentifier.symbol); - const typeArguments = visitNodes2(node.typeArguments, visit, isTypeNode); - return factory.createTypeReferenceNode(qualifier, typeArguments); - } - return visitEachChild(node, visit, nullTransformationContext); - } - } - function replaceFirstIdentifierOfEntityName(name, newIdentifier) { - if (name.kind === 80 /* Identifier */) { - return newIdentifier; - } - return factory.createQualifiedName(replaceFirstIdentifierOfEntityName(name.left, newIdentifier), name.right); - } - function importSymbols(importAdder, symbols) { - symbols.forEach((s) => importAdder.addImportFromExportedSymbol( - s, - /*isValidTypeOnlyUseSite*/ - true - )); - } - function findAncestorMatchingSpan(sourceFile, span) { - const end = textSpanEnd(span); - let token = getTokenAtPosition(sourceFile, span.start); - while (token.end < end) { - token = token.parent; - } - return token; - } - var PreserveOptionalFlags; - var init_helpers2 = __esm({ - "src/services/codefixes/helpers.ts"() { - "use strict"; - init_ts4(); - PreserveOptionalFlags = /* @__PURE__ */ ((PreserveOptionalFlags2) => { - PreserveOptionalFlags2[PreserveOptionalFlags2["Method"] = 1] = "Method"; - PreserveOptionalFlags2[PreserveOptionalFlags2["Property"] = 2] = "Property"; - PreserveOptionalFlags2[PreserveOptionalFlags2["All"] = 3] = "All"; - return PreserveOptionalFlags2; - })(PreserveOptionalFlags || {}); - } - }); - - // src/services/codefixes/generateAccessors.ts - function generateAccessorFromProperty(file, program, start, end, context, _actionName) { - const fieldInfo = getAccessorConvertiblePropertyAtPosition(file, program, start, end); - if (!fieldInfo || ts_refactor_exports.isRefactorErrorInfo(fieldInfo)) - return void 0; - const changeTracker = ts_textChanges_exports.ChangeTracker.fromContext(context); - const { isStatic: isStatic2, isReadonly, fieldName, accessorName, originalName, type, container, declaration } = fieldInfo; - suppressLeadingAndTrailingTrivia(fieldName); - suppressLeadingAndTrailingTrivia(accessorName); - suppressLeadingAndTrailingTrivia(declaration); - suppressLeadingAndTrailingTrivia(container); - let accessorModifiers; - let fieldModifiers; - if (isClassLike(container)) { - const modifierFlags = getEffectiveModifierFlags(declaration); - if (isSourceFileJS(file)) { - const modifiers = factory.createModifiersFromModifierFlags(modifierFlags); - accessorModifiers = modifiers; - fieldModifiers = modifiers; - } else { - accessorModifiers = factory.createModifiersFromModifierFlags(prepareModifierFlagsForAccessor(modifierFlags)); - fieldModifiers = factory.createModifiersFromModifierFlags(prepareModifierFlagsForField(modifierFlags)); - } - if (canHaveDecorators(declaration)) { - fieldModifiers = concatenate(getDecorators(declaration), fieldModifiers); - } - } - updateFieldDeclaration(changeTracker, file, declaration, type, fieldName, fieldModifiers); - const getAccessor = generateGetAccessor(fieldName, accessorName, type, accessorModifiers, isStatic2, container); - suppressLeadingAndTrailingTrivia(getAccessor); - insertAccessor(changeTracker, file, getAccessor, declaration, container); - if (isReadonly) { - const constructor = getFirstConstructorWithBody(container); - if (constructor) { - updateReadonlyPropertyInitializerStatementConstructor(changeTracker, file, constructor, fieldName.text, originalName); - } - } else { - const setAccessor = generateSetAccessor(fieldName, accessorName, type, accessorModifiers, isStatic2, container); - suppressLeadingAndTrailingTrivia(setAccessor); - insertAccessor(changeTracker, file, setAccessor, declaration, container); - } - return changeTracker.getChanges(); - } - function isConvertibleName(name) { - return isIdentifier(name) || isStringLiteral(name); - } - function isAcceptedDeclaration(node) { - return isParameterPropertyDeclaration(node, node.parent) || isPropertyDeclaration(node) || isPropertyAssignment(node); - } - function createPropertyName(name, originalName) { - return isIdentifier(originalName) ? factory.createIdentifier(name) : factory.createStringLiteral(name); - } - function createAccessorAccessExpression(fieldName, isStatic2, container) { - const leftHead = isStatic2 ? container.name : factory.createThis(); - return isIdentifier(fieldName) ? factory.createPropertyAccessExpression(leftHead, fieldName) : factory.createElementAccessExpression(leftHead, factory.createStringLiteralFromNode(fieldName)); - } - function prepareModifierFlagsForAccessor(modifierFlags) { - modifierFlags &= ~64 /* Readonly */; - modifierFlags &= ~8 /* Private */; - if (!(modifierFlags & 16 /* Protected */)) { - modifierFlags |= 4 /* Public */; - } - return modifierFlags; - } - function prepareModifierFlagsForField(modifierFlags) { - modifierFlags &= ~4 /* Public */; - modifierFlags &= ~16 /* Protected */; - modifierFlags |= 8 /* Private */; - return modifierFlags; - } - function getAccessorConvertiblePropertyAtPosition(file, program, start, end, considerEmptySpans = true) { - const node = getTokenAtPosition(file, start); - const cursorRequest = start === end && considerEmptySpans; - const declaration = findAncestor(node.parent, isAcceptedDeclaration); - const meaning = 28 /* AccessibilityModifier */ | 32 /* Static */ | 64 /* Readonly */; - if (!declaration || !(nodeOverlapsWithStartEnd(declaration.name, file, start, end) || cursorRequest)) { - return { - error: getLocaleSpecificMessage(Diagnostics.Could_not_find_property_for_which_to_generate_accessor) - }; - } - if (!isConvertibleName(declaration.name)) { - return { - error: getLocaleSpecificMessage(Diagnostics.Name_is_not_valid) - }; - } - if ((getEffectiveModifierFlags(declaration) & 126975 /* Modifier */ | meaning) !== meaning) { - return { - error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_property_with_modifier) - }; - } - const name = declaration.name.text; - const startWithUnderscore = startsWithUnderscore(name); - const fieldName = createPropertyName(startWithUnderscore ? name : getUniqueName(`_${name}`, file), declaration.name); - const accessorName = createPropertyName(startWithUnderscore ? getUniqueName(name.substring(1), file) : name, declaration.name); - return { - isStatic: hasStaticModifier(declaration), - isReadonly: hasEffectiveReadonlyModifier(declaration), - type: getDeclarationType(declaration, program), - container: declaration.kind === 169 /* Parameter */ ? declaration.parent.parent : declaration.parent, - originalName: declaration.name.text, - declaration, - fieldName, - accessorName, - renameAccessor: startWithUnderscore - }; - } - function generateGetAccessor(fieldName, accessorName, type, modifiers, isStatic2, container) { - return factory.createGetAccessorDeclaration( - modifiers, - accessorName, - [], - type, - factory.createBlock( - [ - factory.createReturnStatement( - createAccessorAccessExpression(fieldName, isStatic2, container) - ) - ], - /*multiLine*/ - true - ) - ); - } - function generateSetAccessor(fieldName, accessorName, type, modifiers, isStatic2, container) { - return factory.createSetAccessorDeclaration( - modifiers, - accessorName, - [factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - factory.createIdentifier("value"), - /*questionToken*/ - void 0, - type - )], - factory.createBlock( - [ - factory.createExpressionStatement( - factory.createAssignment( - createAccessorAccessExpression(fieldName, isStatic2, container), - factory.createIdentifier("value") - ) - ) - ], - /*multiLine*/ - true - ) - ); - } - function updatePropertyDeclaration(changeTracker, file, declaration, type, fieldName, modifiers) { - const property = factory.updatePropertyDeclaration( - declaration, - modifiers, - fieldName, - declaration.questionToken || declaration.exclamationToken, - type, - declaration.initializer - ); - changeTracker.replaceNode(file, declaration, property); - } - function updatePropertyAssignmentDeclaration(changeTracker, file, declaration, fieldName) { - let assignment = factory.updatePropertyAssignment(declaration, fieldName, declaration.initializer); - if (assignment.modifiers || assignment.questionToken || assignment.exclamationToken) { - if (assignment === declaration) - assignment = factory.cloneNode(assignment); - assignment.modifiers = void 0; - assignment.questionToken = void 0; - assignment.exclamationToken = void 0; - } - changeTracker.replacePropertyAssignment(file, declaration, assignment); - } - function updateFieldDeclaration(changeTracker, file, declaration, type, fieldName, modifiers) { - if (isPropertyDeclaration(declaration)) { - updatePropertyDeclaration(changeTracker, file, declaration, type, fieldName, modifiers); - } else if (isPropertyAssignment(declaration)) { - updatePropertyAssignmentDeclaration(changeTracker, file, declaration, fieldName); - } else { - changeTracker.replaceNode( - file, - declaration, - factory.updateParameterDeclaration(declaration, modifiers, declaration.dotDotDotToken, cast(fieldName, isIdentifier), declaration.questionToken, declaration.type, declaration.initializer) - ); - } - } - function insertAccessor(changeTracker, file, accessor, declaration, container) { - isParameterPropertyDeclaration(declaration, declaration.parent) ? changeTracker.insertMemberAtStart(file, container, accessor) : isPropertyAssignment(declaration) ? changeTracker.insertNodeAfterComma(file, declaration, accessor) : changeTracker.insertNodeAfter(file, declaration, accessor); - } - function updateReadonlyPropertyInitializerStatementConstructor(changeTracker, file, constructor, fieldName, originalName) { - if (!constructor.body) - return; - constructor.body.forEachChild(function recur(node) { - if (isElementAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */ && isStringLiteral(node.argumentExpression) && node.argumentExpression.text === originalName && isWriteAccess(node)) { - changeTracker.replaceNode(file, node.argumentExpression, factory.createStringLiteral(fieldName)); - } - if (isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */ && node.name.text === originalName && isWriteAccess(node)) { - changeTracker.replaceNode(file, node.name, factory.createIdentifier(fieldName)); - } - if (!isFunctionLike(node) && !isClassLike(node)) { - node.forEachChild(recur); - } - }); - } - function getDeclarationType(declaration, program) { - const typeNode = getTypeAnnotationNode(declaration); - if (isPropertyDeclaration(declaration) && typeNode && declaration.questionToken) { - const typeChecker = program.getTypeChecker(); - const type = typeChecker.getTypeFromTypeNode(typeNode); - if (!typeChecker.isTypeAssignableTo(typeChecker.getUndefinedType(), type)) { - const types = isUnionTypeNode(typeNode) ? typeNode.types : [typeNode]; - return factory.createUnionTypeNode([...types, factory.createKeywordTypeNode(157 /* UndefinedKeyword */)]); - } - } - return typeNode; - } - function getAllSupers(decl, checker) { - const res = []; - while (decl) { - const superElement = getClassExtendsHeritageElement(decl); - const superSymbol = superElement && checker.getSymbolAtLocation(superElement.expression); - if (!superSymbol) - break; - const symbol = superSymbol.flags & 2097152 /* Alias */ ? checker.getAliasedSymbol(superSymbol) : superSymbol; - const superDecl = symbol.declarations && find(symbol.declarations, isClassLike); - if (!superDecl) - break; - res.push(superDecl); - decl = superDecl; - } - return res; - } - var init_generateAccessors = __esm({ - "src/services/codefixes/generateAccessors.ts"() { - "use strict"; - init_ts4(); - } - }); - - // src/services/codefixes/fixInvalidImportSyntax.ts - function getCodeFixesForImportDeclaration(context, node) { - const sourceFile = getSourceFileOfNode(node); - const namespace = getNamespaceDeclarationNode(node); - const opts = context.program.getCompilerOptions(); - const variations = []; - variations.push(createAction(context, sourceFile, node, makeImport( - namespace.name, - /*namedImports*/ - void 0, - node.moduleSpecifier, - getQuotePreference(sourceFile, context.preferences) - ))); - if (getEmitModuleKind(opts) === 1 /* CommonJS */) { - variations.push(createAction(context, sourceFile, node, factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - namespace.name, - factory.createExternalModuleReference(node.moduleSpecifier) - ))); - } - return variations; - } - function createAction(context, sourceFile, node, replacement) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(sourceFile, node, replacement)); - return createCodeFixActionWithoutFixAll(fixName5, changes, [Diagnostics.Replace_import_with_0, changes[0].textChanges[0].newText]); - } - function getActionsForUsageOfInvalidImport(context) { - const sourceFile = context.sourceFile; - const targetKind = Diagnostics.This_expression_is_not_callable.code === context.errorCode ? 213 /* CallExpression */ : 214 /* NewExpression */; - const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.kind === targetKind); - if (!node) { - return []; - } - const expr = node.expression; - return getImportCodeFixesForExpression(context, expr); - } - function getActionsForInvalidImportLocation(context) { - const sourceFile = context.sourceFile; - const node = findAncestor(getTokenAtPosition(sourceFile, context.span.start), (a) => a.getStart() === context.span.start && a.getEnd() === context.span.start + context.span.length); - if (!node) { - return []; - } - return getImportCodeFixesForExpression(context, node); - } - function getImportCodeFixesForExpression(context, expr) { - const type = context.program.getTypeChecker().getTypeAtLocation(expr); - if (!(type.symbol && isTransientSymbol(type.symbol) && type.symbol.links.originatingImport)) { - return []; - } - const fixes = []; - const relatedImport = type.symbol.links.originatingImport; - if (!isImportCall(relatedImport)) { - addRange(fixes, getCodeFixesForImportDeclaration(context, relatedImport)); - } - if (isExpression(expr) && !(isNamedDeclaration(expr.parent) && expr.parent.name === expr)) { - const sourceFile = context.sourceFile; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => t.replaceNode(sourceFile, expr, factory.createPropertyAccessExpression(expr, "default"), {})); - fixes.push(createCodeFixActionWithoutFixAll(fixName5, changes, Diagnostics.Use_synthetic_default_member)); - } - return fixes; - } - var fixName5; - var init_fixInvalidImportSyntax = __esm({ - "src/services/codefixes/fixInvalidImportSyntax.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixName5 = "invalidImportSyntax"; - registerCodeFix({ - errorCodes: [ - Diagnostics.This_expression_is_not_callable.code, - Diagnostics.This_expression_is_not_constructable.code - ], - getCodeActions: getActionsForUsageOfInvalidImport - }); - registerCodeFix({ - errorCodes: [ - // The following error codes cover pretty much all assignability errors that could involve an expression - Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code, - Diagnostics.Type_0_does_not_satisfy_the_constraint_1.code, - Diagnostics.Type_0_is_not_assignable_to_type_1.code, - Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated.code, - Diagnostics.Type_predicate_0_is_not_assignable_to_1.code, - Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3.code, - Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3.code, - Diagnostics.Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2.code, - Diagnostics.Property_0_in_type_1_is_not_assignable_to_type_2.code, - Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property.code, - Diagnostics.The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1.code - ], - getCodeActions: getActionsForInvalidImportLocation - }); - } - }); - - // src/services/codefixes/fixStrictClassInitialization.ts - function getInfo16(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - if (isIdentifier(token) && isPropertyDeclaration(token.parent)) { - const type = getEffectiveTypeAnnotationNode(token.parent); - if (type) { - return { type, prop: token.parent, isJs: isInJSFile(token.parent) }; - } - } - return void 0; - } - function getActionForAddMissingDefiniteAssignmentAssertion(context, info) { - if (info.isJs) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addDefiniteAssignmentAssertion(t, context.sourceFile, info.prop)); - return createCodeFixAction(fixName6, changes, [Diagnostics.Add_definite_assignment_assertion_to_property_0, info.prop.getText()], fixIdAddDefiniteAssignmentAssertions, Diagnostics.Add_definite_assignment_assertions_to_all_uninitialized_properties); - } - function addDefiniteAssignmentAssertion(changeTracker, propertyDeclarationSourceFile, propertyDeclaration) { - suppressLeadingAndTrailingTrivia(propertyDeclaration); - const property = factory.updatePropertyDeclaration( - propertyDeclaration, - propertyDeclaration.modifiers, - propertyDeclaration.name, - factory.createToken(54 /* ExclamationToken */), - propertyDeclaration.type, - propertyDeclaration.initializer - ); - changeTracker.replaceNode(propertyDeclarationSourceFile, propertyDeclaration, property); - } - function getActionForAddMissingUndefinedType(context, info) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addUndefinedType(t, context.sourceFile, info)); - return createCodeFixAction(fixName6, changes, [Diagnostics.Add_undefined_type_to_property_0, info.prop.name.getText()], fixIdAddUndefinedType, Diagnostics.Add_undefined_type_to_all_uninitialized_properties); - } - function addUndefinedType(changeTracker, sourceFile, info) { - const undefinedTypeNode = factory.createKeywordTypeNode(157 /* UndefinedKeyword */); - const types = isUnionTypeNode(info.type) ? info.type.types.concat(undefinedTypeNode) : [info.type, undefinedTypeNode]; - const unionTypeNode = factory.createUnionTypeNode(types); - if (info.isJs) { - changeTracker.addJSDocTags(sourceFile, info.prop, [factory.createJSDocTypeTag( - /*tagName*/ - void 0, - factory.createJSDocTypeExpression(unionTypeNode) - )]); - } else { - changeTracker.replaceNode(sourceFile, info.type, unionTypeNode); - } - } - function getActionForAddMissingInitializer(context, info) { - if (info.isJs) - return void 0; - const checker = context.program.getTypeChecker(); - const initializer = getInitializer(checker, info.prop); - if (!initializer) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addInitializer(t, context.sourceFile, info.prop, initializer)); - return createCodeFixAction(fixName6, changes, [Diagnostics.Add_initializer_to_property_0, info.prop.name.getText()], fixIdAddInitializer, Diagnostics.Add_initializers_to_all_uninitialized_properties); - } - function addInitializer(changeTracker, propertyDeclarationSourceFile, propertyDeclaration, initializer) { - suppressLeadingAndTrailingTrivia(propertyDeclaration); - const property = factory.updatePropertyDeclaration( - propertyDeclaration, - propertyDeclaration.modifiers, - propertyDeclaration.name, - propertyDeclaration.questionToken, - propertyDeclaration.type, - initializer - ); - changeTracker.replaceNode(propertyDeclarationSourceFile, propertyDeclaration, property); - } - function getInitializer(checker, propertyDeclaration) { - return getDefaultValueFromType(checker, checker.getTypeFromTypeNode(propertyDeclaration.type)); - } - function getDefaultValueFromType(checker, type) { - if (type.flags & 512 /* BooleanLiteral */) { - return type === checker.getFalseType() || type === checker.getFalseType( - /*fresh*/ - true - ) ? factory.createFalse() : factory.createTrue(); - } else if (type.isStringLiteral()) { - return factory.createStringLiteral(type.value); - } else if (type.isNumberLiteral()) { - return factory.createNumericLiteral(type.value); - } else if (type.flags & 2048 /* BigIntLiteral */) { - return factory.createBigIntLiteral(type.value); - } else if (type.isUnion()) { - return firstDefined(type.types, (t) => getDefaultValueFromType(checker, t)); - } else if (type.isClass()) { - const classDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); - if (!classDeclaration || hasSyntacticModifier(classDeclaration, 256 /* Abstract */)) - return void 0; - const constructorDeclaration = getFirstConstructorWithBody(classDeclaration); - if (constructorDeclaration && constructorDeclaration.parameters.length) - return void 0; - return factory.createNewExpression( - factory.createIdentifier(type.symbol.name), - /*typeArguments*/ - void 0, - /*argumentsArray*/ - void 0 - ); - } else if (checker.isArrayLikeType(type)) { - return factory.createArrayLiteralExpression(); - } - return void 0; - } - var fixName6, fixIdAddDefiniteAssignmentAssertions, fixIdAddUndefinedType, fixIdAddInitializer, errorCodes51; - var init_fixStrictClassInitialization = __esm({ - "src/services/codefixes/fixStrictClassInitialization.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixName6 = "strictClassInitialization"; - fixIdAddDefiniteAssignmentAssertions = "addMissingPropertyDefiniteAssignmentAssertions"; - fixIdAddUndefinedType = "addMissingPropertyUndefinedType"; - fixIdAddInitializer = "addMissingPropertyInitializer"; - errorCodes51 = [Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code]; - registerCodeFix({ - errorCodes: errorCodes51, - getCodeActions: function getCodeActionsForStrictClassInitializationErrors(context) { - const info = getInfo16(context.sourceFile, context.span.start); - if (!info) - return; - const result = []; - append(result, getActionForAddMissingUndefinedType(context, info)); - append(result, getActionForAddMissingDefiniteAssignmentAssertion(context, info)); - append(result, getActionForAddMissingInitializer(context, info)); - return result; - }, - fixIds: [fixIdAddDefiniteAssignmentAssertions, fixIdAddUndefinedType, fixIdAddInitializer], - getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes51, (changes, diag2) => { - const info = getInfo16(diag2.file, diag2.start); - if (!info) - return; - switch (context.fixId) { - case fixIdAddDefiniteAssignmentAssertions: - addDefiniteAssignmentAssertion(changes, diag2.file, info.prop); - break; - case fixIdAddUndefinedType: - addUndefinedType(changes, diag2.file, info); - break; - case fixIdAddInitializer: - const checker = context.program.getTypeChecker(); - const initializer = getInitializer(checker, info.prop); - if (!initializer) - return; - addInitializer(changes, diag2.file, info.prop, initializer); - break; - default: - Debug.fail(JSON.stringify(context.fixId)); - } - }); - } - }); - } - }); - - // src/services/codefixes/requireInTs.ts - function doChange34(changes, sourceFile, info) { - const { allowSyntheticDefaults, defaultImportName, namedImports, statement, required } = info; - changes.replaceNode(sourceFile, statement, defaultImportName && !allowSyntheticDefaults ? factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - defaultImportName, - factory.createExternalModuleReference(required) - ) : factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - defaultImportName, - namedImports - ), - required, - /*assertClause*/ - void 0 - )); - } - function getInfo17(sourceFile, program, pos) { - const { parent: parent2 } = getTokenAtPosition(sourceFile, pos); - if (!isRequireCall( - parent2, - /*requireStringLiteralLikeArgument*/ - true - )) { - Debug.failBadSyntaxKind(parent2); - } - const decl = cast(parent2.parent, isVariableDeclaration); - const defaultImportName = tryCast(decl.name, isIdentifier); - const namedImports = isObjectBindingPattern(decl.name) ? tryCreateNamedImportsFromObjectBindingPattern(decl.name) : void 0; - if (defaultImportName || namedImports) { - return { - allowSyntheticDefaults: getAllowSyntheticDefaultImports(program.getCompilerOptions()), - defaultImportName, - namedImports, - statement: cast(decl.parent.parent, isVariableStatement), - required: first(parent2.arguments) - }; - } - } - function tryCreateNamedImportsFromObjectBindingPattern(node) { - const importSpecifiers = []; - for (const element of node.elements) { - if (!isIdentifier(element.name) || element.initializer) { - return void 0; - } - importSpecifiers.push(factory.createImportSpecifier( - /*isTypeOnly*/ - false, - tryCast(element.propertyName, isIdentifier), - element.name - )); - } - if (importSpecifiers.length) { - return factory.createNamedImports(importSpecifiers); - } - } - var fixId41, errorCodes52; - var init_requireInTs = __esm({ - "src/services/codefixes/requireInTs.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId41 = "requireInTs"; - errorCodes52 = [Diagnostics.require_call_may_be_converted_to_an_import.code]; - registerCodeFix({ - errorCodes: errorCodes52, - getCodeActions(context) { - const info = getInfo17(context.sourceFile, context.program, context.span.start); - if (!info) { - return void 0; - } - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange34(t, context.sourceFile, info)); - return [createCodeFixAction(fixId41, changes, Diagnostics.Convert_require_to_import, fixId41, Diagnostics.Convert_all_require_to_import)]; - }, - fixIds: [fixId41], - getAllCodeActions: (context) => codeFixAll(context, errorCodes52, (changes, diag2) => { - const info = getInfo17(diag2.file, context.program, diag2.start); - if (info) { - doChange34(changes, context.sourceFile, info); - } - }) - }); - } - }); - - // src/services/codefixes/useDefaultImport.ts - function getInfo18(sourceFile, pos) { - const name = getTokenAtPosition(sourceFile, pos); - if (!isIdentifier(name)) - return void 0; - const { parent: parent2 } = name; - if (isImportEqualsDeclaration(parent2) && isExternalModuleReference(parent2.moduleReference)) { - return { importNode: parent2, name, moduleSpecifier: parent2.moduleReference.expression }; - } else if (isNamespaceImport(parent2)) { - const importNode = parent2.parent.parent; - return { importNode, name, moduleSpecifier: importNode.moduleSpecifier }; - } - } - function doChange35(changes, sourceFile, info, preferences) { - changes.replaceNode(sourceFile, info.importNode, makeImport( - info.name, - /*namedImports*/ - void 0, - info.moduleSpecifier, - getQuotePreference(sourceFile, preferences) - )); - } - var fixId42, errorCodes53; - var init_useDefaultImport = __esm({ - "src/services/codefixes/useDefaultImport.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId42 = "useDefaultImport"; - errorCodes53 = [Diagnostics.Import_may_be_converted_to_a_default_import.code]; - registerCodeFix({ - errorCodes: errorCodes53, - getCodeActions(context) { - const { sourceFile, span: { start } } = context; - const info = getInfo18(sourceFile, start); - if (!info) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange35(t, sourceFile, info, context.preferences)); - return [createCodeFixAction(fixId42, changes, Diagnostics.Convert_to_default_import, fixId42, Diagnostics.Convert_all_to_default_imports)]; - }, - fixIds: [fixId42], - getAllCodeActions: (context) => codeFixAll(context, errorCodes53, (changes, diag2) => { - const info = getInfo18(diag2.file, diag2.start); - if (info) - doChange35(changes, diag2.file, info, context.preferences); - }) - }); - } - }); - - // src/services/codefixes/useBigintLiteral.ts - function makeChange9(changeTracker, sourceFile, span) { - const numericLiteral = tryCast(getTokenAtPosition(sourceFile, span.start), isNumericLiteral); - if (!numericLiteral) { - return; - } - const newText = numericLiteral.getText(sourceFile) + "n"; - changeTracker.replaceNode(sourceFile, numericLiteral, factory.createBigIntLiteral(newText)); - } - var fixId43, errorCodes54; - var init_useBigintLiteral = __esm({ - "src/services/codefixes/useBigintLiteral.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId43 = "useBigintLiteral"; - errorCodes54 = [ - Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers.code - ]; - registerCodeFix({ - errorCodes: errorCodes54, - getCodeActions: function getCodeActionsToUseBigintLiteral(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange9(t, context.sourceFile, context.span)); - if (changes.length > 0) { - return [createCodeFixAction(fixId43, changes, Diagnostics.Convert_to_a_bigint_numeric_literal, fixId43, Diagnostics.Convert_all_to_bigint_numeric_literals)]; - } - }, - fixIds: [fixId43], - getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes54, (changes, diag2) => makeChange9(changes, diag2.file, diag2)); - } - }); - } - }); - - // src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts - function getImportTypeNode(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - Debug.assert(token.kind === 102 /* ImportKeyword */, "This token should be an ImportKeyword"); - Debug.assert(token.parent.kind === 205 /* ImportType */, "Token parent should be an ImportType"); - return token.parent; - } - function doChange36(changes, sourceFile, importType) { - const newTypeNode = factory.updateImportTypeNode( - importType, - importType.argument, - importType.assertions, - importType.qualifier, - importType.typeArguments, - /*isTypeOf*/ - true - ); - changes.replaceNode(sourceFile, importType, newTypeNode); - } - var fixIdAddMissingTypeof, fixId44, errorCodes55; - var init_fixAddModuleReferTypeMissingTypeof = __esm({ - "src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixIdAddMissingTypeof = "fixAddModuleReferTypeMissingTypeof"; - fixId44 = fixIdAddMissingTypeof; - errorCodes55 = [Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code]; - registerCodeFix({ - errorCodes: errorCodes55, - getCodeActions: function getCodeActionsToAddMissingTypeof(context) { - const { sourceFile, span } = context; - const importType = getImportTypeNode(sourceFile, span.start); - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange36(t, sourceFile, importType)); - return [createCodeFixAction(fixId44, changes, Diagnostics.Add_missing_typeof, fixId44, Diagnostics.Add_missing_typeof)]; - }, - fixIds: [fixId44], - getAllCodeActions: (context) => codeFixAll(context, errorCodes55, (changes, diag2) => doChange36(changes, context.sourceFile, getImportTypeNode(diag2.file, diag2.start))) - }); - } - }); - - // src/services/codefixes/wrapJsxInFragment.ts - function findNodeToFix(sourceFile, pos) { - const lessThanToken = getTokenAtPosition(sourceFile, pos); - const firstJsxElementOrOpenElement = lessThanToken.parent; - let binaryExpr = firstJsxElementOrOpenElement.parent; - if (!isBinaryExpression(binaryExpr)) { - binaryExpr = binaryExpr.parent; - if (!isBinaryExpression(binaryExpr)) - return void 0; - } - if (!nodeIsMissing(binaryExpr.operatorToken)) - return void 0; - return binaryExpr; - } - function doChange37(changeTracker, sf, node) { - const jsx = flattenInvalidBinaryExpr(node); - if (jsx) - changeTracker.replaceNode(sf, node, factory.createJsxFragment(factory.createJsxOpeningFragment(), jsx, factory.createJsxJsxClosingFragment())); - } - function flattenInvalidBinaryExpr(node) { - const children = []; - let current = node; - while (true) { - if (isBinaryExpression(current) && nodeIsMissing(current.operatorToken) && current.operatorToken.kind === 28 /* CommaToken */) { - children.push(current.left); - if (isJsxChild(current.right)) { - children.push(current.right); - return children; - } else if (isBinaryExpression(current.right)) { - current = current.right; - continue; - } else - return void 0; - } else - return void 0; - } - } - var fixID2, errorCodes56; - var init_wrapJsxInFragment = __esm({ - "src/services/codefixes/wrapJsxInFragment.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixID2 = "wrapJsxInFragment"; - errorCodes56 = [Diagnostics.JSX_expressions_must_have_one_parent_element.code]; - registerCodeFix({ - errorCodes: errorCodes56, - getCodeActions: function getCodeActionsToWrapJsxInFragment(context) { - const { sourceFile, span } = context; - const node = findNodeToFix(sourceFile, span.start); - if (!node) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange37(t, sourceFile, node)); - return [createCodeFixAction(fixID2, changes, Diagnostics.Wrap_in_JSX_fragment, fixID2, Diagnostics.Wrap_all_unparented_JSX_in_JSX_fragment)]; - }, - fixIds: [fixID2], - getAllCodeActions: (context) => codeFixAll(context, errorCodes56, (changes, diag2) => { - const node = findNodeToFix(context.sourceFile, diag2.start); - if (!node) - return void 0; - doChange37(changes, context.sourceFile, node); - }) - }); - } - }); - - // src/services/codefixes/convertToMappedObjectType.ts - function getInfo19(sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); - const indexSignature = tryCast(token.parent.parent, isIndexSignatureDeclaration); - if (!indexSignature) - return void 0; - const container = isInterfaceDeclaration(indexSignature.parent) ? indexSignature.parent : tryCast(indexSignature.parent.parent, isTypeAliasDeclaration); - if (!container) - return void 0; - return { indexSignature, container }; - } - function createTypeAliasFromInterface(declaration, type) { - return factory.createTypeAliasDeclaration(declaration.modifiers, declaration.name, declaration.typeParameters, type); - } - function doChange38(changes, sourceFile, { indexSignature, container }) { - const members = isInterfaceDeclaration(container) ? container.members : container.type.members; - const otherMembers = members.filter((member) => !isIndexSignatureDeclaration(member)); - const parameter = first(indexSignature.parameters); - const mappedTypeParameter = factory.createTypeParameterDeclaration( - /*modifiers*/ - void 0, - cast(parameter.name, isIdentifier), - parameter.type - ); - const mappedIntersectionType = factory.createMappedTypeNode( - hasEffectiveReadonlyModifier(indexSignature) ? factory.createModifier(148 /* ReadonlyKeyword */) : void 0, - mappedTypeParameter, - /*nameType*/ - void 0, - indexSignature.questionToken, - indexSignature.type, - /*members*/ - void 0 - ); - const intersectionType = factory.createIntersectionTypeNode([ - ...getAllSuperTypeNodes(container), - mappedIntersectionType, - ...otherMembers.length ? [factory.createTypeLiteralNode(otherMembers)] : emptyArray - ]); - changes.replaceNode(sourceFile, container, createTypeAliasFromInterface(container, intersectionType)); - } - var fixId45, errorCodes57; - var init_convertToMappedObjectType = __esm({ - "src/services/codefixes/convertToMappedObjectType.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId45 = "fixConvertToMappedObjectType"; - errorCodes57 = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code]; - registerCodeFix({ - errorCodes: errorCodes57, - getCodeActions: function getCodeActionsToConvertToMappedTypeObject(context) { - const { sourceFile, span } = context; - const info = getInfo19(sourceFile, span.start); - if (!info) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange38(t, sourceFile, info)); - const name = idText(info.container.name); - return [createCodeFixAction(fixId45, changes, [Diagnostics.Convert_0_to_mapped_object_type, name], fixId45, [Diagnostics.Convert_0_to_mapped_object_type, name])]; - }, - fixIds: [fixId45], - getAllCodeActions: (context) => codeFixAll(context, errorCodes57, (changes, diag2) => { - const info = getInfo19(diag2.file, diag2.start); - if (info) - doChange38(changes, diag2.file, info); - }) - }); - } - }); - - // src/services/codefixes/removeAccidentalCallParentheses.ts - var fixId46, errorCodes58; - var init_removeAccidentalCallParentheses = __esm({ - "src/services/codefixes/removeAccidentalCallParentheses.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId46 = "removeAccidentalCallParentheses"; - errorCodes58 = [ - Diagnostics.This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without.code - ]; - registerCodeFix({ - errorCodes: errorCodes58, - getCodeActions(context) { - const callExpression = findAncestor(getTokenAtPosition(context.sourceFile, context.span.start), isCallExpression); - if (!callExpression) { - return void 0; - } - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => { - t.deleteRange(context.sourceFile, { pos: callExpression.expression.end, end: callExpression.end }); - }); - return [createCodeFixActionWithoutFixAll(fixId46, changes, Diagnostics.Remove_parentheses)]; - }, - fixIds: [fixId46] - }); - } - }); - - // src/services/codefixes/removeUnnecessaryAwait.ts - function makeChange10(changeTracker, sourceFile, span) { - const awaitKeyword = tryCast(getTokenAtPosition(sourceFile, span.start), (node) => node.kind === 135 /* AwaitKeyword */); - const awaitExpression = awaitKeyword && tryCast(awaitKeyword.parent, isAwaitExpression); - if (!awaitExpression) { - return; - } - let expressionToReplace = awaitExpression; - const hasSurroundingParens = isParenthesizedExpression(awaitExpression.parent); - if (hasSurroundingParens) { - const leftMostExpression = getLeftmostExpression( - awaitExpression.expression, - /*stopAtCallExpressions*/ - false - ); - if (isIdentifier(leftMostExpression)) { - const precedingToken = findPrecedingToken(awaitExpression.parent.pos, sourceFile); - if (precedingToken && precedingToken.kind !== 105 /* NewKeyword */) { - expressionToReplace = awaitExpression.parent; - } - } - } - changeTracker.replaceNode(sourceFile, expressionToReplace, awaitExpression.expression); - } - var fixId47, errorCodes59; - var init_removeUnnecessaryAwait = __esm({ - "src/services/codefixes/removeUnnecessaryAwait.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId47 = "removeUnnecessaryAwait"; - errorCodes59 = [ - Diagnostics.await_has_no_effect_on_the_type_of_this_expression.code - ]; - registerCodeFix({ - errorCodes: errorCodes59, - getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange10(t, context.sourceFile, context.span)); - if (changes.length > 0) { - return [createCodeFixAction(fixId47, changes, Diagnostics.Remove_unnecessary_await, fixId47, Diagnostics.Remove_all_unnecessary_uses_of_await)]; - } - }, - fixIds: [fixId47], - getAllCodeActions: (context) => { - return codeFixAll(context, errorCodes59, (changes, diag2) => makeChange10(changes, diag2.file, diag2)); - } - }); - } - }); - - // src/services/codefixes/splitTypeOnlyImport.ts - function getImportDeclaration2(sourceFile, span) { - return findAncestor(getTokenAtPosition(sourceFile, span.start), isImportDeclaration); - } - function splitTypeOnlyImport(changes, importDeclaration, context) { - if (!importDeclaration) { - return; - } - const importClause = Debug.checkDefined(importDeclaration.importClause); - changes.replaceNode(context.sourceFile, importDeclaration, factory.updateImportDeclaration( - importDeclaration, - importDeclaration.modifiers, - factory.updateImportClause( - importClause, - importClause.isTypeOnly, - importClause.name, - /*namedBindings*/ - void 0 - ), - importDeclaration.moduleSpecifier, - importDeclaration.assertClause - )); - changes.insertNodeAfter(context.sourceFile, importDeclaration, factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.updateImportClause( - importClause, - importClause.isTypeOnly, - /*name*/ - void 0, - importClause.namedBindings - ), - importDeclaration.moduleSpecifier, - importDeclaration.assertClause - )); - } - var errorCodes60, fixId48; - var init_splitTypeOnlyImport = __esm({ - "src/services/codefixes/splitTypeOnlyImport.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - errorCodes60 = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code]; - fixId48 = "splitTypeOnlyImport"; - registerCodeFix({ - errorCodes: errorCodes60, - fixIds: [fixId48], - getCodeActions: function getCodeActionsToSplitTypeOnlyImport(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => { - return splitTypeOnlyImport(t, getImportDeclaration2(context.sourceFile, context.span), context); - }); - if (changes.length) { - return [createCodeFixAction(fixId48, changes, Diagnostics.Split_into_two_separate_import_declarations, fixId48, Diagnostics.Split_all_invalid_type_only_imports)]; - } - }, - getAllCodeActions: (context) => codeFixAll(context, errorCodes60, (changes, error2) => { - splitTypeOnlyImport(changes, getImportDeclaration2(context.sourceFile, error2), context); - }) - }); - } - }); - - // src/services/codefixes/convertConstToLet.ts - function getInfo20(sourceFile, pos, program) { - var _a; - const checker = program.getTypeChecker(); - const symbol = checker.getSymbolAtLocation(getTokenAtPosition(sourceFile, pos)); - if (symbol === void 0) - return; - const declaration = tryCast((_a = symbol == null ? void 0 : symbol.valueDeclaration) == null ? void 0 : _a.parent, isVariableDeclarationList); - if (declaration === void 0) - return; - const constToken = findChildOfKind(declaration, 87 /* ConstKeyword */, sourceFile); - if (constToken === void 0) - return; - return { symbol, token: constToken }; - } - function doChange39(changes, sourceFile, token) { - changes.replaceNode(sourceFile, token, factory.createToken(121 /* LetKeyword */)); - } - var fixId49, errorCodes61; - var init_convertConstToLet = __esm({ - "src/services/codefixes/convertConstToLet.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId49 = "fixConvertConstToLet"; - errorCodes61 = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code]; - registerCodeFix({ - errorCodes: errorCodes61, - getCodeActions: function getCodeActionsToConvertConstToLet(context) { - const { sourceFile, span, program } = context; - const info = getInfo20(sourceFile, span.start, program); - if (info === void 0) - return; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange39(t, sourceFile, info.token)); - return [createCodeFixActionMaybeFixAll(fixId49, changes, Diagnostics.Convert_const_to_let, fixId49, Diagnostics.Convert_all_const_to_let)]; - }, - getAllCodeActions: (context) => { - const { program } = context; - const seen = /* @__PURE__ */ new Map(); - return createCombinedCodeActions(ts_textChanges_exports.ChangeTracker.with(context, (changes) => { - eachDiagnostic(context, errorCodes61, (diag2) => { - const info = getInfo20(diag2.file, diag2.start, program); - if (info) { - if (addToSeen(seen, getSymbolId(info.symbol))) { - return doChange39(changes, diag2.file, info.token); - } - } - return void 0; - }); - })); - }, - fixIds: [fixId49] - }); - } - }); - - // src/services/codefixes/fixExpectedComma.ts - function getInfo21(sourceFile, pos, _) { - const node = getTokenAtPosition(sourceFile, pos); - return node.kind === 27 /* SemicolonToken */ && node.parent && (isObjectLiteralExpression(node.parent) || isArrayLiteralExpression(node.parent)) ? { node } : void 0; - } - function doChange40(changes, sourceFile, { node }) { - const newNode = factory.createToken(28 /* CommaToken */); - changes.replaceNode(sourceFile, node, newNode); - } - var fixId50, expectedErrorCode, errorCodes62; - var init_fixExpectedComma = __esm({ - "src/services/codefixes/fixExpectedComma.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixId50 = "fixExpectedComma"; - expectedErrorCode = Diagnostics._0_expected.code; - errorCodes62 = [expectedErrorCode]; - registerCodeFix({ - errorCodes: errorCodes62, - getCodeActions(context) { - const { sourceFile } = context; - const info = getInfo21(sourceFile, context.span.start, context.errorCode); - if (!info) - return void 0; - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange40(t, sourceFile, info)); - return [createCodeFixAction( - fixId50, - changes, - [Diagnostics.Change_0_to_1, ";", ","], - fixId50, - [Diagnostics.Change_0_to_1, ";", ","] - )]; - }, - fixIds: [fixId50], - getAllCodeActions: (context) => codeFixAll(context, errorCodes62, (changes, diag2) => { - const info = getInfo21(diag2.file, diag2.start, diag2.code); - if (info) - doChange40(changes, context.sourceFile, info); - }) - }); - } - }); - - // src/services/codefixes/fixAddVoidToPromise.ts - function makeChange11(changes, sourceFile, span, program, seen) { - const node = getTokenAtPosition(sourceFile, span.start); - if (!isIdentifier(node) || !isCallExpression(node.parent) || node.parent.expression !== node || node.parent.arguments.length !== 0) - return; - const checker = program.getTypeChecker(); - const symbol = checker.getSymbolAtLocation(node); - const decl = symbol == null ? void 0 : symbol.valueDeclaration; - if (!decl || !isParameter(decl) || !isNewExpression(decl.parent.parent)) - return; - if (seen == null ? void 0 : seen.has(decl)) - return; - seen == null ? void 0 : seen.add(decl); - const typeArguments = getEffectiveTypeArguments(decl.parent.parent); - if (some(typeArguments)) { - const typeArgument = typeArguments[0]; - const needsParens = !isUnionTypeNode(typeArgument) && !isParenthesizedTypeNode(typeArgument) && isParenthesizedTypeNode(factory.createUnionTypeNode([typeArgument, factory.createKeywordTypeNode(116 /* VoidKeyword */)]).types[0]); - if (needsParens) { - changes.insertText(sourceFile, typeArgument.pos, "("); - } - changes.insertText(sourceFile, typeArgument.end, needsParens ? ") | void" : " | void"); - } else { - const signature = checker.getResolvedSignature(node.parent); - const parameter = signature == null ? void 0 : signature.parameters[0]; - const parameterType = parameter && checker.getTypeOfSymbolAtLocation(parameter, decl.parent.parent); - if (isInJSFile(decl)) { - if (!parameterType || parameterType.flags & 3 /* AnyOrUnknown */) { - changes.insertText(sourceFile, decl.parent.parent.end, `)`); - changes.insertText(sourceFile, skipTrivia(sourceFile.text, decl.parent.parent.pos), `/** @type {Promise} */(`); - } - } else { - if (!parameterType || parameterType.flags & 2 /* Unknown */) { - changes.insertText(sourceFile, decl.parent.parent.expression.end, ""); - } - } - } - } - function getEffectiveTypeArguments(node) { - var _a; - if (isInJSFile(node)) { - if (isParenthesizedExpression(node.parent)) { - const jsDocType = (_a = getJSDocTypeTag(node.parent)) == null ? void 0 : _a.typeExpression.type; - if (jsDocType && isTypeReferenceNode(jsDocType) && isIdentifier(jsDocType.typeName) && idText(jsDocType.typeName) === "Promise") { - return jsDocType.typeArguments; - } - } - } else { - return node.typeArguments; - } - } - var fixName7, fixId51, errorCodes63; - var init_fixAddVoidToPromise = __esm({ - "src/services/codefixes/fixAddVoidToPromise.ts"() { - "use strict"; - init_ts4(); - init_ts_codefix(); - fixName7 = "addVoidToPromise"; - fixId51 = "addVoidToPromise"; - errorCodes63 = [ - Diagnostics.Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments.code, - Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code - ]; - registerCodeFix({ - errorCodes: errorCodes63, - fixIds: [fixId51], - getCodeActions(context) { - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => makeChange11(t, context.sourceFile, context.span, context.program)); - if (changes.length > 0) { - return [createCodeFixAction(fixName7, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId51, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)]; - } - }, - getAllCodeActions(context) { - return codeFixAll(context, errorCodes63, (changes, diag2) => makeChange11(changes, diag2.file, diag2, context.program, /* @__PURE__ */ new Set())); - } - }); - } - }); - - // src/services/_namespaces/ts.codefix.ts - var ts_codefix_exports = {}; - __export(ts_codefix_exports, { - PreserveOptionalFlags: () => PreserveOptionalFlags, - addNewNodeForMemberSymbol: () => addNewNodeForMemberSymbol, - codeFixAll: () => codeFixAll, - createCodeFixAction: () => createCodeFixAction, - createCodeFixActionMaybeFixAll: () => createCodeFixActionMaybeFixAll, - createCodeFixActionWithoutFixAll: () => createCodeFixActionWithoutFixAll, - createCombinedCodeActions: () => createCombinedCodeActions, - createFileTextChanges: () => createFileTextChanges, - createImportAdder: () => createImportAdder, - createImportSpecifierResolver: () => createImportSpecifierResolver, - createJsonPropertyAssignment: () => createJsonPropertyAssignment, - createMissingMemberNodes: () => createMissingMemberNodes, - createSignatureDeclarationFromCallExpression: () => createSignatureDeclarationFromCallExpression, - createSignatureDeclarationFromSignature: () => createSignatureDeclarationFromSignature, - createStubbedBody: () => createStubbedBody, - eachDiagnostic: () => eachDiagnostic, - findAncestorMatchingSpan: () => findAncestorMatchingSpan, - findJsonProperty: () => findJsonProperty, - generateAccessorFromProperty: () => generateAccessorFromProperty, - getAccessorConvertiblePropertyAtPosition: () => getAccessorConvertiblePropertyAtPosition, - getAllFixes: () => getAllFixes, - getAllSupers: () => getAllSupers, - getArgumentTypesAndTypeParameters: () => getArgumentTypesAndTypeParameters, - getFixes: () => getFixes, - getImportCompletionAction: () => getImportCompletionAction, - getImportKind: () => getImportKind, - getJSDocTypedefNodes: () => getJSDocTypedefNodes, - getNoopSymbolTrackerWithResolver: () => getNoopSymbolTrackerWithResolver, - getPromoteTypeOnlyCompletionAction: () => getPromoteTypeOnlyCompletionAction, - getSupportedErrorCodes: () => getSupportedErrorCodes, - importFixName: () => importFixName, - importSymbols: () => importSymbols, - moduleSpecifierToValidIdentifier: () => moduleSpecifierToValidIdentifier, - moduleSymbolToValidIdentifier: () => moduleSymbolToValidIdentifier, - parameterShouldGetTypeFromJSDoc: () => parameterShouldGetTypeFromJSDoc, - registerCodeFix: () => registerCodeFix, - setJsonCompilerOptionValue: () => setJsonCompilerOptionValue, - setJsonCompilerOptionValues: () => setJsonCompilerOptionValues, - tryGetAutoImportableReferenceFromTypeNode: () => tryGetAutoImportableReferenceFromTypeNode, - typeToAutoImportableTypeNode: () => typeToAutoImportableTypeNode - }); - var init_ts_codefix = __esm({ - "src/services/_namespaces/ts.codefix.ts"() { - "use strict"; - init_codeFixProvider(); - init_addConvertToUnknownForNonOverlappingTypes(); - init_addEmptyExportDeclaration(); - init_addMissingAsync(); - init_addMissingAwait(); - init_addMissingConst(); - init_addMissingDeclareProperty(); - init_addMissingInvocationForDecorator(); - init_addNameToNamelessParameter(); - init_addOptionalPropertyUndefined(); - init_annotateWithTypeFromJSDoc(); - init_convertFunctionToEs6Class(); - init_convertToAsyncFunction(); - init_convertToEsModule(); - init_correctQualifiedNameToIndexedAccessType(); - init_convertToTypeOnlyExport(); - init_convertToTypeOnlyImport(); - init_convertTypedefToType(); - init_convertLiteralTypeToMappedType(); - init_fixClassIncorrectlyImplementsInterface(); - init_importFixes(); - init_fixAddMissingConstraint(); - init_fixOverrideModifier(); - init_fixNoPropertyAccessFromIndexSignature(); - init_fixImplicitThis(); - init_fixImportNonExportedMember(); - init_fixIncorrectNamedTupleSyntax(); - init_fixSpelling(); - init_returnValueCorrect(); - init_fixAddMissingMember(); - init_fixAddMissingNewOperator(); - init_fixCannotFindModule(); - init_fixClassDoesntImplementInheritedAbstractMember(); - init_fixClassSuperMustPrecedeThisAccess(); - init_fixConstructorForDerivedNeedSuperCall(); - init_fixEnableJsxFlag(); - init_fixNaNEquality(); - init_fixModuleAndTargetOptions(); - init_fixPropertyAssignment(); - init_fixExtendsInterfaceBecomesImplements(); - init_fixForgottenThisPropertyAccess(); - init_fixInvalidJsxCharacters(); - init_fixUnmatchedParameter(); - init_fixUnreferenceableDecoratorMetadata(); - init_fixUnusedIdentifier(); - init_fixUnreachableCode(); - init_fixUnusedLabel(); - init_fixJSDocTypes(); - init_fixMissingCallParentheses(); - init_fixAwaitInSyncFunction(); - init_fixPropertyOverrideAccessor(); - init_inferFromUsage(); - init_fixReturnTypeInAsyncFunction(); - init_disableJsDiagnostics(); - init_helpers2(); - init_generateAccessors(); - init_fixInvalidImportSyntax(); - init_fixStrictClassInitialization(); - init_requireInTs(); - init_useDefaultImport(); - init_useBigintLiteral(); - init_fixAddModuleReferTypeMissingTypeof(); - init_wrapJsxInFragment(); - init_convertToMappedObjectType(); - init_removeAccidentalCallParentheses(); - init_removeUnnecessaryAwait(); - init_splitTypeOnlyImport(); - init_convertConstToLet(); - init_fixExpectedComma(); - init_fixAddVoidToPromise(); - } - }); - - // src/services/completions.ts - function originIsThisType(origin) { - return !!(origin.kind & 1 /* ThisType */); - } - function originIsSymbolMember(origin) { - return !!(origin.kind & 2 /* SymbolMember */); - } - function originIsExport(origin) { - return !!(origin && origin.kind & 4 /* Export */); - } - function originIsResolvedExport(origin) { - return !!(origin && origin.kind === 32 /* ResolvedExport */); - } - function originIncludesSymbolName(origin) { - return originIsExport(origin) || originIsResolvedExport(origin) || originIsComputedPropertyName(origin); - } - function originIsPackageJsonImport(origin) { - return (originIsExport(origin) || originIsResolvedExport(origin)) && !!origin.isFromPackageJson; - } - function originIsPromise(origin) { - return !!(origin.kind & 8 /* Promise */); - } - function originIsNullableMember(origin) { - return !!(origin.kind & 16 /* Nullable */); - } - function originIsTypeOnlyAlias(origin) { - return !!(origin && origin.kind & 64 /* TypeOnlyAlias */); - } - function originIsObjectLiteralMethod(origin) { - return !!(origin && origin.kind & 128 /* ObjectLiteralMethod */); - } - function originIsIgnore(origin) { - return !!(origin && origin.kind & 256 /* Ignore */); - } - function originIsComputedPropertyName(origin) { - return !!(origin && origin.kind & 512 /* ComputedPropertyName */); - } - function resolvingModuleSpecifiers(logPrefix, host, resolver, program, position, preferences, isForImportStatementCompletion, isValidTypeOnlyUseSite, cb) { - var _a, _b, _c; - const start = timestamp(); - const needsFullResolution = isForImportStatementCompletion || moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(program.getCompilerOptions())); - let skippedAny = false; - let ambientCount = 0; - let resolvedCount = 0; - let resolvedFromCacheCount = 0; - let cacheAttemptCount = 0; - const result = cb({ - tryResolve, - skippedAny: () => skippedAny, - resolvedAny: () => resolvedCount > 0, - resolvedBeyondLimit: () => resolvedCount > moduleSpecifierResolutionLimit - }); - const hitRateMessage = cacheAttemptCount ? ` (${(resolvedFromCacheCount / cacheAttemptCount * 100).toFixed(1)}% hit rate)` : ""; - (_a = host.log) == null ? void 0 : _a.call(host, `${logPrefix}: resolved ${resolvedCount} module specifiers, plus ${ambientCount} ambient and ${resolvedFromCacheCount} from cache${hitRateMessage}`); - (_b = host.log) == null ? void 0 : _b.call(host, `${logPrefix}: response is ${skippedAny ? "incomplete" : "complete"}`); - (_c = host.log) == null ? void 0 : _c.call(host, `${logPrefix}: ${timestamp() - start}`); - return result; - function tryResolve(exportInfo, isFromAmbientModule) { - if (isFromAmbientModule) { - const result3 = resolver.getModuleSpecifierForBestExportInfo(exportInfo, position, isValidTypeOnlyUseSite); - if (result3) { - ambientCount++; - } - return result3 || "failed"; - } - const shouldResolveModuleSpecifier = needsFullResolution || preferences.allowIncompleteCompletions && resolvedCount < moduleSpecifierResolutionLimit; - const shouldGetModuleSpecifierFromCache = !shouldResolveModuleSpecifier && preferences.allowIncompleteCompletions && cacheAttemptCount < moduleSpecifierResolutionCacheAttemptLimit; - const result2 = shouldResolveModuleSpecifier || shouldGetModuleSpecifierFromCache ? resolver.getModuleSpecifierForBestExportInfo(exportInfo, position, isValidTypeOnlyUseSite, shouldGetModuleSpecifierFromCache) : void 0; - if (!shouldResolveModuleSpecifier && !shouldGetModuleSpecifierFromCache || shouldGetModuleSpecifierFromCache && !result2) { - skippedAny = true; - } - resolvedCount += (result2 == null ? void 0 : result2.computedWithoutCacheCount) || 0; - resolvedFromCacheCount += exportInfo.length - ((result2 == null ? void 0 : result2.computedWithoutCacheCount) || 0); - if (shouldGetModuleSpecifierFromCache) { - cacheAttemptCount++; - } - return result2 || (needsFullResolution ? "failed" : "skipped"); - } - } - function getCompletionsAtPosition(host, program, log, sourceFile, position, preferences, triggerCharacter, completionKind, cancellationToken, formatContext, includeSymbol = false) { - var _a; - const { previousToken } = getRelevantTokens(position, sourceFile); - if (triggerCharacter && !isInString(sourceFile, position, previousToken) && !isValidTrigger(sourceFile, triggerCharacter, previousToken, position)) { - return void 0; - } - if (triggerCharacter === " ") { - if (preferences.includeCompletionsForImportStatements && preferences.includeCompletionsWithInsertText) { - return { isGlobalCompletion: true, isMemberCompletion: false, isNewIdentifierLocation: true, isIncomplete: true, entries: [] }; - } - return void 0; - } - const compilerOptions = program.getCompilerOptions(); - const checker = program.getTypeChecker(); - const incompleteCompletionsCache = preferences.allowIncompleteCompletions ? (_a = host.getIncompleteCompletionsCache) == null ? void 0 : _a.call(host) : void 0; - if (incompleteCompletionsCache && completionKind === 3 /* TriggerForIncompleteCompletions */ && previousToken && isIdentifier(previousToken)) { - const incompleteContinuation = continuePreviousIncompleteResponse(incompleteCompletionsCache, sourceFile, previousToken, program, host, preferences, cancellationToken, position); - if (incompleteContinuation) { - return incompleteContinuation; - } - } else { - incompleteCompletionsCache == null ? void 0 : incompleteCompletionsCache.clear(); - } - const stringCompletions = ts_Completions_StringCompletions_exports.getStringLiteralCompletions(sourceFile, position, previousToken, compilerOptions, host, program, log, preferences, includeSymbol); - if (stringCompletions) { - return stringCompletions; - } - if (previousToken && isBreakOrContinueStatement(previousToken.parent) && (previousToken.kind === 83 /* BreakKeyword */ || previousToken.kind === 88 /* ContinueKeyword */ || previousToken.kind === 80 /* Identifier */)) { - return getLabelCompletionAtPosition(previousToken.parent); - } - const completionData = getCompletionData( - program, - log, - sourceFile, - compilerOptions, - position, - preferences, - /*detailsEntryId*/ - void 0, - host, - formatContext, - cancellationToken - ); - if (!completionData) { - return void 0; - } - switch (completionData.kind) { - case 0 /* Data */: - const response = completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position, includeSymbol); - if (response == null ? void 0 : response.isIncomplete) { - incompleteCompletionsCache == null ? void 0 : incompleteCompletionsCache.set(response); - } - return response; - case 1 /* JsDocTagName */: - return jsdocCompletionInfo([ - ...ts_JsDoc_exports.getJSDocTagNameCompletions(), - ...getJSDocParameterCompletions( - sourceFile, - position, - checker, - compilerOptions, - preferences, - /*tagNameOnly*/ - true - ) - ]); - case 2 /* JsDocTag */: - return jsdocCompletionInfo([ - ...ts_JsDoc_exports.getJSDocTagCompletions(), - ...getJSDocParameterCompletions( - sourceFile, - position, - checker, - compilerOptions, - preferences, - /*tagNameOnly*/ - false - ) - ]); - case 3 /* JsDocParameterName */: - return jsdocCompletionInfo(ts_JsDoc_exports.getJSDocParameterNameCompletions(completionData.tag)); - case 4 /* Keywords */: - return specificKeywordCompletionInfo(completionData.keywordCompletions, completionData.isNewIdentifierLocation); - default: - return Debug.assertNever(completionData); - } - } - function compareCompletionEntries(entryInArray, entryToInsert) { - var _a, _b; - let result = compareStringsCaseSensitiveUI(entryInArray.sortText, entryToInsert.sortText); - if (result === 0 /* EqualTo */) { - result = compareStringsCaseSensitiveUI(entryInArray.name, entryToInsert.name); - } - if (result === 0 /* EqualTo */ && ((_a = entryInArray.data) == null ? void 0 : _a.moduleSpecifier) && ((_b = entryToInsert.data) == null ? void 0 : _b.moduleSpecifier)) { - result = compareNumberOfDirectorySeparators( - entryInArray.data.moduleSpecifier, - entryToInsert.data.moduleSpecifier - ); - } - if (result === 0 /* EqualTo */) { - return -1 /* LessThan */; - } - return result; - } - function completionEntryDataIsResolved(data) { - return !!(data == null ? void 0 : data.moduleSpecifier); - } - function continuePreviousIncompleteResponse(cache, file, location, program, host, preferences, cancellationToken, position) { - const previousResponse = cache.get(); - if (!previousResponse) - return void 0; - const touchNode = getTouchingPropertyName(file, position); - const lowerCaseTokenText = location.text.toLowerCase(); - const exportMap = getExportInfoMap(file, host, program, preferences, cancellationToken); - const newEntries = resolvingModuleSpecifiers( - "continuePreviousIncompleteResponse", - host, - ts_codefix_exports.createImportSpecifierResolver(file, program, host, preferences), - program, - location.getStart(), - preferences, - /*isForImportStatementCompletion*/ - false, - isValidTypeOnlyAliasUseSite(location), - (context) => { - const entries = mapDefined(previousResponse.entries, (entry) => { - var _a; - if (!entry.hasAction || !entry.source || !entry.data || completionEntryDataIsResolved(entry.data)) { - return entry; - } - if (!charactersFuzzyMatchInString(entry.name, lowerCaseTokenText)) { - return void 0; - } - const { origin } = Debug.checkDefined(getAutoImportSymbolFromCompletionEntryData(entry.name, entry.data, program, host)); - const info = exportMap.get(file.path, entry.data.exportMapKey); - const result = info && context.tryResolve(info, !isExternalModuleNameRelative(stripQuotes(origin.moduleSymbol.name))); - if (result === "skipped") - return entry; - if (!result || result === "failed") { - (_a = host.log) == null ? void 0 : _a.call(host, `Unexpected failure resolving auto import for '${entry.name}' from '${entry.source}'`); - return void 0; - } - const newOrigin = { - ...origin, - kind: 32 /* ResolvedExport */, - moduleSpecifier: result.moduleSpecifier - }; - entry.data = originToCompletionEntryData(newOrigin); - entry.source = getSourceFromOrigin(newOrigin); - entry.sourceDisplay = [textPart(newOrigin.moduleSpecifier)]; - return entry; - }); - if (!context.skippedAny()) { - previousResponse.isIncomplete = void 0; - } - return entries; - } - ); - previousResponse.entries = newEntries; - previousResponse.flags = (previousResponse.flags || 0) | 4 /* IsContinuation */; - previousResponse.optionalReplacementSpan = getOptionalReplacementSpan(touchNode); - return previousResponse; - } - function jsdocCompletionInfo(entries) { - return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries }; - } - function getJSDocParameterCompletions(sourceFile, position, checker, options, preferences, tagNameOnly) { - const currentToken = getTokenAtPosition(sourceFile, position); - if (!isJSDocTag(currentToken) && !isJSDoc(currentToken)) { - return []; - } - const jsDoc = isJSDoc(currentToken) ? currentToken : currentToken.parent; - if (!isJSDoc(jsDoc)) { - return []; - } - const func = jsDoc.parent; - if (!isFunctionLike(func)) { - return []; - } - const isJs = isSourceFileJS(sourceFile); - const isSnippet = preferences.includeCompletionsWithSnippetText || void 0; - const paramTagCount = countWhere(jsDoc.tags, (tag) => isJSDocParameterTag(tag) && tag.getEnd() <= position); - return mapDefined(func.parameters, (param) => { - if (getJSDocParameterTags(param).length) { - return void 0; - } - if (isIdentifier(param.name)) { - const tabstopCounter = { tabstop: 1 }; - const paramName = param.name.text; - let displayText = getJSDocParamAnnotation( - paramName, - param.initializer, - param.dotDotDotToken, - isJs, - /*isObject*/ - false, - /*isSnippet*/ - false, - checker, - options, - preferences - ); - let snippetText = isSnippet ? getJSDocParamAnnotation( - paramName, - param.initializer, - param.dotDotDotToken, - isJs, - /*isObject*/ - false, - /*isSnippet*/ - true, - checker, - options, - preferences, - tabstopCounter - ) : void 0; - if (tagNameOnly) { - displayText = displayText.slice(1); - if (snippetText) - snippetText = snippetText.slice(1); - } - return { - name: displayText, - kind: "parameter" /* parameterElement */, - sortText: SortText.LocationPriority, - insertText: isSnippet ? snippetText : void 0, - isSnippet - }; - } else if (param.parent.parameters.indexOf(param) === paramTagCount) { - const paramPath = `param${paramTagCount}`; - const displayTextResult = generateJSDocParamTagsForDestructuring( - paramPath, - param.name, - param.initializer, - param.dotDotDotToken, - isJs, - /*isSnippet*/ - false, - checker, - options, - preferences - ); - const snippetTextResult = isSnippet ? generateJSDocParamTagsForDestructuring( - paramPath, - param.name, - param.initializer, - param.dotDotDotToken, - isJs, - /*isSnippet*/ - true, - checker, - options, - preferences - ) : void 0; - let displayText = displayTextResult.join(getNewLineCharacter(options) + "* "); - let snippetText = snippetTextResult == null ? void 0 : snippetTextResult.join(getNewLineCharacter(options) + "* "); - if (tagNameOnly) { - displayText = displayText.slice(1); - if (snippetText) - snippetText = snippetText.slice(1); - } - return { - name: displayText, - kind: "parameter" /* parameterElement */, - sortText: SortText.LocationPriority, - insertText: isSnippet ? snippetText : void 0, - isSnippet - }; - } - }); - } - function generateJSDocParamTagsForDestructuring(path, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) { - if (!isJs) { - return [ - getJSDocParamAnnotation( - path, - initializer, - dotDotDotToken, - isJs, - /*isObject*/ - false, - isSnippet, - checker, - options, - preferences, - { tabstop: 1 } - ) - ]; - } - return patternWorker(path, pattern, initializer, dotDotDotToken, { tabstop: 1 }); - function patternWorker(path2, pattern2, initializer2, dotDotDotToken2, counter) { - if (isObjectBindingPattern(pattern2) && !dotDotDotToken2) { - const oldTabstop = counter.tabstop; - const childCounter = { tabstop: oldTabstop }; - const rootParam = getJSDocParamAnnotation( - path2, - initializer2, - dotDotDotToken2, - isJs, - /*isObject*/ - true, - isSnippet, - checker, - options, - preferences, - childCounter - ); - let childTags = []; - for (const element of pattern2.elements) { - const elementTags = elementWorker(path2, element, childCounter); - if (!elementTags) { - childTags = void 0; - break; - } else { - childTags.push(...elementTags); - } - } - if (childTags) { - counter.tabstop = childCounter.tabstop; - return [rootParam, ...childTags]; - } - } - return [ - getJSDocParamAnnotation( - path2, - initializer2, - dotDotDotToken2, - isJs, - /*isObject*/ - false, - isSnippet, - checker, - options, - preferences, - counter - ) - ]; - } - function elementWorker(path2, element, counter) { - if (!element.propertyName && isIdentifier(element.name) || isIdentifier(element.name)) { - const propertyName = element.propertyName ? tryGetTextOfPropertyName(element.propertyName) : element.name.text; - if (!propertyName) { - return void 0; - } - const paramName = `${path2}.${propertyName}`; - return [ - getJSDocParamAnnotation( - paramName, - element.initializer, - element.dotDotDotToken, - isJs, - /*isObject*/ - false, - isSnippet, - checker, - options, - preferences, - counter - ) - ]; - } else if (element.propertyName) { - const propertyName = tryGetTextOfPropertyName(element.propertyName); - return propertyName && patternWorker(`${path2}.${propertyName}`, element.name, element.initializer, element.dotDotDotToken, counter); - } - return void 0; - } - } - function getJSDocParamAnnotation(paramName, initializer, dotDotDotToken, isJs, isObject, isSnippet, checker, options, preferences, tabstopCounter) { - if (isSnippet) { - Debug.assertIsDefined(tabstopCounter); - } - if (initializer) { - paramName = getJSDocParamNameWithInitializer(paramName, initializer); - } - if (isSnippet) { - paramName = escapeSnippetText(paramName); - } - if (isJs) { - let type = "*"; - if (isObject) { - Debug.assert(!dotDotDotToken, `Cannot annotate a rest parameter with type 'Object'.`); - type = "Object"; - } else { - if (initializer) { - const inferredType = checker.getTypeAtLocation(initializer.parent); - if (!(inferredType.flags & (1 /* Any */ | 16384 /* Void */))) { - const sourceFile = initializer.getSourceFile(); - const quotePreference = getQuotePreference(sourceFile, preferences); - const builderFlags = quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */; - const typeNode = checker.typeToTypeNode(inferredType, findAncestor(initializer, isFunctionLike), builderFlags); - if (typeNode) { - const printer = isSnippet ? createSnippetPrinter({ - removeComments: true, - module: options.module, - target: options.target - }) : createPrinter({ - removeComments: true, - module: options.module, - target: options.target - }); - setEmitFlags(typeNode, 1 /* SingleLine */); - type = printer.printNode(4 /* Unspecified */, typeNode, sourceFile); - } - } - } - if (isSnippet && type === "*") { - type = `\${${tabstopCounter.tabstop++}:${type}}`; - } - } - const dotDotDot = !isObject && dotDotDotToken ? "..." : ""; - const description3 = isSnippet ? `\${${tabstopCounter.tabstop++}}` : ""; - return `@param {${dotDotDot}${type}} ${paramName} ${description3}`; - } else { - const description3 = isSnippet ? `\${${tabstopCounter.tabstop++}}` : ""; - return `@param ${paramName} ${description3}`; - } - } - function getJSDocParamNameWithInitializer(paramName, initializer) { - const initializerText = initializer.getText().trim(); - if (initializerText.includes("\n") || initializerText.length > 80) { - return `[${paramName}]`; - } - return `[${paramName}=${initializerText}]`; - } - function keywordToCompletionEntry(keyword) { - return { - name: tokenToString(keyword), - kind: "keyword" /* keyword */, - kindModifiers: "" /* none */, - sortText: SortText.GlobalsOrKeywords - }; - } - function specificKeywordCompletionInfo(entries, isNewIdentifierLocation) { - return { - isGlobalCompletion: false, - isMemberCompletion: false, - isNewIdentifierLocation, - entries: entries.slice() - }; - } - function keywordCompletionData(keywordFilters, filterOutTsOnlyKeywords, isNewIdentifierLocation) { - return { - kind: 4 /* Keywords */, - keywordCompletions: getKeywordCompletions(keywordFilters, filterOutTsOnlyKeywords), - isNewIdentifierLocation - }; - } - function keywordFiltersFromSyntaxKind(keywordCompletion) { - switch (keywordCompletion) { - case 156 /* TypeKeyword */: - return 8 /* TypeKeyword */; - default: - Debug.fail("Unknown mapping from SyntaxKind to KeywordCompletionFilters"); - } - } - function getOptionalReplacementSpan(location) { - return (location == null ? void 0 : location.kind) === 80 /* Identifier */ ? createTextSpanFromNode(location) : void 0; - } - function completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position, includeSymbol) { - const { - symbols, - contextToken, - completionKind, - isInSnippetScope, - isNewIdentifierLocation, - location, - propertyAccessToConvert, - keywordFilters, - symbolToOriginInfoMap, - recommendedCompletion, - isJsxInitializer, - isTypeOnlyLocation, - isJsxIdentifierExpected, - isRightOfOpenTag, - isRightOfDotOrQuestionDot, - importStatementCompletion, - insideJsDocTagTypeExpression, - symbolToSortTextMap, - hasUnresolvedAutoImports - } = completionData; - let literals = completionData.literals; - const checker = program.getTypeChecker(); - if (getLanguageVariant(sourceFile.scriptKind) === 1 /* JSX */) { - const completionInfo = getJsxClosingTagCompletion(location, sourceFile); - if (completionInfo) { - return completionInfo; - } - } - const caseClause = findAncestor(contextToken, isCaseClause); - if (caseClause && (isCaseKeyword(contextToken) || isNodeDescendantOf(contextToken, caseClause.expression))) { - const tracker = newCaseClauseTracker(checker, caseClause.parent.clauses); - literals = literals.filter((literal) => !tracker.hasValue(literal)); - symbols.forEach((symbol, i) => { - if (symbol.valueDeclaration && isEnumMember(symbol.valueDeclaration)) { - const value = checker.getConstantValue(symbol.valueDeclaration); - if (value !== void 0 && tracker.hasValue(value)) { - symbolToOriginInfoMap[i] = { kind: 256 /* Ignore */ }; - } - } - }); - } - const entries = createSortedArray(); - const isChecked = isCheckedFile(sourceFile, compilerOptions); - if (isChecked && !isNewIdentifierLocation && (!symbols || symbols.length === 0) && keywordFilters === 0 /* None */) { - return void 0; - } - const uniqueNames = getCompletionEntriesFromSymbols( - symbols, - entries, - /*replacementToken*/ - void 0, - contextToken, - location, - position, - sourceFile, - host, - program, - getEmitScriptTarget(compilerOptions), - log, - completionKind, - preferences, - compilerOptions, - formatContext, - isTypeOnlyLocation, - propertyAccessToConvert, - isJsxIdentifierExpected, - isJsxInitializer, - importStatementCompletion, - recommendedCompletion, - symbolToOriginInfoMap, - symbolToSortTextMap, - isJsxIdentifierExpected, - isRightOfOpenTag, - includeSymbol - ); - if (keywordFilters !== 0 /* None */) { - for (const keywordEntry of getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile))) { - if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !uniqueNames.has(keywordEntry.name)) { - uniqueNames.add(keywordEntry.name); - insertSorted( - entries, - keywordEntry, - compareCompletionEntries, - /*allowDuplicates*/ - true - ); - } - } - } - for (const keywordEntry of getContextualKeywords(contextToken, position)) { - if (!uniqueNames.has(keywordEntry.name)) { - uniqueNames.add(keywordEntry.name); - insertSorted( - entries, - keywordEntry, - compareCompletionEntries, - /*allowDuplicates*/ - true - ); - } - } - for (const literal of literals) { - const literalEntry = createCompletionEntryForLiteral(sourceFile, preferences, literal); - uniqueNames.add(literalEntry.name); - insertSorted( - entries, - literalEntry, - compareCompletionEntries, - /*allowDuplicates*/ - true - ); - } - if (!isChecked) { - getJSCompletionEntries(sourceFile, location.pos, uniqueNames, getEmitScriptTarget(compilerOptions), entries); - } - let caseBlock; - if (preferences.includeCompletionsWithInsertText && contextToken && !isRightOfOpenTag && !isRightOfDotOrQuestionDot && (caseBlock = findAncestor(contextToken, isCaseBlock))) { - const cases = getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, compilerOptions, host, program, formatContext); - if (cases) { - entries.push(cases.entry); - } - } - return { - flags: completionData.flags, - isGlobalCompletion: isInSnippetScope, - isIncomplete: preferences.allowIncompleteCompletions && hasUnresolvedAutoImports ? true : void 0, - isMemberCompletion: isMemberCompletionKind(completionKind), - isNewIdentifierLocation, - optionalReplacementSpan: getOptionalReplacementSpan(location), - entries - }; - } - function isCheckedFile(sourceFile, compilerOptions) { - return !isSourceFileJS(sourceFile) || !!isCheckJsEnabledForFile(sourceFile, compilerOptions); - } - function getExhaustiveCaseSnippets(caseBlock, sourceFile, preferences, options, host, program, formatContext) { - const clauses = caseBlock.clauses; - const checker = program.getTypeChecker(); - const switchType = checker.getTypeAtLocation(caseBlock.parent.expression); - if (switchType && switchType.isUnion() && every(switchType.types, (type) => type.isLiteral())) { - const tracker = newCaseClauseTracker(checker, clauses); - const target = getEmitScriptTarget(options); - const quotePreference = getQuotePreference(sourceFile, preferences); - const importAdder = ts_codefix_exports.createImportAdder(sourceFile, program, preferences, host); - const elements = []; - for (const type of switchType.types) { - if (type.flags & 1024 /* EnumLiteral */) { - Debug.assert(type.symbol, "An enum member type should have a symbol"); - Debug.assert(type.symbol.parent, "An enum member type should have a parent symbol (the enum symbol)"); - const enumValue = type.symbol.valueDeclaration && checker.getConstantValue(type.symbol.valueDeclaration); - if (enumValue !== void 0) { - if (tracker.hasValue(enumValue)) { - continue; - } - tracker.addValue(enumValue); - } - const typeNode = ts_codefix_exports.typeToAutoImportableTypeNode(checker, importAdder, type, caseBlock, target); - if (!typeNode) { - return void 0; - } - const expr = typeNodeToExpression(typeNode, target, quotePreference); - if (!expr) { - return void 0; - } - elements.push(expr); - } else if (!tracker.hasValue(type.value)) { - switch (typeof type.value) { - case "object": - elements.push(type.value.negative ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createBigIntLiteral({ negative: false, base10Value: type.value.base10Value })) : factory.createBigIntLiteral(type.value)); - break; - case "number": - elements.push(type.value < 0 ? factory.createPrefixUnaryExpression(41 /* MinusToken */, factory.createNumericLiteral(-type.value)) : factory.createNumericLiteral(type.value)); - break; - case "string": - elements.push(factory.createStringLiteral(type.value, quotePreference === 0 /* Single */)); - break; - } - } - } - if (elements.length === 0) { - return void 0; - } - const newClauses = map(elements, (element) => factory.createCaseClause(element, [])); - const newLineChar = getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options); - const printer = createSnippetPrinter({ - removeComments: true, - module: options.module, - target: options.target, - newLine: getNewLineKind(newLineChar) - }); - const printNode = formatContext ? (node) => printer.printAndFormatNode(4 /* Unspecified */, node, sourceFile, formatContext) : (node) => printer.printNode(4 /* Unspecified */, node, sourceFile); - const insertText = map(newClauses, (clause, i) => { - if (preferences.includeCompletionsWithSnippetText) { - return `${printNode(clause)}$${i + 1}`; - } - return `${printNode(clause)}`; - }).join(newLineChar); - const firstClause = printer.printNode(4 /* Unspecified */, newClauses[0], sourceFile); - return { - entry: { - name: `${firstClause} ...`, - kind: "" /* unknown */, - sortText: SortText.GlobalsOrKeywords, - insertText, - hasAction: importAdder.hasFixes() || void 0, - source: "SwitchCases/" /* SwitchCases */, - isSnippet: preferences.includeCompletionsWithSnippetText ? true : void 0 - }, - importAdder - }; - } - return void 0; - } - function typeNodeToExpression(typeNode, languageVersion, quotePreference) { - switch (typeNode.kind) { - case 183 /* TypeReference */: - const typeName = typeNode.typeName; - return entityNameToExpression(typeName, languageVersion, quotePreference); - case 199 /* IndexedAccessType */: - const objectExpression = typeNodeToExpression(typeNode.objectType, languageVersion, quotePreference); - const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference); - return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression); - case 201 /* LiteralType */: - const literal = typeNode.literal; - switch (literal.kind) { - case 11 /* StringLiteral */: - return factory.createStringLiteral(literal.text, quotePreference === 0 /* Single */); - case 9 /* NumericLiteral */: - return factory.createNumericLiteral(literal.text, literal.numericLiteralFlags); - } - return void 0; - case 196 /* ParenthesizedType */: - const exp = typeNodeToExpression(typeNode.type, languageVersion, quotePreference); - return exp && (isIdentifier(exp) ? exp : factory.createParenthesizedExpression(exp)); - case 186 /* TypeQuery */: - return entityNameToExpression(typeNode.exprName, languageVersion, quotePreference); - case 205 /* ImportType */: - Debug.fail(`We should not get an import type after calling 'codefix.typeToAutoImportableTypeNode'.`); - } - return void 0; - } - function entityNameToExpression(entityName, languageVersion, quotePreference) { - if (isIdentifier(entityName)) { - return entityName; - } - const unescapedName = unescapeLeadingUnderscores(entityName.right.escapedText); - if (canUsePropertyAccess(unescapedName, languageVersion)) { - return factory.createPropertyAccessExpression( - entityNameToExpression(entityName.left, languageVersion, quotePreference), - unescapedName - ); - } else { - return factory.createElementAccessExpression( - entityNameToExpression(entityName.left, languageVersion, quotePreference), - factory.createStringLiteral(unescapedName, quotePreference === 0 /* Single */) - ); - } - } - function isMemberCompletionKind(kind) { - switch (kind) { - case 0 /* ObjectPropertyDeclaration */: - case 3 /* MemberLike */: - case 2 /* PropertyAccess */: - return true; - default: - return false; - } - } - function getJsxClosingTagCompletion(location, sourceFile) { - const jsxClosingElement = findAncestor(location, (node) => { - switch (node.kind) { - case 287 /* JsxClosingElement */: - return true; - case 44 /* SlashToken */: - case 32 /* GreaterThanToken */: - case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: - return false; - default: - return "quit"; - } - }); - if (jsxClosingElement) { - const hasClosingAngleBracket = !!findChildOfKind(jsxClosingElement, 32 /* GreaterThanToken */, sourceFile); - const tagName = jsxClosingElement.parent.openingElement.tagName; - const closingTag = tagName.getText(sourceFile); - const fullClosingTag = closingTag + (hasClosingAngleBracket ? "" : ">"); - const replacementSpan = createTextSpanFromNode(jsxClosingElement.tagName); - const entry = { - name: fullClosingTag, - kind: "class" /* classElement */, - kindModifiers: void 0, - sortText: SortText.LocationPriority - }; - return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false, optionalReplacementSpan: replacementSpan, entries: [entry] }; - } - return; - } - function getJSCompletionEntries(sourceFile, position, uniqueNames, target, entries) { - getNameTable(sourceFile).forEach((pos, name) => { - if (pos === position) { - return; - } - const realName = unescapeLeadingUnderscores(name); - if (!uniqueNames.has(realName) && isIdentifierText(realName, target)) { - uniqueNames.add(realName); - insertSorted(entries, { - name: realName, - kind: "warning" /* warning */, - kindModifiers: "", - sortText: SortText.JavascriptIdentifiers, - isFromUncheckedFile: true - }, compareCompletionEntries); - } - }); - } - function completionNameForLiteral(sourceFile, preferences, literal) { - return typeof literal === "object" ? pseudoBigIntToString(literal) + "n" : isString(literal) ? quote(sourceFile, preferences, literal) : JSON.stringify(literal); - } - function createCompletionEntryForLiteral(sourceFile, preferences, literal) { - return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority }; - } - function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) { - var _a, _b; - let insertText; - let filterText; - let replacementSpan = getReplacementSpanForContextToken(replacementToken); - let data; - let isSnippet; - let source = getSourceFromOrigin(origin); - let sourceDisplay; - let hasAction; - let labelDetails; - const typeChecker = program.getTypeChecker(); - const insertQuestionDot = origin && originIsNullableMember(origin); - const useBraces = origin && originIsSymbolMember(origin) || needsConvertPropertyAccess; - if (origin && originIsThisType(origin)) { - insertText = needsConvertPropertyAccess ? `this${insertQuestionDot ? "?." : ""}[${quotePropertyName(sourceFile, preferences, name)}]` : `this${insertQuestionDot ? "?." : "."}${name}`; - } else if ((useBraces || insertQuestionDot) && propertyAccessToConvert) { - insertText = useBraces ? needsConvertPropertyAccess ? `[${quotePropertyName(sourceFile, preferences, name)}]` : `[${name}]` : name; - if (insertQuestionDot || propertyAccessToConvert.questionDotToken) { - insertText = `?.${insertText}`; - } - const dot = findChildOfKind(propertyAccessToConvert, 25 /* DotToken */, sourceFile) || findChildOfKind(propertyAccessToConvert, 29 /* QuestionDotToken */, sourceFile); - if (!dot) { - return void 0; - } - const end = startsWith(name, propertyAccessToConvert.name.text) ? propertyAccessToConvert.name.end : dot.end; - replacementSpan = createTextSpanFromBounds(dot.getStart(sourceFile), end); - } - if (isJsxInitializer) { - if (insertText === void 0) - insertText = name; - insertText = `{${insertText}}`; - if (typeof isJsxInitializer !== "boolean") { - replacementSpan = createTextSpanFromNode(isJsxInitializer, sourceFile); - } - } - if (origin && originIsPromise(origin) && propertyAccessToConvert) { - if (insertText === void 0) - insertText = name; - const precedingToken = findPrecedingToken(propertyAccessToConvert.pos, sourceFile); - let awaitText = ""; - if (precedingToken && positionIsASICandidate(precedingToken.end, precedingToken.parent, sourceFile)) { - awaitText = ";"; - } - awaitText += `(await ${propertyAccessToConvert.expression.getText()})`; - insertText = needsConvertPropertyAccess ? `${awaitText}${insertText}` : `${awaitText}${insertQuestionDot ? "?." : "."}${insertText}`; - const isInAwaitExpression = tryCast(propertyAccessToConvert.parent, isAwaitExpression); - const wrapNode = isInAwaitExpression ? propertyAccessToConvert.parent : propertyAccessToConvert.expression; - replacementSpan = createTextSpanFromBounds(wrapNode.getStart(sourceFile), propertyAccessToConvert.end); - } - if (originIsResolvedExport(origin)) { - sourceDisplay = [textPart(origin.moduleSpecifier)]; - if (importStatementCompletion) { - ({ insertText, replacementSpan } = getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, options, preferences)); - isSnippet = preferences.includeCompletionsWithSnippetText ? true : void 0; - } - } - if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) { - hasAction = true; - } - if (completionKind === 0 /* ObjectPropertyDeclaration */ && contextToken && ((_a = findPrecedingToken(contextToken.pos, sourceFile, contextToken)) == null ? void 0 : _a.kind) !== 28 /* CommaToken */) { - if (isMethodDeclaration(contextToken.parent.parent) || isGetAccessorDeclaration(contextToken.parent.parent) || isSetAccessorDeclaration(contextToken.parent.parent) || isSpreadAssignment(contextToken.parent) || ((_b = findAncestor(contextToken.parent, isPropertyAssignment)) == null ? void 0 : _b.getLastToken(sourceFile)) === contextToken || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { - source = "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */; - hasAction = true; - } - } - if (preferences.includeCompletionsWithClassMemberSnippets && preferences.includeCompletionsWithInsertText && completionKind === 3 /* MemberLike */ && isClassLikeMemberCompletion(symbol, location, sourceFile)) { - let importAdder; - const memberCompletionEntry = getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext); - if (memberCompletionEntry) { - ({ insertText, filterText, isSnippet, importAdder } = memberCompletionEntry); - if (importAdder == null ? void 0 : importAdder.hasFixes()) { - hasAction = true; - source = "ClassMemberSnippet/" /* ClassMemberSnippet */; - } - } else { - return void 0; - } - } - if (origin && originIsObjectLiteralMethod(origin)) { - ({ insertText, isSnippet, labelDetails } = origin); - if (!preferences.useLabelDetailsInCompletionEntries) { - name = name + labelDetails.detail; - labelDetails = void 0; - } - source = "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */; - sortText = SortText.SortBelow(sortText); - } - if (isJsxIdentifierExpected && !isRightOfOpenTag && preferences.includeCompletionsWithSnippetText && preferences.jsxAttributeCompletionStyle && preferences.jsxAttributeCompletionStyle !== "none" && !(isJsxAttribute(location.parent) && location.parent.initializer)) { - let useBraces2 = preferences.jsxAttributeCompletionStyle === "braces"; - const type = typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (preferences.jsxAttributeCompletionStyle === "auto" && !(type.flags & 528 /* BooleanLike */) && !(type.flags & 1048576 /* Union */ && find(type.types, (type2) => !!(type2.flags & 528 /* BooleanLike */)))) { - if (type.flags & 402653316 /* StringLike */ || type.flags & 1048576 /* Union */ && every(type.types, (type2) => !!(type2.flags & (402653316 /* StringLike */ | 32768 /* Undefined */) || isStringAndEmptyAnonymousObjectIntersection(type2)))) { - insertText = `${escapeSnippetText(name)}=${quote(sourceFile, preferences, "$1")}`; - isSnippet = true; - } else { - useBraces2 = true; - } - } - if (useBraces2) { - insertText = `${escapeSnippetText(name)}={$1}`; - isSnippet = true; - } - } - if (insertText !== void 0 && !preferences.includeCompletionsWithInsertText) { - return void 0; - } - if (originIsExport(origin) || originIsResolvedExport(origin)) { - data = originToCompletionEntryData(origin); - hasAction = !importStatementCompletion; - } - const parentNamedImportOrExport = findAncestor(location, isNamedImportsOrExports); - if ((parentNamedImportOrExport == null ? void 0 : parentNamedImportOrExport.kind) === 275 /* NamedImports */) { - const possibleToken = stringToToken(name); - if (parentNamedImportOrExport && possibleToken && (possibleToken === 135 /* AwaitKeyword */ || isNonContextualKeyword(possibleToken))) { - insertText = `${name} as ${name}_`; - } - } - return { - name, - kind: ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, location), - kindModifiers: ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), - sortText, - source, - hasAction: hasAction ? true : void 0, - isRecommended: isRecommendedCompletionMatch(symbol, recommendedCompletion, typeChecker) || void 0, - insertText, - filterText, - replacementSpan, - sourceDisplay, - labelDetails, - isSnippet, - isPackageJsonImport: originIsPackageJsonImport(origin) || void 0, - isImportStatementCompletion: !!importStatementCompletion || void 0, - data, - ...includeSymbol ? { symbol } : void 0 - }; - } - function isClassLikeMemberCompletion(symbol, location, sourceFile) { - if (isInJSFile(location)) { - return false; - } - const memberFlags = 106500 /* ClassMember */ & 900095 /* EnumMemberExcludes */; - return !!(symbol.flags & memberFlags) && (isClassLike(location) || location.parent && location.parent.parent && isClassElement(location.parent) && location === location.parent.name && location.parent.getLastToken(sourceFile) === location.parent.name && isClassLike(location.parent.parent) || location.parent && isSyntaxList(location) && isClassLike(location.parent)); - } - function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, position, contextToken, formatContext) { - const classLikeDeclaration = findAncestor(location, isClassLike); - if (!classLikeDeclaration) { - return void 0; - } - let isSnippet; - let insertText = name; - const filterText = name; - const checker = program.getTypeChecker(); - const sourceFile = location.getSourceFile(); - const printer = createSnippetPrinter({ - removeComments: true, - module: options.module, - target: options.target, - omitTrailingSemicolon: false, - newLine: getNewLineKind(getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options)) - }); - const importAdder = ts_codefix_exports.createImportAdder(sourceFile, program, preferences, host); - let body; - if (preferences.includeCompletionsWithSnippetText) { - isSnippet = true; - const emptyStmt = factory.createEmptyStatement(); - body = factory.createBlock( - [emptyStmt], - /*multiLine*/ - true - ); - setSnippetElement(emptyStmt, { kind: 0 /* TabStop */, order: 0 }); - } else { - body = factory.createBlock( - [], - /*multiLine*/ - true - ); - } - let modifiers = 0 /* None */; - const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators } = getPresentModifiers(contextToken, sourceFile, position); - const isAbstract = presentModifiers & 256 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 256 /* Abstract */; - let completionNodes = []; - ts_codefix_exports.addNewNodeForMemberSymbol( - symbol, - classLikeDeclaration, - sourceFile, - { program, host }, - preferences, - importAdder, - // `addNewNodeForMemberSymbol` calls this callback function for each new member node - // it adds for the given member symbol. - // We store these member nodes in the `completionNodes` array. - // Note: there might be: - // - No nodes if `addNewNodeForMemberSymbol` cannot figure out a node for the member; - // - One node; - // - More than one node if the member is overloaded (e.g. a method with overload signatures). - (node) => { - let requiredModifiers = 0 /* None */; - if (isAbstract) { - requiredModifiers |= 256 /* Abstract */; - } - if (isClassElement(node) && checker.getMemberOverrideModifierStatus(classLikeDeclaration, node, symbol) === 1 /* NeedsOverride */) { - requiredModifiers |= 16384 /* Override */; - } - if (!completionNodes.length) { - modifiers = node.modifierFlagsCache | requiredModifiers; - } - node = factory.updateModifiers(node, modifiers); - completionNodes.push(node); - }, - body, - ts_codefix_exports.PreserveOptionalFlags.Property, - !!isAbstract - ); - if (completionNodes.length) { - const isMethod = symbol.flags & 8192 /* Method */; - let allowedModifiers = modifiers | 16384 /* Override */ | 4 /* Public */; - if (!isMethod) { - allowedModifiers |= 2 /* Ambient */ | 64 /* Readonly */; - } else { - allowedModifiers |= 512 /* Async */; - } - const allowedAndPresent = presentModifiers & allowedModifiers; - if (presentModifiers & ~allowedModifiers) { - return void 0; - } - if (modifiers & 16 /* Protected */ && allowedAndPresent & 4 /* Public */) { - modifiers &= ~16 /* Protected */; - } - if (allowedAndPresent !== 0 /* None */ && !(allowedAndPresent & 4 /* Public */)) { - modifiers &= ~4 /* Public */; - } - modifiers |= allowedAndPresent; - completionNodes = completionNodes.map((node) => factory.updateModifiers(node, modifiers)); - if (presentDecorators == null ? void 0 : presentDecorators.length) { - const lastNode = completionNodes[completionNodes.length - 1]; - if (canHaveDecorators(lastNode)) { - completionNodes[completionNodes.length - 1] = factory.updateModifierLike(lastNode, presentDecorators.concat(getModifiers(lastNode) || [])); - } - } - const format = 1 /* MultiLine */ | 131072 /* NoTrailingNewLine */; - if (formatContext) { - insertText = printer.printAndFormatSnippetList( - format, - factory.createNodeArray(completionNodes), - sourceFile, - formatContext - ); - } else { - insertText = printer.printSnippetList( - format, - factory.createNodeArray(completionNodes), - sourceFile - ); - } - } - return { insertText, filterText, isSnippet, importAdder, eraseRange }; - } - function getPresentModifiers(contextToken, sourceFile, position) { - if (!contextToken || getLineAndCharacterOfPosition(sourceFile, position).line > getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line) { - return { modifiers: 0 /* None */ }; - } - let modifiers = 0 /* None */; - let decorators; - let contextMod; - const range = { pos: position, end: position }; - if (isPropertyDeclaration(contextToken.parent) && contextToken.parent.modifiers) { - modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 126975 /* Modifier */; - decorators = contextToken.parent.modifiers.filter(isDecorator) || []; - range.pos = Math.min(range.pos, contextToken.parent.modifiers.pos); - } - if (contextMod = isModifierLike2(contextToken)) { - const contextModifierFlag = modifierToFlag(contextMod); - if (!(modifiers & contextModifierFlag)) { - modifiers |= contextModifierFlag; - range.pos = Math.min(range.pos, contextToken.pos); - } - } - return { modifiers, decorators, range: range.pos !== position ? range : void 0 }; - } - function isModifierLike2(node) { - if (isModifier(node)) { - return node.kind; - } - if (isIdentifier(node)) { - const originalKeywordKind = identifierToKeywordKind(node); - if (originalKeywordKind && isModifierKind(originalKeywordKind)) { - return originalKeywordKind; - } - } - return void 0; - } - function getEntryForObjectLiteralMethodCompletion(symbol, name, enclosingDeclaration, program, host, options, preferences, formatContext) { - const isSnippet = preferences.includeCompletionsWithSnippetText || void 0; - let insertText = name; - const sourceFile = enclosingDeclaration.getSourceFile(); - const method = createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, program, host, preferences); - if (!method) { - return void 0; - } - const printer = createSnippetPrinter({ - removeComments: true, - module: options.module, - target: options.target, - omitTrailingSemicolon: false, - newLine: getNewLineKind(getNewLineOrDefaultFromHost(host, formatContext == null ? void 0 : formatContext.options)) - }); - if (formatContext) { - insertText = printer.printAndFormatSnippetList(16 /* CommaDelimited */ | 64 /* AllowTrailingComma */, factory.createNodeArray( - [method], - /*hasTrailingComma*/ - true - ), sourceFile, formatContext); - } else { - insertText = printer.printSnippetList(16 /* CommaDelimited */ | 64 /* AllowTrailingComma */, factory.createNodeArray( - [method], - /*hasTrailingComma*/ - true - ), sourceFile); - } - const signaturePrinter = createPrinter({ - removeComments: true, - module: options.module, - target: options.target, - omitTrailingSemicolon: true - }); - const methodSignature = factory.createMethodSignature( - /*modifiers*/ - void 0, - /*name*/ - "", - method.questionToken, - method.typeParameters, - method.parameters, - method.type - ); - const labelDetails = { detail: signaturePrinter.printNode(4 /* Unspecified */, methodSignature, sourceFile) }; - return { isSnippet, insertText, labelDetails }; - } - function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, program, host, preferences) { - const declarations = symbol.getDeclarations(); - if (!(declarations && declarations.length)) { - return void 0; - } - const checker = program.getTypeChecker(); - const declaration = declarations[0]; - const name = getSynthesizedDeepClone( - getNameOfDeclaration(declaration), - /*includeTrivia*/ - false - ); - const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); - const quotePreference = getQuotePreference(sourceFile, preferences); - const builderFlags = 33554432 /* OmitThisParameter */ | (quotePreference === 0 /* Single */ ? 268435456 /* UseSingleQuotesForStringLiteralType */ : 0 /* None */); - switch (declaration.kind) { - case 171 /* PropertySignature */: - case 172 /* PropertyDeclaration */: - case 173 /* MethodSignature */: - case 174 /* MethodDeclaration */: { - let effectiveType = type.flags & 1048576 /* Union */ && type.types.length < 10 ? checker.getUnionType(type.types, 2 /* Subtype */) : type; - if (effectiveType.flags & 1048576 /* Union */) { - const functionTypes = filter(effectiveType.types, (type2) => checker.getSignaturesOfType(type2, 0 /* Call */).length > 0); - if (functionTypes.length === 1) { - effectiveType = functionTypes[0]; - } else { - return void 0; - } - } - const signatures = checker.getSignaturesOfType(effectiveType, 0 /* Call */); - if (signatures.length !== 1) { - return void 0; - } - const typeNode = checker.typeToTypeNode(effectiveType, enclosingDeclaration, builderFlags, ts_codefix_exports.getNoopSymbolTrackerWithResolver({ program, host })); - if (!typeNode || !isFunctionTypeNode(typeNode)) { - return void 0; - } - let body; - if (preferences.includeCompletionsWithSnippetText) { - const emptyStmt = factory.createEmptyStatement(); - body = factory.createBlock( - [emptyStmt], - /*multiLine*/ - true - ); - setSnippetElement(emptyStmt, { kind: 0 /* TabStop */, order: 0 }); - } else { - body = factory.createBlock( - [], - /*multiLine*/ - true - ); - } - const parameters = typeNode.parameters.map((typedParam) => factory.createParameterDeclaration( - /*modifiers*/ - void 0, - typedParam.dotDotDotToken, - typedParam.name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - typedParam.initializer - )); - return factory.createMethodDeclaration( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - name, - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - parameters, - /*type*/ - void 0, - body - ); - } - default: - return void 0; - } - } - function createSnippetPrinter(printerOptions) { - let escapes; - const baseWriter = ts_textChanges_exports.createWriter(getNewLineCharacter(printerOptions)); - const printer = createPrinter(printerOptions, baseWriter); - const writer = { - ...baseWriter, - write: (s) => escapingWrite(s, () => baseWriter.write(s)), - nonEscapingWrite: baseWriter.write, - writeLiteral: (s) => escapingWrite(s, () => baseWriter.writeLiteral(s)), - writeStringLiteral: (s) => escapingWrite(s, () => baseWriter.writeStringLiteral(s)), - writeSymbol: (s, symbol) => escapingWrite(s, () => baseWriter.writeSymbol(s, symbol)), - writeParameter: (s) => escapingWrite(s, () => baseWriter.writeParameter(s)), - writeComment: (s) => escapingWrite(s, () => baseWriter.writeComment(s)), - writeProperty: (s) => escapingWrite(s, () => baseWriter.writeProperty(s)) - }; - return { - printSnippetList, - printAndFormatSnippetList, - printNode, - printAndFormatNode - }; - function escapingWrite(s, write) { - const escaped = escapeSnippetText(s); - if (escaped !== s) { - const start = baseWriter.getTextPos(); - write(); - const end = baseWriter.getTextPos(); - escapes = append(escapes || (escapes = []), { newText: escaped, span: { start, length: end - start } }); - } else { - write(); - } - } - function printSnippetList(format, list, sourceFile) { - const unescaped = printUnescapedSnippetList(format, list, sourceFile); - return escapes ? ts_textChanges_exports.applyChanges(unescaped, escapes) : unescaped; - } - function printUnescapedSnippetList(format, list, sourceFile) { - escapes = void 0; - writer.clear(); - printer.writeList(format, list, sourceFile, writer); - return writer.getText(); - } - function printAndFormatSnippetList(format, list, sourceFile, formatContext) { - const syntheticFile = { - text: printUnescapedSnippetList( - format, - list, - sourceFile - ), - getLineAndCharacterOfPosition(pos) { - return getLineAndCharacterOfPosition(this, pos); - } - }; - const formatOptions = getFormatCodeSettingsForWriting(formatContext, sourceFile); - const changes = flatMap(list, (node) => { - const nodeWithPos = ts_textChanges_exports.assignPositionsToNode(node); - return ts_formatting_exports.formatNodeGivenIndentation( - nodeWithPos, - syntheticFile, - sourceFile.languageVariant, - /* indentation */ - 0, - /* delta */ - 0, - { ...formatContext, options: formatOptions } - ); - }); - const allChanges = escapes ? stableSort(concatenate(changes, escapes), (a, b) => compareTextSpans(a.span, b.span)) : changes; - return ts_textChanges_exports.applyChanges(syntheticFile.text, allChanges); - } - function printNode(hint, node, sourceFile) { - const unescaped = printUnescapedNode(hint, node, sourceFile); - return escapes ? ts_textChanges_exports.applyChanges(unescaped, escapes) : unescaped; - } - function printUnescapedNode(hint, node, sourceFile) { - escapes = void 0; - writer.clear(); - printer.writeNode(hint, node, sourceFile, writer); - return writer.getText(); - } - function printAndFormatNode(hint, node, sourceFile, formatContext) { - const syntheticFile = { - text: printUnescapedNode( - hint, - node, - sourceFile - ), - getLineAndCharacterOfPosition(pos) { - return getLineAndCharacterOfPosition(this, pos); - } - }; - const formatOptions = getFormatCodeSettingsForWriting(formatContext, sourceFile); - const nodeWithPos = ts_textChanges_exports.assignPositionsToNode(node); - const changes = ts_formatting_exports.formatNodeGivenIndentation( - nodeWithPos, - syntheticFile, - sourceFile.languageVariant, - /* indentation */ - 0, - /* delta */ - 0, - { ...formatContext, options: formatOptions } - ); - const allChanges = escapes ? stableSort(concatenate(changes, escapes), (a, b) => compareTextSpans(a.span, b.span)) : changes; - return ts_textChanges_exports.applyChanges(syntheticFile.text, allChanges); - } - } - function originToCompletionEntryData(origin) { - const ambientModuleName = origin.fileName ? void 0 : stripQuotes(origin.moduleSymbol.name); - const isPackageJsonImport = origin.isFromPackageJson ? true : void 0; - if (originIsResolvedExport(origin)) { - const resolvedData = { - exportName: origin.exportName, - exportMapKey: origin.exportMapKey, - moduleSpecifier: origin.moduleSpecifier, - ambientModuleName, - fileName: origin.fileName, - isPackageJsonImport - }; - return resolvedData; - } - const unresolvedData = { - exportName: origin.exportName, - exportMapKey: origin.exportMapKey, - fileName: origin.fileName, - ambientModuleName: origin.fileName ? void 0 : stripQuotes(origin.moduleSymbol.name), - isPackageJsonImport: origin.isFromPackageJson ? true : void 0 - }; - return unresolvedData; - } - function completionEntryDataToSymbolOriginInfo(data, completionName, moduleSymbol) { - const isDefaultExport = data.exportName === "default" /* Default */; - const isFromPackageJson = !!data.isPackageJsonImport; - if (completionEntryDataIsResolved(data)) { - const resolvedOrigin = { - kind: 32 /* ResolvedExport */, - exportName: data.exportName, - exportMapKey: data.exportMapKey, - moduleSpecifier: data.moduleSpecifier, - symbolName: completionName, - fileName: data.fileName, - moduleSymbol, - isDefaultExport, - isFromPackageJson - }; - return resolvedOrigin; - } - const unresolvedOrigin = { - kind: 4 /* Export */, - exportName: data.exportName, - exportMapKey: data.exportMapKey, - symbolName: completionName, - fileName: data.fileName, - moduleSymbol, - isDefaultExport, - isFromPackageJson - }; - return unresolvedOrigin; - } - function getInsertTextAndReplacementSpanForImportCompletion(name, importStatementCompletion, origin, useSemicolons, sourceFile, options, preferences) { - const replacementSpan = importStatementCompletion.replacementSpan; - const quotedModuleSpecifier = escapeSnippetText(quote(sourceFile, preferences, origin.moduleSpecifier)); - const exportKind = origin.isDefaultExport ? 1 /* Default */ : origin.exportName === "export=" /* ExportEquals */ ? 2 /* ExportEquals */ : 0 /* Named */; - const tabStop = preferences.includeCompletionsWithSnippetText ? "$1" : ""; - const importKind = ts_codefix_exports.getImportKind( - sourceFile, - exportKind, - options, - /*forceImportKeyword*/ - true - ); - const isImportSpecifierTypeOnly = importStatementCompletion.couldBeTypeOnlyImportSpecifier; - const topLevelTypeOnlyText = importStatementCompletion.isTopLevelTypeOnly ? ` ${tokenToString(156 /* TypeKeyword */)} ` : " "; - const importSpecifierTypeOnlyText = isImportSpecifierTypeOnly ? `${tokenToString(156 /* TypeKeyword */)} ` : ""; - const suffix = useSemicolons ? ";" : ""; - switch (importKind) { - case 3 /* CommonJS */: - return { replacementSpan, insertText: `import${topLevelTypeOnlyText}${escapeSnippetText(name)}${tabStop} = require(${quotedModuleSpecifier})${suffix}` }; - case 1 /* Default */: - return { replacementSpan, insertText: `import${topLevelTypeOnlyText}${escapeSnippetText(name)}${tabStop} from ${quotedModuleSpecifier}${suffix}` }; - case 2 /* Namespace */: - return { replacementSpan, insertText: `import${topLevelTypeOnlyText}* as ${escapeSnippetText(name)} from ${quotedModuleSpecifier}${suffix}` }; - case 0 /* Named */: - return { replacementSpan, insertText: `import${topLevelTypeOnlyText}{ ${importSpecifierTypeOnlyText}${escapeSnippetText(name)}${tabStop} } from ${quotedModuleSpecifier}${suffix}` }; - } - } - function quotePropertyName(sourceFile, preferences, name) { - if (/^\d+$/.test(name)) { - return name; - } - return quote(sourceFile, preferences, name); - } - function isRecommendedCompletionMatch(localSymbol, recommendedCompletion, checker) { - return localSymbol === recommendedCompletion || !!(localSymbol.flags & 1048576 /* ExportValue */) && checker.getExportSymbolOfSymbol(localSymbol) === recommendedCompletion; - } - function getSourceFromOrigin(origin) { - if (originIsExport(origin)) { - return stripQuotes(origin.moduleSymbol.name); - } - if (originIsResolvedExport(origin)) { - return origin.moduleSpecifier; - } - if ((origin == null ? void 0 : origin.kind) === 1 /* ThisType */) { - return "ThisProperty/" /* ThisProperty */; - } - if ((origin == null ? void 0 : origin.kind) === 64 /* TypeOnlyAlias */) { - return "TypeOnlyAlias/" /* TypeOnlyAlias */; - } - } - function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol = false) { - const start = timestamp(); - const variableOrParameterDeclaration = getVariableOrParameterDeclaration(contextToken, location); - const useSemicolons = probablyUsesSemicolons(sourceFile); - const typeChecker = program.getTypeChecker(); - const uniques = /* @__PURE__ */ new Map(); - for (let i = 0; i < symbols.length; i++) { - const symbol = symbols[i]; - const origin = symbolToOriginInfoMap == null ? void 0 : symbolToOriginInfoMap[i]; - const info = getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, !!jsxIdentifierExpected); - if (!info || uniques.get(info.name) && (!origin || !originIsObjectLiteralMethod(origin)) || kind === 1 /* Global */ && symbolToSortTextMap && !shouldIncludeSymbol(symbol, symbolToSortTextMap)) { - continue; - } - const { name, needsConvertPropertyAccess } = info; - const originalSortText = (symbolToSortTextMap == null ? void 0 : symbolToSortTextMap[getSymbolId(symbol)]) ?? SortText.LocationPriority; - const sortText = isDeprecated(symbol, typeChecker) ? SortText.Deprecated(originalSortText) : originalSortText; - const entry = createCompletionEntry( - symbol, - sortText, - replacementToken, - contextToken, - location, - position, - sourceFile, - host, - program, - name, - needsConvertPropertyAccess, - origin, - recommendedCompletion, - propertyAccessToConvert, - isJsxInitializer, - importStatementCompletion, - useSemicolons, - compilerOptions, - preferences, - kind, - formatContext, - isJsxIdentifierExpected, - isRightOfOpenTag, - includeSymbol - ); - if (!entry) { - continue; - } - const shouldShadowLaterSymbols = (!origin || originIsTypeOnlyAlias(origin)) && !(symbol.parent === void 0 && !some(symbol.declarations, (d) => d.getSourceFile() === location.getSourceFile())); - uniques.set(name, shouldShadowLaterSymbols); - insertSorted( - entries, - entry, - compareCompletionEntries, - /*allowDuplicates*/ - true - ); - } - log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (timestamp() - start)); - return { - has: (name) => uniques.has(name), - add: (name) => uniques.set(name, true) - }; - function shouldIncludeSymbol(symbol, symbolToSortTextMap2) { - var _a; - let allFlags = symbol.flags; - if (!isSourceFile(location)) { - if (isExportAssignment(location.parent)) { - return true; - } - if (tryCast(variableOrParameterDeclaration, isVariableDeclaration) && symbol.valueDeclaration === variableOrParameterDeclaration) { - return false; - } - const symbolDeclaration = symbol.valueDeclaration ?? ((_a = symbol.declarations) == null ? void 0 : _a[0]); - if (variableOrParameterDeclaration && symbolDeclaration && (isTypeParameterDeclaration(variableOrParameterDeclaration) && isTypeParameterDeclaration(symbolDeclaration) || isParameter(variableOrParameterDeclaration) && isParameter(symbolDeclaration))) { - const symbolDeclarationPos = symbolDeclaration.pos; - const parameters = isParameter(variableOrParameterDeclaration) ? variableOrParameterDeclaration.parent.parameters : isInferTypeNode(variableOrParameterDeclaration.parent) ? void 0 : variableOrParameterDeclaration.parent.typeParameters; - if (symbolDeclarationPos >= variableOrParameterDeclaration.pos && parameters && symbolDeclarationPos < parameters.end) { - return false; - } - } - const symbolOrigin = skipAlias(symbol, typeChecker); - if (!!sourceFile.externalModuleIndicator && !compilerOptions.allowUmdGlobalAccess && symbolToSortTextMap2[getSymbolId(symbol)] === SortText.GlobalsOrKeywords && (symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.AutoImportSuggestions || symbolToSortTextMap2[getSymbolId(symbolOrigin)] === SortText.LocationPriority)) { - return false; - } - allFlags |= getCombinedLocalAndExportSymbolFlags(symbolOrigin); - if (isInRightSideOfInternalImportEqualsDeclaration(location)) { - return !!(allFlags & 1920 /* Namespace */); - } - if (isTypeOnlyLocation) { - return symbolCanBeReferencedAtTypeLocation(symbol, typeChecker); - } - } - return !!(allFlags & 111551 /* Value */); - } - } - function getLabelCompletionAtPosition(node) { - const entries = getLabelStatementCompletions(node); - if (entries.length) { - return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries }; - } - } - function getLabelStatementCompletions(node) { - const entries = []; - const uniques = /* @__PURE__ */ new Map(); - let current = node; - while (current) { - if (isFunctionLike(current)) { - break; - } - if (isLabeledStatement(current)) { - const name = current.label.text; - if (!uniques.has(name)) { - uniques.set(name, true); - entries.push({ - name, - kindModifiers: "" /* none */, - kind: "label" /* label */, - sortText: SortText.LocationPriority - }); - } - } - current = current.parent; - } - return entries; - } - function getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences) { - if (entryId.source === "SwitchCases/" /* SwitchCases */) { - return { type: "cases" }; - } - if (entryId.data) { - const autoImport = getAutoImportSymbolFromCompletionEntryData(entryId.name, entryId.data, program, host); - if (autoImport) { - const { contextToken: contextToken2, previousToken: previousToken2 } = getRelevantTokens(position, sourceFile); - return { - type: "symbol", - symbol: autoImport.symbol, - location: getTouchingPropertyName(sourceFile, position), - previousToken: previousToken2, - contextToken: contextToken2, - isJsxInitializer: false, - isTypeOnlyLocation: false, - origin: autoImport.origin - }; - } - } - const compilerOptions = program.getCompilerOptions(); - const completionData = getCompletionData( - program, - log, - sourceFile, - compilerOptions, - position, - { includeCompletionsForModuleExports: true, includeCompletionsWithInsertText: true }, - entryId, - host, - /*formatContext*/ - void 0 - ); - if (!completionData) { - return { type: "none" }; - } - if (completionData.kind !== 0 /* Data */) { - return { type: "request", request: completionData }; - } - const { symbols, literals, location, completionKind, symbolToOriginInfoMap, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } = completionData; - const literal = find(literals, (l) => completionNameForLiteral(sourceFile, preferences, l) === entryId.name); - if (literal !== void 0) - return { type: "literal", literal }; - return firstDefined(symbols, (symbol, index) => { - const origin = symbolToOriginInfoMap[index]; - const info = getCompletionEntryDisplayNameForSymbol(symbol, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected); - return info && info.name === entryId.name && (entryId.source === "ClassMemberSnippet/" /* ClassMemberSnippet */ && symbol.flags & 106500 /* ClassMember */ || entryId.source === "ObjectLiteralMethodSnippet/" /* ObjectLiteralMethodSnippet */ && symbol.flags & (4 /* Property */ | 8192 /* Method */) || getSourceFromOrigin(origin) === entryId.source || entryId.source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */) ? { type: "symbol", symbol, location, origin, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } : void 0; - }) || { type: "none" }; - } - function getCompletionEntryDetails(program, log, sourceFile, position, entryId, host, formatContext, preferences, cancellationToken) { - const typeChecker = program.getTypeChecker(); - const compilerOptions = program.getCompilerOptions(); - const { name, source, data } = entryId; - const { previousToken, contextToken } = getRelevantTokens(position, sourceFile); - if (isInString(sourceFile, position, previousToken)) { - return ts_Completions_StringCompletions_exports.getStringLiteralCompletionDetails(name, sourceFile, position, previousToken, typeChecker, compilerOptions, host, cancellationToken, preferences); - } - const symbolCompletion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); - switch (symbolCompletion.type) { - case "request": { - const { request } = symbolCompletion; - switch (request.kind) { - case 1 /* JsDocTagName */: - return ts_JsDoc_exports.getJSDocTagNameCompletionDetails(name); - case 2 /* JsDocTag */: - return ts_JsDoc_exports.getJSDocTagCompletionDetails(name); - case 3 /* JsDocParameterName */: - return ts_JsDoc_exports.getJSDocParameterNameCompletionDetails(name); - case 4 /* Keywords */: - return some(request.keywordCompletions, (c) => c.name === name) ? createSimpleDetails(name, "keyword" /* keyword */, 5 /* keyword */) : void 0; - default: - return Debug.assertNever(request); - } - } - case "symbol": { - const { symbol, location, contextToken: contextToken2, origin, previousToken: previousToken2 } = symbolCompletion; - const { codeActions, sourceDisplay } = getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken2, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken2, formatContext, preferences, data, source, cancellationToken); - const symbolName2 = originIsComputedPropertyName(origin) ? origin.symbolName : symbol.name; - return createCompletionDetailsForSymbol(symbol, symbolName2, typeChecker, sourceFile, location, cancellationToken, codeActions, sourceDisplay); - } - case "literal": { - const { literal } = symbolCompletion; - return createSimpleDetails(completionNameForLiteral(sourceFile, preferences, literal), "string" /* string */, typeof literal === "string" ? 8 /* stringLiteral */ : 7 /* numericLiteral */); - } - case "cases": { - const { entry, importAdder } = getExhaustiveCaseSnippets( - contextToken.parent, - sourceFile, - preferences, - program.getCompilerOptions(), - host, - program, - /*formatContext*/ - void 0 - ); - if (importAdder.hasFixes()) { - const changes = ts_textChanges_exports.ChangeTracker.with( - { host, formatContext, preferences }, - importAdder.writeFixes - ); - return { - name: entry.name, - kind: "" /* unknown */, - kindModifiers: "", - displayParts: [], - sourceDisplay: void 0, - codeActions: [{ - changes, - description: diagnosticToString([Diagnostics.Includes_imports_of_types_referenced_by_0, name]) - }] - }; - } - return { - name: entry.name, - kind: "" /* unknown */, - kindModifiers: "", - displayParts: [], - sourceDisplay: void 0 - }; - } - case "none": - return allKeywordsCompletions().some((c) => c.name === name) ? createSimpleDetails(name, "keyword" /* keyword */, 5 /* keyword */) : void 0; - default: - Debug.assertNever(symbolCompletion); - } - } - function createSimpleDetails(name, kind, kind2) { - return createCompletionDetails(name, "" /* none */, kind, [displayPart(name, kind2)]); - } - function createCompletionDetailsForSymbol(symbol, name, checker, sourceFile, location, cancellationToken, codeActions, sourceDisplay) { - const { displayParts, documentation, symbolKind, tags } = checker.runWithCancellationToken( - cancellationToken, - (checker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(checker2, symbol, sourceFile, location, location, 7 /* All */) - ); - return createCompletionDetails(name, ts_SymbolDisplay_exports.getSymbolModifiers(checker, symbol), symbolKind, displayParts, documentation, tags, codeActions, sourceDisplay); - } - function createCompletionDetails(name, kindModifiers, kind, displayParts, documentation, tags, codeActions, source) { - return { name, kindModifiers, kind, displayParts, documentation, tags, codeActions, source, sourceDisplay: source }; - } - function getCompletionEntryCodeActionsAndSourceDisplay(name, location, contextToken, origin, symbol, program, host, compilerOptions, sourceFile, position, previousToken, formatContext, preferences, data, source, cancellationToken) { - if (data == null ? void 0 : data.moduleSpecifier) { - if (previousToken && getImportStatementCompletionInfo(contextToken || previousToken, sourceFile).replacementSpan) { - return { codeActions: void 0, sourceDisplay: [textPart(data.moduleSpecifier)] }; - } - } - if (source === "ClassMemberSnippet/" /* ClassMemberSnippet */) { - const { importAdder, eraseRange } = getEntryForMemberCompletion( - host, - program, - compilerOptions, - preferences, - name, - symbol, - location, - position, - contextToken, - formatContext - ); - if (importAdder || eraseRange) { - const changes = ts_textChanges_exports.ChangeTracker.with( - { host, formatContext, preferences }, - (tracker) => { - if (importAdder) { - importAdder.writeFixes(tracker); - } - if (eraseRange) { - tracker.deleteRange(sourceFile, eraseRange); - } - } - ); - return { - sourceDisplay: void 0, - codeActions: [{ - changes, - description: diagnosticToString([Diagnostics.Includes_imports_of_types_referenced_by_0, name]) - }] - }; - } - } - if (originIsTypeOnlyAlias(origin)) { - const codeAction2 = ts_codefix_exports.getPromoteTypeOnlyCompletionAction( - sourceFile, - origin.declaration.name, - program, - host, - formatContext, - preferences - ); - Debug.assertIsDefined(codeAction2, "Expected to have a code action for promoting type-only alias"); - return { codeActions: [codeAction2], sourceDisplay: void 0 }; - } - if (source === "ObjectLiteralMemberWithComma/" /* ObjectLiteralMemberWithComma */ && contextToken) { - const changes = ts_textChanges_exports.ChangeTracker.with( - { host, formatContext, preferences }, - (tracker) => tracker.insertText(sourceFile, contextToken.end, ",") - ); - if (changes) { - return { - sourceDisplay: void 0, - codeActions: [{ - changes, - description: diagnosticToString([Diagnostics.Add_missing_comma_for_object_member_completion_0, name]) - }] - }; - } - } - if (!origin || !(originIsExport(origin) || originIsResolvedExport(origin))) { - return { codeActions: void 0, sourceDisplay: void 0 }; - } - const checker = origin.isFromPackageJson ? host.getPackageJsonAutoImportProvider().getTypeChecker() : program.getTypeChecker(); - const { moduleSymbol } = origin; - const targetSymbol = checker.getMergedSymbol(skipAlias(symbol.exportSymbol || symbol, checker)); - const isJsxOpeningTagName = (contextToken == null ? void 0 : contextToken.kind) === 30 /* LessThanToken */ && isJsxOpeningLikeElement(contextToken.parent); - const { moduleSpecifier, codeAction } = ts_codefix_exports.getImportCompletionAction( - targetSymbol, - moduleSymbol, - data == null ? void 0 : data.exportMapKey, - sourceFile, - name, - isJsxOpeningTagName, - host, - program, - formatContext, - previousToken && isIdentifier(previousToken) ? previousToken.getStart(sourceFile) : position, - preferences, - cancellationToken - ); - Debug.assert(!(data == null ? void 0 : data.moduleSpecifier) || moduleSpecifier === data.moduleSpecifier); - return { sourceDisplay: [textPart(moduleSpecifier)], codeActions: [codeAction] }; - } - function getCompletionEntrySymbol(program, log, sourceFile, position, entryId, host, preferences) { - const completion = getSymbolCompletionFromEntryId(program, log, sourceFile, position, entryId, host, preferences); - return completion.type === "symbol" ? completion.symbol : void 0; - } - function getRecommendedCompletion(previousToken, contextualType, checker) { - return firstDefined(contextualType && (contextualType.isUnion() ? contextualType.types : [contextualType]), (type) => { - const symbol = type && type.symbol; - return symbol && (symbol.flags & (8 /* EnumMember */ | 384 /* Enum */ | 32 /* Class */) && !isAbstractConstructorSymbol(symbol)) ? getFirstSymbolInChain(symbol, previousToken, checker) : void 0; - }); - } - function getContextualType(previousToken, position, sourceFile, checker) { - const { parent: parent2 } = previousToken; - switch (previousToken.kind) { - case 80 /* Identifier */: - return getContextualTypeFromParent(previousToken, checker); - case 64 /* EqualsToken */: - switch (parent2.kind) { - case 260 /* VariableDeclaration */: - return checker.getContextualType(parent2.initializer); - case 226 /* BinaryExpression */: - return checker.getTypeAtLocation(parent2.left); - case 291 /* JsxAttribute */: - return checker.getContextualTypeForJsxAttribute(parent2); - default: - return void 0; - } - case 105 /* NewKeyword */: - return checker.getContextualType(parent2); - case 84 /* CaseKeyword */: - const caseClause = tryCast(parent2, isCaseClause); - return caseClause ? getSwitchedType(caseClause, checker) : void 0; - case 19 /* OpenBraceToken */: - return isJsxExpression(parent2) && !isJsxElement(parent2.parent) && !isJsxFragment(parent2.parent) ? checker.getContextualTypeForJsxAttribute(parent2.parent) : void 0; - default: - const argInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(previousToken, position, sourceFile); - return argInfo ? ( - // At `,`, treat this as the next argument after the comma. - checker.getContextualTypeForArgumentAtIndex(argInfo.invocation, argInfo.argumentIndex + (previousToken.kind === 28 /* CommaToken */ ? 1 : 0)) - ) : isEqualityOperatorKind(previousToken.kind) && isBinaryExpression(parent2) && isEqualityOperatorKind(parent2.operatorToken.kind) ? ( - // completion at `x ===/**/` should be for the right side - checker.getTypeAtLocation(parent2.left) - ) : checker.getContextualType(previousToken, 4 /* Completions */) || checker.getContextualType(previousToken); - } - } - function getFirstSymbolInChain(symbol, enclosingDeclaration, checker) { - const chain = checker.getAccessibleSymbolChain( - symbol, - enclosingDeclaration, - /*meaning*/ - 67108863 /* All */, - /*useOnlyExternalAliasing*/ - false - ); - if (chain) - return first(chain); - return symbol.parent && (isModuleSymbol(symbol.parent) ? symbol : getFirstSymbolInChain(symbol.parent, enclosingDeclaration, checker)); - } - function isModuleSymbol(symbol) { - var _a; - return !!((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d.kind === 312 /* SourceFile */)); - } - function getCompletionData(program, log, sourceFile, compilerOptions, position, preferences, detailsEntryId, host, formatContext, cancellationToken) { - const typeChecker = program.getTypeChecker(); - const inCheckedFile = isCheckedFile(sourceFile, compilerOptions); - let start = timestamp(); - let currentToken = getTokenAtPosition(sourceFile, position); - log("getCompletionData: Get current token: " + (timestamp() - start)); - start = timestamp(); - const insideComment = isInComment(sourceFile, position, currentToken); - log("getCompletionData: Is inside comment: " + (timestamp() - start)); - let insideJsDocTagTypeExpression = false; - let isInSnippetScope = false; - if (insideComment) { - if (hasDocComment(sourceFile, position)) { - if (sourceFile.text.charCodeAt(position - 1) === 64 /* at */) { - return { kind: 1 /* JsDocTagName */ }; - } else { - const lineStart = getLineStartPositionForPosition(position, sourceFile); - if (!/[^*|\s(/)]/.test(sourceFile.text.substring(lineStart, position))) { - return { kind: 2 /* JsDocTag */ }; - } - } - } - const tag = getJsDocTagAtPosition(currentToken, position); - if (tag) { - if (tag.tagName.pos <= position && position <= tag.tagName.end) { - return { kind: 1 /* JsDocTagName */ }; - } - const typeExpression = tryGetTypeExpressionFromTag(tag); - if (typeExpression) { - currentToken = getTokenAtPosition(sourceFile, position); - if (!currentToken || !isDeclarationName(currentToken) && (currentToken.parent.kind !== 355 /* JSDocPropertyTag */ || currentToken.parent.name !== currentToken)) { - insideJsDocTagTypeExpression = isCurrentlyEditingNode(typeExpression); - } - } - if (!insideJsDocTagTypeExpression && isJSDocParameterTag(tag) && (nodeIsMissing(tag.name) || tag.name.pos <= position && position <= tag.name.end)) { - return { kind: 3 /* JsDocParameterName */, tag }; - } - } - if (!insideJsDocTagTypeExpression) { - log("Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment."); - return void 0; - } - } - start = timestamp(); - const isJsOnlyLocation = !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile); - const tokens = getRelevantTokens(position, sourceFile); - const previousToken = tokens.previousToken; - let contextToken = tokens.contextToken; - log("getCompletionData: Get previous token: " + (timestamp() - start)); - let node = currentToken; - let propertyAccessToConvert; - let isRightOfDot = false; - let isRightOfQuestionDot = false; - let isRightOfOpenTag = false; - let isStartingCloseTag = false; - let isJsxInitializer = false; - let isJsxIdentifierExpected = false; - let importStatementCompletion; - let location = getTouchingPropertyName(sourceFile, position); - let keywordFilters = 0 /* None */; - let isNewIdentifierLocation = false; - let flags = 0 /* None */; - if (contextToken) { - const importStatementCompletionInfo = getImportStatementCompletionInfo(contextToken, sourceFile); - if (importStatementCompletionInfo.keywordCompletion) { - if (importStatementCompletionInfo.isKeywordOnlyCompletion) { - return { - kind: 4 /* Keywords */, - keywordCompletions: [keywordToCompletionEntry(importStatementCompletionInfo.keywordCompletion)], - isNewIdentifierLocation: importStatementCompletionInfo.isNewIdentifierLocation - }; - } - keywordFilters = keywordFiltersFromSyntaxKind(importStatementCompletionInfo.keywordCompletion); - } - if (importStatementCompletionInfo.replacementSpan && preferences.includeCompletionsForImportStatements && preferences.includeCompletionsWithInsertText) { - flags |= 2 /* IsImportStatementCompletion */; - importStatementCompletion = importStatementCompletionInfo; - isNewIdentifierLocation = importStatementCompletionInfo.isNewIdentifierLocation; - } - if (!importStatementCompletionInfo.replacementSpan && isCompletionListBlocker(contextToken)) { - log("Returning an empty list because completion was requested in an invalid position."); - return keywordFilters ? keywordCompletionData(keywordFilters, isJsOnlyLocation, isNewIdentifierDefinitionLocation()) : void 0; - } - let parent2 = contextToken.parent; - if (contextToken.kind === 25 /* DotToken */ || contextToken.kind === 29 /* QuestionDotToken */) { - isRightOfDot = contextToken.kind === 25 /* DotToken */; - isRightOfQuestionDot = contextToken.kind === 29 /* QuestionDotToken */; - switch (parent2.kind) { - case 211 /* PropertyAccessExpression */: - propertyAccessToConvert = parent2; - node = propertyAccessToConvert.expression; - const leftmostAccessExpression = getLeftmostAccessExpression(propertyAccessToConvert); - if (nodeIsMissing(leftmostAccessExpression) || (isCallExpression(node) || isFunctionLike(node)) && node.end === contextToken.pos && node.getChildCount(sourceFile) && last(node.getChildren(sourceFile)).kind !== 22 /* CloseParenToken */) { - return void 0; - } - break; - case 166 /* QualifiedName */: - node = parent2.left; - break; - case 267 /* ModuleDeclaration */: - node = parent2.name; - break; - case 205 /* ImportType */: - node = parent2; - break; - case 236 /* MetaProperty */: - node = parent2.getFirstToken(sourceFile); - Debug.assert(node.kind === 102 /* ImportKeyword */ || node.kind === 105 /* NewKeyword */); - break; - default: - return void 0; - } - } else if (!importStatementCompletion) { - if (parent2 && parent2.kind === 211 /* PropertyAccessExpression */) { - contextToken = parent2; - parent2 = parent2.parent; - } - if (currentToken.parent === location) { - switch (currentToken.kind) { - case 32 /* GreaterThanToken */: - if (currentToken.parent.kind === 284 /* JsxElement */ || currentToken.parent.kind === 286 /* JsxOpeningElement */) { - location = currentToken; - } - break; - case 44 /* SlashToken */: - if (currentToken.parent.kind === 285 /* JsxSelfClosingElement */) { - location = currentToken; - } - break; - } - } - switch (parent2.kind) { - case 287 /* JsxClosingElement */: - if (contextToken.kind === 44 /* SlashToken */) { - isStartingCloseTag = true; - location = contextToken; - } - break; - case 226 /* BinaryExpression */: - if (!binaryExpressionMayBeOpenTag(parent2)) { - break; - } - case 285 /* JsxSelfClosingElement */: - case 284 /* JsxElement */: - case 286 /* JsxOpeningElement */: - isJsxIdentifierExpected = true; - if (contextToken.kind === 30 /* LessThanToken */) { - isRightOfOpenTag = true; - location = contextToken; - } - break; - case 294 /* JsxExpression */: - case 293 /* JsxSpreadAttribute */: - if (previousToken.kind === 20 /* CloseBraceToken */ || previousToken.kind === 80 /* Identifier */ && previousToken.parent.kind === 291 /* JsxAttribute */) { - isJsxIdentifierExpected = true; - } - break; - case 291 /* JsxAttribute */: - if (parent2.initializer === previousToken && previousToken.end < position) { - isJsxIdentifierExpected = true; - break; - } - switch (previousToken.kind) { - case 64 /* EqualsToken */: - isJsxInitializer = true; - break; - case 80 /* Identifier */: - isJsxIdentifierExpected = true; - if (parent2 !== previousToken.parent && !parent2.initializer && findChildOfKind(parent2, 64 /* EqualsToken */, sourceFile)) { - isJsxInitializer = previousToken; - } - } - break; - } - } - } - const semanticStart = timestamp(); - let completionKind = 5 /* None */; - let isNonContextualObjectLiteral = false; - let hasUnresolvedAutoImports = false; - let symbols = []; - let importSpecifierResolver; - const symbolToOriginInfoMap = []; - const symbolToSortTextMap = []; - const seenPropertySymbols = /* @__PURE__ */ new Map(); - const isTypeOnlyLocation = isTypeOnlyCompletion(); - const getModuleSpecifierResolutionHost = memoizeOne((isFromPackageJson) => { - return createModuleSpecifierResolutionHost(isFromPackageJson ? host.getPackageJsonAutoImportProvider() : program, host); - }); - if (isRightOfDot || isRightOfQuestionDot) { - getTypeScriptMemberSymbols(); - } else if (isRightOfOpenTag) { - symbols = typeChecker.getJsxIntrinsicTagNamesAt(location); - Debug.assertEachIsDefined(symbols, "getJsxIntrinsicTagNames() should all be defined"); - tryGetGlobalSymbols(); - completionKind = 1 /* Global */; - keywordFilters = 0 /* None */; - } else if (isStartingCloseTag) { - const tagName = contextToken.parent.parent.openingElement.tagName; - const tagSymbol = typeChecker.getSymbolAtLocation(tagName); - if (tagSymbol) { - symbols = [tagSymbol]; - } - completionKind = 1 /* Global */; - keywordFilters = 0 /* None */; - } else { - if (!tryGetGlobalSymbols()) { - return keywordFilters ? keywordCompletionData(keywordFilters, isJsOnlyLocation, isNewIdentifierLocation) : void 0; - } - } - log("getCompletionData: Semantic work: " + (timestamp() - semanticStart)); - const contextualType = previousToken && getContextualType(previousToken, position, sourceFile, typeChecker); - const isLiteralExpected = !tryCast(previousToken, isStringLiteralLike) && !isJsxIdentifierExpected; - const literals = !isLiteralExpected ? [] : mapDefined( - contextualType && (contextualType.isUnion() ? contextualType.types : [contextualType]), - (t) => t.isLiteral() && !(t.flags & 1024 /* EnumLiteral */) ? t.value : void 0 - ); - const recommendedCompletion = previousToken && contextualType && getRecommendedCompletion(previousToken, contextualType, typeChecker); - return { - kind: 0 /* Data */, - symbols, - completionKind, - isInSnippetScope, - propertyAccessToConvert, - isNewIdentifierLocation, - location, - keywordFilters, - literals, - symbolToOriginInfoMap, - recommendedCompletion, - previousToken, - contextToken, - isJsxInitializer, - insideJsDocTagTypeExpression, - symbolToSortTextMap, - isTypeOnlyLocation, - isJsxIdentifierExpected, - isRightOfOpenTag, - isRightOfDotOrQuestionDot: isRightOfDot || isRightOfQuestionDot, - importStatementCompletion, - hasUnresolvedAutoImports, - flags - }; - function isTagWithTypeExpression(tag) { - switch (tag.kind) { - case 348 /* JSDocParameterTag */: - case 355 /* JSDocPropertyTag */: - case 349 /* JSDocReturnTag */: - case 351 /* JSDocTypeTag */: - case 353 /* JSDocTypedefTag */: - case 356 /* JSDocThrowsTag */: - case 357 /* JSDocSatisfiesTag */: - return true; - case 352 /* JSDocTemplateTag */: - return !!tag.constraint; - default: - return false; - } - } - function tryGetTypeExpressionFromTag(tag) { - if (isTagWithTypeExpression(tag)) { - const typeExpression = isJSDocTemplateTag(tag) ? tag.constraint : tag.typeExpression; - return typeExpression && typeExpression.kind === 316 /* JSDocTypeExpression */ ? typeExpression : void 0; - } - if (isJSDocAugmentsTag(tag) || isJSDocImplementsTag(tag)) { - return tag.class; - } - return void 0; - } - function getTypeScriptMemberSymbols() { - completionKind = 2 /* PropertyAccess */; - const isImportType = isLiteralImportTypeNode(node); - const isTypeLocation = isImportType && !node.isTypeOf || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); - const isRhsOfImportDeclaration = isInRightSideOfInternalImportEqualsDeclaration(node); - if (isEntityName(node) || isImportType || isPropertyAccessExpression(node)) { - const isNamespaceName = isModuleDeclaration(node.parent); - if (isNamespaceName) - isNewIdentifierLocation = true; - let symbol = typeChecker.getSymbolAtLocation(node); - if (symbol) { - symbol = skipAlias(symbol, typeChecker); - if (symbol.flags & (1536 /* Module */ | 384 /* Enum */)) { - const exportedSymbols = typeChecker.getExportsOfModule(symbol); - Debug.assertEachIsDefined(exportedSymbols, "getExportsOfModule() should all be defined"); - const isValidValueAccess = (symbol2) => typeChecker.isValidPropertyAccess(isImportType ? node : node.parent, symbol2.name); - const isValidTypeAccess = (symbol2) => symbolCanBeReferencedAtTypeLocation(symbol2, typeChecker); - const isValidAccess = isNamespaceName ? (symbol2) => { - var _a; - return !!(symbol2.flags & 1920 /* Namespace */) && !((_a = symbol2.declarations) == null ? void 0 : _a.every((d) => d.parent === node.parent)); - } : isRhsOfImportDeclaration ? ( - // Any kind is allowed when dotting off namespace in internal import equals declaration - (symbol2) => isValidTypeAccess(symbol2) || isValidValueAccess(symbol2) - ) : isTypeLocation || insideJsDocTagTypeExpression ? isValidTypeAccess : isValidValueAccess; - for (const exportedSymbol of exportedSymbols) { - if (isValidAccess(exportedSymbol)) { - symbols.push(exportedSymbol); - } - } - if (!isTypeLocation && !insideJsDocTagTypeExpression && symbol.declarations && symbol.declarations.some((d) => d.kind !== 312 /* SourceFile */ && d.kind !== 267 /* ModuleDeclaration */ && d.kind !== 266 /* EnumDeclaration */)) { - let type = typeChecker.getTypeOfSymbolAtLocation(symbol, node).getNonOptionalType(); - let insertQuestionDot = false; - if (type.isNullableType()) { - const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false; - if (canCorrectToQuestionDot || isRightOfQuestionDot) { - type = type.getNonNullableType(); - if (canCorrectToQuestionDot) { - insertQuestionDot = true; - } - } - } - addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot); - } - return; - } - } - } - if (!isTypeLocation || isInTypeQuery(node)) { - typeChecker.tryGetThisTypeAt( - node, - /*includeGlobalThis*/ - false - ); - let type = typeChecker.getTypeAtLocation(node).getNonOptionalType(); - if (!isTypeLocation) { - let insertQuestionDot = false; - if (type.isNullableType()) { - const canCorrectToQuestionDot = isRightOfDot && !isRightOfQuestionDot && preferences.includeAutomaticOptionalChainCompletions !== false; - if (canCorrectToQuestionDot || isRightOfQuestionDot) { - type = type.getNonNullableType(); - if (canCorrectToQuestionDot) { - insertQuestionDot = true; - } - } - } - addTypeProperties(type, !!(node.flags & 65536 /* AwaitContext */), insertQuestionDot); - } else { - addTypeProperties( - type.getNonNullableType(), - /*insertAwait*/ - false, - /*insertQuestionDot*/ - false - ); - } - } - } - function addTypeProperties(type, insertAwait, insertQuestionDot) { - isNewIdentifierLocation = !!type.getStringIndexType(); - if (isRightOfQuestionDot && some(type.getCallSignatures())) { - isNewIdentifierLocation = true; - } - const propertyAccess = node.kind === 205 /* ImportType */ ? node : node.parent; - if (inCheckedFile) { - for (const symbol of type.getApparentProperties()) { - if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) { - addPropertySymbol( - symbol, - /*insertAwait*/ - false, - insertQuestionDot - ); - } - } - } else { - symbols.push(...filter(getPropertiesForCompletion(type, typeChecker), (s) => typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, s))); - } - if (insertAwait && preferences.includeCompletionsWithInsertText) { - const promiseType = typeChecker.getPromisedTypeOfPromise(type); - if (promiseType) { - for (const symbol of promiseType.getApparentProperties()) { - if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, promiseType, symbol)) { - addPropertySymbol( - symbol, - /*insertAwait*/ - true, - insertQuestionDot - ); - } - } - } - } - } - function addPropertySymbol(symbol, insertAwait, insertQuestionDot) { - var _a; - const computedPropertyName = firstDefined(symbol.declarations, (decl) => tryCast(getNameOfDeclaration(decl), isComputedPropertyName)); - if (computedPropertyName) { - const leftMostName = getLeftMostName(computedPropertyName.expression); - const nameSymbol = leftMostName && typeChecker.getSymbolAtLocation(leftMostName); - const firstAccessibleSymbol = nameSymbol && getFirstSymbolInChain(nameSymbol, contextToken, typeChecker); - const firstAccessibleSymbolId = firstAccessibleSymbol && getSymbolId(firstAccessibleSymbol); - if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) { - const index = symbols.length; - symbols.push(firstAccessibleSymbol); - const moduleSymbol = firstAccessibleSymbol.parent; - if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) { - symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) }; - } else { - const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0; - const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo([{ - exportKind: 0 /* Named */, - moduleFileName: fileName, - isFromPackageJson: false, - moduleSymbol, - symbol: firstAccessibleSymbol, - targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags - }], position, isValidTypeOnlyAliasUseSite(location)) || {}; - if (moduleSpecifier) { - const origin = { - kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */), - moduleSymbol, - isDefaultExport: false, - symbolName: firstAccessibleSymbol.name, - exportName: firstAccessibleSymbol.name, - fileName, - moduleSpecifier - }; - symbolToOriginInfoMap[index] = origin; - } - } - } else if (preferences.includeCompletionsWithInsertText) { - if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) { - return; - } - addSymbolOriginInfo(symbol); - addSymbolSortInfo(symbol); - symbols.push(symbol); - } - } else { - addSymbolOriginInfo(symbol); - addSymbolSortInfo(symbol); - symbols.push(symbol); - } - function addSymbolSortInfo(symbol2) { - if (isStaticProperty(symbol2)) { - symbolToSortTextMap[getSymbolId(symbol2)] = SortText.LocalDeclarationPriority; - } - } - function addSymbolOriginInfo(symbol2) { - if (preferences.includeCompletionsWithInsertText) { - if (insertAwait && addToSeen(seenPropertySymbols, getSymbolId(symbol2))) { - symbolToOriginInfoMap[symbols.length] = { kind: getNullableSymbolOriginInfoKind(8 /* Promise */) }; - } else if (insertQuestionDot) { - symbolToOriginInfoMap[symbols.length] = { kind: 16 /* Nullable */ }; - } - } - } - function getNullableSymbolOriginInfoKind(kind) { - return insertQuestionDot ? kind | 16 /* Nullable */ : kind; - } - } - function getLeftMostName(e) { - return isIdentifier(e) ? e : isPropertyAccessExpression(e) ? getLeftMostName(e.expression) : void 0; - } - function tryGetGlobalSymbols() { - const result = tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() || tryGetObjectLikeCompletionSymbols() || tryGetImportCompletionSymbols() || tryGetImportOrExportClauseCompletionSymbols() || tryGetLocalNamedExportCompletionSymbols() || tryGetConstructorCompletion() || tryGetClassLikeCompletionSymbols() || tryGetJsxCompletionSymbols() || (getGlobalCompletions(), 1 /* Success */); - return result === 1 /* Success */; - } - function tryGetConstructorCompletion() { - if (!tryGetConstructorLikeCompletionContainer(contextToken)) - return 0 /* Continue */; - completionKind = 5 /* None */; - isNewIdentifierLocation = true; - keywordFilters = 4 /* ConstructorParameterKeywords */; - return 1 /* Success */; - } - function tryGetJsxCompletionSymbols() { - const jsxContainer = tryGetContainingJsxElement(contextToken); - const attrsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes); - if (!attrsType) - return 0 /* Continue */; - const completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* Completions */); - symbols = concatenate(symbols, filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties)); - setSortTextToOptionalMember(); - completionKind = 3 /* MemberLike */; - isNewIdentifierLocation = false; - return 1 /* Success */; - } - function tryGetImportCompletionSymbols() { - if (!importStatementCompletion) - return 0 /* Continue */; - isNewIdentifierLocation = true; - collectAutoImports(); - return 1 /* Success */; - } - function getGlobalCompletions() { - keywordFilters = tryGetFunctionLikeBodyCompletionContainer(contextToken) ? 5 /* FunctionLikeBodyKeywords */ : 1 /* All */; - completionKind = 1 /* Global */; - isNewIdentifierLocation = isNewIdentifierDefinitionLocation(); - if (previousToken !== contextToken) { - Debug.assert(!!previousToken, "Expected 'contextToken' to be defined when different from 'previousToken'."); - } - const adjustedPosition = previousToken !== contextToken ? previousToken.getStart() : position; - const scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; - isInSnippetScope = isSnippetScope(scopeNode); - const symbolMeanings = (isTypeOnlyLocation ? 0 /* None */ : 111551 /* Value */) | 788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */; - const typeOnlyAliasNeedsPromotion = previousToken && !isValidTypeOnlyAliasUseSite(previousToken); - symbols = concatenate(symbols, typeChecker.getSymbolsInScope(scopeNode, symbolMeanings)); - Debug.assertEachIsDefined(symbols, "getSymbolsInScope() should all be defined"); - for (let i = 0; i < symbols.length; i++) { - const symbol = symbols[i]; - if (!typeChecker.isArgumentsSymbol(symbol) && !some(symbol.declarations, (d) => d.getSourceFile() === sourceFile)) { - symbolToSortTextMap[getSymbolId(symbol)] = SortText.GlobalsOrKeywords; - } - if (typeOnlyAliasNeedsPromotion && !(symbol.flags & 111551 /* Value */)) { - const typeOnlyAliasDeclaration = symbol.declarations && find(symbol.declarations, isTypeOnlyImportDeclaration); - if (typeOnlyAliasDeclaration) { - const origin = { kind: 64 /* TypeOnlyAlias */, declaration: typeOnlyAliasDeclaration }; - symbolToOriginInfoMap[i] = origin; - } - } - } - if (preferences.includeCompletionsWithInsertText && scopeNode.kind !== 312 /* SourceFile */) { - const thisType = typeChecker.tryGetThisTypeAt( - scopeNode, - /*includeGlobalThis*/ - false, - isClassLike(scopeNode.parent) ? scopeNode : void 0 - ); - if (thisType && !isProbablyGlobalType(thisType, sourceFile, typeChecker)) { - for (const symbol of getPropertiesForCompletion(thisType, typeChecker)) { - symbolToOriginInfoMap[symbols.length] = { kind: 1 /* ThisType */ }; - symbols.push(symbol); - symbolToSortTextMap[getSymbolId(symbol)] = SortText.SuggestedClassMembers; - } - } - } - collectAutoImports(); - if (isTypeOnlyLocation) { - keywordFilters = contextToken && isAssertionExpression(contextToken.parent) ? 6 /* TypeAssertionKeywords */ : 7 /* TypeKeywords */; - } - } - function shouldOfferImportCompletions() { - if (importStatementCompletion) - return true; - if (isNonContextualObjectLiteral) - return false; - if (!preferences.includeCompletionsForModuleExports) - return false; - if (sourceFile.externalModuleIndicator || sourceFile.commonJsModuleIndicator) - return true; - if (compilerOptionsIndicateEsModules(program.getCompilerOptions())) - return true; - return programContainsModules(program); - } - function isSnippetScope(scopeNode) { - switch (scopeNode.kind) { - case 312 /* SourceFile */: - case 228 /* TemplateExpression */: - case 294 /* JsxExpression */: - case 241 /* Block */: - return true; - default: - return isStatement(scopeNode); - } - } - function isTypeOnlyCompletion() { - return insideJsDocTagTypeExpression || !!importStatementCompletion && isTypeOnlyImportOrExportDeclaration(location.parent) || !isContextTokenValueLocation(contextToken) && (isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker) || isPartOfTypeNode(location) || isContextTokenTypeLocation(contextToken)); - } - function isContextTokenValueLocation(contextToken2) { - return contextToken2 && (contextToken2.kind === 114 /* TypeOfKeyword */ && (contextToken2.parent.kind === 186 /* TypeQuery */ || isTypeOfExpression(contextToken2.parent)) || contextToken2.kind === 131 /* AssertsKeyword */ && contextToken2.parent.kind === 182 /* TypePredicate */); - } - function isContextTokenTypeLocation(contextToken2) { - if (contextToken2) { - const parentKind = contextToken2.parent.kind; - switch (contextToken2.kind) { - case 59 /* ColonToken */: - return parentKind === 172 /* PropertyDeclaration */ || parentKind === 171 /* PropertySignature */ || parentKind === 169 /* Parameter */ || parentKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(parentKind); - case 64 /* EqualsToken */: - return parentKind === 265 /* TypeAliasDeclaration */; - case 130 /* AsKeyword */: - return parentKind === 234 /* AsExpression */; - case 30 /* LessThanToken */: - return parentKind === 183 /* TypeReference */ || parentKind === 216 /* TypeAssertionExpression */; - case 96 /* ExtendsKeyword */: - return parentKind === 168 /* TypeParameter */; - case 152 /* SatisfiesKeyword */: - return parentKind === 238 /* SatisfiesExpression */; - } - } - return false; - } - function collectAutoImports() { - var _a, _b; - if (!shouldOfferImportCompletions()) - return; - Debug.assert(!(detailsEntryId == null ? void 0 : detailsEntryId.data), "Should not run 'collectAutoImports' when faster path is available via `data`"); - if (detailsEntryId && !detailsEntryId.source) { - return; - } - flags |= 1 /* MayIncludeAutoImports */; - const isAfterTypeOnlyImportSpecifierModifier = previousToken === contextToken && importStatementCompletion; - const lowerCaseTokenText = isAfterTypeOnlyImportSpecifierModifier ? "" : previousToken && isIdentifier(previousToken) ? previousToken.text.toLowerCase() : ""; - const moduleSpecifierCache = (_a = host.getModuleSpecifierCache) == null ? void 0 : _a.call(host); - const exportInfo = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken); - const packageJsonAutoImportProvider = (_b = host.getPackageJsonAutoImportProvider) == null ? void 0 : _b.call(host); - const packageJsonFilter = detailsEntryId ? void 0 : createPackageJsonImportFilter(sourceFile, preferences, host); - resolvingModuleSpecifiers( - "collectAutoImports", - host, - importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences)), - program, - position, - preferences, - !!importStatementCompletion, - isValidTypeOnlyAliasUseSite(location), - (context) => { - exportInfo.search( - sourceFile.path, - /*preferCapitalized*/ - isRightOfOpenTag, - (symbolName2, targetFlags) => { - if (!isIdentifierText(symbolName2, getEmitScriptTarget(host.getCompilationSettings()))) - return false; - if (!detailsEntryId && isStringANonContextualKeyword(symbolName2)) - return false; - if (!isTypeOnlyLocation && !importStatementCompletion && !(targetFlags & 111551 /* Value */)) - return false; - if (isTypeOnlyLocation && !(targetFlags & (1536 /* Module */ | 788968 /* Type */))) - return false; - const firstChar = symbolName2.charCodeAt(0); - if (isRightOfOpenTag && (firstChar < 65 /* A */ || firstChar > 90 /* Z */)) - return false; - if (detailsEntryId) - return true; - return charactersFuzzyMatchInString(symbolName2, lowerCaseTokenText); - }, - (info, symbolName2, isFromAmbientModule, exportMapKey) => { - if (detailsEntryId && !some(info, (i) => detailsEntryId.source === stripQuotes(i.moduleSymbol.name))) { - return; - } - info = filter(info, isImportableExportInfo); - if (!info.length) { - return; - } - const result = context.tryResolve(info, isFromAmbientModule) || {}; - if (result === "failed") - return; - let exportInfo2 = info[0], moduleSpecifier; - if (result !== "skipped") { - ({ exportInfo: exportInfo2 = info[0], moduleSpecifier } = result); - } - const isDefaultExport = exportInfo2.exportKind === 1 /* Default */; - const symbol = isDefaultExport && getLocalSymbolForExportDefault(exportInfo2.symbol) || exportInfo2.symbol; - pushAutoImportSymbol(symbol, { - kind: moduleSpecifier ? 32 /* ResolvedExport */ : 4 /* Export */, - moduleSpecifier, - symbolName: symbolName2, - exportMapKey, - exportName: exportInfo2.exportKind === 2 /* ExportEquals */ ? "export=" /* ExportEquals */ : exportInfo2.symbol.name, - fileName: exportInfo2.moduleFileName, - isDefaultExport, - moduleSymbol: exportInfo2.moduleSymbol, - isFromPackageJson: exportInfo2.isFromPackageJson - }); - } - ); - hasUnresolvedAutoImports = context.skippedAny(); - flags |= context.resolvedAny() ? 8 /* ResolvedModuleSpecifiers */ : 0; - flags |= context.resolvedBeyondLimit() ? 16 /* ResolvedModuleSpecifiersBeyondLimit */ : 0; - } - ); - function isImportableExportInfo(info) { - const moduleFile = tryCast(info.moduleSymbol.valueDeclaration, isSourceFile); - if (!moduleFile) { - const moduleName = stripQuotes(info.moduleSymbol.name); - if (ts_JsTyping_exports.nodeCoreModules.has(moduleName) && startsWith(moduleName, "node:") !== shouldUseUriStyleNodeCoreModules(sourceFile, program)) { - return false; - } - return packageJsonFilter ? packageJsonFilter.allowsImportingAmbientModule(info.moduleSymbol, getModuleSpecifierResolutionHost(info.isFromPackageJson)) : true; - } - return isImportableFile( - info.isFromPackageJson ? packageJsonAutoImportProvider : program, - sourceFile, - moduleFile, - preferences, - packageJsonFilter, - getModuleSpecifierResolutionHost(info.isFromPackageJson), - moduleSpecifierCache - ); - } - } - function pushAutoImportSymbol(symbol, origin) { - const symbolId = getSymbolId(symbol); - if (symbolToSortTextMap[symbolId] === SortText.GlobalsOrKeywords) { - return; - } - symbolToOriginInfoMap[symbols.length] = origin; - symbolToSortTextMap[symbolId] = importStatementCompletion ? SortText.LocationPriority : SortText.AutoImportSuggestions; - symbols.push(symbol); - } - function collectObjectLiteralMethodSymbols(members, enclosingDeclaration) { - if (isInJSFile(location)) { - return; - } - members.forEach((member) => { - if (!isObjectLiteralMethodSymbol(member)) { - return; - } - const displayName = getCompletionEntryDisplayNameForSymbol( - member, - getEmitScriptTarget(compilerOptions), - /*origin*/ - void 0, - 0 /* ObjectPropertyDeclaration */, - /*jsxIdentifierExpected*/ - false - ); - if (!displayName) { - return; - } - const { name } = displayName; - const entryProps = getEntryForObjectLiteralMethodCompletion( - member, - name, - enclosingDeclaration, - program, - host, - compilerOptions, - preferences, - formatContext - ); - if (!entryProps) { - return; - } - const origin = { kind: 128 /* ObjectLiteralMethod */, ...entryProps }; - flags |= 32 /* MayIncludeMethodSnippets */; - symbolToOriginInfoMap[symbols.length] = origin; - symbols.push(member); - }); - } - function isObjectLiteralMethodSymbol(symbol) { - if (!(symbol.flags & (4 /* Property */ | 8192 /* Method */))) { - return false; - } - return true; - } - function getScopeNode(initialToken, position2, sourceFile2) { - let scope = initialToken; - while (scope && !positionBelongsToNode(scope, position2, sourceFile2)) { - scope = scope.parent; - } - return scope; - } - function isCompletionListBlocker(contextToken2) { - const start2 = timestamp(); - const result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) || isSolelyIdentifierDefinitionLocation(contextToken2) || isDotOfNumericLiteral(contextToken2) || isInJsxText(contextToken2) || isBigIntLiteral(contextToken2); - log("getCompletionsAtPosition: isCompletionListBlocker: " + (timestamp() - start2)); - return result; - } - function isInJsxText(contextToken2) { - if (contextToken2.kind === 12 /* JsxText */) { - return true; - } - if (contextToken2.kind === 32 /* GreaterThanToken */ && contextToken2.parent) { - if (location === contextToken2.parent && (location.kind === 286 /* JsxOpeningElement */ || location.kind === 285 /* JsxSelfClosingElement */)) { - return false; - } - if (contextToken2.parent.kind === 286 /* JsxOpeningElement */) { - return location.parent.kind !== 286 /* JsxOpeningElement */; - } - if (contextToken2.parent.kind === 287 /* JsxClosingElement */ || contextToken2.parent.kind === 285 /* JsxSelfClosingElement */) { - return !!contextToken2.parent.parent && contextToken2.parent.parent.kind === 284 /* JsxElement */; - } - } - return false; - } - function isNewIdentifierDefinitionLocation() { - if (contextToken) { - const containingNodeKind = contextToken.parent.kind; - const tokenKind = keywordForNode(contextToken); - switch (tokenKind) { - case 28 /* CommaToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 226 /* BinaryExpression */ || containingNodeKind === 184 /* FunctionType */ || containingNodeKind === 210 /* ObjectLiteralExpression */; - case 21 /* OpenParenToken */: - return containingNodeKind === 213 /* CallExpression */ || containingNodeKind === 176 /* Constructor */ || containingNodeKind === 214 /* NewExpression */ || containingNodeKind === 217 /* ParenthesizedExpression */ || containingNodeKind === 196 /* ParenthesizedType */; - case 23 /* OpenBracketToken */: - return containingNodeKind === 209 /* ArrayLiteralExpression */ || containingNodeKind === 181 /* IndexSignature */ || containingNodeKind === 167 /* ComputedPropertyName */; - case 144 /* ModuleKeyword */: - case 145 /* NamespaceKeyword */: - case 102 /* ImportKeyword */: - return true; - case 25 /* DotToken */: - return containingNodeKind === 267 /* ModuleDeclaration */; - case 19 /* OpenBraceToken */: - return containingNodeKind === 263 /* ClassDeclaration */ || containingNodeKind === 210 /* ObjectLiteralExpression */; - case 64 /* EqualsToken */: - return containingNodeKind === 260 /* VariableDeclaration */ || containingNodeKind === 226 /* BinaryExpression */; - case 16 /* TemplateHead */: - return containingNodeKind === 228 /* TemplateExpression */; - case 17 /* TemplateMiddle */: - return containingNodeKind === 239 /* TemplateSpan */; - case 134 /* AsyncKeyword */: - return containingNodeKind === 174 /* MethodDeclaration */ || containingNodeKind === 304 /* ShorthandPropertyAssignment */; - case 42 /* AsteriskToken */: - return containingNodeKind === 174 /* MethodDeclaration */; - } - if (isClassMemberCompletionKeyword(tokenKind)) { - return true; - } - } - return false; - } - function isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) { - return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(contextToken2, position) || position === contextToken2.end && (!!contextToken2.isUnterminated || isRegularExpressionLiteral(contextToken2))); - } - function tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() { - const typeLiteralNode = tryGetTypeLiteralNode(contextToken); - if (!typeLiteralNode) - return 0 /* Continue */; - const intersectionTypeNode = isIntersectionTypeNode(typeLiteralNode.parent) ? typeLiteralNode.parent : void 0; - const containerTypeNode = intersectionTypeNode || typeLiteralNode; - const containerExpectedType = getConstraintOfTypeArgumentProperty(containerTypeNode, typeChecker); - if (!containerExpectedType) - return 0 /* Continue */; - const containerActualType = typeChecker.getTypeFromTypeNode(containerTypeNode); - const members = getPropertiesForCompletion(containerExpectedType, typeChecker); - const existingMembers = getPropertiesForCompletion(containerActualType, typeChecker); - const existingMemberEscapedNames = /* @__PURE__ */ new Set(); - existingMembers.forEach((s) => existingMemberEscapedNames.add(s.escapedName)); - symbols = concatenate(symbols, filter(members, (s) => !existingMemberEscapedNames.has(s.escapedName))); - completionKind = 0 /* ObjectPropertyDeclaration */; - isNewIdentifierLocation = true; - return 1 /* Success */; - } - function tryGetObjectLikeCompletionSymbols() { - const symbolsStartIndex = symbols.length; - const objectLikeContainer = tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile); - if (!objectLikeContainer) - return 0 /* Continue */; - completionKind = 0 /* ObjectPropertyDeclaration */; - let typeMembers; - let existingMembers; - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */) { - const instantiatedType = tryGetObjectLiteralContextualType(objectLikeContainer, typeChecker); - if (instantiatedType === void 0) { - if (objectLikeContainer.flags & 67108864 /* InWithStatement */) { - return 2 /* Fail */; - } - isNonContextualObjectLiteral = true; - return 0 /* Continue */; - } - const completionsType = typeChecker.getContextualType(objectLikeContainer, 4 /* Completions */); - const hasStringIndexType = (completionsType || instantiatedType).getStringIndexType(); - const hasNumberIndextype = (completionsType || instantiatedType).getNumberIndexType(); - isNewIdentifierLocation = !!hasStringIndexType || !!hasNumberIndextype; - typeMembers = getPropertiesForObjectExpression(instantiatedType, completionsType, objectLikeContainer, typeChecker); - existingMembers = objectLikeContainer.properties; - if (typeMembers.length === 0) { - if (!hasNumberIndextype) { - isNonContextualObjectLiteral = true; - return 0 /* Continue */; - } - } - } else { - Debug.assert(objectLikeContainer.kind === 206 /* ObjectBindingPattern */); - isNewIdentifierLocation = false; - const rootDeclaration = getRootDeclaration(objectLikeContainer.parent); - if (!isVariableLike(rootDeclaration)) - return Debug.fail("Root declaration is not variable-like."); - let canGetType = hasInitializer(rootDeclaration) || !!getEffectiveTypeAnnotationNode(rootDeclaration) || rootDeclaration.parent.parent.kind === 250 /* ForOfStatement */; - if (!canGetType && rootDeclaration.kind === 169 /* Parameter */) { - if (isExpression(rootDeclaration.parent)) { - canGetType = !!typeChecker.getContextualType(rootDeclaration.parent); - } else if (rootDeclaration.parent.kind === 174 /* MethodDeclaration */ || rootDeclaration.parent.kind === 178 /* SetAccessor */) { - canGetType = isExpression(rootDeclaration.parent.parent) && !!typeChecker.getContextualType(rootDeclaration.parent.parent); - } - } - if (canGetType) { - const typeForObject = typeChecker.getTypeAtLocation(objectLikeContainer); - if (!typeForObject) - return 2 /* Fail */; - typeMembers = typeChecker.getPropertiesOfType(typeForObject).filter((propertySymbol) => { - return typeChecker.isPropertyAccessible( - objectLikeContainer, - /*isSuper*/ - false, - /*isWrite*/ - false, - typeForObject, - propertySymbol - ); - }); - existingMembers = objectLikeContainer.elements; - } - } - if (typeMembers && typeMembers.length > 0) { - const filteredMembers = filterObjectMembersList(typeMembers, Debug.checkDefined(existingMembers)); - symbols = concatenate(symbols, filteredMembers); - setSortTextToOptionalMember(); - if (objectLikeContainer.kind === 210 /* ObjectLiteralExpression */ && preferences.includeCompletionsWithObjectLiteralMethodSnippets && preferences.includeCompletionsWithInsertText) { - transformObjectLiteralMembersSortText(symbolsStartIndex); - collectObjectLiteralMethodSymbols(filteredMembers, objectLikeContainer); - } - } - return 1 /* Success */; - } - function tryGetImportOrExportClauseCompletionSymbols() { - if (!contextToken) - return 0 /* Continue */; - const namedImportsOrExports = contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 28 /* CommaToken */ ? tryCast(contextToken.parent, isNamedImportsOrExports) : isTypeKeywordTokenOrIdentifier(contextToken) ? tryCast(contextToken.parent.parent, isNamedImportsOrExports) : void 0; - if (!namedImportsOrExports) - return 0 /* Continue */; - if (!isTypeKeywordTokenOrIdentifier(contextToken)) { - keywordFilters = 8 /* TypeKeyword */; - } - const { moduleSpecifier } = namedImportsOrExports.kind === 275 /* NamedImports */ ? namedImportsOrExports.parent.parent : namedImportsOrExports.parent; - if (!moduleSpecifier) { - isNewIdentifierLocation = true; - return namedImportsOrExports.kind === 275 /* NamedImports */ ? 2 /* Fail */ : 0 /* Continue */; - } - const moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(moduleSpecifier); - if (!moduleSpecifierSymbol) { - isNewIdentifierLocation = true; - return 2 /* Fail */; - } - completionKind = 3 /* MemberLike */; - isNewIdentifierLocation = false; - const exports = typeChecker.getExportsAndPropertiesOfModule(moduleSpecifierSymbol); - const existing = new Set(namedImportsOrExports.elements.filter((n) => !isCurrentlyEditingNode(n)).map((n) => (n.propertyName || n.name).escapedText)); - const uniques = exports.filter((e) => e.escapedName !== "default" /* Default */ && !existing.has(e.escapedName)); - symbols = concatenate(symbols, uniques); - if (!uniques.length) { - keywordFilters = 0 /* None */; - } - return 1 /* Success */; - } - function tryGetLocalNamedExportCompletionSymbols() { - var _a; - const namedExports = contextToken && (contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 28 /* CommaToken */) ? tryCast(contextToken.parent, isNamedExports) : void 0; - if (!namedExports) { - return 0 /* Continue */; - } - const localsContainer = findAncestor(namedExports, or(isSourceFile, isModuleDeclaration)); - completionKind = 5 /* None */; - isNewIdentifierLocation = false; - (_a = localsContainer.locals) == null ? void 0 : _a.forEach((symbol, name) => { - var _a2, _b; - symbols.push(symbol); - if ((_b = (_a2 = localsContainer.symbol) == null ? void 0 : _a2.exports) == null ? void 0 : _b.has(name)) { - symbolToSortTextMap[getSymbolId(symbol)] = SortText.OptionalMember; - } - }); - return 1 /* Success */; - } - function tryGetClassLikeCompletionSymbols() { - const decl = tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position); - if (!decl) - return 0 /* Continue */; - completionKind = 3 /* MemberLike */; - isNewIdentifierLocation = true; - keywordFilters = contextToken.kind === 42 /* AsteriskToken */ ? 0 /* None */ : isClassLike(decl) ? 2 /* ClassElementKeywords */ : 3 /* InterfaceElementKeywords */; - if (!isClassLike(decl)) - return 1 /* Success */; - const classElement = contextToken.kind === 27 /* SemicolonToken */ ? contextToken.parent.parent : contextToken.parent; - let classElementModifierFlags = isClassElement(classElement) ? getEffectiveModifierFlags(classElement) : 0 /* None */; - if (contextToken.kind === 80 /* Identifier */ && !isCurrentlyEditingNode(contextToken)) { - switch (contextToken.getText()) { - case "private": - classElementModifierFlags = classElementModifierFlags | 8 /* Private */; - break; - case "static": - classElementModifierFlags = classElementModifierFlags | 32 /* Static */; - break; - case "override": - classElementModifierFlags = classElementModifierFlags | 16384 /* Override */; - break; - } - } - if (isClassStaticBlockDeclaration(classElement)) { - classElementModifierFlags |= 32 /* Static */; - } - if (!(classElementModifierFlags & 8 /* Private */)) { - const baseTypeNodes = isClassLike(decl) && classElementModifierFlags & 16384 /* Override */ ? singleElementArray(getEffectiveBaseTypeNode(decl)) : getAllSuperTypeNodes(decl); - const baseSymbols = flatMap(baseTypeNodes, (baseTypeNode) => { - const type = typeChecker.getTypeAtLocation(baseTypeNode); - return classElementModifierFlags & 32 /* Static */ ? (type == null ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : type && typeChecker.getPropertiesOfType(type); - }); - symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags)); - forEach(symbols, (symbol, index) => { - const declaration = symbol == null ? void 0 : symbol.valueDeclaration; - if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) { - const origin = { - kind: 512 /* ComputedPropertyName */, - symbolName: typeChecker.symbolToString(symbol) - }; - symbolToOriginInfoMap[index] = origin; - } - }); - } - return 1 /* Success */; - } - function isConstructorParameterCompletion(node2) { - return !!node2.parent && isParameter(node2.parent) && isConstructorDeclaration(node2.parent.parent) && (isParameterPropertyModifier(node2.kind) || isDeclarationName(node2)); - } - function tryGetConstructorLikeCompletionContainer(contextToken2) { - if (contextToken2) { - const parent2 = contextToken2.parent; - switch (contextToken2.kind) { - case 21 /* OpenParenToken */: - case 28 /* CommaToken */: - return isConstructorDeclaration(contextToken2.parent) ? contextToken2.parent : void 0; - default: - if (isConstructorParameterCompletion(contextToken2)) { - return parent2.parent; - } - } - } - return void 0; - } - function tryGetFunctionLikeBodyCompletionContainer(contextToken2) { - if (contextToken2) { - let prev; - const container = findAncestor(contextToken2.parent, (node2) => { - if (isClassLike(node2)) { - return "quit"; - } - if (isFunctionLikeDeclaration(node2) && prev === node2.body) { - return true; - } - prev = node2; - return false; - }); - return container && container; - } - } - function tryGetContainingJsxElement(contextToken2) { - if (contextToken2) { - const parent2 = contextToken2.parent; - switch (contextToken2.kind) { - case 32 /* GreaterThanToken */: - case 31 /* LessThanSlashToken */: - case 44 /* SlashToken */: - case 80 /* Identifier */: - case 211 /* PropertyAccessExpression */: - case 292 /* JsxAttributes */: - case 291 /* JsxAttribute */: - case 293 /* JsxSpreadAttribute */: - if (parent2 && (parent2.kind === 285 /* JsxSelfClosingElement */ || parent2.kind === 286 /* JsxOpeningElement */)) { - if (contextToken2.kind === 32 /* GreaterThanToken */) { - const precedingToken = findPrecedingToken( - contextToken2.pos, - sourceFile, - /*startNode*/ - void 0 - ); - if (!parent2.typeArguments || precedingToken && precedingToken.kind === 44 /* SlashToken */) - break; - } - return parent2; - } else if (parent2.kind === 291 /* JsxAttribute */) { - return parent2.parent.parent; - } - break; - case 11 /* StringLiteral */: - if (parent2 && (parent2.kind === 291 /* JsxAttribute */ || parent2.kind === 293 /* JsxSpreadAttribute */)) { - return parent2.parent.parent; - } - break; - case 20 /* CloseBraceToken */: - if (parent2 && parent2.kind === 294 /* JsxExpression */ && parent2.parent && parent2.parent.kind === 291 /* JsxAttribute */) { - return parent2.parent.parent.parent; - } - if (parent2 && parent2.kind === 293 /* JsxSpreadAttribute */) { - return parent2.parent.parent; - } - break; - } - } - return void 0; - } - function isSolelyIdentifierDefinitionLocation(contextToken2) { - const parent2 = contextToken2.parent; - const containingNodeKind = parent2.kind; - switch (contextToken2.kind) { - case 28 /* CommaToken */: - return containingNodeKind === 260 /* VariableDeclaration */ || isVariableDeclarationListButNotTypeArgument(contextToken2) || containingNodeKind === 243 /* VariableStatement */ || containingNodeKind === 266 /* EnumDeclaration */ || // enum a { foo, | - isFunctionLikeButNotConstructor(containingNodeKind) || containingNodeKind === 264 /* InterfaceDeclaration */ || // interface A= contextToken2.pos; - case 25 /* DotToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; - case 59 /* ColonToken */: - return containingNodeKind === 208 /* BindingElement */; - case 23 /* OpenBracketToken */: - return containingNodeKind === 207 /* ArrayBindingPattern */; - case 21 /* OpenParenToken */: - return containingNodeKind === 299 /* CatchClause */ || isFunctionLikeButNotConstructor(containingNodeKind); - case 19 /* OpenBraceToken */: - return containingNodeKind === 266 /* EnumDeclaration */; - case 30 /* LessThanToken */: - return containingNodeKind === 263 /* ClassDeclaration */ || // class A< | - containingNodeKind === 231 /* ClassExpression */ || // var C = class D< | - containingNodeKind === 264 /* InterfaceDeclaration */ || // interface A< | - containingNodeKind === 265 /* TypeAliasDeclaration */ || // type List< | - isFunctionLikeKind(containingNodeKind); - case 126 /* StaticKeyword */: - return containingNodeKind === 172 /* PropertyDeclaration */ && !isClassLike(parent2.parent); - case 26 /* DotDotDotToken */: - return containingNodeKind === 169 /* Parameter */ || !!parent2.parent && parent2.parent.kind === 207 /* ArrayBindingPattern */; - case 125 /* PublicKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - return containingNodeKind === 169 /* Parameter */ && !isConstructorDeclaration(parent2.parent); - case 130 /* AsKeyword */: - return containingNodeKind === 276 /* ImportSpecifier */ || containingNodeKind === 281 /* ExportSpecifier */ || containingNodeKind === 274 /* NamespaceImport */; - case 139 /* GetKeyword */: - case 153 /* SetKeyword */: - return !isFromObjectTypeDeclaration(contextToken2); - case 80 /* Identifier */: - if (containingNodeKind === 276 /* ImportSpecifier */ && contextToken2 === parent2.name && contextToken2.text === "type") { - return false; - } - break; - case 86 /* ClassKeyword */: - case 94 /* EnumKeyword */: - case 120 /* InterfaceKeyword */: - case 100 /* FunctionKeyword */: - case 115 /* VarKeyword */: - case 102 /* ImportKeyword */: - case 121 /* LetKeyword */: - case 87 /* ConstKeyword */: - case 140 /* InferKeyword */: - return true; - case 156 /* TypeKeyword */: - return containingNodeKind !== 276 /* ImportSpecifier */; - case 42 /* AsteriskToken */: - return isFunctionLike(contextToken2.parent) && !isMethodDeclaration(contextToken2.parent); - } - if (isClassMemberCompletionKeyword(keywordForNode(contextToken2)) && isFromObjectTypeDeclaration(contextToken2)) { - return false; - } - if (isConstructorParameterCompletion(contextToken2)) { - if (!isIdentifier(contextToken2) || isParameterPropertyModifier(keywordForNode(contextToken2)) || isCurrentlyEditingNode(contextToken2)) { - return false; - } - } - switch (keywordForNode(contextToken2)) { - case 128 /* AbstractKeyword */: - case 86 /* ClassKeyword */: - case 87 /* ConstKeyword */: - case 138 /* DeclareKeyword */: - case 94 /* EnumKeyword */: - case 100 /* FunctionKeyword */: - case 120 /* InterfaceKeyword */: - case 121 /* LetKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - case 125 /* PublicKeyword */: - case 126 /* StaticKeyword */: - case 115 /* VarKeyword */: - return true; - case 134 /* AsyncKeyword */: - return isPropertyDeclaration(contextToken2.parent); - } - const ancestorClassLike = findAncestor(contextToken2.parent, isClassLike); - if (ancestorClassLike && contextToken2 === previousToken && isPreviousPropertyDeclarationTerminated(contextToken2, position)) { - return false; - } - const ancestorPropertyDeclaraion = getAncestor(contextToken2.parent, 172 /* PropertyDeclaration */); - if (ancestorPropertyDeclaraion && contextToken2 !== previousToken && isClassLike(previousToken.parent.parent) && position <= previousToken.end) { - if (isPreviousPropertyDeclarationTerminated(contextToken2, previousToken.end)) { - return false; - } else if (contextToken2.kind !== 64 /* EqualsToken */ && (isInitializedProperty(ancestorPropertyDeclaraion) || hasType(ancestorPropertyDeclaraion))) { - return true; - } - } - return isDeclarationName(contextToken2) && !isShorthandPropertyAssignment(contextToken2.parent) && !isJsxAttribute(contextToken2.parent) && !((isClassLike(contextToken2.parent) || isInterfaceDeclaration(contextToken2.parent) || isTypeParameterDeclaration(contextToken2.parent)) && (contextToken2 !== previousToken || position > previousToken.end)); - } - function isPreviousPropertyDeclarationTerminated(contextToken2, position2) { - return contextToken2.kind !== 64 /* EqualsToken */ && (contextToken2.kind === 27 /* SemicolonToken */ || !positionsAreOnSameLine(contextToken2.end, position2, sourceFile)); - } - function isFunctionLikeButNotConstructor(kind) { - return isFunctionLikeKind(kind) && kind !== 176 /* Constructor */; - } - function isDotOfNumericLiteral(contextToken2) { - if (contextToken2.kind === 9 /* NumericLiteral */) { - const text = contextToken2.getFullText(); - return text.charAt(text.length - 1) === "."; - } - return false; - } - function isVariableDeclarationListButNotTypeArgument(node2) { - return node2.parent.kind === 261 /* VariableDeclarationList */ && !isPossiblyTypeArgumentPosition(node2, sourceFile, typeChecker); - } - function filterObjectMembersList(contextualMemberSymbols, existingMembers) { - if (existingMembers.length === 0) { - return contextualMemberSymbols; - } - const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set(); - const existingMemberNames = /* @__PURE__ */ new Set(); - for (const m of existingMembers) { - if (m.kind !== 303 /* PropertyAssignment */ && m.kind !== 304 /* ShorthandPropertyAssignment */ && m.kind !== 208 /* BindingElement */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */ && m.kind !== 305 /* SpreadAssignment */) { - continue; - } - if (isCurrentlyEditingNode(m)) { - continue; - } - let existingName; - if (isSpreadAssignment(m)) { - setMembersDeclaredBySpreadAssignment(m, membersDeclaredBySpreadAssignment); - } else if (isBindingElement(m) && m.propertyName) { - if (m.propertyName.kind === 80 /* Identifier */) { - existingName = m.propertyName.escapedText; - } - } else { - const name = getNameOfDeclaration(m); - existingName = name && isPropertyNameLiteral(name) ? getEscapedTextOfIdentifierOrLiteral(name) : void 0; - } - if (existingName !== void 0) { - existingMemberNames.add(existingName); - } - } - const filteredSymbols = contextualMemberSymbols.filter((m) => !existingMemberNames.has(m.escapedName)); - setSortTextToMemberDeclaredBySpreadAssignment(membersDeclaredBySpreadAssignment, filteredSymbols); - return filteredSymbols; - } - function setMembersDeclaredBySpreadAssignment(declaration, membersDeclaredBySpreadAssignment) { - const expression = declaration.expression; - const symbol = typeChecker.getSymbolAtLocation(expression); - const type = symbol && typeChecker.getTypeOfSymbolAtLocation(symbol, expression); - const properties = type && type.properties; - if (properties) { - properties.forEach((property) => { - membersDeclaredBySpreadAssignment.add(property.name); - }); - } - } - function setSortTextToOptionalMember() { - symbols.forEach((m) => { - if (m.flags & 16777216 /* Optional */) { - const symbolId = getSymbolId(m); - symbolToSortTextMap[symbolId] = symbolToSortTextMap[symbolId] ?? SortText.OptionalMember; - } - }); - } - function setSortTextToMemberDeclaredBySpreadAssignment(membersDeclaredBySpreadAssignment, contextualMemberSymbols) { - if (membersDeclaredBySpreadAssignment.size === 0) { - return; - } - for (const contextualMemberSymbol of contextualMemberSymbols) { - if (membersDeclaredBySpreadAssignment.has(contextualMemberSymbol.name)) { - symbolToSortTextMap[getSymbolId(contextualMemberSymbol)] = SortText.MemberDeclaredBySpreadAssignment; - } - } - } - function transformObjectLiteralMembersSortText(start2) { - for (let i = start2; i < symbols.length; i++) { - const symbol = symbols[i]; - const symbolId = getSymbolId(symbol); - const origin = symbolToOriginInfoMap == null ? void 0 : symbolToOriginInfoMap[i]; - const target = getEmitScriptTarget(compilerOptions); - const displayName = getCompletionEntryDisplayNameForSymbol( - symbol, - target, - origin, - 0 /* ObjectPropertyDeclaration */, - /*jsxIdentifierExpected*/ - false - ); - if (displayName) { - const originalSortText = symbolToSortTextMap[symbolId] ?? SortText.LocationPriority; - const { name } = displayName; - symbolToSortTextMap[symbolId] = SortText.ObjectLiteralProperty(originalSortText, name); - } - } - } - function filterClassMembersList(baseSymbols, existingMembers, currentClassElementModifierFlags) { - const existingMemberNames = /* @__PURE__ */ new Set(); - for (const m of existingMembers) { - if (m.kind !== 172 /* PropertyDeclaration */ && m.kind !== 174 /* MethodDeclaration */ && m.kind !== 177 /* GetAccessor */ && m.kind !== 178 /* SetAccessor */) { - continue; - } - if (isCurrentlyEditingNode(m)) { - continue; - } - if (hasEffectiveModifier(m, 8 /* Private */)) { - continue; - } - if (isStatic(m) !== !!(currentClassElementModifierFlags & 32 /* Static */)) { - continue; - } - const existingName = getPropertyNameForPropertyNameNode(m.name); - if (existingName) { - existingMemberNames.add(existingName); - } - } - return baseSymbols.filter((propertySymbol) => !existingMemberNames.has(propertySymbol.escapedName) && !!propertySymbol.declarations && !(getDeclarationModifierFlagsFromSymbol(propertySymbol) & 8 /* Private */) && !(propertySymbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(propertySymbol.valueDeclaration))); - } - function filterJsxAttributes(symbols2, attributes) { - const seenNames = /* @__PURE__ */ new Set(); - const membersDeclaredBySpreadAssignment = /* @__PURE__ */ new Set(); - for (const attr of attributes) { - if (isCurrentlyEditingNode(attr)) { - continue; - } - if (attr.kind === 291 /* JsxAttribute */) { - seenNames.add(getEscapedTextOfJsxAttributeName(attr.name)); - } else if (isJsxSpreadAttribute(attr)) { - setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment); - } - } - const filteredSymbols = symbols2.filter((a) => !seenNames.has(a.escapedName)); - setSortTextToMemberDeclaredBySpreadAssignment(membersDeclaredBySpreadAssignment, filteredSymbols); - return filteredSymbols; - } - function isCurrentlyEditingNode(node2) { - return node2.getStart(sourceFile) <= position && position <= node2.getEnd(); - } - } - function tryGetObjectLikeCompletionContainer(contextToken, position, sourceFile) { - var _a; - if (contextToken) { - const { parent: parent2 } = contextToken; - switch (contextToken.kind) { - case 19 /* OpenBraceToken */: - case 28 /* CommaToken */: - if (isObjectLiteralExpression(parent2) || isObjectBindingPattern(parent2)) { - return parent2; - } - break; - case 42 /* AsteriskToken */: - return isMethodDeclaration(parent2) ? tryCast(parent2.parent, isObjectLiteralExpression) : void 0; - case 134 /* AsyncKeyword */: - return tryCast(parent2.parent, isObjectLiteralExpression); - case 80 /* Identifier */: - if (contextToken.text === "async" && isShorthandPropertyAssignment(contextToken.parent)) { - return contextToken.parent.parent; - } else { - if (isObjectLiteralExpression(contextToken.parent.parent) && (isSpreadAssignment(contextToken.parent) || isShorthandPropertyAssignment(contextToken.parent) && getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line)) { - return contextToken.parent.parent; - } - const ancestorNode2 = findAncestor(parent2, isPropertyAssignment); - if ((ancestorNode2 == null ? void 0 : ancestorNode2.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode2.parent)) { - return ancestorNode2.parent; - } - } - break; - default: - if (((_a = parent2.parent) == null ? void 0 : _a.parent) && (isMethodDeclaration(parent2.parent) || isGetAccessorDeclaration(parent2.parent) || isSetAccessorDeclaration(parent2.parent)) && isObjectLiteralExpression(parent2.parent.parent)) { - return parent2.parent.parent; - } - if (isSpreadAssignment(parent2) && isObjectLiteralExpression(parent2.parent)) { - return parent2.parent; - } - const ancestorNode = findAncestor(parent2, isPropertyAssignment); - if (contextToken.kind !== 59 /* ColonToken */ && (ancestorNode == null ? void 0 : ancestorNode.getLastToken(sourceFile)) === contextToken && isObjectLiteralExpression(ancestorNode.parent)) { - return ancestorNode.parent; - } - } - } - return void 0; - } - function getRelevantTokens(position, sourceFile) { - const previousToken = findPrecedingToken(position, sourceFile); - if (previousToken && position <= previousToken.end && (isMemberName(previousToken) || isKeyword(previousToken.kind))) { - const contextToken = findPrecedingToken( - previousToken.getFullStart(), - sourceFile, - /*startNode*/ - void 0 - ); - return { contextToken, previousToken }; - } - return { contextToken: previousToken, previousToken }; - } - function getAutoImportSymbolFromCompletionEntryData(name, data, program, host) { - const containingProgram = data.isPackageJsonImport ? host.getPackageJsonAutoImportProvider() : program; - const checker = containingProgram.getTypeChecker(); - const moduleSymbol = data.ambientModuleName ? checker.tryFindAmbientModule(data.ambientModuleName) : data.fileName ? checker.getMergedSymbol(Debug.checkDefined(containingProgram.getSourceFile(data.fileName)).symbol) : void 0; - if (!moduleSymbol) - return void 0; - let symbol = data.exportName === "export=" /* ExportEquals */ ? checker.resolveExternalModuleSymbol(moduleSymbol) : checker.tryGetMemberInModuleExportsAndProperties(data.exportName, moduleSymbol); - if (!symbol) - return void 0; - const isDefaultExport = data.exportName === "default" /* Default */; - symbol = isDefaultExport && getLocalSymbolForExportDefault(symbol) || symbol; - return { symbol, origin: completionEntryDataToSymbolOriginInfo(data, name, moduleSymbol) }; - } - function getCompletionEntryDisplayNameForSymbol(symbol, target, origin, kind, jsxIdentifierExpected) { - if (originIsIgnore(origin)) { - return void 0; - } - const name = originIncludesSymbolName(origin) ? origin.symbolName : symbol.name; - if (name === void 0 || symbol.flags & 1536 /* Module */ && isSingleOrDoubleQuote(name.charCodeAt(0)) || isKnownSymbol(symbol)) { - return void 0; - } - const validNameResult = { name, needsConvertPropertyAccess: false }; - if (isIdentifierText(name, target, jsxIdentifierExpected ? 1 /* JSX */ : 0 /* Standard */) || symbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(symbol.valueDeclaration)) { - return validNameResult; - } - switch (kind) { - case 3 /* MemberLike */: - return originIsComputedPropertyName(origin) ? { name: origin.symbolName, needsConvertPropertyAccess: false } : void 0; - case 0 /* ObjectPropertyDeclaration */: - return { name: JSON.stringify(name), needsConvertPropertyAccess: false }; - case 2 /* PropertyAccess */: - case 1 /* Global */: - return name.charCodeAt(0) === 32 /* space */ ? void 0 : { name, needsConvertPropertyAccess: true }; - case 5 /* None */: - case 4 /* String */: - return validNameResult; - default: - Debug.assertNever(kind); - } - } - function getKeywordCompletions(keywordFilter, filterOutTsOnlyKeywords) { - if (!filterOutTsOnlyKeywords) - return getTypescriptKeywordCompletions(keywordFilter); - const index = keywordFilter + 8 /* Last */ + 1; - return _keywordCompletions[index] || (_keywordCompletions[index] = getTypescriptKeywordCompletions(keywordFilter).filter((entry) => !isTypeScriptOnlyKeyword(stringToToken(entry.name)))); - } - function getTypescriptKeywordCompletions(keywordFilter) { - return _keywordCompletions[keywordFilter] || (_keywordCompletions[keywordFilter] = allKeywordsCompletions().filter((entry) => { - const kind = stringToToken(entry.name); - switch (keywordFilter) { - case 0 /* None */: - return false; - case 1 /* All */: - return isFunctionLikeBodyKeyword(kind) || kind === 138 /* DeclareKeyword */ || kind === 144 /* ModuleKeyword */ || kind === 156 /* TypeKeyword */ || kind === 145 /* NamespaceKeyword */ || kind === 128 /* AbstractKeyword */ || isTypeKeyword(kind) && kind !== 157 /* UndefinedKeyword */; - case 5 /* FunctionLikeBodyKeywords */: - return isFunctionLikeBodyKeyword(kind); - case 2 /* ClassElementKeywords */: - return isClassMemberCompletionKeyword(kind); - case 3 /* InterfaceElementKeywords */: - return isInterfaceOrTypeLiteralCompletionKeyword(kind); - case 4 /* ConstructorParameterKeywords */: - return isParameterPropertyModifier(kind); - case 6 /* TypeAssertionKeywords */: - return isTypeKeyword(kind) || kind === 87 /* ConstKeyword */; - case 7 /* TypeKeywords */: - return isTypeKeyword(kind); - case 8 /* TypeKeyword */: - return kind === 156 /* TypeKeyword */; - default: - return Debug.assertNever(keywordFilter); - } - })); - } - function isTypeScriptOnlyKeyword(kind) { - switch (kind) { - case 128 /* AbstractKeyword */: - case 133 /* AnyKeyword */: - case 163 /* BigIntKeyword */: - case 136 /* BooleanKeyword */: - case 138 /* DeclareKeyword */: - case 94 /* EnumKeyword */: - case 162 /* GlobalKeyword */: - case 119 /* ImplementsKeyword */: - case 140 /* InferKeyword */: - case 120 /* InterfaceKeyword */: - case 142 /* IsKeyword */: - case 143 /* KeyOfKeyword */: - case 144 /* ModuleKeyword */: - case 145 /* NamespaceKeyword */: - case 146 /* NeverKeyword */: - case 150 /* NumberKeyword */: - case 151 /* ObjectKeyword */: - case 164 /* OverrideKeyword */: - case 123 /* PrivateKeyword */: - case 124 /* ProtectedKeyword */: - case 125 /* PublicKeyword */: - case 148 /* ReadonlyKeyword */: - case 154 /* StringKeyword */: - case 155 /* SymbolKeyword */: - case 156 /* TypeKeyword */: - case 158 /* UniqueKeyword */: - case 159 /* UnknownKeyword */: - return true; - default: - return false; - } - } - function isInterfaceOrTypeLiteralCompletionKeyword(kind) { - return kind === 148 /* ReadonlyKeyword */; - } - function isClassMemberCompletionKeyword(kind) { - switch (kind) { - case 128 /* AbstractKeyword */: - case 129 /* AccessorKeyword */: - case 137 /* ConstructorKeyword */: - case 139 /* GetKeyword */: - case 153 /* SetKeyword */: - case 134 /* AsyncKeyword */: - case 138 /* DeclareKeyword */: - case 164 /* OverrideKeyword */: - return true; - default: - return isClassMemberModifier(kind); - } - } - function isFunctionLikeBodyKeyword(kind) { - return kind === 134 /* AsyncKeyword */ || kind === 135 /* AwaitKeyword */ || kind === 130 /* AsKeyword */ || kind === 152 /* SatisfiesKeyword */ || kind === 156 /* TypeKeyword */ || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); - } - function keywordForNode(node) { - return isIdentifier(node) ? identifierToKeywordKind(node) ?? 0 /* Unknown */ : node.kind; - } - function getContextualKeywords(contextToken, position) { - const entries = []; - if (contextToken) { - const file = contextToken.getSourceFile(); - const parent2 = contextToken.parent; - const tokenLine = file.getLineAndCharacterOfPosition(contextToken.end).line; - const currentLine = file.getLineAndCharacterOfPosition(position).line; - if ((isImportDeclaration(parent2) || isExportDeclaration(parent2) && parent2.moduleSpecifier) && contextToken === parent2.moduleSpecifier && tokenLine === currentLine) { - entries.push({ - name: tokenToString(132 /* AssertKeyword */), - kind: "keyword" /* keyword */, - kindModifiers: "" /* none */, - sortText: SortText.GlobalsOrKeywords - }); - } - } - return entries; - } - function getJsDocTagAtPosition(node, position) { - return findAncestor(node, (n) => isJSDocTag(n) && rangeContainsPosition(n, position) ? true : isJSDoc(n) ? "quit" : false); - } - function getPropertiesForObjectExpression(contextualType, completionsType, obj, checker) { - const hasCompletionsType = completionsType && completionsType !== contextualType; - const type = hasCompletionsType && !(completionsType.flags & 3 /* AnyOrUnknown */) ? checker.getUnionType([contextualType, completionsType]) : contextualType; - const properties = getApparentProperties(type, obj, checker); - return type.isClass() && containsNonPublicProperties(properties) ? [] : hasCompletionsType ? filter(properties, hasDeclarationOtherThanSelf) : properties; - function hasDeclarationOtherThanSelf(member) { - if (!length(member.declarations)) - return true; - return some(member.declarations, (decl) => decl.parent !== obj); - } - } - function getApparentProperties(type, node, checker) { - if (!type.isUnion()) - return type.getApparentProperties(); - return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 402784252 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties())))); - } - function containsNonPublicProperties(props) { - return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 24 /* NonPublicAccessibilityModifier */)); - } - function getPropertiesForCompletion(type, checker) { - return type.isUnion() ? Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") : Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); - } - function tryGetObjectTypeDeclarationCompletionContainer(sourceFile, contextToken, location, position) { - switch (location.kind) { - case 358 /* SyntaxList */: - return tryCast(location.parent, isObjectTypeDeclaration); - case 1 /* EndOfFileToken */: - const cls = tryCast(lastOrUndefined(cast(location.parent, isSourceFile).statements), isObjectTypeDeclaration); - if (cls && !findChildOfKind(cls, 20 /* CloseBraceToken */, sourceFile)) { - return cls; - } - break; - case 81 /* PrivateIdentifier */: - if (tryCast(location.parent, isPropertyDeclaration)) { - return findAncestor(location, isClassLike); - } - break; - case 80 /* Identifier */: { - const originalKeywordKind = identifierToKeywordKind(location); - if (originalKeywordKind) { - return void 0; - } - if (isPropertyDeclaration(location.parent) && location.parent.initializer === location) { - return void 0; - } - if (isFromObjectTypeDeclaration(location)) { - return findAncestor(location, isObjectTypeDeclaration); - } - } - } - if (!contextToken) - return void 0; - if (location.kind === 137 /* ConstructorKeyword */ || isIdentifier(contextToken) && isPropertyDeclaration(contextToken.parent) && isClassLike(location)) { - return findAncestor(contextToken, isClassLike); - } - switch (contextToken.kind) { - case 64 /* EqualsToken */: - return void 0; - case 27 /* SemicolonToken */: - case 20 /* CloseBraceToken */: - return isFromObjectTypeDeclaration(location) && location.parent.name === location ? location.parent.parent : tryCast(location, isObjectTypeDeclaration); - case 19 /* OpenBraceToken */: - case 28 /* CommaToken */: - return tryCast(contextToken.parent, isObjectTypeDeclaration); - default: - if (isObjectTypeDeclaration(location)) { - if (getLineAndCharacterOfPosition(sourceFile, contextToken.getEnd()).line !== getLineAndCharacterOfPosition(sourceFile, position).line) { - return location; - } - const isValidKeyword = isClassLike(contextToken.parent.parent) ? isClassMemberCompletionKeyword : isInterfaceOrTypeLiteralCompletionKeyword; - return isValidKeyword(contextToken.kind) || contextToken.kind === 42 /* AsteriskToken */ || isIdentifier(contextToken) && isValidKeyword(identifierToKeywordKind(contextToken) ?? 0 /* Unknown */) ? contextToken.parent.parent : void 0; - } - return void 0; - } - } - function tryGetTypeLiteralNode(node) { - if (!node) - return void 0; - const parent2 = node.parent; - switch (node.kind) { - case 19 /* OpenBraceToken */: - if (isTypeLiteralNode(parent2)) { - return parent2; - } - break; - case 27 /* SemicolonToken */: - case 28 /* CommaToken */: - case 80 /* Identifier */: - if (parent2.kind === 171 /* PropertySignature */ && isTypeLiteralNode(parent2.parent)) { - return parent2.parent; - } - break; - } - return void 0; - } - function getConstraintOfTypeArgumentProperty(node, checker) { - if (!node) - return void 0; - if (isTypeNode(node) && isTypeReferenceType(node.parent)) { - return checker.getTypeArgumentConstraint(node); - } - const t = getConstraintOfTypeArgumentProperty(node.parent, checker); - if (!t) - return void 0; - switch (node.kind) { - case 171 /* PropertySignature */: - return checker.getTypeOfPropertyOfContextualType(t, node.symbol.escapedName); - case 193 /* IntersectionType */: - case 187 /* TypeLiteral */: - case 192 /* UnionType */: - return t; - } - } - function isFromObjectTypeDeclaration(node) { - return node.parent && isClassOrTypeElement(node.parent) && isObjectTypeDeclaration(node.parent.parent); - } - function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) { - switch (triggerCharacter) { - case ".": - case "@": - return true; - case '"': - case "'": - case "`": - return !!contextToken && isStringLiteralOrTemplate(contextToken) && position === contextToken.getStart(sourceFile) + 1; - case "#": - return !!contextToken && isPrivateIdentifier(contextToken) && !!getContainingClass(contextToken); - case "<": - return !!contextToken && contextToken.kind === 30 /* LessThanToken */ && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent)); - case "/": - return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent)); - case " ": - return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 312 /* SourceFile */; - default: - return Debug.assertNever(triggerCharacter); - } - } - function binaryExpressionMayBeOpenTag({ left }) { - return nodeIsMissing(left); - } - function isProbablyGlobalType(type, sourceFile, checker) { - const selfSymbol = checker.resolveName( - "self", - /*location*/ - void 0, - 111551 /* Value */, - /*excludeGlobals*/ - false - ); - if (selfSymbol && checker.getTypeOfSymbolAtLocation(selfSymbol, sourceFile) === type) { - return true; - } - const globalSymbol = checker.resolveName( - "global", - /*location*/ - void 0, - 111551 /* Value */, - /*excludeGlobals*/ - false - ); - if (globalSymbol && checker.getTypeOfSymbolAtLocation(globalSymbol, sourceFile) === type) { - return true; - } - const globalThisSymbol = checker.resolveName( - "globalThis", - /*location*/ - void 0, - 111551 /* Value */, - /*excludeGlobals*/ - false - ); - if (globalThisSymbol && checker.getTypeOfSymbolAtLocation(globalThisSymbol, sourceFile) === type) { - return true; - } - return false; - } - function isStaticProperty(symbol) { - return !!(symbol.valueDeclaration && getEffectiveModifierFlags(symbol.valueDeclaration) & 32 /* Static */ && isClassLike(symbol.valueDeclaration.parent)); - } - function tryGetObjectLiteralContextualType(node, typeChecker) { - const type = typeChecker.getContextualType(node); - if (type) { - return type; - } - const parent2 = walkUpParenthesizedExpressions(node.parent); - if (isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */ && node === parent2.left) { - return typeChecker.getTypeAtLocation(parent2); - } - if (isExpression(parent2)) { - return typeChecker.getContextualType(parent2); - } - return void 0; - } - function getImportStatementCompletionInfo(contextToken, sourceFile) { - var _a, _b, _c; - let keywordCompletion; - let isKeywordOnlyCompletion = false; - const candidate = getCandidate(); - return { - isKeywordOnlyCompletion, - keywordCompletion, - isNewIdentifierLocation: !!(candidate || keywordCompletion === 156 /* TypeKeyword */), - isTopLevelTypeOnly: !!((_b = (_a = tryCast(candidate, isImportDeclaration)) == null ? void 0 : _a.importClause) == null ? void 0 : _b.isTypeOnly) || !!((_c = tryCast(candidate, isImportEqualsDeclaration)) == null ? void 0 : _c.isTypeOnly), - couldBeTypeOnlyImportSpecifier: !!candidate && couldBeTypeOnlyImportSpecifier(candidate, contextToken), - replacementSpan: getSingleLineReplacementSpanForImportCompletionNode(candidate) - }; - function getCandidate() { - const parent2 = contextToken.parent; - if (isImportEqualsDeclaration(parent2)) { - const lastToken = parent2.getLastToken(sourceFile); - if (isIdentifier(contextToken) && lastToken !== contextToken) { - keywordCompletion = 161 /* FromKeyword */; - isKeywordOnlyCompletion = true; - return void 0; - } - keywordCompletion = contextToken.kind === 156 /* TypeKeyword */ ? void 0 : 156 /* TypeKeyword */; - return isModuleSpecifierMissingOrEmpty(parent2.moduleReference) ? parent2 : void 0; - } - if (couldBeTypeOnlyImportSpecifier(parent2, contextToken) && canCompleteFromNamedBindings(parent2.parent)) { - return parent2; - } - if (isNamedImports(parent2) || isNamespaceImport(parent2)) { - if (!parent2.parent.isTypeOnly && (contextToken.kind === 19 /* OpenBraceToken */ || contextToken.kind === 102 /* ImportKeyword */ || contextToken.kind === 28 /* CommaToken */)) { - keywordCompletion = 156 /* TypeKeyword */; - } - if (canCompleteFromNamedBindings(parent2)) { - if (contextToken.kind === 20 /* CloseBraceToken */ || contextToken.kind === 80 /* Identifier */) { - isKeywordOnlyCompletion = true; - keywordCompletion = 161 /* FromKeyword */; - } else { - return parent2.parent.parent; - } - } - return void 0; - } - if (isImportKeyword(contextToken) && isSourceFile(parent2)) { - keywordCompletion = 156 /* TypeKeyword */; - return contextToken; - } - if (isImportKeyword(contextToken) && isImportDeclaration(parent2)) { - keywordCompletion = 156 /* TypeKeyword */; - return isModuleSpecifierMissingOrEmpty(parent2.moduleSpecifier) ? parent2 : void 0; - } - return void 0; - } - } - function getSingleLineReplacementSpanForImportCompletionNode(node) { - var _a; - if (!node) - return void 0; - const top = findAncestor(node, or(isImportDeclaration, isImportEqualsDeclaration)) ?? node; - const sourceFile = top.getSourceFile(); - if (rangeIsOnSingleLine(top, sourceFile)) { - return createTextSpanFromNode(top, sourceFile); - } - Debug.assert(top.kind !== 102 /* ImportKeyword */ && top.kind !== 276 /* ImportSpecifier */); - const potentialSplitPoint = top.kind === 272 /* ImportDeclaration */ ? getPotentiallyInvalidImportSpecifier((_a = top.importClause) == null ? void 0 : _a.namedBindings) ?? top.moduleSpecifier : top.moduleReference; - const withoutModuleSpecifier = { - pos: top.getFirstToken().getStart(), - end: potentialSplitPoint.pos - }; - if (rangeIsOnSingleLine(withoutModuleSpecifier, sourceFile)) { - return createTextSpanFromRange(withoutModuleSpecifier); - } - } - function getPotentiallyInvalidImportSpecifier(namedBindings) { - var _a; - return find( - (_a = tryCast(namedBindings, isNamedImports)) == null ? void 0 : _a.elements, - (e) => { - var _a2; - return !e.propertyName && isStringANonContextualKeyword(e.name.text) && ((_a2 = findPrecedingToken(e.name.pos, namedBindings.getSourceFile(), namedBindings)) == null ? void 0 : _a2.kind) !== 28 /* CommaToken */; - } - ); - } - function couldBeTypeOnlyImportSpecifier(importSpecifier, contextToken) { - return isImportSpecifier(importSpecifier) && (importSpecifier.isTypeOnly || contextToken === importSpecifier.name && isTypeKeywordTokenOrIdentifier(contextToken)); - } - function canCompleteFromNamedBindings(namedBindings) { - if (!isModuleSpecifierMissingOrEmpty(namedBindings.parent.parent.moduleSpecifier) || namedBindings.parent.name) { - return false; - } - if (isNamedImports(namedBindings)) { - const invalidNamedImport = getPotentiallyInvalidImportSpecifier(namedBindings); - const validImports = invalidNamedImport ? namedBindings.elements.indexOf(invalidNamedImport) : namedBindings.elements.length; - return validImports < 2; - } - return true; - } - function isModuleSpecifierMissingOrEmpty(specifier) { - var _a; - if (nodeIsMissing(specifier)) - return true; - return !((_a = tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)) == null ? void 0 : _a.text); - } - function getVariableOrParameterDeclaration(contextToken, location) { - if (!contextToken) - return; - const possiblyParameterDeclaration = findAncestor(contextToken, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : (isParameter(node) || isTypeParameterDeclaration(node)) && !isIndexSignatureDeclaration(node.parent)); - const possiblyVariableDeclaration = findAncestor(location, (node) => isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) ? "quit" : isVariableDeclaration(node)); - return possiblyParameterDeclaration || possiblyVariableDeclaration; - } - function isArrowFunctionBody(node) { - return node.parent && isArrowFunction(node.parent) && (node.parent.body === node || // const a = () => /**/; - node.kind === 39 /* EqualsGreaterThanToken */); - } - function symbolCanBeReferencedAtTypeLocation(symbol, checker, seenModules = /* @__PURE__ */ new Map()) { - return nonAliasCanBeReferencedAtTypeLocation(symbol) || nonAliasCanBeReferencedAtTypeLocation(skipAlias(symbol.exportSymbol || symbol, checker)); - function nonAliasCanBeReferencedAtTypeLocation(symbol2) { - return !!(symbol2.flags & 788968 /* Type */) || checker.isUnknownSymbol(symbol2) || !!(symbol2.flags & 1536 /* Module */) && addToSeen(seenModules, getSymbolId(symbol2)) && checker.getExportsOfModule(symbol2).some((e) => symbolCanBeReferencedAtTypeLocation(e, checker, seenModules)); - } - } - function isDeprecated(symbol, checker) { - const declarations = skipAlias(symbol, checker).declarations; - return !!length(declarations) && every(declarations, isDeprecatedDeclaration); - } - function charactersFuzzyMatchInString(identifierString, lowercaseCharacters) { - if (lowercaseCharacters.length === 0) { - return true; - } - let matchedFirstCharacter = false; - let prevChar; - let characterIndex = 0; - const len = identifierString.length; - for (let strIndex = 0; strIndex < len; strIndex++) { - const strChar = identifierString.charCodeAt(strIndex); - const testChar = lowercaseCharacters.charCodeAt(characterIndex); - if (strChar === testChar || strChar === toUpperCharCode(testChar)) { - matchedFirstCharacter || (matchedFirstCharacter = prevChar === void 0 || // Beginning of word - 97 /* a */ <= prevChar && prevChar <= 122 /* z */ && 65 /* A */ <= strChar && strChar <= 90 /* Z */ || // camelCase transition - prevChar === 95 /* _ */ && strChar !== 95 /* _ */); - if (matchedFirstCharacter) { - characterIndex++; - } - if (characterIndex === lowercaseCharacters.length) { - return true; - } - } - prevChar = strChar; - } - return false; - } - function toUpperCharCode(charCode) { - if (97 /* a */ <= charCode && charCode <= 122 /* z */) { - return charCode - 32; - } - return charCode; - } - var moduleSpecifierResolutionLimit, moduleSpecifierResolutionCacheAttemptLimit, SortText, CompletionSource, SymbolOriginInfoKind, CompletionKind, _keywordCompletions, allKeywordsCompletions; - var init_completions = __esm({ - "src/services/completions.ts"() { - "use strict"; - init_ts4(); - init_ts_Completions(); - moduleSpecifierResolutionLimit = 100; - moduleSpecifierResolutionCacheAttemptLimit = 1e3; - SortText = { - // Presets - LocalDeclarationPriority: "10", - LocationPriority: "11", - OptionalMember: "12", - MemberDeclaredBySpreadAssignment: "13", - SuggestedClassMembers: "14", - GlobalsOrKeywords: "15", - AutoImportSuggestions: "16", - ClassMemberSnippets: "17", - JavascriptIdentifiers: "18", - // Transformations - Deprecated(sortText) { - return "z" + sortText; - }, - ObjectLiteralProperty(presetSortText, symbolDisplayName) { - return `${presetSortText}\0${symbolDisplayName}\0`; - }, - SortBelow(sortText) { - return sortText + "1"; - } - }; - CompletionSource = /* @__PURE__ */ ((CompletionSource2) => { - CompletionSource2["ThisProperty"] = "ThisProperty/"; - CompletionSource2["ClassMemberSnippet"] = "ClassMemberSnippet/"; - CompletionSource2["TypeOnlyAlias"] = "TypeOnlyAlias/"; - CompletionSource2["ObjectLiteralMethodSnippet"] = "ObjectLiteralMethodSnippet/"; - CompletionSource2["SwitchCases"] = "SwitchCases/"; - CompletionSource2["ObjectLiteralMemberWithComma"] = "ObjectLiteralMemberWithComma/"; - return CompletionSource2; - })(CompletionSource || {}); - SymbolOriginInfoKind = /* @__PURE__ */ ((SymbolOriginInfoKind2) => { - SymbolOriginInfoKind2[SymbolOriginInfoKind2["ThisType"] = 1] = "ThisType"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["SymbolMember"] = 2] = "SymbolMember"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["Export"] = 4] = "Export"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["Promise"] = 8] = "Promise"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["Nullable"] = 16] = "Nullable"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["ResolvedExport"] = 32] = "ResolvedExport"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["TypeOnlyAlias"] = 64] = "TypeOnlyAlias"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["ObjectLiteralMethod"] = 128] = "ObjectLiteralMethod"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["Ignore"] = 256] = "Ignore"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["ComputedPropertyName"] = 512] = "ComputedPropertyName"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["SymbolMemberNoExport"] = 2 /* SymbolMember */] = "SymbolMemberNoExport"; - SymbolOriginInfoKind2[SymbolOriginInfoKind2["SymbolMemberExport"] = 6] = "SymbolMemberExport"; - return SymbolOriginInfoKind2; - })(SymbolOriginInfoKind || {}); - CompletionKind = /* @__PURE__ */ ((CompletionKind2) => { - CompletionKind2[CompletionKind2["ObjectPropertyDeclaration"] = 0] = "ObjectPropertyDeclaration"; - CompletionKind2[CompletionKind2["Global"] = 1] = "Global"; - CompletionKind2[CompletionKind2["PropertyAccess"] = 2] = "PropertyAccess"; - CompletionKind2[CompletionKind2["MemberLike"] = 3] = "MemberLike"; - CompletionKind2[CompletionKind2["String"] = 4] = "String"; - CompletionKind2[CompletionKind2["None"] = 5] = "None"; - return CompletionKind2; - })(CompletionKind || {}); - _keywordCompletions = []; - allKeywordsCompletions = memoize(() => { - const res = []; - for (let i = 83 /* FirstKeyword */; i <= 165 /* LastKeyword */; i++) { - res.push({ - name: tokenToString(i), - kind: "keyword" /* keyword */, - kindModifiers: "" /* none */, - sortText: SortText.GlobalsOrKeywords - }); - } - return res; - }); - } - }); - - // src/services/stringCompletions.ts - function createNameAndKindSet() { - const map2 = /* @__PURE__ */ new Map(); - function add(value) { - const existing = map2.get(value.name); - if (!existing || kindPrecedence[existing.kind] < kindPrecedence[value.kind]) { - map2.set(value.name, value); - } - } - return { - add, - has: map2.has.bind(map2), - values: map2.values.bind(map2) - }; - } - function getStringLiteralCompletions(sourceFile, position, contextToken, options, host, program, log, preferences, includeSymbol) { - if (isInReferenceComment(sourceFile, position)) { - const entries = getTripleSlashReferenceCompletion(sourceFile, position, options, host); - return entries && convertPathCompletions(entries); - } - if (isInString(sourceFile, position, contextToken)) { - if (!contextToken || !isStringLiteralLike(contextToken)) - return void 0; - const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program.getTypeChecker(), options, host, preferences); - return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position, includeSymbol); - } - } - function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position, includeSymbol) { - if (completion === void 0) { - return void 0; - } - const optionalReplacementSpan = createTextSpanFromStringLiteralLikeContent(contextToken); - switch (completion.kind) { - case 0 /* Paths */: - return convertPathCompletions(completion.paths); - case 1 /* Properties */: { - const entries = createSortedArray(); - getCompletionEntriesFromSymbols( - completion.symbols, - entries, - contextToken, - contextToken, - sourceFile, - position, - sourceFile, - host, - program, - 99 /* ESNext */, - log, - 4 /* String */, - preferences, - options, - /*formatContext*/ - void 0, - /*isTypeOnlyLocation*/ - void 0, - /*propertyAccessToConvert*/ - void 0, - /*jsxIdentifierExpected*/ - void 0, - /*isJsxInitializer*/ - void 0, - /*importStatementCompletion*/ - void 0, - /*recommendedCompletion*/ - void 0, - /*symbolToOriginInfoMap*/ - void 0, - /*symbolToSortTextMap*/ - void 0, - /*isJsxIdentifierExpected*/ - void 0, - /*isRightOfOpenTag*/ - void 0, - includeSymbol - ); - return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan, entries }; - } - case 2 /* Types */: { - const entries = completion.types.map((type) => ({ - name: type.value, - kindModifiers: "" /* none */, - kind: "string" /* string */, - sortText: SortText.LocationPriority, - replacementSpan: getReplacementSpanForContextToken(contextToken) - })); - return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: completion.isNewIdentifier, optionalReplacementSpan, entries }; - } - default: - return Debug.assertNever(completion); - } - } - function getStringLiteralCompletionDetails(name, sourceFile, position, contextToken, checker, options, host, cancellationToken, preferences) { - if (!contextToken || !isStringLiteralLike(contextToken)) - return void 0; - const completions = getStringLiteralCompletionEntries(sourceFile, contextToken, position, checker, options, host, preferences); - return completions && stringLiteralCompletionDetails(name, contextToken, completions, sourceFile, checker, cancellationToken); - } - function stringLiteralCompletionDetails(name, location, completion, sourceFile, checker, cancellationToken) { - switch (completion.kind) { - case 0 /* Paths */: { - const match = find(completion.paths, (p) => p.name === name); - return match && createCompletionDetails(name, kindModifiersFromExtension(match.extension), match.kind, [textPart(name)]); - } - case 1 /* Properties */: { - const match = find(completion.symbols, (s) => s.name === name); - return match && createCompletionDetailsForSymbol(match, match.name, checker, sourceFile, location, cancellationToken); - } - case 2 /* Types */: - return find(completion.types, (t) => t.value === name) ? createCompletionDetails(name, "" /* none */, "string" /* string */, [textPart(name)]) : void 0; - default: - return Debug.assertNever(completion); - } - } - function convertPathCompletions(pathCompletions) { - const isGlobalCompletion = false; - const isNewIdentifierLocation = true; - const entries = pathCompletions.map(({ name, kind, span, extension }) => ({ name, kind, kindModifiers: kindModifiersFromExtension(extension), sortText: SortText.LocationPriority, replacementSpan: span })); - return { isGlobalCompletion, isMemberCompletion: false, isNewIdentifierLocation, entries }; - } - function kindModifiersFromExtension(extension) { - switch (extension) { - case ".d.ts" /* Dts */: - return ".d.ts" /* dtsModifier */; - case ".js" /* Js */: - return ".js" /* jsModifier */; - case ".json" /* Json */: - return ".json" /* jsonModifier */; - case ".jsx" /* Jsx */: - return ".jsx" /* jsxModifier */; - case ".ts" /* Ts */: - return ".ts" /* tsModifier */; - case ".tsx" /* Tsx */: - return ".tsx" /* tsxModifier */; - case ".d.mts" /* Dmts */: - return ".d.mts" /* dmtsModifier */; - case ".mjs" /* Mjs */: - return ".mjs" /* mjsModifier */; - case ".mts" /* Mts */: - return ".mts" /* mtsModifier */; - case ".d.cts" /* Dcts */: - return ".d.cts" /* dctsModifier */; - case ".cjs" /* Cjs */: - return ".cjs" /* cjsModifier */; - case ".cts" /* Cts */: - return ".cts" /* ctsModifier */; - case ".tsbuildinfo" /* TsBuildInfo */: - return Debug.fail(`Extension ${".tsbuildinfo" /* TsBuildInfo */} is unsupported.`); - case void 0: - return "" /* none */; - default: - return Debug.assertNever(extension); - } - } - function getStringLiteralCompletionEntries(sourceFile, node, position, typeChecker, compilerOptions, host, preferences) { - const parent2 = walkUpParentheses(node.parent); - switch (parent2.kind) { - case 201 /* LiteralType */: { - const grandParent = walkUpParentheses(parent2.parent); - if (grandParent.kind === 205 /* ImportType */) { - return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - } - return fromUnionableLiteralType(grandParent); - } - case 303 /* PropertyAssignment */: - if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) { - return stringLiteralCompletionsForObjectLiteral(typeChecker, parent2.parent); - } - return fromContextualType() || fromContextualType(0 /* None */); - case 212 /* ElementAccessExpression */: { - const { expression, argumentExpression } = parent2; - if (node === skipParentheses(argumentExpression)) { - return stringLiteralCompletionsFromProperties(typeChecker.getTypeAtLocation(expression)); - } - return void 0; - } - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 291 /* JsxAttribute */: - if (!isRequireCallArgument(node) && !isImportCall(parent2)) { - const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); - return argumentInfo && (getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker, 0 /* Normal */)) || fromContextualType(0 /* None */); - } - case 272 /* ImportDeclaration */: - case 278 /* ExportDeclaration */: - case 283 /* ExternalModuleReference */: - return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) }; - case 296 /* CaseClause */: - const tracker = newCaseClauseTracker(typeChecker, parent2.parent.clauses); - const contextualTypes = fromContextualType(); - if (!contextualTypes) { - return; - } - const literals = contextualTypes.types.filter((literal) => !tracker.hasValue(literal.value)); - return { kind: 2 /* Types */, types: literals, isNewIdentifier: false }; - default: - return fromContextualType() || fromContextualType(0 /* None */); - } - function fromUnionableLiteralType(grandParent) { - switch (grandParent.kind) { - case 233 /* ExpressionWithTypeArguments */: - case 183 /* TypeReference */: { - const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent); - if (typeArgument) { - return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; - } - return void 0; - } - case 199 /* IndexedAccessType */: - const { indexType, objectType } = grandParent; - if (!rangeContainsPosition(indexType, position)) { - return void 0; - } - return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType)); - case 192 /* UnionType */: { - const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent)); - if (!result) { - return void 0; - } - const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(grandParent, parent2); - if (result.kind === 1 /* Properties */) { - return { kind: 1 /* Properties */, symbols: result.symbols.filter((sym) => !contains(alreadyUsedTypes, sym.name)), hasIndexSignature: result.hasIndexSignature }; - } - return { kind: 2 /* Types */, types: result.types.filter((t) => !contains(alreadyUsedTypes, t.value)), isNewIdentifier: false }; - } - default: - return void 0; - } - } - function fromContextualType(contextFlags = 4 /* Completions */) { - const types = getStringLiteralTypes(getContextualTypeFromParent(node, typeChecker, contextFlags)); - if (!types.length) { - return; - } - return { kind: 2 /* Types */, types, isNewIdentifier: false }; - } - } - function walkUpParentheses(node) { - switch (node.kind) { - case 196 /* ParenthesizedType */: - return walkUpParenthesizedTypes(node); - case 217 /* ParenthesizedExpression */: - return walkUpParenthesizedExpressions(node); - default: - return node; - } - } - function getAlreadyUsedTypesInStringLiteralUnion(union, current) { - return mapDefined(union.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : void 0); - } - function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) { - let isNewIdentifier = false; - const uniques = /* @__PURE__ */ new Map(); - const candidates = []; - const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg; - checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates, checkMode); - const types = flatMap(candidates, (candidate) => { - if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) - return; - let type = candidate.getTypeParameterAtPosition(argumentInfo.argumentIndex); - if (isJsxOpeningLikeElement(call)) { - const propType = checker.getTypeOfPropertyOfType(type, getTextOfJsxAttributeName(editingArgument.name)); - if (propType) { - type = propType; - } - } - isNewIdentifier = isNewIdentifier || !!(type.flags & 4 /* String */); - return getStringLiteralTypes(type, uniques); - }); - return length(types) ? { kind: 2 /* Types */, types, isNewIdentifier } : void 0; - } - function stringLiteralCompletionsFromProperties(type) { - return type && { - kind: 1 /* Properties */, - symbols: filter(type.getApparentProperties(), (prop) => !(prop.valueDeclaration && isPrivateIdentifierClassElementDeclaration(prop.valueDeclaration))), - hasIndexSignature: hasIndexSignature(type) - }; - } - function stringLiteralCompletionsForObjectLiteral(checker, objectLiteralExpression) { - const contextualType = checker.getContextualType(objectLiteralExpression); - if (!contextualType) - return void 0; - const completionsType = checker.getContextualType(objectLiteralExpression, 4 /* Completions */); - const symbols = getPropertiesForObjectExpression( - contextualType, - completionsType, - objectLiteralExpression, - checker - ); - return { - kind: 1 /* Properties */, - symbols, - hasIndexSignature: hasIndexSignature(contextualType) - }; - } - function getStringLiteralTypes(type, uniques = /* @__PURE__ */ new Map()) { - if (!type) - return emptyArray; - type = skipConstraint(type); - return type.isUnion() ? flatMap(type.types, (t) => getStringLiteralTypes(t, uniques)) : type.isStringLiteral() && !(type.flags & 1024 /* EnumLiteral */) && addToSeen(uniques, type.value) ? [type] : emptyArray; - } - function nameAndKind(name, kind, extension) { - return { name, kind, extension }; - } - function directoryResult(name) { - return nameAndKind( - name, - "directory" /* directory */, - /*extension*/ - void 0 - ); - } - function addReplacementSpans(text, textStart, names) { - const span = getDirectoryFragmentTextSpan(text, textStart); - const wholeSpan = text.length === 0 ? void 0 : createTextSpan(textStart, text.length); - return names.map(({ name, kind, extension }) => Math.max(name.indexOf(directorySeparator), name.indexOf(altDirectorySeparator)) !== -1 ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span }); - } - function getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) { - return addReplacementSpans(node.text, node.getStart(sourceFile) + 1, getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, compilerOptions, host, typeChecker, preferences)); - } - function getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, compilerOptions, host, typeChecker, preferences) { - const literalValue = normalizeSlashes(node.text); - const mode = isStringLiteralLike(node) ? getModeForUsageLocation(sourceFile, node) : void 0; - const scriptPath = sourceFile.path; - const scriptDirectory = getDirectoryPath(scriptPath); - const extensionOptions = getExtensionOptions(compilerOptions, 1 /* ModuleSpecifier */, sourceFile, typeChecker, preferences, mode); - return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && !compilerOptions.paths && (isRootedDiskPath(literalValue) || isUrl(literalValue)) ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, compilerOptions, host, scriptPath, extensionOptions) : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, compilerOptions, host, extensionOptions, typeChecker); - } - function getExtensionOptions(compilerOptions, referenceKind, importingSourceFile, typeChecker, preferences, resolutionMode) { - return { - extensionsToSearch: flatten(getSupportedExtensionsForModuleResolution(compilerOptions, typeChecker)), - referenceKind, - importingSourceFile, - endingPreference: preferences == null ? void 0 : preferences.importModuleSpecifierEnding, - resolutionMode - }; - } - function getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, compilerOptions, host, scriptPath, extensionOptions) { - if (compilerOptions.rootDirs) { - return getCompletionEntriesForDirectoryFragmentWithRootDirs( - compilerOptions.rootDirs, - literalValue, - scriptDirectory, - extensionOptions, - compilerOptions, - host, - scriptPath - ); - } else { - return arrayFrom(getCompletionEntriesForDirectoryFragment( - literalValue, - scriptDirectory, - extensionOptions, - host, - /*moduleSpecifierIsRelative*/ - true, - scriptPath - ).values()); - } - } - function getSupportedExtensionsForModuleResolution(compilerOptions, typeChecker) { - const ambientModulesExtensions = !typeChecker ? [] : mapDefined( - typeChecker.getAmbientModules(), - (module2) => { - const name = module2.name.slice(1, -1); - if (!name.startsWith("*.") || name.includes("/")) - return; - return name.slice(1); - } - ); - const extensions = [...getSupportedExtensions(compilerOptions), ambientModulesExtensions]; - const moduleResolution = getEmitModuleResolutionKind(compilerOptions); - return moduleResolutionUsesNodeModules(moduleResolution) ? getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, extensions) : extensions; - } - function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase) { - rootDirs = rootDirs.map((rootDirectory) => normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory))); - const relativeDirectory = firstDefined(rootDirs, (rootDirectory) => containsPath(rootDirectory, scriptDirectory, basePath, ignoreCase) ? scriptDirectory.substr(rootDirectory.length) : void 0); - return deduplicate( - [...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory], - equateStringsCaseSensitive, - compareStringsCaseSensitive - ); - } - function getCompletionEntriesForDirectoryFragmentWithRootDirs(rootDirs, fragment, scriptDirectory, extensionOptions, compilerOptions, host, exclude) { - const basePath = compilerOptions.project || host.getCurrentDirectory(); - const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); - const baseDirectories = getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase); - return flatMap(baseDirectories, (baseDirectory) => arrayFrom(getCompletionEntriesForDirectoryFragment( - fragment, - baseDirectory, - extensionOptions, - host, - /*moduleSpecifierIsRelative*/ - true, - exclude - ).values())); - } - function getCompletionEntriesForDirectoryFragment(fragment, scriptDirectory, extensionOptions, host, moduleSpecifierIsRelative, exclude, result = createNameAndKindSet()) { - var _a; - if (fragment === void 0) { - fragment = ""; - } - fragment = normalizeSlashes(fragment); - if (!hasTrailingDirectorySeparator(fragment)) { - fragment = getDirectoryPath(fragment); - } - if (fragment === "") { - fragment = "." + directorySeparator; - } - fragment = ensureTrailingDirectorySeparator(fragment); - const absolutePath = resolvePath(scriptDirectory, fragment); - const baseDirectory = hasTrailingDirectorySeparator(absolutePath) ? absolutePath : getDirectoryPath(absolutePath); - if (!moduleSpecifierIsRelative) { - const packageJsonPath = findPackageJson(baseDirectory, host); - if (packageJsonPath) { - const packageJson = readJson(packageJsonPath, host); - const typesVersions = packageJson.typesVersions; - if (typeof typesVersions === "object") { - const versionPaths = (_a = getPackageJsonTypesVersionsPaths(typesVersions)) == null ? void 0 : _a.paths; - if (versionPaths) { - const packageDirectory = getDirectoryPath(packageJsonPath); - const pathInPackage = absolutePath.slice(ensureTrailingDirectorySeparator(packageDirectory).length); - if (addCompletionEntriesFromPaths(result, pathInPackage, packageDirectory, extensionOptions, host, versionPaths)) { - return result; - } - } - } - } - } - const ignoreCase = !(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); - if (!tryDirectoryExists(host, baseDirectory)) - return result; - const files = tryReadDirectory( - host, - baseDirectory, - extensionOptions.extensionsToSearch, - /*exclude*/ - void 0, - /*include*/ - ["./*"] - ); - if (files) { - for (let filePath of files) { - filePath = normalizePath(filePath); - if (exclude && comparePaths(filePath, exclude, scriptDirectory, ignoreCase) === 0 /* EqualTo */) { - continue; - } - const { name, extension } = getFilenameWithExtensionOption(getBaseFileName(filePath), host.getCompilationSettings(), extensionOptions); - result.add(nameAndKind(name, "script" /* scriptElement */, extension)); - } - } - const directories = tryGetDirectories(host, baseDirectory); - if (directories) { - for (const directory of directories) { - const directoryName = getBaseFileName(normalizePath(directory)); - if (directoryName !== "@types") { - result.add(directoryResult(directoryName)); - } - } - } - return result; - } - function getFilenameWithExtensionOption(name, compilerOptions, extensionOptions) { - const nonJsResult = ts_moduleSpecifiers_exports.tryGetRealFileNameForNonJsDeclarationFileName(name); - if (nonJsResult) { - return { name: nonJsResult, extension: tryGetExtensionFromPath2(nonJsResult) }; - } - if (extensionOptions.referenceKind === 0 /* Filename */) { - return { name, extension: tryGetExtensionFromPath2(name) }; - } - const endingPreference = getModuleSpecifierEndingPreference(extensionOptions.endingPreference, extensionOptions.resolutionMode, compilerOptions, extensionOptions.importingSourceFile); - if (endingPreference === 3 /* TsExtension */) { - if (fileExtensionIsOneOf(name, supportedTSImplementationExtensions)) { - return { name, extension: tryGetExtensionFromPath2(name) }; - } - const outputExtension2 = ts_moduleSpecifiers_exports.tryGetJSExtensionForFile(name, compilerOptions); - return outputExtension2 ? { name: changeExtension(name, outputExtension2), extension: outputExtension2 } : { name, extension: tryGetExtensionFromPath2(name) }; - } - if ((endingPreference === 0 /* Minimal */ || endingPreference === 1 /* Index */) && fileExtensionIsOneOf(name, [".js" /* Js */, ".jsx" /* Jsx */, ".ts" /* Ts */, ".tsx" /* Tsx */, ".d.ts" /* Dts */])) { - return { name: removeFileExtension(name), extension: tryGetExtensionFromPath2(name) }; - } - const outputExtension = ts_moduleSpecifiers_exports.tryGetJSExtensionForFile(name, compilerOptions); - return outputExtension ? { name: changeExtension(name, outputExtension), extension: outputExtension } : { name, extension: tryGetExtensionFromPath2(name) }; - } - function addCompletionEntriesFromPaths(result, fragment, baseDirectory, extensionOptions, host, paths) { - const getPatternsForKey = (key) => paths[key]; - const comparePaths2 = (a, b) => { - const patternA = tryParsePattern(a); - const patternB = tryParsePattern(b); - const lengthA = typeof patternA === "object" ? patternA.prefix.length : a.length; - const lengthB = typeof patternB === "object" ? patternB.prefix.length : b.length; - return compareValues(lengthB, lengthA); - }; - return addCompletionEntriesFromPathsOrExports(result, fragment, baseDirectory, extensionOptions, host, getOwnKeys(paths), getPatternsForKey, comparePaths2); - } - function addCompletionEntriesFromPathsOrExports(result, fragment, baseDirectory, extensionOptions, host, keys, getPatternsForKey, comparePaths2) { - let pathResults = []; - let matchedPath; - for (const key of keys) { - if (key === ".") - continue; - const keyWithoutLeadingDotSlash = key.replace(/^\.\//, ""); - const patterns = getPatternsForKey(key); - if (patterns) { - const pathPattern = tryParsePattern(keyWithoutLeadingDotSlash); - if (!pathPattern) - continue; - const isMatch = typeof pathPattern === "object" && isPatternMatch(pathPattern, fragment); - const isLongestMatch = isMatch && (matchedPath === void 0 || comparePaths2(key, matchedPath) === -1 /* LessThan */); - if (isLongestMatch) { - matchedPath = key; - pathResults = pathResults.filter((r) => !r.matchedPattern); - } - if (typeof pathPattern === "string" || matchedPath === void 0 || comparePaths2(key, matchedPath) !== 1 /* GreaterThan */) { - pathResults.push({ - matchedPattern: isMatch, - results: getCompletionsForPathMapping(keyWithoutLeadingDotSlash, patterns, fragment, baseDirectory, extensionOptions, host).map(({ name, kind, extension }) => nameAndKind(name, kind, extension)) - }); - } - } - } - pathResults.forEach((pathResult) => pathResult.results.forEach((r) => result.add(r))); - return matchedPath !== void 0; - } - function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, compilerOptions, host, extensionOptions, typeChecker) { - const { baseUrl, paths } = compilerOptions; - const result = createNameAndKindSet(); - const moduleResolution = getEmitModuleResolutionKind(compilerOptions); - if (baseUrl) { - const absolute = normalizePath(combinePaths(host.getCurrentDirectory(), baseUrl)); - getCompletionEntriesForDirectoryFragment( - fragment, - absolute, - extensionOptions, - host, - /*moduleSpecifierIsRelative*/ - false, - /*exclude*/ - void 0, - result - ); - } - if (paths) { - const absolute = getPathsBasePath(compilerOptions, host); - addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, host, paths); - } - const fragmentDirectory = getFragmentDirectory(fragment); - for (const ambientName of getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker)) { - result.add(nameAndKind( - ambientName, - "external module name" /* externalModuleName */, - /*extension*/ - void 0 - )); - } - getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); - if (moduleResolutionUsesNodeModules(moduleResolution)) { - let foundGlobal = false; - if (fragmentDirectory === void 0) { - for (const moduleName of enumerateNodeModulesVisibleToScript(host, scriptPath)) { - const moduleResult = nameAndKind( - moduleName, - "external module name" /* externalModuleName */, - /*extension*/ - void 0 - ); - if (!result.has(moduleResult.name)) { - foundGlobal = true; - result.add(moduleResult); - } - } - } - if (!foundGlobal) { - let ancestorLookup = (ancestor) => { - const nodeModules = combinePaths(ancestor, "node_modules"); - if (tryDirectoryExists(host, nodeModules)) { - getCompletionEntriesForDirectoryFragment( - fragment, - nodeModules, - extensionOptions, - host, - /*moduleSpecifierIsRelative*/ - false, - /*exclude*/ - void 0, - result - ); - } - }; - if (fragmentDirectory && getResolvePackageJsonExports(compilerOptions)) { - const nodeModulesDirectoryLookup = ancestorLookup; - ancestorLookup = (ancestor) => { - const components = getPathComponents(fragment); - components.shift(); - let packagePath = components.shift(); - if (!packagePath) { - return nodeModulesDirectoryLookup(ancestor); - } - if (startsWith(packagePath, "@")) { - const subName = components.shift(); - if (!subName) { - return nodeModulesDirectoryLookup(ancestor); - } - packagePath = combinePaths(packagePath, subName); - } - const packageDirectory = combinePaths(ancestor, "node_modules", packagePath); - const packageFile = combinePaths(packageDirectory, "package.json"); - if (tryFileExists(host, packageFile)) { - const packageJson = readJson(packageFile, host); - const exports = packageJson.exports; - if (exports) { - if (typeof exports !== "object" || exports === null) { - return; - } - const keys = getOwnKeys(exports); - const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); - const conditions = getConditions(compilerOptions, mode === 99 /* ESNext */); - addCompletionEntriesFromPathsOrExports( - result, - fragmentSubpath, - packageDirectory, - extensionOptions, - host, - keys, - (key) => singleElementArray(getPatternFromFirstMatchingCondition(exports[key], conditions)), - comparePatternKeys - ); - return; - } - } - return nodeModulesDirectoryLookup(ancestor); - }; - } - forEachAncestorDirectory(scriptPath, ancestorLookup); - } - } - return arrayFrom(result.values()); - } - function getPatternFromFirstMatchingCondition(target, conditions) { - if (typeof target === "string") { - return target; - } - if (target && typeof target === "object" && !isArray(target)) { - for (const condition in target) { - if (condition === "default" || conditions.indexOf(condition) > -1 || isApplicableVersionedTypesKey(conditions, condition)) { - const pattern = target[condition]; - return getPatternFromFirstMatchingCondition(pattern, conditions); - } - } - } - } - function getFragmentDirectory(fragment) { - return containsSlash(fragment) ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0; - } - function getCompletionsForPathMapping(path, patterns, fragment, packageDirectory, extensionOptions, host) { - if (!endsWith(path, "*")) { - return !stringContains(path, "*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray; - } - const pathPrefix = path.slice(0, path.length - 1); - const remainingFragment = tryRemovePrefix(fragment, pathPrefix); - if (remainingFragment === void 0) { - const starIsFullPathComponent = path[path.length - 2] === "/"; - return starIsFullPathComponent ? justPathMappingName(pathPrefix, "directory" /* directory */) : flatMap(patterns, (pattern) => { - var _a; - return (_a = getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, host)) == null ? void 0 : _a.map(({ name, ...rest }) => ({ name: pathPrefix + name, ...rest })); - }); - } - return flatMap(patterns, (pattern) => getModulesForPathsPattern(remainingFragment, packageDirectory, pattern, extensionOptions, host)); - function justPathMappingName(name, kind) { - return startsWith(name, fragment) ? [{ name: removeTrailingDirectorySeparator(name), kind, extension: void 0 }] : emptyArray; - } - } - function getModulesForPathsPattern(fragment, packageDirectory, pattern, extensionOptions, host) { - if (!host.readDirectory) { - return void 0; - } - const parsed = tryParsePattern(pattern); - if (parsed === void 0 || isString(parsed)) { - return void 0; - } - const normalizedPrefix = resolvePath(parsed.prefix); - const normalizedPrefixDirectory = hasTrailingDirectorySeparator(parsed.prefix) ? normalizedPrefix : getDirectoryPath(normalizedPrefix); - const normalizedPrefixBase = hasTrailingDirectorySeparator(parsed.prefix) ? "" : getBaseFileName(normalizedPrefix); - const fragmentHasPath = containsSlash(fragment); - const fragmentDirectory = fragmentHasPath ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0; - const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory; - const normalizedSuffix = normalizePath(parsed.suffix); - const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix); - const matchingSuffixes = declarationExtension ? [changeExtension(normalizedSuffix, declarationExtension), normalizedSuffix] : [normalizedSuffix]; - const baseDirectory = normalizePath(combinePaths(packageDirectory, expandedPrefixDirectory)); - const completePrefix = fragmentHasPath ? baseDirectory : ensureTrailingDirectorySeparator(baseDirectory) + normalizedPrefixBase; - const includeGlobs = normalizedSuffix ? matchingSuffixes.map((suffix) => "**/*" + suffix) : ["./*"]; - const matches = mapDefined(tryReadDirectory( - host, - baseDirectory, - extensionOptions.extensionsToSearch, - /*exclude*/ - void 0, - includeGlobs - ), (match) => { - const trimmedWithPattern = trimPrefixAndSuffix(match); - if (trimmedWithPattern) { - if (containsSlash(trimmedWithPattern)) { - return directoryResult(getPathComponents(removeLeadingDirectorySeparator(trimmedWithPattern))[1]); - } - const { name, extension } = getFilenameWithExtensionOption(trimmedWithPattern, host.getCompilationSettings(), extensionOptions); - return nameAndKind(name, "script" /* scriptElement */, extension); - } - }); - const directories = normalizedSuffix ? emptyArray : mapDefined(tryGetDirectories(host, baseDirectory), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir)); - return [...matches, ...directories]; - function trimPrefixAndSuffix(path) { - return firstDefined(matchingSuffixes, (suffix) => { - const inner = withoutStartAndEnd(normalizePath(path), completePrefix, suffix); - return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner); - }); - } - } - function withoutStartAndEnd(s, start, end) { - return startsWith(s, start) && endsWith(s, end) ? s.slice(start.length, s.length - end.length) : void 0; - } - function removeLeadingDirectorySeparator(path) { - return path[0] === directorySeparator ? path.slice(1) : path; - } - function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) { - const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name)); - const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0); - if (fragmentDirectory !== void 0) { - const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory); - return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator)); - } - return nonRelativeModuleNames; - } - function getTripleSlashReferenceCompletion(sourceFile, position, compilerOptions, host) { - const token = getTokenAtPosition(sourceFile, position); - const commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos); - const range = commentRanges && find(commentRanges, (commentRange) => position >= commentRange.pos && position <= commentRange.end); - if (!range) { - return void 0; - } - const text = sourceFile.text.slice(range.pos, position); - const match = tripleSlashDirectiveFragmentRegex.exec(text); - if (!match) { - return void 0; - } - const [, prefix, kind, toComplete] = match; - const scriptPath = getDirectoryPath(sourceFile.path); - const names = kind === "path" ? getCompletionEntriesForDirectoryFragment( - toComplete, - scriptPath, - getExtensionOptions(compilerOptions, 0 /* Filename */, sourceFile), - host, - /*moduleSpecifierIsRelative*/ - true, - sourceFile.path - ) : kind === "types" ? getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, getFragmentDirectory(toComplete), getExtensionOptions(compilerOptions, 1 /* ModuleSpecifier */, sourceFile)) : Debug.fail(); - return addReplacementSpans(toComplete, range.pos + prefix.length, arrayFrom(names.values())); - } - function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result = createNameAndKindSet()) { - const seen = /* @__PURE__ */ new Map(); - const typeRoots = tryAndIgnoreErrors(() => getEffectiveTypeRoots(options, host)) || emptyArray; - for (const root of typeRoots) { - getCompletionEntriesFromDirectories(root); - } - for (const packageJson of findPackageJsons(scriptPath, host)) { - const typesDir = combinePaths(getDirectoryPath(packageJson), "node_modules/@types"); - getCompletionEntriesFromDirectories(typesDir); - } - return result; - function getCompletionEntriesFromDirectories(directory) { - if (!tryDirectoryExists(host, directory)) - return; - for (const typeDirectoryName of tryGetDirectories(host, directory)) { - const packageName = unmangleScopedPackageName(typeDirectoryName); - if (options.types && !contains(options.types, packageName)) - continue; - if (fragmentDirectory === void 0) { - if (!seen.has(packageName)) { - result.add(nameAndKind( - packageName, - "external module name" /* externalModuleName */, - /*extension*/ - void 0 - )); - seen.set(packageName, true); - } - } else { - const baseDirectory = combinePaths(directory, typeDirectoryName); - const remainingFragment = tryRemoveDirectoryPrefix(fragmentDirectory, packageName, hostGetCanonicalFileName(host)); - if (remainingFragment !== void 0) { - getCompletionEntriesForDirectoryFragment( - remainingFragment, - baseDirectory, - extensionOptions, - host, - /*moduleSpecifierIsRelative*/ - false, - /*exclude*/ - void 0, - result - ); - } - } - } - } - } - function enumerateNodeModulesVisibleToScript(host, scriptPath) { - if (!host.readFile || !host.fileExists) - return emptyArray; - const result = []; - for (const packageJson of findPackageJsons(scriptPath, host)) { - const contents = readJson(packageJson, host); - for (const key of nodeModulesDependencyKeys) { - const dependencies = contents[key]; - if (!dependencies) - continue; - for (const dep in dependencies) { - if (hasProperty(dependencies, dep) && !startsWith(dep, "@types/")) { - result.push(dep); - } - } - } - } - return result; - } - function getDirectoryFragmentTextSpan(text, textStart) { - const index = Math.max(text.lastIndexOf(directorySeparator), text.lastIndexOf(altDirectorySeparator)); - const offset = index !== -1 ? index + 1 : 0; - const length2 = text.length - offset; - return length2 === 0 || isIdentifierText(text.substr(offset, length2), 99 /* ESNext */) ? void 0 : createTextSpan(textStart + offset, length2); - } - function isPathRelativeToScript(path) { - if (path && path.length >= 2 && path.charCodeAt(0) === 46 /* dot */) { - const slashIndex = path.length >= 3 && path.charCodeAt(1) === 46 /* dot */ ? 2 : 1; - const slashCharCode = path.charCodeAt(slashIndex); - return slashCharCode === 47 /* slash */ || slashCharCode === 92 /* backslash */; - } - return false; - } - function containsSlash(fragment) { - return stringContains(fragment, directorySeparator); - } - function isRequireCallArgument(node) { - return isCallExpression(node.parent) && firstOrUndefined(node.parent.arguments) === node && isIdentifier(node.parent.expression) && node.parent.expression.escapedText === "require"; - } - var kindPrecedence, tripleSlashDirectiveFragmentRegex, nodeModulesDependencyKeys; - var init_stringCompletions = __esm({ - "src/services/stringCompletions.ts"() { - "use strict"; - init_ts4(); - init_ts_Completions(); - kindPrecedence = { - ["directory" /* directory */]: 0, - ["script" /* scriptElement */]: 1, - ["external module name" /* externalModuleName */]: 2 - }; - tripleSlashDirectiveFragmentRegex = /^(\/\/\/\s* getStringLiteralCompletionDetails, - getStringLiteralCompletions: () => getStringLiteralCompletions - }); - var init_ts_Completions_StringCompletions = __esm({ - "src/services/_namespaces/ts.Completions.StringCompletions.ts"() { - "use strict"; - init_stringCompletions(); - } - }); - - // src/services/_namespaces/ts.Completions.ts - var ts_Completions_exports = {}; - __export(ts_Completions_exports, { - CompletionKind: () => CompletionKind, - CompletionSource: () => CompletionSource, - SortText: () => SortText, - StringCompletions: () => ts_Completions_StringCompletions_exports, - SymbolOriginInfoKind: () => SymbolOriginInfoKind, - createCompletionDetails: () => createCompletionDetails, - createCompletionDetailsForSymbol: () => createCompletionDetailsForSymbol, - getCompletionEntriesFromSymbols: () => getCompletionEntriesFromSymbols, - getCompletionEntryDetails: () => getCompletionEntryDetails, - getCompletionEntrySymbol: () => getCompletionEntrySymbol, - getCompletionsAtPosition: () => getCompletionsAtPosition, - getPropertiesForObjectExpression: () => getPropertiesForObjectExpression, - moduleSpecifierResolutionCacheAttemptLimit: () => moduleSpecifierResolutionCacheAttemptLimit, - moduleSpecifierResolutionLimit: () => moduleSpecifierResolutionLimit - }); - var init_ts_Completions = __esm({ - "src/services/_namespaces/ts.Completions.ts"() { - "use strict"; - init_completions(); - init_ts_Completions_StringCompletions(); - } - }); - - // src/services/importTracker.ts - function createImportTracker(sourceFiles, sourceFilesSet, checker, cancellationToken) { - const allDirectImports = getDirectImportsMap(sourceFiles, checker, cancellationToken); - return (exportSymbol, exportInfo, isForRename) => { - const { directImports, indirectUsers } = getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, exportInfo, checker, cancellationToken); - return { indirectUsers, ...getSearchesFromDirectImports(directImports, exportSymbol, exportInfo.exportKind, checker, isForRename) }; - }; - } - function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, { exportingModuleSymbol, exportKind }, checker, cancellationToken) { - const markSeenDirectImport = nodeSeenTracker(); - const markSeenIndirectUser = nodeSeenTracker(); - const directImports = []; - const isAvailableThroughGlobal = !!exportingModuleSymbol.globalExports; - const indirectUserDeclarations = isAvailableThroughGlobal ? void 0 : []; - handleDirectImports(exportingModuleSymbol); - return { directImports, indirectUsers: getIndirectUsers() }; - function getIndirectUsers() { - if (isAvailableThroughGlobal) { - return sourceFiles; - } - if (exportingModuleSymbol.declarations) { - for (const decl of exportingModuleSymbol.declarations) { - if (isExternalModuleAugmentation(decl) && sourceFilesSet.has(decl.getSourceFile().fileName)) { - addIndirectUser(decl); - } - } - } - return indirectUserDeclarations.map(getSourceFileOfNode); - } - function handleDirectImports(exportingModuleSymbol2) { - const theseDirectImports = getDirectImports(exportingModuleSymbol2); - if (theseDirectImports) { - for (const direct of theseDirectImports) { - if (!markSeenDirectImport(direct)) { - continue; - } - if (cancellationToken) - cancellationToken.throwIfCancellationRequested(); - switch (direct.kind) { - case 213 /* CallExpression */: - if (isImportCall(direct)) { - handleImportCall(direct); - break; - } - if (!isAvailableThroughGlobal) { - const parent2 = direct.parent; - if (exportKind === 2 /* ExportEquals */ && parent2.kind === 260 /* VariableDeclaration */) { - const { name } = parent2; - if (name.kind === 80 /* Identifier */) { - directImports.push(name); - break; - } - } - } - break; - case 80 /* Identifier */: - break; - case 271 /* ImportEqualsDeclaration */: - handleNamespaceImport( - direct, - direct.name, - hasSyntacticModifier(direct, 1 /* Export */), - /*alreadyAddedDirect*/ - false - ); - break; - case 272 /* ImportDeclaration */: - directImports.push(direct); - const namedBindings = direct.importClause && direct.importClause.namedBindings; - if (namedBindings && namedBindings.kind === 274 /* NamespaceImport */) { - handleNamespaceImport( - direct, - namedBindings.name, - /*isReExport*/ - false, - /*alreadyAddedDirect*/ - true - ); - } else if (!isAvailableThroughGlobal && isDefaultImport(direct)) { - addIndirectUser(getSourceFileLikeForImportDeclaration(direct)); - } - break; - case 278 /* ExportDeclaration */: - if (!direct.exportClause) { - handleDirectImports(getContainingModuleSymbol(direct, checker)); - } else if (direct.exportClause.kind === 280 /* NamespaceExport */) { - addIndirectUser( - getSourceFileLikeForImportDeclaration(direct), - /*addTransitiveDependencies*/ - true - ); - } else { - directImports.push(direct); - } - break; - case 205 /* ImportType */: - if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) { - addIndirectUser( - direct.getSourceFile(), - /*addTransitiveDependencies*/ - true - ); - } - directImports.push(direct); - break; - default: - Debug.failBadSyntaxKind(direct, "Unexpected import kind."); - } - } - } - } - function handleImportCall(importCall) { - const top = findAncestor(importCall, isAmbientModuleDeclaration) || importCall.getSourceFile(); - addIndirectUser( - top, - /** addTransitiveDependencies */ - !!isExported2( - importCall, - /*stopAtAmbientModule*/ - true - ) - ); - } - function isExported2(node, stopAtAmbientModule = false) { - return findAncestor(node, (node2) => { - if (stopAtAmbientModule && isAmbientModuleDeclaration(node2)) - return "quit"; - return canHaveModifiers(node2) && some(node2.modifiers, isExportModifier); - }); - } - function handleNamespaceImport(importDeclaration, name, isReExport, alreadyAddedDirect) { - if (exportKind === 2 /* ExportEquals */) { - if (!alreadyAddedDirect) - directImports.push(importDeclaration); - } else if (!isAvailableThroughGlobal) { - const sourceFileLike = getSourceFileLikeForImportDeclaration(importDeclaration); - Debug.assert(sourceFileLike.kind === 312 /* SourceFile */ || sourceFileLike.kind === 267 /* ModuleDeclaration */); - if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) { - addIndirectUser( - sourceFileLike, - /*addTransitiveDependencies*/ - true - ); - } else { - addIndirectUser(sourceFileLike); - } - } - } - function addIndirectUser(sourceFileLike, addTransitiveDependencies = false) { - Debug.assert(!isAvailableThroughGlobal); - const isNew = markSeenIndirectUser(sourceFileLike); - if (!isNew) - return; - indirectUserDeclarations.push(sourceFileLike); - if (!addTransitiveDependencies) - return; - const moduleSymbol = checker.getMergedSymbol(sourceFileLike.symbol); - if (!moduleSymbol) - return; - Debug.assert(!!(moduleSymbol.flags & 1536 /* Module */)); - const directImports2 = getDirectImports(moduleSymbol); - if (directImports2) { - for (const directImport of directImports2) { - if (!isImportTypeNode(directImport)) { - addIndirectUser( - getSourceFileLikeForImportDeclaration(directImport), - /*addTransitiveDependencies*/ - true - ); - } - } - } - } - function getDirectImports(moduleSymbol) { - return allDirectImports.get(getSymbolId(moduleSymbol).toString()); - } - } - function getSearchesFromDirectImports(directImports, exportSymbol, exportKind, checker, isForRename) { - const importSearches = []; - const singleReferences = []; - function addSearch(location, symbol) { - importSearches.push([location, symbol]); - } - if (directImports) { - for (const decl of directImports) { - handleImport(decl); - } - } - return { importSearches, singleReferences }; - function handleImport(decl) { - if (decl.kind === 271 /* ImportEqualsDeclaration */) { - if (isExternalModuleImportEquals(decl)) { - handleNamespaceImportLike(decl.name); - } - return; - } - if (decl.kind === 80 /* Identifier */) { - handleNamespaceImportLike(decl); - return; - } - if (decl.kind === 205 /* ImportType */) { - if (decl.qualifier) { - const firstIdentifier = getFirstIdentifier(decl.qualifier); - if (firstIdentifier.escapedText === symbolName(exportSymbol)) { - singleReferences.push(firstIdentifier); - } - } else if (exportKind === 2 /* ExportEquals */) { - singleReferences.push(decl.argument.literal); - } - return; - } - if (decl.moduleSpecifier.kind !== 11 /* StringLiteral */) { - return; - } - if (decl.kind === 278 /* ExportDeclaration */) { - if (decl.exportClause && isNamedExports(decl.exportClause)) { - searchForNamedImport(decl.exportClause); - } - return; - } - const { name, namedBindings } = decl.importClause || { name: void 0, namedBindings: void 0 }; - if (namedBindings) { - switch (namedBindings.kind) { - case 274 /* NamespaceImport */: - handleNamespaceImportLike(namedBindings.name); - break; - case 275 /* NamedImports */: - if (exportKind === 0 /* Named */ || exportKind === 1 /* Default */) { - searchForNamedImport(namedBindings); - } - break; - default: - Debug.assertNever(namedBindings); - } - } - if (name && (exportKind === 1 /* Default */ || exportKind === 2 /* ExportEquals */) && (!isForRename || name.escapedText === symbolEscapedNameNoDefault(exportSymbol))) { - const defaultImportAlias = checker.getSymbolAtLocation(name); - addSearch(name, defaultImportAlias); - } - } - function handleNamespaceImportLike(importName) { - if (exportKind === 2 /* ExportEquals */ && (!isForRename || isNameMatch(importName.escapedText))) { - addSearch(importName, checker.getSymbolAtLocation(importName)); - } - } - function searchForNamedImport(namedBindings) { - if (!namedBindings) { - return; - } - for (const element of namedBindings.elements) { - const { name, propertyName } = element; - if (!isNameMatch((propertyName || name).escapedText)) { - continue; - } - if (propertyName) { - singleReferences.push(propertyName); - if (!isForRename || name.escapedText === exportSymbol.escapedName) { - addSearch(name, checker.getSymbolAtLocation(name)); - } - } else { - const localSymbol = element.kind === 281 /* ExportSpecifier */ && element.propertyName ? checker.getExportSpecifierLocalTargetSymbol(element) : checker.getSymbolAtLocation(name); - addSearch(name, localSymbol); - } - } - } - function isNameMatch(name) { - return name === exportSymbol.escapedName || exportKind !== 0 /* Named */ && name === "default" /* Default */; - } - } - function findNamespaceReExports(sourceFileLike, name, checker) { - const namespaceImportSymbol = checker.getSymbolAtLocation(name); - return !!forEachPossibleImportOrExportStatement(sourceFileLike, (statement) => { - if (!isExportDeclaration(statement)) - return; - const { exportClause, moduleSpecifier } = statement; - return !moduleSpecifier && exportClause && isNamedExports(exportClause) && exportClause.elements.some((element) => checker.getExportSpecifierLocalTargetSymbol(element) === namespaceImportSymbol); - }); - } - function findModuleReferences(program, sourceFiles, searchModuleSymbol) { - var _a; - const refs = []; - const checker = program.getTypeChecker(); - for (const referencingFile of sourceFiles) { - const searchSourceFile = searchModuleSymbol.valueDeclaration; - if ((searchSourceFile == null ? void 0 : searchSourceFile.kind) === 312 /* SourceFile */) { - for (const ref of referencingFile.referencedFiles) { - if (program.getSourceFileFromReference(referencingFile, ref) === searchSourceFile) { - refs.push({ kind: "reference", referencingFile, ref }); - } - } - for (const ref of referencingFile.typeReferenceDirectives) { - const referenced = (_a = program.getResolvedTypeReferenceDirectives().get(ref.fileName, ref.resolutionMode || referencingFile.impliedNodeFormat)) == null ? void 0 : _a.resolvedTypeReferenceDirective; - if (referenced !== void 0 && referenced.resolvedFileName === searchSourceFile.fileName) { - refs.push({ kind: "reference", referencingFile, ref }); - } - } - } - forEachImport(referencingFile, (importDecl, moduleSpecifier) => { - const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); - if (moduleSymbol === searchModuleSymbol) { - refs.push(nodeIsSynthesized(importDecl) ? { kind: "implicit", literal: moduleSpecifier, referencingFile } : { kind: "import", literal: moduleSpecifier }); - } - }); - } - return refs; - } - function getDirectImportsMap(sourceFiles, checker, cancellationToken) { - const map2 = /* @__PURE__ */ new Map(); - for (const sourceFile of sourceFiles) { - if (cancellationToken) - cancellationToken.throwIfCancellationRequested(); - forEachImport(sourceFile, (importDecl, moduleSpecifier) => { - const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier); - if (moduleSymbol) { - const id = getSymbolId(moduleSymbol).toString(); - let imports = map2.get(id); - if (!imports) { - map2.set(id, imports = []); - } - imports.push(importDecl); - } - }); - } - return map2; - } - function forEachPossibleImportOrExportStatement(sourceFileLike, action) { - return forEach(sourceFileLike.kind === 312 /* SourceFile */ ? sourceFileLike.statements : sourceFileLike.body.statements, (statement) => ( - // TODO: GH#18217 - action(statement) || isAmbientModuleDeclaration(statement) && forEach(statement.body && statement.body.statements, action) - )); - } - function forEachImport(sourceFile, action) { - if (sourceFile.externalModuleIndicator || sourceFile.imports !== void 0) { - for (const i of sourceFile.imports) { - action(importFromModuleSpecifier(i), i); - } - } else { - forEachPossibleImportOrExportStatement(sourceFile, (statement) => { - switch (statement.kind) { - case 278 /* ExportDeclaration */: - case 272 /* ImportDeclaration */: { - const decl = statement; - if (decl.moduleSpecifier && isStringLiteral(decl.moduleSpecifier)) { - action(decl, decl.moduleSpecifier); - } - break; - } - case 271 /* ImportEqualsDeclaration */: { - const decl = statement; - if (isExternalModuleImportEquals(decl)) { - action(decl, decl.moduleReference.expression); - } - break; - } - } - }); - } - } - function getImportOrExportSymbol(node, symbol, checker, comingFromExport) { - return comingFromExport ? getExport() : getExport() || getImport(); - function getExport() { - var _a; - const { parent: parent2 } = node; - const grandparent = parent2.parent; - if (symbol.exportSymbol) { - if (parent2.kind === 211 /* PropertyAccessExpression */) { - return ((_a = symbol.declarations) == null ? void 0 : _a.some((d) => d === parent2)) && isBinaryExpression(grandparent) ? getSpecialPropertyExport( - grandparent, - /*useLhsSymbol*/ - false - ) : void 0; - } else { - return exportInfo(symbol.exportSymbol, getExportKindForDeclaration(parent2)); - } - } else { - const exportNode = getExportNode(parent2, node); - if (exportNode && hasSyntacticModifier(exportNode, 1 /* Export */)) { - if (isImportEqualsDeclaration(exportNode) && exportNode.moduleReference === node) { - if (comingFromExport) { - return void 0; - } - const lhsSymbol = checker.getSymbolAtLocation(exportNode.name); - return { kind: 0 /* Import */, symbol: lhsSymbol }; - } else { - return exportInfo(symbol, getExportKindForDeclaration(exportNode)); - } - } else if (isNamespaceExport(parent2)) { - return exportInfo(symbol, 0 /* Named */); - } else if (isExportAssignment(parent2)) { - return getExportAssignmentExport(parent2); - } else if (isExportAssignment(grandparent)) { - return getExportAssignmentExport(grandparent); - } else if (isBinaryExpression(parent2)) { - return getSpecialPropertyExport( - parent2, - /*useLhsSymbol*/ - true - ); - } else if (isBinaryExpression(grandparent)) { - return getSpecialPropertyExport( - grandparent, - /*useLhsSymbol*/ - true - ); - } else if (isJSDocTypedefTag(parent2) || isJSDocCallbackTag(parent2)) { - return exportInfo(symbol, 0 /* Named */); - } - } - function getExportAssignmentExport(ex) { - if (!ex.symbol.parent) - return void 0; - const exportKind = ex.isExportEquals ? 2 /* ExportEquals */ : 1 /* Default */; - return { kind: 1 /* Export */, symbol, exportInfo: { exportingModuleSymbol: ex.symbol.parent, exportKind } }; - } - function getSpecialPropertyExport(node2, useLhsSymbol) { - let kind; - switch (getAssignmentDeclarationKind(node2)) { - case 1 /* ExportsProperty */: - kind = 0 /* Named */; - break; - case 2 /* ModuleExports */: - kind = 2 /* ExportEquals */; - break; - default: - return void 0; - } - const sym = useLhsSymbol ? checker.getSymbolAtLocation(getNameOfAccessExpression(cast(node2.left, isAccessExpression))) : symbol; - return sym && exportInfo(sym, kind); - } - } - function getImport() { - const isImport3 = isNodeImport(node); - if (!isImport3) - return void 0; - let importedSymbol = checker.getImmediateAliasedSymbol(symbol); - if (!importedSymbol) - return void 0; - importedSymbol = skipExportSpecifierSymbol(importedSymbol, checker); - if (importedSymbol.escapedName === "export=") { - importedSymbol = getExportEqualsLocalSymbol(importedSymbol, checker); - if (importedSymbol === void 0) - return void 0; - } - const importedName = symbolEscapedNameNoDefault(importedSymbol); - if (importedName === void 0 || importedName === "default" /* Default */ || importedName === symbol.escapedName) { - return { kind: 0 /* Import */, symbol: importedSymbol }; - } - } - function exportInfo(symbol2, kind) { - const exportInfo2 = getExportInfo(symbol2, kind, checker); - return exportInfo2 && { kind: 1 /* Export */, symbol: symbol2, exportInfo: exportInfo2 }; - } - function getExportKindForDeclaration(node2) { - return hasSyntacticModifier(node2, 1024 /* Default */) ? 1 /* Default */ : 0 /* Named */; - } - } - function getExportEqualsLocalSymbol(importedSymbol, checker) { - var _a, _b; - if (importedSymbol.flags & 2097152 /* Alias */) { - return checker.getImmediateAliasedSymbol(importedSymbol); - } - const decl = Debug.checkDefined(importedSymbol.valueDeclaration); - if (isExportAssignment(decl)) { - return (_a = tryCast(decl.expression, canHaveSymbol)) == null ? void 0 : _a.symbol; - } else if (isBinaryExpression(decl)) { - return (_b = tryCast(decl.right, canHaveSymbol)) == null ? void 0 : _b.symbol; - } else if (isSourceFile(decl)) { - return decl.symbol; - } - return void 0; - } - function getExportNode(parent2, node) { - const declaration = isVariableDeclaration(parent2) ? parent2 : isBindingElement(parent2) ? walkUpBindingElementsAndPatterns(parent2) : void 0; - if (declaration) { - return parent2.name !== node ? void 0 : isCatchClause(declaration.parent) ? void 0 : isVariableStatement(declaration.parent.parent) ? declaration.parent.parent : void 0; - } else { - return parent2; - } - } - function isNodeImport(node) { - const { parent: parent2 } = node; - switch (parent2.kind) { - case 271 /* ImportEqualsDeclaration */: - return parent2.name === node && isExternalModuleImportEquals(parent2); - case 276 /* ImportSpecifier */: - return !parent2.propertyName; - case 273 /* ImportClause */: - case 274 /* NamespaceImport */: - Debug.assert(parent2.name === node); - return true; - case 208 /* BindingElement */: - return isInJSFile(node) && isVariableDeclarationInitializedToBareOrAccessedRequire(parent2.parent.parent); - default: - return false; - } - } - function getExportInfo(exportSymbol, exportKind, checker) { - const moduleSymbol = exportSymbol.parent; - if (!moduleSymbol) - return void 0; - const exportingModuleSymbol = checker.getMergedSymbol(moduleSymbol); - return isExternalModuleSymbol(exportingModuleSymbol) ? { exportingModuleSymbol, exportKind } : void 0; - } - function skipExportSpecifierSymbol(symbol, checker) { - if (symbol.declarations) { - for (const declaration of symbol.declarations) { - if (isExportSpecifier(declaration) && !declaration.propertyName && !declaration.parent.parent.moduleSpecifier) { - return checker.getExportSpecifierLocalTargetSymbol(declaration) || symbol; - } else if (isPropertyAccessExpression(declaration) && isModuleExportsAccessExpression(declaration.expression) && !isPrivateIdentifier(declaration.name)) { - return checker.getSymbolAtLocation(declaration); - } else if (isShorthandPropertyAssignment(declaration) && isBinaryExpression(declaration.parent.parent) && getAssignmentDeclarationKind(declaration.parent.parent) === 2 /* ModuleExports */) { - return checker.getExportSpecifierLocalTargetSymbol(declaration.name); - } - } - } - return symbol; - } - function getContainingModuleSymbol(importer, checker) { - return checker.getMergedSymbol(getSourceFileLikeForImportDeclaration(importer).symbol); - } - function getSourceFileLikeForImportDeclaration(node) { - if (node.kind === 213 /* CallExpression */) { - return node.getSourceFile(); - } - const { parent: parent2 } = node; - if (parent2.kind === 312 /* SourceFile */) { - return parent2; - } - Debug.assert(parent2.kind === 268 /* ModuleBlock */); - return cast(parent2.parent, isAmbientModuleDeclaration); - } - function isAmbientModuleDeclaration(node) { - return node.kind === 267 /* ModuleDeclaration */ && node.name.kind === 11 /* StringLiteral */; - } - function isExternalModuleImportEquals(eq) { - return eq.moduleReference.kind === 283 /* ExternalModuleReference */ && eq.moduleReference.expression.kind === 11 /* StringLiteral */; - } - var ExportKind2, ImportExport; - var init_importTracker = __esm({ - "src/services/importTracker.ts"() { - "use strict"; - init_ts4(); - ExportKind2 = /* @__PURE__ */ ((ExportKind3) => { - ExportKind3[ExportKind3["Named"] = 0] = "Named"; - ExportKind3[ExportKind3["Default"] = 1] = "Default"; - ExportKind3[ExportKind3["ExportEquals"] = 2] = "ExportEquals"; - return ExportKind3; - })(ExportKind2 || {}); - ImportExport = /* @__PURE__ */ ((ImportExport2) => { - ImportExport2[ImportExport2["Import"] = 0] = "Import"; - ImportExport2[ImportExport2["Export"] = 1] = "Export"; - return ImportExport2; - })(ImportExport || {}); - } - }); - - // src/services/findAllReferences.ts - function nodeEntry(node, kind = 1 /* Node */) { - return { - kind, - node: node.name || node, - context: getContextNodeForNodeEntry(node) - }; - } - function isContextWithStartAndEndNode(node) { - return node && node.kind === void 0; - } - function getContextNodeForNodeEntry(node) { - if (isDeclaration(node)) { - return getContextNode(node); - } - if (!node.parent) - return void 0; - if (!isDeclaration(node.parent) && !isExportAssignment(node.parent)) { - if (isInJSFile(node)) { - const binaryExpression = isBinaryExpression(node.parent) ? node.parent : isAccessExpression(node.parent) && isBinaryExpression(node.parent.parent) && node.parent.parent.left === node.parent ? node.parent.parent : void 0; - if (binaryExpression && getAssignmentDeclarationKind(binaryExpression) !== 0 /* None */) { - return getContextNode(binaryExpression); - } - } - if (isJsxOpeningElement(node.parent) || isJsxClosingElement(node.parent)) { - return node.parent.parent; - } else if (isJsxSelfClosingElement(node.parent) || isLabeledStatement(node.parent) || isBreakOrContinueStatement(node.parent)) { - return node.parent; - } else if (isStringLiteralLike(node)) { - const validImport = tryGetImportFromModuleSpecifier(node); - if (validImport) { - const declOrStatement = findAncestor( - validImport, - (node2) => isDeclaration(node2) || isStatement(node2) || isJSDocTag(node2) - ); - return isDeclaration(declOrStatement) ? getContextNode(declOrStatement) : declOrStatement; - } - } - const propertyName = findAncestor(node, isComputedPropertyName); - return propertyName ? getContextNode(propertyName.parent) : void 0; - } - if (node.parent.name === node || // node is name of declaration, use parent - isConstructorDeclaration(node.parent) || isExportAssignment(node.parent) || // Property name of the import export specifier or binding pattern, use parent - (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || // Is default export - node.kind === 90 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) { - return getContextNode(node.parent); - } - return void 0; - } - function getContextNode(node) { - if (!node) - return void 0; - switch (node.kind) { - case 260 /* VariableDeclaration */: - return !isVariableDeclarationList(node.parent) || node.parent.declarations.length !== 1 ? node : isVariableStatement(node.parent.parent) ? node.parent.parent : isForInOrOfStatement(node.parent.parent) ? getContextNode(node.parent.parent) : node.parent; - case 208 /* BindingElement */: - return getContextNode(node.parent.parent); - case 276 /* ImportSpecifier */: - return node.parent.parent.parent; - case 281 /* ExportSpecifier */: - case 274 /* NamespaceImport */: - return node.parent.parent; - case 273 /* ImportClause */: - case 280 /* NamespaceExport */: - return node.parent; - case 226 /* BinaryExpression */: - return isExpressionStatement(node.parent) ? node.parent : node; - case 250 /* ForOfStatement */: - case 249 /* ForInStatement */: - return { - start: node.initializer, - end: node.expression - }; - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( - findAncestor( - node.parent, - (node2) => isBinaryExpression(node2) || isForInOrOfStatement(node2) - ) - ) : node; - default: - return node; - } - } - function toContextSpan(textSpan, sourceFile, context) { - if (!context) - return void 0; - const contextSpan = isContextWithStartAndEndNode(context) ? getTextSpan(context.start, sourceFile, context.end) : getTextSpan(context, sourceFile); - return contextSpan.start !== textSpan.start || contextSpan.length !== textSpan.length ? { contextSpan } : void 0; - } - function findReferencedSymbols(program, cancellationToken, sourceFiles, sourceFile, position) { - const node = getTouchingPropertyName(sourceFile, position); - const options = { use: 1 /* References */ }; - const referencedSymbols = Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options); - const checker = program.getTypeChecker(); - const adjustedNode = Core.getAdjustedNode(node, options); - const symbol = isDefinitionForReference(adjustedNode) ? checker.getSymbolAtLocation(adjustedNode) : void 0; - return !referencedSymbols || !referencedSymbols.length ? void 0 : mapDefined(referencedSymbols, ({ definition, references }) => ( - // Only include referenced symbols that have a valid definition. - definition && { - definition: checker.runWithCancellationToken(cancellationToken, (checker2) => definitionToReferencedSymbolDefinitionInfo(definition, checker2, node)), - references: references.map((r) => toReferencedSymbolEntry(r, symbol)) - } - )); - } - function isDefinitionForReference(node) { - return node.kind === 90 /* DefaultKeyword */ || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node) || node.kind === 137 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent); - } - function getImplementationsAtPosition(program, cancellationToken, sourceFiles, sourceFile, position) { - const node = getTouchingPropertyName(sourceFile, position); - let referenceEntries; - const entries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position); - if (node.parent.kind === 211 /* PropertyAccessExpression */ || node.parent.kind === 208 /* BindingElement */ || node.parent.kind === 212 /* ElementAccessExpression */ || node.kind === 108 /* SuperKeyword */) { - referenceEntries = entries && [...entries]; - } else if (entries) { - const queue = createQueue(entries); - const seenNodes = /* @__PURE__ */ new Map(); - while (!queue.isEmpty()) { - const entry = queue.dequeue(); - if (!addToSeen(seenNodes, getNodeId(entry.node))) { - continue; - } - referenceEntries = append(referenceEntries, entry); - const entries2 = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, entry.node, entry.node.pos); - if (entries2) { - queue.enqueue(...entries2); - } - } - } - const checker = program.getTypeChecker(); - return map(referenceEntries, (entry) => toImplementationLocation(entry, checker)); - } - function getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node, position) { - if (node.kind === 312 /* SourceFile */) { - return void 0; - } - const checker = program.getTypeChecker(); - if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { - const result = []; - Core.getReferenceEntriesForShorthandPropertyAssignment(node, checker, (node2) => result.push(nodeEntry(node2))); - return result; - } else if (node.kind === 108 /* SuperKeyword */ || isSuperProperty(node.parent)) { - const symbol = checker.getSymbolAtLocation(node); - return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)]; - } else { - return getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, { implementations: true, use: 1 /* References */ }); - } - } - function findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, convertEntry) { - return map(flattenEntries(Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options)), (entry) => convertEntry(entry, node, program.getTypeChecker())); - } - function getReferenceEntriesForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) { - return flattenEntries(Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options, sourceFilesSet)); - } - function flattenEntries(referenceSymbols) { - return referenceSymbols && flatMap(referenceSymbols, (r) => r.references); - } - function definitionToReferencedSymbolDefinitionInfo(def, checker, originalNode) { - const info = (() => { - switch (def.type) { - case 0 /* Symbol */: { - const { symbol } = def; - const { displayParts: displayParts2, kind: kind2 } = getDefinitionKindAndDisplayParts(symbol, checker, originalNode); - const name2 = displayParts2.map((p) => p.text).join(""); - const declaration = symbol.declarations && firstOrUndefined(symbol.declarations); - const node = declaration ? getNameOfDeclaration(declaration) || declaration : originalNode; - return { - ...getFileAndTextSpanFromNode(node), - name: name2, - kind: kind2, - displayParts: displayParts2, - context: getContextNode(declaration) - }; - } - case 1 /* Label */: { - const { node } = def; - return { ...getFileAndTextSpanFromNode(node), name: node.text, kind: "label" /* label */, displayParts: [displayPart(node.text, 17 /* text */)] }; - } - case 2 /* Keyword */: { - const { node } = def; - const name2 = tokenToString(node.kind); - return { ...getFileAndTextSpanFromNode(node), name: name2, kind: "keyword" /* keyword */, displayParts: [{ text: name2, kind: "keyword" /* keyword */ }] }; - } - case 3 /* This */: { - const { node } = def; - const symbol = checker.getSymbolAtLocation(node); - const displayParts2 = symbol && ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind( - checker, - symbol, - node.getSourceFile(), - getContainerNode(node), - node - ).displayParts || [textPart("this")]; - return { ...getFileAndTextSpanFromNode(node), name: "this", kind: "var" /* variableElement */, displayParts: displayParts2 }; - } - case 4 /* String */: { - const { node } = def; - return { - ...getFileAndTextSpanFromNode(node), - name: node.text, - kind: "var" /* variableElement */, - displayParts: [displayPart(getTextOfNode(node), 8 /* stringLiteral */)] - }; - } - case 5 /* TripleSlashReference */: { - return { - textSpan: createTextSpanFromRange(def.reference), - sourceFile: def.file, - name: def.reference.fileName, - kind: "string" /* string */, - displayParts: [displayPart(`"${def.reference.fileName}"`, 8 /* stringLiteral */)] - }; - } - default: - return Debug.assertNever(def); - } - })(); - const { sourceFile, textSpan, name, kind, displayParts, context } = info; - return { - containerKind: "" /* unknown */, - containerName: "", - fileName: sourceFile.fileName, - kind, - name, - textSpan, - displayParts, - ...toContextSpan(textSpan, sourceFile, context) - }; - } - function getFileAndTextSpanFromNode(node) { - const sourceFile = node.getSourceFile(); - return { - sourceFile, - textSpan: getTextSpan(isComputedPropertyName(node) ? node.expression : node, sourceFile) - }; - } - function getDefinitionKindAndDisplayParts(symbol, checker, node) { - const meaning = Core.getIntersectingMeaningFromDeclarations(node, symbol); - const enclosingDeclaration = symbol.declarations && firstOrUndefined(symbol.declarations) || node; - const { displayParts, symbolKind } = ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(checker, symbol, enclosingDeclaration.getSourceFile(), enclosingDeclaration, enclosingDeclaration, meaning); - return { displayParts, kind: symbolKind }; - } - function toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixText, quotePreference) { - return { ...entryToDocumentSpan(entry), ...providePrefixAndSuffixText && getPrefixAndSuffixText(entry, originalNode, checker, quotePreference) }; - } - function toReferencedSymbolEntry(entry, symbol) { - const referenceEntry = toReferenceEntry(entry); - if (!symbol) - return referenceEntry; - return { - ...referenceEntry, - isDefinition: entry.kind !== 0 /* Span */ && isDeclarationOfSymbol(entry.node, symbol) - }; - } - function toReferenceEntry(entry) { - const documentSpan = entryToDocumentSpan(entry); - if (entry.kind === 0 /* Span */) { - return { ...documentSpan, isWriteAccess: false }; - } - const { kind, node } = entry; - return { - ...documentSpan, - isWriteAccess: isWriteAccessForReference(node), - isInString: kind === 2 /* StringLiteral */ ? true : void 0 - }; - } - function entryToDocumentSpan(entry) { - if (entry.kind === 0 /* Span */) { - return { textSpan: entry.textSpan, fileName: entry.fileName }; - } else { - const sourceFile = entry.node.getSourceFile(); - const textSpan = getTextSpan(entry.node, sourceFile); - return { - textSpan, - fileName: sourceFile.fileName, - ...toContextSpan(textSpan, sourceFile, entry.context) - }; - } - } - function getPrefixAndSuffixText(entry, originalNode, checker, quotePreference) { - if (entry.kind !== 0 /* Span */ && isIdentifier(originalNode)) { - const { node, kind } = entry; - const parent2 = node.parent; - const name = originalNode.text; - const isShorthandAssignment = isShorthandPropertyAssignment(parent2); - if (isShorthandAssignment || isObjectBindingElementWithoutPropertyName(parent2) && parent2.name === node && parent2.dotDotDotToken === void 0) { - const prefixColon = { prefixText: name + ": " }; - const suffixColon = { suffixText: ": " + name }; - if (kind === 3 /* SearchedLocalFoundProperty */) { - return prefixColon; - } - if (kind === 4 /* SearchedPropertyFoundLocal */) { - return suffixColon; - } - if (isShorthandAssignment) { - const grandParent = parent2.parent; - if (isObjectLiteralExpression(grandParent) && isBinaryExpression(grandParent.parent) && isModuleExportsAccessExpression(grandParent.parent.left)) { - return prefixColon; - } - return suffixColon; - } else { - return prefixColon; - } - } else if (isImportSpecifier(parent2) && !parent2.propertyName) { - const originalSymbol = isExportSpecifier(originalNode.parent) ? checker.getExportSpecifierLocalTargetSymbol(originalNode.parent) : checker.getSymbolAtLocation(originalNode); - return contains(originalSymbol.declarations, parent2) ? { prefixText: name + " as " } : emptyOptions; - } else if (isExportSpecifier(parent2) && !parent2.propertyName) { - return originalNode === entry.node || checker.getSymbolAtLocation(originalNode) === checker.getSymbolAtLocation(entry.node) ? { prefixText: name + " as " } : { suffixText: " as " + name }; - } - } - if (entry.kind !== 0 /* Span */ && isNumericLiteral(entry.node) && isAccessExpression(entry.node.parent)) { - const quote2 = getQuoteFromPreference(quotePreference); - return { prefixText: quote2, suffixText: quote2 }; - } - return emptyOptions; - } - function toImplementationLocation(entry, checker) { - const documentSpan = entryToDocumentSpan(entry); - if (entry.kind !== 0 /* Span */) { - const { node } = entry; - return { - ...documentSpan, - ...implementationKindDisplayParts(node, checker) - }; - } else { - return { ...documentSpan, kind: "" /* unknown */, displayParts: [] }; - } - } - function implementationKindDisplayParts(node, checker) { - const symbol = checker.getSymbolAtLocation(isDeclaration(node) && node.name ? node.name : node); - if (symbol) { - return getDefinitionKindAndDisplayParts(symbol, checker, node); - } else if (node.kind === 210 /* ObjectLiteralExpression */) { - return { - kind: "interface" /* interfaceElement */, - displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("object literal"), punctuationPart(22 /* CloseParenToken */)] - }; - } else if (node.kind === 231 /* ClassExpression */) { - return { - kind: "local class" /* localClassElement */, - displayParts: [punctuationPart(21 /* OpenParenToken */), textPart("anonymous local class"), punctuationPart(22 /* CloseParenToken */)] - }; - } else { - return { kind: getNodeKind(node), displayParts: [] }; - } - } - function toHighlightSpan(entry) { - const documentSpan = entryToDocumentSpan(entry); - if (entry.kind === 0 /* Span */) { - return { - fileName: documentSpan.fileName, - span: { - textSpan: documentSpan.textSpan, - kind: "reference" /* reference */ - } - }; - } - const writeAccess = isWriteAccessForReference(entry.node); - const span = { - textSpan: documentSpan.textSpan, - kind: writeAccess ? "writtenReference" /* writtenReference */ : "reference" /* reference */, - isInString: entry.kind === 2 /* StringLiteral */ ? true : void 0, - ...documentSpan.contextSpan && { contextSpan: documentSpan.contextSpan } - }; - return { fileName: documentSpan.fileName, span }; - } - function getTextSpan(node, sourceFile, endNode2) { - let start = node.getStart(sourceFile); - let end = (endNode2 || node).getEnd(); - if (isStringLiteralLike(node) && end - start > 2) { - Debug.assert(endNode2 === void 0); - start += 1; - end -= 1; - } - return createTextSpanFromBounds(start, end); - } - function getTextSpanOfEntry(entry) { - return entry.kind === 0 /* Span */ ? entry.textSpan : getTextSpan(entry.node, entry.node.getSourceFile()); - } - function isWriteAccessForReference(node) { - const decl = getDeclarationFromName(node); - return !!decl && declarationIsWriteAccess(decl) || node.kind === 90 /* DefaultKeyword */ || isWriteAccess(node); - } - function isDeclarationOfSymbol(node, target) { - var _a; - if (!target) - return false; - const source = getDeclarationFromName(node) || (node.kind === 90 /* DefaultKeyword */ ? node.parent : isLiteralComputedPropertyDeclarationName(node) ? node.parent.parent : node.kind === 137 /* ConstructorKeyword */ && isConstructorDeclaration(node.parent) ? node.parent.parent : void 0); - const commonjsSource = source && isBinaryExpression(source) ? source.left : void 0; - return !!(source && ((_a = target.declarations) == null ? void 0 : _a.some((d) => d === source || d === commonjsSource))); - } - function declarationIsWriteAccess(decl) { - if (!!(decl.flags & 33554432 /* Ambient */)) - return true; - switch (decl.kind) { - case 226 /* BinaryExpression */: - case 208 /* BindingElement */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 90 /* DefaultKeyword */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 281 /* ExportSpecifier */: - case 273 /* ImportClause */: - case 271 /* ImportEqualsDeclaration */: - case 276 /* ImportSpecifier */: - case 264 /* InterfaceDeclaration */: - case 345 /* JSDocCallbackTag */: - case 353 /* JSDocTypedefTag */: - case 291 /* JsxAttribute */: - case 267 /* ModuleDeclaration */: - case 270 /* NamespaceExportDeclaration */: - case 274 /* NamespaceImport */: - case 280 /* NamespaceExport */: - case 169 /* Parameter */: - case 304 /* ShorthandPropertyAssignment */: - case 265 /* TypeAliasDeclaration */: - case 168 /* TypeParameter */: - return true; - case 303 /* PropertyAssignment */: - return !isArrayLiteralOrObjectLiteralDestructuringPattern(decl.parent); - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 174 /* MethodDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return !!decl.body; - case 260 /* VariableDeclaration */: - case 172 /* PropertyDeclaration */: - return !!decl.initializer || isCatchClause(decl.parent); - case 173 /* MethodSignature */: - case 171 /* PropertySignature */: - case 355 /* JSDocPropertyTag */: - case 348 /* JSDocParameterTag */: - return false; - default: - return Debug.failBadSyntaxKind(decl); - } - } - var DefinitionKind, EntryKind, FindReferencesUse, Core; - var init_findAllReferences = __esm({ - "src/services/findAllReferences.ts"() { - "use strict"; - init_ts4(); - init_ts_FindAllReferences(); - DefinitionKind = /* @__PURE__ */ ((DefinitionKind2) => { - DefinitionKind2[DefinitionKind2["Symbol"] = 0] = "Symbol"; - DefinitionKind2[DefinitionKind2["Label"] = 1] = "Label"; - DefinitionKind2[DefinitionKind2["Keyword"] = 2] = "Keyword"; - DefinitionKind2[DefinitionKind2["This"] = 3] = "This"; - DefinitionKind2[DefinitionKind2["String"] = 4] = "String"; - DefinitionKind2[DefinitionKind2["TripleSlashReference"] = 5] = "TripleSlashReference"; - return DefinitionKind2; - })(DefinitionKind || {}); - EntryKind = /* @__PURE__ */ ((EntryKind2) => { - EntryKind2[EntryKind2["Span"] = 0] = "Span"; - EntryKind2[EntryKind2["Node"] = 1] = "Node"; - EntryKind2[EntryKind2["StringLiteral"] = 2] = "StringLiteral"; - EntryKind2[EntryKind2["SearchedLocalFoundProperty"] = 3] = "SearchedLocalFoundProperty"; - EntryKind2[EntryKind2["SearchedPropertyFoundLocal"] = 4] = "SearchedPropertyFoundLocal"; - return EntryKind2; - })(EntryKind || {}); - FindReferencesUse = /* @__PURE__ */ ((FindReferencesUse2) => { - FindReferencesUse2[FindReferencesUse2["Other"] = 0] = "Other"; - FindReferencesUse2[FindReferencesUse2["References"] = 1] = "References"; - FindReferencesUse2[FindReferencesUse2["Rename"] = 2] = "Rename"; - return FindReferencesUse2; - })(FindReferencesUse || {}); - ((Core2) => { - function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) { - var _a, _b, _c; - node = getAdjustedNode2(node, options); - if (isSourceFile(node)) { - const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program); - if (!(resolvedRef == null ? void 0 : resolvedRef.file)) { - return void 0; - } - const moduleSymbol = program.getTypeChecker().getMergedSymbol(resolvedRef.file.symbol); - if (moduleSymbol) { - return getReferencedSymbolsForModule( - program, - moduleSymbol, - /*excludeImportTypeOfExportEquals*/ - false, - sourceFiles, - sourceFilesSet - ); - } - const fileIncludeReasons = program.getFileIncludeReasons(); - if (!fileIncludeReasons) { - return void 0; - } - return [{ - definition: { type: 5 /* TripleSlashReference */, reference: resolvedRef.reference, file: node }, - references: getReferencesForNonModule(resolvedRef.file, fileIncludeReasons, program) || emptyArray - }]; - } - if (!options.implementations) { - const special = getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken); - if (special) { - return special; - } - } - const checker = program.getTypeChecker(); - const symbol = checker.getSymbolAtLocation(isConstructorDeclaration(node) && node.parent.name || node); - if (!symbol) { - if (!options.implementations && isStringLiteralLike(node)) { - if (isModuleSpecifierLike(node)) { - const fileIncludeReasons = program.getFileIncludeReasons(); - const referencedFileName = (_c = (_b = (_a = node.getSourceFile().resolvedModules) == null ? void 0 : _a.get(node.text, getModeForUsageLocation(node.getSourceFile(), node))) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.resolvedFileName; - const referencedFile = referencedFileName ? program.getSourceFile(referencedFileName) : void 0; - if (referencedFile) { - return [{ definition: { type: 4 /* String */, node }, references: getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || emptyArray }]; - } - } - return getReferencesForStringLiteral(node, sourceFiles, checker, cancellationToken); - } - return void 0; - } - if (symbol.escapedName === "export=" /* ExportEquals */) { - return getReferencedSymbolsForModule( - program, - symbol.parent, - /*excludeImportTypeOfExportEquals*/ - false, - sourceFiles, - sourceFilesSet - ); - } - const moduleReferences = getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, cancellationToken, options, sourceFilesSet); - if (moduleReferences && !(symbol.flags & 33554432 /* Transient */)) { - return moduleReferences; - } - const aliasedSymbol = getMergedAliasedSymbolOfNamespaceExportDeclaration(node, symbol, checker); - const moduleReferencesOfExportTarget = aliasedSymbol && getReferencedSymbolsForModuleIfDeclaredBySourceFile(aliasedSymbol, program, sourceFiles, cancellationToken, options, sourceFilesSet); - const references = getReferencedSymbolsForSymbol(symbol, node, sourceFiles, sourceFilesSet, checker, cancellationToken, options); - return mergeReferences(program, moduleReferences, references, moduleReferencesOfExportTarget); - } - Core2.getReferencedSymbolsForNode = getReferencedSymbolsForNode; - function getAdjustedNode2(node, options) { - if (options.use === 1 /* References */) { - node = getAdjustedReferenceLocation(node); - } else if (options.use === 2 /* Rename */) { - node = getAdjustedRenameLocation(node); - } - return node; - } - Core2.getAdjustedNode = getAdjustedNode2; - function getReferencesForFileName(fileName, program, sourceFiles, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) { - var _a, _b; - const moduleSymbol = (_a = program.getSourceFile(fileName)) == null ? void 0 : _a.symbol; - if (moduleSymbol) { - return ((_b = getReferencedSymbolsForModule( - program, - moduleSymbol, - /*excludeImportTypeOfExportEquals*/ - false, - sourceFiles, - sourceFilesSet - )[0]) == null ? void 0 : _b.references) || emptyArray; - } - const fileIncludeReasons = program.getFileIncludeReasons(); - const referencedFile = program.getSourceFile(fileName); - return referencedFile && fileIncludeReasons && getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || emptyArray; - } - Core2.getReferencesForFileName = getReferencesForFileName; - function getReferencesForNonModule(referencedFile, refFileMap, program) { - let entries; - const references = refFileMap.get(referencedFile.path) || emptyArray; - for (const ref of references) { - if (isReferencedFile(ref)) { - const referencingFile = program.getSourceFileByPath(ref.file); - const location = getReferencedFileLocation(program.getSourceFileByPath, ref); - if (isReferenceFileLocation(location)) { - entries = append(entries, { - kind: 0 /* Span */, - fileName: referencingFile.fileName, - textSpan: createTextSpanFromRange(location) - }); - } - } - } - return entries; - } - function getMergedAliasedSymbolOfNamespaceExportDeclaration(node, symbol, checker) { - if (node.parent && isNamespaceExportDeclaration(node.parent)) { - const aliasedSymbol = checker.getAliasedSymbol(symbol); - const targetSymbol = checker.getMergedSymbol(aliasedSymbol); - if (aliasedSymbol !== targetSymbol) { - return targetSymbol; - } - } - return void 0; - } - function getReferencedSymbolsForModuleIfDeclaredBySourceFile(symbol, program, sourceFiles, cancellationToken, options, sourceFilesSet) { - const moduleSourceFile = symbol.flags & 1536 /* Module */ && symbol.declarations && find(symbol.declarations, isSourceFile); - if (!moduleSourceFile) - return void 0; - const exportEquals = symbol.exports.get("export=" /* ExportEquals */); - const moduleReferences = getReferencedSymbolsForModule(program, symbol, !!exportEquals, sourceFiles, sourceFilesSet); - if (!exportEquals || !sourceFilesSet.has(moduleSourceFile.fileName)) - return moduleReferences; - const checker = program.getTypeChecker(); - symbol = skipAlias(exportEquals, checker); - return mergeReferences(program, moduleReferences, getReferencedSymbolsForSymbol( - symbol, - /*node*/ - void 0, - sourceFiles, - sourceFilesSet, - checker, - cancellationToken, - options - )); - } - function mergeReferences(program, ...referencesToMerge) { - let result; - for (const references of referencesToMerge) { - if (!references || !references.length) - continue; - if (!result) { - result = references; - continue; - } - for (const entry of references) { - if (!entry.definition || entry.definition.type !== 0 /* Symbol */) { - result.push(entry); - continue; - } - const symbol = entry.definition.symbol; - const refIndex = findIndex(result, (ref) => !!ref.definition && ref.definition.type === 0 /* Symbol */ && ref.definition.symbol === symbol); - if (refIndex === -1) { - result.push(entry); - continue; - } - const reference = result[refIndex]; - result[refIndex] = { - definition: reference.definition, - references: reference.references.concat(entry.references).sort((entry1, entry2) => { - const entry1File = getSourceFileIndexOfEntry(program, entry1); - const entry2File = getSourceFileIndexOfEntry(program, entry2); - if (entry1File !== entry2File) { - return compareValues(entry1File, entry2File); - } - const entry1Span = getTextSpanOfEntry(entry1); - const entry2Span = getTextSpanOfEntry(entry2); - return entry1Span.start !== entry2Span.start ? compareValues(entry1Span.start, entry2Span.start) : compareValues(entry1Span.length, entry2Span.length); - }) - }; - } - } - return result; - } - function getSourceFileIndexOfEntry(program, entry) { - const sourceFile = entry.kind === 0 /* Span */ ? program.getSourceFile(entry.fileName) : entry.node.getSourceFile(); - return program.getSourceFiles().indexOf(sourceFile); - } - function getReferencedSymbolsForModule(program, symbol, excludeImportTypeOfExportEquals, sourceFiles, sourceFilesSet) { - Debug.assert(!!symbol.valueDeclaration); - const references = mapDefined(findModuleReferences(program, sourceFiles, symbol), (reference) => { - if (reference.kind === "import") { - const parent2 = reference.literal.parent; - if (isLiteralTypeNode(parent2)) { - const importType = cast(parent2.parent, isImportTypeNode); - if (excludeImportTypeOfExportEquals && !importType.qualifier) { - return void 0; - } - } - return nodeEntry(reference.literal); - } else if (reference.kind === "implicit") { - const range = reference.literal.text !== externalHelpersModuleNameText && forEachChildRecursively( - reference.referencingFile, - (n) => !(n.transformFlags & 2 /* ContainsJsx */) ? "skip" : isJsxElement(n) || isJsxSelfClosingElement(n) || isJsxFragment(n) ? n : void 0 - ) || reference.referencingFile.statements[0] || reference.referencingFile; - return nodeEntry(range); - } else { - return { - kind: 0 /* Span */, - fileName: reference.referencingFile.fileName, - textSpan: createTextSpanFromRange(reference.ref) - }; - } - }); - if (symbol.declarations) { - for (const decl of symbol.declarations) { - switch (decl.kind) { - case 312 /* SourceFile */: - break; - case 267 /* ModuleDeclaration */: - if (sourceFilesSet.has(decl.getSourceFile().fileName)) { - references.push(nodeEntry(decl.name)); - } - break; - default: - Debug.assert(!!(symbol.flags & 33554432 /* Transient */), "Expected a module symbol to be declared by a SourceFile or ModuleDeclaration."); - } - } - } - const exported = symbol.exports.get("export=" /* ExportEquals */); - if (exported == null ? void 0 : exported.declarations) { - for (const decl of exported.declarations) { - const sourceFile = decl.getSourceFile(); - if (sourceFilesSet.has(sourceFile.fileName)) { - const node = isBinaryExpression(decl) && isPropertyAccessExpression(decl.left) ? decl.left.expression : isExportAssignment(decl) ? Debug.checkDefined(findChildOfKind(decl, 95 /* ExportKeyword */, sourceFile)) : getNameOfDeclaration(decl) || decl; - references.push(nodeEntry(node)); - } - } - } - return references.length ? [{ definition: { type: 0 /* Symbol */, symbol }, references }] : emptyArray; - } - function isReadonlyTypeOperator(node) { - return node.kind === 148 /* ReadonlyKeyword */ && isTypeOperatorNode(node.parent) && node.parent.operator === 148 /* ReadonlyKeyword */; - } - function getReferencedSymbolsSpecial(node, sourceFiles, cancellationToken) { - if (isTypeKeyword(node.kind)) { - if (node.kind === 116 /* VoidKeyword */ && isVoidExpression(node.parent)) { - return void 0; - } - if (node.kind === 148 /* ReadonlyKeyword */ && !isReadonlyTypeOperator(node)) { - return void 0; - } - return getAllReferencesForKeyword( - sourceFiles, - node.kind, - cancellationToken, - node.kind === 148 /* ReadonlyKeyword */ ? isReadonlyTypeOperator : void 0 - ); - } - if (isImportMeta(node.parent) && node.parent.name === node) { - return getAllReferencesForImportMeta(sourceFiles, cancellationToken); - } - if (isStaticModifier(node) && isClassStaticBlockDeclaration(node.parent)) { - return [{ definition: { type: 2 /* Keyword */, node }, references: [nodeEntry(node)] }]; - } - if (isJumpStatementTarget(node)) { - const labelDefinition = getTargetLabel(node.parent, node.text); - return labelDefinition && getLabelReferencesInNode(labelDefinition.parent, labelDefinition); - } else if (isLabelOfLabeledStatement(node)) { - return getLabelReferencesInNode(node.parent, node); - } - if (isThis(node)) { - return getReferencesForThisKeyword(node, sourceFiles, cancellationToken); - } - if (node.kind === 108 /* SuperKeyword */) { - return getReferencesForSuperKeyword(node); - } - return void 0; - } - function getReferencedSymbolsForSymbol(originalSymbol, node, sourceFiles, sourceFilesSet, checker, cancellationToken, options) { - const symbol = node && skipPastExportOrImportSpecifierOrUnion( - originalSymbol, - node, - checker, - /*useLocalSymbolForExportSpecifier*/ - !isForRenameWithPrefixAndSuffixText(options) - ) || originalSymbol; - const searchMeaning = node ? getIntersectingMeaningFromDeclarations(node, symbol) : 7 /* All */; - const result = []; - const state = new State(sourceFiles, sourceFilesSet, node ? getSpecialSearchKind(node) : 0 /* None */, checker, cancellationToken, searchMeaning, options, result); - const exportSpecifier = !isForRenameWithPrefixAndSuffixText(options) || !symbol.declarations ? void 0 : find(symbol.declarations, isExportSpecifier); - if (exportSpecifier) { - getReferencesAtExportSpecifier( - exportSpecifier.name, - symbol, - exportSpecifier, - state.createSearch( - node, - originalSymbol, - /*comingFrom*/ - void 0 - ), - state, - /*addReferencesHere*/ - true, - /*alwaysGetReferences*/ - true - ); - } else if (node && node.kind === 90 /* DefaultKeyword */ && symbol.escapedName === "default" /* Default */ && symbol.parent) { - addReference(node, symbol, state); - searchForImportsOfExport(node, symbol, { exportingModuleSymbol: symbol.parent, exportKind: 1 /* Default */ }, state); - } else { - const search = state.createSearch( - node, - symbol, - /*comingFrom*/ - void 0, - { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, options.use === 2 /* Rename */, !!options.providePrefixAndSuffixTextForRename, !!options.implementations) : [symbol] } - ); - getReferencesInContainerOrFiles(symbol, state, search); - } - return result; - } - function getReferencesInContainerOrFiles(symbol, state, search) { - const scope = getSymbolScope(symbol); - if (scope) { - getReferencesInContainer( - scope, - scope.getSourceFile(), - search, - state, - /*addReferencesHere*/ - !(isSourceFile(scope) && !contains(state.sourceFiles, scope)) - ); - } else { - for (const sourceFile of state.sourceFiles) { - state.cancellationToken.throwIfCancellationRequested(); - searchForName(sourceFile, search, state); - } - } - } - function getSpecialSearchKind(node) { - switch (node.kind) { - case 176 /* Constructor */: - case 137 /* ConstructorKeyword */: - return 1 /* Constructor */; - case 80 /* Identifier */: - if (isClassLike(node.parent)) { - Debug.assert(node.parent.name === node); - return 2 /* Class */; - } - default: - return 0 /* None */; - } - } - function skipPastExportOrImportSpecifierOrUnion(symbol, node, checker, useLocalSymbolForExportSpecifier) { - const { parent: parent2 } = node; - if (isExportSpecifier(parent2) && useLocalSymbolForExportSpecifier) { - return getLocalSymbolForExportSpecifier(node, symbol, parent2, checker); - } - return firstDefined(symbol.declarations, (decl) => { - if (!decl.parent) { - if (symbol.flags & 33554432 /* Transient */) - return void 0; - Debug.fail(`Unexpected symbol at ${Debug.formatSyntaxKind(node.kind)}: ${Debug.formatSymbol(symbol)}`); - } - return isTypeLiteralNode(decl.parent) && isUnionTypeNode(decl.parent.parent) ? checker.getPropertyOfType(checker.getTypeFromTypeNode(decl.parent.parent), symbol.name) : void 0; - }); - } - let SpecialSearchKind; - ((SpecialSearchKind2) => { - SpecialSearchKind2[SpecialSearchKind2["None"] = 0] = "None"; - SpecialSearchKind2[SpecialSearchKind2["Constructor"] = 1] = "Constructor"; - SpecialSearchKind2[SpecialSearchKind2["Class"] = 2] = "Class"; - })(SpecialSearchKind || (SpecialSearchKind = {})); - function getNonModuleSymbolOfMergedModuleSymbol(symbol) { - if (!(symbol.flags & (1536 /* Module */ | 33554432 /* Transient */))) - return void 0; - const decl = symbol.declarations && find(symbol.declarations, (d) => !isSourceFile(d) && !isModuleDeclaration(d)); - return decl && decl.symbol; - } - class State { - constructor(sourceFiles, sourceFilesSet, specialSearchKind, checker, cancellationToken, searchMeaning, options, result) { - this.sourceFiles = sourceFiles; - this.sourceFilesSet = sourceFilesSet; - this.specialSearchKind = specialSearchKind; - this.checker = checker; - this.cancellationToken = cancellationToken; - this.searchMeaning = searchMeaning; - this.options = options; - this.result = result; - /** Cache for `explicitlyinheritsFrom`. */ - this.inheritsFromCache = /* @__PURE__ */ new Map(); - /** - * Type nodes can contain multiple references to the same type. For example: - * let x: Foo & (Foo & Bar) = ... - * Because we are returning the implementation locations and not the identifier locations, - * duplicate entries would be returned here as each of the type references is part of - * the same implementation. For that reason, check before we add a new entry. - */ - this.markSeenContainingTypeReference = nodeSeenTracker(); - /** - * It's possible that we will encounter the right side of `export { foo as bar } from "x";` more than once. - * For example: - * // b.ts - * export { foo as bar } from "./a"; - * import { bar } from "./b"; - * - * Normally at `foo as bar` we directly add `foo` and do not locally search for it (since it doesn't declare a local). - * But another reference to it may appear in the same source file. - * See `tests/cases/fourslash/transitiveExportImports3.ts`. - */ - this.markSeenReExportRHS = nodeSeenTracker(); - this.symbolIdToReferences = []; - // Source file ID -> symbol ID -> Whether the symbol has been searched for in the source file. - this.sourceFileToSeenSymbols = []; - } - includesSourceFile(sourceFile) { - return this.sourceFilesSet.has(sourceFile.fileName); - } - /** Gets every place to look for references of an exported symbols. See `ImportsResult` in `importTracker.ts` for more documentation. */ - getImportSearches(exportSymbol, exportInfo) { - if (!this.importTracker) - this.importTracker = createImportTracker(this.sourceFiles, this.sourceFilesSet, this.checker, this.cancellationToken); - return this.importTracker(exportSymbol, exportInfo, this.options.use === 2 /* Rename */); - } - /** @param allSearchSymbols set of additional symbols for use by `includes`. */ - createSearch(location, symbol, comingFrom, searchOptions = {}) { - const { - text = stripQuotes(symbolName(getLocalSymbolForExportDefault(symbol) || getNonModuleSymbolOfMergedModuleSymbol(symbol) || symbol)), - allSearchSymbols = [symbol] - } = searchOptions; - const escapedText = escapeLeadingUnderscores(text); - const parents = this.options.implementations && location ? getParentSymbolsOfPropertyAccess(location, symbol, this.checker) : void 0; - return { symbol, comingFrom, text, escapedText, parents, allSearchSymbols, includes: (sym) => contains(allSearchSymbols, sym) }; - } - /** - * Callback to add references for a particular searched symbol. - * This initializes a reference group, so only call this if you will add at least one reference. - */ - referenceAdder(searchSymbol) { - const symbolId = getSymbolId(searchSymbol); - let references = this.symbolIdToReferences[symbolId]; - if (!references) { - references = this.symbolIdToReferences[symbolId] = []; - this.result.push({ definition: { type: 0 /* Symbol */, symbol: searchSymbol }, references }); - } - return (node, kind) => references.push(nodeEntry(node, kind)); - } - /** Add a reference with no associated definition. */ - addStringOrCommentReference(fileName, textSpan) { - this.result.push({ - definition: void 0, - references: [{ kind: 0 /* Span */, fileName, textSpan }] - }); - } - /** Returns `true` the first time we search for a symbol in a file and `false` afterwards. */ - markSearchedSymbols(sourceFile, symbols) { - const sourceId = getNodeId(sourceFile); - const seenSymbols = this.sourceFileToSeenSymbols[sourceId] || (this.sourceFileToSeenSymbols[sourceId] = /* @__PURE__ */ new Set()); - let anyNewSymbols = false; - for (const sym of symbols) { - anyNewSymbols = tryAddToSet(seenSymbols, getSymbolId(sym)) || anyNewSymbols; - } - return anyNewSymbols; - } - } - function searchForImportsOfExport(exportLocation, exportSymbol, exportInfo, state) { - const { importSearches, singleReferences, indirectUsers } = state.getImportSearches(exportSymbol, exportInfo); - if (singleReferences.length) { - const addRef = state.referenceAdder(exportSymbol); - for (const singleRef of singleReferences) { - if (shouldAddSingleReference(singleRef, state)) - addRef(singleRef); - } - } - for (const [importLocation, importSymbol] of importSearches) { - getReferencesInSourceFile(importLocation.getSourceFile(), state.createSearch(importLocation, importSymbol, 1 /* Export */), state); - } - if (indirectUsers.length) { - let indirectSearch; - switch (exportInfo.exportKind) { - case 0 /* Named */: - indirectSearch = state.createSearch(exportLocation, exportSymbol, 1 /* Export */); - break; - case 1 /* Default */: - indirectSearch = state.options.use === 2 /* Rename */ ? void 0 : state.createSearch(exportLocation, exportSymbol, 1 /* Export */, { text: "default" }); - break; - case 2 /* ExportEquals */: - break; - } - if (indirectSearch) { - for (const indirectUser of indirectUsers) { - searchForName(indirectUser, indirectSearch, state); - } - } - } - } - function eachExportReference(sourceFiles, checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName, isDefaultExport, cb) { - const importTracker = createImportTracker(sourceFiles, new Set(sourceFiles.map((f) => f.fileName)), checker, cancellationToken); - const { importSearches, indirectUsers, singleReferences } = importTracker( - exportSymbol, - { exportKind: isDefaultExport ? 1 /* Default */ : 0 /* Named */, exportingModuleSymbol }, - /*isForRename*/ - false - ); - for (const [importLocation] of importSearches) { - cb(importLocation); - } - for (const singleReference of singleReferences) { - if (isIdentifier(singleReference) && isImportTypeNode(singleReference.parent)) { - cb(singleReference); - } - } - for (const indirectUser of indirectUsers) { - for (const node of getPossibleSymbolReferenceNodes(indirectUser, isDefaultExport ? "default" : exportName)) { - const symbol = checker.getSymbolAtLocation(node); - const hasExportAssignmentDeclaration = some(symbol == null ? void 0 : symbol.declarations, (d) => tryCast(d, isExportAssignment) ? true : false); - if (isIdentifier(node) && !isImportOrExportSpecifier(node.parent) && (symbol === exportSymbol || hasExportAssignmentDeclaration)) { - cb(node); - } - } - } - } - Core2.eachExportReference = eachExportReference; - function shouldAddSingleReference(singleRef, state) { - if (!hasMatchingMeaning(singleRef, state)) - return false; - if (state.options.use !== 2 /* Rename */) - return true; - if (!isIdentifier(singleRef)) - return false; - return !(isImportOrExportSpecifier(singleRef.parent) && singleRef.escapedText === "default" /* Default */); - } - function searchForImportedSymbol(symbol, state) { - if (!symbol.declarations) - return; - for (const declaration of symbol.declarations) { - const exportingFile = declaration.getSourceFile(); - getReferencesInSourceFile(exportingFile, state.createSearch(declaration, symbol, 0 /* Import */), state, state.includesSourceFile(exportingFile)); - } - } - function searchForName(sourceFile, search, state) { - if (getNameTable(sourceFile).get(search.escapedText) !== void 0) { - getReferencesInSourceFile(sourceFile, search, state); - } - } - function getPropertySymbolOfDestructuringAssignment(location, checker) { - return isArrayLiteralOrObjectLiteralDestructuringPattern(location.parent.parent) ? checker.getPropertySymbolOfDestructuringAssignment(location) : void 0; - } - function getSymbolScope(symbol) { - const { declarations, flags, parent: parent2, valueDeclaration } = symbol; - if (valueDeclaration && (valueDeclaration.kind === 218 /* FunctionExpression */ || valueDeclaration.kind === 231 /* ClassExpression */)) { - return valueDeclaration; - } - if (!declarations) { - return void 0; - } - if (flags & (4 /* Property */ | 8192 /* Method */)) { - const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); - if (privateDeclaration) { - return getAncestor(privateDeclaration, 263 /* ClassDeclaration */); - } - return void 0; - } - if (declarations.some(isObjectBindingElementWithoutPropertyName)) { - return void 0; - } - const exposedByParent = parent2 && !(symbol.flags & 262144 /* TypeParameter */); - if (exposedByParent && !(isExternalModuleSymbol(parent2) && !parent2.globalExports)) { - return void 0; - } - let scope; - for (const declaration of declarations) { - const container = getContainerNode(declaration); - if (scope && scope !== container) { - return void 0; - } - if (!container || container.kind === 312 /* SourceFile */ && !isExternalOrCommonJsModule(container)) { - return void 0; - } - scope = container; - if (isFunctionExpression(scope)) { - let next; - while (next = getNextJSDocCommentLocation(scope)) { - scope = next; - } - } - } - return exposedByParent ? scope.getSourceFile() : scope; - } - function isSymbolReferencedInFile(definition, checker, sourceFile, searchContainer = sourceFile) { - return eachSymbolReferenceInFile(definition, checker, sourceFile, () => true, searchContainer) || false; - } - Core2.isSymbolReferencedInFile = isSymbolReferencedInFile; - function eachSymbolReferenceInFile(definition, checker, sourceFile, cb, searchContainer = sourceFile) { - const symbol = isParameterPropertyDeclaration(definition.parent, definition.parent.parent) ? first(checker.getSymbolsOfParameterPropertyDeclaration(definition.parent, definition.text)) : checker.getSymbolAtLocation(definition); - if (!symbol) - return void 0; - for (const token of getPossibleSymbolReferenceNodes(sourceFile, symbol.name, searchContainer)) { - if (!isIdentifier(token) || token === definition || token.escapedText !== definition.escapedText) - continue; - const referenceSymbol = checker.getSymbolAtLocation(token); - if (referenceSymbol === symbol || checker.getShorthandAssignmentValueSymbol(token.parent) === symbol || isExportSpecifier(token.parent) && getLocalSymbolForExportSpecifier(token, referenceSymbol, token.parent, checker) === symbol) { - const res = cb(token); - if (res) - return res; - } - } - } - Core2.eachSymbolReferenceInFile = eachSymbolReferenceInFile; - function getTopMostDeclarationNamesInFile(declarationName, sourceFile) { - const candidates = filter(getPossibleSymbolReferenceNodes(sourceFile, declarationName), (name) => !!getDeclarationFromName(name)); - return candidates.reduce((topMost, decl) => { - const depth = getDepth(decl); - if (!some(topMost.declarationNames) || depth === topMost.depth) { - topMost.declarationNames.push(decl); - topMost.depth = depth; - } else if (depth < topMost.depth) { - topMost.declarationNames = [decl]; - topMost.depth = depth; - } - return topMost; - }, { depth: Infinity, declarationNames: [] }).declarationNames; - function getDepth(declaration) { - let depth = 0; - while (declaration) { - declaration = getContainerNode(declaration); - depth++; - } - return depth; - } - } - Core2.getTopMostDeclarationNamesInFile = getTopMostDeclarationNamesInFile; - function someSignatureUsage(signature, sourceFiles, checker, cb) { - if (!signature.name || !isIdentifier(signature.name)) - return false; - const symbol = Debug.checkDefined(checker.getSymbolAtLocation(signature.name)); - for (const sourceFile of sourceFiles) { - for (const name of getPossibleSymbolReferenceNodes(sourceFile, symbol.name)) { - if (!isIdentifier(name) || name === signature.name || name.escapedText !== signature.name.escapedText) - continue; - const called = climbPastPropertyAccess(name); - const call = isCallExpression(called.parent) && called.parent.expression === called ? called.parent : void 0; - const referenceSymbol = checker.getSymbolAtLocation(name); - if (referenceSymbol && checker.getRootSymbols(referenceSymbol).some((s) => s === symbol)) { - if (cb(name, call)) { - return true; - } - } - } - } - return false; - } - Core2.someSignatureUsage = someSignatureUsage; - function getPossibleSymbolReferenceNodes(sourceFile, symbolName2, container = sourceFile) { - return mapDefined(getPossibleSymbolReferencePositions(sourceFile, symbolName2, container), (pos) => { - const referenceLocation = getTouchingPropertyName(sourceFile, pos); - return referenceLocation === sourceFile ? void 0 : referenceLocation; - }); - } - function getPossibleSymbolReferencePositions(sourceFile, symbolName2, container = sourceFile) { - const positions = []; - if (!symbolName2 || !symbolName2.length) { - return positions; - } - const text = sourceFile.text; - const sourceLength = text.length; - const symbolNameLength = symbolName2.length; - let position = text.indexOf(symbolName2, container.pos); - while (position >= 0) { - if (position > container.end) - break; - const endPosition = position + symbolNameLength; - if ((position === 0 || !isIdentifierPart(text.charCodeAt(position - 1), 99 /* Latest */)) && (endPosition === sourceLength || !isIdentifierPart(text.charCodeAt(endPosition), 99 /* Latest */))) { - positions.push(position); - } - position = text.indexOf(symbolName2, position + symbolNameLength + 1); - } - return positions; - } - function getLabelReferencesInNode(container, targetLabel) { - const sourceFile = container.getSourceFile(); - const labelName = targetLabel.text; - const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, labelName, container), (node) => ( - // Only pick labels that are either the target label, or have a target that is the target label - node === targetLabel || isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel ? nodeEntry(node) : void 0 - )); - return [{ definition: { type: 1 /* Label */, node: targetLabel }, references }]; - } - function isValidReferencePosition(node, searchSymbolName) { - switch (node.kind) { - case 81 /* PrivateIdentifier */: - if (isJSDocMemberName(node.parent)) { - return true; - } - case 80 /* Identifier */: - return node.text.length === searchSymbolName.length; - case 15 /* NoSubstitutionTemplateLiteral */: - case 11 /* StringLiteral */: { - const str = node; - return (isLiteralNameOfPropertyDeclarationOrIndexAccess(str) || isNameOfModuleDeclaration(node) || isExpressionOfExternalModuleImportEqualsDeclaration(node) || isCallExpression(node.parent) && isBindableObjectDefinePropertyCall(node.parent) && node.parent.arguments[1] === node) && str.text.length === searchSymbolName.length; - } - case 9 /* NumericLiteral */: - return isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && node.text.length === searchSymbolName.length; - case 90 /* DefaultKeyword */: - return "default".length === searchSymbolName.length; - default: - return false; - } - } - function getAllReferencesForImportMeta(sourceFiles, cancellationToken) { - const references = flatMap(sourceFiles, (sourceFile) => { - cancellationToken.throwIfCancellationRequested(); - return mapDefined(getPossibleSymbolReferenceNodes(sourceFile, "meta", sourceFile), (node) => { - const parent2 = node.parent; - if (isImportMeta(parent2)) { - return nodeEntry(parent2); - } - }); - }); - return references.length ? [{ definition: { type: 2 /* Keyword */, node: references[0].node }, references }] : void 0; - } - function getAllReferencesForKeyword(sourceFiles, keywordKind, cancellationToken, filter2) { - const references = flatMap(sourceFiles, (sourceFile) => { - cancellationToken.throwIfCancellationRequested(); - return mapDefined(getPossibleSymbolReferenceNodes(sourceFile, tokenToString(keywordKind), sourceFile), (referenceLocation) => { - if (referenceLocation.kind === keywordKind && (!filter2 || filter2(referenceLocation))) { - return nodeEntry(referenceLocation); - } - }); - }); - return references.length ? [{ definition: { type: 2 /* Keyword */, node: references[0].node }, references }] : void 0; - } - function getReferencesInSourceFile(sourceFile, search, state, addReferencesHere = true) { - state.cancellationToken.throwIfCancellationRequested(); - return getReferencesInContainer(sourceFile, sourceFile, search, state, addReferencesHere); - } - function getReferencesInContainer(container, sourceFile, search, state, addReferencesHere) { - if (!state.markSearchedSymbols(sourceFile, search.allSearchSymbols)) { - return; - } - for (const position of getPossibleSymbolReferencePositions(sourceFile, search.text, container)) { - getReferencesAtLocation(sourceFile, position, search, state, addReferencesHere); - } - } - function hasMatchingMeaning(referenceLocation, state) { - return !!(getMeaningFromLocation(referenceLocation) & state.searchMeaning); - } - function getReferencesAtLocation(sourceFile, position, search, state, addReferencesHere) { - const referenceLocation = getTouchingPropertyName(sourceFile, position); - if (!isValidReferencePosition(referenceLocation, search.text)) { - if (!state.options.implementations && (state.options.findInStrings && isInString(sourceFile, position) || state.options.findInComments && isInNonReferenceComment(sourceFile, position))) { - state.addStringOrCommentReference(sourceFile.fileName, createTextSpan(position, search.text.length)); - } - return; - } - if (!hasMatchingMeaning(referenceLocation, state)) - return; - let referenceSymbol = state.checker.getSymbolAtLocation(referenceLocation); - if (!referenceSymbol) { - return; - } - const parent2 = referenceLocation.parent; - if (isImportSpecifier(parent2) && parent2.propertyName === referenceLocation) { - return; - } - if (isExportSpecifier(parent2)) { - Debug.assert(referenceLocation.kind === 80 /* Identifier */); - getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, parent2, search, state, addReferencesHere); - return; - } - const relatedSymbol = getRelatedSymbol(search, referenceSymbol, referenceLocation, state); - if (!relatedSymbol) { - getReferenceForShorthandProperty(referenceSymbol, search, state); - return; - } - switch (state.specialSearchKind) { - case 0 /* None */: - if (addReferencesHere) - addReference(referenceLocation, relatedSymbol, state); - break; - case 1 /* Constructor */: - addConstructorReferences(referenceLocation, sourceFile, search, state); - break; - case 2 /* Class */: - addClassStaticThisReferences(referenceLocation, search, state); - break; - default: - Debug.assertNever(state.specialSearchKind); - } - if (isInJSFile(referenceLocation) && isBindingElement(referenceLocation.parent) && isVariableDeclarationInitializedToBareOrAccessedRequire(referenceLocation.parent.parent.parent)) { - referenceSymbol = referenceLocation.parent.symbol; - if (!referenceSymbol) - return; - } - getImportOrExportReferences(referenceLocation, referenceSymbol, search, state); - } - function getReferencesAtExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, search, state, addReferencesHere, alwaysGetReferences) { - Debug.assert(!alwaysGetReferences || !!state.options.providePrefixAndSuffixTextForRename, "If alwaysGetReferences is true, then prefix/suffix text must be enabled"); - const { parent: parent2, propertyName, name } = exportSpecifier; - const exportDeclaration = parent2.parent; - const localSymbol = getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, state.checker); - if (!alwaysGetReferences && !search.includes(localSymbol)) { - return; - } - if (!propertyName) { - if (!(state.options.use === 2 /* Rename */ && name.escapedText === "default" /* Default */)) { - addRef(); - } - } else if (referenceLocation === propertyName) { - if (!exportDeclaration.moduleSpecifier) { - addRef(); - } - if (addReferencesHere && state.options.use !== 2 /* Rename */ && state.markSeenReExportRHS(name)) { - addReference(name, Debug.checkDefined(exportSpecifier.symbol), state); - } - } else { - if (state.markSeenReExportRHS(referenceLocation)) { - addRef(); - } - } - if (!isForRenameWithPrefixAndSuffixText(state.options) || alwaysGetReferences) { - const isDefaultExport = referenceLocation.escapedText === "default" || exportSpecifier.name.escapedText === "default"; - const exportKind = isDefaultExport ? 1 /* Default */ : 0 /* Named */; - const exportSymbol = Debug.checkDefined(exportSpecifier.symbol); - const exportInfo = getExportInfo(exportSymbol, exportKind, state.checker); - if (exportInfo) { - searchForImportsOfExport(referenceLocation, exportSymbol, exportInfo, state); - } - } - if (search.comingFrom !== 1 /* Export */ && exportDeclaration.moduleSpecifier && !propertyName && !isForRenameWithPrefixAndSuffixText(state.options)) { - const imported = state.checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); - if (imported) - searchForImportedSymbol(imported, state); - } - function addRef() { - if (addReferencesHere) - addReference(referenceLocation, localSymbol, state); - } - } - function getLocalSymbolForExportSpecifier(referenceLocation, referenceSymbol, exportSpecifier, checker) { - return isExportSpecifierAlias(referenceLocation, exportSpecifier) && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier) || referenceSymbol; - } - function isExportSpecifierAlias(referenceLocation, exportSpecifier) { - const { parent: parent2, propertyName, name } = exportSpecifier; - Debug.assert(propertyName === referenceLocation || name === referenceLocation); - if (propertyName) { - return propertyName === referenceLocation; - } else { - return !parent2.parent.moduleSpecifier; - } - } - function getImportOrExportReferences(referenceLocation, referenceSymbol, search, state) { - const importOrExport = getImportOrExportSymbol(referenceLocation, referenceSymbol, state.checker, search.comingFrom === 1 /* Export */); - if (!importOrExport) - return; - const { symbol } = importOrExport; - if (importOrExport.kind === 0 /* Import */) { - if (!isForRenameWithPrefixAndSuffixText(state.options)) { - searchForImportedSymbol(symbol, state); - } - } else { - searchForImportsOfExport(referenceLocation, symbol, importOrExport.exportInfo, state); - } - } - function getReferenceForShorthandProperty({ flags, valueDeclaration }, search, state) { - const shorthandValueSymbol = state.checker.getShorthandAssignmentValueSymbol(valueDeclaration); - const name = valueDeclaration && getNameOfDeclaration(valueDeclaration); - if (!(flags & 33554432 /* Transient */) && name && search.includes(shorthandValueSymbol)) { - addReference(name, shorthandValueSymbol, state); - } - } - function addReference(referenceLocation, relatedSymbol, state) { - const { kind, symbol } = "kind" in relatedSymbol ? relatedSymbol : { kind: void 0, symbol: relatedSymbol }; - if (state.options.use === 2 /* Rename */ && referenceLocation.kind === 90 /* DefaultKeyword */) { - return; - } - const addRef = state.referenceAdder(symbol); - if (state.options.implementations) { - addImplementationReferences(referenceLocation, addRef, state); - } else { - addRef(referenceLocation, kind); - } - } - function addConstructorReferences(referenceLocation, sourceFile, search, state) { - if (isNewExpressionTarget(referenceLocation)) { - addReference(referenceLocation, search.symbol, state); - } - const pusher = () => state.referenceAdder(search.symbol); - if (isClassLike(referenceLocation.parent)) { - Debug.assert(referenceLocation.kind === 90 /* DefaultKeyword */ || referenceLocation.parent.name === referenceLocation); - findOwnConstructorReferences(search.symbol, sourceFile, pusher()); - } else { - const classExtending = tryGetClassByExtendingIdentifier(referenceLocation); - if (classExtending) { - findSuperConstructorAccesses(classExtending, pusher()); - findInheritedConstructorReferences(classExtending, state); - } - } - } - function addClassStaticThisReferences(referenceLocation, search, state) { - addReference(referenceLocation, search.symbol, state); - const classLike = referenceLocation.parent; - if (state.options.use === 2 /* Rename */ || !isClassLike(classLike)) - return; - Debug.assert(classLike.name === referenceLocation); - const addRef = state.referenceAdder(search.symbol); - for (const member of classLike.members) { - if (!(isMethodOrAccessor(member) && isStatic(member))) { - continue; - } - if (member.body) { - member.body.forEachChild(function cb(node) { - if (node.kind === 110 /* ThisKeyword */) { - addRef(node); - } else if (!isFunctionLike(node) && !isClassLike(node)) { - node.forEachChild(cb); - } - }); - } - } - } - function findOwnConstructorReferences(classSymbol, sourceFile, addNode) { - const constructorSymbol = getClassConstructorSymbol(classSymbol); - if (constructorSymbol && constructorSymbol.declarations) { - for (const decl of constructorSymbol.declarations) { - const ctrKeyword = findChildOfKind(decl, 137 /* ConstructorKeyword */, sourceFile); - Debug.assert(decl.kind === 176 /* Constructor */ && !!ctrKeyword); - addNode(ctrKeyword); - } - } - if (classSymbol.exports) { - classSymbol.exports.forEach((member) => { - const decl = member.valueDeclaration; - if (decl && decl.kind === 174 /* MethodDeclaration */) { - const body = decl.body; - if (body) { - forEachDescendantOfKind(body, 110 /* ThisKeyword */, (thisKeyword) => { - if (isNewExpressionTarget(thisKeyword)) { - addNode(thisKeyword); - } - }); - } - } - }); - } - } - function getClassConstructorSymbol(classSymbol) { - return classSymbol.members && classSymbol.members.get("__constructor" /* Constructor */); - } - function findSuperConstructorAccesses(classDeclaration, addNode) { - const constructor = getClassConstructorSymbol(classDeclaration.symbol); - if (!(constructor && constructor.declarations)) { - return; - } - for (const decl of constructor.declarations) { - Debug.assert(decl.kind === 176 /* Constructor */); - const body = decl.body; - if (body) { - forEachDescendantOfKind(body, 108 /* SuperKeyword */, (node) => { - if (isCallExpressionTarget(node)) { - addNode(node); - } - }); - } - } - } - function hasOwnConstructor(classDeclaration) { - return !!getClassConstructorSymbol(classDeclaration.symbol); - } - function findInheritedConstructorReferences(classDeclaration, state) { - if (hasOwnConstructor(classDeclaration)) - return; - const classSymbol = classDeclaration.symbol; - const search = state.createSearch( - /*location*/ - void 0, - classSymbol, - /*comingFrom*/ - void 0 - ); - getReferencesInContainerOrFiles(classSymbol, state, search); - } - function addImplementationReferences(refNode, addReference2, state) { - if (isDeclarationName(refNode) && isImplementation(refNode.parent)) { - addReference2(refNode); - return; - } - if (refNode.kind !== 80 /* Identifier */) { - return; - } - if (refNode.parent.kind === 304 /* ShorthandPropertyAssignment */) { - getReferenceEntriesForShorthandPropertyAssignment(refNode, state.checker, addReference2); - } - const containingNode = getContainingNodeIfInHeritageClause(refNode); - if (containingNode) { - addReference2(containingNode); - return; - } - const typeNode = findAncestor(refNode, (a) => !isQualifiedName(a.parent) && !isTypeNode(a.parent) && !isTypeElement(a.parent)); - const typeHavingNode = typeNode.parent; - if (hasType(typeHavingNode) && typeHavingNode.type === typeNode && state.markSeenContainingTypeReference(typeHavingNode)) { - if (hasInitializer(typeHavingNode)) { - addIfImplementation(typeHavingNode.initializer); - } else if (isFunctionLike(typeHavingNode) && typeHavingNode.body) { - const body = typeHavingNode.body; - if (body.kind === 241 /* Block */) { - forEachReturnStatement(body, (returnStatement) => { - if (returnStatement.expression) - addIfImplementation(returnStatement.expression); - }); - } else { - addIfImplementation(body); - } - } else if (isAssertionExpression(typeHavingNode)) { - addIfImplementation(typeHavingNode.expression); - } - } - function addIfImplementation(e) { - if (isImplementationExpression(e)) - addReference2(e); - } - } - function getContainingNodeIfInHeritageClause(node) { - return isIdentifier(node) || isPropertyAccessExpression(node) ? getContainingNodeIfInHeritageClause(node.parent) : isExpressionWithTypeArguments(node) ? tryCast(node.parent.parent, or(isClassLike, isInterfaceDeclaration)) : void 0; - } - function isImplementationExpression(node) { - switch (node.kind) { - case 217 /* ParenthesizedExpression */: - return isImplementationExpression(node.expression); - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - case 210 /* ObjectLiteralExpression */: - case 231 /* ClassExpression */: - case 209 /* ArrayLiteralExpression */: - return true; - default: - return false; - } - } - function explicitlyInheritsFrom(symbol, parent2, cachedResults, checker) { - if (symbol === parent2) { - return true; - } - const key = getSymbolId(symbol) + "," + getSymbolId(parent2); - const cached = cachedResults.get(key); - if (cached !== void 0) { - return cached; - } - cachedResults.set(key, false); - const inherits = !!symbol.declarations && symbol.declarations.some((declaration) => getAllSuperTypeNodes(declaration).some((typeReference) => { - const type = checker.getTypeAtLocation(typeReference); - return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent2, cachedResults, checker); - })); - cachedResults.set(key, inherits); - return inherits; - } - function getReferencesForSuperKeyword(superKeyword) { - let searchSpaceNode = getSuperContainer( - superKeyword, - /*stopOnFunctions*/ - false - ); - if (!searchSpaceNode) { - return void 0; - } - let staticFlag = 32 /* Static */; - switch (searchSpaceNode.kind) { - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - staticFlag &= getSyntacticModifierFlags(searchSpaceNode); - searchSpaceNode = searchSpaceNode.parent; - break; - default: - return void 0; - } - const sourceFile = searchSpaceNode.getSourceFile(); - const references = mapDefined(getPossibleSymbolReferenceNodes(sourceFile, "super", searchSpaceNode), (node) => { - if (node.kind !== 108 /* SuperKeyword */) { - return; - } - const container = getSuperContainer( - node, - /*stopOnFunctions*/ - false - ); - return container && isStatic(container) === !!staticFlag && container.parent.symbol === searchSpaceNode.symbol ? nodeEntry(node) : void 0; - }); - return [{ definition: { type: 0 /* Symbol */, symbol: searchSpaceNode.symbol }, references }]; - } - function isParameterName(node) { - return node.kind === 80 /* Identifier */ && node.parent.kind === 169 /* Parameter */ && node.parent.name === node; - } - function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) { - let searchSpaceNode = getThisContainer( - thisOrSuperKeyword, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - let staticFlag = 32 /* Static */; - switch (searchSpaceNode.kind) { - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - if (isObjectLiteralMethod(searchSpaceNode)) { - staticFlag &= getSyntacticModifierFlags(searchSpaceNode); - searchSpaceNode = searchSpaceNode.parent; - break; - } - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - staticFlag &= getSyntacticModifierFlags(searchSpaceNode); - searchSpaceNode = searchSpaceNode.parent; - break; - case 312 /* SourceFile */: - if (isExternalModule(searchSpaceNode) || isParameterName(thisOrSuperKeyword)) { - return void 0; - } - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - break; - default: - return void 0; - } - const references = flatMap(searchSpaceNode.kind === 312 /* SourceFile */ ? sourceFiles : [searchSpaceNode.getSourceFile()], (sourceFile) => { - cancellationToken.throwIfCancellationRequested(); - return getPossibleSymbolReferenceNodes(sourceFile, "this", isSourceFile(searchSpaceNode) ? sourceFile : searchSpaceNode).filter((node) => { - if (!isThis(node)) { - return false; - } - const container = getThisContainer( - node, - /*includeArrowFunctions*/ - false, - /*includeClassComputedPropertyName*/ - false - ); - if (!canHaveSymbol(container)) - return false; - switch (searchSpaceNode.kind) { - case 218 /* FunctionExpression */: - case 262 /* FunctionDeclaration */: - return searchSpaceNode.symbol === container.symbol; - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - return isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol; - case 231 /* ClassExpression */: - case 263 /* ClassDeclaration */: - case 210 /* ObjectLiteralExpression */: - return container.parent && canHaveSymbol(container.parent) && searchSpaceNode.symbol === container.parent.symbol && isStatic(container) === !!staticFlag; - case 312 /* SourceFile */: - return container.kind === 312 /* SourceFile */ && !isExternalModule(container) && !isParameterName(node); - } - }); - }).map((n) => nodeEntry(n)); - const thisParameter = firstDefined(references, (r) => isParameter(r.node.parent) ? r.node : void 0); - return [{ - definition: { type: 3 /* This */, node: thisParameter || thisOrSuperKeyword }, - references - }]; - } - function getReferencesForStringLiteral(node, sourceFiles, checker, cancellationToken) { - const type = getContextualTypeFromParentOrAncestorTypeNode(node, checker); - const references = flatMap(sourceFiles, (sourceFile) => { - cancellationToken.throwIfCancellationRequested(); - return mapDefined(getPossibleSymbolReferenceNodes(sourceFile, node.text), (ref) => { - if (isStringLiteralLike(ref) && ref.text === node.text) { - if (type) { - const refType = getContextualTypeFromParentOrAncestorTypeNode(ref, checker); - if (type !== checker.getStringType() && type === refType) { - return nodeEntry(ref, 2 /* StringLiteral */); - } - } else { - return isNoSubstitutionTemplateLiteral(ref) && !rangeIsOnSingleLine(ref, sourceFile) ? void 0 : nodeEntry(ref, 2 /* StringLiteral */); - } - } - }); - }); - return [{ - definition: { type: 4 /* String */, node }, - references - }]; - } - function populateSearchSymbolSet(symbol, location, checker, isForRename, providePrefixAndSuffixText, implementations) { - const result = []; - forEachRelatedSymbol( - symbol, - location, - checker, - isForRename, - !(isForRename && providePrefixAndSuffixText), - (sym, root, base) => { - if (base) { - if (isStaticSymbol(symbol) !== isStaticSymbol(base)) { - base = void 0; - } - } - result.push(base || root || sym); - }, - // when try to find implementation, implementations is true, and not allowed to find base class - /*allowBaseTypes*/ - () => !implementations - ); - return result; - } - function forEachRelatedSymbol(symbol, location, checker, isForRenamePopulateSearchSymbolSet, onlyIncludeBindingElementAtReferenceLocation, cbSymbol, allowBaseTypes) { - const containingObjectLiteralElement = getContainingObjectLiteralElement(location); - if (containingObjectLiteralElement) { - const shorthandValueSymbol = checker.getShorthandAssignmentValueSymbol(location.parent); - if (shorthandValueSymbol && isForRenamePopulateSearchSymbolSet) { - return cbSymbol( - shorthandValueSymbol, - /*rootSymbol*/ - void 0, - /*baseSymbol*/ - void 0, - 3 /* SearchedLocalFoundProperty */ - ); - } - const contextualType = checker.getContextualType(containingObjectLiteralElement.parent); - const res2 = contextualType && firstDefined( - getPropertySymbolsFromContextualType( - containingObjectLiteralElement, - checker, - contextualType, - /*unionSymbolOk*/ - true - ), - (sym) => fromRoot(sym, 4 /* SearchedPropertyFoundLocal */) - ); - if (res2) - return res2; - const propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker); - const res1 = propertySymbol && cbSymbol( - propertySymbol, - /*rootSymbol*/ - void 0, - /*baseSymbol*/ - void 0, - 4 /* SearchedPropertyFoundLocal */ - ); - if (res1) - return res1; - const res22 = shorthandValueSymbol && cbSymbol( - shorthandValueSymbol, - /*rootSymbol*/ - void 0, - /*baseSymbol*/ - void 0, - 3 /* SearchedLocalFoundProperty */ - ); - if (res22) - return res22; - } - const aliasedSymbol = getMergedAliasedSymbolOfNamespaceExportDeclaration(location, symbol, checker); - if (aliasedSymbol) { - const res2 = cbSymbol( - aliasedSymbol, - /*rootSymbol*/ - void 0, - /*baseSymbol*/ - void 0, - 1 /* Node */ - ); - if (res2) - return res2; - } - const res = fromRoot(symbol); - if (res) - return res; - if (symbol.valueDeclaration && isParameterPropertyDeclaration(symbol.valueDeclaration, symbol.valueDeclaration.parent)) { - const paramProps = checker.getSymbolsOfParameterPropertyDeclaration(cast(symbol.valueDeclaration, isParameter), symbol.name); - Debug.assert(paramProps.length === 2 && !!(paramProps[0].flags & 1 /* FunctionScopedVariable */) && !!(paramProps[1].flags & 4 /* Property */)); - return fromRoot(symbol.flags & 1 /* FunctionScopedVariable */ ? paramProps[1] : paramProps[0]); - } - const exportSpecifier = getDeclarationOfKind(symbol, 281 /* ExportSpecifier */); - if (!isForRenamePopulateSearchSymbolSet || exportSpecifier && !exportSpecifier.propertyName) { - const localSymbol = exportSpecifier && checker.getExportSpecifierLocalTargetSymbol(exportSpecifier); - if (localSymbol) { - const res2 = cbSymbol( - localSymbol, - /*rootSymbol*/ - void 0, - /*baseSymbol*/ - void 0, - 1 /* Node */ - ); - if (res2) - return res2; - } - } - if (!isForRenamePopulateSearchSymbolSet) { - let bindingElementPropertySymbol; - if (onlyIncludeBindingElementAtReferenceLocation) { - bindingElementPropertySymbol = isObjectBindingElementWithoutPropertyName(location.parent) ? getPropertySymbolFromBindingElement(checker, location.parent) : void 0; - } else { - bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker); - } - return bindingElementPropertySymbol && fromRoot(bindingElementPropertySymbol, 4 /* SearchedPropertyFoundLocal */); - } - Debug.assert(isForRenamePopulateSearchSymbolSet); - const includeOriginalSymbolOfBindingElement = onlyIncludeBindingElementAtReferenceLocation; - if (includeOriginalSymbolOfBindingElement) { - const bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker); - return bindingElementPropertySymbol && fromRoot(bindingElementPropertySymbol, 4 /* SearchedPropertyFoundLocal */); - } - function fromRoot(sym, kind) { - return firstDefined(checker.getRootSymbols(sym), (rootSymbol) => cbSymbol( - sym, - rootSymbol, - /*baseSymbol*/ - void 0, - kind - ) || (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */) && allowBaseTypes(rootSymbol) ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, (base) => cbSymbol(sym, rootSymbol, base, kind)) : void 0)); - } - function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol2, checker2) { - const bindingElement = getDeclarationOfKind(symbol2, 208 /* BindingElement */); - if (bindingElement && isObjectBindingElementWithoutPropertyName(bindingElement)) { - return getPropertySymbolFromBindingElement(checker2, bindingElement); - } - } - } - function getPropertySymbolsFromBaseTypes(symbol, propertyName, checker, cb) { - const seen = /* @__PURE__ */ new Map(); - return recur(symbol); - function recur(symbol2) { - if (!(symbol2.flags & (32 /* Class */ | 64 /* Interface */)) || !addToSeen(seen, getSymbolId(symbol2))) - return; - return firstDefined(symbol2.declarations, (declaration) => firstDefined(getAllSuperTypeNodes(declaration), (typeReference) => { - const type = checker.getTypeAtLocation(typeReference); - const propertySymbol = type && type.symbol && checker.getPropertyOfType(type, propertyName); - return type && propertySymbol && (firstDefined(checker.getRootSymbols(propertySymbol), cb) || recur(type.symbol)); - })); - } - } - function isStaticSymbol(symbol) { - if (!symbol.valueDeclaration) - return false; - const modifierFlags = getEffectiveModifierFlags(symbol.valueDeclaration); - return !!(modifierFlags & 32 /* Static */); - } - function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) { - const { checker } = state; - return forEachRelatedSymbol( - referenceSymbol, - referenceLocation, - checker, - /*isForRenamePopulateSearchSymbolSet*/ - false, - /*onlyIncludeBindingElementAtReferenceLocation*/ - state.options.use !== 2 /* Rename */ || !!state.options.providePrefixAndSuffixTextForRename, - (sym, rootSymbol, baseSymbol, kind) => { - if (baseSymbol) { - if (isStaticSymbol(referenceSymbol) !== isStaticSymbol(baseSymbol)) { - baseSymbol = void 0; - } - } - return search.includes(baseSymbol || rootSymbol || sym) ? { symbol: rootSymbol && !(getCheckFlags(sym) & 6 /* Synthetic */) ? rootSymbol : sym, kind } : void 0; - }, - /*allowBaseTypes*/ - (rootSymbol) => !(search.parents && !search.parents.some((parent2) => explicitlyInheritsFrom(rootSymbol.parent, parent2, state.inheritsFromCache, checker))) - ); - } - function getIntersectingMeaningFromDeclarations(node, symbol) { - let meaning = getMeaningFromLocation(node); - const { declarations } = symbol; - if (declarations) { - let lastIterationMeaning; - do { - lastIterationMeaning = meaning; - for (const declaration of declarations) { - const declarationMeaning = getMeaningFromDeclaration(declaration); - if (declarationMeaning & meaning) { - meaning |= declarationMeaning; - } - } - } while (meaning !== lastIterationMeaning); - } - return meaning; - } - Core2.getIntersectingMeaningFromDeclarations = getIntersectingMeaningFromDeclarations; - function isImplementation(node) { - return !!(node.flags & 33554432 /* Ambient */) ? !(isInterfaceDeclaration(node) || isTypeAliasDeclaration(node)) : isVariableLike(node) ? hasInitializer(node) : isFunctionLikeDeclaration(node) ? !!node.body : isClassLike(node) || isModuleOrEnumDeclaration(node); - } - function getReferenceEntriesForShorthandPropertyAssignment(node, checker, addReference2) { - const refSymbol = checker.getSymbolAtLocation(node); - const shorthandSymbol = checker.getShorthandAssignmentValueSymbol(refSymbol.valueDeclaration); - if (shorthandSymbol) { - for (const declaration of shorthandSymbol.getDeclarations()) { - if (getMeaningFromDeclaration(declaration) & 1 /* Value */) { - addReference2(declaration); - } - } - } - } - Core2.getReferenceEntriesForShorthandPropertyAssignment = getReferenceEntriesForShorthandPropertyAssignment; - function forEachDescendantOfKind(node, kind, action) { - forEachChild(node, (child) => { - if (child.kind === kind) { - action(child); - } - forEachDescendantOfKind(child, kind, action); - }); - } - function tryGetClassByExtendingIdentifier(node) { - return tryGetClassExtendingExpressionWithTypeArguments(climbPastPropertyAccess(node).parent); - } - function getParentSymbolsOfPropertyAccess(location, symbol, checker) { - const propertyAccessExpression = isRightSideOfPropertyAccess(location) ? location.parent : void 0; - const lhsType = propertyAccessExpression && checker.getTypeAtLocation(propertyAccessExpression.expression); - const res = mapDefined(lhsType && (lhsType.isUnionOrIntersection() ? lhsType.types : lhsType.symbol === symbol.parent ? void 0 : [lhsType]), (t) => t.symbol && t.symbol.flags & (32 /* Class */ | 64 /* Interface */) ? t.symbol : void 0); - return res.length === 0 ? void 0 : res; - } - function isForRenameWithPrefixAndSuffixText(options) { - return options.use === 2 /* Rename */ && options.providePrefixAndSuffixTextForRename; - } - })(Core || (Core = {})); - } - }); - - // src/services/_namespaces/ts.FindAllReferences.ts - var ts_FindAllReferences_exports = {}; - __export(ts_FindAllReferences_exports, { - Core: () => Core, - DefinitionKind: () => DefinitionKind, - EntryKind: () => EntryKind, - ExportKind: () => ExportKind2, - FindReferencesUse: () => FindReferencesUse, - ImportExport: () => ImportExport, - createImportTracker: () => createImportTracker, - findModuleReferences: () => findModuleReferences, - findReferenceOrRenameEntries: () => findReferenceOrRenameEntries, - findReferencedSymbols: () => findReferencedSymbols, - getContextNode: () => getContextNode, - getExportInfo: () => getExportInfo, - getImplementationsAtPosition: () => getImplementationsAtPosition, - getImportOrExportSymbol: () => getImportOrExportSymbol, - getReferenceEntriesForNode: () => getReferenceEntriesForNode, - getTextSpanOfEntry: () => getTextSpanOfEntry, - isContextWithStartAndEndNode: () => isContextWithStartAndEndNode, - isDeclarationOfSymbol: () => isDeclarationOfSymbol, - isWriteAccessForReference: () => isWriteAccessForReference, - nodeEntry: () => nodeEntry, - toContextSpan: () => toContextSpan, - toHighlightSpan: () => toHighlightSpan, - toReferenceEntry: () => toReferenceEntry, - toRenameLocation: () => toRenameLocation - }); - var init_ts_FindAllReferences = __esm({ - "src/services/_namespaces/ts.FindAllReferences.ts"() { - "use strict"; - init_importTracker(); - init_findAllReferences(); - } - }); - - // src/services/goToDefinition.ts - function getDefinitionAtPosition(program, sourceFile, position, searchOtherFilesOnly, stopAtAlias) { - var _a, _b; - const resolvedRef = getReferenceAtPosition(sourceFile, position, program); - const fileReferenceDefinition = resolvedRef && [getDefinitionInfoForFileReference(resolvedRef.reference.fileName, resolvedRef.fileName, resolvedRef.unverified)] || emptyArray; - if (resolvedRef == null ? void 0 : resolvedRef.file) { - return fileReferenceDefinition; - } - const node = getTouchingPropertyName(sourceFile, position); - if (node === sourceFile) { - return void 0; - } - const { parent: parent2 } = node; - const typeChecker = program.getTypeChecker(); - if (node.kind === 164 /* OverrideKeyword */ || isIdentifier(node) && isJSDocOverrideTag(parent2) && parent2.tagName === node) { - return getDefinitionFromOverriddenMember(typeChecker, node) || emptyArray; - } - if (isJumpStatementTarget(node)) { - const label = getTargetLabel(node.parent, node.text); - return label ? [createDefinitionInfoFromName( - typeChecker, - label, - "label" /* label */, - node.text, - /*containerName*/ - void 0 - )] : void 0; - } - if (node.kind === 107 /* ReturnKeyword */) { - const functionDeclaration = findAncestor(node.parent, (n) => isClassStaticBlockDeclaration(n) ? "quit" : isFunctionLikeDeclaration(n)); - return functionDeclaration ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; - } - if (node.kind === 135 /* AwaitKeyword */) { - const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); - const isAsyncFunction2 = functionDeclaration && some(functionDeclaration.modifiers, (node2) => node2.kind === 134 /* AsyncKeyword */); - return isAsyncFunction2 ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; - } - if (node.kind === 127 /* YieldKeyword */) { - const functionDeclaration = findAncestor(node, (n) => isFunctionLikeDeclaration(n)); - const isGeneratorFunction = functionDeclaration && functionDeclaration.asteriskToken; - return isGeneratorFunction ? [createDefinitionFromSignatureDeclaration(typeChecker, functionDeclaration)] : void 0; - } - if (isStaticModifier(node) && isClassStaticBlockDeclaration(node.parent)) { - const classDecl = node.parent.parent; - const { symbol: symbol2, failedAliasResolution: failedAliasResolution2 } = getSymbol(classDecl, typeChecker, stopAtAlias); - const staticBlocks = filter(classDecl.members, isClassStaticBlockDeclaration); - const containerName = symbol2 ? typeChecker.symbolToString(symbol2, classDecl) : ""; - const sourceFile2 = node.getSourceFile(); - return map(staticBlocks, (staticBlock) => { - let { pos } = moveRangePastModifiers(staticBlock); - pos = skipTrivia(sourceFile2.text, pos); - return createDefinitionInfoFromName( - typeChecker, - staticBlock, - "constructor" /* constructorImplementationElement */, - "static {}", - containerName, - /*unverified*/ - false, - failedAliasResolution2, - { start: pos, length: "static".length } - ); - }); - } - let { symbol, failedAliasResolution } = getSymbol(node, typeChecker, stopAtAlias); - let fallbackNode = node; - if (searchOtherFilesOnly && failedAliasResolution) { - const importDeclaration = forEach([node, ...(symbol == null ? void 0 : symbol.declarations) || emptyArray], (n) => findAncestor(n, isAnyImportOrBareOrAccessedRequire)); - const moduleSpecifier = importDeclaration && tryGetModuleSpecifierFromDeclaration(importDeclaration); - if (moduleSpecifier) { - ({ symbol, failedAliasResolution } = getSymbol(moduleSpecifier, typeChecker, stopAtAlias)); - fallbackNode = moduleSpecifier; - } - } - if (!symbol && isModuleSpecifierLike(fallbackNode)) { - const ref = (_b = (_a = sourceFile.resolvedModules) == null ? void 0 : _a.get(fallbackNode.text, getModeForUsageLocation(sourceFile, fallbackNode))) == null ? void 0 : _b.resolvedModule; - if (ref) { - return [{ - name: fallbackNode.text, - fileName: ref.resolvedFileName, - containerName: void 0, - containerKind: void 0, - kind: "script" /* scriptElement */, - textSpan: createTextSpan(0, 0), - failedAliasResolution, - isAmbient: isDeclarationFileName(ref.resolvedFileName), - unverified: fallbackNode !== node - }]; - } - } - if (!symbol) { - return concatenate(fileReferenceDefinition, getDefinitionInfoForIndexSignatures(node, typeChecker)); - } - if (searchOtherFilesOnly && every(symbol.declarations, (d) => d.getSourceFile().fileName === sourceFile.fileName)) - return void 0; - const calledDeclaration = tryGetSignatureDeclaration(typeChecker, node); - if (calledDeclaration && !(isJsxOpeningLikeElement(node.parent) && isConstructorLike(calledDeclaration))) { - const sigInfo = createDefinitionFromSignatureDeclaration(typeChecker, calledDeclaration, failedAliasResolution); - if (typeChecker.getRootSymbols(symbol).some((s) => symbolMatchesSignature(s, calledDeclaration))) { - return [sigInfo]; - } else { - const defs = getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, calledDeclaration) || emptyArray; - return node.kind === 108 /* SuperKeyword */ ? [sigInfo, ...defs] : [...defs, sigInfo]; - } - } - if (node.parent.kind === 304 /* ShorthandPropertyAssignment */) { - const shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); - const definitions = (shorthandSymbol == null ? void 0 : shorthandSymbol.declarations) ? shorthandSymbol.declarations.map((decl) => createDefinitionInfo( - decl, - typeChecker, - shorthandSymbol, - node, - /*unverified*/ - false, - failedAliasResolution - )) : emptyArray; - return concatenate(definitions, getDefinitionFromObjectLiteralElement(typeChecker, node)); - } - if (isPropertyName(node) && isBindingElement(parent2) && isObjectBindingPattern(parent2.parent) && node === (parent2.propertyName || parent2.name)) { - const name = getNameFromPropertyName(node); - const type = typeChecker.getTypeAtLocation(parent2.parent); - return name === void 0 ? emptyArray : flatMap(type.isUnion() ? type.types : [type], (t) => { - const prop = t.getProperty(name); - return prop && getDefinitionFromSymbol(typeChecker, prop, node); - }); - } - const objectLiteralElementDefinition = getDefinitionFromObjectLiteralElement(typeChecker, node); - return concatenate(fileReferenceDefinition, objectLiteralElementDefinition.length ? objectLiteralElementDefinition : getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution)); - } - function symbolMatchesSignature(s, calledDeclaration) { - var _a; - return s === calledDeclaration.symbol || s === calledDeclaration.symbol.parent || isAssignmentExpression(calledDeclaration.parent) || !isCallLikeExpression(calledDeclaration.parent) && s === ((_a = tryCast(calledDeclaration.parent, canHaveSymbol)) == null ? void 0 : _a.symbol); - } - function getDefinitionFromObjectLiteralElement(typeChecker, node) { - const element = getContainingObjectLiteralElement(node); - if (element) { - const contextualType = element && typeChecker.getContextualType(element.parent); - if (contextualType) { - return flatMap(getPropertySymbolsFromContextualType( - element, - typeChecker, - contextualType, - /*unionSymbolOk*/ - false - ), (propertySymbol) => getDefinitionFromSymbol(typeChecker, propertySymbol, node)); - } - } - return emptyArray; - } - function getDefinitionFromOverriddenMember(typeChecker, node) { - const classElement = findAncestor(node, isClassElement); - if (!(classElement && classElement.name)) - return; - const baseDeclaration = findAncestor(classElement, isClassLike); - if (!baseDeclaration) - return; - const baseTypeNode = getEffectiveBaseTypeNode(baseDeclaration); - if (!baseTypeNode) - return; - const expression = skipParentheses(baseTypeNode.expression); - const base = isClassExpression(expression) ? expression.symbol : typeChecker.getSymbolAtLocation(expression); - if (!base) - return; - const name = unescapeLeadingUnderscores(getTextOfPropertyName(classElement.name)); - const symbol = hasStaticModifier(classElement) ? typeChecker.getPropertyOfType(typeChecker.getTypeOfSymbol(base), name) : typeChecker.getPropertyOfType(typeChecker.getDeclaredTypeOfSymbol(base), name); - if (!symbol) - return; - return getDefinitionFromSymbol(typeChecker, symbol, node); - } - function getReferenceAtPosition(sourceFile, position, program) { - var _a, _b, _c, _d; - const referencePath = findReferenceInPosition(sourceFile.referencedFiles, position); - if (referencePath) { - const file = program.getSourceFileFromReference(sourceFile, referencePath); - return file && { reference: referencePath, fileName: file.fileName, file, unverified: false }; - } - const typeReferenceDirective = findReferenceInPosition(sourceFile.typeReferenceDirectives, position); - if (typeReferenceDirective) { - const reference = (_a = program.getResolvedTypeReferenceDirectives().get(typeReferenceDirective.fileName, typeReferenceDirective.resolutionMode || sourceFile.impliedNodeFormat)) == null ? void 0 : _a.resolvedTypeReferenceDirective; - const file = reference && program.getSourceFile(reference.resolvedFileName); - return file && { reference: typeReferenceDirective, fileName: file.fileName, file, unverified: false }; - } - const libReferenceDirective = findReferenceInPosition(sourceFile.libReferenceDirectives, position); - if (libReferenceDirective) { - const file = program.getLibFileFromReference(libReferenceDirective); - return file && { reference: libReferenceDirective, fileName: file.fileName, file, unverified: false }; - } - if ((_b = sourceFile.resolvedModules) == null ? void 0 : _b.size()) { - const node = getTouchingToken(sourceFile, position); - if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && sourceFile.resolvedModules.has(node.text, getModeForUsageLocation(sourceFile, node))) { - const verifiedFileName = (_d = (_c = sourceFile.resolvedModules.get(node.text, getModeForUsageLocation(sourceFile, node))) == null ? void 0 : _c.resolvedModule) == null ? void 0 : _d.resolvedFileName; - const fileName = verifiedFileName || resolvePath(getDirectoryPath(sourceFile.fileName), node.text); - return { - file: program.getSourceFile(fileName), - fileName, - reference: { - pos: node.getStart(), - end: node.getEnd(), - fileName: node.text - }, - unverified: !verifiedFileName - }; - } - } - return void 0; - } - function shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type) { - const referenceName = type.symbol.name; - if (!typesWithUnwrappedTypeArguments.has(referenceName)) { - return false; - } - const globalType = typeChecker.resolveName( - referenceName, - /*location*/ - void 0, - 788968 /* Type */, - /*excludeGlobals*/ - false - ); - return !!globalType && globalType === type.target.symbol; - } - function shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) { - if (!type.aliasSymbol) { - return false; - } - const referenceName = type.aliasSymbol.name; - if (!typesWithUnwrappedTypeArguments.has(referenceName)) { - return false; - } - const globalType = typeChecker.resolveName( - referenceName, - /*location*/ - void 0, - 788968 /* Type */, - /*excludeGlobals*/ - false - ); - return !!globalType && globalType === type.aliasSymbol; - } - function getFirstTypeArgumentDefinitions(typeChecker, type, node, failedAliasResolution) { - var _a, _b; - if (!!(getObjectFlags(type) & 4 /* Reference */) && shouldUnwrapFirstTypeArgumentTypeDefinitionFromTypeReference(typeChecker, type)) { - return definitionFromType(typeChecker.getTypeArguments(type)[0], typeChecker, node, failedAliasResolution); - } - if (shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type) && type.aliasTypeArguments) { - return definitionFromType(type.aliasTypeArguments[0], typeChecker, node, failedAliasResolution); - } - if (getObjectFlags(type) & 32 /* Mapped */ && type.target && shouldUnwrapFirstTypeArgumentTypeDefinitionFromAlias(typeChecker, type.target)) { - const declaration = (_b = (_a = type.aliasSymbol) == null ? void 0 : _a.declarations) == null ? void 0 : _b[0]; - if (declaration && isTypeAliasDeclaration(declaration) && isTypeReferenceNode(declaration.type) && declaration.type.typeArguments) { - return definitionFromType(typeChecker.getTypeAtLocation(declaration.type.typeArguments[0]), typeChecker, node, failedAliasResolution); - } - } - return []; - } - function getTypeDefinitionAtPosition(typeChecker, sourceFile, position) { - const node = getTouchingPropertyName(sourceFile, position); - if (node === sourceFile) { - return void 0; - } - if (isImportMeta(node.parent) && node.parent.name === node) { - return definitionFromType( - typeChecker.getTypeAtLocation(node.parent), - typeChecker, - node.parent, - /*failedAliasResolution*/ - false - ); - } - const { symbol, failedAliasResolution } = getSymbol( - node, - typeChecker, - /*stopAtAlias*/ - false - ); - if (!symbol) - return void 0; - const typeAtLocation = typeChecker.getTypeOfSymbolAtLocation(symbol, node); - const returnType = tryGetReturnTypeOfFunction(symbol, typeAtLocation, typeChecker); - const fromReturnType = returnType && definitionFromType(returnType, typeChecker, node, failedAliasResolution); - const [resolvedType, typeDefinitions] = fromReturnType && fromReturnType.length !== 0 ? [returnType, fromReturnType] : [typeAtLocation, definitionFromType(typeAtLocation, typeChecker, node, failedAliasResolution)]; - return typeDefinitions.length ? [...getFirstTypeArgumentDefinitions(typeChecker, resolvedType, node, failedAliasResolution), ...typeDefinitions] : !(symbol.flags & 111551 /* Value */) && symbol.flags & 788968 /* Type */ ? getDefinitionFromSymbol(typeChecker, skipAlias(symbol, typeChecker), node, failedAliasResolution) : void 0; - } - function definitionFromType(type, checker, node, failedAliasResolution) { - return flatMap(type.isUnion() && !(type.flags & 32 /* Enum */) ? type.types : [type], (t) => t.symbol && getDefinitionFromSymbol(checker, t.symbol, node, failedAliasResolution)); - } - function tryGetReturnTypeOfFunction(symbol, type, checker) { - if (type.symbol === symbol || // At `const f = () => {}`, the symbol is `f` and the type symbol is at `() => {}` - symbol.valueDeclaration && type.symbol && isVariableDeclaration(symbol.valueDeclaration) && symbol.valueDeclaration.initializer === type.symbol.valueDeclaration) { - const sigs = type.getCallSignatures(); - if (sigs.length === 1) - return checker.getReturnTypeOfSignature(first(sigs)); - } - return void 0; - } - function getDefinitionAndBoundSpan(program, sourceFile, position) { - const definitions = getDefinitionAtPosition(program, sourceFile, position); - if (!definitions || definitions.length === 0) { - return void 0; - } - const comment = findReferenceInPosition(sourceFile.referencedFiles, position) || findReferenceInPosition(sourceFile.typeReferenceDirectives, position) || findReferenceInPosition(sourceFile.libReferenceDirectives, position); - if (comment) { - return { definitions, textSpan: createTextSpanFromRange(comment) }; - } - const node = getTouchingPropertyName(sourceFile, position); - const textSpan = createTextSpan(node.getStart(), node.getWidth()); - return { definitions, textSpan }; - } - function getDefinitionInfoForIndexSignatures(node, checker) { - return mapDefined(checker.getIndexInfosAtLocation(node), (info) => info.declaration && createDefinitionFromSignatureDeclaration(checker, info.declaration)); - } - function getSymbol(node, checker, stopAtAlias) { - const symbol = checker.getSymbolAtLocation(node); - let failedAliasResolution = false; - if ((symbol == null ? void 0 : symbol.declarations) && symbol.flags & 2097152 /* Alias */ && !stopAtAlias && shouldSkipAlias(node, symbol.declarations[0])) { - const aliased = checker.getAliasedSymbol(symbol); - if (aliased.declarations) { - return { symbol: aliased }; - } else { - failedAliasResolution = true; - } - } - return { symbol, failedAliasResolution }; - } - function shouldSkipAlias(node, declaration) { - if (node.kind !== 80 /* Identifier */) { - return false; - } - if (node.parent === declaration) { - return true; - } - if (declaration.kind === 274 /* NamespaceImport */) { - return false; - } - return true; - } - function isExpandoDeclaration(node) { - if (!isAssignmentDeclaration(node)) - return false; - const containingAssignment = findAncestor(node, (p) => { - if (isAssignmentExpression(p)) - return true; - if (!isAssignmentDeclaration(p)) - return "quit"; - return false; - }); - return !!containingAssignment && getAssignmentDeclarationKind(containingAssignment) === 5 /* Property */; - } - function getDefinitionFromSymbol(typeChecker, symbol, node, failedAliasResolution, excludeDeclaration) { - const filteredDeclarations = filter(symbol.declarations, (d) => d !== excludeDeclaration); - const withoutExpandos = filter(filteredDeclarations, (d) => !isExpandoDeclaration(d)); - const results = some(withoutExpandos) ? withoutExpandos : filteredDeclarations; - return getConstructSignatureDefinition() || getCallSignatureDefinition() || map(results, (declaration) => createDefinitionInfo( - declaration, - typeChecker, - symbol, - node, - /*unverified*/ - false, - failedAliasResolution - )); - function getConstructSignatureDefinition() { - if (symbol.flags & 32 /* Class */ && !(symbol.flags & (16 /* Function */ | 3 /* Variable */)) && (isNewExpressionTarget(node) || node.kind === 137 /* ConstructorKeyword */)) { - const cls = find(filteredDeclarations, isClassLike) || Debug.fail("Expected declaration to have at least one class-like declaration"); - return getSignatureDefinition( - cls.members, - /*selectConstructors*/ - true - ); - } - } - function getCallSignatureDefinition() { - return isCallOrNewExpressionTarget(node) || isNameOfFunctionDeclaration(node) ? getSignatureDefinition( - filteredDeclarations, - /*selectConstructors*/ - false - ) : void 0; - } - function getSignatureDefinition(signatureDeclarations, selectConstructors) { - if (!signatureDeclarations) { - return void 0; - } - const declarations = signatureDeclarations.filter(selectConstructors ? isConstructorDeclaration : isFunctionLike); - const declarationsWithBody = declarations.filter((d) => !!d.body); - return declarations.length ? declarationsWithBody.length !== 0 ? declarationsWithBody.map((x) => createDefinitionInfo(x, typeChecker, symbol, node)) : [createDefinitionInfo( - last(declarations), - typeChecker, - symbol, - node, - /*unverified*/ - false, - failedAliasResolution - )] : void 0; - } - } - function createDefinitionInfo(declaration, checker, symbol, node, unverified, failedAliasResolution) { - const symbolName2 = checker.symbolToString(symbol); - const symbolKind = ts_SymbolDisplay_exports.getSymbolKind(checker, symbol, node); - const containerName = symbol.parent ? checker.symbolToString(symbol.parent, node) : ""; - return createDefinitionInfoFromName(checker, declaration, symbolKind, symbolName2, containerName, unverified, failedAliasResolution); - } - function createDefinitionInfoFromName(checker, declaration, symbolKind, symbolName2, containerName, unverified, failedAliasResolution, textSpan) { - const sourceFile = declaration.getSourceFile(); - if (!textSpan) { - const name = getNameOfDeclaration(declaration) || declaration; - textSpan = createTextSpanFromNode(name, sourceFile); - } - return { - fileName: sourceFile.fileName, - textSpan, - kind: symbolKind, - name: symbolName2, - containerKind: void 0, - // TODO: GH#18217 - containerName, - ...ts_FindAllReferences_exports.toContextSpan( - textSpan, - sourceFile, - ts_FindAllReferences_exports.getContextNode(declaration) - ), - isLocal: !isDefinitionVisible(checker, declaration), - isAmbient: !!(declaration.flags & 33554432 /* Ambient */), - unverified, - failedAliasResolution - }; - } - function isDefinitionVisible(checker, declaration) { - if (checker.isDeclarationVisible(declaration)) - return true; - if (!declaration.parent) - return false; - if (hasInitializer(declaration.parent) && declaration.parent.initializer === declaration) - return isDefinitionVisible(checker, declaration.parent); - switch (declaration.kind) { - case 172 /* PropertyDeclaration */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 174 /* MethodDeclaration */: - if (hasEffectiveModifier(declaration, 8 /* Private */)) - return false; - case 176 /* Constructor */: - case 303 /* PropertyAssignment */: - case 304 /* ShorthandPropertyAssignment */: - case 210 /* ObjectLiteralExpression */: - case 231 /* ClassExpression */: - case 219 /* ArrowFunction */: - case 218 /* FunctionExpression */: - return isDefinitionVisible(checker, declaration.parent); - default: - return false; - } - } - function createDefinitionFromSignatureDeclaration(typeChecker, decl, failedAliasResolution) { - return createDefinitionInfo( - decl, - typeChecker, - decl.symbol, - decl, - /*unverified*/ - false, - failedAliasResolution - ); - } - function findReferenceInPosition(refs, pos) { - return find(refs, (ref) => textRangeContainsPositionInclusive(ref, pos)); - } - function getDefinitionInfoForFileReference(name, targetFileName, unverified) { - return { - fileName: targetFileName, - textSpan: createTextSpanFromBounds(0, 0), - kind: "script" /* scriptElement */, - name, - containerName: void 0, - containerKind: void 0, - // TODO: GH#18217 - unverified - }; - } - function getAncestorCallLikeExpression(node) { - const target = findAncestor(node, (n) => !isRightSideOfPropertyAccess(n)); - const callLike = target == null ? void 0 : target.parent; - return callLike && isCallLikeExpression(callLike) && getInvokedExpression(callLike) === target ? callLike : void 0; - } - function tryGetSignatureDeclaration(typeChecker, node) { - const callLike = getAncestorCallLikeExpression(node); - const signature = callLike && typeChecker.getResolvedSignature(callLike); - return tryCast(signature && signature.declaration, (d) => isFunctionLike(d) && !isFunctionTypeNode(d)); - } - function isConstructorLike(node) { - switch (node.kind) { - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - return true; - default: - return false; - } - } - var typesWithUnwrappedTypeArguments; - var init_goToDefinition = __esm({ - "src/services/goToDefinition.ts"() { - "use strict"; - init_ts4(); - typesWithUnwrappedTypeArguments = /* @__PURE__ */ new Set([ - "Array", - "ArrayLike", - "ReadonlyArray", - "Promise", - "PromiseLike", - "Iterable", - "IterableIterator", - "AsyncIterable", - "Set", - "WeakSet", - "ReadonlySet", - "Map", - "WeakMap", - "ReadonlyMap", - "Partial", - "Required", - "Readonly", - "Pick", - "Omit" - ]); - } - }); - - // src/services/_namespaces/ts.GoToDefinition.ts - var ts_GoToDefinition_exports = {}; - __export(ts_GoToDefinition_exports, { - createDefinitionInfo: () => createDefinitionInfo, - findReferenceInPosition: () => findReferenceInPosition, - getDefinitionAndBoundSpan: () => getDefinitionAndBoundSpan, - getDefinitionAtPosition: () => getDefinitionAtPosition, - getReferenceAtPosition: () => getReferenceAtPosition, - getTypeDefinitionAtPosition: () => getTypeDefinitionAtPosition - }); - var init_ts_GoToDefinition = __esm({ - "src/services/_namespaces/ts.GoToDefinition.ts"() { - "use strict"; - init_goToDefinition(); - } - }); - - // src/services/inlayHints.ts - function shouldShowParameterNameHints(preferences) { - return preferences.includeInlayParameterNameHints === "literals" || preferences.includeInlayParameterNameHints === "all"; - } - function shouldShowLiteralParameterNameHintsOnly(preferences) { - return preferences.includeInlayParameterNameHints === "literals"; - } - function shouldUseInteractiveInlayHints(preferences) { - return preferences.interactiveInlayHints === true; - } - function provideInlayHints(context) { - const { file, program, span, cancellationToken, preferences } = context; - const sourceFileText = file.text; - const compilerOptions = program.getCompilerOptions(); - const checker = program.getTypeChecker(); - const result = []; - visitor(file); - return result; - function visitor(node) { - if (!node || node.getFullWidth() === 0) { - return; - } - switch (node.kind) { - case 267 /* ModuleDeclaration */: - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: - case 231 /* ClassExpression */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 219 /* ArrowFunction */: - cancellationToken.throwIfCancellationRequested(); - } - if (!textSpanIntersectsWith(span, node.pos, node.getFullWidth())) { - return; - } - if (isTypeNode(node) && !isExpressionWithTypeArguments(node)) { - return; - } - if (preferences.includeInlayVariableTypeHints && isVariableDeclaration(node)) { - visitVariableLikeDeclaration(node); - } else if (preferences.includeInlayPropertyDeclarationTypeHints && isPropertyDeclaration(node)) { - visitVariableLikeDeclaration(node); - } else if (preferences.includeInlayEnumMemberValueHints && isEnumMember(node)) { - visitEnumMember(node); - } else if (shouldShowParameterNameHints(preferences) && (isCallExpression(node) || isNewExpression(node))) { - visitCallOrNewExpression(node); - } else { - if (preferences.includeInlayFunctionParameterTypeHints && isFunctionLikeDeclaration(node) && hasContextSensitiveParameters(node)) { - visitFunctionLikeForParameterType(node); - } - if (preferences.includeInlayFunctionLikeReturnTypeHints && isSignatureSupportingReturnAnnotation(node)) { - visitFunctionDeclarationLikeForReturnType(node); - } - } - return forEachChild(node, visitor); - } - function isSignatureSupportingReturnAnnotation(node) { - return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node); - } - function addParameterHints(text, parameter, position, isFirstVariadicArgument) { - let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`; - let displayParts; - if (shouldUseInteractiveInlayHints(preferences)) { - displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }]; - hintText = ""; - } else { - hintText += ":"; - } - result.push({ - text: hintText, - position, - kind: "Parameter" /* Parameter */, - whitespaceAfter: true, - displayParts - }); - } - function addTypeHints(text, position) { - result.push({ - text: `: ${text.length > maxTypeHintLength ? text.substr(0, maxTypeHintLength - "...".length) + "..." : text}`, - position, - kind: "Type" /* Type */, - whitespaceBefore: true - }); - } - function addEnumMemberValueHints(text, position) { - result.push({ - text: `= ${text}`, - position, - kind: "Enum" /* Enum */, - whitespaceBefore: true - }); - } - function visitEnumMember(member) { - if (member.initializer) { - return; - } - const enumValue = checker.getConstantValue(member); - if (enumValue !== void 0) { - addEnumMemberValueHints(enumValue.toString(), member.end); - } - } - function isModuleReferenceType(type) { - return type.symbol && type.symbol.flags & 1536 /* Module */; - } - function visitVariableLikeDeclaration(decl) { - if (!decl.initializer || isBindingPattern(decl.name) || isVariableDeclaration(decl) && !isHintableDeclaration(decl)) { - return; - } - const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(decl); - if (effectiveTypeAnnotation) { - return; - } - const declarationType = checker.getTypeAtLocation(decl); - if (isModuleReferenceType(declarationType)) { - return; - } - const typeDisplayString = printTypeInSingleLine(declarationType); - if (typeDisplayString) { - const isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && equateStringsCaseInsensitive(decl.name.getText(), typeDisplayString); - if (isVariableNameMatchesType) { - return; - } - addTypeHints(typeDisplayString, decl.name.end); - } - } - function visitCallOrNewExpression(expr) { - const args = expr.arguments; - if (!args || !args.length) { - return; - } - const candidates = []; - const signature = checker.getResolvedSignatureForSignatureHelp(expr, candidates); - if (!signature || !candidates.length) { - return; - } - let signatureParamPos = 0; - for (const originalArg of args) { - const arg = skipParentheses(originalArg); - if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) { - continue; - } - let spreadArgs = 0; - if (isSpreadElement(arg)) { - const spreadType = checker.getTypeAtLocation(arg.expression); - if (checker.isTupleType(spreadType)) { - const { elementFlags, fixedLength } = spreadType.target; - if (fixedLength === 0) { - continue; - } - const firstOptionalIndex = findIndex(elementFlags, (f) => !(f & 1 /* Required */)); - const requiredArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; - if (requiredArgs > 0) { - spreadArgs = firstOptionalIndex < 0 ? fixedLength : firstOptionalIndex; - } - } - } - const identifierInfo = checker.getParameterIdentifierInfoAtPosition(signature, signatureParamPos); - signatureParamPos = signatureParamPos + (spreadArgs || 1); - if (identifierInfo) { - const { parameter, parameterName, isRestParameter: isFirstVariadicArgument } = identifierInfo; - const isParameterNameNotSameAsArgument = preferences.includeInlayParameterNameHintsWhenArgumentMatchesName || !identifierOrAccessExpressionPostfixMatchesParameterName(arg, parameterName); - if (!isParameterNameNotSameAsArgument && !isFirstVariadicArgument) { - continue; - } - const name = unescapeLeadingUnderscores(parameterName); - if (leadingCommentsContainsParameterName(arg, name)) { - continue; - } - addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument); - } - } - } - function identifierOrAccessExpressionPostfixMatchesParameterName(expr, parameterName) { - if (isIdentifier(expr)) { - return expr.text === parameterName; - } - if (isPropertyAccessExpression(expr)) { - return expr.name.text === parameterName; - } - return false; - } - function leadingCommentsContainsParameterName(node, name) { - if (!isIdentifierText(name, compilerOptions.target, getLanguageVariant(file.scriptKind))) { - return false; - } - const ranges = getLeadingCommentRanges(sourceFileText, node.pos); - if (!(ranges == null ? void 0 : ranges.length)) { - return false; - } - const regex = leadingParameterNameCommentRegexFactory(name); - return some(ranges, (range) => regex.test(sourceFileText.substring(range.pos, range.end))); - } - function isHintableLiteral(node) { - switch (node.kind) { - case 224 /* PrefixUnaryExpression */: { - const operand = node.operand; - return isLiteralExpression(operand) || isIdentifier(operand) && isInfinityOrNaNString(operand.escapedText); - } - case 112 /* TrueKeyword */: - case 97 /* FalseKeyword */: - case 106 /* NullKeyword */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 228 /* TemplateExpression */: - return true; - case 80 /* Identifier */: { - const name = node.escapedText; - return isUndefined(name) || isInfinityOrNaNString(name); - } - } - return isLiteralExpression(node); - } - function visitFunctionDeclarationLikeForReturnType(decl) { - if (isArrowFunction(decl)) { - if (!findChildOfKind(decl, 21 /* OpenParenToken */, file)) { - return; - } - } - const effectiveTypeAnnotation = getEffectiveReturnTypeNode(decl); - if (effectiveTypeAnnotation || !decl.body) { - return; - } - const signature = checker.getSignatureFromDeclaration(decl); - if (!signature) { - return; - } - const returnType = checker.getReturnTypeOfSignature(signature); - if (isModuleReferenceType(returnType)) { - return; - } - const typeDisplayString = printTypeInSingleLine(returnType); - if (!typeDisplayString) { - return; - } - addTypeHints(typeDisplayString, getTypeAnnotationPosition(decl)); - } - function getTypeAnnotationPosition(decl) { - const closeParenToken = findChildOfKind(decl, 22 /* CloseParenToken */, file); - if (closeParenToken) { - return closeParenToken.end; - } - return decl.parameters.end; - } - function visitFunctionLikeForParameterType(node) { - const signature = checker.getSignatureFromDeclaration(node); - if (!signature) { - return; - } - for (let i = 0; i < node.parameters.length && i < signature.parameters.length; ++i) { - const param = node.parameters[i]; - if (!isHintableDeclaration(param)) { - continue; - } - const effectiveTypeAnnotation = getEffectiveTypeAnnotationNode(param); - if (effectiveTypeAnnotation) { - continue; - } - const typeDisplayString = getParameterDeclarationTypeDisplayString(signature.parameters[i]); - if (!typeDisplayString) { - continue; - } - addTypeHints(typeDisplayString, param.questionToken ? param.questionToken.end : param.name.end); - } - } - function getParameterDeclarationTypeDisplayString(symbol) { - const valueDeclaration = symbol.valueDeclaration; - if (!valueDeclaration || !isParameter(valueDeclaration)) { - return void 0; - } - const signatureParamType = checker.getTypeOfSymbolAtLocation(symbol, valueDeclaration); - if (isModuleReferenceType(signatureParamType)) { - return void 0; - } - return printTypeInSingleLine(signatureParamType); - } - function printTypeInSingleLine(type) { - const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; - const printer = createPrinterWithRemoveComments(); - return usingSingleLineStringWriter((writer) => { - const typeNode = checker.typeToTypeNode( - type, - /*enclosingDeclaration*/ - void 0, - flags - ); - Debug.assertIsDefined(typeNode, "should always get typenode"); - printer.writeNode( - 4 /* Unspecified */, - typeNode, - /*sourceFile*/ - file, - writer - ); - }); - } - function isUndefined(name) { - return name === "undefined"; - } - function isHintableDeclaration(node) { - if ((isParameterDeclaration(node) || isVariableDeclaration(node) && isVarConst(node)) && node.initializer) { - const initializer = skipParentheses(node.initializer); - return !(isHintableLiteral(initializer) || isNewExpression(initializer) || isObjectLiteralExpression(initializer) || isAssertionExpression(initializer)); - } - return true; - } - function getNodeDisplayPart(text, node) { - const sourceFile = node.getSourceFile(); - return { - text, - span: createTextSpanFromNode(node, sourceFile), - file: sourceFile.fileName - }; - } - } - var maxTypeHintLength, leadingParameterNameCommentRegexFactory; - var init_inlayHints = __esm({ - "src/services/inlayHints.ts"() { - "use strict"; - init_ts4(); - maxTypeHintLength = 30; - leadingParameterNameCommentRegexFactory = (name) => { - return new RegExp(`^\\s?/\\*\\*?\\s?${name}\\s?\\*\\/\\s?$`); - }; - } - }); - - // src/services/_namespaces/ts.InlayHints.ts - var ts_InlayHints_exports = {}; - __export(ts_InlayHints_exports, { - provideInlayHints: () => provideInlayHints - }); - var init_ts_InlayHints = __esm({ - "src/services/_namespaces/ts.InlayHints.ts"() { - "use strict"; - init_inlayHints(); - } - }); - - // src/services/jsDoc.ts - function getJsDocCommentsFromDeclarations(declarations, checker) { - const parts = []; - forEachUnique(declarations, (declaration) => { - for (const jsdoc of getCommentHavingNodes(declaration)) { - const inheritDoc = isJSDoc(jsdoc) && jsdoc.tags && find(jsdoc.tags, (t) => t.kind === 334 /* JSDocTag */ && (t.tagName.escapedText === "inheritDoc" || t.tagName.escapedText === "inheritdoc")); - if (jsdoc.comment === void 0 && !inheritDoc || isJSDoc(jsdoc) && declaration.kind !== 353 /* JSDocTypedefTag */ && declaration.kind !== 345 /* JSDocCallbackTag */ && jsdoc.tags && jsdoc.tags.some((t) => t.kind === 353 /* JSDocTypedefTag */ || t.kind === 345 /* JSDocCallbackTag */) && !jsdoc.tags.some((t) => t.kind === 348 /* JSDocParameterTag */ || t.kind === 349 /* JSDocReturnTag */)) { - continue; - } - let newparts = jsdoc.comment ? getDisplayPartsFromComment(jsdoc.comment, checker) : []; - if (inheritDoc && inheritDoc.comment) { - newparts = newparts.concat(getDisplayPartsFromComment(inheritDoc.comment, checker)); - } - if (!contains(parts, newparts, isIdenticalListOfDisplayParts)) { - parts.push(newparts); - } - } - }); - return flatten(intersperse(parts, [lineBreakPart()])); - } - function isIdenticalListOfDisplayParts(parts1, parts2) { - return arraysEqual(parts1, parts2, (p1, p2) => p1.kind === p2.kind && p1.text === p2.text); - } - function getCommentHavingNodes(declaration) { - switch (declaration.kind) { - case 348 /* JSDocParameterTag */: - case 355 /* JSDocPropertyTag */: - return [declaration]; - case 345 /* JSDocCallbackTag */: - case 353 /* JSDocTypedefTag */: - return [declaration, declaration.parent]; - default: - return getJSDocCommentsAndTags(declaration); - } - } - function getJsDocTagsFromDeclarations(declarations, checker) { - const infos = []; - forEachUnique(declarations, (declaration) => { - const tags = getJSDocTags(declaration); - if (tags.some((t) => t.kind === 353 /* JSDocTypedefTag */ || t.kind === 345 /* JSDocCallbackTag */) && !tags.some((t) => t.kind === 348 /* JSDocParameterTag */ || t.kind === 349 /* JSDocReturnTag */)) { - return; - } - for (const tag of tags) { - infos.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) }); - } - }); - return infos; - } - function getDisplayPartsFromComment(comment, checker) { - if (typeof comment === "string") { - return [textPart(comment)]; - } - return flatMap( - comment, - (node) => node.kind === 328 /* JSDocText */ ? [textPart(node.text)] : buildLinkParts(node, checker) - ); - } - function getCommentDisplayParts(tag, checker) { - const { comment, kind } = tag; - const namePart = getTagNameDisplayPart(kind); - switch (kind) { - case 356 /* JSDocThrowsTag */: - const typeExpression = tag.typeExpression; - return typeExpression ? withNode(typeExpression) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - case 336 /* JSDocImplementsTag */: - return withNode(tag.class); - case 335 /* JSDocAugmentsTag */: - return withNode(tag.class); - case 352 /* JSDocTemplateTag */: - const templateTag = tag; - const displayParts = []; - if (templateTag.constraint) { - displayParts.push(textPart(templateTag.constraint.getText())); - } - if (length(templateTag.typeParameters)) { - if (length(displayParts)) { - displayParts.push(spacePart()); - } - const lastTypeParameter = templateTag.typeParameters[templateTag.typeParameters.length - 1]; - forEach(templateTag.typeParameters, (tp) => { - displayParts.push(namePart(tp.getText())); - if (lastTypeParameter !== tp) { - displayParts.push(...[punctuationPart(28 /* CommaToken */), spacePart()]); - } - }); - } - if (comment) { - displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); - } - return displayParts; - case 351 /* JSDocTypeTag */: - case 357 /* JSDocSatisfiesTag */: - return withNode(tag.typeExpression); - case 353 /* JSDocTypedefTag */: - case 345 /* JSDocCallbackTag */: - case 355 /* JSDocPropertyTag */: - case 348 /* JSDocParameterTag */: - case 354 /* JSDocSeeTag */: - const { name } = tag; - return name ? withNode(name) : comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - default: - return comment === void 0 ? void 0 : getDisplayPartsFromComment(comment, checker); - } - function withNode(node) { - return addComment(node.getText()); - } - function addComment(s) { - if (comment) { - if (s.match(/^https?$/)) { - return [textPart(s), ...getDisplayPartsFromComment(comment, checker)]; - } else { - return [namePart(s), spacePart(), ...getDisplayPartsFromComment(comment, checker)]; - } - } else { - return [textPart(s)]; - } - } - } - function getTagNameDisplayPart(kind) { - switch (kind) { - case 348 /* JSDocParameterTag */: - return parameterNamePart; - case 355 /* JSDocPropertyTag */: - return propertyNamePart; - case 352 /* JSDocTemplateTag */: - return typeParameterNamePart; - case 353 /* JSDocTypedefTag */: - case 345 /* JSDocCallbackTag */: - return typeAliasNamePart; - default: - return textPart; - } - } - function getJSDocTagNameCompletions() { - return jsDocTagNameCompletionEntries || (jsDocTagNameCompletionEntries = map(jsDocTagNames, (tagName) => { - return { - name: tagName, - kind: "keyword" /* keyword */, - kindModifiers: "", - sortText: ts_Completions_exports.SortText.LocationPriority - }; - })); - } - function getJSDocTagCompletions() { - return jsDocTagCompletionEntries || (jsDocTagCompletionEntries = map(jsDocTagNames, (tagName) => { - return { - name: `@${tagName}`, - kind: "keyword" /* keyword */, - kindModifiers: "", - sortText: ts_Completions_exports.SortText.LocationPriority - }; - })); - } - function getJSDocTagCompletionDetails(name) { - return { - name, - kind: "" /* unknown */, - // TODO: should have its own kind? - kindModifiers: "", - displayParts: [textPart(name)], - documentation: emptyArray, - tags: void 0, - codeActions: void 0 - }; - } - function getJSDocParameterNameCompletions(tag) { - if (!isIdentifier(tag.name)) { - return emptyArray; - } - const nameThusFar = tag.name.text; - const jsdoc = tag.parent; - const fn = jsdoc.parent; - if (!isFunctionLike(fn)) - return []; - return mapDefined(fn.parameters, (param) => { - if (!isIdentifier(param.name)) - return void 0; - const name = param.name.text; - if (jsdoc.tags.some((t) => t !== tag && isJSDocParameterTag(t) && isIdentifier(t.name) && t.name.escapedText === name) || nameThusFar !== void 0 && !startsWith(name, nameThusFar)) { - return void 0; - } - return { name, kind: "parameter" /* parameterElement */, kindModifiers: "", sortText: ts_Completions_exports.SortText.LocationPriority }; - }); - } - function getJSDocParameterNameCompletionDetails(name) { - return { - name, - kind: "parameter" /* parameterElement */, - kindModifiers: "", - displayParts: [textPart(name)], - documentation: emptyArray, - tags: void 0, - codeActions: void 0 - }; - } - function getDocCommentTemplateAtPosition(newLine, sourceFile, position, options) { - const tokenAtPos = getTokenAtPosition(sourceFile, position); - const existingDocComment = findAncestor(tokenAtPos, isJSDoc); - if (existingDocComment && (existingDocComment.comment !== void 0 || length(existingDocComment.tags))) { - return void 0; - } - const tokenStart = tokenAtPos.getStart(sourceFile); - if (!existingDocComment && tokenStart < position) { - return void 0; - } - const commentOwnerInfo = getCommentOwnerInfo(tokenAtPos, options); - if (!commentOwnerInfo) { - return void 0; - } - const { commentOwner, parameters, hasReturn: hasReturn2 } = commentOwnerInfo; - const commentOwnerJsDoc = hasJSDocNodes(commentOwner) && commentOwner.jsDoc ? commentOwner.jsDoc : void 0; - const lastJsDoc = lastOrUndefined(commentOwnerJsDoc); - if (commentOwner.getStart(sourceFile) < position || lastJsDoc && existingDocComment && lastJsDoc !== existingDocComment) { - return void 0; - } - const indentationStr = getIndentationStringAtPosition(sourceFile, position); - const isJavaScriptFile = hasJSFileExtension(sourceFile.fileName); - const tags = (parameters ? parameterDocComments(parameters || [], isJavaScriptFile, indentationStr, newLine) : "") + (hasReturn2 ? returnsDocComment(indentationStr, newLine) : ""); - const openComment = "/**"; - const closeComment = " */"; - const hasTag = length(getJSDocTags(commentOwner)) > 0; - if (tags && !hasTag) { - const preamble = openComment + newLine + indentationStr + " * "; - const endLine = tokenStart === position ? newLine + indentationStr : ""; - const result = preamble + newLine + tags + indentationStr + closeComment + endLine; - return { newText: result, caretOffset: preamble.length }; - } - return { newText: openComment + closeComment, caretOffset: 3 }; - } - function getIndentationStringAtPosition(sourceFile, position) { - const { text } = sourceFile; - const lineStart = getLineStartPositionForPosition(position, sourceFile); - let pos = lineStart; - for (; pos <= position && isWhiteSpaceSingleLine(text.charCodeAt(pos)); pos++) - ; - return text.slice(lineStart, pos); - } - function parameterDocComments(parameters, isJavaScriptFile, indentationStr, newLine) { - return parameters.map(({ name, dotDotDotToken }, i) => { - const paramName = name.kind === 80 /* Identifier */ ? name.text : "param" + i; - const type = isJavaScriptFile ? dotDotDotToken ? "{...any} " : "{any} " : ""; - return `${indentationStr} * @param ${type}${paramName}${newLine}`; - }).join(""); - } - function returnsDocComment(indentationStr, newLine) { - return `${indentationStr} * @returns${newLine}`; - } - function getCommentOwnerInfo(tokenAtPos, options) { - return forEachAncestor(tokenAtPos, (n) => getCommentOwnerInfoWorker(n, options)); - } - function getCommentOwnerInfoWorker(commentOwner, options) { - switch (commentOwner.kind) { - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: - const host = commentOwner; - return { commentOwner, parameters: host.parameters, hasReturn: hasReturn(host, options) }; - case 303 /* PropertyAssignment */: - return getCommentOwnerInfoWorker(commentOwner.initializer, options); - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 306 /* EnumMember */: - case 265 /* TypeAliasDeclaration */: - return { commentOwner }; - case 171 /* PropertySignature */: { - const host2 = commentOwner; - return host2.type && isFunctionTypeNode(host2.type) ? { commentOwner, parameters: host2.type.parameters, hasReturn: hasReturn(host2.type, options) } : { commentOwner }; - } - case 243 /* VariableStatement */: { - const varStatement = commentOwner; - const varDeclarations = varStatement.declarationList.declarations; - const host2 = varDeclarations.length === 1 && varDeclarations[0].initializer ? getRightHandSideOfAssignment(varDeclarations[0].initializer) : void 0; - return host2 ? { commentOwner, parameters: host2.parameters, hasReturn: hasReturn(host2, options) } : { commentOwner }; - } - case 312 /* SourceFile */: - return "quit"; - case 267 /* ModuleDeclaration */: - return commentOwner.parent.kind === 267 /* ModuleDeclaration */ ? void 0 : { commentOwner }; - case 244 /* ExpressionStatement */: - return getCommentOwnerInfoWorker(commentOwner.expression, options); - case 226 /* BinaryExpression */: { - const be = commentOwner; - if (getAssignmentDeclarationKind(be) === 0 /* None */) { - return "quit"; - } - return isFunctionLike(be.right) ? { commentOwner, parameters: be.right.parameters, hasReturn: hasReturn(be.right, options) } : { commentOwner }; - } - case 172 /* PropertyDeclaration */: - const init = commentOwner.initializer; - if (init && (isFunctionExpression(init) || isArrowFunction(init))) { - return { commentOwner, parameters: init.parameters, hasReturn: hasReturn(init, options) }; - } - } - } - function hasReturn(node, options) { - return !!(options == null ? void 0 : options.generateReturnInDocTemplate) && (isFunctionTypeNode(node) || isArrowFunction(node) && isExpression(node.body) || isFunctionLikeDeclaration(node) && node.body && isBlock(node.body) && !!forEachReturnStatement(node.body, (n) => n)); - } - function getRightHandSideOfAssignment(rightHandSide) { - while (rightHandSide.kind === 217 /* ParenthesizedExpression */) { - rightHandSide = rightHandSide.expression; - } - switch (rightHandSide.kind) { - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - return rightHandSide; - case 231 /* ClassExpression */: - return find(rightHandSide.members, isConstructorDeclaration); - } - } - var jsDocTagNames, jsDocTagNameCompletionEntries, jsDocTagCompletionEntries, getJSDocTagNameCompletionDetails; - var init_jsDoc = __esm({ - "src/services/jsDoc.ts"() { - "use strict"; - init_ts4(); - jsDocTagNames = [ - "abstract", - "access", - "alias", - "argument", - "async", - "augments", - "author", - "borrows", - "callback", - "class", - "classdesc", - "constant", - "constructor", - "constructs", - "copyright", - "default", - "deprecated", - "description", - "emits", - "enum", - "event", - "example", - "exports", - "extends", - "external", - "field", - "file", - "fileoverview", - "fires", - "function", - "generator", - "global", - "hideconstructor", - "host", - "ignore", - "implements", - "inheritdoc", - "inner", - "instance", - "interface", - "kind", - "lends", - "license", - "link", - "linkcode", - "linkplain", - "listens", - "member", - "memberof", - "method", - "mixes", - "module", - "name", - "namespace", - "overload", - "override", - "package", - "param", - "private", - "prop", - "property", - "protected", - "public", - "readonly", - "requires", - "returns", - "satisfies", - "see", - "since", - "static", - "summary", - "template", - "this", - "throws", - "todo", - "tutorial", - "type", - "typedef", - "var", - "variation", - "version", - "virtual", - "yields" - ]; - getJSDocTagNameCompletionDetails = getJSDocTagCompletionDetails; - } - }); - - // src/services/_namespaces/ts.JsDoc.ts - var ts_JsDoc_exports = {}; - __export(ts_JsDoc_exports, { - getDocCommentTemplateAtPosition: () => getDocCommentTemplateAtPosition, - getJSDocParameterNameCompletionDetails: () => getJSDocParameterNameCompletionDetails, - getJSDocParameterNameCompletions: () => getJSDocParameterNameCompletions, - getJSDocTagCompletionDetails: () => getJSDocTagCompletionDetails, - getJSDocTagCompletions: () => getJSDocTagCompletions, - getJSDocTagNameCompletionDetails: () => getJSDocTagNameCompletionDetails, - getJSDocTagNameCompletions: () => getJSDocTagNameCompletions, - getJsDocCommentsFromDeclarations: () => getJsDocCommentsFromDeclarations, - getJsDocTagsFromDeclarations: () => getJsDocTagsFromDeclarations - }); - var init_ts_JsDoc = __esm({ - "src/services/_namespaces/ts.JsDoc.ts"() { - "use strict"; - init_jsDoc(); - } - }); - - // src/services/organizeImports.ts - function organizeImports(sourceFile, formatContext, host, program, preferences, mode) { - const changeTracker = ts_textChanges_exports.ChangeTracker.fromContext({ host, formatContext, preferences }); - const shouldSort = mode === "SortAndCombine" /* SortAndCombine */ || mode === "All" /* All */; - const shouldCombine = shouldSort; - const shouldRemove = mode === "RemoveUnused" /* RemoveUnused */ || mode === "All" /* All */; - const topLevelImportGroupDecls = groupByNewlineContiguous(sourceFile, sourceFile.statements.filter(isImportDeclaration)); - const comparer = getOrganizeImportsComparerWithDetection(preferences, shouldSort ? () => detectSortingWorker(topLevelImportGroupDecls, preferences) === 2 /* CaseInsensitive */ : void 0); - const processImportsOfSameModuleSpecifier = (importGroup) => { - if (shouldRemove) - importGroup = removeUnusedImports(importGroup, sourceFile, program); - if (shouldCombine) - importGroup = coalesceImportsWorker(importGroup, comparer, sourceFile); - if (shouldSort) - importGroup = stableSort(importGroup, (s1, s2) => compareImportsOrRequireStatements(s1, s2, comparer)); - return importGroup; - }; - topLevelImportGroupDecls.forEach((importGroupDecl) => organizeImportsWorker(importGroupDecl, processImportsOfSameModuleSpecifier)); - if (mode !== "RemoveUnused" /* RemoveUnused */) { - getTopLevelExportGroups(sourceFile).forEach((exportGroupDecl) => organizeImportsWorker(exportGroupDecl, (group2) => coalesceExportsWorker(group2, comparer))); - } - for (const ambientModule of sourceFile.statements.filter(isAmbientModule)) { - if (!ambientModule.body) - continue; - const ambientModuleImportGroupDecls = groupByNewlineContiguous(sourceFile, ambientModule.body.statements.filter(isImportDeclaration)); - ambientModuleImportGroupDecls.forEach((importGroupDecl) => organizeImportsWorker(importGroupDecl, processImportsOfSameModuleSpecifier)); - if (mode !== "RemoveUnused" /* RemoveUnused */) { - const ambientModuleExportDecls = ambientModule.body.statements.filter(isExportDeclaration); - organizeImportsWorker(ambientModuleExportDecls, (group2) => coalesceExportsWorker(group2, comparer)); - } - } - return changeTracker.getChanges(); - function organizeImportsWorker(oldImportDecls, coalesce) { - if (length(oldImportDecls) === 0) { - return; - } - setEmitFlags(oldImportDecls[0], 1024 /* NoLeadingComments */); - const oldImportGroups = shouldCombine ? group(oldImportDecls, (importDecl) => getExternalModuleName2(importDecl.moduleSpecifier)) : [oldImportDecls]; - const sortedImportGroups = shouldSort ? stableSort(oldImportGroups, (group1, group2) => compareModuleSpecifiersWorker(group1[0].moduleSpecifier, group2[0].moduleSpecifier, comparer)) : oldImportGroups; - const newImportDecls = flatMap(sortedImportGroups, (importGroup) => getExternalModuleName2(importGroup[0].moduleSpecifier) || importGroup[0].moduleSpecifier === void 0 ? coalesce(importGroup) : importGroup); - if (newImportDecls.length === 0) { - changeTracker.deleteNodes( - sourceFile, - oldImportDecls, - { - leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include - }, - /*hasTrailingComment*/ - true - ); - } else { - const replaceOptions = { - leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, - // Leave header comment in place - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include, - suffix: getNewLineOrDefaultFromHost(host, formatContext.options) - }; - changeTracker.replaceNodeWithNodes(sourceFile, oldImportDecls[0], newImportDecls, replaceOptions); - const hasTrailingComment = changeTracker.nodeHasTrailingComment(sourceFile, oldImportDecls[0], replaceOptions); - changeTracker.deleteNodes(sourceFile, oldImportDecls.slice(1), { - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Include - }, hasTrailingComment); - } - } - } - function groupByNewlineContiguous(sourceFile, decls) { - const scanner2 = createScanner( - sourceFile.languageVersion, - /*skipTrivia*/ - false, - sourceFile.languageVariant - ); - const group2 = []; - let groupIndex = 0; - for (const decl of decls) { - if (group2[groupIndex] && isNewGroup(sourceFile, decl, scanner2)) { - groupIndex++; - } - if (!group2[groupIndex]) { - group2[groupIndex] = []; - } - group2[groupIndex].push(decl); - } - return group2; - } - function isNewGroup(sourceFile, decl, scanner2) { - const startPos = decl.getFullStart(); - const endPos = decl.getStart(); - scanner2.setText(sourceFile.text, startPos, endPos - startPos); - let numberOfNewLines = 0; - while (scanner2.getTokenStart() < endPos) { - const tokenKind = scanner2.scan(); - if (tokenKind === 4 /* NewLineTrivia */) { - numberOfNewLines++; - if (numberOfNewLines >= 2) { - return true; - } - } - } - return false; - } - function removeUnusedImports(oldImports, sourceFile, program) { - const typeChecker = program.getTypeChecker(); - const compilerOptions = program.getCompilerOptions(); - const jsxNamespace = typeChecker.getJsxNamespace(sourceFile); - const jsxFragmentFactory = typeChecker.getJsxFragmentFactory(sourceFile); - const jsxElementsPresent = !!(sourceFile.transformFlags & 2 /* ContainsJsx */); - const usedImports = []; - for (const importDecl of oldImports) { - const { importClause, moduleSpecifier } = importDecl; - if (!importClause) { - usedImports.push(importDecl); - continue; - } - let { name, namedBindings } = importClause; - if (name && !isDeclarationUsed(name)) { - name = void 0; - } - if (namedBindings) { - if (isNamespaceImport(namedBindings)) { - if (!isDeclarationUsed(namedBindings.name)) { - namedBindings = void 0; - } - } else { - const newElements = namedBindings.elements.filter((e) => isDeclarationUsed(e.name)); - if (newElements.length < namedBindings.elements.length) { - namedBindings = newElements.length ? factory.updateNamedImports(namedBindings, newElements) : void 0; - } - } - } - if (name || namedBindings) { - usedImports.push(updateImportDeclarationAndClause(importDecl, name, namedBindings)); - } else if (hasModuleDeclarationMatchingSpecifier(sourceFile, moduleSpecifier)) { - if (sourceFile.isDeclarationFile) { - usedImports.push(factory.createImportDeclaration( - importDecl.modifiers, - /*importClause*/ - void 0, - moduleSpecifier, - /*assertClause*/ - void 0 - )); - } else { - usedImports.push(importDecl); - } - } - } - return usedImports; - function isDeclarationUsed(identifier) { - return jsxElementsPresent && (identifier.text === jsxNamespace || jsxFragmentFactory && identifier.text === jsxFragmentFactory) && jsxModeNeedsExplicitImport(compilerOptions.jsx) || ts_FindAllReferences_exports.Core.isSymbolReferencedInFile(identifier, typeChecker, sourceFile); - } - } - function hasModuleDeclarationMatchingSpecifier(sourceFile, moduleSpecifier) { - const moduleSpecifierText = isStringLiteral(moduleSpecifier) && moduleSpecifier.text; - return isString(moduleSpecifierText) && some(sourceFile.moduleAugmentations, (moduleName) => isStringLiteral(moduleName) && moduleName.text === moduleSpecifierText); - } - function getExternalModuleName2(specifier) { - return specifier !== void 0 && isStringLiteralLike(specifier) ? specifier.text : void 0; - } - function coalesceImports(importGroup, ignoreCase, sourceFile) { - const comparer = getOrganizeImportsOrdinalStringComparer(ignoreCase); - return coalesceImportsWorker(importGroup, comparer, sourceFile); - } - function coalesceImportsWorker(importGroup, comparer, sourceFile) { - if (importGroup.length === 0) { - return importGroup; - } - const { importWithoutClause, typeOnlyImports, regularImports } = getCategorizedImports(importGroup); - const coalescedImports = []; - if (importWithoutClause) { - coalescedImports.push(importWithoutClause); - } - for (const group2 of [regularImports, typeOnlyImports]) { - const isTypeOnly = group2 === typeOnlyImports; - const { defaultImports, namespaceImports, namedImports } = group2; - if (!isTypeOnly && defaultImports.length === 1 && namespaceImports.length === 1 && namedImports.length === 0) { - const defaultImport = defaultImports[0]; - coalescedImports.push( - updateImportDeclarationAndClause(defaultImport, defaultImport.importClause.name, namespaceImports[0].importClause.namedBindings) - ); - continue; - } - const sortedNamespaceImports = stableSort(namespaceImports, (i1, i2) => comparer(i1.importClause.namedBindings.name.text, i2.importClause.namedBindings.name.text)); - for (const namespaceImport of sortedNamespaceImports) { - coalescedImports.push( - updateImportDeclarationAndClause( - namespaceImport, - /*name*/ - void 0, - namespaceImport.importClause.namedBindings - ) - ); - } - const firstDefaultImport = firstOrUndefined(defaultImports); - const firstNamedImport = firstOrUndefined(namedImports); - const importDecl = firstDefaultImport ?? firstNamedImport; - if (!importDecl) { - continue; - } - let newDefaultImport; - const newImportSpecifiers = []; - if (defaultImports.length === 1) { - newDefaultImport = defaultImports[0].importClause.name; - } else { - for (const defaultImport of defaultImports) { - newImportSpecifiers.push( - factory.createImportSpecifier( - /*isTypeOnly*/ - false, - factory.createIdentifier("default"), - defaultImport.importClause.name - ) - ); - } - } - newImportSpecifiers.push(...getNewImportSpecifiers(namedImports)); - const sortedImportSpecifiers = factory.createNodeArray( - sortSpecifiers(newImportSpecifiers, comparer), - firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings.elements.hasTrailingComma - ); - const newNamedImports = sortedImportSpecifiers.length === 0 ? newDefaultImport ? void 0 : factory.createNamedImports(emptyArray) : firstNamedImport ? factory.updateNamedImports(firstNamedImport.importClause.namedBindings, sortedImportSpecifiers) : factory.createNamedImports(sortedImportSpecifiers); - if (sourceFile && newNamedImports && (firstNamedImport == null ? void 0 : firstNamedImport.importClause.namedBindings) && !rangeIsOnSingleLine(firstNamedImport.importClause.namedBindings, sourceFile)) { - setEmitFlags(newNamedImports, 2 /* MultiLine */); - } - if (isTypeOnly && newDefaultImport && newNamedImports) { - coalescedImports.push( - updateImportDeclarationAndClause( - importDecl, - newDefaultImport, - /*namedBindings*/ - void 0 - ) - ); - coalescedImports.push( - updateImportDeclarationAndClause( - firstNamedImport ?? importDecl, - /*name*/ - void 0, - newNamedImports - ) - ); - } else { - coalescedImports.push( - updateImportDeclarationAndClause(importDecl, newDefaultImport, newNamedImports) - ); - } - } - return coalescedImports; - } - function getCategorizedImports(importGroup) { - let importWithoutClause; - const typeOnlyImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; - const regularImports = { defaultImports: [], namespaceImports: [], namedImports: [] }; - for (const importDeclaration of importGroup) { - if (importDeclaration.importClause === void 0) { - importWithoutClause = importWithoutClause || importDeclaration; - continue; - } - const group2 = importDeclaration.importClause.isTypeOnly ? typeOnlyImports : regularImports; - const { name, namedBindings } = importDeclaration.importClause; - if (name) { - group2.defaultImports.push(importDeclaration); - } - if (namedBindings) { - if (isNamespaceImport(namedBindings)) { - group2.namespaceImports.push(importDeclaration); - } else { - group2.namedImports.push(importDeclaration); - } - } - } - return { - importWithoutClause, - typeOnlyImports, - regularImports - }; - } - function coalesceExports(exportGroup, ignoreCase) { - const comparer = getOrganizeImportsOrdinalStringComparer(ignoreCase); - return coalesceExportsWorker(exportGroup, comparer); - } - function coalesceExportsWorker(exportGroup, comparer) { - if (exportGroup.length === 0) { - return exportGroup; - } - const { exportWithoutClause, namedExports, typeOnlyExports } = getCategorizedExports(exportGroup); - const coalescedExports = []; - if (exportWithoutClause) { - coalescedExports.push(exportWithoutClause); - } - for (const exportGroup2 of [namedExports, typeOnlyExports]) { - if (exportGroup2.length === 0) { - continue; - } - const newExportSpecifiers = []; - newExportSpecifiers.push(...flatMap(exportGroup2, (i) => i.exportClause && isNamedExports(i.exportClause) ? i.exportClause.elements : emptyArray)); - const sortedExportSpecifiers = sortSpecifiers(newExportSpecifiers, comparer); - const exportDecl = exportGroup2[0]; - coalescedExports.push( - factory.updateExportDeclaration( - exportDecl, - exportDecl.modifiers, - exportDecl.isTypeOnly, - exportDecl.exportClause && (isNamedExports(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), - exportDecl.moduleSpecifier, - exportDecl.assertClause - ) - ); - } - return coalescedExports; - function getCategorizedExports(exportGroup2) { - let exportWithoutClause2; - const namedExports2 = []; - const typeOnlyExports2 = []; - for (const exportDeclaration of exportGroup2) { - if (exportDeclaration.exportClause === void 0) { - exportWithoutClause2 = exportWithoutClause2 || exportDeclaration; - } else if (exportDeclaration.isTypeOnly) { - typeOnlyExports2.push(exportDeclaration); - } else { - namedExports2.push(exportDeclaration); - } - } - return { - exportWithoutClause: exportWithoutClause2, - namedExports: namedExports2, - typeOnlyExports: typeOnlyExports2 - }; - } - } - function updateImportDeclarationAndClause(importDeclaration, name, namedBindings) { - return factory.updateImportDeclaration( - importDeclaration, - importDeclaration.modifiers, - factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.isTypeOnly, name, namedBindings), - // TODO: GH#18217 - importDeclaration.moduleSpecifier, - importDeclaration.assertClause - ); - } - function sortSpecifiers(specifiers, comparer) { - return stableSort(specifiers, (s1, s2) => compareImportOrExportSpecifiers(s1, s2, comparer)); - } - function compareImportOrExportSpecifiers(s1, s2, comparer) { - return compareBooleans(s1.isTypeOnly, s2.isTypeOnly) || comparer(s1.name.text, s2.name.text); - } - function compareModuleSpecifiers2(m1, m2, ignoreCase) { - const comparer = getOrganizeImportsOrdinalStringComparer(!!ignoreCase); - return compareModuleSpecifiersWorker(m1, m2, comparer); - } - function compareModuleSpecifiersWorker(m1, m2, comparer) { - const name1 = m1 === void 0 ? void 0 : getExternalModuleName2(m1); - const name2 = m2 === void 0 ? void 0 : getExternalModuleName2(m2); - return compareBooleans(name1 === void 0, name2 === void 0) || compareBooleans(isExternalModuleNameRelative(name1), isExternalModuleNameRelative(name2)) || comparer(name1, name2); - } - function getModuleSpecifierExpression(declaration) { - var _a; - switch (declaration.kind) { - case 271 /* ImportEqualsDeclaration */: - return (_a = tryCast(declaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression; - case 272 /* ImportDeclaration */: - return declaration.moduleSpecifier; - case 243 /* VariableStatement */: - return declaration.declarationList.declarations[0].initializer.arguments[0]; - } - } - function detectSorting(sourceFile, preferences) { - return detectSortingWorker( - groupByNewlineContiguous(sourceFile, sourceFile.statements.filter(isImportDeclaration)), - preferences - ); - } - function detectSortingWorker(importGroups, preferences) { - const collateCaseSensitive = getOrganizeImportsComparer( - preferences, - /*ignoreCase*/ - false - ); - const collateCaseInsensitive = getOrganizeImportsComparer( - preferences, - /*ignoreCase*/ - true - ); - let sortState = 3 /* Both */; - let seenUnsortedGroup = false; - for (const importGroup of importGroups) { - if (importGroup.length > 1) { - const moduleSpecifierSort = detectSortCaseSensitivity( - importGroup, - (i) => { - var _a; - return ((_a = tryCast(i.moduleSpecifier, isStringLiteral)) == null ? void 0 : _a.text) ?? ""; - }, - collateCaseSensitive, - collateCaseInsensitive - ); - if (moduleSpecifierSort) { - sortState &= moduleSpecifierSort; - seenUnsortedGroup = true; - } - if (!sortState) { - return sortState; - } - } - const declarationWithNamedImports = find( - importGroup, - (i) => { - var _a, _b; - return ((_b = tryCast((_a = i.importClause) == null ? void 0 : _a.namedBindings, isNamedImports)) == null ? void 0 : _b.elements.length) > 1; - } - ); - if (declarationWithNamedImports) { - const namedImportSort = detectImportSpecifierSorting(declarationWithNamedImports.importClause.namedBindings.elements, preferences); - if (namedImportSort) { - sortState &= namedImportSort; - seenUnsortedGroup = true; - } - if (!sortState) { - return sortState; - } - } - if (sortState !== 3 /* Both */) { - return sortState; - } - } - return seenUnsortedGroup ? 0 /* None */ : sortState; - } - function detectImportDeclarationSorting(imports, preferences) { - const collateCaseSensitive = getOrganizeImportsComparer( - preferences, - /*ignoreCase*/ - false - ); - const collateCaseInsensitive = getOrganizeImportsComparer( - preferences, - /*ignoreCase*/ - true - ); - return detectSortCaseSensitivity( - imports, - (s) => getExternalModuleName2(getModuleSpecifierExpression(s)) || "", - collateCaseSensitive, - collateCaseInsensitive - ); - } - function getImportDeclarationInsertionIndex(sortedImports, newImport, comparer) { - const index = binarySearch(sortedImports, newImport, identity, (a, b) => compareImportsOrRequireStatements(a, b, comparer)); - return index < 0 ? ~index : index; - } - function getImportSpecifierInsertionIndex(sortedImports, newImport, comparer) { - const index = binarySearch(sortedImports, newImport, identity, (s1, s2) => compareImportOrExportSpecifiers(s1, s2, comparer)); - return index < 0 ? ~index : index; - } - function compareImportsOrRequireStatements(s1, s2, comparer) { - return compareModuleSpecifiersWorker(getModuleSpecifierExpression(s1), getModuleSpecifierExpression(s2), comparer) || compareImportKind(s1, s2); - } - function compareImportKind(s1, s2) { - return compareValues(getImportKindOrder(s1), getImportKindOrder(s2)); - } - function getImportKindOrder(s1) { - var _a; - switch (s1.kind) { - case 272 /* ImportDeclaration */: - if (!s1.importClause) - return 0; - if (s1.importClause.isTypeOnly) - return 1; - if (((_a = s1.importClause.namedBindings) == null ? void 0 : _a.kind) === 274 /* NamespaceImport */) - return 2; - if (s1.importClause.name) - return 3; - return 4; - case 271 /* ImportEqualsDeclaration */: - return 5; - case 243 /* VariableStatement */: - return 6; - } - } - function getNewImportSpecifiers(namedImports) { - return flatMap( - namedImports, - (namedImport) => map( - tryGetNamedBindingElements(namedImport), - (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && importSpecifier.name.escapedText === importSpecifier.propertyName.escapedText ? factory.updateImportSpecifier( - importSpecifier, - importSpecifier.isTypeOnly, - /*propertyName*/ - void 0, - importSpecifier.name - ) : importSpecifier - ) - ); - } - function tryGetNamedBindingElements(namedImport) { - var _a; - return ((_a = namedImport.importClause) == null ? void 0 : _a.namedBindings) && isNamedImports(namedImport.importClause.namedBindings) ? namedImport.importClause.namedBindings.elements : void 0; - } - function getOrganizeImportsOrdinalStringComparer(ignoreCase) { - return ignoreCase ? compareStringsCaseInsensitiveEslintCompatible : compareStringsCaseSensitive; - } - function getOrganizeImportsUnicodeStringComparer(ignoreCase, preferences) { - const resolvedLocale = getOrganizeImportsLocale(preferences); - const caseFirst = preferences.organizeImportsCaseFirst ?? false; - const numeric = preferences.organizeImportsNumericCollation ?? false; - const accents = preferences.organizeImportsAccentCollation ?? true; - const sensitivity = ignoreCase ? accents ? "accent" : "base" : accents ? "variant" : "case"; - const collator = new Intl.Collator(resolvedLocale, { - usage: "sort", - caseFirst: caseFirst || "false", - sensitivity, - numeric - }); - return collator.compare; - } - function getOrganizeImportsLocale(preferences) { - let locale = preferences.organizeImportsLocale; - if (locale === "auto") - locale = getUILocale(); - if (locale === void 0) - locale = "en"; - const supportedLocales = Intl.Collator.supportedLocalesOf(locale); - const resolvedLocale = supportedLocales.length ? supportedLocales[0] : "en"; - return resolvedLocale; - } - function getOrganizeImportsComparer(preferences, ignoreCase) { - const collation = preferences.organizeImportsCollation ?? "ordinal"; - return collation === "unicode" ? getOrganizeImportsUnicodeStringComparer(ignoreCase, preferences) : getOrganizeImportsOrdinalStringComparer(ignoreCase); - } - function getOrganizeImportsComparerWithDetection(preferences, detectIgnoreCase) { - const ignoreCase = typeof preferences.organizeImportsIgnoreCase === "boolean" ? preferences.organizeImportsIgnoreCase : (detectIgnoreCase == null ? void 0 : detectIgnoreCase()) ?? false; - return getOrganizeImportsComparer(preferences, ignoreCase); - } - function getTopLevelExportGroups(sourceFile) { - const topLevelExportGroups = []; - const statements = sourceFile.statements; - const len = length(statements); - let i = 0; - let groupIndex = 0; - while (i < len) { - if (isExportDeclaration(statements[i])) { - if (topLevelExportGroups[groupIndex] === void 0) { - topLevelExportGroups[groupIndex] = []; - } - const exportDecl = statements[i]; - if (exportDecl.moduleSpecifier) { - topLevelExportGroups[groupIndex].push(exportDecl); - i++; - } else { - while (i < len && isExportDeclaration(statements[i])) { - topLevelExportGroups[groupIndex].push(statements[i++]); - } - groupIndex++; - } - } else { - i++; - } - } - return flatMap(topLevelExportGroups, (exportGroupDecls) => groupByNewlineContiguous(sourceFile, exportGroupDecls)); - } - var ImportSpecifierSortingCache, detectImportSpecifierSorting; - var init_organizeImports = __esm({ - "src/services/organizeImports.ts"() { - "use strict"; - init_ts4(); - ImportSpecifierSortingCache = class { - has([specifiers, preferences]) { - if (this._lastPreferences !== preferences || !this._cache) - return false; - return this._cache.has(specifiers); - } - get([specifiers, preferences]) { - if (this._lastPreferences !== preferences || !this._cache) - return void 0; - return this._cache.get(specifiers); - } - set([specifiers, preferences], value) { - if (this._lastPreferences !== preferences) { - this._lastPreferences = preferences; - this._cache = void 0; - } - this._cache ?? (this._cache = /* @__PURE__ */ new WeakMap()); - this._cache.set(specifiers, value); - } - }; - detectImportSpecifierSorting = memoizeCached((specifiers, preferences) => { - if (!arrayIsSorted(specifiers, (s1, s2) => compareBooleans(s1.isTypeOnly, s2.isTypeOnly))) { - return 0 /* None */; - } - const collateCaseSensitive = getOrganizeImportsComparer( - preferences, - /*ignoreCase*/ - false - ); - const collateCaseInsensitive = getOrganizeImportsComparer( - preferences, - /*ignoreCase*/ - true - ); - return detectSortCaseSensitivity(specifiers, (specifier) => specifier.name.text, collateCaseSensitive, collateCaseInsensitive); - }, new ImportSpecifierSortingCache()); - } - }); - - // src/services/_namespaces/ts.OrganizeImports.ts - var ts_OrganizeImports_exports = {}; - __export(ts_OrganizeImports_exports, { - coalesceExports: () => coalesceExports, - coalesceImports: () => coalesceImports, - compareImportOrExportSpecifiers: () => compareImportOrExportSpecifiers, - compareImportsOrRequireStatements: () => compareImportsOrRequireStatements, - compareModuleSpecifiers: () => compareModuleSpecifiers2, - detectImportDeclarationSorting: () => detectImportDeclarationSorting, - detectImportSpecifierSorting: () => detectImportSpecifierSorting, - detectSorting: () => detectSorting, - getImportDeclarationInsertionIndex: () => getImportDeclarationInsertionIndex, - getImportSpecifierInsertionIndex: () => getImportSpecifierInsertionIndex, - getOrganizeImportsComparer: () => getOrganizeImportsComparer, - organizeImports: () => organizeImports - }); - var init_ts_OrganizeImports = __esm({ - "src/services/_namespaces/ts.OrganizeImports.ts"() { - "use strict"; - init_organizeImports(); - } - }); - - // src/services/outliningElementsCollector.ts - function collectElements(sourceFile, cancellationToken) { - const res = []; - addNodeOutliningSpans(sourceFile, cancellationToken, res); - addRegionOutliningSpans(sourceFile, res); - return res.sort((span1, span2) => span1.textSpan.start - span2.textSpan.start); - } - function addNodeOutliningSpans(sourceFile, cancellationToken, out) { - let depthRemaining = 40; - let current = 0; - const statements = [...sourceFile.statements, sourceFile.endOfFileToken]; - const n = statements.length; - while (current < n) { - while (current < n && !isAnyImportSyntax(statements[current])) { - visitNode3(statements[current]); - current++; - } - if (current === n) - break; - const firstImport = current; - while (current < n && isAnyImportSyntax(statements[current])) { - visitNode3(statements[current]); - current++; - } - const lastImport = current - 1; - if (lastImport !== firstImport) { - out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 102 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */)); - } - } - function visitNode3(n2) { - var _a; - if (depthRemaining === 0) - return; - cancellationToken.throwIfCancellationRequested(); - if (isDeclaration(n2) || isVariableStatement(n2) || isReturnStatement(n2) || isCallOrNewExpression(n2) || n2.kind === 1 /* EndOfFileToken */) { - addOutliningForLeadingCommentsForNode(n2, sourceFile, cancellationToken, out); - } - if (isFunctionLike(n2) && isBinaryExpression(n2.parent) && isPropertyAccessExpression(n2.parent.left)) { - addOutliningForLeadingCommentsForNode(n2.parent.left, sourceFile, cancellationToken, out); - } - if (isBlock(n2) || isModuleBlock(n2)) { - addOutliningForLeadingCommentsForPos(n2.statements.end, sourceFile, cancellationToken, out); - } - if (isClassLike(n2) || isInterfaceDeclaration(n2)) { - addOutliningForLeadingCommentsForPos(n2.members.end, sourceFile, cancellationToken, out); - } - const span = getOutliningSpanForNode(n2, sourceFile); - if (span) - out.push(span); - depthRemaining--; - if (isCallExpression(n2)) { - depthRemaining++; - visitNode3(n2.expression); - depthRemaining--; - n2.arguments.forEach(visitNode3); - (_a = n2.typeArguments) == null ? void 0 : _a.forEach(visitNode3); - } else if (isIfStatement(n2) && n2.elseStatement && isIfStatement(n2.elseStatement)) { - visitNode3(n2.expression); - visitNode3(n2.thenStatement); - depthRemaining++; - visitNode3(n2.elseStatement); - depthRemaining--; - } else { - n2.forEachChild(visitNode3); - } - depthRemaining++; - } - } - function addRegionOutliningSpans(sourceFile, out) { - const regions = []; - const lineStarts = sourceFile.getLineStarts(); - for (const currentLineStart of lineStarts) { - const lineEnd = sourceFile.getLineEndOfPosition(currentLineStart); - const lineText = sourceFile.text.substring(currentLineStart, lineEnd); - const result = isRegionDelimiter(lineText); - if (!result || isInComment(sourceFile, currentLineStart)) { - continue; - } - if (!result[1]) { - const span = createTextSpanFromBounds(sourceFile.text.indexOf("//", currentLineStart), lineEnd); - regions.push(createOutliningSpan( - span, - "region" /* Region */, - span, - /*autoCollapse*/ - false, - result[2] || "#region" - )); - } else { - const region = regions.pop(); - if (region) { - region.textSpan.length = lineEnd - region.textSpan.start; - region.hintSpan.length = lineEnd - region.textSpan.start; - out.push(region); - } - } - } - } - function isRegionDelimiter(lineText) { - lineText = trimStringStart(lineText); - if (!startsWith(lineText, "//")) { - return null; - } - lineText = trimString(lineText.slice(2)); - return regionDelimiterRegExp.exec(lineText); - } - function addOutliningForLeadingCommentsForPos(pos, sourceFile, cancellationToken, out) { - const comments = getLeadingCommentRanges(sourceFile.text, pos); - if (!comments) - return; - let firstSingleLineCommentStart = -1; - let lastSingleLineCommentEnd = -1; - let singleLineCommentCount = 0; - const sourceText = sourceFile.getFullText(); - for (const { kind, pos: pos2, end } of comments) { - cancellationToken.throwIfCancellationRequested(); - switch (kind) { - case 2 /* SingleLineCommentTrivia */: - const commentText = sourceText.slice(pos2, end); - if (isRegionDelimiter(commentText)) { - combineAndAddMultipleSingleLineComments(); - singleLineCommentCount = 0; - break; - } - if (singleLineCommentCount === 0) { - firstSingleLineCommentStart = pos2; - } - lastSingleLineCommentEnd = end; - singleLineCommentCount++; - break; - case 3 /* MultiLineCommentTrivia */: - combineAndAddMultipleSingleLineComments(); - out.push(createOutliningSpanFromBounds(pos2, end, "comment" /* Comment */)); - singleLineCommentCount = 0; - break; - default: - Debug.assertNever(kind); - } - } - combineAndAddMultipleSingleLineComments(); - function combineAndAddMultipleSingleLineComments() { - if (singleLineCommentCount > 1) { - out.push(createOutliningSpanFromBounds(firstSingleLineCommentStart, lastSingleLineCommentEnd, "comment" /* Comment */)); - } - } - } - function addOutliningForLeadingCommentsForNode(n, sourceFile, cancellationToken, out) { - if (isJsxText(n)) - return; - addOutliningForLeadingCommentsForPos(n.pos, sourceFile, cancellationToken, out); - } - function createOutliningSpanFromBounds(pos, end, kind) { - return createOutliningSpan(createTextSpanFromBounds(pos, end), kind); - } - function getOutliningSpanForNode(n, sourceFile) { - switch (n.kind) { - case 241 /* Block */: - if (isFunctionLike(n.parent)) { - return functionSpan(n.parent, n, sourceFile); - } - switch (n.parent.kind) { - case 246 /* DoStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 248 /* ForStatement */: - case 245 /* IfStatement */: - case 247 /* WhileStatement */: - case 254 /* WithStatement */: - case 299 /* CatchClause */: - return spanForNode(n.parent); - case 258 /* TryStatement */: - const tryStatement = n.parent; - if (tryStatement.tryBlock === n) { - return spanForNode(n.parent); - } else if (tryStatement.finallyBlock === n) { - const node = findChildOfKind(tryStatement, 98 /* FinallyKeyword */, sourceFile); - if (node) - return spanForNode(node); - } - default: - return createOutliningSpan(createTextSpanFromNode(n, sourceFile), "code" /* Code */); - } - case 268 /* ModuleBlock */: - return spanForNode(n.parent); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 269 /* CaseBlock */: - case 187 /* TypeLiteral */: - case 206 /* ObjectBindingPattern */: - return spanForNode(n); - case 189 /* TupleType */: - return spanForNode( - n, - /*autoCollapse*/ - false, - /*useFullStart*/ - !isTupleTypeNode(n.parent), - 23 /* OpenBracketToken */ - ); - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - return spanForNodeArray(n.statements); - case 210 /* ObjectLiteralExpression */: - return spanForObjectOrArrayLiteral(n); - case 209 /* ArrayLiteralExpression */: - return spanForObjectOrArrayLiteral(n, 23 /* OpenBracketToken */); - case 284 /* JsxElement */: - return spanForJSXElement(n); - case 288 /* JsxFragment */: - return spanForJSXFragment(n); - case 285 /* JsxSelfClosingElement */: - case 286 /* JsxOpeningElement */: - return spanForJSXAttributes(n.attributes); - case 228 /* TemplateExpression */: - case 15 /* NoSubstitutionTemplateLiteral */: - return spanForTemplateLiteral(n); - case 207 /* ArrayBindingPattern */: - return spanForNode( - n, - /*autoCollapse*/ - false, - /*useFullStart*/ - !isBindingElement(n.parent), - 23 /* OpenBracketToken */ - ); - case 219 /* ArrowFunction */: - return spanForArrowFunction(n); - case 213 /* CallExpression */: - return spanForCallExpression(n); - case 217 /* ParenthesizedExpression */: - return spanForParenthesizedExpression(n); - case 275 /* NamedImports */: - case 279 /* NamedExports */: - case 300 /* AssertClause */: - return spanForNamedImportsOrExportsOrAssertClause(n); - } - function spanForNamedImportsOrExportsOrAssertClause(node) { - if (!node.elements.length) { - return void 0; - } - const openToken = findChildOfKind(node, 19 /* OpenBraceToken */, sourceFile); - const closeToken = findChildOfKind(node, 20 /* CloseBraceToken */, sourceFile); - if (!openToken || !closeToken || positionsAreOnSameLine(openToken.pos, closeToken.pos, sourceFile)) { - return void 0; - } - return spanBetweenTokens( - openToken, - closeToken, - node, - sourceFile, - /*autoCollapse*/ - false, - /*useFullStart*/ - false - ); - } - function spanForCallExpression(node) { - if (!node.arguments.length) { - return void 0; - } - const openToken = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile); - const closeToken = findChildOfKind(node, 22 /* CloseParenToken */, sourceFile); - if (!openToken || !closeToken || positionsAreOnSameLine(openToken.pos, closeToken.pos, sourceFile)) { - return void 0; - } - return spanBetweenTokens( - openToken, - closeToken, - node, - sourceFile, - /*autoCollapse*/ - false, - /*useFullStart*/ - true - ); - } - function spanForArrowFunction(node) { - if (isBlock(node.body) || isParenthesizedExpression(node.body) || positionsAreOnSameLine(node.body.getFullStart(), node.body.getEnd(), sourceFile)) { - return void 0; - } - const textSpan = createTextSpanFromBounds(node.body.getFullStart(), node.body.getEnd()); - return createOutliningSpan(textSpan, "code" /* Code */, createTextSpanFromNode(node)); - } - function spanForJSXElement(node) { - const textSpan = createTextSpanFromBounds(node.openingElement.getStart(sourceFile), node.closingElement.getEnd()); - const tagName = node.openingElement.tagName.getText(sourceFile); - const bannerText = "<" + tagName + ">..."; - return createOutliningSpan( - textSpan, - "code" /* Code */, - textSpan, - /*autoCollapse*/ - false, - bannerText - ); - } - function spanForJSXFragment(node) { - const textSpan = createTextSpanFromBounds(node.openingFragment.getStart(sourceFile), node.closingFragment.getEnd()); - const bannerText = "<>..."; - return createOutliningSpan( - textSpan, - "code" /* Code */, - textSpan, - /*autoCollapse*/ - false, - bannerText - ); - } - function spanForJSXAttributes(node) { - if (node.properties.length === 0) { - return void 0; - } - return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); - } - function spanForTemplateLiteral(node) { - if (node.kind === 15 /* NoSubstitutionTemplateLiteral */ && node.text.length === 0) { - return void 0; - } - return createOutliningSpanFromBounds(node.getStart(sourceFile), node.getEnd(), "code" /* Code */); - } - function spanForObjectOrArrayLiteral(node, open = 19 /* OpenBraceToken */) { - return spanForNode( - node, - /*autoCollapse*/ - false, - /*useFullStart*/ - !isArrayLiteralExpression(node.parent) && !isCallExpression(node.parent), - open - ); - } - function spanForNode(hintSpanNode, autoCollapse = false, useFullStart = true, open = 19 /* OpenBraceToken */, close = open === 19 /* OpenBraceToken */ ? 20 /* CloseBraceToken */ : 24 /* CloseBracketToken */) { - const openToken = findChildOfKind(n, open, sourceFile); - const closeToken = findChildOfKind(n, close, sourceFile); - return openToken && closeToken && spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse, useFullStart); - } - function spanForNodeArray(nodeArray) { - return nodeArray.length ? createOutliningSpan(createTextSpanFromRange(nodeArray), "code" /* Code */) : void 0; - } - function spanForParenthesizedExpression(node) { - if (positionsAreOnSameLine(node.getStart(), node.getEnd(), sourceFile)) - return void 0; - const textSpan = createTextSpanFromBounds(node.getStart(), node.getEnd()); - return createOutliningSpan(textSpan, "code" /* Code */, createTextSpanFromNode(node)); - } - } - function functionSpan(node, body, sourceFile) { - const openToken = tryGetFunctionOpenToken(node, body, sourceFile); - const closeToken = findChildOfKind(body, 20 /* CloseBraceToken */, sourceFile); - return openToken && closeToken && spanBetweenTokens( - openToken, - closeToken, - node, - sourceFile, - /*autoCollapse*/ - node.kind !== 219 /* ArrowFunction */ - ); - } - function spanBetweenTokens(openToken, closeToken, hintSpanNode, sourceFile, autoCollapse = false, useFullStart = true) { - const textSpan = createTextSpanFromBounds(useFullStart ? openToken.getFullStart() : openToken.getStart(sourceFile), closeToken.getEnd()); - return createOutliningSpan(textSpan, "code" /* Code */, createTextSpanFromNode(hintSpanNode, sourceFile), autoCollapse); - } - function createOutliningSpan(textSpan, kind, hintSpan = textSpan, autoCollapse = false, bannerText = "...") { - return { textSpan, kind, hintSpan, bannerText, autoCollapse }; - } - function tryGetFunctionOpenToken(node, body, sourceFile) { - if (isNodeArrayMultiLine(node.parameters, sourceFile)) { - const openParenToken = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile); - if (openParenToken) { - return openParenToken; - } - } - return findChildOfKind(body, 19 /* OpenBraceToken */, sourceFile); - } - var regionDelimiterRegExp; - var init_outliningElementsCollector = __esm({ - "src/services/outliningElementsCollector.ts"() { - "use strict"; - init_ts4(); - regionDelimiterRegExp = /^#(end)?region(?:\s+(.*))?(?:\r)?$/; - } - }); - - // src/services/_namespaces/ts.OutliningElementsCollector.ts - var ts_OutliningElementsCollector_exports = {}; - __export(ts_OutliningElementsCollector_exports, { - collectElements: () => collectElements - }); - var init_ts_OutliningElementsCollector = __esm({ - "src/services/_namespaces/ts.OutliningElementsCollector.ts"() { - "use strict"; - init_outliningElementsCollector(); - } - }); - - // src/services/rename.ts - function getRenameInfo(program, sourceFile, position, preferences) { - const node = getAdjustedRenameLocation(getTouchingPropertyName(sourceFile, position)); - if (nodeIsEligibleForRename(node)) { - const renameInfo = getRenameInfoForNode(node, program.getTypeChecker(), sourceFile, program, preferences); - if (renameInfo) { - return renameInfo; - } - } - return getRenameInfoError(Diagnostics.You_cannot_rename_this_element); - } - function getRenameInfoForNode(node, typeChecker, sourceFile, program, preferences) { - const symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) { - if (isStringLiteralLike(node)) { - const type = getContextualTypeFromParentOrAncestorTypeNode(node, typeChecker); - if (type && (type.flags & 128 /* StringLiteral */ || type.flags & 1048576 /* Union */ && every(type.types, (type2) => !!(type2.flags & 128 /* StringLiteral */)))) { - return getRenameInfoSuccess(node.text, node.text, "string" /* string */, "", node, sourceFile); - } - } else if (isLabelName(node)) { - const name = getTextOfNode(node); - return getRenameInfoSuccess(name, name, "label" /* label */, "" /* none */, node, sourceFile); - } - return void 0; - } - const { declarations } = symbol; - if (!declarations || declarations.length === 0) - return; - if (declarations.some((declaration) => isDefinedInLibraryFile(program, declaration))) { - return getRenameInfoError(Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library); - } - if (isIdentifier(node) && node.escapedText === "default" && symbol.parent && symbol.parent.flags & 1536 /* Module */) { - return void 0; - } - if (isStringLiteralLike(node) && tryGetImportFromModuleSpecifier(node)) { - return preferences.allowRenameOfImportPath ? getRenameInfoForModule(node, sourceFile, symbol) : void 0; - } - const wouldRenameNodeModules = wouldRenameInOtherNodeModules(sourceFile, symbol, typeChecker, preferences); - if (wouldRenameNodeModules) { - return getRenameInfoError(wouldRenameNodeModules); - } - const kind = ts_SymbolDisplay_exports.getSymbolKind(typeChecker, symbol, node); - const specifierName = isImportOrExportSpecifierName(node) || isStringOrNumericLiteralLike(node) && node.parent.kind === 167 /* ComputedPropertyName */ ? stripQuotes(getTextOfIdentifierOrLiteral(node)) : void 0; - const displayName = specifierName || typeChecker.symbolToString(symbol); - const fullDisplayName = specifierName || typeChecker.getFullyQualifiedName(symbol); - return getRenameInfoSuccess(displayName, fullDisplayName, kind, ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), node, sourceFile); - } - function isDefinedInLibraryFile(program, declaration) { - const sourceFile = declaration.getSourceFile(); - return program.isSourceFileDefaultLibrary(sourceFile) && fileExtensionIs(sourceFile.fileName, ".d.ts" /* Dts */); - } - function wouldRenameInOtherNodeModules(originalFile, symbol, checker, preferences) { - if (!preferences.providePrefixAndSuffixTextForRename && symbol.flags & 2097152 /* Alias */) { - const importSpecifier = symbol.declarations && find(symbol.declarations, (decl) => isImportSpecifier(decl)); - if (importSpecifier && !importSpecifier.propertyName) { - symbol = checker.getAliasedSymbol(symbol); - } - } - const { declarations } = symbol; - if (!declarations) { - return void 0; - } - const originalPackage = getPackagePathComponents(originalFile.path); - if (originalPackage === void 0) { - if (some(declarations, (declaration) => isInsideNodeModules(declaration.getSourceFile().path))) { - return Diagnostics.You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder; - } else { - return void 0; - } - } - for (const declaration of declarations) { - const declPackage = getPackagePathComponents(declaration.getSourceFile().path); - if (declPackage) { - const length2 = Math.min(originalPackage.length, declPackage.length); - for (let i = 0; i <= length2; i++) { - if (compareStringsCaseSensitive(originalPackage[i], declPackage[i]) !== 0 /* EqualTo */) { - return Diagnostics.You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder; - } - } - } - } - return void 0; - } - function getPackagePathComponents(filePath) { - const components = getPathComponents(filePath); - const nodeModulesIdx = components.lastIndexOf("node_modules"); - if (nodeModulesIdx === -1) { - return void 0; - } - return components.slice(0, nodeModulesIdx + 2); - } - function getRenameInfoForModule(node, sourceFile, moduleSymbol) { - if (!isExternalModuleNameRelative(node.text)) { - return getRenameInfoError(Diagnostics.You_cannot_rename_a_module_via_a_global_import); - } - const moduleSourceFile = moduleSymbol.declarations && find(moduleSymbol.declarations, isSourceFile); - if (!moduleSourceFile) - return void 0; - const withoutIndex = endsWith(node.text, "/index") || endsWith(node.text, "/index.js") ? void 0 : tryRemoveSuffix(removeFileExtension(moduleSourceFile.fileName), "/index"); - const name = withoutIndex === void 0 ? moduleSourceFile.fileName : withoutIndex; - const kind = withoutIndex === void 0 ? "module" /* moduleElement */ : "directory" /* directory */; - const indexAfterLastSlash = node.text.lastIndexOf("/") + 1; - const triggerSpan = createTextSpan(node.getStart(sourceFile) + 1 + indexAfterLastSlash, node.text.length - indexAfterLastSlash); - return { - canRename: true, - fileToRename: name, - kind, - displayName: name, - fullDisplayName: name, - kindModifiers: "" /* none */, - triggerSpan - }; - } - function getRenameInfoSuccess(displayName, fullDisplayName, kind, kindModifiers, node, sourceFile) { - return { - canRename: true, - fileToRename: void 0, - kind, - displayName, - fullDisplayName, - kindModifiers, - triggerSpan: createTriggerSpanForNode(node, sourceFile) - }; - } - function getRenameInfoError(diagnostic) { - return { canRename: false, localizedErrorMessage: getLocaleSpecificMessage(diagnostic) }; - } - function createTriggerSpanForNode(node, sourceFile) { - let start = node.getStart(sourceFile); - let width = node.getWidth(sourceFile); - if (isStringLiteralLike(node)) { - start += 1; - width -= 2; - } - return createTextSpan(start, width); - } - function nodeIsEligibleForRename(node) { - switch (node.kind) { - case 80 /* Identifier */: - case 81 /* PrivateIdentifier */: - case 11 /* StringLiteral */: - case 15 /* NoSubstitutionTemplateLiteral */: - case 110 /* ThisKeyword */: - return true; - case 9 /* NumericLiteral */: - return isLiteralNameOfPropertyDeclarationOrIndexAccess(node); - default: - return false; - } - } - var init_rename = __esm({ - "src/services/rename.ts"() { - "use strict"; - init_ts4(); - } - }); - - // src/services/_namespaces/ts.Rename.ts - var ts_Rename_exports = {}; - __export(ts_Rename_exports, { - getRenameInfo: () => getRenameInfo, - nodeIsEligibleForRename: () => nodeIsEligibleForRename - }); - var init_ts_Rename = __esm({ - "src/services/_namespaces/ts.Rename.ts"() { - "use strict"; - init_rename(); - } - }); - - // src/services/signatureHelp.ts - function getSignatureHelpItems(program, sourceFile, position, triggerReason, cancellationToken) { - const typeChecker = program.getTypeChecker(); - const startingToken = findTokenOnLeftOfPosition(sourceFile, position); - if (!startingToken) { - return void 0; - } - const onlyUseSyntacticOwners = !!triggerReason && triggerReason.kind === "characterTyped"; - if (onlyUseSyntacticOwners && (isInString(sourceFile, position, startingToken) || isInComment(sourceFile, position))) { - return void 0; - } - const isManuallyInvoked = !!triggerReason && triggerReason.kind === "invoked"; - const argumentInfo = getContainingArgumentInfo(startingToken, position, sourceFile, typeChecker, isManuallyInvoked); - if (!argumentInfo) - return void 0; - cancellationToken.throwIfCancellationRequested(); - const candidateInfo = getCandidateOrTypeInfo(argumentInfo, typeChecker, sourceFile, startingToken, onlyUseSyntacticOwners); - cancellationToken.throwIfCancellationRequested(); - if (!candidateInfo) { - return isSourceFileJS(sourceFile) ? createJSSignatureHelpItems(argumentInfo, program, cancellationToken) : void 0; - } - return typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => candidateInfo.kind === 0 /* Candidate */ ? createSignatureHelpItems(candidateInfo.candidates, candidateInfo.resolvedSignature, argumentInfo, sourceFile, typeChecker2) : createTypeHelpItems(candidateInfo.symbol, argumentInfo, sourceFile, typeChecker2)); - } - function getCandidateOrTypeInfo({ invocation, argumentCount }, checker, sourceFile, startingToken, onlyUseSyntacticOwners) { - switch (invocation.kind) { - case 0 /* Call */: { - if (onlyUseSyntacticOwners && !isSyntacticOwner(startingToken, invocation.node, sourceFile)) { - return void 0; - } - const candidates = []; - const resolvedSignature = checker.getResolvedSignatureForSignatureHelp(invocation.node, candidates, argumentCount); - return candidates.length === 0 ? void 0 : { kind: 0 /* Candidate */, candidates, resolvedSignature }; - } - case 1 /* TypeArgs */: { - const { called } = invocation; - if (onlyUseSyntacticOwners && !containsPrecedingToken(startingToken, sourceFile, isIdentifier(called) ? called.parent : called)) { - return void 0; - } - const candidates = getPossibleGenericSignatures(called, argumentCount, checker); - if (candidates.length !== 0) - return { kind: 0 /* Candidate */, candidates, resolvedSignature: first(candidates) }; - const symbol = checker.getSymbolAtLocation(called); - return symbol && { kind: 1 /* Type */, symbol }; - } - case 2 /* Contextual */: - return { kind: 0 /* Candidate */, candidates: [invocation.signature], resolvedSignature: invocation.signature }; - default: - return Debug.assertNever(invocation); - } - } - function isSyntacticOwner(startingToken, node, sourceFile) { - if (!isCallOrNewExpression(node)) - return false; - const invocationChildren = node.getChildren(sourceFile); - switch (startingToken.kind) { - case 21 /* OpenParenToken */: - return contains(invocationChildren, startingToken); - case 28 /* CommaToken */: { - const containingList = findContainingList(startingToken); - return !!containingList && contains(invocationChildren, containingList); - } - case 30 /* LessThanToken */: - return containsPrecedingToken(startingToken, sourceFile, node.expression); - default: - return false; - } - } - function createJSSignatureHelpItems(argumentInfo, program, cancellationToken) { - if (argumentInfo.invocation.kind === 2 /* Contextual */) - return void 0; - const expression = getExpressionFromInvocation(argumentInfo.invocation); - const name = isPropertyAccessExpression(expression) ? expression.name.text : void 0; - const typeChecker = program.getTypeChecker(); - return name === void 0 ? void 0 : firstDefined(program.getSourceFiles(), (sourceFile) => firstDefined(sourceFile.getNamedDeclarations().get(name), (declaration) => { - const type = declaration.symbol && typeChecker.getTypeOfSymbolAtLocation(declaration.symbol, declaration); - const callSignatures = type && type.getCallSignatures(); - if (callSignatures && callSignatures.length) { - return typeChecker.runWithCancellationToken( - cancellationToken, - (typeChecker2) => createSignatureHelpItems( - callSignatures, - callSignatures[0], - argumentInfo, - sourceFile, - typeChecker2, - /*useFullPrefix*/ - true - ) - ); - } - })); - } - function containsPrecedingToken(startingToken, sourceFile, container) { - const pos = startingToken.getFullStart(); - let currentParent = startingToken.parent; - while (currentParent) { - const precedingToken = findPrecedingToken( - pos, - sourceFile, - currentParent, - /*excludeJsdoc*/ - true - ); - if (precedingToken) { - return rangeContainsRange(container, precedingToken); - } - currentParent = currentParent.parent; - } - return Debug.fail("Could not find preceding token"); - } - function getArgumentInfoForCompletions(node, position, sourceFile) { - const info = getImmediatelyContainingArgumentInfo(node, position, sourceFile); - return !info || info.isTypeParameterList || info.invocation.kind !== 0 /* Call */ ? void 0 : { invocation: info.invocation.node, argumentCount: info.argumentCount, argumentIndex: info.argumentIndex }; - } - function getArgumentOrParameterListInfo(node, position, sourceFile) { - const info = getArgumentOrParameterListAndIndex(node, sourceFile); - if (!info) - return void 0; - const { list, argumentIndex } = info; - const argumentCount = getArgumentCount( - list, - /*ignoreTrailingComma*/ - isInString(sourceFile, position, node) - ); - if (argumentIndex !== 0) { - Debug.assertLessThan(argumentIndex, argumentCount); - } - const argumentsSpan = getApplicableSpanForArguments(list, sourceFile); - return { list, argumentIndex, argumentCount, argumentsSpan }; - } - function getArgumentOrParameterListAndIndex(node, sourceFile) { - if (node.kind === 30 /* LessThanToken */ || node.kind === 21 /* OpenParenToken */) { - return { list: getChildListThatStartsWithOpenerToken(node.parent, node, sourceFile), argumentIndex: 0 }; - } else { - const list = findContainingList(node); - return list && { list, argumentIndex: getArgumentIndex(list, node) }; - } - } - function getImmediatelyContainingArgumentInfo(node, position, sourceFile) { - const { parent: parent2 } = node; - if (isCallOrNewExpression(parent2)) { - const invocation = parent2; - const info = getArgumentOrParameterListInfo(node, position, sourceFile); - if (!info) - return void 0; - const { list, argumentIndex, argumentCount, argumentsSpan } = info; - const isTypeParameterList = !!parent2.typeArguments && parent2.typeArguments.pos === list.pos; - return { isTypeParameterList, invocation: { kind: 0 /* Call */, node: invocation }, argumentsSpan, argumentIndex, argumentCount }; - } else if (isNoSubstitutionTemplateLiteral(node) && isTaggedTemplateExpression(parent2)) { - if (isInsideTemplateLiteral(node, position, sourceFile)) { - return getArgumentListInfoForTemplate( - parent2, - /*argumentIndex*/ - 0, - sourceFile - ); - } - return void 0; - } else if (isTemplateHead(node) && parent2.parent.kind === 215 /* TaggedTemplateExpression */) { - const templateExpression = parent2; - const tagExpression = templateExpression.parent; - Debug.assert(templateExpression.kind === 228 /* TemplateExpression */); - const argumentIndex = isInsideTemplateLiteral(node, position, sourceFile) ? 0 : 1; - return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); - } else if (isTemplateSpan(parent2) && isTaggedTemplateExpression(parent2.parent.parent)) { - const templateSpan = parent2; - const tagExpression = parent2.parent.parent; - if (isTemplateTail(node) && !isInsideTemplateLiteral(node, position, sourceFile)) { - return void 0; - } - const spanIndex = templateSpan.parent.templateSpans.indexOf(templateSpan); - const argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node, position, sourceFile); - return getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile); - } else if (isJsxOpeningLikeElement(parent2)) { - const attributeSpanStart = parent2.attributes.pos; - const attributeSpanEnd = skipTrivia( - sourceFile.text, - parent2.attributes.end, - /*stopAfterLineBreak*/ - false - ); - return { - isTypeParameterList: false, - invocation: { kind: 0 /* Call */, node: parent2 }, - argumentsSpan: createTextSpan(attributeSpanStart, attributeSpanEnd - attributeSpanStart), - argumentIndex: 0, - argumentCount: 1 - }; - } else { - const typeArgInfo = getPossibleTypeArgumentsInfo(node, sourceFile); - if (typeArgInfo) { - const { called, nTypeArguments } = typeArgInfo; - const invocation = { kind: 1 /* TypeArgs */, called }; - const argumentsSpan = createTextSpanFromBounds(called.getStart(sourceFile), node.end); - return { isTypeParameterList: true, invocation, argumentsSpan, argumentIndex: nTypeArguments, argumentCount: nTypeArguments + 1 }; - } - return void 0; - } - } - function getImmediatelyContainingArgumentOrContextualParameterInfo(node, position, sourceFile, checker) { - return tryGetParameterInfo(node, position, sourceFile, checker) || getImmediatelyContainingArgumentInfo(node, position, sourceFile); - } - function getHighestBinary(b) { - return isBinaryExpression(b.parent) ? getHighestBinary(b.parent) : b; - } - function countBinaryExpressionParameters(b) { - return isBinaryExpression(b.left) ? countBinaryExpressionParameters(b.left) + 1 : 2; - } - function tryGetParameterInfo(startingToken, position, sourceFile, checker) { - const node = getAdjustedNode(startingToken); - if (node === void 0) - return void 0; - const info = getContextualSignatureLocationInfo(node, sourceFile, position, checker); - if (info === void 0) - return void 0; - const { contextualType, argumentIndex, argumentCount, argumentsSpan } = info; - const nonNullableContextualType = contextualType.getNonNullableType(); - const symbol = nonNullableContextualType.symbol; - if (symbol === void 0) - return void 0; - const signature = lastOrUndefined(nonNullableContextualType.getCallSignatures()); - if (signature === void 0) - return void 0; - const invocation = { kind: 2 /* Contextual */, signature, node: startingToken, symbol: chooseBetterSymbol(symbol) }; - return { isTypeParameterList: false, invocation, argumentsSpan, argumentIndex, argumentCount }; - } - function getAdjustedNode(node) { - switch (node.kind) { - case 21 /* OpenParenToken */: - case 28 /* CommaToken */: - return node; - default: - return findAncestor(node.parent, (n) => isParameter(n) ? true : isBindingElement(n) || isObjectBindingPattern(n) || isArrayBindingPattern(n) ? false : "quit"); - } - } - function getContextualSignatureLocationInfo(node, sourceFile, position, checker) { - const { parent: parent2 } = node; - switch (parent2.kind) { - case 217 /* ParenthesizedExpression */: - case 174 /* MethodDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - const info = getArgumentOrParameterListInfo(node, position, sourceFile); - if (!info) - return void 0; - const { argumentIndex, argumentCount, argumentsSpan } = info; - const contextualType = isMethodDeclaration(parent2) ? checker.getContextualTypeForObjectLiteralElement(parent2) : checker.getContextualType(parent2); - return contextualType && { contextualType, argumentIndex, argumentCount, argumentsSpan }; - case 226 /* BinaryExpression */: { - const highestBinary = getHighestBinary(parent2); - const contextualType2 = checker.getContextualType(highestBinary); - const argumentIndex2 = node.kind === 21 /* OpenParenToken */ ? 0 : countBinaryExpressionParameters(parent2) - 1; - const argumentCount2 = countBinaryExpressionParameters(highestBinary); - return contextualType2 && { contextualType: contextualType2, argumentIndex: argumentIndex2, argumentCount: argumentCount2, argumentsSpan: createTextSpanFromNode(parent2) }; - } - default: - return void 0; - } - } - function chooseBetterSymbol(s) { - return s.name === "__type" /* Type */ ? firstDefined(s.declarations, (d) => { - var _a; - return isFunctionTypeNode(d) ? (_a = tryCast(d.parent, canHaveSymbol)) == null ? void 0 : _a.symbol : void 0; - }) || s : s; - } - function getArgumentIndex(argumentsList, node) { - let argumentIndex = 0; - for (const child of argumentsList.getChildren()) { - if (child === node) { - break; - } - if (child.kind !== 28 /* CommaToken */) { - argumentIndex++; - } - } - return argumentIndex; - } - function getArgumentCount(argumentsList, ignoreTrailingComma) { - const listChildren = argumentsList.getChildren(); - let argumentCount = countWhere(listChildren, (arg) => arg.kind !== 28 /* CommaToken */); - if (!ignoreTrailingComma && listChildren.length > 0 && last(listChildren).kind === 28 /* CommaToken */) { - argumentCount++; - } - return argumentCount; - } - function getArgumentIndexForTemplatePiece(spanIndex, node, position, sourceFile) { - Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node."); - if (isTemplateLiteralToken(node)) { - if (isInsideTemplateLiteral(node, position, sourceFile)) { - return 0; - } - return spanIndex + 2; - } - return spanIndex + 1; - } - function getArgumentListInfoForTemplate(tagExpression, argumentIndex, sourceFile) { - const argumentCount = isNoSubstitutionTemplateLiteral(tagExpression.template) ? 1 : tagExpression.template.templateSpans.length + 1; - if (argumentIndex !== 0) { - Debug.assertLessThan(argumentIndex, argumentCount); - } - return { - isTypeParameterList: false, - invocation: { kind: 0 /* Call */, node: tagExpression }, - argumentsSpan: getApplicableSpanForTaggedTemplate(tagExpression, sourceFile), - argumentIndex, - argumentCount - }; - } - function getApplicableSpanForArguments(argumentsList, sourceFile) { - const applicableSpanStart = argumentsList.getFullStart(); - const applicableSpanEnd = skipTrivia( - sourceFile.text, - argumentsList.getEnd(), - /*stopAfterLineBreak*/ - false - ); - return createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); - } - function getApplicableSpanForTaggedTemplate(taggedTemplate, sourceFile) { - const template = taggedTemplate.template; - const applicableSpanStart = template.getStart(); - let applicableSpanEnd = template.getEnd(); - if (template.kind === 228 /* TemplateExpression */) { - const lastSpan = last(template.templateSpans); - if (lastSpan.literal.getFullWidth() === 0) { - applicableSpanEnd = skipTrivia( - sourceFile.text, - applicableSpanEnd, - /*stopAfterLineBreak*/ - false - ); - } - } - return createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); - } - function getContainingArgumentInfo(node, position, sourceFile, checker, isManuallyInvoked) { - for (let n = node; !isSourceFile(n) && (isManuallyInvoked || !isBlock(n)); n = n.parent) { - Debug.assert(rangeContainsRange(n.parent, n), "Not a subspan", () => `Child: ${Debug.formatSyntaxKind(n.kind)}, parent: ${Debug.formatSyntaxKind(n.parent.kind)}`); - const argumentInfo = getImmediatelyContainingArgumentOrContextualParameterInfo(n, position, sourceFile, checker); - if (argumentInfo) { - return argumentInfo; - } - } - return void 0; - } - function getChildListThatStartsWithOpenerToken(parent2, openerToken, sourceFile) { - const children = parent2.getChildren(sourceFile); - const indexOfOpenerToken = children.indexOf(openerToken); - Debug.assert(indexOfOpenerToken >= 0 && children.length > indexOfOpenerToken + 1); - return children[indexOfOpenerToken + 1]; - } - function getExpressionFromInvocation(invocation) { - return invocation.kind === 0 /* Call */ ? getInvokedExpression(invocation.node) : invocation.called; - } - function getEnclosingDeclarationFromInvocation(invocation) { - return invocation.kind === 0 /* Call */ ? invocation.node : invocation.kind === 1 /* TypeArgs */ ? invocation.called : invocation.node; - } - function createSignatureHelpItems(candidates, resolvedSignature, { isTypeParameterList, argumentCount, argumentsSpan: applicableSpan, invocation, argumentIndex }, sourceFile, typeChecker, useFullPrefix) { - var _a; - const enclosingDeclaration = getEnclosingDeclarationFromInvocation(invocation); - const callTargetSymbol = invocation.kind === 2 /* Contextual */ ? invocation.symbol : typeChecker.getSymbolAtLocation(getExpressionFromInvocation(invocation)) || useFullPrefix && ((_a = resolvedSignature.declaration) == null ? void 0 : _a.symbol); - const callTargetDisplayParts = callTargetSymbol ? symbolToDisplayParts( - typeChecker, - callTargetSymbol, - useFullPrefix ? sourceFile : void 0, - /*meaning*/ - void 0 - ) : emptyArray; - const items = map(candidates, (candidateSignature) => getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, typeChecker, enclosingDeclaration, sourceFile)); - if (argumentIndex !== 0) { - Debug.assertLessThan(argumentIndex, argumentCount); - } - let selectedItemIndex = 0; - let itemsSeen = 0; - for (let i = 0; i < items.length; i++) { - const item = items[i]; - if (candidates[i] === resolvedSignature) { - selectedItemIndex = itemsSeen; - if (item.length > 1) { - let count = 0; - for (const i2 of item) { - if (i2.isVariadic || i2.parameters.length >= argumentCount) { - selectedItemIndex = itemsSeen + count; - break; - } - count++; - } - } - } - itemsSeen += item.length; - } - Debug.assert(selectedItemIndex !== -1); - const help = { items: flatMapToMutable(items, identity), applicableSpan, selectedItemIndex, argumentIndex, argumentCount }; - const selected = help.items[selectedItemIndex]; - if (selected.isVariadic) { - const firstRest = findIndex(selected.parameters, (p) => !!p.isRest); - if (-1 < firstRest && firstRest < selected.parameters.length - 1) { - help.argumentIndex = selected.parameters.length; - } else { - help.argumentIndex = Math.min(help.argumentIndex, selected.parameters.length - 1); - } - } - return help; - } - function createTypeHelpItems(symbol, { argumentCount, argumentsSpan: applicableSpan, invocation, argumentIndex }, sourceFile, checker) { - const typeParameters = checker.getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - if (!typeParameters) - return void 0; - const items = [getTypeHelpItem(symbol, typeParameters, checker, getEnclosingDeclarationFromInvocation(invocation), sourceFile)]; - return { items, applicableSpan, selectedItemIndex: 0, argumentIndex, argumentCount }; - } - function getTypeHelpItem(symbol, typeParameters, checker, enclosingDeclaration, sourceFile) { - const typeSymbolDisplay = symbolToDisplayParts(checker, symbol); - const printer = createPrinterWithRemoveComments(); - const parameters = typeParameters.map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer)); - const documentation = symbol.getDocumentationComment(checker); - const tags = symbol.getJsDocTags(checker); - const prefixDisplayParts = [...typeSymbolDisplay, punctuationPart(30 /* LessThanToken */)]; - return { isVariadic: false, prefixDisplayParts, suffixDisplayParts: [punctuationPart(32 /* GreaterThanToken */)], separatorDisplayParts, parameters, documentation, tags }; - } - function getSignatureHelpItem(candidateSignature, callTargetDisplayParts, isTypeParameterList, checker, enclosingDeclaration, sourceFile) { - const infos = (isTypeParameterList ? itemInfoForTypeParameters : itemInfoForParameters)(candidateSignature, checker, enclosingDeclaration, sourceFile); - return map(infos, ({ isVariadic, parameters, prefix, suffix }) => { - const prefixDisplayParts = [...callTargetDisplayParts, ...prefix]; - const suffixDisplayParts = [...suffix, ...returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, checker)]; - const documentation = candidateSignature.getDocumentationComment(checker); - const tags = candidateSignature.getJsDocTags(); - return { isVariadic, prefixDisplayParts, suffixDisplayParts, separatorDisplayParts, parameters, documentation, tags }; - }); - } - function returnTypeToDisplayParts(candidateSignature, enclosingDeclaration, checker) { - return mapToDisplayParts((writer) => { - writer.writePunctuation(":"); - writer.writeSpace(" "); - const predicate = checker.getTypePredicateOfSignature(candidateSignature); - if (predicate) { - checker.writeTypePredicate( - predicate, - enclosingDeclaration, - /*flags*/ - void 0, - writer - ); - } else { - checker.writeType( - checker.getReturnTypeOfSignature(candidateSignature), - enclosingDeclaration, - /*flags*/ - void 0, - writer - ); - } - }); - } - function itemInfoForTypeParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) { - const typeParameters = (candidateSignature.target || candidateSignature).typeParameters; - const printer = createPrinterWithRemoveComments(); - const parameters = (typeParameters || emptyArray).map((t) => createSignatureHelpParameterForTypeParameter(t, checker, enclosingDeclaration, sourceFile, printer)); - const thisParameter = candidateSignature.thisParameter ? [checker.symbolToParameterDeclaration(candidateSignature.thisParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags)] : []; - return checker.getExpandedParameters(candidateSignature).map((paramList) => { - const params = factory.createNodeArray([...thisParameter, ...map(paramList, (param) => checker.symbolToParameterDeclaration(param, enclosingDeclaration, signatureHelpNodeBuilderFlags))]); - const parameterParts = mapToDisplayParts((writer) => { - printer.writeList(2576 /* CallExpressionArguments */, params, sourceFile, writer); - }); - return { isVariadic: false, parameters, prefix: [punctuationPart(30 /* LessThanToken */)], suffix: [punctuationPart(32 /* GreaterThanToken */), ...parameterParts] }; - }); - } - function itemInfoForParameters(candidateSignature, checker, enclosingDeclaration, sourceFile) { - const printer = createPrinterWithRemoveComments(); - const typeParameterParts = mapToDisplayParts((writer) => { - if (candidateSignature.typeParameters && candidateSignature.typeParameters.length) { - const args = factory.createNodeArray(candidateSignature.typeParameters.map((p) => checker.typeParameterToDeclaration(p, enclosingDeclaration, signatureHelpNodeBuilderFlags))); - printer.writeList(53776 /* TypeParameters */, args, sourceFile, writer); - } - }); - const lists = checker.getExpandedParameters(candidateSignature); - const isVariadic = !checker.hasEffectiveRestParameter(candidateSignature) ? (_) => false : lists.length === 1 ? (_) => true : (pList) => { - var _a; - return !!(pList.length && ((_a = tryCast(pList[pList.length - 1], isTransientSymbol)) == null ? void 0 : _a.links.checkFlags) & 32768 /* RestParameter */); - }; - return lists.map((parameterList) => ({ - isVariadic: isVariadic(parameterList), - parameters: parameterList.map((p) => createSignatureHelpParameterForParameter(p, checker, enclosingDeclaration, sourceFile, printer)), - prefix: [...typeParameterParts, punctuationPart(21 /* OpenParenToken */)], - suffix: [punctuationPart(22 /* CloseParenToken */)] - })); - } - function createSignatureHelpParameterForParameter(parameter, checker, enclosingDeclaration, sourceFile, printer) { - const displayParts = mapToDisplayParts((writer) => { - const param = checker.symbolToParameterDeclaration(parameter, enclosingDeclaration, signatureHelpNodeBuilderFlags); - printer.writeNode(4 /* Unspecified */, param, sourceFile, writer); - }); - const isOptional = checker.isOptionalParameter(parameter.valueDeclaration); - const isRest = isTransientSymbol(parameter) && !!(parameter.links.checkFlags & 32768 /* RestParameter */); - return { name: parameter.name, documentation: parameter.getDocumentationComment(checker), displayParts, isOptional, isRest }; - } - function createSignatureHelpParameterForTypeParameter(typeParameter, checker, enclosingDeclaration, sourceFile, printer) { - const displayParts = mapToDisplayParts((writer) => { - const param = checker.typeParameterToDeclaration(typeParameter, enclosingDeclaration, signatureHelpNodeBuilderFlags); - printer.writeNode(4 /* Unspecified */, param, sourceFile, writer); - }); - return { name: typeParameter.symbol.name, documentation: typeParameter.symbol.getDocumentationComment(checker), displayParts, isOptional: false, isRest: false }; - } - var signatureHelpNodeBuilderFlags, separatorDisplayParts; - var init_signatureHelp = __esm({ - "src/services/signatureHelp.ts"() { - "use strict"; - init_ts4(); - signatureHelpNodeBuilderFlags = 8192 /* OmitParameterModifiers */ | 70221824 /* IgnoreErrors */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; - separatorDisplayParts = [punctuationPart(28 /* CommaToken */), spacePart()]; - } - }); - - // src/services/_namespaces/ts.SignatureHelp.ts - var ts_SignatureHelp_exports = {}; - __export(ts_SignatureHelp_exports, { - getArgumentInfoForCompletions: () => getArgumentInfoForCompletions, - getSignatureHelpItems: () => getSignatureHelpItems - }); - var init_ts_SignatureHelp = __esm({ - "src/services/_namespaces/ts.SignatureHelp.ts"() { - "use strict"; - init_signatureHelp(); - } - }); - - // src/services/smartSelection.ts - function getSmartSelectionRange(pos, sourceFile) { - var _a, _b; - let selectionRange = { - textSpan: createTextSpanFromBounds(sourceFile.getFullStart(), sourceFile.getEnd()) - }; - let parentNode = sourceFile; - outer: - while (true) { - const children = getSelectionChildren(parentNode); - if (!children.length) - break; - for (let i = 0; i < children.length; i++) { - const prevNode = children[i - 1]; - const node = children[i]; - const nextNode = children[i + 1]; - if (getTokenPosOfNode( - node, - sourceFile, - /*includeJsDoc*/ - true - ) > pos) { - break outer; - } - const comment = singleOrUndefined(getTrailingCommentRanges(sourceFile.text, node.end)); - if (comment && comment.kind === 2 /* SingleLineCommentTrivia */) { - pushSelectionCommentRange(comment.pos, comment.end); - } - if (positionShouldSnapToNode(sourceFile, pos, node)) { - if (isFunctionBody(node) && isFunctionLikeDeclaration(parentNode) && !positionsAreOnSameLine(node.getStart(sourceFile), node.getEnd(), sourceFile)) { - pushSelectionRange(node.getStart(sourceFile), node.getEnd()); - } - if (isBlock(node) || isTemplateSpan(node) || isTemplateHead(node) || isTemplateTail(node) || prevNode && isTemplateHead(prevNode) || isVariableDeclarationList(node) && isVariableStatement(parentNode) || isSyntaxList(node) && isVariableDeclarationList(parentNode) || isVariableDeclaration(node) && isSyntaxList(parentNode) && children.length === 1 || isJSDocTypeExpression(node) || isJSDocSignature(node) || isJSDocTypeLiteral(node)) { - parentNode = node; - break; - } - if (isTemplateSpan(parentNode) && nextNode && isTemplateMiddleOrTemplateTail(nextNode)) { - const start2 = node.getFullStart() - "${".length; - const end2 = nextNode.getStart() + "}".length; - pushSelectionRange(start2, end2); - } - const isBetweenMultiLineBookends = isSyntaxList(node) && isListOpener(prevNode) && isListCloser(nextNode) && !positionsAreOnSameLine(prevNode.getStart(), nextNode.getStart(), sourceFile); - let start = isBetweenMultiLineBookends ? prevNode.getEnd() : node.getStart(); - const end = isBetweenMultiLineBookends ? nextNode.getStart() : getEndPos(sourceFile, node); - if (hasJSDocNodes(node) && ((_a = node.jsDoc) == null ? void 0 : _a.length)) { - pushSelectionRange(first(node.jsDoc).getStart(), end); - } - if (isSyntaxList(node)) { - const firstChild = node.getChildren()[0]; - if (firstChild && hasJSDocNodes(firstChild) && ((_b = firstChild.jsDoc) == null ? void 0 : _b.length) && firstChild.getStart() !== node.pos) { - start = Math.min(start, first(firstChild.jsDoc).getStart()); - } - } - pushSelectionRange(start, end); - if (isStringLiteral(node) || isTemplateLiteral(node)) { - pushSelectionRange(start + 1, end - 1); - } - parentNode = node; - break; - } - if (i === children.length - 1) { - break outer; - } - } - } - return selectionRange; - function pushSelectionRange(start, end) { - if (start !== end) { - const textSpan = createTextSpanFromBounds(start, end); - if (!selectionRange || // Skip ranges that are identical to the parent - !textSpansEqual(textSpan, selectionRange.textSpan) && // Skip ranges that don't contain the original position - textSpanIntersectsWithPosition(textSpan, pos)) { - selectionRange = { textSpan, ...selectionRange && { parent: selectionRange } }; - } - } - } - function pushSelectionCommentRange(start, end) { - pushSelectionRange(start, end); - let pos2 = start; - while (sourceFile.text.charCodeAt(pos2) === 47 /* slash */) { - pos2++; - } - pushSelectionRange(pos2, end); - } - } - function positionShouldSnapToNode(sourceFile, pos, node) { - Debug.assert(node.pos <= pos); - if (pos < node.end) { - return true; - } - const nodeEnd = node.getEnd(); - if (nodeEnd === pos) { - return getTouchingPropertyName(sourceFile, pos).pos < node.end; - } - return false; - } - function getSelectionChildren(node) { - var _a; - if (isSourceFile(node)) { - return groupChildren(node.getChildAt(0).getChildren(), isImport2); - } - if (isMappedTypeNode(node)) { - const [openBraceToken, ...children] = node.getChildren(); - const closeBraceToken = Debug.checkDefined(children.pop()); - Debug.assertEqual(openBraceToken.kind, 19 /* OpenBraceToken */); - Debug.assertEqual(closeBraceToken.kind, 20 /* CloseBraceToken */); - const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 148 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 58 /* QuestionToken */); - const groupedWithBrackets = groupChildren( - groupedWithPlusMinusTokens, - ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */ - ); - return [ - openBraceToken, - // Pivot on `:` - createSyntaxList2(splitChildren(groupedWithBrackets, ({ kind }) => kind === 59 /* ColonToken */)), - closeBraceToken - ]; - } - if (isPropertySignature(node)) { - const children = groupChildren(node.getChildren(), (child) => child === node.name || contains(node.modifiers, child)); - const firstJSDocChild = ((_a = children[0]) == null ? void 0 : _a.kind) === 327 /* JSDoc */ ? children[0] : void 0; - const withJSDocSeparated = firstJSDocChild ? children.slice(1) : children; - const splittedChildren = splitChildren(withJSDocSeparated, ({ kind }) => kind === 59 /* ColonToken */); - return firstJSDocChild ? [firstJSDocChild, createSyntaxList2(splittedChildren)] : splittedChildren; - } - if (isParameter(node)) { - const groupedDotDotDotAndName = groupChildren(node.getChildren(), (child) => child === node.dotDotDotToken || child === node.name); - const groupedWithQuestionToken = groupChildren(groupedDotDotDotAndName, (child) => child === groupedDotDotDotAndName[0] || child === node.questionToken); - return splitChildren(groupedWithQuestionToken, ({ kind }) => kind === 64 /* EqualsToken */); - } - if (isBindingElement(node)) { - return splitChildren(node.getChildren(), ({ kind }) => kind === 64 /* EqualsToken */); - } - return node.getChildren(); - } - function groupChildren(children, groupOn) { - const result = []; - let group2; - for (const child of children) { - if (groupOn(child)) { - group2 = group2 || []; - group2.push(child); - } else { - if (group2) { - result.push(createSyntaxList2(group2)); - group2 = void 0; - } - result.push(child); - } - } - if (group2) { - result.push(createSyntaxList2(group2)); - } - return result; - } - function splitChildren(children, pivotOn, separateTrailingSemicolon = true) { - if (children.length < 2) { - return children; - } - const splitTokenIndex = findIndex(children, pivotOn); - if (splitTokenIndex === -1) { - return children; - } - const leftChildren = children.slice(0, splitTokenIndex); - const splitToken = children[splitTokenIndex]; - const lastToken = last(children); - const separateLastToken = separateTrailingSemicolon && lastToken.kind === 27 /* SemicolonToken */; - const rightChildren = children.slice(splitTokenIndex + 1, separateLastToken ? children.length - 1 : void 0); - const result = compact([ - leftChildren.length ? createSyntaxList2(leftChildren) : void 0, - splitToken, - rightChildren.length ? createSyntaxList2(rightChildren) : void 0 - ]); - return separateLastToken ? result.concat(lastToken) : result; - } - function createSyntaxList2(children) { - Debug.assertGreaterThanOrEqual(children.length, 1); - return setTextRangePosEnd(parseNodeFactory.createSyntaxList(children), children[0].pos, last(children).end); - } - function isListOpener(token) { - const kind = token && token.kind; - return kind === 19 /* OpenBraceToken */ || kind === 23 /* OpenBracketToken */ || kind === 21 /* OpenParenToken */ || kind === 286 /* JsxOpeningElement */; - } - function isListCloser(token) { - const kind = token && token.kind; - return kind === 20 /* CloseBraceToken */ || kind === 24 /* CloseBracketToken */ || kind === 22 /* CloseParenToken */ || kind === 287 /* JsxClosingElement */; - } - function getEndPos(sourceFile, node) { - switch (node.kind) { - case 348 /* JSDocParameterTag */: - case 345 /* JSDocCallbackTag */: - case 355 /* JSDocPropertyTag */: - case 353 /* JSDocTypedefTag */: - case 350 /* JSDocThisTag */: - return sourceFile.getLineEndOfPosition(node.getStart()); - default: - return node.getEnd(); - } - } - var isImport2; - var init_smartSelection = __esm({ - "src/services/smartSelection.ts"() { - "use strict"; - init_ts4(); - isImport2 = or(isImportDeclaration, isImportEqualsDeclaration); - } - }); - - // src/services/_namespaces/ts.SmartSelectionRange.ts - var ts_SmartSelectionRange_exports = {}; - __export(ts_SmartSelectionRange_exports, { - getSmartSelectionRange: () => getSmartSelectionRange - }); - var init_ts_SmartSelectionRange = __esm({ - "src/services/_namespaces/ts.SmartSelectionRange.ts"() { - "use strict"; - init_smartSelection(); - } - }); - - // src/services/symbolDisplay.ts - function getSymbolKind(typeChecker, symbol, location) { - const result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location); - if (result !== "" /* unknown */) { - return result; - } - const flags = getCombinedLocalAndExportSymbolFlags(symbol); - if (flags & 32 /* Class */) { - return getDeclarationOfKind(symbol, 231 /* ClassExpression */) ? "local class" /* localClassElement */ : "class" /* classElement */; - } - if (flags & 384 /* Enum */) - return "enum" /* enumElement */; - if (flags & 524288 /* TypeAlias */) - return "type" /* typeElement */; - if (flags & 64 /* Interface */) - return "interface" /* interfaceElement */; - if (flags & 262144 /* TypeParameter */) - return "type parameter" /* typeParameterElement */; - if (flags & 8 /* EnumMember */) - return "enum member" /* enumMemberElement */; - if (flags & 2097152 /* Alias */) - return "alias" /* alias */; - if (flags & 1536 /* Module */) - return "module" /* moduleElement */; - return result; - } - function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) { - const roots = typeChecker.getRootSymbols(symbol); - if (roots.length === 1 && first(roots).flags & 8192 /* Method */ && typeChecker.getTypeOfSymbolAtLocation(symbol, location).getNonNullableType().getCallSignatures().length !== 0) { - return "method" /* memberFunctionElement */; - } - if (typeChecker.isUndefinedSymbol(symbol)) { - return "var" /* variableElement */; - } - if (typeChecker.isArgumentsSymbol(symbol)) { - return "local var" /* localVariableElement */; - } - if (location.kind === 110 /* ThisKeyword */ && isExpression(location) || isThisInTypeQuery(location)) { - return "parameter" /* parameterElement */; - } - const flags = getCombinedLocalAndExportSymbolFlags(symbol); - if (flags & 3 /* Variable */) { - if (isFirstDeclarationOfSymbolParameter(symbol)) { - return "parameter" /* parameterElement */; - } else if (symbol.valueDeclaration && isVarConst(symbol.valueDeclaration)) { - return "const" /* constElement */; - } else if (symbol.valueDeclaration && isVarUsing(symbol.valueDeclaration)) { - return "using" /* variableUsingElement */; - } else if (symbol.valueDeclaration && isVarAwaitUsing(symbol.valueDeclaration)) { - return "await using" /* variableAwaitUsingElement */; - } else if (forEach(symbol.declarations, isLet)) { - return "let" /* letElement */; - } - return isLocalVariableOrFunction(symbol) ? "local var" /* localVariableElement */ : "var" /* variableElement */; - } - if (flags & 16 /* Function */) - return isLocalVariableOrFunction(symbol) ? "local function" /* localFunctionElement */ : "function" /* functionElement */; - if (flags & 32768 /* GetAccessor */) - return "getter" /* memberGetAccessorElement */; - if (flags & 65536 /* SetAccessor */) - return "setter" /* memberSetAccessorElement */; - if (flags & 8192 /* Method */) - return "method" /* memberFunctionElement */; - if (flags & 16384 /* Constructor */) - return "constructor" /* constructorImplementationElement */; - if (flags & 131072 /* Signature */) - return "index" /* indexSignatureElement */; - if (flags & 4 /* Property */) { - if (flags & 33554432 /* Transient */ && symbol.links.checkFlags & 6 /* Synthetic */) { - const unionPropertyKind = forEach(typeChecker.getRootSymbols(symbol), (rootSymbol) => { - const rootSymbolFlags = rootSymbol.getFlags(); - if (rootSymbolFlags & (98308 /* PropertyOrAccessor */ | 3 /* Variable */)) { - return "property" /* memberVariableElement */; - } - }); - if (!unionPropertyKind) { - const typeOfUnionProperty = typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (typeOfUnionProperty.getCallSignatures().length) { - return "method" /* memberFunctionElement */; - } - return "property" /* memberVariableElement */; - } - return unionPropertyKind; - } - return "property" /* memberVariableElement */; - } - return "" /* unknown */; - } - function getNormalizedSymbolModifiers(symbol) { - if (symbol.declarations && symbol.declarations.length) { - const [declaration, ...declarations] = symbol.declarations; - const excludeFlags = length(declarations) && isDeprecatedDeclaration(declaration) && some(declarations, (d) => !isDeprecatedDeclaration(d)) ? 8192 /* Deprecated */ : 0 /* None */; - const modifiers = getNodeModifiers(declaration, excludeFlags); - if (modifiers) { - return modifiers.split(","); - } - } - return []; - } - function getSymbolModifiers(typeChecker, symbol) { - if (!symbol) { - return "" /* none */; - } - const modifiers = new Set(getNormalizedSymbolModifiers(symbol)); - if (symbol.flags & 2097152 /* Alias */) { - const resolvedSymbol = typeChecker.getAliasedSymbol(symbol); - if (resolvedSymbol !== symbol) { - forEach(getNormalizedSymbolModifiers(resolvedSymbol), (modifier) => { - modifiers.add(modifier); - }); - } - } - if (symbol.flags & 16777216 /* Optional */) { - modifiers.add("optional" /* optionalModifier */); - } - return modifiers.size > 0 ? arrayFrom(modifiers.values()).join(",") : "" /* none */; - } - function getSymbolDisplayPartsDocumentationAndSymbolKindWorker(typeChecker, symbol, sourceFile, enclosingDeclaration, location, type, semanticMeaning, alias) { - var _a; - const displayParts = []; - let documentation = []; - let tags = []; - const symbolFlags = getCombinedLocalAndExportSymbolFlags(symbol); - let symbolKind = semanticMeaning & 1 /* Value */ ? getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(typeChecker, symbol, location) : "" /* unknown */; - let hasAddedSymbolInfo = false; - const isThisExpression = location.kind === 110 /* ThisKeyword */ && isInExpressionContext(location) || isThisInTypeQuery(location); - let documentationFromAlias; - let tagsFromAlias; - let hasMultipleSignatures = false; - if (location.kind === 110 /* ThisKeyword */ && !isThisExpression) { - return { displayParts: [keywordPart(110 /* ThisKeyword */)], documentation: [], symbolKind: "primitive type" /* primitiveType */, tags: void 0 }; - } - if (symbolKind !== "" /* unknown */ || symbolFlags & 32 /* Class */ || symbolFlags & 2097152 /* Alias */) { - if (symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */) { - const declaration = find(symbol.declarations, (declaration2) => declaration2.name === location); - if (declaration) { - switch (declaration.kind) { - case 177 /* GetAccessor */: - symbolKind = "getter" /* memberGetAccessorElement */; - break; - case 178 /* SetAccessor */: - symbolKind = "setter" /* memberSetAccessorElement */; - break; - case 172 /* PropertyDeclaration */: - symbolKind = "accessor" /* memberAccessorVariableElement */; - break; - default: - Debug.assertNever(declaration); - } - } else { - symbolKind = "property" /* memberVariableElement */; - } - } - let signature; - type ?? (type = isThisExpression ? typeChecker.getTypeAtLocation(location) : typeChecker.getTypeOfSymbolAtLocation(symbol, location)); - if (location.parent && location.parent.kind === 211 /* PropertyAccessExpression */) { - const right = location.parent.name; - if (right === location || right && right.getFullWidth() === 0) { - location = location.parent; - } - } - let callExpressionLike; - if (isCallOrNewExpression(location)) { - callExpressionLike = location; - } else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) { - callExpressionLike = location.parent; - } else if (location.parent && (isJsxOpeningLikeElement(location.parent) || isTaggedTemplateExpression(location.parent)) && isFunctionLike(symbol.valueDeclaration)) { - callExpressionLike = location.parent; - } - if (callExpressionLike) { - signature = typeChecker.getResolvedSignature(callExpressionLike); - const useConstructSignatures = callExpressionLike.kind === 214 /* NewExpression */ || isCallExpression(callExpressionLike) && callExpressionLike.expression.kind === 108 /* SuperKeyword */; - const allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); - if (signature && !contains(allSignatures, signature.target) && !contains(allSignatures, signature)) { - signature = allSignatures.length ? allSignatures[0] : void 0; - } - if (signature) { - if (useConstructSignatures && symbolFlags & 32 /* Class */) { - symbolKind = "constructor" /* constructorImplementationElement */; - addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); - } else if (symbolFlags & 2097152 /* Alias */) { - symbolKind = "alias" /* alias */; - pushSymbolKind(symbolKind); - displayParts.push(spacePart()); - if (useConstructSignatures) { - if (signature.flags & 4 /* Abstract */) { - displayParts.push(keywordPart(128 /* AbstractKeyword */)); - displayParts.push(spacePart()); - } - displayParts.push(keywordPart(105 /* NewKeyword */)); - displayParts.push(spacePart()); - } - addFullSymbolName(symbol); - } else { - addPrefixForAnyFunctionOrVar(symbol, symbolKind); - } - switch (symbolKind) { - case "JSX attribute" /* jsxAttribute */: - case "property" /* memberVariableElement */: - case "var" /* variableElement */: - case "const" /* constElement */: - case "let" /* letElement */: - case "parameter" /* parameterElement */: - case "local var" /* localVariableElement */: - displayParts.push(punctuationPart(59 /* ColonToken */)); - displayParts.push(spacePart()); - if (!(getObjectFlags(type) & 16 /* Anonymous */) && type.symbol) { - addRange(displayParts, symbolToDisplayParts( - typeChecker, - type.symbol, - enclosingDeclaration, - /*meaning*/ - void 0, - 4 /* AllowAnyNodeKind */ | 1 /* WriteTypeParametersOrArguments */ - )); - displayParts.push(lineBreakPart()); - } - if (useConstructSignatures) { - if (signature.flags & 4 /* Abstract */) { - displayParts.push(keywordPart(128 /* AbstractKeyword */)); - displayParts.push(spacePart()); - } - displayParts.push(keywordPart(105 /* NewKeyword */)); - displayParts.push(spacePart()); - } - addSignatureDisplayParts(signature, allSignatures, 262144 /* WriteArrowStyleSignature */); - break; - default: - addSignatureDisplayParts(signature, allSignatures); - } - hasAddedSymbolInfo = true; - hasMultipleSignatures = allSignatures.length > 1; - } - } else if (isNameOfFunctionDeclaration(location) && !(symbolFlags & 98304 /* Accessor */) || // name of function declaration - location.kind === 137 /* ConstructorKeyword */ && location.parent.kind === 176 /* Constructor */) { - const functionDeclaration = location.parent; - const locationIsSymbolDeclaration = symbol.declarations && find(symbol.declarations, (declaration) => declaration === (location.kind === 137 /* ConstructorKeyword */ ? functionDeclaration.parent : functionDeclaration)); - if (locationIsSymbolDeclaration) { - const allSignatures = functionDeclaration.kind === 176 /* Constructor */ ? type.getNonNullableType().getConstructSignatures() : type.getNonNullableType().getCallSignatures(); - if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { - signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); - } else { - signature = allSignatures[0]; - } - if (functionDeclaration.kind === 176 /* Constructor */) { - symbolKind = "constructor" /* constructorImplementationElement */; - addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); - } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); - } - if (signature) { - addSignatureDisplayParts(signature, allSignatures); - } - hasAddedSymbolInfo = true; - hasMultipleSignatures = allSignatures.length > 1; - } - } - } - if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo && !isThisExpression) { - addAliasPrefixIfNecessary(); - if (getDeclarationOfKind(symbol, 231 /* ClassExpression */)) { - pushSymbolKind("local class" /* localClassElement */); - } else { - displayParts.push(keywordPart(86 /* ClassKeyword */)); - } - displayParts.push(spacePart()); - addFullSymbolName(symbol); - writeTypeParametersOfSymbol(symbol, sourceFile); - } - if (symbolFlags & 64 /* Interface */ && semanticMeaning & 2 /* Type */) { - prefixNextMeaning(); - displayParts.push(keywordPart(120 /* InterfaceKeyword */)); - displayParts.push(spacePart()); - addFullSymbolName(symbol); - writeTypeParametersOfSymbol(symbol, sourceFile); - } - if (symbolFlags & 524288 /* TypeAlias */ && semanticMeaning & 2 /* Type */) { - prefixNextMeaning(); - displayParts.push(keywordPart(156 /* TypeKeyword */)); - displayParts.push(spacePart()); - addFullSymbolName(symbol); - writeTypeParametersOfSymbol(symbol, sourceFile); - displayParts.push(spacePart()); - displayParts.push(operatorPart(64 /* EqualsToken */)); - displayParts.push(spacePart()); - addRange(displayParts, typeToDisplayParts(typeChecker, location.parent && isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, 8388608 /* InTypeAlias */)); - } - if (symbolFlags & 384 /* Enum */) { - prefixNextMeaning(); - if (some(symbol.declarations, (d) => isEnumDeclaration(d) && isEnumConst(d))) { - displayParts.push(keywordPart(87 /* ConstKeyword */)); - displayParts.push(spacePart()); - } - displayParts.push(keywordPart(94 /* EnumKeyword */)); - displayParts.push(spacePart()); - addFullSymbolName(symbol); - } - if (symbolFlags & 1536 /* Module */ && !isThisExpression) { - prefixNextMeaning(); - const declaration = getDeclarationOfKind(symbol, 267 /* ModuleDeclaration */); - const isNamespace = declaration && declaration.name && declaration.name.kind === 80 /* Identifier */; - displayParts.push(keywordPart(isNamespace ? 145 /* NamespaceKeyword */ : 144 /* ModuleKeyword */)); - displayParts.push(spacePart()); - addFullSymbolName(symbol); - } - if (symbolFlags & 262144 /* TypeParameter */ && semanticMeaning & 2 /* Type */) { - prefixNextMeaning(); - displayParts.push(punctuationPart(21 /* OpenParenToken */)); - displayParts.push(textPart("type parameter")); - displayParts.push(punctuationPart(22 /* CloseParenToken */)); - displayParts.push(spacePart()); - addFullSymbolName(symbol); - if (symbol.parent) { - addInPrefix(); - addFullSymbolName(symbol.parent, enclosingDeclaration); - writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); - } else { - const decl = getDeclarationOfKind(symbol, 168 /* TypeParameter */); - if (decl === void 0) - return Debug.fail(); - const declaration = decl.parent; - if (declaration) { - if (isFunctionLike(declaration)) { - addInPrefix(); - const signature = typeChecker.getSignatureFromDeclaration(declaration); - if (declaration.kind === 180 /* ConstructSignature */) { - displayParts.push(keywordPart(105 /* NewKeyword */)); - displayParts.push(spacePart()); - } else if (declaration.kind !== 179 /* CallSignature */ && declaration.name) { - addFullSymbolName(declaration.symbol); - } - addRange(displayParts, signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); - } else if (isTypeAliasDeclaration(declaration)) { - addInPrefix(); - displayParts.push(keywordPart(156 /* TypeKeyword */)); - displayParts.push(spacePart()); - addFullSymbolName(declaration.symbol); - writeTypeParametersOfSymbol(declaration.symbol, sourceFile); - } - } - } - } - if (symbolFlags & 8 /* EnumMember */) { - symbolKind = "enum member" /* enumMemberElement */; - addPrefixForAnyFunctionOrVar(symbol, "enum member"); - const declaration = (_a = symbol.declarations) == null ? void 0 : _a[0]; - if ((declaration == null ? void 0 : declaration.kind) === 306 /* EnumMember */) { - const constantValue = typeChecker.getConstantValue(declaration); - if (constantValue !== void 0) { - displayParts.push(spacePart()); - displayParts.push(operatorPart(64 /* EqualsToken */)); - displayParts.push(spacePart()); - displayParts.push(displayPart( - getTextOfConstantValue(constantValue), - typeof constantValue === "number" ? 7 /* numericLiteral */ : 8 /* stringLiteral */ - )); - } - } - } - if (symbol.flags & 2097152 /* Alias */) { - prefixNextMeaning(); - if (!hasAddedSymbolInfo || documentation.length === 0 && tags.length === 0) { - const resolvedSymbol = typeChecker.getAliasedSymbol(symbol); - if (resolvedSymbol !== symbol && resolvedSymbol.declarations && resolvedSymbol.declarations.length > 0) { - const resolvedNode = resolvedSymbol.declarations[0]; - const declarationName = getNameOfDeclaration(resolvedNode); - if (declarationName && !hasAddedSymbolInfo) { - const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, 2 /* Ambient */); - const shouldUseAliasName = symbol.name !== "default" && !isExternalModuleDeclaration; - const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKindWorker( - typeChecker, - resolvedSymbol, - getSourceFileOfNode(resolvedNode), - resolvedNode, - declarationName, - type, - semanticMeaning, - shouldUseAliasName ? symbol : resolvedSymbol - ); - displayParts.push(...resolvedInfo.displayParts); - displayParts.push(lineBreakPart()); - documentationFromAlias = resolvedInfo.documentation; - tagsFromAlias = resolvedInfo.tags; - } else { - documentationFromAlias = resolvedSymbol.getContextualDocumentationComment(resolvedNode, typeChecker); - tagsFromAlias = resolvedSymbol.getJsDocTags(typeChecker); - } - } - } - if (symbol.declarations) { - switch (symbol.declarations[0].kind) { - case 270 /* NamespaceExportDeclaration */: - displayParts.push(keywordPart(95 /* ExportKeyword */)); - displayParts.push(spacePart()); - displayParts.push(keywordPart(145 /* NamespaceKeyword */)); - break; - case 277 /* ExportAssignment */: - displayParts.push(keywordPart(95 /* ExportKeyword */)); - displayParts.push(spacePart()); - displayParts.push(keywordPart(symbol.declarations[0].isExportEquals ? 64 /* EqualsToken */ : 90 /* DefaultKeyword */)); - break; - case 281 /* ExportSpecifier */: - displayParts.push(keywordPart(95 /* ExportKeyword */)); - break; - default: - displayParts.push(keywordPart(102 /* ImportKeyword */)); - } - } - displayParts.push(spacePart()); - addFullSymbolName(symbol); - forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 271 /* ImportEqualsDeclaration */) { - const importEqualsDeclaration = declaration; - if (isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { - displayParts.push(spacePart()); - displayParts.push(operatorPart(64 /* EqualsToken */)); - displayParts.push(spacePart()); - displayParts.push(keywordPart(149 /* RequireKeyword */)); - displayParts.push(punctuationPart(21 /* OpenParenToken */)); - displayParts.push(displayPart(getTextOfNode(getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), 8 /* stringLiteral */)); - displayParts.push(punctuationPart(22 /* CloseParenToken */)); - } else { - const internalAliasSymbol = typeChecker.getSymbolAtLocation(importEqualsDeclaration.moduleReference); - if (internalAliasSymbol) { - displayParts.push(spacePart()); - displayParts.push(operatorPart(64 /* EqualsToken */)); - displayParts.push(spacePart()); - addFullSymbolName(internalAliasSymbol, enclosingDeclaration); - } - } - return true; - } - }); - } - if (!hasAddedSymbolInfo) { - if (symbolKind !== "" /* unknown */) { - if (type) { - if (isThisExpression) { - prefixNextMeaning(); - displayParts.push(keywordPart(110 /* ThisKeyword */)); - } else { - addPrefixForAnyFunctionOrVar(symbol, symbolKind); - } - if (symbolKind === "property" /* memberVariableElement */ || symbolKind === "accessor" /* memberAccessorVariableElement */ || symbolKind === "getter" /* memberGetAccessorElement */ || symbolKind === "setter" /* memberSetAccessorElement */ || symbolKind === "JSX attribute" /* jsxAttribute */ || symbolFlags & 3 /* Variable */ || symbolKind === "local var" /* localVariableElement */ || symbolKind === "index" /* indexSignatureElement */ || symbolKind === "using" /* variableUsingElement */ || symbolKind === "await using" /* variableAwaitUsingElement */ || isThisExpression) { - displayParts.push(punctuationPart(59 /* ColonToken */)); - displayParts.push(spacePart()); - if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */ && symbolKind !== "index" /* indexSignatureElement */) { - const typeParameterParts = mapToDisplayParts((writer) => { - const param = typeChecker.typeParameterToDeclaration(type, enclosingDeclaration, symbolDisplayNodeBuilderFlags); - getPrinter().writeNode(4 /* Unspecified */, param, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration)), writer); - }); - addRange(displayParts, typeParameterParts); - } else { - addRange(displayParts, typeToDisplayParts(typeChecker, type, enclosingDeclaration)); - } - if (isTransientSymbol(symbol) && symbol.links.target && isTransientSymbol(symbol.links.target) && symbol.links.target.links.tupleLabelDeclaration) { - const labelDecl = symbol.links.target.links.tupleLabelDeclaration; - Debug.assertNode(labelDecl.name, isIdentifier); - displayParts.push(spacePart()); - displayParts.push(punctuationPart(21 /* OpenParenToken */)); - displayParts.push(textPart(idText(labelDecl.name))); - displayParts.push(punctuationPart(22 /* CloseParenToken */)); - } - } else if (symbolFlags & 16 /* Function */ || symbolFlags & 8192 /* Method */ || symbolFlags & 16384 /* Constructor */ || symbolFlags & 131072 /* Signature */ || symbolFlags & 98304 /* Accessor */ || symbolKind === "method" /* memberFunctionElement */) { - const allSignatures = type.getNonNullableType().getCallSignatures(); - if (allSignatures.length) { - addSignatureDisplayParts(allSignatures[0], allSignatures); - hasMultipleSignatures = allSignatures.length > 1; - } - } - } - } else { - symbolKind = getSymbolKind(typeChecker, symbol, location); - } - } - if (documentation.length === 0 && !hasMultipleSignatures) { - documentation = symbol.getContextualDocumentationComment(enclosingDeclaration, typeChecker); - } - if (documentation.length === 0 && symbolFlags & 4 /* Property */) { - if (symbol.parent && symbol.declarations && forEach(symbol.parent.declarations, (declaration) => declaration.kind === 312 /* SourceFile */)) { - for (const declaration of symbol.declarations) { - if (!declaration.parent || declaration.parent.kind !== 226 /* BinaryExpression */) { - continue; - } - const rhsSymbol = typeChecker.getSymbolAtLocation(declaration.parent.right); - if (!rhsSymbol) { - continue; - } - documentation = rhsSymbol.getDocumentationComment(typeChecker); - tags = rhsSymbol.getJsDocTags(typeChecker); - if (documentation.length > 0) { - break; - } - } - } - } - if (documentation.length === 0 && isIdentifier(location) && symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration)) { - const declaration = symbol.valueDeclaration; - const parent2 = declaration.parent; - if (isIdentifier(declaration.name) && isObjectBindingPattern(parent2)) { - const name = getTextOfIdentifierOrLiteral(declaration.name); - const objectType = typeChecker.getTypeAtLocation(parent2); - documentation = firstDefined(objectType.isUnion() ? objectType.types : [objectType], (t) => { - const prop = t.getProperty(name); - return prop ? prop.getDocumentationComment(typeChecker) : void 0; - }) || emptyArray; - } - } - if (tags.length === 0 && !hasMultipleSignatures) { - tags = symbol.getContextualJsDocTags(enclosingDeclaration, typeChecker); - } - if (documentation.length === 0 && documentationFromAlias) { - documentation = documentationFromAlias; - } - if (tags.length === 0 && tagsFromAlias) { - tags = tagsFromAlias; - } - return { displayParts, documentation, symbolKind, tags: tags.length === 0 ? void 0 : tags }; - function getPrinter() { - return createPrinterWithRemoveComments(); - } - function prefixNextMeaning() { - if (displayParts.length) { - displayParts.push(lineBreakPart()); - } - addAliasPrefixIfNecessary(); - } - function addAliasPrefixIfNecessary() { - if (alias) { - pushSymbolKind("alias" /* alias */); - displayParts.push(spacePart()); - } - } - function addInPrefix() { - displayParts.push(spacePart()); - displayParts.push(keywordPart(103 /* InKeyword */)); - displayParts.push(spacePart()); - } - function addFullSymbolName(symbolToDisplay, enclosingDeclaration2) { - let indexInfos; - if (alias && symbolToDisplay === symbol) { - symbolToDisplay = alias; - } - if (symbolKind === "index" /* indexSignatureElement */) { - indexInfos = typeChecker.getIndexInfosOfIndexSymbol(symbolToDisplay); - } - let fullSymbolDisplayParts = []; - if (symbolToDisplay.flags & 131072 /* Signature */ && indexInfos) { - if (symbolToDisplay.parent) { - fullSymbolDisplayParts = symbolToDisplayParts(typeChecker, symbolToDisplay.parent); - } - fullSymbolDisplayParts.push(punctuationPart(23 /* OpenBracketToken */)); - indexInfos.forEach((info, i) => { - fullSymbolDisplayParts.push(...typeToDisplayParts(typeChecker, info.keyType)); - if (i !== indexInfos.length - 1) { - fullSymbolDisplayParts.push(spacePart()); - fullSymbolDisplayParts.push(punctuationPart(52 /* BarToken */)); - fullSymbolDisplayParts.push(spacePart()); - } - }); - fullSymbolDisplayParts.push(punctuationPart(24 /* CloseBracketToken */)); - } else { - fullSymbolDisplayParts = symbolToDisplayParts( - typeChecker, - symbolToDisplay, - enclosingDeclaration2 || sourceFile, - /*meaning*/ - void 0, - 1 /* WriteTypeParametersOrArguments */ | 2 /* UseOnlyExternalAliasing */ | 4 /* AllowAnyNodeKind */ - ); - } - addRange(displayParts, fullSymbolDisplayParts); - if (symbol.flags & 16777216 /* Optional */) { - displayParts.push(punctuationPart(58 /* QuestionToken */)); - } - } - function addPrefixForAnyFunctionOrVar(symbol2, symbolKind2) { - prefixNextMeaning(); - if (symbolKind2) { - pushSymbolKind(symbolKind2); - if (symbol2 && !some(symbol2.declarations, (d) => isArrowFunction(d) || (isFunctionExpression(d) || isClassExpression(d)) && !d.name)) { - displayParts.push(spacePart()); - addFullSymbolName(symbol2); - } - } - } - function pushSymbolKind(symbolKind2) { - switch (symbolKind2) { - case "var" /* variableElement */: - case "function" /* functionElement */: - case "let" /* letElement */: - case "const" /* constElement */: - case "constructor" /* constructorImplementationElement */: - case "using" /* variableUsingElement */: - case "await using" /* variableAwaitUsingElement */: - displayParts.push(textOrKeywordPart(symbolKind2)); - return; - default: - displayParts.push(punctuationPart(21 /* OpenParenToken */)); - displayParts.push(textOrKeywordPart(symbolKind2)); - displayParts.push(punctuationPart(22 /* CloseParenToken */)); - return; - } - } - function addSignatureDisplayParts(signature, allSignatures, flags = 0 /* None */) { - addRange(displayParts, signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */)); - if (allSignatures.length > 1) { - displayParts.push(spacePart()); - displayParts.push(punctuationPart(21 /* OpenParenToken */)); - displayParts.push(operatorPart(40 /* PlusToken */)); - displayParts.push(displayPart((allSignatures.length - 1).toString(), 7 /* numericLiteral */)); - displayParts.push(spacePart()); - displayParts.push(textPart(allSignatures.length === 2 ? "overload" : "overloads")); - displayParts.push(punctuationPart(22 /* CloseParenToken */)); - } - documentation = signature.getDocumentationComment(typeChecker); - tags = signature.getJsDocTags(); - if (allSignatures.length > 1 && documentation.length === 0 && tags.length === 0) { - documentation = allSignatures[0].getDocumentationComment(typeChecker); - tags = allSignatures[0].getJsDocTags().filter((tag) => tag.name !== "deprecated"); - } - } - function writeTypeParametersOfSymbol(symbol2, enclosingDeclaration2) { - const typeParameterParts = mapToDisplayParts((writer) => { - const params = typeChecker.symbolToTypeParameterDeclarations(symbol2, enclosingDeclaration2, symbolDisplayNodeBuilderFlags); - getPrinter().writeList(53776 /* TypeParameters */, params, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration2)), writer); - }); - addRange(displayParts, typeParameterParts); - } - } - function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias) { - return getSymbolDisplayPartsDocumentationAndSymbolKindWorker( - typeChecker, - symbol, - sourceFile, - enclosingDeclaration, - location, - /*type*/ - void 0, - semanticMeaning, - alias - ); - } - function isLocalVariableOrFunction(symbol) { - if (symbol.parent) { - return false; - } - return forEach(symbol.declarations, (declaration) => { - if (declaration.kind === 218 /* FunctionExpression */) { - return true; - } - if (declaration.kind !== 260 /* VariableDeclaration */ && declaration.kind !== 262 /* FunctionDeclaration */) { - return false; - } - for (let parent2 = declaration.parent; !isFunctionBlock(parent2); parent2 = parent2.parent) { - if (parent2.kind === 312 /* SourceFile */ || parent2.kind === 268 /* ModuleBlock */) { - return false; - } - } - return true; - }); - } - var symbolDisplayNodeBuilderFlags; - var init_symbolDisplay = __esm({ - "src/services/symbolDisplay.ts"() { - "use strict"; - init_ts4(); - symbolDisplayNodeBuilderFlags = 8192 /* OmitParameterModifiers */ | 70221824 /* IgnoreErrors */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; - } - }); - - // src/services/_namespaces/ts.SymbolDisplay.ts - var ts_SymbolDisplay_exports = {}; - __export(ts_SymbolDisplay_exports, { - getSymbolDisplayPartsDocumentationAndSymbolKind: () => getSymbolDisplayPartsDocumentationAndSymbolKind, - getSymbolKind: () => getSymbolKind, - getSymbolModifiers: () => getSymbolModifiers - }); - var init_ts_SymbolDisplay = __esm({ - "src/services/_namespaces/ts.SymbolDisplay.ts"() { - "use strict"; - init_symbolDisplay(); - } - }); - - // src/services/textChanges.ts - function getPos2(n) { - const result = n.__pos; - Debug.assert(typeof result === "number"); - return result; - } - function setPos(n, pos) { - Debug.assert(typeof pos === "number"); - n.__pos = pos; - } - function getEnd(n) { - const result = n.__end; - Debug.assert(typeof result === "number"); - return result; - } - function setEnd(n, end) { - Debug.assert(typeof end === "number"); - n.__end = end; - } - function skipWhitespacesAndLineBreaks(text, start) { - return skipTrivia( - text, - start, - /*stopAfterLineBreak*/ - false, - /*stopAtComments*/ - true - ); - } - function hasCommentsBeforeLineBreak(text, start) { - let i = start; - while (i < text.length) { - const ch = text.charCodeAt(i); - if (isWhiteSpaceSingleLine(ch)) { - i++; - continue; - } - return ch === 47 /* slash */; - } - return false; - } - function getAdjustedRange(sourceFile, startNode2, endNode2, options) { - return { pos: getAdjustedStartPosition(sourceFile, startNode2, options), end: getAdjustedEndPosition(sourceFile, endNode2, options) }; - } - function getAdjustedStartPosition(sourceFile, node, options, hasTrailingComment = false) { - var _a, _b; - const { leadingTriviaOption } = options; - if (leadingTriviaOption === 0 /* Exclude */) { - return node.getStart(sourceFile); - } - if (leadingTriviaOption === 3 /* StartLine */) { - const startPos = node.getStart(sourceFile); - const pos = getLineStartPositionForPosition(startPos, sourceFile); - return rangeContainsPosition(node, pos) ? pos : startPos; - } - if (leadingTriviaOption === 2 /* JSDoc */) { - const JSDocComments = getJSDocCommentRanges(node, sourceFile.text); - if (JSDocComments == null ? void 0 : JSDocComments.length) { - return getLineStartPositionForPosition(JSDocComments[0].pos, sourceFile); - } - } - const fullStart = node.getFullStart(); - const start = node.getStart(sourceFile); - if (fullStart === start) { - return start; - } - const fullStartLine = getLineStartPositionForPosition(fullStart, sourceFile); - const startLine = getLineStartPositionForPosition(start, sourceFile); - if (startLine === fullStartLine) { - return leadingTriviaOption === 1 /* IncludeAll */ ? fullStart : start; - } - if (hasTrailingComment) { - const comment = ((_a = getLeadingCommentRanges(sourceFile.text, fullStart)) == null ? void 0 : _a[0]) || ((_b = getTrailingCommentRanges(sourceFile.text, fullStart)) == null ? void 0 : _b[0]); - if (comment) { - return skipTrivia( - sourceFile.text, - comment.end, - /*stopAfterLineBreak*/ - true, - /*stopAtComments*/ - true - ); - } - } - const nextLineStart = fullStart > 0 ? 1 : 0; - let adjustedStartPosition = getStartPositionOfLine(getLineOfLocalPosition(sourceFile, fullStartLine) + nextLineStart, sourceFile); - adjustedStartPosition = skipWhitespacesAndLineBreaks(sourceFile.text, adjustedStartPosition); - return getStartPositionOfLine(getLineOfLocalPosition(sourceFile, adjustedStartPosition), sourceFile); - } - function getEndPositionOfMultilineTrailingComment(sourceFile, node, options) { - const { end } = node; - const { trailingTriviaOption } = options; - if (trailingTriviaOption === 2 /* Include */) { - const comments = getTrailingCommentRanges(sourceFile.text, end); - if (comments) { - const nodeEndLine = getLineOfLocalPosition(sourceFile, node.end); - for (const comment of comments) { - if (comment.kind === 2 /* SingleLineCommentTrivia */ || getLineOfLocalPosition(sourceFile, comment.pos) > nodeEndLine) { - break; - } - const commentEndLine = getLineOfLocalPosition(sourceFile, comment.end); - if (commentEndLine > nodeEndLine) { - return skipTrivia( - sourceFile.text, - comment.end, - /*stopAfterLineBreak*/ - true, - /*stopAtComments*/ - true - ); - } - } - } - } - return void 0; - } - function getAdjustedEndPosition(sourceFile, node, options) { - var _a; - const { end } = node; - const { trailingTriviaOption } = options; - if (trailingTriviaOption === 0 /* Exclude */) { - return end; - } - if (trailingTriviaOption === 1 /* ExcludeWhitespace */) { - const comments = concatenate(getTrailingCommentRanges(sourceFile.text, end), getLeadingCommentRanges(sourceFile.text, end)); - const realEnd = (_a = comments == null ? void 0 : comments[comments.length - 1]) == null ? void 0 : _a.end; - if (realEnd) { - return realEnd; - } - return end; - } - const multilineEndPosition = getEndPositionOfMultilineTrailingComment(sourceFile, node, options); - if (multilineEndPosition) { - return multilineEndPosition; - } - const newEnd = skipTrivia( - sourceFile.text, - end, - /*stopAfterLineBreak*/ - true - ); - return newEnd !== end && (trailingTriviaOption === 2 /* Include */ || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end; - } - function isSeparator(node, candidate) { - return !!candidate && !!node.parent && (candidate.kind === 28 /* CommaToken */ || candidate.kind === 27 /* SemicolonToken */ && node.parent.kind === 210 /* ObjectLiteralExpression */); - } - function isThisTypeAnnotatable(containingFunction) { - return isFunctionExpression(containingFunction) || isFunctionDeclaration(containingFunction); - } - function updateJSDocHost(parent2) { - if (parent2.kind !== 219 /* ArrowFunction */) { - return parent2; - } - const jsDocNode = parent2.parent.kind === 172 /* PropertyDeclaration */ ? parent2.parent : parent2.parent.parent; - jsDocNode.jsDoc = parent2.jsDoc; - return jsDocNode; - } - function tryMergeJsdocTags(oldTag, newTag) { - if (oldTag.kind !== newTag.kind) { - return void 0; - } - switch (oldTag.kind) { - case 348 /* JSDocParameterTag */: { - const oldParam = oldTag; - const newParam = newTag; - return isIdentifier(oldParam.name) && isIdentifier(newParam.name) && oldParam.name.escapedText === newParam.name.escapedText ? factory.createJSDocParameterTag( - /*tagName*/ - void 0, - newParam.name, - /*isBracketed*/ - false, - newParam.typeExpression, - newParam.isNameFirst, - oldParam.comment - ) : void 0; - } - case 349 /* JSDocReturnTag */: - return factory.createJSDocReturnTag( - /*tagName*/ - void 0, - newTag.typeExpression, - oldTag.comment - ); - case 351 /* JSDocTypeTag */: - return factory.createJSDocTypeTag( - /*tagName*/ - void 0, - newTag.typeExpression, - oldTag.comment - ); - } - } - function startPositionToDeleteNodeInList(sourceFile, node) { - return skipTrivia( - sourceFile.text, - getAdjustedStartPosition(sourceFile, node, { leadingTriviaOption: 1 /* IncludeAll */ }), - /*stopAfterLineBreak*/ - false, - /*stopAtComments*/ - true - ); - } - function endPositionToDeleteNodeInList(sourceFile, node, prevNode, nextNode) { - const end = startPositionToDeleteNodeInList(sourceFile, nextNode); - if (prevNode === void 0 || positionsAreOnSameLine(getAdjustedEndPosition(sourceFile, node, {}), end, sourceFile)) { - return end; - } - const token = findPrecedingToken(nextNode.getStart(sourceFile), sourceFile); - if (isSeparator(node, token)) { - const prevToken = findPrecedingToken(node.getStart(sourceFile), sourceFile); - if (isSeparator(prevNode, prevToken)) { - const pos = skipTrivia( - sourceFile.text, - token.getEnd(), - /*stopAfterLineBreak*/ - true, - /*stopAtComments*/ - true - ); - if (positionsAreOnSameLine(prevToken.getStart(sourceFile), token.getStart(sourceFile), sourceFile)) { - return isLineBreak(sourceFile.text.charCodeAt(pos - 1)) ? pos - 1 : pos; - } - if (isLineBreak(sourceFile.text.charCodeAt(pos))) { - return pos; - } - } - } - return end; - } - function getClassOrObjectBraceEnds(cls, sourceFile) { - const open = findChildOfKind(cls, 19 /* OpenBraceToken */, sourceFile); - const close = findChildOfKind(cls, 20 /* CloseBraceToken */, sourceFile); - return [open == null ? void 0 : open.end, close == null ? void 0 : close.end]; - } - function getMembersOrProperties(node) { - return isObjectLiteralExpression(node) ? node.properties : node.members; - } - function applyChanges(text, changes) { - for (let i = changes.length - 1; i >= 0; i--) { - const { span, newText } = changes[i]; - text = `${text.substring(0, span.start)}${newText}${text.substring(textSpanEnd(span))}`; - } - return text; - } - function isTrivia2(s) { - return skipTrivia(s, 0) === s.length; - } - function assignPositionsToNode(node) { - const visited = visitEachChild(node, assignPositionsToNode, textChangesTransformationContext, assignPositionsToNodeArray, assignPositionsToNode); - const newNode = nodeIsSynthesized(visited) ? visited : Object.create(visited); - setTextRangePosEnd(newNode, getPos2(node), getEnd(node)); - return newNode; - } - function assignPositionsToNodeArray(nodes, visitor, test, start, count) { - const visited = visitNodes2(nodes, visitor, test, start, count); - if (!visited) { - return visited; - } - Debug.assert(nodes); - const nodeArray = visited === nodes ? factory.createNodeArray(visited.slice(0)) : visited; - setTextRangePosEnd(nodeArray, getPos2(nodes), getEnd(nodes)); - return nodeArray; - } - function createWriter(newLine) { - let lastNonTriviaPosition = 0; - const writer = createTextWriter(newLine); - const onBeforeEmitNode = (node) => { - if (node) { - setPos(node, lastNonTriviaPosition); - } - }; - const onAfterEmitNode = (node) => { - if (node) { - setEnd(node, lastNonTriviaPosition); - } - }; - const onBeforeEmitNodeArray = (nodes) => { - if (nodes) { - setPos(nodes, lastNonTriviaPosition); - } - }; - const onAfterEmitNodeArray = (nodes) => { - if (nodes) { - setEnd(nodes, lastNonTriviaPosition); - } - }; - const onBeforeEmitToken = (node) => { - if (node) { - setPos(node, lastNonTriviaPosition); - } - }; - const onAfterEmitToken = (node) => { - if (node) { - setEnd(node, lastNonTriviaPosition); - } - }; - function setLastNonTriviaPosition(s, force) { - if (force || !isTrivia2(s)) { - lastNonTriviaPosition = writer.getTextPos(); - let i = 0; - while (isWhiteSpaceLike(s.charCodeAt(s.length - i - 1))) { - i++; - } - lastNonTriviaPosition -= i; - } - } - function write(s) { - writer.write(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeComment(s) { - writer.writeComment(s); - } - function writeKeyword(s) { - writer.writeKeyword(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeOperator(s) { - writer.writeOperator(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writePunctuation(s) { - writer.writePunctuation(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeTrailingSemicolon(s) { - writer.writeTrailingSemicolon(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeParameter(s) { - writer.writeParameter(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeProperty(s) { - writer.writeProperty(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeSpace(s) { - writer.writeSpace(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeStringLiteral(s) { - writer.writeStringLiteral(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeSymbol(s, sym) { - writer.writeSymbol(s, sym); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeLine(force) { - writer.writeLine(force); - } - function increaseIndent() { - writer.increaseIndent(); - } - function decreaseIndent() { - writer.decreaseIndent(); - } - function getText() { - return writer.getText(); - } - function rawWrite(s) { - writer.rawWrite(s); - setLastNonTriviaPosition( - s, - /*force*/ - false - ); - } - function writeLiteral(s) { - writer.writeLiteral(s); - setLastNonTriviaPosition( - s, - /*force*/ - true - ); - } - function getTextPos() { - return writer.getTextPos(); - } - function getLine() { - return writer.getLine(); - } - function getColumn() { - return writer.getColumn(); - } - function getIndent() { - return writer.getIndent(); - } - function isAtStartOfLine() { - return writer.isAtStartOfLine(); - } - function clear2() { - writer.clear(); - lastNonTriviaPosition = 0; - } - return { - onBeforeEmitNode, - onAfterEmitNode, - onBeforeEmitNodeArray, - onAfterEmitNodeArray, - onBeforeEmitToken, - onAfterEmitToken, - write, - writeComment, - writeKeyword, - writeOperator, - writePunctuation, - writeTrailingSemicolon, - writeParameter, - writeProperty, - writeSpace, - writeStringLiteral, - writeSymbol, - writeLine, - increaseIndent, - decreaseIndent, - getText, - rawWrite, - writeLiteral, - getTextPos, - getLine, - getColumn, - getIndent, - isAtStartOfLine, - hasTrailingComment: () => writer.hasTrailingComment(), - hasTrailingWhitespace: () => writer.hasTrailingWhitespace(), - clear: clear2 - }; - } - function getInsertionPositionAtSourceFileTop(sourceFile) { - let lastPrologue; - for (const node of sourceFile.statements) { - if (isPrologueDirective(node)) { - lastPrologue = node; - } else { - break; - } - } - let position = 0; - const text = sourceFile.text; - if (lastPrologue) { - position = lastPrologue.end; - advancePastLineBreak(); - return position; - } - const shebang = getShebang(text); - if (shebang !== void 0) { - position = shebang.length; - advancePastLineBreak(); - } - const ranges = getLeadingCommentRanges(text, position); - if (!ranges) - return position; - let lastComment; - let firstNodeLine; - for (const range of ranges) { - if (range.kind === 3 /* MultiLineCommentTrivia */) { - if (isPinnedComment(text, range.pos)) { - lastComment = { range, pinnedOrTripleSlash: true }; - continue; - } - } else if (isRecognizedTripleSlashComment(text, range.pos, range.end)) { - lastComment = { range, pinnedOrTripleSlash: true }; - continue; - } - if (lastComment) { - if (lastComment.pinnedOrTripleSlash) - break; - const commentLine = sourceFile.getLineAndCharacterOfPosition(range.pos).line; - const lastCommentEndLine = sourceFile.getLineAndCharacterOfPosition(lastComment.range.end).line; - if (commentLine >= lastCommentEndLine + 2) - break; - } - if (sourceFile.statements.length) { - if (firstNodeLine === void 0) - firstNodeLine = sourceFile.getLineAndCharacterOfPosition(sourceFile.statements[0].getStart()).line; - const commentEndLine = sourceFile.getLineAndCharacterOfPosition(range.end).line; - if (firstNodeLine < commentEndLine + 2) - break; - } - lastComment = { range, pinnedOrTripleSlash: false }; - } - if (lastComment) { - position = lastComment.range.end; - advancePastLineBreak(); - } - return position; - function advancePastLineBreak() { - if (position < text.length) { - const charCode = text.charCodeAt(position); - if (isLineBreak(charCode)) { - position++; - if (position < text.length && charCode === 13 /* carriageReturn */ && text.charCodeAt(position) === 10 /* lineFeed */) { - position++; - } - } - } - } - } - function isValidLocationToAddComment(sourceFile, position) { - return !isInComment(sourceFile, position) && !isInString(sourceFile, position) && !isInTemplateString(sourceFile, position) && !isInJSXText(sourceFile, position); - } - function needSemicolonBetween(a, b) { - return (isPropertySignature(a) || isPropertyDeclaration(a)) && isClassOrTypeElement(b) && b.name.kind === 167 /* ComputedPropertyName */ || isStatementButNotDeclaration(a) && isStatementButNotDeclaration(b); - } - function deleteNode(changes, sourceFile, node, options = { leadingTriviaOption: 1 /* IncludeAll */ }) { - const startPosition = getAdjustedStartPosition(sourceFile, node, options); - const endPosition = getAdjustedEndPosition(sourceFile, node, options); - changes.deleteRange(sourceFile, { pos: startPosition, end: endPosition }); - } - function deleteNodeInList(changes, deletedNodesInLists, sourceFile, node) { - const containingList = Debug.checkDefined(ts_formatting_exports.SmartIndenter.getContainingList(node, sourceFile)); - const index = indexOfNode(containingList, node); - Debug.assert(index !== -1); - if (containingList.length === 1) { - deleteNode(changes, sourceFile, node); - return; - } - Debug.assert(!deletedNodesInLists.has(node), "Deleting a node twice"); - deletedNodesInLists.add(node); - changes.deleteRange(sourceFile, { - pos: startPositionToDeleteNodeInList(sourceFile, node), - end: index === containingList.length - 1 ? getAdjustedEndPosition(sourceFile, node, {}) : endPositionToDeleteNodeInList(sourceFile, node, containingList[index - 1], containingList[index + 1]) - }); - } - var LeadingTriviaOption, TrailingTriviaOption, useNonAdjustedPositions, ChangeTracker, changesToText, textChangesTransformationContext, deleteDeclaration; - var init_textChanges = __esm({ - "src/services/textChanges.ts"() { - "use strict"; - init_ts4(); - LeadingTriviaOption = /* @__PURE__ */ ((LeadingTriviaOption2) => { - LeadingTriviaOption2[LeadingTriviaOption2["Exclude"] = 0] = "Exclude"; - LeadingTriviaOption2[LeadingTriviaOption2["IncludeAll"] = 1] = "IncludeAll"; - LeadingTriviaOption2[LeadingTriviaOption2["JSDoc"] = 2] = "JSDoc"; - LeadingTriviaOption2[LeadingTriviaOption2["StartLine"] = 3] = "StartLine"; - return LeadingTriviaOption2; - })(LeadingTriviaOption || {}); - TrailingTriviaOption = /* @__PURE__ */ ((TrailingTriviaOption2) => { - TrailingTriviaOption2[TrailingTriviaOption2["Exclude"] = 0] = "Exclude"; - TrailingTriviaOption2[TrailingTriviaOption2["ExcludeWhitespace"] = 1] = "ExcludeWhitespace"; - TrailingTriviaOption2[TrailingTriviaOption2["Include"] = 2] = "Include"; - return TrailingTriviaOption2; - })(TrailingTriviaOption || {}); - useNonAdjustedPositions = { - leadingTriviaOption: 0 /* Exclude */, - trailingTriviaOption: 0 /* Exclude */ - }; - ChangeTracker = class _ChangeTracker { - /** Public for tests only. Other callers should use `ChangeTracker.with`. */ - constructor(newLineCharacter, formatContext) { - this.newLineCharacter = newLineCharacter; - this.formatContext = formatContext; - this.changes = []; - this.classesWithNodesInsertedAtStart = /* @__PURE__ */ new Map(); - // Set implemented as Map - this.deletedNodes = []; - } - static fromContext(context) { - return new _ChangeTracker(getNewLineOrDefaultFromHost(context.host, context.formatContext.options), context.formatContext); - } - static with(context, cb) { - const tracker = _ChangeTracker.fromContext(context); - cb(tracker); - return tracker.getChanges(); - } - pushRaw(sourceFile, change) { - Debug.assertEqual(sourceFile.fileName, change.fileName); - for (const c of change.textChanges) { - this.changes.push({ - kind: 3 /* Text */, - sourceFile, - text: c.newText, - range: createTextRangeFromSpan(c.span) - }); - } - } - deleteRange(sourceFile, range) { - this.changes.push({ kind: 0 /* Remove */, sourceFile, range }); - } - delete(sourceFile, node) { - this.deletedNodes.push({ sourceFile, node }); - } - /** Stop! Consider using `delete` instead, which has logic for deleting nodes from delimited lists. */ - deleteNode(sourceFile, node, options = { leadingTriviaOption: 1 /* IncludeAll */ }) { - this.deleteRange(sourceFile, getAdjustedRange(sourceFile, node, node, options)); - } - deleteNodes(sourceFile, nodes, options = { leadingTriviaOption: 1 /* IncludeAll */ }, hasTrailingComment) { - for (const node of nodes) { - const pos = getAdjustedStartPosition(sourceFile, node, options, hasTrailingComment); - const end = getAdjustedEndPosition(sourceFile, node, options); - this.deleteRange(sourceFile, { pos, end }); - hasTrailingComment = !!getEndPositionOfMultilineTrailingComment(sourceFile, node, options); - } - } - deleteModifier(sourceFile, modifier) { - this.deleteRange(sourceFile, { pos: modifier.getStart(sourceFile), end: skipTrivia( - sourceFile.text, - modifier.end, - /*stopAfterLineBreak*/ - true - ) }); - } - deleteNodeRange(sourceFile, startNode2, endNode2, options = { leadingTriviaOption: 1 /* IncludeAll */ }) { - const startPosition = getAdjustedStartPosition(sourceFile, startNode2, options); - const endPosition = getAdjustedEndPosition(sourceFile, endNode2, options); - this.deleteRange(sourceFile, { pos: startPosition, end: endPosition }); - } - deleteNodeRangeExcludingEnd(sourceFile, startNode2, afterEndNode, options = { leadingTriviaOption: 1 /* IncludeAll */ }) { - const startPosition = getAdjustedStartPosition(sourceFile, startNode2, options); - const endPosition = afterEndNode === void 0 ? sourceFile.text.length : getAdjustedStartPosition(sourceFile, afterEndNode, options); - this.deleteRange(sourceFile, { pos: startPosition, end: endPosition }); - } - replaceRange(sourceFile, range, newNode, options = {}) { - this.changes.push({ kind: 1 /* ReplaceWithSingleNode */, sourceFile, range, options, node: newNode }); - } - replaceNode(sourceFile, oldNode, newNode, options = useNonAdjustedPositions) { - this.replaceRange(sourceFile, getAdjustedRange(sourceFile, oldNode, oldNode, options), newNode, options); - } - replaceNodeRange(sourceFile, startNode2, endNode2, newNode, options = useNonAdjustedPositions) { - this.replaceRange(sourceFile, getAdjustedRange(sourceFile, startNode2, endNode2, options), newNode, options); - } - replaceRangeWithNodes(sourceFile, range, newNodes, options = {}) { - this.changes.push({ kind: 2 /* ReplaceWithMultipleNodes */, sourceFile, range, options, nodes: newNodes }); - } - replaceNodeWithNodes(sourceFile, oldNode, newNodes, options = useNonAdjustedPositions) { - this.replaceRangeWithNodes(sourceFile, getAdjustedRange(sourceFile, oldNode, oldNode, options), newNodes, options); - } - replaceNodeWithText(sourceFile, oldNode, text) { - this.replaceRangeWithText(sourceFile, getAdjustedRange(sourceFile, oldNode, oldNode, useNonAdjustedPositions), text); - } - replaceNodeRangeWithNodes(sourceFile, startNode2, endNode2, newNodes, options = useNonAdjustedPositions) { - this.replaceRangeWithNodes(sourceFile, getAdjustedRange(sourceFile, startNode2, endNode2, options), newNodes, options); - } - nodeHasTrailingComment(sourceFile, oldNode, configurableEnd = useNonAdjustedPositions) { - return !!getEndPositionOfMultilineTrailingComment(sourceFile, oldNode, configurableEnd); - } - nextCommaToken(sourceFile, node) { - const next = findNextToken(node, node.parent, sourceFile); - return next && next.kind === 28 /* CommaToken */ ? next : void 0; - } - replacePropertyAssignment(sourceFile, oldNode, newNode) { - const suffix = this.nextCommaToken(sourceFile, oldNode) ? "" : "," + this.newLineCharacter; - this.replaceNode(sourceFile, oldNode, newNode, { suffix }); - } - insertNodeAt(sourceFile, pos, newNode, options = {}) { - this.replaceRange(sourceFile, createRange(pos), newNode, options); - } - insertNodesAt(sourceFile, pos, newNodes, options = {}) { - this.replaceRangeWithNodes(sourceFile, createRange(pos), newNodes, options); - } - insertNodeAtTopOfFile(sourceFile, newNode, blankLineBetween) { - this.insertAtTopOfFile(sourceFile, newNode, blankLineBetween); - } - insertNodesAtTopOfFile(sourceFile, newNodes, blankLineBetween) { - this.insertAtTopOfFile(sourceFile, newNodes, blankLineBetween); - } - insertAtTopOfFile(sourceFile, insert, blankLineBetween) { - const pos = getInsertionPositionAtSourceFileTop(sourceFile); - const options = { - prefix: pos === 0 ? void 0 : this.newLineCharacter, - suffix: (isLineBreak(sourceFile.text.charCodeAt(pos)) ? "" : this.newLineCharacter) + (blankLineBetween ? this.newLineCharacter : "") - }; - if (isArray(insert)) { - this.insertNodesAt(sourceFile, pos, insert, options); - } else { - this.insertNodeAt(sourceFile, pos, insert, options); - } - } - insertNodesAtEndOfFile(sourceFile, newNodes, blankLineBetween) { - this.insertAtEndOfFile(sourceFile, newNodes, blankLineBetween); - } - insertAtEndOfFile(sourceFile, insert, blankLineBetween) { - const pos = sourceFile.end + 1; - const options = { - prefix: this.newLineCharacter, - suffix: this.newLineCharacter + (blankLineBetween ? this.newLineCharacter : "") - }; - this.insertNodesAt(sourceFile, pos, insert, options); - } - insertStatementsInNewFile(fileName, statements, oldFile) { - if (!this.newFileChanges) { - this.newFileChanges = createMultiMap(); - } - this.newFileChanges.add(fileName, { oldFile, statements }); - } - insertFirstParameter(sourceFile, parameters, newParam) { - const p0 = firstOrUndefined(parameters); - if (p0) { - this.insertNodeBefore(sourceFile, p0, newParam); - } else { - this.insertNodeAt(sourceFile, parameters.pos, newParam); - } - } - insertNodeBefore(sourceFile, before, newNode, blankLineBetween = false, options = {}) { - this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween)); - } - insertNodesBefore(sourceFile, before, newNodes, blankLineBetween = false, options = {}) { - this.insertNodesAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNodes, this.getOptionsForInsertNodeBefore(before, first(newNodes), blankLineBetween)); - } - insertModifierAt(sourceFile, pos, modifier, options = {}) { - this.insertNodeAt(sourceFile, pos, factory.createToken(modifier), options); - } - insertModifierBefore(sourceFile, modifier, before) { - return this.insertModifierAt(sourceFile, before.getStart(sourceFile), modifier, { suffix: " " }); - } - insertCommentBeforeLine(sourceFile, lineNumber, position, commentText) { - const lineStartPosition = getStartPositionOfLine(lineNumber, sourceFile); - const startPosition = getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition); - const insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition); - const token = getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position); - const indent3 = sourceFile.text.slice(lineStartPosition, startPosition); - const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${indent3}`; - this.insertText(sourceFile, token.getStart(sourceFile), text); - } - insertJsdocCommentBefore(sourceFile, node, tag) { - const fnStart = node.getStart(sourceFile); - if (node.jsDoc) { - for (const jsdoc of node.jsDoc) { - this.deleteRange(sourceFile, { - pos: getLineStartPositionForPosition(jsdoc.getStart(sourceFile), sourceFile), - end: getAdjustedEndPosition( - sourceFile, - jsdoc, - /*options*/ - {} - ) - }); - } - } - const startPosition = getPrecedingNonSpaceCharacterPosition(sourceFile.text, fnStart - 1); - const indent3 = sourceFile.text.slice(startPosition, fnStart); - this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter + indent3 }); - } - createJSDocText(sourceFile, node) { - const comments = flatMap(node.jsDoc, (jsDoc2) => isString(jsDoc2.comment) ? factory.createJSDocText(jsDoc2.comment) : jsDoc2.comment); - const jsDoc = singleOrUndefined(node.jsDoc); - return jsDoc && positionsAreOnSameLine(jsDoc.pos, jsDoc.end, sourceFile) && length(comments) === 0 ? void 0 : factory.createNodeArray(intersperse(comments, factory.createJSDocText("\n"))); - } - replaceJSDocComment(sourceFile, node, tags) { - this.insertJsdocCommentBefore(sourceFile, updateJSDocHost(node), factory.createJSDocComment(this.createJSDocText(sourceFile, node), factory.createNodeArray(tags))); - } - addJSDocTags(sourceFile, parent2, newTags) { - const oldTags = flatMapToMutable(parent2.jsDoc, (j) => j.tags); - const unmergedNewTags = newTags.filter((newTag) => !oldTags.some((tag, i) => { - const merged = tryMergeJsdocTags(tag, newTag); - if (merged) - oldTags[i] = merged; - return !!merged; - })); - this.replaceJSDocComment(sourceFile, parent2, [...oldTags, ...unmergedNewTags]); - } - filterJSDocTags(sourceFile, parent2, predicate) { - this.replaceJSDocComment(sourceFile, parent2, filter(flatMapToMutable(parent2.jsDoc, (j) => j.tags), predicate)); - } - replaceRangeWithText(sourceFile, range, text) { - this.changes.push({ kind: 3 /* Text */, sourceFile, range, text }); - } - insertText(sourceFile, pos, text) { - this.replaceRangeWithText(sourceFile, createRange(pos), text); - } - /** Prefer this over replacing a node with another that has a type annotation, as it avoids reformatting the other parts of the node. */ - tryInsertTypeAnnotation(sourceFile, node, type) { - let endNode2; - if (isFunctionLike(node)) { - endNode2 = findChildOfKind(node, 22 /* CloseParenToken */, sourceFile); - if (!endNode2) { - if (!isArrowFunction(node)) - return false; - endNode2 = first(node.parameters); - } - } else { - endNode2 = (node.kind === 260 /* VariableDeclaration */ ? node.exclamationToken : node.questionToken) ?? node.name; - } - this.insertNodeAt(sourceFile, endNode2.end, type, { prefix: ": " }); - return true; - } - tryInsertThisTypeAnnotation(sourceFile, node, type) { - const start = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile).getStart(sourceFile) + 1; - const suffix = node.parameters.length ? ", " : ""; - this.insertNodeAt(sourceFile, start, type, { prefix: "this: ", suffix }); - } - insertTypeParameters(sourceFile, node, typeParameters) { - const start = (findChildOfKind(node, 21 /* OpenParenToken */, sourceFile) || first(node.parameters)).getStart(sourceFile); - this.insertNodesAt(sourceFile, start, typeParameters, { prefix: "<", suffix: ">", joiner: ", " }); - } - getOptionsForInsertNodeBefore(before, inserted, blankLineBetween) { - if (isStatement(before) || isClassElement(before)) { - return { suffix: blankLineBetween ? this.newLineCharacter + this.newLineCharacter : this.newLineCharacter }; - } else if (isVariableDeclaration(before)) { - return { suffix: ", " }; - } else if (isParameter(before)) { - return isParameter(inserted) ? { suffix: ", " } : {}; - } else if (isStringLiteral(before) && isImportDeclaration(before.parent) || isNamedImports(before)) { - return { suffix: ", " }; - } else if (isImportSpecifier(before)) { - return { suffix: "," + (blankLineBetween ? this.newLineCharacter : " ") }; - } - return Debug.failBadSyntaxKind(before); - } - insertNodeAtConstructorStart(sourceFile, ctr, newStatement) { - const firstStatement = firstOrUndefined(ctr.body.statements); - if (!firstStatement || !ctr.body.multiLine) { - this.replaceConstructorBody(sourceFile, ctr, [newStatement, ...ctr.body.statements]); - } else { - this.insertNodeBefore(sourceFile, firstStatement, newStatement); - } - } - insertNodeAtConstructorStartAfterSuperCall(sourceFile, ctr, newStatement) { - const superCallStatement = find(ctr.body.statements, (stmt) => isExpressionStatement(stmt) && isSuperCall(stmt.expression)); - if (!superCallStatement || !ctr.body.multiLine) { - this.replaceConstructorBody(sourceFile, ctr, [...ctr.body.statements, newStatement]); - } else { - this.insertNodeAfter(sourceFile, superCallStatement, newStatement); - } - } - insertNodeAtConstructorEnd(sourceFile, ctr, newStatement) { - const lastStatement = lastOrUndefined(ctr.body.statements); - if (!lastStatement || !ctr.body.multiLine) { - this.replaceConstructorBody(sourceFile, ctr, [...ctr.body.statements, newStatement]); - } else { - this.insertNodeAfter(sourceFile, lastStatement, newStatement); - } - } - replaceConstructorBody(sourceFile, ctr, statements) { - this.replaceNode(sourceFile, ctr.body, factory.createBlock( - statements, - /*multiLine*/ - true - )); - } - insertNodeAtEndOfScope(sourceFile, scope, newNode) { - const pos = getAdjustedStartPosition(sourceFile, scope.getLastToken(), {}); - this.insertNodeAt(sourceFile, pos, newNode, { - prefix: isLineBreak(sourceFile.text.charCodeAt(scope.getLastToken().pos)) ? this.newLineCharacter : this.newLineCharacter + this.newLineCharacter, - suffix: this.newLineCharacter - }); - } - insertMemberAtStart(sourceFile, node, newElement) { - this.insertNodeAtStartWorker(sourceFile, node, newElement); - } - insertNodeAtObjectStart(sourceFile, obj, newElement) { - this.insertNodeAtStartWorker(sourceFile, obj, newElement); - } - insertNodeAtStartWorker(sourceFile, node, newElement) { - const indentation = this.guessIndentationFromExistingMembers(sourceFile, node) ?? this.computeIndentationForNewMember(sourceFile, node); - this.insertNodeAt(sourceFile, getMembersOrProperties(node).pos, newElement, this.getInsertNodeAtStartInsertOptions(sourceFile, node, indentation)); - } - /** - * Tries to guess the indentation from the existing members of a class/interface/object. All members must be on - * new lines and must share the same indentation. - */ - guessIndentationFromExistingMembers(sourceFile, node) { - let indentation; - let lastRange = node; - for (const member of getMembersOrProperties(node)) { - if (rangeStartPositionsAreOnSameLine(lastRange, member, sourceFile)) { - return void 0; - } - const memberStart = member.getStart(sourceFile); - const memberIndentation = ts_formatting_exports.SmartIndenter.findFirstNonWhitespaceColumn(getLineStartPositionForPosition(memberStart, sourceFile), memberStart, sourceFile, this.formatContext.options); - if (indentation === void 0) { - indentation = memberIndentation; - } else if (memberIndentation !== indentation) { - return void 0; - } - lastRange = member; - } - return indentation; - } - computeIndentationForNewMember(sourceFile, node) { - const nodeStart = node.getStart(sourceFile); - return ts_formatting_exports.SmartIndenter.findFirstNonWhitespaceColumn(getLineStartPositionForPosition(nodeStart, sourceFile), nodeStart, sourceFile, this.formatContext.options) + (this.formatContext.options.indentSize ?? 4); - } - getInsertNodeAtStartInsertOptions(sourceFile, node, indentation) { - const members = getMembersOrProperties(node); - const isEmpty = members.length === 0; - const isFirstInsertion = addToSeen(this.classesWithNodesInsertedAtStart, getNodeId(node), { node, sourceFile }); - const insertTrailingComma = isObjectLiteralExpression(node) && (!isJsonSourceFile(sourceFile) || !isEmpty); - const insertLeadingComma = isObjectLiteralExpression(node) && isJsonSourceFile(sourceFile) && isEmpty && !isFirstInsertion; - return { - indentation, - prefix: (insertLeadingComma ? "," : "") + this.newLineCharacter, - suffix: insertTrailingComma ? "," : isInterfaceDeclaration(node) && isEmpty ? ";" : "" - }; - } - insertNodeAfterComma(sourceFile, after, newNode) { - const endPosition = this.insertNodeAfterWorker(sourceFile, this.nextCommaToken(sourceFile, after) || after, newNode); - this.insertNodeAt(sourceFile, endPosition, newNode, this.getInsertNodeAfterOptions(sourceFile, after)); - } - insertNodeAfter(sourceFile, after, newNode) { - const endPosition = this.insertNodeAfterWorker(sourceFile, after, newNode); - this.insertNodeAt(sourceFile, endPosition, newNode, this.getInsertNodeAfterOptions(sourceFile, after)); - } - insertNodeAtEndOfList(sourceFile, list, newNode) { - this.insertNodeAt(sourceFile, list.end, newNode, { prefix: ", " }); - } - insertNodesAfter(sourceFile, after, newNodes) { - const endPosition = this.insertNodeAfterWorker(sourceFile, after, first(newNodes)); - this.insertNodesAt(sourceFile, endPosition, newNodes, this.getInsertNodeAfterOptions(sourceFile, after)); - } - insertNodeAfterWorker(sourceFile, after, newNode) { - if (needSemicolonBetween(after, newNode)) { - if (sourceFile.text.charCodeAt(after.end - 1) !== 59 /* semicolon */) { - this.replaceRange(sourceFile, createRange(after.end), factory.createToken(27 /* SemicolonToken */)); - } - } - const endPosition = getAdjustedEndPosition(sourceFile, after, {}); - return endPosition; - } - getInsertNodeAfterOptions(sourceFile, after) { - const options = this.getInsertNodeAfterOptionsWorker(after); - return { - ...options, - prefix: after.end === sourceFile.end && isStatement(after) ? options.prefix ? ` -${options.prefix}` : "\n" : options.prefix - }; - } - getInsertNodeAfterOptionsWorker(node) { - switch (node.kind) { - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: - return { prefix: this.newLineCharacter, suffix: this.newLineCharacter }; - case 260 /* VariableDeclaration */: - case 11 /* StringLiteral */: - case 80 /* Identifier */: - return { prefix: ", " }; - case 303 /* PropertyAssignment */: - return { suffix: "," + this.newLineCharacter }; - case 95 /* ExportKeyword */: - return { prefix: " " }; - case 169 /* Parameter */: - return {}; - default: - Debug.assert(isStatement(node) || isClassOrTypeElement(node)); - return { suffix: this.newLineCharacter }; - } - } - insertName(sourceFile, node, name) { - Debug.assert(!node.name); - if (node.kind === 219 /* ArrowFunction */) { - const arrow = findChildOfKind(node, 39 /* EqualsGreaterThanToken */, sourceFile); - const lparen = findChildOfKind(node, 21 /* OpenParenToken */, sourceFile); - if (lparen) { - this.insertNodesAt(sourceFile, lparen.getStart(sourceFile), [factory.createToken(100 /* FunctionKeyword */), factory.createIdentifier(name)], { joiner: " " }); - deleteNode(this, sourceFile, arrow); - } else { - this.insertText(sourceFile, first(node.parameters).getStart(sourceFile), `function ${name}(`); - this.replaceRange(sourceFile, arrow, factory.createToken(22 /* CloseParenToken */)); - } - if (node.body.kind !== 241 /* Block */) { - this.insertNodesAt(sourceFile, node.body.getStart(sourceFile), [factory.createToken(19 /* OpenBraceToken */), factory.createToken(107 /* ReturnKeyword */)], { joiner: " ", suffix: " " }); - this.insertNodesAt(sourceFile, node.body.end, [factory.createToken(27 /* SemicolonToken */), factory.createToken(20 /* CloseBraceToken */)], { joiner: " " }); - } - } else { - const pos = findChildOfKind(node, node.kind === 218 /* FunctionExpression */ ? 100 /* FunctionKeyword */ : 86 /* ClassKeyword */, sourceFile).end; - this.insertNodeAt(sourceFile, pos, factory.createIdentifier(name), { prefix: " " }); - } - } - insertExportModifier(sourceFile, node) { - this.insertText(sourceFile, node.getStart(sourceFile), "export "); - } - insertImportSpecifierAtIndex(sourceFile, importSpecifier, namedImports, index) { - const prevSpecifier = namedImports.elements[index - 1]; - if (prevSpecifier) { - this.insertNodeInListAfter(sourceFile, prevSpecifier, importSpecifier); - } else { - this.insertNodeBefore( - sourceFile, - namedImports.elements[0], - importSpecifier, - !positionsAreOnSameLine(namedImports.elements[0].getStart(), namedImports.parent.parent.getStart(), sourceFile) - ); - } - } - /** - * This function should be used to insert nodes in lists when nodes don't carry separators as the part of the node range, - * i.e. arguments in arguments lists, parameters in parameter lists etc. - * Note that separators are part of the node in statements and class elements. - */ - insertNodeInListAfter(sourceFile, after, newNode, containingList = ts_formatting_exports.SmartIndenter.getContainingList(after, sourceFile)) { - if (!containingList) { - Debug.fail("node is not a list element"); - return; - } - const index = indexOfNode(containingList, after); - if (index < 0) { - return; - } - const end = after.getEnd(); - if (index !== containingList.length - 1) { - const nextToken = getTokenAtPosition(sourceFile, after.end); - if (nextToken && isSeparator(after, nextToken)) { - const nextNode = containingList[index + 1]; - const startPos = skipWhitespacesAndLineBreaks(sourceFile.text, nextNode.getFullStart()); - const suffix = `${tokenToString(nextToken.kind)}${sourceFile.text.substring(nextToken.end, startPos)}`; - this.insertNodesAt(sourceFile, startPos, [newNode], { suffix }); - } - } else { - const afterStart = after.getStart(sourceFile); - const afterStartLinePosition = getLineStartPositionForPosition(afterStart, sourceFile); - let separator; - let multilineList = false; - if (containingList.length === 1) { - separator = 28 /* CommaToken */; - } else { - const tokenBeforeInsertPosition = findPrecedingToken(after.pos, sourceFile); - separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : 28 /* CommaToken */; - const afterMinusOneStartLinePosition = getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile); - multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition; - } - if (hasCommentsBeforeLineBreak(sourceFile.text, after.end)) { - multilineList = true; - } - if (multilineList) { - this.replaceRange(sourceFile, createRange(end), factory.createToken(separator)); - const indentation = ts_formatting_exports.SmartIndenter.findFirstNonWhitespaceColumn(afterStartLinePosition, afterStart, sourceFile, this.formatContext.options); - let insertPos = skipTrivia( - sourceFile.text, - end, - /*stopAfterLineBreak*/ - true, - /*stopAtComments*/ - false - ); - while (insertPos !== end && isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) { - insertPos--; - } - this.replaceRange(sourceFile, createRange(insertPos), newNode, { indentation, prefix: this.newLineCharacter }); - } else { - this.replaceRange(sourceFile, createRange(end), newNode, { prefix: `${tokenToString(separator)} ` }); - } - } - } - parenthesizeExpression(sourceFile, expression) { - this.replaceRange(sourceFile, rangeOfNode(expression), factory.createParenthesizedExpression(expression)); - } - finishClassesWithNodesInsertedAtStart() { - this.classesWithNodesInsertedAtStart.forEach(({ node, sourceFile }) => { - const [openBraceEnd, closeBraceEnd] = getClassOrObjectBraceEnds(node, sourceFile); - if (openBraceEnd !== void 0 && closeBraceEnd !== void 0) { - const isEmpty = getMembersOrProperties(node).length === 0; - const isSingleLine = positionsAreOnSameLine(openBraceEnd, closeBraceEnd, sourceFile); - if (isEmpty && isSingleLine && openBraceEnd !== closeBraceEnd - 1) { - this.deleteRange(sourceFile, createRange(openBraceEnd, closeBraceEnd - 1)); - } - if (isSingleLine) { - this.insertText(sourceFile, closeBraceEnd - 1, this.newLineCharacter); - } - } - }); - } - finishDeleteDeclarations() { - const deletedNodesInLists = /* @__PURE__ */ new Set(); - for (const { sourceFile, node } of this.deletedNodes) { - if (!this.deletedNodes.some((d) => d.sourceFile === sourceFile && rangeContainsRangeExclusive(d.node, node))) { - if (isArray(node)) { - this.deleteRange(sourceFile, rangeOfTypeParameters(sourceFile, node)); - } else { - deleteDeclaration.deleteDeclaration(this, deletedNodesInLists, sourceFile, node); - } - } - } - deletedNodesInLists.forEach((node) => { - const sourceFile = node.getSourceFile(); - const list = ts_formatting_exports.SmartIndenter.getContainingList(node, sourceFile); - if (node !== last(list)) - return; - const lastNonDeletedIndex = findLastIndex(list, (n) => !deletedNodesInLists.has(n), list.length - 2); - if (lastNonDeletedIndex !== -1) { - this.deleteRange(sourceFile, { pos: list[lastNonDeletedIndex].end, end: startPositionToDeleteNodeInList(sourceFile, list[lastNonDeletedIndex + 1]) }); - } - }); - } - /** - * Note: after calling this, the TextChanges object must be discarded! - * @param validate only for tests - * The reason we must validate as part of this method is that `getNonFormattedText` changes the node's positions, - * so we can only call this once and can't get the non-formatted text separately. - */ - getChanges(validate) { - this.finishDeleteDeclarations(); - this.finishClassesWithNodesInsertedAtStart(); - const changes = changesToText.getTextChangesFromChanges(this.changes, this.newLineCharacter, this.formatContext, validate); - if (this.newFileChanges) { - this.newFileChanges.forEach((insertions, fileName) => { - changes.push(changesToText.newFileChanges(fileName, insertions, this.newLineCharacter, this.formatContext)); - }); - } - return changes; - } - createNewFile(oldFile, fileName, statements) { - this.insertStatementsInNewFile(fileName, statements, oldFile); - } - }; - ((changesToText2) => { - function getTextChangesFromChanges(changes, newLineCharacter, formatContext, validate) { - return mapDefined(group(changes, (c) => c.sourceFile.path), (changesInFile) => { - const sourceFile = changesInFile[0].sourceFile; - const normalized = stableSort(changesInFile, (a, b) => a.range.pos - b.range.pos || a.range.end - b.range.end); - for (let i = 0; i < normalized.length - 1; i++) { - Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos, "Changes overlap", () => `${JSON.stringify(normalized[i].range)} and ${JSON.stringify(normalized[i + 1].range)}`); - } - const textChanges2 = mapDefined(normalized, (c) => { - const span = createTextSpanFromRange(c.range); - const targetSourceFile = c.kind === 1 /* ReplaceWithSingleNode */ ? getSourceFileOfNode(getOriginalNode(c.node)) ?? c.sourceFile : c.kind === 2 /* ReplaceWithMultipleNodes */ ? getSourceFileOfNode(getOriginalNode(c.nodes[0])) ?? c.sourceFile : c.sourceFile; - const newText = computeNewText(c, targetSourceFile, sourceFile, newLineCharacter, formatContext, validate); - if (span.length === newText.length && stringContainsAt(targetSourceFile.text, newText, span.start)) { - return void 0; - } - return createTextChange(span, newText); - }); - return textChanges2.length > 0 ? { fileName: sourceFile.fileName, textChanges: textChanges2 } : void 0; - }); - } - changesToText2.getTextChangesFromChanges = getTextChangesFromChanges; - function newFileChanges(fileName, insertions, newLineCharacter, formatContext) { - const text = newFileChangesWorker(getScriptKindFromFileName(fileName), insertions, newLineCharacter, formatContext); - return { fileName, textChanges: [createTextChange(createTextSpan(0, 0), text)], isNewFile: true }; - } - changesToText2.newFileChanges = newFileChanges; - function newFileChangesWorker(scriptKind, insertions, newLineCharacter, formatContext) { - const nonFormattedText = flatMap(insertions, (insertion) => insertion.statements.map((s) => s === 4 /* NewLineTrivia */ ? "" : getNonformattedText(s, insertion.oldFile, newLineCharacter).text)).join(newLineCharacter); - const sourceFile = createSourceFile( - "any file name", - nonFormattedText, - 99 /* ESNext */, - /*setParentNodes*/ - true, - scriptKind - ); - const changes = ts_formatting_exports.formatDocument(sourceFile, formatContext); - return applyChanges(nonFormattedText, changes) + newLineCharacter; - } - changesToText2.newFileChangesWorker = newFileChangesWorker; - function computeNewText(change, targetSourceFile, sourceFile, newLineCharacter, formatContext, validate) { - var _a; - if (change.kind === 0 /* Remove */) { - return ""; - } - if (change.kind === 3 /* Text */) { - return change.text; - } - const { options = {}, range: { pos } } = change; - const format = (n) => getFormattedTextOfNode(n, targetSourceFile, sourceFile, pos, options, newLineCharacter, formatContext, validate); - const text = change.kind === 2 /* ReplaceWithMultipleNodes */ ? change.nodes.map((n) => removeSuffix(format(n), newLineCharacter)).join(((_a = change.options) == null ? void 0 : _a.joiner) || newLineCharacter) : format(change.node); - const noIndent = options.indentation !== void 0 || getLineStartPositionForPosition(pos, targetSourceFile) === pos ? text : text.replace(/^\s+/, ""); - return (options.prefix || "") + noIndent + (!options.suffix || endsWith(noIndent, options.suffix) ? "" : options.suffix); - } - function getFormattedTextOfNode(nodeIn, targetSourceFile, sourceFile, pos, { indentation, prefix, delta }, newLineCharacter, formatContext, validate) { - const { node, text } = getNonformattedText(nodeIn, targetSourceFile, newLineCharacter); - if (validate) - validate(node, text); - const formatOptions = getFormatCodeSettingsForWriting(formatContext, targetSourceFile); - const initialIndentation = indentation !== void 0 ? indentation : ts_formatting_exports.SmartIndenter.getIndentation(pos, sourceFile, formatOptions, prefix === newLineCharacter || getLineStartPositionForPosition(pos, targetSourceFile) === pos); - if (delta === void 0) { - delta = ts_formatting_exports.SmartIndenter.shouldIndentChildNode(formatOptions, nodeIn) ? formatOptions.indentSize || 0 : 0; - } - const file = { - text, - getLineAndCharacterOfPosition(pos2) { - return getLineAndCharacterOfPosition(this, pos2); - } - }; - const changes = ts_formatting_exports.formatNodeGivenIndentation(node, file, targetSourceFile.languageVariant, initialIndentation, delta, { ...formatContext, options: formatOptions }); - return applyChanges(text, changes); - } - function getNonformattedText(node, sourceFile, newLineCharacter) { - const writer = createWriter(newLineCharacter); - const newLine = getNewLineKind(newLineCharacter); - createPrinter({ - newLine, - neverAsciiEscape: true, - preserveSourceNewlines: true, - terminateUnterminatedLiterals: true - }, writer).writeNode(4 /* Unspecified */, node, sourceFile, writer); - return { text: writer.getText(), node: assignPositionsToNode(node) }; - } - changesToText2.getNonformattedText = getNonformattedText; - })(changesToText || (changesToText = {})); - textChangesTransformationContext = { - ...nullTransformationContext, - factory: createNodeFactory( - nullTransformationContext.factory.flags | 1 /* NoParenthesizerRules */, - nullTransformationContext.factory.baseFactory - ) - }; - ((_deleteDeclaration) => { - function deleteDeclaration2(changes, deletedNodesInLists, sourceFile, node) { - switch (node.kind) { - case 169 /* Parameter */: { - const oldFunction = node.parent; - if (isArrowFunction(oldFunction) && oldFunction.parameters.length === 1 && !findChildOfKind(oldFunction, 21 /* OpenParenToken */, sourceFile)) { - changes.replaceNodeWithText(sourceFile, node, "()"); - } else { - deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); - } - break; - } - case 272 /* ImportDeclaration */: - case 271 /* ImportEqualsDeclaration */: - const isFirstImport = sourceFile.imports.length && node === first(sourceFile.imports).parent || node === find(sourceFile.statements, isAnyImportSyntax); - deleteNode(changes, sourceFile, node, { - leadingTriviaOption: isFirstImport ? 0 /* Exclude */ : hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ - }); - break; - case 208 /* BindingElement */: - const pattern = node.parent; - const preserveComma = pattern.kind === 207 /* ArrayBindingPattern */ && node !== last(pattern.elements); - if (preserveComma) { - deleteNode(changes, sourceFile, node); - } else { - deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); - } - break; - case 260 /* VariableDeclaration */: - deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node); - break; - case 168 /* TypeParameter */: - deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); - break; - case 276 /* ImportSpecifier */: - const namedImports = node.parent; - if (namedImports.elements.length === 1) { - deleteImportBinding(changes, sourceFile, namedImports); - } else { - deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); - } - break; - case 274 /* NamespaceImport */: - deleteImportBinding(changes, sourceFile, node); - break; - case 27 /* SemicolonToken */: - deleteNode(changes, sourceFile, node, { trailingTriviaOption: 0 /* Exclude */ }); - break; - case 100 /* FunctionKeyword */: - deleteNode(changes, sourceFile, node, { leadingTriviaOption: 0 /* Exclude */ }); - break; - case 263 /* ClassDeclaration */: - case 262 /* FunctionDeclaration */: - deleteNode(changes, sourceFile, node, { leadingTriviaOption: hasJSDocNodes(node) ? 2 /* JSDoc */ : 3 /* StartLine */ }); - break; - default: - if (!node.parent) { - deleteNode(changes, sourceFile, node); - } else if (isImportClause(node.parent) && node.parent.name === node) { - deleteDefaultImport(changes, sourceFile, node.parent); - } else if (isCallExpression(node.parent) && contains(node.parent.arguments, node)) { - deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); - } else { - deleteNode(changes, sourceFile, node); - } - } - } - _deleteDeclaration.deleteDeclaration = deleteDeclaration2; - function deleteDefaultImport(changes, sourceFile, importClause) { - if (!importClause.namedBindings) { - deleteNode(changes, sourceFile, importClause.parent); - } else { - const start = importClause.name.getStart(sourceFile); - const nextToken = getTokenAtPosition(sourceFile, importClause.name.end); - if (nextToken && nextToken.kind === 28 /* CommaToken */) { - const end = skipTrivia( - sourceFile.text, - nextToken.end, - /*stopAfterLineBreak*/ - false, - /*stopAtComments*/ - true - ); - changes.deleteRange(sourceFile, { pos: start, end }); - } else { - deleteNode(changes, sourceFile, importClause.name); - } - } - } - function deleteImportBinding(changes, sourceFile, node) { - if (node.parent.name) { - const previousToken = Debug.checkDefined(getTokenAtPosition(sourceFile, node.pos - 1)); - changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end }); - } else { - const importDecl = getAncestor(node, 272 /* ImportDeclaration */); - deleteNode(changes, sourceFile, importDecl); - } - } - function deleteVariableDeclaration(changes, deletedNodesInLists, sourceFile, node) { - const { parent: parent2 } = node; - if (parent2.kind === 299 /* CatchClause */) { - changes.deleteNodeRange(sourceFile, findChildOfKind(parent2, 21 /* OpenParenToken */, sourceFile), findChildOfKind(parent2, 22 /* CloseParenToken */, sourceFile)); - return; - } - if (parent2.declarations.length !== 1) { - deleteNodeInList(changes, deletedNodesInLists, sourceFile, node); - return; - } - const gp = parent2.parent; - switch (gp.kind) { - case 250 /* ForOfStatement */: - case 249 /* ForInStatement */: - changes.replaceNode(sourceFile, node, factory.createObjectLiteralExpression()); - break; - case 248 /* ForStatement */: - deleteNode(changes, sourceFile, parent2); - break; - case 243 /* VariableStatement */: - deleteNode(changes, sourceFile, gp, { leadingTriviaOption: hasJSDocNodes(gp) ? 2 /* JSDoc */ : 3 /* StartLine */ }); - break; - default: - Debug.assertNever(gp); - } - } - })(deleteDeclaration || (deleteDeclaration = {})); - } - }); - - // src/services/_namespaces/ts.textChanges.ts - var ts_textChanges_exports = {}; - __export(ts_textChanges_exports, { - ChangeTracker: () => ChangeTracker, - LeadingTriviaOption: () => LeadingTriviaOption, - TrailingTriviaOption: () => TrailingTriviaOption, - applyChanges: () => applyChanges, - assignPositionsToNode: () => assignPositionsToNode, - createWriter: () => createWriter, - deleteNode: () => deleteNode, - isThisTypeAnnotatable: () => isThisTypeAnnotatable, - isValidLocationToAddComment: () => isValidLocationToAddComment - }); - var init_ts_textChanges = __esm({ - "src/services/_namespaces/ts.textChanges.ts"() { - "use strict"; - init_textChanges(); - } - }); - - // src/services/formatting/formattingContext.ts - var FormattingRequestKind, FormattingContext; - var init_formattingContext = __esm({ - "src/services/formatting/formattingContext.ts"() { - "use strict"; - init_ts4(); - FormattingRequestKind = /* @__PURE__ */ ((FormattingRequestKind2) => { - FormattingRequestKind2[FormattingRequestKind2["FormatDocument"] = 0] = "FormatDocument"; - FormattingRequestKind2[FormattingRequestKind2["FormatSelection"] = 1] = "FormatSelection"; - FormattingRequestKind2[FormattingRequestKind2["FormatOnEnter"] = 2] = "FormatOnEnter"; - FormattingRequestKind2[FormattingRequestKind2["FormatOnSemicolon"] = 3] = "FormatOnSemicolon"; - FormattingRequestKind2[FormattingRequestKind2["FormatOnOpeningCurlyBrace"] = 4] = "FormatOnOpeningCurlyBrace"; - FormattingRequestKind2[FormattingRequestKind2["FormatOnClosingCurlyBrace"] = 5] = "FormatOnClosingCurlyBrace"; - return FormattingRequestKind2; - })(FormattingRequestKind || {}); - FormattingContext = class { - constructor(sourceFile, formattingRequestKind, options) { - this.sourceFile = sourceFile; - this.formattingRequestKind = formattingRequestKind; - this.options = options; - } - updateContext(currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) { - this.currentTokenSpan = Debug.checkDefined(currentRange); - this.currentTokenParent = Debug.checkDefined(currentTokenParent); - this.nextTokenSpan = Debug.checkDefined(nextRange); - this.nextTokenParent = Debug.checkDefined(nextTokenParent); - this.contextNode = Debug.checkDefined(commonParent); - this.contextNodeAllOnSameLine = void 0; - this.nextNodeAllOnSameLine = void 0; - this.tokensAreOnSameLine = void 0; - this.contextNodeBlockIsOnOneLine = void 0; - this.nextNodeBlockIsOnOneLine = void 0; - } - ContextNodeAllOnSameLine() { - if (this.contextNodeAllOnSameLine === void 0) { - this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); - } - return this.contextNodeAllOnSameLine; - } - NextNodeAllOnSameLine() { - if (this.nextNodeAllOnSameLine === void 0) { - this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); - } - return this.nextNodeAllOnSameLine; - } - TokensAreOnSameLine() { - if (this.tokensAreOnSameLine === void 0) { - const startLine = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line; - const endLine = this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line; - this.tokensAreOnSameLine = startLine === endLine; - } - return this.tokensAreOnSameLine; - } - ContextNodeBlockIsOnOneLine() { - if (this.contextNodeBlockIsOnOneLine === void 0) { - this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); - } - return this.contextNodeBlockIsOnOneLine; - } - NextNodeBlockIsOnOneLine() { - if (this.nextNodeBlockIsOnOneLine === void 0) { - this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); - } - return this.nextNodeBlockIsOnOneLine; - } - NodeIsOnOneLine(node) { - const startLine = this.sourceFile.getLineAndCharacterOfPosition(node.getStart(this.sourceFile)).line; - const endLine = this.sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line; - return startLine === endLine; - } - BlockIsOnOneLine(node) { - const openBrace = findChildOfKind(node, 19 /* OpenBraceToken */, this.sourceFile); - const closeBrace = findChildOfKind(node, 20 /* CloseBraceToken */, this.sourceFile); - if (openBrace && closeBrace) { - const startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line; - const endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line; - return startLine === endLine; - } - return false; - } - }; - } - }); - - // src/services/formatting/formattingScanner.ts - function getFormattingScanner(text, languageVariant, startPos, endPos, cb) { - const scanner2 = languageVariant === 1 /* JSX */ ? jsxScanner : standardScanner; - scanner2.setText(text); - scanner2.resetTokenState(startPos); - let wasNewLine = true; - let leadingTrivia; - let trailingTrivia; - let savedPos; - let lastScanAction; - let lastTokenInfo; - const res = cb({ - advance, - readTokenInfo, - readEOFTokenRange, - isOnToken, - isOnEOF, - getCurrentLeadingTrivia: () => leadingTrivia, - lastTrailingTriviaWasNewLine: () => wasNewLine, - skipToEndOf, - skipToStartOf, - getTokenFullStart: () => (lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) ?? scanner2.getTokenStart(), - getStartPos: () => (lastTokenInfo == null ? void 0 : lastTokenInfo.token.pos) ?? scanner2.getTokenStart() - }); - lastTokenInfo = void 0; - scanner2.setText(void 0); - return res; - function advance() { - lastTokenInfo = void 0; - const isStarted = scanner2.getTokenFullStart() !== startPos; - if (isStarted) { - wasNewLine = !!trailingTrivia && last(trailingTrivia).kind === 4 /* NewLineTrivia */; - } else { - scanner2.scan(); - } - leadingTrivia = void 0; - trailingTrivia = void 0; - let pos = scanner2.getTokenFullStart(); - while (pos < endPos) { - const t = scanner2.getToken(); - if (!isTrivia(t)) { - break; - } - scanner2.scan(); - const item = { - pos, - end: scanner2.getTokenFullStart(), - kind: t - }; - pos = scanner2.getTokenFullStart(); - leadingTrivia = append(leadingTrivia, item); - } - savedPos = scanner2.getTokenFullStart(); - } - function shouldRescanGreaterThanToken(node) { - switch (node.kind) { - case 34 /* GreaterThanEqualsToken */: - case 72 /* GreaterThanGreaterThanEqualsToken */: - case 73 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 50 /* GreaterThanGreaterThanGreaterThanToken */: - case 49 /* GreaterThanGreaterThanToken */: - return true; - } - return false; - } - function shouldRescanJsxIdentifier(node) { - if (node.parent) { - switch (node.parent.kind) { - case 291 /* JsxAttribute */: - case 286 /* JsxOpeningElement */: - case 287 /* JsxClosingElement */: - case 285 /* JsxSelfClosingElement */: - return isKeyword(node.kind) || node.kind === 80 /* Identifier */; - } - } - return false; - } - function shouldRescanJsxText(node) { - return isJsxText(node) || isJsxElement(node) && (lastTokenInfo == null ? void 0 : lastTokenInfo.token.kind) === 12 /* JsxText */; - } - function shouldRescanSlashToken(container) { - return container.kind === 14 /* RegularExpressionLiteral */; - } - function shouldRescanTemplateToken(container) { - return container.kind === 17 /* TemplateMiddle */ || container.kind === 18 /* TemplateTail */; - } - function shouldRescanJsxAttributeValue(node) { - return node.parent && isJsxAttribute(node.parent) && node.parent.initializer === node; - } - function startsWithSlashToken(t) { - return t === 44 /* SlashToken */ || t === 69 /* SlashEqualsToken */; - } - function readTokenInfo(n) { - Debug.assert(isOnToken()); - const expectedScanAction = shouldRescanGreaterThanToken(n) ? 1 /* RescanGreaterThanToken */ : shouldRescanSlashToken(n) ? 2 /* RescanSlashToken */ : shouldRescanTemplateToken(n) ? 3 /* RescanTemplateToken */ : shouldRescanJsxIdentifier(n) ? 4 /* RescanJsxIdentifier */ : shouldRescanJsxText(n) ? 5 /* RescanJsxText */ : shouldRescanJsxAttributeValue(n) ? 6 /* RescanJsxAttributeValue */ : 0 /* Scan */; - if (lastTokenInfo && expectedScanAction === lastScanAction) { - return fixTokenKind(lastTokenInfo, n); - } - if (scanner2.getTokenFullStart() !== savedPos) { - Debug.assert(lastTokenInfo !== void 0); - scanner2.resetTokenState(savedPos); - scanner2.scan(); - } - let currentToken = getNextToken(n, expectedScanAction); - const token = createTextRangeWithKind( - scanner2.getTokenFullStart(), - scanner2.getTokenEnd(), - currentToken - ); - if (trailingTrivia) { - trailingTrivia = void 0; - } - while (scanner2.getTokenFullStart() < endPos) { - currentToken = scanner2.scan(); - if (!isTrivia(currentToken)) { - break; - } - const trivia = createTextRangeWithKind( - scanner2.getTokenFullStart(), - scanner2.getTokenEnd(), - currentToken - ); - if (!trailingTrivia) { - trailingTrivia = []; - } - trailingTrivia.push(trivia); - if (currentToken === 4 /* NewLineTrivia */) { - scanner2.scan(); - break; - } - } - lastTokenInfo = { leadingTrivia, trailingTrivia, token }; - return fixTokenKind(lastTokenInfo, n); - } - function getNextToken(n, expectedScanAction) { - const token = scanner2.getToken(); - lastScanAction = 0 /* Scan */; - switch (expectedScanAction) { - case 1 /* RescanGreaterThanToken */: - if (token === 32 /* GreaterThanToken */) { - lastScanAction = 1 /* RescanGreaterThanToken */; - const newToken = scanner2.reScanGreaterToken(); - Debug.assert(n.kind === newToken); - return newToken; - } - break; - case 2 /* RescanSlashToken */: - if (startsWithSlashToken(token)) { - lastScanAction = 2 /* RescanSlashToken */; - const newToken = scanner2.reScanSlashToken(); - Debug.assert(n.kind === newToken); - return newToken; - } - break; - case 3 /* RescanTemplateToken */: - if (token === 20 /* CloseBraceToken */) { - lastScanAction = 3 /* RescanTemplateToken */; - return scanner2.reScanTemplateToken( - /*isTaggedTemplate*/ - false - ); - } - break; - case 4 /* RescanJsxIdentifier */: - lastScanAction = 4 /* RescanJsxIdentifier */; - return scanner2.scanJsxIdentifier(); - case 5 /* RescanJsxText */: - lastScanAction = 5 /* RescanJsxText */; - return scanner2.reScanJsxToken( - /*allowMultilineJsxText*/ - false - ); - case 6 /* RescanJsxAttributeValue */: - lastScanAction = 6 /* RescanJsxAttributeValue */; - return scanner2.reScanJsxAttributeValue(); - case 0 /* Scan */: - break; - default: - Debug.assertNever(expectedScanAction); - } - return token; - } - function readEOFTokenRange() { - Debug.assert(isOnEOF()); - return createTextRangeWithKind(scanner2.getTokenFullStart(), scanner2.getTokenEnd(), 1 /* EndOfFileToken */); - } - function isOnToken() { - const current = lastTokenInfo ? lastTokenInfo.token.kind : scanner2.getToken(); - return current !== 1 /* EndOfFileToken */ && !isTrivia(current); - } - function isOnEOF() { - const current = lastTokenInfo ? lastTokenInfo.token.kind : scanner2.getToken(); - return current === 1 /* EndOfFileToken */; - } - function fixTokenKind(tokenInfo, container) { - if (isToken(container) && tokenInfo.token.kind !== container.kind) { - tokenInfo.token.kind = container.kind; - } - return tokenInfo; - } - function skipToEndOf(node) { - scanner2.resetTokenState(node.end); - savedPos = scanner2.getTokenFullStart(); - lastScanAction = void 0; - lastTokenInfo = void 0; - wasNewLine = false; - leadingTrivia = void 0; - trailingTrivia = void 0; - } - function skipToStartOf(node) { - scanner2.resetTokenState(node.pos); - savedPos = scanner2.getTokenFullStart(); - lastScanAction = void 0; - lastTokenInfo = void 0; - wasNewLine = false; - leadingTrivia = void 0; - trailingTrivia = void 0; - } - } - var standardScanner, jsxScanner; - var init_formattingScanner = __esm({ - "src/services/formatting/formattingScanner.ts"() { - "use strict"; - init_ts4(); - init_ts_formatting(); - standardScanner = createScanner( - 99 /* Latest */, - /*skipTrivia*/ - false, - 0 /* Standard */ - ); - jsxScanner = createScanner( - 99 /* Latest */, - /*skipTrivia*/ - false, - 1 /* JSX */ - ); - } - }); - - // src/services/formatting/rule.ts - var anyContext, RuleAction, RuleFlags; - var init_rule = __esm({ - "src/services/formatting/rule.ts"() { - "use strict"; - init_ts4(); - anyContext = emptyArray; - RuleAction = /* @__PURE__ */ ((RuleAction2) => { - RuleAction2[RuleAction2["None"] = 0] = "None"; - RuleAction2[RuleAction2["StopProcessingSpaceActions"] = 1] = "StopProcessingSpaceActions"; - RuleAction2[RuleAction2["StopProcessingTokenActions"] = 2] = "StopProcessingTokenActions"; - RuleAction2[RuleAction2["InsertSpace"] = 4] = "InsertSpace"; - RuleAction2[RuleAction2["InsertNewLine"] = 8] = "InsertNewLine"; - RuleAction2[RuleAction2["DeleteSpace"] = 16] = "DeleteSpace"; - RuleAction2[RuleAction2["DeleteToken"] = 32] = "DeleteToken"; - RuleAction2[RuleAction2["InsertTrailingSemicolon"] = 64] = "InsertTrailingSemicolon"; - RuleAction2[RuleAction2["StopAction"] = 3] = "StopAction"; - RuleAction2[RuleAction2["ModifySpaceAction"] = 28] = "ModifySpaceAction"; - RuleAction2[RuleAction2["ModifyTokenAction"] = 96] = "ModifyTokenAction"; - return RuleAction2; - })(RuleAction || {}); - RuleFlags = /* @__PURE__ */ ((RuleFlags2) => { - RuleFlags2[RuleFlags2["None"] = 0] = "None"; - RuleFlags2[RuleFlags2["CanDeleteNewLines"] = 1] = "CanDeleteNewLines"; - return RuleFlags2; - })(RuleFlags || {}); - } - }); - - // src/services/formatting/rules.ts - function getAllRules() { - const allTokens = []; - for (let token = 0 /* FirstToken */; token <= 165 /* LastToken */; token++) { - if (token !== 1 /* EndOfFileToken */) { - allTokens.push(token); - } - } - function anyTokenExcept(...tokens) { - return { tokens: allTokens.filter((t) => !tokens.some((t2) => t2 === t)), isSpecific: false }; - } - const anyToken = { tokens: allTokens, isSpecific: false }; - const anyTokenIncludingMultilineComments = tokenRangeFrom([...allTokens, 3 /* MultiLineCommentTrivia */]); - const anyTokenIncludingEOF = tokenRangeFrom([...allTokens, 1 /* EndOfFileToken */]); - const keywords = tokenRangeFromRange(83 /* FirstKeyword */, 165 /* LastKeyword */); - const binaryOperators = tokenRangeFromRange(30 /* FirstBinaryOperator */, 79 /* LastBinaryOperator */); - const binaryKeywordOperators = [ - 103 /* InKeyword */, - 104 /* InstanceOfKeyword */, - 165 /* OfKeyword */, - 130 /* AsKeyword */, - 142 /* IsKeyword */, - 152 /* SatisfiesKeyword */ - ]; - const unaryPrefixOperators = [46 /* PlusPlusToken */, 47 /* MinusMinusToken */, 55 /* TildeToken */, 54 /* ExclamationToken */]; - const unaryPrefixExpressions = [ - 9 /* NumericLiteral */, - 10 /* BigIntLiteral */, - 80 /* Identifier */, - 21 /* OpenParenToken */, - 23 /* OpenBracketToken */, - 19 /* OpenBraceToken */, - 110 /* ThisKeyword */, - 105 /* NewKeyword */ - ]; - const unaryPreincrementExpressions = [80 /* Identifier */, 21 /* OpenParenToken */, 110 /* ThisKeyword */, 105 /* NewKeyword */]; - const unaryPostincrementExpressions = [80 /* Identifier */, 22 /* CloseParenToken */, 24 /* CloseBracketToken */, 105 /* NewKeyword */]; - const unaryPredecrementExpressions = [80 /* Identifier */, 21 /* OpenParenToken */, 110 /* ThisKeyword */, 105 /* NewKeyword */]; - const unaryPostdecrementExpressions = [80 /* Identifier */, 22 /* CloseParenToken */, 24 /* CloseBracketToken */, 105 /* NewKeyword */]; - const comments = [2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]; - const typeNames = [80 /* Identifier */, ...typeKeywords]; - const functionOpenBraceLeftTokenRange = anyTokenIncludingMultilineComments; - const typeScriptOpenBraceLeftTokenRange = tokenRangeFrom([80 /* Identifier */, 3 /* MultiLineCommentTrivia */, 86 /* ClassKeyword */, 95 /* ExportKeyword */, 102 /* ImportKeyword */]); - const controlOpenBraceLeftTokenRange = tokenRangeFrom([22 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 92 /* DoKeyword */, 113 /* TryKeyword */, 98 /* FinallyKeyword */, 93 /* ElseKeyword */]); - const highPriorityCommonRules = [ - // Leave comments alone - rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */), - rule("IgnoreAfterLineComment", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */), - rule("NotSpaceBeforeColon", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */), - rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 4 /* InsertSpace */), - rule("NoSpaceBeforeQuestionMark", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */), - // insert space after '?' only when it is used in conditional operator - rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */), - // in other cases there should be no space between '?' and next token - rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeDot", anyToken, [25 /* DotToken */, 29 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */), - rule("NoSpaceAfterDot", [25 /* DotToken */, 29 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBetweenImportParenInImportType", 102 /* ImportKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), - // Special handling of unary operators. - // Prefix operators generally shouldn't have a space between - // them and their target unary expression. - rule("NoSpaceAfterUnaryPrefixOperator", unaryPrefixOperators, unaryPrefixExpressions, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterUnaryPreincrementOperator", 46 /* PlusPlusToken */, unaryPreincrementExpressions, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterUnaryPredecrementOperator", 47 /* MinusMinusToken */, unaryPredecrementExpressions, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeUnaryPostincrementOperator", unaryPostincrementExpressions, 46 /* PlusPlusToken */, [isNonJsxSameLineTokenContext, isNotStatementConditionContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeUnaryPostdecrementOperator", unaryPostdecrementExpressions, 47 /* MinusMinusToken */, [isNonJsxSameLineTokenContext, isNotStatementConditionContext], 16 /* DeleteSpace */), - // More unary operator special-casing. - // DevDiv 181814: Be careful when removing leading whitespace - // around unary operators. Examples: - // 1 - -2 --X--> 1--2 - // a + ++b --X--> a+++b - rule("SpaceAfterPostincrementWhenFollowedByAdd", 46 /* PlusPlusToken */, 40 /* PlusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterAddWhenFollowedByUnaryPlus", 40 /* PlusToken */, 40 /* PlusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterAddWhenFollowedByPreincrement", 40 /* PlusToken */, 46 /* PlusPlusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterPostdecrementWhenFollowedBySubtract", 47 /* MinusMinusToken */, 41 /* MinusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterSubtractWhenFollowedByUnaryMinus", 41 /* MinusToken */, 41 /* MinusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterSubtractWhenFollowedByPredecrement", 41 /* MinusToken */, 47 /* MinusMinusToken */, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("NoSpaceAfterCloseBrace", 20 /* CloseBraceToken */, [28 /* CommaToken */, 27 /* SemicolonToken */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // For functions and control block place } on a new line [multi-line rule] - rule("NewLineBeforeCloseBraceInBlockContext", anyTokenIncludingMultilineComments, 20 /* CloseBraceToken */, [isMultilineBlockContext], 8 /* InsertNewLine */), - // Space/new line after }. - rule("SpaceAfterCloseBrace", 20 /* CloseBraceToken */, anyTokenExcept(22 /* CloseParenToken */), [isNonJsxSameLineTokenContext, isAfterCodeBlockContext], 4 /* InsertSpace */), - // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied - // Also should not apply to }) - rule("SpaceBetweenCloseBraceAndElse", 20 /* CloseBraceToken */, 93 /* ElseKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBetweenCloseBraceAndWhile", 20 /* CloseBraceToken */, 117 /* WhileKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenEmptyBraceBrackets", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isNonJsxSameLineTokenContext, isObjectContext], 16 /* DeleteSpace */), - // Add a space after control dec context if the next character is an open bracket ex: 'if (false)[a, b] = [1, 2];' -> 'if (false) [a, b] = [1, 2];' - rule("SpaceAfterConditionalClosingParen", 22 /* CloseParenToken */, 23 /* OpenBracketToken */, [isControlDeclContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenFunctionKeywordAndStar", 100 /* FunctionKeyword */, 42 /* AsteriskToken */, [isFunctionDeclarationOrFunctionExpressionContext], 16 /* DeleteSpace */), - rule("SpaceAfterStarInGeneratorDeclaration", 42 /* AsteriskToken */, 80 /* Identifier */, [isFunctionDeclarationOrFunctionExpressionContext], 4 /* InsertSpace */), - rule("SpaceAfterFunctionInFuncDecl", 100 /* FunctionKeyword */, anyToken, [isFunctionDeclContext], 4 /* InsertSpace */), - // Insert new line after { and before } in multi-line contexts. - rule("NewLineAfterOpenBraceInBlockContext", 19 /* OpenBraceToken */, anyToken, [isMultilineBlockContext], 8 /* InsertNewLine */), - // For get/set members, we check for (identifier,identifier) since get/set don't have tokens and they are represented as just an identifier token. - // Though, we do extra check on the context to make sure we are dealing with get/set node. Example: - // get x() {} - // set x(val) {} - rule("SpaceAfterGetSetInMember", [139 /* GetKeyword */, 153 /* SetKeyword */], 80 /* Identifier */, [isFunctionDeclContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenYieldKeywordAndStar", 127 /* YieldKeyword */, 42 /* AsteriskToken */, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 16 /* DeleteSpace */), - rule("SpaceBetweenYieldOrYieldStarAndOperand", [127 /* YieldKeyword */, 42 /* AsteriskToken */], anyToken, [isNonJsxSameLineTokenContext, isYieldOrYieldStarWithOperand], 4 /* InsertSpace */), - rule("NoSpaceBetweenReturnAndSemicolon", 107 /* ReturnKeyword */, 27 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceAfterCertainKeywords", [115 /* VarKeyword */, 111 /* ThrowKeyword */, 105 /* NewKeyword */, 91 /* DeleteKeyword */, 107 /* ReturnKeyword */, 114 /* TypeOfKeyword */, 135 /* AwaitKeyword */], anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceAfterLetConstInVariableDeclaration", [121 /* LetKeyword */, 87 /* ConstKeyword */], anyToken, [isNonJsxSameLineTokenContext, isStartOfVariableDeclarationList], 4 /* InsertSpace */), - rule("NoSpaceBeforeOpenParenInFuncCall", anyToken, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isFunctionCallOrNewContext, isPreviousTokenNotComma], 16 /* DeleteSpace */), - // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. - rule("SpaceBeforeBinaryKeywordOperator", anyToken, binaryKeywordOperators, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterBinaryKeywordOperator", binaryKeywordOperators, anyToken, [isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterVoidOperator", 116 /* VoidKeyword */, anyToken, [isNonJsxSameLineTokenContext, isVoidOpContext], 4 /* InsertSpace */), - // Async-await - rule("SpaceBetweenAsyncAndOpenParen", 134 /* AsyncKeyword */, 21 /* OpenParenToken */, [isArrowFunctionContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBetweenAsyncAndFunctionKeyword", 134 /* AsyncKeyword */, [100 /* FunctionKeyword */, 80 /* Identifier */], [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - // Template string - rule("NoSpaceBetweenTagAndTemplateString", [80 /* Identifier */, 22 /* CloseParenToken */], [15 /* NoSubstitutionTemplateLiteral */, 16 /* TemplateHead */], [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // JSX opening elements - rule("SpaceBeforeJsxAttribute", anyToken, 80 /* Identifier */, [isNextTokenParentJsxAttribute, isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBeforeSlashInJsxOpeningElement", anyToken, 44 /* SlashToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterEqualInJsxAttribute", 64 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // TypeScript-specific rules - // Use of module as a function call. e.g.: import m2 = module("m2"); - rule("NoSpaceAfterModuleImport", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // Add a space around certain TypeScript keywords - rule( - "SpaceAfterCertainTypeScriptKeywords", - [ - 128 /* AbstractKeyword */, - 129 /* AccessorKeyword */, - 86 /* ClassKeyword */, - 138 /* DeclareKeyword */, - 90 /* DefaultKeyword */, - 94 /* EnumKeyword */, - 95 /* ExportKeyword */, - 96 /* ExtendsKeyword */, - 139 /* GetKeyword */, - 119 /* ImplementsKeyword */, - 102 /* ImportKeyword */, - 120 /* InterfaceKeyword */, - 144 /* ModuleKeyword */, - 145 /* NamespaceKeyword */, - 123 /* PrivateKeyword */, - 125 /* PublicKeyword */, - 124 /* ProtectedKeyword */, - 148 /* ReadonlyKeyword */, - 153 /* SetKeyword */, - 126 /* StaticKeyword */, - 156 /* TypeKeyword */, - 161 /* FromKeyword */, - 143 /* KeyOfKeyword */, - 140 /* InferKeyword */ - ], - anyToken, - [isNonJsxSameLineTokenContext], - 4 /* InsertSpace */ - ), - rule( - "SpaceBeforeCertainTypeScriptKeywords", - anyToken, - [96 /* ExtendsKeyword */, 119 /* ImplementsKeyword */, 161 /* FromKeyword */], - [isNonJsxSameLineTokenContext], - 4 /* InsertSpace */ - ), - // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { - rule("SpaceAfterModuleName", 11 /* StringLiteral */, 19 /* OpenBraceToken */, [isModuleDeclContext], 4 /* InsertSpace */), - // Lambda expressions - rule("SpaceBeforeArrow", anyToken, 39 /* EqualsGreaterThanToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceAfterArrow", 39 /* EqualsGreaterThanToken */, anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - // Optional parameters and let args - rule("NoSpaceAfterEllipsis", 26 /* DotDotDotToken */, 80 /* Identifier */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterOptionalParameters", 58 /* QuestionToken */, [22 /* CloseParenToken */, 28 /* CommaToken */], [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 16 /* DeleteSpace */), - // Remove spaces in empty interface literals. e.g.: x: {} - rule("NoSpaceBetweenEmptyInterfaceBraceBrackets", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isNonJsxSameLineTokenContext, isObjectTypeContext], 16 /* DeleteSpace */), - // generics and type assertions - rule("NoSpaceBeforeOpenAngularBracket", typeNames, 30 /* LessThanToken */, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */), - rule("NoSpaceBetweenCloseParenAndAngularBracket", 22 /* CloseParenToken */, 30 /* LessThanToken */, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterOpenAngularBracket", 30 /* LessThanToken */, anyToken, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeCloseAngularBracket", anyToken, 32 /* GreaterThanToken */, [isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterCloseAngularBracket", 32 /* GreaterThanToken */, [21 /* OpenParenToken */, 23 /* OpenBracketToken */, 32 /* GreaterThanToken */, 28 /* CommaToken */], [ - isNonJsxSameLineTokenContext, - isTypeArgumentOrParameterOrAssertionContext, - isNotFunctionDeclContext, - isNonTypeAssertionContext - ], 16 /* DeleteSpace */), - // decorators - rule("SpaceBeforeAt", [22 /* CloseParenToken */, 80 /* Identifier */], 60 /* AtToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceAfterAt", 60 /* AtToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // Insert space after @ in decorator - rule( - "SpaceAfterDecorator", - anyToken, - [ - 128 /* AbstractKeyword */, - 80 /* Identifier */, - 95 /* ExportKeyword */, - 90 /* DefaultKeyword */, - 86 /* ClassKeyword */, - 126 /* StaticKeyword */, - 125 /* PublicKeyword */, - 123 /* PrivateKeyword */, - 124 /* ProtectedKeyword */, - 139 /* GetKeyword */, - 153 /* SetKeyword */, - 23 /* OpenBracketToken */, - 42 /* AsteriskToken */ - ], - [isEndOfDecoratorContextOnSameLine], - 4 /* InsertSpace */ - ), - rule("NoSpaceBeforeNonNullAssertionOperator", anyToken, 54 /* ExclamationToken */, [isNonJsxSameLineTokenContext, isNonNullAssertionContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterNewKeywordOnConstructorSignature", 105 /* NewKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isConstructorSignatureContext], 16 /* DeleteSpace */), - rule("SpaceLessThanAndNonJSXTypeAnnotation", 30 /* LessThanToken */, 30 /* LessThanToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) - ]; - const userConfigurableRules = [ - // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - rule("SpaceAfterConstructor", 137 /* ConstructorKeyword */, 21 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceAfterConstructor", 137 /* ConstructorKeyword */, 21 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterConstructor"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceAfterComma", 28 /* CommaToken */, anyToken, [isOptionEnabled("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNextTokenNotCloseBracket, isNextTokenNotCloseParen], 4 /* InsertSpace */), - rule("NoSpaceAfterComma", 28 /* CommaToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterCommaDelimiter"), isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext], 16 /* DeleteSpace */), - // Insert space after function keyword for anonymous functions - rule("SpaceAfterAnonymousFunctionKeyword", [100 /* FunctionKeyword */, 42 /* AsteriskToken */], 21 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 4 /* InsertSpace */), - rule("NoSpaceAfterAnonymousFunctionKeyword", [100 /* FunctionKeyword */, 42 /* AsteriskToken */], 21 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterFunctionKeywordForAnonymousFunctions"), isFunctionDeclContext], 16 /* DeleteSpace */), - // Insert space after keywords in control flow statements - rule("SpaceAfterKeywordInControl", keywords, 21 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterKeywordsInControlFlowStatements"), isControlDeclContext], 4 /* InsertSpace */), - rule("NoSpaceAfterKeywordInControl", keywords, 21 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterKeywordsInControlFlowStatements"), isControlDeclContext], 16 /* DeleteSpace */), - // Insert space after opening and before closing nonempty parenthesis - rule("SpaceAfterOpenParen", 21 /* OpenParenToken */, anyToken, [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBeforeCloseParen", anyToken, 22 /* CloseParenToken */, [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBetweenOpenParens", 21 /* OpenParenToken */, 21 /* OpenParenToken */, [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenParens", 21 /* OpenParenToken */, 22 /* CloseParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterOpenParen", 21 /* OpenParenToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeCloseParen", anyToken, 22 /* CloseParenToken */, [isOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // Insert space after opening and before closing nonempty brackets - rule("SpaceAfterOpenBracket", 23 /* OpenBracketToken */, anyToken, [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("SpaceBeforeCloseBracket", anyToken, 24 /* CloseBracketToken */, [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenBrackets", 23 /* OpenBracketToken */, 24 /* CloseBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterOpenBracket", 23 /* OpenBracketToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeCloseBracket", anyToken, 24 /* CloseBracketToken */, [isOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. - rule("SpaceAfterOpenBrace", 19 /* OpenBraceToken */, anyToken, [isOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), isBraceWrappedContext], 4 /* InsertSpace */), - rule("SpaceBeforeCloseBrace", anyToken, 20 /* CloseBraceToken */, [isOptionEnabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), isBraceWrappedContext], 4 /* InsertSpace */), - rule("NoSpaceBetweenEmptyBraceBrackets", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isNonJsxSameLineTokenContext, isObjectContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterOpenBrace", 19 /* OpenBraceToken */, anyToken, [isOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeCloseBrace", anyToken, 20 /* CloseBraceToken */, [isOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // Insert a space after opening and before closing empty brace brackets - rule("SpaceBetweenEmptyBraceBrackets", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces")], 4 /* InsertSpace */), - rule("NoSpaceBetweenEmptyBraceBrackets", 19 /* OpenBraceToken */, 20 /* CloseBraceToken */, [isOptionDisabled("insertSpaceAfterOpeningAndBeforeClosingEmptyBraces"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // Insert space after opening and before closing template string braces - rule("SpaceAfterTemplateHeadAndMiddle", [16 /* TemplateHead */, 17 /* TemplateMiddle */], anyToken, [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), isNonJsxTextContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */), - rule("SpaceBeforeTemplateMiddleAndTail", anyToken, [17 /* TemplateMiddle */, 18 /* TemplateTail */], [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - rule("NoSpaceAfterTemplateHeadAndMiddle", [16 /* TemplateHead */, 17 /* TemplateMiddle */], anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), isNonJsxTextContext], 16 /* DeleteSpace */, 1 /* CanDeleteNewLines */), - rule("NoSpaceBeforeTemplateMiddleAndTail", anyToken, [17 /* TemplateMiddle */, 18 /* TemplateTail */], [isOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces"), isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // No space after { and before } in JSX expression - rule("SpaceAfterOpenBraceInJsxExpression", 19 /* OpenBraceToken */, anyToken, [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), isNonJsxSameLineTokenContext, isJsxExpressionContext], 4 /* InsertSpace */), - rule("SpaceBeforeCloseBraceInJsxExpression", anyToken, 20 /* CloseBraceToken */, [isOptionEnabled("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), isNonJsxSameLineTokenContext, isJsxExpressionContext], 4 /* InsertSpace */), - rule("NoSpaceAfterOpenBraceInJsxExpression", 19 /* OpenBraceToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), isNonJsxSameLineTokenContext, isJsxExpressionContext], 16 /* DeleteSpace */), - rule("NoSpaceBeforeCloseBraceInJsxExpression", anyToken, 20 /* CloseBraceToken */, [isOptionDisabledOrUndefined("insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces"), isNonJsxSameLineTokenContext, isJsxExpressionContext], 16 /* DeleteSpace */), - // Insert space after semicolon in for statement - rule("SpaceAfterSemicolonInFor", 27 /* SemicolonToken */, anyToken, [isOptionEnabled("insertSpaceAfterSemicolonInForStatements"), isNonJsxSameLineTokenContext, isForContext], 4 /* InsertSpace */), - rule("NoSpaceAfterSemicolonInFor", 27 /* SemicolonToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterSemicolonInForStatements"), isNonJsxSameLineTokenContext, isForContext], 16 /* DeleteSpace */), - // Insert space before and after binary operators - rule("SpaceBeforeBinaryOperator", anyToken, binaryOperators, [isOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("SpaceAfterBinaryOperator", binaryOperators, anyToken, [isOptionEnabled("insertSpaceBeforeAndAfterBinaryOperators"), isNonJsxSameLineTokenContext, isBinaryOpContext], 4 /* InsertSpace */), - rule("NoSpaceBeforeBinaryOperator", anyToken, binaryOperators, [isOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), isNonJsxSameLineTokenContext, isBinaryOpContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterBinaryOperator", binaryOperators, anyToken, [isOptionDisabledOrUndefined("insertSpaceBeforeAndAfterBinaryOperators"), isNonJsxSameLineTokenContext, isBinaryOpContext], 16 /* DeleteSpace */), - rule("SpaceBeforeOpenParenInFuncDecl", anyToken, 21 /* OpenParenToken */, [isOptionEnabled("insertSpaceBeforeFunctionParenthesis"), isNonJsxSameLineTokenContext, isFunctionDeclContext], 4 /* InsertSpace */), - rule("NoSpaceBeforeOpenParenInFuncDecl", anyToken, 21 /* OpenParenToken */, [isOptionDisabledOrUndefined("insertSpaceBeforeFunctionParenthesis"), isNonJsxSameLineTokenContext, isFunctionDeclContext], 16 /* DeleteSpace */), - // Open Brace braces after control block - rule("NewLineBeforeOpenBraceInControl", controlOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionEnabled("placeOpenBraceOnNewLineForControlBlocks"), isControlDeclContext, isBeforeMultilineBlockContext], 8 /* InsertNewLine */, 1 /* CanDeleteNewLines */), - // Open Brace braces after function - // TypeScript: Function can have return types, which can be made of tons of different token kinds - rule("NewLineBeforeOpenBraceInFunction", functionOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionEnabled("placeOpenBraceOnNewLineForFunctions"), isFunctionDeclContext, isBeforeMultilineBlockContext], 8 /* InsertNewLine */, 1 /* CanDeleteNewLines */), - // Open Brace braces after TypeScript module/class/interface - rule("NewLineBeforeOpenBraceInTypeScriptDeclWithBlock", typeScriptOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionEnabled("placeOpenBraceOnNewLineForFunctions"), isTypeScriptDeclWithBlockContext, isBeforeMultilineBlockContext], 8 /* InsertNewLine */, 1 /* CanDeleteNewLines */), - rule("SpaceAfterTypeAssertion", 32 /* GreaterThanToken */, anyToken, [isOptionEnabled("insertSpaceAfterTypeAssertion"), isNonJsxSameLineTokenContext, isTypeAssertionContext], 4 /* InsertSpace */), - rule("NoSpaceAfterTypeAssertion", 32 /* GreaterThanToken */, anyToken, [isOptionDisabledOrUndefined("insertSpaceAfterTypeAssertion"), isNonJsxSameLineTokenContext, isTypeAssertionContext], 16 /* DeleteSpace */), - rule("SpaceBeforeTypeAnnotation", anyToken, [58 /* QuestionToken */, 59 /* ColonToken */], [isOptionEnabled("insertSpaceBeforeTypeAnnotation"), isNonJsxSameLineTokenContext, isTypeAnnotationContext], 4 /* InsertSpace */), - rule("NoSpaceBeforeTypeAnnotation", anyToken, [58 /* QuestionToken */, 59 /* ColonToken */], [isOptionDisabledOrUndefined("insertSpaceBeforeTypeAnnotation"), isNonJsxSameLineTokenContext, isTypeAnnotationContext], 16 /* DeleteSpace */), - rule("NoOptionalSemicolon", 27 /* SemicolonToken */, anyTokenIncludingEOF, [optionEquals("semicolons", "remove" /* Remove */), isSemicolonDeletionContext], 32 /* DeleteToken */), - rule("OptionalSemicolon", anyToken, anyTokenIncludingEOF, [optionEquals("semicolons", "insert" /* Insert */), isSemicolonInsertionContext], 64 /* InsertTrailingSemicolon */) - ]; - const lowPriorityCommonRules = [ - // Space after keyword but not before ; or : or ? - rule("NoSpaceBeforeSemicolon", anyToken, 27 /* SemicolonToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("SpaceBeforeOpenBraceInControl", controlOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionDisabledOrUndefinedOrTokensOnSameLine("placeOpenBraceOnNewLineForControlBlocks"), isControlDeclContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */), - rule("SpaceBeforeOpenBraceInFunction", functionOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionDisabledOrUndefinedOrTokensOnSameLine("placeOpenBraceOnNewLineForFunctions"), isFunctionDeclContext, isBeforeBlockContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */), - rule("SpaceBeforeOpenBraceInTypeScriptDeclWithBlock", typeScriptOpenBraceLeftTokenRange, 19 /* OpenBraceToken */, [isOptionDisabledOrUndefinedOrTokensOnSameLine("placeOpenBraceOnNewLineForFunctions"), isTypeScriptDeclWithBlockContext, isNotFormatOnEnter, isSameLineTokenOrBeforeBlockContext], 4 /* InsertSpace */, 1 /* CanDeleteNewLines */), - rule("NoSpaceBeforeComma", anyToken, 28 /* CommaToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - // No space before and after indexer `x[]` - rule("NoSpaceBeforeOpenBracket", anyTokenExcept(134 /* AsyncKeyword */, 84 /* CaseKeyword */), 23 /* OpenBracketToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), - rule("NoSpaceAfterCloseBracket", 24 /* CloseBracketToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBeforeBlockInFunctionDeclarationContext], 16 /* DeleteSpace */), - rule("SpaceAfterSemicolon", 27 /* SemicolonToken */, anyToken, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - // Remove extra space between for and await - rule("SpaceBetweenForAndAwaitKeyword", 99 /* ForKeyword */, 135 /* AwaitKeyword */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */), - // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. - // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] - rule( - "SpaceBetweenStatements", - [22 /* CloseParenToken */, 92 /* DoKeyword */, 93 /* ElseKeyword */, 84 /* CaseKeyword */], - anyToken, - [isNonJsxSameLineTokenContext, isNonJsxElementOrFragmentContext, isNotForContext], - 4 /* InsertSpace */ - ), - // This low-pri rule takes care of "try {", "catch {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - rule("SpaceAfterTryCatchFinally", [113 /* TryKeyword */, 85 /* CatchKeyword */, 98 /* FinallyKeyword */], 19 /* OpenBraceToken */, [isNonJsxSameLineTokenContext], 4 /* InsertSpace */) - ]; - return [ - ...highPriorityCommonRules, - ...userConfigurableRules, - ...lowPriorityCommonRules - ]; - } - function rule(debugName, left, right, context, action, flags = 0 /* None */) { - return { leftTokenRange: toTokenRange(left), rightTokenRange: toTokenRange(right), rule: { debugName, context, action, flags } }; - } - function tokenRangeFrom(tokens) { - return { tokens, isSpecific: true }; - } - function toTokenRange(arg) { - return typeof arg === "number" ? tokenRangeFrom([arg]) : isArray(arg) ? tokenRangeFrom(arg) : arg; - } - function tokenRangeFromRange(from, to, except = []) { - const tokens = []; - for (let token = from; token <= to; token++) { - if (!contains(except, token)) { - tokens.push(token); - } - } - return tokenRangeFrom(tokens); - } - function optionEquals(optionName, optionValue) { - return (context) => context.options && context.options[optionName] === optionValue; - } - function isOptionEnabled(optionName) { - return (context) => context.options && hasProperty(context.options, optionName) && !!context.options[optionName]; - } - function isOptionDisabled(optionName) { - return (context) => context.options && hasProperty(context.options, optionName) && !context.options[optionName]; - } - function isOptionDisabledOrUndefined(optionName) { - return (context) => !context.options || !hasProperty(context.options, optionName) || !context.options[optionName]; - } - function isOptionDisabledOrUndefinedOrTokensOnSameLine(optionName) { - return (context) => !context.options || !hasProperty(context.options, optionName) || !context.options[optionName] || context.TokensAreOnSameLine(); - } - function isOptionEnabledOrUndefined(optionName) { - return (context) => !context.options || !hasProperty(context.options, optionName) || !!context.options[optionName]; - } - function isForContext(context) { - return context.contextNode.kind === 248 /* ForStatement */; - } - function isNotForContext(context) { - return !isForContext(context); - } - function isBinaryOpContext(context) { - switch (context.contextNode.kind) { - case 226 /* BinaryExpression */: - return context.contextNode.operatorToken.kind !== 28 /* CommaToken */; - case 227 /* ConditionalExpression */: - case 194 /* ConditionalType */: - case 234 /* AsExpression */: - case 281 /* ExportSpecifier */: - case 276 /* ImportSpecifier */: - case 182 /* TypePredicate */: - case 192 /* UnionType */: - case 193 /* IntersectionType */: - case 238 /* SatisfiesExpression */: - return true; - case 208 /* BindingElement */: - case 265 /* TypeAliasDeclaration */: - case 271 /* ImportEqualsDeclaration */: - case 277 /* ExportAssignment */: - case 260 /* VariableDeclaration */: - case 169 /* Parameter */: - case 306 /* EnumMember */: - case 172 /* PropertyDeclaration */: - case 171 /* PropertySignature */: - return context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 249 /* ForInStatement */: - case 168 /* TypeParameter */: - return context.currentTokenSpan.kind === 103 /* InKeyword */ || context.nextTokenSpan.kind === 103 /* InKeyword */ || context.currentTokenSpan.kind === 64 /* EqualsToken */ || context.nextTokenSpan.kind === 64 /* EqualsToken */; - case 250 /* ForOfStatement */: - return context.currentTokenSpan.kind === 165 /* OfKeyword */ || context.nextTokenSpan.kind === 165 /* OfKeyword */; - } - return false; - } - function isNotBinaryOpContext(context) { - return !isBinaryOpContext(context); - } - function isNotTypeAnnotationContext(context) { - return !isTypeAnnotationContext(context); - } - function isTypeAnnotationContext(context) { - const contextKind = context.contextNode.kind; - return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); - } - function isConditionalOperatorContext(context) { - return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; - } - function isSameLineTokenOrBeforeBlockContext(context) { - return context.TokensAreOnSameLine() || isBeforeBlockContext(context); - } - function isBraceWrappedContext(context) { - return context.contextNode.kind === 206 /* ObjectBindingPattern */ || context.contextNode.kind === 200 /* MappedType */ || isSingleLineBlockContext(context); - } - function isBeforeMultilineBlockContext(context) { - return isBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); - } - function isMultilineBlockContext(context) { - return isBlockContext(context) && !(context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - } - function isSingleLineBlockContext(context) { - return isBlockContext(context) && (context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - } - function isBlockContext(context) { - return nodeIsBlockContext(context.contextNode); - } - function isBeforeBlockContext(context) { - return nodeIsBlockContext(context.nextTokenParent); - } - function nodeIsBlockContext(node) { - if (nodeIsTypeScriptDeclWithBlockContext(node)) { - return true; - } - switch (node.kind) { - case 241 /* Block */: - case 269 /* CaseBlock */: - case 210 /* ObjectLiteralExpression */: - case 268 /* ModuleBlock */: - return true; - } - return false; - } - function isFunctionDeclContext(context) { - switch (context.contextNode.kind) { - case 262 /* FunctionDeclaration */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - case 179 /* CallSignature */: - case 218 /* FunctionExpression */: - case 176 /* Constructor */: - case 219 /* ArrowFunction */: - case 264 /* InterfaceDeclaration */: - return true; - } - return false; - } - function isNotFunctionDeclContext(context) { - return !isFunctionDeclContext(context); - } - function isFunctionDeclarationOrFunctionExpressionContext(context) { - return context.contextNode.kind === 262 /* FunctionDeclaration */ || context.contextNode.kind === 218 /* FunctionExpression */; - } - function isTypeScriptDeclWithBlockContext(context) { - return nodeIsTypeScriptDeclWithBlockContext(context.contextNode); - } - function nodeIsTypeScriptDeclWithBlockContext(node) { - switch (node.kind) { - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 187 /* TypeLiteral */: - case 267 /* ModuleDeclaration */: - case 278 /* ExportDeclaration */: - case 279 /* NamedExports */: - case 272 /* ImportDeclaration */: - case 275 /* NamedImports */: - return true; - } - return false; - } - function isAfterCodeBlockContext(context) { - switch (context.currentTokenParent.kind) { - case 263 /* ClassDeclaration */: - case 267 /* ModuleDeclaration */: - case 266 /* EnumDeclaration */: - case 299 /* CatchClause */: - case 268 /* ModuleBlock */: - case 255 /* SwitchStatement */: - return true; - case 241 /* Block */: { - const blockParent = context.currentTokenParent.parent; - if (!blockParent || blockParent.kind !== 219 /* ArrowFunction */ && blockParent.kind !== 218 /* FunctionExpression */) { - return true; - } - } - } - return false; - } - function isControlDeclContext(context) { - switch (context.contextNode.kind) { - case 245 /* IfStatement */: - case 255 /* SwitchStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 247 /* WhileStatement */: - case 258 /* TryStatement */: - case 246 /* DoStatement */: - case 254 /* WithStatement */: - case 299 /* CatchClause */: - return true; - default: - return false; - } - } - function isObjectContext(context) { - return context.contextNode.kind === 210 /* ObjectLiteralExpression */; - } - function isFunctionCallContext(context) { - return context.contextNode.kind === 213 /* CallExpression */; - } - function isNewContext(context) { - return context.contextNode.kind === 214 /* NewExpression */; - } - function isFunctionCallOrNewContext(context) { - return isFunctionCallContext(context) || isNewContext(context); - } - function isPreviousTokenNotComma(context) { - return context.currentTokenSpan.kind !== 28 /* CommaToken */; - } - function isNextTokenNotCloseBracket(context) { - return context.nextTokenSpan.kind !== 24 /* CloseBracketToken */; - } - function isNextTokenNotCloseParen(context) { - return context.nextTokenSpan.kind !== 22 /* CloseParenToken */; - } - function isArrowFunctionContext(context) { - return context.contextNode.kind === 219 /* ArrowFunction */; - } - function isImportTypeContext(context) { - return context.contextNode.kind === 205 /* ImportType */; - } - function isNonJsxSameLineTokenContext(context) { - return context.TokensAreOnSameLine() && context.contextNode.kind !== 12 /* JsxText */; - } - function isNonJsxTextContext(context) { - return context.contextNode.kind !== 12 /* JsxText */; - } - function isNonJsxElementOrFragmentContext(context) { - return context.contextNode.kind !== 284 /* JsxElement */ && context.contextNode.kind !== 288 /* JsxFragment */; - } - function isJsxExpressionContext(context) { - return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */; - } - function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 291 /* JsxAttribute */; - } - function isJsxAttributeContext(context) { - return context.contextNode.kind === 291 /* JsxAttribute */; - } - function isJsxSelfClosingElementContext(context) { - return context.contextNode.kind === 285 /* JsxSelfClosingElement */; - } - function isNotBeforeBlockInFunctionDeclarationContext(context) { - return !isFunctionDeclContext(context) && !isBeforeBlockContext(context); - } - function isEndOfDecoratorContextOnSameLine(context) { - return context.TokensAreOnSameLine() && hasDecorators(context.contextNode) && nodeIsInDecoratorContext(context.currentTokenParent) && !nodeIsInDecoratorContext(context.nextTokenParent); - } - function nodeIsInDecoratorContext(node) { - while (node && isExpression(node)) { - node = node.parent; - } - return node && node.kind === 170 /* Decorator */; - } - function isStartOfVariableDeclarationList(context) { - return context.currentTokenParent.kind === 261 /* VariableDeclarationList */ && context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; - } - function isNotFormatOnEnter(context) { - return context.formattingRequestKind !== 2 /* FormatOnEnter */; - } - function isModuleDeclContext(context) { - return context.contextNode.kind === 267 /* ModuleDeclaration */; - } - function isObjectTypeContext(context) { - return context.contextNode.kind === 187 /* TypeLiteral */; - } - function isConstructorSignatureContext(context) { - return context.contextNode.kind === 180 /* ConstructSignature */; - } - function isTypeArgumentOrParameterOrAssertion(token, parent2) { - if (token.kind !== 30 /* LessThanToken */ && token.kind !== 32 /* GreaterThanToken */) { - return false; - } - switch (parent2.kind) { - case 183 /* TypeReference */: - case 216 /* TypeAssertionExpression */: - case 265 /* TypeAliasDeclaration */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 233 /* ExpressionWithTypeArguments */: - return true; - default: - return false; - } - } - function isTypeArgumentOrParameterOrAssertionContext(context) { - return isTypeArgumentOrParameterOrAssertion(context.currentTokenSpan, context.currentTokenParent) || isTypeArgumentOrParameterOrAssertion(context.nextTokenSpan, context.nextTokenParent); - } - function isTypeAssertionContext(context) { - return context.contextNode.kind === 216 /* TypeAssertionExpression */; - } - function isNonTypeAssertionContext(context) { - return !isTypeAssertionContext(context); - } - function isVoidOpContext(context) { - return context.currentTokenSpan.kind === 116 /* VoidKeyword */ && context.currentTokenParent.kind === 222 /* VoidExpression */; - } - function isYieldOrYieldStarWithOperand(context) { - return context.contextNode.kind === 229 /* YieldExpression */ && context.contextNode.expression !== void 0; - } - function isNonNullAssertionContext(context) { - return context.contextNode.kind === 235 /* NonNullExpression */; - } - function isNotStatementConditionContext(context) { - return !isStatementConditionContext(context); - } - function isStatementConditionContext(context) { - switch (context.contextNode.kind) { - case 245 /* IfStatement */: - case 248 /* ForStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - return true; - default: - return false; - } - } - function isSemicolonDeletionContext(context) { - let nextTokenKind = context.nextTokenSpan.kind; - let nextTokenStart = context.nextTokenSpan.pos; - if (isTrivia(nextTokenKind)) { - const nextRealToken = context.nextTokenParent === context.currentTokenParent ? findNextToken( - context.currentTokenParent, - findAncestor(context.currentTokenParent, (a) => !a.parent), - context.sourceFile - ) : context.nextTokenParent.getFirstToken(context.sourceFile); - if (!nextRealToken) { - return true; - } - nextTokenKind = nextRealToken.kind; - nextTokenStart = nextRealToken.getStart(context.sourceFile); - } - const startLine = context.sourceFile.getLineAndCharacterOfPosition(context.currentTokenSpan.pos).line; - const endLine = context.sourceFile.getLineAndCharacterOfPosition(nextTokenStart).line; - if (startLine === endLine) { - return nextTokenKind === 20 /* CloseBraceToken */ || nextTokenKind === 1 /* EndOfFileToken */; - } - if (nextTokenKind === 240 /* SemicolonClassElement */ || nextTokenKind === 27 /* SemicolonToken */) { - return false; - } - if (context.contextNode.kind === 264 /* InterfaceDeclaration */ || context.contextNode.kind === 265 /* TypeAliasDeclaration */) { - return !isPropertySignature(context.currentTokenParent) || !!context.currentTokenParent.type || nextTokenKind !== 21 /* OpenParenToken */; - } - if (isPropertyDeclaration(context.currentTokenParent)) { - return !context.currentTokenParent.initializer; - } - return context.currentTokenParent.kind !== 248 /* ForStatement */ && context.currentTokenParent.kind !== 242 /* EmptyStatement */ && context.currentTokenParent.kind !== 240 /* SemicolonClassElement */ && nextTokenKind !== 23 /* OpenBracketToken */ && nextTokenKind !== 21 /* OpenParenToken */ && nextTokenKind !== 40 /* PlusToken */ && nextTokenKind !== 41 /* MinusToken */ && nextTokenKind !== 44 /* SlashToken */ && nextTokenKind !== 14 /* RegularExpressionLiteral */ && nextTokenKind !== 28 /* CommaToken */ && nextTokenKind !== 228 /* TemplateExpression */ && nextTokenKind !== 16 /* TemplateHead */ && nextTokenKind !== 15 /* NoSubstitutionTemplateLiteral */ && nextTokenKind !== 25 /* DotToken */; - } - function isSemicolonInsertionContext(context) { - return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); - } - function isNotPropertyAccessOnIntegerLiteral(context) { - return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().indexOf(".") !== -1; - } - var init_rules = __esm({ - "src/services/formatting/rules.ts"() { - "use strict"; - init_ts4(); - init_ts_formatting(); - } - }); - - // src/services/formatting/rulesMap.ts - function getFormatContext(options, host) { - return { options, getRules: getRulesMap(), host }; - } - function getRulesMap() { - if (rulesMapCache === void 0) { - rulesMapCache = createRulesMap(getAllRules()); - } - return rulesMapCache; - } - function getRuleActionExclusion(ruleAction) { - let mask2 = 0 /* None */; - if (ruleAction & 1 /* StopProcessingSpaceActions */) { - mask2 |= 28 /* ModifySpaceAction */; - } - if (ruleAction & 2 /* StopProcessingTokenActions */) { - mask2 |= 96 /* ModifyTokenAction */; - } - if (ruleAction & 28 /* ModifySpaceAction */) { - mask2 |= 28 /* ModifySpaceAction */; - } - if (ruleAction & 96 /* ModifyTokenAction */) { - mask2 |= 96 /* ModifyTokenAction */; - } - return mask2; - } - function createRulesMap(rules) { - const map2 = buildMap(rules); - return (context) => { - const bucket = map2[getRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind)]; - if (bucket) { - const rules2 = []; - let ruleActionMask = 0; - for (const rule2 of bucket) { - const acceptRuleActions = ~getRuleActionExclusion(ruleActionMask); - if (rule2.action & acceptRuleActions && every(rule2.context, (c) => c(context))) { - rules2.push(rule2); - ruleActionMask |= rule2.action; - } - } - if (rules2.length) { - return rules2; - } - } - }; - } - function buildMap(rules) { - const map2 = new Array(mapRowLength * mapRowLength); - const rulesBucketConstructionStateList = new Array(map2.length); - for (const rule2 of rules) { - const specificRule = rule2.leftTokenRange.isSpecific && rule2.rightTokenRange.isSpecific; - for (const left of rule2.leftTokenRange.tokens) { - for (const right of rule2.rightTokenRange.tokens) { - const index = getRuleBucketIndex(left, right); - let rulesBucket = map2[index]; - if (rulesBucket === void 0) { - rulesBucket = map2[index] = []; - } - addRule(rulesBucket, rule2.rule, specificRule, rulesBucketConstructionStateList, index); - } - } - } - return map2; - } - function getRuleBucketIndex(row, column) { - Debug.assert(row <= 165 /* LastKeyword */ && column <= 165 /* LastKeyword */, "Must compute formatting context from tokens"); - return row * mapRowLength + column; - } - function addRule(rules, rule2, specificTokens, constructionState, rulesBucketIndex) { - const position = rule2.action & 3 /* StopAction */ ? specificTokens ? 0 /* StopRulesSpecific */ : RulesPosition.StopRulesAny : rule2.context !== anyContext ? specificTokens ? RulesPosition.ContextRulesSpecific : RulesPosition.ContextRulesAny : specificTokens ? RulesPosition.NoContextRulesSpecific : RulesPosition.NoContextRulesAny; - const state = constructionState[rulesBucketIndex] || 0; - rules.splice(getInsertionIndex(state, position), 0, rule2); - constructionState[rulesBucketIndex] = increaseInsertionIndex(state, position); - } - function getInsertionIndex(indexBitmap, maskPosition) { - let index = 0; - for (let pos = 0; pos <= maskPosition; pos += maskBitSize) { - index += indexBitmap & mask; - indexBitmap >>= maskBitSize; - } - return index; - } - function increaseInsertionIndex(indexBitmap, maskPosition) { - const value = (indexBitmap >> maskPosition & mask) + 1; - Debug.assert((value & mask) === value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."); - return indexBitmap & ~(mask << maskPosition) | value << maskPosition; - } - var rulesMapCache, maskBitSize, mask, mapRowLength, RulesPosition; - var init_rulesMap = __esm({ - "src/services/formatting/rulesMap.ts"() { - "use strict"; - init_ts4(); - init_ts_formatting(); - maskBitSize = 5; - mask = 31; - mapRowLength = 165 /* LastToken */ + 1; - RulesPosition = ((RulesPosition2) => { - RulesPosition2[RulesPosition2["StopRulesSpecific"] = 0] = "StopRulesSpecific"; - RulesPosition2[RulesPosition2["StopRulesAny"] = maskBitSize * 1] = "StopRulesAny"; - RulesPosition2[RulesPosition2["ContextRulesSpecific"] = maskBitSize * 2] = "ContextRulesSpecific"; - RulesPosition2[RulesPosition2["ContextRulesAny"] = maskBitSize * 3] = "ContextRulesAny"; - RulesPosition2[RulesPosition2["NoContextRulesSpecific"] = maskBitSize * 4] = "NoContextRulesSpecific"; - RulesPosition2[RulesPosition2["NoContextRulesAny"] = maskBitSize * 5] = "NoContextRulesAny"; - return RulesPosition2; - })(RulesPosition || {}); - } - }); - - // src/services/formatting/formatting.ts - function createTextRangeWithKind(pos, end, kind) { - const textRangeWithKind = { pos, end, kind }; - if (Debug.isDebugging) { - Object.defineProperty(textRangeWithKind, "__debugKind", { - get: () => Debug.formatSyntaxKind(kind) - }); - } - return textRangeWithKind; - } - function formatOnEnter(position, sourceFile, formatContext) { - const line = sourceFile.getLineAndCharacterOfPosition(position).line; - if (line === 0) { - return []; - } - let endOfFormatSpan = getEndLinePosition(line, sourceFile); - while (isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(endOfFormatSpan))) { - endOfFormatSpan--; - } - if (isLineBreak(sourceFile.text.charCodeAt(endOfFormatSpan))) { - endOfFormatSpan--; - } - const span = { - // get start position for the previous line - pos: getStartPositionOfLine(line - 1, sourceFile), - // end value is exclusive so add 1 to the result - end: endOfFormatSpan + 1 - }; - return formatSpan(span, sourceFile, formatContext, 2 /* FormatOnEnter */); - } - function formatOnSemicolon(position, sourceFile, formatContext) { - const semicolon = findImmediatelyPrecedingTokenOfKind(position, 27 /* SemicolonToken */, sourceFile); - return formatNodeLines(findOutermostNodeWithinListLevel(semicolon), sourceFile, formatContext, 3 /* FormatOnSemicolon */); - } - function formatOnOpeningCurly(position, sourceFile, formatContext) { - const openingCurly = findImmediatelyPrecedingTokenOfKind(position, 19 /* OpenBraceToken */, sourceFile); - if (!openingCurly) { - return []; - } - const curlyBraceRange = openingCurly.parent; - const outermostNode = findOutermostNodeWithinListLevel(curlyBraceRange); - const textRange = { - pos: getLineStartPositionForPosition(outermostNode.getStart(sourceFile), sourceFile), - // TODO: GH#18217 - end: position - }; - return formatSpan(textRange, sourceFile, formatContext, 4 /* FormatOnOpeningCurlyBrace */); - } - function formatOnClosingCurly(position, sourceFile, formatContext) { - const precedingToken = findImmediatelyPrecedingTokenOfKind(position, 20 /* CloseBraceToken */, sourceFile); - return formatNodeLines(findOutermostNodeWithinListLevel(precedingToken), sourceFile, formatContext, 5 /* FormatOnClosingCurlyBrace */); - } - function formatDocument(sourceFile, formatContext) { - const span = { - pos: 0, - end: sourceFile.text.length - }; - return formatSpan(span, sourceFile, formatContext, 0 /* FormatDocument */); - } - function formatSelection(start, end, sourceFile, formatContext) { - const span = { - pos: getLineStartPositionForPosition(start, sourceFile), - end - }; - return formatSpan(span, sourceFile, formatContext, 1 /* FormatSelection */); - } - function findImmediatelyPrecedingTokenOfKind(end, expectedTokenKind, sourceFile) { - const precedingToken = findPrecedingToken(end, sourceFile); - return precedingToken && precedingToken.kind === expectedTokenKind && end === precedingToken.getEnd() ? precedingToken : void 0; - } - function findOutermostNodeWithinListLevel(node) { - let current = node; - while (current && current.parent && current.parent.end === node.end && !isListElement(current.parent, current)) { - current = current.parent; - } - return current; - } - function isListElement(parent2, node) { - switch (parent2.kind) { - case 263 /* ClassDeclaration */: - case 264 /* InterfaceDeclaration */: - return rangeContainsRange(parent2.members, node); - case 267 /* ModuleDeclaration */: - const body = parent2.body; - return !!body && body.kind === 268 /* ModuleBlock */ && rangeContainsRange(body.statements, node); - case 312 /* SourceFile */: - case 241 /* Block */: - case 268 /* ModuleBlock */: - return rangeContainsRange(parent2.statements, node); - case 299 /* CatchClause */: - return rangeContainsRange(parent2.block.statements, node); - } - return false; - } - function findEnclosingNode(range, sourceFile) { - return find2(sourceFile); - function find2(n) { - const candidate = forEachChild(n, (c) => startEndContainsRange(c.getStart(sourceFile), c.end, range) && c); - if (candidate) { - const result = find2(candidate); - if (result) { - return result; - } - } - return n; - } - } - function prepareRangeContainsErrorFunction(errors, originalRange) { - if (!errors.length) { - return rangeHasNoErrors; - } - const sorted = errors.filter((d) => rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length)).sort((e1, e2) => e1.start - e2.start); - if (!sorted.length) { - return rangeHasNoErrors; - } - let index = 0; - return (r) => { - while (true) { - if (index >= sorted.length) { - return false; - } - const error2 = sorted[index]; - if (r.end <= error2.start) { - return false; - } - if (startEndOverlapsWithStartEnd(r.pos, r.end, error2.start, error2.start + error2.length)) { - return true; - } - index++; - } - }; - function rangeHasNoErrors() { - return false; - } - } - function getScanStartPosition(enclosingNode, originalRange, sourceFile) { - const start = enclosingNode.getStart(sourceFile); - if (start === originalRange.pos && enclosingNode.end === originalRange.end) { - return start; - } - const precedingToken = findPrecedingToken(originalRange.pos, sourceFile); - if (!precedingToken) { - return enclosingNode.pos; - } - if (precedingToken.end >= originalRange.pos) { - return enclosingNode.pos; - } - return precedingToken.end; - } - function getOwnOrInheritedDelta(n, options, sourceFile) { - let previousLine = -1 /* Unknown */; - let child; - while (n) { - const line = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)).line; - if (previousLine !== -1 /* Unknown */ && line !== previousLine) { - break; - } - if (SmartIndenter.shouldIndentChildNode(options, n, child, sourceFile)) { - return options.indentSize; - } - previousLine = line; - child = n; - n = n.parent; - } - return 0; - } - function formatNodeGivenIndentation(node, sourceFileLike, languageVariant, initialIndentation, delta, formatContext) { - const range = { pos: node.pos, end: node.end }; - return getFormattingScanner(sourceFileLike.text, languageVariant, range.pos, range.end, (scanner2) => formatSpanWorker( - range, - node, - initialIndentation, - delta, - scanner2, - formatContext, - 1 /* FormatSelection */, - (_) => false, - // assume that node does not have any errors - sourceFileLike - )); - } - function formatNodeLines(node, sourceFile, formatContext, requestKind) { - if (!node) { - return []; - } - const span = { - pos: getLineStartPositionForPosition(node.getStart(sourceFile), sourceFile), - end: node.end - }; - return formatSpan(span, sourceFile, formatContext, requestKind); - } - function formatSpan(originalRange, sourceFile, formatContext, requestKind) { - const enclosingNode = findEnclosingNode(originalRange, sourceFile); - return getFormattingScanner( - sourceFile.text, - sourceFile.languageVariant, - getScanStartPosition(enclosingNode, originalRange, sourceFile), - originalRange.end, - (scanner2) => formatSpanWorker( - originalRange, - enclosingNode, - SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, formatContext.options), - getOwnOrInheritedDelta(enclosingNode, formatContext.options, sourceFile), - scanner2, - formatContext, - requestKind, - prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), - sourceFile - ) - ); - } - function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delta, formattingScanner, { options, getRules, host }, requestKind, rangeContainsError, sourceFile) { - var _a; - const formattingContext = new FormattingContext(sourceFile, requestKind, options); - let previousRangeTriviaEnd; - let previousRange; - let previousParent; - let previousRangeStartLine; - let lastIndentedLine; - let indentationOnLastIndentedLine = -1 /* Unknown */; - const edits = []; - formattingScanner.advance(); - if (formattingScanner.isOnToken()) { - const startLine = sourceFile.getLineAndCharacterOfPosition(enclosingNode.getStart(sourceFile)).line; - let undecoratedStartLine = startLine; - if (hasDecorators(enclosingNode)) { - undecoratedStartLine = sourceFile.getLineAndCharacterOfPosition(getNonDecoratorTokenPosOfNode(enclosingNode, sourceFile)).line; - } - processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta); - } - const remainingTrivia = formattingScanner.getCurrentLeadingTrivia(); - if (remainingTrivia) { - const indentation = SmartIndenter.nodeWillIndentChild( - options, - enclosingNode, - /*child*/ - void 0, - sourceFile, - /*indentByDefault*/ - false - ) ? initialIndentation + options.indentSize : initialIndentation; - indentTriviaItems( - remainingTrivia, - indentation, - /*indentNextTokenOrTrivia*/ - true, - (item) => { - processRange( - item, - sourceFile.getLineAndCharacterOfPosition(item.pos), - enclosingNode, - enclosingNode, - /*dynamicIndentation*/ - void 0 - ); - insertIndentation( - item.pos, - indentation, - /*lineAdded*/ - false - ); - } - ); - if (options.trimTrailingWhitespace !== false) { - trimTrailingWhitespacesForRemainingRange(remainingTrivia); - } - } - if (previousRange && formattingScanner.getTokenFullStart() >= originalRange.end) { - const tokenInfo = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() : formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token : void 0; - if (tokenInfo && tokenInfo.pos === previousRangeTriviaEnd) { - const parent2 = ((_a = findPrecedingToken(tokenInfo.end, sourceFile, enclosingNode)) == null ? void 0 : _a.parent) || previousParent; - processPair( - tokenInfo, - sourceFile.getLineAndCharacterOfPosition(tokenInfo.pos).line, - parent2, - previousRange, - previousRangeStartLine, - previousParent, - parent2, - /*dynamicIndentation*/ - void 0 - ); - } - } - return edits; - function tryComputeIndentationForListItem(startPos, endPos, parentStartLine, range, inheritedIndentation) { - if (rangeOverlapsWithStartEnd(range, startPos, endPos) || rangeContainsStartEnd(range, startPos, endPos)) { - if (inheritedIndentation !== -1 /* Unknown */) { - return inheritedIndentation; - } - } else { - const startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; - const startLinePosition = getLineStartPositionForPosition(startPos, sourceFile); - const column = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); - if (startLine !== parentStartLine || startPos === column) { - const baseIndentSize = SmartIndenter.getBaseIndentation(options); - return baseIndentSize > column ? baseIndentSize : column; - } - } - return -1 /* Unknown */; - } - function computeIndentation(node, startLine, inheritedIndentation, parent2, parentDynamicIndentation, effectiveParentStartLine) { - const delta2 = SmartIndenter.shouldIndentChildNode(options, node) ? options.indentSize : 0; - if (effectiveParentStartLine === startLine) { - return { - indentation: startLine === lastIndentedLine ? indentationOnLastIndentedLine : parentDynamicIndentation.getIndentation(), - delta: Math.min(options.indentSize, parentDynamicIndentation.getDelta(node) + delta2) - }; - } else if (inheritedIndentation === -1 /* Unknown */) { - if (node.kind === 21 /* OpenParenToken */ && startLine === lastIndentedLine) { - return { indentation: indentationOnLastIndentedLine, delta: parentDynamicIndentation.getDelta(node) }; - } else if (SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent2, node, startLine, sourceFile) || SmartIndenter.childIsUnindentedBranchOfConditionalExpression(parent2, node, startLine, sourceFile) || SmartIndenter.argumentStartsOnSameLineAsPreviousArgument(parent2, node, startLine, sourceFile)) { - return { indentation: parentDynamicIndentation.getIndentation(), delta: delta2 }; - } else { - return { indentation: parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(node), delta: delta2 }; - } - } else { - return { indentation: inheritedIndentation, delta: delta2 }; - } - } - function getFirstNonDecoratorTokenOfNode(node) { - if (canHaveModifiers(node)) { - const modifier = find(node.modifiers, isModifier, findIndex(node.modifiers, isDecorator)); - if (modifier) - return modifier.kind; - } - switch (node.kind) { - case 263 /* ClassDeclaration */: - return 86 /* ClassKeyword */; - case 264 /* InterfaceDeclaration */: - return 120 /* InterfaceKeyword */; - case 262 /* FunctionDeclaration */: - return 100 /* FunctionKeyword */; - case 266 /* EnumDeclaration */: - return 266 /* EnumDeclaration */; - case 177 /* GetAccessor */: - return 139 /* GetKeyword */; - case 178 /* SetAccessor */: - return 153 /* SetKeyword */; - case 174 /* MethodDeclaration */: - if (node.asteriskToken) { - return 42 /* AsteriskToken */; - } - case 172 /* PropertyDeclaration */: - case 169 /* Parameter */: - const name = getNameOfDeclaration(node); - if (name) { - return name.kind; - } - } - } - function getDynamicIndentation(node, nodeStartLine, indentation, delta2) { - return { - getIndentationForComment: (kind, tokenIndentation, container) => { - switch (kind) { - case 20 /* CloseBraceToken */: - case 24 /* CloseBracketToken */: - case 22 /* CloseParenToken */: - return indentation + getDelta(container); - } - return tokenIndentation !== -1 /* Unknown */ ? tokenIndentation : indentation; - }, - // if list end token is LessThanToken '>' then its delta should be explicitly suppressed - // so that LessThanToken as a binary operator can still be indented. - // foo.then - // < - // number, - // string, - // >(); - // vs - // var a = xValue - // > yValue; - getIndentationForToken: (line, kind, container, suppressDelta) => !suppressDelta && shouldAddDelta(line, kind, container) ? indentation + getDelta(container) : indentation, - getIndentation: () => indentation, - getDelta, - recomputeIndentation: (lineAdded, parent2) => { - if (SmartIndenter.shouldIndentChildNode(options, parent2, node, sourceFile)) { - indentation += lineAdded ? options.indentSize : -options.indentSize; - delta2 = SmartIndenter.shouldIndentChildNode(options, node) ? options.indentSize : 0; - } - } - }; - function shouldAddDelta(line, kind, container) { - switch (kind) { - case 19 /* OpenBraceToken */: - case 20 /* CloseBraceToken */: - case 22 /* CloseParenToken */: - case 93 /* ElseKeyword */: - case 117 /* WhileKeyword */: - case 60 /* AtToken */: - return false; - case 44 /* SlashToken */: - case 32 /* GreaterThanToken */: - switch (container.kind) { - case 286 /* JsxOpeningElement */: - case 287 /* JsxClosingElement */: - case 285 /* JsxSelfClosingElement */: - return false; - } - break; - case 23 /* OpenBracketToken */: - case 24 /* CloseBracketToken */: - if (container.kind !== 200 /* MappedType */) { - return false; - } - break; - } - return nodeStartLine !== line && !(hasDecorators(node) && kind === getFirstNonDecoratorTokenOfNode(node)); - } - function getDelta(child) { - return SmartIndenter.nodeWillIndentChild( - options, - node, - child, - sourceFile, - /*indentByDefault*/ - true - ) ? delta2 : 0; - } - } - function processNode(node, contextNode, nodeStartLine, undecoratedNodeStartLine, indentation, delta2) { - if (!rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) { - return; - } - const nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta2); - let childContextNode = contextNode; - forEachChild( - node, - (child) => { - processChildNode( - child, - /*inheritedIndentation*/ - -1 /* Unknown */, - node, - nodeDynamicIndentation, - nodeStartLine, - undecoratedNodeStartLine, - /*isListItem*/ - false - ); - }, - (nodes) => { - processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); - } - ); - while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { - const tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > Math.min(node.end, originalRange.end)) { - break; - } - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node); - } - function processChildNode(child, inheritedIndentation, parent2, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) { - Debug.assert(!nodeIsSynthesized(child)); - if (nodeIsMissing(child) || isGrammarError(parent2, child)) { - return inheritedIndentation; - } - const childStartPos = child.getStart(sourceFile); - const childStartLine = sourceFile.getLineAndCharacterOfPosition(childStartPos).line; - let undecoratedChildStartLine = childStartLine; - if (hasDecorators(child)) { - undecoratedChildStartLine = sourceFile.getLineAndCharacterOfPosition(getNonDecoratorTokenPosOfNode(child, sourceFile)).line; - } - let childIndentationAmount = -1 /* Unknown */; - if (isListItem && rangeContainsRange(originalRange, parent2)) { - childIndentationAmount = tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation); - if (childIndentationAmount !== -1 /* Unknown */) { - inheritedIndentation = childIndentationAmount; - } - } - if (!rangeOverlapsWithStartEnd(originalRange, child.pos, child.end)) { - if (child.end < originalRange.pos) { - formattingScanner.skipToEndOf(child); - } - return inheritedIndentation; - } - if (child.getFullWidth() === 0) { - return inheritedIndentation; - } - while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { - const tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > originalRange.end) { - return inheritedIndentation; - } - if (tokenInfo.token.end > childStartPos) { - if (tokenInfo.token.pos > childStartPos) { - formattingScanner.skipToStartOf(child); - } - break; - } - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node); - } - if (!formattingScanner.isOnToken() || formattingScanner.getTokenFullStart() >= originalRange.end) { - return inheritedIndentation; - } - if (isToken(child)) { - const tokenInfo = formattingScanner.readTokenInfo(child); - if (child.kind !== 12 /* JsxText */) { - Debug.assert(tokenInfo.token.end === child.end, "Token end is child end"); - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); - return inheritedIndentation; - } - } - const effectiveParentStartLine = child.kind === 170 /* Decorator */ ? childStartLine : undecoratedParentStartLine; - const childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); - processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); - childContextNode = node; - if (isFirstListItem && parent2.kind === 209 /* ArrayLiteralExpression */ && inheritedIndentation === -1 /* Unknown */) { - inheritedIndentation = childIndentation.indentation; - } - return inheritedIndentation; - } - function processChildNodes(nodes, parent2, parentStartLine, parentDynamicIndentation) { - Debug.assert(isNodeArray(nodes)); - Debug.assert(!nodeIsSynthesized(nodes)); - const listStartToken = getOpenTokenForList(parent2, nodes); - let listDynamicIndentation = parentDynamicIndentation; - let startLine = parentStartLine; - if (!rangeOverlapsWithStartEnd(originalRange, nodes.pos, nodes.end)) { - if (nodes.end < originalRange.pos) { - formattingScanner.skipToEndOf(nodes); - } - return; - } - if (listStartToken !== 0 /* Unknown */) { - while (formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { - const tokenInfo = formattingScanner.readTokenInfo(parent2); - if (tokenInfo.token.end > nodes.pos) { - break; - } else if (tokenInfo.token.kind === listStartToken) { - startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; - consumeTokenAndAdvanceScanner(tokenInfo, parent2, parentDynamicIndentation, parent2); - let indentationOnListStartToken; - if (indentationOnLastIndentedLine !== -1 /* Unknown */) { - indentationOnListStartToken = indentationOnLastIndentedLine; - } else { - const startLinePosition = getLineStartPositionForPosition(tokenInfo.token.pos, sourceFile); - indentationOnListStartToken = SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, tokenInfo.token.pos, sourceFile, options); - } - listDynamicIndentation = getDynamicIndentation(parent2, parentStartLine, indentationOnListStartToken, options.indentSize); - } else { - consumeTokenAndAdvanceScanner(tokenInfo, parent2, parentDynamicIndentation, parent2); - } - } - } - let inheritedIndentation = -1 /* Unknown */; - for (let i = 0; i < nodes.length; i++) { - const child = nodes[i]; - inheritedIndentation = processChildNode( - child, - inheritedIndentation, - node, - listDynamicIndentation, - startLine, - startLine, - /*isListItem*/ - true, - /*isFirstListItem*/ - i === 0 - ); - } - const listEndToken = getCloseTokenForOpenToken(listStartToken); - if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getTokenFullStart() < originalRange.end) { - let tokenInfo = formattingScanner.readTokenInfo(parent2); - if (tokenInfo.token.kind === 28 /* CommaToken */) { - consumeTokenAndAdvanceScanner(tokenInfo, parent2, listDynamicIndentation, parent2); - tokenInfo = formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(parent2) : void 0; - } - if (tokenInfo && tokenInfo.token.kind === listEndToken && rangeContainsRange(parent2, tokenInfo.token)) { - consumeTokenAndAdvanceScanner( - tokenInfo, - parent2, - listDynamicIndentation, - parent2, - /*isListEndToken*/ - true - ); - } - } - } - function consumeTokenAndAdvanceScanner(currentTokenInfo, parent2, dynamicIndentation, container, isListEndToken) { - Debug.assert(rangeContainsRange(parent2, currentTokenInfo.token)); - const lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); - let indentToken = false; - if (currentTokenInfo.leadingTrivia) { - processTrivia(currentTokenInfo.leadingTrivia, parent2, childContextNode, dynamicIndentation); - } - let lineAction = 0 /* None */; - const isTokenInRange = rangeContainsRange(originalRange, currentTokenInfo.token); - const tokenStart = sourceFile.getLineAndCharacterOfPosition(currentTokenInfo.token.pos); - if (isTokenInRange) { - const rangeHasError = rangeContainsError(currentTokenInfo.token); - const savePreviousRange = previousRange; - lineAction = processRange(currentTokenInfo.token, tokenStart, parent2, childContextNode, dynamicIndentation); - if (!rangeHasError) { - if (lineAction === 0 /* None */) { - const prevEndLine = savePreviousRange && sourceFile.getLineAndCharacterOfPosition(savePreviousRange.end).line; - indentToken = lastTriviaWasNewLine && tokenStart.line !== prevEndLine; - } else { - indentToken = lineAction === 1 /* LineAdded */; - } - } - } - if (currentTokenInfo.trailingTrivia) { - previousRangeTriviaEnd = last(currentTokenInfo.trailingTrivia).end; - processTrivia(currentTokenInfo.trailingTrivia, parent2, childContextNode, dynamicIndentation); - } - if (indentToken) { - const tokenIndentation = isTokenInRange && !rangeContainsError(currentTokenInfo.token) ? dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind, container, !!isListEndToken) : -1 /* Unknown */; - let indentNextTokenOrTrivia = true; - if (currentTokenInfo.leadingTrivia) { - const commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation, container); - indentNextTokenOrTrivia = indentTriviaItems( - currentTokenInfo.leadingTrivia, - commentIndentation, - indentNextTokenOrTrivia, - (item) => insertIndentation( - item.pos, - commentIndentation, - /*lineAdded*/ - false - ) - ); - } - if (tokenIndentation !== -1 /* Unknown */ && indentNextTokenOrTrivia) { - insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAction === 1 /* LineAdded */); - lastIndentedLine = tokenStart.line; - indentationOnLastIndentedLine = tokenIndentation; - } - } - formattingScanner.advance(); - childContextNode = parent2; - } - } - function indentTriviaItems(trivia, commentIndentation, indentNextTokenOrTrivia, indentSingleLine) { - for (const triviaItem of trivia) { - const triviaInRange = rangeContainsRange(originalRange, triviaItem); - switch (triviaItem.kind) { - case 3 /* MultiLineCommentTrivia */: - if (triviaInRange) { - indentMultilineComment( - triviaItem, - commentIndentation, - /*firstLineIsIndented*/ - !indentNextTokenOrTrivia - ); - } - indentNextTokenOrTrivia = false; - break; - case 2 /* SingleLineCommentTrivia */: - if (indentNextTokenOrTrivia && triviaInRange) { - indentSingleLine(triviaItem); - } - indentNextTokenOrTrivia = false; - break; - case 4 /* NewLineTrivia */: - indentNextTokenOrTrivia = true; - break; - } - } - return indentNextTokenOrTrivia; - } - function processTrivia(trivia, parent2, contextNode, dynamicIndentation) { - for (const triviaItem of trivia) { - if (isComment(triviaItem.kind) && rangeContainsRange(originalRange, triviaItem)) { - const triviaItemStart = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos); - processRange(triviaItem, triviaItemStart, parent2, contextNode, dynamicIndentation); - } - } - } - function processRange(range, rangeStart, parent2, contextNode, dynamicIndentation) { - const rangeHasError = rangeContainsError(range); - let lineAction = 0 /* None */; - if (!rangeHasError) { - if (!previousRange) { - const originalStart = sourceFile.getLineAndCharacterOfPosition(originalRange.pos); - trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); - } else { - lineAction = processPair(range, rangeStart.line, parent2, previousRange, previousRangeStartLine, previousParent, contextNode, dynamicIndentation); - } - } - previousRange = range; - previousRangeTriviaEnd = range.end; - previousParent = parent2; - previousRangeStartLine = rangeStart.line; - return lineAction; - } - function processPair(currentItem, currentStartLine, currentParent, previousItem, previousStartLine, previousParent2, contextNode, dynamicIndentation) { - formattingContext.updateContext(previousItem, previousParent2, currentItem, currentParent, contextNode); - const rules = getRules(formattingContext); - let trimTrailingWhitespaces = formattingContext.options.trimTrailingWhitespace !== false; - let lineAction = 0 /* None */; - if (rules) { - forEachRight(rules, (rule2) => { - lineAction = applyRuleEdits(rule2, previousItem, previousStartLine, currentItem, currentStartLine); - if (dynamicIndentation) { - switch (lineAction) { - case 2 /* LineRemoved */: - if (currentParent.getStart(sourceFile) === currentItem.pos) { - dynamicIndentation.recomputeIndentation( - /*lineAddedByFormatting*/ - false, - contextNode - ); - } - break; - case 1 /* LineAdded */: - if (currentParent.getStart(sourceFile) === currentItem.pos) { - dynamicIndentation.recomputeIndentation( - /*lineAddedByFormatting*/ - true, - contextNode - ); - } - break; - default: - Debug.assert(lineAction === 0 /* None */); - } - } - trimTrailingWhitespaces = trimTrailingWhitespaces && !(rule2.action & 16 /* DeleteSpace */) && rule2.flags !== 1 /* CanDeleteNewLines */; - }); - } else { - trimTrailingWhitespaces = trimTrailingWhitespaces && currentItem.kind !== 1 /* EndOfFileToken */; - } - if (currentStartLine !== previousStartLine && trimTrailingWhitespaces) { - trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem); - } - return lineAction; - } - function insertIndentation(pos, indentation, lineAdded) { - const indentationString = getIndentationString(indentation, options); - if (lineAdded) { - recordReplace(pos, 0, indentationString); - } else { - const tokenStart = sourceFile.getLineAndCharacterOfPosition(pos); - const startLinePosition = getStartPositionOfLine(tokenStart.line, sourceFile); - if (indentation !== characterToColumn(startLinePosition, tokenStart.character) || indentationIsDifferent(indentationString, startLinePosition)) { - recordReplace(startLinePosition, tokenStart.character, indentationString); - } - } - } - function characterToColumn(startLinePosition, characterInLine) { - let column = 0; - for (let i = 0; i < characterInLine; i++) { - if (sourceFile.text.charCodeAt(startLinePosition + i) === 9 /* tab */) { - column += options.tabSize - column % options.tabSize; - } else { - column++; - } - } - return column; - } - function indentationIsDifferent(indentationString, startLinePosition) { - return indentationString !== sourceFile.text.substr(startLinePosition, indentationString.length); - } - function indentMultilineComment(commentRange, indentation, firstLineIsIndented, indentFinalLine = true) { - let startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; - const endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line; - if (startLine === endLine) { - if (!firstLineIsIndented) { - insertIndentation( - commentRange.pos, - indentation, - /*lineAdded*/ - false - ); - } - return; - } - const parts = []; - let startPos = commentRange.pos; - for (let line = startLine; line < endLine; line++) { - const endOfLine = getEndLinePosition(line, sourceFile); - parts.push({ pos: startPos, end: endOfLine }); - startPos = getStartPositionOfLine(line + 1, sourceFile); - } - if (indentFinalLine) { - parts.push({ pos: startPos, end: commentRange.end }); - } - if (parts.length === 0) - return; - const startLinePos = getStartPositionOfLine(startLine, sourceFile); - const nonWhitespaceColumnInFirstPart = SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); - let startIndex = 0; - if (firstLineIsIndented) { - startIndex = 1; - startLine++; - } - const delta2 = indentation - nonWhitespaceColumnInFirstPart.column; - for (let i = startIndex; i < parts.length; i++, startLine++) { - const startLinePos2 = getStartPositionOfLine(startLine, sourceFile); - const nonWhitespaceCharacterAndColumn = i === 0 ? nonWhitespaceColumnInFirstPart : SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); - const newIndentation = nonWhitespaceCharacterAndColumn.column + delta2; - if (newIndentation > 0) { - const indentationString = getIndentationString(newIndentation, options); - recordReplace(startLinePos2, nonWhitespaceCharacterAndColumn.character, indentationString); - } else { - recordDelete(startLinePos2, nonWhitespaceCharacterAndColumn.character); - } - } - } - function trimTrailingWhitespacesForLines(line1, line2, range) { - for (let line = line1; line < line2; line++) { - const lineStartPosition = getStartPositionOfLine(line, sourceFile); - const lineEndPosition = getEndLinePosition(line, sourceFile); - if (range && (isComment(range.kind) || isStringOrRegularExpressionOrTemplateLiteral(range.kind)) && range.pos <= lineEndPosition && range.end > lineEndPosition) { - continue; - } - const whitespaceStart = getTrailingWhitespaceStartPosition(lineStartPosition, lineEndPosition); - if (whitespaceStart !== -1) { - Debug.assert(whitespaceStart === lineStartPosition || !isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(whitespaceStart - 1))); - recordDelete(whitespaceStart, lineEndPosition + 1 - whitespaceStart); - } - } - } - function getTrailingWhitespaceStartPosition(start, end) { - let pos = end; - while (pos >= start && isWhiteSpaceSingleLine(sourceFile.text.charCodeAt(pos))) { - pos--; - } - if (pos !== end) { - return pos + 1; - } - return -1; - } - function trimTrailingWhitespacesForRemainingRange(trivias) { - let startPos = previousRange ? previousRange.end : originalRange.pos; - for (const trivia of trivias) { - if (isComment(trivia.kind)) { - if (startPos < trivia.pos) { - trimTrailingWitespacesForPositions(startPos, trivia.pos - 1, previousRange); - } - startPos = trivia.end + 1; - } - } - if (startPos < originalRange.end) { - trimTrailingWitespacesForPositions(startPos, originalRange.end, previousRange); - } - } - function trimTrailingWitespacesForPositions(startPos, endPos, previousRange2) { - const startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; - const endLine = sourceFile.getLineAndCharacterOfPosition(endPos).line; - trimTrailingWhitespacesForLines(startLine, endLine + 1, previousRange2); - } - function recordDelete(start, len) { - if (len) { - edits.push(createTextChangeFromStartLength(start, len, "")); - } - } - function recordReplace(start, len, newText) { - if (len || newText) { - edits.push(createTextChangeFromStartLength(start, len, newText)); - } - } - function recordInsert(start, text) { - if (text) { - edits.push(createTextChangeFromStartLength(start, 0, text)); - } - } - function applyRuleEdits(rule2, previousRange2, previousStartLine, currentRange, currentStartLine) { - const onLaterLine = currentStartLine !== previousStartLine; - switch (rule2.action) { - case 1 /* StopProcessingSpaceActions */: - return 0 /* None */; - case 16 /* DeleteSpace */: - if (previousRange2.end !== currentRange.pos) { - recordDelete(previousRange2.end, currentRange.pos - previousRange2.end); - return onLaterLine ? 2 /* LineRemoved */ : 0 /* None */; - } - break; - case 32 /* DeleteToken */: - recordDelete(previousRange2.pos, previousRange2.end - previousRange2.pos); - break; - case 8 /* InsertNewLine */: - if (rule2.flags !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) { - return 0 /* None */; - } - const lineDelta = currentStartLine - previousStartLine; - if (lineDelta !== 1) { - recordReplace(previousRange2.end, currentRange.pos - previousRange2.end, getNewLineOrDefaultFromHost(host, options)); - return onLaterLine ? 0 /* None */ : 1 /* LineAdded */; - } - break; - case 4 /* InsertSpace */: - if (rule2.flags !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) { - return 0 /* None */; - } - const posDelta = currentRange.pos - previousRange2.end; - if (posDelta !== 1 || sourceFile.text.charCodeAt(previousRange2.end) !== 32 /* space */) { - recordReplace(previousRange2.end, currentRange.pos - previousRange2.end, " "); - return onLaterLine ? 2 /* LineRemoved */ : 0 /* None */; - } - break; - case 64 /* InsertTrailingSemicolon */: - recordInsert(previousRange2.end, ";"); - } - return 0 /* None */; - } - } - function getRangeOfEnclosingComment(sourceFile, position, precedingToken, tokenAtPosition = getTokenAtPosition(sourceFile, position)) { - const jsdoc = findAncestor(tokenAtPosition, isJSDoc); - if (jsdoc) - tokenAtPosition = jsdoc.parent; - const tokenStart = tokenAtPosition.getStart(sourceFile); - if (tokenStart <= position && position < tokenAtPosition.getEnd()) { - return void 0; - } - precedingToken = precedingToken === null ? void 0 : precedingToken === void 0 ? findPrecedingToken(position, sourceFile) : precedingToken; - const trailingRangesOfPreviousToken = precedingToken && getTrailingCommentRanges(sourceFile.text, precedingToken.end); - const leadingCommentRangesOfNextToken = getLeadingCommentRangesOfNode(tokenAtPosition, sourceFile); - const commentRanges = concatenate(trailingRangesOfPreviousToken, leadingCommentRangesOfNextToken); - return commentRanges && find(commentRanges, (range) => rangeContainsPositionExclusive(range, position) || // The end marker of a single-line comment does not include the newline character. - // With caret at `^`, in the following case, we are inside a comment (^ denotes the cursor position): - // - // // asdf ^\n - // - // But for closed multi-line comments, we don't want to be inside the comment in the following case: - // - // /* asdf */^ - // - // However, unterminated multi-line comments *do* contain their end. - // - // Internally, we represent the end of the comment at the newline and closing '/', respectively. - // - position === range.end && (range.kind === 2 /* SingleLineCommentTrivia */ || position === sourceFile.getFullWidth())); - } - function getOpenTokenForList(node, list) { - switch (node.kind) { - case 176 /* Constructor */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 219 /* ArrowFunction */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - if (node.typeParameters === list) { - return 30 /* LessThanToken */; - } else if (node.parameters === list) { - return 21 /* OpenParenToken */; - } - break; - case 213 /* CallExpression */: - case 214 /* NewExpression */: - if (node.typeArguments === list) { - return 30 /* LessThanToken */; - } else if (node.arguments === list) { - return 21 /* OpenParenToken */; - } - break; - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - if (node.typeParameters === list) { - return 30 /* LessThanToken */; - } - break; - case 183 /* TypeReference */: - case 215 /* TaggedTemplateExpression */: - case 186 /* TypeQuery */: - case 233 /* ExpressionWithTypeArguments */: - case 205 /* ImportType */: - if (node.typeArguments === list) { - return 30 /* LessThanToken */; - } - break; - case 187 /* TypeLiteral */: - return 19 /* OpenBraceToken */; - } - return 0 /* Unknown */; - } - function getCloseTokenForOpenToken(kind) { - switch (kind) { - case 21 /* OpenParenToken */: - return 22 /* CloseParenToken */; - case 30 /* LessThanToken */: - return 32 /* GreaterThanToken */; - case 19 /* OpenBraceToken */: - return 20 /* CloseBraceToken */; - } - return 0 /* Unknown */; - } - function getIndentationString(indentation, options) { - const resetInternedStrings = !internedSizes || (internedSizes.tabSize !== options.tabSize || internedSizes.indentSize !== options.indentSize); - if (resetInternedStrings) { - internedSizes = { tabSize: options.tabSize, indentSize: options.indentSize }; - internedTabsIndentation = internedSpacesIndentation = void 0; - } - if (!options.convertTabsToSpaces) { - const tabs = Math.floor(indentation / options.tabSize); - const spaces = indentation - tabs * options.tabSize; - let tabString; - if (!internedTabsIndentation) { - internedTabsIndentation = []; - } - if (internedTabsIndentation[tabs] === void 0) { - internedTabsIndentation[tabs] = tabString = repeatString(" ", tabs); - } else { - tabString = internedTabsIndentation[tabs]; - } - return spaces ? tabString + repeatString(" ", spaces) : tabString; - } else { - let spacesString; - const quotient = Math.floor(indentation / options.indentSize); - const remainder = indentation % options.indentSize; - if (!internedSpacesIndentation) { - internedSpacesIndentation = []; - } - if (internedSpacesIndentation[quotient] === void 0) { - spacesString = repeatString(" ", options.indentSize * quotient); - internedSpacesIndentation[quotient] = spacesString; - } else { - spacesString = internedSpacesIndentation[quotient]; - } - return remainder ? spacesString + repeatString(" ", remainder) : spacesString; - } - } - var internedSizes, internedTabsIndentation, internedSpacesIndentation; - var init_formatting = __esm({ - "src/services/formatting/formatting.ts"() { - "use strict"; - init_ts4(); - init_ts_formatting(); - } - }); - - // src/services/formatting/smartIndenter.ts - var SmartIndenter; - var init_smartIndenter = __esm({ - "src/services/formatting/smartIndenter.ts"() { - "use strict"; - init_ts4(); - init_ts_formatting(); - ((SmartIndenter2) => { - let Value; - ((Value2) => { - Value2[Value2["Unknown"] = -1] = "Unknown"; - })(Value || (Value = {})); - function getIndentation(position, sourceFile, options, assumeNewLineBeforeCloseBrace = false) { - if (position > sourceFile.text.length) { - return getBaseIndentation(options); - } - if (options.indentStyle === 0 /* None */) { - return 0; - } - const precedingToken = findPrecedingToken( - position, - sourceFile, - /*startNode*/ - void 0, - /*excludeJsdoc*/ - true - ); - const enclosingCommentRange = getRangeOfEnclosingComment(sourceFile, position, precedingToken || null); - if (enclosingCommentRange && enclosingCommentRange.kind === 3 /* MultiLineCommentTrivia */) { - return getCommentIndent(sourceFile, position, options, enclosingCommentRange); - } - if (!precedingToken) { - return getBaseIndentation(options); - } - const precedingTokenIsLiteral = isStringOrRegularExpressionOrTemplateLiteral(precedingToken.kind); - if (precedingTokenIsLiteral && precedingToken.getStart(sourceFile) <= position && position < precedingToken.end) { - return 0; - } - const lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; - const currentToken = getTokenAtPosition(sourceFile, position); - const isObjectLiteral = currentToken.kind === 19 /* OpenBraceToken */ && currentToken.parent.kind === 210 /* ObjectLiteralExpression */; - if (options.indentStyle === 1 /* Block */ || isObjectLiteral) { - return getBlockIndent(sourceFile, position, options); - } - if (precedingToken.kind === 28 /* CommaToken */ && precedingToken.parent.kind !== 226 /* BinaryExpression */) { - const actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation; - } - } - const containerList = getListByPosition(position, precedingToken.parent, sourceFile); - if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; - const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; - return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; - } - return getSmartIndent(sourceFile, position, precedingToken, lineAtPosition, assumeNewLineBeforeCloseBrace, options); - } - SmartIndenter2.getIndentation = getIndentation; - function getCommentIndent(sourceFile, position, options, enclosingCommentRange) { - const previousLine = getLineAndCharacterOfPosition(sourceFile, position).line - 1; - const commentStartLine = getLineAndCharacterOfPosition(sourceFile, enclosingCommentRange.pos).line; - Debug.assert(commentStartLine >= 0); - if (previousLine <= commentStartLine) { - return findFirstNonWhitespaceColumn(getStartPositionOfLine(commentStartLine, sourceFile), position, sourceFile, options); - } - const startPositionOfLine = getStartPositionOfLine(previousLine, sourceFile); - const { column, character } = findFirstNonWhitespaceCharacterAndColumn(startPositionOfLine, position, sourceFile, options); - if (column === 0) { - return column; - } - const firstNonWhitespaceCharacterCode = sourceFile.text.charCodeAt(startPositionOfLine + character); - return firstNonWhitespaceCharacterCode === 42 /* asterisk */ ? column - 1 : column; - } - function getBlockIndent(sourceFile, position, options) { - let current = position; - while (current > 0) { - const char = sourceFile.text.charCodeAt(current); - if (!isWhiteSpaceLike(char)) { - break; - } - current--; - } - const lineStart = getLineStartPositionForPosition(current, sourceFile); - return findFirstNonWhitespaceColumn(lineStart, current, sourceFile, options); - } - function getSmartIndent(sourceFile, position, precedingToken, lineAtPosition, assumeNewLineBeforeCloseBrace, options) { - let previous; - let current = precedingToken; - while (current) { - if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode( - options, - current, - previous, - sourceFile, - /*isNextChild*/ - true - )) { - const currentStart = getStartLineAndCharacterForNode(current, sourceFile); - const nextTokenKind = nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile); - const indentationDelta = nextTokenKind !== 0 /* Unknown */ ? assumeNewLineBeforeCloseBrace && nextTokenKind === 2 /* CloseBrace */ ? options.indentSize : 0 : lineAtPosition !== currentStart.line ? options.indentSize : 0; - return getIndentationForNodeWorker( - current, - currentStart, - /*ignoreActualIndentationRange*/ - void 0, - indentationDelta, - sourceFile, - /*isNextChild*/ - true, - options - ); - } - const actualIndentation = getActualIndentationForListItem( - current, - sourceFile, - options, - /*listIndentsChild*/ - true - ); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation; - } - previous = current; - current = current.parent; - } - return getBaseIndentation(options); - } - function getIndentationForNode(n, ignoreActualIndentationRange, sourceFile, options) { - const start = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); - return getIndentationForNodeWorker( - n, - start, - ignoreActualIndentationRange, - /*indentationDelta*/ - 0, - sourceFile, - /*isNextChild*/ - false, - options - ); - } - SmartIndenter2.getIndentationForNode = getIndentationForNode; - function getBaseIndentation(options) { - return options.baseIndentSize || 0; - } - SmartIndenter2.getBaseIndentation = getBaseIndentation; - function getIndentationForNodeWorker(current, currentStart, ignoreActualIndentationRange, indentationDelta, sourceFile, isNextChild, options) { - var _a; - let parent2 = current.parent; - while (parent2) { - let useActualIndentation = true; - if (ignoreActualIndentationRange) { - const start = current.getStart(sourceFile); - useActualIndentation = start < ignoreActualIndentationRange.pos || start > ignoreActualIndentationRange.end; - } - const containingListOrParentStart = getContainingListOrParentStart(parent2, current, sourceFile); - const parentAndChildShareLine = containingListOrParentStart.line === currentStart.line || childStartsOnTheSameLineWithElseInIfStatement(parent2, current, currentStart.line, sourceFile); - if (useActualIndentation) { - const firstListChild = (_a = getContainingList(current, sourceFile)) == null ? void 0 : _a[0]; - const listIndentsChild = !!firstListChild && getStartLineAndCharacterForNode(firstListChild, sourceFile).line > containingListOrParentStart.line; - let actualIndentation = getActualIndentationForListItem(current, sourceFile, options, listIndentsChild); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation + indentationDelta; - } - actualIndentation = getActualIndentationForNode(current, parent2, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation + indentationDelta; - } - } - if (shouldIndentChildNode(options, parent2, current, sourceFile, isNextChild) && !parentAndChildShareLine) { - indentationDelta += options.indentSize; - } - const useTrueStart = isArgumentAndStartLineOverlapsExpressionBeingCalled(parent2, current, currentStart.line, sourceFile); - current = parent2; - parent2 = current.parent; - currentStart = useTrueStart ? sourceFile.getLineAndCharacterOfPosition(current.getStart(sourceFile)) : containingListOrParentStart; - } - return indentationDelta + getBaseIndentation(options); - } - function getContainingListOrParentStart(parent2, child, sourceFile) { - const containingList = getContainingList(child, sourceFile); - const startPos = containingList ? containingList.pos : parent2.getStart(sourceFile); - return sourceFile.getLineAndCharacterOfPosition(startPos); - } - function getActualIndentationForListItemBeforeComma(commaToken, sourceFile, options) { - const commaItemInfo = findListItemInfo(commaToken); - if (commaItemInfo && commaItemInfo.listItemIndex > 0) { - return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); - } else { - return -1 /* Unknown */; - } - } - function getActualIndentationForNode(current, parent2, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - const useActualIndentation = (isDeclaration(current) || isStatementButNotDeclaration(current)) && (parent2.kind === 312 /* SourceFile */ || !parentAndChildShareLine); - if (!useActualIndentation) { - return -1 /* Unknown */; - } - return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options); - } - let NextTokenKind; - ((NextTokenKind2) => { - NextTokenKind2[NextTokenKind2["Unknown"] = 0] = "Unknown"; - NextTokenKind2[NextTokenKind2["OpenBrace"] = 1] = "OpenBrace"; - NextTokenKind2[NextTokenKind2["CloseBrace"] = 2] = "CloseBrace"; - })(NextTokenKind || (NextTokenKind = {})); - function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile) { - const nextToken = findNextToken(precedingToken, current, sourceFile); - if (!nextToken) { - return 0 /* Unknown */; - } - if (nextToken.kind === 19 /* OpenBraceToken */) { - return 1 /* OpenBrace */; - } else if (nextToken.kind === 20 /* CloseBraceToken */) { - const nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; - return lineAtPosition === nextTokenStartLine ? 2 /* CloseBrace */ : 0 /* Unknown */; - } - return 0 /* Unknown */; - } - function getStartLineAndCharacterForNode(n, sourceFile) { - return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); - } - function isArgumentAndStartLineOverlapsExpressionBeingCalled(parent2, child, childStartLine, sourceFile) { - if (!(isCallExpression(parent2) && contains(parent2.arguments, child))) { - return false; - } - const expressionOfCallExpressionEnd = parent2.expression.getEnd(); - const expressionOfCallExpressionEndLine = getLineAndCharacterOfPosition(sourceFile, expressionOfCallExpressionEnd).line; - return expressionOfCallExpressionEndLine === childStartLine; - } - SmartIndenter2.isArgumentAndStartLineOverlapsExpressionBeingCalled = isArgumentAndStartLineOverlapsExpressionBeingCalled; - function childStartsOnTheSameLineWithElseInIfStatement(parent2, child, childStartLine, sourceFile) { - if (parent2.kind === 245 /* IfStatement */ && parent2.elseStatement === child) { - const elseKeyword = findChildOfKind(parent2, 93 /* ElseKeyword */, sourceFile); - Debug.assert(elseKeyword !== void 0); - const elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; - return elseKeywordStartLine === childStartLine; - } - return false; - } - SmartIndenter2.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement; - function childIsUnindentedBranchOfConditionalExpression(parent2, child, childStartLine, sourceFile) { - if (isConditionalExpression(parent2) && (child === parent2.whenTrue || child === parent2.whenFalse)) { - const conditionEndLine = getLineAndCharacterOfPosition(sourceFile, parent2.condition.end).line; - if (child === parent2.whenTrue) { - return childStartLine === conditionEndLine; - } else { - const trueStartLine = getStartLineAndCharacterForNode(parent2.whenTrue, sourceFile).line; - const trueEndLine = getLineAndCharacterOfPosition(sourceFile, parent2.whenTrue.end).line; - return conditionEndLine === trueStartLine && trueEndLine === childStartLine; - } - } - return false; - } - SmartIndenter2.childIsUnindentedBranchOfConditionalExpression = childIsUnindentedBranchOfConditionalExpression; - function argumentStartsOnSameLineAsPreviousArgument(parent2, child, childStartLine, sourceFile) { - if (isCallOrNewExpression(parent2)) { - if (!parent2.arguments) - return false; - const currentNode = find(parent2.arguments, (arg) => arg.pos === child.pos); - if (!currentNode) - return false; - const currentIndex = parent2.arguments.indexOf(currentNode); - if (currentIndex === 0) - return false; - const previousNode = parent2.arguments[currentIndex - 1]; - const lineOfPreviousNode = getLineAndCharacterOfPosition(sourceFile, previousNode.getEnd()).line; - if (childStartLine === lineOfPreviousNode) { - return true; - } - } - return false; - } - SmartIndenter2.argumentStartsOnSameLineAsPreviousArgument = argumentStartsOnSameLineAsPreviousArgument; - function getContainingList(node, sourceFile) { - return node.parent && getListByRange(node.getStart(sourceFile), node.getEnd(), node.parent, sourceFile); - } - SmartIndenter2.getContainingList = getContainingList; - function getListByPosition(pos, node, sourceFile) { - return node && getListByRange(pos, pos, node, sourceFile); - } - function getListByRange(start, end, node, sourceFile) { - switch (node.kind) { - case 183 /* TypeReference */: - return getList(node.typeArguments); - case 210 /* ObjectLiteralExpression */: - return getList(node.properties); - case 209 /* ArrayLiteralExpression */: - return getList(node.elements); - case 187 /* TypeLiteral */: - return getList(node.members); - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 219 /* ArrowFunction */: - case 174 /* MethodDeclaration */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 176 /* Constructor */: - case 185 /* ConstructorType */: - case 180 /* ConstructSignature */: - return getList(node.typeParameters) || getList(node.parameters); - case 177 /* GetAccessor */: - return getList(node.parameters); - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 352 /* JSDocTemplateTag */: - return getList(node.typeParameters); - case 214 /* NewExpression */: - case 213 /* CallExpression */: - return getList(node.typeArguments) || getList(node.arguments); - case 261 /* VariableDeclarationList */: - return getList(node.declarations); - case 275 /* NamedImports */: - case 279 /* NamedExports */: - return getList(node.elements); - case 206 /* ObjectBindingPattern */: - case 207 /* ArrayBindingPattern */: - return getList(node.elements); - } - function getList(list) { - return list && rangeContainsStartEnd(getVisualListRange(node, list, sourceFile), start, end) ? list : void 0; - } - } - function getVisualListRange(node, list, sourceFile) { - const children = node.getChildren(sourceFile); - for (let i = 1; i < children.length - 1; i++) { - if (children[i].pos === list.pos && children[i].end === list.end) { - return { pos: children[i - 1].end, end: children[i + 1].getStart(sourceFile) }; - } - } - return list; - } - function getActualIndentationForListStartLine(list, sourceFile, options) { - if (!list) { - return -1 /* Unknown */; - } - return findColumnForFirstNonWhitespaceCharacterInLine(sourceFile.getLineAndCharacterOfPosition(list.pos), sourceFile, options); - } - function getActualIndentationForListItem(node, sourceFile, options, listIndentsChild) { - if (node.parent && node.parent.kind === 261 /* VariableDeclarationList */) { - return -1 /* Unknown */; - } - const containingList = getContainingList(node, sourceFile); - if (containingList) { - const index = containingList.indexOf(node); - if (index !== -1) { - const result = deriveActualIndentationFromList(containingList, index, sourceFile, options); - if (result !== -1 /* Unknown */) { - return result; - } - } - return getActualIndentationForListStartLine(containingList, sourceFile, options) + (listIndentsChild ? options.indentSize : 0); - } - return -1 /* Unknown */; - } - function deriveActualIndentationFromList(list, index, sourceFile, options) { - Debug.assert(index >= 0 && index < list.length); - const node = list[index]; - let lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); - for (let i = index - 1; i >= 0; i--) { - if (list[i].kind === 28 /* CommaToken */) { - continue; - } - const prevEndLine = sourceFile.getLineAndCharacterOfPosition(list[i].end).line; - if (prevEndLine !== lineAndCharacter.line) { - return findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options); - } - lineAndCharacter = getStartLineAndCharacterForNode(list[i], sourceFile); - } - return -1 /* Unknown */; - } - function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options) { - const lineStart = sourceFile.getPositionOfLineAndCharacter(lineAndCharacter.line, 0); - return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options); - } - function findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options) { - let character = 0; - let column = 0; - for (let pos = startPos; pos < endPos; pos++) { - const ch = sourceFile.text.charCodeAt(pos); - if (!isWhiteSpaceSingleLine(ch)) { - break; - } - if (ch === 9 /* tab */) { - column += options.tabSize + column % options.tabSize; - } else { - column++; - } - character++; - } - return { column, character }; - } - SmartIndenter2.findFirstNonWhitespaceCharacterAndColumn = findFirstNonWhitespaceCharacterAndColumn; - function findFirstNonWhitespaceColumn(startPos, endPos, sourceFile, options) { - return findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options).column; - } - SmartIndenter2.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; - function nodeWillIndentChild(settings, parent2, child, sourceFile, indentByDefault) { - const childKind = child ? child.kind : 0 /* Unknown */; - switch (parent2.kind) { - case 244 /* ExpressionStatement */: - case 263 /* ClassDeclaration */: - case 231 /* ClassExpression */: - case 264 /* InterfaceDeclaration */: - case 266 /* EnumDeclaration */: - case 265 /* TypeAliasDeclaration */: - case 209 /* ArrayLiteralExpression */: - case 241 /* Block */: - case 268 /* ModuleBlock */: - case 210 /* ObjectLiteralExpression */: - case 187 /* TypeLiteral */: - case 200 /* MappedType */: - case 189 /* TupleType */: - case 217 /* ParenthesizedExpression */: - case 211 /* PropertyAccessExpression */: - case 213 /* CallExpression */: - case 214 /* NewExpression */: - case 243 /* VariableStatement */: - case 277 /* ExportAssignment */: - case 253 /* ReturnStatement */: - case 227 /* ConditionalExpression */: - case 207 /* ArrayBindingPattern */: - case 206 /* ObjectBindingPattern */: - case 286 /* JsxOpeningElement */: - case 289 /* JsxOpeningFragment */: - case 285 /* JsxSelfClosingElement */: - case 294 /* JsxExpression */: - case 173 /* MethodSignature */: - case 179 /* CallSignature */: - case 180 /* ConstructSignature */: - case 169 /* Parameter */: - case 184 /* FunctionType */: - case 185 /* ConstructorType */: - case 196 /* ParenthesizedType */: - case 215 /* TaggedTemplateExpression */: - case 223 /* AwaitExpression */: - case 279 /* NamedExports */: - case 275 /* NamedImports */: - case 281 /* ExportSpecifier */: - case 276 /* ImportSpecifier */: - case 172 /* PropertyDeclaration */: - case 296 /* CaseClause */: - case 297 /* DefaultClause */: - return true; - case 269 /* CaseBlock */: - return settings.indentSwitchCase ?? true; - case 260 /* VariableDeclaration */: - case 303 /* PropertyAssignment */: - case 226 /* BinaryExpression */: - if (!settings.indentMultiLineObjectLiteralBeginningOnBlankLine && sourceFile && childKind === 210 /* ObjectLiteralExpression */) { - return rangeIsOnOneLine(sourceFile, child); - } - if (parent2.kind === 226 /* BinaryExpression */ && sourceFile && child && childKind === 284 /* JsxElement */) { - const parentStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, parent2.pos)).line; - const childStartLine = sourceFile.getLineAndCharacterOfPosition(skipTrivia(sourceFile.text, child.pos)).line; - return parentStartLine !== childStartLine; - } - if (parent2.kind !== 226 /* BinaryExpression */) { - return true; - } - break; - case 246 /* DoStatement */: - case 247 /* WhileStatement */: - case 249 /* ForInStatement */: - case 250 /* ForOfStatement */: - case 248 /* ForStatement */: - case 245 /* IfStatement */: - case 262 /* FunctionDeclaration */: - case 218 /* FunctionExpression */: - case 174 /* MethodDeclaration */: - case 176 /* Constructor */: - case 177 /* GetAccessor */: - case 178 /* SetAccessor */: - return childKind !== 241 /* Block */; - case 219 /* ArrowFunction */: - if (sourceFile && childKind === 217 /* ParenthesizedExpression */) { - return rangeIsOnOneLine(sourceFile, child); - } - return childKind !== 241 /* Block */; - case 278 /* ExportDeclaration */: - return childKind !== 279 /* NamedExports */; - case 272 /* ImportDeclaration */: - return childKind !== 273 /* ImportClause */ || !!child.namedBindings && child.namedBindings.kind !== 275 /* NamedImports */; - case 284 /* JsxElement */: - return childKind !== 287 /* JsxClosingElement */; - case 288 /* JsxFragment */: - return childKind !== 290 /* JsxClosingFragment */; - case 193 /* IntersectionType */: - case 192 /* UnionType */: - if (childKind === 187 /* TypeLiteral */ || childKind === 189 /* TupleType */) { - return false; - } - break; - } - return indentByDefault; - } - SmartIndenter2.nodeWillIndentChild = nodeWillIndentChild; - function isControlFlowEndingStatement(kind, parent2) { - switch (kind) { - case 253 /* ReturnStatement */: - case 257 /* ThrowStatement */: - case 251 /* ContinueStatement */: - case 252 /* BreakStatement */: - return parent2.kind !== 241 /* Block */; - default: - return false; - } - } - function shouldIndentChildNode(settings, parent2, child, sourceFile, isNextChild = false) { - return nodeWillIndentChild( - settings, - parent2, - child, - sourceFile, - /*indentByDefault*/ - false - ) && !(isNextChild && child && isControlFlowEndingStatement(child.kind, parent2)); - } - SmartIndenter2.shouldIndentChildNode = shouldIndentChildNode; - function rangeIsOnOneLine(sourceFile, range) { - const rangeStart = skipTrivia(sourceFile.text, range.pos); - const startLine = sourceFile.getLineAndCharacterOfPosition(rangeStart).line; - const endLine = sourceFile.getLineAndCharacterOfPosition(range.end).line; - return startLine === endLine; - } - })(SmartIndenter || (SmartIndenter = {})); - } - }); - - // src/services/_namespaces/ts.formatting.ts - var ts_formatting_exports = {}; - __export(ts_formatting_exports, { - FormattingContext: () => FormattingContext, - FormattingRequestKind: () => FormattingRequestKind, - RuleAction: () => RuleAction, - RuleFlags: () => RuleFlags, - SmartIndenter: () => SmartIndenter, - anyContext: () => anyContext, - createTextRangeWithKind: () => createTextRangeWithKind, - formatDocument: () => formatDocument, - formatNodeGivenIndentation: () => formatNodeGivenIndentation, - formatOnClosingCurly: () => formatOnClosingCurly, - formatOnEnter: () => formatOnEnter, - formatOnOpeningCurly: () => formatOnOpeningCurly, - formatOnSemicolon: () => formatOnSemicolon, - formatSelection: () => formatSelection, - getAllRules: () => getAllRules, - getFormatContext: () => getFormatContext, - getFormattingScanner: () => getFormattingScanner, - getIndentationString: () => getIndentationString, - getRangeOfEnclosingComment: () => getRangeOfEnclosingComment - }); - var init_ts_formatting = __esm({ - "src/services/_namespaces/ts.formatting.ts"() { - "use strict"; - init_formattingContext(); - init_formattingScanner(); - init_rule(); - init_rules(); - init_rulesMap(); - init_formatting(); - init_smartIndenter(); - } - }); - - // src/services/_namespaces/ts.ts - var init_ts4 = __esm({ - "src/services/_namespaces/ts.ts"() { - "use strict"; - init_ts2(); - init_ts3(); - init_types3(); - init_utilities4(); - init_exportInfoMap(); - init_classifier(); - init_documentHighlights(); - init_documentRegistry(); - init_getEditsForFileRename(); - init_patternMatcher(); - init_preProcess(); - init_sourcemaps(); - init_suggestionDiagnostics(); - init_transpile(); - init_services(); - init_transform(); - init_shims(); - init_ts_BreakpointResolver(); - init_ts_CallHierarchy(); - init_ts_classifier(); - init_ts_codefix(); - init_ts_Completions(); - init_ts_FindAllReferences(); - init_ts_GoToDefinition(); - init_ts_InlayHints(); - init_ts_JsDoc(); - init_ts_NavigateTo(); - init_ts_NavigationBar(); - init_ts_OrganizeImports(); - init_ts_OutliningElementsCollector(); - init_ts_refactor(); - init_ts_Rename(); - init_ts_SignatureHelp(); - init_ts_SmartSelectionRange(); - init_ts_SymbolDisplay(); - init_ts_textChanges(); - init_ts_formatting(); - } - }); - - // src/deprecatedCompat/deprecate.ts - function getTypeScriptVersion() { - return typeScriptVersion2 ?? (typeScriptVersion2 = new Version(version)); - } - function formatDeprecationMessage(name, error2, errorAfter, since, message) { - let deprecationMessage = error2 ? "DeprecationError: " : "DeprecationWarning: "; - deprecationMessage += `'${name}' `; - deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated"; - deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : "."; - deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : ""; - return deprecationMessage; - } - function createErrorDeprecation(name, errorAfter, since, message) { - const deprecationMessage = formatDeprecationMessage( - name, - /*error*/ - true, - errorAfter, - since, - message - ); - return () => { - throw new TypeError(deprecationMessage); - }; - } - function createWarningDeprecation(name, errorAfter, since, message) { - let hasWrittenDeprecation = false; - return () => { - if (enableDeprecationWarnings && !hasWrittenDeprecation) { - Debug.log.warn(formatDeprecationMessage( - name, - /*error*/ - false, - errorAfter, - since, - message - )); - hasWrittenDeprecation = true; - } - }; - } - function createDeprecation(name, options = {}) { - const version2 = typeof options.typeScriptVersion === "string" ? new Version(options.typeScriptVersion) : options.typeScriptVersion ?? getTypeScriptVersion(); - const errorAfter = typeof options.errorAfter === "string" ? new Version(options.errorAfter) : options.errorAfter; - const warnAfter = typeof options.warnAfter === "string" ? new Version(options.warnAfter) : options.warnAfter; - const since = typeof options.since === "string" ? new Version(options.since) : options.since ?? warnAfter; - const error2 = options.error || errorAfter && version2.compareTo(errorAfter) >= 0; - const warn = !warnAfter || version2.compareTo(warnAfter) >= 0; - return error2 ? createErrorDeprecation(name, errorAfter, since, options.message) : warn ? createWarningDeprecation(name, errorAfter, since, options.message) : noop; - } - function wrapFunction(deprecation, func) { - return function() { - deprecation(); - return func.apply(this, arguments); - }; - } - function deprecate(func, options) { - const deprecation = createDeprecation((options == null ? void 0 : options.name) ?? Debug.getFunctionName(func), options); - return wrapFunction(deprecation, func); - } - var enableDeprecationWarnings, typeScriptVersion2; - var init_deprecate = __esm({ - "src/deprecatedCompat/deprecate.ts"() { - "use strict"; - init_ts5(); - enableDeprecationWarnings = true; - } - }); - - // src/deprecatedCompat/deprecations.ts - function createOverload(name, overloads, binder2, deprecations) { - Object.defineProperty(call, "name", { ...Object.getOwnPropertyDescriptor(call, "name"), value: name }); - if (deprecations) { - for (const key of Object.keys(deprecations)) { - const index = +key; - if (!isNaN(index) && hasProperty(overloads, `${index}`)) { - overloads[index] = deprecate(overloads[index], { ...deprecations[index], name }); - } - } - } - const bind = createBinder2(overloads, binder2); - return call; - function call(...args) { - const index = bind(args); - const fn = index !== void 0 ? overloads[index] : void 0; - if (typeof fn === "function") { - return fn(...args); - } - throw new TypeError("Invalid arguments"); - } - } - function createBinder2(overloads, binder2) { - return (args) => { - for (let i = 0; hasProperty(overloads, `${i}`) && hasProperty(binder2, `${i}`); i++) { - const fn = binder2[i]; - if (fn(args)) { - return i; - } - } - }; - } - function buildOverload(name) { - return { - overload: (overloads) => ({ - bind: (binder2) => ({ - finish: () => createOverload(name, overloads, binder2), - deprecate: (deprecations) => ({ - finish: () => createOverload(name, overloads, binder2, deprecations) - }) - }) - }) - }; - } - var init_deprecations = __esm({ - "src/deprecatedCompat/deprecations.ts"() { - "use strict"; - init_ts5(); - init_deprecate(); - } - }); - - // src/deprecatedCompat/5.0/identifierProperties.ts - var init_identifierProperties = __esm({ - "src/deprecatedCompat/5.0/identifierProperties.ts"() { - "use strict"; - init_ts5(); - init_deprecate(); - addObjectAllocatorPatcher((objectAllocator2) => { - const Identifier78 = objectAllocator2.getIdentifierConstructor(); - if (!hasProperty(Identifier78.prototype, "originalKeywordKind")) { - Object.defineProperty(Identifier78.prototype, "originalKeywordKind", { - get: deprecate(function() { - return identifierToKeywordKind(this); - }, { - name: "originalKeywordKind", - since: "5.0", - warnAfter: "5.1", - errorAfter: "5.2", - message: "Use 'identifierToKeywordKind(identifier)' instead." - }) - }); - } - if (!hasProperty(Identifier78.prototype, "isInJSDocNamespace")) { - Object.defineProperty(Identifier78.prototype, "isInJSDocNamespace", { - get: deprecate(function() { - return this.flags & 4096 /* IdentifierIsInJSDocNamespace */ ? true : void 0; - }, { - name: "isInJSDocNamespace", - since: "5.0", - warnAfter: "5.1", - errorAfter: "5.2", - message: "Use '.parent' or the surrounding context to determine this instead." - }) - }); - } - }); - } - }); - - // src/deprecatedCompat/_namespaces/ts.ts - var init_ts5 = __esm({ - "src/deprecatedCompat/_namespaces/ts.ts"() { - "use strict"; - init_ts2(); - init_deprecations(); - init_identifierProperties(); - } - }); - - // src/typingsInstallerCore/_namespaces/ts.ts - var init_ts6 = __esm({ - "src/typingsInstallerCore/_namespaces/ts.ts"() { - "use strict"; - init_ts2(); - init_ts3(); - init_ts_server2(); - } - }); - - // src/typingsInstallerCore/typingsInstaller.ts - function typingToFileName(cachePath, packageName, installTypingHost, log) { - try { - const result = resolveModuleName(packageName, combinePaths(cachePath, "index.d.ts"), { moduleResolution: 2 /* Node10 */ }, installTypingHost); - return result.resolvedModule && result.resolvedModule.resolvedFileName; - } catch (e) { - if (log.isEnabled()) { - log.writeLine(`Failed to resolve ${packageName} in folder '${cachePath}': ${e.message}`); - } - return void 0; - } - } - function installNpmPackages(npmPath, tsVersion, packageNames, install) { - let hasError = false; - for (let remaining = packageNames.length; remaining > 0; ) { - const result = getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining); - remaining = result.remaining; - hasError = install(result.command) || hasError; - } - return hasError; - } - function getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining) { - const sliceStart = packageNames.length - remaining; - let command, toSlice = remaining; - while (true) { - command = `${npmPath} install --ignore-scripts ${(toSlice === packageNames.length ? packageNames : packageNames.slice(sliceStart, sliceStart + toSlice)).join(" ")} --save-dev --user-agent="typesInstaller/${tsVersion}"`; - if (command.length < 8e3) { - break; - } - toSlice = toSlice - Math.floor(toSlice / 2); - } - return { command, remaining: remaining - toSlice }; - } - function typingsName(packageName) { - return `@types/${packageName}@ts${versionMajorMinor}`; - } - var nullLog, TypingsInstaller; - var init_typingsInstaller = __esm({ - "src/typingsInstallerCore/typingsInstaller.ts"() { - "use strict"; - init_ts6(); - init_ts_server2(); - nullLog = { - isEnabled: () => false, - writeLine: noop - }; - TypingsInstaller = class { - constructor(installTypingHost, globalCachePath, safeListPath, typesMapLocation, throttleLimit, log = nullLog) { - this.installTypingHost = installTypingHost; - this.globalCachePath = globalCachePath; - this.safeListPath = safeListPath; - this.typesMapLocation = typesMapLocation; - this.throttleLimit = throttleLimit; - this.log = log; - this.packageNameToTypingLocation = /* @__PURE__ */ new Map(); - this.missingTypingsSet = /* @__PURE__ */ new Set(); - this.knownCachesSet = /* @__PURE__ */ new Set(); - this.projectWatchers = /* @__PURE__ */ new Map(); - /** @internal */ - this.pendingRunRequests = []; - this.installRunCount = 1; - this.inFlightRequestCount = 0; - this.latestDistTag = "latest"; - const isLoggingEnabled = this.log.isEnabled(); - if (isLoggingEnabled) { - this.log.writeLine(`Global cache location '${globalCachePath}', safe file path '${safeListPath}', types map path ${typesMapLocation}`); - } - this.processCacheLocation(this.globalCachePath); - } - closeProject(req) { - this.closeWatchers(req.projectName); - } - closeWatchers(projectName) { - if (this.log.isEnabled()) { - this.log.writeLine(`Closing file watchers for project '${projectName}'`); - } - const watchers = this.projectWatchers.get(projectName); - if (!watchers) { - if (this.log.isEnabled()) { - this.log.writeLine(`No watchers are registered for project '${projectName}'`); - } - return; - } - this.projectWatchers.delete(projectName); - this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files: [] }); - if (this.log.isEnabled()) { - this.log.writeLine(`Closing file watchers for project '${projectName}' - done.`); - } - } - install(req) { - if (this.log.isEnabled()) { - this.log.writeLine(`Got install request ${JSON.stringify(req)}`); - } - if (req.cachePath) { - if (this.log.isEnabled()) { - this.log.writeLine(`Request specifies cache path '${req.cachePath}', loading cached information...`); - } - this.processCacheLocation(req.cachePath); - } - if (this.safeList === void 0) { - this.initializeSafeList(); - } - const discoverTypingsResult = ts_JsTyping_exports.discoverTypings( - this.installTypingHost, - this.log.isEnabled() ? (s) => this.log.writeLine(s) : void 0, - req.fileNames, - req.projectRootPath, - this.safeList, - this.packageNameToTypingLocation, - req.typeAcquisition, - req.unresolvedImports, - this.typesRegistry, - req.compilerOptions - ); - if (this.log.isEnabled()) { - this.log.writeLine(`Finished typings discovery: ${JSON.stringify(discoverTypingsResult)}`); - } - this.watchFiles(req.projectName, discoverTypingsResult.filesToWatch); - if (discoverTypingsResult.newTypingNames.length) { - this.installTypings(req, req.cachePath || this.globalCachePath, discoverTypingsResult.cachedTypingPaths, discoverTypingsResult.newTypingNames); - } else { - this.sendResponse(this.createSetTypings(req, discoverTypingsResult.cachedTypingPaths)); - if (this.log.isEnabled()) { - this.log.writeLine(`No new typings were requested as a result of typings discovery`); - } - } - } - initializeSafeList() { - if (this.typesMapLocation) { - const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation); - if (safeListFromMap) { - this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`); - this.safeList = safeListFromMap; - return; - } - this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`); - } - this.safeList = ts_JsTyping_exports.loadSafeList(this.installTypingHost, this.safeListPath); - } - processCacheLocation(cacheLocation) { - if (this.log.isEnabled()) { - this.log.writeLine(`Processing cache location '${cacheLocation}'`); - } - if (this.knownCachesSet.has(cacheLocation)) { - if (this.log.isEnabled()) { - this.log.writeLine(`Cache location was already processed...`); - } - return; - } - const packageJson = combinePaths(cacheLocation, "package.json"); - const packageLockJson = combinePaths(cacheLocation, "package-lock.json"); - if (this.log.isEnabled()) { - this.log.writeLine(`Trying to find '${packageJson}'...`); - } - if (this.installTypingHost.fileExists(packageJson) && this.installTypingHost.fileExists(packageLockJson)) { - const npmConfig = JSON.parse(this.installTypingHost.readFile(packageJson)); - const npmLock = JSON.parse(this.installTypingHost.readFile(packageLockJson)); - if (this.log.isEnabled()) { - this.log.writeLine(`Loaded content of '${packageJson}': ${JSON.stringify(npmConfig)}`); - this.log.writeLine(`Loaded content of '${packageLockJson}'`); - } - if (npmConfig.devDependencies && npmLock.dependencies) { - for (const key in npmConfig.devDependencies) { - if (!hasProperty(npmLock.dependencies, key)) { - continue; - } - const packageName = getBaseFileName(key); - if (!packageName) { - continue; - } - const typingFile = typingToFileName(cacheLocation, packageName, this.installTypingHost, this.log); - if (!typingFile) { - this.missingTypingsSet.add(packageName); - continue; - } - const existingTypingFile = this.packageNameToTypingLocation.get(packageName); - if (existingTypingFile) { - if (existingTypingFile.typingLocation === typingFile) { - continue; - } - if (this.log.isEnabled()) { - this.log.writeLine(`New typing for package ${packageName} from '${typingFile}' conflicts with existing typing file '${existingTypingFile}'`); - } - } - if (this.log.isEnabled()) { - this.log.writeLine(`Adding entry into typings cache: '${packageName}' => '${typingFile}'`); - } - const info = getProperty(npmLock.dependencies, key); - const version2 = info && info.version; - if (!version2) { - continue; - } - const newTyping = { typingLocation: typingFile, version: new Version(version2) }; - this.packageNameToTypingLocation.set(packageName, newTyping); - } - } - } - if (this.log.isEnabled()) { - this.log.writeLine(`Finished processing cache location '${cacheLocation}'`); - } - this.knownCachesSet.add(cacheLocation); - } - filterTypings(typingsToInstall) { - return mapDefined(typingsToInstall, (typing) => { - const typingKey = mangleScopedPackageName(typing); - if (this.missingTypingsSet.has(typingKey)) { - if (this.log.isEnabled()) - this.log.writeLine(`'${typing}':: '${typingKey}' is in missingTypingsSet - skipping...`); - return void 0; - } - const validationResult = ts_JsTyping_exports.validatePackageName(typing); - if (validationResult !== ts_JsTyping_exports.NameValidationResult.Ok) { - this.missingTypingsSet.add(typingKey); - if (this.log.isEnabled()) - this.log.writeLine(ts_JsTyping_exports.renderPackageNameValidationFailure(validationResult, typing)); - return void 0; - } - if (!this.typesRegistry.has(typingKey)) { - if (this.log.isEnabled()) - this.log.writeLine(`'${typing}':: Entry for package '${typingKey}' does not exist in local types registry - skipping...`); - return void 0; - } - if (this.packageNameToTypingLocation.get(typingKey) && ts_JsTyping_exports.isTypingUpToDate(this.packageNameToTypingLocation.get(typingKey), this.typesRegistry.get(typingKey))) { - if (this.log.isEnabled()) - this.log.writeLine(`'${typing}':: '${typingKey}' already has an up-to-date typing - skipping...`); - return void 0; - } - return typingKey; - }); - } - ensurePackageDirectoryExists(directory) { - const npmConfigPath = combinePaths(directory, "package.json"); - if (this.log.isEnabled()) { - this.log.writeLine(`Npm config file: ${npmConfigPath}`); - } - if (!this.installTypingHost.fileExists(npmConfigPath)) { - if (this.log.isEnabled()) { - this.log.writeLine(`Npm config file: '${npmConfigPath}' is missing, creating new one...`); - } - this.ensureDirectoryExists(directory, this.installTypingHost); - this.installTypingHost.writeFile(npmConfigPath, '{ "private": true }'); - } - } - installTypings(req, cachePath, currentlyCachedTypings, typingsToInstall) { - if (this.log.isEnabled()) { - this.log.writeLine(`Installing typings ${JSON.stringify(typingsToInstall)}`); - } - const filteredTypings = this.filterTypings(typingsToInstall); - if (filteredTypings.length === 0) { - if (this.log.isEnabled()) { - this.log.writeLine(`All typings are known to be missing or invalid - no need to install more typings`); - } - this.sendResponse(this.createSetTypings(req, currentlyCachedTypings)); - return; - } - this.ensurePackageDirectoryExists(cachePath); - const requestId = this.installRunCount; - this.installRunCount++; - this.sendResponse({ - kind: EventBeginInstallTypes, - eventId: requestId, - typingsInstallerVersion: version, - projectName: req.projectName - }); - const scopedTypings = filteredTypings.map(typingsName); - this.installTypingsAsync(requestId, scopedTypings, cachePath, (ok) => { - try { - if (!ok) { - if (this.log.isEnabled()) { - this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(filteredTypings)}`); - } - for (const typing of filteredTypings) { - this.missingTypingsSet.add(typing); - } - return; - } - if (this.log.isEnabled()) { - this.log.writeLine(`Installed typings ${JSON.stringify(scopedTypings)}`); - } - const installedTypingFiles = []; - for (const packageName of filteredTypings) { - const typingFile = typingToFileName(cachePath, packageName, this.installTypingHost, this.log); - if (!typingFile) { - this.missingTypingsSet.add(packageName); - continue; - } - const distTags = this.typesRegistry.get(packageName); - const newVersion = new Version(distTags[`ts${versionMajorMinor}`] || distTags[this.latestDistTag]); - const newTyping = { typingLocation: typingFile, version: newVersion }; - this.packageNameToTypingLocation.set(packageName, newTyping); - installedTypingFiles.push(typingFile); - } - if (this.log.isEnabled()) { - this.log.writeLine(`Installed typing files ${JSON.stringify(installedTypingFiles)}`); - } - this.sendResponse(this.createSetTypings(req, currentlyCachedTypings.concat(installedTypingFiles))); - } finally { - const response = { - kind: EventEndInstallTypes, - eventId: requestId, - projectName: req.projectName, - packagesToInstall: scopedTypings, - installSuccess: ok, - typingsInstallerVersion: version - }; - this.sendResponse(response); - } - }); - } - ensureDirectoryExists(directory, host) { - const directoryName = getDirectoryPath(directory); - if (!host.directoryExists(directoryName)) { - this.ensureDirectoryExists(directoryName, host); - } - if (!host.directoryExists(directory)) { - host.createDirectory(directory); - } - } - watchFiles(projectName, files) { - if (!files.length) { - this.closeWatchers(projectName); - return; - } - const existing = this.projectWatchers.get(projectName); - const newSet = new Set(files); - if (!existing || forEachKey(newSet, (s) => !existing.has(s)) || forEachKey(existing, (s) => !newSet.has(s))) { - this.projectWatchers.set(projectName, newSet); - this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files }); - } else { - this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files: void 0 }); - } - } - createSetTypings(request, typings) { - return { - projectName: request.projectName, - typeAcquisition: request.typeAcquisition, - compilerOptions: request.compilerOptions, - typings, - unresolvedImports: request.unresolvedImports, - kind: ActionSet - }; - } - installTypingsAsync(requestId, packageNames, cwd, onRequestCompleted) { - this.pendingRunRequests.unshift({ requestId, packageNames, cwd, onRequestCompleted }); - this.executeWithThrottling(); - } - executeWithThrottling() { - while (this.inFlightRequestCount < this.throttleLimit && this.pendingRunRequests.length) { - this.inFlightRequestCount++; - const request = this.pendingRunRequests.pop(); - this.installWorker(request.requestId, request.packageNames, request.cwd, (ok) => { - this.inFlightRequestCount--; - request.onRequestCompleted(ok); - this.executeWithThrottling(); - }); - } - } - }; - } - }); - - // src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts - var ts_server_typingsInstaller_exports = {}; - __export(ts_server_typingsInstaller_exports, { - TypingsInstaller: () => TypingsInstaller, - getNpmCommandForInstallation: () => getNpmCommandForInstallation, - installNpmPackages: () => installNpmPackages, - typingsName: () => typingsName - }); - var init_ts_server_typingsInstaller = __esm({ - "src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts"() { - "use strict"; - init_typingsInstaller(); - } - }); - - // src/typingsInstallerCore/_namespaces/ts.server.ts - var init_ts_server2 = __esm({ - "src/typingsInstallerCore/_namespaces/ts.server.ts"() { - "use strict"; - init_ts_server(); - init_ts_server_typingsInstaller(); - } - }); - - // src/server/types.ts - var init_types4 = __esm({ - "src/server/types.ts"() { - "use strict"; - } - }); - - // src/server/utilitiesPublic.ts - function createInstallTypingsRequest(project, typeAcquisition, unresolvedImports, cachePath) { - return { - projectName: project.getProjectName(), - fileNames: project.getFileNames( - /*excludeFilesFromExternalLibraries*/ - true, - /*excludeConfigFiles*/ - true - ).concat(project.getExcludedFiles()), - compilerOptions: project.getCompilationSettings(), - typeAcquisition, - unresolvedImports, - projectRootPath: project.getCurrentDirectory(), - cachePath, - kind: "discover" - }; - } - function toNormalizedPath(fileName) { - return normalizePath(fileName); - } - function normalizedPathToPath(normalizedPath, currentDirectory, getCanonicalFileName) { - const f = isRootedDiskPath(normalizedPath) ? normalizedPath : getNormalizedAbsolutePath(normalizedPath, currentDirectory); - return getCanonicalFileName(f); - } - function asNormalizedPath(fileName) { - return fileName; - } - function createNormalizedPathMap() { - const map2 = /* @__PURE__ */ new Map(); - return { - get(path) { - return map2.get(path); - }, - set(path, value) { - map2.set(path, value); - }, - contains(path) { - return map2.has(path); - }, - remove(path) { - map2.delete(path); - } - }; - } - function isInferredProjectName(name) { - return /dev\/null\/inferredProject\d+\*/.test(name); - } - function makeInferredProjectName(counter) { - return `/dev/null/inferredProject${counter}*`; - } - function makeAutoImportProviderProjectName(counter) { - return `/dev/null/autoImportProviderProject${counter}*`; - } - function makeAuxiliaryProjectName(counter) { - return `/dev/null/auxiliaryProject${counter}*`; - } - function createSortedArray2() { - return []; - } - var LogLevel2, emptyArray2, Msg, Errors; - var init_utilitiesPublic3 = __esm({ - "src/server/utilitiesPublic.ts"() { - "use strict"; - init_ts7(); - LogLevel2 = /* @__PURE__ */ ((LogLevel3) => { - LogLevel3[LogLevel3["terse"] = 0] = "terse"; - LogLevel3[LogLevel3["normal"] = 1] = "normal"; - LogLevel3[LogLevel3["requestTime"] = 2] = "requestTime"; - LogLevel3[LogLevel3["verbose"] = 3] = "verbose"; - return LogLevel3; - })(LogLevel2 || {}); - emptyArray2 = createSortedArray2(); - Msg = /* @__PURE__ */ ((Msg2) => { - Msg2["Err"] = "Err"; - Msg2["Info"] = "Info"; - Msg2["Perf"] = "Perf"; - return Msg2; - })(Msg || {}); - ((Errors2) => { - function ThrowNoProject() { - throw new Error("No Project."); - } - Errors2.ThrowNoProject = ThrowNoProject; - function ThrowProjectLanguageServiceDisabled() { - throw new Error("The project's language service is disabled."); - } - Errors2.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled; - function ThrowProjectDoesNotContainDocument(fileName, project) { - throw new Error(`Project '${project.getProjectName()}' does not contain document '${fileName}'`); - } - Errors2.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument; - })(Errors || (Errors = {})); - } - }); - - // src/server/utilities.ts - function getBaseConfigFileName(configFilePath) { - const base = getBaseFileName(configFilePath); - return base === "tsconfig.json" || base === "jsconfig.json" ? base : void 0; - } - function removeSorted(array, remove, compare) { - if (!array || array.length === 0) { - return; - } - if (array[0] === remove) { - array.splice(0, 1); - return; - } - const removeIndex = binarySearch(array, remove, identity, compare); - if (removeIndex >= 0) { - array.splice(removeIndex, 1); - } - } - function indent2(str) { - return indentStr + str.replace(/\n/g, indentStr); - } - function stringifyIndented(json) { - return indentStr + JSON.stringify(json); - } - var ThrottledOperations, GcTimer, indentStr; - var init_utilities5 = __esm({ - "src/server/utilities.ts"() { - "use strict"; - init_ts7(); - init_ts_server3(); - ThrottledOperations = class _ThrottledOperations { - constructor(host, logger) { - this.host = host; - this.pendingTimeouts = /* @__PURE__ */ new Map(); - this.logger = logger.hasLevel(3 /* verbose */) ? logger : void 0; - } - /** - * Wait `number` milliseconds and then invoke `cb`. If, while waiting, schedule - * is called again with the same `operationId`, cancel this operation in favor - * of the new one. (Note that the amount of time the canceled operation had been - * waiting does not affect the amount of time that the new operation waits.) - */ - schedule(operationId, delay, cb) { - const pendingTimeout = this.pendingTimeouts.get(operationId); - if (pendingTimeout) { - this.host.clearTimeout(pendingTimeout); - } - this.pendingTimeouts.set(operationId, this.host.setTimeout(_ThrottledOperations.run, delay, operationId, this, cb)); - if (this.logger) { - this.logger.info(`Scheduled: ${operationId}${pendingTimeout ? ", Cancelled earlier one" : ""}`); - } - } - cancel(operationId) { - const pendingTimeout = this.pendingTimeouts.get(operationId); - if (!pendingTimeout) - return false; - this.host.clearTimeout(pendingTimeout); - return this.pendingTimeouts.delete(operationId); - } - static run(operationId, self, cb) { - var _a, _b; - (_a = perfLogger) == null ? void 0 : _a.logStartScheduledOperation(operationId); - self.pendingTimeouts.delete(operationId); - if (self.logger) { - self.logger.info(`Running: ${operationId}`); - } - cb(); - (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation(); - } - }; - GcTimer = class _GcTimer { - constructor(host, delay, logger) { - this.host = host; - this.delay = delay; - this.logger = logger; - } - scheduleCollect() { - if (!this.host.gc || this.timerId !== void 0) { - return; - } - this.timerId = this.host.setTimeout(_GcTimer.run, this.delay, this); - } - static run(self) { - var _a, _b; - self.timerId = void 0; - (_a = perfLogger) == null ? void 0 : _a.logStartScheduledOperation("GC collect"); - const log = self.logger.hasLevel(2 /* requestTime */); - const before = log && self.host.getMemoryUsage(); - self.host.gc(); - if (log) { - const after = self.host.getMemoryUsage(); - self.logger.perftrc(`GC::before ${before}, after ${after}`); - } - (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation(); - } - }; - indentStr = "\n "; - } - }); - - // src/server/protocol.ts - var CommandTypes, OrganizeImportsMode2, WatchFileKind2, WatchDirectoryKind2, PollingWatchKind2, CompletionTriggerKind2, IndentStyle2, SemicolonPreference2, JsxEmit2, ModuleKind2, ModuleResolutionKind2, NewLineKind2, ScriptTarget10, ClassificationType2; - var init_protocol = __esm({ - "src/server/protocol.ts"() { - "use strict"; - CommandTypes = /* @__PURE__ */ ((CommandTypes2) => { - CommandTypes2["JsxClosingTag"] = "jsxClosingTag"; - CommandTypes2["LinkedEditingRange"] = "linkedEditingRange"; - CommandTypes2["Brace"] = "brace"; - CommandTypes2["BraceFull"] = "brace-full"; - CommandTypes2["BraceCompletion"] = "braceCompletion"; - CommandTypes2["GetSpanOfEnclosingComment"] = "getSpanOfEnclosingComment"; - CommandTypes2["Change"] = "change"; - CommandTypes2["Close"] = "close"; - CommandTypes2["Completions"] = "completions"; - CommandTypes2["CompletionInfo"] = "completionInfo"; - CommandTypes2["CompletionsFull"] = "completions-full"; - CommandTypes2["CompletionDetails"] = "completionEntryDetails"; - CommandTypes2["CompletionDetailsFull"] = "completionEntryDetails-full"; - CommandTypes2["CompileOnSaveAffectedFileList"] = "compileOnSaveAffectedFileList"; - CommandTypes2["CompileOnSaveEmitFile"] = "compileOnSaveEmitFile"; - CommandTypes2["Configure"] = "configure"; - CommandTypes2["Definition"] = "definition"; - CommandTypes2["DefinitionFull"] = "definition-full"; - CommandTypes2["DefinitionAndBoundSpan"] = "definitionAndBoundSpan"; - CommandTypes2["DefinitionAndBoundSpanFull"] = "definitionAndBoundSpan-full"; - CommandTypes2["Implementation"] = "implementation"; - CommandTypes2["ImplementationFull"] = "implementation-full"; - CommandTypes2["EmitOutput"] = "emit-output"; - CommandTypes2["Exit"] = "exit"; - CommandTypes2["FileReferences"] = "fileReferences"; - CommandTypes2["FileReferencesFull"] = "fileReferences-full"; - CommandTypes2["Format"] = "format"; - CommandTypes2["Formatonkey"] = "formatonkey"; - CommandTypes2["FormatFull"] = "format-full"; - CommandTypes2["FormatonkeyFull"] = "formatonkey-full"; - CommandTypes2["FormatRangeFull"] = "formatRange-full"; - CommandTypes2["Geterr"] = "geterr"; - CommandTypes2["GeterrForProject"] = "geterrForProject"; - CommandTypes2["SemanticDiagnosticsSync"] = "semanticDiagnosticsSync"; - CommandTypes2["SyntacticDiagnosticsSync"] = "syntacticDiagnosticsSync"; - CommandTypes2["SuggestionDiagnosticsSync"] = "suggestionDiagnosticsSync"; - CommandTypes2["NavBar"] = "navbar"; - CommandTypes2["NavBarFull"] = "navbar-full"; - CommandTypes2["Navto"] = "navto"; - CommandTypes2["NavtoFull"] = "navto-full"; - CommandTypes2["NavTree"] = "navtree"; - CommandTypes2["NavTreeFull"] = "navtree-full"; - CommandTypes2["DocumentHighlights"] = "documentHighlights"; - CommandTypes2["DocumentHighlightsFull"] = "documentHighlights-full"; - CommandTypes2["Open"] = "open"; - CommandTypes2["Quickinfo"] = "quickinfo"; - CommandTypes2["QuickinfoFull"] = "quickinfo-full"; - CommandTypes2["References"] = "references"; - CommandTypes2["ReferencesFull"] = "references-full"; - CommandTypes2["Reload"] = "reload"; - CommandTypes2["Rename"] = "rename"; - CommandTypes2["RenameInfoFull"] = "rename-full"; - CommandTypes2["RenameLocationsFull"] = "renameLocations-full"; - CommandTypes2["Saveto"] = "saveto"; - CommandTypes2["SignatureHelp"] = "signatureHelp"; - CommandTypes2["SignatureHelpFull"] = "signatureHelp-full"; - CommandTypes2["FindSourceDefinition"] = "findSourceDefinition"; - CommandTypes2["Status"] = "status"; - CommandTypes2["TypeDefinition"] = "typeDefinition"; - CommandTypes2["ProjectInfo"] = "projectInfo"; - CommandTypes2["ReloadProjects"] = "reloadProjects"; - CommandTypes2["Unknown"] = "unknown"; - CommandTypes2["OpenExternalProject"] = "openExternalProject"; - CommandTypes2["OpenExternalProjects"] = "openExternalProjects"; - CommandTypes2["CloseExternalProject"] = "closeExternalProject"; - CommandTypes2["SynchronizeProjectList"] = "synchronizeProjectList"; - CommandTypes2["ApplyChangedToOpenFiles"] = "applyChangedToOpenFiles"; - CommandTypes2["UpdateOpen"] = "updateOpen"; - CommandTypes2["EncodedSyntacticClassificationsFull"] = "encodedSyntacticClassifications-full"; - CommandTypes2["EncodedSemanticClassificationsFull"] = "encodedSemanticClassifications-full"; - CommandTypes2["Cleanup"] = "cleanup"; - CommandTypes2["GetOutliningSpans"] = "getOutliningSpans"; - CommandTypes2["GetOutliningSpansFull"] = "outliningSpans"; - CommandTypes2["TodoComments"] = "todoComments"; - CommandTypes2["Indentation"] = "indentation"; - CommandTypes2["DocCommentTemplate"] = "docCommentTemplate"; - CommandTypes2["CompilerOptionsDiagnosticsFull"] = "compilerOptionsDiagnostics-full"; - CommandTypes2["NameOrDottedNameSpan"] = "nameOrDottedNameSpan"; - CommandTypes2["BreakpointStatement"] = "breakpointStatement"; - CommandTypes2["CompilerOptionsForInferredProjects"] = "compilerOptionsForInferredProjects"; - CommandTypes2["GetCodeFixes"] = "getCodeFixes"; - CommandTypes2["GetCodeFixesFull"] = "getCodeFixes-full"; - CommandTypes2["GetCombinedCodeFix"] = "getCombinedCodeFix"; - CommandTypes2["GetCombinedCodeFixFull"] = "getCombinedCodeFix-full"; - CommandTypes2["ApplyCodeActionCommand"] = "applyCodeActionCommand"; - CommandTypes2["GetSupportedCodeFixes"] = "getSupportedCodeFixes"; - CommandTypes2["GetApplicableRefactors"] = "getApplicableRefactors"; - CommandTypes2["GetEditsForRefactor"] = "getEditsForRefactor"; - CommandTypes2["GetMoveToRefactoringFileSuggestions"] = "getMoveToRefactoringFileSuggestions"; - CommandTypes2["GetEditsForRefactorFull"] = "getEditsForRefactor-full"; - CommandTypes2["OrganizeImports"] = "organizeImports"; - CommandTypes2["OrganizeImportsFull"] = "organizeImports-full"; - CommandTypes2["GetEditsForFileRename"] = "getEditsForFileRename"; - CommandTypes2["GetEditsForFileRenameFull"] = "getEditsForFileRename-full"; - CommandTypes2["ConfigurePlugin"] = "configurePlugin"; - CommandTypes2["SelectionRange"] = "selectionRange"; - CommandTypes2["SelectionRangeFull"] = "selectionRange-full"; - CommandTypes2["ToggleLineComment"] = "toggleLineComment"; - CommandTypes2["ToggleLineCommentFull"] = "toggleLineComment-full"; - CommandTypes2["ToggleMultilineComment"] = "toggleMultilineComment"; - CommandTypes2["ToggleMultilineCommentFull"] = "toggleMultilineComment-full"; - CommandTypes2["CommentSelection"] = "commentSelection"; - CommandTypes2["CommentSelectionFull"] = "commentSelection-full"; - CommandTypes2["UncommentSelection"] = "uncommentSelection"; - CommandTypes2["UncommentSelectionFull"] = "uncommentSelection-full"; - CommandTypes2["PrepareCallHierarchy"] = "prepareCallHierarchy"; - CommandTypes2["ProvideCallHierarchyIncomingCalls"] = "provideCallHierarchyIncomingCalls"; - CommandTypes2["ProvideCallHierarchyOutgoingCalls"] = "provideCallHierarchyOutgoingCalls"; - CommandTypes2["ProvideInlayHints"] = "provideInlayHints"; - return CommandTypes2; - })(CommandTypes || {}); - OrganizeImportsMode2 = /* @__PURE__ */ ((OrganizeImportsMode3) => { - OrganizeImportsMode3["All"] = "All"; - OrganizeImportsMode3["SortAndCombine"] = "SortAndCombine"; - OrganizeImportsMode3["RemoveUnused"] = "RemoveUnused"; - return OrganizeImportsMode3; - })(OrganizeImportsMode2 || {}); - WatchFileKind2 = /* @__PURE__ */ ((WatchFileKind3) => { - WatchFileKind3["FixedPollingInterval"] = "FixedPollingInterval"; - WatchFileKind3["PriorityPollingInterval"] = "PriorityPollingInterval"; - WatchFileKind3["DynamicPriorityPolling"] = "DynamicPriorityPolling"; - WatchFileKind3["FixedChunkSizePolling"] = "FixedChunkSizePolling"; - WatchFileKind3["UseFsEvents"] = "UseFsEvents"; - WatchFileKind3["UseFsEventsOnParentDirectory"] = "UseFsEventsOnParentDirectory"; - return WatchFileKind3; - })(WatchFileKind2 || {}); - WatchDirectoryKind2 = /* @__PURE__ */ ((WatchDirectoryKind3) => { - WatchDirectoryKind3["UseFsEvents"] = "UseFsEvents"; - WatchDirectoryKind3["FixedPollingInterval"] = "FixedPollingInterval"; - WatchDirectoryKind3["DynamicPriorityPolling"] = "DynamicPriorityPolling"; - WatchDirectoryKind3["FixedChunkSizePolling"] = "FixedChunkSizePolling"; - return WatchDirectoryKind3; - })(WatchDirectoryKind2 || {}); - PollingWatchKind2 = /* @__PURE__ */ ((PollingWatchKind3) => { - PollingWatchKind3["FixedInterval"] = "FixedInterval"; - PollingWatchKind3["PriorityInterval"] = "PriorityInterval"; - PollingWatchKind3["DynamicPriority"] = "DynamicPriority"; - PollingWatchKind3["FixedChunkSize"] = "FixedChunkSize"; - return PollingWatchKind3; - })(PollingWatchKind2 || {}); - CompletionTriggerKind2 = /* @__PURE__ */ ((CompletionTriggerKind4) => { - CompletionTriggerKind4[CompletionTriggerKind4["Invoked"] = 1] = "Invoked"; - CompletionTriggerKind4[CompletionTriggerKind4["TriggerCharacter"] = 2] = "TriggerCharacter"; - CompletionTriggerKind4[CompletionTriggerKind4["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions"; - return CompletionTriggerKind4; - })(CompletionTriggerKind2 || {}); - IndentStyle2 = /* @__PURE__ */ ((IndentStyle3) => { - IndentStyle3["None"] = "None"; - IndentStyle3["Block"] = "Block"; - IndentStyle3["Smart"] = "Smart"; - return IndentStyle3; - })(IndentStyle2 || {}); - SemicolonPreference2 = /* @__PURE__ */ ((SemicolonPreference3) => { - SemicolonPreference3["Ignore"] = "ignore"; - SemicolonPreference3["Insert"] = "insert"; - SemicolonPreference3["Remove"] = "remove"; - return SemicolonPreference3; - })(SemicolonPreference2 || {}); - JsxEmit2 = /* @__PURE__ */ ((JsxEmit3) => { - JsxEmit3["None"] = "None"; - JsxEmit3["Preserve"] = "Preserve"; - JsxEmit3["ReactNative"] = "ReactNative"; - JsxEmit3["React"] = "React"; - return JsxEmit3; - })(JsxEmit2 || {}); - ModuleKind2 = /* @__PURE__ */ ((ModuleKind3) => { - ModuleKind3["None"] = "None"; - ModuleKind3["CommonJS"] = "CommonJS"; - ModuleKind3["AMD"] = "AMD"; - ModuleKind3["UMD"] = "UMD"; - ModuleKind3["System"] = "System"; - ModuleKind3["ES6"] = "ES6"; - ModuleKind3["ES2015"] = "ES2015"; - ModuleKind3["ESNext"] = "ESNext"; - return ModuleKind3; - })(ModuleKind2 || {}); - ModuleResolutionKind2 = /* @__PURE__ */ ((ModuleResolutionKind3) => { - ModuleResolutionKind3["Classic"] = "Classic"; - ModuleResolutionKind3["Node"] = "Node"; - return ModuleResolutionKind3; - })(ModuleResolutionKind2 || {}); - NewLineKind2 = /* @__PURE__ */ ((NewLineKind3) => { - NewLineKind3["Crlf"] = "Crlf"; - NewLineKind3["Lf"] = "Lf"; - return NewLineKind3; - })(NewLineKind2 || {}); - ScriptTarget10 = /* @__PURE__ */ ((ScriptTarget11) => { - ScriptTarget11["ES3"] = "ES3"; - ScriptTarget11["ES5"] = "ES5"; - ScriptTarget11["ES6"] = "ES6"; - ScriptTarget11["ES2015"] = "ES2015"; - ScriptTarget11["ES2016"] = "ES2016"; - ScriptTarget11["ES2017"] = "ES2017"; - ScriptTarget11["ES2018"] = "ES2018"; - ScriptTarget11["ES2019"] = "ES2019"; - ScriptTarget11["ES2020"] = "ES2020"; - ScriptTarget11["ES2021"] = "ES2021"; - ScriptTarget11["ES2022"] = "ES2022"; - ScriptTarget11["ESNext"] = "ESNext"; - return ScriptTarget11; - })(ScriptTarget10 || {}); - ClassificationType2 = /* @__PURE__ */ ((ClassificationType3) => { - ClassificationType3[ClassificationType3["comment"] = 1] = "comment"; - ClassificationType3[ClassificationType3["identifier"] = 2] = "identifier"; - ClassificationType3[ClassificationType3["keyword"] = 3] = "keyword"; - ClassificationType3[ClassificationType3["numericLiteral"] = 4] = "numericLiteral"; - ClassificationType3[ClassificationType3["operator"] = 5] = "operator"; - ClassificationType3[ClassificationType3["stringLiteral"] = 6] = "stringLiteral"; - ClassificationType3[ClassificationType3["regularExpressionLiteral"] = 7] = "regularExpressionLiteral"; - ClassificationType3[ClassificationType3["whiteSpace"] = 8] = "whiteSpace"; - ClassificationType3[ClassificationType3["text"] = 9] = "text"; - ClassificationType3[ClassificationType3["punctuation"] = 10] = "punctuation"; - ClassificationType3[ClassificationType3["className"] = 11] = "className"; - ClassificationType3[ClassificationType3["enumName"] = 12] = "enumName"; - ClassificationType3[ClassificationType3["interfaceName"] = 13] = "interfaceName"; - ClassificationType3[ClassificationType3["moduleName"] = 14] = "moduleName"; - ClassificationType3[ClassificationType3["typeParameterName"] = 15] = "typeParameterName"; - ClassificationType3[ClassificationType3["typeAliasName"] = 16] = "typeAliasName"; - ClassificationType3[ClassificationType3["parameterName"] = 17] = "parameterName"; - ClassificationType3[ClassificationType3["docCommentTagName"] = 18] = "docCommentTagName"; - ClassificationType3[ClassificationType3["jsxOpenTagName"] = 19] = "jsxOpenTagName"; - ClassificationType3[ClassificationType3["jsxCloseTagName"] = 20] = "jsxCloseTagName"; - ClassificationType3[ClassificationType3["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName"; - ClassificationType3[ClassificationType3["jsxAttribute"] = 22] = "jsxAttribute"; - ClassificationType3[ClassificationType3["jsxText"] = 23] = "jsxText"; - ClassificationType3[ClassificationType3["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue"; - ClassificationType3[ClassificationType3["bigintLiteral"] = 25] = "bigintLiteral"; - return ClassificationType3; - })(ClassificationType2 || {}); - } - }); - - // src/server/_namespaces/ts.server.protocol.ts - var ts_server_protocol_exports = {}; - __export(ts_server_protocol_exports, { - ClassificationType: () => ClassificationType2, - CommandTypes: () => CommandTypes, - CompletionTriggerKind: () => CompletionTriggerKind2, - IndentStyle: () => IndentStyle2, - JsxEmit: () => JsxEmit2, - ModuleKind: () => ModuleKind2, - ModuleResolutionKind: () => ModuleResolutionKind2, - NewLineKind: () => NewLineKind2, - OrganizeImportsMode: () => OrganizeImportsMode2, - PollingWatchKind: () => PollingWatchKind2, - ScriptTarget: () => ScriptTarget10, - SemicolonPreference: () => SemicolonPreference2, - WatchDirectoryKind: () => WatchDirectoryKind2, - WatchFileKind: () => WatchFileKind2 - }); - var init_ts_server_protocol = __esm({ - "src/server/_namespaces/ts.server.protocol.ts"() { - "use strict"; - init_protocol(); - } - }); - - // src/server/scriptInfo.ts - function isDynamicFileName(fileName) { - return fileName[0] === "^" || (stringContains(fileName, "walkThroughSnippet:/") || stringContains(fileName, "untitled:/")) && getBaseFileName(fileName)[0] === "^" || stringContains(fileName, ":^") && !stringContains(fileName, directorySeparator); - } - function ensurePrimaryProjectKind(project) { - if (!project || project.projectKind === 3 /* AutoImportProvider */ || project.projectKind === 4 /* Auxiliary */) { - return Errors.ThrowNoProject(); - } - return project; - } - function failIfInvalidPosition(position) { - Debug.assert(typeof position === "number", `Expected position ${position} to be a number.`); - Debug.assert(position >= 0, `Expected position to be non-negative.`); - } - function failIfInvalidLocation(location) { - Debug.assert(typeof location.line === "number", `Expected line ${location.line} to be a number.`); - Debug.assert(typeof location.offset === "number", `Expected offset ${location.offset} to be a number.`); - Debug.assert(location.line > 0, `Expected line to be non-${location.line === 0 ? "zero" : "negative"}`); - Debug.assert(location.offset > 0, `Expected offset to be non-${location.offset === 0 ? "zero" : "negative"}`); - } - var TextStorage, ScriptInfo; - var init_scriptInfo = __esm({ - "src/server/scriptInfo.ts"() { - "use strict"; - init_ts7(); - init_ts_server3(); - TextStorage = class { - constructor(host, info, initialVersion) { - this.host = host; - this.info = info; - /** - * True if the text is for the file thats open in the editor - */ - this.isOpen = false; - /** - * True if the text present is the text from the file on the disk - */ - this.ownFileText = false; - /** - * True when reloading contents of file from the disk is pending - */ - this.pendingReloadFromDisk = false; - this.version = initialVersion || 0; - } - getVersion() { - return this.svc ? `SVC-${this.version}-${this.svc.getSnapshotVersion()}` : `Text-${this.version}`; - } - hasScriptVersionCache_TestOnly() { - return this.svc !== void 0; - } - resetSourceMapInfo() { - this.info.sourceFileLike = void 0; - this.info.closeSourceMapFileWatcher(); - this.info.sourceMapFilePath = void 0; - this.info.declarationInfoPath = void 0; - this.info.sourceInfos = void 0; - this.info.documentPositionMapper = void 0; - } - /** Public for testing */ - useText(newText) { - this.svc = void 0; - this.text = newText; - this.textSnapshot = void 0; - this.lineMap = void 0; - this.fileSize = void 0; - this.resetSourceMapInfo(); - this.version++; - } - edit(start, end, newText) { - this.switchToScriptVersionCache().edit(start, end - start, newText); - this.ownFileText = false; - this.text = void 0; - this.textSnapshot = void 0; - this.lineMap = void 0; - this.fileSize = void 0; - this.resetSourceMapInfo(); - } - /** - * Set the contents as newText - * returns true if text changed - */ - reload(newText) { - Debug.assert(newText !== void 0); - this.pendingReloadFromDisk = false; - if (!this.text && this.svc) { - this.text = getSnapshotText(this.svc.getSnapshot()); - } - if (this.text !== newText) { - this.useText(newText); - this.ownFileText = false; - return true; - } - return false; - } - /** - * Reads the contents from tempFile(if supplied) or own file and sets it as contents - * returns true if text changed - */ - reloadWithFileText(tempFileName) { - const { text: newText, fileSize } = tempFileName || !this.info.isDynamicOrHasMixedContent() ? this.getFileTextAndSize(tempFileName) : { text: "", fileSize: void 0 }; - const reloaded = this.reload(newText); - this.fileSize = fileSize; - this.ownFileText = !tempFileName || tempFileName === this.info.fileName; - return reloaded; - } - /** - * Schedule reload from the disk if its not already scheduled and its not own text - * returns true when scheduling reload - */ - scheduleReloadIfNeeded() { - return !this.pendingReloadFromDisk && !this.ownFileText ? this.pendingReloadFromDisk = true : false; - } - delayReloadFromFileIntoText() { - this.pendingReloadFromDisk = true; - } - /** - * For telemetry purposes, we would like to be able to report the size of the file. - * However, we do not want telemetry to require extra file I/O so we report a size - * that may be stale (e.g. may not reflect change made on disk since the last reload). - * NB: Will read from disk if the file contents have never been loaded because - * telemetry falsely indicating size 0 would be counter-productive. - */ - getTelemetryFileSize() { - return !!this.fileSize ? this.fileSize : !!this.text ? this.text.length : !!this.svc ? this.svc.getSnapshot().getLength() : this.getSnapshot().getLength(); - } - getSnapshot() { - var _a; - return ((_a = this.tryUseScriptVersionCache()) == null ? void 0 : _a.getSnapshot()) || (this.textSnapshot ?? (this.textSnapshot = ScriptSnapshot.fromString(Debug.checkDefined(this.text)))); - } - getAbsolutePositionAndLineText(oneBasedLine) { - const svc = this.tryUseScriptVersionCache(); - if (svc) - return svc.getAbsolutePositionAndLineText(oneBasedLine); - const lineMap = this.getLineMap(); - return oneBasedLine <= lineMap.length ? { - absolutePosition: lineMap[oneBasedLine - 1], - lineText: this.text.substring(lineMap[oneBasedLine - 1], lineMap[oneBasedLine]) - } : { - absolutePosition: this.text.length, - lineText: void 0 - }; - } - /** - * @param line 0 based index - */ - lineToTextSpan(line) { - const svc = this.tryUseScriptVersionCache(); - if (svc) - return svc.lineToTextSpan(line); - const lineMap = this.getLineMap(); - const start = lineMap[line]; - const end = line + 1 < lineMap.length ? lineMap[line + 1] : this.text.length; - return createTextSpanFromBounds(start, end); - } - /** - * @param line 1 based index - * @param offset 1 based index - */ - lineOffsetToPosition(line, offset, allowEdits) { - const svc = this.tryUseScriptVersionCache(); - return svc ? svc.lineOffsetToPosition(line, offset) : computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1, this.text, allowEdits); - } - positionToLineOffset(position) { - const svc = this.tryUseScriptVersionCache(); - if (svc) - return svc.positionToLineOffset(position); - const { line, character } = computeLineAndCharacterOfPosition(this.getLineMap(), position); - return { line: line + 1, offset: character + 1 }; - } - getFileTextAndSize(tempFileName) { - let text; - const fileName = tempFileName || this.info.fileName; - const getText = () => text === void 0 ? text = this.host.readFile(fileName) || "" : text; - if (!hasTSFileExtension(this.info.fileName)) { - const fileSize = this.host.getFileSize ? this.host.getFileSize(fileName) : getText().length; - if (fileSize > maxFileSize) { - Debug.assert(!!this.info.containingProjects.length); - const service = this.info.containingProjects[0].projectService; - service.logger.info(`Skipped loading contents of large file ${fileName} for info ${this.info.fileName}: fileSize: ${fileSize}`); - this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(fileName, fileSize); - return { text: "", fileSize }; - } - } - return { text: getText() }; - } - /** @internal */ - switchToScriptVersionCache() { - if (!this.svc || this.pendingReloadFromDisk) { - this.svc = ScriptVersionCache.fromString(this.getOrLoadText()); - this.textSnapshot = void 0; - this.version++; - } - return this.svc; - } - tryUseScriptVersionCache() { - if (!this.svc || this.pendingReloadFromDisk) { - this.getOrLoadText(); - } - if (this.isOpen) { - if (!this.svc && !this.textSnapshot) { - this.svc = ScriptVersionCache.fromString(Debug.checkDefined(this.text)); - this.textSnapshot = void 0; - } - return this.svc; - } - return this.svc; - } - getOrLoadText() { - if (this.text === void 0 || this.pendingReloadFromDisk) { - Debug.assert(!this.svc || this.pendingReloadFromDisk, "ScriptVersionCache should not be set when reloading from disk"); - this.reloadWithFileText(); - } - return this.text; - } - getLineMap() { - Debug.assert(!this.svc, "ScriptVersionCache should not be set"); - return this.lineMap || (this.lineMap = computeLineStarts(Debug.checkDefined(this.text))); - } - getLineInfo() { - const svc = this.tryUseScriptVersionCache(); - if (svc) { - return { - getLineCount: () => svc.getLineCount(), - getLineText: (line) => svc.getAbsolutePositionAndLineText(line + 1).lineText - }; - } - const lineMap = this.getLineMap(); - return getLineInfo(this.text, lineMap); - } - }; - ScriptInfo = class { - constructor(host, fileName, scriptKind, hasMixedContent, path, initialVersion) { - this.host = host; - this.fileName = fileName; - this.scriptKind = scriptKind; - this.hasMixedContent = hasMixedContent; - this.path = path; - /** - * All projects that include this file - */ - this.containingProjects = []; - this.isDynamic = isDynamicFileName(fileName); - this.textStorage = new TextStorage(host, this, initialVersion); - if (hasMixedContent || this.isDynamic) { - this.realpath = this.path; - } - this.scriptKind = scriptKind ? scriptKind : getScriptKindFromFileName(fileName); - } - /** @internal */ - isDynamicOrHasMixedContent() { - return this.hasMixedContent || this.isDynamic; - } - isScriptOpen() { - return this.textStorage.isOpen; - } - open(newText) { - this.textStorage.isOpen = true; - if (newText !== void 0 && this.textStorage.reload(newText)) { - this.markContainingProjectsAsDirty(); - } - } - close(fileExists = true) { - this.textStorage.isOpen = false; - if (fileExists && this.textStorage.scheduleReloadIfNeeded()) { - this.markContainingProjectsAsDirty(); - } - } - getSnapshot() { - return this.textStorage.getSnapshot(); - } - ensureRealPath() { - if (this.realpath === void 0) { - this.realpath = this.path; - if (this.host.realpath) { - Debug.assert(!!this.containingProjects.length); - const project = this.containingProjects[0]; - const realpath = this.host.realpath(this.path); - if (realpath) { - this.realpath = project.toPath(realpath); - if (this.realpath !== this.path) { - project.projectService.realpathToScriptInfos.add(this.realpath, this); - } - } - } - } - } - /** @internal */ - getRealpathIfDifferent() { - return this.realpath && this.realpath !== this.path ? this.realpath : void 0; - } - /** - * @internal - * Does not compute realpath; uses precomputed result. Use `ensureRealPath` - * first if a definite result is needed. - */ - isSymlink() { - return this.realpath && this.realpath !== this.path; - } - getFormatCodeSettings() { - return this.formatSettings; - } - getPreferences() { - return this.preferences; - } - attachToProject(project) { - const isNew = !this.isAttached(project); - if (isNew) { - this.containingProjects.push(project); - if (!project.getCompilerOptions().preserveSymlinks) { - this.ensureRealPath(); - } - project.onFileAddedOrRemoved(this.isSymlink()); - } - return isNew; - } - isAttached(project) { - switch (this.containingProjects.length) { - case 0: - return false; - case 1: - return this.containingProjects[0] === project; - case 2: - return this.containingProjects[0] === project || this.containingProjects[1] === project; - default: - return contains(this.containingProjects, project); - } - } - detachFromProject(project) { - switch (this.containingProjects.length) { - case 0: - return; - case 1: - if (this.containingProjects[0] === project) { - project.onFileAddedOrRemoved(this.isSymlink()); - this.containingProjects.pop(); - } - break; - case 2: - if (this.containingProjects[0] === project) { - project.onFileAddedOrRemoved(this.isSymlink()); - this.containingProjects[0] = this.containingProjects.pop(); - } else if (this.containingProjects[1] === project) { - project.onFileAddedOrRemoved(this.isSymlink()); - this.containingProjects.pop(); - } - break; - default: - if (unorderedRemoveItem(this.containingProjects, project)) { - project.onFileAddedOrRemoved(this.isSymlink()); - } - break; - } - } - detachAllProjects() { - for (const p of this.containingProjects) { - if (isConfiguredProject(p)) { - p.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName, this.path, 2 /* Deleted */); - } - const existingRoot = p.getRootFilesMap().get(this.path); - p.removeFile( - this, - /*fileExists*/ - false, - /*detachFromProject*/ - false - ); - p.onFileAddedOrRemoved(this.isSymlink()); - if (existingRoot && !isInferredProject(p)) { - p.addMissingFileRoot(existingRoot.fileName); - } - } - clear(this.containingProjects); - } - getDefaultProject() { - switch (this.containingProjects.length) { - case 0: - return Errors.ThrowNoProject(); - case 1: - return ensurePrimaryProjectKind(this.containingProjects[0]); - default: - let firstExternalProject; - let firstConfiguredProject; - let firstInferredProject; - let firstNonSourceOfProjectReferenceRedirect; - let defaultConfiguredProject; - for (let index = 0; index < this.containingProjects.length; index++) { - const project = this.containingProjects[index]; - if (isConfiguredProject(project)) { - if (!project.isSourceOfProjectReferenceRedirect(this.fileName)) { - if (defaultConfiguredProject === void 0 && index !== this.containingProjects.length - 1) { - defaultConfiguredProject = project.projectService.findDefaultConfiguredProject(this) || false; - } - if (defaultConfiguredProject === project) - return project; - if (!firstNonSourceOfProjectReferenceRedirect) - firstNonSourceOfProjectReferenceRedirect = project; - } - if (!firstConfiguredProject) - firstConfiguredProject = project; - } else if (!firstExternalProject && isExternalProject(project)) { - firstExternalProject = project; - } else if (!firstInferredProject && isInferredProject(project)) { - firstInferredProject = project; - } - } - return ensurePrimaryProjectKind(defaultConfiguredProject || firstNonSourceOfProjectReferenceRedirect || firstConfiguredProject || firstExternalProject || firstInferredProject); - } - } - registerFileUpdate() { - for (const p of this.containingProjects) { - p.registerFileUpdate(this.path); - } - } - setOptions(formatSettings, preferences) { - if (formatSettings) { - if (!this.formatSettings) { - this.formatSettings = getDefaultFormatCodeSettings(this.host.newLine); - assign(this.formatSettings, formatSettings); - } else { - this.formatSettings = { ...this.formatSettings, ...formatSettings }; - } - } - if (preferences) { - if (!this.preferences) { - this.preferences = emptyOptions; - } - this.preferences = { ...this.preferences, ...preferences }; - } - } - getLatestVersion() { - this.textStorage.getSnapshot(); - return this.textStorage.getVersion(); - } - saveTo(fileName) { - this.host.writeFile(fileName, getSnapshotText(this.textStorage.getSnapshot())); - } - /** @internal */ - delayReloadNonMixedContentFile() { - Debug.assert(!this.isDynamicOrHasMixedContent()); - this.textStorage.delayReloadFromFileIntoText(); - this.markContainingProjectsAsDirty(); - } - reloadFromFile(tempFileName) { - if (this.textStorage.reloadWithFileText(tempFileName)) { - this.markContainingProjectsAsDirty(); - return true; - } - return false; - } - editContent(start, end, newText) { - this.textStorage.edit(start, end, newText); - this.markContainingProjectsAsDirty(); - } - markContainingProjectsAsDirty() { - for (const p of this.containingProjects) { - p.markFileAsDirty(this.path); - } - } - isOrphan() { - return !forEach(this.containingProjects, (p) => !p.isOrphan()); - } - /** @internal */ - isContainedByBackgroundProject() { - return some( - this.containingProjects, - (p) => p.projectKind === 3 /* AutoImportProvider */ || p.projectKind === 4 /* Auxiliary */ - ); - } - /** - * @param line 1 based index - */ - lineToTextSpan(line) { - return this.textStorage.lineToTextSpan(line); - } - // eslint-disable-line @typescript-eslint/unified-signatures - lineOffsetToPosition(line, offset, allowEdits) { - return this.textStorage.lineOffsetToPosition(line, offset, allowEdits); - } - positionToLineOffset(position) { - failIfInvalidPosition(position); - const location = this.textStorage.positionToLineOffset(position); - failIfInvalidLocation(location); - return location; - } - isJavaScript() { - return this.scriptKind === 1 /* JS */ || this.scriptKind === 2 /* JSX */; - } - /** @internal */ - closeSourceMapFileWatcher() { - if (this.sourceMapFilePath && !isString(this.sourceMapFilePath)) { - closeFileWatcherOf(this.sourceMapFilePath); - this.sourceMapFilePath = void 0; - } - } - }; - } - }); - - // src/server/typingsCache.ts - function setIsEqualTo(arr1, arr2) { - if (arr1 === arr2) { - return true; - } - if ((arr1 || emptyArray2).length === 0 && (arr2 || emptyArray2).length === 0) { - return true; - } - const set = /* @__PURE__ */ new Map(); - let unique = 0; - for (const v of arr1) { - if (set.get(v) !== true) { - set.set(v, true); - unique++; - } - } - for (const v of arr2) { - const isSet = set.get(v); - if (isSet === void 0) { - return false; - } - if (isSet === true) { - set.set(v, false); - unique--; - } - } - return unique === 0; - } - function typeAcquisitionChanged(opt1, opt2) { - return opt1.enable !== opt2.enable || !setIsEqualTo(opt1.include, opt2.include) || !setIsEqualTo(opt1.exclude, opt2.exclude); - } - function compilerOptionsChanged(opt1, opt2) { - return getAllowJSCompilerOption(opt1) !== getAllowJSCompilerOption(opt2); - } - function unresolvedImportsChanged(imports1, imports2) { - if (imports1 === imports2) { - return false; - } - return !arrayIsEqualTo(imports1, imports2); - } - var nullTypingsInstaller, TypingsCache; - var init_typingsCache = __esm({ - "src/server/typingsCache.ts"() { - "use strict"; - init_ts7(); - init_ts_server3(); - nullTypingsInstaller = { - isKnownTypesPackageName: returnFalse, - // Should never be called because we never provide a types registry. - installPackage: notImplemented, - enqueueInstallTypingsRequest: noop, - attach: noop, - onProjectClosed: noop, - globalTypingsCacheLocation: void 0 - // TODO: GH#18217 - }; - TypingsCache = class { - constructor(installer) { - this.installer = installer; - this.perProjectCache = /* @__PURE__ */ new Map(); - } - isKnownTypesPackageName(name) { - return this.installer.isKnownTypesPackageName(name); - } - installPackage(options) { - return this.installer.installPackage(options); - } - enqueueInstallTypingsForProject(project, unresolvedImports, forceRefresh) { - const typeAcquisition = project.getTypeAcquisition(); - if (!typeAcquisition || !typeAcquisition.enable) { - return; - } - const entry = this.perProjectCache.get(project.getProjectName()); - if (forceRefresh || !entry || typeAcquisitionChanged(typeAcquisition, entry.typeAcquisition) || compilerOptionsChanged(project.getCompilationSettings(), entry.compilerOptions) || unresolvedImportsChanged(unresolvedImports, entry.unresolvedImports)) { - this.perProjectCache.set(project.getProjectName(), { - compilerOptions: project.getCompilationSettings(), - typeAcquisition, - typings: entry ? entry.typings : emptyArray2, - unresolvedImports, - poisoned: true - }); - this.installer.enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports); - } - } - updateTypingsForProject(projectName, compilerOptions, typeAcquisition, unresolvedImports, newTypings) { - const typings = sort(newTypings); - this.perProjectCache.set(projectName, { - compilerOptions, - typeAcquisition, - typings, - unresolvedImports, - poisoned: false - }); - return !typeAcquisition || !typeAcquisition.enable ? emptyArray2 : typings; - } - onProjectClosed(project) { - this.perProjectCache.delete(project.getProjectName()); - this.installer.onProjectClosed(project); - } - }; - } - }); - - // src/server/project.ts - function countEachFileTypes(infos, includeSizes = false) { - const result = { - js: 0, - jsSize: 0, - jsx: 0, - jsxSize: 0, - ts: 0, - tsSize: 0, - tsx: 0, - tsxSize: 0, - dts: 0, - dtsSize: 0, - deferred: 0, - deferredSize: 0 - }; - for (const info of infos) { - const fileSize = includeSizes ? info.textStorage.getTelemetryFileSize() : 0; - switch (info.scriptKind) { - case 1 /* JS */: - result.js += 1; - result.jsSize += fileSize; - break; - case 2 /* JSX */: - result.jsx += 1; - result.jsxSize += fileSize; - break; - case 3 /* TS */: - if (isDeclarationFileName(info.fileName)) { - result.dts += 1; - result.dtsSize += fileSize; - } else { - result.ts += 1; - result.tsSize += fileSize; - } - break; - case 4 /* TSX */: - result.tsx += 1; - result.tsxSize += fileSize; - break; - case 7 /* Deferred */: - result.deferred += 1; - result.deferredSize += fileSize; - break; - } - } - return result; - } - function hasOneOrMoreJsAndNoTsFiles(project) { - const counts2 = countEachFileTypes(project.getScriptInfos()); - return counts2.js > 0 && counts2.ts === 0 && counts2.tsx === 0; - } - function allRootFilesAreJsOrDts(project) { - const counts2 = countEachFileTypes(project.getRootScriptInfos()); - return counts2.ts === 0 && counts2.tsx === 0; - } - function allFilesAreJsOrDts(project) { - const counts2 = countEachFileTypes(project.getScriptInfos()); - return counts2.ts === 0 && counts2.tsx === 0; - } - function hasNoTypeScriptSource(fileNames) { - return !fileNames.some((fileName) => fileExtensionIs(fileName, ".ts" /* Ts */) && !isDeclarationFileName(fileName) || fileExtensionIs(fileName, ".tsx" /* Tsx */)); - } - function isGeneratedFileWatcher(watch) { - return watch.generatedFilePath !== void 0; - } - function getUnresolvedImports(program, cachedUnresolvedImportsPerFile) { - var _a, _b; - const sourceFiles = program.getSourceFiles(); - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getUnresolvedImports", { count: sourceFiles.length }); - const ambientModules = program.getTypeChecker().getAmbientModules().map((mod) => stripQuotes(mod.getName())); - const result = sortAndDeduplicate(flatMap(sourceFiles, (sourceFile) => extractUnresolvedImportsFromSourceFile(sourceFile, ambientModules, cachedUnresolvedImportsPerFile))); - (_b = tracing) == null ? void 0 : _b.pop(); - return result; - } - function extractUnresolvedImportsFromSourceFile(file, ambientModules, cachedUnresolvedImportsPerFile) { - return getOrUpdate(cachedUnresolvedImportsPerFile, file.path, () => { - if (!file.resolvedModules) - return emptyArray2; - let unresolvedImports; - file.resolvedModules.forEach(({ resolvedModule }, name) => { - if ((!resolvedModule || !resolutionExtensionIsTSOrJson(resolvedModule.extension)) && !isExternalModuleNameRelative(name) && !ambientModules.some((m) => m === name)) { - unresolvedImports = append(unresolvedImports, parsePackageName(name).packageName); - } - }); - return unresolvedImports || emptyArray2; - }); - } - function isInferredProject(project) { - return project.projectKind === 0 /* Inferred */; - } - function isConfiguredProject(project) { - return project.projectKind === 1 /* Configured */; - } - function isExternalProject(project) { - return project.projectKind === 2 /* External */; - } - var ProjectKind, Project3, InferredProject2, AuxiliaryProject, _AutoImportProviderProject, AutoImportProviderProject, ConfiguredProject2, ExternalProject2; - var init_project = __esm({ - "src/server/project.ts"() { - "use strict"; - init_ts7(); - init_ts7(); - init_ts_server3(); - ProjectKind = /* @__PURE__ */ ((ProjectKind2) => { - ProjectKind2[ProjectKind2["Inferred"] = 0] = "Inferred"; - ProjectKind2[ProjectKind2["Configured"] = 1] = "Configured"; - ProjectKind2[ProjectKind2["External"] = 2] = "External"; - ProjectKind2[ProjectKind2["AutoImportProvider"] = 3] = "AutoImportProvider"; - ProjectKind2[ProjectKind2["Auxiliary"] = 4] = "Auxiliary"; - return ProjectKind2; - })(ProjectKind || {}); - Project3 = class _Project { - /** @internal */ - constructor(projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, watchOptions, directoryStructureHost, currentDirectory) { - this.projectKind = projectKind; - this.projectService = projectService; - this.documentRegistry = documentRegistry; - this.compilerOptions = compilerOptions; - this.compileOnSaveEnabled = compileOnSaveEnabled; - this.watchOptions = watchOptions; - this.rootFiles = []; - this.rootFilesMap = /* @__PURE__ */ new Map(); - /** @internal */ - this.plugins = []; - /** - * This is map from files to unresolved imports in it - * Maop does not contain entries for files that do not have unresolved imports - * This helps in containing the set of files to invalidate - * - * @internal - */ - this.cachedUnresolvedImportsPerFile = /* @__PURE__ */ new Map(); - /** @internal */ - this.hasAddedorRemovedFiles = false; - /** @internal */ - this.hasAddedOrRemovedSymlinks = false; - /** - * Last version that was reported. - */ - this.lastReportedVersion = 0; - /** - * Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one) - * This property is changed in 'updateGraph' based on the set of files in program - */ - this.projectProgramVersion = 0; - /** - * Current version of the project state. It is changed when: - * - new root file was added/removed - * - edit happen in some file that is currently included in the project. - * This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project - */ - this.projectStateVersion = 0; - this.isInitialLoadPending = returnFalse; - /** @internal */ - this.dirty = false; - /** @internal */ - this.typingFiles = emptyArray2; - /** @internal */ - this.moduleSpecifierCache = createModuleSpecifierCache(this); - /** @internal */ - this.createHash = maybeBind(this.projectService.host, this.projectService.host.createHash); - /** @internal */ - this.globalCacheResolutionModuleName = ts_JsTyping_exports.nonRelativeModuleNameForTypingCache; - this.projectName = projectName; - this.directoryStructureHost = directoryStructureHost; - this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory); - this.getCanonicalFileName = this.projectService.toCanonicalFileName; - this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds); - if (!this.compilerOptions) { - this.compilerOptions = getDefaultCompilerOptions2(); - this.compilerOptions.allowNonTsExtensions = true; - this.compilerOptions.allowJs = true; - } else if (hasExplicitListOfFiles || getAllowJSCompilerOption(this.compilerOptions) || this.projectService.hasDeferredExtension()) { - this.compilerOptions.allowNonTsExtensions = true; - } - switch (projectService.serverMode) { - case 0 /* Semantic */: - this.languageServiceEnabled = true; - break; - case 1 /* PartialSemantic */: - this.languageServiceEnabled = true; - this.compilerOptions.noResolve = true; - this.compilerOptions.types = []; - break; - case 2 /* Syntactic */: - this.languageServiceEnabled = false; - this.compilerOptions.noResolve = true; - this.compilerOptions.types = []; - break; - default: - Debug.assertNever(projectService.serverMode); - } - this.setInternalCompilerOptionsForEmittingJsFiles(); - const host = this.projectService.host; - if (this.projectService.logger.loggingEnabled()) { - this.trace = (s) => this.writeLog(s); - } else if (host.trace) { - this.trace = (s) => host.trace(s); - } - this.realpath = maybeBind(host, host.realpath); - this.resolutionCache = createResolutionCache( - this, - this.currentDirectory, - /*logChangesWhenResolvingModule*/ - true - ); - this.languageService = createLanguageService(this, this.documentRegistry, this.projectService.serverMode); - if (lastFileExceededProgramSize) { - this.disableLanguageService(lastFileExceededProgramSize); - } - this.markAsDirty(); - if (projectKind !== 3 /* AutoImportProvider */) { - this.projectService.pendingEnsureProjectForOpenFiles = true; - } - } - /** @internal */ - getResolvedProjectReferenceToRedirect(_fileName) { - return void 0; - } - isNonTsProject() { - updateProjectIfDirty(this); - return allFilesAreJsOrDts(this); - } - isJsOnlyProject() { - updateProjectIfDirty(this); - return hasOneOrMoreJsAndNoTsFiles(this); - } - static resolveModule(moduleName, initialDir, host, log) { - return _Project.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule; - } - /** @internal */ - static importServicePluginSync(pluginConfigEntry, searchPaths, host, log) { - Debug.assertIsDefined(host.require); - let errorLogs; - let resolvedModule; - for (const initialDir of searchPaths) { - const resolvedPath = normalizeSlashes(host.resolvePath(combinePaths(initialDir, "node_modules"))); - log(`Loading ${pluginConfigEntry.name} from ${initialDir} (resolved to ${resolvedPath})`); - const result = host.require(resolvedPath, pluginConfigEntry.name); - if (!result.error) { - resolvedModule = result.module; - break; - } - const err = result.error.stack || result.error.message || JSON.stringify(result.error); - (errorLogs ?? (errorLogs = [])).push(`Failed to load module '${pluginConfigEntry.name}' from ${resolvedPath}: ${err}`); - } - return { pluginConfigEntry, resolvedModule, errorLogs }; - } - /** @internal */ - static async importServicePluginAsync(pluginConfigEntry, searchPaths, host, log) { - Debug.assertIsDefined(host.importPlugin); - let errorLogs; - let resolvedModule; - for (const initialDir of searchPaths) { - const resolvedPath = combinePaths(initialDir, "node_modules"); - log(`Dynamically importing ${pluginConfigEntry.name} from ${initialDir} (resolved to ${resolvedPath})`); - let result; - try { - result = await host.importPlugin(resolvedPath, pluginConfigEntry.name); - } catch (e) { - result = { module: void 0, error: e }; - } - if (!result.error) { - resolvedModule = result.module; - break; - } - const err = result.error.stack || result.error.message || JSON.stringify(result.error); - (errorLogs ?? (errorLogs = [])).push(`Failed to dynamically import module '${pluginConfigEntry.name}' from ${resolvedPath}: ${err}`); - } - return { pluginConfigEntry, resolvedModule, errorLogs }; - } - isKnownTypesPackageName(name) { - return this.typingsCache.isKnownTypesPackageName(name); - } - installPackage(options) { - return this.typingsCache.installPackage({ ...options, projectName: this.projectName, projectRootPath: this.toPath(this.currentDirectory) }); - } - /** @internal */ - getGlobalTypingsCacheLocation() { - return this.getGlobalCache(); - } - get typingsCache() { - return this.projectService.typingsCache; - } - /** @internal */ - getSymlinkCache() { - if (!this.symlinks) { - this.symlinks = createSymlinkCache(this.getCurrentDirectory(), this.getCanonicalFileName); - } - if (this.program && !this.symlinks.hasProcessedResolutions()) { - this.symlinks.setSymlinksFromResolutions( - this.program.getSourceFiles(), - this.program.getAutomaticTypeDirectiveResolutions() - ); - } - return this.symlinks; - } - // Method of LanguageServiceHost - getCompilationSettings() { - return this.compilerOptions; - } - // Method to support public API - getCompilerOptions() { - return this.getCompilationSettings(); - } - getNewLine() { - return this.projectService.host.newLine; - } - getProjectVersion() { - return this.projectStateVersion.toString(); - } - getProjectReferences() { - return void 0; - } - getScriptFileNames() { - if (!this.rootFiles) { - return emptyArray; - } - let result; - this.rootFilesMap.forEach((value) => { - if (this.languageServiceEnabled || value.info && value.info.isScriptOpen()) { - (result || (result = [])).push(value.fileName); - } - }); - return addRange(result, this.typingFiles) || emptyArray; - } - getOrCreateScriptInfoAndAttachToProject(fileName) { - const scriptInfo = this.projectService.getOrCreateScriptInfoNotOpenedByClient(fileName, this.currentDirectory, this.directoryStructureHost); - if (scriptInfo) { - const existingValue = this.rootFilesMap.get(scriptInfo.path); - if (existingValue && existingValue.info !== scriptInfo) { - this.rootFiles.push(scriptInfo); - existingValue.info = scriptInfo; - } - scriptInfo.attachToProject(this); - } - return scriptInfo; - } - getScriptKind(fileName) { - const info = this.getOrCreateScriptInfoAndAttachToProject(fileName); - return info && info.scriptKind; - } - getScriptVersion(filename) { - const info = this.projectService.getOrCreateScriptInfoNotOpenedByClient(filename, this.currentDirectory, this.directoryStructureHost); - return info && info.getLatestVersion(); - } - getScriptSnapshot(filename) { - const scriptInfo = this.getOrCreateScriptInfoAndAttachToProject(filename); - if (scriptInfo) { - return scriptInfo.getSnapshot(); - } - } - getCancellationToken() { - return this.cancellationToken; - } - getCurrentDirectory() { - return this.currentDirectory; - } - getDefaultLibFileName() { - const nodeModuleBinDir = getDirectoryPath(normalizePath(this.projectService.getExecutingFilePath())); - return combinePaths(nodeModuleBinDir, getDefaultLibFileName(this.compilerOptions)); - } - useCaseSensitiveFileNames() { - return this.projectService.host.useCaseSensitiveFileNames; - } - readDirectory(path, extensions, exclude, include, depth) { - return this.directoryStructureHost.readDirectory(path, extensions, exclude, include, depth); - } - readFile(fileName) { - return this.projectService.host.readFile(fileName); - } - writeFile(fileName, content) { - return this.projectService.host.writeFile(fileName, content); - } - fileExists(file) { - const path = this.toPath(file); - return !this.isWatchedMissingFile(path) && this.directoryStructureHost.fileExists(file); - } - /** @internal */ - resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { - return this.resolutionCache.resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames); - } - getModuleResolutionCache() { - return this.resolutionCache.getModuleResolutionCache(); - } - /** @internal */ - resolveTypeReferenceDirectiveReferences(typeDirectiveReferences, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { - return this.resolutionCache.resolveTypeReferenceDirectiveReferences( - typeDirectiveReferences, - containingFile, - redirectedReference, - options, - containingSourceFile, - reusedNames - ); - } - /** @internal */ - resolveLibrary(libraryName, resolveFrom, options, libFileName) { - return this.resolutionCache.resolveLibrary(libraryName, resolveFrom, options, libFileName); - } - directoryExists(path) { - return this.directoryStructureHost.directoryExists(path); - } - getDirectories(path) { - return this.directoryStructureHost.getDirectories(path); - } - /** @internal */ - getCachedDirectoryStructureHost() { - return void 0; - } - /** @internal */ - toPath(fileName) { - return toPath(fileName, this.currentDirectory, this.projectService.toCanonicalFileName); - } - /** @internal */ - watchDirectoryOfFailedLookupLocation(directory, cb, flags) { - return this.projectService.watchFactory.watchDirectory( - directory, - cb, - flags, - this.projectService.getWatchOptions(this), - WatchType.FailedLookupLocations, - this - ); - } - /** @internal */ - watchAffectingFileLocation(file, cb) { - return this.projectService.watchFactory.watchFile( - file, - cb, - 2e3 /* High */, - this.projectService.getWatchOptions(this), - WatchType.AffectingFileLocation, - this - ); - } - /** @internal */ - clearInvalidateResolutionOfFailedLookupTimer() { - return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`); - } - /** @internal */ - scheduleInvalidateResolutionsOfFailedLookupLocations() { - this.projectService.throttledOperations.schedule( - `${this.getProjectName()}FailedLookupInvalidation`, - /*delay*/ - 1e3, - () => { - if (this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) { - this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); - } - } - ); - } - /** @internal */ - invalidateResolutionsOfFailedLookupLocations() { - if (this.clearInvalidateResolutionOfFailedLookupTimer() && this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) { - this.markAsDirty(); - this.projectService.delayEnsureProjectForOpenFiles(); - } - } - /** @internal */ - onInvalidatedResolution() { - this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); - } - /** @internal */ - watchTypeRootsDirectory(directory, cb, flags) { - return this.projectService.watchFactory.watchDirectory( - directory, - cb, - flags, - this.projectService.getWatchOptions(this), - WatchType.TypeRoots, - this - ); - } - /** @internal */ - hasChangedAutomaticTypeDirectiveNames() { - return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames(); - } - /** @internal */ - onChangedAutomaticTypeDirectiveNames() { - this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); - } - /** @internal */ - getGlobalCache() { - return this.getTypeAcquisition().enable ? this.projectService.typingsInstaller.globalTypingsCacheLocation : void 0; - } - /** @internal */ - fileIsOpen(filePath) { - return this.projectService.openFiles.has(filePath); - } - /** @internal */ - writeLog(s) { - this.projectService.logger.info(s); - } - log(s) { - this.writeLog(s); - } - error(s) { - this.projectService.logger.msg(s, "Err" /* Err */); - } - setInternalCompilerOptionsForEmittingJsFiles() { - if (this.projectKind === 0 /* Inferred */ || this.projectKind === 2 /* External */) { - this.compilerOptions.noEmitForJsFiles = true; - } - } - /** - * Get the errors that dont have any file name associated - */ - getGlobalProjectErrors() { - return filter(this.projectErrors, (diagnostic) => !diagnostic.file) || emptyArray2; - } - /** - * Get all the project errors - */ - getAllProjectErrors() { - return this.projectErrors || emptyArray2; - } - setProjectErrors(projectErrors) { - this.projectErrors = projectErrors; - } - getLanguageService(ensureSynchronized = true) { - if (ensureSynchronized) { - updateProjectIfDirty(this); - } - return this.languageService; - } - /** @internal */ - getSourceMapper() { - return this.getLanguageService().getSourceMapper(); - } - /** @internal */ - clearSourceMapperCache() { - this.languageService.clearSourceMapperCache(); - } - /** @internal */ - getDocumentPositionMapper(generatedFileName, sourceFileName) { - return this.projectService.getDocumentPositionMapper(this, generatedFileName, sourceFileName); - } - /** @internal */ - getSourceFileLike(fileName) { - return this.projectService.getSourceFileLike(fileName, this); - } - /** @internal */ - shouldEmitFile(scriptInfo) { - return scriptInfo && !scriptInfo.isDynamicOrHasMixedContent() && !this.program.isSourceOfProjectReferenceRedirect(scriptInfo.path); - } - getCompileOnSaveAffectedFileList(scriptInfo) { - if (!this.languageServiceEnabled) { - return []; - } - updateProjectIfDirty(this); - this.builderState = BuilderState.create( - this.program, - this.builderState, - /*disableUseFileVersionAsSignature*/ - true - ); - return mapDefined( - BuilderState.getFilesAffectedBy( - this.builderState, - this.program, - scriptInfo.path, - this.cancellationToken, - this.projectService.host - ), - (sourceFile) => this.shouldEmitFile(this.projectService.getScriptInfoForPath(sourceFile.path)) ? sourceFile.fileName : void 0 - ); - } - /** - * Returns true if emit was conducted - */ - emitFile(scriptInfo, writeFile2) { - if (!this.languageServiceEnabled || !this.shouldEmitFile(scriptInfo)) { - return { emitSkipped: true, diagnostics: emptyArray2 }; - } - const { emitSkipped, diagnostics, outputFiles } = this.getLanguageService().getEmitOutput(scriptInfo.fileName); - if (!emitSkipped) { - for (const outputFile of outputFiles) { - const outputFileAbsoluteFileName = getNormalizedAbsolutePath(outputFile.name, this.currentDirectory); - writeFile2(outputFileAbsoluteFileName, outputFile.text, outputFile.writeByteOrderMark); - } - if (this.builderState && getEmitDeclarations(this.compilerOptions)) { - const dtsFiles = outputFiles.filter((f) => isDeclarationFileName(f.name)); - if (dtsFiles.length === 1) { - const sourceFile = this.program.getSourceFile(scriptInfo.fileName); - const signature = this.projectService.host.createHash ? this.projectService.host.createHash(dtsFiles[0].text) : generateDjb2Hash(dtsFiles[0].text); - BuilderState.updateSignatureOfFile(this.builderState, signature, sourceFile.resolvedPath); - } - } - } - return { emitSkipped, diagnostics }; - } - enableLanguageService() { - if (this.languageServiceEnabled || this.projectService.serverMode === 2 /* Syntactic */) { - return; - } - this.languageServiceEnabled = true; - this.lastFileExceededProgramSize = void 0; - this.projectService.onUpdateLanguageServiceStateForProject( - this, - /*languageServiceEnabled*/ - true - ); - } - /** @internal */ - cleanupProgram() { - if (this.program) { - for (const f of this.program.getSourceFiles()) { - this.detachScriptInfoIfNotRoot(f.fileName); - } - this.program.forEachResolvedProjectReference((ref) => this.detachScriptInfoFromProject(ref.sourceFile.fileName)); - this.program = void 0; - } - } - disableLanguageService(lastFileExceededProgramSize) { - if (!this.languageServiceEnabled) { - return; - } - Debug.assert(this.projectService.serverMode !== 2 /* Syntactic */); - this.languageService.cleanupSemanticCache(); - this.languageServiceEnabled = false; - this.cleanupProgram(); - this.lastFileExceededProgramSize = lastFileExceededProgramSize; - this.builderState = void 0; - if (this.autoImportProviderHost) { - this.autoImportProviderHost.close(); - } - this.autoImportProviderHost = void 0; - this.resolutionCache.closeTypeRootsWatch(); - this.clearGeneratedFileWatch(); - this.projectService.verifyDocumentRegistry(); - this.projectService.onUpdateLanguageServiceStateForProject( - this, - /*languageServiceEnabled*/ - false - ); - } - getProjectName() { - return this.projectName; - } - removeLocalTypingsFromTypeAcquisition(newTypeAcquisition) { - if (!newTypeAcquisition || !newTypeAcquisition.include) { - return newTypeAcquisition; - } - return { ...newTypeAcquisition, include: this.removeExistingTypings(newTypeAcquisition.include) }; - } - getExternalFiles() { - return sort(flatMap(this.plugins, (plugin) => { - if (typeof plugin.module.getExternalFiles !== "function") - return; - try { - return plugin.module.getExternalFiles(this); - } catch (e) { - this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`); - if (e.stack) { - this.projectService.logger.info(e.stack); - } - } - })); - } - getSourceFile(path) { - if (!this.program) { - return void 0; - } - return this.program.getSourceFileByPath(path); - } - /** @internal */ - getSourceFileOrConfigFile(path) { - const options = this.program.getCompilerOptions(); - return path === options.configFilePath ? options.configFile : this.getSourceFile(path); - } - close() { - this.projectService.typingsCache.onProjectClosed(this); - this.closeWatchingTypingLocations(); - this.cleanupProgram(); - forEach(this.externalFiles, (externalFile) => this.detachScriptInfoIfNotRoot(externalFile)); - for (const root of this.rootFiles) { - root.detachFromProject(this); - } - this.projectService.pendingEnsureProjectForOpenFiles = true; - this.rootFiles = void 0; - this.rootFilesMap = void 0; - this.externalFiles = void 0; - this.program = void 0; - this.builderState = void 0; - this.resolutionCache.clear(); - this.resolutionCache = void 0; - this.cachedUnresolvedImportsPerFile = void 0; - this.moduleSpecifierCache = void 0; - this.directoryStructureHost = void 0; - this.exportMapCache = void 0; - this.projectErrors = void 0; - this.plugins.length = 0; - if (this.missingFilesMap) { - clearMap(this.missingFilesMap, closeFileWatcher); - this.missingFilesMap = void 0; - } - this.clearGeneratedFileWatch(); - this.clearInvalidateResolutionOfFailedLookupTimer(); - if (this.autoImportProviderHost) { - this.autoImportProviderHost.close(); - } - this.autoImportProviderHost = void 0; - if (this.noDtsResolutionProject) { - this.noDtsResolutionProject.close(); - } - this.noDtsResolutionProject = void 0; - this.languageService.dispose(); - this.languageService = void 0; - } - detachScriptInfoIfNotRoot(uncheckedFilename) { - const info = this.projectService.getScriptInfo(uncheckedFilename); - if (info && !this.isRoot(info)) { - info.detachFromProject(this); - } - } - isClosed() { - return this.rootFiles === void 0; - } - hasRoots() { - return this.rootFiles && this.rootFiles.length > 0; - } - /** @internal */ - isOrphan() { - return false; - } - getRootFiles() { - return this.rootFiles && this.rootFiles.map((info) => info.fileName); - } - /** @internal */ - getRootFilesMap() { - return this.rootFilesMap; - } - getRootScriptInfos() { - return this.rootFiles; - } - getScriptInfos() { - if (!this.languageServiceEnabled) { - return this.rootFiles; - } - return map(this.program.getSourceFiles(), (sourceFile) => { - const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.resolvedPath); - Debug.assert(!!scriptInfo, "getScriptInfo", () => `scriptInfo for a file '${sourceFile.fileName}' Path: '${sourceFile.path}' / '${sourceFile.resolvedPath}' is missing.`); - return scriptInfo; - }); - } - getExcludedFiles() { - return emptyArray2; - } - getFileNames(excludeFilesFromExternalLibraries, excludeConfigFiles) { - if (!this.program) { - return []; - } - if (!this.languageServiceEnabled) { - let rootFiles = this.getRootFiles(); - if (this.compilerOptions) { - const defaultLibrary = getDefaultLibFilePath(this.compilerOptions); - if (defaultLibrary) { - (rootFiles || (rootFiles = [])).push(asNormalizedPath(defaultLibrary)); - } - } - return rootFiles; - } - const result = []; - for (const f of this.program.getSourceFiles()) { - if (excludeFilesFromExternalLibraries && this.program.isSourceFileFromExternalLibrary(f)) { - continue; - } - result.push(asNormalizedPath(f.fileName)); - } - if (!excludeConfigFiles) { - const configFile = this.program.getCompilerOptions().configFile; - if (configFile) { - result.push(asNormalizedPath(configFile.fileName)); - if (configFile.extendedSourceFiles) { - for (const f of configFile.extendedSourceFiles) { - result.push(asNormalizedPath(f)); - } - } - } - } - return result; - } - /** @internal */ - getFileNamesWithRedirectInfo(includeProjectReferenceRedirectInfo) { - return this.getFileNames().map((fileName) => ({ - fileName, - isSourceOfProjectReferenceRedirect: includeProjectReferenceRedirectInfo && this.isSourceOfProjectReferenceRedirect(fileName) - })); - } - hasConfigFile(configFilePath) { - if (this.program && this.languageServiceEnabled) { - const configFile = this.program.getCompilerOptions().configFile; - if (configFile) { - if (configFilePath === asNormalizedPath(configFile.fileName)) { - return true; - } - if (configFile.extendedSourceFiles) { - for (const f of configFile.extendedSourceFiles) { - if (configFilePath === asNormalizedPath(f)) { - return true; - } - } - } - } - } - return false; - } - containsScriptInfo(info) { - if (this.isRoot(info)) - return true; - if (!this.program) - return false; - const file = this.program.getSourceFileByPath(info.path); - return !!file && file.resolvedPath === info.path; - } - containsFile(filename, requireOpen) { - const info = this.projectService.getScriptInfoForNormalizedPath(filename); - if (info && (info.isScriptOpen() || !requireOpen)) { - return this.containsScriptInfo(info); - } - return false; - } - isRoot(info) { - var _a; - return this.rootFilesMap && ((_a = this.rootFilesMap.get(info.path)) == null ? void 0 : _a.info) === info; - } - // add a root file to project - addRoot(info, fileName) { - Debug.assert(!this.isRoot(info)); - this.rootFiles.push(info); - this.rootFilesMap.set(info.path, { fileName: fileName || info.fileName, info }); - info.attachToProject(this); - this.markAsDirty(); - } - // add a root file that doesnt exist on host - addMissingFileRoot(fileName) { - const path = this.projectService.toPath(fileName); - this.rootFilesMap.set(path, { fileName }); - this.markAsDirty(); - } - removeFile(info, fileExists, detachFromProject) { - if (this.isRoot(info)) { - this.removeRoot(info); - } - if (fileExists) { - this.resolutionCache.removeResolutionsOfFile(info.path); - } else { - this.resolutionCache.invalidateResolutionOfFile(info.path); - } - this.cachedUnresolvedImportsPerFile.delete(info.path); - if (detachFromProject) { - info.detachFromProject(this); - } - this.markAsDirty(); - } - registerFileUpdate(fileName) { - (this.updatedFileNames || (this.updatedFileNames = /* @__PURE__ */ new Set())).add(fileName); - } - /** @internal */ - markFileAsDirty(changedFile) { - this.markAsDirty(); - if (this.exportMapCache && !this.exportMapCache.isEmpty()) { - (this.changedFilesForExportMapCache || (this.changedFilesForExportMapCache = /* @__PURE__ */ new Set())).add(changedFile); - } - } - markAsDirty() { - if (!this.dirty) { - this.projectStateVersion++; - this.dirty = true; - } - } - /** @internal */ - onAutoImportProviderSettingsChanged() { - var _a; - if (this.autoImportProviderHost === false) { - this.autoImportProviderHost = void 0; - } else { - (_a = this.autoImportProviderHost) == null ? void 0 : _a.markAsDirty(); - } - } - /** @internal */ - onPackageJsonChange(packageJsonPath) { - var _a; - if ((_a = this.packageJsonsForAutoImport) == null ? void 0 : _a.has(packageJsonPath)) { - this.moduleSpecifierCache.clear(); - if (this.autoImportProviderHost) { - this.autoImportProviderHost.markAsDirty(); - } - } - } - /** @internal */ - onFileAddedOrRemoved(isSymlink) { - this.hasAddedorRemovedFiles = true; - if (isSymlink) { - this.hasAddedOrRemovedSymlinks = true; - } - } - /** @internal */ - onDiscoveredSymlink() { - this.hasAddedOrRemovedSymlinks = true; - } - /** - * Updates set of files that contribute to this project - * @returns: true if set of files in the project stays the same and false - otherwise. - */ - updateGraph() { - var _a, _b, _c, _d, _e; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "updateGraph", { name: this.projectName, kind: ProjectKind[this.projectKind] }); - (_b = perfLogger) == null ? void 0 : _b.logStartUpdateGraph(); - this.resolutionCache.startRecordingFilesWithChangedResolutions(); - const hasNewProgram = this.updateGraphWorker(); - const hasAddedorRemovedFiles = this.hasAddedorRemovedFiles; - this.hasAddedorRemovedFiles = false; - this.hasAddedOrRemovedSymlinks = false; - const changedFiles = this.resolutionCache.finishRecordingFilesWithChangedResolutions() || emptyArray2; - for (const file of changedFiles) { - this.cachedUnresolvedImportsPerFile.delete(file); - } - if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) { - if (hasNewProgram || changedFiles.length) { - this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile); - } - this.projectService.typingsCache.enqueueInstallTypingsForProject(this, this.lastCachedUnresolvedImportsList, hasAddedorRemovedFiles); - } else { - this.lastCachedUnresolvedImportsList = void 0; - } - const isFirstProgramLoad = this.projectProgramVersion === 0 && hasNewProgram; - if (hasNewProgram) { - this.projectProgramVersion++; - } - if (hasAddedorRemovedFiles) { - if (!this.autoImportProviderHost) - this.autoImportProviderHost = void 0; - (_c = this.autoImportProviderHost) == null ? void 0 : _c.markAsDirty(); - } - if (isFirstProgramLoad) { - this.getPackageJsonAutoImportProvider(); - } - (_d = perfLogger) == null ? void 0 : _d.logStopUpdateGraph(); - (_e = tracing) == null ? void 0 : _e.pop(); - return !hasNewProgram; - } - /** @internal */ - updateTypingFiles(typingFiles) { - if (enumerateInsertsAndDeletes( - typingFiles, - this.typingFiles, - getStringComparer(!this.useCaseSensitiveFileNames()), - /*inserted*/ - noop, - (removed) => this.detachScriptInfoFromProject(removed) - )) { - this.typingFiles = typingFiles; - this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile); - this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); - } - } - /** @internal */ - closeWatchingTypingLocations() { - if (this.typingWatchers) - clearMap(this.typingWatchers, closeFileWatcher); - this.typingWatchers = void 0; - } - /** @internal */ - onTypingInstallerWatchInvoke() { - this.typingWatchers.isInvoked = true; - this.projectService.updateTypingsForProject({ projectName: this.getProjectName(), kind: ActionInvalidate }); - } - /** @internal */ - watchTypingLocations(files) { - if (!files) { - this.typingWatchers.isInvoked = false; - return; - } - if (!files.length) { - this.closeWatchingTypingLocations(); - return; - } - const toRemove = new Map(this.typingWatchers); - if (!this.typingWatchers) - this.typingWatchers = /* @__PURE__ */ new Map(); - this.typingWatchers.isInvoked = false; - const createProjectWatcher = (path, typingsWatcherType) => { - const canonicalPath = this.toPath(path); - toRemove.delete(canonicalPath); - if (!this.typingWatchers.has(canonicalPath)) { - this.typingWatchers.set( - canonicalPath, - typingsWatcherType === "FileWatcher" /* FileWatcher */ ? this.projectService.watchFactory.watchFile( - path, - () => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`), - 2e3 /* High */, - this.projectService.getWatchOptions(this), - WatchType.TypingInstallerLocationFile, - this - ) : this.projectService.watchFactory.watchDirectory( - path, - (f) => { - if (this.typingWatchers.isInvoked) - return this.writeLog(`TypingWatchers already invoked`); - if (!fileExtensionIs(f, ".json" /* Json */)) - return this.writeLog(`Ignoring files that are not *.json`); - if (comparePaths(f, combinePaths(this.projectService.typingsInstaller.globalTypingsCacheLocation, "package.json"), !this.useCaseSensitiveFileNames())) - return this.writeLog(`Ignoring package.json change at global typings location`); - this.onTypingInstallerWatchInvoke(); - }, - 1 /* Recursive */, - this.projectService.getWatchOptions(this), - WatchType.TypingInstallerLocationDirectory, - this - ) - ); - } - }; - for (const file of files) { - const basename = getBaseFileName(file); - if (basename === "package.json" || basename === "bower.json") { - createProjectWatcher(file, "FileWatcher" /* FileWatcher */); - continue; - } - if (containsPath(this.currentDirectory, file, this.currentDirectory, !this.useCaseSensitiveFileNames())) { - const subDirectory = file.indexOf(directorySeparator, this.currentDirectory.length + 1); - if (subDirectory !== -1) { - createProjectWatcher(file.substr(0, subDirectory), "DirectoryWatcher" /* DirectoryWatcher */); - } else { - createProjectWatcher(file, "DirectoryWatcher" /* DirectoryWatcher */); - } - continue; - } - if (containsPath(this.projectService.typingsInstaller.globalTypingsCacheLocation, file, this.currentDirectory, !this.useCaseSensitiveFileNames())) { - createProjectWatcher(this.projectService.typingsInstaller.globalTypingsCacheLocation, "DirectoryWatcher" /* DirectoryWatcher */); - continue; - } - createProjectWatcher(file, "DirectoryWatcher" /* DirectoryWatcher */); - } - toRemove.forEach((watch, path) => { - watch.close(); - this.typingWatchers.delete(path); - }); - } - /** @internal */ - getCurrentProgram() { - return this.program; - } - removeExistingTypings(include) { - const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this.directoryStructureHost); - return include.filter((i) => existing.indexOf(i) < 0); - } - updateGraphWorker() { - var _a, _b; - const oldProgram = this.languageService.getCurrentProgram(); - Debug.assert(oldProgram === this.program); - Debug.assert(!this.isClosed(), "Called update graph worker of closed project"); - this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`); - const start = timestamp(); - const { hasInvalidatedResolutions, hasInvalidatedLibResolutions } = this.resolutionCache.createHasInvalidatedResolutions(returnFalse, returnFalse); - this.hasInvalidatedResolutions = hasInvalidatedResolutions; - this.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions; - this.resolutionCache.startCachingPerDirectoryResolution(); - this.program = this.languageService.getProgram(); - this.dirty = false; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "finishCachingPerDirectoryResolution"); - this.resolutionCache.finishCachingPerDirectoryResolution(this.program, oldProgram); - (_b = tracing) == null ? void 0 : _b.pop(); - Debug.assert(oldProgram === void 0 || this.program !== void 0); - let hasNewProgram = false; - if (this.program && (!oldProgram || this.program !== oldProgram && this.program.structureIsReused !== 2 /* Completely */)) { - hasNewProgram = true; - if (oldProgram) { - for (const f of oldProgram.getSourceFiles()) { - const newFile = this.program.getSourceFileByPath(f.resolvedPath); - if (!newFile || f.resolvedPath === f.path && newFile.resolvedPath !== f.path) { - this.detachScriptInfoFromProject(f.fileName, !!this.program.getSourceFileByPath(f.path)); - } - } - oldProgram.forEachResolvedProjectReference((resolvedProjectReference) => { - if (!this.program.getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) { - this.detachScriptInfoFromProject(resolvedProjectReference.sourceFile.fileName); - } - }); - } - updateMissingFilePathsWatch( - this.program, - this.missingFilesMap || (this.missingFilesMap = /* @__PURE__ */ new Map()), - // Watch the missing files - (missingFilePath) => this.addMissingFileWatcher(missingFilePath) - ); - if (this.generatedFilesMap) { - const outPath = outFile(this.compilerOptions); - if (isGeneratedFileWatcher(this.generatedFilesMap)) { - if (!outPath || !this.isValidGeneratedFileWatcher( - removeFileExtension(outPath) + ".d.ts" /* Dts */, - this.generatedFilesMap - )) { - this.clearGeneratedFileWatch(); - } - } else { - if (outPath) { - this.clearGeneratedFileWatch(); - } else { - this.generatedFilesMap.forEach((watcher, source) => { - const sourceFile = this.program.getSourceFileByPath(source); - if (!sourceFile || sourceFile.resolvedPath !== source || !this.isValidGeneratedFileWatcher( - getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.currentDirectory, this.program.getCommonSourceDirectory(), this.getCanonicalFileName), - watcher - )) { - closeFileWatcherOf(watcher); - this.generatedFilesMap.delete(source); - } - }); - } - } - } - if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) { - this.resolutionCache.updateTypeRootsWatch(); - } - } - if (this.exportMapCache && !this.exportMapCache.isEmpty()) { - this.exportMapCache.releaseSymbols(); - if (this.hasAddedorRemovedFiles || oldProgram && !this.program.structureIsReused) { - this.exportMapCache.clear(); - } else if (this.changedFilesForExportMapCache && oldProgram && this.program) { - forEachKey(this.changedFilesForExportMapCache, (fileName) => { - const oldSourceFile = oldProgram.getSourceFileByPath(fileName); - const sourceFile = this.program.getSourceFileByPath(fileName); - if (!oldSourceFile || !sourceFile) { - this.exportMapCache.clear(); - return true; - } - return this.exportMapCache.onFileChanged(oldSourceFile, sourceFile, !!this.getTypeAcquisition().enable); - }); - } - } - if (this.changedFilesForExportMapCache) { - this.changedFilesForExportMapCache.clear(); - } - if (this.hasAddedOrRemovedSymlinks || this.program && !this.program.structureIsReused && this.getCompilerOptions().preserveSymlinks) { - this.symlinks = void 0; - this.moduleSpecifierCache.clear(); - } - const oldExternalFiles = this.externalFiles || emptyArray2; - this.externalFiles = this.getExternalFiles(); - enumerateInsertsAndDeletes( - this.externalFiles, - oldExternalFiles, - getStringComparer(!this.useCaseSensitiveFileNames()), - // Ensure a ScriptInfo is created for new external files. This is performed indirectly - // by the host for files in the program when the program is retrieved above but - // the program doesn't contain external files so this must be done explicitly. - (inserted) => { - const scriptInfo = this.projectService.getOrCreateScriptInfoNotOpenedByClient(inserted, this.currentDirectory, this.directoryStructureHost); - scriptInfo == null ? void 0 : scriptInfo.attachToProject(this); - }, - (removed) => this.detachScriptInfoFromProject(removed) - ); - const elapsed = timestamp() - start; - this.sendPerformanceEvent("UpdateGraph", elapsed); - this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} Version: ${this.getProjectVersion()} structureChanged: ${hasNewProgram}${this.program ? ` structureIsReused:: ${StructureIsReused[this.program.structureIsReused]}` : ""} Elapsed: ${elapsed}ms`); - if (this.projectService.logger.isTestLogger) { - if (this.program !== oldProgram) { - this.print( - /*writeProjectFileNames*/ - true, - this.hasAddedorRemovedFiles, - /*writeFileVersionAndText*/ - true - ); - } else { - this.writeLog(`Same program as before`); - } - } else if (this.hasAddedorRemovedFiles) { - this.print( - /*writeProjectFileNames*/ - true, - /*writeFileExplaination*/ - true, - /*writeFileVersionAndText*/ - false - ); - } else if (this.program !== oldProgram) { - this.writeLog(`Different program with same set of files`); - } - this.projectService.verifyDocumentRegistry(); - return hasNewProgram; - } - /** @internal */ - sendPerformanceEvent(kind, durationMs) { - this.projectService.sendPerformanceEvent(kind, durationMs); - } - detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution) { - const scriptInfoToDetach = this.projectService.getScriptInfo(uncheckedFileName); - if (scriptInfoToDetach) { - scriptInfoToDetach.detachFromProject(this); - if (!noRemoveResolution) { - this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path); - } - } - } - addMissingFileWatcher(missingFilePath) { - var _a; - if (isConfiguredProject(this)) { - const configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(missingFilePath); - if ((_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config) == null ? void 0 : _a.projects.has(this.canonicalConfigFilePath)) - return noopFileWatcher; - } - const fileWatcher = this.projectService.watchFactory.watchFile( - missingFilePath, - (fileName, eventKind) => { - if (isConfiguredProject(this)) { - this.getCachedDirectoryStructureHost().addOrDeleteFile(fileName, missingFilePath, eventKind); - } - if (eventKind === 0 /* Created */ && this.missingFilesMap.has(missingFilePath)) { - this.missingFilesMap.delete(missingFilePath); - fileWatcher.close(); - this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); - } - }, - 500 /* Medium */, - this.projectService.getWatchOptions(this), - WatchType.MissingFile, - this - ); - return fileWatcher; - } - isWatchedMissingFile(path) { - return !!this.missingFilesMap && this.missingFilesMap.has(path); - } - /** @internal */ - addGeneratedFileWatch(generatedFile, sourceFile) { - if (outFile(this.compilerOptions)) { - if (!this.generatedFilesMap) { - this.generatedFilesMap = this.createGeneratedFileWatcher(generatedFile); - } - } else { - const path = this.toPath(sourceFile); - if (this.generatedFilesMap) { - if (isGeneratedFileWatcher(this.generatedFilesMap)) { - Debug.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`); - return; - } - if (this.generatedFilesMap.has(path)) - return; - } else { - this.generatedFilesMap = /* @__PURE__ */ new Map(); - } - this.generatedFilesMap.set(path, this.createGeneratedFileWatcher(generatedFile)); - } - } - createGeneratedFileWatcher(generatedFile) { - return { - generatedFilePath: this.toPath(generatedFile), - watcher: this.projectService.watchFactory.watchFile( - generatedFile, - () => { - this.clearSourceMapperCache(); - this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); - }, - 2e3 /* High */, - this.projectService.getWatchOptions(this), - WatchType.MissingGeneratedFile, - this - ) - }; - } - isValidGeneratedFileWatcher(generateFile, watcher) { - return this.toPath(generateFile) === watcher.generatedFilePath; - } - clearGeneratedFileWatch() { - if (this.generatedFilesMap) { - if (isGeneratedFileWatcher(this.generatedFilesMap)) { - closeFileWatcherOf(this.generatedFilesMap); - } else { - clearMap(this.generatedFilesMap, closeFileWatcherOf); - } - this.generatedFilesMap = void 0; - } - } - getScriptInfoForNormalizedPath(fileName) { - const scriptInfo = this.projectService.getScriptInfoForPath(this.toPath(fileName)); - if (scriptInfo && !scriptInfo.isAttached(this)) { - return Errors.ThrowProjectDoesNotContainDocument(fileName, this); - } - return scriptInfo; - } - getScriptInfo(uncheckedFileName) { - return this.projectService.getScriptInfo(uncheckedFileName); - } - filesToString(writeProjectFileNames) { - return this.filesToStringWorker( - writeProjectFileNames, - /*writeFileExplaination*/ - true, - /*writeFileVersionAndText*/ - false - ); - } - /** @internal */ - filesToStringWorker(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) { - if (this.isInitialLoadPending()) - return " Files (0) InitialLoadPending\n"; - if (!this.program) - return " Files (0) NoProgram\n"; - const sourceFiles = this.program.getSourceFiles(); - let strBuilder = ` Files (${sourceFiles.length}) -`; - if (writeProjectFileNames) { - for (const file of sourceFiles) { - strBuilder += ` ${file.fileName}${writeFileVersionAndText ? ` ${file.version} ${JSON.stringify(file.text)}` : ""} -`; - } - if (writeFileExplaination) { - strBuilder += "\n\n"; - explainFiles(this.program, (s) => strBuilder += ` ${s} -`); - } - } - return strBuilder; - } - /** @internal */ - print(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) { - this.writeLog(`Project '${this.projectName}' (${ProjectKind[this.projectKind]})`); - this.writeLog(this.filesToStringWorker( - writeProjectFileNames && this.projectService.logger.hasLevel(3 /* verbose */), - writeFileExplaination && this.projectService.logger.hasLevel(3 /* verbose */), - writeFileVersionAndText && this.projectService.logger.hasLevel(3 /* verbose */) - )); - this.writeLog("-----------------------------------------------"); - if (this.autoImportProviderHost) { - this.autoImportProviderHost.print( - /*writeProjectFileNames*/ - false, - /*writeFileExplaination*/ - false, - /*writeFileVersionAndText*/ - false - ); - } - } - setCompilerOptions(compilerOptions) { - var _a; - if (compilerOptions) { - compilerOptions.allowNonTsExtensions = true; - const oldOptions = this.compilerOptions; - this.compilerOptions = compilerOptions; - this.setInternalCompilerOptionsForEmittingJsFiles(); - (_a = this.noDtsResolutionProject) == null ? void 0 : _a.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()); - if (changesAffectModuleResolution(oldOptions, compilerOptions)) { - this.cachedUnresolvedImportsPerFile.clear(); - this.lastCachedUnresolvedImportsList = void 0; - this.resolutionCache.onChangesAffectModuleResolution(); - this.moduleSpecifierCache.clear(); - } - this.markAsDirty(); - } - } - /** @internal */ - setWatchOptions(watchOptions) { - this.watchOptions = watchOptions; - } - /** @internal */ - getWatchOptions() { - return this.watchOptions; - } - setTypeAcquisition(newTypeAcquisition) { - if (newTypeAcquisition) { - this.typeAcquisition = this.removeLocalTypingsFromTypeAcquisition(newTypeAcquisition); - } - } - getTypeAcquisition() { - return this.typeAcquisition || {}; - } - /** @internal */ - getChangesSinceVersion(lastKnownVersion, includeProjectReferenceRedirectInfo) { - const includeProjectReferenceRedirectInfoIfRequested = includeProjectReferenceRedirectInfo ? (files) => arrayFrom(files.entries(), ([fileName, isSourceOfProjectReferenceRedirect]) => ({ - fileName, - isSourceOfProjectReferenceRedirect - })) : (files) => arrayFrom(files.keys()); - if (!this.isInitialLoadPending()) { - updateProjectIfDirty(this); - } - const info = { - projectName: this.getProjectName(), - version: this.projectProgramVersion, - isInferred: isInferredProject(this), - options: this.getCompilationSettings(), - languageServiceDisabled: !this.languageServiceEnabled, - lastFileExceededProgramSize: this.lastFileExceededProgramSize - }; - const updatedFileNames = this.updatedFileNames; - this.updatedFileNames = void 0; - if (this.lastReportedFileNames && lastKnownVersion === this.lastReportedVersion) { - if (this.projectProgramVersion === this.lastReportedVersion && !updatedFileNames) { - return { info, projectErrors: this.getGlobalProjectErrors() }; - } - const lastReportedFileNames = this.lastReportedFileNames; - const externalFiles = this.getExternalFiles().map((f) => ({ - fileName: toNormalizedPath(f), - isSourceOfProjectReferenceRedirect: false - })); - const currentFiles = arrayToMap( - this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo).concat(externalFiles), - (info2) => info2.fileName, - (info2) => info2.isSourceOfProjectReferenceRedirect - ); - const added = /* @__PURE__ */ new Map(); - const removed = /* @__PURE__ */ new Map(); - const updated = updatedFileNames ? arrayFrom(updatedFileNames.keys()) : []; - const updatedRedirects = []; - forEachEntry(currentFiles, (isSourceOfProjectReferenceRedirect, fileName) => { - if (!lastReportedFileNames.has(fileName)) { - added.set(fileName, isSourceOfProjectReferenceRedirect); - } else if (includeProjectReferenceRedirectInfo && isSourceOfProjectReferenceRedirect !== lastReportedFileNames.get(fileName)) { - updatedRedirects.push({ - fileName, - isSourceOfProjectReferenceRedirect - }); - } - }); - forEachEntry(lastReportedFileNames, (isSourceOfProjectReferenceRedirect, fileName) => { - if (!currentFiles.has(fileName)) { - removed.set(fileName, isSourceOfProjectReferenceRedirect); - } - }); - this.lastReportedFileNames = currentFiles; - this.lastReportedVersion = this.projectProgramVersion; - return { - info, - changes: { - added: includeProjectReferenceRedirectInfoIfRequested(added), - removed: includeProjectReferenceRedirectInfoIfRequested(removed), - updated: includeProjectReferenceRedirectInfo ? updated.map((fileName) => ({ - fileName, - isSourceOfProjectReferenceRedirect: this.isSourceOfProjectReferenceRedirect(fileName) - })) : updated, - updatedRedirects: includeProjectReferenceRedirectInfo ? updatedRedirects : void 0 - }, - projectErrors: this.getGlobalProjectErrors() - }; - } else { - const projectFileNames = this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo); - const externalFiles = this.getExternalFiles().map((f) => ({ - fileName: toNormalizedPath(f), - isSourceOfProjectReferenceRedirect: false - })); - const allFiles = projectFileNames.concat(externalFiles); - this.lastReportedFileNames = arrayToMap( - allFiles, - (info2) => info2.fileName, - (info2) => info2.isSourceOfProjectReferenceRedirect - ); - this.lastReportedVersion = this.projectProgramVersion; - return { - info, - files: includeProjectReferenceRedirectInfo ? allFiles : allFiles.map((f) => f.fileName), - projectErrors: this.getGlobalProjectErrors() - }; - } - } - // remove a root file from project - removeRoot(info) { - orderedRemoveItem(this.rootFiles, info); - this.rootFilesMap.delete(info.path); - } - /** @internal */ - isSourceOfProjectReferenceRedirect(fileName) { - return !!this.program && this.program.isSourceOfProjectReferenceRedirect(fileName); - } - /** @internal */ - getGlobalPluginSearchPaths() { - return [ - ...this.projectService.pluginProbeLocations, - // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ - combinePaths(this.projectService.getExecutingFilePath(), "../../..") - ]; - } - enableGlobalPlugins(options) { - if (!this.projectService.globalPlugins.length) - return; - const host = this.projectService.host; - if (!host.require && !host.importPlugin) { - this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); - return; - } - const searchPaths = this.getGlobalPluginSearchPaths(); - for (const globalPluginName of this.projectService.globalPlugins) { - if (!globalPluginName) - continue; - if (options.plugins && options.plugins.some((p) => p.name === globalPluginName)) - continue; - this.projectService.logger.info(`Loading global plugin ${globalPluginName}`); - this.enablePlugin({ name: globalPluginName, global: true }, searchPaths); - } - } - enablePlugin(pluginConfigEntry, searchPaths) { - this.projectService.requestEnablePlugin(this, pluginConfigEntry, searchPaths); - } - /** @internal */ - enableProxy(pluginModuleFactory, configEntry) { - try { - if (typeof pluginModuleFactory !== "function") { - this.projectService.logger.info(`Skipped loading plugin ${configEntry.name} because it did not expose a proper factory function`); - return; - } - const info = { - config: configEntry, - project: this, - languageService: this.languageService, - languageServiceHost: this, - serverHost: this.projectService.host, - session: this.projectService.session - }; - const pluginModule = pluginModuleFactory({ typescript: ts_exports2 }); - const newLS = pluginModule.create(info); - for (const k of Object.keys(this.languageService)) { - if (!(k in newLS)) { - this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${k} in created LS. Patching.`); - newLS[k] = this.languageService[k]; - } - } - this.projectService.logger.info(`Plugin validation succeeded`); - this.languageService = newLS; - this.plugins.push({ name: configEntry.name, module: pluginModule }); - } catch (e) { - this.projectService.logger.info(`Plugin activation failed: ${e}`); - } - } - /** @internal */ - onPluginConfigurationChanged(pluginName, configuration) { - this.plugins.filter((plugin) => plugin.name === pluginName).forEach((plugin) => { - if (plugin.module.onConfigurationChanged) { - plugin.module.onConfigurationChanged(configuration); - } - }); - } - /** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */ - refreshDiagnostics() { - this.projectService.sendProjectsUpdatedInBackgroundEvent(); - } - /** @internal */ - getPackageJsonsVisibleToFile(fileName, rootDir) { - if (this.projectService.serverMode !== 0 /* Semantic */) - return emptyArray2; - return this.projectService.getPackageJsonsVisibleToFile(fileName, rootDir); - } - /** @internal */ - getNearestAncestorDirectoryWithPackageJson(fileName) { - return this.projectService.getNearestAncestorDirectoryWithPackageJson(fileName); - } - /** @internal */ - getPackageJsonsForAutoImport(rootDir) { - const packageJsons = this.getPackageJsonsVisibleToFile(combinePaths(this.currentDirectory, inferredTypesContainingFile), rootDir); - this.packageJsonsForAutoImport = new Set(packageJsons.map((p) => p.fileName)); - return packageJsons; - } - /** @internal */ - getPackageJsonCache() { - return this.projectService.packageJsonCache; - } - /** @internal */ - getCachedExportInfoMap() { - return this.exportMapCache || (this.exportMapCache = createCacheableExportInfoMap(this)); - } - /** @internal */ - clearCachedExportInfoMap() { - var _a; - (_a = this.exportMapCache) == null ? void 0 : _a.clear(); - } - /** @internal */ - getModuleSpecifierCache() { - return this.moduleSpecifierCache; - } - /** @internal */ - includePackageJsonAutoImports() { - if (this.projectService.includePackageJsonAutoImports() === 0 /* Off */ || !this.languageServiceEnabled || isInsideNodeModules(this.currentDirectory) || !this.isDefaultProjectForOpenFiles()) { - return 0 /* Off */; - } - return this.projectService.includePackageJsonAutoImports(); - } - /** @internal */ - getHostForAutoImportProvider() { - var _a, _b; - if (this.program) { - return { - fileExists: this.program.fileExists, - directoryExists: this.program.directoryExists, - realpath: this.program.realpath || ((_a = this.projectService.host.realpath) == null ? void 0 : _a.bind(this.projectService.host)), - getCurrentDirectory: this.getCurrentDirectory.bind(this), - readFile: this.projectService.host.readFile.bind(this.projectService.host), - getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host), - trace: (_b = this.projectService.host.trace) == null ? void 0 : _b.bind(this.projectService.host), - useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(), - readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host) - }; - } - return this.projectService.host; - } - /** @internal */ - getPackageJsonAutoImportProvider() { - var _a, _b, _c; - if (this.autoImportProviderHost === false) { - return void 0; - } - if (this.projectService.serverMode !== 0 /* Semantic */) { - this.autoImportProviderHost = false; - return void 0; - } - if (this.autoImportProviderHost) { - updateProjectIfDirty(this.autoImportProviderHost); - if (this.autoImportProviderHost.isEmpty()) { - this.autoImportProviderHost.close(); - this.autoImportProviderHost = void 0; - return void 0; - } - return this.autoImportProviderHost.getCurrentProgram(); - } - const dependencySelection = this.includePackageJsonAutoImports(); - if (dependencySelection) { - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getPackageJsonAutoImportProvider"); - const start = timestamp(); - this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getHostForAutoImportProvider(), this.documentRegistry); - if (this.autoImportProviderHost) { - updateProjectIfDirty(this.autoImportProviderHost); - this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", timestamp() - start); - (_b = tracing) == null ? void 0 : _b.pop(); - return this.autoImportProviderHost.getCurrentProgram(); - } - (_c = tracing) == null ? void 0 : _c.pop(); - } - } - /** @internal */ - isDefaultProjectForOpenFiles() { - return !!forEachEntry( - this.projectService.openFiles, - (_, fileName) => this.projectService.tryGetDefaultProjectForFile(toNormalizedPath(fileName)) === this - ); - } - /** @internal */ - watchNodeModulesForPackageJsonChanges(directoryPath) { - return this.projectService.watchPackageJsonsInNodeModules(this.toPath(directoryPath), this); - } - /** @internal */ - getIncompleteCompletionsCache() { - return this.projectService.getIncompleteCompletionsCache(); - } - /** @internal */ - getNoDtsResolutionProject(rootFileNames) { - Debug.assert(this.projectService.serverMode === 0 /* Semantic */); - if (!this.noDtsResolutionProject) { - this.noDtsResolutionProject = new AuxiliaryProject(this.projectService, this.documentRegistry, this.getCompilerOptionsForNoDtsResolutionProject(), this.currentDirectory); - } - enumerateInsertsAndDeletes( - rootFileNames.map(toNormalizedPath), - this.noDtsResolutionProject.getRootFiles(), - getStringComparer(!this.useCaseSensitiveFileNames()), - (pathToAdd) => { - const info = this.projectService.getOrCreateScriptInfoNotOpenedByClient( - pathToAdd, - this.currentDirectory, - this.noDtsResolutionProject.directoryStructureHost - ); - if (info) { - this.noDtsResolutionProject.addRoot(info, pathToAdd); - } - }, - (pathToRemove) => { - const info = this.noDtsResolutionProject.getScriptInfo(pathToRemove); - if (info) { - this.noDtsResolutionProject.removeRoot(info); - } - } - ); - return this.noDtsResolutionProject; - } - /** @internal */ - getCompilerOptionsForNoDtsResolutionProject() { - return { - ...this.getCompilerOptions(), - noDtsResolution: true, - allowJs: true, - maxNodeModuleJsDepth: 3, - diagnostics: false, - skipLibCheck: true, - sourceMap: false, - types: emptyArray, - lib: emptyArray, - noLib: true - }; - } - }; - InferredProject2 = class extends Project3 { - /** @internal */ - constructor(projectService, documentRegistry, compilerOptions, watchOptions, projectRootPath, currentDirectory, typeAcquisition) { - super( - projectService.newInferredProjectName(), - 0 /* Inferred */, - projectService, - documentRegistry, - // TODO: GH#18217 - /*files*/ - void 0, - /*lastFileExceededProgramSize*/ - void 0, - compilerOptions, - /*compileOnSaveEnabled*/ - false, - watchOptions, - projectService.host, - currentDirectory - ); - this._isJsInferredProject = false; - this.typeAcquisition = typeAcquisition; - this.projectRootPath = projectRootPath && projectService.toCanonicalFileName(projectRootPath); - if (!projectRootPath && !projectService.useSingleInferredProject) { - this.canonicalCurrentDirectory = projectService.toCanonicalFileName(this.currentDirectory); - } - this.enableGlobalPlugins(this.getCompilerOptions()); - } - toggleJsInferredProject(isJsInferredProject) { - if (isJsInferredProject !== this._isJsInferredProject) { - this._isJsInferredProject = isJsInferredProject; - this.setCompilerOptions(); - } - } - setCompilerOptions(options) { - if (!options && !this.getCompilationSettings()) { - return; - } - const newOptions = cloneCompilerOptions(options || this.getCompilationSettings()); - if (this._isJsInferredProject && typeof newOptions.maxNodeModuleJsDepth !== "number") { - newOptions.maxNodeModuleJsDepth = 2; - } else if (!this._isJsInferredProject) { - newOptions.maxNodeModuleJsDepth = void 0; - } - newOptions.allowJs = true; - super.setCompilerOptions(newOptions); - } - addRoot(info) { - Debug.assert(info.isScriptOpen()); - this.projectService.startWatchingConfigFilesForInferredProjectRoot(info); - if (!this._isJsInferredProject && info.isJavaScript()) { - this.toggleJsInferredProject( - /*isJsInferredProject*/ - true - ); - } else if (this.isOrphan() && this._isJsInferredProject && !info.isJavaScript()) { - this.toggleJsInferredProject( - /*isJsInferredProject*/ - false - ); - } - super.addRoot(info); - } - removeRoot(info) { - this.projectService.stopWatchingConfigFilesForInferredProjectRoot(info); - super.removeRoot(info); - if (!this.isOrphan() && this._isJsInferredProject && info.isJavaScript()) { - if (every(this.getRootScriptInfos(), (rootInfo) => !rootInfo.isJavaScript())) { - this.toggleJsInferredProject( - /*isJsInferredProject*/ - false - ); - } - } - } - /** @internal */ - isOrphan() { - return !this.hasRoots(); - } - isProjectWithSingleRoot() { - return !this.projectRootPath && !this.projectService.useSingleInferredProject || this.getRootScriptInfos().length === 1; - } - close() { - forEach(this.getRootScriptInfos(), (info) => this.projectService.stopWatchingConfigFilesForInferredProjectRoot(info)); - super.close(); - } - getTypeAcquisition() { - return this.typeAcquisition || { - enable: allRootFilesAreJsOrDts(this), - include: emptyArray, - exclude: emptyArray - }; - } - }; - AuxiliaryProject = class extends Project3 { - constructor(projectService, documentRegistry, compilerOptions, currentDirectory) { - super( - projectService.newAuxiliaryProjectName(), - 4 /* Auxiliary */, - projectService, - documentRegistry, - /*hasExplicitListOfFiles*/ - false, - /*lastFileExceededProgramSize*/ - void 0, - compilerOptions, - /*compileOnSaveEnabled*/ - false, - /*watchOptions*/ - void 0, - projectService.host, - currentDirectory - ); - } - isOrphan() { - return true; - } - scheduleInvalidateResolutionsOfFailedLookupLocations() { - return; - } - }; - _AutoImportProviderProject = class _AutoImportProviderProject extends Project3 { - /** @internal */ - constructor(hostProject, initialRootNames, documentRegistry, compilerOptions) { - super( - hostProject.projectService.newAutoImportProviderProjectName(), - 3 /* AutoImportProvider */, - hostProject.projectService, - documentRegistry, - /*hasExplicitListOfFiles*/ - false, - /*lastFileExceededProgramSize*/ - void 0, - compilerOptions, - /*compileOnSaveEnabled*/ - false, - hostProject.getWatchOptions(), - hostProject.projectService.host, - hostProject.currentDirectory - ); - this.hostProject = hostProject; - this.rootFileNames = initialRootNames; - this.useSourceOfProjectReferenceRedirect = maybeBind(this.hostProject, this.hostProject.useSourceOfProjectReferenceRedirect); - this.getParsedCommandLine = maybeBind(this.hostProject, this.hostProject.getParsedCommandLine); - } - /** @internal */ - static getRootFileNames(dependencySelection, hostProject, host, compilerOptions) { - var _a, _b; - if (!dependencySelection) { - return emptyArray; - } - const program = hostProject.getCurrentProgram(); - if (!program) { - return emptyArray; - } - const start = timestamp(); - let dependencyNames; - let rootNames; - const rootFileName = combinePaths(hostProject.currentDirectory, inferredTypesContainingFile); - const packageJsons = hostProject.getPackageJsonsForAutoImport(combinePaths(hostProject.currentDirectory, rootFileName)); - for (const packageJson of packageJsons) { - (_a = packageJson.dependencies) == null ? void 0 : _a.forEach((_, dependenyName) => addDependency(dependenyName)); - (_b = packageJson.peerDependencies) == null ? void 0 : _b.forEach((_, dependencyName) => addDependency(dependencyName)); - } - let dependenciesAdded = 0; - if (dependencyNames) { - const symlinkCache = hostProject.getSymlinkCache(); - for (const name of arrayFrom(dependencyNames.keys())) { - if (dependencySelection === 2 /* Auto */ && dependenciesAdded > this.maxDependencies) { - hostProject.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`); - return emptyArray; - } - const packageJson = resolvePackageNameToPackageJson( - name, - hostProject.currentDirectory, - compilerOptions, - host, - program.getModuleResolutionCache() - ); - if (packageJson) { - const entrypoints = getRootNamesFromPackageJson(packageJson, program, symlinkCache); - if (entrypoints) { - rootNames = concatenate(rootNames, entrypoints); - dependenciesAdded += entrypoints.length ? 1 : 0; - continue; - } - } - const done = forEach([hostProject.currentDirectory, hostProject.getGlobalTypingsCacheLocation()], (directory) => { - if (directory) { - const typesPackageJson = resolvePackageNameToPackageJson( - `@types/${name}`, - directory, - compilerOptions, - host, - program.getModuleResolutionCache() - ); - if (typesPackageJson) { - const entrypoints = getRootNamesFromPackageJson(typesPackageJson, program, symlinkCache); - rootNames = concatenate(rootNames, entrypoints); - dependenciesAdded += (entrypoints == null ? void 0 : entrypoints.length) ? 1 : 0; - return true; - } - } - }); - if (done) - continue; - if (packageJson && compilerOptions.allowJs && compilerOptions.maxNodeModuleJsDepth) { - const entrypoints = getRootNamesFromPackageJson( - packageJson, - program, - symlinkCache, - /*resolveJs*/ - true - ); - rootNames = concatenate(rootNames, entrypoints); - dependenciesAdded += (entrypoints == null ? void 0 : entrypoints.length) ? 1 : 0; - } - } - } - if (rootNames == null ? void 0 : rootNames.length) { - hostProject.log(`AutoImportProviderProject: found ${rootNames.length} root files in ${dependenciesAdded} dependencies in ${timestamp() - start} ms`); - } - return rootNames || emptyArray; - function addDependency(dependency) { - if (!startsWith(dependency, "@types/")) { - (dependencyNames || (dependencyNames = /* @__PURE__ */ new Set())).add(dependency); - } - } - function getRootNamesFromPackageJson(packageJson, program2, symlinkCache, resolveJs) { - var _a2; - const entrypoints = getEntrypointsFromPackageJsonInfo( - packageJson, - compilerOptions, - host, - program2.getModuleResolutionCache(), - resolveJs - ); - if (entrypoints) { - const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory); - const isSymlink = real && real !== packageJson.packageDirectory; - if (isSymlink) { - symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, { - real, - realPath: hostProject.toPath(real) - }); - } - return mapDefined(entrypoints, (entrypoint) => { - const resolvedFileName = isSymlink ? entrypoint.replace(packageJson.packageDirectory, real) : entrypoint; - if (!program2.getSourceFile(resolvedFileName) && !(isSymlink && program2.getSourceFile(entrypoint))) { - return resolvedFileName; - } - }); - } - } - } - /** @internal */ - static create(dependencySelection, hostProject, host, documentRegistry) { - if (dependencySelection === 0 /* Off */) { - return void 0; - } - const compilerOptions = { - ...hostProject.getCompilerOptions(), - ...this.compilerOptionsOverrides - }; - const rootNames = this.getRootFileNames(dependencySelection, hostProject, host, compilerOptions); - if (!rootNames.length) { - return void 0; - } - return new _AutoImportProviderProject(hostProject, rootNames, documentRegistry, compilerOptions); - } - /** @internal */ - isEmpty() { - return !some(this.rootFileNames); - } - isOrphan() { - return true; - } - updateGraph() { - let rootFileNames = this.rootFileNames; - if (!rootFileNames) { - rootFileNames = _AutoImportProviderProject.getRootFileNames( - this.hostProject.includePackageJsonAutoImports(), - this.hostProject, - this.hostProject.getHostForAutoImportProvider(), - this.getCompilationSettings() - ); - } - this.projectService.setFileNamesOfAutoImportProviderProject(this, rootFileNames); - this.rootFileNames = rootFileNames; - const oldProgram = this.getCurrentProgram(); - const hasSameSetOfFiles = super.updateGraph(); - if (oldProgram && oldProgram !== this.getCurrentProgram()) { - this.hostProject.clearCachedExportInfoMap(); - } - return hasSameSetOfFiles; - } - /** @internal */ - scheduleInvalidateResolutionsOfFailedLookupLocations() { - return; - } - hasRoots() { - var _a; - return !!((_a = this.rootFileNames) == null ? void 0 : _a.length); - } - markAsDirty() { - this.rootFileNames = void 0; - super.markAsDirty(); - } - getScriptFileNames() { - return this.rootFileNames || emptyArray; - } - getLanguageService() { - throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`."); - } - /** @internal */ - onAutoImportProviderSettingsChanged() { - throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead."); - } - /** @internal */ - onPackageJsonChange() { - throw new Error("package.json changes should be notified on an AutoImportProvider's host project"); - } - getHostForAutoImportProvider() { - throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead."); - } - getProjectReferences() { - return this.hostProject.getProjectReferences(); - } - /** @internal */ - includePackageJsonAutoImports() { - return 0 /* Off */; - } - getTypeAcquisition() { - return { enable: false }; - } - /** @internal */ - getSymlinkCache() { - return this.hostProject.getSymlinkCache(); - } - /** @internal */ - getModuleResolutionCache() { - var _a; - return (_a = this.hostProject.getCurrentProgram()) == null ? void 0 : _a.getModuleResolutionCache(); - } - }; - /** @internal */ - _AutoImportProviderProject.maxDependencies = 10; - /** @internal */ - _AutoImportProviderProject.compilerOptionsOverrides = { - diagnostics: false, - skipLibCheck: true, - sourceMap: false, - types: emptyArray, - lib: emptyArray, - noLib: true - }; - AutoImportProviderProject = _AutoImportProviderProject; - ConfiguredProject2 = class extends Project3 { - /** @internal */ - constructor(configFileName, canonicalConfigFilePath, projectService, documentRegistry, cachedDirectoryStructureHost) { - super( - configFileName, - 1 /* Configured */, - projectService, - documentRegistry, - /*hasExplicitListOfFiles*/ - false, - /*lastFileExceededProgramSize*/ - void 0, - /*compilerOptions*/ - {}, - /*compileOnSaveEnabled*/ - false, - /*watchOptions*/ - void 0, - cachedDirectoryStructureHost, - getDirectoryPath(configFileName) - ); - this.canonicalConfigFilePath = canonicalConfigFilePath; - /** @internal */ - this.openFileWatchTriggered = /* @__PURE__ */ new Map(); - /** @internal */ - this.canConfigFileJsonReportNoInputFiles = false; - /** Ref count to the project when opened from external project */ - this.externalProjectRefCount = 0; - /** @internal */ - this.isInitialLoadPending = returnTrue; - /** @internal */ - this.sendLoadingProjectFinish = false; - } - /** @internal */ - setCompilerHost(host) { - this.compilerHost = host; - } - /** @internal */ - getCompilerHost() { - return this.compilerHost; - } - /** @internal */ - useSourceOfProjectReferenceRedirect() { - return this.languageServiceEnabled; - } - /** @internal */ - getParsedCommandLine(fileName) { - const configFileName = asNormalizedPath(normalizePath(fileName)); - const canonicalConfigFilePath = asNormalizedPath(this.projectService.toCanonicalFileName(configFileName)); - let configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (!configFileExistenceInfo) { - this.projectService.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo = { exists: this.projectService.host.fileExists(configFileName) }); - } - this.projectService.ensureParsedConfigUptoDate(configFileName, canonicalConfigFilePath, configFileExistenceInfo, this); - if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) { - this.projectService.watchWildcards(configFileName, configFileExistenceInfo, this); - } - return configFileExistenceInfo.exists ? configFileExistenceInfo.config.parsedCommandLine : void 0; - } - /** @internal */ - onReleaseParsedCommandLine(fileName) { - this.releaseParsedConfig(asNormalizedPath(this.projectService.toCanonicalFileName(asNormalizedPath(normalizePath(fileName))))); - } - /** @internal */ - releaseParsedConfig(canonicalConfigFilePath) { - this.projectService.stopWatchingWildCards(canonicalConfigFilePath, this); - this.projectService.releaseParsedConfig(canonicalConfigFilePath, this); - } - /** - * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph - * @returns: true if set of files in the project stays the same and false - otherwise. - */ - updateGraph() { - const isInitialLoad = this.isInitialLoadPending(); - this.isInitialLoadPending = returnFalse; - const reloadLevel = this.pendingReload; - this.pendingReload = 0 /* None */; - let result; - switch (reloadLevel) { - case 1 /* Partial */: - this.openFileWatchTriggered.clear(); - result = this.projectService.reloadFileNamesOfConfiguredProject(this); - break; - case 2 /* Full */: - this.openFileWatchTriggered.clear(); - const reason = Debug.checkDefined(this.pendingReloadReason); - this.pendingReloadReason = void 0; - this.projectService.reloadConfiguredProject( - this, - reason, - isInitialLoad, - /*clearSemanticCache*/ - false - ); - result = true; - break; - default: - result = super.updateGraph(); - } - this.compilerHost = void 0; - this.projectService.sendProjectLoadingFinishEvent(this); - this.projectService.sendProjectTelemetry(this); - return result; - } - /** @internal */ - getCachedDirectoryStructureHost() { - return this.directoryStructureHost; - } - getConfigFilePath() { - return asNormalizedPath(this.getProjectName()); - } - getProjectReferences() { - return this.projectReferences; - } - updateReferences(refs) { - this.projectReferences = refs; - this.potentialProjectReferences = void 0; - } - /** @internal */ - setPotentialProjectReference(canonicalConfigPath) { - Debug.assert(this.isInitialLoadPending()); - (this.potentialProjectReferences || (this.potentialProjectReferences = /* @__PURE__ */ new Set())).add(canonicalConfigPath); - } - /** @internal */ - getResolvedProjectReferenceToRedirect(fileName) { - const program = this.getCurrentProgram(); - return program && program.getResolvedProjectReferenceToRedirect(fileName); - } - /** @internal */ - forEachResolvedProjectReference(cb) { - var _a; - return (_a = this.getCurrentProgram()) == null ? void 0 : _a.forEachResolvedProjectReference(cb); - } - /** @internal */ - enablePluginsWithOptions(options) { - var _a; - this.plugins.length = 0; - if (!((_a = options.plugins) == null ? void 0 : _a.length) && !this.projectService.globalPlugins.length) - return; - const host = this.projectService.host; - if (!host.require && !host.importPlugin) { - this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); - return; - } - const searchPaths = this.getGlobalPluginSearchPaths(); - if (this.projectService.allowLocalPluginLoads) { - const local = getDirectoryPath(this.canonicalConfigFilePath); - this.projectService.logger.info(`Local plugin loading enabled; adding ${local} to search paths`); - searchPaths.unshift(local); - } - if (options.plugins) { - for (const pluginConfigEntry of options.plugins) { - this.enablePlugin(pluginConfigEntry, searchPaths); - } - } - return this.enableGlobalPlugins(options); - } - /** - * Get the errors that dont have any file name associated - */ - getGlobalProjectErrors() { - return filter(this.projectErrors, (diagnostic) => !diagnostic.file) || emptyArray2; - } - /** - * Get all the project errors - */ - getAllProjectErrors() { - return this.projectErrors || emptyArray2; - } - setProjectErrors(projectErrors) { - this.projectErrors = projectErrors; - } - close() { - this.projectService.configFileExistenceInfoCache.forEach((_configFileExistenceInfo, canonicalConfigFilePath) => this.releaseParsedConfig(canonicalConfigFilePath)); - this.projectErrors = void 0; - this.openFileWatchTriggered.clear(); - this.compilerHost = void 0; - super.close(); - } - /** @internal */ - addExternalProjectReference() { - this.externalProjectRefCount++; - } - /** @internal */ - deleteExternalProjectReference() { - this.externalProjectRefCount--; - } - /** @internal */ - isSolution() { - return this.getRootFilesMap().size === 0 && !this.canConfigFileJsonReportNoInputFiles; - } - /** - * Find the configured project from the project references in project which contains the info directly - * - * @internal - */ - getDefaultChildProjectFromProjectWithReferences(info) { - return forEachResolvedProjectReferenceProject( - this, - info.path, - (child) => projectContainsInfoDirectly(child, info) ? child : void 0, - 0 /* Find */ - ); - } - /** - * Returns true if the project is needed by any of the open script info/external project - * - * @internal - */ - hasOpenRef() { - var _a; - if (!!this.externalProjectRefCount) { - return true; - } - if (this.isClosed()) { - return false; - } - const configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(this.canonicalConfigFilePath); - if (this.projectService.hasPendingProjectUpdate(this)) { - return !!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.size); - } - return !!configFileExistenceInfo.openFilesImpactedByConfigFile && forEachEntry( - configFileExistenceInfo.openFilesImpactedByConfigFile, - (_value, infoPath) => { - const info = this.projectService.getScriptInfoForPath(infoPath); - return this.containsScriptInfo(info) || !!forEachResolvedProjectReferenceProject( - this, - info.path, - (child) => child.containsScriptInfo(info), - 0 /* Find */ - ); - } - ) || false; - } - /** @internal */ - hasExternalProjectRef() { - return !!this.externalProjectRefCount; - } - getEffectiveTypeRoots() { - return getEffectiveTypeRoots(this.getCompilationSettings(), this) || []; - } - /** @internal */ - updateErrorOnNoInputFiles(fileNames) { - updateErrorForNoInputFiles(fileNames, this.getConfigFilePath(), this.getCompilerOptions().configFile.configFileSpecs, this.projectErrors, this.canConfigFileJsonReportNoInputFiles); - } - }; - ExternalProject2 = class extends Project3 { - /** @internal */ - constructor(externalProjectName, projectService, documentRegistry, compilerOptions, lastFileExceededProgramSize, compileOnSaveEnabled, projectFilePath, watchOptions) { - super( - externalProjectName, - 2 /* External */, - projectService, - documentRegistry, - /*hasExplicitListOfFiles*/ - true, - lastFileExceededProgramSize, - compilerOptions, - compileOnSaveEnabled, - watchOptions, - projectService.host, - getDirectoryPath(projectFilePath || normalizeSlashes(externalProjectName)) - ); - this.externalProjectName = externalProjectName; - this.compileOnSaveEnabled = compileOnSaveEnabled; - this.excludedFiles = []; - this.enableGlobalPlugins(this.getCompilerOptions()); - } - updateGraph() { - const result = super.updateGraph(); - this.projectService.sendProjectTelemetry(this); - return result; - } - getExcludedFiles() { - return this.excludedFiles; - } - }; - } - }); - - // src/server/editorServices.ts - function prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) { - const map2 = /* @__PURE__ */ new Map(); - for (const option of commandLineOptions) { - if (typeof option.type === "object") { - const optionMap = option.type; - optionMap.forEach((value) => { - Debug.assert(typeof value === "number"); - }); - map2.set(option.name, optionMap); - } - } - return map2; - } - function convertFormatOptions(protocolOptions) { - if (isString(protocolOptions.indentStyle)) { - protocolOptions.indentStyle = indentStyle.get(protocolOptions.indentStyle.toLowerCase()); - Debug.assert(protocolOptions.indentStyle !== void 0); - } - return protocolOptions; - } - function convertCompilerOptions(protocolOptions) { - compilerOptionConverters.forEach((mappedValues, id) => { - const propertyValue = protocolOptions[id]; - if (isString(propertyValue)) { - protocolOptions[id] = mappedValues.get(propertyValue.toLowerCase()); - } - }); - return protocolOptions; - } - function convertWatchOptions(protocolOptions, currentDirectory) { - let watchOptions; - let errors; - optionsForWatch.forEach((option) => { - const propertyValue = protocolOptions[option.name]; - if (propertyValue === void 0) - return; - const mappedValues = watchOptionsConverters.get(option.name); - (watchOptions || (watchOptions = {}))[option.name] = mappedValues ? isString(propertyValue) ? mappedValues.get(propertyValue.toLowerCase()) : propertyValue : convertJsonOption(option, propertyValue, currentDirectory || "", errors || (errors = [])); - }); - return watchOptions && { watchOptions, errors }; - } - function convertTypeAcquisition(protocolOptions) { - let result; - typeAcquisitionDeclarations.forEach((option) => { - const propertyValue = protocolOptions[option.name]; - if (propertyValue === void 0) - return; - (result || (result = {}))[option.name] = propertyValue; - }); - return result; - } - function tryConvertScriptKindName(scriptKindName) { - return isString(scriptKindName) ? convertScriptKindName(scriptKindName) : scriptKindName; - } - function convertScriptKindName(scriptKindName) { - switch (scriptKindName) { - case "JS": - return 1 /* JS */; - case "JSX": - return 2 /* JSX */; - case "TS": - return 3 /* TS */; - case "TSX": - return 4 /* TSX */; - default: - return 0 /* Unknown */; - } - } - function convertUserPreferences(preferences) { - const { lazyConfiguredProjectsFromExternalProject, ...userPreferences } = preferences; - return userPreferences; - } - function findProjectByName(projectName, projects) { - for (const proj of projects) { - if (proj.getProjectName() === projectName) { - return proj; - } - } - } - function isOpenScriptInfo(infoOrFileNameOrConfig) { - return !!infoOrFileNameOrConfig.containingProjects; - } - function isAncestorConfigFileInfo(infoOrFileNameOrConfig) { - return !!infoOrFileNameOrConfig.configFileInfo; - } - function forEachResolvedProjectReferenceProject(project, fileName, cb, projectReferenceProjectLoadKind, reason) { - var _a; - const resolvedRefs = (_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(); - if (!resolvedRefs) - return void 0; - let seenResolvedRefs; - const possibleDefaultRef = fileName ? project.getResolvedProjectReferenceToRedirect(fileName) : void 0; - if (possibleDefaultRef) { - const configFileName = toNormalizedPath(possibleDefaultRef.sourceFile.fileName); - const child = project.projectService.findConfiguredProjectByProjectName(configFileName); - if (child) { - const result = cb(child); - if (result) - return result; - } else if (projectReferenceProjectLoadKind !== 0 /* Find */) { - seenResolvedRefs = /* @__PURE__ */ new Map(); - const result = forEachResolvedProjectReferenceProjectWorker( - resolvedRefs, - project.getCompilerOptions(), - (ref, loadKind) => possibleDefaultRef === ref ? callback(ref, loadKind) : void 0, - projectReferenceProjectLoadKind, - project.projectService, - seenResolvedRefs - ); - if (result) - return result; - seenResolvedRefs.clear(); - } - } - return forEachResolvedProjectReferenceProjectWorker( - resolvedRefs, - project.getCompilerOptions(), - (ref, loadKind) => possibleDefaultRef !== ref ? callback(ref, loadKind) : void 0, - projectReferenceProjectLoadKind, - project.projectService, - seenResolvedRefs - ); - function callback(ref, loadKind) { - const configFileName = toNormalizedPath(ref.sourceFile.fileName); - const child = project.projectService.findConfiguredProjectByProjectName(configFileName) || (loadKind === 0 /* Find */ ? void 0 : loadKind === 1 /* FindCreate */ ? project.projectService.createConfiguredProject(configFileName) : loadKind === 2 /* FindCreateLoad */ ? project.projectService.createAndLoadConfiguredProject(configFileName, reason) : Debug.assertNever(loadKind)); - return child && cb(child); - } - } - function forEachResolvedProjectReferenceProjectWorker(resolvedProjectReferences, parentOptions, cb, projectReferenceProjectLoadKind, projectService, seenResolvedRefs) { - const loadKind = parentOptions.disableReferencedProjectLoad ? 0 /* Find */ : projectReferenceProjectLoadKind; - return forEach(resolvedProjectReferences, (ref) => { - if (!ref) - return void 0; - const configFileName = toNormalizedPath(ref.sourceFile.fileName); - const canonicalPath = projectService.toCanonicalFileName(configFileName); - const seenValue = seenResolvedRefs == null ? void 0 : seenResolvedRefs.get(canonicalPath); - if (seenValue !== void 0 && seenValue >= loadKind) { - return void 0; - } - const result = cb(ref, loadKind); - if (result) { - return result; - } - (seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Map())).set(canonicalPath, loadKind); - return ref.references && forEachResolvedProjectReferenceProjectWorker(ref.references, ref.commandLine.options, cb, loadKind, projectService, seenResolvedRefs); - }); - } - function forEachPotentialProjectReference(project, cb) { - return project.potentialProjectReferences && forEachKey(project.potentialProjectReferences, cb); - } - function forEachAnyProjectReferenceKind(project, cb, cbProjectRef, cbPotentialProjectRef) { - return project.getCurrentProgram() ? project.forEachResolvedProjectReference(cb) : project.isInitialLoadPending() ? forEachPotentialProjectReference(project, cbPotentialProjectRef) : forEach(project.getProjectReferences(), cbProjectRef); - } - function callbackRefProject(project, cb, refPath) { - const refProject = refPath && project.projectService.configuredProjects.get(refPath); - return refProject && cb(refProject); - } - function forEachReferencedProject(project, cb) { - return forEachAnyProjectReferenceKind( - project, - (resolvedRef) => callbackRefProject(project, cb, resolvedRef.sourceFile.path), - (projectRef) => callbackRefProject(project, cb, project.toPath(resolveProjectReferencePath(projectRef))), - (potentialProjectRef) => callbackRefProject(project, cb, potentialProjectRef) - ); - } - function getDetailWatchInfo(watchType, project) { - return `${isString(project) ? `Config: ${project} ` : project ? `Project: ${project.getProjectName()} ` : ""}WatchType: ${watchType}`; - } - function isScriptInfoWatchedFromNodeModules(info) { - return !info.isScriptOpen() && info.mTime !== void 0; - } - function projectContainsInfoDirectly(project, info) { - return project.containsScriptInfo(info) && !project.isSourceOfProjectReferenceRedirect(info.path); - } - function updateProjectIfDirty(project) { - project.invalidateResolutionsOfFailedLookupLocations(); - return project.dirty && project.updateGraph(); - } - function setProjectOptionsUsed(project) { - if (isConfiguredProject(project)) { - project.projectOptions = true; - } - } - function createProjectNameFactoryWithCounter(nameFactory) { - let nextId = 1; - return () => nameFactory(nextId++); - } - function createIncompleteCompletionsCache() { - let info; - return { - get() { - return info; - }, - set(newInfo) { - info = newInfo; - }, - clear() { - info = void 0; - } - }; - } - function isConfigFile(config) { - return config.kind !== void 0; - } - function printProjectWithoutFileNames(project) { - project.print( - /*writeProjectFileNames*/ - false, - /*writeFileExplaination*/ - false, - /*writeFileVersionAndText*/ - false - ); - } - var maxProgramSizeForNonTsFiles, maxFileSize, ProjectsUpdatedInBackgroundEvent, ProjectLoadingStartEvent, ProjectLoadingFinishEvent, LargeFileReferencedEvent, ConfigFileDiagEvent, ProjectLanguageServiceStateEvent, ProjectInfoTelemetryEvent, OpenFileInfoTelemetryEvent, ensureProjectForOpenFileSchedule, compilerOptionConverters, watchOptionsConverters, indentStyle, defaultTypeSafeList, fileNamePropertyReader, externalFilePropertyReader, noopConfigFileWatcher, ProjectReferenceProjectLoadKind, _ProjectService, ProjectService3; - var init_editorServices = __esm({ - "src/server/editorServices.ts"() { - "use strict"; - init_ts7(); - init_ts_server3(); - maxProgramSizeForNonTsFiles = 20 * 1024 * 1024; - maxFileSize = 4 * 1024 * 1024; - ProjectsUpdatedInBackgroundEvent = "projectsUpdatedInBackground"; - ProjectLoadingStartEvent = "projectLoadingStart"; - ProjectLoadingFinishEvent = "projectLoadingFinish"; - LargeFileReferencedEvent = "largeFileReferenced"; - ConfigFileDiagEvent = "configFileDiag"; - ProjectLanguageServiceStateEvent = "projectLanguageServiceState"; - ProjectInfoTelemetryEvent = "projectInfo"; - OpenFileInfoTelemetryEvent = "openFileInfo"; - ensureProjectForOpenFileSchedule = "*ensureProjectForOpenFiles*"; - compilerOptionConverters = prepareConvertersForEnumLikeCompilerOptions(optionDeclarations); - watchOptionsConverters = prepareConvertersForEnumLikeCompilerOptions(optionsForWatch); - indentStyle = new Map(Object.entries({ - none: 0 /* None */, - block: 1 /* Block */, - smart: 2 /* Smart */ - })); - defaultTypeSafeList = { - "jquery": { - // jquery files can have names like "jquery-1.10.2.min.js" (or "jquery.intellisense.js") - match: /jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i, - types: ["jquery"] - }, - "WinJS": { - // e.g. c:/temp/UWApp1/lib/winjs-4.0.1/js/base.js - match: /^(.*\/winjs-[.\d]+)\/js\/base\.js$/i, - // If the winjs/base.js file is found.. - exclude: [["^", 1, "/.*"]], - // ..then exclude all files under the winjs folder - types: ["winjs"] - // And fetch the @types package for WinJS - }, - "Kendo": { - // e.g. /Kendo3/wwwroot/lib/kendo/kendo.all.min.js - match: /^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i, - exclude: [["^", 1, "/.*"]], - types: ["kendo-ui"] - }, - "Office Nuget": { - // e.g. /scripts/Office/1/excel-15.debug.js - match: /^(.*\/office\/1)\/excel-\d+\.debug\.js$/i, - // Office NuGet package is installed under a "1/office" folder - exclude: [["^", 1, "/.*"]], - // Exclude that whole folder if the file indicated above is found in it - types: ["office"] - // @types package to fetch instead - }, - "References": { - match: /^(.*\/_references\.js)$/i, - exclude: [["^", 1, "$"]] - } - }; - fileNamePropertyReader = { - getFileName: (x) => x, - getScriptKind: (fileName, extraFileExtensions) => { - let result; - if (extraFileExtensions) { - const fileExtension = getAnyExtensionFromPath(fileName); - if (fileExtension) { - some(extraFileExtensions, (info) => { - if (info.extension === fileExtension) { - result = info.scriptKind; - return true; - } - return false; - }); - } - } - return result; - }, - hasMixedContent: (fileName, extraFileExtensions) => some(extraFileExtensions, (ext) => ext.isMixedContent && fileExtensionIs(fileName, ext.extension)) - }; - externalFilePropertyReader = { - getFileName: (x) => x.fileName, - getScriptKind: (x) => tryConvertScriptKindName(x.scriptKind), - // TODO: GH#18217 - hasMixedContent: (x) => !!x.hasMixedContent - }; - noopConfigFileWatcher = { close: noop }; - ProjectReferenceProjectLoadKind = /* @__PURE__ */ ((ProjectReferenceProjectLoadKind2) => { - ProjectReferenceProjectLoadKind2[ProjectReferenceProjectLoadKind2["Find"] = 0] = "Find"; - ProjectReferenceProjectLoadKind2[ProjectReferenceProjectLoadKind2["FindCreate"] = 1] = "FindCreate"; - ProjectReferenceProjectLoadKind2[ProjectReferenceProjectLoadKind2["FindCreateLoad"] = 2] = "FindCreateLoad"; - return ProjectReferenceProjectLoadKind2; - })(ProjectReferenceProjectLoadKind || {}); - _ProjectService = class _ProjectService { - constructor(opts) { - /** - * Container of all known scripts - * - * @internal - */ - this.filenameToScriptInfo = /* @__PURE__ */ new Map(); - this.nodeModulesWatchers = /* @__PURE__ */ new Map(); - /** - * Contains all the deleted script info's version information so that - * it does not reset when creating script info again - * (and could have potentially collided with version where contents mismatch) - */ - this.filenameToScriptInfoVersion = /* @__PURE__ */ new Map(); - // Set of all '.js' files ever opened. - this.allJsFilesForOpenFileTelemetry = /* @__PURE__ */ new Map(); - /** - * maps external project file name to list of config files that were the part of this project - */ - this.externalProjectToConfiguredProjectMap = /* @__PURE__ */ new Map(); - /** - * external projects (configuration and list of root files is not controlled by tsserver) - */ - this.externalProjects = []; - /** - * projects built from openFileRoots - */ - this.inferredProjects = []; - /** - * projects specified by a tsconfig.json file - */ - this.configuredProjects = /* @__PURE__ */ new Map(); - /** @internal */ - this.newInferredProjectName = createProjectNameFactoryWithCounter(makeInferredProjectName); - /** @internal */ - this.newAutoImportProviderProjectName = createProjectNameFactoryWithCounter(makeAutoImportProviderProjectName); - /** @internal */ - this.newAuxiliaryProjectName = createProjectNameFactoryWithCounter(makeAuxiliaryProjectName); - /** - * Open files: with value being project root path, and key being Path of the file that is open - */ - this.openFiles = /* @__PURE__ */ new Map(); - /** @internal */ - this.configFileForOpenFiles = /* @__PURE__ */ new Map(); - /** - * Map of open files that are opened without complete path but have projectRoot as current directory - */ - this.openFilesWithNonRootedDiskPath = /* @__PURE__ */ new Map(); - this.compilerOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(); - this.watchOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(); - this.typeAcquisitionForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(); - /** - * Project size for configured or external projects - */ - this.projectToSizeMap = /* @__PURE__ */ new Map(); - /** - * This is a map of config file paths existence that doesnt need query to disk - * - The entry can be present because there is inferred project that needs to watch addition of config file to directory - * In this case the exists could be true/false based on config file is present or not - * - Or it is present if we have configured project open with config file at that location - * In this case the exists property is always true - * - * - * @internal - */ - this.configFileExistenceInfoCache = /* @__PURE__ */ new Map(); - this.safelist = defaultTypeSafeList; - this.legacySafelist = /* @__PURE__ */ new Map(); - this.pendingProjectUpdates = /* @__PURE__ */ new Map(); - /** @internal */ - this.pendingEnsureProjectForOpenFiles = false; - /** Tracks projects that we have already sent telemetry for. */ - this.seenProjects = /* @__PURE__ */ new Map(); - /** @internal */ - this.sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map(); - /** @internal */ - this.extendedConfigCache = /* @__PURE__ */ new Map(); - /** @internal */ - this.verifyDocumentRegistry = noop; - var _a; - this.host = opts.host; - this.logger = opts.logger; - this.cancellationToken = opts.cancellationToken; - this.useSingleInferredProject = opts.useSingleInferredProject; - this.useInferredProjectPerProjectRoot = opts.useInferredProjectPerProjectRoot; - this.typingsInstaller = opts.typingsInstaller || nullTypingsInstaller; - this.throttleWaitMilliseconds = opts.throttleWaitMilliseconds; - this.eventHandler = opts.eventHandler; - this.suppressDiagnosticEvents = opts.suppressDiagnosticEvents; - this.globalPlugins = opts.globalPlugins || emptyArray2; - this.pluginProbeLocations = opts.pluginProbeLocations || emptyArray2; - this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads; - this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation; - this.session = opts.session; - if (opts.serverMode !== void 0) { - this.serverMode = opts.serverMode; - } else { - this.serverMode = 0 /* Semantic */; - } - if (this.host.realpath) { - this.realpathToScriptInfos = createMultiMap(); - } - this.currentDirectory = toNormalizedPath(this.host.getCurrentDirectory()); - this.toCanonicalFileName = createGetCanonicalFileName(this.host.useCaseSensitiveFileNames); - this.globalCacheLocationDirectoryPath = this.typingsInstaller.globalTypingsCacheLocation ? ensureTrailingDirectorySeparator(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)) : void 0; - this.throttledOperations = new ThrottledOperations(this.host, this.logger); - if (this.typesMapLocation) { - this.loadTypesMap(); - } else { - this.logger.info("No types map provided; using the default"); - } - this.typingsInstaller.attach(this); - this.typingsCache = new TypingsCache(this.typingsInstaller); - this.hostConfiguration = { - formatCodeOptions: getDefaultFormatCodeSettings(this.host.newLine), - preferences: emptyOptions, - hostInfo: "Unknown host", - extraFileExtensions: [] - }; - this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this); - const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */; - const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop; - this.packageJsonCache = createPackageJsonCache(this); - this.watchFactory = this.serverMode !== 0 /* Semantic */ ? { - watchFile: returnNoopFileWatcher, - watchDirectory: returnNoopFileWatcher - } : getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); - (_a = opts.incrementalVerifier) == null ? void 0 : _a.call(opts, this); - } - toPath(fileName) { - return toPath(fileName, this.currentDirectory, this.toCanonicalFileName); - } - /** @internal */ - getExecutingFilePath() { - return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath()); - } - /** @internal */ - getNormalizedAbsolutePath(fileName) { - return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory()); - } - /** @internal */ - setDocument(key, path, sourceFile) { - const info = Debug.checkDefined(this.getScriptInfoForPath(path)); - info.cacheSourceFile = { key, sourceFile }; - } - /** @internal */ - getDocument(key, path) { - const info = this.getScriptInfoForPath(path); - return info && info.cacheSourceFile && info.cacheSourceFile.key === key ? info.cacheSourceFile.sourceFile : void 0; - } - /** @internal */ - ensureInferredProjectsUpToDate_TestOnly() { - this.ensureProjectStructuresUptoDate(); - } - /** @internal */ - getCompilerOptionsForInferredProjects() { - return this.compilerOptionsForInferredProjects; - } - /** @internal */ - onUpdateLanguageServiceStateForProject(project, languageServiceEnabled) { - if (!this.eventHandler) { - return; - } - const event = { - eventName: ProjectLanguageServiceStateEvent, - data: { project, languageServiceEnabled } - }; - this.eventHandler(event); - } - loadTypesMap() { - try { - const fileContent = this.host.readFile(this.typesMapLocation); - if (fileContent === void 0) { - this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`); - return; - } - const raw = JSON.parse(fileContent); - for (const k of Object.keys(raw.typesMap)) { - raw.typesMap[k].match = new RegExp(raw.typesMap[k].match, "i"); - } - this.safelist = raw.typesMap; - for (const key in raw.simpleMap) { - if (hasProperty(raw.simpleMap, key)) { - this.legacySafelist.set(key, raw.simpleMap[key].toLowerCase()); - } - } - } catch (e) { - this.logger.info(`Error loading types map: ${e}`); - this.safelist = defaultTypeSafeList; - this.legacySafelist.clear(); - } - } - // eslint-disable-line @typescript-eslint/unified-signatures - updateTypingsForProject(response) { - const project = this.findProject(response.projectName); - if (!project) { - return; - } - switch (response.kind) { - case ActionSet: - project.updateTypingFiles(this.typingsCache.updateTypingsForProject(response.projectName, response.compilerOptions, response.typeAcquisition, response.unresolvedImports, response.typings)); - return; - case ActionInvalidate: - this.typingsCache.enqueueInstallTypingsForProject( - project, - project.lastCachedUnresolvedImportsList, - /*forceRefresh*/ - true - ); - return; - } - } - /** @internal */ - watchTypingLocations(response) { - var _a; - (_a = this.findProject(response.projectName)) == null ? void 0 : _a.watchTypingLocations(response.files); - } - /** @internal */ - delayEnsureProjectForOpenFiles() { - if (!this.openFiles.size) - return; - this.pendingEnsureProjectForOpenFiles = true; - this.throttledOperations.schedule( - ensureProjectForOpenFileSchedule, - /*delay*/ - 2500, - () => { - if (this.pendingProjectUpdates.size !== 0) { - this.delayEnsureProjectForOpenFiles(); - } else { - if (this.pendingEnsureProjectForOpenFiles) { - this.ensureProjectForOpenFiles(); - this.sendProjectsUpdatedInBackgroundEvent(); - } - } - } - ); - } - delayUpdateProjectGraph(project) { - project.markAsDirty(); - if (project.projectKind !== 3 /* AutoImportProvider */ && project.projectKind !== 4 /* Auxiliary */) { - const projectName = project.getProjectName(); - this.pendingProjectUpdates.set(projectName, project); - this.throttledOperations.schedule( - projectName, - /*delay*/ - 250, - () => { - if (this.pendingProjectUpdates.delete(projectName)) { - updateProjectIfDirty(project); - } - } - ); - } - } - /** @internal */ - hasPendingProjectUpdate(project) { - return this.pendingProjectUpdates.has(project.getProjectName()); - } - /** @internal */ - sendProjectsUpdatedInBackgroundEvent() { - if (!this.eventHandler) { - return; - } - const event = { - eventName: ProjectsUpdatedInBackgroundEvent, - data: { - openFiles: arrayFrom(this.openFiles.keys(), (path) => this.getScriptInfoForPath(path).fileName) - } - }; - this.eventHandler(event); - } - /** @internal */ - sendLargeFileReferencedEvent(file, fileSize) { - if (!this.eventHandler) { - return; - } - const event = { - eventName: LargeFileReferencedEvent, - data: { file, fileSize, maxFileSize } - }; - this.eventHandler(event); - } - /** @internal */ - sendProjectLoadingStartEvent(project, reason) { - if (!this.eventHandler) { - return; - } - project.sendLoadingProjectFinish = true; - const event = { - eventName: ProjectLoadingStartEvent, - data: { project, reason } - }; - this.eventHandler(event); - } - /** @internal */ - sendProjectLoadingFinishEvent(project) { - if (!this.eventHandler || !project.sendLoadingProjectFinish) { - return; - } - project.sendLoadingProjectFinish = false; - const event = { - eventName: ProjectLoadingFinishEvent, - data: { project } - }; - this.eventHandler(event); - } - /** @internal */ - sendPerformanceEvent(kind, durationMs) { - if (this.performanceEventHandler) { - this.performanceEventHandler({ kind, durationMs }); - } - } - /** @internal */ - delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project) { - this.delayUpdateProjectGraph(project); - this.delayEnsureProjectForOpenFiles(); - } - delayUpdateProjectGraphs(projects, clearSourceMapperCache) { - if (projects.length) { - for (const project of projects) { - if (clearSourceMapperCache) - project.clearSourceMapperCache(); - this.delayUpdateProjectGraph(project); - } - this.delayEnsureProjectForOpenFiles(); - } - } - setCompilerOptionsForInferredProjects(projectCompilerOptions, projectRootPath) { - Debug.assert(projectRootPath === void 0 || this.useInferredProjectPerProjectRoot, "Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled"); - const compilerOptions = convertCompilerOptions(projectCompilerOptions); - const watchOptions = convertWatchOptions(projectCompilerOptions, projectRootPath); - const typeAcquisition = convertTypeAcquisition(projectCompilerOptions); - compilerOptions.allowNonTsExtensions = true; - const canonicalProjectRootPath = projectRootPath && this.toCanonicalFileName(projectRootPath); - if (canonicalProjectRootPath) { - this.compilerOptionsForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, compilerOptions); - this.watchOptionsForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, watchOptions || false); - this.typeAcquisitionForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, typeAcquisition); - } else { - this.compilerOptionsForInferredProjects = compilerOptions; - this.watchOptionsForInferredProjects = watchOptions; - this.typeAcquisitionForInferredProjects = typeAcquisition; - } - for (const project of this.inferredProjects) { - if (canonicalProjectRootPath ? project.projectRootPath === canonicalProjectRootPath : !project.projectRootPath || !this.compilerOptionsForInferredProjectsPerProjectRoot.has(project.projectRootPath)) { - project.setCompilerOptions(compilerOptions); - project.setTypeAcquisition(typeAcquisition); - project.setWatchOptions(watchOptions == null ? void 0 : watchOptions.watchOptions); - project.setProjectErrors(watchOptions == null ? void 0 : watchOptions.errors); - project.compileOnSaveEnabled = compilerOptions.compileOnSave; - project.markAsDirty(); - this.delayUpdateProjectGraph(project); - } - } - this.delayEnsureProjectForOpenFiles(); - } - findProject(projectName) { - if (projectName === void 0) { - return void 0; - } - if (isInferredProjectName(projectName)) { - return findProjectByName(projectName, this.inferredProjects); - } - return this.findExternalProjectByProjectName(projectName) || this.findConfiguredProjectByProjectName(toNormalizedPath(projectName)); - } - /** @internal */ - forEachProject(cb) { - this.externalProjects.forEach(cb); - this.configuredProjects.forEach(cb); - this.inferredProjects.forEach(cb); - } - /** @internal */ - forEachEnabledProject(cb) { - this.forEachProject((project) => { - if (!project.isOrphan() && project.languageServiceEnabled) { - cb(project); - } - }); - } - getDefaultProjectForFile(fileName, ensureProject) { - return ensureProject ? this.ensureDefaultProjectForFile(fileName) : this.tryGetDefaultProjectForFile(fileName); - } - /** @internal */ - tryGetDefaultProjectForFile(fileNameOrScriptInfo) { - const scriptInfo = isString(fileNameOrScriptInfo) ? this.getScriptInfoForNormalizedPath(fileNameOrScriptInfo) : fileNameOrScriptInfo; - return scriptInfo && !scriptInfo.isOrphan() ? scriptInfo.getDefaultProject() : void 0; - } - /** @internal */ - ensureDefaultProjectForFile(fileNameOrScriptInfo) { - return this.tryGetDefaultProjectForFile(fileNameOrScriptInfo) || this.doEnsureDefaultProjectForFile(fileNameOrScriptInfo); - } - doEnsureDefaultProjectForFile(fileNameOrScriptInfo) { - this.ensureProjectStructuresUptoDate(); - const scriptInfo = isString(fileNameOrScriptInfo) ? this.getScriptInfoForNormalizedPath(fileNameOrScriptInfo) : fileNameOrScriptInfo; - return scriptInfo ? scriptInfo.getDefaultProject() : (this.logErrorForScriptInfoNotFound(isString(fileNameOrScriptInfo) ? fileNameOrScriptInfo : fileNameOrScriptInfo.fileName), Errors.ThrowNoProject()); - } - getScriptInfoEnsuringProjectsUptoDate(uncheckedFileName) { - this.ensureProjectStructuresUptoDate(); - return this.getScriptInfo(uncheckedFileName); - } - /** - * Ensures the project structures are upto date - * This means, - * - we go through all the projects and update them if they are dirty - * - if updates reflect some change in structure or there was pending request to ensure projects for open files - * ensure that each open script info has project - */ - ensureProjectStructuresUptoDate() { - let hasChanges = this.pendingEnsureProjectForOpenFiles; - this.pendingProjectUpdates.clear(); - const updateGraph = (project) => { - hasChanges = updateProjectIfDirty(project) || hasChanges; - }; - this.externalProjects.forEach(updateGraph); - this.configuredProjects.forEach(updateGraph); - this.inferredProjects.forEach(updateGraph); - if (hasChanges) { - this.ensureProjectForOpenFiles(); - } - } - getFormatCodeOptions(file) { - const info = this.getScriptInfoForNormalizedPath(file); - return info && info.getFormatCodeSettings() || this.hostConfiguration.formatCodeOptions; - } - getPreferences(file) { - const info = this.getScriptInfoForNormalizedPath(file); - return { ...this.hostConfiguration.preferences, ...info && info.getPreferences() }; - } - getHostFormatCodeOptions() { - return this.hostConfiguration.formatCodeOptions; - } - getHostPreferences() { - return this.hostConfiguration.preferences; - } - onSourceFileChanged(info, eventKind) { - if (eventKind === 2 /* Deleted */) { - this.handleDeletedFile(info); - } else if (!info.isScriptOpen()) { - info.delayReloadNonMixedContentFile(); - this.delayUpdateProjectGraphs( - info.containingProjects, - /*clearSourceMapperCache*/ - false - ); - this.handleSourceMapProjects(info); - } - } - handleSourceMapProjects(info) { - if (info.sourceMapFilePath) { - if (isString(info.sourceMapFilePath)) { - const sourceMapFileInfo = this.getScriptInfoForPath(info.sourceMapFilePath); - this.delayUpdateSourceInfoProjects(sourceMapFileInfo && sourceMapFileInfo.sourceInfos); - } else { - this.delayUpdateSourceInfoProjects(info.sourceMapFilePath.sourceInfos); - } - } - this.delayUpdateSourceInfoProjects(info.sourceInfos); - if (info.declarationInfoPath) { - this.delayUpdateProjectsOfScriptInfoPath(info.declarationInfoPath); - } - } - delayUpdateSourceInfoProjects(sourceInfos) { - if (sourceInfos) { - sourceInfos.forEach((_value, path) => this.delayUpdateProjectsOfScriptInfoPath(path)); - } - } - delayUpdateProjectsOfScriptInfoPath(path) { - const info = this.getScriptInfoForPath(path); - if (info) { - this.delayUpdateProjectGraphs( - info.containingProjects, - /*clearSourceMapperCache*/ - true - ); - } - } - handleDeletedFile(info) { - this.stopWatchingScriptInfo(info); - if (!info.isScriptOpen()) { - this.deleteScriptInfo(info); - const containingProjects = info.containingProjects.slice(); - info.detachAllProjects(); - this.delayUpdateProjectGraphs( - containingProjects, - /*clearSourceMapperCache*/ - false - ); - this.handleSourceMapProjects(info); - info.closeSourceMapFileWatcher(); - if (info.declarationInfoPath) { - const declarationInfo = this.getScriptInfoForPath(info.declarationInfoPath); - if (declarationInfo) { - declarationInfo.sourceMapFilePath = void 0; - } - } - } - } - /** - * This is to watch whenever files are added or removed to the wildcard directories - * - * @internal - */ - watchWildcardDirectory(directory, flags, configFileName, config) { - return this.watchFactory.watchDirectory( - directory, - (fileOrDirectory) => { - const fileOrDirectoryPath = this.toPath(fileOrDirectory); - const fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); - if (getBaseFileName(fileOrDirectoryPath) === "package.json" && !isInsideNodeModules(fileOrDirectoryPath) && (fsResult && fsResult.fileExists || !fsResult && this.host.fileExists(fileOrDirectoryPath))) { - this.logger.info(`Config: ${configFileName} Detected new package.json: ${fileOrDirectory}`); - this.onAddPackageJson(fileOrDirectoryPath); - } - const configuredProjectForConfig = this.findConfiguredProjectByProjectName(configFileName); - if (isIgnoredFileFromWildCardWatching({ - watchedDirPath: directory, - fileOrDirectory, - fileOrDirectoryPath, - configFileName, - extraFileExtensions: this.hostConfiguration.extraFileExtensions, - currentDirectory: this.currentDirectory, - options: config.parsedCommandLine.options, - program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames, - useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames, - writeLog: (s) => this.logger.info(s), - toPath: (s) => this.toPath(s) - })) - return; - if (config.reloadLevel !== 2 /* Full */) - config.reloadLevel = 1 /* Partial */; - config.projects.forEach((watchWildcardDirectories, projectCanonicalPath) => { - if (!watchWildcardDirectories) - return; - const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath); - if (!project) - return; - const reloadLevel = configuredProjectForConfig === project ? 1 /* Partial */ : 0 /* None */; - if (project.pendingReload !== void 0 && project.pendingReload > reloadLevel) - return; - if (this.openFiles.has(fileOrDirectoryPath)) { - const info = Debug.checkDefined(this.getScriptInfoForPath(fileOrDirectoryPath)); - if (info.isAttached(project)) { - const loadLevelToSet = Math.max(reloadLevel, project.openFileWatchTriggered.get(fileOrDirectoryPath) || 0 /* None */); - project.openFileWatchTriggered.set(fileOrDirectoryPath, loadLevelToSet); - } else { - project.pendingReload = reloadLevel; - this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); - } - } else { - project.pendingReload = reloadLevel; - this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); - } - }); - }, - flags, - this.getWatchOptionsFromProjectWatchOptions(config.parsedCommandLine.watchOptions), - WatchType.WildcardDirectory, - configFileName - ); - } - /** @internal */ - delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, reloadReason) { - const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (!(configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config)) - return false; - let scheduledAnyProjectUpdate = false; - configFileExistenceInfo.config.reloadLevel = 2 /* Full */; - configFileExistenceInfo.config.projects.forEach((_watchWildcardDirectories, projectCanonicalPath) => { - const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath); - if (!project) - return; - scheduledAnyProjectUpdate = true; - if (projectCanonicalPath === canonicalConfigFilePath) { - if (project.isInitialLoadPending()) - return; - project.pendingReload = 2 /* Full */; - project.pendingReloadReason = reloadReason; - this.delayUpdateProjectGraph(project); - } else { - project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(this.toPath(canonicalConfigFilePath)); - this.delayUpdateProjectGraph(project); - } - }); - return scheduledAnyProjectUpdate; - } - /** @internal */ - onConfigFileChanged(canonicalConfigFilePath, eventKind) { - var _a; - const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (eventKind === 2 /* Deleted */) { - configFileExistenceInfo.exists = false; - const project = ((_a = configFileExistenceInfo.config) == null ? void 0 : _a.projects.has(canonicalConfigFilePath)) ? this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath) : void 0; - if (project) - this.removeProject(project); - } else { - configFileExistenceInfo.exists = true; - } - this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, "Change in config file detected"); - this.reloadConfiguredProjectForFiles( - configFileExistenceInfo.openFilesImpactedByConfigFile, - /*clearSemanticCache*/ - false, - /*delayReload*/ - true, - eventKind !== 2 /* Deleted */ ? identity : ( - // Reload open files if they are root of inferred project - returnTrue - ), - // Reload all the open files impacted by config file - "Change in config file detected" - ); - this.delayEnsureProjectForOpenFiles(); - } - removeProject(project) { - this.logger.info("`remove Project::"); - project.print( - /*writeProjectFileNames*/ - true, - /*writeFileExplaination*/ - true, - /*writeFileVersionAndText*/ - false - ); - project.close(); - if (Debug.shouldAssert(1 /* Normal */)) { - this.filenameToScriptInfo.forEach((info) => Debug.assert( - !info.isAttached(project), - "Found script Info still attached to project", - () => `${project.projectName}: ScriptInfos still attached: ${JSON.stringify( - arrayFrom( - mapDefinedIterator( - this.filenameToScriptInfo.values(), - (info2) => info2.isAttached(project) ? { - fileName: info2.fileName, - projects: info2.containingProjects.map((p) => p.projectName), - hasMixedContent: info2.hasMixedContent - } : void 0 - ) - ), - /*replacer*/ - void 0, - " " - )}` - )); - } - this.pendingProjectUpdates.delete(project.getProjectName()); - switch (project.projectKind) { - case 2 /* External */: - unorderedRemoveItem(this.externalProjects, project); - this.projectToSizeMap.delete(project.getProjectName()); - break; - case 1 /* Configured */: - this.configuredProjects.delete(project.canonicalConfigFilePath); - this.projectToSizeMap.delete(project.canonicalConfigFilePath); - break; - case 0 /* Inferred */: - unorderedRemoveItem(this.inferredProjects, project); - break; - } - } - /** @internal */ - assignOrphanScriptInfoToInferredProject(info, projectRootPath) { - Debug.assert(info.isOrphan()); - const project = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) || this.getOrCreateSingleInferredProjectIfEnabled() || this.getOrCreateSingleInferredWithoutProjectRoot( - info.isDynamic ? projectRootPath || this.currentDirectory : getDirectoryPath( - isRootedDiskPath(info.fileName) ? info.fileName : getNormalizedAbsolutePath( - info.fileName, - projectRootPath ? this.getNormalizedAbsolutePath(projectRootPath) : this.currentDirectory - ) - ) - ); - project.addRoot(info); - if (info.containingProjects[0] !== project) { - info.detachFromProject(project); - info.containingProjects.unshift(project); - } - project.updateGraph(); - if (!this.useSingleInferredProject && !project.projectRootPath) { - for (const inferredProject of this.inferredProjects) { - if (inferredProject === project || inferredProject.isOrphan()) { - continue; - } - const roots = inferredProject.getRootScriptInfos(); - Debug.assert(roots.length === 1 || !!inferredProject.projectRootPath); - if (roots.length === 1 && forEach(roots[0].containingProjects, (p) => p !== roots[0].containingProjects[0] && !p.isOrphan())) { - inferredProject.removeFile( - roots[0], - /*fileExists*/ - true, - /*detachFromProject*/ - true - ); - } - } - } - return project; - } - assignOrphanScriptInfosToInferredProject() { - this.openFiles.forEach((projectRootPath, path) => { - const info = this.getScriptInfoForPath(path); - if (info.isOrphan()) { - this.assignOrphanScriptInfoToInferredProject(info, projectRootPath); - } - }); - } - /** - * Remove this file from the set of open, non-configured files. - * @param info The file that has been closed or newly configured - */ - closeOpenFile(info, skipAssignOrphanScriptInfosToInferredProject) { - const fileExists = info.isDynamic ? false : this.host.fileExists(info.fileName); - info.close(fileExists); - this.stopWatchingConfigFilesForClosedScriptInfo(info); - const canonicalFileName = this.toCanonicalFileName(info.fileName); - if (this.openFilesWithNonRootedDiskPath.get(canonicalFileName) === info) { - this.openFilesWithNonRootedDiskPath.delete(canonicalFileName); - } - let ensureProjectsForOpenFiles = false; - for (const p of info.containingProjects) { - if (isConfiguredProject(p)) { - if (info.hasMixedContent) { - info.registerFileUpdate(); - } - const reloadLevel = p.openFileWatchTriggered.get(info.path); - if (reloadLevel !== void 0) { - p.openFileWatchTriggered.delete(info.path); - if (p.pendingReload !== void 0 && p.pendingReload < reloadLevel) { - p.pendingReload = reloadLevel; - p.markFileAsDirty(info.path); - } - } - } else if (isInferredProject(p) && p.isRoot(info)) { - if (p.isProjectWithSingleRoot()) { - ensureProjectsForOpenFiles = true; - } - p.removeFile( - info, - fileExists, - /*detachFromProject*/ - true - ); - } - if (!p.languageServiceEnabled) { - p.markAsDirty(); - } - } - this.openFiles.delete(info.path); - this.configFileForOpenFiles.delete(info.path); - if (!skipAssignOrphanScriptInfosToInferredProject && ensureProjectsForOpenFiles) { - this.assignOrphanScriptInfosToInferredProject(); - } - if (fileExists) { - this.watchClosedScriptInfo(info); - } else { - this.handleDeletedFile(info); - } - return ensureProjectsForOpenFiles; - } - deleteScriptInfo(info) { - this.filenameToScriptInfo.delete(info.path); - this.filenameToScriptInfoVersion.set(info.path, info.textStorage.version); - const realpath = info.getRealpathIfDifferent(); - if (realpath) { - this.realpathToScriptInfos.remove(realpath, info); - } - } - configFileExists(configFileName, canonicalConfigFilePath, info) { - var _a; - let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (configFileExistenceInfo) { - if (isOpenScriptInfo(info) && !((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(info.path))) { - (configFileExistenceInfo.openFilesImpactedByConfigFile || (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Map())).set(info.path, false); - } - return configFileExistenceInfo.exists; - } - const exists = this.host.fileExists(configFileName); - let openFilesImpactedByConfigFile; - if (isOpenScriptInfo(info)) { - (openFilesImpactedByConfigFile || (openFilesImpactedByConfigFile = /* @__PURE__ */ new Map())).set(info.path, false); - } - configFileExistenceInfo = { exists, openFilesImpactedByConfigFile }; - this.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo); - return exists; - } - /** @internal */ - createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, forProject) { - var _a, _b; - const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (!configFileExistenceInfo.watcher || configFileExistenceInfo.watcher === noopConfigFileWatcher) { - configFileExistenceInfo.watcher = this.watchFactory.watchFile( - configFileName, - (_fileName, eventKind) => this.onConfigFileChanged(canonicalConfigFilePath, eventKind), - 2e3 /* High */, - this.getWatchOptionsFromProjectWatchOptions((_b = (_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config) == null ? void 0 : _a.parsedCommandLine) == null ? void 0 : _b.watchOptions), - WatchType.ConfigFile, - forProject - ); - } - const projects = configFileExistenceInfo.config.projects; - projects.set(forProject.canonicalConfigFilePath, projects.get(forProject.canonicalConfigFilePath) || false); - } - /** - * Returns true if the configFileExistenceInfo is needed/impacted by open files that are root of inferred project - */ - configFileExistenceImpactsRootOfInferredProject(configFileExistenceInfo) { - return configFileExistenceInfo.openFilesImpactedByConfigFile && forEachEntry(configFileExistenceInfo.openFilesImpactedByConfigFile, identity); - } - /** @internal */ - releaseParsedConfig(canonicalConfigFilePath, forProject) { - var _a, _b, _c; - const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (!((_a = configFileExistenceInfo.config) == null ? void 0 : _a.projects.delete(forProject.canonicalConfigFilePath))) - return; - if ((_b = configFileExistenceInfo.config) == null ? void 0 : _b.projects.size) - return; - configFileExistenceInfo.config = void 0; - clearSharedExtendedConfigFileWatcher(canonicalConfigFilePath, this.sharedExtendedConfigFileWatchers); - Debug.checkDefined(configFileExistenceInfo.watcher); - if ((_c = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _c.size) { - if (this.configFileExistenceImpactsRootOfInferredProject(configFileExistenceInfo)) { - if (!canWatchDirectoryOrFile(getPathComponents(getDirectoryPath(canonicalConfigFilePath)))) { - configFileExistenceInfo.watcher.close(); - configFileExistenceInfo.watcher = noopConfigFileWatcher; - } - } else { - configFileExistenceInfo.watcher.close(); - configFileExistenceInfo.watcher = void 0; - } - } else { - configFileExistenceInfo.watcher.close(); - this.configFileExistenceInfoCache.delete(canonicalConfigFilePath); - } - } - /** - * Close the config file watcher in the cached ConfigFileExistenceInfo - * if there arent any open files that are root of inferred project and there is no parsed config held by any project - * - * @internal - */ - closeConfigFileWatcherOnReleaseOfOpenFile(configFileExistenceInfo) { - if (configFileExistenceInfo.watcher && !configFileExistenceInfo.config && !this.configFileExistenceImpactsRootOfInferredProject(configFileExistenceInfo)) { - configFileExistenceInfo.watcher.close(); - configFileExistenceInfo.watcher = void 0; - } - } - /** - * This is called on file close, so that we stop watching the config file for this script info - */ - stopWatchingConfigFilesForClosedScriptInfo(info) { - Debug.assert(!info.isScriptOpen()); - this.forEachConfigFileLocation(info, (canonicalConfigFilePath) => { - var _a, _b, _c; - const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (configFileExistenceInfo) { - const infoIsRootOfInferredProject = (_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.get(info.path); - (_b = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _b.delete(info.path); - if (infoIsRootOfInferredProject) { - this.closeConfigFileWatcherOnReleaseOfOpenFile(configFileExistenceInfo); - } - if (!((_c = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _c.size) && !configFileExistenceInfo.config) { - Debug.assert(!configFileExistenceInfo.watcher); - this.configFileExistenceInfoCache.delete(canonicalConfigFilePath); - } - } - }); - } - /** - * This is called by inferred project whenever script info is added as a root - * - * @internal - */ - startWatchingConfigFilesForInferredProjectRoot(info) { - Debug.assert(info.isScriptOpen()); - this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName) => { - let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (!configFileExistenceInfo) { - configFileExistenceInfo = { exists: this.host.fileExists(configFileName) }; - this.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo); - } - (configFileExistenceInfo.openFilesImpactedByConfigFile || (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Map())).set(info.path, true); - configFileExistenceInfo.watcher || (configFileExistenceInfo.watcher = canWatchDirectoryOrFile(getPathComponents(getDirectoryPath(canonicalConfigFilePath))) ? this.watchFactory.watchFile( - configFileName, - (_filename, eventKind) => this.onConfigFileChanged(canonicalConfigFilePath, eventKind), - 2e3 /* High */, - this.hostConfiguration.watchOptions, - WatchType.ConfigFileForInferredRoot - ) : noopConfigFileWatcher); - }); - } - /** - * This is called by inferred project whenever root script info is removed from it - * - * @internal - */ - stopWatchingConfigFilesForInferredProjectRoot(info) { - this.forEachConfigFileLocation(info, (canonicalConfigFilePath) => { - var _a; - const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if ((_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(info.path)) { - Debug.assert(info.isScriptOpen()); - configFileExistenceInfo.openFilesImpactedByConfigFile.set(info.path, false); - this.closeConfigFileWatcherOnReleaseOfOpenFile(configFileExistenceInfo); - } - }); - } - /** - * This function tries to search for a tsconfig.json for the given file. - * This is different from the method the compiler uses because - * the compiler can assume it will always start searching in the - * current directory (the directory in which tsc was invoked). - * The server must start searching from the directory containing - * the newly opened file. - */ - forEachConfigFileLocation(info, action) { - if (this.serverMode !== 0 /* Semantic */) { - return void 0; - } - Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path)); - const projectRootPath = this.openFiles.get(info.path); - const scriptInfo = Debug.checkDefined(this.getScriptInfo(info.path)); - if (scriptInfo.isDynamic) - return void 0; - let searchPath = asNormalizedPath(getDirectoryPath(info.fileName)); - const isSearchPathInProjectRoot = () => containsPath(projectRootPath, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames); - const anySearchPathOk = !projectRootPath || !isSearchPathInProjectRoot(); - let searchInDirectory = !isAncestorConfigFileInfo(info); - do { - if (searchInDirectory) { - const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName); - const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, "tsconfig.json")); - let result = action(combinePaths(canonicalSearchPath, "tsconfig.json"), tsconfigFileName); - if (result) - return tsconfigFileName; - const jsconfigFileName = asNormalizedPath(combinePaths(searchPath, "jsconfig.json")); - result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName); - if (result) - return jsconfigFileName; - if (isNodeModulesDirectory(canonicalSearchPath)) { - break; - } - } - const parentPath = asNormalizedPath(getDirectoryPath(searchPath)); - if (parentPath === searchPath) - break; - searchPath = parentPath; - searchInDirectory = true; - } while (anySearchPathOk || isSearchPathInProjectRoot()); - return void 0; - } - /** @internal */ - findDefaultConfiguredProject(info) { - if (!info.isScriptOpen()) - return void 0; - const configFileName = this.getConfigFileNameForFile(info); - const project = configFileName && this.findConfiguredProjectByProjectName(configFileName); - return project && projectContainsInfoDirectly(project, info) ? project : project == null ? void 0 : project.getDefaultChildProjectFromProjectWithReferences(info); - } - /** - * This function tries to search for a tsconfig.json for the given file. - * This is different from the method the compiler uses because - * the compiler can assume it will always start searching in the - * current directory (the directory in which tsc was invoked). - * The server must start searching from the directory containing - * the newly opened file. - * If script info is passed in, it is asserted to be open script info - * otherwise just file name - */ - getConfigFileNameForFile(info) { - if (isOpenScriptInfo(info)) { - Debug.assert(info.isScriptOpen()); - const result = this.configFileForOpenFiles.get(info.path); - if (result !== void 0) - return result || void 0; - } - this.logger.info(`Search path: ${getDirectoryPath(info.fileName)}`); - const configFileName = this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName2) => this.configFileExists(configFileName2, canonicalConfigFilePath, info)); - if (configFileName) { - this.logger.info(`For info: ${info.fileName} :: Config file name: ${configFileName}`); - } else { - this.logger.info(`For info: ${info.fileName} :: No config files found.`); - } - if (isOpenScriptInfo(info)) { - this.configFileForOpenFiles.set(info.path, configFileName || false); - } - return configFileName; - } - printProjects() { - if (!this.logger.hasLevel(1 /* normal */)) { - return; - } - this.logger.startGroup(); - this.externalProjects.forEach(printProjectWithoutFileNames); - this.configuredProjects.forEach(printProjectWithoutFileNames); - this.inferredProjects.forEach(printProjectWithoutFileNames); - this.logger.info("Open files: "); - this.openFiles.forEach((projectRootPath, path) => { - const info = this.getScriptInfoForPath(path); - this.logger.info(` FileName: ${info.fileName} ProjectRootPath: ${projectRootPath}`); - this.logger.info(` Projects: ${info.containingProjects.map((p) => p.getProjectName())}`); - }); - this.logger.endGroup(); - } - /** @internal */ - findConfiguredProjectByProjectName(configFileName) { - const canonicalConfigFilePath = asNormalizedPath(this.toCanonicalFileName(configFileName)); - return this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath); - } - getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath) { - return this.configuredProjects.get(canonicalConfigFilePath); - } - findExternalProjectByProjectName(projectFileName) { - return findProjectByName(projectFileName, this.externalProjects); - } - /** Get a filename if the language service exceeds the maximum allowed program size; otherwise returns undefined. */ - getFilenameForExceededTotalSizeLimitForNonTsFiles(name, options, fileNames, propertyReader) { - if (options && options.disableSizeLimit || !this.host.getFileSize) { - return; - } - let availableSpace = maxProgramSizeForNonTsFiles; - this.projectToSizeMap.set(name, 0); - this.projectToSizeMap.forEach((val) => availableSpace -= val || 0); - let totalNonTsFileSize = 0; - for (const f of fileNames) { - const fileName = propertyReader.getFileName(f); - if (hasTSFileExtension(fileName)) { - continue; - } - totalNonTsFileSize += this.host.getFileSize(fileName); - if (totalNonTsFileSize > maxProgramSizeForNonTsFiles || totalNonTsFileSize > availableSpace) { - const top5LargestFiles = fileNames.map((f2) => propertyReader.getFileName(f2)).filter((name2) => !hasTSFileExtension(name2)).map((name2) => ({ name: name2, size: this.host.getFileSize(name2) })).sort((a, b) => b.size - a.size).slice(0, 5); - this.logger.info(`Non TS file size exceeded limit (${totalNonTsFileSize}). Largest files: ${top5LargestFiles.map((file) => `${file.name}:${file.size}`).join(", ")}`); - return fileName; - } - } - this.projectToSizeMap.set(name, totalNonTsFileSize); - } - createExternalProject(projectFileName, files, options, typeAcquisition, excludedFiles) { - const compilerOptions = convertCompilerOptions(options); - const watchOptionsAndErrors = convertWatchOptions(options, getDirectoryPath(normalizeSlashes(projectFileName))); - const project = new ExternalProject2( - projectFileName, - this, - this.documentRegistry, - compilerOptions, - /*lastFileExceededProgramSize*/ - this.getFilenameForExceededTotalSizeLimitForNonTsFiles(projectFileName, compilerOptions, files, externalFilePropertyReader), - options.compileOnSave === void 0 ? true : options.compileOnSave, - /*projectFilePath*/ - void 0, - watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions - ); - project.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors); - project.excludedFiles = excludedFiles; - this.addFilesToNonInferredProject(project, files, externalFilePropertyReader, typeAcquisition); - this.externalProjects.push(project); - return project; - } - /** @internal */ - sendProjectTelemetry(project) { - if (this.seenProjects.has(project.projectName)) { - setProjectOptionsUsed(project); - return; - } - this.seenProjects.set(project.projectName, true); - if (!this.eventHandler || !this.host.createSHA256Hash) { - setProjectOptionsUsed(project); - return; - } - const projectOptions = isConfiguredProject(project) ? project.projectOptions : void 0; - setProjectOptionsUsed(project); - const data = { - projectId: this.host.createSHA256Hash(project.projectName), - fileStats: countEachFileTypes( - project.getScriptInfos(), - /*includeSizes*/ - true - ), - compilerOptions: convertCompilerOptionsForTelemetry(project.getCompilationSettings()), - typeAcquisition: convertTypeAcquisition2(project.getTypeAcquisition()), - extends: projectOptions && projectOptions.configHasExtendsProperty, - files: projectOptions && projectOptions.configHasFilesProperty, - include: projectOptions && projectOptions.configHasIncludeProperty, - exclude: projectOptions && projectOptions.configHasExcludeProperty, - compileOnSave: project.compileOnSaveEnabled, - configFileName: configFileName(), - projectType: project instanceof ExternalProject2 ? "external" : "configured", - languageServiceEnabled: project.languageServiceEnabled, - version - }; - this.eventHandler({ eventName: ProjectInfoTelemetryEvent, data }); - function configFileName() { - if (!isConfiguredProject(project)) { - return "other"; - } - return getBaseConfigFileName(project.getConfigFilePath()) || "other"; - } - function convertTypeAcquisition2({ enable: enable2, include, exclude }) { - return { - enable: enable2, - include: include !== void 0 && include.length !== 0, - exclude: exclude !== void 0 && exclude.length !== 0 - }; - } - } - addFilesToNonInferredProject(project, files, propertyReader, typeAcquisition) { - this.updateNonInferredProjectFiles(project, files, propertyReader); - project.setTypeAcquisition(typeAcquisition); - } - /** @internal */ - createConfiguredProject(configFileName) { - var _a; - (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "createConfiguredProject", { configFilePath: configFileName }); - this.logger.info(`Creating configuration project ${configFileName}`); - const canonicalConfigFilePath = asNormalizedPath(this.toCanonicalFileName(configFileName)); - let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (!configFileExistenceInfo) { - this.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo = { exists: true }); - } else { - configFileExistenceInfo.exists = true; - } - if (!configFileExistenceInfo.config) { - configFileExistenceInfo.config = { - cachedDirectoryStructureHost: createCachedDirectoryStructureHost(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames), - projects: /* @__PURE__ */ new Map(), - reloadLevel: 2 /* Full */ - }; - } - const project = new ConfiguredProject2( - configFileName, - canonicalConfigFilePath, - this, - this.documentRegistry, - configFileExistenceInfo.config.cachedDirectoryStructureHost - ); - this.configuredProjects.set(canonicalConfigFilePath, project); - this.createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, project); - return project; - } - /** @internal */ - createConfiguredProjectWithDelayLoad(configFileName, reason) { - const project = this.createConfiguredProject(configFileName); - project.pendingReload = 2 /* Full */; - project.pendingReloadReason = reason; - return project; - } - /** @internal */ - createAndLoadConfiguredProject(configFileName, reason) { - const project = this.createConfiguredProject(configFileName); - this.loadConfiguredProject(project, reason); - return project; - } - /** @internal */ - createLoadAndUpdateConfiguredProject(configFileName, reason) { - const project = this.createAndLoadConfiguredProject(configFileName, reason); - project.updateGraph(); - return project; - } - /** - * Read the config file of the project, and update the project root file names. - * - * @internal - */ - loadConfiguredProject(project, reason) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "loadConfiguredProject", { configFilePath: project.canonicalConfigFilePath }); - this.sendProjectLoadingStartEvent(project, reason); - const configFilename = asNormalizedPath(normalizePath(project.getConfigFilePath())); - const configFileExistenceInfo = this.ensureParsedConfigUptoDate( - configFilename, - project.canonicalConfigFilePath, - this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath), - project - ); - const parsedCommandLine = configFileExistenceInfo.config.parsedCommandLine; - Debug.assert(!!parsedCommandLine.fileNames); - const compilerOptions = parsedCommandLine.options; - if (!project.projectOptions) { - project.projectOptions = { - configHasExtendsProperty: parsedCommandLine.raw.extends !== void 0, - configHasFilesProperty: parsedCommandLine.raw.files !== void 0, - configHasIncludeProperty: parsedCommandLine.raw.include !== void 0, - configHasExcludeProperty: parsedCommandLine.raw.exclude !== void 0 - }; - } - project.canConfigFileJsonReportNoInputFiles = canJsonReportNoInputFiles(parsedCommandLine.raw); - project.setProjectErrors(parsedCommandLine.options.configFile.parseDiagnostics); - project.updateReferences(parsedCommandLine.projectReferences); - const lastFileExceededProgramSize = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(project.canonicalConfigFilePath, compilerOptions, parsedCommandLine.fileNames, fileNamePropertyReader); - if (lastFileExceededProgramSize) { - project.disableLanguageService(lastFileExceededProgramSize); - this.configFileExistenceInfoCache.forEach((_configFileExistenceInfo, canonicalConfigFilePath) => this.stopWatchingWildCards(canonicalConfigFilePath, project)); - } else { - project.setCompilerOptions(compilerOptions); - project.setWatchOptions(parsedCommandLine.watchOptions); - project.enableLanguageService(); - this.watchWildcards(configFilename, configFileExistenceInfo, project); - } - project.enablePluginsWithOptions(compilerOptions); - const filesToAdd = parsedCommandLine.fileNames.concat(project.getExternalFiles()); - this.updateRootAndOptionsOfNonInferredProject(project, filesToAdd, fileNamePropertyReader, compilerOptions, parsedCommandLine.typeAcquisition, parsedCommandLine.compileOnSave, parsedCommandLine.watchOptions); - (_b = tracing) == null ? void 0 : _b.pop(); - } - /** @internal */ - ensureParsedConfigUptoDate(configFilename, canonicalConfigFilePath, configFileExistenceInfo, forProject) { - var _a, _b, _c; - if (configFileExistenceInfo.config) { - if (!configFileExistenceInfo.config.reloadLevel) - return configFileExistenceInfo; - if (configFileExistenceInfo.config.reloadLevel === 1 /* Partial */) { - this.reloadFileNamesOfParsedConfig(configFilename, configFileExistenceInfo.config); - return configFileExistenceInfo; - } - } - const cachedDirectoryStructureHost = ((_a = configFileExistenceInfo.config) == null ? void 0 : _a.cachedDirectoryStructureHost) || createCachedDirectoryStructureHost(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames); - const configFileContent = tryReadFile(configFilename, (fileName) => this.host.readFile(fileName)); - const configFile = parseJsonText(configFilename, isString(configFileContent) ? configFileContent : ""); - const configFileErrors = configFile.parseDiagnostics; - if (!isString(configFileContent)) - configFileErrors.push(configFileContent); - const parsedCommandLine = parseJsonSourceFileConfigFileContent( - configFile, - cachedDirectoryStructureHost, - getDirectoryPath(configFilename), - /*existingOptions*/ - {}, - configFilename, - /*resolutionStack*/ - [], - this.hostConfiguration.extraFileExtensions, - this.extendedConfigCache - ); - if (parsedCommandLine.errors.length) { - configFileErrors.push(...parsedCommandLine.errors); - } - this.logger.info(`Config: ${configFilename} : ${JSON.stringify( - { - rootNames: parsedCommandLine.fileNames, - options: parsedCommandLine.options, - watchOptions: parsedCommandLine.watchOptions, - projectReferences: parsedCommandLine.projectReferences - }, - /*replacer*/ - void 0, - " " - )}`); - const oldCommandLine = (_b = configFileExistenceInfo.config) == null ? void 0 : _b.parsedCommandLine; - if (!configFileExistenceInfo.config) { - configFileExistenceInfo.config = { parsedCommandLine, cachedDirectoryStructureHost, projects: /* @__PURE__ */ new Map() }; - } else { - configFileExistenceInfo.config.parsedCommandLine = parsedCommandLine; - configFileExistenceInfo.config.watchedDirectoriesStale = true; - configFileExistenceInfo.config.reloadLevel = void 0; - } - if (!oldCommandLine && !isJsonEqual( - // Old options - this.getWatchOptionsFromProjectWatchOptions( - /*projectOptions*/ - void 0 - ), - // New options - this.getWatchOptionsFromProjectWatchOptions(parsedCommandLine.watchOptions) - )) { - (_c = configFileExistenceInfo.watcher) == null ? void 0 : _c.close(); - configFileExistenceInfo.watcher = void 0; - } - this.createConfigFileWatcherForParsedConfig(configFilename, canonicalConfigFilePath, forProject); - updateSharedExtendedConfigFileWatcher( - canonicalConfigFilePath, - parsedCommandLine.options, - this.sharedExtendedConfigFileWatchers, - (extendedConfigFileName, extendedConfigFilePath) => this.watchFactory.watchFile( - extendedConfigFileName, - () => { - var _a2; - cleanExtendedConfigCache(this.extendedConfigCache, extendedConfigFilePath, (fileName) => this.toPath(fileName)); - let ensureProjectsForOpenFiles = false; - (_a2 = this.sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) == null ? void 0 : _a2.projects.forEach((canonicalPath) => { - ensureProjectsForOpenFiles = this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, `Change in extended config file ${extendedConfigFileName} detected`) || ensureProjectsForOpenFiles; - }); - if (ensureProjectsForOpenFiles) - this.delayEnsureProjectForOpenFiles(); - }, - 2e3 /* High */, - this.hostConfiguration.watchOptions, - WatchType.ExtendedConfigFile, - configFilename - ), - (fileName) => this.toPath(fileName) - ); - return configFileExistenceInfo; - } - /** @internal */ - watchWildcards(configFileName, { exists, config }, forProject) { - config.projects.set(forProject.canonicalConfigFilePath, true); - if (exists) { - if (config.watchedDirectories && !config.watchedDirectoriesStale) - return; - config.watchedDirectoriesStale = false; - updateWatchingWildcardDirectories( - config.watchedDirectories || (config.watchedDirectories = /* @__PURE__ */ new Map()), - new Map(Object.entries(config.parsedCommandLine.wildcardDirectories)), - // Create new directory watcher - (directory, flags) => this.watchWildcardDirectory(directory, flags, configFileName, config) - ); - } else { - config.watchedDirectoriesStale = false; - if (!config.watchedDirectories) - return; - clearMap(config.watchedDirectories, closeFileWatcherOf); - config.watchedDirectories = void 0; - } - } - /** @internal */ - stopWatchingWildCards(canonicalConfigFilePath, forProject) { - const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); - if (!configFileExistenceInfo.config || !configFileExistenceInfo.config.projects.get(forProject.canonicalConfigFilePath)) { - return; - } - configFileExistenceInfo.config.projects.set(forProject.canonicalConfigFilePath, false); - if (forEachEntry(configFileExistenceInfo.config.projects, identity)) - return; - if (configFileExistenceInfo.config.watchedDirectories) { - clearMap(configFileExistenceInfo.config.watchedDirectories, closeFileWatcherOf); - configFileExistenceInfo.config.watchedDirectories = void 0; - } - configFileExistenceInfo.config.watchedDirectoriesStale = void 0; - } - updateNonInferredProjectFiles(project, files, propertyReader) { - const projectRootFilesMap = project.getRootFilesMap(); - const newRootScriptInfoMap = /* @__PURE__ */ new Map(); - for (const f of files) { - const newRootFile = propertyReader.getFileName(f); - const fileName = toNormalizedPath(newRootFile); - const isDynamic = isDynamicFileName(fileName); - let path; - if (!isDynamic && !project.fileExists(newRootFile)) { - path = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName); - const existingValue = projectRootFilesMap.get(path); - if (existingValue) { - if (existingValue.info) { - project.removeFile( - existingValue.info, - /*fileExists*/ - false, - /*detachFromProject*/ - true - ); - existingValue.info = void 0; - } - existingValue.fileName = fileName; - } else { - projectRootFilesMap.set(path, { fileName }); - } - } else { - const scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions); - const hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions); - const scriptInfo = Debug.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( - fileName, - project.currentDirectory, - scriptKind, - hasMixedContent, - project.directoryStructureHost - )); - path = scriptInfo.path; - const existingValue = projectRootFilesMap.get(path); - if (!existingValue || existingValue.info !== scriptInfo) { - project.addRoot(scriptInfo, fileName); - if (scriptInfo.isScriptOpen()) { - this.removeRootOfInferredProjectIfNowPartOfOtherProject(scriptInfo); - } - } else { - existingValue.fileName = fileName; - } - } - newRootScriptInfoMap.set(path, true); - } - if (projectRootFilesMap.size > newRootScriptInfoMap.size) { - projectRootFilesMap.forEach((value, path) => { - if (!newRootScriptInfoMap.has(path)) { - if (value.info) { - project.removeFile( - value.info, - project.fileExists(path), - /*detachFromProject*/ - true - ); - } else { - projectRootFilesMap.delete(path); - } - } - }); - } - project.markAsDirty(); - } - updateRootAndOptionsOfNonInferredProject(project, newUncheckedFiles, propertyReader, newOptions, newTypeAcquisition, compileOnSave, watchOptions) { - project.setCompilerOptions(newOptions); - project.setWatchOptions(watchOptions); - if (compileOnSave !== void 0) { - project.compileOnSaveEnabled = compileOnSave; - } - this.addFilesToNonInferredProject(project, newUncheckedFiles, propertyReader, newTypeAcquisition); - } - /** - * Reload the file names from config file specs and update the project graph - * - * @internal - */ - reloadFileNamesOfConfiguredProject(project) { - const fileNames = this.reloadFileNamesOfParsedConfig(project.getConfigFilePath(), this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath).config); - project.updateErrorOnNoInputFiles(fileNames); - this.updateNonInferredProjectFiles(project, fileNames.concat(project.getExternalFiles()), fileNamePropertyReader); - return project.updateGraph(); - } - /** @internal */ - reloadFileNamesOfParsedConfig(configFileName, config) { - if (config.reloadLevel === void 0) - return config.parsedCommandLine.fileNames; - Debug.assert(config.reloadLevel === 1 /* Partial */); - const configFileSpecs = config.parsedCommandLine.options.configFile.configFileSpecs; - const fileNames = getFileNamesFromConfigSpecs( - configFileSpecs, - getDirectoryPath(configFileName), - config.parsedCommandLine.options, - config.cachedDirectoryStructureHost, - this.hostConfiguration.extraFileExtensions - ); - config.parsedCommandLine = { ...config.parsedCommandLine, fileNames }; - return fileNames; - } - /** @internal */ - setFileNamesOfAutoImportProviderProject(project, fileNames) { - this.updateNonInferredProjectFiles(project, fileNames, fileNamePropertyReader); - } - /** - * Read the config file of the project again by clearing the cache and update the project graph - * - * @internal - */ - reloadConfiguredProject(project, reason, isInitialLoad, clearSemanticCache) { - const host = project.getCachedDirectoryStructureHost(); - if (clearSemanticCache) - this.clearSemanticCache(project); - host.clearCache(); - const configFileName = project.getConfigFilePath(); - this.logger.info(`${isInitialLoad ? "Loading" : "Reloading"} configured project ${configFileName}`); - this.loadConfiguredProject(project, reason); - project.updateGraph(); - this.sendConfigFileDiagEvent(project, configFileName); - } - /** @internal */ - clearSemanticCache(project) { - project.resolutionCache.clear(); - project.getLanguageService( - /*ensureSynchronized*/ - false - ).cleanupSemanticCache(); - project.cleanupProgram(); - project.markAsDirty(); - } - sendConfigFileDiagEvent(project, triggerFile) { - if (!this.eventHandler || this.suppressDiagnosticEvents) { - return; - } - const diagnostics = project.getLanguageService().getCompilerOptionsDiagnostics(); - diagnostics.push(...project.getAllProjectErrors()); - this.eventHandler({ - eventName: ConfigFileDiagEvent, - data: { configFileName: project.getConfigFilePath(), diagnostics, triggerFile } - }); - } - getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) { - if (!this.useInferredProjectPerProjectRoot || // Its a dynamic info opened without project root - info.isDynamic && projectRootPath === void 0) { - return void 0; - } - if (projectRootPath) { - const canonicalProjectRootPath = this.toCanonicalFileName(projectRootPath); - for (const project of this.inferredProjects) { - if (project.projectRootPath === canonicalProjectRootPath) { - return project; - } - } - return this.createInferredProject( - projectRootPath, - /*isSingleInferredProject*/ - false, - projectRootPath - ); - } - let bestMatch; - for (const project of this.inferredProjects) { - if (!project.projectRootPath) - continue; - if (!containsPath(project.projectRootPath, info.path, this.host.getCurrentDirectory(), !this.host.useCaseSensitiveFileNames)) - continue; - if (bestMatch && bestMatch.projectRootPath.length > project.projectRootPath.length) - continue; - bestMatch = project; - } - return bestMatch; - } - getOrCreateSingleInferredProjectIfEnabled() { - if (!this.useSingleInferredProject) { - return void 0; - } - if (this.inferredProjects.length > 0 && this.inferredProjects[0].projectRootPath === void 0) { - return this.inferredProjects[0]; - } - return this.createInferredProject( - "", - /*isSingleInferredProject*/ - true - ); - } - getOrCreateSingleInferredWithoutProjectRoot(currentDirectory) { - Debug.assert(!this.useSingleInferredProject); - const expectedCurrentDirectory = this.toCanonicalFileName(this.getNormalizedAbsolutePath(currentDirectory)); - for (const inferredProject of this.inferredProjects) { - if (!inferredProject.projectRootPath && inferredProject.isOrphan() && inferredProject.canonicalCurrentDirectory === expectedCurrentDirectory) { - return inferredProject; - } - } - return this.createInferredProject(currentDirectory); - } - createInferredProject(currentDirectory, isSingleInferredProject, projectRootPath) { - const compilerOptions = projectRootPath && this.compilerOptionsForInferredProjectsPerProjectRoot.get(projectRootPath) || this.compilerOptionsForInferredProjects; - let watchOptionsAndErrors; - let typeAcquisition; - if (projectRootPath) { - watchOptionsAndErrors = this.watchOptionsForInferredProjectsPerProjectRoot.get(projectRootPath); - typeAcquisition = this.typeAcquisitionForInferredProjectsPerProjectRoot.get(projectRootPath); - } - if (watchOptionsAndErrors === void 0) { - watchOptionsAndErrors = this.watchOptionsForInferredProjects; - } - if (typeAcquisition === void 0) { - typeAcquisition = this.typeAcquisitionForInferredProjects; - } - watchOptionsAndErrors = watchOptionsAndErrors || void 0; - const project = new InferredProject2(this, this.documentRegistry, compilerOptions, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions, projectRootPath, currentDirectory, typeAcquisition); - project.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors); - if (isSingleInferredProject) { - this.inferredProjects.unshift(project); - } else { - this.inferredProjects.push(project); - } - return project; - } - /** @internal */ - getOrCreateScriptInfoNotOpenedByClient(uncheckedFileName, currentDirectory, hostToQueryFileExistsOn) { - return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( - toNormalizedPath(uncheckedFileName), - currentDirectory, - /*scriptKind*/ - void 0, - /*hasMixedContent*/ - void 0, - hostToQueryFileExistsOn - ); - } - getScriptInfo(uncheckedFileName) { - return this.getScriptInfoForNormalizedPath(toNormalizedPath(uncheckedFileName)); - } - /** @internal */ - getScriptInfoOrConfig(uncheckedFileName) { - const path = toNormalizedPath(uncheckedFileName); - const info = this.getScriptInfoForNormalizedPath(path); - if (info) - return info; - const configProject = this.configuredProjects.get(this.toPath(uncheckedFileName)); - return configProject && configProject.getCompilerOptions().configFile; - } - /** @internal */ - logErrorForScriptInfoNotFound(fileName) { - const names = arrayFrom(this.filenameToScriptInfo.entries(), ([path, scriptInfo]) => ({ path, fileName: scriptInfo.fileName })); - this.logger.msg(`Could not find file ${JSON.stringify(fileName)}. -All files are: ${JSON.stringify(names)}`, "Err" /* Err */); - } - /** - * Returns the projects that contain script info through SymLink - * Note that this does not return projects in info.containingProjects - * - * @internal - */ - getSymlinkedProjects(info) { - let projects; - if (this.realpathToScriptInfos) { - const realpath = info.getRealpathIfDifferent(); - if (realpath) { - forEach(this.realpathToScriptInfos.get(realpath), combineProjects); - } - forEach(this.realpathToScriptInfos.get(info.path), combineProjects); - } - return projects; - function combineProjects(toAddInfo) { - if (toAddInfo !== info) { - for (const project of toAddInfo.containingProjects) { - if (project.languageServiceEnabled && !project.isOrphan() && !project.getCompilerOptions().preserveSymlinks && !info.isAttached(project)) { - if (!projects) { - projects = createMultiMap(); - projects.add(toAddInfo.path, project); - } else if (!forEachEntry(projects, (projs, path) => path === toAddInfo.path ? false : contains(projs, project))) { - projects.add(toAddInfo.path, project); - } - } - } - } - } - } - watchClosedScriptInfo(info) { - Debug.assert(!info.fileWatcher); - if (!info.isDynamicOrHasMixedContent() && (!this.globalCacheLocationDirectoryPath || !startsWith(info.path, this.globalCacheLocationDirectoryPath))) { - const indexOfNodeModules = info.path.indexOf("/node_modules/"); - if (!this.host.getModifiedTime || indexOfNodeModules === -1) { - info.fileWatcher = this.watchFactory.watchFile( - info.fileName, - (_fileName, eventKind) => this.onSourceFileChanged(info, eventKind), - 500 /* Medium */, - this.hostConfiguration.watchOptions, - WatchType.ClosedScriptInfo - ); - } else { - info.mTime = this.getModifiedTime(info); - info.fileWatcher = this.watchClosedScriptInfoInNodeModules(info.path.substr(0, indexOfNodeModules)); - } - } - } - createNodeModulesWatcher(dir) { - const watcher = this.watchFactory.watchDirectory( - dir, - (fileOrDirectory) => { - var _a; - const fileOrDirectoryPath = removeIgnoredPath(this.toPath(fileOrDirectory)); - if (!fileOrDirectoryPath) - return; - const basename = getBaseFileName(fileOrDirectoryPath); - if (((_a = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.size) && (basename === "package.json" || basename === "node_modules")) { - result.affectedModuleSpecifierCacheProjects.forEach((projectName) => { - var _a2, _b; - (_b = (_a2 = this.findProject(projectName)) == null ? void 0 : _a2.getModuleSpecifierCache()) == null ? void 0 : _b.clear(); - }); - } - if (result.refreshScriptInfoRefCount) { - if (dir === fileOrDirectoryPath) { - this.refreshScriptInfosInDirectory(dir); - } else { - const info = this.getScriptInfoForPath(fileOrDirectoryPath); - if (info) { - if (isScriptInfoWatchedFromNodeModules(info)) { - this.refreshScriptInfo(info); - } - } else if (!hasExtension(fileOrDirectoryPath)) { - this.refreshScriptInfosInDirectory(fileOrDirectoryPath); - } - } - } - }, - 1 /* Recursive */, - this.hostConfiguration.watchOptions, - WatchType.NodeModules - ); - const result = { - refreshScriptInfoRefCount: 0, - affectedModuleSpecifierCacheProjects: void 0, - close: () => { - var _a; - if (!result.refreshScriptInfoRefCount && !((_a = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.size)) { - watcher.close(); - this.nodeModulesWatchers.delete(dir); - } - } - }; - this.nodeModulesWatchers.set(dir, result); - return result; - } - /** @internal */ - watchPackageJsonsInNodeModules(dir, project) { - const watcher = this.nodeModulesWatchers.get(dir) || this.createNodeModulesWatcher(dir); - (watcher.affectedModuleSpecifierCacheProjects || (watcher.affectedModuleSpecifierCacheProjects = /* @__PURE__ */ new Set())).add(project.getProjectName()); - return { - close: () => { - var _a; - (_a = watcher.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.delete(project.getProjectName()); - watcher.close(); - } - }; - } - watchClosedScriptInfoInNodeModules(dir) { - const watchDir = dir + "/node_modules"; - const watcher = this.nodeModulesWatchers.get(watchDir) || this.createNodeModulesWatcher(watchDir); - watcher.refreshScriptInfoRefCount++; - return { - close: () => { - watcher.refreshScriptInfoRefCount--; - watcher.close(); - } - }; - } - getModifiedTime(info) { - return (this.host.getModifiedTime(info.path) || missingFileModifiedTime).getTime(); - } - refreshScriptInfo(info) { - const mTime = this.getModifiedTime(info); - if (mTime !== info.mTime) { - const eventKind = getFileWatcherEventKind(info.mTime, mTime); - info.mTime = mTime; - this.onSourceFileChanged(info, eventKind); - } - } - refreshScriptInfosInDirectory(dir) { - dir = dir + directorySeparator; - this.filenameToScriptInfo.forEach((info) => { - if (isScriptInfoWatchedFromNodeModules(info) && startsWith(info.path, dir)) { - this.refreshScriptInfo(info); - } - }); - } - stopWatchingScriptInfo(info) { - if (info.fileWatcher) { - info.fileWatcher.close(); - info.fileWatcher = void 0; - } - } - getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(fileName, currentDirectory, scriptKind, hasMixedContent, hostToQueryFileExistsOn) { - if (isRootedDiskPath(fileName) || isDynamicFileName(fileName)) { - return this.getOrCreateScriptInfoWorker( - fileName, - currentDirectory, - /*openedByClient*/ - false, - /*fileContent*/ - void 0, - scriptKind, - hasMixedContent, - hostToQueryFileExistsOn - ); - } - const info = this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(fileName)); - if (info) { - return info; - } - return void 0; - } - getOrCreateScriptInfoOpenedByClientForNormalizedPath(fileName, currentDirectory, fileContent, scriptKind, hasMixedContent) { - return this.getOrCreateScriptInfoWorker( - fileName, - currentDirectory, - /*openedByClient*/ - true, - fileContent, - scriptKind, - hasMixedContent - ); - } - getOrCreateScriptInfoForNormalizedPath(fileName, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn) { - return this.getOrCreateScriptInfoWorker(fileName, this.currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn); - } - getOrCreateScriptInfoWorker(fileName, currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn) { - Debug.assert(fileContent === void 0 || openedByClient, "ScriptInfo needs to be opened by client to be able to set its user defined content"); - const path = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName); - let info = this.getScriptInfoForPath(path); - if (!info) { - const isDynamic = isDynamicFileName(fileName); - Debug.assert(isRootedDiskPath(fileName) || isDynamic || openedByClient, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })} -Script info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`); - Debug.assert(!isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })} -Open script files with non rooted disk path opened with current directory context cannot have same canonical names`); - Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })} -Dynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`); - if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) { - return; - } - info = new ScriptInfo(this.host, fileName, scriptKind, !!hasMixedContent, path, this.filenameToScriptInfoVersion.get(path)); - this.filenameToScriptInfo.set(info.path, info); - this.filenameToScriptInfoVersion.delete(info.path); - if (!openedByClient) { - this.watchClosedScriptInfo(info); - } else if (!isRootedDiskPath(fileName) && (!isDynamic || this.currentDirectory !== currentDirectory)) { - this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(fileName), info); - } - } - if (openedByClient) { - this.stopWatchingScriptInfo(info); - info.open(fileContent); - if (hasMixedContent) { - info.registerFileUpdate(); - } - } - return info; - } - /** - * This gets the script info for the normalized path. If the path is not rooted disk path then the open script info with project root context is preferred - */ - getScriptInfoForNormalizedPath(fileName) { - return !isRootedDiskPath(fileName) && this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(fileName)) || this.getScriptInfoForPath(normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName)); - } - getScriptInfoForPath(fileName) { - return this.filenameToScriptInfo.get(fileName); - } - /** @internal */ - getDocumentPositionMapper(project, generatedFileName, sourceFileName) { - const declarationInfo = this.getOrCreateScriptInfoNotOpenedByClient(generatedFileName, project.currentDirectory, this.host); - if (!declarationInfo) { - if (sourceFileName) { - project.addGeneratedFileWatch(generatedFileName, sourceFileName); - } - return void 0; - } - declarationInfo.getSnapshot(); - if (isString(declarationInfo.sourceMapFilePath)) { - const sourceMapFileInfo2 = this.getScriptInfoForPath(declarationInfo.sourceMapFilePath); - if (sourceMapFileInfo2) { - sourceMapFileInfo2.getSnapshot(); - if (sourceMapFileInfo2.documentPositionMapper !== void 0) { - sourceMapFileInfo2.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, sourceMapFileInfo2.sourceInfos); - return sourceMapFileInfo2.documentPositionMapper ? sourceMapFileInfo2.documentPositionMapper : void 0; - } - } - declarationInfo.sourceMapFilePath = void 0; - } else if (declarationInfo.sourceMapFilePath) { - declarationInfo.sourceMapFilePath.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, declarationInfo.sourceMapFilePath.sourceInfos); - return void 0; - } else if (declarationInfo.sourceMapFilePath !== void 0) { - return void 0; - } - let sourceMapFileInfo; - let mapFileNameFromDeclarationInfo; - let readMapFile = (mapFileName, mapFileNameFromDts) => { - const mapInfo = this.getOrCreateScriptInfoNotOpenedByClient(mapFileName, project.currentDirectory, this.host); - if (!mapInfo) { - mapFileNameFromDeclarationInfo = mapFileNameFromDts; - return void 0; - } - sourceMapFileInfo = mapInfo; - const snap = mapInfo.getSnapshot(); - if (mapInfo.documentPositionMapper !== void 0) - return mapInfo.documentPositionMapper; - return getSnapshotText(snap); - }; - const projectName = project.projectName; - const documentPositionMapper = getDocumentPositionMapper( - { getCanonicalFileName: this.toCanonicalFileName, log: (s) => this.logger.info(s), getSourceFileLike: (f) => this.getSourceFileLike(f, projectName, declarationInfo) }, - declarationInfo.fileName, - declarationInfo.textStorage.getLineInfo(), - readMapFile - ); - readMapFile = void 0; - if (sourceMapFileInfo) { - declarationInfo.sourceMapFilePath = sourceMapFileInfo.path; - sourceMapFileInfo.declarationInfoPath = declarationInfo.path; - sourceMapFileInfo.documentPositionMapper = documentPositionMapper || false; - sourceMapFileInfo.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, sourceMapFileInfo.sourceInfos); - } else if (mapFileNameFromDeclarationInfo) { - declarationInfo.sourceMapFilePath = { - watcher: this.addMissingSourceMapFile( - project.currentDirectory === this.currentDirectory ? mapFileNameFromDeclarationInfo : getNormalizedAbsolutePath(mapFileNameFromDeclarationInfo, project.currentDirectory), - declarationInfo.path - ), - sourceInfos: this.addSourceInfoToSourceMap(sourceFileName, project) - }; - } else { - declarationInfo.sourceMapFilePath = false; - } - return documentPositionMapper; - } - addSourceInfoToSourceMap(sourceFileName, project, sourceInfos) { - if (sourceFileName) { - const sourceInfo = this.getOrCreateScriptInfoNotOpenedByClient(sourceFileName, project.currentDirectory, project.directoryStructureHost); - (sourceInfos || (sourceInfos = /* @__PURE__ */ new Set())).add(sourceInfo.path); - } - return sourceInfos; - } - addMissingSourceMapFile(mapFileName, declarationInfoPath) { - const fileWatcher = this.watchFactory.watchFile( - mapFileName, - () => { - const declarationInfo = this.getScriptInfoForPath(declarationInfoPath); - if (declarationInfo && declarationInfo.sourceMapFilePath && !isString(declarationInfo.sourceMapFilePath)) { - this.delayUpdateProjectGraphs( - declarationInfo.containingProjects, - /*clearSourceMapperCache*/ - true - ); - this.delayUpdateSourceInfoProjects(declarationInfo.sourceMapFilePath.sourceInfos); - declarationInfo.closeSourceMapFileWatcher(); - } - }, - 2e3 /* High */, - this.hostConfiguration.watchOptions, - WatchType.MissingSourceMapFile - ); - return fileWatcher; - } - /** @internal */ - getSourceFileLike(fileName, projectNameOrProject, declarationInfo) { - const project = projectNameOrProject.projectName ? projectNameOrProject : this.findProject(projectNameOrProject); - if (project) { - const path = project.toPath(fileName); - const sourceFile = project.getSourceFile(path); - if (sourceFile && sourceFile.resolvedPath === path) - return sourceFile; - } - const info = this.getOrCreateScriptInfoNotOpenedByClient(fileName, (project || this).currentDirectory, project ? project.directoryStructureHost : this.host); - if (!info) - return void 0; - if (declarationInfo && isString(declarationInfo.sourceMapFilePath) && info !== declarationInfo) { - const sourceMapInfo = this.getScriptInfoForPath(declarationInfo.sourceMapFilePath); - if (sourceMapInfo) { - (sourceMapInfo.sourceInfos || (sourceMapInfo.sourceInfos = /* @__PURE__ */ new Set())).add(info.path); - } - } - if (info.cacheSourceFile) - return info.cacheSourceFile.sourceFile; - if (!info.sourceFileLike) { - info.sourceFileLike = { - get text() { - Debug.fail("shouldnt need text"); - return ""; - }, - getLineAndCharacterOfPosition: (pos) => { - const lineOffset = info.positionToLineOffset(pos); - return { line: lineOffset.line - 1, character: lineOffset.offset - 1 }; - }, - getPositionOfLineAndCharacter: (line, character, allowEdits) => info.lineOffsetToPosition(line + 1, character + 1, allowEdits) - }; - } - return info.sourceFileLike; - } - /** @internal */ - setPerformanceEventHandler(performanceEventHandler) { - this.performanceEventHandler = performanceEventHandler; - } - setHostConfiguration(args) { - var _a; - if (args.file) { - const info = this.getScriptInfoForNormalizedPath(toNormalizedPath(args.file)); - if (info) { - info.setOptions(convertFormatOptions(args.formatOptions), args.preferences); - this.logger.info(`Host configuration update for file ${args.file}`); - } - } else { - if (args.hostInfo !== void 0) { - this.hostConfiguration.hostInfo = args.hostInfo; - this.logger.info(`Host information ${args.hostInfo}`); - } - if (args.formatOptions) { - this.hostConfiguration.formatCodeOptions = { ...this.hostConfiguration.formatCodeOptions, ...convertFormatOptions(args.formatOptions) }; - this.logger.info("Format host information updated"); - } - if (args.preferences) { - const { - lazyConfiguredProjectsFromExternalProject, - includePackageJsonAutoImports - } = this.hostConfiguration.preferences; - this.hostConfiguration.preferences = { ...this.hostConfiguration.preferences, ...args.preferences }; - if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) { - this.configuredProjects.forEach((project) => { - if (project.hasExternalProjectRef() && project.pendingReload === 2 /* Full */ && !this.pendingProjectUpdates.has(project.getProjectName())) { - project.updateGraph(); - } - }); - } - if (includePackageJsonAutoImports !== args.preferences.includePackageJsonAutoImports) { - this.invalidateProjectPackageJson( - /*packageJsonPath*/ - void 0 - ); - } - } - if (args.extraFileExtensions) { - this.hostConfiguration.extraFileExtensions = args.extraFileExtensions; - this.reloadProjects(); - this.logger.info("Host file extension mappings updated"); - } - if (args.watchOptions) { - this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) == null ? void 0 : _a.watchOptions; - this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`); - } - } - } - /** @internal */ - getWatchOptions(project) { - return this.getWatchOptionsFromProjectWatchOptions(project.getWatchOptions()); - } - /** @internal */ - getWatchOptionsFromProjectWatchOptions(projectOptions) { - return projectOptions && this.hostConfiguration.watchOptions ? { ...this.hostConfiguration.watchOptions, ...projectOptions } : projectOptions || this.hostConfiguration.watchOptions; - } - closeLog() { - this.logger.close(); - } - /** - * This function rebuilds the project for every file opened by the client - * This does not reload contents of open files from disk. But we could do that if needed - */ - reloadProjects() { - this.logger.info("reload projects."); - this.filenameToScriptInfo.forEach((info) => { - if (this.openFiles.has(info.path)) - return; - if (!info.fileWatcher) - return; - this.onSourceFileChanged(info, this.host.fileExists(info.fileName) ? 1 /* Changed */ : 2 /* Deleted */); - }); - this.pendingProjectUpdates.forEach((_project, projectName) => { - this.throttledOperations.cancel(projectName); - this.pendingProjectUpdates.delete(projectName); - }); - this.throttledOperations.cancel(ensureProjectForOpenFileSchedule); - this.pendingEnsureProjectForOpenFiles = false; - this.configFileExistenceInfoCache.forEach((info) => { - if (info.config) - info.config.reloadLevel = 2 /* Full */; - }); - this.reloadConfiguredProjectForFiles( - this.openFiles, - /*clearSemanticCache*/ - true, - /*delayReload*/ - false, - returnTrue, - "User requested reload projects" - ); - this.externalProjects.forEach((project) => { - this.clearSemanticCache(project); - project.updateGraph(); - }); - this.inferredProjects.forEach((project) => this.clearSemanticCache(project)); - this.ensureProjectForOpenFiles(); - } - /** - * This function goes through all the openFiles and tries to file the config file for them. - * If the config file is found and it refers to existing project, it reloads it either immediately - * or schedules it for reload depending on delayReload option - * If there is no existing project it just opens the configured project for the config file - * reloadForInfo provides a way to filter out files to reload configured project for - */ - reloadConfiguredProjectForFiles(openFiles, clearSemanticCache, delayReload, shouldReloadProjectFor, reason) { - const updatedProjects = /* @__PURE__ */ new Map(); - const reloadChildProject = (child) => { - if (!updatedProjects.has(child.canonicalConfigFilePath)) { - updatedProjects.set(child.canonicalConfigFilePath, true); - this.reloadConfiguredProject( - child, - reason, - /*isInitialLoad*/ - false, - clearSemanticCache - ); - } - }; - openFiles == null ? void 0 : openFiles.forEach((openFileValue, path) => { - this.configFileForOpenFiles.delete(path); - if (!shouldReloadProjectFor(openFileValue)) { - return; - } - const info = this.getScriptInfoForPath(path); - Debug.assert(info.isScriptOpen()); - const configFileName = this.getConfigFileNameForFile(info); - if (configFileName) { - const project = this.findConfiguredProjectByProjectName(configFileName) || this.createConfiguredProject(configFileName); - if (!updatedProjects.has(project.canonicalConfigFilePath)) { - updatedProjects.set(project.canonicalConfigFilePath, true); - if (delayReload) { - project.pendingReload = 2 /* Full */; - project.pendingReloadReason = reason; - if (clearSemanticCache) - this.clearSemanticCache(project); - this.delayUpdateProjectGraph(project); - } else { - this.reloadConfiguredProject( - project, - reason, - /*isInitialLoad*/ - false, - clearSemanticCache - ); - if (!projectContainsInfoDirectly(project, info)) { - const referencedProject = forEachResolvedProjectReferenceProject( - project, - info.path, - (child) => { - reloadChildProject(child); - return projectContainsInfoDirectly(child, info); - }, - 1 /* FindCreate */ - ); - if (referencedProject) { - forEachResolvedProjectReferenceProject( - project, - /*fileName*/ - void 0, - reloadChildProject, - 0 /* Find */ - ); - } - } - } - } - } - }); - } - /** - * Remove the root of inferred project if script info is part of another project - */ - removeRootOfInferredProjectIfNowPartOfOtherProject(info) { - Debug.assert(info.containingProjects.length > 0); - const firstProject = info.containingProjects[0]; - if (!firstProject.isOrphan() && isInferredProject(firstProject) && firstProject.isRoot(info) && forEach(info.containingProjects, (p) => p !== firstProject && !p.isOrphan())) { - firstProject.removeFile( - info, - /*fileExists*/ - true, - /*detachFromProject*/ - true - ); - } - } - /** - * This function is to update the project structure for every inferred project. - * It is called on the premise that all the configured projects are - * up to date. - * This will go through open files and assign them to inferred project if open file is not part of any other project - * After that all the inferred project graphs are updated - */ - ensureProjectForOpenFiles() { - this.logger.info("Before ensureProjectForOpenFiles:"); - this.printProjects(); - this.openFiles.forEach((projectRootPath, path) => { - const info = this.getScriptInfoForPath(path); - if (info.isOrphan()) { - this.assignOrphanScriptInfoToInferredProject(info, projectRootPath); - } else { - this.removeRootOfInferredProjectIfNowPartOfOtherProject(info); - } - }); - this.pendingEnsureProjectForOpenFiles = false; - this.inferredProjects.forEach(updateProjectIfDirty); - this.logger.info("After ensureProjectForOpenFiles:"); - this.printProjects(); - } - /** - * Open file whose contents is managed by the client - * @param filename is absolute pathname - * @param fileContent is a known version of the file content that is more up to date than the one on disk - */ - openClientFile(fileName, fileContent, scriptKind, projectRootPath) { - return this.openClientFileWithNormalizedPath( - toNormalizedPath(fileName), - fileContent, - scriptKind, - /*hasMixedContent*/ - false, - projectRootPath ? toNormalizedPath(projectRootPath) : void 0 - ); - } - /** @internal */ - getOriginalLocationEnsuringConfiguredProject(project, location) { - const isSourceOfProjectReferenceRedirect = project.isSourceOfProjectReferenceRedirect(location.fileName); - const originalLocation = isSourceOfProjectReferenceRedirect ? location : project.getSourceMapper().tryGetSourcePosition(location); - if (!originalLocation) - return void 0; - const { fileName } = originalLocation; - const scriptInfo = this.getScriptInfo(fileName); - if (!scriptInfo && !this.host.fileExists(fileName)) - return void 0; - const originalFileInfo = { fileName: toNormalizedPath(fileName), path: this.toPath(fileName) }; - const configFileName = this.getConfigFileNameForFile(originalFileInfo); - if (!configFileName) - return void 0; - let configuredProject = this.findConfiguredProjectByProjectName(configFileName); - if (!configuredProject) { - if (project.getCompilerOptions().disableReferencedProjectLoad) { - if (isSourceOfProjectReferenceRedirect) { - return location; - } - return (scriptInfo == null ? void 0 : scriptInfo.containingProjects.length) ? originalLocation : location; - } - configuredProject = this.createAndLoadConfiguredProject(configFileName, `Creating project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}`); - } - updateProjectIfDirty(configuredProject); - const projectContainsOriginalInfo = (project2) => { - const info = this.getScriptInfo(fileName); - return info && projectContainsInfoDirectly(project2, info); - }; - if (configuredProject.isSolution() || !projectContainsOriginalInfo(configuredProject)) { - configuredProject = forEachResolvedProjectReferenceProject( - configuredProject, - fileName, - (child) => { - updateProjectIfDirty(child); - return projectContainsOriginalInfo(child) ? child : void 0; - }, - 2 /* FindCreateLoad */, - `Creating project referenced in solution ${configuredProject.projectName} to find possible configured project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}` - ); - if (!configuredProject) - return void 0; - if (configuredProject === project) - return originalLocation; - } - addOriginalConfiguredProject(configuredProject); - const originalScriptInfo = this.getScriptInfo(fileName); - if (!originalScriptInfo || !originalScriptInfo.containingProjects.length) - return void 0; - originalScriptInfo.containingProjects.forEach((project2) => { - if (isConfiguredProject(project2)) { - addOriginalConfiguredProject(project2); - } - }); - return originalLocation; - function addOriginalConfiguredProject(originalProject) { - if (!project.originalConfiguredProjects) { - project.originalConfiguredProjects = /* @__PURE__ */ new Set(); - } - project.originalConfiguredProjects.add(originalProject.canonicalConfigFilePath); - } - } - /** @internal */ - fileExists(fileName) { - return !!this.getScriptInfoForNormalizedPath(fileName) || this.host.fileExists(fileName); - } - findExternalProjectContainingOpenScriptInfo(info) { - return find(this.externalProjects, (proj) => { - updateProjectIfDirty(proj); - return proj.containsScriptInfo(info); - }); - } - getOrCreateOpenScriptInfo(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath) { - const info = this.getOrCreateScriptInfoOpenedByClientForNormalizedPath(fileName, projectRootPath ? this.getNormalizedAbsolutePath(projectRootPath) : this.currentDirectory, fileContent, scriptKind, hasMixedContent); - this.openFiles.set(info.path, projectRootPath); - return info; - } - assignProjectToOpenedScriptInfo(info) { - let configFileName; - let configFileErrors; - let project = this.findExternalProjectContainingOpenScriptInfo(info); - let retainProjects; - let projectForConfigFileDiag; - let defaultConfigProjectIsCreated = false; - if (!project && this.serverMode === 0 /* Semantic */) { - configFileName = this.getConfigFileNameForFile(info); - if (configFileName) { - project = this.findConfiguredProjectByProjectName(configFileName); - if (!project) { - project = this.createLoadAndUpdateConfiguredProject(configFileName, `Creating possible configured project for ${info.fileName} to open`); - defaultConfigProjectIsCreated = true; - } else { - updateProjectIfDirty(project); - } - projectForConfigFileDiag = project.containsScriptInfo(info) ? project : void 0; - retainProjects = project; - if (!projectContainsInfoDirectly(project, info)) { - forEachResolvedProjectReferenceProject( - project, - info.path, - (child) => { - updateProjectIfDirty(child); - if (!isArray(retainProjects)) { - retainProjects = [project, child]; - } else { - retainProjects.push(child); - } - if (projectContainsInfoDirectly(child, info)) { - projectForConfigFileDiag = child; - return child; - } - if (!projectForConfigFileDiag && child.containsScriptInfo(info)) { - projectForConfigFileDiag = child; - } - }, - 2 /* FindCreateLoad */, - `Creating project referenced in solution ${project.projectName} to find possible configured project for ${info.fileName} to open` - ); - } - if (projectForConfigFileDiag) { - configFileName = projectForConfigFileDiag.getConfigFilePath(); - if (projectForConfigFileDiag !== project || defaultConfigProjectIsCreated) { - configFileErrors = projectForConfigFileDiag.getAllProjectErrors(); - this.sendConfigFileDiagEvent(projectForConfigFileDiag, info.fileName); - } - } else { - configFileName = void 0; - } - this.createAncestorProjects(info, project); - } - } - info.containingProjects.forEach(updateProjectIfDirty); - if (info.isOrphan()) { - if (isArray(retainProjects)) { - retainProjects.forEach((project2) => this.sendConfigFileDiagEvent(project2, info.fileName)); - } else if (retainProjects) { - this.sendConfigFileDiagEvent(retainProjects, info.fileName); - } - Debug.assert(this.openFiles.has(info.path)); - this.assignOrphanScriptInfoToInferredProject(info, this.openFiles.get(info.path)); - } - Debug.assert(!info.isOrphan()); - return { configFileName, configFileErrors, retainProjects }; - } - createAncestorProjects(info, project) { - if (!info.isAttached(project)) - return; - while (true) { - if (!project.isInitialLoadPending() && (!project.getCompilerOptions().composite || project.getCompilerOptions().disableSolutionSearching)) - return; - const configFileName = this.getConfigFileNameForFile({ - fileName: project.getConfigFilePath(), - path: info.path, - configFileInfo: true - }); - if (!configFileName) - return; - const ancestor = this.findConfiguredProjectByProjectName(configFileName) || this.createConfiguredProjectWithDelayLoad(configFileName, `Creating project possibly referencing default composite project ${project.getProjectName()} of open file ${info.fileName}`); - if (ancestor.isInitialLoadPending()) { - ancestor.setPotentialProjectReference(project.canonicalConfigFilePath); - } - project = ancestor; - } - } - /** @internal */ - loadAncestorProjectTree(forProjects) { - forProjects = forProjects || mapDefinedEntries( - this.configuredProjects, - (key, project) => !project.isInitialLoadPending() ? [key, true] : void 0 - ); - const seenProjects = /* @__PURE__ */ new Set(); - for (const project of arrayFrom(this.configuredProjects.values())) { - if (forEachPotentialProjectReference(project, (potentialRefPath) => forProjects.has(potentialRefPath))) { - updateProjectIfDirty(project); - } - this.ensureProjectChildren(project, forProjects, seenProjects); - } - } - ensureProjectChildren(project, forProjects, seenProjects) { - var _a; - if (!tryAddToSet(seenProjects, project.canonicalConfigFilePath)) - return; - if (project.getCompilerOptions().disableReferencedProjectLoad) - return; - const children = (_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(); - if (!children) - return; - for (const child of children) { - if (!child) - continue; - const referencedProject = forEachResolvedProjectReference(child.references, (ref) => forProjects.has(ref.sourceFile.path) ? ref : void 0); - if (!referencedProject) - continue; - const configFileName = toNormalizedPath(child.sourceFile.fileName); - const childProject = project.projectService.findConfiguredProjectByProjectName(configFileName) || project.projectService.createAndLoadConfiguredProject(configFileName, `Creating project referenced by : ${project.projectName} as it references project ${referencedProject.sourceFile.fileName}`); - updateProjectIfDirty(childProject); - this.ensureProjectChildren(childProject, forProjects, seenProjects); - } - } - cleanupAfterOpeningFile(toRetainConfigProjects) { - this.removeOrphanConfiguredProjects(toRetainConfigProjects); - for (const inferredProject of this.inferredProjects.slice()) { - if (inferredProject.isOrphan()) { - this.removeProject(inferredProject); - } - } - this.removeOrphanScriptInfos(); - } - openClientFileWithNormalizedPath(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath) { - const info = this.getOrCreateOpenScriptInfo(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath); - const { retainProjects, ...result } = this.assignProjectToOpenedScriptInfo(info); - this.cleanupAfterOpeningFile(retainProjects); - this.telemetryOnOpenFile(info); - this.printProjects(); - return result; - } - removeOrphanConfiguredProjects(toRetainConfiguredProjects) { - const toRemoveConfiguredProjects = new Map(this.configuredProjects); - const markOriginalProjectsAsUsed = (project) => { - if (!project.isOrphan() && project.originalConfiguredProjects) { - project.originalConfiguredProjects.forEach( - (_value, configuredProjectPath) => { - const project2 = this.getConfiguredProjectByCanonicalConfigFilePath(configuredProjectPath); - return project2 && retainConfiguredProject(project2); - } - ); - } - }; - if (toRetainConfiguredProjects) { - if (isArray(toRetainConfiguredProjects)) { - toRetainConfiguredProjects.forEach(retainConfiguredProject); - } else { - retainConfiguredProject(toRetainConfiguredProjects); - } - } - this.inferredProjects.forEach(markOriginalProjectsAsUsed); - this.externalProjects.forEach(markOriginalProjectsAsUsed); - this.configuredProjects.forEach((project) => { - if (project.hasOpenRef()) { - retainConfiguredProject(project); - } else if (toRemoveConfiguredProjects.has(project.canonicalConfigFilePath)) { - forEachReferencedProject( - project, - (ref) => isRetained(ref) && retainConfiguredProject(project) - ); - } - }); - toRemoveConfiguredProjects.forEach((project) => this.removeProject(project)); - function isRetained(project) { - return project.hasOpenRef() || !toRemoveConfiguredProjects.has(project.canonicalConfigFilePath); - } - function retainConfiguredProject(project) { - if (toRemoveConfiguredProjects.delete(project.canonicalConfigFilePath)) { - markOriginalProjectsAsUsed(project); - forEachReferencedProject(project, retainConfiguredProject); - } - } - } - removeOrphanScriptInfos() { - const toRemoveScriptInfos = new Map(this.filenameToScriptInfo); - this.filenameToScriptInfo.forEach((info) => { - if (!info.isScriptOpen() && info.isOrphan() && !info.isContainedByBackgroundProject()) { - if (!info.sourceMapFilePath) - return; - let sourceInfos; - if (isString(info.sourceMapFilePath)) { - const sourceMapInfo = this.getScriptInfoForPath(info.sourceMapFilePath); - sourceInfos = sourceMapInfo && sourceMapInfo.sourceInfos; - } else { - sourceInfos = info.sourceMapFilePath.sourceInfos; - } - if (!sourceInfos) - return; - if (!forEachKey(sourceInfos, (path) => { - const info2 = this.getScriptInfoForPath(path); - return !!info2 && (info2.isScriptOpen() || !info2.isOrphan()); - })) { - return; - } - } - toRemoveScriptInfos.delete(info.path); - if (info.sourceMapFilePath) { - let sourceInfos; - if (isString(info.sourceMapFilePath)) { - toRemoveScriptInfos.delete(info.sourceMapFilePath); - const sourceMapInfo = this.getScriptInfoForPath(info.sourceMapFilePath); - sourceInfos = sourceMapInfo && sourceMapInfo.sourceInfos; - } else { - sourceInfos = info.sourceMapFilePath.sourceInfos; - } - if (sourceInfos) { - sourceInfos.forEach((_value, path) => toRemoveScriptInfos.delete(path)); - } - } - }); - toRemoveScriptInfos.forEach((info) => { - this.stopWatchingScriptInfo(info); - this.deleteScriptInfo(info); - info.closeSourceMapFileWatcher(); - }); - } - telemetryOnOpenFile(scriptInfo) { - if (this.serverMode !== 0 /* Semantic */ || !this.eventHandler || !scriptInfo.isJavaScript() || !addToSeen(this.allJsFilesForOpenFileTelemetry, scriptInfo.path)) { - return; - } - const project = this.ensureDefaultProjectForFile(scriptInfo); - if (!project.languageServiceEnabled) { - return; - } - const sourceFile = project.getSourceFile(scriptInfo.path); - const checkJs = !!sourceFile && !!sourceFile.checkJsDirective; - this.eventHandler({ eventName: OpenFileInfoTelemetryEvent, data: { info: { checkJs } } }); - } - closeClientFile(uncheckedFileName, skipAssignOrphanScriptInfosToInferredProject) { - const info = this.getScriptInfoForNormalizedPath(toNormalizedPath(uncheckedFileName)); - const result = info ? this.closeOpenFile(info, skipAssignOrphanScriptInfosToInferredProject) : false; - if (!skipAssignOrphanScriptInfosToInferredProject) { - this.printProjects(); - } - return result; - } - collectChanges(lastKnownProjectVersions, currentProjects, includeProjectReferenceRedirectInfo, result) { - for (const proj of currentProjects) { - const knownProject = find(lastKnownProjectVersions, (p) => p.projectName === proj.getProjectName()); - result.push(proj.getChangesSinceVersion(knownProject && knownProject.version, includeProjectReferenceRedirectInfo)); - } - } - /** @internal */ - synchronizeProjectList(knownProjects, includeProjectReferenceRedirectInfo) { - const files = []; - this.collectChanges(knownProjects, this.externalProjects, includeProjectReferenceRedirectInfo, files); - this.collectChanges(knownProjects, this.configuredProjects.values(), includeProjectReferenceRedirectInfo, files); - this.collectChanges(knownProjects, this.inferredProjects, includeProjectReferenceRedirectInfo, files); - return files; - } - /** @internal */ - applyChangesInOpenFiles(openFiles, changedFiles, closedFiles) { - let openScriptInfos; - let assignOrphanScriptInfosToInferredProject = false; - if (openFiles) { - for (const file of openFiles) { - const info = this.getOrCreateOpenScriptInfo( - toNormalizedPath(file.fileName), - file.content, - tryConvertScriptKindName(file.scriptKind), - file.hasMixedContent, - file.projectRootPath ? toNormalizedPath(file.projectRootPath) : void 0 - ); - (openScriptInfos || (openScriptInfos = [])).push(info); - } - } - if (changedFiles) { - for (const file of changedFiles) { - const scriptInfo = this.getScriptInfo(file.fileName); - Debug.assert(!!scriptInfo); - this.applyChangesToFile(scriptInfo, file.changes); - } - } - if (closedFiles) { - for (const file of closedFiles) { - assignOrphanScriptInfosToInferredProject = this.closeClientFile( - file, - /*skipAssignOrphanScriptInfosToInferredProject*/ - true - ) || assignOrphanScriptInfosToInferredProject; - } - } - let retainProjects; - if (openScriptInfos) { - retainProjects = flatMap(openScriptInfos, (info) => this.assignProjectToOpenedScriptInfo(info).retainProjects); - } - if (assignOrphanScriptInfosToInferredProject) { - this.assignOrphanScriptInfosToInferredProject(); - } - if (openScriptInfos) { - this.cleanupAfterOpeningFile(retainProjects); - openScriptInfos.forEach((info) => this.telemetryOnOpenFile(info)); - this.printProjects(); - } else if (length(closedFiles)) { - this.printProjects(); - } - } - /** @internal */ - applyChangesToFile(scriptInfo, changes) { - for (const change of changes) { - scriptInfo.editContent(change.span.start, change.span.start + change.span.length, change.newText); - } - } - closeConfiguredProjectReferencedFromExternalProject(configFile) { - const configuredProject = this.findConfiguredProjectByProjectName(configFile); - if (configuredProject) { - configuredProject.deleteExternalProjectReference(); - if (!configuredProject.hasOpenRef()) { - this.removeProject(configuredProject); - return; - } - } - } - closeExternalProject(uncheckedFileName) { - const fileName = toNormalizedPath(uncheckedFileName); - const configFiles = this.externalProjectToConfiguredProjectMap.get(fileName); - if (configFiles) { - for (const configFile of configFiles) { - this.closeConfiguredProjectReferencedFromExternalProject(configFile); - } - this.externalProjectToConfiguredProjectMap.delete(fileName); - } else { - const externalProject = this.findExternalProjectByProjectName(uncheckedFileName); - if (externalProject) { - this.removeProject(externalProject); - } - } - } - openExternalProjects(projects) { - const projectsToClose = arrayToMap(this.externalProjects, (p) => p.getProjectName(), (_) => true); - forEachKey(this.externalProjectToConfiguredProjectMap, (externalProjectName) => { - projectsToClose.set(externalProjectName, true); - }); - for (const externalProject of projects) { - this.openExternalProject(externalProject); - projectsToClose.delete(externalProject.projectFileName); - } - forEachKey(projectsToClose, (externalProjectName) => { - this.closeExternalProject(externalProjectName); - }); - } - static escapeFilenameForRegex(filename) { - return filename.replace(this.filenameEscapeRegexp, "\\$&"); - } - resetSafeList() { - this.safelist = defaultTypeSafeList; - } - applySafeList(proj) { - const { rootFiles } = proj; - const typeAcquisition = proj.typeAcquisition; - Debug.assert(!!typeAcquisition, "proj.typeAcquisition should be set by now"); - if (typeAcquisition.enable === false || typeAcquisition.disableFilenameBasedTypeAcquisition) { - return []; - } - const typeAcqInclude = typeAcquisition.include || (typeAcquisition.include = []); - const excludeRules = []; - const normalizedNames = rootFiles.map((f) => normalizeSlashes(f.fileName)); - const excludedFiles = []; - for (const name of Object.keys(this.safelist)) { - const rule2 = this.safelist[name]; - for (const root of normalizedNames) { - if (rule2.match.test(root)) { - this.logger.info(`Excluding files based on rule ${name} matching file '${root}'`); - if (rule2.types) { - for (const type of rule2.types) { - if (typeAcqInclude.indexOf(type) < 0) { - typeAcqInclude.push(type); - } - } - } - if (rule2.exclude) { - for (const exclude of rule2.exclude) { - const processedRule = root.replace(rule2.match, (...groups) => { - return exclude.map((groupNumberOrString) => { - if (typeof groupNumberOrString === "number") { - if (!isString(groups[groupNumberOrString])) { - this.logger.info(`Incorrect RegExp specification in safelist rule ${name} - not enough groups`); - return "\\*"; - } - return _ProjectService.escapeFilenameForRegex(groups[groupNumberOrString]); - } - return groupNumberOrString; - }).join(""); - }); - if (excludeRules.indexOf(processedRule) === -1) { - excludeRules.push(processedRule); - } - } - } else { - const escaped = _ProjectService.escapeFilenameForRegex(root); - if (excludeRules.indexOf(escaped) < 0) { - excludeRules.push(escaped); - } - } - } - } - } - const excludeRegexes = excludeRules.map((e) => new RegExp(e, "i")); - const filesToKeep = []; - for (let i = 0; i < proj.rootFiles.length; i++) { - if (excludeRegexes.some((re) => re.test(normalizedNames[i]))) { - excludedFiles.push(normalizedNames[i]); - } else { - let exclude = false; - if (typeAcquisition.enable) { - const baseName = getBaseFileName(toFileNameLowerCase(normalizedNames[i])); - if (fileExtensionIs(baseName, "js")) { - const inferredTypingName = removeFileExtension(baseName); - const cleanedTypingName = removeMinAndVersionNumbers(inferredTypingName); - const typeName = this.legacySafelist.get(cleanedTypingName); - if (typeName !== void 0) { - this.logger.info(`Excluded '${normalizedNames[i]}' because it matched ${cleanedTypingName} from the legacy safelist`); - excludedFiles.push(normalizedNames[i]); - exclude = true; - if (typeAcqInclude.indexOf(typeName) < 0) { - typeAcqInclude.push(typeName); - } - } - } - } - if (!exclude) { - if (/^.+[.-]min\.js$/.test(normalizedNames[i])) { - excludedFiles.push(normalizedNames[i]); - } else { - filesToKeep.push(proj.rootFiles[i]); - } - } - } - } - proj.rootFiles = filesToKeep; - return excludedFiles; - } - openExternalProject(proj) { - proj.typeAcquisition = proj.typeAcquisition || {}; - proj.typeAcquisition.include = proj.typeAcquisition.include || []; - proj.typeAcquisition.exclude = proj.typeAcquisition.exclude || []; - if (proj.typeAcquisition.enable === void 0) { - proj.typeAcquisition.enable = hasNoTypeScriptSource(proj.rootFiles.map((f) => f.fileName)); - } - const excludedFiles = this.applySafeList(proj); - let tsConfigFiles; - const rootFiles = []; - for (const file of proj.rootFiles) { - const normalized = toNormalizedPath(file.fileName); - if (getBaseConfigFileName(normalized)) { - if (this.serverMode === 0 /* Semantic */ && this.host.fileExists(normalized)) { - (tsConfigFiles || (tsConfigFiles = [])).push(normalized); - } - } else { - rootFiles.push(file); - } - } - if (tsConfigFiles) { - tsConfigFiles.sort(); - } - const externalProject = this.findExternalProjectByProjectName(proj.projectFileName); - let exisingConfigFiles; - if (externalProject) { - externalProject.excludedFiles = excludedFiles; - if (!tsConfigFiles) { - const compilerOptions = convertCompilerOptions(proj.options); - const watchOptionsAndErrors = convertWatchOptions(proj.options, externalProject.getCurrentDirectory()); - const lastFileExceededProgramSize = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(proj.projectFileName, compilerOptions, proj.rootFiles, externalFilePropertyReader); - if (lastFileExceededProgramSize) { - externalProject.disableLanguageService(lastFileExceededProgramSize); - } else { - externalProject.enableLanguageService(); - } - externalProject.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors); - this.updateRootAndOptionsOfNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, compilerOptions, proj.typeAcquisition, proj.options.compileOnSave, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions); - externalProject.updateGraph(); - return; - } - this.closeExternalProject(proj.projectFileName); - } else if (this.externalProjectToConfiguredProjectMap.get(proj.projectFileName)) { - if (!tsConfigFiles) { - this.closeExternalProject(proj.projectFileName); - } else { - const oldConfigFiles = this.externalProjectToConfiguredProjectMap.get(proj.projectFileName); - let iNew = 0; - let iOld = 0; - while (iNew < tsConfigFiles.length && iOld < oldConfigFiles.length) { - const newConfig = tsConfigFiles[iNew]; - const oldConfig = oldConfigFiles[iOld]; - if (oldConfig < newConfig) { - this.closeConfiguredProjectReferencedFromExternalProject(oldConfig); - iOld++; - } else if (oldConfig > newConfig) { - iNew++; - } else { - (exisingConfigFiles || (exisingConfigFiles = [])).push(oldConfig); - iOld++; - iNew++; - } - } - for (let i = iOld; i < oldConfigFiles.length; i++) { - this.closeConfiguredProjectReferencedFromExternalProject(oldConfigFiles[i]); - } - } - } - if (tsConfigFiles) { - this.externalProjectToConfiguredProjectMap.set(proj.projectFileName, tsConfigFiles); - for (const tsconfigFile of tsConfigFiles) { - let project = this.findConfiguredProjectByProjectName(tsconfigFile); - if (!project) { - project = this.getHostPreferences().lazyConfiguredProjectsFromExternalProject ? this.createConfiguredProjectWithDelayLoad(tsconfigFile, `Creating configured project in external project: ${proj.projectFileName}`) : this.createLoadAndUpdateConfiguredProject(tsconfigFile, `Creating configured project in external project: ${proj.projectFileName}`); - } - if (project && !contains(exisingConfigFiles, tsconfigFile)) { - project.addExternalProjectReference(); - } - } - } else { - this.externalProjectToConfiguredProjectMap.delete(proj.projectFileName); - const project = this.createExternalProject(proj.projectFileName, rootFiles, proj.options, proj.typeAcquisition, excludedFiles); - project.updateGraph(); - } - } - hasDeferredExtension() { - for (const extension of this.hostConfiguration.extraFileExtensions) { - if (extension.scriptKind === 7 /* Deferred */) { - return true; - } - } - return false; - } - /** - * Performs the initial steps of enabling a plugin by finding and instantiating the module for a plugin either asynchronously or synchronously - * @internal - */ - requestEnablePlugin(project, pluginConfigEntry, searchPaths) { - if (!this.host.importPlugin && !this.host.require) { - this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); - return; - } - this.logger.info(`Enabling plugin ${pluginConfigEntry.name} from candidate paths: ${searchPaths.join(",")}`); - if (!pluginConfigEntry.name || parsePackageName(pluginConfigEntry.name).rest) { - this.logger.info(`Skipped loading plugin ${pluginConfigEntry.name || JSON.stringify(pluginConfigEntry)} because only package name is allowed plugin name`); - return; - } - if (this.host.importPlugin) { - const importPromise = Project3.importServicePluginAsync( - pluginConfigEntry, - searchPaths, - this.host, - (s) => this.logger.info(s) - ); - this.pendingPluginEnablements ?? (this.pendingPluginEnablements = /* @__PURE__ */ new Map()); - let promises = this.pendingPluginEnablements.get(project); - if (!promises) - this.pendingPluginEnablements.set(project, promises = []); - promises.push(importPromise); - return; - } - this.endEnablePlugin(project, Project3.importServicePluginSync( - pluginConfigEntry, - searchPaths, - this.host, - (s) => this.logger.info(s) - )); - } - /** - * Performs the remaining steps of enabling a plugin after its module has been instantiated. - * @internal - */ - endEnablePlugin(project, { pluginConfigEntry, resolvedModule, errorLogs }) { - var _a; - if (resolvedModule) { - const configurationOverride = (_a = this.currentPluginConfigOverrides) == null ? void 0 : _a.get(pluginConfigEntry.name); - if (configurationOverride) { - const pluginName = pluginConfigEntry.name; - pluginConfigEntry = configurationOverride; - pluginConfigEntry.name = pluginName; - } - project.enableProxy(resolvedModule, pluginConfigEntry); - } else { - forEach(errorLogs, (message) => this.logger.info(message)); - this.logger.info(`Couldn't find ${pluginConfigEntry.name}`); - } - } - /** @internal */ - hasNewPluginEnablementRequests() { - return !!this.pendingPluginEnablements; - } - /** @internal */ - hasPendingPluginEnablements() { - return !!this.currentPluginEnablementPromise; - } - /** - * Waits for any ongoing plugin enablement requests to complete. - * - * @internal - */ - async waitForPendingPlugins() { - while (this.currentPluginEnablementPromise) { - await this.currentPluginEnablementPromise; - } - } - /** - * Starts enabling any requested plugins without waiting for the result. - * - * @internal - */ - enableRequestedPlugins() { - if (this.pendingPluginEnablements) { - void this.enableRequestedPluginsAsync(); - } - } - async enableRequestedPluginsAsync() { - if (this.currentPluginEnablementPromise) { - await this.waitForPendingPlugins(); - } - if (!this.pendingPluginEnablements) { - return; - } - const entries = arrayFrom(this.pendingPluginEnablements.entries()); - this.pendingPluginEnablements = void 0; - this.currentPluginEnablementPromise = this.enableRequestedPluginsWorker(entries); - await this.currentPluginEnablementPromise; - } - async enableRequestedPluginsWorker(pendingPlugins) { - Debug.assert(this.currentPluginEnablementPromise === void 0); - await Promise.all(map(pendingPlugins, ([project, promises]) => this.enableRequestedPluginsForProjectAsync(project, promises))); - this.currentPluginEnablementPromise = void 0; - this.sendProjectsUpdatedInBackgroundEvent(); - } - async enableRequestedPluginsForProjectAsync(project, promises) { - const results = await Promise.all(promises); - if (project.isClosed()) { - return; - } - for (const result of results) { - this.endEnablePlugin(project, result); - } - this.delayUpdateProjectGraph(project); - } - configurePlugin(args) { - this.forEachEnabledProject((project) => project.onPluginConfigurationChanged(args.pluginName, args.configuration)); - this.currentPluginConfigOverrides = this.currentPluginConfigOverrides || /* @__PURE__ */ new Map(); - this.currentPluginConfigOverrides.set(args.pluginName, args.configuration); - } - /** @internal */ - getPackageJsonsVisibleToFile(fileName, rootDir) { - const packageJsonCache = this.packageJsonCache; - const rootPath = rootDir && this.toPath(rootDir); - const filePath = this.toPath(fileName); - const result = []; - const processDirectory = (directory) => { - switch (packageJsonCache.directoryHasPackageJson(directory)) { - case 3 /* Maybe */: - packageJsonCache.searchDirectoryAndAncestors(directory); - return processDirectory(directory); - case -1 /* True */: - const packageJsonFileName = combinePaths(directory, "package.json"); - this.watchPackageJsonFile(packageJsonFileName); - const info = packageJsonCache.getInDirectory(directory); - if (info) - result.push(info); - } - if (rootPath && rootPath === directory) { - return true; - } - }; - forEachAncestorDirectory(getDirectoryPath(filePath), processDirectory); - return result; - } - /** @internal */ - getNearestAncestorDirectoryWithPackageJson(fileName) { - return forEachAncestorDirectory(fileName, (directory) => { - switch (this.packageJsonCache.directoryHasPackageJson(this.toPath(directory))) { - case -1 /* True */: - return directory; - case 0 /* False */: - return void 0; - case 3 /* Maybe */: - return this.host.fileExists(combinePaths(directory, "package.json")) ? directory : void 0; - } - }); - } - /** @internal */ - watchPackageJsonFile(path) { - const watchers = this.packageJsonFilesMap || (this.packageJsonFilesMap = /* @__PURE__ */ new Map()); - if (!watchers.has(path)) { - this.invalidateProjectPackageJson(path); - watchers.set(path, this.watchFactory.watchFile( - path, - (fileName, eventKind) => { - const path2 = this.toPath(fileName); - switch (eventKind) { - case 0 /* Created */: - return Debug.fail(); - case 1 /* Changed */: - this.packageJsonCache.addOrUpdate(path2); - this.invalidateProjectPackageJson(path2); - break; - case 2 /* Deleted */: - this.packageJsonCache.delete(path2); - this.invalidateProjectPackageJson(path2); - watchers.get(path2).close(); - watchers.delete(path2); - } - }, - 250 /* Low */, - this.hostConfiguration.watchOptions, - WatchType.PackageJson - )); - } - } - /** @internal */ - onAddPackageJson(path) { - this.packageJsonCache.addOrUpdate(path); - this.watchPackageJsonFile(path); - } - /** @internal */ - includePackageJsonAutoImports() { - switch (this.hostConfiguration.preferences.includePackageJsonAutoImports) { - case "on": - return 1 /* On */; - case "off": - return 0 /* Off */; - default: - return 2 /* Auto */; - } - } - /** @internal */ - invalidateProjectPackageJson(packageJsonPath) { - this.configuredProjects.forEach(invalidate); - this.inferredProjects.forEach(invalidate); - this.externalProjects.forEach(invalidate); - function invalidate(project) { - if (packageJsonPath) { - project.onPackageJsonChange(packageJsonPath); - } else { - project.onAutoImportProviderSettingsChanged(); - } - } - } - /** @internal */ - getIncompleteCompletionsCache() { - return this.incompleteCompletionsCache || (this.incompleteCompletionsCache = createIncompleteCompletionsCache()); - } - }; - /** Makes a filename safe to insert in a RegExp */ - _ProjectService.filenameEscapeRegexp = /[-/\\^$*+?.()|[\]{}]/g; - ProjectService3 = _ProjectService; - } - }); - - // src/server/moduleSpecifierCache.ts - function createModuleSpecifierCache(host) { - let containedNodeModulesWatchers; - let cache; - let currentKey; - const result = { - get(fromFileName, toFileName2, preferences, options) { - if (!cache || currentKey !== key(fromFileName, preferences, options)) - return void 0; - return cache.get(toFileName2); - }, - set(fromFileName, toFileName2, preferences, options, modulePaths, moduleSpecifiers) { - ensureCache(fromFileName, preferences, options).set(toFileName2, createInfo( - modulePaths, - moduleSpecifiers, - /*isBlockedByPackageJsonDependencies*/ - false - )); - if (moduleSpecifiers) { - for (const p of modulePaths) { - if (p.isInNodeModules) { - const nodeModulesPath = p.path.substring(0, p.path.indexOf(nodeModulesPathPart) + nodeModulesPathPart.length - 1); - if (!(containedNodeModulesWatchers == null ? void 0 : containedNodeModulesWatchers.has(nodeModulesPath))) { - (containedNodeModulesWatchers || (containedNodeModulesWatchers = /* @__PURE__ */ new Map())).set( - nodeModulesPath, - host.watchNodeModulesForPackageJsonChanges(nodeModulesPath) - ); - } - } - } - } - }, - setModulePaths(fromFileName, toFileName2, preferences, options, modulePaths) { - const cache2 = ensureCache(fromFileName, preferences, options); - const info = cache2.get(toFileName2); - if (info) { - info.modulePaths = modulePaths; - } else { - cache2.set(toFileName2, createInfo( - modulePaths, - /*moduleSpecifiers*/ - void 0, - /*isBlockedByPackageJsonDependencies*/ - void 0 - )); - } - }, - setBlockedByPackageJsonDependencies(fromFileName, toFileName2, preferences, options, isBlockedByPackageJsonDependencies) { - const cache2 = ensureCache(fromFileName, preferences, options); - const info = cache2.get(toFileName2); - if (info) { - info.isBlockedByPackageJsonDependencies = isBlockedByPackageJsonDependencies; - } else { - cache2.set(toFileName2, createInfo( - /*modulePaths*/ - void 0, - /*moduleSpecifiers*/ - void 0, - isBlockedByPackageJsonDependencies - )); - } - }, - clear() { - containedNodeModulesWatchers == null ? void 0 : containedNodeModulesWatchers.forEach((watcher) => watcher.close()); - cache == null ? void 0 : cache.clear(); - containedNodeModulesWatchers == null ? void 0 : containedNodeModulesWatchers.clear(); - currentKey = void 0; - }, - count() { - return cache ? cache.size : 0; - } - }; - if (Debug.isDebugging) { - Object.defineProperty(result, "__cache", { get: () => cache }); - } - return result; - function ensureCache(fromFileName, preferences, options) { - const newKey = key(fromFileName, preferences, options); - if (cache && currentKey !== newKey) { - result.clear(); - } - currentKey = newKey; - return cache || (cache = /* @__PURE__ */ new Map()); - } - function key(fromFileName, preferences, options) { - return `${fromFileName},${preferences.importModuleSpecifierEnding},${preferences.importModuleSpecifierPreference},${options.overrideImportMode}`; - } - function createInfo(modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies) { - return { modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies }; - } - } - var init_moduleSpecifierCache = __esm({ - "src/server/moduleSpecifierCache.ts"() { - "use strict"; - init_ts7(); - } - }); - - // src/server/packageJsonCache.ts - function createPackageJsonCache(host) { - const packageJsons = /* @__PURE__ */ new Map(); - const directoriesWithoutPackageJson = /* @__PURE__ */ new Map(); - return { - addOrUpdate, - forEach: packageJsons.forEach.bind(packageJsons), - get: packageJsons.get.bind(packageJsons), - delete: (fileName) => { - packageJsons.delete(fileName); - directoriesWithoutPackageJson.set(getDirectoryPath(fileName), true); - }, - getInDirectory: (directory) => { - return packageJsons.get(combinePaths(directory, "package.json")) || void 0; - }, - directoryHasPackageJson, - searchDirectoryAndAncestors: (directory) => { - forEachAncestorDirectory(directory, (ancestor) => { - if (directoryHasPackageJson(ancestor) !== 3 /* Maybe */) { - return true; - } - const packageJsonFileName = host.toPath(combinePaths(ancestor, "package.json")); - if (tryFileExists(host, packageJsonFileName)) { - addOrUpdate(packageJsonFileName); - } else { - directoriesWithoutPackageJson.set(ancestor, true); - } - }); - } - }; - function addOrUpdate(fileName) { - const packageJsonInfo = Debug.checkDefined(createPackageJsonInfo(fileName, host.host)); - packageJsons.set(fileName, packageJsonInfo); - directoriesWithoutPackageJson.delete(getDirectoryPath(fileName)); - } - function directoryHasPackageJson(directory) { - return packageJsons.has(combinePaths(directory, "package.json")) ? -1 /* True */ : directoriesWithoutPackageJson.has(directory) ? 0 /* False */ : 3 /* Maybe */; - } - } - var init_packageJsonCache = __esm({ - "src/server/packageJsonCache.ts"() { - "use strict"; - init_ts7(); - } - }); - - // src/server/session.ts - function hrTimeToMilliseconds(time) { - const seconds = time[0]; - const nanoseconds = time[1]; - return (1e9 * seconds + nanoseconds) / 1e6; - } - function isDeclarationFileInJSOnlyNonConfiguredProject(project, file) { - if ((isInferredProject(project) || isExternalProject(project)) && project.isJsOnlyProject()) { - const scriptInfo = project.getScriptInfoForNormalizedPath(file); - return scriptInfo && !scriptInfo.isJavaScript(); - } - return false; - } - function dtsChangeCanAffectEmit(compilationSettings) { - return getEmitDeclarations(compilationSettings) || !!compilationSettings.emitDecoratorMetadata; - } - function formatDiag(fileName, project, diag2) { - const scriptInfo = project.getScriptInfoForNormalizedPath(fileName); - return { - start: scriptInfo.positionToLineOffset(diag2.start), - end: scriptInfo.positionToLineOffset(diag2.start + diag2.length), - // TODO: GH#18217 - text: flattenDiagnosticMessageText(diag2.messageText, "\n"), - code: diag2.code, - category: diagnosticCategoryName(diag2), - reportsUnnecessary: diag2.reportsUnnecessary, - reportsDeprecated: diag2.reportsDeprecated, - source: diag2.source, - relatedInformation: map(diag2.relatedInformation, formatRelatedInformation) - }; - } - function formatRelatedInformation(info) { - if (!info.file) { - return { - message: flattenDiagnosticMessageText(info.messageText, "\n"), - category: diagnosticCategoryName(info), - code: info.code - }; - } - return { - span: { - start: convertToLocation(getLineAndCharacterOfPosition(info.file, info.start)), - end: convertToLocation(getLineAndCharacterOfPosition(info.file, info.start + info.length)), - // TODO: GH#18217 - file: info.file.fileName - }, - message: flattenDiagnosticMessageText(info.messageText, "\n"), - category: diagnosticCategoryName(info), - code: info.code - }; - } - function convertToLocation(lineAndCharacter) { - return { line: lineAndCharacter.line + 1, offset: lineAndCharacter.character + 1 }; - } - function formatDiagnosticToProtocol(diag2, includeFileName) { - const start = diag2.file && convertToLocation(getLineAndCharacterOfPosition(diag2.file, diag2.start)); - const end = diag2.file && convertToLocation(getLineAndCharacterOfPosition(diag2.file, diag2.start + diag2.length)); - const text = flattenDiagnosticMessageText(diag2.messageText, "\n"); - const { code, source } = diag2; - const category = diagnosticCategoryName(diag2); - const common = { - start, - end, - text, - code, - category, - reportsUnnecessary: diag2.reportsUnnecessary, - reportsDeprecated: diag2.reportsDeprecated, - source, - relatedInformation: map(diag2.relatedInformation, formatRelatedInformation) - }; - return includeFileName ? { ...common, fileName: diag2.file && diag2.file.fileName } : common; - } - function allEditsBeforePos(edits, pos) { - return edits.every((edit) => textSpanEnd(edit.span) < pos); - } - function formatMessage2(msg, logger, byteLength, newLine) { - const verboseLogging = logger.hasLevel(3 /* verbose */); - const json = JSON.stringify(msg); - if (verboseLogging) { - logger.info(`${msg.type}:${indent2(JSON.stringify(msg, void 0, " "))}`); - } - const len = byteLength(json, "utf8"); - return `Content-Length: ${1 + len}\r -\r -${json}${newLine}`; - } - function toEvent(eventName, body) { - return { - seq: 0, - type: "event", - event: eventName, - body - }; - } - function combineProjectOutput(defaultValue, getValue, projects, action) { - const outputs = flatMapToMutable(isArray(projects) ? projects : projects.projects, (project) => action(project, defaultValue)); - if (!isArray(projects) && projects.symLinkedProjects) { - projects.symLinkedProjects.forEach((projects2, path) => { - const value = getValue(path); - outputs.push(...flatMap(projects2, (project) => action(project, value))); - }); - } - return deduplicate(outputs, equateValues); - } - function createDocumentSpanSet() { - return createSet(({ textSpan }) => textSpan.start + 100003 * textSpan.length, documentSpansEqual); - } - function getRenameLocationsWorker(projects, defaultProject, initialLocation, findInStrings, findInComments, preferences) { - const perProjectResults = getPerProjectReferences( - projects, - defaultProject, - initialLocation, - /*isForRename*/ - true, - (project, position) => project.getLanguageService().findRenameLocations(position.fileName, position.pos, findInStrings, findInComments, preferences), - (renameLocation, cb) => cb(documentSpanLocation(renameLocation)) - ); - if (isArray(perProjectResults)) { - return perProjectResults; - } - const results = []; - const seen = createDocumentSpanSet(); - perProjectResults.forEach((projectResults, project) => { - for (const result of projectResults) { - if (!seen.has(result) && !getMappedLocationForProject(documentSpanLocation(result), project)) { - results.push(result); - seen.add(result); - } - } - }); - return results; - } - function getDefinitionLocation(defaultProject, initialLocation, isForRename) { - const infos = defaultProject.getLanguageService().getDefinitionAtPosition( - initialLocation.fileName, - initialLocation.pos, - /*searchOtherFilesOnly*/ - false, - /*stopAtAlias*/ - isForRename - ); - const info = infos && firstOrUndefined(infos); - return info && !info.isLocal ? { fileName: info.fileName, pos: info.textSpan.start } : void 0; - } - function getReferencesWorker(projects, defaultProject, initialLocation, logger) { - var _a, _b; - const perProjectResults = getPerProjectReferences( - projects, - defaultProject, - initialLocation, - /*isForRename*/ - false, - (project, position) => { - logger.info(`Finding references to ${position.fileName} position ${position.pos} in project ${project.getProjectName()}`); - return project.getLanguageService().findReferences(position.fileName, position.pos); - }, - (referencedSymbol, cb) => { - cb(documentSpanLocation(referencedSymbol.definition)); - for (const ref of referencedSymbol.references) { - cb(documentSpanLocation(ref)); - } - } - ); - if (isArray(perProjectResults)) { - return perProjectResults; - } - const defaultProjectResults = perProjectResults.get(defaultProject); - if (((_b = (_a = defaultProjectResults == null ? void 0 : defaultProjectResults[0]) == null ? void 0 : _a.references[0]) == null ? void 0 : _b.isDefinition) === void 0) { - perProjectResults.forEach((projectResults) => { - for (const referencedSymbol of projectResults) { - for (const ref of referencedSymbol.references) { - delete ref.isDefinition; - } - } - }); - } else { - const knownSymbolSpans = createDocumentSpanSet(); - for (const referencedSymbol of defaultProjectResults) { - for (const ref of referencedSymbol.references) { - if (ref.isDefinition) { - knownSymbolSpans.add(ref); - break; - } - } - } - const updatedProjects = /* @__PURE__ */ new Set(); - while (true) { - let progress = false; - perProjectResults.forEach((referencedSymbols, project) => { - if (updatedProjects.has(project)) - return; - const updated = project.getLanguageService().updateIsDefinitionOfReferencedSymbols(referencedSymbols, knownSymbolSpans); - if (updated) { - updatedProjects.add(project); - progress = true; - } - }); - if (!progress) - break; - } - perProjectResults.forEach((referencedSymbols, project) => { - if (updatedProjects.has(project)) - return; - for (const referencedSymbol of referencedSymbols) { - for (const ref of referencedSymbol.references) { - ref.isDefinition = false; - } - } - }); - } - const results = []; - const seenRefs = createDocumentSpanSet(); - perProjectResults.forEach((projectResults, project) => { - for (const referencedSymbol of projectResults) { - const mappedDefinitionFile = getMappedLocationForProject(documentSpanLocation(referencedSymbol.definition), project); - const definition = mappedDefinitionFile === void 0 ? referencedSymbol.definition : { - ...referencedSymbol.definition, - textSpan: createTextSpan(mappedDefinitionFile.pos, referencedSymbol.definition.textSpan.length), - // Why would the length be the same in the original? - fileName: mappedDefinitionFile.fileName, - contextSpan: getMappedContextSpanForProject(referencedSymbol.definition, project) - }; - let symbolToAddTo = find(results, (o) => documentSpansEqual(o.definition, definition)); - if (!symbolToAddTo) { - symbolToAddTo = { definition, references: [] }; - results.push(symbolToAddTo); - } - for (const ref of referencedSymbol.references) { - if (!seenRefs.has(ref) && !getMappedLocationForProject(documentSpanLocation(ref), project)) { - seenRefs.add(ref); - symbolToAddTo.references.push(ref); - } - } - } - }); - return results.filter((o) => o.references.length !== 0); - } - function forEachProjectInProjects(projects, path, cb) { - for (const project of isArray(projects) ? projects : projects.projects) { - cb(project, path); - } - if (!isArray(projects) && projects.symLinkedProjects) { - projects.symLinkedProjects.forEach((symlinkedProjects, symlinkedPath) => { - for (const project of symlinkedProjects) { - cb(project, symlinkedPath); - } - }); - } - } - function getPerProjectReferences(projects, defaultProject, initialLocation, isForRename, getResultsForPosition, forPositionInResult) { - const resultsMap = /* @__PURE__ */ new Map(); - const queue = createQueue(); - queue.enqueue({ project: defaultProject, location: initialLocation }); - forEachProjectInProjects(projects, initialLocation.fileName, (project, path) => { - const location = { fileName: path, pos: initialLocation.pos }; - queue.enqueue({ project, location }); - }); - const projectService = defaultProject.projectService; - const cancellationToken = defaultProject.getCancellationToken(); - const defaultDefinition = getDefinitionLocation(defaultProject, initialLocation, isForRename); - const getGeneratedDefinition = memoize(() => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetGeneratedPosition(defaultDefinition)); - const getSourceDefinition = memoize(() => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetSourcePosition(defaultDefinition)); - const searchedProjectKeys = /* @__PURE__ */ new Set(); - onCancellation: - while (!queue.isEmpty()) { - while (!queue.isEmpty()) { - if (cancellationToken.isCancellationRequested()) - break onCancellation; - const { project, location } = queue.dequeue(); - if (resultsMap.has(project)) - continue; - if (isLocationProjectReferenceRedirect(project, location)) - continue; - updateProjectIfDirty(project); - if (!project.containsFile(toNormalizedPath(location.fileName))) { - continue; - } - const projectResults = searchPosition(project, location); - resultsMap.set(project, projectResults ?? emptyArray2); - searchedProjectKeys.add(getProjectKey(project)); - } - if (defaultDefinition) { - projectService.loadAncestorProjectTree(searchedProjectKeys); - projectService.forEachEnabledProject((project) => { - if (cancellationToken.isCancellationRequested()) - return; - if (resultsMap.has(project)) - return; - const location = mapDefinitionInProject(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition); - if (location) { - queue.enqueue({ project, location }); - } - }); - } - } - if (resultsMap.size === 1) { - return firstIterator(resultsMap.values()); - } - return resultsMap; - function searchPosition(project, location) { - const projectResults = getResultsForPosition(project, location); - if (!projectResults) - return void 0; - for (const result of projectResults) { - forPositionInResult(result, (position) => { - const originalLocation = projectService.getOriginalLocationEnsuringConfiguredProject(project, position); - if (!originalLocation) - return; - const originalScriptInfo = projectService.getScriptInfo(originalLocation.fileName); - for (const project2 of originalScriptInfo.containingProjects) { - if (!project2.isOrphan() && !resultsMap.has(project2)) { - queue.enqueue({ project: project2, location: originalLocation }); - } - } - const symlinkedProjectsMap = projectService.getSymlinkedProjects(originalScriptInfo); - if (symlinkedProjectsMap) { - symlinkedProjectsMap.forEach((symlinkedProjects, symlinkedPath) => { - for (const symlinkedProject of symlinkedProjects) { - if (!symlinkedProject.isOrphan() && !resultsMap.has(symlinkedProject)) { - queue.enqueue({ project: symlinkedProject, location: { fileName: symlinkedPath, pos: originalLocation.pos } }); - } - } - }); - } - }); - } - return projectResults; - } - } - function mapDefinitionInProject(definition, project, getGeneratedDefinition, getSourceDefinition) { - if (project.containsFile(toNormalizedPath(definition.fileName)) && !isLocationProjectReferenceRedirect(project, definition)) { - return definition; - } - const generatedDefinition = getGeneratedDefinition(); - if (generatedDefinition && project.containsFile(toNormalizedPath(generatedDefinition.fileName))) - return generatedDefinition; - const sourceDefinition = getSourceDefinition(); - return sourceDefinition && project.containsFile(toNormalizedPath(sourceDefinition.fileName)) ? sourceDefinition : void 0; - } - function isLocationProjectReferenceRedirect(project, location) { - if (!location) - return false; - const program = project.getLanguageService().getProgram(); - if (!program) - return false; - const sourceFile = program.getSourceFile(location.fileName); - return !!sourceFile && sourceFile.resolvedPath !== sourceFile.path && sourceFile.resolvedPath !== project.toPath(location.fileName); - } - function getProjectKey(project) { - return isConfiguredProject(project) ? project.canonicalConfigFilePath : project.getProjectName(); - } - function documentSpanLocation({ fileName, textSpan }) { - return { fileName, pos: textSpan.start }; - } - function getMappedLocationForProject(location, project) { - return getMappedLocation(location, project.getSourceMapper(), (p) => project.projectService.fileExists(p)); - } - function getMappedDocumentSpanForProject(documentSpan, project) { - return getMappedDocumentSpan(documentSpan, project.getSourceMapper(), (p) => project.projectService.fileExists(p)); - } - function getMappedContextSpanForProject(documentSpan, project) { - return getMappedContextSpan(documentSpan, project.getSourceMapper(), (p) => project.projectService.fileExists(p)); - } - function toProtocolTextSpan(textSpan, scriptInfo) { - return { - start: scriptInfo.positionToLineOffset(textSpan.start), - end: scriptInfo.positionToLineOffset(textSpanEnd(textSpan)) - }; - } - function toProtocolTextSpanWithContext(span, contextSpan, scriptInfo) { - const textSpan = toProtocolTextSpan(span, scriptInfo); - const contextTextSpan = contextSpan && toProtocolTextSpan(contextSpan, scriptInfo); - return contextTextSpan ? { ...textSpan, contextStart: contextTextSpan.start, contextEnd: contextTextSpan.end } : textSpan; - } - function convertTextChangeToCodeEdit(change, scriptInfo) { - return { start: positionToLineOffset(scriptInfo, change.span.start), end: positionToLineOffset(scriptInfo, textSpanEnd(change.span)), newText: change.newText }; - } - function positionToLineOffset(info, position) { - return isConfigFile(info) ? locationFromLineAndCharacter(info.getLineAndCharacterOfPosition(position)) : info.positionToLineOffset(position); - } - function convertLinkedEditInfoToRanges(linkedEdit, scriptInfo) { - const ranges = linkedEdit.ranges.map( - (r) => { - return { - start: scriptInfo.positionToLineOffset(r.start), - end: scriptInfo.positionToLineOffset(r.start + r.length) - }; - } - ); - if (!linkedEdit.wordPattern) - return { ranges }; - return { ranges, wordPattern: linkedEdit.wordPattern }; - } - function locationFromLineAndCharacter(lc) { - return { line: lc.line + 1, offset: lc.character + 1 }; - } - function convertNewFileTextChangeToCodeEdit(textChanges2) { - Debug.assert(textChanges2.textChanges.length === 1); - const change = first(textChanges2.textChanges); - Debug.assert(change.span.start === 0 && change.span.length === 0); - return { fileName: textChanges2.fileName, textChanges: [{ start: { line: 0, offset: 0 }, end: { line: 0, offset: 0 }, newText: change.newText }] }; - } - function getLocationInNewDocument(oldText, renameFilename, renameLocation, edits) { - const newText = applyEdits(oldText, renameFilename, edits); - const { line, character } = computeLineAndCharacterOfPosition(computeLineStarts(newText), renameLocation); - return { line: line + 1, offset: character + 1 }; - } - function applyEdits(text, textFilename, edits) { - for (const { fileName, textChanges: textChanges2 } of edits) { - if (fileName !== textFilename) { - continue; - } - for (let i = textChanges2.length - 1; i >= 0; i--) { - const { newText, span: { start, length: length2 } } = textChanges2[i]; - text = text.slice(0, start) + newText + text.slice(start + length2); - } - } - return text; - } - function referenceEntryToReferencesResponseItem(projectService, { fileName, textSpan, contextSpan, isWriteAccess: isWriteAccess2, isDefinition }, { disableLineTextInReferences }) { - const scriptInfo = Debug.checkDefined(projectService.getScriptInfo(fileName)); - const span = toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo); - const lineText = disableLineTextInReferences ? void 0 : getLineText(scriptInfo, span); - return { - file: fileName, - ...span, - lineText, - isWriteAccess: isWriteAccess2, - isDefinition - }; - } - function getLineText(scriptInfo, span) { - const lineSpan = scriptInfo.lineToTextSpan(span.start.line - 1); - return scriptInfo.getSnapshot().getText(lineSpan.start, textSpanEnd(lineSpan)).replace(/\r|\n/g, ""); - } - function isCompletionEntryData(data) { - return data === void 0 || data && typeof data === "object" && typeof data.exportName === "string" && (data.fileName === void 0 || typeof data.fileName === "string") && (data.ambientModuleName === void 0 || typeof data.ambientModuleName === "string" && (data.isPackageJsonImport === void 0 || typeof data.isPackageJsonImport === "boolean")); - } - var nullCancellationToken, CommandNames, MultistepOperation, invalidPartialSemanticModeCommands, invalidSyntacticModeCommands, Session3; - var init_session = __esm({ - "src/server/session.ts"() { - "use strict"; - init_ts7(); - init_ts_server3(); - init_protocol(); - nullCancellationToken = { - isCancellationRequested: () => false, - setRequest: () => void 0, - resetRequest: () => void 0 - }; - CommandNames = CommandTypes; - MultistepOperation = class { - constructor(operationHost) { - this.operationHost = operationHost; - } - startNew(action) { - this.complete(); - this.requestId = this.operationHost.getCurrentRequestId(); - this.executeAction(action); - } - complete() { - if (this.requestId !== void 0) { - this.operationHost.sendRequestCompletedEvent(this.requestId); - this.requestId = void 0; - } - this.setTimerHandle(void 0); - this.setImmediateId(void 0); - } - immediate(actionType, action) { - const requestId = this.requestId; - Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "immediate: incorrect request id"); - this.setImmediateId(this.operationHost.getServerHost().setImmediate(() => { - this.immediateId = void 0; - this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); - }, actionType)); - } - delay(actionType, ms, action) { - const requestId = this.requestId; - Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "delay: incorrect request id"); - this.setTimerHandle(this.operationHost.getServerHost().setTimeout(() => { - this.timerHandle = void 0; - this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); - }, ms, actionType)); - } - executeAction(action) { - var _a, _b, _c, _d, _e, _f; - let stop = false; - try { - if (this.operationHost.isCancellationRequested()) { - stop = true; - (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "stepCanceled", { seq: this.requestId, early: true }); - } else { - (_b = tracing) == null ? void 0 : _b.push(tracing.Phase.Session, "stepAction", { seq: this.requestId }); - action(this); - (_c = tracing) == null ? void 0 : _c.pop(); - } - } catch (e) { - (_d = tracing) == null ? void 0 : _d.popAll(); - stop = true; - if (e instanceof OperationCanceledException) { - (_e = tracing) == null ? void 0 : _e.instant(tracing.Phase.Session, "stepCanceled", { seq: this.requestId }); - } else { - (_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "stepError", { seq: this.requestId, message: e.message }); - this.operationHost.logError(e, `delayed processing of request ${this.requestId}`); - } - } - if (stop || !this.hasPendingWork()) { - this.complete(); - } - } - setTimerHandle(timerHandle) { - if (this.timerHandle !== void 0) { - this.operationHost.getServerHost().clearTimeout(this.timerHandle); - } - this.timerHandle = timerHandle; - } - setImmediateId(immediateId) { - if (this.immediateId !== void 0) { - this.operationHost.getServerHost().clearImmediate(this.immediateId); - } - this.immediateId = immediateId; - } - hasPendingWork() { - return !!this.timerHandle || !!this.immediateId; - } - }; - invalidPartialSemanticModeCommands = [ - "openExternalProject" /* OpenExternalProject */, - "openExternalProjects" /* OpenExternalProjects */, - "closeExternalProject" /* CloseExternalProject */, - "synchronizeProjectList" /* SynchronizeProjectList */, - "emit-output" /* EmitOutput */, - "compileOnSaveAffectedFileList" /* CompileOnSaveAffectedFileList */, - "compileOnSaveEmitFile" /* CompileOnSaveEmitFile */, - "compilerOptionsDiagnostics-full" /* CompilerOptionsDiagnosticsFull */, - "encodedSemanticClassifications-full" /* EncodedSemanticClassificationsFull */, - "semanticDiagnosticsSync" /* SemanticDiagnosticsSync */, - "suggestionDiagnosticsSync" /* SuggestionDiagnosticsSync */, - "geterrForProject" /* GeterrForProject */, - "reload" /* Reload */, - "reloadProjects" /* ReloadProjects */, - "getCodeFixes" /* GetCodeFixes */, - "getCodeFixes-full" /* GetCodeFixesFull */, - "getCombinedCodeFix" /* GetCombinedCodeFix */, - "getCombinedCodeFix-full" /* GetCombinedCodeFixFull */, - "applyCodeActionCommand" /* ApplyCodeActionCommand */, - "getSupportedCodeFixes" /* GetSupportedCodeFixes */, - "getApplicableRefactors" /* GetApplicableRefactors */, - "getMoveToRefactoringFileSuggestions" /* GetMoveToRefactoringFileSuggestions */, - "getEditsForRefactor" /* GetEditsForRefactor */, - "getEditsForRefactor-full" /* GetEditsForRefactorFull */, - "organizeImports" /* OrganizeImports */, - "organizeImports-full" /* OrganizeImportsFull */, - "getEditsForFileRename" /* GetEditsForFileRename */, - "getEditsForFileRename-full" /* GetEditsForFileRenameFull */, - "prepareCallHierarchy" /* PrepareCallHierarchy */, - "provideCallHierarchyIncomingCalls" /* ProvideCallHierarchyIncomingCalls */, - "provideCallHierarchyOutgoingCalls" /* ProvideCallHierarchyOutgoingCalls */ - ]; - invalidSyntacticModeCommands = [ - ...invalidPartialSemanticModeCommands, - "definition" /* Definition */, - "definition-full" /* DefinitionFull */, - "definitionAndBoundSpan" /* DefinitionAndBoundSpan */, - "definitionAndBoundSpan-full" /* DefinitionAndBoundSpanFull */, - "typeDefinition" /* TypeDefinition */, - "implementation" /* Implementation */, - "implementation-full" /* ImplementationFull */, - "references" /* References */, - "references-full" /* ReferencesFull */, - "rename" /* Rename */, - "renameLocations-full" /* RenameLocationsFull */, - "rename-full" /* RenameInfoFull */, - "quickinfo" /* Quickinfo */, - "quickinfo-full" /* QuickinfoFull */, - "completionInfo" /* CompletionInfo */, - "completions" /* Completions */, - "completions-full" /* CompletionsFull */, - "completionEntryDetails" /* CompletionDetails */, - "completionEntryDetails-full" /* CompletionDetailsFull */, - "signatureHelp" /* SignatureHelp */, - "signatureHelp-full" /* SignatureHelpFull */, - "navto" /* Navto */, - "navto-full" /* NavtoFull */, - "documentHighlights" /* DocumentHighlights */, - "documentHighlights-full" /* DocumentHighlightsFull */ - ]; - Session3 = class _Session { - constructor(opts) { - this.changeSeq = 0; - this.handlers = new Map(Object.entries({ - // TODO(jakebailey): correctly type the handlers - ["status" /* Status */]: () => { - const response = { version }; - return this.requiredResponse(response); - }, - ["openExternalProject" /* OpenExternalProject */]: (request) => { - this.projectService.openExternalProject(request.arguments); - return this.requiredResponse( - /*response*/ - true - ); - }, - ["openExternalProjects" /* OpenExternalProjects */]: (request) => { - this.projectService.openExternalProjects(request.arguments.projects); - return this.requiredResponse( - /*response*/ - true - ); - }, - ["closeExternalProject" /* CloseExternalProject */]: (request) => { - this.projectService.closeExternalProject(request.arguments.projectFileName); - return this.requiredResponse( - /*response*/ - true - ); - }, - ["synchronizeProjectList" /* SynchronizeProjectList */]: (request) => { - const result = this.projectService.synchronizeProjectList(request.arguments.knownProjects, request.arguments.includeProjectReferenceRedirectInfo); - if (!result.some((p) => p.projectErrors && p.projectErrors.length !== 0)) { - return this.requiredResponse(result); - } - const converted = map(result, (p) => { - if (!p.projectErrors || p.projectErrors.length === 0) { - return p; - } - return { - info: p.info, - changes: p.changes, - files: p.files, - projectErrors: this.convertToDiagnosticsWithLinePosition( - p.projectErrors, - /*scriptInfo*/ - void 0 - ) - }; - }); - return this.requiredResponse(converted); - }, - ["updateOpen" /* UpdateOpen */]: (request) => { - this.changeSeq++; - this.projectService.applyChangesInOpenFiles( - request.arguments.openFiles && mapIterator(request.arguments.openFiles, (file) => ({ - fileName: file.file, - content: file.fileContent, - scriptKind: file.scriptKindName, - projectRootPath: file.projectRootPath - })), - request.arguments.changedFiles && mapIterator(request.arguments.changedFiles, (file) => ({ - fileName: file.fileName, - changes: mapDefinedIterator(arrayReverseIterator(file.textChanges), (change) => { - const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file.fileName)); - const start = scriptInfo.lineOffsetToPosition(change.start.line, change.start.offset); - const end = scriptInfo.lineOffsetToPosition(change.end.line, change.end.offset); - return start >= 0 ? { span: { start, length: end - start }, newText: change.newText } : void 0; - }) - })), - request.arguments.closedFiles - ); - return this.requiredResponse( - /*response*/ - true - ); - }, - ["applyChangedToOpenFiles" /* ApplyChangedToOpenFiles */]: (request) => { - this.changeSeq++; - this.projectService.applyChangesInOpenFiles( - request.arguments.openFiles, - request.arguments.changedFiles && mapIterator(request.arguments.changedFiles, (file) => ({ - fileName: file.fileName, - // apply changes in reverse order - changes: arrayReverseIterator(file.changes) - })), - request.arguments.closedFiles - ); - return this.requiredResponse( - /*response*/ - true - ); - }, - ["exit" /* Exit */]: () => { - this.exit(); - return this.notRequired(); - }, - ["definition" /* Definition */]: (request) => { - return this.requiredResponse(this.getDefinition( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["definition-full" /* DefinitionFull */]: (request) => { - return this.requiredResponse(this.getDefinition( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["definitionAndBoundSpan" /* DefinitionAndBoundSpan */]: (request) => { - return this.requiredResponse(this.getDefinitionAndBoundSpan( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["definitionAndBoundSpan-full" /* DefinitionAndBoundSpanFull */]: (request) => { - return this.requiredResponse(this.getDefinitionAndBoundSpan( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["findSourceDefinition" /* FindSourceDefinition */]: (request) => { - return this.requiredResponse(this.findSourceDefinition(request.arguments)); - }, - ["emit-output" /* EmitOutput */]: (request) => { - return this.requiredResponse(this.getEmitOutput(request.arguments)); - }, - ["typeDefinition" /* TypeDefinition */]: (request) => { - return this.requiredResponse(this.getTypeDefinition(request.arguments)); - }, - ["implementation" /* Implementation */]: (request) => { - return this.requiredResponse(this.getImplementation( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["implementation-full" /* ImplementationFull */]: (request) => { - return this.requiredResponse(this.getImplementation( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["references" /* References */]: (request) => { - return this.requiredResponse(this.getReferences( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["references-full" /* ReferencesFull */]: (request) => { - return this.requiredResponse(this.getReferences( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["rename" /* Rename */]: (request) => { - return this.requiredResponse(this.getRenameLocations( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["renameLocations-full" /* RenameLocationsFull */]: (request) => { - return this.requiredResponse(this.getRenameLocations( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["rename-full" /* RenameInfoFull */]: (request) => { - return this.requiredResponse(this.getRenameInfo(request.arguments)); - }, - ["open" /* Open */]: (request) => { - this.openClientFile( - toNormalizedPath(request.arguments.file), - request.arguments.fileContent, - convertScriptKindName(request.arguments.scriptKindName), - // TODO: GH#18217 - request.arguments.projectRootPath ? toNormalizedPath(request.arguments.projectRootPath) : void 0 - ); - return this.notRequired(); - }, - ["quickinfo" /* Quickinfo */]: (request) => { - return this.requiredResponse(this.getQuickInfoWorker( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["quickinfo-full" /* QuickinfoFull */]: (request) => { - return this.requiredResponse(this.getQuickInfoWorker( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["getOutliningSpans" /* GetOutliningSpans */]: (request) => { - return this.requiredResponse(this.getOutliningSpans( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["outliningSpans" /* GetOutliningSpansFull */]: (request) => { - return this.requiredResponse(this.getOutliningSpans( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["todoComments" /* TodoComments */]: (request) => { - return this.requiredResponse(this.getTodoComments(request.arguments)); - }, - ["indentation" /* Indentation */]: (request) => { - return this.requiredResponse(this.getIndentation(request.arguments)); - }, - ["nameOrDottedNameSpan" /* NameOrDottedNameSpan */]: (request) => { - return this.requiredResponse(this.getNameOrDottedNameSpan(request.arguments)); - }, - ["breakpointStatement" /* BreakpointStatement */]: (request) => { - return this.requiredResponse(this.getBreakpointStatement(request.arguments)); - }, - ["braceCompletion" /* BraceCompletion */]: (request) => { - return this.requiredResponse(this.isValidBraceCompletion(request.arguments)); - }, - ["docCommentTemplate" /* DocCommentTemplate */]: (request) => { - return this.requiredResponse(this.getDocCommentTemplate(request.arguments)); - }, - ["getSpanOfEnclosingComment" /* GetSpanOfEnclosingComment */]: (request) => { - return this.requiredResponse(this.getSpanOfEnclosingComment(request.arguments)); - }, - ["fileReferences" /* FileReferences */]: (request) => { - return this.requiredResponse(this.getFileReferences( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["fileReferences-full" /* FileReferencesFull */]: (request) => { - return this.requiredResponse(this.getFileReferences( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["format" /* Format */]: (request) => { - return this.requiredResponse(this.getFormattingEditsForRange(request.arguments)); - }, - ["formatonkey" /* Formatonkey */]: (request) => { - return this.requiredResponse(this.getFormattingEditsAfterKeystroke(request.arguments)); - }, - ["format-full" /* FormatFull */]: (request) => { - return this.requiredResponse(this.getFormattingEditsForDocumentFull(request.arguments)); - }, - ["formatonkey-full" /* FormatonkeyFull */]: (request) => { - return this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(request.arguments)); - }, - ["formatRange-full" /* FormatRangeFull */]: (request) => { - return this.requiredResponse(this.getFormattingEditsForRangeFull(request.arguments)); - }, - ["completionInfo" /* CompletionInfo */]: (request) => { - return this.requiredResponse(this.getCompletions(request.arguments, "completionInfo" /* CompletionInfo */)); - }, - ["completions" /* Completions */]: (request) => { - return this.requiredResponse(this.getCompletions(request.arguments, "completions" /* Completions */)); - }, - ["completions-full" /* CompletionsFull */]: (request) => { - return this.requiredResponse(this.getCompletions(request.arguments, "completions-full" /* CompletionsFull */)); - }, - ["completionEntryDetails" /* CompletionDetails */]: (request) => { - return this.requiredResponse(this.getCompletionEntryDetails( - request.arguments, - /*fullResult*/ - false - )); - }, - ["completionEntryDetails-full" /* CompletionDetailsFull */]: (request) => { - return this.requiredResponse(this.getCompletionEntryDetails( - request.arguments, - /*fullResult*/ - true - )); - }, - ["compileOnSaveAffectedFileList" /* CompileOnSaveAffectedFileList */]: (request) => { - return this.requiredResponse(this.getCompileOnSaveAffectedFileList(request.arguments)); - }, - ["compileOnSaveEmitFile" /* CompileOnSaveEmitFile */]: (request) => { - return this.requiredResponse(this.emitFile(request.arguments)); - }, - ["signatureHelp" /* SignatureHelp */]: (request) => { - return this.requiredResponse(this.getSignatureHelpItems( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["signatureHelp-full" /* SignatureHelpFull */]: (request) => { - return this.requiredResponse(this.getSignatureHelpItems( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["compilerOptionsDiagnostics-full" /* CompilerOptionsDiagnosticsFull */]: (request) => { - return this.requiredResponse(this.getCompilerOptionsDiagnostics(request.arguments)); - }, - ["encodedSyntacticClassifications-full" /* EncodedSyntacticClassificationsFull */]: (request) => { - return this.requiredResponse(this.getEncodedSyntacticClassifications(request.arguments)); - }, - ["encodedSemanticClassifications-full" /* EncodedSemanticClassificationsFull */]: (request) => { - return this.requiredResponse(this.getEncodedSemanticClassifications(request.arguments)); - }, - ["cleanup" /* Cleanup */]: () => { - this.cleanup(); - return this.requiredResponse( - /*response*/ - true - ); - }, - ["semanticDiagnosticsSync" /* SemanticDiagnosticsSync */]: (request) => { - return this.requiredResponse(this.getSemanticDiagnosticsSync(request.arguments)); - }, - ["syntacticDiagnosticsSync" /* SyntacticDiagnosticsSync */]: (request) => { - return this.requiredResponse(this.getSyntacticDiagnosticsSync(request.arguments)); - }, - ["suggestionDiagnosticsSync" /* SuggestionDiagnosticsSync */]: (request) => { - return this.requiredResponse(this.getSuggestionDiagnosticsSync(request.arguments)); - }, - ["geterr" /* Geterr */]: (request) => { - this.errorCheck.startNew((next) => this.getDiagnostics(next, request.arguments.delay, request.arguments.files)); - return this.notRequired(); - }, - ["geterrForProject" /* GeterrForProject */]: (request) => { - this.errorCheck.startNew((next) => this.getDiagnosticsForProject(next, request.arguments.delay, request.arguments.file)); - return this.notRequired(); - }, - ["change" /* Change */]: (request) => { - this.change(request.arguments); - return this.notRequired(); - }, - ["configure" /* Configure */]: (request) => { - this.projectService.setHostConfiguration(request.arguments); - this.doOutput( - /*info*/ - void 0, - "configure" /* Configure */, - request.seq, - /*success*/ - true - ); - return this.notRequired(); - }, - ["reload" /* Reload */]: (request) => { - this.reload(request.arguments, request.seq); - return this.requiredResponse({ reloadFinished: true }); - }, - ["saveto" /* Saveto */]: (request) => { - const savetoArgs = request.arguments; - this.saveToTmp(savetoArgs.file, savetoArgs.tmpfile); - return this.notRequired(); - }, - ["close" /* Close */]: (request) => { - const closeArgs = request.arguments; - this.closeClientFile(closeArgs.file); - return this.notRequired(); - }, - ["navto" /* Navto */]: (request) => { - return this.requiredResponse(this.getNavigateToItems( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["navto-full" /* NavtoFull */]: (request) => { - return this.requiredResponse(this.getNavigateToItems( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["brace" /* Brace */]: (request) => { - return this.requiredResponse(this.getBraceMatching( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["brace-full" /* BraceFull */]: (request) => { - return this.requiredResponse(this.getBraceMatching( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["navbar" /* NavBar */]: (request) => { - return this.requiredResponse(this.getNavigationBarItems( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["navbar-full" /* NavBarFull */]: (request) => { - return this.requiredResponse(this.getNavigationBarItems( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["navtree" /* NavTree */]: (request) => { - return this.requiredResponse(this.getNavigationTree( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["navtree-full" /* NavTreeFull */]: (request) => { - return this.requiredResponse(this.getNavigationTree( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["documentHighlights" /* DocumentHighlights */]: (request) => { - return this.requiredResponse(this.getDocumentHighlights( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["documentHighlights-full" /* DocumentHighlightsFull */]: (request) => { - return this.requiredResponse(this.getDocumentHighlights( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["compilerOptionsForInferredProjects" /* CompilerOptionsForInferredProjects */]: (request) => { - this.setCompilerOptionsForInferredProjects(request.arguments); - return this.requiredResponse( - /*response*/ - true - ); - }, - ["projectInfo" /* ProjectInfo */]: (request) => { - return this.requiredResponse(this.getProjectInfo(request.arguments)); - }, - ["reloadProjects" /* ReloadProjects */]: () => { - this.projectService.reloadProjects(); - return this.notRequired(); - }, - ["jsxClosingTag" /* JsxClosingTag */]: (request) => { - return this.requiredResponse(this.getJsxClosingTag(request.arguments)); - }, - ["linkedEditingRange" /* LinkedEditingRange */]: (request) => { - return this.requiredResponse(this.getLinkedEditingRange(request.arguments)); - }, - ["getCodeFixes" /* GetCodeFixes */]: (request) => { - return this.requiredResponse(this.getCodeFixes( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["getCodeFixes-full" /* GetCodeFixesFull */]: (request) => { - return this.requiredResponse(this.getCodeFixes( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["getCombinedCodeFix" /* GetCombinedCodeFix */]: (request) => { - return this.requiredResponse(this.getCombinedCodeFix( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["getCombinedCodeFix-full" /* GetCombinedCodeFixFull */]: (request) => { - return this.requiredResponse(this.getCombinedCodeFix( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["applyCodeActionCommand" /* ApplyCodeActionCommand */]: (request) => { - return this.requiredResponse(this.applyCodeActionCommand(request.arguments)); - }, - ["getSupportedCodeFixes" /* GetSupportedCodeFixes */]: (request) => { - return this.requiredResponse(this.getSupportedCodeFixes(request.arguments)); - }, - ["getApplicableRefactors" /* GetApplicableRefactors */]: (request) => { - return this.requiredResponse(this.getApplicableRefactors(request.arguments)); - }, - ["getEditsForRefactor" /* GetEditsForRefactor */]: (request) => { - return this.requiredResponse(this.getEditsForRefactor( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["getMoveToRefactoringFileSuggestions" /* GetMoveToRefactoringFileSuggestions */]: (request) => { - return this.requiredResponse(this.getMoveToRefactoringFileSuggestions(request.arguments)); - }, - ["getEditsForRefactor-full" /* GetEditsForRefactorFull */]: (request) => { - return this.requiredResponse(this.getEditsForRefactor( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["organizeImports" /* OrganizeImports */]: (request) => { - return this.requiredResponse(this.organizeImports( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["organizeImports-full" /* OrganizeImportsFull */]: (request) => { - return this.requiredResponse(this.organizeImports( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["getEditsForFileRename" /* GetEditsForFileRename */]: (request) => { - return this.requiredResponse(this.getEditsForFileRename( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["getEditsForFileRename-full" /* GetEditsForFileRenameFull */]: (request) => { - return this.requiredResponse(this.getEditsForFileRename( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["configurePlugin" /* ConfigurePlugin */]: (request) => { - this.configurePlugin(request.arguments); - this.doOutput( - /*info*/ - void 0, - "configurePlugin" /* ConfigurePlugin */, - request.seq, - /*success*/ - true - ); - return this.notRequired(); - }, - ["selectionRange" /* SelectionRange */]: (request) => { - return this.requiredResponse(this.getSmartSelectionRange( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["selectionRange-full" /* SelectionRangeFull */]: (request) => { - return this.requiredResponse(this.getSmartSelectionRange( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["prepareCallHierarchy" /* PrepareCallHierarchy */]: (request) => { - return this.requiredResponse(this.prepareCallHierarchy(request.arguments)); - }, - ["provideCallHierarchyIncomingCalls" /* ProvideCallHierarchyIncomingCalls */]: (request) => { - return this.requiredResponse(this.provideCallHierarchyIncomingCalls(request.arguments)); - }, - ["provideCallHierarchyOutgoingCalls" /* ProvideCallHierarchyOutgoingCalls */]: (request) => { - return this.requiredResponse(this.provideCallHierarchyOutgoingCalls(request.arguments)); - }, - ["toggleLineComment" /* ToggleLineComment */]: (request) => { - return this.requiredResponse(this.toggleLineComment( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["toggleLineComment-full" /* ToggleLineCommentFull */]: (request) => { - return this.requiredResponse(this.toggleLineComment( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["toggleMultilineComment" /* ToggleMultilineComment */]: (request) => { - return this.requiredResponse(this.toggleMultilineComment( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["toggleMultilineComment-full" /* ToggleMultilineCommentFull */]: (request) => { - return this.requiredResponse(this.toggleMultilineComment( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["commentSelection" /* CommentSelection */]: (request) => { - return this.requiredResponse(this.commentSelection( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["commentSelection-full" /* CommentSelectionFull */]: (request) => { - return this.requiredResponse(this.commentSelection( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["uncommentSelection" /* UncommentSelection */]: (request) => { - return this.requiredResponse(this.uncommentSelection( - request.arguments, - /*simplifiedResult*/ - true - )); - }, - ["uncommentSelection-full" /* UncommentSelectionFull */]: (request) => { - return this.requiredResponse(this.uncommentSelection( - request.arguments, - /*simplifiedResult*/ - false - )); - }, - ["provideInlayHints" /* ProvideInlayHints */]: (request) => { - return this.requiredResponse(this.provideInlayHints(request.arguments)); - } - })); - this.host = opts.host; - this.cancellationToken = opts.cancellationToken; - this.typingsInstaller = opts.typingsInstaller || nullTypingsInstaller; - this.byteLength = opts.byteLength; - this.hrtime = opts.hrtime; - this.logger = opts.logger; - this.canUseEvents = opts.canUseEvents; - this.suppressDiagnosticEvents = opts.suppressDiagnosticEvents; - this.noGetErrOnBackgroundUpdate = opts.noGetErrOnBackgroundUpdate; - const { throttleWaitMilliseconds } = opts; - this.eventHandler = this.canUseEvents ? opts.eventHandler || ((event) => this.defaultEventHandler(event)) : void 0; - const multistepOperationHost = { - executeWithRequestId: (requestId, action) => this.executeWithRequestId(requestId, action), - getCurrentRequestId: () => this.currentRequestId, - getServerHost: () => this.host, - logError: (err, cmd) => this.logError(err, cmd), - sendRequestCompletedEvent: (requestId) => this.sendRequestCompletedEvent(requestId), - isCancellationRequested: () => this.cancellationToken.isCancellationRequested() - }; - this.errorCheck = new MultistepOperation(multistepOperationHost); - const settings = { - host: this.host, - logger: this.logger, - cancellationToken: this.cancellationToken, - useSingleInferredProject: opts.useSingleInferredProject, - useInferredProjectPerProjectRoot: opts.useInferredProjectPerProjectRoot, - typingsInstaller: this.typingsInstaller, - throttleWaitMilliseconds, - eventHandler: this.eventHandler, - suppressDiagnosticEvents: this.suppressDiagnosticEvents, - globalPlugins: opts.globalPlugins, - pluginProbeLocations: opts.pluginProbeLocations, - allowLocalPluginLoads: opts.allowLocalPluginLoads, - typesMapLocation: opts.typesMapLocation, - serverMode: opts.serverMode, - session: this, - incrementalVerifier: opts.incrementalVerifier - }; - this.projectService = new ProjectService3(settings); - this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)); - this.gcTimer = new GcTimer( - this.host, - /*delay*/ - 7e3, - this.logger - ); - switch (this.projectService.serverMode) { - case 0 /* Semantic */: - break; - case 1 /* PartialSemantic */: - invalidPartialSemanticModeCommands.forEach( - (commandName) => this.handlers.set(commandName, (request) => { - throw new Error(`Request: ${request.command} not allowed in LanguageServiceMode.PartialSemantic`); - }) - ); - break; - case 2 /* Syntactic */: - invalidSyntacticModeCommands.forEach( - (commandName) => this.handlers.set(commandName, (request) => { - throw new Error(`Request: ${request.command} not allowed in LanguageServiceMode.Syntactic`); - }) - ); - break; - default: - Debug.assertNever(this.projectService.serverMode); - } - } - sendRequestCompletedEvent(requestId) { - this.event({ request_seq: requestId }, "requestCompleted"); - } - addPerformanceData(key, value) { - if (!this.performanceData) { - this.performanceData = {}; - } - this.performanceData[key] = (this.performanceData[key] ?? 0) + value; - } - performanceEventHandler(event) { - switch (event.kind) { - case "UpdateGraph": - this.addPerformanceData("updateGraphDurationMs", event.durationMs); - break; - case "CreatePackageJsonAutoImportProvider": - this.addPerformanceData("createAutoImportProviderProgramDurationMs", event.durationMs); - break; - } - } - defaultEventHandler(event) { - switch (event.eventName) { - case ProjectsUpdatedInBackgroundEvent: - const { openFiles } = event.data; - this.projectsUpdatedInBackgroundEvent(openFiles); - break; - case ProjectLoadingStartEvent: - const { project, reason } = event.data; - this.event( - { projectName: project.getProjectName(), reason }, - ProjectLoadingStartEvent - ); - break; - case ProjectLoadingFinishEvent: - const { project: finishProject } = event.data; - this.event({ projectName: finishProject.getProjectName() }, ProjectLoadingFinishEvent); - break; - case LargeFileReferencedEvent: - const { file, fileSize, maxFileSize: maxFileSize2 } = event.data; - this.event({ file, fileSize, maxFileSize: maxFileSize2 }, LargeFileReferencedEvent); - break; - case ConfigFileDiagEvent: - const { triggerFile, configFileName: configFile, diagnostics } = event.data; - const bakedDiags = map(diagnostics, (diagnostic) => formatDiagnosticToProtocol( - diagnostic, - /*includeFileName*/ - true - )); - this.event({ - triggerFile, - configFile, - diagnostics: bakedDiags - }, ConfigFileDiagEvent); - break; - case ProjectLanguageServiceStateEvent: { - const eventName = ProjectLanguageServiceStateEvent; - this.event({ - projectName: event.data.project.getProjectName(), - languageServiceEnabled: event.data.languageServiceEnabled - }, eventName); - break; - } - case ProjectInfoTelemetryEvent: { - const eventName = "telemetry"; - this.event({ - telemetryEventName: event.eventName, - payload: event.data - }, eventName); - break; - } - } - } - projectsUpdatedInBackgroundEvent(openFiles) { - this.projectService.logger.info(`got projects updated in background, updating diagnostics for ${openFiles}`); - if (openFiles.length) { - if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) { - this.errorCheck.startNew((next) => this.updateErrorCheck( - next, - openFiles, - 100, - /*requireOpen*/ - true - )); - } - this.event({ - openFiles - }, ProjectsUpdatedInBackgroundEvent); - } - } - logError(err, cmd) { - this.logErrorWorker(err, cmd); - } - logErrorWorker(err, cmd, fileRequest) { - let msg = "Exception on executing command " + cmd; - if (err.message) { - msg += ":\n" + indent2(err.message); - if (err.stack) { - msg += "\n" + indent2(err.stack); - } - } - if (this.logger.hasLevel(3 /* verbose */)) { - if (fileRequest) { - try { - const { file, project } = this.getFileAndProject(fileRequest); - const scriptInfo = project.getScriptInfoForNormalizedPath(file); - if (scriptInfo) { - const text = getSnapshotText(scriptInfo.getSnapshot()); - msg += ` - -File text of ${fileRequest.file}:${indent2(text)} -`; - } - } catch { - } - } - if (err.ProgramFiles) { - msg += ` - -Program files: ${JSON.stringify(err.ProgramFiles)} -`; - msg += ` - -Projects:: -`; - let counter = 0; - const addProjectInfo = (project) => { - msg += ` -Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter} -`; - msg += project.filesToString( - /*writeProjectFileNames*/ - true - ); - msg += "\n-----------------------------------------------\n"; - counter++; - }; - this.projectService.externalProjects.forEach(addProjectInfo); - this.projectService.configuredProjects.forEach(addProjectInfo); - this.projectService.inferredProjects.forEach(addProjectInfo); - } - } - this.logger.msg(msg, "Err" /* Err */); - } - send(msg) { - if (msg.type === "event" && !this.canUseEvents) { - if (this.logger.hasLevel(3 /* verbose */)) { - this.logger.info(`Session does not support events: ignored event: ${JSON.stringify(msg)}`); - } - return; - } - this.writeMessage(msg); - } - writeMessage(msg) { - var _a; - const msgText = formatMessage2(msg, this.logger, this.byteLength, this.host.newLine); - (_a = perfLogger) == null ? void 0 : _a.logEvent(`Response message size: ${msgText.length}`); - this.host.write(msgText); - } - event(body, eventName) { - this.send(toEvent(eventName, body)); - } - /** @internal */ - doOutput(info, cmdName, reqSeq, success, message) { - const res = { - seq: 0, - type: "response", - command: cmdName, - request_seq: reqSeq, - success, - performanceData: this.performanceData - }; - if (success) { - let metadata; - if (isArray(info)) { - res.body = info; - metadata = info.metadata; - delete info.metadata; - } else if (typeof info === "object") { - if (info.metadata) { - const { metadata: infoMetadata, ...body } = info; - res.body = body; - metadata = infoMetadata; - } else { - res.body = info; - } - } else { - res.body = info; - } - if (metadata) - res.metadata = metadata; - } else { - Debug.assert(info === void 0); - } - if (message) { - res.message = message; - } - this.send(res); - } - semanticCheck(file, project) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "semanticCheck", { file, configFilePath: project.canonicalConfigFilePath }); - const diags = isDeclarationFileInJSOnlyNonConfiguredProject(project, file) ? emptyArray2 : project.getLanguageService().getSemanticDiagnostics(file).filter((d) => !!d.file); - this.sendDiagnosticsEvent(file, project, diags, "semanticDiag"); - (_b = tracing) == null ? void 0 : _b.pop(); - } - syntacticCheck(file, project) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "syntacticCheck", { file, configFilePath: project.canonicalConfigFilePath }); - this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSyntacticDiagnostics(file), "syntaxDiag"); - (_b = tracing) == null ? void 0 : _b.pop(); - } - suggestionCheck(file, project) { - var _a, _b; - (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "suggestionCheck", { file, configFilePath: project.canonicalConfigFilePath }); - this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSuggestionDiagnostics(file), "suggestionDiag"); - (_b = tracing) == null ? void 0 : _b.pop(); - } - sendDiagnosticsEvent(file, project, diagnostics, kind) { - try { - this.event({ file, diagnostics: diagnostics.map((diag2) => formatDiag(file, project, diag2)) }, kind); - } catch (err) { - this.logError(err, kind); - } - } - /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */ - updateErrorCheck(next, checkList, ms, requireOpen = true) { - Debug.assert(!this.suppressDiagnosticEvents); - const seq = this.changeSeq; - const followMs = Math.min(ms, 200); - let index = 0; - const goNext = () => { - index++; - if (checkList.length > index) { - next.delay("checkOne", followMs, checkOne); - } - }; - const checkOne = () => { - if (this.changeSeq !== seq) { - return; - } - let item = checkList[index]; - if (isString(item)) { - item = this.toPendingErrorCheck(item); - if (!item) { - goNext(); - return; - } - } - const { fileName, project } = item; - updateProjectIfDirty(project); - if (!project.containsFile(fileName, requireOpen)) { - return; - } - this.syntacticCheck(fileName, project); - if (this.changeSeq !== seq) { - return; - } - if (project.projectService.serverMode !== 0 /* Semantic */) { - goNext(); - return; - } - next.immediate("semanticCheck", () => { - this.semanticCheck(fileName, project); - if (this.changeSeq !== seq) { - return; - } - if (this.getPreferences(fileName).disableSuggestions) { - goNext(); - return; - } - next.immediate("suggestionCheck", () => { - this.suggestionCheck(fileName, project); - goNext(); - }); - }); - }; - if (checkList.length > index && this.changeSeq === seq) { - next.delay("checkOne", ms, checkOne); - } - } - cleanProjects(caption, projects) { - if (!projects) { - return; - } - this.logger.info(`cleaning ${caption}`); - for (const p of projects) { - p.getLanguageService( - /*ensureSynchronized*/ - false - ).cleanupSemanticCache(); - p.cleanupProgram(); - } - } - cleanup() { - this.cleanProjects("inferred projects", this.projectService.inferredProjects); - this.cleanProjects("configured projects", arrayFrom(this.projectService.configuredProjects.values())); - this.cleanProjects("external projects", this.projectService.externalProjects); - if (this.host.gc) { - this.logger.info(`host.gc()`); - this.host.gc(); - } - } - getEncodedSyntacticClassifications(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - return languageService.getEncodedSyntacticClassifications(file, args); - } - getEncodedSemanticClassifications(args) { - const { file, project } = this.getFileAndProject(args); - const format = args.format === "2020" ? "2020" /* TwentyTwenty */ : "original" /* Original */; - return project.getLanguageService().getEncodedSemanticClassifications(file, args, format); - } - getProject(projectFileName) { - return projectFileName === void 0 ? void 0 : this.projectService.findProject(projectFileName); - } - getConfigFileAndProject(args) { - const project = this.getProject(args.projectFileName); - const file = toNormalizedPath(args.file); - return { - configFile: project && project.hasConfigFile(file) ? file : void 0, - project - }; - } - getConfigFileDiagnostics(configFile, project, includeLinePosition) { - const projectErrors = project.getAllProjectErrors(); - const optionsErrors = project.getLanguageService().getCompilerOptionsDiagnostics(); - const diagnosticsForConfigFile = filter( - concatenate(projectErrors, optionsErrors), - (diagnostic) => !!diagnostic.file && diagnostic.file.fileName === configFile - ); - return includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnosticsForConfigFile) : map( - diagnosticsForConfigFile, - (diagnostic) => formatDiagnosticToProtocol( - diagnostic, - /*includeFileName*/ - false - ) - ); - } - convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) { - return diagnostics.map((d) => ({ - message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), - start: d.start, - // TODO: GH#18217 - length: d.length, - // TODO: GH#18217 - category: diagnosticCategoryName(d), - code: d.code, - source: d.source, - startLocation: d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start)), - // TODO: GH#18217 - endLocation: d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start + d.length)), - // TODO: GH#18217 - reportsUnnecessary: d.reportsUnnecessary, - reportsDeprecated: d.reportsDeprecated, - relatedInformation: map(d.relatedInformation, formatRelatedInformation) - })); - } - getCompilerOptionsDiagnostics(args) { - const project = this.getProject(args.projectFileName); - return this.convertToDiagnosticsWithLinePosition( - filter( - project.getLanguageService().getCompilerOptionsDiagnostics(), - (diagnostic) => !diagnostic.file - ), - /*scriptInfo*/ - void 0 - ); - } - convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo) { - return diagnostics.map((d) => ({ - message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), - start: d.start, - length: d.length, - category: diagnosticCategoryName(d), - code: d.code, - source: d.source, - startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start), - // TODO: GH#18217 - endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length), - reportsUnnecessary: d.reportsUnnecessary, - reportsDeprecated: d.reportsDeprecated, - relatedInformation: map(d.relatedInformation, formatRelatedInformation) - })); - } - getDiagnosticsWorker(args, isSemantic, selector, includeLinePosition) { - const { project, file } = this.getFileAndProject(args); - if (isSemantic && isDeclarationFileInJSOnlyNonConfiguredProject(project, file)) { - return emptyArray2; - } - const scriptInfo = project.getScriptInfoForNormalizedPath(file); - const diagnostics = selector(project, file); - return includeLinePosition ? this.convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo) : diagnostics.map((d) => formatDiag(file, project, d)); - } - getDefinition(args, simplifiedResult) { - const { file, project } = this.getFileAndProject(args); - const position = this.getPositionInFile(args, file); - const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getDefinitionAtPosition(file, position) || emptyArray2, project); - return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(_Session.mapToOriginalLocation); - } - mapDefinitionInfoLocations(definitions, project) { - return definitions.map((info) => { - const newDocumentSpan = getMappedDocumentSpanForProject(info, project); - return !newDocumentSpan ? info : { - ...newDocumentSpan, - containerKind: info.containerKind, - containerName: info.containerName, - kind: info.kind, - name: info.name, - failedAliasResolution: info.failedAliasResolution, - ...info.unverified && { unverified: info.unverified } - }; - }); - } - getDefinitionAndBoundSpan(args, simplifiedResult) { - const { file, project } = this.getFileAndProject(args); - const position = this.getPositionInFile(args, file); - const scriptInfo = Debug.checkDefined(project.getScriptInfo(file)); - const unmappedDefinitionAndBoundSpan = project.getLanguageService().getDefinitionAndBoundSpan(file, position); - if (!unmappedDefinitionAndBoundSpan || !unmappedDefinitionAndBoundSpan.definitions) { - return { - definitions: emptyArray2, - textSpan: void 0 - // TODO: GH#18217 - }; - } - const definitions = this.mapDefinitionInfoLocations(unmappedDefinitionAndBoundSpan.definitions, project); - const { textSpan } = unmappedDefinitionAndBoundSpan; - if (simplifiedResult) { - return { - definitions: this.mapDefinitionInfo(definitions, project), - textSpan: toProtocolTextSpan(textSpan, scriptInfo) - }; - } - return { - definitions: definitions.map(_Session.mapToOriginalLocation), - textSpan - }; - } - findSourceDefinition(args) { - var _a; - const { file, project } = this.getFileAndProject(args); - const position = this.getPositionInFile(args, file); - const unmappedDefinitions = project.getLanguageService().getDefinitionAtPosition(file, position); - let definitions = this.mapDefinitionInfoLocations(unmappedDefinitions || emptyArray2, project).slice(); - const needsJsResolution = this.projectService.serverMode === 0 /* Semantic */ && (!some(definitions, (d) => toNormalizedPath(d.fileName) !== file && !d.isAmbient) || some(definitions, (d) => !!d.failedAliasResolution)); - if (needsJsResolution) { - const definitionSet = createSet((d) => d.textSpan.start, documentSpansEqual); - definitions == null ? void 0 : definitions.forEach((d) => definitionSet.add(d)); - const noDtsProject = project.getNoDtsResolutionProject([file]); - const ls = noDtsProject.getLanguageService(); - const jsDefinitions = (_a = ls.getDefinitionAtPosition( - file, - position, - /*searchOtherFilesOnly*/ - true, - /*stopAtAlias*/ - false - )) == null ? void 0 : _a.filter((d) => toNormalizedPath(d.fileName) !== file); - if (some(jsDefinitions)) { - for (const jsDefinition of jsDefinitions) { - if (jsDefinition.unverified) { - const refined = tryRefineDefinition(jsDefinition, project.getLanguageService().getProgram(), ls.getProgram()); - if (some(refined)) { - for (const def of refined) { - definitionSet.add(def); - } - continue; - } - } - definitionSet.add(jsDefinition); - } - } else { - const ambientCandidates = definitions.filter((d) => toNormalizedPath(d.fileName) !== file && d.isAmbient); - for (const candidate of some(ambientCandidates) ? ambientCandidates : getAmbientCandidatesByClimbingAccessChain()) { - const fileNameToSearch = findImplementationFileFromDtsFileName(candidate.fileName, file, noDtsProject); - if (!fileNameToSearch || !ensureRoot(noDtsProject, fileNameToSearch)) { - continue; - } - const noDtsProgram = ls.getProgram(); - const fileToSearch = Debug.checkDefined(noDtsProgram.getSourceFile(fileNameToSearch)); - for (const match of searchForDeclaration(candidate.name, fileToSearch, noDtsProgram)) { - definitionSet.add(match); - } - } - } - definitions = arrayFrom(definitionSet.values()); - } - definitions = definitions.filter((d) => !d.isAmbient && !d.failedAliasResolution); - return this.mapDefinitionInfo(definitions, project); - function findImplementationFileFromDtsFileName(fileName, resolveFromFile, auxiliaryProject) { - var _a2, _b, _c; - const nodeModulesPathParts = getNodeModulePathParts(fileName); - if (nodeModulesPathParts && fileName.lastIndexOf(nodeModulesPathPart) === nodeModulesPathParts.topLevelNodeModulesIndex) { - const packageDirectory = fileName.substring(0, nodeModulesPathParts.packageRootIndex); - const packageJsonCache = (_a2 = project.getModuleResolutionCache()) == null ? void 0 : _a2.getPackageJsonInfoCache(); - const compilerOptions = project.getCompilationSettings(); - const packageJson = getPackageScopeForPath(getNormalizedAbsolutePath(packageDirectory + "/package.json", project.getCurrentDirectory()), getTemporaryModuleResolutionState(packageJsonCache, project, compilerOptions)); - if (!packageJson) - return void 0; - const entrypoints = getEntrypointsFromPackageJsonInfo( - packageJson, - { moduleResolution: 2 /* Node10 */ }, - project, - project.getModuleResolutionCache() - ); - const packageNamePathPart = fileName.substring( - nodeModulesPathParts.topLevelPackageNameIndex + 1, - nodeModulesPathParts.packageRootIndex - ); - const packageName = getPackageNameFromTypesPackageName(unmangleScopedPackageName(packageNamePathPart)); - const path = project.toPath(fileName); - if (entrypoints && some(entrypoints, (e) => project.toPath(e) === path)) { - return (_b = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(packageName, resolveFromFile).resolvedModule) == null ? void 0 : _b.resolvedFileName; - } else { - const pathToFileInPackage = fileName.substring(nodeModulesPathParts.packageRootIndex + 1); - const specifier = `${packageName}/${removeFileExtension(pathToFileInPackage)}`; - return (_c = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(specifier, resolveFromFile).resolvedModule) == null ? void 0 : _c.resolvedFileName; - } - } - return void 0; - } - function getAmbientCandidatesByClimbingAccessChain() { - const ls = project.getLanguageService(); - const program = ls.getProgram(); - const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); - if ((isStringLiteralLike(initialNode) || isIdentifier(initialNode)) && isAccessExpression(initialNode.parent)) { - return forEachNameInAccessChainWalkingLeft(initialNode, (nameInChain) => { - var _a2; - if (nameInChain === initialNode) - return void 0; - const candidates = (_a2 = ls.getDefinitionAtPosition( - file, - nameInChain.getStart(), - /*searchOtherFilesOnly*/ - true, - /*stopAtAlias*/ - false - )) == null ? void 0 : _a2.filter((d) => toNormalizedPath(d.fileName) !== file && d.isAmbient).map((d) => ({ - fileName: d.fileName, - name: getTextOfIdentifierOrLiteral(initialNode) - })); - if (some(candidates)) { - return candidates; - } - }) || emptyArray2; - } - return emptyArray2; - } - function tryRefineDefinition(definition, program, noDtsProgram) { - var _a2; - const fileToSearch = noDtsProgram.getSourceFile(definition.fileName); - if (!fileToSearch) { - return void 0; - } - const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); - const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode); - const importSpecifier = symbol && getDeclarationOfKind(symbol, 276 /* ImportSpecifier */); - if (!importSpecifier) - return void 0; - const nameToSearch = ((_a2 = importSpecifier.propertyName) == null ? void 0 : _a2.text) || importSpecifier.name.text; - return searchForDeclaration(nameToSearch, fileToSearch, noDtsProgram); - } - function searchForDeclaration(declarationName, fileToSearch, noDtsProgram) { - const matches = ts_FindAllReferences_exports.Core.getTopMostDeclarationNamesInFile(declarationName, fileToSearch); - return mapDefined(matches, (match) => { - const symbol = noDtsProgram.getTypeChecker().getSymbolAtLocation(match); - const decl = getDeclarationFromName(match); - if (symbol && decl) { - return ts_GoToDefinition_exports.createDefinitionInfo( - decl, - noDtsProgram.getTypeChecker(), - symbol, - decl, - /*unverified*/ - true - ); - } - }); - } - function ensureRoot(project2, fileName) { - const info = project2.getScriptInfo(fileName); - if (!info) - return false; - if (!project2.containsScriptInfo(info)) { - project2.addRoot(info); - project2.updateGraph(); - } - return true; - } - } - getEmitOutput(args) { - const { file, project } = this.getFileAndProject(args); - if (!project.shouldEmitFile(project.getScriptInfo(file))) { - return { emitSkipped: true, outputFiles: [], diagnostics: [] }; - } - const result = project.getLanguageService().getEmitOutput(file); - return args.richResponse ? { - ...result, - diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(result.diagnostics) : result.diagnostics.map((d) => formatDiagnosticToProtocol( - d, - /*includeFileName*/ - true - )) - } : result; - } - mapJSDocTagInfo(tags, project, richResponse) { - return tags ? tags.map((tag) => { - var _a; - return { - ...tag, - text: richResponse ? this.mapDisplayParts(tag.text, project) : (_a = tag.text) == null ? void 0 : _a.map((part) => part.text).join("") - }; - }) : []; - } - mapDisplayParts(parts, project) { - if (!parts) { - return []; - } - return parts.map((part) => part.kind !== "linkName" ? part : { - ...part, - target: this.toFileSpan(part.target.fileName, part.target.textSpan, project) - }); - } - mapSignatureHelpItems(items, project, richResponse) { - return items.map((item) => ({ - ...item, - documentation: this.mapDisplayParts(item.documentation, project), - parameters: item.parameters.map((p) => ({ ...p, documentation: this.mapDisplayParts(p.documentation, project) })), - tags: this.mapJSDocTagInfo(item.tags, project, richResponse) - })); - } - mapDefinitionInfo(definitions, project) { - return definitions.map((def) => ({ ...this.toFileSpanWithContext(def.fileName, def.textSpan, def.contextSpan, project), ...def.unverified && { unverified: def.unverified } })); - } - /* - * When we map a .d.ts location to .ts, Visual Studio gets confused because there's no associated Roslyn Document in - * the same project which corresponds to the file. VS Code has no problem with this, and luckily we have two protocols. - * This retains the existing behavior for the "simplified" (VS Code) protocol but stores the .d.ts location in a - * set of additional fields, and does the reverse for VS (store the .d.ts location where - * it used to be and stores the .ts location in the additional fields). - */ - static mapToOriginalLocation(def) { - if (def.originalFileName) { - Debug.assert(def.originalTextSpan !== void 0, "originalTextSpan should be present if originalFileName is"); - return { - ...def, - fileName: def.originalFileName, - textSpan: def.originalTextSpan, - targetFileName: def.fileName, - targetTextSpan: def.textSpan, - contextSpan: def.originalContextSpan, - targetContextSpan: def.contextSpan - }; - } - return def; - } - toFileSpan(fileName, textSpan, project) { - const ls = project.getLanguageService(); - const start = ls.toLineColumnOffset(fileName, textSpan.start); - const end = ls.toLineColumnOffset(fileName, textSpanEnd(textSpan)); - return { - file: fileName, - start: { line: start.line + 1, offset: start.character + 1 }, - end: { line: end.line + 1, offset: end.character + 1 } - }; - } - toFileSpanWithContext(fileName, textSpan, contextSpan, project) { - const fileSpan = this.toFileSpan(fileName, textSpan, project); - const context = contextSpan && this.toFileSpan(fileName, contextSpan, project); - return context ? { ...fileSpan, contextStart: context.start, contextEnd: context.end } : fileSpan; - } - getTypeDefinition(args) { - const { file, project } = this.getFileAndProject(args); - const position = this.getPositionInFile(args, file); - const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getTypeDefinitionAtPosition(file, position) || emptyArray2, project); - return this.mapDefinitionInfo(definitions, project); - } - mapImplementationLocations(implementations, project) { - return implementations.map((info) => { - const newDocumentSpan = getMappedDocumentSpanForProject(info, project); - return !newDocumentSpan ? info : { - ...newDocumentSpan, - kind: info.kind, - displayParts: info.displayParts - }; - }); - } - getImplementation(args, simplifiedResult) { - const { file, project } = this.getFileAndProject(args); - const position = this.getPositionInFile(args, file); - const implementations = this.mapImplementationLocations(project.getLanguageService().getImplementationAtPosition(file, position) || emptyArray2, project); - return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(_Session.mapToOriginalLocation); - } - getSyntacticDiagnosticsSync(args) { - const { configFile } = this.getConfigFileAndProject(args); - if (configFile) { - return emptyArray2; - } - return this.getDiagnosticsWorker( - args, - /*isSemantic*/ - false, - (project, file) => project.getLanguageService().getSyntacticDiagnostics(file), - !!args.includeLinePosition - ); - } - getSemanticDiagnosticsSync(args) { - const { configFile, project } = this.getConfigFileAndProject(args); - if (configFile) { - return this.getConfigFileDiagnostics(configFile, project, !!args.includeLinePosition); - } - return this.getDiagnosticsWorker( - args, - /*isSemantic*/ - true, - (project2, file) => project2.getLanguageService().getSemanticDiagnostics(file).filter((d) => !!d.file), - !!args.includeLinePosition - ); - } - getSuggestionDiagnosticsSync(args) { - const { configFile } = this.getConfigFileAndProject(args); - if (configFile) { - return emptyArray2; - } - return this.getDiagnosticsWorker( - args, - /*isSemantic*/ - true, - (project, file) => project.getLanguageService().getSuggestionDiagnostics(file), - !!args.includeLinePosition - ); - } - getJsxClosingTag(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const position = this.getPositionInFile(args, file); - const tag = languageService.getJsxClosingTagAtPosition(file, position); - return tag === void 0 ? void 0 : { newText: tag.newText, caretOffset: 0 }; - } - getLinkedEditingRange(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const position = this.getPositionInFile(args, file); - const linkedEditInfo = languageService.getLinkedEditingRangeAtPosition(file, position); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (scriptInfo === void 0 || linkedEditInfo === void 0) - return void 0; - return convertLinkedEditInfoToRanges(linkedEditInfo, scriptInfo); - } - getDocumentHighlights(args, simplifiedResult) { - const { file, project } = this.getFileAndProject(args); - const position = this.getPositionInFile(args, file); - const documentHighlights = project.getLanguageService().getDocumentHighlights(file, position, args.filesToSearch); - if (!documentHighlights) - return emptyArray2; - if (!simplifiedResult) - return documentHighlights; - return documentHighlights.map(({ fileName, highlightSpans }) => { - const scriptInfo = project.getScriptInfo(fileName); - return { - file: fileName, - highlightSpans: highlightSpans.map(({ textSpan, kind, contextSpan }) => ({ - ...toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo), - kind - })) - }; - }); - } - provideInlayHints(args) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const hints = project.getLanguageService().provideInlayHints(file, args, this.getPreferences(file)); - return hints.map((hint) => { - const { position, displayParts } = hint; - return { - ...hint, - position: scriptInfo.positionToLineOffset(position), - displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => { - if (span) { - Debug.assertIsDefined(file2, "Target file should be defined together with its span."); - const scriptInfo2 = this.projectService.getScriptInfo(file2); - return { - text, - span: { - start: scriptInfo2.positionToLineOffset(span.start), - end: scriptInfo2.positionToLineOffset(span.start + span.length), - file: file2 - } - }; - } else { - return { text }; - } - }) - }; - }); - } - setCompilerOptionsForInferredProjects(args) { - this.projectService.setCompilerOptionsForInferredProjects(args.options, args.projectRootPath); - } - getProjectInfo(args) { - return this.getProjectInfoWorker( - args.file, - args.projectFileName, - args.needFileNameList, - /*excludeConfigFiles*/ - false - ); - } - getProjectInfoWorker(uncheckedFileName, projectFileName, needFileNameList, excludeConfigFiles) { - const { project } = this.getFileAndProjectWorker(uncheckedFileName, projectFileName); - updateProjectIfDirty(project); - const projectInfo = { - configFileName: project.getProjectName(), - languageServiceDisabled: !project.languageServiceEnabled, - fileNames: needFileNameList ? project.getFileNames( - /*excludeFilesFromExternalLibraries*/ - false, - excludeConfigFiles - ) : void 0 - }; - return projectInfo; - } - getRenameInfo(args) { - const { file, project } = this.getFileAndProject(args); - const position = this.getPositionInFile(args, file); - const preferences = this.getPreferences(file); - return project.getLanguageService().getRenameInfo(file, position, preferences); - } - getProjects(args, getScriptInfoEnsuringProjectsUptoDate, ignoreNoProjectError) { - let projects; - let symLinkedProjects; - if (args.projectFileName) { - const project = this.getProject(args.projectFileName); - if (project) { - projects = [project]; - } - } else { - const scriptInfo = getScriptInfoEnsuringProjectsUptoDate ? this.projectService.getScriptInfoEnsuringProjectsUptoDate(args.file) : this.projectService.getScriptInfo(args.file); - if (!scriptInfo) { - if (ignoreNoProjectError) - return emptyArray2; - this.projectService.logErrorForScriptInfoNotFound(args.file); - return Errors.ThrowNoProject(); - } else if (!getScriptInfoEnsuringProjectsUptoDate) { - this.projectService.ensureDefaultProjectForFile(scriptInfo); - } - projects = scriptInfo.containingProjects; - symLinkedProjects = this.projectService.getSymlinkedProjects(scriptInfo); - } - projects = filter(projects, (p) => p.languageServiceEnabled && !p.isOrphan()); - if (!ignoreNoProjectError && (!projects || !projects.length) && !symLinkedProjects) { - this.projectService.logErrorForScriptInfoNotFound(args.file ?? args.projectFileName); - return Errors.ThrowNoProject(); - } - return symLinkedProjects ? { projects, symLinkedProjects } : projects; - } - getDefaultProject(args) { - if (args.projectFileName) { - const project = this.getProject(args.projectFileName); - if (project) { - return project; - } - if (!args.file) { - return Errors.ThrowNoProject(); - } - } - const info = this.projectService.getScriptInfo(args.file); - return info.getDefaultProject(); - } - getRenameLocations(args, simplifiedResult) { - const file = toNormalizedPath(args.file); - const position = this.getPositionInFile(args, file); - const projects = this.getProjects(args); - const defaultProject = this.getDefaultProject(args); - const preferences = this.getPreferences(file); - const renameInfo = this.mapRenameInfo( - defaultProject.getLanguageService().getRenameInfo(file, position, preferences), - Debug.checkDefined(this.projectService.getScriptInfo(file)) - ); - if (!renameInfo.canRename) - return simplifiedResult ? { info: renameInfo, locs: [] } : []; - const locations = getRenameLocationsWorker( - projects, - defaultProject, - { fileName: args.file, pos: position }, - !!args.findInStrings, - !!args.findInComments, - preferences - ); - if (!simplifiedResult) - return locations; - return { info: renameInfo, locs: this.toSpanGroups(locations) }; - } - mapRenameInfo(info, scriptInfo) { - if (info.canRename) { - const { canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan } = info; - return identity( - { canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan: toProtocolTextSpan(triggerSpan, scriptInfo) } - ); - } else { - return info; - } - } - toSpanGroups(locations) { - const map2 = /* @__PURE__ */ new Map(); - for (const { fileName, textSpan, contextSpan, originalContextSpan: _2, originalTextSpan: _, originalFileName: _1, ...prefixSuffixText } of locations) { - let group2 = map2.get(fileName); - if (!group2) - map2.set(fileName, group2 = { file: fileName, locs: [] }); - const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(fileName)); - group2.locs.push({ ...toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo), ...prefixSuffixText }); - } - return arrayFrom(map2.values()); - } - getReferences(args, simplifiedResult) { - const file = toNormalizedPath(args.file); - const projects = this.getProjects(args); - const position = this.getPositionInFile(args, file); - const references = getReferencesWorker( - projects, - this.getDefaultProject(args), - { fileName: args.file, pos: position }, - this.logger - ); - if (!simplifiedResult) - return references; - const preferences = this.getPreferences(file); - const defaultProject = this.getDefaultProject(args); - const scriptInfo = defaultProject.getScriptInfoForNormalizedPath(file); - const nameInfo = defaultProject.getLanguageService().getQuickInfoAtPosition(file, position); - const symbolDisplayString = nameInfo ? displayPartsToString(nameInfo.displayParts) : ""; - const nameSpan = nameInfo && nameInfo.textSpan; - const symbolStartOffset = nameSpan ? scriptInfo.positionToLineOffset(nameSpan.start).offset : 0; - const symbolName2 = nameSpan ? scriptInfo.getSnapshot().getText(nameSpan.start, textSpanEnd(nameSpan)) : ""; - const refs = flatMap(references, (referencedSymbol) => { - return referencedSymbol.references.map((entry) => referenceEntryToReferencesResponseItem(this.projectService, entry, preferences)); - }); - return { refs, symbolName: symbolName2, symbolStartOffset, symbolDisplayString }; - } - getFileReferences(args, simplifiedResult) { - const projects = this.getProjects(args); - const fileName = args.file; - const preferences = this.getPreferences(toNormalizedPath(fileName)); - const references = []; - const seen = createDocumentSpanSet(); - forEachProjectInProjects( - projects, - /*path*/ - void 0, - (project) => { - if (project.getCancellationToken().isCancellationRequested()) - return; - const projectOutputs = project.getLanguageService().getFileReferences(fileName); - if (projectOutputs) { - for (const referenceEntry of projectOutputs) { - if (!seen.has(referenceEntry)) { - references.push(referenceEntry); - seen.add(referenceEntry); - } - } - } - } - ); - if (!simplifiedResult) - return references; - const refs = references.map((entry) => referenceEntryToReferencesResponseItem(this.projectService, entry, preferences)); - return { - refs, - symbolName: `"${args.file}"` - }; - } - /** - * @param fileName is the name of the file to be opened - * @param fileContent is a version of the file content that is known to be more up to date than the one on disk - */ - openClientFile(fileName, fileContent, scriptKind, projectRootPath) { - this.projectService.openClientFileWithNormalizedPath( - fileName, - fileContent, - scriptKind, - /*hasMixedContent*/ - false, - projectRootPath - ); - } - getPosition(args, scriptInfo) { - return args.position !== void 0 ? args.position : scriptInfo.lineOffsetToPosition(args.line, args.offset); - } - getPositionInFile(args, file) { - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - return this.getPosition(args, scriptInfo); - } - getFileAndProject(args) { - return this.getFileAndProjectWorker(args.file, args.projectFileName); - } - getFileAndLanguageServiceForSyntacticOperation(args) { - const { file, project } = this.getFileAndProject(args); - return { - file, - languageService: project.getLanguageService( - /*ensureSynchronized*/ - false - ) - }; - } - getFileAndProjectWorker(uncheckedFileName, projectFileName) { - const file = toNormalizedPath(uncheckedFileName); - const project = this.getProject(projectFileName) || this.projectService.ensureDefaultProjectForFile(file); - return { file, project }; - } - getOutliningSpans(args, simplifiedResult) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const spans = languageService.getOutliningSpans(file); - if (simplifiedResult) { - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - return spans.map((s) => ({ - textSpan: toProtocolTextSpan(s.textSpan, scriptInfo), - hintSpan: toProtocolTextSpan(s.hintSpan, scriptInfo), - bannerText: s.bannerText, - autoCollapse: s.autoCollapse, - kind: s.kind - })); - } else { - return spans; - } - } - getTodoComments(args) { - const { file, project } = this.getFileAndProject(args); - return project.getLanguageService().getTodoComments(file, args.descriptors); - } - getDocCommentTemplate(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const position = this.getPositionInFile(args, file); - return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file), this.getFormatOptions(file)); - } - getSpanOfEnclosingComment(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const onlyMultiLine = args.onlyMultiLine; - const position = this.getPositionInFile(args, file); - return languageService.getSpanOfEnclosingComment(file, position, onlyMultiLine); - } - getIndentation(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const position = this.getPositionInFile(args, file); - const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file); - const indentation = languageService.getIndentationAtPosition(file, position, options); - return { position, indentation }; - } - getBreakpointStatement(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const position = this.getPositionInFile(args, file); - return languageService.getBreakpointStatementAtPosition(file, position); - } - getNameOrDottedNameSpan(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const position = this.getPositionInFile(args, file); - return languageService.getNameOrDottedNameSpan(file, position, position); - } - isValidBraceCompletion(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const position = this.getPositionInFile(args, file); - return languageService.isValidBraceCompletionAtPosition(file, position, args.openingBrace.charCodeAt(0)); - } - getQuickInfoWorker(args, simplifiedResult) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo)); - if (!quickInfo) { - return void 0; - } - const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc; - if (simplifiedResult) { - const displayString = displayPartsToString(quickInfo.displayParts); - return { - kind: quickInfo.kind, - kindModifiers: quickInfo.kindModifiers, - start: scriptInfo.positionToLineOffset(quickInfo.textSpan.start), - end: scriptInfo.positionToLineOffset(textSpanEnd(quickInfo.textSpan)), - displayString, - documentation: useDisplayParts ? this.mapDisplayParts(quickInfo.documentation, project) : displayPartsToString(quickInfo.documentation), - tags: this.mapJSDocTagInfo(quickInfo.tags, project, useDisplayParts) - }; - } else { - return useDisplayParts ? quickInfo : { - ...quickInfo, - tags: this.mapJSDocTagInfo( - quickInfo.tags, - project, - /*richResponse*/ - false - ) - }; - } - } - getFormattingEditsForRange(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const startPosition = scriptInfo.lineOffsetToPosition(args.line, args.offset); - const endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset); - const edits = languageService.getFormattingEditsForRange(file, startPosition, endPosition, this.getFormatOptions(file)); - if (!edits) { - return void 0; - } - return edits.map((edit) => this.convertTextChangeToCodeEdit(edit, scriptInfo)); - } - getFormattingEditsForRangeFull(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file); - return languageService.getFormattingEditsForRange(file, args.position, args.endPosition, options); - } - getFormattingEditsForDocumentFull(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file); - return languageService.getFormattingEditsForDocument(file, options); - } - getFormattingEditsAfterKeystrokeFull(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file); - return languageService.getFormattingEditsAfterKeystroke(file, args.position, args.key, options); - } - getFormattingEditsAfterKeystroke(args) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const position = scriptInfo.lineOffsetToPosition(args.line, args.offset); - const formatOptions = this.getFormatOptions(file); - const edits = languageService.getFormattingEditsAfterKeystroke( - file, - position, - args.key, - formatOptions - ); - if (args.key === "\n" && (!edits || edits.length === 0 || allEditsBeforePos(edits, position))) { - const { lineText, absolutePosition } = scriptInfo.textStorage.getAbsolutePositionAndLineText(args.line); - if (lineText && lineText.search("\\S") < 0) { - const preferredIndent = languageService.getIndentationAtPosition(file, position, formatOptions); - let hasIndent = 0; - let i, len; - for (i = 0, len = lineText.length; i < len; i++) { - if (lineText.charAt(i) === " ") { - hasIndent++; - } else if (lineText.charAt(i) === " ") { - hasIndent += formatOptions.tabSize; - } else { - break; - } - } - if (preferredIndent !== hasIndent) { - const firstNoWhiteSpacePosition = absolutePosition + i; - edits.push({ - span: createTextSpanFromBounds(absolutePosition, firstNoWhiteSpacePosition), - newText: ts_formatting_exports.getIndentationString(preferredIndent, formatOptions) - }); - } - } - } - if (!edits) { - return void 0; - } - return edits.map((edit) => { - return { - start: scriptInfo.positionToLineOffset(edit.span.start), - end: scriptInfo.positionToLineOffset(textSpanEnd(edit.span)), - newText: edit.newText ? edit.newText : "" - }; - }); - } - getCompletions(args, kind) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const position = this.getPosition(args, scriptInfo); - const completions = project.getLanguageService().getCompletionsAtPosition( - file, - position, - { - ...convertUserPreferences(this.getPreferences(file)), - triggerCharacter: args.triggerCharacter, - triggerKind: args.triggerKind, - includeExternalModuleExports: args.includeExternalModuleExports, - includeInsertTextCompletions: args.includeInsertTextCompletions - }, - project.projectService.getFormatCodeOptions(file) - ); - if (completions === void 0) - return void 0; - if (kind === "completions-full" /* CompletionsFull */) - return completions; - const prefix = args.prefix || ""; - const entries = mapDefined(completions.entries, (entry) => { - if (completions.isMemberCompletion || startsWith(entry.name.toLowerCase(), prefix.toLowerCase())) { - const { - name, - kind: kind2, - kindModifiers, - sortText, - insertText, - filterText, - replacementSpan, - hasAction, - source, - sourceDisplay, - labelDetails, - isSnippet, - isRecommended, - isPackageJsonImport, - isImportStatementCompletion, - data - } = entry; - const convertedSpan = replacementSpan ? toProtocolTextSpan(replacementSpan, scriptInfo) : void 0; - return { - name, - kind: kind2, - kindModifiers, - sortText, - insertText, - filterText, - replacementSpan: convertedSpan, - isSnippet, - hasAction: hasAction || void 0, - source, - sourceDisplay, - labelDetails, - isRecommended, - isPackageJsonImport, - isImportStatementCompletion, - data - }; - } - }); - if (kind === "completions" /* Completions */) { - if (completions.metadata) - entries.metadata = completions.metadata; - return entries; - } - const res = { - ...completions, - optionalReplacementSpan: completions.optionalReplacementSpan && toProtocolTextSpan(completions.optionalReplacementSpan, scriptInfo), - entries - }; - return res; - } - getCompletionEntryDetails(args, fullResult) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const position = this.getPosition(args, scriptInfo); - const formattingOptions = project.projectService.getFormatCodeOptions(file); - const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc; - const result = mapDefined(args.entryNames, (entryName) => { - const { name, source, data } = typeof entryName === "string" ? { name: entryName, source: void 0, data: void 0 } : entryName; - return project.getLanguageService().getCompletionEntryDetails(file, position, name, formattingOptions, source, this.getPreferences(file), data ? cast(data, isCompletionEntryData) : void 0); - }); - return fullResult ? useDisplayParts ? result : result.map((details) => ({ ...details, tags: this.mapJSDocTagInfo( - details.tags, - project, - /*richResponse*/ - false - ) })) : result.map((details) => ({ - ...details, - codeActions: map(details.codeActions, (action) => this.mapCodeAction(action)), - documentation: this.mapDisplayParts(details.documentation, project), - tags: this.mapJSDocTagInfo(details.tags, project, useDisplayParts) - })); - } - getCompileOnSaveAffectedFileList(args) { - const projects = this.getProjects( - args, - /*getScriptInfoEnsuringProjectsUptoDate*/ - true, - /*ignoreNoProjectError*/ - true - ); - const info = this.projectService.getScriptInfo(args.file); - if (!info) { - return emptyArray2; - } - return combineProjectOutput( - info, - (path) => this.projectService.getScriptInfoForPath(path), - projects, - (project, info2) => { - if (!project.compileOnSaveEnabled || !project.languageServiceEnabled || project.isOrphan()) { - return void 0; - } - const compilationSettings = project.getCompilationSettings(); - if (!!compilationSettings.noEmit || isDeclarationFileName(info2.fileName) && !dtsChangeCanAffectEmit(compilationSettings)) { - return void 0; - } - return { - projectFileName: project.getProjectName(), - fileNames: project.getCompileOnSaveAffectedFileList(info2), - projectUsesOutFile: !!outFile(compilationSettings) - }; - } - ); - } - emitFile(args) { - const { file, project } = this.getFileAndProject(args); - if (!project) { - Errors.ThrowNoProject(); - } - if (!project.languageServiceEnabled) { - return args.richResponse ? { emitSkipped: true, diagnostics: [] } : false; - } - const scriptInfo = project.getScriptInfo(file); - const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path, data, writeByteOrderMark) => this.host.writeFile(path, data, writeByteOrderMark)); - return args.richResponse ? { - emitSkipped, - diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) : diagnostics.map((d) => formatDiagnosticToProtocol( - d, - /*includeFileName*/ - true - )) - } : !emitSkipped; - } - getSignatureHelpItems(args, simplifiedResult) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const position = this.getPosition(args, scriptInfo); - const helpItems = project.getLanguageService().getSignatureHelpItems(file, position, args); - const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc; - if (helpItems && simplifiedResult) { - const span = helpItems.applicableSpan; - return { - ...helpItems, - applicableSpan: { - start: scriptInfo.positionToLineOffset(span.start), - end: scriptInfo.positionToLineOffset(span.start + span.length) - }, - items: this.mapSignatureHelpItems(helpItems.items, project, useDisplayParts) - }; - } else if (useDisplayParts || !helpItems) { - return helpItems; - } else { - return { - ...helpItems, - items: helpItems.items.map((item) => ({ ...item, tags: this.mapJSDocTagInfo( - item.tags, - project, - /*richResponse*/ - false - ) })) - }; - } - } - toPendingErrorCheck(uncheckedFileName) { - const fileName = toNormalizedPath(uncheckedFileName); - const project = this.projectService.tryGetDefaultProjectForFile(fileName); - return project && { fileName, project }; - } - getDiagnostics(next, delay, fileNames) { - if (this.suppressDiagnosticEvents) { - return; - } - if (fileNames.length > 0) { - this.updateErrorCheck(next, fileNames, delay); - } - } - change(args) { - const scriptInfo = this.projectService.getScriptInfo(args.file); - Debug.assert(!!scriptInfo); - scriptInfo.textStorage.switchToScriptVersionCache(); - const start = scriptInfo.lineOffsetToPosition(args.line, args.offset); - const end = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset); - if (start >= 0) { - this.changeSeq++; - this.projectService.applyChangesToFile(scriptInfo, singleIterator({ - span: { start, length: end - start }, - newText: args.insertString - // TODO: GH#18217 - })); - } - } - reload(args, reqSeq) { - const file = toNormalizedPath(args.file); - const tempFileName = args.tmpfile === void 0 ? void 0 : toNormalizedPath(args.tmpfile); - const info = this.projectService.getScriptInfoForNormalizedPath(file); - if (info) { - this.changeSeq++; - if (info.reloadFromFile(tempFileName)) { - this.doOutput( - /*info*/ - void 0, - "reload" /* Reload */, - reqSeq, - /*success*/ - true - ); - } - } - } - saveToTmp(fileName, tempFileName) { - const scriptInfo = this.projectService.getScriptInfo(fileName); - if (scriptInfo) { - scriptInfo.saveTo(tempFileName); - } - } - closeClientFile(fileName) { - if (!fileName) { - return; - } - const file = normalizePath(fileName); - this.projectService.closeClientFile(file); - } - mapLocationNavigationBarItems(items, scriptInfo) { - return map(items, (item) => ({ - text: item.text, - kind: item.kind, - kindModifiers: item.kindModifiers, - spans: item.spans.map((span) => toProtocolTextSpan(span, scriptInfo)), - childItems: this.mapLocationNavigationBarItems(item.childItems, scriptInfo), - indent: item.indent - })); - } - getNavigationBarItems(args, simplifiedResult) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const items = languageService.getNavigationBarItems(file); - return !items ? void 0 : simplifiedResult ? this.mapLocationNavigationBarItems(items, this.projectService.getScriptInfoForNormalizedPath(file)) : items; - } - toLocationNavigationTree(tree, scriptInfo) { - return { - text: tree.text, - kind: tree.kind, - kindModifiers: tree.kindModifiers, - spans: tree.spans.map((span) => toProtocolTextSpan(span, scriptInfo)), - nameSpan: tree.nameSpan && toProtocolTextSpan(tree.nameSpan, scriptInfo), - childItems: map(tree.childItems, (item) => this.toLocationNavigationTree(item, scriptInfo)) - }; - } - getNavigationTree(args, simplifiedResult) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const tree = languageService.getNavigationTree(file); - return !tree ? void 0 : simplifiedResult ? this.toLocationNavigationTree(tree, this.projectService.getScriptInfoForNormalizedPath(file)) : tree; - } - getNavigateToItems(args, simplifiedResult) { - const full = this.getFullNavigateToItems(args); - return !simplifiedResult ? flatMap(full, ({ navigateToItems }) => navigateToItems) : flatMap( - full, - ({ project, navigateToItems }) => navigateToItems.map((navItem) => { - const scriptInfo = project.getScriptInfo(navItem.fileName); - const bakedItem = { - name: navItem.name, - kind: navItem.kind, - kindModifiers: navItem.kindModifiers, - isCaseSensitive: navItem.isCaseSensitive, - matchKind: navItem.matchKind, - file: navItem.fileName, - start: scriptInfo.positionToLineOffset(navItem.textSpan.start), - end: scriptInfo.positionToLineOffset(textSpanEnd(navItem.textSpan)) - }; - if (navItem.kindModifiers && navItem.kindModifiers !== "") { - bakedItem.kindModifiers = navItem.kindModifiers; - } - if (navItem.containerName && navItem.containerName.length > 0) { - bakedItem.containerName = navItem.containerName; - } - if (navItem.containerKind && navItem.containerKind.length > 0) { - bakedItem.containerKind = navItem.containerKind; - } - return bakedItem; - }) - ); - } - getFullNavigateToItems(args) { - const { currentFileOnly, searchValue, maxResultCount, projectFileName } = args; - if (currentFileOnly) { - Debug.assertIsDefined(args.file); - const { file, project } = this.getFileAndProject(args); - return [{ project, navigateToItems: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }]; - } - const outputs = []; - const seenItems = /* @__PURE__ */ new Map(); - if (!args.file && !projectFileName) { - this.projectService.loadAncestorProjectTree(); - this.projectService.forEachEnabledProject((project) => addItemsForProject(project)); - } else { - const projects = this.getProjects(args); - forEachProjectInProjects( - projects, - /*path*/ - void 0, - (project) => addItemsForProject(project) - ); - } - return outputs; - function addItemsForProject(project) { - const projectItems = project.getLanguageService().getNavigateToItems( - searchValue, - maxResultCount, - /*fileName*/ - void 0, - /*excludeDts*/ - project.isNonTsProject() - ); - const unseenItems = filter(projectItems, (item) => tryAddSeenItem(item) && !getMappedLocationForProject(documentSpanLocation(item), project)); - if (unseenItems.length) { - outputs.push({ project, navigateToItems: unseenItems }); - } - } - function tryAddSeenItem(item) { - const name = item.name; - if (!seenItems.has(name)) { - seenItems.set(name, [item]); - return true; - } - const seen = seenItems.get(name); - for (const seenItem of seen) { - if (navigateToItemIsEqualTo(seenItem, item)) { - return false; - } - } - seen.push(item); - return true; - } - function navigateToItemIsEqualTo(a, b) { - if (a === b) { - return true; - } - if (!a || !b) { - return false; - } - return a.containerKind === b.containerKind && a.containerName === b.containerName && a.fileName === b.fileName && a.isCaseSensitive === b.isCaseSensitive && a.kind === b.kind && a.kindModifiers === b.kindModifiers && a.matchKind === b.matchKind && a.name === b.name && a.textSpan.start === b.textSpan.start && a.textSpan.length === b.textSpan.length; - } - } - getSupportedCodeFixes(args) { - if (!args) - return getSupportedCodeFixes(); - if (args.file) { - const { file, project: project2 } = this.getFileAndProject(args); - return project2.getLanguageService().getSupportedCodeFixes(file); - } - const project = this.getProject(args.projectFileName); - if (!project) - Errors.ThrowNoProject(); - return project.getLanguageService().getSupportedCodeFixes(); - } - isLocation(locationOrSpan) { - return locationOrSpan.line !== void 0; - } - extractPositionOrRange(args, scriptInfo) { - let position; - let textRange; - if (this.isLocation(args)) { - position = getPosition(args); - } else { - textRange = this.getRange(args, scriptInfo); - } - return Debug.checkDefined(position === void 0 ? textRange : position); - function getPosition(loc) { - return loc.position !== void 0 ? loc.position : scriptInfo.lineOffsetToPosition(loc.line, loc.offset); - } - } - getRange(args, scriptInfo) { - const { startPosition, endPosition } = this.getStartAndEndPosition(args, scriptInfo); - return { pos: startPosition, end: endPosition }; - } - getApplicableRefactors(args) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = project.getScriptInfoForNormalizedPath(file); - return project.getLanguageService().getApplicableRefactors(file, this.extractPositionOrRange(args, scriptInfo), this.getPreferences(file), args.triggerReason, args.kind, args.includeInteractiveActions); - } - getEditsForRefactor(args, simplifiedResult) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = project.getScriptInfoForNormalizedPath(file); - const result = project.getLanguageService().getEditsForRefactor( - file, - this.getFormatOptions(file), - this.extractPositionOrRange(args, scriptInfo), - args.refactor, - args.action, - this.getPreferences(file), - args.interactiveRefactorArguments - ); - if (result === void 0) { - return { - edits: [] - }; - } - if (simplifiedResult) { - const { renameFilename, renameLocation, edits } = result; - let mappedRenameLocation; - if (renameFilename !== void 0 && renameLocation !== void 0) { - const renameScriptInfo = project.getScriptInfoForNormalizedPath(toNormalizedPath(renameFilename)); - mappedRenameLocation = getLocationInNewDocument(getSnapshotText(renameScriptInfo.getSnapshot()), renameFilename, renameLocation, edits); - } - return { - renameLocation: mappedRenameLocation, - renameFilename, - edits: this.mapTextChangesToCodeEdits(edits), - notApplicableReason: result.notApplicableReason - }; - } - return result; - } - getMoveToRefactoringFileSuggestions(args) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = project.getScriptInfoForNormalizedPath(file); - return project.getLanguageService().getMoveToRefactoringFileSuggestions(file, this.extractPositionOrRange(args, scriptInfo), this.getPreferences(file)); - } - organizeImports(args, simplifiedResult) { - Debug.assert(args.scope.type === "file"); - const { file, project } = this.getFileAndProject(args.scope.args); - const changes = project.getLanguageService().organizeImports( - { - fileName: file, - mode: args.mode ?? (args.skipDestructiveCodeActions ? "SortAndCombine" /* SortAndCombine */ : void 0), - type: "file" - }, - this.getFormatOptions(file), - this.getPreferences(file) - ); - if (simplifiedResult) { - return this.mapTextChangesToCodeEdits(changes); - } else { - return changes; - } - } - getEditsForFileRename(args, simplifiedResult) { - const oldPath = toNormalizedPath(args.oldFilePath); - const newPath = toNormalizedPath(args.newFilePath); - const formatOptions = this.getHostFormatOptions(); - const preferences = this.getHostPreferences(); - const seenFiles = /* @__PURE__ */ new Set(); - const textChanges2 = []; - this.projectService.loadAncestorProjectTree(); - this.projectService.forEachEnabledProject((project) => { - const projectTextChanges = project.getLanguageService().getEditsForFileRename(oldPath, newPath, formatOptions, preferences); - const projectFiles = []; - for (const textChange of projectTextChanges) { - if (!seenFiles.has(textChange.fileName)) { - textChanges2.push(textChange); - projectFiles.push(textChange.fileName); - } - } - for (const file of projectFiles) { - seenFiles.add(file); - } - }); - return simplifiedResult ? textChanges2.map((c) => this.mapTextChangeToCodeEdit(c)) : textChanges2; - } - getCodeFixes(args, simplifiedResult) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = project.getScriptInfoForNormalizedPath(file); - const { startPosition, endPosition } = this.getStartAndEndPosition(args, scriptInfo); - let codeActions; - try { - codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, this.getFormatOptions(file), this.getPreferences(file)); - } catch (e) { - const ls = project.getLanguageService(); - const existingDiagCodes = [ - ...ls.getSyntacticDiagnostics(file), - ...ls.getSemanticDiagnostics(file), - ...ls.getSuggestionDiagnostics(file) - ].map((d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length) && d.code); - const badCode = args.errorCodes.find((c) => !existingDiagCodes.includes(c)); - if (badCode !== void 0) { - e.message = `BADCLIENT: Bad error code, ${badCode} not found in range ${startPosition}..${endPosition} (found: ${existingDiagCodes.join(", ")}); could have caused this error: -${e.message}`; - } - throw e; - } - return simplifiedResult ? codeActions.map((codeAction) => this.mapCodeFixAction(codeAction)) : codeActions; - } - getCombinedCodeFix({ scope, fixId: fixId52 }, simplifiedResult) { - Debug.assert(scope.type === "file"); - const { file, project } = this.getFileAndProject(scope.args); - const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file }, fixId52, this.getFormatOptions(file), this.getPreferences(file)); - if (simplifiedResult) { - return { changes: this.mapTextChangesToCodeEdits(res.changes), commands: res.commands }; - } else { - return res; - } - } - applyCodeActionCommand(args) { - const commands = args.command; - for (const command of toArray(commands)) { - const { file, project } = this.getFileAndProject(command); - project.getLanguageService().applyCodeActionCommand(command, this.getFormatOptions(file)).then( - (_result) => { - }, - (_error) => { - } - ); - } - return {}; - } - getStartAndEndPosition(args, scriptInfo) { - let startPosition, endPosition; - if (args.startPosition !== void 0) { - startPosition = args.startPosition; - } else { - startPosition = scriptInfo.lineOffsetToPosition(args.startLine, args.startOffset); - args.startPosition = startPosition; - } - if (args.endPosition !== void 0) { - endPosition = args.endPosition; - } else { - endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset); - args.endPosition = endPosition; - } - return { startPosition, endPosition }; - } - mapCodeAction({ description: description3, changes, commands }) { - return { description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands }; - } - mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId52, fixAllDescription }) { - return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId52, fixAllDescription }; - } - mapTextChangesToCodeEdits(textChanges2) { - return textChanges2.map((change) => this.mapTextChangeToCodeEdit(change)); - } - mapTextChangeToCodeEdit(textChanges2) { - const scriptInfo = this.projectService.getScriptInfoOrConfig(textChanges2.fileName); - if (!!textChanges2.isNewFile === !!scriptInfo) { - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(textChanges2.fileName); - } - Debug.fail("Expected isNewFile for (only) new files. " + JSON.stringify({ isNewFile: !!textChanges2.isNewFile, hasScriptInfo: !!scriptInfo })); - } - return scriptInfo ? { fileName: textChanges2.fileName, textChanges: textChanges2.textChanges.map((textChange) => convertTextChangeToCodeEdit(textChange, scriptInfo)) } : convertNewFileTextChangeToCodeEdit(textChanges2); - } - convertTextChangeToCodeEdit(change, scriptInfo) { - return { - start: scriptInfo.positionToLineOffset(change.span.start), - end: scriptInfo.positionToLineOffset(change.span.start + change.span.length), - newText: change.newText ? change.newText : "" - }; - } - getBraceMatching(args, simplifiedResult) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const position = this.getPosition(args, scriptInfo); - const spans = languageService.getBraceMatchingAtPosition(file, position); - return !spans ? void 0 : simplifiedResult ? spans.map((span) => toProtocolTextSpan(span, scriptInfo)) : spans; - } - getDiagnosticsForProject(next, delay, fileName) { - if (this.suppressDiagnosticEvents) { - return; - } - const { fileNames, languageServiceDisabled } = this.getProjectInfoWorker( - fileName, - /*projectFileName*/ - void 0, - /*needFileNameList*/ - true, - /*excludeConfigFiles*/ - true - ); - if (languageServiceDisabled) { - return; - } - const fileNamesInProject = fileNames.filter((value) => !stringContains(value, "lib.d.ts")); - if (fileNamesInProject.length === 0) { - return; - } - const highPriorityFiles = []; - const mediumPriorityFiles = []; - const lowPriorityFiles = []; - const veryLowPriorityFiles = []; - const normalizedFileName = toNormalizedPath(fileName); - const project = this.projectService.ensureDefaultProjectForFile(normalizedFileName); - for (const fileNameInProject of fileNamesInProject) { - if (this.getCanonicalFileName(fileNameInProject) === this.getCanonicalFileName(fileName)) { - highPriorityFiles.push(fileNameInProject); - } else { - const info = this.projectService.getScriptInfo(fileNameInProject); - if (!info.isScriptOpen()) { - if (isDeclarationFileName(fileNameInProject)) { - veryLowPriorityFiles.push(fileNameInProject); - } else { - lowPriorityFiles.push(fileNameInProject); - } - } else { - mediumPriorityFiles.push(fileNameInProject); - } - } - } - const sortedFiles = [...highPriorityFiles, ...mediumPriorityFiles, ...lowPriorityFiles, ...veryLowPriorityFiles]; - const checkList = sortedFiles.map((fileName2) => ({ fileName: fileName2, project })); - this.updateErrorCheck( - next, - checkList, - delay, - /*requireOpen*/ - false - ); - } - configurePlugin(args) { - this.projectService.configurePlugin(args); - } - getSmartSelectionRange(args, simplifiedResult) { - const { locations } = args; - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file)); - return map(locations, (location) => { - const pos = this.getPosition(location, scriptInfo); - const selectionRange = languageService.getSmartSelectionRange(file, pos); - return simplifiedResult ? this.mapSelectionRange(selectionRange, scriptInfo) : selectionRange; - }); - } - toggleLineComment(args, simplifiedResult) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const scriptInfo = this.projectService.getScriptInfo(file); - const textRange = this.getRange(args, scriptInfo); - const textChanges2 = languageService.toggleLineComment(file, textRange); - if (simplifiedResult) { - const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file); - return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2)); - } - return textChanges2; - } - toggleMultilineComment(args, simplifiedResult) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const textRange = this.getRange(args, scriptInfo); - const textChanges2 = languageService.toggleMultilineComment(file, textRange); - if (simplifiedResult) { - const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file); - return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2)); - } - return textChanges2; - } - commentSelection(args, simplifiedResult) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const textRange = this.getRange(args, scriptInfo); - const textChanges2 = languageService.commentSelection(file, textRange); - if (simplifiedResult) { - const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file); - return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2)); - } - return textChanges2; - } - uncommentSelection(args, simplifiedResult) { - const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - const textRange = this.getRange(args, scriptInfo); - const textChanges2 = languageService.uncommentSelection(file, textRange); - if (simplifiedResult) { - const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file); - return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2)); - } - return textChanges2; - } - mapSelectionRange(selectionRange, scriptInfo) { - const result = { - textSpan: toProtocolTextSpan(selectionRange.textSpan, scriptInfo) - }; - if (selectionRange.parent) { - result.parent = this.mapSelectionRange(selectionRange.parent, scriptInfo); - } - return result; - } - getScriptInfoFromProjectService(file) { - const normalizedFile = toNormalizedPath(file); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(normalizedFile); - if (!scriptInfo) { - this.projectService.logErrorForScriptInfoNotFound(normalizedFile); - return Errors.ThrowNoProject(); - } - return scriptInfo; - } - toProtocolCallHierarchyItem(item) { - const scriptInfo = this.getScriptInfoFromProjectService(item.file); - return { - name: item.name, - kind: item.kind, - kindModifiers: item.kindModifiers, - file: item.file, - containerName: item.containerName, - span: toProtocolTextSpan(item.span, scriptInfo), - selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo) - }; - } - toProtocolCallHierarchyIncomingCall(incomingCall) { - const scriptInfo = this.getScriptInfoFromProjectService(incomingCall.from.file); - return { - from: this.toProtocolCallHierarchyItem(incomingCall.from), - fromSpans: incomingCall.fromSpans.map((fromSpan) => toProtocolTextSpan(fromSpan, scriptInfo)) - }; - } - toProtocolCallHierarchyOutgoingCall(outgoingCall, scriptInfo) { - return { - to: this.toProtocolCallHierarchyItem(outgoingCall.to), - fromSpans: outgoingCall.fromSpans.map((fromSpan) => toProtocolTextSpan(fromSpan, scriptInfo)) - }; - } - prepareCallHierarchy(args) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); - if (scriptInfo) { - const position = this.getPosition(args, scriptInfo); - const result = project.getLanguageService().prepareCallHierarchy(file, position); - return result && mapOneOrMany(result, (item) => this.toProtocolCallHierarchyItem(item)); - } - return void 0; - } - provideCallHierarchyIncomingCalls(args) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.getScriptInfoFromProjectService(file); - const incomingCalls = project.getLanguageService().provideCallHierarchyIncomingCalls(file, this.getPosition(args, scriptInfo)); - return incomingCalls.map((call) => this.toProtocolCallHierarchyIncomingCall(call)); - } - provideCallHierarchyOutgoingCalls(args) { - const { file, project } = this.getFileAndProject(args); - const scriptInfo = this.getScriptInfoFromProjectService(file); - const outgoingCalls = project.getLanguageService().provideCallHierarchyOutgoingCalls(file, this.getPosition(args, scriptInfo)); - return outgoingCalls.map((call) => this.toProtocolCallHierarchyOutgoingCall(call, scriptInfo)); - } - getCanonicalFileName(fileName) { - const name = this.host.useCaseSensitiveFileNames ? fileName : toFileNameLowerCase(fileName); - return normalizePath(name); - } - exit() { - } - notRequired() { - return { responseRequired: false }; - } - requiredResponse(response) { - return { response, responseRequired: true }; - } - addProtocolHandler(command, handler) { - if (this.handlers.has(command)) { - throw new Error(`Protocol handler already exists for command "${command}"`); - } - this.handlers.set(command, handler); - } - setCurrentRequest(requestId) { - Debug.assert(this.currentRequestId === void 0); - this.currentRequestId = requestId; - this.cancellationToken.setRequest(requestId); - } - resetCurrentRequest(requestId) { - Debug.assert(this.currentRequestId === requestId); - this.currentRequestId = void 0; - this.cancellationToken.resetRequest(requestId); - } - executeWithRequestId(requestId, f) { - try { - this.setCurrentRequest(requestId); - return f(); - } finally { - this.resetCurrentRequest(requestId); - } - } - executeCommand(request) { - const handler = this.handlers.get(request.command); - if (handler) { - const response = this.executeWithRequestId(request.seq, () => handler(request)); - this.projectService.enableRequestedPlugins(); - return response; - } else { - this.logger.msg(`Unrecognized JSON command:${stringifyIndented(request)}`, "Err" /* Err */); - this.doOutput( - /*info*/ - void 0, - "unknown" /* Unknown */, - request.seq, - /*success*/ - false, - `Unrecognized JSON command: ${request.command}` - ); - return { responseRequired: false }; - } - } - onMessage(message) { - var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k; - this.gcTimer.scheduleCollect(); - this.performanceData = void 0; - let start; - if (this.logger.hasLevel(2 /* requestTime */)) { - start = this.hrtime(); - if (this.logger.hasLevel(3 /* verbose */)) { - this.logger.info(`request:${indent2(this.toStringMessage(message))}`); - } - } - let request; - let relevantFile; - try { - request = this.parseMessage(message); - relevantFile = request.arguments && request.arguments.file ? request.arguments : void 0; - (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "request", { seq: request.seq, command: request.command }); - (_b = perfLogger) == null ? void 0 : _b.logStartCommand("" + request.command, this.toStringMessage(message).substring(0, 100)); - (_c = tracing) == null ? void 0 : _c.push( - tracing.Phase.Session, - "executeCommand", - { seq: request.seq, command: request.command }, - /*separateBeginAndEnd*/ - true - ); - const { response, responseRequired } = this.executeCommand(request); - (_d = tracing) == null ? void 0 : _d.pop(); - if (this.logger.hasLevel(2 /* requestTime */)) { - const elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4); - if (responseRequired) { - this.logger.perftrc(`${request.seq}::${request.command}: elapsed time (in milliseconds) ${elapsedTime}`); - } else { - this.logger.perftrc(`${request.seq}::${request.command}: async elapsed time (in milliseconds) ${elapsedTime}`); - } - } - (_e = perfLogger) == null ? void 0 : _e.logStopCommand("" + request.command, "Success"); - (_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "response", { seq: request.seq, command: request.command, success: !!response }); - if (response) { - this.doOutput( - response, - request.command, - request.seq, - /*success*/ - true - ); - } else if (responseRequired) { - this.doOutput( - /*info*/ - void 0, - request.command, - request.seq, - /*success*/ - false, - "No content available." - ); - } - } catch (err) { - (_g = tracing) == null ? void 0 : _g.popAll(); - if (err instanceof OperationCanceledException) { - (_h = perfLogger) == null ? void 0 : _h.logStopCommand("" + (request && request.command), "Canceled: " + err); - (_i = tracing) == null ? void 0 : _i.instant(tracing.Phase.Session, "commandCanceled", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command }); - this.doOutput( - { canceled: true }, - request.command, - request.seq, - /*success*/ - true - ); - return; - } - this.logErrorWorker(err, this.toStringMessage(message), relevantFile); - (_j = perfLogger) == null ? void 0 : _j.logStopCommand("" + (request && request.command), "Error: " + err); - (_k = tracing) == null ? void 0 : _k.instant(tracing.Phase.Session, "commandError", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command, message: err.message }); - this.doOutput( - /*info*/ - void 0, - request ? request.command : "unknown" /* Unknown */, - request ? request.seq : 0, - /*success*/ - false, - "Error processing request. " + err.message + "\n" + err.stack - ); - } - } - parseMessage(message) { - return JSON.parse(message); - } - toStringMessage(message) { - return message; - } - getFormatOptions(file) { - return this.projectService.getFormatCodeOptions(file); - } - getPreferences(file) { - return this.projectService.getPreferences(file); - } - getHostFormatOptions() { - return this.projectService.getHostFormatCodeOptions(); - } - getHostPreferences() { - return this.projectService.getHostPreferences(); - } - }; - } - }); - - // src/server/scriptVersionCache.ts - var lineCollectionCapacity, CharRangeSection, EditWalker, TextChange9, _ScriptVersionCache, ScriptVersionCache, LineIndexSnapshot, LineIndex, LineNode, LineLeaf; - var init_scriptVersionCache = __esm({ - "src/server/scriptVersionCache.ts"() { - "use strict"; - init_ts7(); - init_ts_server3(); - lineCollectionCapacity = 4; - CharRangeSection = /* @__PURE__ */ ((CharRangeSection2) => { - CharRangeSection2[CharRangeSection2["PreStart"] = 0] = "PreStart"; - CharRangeSection2[CharRangeSection2["Start"] = 1] = "Start"; - CharRangeSection2[CharRangeSection2["Entire"] = 2] = "Entire"; - CharRangeSection2[CharRangeSection2["Mid"] = 3] = "Mid"; - CharRangeSection2[CharRangeSection2["End"] = 4] = "End"; - CharRangeSection2[CharRangeSection2["PostEnd"] = 5] = "PostEnd"; - return CharRangeSection2; - })(CharRangeSection || {}); - EditWalker = class { - constructor() { - this.goSubtree = true; - this.lineIndex = new LineIndex(); - this.endBranch = []; - this.state = 2 /* Entire */; - this.initialText = ""; - this.trailingText = ""; - this.lineIndex.root = new LineNode(); - this.startPath = [this.lineIndex.root]; - this.stack = [this.lineIndex.root]; - } - get done() { - return false; - } - insertLines(insertedText, suppressTrailingText) { - if (suppressTrailingText) { - this.trailingText = ""; - } - if (insertedText) { - insertedText = this.initialText + insertedText + this.trailingText; - } else { - insertedText = this.initialText + this.trailingText; - } - const lm = LineIndex.linesFromText(insertedText); - const lines = lm.lines; - if (lines.length > 1 && lines[lines.length - 1] === "") { - lines.pop(); - } - let branchParent; - let lastZeroCount; - for (let k = this.endBranch.length - 1; k >= 0; k--) { - this.endBranch[k].updateCounts(); - if (this.endBranch[k].charCount() === 0) { - lastZeroCount = this.endBranch[k]; - if (k > 0) { - branchParent = this.endBranch[k - 1]; - } else { - branchParent = this.branchNode; - } - } - } - if (lastZeroCount) { - branchParent.remove(lastZeroCount); - } - const leafNode = this.startPath[this.startPath.length - 1]; - if (lines.length > 0) { - leafNode.text = lines[0]; - if (lines.length > 1) { - let insertedNodes = new Array(lines.length - 1); - let startNode2 = leafNode; - for (let i = 1; i < lines.length; i++) { - insertedNodes[i - 1] = new LineLeaf(lines[i]); - } - let pathIndex = this.startPath.length - 2; - while (pathIndex >= 0) { - const insertionNode = this.startPath[pathIndex]; - insertedNodes = insertionNode.insertAt(startNode2, insertedNodes); - pathIndex--; - startNode2 = insertionNode; - } - let insertedNodesLen = insertedNodes.length; - while (insertedNodesLen > 0) { - const newRoot = new LineNode(); - newRoot.add(this.lineIndex.root); - insertedNodes = newRoot.insertAt(this.lineIndex.root, insertedNodes); - insertedNodesLen = insertedNodes.length; - this.lineIndex.root = newRoot; - } - this.lineIndex.root.updateCounts(); - } else { - for (let j = this.startPath.length - 2; j >= 0; j--) { - this.startPath[j].updateCounts(); - } - } - } else { - const insertionNode = this.startPath[this.startPath.length - 2]; - insertionNode.remove(leafNode); - for (let j = this.startPath.length - 2; j >= 0; j--) { - this.startPath[j].updateCounts(); - } - } - return this.lineIndex; - } - post(_relativeStart, _relativeLength, lineCollection) { - if (lineCollection === this.lineCollectionAtBranch) { - this.state = 4 /* End */; - } - this.stack.pop(); - } - pre(_relativeStart, _relativeLength, lineCollection, _parent, nodeType) { - const currentNode = this.stack[this.stack.length - 1]; - if (this.state === 2 /* Entire */ && nodeType === 1 /* Start */) { - this.state = 1 /* Start */; - this.branchNode = currentNode; - this.lineCollectionAtBranch = lineCollection; - } - let child; - function fresh(node) { - if (node.isLeaf()) { - return new LineLeaf(""); - } else - return new LineNode(); - } - switch (nodeType) { - case 0 /* PreStart */: - this.goSubtree = false; - if (this.state !== 4 /* End */) { - currentNode.add(lineCollection); - } - break; - case 1 /* Start */: - if (this.state === 4 /* End */) { - this.goSubtree = false; - } else { - child = fresh(lineCollection); - currentNode.add(child); - this.startPath.push(child); - } - break; - case 2 /* Entire */: - if (this.state !== 4 /* End */) { - child = fresh(lineCollection); - currentNode.add(child); - this.startPath.push(child); - } else { - if (!lineCollection.isLeaf()) { - child = fresh(lineCollection); - currentNode.add(child); - this.endBranch.push(child); - } - } - break; - case 3 /* Mid */: - this.goSubtree = false; - break; - case 4 /* End */: - if (this.state !== 4 /* End */) { - this.goSubtree = false; - } else { - if (!lineCollection.isLeaf()) { - child = fresh(lineCollection); - currentNode.add(child); - this.endBranch.push(child); - } - } - break; - case 5 /* PostEnd */: - this.goSubtree = false; - if (this.state !== 1 /* Start */) { - currentNode.add(lineCollection); - } - break; - } - if (this.goSubtree) { - this.stack.push(child); - } - } - // just gather text from the leaves - leaf(relativeStart, relativeLength, ll) { - if (this.state === 1 /* Start */) { - this.initialText = ll.text.substring(0, relativeStart); - } else if (this.state === 2 /* Entire */) { - this.initialText = ll.text.substring(0, relativeStart); - this.trailingText = ll.text.substring(relativeStart + relativeLength); - } else { - this.trailingText = ll.text.substring(relativeStart + relativeLength); - } - } - }; - TextChange9 = class { - constructor(pos, deleteLen, insertedText) { - this.pos = pos; - this.deleteLen = deleteLen; - this.insertedText = insertedText; - } - getTextChangeRange() { - return createTextChangeRange( - createTextSpan(this.pos, this.deleteLen), - this.insertedText ? this.insertedText.length : 0 - ); - } - }; - _ScriptVersionCache = class _ScriptVersionCache { - constructor() { - this.changes = []; - this.versions = new Array(_ScriptVersionCache.maxVersions); - this.minVersion = 0; - // no versions earlier than min version will maintain change history - this.currentVersion = 0; - } - versionToIndex(version2) { - if (version2 < this.minVersion || version2 > this.currentVersion) { - return void 0; - } - return version2 % _ScriptVersionCache.maxVersions; - } - currentVersionToIndex() { - return this.currentVersion % _ScriptVersionCache.maxVersions; - } - // REVIEW: can optimize by coalescing simple edits - edit(pos, deleteLen, insertedText) { - this.changes.push(new TextChange9(pos, deleteLen, insertedText)); - if (this.changes.length > _ScriptVersionCache.changeNumberThreshold || deleteLen > _ScriptVersionCache.changeLengthThreshold || insertedText && insertedText.length > _ScriptVersionCache.changeLengthThreshold) { - this.getSnapshot(); - } - } - getSnapshot() { - return this._getSnapshot(); - } - _getSnapshot() { - let snap = this.versions[this.currentVersionToIndex()]; - if (this.changes.length > 0) { - let snapIndex = snap.index; - for (const change of this.changes) { - snapIndex = snapIndex.edit(change.pos, change.deleteLen, change.insertedText); - } - snap = new LineIndexSnapshot(this.currentVersion + 1, this, snapIndex, this.changes); - this.currentVersion = snap.version; - this.versions[this.currentVersionToIndex()] = snap; - this.changes = []; - if (this.currentVersion - this.minVersion >= _ScriptVersionCache.maxVersions) { - this.minVersion = this.currentVersion - _ScriptVersionCache.maxVersions + 1; - } - } - return snap; - } - getSnapshotVersion() { - return this._getSnapshot().version; - } - getAbsolutePositionAndLineText(oneBasedLine) { - return this._getSnapshot().index.lineNumberToInfo(oneBasedLine); - } - lineOffsetToPosition(line, column) { - return this._getSnapshot().index.absolutePositionOfStartOfLine(line) + (column - 1); - } - positionToLineOffset(position) { - return this._getSnapshot().index.positionToLineOffset(position); - } - lineToTextSpan(line) { - const index = this._getSnapshot().index; - const { lineText, absolutePosition } = index.lineNumberToInfo(line + 1); - const len = lineText !== void 0 ? lineText.length : index.absolutePositionOfStartOfLine(line + 2) - absolutePosition; - return createTextSpan(absolutePosition, len); - } - getTextChangesBetweenVersions(oldVersion, newVersion) { - if (oldVersion < newVersion) { - if (oldVersion >= this.minVersion) { - const textChangeRanges = []; - for (let i = oldVersion + 1; i <= newVersion; i++) { - const snap = this.versions[this.versionToIndex(i)]; - for (const textChange of snap.changesSincePreviousVersion) { - textChangeRanges.push(textChange.getTextChangeRange()); - } - } - return collapseTextChangeRangesAcrossMultipleVersions(textChangeRanges); - } else { - return void 0; - } - } else { - return unchangedTextChangeRange; - } - } - getLineCount() { - return this._getSnapshot().index.getLineCount(); - } - static fromString(script) { - const svc = new _ScriptVersionCache(); - const snap = new LineIndexSnapshot(0, svc, new LineIndex()); - svc.versions[svc.currentVersion] = snap; - const lm = LineIndex.linesFromText(script); - snap.index.load(lm.lines); - return svc; - } - }; - _ScriptVersionCache.changeNumberThreshold = 8; - _ScriptVersionCache.changeLengthThreshold = 256; - _ScriptVersionCache.maxVersions = 8; - ScriptVersionCache = _ScriptVersionCache; - LineIndexSnapshot = class _LineIndexSnapshot { - constructor(version2, cache, index, changesSincePreviousVersion = emptyArray2) { - this.version = version2; - this.cache = cache; - this.index = index; - this.changesSincePreviousVersion = changesSincePreviousVersion; - } - getText(rangeStart, rangeEnd) { - return this.index.getText(rangeStart, rangeEnd - rangeStart); - } - getLength() { - return this.index.getLength(); - } - getChangeRange(oldSnapshot) { - if (oldSnapshot instanceof _LineIndexSnapshot && this.cache === oldSnapshot.cache) { - if (this.version <= oldSnapshot.version) { - return unchangedTextChangeRange; - } else { - return this.cache.getTextChangesBetweenVersions(oldSnapshot.version, this.version); - } - } - } - }; - LineIndex = class _LineIndex { - constructor() { - // set this to true to check each edit for accuracy - this.checkEdits = false; - } - absolutePositionOfStartOfLine(oneBasedLine) { - return this.lineNumberToInfo(oneBasedLine).absolutePosition; - } - positionToLineOffset(position) { - const { oneBasedLine, zeroBasedColumn } = this.root.charOffsetToLineInfo(1, position); - return { line: oneBasedLine, offset: zeroBasedColumn + 1 }; - } - positionToColumnAndLineText(position) { - return this.root.charOffsetToLineInfo(1, position); - } - getLineCount() { - return this.root.lineCount(); - } - lineNumberToInfo(oneBasedLine) { - const lineCount = this.getLineCount(); - if (oneBasedLine <= lineCount) { - const { position, leaf } = this.root.lineNumberToInfo(oneBasedLine, 0); - return { absolutePosition: position, lineText: leaf && leaf.text }; - } else { - return { absolutePosition: this.root.charCount(), lineText: void 0 }; - } - } - load(lines) { - if (lines.length > 0) { - const leaves = []; - for (let i = 0; i < lines.length; i++) { - leaves[i] = new LineLeaf(lines[i]); - } - this.root = _LineIndex.buildTreeFromBottom(leaves); - } else { - this.root = new LineNode(); - } - } - walk(rangeStart, rangeLength, walkFns) { - this.root.walk(rangeStart, rangeLength, walkFns); - } - getText(rangeStart, rangeLength) { - let accum = ""; - if (rangeLength > 0 && rangeStart < this.root.charCount()) { - this.walk(rangeStart, rangeLength, { - goSubtree: true, - done: false, - leaf: (relativeStart, relativeLength, ll) => { - accum = accum.concat(ll.text.substring(relativeStart, relativeStart + relativeLength)); - } - }); - } - return accum; - } - getLength() { - return this.root.charCount(); - } - every(f, rangeStart, rangeEnd) { - if (!rangeEnd) { - rangeEnd = this.root.charCount(); - } - const walkFns = { - goSubtree: true, - done: false, - leaf(relativeStart, relativeLength, ll) { - if (!f(ll, relativeStart, relativeLength)) { - this.done = true; - } - } - }; - this.walk(rangeStart, rangeEnd - rangeStart, walkFns); - return !walkFns.done; - } - edit(pos, deleteLength, newText) { - if (this.root.charCount() === 0) { - Debug.assert(deleteLength === 0); - if (newText !== void 0) { - this.load(_LineIndex.linesFromText(newText).lines); - return this; - } - return void 0; - } else { - let checkText; - if (this.checkEdits) { - const source = this.getText(0, this.root.charCount()); - checkText = source.slice(0, pos) + newText + source.slice(pos + deleteLength); - } - const walker = new EditWalker(); - let suppressTrailingText = false; - if (pos >= this.root.charCount()) { - pos = this.root.charCount() - 1; - const endString = this.getText(pos, 1); - if (newText) { - newText = endString + newText; - } else { - newText = endString; - } - deleteLength = 0; - suppressTrailingText = true; - } else if (deleteLength > 0) { - const e = pos + deleteLength; - const { zeroBasedColumn, lineText } = this.positionToColumnAndLineText(e); - if (zeroBasedColumn === 0) { - deleteLength += lineText.length; - newText = newText ? newText + lineText : lineText; - } - } - this.root.walk(pos, deleteLength, walker); - walker.insertLines(newText, suppressTrailingText); - if (this.checkEdits) { - const updatedText = walker.lineIndex.getText(0, walker.lineIndex.getLength()); - Debug.assert(checkText === updatedText, "buffer edit mismatch"); - } - return walker.lineIndex; - } - } - static buildTreeFromBottom(nodes) { - if (nodes.length < lineCollectionCapacity) { - return new LineNode(nodes); - } - const interiorNodes = new Array(Math.ceil(nodes.length / lineCollectionCapacity)); - let nodeIndex = 0; - for (let i = 0; i < interiorNodes.length; i++) { - const end = Math.min(nodeIndex + lineCollectionCapacity, nodes.length); - interiorNodes[i] = new LineNode(nodes.slice(nodeIndex, end)); - nodeIndex = end; - } - return this.buildTreeFromBottom(interiorNodes); - } - static linesFromText(text) { - const lineMap = computeLineStarts(text); - if (lineMap.length === 0) { - return { lines: [], lineMap }; - } - const lines = new Array(lineMap.length); - const lc = lineMap.length - 1; - for (let lmi = 0; lmi < lc; lmi++) { - lines[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]); - } - const endText = text.substring(lineMap[lc]); - if (endText.length > 0) { - lines[lc] = endText; - } else { - lines.pop(); - } - return { lines, lineMap }; - } - }; - LineNode = class _LineNode { - constructor(children = []) { - this.children = children; - this.totalChars = 0; - this.totalLines = 0; - if (children.length) - this.updateCounts(); - } - isLeaf() { - return false; - } - updateCounts() { - this.totalChars = 0; - this.totalLines = 0; - for (const child of this.children) { - this.totalChars += child.charCount(); - this.totalLines += child.lineCount(); - } - } - execWalk(rangeStart, rangeLength, walkFns, childIndex, nodeType) { - if (walkFns.pre) { - walkFns.pre(rangeStart, rangeLength, this.children[childIndex], this, nodeType); - } - if (walkFns.goSubtree) { - this.children[childIndex].walk(rangeStart, rangeLength, walkFns); - if (walkFns.post) { - walkFns.post(rangeStart, rangeLength, this.children[childIndex], this, nodeType); - } - } else { - walkFns.goSubtree = true; - } - return walkFns.done; - } - skipChild(relativeStart, relativeLength, childIndex, walkFns, nodeType) { - if (walkFns.pre && !walkFns.done) { - walkFns.pre(relativeStart, relativeLength, this.children[childIndex], this, nodeType); - walkFns.goSubtree = true; - } - } - walk(rangeStart, rangeLength, walkFns) { - let childIndex = 0; - let childCharCount = this.children[childIndex].charCount(); - let adjustedStart = rangeStart; - while (adjustedStart >= childCharCount) { - this.skipChild(adjustedStart, rangeLength, childIndex, walkFns, 0 /* PreStart */); - adjustedStart -= childCharCount; - childIndex++; - childCharCount = this.children[childIndex].charCount(); - } - if (adjustedStart + rangeLength <= childCharCount) { - if (this.execWalk(adjustedStart, rangeLength, walkFns, childIndex, 2 /* Entire */)) { - return; - } - } else { - if (this.execWalk(adjustedStart, childCharCount - adjustedStart, walkFns, childIndex, 1 /* Start */)) { - return; - } - let adjustedLength = rangeLength - (childCharCount - adjustedStart); - childIndex++; - const child = this.children[childIndex]; - childCharCount = child.charCount(); - while (adjustedLength > childCharCount) { - if (this.execWalk(0, childCharCount, walkFns, childIndex, 3 /* Mid */)) { - return; - } - adjustedLength -= childCharCount; - childIndex++; - childCharCount = this.children[childIndex].charCount(); - } - if (adjustedLength > 0) { - if (this.execWalk(0, adjustedLength, walkFns, childIndex, 4 /* End */)) { - return; - } - } - } - if (walkFns.pre) { - const clen = this.children.length; - if (childIndex < clen - 1) { - for (let ej = childIndex + 1; ej < clen; ej++) { - this.skipChild(0, 0, ej, walkFns, 5 /* PostEnd */); - } - } - } - } - // Input position is relative to the start of this node. - // Output line number is absolute. - charOffsetToLineInfo(lineNumberAccumulator, relativePosition) { - if (this.children.length === 0) { - return { oneBasedLine: lineNumberAccumulator, zeroBasedColumn: relativePosition, lineText: void 0 }; - } - for (const child of this.children) { - if (child.charCount() > relativePosition) { - if (child.isLeaf()) { - return { oneBasedLine: lineNumberAccumulator, zeroBasedColumn: relativePosition, lineText: child.text }; - } else { - return child.charOffsetToLineInfo(lineNumberAccumulator, relativePosition); - } - } else { - relativePosition -= child.charCount(); - lineNumberAccumulator += child.lineCount(); - } - } - const lineCount = this.lineCount(); - if (lineCount === 0) { - return { oneBasedLine: 1, zeroBasedColumn: 0, lineText: void 0 }; - } - const leaf = Debug.checkDefined(this.lineNumberToInfo(lineCount, 0).leaf); - return { oneBasedLine: lineCount, zeroBasedColumn: leaf.charCount(), lineText: void 0 }; - } - /** - * Input line number is relative to the start of this node. - * Output line number is relative to the child. - * positionAccumulator will be an absolute position once relativeLineNumber reaches 0. - */ - lineNumberToInfo(relativeOneBasedLine, positionAccumulator) { - for (const child of this.children) { - const childLineCount = child.lineCount(); - if (childLineCount >= relativeOneBasedLine) { - return child.isLeaf() ? { position: positionAccumulator, leaf: child } : child.lineNumberToInfo(relativeOneBasedLine, positionAccumulator); - } else { - relativeOneBasedLine -= childLineCount; - positionAccumulator += child.charCount(); - } - } - return { position: positionAccumulator, leaf: void 0 }; - } - splitAfter(childIndex) { - let splitNode; - const clen = this.children.length; - childIndex++; - const endLength = childIndex; - if (childIndex < clen) { - splitNode = new _LineNode(); - while (childIndex < clen) { - splitNode.add(this.children[childIndex]); - childIndex++; - } - splitNode.updateCounts(); - } - this.children.length = endLength; - return splitNode; - } - remove(child) { - const childIndex = this.findChildIndex(child); - const clen = this.children.length; - if (childIndex < clen - 1) { - for (let i = childIndex; i < clen - 1; i++) { - this.children[i] = this.children[i + 1]; - } - } - this.children.pop(); - } - findChildIndex(child) { - const childIndex = this.children.indexOf(child); - Debug.assert(childIndex !== -1); - return childIndex; - } - insertAt(child, nodes) { - let childIndex = this.findChildIndex(child); - const clen = this.children.length; - const nodeCount = nodes.length; - if (clen < lineCollectionCapacity && childIndex === clen - 1 && nodeCount === 1) { - this.add(nodes[0]); - this.updateCounts(); - return []; - } else { - const shiftNode = this.splitAfter(childIndex); - let nodeIndex = 0; - childIndex++; - while (childIndex < lineCollectionCapacity && nodeIndex < nodeCount) { - this.children[childIndex] = nodes[nodeIndex]; - childIndex++; - nodeIndex++; - } - let splitNodes = []; - let splitNodeCount = 0; - if (nodeIndex < nodeCount) { - splitNodeCount = Math.ceil((nodeCount - nodeIndex) / lineCollectionCapacity); - splitNodes = new Array(splitNodeCount); - let splitNodeIndex = 0; - for (let i = 0; i < splitNodeCount; i++) { - splitNodes[i] = new _LineNode(); - } - let splitNode = splitNodes[0]; - while (nodeIndex < nodeCount) { - splitNode.add(nodes[nodeIndex]); - nodeIndex++; - if (splitNode.children.length === lineCollectionCapacity) { - splitNodeIndex++; - splitNode = splitNodes[splitNodeIndex]; - } - } - for (let i = splitNodes.length - 1; i >= 0; i--) { - if (splitNodes[i].children.length === 0) { - splitNodes.pop(); - } - } - } - if (shiftNode) { - splitNodes.push(shiftNode); - } - this.updateCounts(); - for (let i = 0; i < splitNodeCount; i++) { - splitNodes[i].updateCounts(); - } - return splitNodes; - } - } - // assume there is room for the item; return true if more room - add(collection) { - this.children.push(collection); - Debug.assert(this.children.length <= lineCollectionCapacity); - } - charCount() { - return this.totalChars; - } - lineCount() { - return this.totalLines; - } - }; - LineLeaf = class { - constructor(text) { - this.text = text; - } - isLeaf() { - return true; - } - walk(rangeStart, rangeLength, walkFns) { - walkFns.leaf(rangeStart, rangeLength, this); - } - charCount() { - return this.text.length; - } - lineCount() { - return 1; - } - }; - } - }); - - // src/server/_namespaces/ts.server.ts - var ts_server_exports3 = {}; - __export(ts_server_exports3, { - ActionInvalidate: () => ActionInvalidate, - ActionPackageInstalled: () => ActionPackageInstalled, - ActionSet: () => ActionSet, - ActionWatchTypingLocations: () => ActionWatchTypingLocations, - Arguments: () => Arguments, - AutoImportProviderProject: () => AutoImportProviderProject, - AuxiliaryProject: () => AuxiliaryProject, - CharRangeSection: () => CharRangeSection, - CommandNames: () => CommandNames, - ConfigFileDiagEvent: () => ConfigFileDiagEvent, - ConfiguredProject: () => ConfiguredProject2, - Errors: () => Errors, - EventBeginInstallTypes: () => EventBeginInstallTypes, - EventEndInstallTypes: () => EventEndInstallTypes, - EventInitializationFailed: () => EventInitializationFailed, - EventTypesRegistry: () => EventTypesRegistry, - ExternalProject: () => ExternalProject2, - GcTimer: () => GcTimer, - InferredProject: () => InferredProject2, - LargeFileReferencedEvent: () => LargeFileReferencedEvent, - LineIndex: () => LineIndex, - LineLeaf: () => LineLeaf, - LineNode: () => LineNode, - LogLevel: () => LogLevel2, - Msg: () => Msg, - OpenFileInfoTelemetryEvent: () => OpenFileInfoTelemetryEvent, - Project: () => Project3, - ProjectInfoTelemetryEvent: () => ProjectInfoTelemetryEvent, - ProjectKind: () => ProjectKind, - ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent, - ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent, - ProjectLoadingStartEvent: () => ProjectLoadingStartEvent, - ProjectReferenceProjectLoadKind: () => ProjectReferenceProjectLoadKind, - ProjectService: () => ProjectService3, - ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent, - ScriptInfo: () => ScriptInfo, - ScriptVersionCache: () => ScriptVersionCache, - Session: () => Session3, - TextStorage: () => TextStorage, - ThrottledOperations: () => ThrottledOperations, - TypingsCache: () => TypingsCache, - allFilesAreJsOrDts: () => allFilesAreJsOrDts, - allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts, - asNormalizedPath: () => asNormalizedPath, - convertCompilerOptions: () => convertCompilerOptions, - convertFormatOptions: () => convertFormatOptions, - convertScriptKindName: () => convertScriptKindName, - convertTypeAcquisition: () => convertTypeAcquisition, - convertUserPreferences: () => convertUserPreferences, - convertWatchOptions: () => convertWatchOptions, - countEachFileTypes: () => countEachFileTypes, - createInstallTypingsRequest: () => createInstallTypingsRequest, - createModuleSpecifierCache: () => createModuleSpecifierCache, - createNormalizedPathMap: () => createNormalizedPathMap, - createPackageJsonCache: () => createPackageJsonCache, - createSortedArray: () => createSortedArray2, - emptyArray: () => emptyArray2, - findArgument: () => findArgument, - forEachResolvedProjectReferenceProject: () => forEachResolvedProjectReferenceProject, - formatDiagnosticToProtocol: () => formatDiagnosticToProtocol, - formatMessage: () => formatMessage2, - getBaseConfigFileName: () => getBaseConfigFileName, - getLocationInNewDocument: () => getLocationInNewDocument, - hasArgument: () => hasArgument, - hasNoTypeScriptSource: () => hasNoTypeScriptSource, - indent: () => indent2, - isConfigFile: () => isConfigFile, - isConfiguredProject: () => isConfiguredProject, - isDynamicFileName: () => isDynamicFileName, - isExternalProject: () => isExternalProject, - isInferredProject: () => isInferredProject, - isInferredProjectName: () => isInferredProjectName, - makeAutoImportProviderProjectName: () => makeAutoImportProviderProjectName, - makeAuxiliaryProjectName: () => makeAuxiliaryProjectName, - makeInferredProjectName: () => makeInferredProjectName, - maxFileSize: () => maxFileSize, - maxProgramSizeForNonTsFiles: () => maxProgramSizeForNonTsFiles, - normalizedPathToPath: () => normalizedPathToPath, - nowString: () => nowString, - nullCancellationToken: () => nullCancellationToken, - nullTypingsInstaller: () => nullTypingsInstaller, - projectContainsInfoDirectly: () => projectContainsInfoDirectly, - protocol: () => ts_server_protocol_exports, - removeSorted: () => removeSorted, - stringifyIndented: () => stringifyIndented, - toEvent: () => toEvent, - toNormalizedPath: () => toNormalizedPath, - tryConvertScriptKindName: () => tryConvertScriptKindName, - typingsInstaller: () => ts_server_typingsInstaller_exports, - updateProjectIfDirty: () => updateProjectIfDirty - }); - var init_ts_server3 = __esm({ - "src/server/_namespaces/ts.server.ts"() { - "use strict"; - init_ts_server(); - init_ts_server2(); - init_types4(); - init_utilitiesPublic3(); - init_utilities5(); - init_ts_server_protocol(); - init_scriptInfo(); - init_typingsCache(); - init_project(); - init_editorServices(); - init_moduleSpecifierCache(); - init_packageJsonCache(); - init_session(); - init_scriptVersionCache(); - } - }); - - // src/server/_namespaces/ts.ts - var ts_exports2 = {}; - __export(ts_exports2, { - ANONYMOUS: () => ANONYMOUS, - AccessFlags: () => AccessFlags, - AssertionLevel: () => AssertionLevel, - AssignmentDeclarationKind: () => AssignmentDeclarationKind, - AssignmentKind: () => AssignmentKind, - Associativity: () => Associativity, - BreakpointResolver: () => ts_BreakpointResolver_exports, - BuilderFileEmit: () => BuilderFileEmit, - BuilderProgramKind: () => BuilderProgramKind, - BuilderState: () => BuilderState, - BundleFileSectionKind: () => BundleFileSectionKind, - CallHierarchy: () => ts_CallHierarchy_exports, - CharacterCodes: () => CharacterCodes, - CheckFlags: () => CheckFlags, - CheckMode: () => CheckMode, - ClassificationType: () => ClassificationType, - ClassificationTypeNames: () => ClassificationTypeNames, - CommentDirectiveType: () => CommentDirectiveType, - Comparison: () => Comparison, - CompletionInfoFlags: () => CompletionInfoFlags, - CompletionTriggerKind: () => CompletionTriggerKind, - Completions: () => ts_Completions_exports, - ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, - ContainerFlags: () => ContainerFlags, - ContextFlags: () => ContextFlags, - CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, - Debug: () => Debug, - DiagnosticCategory: () => DiagnosticCategory, - Diagnostics: () => Diagnostics, - DocumentHighlights: () => DocumentHighlights, - ElementFlags: () => ElementFlags, - EmitFlags: () => EmitFlags, - EmitHint: () => EmitHint, - EmitOnly: () => EmitOnly, - EndOfLineState: () => EndOfLineState, - EnumKind: () => EnumKind, - ExitStatus: () => ExitStatus, - ExportKind: () => ExportKind, - Extension: () => Extension, - ExternalEmitHelpers: () => ExternalEmitHelpers, - FileIncludeKind: () => FileIncludeKind, - FilePreprocessingDiagnosticsKind: () => FilePreprocessingDiagnosticsKind, - FileSystemEntryKind: () => FileSystemEntryKind, - FileWatcherEventKind: () => FileWatcherEventKind, - FindAllReferences: () => ts_FindAllReferences_exports, - FlattenLevel: () => FlattenLevel, - FlowFlags: () => FlowFlags, - ForegroundColorEscapeSequences: () => ForegroundColorEscapeSequences, - FunctionFlags: () => FunctionFlags, - GeneratedIdentifierFlags: () => GeneratedIdentifierFlags, - GetLiteralTextFlags: () => GetLiteralTextFlags, - GoToDefinition: () => ts_GoToDefinition_exports, - HighlightSpanKind: () => HighlightSpanKind, - IdentifierNameMap: () => IdentifierNameMap, - IdentifierNameMultiMap: () => IdentifierNameMultiMap, - ImportKind: () => ImportKind, - ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, - IndentStyle: () => IndentStyle, - IndexFlags: () => IndexFlags, - IndexKind: () => IndexKind, - InferenceFlags: () => InferenceFlags, - InferencePriority: () => InferencePriority, - InlayHintKind: () => InlayHintKind, - InlayHints: () => ts_InlayHints_exports, - InternalEmitFlags: () => InternalEmitFlags, - InternalSymbolName: () => InternalSymbolName, - InvalidatedProjectKind: () => InvalidatedProjectKind, - JsDoc: () => ts_JsDoc_exports, - JsTyping: () => ts_JsTyping_exports, - JsxEmit: () => JsxEmit, - JsxFlags: () => JsxFlags, - JsxReferenceKind: () => JsxReferenceKind, - LanguageServiceMode: () => LanguageServiceMode, - LanguageServiceShimHostAdapter: () => LanguageServiceShimHostAdapter, - LanguageVariant: () => LanguageVariant, - LexicalEnvironmentFlags: () => LexicalEnvironmentFlags, - ListFormat: () => ListFormat, - LogLevel: () => LogLevel, - MemberOverrideStatus: () => MemberOverrideStatus, - ModifierFlags: () => ModifierFlags, - ModuleDetectionKind: () => ModuleDetectionKind, - ModuleInstanceState: () => ModuleInstanceState, - ModuleKind: () => ModuleKind, - ModuleResolutionKind: () => ModuleResolutionKind, - ModuleSpecifierEnding: () => ModuleSpecifierEnding, - NavigateTo: () => ts_NavigateTo_exports, - NavigationBar: () => ts_NavigationBar_exports, - NewLineKind: () => NewLineKind, - NodeBuilderFlags: () => NodeBuilderFlags, - NodeCheckFlags: () => NodeCheckFlags, - NodeFactoryFlags: () => NodeFactoryFlags, - NodeFlags: () => NodeFlags, - NodeResolutionFeatures: () => NodeResolutionFeatures, - ObjectFlags: () => ObjectFlags, - OperationCanceledException: () => OperationCanceledException, - OperatorPrecedence: () => OperatorPrecedence, - OrganizeImports: () => ts_OrganizeImports_exports, - OrganizeImportsMode: () => OrganizeImportsMode, - OuterExpressionKinds: () => OuterExpressionKinds, - OutliningElementsCollector: () => ts_OutliningElementsCollector_exports, - OutliningSpanKind: () => OutliningSpanKind, - OutputFileType: () => OutputFileType, - PackageJsonAutoImportPreference: () => PackageJsonAutoImportPreference, - PackageJsonDependencyGroup: () => PackageJsonDependencyGroup, - PatternMatchKind: () => PatternMatchKind, - PollingInterval: () => PollingInterval, - PollingWatchKind: () => PollingWatchKind, - PragmaKindFlags: () => PragmaKindFlags, - PrivateIdentifierKind: () => PrivateIdentifierKind, - ProcessLevel: () => ProcessLevel, - QuotePreference: () => QuotePreference, - RelationComparisonResult: () => RelationComparisonResult, - Rename: () => ts_Rename_exports, - ScriptElementKind: () => ScriptElementKind, - ScriptElementKindModifier: () => ScriptElementKindModifier, - ScriptKind: () => ScriptKind, - ScriptSnapshot: () => ScriptSnapshot, - ScriptTarget: () => ScriptTarget, - SemanticClassificationFormat: () => SemanticClassificationFormat, - SemanticMeaning: () => SemanticMeaning, - SemicolonPreference: () => SemicolonPreference, - SignatureCheckMode: () => SignatureCheckMode, - SignatureFlags: () => SignatureFlags, - SignatureHelp: () => ts_SignatureHelp_exports, - SignatureKind: () => SignatureKind, - SmartSelectionRange: () => ts_SmartSelectionRange_exports, - SnippetKind: () => SnippetKind, - SortKind: () => SortKind, - StructureIsReused: () => StructureIsReused, - SymbolAccessibility: () => SymbolAccessibility, - SymbolDisplay: () => ts_SymbolDisplay_exports, - SymbolDisplayPartKind: () => SymbolDisplayPartKind, - SymbolFlags: () => SymbolFlags, - SymbolFormatFlags: () => SymbolFormatFlags, - SyntaxKind: () => SyntaxKind, - SyntheticSymbolKind: () => SyntheticSymbolKind, - Ternary: () => Ternary, - ThrottledCancellationToken: () => ThrottledCancellationToken, - TokenClass: () => TokenClass, - TokenFlags: () => TokenFlags, - TransformFlags: () => TransformFlags, - TypeFacts: () => TypeFacts, - TypeFlags: () => TypeFlags, - TypeFormatFlags: () => TypeFormatFlags, - TypeMapKind: () => TypeMapKind, - TypePredicateKind: () => TypePredicateKind, - TypeReferenceSerializationKind: () => TypeReferenceSerializationKind, - TypeScriptServicesFactory: () => TypeScriptServicesFactory, - UnionReduction: () => UnionReduction, - UpToDateStatusType: () => UpToDateStatusType, - VarianceFlags: () => VarianceFlags, - Version: () => Version, - VersionRange: () => VersionRange, - WatchDirectoryFlags: () => WatchDirectoryFlags, - WatchDirectoryKind: () => WatchDirectoryKind, - WatchFileKind: () => WatchFileKind, - WatchLogLevel: () => WatchLogLevel, - WatchType: () => WatchType, - accessPrivateIdentifier: () => accessPrivateIdentifier, - addDisposableResourceHelper: () => addDisposableResourceHelper, - addEmitFlags: () => addEmitFlags, - addEmitHelper: () => addEmitHelper, - addEmitHelpers: () => addEmitHelpers, - addInternalEmitFlags: () => addInternalEmitFlags, - addNodeFactoryPatcher: () => addNodeFactoryPatcher, - addObjectAllocatorPatcher: () => addObjectAllocatorPatcher, - addRange: () => addRange, - addRelatedInfo: () => addRelatedInfo, - addSyntheticLeadingComment: () => addSyntheticLeadingComment, - addSyntheticTrailingComment: () => addSyntheticTrailingComment, - addToSeen: () => addToSeen, - advancedAsyncSuperHelper: () => advancedAsyncSuperHelper, - affectsDeclarationPathOptionDeclarations: () => affectsDeclarationPathOptionDeclarations, - affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations, - allKeysStartWithDot: () => allKeysStartWithDot, - altDirectorySeparator: () => altDirectorySeparator, - and: () => and, - append: () => append, - appendIfUnique: () => appendIfUnique, - arrayFrom: () => arrayFrom, - arrayIsEqualTo: () => arrayIsEqualTo, - arrayIsHomogeneous: () => arrayIsHomogeneous, - arrayIsSorted: () => arrayIsSorted, - arrayOf: () => arrayOf, - arrayReverseIterator: () => arrayReverseIterator, - arrayToMap: () => arrayToMap, - arrayToMultiMap: () => arrayToMultiMap, - arrayToNumericMap: () => arrayToNumericMap, - arraysEqual: () => arraysEqual, - assertType: () => assertType, - assign: () => assign, - assignHelper: () => assignHelper, - asyncDelegator: () => asyncDelegator, - asyncGeneratorHelper: () => asyncGeneratorHelper, - asyncSuperHelper: () => asyncSuperHelper, - asyncValues: () => asyncValues, - attachFileToDiagnostics: () => attachFileToDiagnostics, - awaitHelper: () => awaitHelper, - awaiterHelper: () => awaiterHelper, - base64decode: () => base64decode, - base64encode: () => base64encode, - binarySearch: () => binarySearch, - binarySearchKey: () => binarySearchKey, - bindSourceFile: () => bindSourceFile, - breakIntoCharacterSpans: () => breakIntoCharacterSpans, - breakIntoWordSpans: () => breakIntoWordSpans, - buildLinkParts: () => buildLinkParts, - buildOpts: () => buildOpts, - buildOverload: () => buildOverload, - bundlerModuleNameResolver: () => bundlerModuleNameResolver, - canBeConvertedToAsync: () => canBeConvertedToAsync, - canHaveDecorators: () => canHaveDecorators, - canHaveExportModifier: () => canHaveExportModifier, - canHaveFlowNode: () => canHaveFlowNode, - canHaveIllegalDecorators: () => canHaveIllegalDecorators, - canHaveIllegalModifiers: () => canHaveIllegalModifiers, - canHaveIllegalType: () => canHaveIllegalType, - canHaveIllegalTypeParameters: () => canHaveIllegalTypeParameters, - canHaveJSDoc: () => canHaveJSDoc, - canHaveLocals: () => canHaveLocals, - canHaveModifiers: () => canHaveModifiers, - canHaveSymbol: () => canHaveSymbol, - canJsonReportNoInputFiles: () => canJsonReportNoInputFiles, - canProduceDiagnostics: () => canProduceDiagnostics, - canUsePropertyAccess: () => canUsePropertyAccess, - canWatchAffectingLocation: () => canWatchAffectingLocation, - canWatchAtTypes: () => canWatchAtTypes, - canWatchDirectoryOrFile: () => canWatchDirectoryOrFile, - cartesianProduct: () => cartesianProduct, - cast: () => cast, - chainBundle: () => chainBundle, - chainDiagnosticMessages: () => chainDiagnosticMessages, - changeAnyExtension: () => changeAnyExtension, - changeCompilerHostLikeToUseCache: () => changeCompilerHostLikeToUseCache, - changeExtension: () => changeExtension, - changesAffectModuleResolution: () => changesAffectModuleResolution, - changesAffectingProgramStructure: () => changesAffectingProgramStructure, - childIsDecorated: () => childIsDecorated, - classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, - classHasClassThisAssignment: () => classHasClassThisAssignment, - classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, - classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, - classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, - classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, - classPrivateFieldInHelper: () => classPrivateFieldInHelper, - classPrivateFieldSetHelper: () => classPrivateFieldSetHelper, - classicNameResolver: () => classicNameResolver, - classifier: () => ts_classifier_exports, - cleanExtendedConfigCache: () => cleanExtendedConfigCache, - clear: () => clear, - clearMap: () => clearMap, - clearSharedExtendedConfigFileWatcher: () => clearSharedExtendedConfigFileWatcher, - climbPastPropertyAccess: () => climbPastPropertyAccess, - climbPastPropertyOrElementAccess: () => climbPastPropertyOrElementAccess, - clone: () => clone, - cloneCompilerOptions: () => cloneCompilerOptions, - closeFileWatcher: () => closeFileWatcher, - closeFileWatcherOf: () => closeFileWatcherOf, - codefix: () => ts_codefix_exports, - collapseTextChangeRangesAcrossMultipleVersions: () => collapseTextChangeRangesAcrossMultipleVersions, - collectExternalModuleInfo: () => collectExternalModuleInfo, - combine: () => combine, - combinePaths: () => combinePaths, - commentPragmas: () => commentPragmas, - commonOptionsWithBuild: () => commonOptionsWithBuild, - commonPackageFolders: () => commonPackageFolders, - compact: () => compact, - compareBooleans: () => compareBooleans, - compareDataObjects: () => compareDataObjects, - compareDiagnostics: () => compareDiagnostics, - compareDiagnosticsSkipRelatedInformation: () => compareDiagnosticsSkipRelatedInformation, - compareEmitHelpers: () => compareEmitHelpers, - compareNumberOfDirectorySeparators: () => compareNumberOfDirectorySeparators, - comparePaths: () => comparePaths, - comparePathsCaseInsensitive: () => comparePathsCaseInsensitive, - comparePathsCaseSensitive: () => comparePathsCaseSensitive, - comparePatternKeys: () => comparePatternKeys, - compareProperties: () => compareProperties, - compareStringsCaseInsensitive: () => compareStringsCaseInsensitive, - compareStringsCaseInsensitiveEslintCompatible: () => compareStringsCaseInsensitiveEslintCompatible, - compareStringsCaseSensitive: () => compareStringsCaseSensitive, - compareStringsCaseSensitiveUI: () => compareStringsCaseSensitiveUI, - compareTextSpans: () => compareTextSpans, - compareValues: () => compareValues, - compileOnSaveCommandLineOption: () => compileOnSaveCommandLineOption, - compilerOptionsAffectDeclarationPath: () => compilerOptionsAffectDeclarationPath, - compilerOptionsAffectEmit: () => compilerOptionsAffectEmit, - compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics, - compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics, - compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules, - compose: () => compose, - computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames, - computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition, - computeLineOfPosition: () => computeLineOfPosition, - computeLineStarts: () => computeLineStarts, - computePositionOfLineAndCharacter: () => computePositionOfLineAndCharacter, - computeSignature: () => computeSignature, - computeSignatureWithDiagnostics: () => computeSignatureWithDiagnostics, - computeSuggestionDiagnostics: () => computeSuggestionDiagnostics, - concatenate: () => concatenate, - concatenateDiagnosticMessageChains: () => concatenateDiagnosticMessageChains, - consumesNodeCoreModules: () => consumesNodeCoreModules, - contains: () => contains, - containsIgnoredPath: () => containsIgnoredPath, - containsObjectRestOrSpread: () => containsObjectRestOrSpread, - containsParseError: () => containsParseError, - containsPath: () => containsPath, - convertCompilerOptionsForTelemetry: () => convertCompilerOptionsForTelemetry, - convertCompilerOptionsFromJson: () => convertCompilerOptionsFromJson, - convertJsonOption: () => convertJsonOption, - convertToBase64: () => convertToBase64, - convertToJson: () => convertToJson, - convertToObject: () => convertToObject, - convertToOptionsWithAbsolutePaths: () => convertToOptionsWithAbsolutePaths, - convertToRelativePath: () => convertToRelativePath, - convertToTSConfig: () => convertToTSConfig, - convertTypeAcquisitionFromJson: () => convertTypeAcquisitionFromJson, - copyComments: () => copyComments, - copyEntries: () => copyEntries, - copyLeadingComments: () => copyLeadingComments, - copyProperties: () => copyProperties, - copyTrailingAsLeadingComments: () => copyTrailingAsLeadingComments, - copyTrailingComments: () => copyTrailingComments, - couldStartTrivia: () => couldStartTrivia, - countWhere: () => countWhere, - createAbstractBuilder: () => createAbstractBuilder, - createAccessorPropertyBackingField: () => createAccessorPropertyBackingField, - createAccessorPropertyGetRedirector: () => createAccessorPropertyGetRedirector, - createAccessorPropertySetRedirector: () => createAccessorPropertySetRedirector, - createBaseNodeFactory: () => createBaseNodeFactory, - createBinaryExpressionTrampoline: () => createBinaryExpressionTrampoline, - createBindingHelper: () => createBindingHelper, - createBuildInfo: () => createBuildInfo, - createBuilderProgram: () => createBuilderProgram, - createBuilderProgramUsingProgramBuildInfo: () => createBuilderProgramUsingProgramBuildInfo, - createBuilderStatusReporter: () => createBuilderStatusReporter, - createCacheWithRedirects: () => createCacheWithRedirects, - createCacheableExportInfoMap: () => createCacheableExportInfoMap, - createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, - createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, - createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, - createClassifier: () => createClassifier, - createCommentDirectivesMap: () => createCommentDirectivesMap, - createCompilerDiagnostic: () => createCompilerDiagnostic, - createCompilerDiagnosticForInvalidCustomType: () => createCompilerDiagnosticForInvalidCustomType, - createCompilerDiagnosticFromMessageChain: () => createCompilerDiagnosticFromMessageChain, - createCompilerHost: () => createCompilerHost, - createCompilerHostFromProgramHost: () => createCompilerHostFromProgramHost, - createCompilerHostWorker: () => createCompilerHostWorker, - createDetachedDiagnostic: () => createDetachedDiagnostic, - createDiagnosticCollection: () => createDiagnosticCollection, - createDiagnosticForFileFromMessageChain: () => createDiagnosticForFileFromMessageChain, - createDiagnosticForNode: () => createDiagnosticForNode, - createDiagnosticForNodeArray: () => createDiagnosticForNodeArray, - createDiagnosticForNodeArrayFromMessageChain: () => createDiagnosticForNodeArrayFromMessageChain, - createDiagnosticForNodeFromMessageChain: () => createDiagnosticForNodeFromMessageChain, - createDiagnosticForNodeInSourceFile: () => createDiagnosticForNodeInSourceFile, - createDiagnosticForRange: () => createDiagnosticForRange, - createDiagnosticMessageChainFromDiagnostic: () => createDiagnosticMessageChainFromDiagnostic, - createDiagnosticReporter: () => createDiagnosticReporter, - createDocumentPositionMapper: () => createDocumentPositionMapper, - createDocumentRegistry: () => createDocumentRegistry, - createDocumentRegistryInternal: () => createDocumentRegistryInternal, - createEmitAndSemanticDiagnosticsBuilderProgram: () => createEmitAndSemanticDiagnosticsBuilderProgram, - createEmitHelperFactory: () => createEmitHelperFactory, - createEmptyExports: () => createEmptyExports, - createExpressionForJsxElement: () => createExpressionForJsxElement, - createExpressionForJsxFragment: () => createExpressionForJsxFragment, - createExpressionForObjectLiteralElementLike: () => createExpressionForObjectLiteralElementLike, - createExpressionForPropertyName: () => createExpressionForPropertyName, - createExpressionFromEntityName: () => createExpressionFromEntityName, - createExternalHelpersImportDeclarationIfNeeded: () => createExternalHelpersImportDeclarationIfNeeded, - createFileDiagnostic: () => createFileDiagnostic, - createFileDiagnosticFromMessageChain: () => createFileDiagnosticFromMessageChain, - createForOfBindingStatement: () => createForOfBindingStatement, - createGetCanonicalFileName: () => createGetCanonicalFileName, - createGetSourceFile: () => createGetSourceFile, - createGetSymbolAccessibilityDiagnosticForNode: () => createGetSymbolAccessibilityDiagnosticForNode, - createGetSymbolAccessibilityDiagnosticForNodeName: () => createGetSymbolAccessibilityDiagnosticForNodeName, - createGetSymbolWalker: () => createGetSymbolWalker, - createIncrementalCompilerHost: () => createIncrementalCompilerHost, - createIncrementalProgram: () => createIncrementalProgram, - createInputFiles: () => createInputFiles, - createInputFilesWithFilePaths: () => createInputFilesWithFilePaths, - createInputFilesWithFileTexts: () => createInputFilesWithFileTexts, - createJsxFactoryExpression: () => createJsxFactoryExpression, - createLanguageService: () => createLanguageService, - createLanguageServiceSourceFile: () => createLanguageServiceSourceFile, - createMemberAccessForPropertyName: () => createMemberAccessForPropertyName, - createModeAwareCache: () => createModeAwareCache, - createModeAwareCacheKey: () => createModeAwareCacheKey, - createModuleNotFoundChain: () => createModuleNotFoundChain, - createModuleResolutionCache: () => createModuleResolutionCache, - createModuleResolutionLoader: () => createModuleResolutionLoader, - createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost, - createMultiMap: () => createMultiMap, - createNodeConverters: () => createNodeConverters, - createNodeFactory: () => createNodeFactory, - createOptionNameMap: () => createOptionNameMap, - createOverload: () => createOverload, - createPackageJsonImportFilter: () => createPackageJsonImportFilter, - createPackageJsonInfo: () => createPackageJsonInfo, - createParenthesizerRules: () => createParenthesizerRules, - createPatternMatcher: () => createPatternMatcher, - createPrependNodes: () => createPrependNodes, - createPrinter: () => createPrinter, - createPrinterWithDefaults: () => createPrinterWithDefaults, - createPrinterWithRemoveComments: () => createPrinterWithRemoveComments, - createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape, - createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon, - createProgram: () => createProgram, - createProgramHost: () => createProgramHost, - createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral, - createQueue: () => createQueue, - createRange: () => createRange, - createRedirectedBuilderProgram: () => createRedirectedBuilderProgram, - createResolutionCache: () => createResolutionCache, - createRuntimeTypeSerializer: () => createRuntimeTypeSerializer, - createScanner: () => createScanner, - createSemanticDiagnosticsBuilderProgram: () => createSemanticDiagnosticsBuilderProgram, - createSet: () => createSet, - createSolutionBuilder: () => createSolutionBuilder, - createSolutionBuilderHost: () => createSolutionBuilderHost, - createSolutionBuilderWithWatch: () => createSolutionBuilderWithWatch, - createSolutionBuilderWithWatchHost: () => createSolutionBuilderWithWatchHost, - createSortedArray: () => createSortedArray, - createSourceFile: () => createSourceFile, - createSourceMapGenerator: () => createSourceMapGenerator, - createSourceMapSource: () => createSourceMapSource, - createSuperAccessVariableStatement: () => createSuperAccessVariableStatement, - createSymbolTable: () => createSymbolTable, - createSymlinkCache: () => createSymlinkCache, - createSystemWatchFunctions: () => createSystemWatchFunctions, - createTextChange: () => createTextChange, - createTextChangeFromStartLength: () => createTextChangeFromStartLength, - createTextChangeRange: () => createTextChangeRange, - createTextRangeFromNode: () => createTextRangeFromNode, - createTextRangeFromSpan: () => createTextRangeFromSpan, - createTextSpan: () => createTextSpan, - createTextSpanFromBounds: () => createTextSpanFromBounds, - createTextSpanFromNode: () => createTextSpanFromNode, - createTextSpanFromRange: () => createTextSpanFromRange, - createTextSpanFromStringLiteralLikeContent: () => createTextSpanFromStringLiteralLikeContent, - createTextWriter: () => createTextWriter, - createTokenRange: () => createTokenRange, - createTypeChecker: () => createTypeChecker, - createTypeReferenceDirectiveResolutionCache: () => createTypeReferenceDirectiveResolutionCache, - createTypeReferenceResolutionLoader: () => createTypeReferenceResolutionLoader, - createUnparsedSourceFile: () => createUnparsedSourceFile, - createWatchCompilerHost: () => createWatchCompilerHost2, - createWatchCompilerHostOfConfigFile: () => createWatchCompilerHostOfConfigFile, - createWatchCompilerHostOfFilesAndCompilerOptions: () => createWatchCompilerHostOfFilesAndCompilerOptions, - createWatchFactory: () => createWatchFactory, - createWatchHost: () => createWatchHost, - createWatchProgram: () => createWatchProgram, - createWatchStatusReporter: () => createWatchStatusReporter, - createWriteFileMeasuringIO: () => createWriteFileMeasuringIO, - declarationNameToString: () => declarationNameToString, - decodeMappings: () => decodeMappings, - decodedTextSpanIntersectsWith: () => decodedTextSpanIntersectsWith, - decorateHelper: () => decorateHelper, - deduplicate: () => deduplicate, - defaultIncludeSpec: () => defaultIncludeSpec, - defaultInitCompilerOptions: () => defaultInitCompilerOptions, - defaultMaximumTruncationLength: () => defaultMaximumTruncationLength, - detectSortCaseSensitivity: () => detectSortCaseSensitivity, - diagnosticCategoryName: () => diagnosticCategoryName, - diagnosticToString: () => diagnosticToString, - directoryProbablyExists: () => directoryProbablyExists, - directorySeparator: () => directorySeparator, - displayPart: () => displayPart, - displayPartsToString: () => displayPartsToString, - disposeEmitNodes: () => disposeEmitNodes, - disposeResourcesHelper: () => disposeResourcesHelper, - documentSpansEqual: () => documentSpansEqual, - dumpTracingLegend: () => dumpTracingLegend, - elementAt: () => elementAt, - elideNodes: () => elideNodes, - emitComments: () => emitComments, - emitDetachedComments: () => emitDetachedComments, - emitFiles: () => emitFiles, - emitFilesAndReportErrors: () => emitFilesAndReportErrors, - emitFilesAndReportErrorsAndGetExitStatus: () => emitFilesAndReportErrorsAndGetExitStatus, - emitModuleKindIsNonNodeESM: () => emitModuleKindIsNonNodeESM, - emitNewLineBeforeLeadingCommentOfPosition: () => emitNewLineBeforeLeadingCommentOfPosition, - emitNewLineBeforeLeadingComments: () => emitNewLineBeforeLeadingComments, - emitNewLineBeforeLeadingCommentsOfPosition: () => emitNewLineBeforeLeadingCommentsOfPosition, - emitSkippedWithNoDiagnostics: () => emitSkippedWithNoDiagnostics, - emitUsingBuildInfo: () => emitUsingBuildInfo, - emptyArray: () => emptyArray, - emptyFileSystemEntries: () => emptyFileSystemEntries, - emptyMap: () => emptyMap, - emptyOptions: () => emptyOptions, - emptySet: () => emptySet, - endsWith: () => endsWith, - ensurePathIsNonModuleName: () => ensurePathIsNonModuleName, - ensureScriptKind: () => ensureScriptKind, - ensureTrailingDirectorySeparator: () => ensureTrailingDirectorySeparator, - entityNameToString: () => entityNameToString, - enumerateInsertsAndDeletes: () => enumerateInsertsAndDeletes, - equalOwnProperties: () => equalOwnProperties, - equateStringsCaseInsensitive: () => equateStringsCaseInsensitive, - equateStringsCaseSensitive: () => equateStringsCaseSensitive, - equateValues: () => equateValues, - esDecorateHelper: () => esDecorateHelper, - escapeJsxAttributeString: () => escapeJsxAttributeString, - escapeLeadingUnderscores: () => escapeLeadingUnderscores, - escapeNonAsciiString: () => escapeNonAsciiString, - escapeSnippetText: () => escapeSnippetText, - escapeString: () => escapeString, - every: () => every, - expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression, - explainFiles: () => explainFiles, - explainIfFileIsRedirectAndImpliedFormat: () => explainIfFileIsRedirectAndImpliedFormat, - exportAssignmentIsAlias: () => exportAssignmentIsAlias, - exportStarHelper: () => exportStarHelper, - expressionResultIsUnused: () => expressionResultIsUnused, - extend: () => extend, - extendsHelper: () => extendsHelper, - extensionFromPath: () => extensionFromPath, - extensionIsTS: () => extensionIsTS, - extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution, - externalHelpersModuleNameText: () => externalHelpersModuleNameText, - factory: () => factory, - fileExtensionIs: () => fileExtensionIs, - fileExtensionIsOneOf: () => fileExtensionIsOneOf, - fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics, - fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire, - filter: () => filter, - filterMutate: () => filterMutate, - filterSemanticDiagnostics: () => filterSemanticDiagnostics, - find: () => find, - findAncestor: () => findAncestor, - findBestPatternMatch: () => findBestPatternMatch, - findChildOfKind: () => findChildOfKind, - findComputedPropertyNameCacheAssignment: () => findComputedPropertyNameCacheAssignment, - findConfigFile: () => findConfigFile, - findContainingList: () => findContainingList, - findDiagnosticForNode: () => findDiagnosticForNode, - findFirstNonJsxWhitespaceToken: () => findFirstNonJsxWhitespaceToken, - findIndex: () => findIndex, - findLast: () => findLast, - findLastIndex: () => findLastIndex, - findListItemInfo: () => findListItemInfo, - findMap: () => findMap, - findModifier: () => findModifier, - findNextToken: () => findNextToken, - findPackageJson: () => findPackageJson, - findPackageJsons: () => findPackageJsons, - findPrecedingMatchingToken: () => findPrecedingMatchingToken, - findPrecedingToken: () => findPrecedingToken, - findSuperStatementIndexPath: () => findSuperStatementIndexPath, - findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, - findUseStrictPrologue: () => findUseStrictPrologue, - first: () => first, - firstDefined: () => firstDefined, - firstDefinedIterator: () => firstDefinedIterator, - firstIterator: () => firstIterator, - firstOrOnly: () => firstOrOnly, - firstOrUndefined: () => firstOrUndefined, - firstOrUndefinedIterator: () => firstOrUndefinedIterator, - fixupCompilerOptions: () => fixupCompilerOptions, - flatMap: () => flatMap, - flatMapIterator: () => flatMapIterator, - flatMapToMutable: () => flatMapToMutable, - flatten: () => flatten, - flattenCommaList: () => flattenCommaList, - flattenDestructuringAssignment: () => flattenDestructuringAssignment, - flattenDestructuringBinding: () => flattenDestructuringBinding, - flattenDiagnosticMessageText: () => flattenDiagnosticMessageText, - forEach: () => forEach, - forEachAncestor: () => forEachAncestor, - forEachAncestorDirectory: () => forEachAncestorDirectory, - forEachChild: () => forEachChild, - forEachChildRecursively: () => forEachChildRecursively, - forEachEmittedFile: () => forEachEmittedFile, - forEachEnclosingBlockScopeContainer: () => forEachEnclosingBlockScopeContainer, - forEachEntry: () => forEachEntry, - forEachExternalModuleToImportFrom: () => forEachExternalModuleToImportFrom, - forEachImportClauseDeclaration: () => forEachImportClauseDeclaration, - forEachKey: () => forEachKey, - forEachLeadingCommentRange: () => forEachLeadingCommentRange, - forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft, - forEachPropertyAssignment: () => forEachPropertyAssignment, - forEachResolvedProjectReference: () => forEachResolvedProjectReference, - forEachReturnStatement: () => forEachReturnStatement, - forEachRight: () => forEachRight, - forEachTrailingCommentRange: () => forEachTrailingCommentRange, - forEachTsConfigPropArray: () => forEachTsConfigPropArray, - forEachUnique: () => forEachUnique, - forEachYieldExpression: () => forEachYieldExpression, - forSomeAncestorDirectory: () => forSomeAncestorDirectory, - formatColorAndReset: () => formatColorAndReset, - formatDiagnostic: () => formatDiagnostic, - formatDiagnostics: () => formatDiagnostics, - formatDiagnosticsWithColorAndContext: () => formatDiagnosticsWithColorAndContext, - formatGeneratedName: () => formatGeneratedName, - formatGeneratedNamePart: () => formatGeneratedNamePart, - formatLocation: () => formatLocation, - formatMessage: () => formatMessage, - formatStringFromArgs: () => formatStringFromArgs, - formatting: () => ts_formatting_exports, - fullTripleSlashAMDReferencePathRegEx: () => fullTripleSlashAMDReferencePathRegEx, - fullTripleSlashReferencePathRegEx: () => fullTripleSlashReferencePathRegEx, - generateDjb2Hash: () => generateDjb2Hash, - generateTSConfig: () => generateTSConfig, - generatorHelper: () => generatorHelper, - getAdjustedReferenceLocation: () => getAdjustedReferenceLocation, - getAdjustedRenameLocation: () => getAdjustedRenameLocation, - getAliasDeclarationFromName: () => getAliasDeclarationFromName, - getAllAccessorDeclarations: () => getAllAccessorDeclarations, - getAllDecoratorsOfClass: () => getAllDecoratorsOfClass, - getAllDecoratorsOfClassElement: () => getAllDecoratorsOfClassElement, - getAllJSDocTags: () => getAllJSDocTags, - getAllJSDocTagsOfKind: () => getAllJSDocTagsOfKind, - getAllKeys: () => getAllKeys, - getAllProjectOutputs: () => getAllProjectOutputs, - getAllSuperTypeNodes: () => getAllSuperTypeNodes, - getAllUnscopedEmitHelpers: () => getAllUnscopedEmitHelpers, - getAllowJSCompilerOption: () => getAllowJSCompilerOption, - getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports, - getAncestor: () => getAncestor, - getAnyExtensionFromPath: () => getAnyExtensionFromPath, - getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, - getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, - getAssignedName: () => getAssignedName, - getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, - getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, - getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, - getAssignmentTargetKind: () => getAssignmentTargetKind, - getAutomaticTypeDirectiveNames: () => getAutomaticTypeDirectiveNames, - getBaseFileName: () => getBaseFileName, - getBinaryOperatorPrecedence: () => getBinaryOperatorPrecedence, - getBuildInfo: () => getBuildInfo, - getBuildInfoFileVersionMap: () => getBuildInfoFileVersionMap, - getBuildInfoText: () => getBuildInfoText, - getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder, - getBuilderCreationParameters: () => getBuilderCreationParameters, - getBuilderFileEmit: () => getBuilderFileEmit, - getCheckFlags: () => getCheckFlags, - getClassExtendsHeritageElement: () => getClassExtendsHeritageElement, - getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol, - getCombinedLocalAndExportSymbolFlags: () => getCombinedLocalAndExportSymbolFlags, - getCombinedModifierFlags: () => getCombinedModifierFlags, - getCombinedNodeFlags: () => getCombinedNodeFlags, - getCombinedNodeFlagsAlwaysIncludeJSDoc: () => getCombinedNodeFlagsAlwaysIncludeJSDoc, - getCommentRange: () => getCommentRange, - getCommonSourceDirectory: () => getCommonSourceDirectory, - getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig, - getCompilerOptionValue: () => getCompilerOptionValue, - getCompilerOptionsDiffValue: () => getCompilerOptionsDiffValue, - getConditions: () => getConditions, - getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, - getConstantValue: () => getConstantValue, - getContainerFlags: () => getContainerFlags, - getContainerNode: () => getContainerNode, - getContainingClass: () => getContainingClass, - getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, - getContainingClassStaticBlock: () => getContainingClassStaticBlock, - getContainingFunction: () => getContainingFunction, - getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, - getContainingFunctionOrClassStaticBlock: () => getContainingFunctionOrClassStaticBlock, - getContainingNodeArray: () => getContainingNodeArray, - getContainingObjectLiteralElement: () => getContainingObjectLiteralElement, - getContextualTypeFromParent: () => getContextualTypeFromParent, - getContextualTypeFromParentOrAncestorTypeNode: () => getContextualTypeFromParentOrAncestorTypeNode, - getCurrentTime: () => getCurrentTime, - getDeclarationDiagnostics: () => getDeclarationDiagnostics, - getDeclarationEmitExtensionForPath: () => getDeclarationEmitExtensionForPath, - getDeclarationEmitOutputFilePath: () => getDeclarationEmitOutputFilePath, - getDeclarationEmitOutputFilePathWorker: () => getDeclarationEmitOutputFilePathWorker, - getDeclarationFromName: () => getDeclarationFromName, - getDeclarationModifierFlagsFromSymbol: () => getDeclarationModifierFlagsFromSymbol, - getDeclarationOfKind: () => getDeclarationOfKind, - getDeclarationsOfKind: () => getDeclarationsOfKind, - getDeclaredExpandoInitializer: () => getDeclaredExpandoInitializer, - getDecorators: () => getDecorators, - getDefaultCompilerOptions: () => getDefaultCompilerOptions2, - getDefaultExportInfoWorker: () => getDefaultExportInfoWorker, - getDefaultFormatCodeSettings: () => getDefaultFormatCodeSettings, - getDefaultLibFileName: () => getDefaultLibFileName, - getDefaultLibFilePath: () => getDefaultLibFilePath, - getDefaultLikeExportInfo: () => getDefaultLikeExportInfo, - getDiagnosticText: () => getDiagnosticText, - getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan, - getDirectoryPath: () => getDirectoryPath, - getDirectoryToWatchFailedLookupLocation: () => getDirectoryToWatchFailedLookupLocation, - getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => getDirectoryToWatchFailedLookupLocationFromTypeRoot, - getDocumentPositionMapper: () => getDocumentPositionMapper, - getESModuleInterop: () => getESModuleInterop, - getEditsForFileRename: () => getEditsForFileRename, - getEffectiveBaseTypeNode: () => getEffectiveBaseTypeNode, - getEffectiveConstraintOfTypeParameter: () => getEffectiveConstraintOfTypeParameter, - getEffectiveContainerForJSDocTemplateTag: () => getEffectiveContainerForJSDocTemplateTag, - getEffectiveImplementsTypeNodes: () => getEffectiveImplementsTypeNodes, - getEffectiveInitializer: () => getEffectiveInitializer, - getEffectiveJSDocHost: () => getEffectiveJSDocHost, - getEffectiveModifierFlags: () => getEffectiveModifierFlags, - getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => getEffectiveModifierFlagsAlwaysIncludeJSDoc, - getEffectiveModifierFlagsNoCache: () => getEffectiveModifierFlagsNoCache, - getEffectiveReturnTypeNode: () => getEffectiveReturnTypeNode, - getEffectiveSetAccessorTypeAnnotationNode: () => getEffectiveSetAccessorTypeAnnotationNode, - getEffectiveTypeAnnotationNode: () => getEffectiveTypeAnnotationNode, - getEffectiveTypeParameterDeclarations: () => getEffectiveTypeParameterDeclarations, - getEffectiveTypeRoots: () => getEffectiveTypeRoots, - getElementOrPropertyAccessArgumentExpressionOrName: () => getElementOrPropertyAccessArgumentExpressionOrName, - getElementOrPropertyAccessName: () => getElementOrPropertyAccessName, - getElementsOfBindingOrAssignmentPattern: () => getElementsOfBindingOrAssignmentPattern, - getEmitDeclarations: () => getEmitDeclarations, - getEmitFlags: () => getEmitFlags, - getEmitHelpers: () => getEmitHelpers, - getEmitModuleDetectionKind: () => getEmitModuleDetectionKind, - getEmitModuleKind: () => getEmitModuleKind, - getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, - getEmitScriptTarget: () => getEmitScriptTarget, - getEmitStandardClassFields: () => getEmitStandardClassFields, - getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, - getEnclosingContainer: () => getEnclosingContainer, - getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, - getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, - getEndLinePosition: () => getEndLinePosition, - getEntityNameFromTypeNode: () => getEntityNameFromTypeNode, - getEntrypointsFromPackageJsonInfo: () => getEntrypointsFromPackageJsonInfo, - getErrorCountForSummary: () => getErrorCountForSummary, - getErrorSpanForNode: () => getErrorSpanForNode, - getErrorSummaryText: () => getErrorSummaryText, - getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral, - getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName, - getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName, - getExpandoInitializer: () => getExpandoInitializer, - getExportAssignmentExpression: () => getExportAssignmentExpression, - getExportInfoMap: () => getExportInfoMap, - getExportNeedsImportStarHelper: () => getExportNeedsImportStarHelper, - getExpressionAssociativity: () => getExpressionAssociativity, - getExpressionPrecedence: () => getExpressionPrecedence, - getExternalHelpersModuleName: () => getExternalHelpersModuleName, - getExternalModuleImportEqualsDeclarationExpression: () => getExternalModuleImportEqualsDeclarationExpression, - getExternalModuleName: () => getExternalModuleName, - getExternalModuleNameFromDeclaration: () => getExternalModuleNameFromDeclaration, - getExternalModuleNameFromPath: () => getExternalModuleNameFromPath, - getExternalModuleNameLiteral: () => getExternalModuleNameLiteral, - getExternalModuleRequireArgument: () => getExternalModuleRequireArgument, - getFallbackOptions: () => getFallbackOptions, - getFileEmitOutput: () => getFileEmitOutput, - getFileMatcherPatterns: () => getFileMatcherPatterns, - getFileNamesFromConfigSpecs: () => getFileNamesFromConfigSpecs, - getFileWatcherEventKind: () => getFileWatcherEventKind, - getFilesInErrorForSummary: () => getFilesInErrorForSummary, - getFirstConstructorWithBody: () => getFirstConstructorWithBody, - getFirstIdentifier: () => getFirstIdentifier, - getFirstNonSpaceCharacterPosition: () => getFirstNonSpaceCharacterPosition, - getFirstProjectOutput: () => getFirstProjectOutput, - getFixableErrorSpanExpression: () => getFixableErrorSpanExpression, - getFormatCodeSettingsForWriting: () => getFormatCodeSettingsForWriting, - getFullWidth: () => getFullWidth, - getFunctionFlags: () => getFunctionFlags, - getHeritageClause: () => getHeritageClause, - getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc, - getIdentifierAutoGenerate: () => getIdentifierAutoGenerate, - getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference, - getIdentifierTypeArguments: () => getIdentifierTypeArguments, - getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression, - getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile, - getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker, - getImportNeedsImportDefaultHelper: () => getImportNeedsImportDefaultHelper, - getImportNeedsImportStarHelper: () => getImportNeedsImportStarHelper, - getIndentSize: () => getIndentSize, - getIndentString: () => getIndentString, - getInferredLibraryNameResolveFrom: () => getInferredLibraryNameResolveFrom, - getInitializedVariables: () => getInitializedVariables, - getInitializerOfBinaryExpression: () => getInitializerOfBinaryExpression, - getInitializerOfBindingOrAssignmentElement: () => getInitializerOfBindingOrAssignmentElement, - getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes, - getInternalEmitFlags: () => getInternalEmitFlags, - getInvokedExpression: () => getInvokedExpression, - getIsolatedModules: () => getIsolatedModules, - getJSDocAugmentsTag: () => getJSDocAugmentsTag, - getJSDocClassTag: () => getJSDocClassTag, - getJSDocCommentRanges: () => getJSDocCommentRanges, - getJSDocCommentsAndTags: () => getJSDocCommentsAndTags, - getJSDocDeprecatedTag: () => getJSDocDeprecatedTag, - getJSDocDeprecatedTagNoCache: () => getJSDocDeprecatedTagNoCache, - getJSDocEnumTag: () => getJSDocEnumTag, - getJSDocHost: () => getJSDocHost, - getJSDocImplementsTags: () => getJSDocImplementsTags, - getJSDocOverrideTagNoCache: () => getJSDocOverrideTagNoCache, - getJSDocParameterTags: () => getJSDocParameterTags, - getJSDocParameterTagsNoCache: () => getJSDocParameterTagsNoCache, - getJSDocPrivateTag: () => getJSDocPrivateTag, - getJSDocPrivateTagNoCache: () => getJSDocPrivateTagNoCache, - getJSDocProtectedTag: () => getJSDocProtectedTag, - getJSDocProtectedTagNoCache: () => getJSDocProtectedTagNoCache, - getJSDocPublicTag: () => getJSDocPublicTag, - getJSDocPublicTagNoCache: () => getJSDocPublicTagNoCache, - getJSDocReadonlyTag: () => getJSDocReadonlyTag, - getJSDocReadonlyTagNoCache: () => getJSDocReadonlyTagNoCache, - getJSDocReturnTag: () => getJSDocReturnTag, - getJSDocReturnType: () => getJSDocReturnType, - getJSDocRoot: () => getJSDocRoot, - getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType, - getJSDocSatisfiesTag: () => getJSDocSatisfiesTag, - getJSDocTags: () => getJSDocTags, - getJSDocTagsNoCache: () => getJSDocTagsNoCache, - getJSDocTemplateTag: () => getJSDocTemplateTag, - getJSDocThisTag: () => getJSDocThisTag, - getJSDocType: () => getJSDocType, - getJSDocTypeAliasName: () => getJSDocTypeAliasName, - getJSDocTypeAssertionType: () => getJSDocTypeAssertionType, - getJSDocTypeParameterDeclarations: () => getJSDocTypeParameterDeclarations, - getJSDocTypeParameterTags: () => getJSDocTypeParameterTags, - getJSDocTypeParameterTagsNoCache: () => getJSDocTypeParameterTagsNoCache, - getJSDocTypeTag: () => getJSDocTypeTag, - getJSXImplicitImportBase: () => getJSXImplicitImportBase, - getJSXRuntimeImport: () => getJSXRuntimeImport, - getJSXTransformEnabled: () => getJSXTransformEnabled, - getKeyForCompilerOptions: () => getKeyForCompilerOptions, - getLanguageVariant: () => getLanguageVariant, - getLastChild: () => getLastChild, - getLeadingCommentRanges: () => getLeadingCommentRanges, - getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode, - getLeftmostAccessExpression: () => getLeftmostAccessExpression, - getLeftmostExpression: () => getLeftmostExpression, - getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition, - getLineInfo: () => getLineInfo, - getLineOfLocalPosition: () => getLineOfLocalPosition, - getLineOfLocalPositionFromLineMap: () => getLineOfLocalPositionFromLineMap, - getLineStartPositionForPosition: () => getLineStartPositionForPosition, - getLineStarts: () => getLineStarts, - getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => getLinesBetweenPositionAndNextNonWhitespaceCharacter, - getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter, - getLinesBetweenPositions: () => getLinesBetweenPositions, - getLinesBetweenRangeEndAndRangeStart: () => getLinesBetweenRangeEndAndRangeStart, - getLinesBetweenRangeEndPositions: () => getLinesBetweenRangeEndPositions, - getLiteralText: () => getLiteralText, - getLocalNameForExternalImport: () => getLocalNameForExternalImport, - getLocalSymbolForExportDefault: () => getLocalSymbolForExportDefault, - getLocaleSpecificMessage: () => getLocaleSpecificMessage, - getLocaleTimeString: () => getLocaleTimeString, - getMappedContextSpan: () => getMappedContextSpan, - getMappedDocumentSpan: () => getMappedDocumentSpan, - getMappedLocation: () => getMappedLocation, - getMatchedFileSpec: () => getMatchedFileSpec, - getMatchedIncludeSpec: () => getMatchedIncludeSpec, - getMeaningFromDeclaration: () => getMeaningFromDeclaration, - getMeaningFromLocation: () => getMeaningFromLocation, - getMembersOfDeclaration: () => getMembersOfDeclaration, - getModeForFileReference: () => getModeForFileReference, - getModeForResolutionAtIndex: () => getModeForResolutionAtIndex, - getModeForUsageLocation: () => getModeForUsageLocation, - getModifiedTime: () => getModifiedTime, - getModifiers: () => getModifiers, - getModuleInstanceState: () => getModuleInstanceState, - getModuleNameStringLiteralAt: () => getModuleNameStringLiteralAt, - getModuleSpecifierEndingPreference: () => getModuleSpecifierEndingPreference, - getModuleSpecifierResolverHost: () => getModuleSpecifierResolverHost, - getNameForExportedSymbol: () => getNameForExportedSymbol, - getNameFromIndexInfo: () => getNameFromIndexInfo, - getNameFromPropertyName: () => getNameFromPropertyName, - getNameOfAccessExpression: () => getNameOfAccessExpression, - getNameOfCompilerOptionValue: () => getNameOfCompilerOptionValue, - getNameOfDeclaration: () => getNameOfDeclaration, - getNameOfExpando: () => getNameOfExpando, - getNameOfJSDocTypedef: () => getNameOfJSDocTypedef, - getNameOrArgument: () => getNameOrArgument, - getNameTable: () => getNameTable, - getNamesForExportedSymbol: () => getNamesForExportedSymbol, - getNamespaceDeclarationNode: () => getNamespaceDeclarationNode, - getNewLineCharacter: () => getNewLineCharacter, - getNewLineKind: () => getNewLineKind, - getNewLineOrDefaultFromHost: () => getNewLineOrDefaultFromHost, - getNewTargetContainer: () => getNewTargetContainer, - getNextJSDocCommentLocation: () => getNextJSDocCommentLocation, - getNodeForGeneratedName: () => getNodeForGeneratedName, - getNodeId: () => getNodeId, - getNodeKind: () => getNodeKind, - getNodeModifiers: () => getNodeModifiers, - getNodeModulePathParts: () => getNodeModulePathParts, - getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration, - getNonAssignmentOperatorForCompoundAssignment: () => getNonAssignmentOperatorForCompoundAssignment, - getNonAugmentationDeclaration: () => getNonAugmentationDeclaration, - getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode, - getNormalizedAbsolutePath: () => getNormalizedAbsolutePath, - getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot, - getNormalizedPathComponents: () => getNormalizedPathComponents, - getObjectFlags: () => getObjectFlags, - getOperator: () => getOperator, - getOperatorAssociativity: () => getOperatorAssociativity, - getOperatorPrecedence: () => getOperatorPrecedence, - getOptionFromName: () => getOptionFromName, - getOptionsForLibraryResolution: () => getOptionsForLibraryResolution, - getOptionsNameMap: () => getOptionsNameMap, - getOrCreateEmitNode: () => getOrCreateEmitNode, - getOrCreateExternalHelpersModuleNameIfNeeded: () => getOrCreateExternalHelpersModuleNameIfNeeded, - getOrUpdate: () => getOrUpdate, - getOriginalNode: () => getOriginalNode, - getOriginalNodeId: () => getOriginalNodeId, - getOriginalSourceFile: () => getOriginalSourceFile, - getOutputDeclarationFileName: () => getOutputDeclarationFileName, - getOutputExtension: () => getOutputExtension, - getOutputFileNames: () => getOutputFileNames, - getOutputPathsFor: () => getOutputPathsFor, - getOutputPathsForBundle: () => getOutputPathsForBundle, - getOwnEmitOutputFilePath: () => getOwnEmitOutputFilePath, - getOwnKeys: () => getOwnKeys, - getOwnValues: () => getOwnValues, - getPackageJsonInfo: () => getPackageJsonInfo, - getPackageJsonTypesVersionsPaths: () => getPackageJsonTypesVersionsPaths, - getPackageJsonsVisibleToFile: () => getPackageJsonsVisibleToFile, - getPackageNameFromTypesPackageName: () => getPackageNameFromTypesPackageName, - getPackageScopeForPath: () => getPackageScopeForPath, - getParameterSymbolFromJSDoc: () => getParameterSymbolFromJSDoc, - getParameterTypeNode: () => getParameterTypeNode, - getParentNodeInSpan: () => getParentNodeInSpan, - getParseTreeNode: () => getParseTreeNode, - getParsedCommandLineOfConfigFile: () => getParsedCommandLineOfConfigFile, - getPathComponents: () => getPathComponents, - getPathComponentsRelativeTo: () => getPathComponentsRelativeTo, - getPathFromPathComponents: () => getPathFromPathComponents, - getPathUpdater: () => getPathUpdater, - getPathsBasePath: () => getPathsBasePath, - getPatternFromSpec: () => getPatternFromSpec, - getPendingEmitKind: () => getPendingEmitKind, - getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter, - getPossibleGenericSignatures: () => getPossibleGenericSignatures, - getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension, - getPossibleTypeArgumentsInfo: () => getPossibleTypeArgumentsInfo, - getPreEmitDiagnostics: () => getPreEmitDiagnostics, - getPrecedingNonSpaceCharacterPosition: () => getPrecedingNonSpaceCharacterPosition, - getPrivateIdentifier: () => getPrivateIdentifier, - getProperties: () => getProperties, - getProperty: () => getProperty, - getPropertyArrayElementValue: () => getPropertyArrayElementValue, - getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, - getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, - getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, - getPropertyNameFromType: () => getPropertyNameFromType, - getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, - getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, - getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType, - getQuoteFromPreference: () => getQuoteFromPreference, - getQuotePreference: () => getQuotePreference, - getRangesWhere: () => getRangesWhere, - getRefactorContextSpan: () => getRefactorContextSpan, - getReferencedFileLocation: () => getReferencedFileLocation, - getRegexFromPattern: () => getRegexFromPattern, - getRegularExpressionForWildcard: () => getRegularExpressionForWildcard, - getRegularExpressionsForWildcards: () => getRegularExpressionsForWildcards, - getRelativePathFromDirectory: () => getRelativePathFromDirectory, - getRelativePathFromFile: () => getRelativePathFromFile, - getRelativePathToDirectoryOrUrl: () => getRelativePathToDirectoryOrUrl, - getRenameLocation: () => getRenameLocation, - getReplacementSpanForContextToken: () => getReplacementSpanForContextToken, - getResolutionDiagnostic: () => getResolutionDiagnostic, - getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause, - getResolveJsonModule: () => getResolveJsonModule, - getResolvePackageJsonExports: () => getResolvePackageJsonExports, - getResolvePackageJsonImports: () => getResolvePackageJsonImports, - getResolvedExternalModuleName: () => getResolvedExternalModuleName, - getResolvedModule: () => getResolvedModule, - getResolvedTypeReferenceDirective: () => getResolvedTypeReferenceDirective, - getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement, - getRestParameterElementType: () => getRestParameterElementType, - getRightMostAssignedExpression: () => getRightMostAssignedExpression, - getRootDeclaration: () => getRootDeclaration, - getRootDirectoryOfResolutionCache: () => getRootDirectoryOfResolutionCache, - getRootLength: () => getRootLength, - getRootPathSplitLength: () => getRootPathSplitLength, - getScriptKind: () => getScriptKind, - getScriptKindFromFileName: () => getScriptKindFromFileName, - getScriptTargetFeatures: () => getScriptTargetFeatures, - getSelectedEffectiveModifierFlags: () => getSelectedEffectiveModifierFlags, - getSelectedSyntacticModifierFlags: () => getSelectedSyntacticModifierFlags, - getSemanticClassifications: () => getSemanticClassifications, - getSemanticJsxChildren: () => getSemanticJsxChildren, - getSetAccessorTypeAnnotationNode: () => getSetAccessorTypeAnnotationNode, - getSetAccessorValueParameter: () => getSetAccessorValueParameter, - getSetExternalModuleIndicator: () => getSetExternalModuleIndicator, - getShebang: () => getShebang, - getSingleInitializerOfVariableStatementOrPropertyDeclaration: () => getSingleInitializerOfVariableStatementOrPropertyDeclaration, - getSingleVariableOfVariableStatement: () => getSingleVariableOfVariableStatement, - getSnapshotText: () => getSnapshotText, - getSnippetElement: () => getSnippetElement, - getSourceFileOfModule: () => getSourceFileOfModule, - getSourceFileOfNode: () => getSourceFileOfNode, - getSourceFilePathInNewDir: () => getSourceFilePathInNewDir, - getSourceFilePathInNewDirWorker: () => getSourceFilePathInNewDirWorker, - getSourceFileVersionAsHashFromText: () => getSourceFileVersionAsHashFromText, - getSourceFilesToEmit: () => getSourceFilesToEmit, - getSourceMapRange: () => getSourceMapRange, - getSourceMapper: () => getSourceMapper, - getSourceTextOfNodeFromSourceFile: () => getSourceTextOfNodeFromSourceFile, - getSpanOfTokenAtPosition: () => getSpanOfTokenAtPosition, - getSpellingSuggestion: () => getSpellingSuggestion, - getStartPositionOfLine: () => getStartPositionOfLine, - getStartPositionOfRange: () => getStartPositionOfRange, - getStartsOnNewLine: () => getStartsOnNewLine, - getStaticPropertiesAndClassStaticBlock: () => getStaticPropertiesAndClassStaticBlock, - getStrictOptionValue: () => getStrictOptionValue, - getStringComparer: () => getStringComparer, - getSuperCallFromStatement: () => getSuperCallFromStatement, - getSuperContainer: () => getSuperContainer, - getSupportedCodeFixes: () => getSupportedCodeFixes, - getSupportedExtensions: () => getSupportedExtensions, - getSupportedExtensionsWithJsonIfResolveJsonModule: () => getSupportedExtensionsWithJsonIfResolveJsonModule, - getSwitchedType: () => getSwitchedType, - getSymbolId: () => getSymbolId, - getSymbolNameForPrivateIdentifier: () => getSymbolNameForPrivateIdentifier, - getSymbolTarget: () => getSymbolTarget, - getSyntacticClassifications: () => getSyntacticClassifications, - getSyntacticModifierFlags: () => getSyntacticModifierFlags, - getSyntacticModifierFlagsNoCache: () => getSyntacticModifierFlagsNoCache, - getSynthesizedDeepClone: () => getSynthesizedDeepClone, - getSynthesizedDeepCloneWithReplacements: () => getSynthesizedDeepCloneWithReplacements, - getSynthesizedDeepClones: () => getSynthesizedDeepClones, - getSynthesizedDeepClonesWithReplacements: () => getSynthesizedDeepClonesWithReplacements, - getSyntheticLeadingComments: () => getSyntheticLeadingComments, - getSyntheticTrailingComments: () => getSyntheticTrailingComments, - getTargetLabel: () => getTargetLabel, - getTargetOfBindingOrAssignmentElement: () => getTargetOfBindingOrAssignmentElement, - getTemporaryModuleResolutionState: () => getTemporaryModuleResolutionState, - getTextOfConstantValue: () => getTextOfConstantValue, - getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral, - getTextOfJSDocComment: () => getTextOfJSDocComment, - getTextOfJsxAttributeName: () => getTextOfJsxAttributeName, - getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName, - getTextOfNode: () => getTextOfNode, - getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText, - getTextOfPropertyName: () => getTextOfPropertyName, - getThisContainer: () => getThisContainer, - getThisParameter: () => getThisParameter, - getTokenAtPosition: () => getTokenAtPosition, - getTokenPosOfNode: () => getTokenPosOfNode, - getTokenSourceMapRange: () => getTokenSourceMapRange, - getTouchingPropertyName: () => getTouchingPropertyName, - getTouchingToken: () => getTouchingToken, - getTrailingCommentRanges: () => getTrailingCommentRanges, - getTrailingSemicolonDeferringWriter: () => getTrailingSemicolonDeferringWriter, - getTransformFlagsSubtreeExclusions: () => getTransformFlagsSubtreeExclusions, - getTransformers: () => getTransformers, - getTsBuildInfoEmitOutputFilePath: () => getTsBuildInfoEmitOutputFilePath, - getTsConfigObjectLiteralExpression: () => getTsConfigObjectLiteralExpression, - getTsConfigPropArrayElementValue: () => getTsConfigPropArrayElementValue, - getTypeAnnotationNode: () => getTypeAnnotationNode, - getTypeArgumentOrTypeParameterList: () => getTypeArgumentOrTypeParameterList, - getTypeKeywordOfTypeOnlyImport: () => getTypeKeywordOfTypeOnlyImport, - getTypeNode: () => getTypeNode, - getTypeNodeIfAccessible: () => getTypeNodeIfAccessible, - getTypeParameterFromJsDoc: () => getTypeParameterFromJsDoc, - getTypeParameterOwner: () => getTypeParameterOwner, - getTypesPackageName: () => getTypesPackageName, - getUILocale: () => getUILocale, - getUniqueName: () => getUniqueName, - getUniqueSymbolId: () => getUniqueSymbolId, - getUseDefineForClassFields: () => getUseDefineForClassFields, - getWatchErrorSummaryDiagnosticMessage: () => getWatchErrorSummaryDiagnosticMessage, - getWatchFactory: () => getWatchFactory, - group: () => group, - groupBy: () => groupBy, - guessIndentation: () => guessIndentation, - handleNoEmitOptions: () => handleNoEmitOptions, - hasAbstractModifier: () => hasAbstractModifier, - hasAccessorModifier: () => hasAccessorModifier, - hasAmbientModifier: () => hasAmbientModifier, - hasChangesInResolutions: () => hasChangesInResolutions, - hasChildOfKind: () => hasChildOfKind, - hasContextSensitiveParameters: () => hasContextSensitiveParameters, - hasDecorators: () => hasDecorators, - hasDocComment: () => hasDocComment, - hasDynamicName: () => hasDynamicName, - hasEffectiveModifier: () => hasEffectiveModifier, - hasEffectiveModifiers: () => hasEffectiveModifiers, - hasEffectiveReadonlyModifier: () => hasEffectiveReadonlyModifier, - hasExtension: () => hasExtension, - hasIndexSignature: () => hasIndexSignature, - hasInitializer: () => hasInitializer, - hasInvalidEscape: () => hasInvalidEscape, - hasJSDocNodes: () => hasJSDocNodes, - hasJSDocParameterTags: () => hasJSDocParameterTags, - hasJSFileExtension: () => hasJSFileExtension, - hasJsonModuleEmitEnabled: () => hasJsonModuleEmitEnabled, - hasOnlyExpressionInitializer: () => hasOnlyExpressionInitializer, - hasOverrideModifier: () => hasOverrideModifier, - hasPossibleExternalModuleReference: () => hasPossibleExternalModuleReference, - hasProperty: () => hasProperty, - hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName, - hasQuestionToken: () => hasQuestionToken, - hasRecordedExternalHelpers: () => hasRecordedExternalHelpers, - hasRestParameter: () => hasRestParameter, - hasScopeMarker: () => hasScopeMarker, - hasStaticModifier: () => hasStaticModifier, - hasSyntacticModifier: () => hasSyntacticModifier, - hasSyntacticModifiers: () => hasSyntacticModifiers, - hasTSFileExtension: () => hasTSFileExtension, - hasTabstop: () => hasTabstop, - hasTrailingDirectorySeparator: () => hasTrailingDirectorySeparator, - hasType: () => hasType, - hasTypeArguments: () => hasTypeArguments, - hasZeroOrOneAsteriskCharacter: () => hasZeroOrOneAsteriskCharacter, - helperString: () => helperString, - hostGetCanonicalFileName: () => hostGetCanonicalFileName, - hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames, - idText: () => idText, - identifierIsThisKeyword: () => identifierIsThisKeyword, - identifierToKeywordKind: () => identifierToKeywordKind, - identity: () => identity, - identitySourceMapConsumer: () => identitySourceMapConsumer, - ignoreSourceNewlines: () => ignoreSourceNewlines, - ignoredPaths: () => ignoredPaths, - importDefaultHelper: () => importDefaultHelper, - importFromModuleSpecifier: () => importFromModuleSpecifier, - importNameElisionDisabled: () => importNameElisionDisabled, - importStarHelper: () => importStarHelper, - indexOfAnyCharCode: () => indexOfAnyCharCode, - indexOfNode: () => indexOfNode, - indicesOf: () => indicesOf, - inferredTypesContainingFile: () => inferredTypesContainingFile, - injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, - injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, - insertImports: () => insertImports, - insertLeadingStatement: () => insertLeadingStatement, - insertSorted: () => insertSorted, - insertStatementAfterCustomPrologue: () => insertStatementAfterCustomPrologue, - insertStatementAfterStandardPrologue: () => insertStatementAfterStandardPrologue, - insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue, - insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue, - intersperse: () => intersperse, - intrinsicTagNameToString: () => intrinsicTagNameToString, - introducesArgumentsExoticObject: () => introducesArgumentsExoticObject, - inverseJsxOptionMap: () => inverseJsxOptionMap, - isAbstractConstructorSymbol: () => isAbstractConstructorSymbol, - isAbstractModifier: () => isAbstractModifier, - isAccessExpression: () => isAccessExpression, - isAccessibilityModifier: () => isAccessibilityModifier, - isAccessor: () => isAccessor, - isAccessorModifier: () => isAccessorModifier, - isAliasSymbolDeclaration: () => isAliasSymbolDeclaration, - isAliasableExpression: () => isAliasableExpression, - isAmbientModule: () => isAmbientModule, - isAmbientPropertyDeclaration: () => isAmbientPropertyDeclaration, - isAnonymousFunctionDefinition: () => isAnonymousFunctionDefinition, - isAnyDirectorySeparator: () => isAnyDirectorySeparator, - isAnyImportOrBareOrAccessedRequire: () => isAnyImportOrBareOrAccessedRequire, - isAnyImportOrReExport: () => isAnyImportOrReExport, - isAnyImportSyntax: () => isAnyImportSyntax, - isAnySupportedFileExtension: () => isAnySupportedFileExtension, - isApplicableVersionedTypesKey: () => isApplicableVersionedTypesKey, - isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess, - isArray: () => isArray, - isArrayBindingElement: () => isArrayBindingElement, - isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement, - isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern, - isArrayBindingPattern: () => isArrayBindingPattern, - isArrayLiteralExpression: () => isArrayLiteralExpression, - isArrayLiteralOrObjectLiteralDestructuringPattern: () => isArrayLiteralOrObjectLiteralDestructuringPattern, - isArrayTypeNode: () => isArrayTypeNode, - isArrowFunction: () => isArrowFunction, - isAsExpression: () => isAsExpression, - isAssertClause: () => isAssertClause, - isAssertEntry: () => isAssertEntry, - isAssertionExpression: () => isAssertionExpression, - isAssertionKey: () => isAssertionKey, - isAssertsKeyword: () => isAssertsKeyword, - isAssignmentDeclaration: () => isAssignmentDeclaration, - isAssignmentExpression: () => isAssignmentExpression, - isAssignmentOperator: () => isAssignmentOperator, - isAssignmentPattern: () => isAssignmentPattern, - isAssignmentTarget: () => isAssignmentTarget, - isAsteriskToken: () => isAsteriskToken, - isAsyncFunction: () => isAsyncFunction, - isAsyncModifier: () => isAsyncModifier, - isAutoAccessorPropertyDeclaration: () => isAutoAccessorPropertyDeclaration, - isAwaitExpression: () => isAwaitExpression, - isAwaitKeyword: () => isAwaitKeyword, - isBigIntLiteral: () => isBigIntLiteral, - isBinaryExpression: () => isBinaryExpression, - isBinaryOperatorToken: () => isBinaryOperatorToken, - isBindableObjectDefinePropertyCall: () => isBindableObjectDefinePropertyCall, - isBindableStaticAccessExpression: () => isBindableStaticAccessExpression, - isBindableStaticElementAccessExpression: () => isBindableStaticElementAccessExpression, - isBindableStaticNameExpression: () => isBindableStaticNameExpression, - isBindingElement: () => isBindingElement, - isBindingElementOfBareOrAccessedRequire: () => isBindingElementOfBareOrAccessedRequire, - isBindingName: () => isBindingName, - isBindingOrAssignmentElement: () => isBindingOrAssignmentElement, - isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern, - isBindingPattern: () => isBindingPattern, - isBlock: () => isBlock, - isBlockOrCatchScoped: () => isBlockOrCatchScoped, - isBlockScope: () => isBlockScope, - isBlockScopedContainerTopLevel: () => isBlockScopedContainerTopLevel, - isBooleanLiteral: () => isBooleanLiteral, - isBreakOrContinueStatement: () => isBreakOrContinueStatement, - isBreakStatement: () => isBreakStatement, - isBuildInfoFile: () => isBuildInfoFile, - isBuilderProgram: () => isBuilderProgram2, - isBundle: () => isBundle, - isBundleFileTextLike: () => isBundleFileTextLike, - isCallChain: () => isCallChain, - isCallExpression: () => isCallExpression, - isCallExpressionTarget: () => isCallExpressionTarget, - isCallLikeExpression: () => isCallLikeExpression, - isCallOrNewExpression: () => isCallOrNewExpression, - isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget, - isCallSignatureDeclaration: () => isCallSignatureDeclaration, - isCallToHelper: () => isCallToHelper, - isCaseBlock: () => isCaseBlock, - isCaseClause: () => isCaseClause, - isCaseKeyword: () => isCaseKeyword, - isCaseOrDefaultClause: () => isCaseOrDefaultClause, - isCatchClause: () => isCatchClause, - isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration, - isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement, - isCheckJsEnabledForFile: () => isCheckJsEnabledForFile, - isChildOfNodeWithKind: () => isChildOfNodeWithKind, - isCircularBuildOrder: () => isCircularBuildOrder, - isClassDeclaration: () => isClassDeclaration, - isClassElement: () => isClassElement, - isClassExpression: () => isClassExpression, - isClassLike: () => isClassLike, - isClassMemberModifier: () => isClassMemberModifier, - isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, - isClassOrTypeElement: () => isClassOrTypeElement, - isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, - isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, - isCollapsedRange: () => isCollapsedRange, - isColonToken: () => isColonToken, - isCommaExpression: () => isCommaExpression, - isCommaListExpression: () => isCommaListExpression, - isCommaSequence: () => isCommaSequence, - isCommaToken: () => isCommaToken, - isComment: () => isComment, - isCommonJsExportPropertyAssignment: () => isCommonJsExportPropertyAssignment, - isCommonJsExportedExpression: () => isCommonJsExportedExpression, - isCompoundAssignment: () => isCompoundAssignment, - isComputedNonLiteralName: () => isComputedNonLiteralName, - isComputedPropertyName: () => isComputedPropertyName, - isConciseBody: () => isConciseBody, - isConditionalExpression: () => isConditionalExpression, - isConditionalTypeNode: () => isConditionalTypeNode, - isConstTypeReference: () => isConstTypeReference, - isConstructSignatureDeclaration: () => isConstructSignatureDeclaration, - isConstructorDeclaration: () => isConstructorDeclaration, - isConstructorTypeNode: () => isConstructorTypeNode, - isContextualKeyword: () => isContextualKeyword, - isContinueStatement: () => isContinueStatement, - isCustomPrologue: () => isCustomPrologue, - isDebuggerStatement: () => isDebuggerStatement, - isDeclaration: () => isDeclaration, - isDeclarationBindingElement: () => isDeclarationBindingElement, - isDeclarationFileName: () => isDeclarationFileName, - isDeclarationName: () => isDeclarationName, - isDeclarationNameOfEnumOrNamespace: () => isDeclarationNameOfEnumOrNamespace, - isDeclarationReadonly: () => isDeclarationReadonly, - isDeclarationStatement: () => isDeclarationStatement, - isDeclarationWithTypeParameterChildren: () => isDeclarationWithTypeParameterChildren, - isDeclarationWithTypeParameters: () => isDeclarationWithTypeParameters, - isDecorator: () => isDecorator, - isDecoratorTarget: () => isDecoratorTarget, - isDefaultClause: () => isDefaultClause, - isDefaultImport: () => isDefaultImport, - isDefaultModifier: () => isDefaultModifier, - isDefaultedExpandoInitializer: () => isDefaultedExpandoInitializer, - isDeleteExpression: () => isDeleteExpression, - isDeleteTarget: () => isDeleteTarget, - isDeprecatedDeclaration: () => isDeprecatedDeclaration, - isDestructuringAssignment: () => isDestructuringAssignment, - isDiagnosticWithLocation: () => isDiagnosticWithLocation, - isDiskPathRoot: () => isDiskPathRoot, - isDoStatement: () => isDoStatement, - isDocumentRegistryEntry: () => isDocumentRegistryEntry, - isDotDotDotToken: () => isDotDotDotToken, - isDottedName: () => isDottedName, - isDynamicName: () => isDynamicName, - isESSymbolIdentifier: () => isESSymbolIdentifier, - isEffectiveExternalModule: () => isEffectiveExternalModule, - isEffectiveModuleDeclaration: () => isEffectiveModuleDeclaration, - isEffectiveStrictModeSourceFile: () => isEffectiveStrictModeSourceFile, - isElementAccessChain: () => isElementAccessChain, - isElementAccessExpression: () => isElementAccessExpression, - isEmittedFileOfProgram: () => isEmittedFileOfProgram, - isEmptyArrayLiteral: () => isEmptyArrayLiteral, - isEmptyBindingElement: () => isEmptyBindingElement, - isEmptyBindingPattern: () => isEmptyBindingPattern, - isEmptyObjectLiteral: () => isEmptyObjectLiteral, - isEmptyStatement: () => isEmptyStatement, - isEmptyStringLiteral: () => isEmptyStringLiteral, - isEntityName: () => isEntityName, - isEntityNameExpression: () => isEntityNameExpression, - isEnumConst: () => isEnumConst, - isEnumDeclaration: () => isEnumDeclaration, - isEnumMember: () => isEnumMember, - isEqualityOperatorKind: () => isEqualityOperatorKind, - isEqualsGreaterThanToken: () => isEqualsGreaterThanToken, - isExclamationToken: () => isExclamationToken, - isExcludedFile: () => isExcludedFile, - isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport, - isExportAssignment: () => isExportAssignment, - isExportDeclaration: () => isExportDeclaration, - isExportModifier: () => isExportModifier, - isExportName: () => isExportName, - isExportNamespaceAsDefaultDeclaration: () => isExportNamespaceAsDefaultDeclaration, - isExportOrDefaultModifier: () => isExportOrDefaultModifier, - isExportSpecifier: () => isExportSpecifier, - isExportsIdentifier: () => isExportsIdentifier, - isExportsOrModuleExportsOrAlias: () => isExportsOrModuleExportsOrAlias, - isExpression: () => isExpression, - isExpressionNode: () => isExpressionNode, - isExpressionOfExternalModuleImportEqualsDeclaration: () => isExpressionOfExternalModuleImportEqualsDeclaration, - isExpressionOfOptionalChainRoot: () => isExpressionOfOptionalChainRoot, - isExpressionStatement: () => isExpressionStatement, - isExpressionWithTypeArguments: () => isExpressionWithTypeArguments, - isExpressionWithTypeArgumentsInClassExtendsClause: () => isExpressionWithTypeArgumentsInClassExtendsClause, - isExternalModule: () => isExternalModule, - isExternalModuleAugmentation: () => isExternalModuleAugmentation, - isExternalModuleImportEqualsDeclaration: () => isExternalModuleImportEqualsDeclaration, - isExternalModuleIndicator: () => isExternalModuleIndicator, - isExternalModuleNameRelative: () => isExternalModuleNameRelative, - isExternalModuleReference: () => isExternalModuleReference, - isExternalModuleSymbol: () => isExternalModuleSymbol, - isExternalOrCommonJsModule: () => isExternalOrCommonJsModule, - isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier, - isFileLevelUniqueName: () => isFileLevelUniqueName, - isFileProbablyExternalModule: () => isFileProbablyExternalModule, - isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter, - isFixablePromiseHandler: () => isFixablePromiseHandler, - isForInOrOfStatement: () => isForInOrOfStatement, - isForInStatement: () => isForInStatement, - isForInitializer: () => isForInitializer, - isForOfStatement: () => isForOfStatement, - isForStatement: () => isForStatement, - isFunctionBlock: () => isFunctionBlock, - isFunctionBody: () => isFunctionBody, - isFunctionDeclaration: () => isFunctionDeclaration, - isFunctionExpression: () => isFunctionExpression, - isFunctionExpressionOrArrowFunction: () => isFunctionExpressionOrArrowFunction, - isFunctionLike: () => isFunctionLike, - isFunctionLikeDeclaration: () => isFunctionLikeDeclaration, - isFunctionLikeKind: () => isFunctionLikeKind, - isFunctionLikeOrClassStaticBlockDeclaration: () => isFunctionLikeOrClassStaticBlockDeclaration, - isFunctionOrConstructorTypeNode: () => isFunctionOrConstructorTypeNode, - isFunctionOrModuleBlock: () => isFunctionOrModuleBlock, - isFunctionSymbol: () => isFunctionSymbol, - isFunctionTypeNode: () => isFunctionTypeNode, - isFutureReservedKeyword: () => isFutureReservedKeyword, - isGeneratedIdentifier: () => isGeneratedIdentifier, - isGeneratedPrivateIdentifier: () => isGeneratedPrivateIdentifier, - isGetAccessor: () => isGetAccessor, - isGetAccessorDeclaration: () => isGetAccessorDeclaration, - isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration, - isGlobalDeclaration: () => isGlobalDeclaration, - isGlobalScopeAugmentation: () => isGlobalScopeAugmentation, - isGrammarError: () => isGrammarError, - isHeritageClause: () => isHeritageClause, - isHoistedFunction: () => isHoistedFunction, - isHoistedVariableStatement: () => isHoistedVariableStatement, - isIdentifier: () => isIdentifier, - isIdentifierANonContextualKeyword: () => isIdentifierANonContextualKeyword, - isIdentifierName: () => isIdentifierName, - isIdentifierOrThisTypeNode: () => isIdentifierOrThisTypeNode, - isIdentifierPart: () => isIdentifierPart, - isIdentifierStart: () => isIdentifierStart, - isIdentifierText: () => isIdentifierText, - isIdentifierTypePredicate: () => isIdentifierTypePredicate, - isIdentifierTypeReference: () => isIdentifierTypeReference, - isIfStatement: () => isIfStatement, - isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching, - isImplicitGlob: () => isImplicitGlob, - isImportCall: () => isImportCall, - isImportClause: () => isImportClause, - isImportDeclaration: () => isImportDeclaration, - isImportEqualsDeclaration: () => isImportEqualsDeclaration, - isImportKeyword: () => isImportKeyword, - isImportMeta: () => isImportMeta, - isImportOrExportSpecifier: () => isImportOrExportSpecifier, - isImportOrExportSpecifierName: () => isImportOrExportSpecifierName, - isImportSpecifier: () => isImportSpecifier, - isImportTypeAssertionContainer: () => isImportTypeAssertionContainer, - isImportTypeNode: () => isImportTypeNode, - isImportableFile: () => isImportableFile, - isInComment: () => isInComment, - isInExpressionContext: () => isInExpressionContext, - isInJSDoc: () => isInJSDoc, - isInJSFile: () => isInJSFile, - isInJSXText: () => isInJSXText, - isInJsonFile: () => isInJsonFile, - isInNonReferenceComment: () => isInNonReferenceComment, - isInReferenceComment: () => isInReferenceComment, - isInRightSideOfInternalImportEqualsDeclaration: () => isInRightSideOfInternalImportEqualsDeclaration, - isInString: () => isInString, - isInTemplateString: () => isInTemplateString, - isInTopLevelContext: () => isInTopLevelContext, - isInTypeQuery: () => isInTypeQuery, - isIncrementalCompilation: () => isIncrementalCompilation, - isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, - isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, - isInferTypeNode: () => isInferTypeNode, - isInfinityOrNaNString: () => isInfinityOrNaNString, - isInitializedProperty: () => isInitializedProperty, - isInitializedVariable: () => isInitializedVariable, - isInsideJsxElement: () => isInsideJsxElement, - isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute, - isInsideNodeModules: () => isInsideNodeModules, - isInsideTemplateLiteral: () => isInsideTemplateLiteral, - isInstantiatedModule: () => isInstantiatedModule, - isInterfaceDeclaration: () => isInterfaceDeclaration, - isInternalDeclaration: () => isInternalDeclaration, - isInternalModuleImportEqualsDeclaration: () => isInternalModuleImportEqualsDeclaration, - isInternalName: () => isInternalName, - isIntersectionTypeNode: () => isIntersectionTypeNode, - isIntrinsicJsxName: () => isIntrinsicJsxName, - isIterationStatement: () => isIterationStatement, - isJSDoc: () => isJSDoc, - isJSDocAllType: () => isJSDocAllType, - isJSDocAugmentsTag: () => isJSDocAugmentsTag, - isJSDocAuthorTag: () => isJSDocAuthorTag, - isJSDocCallbackTag: () => isJSDocCallbackTag, - isJSDocClassTag: () => isJSDocClassTag, - isJSDocCommentContainingNode: () => isJSDocCommentContainingNode, - isJSDocConstructSignature: () => isJSDocConstructSignature, - isJSDocDeprecatedTag: () => isJSDocDeprecatedTag, - isJSDocEnumTag: () => isJSDocEnumTag, - isJSDocFunctionType: () => isJSDocFunctionType, - isJSDocImplementsTag: () => isJSDocImplementsTag, - isJSDocIndexSignature: () => isJSDocIndexSignature, - isJSDocLikeText: () => isJSDocLikeText, - isJSDocLink: () => isJSDocLink, - isJSDocLinkCode: () => isJSDocLinkCode, - isJSDocLinkLike: () => isJSDocLinkLike, - isJSDocLinkPlain: () => isJSDocLinkPlain, - isJSDocMemberName: () => isJSDocMemberName, - isJSDocNameReference: () => isJSDocNameReference, - isJSDocNamepathType: () => isJSDocNamepathType, - isJSDocNamespaceBody: () => isJSDocNamespaceBody, - isJSDocNode: () => isJSDocNode, - isJSDocNonNullableType: () => isJSDocNonNullableType, - isJSDocNullableType: () => isJSDocNullableType, - isJSDocOptionalParameter: () => isJSDocOptionalParameter, - isJSDocOptionalType: () => isJSDocOptionalType, - isJSDocOverloadTag: () => isJSDocOverloadTag, - isJSDocOverrideTag: () => isJSDocOverrideTag, - isJSDocParameterTag: () => isJSDocParameterTag, - isJSDocPrivateTag: () => isJSDocPrivateTag, - isJSDocPropertyLikeTag: () => isJSDocPropertyLikeTag, - isJSDocPropertyTag: () => isJSDocPropertyTag, - isJSDocProtectedTag: () => isJSDocProtectedTag, - isJSDocPublicTag: () => isJSDocPublicTag, - isJSDocReadonlyTag: () => isJSDocReadonlyTag, - isJSDocReturnTag: () => isJSDocReturnTag, - isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression, - isJSDocSatisfiesTag: () => isJSDocSatisfiesTag, - isJSDocSeeTag: () => isJSDocSeeTag, - isJSDocSignature: () => isJSDocSignature, - isJSDocTag: () => isJSDocTag, - isJSDocTemplateTag: () => isJSDocTemplateTag, - isJSDocThisTag: () => isJSDocThisTag, - isJSDocThrowsTag: () => isJSDocThrowsTag, - isJSDocTypeAlias: () => isJSDocTypeAlias, - isJSDocTypeAssertion: () => isJSDocTypeAssertion, - isJSDocTypeExpression: () => isJSDocTypeExpression, - isJSDocTypeLiteral: () => isJSDocTypeLiteral, - isJSDocTypeTag: () => isJSDocTypeTag, - isJSDocTypedefTag: () => isJSDocTypedefTag, - isJSDocUnknownTag: () => isJSDocUnknownTag, - isJSDocUnknownType: () => isJSDocUnknownType, - isJSDocVariadicType: () => isJSDocVariadicType, - isJSXTagName: () => isJSXTagName, - isJsonEqual: () => isJsonEqual, - isJsonSourceFile: () => isJsonSourceFile, - isJsxAttribute: () => isJsxAttribute, - isJsxAttributeLike: () => isJsxAttributeLike, - isJsxAttributeName: () => isJsxAttributeName, - isJsxAttributes: () => isJsxAttributes, - isJsxChild: () => isJsxChild, - isJsxClosingElement: () => isJsxClosingElement, - isJsxClosingFragment: () => isJsxClosingFragment, - isJsxElement: () => isJsxElement, - isJsxExpression: () => isJsxExpression, - isJsxFragment: () => isJsxFragment, - isJsxNamespacedName: () => isJsxNamespacedName, - isJsxOpeningElement: () => isJsxOpeningElement, - isJsxOpeningFragment: () => isJsxOpeningFragment, - isJsxOpeningLikeElement: () => isJsxOpeningLikeElement, - isJsxOpeningLikeElementTagName: () => isJsxOpeningLikeElementTagName, - isJsxSelfClosingElement: () => isJsxSelfClosingElement, - isJsxSpreadAttribute: () => isJsxSpreadAttribute, - isJsxTagNameExpression: () => isJsxTagNameExpression, - isJsxText: () => isJsxText, - isJumpStatementTarget: () => isJumpStatementTarget, - isKeyword: () => isKeyword, - isKeywordOrPunctuation: () => isKeywordOrPunctuation, - isKnownSymbol: () => isKnownSymbol, - isLabelName: () => isLabelName, - isLabelOfLabeledStatement: () => isLabelOfLabeledStatement, - isLabeledStatement: () => isLabeledStatement, - isLateVisibilityPaintedStatement: () => isLateVisibilityPaintedStatement, - isLeftHandSideExpression: () => isLeftHandSideExpression, - isLeftHandSideOfAssignment: () => isLeftHandSideOfAssignment, - isLet: () => isLet, - isLineBreak: () => isLineBreak, - isLiteralComputedPropertyDeclarationName: () => isLiteralComputedPropertyDeclarationName, - isLiteralExpression: () => isLiteralExpression, - isLiteralExpressionOfObject: () => isLiteralExpressionOfObject, - isLiteralImportTypeNode: () => isLiteralImportTypeNode, - isLiteralKind: () => isLiteralKind, - isLiteralLikeAccess: () => isLiteralLikeAccess, - isLiteralLikeElementAccess: () => isLiteralLikeElementAccess, - isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess, - isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression, - isLiteralTypeLiteral: () => isLiteralTypeLiteral, - isLiteralTypeNode: () => isLiteralTypeNode, - isLocalName: () => isLocalName, - isLogicalOperator: () => isLogicalOperator, - isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression, - isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator, - isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression, - isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator, - isMappedTypeNode: () => isMappedTypeNode, - isMemberName: () => isMemberName, - isMetaProperty: () => isMetaProperty, - isMethodDeclaration: () => isMethodDeclaration, - isMethodOrAccessor: () => isMethodOrAccessor, - isMethodSignature: () => isMethodSignature, - isMinusToken: () => isMinusToken, - isMissingDeclaration: () => isMissingDeclaration, - isModifier: () => isModifier, - isModifierKind: () => isModifierKind, - isModifierLike: () => isModifierLike, - isModuleAugmentationExternal: () => isModuleAugmentationExternal, - isModuleBlock: () => isModuleBlock, - isModuleBody: () => isModuleBody, - isModuleDeclaration: () => isModuleDeclaration, - isModuleExportsAccessExpression: () => isModuleExportsAccessExpression, - isModuleIdentifier: () => isModuleIdentifier, - isModuleName: () => isModuleName, - isModuleOrEnumDeclaration: () => isModuleOrEnumDeclaration, - isModuleReference: () => isModuleReference, - isModuleSpecifierLike: () => isModuleSpecifierLike, - isModuleWithStringLiteralName: () => isModuleWithStringLiteralName, - isNameOfFunctionDeclaration: () => isNameOfFunctionDeclaration, - isNameOfModuleDeclaration: () => isNameOfModuleDeclaration, - isNamedClassElement: () => isNamedClassElement, - isNamedDeclaration: () => isNamedDeclaration, - isNamedEvaluation: () => isNamedEvaluation, - isNamedEvaluationSource: () => isNamedEvaluationSource, - isNamedExportBindings: () => isNamedExportBindings, - isNamedExports: () => isNamedExports, - isNamedImportBindings: () => isNamedImportBindings, - isNamedImports: () => isNamedImports, - isNamedImportsOrExports: () => isNamedImportsOrExports, - isNamedTupleMember: () => isNamedTupleMember, - isNamespaceBody: () => isNamespaceBody, - isNamespaceExport: () => isNamespaceExport, - isNamespaceExportDeclaration: () => isNamespaceExportDeclaration, - isNamespaceImport: () => isNamespaceImport, - isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, - isNewExpression: () => isNewExpression, - isNewExpressionTarget: () => isNewExpressionTarget, - isNightly: () => isNightly, - isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral, - isNode: () => isNode, - isNodeArray: () => isNodeArray, - isNodeArrayMultiLine: () => isNodeArrayMultiLine, - isNodeDescendantOf: () => isNodeDescendantOf, - isNodeKind: () => isNodeKind, - isNodeLikeSystem: () => isNodeLikeSystem, - isNodeModulesDirectory: () => isNodeModulesDirectory, - isNodeWithPossibleHoistedDeclaration: () => isNodeWithPossibleHoistedDeclaration, - isNonContextualKeyword: () => isNonContextualKeyword, - isNonExportDefaultModifier: () => isNonExportDefaultModifier, - isNonGlobalAmbientModule: () => isNonGlobalAmbientModule, - isNonGlobalDeclaration: () => isNonGlobalDeclaration, - isNonNullAccess: () => isNonNullAccess, - isNonNullChain: () => isNonNullChain, - isNonNullExpression: () => isNonNullExpression, - isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName, - isNotEmittedOrPartiallyEmittedNode: () => isNotEmittedOrPartiallyEmittedNode, - isNotEmittedStatement: () => isNotEmittedStatement, - isNullishCoalesce: () => isNullishCoalesce, - isNumber: () => isNumber, - isNumericLiteral: () => isNumericLiteral, - isNumericLiteralName: () => isNumericLiteralName, - isObjectBindingElementWithoutPropertyName: () => isObjectBindingElementWithoutPropertyName, - isObjectBindingOrAssignmentElement: () => isObjectBindingOrAssignmentElement, - isObjectBindingOrAssignmentPattern: () => isObjectBindingOrAssignmentPattern, - isObjectBindingPattern: () => isObjectBindingPattern, - isObjectLiteralElement: () => isObjectLiteralElement, - isObjectLiteralElementLike: () => isObjectLiteralElementLike, - isObjectLiteralExpression: () => isObjectLiteralExpression, - isObjectLiteralMethod: () => isObjectLiteralMethod, - isObjectLiteralOrClassExpressionMethodOrAccessor: () => isObjectLiteralOrClassExpressionMethodOrAccessor, - isObjectTypeDeclaration: () => isObjectTypeDeclaration, - isOctalDigit: () => isOctalDigit, - isOmittedExpression: () => isOmittedExpression, - isOptionalChain: () => isOptionalChain, - isOptionalChainRoot: () => isOptionalChainRoot, - isOptionalDeclaration: () => isOptionalDeclaration, - isOptionalJSDocPropertyLikeTag: () => isOptionalJSDocPropertyLikeTag, - isOptionalTypeNode: () => isOptionalTypeNode, - isOuterExpression: () => isOuterExpression, - isOutermostOptionalChain: () => isOutermostOptionalChain, - isOverrideModifier: () => isOverrideModifier, - isPackedArrayLiteral: () => isPackedArrayLiteral, - isParameter: () => isParameter, - isParameterDeclaration: () => isParameterDeclaration, - isParameterOrCatchClauseVariable: () => isParameterOrCatchClauseVariable, - isParameterPropertyDeclaration: () => isParameterPropertyDeclaration, - isParameterPropertyModifier: () => isParameterPropertyModifier, - isParenthesizedExpression: () => isParenthesizedExpression, - isParenthesizedTypeNode: () => isParenthesizedTypeNode, - isParseTreeNode: () => isParseTreeNode, - isPartOfTypeNode: () => isPartOfTypeNode, - isPartOfTypeQuery: () => isPartOfTypeQuery, - isPartiallyEmittedExpression: () => isPartiallyEmittedExpression, - isPatternMatch: () => isPatternMatch, - isPinnedComment: () => isPinnedComment, - isPlainJsFile: () => isPlainJsFile, - isPlusToken: () => isPlusToken, - isPossiblyTypeArgumentPosition: () => isPossiblyTypeArgumentPosition, - isPostfixUnaryExpression: () => isPostfixUnaryExpression, - isPrefixUnaryExpression: () => isPrefixUnaryExpression, - isPrivateIdentifier: () => isPrivateIdentifier, - isPrivateIdentifierClassElementDeclaration: () => isPrivateIdentifierClassElementDeclaration, - isPrivateIdentifierPropertyAccessExpression: () => isPrivateIdentifierPropertyAccessExpression, - isPrivateIdentifierSymbol: () => isPrivateIdentifierSymbol, - isProgramBundleEmitBuildInfo: () => isProgramBundleEmitBuildInfo, - isProgramUptoDate: () => isProgramUptoDate, - isPrologueDirective: () => isPrologueDirective, - isPropertyAccessChain: () => isPropertyAccessChain, - isPropertyAccessEntityNameExpression: () => isPropertyAccessEntityNameExpression, - isPropertyAccessExpression: () => isPropertyAccessExpression, - isPropertyAccessOrQualifiedName: () => isPropertyAccessOrQualifiedName, - isPropertyAccessOrQualifiedNameOrImportTypeNode: () => isPropertyAccessOrQualifiedNameOrImportTypeNode, - isPropertyAssignment: () => isPropertyAssignment, - isPropertyDeclaration: () => isPropertyDeclaration, - isPropertyName: () => isPropertyName, - isPropertyNameLiteral: () => isPropertyNameLiteral, - isPropertySignature: () => isPropertySignature, - isProtoSetter: () => isProtoSetter, - isPrototypeAccess: () => isPrototypeAccess, - isPrototypePropertyAssignment: () => isPrototypePropertyAssignment, - isPunctuation: () => isPunctuation, - isPushOrUnshiftIdentifier: () => isPushOrUnshiftIdentifier, - isQualifiedName: () => isQualifiedName, - isQuestionDotToken: () => isQuestionDotToken, - isQuestionOrExclamationToken: () => isQuestionOrExclamationToken, - isQuestionOrPlusOrMinusToken: () => isQuestionOrPlusOrMinusToken, - isQuestionToken: () => isQuestionToken, - isRawSourceMap: () => isRawSourceMap, - isReadonlyKeyword: () => isReadonlyKeyword, - isReadonlyKeywordOrPlusOrMinusToken: () => isReadonlyKeywordOrPlusOrMinusToken, - isRecognizedTripleSlashComment: () => isRecognizedTripleSlashComment, - isReferenceFileLocation: () => isReferenceFileLocation, - isReferencedFile: () => isReferencedFile, - isRegularExpressionLiteral: () => isRegularExpressionLiteral, - isRequireCall: () => isRequireCall, - isRequireVariableStatement: () => isRequireVariableStatement, - isRestParameter: () => isRestParameter, - isRestTypeNode: () => isRestTypeNode, - isReturnStatement: () => isReturnStatement, - isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler, - isRightSideOfAccessExpression: () => isRightSideOfAccessExpression, - isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess, - isRightSideOfQualifiedName: () => isRightSideOfQualifiedName, - isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess, - isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName, - isRootedDiskPath: () => isRootedDiskPath, - isSameEntityName: () => isSameEntityName, - isSatisfiesExpression: () => isSatisfiesExpression, - isScopeMarker: () => isScopeMarker, - isSemicolonClassElement: () => isSemicolonClassElement, - isSetAccessor: () => isSetAccessor, - isSetAccessorDeclaration: () => isSetAccessorDeclaration, - isShebangTrivia: () => isShebangTrivia, - isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, - isShorthandPropertyAssignment: () => isShorthandPropertyAssignment, - isSignedNumericLiteral: () => isSignedNumericLiteral, - isSimpleCopiableExpression: () => isSimpleCopiableExpression, - isSimpleInlineableExpression: () => isSimpleInlineableExpression, - isSingleOrDoubleQuote: () => isSingleOrDoubleQuote, - isSourceFile: () => isSourceFile, - isSourceFileFromLibrary: () => isSourceFileFromLibrary, - isSourceFileJS: () => isSourceFileJS, - isSourceFileNotJS: () => isSourceFileNotJS, - isSourceFileNotJson: () => isSourceFileNotJson, - isSourceMapping: () => isSourceMapping, - isSpecialPropertyDeclaration: () => isSpecialPropertyDeclaration, - isSpreadAssignment: () => isSpreadAssignment, - isSpreadElement: () => isSpreadElement, - isStatement: () => isStatement, - isStatementButNotDeclaration: () => isStatementButNotDeclaration, - isStatementOrBlock: () => isStatementOrBlock, - isStatementWithLocals: () => isStatementWithLocals, - isStatic: () => isStatic, - isStaticModifier: () => isStaticModifier, - isString: () => isString, - isStringAKeyword: () => isStringAKeyword, - isStringANonContextualKeyword: () => isStringANonContextualKeyword, - isStringAndEmptyAnonymousObjectIntersection: () => isStringAndEmptyAnonymousObjectIntersection, - isStringDoubleQuoted: () => isStringDoubleQuoted, - isStringLiteral: () => isStringLiteral, - isStringLiteralLike: () => isStringLiteralLike, - isStringLiteralOrJsxExpression: () => isStringLiteralOrJsxExpression, - isStringLiteralOrTemplate: () => isStringLiteralOrTemplate, - isStringOrNumericLiteralLike: () => isStringOrNumericLiteralLike, - isStringOrRegularExpressionOrTemplateLiteral: () => isStringOrRegularExpressionOrTemplateLiteral, - isStringTextContainingNode: () => isStringTextContainingNode, - isSuperCall: () => isSuperCall, - isSuperKeyword: () => isSuperKeyword, - isSuperOrSuperProperty: () => isSuperOrSuperProperty, - isSuperProperty: () => isSuperProperty, - isSupportedSourceFileName: () => isSupportedSourceFileName, - isSwitchStatement: () => isSwitchStatement, - isSyntaxList: () => isSyntaxList, - isSyntheticExpression: () => isSyntheticExpression, - isSyntheticReference: () => isSyntheticReference, - isTagName: () => isTagName, - isTaggedTemplateExpression: () => isTaggedTemplateExpression, - isTaggedTemplateTag: () => isTaggedTemplateTag, - isTemplateExpression: () => isTemplateExpression, - isTemplateHead: () => isTemplateHead, - isTemplateLiteral: () => isTemplateLiteral, - isTemplateLiteralKind: () => isTemplateLiteralKind, - isTemplateLiteralToken: () => isTemplateLiteralToken, - isTemplateLiteralTypeNode: () => isTemplateLiteralTypeNode, - isTemplateLiteralTypeSpan: () => isTemplateLiteralTypeSpan, - isTemplateMiddle: () => isTemplateMiddle, - isTemplateMiddleOrTemplateTail: () => isTemplateMiddleOrTemplateTail, - isTemplateSpan: () => isTemplateSpan, - isTemplateTail: () => isTemplateTail, - isTextWhiteSpaceLike: () => isTextWhiteSpaceLike, - isThis: () => isThis, - isThisContainerOrFunctionBlock: () => isThisContainerOrFunctionBlock, - isThisIdentifier: () => isThisIdentifier, - isThisInTypeQuery: () => isThisInTypeQuery, - isThisInitializedDeclaration: () => isThisInitializedDeclaration, - isThisInitializedObjectBindingExpression: () => isThisInitializedObjectBindingExpression, - isThisProperty: () => isThisProperty, - isThisTypeNode: () => isThisTypeNode, - isThisTypeParameter: () => isThisTypeParameter, - isThisTypePredicate: () => isThisTypePredicate, - isThrowStatement: () => isThrowStatement, - isToken: () => isToken, - isTokenKind: () => isTokenKind, - isTraceEnabled: () => isTraceEnabled, - isTransientSymbol: () => isTransientSymbol, - isTrivia: () => isTrivia, - isTryStatement: () => isTryStatement, - isTupleTypeNode: () => isTupleTypeNode, - isTypeAlias: () => isTypeAlias, - isTypeAliasDeclaration: () => isTypeAliasDeclaration, - isTypeAssertionExpression: () => isTypeAssertionExpression, - isTypeDeclaration: () => isTypeDeclaration, - isTypeElement: () => isTypeElement, - isTypeKeyword: () => isTypeKeyword, - isTypeKeywordToken: () => isTypeKeywordToken, - isTypeKeywordTokenOrIdentifier: () => isTypeKeywordTokenOrIdentifier, - isTypeLiteralNode: () => isTypeLiteralNode, - isTypeNode: () => isTypeNode, - isTypeNodeKind: () => isTypeNodeKind, - isTypeOfExpression: () => isTypeOfExpression, - isTypeOnlyExportDeclaration: () => isTypeOnlyExportDeclaration, - isTypeOnlyImportDeclaration: () => isTypeOnlyImportDeclaration, - isTypeOnlyImportOrExportDeclaration: () => isTypeOnlyImportOrExportDeclaration, - isTypeOperatorNode: () => isTypeOperatorNode, - isTypeParameterDeclaration: () => isTypeParameterDeclaration, - isTypePredicateNode: () => isTypePredicateNode, - isTypeQueryNode: () => isTypeQueryNode, - isTypeReferenceNode: () => isTypeReferenceNode, - isTypeReferenceType: () => isTypeReferenceType, - isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName, - isUMDExportSymbol: () => isUMDExportSymbol, - isUnaryExpression: () => isUnaryExpression, - isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite, - isUnicodeIdentifierStart: () => isUnicodeIdentifierStart, - isUnionTypeNode: () => isUnionTypeNode, - isUnparsedNode: () => isUnparsedNode, - isUnparsedPrepend: () => isUnparsedPrepend, - isUnparsedSource: () => isUnparsedSource, - isUnparsedTextLike: () => isUnparsedTextLike, - isUrl: () => isUrl, - isValidBigIntString: () => isValidBigIntString, - isValidESSymbolDeclaration: () => isValidESSymbolDeclaration, - isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite, - isValueSignatureDeclaration: () => isValueSignatureDeclaration, - isVarAwaitUsing: () => isVarAwaitUsing, - isVarConst: () => isVarConst, - isVarUsing: () => isVarUsing, - isVariableDeclaration: () => isVariableDeclaration, - isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement, - isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire, - isVariableDeclarationInitializedToRequire: () => isVariableDeclarationInitializedToRequire, - isVariableDeclarationList: () => isVariableDeclarationList, - isVariableLike: () => isVariableLike, - isVariableLikeOrAccessor: () => isVariableLikeOrAccessor, - isVariableStatement: () => isVariableStatement, - isVoidExpression: () => isVoidExpression, - isWatchSet: () => isWatchSet, - isWhileStatement: () => isWhileStatement, - isWhiteSpaceLike: () => isWhiteSpaceLike, - isWhiteSpaceSingleLine: () => isWhiteSpaceSingleLine, - isWithStatement: () => isWithStatement, - isWriteAccess: () => isWriteAccess, - isWriteOnlyAccess: () => isWriteOnlyAccess, - isYieldExpression: () => isYieldExpression, - jsxModeNeedsExplicitImport: () => jsxModeNeedsExplicitImport, - keywordPart: () => keywordPart, - last: () => last, - lastOrUndefined: () => lastOrUndefined, - length: () => length, - libMap: () => libMap, - libs: () => libs, - lineBreakPart: () => lineBreakPart, - linkNamePart: () => linkNamePart, - linkPart: () => linkPart, - linkTextPart: () => linkTextPart, - listFiles: () => listFiles, - loadModuleFromGlobalCache: () => loadModuleFromGlobalCache, - loadWithModeAwareCache: () => loadWithModeAwareCache, - makeIdentifierFromModuleName: () => makeIdentifierFromModuleName, - makeImport: () => makeImport, - makeImportIfNecessary: () => makeImportIfNecessary, - makeStringLiteral: () => makeStringLiteral, - mangleScopedPackageName: () => mangleScopedPackageName, - map: () => map, - mapAllOrFail: () => mapAllOrFail, - mapDefined: () => mapDefined, - mapDefinedEntries: () => mapDefinedEntries, - mapDefinedIterator: () => mapDefinedIterator, - mapEntries: () => mapEntries, - mapIterator: () => mapIterator, - mapOneOrMany: () => mapOneOrMany, - mapToDisplayParts: () => mapToDisplayParts, - matchFiles: () => matchFiles, - matchPatternOrExact: () => matchPatternOrExact, - matchedText: () => matchedText, - matchesExclude: () => matchesExclude, - maybeBind: () => maybeBind, - maybeSetLocalizedDiagnosticMessages: () => maybeSetLocalizedDiagnosticMessages, - memoize: () => memoize, - memoizeCached: () => memoizeCached, - memoizeOne: () => memoizeOne, - memoizeWeak: () => memoizeWeak, - metadataHelper: () => metadataHelper, - min: () => min, - minAndMax: () => minAndMax, - missingFileModifiedTime: () => missingFileModifiedTime, - modifierToFlag: () => modifierToFlag, - modifiersToFlags: () => modifiersToFlags, - moduleOptionDeclaration: () => moduleOptionDeclaration, - moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo, - moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter, - moduleResolutionOptionDeclarations: () => moduleResolutionOptionDeclarations, - moduleResolutionSupportsPackageJsonExportsAndImports: () => moduleResolutionSupportsPackageJsonExportsAndImports, - moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules, - moduleSpecifiers: () => ts_moduleSpecifiers_exports, - moveEmitHelpers: () => moveEmitHelpers, - moveRangeEnd: () => moveRangeEnd, - moveRangePastDecorators: () => moveRangePastDecorators, - moveRangePastModifiers: () => moveRangePastModifiers, - moveRangePos: () => moveRangePos, - moveSyntheticComments: () => moveSyntheticComments, - mutateMap: () => mutateMap, - mutateMapSkippingNewValues: () => mutateMapSkippingNewValues, - needsParentheses: () => needsParentheses, - needsScopeMarker: () => needsScopeMarker, - newCaseClauseTracker: () => newCaseClauseTracker, - newPrivateEnvironment: () => newPrivateEnvironment, - noEmitNotification: () => noEmitNotification, - noEmitSubstitution: () => noEmitSubstitution, - noTransformers: () => noTransformers, - noTruncationMaximumTruncationLength: () => noTruncationMaximumTruncationLength, - nodeCanBeDecorated: () => nodeCanBeDecorated, - nodeHasName: () => nodeHasName, - nodeIsDecorated: () => nodeIsDecorated, - nodeIsMissing: () => nodeIsMissing, - nodeIsPresent: () => nodeIsPresent, - nodeIsSynthesized: () => nodeIsSynthesized, - nodeModuleNameResolver: () => nodeModuleNameResolver, - nodeModulesPathPart: () => nodeModulesPathPart, - nodeNextJsonConfigResolver: () => nodeNextJsonConfigResolver, - nodeOrChildIsDecorated: () => nodeOrChildIsDecorated, - nodeOverlapsWithStartEnd: () => nodeOverlapsWithStartEnd, - nodePosToString: () => nodePosToString, - nodeSeenTracker: () => nodeSeenTracker, - nodeStartsNewLexicalEnvironment: () => nodeStartsNewLexicalEnvironment, - nodeToDisplayParts: () => nodeToDisplayParts, - noop: () => noop, - noopFileWatcher: () => noopFileWatcher, - normalizePath: () => normalizePath, - normalizeSlashes: () => normalizeSlashes, - not: () => not, - notImplemented: () => notImplemented, - notImplementedResolver: () => notImplementedResolver, - nullNodeConverters: () => nullNodeConverters, - nullParenthesizerRules: () => nullParenthesizerRules, - nullTransformationContext: () => nullTransformationContext, - objectAllocator: () => objectAllocator, - operatorPart: () => operatorPart, - optionDeclarations: () => optionDeclarations, - optionMapToObject: () => optionMapToObject, - optionsAffectingProgramStructure: () => optionsAffectingProgramStructure, - optionsForBuild: () => optionsForBuild, - optionsForWatch: () => optionsForWatch, - optionsHaveChanges: () => optionsHaveChanges, - optionsHaveModuleResolutionChanges: () => optionsHaveModuleResolutionChanges, - or: () => or, - orderedRemoveItem: () => orderedRemoveItem, - orderedRemoveItemAt: () => orderedRemoveItemAt, - outFile: () => outFile, - packageIdToPackageName: () => packageIdToPackageName, - packageIdToString: () => packageIdToString, - padLeft: () => padLeft, - padRight: () => padRight, - paramHelper: () => paramHelper, - parameterIsThisKeyword: () => parameterIsThisKeyword, - parameterNamePart: () => parameterNamePart, - parseBaseNodeFactory: () => parseBaseNodeFactory, - parseBigInt: () => parseBigInt, - parseBuildCommand: () => parseBuildCommand, - parseCommandLine: () => parseCommandLine, - parseCommandLineWorker: () => parseCommandLineWorker, - parseConfigFileTextToJson: () => parseConfigFileTextToJson, - parseConfigFileWithSystem: () => parseConfigFileWithSystem, - parseConfigHostFromCompilerHostLike: () => parseConfigHostFromCompilerHostLike, - parseCustomTypeOption: () => parseCustomTypeOption, - parseIsolatedEntityName: () => parseIsolatedEntityName, - parseIsolatedJSDocComment: () => parseIsolatedJSDocComment, - parseJSDocTypeExpressionForTests: () => parseJSDocTypeExpressionForTests, - parseJsonConfigFileContent: () => parseJsonConfigFileContent, - parseJsonSourceFileConfigFileContent: () => parseJsonSourceFileConfigFileContent, - parseJsonText: () => parseJsonText, - parseListTypeOption: () => parseListTypeOption, - parseNodeFactory: () => parseNodeFactory, - parseNodeModuleFromPath: () => parseNodeModuleFromPath, - parsePackageName: () => parsePackageName, - parsePseudoBigInt: () => parsePseudoBigInt, - parseValidBigInt: () => parseValidBigInt, - patchWriteFileEnsuringDirectory: () => patchWriteFileEnsuringDirectory, - pathContainsNodeModules: () => pathContainsNodeModules, - pathIsAbsolute: () => pathIsAbsolute, - pathIsBareSpecifier: () => pathIsBareSpecifier, - pathIsRelative: () => pathIsRelative, - patternText: () => patternText, - perfLogger: () => perfLogger, - performIncrementalCompilation: () => performIncrementalCompilation, - performance: () => ts_performance_exports, - plainJSErrors: () => plainJSErrors, - positionBelongsToNode: () => positionBelongsToNode, - positionIsASICandidate: () => positionIsASICandidate, - positionIsSynthesized: () => positionIsSynthesized, - positionsAreOnSameLine: () => positionsAreOnSameLine, - preProcessFile: () => preProcessFile, - probablyUsesSemicolons: () => probablyUsesSemicolons, - processCommentPragmas: () => processCommentPragmas, - processPragmasIntoFields: () => processPragmasIntoFields, - processTaggedTemplateExpression: () => processTaggedTemplateExpression, - programContainsEsModules: () => programContainsEsModules, - programContainsModules: () => programContainsModules, - projectReferenceIsEqualTo: () => projectReferenceIsEqualTo, - propKeyHelper: () => propKeyHelper, - propertyNamePart: () => propertyNamePart, - pseudoBigIntToString: () => pseudoBigIntToString, - punctuationPart: () => punctuationPart, - pushIfUnique: () => pushIfUnique, - quote: () => quote, - quotePreferenceFromString: () => quotePreferenceFromString, - rangeContainsPosition: () => rangeContainsPosition, - rangeContainsPositionExclusive: () => rangeContainsPositionExclusive, - rangeContainsRange: () => rangeContainsRange, - rangeContainsRangeExclusive: () => rangeContainsRangeExclusive, - rangeContainsStartEnd: () => rangeContainsStartEnd, - rangeEndIsOnSameLineAsRangeStart: () => rangeEndIsOnSameLineAsRangeStart, - rangeEndPositionsAreOnSameLine: () => rangeEndPositionsAreOnSameLine, - rangeEquals: () => rangeEquals, - rangeIsOnSingleLine: () => rangeIsOnSingleLine, - rangeOfNode: () => rangeOfNode, - rangeOfTypeParameters: () => rangeOfTypeParameters, - rangeOverlapsWithStartEnd: () => rangeOverlapsWithStartEnd, - rangeStartIsOnSameLineAsRangeEnd: () => rangeStartIsOnSameLineAsRangeEnd, - rangeStartPositionsAreOnSameLine: () => rangeStartPositionsAreOnSameLine, - readBuilderProgram: () => readBuilderProgram, - readConfigFile: () => readConfigFile, - readHelper: () => readHelper, - readJson: () => readJson, - readJsonConfigFile: () => readJsonConfigFile, - readJsonOrUndefined: () => readJsonOrUndefined, - realizeDiagnostics: () => realizeDiagnostics, - reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange, - reduceEachTrailingCommentRange: () => reduceEachTrailingCommentRange, - reduceLeft: () => reduceLeft, - reduceLeftIterator: () => reduceLeftIterator, - reducePathComponents: () => reducePathComponents, - refactor: () => ts_refactor_exports, - regExpEscape: () => regExpEscape, - relativeComplement: () => relativeComplement, - removeAllComments: () => removeAllComments, - removeEmitHelper: () => removeEmitHelper, - removeExtension: () => removeExtension, - removeFileExtension: () => removeFileExtension, - removeIgnoredPath: () => removeIgnoredPath, - removeMinAndVersionNumbers: () => removeMinAndVersionNumbers, - removeOptionality: () => removeOptionality, - removePrefix: () => removePrefix, - removeSuffix: () => removeSuffix, - removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator, - repeatString: () => repeatString, - replaceElement: () => replaceElement, - resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson, - resolveConfigFileProjectName: () => resolveConfigFileProjectName, - resolveJSModule: () => resolveJSModule, - resolveLibrary: () => resolveLibrary, - resolveModuleName: () => resolveModuleName, - resolveModuleNameFromCache: () => resolveModuleNameFromCache, - resolvePackageNameToPackageJson: () => resolvePackageNameToPackageJson, - resolvePath: () => resolvePath, - resolveProjectReferencePath: () => resolveProjectReferencePath, - resolveTripleslashReference: () => resolveTripleslashReference, - resolveTypeReferenceDirective: () => resolveTypeReferenceDirective, - resolvingEmptyArray: () => resolvingEmptyArray, - restHelper: () => restHelper, - returnFalse: () => returnFalse, - returnNoopFileWatcher: () => returnNoopFileWatcher, - returnTrue: () => returnTrue, - returnUndefined: () => returnUndefined, - returnsPromise: () => returnsPromise, - runInitializersHelper: () => runInitializersHelper, - sameFlatMap: () => sameFlatMap, - sameMap: () => sameMap, - sameMapping: () => sameMapping, - scanShebangTrivia: () => scanShebangTrivia, - scanTokenAtPosition: () => scanTokenAtPosition, - scanner: () => scanner, - screenStartingMessageCodes: () => screenStartingMessageCodes, - semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations, - serializeCompilerOptions: () => serializeCompilerOptions, - server: () => ts_server_exports3, - servicesVersion: () => servicesVersion, - setCommentRange: () => setCommentRange, - setConfigFileInOptions: () => setConfigFileInOptions, - setConstantValue: () => setConstantValue, - setEachParent: () => setEachParent, - setEmitFlags: () => setEmitFlags, - setFunctionNameHelper: () => setFunctionNameHelper, - setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned, - setIdentifierAutoGenerate: () => setIdentifierAutoGenerate, - setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference, - setIdentifierTypeArguments: () => setIdentifierTypeArguments, - setInternalEmitFlags: () => setInternalEmitFlags, - setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages, - setModuleDefaultHelper: () => setModuleDefaultHelper, - setNodeFlags: () => setNodeFlags, - setObjectAllocator: () => setObjectAllocator, - setOriginalNode: () => setOriginalNode, - setParent: () => setParent, - setParentRecursive: () => setParentRecursive, - setPrivateIdentifier: () => setPrivateIdentifier, - setResolvedModule: () => setResolvedModule, - setResolvedTypeReferenceDirective: () => setResolvedTypeReferenceDirective, - setSnippetElement: () => setSnippetElement, - setSourceMapRange: () => setSourceMapRange, - setStackTraceLimit: () => setStackTraceLimit, - setStartsOnNewLine: () => setStartsOnNewLine, - setSyntheticLeadingComments: () => setSyntheticLeadingComments, - setSyntheticTrailingComments: () => setSyntheticTrailingComments, - setSys: () => setSys, - setSysLog: () => setSysLog, - setTextRange: () => setTextRange, - setTextRangeEnd: () => setTextRangeEnd, - setTextRangePos: () => setTextRangePos, - setTextRangePosEnd: () => setTextRangePosEnd, - setTextRangePosWidth: () => setTextRangePosWidth, - setTokenSourceMapRange: () => setTokenSourceMapRange, - setTypeNode: () => setTypeNode, - setUILocale: () => setUILocale, - setValueDeclaration: () => setValueDeclaration, - shouldAllowImportingTsExtension: () => shouldAllowImportingTsExtension, - shouldPreserveConstEnums: () => shouldPreserveConstEnums, - shouldResolveJsRequire: () => shouldResolveJsRequire, - shouldUseUriStyleNodeCoreModules: () => shouldUseUriStyleNodeCoreModules, - showModuleSpecifier: () => showModuleSpecifier, - signatureHasLiteralTypes: () => signatureHasLiteralTypes, - signatureHasRestParameter: () => signatureHasRestParameter, - signatureToDisplayParts: () => signatureToDisplayParts, - single: () => single, - singleElementArray: () => singleElementArray, - singleIterator: () => singleIterator, - singleOrMany: () => singleOrMany, - singleOrUndefined: () => singleOrUndefined, - skipAlias: () => skipAlias, - skipAssertions: () => skipAssertions, - skipConstraint: () => skipConstraint, - skipOuterExpressions: () => skipOuterExpressions, - skipParentheses: () => skipParentheses, - skipPartiallyEmittedExpressions: () => skipPartiallyEmittedExpressions, - skipTrivia: () => skipTrivia, - skipTypeChecking: () => skipTypeChecking, - skipTypeParentheses: () => skipTypeParentheses, - skipWhile: () => skipWhile, - sliceAfter: () => sliceAfter, - some: () => some, - sort: () => sort, - sortAndDeduplicate: () => sortAndDeduplicate, - sortAndDeduplicateDiagnostics: () => sortAndDeduplicateDiagnostics, - sourceFileAffectingCompilerOptions: () => sourceFileAffectingCompilerOptions, - sourceFileMayBeEmitted: () => sourceFileMayBeEmitted, - sourceMapCommentRegExp: () => sourceMapCommentRegExp, - sourceMapCommentRegExpDontCareLineStart: () => sourceMapCommentRegExpDontCareLineStart, - spacePart: () => spacePart, - spanMap: () => spanMap, - spreadArrayHelper: () => spreadArrayHelper, - stableSort: () => stableSort, - startEndContainsRange: () => startEndContainsRange, - startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd, - startOnNewLine: () => startOnNewLine, - startTracing: () => startTracing, - startsWith: () => startsWith, - startsWithDirectory: () => startsWithDirectory, - startsWithUnderscore: () => startsWithUnderscore, - startsWithUseStrict: () => startsWithUseStrict, - stringContains: () => stringContains, - stringContainsAt: () => stringContainsAt, - stringToToken: () => stringToToken, - stripQuotes: () => stripQuotes, - supportedDeclarationExtensions: () => supportedDeclarationExtensions, - supportedJSExtensions: () => supportedJSExtensions, - supportedJSExtensionsFlat: () => supportedJSExtensionsFlat, - supportedLocaleDirectories: () => supportedLocaleDirectories, - supportedTSExtensions: () => supportedTSExtensions, - supportedTSExtensionsFlat: () => supportedTSExtensionsFlat, - supportedTSImplementationExtensions: () => supportedTSImplementationExtensions, - suppressLeadingAndTrailingTrivia: () => suppressLeadingAndTrailingTrivia, - suppressLeadingTrivia: () => suppressLeadingTrivia, - suppressTrailingTrivia: () => suppressTrailingTrivia, - symbolEscapedNameNoDefault: () => symbolEscapedNameNoDefault, - symbolName: () => symbolName, - symbolNameNoDefault: () => symbolNameNoDefault, - symbolPart: () => symbolPart, - symbolToDisplayParts: () => symbolToDisplayParts, - syntaxMayBeASICandidate: () => syntaxMayBeASICandidate, - syntaxRequiresTrailingSemicolonOrASI: () => syntaxRequiresTrailingSemicolonOrASI, - sys: () => sys, - sysLog: () => sysLog, - tagNamesAreEquivalent: () => tagNamesAreEquivalent, - takeWhile: () => takeWhile, - targetOptionDeclaration: () => targetOptionDeclaration, - templateObjectHelper: () => templateObjectHelper, - testFormatSettings: () => testFormatSettings, - textChangeRangeIsUnchanged: () => textChangeRangeIsUnchanged, - textChangeRangeNewSpan: () => textChangeRangeNewSpan, - textChanges: () => ts_textChanges_exports, - textOrKeywordPart: () => textOrKeywordPart, - textPart: () => textPart, - textRangeContainsPositionInclusive: () => textRangeContainsPositionInclusive, - textSpanContainsPosition: () => textSpanContainsPosition, - textSpanContainsTextSpan: () => textSpanContainsTextSpan, - textSpanEnd: () => textSpanEnd, - textSpanIntersection: () => textSpanIntersection, - textSpanIntersectsWith: () => textSpanIntersectsWith, - textSpanIntersectsWithPosition: () => textSpanIntersectsWithPosition, - textSpanIntersectsWithTextSpan: () => textSpanIntersectsWithTextSpan, - textSpanIsEmpty: () => textSpanIsEmpty, - textSpanOverlap: () => textSpanOverlap, - textSpanOverlapsWith: () => textSpanOverlapsWith, - textSpansEqual: () => textSpansEqual, - textToKeywordObj: () => textToKeywordObj, - timestamp: () => timestamp, - toArray: () => toArray, - toBuilderFileEmit: () => toBuilderFileEmit, - toBuilderStateFileInfoForMultiEmit: () => toBuilderStateFileInfoForMultiEmit, - toEditorSettings: () => toEditorSettings, - toFileNameLowerCase: () => toFileNameLowerCase, - toLowerCase: () => toLowerCase, - toPath: () => toPath, - toProgramEmitPending: () => toProgramEmitPending, - tokenIsIdentifierOrKeyword: () => tokenIsIdentifierOrKeyword, - tokenIsIdentifierOrKeywordOrGreaterThan: () => tokenIsIdentifierOrKeywordOrGreaterThan, - tokenToString: () => tokenToString, - trace: () => trace, - tracing: () => tracing, - tracingEnabled: () => tracingEnabled, - transform: () => transform, - transformClassFields: () => transformClassFields, - transformDeclarations: () => transformDeclarations, - transformECMAScriptModule: () => transformECMAScriptModule, - transformES2015: () => transformES2015, - transformES2016: () => transformES2016, - transformES2017: () => transformES2017, - transformES2018: () => transformES2018, - transformES2019: () => transformES2019, - transformES2020: () => transformES2020, - transformES2021: () => transformES2021, - transformES5: () => transformES5, - transformESDecorators: () => transformESDecorators, - transformESNext: () => transformESNext, - transformGenerators: () => transformGenerators, - transformJsx: () => transformJsx, - transformLegacyDecorators: () => transformLegacyDecorators, - transformModule: () => transformModule, - transformNamedEvaluation: () => transformNamedEvaluation, - transformNodeModule: () => transformNodeModule, - transformNodes: () => transformNodes, - transformSystemModule: () => transformSystemModule, - transformTypeScript: () => transformTypeScript, - transpile: () => transpile, - transpileModule: () => transpileModule, - transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions, - trimString: () => trimString, - trimStringEnd: () => trimStringEnd, - trimStringStart: () => trimStringStart, - tryAddToSet: () => tryAddToSet, - tryAndIgnoreErrors: () => tryAndIgnoreErrors, - tryCast: () => tryCast, - tryDirectoryExists: () => tryDirectoryExists, - tryExtractTSExtension: () => tryExtractTSExtension, - tryFileExists: () => tryFileExists, - tryGetClassExtendingExpressionWithTypeArguments: () => tryGetClassExtendingExpressionWithTypeArguments, - tryGetClassImplementingOrExtendingExpressionWithTypeArguments: () => tryGetClassImplementingOrExtendingExpressionWithTypeArguments, - tryGetDirectories: () => tryGetDirectories, - tryGetExtensionFromPath: () => tryGetExtensionFromPath2, - tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier, - tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode, - tryGetModuleNameFromFile: () => tryGetModuleNameFromFile, - tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration, - tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks, - tryGetPropertyAccessOrIdentifierToString: () => tryGetPropertyAccessOrIdentifierToString, - tryGetPropertyNameOfBindingOrAssignmentElement: () => tryGetPropertyNameOfBindingOrAssignmentElement, - tryGetSourceMappingURL: () => tryGetSourceMappingURL, - tryGetTextOfPropertyName: () => tryGetTextOfPropertyName, - tryIOAndConsumeErrors: () => tryIOAndConsumeErrors, - tryParsePattern: () => tryParsePattern, - tryParsePatterns: () => tryParsePatterns, - tryParseRawSourceMap: () => tryParseRawSourceMap, - tryReadDirectory: () => tryReadDirectory, - tryReadFile: () => tryReadFile, - tryRemoveDirectoryPrefix: () => tryRemoveDirectoryPrefix, - tryRemoveExtension: () => tryRemoveExtension, - tryRemovePrefix: () => tryRemovePrefix, - tryRemoveSuffix: () => tryRemoveSuffix, - typeAcquisitionDeclarations: () => typeAcquisitionDeclarations, - typeAliasNamePart: () => typeAliasNamePart, - typeDirectiveIsEqualTo: () => typeDirectiveIsEqualTo, - typeKeywords: () => typeKeywords, - typeParameterNamePart: () => typeParameterNamePart, - typeReferenceResolutionNameAndModeGetter: () => typeReferenceResolutionNameAndModeGetter, - typeToDisplayParts: () => typeToDisplayParts, - unchangedPollThresholds: () => unchangedPollThresholds, - unchangedTextChangeRange: () => unchangedTextChangeRange, - unescapeLeadingUnderscores: () => unescapeLeadingUnderscores, - unmangleScopedPackageName: () => unmangleScopedPackageName, - unorderedRemoveItem: () => unorderedRemoveItem, - unorderedRemoveItemAt: () => unorderedRemoveItemAt, - unreachableCodeIsError: () => unreachableCodeIsError, - unusedLabelIsError: () => unusedLabelIsError, - unwrapInnermostStatementOfLabel: () => unwrapInnermostStatementOfLabel, - updateErrorForNoInputFiles: () => updateErrorForNoInputFiles, - updateLanguageServiceSourceFile: () => updateLanguageServiceSourceFile, - updateMissingFilePathsWatch: () => updateMissingFilePathsWatch, - updatePackageJsonWatch: () => updatePackageJsonWatch, - updateResolutionField: () => updateResolutionField, - updateSharedExtendedConfigFileWatcher: () => updateSharedExtendedConfigFileWatcher, - updateSourceFile: () => updateSourceFile, - updateWatchingWildcardDirectories: () => updateWatchingWildcardDirectories, - usesExtensionsOnImports: () => usesExtensionsOnImports, - usingSingleLineStringWriter: () => usingSingleLineStringWriter, - utf16EncodeAsString: () => utf16EncodeAsString, - validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage, - valuesHelper: () => valuesHelper, - version: () => version, - versionMajorMinor: () => versionMajorMinor, - visitArray: () => visitArray, - visitCommaListElements: () => visitCommaListElements, - visitEachChild: () => visitEachChild, - visitFunctionBody: () => visitFunctionBody, - visitIterationBody: () => visitIterationBody, - visitLexicalEnvironment: () => visitLexicalEnvironment, - visitNode: () => visitNode, - visitNodes: () => visitNodes2, - visitParameterList: () => visitParameterList, - walkUpBindingElementsAndPatterns: () => walkUpBindingElementsAndPatterns, - walkUpLexicalEnvironments: () => walkUpLexicalEnvironments, - walkUpOuterExpressions: () => walkUpOuterExpressions, - walkUpParenthesizedExpressions: () => walkUpParenthesizedExpressions, - walkUpParenthesizedTypes: () => walkUpParenthesizedTypes, - walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild, - whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp, - writeCommentRange: () => writeCommentRange, - writeFile: () => writeFile, - writeFileEnsuringDirectories: () => writeFileEnsuringDirectories, - zipToModeAwareCache: () => zipToModeAwareCache, - zipWith: () => zipWith - }); - var init_ts7 = __esm({ - "src/server/_namespaces/ts.ts"() { - "use strict"; - init_ts2(); - init_ts3(); - init_ts4(); - init_ts5(); - init_ts_server3(); - } - }); - - // src/tsserverlibrary/_namespaces/ts.server.ts - var ts_server_exports4 = {}; - __export(ts_server_exports4, { - ActionInvalidate: () => ActionInvalidate, - ActionPackageInstalled: () => ActionPackageInstalled, - ActionSet: () => ActionSet, - ActionWatchTypingLocations: () => ActionWatchTypingLocations, - Arguments: () => Arguments, - AutoImportProviderProject: () => AutoImportProviderProject, - AuxiliaryProject: () => AuxiliaryProject, - CharRangeSection: () => CharRangeSection, - CommandNames: () => CommandNames, - ConfigFileDiagEvent: () => ConfigFileDiagEvent, - ConfiguredProject: () => ConfiguredProject2, - Errors: () => Errors, - EventBeginInstallTypes: () => EventBeginInstallTypes, - EventEndInstallTypes: () => EventEndInstallTypes, - EventInitializationFailed: () => EventInitializationFailed, - EventTypesRegistry: () => EventTypesRegistry, - ExternalProject: () => ExternalProject2, - GcTimer: () => GcTimer, - InferredProject: () => InferredProject2, - LargeFileReferencedEvent: () => LargeFileReferencedEvent, - LineIndex: () => LineIndex, - LineLeaf: () => LineLeaf, - LineNode: () => LineNode, - LogLevel: () => LogLevel2, - Msg: () => Msg, - OpenFileInfoTelemetryEvent: () => OpenFileInfoTelemetryEvent, - Project: () => Project3, - ProjectInfoTelemetryEvent: () => ProjectInfoTelemetryEvent, - ProjectKind: () => ProjectKind, - ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent, - ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent, - ProjectLoadingStartEvent: () => ProjectLoadingStartEvent, - ProjectReferenceProjectLoadKind: () => ProjectReferenceProjectLoadKind, - ProjectService: () => ProjectService3, - ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent, - ScriptInfo: () => ScriptInfo, - ScriptVersionCache: () => ScriptVersionCache, - Session: () => Session3, - TextStorage: () => TextStorage, - ThrottledOperations: () => ThrottledOperations, - TypingsCache: () => TypingsCache, - allFilesAreJsOrDts: () => allFilesAreJsOrDts, - allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts, - asNormalizedPath: () => asNormalizedPath, - convertCompilerOptions: () => convertCompilerOptions, - convertFormatOptions: () => convertFormatOptions, - convertScriptKindName: () => convertScriptKindName, - convertTypeAcquisition: () => convertTypeAcquisition, - convertUserPreferences: () => convertUserPreferences, - convertWatchOptions: () => convertWatchOptions, - countEachFileTypes: () => countEachFileTypes, - createInstallTypingsRequest: () => createInstallTypingsRequest, - createModuleSpecifierCache: () => createModuleSpecifierCache, - createNormalizedPathMap: () => createNormalizedPathMap, - createPackageJsonCache: () => createPackageJsonCache, - createSortedArray: () => createSortedArray2, - emptyArray: () => emptyArray2, - findArgument: () => findArgument, - forEachResolvedProjectReferenceProject: () => forEachResolvedProjectReferenceProject, - formatDiagnosticToProtocol: () => formatDiagnosticToProtocol, - formatMessage: () => formatMessage2, - getBaseConfigFileName: () => getBaseConfigFileName, - getLocationInNewDocument: () => getLocationInNewDocument, - hasArgument: () => hasArgument, - hasNoTypeScriptSource: () => hasNoTypeScriptSource, - indent: () => indent2, - isConfigFile: () => isConfigFile, - isConfiguredProject: () => isConfiguredProject, - isDynamicFileName: () => isDynamicFileName, - isExternalProject: () => isExternalProject, - isInferredProject: () => isInferredProject, - isInferredProjectName: () => isInferredProjectName, - makeAutoImportProviderProjectName: () => makeAutoImportProviderProjectName, - makeAuxiliaryProjectName: () => makeAuxiliaryProjectName, - makeInferredProjectName: () => makeInferredProjectName, - maxFileSize: () => maxFileSize, - maxProgramSizeForNonTsFiles: () => maxProgramSizeForNonTsFiles, - normalizedPathToPath: () => normalizedPathToPath, - nowString: () => nowString, - nullCancellationToken: () => nullCancellationToken, - nullTypingsInstaller: () => nullTypingsInstaller, - projectContainsInfoDirectly: () => projectContainsInfoDirectly, - protocol: () => ts_server_protocol_exports, - removeSorted: () => removeSorted, - stringifyIndented: () => stringifyIndented, - toEvent: () => toEvent, - toNormalizedPath: () => toNormalizedPath, - tryConvertScriptKindName: () => tryConvertScriptKindName, - typingsInstaller: () => ts_server_typingsInstaller_exports, - updateProjectIfDirty: () => updateProjectIfDirty - }); - var init_ts_server4 = __esm({ - "src/tsserverlibrary/_namespaces/ts.server.ts"() { - "use strict"; - init_ts_server(); - init_ts_server3(); - } - }); - - // src/tsserverlibrary/_namespaces/ts.ts - var ts_exports3 = {}; - __export(ts_exports3, { - ANONYMOUS: () => ANONYMOUS, - AccessFlags: () => AccessFlags, - AssertionLevel: () => AssertionLevel, - AssignmentDeclarationKind: () => AssignmentDeclarationKind, - AssignmentKind: () => AssignmentKind, - Associativity: () => Associativity, - BreakpointResolver: () => ts_BreakpointResolver_exports, - BuilderFileEmit: () => BuilderFileEmit, - BuilderProgramKind: () => BuilderProgramKind, - BuilderState: () => BuilderState, - BundleFileSectionKind: () => BundleFileSectionKind, - CallHierarchy: () => ts_CallHierarchy_exports, - CharacterCodes: () => CharacterCodes, - CheckFlags: () => CheckFlags, - CheckMode: () => CheckMode, - ClassificationType: () => ClassificationType, - ClassificationTypeNames: () => ClassificationTypeNames, - CommentDirectiveType: () => CommentDirectiveType, - Comparison: () => Comparison, - CompletionInfoFlags: () => CompletionInfoFlags, - CompletionTriggerKind: () => CompletionTriggerKind, - Completions: () => ts_Completions_exports, - ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, - ContainerFlags: () => ContainerFlags, - ContextFlags: () => ContextFlags, - CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, - Debug: () => Debug, - DiagnosticCategory: () => DiagnosticCategory, - Diagnostics: () => Diagnostics, - DocumentHighlights: () => DocumentHighlights, - ElementFlags: () => ElementFlags, - EmitFlags: () => EmitFlags, - EmitHint: () => EmitHint, - EmitOnly: () => EmitOnly, - EndOfLineState: () => EndOfLineState, - EnumKind: () => EnumKind, - ExitStatus: () => ExitStatus, - ExportKind: () => ExportKind, - Extension: () => Extension, - ExternalEmitHelpers: () => ExternalEmitHelpers, - FileIncludeKind: () => FileIncludeKind, - FilePreprocessingDiagnosticsKind: () => FilePreprocessingDiagnosticsKind, - FileSystemEntryKind: () => FileSystemEntryKind, - FileWatcherEventKind: () => FileWatcherEventKind, - FindAllReferences: () => ts_FindAllReferences_exports, - FlattenLevel: () => FlattenLevel, - FlowFlags: () => FlowFlags, - ForegroundColorEscapeSequences: () => ForegroundColorEscapeSequences, - FunctionFlags: () => FunctionFlags, - GeneratedIdentifierFlags: () => GeneratedIdentifierFlags, - GetLiteralTextFlags: () => GetLiteralTextFlags, - GoToDefinition: () => ts_GoToDefinition_exports, - HighlightSpanKind: () => HighlightSpanKind, - IdentifierNameMap: () => IdentifierNameMap, - IdentifierNameMultiMap: () => IdentifierNameMultiMap, - ImportKind: () => ImportKind, - ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, - IndentStyle: () => IndentStyle, - IndexFlags: () => IndexFlags, - IndexKind: () => IndexKind, - InferenceFlags: () => InferenceFlags, - InferencePriority: () => InferencePriority, - InlayHintKind: () => InlayHintKind, - InlayHints: () => ts_InlayHints_exports, - InternalEmitFlags: () => InternalEmitFlags, - InternalSymbolName: () => InternalSymbolName, - InvalidatedProjectKind: () => InvalidatedProjectKind, - JsDoc: () => ts_JsDoc_exports, - JsTyping: () => ts_JsTyping_exports, - JsxEmit: () => JsxEmit, - JsxFlags: () => JsxFlags, - JsxReferenceKind: () => JsxReferenceKind, - LanguageServiceMode: () => LanguageServiceMode, - LanguageServiceShimHostAdapter: () => LanguageServiceShimHostAdapter, - LanguageVariant: () => LanguageVariant, - LexicalEnvironmentFlags: () => LexicalEnvironmentFlags, - ListFormat: () => ListFormat, - LogLevel: () => LogLevel, - MemberOverrideStatus: () => MemberOverrideStatus, - ModifierFlags: () => ModifierFlags, - ModuleDetectionKind: () => ModuleDetectionKind, - ModuleInstanceState: () => ModuleInstanceState, - ModuleKind: () => ModuleKind, - ModuleResolutionKind: () => ModuleResolutionKind, - ModuleSpecifierEnding: () => ModuleSpecifierEnding, - NavigateTo: () => ts_NavigateTo_exports, - NavigationBar: () => ts_NavigationBar_exports, - NewLineKind: () => NewLineKind, - NodeBuilderFlags: () => NodeBuilderFlags, - NodeCheckFlags: () => NodeCheckFlags, - NodeFactoryFlags: () => NodeFactoryFlags, - NodeFlags: () => NodeFlags, - NodeResolutionFeatures: () => NodeResolutionFeatures, - ObjectFlags: () => ObjectFlags, - OperationCanceledException: () => OperationCanceledException, - OperatorPrecedence: () => OperatorPrecedence, - OrganizeImports: () => ts_OrganizeImports_exports, - OrganizeImportsMode: () => OrganizeImportsMode, - OuterExpressionKinds: () => OuterExpressionKinds, - OutliningElementsCollector: () => ts_OutliningElementsCollector_exports, - OutliningSpanKind: () => OutliningSpanKind, - OutputFileType: () => OutputFileType, - PackageJsonAutoImportPreference: () => PackageJsonAutoImportPreference, - PackageJsonDependencyGroup: () => PackageJsonDependencyGroup, - PatternMatchKind: () => PatternMatchKind, - PollingInterval: () => PollingInterval, - PollingWatchKind: () => PollingWatchKind, - PragmaKindFlags: () => PragmaKindFlags, - PrivateIdentifierKind: () => PrivateIdentifierKind, - ProcessLevel: () => ProcessLevel, - QuotePreference: () => QuotePreference, - RelationComparisonResult: () => RelationComparisonResult, - Rename: () => ts_Rename_exports, - ScriptElementKind: () => ScriptElementKind, - ScriptElementKindModifier: () => ScriptElementKindModifier, - ScriptKind: () => ScriptKind, - ScriptSnapshot: () => ScriptSnapshot, - ScriptTarget: () => ScriptTarget, - SemanticClassificationFormat: () => SemanticClassificationFormat, - SemanticMeaning: () => SemanticMeaning, - SemicolonPreference: () => SemicolonPreference, - SignatureCheckMode: () => SignatureCheckMode, - SignatureFlags: () => SignatureFlags, - SignatureHelp: () => ts_SignatureHelp_exports, - SignatureKind: () => SignatureKind, - SmartSelectionRange: () => ts_SmartSelectionRange_exports, - SnippetKind: () => SnippetKind, - SortKind: () => SortKind, - StructureIsReused: () => StructureIsReused, - SymbolAccessibility: () => SymbolAccessibility, - SymbolDisplay: () => ts_SymbolDisplay_exports, - SymbolDisplayPartKind: () => SymbolDisplayPartKind, - SymbolFlags: () => SymbolFlags, - SymbolFormatFlags: () => SymbolFormatFlags, - SyntaxKind: () => SyntaxKind, - SyntheticSymbolKind: () => SyntheticSymbolKind, - Ternary: () => Ternary, - ThrottledCancellationToken: () => ThrottledCancellationToken, - TokenClass: () => TokenClass, - TokenFlags: () => TokenFlags, - TransformFlags: () => TransformFlags, - TypeFacts: () => TypeFacts, - TypeFlags: () => TypeFlags, - TypeFormatFlags: () => TypeFormatFlags, - TypeMapKind: () => TypeMapKind, - TypePredicateKind: () => TypePredicateKind, - TypeReferenceSerializationKind: () => TypeReferenceSerializationKind, - TypeScriptServicesFactory: () => TypeScriptServicesFactory, - UnionReduction: () => UnionReduction, - UpToDateStatusType: () => UpToDateStatusType, - VarianceFlags: () => VarianceFlags, - Version: () => Version, - VersionRange: () => VersionRange, - WatchDirectoryFlags: () => WatchDirectoryFlags, - WatchDirectoryKind: () => WatchDirectoryKind, - WatchFileKind: () => WatchFileKind, - WatchLogLevel: () => WatchLogLevel, - WatchType: () => WatchType, - accessPrivateIdentifier: () => accessPrivateIdentifier, - addDisposableResourceHelper: () => addDisposableResourceHelper, - addEmitFlags: () => addEmitFlags, - addEmitHelper: () => addEmitHelper, - addEmitHelpers: () => addEmitHelpers, - addInternalEmitFlags: () => addInternalEmitFlags, - addNodeFactoryPatcher: () => addNodeFactoryPatcher, - addObjectAllocatorPatcher: () => addObjectAllocatorPatcher, - addRange: () => addRange, - addRelatedInfo: () => addRelatedInfo, - addSyntheticLeadingComment: () => addSyntheticLeadingComment, - addSyntheticTrailingComment: () => addSyntheticTrailingComment, - addToSeen: () => addToSeen, - advancedAsyncSuperHelper: () => advancedAsyncSuperHelper, - affectsDeclarationPathOptionDeclarations: () => affectsDeclarationPathOptionDeclarations, - affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations, - allKeysStartWithDot: () => allKeysStartWithDot, - altDirectorySeparator: () => altDirectorySeparator, - and: () => and, - append: () => append, - appendIfUnique: () => appendIfUnique, - arrayFrom: () => arrayFrom, - arrayIsEqualTo: () => arrayIsEqualTo, - arrayIsHomogeneous: () => arrayIsHomogeneous, - arrayIsSorted: () => arrayIsSorted, - arrayOf: () => arrayOf, - arrayReverseIterator: () => arrayReverseIterator, - arrayToMap: () => arrayToMap, - arrayToMultiMap: () => arrayToMultiMap, - arrayToNumericMap: () => arrayToNumericMap, - arraysEqual: () => arraysEqual, - assertType: () => assertType, - assign: () => assign, - assignHelper: () => assignHelper, - asyncDelegator: () => asyncDelegator, - asyncGeneratorHelper: () => asyncGeneratorHelper, - asyncSuperHelper: () => asyncSuperHelper, - asyncValues: () => asyncValues, - attachFileToDiagnostics: () => attachFileToDiagnostics, - awaitHelper: () => awaitHelper, - awaiterHelper: () => awaiterHelper, - base64decode: () => base64decode, - base64encode: () => base64encode, - binarySearch: () => binarySearch, - binarySearchKey: () => binarySearchKey, - bindSourceFile: () => bindSourceFile, - breakIntoCharacterSpans: () => breakIntoCharacterSpans, - breakIntoWordSpans: () => breakIntoWordSpans, - buildLinkParts: () => buildLinkParts, - buildOpts: () => buildOpts, - buildOverload: () => buildOverload, - bundlerModuleNameResolver: () => bundlerModuleNameResolver, - canBeConvertedToAsync: () => canBeConvertedToAsync, - canHaveDecorators: () => canHaveDecorators, - canHaveExportModifier: () => canHaveExportModifier, - canHaveFlowNode: () => canHaveFlowNode, - canHaveIllegalDecorators: () => canHaveIllegalDecorators, - canHaveIllegalModifiers: () => canHaveIllegalModifiers, - canHaveIllegalType: () => canHaveIllegalType, - canHaveIllegalTypeParameters: () => canHaveIllegalTypeParameters, - canHaveJSDoc: () => canHaveJSDoc, - canHaveLocals: () => canHaveLocals, - canHaveModifiers: () => canHaveModifiers, - canHaveSymbol: () => canHaveSymbol, - canJsonReportNoInputFiles: () => canJsonReportNoInputFiles, - canProduceDiagnostics: () => canProduceDiagnostics, - canUsePropertyAccess: () => canUsePropertyAccess, - canWatchAffectingLocation: () => canWatchAffectingLocation, - canWatchAtTypes: () => canWatchAtTypes, - canWatchDirectoryOrFile: () => canWatchDirectoryOrFile, - cartesianProduct: () => cartesianProduct, - cast: () => cast, - chainBundle: () => chainBundle, - chainDiagnosticMessages: () => chainDiagnosticMessages, - changeAnyExtension: () => changeAnyExtension, - changeCompilerHostLikeToUseCache: () => changeCompilerHostLikeToUseCache, - changeExtension: () => changeExtension, - changesAffectModuleResolution: () => changesAffectModuleResolution, - changesAffectingProgramStructure: () => changesAffectingProgramStructure, - childIsDecorated: () => childIsDecorated, - classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, - classHasClassThisAssignment: () => classHasClassThisAssignment, - classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, - classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, - classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, - classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, - classPrivateFieldInHelper: () => classPrivateFieldInHelper, - classPrivateFieldSetHelper: () => classPrivateFieldSetHelper, - classicNameResolver: () => classicNameResolver, - classifier: () => ts_classifier_exports, - cleanExtendedConfigCache: () => cleanExtendedConfigCache, - clear: () => clear, - clearMap: () => clearMap, - clearSharedExtendedConfigFileWatcher: () => clearSharedExtendedConfigFileWatcher, - climbPastPropertyAccess: () => climbPastPropertyAccess, - climbPastPropertyOrElementAccess: () => climbPastPropertyOrElementAccess, - clone: () => clone, - cloneCompilerOptions: () => cloneCompilerOptions, - closeFileWatcher: () => closeFileWatcher, - closeFileWatcherOf: () => closeFileWatcherOf, - codefix: () => ts_codefix_exports, - collapseTextChangeRangesAcrossMultipleVersions: () => collapseTextChangeRangesAcrossMultipleVersions, - collectExternalModuleInfo: () => collectExternalModuleInfo, - combine: () => combine, - combinePaths: () => combinePaths, - commentPragmas: () => commentPragmas, - commonOptionsWithBuild: () => commonOptionsWithBuild, - commonPackageFolders: () => commonPackageFolders, - compact: () => compact, - compareBooleans: () => compareBooleans, - compareDataObjects: () => compareDataObjects, - compareDiagnostics: () => compareDiagnostics, - compareDiagnosticsSkipRelatedInformation: () => compareDiagnosticsSkipRelatedInformation, - compareEmitHelpers: () => compareEmitHelpers, - compareNumberOfDirectorySeparators: () => compareNumberOfDirectorySeparators, - comparePaths: () => comparePaths, - comparePathsCaseInsensitive: () => comparePathsCaseInsensitive, - comparePathsCaseSensitive: () => comparePathsCaseSensitive, - comparePatternKeys: () => comparePatternKeys, - compareProperties: () => compareProperties, - compareStringsCaseInsensitive: () => compareStringsCaseInsensitive, - compareStringsCaseInsensitiveEslintCompatible: () => compareStringsCaseInsensitiveEslintCompatible, - compareStringsCaseSensitive: () => compareStringsCaseSensitive, - compareStringsCaseSensitiveUI: () => compareStringsCaseSensitiveUI, - compareTextSpans: () => compareTextSpans, - compareValues: () => compareValues, - compileOnSaveCommandLineOption: () => compileOnSaveCommandLineOption, - compilerOptionsAffectDeclarationPath: () => compilerOptionsAffectDeclarationPath, - compilerOptionsAffectEmit: () => compilerOptionsAffectEmit, - compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics, - compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics, - compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules, - compose: () => compose, - computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames, - computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition, - computeLineOfPosition: () => computeLineOfPosition, - computeLineStarts: () => computeLineStarts, - computePositionOfLineAndCharacter: () => computePositionOfLineAndCharacter, - computeSignature: () => computeSignature, - computeSignatureWithDiagnostics: () => computeSignatureWithDiagnostics, - computeSuggestionDiagnostics: () => computeSuggestionDiagnostics, - concatenate: () => concatenate, - concatenateDiagnosticMessageChains: () => concatenateDiagnosticMessageChains, - consumesNodeCoreModules: () => consumesNodeCoreModules, - contains: () => contains, - containsIgnoredPath: () => containsIgnoredPath, - containsObjectRestOrSpread: () => containsObjectRestOrSpread, - containsParseError: () => containsParseError, - containsPath: () => containsPath, - convertCompilerOptionsForTelemetry: () => convertCompilerOptionsForTelemetry, - convertCompilerOptionsFromJson: () => convertCompilerOptionsFromJson, - convertJsonOption: () => convertJsonOption, - convertToBase64: () => convertToBase64, - convertToJson: () => convertToJson, - convertToObject: () => convertToObject, - convertToOptionsWithAbsolutePaths: () => convertToOptionsWithAbsolutePaths, - convertToRelativePath: () => convertToRelativePath, - convertToTSConfig: () => convertToTSConfig, - convertTypeAcquisitionFromJson: () => convertTypeAcquisitionFromJson, - copyComments: () => copyComments, - copyEntries: () => copyEntries, - copyLeadingComments: () => copyLeadingComments, - copyProperties: () => copyProperties, - copyTrailingAsLeadingComments: () => copyTrailingAsLeadingComments, - copyTrailingComments: () => copyTrailingComments, - couldStartTrivia: () => couldStartTrivia, - countWhere: () => countWhere, - createAbstractBuilder: () => createAbstractBuilder, - createAccessorPropertyBackingField: () => createAccessorPropertyBackingField, - createAccessorPropertyGetRedirector: () => createAccessorPropertyGetRedirector, - createAccessorPropertySetRedirector: () => createAccessorPropertySetRedirector, - createBaseNodeFactory: () => createBaseNodeFactory, - createBinaryExpressionTrampoline: () => createBinaryExpressionTrampoline, - createBindingHelper: () => createBindingHelper, - createBuildInfo: () => createBuildInfo, - createBuilderProgram: () => createBuilderProgram, - createBuilderProgramUsingProgramBuildInfo: () => createBuilderProgramUsingProgramBuildInfo, - createBuilderStatusReporter: () => createBuilderStatusReporter, - createCacheWithRedirects: () => createCacheWithRedirects, - createCacheableExportInfoMap: () => createCacheableExportInfoMap, - createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, - createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, - createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, - createClassifier: () => createClassifier, - createCommentDirectivesMap: () => createCommentDirectivesMap, - createCompilerDiagnostic: () => createCompilerDiagnostic, - createCompilerDiagnosticForInvalidCustomType: () => createCompilerDiagnosticForInvalidCustomType, - createCompilerDiagnosticFromMessageChain: () => createCompilerDiagnosticFromMessageChain, - createCompilerHost: () => createCompilerHost, - createCompilerHostFromProgramHost: () => createCompilerHostFromProgramHost, - createCompilerHostWorker: () => createCompilerHostWorker, - createDetachedDiagnostic: () => createDetachedDiagnostic, - createDiagnosticCollection: () => createDiagnosticCollection, - createDiagnosticForFileFromMessageChain: () => createDiagnosticForFileFromMessageChain, - createDiagnosticForNode: () => createDiagnosticForNode, - createDiagnosticForNodeArray: () => createDiagnosticForNodeArray, - createDiagnosticForNodeArrayFromMessageChain: () => createDiagnosticForNodeArrayFromMessageChain, - createDiagnosticForNodeFromMessageChain: () => createDiagnosticForNodeFromMessageChain, - createDiagnosticForNodeInSourceFile: () => createDiagnosticForNodeInSourceFile, - createDiagnosticForRange: () => createDiagnosticForRange, - createDiagnosticMessageChainFromDiagnostic: () => createDiagnosticMessageChainFromDiagnostic, - createDiagnosticReporter: () => createDiagnosticReporter, - createDocumentPositionMapper: () => createDocumentPositionMapper, - createDocumentRegistry: () => createDocumentRegistry, - createDocumentRegistryInternal: () => createDocumentRegistryInternal, - createEmitAndSemanticDiagnosticsBuilderProgram: () => createEmitAndSemanticDiagnosticsBuilderProgram, - createEmitHelperFactory: () => createEmitHelperFactory, - createEmptyExports: () => createEmptyExports, - createExpressionForJsxElement: () => createExpressionForJsxElement, - createExpressionForJsxFragment: () => createExpressionForJsxFragment, - createExpressionForObjectLiteralElementLike: () => createExpressionForObjectLiteralElementLike, - createExpressionForPropertyName: () => createExpressionForPropertyName, - createExpressionFromEntityName: () => createExpressionFromEntityName, - createExternalHelpersImportDeclarationIfNeeded: () => createExternalHelpersImportDeclarationIfNeeded, - createFileDiagnostic: () => createFileDiagnostic, - createFileDiagnosticFromMessageChain: () => createFileDiagnosticFromMessageChain, - createForOfBindingStatement: () => createForOfBindingStatement, - createGetCanonicalFileName: () => createGetCanonicalFileName, - createGetSourceFile: () => createGetSourceFile, - createGetSymbolAccessibilityDiagnosticForNode: () => createGetSymbolAccessibilityDiagnosticForNode, - createGetSymbolAccessibilityDiagnosticForNodeName: () => createGetSymbolAccessibilityDiagnosticForNodeName, - createGetSymbolWalker: () => createGetSymbolWalker, - createIncrementalCompilerHost: () => createIncrementalCompilerHost, - createIncrementalProgram: () => createIncrementalProgram, - createInputFiles: () => createInputFiles, - createInputFilesWithFilePaths: () => createInputFilesWithFilePaths, - createInputFilesWithFileTexts: () => createInputFilesWithFileTexts, - createJsxFactoryExpression: () => createJsxFactoryExpression, - createLanguageService: () => createLanguageService, - createLanguageServiceSourceFile: () => createLanguageServiceSourceFile, - createMemberAccessForPropertyName: () => createMemberAccessForPropertyName, - createModeAwareCache: () => createModeAwareCache, - createModeAwareCacheKey: () => createModeAwareCacheKey, - createModuleNotFoundChain: () => createModuleNotFoundChain, - createModuleResolutionCache: () => createModuleResolutionCache, - createModuleResolutionLoader: () => createModuleResolutionLoader, - createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost, - createMultiMap: () => createMultiMap, - createNodeConverters: () => createNodeConverters, - createNodeFactory: () => createNodeFactory, - createOptionNameMap: () => createOptionNameMap, - createOverload: () => createOverload, - createPackageJsonImportFilter: () => createPackageJsonImportFilter, - createPackageJsonInfo: () => createPackageJsonInfo, - createParenthesizerRules: () => createParenthesizerRules, - createPatternMatcher: () => createPatternMatcher, - createPrependNodes: () => createPrependNodes, - createPrinter: () => createPrinter, - createPrinterWithDefaults: () => createPrinterWithDefaults, - createPrinterWithRemoveComments: () => createPrinterWithRemoveComments, - createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape, - createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon, - createProgram: () => createProgram, - createProgramHost: () => createProgramHost, - createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral, - createQueue: () => createQueue, - createRange: () => createRange, - createRedirectedBuilderProgram: () => createRedirectedBuilderProgram, - createResolutionCache: () => createResolutionCache, - createRuntimeTypeSerializer: () => createRuntimeTypeSerializer, - createScanner: () => createScanner, - createSemanticDiagnosticsBuilderProgram: () => createSemanticDiagnosticsBuilderProgram, - createSet: () => createSet, - createSolutionBuilder: () => createSolutionBuilder, - createSolutionBuilderHost: () => createSolutionBuilderHost, - createSolutionBuilderWithWatch: () => createSolutionBuilderWithWatch, - createSolutionBuilderWithWatchHost: () => createSolutionBuilderWithWatchHost, - createSortedArray: () => createSortedArray, - createSourceFile: () => createSourceFile, - createSourceMapGenerator: () => createSourceMapGenerator, - createSourceMapSource: () => createSourceMapSource, - createSuperAccessVariableStatement: () => createSuperAccessVariableStatement, - createSymbolTable: () => createSymbolTable, - createSymlinkCache: () => createSymlinkCache, - createSystemWatchFunctions: () => createSystemWatchFunctions, - createTextChange: () => createTextChange, - createTextChangeFromStartLength: () => createTextChangeFromStartLength, - createTextChangeRange: () => createTextChangeRange, - createTextRangeFromNode: () => createTextRangeFromNode, - createTextRangeFromSpan: () => createTextRangeFromSpan, - createTextSpan: () => createTextSpan, - createTextSpanFromBounds: () => createTextSpanFromBounds, - createTextSpanFromNode: () => createTextSpanFromNode, - createTextSpanFromRange: () => createTextSpanFromRange, - createTextSpanFromStringLiteralLikeContent: () => createTextSpanFromStringLiteralLikeContent, - createTextWriter: () => createTextWriter, - createTokenRange: () => createTokenRange, - createTypeChecker: () => createTypeChecker, - createTypeReferenceDirectiveResolutionCache: () => createTypeReferenceDirectiveResolutionCache, - createTypeReferenceResolutionLoader: () => createTypeReferenceResolutionLoader, - createUnparsedSourceFile: () => createUnparsedSourceFile, - createWatchCompilerHost: () => createWatchCompilerHost2, - createWatchCompilerHostOfConfigFile: () => createWatchCompilerHostOfConfigFile, - createWatchCompilerHostOfFilesAndCompilerOptions: () => createWatchCompilerHostOfFilesAndCompilerOptions, - createWatchFactory: () => createWatchFactory, - createWatchHost: () => createWatchHost, - createWatchProgram: () => createWatchProgram, - createWatchStatusReporter: () => createWatchStatusReporter, - createWriteFileMeasuringIO: () => createWriteFileMeasuringIO, - declarationNameToString: () => declarationNameToString, - decodeMappings: () => decodeMappings, - decodedTextSpanIntersectsWith: () => decodedTextSpanIntersectsWith, - decorateHelper: () => decorateHelper, - deduplicate: () => deduplicate, - defaultIncludeSpec: () => defaultIncludeSpec, - defaultInitCompilerOptions: () => defaultInitCompilerOptions, - defaultMaximumTruncationLength: () => defaultMaximumTruncationLength, - detectSortCaseSensitivity: () => detectSortCaseSensitivity, - diagnosticCategoryName: () => diagnosticCategoryName, - diagnosticToString: () => diagnosticToString, - directoryProbablyExists: () => directoryProbablyExists, - directorySeparator: () => directorySeparator, - displayPart: () => displayPart, - displayPartsToString: () => displayPartsToString, - disposeEmitNodes: () => disposeEmitNodes, - disposeResourcesHelper: () => disposeResourcesHelper, - documentSpansEqual: () => documentSpansEqual, - dumpTracingLegend: () => dumpTracingLegend, - elementAt: () => elementAt, - elideNodes: () => elideNodes, - emitComments: () => emitComments, - emitDetachedComments: () => emitDetachedComments, - emitFiles: () => emitFiles, - emitFilesAndReportErrors: () => emitFilesAndReportErrors, - emitFilesAndReportErrorsAndGetExitStatus: () => emitFilesAndReportErrorsAndGetExitStatus, - emitModuleKindIsNonNodeESM: () => emitModuleKindIsNonNodeESM, - emitNewLineBeforeLeadingCommentOfPosition: () => emitNewLineBeforeLeadingCommentOfPosition, - emitNewLineBeforeLeadingComments: () => emitNewLineBeforeLeadingComments, - emitNewLineBeforeLeadingCommentsOfPosition: () => emitNewLineBeforeLeadingCommentsOfPosition, - emitSkippedWithNoDiagnostics: () => emitSkippedWithNoDiagnostics, - emitUsingBuildInfo: () => emitUsingBuildInfo, - emptyArray: () => emptyArray, - emptyFileSystemEntries: () => emptyFileSystemEntries, - emptyMap: () => emptyMap, - emptyOptions: () => emptyOptions, - emptySet: () => emptySet, - endsWith: () => endsWith, - ensurePathIsNonModuleName: () => ensurePathIsNonModuleName, - ensureScriptKind: () => ensureScriptKind, - ensureTrailingDirectorySeparator: () => ensureTrailingDirectorySeparator, - entityNameToString: () => entityNameToString, - enumerateInsertsAndDeletes: () => enumerateInsertsAndDeletes, - equalOwnProperties: () => equalOwnProperties, - equateStringsCaseInsensitive: () => equateStringsCaseInsensitive, - equateStringsCaseSensitive: () => equateStringsCaseSensitive, - equateValues: () => equateValues, - esDecorateHelper: () => esDecorateHelper, - escapeJsxAttributeString: () => escapeJsxAttributeString, - escapeLeadingUnderscores: () => escapeLeadingUnderscores, - escapeNonAsciiString: () => escapeNonAsciiString, - escapeSnippetText: () => escapeSnippetText, - escapeString: () => escapeString, - every: () => every, - expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression, - explainFiles: () => explainFiles, - explainIfFileIsRedirectAndImpliedFormat: () => explainIfFileIsRedirectAndImpliedFormat, - exportAssignmentIsAlias: () => exportAssignmentIsAlias, - exportStarHelper: () => exportStarHelper, - expressionResultIsUnused: () => expressionResultIsUnused, - extend: () => extend, - extendsHelper: () => extendsHelper, - extensionFromPath: () => extensionFromPath, - extensionIsTS: () => extensionIsTS, - extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution, - externalHelpersModuleNameText: () => externalHelpersModuleNameText, - factory: () => factory, - fileExtensionIs: () => fileExtensionIs, - fileExtensionIsOneOf: () => fileExtensionIsOneOf, - fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics, - fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire, - filter: () => filter, - filterMutate: () => filterMutate, - filterSemanticDiagnostics: () => filterSemanticDiagnostics, - find: () => find, - findAncestor: () => findAncestor, - findBestPatternMatch: () => findBestPatternMatch, - findChildOfKind: () => findChildOfKind, - findComputedPropertyNameCacheAssignment: () => findComputedPropertyNameCacheAssignment, - findConfigFile: () => findConfigFile, - findContainingList: () => findContainingList, - findDiagnosticForNode: () => findDiagnosticForNode, - findFirstNonJsxWhitespaceToken: () => findFirstNonJsxWhitespaceToken, - findIndex: () => findIndex, - findLast: () => findLast, - findLastIndex: () => findLastIndex, - findListItemInfo: () => findListItemInfo, - findMap: () => findMap, - findModifier: () => findModifier, - findNextToken: () => findNextToken, - findPackageJson: () => findPackageJson, - findPackageJsons: () => findPackageJsons, - findPrecedingMatchingToken: () => findPrecedingMatchingToken, - findPrecedingToken: () => findPrecedingToken, - findSuperStatementIndexPath: () => findSuperStatementIndexPath, - findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, - findUseStrictPrologue: () => findUseStrictPrologue, - first: () => first, - firstDefined: () => firstDefined, - firstDefinedIterator: () => firstDefinedIterator, - firstIterator: () => firstIterator, - firstOrOnly: () => firstOrOnly, - firstOrUndefined: () => firstOrUndefined, - firstOrUndefinedIterator: () => firstOrUndefinedIterator, - fixupCompilerOptions: () => fixupCompilerOptions, - flatMap: () => flatMap, - flatMapIterator: () => flatMapIterator, - flatMapToMutable: () => flatMapToMutable, - flatten: () => flatten, - flattenCommaList: () => flattenCommaList, - flattenDestructuringAssignment: () => flattenDestructuringAssignment, - flattenDestructuringBinding: () => flattenDestructuringBinding, - flattenDiagnosticMessageText: () => flattenDiagnosticMessageText, - forEach: () => forEach, - forEachAncestor: () => forEachAncestor, - forEachAncestorDirectory: () => forEachAncestorDirectory, - forEachChild: () => forEachChild, - forEachChildRecursively: () => forEachChildRecursively, - forEachEmittedFile: () => forEachEmittedFile, - forEachEnclosingBlockScopeContainer: () => forEachEnclosingBlockScopeContainer, - forEachEntry: () => forEachEntry, - forEachExternalModuleToImportFrom: () => forEachExternalModuleToImportFrom, - forEachImportClauseDeclaration: () => forEachImportClauseDeclaration, - forEachKey: () => forEachKey, - forEachLeadingCommentRange: () => forEachLeadingCommentRange, - forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft, - forEachPropertyAssignment: () => forEachPropertyAssignment, - forEachResolvedProjectReference: () => forEachResolvedProjectReference, - forEachReturnStatement: () => forEachReturnStatement, - forEachRight: () => forEachRight, - forEachTrailingCommentRange: () => forEachTrailingCommentRange, - forEachTsConfigPropArray: () => forEachTsConfigPropArray, - forEachUnique: () => forEachUnique, - forEachYieldExpression: () => forEachYieldExpression, - forSomeAncestorDirectory: () => forSomeAncestorDirectory, - formatColorAndReset: () => formatColorAndReset, - formatDiagnostic: () => formatDiagnostic, - formatDiagnostics: () => formatDiagnostics, - formatDiagnosticsWithColorAndContext: () => formatDiagnosticsWithColorAndContext, - formatGeneratedName: () => formatGeneratedName, - formatGeneratedNamePart: () => formatGeneratedNamePart, - formatLocation: () => formatLocation, - formatMessage: () => formatMessage, - formatStringFromArgs: () => formatStringFromArgs, - formatting: () => ts_formatting_exports, - fullTripleSlashAMDReferencePathRegEx: () => fullTripleSlashAMDReferencePathRegEx, - fullTripleSlashReferencePathRegEx: () => fullTripleSlashReferencePathRegEx, - generateDjb2Hash: () => generateDjb2Hash, - generateTSConfig: () => generateTSConfig, - generatorHelper: () => generatorHelper, - getAdjustedReferenceLocation: () => getAdjustedReferenceLocation, - getAdjustedRenameLocation: () => getAdjustedRenameLocation, - getAliasDeclarationFromName: () => getAliasDeclarationFromName, - getAllAccessorDeclarations: () => getAllAccessorDeclarations, - getAllDecoratorsOfClass: () => getAllDecoratorsOfClass, - getAllDecoratorsOfClassElement: () => getAllDecoratorsOfClassElement, - getAllJSDocTags: () => getAllJSDocTags, - getAllJSDocTagsOfKind: () => getAllJSDocTagsOfKind, - getAllKeys: () => getAllKeys, - getAllProjectOutputs: () => getAllProjectOutputs, - getAllSuperTypeNodes: () => getAllSuperTypeNodes, - getAllUnscopedEmitHelpers: () => getAllUnscopedEmitHelpers, - getAllowJSCompilerOption: () => getAllowJSCompilerOption, - getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports, - getAncestor: () => getAncestor, - getAnyExtensionFromPath: () => getAnyExtensionFromPath, - getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, - getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, - getAssignedName: () => getAssignedName, - getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, - getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, - getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, - getAssignmentTargetKind: () => getAssignmentTargetKind, - getAutomaticTypeDirectiveNames: () => getAutomaticTypeDirectiveNames, - getBaseFileName: () => getBaseFileName, - getBinaryOperatorPrecedence: () => getBinaryOperatorPrecedence, - getBuildInfo: () => getBuildInfo, - getBuildInfoFileVersionMap: () => getBuildInfoFileVersionMap, - getBuildInfoText: () => getBuildInfoText, - getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder, - getBuilderCreationParameters: () => getBuilderCreationParameters, - getBuilderFileEmit: () => getBuilderFileEmit, - getCheckFlags: () => getCheckFlags, - getClassExtendsHeritageElement: () => getClassExtendsHeritageElement, - getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol, - getCombinedLocalAndExportSymbolFlags: () => getCombinedLocalAndExportSymbolFlags, - getCombinedModifierFlags: () => getCombinedModifierFlags, - getCombinedNodeFlags: () => getCombinedNodeFlags, - getCombinedNodeFlagsAlwaysIncludeJSDoc: () => getCombinedNodeFlagsAlwaysIncludeJSDoc, - getCommentRange: () => getCommentRange, - getCommonSourceDirectory: () => getCommonSourceDirectory, - getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig, - getCompilerOptionValue: () => getCompilerOptionValue, - getCompilerOptionsDiffValue: () => getCompilerOptionsDiffValue, - getConditions: () => getConditions, - getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, - getConstantValue: () => getConstantValue, - getContainerFlags: () => getContainerFlags, - getContainerNode: () => getContainerNode, - getContainingClass: () => getContainingClass, - getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, - getContainingClassStaticBlock: () => getContainingClassStaticBlock, - getContainingFunction: () => getContainingFunction, - getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, - getContainingFunctionOrClassStaticBlock: () => getContainingFunctionOrClassStaticBlock, - getContainingNodeArray: () => getContainingNodeArray, - getContainingObjectLiteralElement: () => getContainingObjectLiteralElement, - getContextualTypeFromParent: () => getContextualTypeFromParent, - getContextualTypeFromParentOrAncestorTypeNode: () => getContextualTypeFromParentOrAncestorTypeNode, - getCurrentTime: () => getCurrentTime, - getDeclarationDiagnostics: () => getDeclarationDiagnostics, - getDeclarationEmitExtensionForPath: () => getDeclarationEmitExtensionForPath, - getDeclarationEmitOutputFilePath: () => getDeclarationEmitOutputFilePath, - getDeclarationEmitOutputFilePathWorker: () => getDeclarationEmitOutputFilePathWorker, - getDeclarationFromName: () => getDeclarationFromName, - getDeclarationModifierFlagsFromSymbol: () => getDeclarationModifierFlagsFromSymbol, - getDeclarationOfKind: () => getDeclarationOfKind, - getDeclarationsOfKind: () => getDeclarationsOfKind, - getDeclaredExpandoInitializer: () => getDeclaredExpandoInitializer, - getDecorators: () => getDecorators, - getDefaultCompilerOptions: () => getDefaultCompilerOptions2, - getDefaultExportInfoWorker: () => getDefaultExportInfoWorker, - getDefaultFormatCodeSettings: () => getDefaultFormatCodeSettings, - getDefaultLibFileName: () => getDefaultLibFileName, - getDefaultLibFilePath: () => getDefaultLibFilePath, - getDefaultLikeExportInfo: () => getDefaultLikeExportInfo, - getDiagnosticText: () => getDiagnosticText, - getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan, - getDirectoryPath: () => getDirectoryPath, - getDirectoryToWatchFailedLookupLocation: () => getDirectoryToWatchFailedLookupLocation, - getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => getDirectoryToWatchFailedLookupLocationFromTypeRoot, - getDocumentPositionMapper: () => getDocumentPositionMapper, - getESModuleInterop: () => getESModuleInterop, - getEditsForFileRename: () => getEditsForFileRename, - getEffectiveBaseTypeNode: () => getEffectiveBaseTypeNode, - getEffectiveConstraintOfTypeParameter: () => getEffectiveConstraintOfTypeParameter, - getEffectiveContainerForJSDocTemplateTag: () => getEffectiveContainerForJSDocTemplateTag, - getEffectiveImplementsTypeNodes: () => getEffectiveImplementsTypeNodes, - getEffectiveInitializer: () => getEffectiveInitializer, - getEffectiveJSDocHost: () => getEffectiveJSDocHost, - getEffectiveModifierFlags: () => getEffectiveModifierFlags, - getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => getEffectiveModifierFlagsAlwaysIncludeJSDoc, - getEffectiveModifierFlagsNoCache: () => getEffectiveModifierFlagsNoCache, - getEffectiveReturnTypeNode: () => getEffectiveReturnTypeNode, - getEffectiveSetAccessorTypeAnnotationNode: () => getEffectiveSetAccessorTypeAnnotationNode, - getEffectiveTypeAnnotationNode: () => getEffectiveTypeAnnotationNode, - getEffectiveTypeParameterDeclarations: () => getEffectiveTypeParameterDeclarations, - getEffectiveTypeRoots: () => getEffectiveTypeRoots, - getElementOrPropertyAccessArgumentExpressionOrName: () => getElementOrPropertyAccessArgumentExpressionOrName, - getElementOrPropertyAccessName: () => getElementOrPropertyAccessName, - getElementsOfBindingOrAssignmentPattern: () => getElementsOfBindingOrAssignmentPattern, - getEmitDeclarations: () => getEmitDeclarations, - getEmitFlags: () => getEmitFlags, - getEmitHelpers: () => getEmitHelpers, - getEmitModuleDetectionKind: () => getEmitModuleDetectionKind, - getEmitModuleKind: () => getEmitModuleKind, - getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, - getEmitScriptTarget: () => getEmitScriptTarget, - getEmitStandardClassFields: () => getEmitStandardClassFields, - getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, - getEnclosingContainer: () => getEnclosingContainer, - getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, - getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, - getEndLinePosition: () => getEndLinePosition, - getEntityNameFromTypeNode: () => getEntityNameFromTypeNode, - getEntrypointsFromPackageJsonInfo: () => getEntrypointsFromPackageJsonInfo, - getErrorCountForSummary: () => getErrorCountForSummary, - getErrorSpanForNode: () => getErrorSpanForNode, - getErrorSummaryText: () => getErrorSummaryText, - getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral, - getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName, - getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName, - getExpandoInitializer: () => getExpandoInitializer, - getExportAssignmentExpression: () => getExportAssignmentExpression, - getExportInfoMap: () => getExportInfoMap, - getExportNeedsImportStarHelper: () => getExportNeedsImportStarHelper, - getExpressionAssociativity: () => getExpressionAssociativity, - getExpressionPrecedence: () => getExpressionPrecedence, - getExternalHelpersModuleName: () => getExternalHelpersModuleName, - getExternalModuleImportEqualsDeclarationExpression: () => getExternalModuleImportEqualsDeclarationExpression, - getExternalModuleName: () => getExternalModuleName, - getExternalModuleNameFromDeclaration: () => getExternalModuleNameFromDeclaration, - getExternalModuleNameFromPath: () => getExternalModuleNameFromPath, - getExternalModuleNameLiteral: () => getExternalModuleNameLiteral, - getExternalModuleRequireArgument: () => getExternalModuleRequireArgument, - getFallbackOptions: () => getFallbackOptions, - getFileEmitOutput: () => getFileEmitOutput, - getFileMatcherPatterns: () => getFileMatcherPatterns, - getFileNamesFromConfigSpecs: () => getFileNamesFromConfigSpecs, - getFileWatcherEventKind: () => getFileWatcherEventKind, - getFilesInErrorForSummary: () => getFilesInErrorForSummary, - getFirstConstructorWithBody: () => getFirstConstructorWithBody, - getFirstIdentifier: () => getFirstIdentifier, - getFirstNonSpaceCharacterPosition: () => getFirstNonSpaceCharacterPosition, - getFirstProjectOutput: () => getFirstProjectOutput, - getFixableErrorSpanExpression: () => getFixableErrorSpanExpression, - getFormatCodeSettingsForWriting: () => getFormatCodeSettingsForWriting, - getFullWidth: () => getFullWidth, - getFunctionFlags: () => getFunctionFlags, - getHeritageClause: () => getHeritageClause, - getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc, - getIdentifierAutoGenerate: () => getIdentifierAutoGenerate, - getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference, - getIdentifierTypeArguments: () => getIdentifierTypeArguments, - getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression, - getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile, - getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker, - getImportNeedsImportDefaultHelper: () => getImportNeedsImportDefaultHelper, - getImportNeedsImportStarHelper: () => getImportNeedsImportStarHelper, - getIndentSize: () => getIndentSize, - getIndentString: () => getIndentString, - getInferredLibraryNameResolveFrom: () => getInferredLibraryNameResolveFrom, - getInitializedVariables: () => getInitializedVariables, - getInitializerOfBinaryExpression: () => getInitializerOfBinaryExpression, - getInitializerOfBindingOrAssignmentElement: () => getInitializerOfBindingOrAssignmentElement, - getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes, - getInternalEmitFlags: () => getInternalEmitFlags, - getInvokedExpression: () => getInvokedExpression, - getIsolatedModules: () => getIsolatedModules, - getJSDocAugmentsTag: () => getJSDocAugmentsTag, - getJSDocClassTag: () => getJSDocClassTag, - getJSDocCommentRanges: () => getJSDocCommentRanges, - getJSDocCommentsAndTags: () => getJSDocCommentsAndTags, - getJSDocDeprecatedTag: () => getJSDocDeprecatedTag, - getJSDocDeprecatedTagNoCache: () => getJSDocDeprecatedTagNoCache, - getJSDocEnumTag: () => getJSDocEnumTag, - getJSDocHost: () => getJSDocHost, - getJSDocImplementsTags: () => getJSDocImplementsTags, - getJSDocOverrideTagNoCache: () => getJSDocOverrideTagNoCache, - getJSDocParameterTags: () => getJSDocParameterTags, - getJSDocParameterTagsNoCache: () => getJSDocParameterTagsNoCache, - getJSDocPrivateTag: () => getJSDocPrivateTag, - getJSDocPrivateTagNoCache: () => getJSDocPrivateTagNoCache, - getJSDocProtectedTag: () => getJSDocProtectedTag, - getJSDocProtectedTagNoCache: () => getJSDocProtectedTagNoCache, - getJSDocPublicTag: () => getJSDocPublicTag, - getJSDocPublicTagNoCache: () => getJSDocPublicTagNoCache, - getJSDocReadonlyTag: () => getJSDocReadonlyTag, - getJSDocReadonlyTagNoCache: () => getJSDocReadonlyTagNoCache, - getJSDocReturnTag: () => getJSDocReturnTag, - getJSDocReturnType: () => getJSDocReturnType, - getJSDocRoot: () => getJSDocRoot, - getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType, - getJSDocSatisfiesTag: () => getJSDocSatisfiesTag, - getJSDocTags: () => getJSDocTags, - getJSDocTagsNoCache: () => getJSDocTagsNoCache, - getJSDocTemplateTag: () => getJSDocTemplateTag, - getJSDocThisTag: () => getJSDocThisTag, - getJSDocType: () => getJSDocType, - getJSDocTypeAliasName: () => getJSDocTypeAliasName, - getJSDocTypeAssertionType: () => getJSDocTypeAssertionType, - getJSDocTypeParameterDeclarations: () => getJSDocTypeParameterDeclarations, - getJSDocTypeParameterTags: () => getJSDocTypeParameterTags, - getJSDocTypeParameterTagsNoCache: () => getJSDocTypeParameterTagsNoCache, - getJSDocTypeTag: () => getJSDocTypeTag, - getJSXImplicitImportBase: () => getJSXImplicitImportBase, - getJSXRuntimeImport: () => getJSXRuntimeImport, - getJSXTransformEnabled: () => getJSXTransformEnabled, - getKeyForCompilerOptions: () => getKeyForCompilerOptions, - getLanguageVariant: () => getLanguageVariant, - getLastChild: () => getLastChild, - getLeadingCommentRanges: () => getLeadingCommentRanges, - getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode, - getLeftmostAccessExpression: () => getLeftmostAccessExpression, - getLeftmostExpression: () => getLeftmostExpression, - getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition, - getLineInfo: () => getLineInfo, - getLineOfLocalPosition: () => getLineOfLocalPosition, - getLineOfLocalPositionFromLineMap: () => getLineOfLocalPositionFromLineMap, - getLineStartPositionForPosition: () => getLineStartPositionForPosition, - getLineStarts: () => getLineStarts, - getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => getLinesBetweenPositionAndNextNonWhitespaceCharacter, - getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter, - getLinesBetweenPositions: () => getLinesBetweenPositions, - getLinesBetweenRangeEndAndRangeStart: () => getLinesBetweenRangeEndAndRangeStart, - getLinesBetweenRangeEndPositions: () => getLinesBetweenRangeEndPositions, - getLiteralText: () => getLiteralText, - getLocalNameForExternalImport: () => getLocalNameForExternalImport, - getLocalSymbolForExportDefault: () => getLocalSymbolForExportDefault, - getLocaleSpecificMessage: () => getLocaleSpecificMessage, - getLocaleTimeString: () => getLocaleTimeString, - getMappedContextSpan: () => getMappedContextSpan, - getMappedDocumentSpan: () => getMappedDocumentSpan, - getMappedLocation: () => getMappedLocation, - getMatchedFileSpec: () => getMatchedFileSpec, - getMatchedIncludeSpec: () => getMatchedIncludeSpec, - getMeaningFromDeclaration: () => getMeaningFromDeclaration, - getMeaningFromLocation: () => getMeaningFromLocation, - getMembersOfDeclaration: () => getMembersOfDeclaration, - getModeForFileReference: () => getModeForFileReference, - getModeForResolutionAtIndex: () => getModeForResolutionAtIndex, - getModeForUsageLocation: () => getModeForUsageLocation, - getModifiedTime: () => getModifiedTime, - getModifiers: () => getModifiers, - getModuleInstanceState: () => getModuleInstanceState, - getModuleNameStringLiteralAt: () => getModuleNameStringLiteralAt, - getModuleSpecifierEndingPreference: () => getModuleSpecifierEndingPreference, - getModuleSpecifierResolverHost: () => getModuleSpecifierResolverHost, - getNameForExportedSymbol: () => getNameForExportedSymbol, - getNameFromIndexInfo: () => getNameFromIndexInfo, - getNameFromPropertyName: () => getNameFromPropertyName, - getNameOfAccessExpression: () => getNameOfAccessExpression, - getNameOfCompilerOptionValue: () => getNameOfCompilerOptionValue, - getNameOfDeclaration: () => getNameOfDeclaration, - getNameOfExpando: () => getNameOfExpando, - getNameOfJSDocTypedef: () => getNameOfJSDocTypedef, - getNameOrArgument: () => getNameOrArgument, - getNameTable: () => getNameTable, - getNamesForExportedSymbol: () => getNamesForExportedSymbol, - getNamespaceDeclarationNode: () => getNamespaceDeclarationNode, - getNewLineCharacter: () => getNewLineCharacter, - getNewLineKind: () => getNewLineKind, - getNewLineOrDefaultFromHost: () => getNewLineOrDefaultFromHost, - getNewTargetContainer: () => getNewTargetContainer, - getNextJSDocCommentLocation: () => getNextJSDocCommentLocation, - getNodeForGeneratedName: () => getNodeForGeneratedName, - getNodeId: () => getNodeId, - getNodeKind: () => getNodeKind, - getNodeModifiers: () => getNodeModifiers, - getNodeModulePathParts: () => getNodeModulePathParts, - getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration, - getNonAssignmentOperatorForCompoundAssignment: () => getNonAssignmentOperatorForCompoundAssignment, - getNonAugmentationDeclaration: () => getNonAugmentationDeclaration, - getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode, - getNormalizedAbsolutePath: () => getNormalizedAbsolutePath, - getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot, - getNormalizedPathComponents: () => getNormalizedPathComponents, - getObjectFlags: () => getObjectFlags, - getOperator: () => getOperator, - getOperatorAssociativity: () => getOperatorAssociativity, - getOperatorPrecedence: () => getOperatorPrecedence, - getOptionFromName: () => getOptionFromName, - getOptionsForLibraryResolution: () => getOptionsForLibraryResolution, - getOptionsNameMap: () => getOptionsNameMap, - getOrCreateEmitNode: () => getOrCreateEmitNode, - getOrCreateExternalHelpersModuleNameIfNeeded: () => getOrCreateExternalHelpersModuleNameIfNeeded, - getOrUpdate: () => getOrUpdate, - getOriginalNode: () => getOriginalNode, - getOriginalNodeId: () => getOriginalNodeId, - getOriginalSourceFile: () => getOriginalSourceFile, - getOutputDeclarationFileName: () => getOutputDeclarationFileName, - getOutputExtension: () => getOutputExtension, - getOutputFileNames: () => getOutputFileNames, - getOutputPathsFor: () => getOutputPathsFor, - getOutputPathsForBundle: () => getOutputPathsForBundle, - getOwnEmitOutputFilePath: () => getOwnEmitOutputFilePath, - getOwnKeys: () => getOwnKeys, - getOwnValues: () => getOwnValues, - getPackageJsonInfo: () => getPackageJsonInfo, - getPackageJsonTypesVersionsPaths: () => getPackageJsonTypesVersionsPaths, - getPackageJsonsVisibleToFile: () => getPackageJsonsVisibleToFile, - getPackageNameFromTypesPackageName: () => getPackageNameFromTypesPackageName, - getPackageScopeForPath: () => getPackageScopeForPath, - getParameterSymbolFromJSDoc: () => getParameterSymbolFromJSDoc, - getParameterTypeNode: () => getParameterTypeNode, - getParentNodeInSpan: () => getParentNodeInSpan, - getParseTreeNode: () => getParseTreeNode, - getParsedCommandLineOfConfigFile: () => getParsedCommandLineOfConfigFile, - getPathComponents: () => getPathComponents, - getPathComponentsRelativeTo: () => getPathComponentsRelativeTo, - getPathFromPathComponents: () => getPathFromPathComponents, - getPathUpdater: () => getPathUpdater, - getPathsBasePath: () => getPathsBasePath, - getPatternFromSpec: () => getPatternFromSpec, - getPendingEmitKind: () => getPendingEmitKind, - getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter, - getPossibleGenericSignatures: () => getPossibleGenericSignatures, - getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension, - getPossibleTypeArgumentsInfo: () => getPossibleTypeArgumentsInfo, - getPreEmitDiagnostics: () => getPreEmitDiagnostics, - getPrecedingNonSpaceCharacterPosition: () => getPrecedingNonSpaceCharacterPosition, - getPrivateIdentifier: () => getPrivateIdentifier, - getProperties: () => getProperties, - getProperty: () => getProperty, - getPropertyArrayElementValue: () => getPropertyArrayElementValue, - getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, - getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, - getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, - getPropertyNameFromType: () => getPropertyNameFromType, - getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, - getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, - getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType, - getQuoteFromPreference: () => getQuoteFromPreference, - getQuotePreference: () => getQuotePreference, - getRangesWhere: () => getRangesWhere, - getRefactorContextSpan: () => getRefactorContextSpan, - getReferencedFileLocation: () => getReferencedFileLocation, - getRegexFromPattern: () => getRegexFromPattern, - getRegularExpressionForWildcard: () => getRegularExpressionForWildcard, - getRegularExpressionsForWildcards: () => getRegularExpressionsForWildcards, - getRelativePathFromDirectory: () => getRelativePathFromDirectory, - getRelativePathFromFile: () => getRelativePathFromFile, - getRelativePathToDirectoryOrUrl: () => getRelativePathToDirectoryOrUrl, - getRenameLocation: () => getRenameLocation, - getReplacementSpanForContextToken: () => getReplacementSpanForContextToken, - getResolutionDiagnostic: () => getResolutionDiagnostic, - getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause, - getResolveJsonModule: () => getResolveJsonModule, - getResolvePackageJsonExports: () => getResolvePackageJsonExports, - getResolvePackageJsonImports: () => getResolvePackageJsonImports, - getResolvedExternalModuleName: () => getResolvedExternalModuleName, - getResolvedModule: () => getResolvedModule, - getResolvedTypeReferenceDirective: () => getResolvedTypeReferenceDirective, - getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement, - getRestParameterElementType: () => getRestParameterElementType, - getRightMostAssignedExpression: () => getRightMostAssignedExpression, - getRootDeclaration: () => getRootDeclaration, - getRootDirectoryOfResolutionCache: () => getRootDirectoryOfResolutionCache, - getRootLength: () => getRootLength, - getRootPathSplitLength: () => getRootPathSplitLength, - getScriptKind: () => getScriptKind, - getScriptKindFromFileName: () => getScriptKindFromFileName, - getScriptTargetFeatures: () => getScriptTargetFeatures, - getSelectedEffectiveModifierFlags: () => getSelectedEffectiveModifierFlags, - getSelectedSyntacticModifierFlags: () => getSelectedSyntacticModifierFlags, - getSemanticClassifications: () => getSemanticClassifications, - getSemanticJsxChildren: () => getSemanticJsxChildren, - getSetAccessorTypeAnnotationNode: () => getSetAccessorTypeAnnotationNode, - getSetAccessorValueParameter: () => getSetAccessorValueParameter, - getSetExternalModuleIndicator: () => getSetExternalModuleIndicator, - getShebang: () => getShebang, - getSingleInitializerOfVariableStatementOrPropertyDeclaration: () => getSingleInitializerOfVariableStatementOrPropertyDeclaration, - getSingleVariableOfVariableStatement: () => getSingleVariableOfVariableStatement, - getSnapshotText: () => getSnapshotText, - getSnippetElement: () => getSnippetElement, - getSourceFileOfModule: () => getSourceFileOfModule, - getSourceFileOfNode: () => getSourceFileOfNode, - getSourceFilePathInNewDir: () => getSourceFilePathInNewDir, - getSourceFilePathInNewDirWorker: () => getSourceFilePathInNewDirWorker, - getSourceFileVersionAsHashFromText: () => getSourceFileVersionAsHashFromText, - getSourceFilesToEmit: () => getSourceFilesToEmit, - getSourceMapRange: () => getSourceMapRange, - getSourceMapper: () => getSourceMapper, - getSourceTextOfNodeFromSourceFile: () => getSourceTextOfNodeFromSourceFile, - getSpanOfTokenAtPosition: () => getSpanOfTokenAtPosition, - getSpellingSuggestion: () => getSpellingSuggestion, - getStartPositionOfLine: () => getStartPositionOfLine, - getStartPositionOfRange: () => getStartPositionOfRange, - getStartsOnNewLine: () => getStartsOnNewLine, - getStaticPropertiesAndClassStaticBlock: () => getStaticPropertiesAndClassStaticBlock, - getStrictOptionValue: () => getStrictOptionValue, - getStringComparer: () => getStringComparer, - getSuperCallFromStatement: () => getSuperCallFromStatement, - getSuperContainer: () => getSuperContainer, - getSupportedCodeFixes: () => getSupportedCodeFixes, - getSupportedExtensions: () => getSupportedExtensions, - getSupportedExtensionsWithJsonIfResolveJsonModule: () => getSupportedExtensionsWithJsonIfResolveJsonModule, - getSwitchedType: () => getSwitchedType, - getSymbolId: () => getSymbolId, - getSymbolNameForPrivateIdentifier: () => getSymbolNameForPrivateIdentifier, - getSymbolTarget: () => getSymbolTarget, - getSyntacticClassifications: () => getSyntacticClassifications, - getSyntacticModifierFlags: () => getSyntacticModifierFlags, - getSyntacticModifierFlagsNoCache: () => getSyntacticModifierFlagsNoCache, - getSynthesizedDeepClone: () => getSynthesizedDeepClone, - getSynthesizedDeepCloneWithReplacements: () => getSynthesizedDeepCloneWithReplacements, - getSynthesizedDeepClones: () => getSynthesizedDeepClones, - getSynthesizedDeepClonesWithReplacements: () => getSynthesizedDeepClonesWithReplacements, - getSyntheticLeadingComments: () => getSyntheticLeadingComments, - getSyntheticTrailingComments: () => getSyntheticTrailingComments, - getTargetLabel: () => getTargetLabel, - getTargetOfBindingOrAssignmentElement: () => getTargetOfBindingOrAssignmentElement, - getTemporaryModuleResolutionState: () => getTemporaryModuleResolutionState, - getTextOfConstantValue: () => getTextOfConstantValue, - getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral, - getTextOfJSDocComment: () => getTextOfJSDocComment, - getTextOfJsxAttributeName: () => getTextOfJsxAttributeName, - getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName, - getTextOfNode: () => getTextOfNode, - getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText, - getTextOfPropertyName: () => getTextOfPropertyName, - getThisContainer: () => getThisContainer, - getThisParameter: () => getThisParameter, - getTokenAtPosition: () => getTokenAtPosition, - getTokenPosOfNode: () => getTokenPosOfNode, - getTokenSourceMapRange: () => getTokenSourceMapRange, - getTouchingPropertyName: () => getTouchingPropertyName, - getTouchingToken: () => getTouchingToken, - getTrailingCommentRanges: () => getTrailingCommentRanges, - getTrailingSemicolonDeferringWriter: () => getTrailingSemicolonDeferringWriter, - getTransformFlagsSubtreeExclusions: () => getTransformFlagsSubtreeExclusions, - getTransformers: () => getTransformers, - getTsBuildInfoEmitOutputFilePath: () => getTsBuildInfoEmitOutputFilePath, - getTsConfigObjectLiteralExpression: () => getTsConfigObjectLiteralExpression, - getTsConfigPropArrayElementValue: () => getTsConfigPropArrayElementValue, - getTypeAnnotationNode: () => getTypeAnnotationNode, - getTypeArgumentOrTypeParameterList: () => getTypeArgumentOrTypeParameterList, - getTypeKeywordOfTypeOnlyImport: () => getTypeKeywordOfTypeOnlyImport, - getTypeNode: () => getTypeNode, - getTypeNodeIfAccessible: () => getTypeNodeIfAccessible, - getTypeParameterFromJsDoc: () => getTypeParameterFromJsDoc, - getTypeParameterOwner: () => getTypeParameterOwner, - getTypesPackageName: () => getTypesPackageName, - getUILocale: () => getUILocale, - getUniqueName: () => getUniqueName, - getUniqueSymbolId: () => getUniqueSymbolId, - getUseDefineForClassFields: () => getUseDefineForClassFields, - getWatchErrorSummaryDiagnosticMessage: () => getWatchErrorSummaryDiagnosticMessage, - getWatchFactory: () => getWatchFactory, - group: () => group, - groupBy: () => groupBy, - guessIndentation: () => guessIndentation, - handleNoEmitOptions: () => handleNoEmitOptions, - hasAbstractModifier: () => hasAbstractModifier, - hasAccessorModifier: () => hasAccessorModifier, - hasAmbientModifier: () => hasAmbientModifier, - hasChangesInResolutions: () => hasChangesInResolutions, - hasChildOfKind: () => hasChildOfKind, - hasContextSensitiveParameters: () => hasContextSensitiveParameters, - hasDecorators: () => hasDecorators, - hasDocComment: () => hasDocComment, - hasDynamicName: () => hasDynamicName, - hasEffectiveModifier: () => hasEffectiveModifier, - hasEffectiveModifiers: () => hasEffectiveModifiers, - hasEffectiveReadonlyModifier: () => hasEffectiveReadonlyModifier, - hasExtension: () => hasExtension, - hasIndexSignature: () => hasIndexSignature, - hasInitializer: () => hasInitializer, - hasInvalidEscape: () => hasInvalidEscape, - hasJSDocNodes: () => hasJSDocNodes, - hasJSDocParameterTags: () => hasJSDocParameterTags, - hasJSFileExtension: () => hasJSFileExtension, - hasJsonModuleEmitEnabled: () => hasJsonModuleEmitEnabled, - hasOnlyExpressionInitializer: () => hasOnlyExpressionInitializer, - hasOverrideModifier: () => hasOverrideModifier, - hasPossibleExternalModuleReference: () => hasPossibleExternalModuleReference, - hasProperty: () => hasProperty, - hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName, - hasQuestionToken: () => hasQuestionToken, - hasRecordedExternalHelpers: () => hasRecordedExternalHelpers, - hasRestParameter: () => hasRestParameter, - hasScopeMarker: () => hasScopeMarker, - hasStaticModifier: () => hasStaticModifier, - hasSyntacticModifier: () => hasSyntacticModifier, - hasSyntacticModifiers: () => hasSyntacticModifiers, - hasTSFileExtension: () => hasTSFileExtension, - hasTabstop: () => hasTabstop, - hasTrailingDirectorySeparator: () => hasTrailingDirectorySeparator, - hasType: () => hasType, - hasTypeArguments: () => hasTypeArguments, - hasZeroOrOneAsteriskCharacter: () => hasZeroOrOneAsteriskCharacter, - helperString: () => helperString, - hostGetCanonicalFileName: () => hostGetCanonicalFileName, - hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames, - idText: () => idText, - identifierIsThisKeyword: () => identifierIsThisKeyword, - identifierToKeywordKind: () => identifierToKeywordKind, - identity: () => identity, - identitySourceMapConsumer: () => identitySourceMapConsumer, - ignoreSourceNewlines: () => ignoreSourceNewlines, - ignoredPaths: () => ignoredPaths, - importDefaultHelper: () => importDefaultHelper, - importFromModuleSpecifier: () => importFromModuleSpecifier, - importNameElisionDisabled: () => importNameElisionDisabled, - importStarHelper: () => importStarHelper, - indexOfAnyCharCode: () => indexOfAnyCharCode, - indexOfNode: () => indexOfNode, - indicesOf: () => indicesOf, - inferredTypesContainingFile: () => inferredTypesContainingFile, - injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, - injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, - insertImports: () => insertImports, - insertLeadingStatement: () => insertLeadingStatement, - insertSorted: () => insertSorted, - insertStatementAfterCustomPrologue: () => insertStatementAfterCustomPrologue, - insertStatementAfterStandardPrologue: () => insertStatementAfterStandardPrologue, - insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue, - insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue, - intersperse: () => intersperse, - intrinsicTagNameToString: () => intrinsicTagNameToString, - introducesArgumentsExoticObject: () => introducesArgumentsExoticObject, - inverseJsxOptionMap: () => inverseJsxOptionMap, - isAbstractConstructorSymbol: () => isAbstractConstructorSymbol, - isAbstractModifier: () => isAbstractModifier, - isAccessExpression: () => isAccessExpression, - isAccessibilityModifier: () => isAccessibilityModifier, - isAccessor: () => isAccessor, - isAccessorModifier: () => isAccessorModifier, - isAliasSymbolDeclaration: () => isAliasSymbolDeclaration, - isAliasableExpression: () => isAliasableExpression, - isAmbientModule: () => isAmbientModule, - isAmbientPropertyDeclaration: () => isAmbientPropertyDeclaration, - isAnonymousFunctionDefinition: () => isAnonymousFunctionDefinition, - isAnyDirectorySeparator: () => isAnyDirectorySeparator, - isAnyImportOrBareOrAccessedRequire: () => isAnyImportOrBareOrAccessedRequire, - isAnyImportOrReExport: () => isAnyImportOrReExport, - isAnyImportSyntax: () => isAnyImportSyntax, - isAnySupportedFileExtension: () => isAnySupportedFileExtension, - isApplicableVersionedTypesKey: () => isApplicableVersionedTypesKey, - isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess, - isArray: () => isArray, - isArrayBindingElement: () => isArrayBindingElement, - isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement, - isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern, - isArrayBindingPattern: () => isArrayBindingPattern, - isArrayLiteralExpression: () => isArrayLiteralExpression, - isArrayLiteralOrObjectLiteralDestructuringPattern: () => isArrayLiteralOrObjectLiteralDestructuringPattern, - isArrayTypeNode: () => isArrayTypeNode, - isArrowFunction: () => isArrowFunction, - isAsExpression: () => isAsExpression, - isAssertClause: () => isAssertClause, - isAssertEntry: () => isAssertEntry, - isAssertionExpression: () => isAssertionExpression, - isAssertionKey: () => isAssertionKey, - isAssertsKeyword: () => isAssertsKeyword, - isAssignmentDeclaration: () => isAssignmentDeclaration, - isAssignmentExpression: () => isAssignmentExpression, - isAssignmentOperator: () => isAssignmentOperator, - isAssignmentPattern: () => isAssignmentPattern, - isAssignmentTarget: () => isAssignmentTarget, - isAsteriskToken: () => isAsteriskToken, - isAsyncFunction: () => isAsyncFunction, - isAsyncModifier: () => isAsyncModifier, - isAutoAccessorPropertyDeclaration: () => isAutoAccessorPropertyDeclaration, - isAwaitExpression: () => isAwaitExpression, - isAwaitKeyword: () => isAwaitKeyword, - isBigIntLiteral: () => isBigIntLiteral, - isBinaryExpression: () => isBinaryExpression, - isBinaryOperatorToken: () => isBinaryOperatorToken, - isBindableObjectDefinePropertyCall: () => isBindableObjectDefinePropertyCall, - isBindableStaticAccessExpression: () => isBindableStaticAccessExpression, - isBindableStaticElementAccessExpression: () => isBindableStaticElementAccessExpression, - isBindableStaticNameExpression: () => isBindableStaticNameExpression, - isBindingElement: () => isBindingElement, - isBindingElementOfBareOrAccessedRequire: () => isBindingElementOfBareOrAccessedRequire, - isBindingName: () => isBindingName, - isBindingOrAssignmentElement: () => isBindingOrAssignmentElement, - isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern, - isBindingPattern: () => isBindingPattern, - isBlock: () => isBlock, - isBlockOrCatchScoped: () => isBlockOrCatchScoped, - isBlockScope: () => isBlockScope, - isBlockScopedContainerTopLevel: () => isBlockScopedContainerTopLevel, - isBooleanLiteral: () => isBooleanLiteral, - isBreakOrContinueStatement: () => isBreakOrContinueStatement, - isBreakStatement: () => isBreakStatement, - isBuildInfoFile: () => isBuildInfoFile, - isBuilderProgram: () => isBuilderProgram2, - isBundle: () => isBundle, - isBundleFileTextLike: () => isBundleFileTextLike, - isCallChain: () => isCallChain, - isCallExpression: () => isCallExpression, - isCallExpressionTarget: () => isCallExpressionTarget, - isCallLikeExpression: () => isCallLikeExpression, - isCallOrNewExpression: () => isCallOrNewExpression, - isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget, - isCallSignatureDeclaration: () => isCallSignatureDeclaration, - isCallToHelper: () => isCallToHelper, - isCaseBlock: () => isCaseBlock, - isCaseClause: () => isCaseClause, - isCaseKeyword: () => isCaseKeyword, - isCaseOrDefaultClause: () => isCaseOrDefaultClause, - isCatchClause: () => isCatchClause, - isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration, - isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement, - isCheckJsEnabledForFile: () => isCheckJsEnabledForFile, - isChildOfNodeWithKind: () => isChildOfNodeWithKind, - isCircularBuildOrder: () => isCircularBuildOrder, - isClassDeclaration: () => isClassDeclaration, - isClassElement: () => isClassElement, - isClassExpression: () => isClassExpression, - isClassLike: () => isClassLike, - isClassMemberModifier: () => isClassMemberModifier, - isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, - isClassOrTypeElement: () => isClassOrTypeElement, - isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, - isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, - isCollapsedRange: () => isCollapsedRange, - isColonToken: () => isColonToken, - isCommaExpression: () => isCommaExpression, - isCommaListExpression: () => isCommaListExpression, - isCommaSequence: () => isCommaSequence, - isCommaToken: () => isCommaToken, - isComment: () => isComment, - isCommonJsExportPropertyAssignment: () => isCommonJsExportPropertyAssignment, - isCommonJsExportedExpression: () => isCommonJsExportedExpression, - isCompoundAssignment: () => isCompoundAssignment, - isComputedNonLiteralName: () => isComputedNonLiteralName, - isComputedPropertyName: () => isComputedPropertyName, - isConciseBody: () => isConciseBody, - isConditionalExpression: () => isConditionalExpression, - isConditionalTypeNode: () => isConditionalTypeNode, - isConstTypeReference: () => isConstTypeReference, - isConstructSignatureDeclaration: () => isConstructSignatureDeclaration, - isConstructorDeclaration: () => isConstructorDeclaration, - isConstructorTypeNode: () => isConstructorTypeNode, - isContextualKeyword: () => isContextualKeyword, - isContinueStatement: () => isContinueStatement, - isCustomPrologue: () => isCustomPrologue, - isDebuggerStatement: () => isDebuggerStatement, - isDeclaration: () => isDeclaration, - isDeclarationBindingElement: () => isDeclarationBindingElement, - isDeclarationFileName: () => isDeclarationFileName, - isDeclarationName: () => isDeclarationName, - isDeclarationNameOfEnumOrNamespace: () => isDeclarationNameOfEnumOrNamespace, - isDeclarationReadonly: () => isDeclarationReadonly, - isDeclarationStatement: () => isDeclarationStatement, - isDeclarationWithTypeParameterChildren: () => isDeclarationWithTypeParameterChildren, - isDeclarationWithTypeParameters: () => isDeclarationWithTypeParameters, - isDecorator: () => isDecorator, - isDecoratorTarget: () => isDecoratorTarget, - isDefaultClause: () => isDefaultClause, - isDefaultImport: () => isDefaultImport, - isDefaultModifier: () => isDefaultModifier, - isDefaultedExpandoInitializer: () => isDefaultedExpandoInitializer, - isDeleteExpression: () => isDeleteExpression, - isDeleteTarget: () => isDeleteTarget, - isDeprecatedDeclaration: () => isDeprecatedDeclaration, - isDestructuringAssignment: () => isDestructuringAssignment, - isDiagnosticWithLocation: () => isDiagnosticWithLocation, - isDiskPathRoot: () => isDiskPathRoot, - isDoStatement: () => isDoStatement, - isDocumentRegistryEntry: () => isDocumentRegistryEntry, - isDotDotDotToken: () => isDotDotDotToken, - isDottedName: () => isDottedName, - isDynamicName: () => isDynamicName, - isESSymbolIdentifier: () => isESSymbolIdentifier, - isEffectiveExternalModule: () => isEffectiveExternalModule, - isEffectiveModuleDeclaration: () => isEffectiveModuleDeclaration, - isEffectiveStrictModeSourceFile: () => isEffectiveStrictModeSourceFile, - isElementAccessChain: () => isElementAccessChain, - isElementAccessExpression: () => isElementAccessExpression, - isEmittedFileOfProgram: () => isEmittedFileOfProgram, - isEmptyArrayLiteral: () => isEmptyArrayLiteral, - isEmptyBindingElement: () => isEmptyBindingElement, - isEmptyBindingPattern: () => isEmptyBindingPattern, - isEmptyObjectLiteral: () => isEmptyObjectLiteral, - isEmptyStatement: () => isEmptyStatement, - isEmptyStringLiteral: () => isEmptyStringLiteral, - isEntityName: () => isEntityName, - isEntityNameExpression: () => isEntityNameExpression, - isEnumConst: () => isEnumConst, - isEnumDeclaration: () => isEnumDeclaration, - isEnumMember: () => isEnumMember, - isEqualityOperatorKind: () => isEqualityOperatorKind, - isEqualsGreaterThanToken: () => isEqualsGreaterThanToken, - isExclamationToken: () => isExclamationToken, - isExcludedFile: () => isExcludedFile, - isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport, - isExportAssignment: () => isExportAssignment, - isExportDeclaration: () => isExportDeclaration, - isExportModifier: () => isExportModifier, - isExportName: () => isExportName, - isExportNamespaceAsDefaultDeclaration: () => isExportNamespaceAsDefaultDeclaration, - isExportOrDefaultModifier: () => isExportOrDefaultModifier, - isExportSpecifier: () => isExportSpecifier, - isExportsIdentifier: () => isExportsIdentifier, - isExportsOrModuleExportsOrAlias: () => isExportsOrModuleExportsOrAlias, - isExpression: () => isExpression, - isExpressionNode: () => isExpressionNode, - isExpressionOfExternalModuleImportEqualsDeclaration: () => isExpressionOfExternalModuleImportEqualsDeclaration, - isExpressionOfOptionalChainRoot: () => isExpressionOfOptionalChainRoot, - isExpressionStatement: () => isExpressionStatement, - isExpressionWithTypeArguments: () => isExpressionWithTypeArguments, - isExpressionWithTypeArgumentsInClassExtendsClause: () => isExpressionWithTypeArgumentsInClassExtendsClause, - isExternalModule: () => isExternalModule, - isExternalModuleAugmentation: () => isExternalModuleAugmentation, - isExternalModuleImportEqualsDeclaration: () => isExternalModuleImportEqualsDeclaration, - isExternalModuleIndicator: () => isExternalModuleIndicator, - isExternalModuleNameRelative: () => isExternalModuleNameRelative, - isExternalModuleReference: () => isExternalModuleReference, - isExternalModuleSymbol: () => isExternalModuleSymbol, - isExternalOrCommonJsModule: () => isExternalOrCommonJsModule, - isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier, - isFileLevelUniqueName: () => isFileLevelUniqueName, - isFileProbablyExternalModule: () => isFileProbablyExternalModule, - isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter, - isFixablePromiseHandler: () => isFixablePromiseHandler, - isForInOrOfStatement: () => isForInOrOfStatement, - isForInStatement: () => isForInStatement, - isForInitializer: () => isForInitializer, - isForOfStatement: () => isForOfStatement, - isForStatement: () => isForStatement, - isFunctionBlock: () => isFunctionBlock, - isFunctionBody: () => isFunctionBody, - isFunctionDeclaration: () => isFunctionDeclaration, - isFunctionExpression: () => isFunctionExpression, - isFunctionExpressionOrArrowFunction: () => isFunctionExpressionOrArrowFunction, - isFunctionLike: () => isFunctionLike, - isFunctionLikeDeclaration: () => isFunctionLikeDeclaration, - isFunctionLikeKind: () => isFunctionLikeKind, - isFunctionLikeOrClassStaticBlockDeclaration: () => isFunctionLikeOrClassStaticBlockDeclaration, - isFunctionOrConstructorTypeNode: () => isFunctionOrConstructorTypeNode, - isFunctionOrModuleBlock: () => isFunctionOrModuleBlock, - isFunctionSymbol: () => isFunctionSymbol, - isFunctionTypeNode: () => isFunctionTypeNode, - isFutureReservedKeyword: () => isFutureReservedKeyword, - isGeneratedIdentifier: () => isGeneratedIdentifier, - isGeneratedPrivateIdentifier: () => isGeneratedPrivateIdentifier, - isGetAccessor: () => isGetAccessor, - isGetAccessorDeclaration: () => isGetAccessorDeclaration, - isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration, - isGlobalDeclaration: () => isGlobalDeclaration, - isGlobalScopeAugmentation: () => isGlobalScopeAugmentation, - isGrammarError: () => isGrammarError, - isHeritageClause: () => isHeritageClause, - isHoistedFunction: () => isHoistedFunction, - isHoistedVariableStatement: () => isHoistedVariableStatement, - isIdentifier: () => isIdentifier, - isIdentifierANonContextualKeyword: () => isIdentifierANonContextualKeyword, - isIdentifierName: () => isIdentifierName, - isIdentifierOrThisTypeNode: () => isIdentifierOrThisTypeNode, - isIdentifierPart: () => isIdentifierPart, - isIdentifierStart: () => isIdentifierStart, - isIdentifierText: () => isIdentifierText, - isIdentifierTypePredicate: () => isIdentifierTypePredicate, - isIdentifierTypeReference: () => isIdentifierTypeReference, - isIfStatement: () => isIfStatement, - isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching, - isImplicitGlob: () => isImplicitGlob, - isImportCall: () => isImportCall, - isImportClause: () => isImportClause, - isImportDeclaration: () => isImportDeclaration, - isImportEqualsDeclaration: () => isImportEqualsDeclaration, - isImportKeyword: () => isImportKeyword, - isImportMeta: () => isImportMeta, - isImportOrExportSpecifier: () => isImportOrExportSpecifier, - isImportOrExportSpecifierName: () => isImportOrExportSpecifierName, - isImportSpecifier: () => isImportSpecifier, - isImportTypeAssertionContainer: () => isImportTypeAssertionContainer, - isImportTypeNode: () => isImportTypeNode, - isImportableFile: () => isImportableFile, - isInComment: () => isInComment, - isInExpressionContext: () => isInExpressionContext, - isInJSDoc: () => isInJSDoc, - isInJSFile: () => isInJSFile, - isInJSXText: () => isInJSXText, - isInJsonFile: () => isInJsonFile, - isInNonReferenceComment: () => isInNonReferenceComment, - isInReferenceComment: () => isInReferenceComment, - isInRightSideOfInternalImportEqualsDeclaration: () => isInRightSideOfInternalImportEqualsDeclaration, - isInString: () => isInString, - isInTemplateString: () => isInTemplateString, - isInTopLevelContext: () => isInTopLevelContext, - isInTypeQuery: () => isInTypeQuery, - isIncrementalCompilation: () => isIncrementalCompilation, - isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, - isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, - isInferTypeNode: () => isInferTypeNode, - isInfinityOrNaNString: () => isInfinityOrNaNString, - isInitializedProperty: () => isInitializedProperty, - isInitializedVariable: () => isInitializedVariable, - isInsideJsxElement: () => isInsideJsxElement, - isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute, - isInsideNodeModules: () => isInsideNodeModules, - isInsideTemplateLiteral: () => isInsideTemplateLiteral, - isInstantiatedModule: () => isInstantiatedModule, - isInterfaceDeclaration: () => isInterfaceDeclaration, - isInternalDeclaration: () => isInternalDeclaration, - isInternalModuleImportEqualsDeclaration: () => isInternalModuleImportEqualsDeclaration, - isInternalName: () => isInternalName, - isIntersectionTypeNode: () => isIntersectionTypeNode, - isIntrinsicJsxName: () => isIntrinsicJsxName, - isIterationStatement: () => isIterationStatement, - isJSDoc: () => isJSDoc, - isJSDocAllType: () => isJSDocAllType, - isJSDocAugmentsTag: () => isJSDocAugmentsTag, - isJSDocAuthorTag: () => isJSDocAuthorTag, - isJSDocCallbackTag: () => isJSDocCallbackTag, - isJSDocClassTag: () => isJSDocClassTag, - isJSDocCommentContainingNode: () => isJSDocCommentContainingNode, - isJSDocConstructSignature: () => isJSDocConstructSignature, - isJSDocDeprecatedTag: () => isJSDocDeprecatedTag, - isJSDocEnumTag: () => isJSDocEnumTag, - isJSDocFunctionType: () => isJSDocFunctionType, - isJSDocImplementsTag: () => isJSDocImplementsTag, - isJSDocIndexSignature: () => isJSDocIndexSignature, - isJSDocLikeText: () => isJSDocLikeText, - isJSDocLink: () => isJSDocLink, - isJSDocLinkCode: () => isJSDocLinkCode, - isJSDocLinkLike: () => isJSDocLinkLike, - isJSDocLinkPlain: () => isJSDocLinkPlain, - isJSDocMemberName: () => isJSDocMemberName, - isJSDocNameReference: () => isJSDocNameReference, - isJSDocNamepathType: () => isJSDocNamepathType, - isJSDocNamespaceBody: () => isJSDocNamespaceBody, - isJSDocNode: () => isJSDocNode, - isJSDocNonNullableType: () => isJSDocNonNullableType, - isJSDocNullableType: () => isJSDocNullableType, - isJSDocOptionalParameter: () => isJSDocOptionalParameter, - isJSDocOptionalType: () => isJSDocOptionalType, - isJSDocOverloadTag: () => isJSDocOverloadTag, - isJSDocOverrideTag: () => isJSDocOverrideTag, - isJSDocParameterTag: () => isJSDocParameterTag, - isJSDocPrivateTag: () => isJSDocPrivateTag, - isJSDocPropertyLikeTag: () => isJSDocPropertyLikeTag, - isJSDocPropertyTag: () => isJSDocPropertyTag, - isJSDocProtectedTag: () => isJSDocProtectedTag, - isJSDocPublicTag: () => isJSDocPublicTag, - isJSDocReadonlyTag: () => isJSDocReadonlyTag, - isJSDocReturnTag: () => isJSDocReturnTag, - isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression, - isJSDocSatisfiesTag: () => isJSDocSatisfiesTag, - isJSDocSeeTag: () => isJSDocSeeTag, - isJSDocSignature: () => isJSDocSignature, - isJSDocTag: () => isJSDocTag, - isJSDocTemplateTag: () => isJSDocTemplateTag, - isJSDocThisTag: () => isJSDocThisTag, - isJSDocThrowsTag: () => isJSDocThrowsTag, - isJSDocTypeAlias: () => isJSDocTypeAlias, - isJSDocTypeAssertion: () => isJSDocTypeAssertion, - isJSDocTypeExpression: () => isJSDocTypeExpression, - isJSDocTypeLiteral: () => isJSDocTypeLiteral, - isJSDocTypeTag: () => isJSDocTypeTag, - isJSDocTypedefTag: () => isJSDocTypedefTag, - isJSDocUnknownTag: () => isJSDocUnknownTag, - isJSDocUnknownType: () => isJSDocUnknownType, - isJSDocVariadicType: () => isJSDocVariadicType, - isJSXTagName: () => isJSXTagName, - isJsonEqual: () => isJsonEqual, - isJsonSourceFile: () => isJsonSourceFile, - isJsxAttribute: () => isJsxAttribute, - isJsxAttributeLike: () => isJsxAttributeLike, - isJsxAttributeName: () => isJsxAttributeName, - isJsxAttributes: () => isJsxAttributes, - isJsxChild: () => isJsxChild, - isJsxClosingElement: () => isJsxClosingElement, - isJsxClosingFragment: () => isJsxClosingFragment, - isJsxElement: () => isJsxElement, - isJsxExpression: () => isJsxExpression, - isJsxFragment: () => isJsxFragment, - isJsxNamespacedName: () => isJsxNamespacedName, - isJsxOpeningElement: () => isJsxOpeningElement, - isJsxOpeningFragment: () => isJsxOpeningFragment, - isJsxOpeningLikeElement: () => isJsxOpeningLikeElement, - isJsxOpeningLikeElementTagName: () => isJsxOpeningLikeElementTagName, - isJsxSelfClosingElement: () => isJsxSelfClosingElement, - isJsxSpreadAttribute: () => isJsxSpreadAttribute, - isJsxTagNameExpression: () => isJsxTagNameExpression, - isJsxText: () => isJsxText, - isJumpStatementTarget: () => isJumpStatementTarget, - isKeyword: () => isKeyword, - isKeywordOrPunctuation: () => isKeywordOrPunctuation, - isKnownSymbol: () => isKnownSymbol, - isLabelName: () => isLabelName, - isLabelOfLabeledStatement: () => isLabelOfLabeledStatement, - isLabeledStatement: () => isLabeledStatement, - isLateVisibilityPaintedStatement: () => isLateVisibilityPaintedStatement, - isLeftHandSideExpression: () => isLeftHandSideExpression, - isLeftHandSideOfAssignment: () => isLeftHandSideOfAssignment, - isLet: () => isLet, - isLineBreak: () => isLineBreak, - isLiteralComputedPropertyDeclarationName: () => isLiteralComputedPropertyDeclarationName, - isLiteralExpression: () => isLiteralExpression, - isLiteralExpressionOfObject: () => isLiteralExpressionOfObject, - isLiteralImportTypeNode: () => isLiteralImportTypeNode, - isLiteralKind: () => isLiteralKind, - isLiteralLikeAccess: () => isLiteralLikeAccess, - isLiteralLikeElementAccess: () => isLiteralLikeElementAccess, - isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess, - isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression, - isLiteralTypeLiteral: () => isLiteralTypeLiteral, - isLiteralTypeNode: () => isLiteralTypeNode, - isLocalName: () => isLocalName, - isLogicalOperator: () => isLogicalOperator, - isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression, - isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator, - isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression, - isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator, - isMappedTypeNode: () => isMappedTypeNode, - isMemberName: () => isMemberName, - isMetaProperty: () => isMetaProperty, - isMethodDeclaration: () => isMethodDeclaration, - isMethodOrAccessor: () => isMethodOrAccessor, - isMethodSignature: () => isMethodSignature, - isMinusToken: () => isMinusToken, - isMissingDeclaration: () => isMissingDeclaration, - isModifier: () => isModifier, - isModifierKind: () => isModifierKind, - isModifierLike: () => isModifierLike, - isModuleAugmentationExternal: () => isModuleAugmentationExternal, - isModuleBlock: () => isModuleBlock, - isModuleBody: () => isModuleBody, - isModuleDeclaration: () => isModuleDeclaration, - isModuleExportsAccessExpression: () => isModuleExportsAccessExpression, - isModuleIdentifier: () => isModuleIdentifier, - isModuleName: () => isModuleName, - isModuleOrEnumDeclaration: () => isModuleOrEnumDeclaration, - isModuleReference: () => isModuleReference, - isModuleSpecifierLike: () => isModuleSpecifierLike, - isModuleWithStringLiteralName: () => isModuleWithStringLiteralName, - isNameOfFunctionDeclaration: () => isNameOfFunctionDeclaration, - isNameOfModuleDeclaration: () => isNameOfModuleDeclaration, - isNamedClassElement: () => isNamedClassElement, - isNamedDeclaration: () => isNamedDeclaration, - isNamedEvaluation: () => isNamedEvaluation, - isNamedEvaluationSource: () => isNamedEvaluationSource, - isNamedExportBindings: () => isNamedExportBindings, - isNamedExports: () => isNamedExports, - isNamedImportBindings: () => isNamedImportBindings, - isNamedImports: () => isNamedImports, - isNamedImportsOrExports: () => isNamedImportsOrExports, - isNamedTupleMember: () => isNamedTupleMember, - isNamespaceBody: () => isNamespaceBody, - isNamespaceExport: () => isNamespaceExport, - isNamespaceExportDeclaration: () => isNamespaceExportDeclaration, - isNamespaceImport: () => isNamespaceImport, - isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, - isNewExpression: () => isNewExpression, - isNewExpressionTarget: () => isNewExpressionTarget, - isNightly: () => isNightly, - isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral, - isNode: () => isNode, - isNodeArray: () => isNodeArray, - isNodeArrayMultiLine: () => isNodeArrayMultiLine, - isNodeDescendantOf: () => isNodeDescendantOf, - isNodeKind: () => isNodeKind, - isNodeLikeSystem: () => isNodeLikeSystem, - isNodeModulesDirectory: () => isNodeModulesDirectory, - isNodeWithPossibleHoistedDeclaration: () => isNodeWithPossibleHoistedDeclaration, - isNonContextualKeyword: () => isNonContextualKeyword, - isNonExportDefaultModifier: () => isNonExportDefaultModifier, - isNonGlobalAmbientModule: () => isNonGlobalAmbientModule, - isNonGlobalDeclaration: () => isNonGlobalDeclaration, - isNonNullAccess: () => isNonNullAccess, - isNonNullChain: () => isNonNullChain, - isNonNullExpression: () => isNonNullExpression, - isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName, - isNotEmittedOrPartiallyEmittedNode: () => isNotEmittedOrPartiallyEmittedNode, - isNotEmittedStatement: () => isNotEmittedStatement, - isNullishCoalesce: () => isNullishCoalesce, - isNumber: () => isNumber, - isNumericLiteral: () => isNumericLiteral, - isNumericLiteralName: () => isNumericLiteralName, - isObjectBindingElementWithoutPropertyName: () => isObjectBindingElementWithoutPropertyName, - isObjectBindingOrAssignmentElement: () => isObjectBindingOrAssignmentElement, - isObjectBindingOrAssignmentPattern: () => isObjectBindingOrAssignmentPattern, - isObjectBindingPattern: () => isObjectBindingPattern, - isObjectLiteralElement: () => isObjectLiteralElement, - isObjectLiteralElementLike: () => isObjectLiteralElementLike, - isObjectLiteralExpression: () => isObjectLiteralExpression, - isObjectLiteralMethod: () => isObjectLiteralMethod, - isObjectLiteralOrClassExpressionMethodOrAccessor: () => isObjectLiteralOrClassExpressionMethodOrAccessor, - isObjectTypeDeclaration: () => isObjectTypeDeclaration, - isOctalDigit: () => isOctalDigit, - isOmittedExpression: () => isOmittedExpression, - isOptionalChain: () => isOptionalChain, - isOptionalChainRoot: () => isOptionalChainRoot, - isOptionalDeclaration: () => isOptionalDeclaration, - isOptionalJSDocPropertyLikeTag: () => isOptionalJSDocPropertyLikeTag, - isOptionalTypeNode: () => isOptionalTypeNode, - isOuterExpression: () => isOuterExpression, - isOutermostOptionalChain: () => isOutermostOptionalChain, - isOverrideModifier: () => isOverrideModifier, - isPackedArrayLiteral: () => isPackedArrayLiteral, - isParameter: () => isParameter, - isParameterDeclaration: () => isParameterDeclaration, - isParameterOrCatchClauseVariable: () => isParameterOrCatchClauseVariable, - isParameterPropertyDeclaration: () => isParameterPropertyDeclaration, - isParameterPropertyModifier: () => isParameterPropertyModifier, - isParenthesizedExpression: () => isParenthesizedExpression, - isParenthesizedTypeNode: () => isParenthesizedTypeNode, - isParseTreeNode: () => isParseTreeNode, - isPartOfTypeNode: () => isPartOfTypeNode, - isPartOfTypeQuery: () => isPartOfTypeQuery, - isPartiallyEmittedExpression: () => isPartiallyEmittedExpression, - isPatternMatch: () => isPatternMatch, - isPinnedComment: () => isPinnedComment, - isPlainJsFile: () => isPlainJsFile, - isPlusToken: () => isPlusToken, - isPossiblyTypeArgumentPosition: () => isPossiblyTypeArgumentPosition, - isPostfixUnaryExpression: () => isPostfixUnaryExpression, - isPrefixUnaryExpression: () => isPrefixUnaryExpression, - isPrivateIdentifier: () => isPrivateIdentifier, - isPrivateIdentifierClassElementDeclaration: () => isPrivateIdentifierClassElementDeclaration, - isPrivateIdentifierPropertyAccessExpression: () => isPrivateIdentifierPropertyAccessExpression, - isPrivateIdentifierSymbol: () => isPrivateIdentifierSymbol, - isProgramBundleEmitBuildInfo: () => isProgramBundleEmitBuildInfo, - isProgramUptoDate: () => isProgramUptoDate, - isPrologueDirective: () => isPrologueDirective, - isPropertyAccessChain: () => isPropertyAccessChain, - isPropertyAccessEntityNameExpression: () => isPropertyAccessEntityNameExpression, - isPropertyAccessExpression: () => isPropertyAccessExpression, - isPropertyAccessOrQualifiedName: () => isPropertyAccessOrQualifiedName, - isPropertyAccessOrQualifiedNameOrImportTypeNode: () => isPropertyAccessOrQualifiedNameOrImportTypeNode, - isPropertyAssignment: () => isPropertyAssignment, - isPropertyDeclaration: () => isPropertyDeclaration, - isPropertyName: () => isPropertyName, - isPropertyNameLiteral: () => isPropertyNameLiteral, - isPropertySignature: () => isPropertySignature, - isProtoSetter: () => isProtoSetter, - isPrototypeAccess: () => isPrototypeAccess, - isPrototypePropertyAssignment: () => isPrototypePropertyAssignment, - isPunctuation: () => isPunctuation, - isPushOrUnshiftIdentifier: () => isPushOrUnshiftIdentifier, - isQualifiedName: () => isQualifiedName, - isQuestionDotToken: () => isQuestionDotToken, - isQuestionOrExclamationToken: () => isQuestionOrExclamationToken, - isQuestionOrPlusOrMinusToken: () => isQuestionOrPlusOrMinusToken, - isQuestionToken: () => isQuestionToken, - isRawSourceMap: () => isRawSourceMap, - isReadonlyKeyword: () => isReadonlyKeyword, - isReadonlyKeywordOrPlusOrMinusToken: () => isReadonlyKeywordOrPlusOrMinusToken, - isRecognizedTripleSlashComment: () => isRecognizedTripleSlashComment, - isReferenceFileLocation: () => isReferenceFileLocation, - isReferencedFile: () => isReferencedFile, - isRegularExpressionLiteral: () => isRegularExpressionLiteral, - isRequireCall: () => isRequireCall, - isRequireVariableStatement: () => isRequireVariableStatement, - isRestParameter: () => isRestParameter, - isRestTypeNode: () => isRestTypeNode, - isReturnStatement: () => isReturnStatement, - isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler, - isRightSideOfAccessExpression: () => isRightSideOfAccessExpression, - isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess, - isRightSideOfQualifiedName: () => isRightSideOfQualifiedName, - isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess, - isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName, - isRootedDiskPath: () => isRootedDiskPath, - isSameEntityName: () => isSameEntityName, - isSatisfiesExpression: () => isSatisfiesExpression, - isScopeMarker: () => isScopeMarker, - isSemicolonClassElement: () => isSemicolonClassElement, - isSetAccessor: () => isSetAccessor, - isSetAccessorDeclaration: () => isSetAccessorDeclaration, - isShebangTrivia: () => isShebangTrivia, - isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, - isShorthandPropertyAssignment: () => isShorthandPropertyAssignment, - isSignedNumericLiteral: () => isSignedNumericLiteral, - isSimpleCopiableExpression: () => isSimpleCopiableExpression, - isSimpleInlineableExpression: () => isSimpleInlineableExpression, - isSingleOrDoubleQuote: () => isSingleOrDoubleQuote, - isSourceFile: () => isSourceFile, - isSourceFileFromLibrary: () => isSourceFileFromLibrary, - isSourceFileJS: () => isSourceFileJS, - isSourceFileNotJS: () => isSourceFileNotJS, - isSourceFileNotJson: () => isSourceFileNotJson, - isSourceMapping: () => isSourceMapping, - isSpecialPropertyDeclaration: () => isSpecialPropertyDeclaration, - isSpreadAssignment: () => isSpreadAssignment, - isSpreadElement: () => isSpreadElement, - isStatement: () => isStatement, - isStatementButNotDeclaration: () => isStatementButNotDeclaration, - isStatementOrBlock: () => isStatementOrBlock, - isStatementWithLocals: () => isStatementWithLocals, - isStatic: () => isStatic, - isStaticModifier: () => isStaticModifier, - isString: () => isString, - isStringAKeyword: () => isStringAKeyword, - isStringANonContextualKeyword: () => isStringANonContextualKeyword, - isStringAndEmptyAnonymousObjectIntersection: () => isStringAndEmptyAnonymousObjectIntersection, - isStringDoubleQuoted: () => isStringDoubleQuoted, - isStringLiteral: () => isStringLiteral, - isStringLiteralLike: () => isStringLiteralLike, - isStringLiteralOrJsxExpression: () => isStringLiteralOrJsxExpression, - isStringLiteralOrTemplate: () => isStringLiteralOrTemplate, - isStringOrNumericLiteralLike: () => isStringOrNumericLiteralLike, - isStringOrRegularExpressionOrTemplateLiteral: () => isStringOrRegularExpressionOrTemplateLiteral, - isStringTextContainingNode: () => isStringTextContainingNode, - isSuperCall: () => isSuperCall, - isSuperKeyword: () => isSuperKeyword, - isSuperOrSuperProperty: () => isSuperOrSuperProperty, - isSuperProperty: () => isSuperProperty, - isSupportedSourceFileName: () => isSupportedSourceFileName, - isSwitchStatement: () => isSwitchStatement, - isSyntaxList: () => isSyntaxList, - isSyntheticExpression: () => isSyntheticExpression, - isSyntheticReference: () => isSyntheticReference, - isTagName: () => isTagName, - isTaggedTemplateExpression: () => isTaggedTemplateExpression, - isTaggedTemplateTag: () => isTaggedTemplateTag, - isTemplateExpression: () => isTemplateExpression, - isTemplateHead: () => isTemplateHead, - isTemplateLiteral: () => isTemplateLiteral, - isTemplateLiteralKind: () => isTemplateLiteralKind, - isTemplateLiteralToken: () => isTemplateLiteralToken, - isTemplateLiteralTypeNode: () => isTemplateLiteralTypeNode, - isTemplateLiteralTypeSpan: () => isTemplateLiteralTypeSpan, - isTemplateMiddle: () => isTemplateMiddle, - isTemplateMiddleOrTemplateTail: () => isTemplateMiddleOrTemplateTail, - isTemplateSpan: () => isTemplateSpan, - isTemplateTail: () => isTemplateTail, - isTextWhiteSpaceLike: () => isTextWhiteSpaceLike, - isThis: () => isThis, - isThisContainerOrFunctionBlock: () => isThisContainerOrFunctionBlock, - isThisIdentifier: () => isThisIdentifier, - isThisInTypeQuery: () => isThisInTypeQuery, - isThisInitializedDeclaration: () => isThisInitializedDeclaration, - isThisInitializedObjectBindingExpression: () => isThisInitializedObjectBindingExpression, - isThisProperty: () => isThisProperty, - isThisTypeNode: () => isThisTypeNode, - isThisTypeParameter: () => isThisTypeParameter, - isThisTypePredicate: () => isThisTypePredicate, - isThrowStatement: () => isThrowStatement, - isToken: () => isToken, - isTokenKind: () => isTokenKind, - isTraceEnabled: () => isTraceEnabled, - isTransientSymbol: () => isTransientSymbol, - isTrivia: () => isTrivia, - isTryStatement: () => isTryStatement, - isTupleTypeNode: () => isTupleTypeNode, - isTypeAlias: () => isTypeAlias, - isTypeAliasDeclaration: () => isTypeAliasDeclaration, - isTypeAssertionExpression: () => isTypeAssertionExpression, - isTypeDeclaration: () => isTypeDeclaration, - isTypeElement: () => isTypeElement, - isTypeKeyword: () => isTypeKeyword, - isTypeKeywordToken: () => isTypeKeywordToken, - isTypeKeywordTokenOrIdentifier: () => isTypeKeywordTokenOrIdentifier, - isTypeLiteralNode: () => isTypeLiteralNode, - isTypeNode: () => isTypeNode, - isTypeNodeKind: () => isTypeNodeKind, - isTypeOfExpression: () => isTypeOfExpression, - isTypeOnlyExportDeclaration: () => isTypeOnlyExportDeclaration, - isTypeOnlyImportDeclaration: () => isTypeOnlyImportDeclaration, - isTypeOnlyImportOrExportDeclaration: () => isTypeOnlyImportOrExportDeclaration, - isTypeOperatorNode: () => isTypeOperatorNode, - isTypeParameterDeclaration: () => isTypeParameterDeclaration, - isTypePredicateNode: () => isTypePredicateNode, - isTypeQueryNode: () => isTypeQueryNode, - isTypeReferenceNode: () => isTypeReferenceNode, - isTypeReferenceType: () => isTypeReferenceType, - isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName, - isUMDExportSymbol: () => isUMDExportSymbol, - isUnaryExpression: () => isUnaryExpression, - isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite, - isUnicodeIdentifierStart: () => isUnicodeIdentifierStart, - isUnionTypeNode: () => isUnionTypeNode, - isUnparsedNode: () => isUnparsedNode, - isUnparsedPrepend: () => isUnparsedPrepend, - isUnparsedSource: () => isUnparsedSource, - isUnparsedTextLike: () => isUnparsedTextLike, - isUrl: () => isUrl, - isValidBigIntString: () => isValidBigIntString, - isValidESSymbolDeclaration: () => isValidESSymbolDeclaration, - isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite, - isValueSignatureDeclaration: () => isValueSignatureDeclaration, - isVarAwaitUsing: () => isVarAwaitUsing, - isVarConst: () => isVarConst, - isVarUsing: () => isVarUsing, - isVariableDeclaration: () => isVariableDeclaration, - isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement, - isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire, - isVariableDeclarationInitializedToRequire: () => isVariableDeclarationInitializedToRequire, - isVariableDeclarationList: () => isVariableDeclarationList, - isVariableLike: () => isVariableLike, - isVariableLikeOrAccessor: () => isVariableLikeOrAccessor, - isVariableStatement: () => isVariableStatement, - isVoidExpression: () => isVoidExpression, - isWatchSet: () => isWatchSet, - isWhileStatement: () => isWhileStatement, - isWhiteSpaceLike: () => isWhiteSpaceLike, - isWhiteSpaceSingleLine: () => isWhiteSpaceSingleLine, - isWithStatement: () => isWithStatement, - isWriteAccess: () => isWriteAccess, - isWriteOnlyAccess: () => isWriteOnlyAccess, - isYieldExpression: () => isYieldExpression, - jsxModeNeedsExplicitImport: () => jsxModeNeedsExplicitImport, - keywordPart: () => keywordPart, - last: () => last, - lastOrUndefined: () => lastOrUndefined, - length: () => length, - libMap: () => libMap, - libs: () => libs, - lineBreakPart: () => lineBreakPart, - linkNamePart: () => linkNamePart, - linkPart: () => linkPart, - linkTextPart: () => linkTextPart, - listFiles: () => listFiles, - loadModuleFromGlobalCache: () => loadModuleFromGlobalCache, - loadWithModeAwareCache: () => loadWithModeAwareCache, - makeIdentifierFromModuleName: () => makeIdentifierFromModuleName, - makeImport: () => makeImport, - makeImportIfNecessary: () => makeImportIfNecessary, - makeStringLiteral: () => makeStringLiteral, - mangleScopedPackageName: () => mangleScopedPackageName, - map: () => map, - mapAllOrFail: () => mapAllOrFail, - mapDefined: () => mapDefined, - mapDefinedEntries: () => mapDefinedEntries, - mapDefinedIterator: () => mapDefinedIterator, - mapEntries: () => mapEntries, - mapIterator: () => mapIterator, - mapOneOrMany: () => mapOneOrMany, - mapToDisplayParts: () => mapToDisplayParts, - matchFiles: () => matchFiles, - matchPatternOrExact: () => matchPatternOrExact, - matchedText: () => matchedText, - matchesExclude: () => matchesExclude, - maybeBind: () => maybeBind, - maybeSetLocalizedDiagnosticMessages: () => maybeSetLocalizedDiagnosticMessages, - memoize: () => memoize, - memoizeCached: () => memoizeCached, - memoizeOne: () => memoizeOne, - memoizeWeak: () => memoizeWeak, - metadataHelper: () => metadataHelper, - min: () => min, - minAndMax: () => minAndMax, - missingFileModifiedTime: () => missingFileModifiedTime, - modifierToFlag: () => modifierToFlag, - modifiersToFlags: () => modifiersToFlags, - moduleOptionDeclaration: () => moduleOptionDeclaration, - moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo, - moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter, - moduleResolutionOptionDeclarations: () => moduleResolutionOptionDeclarations, - moduleResolutionSupportsPackageJsonExportsAndImports: () => moduleResolutionSupportsPackageJsonExportsAndImports, - moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules, - moduleSpecifiers: () => ts_moduleSpecifiers_exports, - moveEmitHelpers: () => moveEmitHelpers, - moveRangeEnd: () => moveRangeEnd, - moveRangePastDecorators: () => moveRangePastDecorators, - moveRangePastModifiers: () => moveRangePastModifiers, - moveRangePos: () => moveRangePos, - moveSyntheticComments: () => moveSyntheticComments, - mutateMap: () => mutateMap, - mutateMapSkippingNewValues: () => mutateMapSkippingNewValues, - needsParentheses: () => needsParentheses, - needsScopeMarker: () => needsScopeMarker, - newCaseClauseTracker: () => newCaseClauseTracker, - newPrivateEnvironment: () => newPrivateEnvironment, - noEmitNotification: () => noEmitNotification, - noEmitSubstitution: () => noEmitSubstitution, - noTransformers: () => noTransformers, - noTruncationMaximumTruncationLength: () => noTruncationMaximumTruncationLength, - nodeCanBeDecorated: () => nodeCanBeDecorated, - nodeHasName: () => nodeHasName, - nodeIsDecorated: () => nodeIsDecorated, - nodeIsMissing: () => nodeIsMissing, - nodeIsPresent: () => nodeIsPresent, - nodeIsSynthesized: () => nodeIsSynthesized, - nodeModuleNameResolver: () => nodeModuleNameResolver, - nodeModulesPathPart: () => nodeModulesPathPart, - nodeNextJsonConfigResolver: () => nodeNextJsonConfigResolver, - nodeOrChildIsDecorated: () => nodeOrChildIsDecorated, - nodeOverlapsWithStartEnd: () => nodeOverlapsWithStartEnd, - nodePosToString: () => nodePosToString, - nodeSeenTracker: () => nodeSeenTracker, - nodeStartsNewLexicalEnvironment: () => nodeStartsNewLexicalEnvironment, - nodeToDisplayParts: () => nodeToDisplayParts, - noop: () => noop, - noopFileWatcher: () => noopFileWatcher, - normalizePath: () => normalizePath, - normalizeSlashes: () => normalizeSlashes, - not: () => not, - notImplemented: () => notImplemented, - notImplementedResolver: () => notImplementedResolver, - nullNodeConverters: () => nullNodeConverters, - nullParenthesizerRules: () => nullParenthesizerRules, - nullTransformationContext: () => nullTransformationContext, - objectAllocator: () => objectAllocator, - operatorPart: () => operatorPart, - optionDeclarations: () => optionDeclarations, - optionMapToObject: () => optionMapToObject, - optionsAffectingProgramStructure: () => optionsAffectingProgramStructure, - optionsForBuild: () => optionsForBuild, - optionsForWatch: () => optionsForWatch, - optionsHaveChanges: () => optionsHaveChanges, - optionsHaveModuleResolutionChanges: () => optionsHaveModuleResolutionChanges, - or: () => or, - orderedRemoveItem: () => orderedRemoveItem, - orderedRemoveItemAt: () => orderedRemoveItemAt, - outFile: () => outFile, - packageIdToPackageName: () => packageIdToPackageName, - packageIdToString: () => packageIdToString, - padLeft: () => padLeft, - padRight: () => padRight, - paramHelper: () => paramHelper, - parameterIsThisKeyword: () => parameterIsThisKeyword, - parameterNamePart: () => parameterNamePart, - parseBaseNodeFactory: () => parseBaseNodeFactory, - parseBigInt: () => parseBigInt, - parseBuildCommand: () => parseBuildCommand, - parseCommandLine: () => parseCommandLine, - parseCommandLineWorker: () => parseCommandLineWorker, - parseConfigFileTextToJson: () => parseConfigFileTextToJson, - parseConfigFileWithSystem: () => parseConfigFileWithSystem, - parseConfigHostFromCompilerHostLike: () => parseConfigHostFromCompilerHostLike, - parseCustomTypeOption: () => parseCustomTypeOption, - parseIsolatedEntityName: () => parseIsolatedEntityName, - parseIsolatedJSDocComment: () => parseIsolatedJSDocComment, - parseJSDocTypeExpressionForTests: () => parseJSDocTypeExpressionForTests, - parseJsonConfigFileContent: () => parseJsonConfigFileContent, - parseJsonSourceFileConfigFileContent: () => parseJsonSourceFileConfigFileContent, - parseJsonText: () => parseJsonText, - parseListTypeOption: () => parseListTypeOption, - parseNodeFactory: () => parseNodeFactory, - parseNodeModuleFromPath: () => parseNodeModuleFromPath, - parsePackageName: () => parsePackageName, - parsePseudoBigInt: () => parsePseudoBigInt, - parseValidBigInt: () => parseValidBigInt, - patchWriteFileEnsuringDirectory: () => patchWriteFileEnsuringDirectory, - pathContainsNodeModules: () => pathContainsNodeModules, - pathIsAbsolute: () => pathIsAbsolute, - pathIsBareSpecifier: () => pathIsBareSpecifier, - pathIsRelative: () => pathIsRelative, - patternText: () => patternText, - perfLogger: () => perfLogger, - performIncrementalCompilation: () => performIncrementalCompilation, - performance: () => ts_performance_exports, - plainJSErrors: () => plainJSErrors, - positionBelongsToNode: () => positionBelongsToNode, - positionIsASICandidate: () => positionIsASICandidate, - positionIsSynthesized: () => positionIsSynthesized, - positionsAreOnSameLine: () => positionsAreOnSameLine, - preProcessFile: () => preProcessFile, - probablyUsesSemicolons: () => probablyUsesSemicolons, - processCommentPragmas: () => processCommentPragmas, - processPragmasIntoFields: () => processPragmasIntoFields, - processTaggedTemplateExpression: () => processTaggedTemplateExpression, - programContainsEsModules: () => programContainsEsModules, - programContainsModules: () => programContainsModules, - projectReferenceIsEqualTo: () => projectReferenceIsEqualTo, - propKeyHelper: () => propKeyHelper, - propertyNamePart: () => propertyNamePart, - pseudoBigIntToString: () => pseudoBigIntToString, - punctuationPart: () => punctuationPart, - pushIfUnique: () => pushIfUnique, - quote: () => quote, - quotePreferenceFromString: () => quotePreferenceFromString, - rangeContainsPosition: () => rangeContainsPosition, - rangeContainsPositionExclusive: () => rangeContainsPositionExclusive, - rangeContainsRange: () => rangeContainsRange, - rangeContainsRangeExclusive: () => rangeContainsRangeExclusive, - rangeContainsStartEnd: () => rangeContainsStartEnd, - rangeEndIsOnSameLineAsRangeStart: () => rangeEndIsOnSameLineAsRangeStart, - rangeEndPositionsAreOnSameLine: () => rangeEndPositionsAreOnSameLine, - rangeEquals: () => rangeEquals, - rangeIsOnSingleLine: () => rangeIsOnSingleLine, - rangeOfNode: () => rangeOfNode, - rangeOfTypeParameters: () => rangeOfTypeParameters, - rangeOverlapsWithStartEnd: () => rangeOverlapsWithStartEnd, - rangeStartIsOnSameLineAsRangeEnd: () => rangeStartIsOnSameLineAsRangeEnd, - rangeStartPositionsAreOnSameLine: () => rangeStartPositionsAreOnSameLine, - readBuilderProgram: () => readBuilderProgram, - readConfigFile: () => readConfigFile, - readHelper: () => readHelper, - readJson: () => readJson, - readJsonConfigFile: () => readJsonConfigFile, - readJsonOrUndefined: () => readJsonOrUndefined, - realizeDiagnostics: () => realizeDiagnostics, - reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange, - reduceEachTrailingCommentRange: () => reduceEachTrailingCommentRange, - reduceLeft: () => reduceLeft, - reduceLeftIterator: () => reduceLeftIterator, - reducePathComponents: () => reducePathComponents, - refactor: () => ts_refactor_exports, - regExpEscape: () => regExpEscape, - relativeComplement: () => relativeComplement, - removeAllComments: () => removeAllComments, - removeEmitHelper: () => removeEmitHelper, - removeExtension: () => removeExtension, - removeFileExtension: () => removeFileExtension, - removeIgnoredPath: () => removeIgnoredPath, - removeMinAndVersionNumbers: () => removeMinAndVersionNumbers, - removeOptionality: () => removeOptionality, - removePrefix: () => removePrefix, - removeSuffix: () => removeSuffix, - removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator, - repeatString: () => repeatString, - replaceElement: () => replaceElement, - resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson, - resolveConfigFileProjectName: () => resolveConfigFileProjectName, - resolveJSModule: () => resolveJSModule, - resolveLibrary: () => resolveLibrary, - resolveModuleName: () => resolveModuleName, - resolveModuleNameFromCache: () => resolveModuleNameFromCache, - resolvePackageNameToPackageJson: () => resolvePackageNameToPackageJson, - resolvePath: () => resolvePath, - resolveProjectReferencePath: () => resolveProjectReferencePath, - resolveTripleslashReference: () => resolveTripleslashReference, - resolveTypeReferenceDirective: () => resolveTypeReferenceDirective, - resolvingEmptyArray: () => resolvingEmptyArray, - restHelper: () => restHelper, - returnFalse: () => returnFalse, - returnNoopFileWatcher: () => returnNoopFileWatcher, - returnTrue: () => returnTrue, - returnUndefined: () => returnUndefined, - returnsPromise: () => returnsPromise, - runInitializersHelper: () => runInitializersHelper, - sameFlatMap: () => sameFlatMap, - sameMap: () => sameMap, - sameMapping: () => sameMapping, - scanShebangTrivia: () => scanShebangTrivia, - scanTokenAtPosition: () => scanTokenAtPosition, - scanner: () => scanner, - screenStartingMessageCodes: () => screenStartingMessageCodes, - semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations, - serializeCompilerOptions: () => serializeCompilerOptions, - server: () => ts_server_exports4, - servicesVersion: () => servicesVersion, - setCommentRange: () => setCommentRange, - setConfigFileInOptions: () => setConfigFileInOptions, - setConstantValue: () => setConstantValue, - setEachParent: () => setEachParent, - setEmitFlags: () => setEmitFlags, - setFunctionNameHelper: () => setFunctionNameHelper, - setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned, - setIdentifierAutoGenerate: () => setIdentifierAutoGenerate, - setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference, - setIdentifierTypeArguments: () => setIdentifierTypeArguments, - setInternalEmitFlags: () => setInternalEmitFlags, - setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages, - setModuleDefaultHelper: () => setModuleDefaultHelper, - setNodeFlags: () => setNodeFlags, - setObjectAllocator: () => setObjectAllocator, - setOriginalNode: () => setOriginalNode, - setParent: () => setParent, - setParentRecursive: () => setParentRecursive, - setPrivateIdentifier: () => setPrivateIdentifier, - setResolvedModule: () => setResolvedModule, - setResolvedTypeReferenceDirective: () => setResolvedTypeReferenceDirective, - setSnippetElement: () => setSnippetElement, - setSourceMapRange: () => setSourceMapRange, - setStackTraceLimit: () => setStackTraceLimit, - setStartsOnNewLine: () => setStartsOnNewLine, - setSyntheticLeadingComments: () => setSyntheticLeadingComments, - setSyntheticTrailingComments: () => setSyntheticTrailingComments, - setSys: () => setSys, - setSysLog: () => setSysLog, - setTextRange: () => setTextRange, - setTextRangeEnd: () => setTextRangeEnd, - setTextRangePos: () => setTextRangePos, - setTextRangePosEnd: () => setTextRangePosEnd, - setTextRangePosWidth: () => setTextRangePosWidth, - setTokenSourceMapRange: () => setTokenSourceMapRange, - setTypeNode: () => setTypeNode, - setUILocale: () => setUILocale, - setValueDeclaration: () => setValueDeclaration, - shouldAllowImportingTsExtension: () => shouldAllowImportingTsExtension, - shouldPreserveConstEnums: () => shouldPreserveConstEnums, - shouldResolveJsRequire: () => shouldResolveJsRequire, - shouldUseUriStyleNodeCoreModules: () => shouldUseUriStyleNodeCoreModules, - showModuleSpecifier: () => showModuleSpecifier, - signatureHasLiteralTypes: () => signatureHasLiteralTypes, - signatureHasRestParameter: () => signatureHasRestParameter, - signatureToDisplayParts: () => signatureToDisplayParts, - single: () => single, - singleElementArray: () => singleElementArray, - singleIterator: () => singleIterator, - singleOrMany: () => singleOrMany, - singleOrUndefined: () => singleOrUndefined, - skipAlias: () => skipAlias, - skipAssertions: () => skipAssertions, - skipConstraint: () => skipConstraint, - skipOuterExpressions: () => skipOuterExpressions, - skipParentheses: () => skipParentheses, - skipPartiallyEmittedExpressions: () => skipPartiallyEmittedExpressions, - skipTrivia: () => skipTrivia, - skipTypeChecking: () => skipTypeChecking, - skipTypeParentheses: () => skipTypeParentheses, - skipWhile: () => skipWhile, - sliceAfter: () => sliceAfter, - some: () => some, - sort: () => sort, - sortAndDeduplicate: () => sortAndDeduplicate, - sortAndDeduplicateDiagnostics: () => sortAndDeduplicateDiagnostics, - sourceFileAffectingCompilerOptions: () => sourceFileAffectingCompilerOptions, - sourceFileMayBeEmitted: () => sourceFileMayBeEmitted, - sourceMapCommentRegExp: () => sourceMapCommentRegExp, - sourceMapCommentRegExpDontCareLineStart: () => sourceMapCommentRegExpDontCareLineStart, - spacePart: () => spacePart, - spanMap: () => spanMap, - spreadArrayHelper: () => spreadArrayHelper, - stableSort: () => stableSort, - startEndContainsRange: () => startEndContainsRange, - startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd, - startOnNewLine: () => startOnNewLine, - startTracing: () => startTracing, - startsWith: () => startsWith, - startsWithDirectory: () => startsWithDirectory, - startsWithUnderscore: () => startsWithUnderscore, - startsWithUseStrict: () => startsWithUseStrict, - stringContains: () => stringContains, - stringContainsAt: () => stringContainsAt, - stringToToken: () => stringToToken, - stripQuotes: () => stripQuotes, - supportedDeclarationExtensions: () => supportedDeclarationExtensions, - supportedJSExtensions: () => supportedJSExtensions, - supportedJSExtensionsFlat: () => supportedJSExtensionsFlat, - supportedLocaleDirectories: () => supportedLocaleDirectories, - supportedTSExtensions: () => supportedTSExtensions, - supportedTSExtensionsFlat: () => supportedTSExtensionsFlat, - supportedTSImplementationExtensions: () => supportedTSImplementationExtensions, - suppressLeadingAndTrailingTrivia: () => suppressLeadingAndTrailingTrivia, - suppressLeadingTrivia: () => suppressLeadingTrivia, - suppressTrailingTrivia: () => suppressTrailingTrivia, - symbolEscapedNameNoDefault: () => symbolEscapedNameNoDefault, - symbolName: () => symbolName, - symbolNameNoDefault: () => symbolNameNoDefault, - symbolPart: () => symbolPart, - symbolToDisplayParts: () => symbolToDisplayParts, - syntaxMayBeASICandidate: () => syntaxMayBeASICandidate, - syntaxRequiresTrailingSemicolonOrASI: () => syntaxRequiresTrailingSemicolonOrASI, - sys: () => sys, - sysLog: () => sysLog, - tagNamesAreEquivalent: () => tagNamesAreEquivalent, - takeWhile: () => takeWhile, - targetOptionDeclaration: () => targetOptionDeclaration, - templateObjectHelper: () => templateObjectHelper, - testFormatSettings: () => testFormatSettings, - textChangeRangeIsUnchanged: () => textChangeRangeIsUnchanged, - textChangeRangeNewSpan: () => textChangeRangeNewSpan, - textChanges: () => ts_textChanges_exports, - textOrKeywordPart: () => textOrKeywordPart, - textPart: () => textPart, - textRangeContainsPositionInclusive: () => textRangeContainsPositionInclusive, - textSpanContainsPosition: () => textSpanContainsPosition, - textSpanContainsTextSpan: () => textSpanContainsTextSpan, - textSpanEnd: () => textSpanEnd, - textSpanIntersection: () => textSpanIntersection, - textSpanIntersectsWith: () => textSpanIntersectsWith, - textSpanIntersectsWithPosition: () => textSpanIntersectsWithPosition, - textSpanIntersectsWithTextSpan: () => textSpanIntersectsWithTextSpan, - textSpanIsEmpty: () => textSpanIsEmpty, - textSpanOverlap: () => textSpanOverlap, - textSpanOverlapsWith: () => textSpanOverlapsWith, - textSpansEqual: () => textSpansEqual, - textToKeywordObj: () => textToKeywordObj, - timestamp: () => timestamp, - toArray: () => toArray, - toBuilderFileEmit: () => toBuilderFileEmit, - toBuilderStateFileInfoForMultiEmit: () => toBuilderStateFileInfoForMultiEmit, - toEditorSettings: () => toEditorSettings, - toFileNameLowerCase: () => toFileNameLowerCase, - toLowerCase: () => toLowerCase, - toPath: () => toPath, - toProgramEmitPending: () => toProgramEmitPending, - tokenIsIdentifierOrKeyword: () => tokenIsIdentifierOrKeyword, - tokenIsIdentifierOrKeywordOrGreaterThan: () => tokenIsIdentifierOrKeywordOrGreaterThan, - tokenToString: () => tokenToString, - trace: () => trace, - tracing: () => tracing, - tracingEnabled: () => tracingEnabled, - transform: () => transform, - transformClassFields: () => transformClassFields, - transformDeclarations: () => transformDeclarations, - transformECMAScriptModule: () => transformECMAScriptModule, - transformES2015: () => transformES2015, - transformES2016: () => transformES2016, - transformES2017: () => transformES2017, - transformES2018: () => transformES2018, - transformES2019: () => transformES2019, - transformES2020: () => transformES2020, - transformES2021: () => transformES2021, - transformES5: () => transformES5, - transformESDecorators: () => transformESDecorators, - transformESNext: () => transformESNext, - transformGenerators: () => transformGenerators, - transformJsx: () => transformJsx, - transformLegacyDecorators: () => transformLegacyDecorators, - transformModule: () => transformModule, - transformNamedEvaluation: () => transformNamedEvaluation, - transformNodeModule: () => transformNodeModule, - transformNodes: () => transformNodes, - transformSystemModule: () => transformSystemModule, - transformTypeScript: () => transformTypeScript, - transpile: () => transpile, - transpileModule: () => transpileModule, - transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions, - trimString: () => trimString, - trimStringEnd: () => trimStringEnd, - trimStringStart: () => trimStringStart, - tryAddToSet: () => tryAddToSet, - tryAndIgnoreErrors: () => tryAndIgnoreErrors, - tryCast: () => tryCast, - tryDirectoryExists: () => tryDirectoryExists, - tryExtractTSExtension: () => tryExtractTSExtension, - tryFileExists: () => tryFileExists, - tryGetClassExtendingExpressionWithTypeArguments: () => tryGetClassExtendingExpressionWithTypeArguments, - tryGetClassImplementingOrExtendingExpressionWithTypeArguments: () => tryGetClassImplementingOrExtendingExpressionWithTypeArguments, - tryGetDirectories: () => tryGetDirectories, - tryGetExtensionFromPath: () => tryGetExtensionFromPath2, - tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier, - tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode, - tryGetModuleNameFromFile: () => tryGetModuleNameFromFile, - tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration, - tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks, - tryGetPropertyAccessOrIdentifierToString: () => tryGetPropertyAccessOrIdentifierToString, - tryGetPropertyNameOfBindingOrAssignmentElement: () => tryGetPropertyNameOfBindingOrAssignmentElement, - tryGetSourceMappingURL: () => tryGetSourceMappingURL, - tryGetTextOfPropertyName: () => tryGetTextOfPropertyName, - tryIOAndConsumeErrors: () => tryIOAndConsumeErrors, - tryParsePattern: () => tryParsePattern, - tryParsePatterns: () => tryParsePatterns, - tryParseRawSourceMap: () => tryParseRawSourceMap, - tryReadDirectory: () => tryReadDirectory, - tryReadFile: () => tryReadFile, - tryRemoveDirectoryPrefix: () => tryRemoveDirectoryPrefix, - tryRemoveExtension: () => tryRemoveExtension, - tryRemovePrefix: () => tryRemovePrefix, - tryRemoveSuffix: () => tryRemoveSuffix, - typeAcquisitionDeclarations: () => typeAcquisitionDeclarations, - typeAliasNamePart: () => typeAliasNamePart, - typeDirectiveIsEqualTo: () => typeDirectiveIsEqualTo, - typeKeywords: () => typeKeywords, - typeParameterNamePart: () => typeParameterNamePart, - typeReferenceResolutionNameAndModeGetter: () => typeReferenceResolutionNameAndModeGetter, - typeToDisplayParts: () => typeToDisplayParts, - unchangedPollThresholds: () => unchangedPollThresholds, - unchangedTextChangeRange: () => unchangedTextChangeRange, - unescapeLeadingUnderscores: () => unescapeLeadingUnderscores, - unmangleScopedPackageName: () => unmangleScopedPackageName, - unorderedRemoveItem: () => unorderedRemoveItem, - unorderedRemoveItemAt: () => unorderedRemoveItemAt, - unreachableCodeIsError: () => unreachableCodeIsError, - unusedLabelIsError: () => unusedLabelIsError, - unwrapInnermostStatementOfLabel: () => unwrapInnermostStatementOfLabel, - updateErrorForNoInputFiles: () => updateErrorForNoInputFiles, - updateLanguageServiceSourceFile: () => updateLanguageServiceSourceFile, - updateMissingFilePathsWatch: () => updateMissingFilePathsWatch, - updatePackageJsonWatch: () => updatePackageJsonWatch, - updateResolutionField: () => updateResolutionField, - updateSharedExtendedConfigFileWatcher: () => updateSharedExtendedConfigFileWatcher, - updateSourceFile: () => updateSourceFile, - updateWatchingWildcardDirectories: () => updateWatchingWildcardDirectories, - usesExtensionsOnImports: () => usesExtensionsOnImports, - usingSingleLineStringWriter: () => usingSingleLineStringWriter, - utf16EncodeAsString: () => utf16EncodeAsString, - validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage, - valuesHelper: () => valuesHelper, - version: () => version, - versionMajorMinor: () => versionMajorMinor, - visitArray: () => visitArray, - visitCommaListElements: () => visitCommaListElements, - visitEachChild: () => visitEachChild, - visitFunctionBody: () => visitFunctionBody, - visitIterationBody: () => visitIterationBody, - visitLexicalEnvironment: () => visitLexicalEnvironment, - visitNode: () => visitNode, - visitNodes: () => visitNodes2, - visitParameterList: () => visitParameterList, - walkUpBindingElementsAndPatterns: () => walkUpBindingElementsAndPatterns, - walkUpLexicalEnvironments: () => walkUpLexicalEnvironments, - walkUpOuterExpressions: () => walkUpOuterExpressions, - walkUpParenthesizedExpressions: () => walkUpParenthesizedExpressions, - walkUpParenthesizedTypes: () => walkUpParenthesizedTypes, - walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild, - whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp, - writeCommentRange: () => writeCommentRange, - writeFile: () => writeFile, - writeFileEnsuringDirectories: () => writeFileEnsuringDirectories, - zipToModeAwareCache: () => zipToModeAwareCache, - zipWith: () => zipWith - }); - var init_ts8 = __esm({ - "src/tsserverlibrary/_namespaces/ts.ts"() { - "use strict"; - init_ts2(); - init_ts3(); - init_ts4(); - init_ts7(); - init_ts_server4(); - } - }); - - // src/tsserverlibrary/tsserverlibrary.ts - var require_tsserverlibrary = __commonJS({ - "src/tsserverlibrary/tsserverlibrary.ts"(exports, module2) { - init_ts8(); - module2.exports = ts_exports3; - } - }); - return require_tsserverlibrary(); -})(); - -if (typeof module !== "undefined" && module.exports) { module.exports = ts; } -//# sourceMappingURL=tsserverlibrary.js.map +if (typeof module !== "undefined" && module.exports) { + module.exports = require("./typescript.js"); +} +else { + throw new Error("tsserverlibrary requires CommonJS; use typescript.js instead"); +} diff --git a/node_modules/typescript/lib/typescript.d.ts b/node_modules/typescript/lib/typescript.d.ts index ead6d07..754fc50 100644 --- a/node_modules/typescript/lib/typescript.d.ts +++ b/node_modules/typescript/lib/typescript.d.ts @@ -14,7 +14,4125 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "5.2"; + namespace server { + type ActionSet = "action::set"; + type ActionInvalidate = "action::invalidate"; + type ActionPackageInstalled = "action::packageInstalled"; + type EventTypesRegistry = "event::typesRegistry"; + type EventBeginInstallTypes = "event::beginInstallTypes"; + type EventEndInstallTypes = "event::endInstallTypes"; + type EventInitializationFailed = "event::initializationFailed"; + type ActionWatchTypingLocations = "action::watchTypingLocations"; + interface TypingInstallerResponse { + readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed | ActionWatchTypingLocations; + } + interface TypingInstallerRequestWithProjectName { + readonly projectName: string; + } + interface DiscoverTypings extends TypingInstallerRequestWithProjectName { + readonly fileNames: string[]; + readonly projectRootPath: Path; + readonly compilerOptions: CompilerOptions; + readonly typeAcquisition: TypeAcquisition; + readonly unresolvedImports: SortedReadonlyArray; + readonly cachePath?: string; + readonly kind: "discover"; + } + interface CloseProject extends TypingInstallerRequestWithProjectName { + readonly kind: "closeProject"; + } + interface TypesRegistryRequest { + readonly kind: "typesRegistry"; + } + interface InstallPackageRequest extends TypingInstallerRequestWithProjectName { + readonly kind: "installPackage"; + readonly fileName: Path; + readonly packageName: string; + readonly projectRootPath: Path; + } + interface PackageInstalledResponse extends ProjectResponse { + readonly kind: ActionPackageInstalled; + readonly success: boolean; + readonly message: string; + } + interface InitializationFailedResponse extends TypingInstallerResponse { + readonly kind: EventInitializationFailed; + readonly message: string; + readonly stack?: string; + } + interface ProjectResponse extends TypingInstallerResponse { + readonly projectName: string; + } + interface InvalidateCachedTypings extends ProjectResponse { + readonly kind: ActionInvalidate; + } + interface InstallTypes extends ProjectResponse { + readonly kind: EventBeginInstallTypes | EventEndInstallTypes; + readonly eventId: number; + readonly typingsInstallerVersion: string; + readonly packagesToInstall: readonly string[]; + } + interface BeginInstallTypes extends InstallTypes { + readonly kind: EventBeginInstallTypes; + } + interface EndInstallTypes extends InstallTypes { + readonly kind: EventEndInstallTypes; + readonly installSuccess: boolean; + } + interface InstallTypingHost extends JsTyping.TypingResolutionHost { + useCaseSensitiveFileNames: boolean; + writeFile(path: string, content: string): void; + createDirectory(path: string): void; + getCurrentDirectory?(): string; + } + interface SetTypings extends ProjectResponse { + readonly typeAcquisition: TypeAcquisition; + readonly compilerOptions: CompilerOptions; + readonly typings: string[]; + readonly unresolvedImports: SortedReadonlyArray; + readonly kind: ActionSet; + } + interface WatchTypingLocations extends ProjectResponse { + /** if files is undefined, retain same set of watchers */ + readonly files: readonly string[] | undefined; + readonly kind: ActionWatchTypingLocations; + } + namespace protocol { + enum CommandTypes { + JsxClosingTag = "jsxClosingTag", + LinkedEditingRange = "linkedEditingRange", + Brace = "brace", + BraceCompletion = "braceCompletion", + GetSpanOfEnclosingComment = "getSpanOfEnclosingComment", + Change = "change", + Close = "close", + /** @deprecated Prefer CompletionInfo -- see comment on CompletionsResponse */ + Completions = "completions", + CompletionInfo = "completionInfo", + CompletionDetails = "completionEntryDetails", + CompileOnSaveAffectedFileList = "compileOnSaveAffectedFileList", + CompileOnSaveEmitFile = "compileOnSaveEmitFile", + Configure = "configure", + Definition = "definition", + DefinitionAndBoundSpan = "definitionAndBoundSpan", + Implementation = "implementation", + Exit = "exit", + FileReferences = "fileReferences", + Format = "format", + Formatonkey = "formatonkey", + Geterr = "geterr", + GeterrForProject = "geterrForProject", + SemanticDiagnosticsSync = "semanticDiagnosticsSync", + SyntacticDiagnosticsSync = "syntacticDiagnosticsSync", + SuggestionDiagnosticsSync = "suggestionDiagnosticsSync", + NavBar = "navbar", + Navto = "navto", + NavTree = "navtree", + NavTreeFull = "navtree-full", + DocumentHighlights = "documentHighlights", + Open = "open", + Quickinfo = "quickinfo", + References = "references", + Reload = "reload", + Rename = "rename", + Saveto = "saveto", + SignatureHelp = "signatureHelp", + FindSourceDefinition = "findSourceDefinition", + Status = "status", + TypeDefinition = "typeDefinition", + ProjectInfo = "projectInfo", + ReloadProjects = "reloadProjects", + Unknown = "unknown", + OpenExternalProject = "openExternalProject", + OpenExternalProjects = "openExternalProjects", + CloseExternalProject = "closeExternalProject", + UpdateOpen = "updateOpen", + GetOutliningSpans = "getOutliningSpans", + TodoComments = "todoComments", + Indentation = "indentation", + DocCommentTemplate = "docCommentTemplate", + CompilerOptionsForInferredProjects = "compilerOptionsForInferredProjects", + GetCodeFixes = "getCodeFixes", + GetCombinedCodeFix = "getCombinedCodeFix", + ApplyCodeActionCommand = "applyCodeActionCommand", + GetSupportedCodeFixes = "getSupportedCodeFixes", + GetApplicableRefactors = "getApplicableRefactors", + GetEditsForRefactor = "getEditsForRefactor", + GetMoveToRefactoringFileSuggestions = "getMoveToRefactoringFileSuggestions", + OrganizeImports = "organizeImports", + GetEditsForFileRename = "getEditsForFileRename", + ConfigurePlugin = "configurePlugin", + SelectionRange = "selectionRange", + ToggleLineComment = "toggleLineComment", + ToggleMultilineComment = "toggleMultilineComment", + CommentSelection = "commentSelection", + UncommentSelection = "uncommentSelection", + PrepareCallHierarchy = "prepareCallHierarchy", + ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls", + ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls", + ProvideInlayHints = "provideInlayHints", + WatchChange = "watchChange", + } + /** + * A TypeScript Server message + */ + interface Message { + /** + * Sequence number of the message + */ + seq: number; + /** + * One of "request", "response", or "event" + */ + type: "request" | "response" | "event"; + } + /** + * Client-initiated request message + */ + interface Request extends Message { + type: "request"; + /** + * The command to execute + */ + command: string; + /** + * Object containing arguments for the command + */ + arguments?: any; + } + /** + * Request to reload the project structure for all the opened files + */ + interface ReloadProjectsRequest extends Message { + command: CommandTypes.ReloadProjects; + } + /** + * Server-initiated event message + */ + interface Event extends Message { + type: "event"; + /** + * Name of event + */ + event: string; + /** + * Event-specific information + */ + body?: any; + } + /** + * Response by server to client request message. + */ + interface Response extends Message { + type: "response"; + /** + * Sequence number of the request message. + */ + request_seq: number; + /** + * Outcome of the request. + */ + success: boolean; + /** + * The command requested. + */ + command: string; + /** + * If success === false, this should always be provided. + * Otherwise, may (or may not) contain a success message. + */ + message?: string; + /** + * Contains message body if success === true. + */ + body?: any; + /** + * Contains extra information that plugin can include to be passed on + */ + metadata?: unknown; + /** + * Exposes information about the performance of this request-response pair. + */ + performanceData?: PerformanceData; + } + interface PerformanceData { + /** + * Time spent updating the program graph, in milliseconds. + */ + updateGraphDurationMs?: number; + /** + * The time spent creating or updating the auto-import program, in milliseconds. + */ + createAutoImportProviderProgramDurationMs?: number; + } + /** + * Arguments for FileRequest messages. + */ + interface FileRequestArgs { + /** + * The file for the request (absolute pathname required). + */ + file: string; + projectFileName?: string; + } + interface StatusRequest extends Request { + command: CommandTypes.Status; + } + interface StatusResponseBody { + /** + * The TypeScript version (`ts.version`). + */ + version: string; + } + /** + * Response to StatusRequest + */ + interface StatusResponse extends Response { + body: StatusResponseBody; + } + /** + * Requests a JS Doc comment template for a given position + */ + interface DocCommentTemplateRequest extends FileLocationRequest { + command: CommandTypes.DocCommentTemplate; + } + /** + * Response to DocCommentTemplateRequest + */ + interface DocCommandTemplateResponse extends Response { + body?: TextInsertion; + } + /** + * A request to get TODO comments from the file + */ + interface TodoCommentRequest extends FileRequest { + command: CommandTypes.TodoComments; + arguments: TodoCommentRequestArgs; + } + /** + * Arguments for TodoCommentRequest request. + */ + interface TodoCommentRequestArgs extends FileRequestArgs { + /** + * Array of target TodoCommentDescriptors that describes TODO comments to be found + */ + descriptors: TodoCommentDescriptor[]; + } + /** + * Response for TodoCommentRequest request. + */ + interface TodoCommentsResponse extends Response { + body?: TodoComment[]; + } + /** + * A request to determine if the caret is inside a comment. + */ + interface SpanOfEnclosingCommentRequest extends FileLocationRequest { + command: CommandTypes.GetSpanOfEnclosingComment; + arguments: SpanOfEnclosingCommentRequestArgs; + } + interface SpanOfEnclosingCommentRequestArgs extends FileLocationRequestArgs { + /** + * Requires that the enclosing span be a multi-line comment, or else the request returns undefined. + */ + onlyMultiLine: boolean; + } + /** + * Request to obtain outlining spans in file. + */ + interface OutliningSpansRequest extends FileRequest { + command: CommandTypes.GetOutliningSpans; + } + interface OutliningSpan { + /** The span of the document to actually collapse. */ + textSpan: TextSpan; + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; + /** The text to display in the editor for the collapsed region. */ + bannerText: string; + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; + /** + * Classification of the contents of the span + */ + kind: OutliningSpanKind; + } + /** + * Response to OutliningSpansRequest request. + */ + interface OutliningSpansResponse extends Response { + body?: OutliningSpan[]; + } + /** + * A request to get indentation for a location in file + */ + interface IndentationRequest extends FileLocationRequest { + command: CommandTypes.Indentation; + arguments: IndentationRequestArgs; + } + /** + * Response for IndentationRequest request. + */ + interface IndentationResponse extends Response { + body?: IndentationResult; + } + /** + * Indentation result representing where indentation should be placed + */ + interface IndentationResult { + /** + * The base position in the document that the indent should be relative to + */ + position: number; + /** + * The number of columns the indent should be at relative to the position's column. + */ + indentation: number; + } + /** + * Arguments for IndentationRequest request. + */ + interface IndentationRequestArgs extends FileLocationRequestArgs { + /** + * An optional set of settings to be used when computing indentation. + * If argument is omitted - then it will use settings for file that were previously set via 'configure' request or global settings. + */ + options?: EditorSettings; + } + /** + * Arguments for ProjectInfoRequest request. + */ + interface ProjectInfoRequestArgs extends FileRequestArgs { + /** + * Indicate if the file name list of the project is needed + */ + needFileNameList: boolean; + } + /** + * A request to get the project information of the current file. + */ + interface ProjectInfoRequest extends Request { + command: CommandTypes.ProjectInfo; + arguments: ProjectInfoRequestArgs; + } + /** + * A request to retrieve compiler options diagnostics for a project + */ + interface CompilerOptionsDiagnosticsRequest extends Request { + arguments: CompilerOptionsDiagnosticsRequestArgs; + } + /** + * Arguments for CompilerOptionsDiagnosticsRequest request. + */ + interface CompilerOptionsDiagnosticsRequestArgs { + /** + * Name of the project to retrieve compiler options diagnostics. + */ + projectFileName: string; + } + /** + * Response message body for "projectInfo" request + */ + interface ProjectInfo { + /** + * For configured project, this is the normalized path of the 'tsconfig.json' file + * For inferred project, this is undefined + */ + configFileName: string; + /** + * The list of normalized file name in the project, including 'lib.d.ts' + */ + fileNames?: string[]; + /** + * Indicates if the project has a active language service instance + */ + languageServiceDisabled?: boolean; + } + /** + * Represents diagnostic info that includes location of diagnostic in two forms + * - start position and length of the error span + * - startLocation and endLocation - a pair of Location objects that store start/end line and offset of the error span. + */ + interface DiagnosticWithLinePosition { + message: string; + start: number; + length: number; + startLocation: Location; + endLocation: Location; + category: string; + code: number; + /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */ + reportsUnnecessary?: {}; + reportsDeprecated?: {}; + relatedInformation?: DiagnosticRelatedInformation[]; + } + /** + * Response message for "projectInfo" request + */ + interface ProjectInfoResponse extends Response { + body?: ProjectInfo; + } + /** + * Request whose sole parameter is a file name. + */ + interface FileRequest extends Request { + arguments: FileRequestArgs; + } + /** + * Instances of this interface specify a location in a source file: + * (file, line, character offset), where line and character offset are 1-based. + */ + interface FileLocationRequestArgs extends FileRequestArgs { + /** + * The line number for the request (1-based). + */ + line: number; + /** + * The character offset (on the line) for the request (1-based). + */ + offset: number; + } + type FileLocationOrRangeRequestArgs = FileLocationRequestArgs | FileRangeRequestArgs; + /** + * Request refactorings at a given position or selection area. + */ + interface GetApplicableRefactorsRequest extends Request { + command: CommandTypes.GetApplicableRefactors; + arguments: GetApplicableRefactorsRequestArgs; + } + type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & { + triggerReason?: RefactorTriggerReason; + kind?: string; + /** + * Include refactor actions that require additional arguments to be passed when + * calling 'GetEditsForRefactor'. When true, clients should inspect the + * `isInteractive` property of each returned `RefactorActionInfo` + * and ensure they are able to collect the appropriate arguments for any + * interactive refactor before offering it. + */ + includeInteractiveActions?: boolean; + }; + type RefactorTriggerReason = "implicit" | "invoked"; + /** + * Response is a list of available refactorings. + * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring + */ + interface GetApplicableRefactorsResponse extends Response { + body?: ApplicableRefactorInfo[]; + } + /** + * Request refactorings at a given position or selection area to move to an existing file. + */ + interface GetMoveToRefactoringFileSuggestionsRequest extends Request { + command: CommandTypes.GetMoveToRefactoringFileSuggestions; + arguments: GetMoveToRefactoringFileSuggestionsRequestArgs; + } + type GetMoveToRefactoringFileSuggestionsRequestArgs = FileLocationOrRangeRequestArgs & { + kind?: string; + }; + /** + * Response is a list of available files. + * Each refactoring exposes one or more "Actions"; a user selects one action to invoke a refactoring + */ + interface GetMoveToRefactoringFileSuggestions extends Response { + body: { + newFileName: string; + files: string[]; + }; + } + /** + * A set of one or more available refactoring actions, grouped under a parent refactoring. + */ + interface ApplicableRefactorInfo { + /** + * The programmatic name of the refactoring + */ + name: string; + /** + * A description of this refactoring category to show to the user. + * If the refactoring gets inlined (see below), this text will not be visible. + */ + description: string; + /** + * Inlineable refactorings can have their actions hoisted out to the top level + * of a context menu. Non-inlineanable refactorings should always be shown inside + * their parent grouping. + * + * If not specified, this value is assumed to be 'true' + */ + inlineable?: boolean; + actions: RefactorActionInfo[]; + } + /** + * Represents a single refactoring action - for example, the "Extract Method..." refactor might + * offer several actions, each corresponding to a surround class or closure to extract into. + */ + interface RefactorActionInfo { + /** + * The programmatic name of the refactoring action + */ + name: string; + /** + * A description of this refactoring action to show to the user. + * If the parent refactoring is inlined away, this will be the only text shown, + * so this description should make sense by itself if the parent is inlineable=true + */ + description: string; + /** + * A message to show to the user if the refactoring cannot be applied in + * the current context. + */ + notApplicableReason?: string; + /** + * The hierarchical dotted name of the refactor action. + */ + kind?: string; + /** + * Indicates that the action requires additional arguments to be passed + * when calling 'GetEditsForRefactor'. + */ + isInteractive?: boolean; + } + interface GetEditsForRefactorRequest extends Request { + command: CommandTypes.GetEditsForRefactor; + arguments: GetEditsForRefactorRequestArgs; + } + /** + * Request the edits that a particular refactoring action produces. + * Callers must specify the name of the refactor and the name of the action. + */ + type GetEditsForRefactorRequestArgs = FileLocationOrRangeRequestArgs & { + refactor: string; + action: string; + interactiveRefactorArguments?: InteractiveRefactorArguments; + }; + interface GetEditsForRefactorResponse extends Response { + body?: RefactorEditInfo; + } + interface RefactorEditInfo { + edits: FileCodeEdits[]; + /** + * An optional location where the editor should start a rename operation once + * the refactoring edits have been applied + */ + renameLocation?: Location; + renameFilename?: string; + notApplicableReason?: string; + } + /** + * Organize imports by: + * 1) Removing unused imports + * 2) Coalescing imports from the same module + * 3) Sorting imports + */ + interface OrganizeImportsRequest extends Request { + command: CommandTypes.OrganizeImports; + arguments: OrganizeImportsRequestArgs; + } + type OrganizeImportsScope = GetCombinedCodeFixScope; + enum OrganizeImportsMode { + All = "All", + SortAndCombine = "SortAndCombine", + RemoveUnused = "RemoveUnused", + } + interface OrganizeImportsRequestArgs { + scope: OrganizeImportsScope; + /** @deprecated Use `mode` instead */ + skipDestructiveCodeActions?: boolean; + mode?: OrganizeImportsMode; + } + interface OrganizeImportsResponse extends Response { + body: readonly FileCodeEdits[]; + } + interface GetEditsForFileRenameRequest extends Request { + command: CommandTypes.GetEditsForFileRename; + arguments: GetEditsForFileRenameRequestArgs; + } + /** Note: Paths may also be directories. */ + interface GetEditsForFileRenameRequestArgs { + readonly oldFilePath: string; + readonly newFilePath: string; + } + interface GetEditsForFileRenameResponse extends Response { + body: readonly FileCodeEdits[]; + } + /** + * Request for the available codefixes at a specific position. + */ + interface CodeFixRequest extends Request { + command: CommandTypes.GetCodeFixes; + arguments: CodeFixRequestArgs; + } + interface GetCombinedCodeFixRequest extends Request { + command: CommandTypes.GetCombinedCodeFix; + arguments: GetCombinedCodeFixRequestArgs; + } + interface GetCombinedCodeFixResponse extends Response { + body: CombinedCodeActions; + } + interface ApplyCodeActionCommandRequest extends Request { + command: CommandTypes.ApplyCodeActionCommand; + arguments: ApplyCodeActionCommandRequestArgs; + } + interface ApplyCodeActionCommandResponse extends Response { + } + interface FileRangeRequestArgs extends FileRequestArgs { + /** + * The line number for the request (1-based). + */ + startLine: number; + /** + * The character offset (on the line) for the request (1-based). + */ + startOffset: number; + /** + * The line number for the request (1-based). + */ + endLine: number; + /** + * The character offset (on the line) for the request (1-based). + */ + endOffset: number; + } + /** + * Instances of this interface specify errorcodes on a specific location in a sourcefile. + */ + interface CodeFixRequestArgs extends FileRangeRequestArgs { + /** + * Errorcodes we want to get the fixes for. + */ + errorCodes: readonly number[]; + } + interface GetCombinedCodeFixRequestArgs { + scope: GetCombinedCodeFixScope; + fixId: {}; + } + interface GetCombinedCodeFixScope { + type: "file"; + args: FileRequestArgs; + } + interface ApplyCodeActionCommandRequestArgs { + /** May also be an array of commands. */ + command: {}; + } + /** + * Response for GetCodeFixes request. + */ + interface GetCodeFixesResponse extends Response { + body?: CodeAction[]; + } + /** + * A request whose arguments specify a file location (file, line, col). + */ + interface FileLocationRequest extends FileRequest { + arguments: FileLocationRequestArgs; + } + /** + * A request to get codes of supported code fixes. + */ + interface GetSupportedCodeFixesRequest extends Request { + command: CommandTypes.GetSupportedCodeFixes; + arguments?: Partial; + } + /** + * A response for GetSupportedCodeFixesRequest request. + */ + interface GetSupportedCodeFixesResponse extends Response { + /** + * List of error codes supported by the server. + */ + body?: string[]; + } + /** + * A request to get encoded semantic classifications for a span in the file + */ + interface EncodedSemanticClassificationsRequest extends FileRequest { + arguments: EncodedSemanticClassificationsRequestArgs; + } + /** + * Arguments for EncodedSemanticClassificationsRequest request. + */ + interface EncodedSemanticClassificationsRequestArgs extends FileRequestArgs { + /** + * Start position of the span. + */ + start: number; + /** + * Length of the span. + */ + length: number; + /** + * Optional parameter for the semantic highlighting response, if absent it + * defaults to "original". + */ + format?: "original" | "2020"; + } + /** The response for a EncodedSemanticClassificationsRequest */ + interface EncodedSemanticClassificationsResponse extends Response { + body?: EncodedSemanticClassificationsResponseBody; + } + /** + * Implementation response message. Gives series of text spans depending on the format ar. + */ + interface EncodedSemanticClassificationsResponseBody { + endOfLineState: EndOfLineState; + spans: number[]; + } + /** + * Arguments in document highlight request; include: filesToSearch, file, + * line, offset. + */ + interface DocumentHighlightsRequestArgs extends FileLocationRequestArgs { + /** + * List of files to search for document highlights. + */ + filesToSearch: string[]; + } + /** + * Go to definition request; value of command field is + * "definition". Return response giving the file locations that + * define the symbol found in file at location line, col. + */ + interface DefinitionRequest extends FileLocationRequest { + command: CommandTypes.Definition; + } + interface DefinitionAndBoundSpanRequest extends FileLocationRequest { + readonly command: CommandTypes.DefinitionAndBoundSpan; + } + interface FindSourceDefinitionRequest extends FileLocationRequest { + readonly command: CommandTypes.FindSourceDefinition; + } + interface DefinitionAndBoundSpanResponse extends Response { + readonly body: DefinitionInfoAndBoundSpan; + } + /** + * Go to type request; value of command field is + * "typeDefinition". Return response giving the file locations that + * define the type for the symbol found in file at location line, col. + */ + interface TypeDefinitionRequest extends FileLocationRequest { + command: CommandTypes.TypeDefinition; + } + /** + * Go to implementation request; value of command field is + * "implementation". Return response giving the file locations that + * implement the symbol found in file at location line, col. + */ + interface ImplementationRequest extends FileLocationRequest { + command: CommandTypes.Implementation; + } + /** + * Location in source code expressed as (one-based) line and (one-based) column offset. + */ + interface Location { + line: number; + offset: number; + } + /** + * Object found in response messages defining a span of text in source code. + */ + interface TextSpan { + /** + * First character of the definition. + */ + start: Location; + /** + * One character past last character of the definition. + */ + end: Location; + } + /** + * Object found in response messages defining a span of text in a specific source file. + */ + interface FileSpan extends TextSpan { + /** + * File containing text span. + */ + file: string; + } + interface JSDocTagInfo { + /** Name of the JSDoc tag */ + name: string; + /** + * Comment text after the JSDoc tag -- the text after the tag name until the next tag or end of comment + * Display parts when UserPreferences.displayPartsForJSDoc is true, flattened to string otherwise. + */ + text?: string | SymbolDisplayPart[]; + } + interface TextSpanWithContext extends TextSpan { + contextStart?: Location; + contextEnd?: Location; + } + interface FileSpanWithContext extends FileSpan, TextSpanWithContext { + } + interface DefinitionInfo extends FileSpanWithContext { + /** + * When true, the file may or may not exist. + */ + unverified?: boolean; + } + interface DefinitionInfoAndBoundSpan { + definitions: readonly DefinitionInfo[]; + textSpan: TextSpan; + } + /** + * Definition response message. Gives text range for definition. + */ + interface DefinitionResponse extends Response { + body?: DefinitionInfo[]; + } + interface DefinitionInfoAndBoundSpanResponse extends Response { + body?: DefinitionInfoAndBoundSpan; + } + /** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */ + type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse; + /** + * Definition response message. Gives text range for definition. + */ + interface TypeDefinitionResponse extends Response { + body?: FileSpanWithContext[]; + } + /** + * Implementation response message. Gives text range for implementations. + */ + interface ImplementationResponse extends Response { + body?: FileSpanWithContext[]; + } + /** + * Request to get brace completion for a location in the file. + */ + interface BraceCompletionRequest extends FileLocationRequest { + command: CommandTypes.BraceCompletion; + arguments: BraceCompletionRequestArgs; + } + /** + * Argument for BraceCompletionRequest request. + */ + interface BraceCompletionRequestArgs extends FileLocationRequestArgs { + /** + * Kind of opening brace + */ + openingBrace: string; + } + interface JsxClosingTagRequest extends FileLocationRequest { + readonly command: CommandTypes.JsxClosingTag; + readonly arguments: JsxClosingTagRequestArgs; + } + interface JsxClosingTagRequestArgs extends FileLocationRequestArgs { + } + interface JsxClosingTagResponse extends Response { + readonly body: TextInsertion; + } + interface LinkedEditingRangeRequest extends FileLocationRequest { + readonly command: CommandTypes.LinkedEditingRange; + } + interface LinkedEditingRangesBody { + ranges: TextSpan[]; + wordPattern?: string; + } + interface LinkedEditingRangeResponse extends Response { + readonly body: LinkedEditingRangesBody; + } + /** + * Get document highlights request; value of command field is + * "documentHighlights". Return response giving spans that are relevant + * in the file at a given line and column. + */ + interface DocumentHighlightsRequest extends FileLocationRequest { + command: CommandTypes.DocumentHighlights; + arguments: DocumentHighlightsRequestArgs; + } + /** + * Span augmented with extra information that denotes the kind of the highlighting to be used for span. + */ + interface HighlightSpan extends TextSpanWithContext { + kind: HighlightSpanKind; + } + /** + * Represents a set of highligh spans for a give name + */ + interface DocumentHighlightsItem { + /** + * File containing highlight spans. + */ + file: string; + /** + * Spans to highlight in file. + */ + highlightSpans: HighlightSpan[]; + } + /** + * Response for a DocumentHighlightsRequest request. + */ + interface DocumentHighlightsResponse extends Response { + body?: DocumentHighlightsItem[]; + } + /** + * Find references request; value of command field is + * "references". Return response giving the file locations that + * reference the symbol found in file at location line, col. + */ + interface ReferencesRequest extends FileLocationRequest { + command: CommandTypes.References; + } + interface ReferencesResponseItem extends FileSpanWithContext { + /** + * Text of line containing the reference. Including this + * with the response avoids latency of editor loading files + * to show text of reference line (the server already has loaded the referencing files). + * + * If {@link UserPreferences.disableLineTextInReferences} is enabled, the property won't be filled + */ + lineText?: string; + /** + * True if reference is a write location, false otherwise. + */ + isWriteAccess: boolean; + /** + * Present only if the search was triggered from a declaration. + * True indicates that the references refers to the same symbol + * (i.e. has the same meaning) as the declaration that began the + * search. + */ + isDefinition?: boolean; + } + /** + * The body of a "references" response message. + */ + interface ReferencesResponseBody { + /** + * The file locations referencing the symbol. + */ + refs: readonly ReferencesResponseItem[]; + /** + * The name of the symbol. + */ + symbolName: string; + /** + * The start character offset of the symbol (on the line provided by the references request). + */ + symbolStartOffset: number; + /** + * The full display name of the symbol. + */ + symbolDisplayString: string; + } + /** + * Response to "references" request. + */ + interface ReferencesResponse extends Response { + body?: ReferencesResponseBody; + } + interface FileReferencesRequest extends FileRequest { + command: CommandTypes.FileReferences; + } + interface FileReferencesResponseBody { + /** + * The file locations referencing the symbol. + */ + refs: readonly ReferencesResponseItem[]; + /** + * The name of the symbol. + */ + symbolName: string; + } + interface FileReferencesResponse extends Response { + body?: FileReferencesResponseBody; + } + /** + * Argument for RenameRequest request. + */ + interface RenameRequestArgs extends FileLocationRequestArgs { + /** + * Should text at specified location be found/changed in comments? + */ + findInComments?: boolean; + /** + * Should text at specified location be found/changed in strings? + */ + findInStrings?: boolean; + } + /** + * Rename request; value of command field is "rename". Return + * response giving the file locations that reference the symbol + * found in file at location line, col. Also return full display + * name of the symbol so that client can print it unambiguously. + */ + interface RenameRequest extends FileLocationRequest { + command: CommandTypes.Rename; + arguments: RenameRequestArgs; + } + /** + * Information about the item to be renamed. + */ + type RenameInfo = RenameInfoSuccess | RenameInfoFailure; + interface RenameInfoSuccess { + /** + * True if item can be renamed. + */ + canRename: true; + /** + * File or directory to rename. + * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. + */ + fileToRename?: string; + /** + * Display name of the item to be renamed. + */ + displayName: string; + /** + * Full display name of item to be renamed. + */ + fullDisplayName: string; + /** + * The items's kind (such as 'className' or 'parameterName' or plain 'text'). + */ + kind: ScriptElementKind; + /** + * Optional modifiers for the kind (such as 'public'). + */ + kindModifiers: string; + /** Span of text to rename. */ + triggerSpan: TextSpan; + } + interface RenameInfoFailure { + canRename: false; + /** + * Error message if item can not be renamed. + */ + localizedErrorMessage: string; + } + /** + * A group of text spans, all in 'file'. + */ + interface SpanGroup { + /** The file to which the spans apply */ + file: string; + /** The text spans in this group */ + locs: RenameTextSpan[]; + } + interface RenameTextSpan extends TextSpanWithContext { + readonly prefixText?: string; + readonly suffixText?: string; + } + interface RenameResponseBody { + /** + * Information about the item to be renamed. + */ + info: RenameInfo; + /** + * An array of span groups (one per file) that refer to the item to be renamed. + */ + locs: readonly SpanGroup[]; + } + /** + * Rename response message. + */ + interface RenameResponse extends Response { + body?: RenameResponseBody; + } + /** + * Represents a file in external project. + * External project is project whose set of files, compilation options and open\close state + * is maintained by the client (i.e. if all this data come from .csproj file in Visual Studio). + * External project will exist even if all files in it are closed and should be closed explicitly. + * If external project includes one or more tsconfig.json/jsconfig.json files then tsserver will + * create configured project for every config file but will maintain a link that these projects were created + * as a result of opening external project so they should be removed once external project is closed. + */ + interface ExternalFile { + /** + * Name of file file + */ + fileName: string; + /** + * Script kind of the file + */ + scriptKind?: ScriptKindName | ScriptKind; + /** + * Whether file has mixed content (i.e. .cshtml file that combines html markup with C#/JavaScript) + */ + hasMixedContent?: boolean; + /** + * Content of the file + */ + content?: string; + } + /** + * Represent an external project + */ + interface ExternalProject { + /** + * Project name + */ + projectFileName: string; + /** + * List of root files in project + */ + rootFiles: ExternalFile[]; + /** + * Compiler options for the project + */ + options: ExternalProjectCompilerOptions; + /** + * Explicitly specified type acquisition for the project + */ + typeAcquisition?: TypeAcquisition; + } + interface CompileOnSaveMixin { + /** + * If compile on save is enabled for the project + */ + compileOnSave?: boolean; + } + /** + * For external projects, some of the project settings are sent together with + * compiler settings. + */ + type ExternalProjectCompilerOptions = CompilerOptions & CompileOnSaveMixin & WatchOptions; + interface FileWithProjectReferenceRedirectInfo { + /** + * Name of file + */ + fileName: string; + /** + * True if the file is primarily included in a referenced project + */ + isSourceOfProjectReferenceRedirect: boolean; + } + /** + * Represents a set of changes that happen in project + */ + interface ProjectChanges { + /** + * List of added files + */ + added: string[] | FileWithProjectReferenceRedirectInfo[]; + /** + * List of removed files + */ + removed: string[] | FileWithProjectReferenceRedirectInfo[]; + /** + * List of updated files + */ + updated: string[] | FileWithProjectReferenceRedirectInfo[]; + /** + * List of files that have had their project reference redirect status updated + * Only provided when the synchronizeProjectList request has includeProjectReferenceRedirectInfo set to true + */ + updatedRedirects?: FileWithProjectReferenceRedirectInfo[]; + } + /** + * Information found in a configure request. + */ + interface ConfigureRequestArguments { + /** + * Information about the host, for example 'Emacs 24.4' or + * 'Sublime Text version 3075' + */ + hostInfo?: string; + /** + * If present, tab settings apply only to this file. + */ + file?: string; + /** + * The format options to use during formatting and other code editing features. + */ + formatOptions?: FormatCodeSettings; + preferences?: UserPreferences; + /** + * The host's additional supported .js file extensions + */ + extraFileExtensions?: FileExtensionInfo[]; + watchOptions?: WatchOptions; + } + enum WatchFileKind { + FixedPollingInterval = "FixedPollingInterval", + PriorityPollingInterval = "PriorityPollingInterval", + DynamicPriorityPolling = "DynamicPriorityPolling", + FixedChunkSizePolling = "FixedChunkSizePolling", + UseFsEvents = "UseFsEvents", + UseFsEventsOnParentDirectory = "UseFsEventsOnParentDirectory", + } + enum WatchDirectoryKind { + UseFsEvents = "UseFsEvents", + FixedPollingInterval = "FixedPollingInterval", + DynamicPriorityPolling = "DynamicPriorityPolling", + FixedChunkSizePolling = "FixedChunkSizePolling", + } + enum PollingWatchKind { + FixedInterval = "FixedInterval", + PriorityInterval = "PriorityInterval", + DynamicPriority = "DynamicPriority", + FixedChunkSize = "FixedChunkSize", + } + interface WatchOptions { + watchFile?: WatchFileKind | ts.WatchFileKind; + watchDirectory?: WatchDirectoryKind | ts.WatchDirectoryKind; + fallbackPolling?: PollingWatchKind | ts.PollingWatchKind; + synchronousWatchDirectory?: boolean; + excludeDirectories?: string[]; + excludeFiles?: string[]; + [option: string]: CompilerOptionsValue | undefined; + } + /** + * Configure request; value of command field is "configure". Specifies + * host information, such as host type, tab size, and indent size. + */ + interface ConfigureRequest extends Request { + command: CommandTypes.Configure; + arguments: ConfigureRequestArguments; + } + /** + * Response to "configure" request. This is just an acknowledgement, so + * no body field is required. + */ + interface ConfigureResponse extends Response { + } + interface ConfigurePluginRequestArguments { + pluginName: string; + configuration: any; + } + interface ConfigurePluginRequest extends Request { + command: CommandTypes.ConfigurePlugin; + arguments: ConfigurePluginRequestArguments; + } + interface ConfigurePluginResponse extends Response { + } + interface SelectionRangeRequest extends FileRequest { + command: CommandTypes.SelectionRange; + arguments: SelectionRangeRequestArgs; + } + interface SelectionRangeRequestArgs extends FileRequestArgs { + locations: Location[]; + } + interface SelectionRangeResponse extends Response { + body?: SelectionRange[]; + } + interface SelectionRange { + textSpan: TextSpan; + parent?: SelectionRange; + } + interface ToggleLineCommentRequest extends FileRequest { + command: CommandTypes.ToggleLineComment; + arguments: FileRangeRequestArgs; + } + interface ToggleMultilineCommentRequest extends FileRequest { + command: CommandTypes.ToggleMultilineComment; + arguments: FileRangeRequestArgs; + } + interface CommentSelectionRequest extends FileRequest { + command: CommandTypes.CommentSelection; + arguments: FileRangeRequestArgs; + } + interface UncommentSelectionRequest extends FileRequest { + command: CommandTypes.UncommentSelection; + arguments: FileRangeRequestArgs; + } + /** + * Information found in an "open" request. + */ + interface OpenRequestArgs extends FileRequestArgs { + /** + * Used when a version of the file content is known to be more up to date than the one on disk. + * Then the known content will be used upon opening instead of the disk copy + */ + fileContent?: string; + /** + * Used to specify the script kind of the file explicitly. It could be one of the following: + * "TS", "JS", "TSX", "JSX" + */ + scriptKindName?: ScriptKindName; + /** + * Used to limit the searching for project config file. If given the searching will stop at this + * root path; otherwise it will go all the way up to the dist root path. + */ + projectRootPath?: string; + } + type ScriptKindName = "TS" | "JS" | "TSX" | "JSX"; + /** + * Open request; value of command field is "open". Notify the + * server that the client has file open. The server will not + * monitor the filesystem for changes in this file and will assume + * that the client is updating the server (using the change and/or + * reload messages) when the file changes. Server does not currently + * send a response to an open request. + */ + interface OpenRequest extends Request { + command: CommandTypes.Open; + arguments: OpenRequestArgs; + } + /** + * Request to open or update external project + */ + interface OpenExternalProjectRequest extends Request { + command: CommandTypes.OpenExternalProject; + arguments: OpenExternalProjectArgs; + } + /** + * Arguments to OpenExternalProjectRequest request + */ + type OpenExternalProjectArgs = ExternalProject; + /** + * Request to open multiple external projects + */ + interface OpenExternalProjectsRequest extends Request { + command: CommandTypes.OpenExternalProjects; + arguments: OpenExternalProjectsArgs; + } + /** + * Arguments to OpenExternalProjectsRequest + */ + interface OpenExternalProjectsArgs { + /** + * List of external projects to open or update + */ + projects: ExternalProject[]; + } + /** + * Response to OpenExternalProjectRequest request. This is just an acknowledgement, so + * no body field is required. + */ + interface OpenExternalProjectResponse extends Response { + } + /** + * Response to OpenExternalProjectsRequest request. This is just an acknowledgement, so + * no body field is required. + */ + interface OpenExternalProjectsResponse extends Response { + } + /** + * Request to close external project. + */ + interface CloseExternalProjectRequest extends Request { + command: CommandTypes.CloseExternalProject; + arguments: CloseExternalProjectRequestArgs; + } + /** + * Arguments to CloseExternalProjectRequest request + */ + interface CloseExternalProjectRequestArgs { + /** + * Name of the project to close + */ + projectFileName: string; + } + /** + * Response to CloseExternalProjectRequest request. This is just an acknowledgement, so + * no body field is required. + */ + interface CloseExternalProjectResponse extends Response { + } + /** + * Request to synchronize list of open files with the client + */ + interface UpdateOpenRequest extends Request { + command: CommandTypes.UpdateOpen; + arguments: UpdateOpenRequestArgs; + } + /** + * Arguments to UpdateOpenRequest + */ + interface UpdateOpenRequestArgs { + /** + * List of newly open files + */ + openFiles?: OpenRequestArgs[]; + /** + * List of open files files that were changes + */ + changedFiles?: FileCodeEdits[]; + /** + * List of files that were closed + */ + closedFiles?: string[]; + } + /** + * External projects have a typeAcquisition option so they need to be added separately to compiler options for inferred projects. + */ + type InferredProjectCompilerOptions = ExternalProjectCompilerOptions & TypeAcquisition; + /** + * Request to set compiler options for inferred projects. + * External projects are opened / closed explicitly. + * Configured projects are opened when user opens loose file that has 'tsconfig.json' or 'jsconfig.json' anywhere in one of containing folders. + * This configuration file will be used to obtain a list of files and configuration settings for the project. + * Inferred projects are created when user opens a loose file that is not the part of external project + * or configured project and will contain only open file and transitive closure of referenced files if 'useOneInferredProject' is false, + * or all open loose files and its transitive closure of referenced files if 'useOneInferredProject' is true. + */ + interface SetCompilerOptionsForInferredProjectsRequest extends Request { + command: CommandTypes.CompilerOptionsForInferredProjects; + arguments: SetCompilerOptionsForInferredProjectsArgs; + } + /** + * Argument for SetCompilerOptionsForInferredProjectsRequest request. + */ + interface SetCompilerOptionsForInferredProjectsArgs { + /** + * Compiler options to be used with inferred projects. + */ + options: InferredProjectCompilerOptions; + /** + * Specifies the project root path used to scope compiler options. + * It is an error to provide this property if the server has not been started with + * `useInferredProjectPerProjectRoot` enabled. + */ + projectRootPath?: string; + } + /** + * Response to SetCompilerOptionsForInferredProjectsResponse request. This is just an acknowledgement, so + * no body field is required. + */ + interface SetCompilerOptionsForInferredProjectsResponse extends Response { + } + /** + * Exit request; value of command field is "exit". Ask the server process + * to exit. + */ + interface ExitRequest extends Request { + command: CommandTypes.Exit; + } + /** + * Close request; value of command field is "close". Notify the + * server that the client has closed a previously open file. If + * file is still referenced by open files, the server will resume + * monitoring the filesystem for changes to file. Server does not + * currently send a response to a close request. + */ + interface CloseRequest extends FileRequest { + command: CommandTypes.Close; + } + interface WatchChangeRequest extends Request { + command: CommandTypes.WatchChange; + arguments: WatchChangeRequestArgs; + } + interface WatchChangeRequestArgs { + id: number; + path: string; + eventType: "create" | "delete" | "update"; + } + /** + * Request to obtain the list of files that should be regenerated if target file is recompiled. + * NOTE: this us query-only operation and does not generate any output on disk. + */ + interface CompileOnSaveAffectedFileListRequest extends FileRequest { + command: CommandTypes.CompileOnSaveAffectedFileList; + } + /** + * Contains a list of files that should be regenerated in a project + */ + interface CompileOnSaveAffectedFileListSingleProject { + /** + * Project name + */ + projectFileName: string; + /** + * List of files names that should be recompiled + */ + fileNames: string[]; + /** + * true if project uses outFile or out compiler option + */ + projectUsesOutFile: boolean; + } + /** + * Response for CompileOnSaveAffectedFileListRequest request; + */ + interface CompileOnSaveAffectedFileListResponse extends Response { + body: CompileOnSaveAffectedFileListSingleProject[]; + } + /** + * Request to recompile the file. All generated outputs (.js, .d.ts or .js.map files) is written on disk. + */ + interface CompileOnSaveEmitFileRequest extends FileRequest { + command: CommandTypes.CompileOnSaveEmitFile; + arguments: CompileOnSaveEmitFileRequestArgs; + } + /** + * Arguments for CompileOnSaveEmitFileRequest + */ + interface CompileOnSaveEmitFileRequestArgs extends FileRequestArgs { + /** + * if true - then file should be recompiled even if it does not have any changes. + */ + forced?: boolean; + includeLinePosition?: boolean; + /** if true - return response as object with emitSkipped and diagnostics */ + richResponse?: boolean; + } + interface CompileOnSaveEmitFileResponse extends Response { + body: boolean | EmitResult; + } + interface EmitResult { + emitSkipped: boolean; + diagnostics: Diagnostic[] | DiagnosticWithLinePosition[]; + } + /** + * Quickinfo request; value of command field is + * "quickinfo". Return response giving a quick type and + * documentation string for the symbol found in file at location + * line, col. + */ + interface QuickInfoRequest extends FileLocationRequest { + command: CommandTypes.Quickinfo; + arguments: FileLocationRequestArgs; + } + /** + * Body of QuickInfoResponse. + */ + interface QuickInfoResponseBody { + /** + * The symbol's kind (such as 'className' or 'parameterName' or plain 'text'). + */ + kind: ScriptElementKind; + /** + * Optional modifiers for the kind (such as 'public'). + */ + kindModifiers: string; + /** + * Starting file location of symbol. + */ + start: Location; + /** + * One past last character of symbol. + */ + end: Location; + /** + * Type and kind of symbol. + */ + displayString: string; + /** + * Documentation associated with symbol. + * Display parts when UserPreferences.displayPartsForJSDoc is true, flattened to string otherwise. + */ + documentation: string | SymbolDisplayPart[]; + /** + * JSDoc tags associated with symbol. + */ + tags: JSDocTagInfo[]; + } + /** + * Quickinfo response message. + */ + interface QuickInfoResponse extends Response { + body?: QuickInfoResponseBody; + } + /** + * Arguments for format messages. + */ + interface FormatRequestArgs extends FileLocationRequestArgs { + /** + * Last line of range for which to format text in file. + */ + endLine: number; + /** + * Character offset on last line of range for which to format text in file. + */ + endOffset: number; + /** + * Format options to be used. + */ + options?: FormatCodeSettings; + } + /** + * Format request; value of command field is "format". Return + * response giving zero or more edit instructions. The edit + * instructions will be sorted in file order. Applying the edit + * instructions in reverse to file will result in correctly + * reformatted text. + */ + interface FormatRequest extends FileLocationRequest { + command: CommandTypes.Format; + arguments: FormatRequestArgs; + } + /** + * Object found in response messages defining an editing + * instruction for a span of text in source code. The effect of + * this instruction is to replace the text starting at start and + * ending one character before end with newText. For an insertion, + * the text span is empty. For a deletion, newText is empty. + */ + interface CodeEdit { + /** + * First character of the text span to edit. + */ + start: Location; + /** + * One character past last character of the text span to edit. + */ + end: Location; + /** + * Replace the span defined above with this string (may be + * the empty string). + */ + newText: string; + } + interface FileCodeEdits { + fileName: string; + textChanges: CodeEdit[]; + } + interface CodeFixResponse extends Response { + /** The code actions that are available */ + body?: CodeFixAction[]; + } + interface CodeAction { + /** Description of the code action to display in the UI of the editor */ + description: string; + /** Text changes to apply to each file as part of the code action */ + changes: FileCodeEdits[]; + /** A command is an opaque object that should be passed to `ApplyCodeActionCommandRequestArgs` without modification. */ + commands?: {}[]; + } + interface CombinedCodeActions { + changes: readonly FileCodeEdits[]; + commands?: readonly {}[]; + } + interface CodeFixAction extends CodeAction { + /** Short name to identify the fix, for use by telemetry. */ + fixName: string; + /** + * If present, one may call 'getCombinedCodeFix' with this fixId. + * This may be omitted to indicate that the code fix can't be applied in a group. + */ + fixId?: {}; + /** Should be present if and only if 'fixId' is. */ + fixAllDescription?: string; + } + /** + * Format and format on key response message. + */ + interface FormatResponse extends Response { + body?: CodeEdit[]; + } + /** + * Arguments for format on key messages. + */ + interface FormatOnKeyRequestArgs extends FileLocationRequestArgs { + /** + * Key pressed (';', '\n', or '}'). + */ + key: string; + options?: FormatCodeSettings; + } + /** + * Format on key request; value of command field is + * "formatonkey". Given file location and key typed (as string), + * return response giving zero or more edit instructions. The + * edit instructions will be sorted in file order. Applying the + * edit instructions in reverse to file will result in correctly + * reformatted text. + */ + interface FormatOnKeyRequest extends FileLocationRequest { + command: CommandTypes.Formatonkey; + arguments: FormatOnKeyRequestArgs; + } + type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#" | " "; + enum CompletionTriggerKind { + /** Completion was triggered by typing an identifier, manual invocation (e.g Ctrl+Space) or via API. */ + Invoked = 1, + /** Completion was triggered by a trigger character. */ + TriggerCharacter = 2, + /** Completion was re-triggered as the current completion list is incomplete. */ + TriggerForIncompleteCompletions = 3, + } + /** + * Arguments for completions messages. + */ + interface CompletionsRequestArgs extends FileLocationRequestArgs { + /** + * Optional prefix to apply to possible completions. + */ + prefix?: string; + /** + * Character that was responsible for triggering completion. + * Should be `undefined` if a user manually requested completion. + */ + triggerCharacter?: CompletionsTriggerCharacter; + triggerKind?: CompletionTriggerKind; + /** + * @deprecated Use UserPreferences.includeCompletionsForModuleExports + */ + includeExternalModuleExports?: boolean; + /** + * @deprecated Use UserPreferences.includeCompletionsWithInsertText + */ + includeInsertTextCompletions?: boolean; + } + /** + * Completions request; value of command field is "completions". + * Given a file location (file, line, col) and a prefix (which may + * be the empty string), return the possible completions that + * begin with prefix. + */ + interface CompletionsRequest extends FileLocationRequest { + command: CommandTypes.Completions | CommandTypes.CompletionInfo; + arguments: CompletionsRequestArgs; + } + /** + * Arguments for completion details request. + */ + interface CompletionDetailsRequestArgs extends FileLocationRequestArgs { + /** + * Names of one or more entries for which to obtain details. + */ + entryNames: (string | CompletionEntryIdentifier)[]; + } + interface CompletionEntryIdentifier { + name: string; + source?: string; + data?: unknown; + } + /** + * Completion entry details request; value of command field is + * "completionEntryDetails". Given a file location (file, line, + * col) and an array of completion entry names return more + * detailed information for each completion entry. + */ + interface CompletionDetailsRequest extends FileLocationRequest { + command: CommandTypes.CompletionDetails; + arguments: CompletionDetailsRequestArgs; + } + /** + * Part of a symbol description. + */ + interface SymbolDisplayPart { + /** + * Text of an item describing the symbol. + */ + text: string; + /** + * The symbol's kind (such as 'className' or 'parameterName' or plain 'text'). + */ + kind: string; + } + /** A part of a symbol description that links from a jsdoc @link tag to a declaration */ + interface JSDocLinkDisplayPart extends SymbolDisplayPart { + /** The location of the declaration that the @link tag links to. */ + target: FileSpan; + } + /** + * An item found in a completion response. + */ + interface CompletionEntry { + /** + * The symbol's name. + */ + name: string; + /** + * The symbol's kind (such as 'className' or 'parameterName'). + */ + kind: ScriptElementKind; + /** + * Optional modifiers for the kind (such as 'public'). + */ + kindModifiers?: string; + /** + * A string that is used for comparing completion items so that they can be ordered. This + * is often the same as the name but may be different in certain circumstances. + */ + sortText: string; + /** + * Text to insert instead of `name`. + * This is used to support bracketed completions; If `name` might be "a-b" but `insertText` would be `["a-b"]`, + * coupled with `replacementSpan` to replace a dotted access with a bracket access. + */ + insertText?: string; + /** + * A string that should be used when filtering a set of + * completion items. + */ + filterText?: string; + /** + * `insertText` should be interpreted as a snippet if true. + */ + isSnippet?: true; + /** + * An optional span that indicates the text to be replaced by this completion item. + * If present, this span should be used instead of the default one. + * It will be set if the required span differs from the one generated by the default replacement behavior. + */ + replacementSpan?: TextSpan; + /** + * Indicates whether commiting this completion entry will require additional code actions to be + * made to avoid errors. The CompletionEntryDetails will have these actions. + */ + hasAction?: true; + /** + * Identifier (not necessarily human-readable) identifying where this completion came from. + */ + source?: string; + /** + * Human-readable description of the `source`. + */ + sourceDisplay?: SymbolDisplayPart[]; + /** + * Additional details for the label. + */ + labelDetails?: CompletionEntryLabelDetails; + /** + * If true, this completion should be highlighted as recommended. There will only be one of these. + * This will be set when we know the user should write an expression with a certain type and that type is an enum or constructable class. + * Then either that enum/class or a namespace containing it will be the recommended symbol. + */ + isRecommended?: true; + /** + * If true, this completion was generated from traversing the name table of an unchecked JS file, + * and therefore may not be accurate. + */ + isFromUncheckedFile?: true; + /** + * If true, this completion was for an auto-import of a module not yet in the program, but listed + * in the project package.json. Used for telemetry reporting. + */ + isPackageJsonImport?: true; + /** + * If true, this completion was an auto-import-style completion of an import statement (i.e., the + * module specifier was inserted along with the imported identifier). Used for telemetry reporting. + */ + isImportStatementCompletion?: true; + /** + * A property to be sent back to TS Server in the CompletionDetailsRequest, along with `name`, + * that allows TS Server to look up the symbol represented by the completion item, disambiguating + * items with the same name. + */ + data?: unknown; + } + interface CompletionEntryLabelDetails { + /** + * An optional string which is rendered less prominently directly after + * {@link CompletionEntry.name name}, without any spacing. Should be + * used for function signatures or type annotations. + */ + detail?: string; + /** + * An optional string which is rendered less prominently after + * {@link CompletionEntryLabelDetails.detail}. Should be used for fully qualified + * names or file path. + */ + description?: string; + } + /** + * Additional completion entry details, available on demand + */ + interface CompletionEntryDetails { + /** + * The symbol's name. + */ + name: string; + /** + * The symbol's kind (such as 'className' or 'parameterName'). + */ + kind: ScriptElementKind; + /** + * Optional modifiers for the kind (such as 'public'). + */ + kindModifiers: string; + /** + * Display parts of the symbol (similar to quick info). + */ + displayParts: SymbolDisplayPart[]; + /** + * Documentation strings for the symbol. + */ + documentation?: SymbolDisplayPart[]; + /** + * JSDoc tags for the symbol. + */ + tags?: JSDocTagInfo[]; + /** + * The associated code actions for this entry + */ + codeActions?: CodeAction[]; + /** + * @deprecated Use `sourceDisplay` instead. + */ + source?: SymbolDisplayPart[]; + /** + * Human-readable description of the `source` from the CompletionEntry. + */ + sourceDisplay?: SymbolDisplayPart[]; + } + /** @deprecated Prefer CompletionInfoResponse, which supports several top-level fields in addition to the array of entries. */ + interface CompletionsResponse extends Response { + body?: CompletionEntry[]; + } + interface CompletionInfoResponse extends Response { + body?: CompletionInfo; + } + interface CompletionInfo { + readonly flags?: number; + readonly isGlobalCompletion: boolean; + readonly isMemberCompletion: boolean; + readonly isNewIdentifierLocation: boolean; + /** + * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use + * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span + * must be used to commit that completion entry. + */ + readonly optionalReplacementSpan?: TextSpan; + readonly isIncomplete?: boolean; + readonly entries: readonly CompletionEntry[]; + } + interface CompletionDetailsResponse extends Response { + body?: CompletionEntryDetails[]; + } + /** + * Signature help information for a single parameter + */ + interface SignatureHelpParameter { + /** + * The parameter's name + */ + name: string; + /** + * Documentation of the parameter. + */ + documentation: SymbolDisplayPart[]; + /** + * Display parts of the parameter. + */ + displayParts: SymbolDisplayPart[]; + /** + * Whether the parameter is optional or not. + */ + isOptional: boolean; + } + /** + * Represents a single signature to show in signature help. + */ + interface SignatureHelpItem { + /** + * Whether the signature accepts a variable number of arguments. + */ + isVariadic: boolean; + /** + * The prefix display parts. + */ + prefixDisplayParts: SymbolDisplayPart[]; + /** + * The suffix display parts. + */ + suffixDisplayParts: SymbolDisplayPart[]; + /** + * The separator display parts. + */ + separatorDisplayParts: SymbolDisplayPart[]; + /** + * The signature helps items for the parameters. + */ + parameters: SignatureHelpParameter[]; + /** + * The signature's documentation + */ + documentation: SymbolDisplayPart[]; + /** + * The signature's JSDoc tags + */ + tags: JSDocTagInfo[]; + } + /** + * Signature help items found in the response of a signature help request. + */ + interface SignatureHelpItems { + /** + * The signature help items. + */ + items: SignatureHelpItem[]; + /** + * The span for which signature help should appear on a signature + */ + applicableSpan: TextSpan; + /** + * The item selected in the set of available help items. + */ + selectedItemIndex: number; + /** + * The argument selected in the set of parameters. + */ + argumentIndex: number; + /** + * The argument count + */ + argumentCount: number; + } + type SignatureHelpTriggerCharacter = "," | "(" | "<"; + type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")"; + /** + * Arguments of a signature help request. + */ + interface SignatureHelpRequestArgs extends FileLocationRequestArgs { + /** + * Reason why signature help was invoked. + * See each individual possible + */ + triggerReason?: SignatureHelpTriggerReason; + } + type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason; + /** + * Signals that the user manually requested signature help. + * The language service will unconditionally attempt to provide a result. + */ + interface SignatureHelpInvokedReason { + kind: "invoked"; + triggerCharacter?: undefined; + } + /** + * Signals that the signature help request came from a user typing a character. + * Depending on the character and the syntactic context, the request may or may not be served a result. + */ + interface SignatureHelpCharacterTypedReason { + kind: "characterTyped"; + /** + * Character that was responsible for triggering signature help. + */ + triggerCharacter: SignatureHelpTriggerCharacter; + } + /** + * Signals that this signature help request came from typing a character or moving the cursor. + * This should only occur if a signature help session was already active and the editor needs to see if it should adjust. + * The language service will unconditionally attempt to provide a result. + * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move. + */ + interface SignatureHelpRetriggeredReason { + kind: "retrigger"; + /** + * Character that was responsible for triggering signature help. + */ + triggerCharacter?: SignatureHelpRetriggerCharacter; + } + /** + * Signature help request; value of command field is "signatureHelp". + * Given a file location (file, line, col), return the signature + * help. + */ + interface SignatureHelpRequest extends FileLocationRequest { + command: CommandTypes.SignatureHelp; + arguments: SignatureHelpRequestArgs; + } + /** + * Response object for a SignatureHelpRequest. + */ + interface SignatureHelpResponse extends Response { + body?: SignatureHelpItems; + } + type InlayHintKind = "Type" | "Parameter" | "Enum"; + interface InlayHintsRequestArgs extends FileRequestArgs { + /** + * Start position of the span. + */ + start: number; + /** + * Length of the span. + */ + length: number; + } + interface InlayHintsRequest extends Request { + command: CommandTypes.ProvideInlayHints; + arguments: InlayHintsRequestArgs; + } + interface InlayHintItem { + /** This property will be the empty string when displayParts is set. */ + text: string; + position: Location; + kind: InlayHintKind; + whitespaceBefore?: boolean; + whitespaceAfter?: boolean; + displayParts?: InlayHintItemDisplayPart[]; + } + interface InlayHintItemDisplayPart { + text: string; + span?: FileSpan; + } + interface InlayHintsResponse extends Response { + body?: InlayHintItem[]; + } + /** + * Synchronous request for semantic diagnostics of one file. + */ + interface SemanticDiagnosticsSyncRequest extends FileRequest { + command: CommandTypes.SemanticDiagnosticsSync; + arguments: SemanticDiagnosticsSyncRequestArgs; + } + interface SemanticDiagnosticsSyncRequestArgs extends FileRequestArgs { + includeLinePosition?: boolean; + } + /** + * Response object for synchronous sematic diagnostics request. + */ + interface SemanticDiagnosticsSyncResponse extends Response { + body?: Diagnostic[] | DiagnosticWithLinePosition[]; + } + interface SuggestionDiagnosticsSyncRequest extends FileRequest { + command: CommandTypes.SuggestionDiagnosticsSync; + arguments: SuggestionDiagnosticsSyncRequestArgs; + } + type SuggestionDiagnosticsSyncRequestArgs = SemanticDiagnosticsSyncRequestArgs; + type SuggestionDiagnosticsSyncResponse = SemanticDiagnosticsSyncResponse; + /** + * Synchronous request for syntactic diagnostics of one file. + */ + interface SyntacticDiagnosticsSyncRequest extends FileRequest { + command: CommandTypes.SyntacticDiagnosticsSync; + arguments: SyntacticDiagnosticsSyncRequestArgs; + } + interface SyntacticDiagnosticsSyncRequestArgs extends FileRequestArgs { + includeLinePosition?: boolean; + } + /** + * Response object for synchronous syntactic diagnostics request. + */ + interface SyntacticDiagnosticsSyncResponse extends Response { + body?: Diagnostic[] | DiagnosticWithLinePosition[]; + } + /** + * Arguments for GeterrForProject request. + */ + interface GeterrForProjectRequestArgs { + /** + * the file requesting project error list + */ + file: string; + /** + * Delay in milliseconds to wait before starting to compute + * errors for the files in the file list + */ + delay: number; + } + /** + * GeterrForProjectRequest request; value of command field is + * "geterrForProject". It works similarly with 'Geterr', only + * it request for every file in this project. + */ + interface GeterrForProjectRequest extends Request { + command: CommandTypes.GeterrForProject; + arguments: GeterrForProjectRequestArgs; + } + /** + * Arguments for geterr messages. + */ + interface GeterrRequestArgs { + /** + * List of file names for which to compute compiler errors. + * The files will be checked in list order. + */ + files: string[]; + /** + * Delay in milliseconds to wait before starting to compute + * errors for the files in the file list + */ + delay: number; + } + /** + * Geterr request; value of command field is "geterr". Wait for + * delay milliseconds and then, if during the wait no change or + * reload messages have arrived for the first file in the files + * list, get the syntactic errors for the file, field requests, + * and then get the semantic errors for the file. Repeat with a + * smaller delay for each subsequent file on the files list. Best + * practice for an editor is to send a file list containing each + * file that is currently visible, in most-recently-used order. + */ + interface GeterrRequest extends Request { + command: CommandTypes.Geterr; + arguments: GeterrRequestArgs; + } + type RequestCompletedEventName = "requestCompleted"; + /** + * Event that is sent when server have finished processing request with specified id. + */ + interface RequestCompletedEvent extends Event { + event: RequestCompletedEventName; + body: RequestCompletedEventBody; + } + interface RequestCompletedEventBody { + request_seq: number; + } + /** + * Item of diagnostic information found in a DiagnosticEvent message. + */ + interface Diagnostic { + /** + * Starting file location at which text applies. + */ + start: Location; + /** + * The last file location at which the text applies. + */ + end: Location; + /** + * Text of diagnostic message. + */ + text: string; + /** + * The category of the diagnostic message, e.g. "error", "warning", or "suggestion". + */ + category: string; + reportsUnnecessary?: {}; + reportsDeprecated?: {}; + /** + * Any related spans the diagnostic may have, such as other locations relevant to an error, such as declarartion sites + */ + relatedInformation?: DiagnosticRelatedInformation[]; + /** + * The error code of the diagnostic message. + */ + code?: number; + /** + * The name of the plugin reporting the message. + */ + source?: string; + } + interface DiagnosticWithFileName extends Diagnostic { + /** + * Name of the file the diagnostic is in + */ + fileName: string; + } + /** + * Represents additional spans returned with a diagnostic which are relevant to it + */ + interface DiagnosticRelatedInformation { + /** + * The category of the related information message, e.g. "error", "warning", or "suggestion". + */ + category: string; + /** + * The code used ot identify the related information + */ + code: number; + /** + * Text of related or additional information. + */ + message: string; + /** + * Associated location + */ + span?: FileSpan; + } + interface DiagnosticEventBody { + /** + * The file for which diagnostic information is reported. + */ + file: string; + /** + * An array of diagnostic information items. + */ + diagnostics: Diagnostic[]; + } + type DiagnosticEventKind = "semanticDiag" | "syntaxDiag" | "suggestionDiag"; + /** + * Event message for DiagnosticEventKind event types. + * These events provide syntactic and semantic errors for a file. + */ + interface DiagnosticEvent extends Event { + body?: DiagnosticEventBody; + event: DiagnosticEventKind; + } + interface ConfigFileDiagnosticEventBody { + /** + * The file which trigged the searching and error-checking of the config file + */ + triggerFile: string; + /** + * The name of the found config file. + */ + configFile: string; + /** + * An arry of diagnostic information items for the found config file. + */ + diagnostics: DiagnosticWithFileName[]; + } + /** + * Event message for "configFileDiag" event type. + * This event provides errors for a found config file. + */ + interface ConfigFileDiagnosticEvent extends Event { + body?: ConfigFileDiagnosticEventBody; + event: "configFileDiag"; + } + type ProjectLanguageServiceStateEventName = "projectLanguageServiceState"; + interface ProjectLanguageServiceStateEvent extends Event { + event: ProjectLanguageServiceStateEventName; + body?: ProjectLanguageServiceStateEventBody; + } + interface ProjectLanguageServiceStateEventBody { + /** + * Project name that has changes in the state of language service. + * For configured projects this will be the config file path. + * For external projects this will be the name of the projects specified when project was open. + * For inferred projects this event is not raised. + */ + projectName: string; + /** + * True if language service state switched from disabled to enabled + * and false otherwise. + */ + languageServiceEnabled: boolean; + } + type ProjectsUpdatedInBackgroundEventName = "projectsUpdatedInBackground"; + interface ProjectsUpdatedInBackgroundEvent extends Event { + event: ProjectsUpdatedInBackgroundEventName; + body: ProjectsUpdatedInBackgroundEventBody; + } + interface ProjectsUpdatedInBackgroundEventBody { + /** + * Current set of open files + */ + openFiles: string[]; + } + type ProjectLoadingStartEventName = "projectLoadingStart"; + interface ProjectLoadingStartEvent extends Event { + event: ProjectLoadingStartEventName; + body: ProjectLoadingStartEventBody; + } + interface ProjectLoadingStartEventBody { + /** name of the project */ + projectName: string; + /** reason for loading */ + reason: string; + } + type ProjectLoadingFinishEventName = "projectLoadingFinish"; + interface ProjectLoadingFinishEvent extends Event { + event: ProjectLoadingFinishEventName; + body: ProjectLoadingFinishEventBody; + } + interface ProjectLoadingFinishEventBody { + /** name of the project */ + projectName: string; + } + type SurveyReadyEventName = "surveyReady"; + interface SurveyReadyEvent extends Event { + event: SurveyReadyEventName; + body: SurveyReadyEventBody; + } + interface SurveyReadyEventBody { + /** Name of the survey. This is an internal machine- and programmer-friendly name */ + surveyId: string; + } + type LargeFileReferencedEventName = "largeFileReferenced"; + interface LargeFileReferencedEvent extends Event { + event: LargeFileReferencedEventName; + body: LargeFileReferencedEventBody; + } + interface LargeFileReferencedEventBody { + /** + * name of the large file being loaded + */ + file: string; + /** + * size of the file + */ + fileSize: number; + /** + * max file size allowed on the server + */ + maxFileSize: number; + } + type CreateFileWatcherEventName = "createFileWatcher"; + interface CreateFileWatcherEvent extends Event { + readonly event: CreateFileWatcherEventName; + readonly body: CreateFileWatcherEventBody; + } + interface CreateFileWatcherEventBody { + readonly id: number; + readonly path: string; + } + type CreateDirectoryWatcherEventName = "createDirectoryWatcher"; + interface CreateDirectoryWatcherEvent extends Event { + readonly event: CreateDirectoryWatcherEventName; + readonly body: CreateDirectoryWatcherEventBody; + } + interface CreateDirectoryWatcherEventBody { + readonly id: number; + readonly path: string; + readonly recursive: boolean; + } + type CloseFileWatcherEventName = "closeFileWatcher"; + interface CloseFileWatcherEvent extends Event { + readonly event: CloseFileWatcherEventName; + readonly body: CloseFileWatcherEventBody; + } + interface CloseFileWatcherEventBody { + readonly id: number; + } + /** + * Arguments for reload request. + */ + interface ReloadRequestArgs extends FileRequestArgs { + /** + * Name of temporary file from which to reload file + * contents. May be same as file. + */ + tmpfile: string; + } + /** + * Reload request message; value of command field is "reload". + * Reload contents of file with name given by the 'file' argument + * from temporary file with name given by the 'tmpfile' argument. + * The two names can be identical. + */ + interface ReloadRequest extends FileRequest { + command: CommandTypes.Reload; + arguments: ReloadRequestArgs; + } + /** + * Response to "reload" request. This is just an acknowledgement, so + * no body field is required. + */ + interface ReloadResponse extends Response { + } + /** + * Arguments for saveto request. + */ + interface SavetoRequestArgs extends FileRequestArgs { + /** + * Name of temporary file into which to save server's view of + * file contents. + */ + tmpfile: string; + } + /** + * Saveto request message; value of command field is "saveto". + * For debugging purposes, save to a temporaryfile (named by + * argument 'tmpfile') the contents of file named by argument + * 'file'. The server does not currently send a response to a + * "saveto" request. + */ + interface SavetoRequest extends FileRequest { + command: CommandTypes.Saveto; + arguments: SavetoRequestArgs; + } + /** + * Arguments for navto request message. + */ + interface NavtoRequestArgs { + /** + * Search term to navigate to from current location; term can + * be '.*' or an identifier prefix. + */ + searchValue: string; + /** + * Optional limit on the number of items to return. + */ + maxResultCount?: number; + /** + * The file for the request (absolute pathname required). + */ + file?: string; + /** + * Optional flag to indicate we want results for just the current file + * or the entire project. + */ + currentFileOnly?: boolean; + projectFileName?: string; + } + /** + * Navto request message; value of command field is "navto". + * Return list of objects giving file locations and symbols that + * match the search term given in argument 'searchTerm'. The + * context for the search is given by the named file. + */ + interface NavtoRequest extends Request { + command: CommandTypes.Navto; + arguments: NavtoRequestArgs; + } + /** + * An item found in a navto response. + */ + interface NavtoItem extends FileSpan { + /** + * The symbol's name. + */ + name: string; + /** + * The symbol's kind (such as 'className' or 'parameterName'). + */ + kind: ScriptElementKind; + /** + * exact, substring, or prefix. + */ + matchKind: string; + /** + * If this was a case sensitive or insensitive match. + */ + isCaseSensitive: boolean; + /** + * Optional modifiers for the kind (such as 'public'). + */ + kindModifiers?: string; + /** + * Name of symbol's container symbol (if any); for example, + * the class name if symbol is a class member. + */ + containerName?: string; + /** + * Kind of symbol's container symbol (if any). + */ + containerKind?: ScriptElementKind; + } + /** + * Navto response message. Body is an array of navto items. Each + * item gives a symbol that matched the search term. + */ + interface NavtoResponse extends Response { + body?: NavtoItem[]; + } + /** + * Arguments for change request message. + */ + interface ChangeRequestArgs extends FormatRequestArgs { + /** + * Optional string to insert at location (file, line, offset). + */ + insertString?: string; + } + /** + * Change request message; value of command field is "change". + * Update the server's view of the file named by argument 'file'. + * Server does not currently send a response to a change request. + */ + interface ChangeRequest extends FileLocationRequest { + command: CommandTypes.Change; + arguments: ChangeRequestArgs; + } + /** + * Response to "brace" request. + */ + interface BraceResponse extends Response { + body?: TextSpan[]; + } + /** + * Brace matching request; value of command field is "brace". + * Return response giving the file locations of matching braces + * found in file at location line, offset. + */ + interface BraceRequest extends FileLocationRequest { + command: CommandTypes.Brace; + } + /** + * NavBar items request; value of command field is "navbar". + * Return response giving the list of navigation bar entries + * extracted from the requested file. + */ + interface NavBarRequest extends FileRequest { + command: CommandTypes.NavBar; + } + /** + * NavTree request; value of command field is "navtree". + * Return response giving the navigation tree of the requested file. + */ + interface NavTreeRequest extends FileRequest { + command: CommandTypes.NavTree; + } + interface NavigationBarItem { + /** + * The item's display text. + */ + text: string; + /** + * The symbol's kind (such as 'className' or 'parameterName'). + */ + kind: ScriptElementKind; + /** + * Optional modifiers for the kind (such as 'public'). + */ + kindModifiers?: string; + /** + * The definition locations of the item. + */ + spans: TextSpan[]; + /** + * Optional children. + */ + childItems?: NavigationBarItem[]; + /** + * Number of levels deep this item should appear. + */ + indent: number; + } + /** protocol.NavigationTree is identical to ts.NavigationTree, except using protocol.TextSpan instead of ts.TextSpan */ + interface NavigationTree { + text: string; + kind: ScriptElementKind; + kindModifiers: string; + spans: TextSpan[]; + nameSpan: TextSpan | undefined; + childItems?: NavigationTree[]; + } + type TelemetryEventName = "telemetry"; + interface TelemetryEvent extends Event { + event: TelemetryEventName; + body: TelemetryEventBody; + } + interface TelemetryEventBody { + telemetryEventName: string; + payload: any; + } + type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed"; + interface TypesInstallerInitializationFailedEvent extends Event { + event: TypesInstallerInitializationFailedEventName; + body: TypesInstallerInitializationFailedEventBody; + } + interface TypesInstallerInitializationFailedEventBody { + message: string; + } + type TypingsInstalledTelemetryEventName = "typingsInstalled"; + interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody { + telemetryEventName: TypingsInstalledTelemetryEventName; + payload: TypingsInstalledTelemetryEventPayload; + } + interface TypingsInstalledTelemetryEventPayload { + /** + * Comma separated list of installed typing packages + */ + installedPackages: string; + /** + * true if install request succeeded, otherwise - false + */ + installSuccess: boolean; + /** + * version of typings installer + */ + typingsInstallerVersion: string; + } + type BeginInstallTypesEventName = "beginInstallTypes"; + type EndInstallTypesEventName = "endInstallTypes"; + interface BeginInstallTypesEvent extends Event { + event: BeginInstallTypesEventName; + body: BeginInstallTypesEventBody; + } + interface EndInstallTypesEvent extends Event { + event: EndInstallTypesEventName; + body: EndInstallTypesEventBody; + } + interface InstallTypesEventBody { + /** + * correlation id to match begin and end events + */ + eventId: number; + /** + * list of packages to install + */ + packages: readonly string[]; + } + interface BeginInstallTypesEventBody extends InstallTypesEventBody { + } + interface EndInstallTypesEventBody extends InstallTypesEventBody { + /** + * true if installation succeeded, otherwise false + */ + success: boolean; + } + interface NavBarResponse extends Response { + body?: NavigationBarItem[]; + } + interface NavTreeResponse extends Response { + body?: NavigationTree; + } + interface CallHierarchyItem { + name: string; + kind: ScriptElementKind; + kindModifiers?: string; + file: string; + span: TextSpan; + selectionSpan: TextSpan; + containerName?: string; + } + interface CallHierarchyIncomingCall { + from: CallHierarchyItem; + fromSpans: TextSpan[]; + } + interface CallHierarchyOutgoingCall { + to: CallHierarchyItem; + fromSpans: TextSpan[]; + } + interface PrepareCallHierarchyRequest extends FileLocationRequest { + command: CommandTypes.PrepareCallHierarchy; + } + interface PrepareCallHierarchyResponse extends Response { + readonly body: CallHierarchyItem | CallHierarchyItem[]; + } + interface ProvideCallHierarchyIncomingCallsRequest extends FileLocationRequest { + command: CommandTypes.ProvideCallHierarchyIncomingCalls; + } + interface ProvideCallHierarchyIncomingCallsResponse extends Response { + readonly body: CallHierarchyIncomingCall[]; + } + interface ProvideCallHierarchyOutgoingCallsRequest extends FileLocationRequest { + command: CommandTypes.ProvideCallHierarchyOutgoingCalls; + } + interface ProvideCallHierarchyOutgoingCallsResponse extends Response { + readonly body: CallHierarchyOutgoingCall[]; + } + enum IndentStyle { + None = "None", + Block = "Block", + Smart = "Smart", + } + enum SemicolonPreference { + Ignore = "ignore", + Insert = "insert", + Remove = "remove", + } + interface EditorSettings { + baseIndentSize?: number; + indentSize?: number; + tabSize?: number; + newLineCharacter?: string; + convertTabsToSpaces?: boolean; + indentStyle?: IndentStyle | ts.IndentStyle; + trimTrailingWhitespace?: boolean; + } + interface FormatCodeSettings extends EditorSettings { + insertSpaceAfterCommaDelimiter?: boolean; + insertSpaceAfterSemicolonInForStatements?: boolean; + insertSpaceBeforeAndAfterBinaryOperators?: boolean; + insertSpaceAfterConstructor?: boolean; + insertSpaceAfterKeywordsInControlFlowStatements?: boolean; + insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean; + insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean; + insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean; + insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean; + insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; + insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean; + insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; + insertSpaceAfterTypeAssertion?: boolean; + insertSpaceBeforeFunctionParenthesis?: boolean; + placeOpenBraceOnNewLineForFunctions?: boolean; + placeOpenBraceOnNewLineForControlBlocks?: boolean; + insertSpaceBeforeTypeAnnotation?: boolean; + semicolons?: SemicolonPreference; + indentSwitchCase?: boolean; + } + interface UserPreferences { + readonly disableSuggestions?: boolean; + readonly quotePreference?: "auto" | "double" | "single"; + /** + * If enabled, TypeScript will search through all external modules' exports and add them to the completions list. + * This affects lone identifier completions but not completions on the right hand side of `obj.`. + */ + readonly includeCompletionsForModuleExports?: boolean; + /** + * Enables auto-import-style completions on partially-typed import statements. E.g., allows + * `import write|` to be completed to `import { writeFile } from "fs"`. + */ + readonly includeCompletionsForImportStatements?: boolean; + /** + * Allows completions to be formatted with snippet text, indicated by `CompletionItem["isSnippet"]`. + */ + readonly includeCompletionsWithSnippetText?: boolean; + /** + * If enabled, the completion list will include completions with invalid identifier names. + * For those entries, The `insertText` and `replacementSpan` properties will be set to change from `.x` property access to `["x"]`. + */ + readonly includeCompletionsWithInsertText?: boolean; + /** + * Unless this option is `false`, or `includeCompletionsWithInsertText` is not enabled, + * member completion lists triggered with `.` will include entries on potentially-null and potentially-undefined + * values, with insertion text to replace preceding `.` tokens with `?.`. + */ + readonly includeAutomaticOptionalChainCompletions?: boolean; + /** + * If enabled, completions for class members (e.g. methods and properties) will include + * a whole declaration for the member. + * E.g., `class A { f| }` could be completed to `class A { foo(): number {} }`, instead of + * `class A { foo }`. + */ + readonly includeCompletionsWithClassMemberSnippets?: boolean; + /** + * If enabled, object literal methods will have a method declaration completion entry in addition + * to the regular completion entry containing just the method name. + * E.g., `const objectLiteral: T = { f| }` could be completed to `const objectLiteral: T = { foo(): void {} }`, + * in addition to `const objectLiteral: T = { foo }`. + */ + readonly includeCompletionsWithObjectLiteralMethodSnippets?: boolean; + /** + * Indicates whether {@link CompletionEntry.labelDetails completion entry label details} are supported. + * If not, contents of `labelDetails` may be included in the {@link CompletionEntry.name} property. + */ + readonly useLabelDetailsInCompletionEntries?: boolean; + readonly allowIncompleteCompletions?: boolean; + readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative"; + /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */ + readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; + readonly allowTextChangesInNewFiles?: boolean; + readonly lazyConfiguredProjectsFromExternalProject?: boolean; + readonly providePrefixAndSuffixTextForRename?: boolean; + readonly provideRefactorNotApplicableReason?: boolean; + readonly allowRenameOfImportPath?: boolean; + readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; + readonly jsxAttributeCompletionStyle?: "auto" | "braces" | "none"; + readonly displayPartsForJSDoc?: boolean; + readonly generateReturnInDocTemplate?: boolean; + readonly includeInlayParameterNameHints?: "none" | "literals" | "all"; + readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; + readonly includeInlayFunctionParameterTypeHints?: boolean; + readonly includeInlayVariableTypeHints?: boolean; + readonly includeInlayVariableTypeHintsWhenTypeMatchesName?: boolean; + readonly includeInlayPropertyDeclarationTypeHints?: boolean; + readonly includeInlayFunctionLikeReturnTypeHints?: boolean; + readonly includeInlayEnumMemberValueHints?: boolean; + readonly interactiveInlayHints?: boolean; + readonly autoImportFileExcludePatterns?: string[]; + /** + * Indicates whether imports should be organized in a case-insensitive manner. + */ + readonly organizeImportsIgnoreCase?: "auto" | boolean; + /** + * Indicates whether imports should be organized via an "ordinal" (binary) comparison using the numeric value + * of their code points, or via "unicode" collation (via the + * [Unicode Collation Algorithm](https://unicode.org/reports/tr10/#Scope)) using rules associated with the locale + * specified in {@link organizeImportsCollationLocale}. + * + * Default: `"ordinal"`. + */ + readonly organizeImportsCollation?: "ordinal" | "unicode"; + /** + * Indicates the locale to use for "unicode" collation. If not specified, the locale `"en"` is used as an invariant + * for the sake of consistent sorting. Use `"auto"` to use the detected UI locale. + * + * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. + * + * Default: `"en"` + */ + readonly organizeImportsCollationLocale?: string; + /** + * Indicates whether numeric collation should be used for digit sequences in strings. When `true`, will collate + * strings such that `a1z < a2z < a100z`. When `false`, will collate strings such that `a1z < a100z < a2z`. + * + * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. + * + * Default: `false` + */ + readonly organizeImportsNumericCollation?: boolean; + /** + * Indicates whether accents and other diacritic marks are considered unequal for the purpose of collation. When + * `true`, characters with accents and other diacritics will be collated in the order defined by the locale specified + * in {@link organizeImportsCollationLocale}. + * + * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. + * + * Default: `true` + */ + readonly organizeImportsAccentCollation?: boolean; + /** + * Indicates whether upper case or lower case should sort first. When `false`, the default order for the locale + * specified in {@link organizeImportsCollationLocale} is used. + * + * This preference is ignored if {@link organizeImportsCollation} is not `"unicode"`. This preference is also + * ignored if we are using case-insensitive sorting, which occurs when {@link organizeImportsIgnoreCase} is `true`, + * or if {@link organizeImportsIgnoreCase} is `"auto"` and the auto-detected case sensitivity is determined to be + * case-insensitive. + * + * Default: `false` + */ + readonly organizeImportsCaseFirst?: "upper" | "lower" | false; + /** + * Indicates whether {@link ReferencesResponseItem.lineText} is supported. + */ + readonly disableLineTextInReferences?: boolean; + /** + * Indicates whether to exclude standard library and node_modules file symbols from navTo results. + */ + readonly excludeLibrarySymbolsInNavTo?: boolean; + } + interface CompilerOptions { + allowJs?: boolean; + allowSyntheticDefaultImports?: boolean; + allowUnreachableCode?: boolean; + allowUnusedLabels?: boolean; + alwaysStrict?: boolean; + baseUrl?: string; + charset?: string; + checkJs?: boolean; + declaration?: boolean; + declarationDir?: string; + disableSizeLimit?: boolean; + downlevelIteration?: boolean; + emitBOM?: boolean; + emitDecoratorMetadata?: boolean; + experimentalDecorators?: boolean; + forceConsistentCasingInFileNames?: boolean; + importHelpers?: boolean; + inlineSourceMap?: boolean; + inlineSources?: boolean; + isolatedModules?: boolean; + jsx?: JsxEmit | ts.JsxEmit; + lib?: string[]; + locale?: string; + mapRoot?: string; + maxNodeModuleJsDepth?: number; + module?: ModuleKind | ts.ModuleKind; + moduleResolution?: ModuleResolutionKind | ts.ModuleResolutionKind; + newLine?: NewLineKind | ts.NewLineKind; + noEmit?: boolean; + noEmitHelpers?: boolean; + noEmitOnError?: boolean; + noErrorTruncation?: boolean; + noFallthroughCasesInSwitch?: boolean; + noImplicitAny?: boolean; + noImplicitReturns?: boolean; + noImplicitThis?: boolean; + noUnusedLocals?: boolean; + noUnusedParameters?: boolean; + noImplicitUseStrict?: boolean; + noLib?: boolean; + noResolve?: boolean; + out?: string; + outDir?: string; + outFile?: string; + paths?: MapLike; + plugins?: PluginImport[]; + preserveConstEnums?: boolean; + preserveSymlinks?: boolean; + project?: string; + reactNamespace?: string; + removeComments?: boolean; + references?: ProjectReference[]; + rootDir?: string; + rootDirs?: string[]; + skipLibCheck?: boolean; + skipDefaultLibCheck?: boolean; + sourceMap?: boolean; + sourceRoot?: string; + strict?: boolean; + strictNullChecks?: boolean; + suppressExcessPropertyErrors?: boolean; + suppressImplicitAnyIndexErrors?: boolean; + useDefineForClassFields?: boolean; + target?: ScriptTarget | ts.ScriptTarget; + traceResolution?: boolean; + resolveJsonModule?: boolean; + types?: string[]; + /** Paths used to used to compute primary types search locations */ + typeRoots?: string[]; + [option: string]: CompilerOptionsValue | undefined; + } + enum JsxEmit { + None = "None", + Preserve = "Preserve", + ReactNative = "ReactNative", + React = "React", + } + enum ModuleKind { + None = "None", + CommonJS = "CommonJS", + AMD = "AMD", + UMD = "UMD", + System = "System", + ES6 = "ES6", + ES2015 = "ES2015", + ESNext = "ESNext", + } + enum ModuleResolutionKind { + Classic = "Classic", + Node = "Node", + } + enum NewLineKind { + Crlf = "Crlf", + Lf = "Lf", + } + enum ScriptTarget { + ES3 = "ES3", + ES5 = "ES5", + ES6 = "ES6", + ES2015 = "ES2015", + ES2016 = "ES2016", + ES2017 = "ES2017", + ES2018 = "ES2018", + ES2019 = "ES2019", + ES2020 = "ES2020", + ES2021 = "ES2021", + ES2022 = "ES2022", + ESNext = "ESNext", + } + enum ClassificationType { + comment = 1, + identifier = 2, + keyword = 3, + numericLiteral = 4, + operator = 5, + stringLiteral = 6, + regularExpressionLiteral = 7, + whiteSpace = 8, + text = 9, + punctuation = 10, + className = 11, + enumName = 12, + interfaceName = 13, + moduleName = 14, + typeParameterName = 15, + typeAliasName = 16, + parameterName = 17, + docCommentTagName = 18, + jsxOpenTagName = 19, + jsxCloseTagName = 20, + jsxSelfClosingTagName = 21, + jsxAttribute = 22, + jsxText = 23, + jsxAttributeStringLiteralValue = 24, + bigintLiteral = 25, + } + } + namespace typingsInstaller { + interface Log { + isEnabled(): boolean; + writeLine(text: string): void; + } + type RequestCompletedAction = (success: boolean) => void; + interface PendingRequest { + requestId: number; + packageNames: string[]; + cwd: string; + onRequestCompleted: RequestCompletedAction; + } + abstract class TypingsInstaller { + protected readonly installTypingHost: InstallTypingHost; + private readonly globalCachePath; + private readonly safeListPath; + private readonly typesMapLocation; + private readonly throttleLimit; + protected readonly log: Log; + private readonly packageNameToTypingLocation; + private readonly missingTypingsSet; + private readonly knownCachesSet; + private readonly projectWatchers; + private safeList; + private installRunCount; + private inFlightRequestCount; + abstract readonly typesRegistry: Map>; + constructor(installTypingHost: InstallTypingHost, globalCachePath: string, safeListPath: Path, typesMapLocation: Path, throttleLimit: number, log?: Log); + closeProject(req: CloseProject): void; + private closeWatchers; + install(req: DiscoverTypings): void; + private initializeSafeList; + private processCacheLocation; + private filterTypings; + protected ensurePackageDirectoryExists(directory: string): void; + private installTypings; + private ensureDirectoryExists; + private watchFiles; + private createSetTypings; + private installTypingsAsync; + private executeWithThrottling; + protected abstract installWorker(requestId: number, packageNames: string[], cwd: string, onRequestCompleted: RequestCompletedAction): void; + protected abstract sendResponse(response: SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes | WatchTypingLocations): void; + protected readonly latestDistTag = "latest"; + } + } + interface CompressedData { + length: number; + compressionKind: string; + data: any; + } + type ModuleImportResult = { + module: {}; + error: undefined; + } | { + module: undefined; + error: { + stack?: string; + message?: string; + }; + }; + /** @deprecated Use {@link ModuleImportResult} instead. */ + type RequireResult = ModuleImportResult; + interface ServerHost extends System { + watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; + watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; + setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; + clearTimeout(timeoutId: any): void; + setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; + clearImmediate(timeoutId: any): void; + gc?(): void; + trace?(s: string): void; + require?(initialPath: string, moduleName: string): ModuleImportResult; + } + function createInstallTypingsRequest(project: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray, cachePath?: string): DiscoverTypings; + function toNormalizedPath(fileName: string): NormalizedPath; + function normalizedPathToPath(normalizedPath: NormalizedPath, currentDirectory: string, getCanonicalFileName: (f: string) => string): Path; + function asNormalizedPath(fileName: string): NormalizedPath; + function createNormalizedPathMap(): NormalizedPathMap; + function isInferredProjectName(name: string): boolean; + function makeInferredProjectName(counter: number): string; + function createSortedArray(): SortedArray; + enum LogLevel { + terse = 0, + normal = 1, + requestTime = 2, + verbose = 3, + } + const emptyArray: SortedReadonlyArray; + interface Logger { + close(): void; + hasLevel(level: LogLevel): boolean; + loggingEnabled(): boolean; + perftrc(s: string): void; + info(s: string): void; + startGroup(): void; + endGroup(): void; + msg(s: string, type?: Msg): void; + getLogFileName(): string | undefined; + } + enum Msg { + Err = "Err", + Info = "Info", + Perf = "Perf", + } + namespace Errors { + function ThrowNoProject(): never; + function ThrowProjectLanguageServiceDisabled(): never; + function ThrowProjectDoesNotContainDocument(fileName: string, project: Project): never; + } + type NormalizedPath = string & { + __normalizedPathTag: any; + }; + interface NormalizedPathMap { + get(path: NormalizedPath): T | undefined; + set(path: NormalizedPath, value: T): void; + contains(path: NormalizedPath): boolean; + remove(path: NormalizedPath): void; + } + function isDynamicFileName(fileName: NormalizedPath): boolean; + class ScriptInfo { + private readonly host; + readonly fileName: NormalizedPath; + readonly scriptKind: ScriptKind; + readonly hasMixedContent: boolean; + readonly path: Path; + /** + * All projects that include this file + */ + readonly containingProjects: Project[]; + private formatSettings; + private preferences; + constructor(host: ServerHost, fileName: NormalizedPath, scriptKind: ScriptKind, hasMixedContent: boolean, path: Path, initialVersion?: number); + isScriptOpen(): boolean; + open(newText: string | undefined): void; + close(fileExists?: boolean): void; + getSnapshot(): IScriptSnapshot; + private ensureRealPath; + getFormatCodeSettings(): FormatCodeSettings | undefined; + getPreferences(): protocol.UserPreferences | undefined; + attachToProject(project: Project): boolean; + isAttached(project: Project): boolean; + detachFromProject(project: Project): void; + detachAllProjects(): void; + getDefaultProject(): Project; + registerFileUpdate(): void; + setOptions(formatSettings: FormatCodeSettings, preferences: protocol.UserPreferences | undefined): void; + getLatestVersion(): string; + saveTo(fileName: string): void; + reloadFromFile(tempFileName?: NormalizedPath): boolean; + editContent(start: number, end: number, newText: string): void; + markContainingProjectsAsDirty(): void; + isOrphan(): boolean; + /** + * @param line 1 based index + */ + lineToTextSpan(line: number): TextSpan; + /** + * @param line 1 based index + * @param offset 1 based index + */ + lineOffsetToPosition(line: number, offset: number): number; + positionToLineOffset(position: number): protocol.Location; + isJavaScript(): boolean; + } + interface InstallPackageOptionsWithProject extends InstallPackageOptions { + projectName: string; + projectRootPath: Path; + } + interface ITypingsInstaller { + isKnownTypesPackageName(name: string): boolean; + installPackage(options: InstallPackageOptionsWithProject): Promise; + enqueueInstallTypingsRequest(p: Project, typeAcquisition: TypeAcquisition, unresolvedImports: SortedReadonlyArray | undefined): void; + attach(projectService: ProjectService): void; + onProjectClosed(p: Project): void; + readonly globalTypingsCacheLocation: string | undefined; + } + const nullTypingsInstaller: ITypingsInstaller; + function allRootFilesAreJsOrDts(project: Project): boolean; + function allFilesAreJsOrDts(project: Project): boolean; + enum ProjectKind { + Inferred = 0, + Configured = 1, + External = 2, + AutoImportProvider = 3, + Auxiliary = 4, + } + interface PluginCreateInfo { + project: Project; + languageService: LanguageService; + languageServiceHost: LanguageServiceHost; + serverHost: ServerHost; + session?: Session; + config: any; + } + interface PluginModule { + create(createInfo: PluginCreateInfo): LanguageService; + getExternalFiles?(proj: Project, updateLevel: ProgramUpdateLevel): string[]; + onConfigurationChanged?(config: any): void; + } + interface PluginModuleWithName { + name: string; + module: PluginModule; + } + type PluginModuleFactory = (mod: { + typescript: typeof ts; + }) => PluginModule; + abstract class Project implements LanguageServiceHost, ModuleResolutionHost { + readonly projectKind: ProjectKind; + readonly projectService: ProjectService; + private documentRegistry; + private compilerOptions; + compileOnSaveEnabled: boolean; + protected watchOptions: WatchOptions | undefined; + private rootFiles; + private rootFilesMap; + private program; + private externalFiles; + private missingFilesMap; + private generatedFilesMap; + protected languageService: LanguageService; + languageServiceEnabled: boolean; + readonly trace?: (s: string) => void; + readonly realpath?: (path: string) => string; + private builderState; + /** + * Set of files names that were updated since the last call to getChangesSinceVersion. + */ + private updatedFileNames; + /** + * Set of files that was returned from the last call to getChangesSinceVersion. + */ + private lastReportedFileNames; + /** + * Last version that was reported. + */ + private lastReportedVersion; + /** + * Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one) + * This property is changed in 'updateGraph' based on the set of files in program + */ + private projectProgramVersion; + /** + * Current version of the project state. It is changed when: + * - new root file was added/removed + * - edit happen in some file that is currently included in the project. + * This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project + */ + private projectStateVersion; + protected projectErrors: Diagnostic[] | undefined; + protected isInitialLoadPending: () => boolean; + private readonly cancellationToken; + isNonTsProject(): boolean; + isJsOnlyProject(): boolean; + static resolveModule(moduleName: string, initialDir: string, host: ServerHost, log: (message: string) => void): {} | undefined; + readonly jsDocParsingMode: JSDocParsingMode | undefined; + isKnownTypesPackageName(name: string): boolean; + installPackage(options: InstallPackageOptions): Promise; + private get typingsCache(); + getCompilationSettings(): ts.CompilerOptions; + getCompilerOptions(): ts.CompilerOptions; + getNewLine(): string; + getProjectVersion(): string; + getProjectReferences(): readonly ProjectReference[] | undefined; + getScriptFileNames(): string[]; + private getOrCreateScriptInfoAndAttachToProject; + getScriptKind(fileName: string): ts.ScriptKind; + getScriptVersion(filename: string): string; + getScriptSnapshot(filename: string): IScriptSnapshot | undefined; + getCancellationToken(): HostCancellationToken; + getCurrentDirectory(): string; + getDefaultLibFileName(): string; + useCaseSensitiveFileNames(): boolean; + readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[]; + readFile(fileName: string): string | undefined; + writeFile(fileName: string, content: string): void; + fileExists(file: string): boolean; + directoryExists(path: string): boolean; + getDirectories(path: string): string[]; + log(s: string): void; + error(s: string): void; + private setInternalCompilerOptionsForEmittingJsFiles; + /** + * Get the errors that dont have any file name associated + */ + getGlobalProjectErrors(): readonly Diagnostic[]; + /** + * Get all the project errors + */ + getAllProjectErrors(): readonly Diagnostic[]; + setProjectErrors(projectErrors: Diagnostic[] | undefined): void; + getLanguageService(ensureSynchronized?: boolean): LanguageService; + getCompileOnSaveAffectedFileList(scriptInfo: ScriptInfo): string[]; + /** + * Returns true if emit was conducted + */ + emitFile(scriptInfo: ScriptInfo, writeFile: (path: string, data: string, writeByteOrderMark?: boolean) => void): EmitResult; + enableLanguageService(): void; + disableLanguageService(lastFileExceededProgramSize?: string): void; + getProjectName(): string; + protected removeLocalTypingsFromTypeAcquisition(newTypeAcquisition: TypeAcquisition): TypeAcquisition; + getExternalFiles(updateLevel?: ProgramUpdateLevel): SortedReadonlyArray; + getSourceFile(path: Path): ts.SourceFile | undefined; + close(): void; + private detachScriptInfoIfNotRoot; + isClosed(): boolean; + hasRoots(): boolean; + getRootFiles(): ts.server.NormalizedPath[]; + getRootScriptInfos(): ts.server.ScriptInfo[]; + getScriptInfos(): ScriptInfo[]; + getExcludedFiles(): readonly NormalizedPath[]; + getFileNames(excludeFilesFromExternalLibraries?: boolean, excludeConfigFiles?: boolean): ts.server.NormalizedPath[]; + hasConfigFile(configFilePath: NormalizedPath): boolean; + containsScriptInfo(info: ScriptInfo): boolean; + containsFile(filename: NormalizedPath, requireOpen?: boolean): boolean; + isRoot(info: ScriptInfo): boolean; + addRoot(info: ScriptInfo, fileName?: NormalizedPath): void; + addMissingFileRoot(fileName: NormalizedPath): void; + removeFile(info: ScriptInfo, fileExists: boolean, detachFromProject: boolean): void; + registerFileUpdate(fileName: string): void; + markAsDirty(): void; + /** + * Updates set of files that contribute to this project + * @returns: true if set of files in the project stays the same and false - otherwise. + */ + updateGraph(): boolean; + protected removeExistingTypings(include: string[]): string[]; + private updateGraphWorker; + private detachScriptInfoFromProject; + private addMissingFileWatcher; + private isWatchedMissingFile; + private createGeneratedFileWatcher; + private isValidGeneratedFileWatcher; + private clearGeneratedFileWatch; + getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined; + getScriptInfo(uncheckedFileName: string): ts.server.ScriptInfo | undefined; + filesToString(writeProjectFileNames: boolean): string; + setCompilerOptions(compilerOptions: CompilerOptions): void; + setTypeAcquisition(newTypeAcquisition: TypeAcquisition | undefined): void; + getTypeAcquisition(): ts.TypeAcquisition; + protected removeRoot(info: ScriptInfo): void; + protected enableGlobalPlugins(options: CompilerOptions): void; + protected enablePlugin(pluginConfigEntry: PluginImport, searchPaths: string[]): void; + /** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */ + refreshDiagnostics(): void; + } + /** + * If a file is opened and no tsconfig (or jsconfig) is found, + * the file and its imports/references are put into an InferredProject. + */ + class InferredProject extends Project { + private _isJsInferredProject; + toggleJsInferredProject(isJsInferredProject: boolean): void; + setCompilerOptions(options?: CompilerOptions): void; + /** this is canonical project root path */ + readonly projectRootPath: string | undefined; + addRoot(info: ScriptInfo): void; + removeRoot(info: ScriptInfo): void; + isProjectWithSingleRoot(): boolean; + close(): void; + getTypeAcquisition(): TypeAcquisition; + } + class AutoImportProviderProject extends Project { + private hostProject; + private rootFileNames; + isOrphan(): boolean; + updateGraph(): boolean; + hasRoots(): boolean; + markAsDirty(): void; + getScriptFileNames(): string[]; + getLanguageService(): never; + getHostForAutoImportProvider(): never; + getProjectReferences(): readonly ts.ProjectReference[] | undefined; + } + /** + * If a file is opened, the server will look for a tsconfig (or jsconfig) + * and if successful create a ConfiguredProject for it. + * Otherwise it will create an InferredProject. + */ + class ConfiguredProject extends Project { + readonly canonicalConfigFilePath: NormalizedPath; + /** Ref count to the project when opened from external project */ + private externalProjectRefCount; + private projectReferences; + /** + * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph + * @returns: true if set of files in the project stays the same and false - otherwise. + */ + updateGraph(): boolean; + getConfigFilePath(): ts.server.NormalizedPath; + getProjectReferences(): readonly ProjectReference[] | undefined; + updateReferences(refs: readonly ProjectReference[] | undefined): void; + /** + * Get the errors that dont have any file name associated + */ + getGlobalProjectErrors(): readonly Diagnostic[]; + /** + * Get all the project errors + */ + getAllProjectErrors(): readonly Diagnostic[]; + setProjectErrors(projectErrors: Diagnostic[]): void; + close(): void; + getEffectiveTypeRoots(): string[]; + } + /** + * Project whose configuration is handled externally, such as in a '.csproj'. + * These are created only if a host explicitly calls `openExternalProject`. + */ + class ExternalProject extends Project { + externalProjectName: string; + compileOnSaveEnabled: boolean; + excludedFiles: readonly NormalizedPath[]; + updateGraph(): boolean; + getExcludedFiles(): readonly ts.server.NormalizedPath[]; + } + function convertFormatOptions(protocolOptions: protocol.FormatCodeSettings): FormatCodeSettings; + function convertCompilerOptions(protocolOptions: protocol.ExternalProjectCompilerOptions): CompilerOptions & protocol.CompileOnSaveMixin; + function convertWatchOptions(protocolOptions: protocol.ExternalProjectCompilerOptions, currentDirectory?: string): WatchOptionsAndErrors | undefined; + function convertTypeAcquisition(protocolOptions: protocol.InferredProjectCompilerOptions): TypeAcquisition | undefined; + function tryConvertScriptKindName(scriptKindName: protocol.ScriptKindName | ScriptKind): ScriptKind; + function convertScriptKindName(scriptKindName: protocol.ScriptKindName): ScriptKind.Unknown | ScriptKind.JS | ScriptKind.JSX | ScriptKind.TS | ScriptKind.TSX; + const maxProgramSizeForNonTsFiles: number; + const ProjectsUpdatedInBackgroundEvent = "projectsUpdatedInBackground"; + interface ProjectsUpdatedInBackgroundEvent { + eventName: typeof ProjectsUpdatedInBackgroundEvent; + data: { + openFiles: string[]; + }; + } + const ProjectLoadingStartEvent = "projectLoadingStart"; + interface ProjectLoadingStartEvent { + eventName: typeof ProjectLoadingStartEvent; + data: { + project: Project; + reason: string; + }; + } + const ProjectLoadingFinishEvent = "projectLoadingFinish"; + interface ProjectLoadingFinishEvent { + eventName: typeof ProjectLoadingFinishEvent; + data: { + project: Project; + }; + } + const LargeFileReferencedEvent = "largeFileReferenced"; + interface LargeFileReferencedEvent { + eventName: typeof LargeFileReferencedEvent; + data: { + file: string; + fileSize: number; + maxFileSize: number; + }; + } + const ConfigFileDiagEvent = "configFileDiag"; + interface ConfigFileDiagEvent { + eventName: typeof ConfigFileDiagEvent; + data: { + triggerFile: string; + configFileName: string; + diagnostics: readonly Diagnostic[]; + }; + } + const ProjectLanguageServiceStateEvent = "projectLanguageServiceState"; + interface ProjectLanguageServiceStateEvent { + eventName: typeof ProjectLanguageServiceStateEvent; + data: { + project: Project; + languageServiceEnabled: boolean; + }; + } + const ProjectInfoTelemetryEvent = "projectInfo"; + /** This will be converted to the payload of a protocol.TelemetryEvent in session.defaultEventHandler. */ + interface ProjectInfoTelemetryEvent { + readonly eventName: typeof ProjectInfoTelemetryEvent; + readonly data: ProjectInfoTelemetryEventData; + } + const OpenFileInfoTelemetryEvent = "openFileInfo"; + /** + * Info that we may send about a file that was just opened. + * Info about a file will only be sent once per session, even if the file changes in ways that might affect the info. + * Currently this is only sent for '.js' files. + */ + interface OpenFileInfoTelemetryEvent { + readonly eventName: typeof OpenFileInfoTelemetryEvent; + readonly data: OpenFileInfoTelemetryEventData; + } + const CreateFileWatcherEvent: protocol.CreateFileWatcherEventName; + interface CreateFileWatcherEvent { + readonly eventName: protocol.CreateFileWatcherEventName; + readonly data: protocol.CreateFileWatcherEventBody; + } + const CreateDirectoryWatcherEvent: protocol.CreateDirectoryWatcherEventName; + interface CreateDirectoryWatcherEvent { + readonly eventName: protocol.CreateDirectoryWatcherEventName; + readonly data: protocol.CreateDirectoryWatcherEventBody; + } + const CloseFileWatcherEvent: protocol.CloseFileWatcherEventName; + interface CloseFileWatcherEvent { + readonly eventName: protocol.CloseFileWatcherEventName; + readonly data: protocol.CloseFileWatcherEventBody; + } + interface ProjectInfoTelemetryEventData { + /** Cryptographically secure hash of project file location. */ + readonly projectId: string; + /** Count of file extensions seen in the project. */ + readonly fileStats: FileStats; + /** + * Any compiler options that might contain paths will be taken out. + * Enum compiler options will be converted to strings. + */ + readonly compilerOptions: CompilerOptions; + readonly extends: boolean | undefined; + readonly files: boolean | undefined; + readonly include: boolean | undefined; + readonly exclude: boolean | undefined; + readonly compileOnSave: boolean; + readonly typeAcquisition: ProjectInfoTypeAcquisitionData; + readonly configFileName: "tsconfig.json" | "jsconfig.json" | "other"; + readonly projectType: "external" | "configured"; + readonly languageServiceEnabled: boolean; + /** TypeScript version used by the server. */ + readonly version: string; + } + interface OpenFileInfoTelemetryEventData { + readonly info: OpenFileInfo; + } + interface ProjectInfoTypeAcquisitionData { + readonly enable: boolean | undefined; + readonly include: boolean; + readonly exclude: boolean; + } + interface FileStats { + readonly js: number; + readonly jsSize?: number; + readonly jsx: number; + readonly jsxSize?: number; + readonly ts: number; + readonly tsSize?: number; + readonly tsx: number; + readonly tsxSize?: number; + readonly dts: number; + readonly dtsSize?: number; + readonly deferred: number; + readonly deferredSize?: number; + } + interface OpenFileInfo { + readonly checkJs: boolean; + } + type ProjectServiceEvent = LargeFileReferencedEvent | ProjectsUpdatedInBackgroundEvent | ProjectLoadingStartEvent | ProjectLoadingFinishEvent | ConfigFileDiagEvent | ProjectLanguageServiceStateEvent | ProjectInfoTelemetryEvent | OpenFileInfoTelemetryEvent | CreateFileWatcherEvent | CreateDirectoryWatcherEvent | CloseFileWatcherEvent; + type ProjectServiceEventHandler = (event: ProjectServiceEvent) => void; + interface SafeList { + [name: string]: { + match: RegExp; + exclude?: (string | number)[][]; + types?: string[]; + }; + } + interface TypesMapFile { + typesMap: SafeList; + simpleMap: { + [libName: string]: string; + }; + } + interface HostConfiguration { + formatCodeOptions: FormatCodeSettings; + preferences: protocol.UserPreferences; + hostInfo: string; + extraFileExtensions?: FileExtensionInfo[]; + watchOptions?: WatchOptions; + } + interface OpenConfiguredProjectResult { + configFileName?: NormalizedPath; + configFileErrors?: readonly Diagnostic[]; + } + interface ProjectServiceOptions { + host: ServerHost; + logger: Logger; + cancellationToken: HostCancellationToken; + useSingleInferredProject: boolean; + useInferredProjectPerProjectRoot: boolean; + typingsInstaller?: ITypingsInstaller; + eventHandler?: ProjectServiceEventHandler; + canUseWatchEvents?: boolean; + suppressDiagnosticEvents?: boolean; + throttleWaitMilliseconds?: number; + globalPlugins?: readonly string[]; + pluginProbeLocations?: readonly string[]; + allowLocalPluginLoads?: boolean; + typesMapLocation?: string; + serverMode?: LanguageServiceMode; + session: Session | undefined; + jsDocParsingMode?: JSDocParsingMode; + } + interface WatchOptionsAndErrors { + watchOptions: WatchOptions; + errors: Diagnostic[] | undefined; + } + class ProjectService { + private readonly nodeModulesWatchers; + /** + * Contains all the deleted script info's version information so that + * it does not reset when creating script info again + * (and could have potentially collided with version where contents mismatch) + */ + private readonly filenameToScriptInfoVersion; + private readonly allJsFilesForOpenFileTelemetry; + /** + * maps external project file name to list of config files that were the part of this project + */ + private readonly externalProjectToConfiguredProjectMap; + /** + * external projects (configuration and list of root files is not controlled by tsserver) + */ + readonly externalProjects: ExternalProject[]; + /** + * projects built from openFileRoots + */ + readonly inferredProjects: InferredProject[]; + /** + * projects specified by a tsconfig.json file + */ + readonly configuredProjects: Map; + /** + * Open files: with value being project root path, and key being Path of the file that is open + */ + readonly openFiles: Map; + /** + * Map of open files that are opened without complete path but have projectRoot as current directory + */ + private readonly openFilesWithNonRootedDiskPath; + private compilerOptionsForInferredProjects; + private compilerOptionsForInferredProjectsPerProjectRoot; + private watchOptionsForInferredProjects; + private watchOptionsForInferredProjectsPerProjectRoot; + private typeAcquisitionForInferredProjects; + private typeAcquisitionForInferredProjectsPerProjectRoot; + /** + * Project size for configured or external projects + */ + private readonly projectToSizeMap; + private readonly hostConfiguration; + private safelist; + private readonly legacySafelist; + private pendingProjectUpdates; + readonly currentDirectory: NormalizedPath; + readonly toCanonicalFileName: (f: string) => string; + readonly host: ServerHost; + readonly logger: Logger; + readonly cancellationToken: HostCancellationToken; + readonly useSingleInferredProject: boolean; + readonly useInferredProjectPerProjectRoot: boolean; + readonly typingsInstaller: ITypingsInstaller; + private readonly globalCacheLocationDirectoryPath; + readonly throttleWaitMilliseconds?: number; + private readonly suppressDiagnosticEvents?; + readonly globalPlugins: readonly string[]; + readonly pluginProbeLocations: readonly string[]; + readonly allowLocalPluginLoads: boolean; + readonly typesMapLocation: string | undefined; + readonly serverMode: LanguageServiceMode; + /** Tracks projects that we have already sent telemetry for. */ + private readonly seenProjects; + private performanceEventHandler?; + private pendingPluginEnablements?; + private currentPluginEnablementPromise?; + readonly jsDocParsingMode: JSDocParsingMode | undefined; + constructor(opts: ProjectServiceOptions); + toPath(fileName: string): Path; + private loadTypesMap; + updateTypingsForProject(response: SetTypings | InvalidateCachedTypings | PackageInstalledResponse): void; + private delayUpdateProjectGraph; + private delayUpdateProjectGraphs; + setCompilerOptionsForInferredProjects(projectCompilerOptions: protocol.InferredProjectCompilerOptions, projectRootPath?: string): void; + findProject(projectName: string): Project | undefined; + getDefaultProjectForFile(fileName: NormalizedPath, ensureProject: boolean): Project | undefined; + private doEnsureDefaultProjectForFile; + getScriptInfoEnsuringProjectsUptoDate(uncheckedFileName: string): ScriptInfo | undefined; + /** + * Ensures the project structures are upto date + * This means, + * - we go through all the projects and update them if they are dirty + * - if updates reflect some change in structure or there was pending request to ensure projects for open files + * ensure that each open script info has project + */ + private ensureProjectStructuresUptoDate; + getFormatCodeOptions(file: NormalizedPath): FormatCodeSettings; + getPreferences(file: NormalizedPath): protocol.UserPreferences; + getHostFormatCodeOptions(): FormatCodeSettings; + getHostPreferences(): protocol.UserPreferences; + private onSourceFileChanged; + private handleSourceMapProjects; + private delayUpdateSourceInfoProjects; + private delayUpdateProjectsOfScriptInfoPath; + private handleDeletedFile; + private removeProject; + private assignOrphanScriptInfosToInferredProject; + /** + * Remove this file from the set of open, non-configured files. + * @param info The file that has been closed or newly configured + */ + private closeOpenFile; + private deleteScriptInfo; + private configFileExists; + /** + * Returns true if the configFileExistenceInfo is needed/impacted by open files that are root of inferred project + */ + private configFileExistenceImpactsRootOfInferredProject; + /** + * This is called on file close, so that we stop watching the config file for this script info + */ + private stopWatchingConfigFilesForClosedScriptInfo; + /** + * This function tries to search for a tsconfig.json for the given file. + * This is different from the method the compiler uses because + * the compiler can assume it will always start searching in the + * current directory (the directory in which tsc was invoked). + * The server must start searching from the directory containing + * the newly opened file. + */ + private forEachConfigFileLocation; + /** + * This function tries to search for a tsconfig.json for the given file. + * This is different from the method the compiler uses because + * the compiler can assume it will always start searching in the + * current directory (the directory in which tsc was invoked). + * The server must start searching from the directory containing + * the newly opened file. + * If script info is passed in, it is asserted to be open script info + * otherwise just file name + */ + private getConfigFileNameForFile; + private printProjects; + private getConfiguredProjectByCanonicalConfigFilePath; + private findExternalProjectByProjectName; + /** Get a filename if the language service exceeds the maximum allowed program size; otherwise returns undefined. */ + private getFilenameForExceededTotalSizeLimitForNonTsFiles; + private createExternalProject; + private addFilesToNonInferredProject; + private updateNonInferredProjectFiles; + private updateRootAndOptionsOfNonInferredProject; + private sendConfigFileDiagEvent; + private getOrCreateInferredProjectForProjectRootPathIfEnabled; + private getOrCreateSingleInferredProjectIfEnabled; + private getOrCreateSingleInferredWithoutProjectRoot; + private createInferredProject; + getScriptInfo(uncheckedFileName: string): ScriptInfo | undefined; + private watchClosedScriptInfo; + private createNodeModulesWatcher; + private watchClosedScriptInfoInNodeModules; + private getModifiedTime; + private refreshScriptInfo; + private refreshScriptInfosInDirectory; + private stopWatchingScriptInfo; + private getOrCreateScriptInfoNotOpenedByClientForNormalizedPath; + private getOrCreateScriptInfoOpenedByClientForNormalizedPath; + getOrCreateScriptInfoForNormalizedPath(fileName: NormalizedPath, openedByClient: boolean, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, hostToQueryFileExistsOn?: { + fileExists(path: string): boolean; + }): ScriptInfo | undefined; + private getOrCreateScriptInfoWorker; + /** + * This gets the script info for the normalized path. If the path is not rooted disk path then the open script info with project root context is preferred + */ + getScriptInfoForNormalizedPath(fileName: NormalizedPath): ScriptInfo | undefined; + getScriptInfoForPath(fileName: Path): ScriptInfo | undefined; + private addSourceInfoToSourceMap; + private addMissingSourceMapFile; + setHostConfiguration(args: protocol.ConfigureRequestArguments): void; + closeLog(): void; + /** + * This function rebuilds the project for every file opened by the client + * This does not reload contents of open files from disk. But we could do that if needed + */ + reloadProjects(): void; + /** + * This function goes through all the openFiles and tries to file the config file for them. + * If the config file is found and it refers to existing project, it reloads it either immediately + * or schedules it for reload depending on delayReload option + * If there is no existing project it just opens the configured project for the config file + * reloadForInfo provides a way to filter out files to reload configured project for + */ + private reloadConfiguredProjectForFiles; + /** + * Remove the root of inferred project if script info is part of another project + */ + private removeRootOfInferredProjectIfNowPartOfOtherProject; + /** + * This function is to update the project structure for every inferred project. + * It is called on the premise that all the configured projects are + * up to date. + * This will go through open files and assign them to inferred project if open file is not part of any other project + * After that all the inferred project graphs are updated + */ + private ensureProjectForOpenFiles; + /** + * Open file whose contents is managed by the client + * @param filename is absolute pathname + * @param fileContent is a known version of the file content that is more up to date than the one on disk + */ + openClientFile(fileName: string, fileContent?: string, scriptKind?: ScriptKind, projectRootPath?: string): OpenConfiguredProjectResult; + private findExternalProjectContainingOpenScriptInfo; + private getOrCreateOpenScriptInfo; + private assignProjectToOpenedScriptInfo; + private createAncestorProjects; + private ensureProjectChildren; + private cleanupAfterOpeningFile; + openClientFileWithNormalizedPath(fileName: NormalizedPath, fileContent?: string, scriptKind?: ScriptKind, hasMixedContent?: boolean, projectRootPath?: NormalizedPath): OpenConfiguredProjectResult; + private removeOrphanConfiguredProjects; + private removeOrphanScriptInfos; + private telemetryOnOpenFile; + /** + * Close file whose contents is managed by the client + * @param filename is absolute pathname + */ + closeClientFile(uncheckedFileName: string): void; + private collectChanges; + private closeConfiguredProjectReferencedFromExternalProject; + closeExternalProject(uncheckedFileName: string): void; + openExternalProjects(projects: protocol.ExternalProject[]): void; + /** Makes a filename safe to insert in a RegExp */ + private static readonly filenameEscapeRegexp; + private static escapeFilenameForRegex; + resetSafeList(): void; + applySafeList(proj: protocol.ExternalProject): NormalizedPath[]; + openExternalProject(proj: protocol.ExternalProject): void; + hasDeferredExtension(): boolean; + private enableRequestedPluginsAsync; + private enableRequestedPluginsWorker; + private enableRequestedPluginsForProjectAsync; + configurePlugin(args: protocol.ConfigurePluginRequestArguments): void; + } + function formatMessage(msg: T, logger: Logger, byteLength: (s: string, encoding: BufferEncoding) => number, newLine: string): string; + interface ServerCancellationToken extends HostCancellationToken { + setRequest(requestId: number): void; + resetRequest(requestId: number): void; + } + const nullCancellationToken: ServerCancellationToken; + interface PendingErrorCheck { + fileName: NormalizedPath; + project: Project; + } + /** @deprecated use ts.server.protocol.CommandTypes */ + type CommandNames = protocol.CommandTypes; + /** @deprecated use ts.server.protocol.CommandTypes */ + const CommandNames: any; + type Event = (body: T, eventName: string) => void; + interface EventSender { + event: Event; + } + interface SessionOptions { + host: ServerHost; + cancellationToken: ServerCancellationToken; + useSingleInferredProject: boolean; + useInferredProjectPerProjectRoot: boolean; + typingsInstaller?: ITypingsInstaller; + byteLength: (buf: string, encoding?: BufferEncoding) => number; + hrtime: (start?: [ + number, + number, + ]) => [ + number, + number, + ]; + logger: Logger; + /** + * If falsy, all events are suppressed. + */ + canUseEvents: boolean; + canUseWatchEvents?: boolean; + eventHandler?: ProjectServiceEventHandler; + /** Has no effect if eventHandler is also specified. */ + suppressDiagnosticEvents?: boolean; + serverMode?: LanguageServiceMode; + throttleWaitMilliseconds?: number; + noGetErrOnBackgroundUpdate?: boolean; + globalPlugins?: readonly string[]; + pluginProbeLocations?: readonly string[]; + allowLocalPluginLoads?: boolean; + typesMapLocation?: string; + } + class Session implements EventSender { + private readonly gcTimer; + protected projectService: ProjectService; + private changeSeq; + private performanceData; + private currentRequestId; + private errorCheck; + protected host: ServerHost; + private readonly cancellationToken; + protected readonly typingsInstaller: ITypingsInstaller; + protected byteLength: (buf: string, encoding?: BufferEncoding) => number; + private hrtime; + protected logger: Logger; + protected canUseEvents: boolean; + private suppressDiagnosticEvents?; + private eventHandler; + private readonly noGetErrOnBackgroundUpdate?; + constructor(opts: SessionOptions); + private sendRequestCompletedEvent; + private addPerformanceData; + private performanceEventHandler; + private defaultEventHandler; + private projectsUpdatedInBackgroundEvent; + logError(err: Error, cmd: string): void; + private logErrorWorker; + send(msg: protocol.Message): void; + protected writeMessage(msg: protocol.Message): void; + event(body: T, eventName: string): void; + private semanticCheck; + private syntacticCheck; + private suggestionCheck; + private sendDiagnosticsEvent; + /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */ + private updateErrorCheck; + private cleanProjects; + private cleanup; + private getEncodedSyntacticClassifications; + private getEncodedSemanticClassifications; + private getProject; + private getConfigFileAndProject; + private getConfigFileDiagnostics; + private convertToDiagnosticsWithLinePositionFromDiagnosticFile; + private getCompilerOptionsDiagnostics; + private convertToDiagnosticsWithLinePosition; + private getDiagnosticsWorker; + private getDefinition; + private mapDefinitionInfoLocations; + private getDefinitionAndBoundSpan; + private findSourceDefinition; + private getEmitOutput; + private mapJSDocTagInfo; + private mapDisplayParts; + private mapSignatureHelpItems; + private mapDefinitionInfo; + private static mapToOriginalLocation; + private toFileSpan; + private toFileSpanWithContext; + private getTypeDefinition; + private mapImplementationLocations; + private getImplementation; + private getSyntacticDiagnosticsSync; + private getSemanticDiagnosticsSync; + private getSuggestionDiagnosticsSync; + private getJsxClosingTag; + private getLinkedEditingRange; + private getDocumentHighlights; + private provideInlayHints; + private setCompilerOptionsForInferredProjects; + private getProjectInfo; + private getProjectInfoWorker; + private getRenameInfo; + private getProjects; + private getDefaultProject; + private getRenameLocations; + private mapRenameInfo; + private toSpanGroups; + private getReferences; + private getFileReferences; + /** + * @param fileName is the name of the file to be opened + * @param fileContent is a version of the file content that is known to be more up to date than the one on disk + */ + private openClientFile; + private getPosition; + private getPositionInFile; + private getFileAndProject; + private getFileAndLanguageServiceForSyntacticOperation; + private getFileAndProjectWorker; + private getOutliningSpans; + private getTodoComments; + private getDocCommentTemplate; + private getSpanOfEnclosingComment; + private getIndentation; + private getBreakpointStatement; + private getNameOrDottedNameSpan; + private isValidBraceCompletion; + private getQuickInfoWorker; + private getFormattingEditsForRange; + private getFormattingEditsForRangeFull; + private getFormattingEditsForDocumentFull; + private getFormattingEditsAfterKeystrokeFull; + private getFormattingEditsAfterKeystroke; + private getCompletions; + private getCompletionEntryDetails; + private getCompileOnSaveAffectedFileList; + private emitFile; + private getSignatureHelpItems; + private toPendingErrorCheck; + private getDiagnostics; + private change; + private reload; + private saveToTmp; + private closeClientFile; + private mapLocationNavigationBarItems; + private getNavigationBarItems; + private toLocationNavigationTree; + private getNavigationTree; + private getNavigateToItems; + private getFullNavigateToItems; + private getSupportedCodeFixes; + private isLocation; + private extractPositionOrRange; + private getRange; + private getApplicableRefactors; + private getEditsForRefactor; + private getMoveToRefactoringFileSuggestions; + private organizeImports; + private getEditsForFileRename; + private getCodeFixes; + private getCombinedCodeFix; + private applyCodeActionCommand; + private getStartAndEndPosition; + private mapCodeAction; + private mapCodeFixAction; + private mapTextChangesToCodeEdits; + private mapTextChangeToCodeEdit; + private convertTextChangeToCodeEdit; + private getBraceMatching; + private getDiagnosticsForProject; + private configurePlugin; + private getSmartSelectionRange; + private toggleLineComment; + private toggleMultilineComment; + private commentSelection; + private uncommentSelection; + private mapSelectionRange; + private getScriptInfoFromProjectService; + private toProtocolCallHierarchyItem; + private toProtocolCallHierarchyIncomingCall; + private toProtocolCallHierarchyOutgoingCall; + private prepareCallHierarchy; + private provideCallHierarchyIncomingCalls; + private provideCallHierarchyOutgoingCalls; + getCanonicalFileName(fileName: string): string; + exit(): void; + private notRequired; + private requiredResponse; + private handlers; + addProtocolHandler(command: string, handler: (request: protocol.Request) => HandlerResponse): void; + private setCurrentRequest; + private resetCurrentRequest; + executeWithRequestId(requestId: number, f: () => T): T; + executeCommand(request: protocol.Request): HandlerResponse; + onMessage(message: TMessage): void; + protected parseMessage(message: TMessage): protocol.Request; + protected toStringMessage(message: TMessage): string; + private getFormatOptions; + private getPreferences; + private getHostFormatOptions; + private getHostPreferences; + } + interface HandlerResponse { + response?: {}; + responseRequired?: boolean; + } + } + const versionMajorMinor = "5.3"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -344,9 +4462,11 @@ declare namespace ts { DefaultClause = 297, HeritageClause = 298, CatchClause = 299, - AssertClause = 300, - AssertEntry = 301, - ImportTypeAssertionContainer = 302, + ImportAttributes = 300, + ImportAttribute = 301, + /** @deprecated */ AssertClause = 300, + /** @deprecated */ AssertEntry = 301, + /** @deprecated */ ImportTypeAssertionContainer = 302, PropertyAssignment = 303, ShorthandPropertyAssignment = 304, SpreadAssignment = 305, @@ -440,13 +4560,157 @@ declare namespace ts { FirstJSDocNode = 316, LastJSDocNode = 357, FirstJSDocTagNode = 334, - LastJSDocTagNode = 357 + LastJSDocTagNode = 357, } type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; - type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionQuestionEqualsToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.HashToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; - type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AssertKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SatisfiesKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.UsingKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; + type PunctuationSyntaxKind = + | SyntaxKind.OpenBraceToken + | SyntaxKind.CloseBraceToken + | SyntaxKind.OpenParenToken + | SyntaxKind.CloseParenToken + | SyntaxKind.OpenBracketToken + | SyntaxKind.CloseBracketToken + | SyntaxKind.DotToken + | SyntaxKind.DotDotDotToken + | SyntaxKind.SemicolonToken + | SyntaxKind.CommaToken + | SyntaxKind.QuestionDotToken + | SyntaxKind.LessThanToken + | SyntaxKind.LessThanSlashToken + | SyntaxKind.GreaterThanToken + | SyntaxKind.LessThanEqualsToken + | SyntaxKind.GreaterThanEqualsToken + | SyntaxKind.EqualsEqualsToken + | SyntaxKind.ExclamationEqualsToken + | SyntaxKind.EqualsEqualsEqualsToken + | SyntaxKind.ExclamationEqualsEqualsToken + | SyntaxKind.EqualsGreaterThanToken + | SyntaxKind.PlusToken + | SyntaxKind.MinusToken + | SyntaxKind.AsteriskToken + | SyntaxKind.AsteriskAsteriskToken + | SyntaxKind.SlashToken + | SyntaxKind.PercentToken + | SyntaxKind.PlusPlusToken + | SyntaxKind.MinusMinusToken + | SyntaxKind.LessThanLessThanToken + | SyntaxKind.GreaterThanGreaterThanToken + | SyntaxKind.GreaterThanGreaterThanGreaterThanToken + | SyntaxKind.AmpersandToken + | SyntaxKind.BarToken + | SyntaxKind.CaretToken + | SyntaxKind.ExclamationToken + | SyntaxKind.TildeToken + | SyntaxKind.AmpersandAmpersandToken + | SyntaxKind.AmpersandAmpersandEqualsToken + | SyntaxKind.BarBarToken + | SyntaxKind.BarBarEqualsToken + | SyntaxKind.QuestionQuestionToken + | SyntaxKind.QuestionQuestionEqualsToken + | SyntaxKind.QuestionToken + | SyntaxKind.ColonToken + | SyntaxKind.AtToken + | SyntaxKind.BacktickToken + | SyntaxKind.HashToken + | SyntaxKind.EqualsToken + | SyntaxKind.PlusEqualsToken + | SyntaxKind.MinusEqualsToken + | SyntaxKind.AsteriskEqualsToken + | SyntaxKind.AsteriskAsteriskEqualsToken + | SyntaxKind.SlashEqualsToken + | SyntaxKind.PercentEqualsToken + | SyntaxKind.LessThanLessThanEqualsToken + | SyntaxKind.GreaterThanGreaterThanEqualsToken + | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken + | SyntaxKind.AmpersandEqualsToken + | SyntaxKind.BarEqualsToken + | SyntaxKind.CaretEqualsToken; + type KeywordSyntaxKind = + | SyntaxKind.AbstractKeyword + | SyntaxKind.AccessorKeyword + | SyntaxKind.AnyKeyword + | SyntaxKind.AsKeyword + | SyntaxKind.AssertsKeyword + | SyntaxKind.AssertKeyword + | SyntaxKind.AsyncKeyword + | SyntaxKind.AwaitKeyword + | SyntaxKind.BigIntKeyword + | SyntaxKind.BooleanKeyword + | SyntaxKind.BreakKeyword + | SyntaxKind.CaseKeyword + | SyntaxKind.CatchKeyword + | SyntaxKind.ClassKeyword + | SyntaxKind.ConstKeyword + | SyntaxKind.ConstructorKeyword + | SyntaxKind.ContinueKeyword + | SyntaxKind.DebuggerKeyword + | SyntaxKind.DeclareKeyword + | SyntaxKind.DefaultKeyword + | SyntaxKind.DeleteKeyword + | SyntaxKind.DoKeyword + | SyntaxKind.ElseKeyword + | SyntaxKind.EnumKeyword + | SyntaxKind.ExportKeyword + | SyntaxKind.ExtendsKeyword + | SyntaxKind.FalseKeyword + | SyntaxKind.FinallyKeyword + | SyntaxKind.ForKeyword + | SyntaxKind.FromKeyword + | SyntaxKind.FunctionKeyword + | SyntaxKind.GetKeyword + | SyntaxKind.GlobalKeyword + | SyntaxKind.IfKeyword + | SyntaxKind.ImplementsKeyword + | SyntaxKind.ImportKeyword + | SyntaxKind.InferKeyword + | SyntaxKind.InKeyword + | SyntaxKind.InstanceOfKeyword + | SyntaxKind.InterfaceKeyword + | SyntaxKind.IntrinsicKeyword + | SyntaxKind.IsKeyword + | SyntaxKind.KeyOfKeyword + | SyntaxKind.LetKeyword + | SyntaxKind.ModuleKeyword + | SyntaxKind.NamespaceKeyword + | SyntaxKind.NeverKeyword + | SyntaxKind.NewKeyword + | SyntaxKind.NullKeyword + | SyntaxKind.NumberKeyword + | SyntaxKind.ObjectKeyword + | SyntaxKind.OfKeyword + | SyntaxKind.PackageKeyword + | SyntaxKind.PrivateKeyword + | SyntaxKind.ProtectedKeyword + | SyntaxKind.PublicKeyword + | SyntaxKind.ReadonlyKeyword + | SyntaxKind.OutKeyword + | SyntaxKind.OverrideKeyword + | SyntaxKind.RequireKeyword + | SyntaxKind.ReturnKeyword + | SyntaxKind.SatisfiesKeyword + | SyntaxKind.SetKeyword + | SyntaxKind.StaticKeyword + | SyntaxKind.StringKeyword + | SyntaxKind.SuperKeyword + | SyntaxKind.SwitchKeyword + | SyntaxKind.SymbolKeyword + | SyntaxKind.ThisKeyword + | SyntaxKind.ThrowKeyword + | SyntaxKind.TrueKeyword + | SyntaxKind.TryKeyword + | SyntaxKind.TypeKeyword + | SyntaxKind.TypeOfKeyword + | SyntaxKind.UndefinedKeyword + | SyntaxKind.UniqueKeyword + | SyntaxKind.UnknownKeyword + | SyntaxKind.UsingKeyword + | SyntaxKind.VarKeyword + | SyntaxKind.VoidKeyword + | SyntaxKind.WhileKeyword + | SyntaxKind.WithKeyword + | SyntaxKind.YieldKeyword; type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AccessorKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.InKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.OutKeyword | SyntaxKind.OverrideKeyword | SyntaxKind.StaticKeyword; type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; @@ -484,36 +4748,36 @@ declare namespace ts { ReachabilityCheckFlags = 1536, ReachabilityAndEmitFlags = 5632, ContextFlags = 101441536, - TypeExcludesFlags = 81920 + TypeExcludesFlags = 81920, } enum ModifierFlags { None = 0, - Export = 1, - Ambient = 2, - Public = 4, - Private = 8, - Protected = 16, - Static = 32, - Readonly = 64, - Accessor = 128, - Abstract = 256, - Async = 512, - Default = 1024, - Const = 2048, - HasComputedJSDocModifiers = 4096, - Deprecated = 8192, - Override = 16384, - In = 32768, - Out = 65536, - Decorator = 131072, + Public = 1, + Private = 2, + Protected = 4, + Readonly = 8, + Override = 16, + Export = 32, + Abstract = 64, + Ambient = 128, + Static = 256, + Accessor = 512, + Async = 1024, + Default = 2048, + Const = 4096, + In = 8192, + Out = 16384, + Decorator = 32768, + Deprecated = 65536, + HasComputedJSDocModifiers = 268435456, HasComputedFlags = 536870912, - AccessibilityModifier = 28, - ParameterPropertyModifier = 16476, - NonPublicAccessibilityModifier = 24, - TypeScriptModifier = 117086, - ExportDefault = 1025, - All = 258047, - Modifier = 126975 + AccessibilityModifier = 7, + ParameterPropertyModifier = 31, + NonPublicAccessibilityModifier = 6, + TypeScriptModifier = 28895, + ExportDefault = 2080, + All = 131071, + Modifier = 98303, } enum JsxFlags { None = 0, @@ -521,7 +4785,7 @@ declare namespace ts { IntrinsicNamedElement = 1, /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */ IntrinsicIndexedElement = 2, - IntrinsicElement = 3 + IntrinsicElement = 3, } interface Node extends ReadonlyTextRange { readonly kind: SyntaxKind; @@ -554,7 +4818,71 @@ declare namespace ts { interface FlowContainer extends Node { _flowContainerBrand: any; } - type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | SemicolonClassElement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement; + type HasJSDoc = + | AccessorDeclaration + | ArrowFunction + | BinaryExpression + | Block + | BreakStatement + | CallSignatureDeclaration + | CaseClause + | ClassLikeDeclaration + | ClassStaticBlockDeclaration + | ConstructorDeclaration + | ConstructorTypeNode + | ConstructSignatureDeclaration + | ContinueStatement + | DebuggerStatement + | DoStatement + | ElementAccessExpression + | EmptyStatement + | EndOfFileToken + | EnumDeclaration + | EnumMember + | ExportAssignment + | ExportDeclaration + | ExportSpecifier + | ExpressionStatement + | ForInStatement + | ForOfStatement + | ForStatement + | FunctionDeclaration + | FunctionExpression + | FunctionTypeNode + | Identifier + | IfStatement + | ImportDeclaration + | ImportEqualsDeclaration + | IndexSignatureDeclaration + | InterfaceDeclaration + | JSDocFunctionType + | JSDocSignature + | LabeledStatement + | MethodDeclaration + | MethodSignature + | ModuleDeclaration + | NamedTupleMember + | NamespaceExportDeclaration + | ObjectLiteralExpression + | ParameterDeclaration + | ParenthesizedExpression + | PropertyAccessExpression + | PropertyAssignment + | PropertyDeclaration + | PropertySignature + | ReturnStatement + | SemicolonClassElement + | ShorthandPropertyAssignment + | SpreadAssignment + | SwitchStatement + | ThrowStatement + | TryStatement + | TypeAliasDeclaration + | TypeParameterDeclaration + | VariableDeclaration + | VariableStatement + | WhileStatement + | WithStatement; type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType; type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement; type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute; @@ -618,7 +4946,7 @@ declare namespace ts { ReservedInNestedScopes = 8, Optimistic = 16, FileLevel = 32, - AllowNameSubstitution = 64 + AllowNameSubstitution = 64, } interface Identifier extends PrimaryExpression, Declaration, JSDocContainer, FlowContainer { readonly kind: SyntaxKind.Identifier; @@ -646,7 +4974,7 @@ declare namespace ts { readonly right: Identifier; } type EntityName = Identifier | QualifiedName; - type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier; + type PropertyName = Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier; type MemberName = Identifier | PrivateIdentifier; type DeclarationName = PropertyName | JsxAttributeName | StringLiteralLike | ElementAccessExpression | BindingPattern | EntityNameExpression; interface Declaration extends Node { @@ -869,17 +5197,19 @@ declare namespace ts { interface KeywordTypeNode extends KeywordToken, TypeNode { readonly kind: TKind; } + /** @deprecated */ interface ImportTypeAssertionContainer extends Node { readonly kind: SyntaxKind.ImportTypeAssertionContainer; readonly parent: ImportTypeNode; - readonly assertClause: AssertClause; + /** @deprecated */ readonly assertClause: AssertClause; readonly multiLine?: boolean; } interface ImportTypeNode extends NodeWithTypeArguments { readonly kind: SyntaxKind.ImportType; readonly isTypeOf: boolean; readonly argument: TypeNode; - readonly assertions?: ImportTypeAssertionContainer; + /** @deprecated */ readonly assertions?: ImportTypeAssertionContainer; + readonly attributes?: ImportAttributes; readonly qualifier?: EntityName; } interface ThisTypeNode extends TypeNode { @@ -1186,7 +5516,7 @@ declare namespace ts { Octal = 32, HexSpecifier = 64, BinarySpecifier = 128, - OctalSpecifier = 256 + OctalSpecifier = 256, } interface NumericLiteral extends LiteralExpression, Declaration { readonly kind: SyntaxKind.NumericLiteral; @@ -1314,7 +5644,10 @@ declare namespace ts { readonly typeArguments?: NodeArray; readonly template: TemplateLiteral; } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement; + interface InstanceofExpression extends BinaryExpression { + readonly operatorToken: Token; + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement | InstanceofExpression; interface AsExpression extends Expression { readonly kind: SyntaxKind.AsExpression; readonly expression: Expression; @@ -1670,7 +6003,8 @@ declare namespace ts { readonly importClause?: ImportClause; /** If this is not a StringLiteral it will be a grammar error. */ readonly moduleSpecifier: Expression; - readonly assertClause?: AssertClause; + /** @deprecated */ readonly assertClause?: AssertClause; + readonly attributes?: ImportAttributes; } type NamedImportBindings = NamespaceImport | NamedImports; type NamedExportBindings = NamespaceExport | NamedExports; @@ -1681,17 +6015,26 @@ declare namespace ts { readonly name?: Identifier; readonly namedBindings?: NamedImportBindings; } - type AssertionKey = Identifier | StringLiteral; - interface AssertEntry extends Node { - readonly kind: SyntaxKind.AssertEntry; - readonly parent: AssertClause; - readonly name: AssertionKey; + /** @deprecated */ + type AssertionKey = ImportAttributeName; + /** @deprecated */ + interface AssertEntry extends ImportAttribute { + } + /** @deprecated */ + interface AssertClause extends ImportAttributes { + } + type ImportAttributeName = Identifier | StringLiteral; + interface ImportAttribute extends Node { + readonly kind: SyntaxKind.ImportAttribute; + readonly parent: ImportAttributes; + readonly name: ImportAttributeName; readonly value: Expression; } - interface AssertClause extends Node { - readonly kind: SyntaxKind.AssertClause; + interface ImportAttributes extends Node { + readonly token: SyntaxKind.WithKeyword | SyntaxKind.AssertKeyword; + readonly kind: SyntaxKind.ImportAttributes; readonly parent: ImportDeclaration | ExportDeclaration; - readonly elements: NodeArray; + readonly elements: NodeArray; readonly multiLine?: boolean; } interface NamespaceImport extends NamedDeclaration { @@ -1717,7 +6060,8 @@ declare namespace ts { readonly exportClause?: NamedExportBindings; /** If this is not a StringLiteral it will be a grammar error. */ readonly moduleSpecifier?: Expression; - readonly assertClause?: AssertClause; + /** @deprecated */ readonly assertClause?: AssertClause; + readonly attributes?: ImportAttributes; } interface NamedImports extends Node { readonly kind: SyntaxKind.NamedImports; @@ -1746,41 +6090,50 @@ declare namespace ts { } type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier; type TypeOnlyCompatibleAliasDeclaration = ImportClause | ImportEqualsDeclaration | NamespaceImport | ImportOrExportSpecifier | ExportDeclaration | NamespaceExport; - type TypeOnlyImportDeclaration = ImportClause & { - readonly isTypeOnly: true; - readonly name: Identifier; - } | ImportEqualsDeclaration & { - readonly isTypeOnly: true; - } | NamespaceImport & { - readonly parent: ImportClause & { + type TypeOnlyImportDeclaration = + | ImportClause & { readonly isTypeOnly: true; - }; - } | ImportSpecifier & ({ - readonly isTypeOnly: true; - } | { - readonly parent: NamedImports & { + readonly name: Identifier; + } + | ImportEqualsDeclaration & { + readonly isTypeOnly: true; + } + | NamespaceImport & { readonly parent: ImportClause & { readonly isTypeOnly: true; }; - }; - }); - type TypeOnlyExportDeclaration = ExportSpecifier & ({ - readonly isTypeOnly: true; - } | { - readonly parent: NamedExports & { - readonly parent: ExportDeclaration & { + } + | ImportSpecifier + & ({ readonly isTypeOnly: true; - }; - }; - }) | ExportDeclaration & { - readonly isTypeOnly: true; - readonly moduleSpecifier: Expression; - } | NamespaceExport & { - readonly parent: ExportDeclaration & { + } | { + readonly parent: NamedImports & { + readonly parent: ImportClause & { + readonly isTypeOnly: true; + }; + }; + }); + type TypeOnlyExportDeclaration = + | ExportSpecifier + & ({ + readonly isTypeOnly: true; + } | { + readonly parent: NamedExports & { + readonly parent: ExportDeclaration & { + readonly isTypeOnly: true; + }; + }; + }) + | ExportDeclaration & { readonly isTypeOnly: true; readonly moduleSpecifier: Expression; + } + | NamespaceExport & { + readonly parent: ExportDeclaration & { + readonly isTypeOnly: true; + readonly moduleSpecifier: Expression; + }; }; - }; type TypeOnlyAliasDeclaration = TypeOnlyImportDeclaration | TypeOnlyExportDeclaration; /** * This is either an `export =` or an `export default` declaration. @@ -2028,7 +6381,7 @@ declare namespace ts { Referenced = 2048, Shared = 4096, Label = 12, - Condition = 96 + Condition = 96, } type FlowNode = FlowStart | FlowLabel | FlowAssignment | FlowCondition | FlowSwitchClause | FlowArrayMutation | FlowCall | FlowReduceLabel; interface FlowNodeBase { @@ -2338,7 +6691,7 @@ declare namespace ts { DiagnosticsPresent_OutputsSkipped = 1, DiagnosticsPresent_OutputsGenerated = 2, InvalidProject_OutputsSkipped = 3, - ProjectReferenceCycle_OutputsSkipped = 4 + ProjectReferenceCycle_OutputsSkipped = 4, } interface EmitResult { emitSkipped: boolean; @@ -2368,9 +6721,11 @@ declare namespace ts { /** Note that the resulting nodes cannot be checked. */ typeToTypeNode(type: Type, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): TypeNode | undefined; /** Note that the resulting nodes cannot be checked. */ - signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): SignatureDeclaration & { - typeArguments?: NodeArray; - } | undefined; + signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): + | SignatureDeclaration & { + typeArguments?: NodeArray; + } + | undefined; /** Note that the resulting nodes cannot be checked. */ indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, enclosingDeclaration: Node | undefined, flags: NodeBuilderFlags | undefined): IndexSignatureDeclaration | undefined; /** Note that the resulting nodes cannot be checked. */ @@ -2425,6 +6780,7 @@ declare namespace ts { isUndefinedSymbol(symbol: Symbol): boolean; isArgumentsSymbol(symbol: Symbol): boolean; isUnknownSymbol(symbol: Symbol): boolean; + getMergedSymbol(symbol: Symbol): Symbol; getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName | ImportTypeNode, propertyName: string): boolean; /** Follow all aliases to get the original symbol. */ @@ -2527,7 +6883,7 @@ declare namespace ts { IgnoreErrors = 70221824, InObjectTypeLiteral = 4194304, InTypeAlias = 8388608, - InInitialEntityName = 16777216 + InInitialEntityName = 16777216, } enum TypeFormatFlags { None = 0, @@ -2552,20 +6908,20 @@ declare namespace ts { InElementType = 2097152, InFirstTypeArgument = 4194304, InTypeAlias = 8388608, - NodeBuilderFlagsMask = 848330091 + NodeBuilderFlagsMask = 848330091, } enum SymbolFormatFlags { None = 0, WriteTypeParametersOrArguments = 1, UseOnlyExternalAliasing = 2, AllowAnyNodeKind = 4, - UseAliasDefinedOutsideCurrentScope = 8 + UseAliasDefinedOutsideCurrentScope = 8, } enum TypePredicateKind { This = 0, Identifier = 1, AssertsThis = 2, - AssertsIdentifier = 3 + AssertsIdentifier = 3, } interface TypePredicateBase { kind: TypePredicateKind; @@ -2656,7 +7012,7 @@ declare namespace ts { ExportHasLocal = 944, BlockScoped = 418, PropertyOrAccessor = 98308, - ClassMember = 106500 + ClassMember = 106500, } interface Symbol { flags: SymbolFlags; @@ -2693,7 +7049,7 @@ declare namespace ts { Resolving = "__resolving__", ExportEquals = "export=", Default = "default", - This = "this" + This = "this", } /** * This represents a string whose leading underscore have been escaped by adding extra leading underscores. @@ -2703,11 +7059,14 @@ declare namespace ts { * with a normal string (which is good, it cannot be misused on assignment or on usage), * while still being comparable with a normal string via === (also good) and castable from a string. */ - type __String = (string & { - __escapedIdentifier: void; - }) | (void & { - __escapedIdentifier: void; - }) | InternalSymbolName; + type __String = + | (string & { + __escapedIdentifier: void; + }) + | (void & { + __escapedIdentifier: void; + }) + | InternalSymbolName; /** @deprecated Use ReadonlyMap<__String, T> instead. */ type ReadonlyUnderscoreEscapedMap = ReadonlyMap<__String, T>; /** @deprecated Use Map<__String, T> instead. */ @@ -2763,7 +7122,7 @@ declare namespace ts { InstantiablePrimitive = 406847488, Instantiable = 465829888, StructuredOrInstantiable = 469499904, - Narrowable = 536624127 + Narrowable = 536624127, } type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; interface Type { @@ -2840,7 +7199,7 @@ declare namespace ts { ClassOrInterface = 3, ContainsSpread = 2097152, ObjectRestType = 4194304, - InstantiationExpressionType = 8388608 + InstantiationExpressionType = 8388608, } interface ObjectType extends Type { objectFlags: ObjectFlags; @@ -2888,7 +7247,7 @@ declare namespace ts { Fixed = 3, Variable = 12, NonRequired = 14, - NonRest = 11 + NonRest = 11, } interface TupleType extends GenericType { elementFlags: readonly ElementFlags[]; @@ -2965,12 +7324,13 @@ declare namespace ts { } enum SignatureKind { Call = 0, - Construct = 1 + Construct = 1, } interface Signature { declaration?: SignatureDeclaration | JSDocSignature; typeParameters?: readonly TypeParameter[]; parameters: readonly Symbol[]; + thisParameter?: Symbol; } interface Signature { getDeclaration(): SignatureDeclaration; @@ -2983,7 +7343,7 @@ declare namespace ts { } enum IndexKind { String = 0, - Number = 1 + Number = 1, } interface IndexInfo { keyType: Type; @@ -3006,7 +7366,7 @@ declare namespace ts { AlwaysStrict = 1024, MaxValue = 2048, PriorityImpliesCombination = 416, - Circularity = -1 + Circularity = -1, } interface FileExtensionInfo { extension: string; @@ -3057,7 +7417,7 @@ declare namespace ts { Warning = 0, Error = 1, Suggestion = 2, - Message = 3 + Message = 3, } enum ModuleResolutionKind { Classic = 1, @@ -3070,7 +7430,7 @@ declare namespace ts { Node10 = 2, Node16 = 3, NodeNext = 99, - Bundler = 100 + Bundler = 100, } enum ModuleDetectionKind { /** @@ -3084,7 +7444,7 @@ declare namespace ts { /** * Consider all non-declaration files modules, regardless of present syntax */ - Force = 3 + Force = 3, } interface PluginImport { name: string; @@ -3105,19 +7465,19 @@ declare namespace ts { DynamicPriorityPolling = 2, FixedChunkSizePolling = 3, UseFsEvents = 4, - UseFsEventsOnParentDirectory = 5 + UseFsEventsOnParentDirectory = 5, } enum WatchDirectoryKind { UseFsEvents = 0, FixedPollingInterval = 1, DynamicPriorityPolling = 2, - FixedChunkSizePolling = 3 + FixedChunkSizePolling = 3, } enum PollingWatchKind { FixedInterval = 0, PriorityInterval = 1, DynamicPriority = 2, - FixedChunkSize = 3 + FixedChunkSize = 3, } type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike | PluginImport[] | ProjectReference[] | null | undefined; interface CompilerOptions { @@ -3253,7 +7613,7 @@ declare namespace ts { ES2022 = 7, ESNext = 99, Node16 = 100, - NodeNext = 199 + NodeNext = 199, } enum JsxEmit { None = 0, @@ -3261,16 +7621,16 @@ declare namespace ts { React = 2, ReactNative = 3, ReactJSX = 4, - ReactJSXDev = 5 + ReactJSXDev = 5, } enum ImportsNotUsedAsValues { Remove = 0, Preserve = 1, - Error = 2 + Error = 2, } enum NewLineKind { CarriageReturnLineFeed = 0, - LineFeed = 1 + LineFeed = 1, } interface LineAndCharacter { /** 0-based. */ @@ -3289,7 +7649,7 @@ declare namespace ts { * Used on extensions that doesn't define the ScriptKind but the content defines it. * Deferred extensions are going to be included in all project contexts. */ - Deferred = 7 + Deferred = 7, } enum ScriptTarget { ES3 = 0, @@ -3304,11 +7664,11 @@ declare namespace ts { ES2022 = 9, ESNext = 99, JSON = 100, - Latest = 99 + Latest = 99, } enum LanguageVariant { Standard = 0, - JSX = 1 + JSX = 1, } /** Either a parsed command line or a parsed tsconfig.json */ interface ParsedCommandLine { @@ -3324,7 +7684,7 @@ declare namespace ts { } enum WatchDirectoryFlags { None = 0, - Recursive = 1 + Recursive = 1, } interface CreateProgramOptions { rootNames: readonly string[]; @@ -3418,7 +7778,7 @@ declare namespace ts { Dmts = ".d.mts", Cjs = ".cjs", Cts = ".cts", - Dcts = ".d.cts" + Dcts = ".d.cts", } interface ResolvedModuleWithFailedLookupLocations { readonly resolvedModule: ResolvedModuleFull | undefined; @@ -3464,6 +7824,7 @@ declare namespace ts { hasInvalidatedResolutions?(filePath: Path): boolean; createHash?(data: string): string; getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; + jsDocParsingMode?: JSDocParsingMode; } interface SourceMapRange extends TextRange { source?: SourceMapSource; @@ -3505,7 +7866,7 @@ declare namespace ts { CustomPrologue = 2097152, NoHoisting = 4194304, Iterator = 8388608, - NoAsciiEscaping = 16777216 + NoAsciiEscaping = 16777216, } interface EmitHelperBase { readonly name: string; @@ -3530,7 +7891,7 @@ declare namespace ts { MappedTypeParameter = 3, Unspecified = 4, EmbeddedStatement = 5, - JsxAttributeValue = 6 + JsxAttributeValue = 6, } enum OuterExpressionKinds { Parentheses = 1, @@ -3539,7 +7900,7 @@ declare namespace ts { PartiallyEmittedExpressions = 8, Assertions = 6, All = 15, - ExcludeJSDocTypeAssertion = 16 + ExcludeJSDocTypeAssertion = 16, } type ImmediatelyInvokedFunctionExpression = CallExpression & { readonly expression: FunctionExpression; @@ -3664,8 +8025,8 @@ declare namespace ts { updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode; createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode; updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode; - createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; + createImportTypeNode(argument: TypeNode, attributes?: ImportAttributes, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; + updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, attributes: ImportAttributes | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; createParenthesizedType(type: TypeNode): ParenthesizedTypeNode; updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode; createThisTypeNode(): ThisTypeNode; @@ -3822,16 +8183,20 @@ declare namespace ts { updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration; createImportEqualsDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; updateImportEqualsDeclaration(node: ImportEqualsDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; - createImportDeclaration(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; - updateImportDeclaration(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; + createImportDeclaration(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes?: ImportAttributes): ImportDeclaration; + updateImportDeclaration(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, attributes: ImportAttributes | undefined): ImportDeclaration; createImportClause(isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; updateImportClause(node: ImportClause, isTypeOnly: boolean, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause; - createAssertClause(elements: NodeArray, multiLine?: boolean): AssertClause; - updateAssertClause(node: AssertClause, elements: NodeArray, multiLine?: boolean): AssertClause; - createAssertEntry(name: AssertionKey, value: Expression): AssertEntry; - updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry; - createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; - updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; + /** @deprecated */ createAssertClause(elements: NodeArray, multiLine?: boolean): AssertClause; + /** @deprecated */ updateAssertClause(node: AssertClause, elements: NodeArray, multiLine?: boolean): AssertClause; + /** @deprecated */ createAssertEntry(name: AssertionKey, value: Expression): AssertEntry; + /** @deprecated */ updateAssertEntry(node: AssertEntry, name: AssertionKey, value: Expression): AssertEntry; + /** @deprecated */ createImportTypeAssertionContainer(clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; + /** @deprecated */ updateImportTypeAssertionContainer(node: ImportTypeAssertionContainer, clause: AssertClause, multiLine?: boolean): ImportTypeAssertionContainer; + createImportAttributes(elements: NodeArray, multiLine?: boolean): ImportAttributes; + updateImportAttributes(node: ImportAttributes, elements: NodeArray, multiLine?: boolean): ImportAttributes; + createImportAttribute(name: ImportAttributeName, value: Expression): ImportAttribute; + updateImportAttribute(node: ImportAttribute, name: ImportAttributeName, value: Expression): ImportAttribute; createNamespaceImport(name: Identifier): NamespaceImport; updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport; createNamespaceExport(name: Identifier): NamespaceExport; @@ -3842,8 +8207,8 @@ declare namespace ts { updateImportSpecifier(node: ImportSpecifier, isTypeOnly: boolean, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier; createExportAssignment(modifiers: readonly ModifierLike[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; updateExportAssignment(node: ExportAssignment, modifiers: readonly ModifierLike[] | undefined, expression: Expression): ExportAssignment; - createExportDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; - updateExportDeclaration(node: ExportDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; + createExportDeclaration(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, attributes?: ImportAttributes): ExportDeclaration; + updateExportDeclaration(node: ExportDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, attributes: ImportAttributes | undefined): ExportDeclaration; createNamedExports(elements: readonly ExportSpecifier[]): NamedExports; updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports; createExportSpecifier(isTypeOnly: boolean, propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier; @@ -4024,6 +8389,18 @@ declare namespace ts { createExportDefault(expression: Expression): ExportAssignment; createExternalModuleExport(exportName: Identifier): ExportDeclaration; restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression; + /** + * Updates a node that may contain modifiers, replacing only the modifiers of the node. + */ + replaceModifiers(node: T, modifiers: readonly Modifier[] | ModifierFlags | undefined): T; + /** + * Updates a node that may contain decorators or modifiers, replacing only the decorators and modifiers of the node. + */ + replaceDecoratorsAndModifiers(node: T, modifiers: readonly ModifierLike[] | undefined): T; + /** + * Updates a node that contains a property name, replacing only the name of the node. + */ + replacePropertyName(node: T, name: T["name"]): T; } interface CoreTransformationContext { readonly factory: NodeFactory; @@ -4292,7 +8669,8 @@ declare namespace ts { ObjectBindingPatternElements = 525136, ArrayBindingPatternElements = 524880, ObjectLiteralExpressionProperties = 526226, - ImportClauseEntries = 526226, + ImportAttributes = 526226, + /** @deprecated */ ImportClauseEntries = 526226, ArrayLiteralExpressionElements = 8914, CommaListElements = 528, CallExpressionArguments = 2576, @@ -4319,7 +8697,34 @@ declare namespace ts { TypeParameters = 53776, Parameters = 2576, IndexSignatureParameters = 8848, - JSDocComment = 33 + JSDocComment = 33, + } + enum JSDocParsingMode { + /** + * Always parse JSDoc comments and include them in the AST. + * + * This is the default if no mode is provided. + */ + ParseAll = 0, + /** + * Never parse JSDoc comments, mo matter the file type. + */ + ParseNone = 1, + /** + * Parse only JSDoc comments which are needed to provide correct type errors. + * + * This will always parse JSDoc in non-TS files, but only parse JSDoc comments + * containing `@see` and `@link` in TS files. + */ + ParseForTypeErrors = 2, + /** + * Parse only JSDoc comments which are needed to provide correct type info. + * + * This will always parse JSDoc in non-TS files, but never in TS files. + * + * Note: Do not use this mode if you require accurate type errors; use {@link ParseForTypeErrors} instead. + */ + ParseForTypeInfo = 3, } interface UserPreferences { readonly disableSuggestions?: boolean; @@ -4352,12 +8757,14 @@ declare namespace ts { readonly interactiveInlayHints?: boolean; readonly allowRenameOfImportPath?: boolean; readonly autoImportFileExcludePatterns?: string[]; + readonly preferTypeOnlyAutoImports?: boolean; readonly organizeImportsIgnoreCase?: "auto" | boolean; readonly organizeImportsCollation?: "ordinal" | "unicode"; readonly organizeImportsLocale?: string; readonly organizeImportsNumericCollation?: boolean; readonly organizeImportsAccentCollation?: boolean; readonly organizeImportsCaseFirst?: "upper" | "lower" | false; + readonly excludeLibrarySymbolsInNavTo?: boolean; } /** Represents a bigint literal value without requiring bigint support */ interface PseudoBigInt { @@ -4367,7 +8774,7 @@ declare namespace ts { enum FileWatcherEventKind { Created = 0, Changed = 1, - Deleted = 2 + Deleted = 2, } type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind, modifiedTime?: Date) => void; type DirectoryWatcherCallback = (fileName: string) => void; @@ -4481,6 +8888,8 @@ declare namespace ts { setOnError(onError: ErrorCallback | undefined): void; setScriptTarget(scriptTarget: ScriptTarget): void; setLanguageVariant(variant: LanguageVariant): void; + setScriptKind(scriptKind: ScriptKind): void; + setJSDocParsingMode(kind: JSDocParsingMode): void; /** @deprecated use {@link resetTokenState} */ setTextPos(textPos: number): void; resetTokenState(pos: number): void; @@ -4720,8 +9129,8 @@ declare namespace ts { function isTypeOnlyImportDeclaration(node: Node): node is TypeOnlyImportDeclaration; function isTypeOnlyExportDeclaration(node: Node): node is TypeOnlyExportDeclaration; function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyAliasDeclaration; - function isAssertionKey(node: Node): node is AssertionKey; function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken; + function isImportAttributeName(node: Node): node is ImportAttributeName; function isModifier(node: Node): node is Modifier; function isEntityName(node: Node): node is EntityName; function isPropertyName(node: Node): node is PropertyName; @@ -4779,7 +9188,7 @@ declare namespace ts { function isJSDocLinkLike(node: Node): node is JSDocLink | JSDocLinkCode | JSDocLinkPlain; function hasRestParameter(s: SignatureDeclaration | JSDocSignature): boolean; function isRestParameter(node: ParameterDeclaration | JSDocParameterTag): boolean; - let unchangedTextChangeRange: TextChangeRange; + const unchangedTextChangeRange: TextChangeRange; type ParameterPropertyDeclaration = ParameterDeclaration & { parent: ConstructorDeclaration; name: Identifier; @@ -5023,8 +9432,12 @@ declare namespace ts { function isImportDeclaration(node: Node): node is ImportDeclaration; function isImportClause(node: Node): node is ImportClause; function isImportTypeAssertionContainer(node: Node): node is ImportTypeAssertionContainer; + /** @deprecated */ function isAssertClause(node: Node): node is AssertClause; + /** @deprecated */ function isAssertEntry(node: Node): node is AssertEntry; + function isImportAttributes(node: Node): node is ImportAttributes; + function isImportAttribute(node: Node): node is ImportAttribute; function isNamespaceImport(node: Node): node is NamespaceImport; function isNamespaceExport(node: Node): node is NamespaceExport; function isNamedImports(node: Node): node is NamedImports; @@ -5150,6 +9563,7 @@ declare namespace ts { * check specified by `isFileProbablyExternalModule` will be used to set the field. */ setExternalModuleIndicator?: (file: SourceFile) => void; + jsDocParsingMode?: JSDocParsingMode; } function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine; /** @@ -5429,6 +9843,19 @@ declare namespace ts { function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer; + enum ProgramUpdateLevel { + /** Program is updated with same root file names and options */ + Update = 0, + /** Loads program after updating root file names from the disk */ + RootNamesAndUpdate = 1, + /** + * Loads program completely, including: + * - re-reading contents of config file from disk + * - calculating root file names for the program + * - Updating the program + */ + Full = 2, + } function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined; function resolveTripleslashReference(moduleName: string, containingFile: string): string; function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; @@ -5740,6 +10167,7 @@ declare namespace ts { * Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it */ getModuleResolutionCache?(): ModuleResolutionCache | undefined; + jsDocParsingMode?: JSDocParsingMode; } interface WatchCompilerHost extends ProgramHost, WatchHost { /** Instead of using output d.ts file from project reference, use its source file */ @@ -5853,7 +10281,7 @@ declare namespace ts { enum InvalidatedProjectKind { Build = 0, /** @deprecated */ UpdateBundle = 1, - UpdateOutputFileStamps = 2 + UpdateOutputFileStamps = 2, } interface InvalidatedProjectBase { readonly kind: InvalidatedProjectKind; @@ -5898,90 +10326,6 @@ declare namespace ts { readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[] | undefined, depth?: number): string[]; } } - namespace server { - type ActionSet = "action::set"; - type ActionInvalidate = "action::invalidate"; - type ActionPackageInstalled = "action::packageInstalled"; - type EventTypesRegistry = "event::typesRegistry"; - type EventBeginInstallTypes = "event::beginInstallTypes"; - type EventEndInstallTypes = "event::endInstallTypes"; - type EventInitializationFailed = "event::initializationFailed"; - type ActionWatchTypingLocations = "action::watchTypingLocations"; - interface TypingInstallerResponse { - readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed | ActionWatchTypingLocations; - } - interface TypingInstallerRequestWithProjectName { - readonly projectName: string; - } - interface DiscoverTypings extends TypingInstallerRequestWithProjectName { - readonly fileNames: string[]; - readonly projectRootPath: Path; - readonly compilerOptions: CompilerOptions; - readonly typeAcquisition: TypeAcquisition; - readonly unresolvedImports: SortedReadonlyArray; - readonly cachePath?: string; - readonly kind: "discover"; - } - interface CloseProject extends TypingInstallerRequestWithProjectName { - readonly kind: "closeProject"; - } - interface TypesRegistryRequest { - readonly kind: "typesRegistry"; - } - interface InstallPackageRequest extends TypingInstallerRequestWithProjectName { - readonly kind: "installPackage"; - readonly fileName: Path; - readonly packageName: string; - readonly projectRootPath: Path; - } - interface PackageInstalledResponse extends ProjectResponse { - readonly kind: ActionPackageInstalled; - readonly success: boolean; - readonly message: string; - } - interface InitializationFailedResponse extends TypingInstallerResponse { - readonly kind: EventInitializationFailed; - readonly message: string; - readonly stack?: string; - } - interface ProjectResponse extends TypingInstallerResponse { - readonly projectName: string; - } - interface InvalidateCachedTypings extends ProjectResponse { - readonly kind: ActionInvalidate; - } - interface InstallTypes extends ProjectResponse { - readonly kind: EventBeginInstallTypes | EventEndInstallTypes; - readonly eventId: number; - readonly typingsInstallerVersion: string; - readonly packagesToInstall: readonly string[]; - } - interface BeginInstallTypes extends InstallTypes { - readonly kind: EventBeginInstallTypes; - } - interface EndInstallTypes extends InstallTypes { - readonly kind: EventEndInstallTypes; - readonly installSuccess: boolean; - } - interface InstallTypingHost extends JsTyping.TypingResolutionHost { - useCaseSensitiveFileNames: boolean; - writeFile(path: string, content: string): void; - createDirectory(path: string): void; - getCurrentDirectory?(): string; - } - interface SetTypings extends ProjectResponse { - readonly typeAcquisition: TypeAcquisition; - readonly compilerOptions: CompilerOptions; - readonly typings: string[]; - readonly unresolvedImports: SortedReadonlyArray; - readonly kind: ActionSet; - } - interface WatchTypingLocations extends ProjectResponse { - /** if files is undefined, retain same set of watchers */ - readonly files: readonly string[] | undefined; - readonly kind: ActionWatchTypingLocations; - } - } function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings; /** * Represents an immutable snapshot of a script at a specified time.Once acquired, the @@ -6029,7 +10373,7 @@ declare namespace ts { enum LanguageServiceMode { Semantic = 0, PartialSemantic = 1, - Syntactic = 2 + Syntactic = 2, } interface IncompleteCompletionsCache { get(): CompletionInfo | undefined; @@ -6074,13 +10418,14 @@ declare namespace ts { installPackage?(options: InstallPackageOptions): Promise; writeFile?(fileName: string, content: string): void; getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined; + jsDocParsingMode?: JSDocParsingMode | undefined; } type WithMetadata = T & { metadata?: unknown; }; enum SemanticClassificationFormat { Original = "original", - TwentyTwenty = "2020" + TwentyTwenty = "2020", } interface LanguageService { /** This is used as a part of restarting the language service. */ @@ -6198,7 +10543,7 @@ declare namespace ts { findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined; getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined; getFileReferences(fileName: string): ReferenceEntry[]; - getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[]; + getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean, excludeLibFiles?: boolean): NavigateToItem[]; getNavigationBarItems(fileName: string): NavigationBarItem[]; getNavigationTree(fileName: string): NavigationTree; prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined; @@ -6270,7 +10615,7 @@ declare namespace ts { enum OrganizeImportsMode { All = "All", SortAndCombine = "SortAndCombine", - RemoveUnused = "RemoveUnused" + RemoveUnused = "RemoveUnused", } interface OrganizeImportsArgs extends CombinedCodeFixScope { /** @deprecated Use `mode` instead */ @@ -6284,7 +10629,7 @@ declare namespace ts { /** Completion was triggered by a trigger character. */ TriggerCharacter = 2, /** Completion was re-triggered as the current completion list is incomplete. */ - TriggerForIncompleteCompletions = 3 + TriggerForIncompleteCompletions = 3, } interface GetCompletionsAtPositionOptions extends UserPreferences { /** @@ -6413,7 +10758,7 @@ declare namespace ts { enum InlayHintKind { Type = "Type", Parameter = "Parameter", - Enum = "Enum" + Enum = "Enum", } interface InlayHint { /** This property will be the empty string when displayParts is set. */ @@ -6577,7 +10922,7 @@ declare namespace ts { none = "none", definition = "definition", reference = "reference", - writtenReference = "writtenReference" + writtenReference = "writtenReference", } interface HighlightSpan { fileName?: string; @@ -6600,12 +10945,12 @@ declare namespace ts { enum IndentStyle { None = 0, Block = 1, - Smart = 2 + Smart = 2, } enum SemicolonPreference { Ignore = "ignore", Insert = "insert", - Remove = "remove" + Remove = "remove", } /** @deprecated - consider using EditorSettings instead */ interface EditorOptions { @@ -6712,7 +11057,7 @@ declare namespace ts { regularExpressionLiteral = 21, link = 22, linkName = 23, - linkText = 24 + linkText = 24, } interface SymbolDisplayPart { text: string; @@ -6807,7 +11152,7 @@ declare namespace ts { IsContinuation = 4, ResolvedModuleSpecifiers = 8, ResolvedModuleSpecifiersBeyondLimit = 16, - MayIncludeMethodSnippets = 32 + MayIncludeMethodSnippets = 32, } interface CompletionInfo { /** For performance telemetry. */ @@ -6837,7 +11182,7 @@ declare namespace ts { * in the case of InternalSymbolName.ExportEquals and InternalSymbolName.Default. */ exportName: string; - exportMapKey?: string; + exportMapKey?: ExportMapInfoKey; moduleSpecifier?: string; /** The file name declaring the export's module symbol, if it was an external module */ fileName?: string; @@ -6847,7 +11192,7 @@ declare namespace ts { isPackageJsonImport?: true; } interface CompletionEntryDataUnresolved extends CompletionEntryDataAutoImport { - exportMapKey: string; + exportMapKey: ExportMapInfoKey; } interface CompletionEntryDataResolved extends CompletionEntryDataAutoImport { moduleSpecifier: string; @@ -6932,12 +11277,12 @@ declare namespace ts { /** Declarations and expressions */ Code = "code", /** Contiguous blocks of import declarations */ - Imports = "imports" + Imports = "imports", } enum OutputFileType { JavaScript = 0, SourceMap = 1, - Declaration = 2 + Declaration = 2, } enum EndOfLineState { None = 0, @@ -6946,7 +11291,7 @@ declare namespace ts { InDoubleQuoteStringLiteral = 3, InTemplateHeadOrNoSubstitutionTemplate = 4, InTemplateMiddleOrTail = 5, - InTemplateSubstitutionPosition = 6 + InTemplateSubstitutionPosition = 6, } enum TokenClass { Punctuation = 0, @@ -6958,7 +11303,7 @@ declare namespace ts { NumberLiteral = 6, BigIntLiteral = 7, StringLiteral = 8, - RegExpLiteral = 9 + RegExpLiteral = 9, } interface ClassificationResult { finalLexState: EndOfLineState; @@ -7075,7 +11420,7 @@ declare namespace ts { /** Jsdoc @link: in `{@link C link text}`, the entity name "C" */ linkName = "link name", /** Jsdoc @link: in `{@link C link text}`, the link text "link text" */ - linkText = "link text" + linkText = "link text", } enum ScriptElementKindModifier { none = "", @@ -7099,7 +11444,7 @@ declare namespace ts { mjsModifier = ".mjs", dctsModifier = ".d.cts", ctsModifier = ".cts", - cjsModifier = ".cjs" + cjsModifier = ".cjs", } enum ClassificationTypeNames { comment = "comment", @@ -7125,7 +11470,7 @@ declare namespace ts { jsxSelfClosingTagName = "jsx self closing tag name", jsxAttribute = "jsx attribute", jsxText = "jsx text", - jsxAttributeStringLiteralValue = "jsx attribute string literal value" + jsxAttributeStringLiteralValue = "jsx attribute string literal value", } enum ClassificationType { comment = 1, @@ -7152,7 +11497,7 @@ declare namespace ts { jsxAttribute = 22, jsxText = 23, jsxAttributeStringLiteralValue = 24, - bigintLiteral = 25 + bigintLiteral = 25, } interface InlayHintsContext { file: SourceFile; @@ -7162,13 +11507,16 @@ declare namespace ts { span: TextSpan; preferences: UserPreferences; } + type ExportMapInfoKey = string & { + __exportInfoKey: void; + }; /** The classifier is used for syntactic highlighting in editors via the TSServer */ function createClassifier(): Classifier; interface DocumentHighlights { fileName: string; highlightSpans: HighlightSpan[]; } - function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry; + function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string, jsDocParsingMode?: JSDocParsingMode): DocumentRegistry; /** * The document registry represents a store of SourceFile objects that can be shared between * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) @@ -7266,6 +11614,7 @@ declare namespace ts { moduleName?: string; renamedDependencies?: MapLike; transformers?: CustomTransformers; + jsDocParsingMode?: JSDocParsingMode; } interface TranspileOutput { outputText: string; @@ -7295,4 +11644,4 @@ declare namespace ts { */ function transform(source: T | T[], transformers: TransformerFactory[], compilerOptions?: CompilerOptions): TransformationResult; } -export = ts; \ No newline at end of file +export = ts; diff --git a/node_modules/typescript/lib/typescript.js b/node_modules/typescript/lib/typescript.js index 4d0ee15..fe732a6 100644 --- a/node_modules/typescript/lib/typescript.js +++ b/node_modules/typescript/lib/typescript.js @@ -34,8 +34,8 @@ var ts = (() => { var init_corePublic = __esm({ "src/compiler/corePublic.ts"() { "use strict"; - versionMajorMinor = "5.2"; - version = "5.2.2"; + versionMajorMinor = "5.3"; + version = "5.3.3"; Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -1398,9 +1398,6 @@ var ts = (() => { function tryRemoveSuffix(str, suffix) { return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : void 0; } - function stringContains(str, substring) { - return str.indexOf(substring) !== -1; - } function removeMinAndVersionNumbers(fileName) { let end = fileName.length; for (let pos = end - 1; pos > 0; pos--) { @@ -1583,12 +1580,6 @@ var ts = (() => { } } } - function padLeft(s, length2, padString = " ") { - return length2 <= s.length ? s : padString.repeat(length2 - s.length) + s; - } - function padRight(s, length2, padString = " ") { - return length2 <= s.length ? s : s + padString.repeat(length2 - s.length); - } function takeWhile(array, predicate) { if (array) { const len = array.length; @@ -1609,19 +1600,10 @@ var ts = (() => { return array.slice(index); } } - function trimEndImpl(s) { - let end = s.length - 1; - while (end >= 0) { - if (!isWhiteSpaceLike(s.charCodeAt(end))) - break; - end--; - } - return s.slice(0, end + 1); - } function isNodeLikeSystem() { return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object"; } - var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale, trimString, trimStringEnd, trimStringStart; + var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale; var init_core = __esm({ "src/compiler/core.ts"() { "use strict"; @@ -1655,10 +1637,7 @@ var ts = (() => { return AssertionLevel2; })(AssertionLevel || {}); createUIStringComparer = (() => { - let defaultComparer; - let enUSComparer; - const stringComparerFactory = getStringComparerFactory(); - return createStringComparer; + return createIntlCollatorStringComparer; function compareWithCallback(a, b, comparer) { if (a === b) return 0 /* EqualTo */; @@ -1673,45 +1652,7 @@ var ts = (() => { const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare; return (a, b) => compareWithCallback(a, b, comparer); } - function createLocaleCompareStringComparer(locale) { - if (locale !== void 0) - return createFallbackStringComparer(); - return (a, b) => compareWithCallback(a, b, compareStrings); - function compareStrings(a, b) { - return a.localeCompare(b); - } - } - function createFallbackStringComparer() { - return (a, b) => compareWithCallback(a, b, compareDictionaryOrder); - function compareDictionaryOrder(a, b) { - return compareStrings(a.toUpperCase(), b.toUpperCase()) || compareStrings(a, b); - } - function compareStrings(a, b) { - return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */; - } - } - function getStringComparerFactory() { - if (typeof Intl === "object" && typeof Intl.Collator === "function") { - return createIntlCollatorStringComparer; - } - if (typeof String.prototype.localeCompare === "function" && typeof String.prototype.toLocaleUpperCase === "function" && "a".localeCompare("B") < 0) { - return createLocaleCompareStringComparer; - } - return createFallbackStringComparer; - } - function createStringComparer(locale) { - if (locale === void 0) { - return defaultComparer || (defaultComparer = stringComparerFactory(locale)); - } else if (locale === "en-US") { - return enUSComparer || (enUSComparer = stringComparerFactory(locale)); - } else { - return stringComparerFactory(locale); - } - } })(); - trimString = !!String.prototype.trim ? (s) => s.trim() : (s) => trimStringEnd(trimStringStart(s)); - trimStringEnd = !!String.prototype.trimEnd ? (s) => s.trimEnd() : trimEndImpl; - trimStringStart = !!String.prototype.trimStart ? (s) => s.trimStart() : (s) => s.replace(/^\s+/g, ""); } }); @@ -1722,13 +1663,13 @@ var ts = (() => { "use strict"; init_ts2(); init_ts2(); - LogLevel = /* @__PURE__ */ ((LogLevel2) => { - LogLevel2[LogLevel2["Off"] = 0] = "Off"; - LogLevel2[LogLevel2["Error"] = 1] = "Error"; - LogLevel2[LogLevel2["Warning"] = 2] = "Warning"; - LogLevel2[LogLevel2["Info"] = 3] = "Info"; - LogLevel2[LogLevel2["Verbose"] = 4] = "Verbose"; - return LogLevel2; + LogLevel = /* @__PURE__ */ ((LogLevel3) => { + LogLevel3[LogLevel3["Off"] = 0] = "Off"; + LogLevel3[LogLevel3["Error"] = 1] = "Error"; + LogLevel3[LogLevel3["Warning"] = 2] = "Warning"; + LogLevel3[LogLevel3["Info"] = 3] = "Info"; + LogLevel3[LogLevel3["Verbose"] = 4] = "Verbose"; + return LogLevel3; })(LogLevel || {}); ((Debug2) => { let currentAssertionLevel = 0 /* None */; @@ -2164,17 +2105,21 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${flowHeader}${remainingFlags ? ` (${formatFlowFlags(remainingFlags)})` : ""}`; } }, - __debugFlowFlags: { get() { - return formatEnum( - this.flags, - FlowFlags, - /*isFlags*/ - true - ); - } }, - __debugToString: { value() { - return formatControlFlowGraph(this); - } } + __debugFlowFlags: { + get() { + return formatEnum( + this.flags, + FlowFlags, + /*isFlags*/ + true + ); + } + }, + __debugToString: { + value() { + return formatControlFlowGraph(this); + } + } }); } } @@ -2233,25 +2178,31 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${symbolHeader} '${symbolName(this)}'${remainingSymbolFlags ? ` (${formatSymbolFlags(remainingSymbolFlags)})` : ""}`; } }, - __debugFlags: { get() { - return formatSymbolFlags(this.flags); - } } + __debugFlags: { + get() { + return formatSymbolFlags(this.flags); + } + } }); Object.defineProperties(objectAllocator.getTypeConstructor().prototype, { // for use with vscode-js-debug's new customDescriptionGenerator in launch.json __tsDebuggerDisplay: { value() { - const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}` : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type"; + const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type"; const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0; return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`; } }, - __debugFlags: { get() { - return formatTypeFlags(this.flags); - } }, - __debugObjectFlags: { get() { - return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : ""; - } }, + __debugFlags: { + get() { + return formatTypeFlags(this.flags); + } + }, + __debugObjectFlags: { + get() { + return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : ""; + } + }, __debugTypeToString: { value() { let text = weakTypeTextMap.get(this); @@ -2264,13 +2215,17 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, } }); Object.defineProperties(objectAllocator.getSignatureConstructor().prototype, { - __debugFlags: { get() { - return formatSignatureFlags(this.flags); - } }, - __debugSignatureToString: { value() { - var _a; - return (_a = this.checker) == null ? void 0 : _a.signatureToString(this); - } } + __debugFlags: { + get() { + return formatSignatureFlags(this.flags); + } + }, + __debugSignatureToString: { + value() { + var _a; + return (_a = this.checker) == null ? void 0 : _a.signatureToString(this); + } + } }); const nodeConstructors = [ objectAllocator.getNodeConstructor(), @@ -2288,24 +2243,36 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${nodeHeader}${this.flags ? ` (${formatNodeFlags(this.flags)})` : ""}`; } }, - __debugKind: { get() { - return formatSyntaxKind(this.kind); - } }, - __debugNodeFlags: { get() { - return formatNodeFlags(this.flags); - } }, - __debugModifierFlags: { get() { - return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); - } }, - __debugTransformFlags: { get() { - return formatTransformFlags(this.transformFlags); - } }, - __debugIsParseTreeNode: { get() { - return isParseTreeNode(this); - } }, - __debugEmitFlags: { get() { - return formatEmitFlags(getEmitFlags(this)); - } }, + __debugKind: { + get() { + return formatSyntaxKind(this.kind); + } + }, + __debugNodeFlags: { + get() { + return formatNodeFlags(this.flags); + } + }, + __debugModifierFlags: { + get() { + return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); + } + }, + __debugTransformFlags: { + get() { + return formatTransformFlags(this.transformFlags); + } + }, + __debugIsParseTreeNode: { + get() { + return isParseTreeNode(this); + } + }, + __debugEmitFlags: { + get() { + return formatEmitFlags(getEmitFlags(this)); + } + }, __debugGetText: { value(includeTrivia) { if (nodeIsSynthesized(this)) @@ -2784,18 +2751,18 @@ ${lanes.join("\n")} } function parseRange(text) { const alternatives = []; - for (let range of trimString(text).split(logicalOrRegExp)) { + for (let range of text.trim().split(logicalOrRegExp)) { if (!range) continue; const comparators = []; - range = trimString(range); + range = range.trim(); const match = hyphenRegExp.exec(range); if (match) { if (!parseHyphen(match[1], match[2], comparators)) return void 0; } else { for (const simple of range.split(whitespaceRegExp)) { - const match2 = rangeRegExp.exec(trimString(simple)); + const match2 = rangeRegExp.exec(simple.trim()); if (!match2 || !parseComparator(match2[1], match2[2], comparators)) return void 0; } @@ -2844,15 +2811,21 @@ ${lanes.join("\n")} switch (operator) { case "~": comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - isWildcard(minor) ? "major" : "minor" - ))); + comparators.push(createComparator( + "<", + version2.increment( + isWildcard(minor) ? "major" : "minor" + ) + )); break; case "^": comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch" - ))); + comparators.push(createComparator( + "<", + version2.increment( + version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch" + ) + )); break; case "<": case ">=": @@ -3287,11 +3260,7 @@ ${lanes.join("\n")} const meta = { cat: "__metadata", ph: "M", ts: 1e3 * timestamp(), pid: 1, tid: 1 }; fs.writeSync( traceFd, - "[\n" + [ - { name: "process_name", args: { name: "tsc" }, ...meta }, - { name: "thread_name", args: { name: "Main" }, ...meta }, - { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" } - ].map((v) => JSON.stringify(v)).join(",\n") + "[\n" + [{ name: "process_name", args: { name: "tsc" }, ...meta }, { name: "thread_name", args: { name: "Main" }, ...meta }, { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" }].map((v) => JSON.stringify(v)).join(",\n") ); } tracingEnabled2.startTracing = startTracing2; @@ -3528,7 +3497,7 @@ ${lanes.join("\n")} const name = DiagnosticCategory[d.category]; return lowerCase ? name.toLowerCase() : name; } - var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas; + var SyntaxKind, NodeFlags, ModifierFlags, JsxFlags, RelationComparisonResult, GeneratedIdentifierFlags, TokenFlags, FlowFlags, CommentDirectiveType, OperationCanceledException, FileIncludeKind, FilePreprocessingDiagnosticsKind, EmitOnly, StructureIsReused, ExitStatus, MemberOverrideStatus, UnionReduction, ContextFlags, NodeBuilderFlags, TypeFormatFlags, SymbolFormatFlags, SymbolAccessibility, SyntheticSymbolKind, TypePredicateKind, TypeReferenceSerializationKind, SymbolFlags, EnumKind, CheckFlags, InternalSymbolName, NodeCheckFlags, TypeFlags, ObjectFlags, VarianceFlags, ElementFlags, AccessFlags, IndexFlags, JsxReferenceKind, SignatureKind, SignatureFlags, IndexKind, TypeMapKind, InferencePriority, InferenceFlags, Ternary, AssignmentDeclarationKind, DiagnosticCategory, ModuleResolutionKind, ModuleDetectionKind, WatchFileKind, WatchDirectoryKind, PollingWatchKind, ModuleKind, JsxEmit, ImportsNotUsedAsValues, NewLineKind, ScriptKind, ScriptTarget, LanguageVariant, WatchDirectoryFlags, CharacterCodes, Extension, TransformFlags, SnippetKind, EmitFlags, InternalEmitFlags, ExternalEmitHelpers, EmitHint, OuterExpressionKinds, LexicalEnvironmentFlags, BundleFileSectionKind, ListFormat, PragmaKindFlags, commentPragmas, JSDocParsingMode; var init_types = __esm({ "src/compiler/types.ts"() { "use strict"; @@ -3833,8 +3802,10 @@ ${lanes.join("\n")} SyntaxKind5[SyntaxKind5["DefaultClause"] = 297] = "DefaultClause"; SyntaxKind5[SyntaxKind5["HeritageClause"] = 298] = "HeritageClause"; SyntaxKind5[SyntaxKind5["CatchClause"] = 299] = "CatchClause"; - SyntaxKind5[SyntaxKind5["AssertClause"] = 300] = "AssertClause"; - SyntaxKind5[SyntaxKind5["AssertEntry"] = 301] = "AssertEntry"; + SyntaxKind5[SyntaxKind5["ImportAttributes"] = 300] = "ImportAttributes"; + SyntaxKind5[SyntaxKind5["ImportAttribute"] = 301] = "ImportAttribute"; + SyntaxKind5[SyntaxKind5["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause"; + SyntaxKind5[SyntaxKind5["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry"; SyntaxKind5[SyntaxKind5["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; SyntaxKind5[SyntaxKind5["PropertyAssignment"] = 303] = "PropertyAssignment"; SyntaxKind5[SyntaxKind5["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; @@ -3979,32 +3950,43 @@ ${lanes.join("\n")} })(NodeFlags || {}); ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { ModifierFlags3[ModifierFlags3["None"] = 0] = "None"; - ModifierFlags3[ModifierFlags3["Export"] = 1] = "Export"; - ModifierFlags3[ModifierFlags3["Ambient"] = 2] = "Ambient"; - ModifierFlags3[ModifierFlags3["Public"] = 4] = "Public"; - ModifierFlags3[ModifierFlags3["Private"] = 8] = "Private"; - ModifierFlags3[ModifierFlags3["Protected"] = 16] = "Protected"; - ModifierFlags3[ModifierFlags3["Static"] = 32] = "Static"; - ModifierFlags3[ModifierFlags3["Readonly"] = 64] = "Readonly"; - ModifierFlags3[ModifierFlags3["Accessor"] = 128] = "Accessor"; - ModifierFlags3[ModifierFlags3["Abstract"] = 256] = "Abstract"; - ModifierFlags3[ModifierFlags3["Async"] = 512] = "Async"; - ModifierFlags3[ModifierFlags3["Default"] = 1024] = "Default"; - ModifierFlags3[ModifierFlags3["Const"] = 2048] = "Const"; - ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 4096] = "HasComputedJSDocModifiers"; - ModifierFlags3[ModifierFlags3["Deprecated"] = 8192] = "Deprecated"; - ModifierFlags3[ModifierFlags3["Override"] = 16384] = "Override"; - ModifierFlags3[ModifierFlags3["In"] = 32768] = "In"; - ModifierFlags3[ModifierFlags3["Out"] = 65536] = "Out"; - ModifierFlags3[ModifierFlags3["Decorator"] = 131072] = "Decorator"; + ModifierFlags3[ModifierFlags3["Public"] = 1] = "Public"; + ModifierFlags3[ModifierFlags3["Private"] = 2] = "Private"; + ModifierFlags3[ModifierFlags3["Protected"] = 4] = "Protected"; + ModifierFlags3[ModifierFlags3["Readonly"] = 8] = "Readonly"; + ModifierFlags3[ModifierFlags3["Override"] = 16] = "Override"; + ModifierFlags3[ModifierFlags3["Export"] = 32] = "Export"; + ModifierFlags3[ModifierFlags3["Abstract"] = 64] = "Abstract"; + ModifierFlags3[ModifierFlags3["Ambient"] = 128] = "Ambient"; + ModifierFlags3[ModifierFlags3["Static"] = 256] = "Static"; + ModifierFlags3[ModifierFlags3["Accessor"] = 512] = "Accessor"; + ModifierFlags3[ModifierFlags3["Async"] = 1024] = "Async"; + ModifierFlags3[ModifierFlags3["Default"] = 2048] = "Default"; + ModifierFlags3[ModifierFlags3["Const"] = 4096] = "Const"; + ModifierFlags3[ModifierFlags3["In"] = 8192] = "In"; + ModifierFlags3[ModifierFlags3["Out"] = 16384] = "Out"; + ModifierFlags3[ModifierFlags3["Decorator"] = 32768] = "Decorator"; + ModifierFlags3[ModifierFlags3["Deprecated"] = 65536] = "Deprecated"; + ModifierFlags3[ModifierFlags3["JSDocPublic"] = 8388608] = "JSDocPublic"; + ModifierFlags3[ModifierFlags3["JSDocPrivate"] = 16777216] = "JSDocPrivate"; + ModifierFlags3[ModifierFlags3["JSDocProtected"] = 33554432] = "JSDocProtected"; + ModifierFlags3[ModifierFlags3["JSDocReadonly"] = 67108864] = "JSDocReadonly"; + ModifierFlags3[ModifierFlags3["JSDocOverride"] = 134217728] = "JSDocOverride"; + ModifierFlags3[ModifierFlags3["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers"; + ModifierFlags3[ModifierFlags3["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers"; + ModifierFlags3[ModifierFlags3["SyntacticModifiers"] = 65535] = "SyntacticModifiers"; + ModifierFlags3[ModifierFlags3["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers"; + ModifierFlags3[ModifierFlags3["JSDocOnlyModifiers"] = 65536 /* Deprecated */] = "JSDocOnlyModifiers"; + ModifierFlags3[ModifierFlags3["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers"; + ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers"; ModifierFlags3[ModifierFlags3["HasComputedFlags"] = 536870912] = "HasComputedFlags"; - ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 28] = "AccessibilityModifier"; - ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 16476] = "ParameterPropertyModifier"; - ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 24] = "NonPublicAccessibilityModifier"; - ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 117086] = "TypeScriptModifier"; - ModifierFlags3[ModifierFlags3["ExportDefault"] = 1025] = "ExportDefault"; - ModifierFlags3[ModifierFlags3["All"] = 258047] = "All"; - ModifierFlags3[ModifierFlags3["Modifier"] = 126975] = "Modifier"; + ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 7] = "AccessibilityModifier"; + ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier"; + ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier"; + ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 28895] = "TypeScriptModifier"; + ModifierFlags3[ModifierFlags3["ExportDefault"] = 2080] = "ExportDefault"; + ModifierFlags3[ModifierFlags3["All"] = 131071] = "All"; + ModifierFlags3[ModifierFlags3["Modifier"] = 98303] = "Modifier"; return ModifierFlags3; })(ModifierFlags || {}); JsxFlags = /* @__PURE__ */ ((JsxFlags2) => { @@ -4453,7 +4435,7 @@ ${lanes.join("\n")} TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive"; TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable"; TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable"; - TypeFlags2[TypeFlags2["ObjectFlagsType"] = 138117121] = "ObjectFlagsType"; + TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType"; TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; @@ -4492,6 +4474,7 @@ ${lanes.join("\n")} ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface"; ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening"; ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags"; + ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped"; ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask"; ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread"; ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType"; @@ -4645,14 +4628,14 @@ ${lanes.join("\n")} DiagnosticCategory2[DiagnosticCategory2["Message"] = 3] = "Message"; return DiagnosticCategory2; })(DiagnosticCategory || {}); - ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind2) => { - ModuleResolutionKind2[ModuleResolutionKind2["Classic"] = 1] = "Classic"; - ModuleResolutionKind2[ModuleResolutionKind2["NodeJs"] = 2] = "NodeJs"; - ModuleResolutionKind2[ModuleResolutionKind2["Node10"] = 2] = "Node10"; - ModuleResolutionKind2[ModuleResolutionKind2["Node16"] = 3] = "Node16"; - ModuleResolutionKind2[ModuleResolutionKind2["NodeNext"] = 99] = "NodeNext"; - ModuleResolutionKind2[ModuleResolutionKind2["Bundler"] = 100] = "Bundler"; - return ModuleResolutionKind2; + ModuleResolutionKind = /* @__PURE__ */ ((ModuleResolutionKind3) => { + ModuleResolutionKind3[ModuleResolutionKind3["Classic"] = 1] = "Classic"; + ModuleResolutionKind3[ModuleResolutionKind3["NodeJs"] = 2] = "NodeJs"; + ModuleResolutionKind3[ModuleResolutionKind3["Node10"] = 2] = "Node10"; + ModuleResolutionKind3[ModuleResolutionKind3["Node16"] = 3] = "Node16"; + ModuleResolutionKind3[ModuleResolutionKind3["NodeNext"] = 99] = "NodeNext"; + ModuleResolutionKind3[ModuleResolutionKind3["Bundler"] = 100] = "Bundler"; + return ModuleResolutionKind3; })(ModuleResolutionKind || {}); ModuleDetectionKind = /* @__PURE__ */ ((ModuleDetectionKind2) => { ModuleDetectionKind2[ModuleDetectionKind2["Legacy"] = 1] = "Legacy"; @@ -4660,51 +4643,51 @@ ${lanes.join("\n")} ModuleDetectionKind2[ModuleDetectionKind2["Force"] = 3] = "Force"; return ModuleDetectionKind2; })(ModuleDetectionKind || {}); - WatchFileKind = /* @__PURE__ */ ((WatchFileKind2) => { - WatchFileKind2[WatchFileKind2["FixedPollingInterval"] = 0] = "FixedPollingInterval"; - WatchFileKind2[WatchFileKind2["PriorityPollingInterval"] = 1] = "PriorityPollingInterval"; - WatchFileKind2[WatchFileKind2["DynamicPriorityPolling"] = 2] = "DynamicPriorityPolling"; - WatchFileKind2[WatchFileKind2["FixedChunkSizePolling"] = 3] = "FixedChunkSizePolling"; - WatchFileKind2[WatchFileKind2["UseFsEvents"] = 4] = "UseFsEvents"; - WatchFileKind2[WatchFileKind2["UseFsEventsOnParentDirectory"] = 5] = "UseFsEventsOnParentDirectory"; - return WatchFileKind2; + WatchFileKind = /* @__PURE__ */ ((WatchFileKind3) => { + WatchFileKind3[WatchFileKind3["FixedPollingInterval"] = 0] = "FixedPollingInterval"; + WatchFileKind3[WatchFileKind3["PriorityPollingInterval"] = 1] = "PriorityPollingInterval"; + WatchFileKind3[WatchFileKind3["DynamicPriorityPolling"] = 2] = "DynamicPriorityPolling"; + WatchFileKind3[WatchFileKind3["FixedChunkSizePolling"] = 3] = "FixedChunkSizePolling"; + WatchFileKind3[WatchFileKind3["UseFsEvents"] = 4] = "UseFsEvents"; + WatchFileKind3[WatchFileKind3["UseFsEventsOnParentDirectory"] = 5] = "UseFsEventsOnParentDirectory"; + return WatchFileKind3; })(WatchFileKind || {}); - WatchDirectoryKind = /* @__PURE__ */ ((WatchDirectoryKind2) => { - WatchDirectoryKind2[WatchDirectoryKind2["UseFsEvents"] = 0] = "UseFsEvents"; - WatchDirectoryKind2[WatchDirectoryKind2["FixedPollingInterval"] = 1] = "FixedPollingInterval"; - WatchDirectoryKind2[WatchDirectoryKind2["DynamicPriorityPolling"] = 2] = "DynamicPriorityPolling"; - WatchDirectoryKind2[WatchDirectoryKind2["FixedChunkSizePolling"] = 3] = "FixedChunkSizePolling"; - return WatchDirectoryKind2; + WatchDirectoryKind = /* @__PURE__ */ ((WatchDirectoryKind3) => { + WatchDirectoryKind3[WatchDirectoryKind3["UseFsEvents"] = 0] = "UseFsEvents"; + WatchDirectoryKind3[WatchDirectoryKind3["FixedPollingInterval"] = 1] = "FixedPollingInterval"; + WatchDirectoryKind3[WatchDirectoryKind3["DynamicPriorityPolling"] = 2] = "DynamicPriorityPolling"; + WatchDirectoryKind3[WatchDirectoryKind3["FixedChunkSizePolling"] = 3] = "FixedChunkSizePolling"; + return WatchDirectoryKind3; })(WatchDirectoryKind || {}); - PollingWatchKind = /* @__PURE__ */ ((PollingWatchKind2) => { - PollingWatchKind2[PollingWatchKind2["FixedInterval"] = 0] = "FixedInterval"; - PollingWatchKind2[PollingWatchKind2["PriorityInterval"] = 1] = "PriorityInterval"; - PollingWatchKind2[PollingWatchKind2["DynamicPriority"] = 2] = "DynamicPriority"; - PollingWatchKind2[PollingWatchKind2["FixedChunkSize"] = 3] = "FixedChunkSize"; - return PollingWatchKind2; + PollingWatchKind = /* @__PURE__ */ ((PollingWatchKind3) => { + PollingWatchKind3[PollingWatchKind3["FixedInterval"] = 0] = "FixedInterval"; + PollingWatchKind3[PollingWatchKind3["PriorityInterval"] = 1] = "PriorityInterval"; + PollingWatchKind3[PollingWatchKind3["DynamicPriority"] = 2] = "DynamicPriority"; + PollingWatchKind3[PollingWatchKind3["FixedChunkSize"] = 3] = "FixedChunkSize"; + return PollingWatchKind3; })(PollingWatchKind || {}); - ModuleKind = /* @__PURE__ */ ((ModuleKind2) => { - ModuleKind2[ModuleKind2["None"] = 0] = "None"; - ModuleKind2[ModuleKind2["CommonJS"] = 1] = "CommonJS"; - ModuleKind2[ModuleKind2["AMD"] = 2] = "AMD"; - ModuleKind2[ModuleKind2["UMD"] = 3] = "UMD"; - ModuleKind2[ModuleKind2["System"] = 4] = "System"; - ModuleKind2[ModuleKind2["ES2015"] = 5] = "ES2015"; - ModuleKind2[ModuleKind2["ES2020"] = 6] = "ES2020"; - ModuleKind2[ModuleKind2["ES2022"] = 7] = "ES2022"; - ModuleKind2[ModuleKind2["ESNext"] = 99] = "ESNext"; - ModuleKind2[ModuleKind2["Node16"] = 100] = "Node16"; - ModuleKind2[ModuleKind2["NodeNext"] = 199] = "NodeNext"; - return ModuleKind2; + ModuleKind = /* @__PURE__ */ ((ModuleKind3) => { + ModuleKind3[ModuleKind3["None"] = 0] = "None"; + ModuleKind3[ModuleKind3["CommonJS"] = 1] = "CommonJS"; + ModuleKind3[ModuleKind3["AMD"] = 2] = "AMD"; + ModuleKind3[ModuleKind3["UMD"] = 3] = "UMD"; + ModuleKind3[ModuleKind3["System"] = 4] = "System"; + ModuleKind3[ModuleKind3["ES2015"] = 5] = "ES2015"; + ModuleKind3[ModuleKind3["ES2020"] = 6] = "ES2020"; + ModuleKind3[ModuleKind3["ES2022"] = 7] = "ES2022"; + ModuleKind3[ModuleKind3["ESNext"] = 99] = "ESNext"; + ModuleKind3[ModuleKind3["Node16"] = 100] = "Node16"; + ModuleKind3[ModuleKind3["NodeNext"] = 199] = "NodeNext"; + return ModuleKind3; })(ModuleKind || {}); - JsxEmit = /* @__PURE__ */ ((JsxEmit2) => { - JsxEmit2[JsxEmit2["None"] = 0] = "None"; - JsxEmit2[JsxEmit2["Preserve"] = 1] = "Preserve"; - JsxEmit2[JsxEmit2["React"] = 2] = "React"; - JsxEmit2[JsxEmit2["ReactNative"] = 3] = "ReactNative"; - JsxEmit2[JsxEmit2["ReactJSX"] = 4] = "ReactJSX"; - JsxEmit2[JsxEmit2["ReactJSXDev"] = 5] = "ReactJSXDev"; - return JsxEmit2; + JsxEmit = /* @__PURE__ */ ((JsxEmit3) => { + JsxEmit3[JsxEmit3["None"] = 0] = "None"; + JsxEmit3[JsxEmit3["Preserve"] = 1] = "Preserve"; + JsxEmit3[JsxEmit3["React"] = 2] = "React"; + JsxEmit3[JsxEmit3["ReactNative"] = 3] = "ReactNative"; + JsxEmit3[JsxEmit3["ReactJSX"] = 4] = "ReactJSX"; + JsxEmit3[JsxEmit3["ReactJSXDev"] = 5] = "ReactJSXDev"; + return JsxEmit3; })(JsxEmit || {}); ImportsNotUsedAsValues = /* @__PURE__ */ ((ImportsNotUsedAsValues2) => { ImportsNotUsedAsValues2[ImportsNotUsedAsValues2["Remove"] = 0] = "Remove"; @@ -4712,37 +4695,37 @@ ${lanes.join("\n")} ImportsNotUsedAsValues2[ImportsNotUsedAsValues2["Error"] = 2] = "Error"; return ImportsNotUsedAsValues2; })(ImportsNotUsedAsValues || {}); - NewLineKind = /* @__PURE__ */ ((NewLineKind2) => { - NewLineKind2[NewLineKind2["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; - NewLineKind2[NewLineKind2["LineFeed"] = 1] = "LineFeed"; - return NewLineKind2; + NewLineKind = /* @__PURE__ */ ((NewLineKind3) => { + NewLineKind3[NewLineKind3["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; + NewLineKind3[NewLineKind3["LineFeed"] = 1] = "LineFeed"; + return NewLineKind3; })(NewLineKind || {}); - ScriptKind = /* @__PURE__ */ ((ScriptKind6) => { - ScriptKind6[ScriptKind6["Unknown"] = 0] = "Unknown"; - ScriptKind6[ScriptKind6["JS"] = 1] = "JS"; - ScriptKind6[ScriptKind6["JSX"] = 2] = "JSX"; - ScriptKind6[ScriptKind6["TS"] = 3] = "TS"; - ScriptKind6[ScriptKind6["TSX"] = 4] = "TSX"; - ScriptKind6[ScriptKind6["External"] = 5] = "External"; - ScriptKind6[ScriptKind6["JSON"] = 6] = "JSON"; - ScriptKind6[ScriptKind6["Deferred"] = 7] = "Deferred"; - return ScriptKind6; + ScriptKind = /* @__PURE__ */ ((ScriptKind7) => { + ScriptKind7[ScriptKind7["Unknown"] = 0] = "Unknown"; + ScriptKind7[ScriptKind7["JS"] = 1] = "JS"; + ScriptKind7[ScriptKind7["JSX"] = 2] = "JSX"; + ScriptKind7[ScriptKind7["TS"] = 3] = "TS"; + ScriptKind7[ScriptKind7["TSX"] = 4] = "TSX"; + ScriptKind7[ScriptKind7["External"] = 5] = "External"; + ScriptKind7[ScriptKind7["JSON"] = 6] = "JSON"; + ScriptKind7[ScriptKind7["Deferred"] = 7] = "Deferred"; + return ScriptKind7; })(ScriptKind || {}); - ScriptTarget = /* @__PURE__ */ ((ScriptTarget10) => { - ScriptTarget10[ScriptTarget10["ES3"] = 0] = "ES3"; - ScriptTarget10[ScriptTarget10["ES5"] = 1] = "ES5"; - ScriptTarget10[ScriptTarget10["ES2015"] = 2] = "ES2015"; - ScriptTarget10[ScriptTarget10["ES2016"] = 3] = "ES2016"; - ScriptTarget10[ScriptTarget10["ES2017"] = 4] = "ES2017"; - ScriptTarget10[ScriptTarget10["ES2018"] = 5] = "ES2018"; - ScriptTarget10[ScriptTarget10["ES2019"] = 6] = "ES2019"; - ScriptTarget10[ScriptTarget10["ES2020"] = 7] = "ES2020"; - ScriptTarget10[ScriptTarget10["ES2021"] = 8] = "ES2021"; - ScriptTarget10[ScriptTarget10["ES2022"] = 9] = "ES2022"; - ScriptTarget10[ScriptTarget10["ESNext"] = 99] = "ESNext"; - ScriptTarget10[ScriptTarget10["JSON"] = 100] = "JSON"; - ScriptTarget10[ScriptTarget10["Latest"] = 99 /* ESNext */] = "Latest"; - return ScriptTarget10; + ScriptTarget = /* @__PURE__ */ ((ScriptTarget11) => { + ScriptTarget11[ScriptTarget11["ES3"] = 0] = "ES3"; + ScriptTarget11[ScriptTarget11["ES5"] = 1] = "ES5"; + ScriptTarget11[ScriptTarget11["ES2015"] = 2] = "ES2015"; + ScriptTarget11[ScriptTarget11["ES2016"] = 3] = "ES2016"; + ScriptTarget11[ScriptTarget11["ES2017"] = 4] = "ES2017"; + ScriptTarget11[ScriptTarget11["ES2018"] = 5] = "ES2018"; + ScriptTarget11[ScriptTarget11["ES2019"] = 6] = "ES2019"; + ScriptTarget11[ScriptTarget11["ES2020"] = 7] = "ES2020"; + ScriptTarget11[ScriptTarget11["ES2021"] = 8] = "ES2021"; + ScriptTarget11[ScriptTarget11["ES2022"] = 9] = "ES2022"; + ScriptTarget11[ScriptTarget11["ESNext"] = 99] = "ESNext"; + ScriptTarget11[ScriptTarget11["JSON"] = 100] = "JSON"; + ScriptTarget11[ScriptTarget11["Latest"] = 99 /* ESNext */] = "Latest"; + return ScriptTarget11; })(ScriptTarget || {}); LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => { LanguageVariant4[LanguageVariant4["Standard"] = 0] = "Standard"; @@ -5132,7 +5115,8 @@ ${lanes.join("\n")} ListFormat2[ListFormat2["ObjectBindingPatternElements"] = 525136] = "ObjectBindingPatternElements"; ListFormat2[ListFormat2["ArrayBindingPatternElements"] = 524880] = "ArrayBindingPatternElements"; ListFormat2[ListFormat2["ObjectLiteralExpressionProperties"] = 526226] = "ObjectLiteralExpressionProperties"; - ListFormat2[ListFormat2["ImportClauseEntries"] = 526226] = "ImportClauseEntries"; + ListFormat2[ListFormat2["ImportAttributes"] = 526226] = "ImportAttributes"; + ListFormat2[ListFormat2["ImportClauseEntries"] = 526226 /* ImportAttributes */] = "ImportClauseEntries"; ListFormat2[ListFormat2["ArrayLiteralExpressionElements"] = 8914] = "ArrayLiteralExpressionElements"; ListFormat2[ListFormat2["CommaListElements"] = 528] = "CommaListElements"; ListFormat2[ListFormat2["CallExpressionArguments"] = 2576] = "CallExpressionArguments"; @@ -5213,6 +5197,13 @@ ${lanes.join("\n")} kind: 4 /* MultiLine */ } }; + JSDocParsingMode = /* @__PURE__ */ ((JSDocParsingMode6) => { + JSDocParsingMode6[JSDocParsingMode6["ParseAll"] = 0] = "ParseAll"; + JSDocParsingMode6[JSDocParsingMode6["ParseNone"] = 1] = "ParseNone"; + JSDocParsingMode6[JSDocParsingMode6["ParseForTypeErrors"] = 2] = "ParseForTypeErrors"; + JSDocParsingMode6[JSDocParsingMode6["ParseForTypeInfo"] = 3] = "ParseForTypeInfo"; + return JSDocParsingMode6; + })(JSDocParsingMode || {}); } }); @@ -5737,11 +5728,11 @@ ${lanes.join("\n")} return some(ignoredPaths, (searchPath) => isInPath(path, searchPath)) || isIgnoredByWatchOptions(path, options, useCaseSensitiveFileNames2, getCurrentDirectory); } function isInPath(path, searchPath) { - if (stringContains(path, searchPath)) + if (path.includes(searchPath)) return true; if (useCaseSensitiveFileNames2) return false; - return stringContains(toCanonicalFilePath(path), searchPath); + return toCanonicalFilePath(path).includes(searchPath); } } function createFileWatcherCallback(callback) { @@ -6576,7 +6567,9 @@ ${lanes.join("\n")} })(); if (sys && sys.getEnvironmentVariable) { setCustomPollingValues(sys); - Debug.setAssertionLevel(/^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */); + Debug.setAssertionLevel( + /^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */ + ); } if (sys && sys.debugMode) { Debug.isDebugging = true; @@ -6608,7 +6601,7 @@ ${lanes.join("\n")} return !pathIsAbsolute(path) && !pathIsRelative(path); } function hasExtension(fileName) { - return stringContains(getBaseFileName(fileName), "."); + return getBaseFileName(fileName).includes("."); } function fileExtensionIs(path, extension) { return path.length > extension.length && endsWith(path, extension); @@ -6753,7 +6746,7 @@ ${lanes.join("\n")} return root + pathComponents2.slice(1, length2).join(directorySeparator); } function normalizeSlashes(path) { - return path.indexOf("\\") !== -1 ? path.replace(backslashRegExp, directorySeparator) : path; + return path.includes("\\") ? path.replace(backslashRegExp, directorySeparator) : path; } function reducePathComponents(components) { if (!some(components)) @@ -7384,9 +7377,8 @@ ${lanes.join("\n")} _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: diag(1448, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."), Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, 3 /* Message */, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), - Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"), + Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"), Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, 1 /* Error */, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), - resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, 1 /* Error */, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."), resolution_mode_should_be_either_require_or_import: diag(1453, 1 /* Error */, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, 1 /* Error */, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), @@ -7396,6 +7388,8 @@ ${lanes.join("\n")} File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, 3 /* Message */, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`), File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, 3 /* Message */, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`), File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, 3 /* Message */, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), + resolution_mode_is_the_only_valid_key_for_type_import_attributes: diag(1463, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", "'resolution-mode' is the only valid key for type import attributes."), + Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1464, 1 /* Error */, "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", "Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."), The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, 1 /* Error */, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, 1 /* Error */, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), @@ -7422,6 +7416,7 @@ ${lanes.join("\n")} The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), + Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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: diag(2201, 1 /* 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: diag( @@ -7528,7 +7523,7 @@ ${lanes.join("\n")} An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, 1 /* 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: diag(2357, 1 /* 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: diag(2358, 1 /* 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: diag(2359, 1 /* 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_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: diag(2359, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."), The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, 1 /* 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: diag(2363, 1 /* 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: diag(2364, 1 /* 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."), @@ -7951,15 +7946,15 @@ ${lanes.join("\n")} Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), + Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2823, 1 /* Error */, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2823", "Import attributes are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), - Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), + Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."), Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), - An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"), - The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, 1 /* Error */, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."), _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), @@ -7972,6 +7967,16 @@ ${lanes.join("\n")} await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), await_using_statements_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: diag(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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."), Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), + Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."), + Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."), + Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."), + Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."), + Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."), + The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."), + An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."), + Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."), + A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."), + A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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: diag(4002, 1 /* 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: diag(4004, 1 /* 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}'."), @@ -8080,7 +8085,6 @@ ${lanes.join("\n")} This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, 1 /* Error */, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), The_current_host_does_not_support_the_0_option: diag(5001, 1 /* 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: diag(5009, 1 /* 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: diag(5010, 1 /* 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}'."), @@ -8813,6 +8817,7 @@ ${lanes.join("\n")} Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, 1 /* Error */, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), _0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17019, 1 /* Error */, "_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019", "'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), _0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17020, 1 /* Error */, "_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020", "'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + Unicode_escape_sequence_cannot_appear_here: diag(17021, 1 /* Error */, "Unicode_escape_sequence_cannot_appear_here_17021", "Unicode escape sequence cannot appear here."), Circularity_detected_while_resolving_configuration_Colon_0: diag(18e3, 1 /* Error */, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), The_files_list_in_config_file_0_is_empty: diag(18002, 1 /* 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: diag(18003, 1 /* 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}'."), @@ -9018,7 +9023,7 @@ ${lanes.join("\n")} Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), - Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"), + Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"), Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), @@ -9609,6 +9614,8 @@ ${lanes.join("\n")} var tokenFlags; var commentDirectives; var inJSDocType = 0; + var scriptKind = 0 /* Unknown */; + var jsDocParsingMode = 0 /* ParseAll */; setText(text, start, length2); var scanner2 = { getTokenFullStart: () => fullStartPos, @@ -9652,6 +9659,8 @@ ${lanes.join("\n")} setText, setScriptTarget, setLanguageVariant, + setScriptKind, + setJSDocParsingMode, setOnError, resetTokenState, setTextPos: resetTokenState, @@ -9905,7 +9914,7 @@ ${lanes.join("\n")} start2 = pos; continue; } - if (isLineBreak(ch) && !jsxAttributeString) { + if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) { result += text.substring(start2, pos); tokenFlags |= 4 /* Unterminated */; error2(Diagnostics.Unterminated_string_literal); @@ -9994,7 +10003,7 @@ ${lanes.join("\n")} tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { const code = parseInt(text.substring(start2 + 1, pos), 8); - error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0")); + error2(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + code.toString(16).padStart(2, "0")); return String.fromCharCode(code); } return text.substring(start2, pos); @@ -10430,9 +10439,7 @@ ${lanes.join("\n")} } if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { pos += 2; - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */) { - tokenFlags |= 2 /* PrecedingJSDocComment */; - } + const isJSDoc2 = text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */; let commentClosed = false; let lastLineStart = tokenStart; while (pos < end) { @@ -10448,6 +10455,9 @@ ${lanes.join("\n")} tokenFlags |= 1 /* PrecedingLineBreak */; } } + if (isJSDoc2 && shouldParseJSDoc()) { + tokenFlags |= 2 /* PrecedingJSDocComment */; + } commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); if (!commentClosed) { error2(Diagnostics.Asterisk_Slash_expected); @@ -10704,6 +10714,21 @@ ${lanes.join("\n")} } } } + function shouldParseJSDoc() { + switch (jsDocParsingMode) { + case 0 /* ParseAll */: + return true; + case 1 /* ParseNone */: + return false; + } + if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) { + return true; + } + if (jsDocParsingMode === 3 /* ParseForTypeInfo */) { + return false; + } + return jsDocSeeOrLink.test(text.slice(fullStartPos, pos)); + } function reScanInvalidIdentifier() { Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); pos = tokenStart = fullStartPos; @@ -10797,7 +10822,7 @@ ${lanes.join("\n")} return token; } function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) { - const type = getDirectiveFromComment(trimStringStart(text2), commentDirectiveRegEx); + const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx); if (type === void 0) { return commentDirectives2; } @@ -11118,6 +11143,12 @@ ${lanes.join("\n")} function setLanguageVariant(variant) { languageVariant = variant; } + function setScriptKind(kind) { + scriptKind = kind; + } + function setJSDocParsingMode(kind) { + jsDocParsingMode = kind; + } function resetTokenState(position) { Debug.assert(position >= 0); pos = position; @@ -11131,6 +11162,9 @@ ${lanes.join("\n")} inJSDocType += inType ? 1 : -1; } } + function codePointAt(s, i) { + return s.codePointAt(i); + } function charSize(ch) { if (ch >= 65536) { return 2; @@ -11149,7 +11183,7 @@ ${lanes.join("\n")} function utf16EncodeAsString(codePoint) { return utf16EncodeAsStringWorker(codePoint); } - var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, codePointAt, utf16EncodeAsStringWorker; + var textToKeywordObj, textToKeyword, textToToken, unicodeES3IdentifierStart, unicodeES3IdentifierPart, unicodeES5IdentifierStart, unicodeES5IdentifierPart, unicodeESNextIdentifierStart, unicodeESNextIdentifierPart, commentDirectiveRegExSingleLine, commentDirectiveRegExMultiLine, jsDocSeeOrLink, tokenStrings, mergeConflictMarkerLength, shebangTriviaRegex, utf16EncodeAsStringWorker; var init_scanner = __esm({ "src/compiler/scanner.ts"() { "use strict"; @@ -11312,23 +11346,10 @@ ${lanes.join("\n")} unicodeESNextIdentifierPart = [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]; commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/; commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/; + jsDocSeeOrLink = /@(?:see|link)/i; tokenStrings = makeReverseMap(textToToken); mergeConflictMarkerLength = "<<<<<<<".length; shebangTriviaRegex = /^#!.*/; - codePointAt = String.prototype.codePointAt ? (s, i) => s.codePointAt(i) : function codePointAt2(str, i) { - const size = str.length; - if (i < 0 || i >= size) { - return void 0; - } - const first2 = str.charCodeAt(i); - if (first2 >= 55296 && first2 <= 56319 && size > i + 1) { - const second = str.charCodeAt(i + 1); - if (second >= 56320 && second <= 57343) { - return (first2 - 55296) * 1024 + second - 56320 + 65536; - } - } - return first2; - }; utf16EncodeAsStringWorker = String.fromCodePoint ? (codePoint) => String.fromCodePoint(codePoint) : utf16EncodeAsStringFallback; } }); @@ -11468,7 +11489,7 @@ ${lanes.join("\n")} } } function isParameterPropertyDeclaration(node, parent2) { - return isParameter(node) && hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; + return isParameter(node) && hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) && parent2.kind === 176 /* Constructor */; } function isEmptyBindingPattern(node) { if (isBindingPattern(node)) { @@ -11757,7 +11778,7 @@ ${lanes.join("\n")} } } function getModifiers(node) { - if (hasSyntacticModifier(node, 126975 /* Modifier */)) { + if (hasSyntacticModifier(node, 98303 /* Modifier */)) { return filter(node.modifiers, isModifier); } } @@ -12145,12 +12166,12 @@ ${lanes.join("\n")} function isTypeOnlyImportOrExportDeclaration(node) { return isTypeOnlyImportDeclaration(node) || isTypeOnlyExportDeclaration(node); } - function isAssertionKey(node) { - return isStringLiteral(node) || isIdentifier(node); - } function isStringTextContainingNode(node) { return node.kind === 11 /* StringLiteral */ || isTemplateLiteralKind(node.kind); } + function isImportAttributeName(node) { + return isStringLiteral(node) || isIdentifier(node); + } function isGeneratedIdentifier(node) { var _a; return isIdentifier(node) && ((_a = node.emitNode) == null ? void 0 : _a.autoGenerate) !== void 0; @@ -12191,7 +12212,7 @@ ${lanes.join("\n")} return false; } function isParameterPropertyModifier(kind) { - return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); + return !!(modifierToFlag(kind) & 31 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; @@ -12268,6 +12289,16 @@ ${lanes.join("\n")} function isAutoAccessorPropertyDeclaration(node) { return isPropertyDeclaration(node) && hasAccessorModifier(node); } + function isClassInstanceProperty(node) { + if (isInJSFile(node) && isExpandoPropertyDeclaration(node)) { + return (!isBindableStaticAccessExpression(node) || !isPrototypeAccess(node.expression)) && !isBindableStaticNameExpression( + node, + /*excludeThisKeyword*/ + true + ); + } + return node.parent && isClassLike(node.parent) && isPropertyDeclaration(node) && !hasAccessorModifier(node); + } function isMethodOrAccessor(node) { switch (node.kind) { case 174 /* MethodDeclaration */: @@ -12396,6 +12427,9 @@ ${lanes.join("\n")} const kind = node.kind; return kind === 211 /* PropertyAccessExpression */ || kind === 166 /* QualifiedName */; } + function isCallLikeOrFunctionLikeExpression(node) { + return isCallLikeExpression(node) || isFunctionExpressionOrArrowFunction(node); + } function isCallLikeExpression(node) { switch (node.kind) { case 286 /* JsxOpeningElement */: @@ -12542,10 +12576,10 @@ ${lanes.join("\n")} return some(statements, isScopeMarker); } function needsScopeMarker(result) { - return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 1 /* Export */) && !isAmbientModule(result); + return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, 32 /* Export */) && !isAmbientModule(result); } function isExternalModuleIndicator(result) { - return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 1 /* Export */); + return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, 32 /* Export */); } function isForInOrOfStatement(node) { return node.kind === 249 /* ForInStatement */ || node.kind === 250 /* ForOfStatement */; @@ -12967,26 +13001,6 @@ ${lanes.join("\n")} function getFullWidth(node) { return node.end - node.pos; } - function getResolvedModule(sourceFile, moduleNameText, mode) { - var _a, _b; - return (_b = (_a = sourceFile == null ? void 0 : sourceFile.resolvedModules) == null ? void 0 : _a.get(moduleNameText, mode)) == null ? void 0 : _b.resolvedModule; - } - function setResolvedModule(sourceFile, moduleNameText, resolvedModule, mode) { - if (!sourceFile.resolvedModules) { - sourceFile.resolvedModules = createModeAwareCache(); - } - sourceFile.resolvedModules.set(moduleNameText, mode, resolvedModule); - } - function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective, mode) { - if (!sourceFile.resolvedTypeReferenceDirectiveNames) { - sourceFile.resolvedTypeReferenceDirectiveNames = createModeAwareCache(); - } - sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, mode, resolvedTypeReferenceDirective); - } - function getResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, mode) { - var _a, _b; - return (_b = (_a = sourceFile == null ? void 0 : sourceFile.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _a.get(typeReferenceDirectiveName, mode)) == null ? void 0 : _b.resolvedTypeReferenceDirective; - } function projectReferenceIsEqualTo(oldRef, newRef) { return oldRef.path === newRef.path && !oldRef.prepend === !newRef.prepend && !oldRef.circular === !newRef.circular; } @@ -12994,14 +13008,14 @@ ${lanes.join("\n")} return oldResolution === newResolution || oldResolution.resolvedModule === newResolution.resolvedModule || !!oldResolution.resolvedModule && !!newResolution.resolvedModule && oldResolution.resolvedModule.isExternalLibraryImport === newResolution.resolvedModule.isExternalLibraryImport && oldResolution.resolvedModule.extension === newResolution.resolvedModule.extension && oldResolution.resolvedModule.resolvedFileName === newResolution.resolvedModule.resolvedFileName && oldResolution.resolvedModule.originalPath === newResolution.resolvedModule.originalPath && packageIdIsEqual(oldResolution.resolvedModule.packageId, newResolution.resolvedModule.packageId) && oldResolution.node10Result === newResolution.node10Result; } function createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageName) { - var _a, _b; - const node10Result = (_b = (_a = sourceFile.resolvedModules) == null ? void 0 : _a.get(moduleReference, mode)) == null ? void 0 : _b.node10Result; + var _a; + const node10Result = (_a = host.getResolvedModule(sourceFile, moduleReference, mode)) == null ? void 0 : _a.node10Result; const result = node10Result ? chainDiagnosticMessages( /*details*/ void 0, Diagnostics.There_are_types_at_0_but_this_result_could_not_be_resolved_when_respecting_package_json_exports_The_1_library_may_need_to_update_its_package_json_or_typings, node10Result, - node10Result.indexOf(nodeModulesPathPart + "@types/") > -1 ? `@types/${mangleScopedPackageName(packageName)}` : packageName + node10Result.includes(nodeModulesPathPart + "@types/") ? `@types/${mangleScopedPackageName(packageName)}` : packageName ) : host.typesPackageExists(packageName) ? chainDiagnosticMessages( /*details*/ void 0, @@ -13037,14 +13051,14 @@ ${lanes.join("\n")} function typeDirectiveIsEqualTo(oldResolution, newResolution) { return oldResolution === newResolution || oldResolution.resolvedTypeReferenceDirective === newResolution.resolvedTypeReferenceDirective || !!oldResolution.resolvedTypeReferenceDirective && !!newResolution.resolvedTypeReferenceDirective && oldResolution.resolvedTypeReferenceDirective.resolvedFileName === newResolution.resolvedTypeReferenceDirective.resolvedFileName && !!oldResolution.resolvedTypeReferenceDirective.primary === !!newResolution.resolvedTypeReferenceDirective.primary && oldResolution.resolvedTypeReferenceDirective.originalPath === newResolution.resolvedTypeReferenceDirective.originalPath; } - function hasChangesInResolutions(names, newSourceFile, newResolutions, oldResolutions, comparer, nameAndModeGetter) { + function hasChangesInResolutions(names, newSourceFile, newResolutions, getOldResolution, comparer, nameAndModeGetter) { Debug.assert(names.length === newResolutions.length); for (let i = 0; i < names.length; i++) { const newResolution = newResolutions[i]; const entry = names[i]; const name = nameAndModeGetter.getName(entry); const mode = nameAndModeGetter.getMode(entry, newSourceFile); - const oldResolution = oldResolutions && oldResolutions.get(name, mode); + const oldResolution = getOldResolution(name, mode); const changed = oldResolution ? !newResolution || !comparer(oldResolution, newResolution) : newResolution; if (changed) { return true; @@ -13277,7 +13291,7 @@ ${lanes.join("\n")} } let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end); if (isJSDocTypeExpressionOrChild(node)) { - text = text.split(/\r\n|\n|\r/).map((line) => trimStringStart(line.replace(/^\s*\*/, ""))).join("\n"); + text = text.split(/\r\n|\n|\r/).map((line) => line.replace(/^\s*\*/, "").trimStart()).join("\n"); } return text; } @@ -13298,402 +13312,6 @@ ${lanes.join("\n")} const emitNode = node.emitNode; return emitNode && emitNode.internalFlags || 0; } - function getScriptTargetFeatures() { - return new Map(Object.entries({ - Array: new Map(Object.entries({ - es2015: [ - "find", - "findIndex", - "fill", - "copyWithin", - "entries", - "keys", - "values" - ], - es2016: [ - "includes" - ], - es2019: [ - "flat", - "flatMap" - ], - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Iterator: new Map(Object.entries({ - es2015: emptyArray - })), - AsyncIterator: new Map(Object.entries({ - es2015: emptyArray - })), - Atomics: new Map(Object.entries({ - es2017: emptyArray - })), - SharedArrayBuffer: new Map(Object.entries({ - es2017: emptyArray - })), - AsyncIterable: new Map(Object.entries({ - es2018: emptyArray - })), - AsyncIterableIterator: new Map(Object.entries({ - es2018: emptyArray - })), - AsyncGenerator: new Map(Object.entries({ - es2018: emptyArray - })), - AsyncGeneratorFunction: new Map(Object.entries({ - es2018: emptyArray - })), - RegExp: new Map(Object.entries({ - es2015: [ - "flags", - "sticky", - "unicode" - ], - es2018: [ - "dotAll" - ] - })), - Reflect: new Map(Object.entries({ - es2015: [ - "apply", - "construct", - "defineProperty", - "deleteProperty", - "get", - " getOwnPropertyDescriptor", - "getPrototypeOf", - "has", - "isExtensible", - "ownKeys", - "preventExtensions", - "set", - "setPrototypeOf" - ] - })), - ArrayConstructor: new Map(Object.entries({ - es2015: [ - "from", - "of" - ] - })), - ObjectConstructor: new Map(Object.entries({ - es2015: [ - "assign", - "getOwnPropertySymbols", - "keys", - "is", - "setPrototypeOf" - ], - es2017: [ - "values", - "entries", - "getOwnPropertyDescriptors" - ], - es2019: [ - "fromEntries" - ], - es2022: [ - "hasOwn" - ] - })), - NumberConstructor: new Map(Object.entries({ - es2015: [ - "isFinite", - "isInteger", - "isNaN", - "isSafeInteger", - "parseFloat", - "parseInt" - ] - })), - Math: new Map(Object.entries({ - es2015: [ - "clz32", - "imul", - "sign", - "log10", - "log2", - "log1p", - "expm1", - "cosh", - "sinh", - "tanh", - "acosh", - "asinh", - "atanh", - "hypot", - "trunc", - "fround", - "cbrt" - ] - })), - Map: new Map(Object.entries({ - es2015: [ - "entries", - "keys", - "values" - ] - })), - Set: new Map(Object.entries({ - es2015: [ - "entries", - "keys", - "values" - ] - })), - PromiseConstructor: new Map(Object.entries({ - es2015: [ - "all", - "race", - "reject", - "resolve" - ], - es2020: [ - "allSettled" - ], - es2021: [ - "any" - ] - })), - Symbol: new Map(Object.entries({ - es2015: [ - "for", - "keyFor" - ], - es2019: [ - "description" - ] - })), - WeakMap: new Map(Object.entries({ - es2015: [ - "entries", - "keys", - "values" - ] - })), - WeakSet: new Map(Object.entries({ - es2015: [ - "entries", - "keys", - "values" - ] - })), - String: new Map(Object.entries({ - es2015: [ - "codePointAt", - "includes", - "endsWith", - "normalize", - "repeat", - "startsWith", - "anchor", - "big", - "blink", - "bold", - "fixed", - "fontcolor", - "fontsize", - "italics", - "link", - "small", - "strike", - "sub", - "sup" - ], - es2017: [ - "padStart", - "padEnd" - ], - es2019: [ - "trimStart", - "trimEnd", - "trimLeft", - "trimRight" - ], - es2020: [ - "matchAll" - ], - es2021: [ - "replaceAll" - ], - es2022: [ - "at" - ] - })), - StringConstructor: new Map(Object.entries({ - es2015: [ - "fromCodePoint", - "raw" - ] - })), - DateTimeFormat: new Map(Object.entries({ - es2017: [ - "formatToParts" - ] - })), - Promise: new Map(Object.entries({ - es2015: emptyArray, - es2018: [ - "finally" - ] - })), - RegExpMatchArray: new Map(Object.entries({ - es2018: [ - "groups" - ] - })), - RegExpExecArray: new Map(Object.entries({ - es2018: [ - "groups" - ] - })), - Intl: new Map(Object.entries({ - es2018: [ - "PluralRules" - ] - })), - NumberFormat: new Map(Object.entries({ - es2018: [ - "formatToParts" - ] - })), - SymbolConstructor: new Map(Object.entries({ - es2020: [ - "matchAll" - ] - })), - DataView: new Map(Object.entries({ - es2020: [ - "setBigInt64", - "setBigUint64", - "getBigInt64", - "getBigUint64" - ] - })), - BigInt: new Map(Object.entries({ - es2020: emptyArray - })), - RelativeTimeFormat: new Map(Object.entries({ - es2020: [ - "format", - "formatToParts", - "resolvedOptions" - ] - })), - Int8Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Uint8Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Uint8ClampedArray: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Int16Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Uint16Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Int32Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Uint32Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Float32Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Float64Array: new Map(Object.entries({ - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - BigInt64Array: new Map(Object.entries({ - es2020: emptyArray, - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - BigUint64Array: new Map(Object.entries({ - es2020: emptyArray, - es2022: [ - "at" - ], - es2023: [ - "findLastIndex", - "findLast" - ] - })), - Error: new Map(Object.entries({ - es2022: [ - "cause" - ] - })) - })); - } function getLiteralText(node, sourceFile, flags) { if (sourceFile && canUseOriginalText(node, flags)) { return getSourceTextOfNodeFromSourceFile(sourceFile, node); @@ -13837,7 +13455,7 @@ ${lanes.join("\n")} return false; } function isAmbientPropertyDeclaration(node) { - return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 2 /* Ambient */); + return !!(node.flags & 33554432 /* Ambient */) || hasSyntacticModifier(node, 128 /* Ambient */); } function isBlockScope(node, parentNode) { switch (node.kind) { @@ -14025,16 +13643,14 @@ ${lanes.join("\n")} const start = skipTrivia(sourceFile.text, nodes.pos); return createFileDiagnosticFromMessageChain(sourceFile, start, nodes.end - start, messageChain, relatedInformation); } - function assertDiagnosticLocation(file, start, length2) { + function assertDiagnosticLocation(sourceText, start, length2) { Debug.assertGreaterThanOrEqual(start, 0); Debug.assertGreaterThanOrEqual(length2, 0); - if (file) { - Debug.assertLessThanOrEqual(start, file.text.length); - Debug.assertLessThanOrEqual(start + length2, file.text.length); - } + Debug.assertLessThanOrEqual(start, sourceText.length); + Debug.assertLessThanOrEqual(start + length2, sourceText.length); } function createFileDiagnosticFromMessageChain(file, start, length2, messageChain, relatedInformation) { - assertDiagnosticLocation(file, start, length2); + assertDiagnosticLocation(file.text, start, length2); return { file, start, @@ -14192,10 +13808,10 @@ ${lanes.join("\n")} return file.scriptKind === 6 /* JSON */; } function isEnumConst(node) { - return !!(getCombinedModifierFlags(node) & 2048 /* Const */); + return !!(getCombinedModifierFlags(node) & 4096 /* Const */); } function isDeclarationReadonly(declaration) { - return !!(getCombinedModifierFlags(declaration) & 64 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); + return !!(getCombinedModifierFlags(declaration) & 8 /* Readonly */ && !isParameterPropertyDeclaration(declaration, declaration.parent)); } function isVarAwaitUsing(node) { return (getCombinedNodeFlags(node) & 7 /* BlockScoped */) === 6 /* AwaitUsing */; @@ -14272,10 +13888,7 @@ ${lanes.join("\n")} } else if (node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node) { node = node.parent; } - Debug.assert( - node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, - "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'." - ); + Debug.assert(node.kind === 80 /* Identifier */ || node.kind === 166 /* QualifiedName */ || node.kind === 211 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); case 166 /* QualifiedName */: case 211 /* PropertyAccessExpression */: case 110 /* ThisKeyword */: { @@ -14490,11 +14103,7 @@ ${lanes.join("\n")} }); } function getPropertyArrayElementValue(objectLiteral, propKey, elementValue) { - return forEachPropertyAssignment( - objectLiteral, - propKey, - (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0 - ); + return forEachPropertyAssignment(objectLiteral, propKey, (property) => isArrayLiteralExpression(property.initializer) ? find(property.initializer.elements, (element) => isStringLiteral(element) && element.text === elementValue) : void 0); } function getTsConfigObjectLiteralExpression(tsConfigSourceFile) { if (tsConfigSourceFile && tsConfigSourceFile.statements.length) { @@ -14714,6 +14323,8 @@ ${lanes.join("\n")} case 286 /* JsxOpeningElement */: case 285 /* JsxSelfClosingElement */: return node.tagName; + case 226 /* BinaryExpression */: + return node.right; default: return node.expression; } @@ -14903,8 +14514,8 @@ ${lanes.join("\n")} return forStatement.initializer === node && forStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forStatement.condition === node || forStatement.incrementor === node; case 249 /* ForInStatement */: case 250 /* ForOfStatement */: - const forInStatement = parent2; - return forInStatement.initializer === node && forInStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInStatement.expression === node; + const forInOrOfStatement = parent2; + return forInOrOfStatement.initializer === node && forInOrOfStatement.initializer.kind !== 261 /* VariableDeclarationList */ || forInOrOfStatement.expression === node; case 216 /* TypeAssertionExpression */: case 234 /* AsExpression */: return node === parent2.expression; @@ -15267,6 +14878,7 @@ ${lanes.join("\n")} true ))) == null ? void 0 : _a.arguments[0]; case 272 /* ImportDeclaration */: + case 278 /* ExportDeclaration */: return tryCast(node.moduleSpecifier, isStringLiteralLike); case 271 /* ImportEqualsDeclaration */: return tryCast((_b = tryCast(node.moduleReference, isExternalModuleReference)) == null ? void 0 : _b.expression, isStringLiteralLike); @@ -15278,6 +14890,8 @@ ${lanes.join("\n")} return tryCast(node.parent.parent.moduleSpecifier, isStringLiteralLike); case 276 /* ImportSpecifier */: return tryCast(node.parent.parent.parent.moduleSpecifier, isStringLiteralLike); + case 205 /* ImportType */: + return isLiteralImportTypeNode(node) ? node.argument.literal : void 0; default: Debug.assertNever(node); } @@ -15528,9 +15142,9 @@ ${lanes.join("\n")} } function getNextJSDocCommentLocation(node) { const parent2 = node.parent; - if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { + if (parent2.kind === 303 /* PropertyAssignment */ || parent2.kind === 277 /* ExportAssignment */ || parent2.kind === 172 /* PropertyDeclaration */ || parent2.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent2.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent2) || isAssignmentExpression(node)) { return parent2; - } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isBinaryExpression(parent2) && parent2.operatorToken.kind === 64 /* EqualsToken */)) { + } else if (parent2.parent && (getSingleVariableOfVariableStatement(parent2.parent) === node || isAssignmentExpression(parent2))) { return parent2.parent; } else if (parent2.parent && parent2.parent.parent && (getSingleVariableOfVariableStatement(parent2.parent.parent) || getSingleInitializerOfVariableStatementOrPropertyDeclaration(parent2.parent.parent) === node || getSourceOfDefaultedAssignment(parent2.parent.parent))) { return parent2.parent.parent; @@ -15594,20 +15208,23 @@ ${lanes.join("\n")} function hasTypeArguments(node) { return !!node.typeArguments; } - function getAssignmentTargetKind(node) { + function getAssignmentTarget(node) { let parent2 = node.parent; while (true) { switch (parent2.kind) { case 226 /* BinaryExpression */: - const binaryOperator = parent2.operatorToken.kind; - return isAssignmentOperator(binaryOperator) && parent2.left === node ? binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */ : 0 /* None */; + const binaryExpression = parent2; + const binaryOperator = binaryExpression.operatorToken.kind; + return isAssignmentOperator(binaryOperator) && binaryExpression.left === node ? binaryExpression : void 0; case 224 /* PrefixUnaryExpression */: case 225 /* PostfixUnaryExpression */: - const unaryOperator = parent2.operator; - return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? 2 /* Compound */ : 0 /* None */; + const unaryExpression = parent2; + const unaryOperator = unaryExpression.operator; + return unaryOperator === 46 /* PlusPlusToken */ || unaryOperator === 47 /* MinusMinusToken */ ? unaryExpression : void 0; case 249 /* ForInStatement */: case 250 /* ForOfStatement */: - return parent2.initializer === node ? 1 /* Definite */ : 0 /* None */; + const forInOrOfStatement = parent2; + return forInOrOfStatement.initializer === node ? forInOrOfStatement : void 0; case 217 /* ParenthesizedExpression */: case 209 /* ArrayLiteralExpression */: case 230 /* SpreadElement */: @@ -15619,24 +15236,53 @@ ${lanes.join("\n")} break; case 304 /* ShorthandPropertyAssignment */: if (parent2.name !== node) { - return 0 /* None */; + return void 0; } node = parent2.parent; break; case 303 /* PropertyAssignment */: if (parent2.name === node) { - return 0 /* None */; + return void 0; } node = parent2.parent; break; default: - return 0 /* None */; + return void 0; } parent2 = node.parent; } } + function getAssignmentTargetKind(node) { + const target = getAssignmentTarget(node); + if (!target) { + return 0 /* None */; + } + switch (target.kind) { + case 226 /* BinaryExpression */: + const binaryOperator = target.operatorToken.kind; + return binaryOperator === 64 /* EqualsToken */ || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 /* Definite */ : 2 /* Compound */; + case 224 /* PrefixUnaryExpression */: + case 225 /* PostfixUnaryExpression */: + return 2 /* Compound */; + case 249 /* ForInStatement */: + case 250 /* ForOfStatement */: + return 1 /* Definite */; + } + } function isAssignmentTarget(node) { - return getAssignmentTargetKind(node) !== 0 /* None */; + return !!getAssignmentTarget(node); + } + function isCompoundLikeAssignment(assignment) { + const right = skipParentheses(assignment.right); + return right.kind === 226 /* BinaryExpression */ && isShiftOperatorOrHigher(right.operatorToken.kind); + } + function isInCompoundLikeAssignment(node) { + const target = getAssignmentTarget(node); + return !!target && isAssignmentExpression( + target, + /*excludeCompoundAssignment*/ + true + ) && isCompoundLikeAssignment(target); } function isNodeWithPossibleHoistedDeclaration(node) { switch (node.kind) { @@ -15894,7 +15540,7 @@ ${lanes.join("\n")} flags |= 1 /* Generator */; } case 219 /* ArrowFunction */: - if (hasSyntacticModifier(node, 512 /* Async */)) { + if (hasSyntacticModifier(node, 1024 /* Async */)) { flags |= 2 /* Async */; } break; @@ -15910,7 +15556,7 @@ ${lanes.join("\n")} case 218 /* FunctionExpression */: case 219 /* ArrowFunction */: case 174 /* MethodDeclaration */: - return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 512 /* Async */); + return node.body !== void 0 && node.asteriskToken === void 0 && hasSyntacticModifier(node, 1024 /* Async */); } return false; } @@ -15937,6 +15583,7 @@ ${lanes.join("\n")} case 81 /* PrivateIdentifier */: return name.escapedText; case 11 /* StringLiteral */: + case 15 /* NoSubstitutionTemplateLiteral */: case 9 /* NumericLiteral */: return escapeLeadingUnderscores(name.text); case 167 /* ComputedPropertyName */: @@ -16340,8 +15987,11 @@ ${lanes.join("\n")} function escapeTemplateSubstitution(str) { return str.replace(templateSubstitutionRegExp, "\\${"); } + function containsInvalidEscapeFlag(node) { + return !!((node.templateFlags || 0) & 2048 /* ContainsInvalidEscape */); + } function hasInvalidEscape(template) { - return template && !!(isNoSubstitutionTemplateLiteral(template) ? template.templateFlags : template.head.templateFlags || some(template.templateSpans, (span) => !!span.literal.templateFlags)); + return template && !!(isNoSubstitutionTemplateLiteral(template) ? containsInvalidEscapeFlag(template) : containsInvalidEscapeFlag(template.head) || some(template.templateSpans, (span) => containsInvalidEscapeFlag(span.literal))); } function encodeUtf16EscapeSequence(charCode) { const hexCharCode = charCode.toString(16).toUpperCase(); @@ -16392,7 +16042,7 @@ ${lanes.join("\n")} } function isIntrinsicJsxName(name) { const ch = name.charCodeAt(0); - return ch >= 97 /* a */ && ch <= 122 /* z */ || stringContains(name, "-"); + return ch >= 97 /* a */ && ch <= 122 /* z */ || name.includes("-"); } function getIndentString(level) { const singleLevel = indentStrings[1]; @@ -16404,12 +16054,9 @@ ${lanes.join("\n")} function getIndentSize() { return indentStrings[1].length; } - function isNightly() { - return stringContains(version, "-dev") || stringContains(version, "-insiders"); - } function createTextWriter(newLine) { var output; - var indent2; + var indent3; var lineStart; var lineCount; var linePos; @@ -16427,7 +16074,7 @@ ${lanes.join("\n")} function writeText(s) { if (s && s.length) { if (lineStart) { - s = getIndentString(indent2) + s; + s = getIndentString(indent3) + s; lineStart = false; } output += s; @@ -16446,7 +16093,7 @@ ${lanes.join("\n")} } function reset2() { output = ""; - indent2 = 0; + indent3 = 0; lineStart = true; lineCount = 0; linePos = 0; @@ -16483,15 +16130,15 @@ ${lanes.join("\n")} writeLiteral, writeLine, increaseIndent: () => { - indent2++; + indent3++; }, decreaseIndent: () => { - indent2--; + indent3--; }, - getIndent: () => indent2, + getIndent: () => indent3, getTextPos: () => output.length, getLine: () => lineCount, - getColumn: () => lineStart ? indent2 * getIndentSize() : output.length - linePos, + getColumn: () => lineStart ? indent3 * getIndentSize() : output.length - linePos, getText: () => output, isAtStartOfLine: () => lineStart, hasTrailingComment: () => hasTrailingComment, @@ -16595,7 +16242,7 @@ ${lanes.join("\n")} return void 0; } const specifier = getExternalModuleName(declaration); - if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && getCanonicalAbsolutePath(host, file.path).indexOf(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory()))) === -1) { + if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && !getCanonicalAbsolutePath(host, file.path).includes(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory())))) { return void 0; } return getResolvedExternalModuleName(host, file); @@ -16671,7 +16318,31 @@ ${lanes.join("\n")} } function sourceFileMayBeEmitted(sourceFile, host, forceDtsEmit) { const options = host.getCompilerOptions(); - return !(options.noEmitForJsFiles && isSourceFileJS(sourceFile)) && !sourceFile.isDeclarationFile && !host.isSourceFileFromExternalLibrary(sourceFile) && (forceDtsEmit || !(isJsonSourceFile(sourceFile) && host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) && !host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)); + if (options.noEmitForJsFiles && isSourceFileJS(sourceFile)) + return false; + if (sourceFile.isDeclarationFile) + return false; + if (host.isSourceFileFromExternalLibrary(sourceFile)) + return false; + if (forceDtsEmit) + return true; + if (host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)) + return false; + if (!isJsonSourceFile(sourceFile)) + return true; + if (host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) + return false; + if (outFile(options)) + return true; + if (!options.outDir) + return false; + if (options.rootDir || options.composite && options.configFilePath) { + const commonDir = getNormalizedAbsolutePath(getCommonSourceDirectory(options, () => [], host.getCurrentDirectory(), host.getCanonicalFileName), host.getCurrentDirectory()); + const outputPath = getSourceFilePathInNewDirWorker(sourceFile.fileName, options.outDir, host.getCurrentDirectory(), commonDir, host.getCanonicalFileName); + if (comparePaths(sourceFile.fileName, outputPath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0 /* EqualTo */) + return false; + } + return true; } function getSourceFilePathInNewDir(fileName, host, newDirPath) { return getSourceFilePathInNewDirWorker(fileName, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)); @@ -16683,9 +16354,16 @@ ${lanes.join("\n")} return combinePaths(newDirPath, sourceFilePath); } function writeFile(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) { - host.writeFile(fileName, text, writeByteOrderMark, (hostErrorMessage) => { - diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); - }, sourceFiles, data); + host.writeFile( + fileName, + text, + writeByteOrderMark, + (hostErrorMessage) => { + diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); + }, + sourceFiles, + data + ); } function ensureDirectoriesExist(directoryPath, createDirectory, directoryExists) { if (directoryPath.length > getRootLength(directoryPath) && !directoryExists(directoryPath)) { @@ -16940,7 +16618,7 @@ ${lanes.join("\n")} } function writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart) { const end = Math.min(commentEnd, nextLineStart - 1); - const currentLineText = trimString(text.substring(pos, end)); + const currentLineText = text.substring(pos, end).trim(); if (currentLineText) { writer.writeComment(currentLineText); if (end !== commentEnd) { @@ -16977,25 +16655,25 @@ ${lanes.join("\n")} return isClassElement(node) && hasStaticModifier(node) || isClassStaticBlockDeclaration(node); } function hasStaticModifier(node) { - return hasSyntacticModifier(node, 32 /* Static */); + return hasSyntacticModifier(node, 256 /* Static */); } function hasOverrideModifier(node) { - return hasEffectiveModifier(node, 16384 /* Override */); + return hasEffectiveModifier(node, 16 /* Override */); } function hasAbstractModifier(node) { - return hasSyntacticModifier(node, 256 /* Abstract */); + return hasSyntacticModifier(node, 64 /* Abstract */); } function hasAmbientModifier(node) { - return hasSyntacticModifier(node, 2 /* Ambient */); + return hasSyntacticModifier(node, 128 /* Ambient */); } function hasAccessorModifier(node) { - return hasSyntacticModifier(node, 128 /* Accessor */); + return hasSyntacticModifier(node, 512 /* Accessor */); } function hasEffectiveReadonlyModifier(node) { - return hasEffectiveModifier(node, 64 /* Readonly */); + return hasEffectiveModifier(node, 8 /* Readonly */); } function hasDecorators(node) { - return hasSyntacticModifier(node, 131072 /* Decorator */); + return hasSyntacticModifier(node, 32768 /* Decorator */); } function getSelectedEffectiveModifierFlags(node, flags) { return getEffectiveModifierFlags(node) & flags; @@ -17010,10 +16688,13 @@ ${lanes.join("\n")} if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | 536870912 /* HasComputedFlags */; } - if (includeJSDoc && !(node.modifierFlagsCache & 4096 /* HasComputedJSDocModifiers */) && (alwaysIncludeJSDoc || isInJSFile(node)) && node.parent) { - node.modifierFlagsCache |= getJSDocModifierFlagsNoCache(node) | 4096 /* HasComputedJSDocModifiers */; + if (alwaysIncludeJSDoc || includeJSDoc && isInJSFile(node)) { + if (!(node.modifierFlagsCache & 268435456 /* HasComputedJSDocModifiers */) && node.parent) { + node.modifierFlagsCache |= getRawJSDocModifierFlagsNoCache(node) | 268435456 /* HasComputedJSDocModifiers */; + } + return selectEffectiveModifierFlags(node.modifierFlagsCache); } - return node.modifierFlagsCache & ~(536870912 /* HasComputedFlags */ | 4096 /* HasComputedJSDocModifiers */); + return selectSyntacticModifierFlags(node.modifierFlagsCache); } function getEffectiveModifierFlags(node) { return getModifierFlagsWorker( @@ -17038,33 +16719,42 @@ ${lanes.join("\n")} false ); } - function getJSDocModifierFlagsNoCache(node) { + function getRawJSDocModifierFlagsNoCache(node) { let flags = 0 /* None */; if (!!node.parent && !isParameter(node)) { if (isInJSFile(node)) { if (getJSDocPublicTagNoCache(node)) - flags |= 4 /* Public */; + flags |= 8388608 /* JSDocPublic */; if (getJSDocPrivateTagNoCache(node)) - flags |= 8 /* Private */; + flags |= 16777216 /* JSDocPrivate */; if (getJSDocProtectedTagNoCache(node)) - flags |= 16 /* Protected */; + flags |= 33554432 /* JSDocProtected */; if (getJSDocReadonlyTagNoCache(node)) - flags |= 64 /* Readonly */; + flags |= 67108864 /* JSDocReadonly */; if (getJSDocOverrideTagNoCache(node)) - flags |= 16384 /* Override */; + flags |= 134217728 /* JSDocOverride */; } if (getJSDocDeprecatedTagNoCache(node)) - flags |= 8192 /* Deprecated */; + flags |= 65536 /* Deprecated */; } return flags; } + function selectSyntacticModifierFlags(flags) { + return flags & 65535 /* SyntacticModifiers */; + } + function selectEffectiveModifierFlags(flags) { + return flags & 131071 /* NonCacheOnlyModifiers */ | (flags & 260046848 /* JSDocCacheOnlyModifiers */) >>> 23; + } + function getJSDocModifierFlagsNoCache(node) { + return selectEffectiveModifierFlags(getRawJSDocModifierFlagsNoCache(node)); + } function getEffectiveModifierFlagsNoCache(node) { return getSyntacticModifierFlagsNoCache(node) | getJSDocModifierFlagsNoCache(node); } function getSyntacticModifierFlagsNoCache(node) { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { - flags |= 1 /* Export */; + flags |= 32 /* Export */; } return flags; } @@ -17080,37 +16770,37 @@ ${lanes.join("\n")} function modifierToFlag(token) { switch (token) { case 126 /* StaticKeyword */: - return 32 /* Static */; + return 256 /* Static */; case 125 /* PublicKeyword */: - return 4 /* Public */; + return 1 /* Public */; case 124 /* ProtectedKeyword */: - return 16 /* Protected */; + return 4 /* Protected */; case 123 /* PrivateKeyword */: - return 8 /* Private */; + return 2 /* Private */; case 128 /* AbstractKeyword */: - return 256 /* Abstract */; + return 64 /* Abstract */; case 129 /* AccessorKeyword */: - return 128 /* Accessor */; + return 512 /* Accessor */; case 95 /* ExportKeyword */: - return 1 /* Export */; + return 32 /* Export */; case 138 /* DeclareKeyword */: - return 2 /* Ambient */; + return 128 /* Ambient */; case 87 /* ConstKeyword */: - return 2048 /* Const */; + return 4096 /* Const */; case 90 /* DefaultKeyword */: - return 1024 /* Default */; + return 2048 /* Default */; case 134 /* AsyncKeyword */: - return 512 /* Async */; + return 1024 /* Async */; case 148 /* ReadonlyKeyword */: - return 64 /* Readonly */; + return 8 /* Readonly */; case 164 /* OverrideKeyword */: - return 16384 /* Override */; + return 16 /* Override */; case 103 /* InKeyword */: - return 32768 /* In */; + return 8192 /* In */; case 147 /* OutKeyword */: - return 65536 /* Out */; + return 16384 /* Out */; case 170 /* Decorator */: - return 131072 /* Decorator */; + return 32768 /* Decorator */; } return 0 /* None */; } @@ -17223,11 +16913,17 @@ ${lanes.join("\n")} return node.parent.kind === 166 /* QualifiedName */ && node.parent.right === node || node.parent.kind === 211 /* PropertyAccessExpression */ && node.parent.name === node || node.parent.kind === 236 /* MetaProperty */ && node.parent.name === node; } function isRightSideOfAccessExpression(node) { - return isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node; + return !!node.parent && (isPropertyAccessExpression(node.parent) && node.parent.name === node || isElementAccessExpression(node.parent) && node.parent.argumentExpression === node); } function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) { return isQualifiedName(node.parent) && node.parent.right === node || isPropertyAccessExpression(node.parent) && node.parent.name === node || isJSDocMemberName(node.parent) && node.parent.right === node; } + function isInstanceOfExpression(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 104 /* InstanceOfKeyword */; + } + function isRightSideOfInstanceofExpression(node) { + return isInstanceOfExpression(node.parent) && node === node.parent.right; + } function isEmptyObjectLiteral(expression) { return expression.kind === 210 /* ObjectLiteralExpression */ && expression.properties.length === 0; } @@ -17244,7 +16940,7 @@ ${lanes.join("\n")} return void 0; } function isExportDefaultSymbol(symbol) { - return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 1024 /* Default */); + return symbol && length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 2048 /* Default */); } function tryExtractTSExtension(fileName) { return find(supportedTSExtensionsForExtractExtension, (extension) => fileExtensionIs(fileName, extension)); @@ -17524,16 +17220,16 @@ ${lanes.join("\n")} if (s.valueDeclaration) { const declaration = isWrite && s.declarations && find(s.declarations, isSetAccessorDeclaration) || s.flags & 32768 /* GetAccessor */ && find(s.declarations, isGetAccessorDeclaration) || s.valueDeclaration; const flags = getCombinedModifierFlags(declaration); - return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~28 /* AccessibilityModifier */; + return s.parent && s.parent.flags & 32 /* Class */ ? flags : flags & ~7 /* AccessibilityModifier */; } if (getCheckFlags(s) & 6 /* Synthetic */) { const checkFlags = s.links.checkFlags; - const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 8 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 4 /* Public */ : 16 /* Protected */; - const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 32 /* Static */ : 0; + const accessModifier = checkFlags & 1024 /* ContainsPrivate */ ? 2 /* Private */ : checkFlags & 256 /* ContainsPublic */ ? 1 /* Public */ : 4 /* Protected */; + const staticModifier = checkFlags & 2048 /* ContainsStatic */ ? 256 /* Static */ : 0; return accessModifier | staticModifier; } if (s.flags & 4194304 /* Prototype */) { - return 4 /* Public */ | 32 /* Static */; + return 1 /* Public */ | 256 /* Static */; } return 0; } @@ -17632,7 +17328,7 @@ ${lanes.join("\n")} function isAbstractConstructorSymbol(symbol) { if (symbol.flags & 32 /* Class */) { const declaration = getClassLikeDeclarationOfSymbol(symbol); - return !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */); + return !!declaration && hasSyntacticModifier(declaration, 64 /* Abstract */); } return false; } @@ -17641,7 +17337,7 @@ ${lanes.join("\n")} return (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike); } function getObjectFlags(type) { - return type.flags & 138117121 /* ObjectFlagsType */ ? type.objectFlags : 0; + return type.flags & 3899393 /* ObjectFlagsType */ ? type.objectFlags : 0; } function forSomeAncestorDirectory(directory, callback) { return !!forEachAncestorDirectory(directory, (d) => callback(d) ? true : void 0); @@ -17654,21 +17350,17 @@ ${lanes.join("\n")} } function getLastChild(node) { let lastChild; - forEachChild( - node, - (child) => { - if (nodeIsPresent(child)) - lastChild = child; - }, - (children) => { - for (let i = children.length - 1; i >= 0; i--) { - if (nodeIsPresent(children[i])) { - lastChild = children[i]; - break; - } + forEachChild(node, (child) => { + if (nodeIsPresent(child)) + lastChild = child; + }, (children) => { + for (let i = children.length - 1; i >= 0; i--) { + if (nodeIsPresent(children[i])) { + lastChild = children[i]; + break; } } - ); + }); return lastChild; } function addToSeen(seen, key, value = true) { @@ -17846,8 +17538,8 @@ ${lanes.join("\n")} Object.assign(objectAllocator, alloc); forEach(objectAllocatorPatchers, (fn) => fn(objectAllocator)); } - function formatStringFromArgs(text, args, baseIndex = 0) { - return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex])); + function formatStringFromArgs(text, args) { + return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index])); } function setLocalizedDiagnosticMessages(messages) { localizedDiagnosticMessages = messages; @@ -17860,16 +17552,14 @@ ${lanes.join("\n")} function getLocaleSpecificMessage(message) { return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message; } - function createDetachedDiagnostic(fileName, start, length2, message) { - assertDiagnosticLocation( - /*file*/ - void 0, - start, - length2 - ); + function createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args) { + if (start + length2 > sourceText.length) { + length2 = sourceText.length - start; + } + assertDiagnosticLocation(sourceText, start, length2); let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file: void 0, @@ -17921,11 +17611,11 @@ ${lanes.join("\n")} } return diagnosticsWithLocation; } - function createFileDiagnostic(file, start, length2, message) { - assertDiagnosticLocation(file, start, length2); + function createFileDiagnostic(file, start, length2, message, ...args) { + assertDiagnosticLocation(file.text, start, length2); let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file, @@ -17938,17 +17628,17 @@ ${lanes.join("\n")} reportsDeprecated: message.reportsDeprecated }; } - function formatMessage(_dummy, message) { + function formatMessage(message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); + if (some(args)) { + text = formatStringFromArgs(text, args); } return text; } - function createCompilerDiagnostic(message) { + function createCompilerDiagnostic(message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 1) { - text = formatStringFromArgs(text, arguments, 1); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file: void 0, @@ -17972,10 +17662,10 @@ ${lanes.join("\n")} relatedInformation }; } - function chainDiagnosticMessages(details, message) { + function chainDiagnosticMessages(details, message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { messageText: text, @@ -18236,7 +17926,7 @@ ${lanes.join("\n")} return optionsHaveChanges(oldOptions, newOptions, affectsDeclarationPathOptionDeclarations); } function getCompilerOptionValue(options, option) { - return option.strictFlag ? getStrictOptionValue(options, option.name) : options[option.name]; + return option.strictFlag ? getStrictOptionValue(options, option.name) : option.allowJsFlag ? getAllowJSCompilerOption(options) : options[option.name]; } function getJSXTransformEnabled(options) { const jsx = options.jsx; @@ -18278,19 +17968,16 @@ ${lanes.join("\n")} if (!containsIgnoredPath(symlinkPath)) { symlinkPath = ensureTrailingDirectorySeparator(symlinkPath); if (real !== false && !(symlinkedDirectories == null ? void 0 : symlinkedDirectories.has(symlinkPath))) { - (symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(ensureTrailingDirectorySeparator(real.realPath), symlink); + (symlinkedDirectoriesByRealpath || (symlinkedDirectoriesByRealpath = createMultiMap())).add(real.realPath, symlink); } (symlinkedDirectories || (symlinkedDirectories = /* @__PURE__ */ new Map())).set(symlinkPath, real); } }, - setSymlinksFromResolutions(files, typeReferenceDirectives) { - var _a, _b; + setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, typeReferenceDirectives) { Debug.assert(!hasProcessedResolutions); hasProcessedResolutions = true; - for (const file of files) { - (_a = file.resolvedModules) == null ? void 0 : _a.forEach((resolution) => processResolution(this, resolution.resolvedModule)); - (_b = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _b.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); - } + forEachResolvedModule((resolution) => processResolution(this, resolution.resolvedModule)); + forEachResolvedTypeReferenceDirective((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); typeReferenceDirectives.forEach((resolution) => processResolution(this, resolution.resolvedTypeReferenceDirective)); }, hasProcessedResolutions: () => hasProcessedResolutions @@ -18304,7 +17991,10 @@ ${lanes.join("\n")} if (commonResolved && commonOriginal) { cache.setSymlinkedDirectory( commonOriginal, - { real: commonResolved, realPath: toPath(commonResolved, cwd, getCanonicalFileName) } + { + real: ensureTrailingDirectorySeparator(commonResolved), + realPath: ensureTrailingDirectorySeparator(toPath(commonResolved, cwd, getCanonicalFileName)) + } ); } } @@ -18534,7 +18224,7 @@ ${lanes.join("\n")} const flatBuiltins = flatten(builtins); const extensions = [ ...builtins, - ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension) === -1 ? [x.extension] : void 0) + ...mapDefined(extraFileExtensions, (x) => x.scriptKind === 7 /* Deferred */ || needJsExtensions && isJSLike(x.scriptKind) && !flatBuiltins.includes(x.extension) ? [x.extension] : void 0) ]; return extensions; } @@ -18858,7 +18548,7 @@ ${lanes.join("\n")} if (node.kind !== 167 /* ComputedPropertyName */) { return false; } - if (hasSyntacticModifier(node.parent, 256 /* Abstract */)) { + if (hasSyntacticModifier(node.parent, 64 /* Abstract */)) { return true; } const containerKind = node.parent.parent.kind; @@ -18984,7 +18674,7 @@ ${lanes.join("\n")} } } function containsIgnoredPath(path) { - return some(ignoredPaths, (p) => stringContains(path, p)); + return some(ignoredPaths, (p) => path.includes(p)); } function getContainingNodeArray(node) { if (!node.parent) @@ -19084,8 +18774,9 @@ ${lanes.join("\n")} function isNumericLiteralName(name) { return (+name).toString() === name; } - function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed) { - return isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote); + function createPropertyNameNodeForIdentifierOrLiteral(name, target, singleQuote, stringNamed, isMethod) { + const isMethodNamedNew = isMethod && name === "new"; + return !isMethodNamedNew && isIdentifierText(name, target) ? factory.createIdentifier(name) : !stringNamed && !isMethodNamedNew && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote); } function isThisTypeParameter(type) { return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType); @@ -19245,7 +18936,16 @@ ${lanes.join("\n")} } return Debug.fail(); } - var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries; + function isExpandoPropertyDeclaration(declaration) { + return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration)); + } + function hasResolutionModeOverride(node) { + if (node === void 0) { + return false; + } + return !!getResolutionModeOverride(node.attributes); + } + var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, getScriptTargetFeatures, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries; var init_utilities = __esm({ "src/compiler/utilities.ts"() { "use strict"; @@ -19255,6 +18955,402 @@ ${lanes.join("\n")} defaultMaximumTruncationLength = 160; noTruncationMaximumTruncationLength = 1e6; stringWriter = createSingleLineStringWriter(); + getScriptTargetFeatures = /* @__PURE__ */ memoize( + () => new Map(Object.entries({ + Array: new Map(Object.entries({ + es2015: [ + "find", + "findIndex", + "fill", + "copyWithin", + "entries", + "keys", + "values" + ], + es2016: [ + "includes" + ], + es2019: [ + "flat", + "flatMap" + ], + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Iterator: new Map(Object.entries({ + es2015: emptyArray + })), + AsyncIterator: new Map(Object.entries({ + es2015: emptyArray + })), + Atomics: new Map(Object.entries({ + es2017: emptyArray + })), + SharedArrayBuffer: new Map(Object.entries({ + es2017: emptyArray + })), + AsyncIterable: new Map(Object.entries({ + es2018: emptyArray + })), + AsyncIterableIterator: new Map(Object.entries({ + es2018: emptyArray + })), + AsyncGenerator: new Map(Object.entries({ + es2018: emptyArray + })), + AsyncGeneratorFunction: new Map(Object.entries({ + es2018: emptyArray + })), + RegExp: new Map(Object.entries({ + es2015: [ + "flags", + "sticky", + "unicode" + ], + es2018: [ + "dotAll" + ] + })), + Reflect: new Map(Object.entries({ + es2015: [ + "apply", + "construct", + "defineProperty", + "deleteProperty", + "get", + "getOwnPropertyDescriptor", + "getPrototypeOf", + "has", + "isExtensible", + "ownKeys", + "preventExtensions", + "set", + "setPrototypeOf" + ] + })), + ArrayConstructor: new Map(Object.entries({ + es2015: [ + "from", + "of" + ] + })), + ObjectConstructor: new Map(Object.entries({ + es2015: [ + "assign", + "getOwnPropertySymbols", + "keys", + "is", + "setPrototypeOf" + ], + es2017: [ + "values", + "entries", + "getOwnPropertyDescriptors" + ], + es2019: [ + "fromEntries" + ], + es2022: [ + "hasOwn" + ] + })), + NumberConstructor: new Map(Object.entries({ + es2015: [ + "isFinite", + "isInteger", + "isNaN", + "isSafeInteger", + "parseFloat", + "parseInt" + ] + })), + Math: new Map(Object.entries({ + es2015: [ + "clz32", + "imul", + "sign", + "log10", + "log2", + "log1p", + "expm1", + "cosh", + "sinh", + "tanh", + "acosh", + "asinh", + "atanh", + "hypot", + "trunc", + "fround", + "cbrt" + ] + })), + Map: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + Set: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + PromiseConstructor: new Map(Object.entries({ + es2015: [ + "all", + "race", + "reject", + "resolve" + ], + es2020: [ + "allSettled" + ], + es2021: [ + "any" + ] + })), + Symbol: new Map(Object.entries({ + es2015: [ + "for", + "keyFor" + ], + es2019: [ + "description" + ] + })), + WeakMap: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + WeakSet: new Map(Object.entries({ + es2015: [ + "entries", + "keys", + "values" + ] + })), + String: new Map(Object.entries({ + es2015: [ + "codePointAt", + "includes", + "endsWith", + "normalize", + "repeat", + "startsWith", + "anchor", + "big", + "blink", + "bold", + "fixed", + "fontcolor", + "fontsize", + "italics", + "link", + "small", + "strike", + "sub", + "sup" + ], + es2017: [ + "padStart", + "padEnd" + ], + es2019: [ + "trimStart", + "trimEnd", + "trimLeft", + "trimRight" + ], + es2020: [ + "matchAll" + ], + es2021: [ + "replaceAll" + ], + es2022: [ + "at" + ] + })), + StringConstructor: new Map(Object.entries({ + es2015: [ + "fromCodePoint", + "raw" + ] + })), + DateTimeFormat: new Map(Object.entries({ + es2017: [ + "formatToParts" + ] + })), + Promise: new Map(Object.entries({ + es2015: emptyArray, + es2018: [ + "finally" + ] + })), + RegExpMatchArray: new Map(Object.entries({ + es2018: [ + "groups" + ] + })), + RegExpExecArray: new Map(Object.entries({ + es2018: [ + "groups" + ] + })), + Intl: new Map(Object.entries({ + es2018: [ + "PluralRules" + ] + })), + NumberFormat: new Map(Object.entries({ + es2018: [ + "formatToParts" + ] + })), + SymbolConstructor: new Map(Object.entries({ + es2020: [ + "matchAll" + ] + })), + DataView: new Map(Object.entries({ + es2020: [ + "setBigInt64", + "setBigUint64", + "getBigInt64", + "getBigUint64" + ] + })), + BigInt: new Map(Object.entries({ + es2020: emptyArray + })), + RelativeTimeFormat: new Map(Object.entries({ + es2020: [ + "format", + "formatToParts", + "resolvedOptions" + ] + })), + Int8Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Uint8Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Uint8ClampedArray: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Int16Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Uint16Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Int32Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Uint32Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Float32Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Float64Array: new Map(Object.entries({ + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + BigInt64Array: new Map(Object.entries({ + es2020: emptyArray, + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + BigUint64Array: new Map(Object.entries({ + es2020: emptyArray, + es2022: [ + "at" + ], + es2023: [ + "findLastIndex", + "findLast" + ] + })), + Error: new Map(Object.entries({ + es2022: [ + "cause" + ] + })) + })) + ); GetLiteralTextFlags = /* @__PURE__ */ ((GetLiteralTextFlags2) => { GetLiteralTextFlags2[GetLiteralTextFlags2["None"] = 0] = "None"; GetLiteralTextFlags2[GetLiteralTextFlags2["NeverAsciiEscape"] = 1] = "NeverAsciiEscape"; @@ -20318,6 +20414,10 @@ ${lanes.join("\n")} updateAssertEntry, createImportTypeAssertionContainer, updateImportTypeAssertionContainer, + createImportAttributes, + updateImportAttributes, + createImportAttribute, + updateImportAttribute, createNamespaceImport, updateNamespaceImport, createNamespaceExport, @@ -20694,8 +20794,9 @@ ${lanes.join("\n")} ensureUseStrict, liftToBlock, mergeLexicalEnvironment, - updateModifiers, - updateModifierLike + replaceModifiers, + replaceDecoratorsAndModifiers, + replacePropertyName }; forEach(nodeFactoryPatchers, (fn) => fn(factory2)); return factory2; @@ -21028,35 +21129,35 @@ ${lanes.join("\n")} } function createModifiersFromModifierFlags(flags2) { const result = []; - if (flags2 & 1 /* Export */) + if (flags2 & 32 /* Export */) result.push(createModifier(95 /* ExportKeyword */)); - if (flags2 & 2 /* Ambient */) + if (flags2 & 128 /* Ambient */) result.push(createModifier(138 /* DeclareKeyword */)); - if (flags2 & 1024 /* Default */) + if (flags2 & 2048 /* Default */) result.push(createModifier(90 /* DefaultKeyword */)); - if (flags2 & 2048 /* Const */) + if (flags2 & 4096 /* Const */) result.push(createModifier(87 /* ConstKeyword */)); - if (flags2 & 4 /* Public */) + if (flags2 & 1 /* Public */) result.push(createModifier(125 /* PublicKeyword */)); - if (flags2 & 8 /* Private */) + if (flags2 & 2 /* Private */) result.push(createModifier(123 /* PrivateKeyword */)); - if (flags2 & 16 /* Protected */) + if (flags2 & 4 /* Protected */) result.push(createModifier(124 /* ProtectedKeyword */)); - if (flags2 & 256 /* Abstract */) + if (flags2 & 64 /* Abstract */) result.push(createModifier(128 /* AbstractKeyword */)); - if (flags2 & 32 /* Static */) + if (flags2 & 256 /* Static */) result.push(createModifier(126 /* StaticKeyword */)); - if (flags2 & 16384 /* Override */) + if (flags2 & 16 /* Override */) result.push(createModifier(164 /* OverrideKeyword */)); - if (flags2 & 64 /* Readonly */) + if (flags2 & 8 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */)); - if (flags2 & 128 /* Accessor */) + if (flags2 & 512 /* Accessor */) result.push(createModifier(129 /* AccessorKeyword */)); - if (flags2 & 512 /* Async */) + if (flags2 & 1024 /* Async */) result.push(createModifier(134 /* AsyncKeyword */)); - if (flags2 & 32768 /* In */) + if (flags2 & 8192 /* In */) result.push(createModifier(103 /* InKeyword */)); - if (flags2 & 65536 /* Out */) + if (flags2 & 16384 /* Out */) result.push(createModifier(147 /* OutKeyword */)); return result.length ? result : void 0; } @@ -21105,7 +21206,7 @@ ${lanes.join("\n")} if (isThisIdentifier(node.name)) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */); + node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 31 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */); } node.jsDoc = void 0; return node; @@ -21154,8 +21255,8 @@ ${lanes.join("\n")} node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.type = type; node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; + const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 128 /* Ambient */; + node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 256 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; node.jsDoc = void 0; return node; } @@ -21194,7 +21295,7 @@ ${lanes.join("\n")} if (!node.body) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; @@ -21584,18 +21685,21 @@ ${lanes.join("\n")} function updateTemplateLiteralType(node, head, templateSpans) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } - function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { + function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) { const node = createBaseNode(205 /* ImportType */); node.argument = argument; - node.assertions = assertions; + node.attributes = attributes; + if (node.assertions && node.assertions.assertClause && node.attributes) { + node.assertions.assertClause = node.attributes; + } node.qualifier = qualifier; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.isTypeOf = isTypeOf; node.transformFlags = 1 /* ContainsTypeScript */; return node; } - function updateImportTypeNode(node, argument, assertions, qualifier, typeArguments, isTypeOf = node.isTypeOf) { - return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; + function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) { + return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { const node = createBaseNode(196 /* ParenthesizedType */); @@ -21934,7 +22038,7 @@ ${lanes.join("\n")} node.parameters = createNodeArray(parameters); node.type = type; node.body = body; - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -21958,7 +22062,7 @@ ${lanes.join("\n")} node.type = type; node.equalsGreaterThanToken = equalsGreaterThanToken ?? createToken(39 /* EqualsGreaterThanToken */); node.body = parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body); - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */; node.typeArguments = void 0; node.jsDoc = void 0; @@ -22310,7 +22414,7 @@ ${lanes.join("\n")} node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } node.jsDoc = void 0; @@ -22560,10 +22664,10 @@ ${lanes.join("\n")} node.parameters = createNodeArray(parameters); node.type = type; node.body = body; - if (!node.body || modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (!node.body || modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -22594,7 +22698,7 @@ ${lanes.join("\n")} node.typeParameters = asNodeArray(typeParameters); node.heritageClauses = asNodeArray(heritageClauses); node.members = createNodeArray(members); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; @@ -22656,7 +22760,7 @@ ${lanes.join("\n")} node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; node.body = body; - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */; @@ -22725,19 +22829,19 @@ ${lanes.join("\n")} function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) { return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } - function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { + function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) { const node = createBaseNode(272 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; + node.attributes = node.assertClause = attributes; node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; node.jsDoc = void 0; return node; } - function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; + function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { const node = createBaseDeclaration(273 /* ImportClause */); @@ -22758,6 +22862,7 @@ ${lanes.join("\n")} const node = createBaseNode(300 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; + node.token = 132 /* AssertKeyword */; node.transformFlags |= 4 /* ContainsESNext */; return node; } @@ -22783,6 +22888,27 @@ ${lanes.join("\n")} function updateImportTypeAssertionContainer(node, clause, multiLine) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } + function createImportAttributes(elements, multiLine, token) { + const node = createBaseNode(300 /* ImportAttributes */); + node.token = token ?? 118 /* WithKeyword */; + node.elements = createNodeArray(elements); + node.multiLine = multiLine; + node.transformFlags |= 4 /* ContainsESNext */; + return node; + } + function updateImportAttributes(node, elements, multiLine) { + return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node; + } + function createImportAttribute(name, value) { + const node = createBaseNode(301 /* ImportAttribute */); + node.name = name; + node.value = value; + node.transformFlags |= 4 /* ContainsESNext */; + return node; + } + function updateImportAttribute(node, name, value) { + return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node; + } function createNamespaceImport(name) { const node = createBaseDeclaration(274 /* NamespaceImport */); node.name = name; @@ -22843,20 +22969,20 @@ ${lanes.join("\n")} function updateExportAssignment(node, modifiers, expression) { return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment2(modifiers, node.isExportEquals, expression), node) : node; } - function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { + function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { const node = createBaseDeclaration(278 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; + node.attributes = node.assertClause = attributes; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; node.jsDoc = void 0; return node; } - function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause), node) : node; + function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes), node) : node; } function finishUpdateExportDeclaration(updated, original) { if (updated !== original) { @@ -23454,7 +23580,6 @@ ${lanes.join("\n")} node.imports = void 0; node.moduleAugmentations = void 0; node.ambientModuleNames = void 0; - node.resolvedModules = void 0; node.classifiableNames = void 0; node.impliedNodeFormat = void 0; return node; @@ -24066,7 +24191,7 @@ ${lanes.join("\n")} return qualifiedName; } function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) { - if (ns && hasSyntacticModifier(node, 1 /* Export */)) { + if (ns && hasSyntacticModifier(node, 32 /* Export */)) { return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps); } return getExportName(node, allowComments, allowSourceMaps); @@ -24177,18 +24302,36 @@ ${lanes.join("\n")} } return statements; } - function updateModifiers(node, modifiers) { + function replaceModifiers(node, modifiers) { let modifierArray; if (typeof modifiers === "number") { modifierArray = createModifiersFromModifierFlags(modifiers); } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.attributes) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.attributes) : Debug.assertNever(node); } - function updateModifierLike(node, modifierArray) { + function replaceDecoratorsAndModifiers(node, modifierArray) { return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration2(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); } + function replacePropertyName(node, name) { + switch (node.kind) { + case 177 /* GetAccessor */: + return updateGetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.type, node.body); + case 178 /* SetAccessor */: + return updateSetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.body); + case 174 /* MethodDeclaration */: + return updateMethodDeclaration(node, node.modifiers, node.asteriskToken, name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body); + case 173 /* MethodSignature */: + return updateMethodSignature(node, node.modifiers, name, node.questionToken, node.typeParameters, node.parameters, node.type); + case 172 /* PropertyDeclaration */: + return updatePropertyDeclaration2(node, node.modifiers, name, node.questionToken ?? node.exclamationToken, node.type, node.initializer); + case 171 /* PropertySignature */: + return updatePropertySignature(node, node.modifiers, name, node.questionToken, node.type); + case 303 /* PropertyAssignment */: + return updatePropertyAssignment(node, name, node.initializer); + } + } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; } @@ -25734,17 +25877,18 @@ ${lanes.join("\n")} scoped: false, dependencies: [awaitHelper], text: ` - var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; - 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); }); }; } - function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } - function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } - function fulfill(value) { resume("next", value); } - function reject(value) { resume("throw", value); } - function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } - };` + var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; + function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } + function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } + };` }; asyncDelegator = { name: "typescript:asyncDelegator", @@ -26560,6 +26704,12 @@ ${lanes.join("\n")} function isAssertEntry(node) { return node.kind === 301 /* AssertEntry */; } + function isImportAttributes(node) { + return node.kind === 300 /* ImportAttributes */; + } + function isImportAttribute(node) { + return node.kind === 301 /* ImportAttribute */; + } function isNamespaceImport(node) { return node.kind === 274 /* NamespaceImport */; } @@ -27251,21 +27401,18 @@ ${lanes.join("\n")} if (some(helperNames)) { helperNames.sort(compareStringsCaseSensitive); namedBindings = nodeFactory.createNamedImports( - map( - helperNames, - (name) => isFileLevelUniqueName(sourceFile, name) ? nodeFactory.createImportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ - void 0, - nodeFactory.createIdentifier(name) - ) : nodeFactory.createImportSpecifier( - /*isTypeOnly*/ - false, - nodeFactory.createIdentifier(name), - helperFactory.getUnscopedHelperName(name) - ) - ) + map(helperNames, (name) => isFileLevelUniqueName(sourceFile, name) ? nodeFactory.createImportSpecifier( + /*isTypeOnly*/ + false, + /*propertyName*/ + void 0, + nodeFactory.createIdentifier(name) + ) : nodeFactory.createImportSpecifier( + /*isTypeOnly*/ + false, + nodeFactory.createIdentifier(name), + helperFactory.getUnscopedHelperName(name) + )) ); const parseNode = getOriginalNode(sourceFile, isSourceFile); const emitNode = getOrCreateEmitNode(parseNode); @@ -27290,7 +27437,7 @@ ${lanes.join("\n")} namedBindings ), nodeFactory.createStringLiteral(externalHelpersModuleNameText), - /*assertClause*/ + /*attributes*/ void 0 ); addInternalEmitFlags(externalHelpersImportDeclaration, 2 /* NeverApplyImportHelper */); @@ -28082,7 +28229,8 @@ ${lanes.join("\n")} const { languageVersion, setExternalModuleIndicator: overrideSetExternalModuleIndicator, - impliedNodeFormat: format + impliedNodeFormat: format, + jsDocParsingMode } = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { languageVersion: languageVersionOrOptions }; if (languageVersion === 100 /* JSON */) { result = Parser.parseSourceFile( @@ -28093,7 +28241,8 @@ ${lanes.join("\n")} void 0, setParentNodes, 6 /* JSON */, - noop + noop, + jsDocParsingMode ); } else { const setIndicator = format === void 0 ? overrideSetExternalModuleIndicator : (file) => { @@ -28108,7 +28257,8 @@ ${lanes.join("\n")} void 0, setParentNodes, scriptKind, - setIndicator + setIndicator, + jsDocParsingMode ); } (_c = perfLogger) == null ? void 0 : _c.logStopParseSourceFile(); @@ -28142,7 +28292,7 @@ ${lanes.join("\n")} return Parser.JSDocParser.parseJSDocTypeExpressionForTests(content, start, length2); } function isDeclarationFileName(fileName) { - return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && stringContains(getBaseFileName(fileName), ".d."); + return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d."); } function parseResolutionMode(mode, pos, end, reportDiagnostic) { if (!mode) { @@ -28325,7 +28475,7 @@ ${lanes.join("\n")} return {}; if (!pragma.args) return {}; - const args = trimString(text).split(/\s+/); + const args = text.trim().split(/\s+/); const argMap = {}; for (let i = 0; i < pragma.args.length; i++) { const argument = pragma.args[i]; @@ -28464,7 +28614,7 @@ ${lanes.join("\n")} return visitNode2(cbNode, node.typeParameter); }, [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); + return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); @@ -28638,15 +28788,15 @@ ${lanes.join("\n")} return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { @@ -28661,7 +28811,7 @@ ${lanes.join("\n")} [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, @@ -28892,7 +29042,7 @@ ${lanes.join("\n")} var contextFlags; var topLevel = true; var parseErrorBeforeNextFinishedNode = false; - function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride) { + function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) { var _a; scriptKind2 = ensureScriptKind(fileName2, scriptKind2); if (scriptKind2 === 6 /* JSON */) { @@ -28914,8 +29064,8 @@ ${lanes.join("\n")} result2.pragmas = emptyMap; return result2; } - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2); - const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator); + initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode); + const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode); clearState(); return result; } @@ -28927,20 +29077,21 @@ ${lanes.join("\n")} languageVersion2, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); nextToken(); const entityName = parseEntityName( /*allowReservedWords*/ true ); - const isInvalid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length; + const isValid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length; clearState(); - return isInvalid ? entityName : void 0; + return isValid ? entityName : void 0; } Parser2.parseIsolatedEntityName = parseIsolatedEntityName2; function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) { - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */); + initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */); sourceFlags = contextFlags; nextToken(); const pos = getNodePos(); @@ -29021,7 +29172,7 @@ ${lanes.join("\n")} return result; } Parser2.parseJsonText = parseJsonText2; - function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind) { + function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) { NodeConstructor2 = objectAllocator.getNodeConstructor(); TokenConstructor2 = objectAllocator.getTokenConstructor(); IdentifierConstructor2 = objectAllocator.getIdentifierConstructor(); @@ -29057,11 +29208,15 @@ ${lanes.join("\n")} scanner2.setOnError(scanError); scanner2.setScriptTarget(languageVersion); scanner2.setLanguageVariant(languageVariant); + scanner2.setScriptKind(scriptKind); + scanner2.setJSDocParsingMode(_jsDocParsingMode); } function clearState() { scanner2.clearCommentDirectives(); scanner2.setText(""); scanner2.setOnError(void 0); + scanner2.setScriptKind(0 /* Unknown */); + scanner2.setJSDocParsingMode(0 /* ParseAll */); sourceText = void 0; languageVersion = void 0; syntaxCursor = void 0; @@ -29075,7 +29230,7 @@ ${lanes.join("\n")} notParenthesizedArrow = void 0; topLevel = true; } - function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { + function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) { const isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { contextFlags |= 33554432 /* Ambient */; @@ -29094,6 +29249,7 @@ ${lanes.join("\n")} sourceFile.identifierCount = identifierCount; sourceFile.identifiers = identifiers; sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); + sourceFile.jsDocParsingMode = jsDocParsingMode; if (jsDocDiagnostics) { sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile); } @@ -29102,7 +29258,7 @@ ${lanes.join("\n")} } return sourceFile; function reportPragmaDiagnostic(pos, end, diagnostic) { - parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); + parseDiagnostics.push(createDetachedDiagnostic(fileName, sourceText, pos, end, diagnostic)); } } let hasDeprecatedTag = false; @@ -29342,7 +29498,7 @@ ${lanes.join("\n")} const lastError = lastOrUndefined(parseDiagnostics); let result; if (!lastError || start !== lastError.start) { - result = createDetachedDiagnostic(fileName, start, length2, message, ...args); + result = createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args); parseDiagnostics.push(result); } parseErrorBeforeNextFinishedNode = true; @@ -29570,7 +29726,7 @@ ${lanes.join("\n")} if (lastError) { addRelatedInfo( lastError, - createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) + createDetachedDiagnostic(fileName, sourceText, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) ); } } @@ -29740,10 +29896,16 @@ ${lanes.join("\n")} function parseIdentifierName(diagnosticMessage) { return createIdentifier(tokenIsIdentifierOrKeyword(token()), diagnosticMessage); } + function parseIdentifierNameErrorOnUnicodeEscapeSequence() { + if (scanner2.hasUnicodeEscape() || scanner2.hasExtendedUnicodeEscape()) { + parseErrorAtCurrentToken(Diagnostics.Unicode_escape_sequence_cannot_appear_here); + } + return createIdentifier(tokenIsIdentifierOrKeyword(token())); + } function isLiteralPropertyName() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */; } - function isAssertionKey2() { + function isImportAttributeName2() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */; } function parsePropertyNameWorker(allowComputedPropertyNames) { @@ -29862,8 +30024,8 @@ ${lanes.join("\n")} return isLiteralPropertyName(); case 9 /* ObjectBindingElements */: return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName(); - case 24 /* AssertEntries */: - return isAssertionKey2(); + case 24 /* ImportAttributes */: + return isImportAttributeName2(); case 7 /* HeritageClauseElement */: if (token() === 19 /* OpenBraceToken */) { return lookAhead(isValidHeritageClauseObjectLiteral); @@ -29966,7 +30128,7 @@ ${lanes.join("\n")} case 12 /* ObjectLiteralMembers */: case 9 /* ObjectBindingElements */: case 23 /* ImportOrExportSpecifiers */: - case 24 /* AssertEntries */: + case 24 /* ImportAttributes */: return token() === 20 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */; @@ -30272,7 +30434,7 @@ ${lanes.join("\n")} return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 14 /* JsxChildren */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); - case 24 /* AssertEntries */: + case 24 /* ImportAttributes */: return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected); case 25 /* JSDocComment */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); @@ -30366,7 +30528,9 @@ ${lanes.join("\n")} parseRightSideOfDot( allowReservedWords, /*allowPrivateIdentifiers*/ - false + false, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + true ) ), pos @@ -30377,7 +30541,7 @@ ${lanes.join("\n")} function createQualifiedName(entity, name) { return finishNode(factory2.createQualifiedName(entity, name), entity.pos); } - function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers) { + function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers, allowUnicodeEscapeSequenceInIdentifierName) { if (scanner2.hasPrecedingLineBreak() && tokenIsIdentifierOrKeyword(token())) { const matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); if (matchesPattern) { @@ -30398,7 +30562,10 @@ ${lanes.join("\n")} Diagnostics.Identifier_expected ); } - return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); + if (allowIdentifierNames) { + return allowUnicodeEscapeSequenceInIdentifierName ? parseIdentifierName() : parseIdentifierNameErrorOnUnicodeEscapeSequence(); + } + return parseIdentifier(); } function parseTemplateSpans(isTaggedTemplate) { const pos = getNodePos(); @@ -31142,28 +31309,6 @@ ${lanes.join("\n")} nextToken(); return token() === 102 /* ImportKeyword */; } - function parseImportTypeAssertions() { - const pos = getNodePos(); - const openBracePosition = scanner2.getTokenStart(); - parseExpected(19 /* OpenBraceToken */); - const multiLine = scanner2.hasPrecedingLineBreak(); - parseExpected(132 /* AssertKeyword */); - parseExpected(59 /* ColonToken */); - const clause = parseAssertClause( - /*skipAssertKeyword*/ - true - ); - if (!parseExpected(20 /* CloseBraceToken */)) { - const lastError = lastOrUndefined(parseDiagnostics); - if (lastError && lastError.code === Diagnostics._0_expected.code) { - addRelatedInfo( - lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") - ); - } - } - return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); - } function parseImportType() { sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); @@ -31171,14 +31316,36 @@ ${lanes.join("\n")} parseExpected(102 /* ImportKeyword */); parseExpected(21 /* OpenParenToken */); const type = parseType(); - let assertions; + let attributes; if (parseOptional(28 /* CommaToken */)) { - assertions = parseImportTypeAssertions(); + const openBracePosition = scanner2.getTokenStart(); + parseExpected(19 /* OpenBraceToken */); + const currentToken2 = token(); + if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) { + nextToken(); + } else { + parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */)); + } + parseExpected(59 /* ColonToken */); + attributes = parseImportAttributes( + currentToken2, + /*skipKeyword*/ + true + ); + if (!parseExpected(20 /* CloseBraceToken */)) { + const lastError = lastOrUndefined(parseDiagnostics); + if (lastError && lastError.code === Diagnostics._0_expected.code) { + addRelatedInfo( + lastError, + createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + ); + } + } } parseExpected(22 /* CloseParenToken */); const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0; const typeArguments = parseTypeArgumentsOfTypeReference(); - return finishNode(factory2.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos); + return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos); } function nextTokenIsNumericOrBigIntLiteral() { nextToken(); @@ -32173,6 +32340,8 @@ ${lanes.join("\n")} /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + true, + /*allowUnicodeEscapeSequenceInIdentifierName*/ true )), pos); } @@ -32340,6 +32509,8 @@ ${lanes.join("\n")} /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + false, + /*allowUnicodeEscapeSequenceInIdentifierName*/ false )), pos); } @@ -32349,10 +32520,10 @@ ${lanes.join("\n")} const pos = getNodePos(); scanJsxIdentifier(); const isThis2 = token() === 110 /* ThisKeyword */; - const tagName = parseIdentifierName(); + const tagName = parseIdentifierNameErrorOnUnicodeEscapeSequence(); if (parseOptional(59 /* ColonToken */)) { scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierName()), pos); + return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos); } return isThis2 ? finishNode(factory2.createToken(110 /* ThisKeyword */), pos) : tagName; } @@ -32364,7 +32535,9 @@ ${lanes.join("\n")} let dotDotDotToken; let expression; if (token() !== 20 /* CloseBraceToken */) { - dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); + if (!inExpressionContext) { + dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); + } expression = parseExpression(); } if (inExpressionContext) { @@ -32413,10 +32586,10 @@ ${lanes.join("\n")} function parseJsxAttributeName() { const pos = getNodePos(); scanJsxIdentifier(); - const attrName = parseIdentifierName(); + const attrName = parseIdentifierNameErrorOnUnicodeEscapeSequence(); if (parseOptional(59 /* ColonToken */)) { scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierName()), pos); + return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos); } return attrName; } @@ -32504,6 +32677,8 @@ ${lanes.join("\n")} /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + true, + /*allowUnicodeEscapeSequenceInIdentifierName*/ true ); const isOptionalChain2 = questionDotToken || tryReparseOptionalChain(expression); @@ -32988,7 +33163,8 @@ ${lanes.join("\n")} parseExpected(21 /* OpenParenToken */); let initializer; if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { + if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || // this one is meant to allow of + token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine)) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -33309,12 +33485,6 @@ ${lanes.join("\n")} function isUsingDeclaration() { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); } - function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { - return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( - /*disallowOf*/ - true - ); - } function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { if (nextToken() === 160 /* UsingKeyword */) { return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); @@ -33671,11 +33841,11 @@ ${lanes.join("\n")} const modifierFlags = modifiersToFlags(modifiers); parseExpected(100 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); - const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); + const name = modifierFlags & 2048 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; - const isAsync = modifierFlags & 512 /* Async */ ? 2 /* Await */ : 0 /* None */; + const isAsync = modifierFlags & 1024 /* Async */ ? 2 /* Await */ : 0 /* None */; const typeParameters = parseTypeParameters(); - if (modifierFlags & 1 /* Export */) + if (modifierFlags & 32 /* Export */) setAwaitContext( /*value*/ true @@ -34143,7 +34313,7 @@ ${lanes.join("\n")} } function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { const namespaceFlag = flags & 32 /* Namespace */; - const name = parseIdentifier(); + const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier(); const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( getNodePos(), /*hasJSDoc*/ @@ -34232,15 +34402,16 @@ ${lanes.join("\n")} parseExpected(161 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); - let assertClause; - if (token() === 132 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); + const currentToken2 = token(); + let attributes; + if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) { + attributes = parseImportAttributes(currentToken2); } parseSemicolon(); - const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause); + const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes); return withJSDoc(finishNode(node, pos), hasJSDoc); } - function parseAssertEntry() { + function parseImportAttribute() { const pos = getNodePos(); const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */); parseExpected(59 /* ColonToken */); @@ -34248,19 +34419,19 @@ ${lanes.join("\n")} /*allowReturnTypeInArrowFunction*/ true ); - return finishNode(factory2.createAssertEntry(name, value), pos); + return finishNode(factory2.createImportAttribute(name, value), pos); } - function parseAssertClause(skipAssertKeyword) { + function parseImportAttributes(token2, skipKeyword) { const pos = getNodePos(); - if (!skipAssertKeyword) { - parseExpected(132 /* AssertKeyword */); + if (!skipKeyword) { + parseExpected(token2); } const openBracePosition = scanner2.getTokenStart(); if (parseExpected(19 /* OpenBraceToken */)) { const multiLine = scanner2.hasPrecedingLineBreak(); const elements = parseDelimitedList( - 24 /* AssertEntries */, - parseAssertEntry, + 24 /* ImportAttributes */, + parseImportAttribute, /*considerSemicolonAsDelimiter*/ true ); @@ -34269,11 +34440,11 @@ ${lanes.join("\n")} if (lastError && lastError.code === Diagnostics._0_expected.code) { addRelatedInfo( lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") ); } } - return finishNode(factory2.createAssertClause(elements, multiLine), pos); + return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos); } else { const elements = createNodeArray( [], @@ -34283,10 +34454,11 @@ ${lanes.join("\n")} /*hasTrailingComma*/ false ); - return finishNode(factory2.createAssertClause( + return finishNode(factory2.createImportAttributes( elements, /*multiLine*/ - false + false, + token2 ), pos); } } @@ -34418,7 +34590,7 @@ ${lanes.join("\n")} ); let exportClause; let moduleSpecifier; - let assertClause; + let attributes; const isTypeOnly = parseOptional(156 /* TypeKeyword */); const namespaceExportPos = getNodePos(); if (parseOptional(42 /* AsteriskToken */)) { @@ -34434,12 +34606,13 @@ ${lanes.join("\n")} moduleSpecifier = parseModuleSpecifier(); } } - if (moduleSpecifier && token() === 132 /* AssertKeyword */ && !scanner2.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); + const currentToken2 = token(); + if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner2.hasPrecedingLineBreak()) { + attributes = parseImportAttributes(currentToken2); } parseSemicolon(); setAwaitContext(savedAwaitContext); - const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); + const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseExportAssignment(pos, hasJSDoc, modifiers) { @@ -34489,7 +34662,7 @@ ${lanes.join("\n")} ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes"; ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses"; ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers"; - ParsingContext2[ParsingContext2["AssertEntries"] = 24] = "AssertEntries"; + ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes"; ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment"; ParsingContext2[ParsingContext2["Count"] = 26] = "Count"; })(ParsingContext || (ParsingContext = {})); @@ -34508,7 +34681,8 @@ ${lanes.join("\n")} 99 /* Latest */, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); scanner2.setText(content, start, length2); currentToken = scanner2.scan(); @@ -34572,7 +34746,8 @@ ${lanes.join("\n")} 99 /* Latest */, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); const sourceFile = { languageVariant: 0 /* Standard */, text: content }; @@ -34613,8 +34788,6 @@ ${lanes.join("\n")} PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter"; })(PropertyLikeParse || (PropertyLikeParse = {})); function parseJSDocCommentWorker(start = 0, length2) { - const saveParsingContext = parsingContext; - parsingContext |= 1 << 25 /* JSDocComment */; const content = sourceText; const end = length2 === void 0 ? content.length : start + length2; length2 = end - start; @@ -34631,26 +34804,28 @@ ${lanes.join("\n")} let commentsPos; let comments = []; const parts = []; + const saveParsingContext = parsingContext; + parsingContext |= 1 << 25 /* JSDocComment */; const result = scanner2.scanRange(start + 3, length2 - 5, doJSDocScan); parsingContext = saveParsingContext; return result; function doJSDocScan() { let state = 1 /* SawAsterisk */; let margin; - let indent2 = start - (content.lastIndexOf("\n", start) + 1) + 4; + let indent3 = start - (content.lastIndexOf("\n", start) + 1) + 4; function pushComment(text) { if (!margin) { - margin = indent2; + margin = indent3; } comments.push(text); - indent2 += text.length; + indent3 += text.length; } nextTokenJSDoc(); while (parseOptionalJsdoc(5 /* WhitespaceTrivia */)) ; if (parseOptionalJsdoc(4 /* NewLineTrivia */)) { state = 0 /* BeginningOfLine */; - indent2 = 0; + indent3 = 0; } loop: while (true) { @@ -34659,14 +34834,14 @@ ${lanes.join("\n")} removeTrailingWhitespace(comments); if (!commentsPos) commentsPos = getNodePos(); - addTag(parseTag(indent2)); + addTag(parseTag(indent3)); state = 0 /* BeginningOfLine */; margin = void 0; break; case 4 /* NewLineTrivia */: comments.push(scanner2.getTokenText()); state = 0 /* BeginningOfLine */; - indent2 = 0; + indent3 = 0; break; case 42 /* AsteriskToken */: const asterisk = scanner2.getTokenText(); @@ -34676,16 +34851,16 @@ ${lanes.join("\n")} } else { Debug.assert(state === 0 /* BeginningOfLine */); state = 1 /* SawAsterisk */; - indent2 += asterisk.length; + indent3 += asterisk.length; } break; case 5 /* WhitespaceTrivia */: Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text"); const whitespace = scanner2.getTokenText(); - if (margin !== void 0 && indent2 + whitespace.length > margin) { - comments.push(whitespace.slice(margin - indent2)); + if (margin !== void 0 && indent3 + whitespace.length > margin) { + comments.push(whitespace.slice(margin - indent3)); } - indent2 += whitespace.length; + indent3 += whitespace.length; break; case 1 /* EndOfFileToken */: break loop; @@ -34722,7 +34897,7 @@ ${lanes.join("\n")} nextTokenJSDoc(); } } - const trimmedComments = trimStringEnd(comments.join("")); + const trimmedComments = comments.join("").trimEnd(); if (parts.length && trimmedComments.length) { parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start, commentsPos)); } @@ -34738,7 +34913,7 @@ ${lanes.join("\n")} } function removeTrailingWhitespace(comments2) { while (comments2.length) { - const trimmed = trimStringEnd(comments2[comments2.length - 1]); + const trimmed = comments2[comments2.length - 1].trimEnd(); if (trimmed === "") { comments2.pop(); } else if (trimmed.length < comments2[comments2.length - 1].length) { @@ -34887,7 +35062,7 @@ ${lanes.join("\n")} } return parseTagComments(margin, indentText.slice(margin)); } - function parseTagComments(indent2, initialMargin) { + function parseTagComments(indent3, initialMargin) { const commentsPos2 = getNodePos(); let comments2 = []; const parts2 = []; @@ -34896,10 +35071,10 @@ ${lanes.join("\n")} let margin; function pushComment(text) { if (!margin) { - margin = indent2; + margin = indent3; } comments2.push(text); - indent2 += text.length; + indent3 += text.length; } if (initialMargin !== void 0) { if (initialMargin !== "") { @@ -34914,7 +35089,7 @@ ${lanes.join("\n")} case 4 /* NewLineTrivia */: state = 0 /* BeginningOfLine */; comments2.push(scanner2.getTokenText()); - indent2 = 0; + indent3 = 0; break; case 60 /* AtToken */: scanner2.resetTokenState(scanner2.getTokenEnd() - 1); @@ -34924,11 +35099,11 @@ ${lanes.join("\n")} case 5 /* WhitespaceTrivia */: Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text"); const whitespace = scanner2.getTokenText(); - if (margin !== void 0 && indent2 + whitespace.length > margin) { - comments2.push(whitespace.slice(margin - indent2)); + if (margin !== void 0 && indent3 + whitespace.length > margin) { + comments2.push(whitespace.slice(margin - indent3)); state = 2 /* SavingComments */; } - indent2 += whitespace.length; + indent3 += whitespace.length; break; case 19 /* OpenBraceToken */: state = 2 /* SavingComments */; @@ -34961,7 +35136,7 @@ ${lanes.join("\n")} case 42 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { state = 1 /* SawAsterisk */; - indent2 += 1; + indent3 += 1; break; } default: @@ -34978,7 +35153,7 @@ ${lanes.join("\n")} } } removeLeadingNewlines(comments2); - const trimmedComments = trimStringEnd(comments2.join("")); + const trimmedComments = comments2.join("").trimEnd(); if (parts2.length) { if (trimmedComments.length) { parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2)); @@ -35026,8 +35201,8 @@ ${lanes.join("\n")} function isJSDocLinkTag(kind) { return kind === "link" || kind === "linkcode" || kind === "linkplain"; } - function parseUnknownTag(start2, tagName, indent2, indentText) { - return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2); + function parseUnknownTag(start2, tagName, indent3, indentText) { + return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); } function addTag(tag) { if (!tag) { @@ -35074,7 +35249,7 @@ ${lanes.join("\n")} return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; } } - function parseParameterOrPropertyTag(start2, tagName, target, indent2) { + function parseParameterOrPropertyTag(start2, tagName, target, indent3) { let typeExpression = tryParseTypeExpression(); let isNameFirst = !typeExpression; skipWhitespaceOrAsterisk(); @@ -35083,8 +35258,8 @@ ${lanes.join("\n")} if (isNameFirst && !lookAhead(parseJSDocLinkPrefix)) { typeExpression = tryParseTypeExpression(); } - const comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); - const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent2); + const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); + const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent3); if (nestedTypeLiteral) { typeExpression = nestedTypeLiteral; isNameFirst = true; @@ -35092,12 +35267,12 @@ ${lanes.join("\n")} const result2 = target === 1 /* Property */ ? factory2.createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) : factory2.createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment); return finishNode(result2, start2); } - function parseNestedTypeLiteral(typeExpression, name, target, indent2) { + function parseNestedTypeLiteral(typeExpression, name, target, indent3) { if (typeExpression && isObjectOrObjectArrayTypeReference(typeExpression.type)) { const pos = getNodePos(); let child; let children; - while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { + while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) { children = append(children, child); } else if (child.kind === 352 /* JSDocTemplateTag */) { @@ -35110,14 +35285,14 @@ ${lanes.join("\n")} } } } - function parseReturnTag(start2, tagName, indent2, indentText) { + function parseReturnTag(start2, tagName, indent3, indentText) { if (some(tags, isJSDocReturnTag)) { parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText)); } const typeExpression = tryParseTypeExpression(); - return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2); + return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); } - function parseTypeTag(start2, tagName, indent2, indentText) { + function parseTypeTag(start2, tagName, indent3, indentText) { if (some(tags, isJSDocTypeTag)) { parseErrorAt(tagName.pos, scanner2.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText)); } @@ -35125,25 +35300,25 @@ ${lanes.join("\n")} /*mayOmitBraces*/ true ); - const comments2 = indent2 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent2, indentText) : void 0; + const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0; return finishNode(factory2.createJSDocTypeTag(tagName, typeExpression, comments2), start2); } - function parseSeeTag(start2, tagName, indent2, indentText) { + function parseSeeTag(start2, tagName, indent3, indentText) { const isMarkdownOrJSDocLink = token() === 23 /* OpenBracketToken */ || lookAhead(() => nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && isJSDocLinkTag(scanner2.getTokenValue())); const nameExpression = isMarkdownOrJSDocLink ? void 0 : parseJSDocNameReference(); - const comments2 = indent2 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent2, indentText) : void 0; + const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0; return finishNode(factory2.createJSDocSeeTag(tagName, nameExpression, comments2), start2); } - function parseThrowsTag(start2, tagName, indent2, indentText) { + function parseThrowsTag(start2, tagName, indent3, indentText) { const typeExpression = tryParseTypeExpression(); - const comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); + const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); return finishNode(factory2.createJSDocThrowsTag(tagName, typeExpression, comment), start2); } - function parseAuthorTag(start2, tagName, indent2, indentText) { + function parseAuthorTag(start2, tagName, indent3, indentText) { const commentStart = getNodePos(); const textOnly = parseAuthorNameAndEmail(); let commentEnd = scanner2.getTokenFullStart(); - const comments2 = parseTrailingTagComments(start2, commentEnd, indent2, indentText); + const comments2 = parseTrailingTagComments(start2, commentEnd, indent3, indentText); if (!comments2) { commentEnd = scanner2.getTokenFullStart(); } @@ -35227,19 +35402,19 @@ ${lanes.join("\n")} skipWhitespace(); return finishNode(factory2.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2); } - function parseTypedefTag(start2, tagName, indent2, indentText) { + function parseTypedefTag(start2, tagName, indent3, indentText) { let typeExpression = tryParseTypeExpression(); skipWhitespaceOrAsterisk(); const fullName = parseJSDocTypeNameWithNamespace(); skipWhitespace(); - let comment = parseTagComments(indent2); + let comment = parseTagComments(indent3); let end2; if (!typeExpression || isObjectOrObjectArrayTypeReference(typeExpression.type)) { let child; let childTypeTag; let jsDocPropertyTags; let hasChildren = false; - while (child = tryParse(() => parseChildPropertyTag(indent2))) { + while (child = tryParse(() => parseChildPropertyTag(indent3))) { if (child.kind === 352 /* JSDocTemplateTag */) { break; } @@ -35248,7 +35423,7 @@ ${lanes.join("\n")} if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { - addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here)); + addRelatedInfo(lastError, createDetachedDiagnostic(fileName, sourceText, 0, 0, Diagnostics.The_tag_was_first_specified_here)); } break; } else { @@ -35267,7 +35442,7 @@ ${lanes.join("\n")} } end2 = end2 || comment !== void 0 ? getNodePos() : (fullName ?? typeExpression ?? tagName).end; if (!comment) { - comment = parseTrailingTagComments(start2, end2, indent2, indentText); + comment = parseTrailingTagComments(start2, end2, indent3, indentText); } const typedefTag = factory2.createJSDocTypedefTag(tagName, typeExpression, fullName, comment); return finishNode(typedefTag, start2, end2); @@ -35297,11 +35472,11 @@ ${lanes.join("\n")} } return typeNameOrNamespaceName; } - function parseCallbackTagParameters(indent2) { + function parseCallbackTagParameters(indent3) { const pos = getNodePos(); let child; let parameters; - while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent2))) { + while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) { if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); break; @@ -35310,11 +35485,11 @@ ${lanes.join("\n")} } return createNodeArray(parameters || [], pos); } - function parseJSDocSignature(start2, indent2) { - const parameters = parseCallbackTagParameters(indent2); + function parseJSDocSignature(start2, indent3) { + const parameters = parseCallbackTagParameters(indent3); const returnTag = tryParse(() => { if (parseOptionalJsdoc(60 /* AtToken */)) { - const tag = parseTag(indent2); + const tag = parseTag(indent3); if (tag && tag.kind === 349 /* JSDocReturnTag */) { return tag; } @@ -35327,23 +35502,23 @@ ${lanes.join("\n")} returnTag ), start2); } - function parseCallbackTag(start2, tagName, indent2, indentText) { + function parseCallbackTag(start2, tagName, indent3, indentText) { const fullName = parseJSDocTypeNameWithNamespace(); skipWhitespace(); - let comment = parseTagComments(indent2); - const typeExpression = parseJSDocSignature(start2, indent2); + let comment = parseTagComments(indent3); + const typeExpression = parseJSDocSignature(start2, indent3); if (!comment) { - comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); + comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); } const end2 = comment !== void 0 ? getNodePos() : typeExpression.end; return finishNode(factory2.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start2, end2); } - function parseOverloadTag(start2, tagName, indent2, indentText) { + function parseOverloadTag(start2, tagName, indent3, indentText) { skipWhitespace(); - let comment = parseTagComments(indent2); - const typeExpression = parseJSDocSignature(start2, indent2); + let comment = parseTagComments(indent3); + const typeExpression = parseJSDocSignature(start2, indent3); if (!comment) { - comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); + comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); } const end2 = comment !== void 0 ? getNodePos() : typeExpression.end; return finishNode(factory2.createJSDocOverloadTag(tagName, typeExpression, comment), start2, end2); @@ -35359,17 +35534,17 @@ ${lanes.join("\n")} } return a.escapedText === b.escapedText; } - function parseChildPropertyTag(indent2) { - return parseChildParameterOrPropertyTag(1 /* Property */, indent2); + function parseChildPropertyTag(indent3) { + return parseChildParameterOrPropertyTag(1 /* Property */, indent3); } - function parseChildParameterOrPropertyTag(target, indent2, name) { + function parseChildParameterOrPropertyTag(target, indent3, name) { let canParseTag = true; let seenAsterisk = false; while (true) { switch (nextTokenJSDoc()) { case 60 /* AtToken */: if (canParseTag) { - const child = tryParseChildTag(target, indent2); + const child = tryParseChildTag(target, indent3); if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } @@ -35395,7 +35570,7 @@ ${lanes.join("\n")} } } } - function tryParseChildTag(target, indent2) { + function tryParseChildTag(target, indent3) { Debug.assert(token() === 60 /* AtToken */); const start2 = scanner2.getTokenFullStart(); nextTokenJSDoc(); @@ -35415,14 +35590,14 @@ ${lanes.join("\n")} t = 2 /* Parameter */ | 4 /* CallbackParameter */; break; case "template": - return parseTemplateTag(start2, tagName, indent2, indentText); + return parseTemplateTag(start2, tagName, indent3, indentText); default: return false; } if (!(target & t)) { return false; } - return parseParameterOrPropertyTag(start2, tagName, target, indent2); + return parseParameterOrPropertyTag(start2, tagName, target, indent3); } function parseTemplateTagTypeParameter() { const typeParameterPos = getNodePos(); @@ -35463,10 +35638,10 @@ ${lanes.join("\n")} } while (parseOptionalJsdoc(28 /* CommaToken */)); return createNodeArray(typeParameters, pos); } - function parseTemplateTag(start2, tagName, indent2, indentText) { + function parseTemplateTag(start2, tagName, indent3, indentText) { const constraint = token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0; const typeParameters = parseTemplateTagTypeParameters(); - return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2); + return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); } function parseOptionalJsdoc(t) { if (token() === t) { @@ -35527,7 +35702,8 @@ ${lanes.join("\n")} /*setParentNodes*/ true, sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator + sourceFile.setExternalModuleIndicator, + sourceFile.jsDocParsingMode ); } const incrementalSourceFile = sourceFile; @@ -35542,16 +35718,7 @@ ${lanes.join("\n")} Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span)); Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange))); const delta = textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - updateTokenPositionsAndMarkElements( - incrementalSourceFile, - changeRange.span.start, - textSpanEnd(changeRange.span), - textSpanEnd(textChangeRangeNewSpan(changeRange)), - delta, - oldText, - newText, - aggressiveChecks - ); + updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, textSpanEnd(changeRange.span), textSpanEnd(textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); const result = Parser.parseSourceFile( sourceFile.fileName, newText, @@ -35560,7 +35727,8 @@ ${lanes.join("\n")} /*setParentNodes*/ true, sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator + sourceFile.setExternalModuleIndicator, + sourceFile.jsDocParsingMode ); result.commentDirectives = getNewCommentDirectives( sourceFile.commentDirectives, @@ -35913,14 +36081,14 @@ ${lanes.join("\n")} return createDiagnostic(Diagnostics.Argument_for_0_option_must_be_Colon_1, `--${opt.name}`, stringNames); } function parseCustomTypeOption(opt, value, errors) { - return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors); + return convertJsonOptionOfCustomType(opt, (value ?? "").trim(), errors); } function parseListTypeOption(opt, value = "", errors) { - value = trimString(value); + value = value.trim(); if (startsWith(value, "-")) { return void 0; } - if (opt.type === "listOrElement" && !stringContains(value, ",")) { + if (opt.type === "listOrElement" && !value.includes(",")) { return validateJsonOptionValue(opt, value, errors); } if (value === "") { @@ -36141,9 +36309,8 @@ ${lanes.join("\n")} } return { buildOptions, watchOptions, projects, errors }; } - function getDiagnosticText(_message, ..._args) { - const diagnostic = createCompilerDiagnostic.apply(void 0, arguments); - return diagnostic.messageText; + function getDiagnosticText(message, ...args) { + return cast(createCompilerDiagnostic(message, ...args).messageText, isString); } function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) { const configFileText = tryReadFile(configFileName, (fileName) => host.readFile(fileName)); @@ -36900,7 +37067,7 @@ ${lanes.join("\n")} var _a; basePath = normalizeSlashes(basePath); const resolvedPath = getNormalizedAbsolutePath(configFileName || "", basePath); - if (resolutionStack.indexOf(resolvedPath) >= 0) { + if (resolutionStack.includes(resolvedPath)) { errors.push(createCompilerDiagnostic(Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, [...resolutionStack, resolvedPath].join(" -> "))); return { raw: json || convertToObject(sourceFile, errors) }; } @@ -36982,14 +37149,17 @@ ${lanes.join("\n")} for (let index = 0; index < value.length; index++) { const fileName = value[index]; if (isString(fileName)) { - extendedConfigPath = append(extendedConfigPath, getExtendsConfigPath( - fileName, - host, - newBase, - errors, - valueExpression == null ? void 0 : valueExpression.elements[index], - sourceFile - )); + extendedConfigPath = append( + extendedConfigPath, + getExtendsConfigPath( + fileName, + host, + newBase, + errors, + valueExpression == null ? void 0 : valueExpression.elements[index], + sourceFile + ) + ); } else { convertJsonOption(extendsOptionDeclaration.element, value, basePath, errors, propertyAssignment, valueExpression == null ? void 0 : valueExpression.elements[index], sourceFile); } @@ -37419,7 +37589,7 @@ ${lanes.join("\n")} return false; } for (const ext of extensionGroup) { - if (fileExtensionIs(file, ext)) { + if (fileExtensionIs(file, ext) && (ext !== ".ts" /* Ts */ || !fileExtensionIs(file, ".d.ts" /* Dts */))) { return false; } const higherPriorityPath = keyMapper(changeExtension(file, ext)); @@ -37911,6 +38081,7 @@ ${lanes.join("\n")} node16: 100 /* Node16 */, nodenext: 199 /* NodeNext */ })), + affectsSourceFile: true, affectsModuleResolution: true, affectsEmit: true, affectsBuildInfo: true, @@ -38003,7 +38174,8 @@ ${lanes.join("\n")} { name: "allowJs", type: "boolean", - affectsModuleResolution: true, + allowJsFlag: true, + affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, @@ -38013,6 +38185,8 @@ ${lanes.join("\n")} name: "checkJs", type: "boolean", affectsModuleResolution: true, + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, @@ -38025,6 +38199,10 @@ ${lanes.join("\n")} affectsEmit: true, affectsBuildInfo: true, affectsModuleResolution: true, + // The checker emits an error when it sees JSX but this option is not set in compilerOptions. + // This is effectively a semantic error, so mark this option as affecting semantic diagnostics + // so we know to refresh errors when this option is changed. + affectsSemanticDiagnostics: true, paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, category: Diagnostics.Language_and_Environment, @@ -38340,6 +38518,7 @@ ${lanes.join("\n")} bundler: 100 /* Bundler */ })), deprecatedKeys: /* @__PURE__ */ new Set(["node"]), + affectsSourceFile: true, affectsModuleResolution: true, paramType: Diagnostics.STRATEGY, category: Diagnostics.Modules, @@ -38590,7 +38769,7 @@ ${lanes.join("\n")} affectsBuildInfo: true, affectsDeclarationPath: true, isFilePath: false, - // This is intentionally broken to support compatability with existing tsconfig files + // This is intentionally broken to support compatibility with existing tsconfig files // for correct behaviour, please use outFile category: Diagnostics.Backwards_Compatibility, paramType: Diagnostics.FILE, @@ -38882,6 +39061,7 @@ ${lanes.join("\n")} legacy: 1 /* Legacy */, force: 3 /* Force */ })), + affectsSourceFile: true, affectsModuleResolution: true, description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files, category: Diagnostics.Language_and_Environment, @@ -38901,7 +39081,7 @@ ${lanes.join("\n")} affectsEmitOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsEmit); affectsDeclarationPathOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsDeclarationPath); moduleResolutionOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsModuleResolution); - sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics); + sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsBindDiagnostics); optionsAffectingProgramStructure = optionDeclarations.filter((option) => !!option.affectsProgramStructure); transpileOptionValueCompilerOptions = optionDeclarations.filter((option) => hasProperty(option, "transpileOptionValue")); optionsForBuild = [ @@ -39048,8 +39228,8 @@ ${lanes.join("\n")} }); // src/compiler/moduleNameResolver.ts - function trace(host) { - host.trace(formatMessage.apply(void 0, arguments)); + function trace(host, message, ...args) { + host.trace(formatMessage(message, ...args)); } function isTraceEnabled(compilerOptions, host) { return !!compilerOptions.traceResolution && host.trace !== void 0; @@ -39112,7 +39292,7 @@ ${lanes.join("\n")} Debug.assert(extensionIsTS(resolved.extension)); return { fileName: resolved.path, packageId: resolved.packageId }; } - function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, legacyResult) { + function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, cache, legacyResult) { if (!state.resultFromCache && !state.compilerOptions.preserveSymlinks && resolved && isExternalLibraryImport && !resolved.originalPath && !isExternalModuleNameRelative(moduleName)) { const { resolvedFileName, originalPath } = getOriginalAndResolvedFileName(resolved.path, state.host, state.traceEnabled); if (originalPath) @@ -39125,15 +39305,25 @@ ${lanes.join("\n")} affectingLocations, diagnostics, state.resultFromCache, + cache, legacyResult ); } - function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) { + function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, cache, legacyResult) { if (resultFromCache) { - resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations); - resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations); - resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics); - return resultFromCache; + if (!(cache == null ? void 0 : cache.isReadonly)) { + resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations); + resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations); + resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics); + return resultFromCache; + } else { + return { + ...resultFromCache, + failedLookupLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.failedLookupLocations, failedLookupLocations), + affectingLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.affectingLocations, affectingLocations), + resolutionDiagnostics: initializeResolutionFieldForReadonlyCache(resultFromCache.resolutionDiagnostics, diagnostics) + }; + } } return { resolvedModule: resolved && { @@ -39161,6 +39351,13 @@ ${lanes.join("\n")} to.push(...value); return to; } + function initializeResolutionFieldForReadonlyCache(fromCache, value) { + if (!(fromCache == null ? void 0 : fromCache.length)) + return initializeResolutionField(value); + if (!value.length) + return fromCache.slice(); + return [...fromCache, ...value]; + } function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) { if (!hasProperty(jsonContent, fieldName)) { if (state.traceEnabled) { @@ -39336,10 +39533,14 @@ ${lanes.join("\n")} const failedLookupLocations = []; const affectingLocations = []; let features = getNodeResolutionFeatures(options); - if (resolutionMode === 99 /* ESNext */ && (getEmitModuleResolutionKind(options) === 3 /* Node16 */ || getEmitModuleResolutionKind(options) === 99 /* NodeNext */)) { + if (resolutionMode !== void 0) { + features |= 30 /* AllFeatures */; + } + const moduleResolution = getEmitModuleResolutionKind(options); + if (resolutionMode === 99 /* ESNext */ && (3 /* Node16 */ <= moduleResolution && moduleResolution <= 99 /* NodeNext */)) { features |= 32 /* EsmMode */; } - const conditions = features & 8 /* Exports */ ? getConditions(options, !!(features & 32 /* EsmMode */)) : []; + const conditions = features & 8 /* Exports */ ? getConditions(options, resolutionMode) : []; const diagnostics = []; const moduleResolutionState = { compilerOptions: options, @@ -39381,15 +39582,15 @@ ${lanes.join("\n")} affectingLocations: initializeResolutionField(affectingLocations), resolutionDiagnostics: initializeResolutionField(diagnostics) }; - if (containingDirectory) { - cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set( + if (containingDirectory && cache && !cache.isReadonly) { + cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set( typeReferenceDirectiveName, /*mode*/ resolutionMode, result ); if (!isExternalModuleNameRelative(typeReferenceDirectiveName)) { - cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(typeReferenceDirectiveName, resolutionMode, redirectedReference).set(containingDirectory, result); + cache.getOrCreateCacheForNonRelativeName(typeReferenceDirectiveName, resolutionMode, redirectedReference).set(containingDirectory, result); } } if (traceEnabled) @@ -39430,12 +39631,7 @@ ${lanes.join("\n")} } } return resolvedTypeScriptOnly( - loadNodeModuleFromDirectory( - 4 /* Declaration */, - candidate, - !directoryExists, - moduleResolutionState - ) + loadNodeModuleFromDirectory(4 /* Declaration */, candidate, !directoryExists, moduleResolutionState) ); }); } else { @@ -39512,12 +39708,20 @@ ${lanes.join("\n")} } return features; } - function getConditions(options, esmMode) { - const conditions = esmMode || getEmitModuleResolutionKind(options) === 100 /* Bundler */ ? ["import"] : ["require"]; + function getConditions(options, resolutionMode) { + const moduleResolution = getEmitModuleResolutionKind(options); + if (resolutionMode === void 0) { + if (moduleResolution === 100 /* Bundler */) { + resolutionMode = 99 /* ESNext */; + } else if (moduleResolution === 2 /* Node10 */) { + return []; + } + } + const conditions = resolutionMode === 99 /* ESNext */ ? ["import"] : ["require"]; if (!options.noDtsResolution) { conditions.push("types"); } - if (getEmitModuleResolutionKind(options) !== 100 /* Bundler */) { + if (moduleResolution !== 100 /* Bundler */) { conditions.push("node"); } return concatenate(conditions, options.customConditions); @@ -39583,9 +39787,8 @@ ${lanes.join("\n")} function getKeyForCompilerOptions(options, affectingOptionDeclarations) { return affectingOptionDeclarations.map((option) => compilerOptionValueToString(getCompilerOptionValue(options, option))).join("|") + `|${options.pathsBasePath}`; } - function createCacheWithRedirects(ownOptions) { + function createCacheWithRedirects(ownOptions, optionsToRedirectsKey) { const redirectsMap = /* @__PURE__ */ new Map(); - const optionsToRedirectsKey = /* @__PURE__ */ new Map(); const redirectsKeyToMap = /* @__PURE__ */ new Map(); let ownMap = /* @__PURE__ */ new Map(); if (ownOptions) @@ -39594,7 +39797,8 @@ ${lanes.join("\n")} getMapOfCacheRedirects, getOrCreateMapOfCacheRedirects, update, - clear: clear2 + clear: clear2, + getOwnMap: () => ownMap }; function getMapOfCacheRedirects(redirectedReference) { return redirectedReference ? getOrCreateMap( @@ -39695,13 +39899,14 @@ ${lanes.join("\n")} } return result; } - function createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options) { - const directoryToModuleNameMap = createCacheWithRedirects(options); + function createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options, optionsToRedirectsKey) { + const directoryToModuleNameMap = createCacheWithRedirects(options, optionsToRedirectsKey); return { getFromDirectoryCache, getOrCreateCacheForDirectory, clear: clear2, - update + update, + directoryToModuleNameMap }; function clear2() { directoryToModuleNameMap.clear(); @@ -39757,23 +39962,14 @@ ${lanes.join("\n")} return result; } } - function zipToModeAwareCache(file, keys, values, nameAndModeGetter) { - Debug.assert(keys.length === values.length); - const map2 = createModeAwareCache(); - for (let i = 0; i < keys.length; ++i) { - const entry = keys[i]; - map2.set(nameAndModeGetter.getName(entry), nameAndModeGetter.getMode(entry, file), values[i]); - } - return map2; - } function getOriginalOrResolvedModuleFileName(result) { return result.resolvedModule && (result.resolvedModule.originalPath || result.resolvedModule.resolvedFileName); } function getOriginalOrResolvedTypeReferenceFileName(result) { return result.resolvedTypeReferenceDirective && (result.resolvedTypeReferenceDirective.originalPath || result.resolvedTypeReferenceDirective.resolvedFileName); } - function createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFileName, options, getResolvedFileName) { - const moduleNameToDirectoryMap = createCacheWithRedirects(options); + function createNonRelativeNameResolutionCache(currentDirectory, getCanonicalFileName, options, getResolvedFileName, optionsToRedirectsKey) { + const moduleNameToDirectoryMap = createCacheWithRedirects(options, optionsToRedirectsKey); return { getFromNonRelativeNameCache, getOrCreateCacheForNonRelativeName, @@ -39841,13 +40037,20 @@ ${lanes.join("\n")} } } } - function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, getResolvedFileName) { - const perDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, options); + function createModuleOrTypeReferenceResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, getResolvedFileName, optionsToRedirectsKey) { + optionsToRedirectsKey ?? (optionsToRedirectsKey = /* @__PURE__ */ new Map()); + const perDirectoryResolutionCache = createPerDirectoryResolutionCache( + currentDirectory, + getCanonicalFileName, + options, + optionsToRedirectsKey + ); const nonRelativeNameResolutionCache = createNonRelativeNameResolutionCache( currentDirectory, getCanonicalFileName, options, - getResolvedFileName + getResolvedFileName, + optionsToRedirectsKey ); packageJsonInfoCache ?? (packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName)); return { @@ -39857,7 +40060,8 @@ ${lanes.join("\n")} clear: clear2, update, getPackageJsonInfoCache: () => packageJsonInfoCache, - clearAllExceptPackageJsonInfoCache + clearAllExceptPackageJsonInfoCache, + optionsToRedirectsKey }; function clear2() { clearAllExceptPackageJsonInfoCache(); @@ -39872,24 +40076,26 @@ ${lanes.join("\n")} nonRelativeNameResolutionCache.update(options2); } } - function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache) { + function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, optionsToRedirectsKey) { const result = createModuleOrTypeReferenceResolutionCache( currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, - getOriginalOrResolvedModuleFileName + getOriginalOrResolvedModuleFileName, + optionsToRedirectsKey ); result.getOrCreateCacheForModuleName = (nonRelativeName, mode, redirectedReference) => result.getOrCreateCacheForNonRelativeName(nonRelativeName, mode, redirectedReference); return result; } - function createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache) { + function createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, optionsToRedirectsKey) { return createModuleOrTypeReferenceResolutionCache( currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, - getOriginalOrResolvedTypeReferenceFileName + getOriginalOrResolvedTypeReferenceFileName, + optionsToRedirectsKey ); } function getOptionsForLibraryResolution(options) { @@ -39960,13 +40166,13 @@ ${lanes.join("\n")} result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); break; case 2 /* Node10 */: - result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); + result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0); break; case 1 /* Classic */: result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); break; case 100 /* Bundler */: - result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); + result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0); break; default: return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`); @@ -39974,9 +40180,11 @@ ${lanes.join("\n")} if (result && result.resolvedModule) (_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`); (_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null"); - cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); - if (!isExternalModuleNameRelative(moduleName)) { - cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); + if (cache && !cache.isReadonly) { + cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); + if (!isExternalModuleNameRelative(moduleName)) { + cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); + } } } if (traceEnabled) { @@ -40131,7 +40339,7 @@ ${lanes.join("\n")} resolutionMode ); } - function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) { + function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) { const containingDirectory = getDirectoryPath(containingFile); const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0; let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; @@ -40148,7 +40356,8 @@ ${lanes.join("\n")} extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + conditions ); } function tryResolveJSModuleWorker(moduleName, initialDir, host) { @@ -40164,10 +40373,12 @@ ${lanes.join("\n")} /*isConfigLookup*/ false, /*redirectedReference*/ + void 0, + /*conditions*/ void 0 ); } - function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) { + function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) { const containingDirectory = getDirectoryPath(containingFile); let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; if (getResolveJsonModule(compilerOptions)) { @@ -40183,10 +40394,11 @@ ${lanes.join("\n")} extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + conditions ); } - function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) { + function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) { let extensions; if (isConfigLookup) { extensions = 8 /* Json */; @@ -40197,7 +40409,7 @@ ${lanes.join("\n")} } else { extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; } - return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference); + return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions); } function nodeNextJsonConfigResolver(moduleName, containingFile, host) { return nodeModuleNameResolverWorker( @@ -40212,15 +40424,21 @@ ${lanes.join("\n")} /*isConfigLookup*/ true, /*redirectedReference*/ + void 0, + /*conditions*/ void 0 ); } - function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) { + function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) { var _a, _b, _c, _d; const traceEnabled = isTraceEnabled(compilerOptions, host); const failedLookupLocations = []; const affectingLocations = []; - const conditions = getConditions(compilerOptions, !!(features & 32 /* EsmMode */)); + const moduleResolution = getEmitModuleResolutionKind(compilerOptions); + conditions ?? (conditions = getConditions( + compilerOptions, + moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */ + )); const diagnostics = []; const state = { compilerOptions, @@ -40230,17 +40448,17 @@ ${lanes.join("\n")} affectingLocations, packageJsonInfoCache: cache, features, - conditions, + conditions: conditions ?? emptyArray, requestContainingDirectory: containingDirectory, reportDiagnostic: (diag2) => void diagnostics.push(diag2), isConfigLookup, candidateIsFromPackageJsonField: false }; - if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(compilerOptions))) { - trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", ")); + if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { + trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", ")); } let result; - if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) { + if (moduleResolution === 2 /* Node10 */) { const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0; @@ -40248,7 +40466,7 @@ ${lanes.join("\n")} result = tryResolve(extensions, state); } let legacyResult; - if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.indexOf("import") > -1) { + if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && (conditions == null ? void 0 : conditions.includes("import"))) { traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update); const diagnosticState = { ...state, @@ -40268,6 +40486,7 @@ ${lanes.join("\n")} affectingLocations, diagnostics, state, + cache, legacyResult ); function tryResolve(extensions2, state2) { @@ -40292,7 +40511,7 @@ ${lanes.join("\n")} resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); } if (!resolved2) { - if (moduleName.indexOf(":") > -1) { + if (moduleName.includes(":")) { if (traceEnabled) { trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); } @@ -40337,7 +40556,6 @@ ${lanes.join("\n")} if (traceEnabled) { trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real); } - Debug.assert(host.fileExists(real), `${path} linked to nonexistent file ${real}`); return real; } function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) { @@ -40381,7 +40599,7 @@ ${lanes.join("\n")} return void 0; } function pathContainsNodeModules(path) { - return stringContains(path, nodeModulesPathPart); + return path.includes(nodeModulesPathPart); } function parseNodeModuleFromPath(resolved, isFolder) { const path = normalizePath(resolved); @@ -40417,7 +40635,7 @@ ${lanes.join("\n")} } function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) { const filename = getBaseFileName(candidate); - if (filename.indexOf(".") === -1) { + if (!filename.includes(".")) { return void 0; } let extensionless = removeFileExtension(candidate); @@ -40529,15 +40747,7 @@ ${lanes.join("\n")} entrypoints = append(entrypoints, mainResolution == null ? void 0 : mainResolution.path); if (features & 8 /* Exports */ && packageJsonInfo.contents.packageJsonContent.exports) { const conditionSets = deduplicate( - [getConditions( - options, - /*esmMode*/ - true - ), getConditions( - options, - /*esmMode*/ - false - )], + [getConditions(options, 99 /* ESNext */), getConditions(options, 1 /* CommonJS */)], arrayIsEqualTo ); for (const conditions of conditionSets) { @@ -40574,7 +40784,7 @@ ${lanes.join("\n")} function loadEntrypointsFromTargetExports(target) { var _a, _b; if (typeof target === "string" && startsWith(target, "./")) { - if (target.indexOf("*") >= 0 && state.host.readDirectory) { + if (target.includes("*") && state.host.readDirectory) { if (target.indexOf("*") !== target.lastIndexOf("*")) { return false; } @@ -40583,7 +40793,9 @@ ${lanes.join("\n")} extensionsToExtensionsArray(extensions), /*excludes*/ void 0, - [changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))] + [ + isDeclarationFileName(target) ? target.replace("*", "**/*") : changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target)) + ] ).forEach((entry) => { entrypoints = appendIfUnique(entrypoints, { path: entry, @@ -40593,7 +40805,7 @@ ${lanes.join("\n")} }); } else { const partsAfterFirst = getPathComponents(target).slice(2); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) { return false; } const resolvedTarget = combinePaths(scope.packageDirectory, target); @@ -40667,7 +40879,7 @@ ${lanes.join("\n")} return packageJsonInfo.contents.versionPaths || void 0; } function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { - var _a, _b, _c, _d, _e, _f, _g, _h; + var _a, _b, _c, _d, _e, _f; const { host, traceEnabled } = state; const packageJsonPath = combinePaths(packageDirectory, "package.json"); if (onlyRecordFailures) { @@ -40695,15 +40907,17 @@ ${lanes.join("\n")} trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath); } const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0 } }; - (_e = state.packageJsonInfoCache) == null ? void 0 : _e.setPackageJsonInfo(packageJsonPath, result); - (_f = state.affectingLocations) == null ? void 0 : _f.push(packageJsonPath); + if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) + state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, result); + (_e = state.affectingLocations) == null ? void 0 : _e.push(packageJsonPath); return result; } else { if (directoryExists && traceEnabled) { trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath); } - (_g = state.packageJsonInfoCache) == null ? void 0 : _g.setPackageJsonInfo(packageJsonPath, directoryExists); - (_h = state.failedLookupLocations) == null ? void 0 : _h.push(packageJsonPath); + if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) + state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, directoryExists); + (_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath); } } function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) { @@ -40961,7 +41175,7 @@ ${lanes.join("\n")} } function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) { const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports); - if (!endsWith(moduleName, directorySeparator) && moduleName.indexOf("*") === -1 && hasProperty(lookupTable, moduleName)) { + if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) { const target = lookupTable[moduleName]; return loadModuleFromTargetImportOrExport( target, @@ -40972,7 +41186,7 @@ ${lanes.join("\n")} moduleName ); } - const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.indexOf("*") !== -1 || endsWith(k, "/")), comparePatternKeys); + const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys); for (const potentialTarget of expandingKeys) { if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) { const target = lookupTable[potentialTarget]; @@ -41044,15 +41258,18 @@ ${lanes.join("\n")} extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + state.conditions + ); + return toSearchResult( + result.resolvedModule ? { + path: result.resolvedModule.resolvedFileName, + extension: result.resolvedModule.extension, + packageId: result.resolvedModule.packageId, + originalPath: result.resolvedModule.originalPath, + resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension + } : void 0 ); - return toSearchResult(result.resolvedModule ? { - path: result.resolvedModule.resolvedFileName, - extension: result.resolvedModule.extension, - packageId: result.resolvedModule.packageId, - originalPath: result.resolvedModule.originalPath, - resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension - } : void 0); } if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); @@ -41064,7 +41281,7 @@ ${lanes.join("\n")} } const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target); const partsAfterFirst = parts.slice(1); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) { if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); } @@ -41075,7 +41292,7 @@ ${lanes.join("\n")} } const resolvedTarget = combinePaths(scope.packageDirectory, target); const subpathParts = getPathComponents(subpath); - if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) { + if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) { if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); } @@ -41085,13 +41302,7 @@ ${lanes.join("\n")} ); } if (state.traceEnabled) { - trace( - state.host, - Diagnostics.Using_0_subpath_1_with_target_2, - isImports ? "imports" : "exports", - key, - pattern ? target.replace(/\*/g, subpath) : target + subpath - ); + trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports", key, pattern ? target.replace(/\*/g, subpath) : target + subpath); } const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath); const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports); @@ -41108,7 +41319,7 @@ ${lanes.join("\n")} if (!Array.isArray(target)) { traceIfEnabled(state, Diagnostics.Entering_conditional_exports); for (const condition of getOwnKeys(target)) { - if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) { + if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) { traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition); const subTarget = target[condition]; const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key); @@ -41169,7 +41380,7 @@ ${lanes.join("\n")} } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { + if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { @@ -41243,7 +41454,7 @@ ${lanes.join("\n")} } } function isApplicableVersionedTypesKey(conditions, key) { - if (conditions.indexOf("types") === -1) + if (!conditions.includes("types")) return false; if (!startsWith(key, "types@")) return false; @@ -41447,7 +41658,7 @@ ${lanes.join("\n")} return mangledName; } function unmangleScopedPackageName(typesPackageName) { - return stringContains(typesPackageName, mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName; + return typesPackageName.includes(mangledScopedPackageSeparator) ? "@" + typesPackageName.replace(mangledScopedPackageSeparator, directorySeparator) : typesPackageName; } function tryFindNonRelativeModuleNameInCache(cache, moduleName, mode, containingDirectory, redirectedReference, state) { const result = cache && cache.getFromNonRelativeNameCache(moduleName, mode, containingDirectory, redirectedReference); @@ -41495,7 +41706,8 @@ ${lanes.join("\n")} failedLookupLocations, affectingLocations, diagnostics, - state + state, + cache ); function tryResolve(extensions) { const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state); @@ -41614,7 +41826,9 @@ ${lanes.join("\n")} failedLookupLocations, affectingLocations, diagnostics, - state.resultFromCache + state.resultFromCache, + /*cache*/ + void 0 ); } function toSearchResult(value) { @@ -41686,7 +41900,7 @@ ${lanes.join("\n")} break; case 272 /* ImportDeclaration */: case 271 /* ImportEqualsDeclaration */: - if (!hasSyntacticModifier(node, 1 /* Export */)) { + if (!hasSyntacticModifier(node, 32 /* Export */)) { return 0 /* NonInstantiated */; } break; @@ -41963,7 +42177,7 @@ ${lanes.join("\n")} } function declareSymbol(symbolTable, parent3, node, includes, excludes, isReplaceableByMethod, isComputedName) { Debug.assert(isComputedName || !hasDynamicName(node)); - const isDefaultExport = hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default"; + const isDefaultExport = hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) && node.name.escapedText === "default"; const name = isComputedName ? "__computed" /* Computed */ : isDefaultExport && parent3 ? "default" /* Default */ : getDeclarationName(node); let symbol; if (name === void 0) { @@ -42007,7 +42221,7 @@ ${lanes.join("\n")} } } const relatedInformation = []; - if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 1 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) { + if (isTypeAliasDeclaration(node) && nodeIsMissing(node.type) && hasSyntacticModifier(node, 32 /* Export */) && symbol.flags & (2097152 /* Alias */ | 788968 /* Type */ | 1920 /* Namespace */)) { relatedInformation.push(createDiagnosticForNode2(node, Diagnostics.Did_you_mean_0, `export type { ${unescapeLeadingUnderscores(node.name.escapedText)} }`)); } const declarationName = getNameOfDeclaration(node) || node; @@ -42036,7 +42250,7 @@ ${lanes.join("\n")} return symbol; } function declareModuleMember(node, symbolFlags, symbolExcludes) { - const hasExportModifier = !!(getCombinedModifierFlags(node) & 1 /* Export */) || jsdocTreatAsExported(node); + const hasExportModifier = !!(getCombinedModifierFlags(node) & 32 /* Export */) || jsdocTreatAsExported(node); if (symbolFlags & 2097152 /* Alias */) { if (node.kind === 281 /* ExportSpecifier */ || node.kind === 271 /* ImportEqualsDeclaration */ && hasExportModifier) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); @@ -42055,7 +42269,7 @@ ${lanes.join("\n")} if (isJSDocTypeAlias(node)) Debug.assert(isInJSFile(node)); if (!isAmbientModule(node) && (hasExportModifier || container.flags & 128 /* ExportContext */)) { - if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 1024 /* Default */) && !getDeclarationName(node)) { + if (!canHaveLocals(container) || !container.locals || hasSyntacticModifier(node, 2048 /* Default */) && !getDeclarationName(node)) { return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); } const exportKind = symbolFlags & 111551 /* Value */ ? 1048576 /* ExportValue */ : 0; @@ -42096,7 +42310,7 @@ ${lanes.join("\n")} return false; if (isPropertyAccessEntityNameExpression(declName.parent) && isTopLevelNamespaceAssignment(declName.parent)) return true; - if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 1 /* Export */) + if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & 32 /* Export */) return true; return false; } @@ -42127,7 +42341,7 @@ ${lanes.join("\n")} const saveExceptionTarget = currentExceptionTarget; const saveActiveLabelList = activeLabelList; const saveHasExplicitReturn = hasExplicitReturn; - const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 512 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; + const isImmediatelyInvoked = containerFlags & 16 /* IsFunctionExpression */ && !hasSyntacticModifier(node, 1024 /* Async */) && !node.asteriskToken && !!getImmediatelyInvokedFunctionExpression(node) || node.kind === 175 /* ClassStaticBlockDeclaration */; if (!isImmediatelyInvoked) { currentFlow = initFlowNode({ flags: 2 /* Start */ }); if (containerFlags & (16 /* IsFunctionExpression */ | 128 /* IsObjectLiteralOrClassExpressionMethodOrAccessor */)) { @@ -42368,7 +42582,7 @@ ${lanes.join("\n")} case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right); + return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) || isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right) || (isBooleanLiteral(expr.right) && isNarrowingExpression(expr.left) || isBooleanLiteral(expr.left) && isNarrowingExpression(expr.right)); case 104 /* InstanceOfKeyword */: return isNarrowableOperand(expr.left); case 103 /* InKeyword */: @@ -42688,7 +42902,7 @@ ${lanes.join("\n")} } function bindCaseBlock(node) { const clauses = node.clauses; - const isNarrowingSwitch = isNarrowingExpression(node.parent.expression); + const isNarrowingSwitch = node.parent.expression.kind === 112 /* TrueKeyword */ || isNarrowingExpression(node.parent.expression); let fallthroughFlow = unreachableFlow; for (let i = 0; i < clauses.length; i++) { const clauseStart = i; @@ -43174,7 +43388,7 @@ ${lanes.join("\n")} function bindModuleDeclaration(node) { setExportContextFlag(node); if (isAmbientModule(node)) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { errorOnFirstToken(node, Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible); } if (isModuleAugmentationExternal(node)) { @@ -43335,31 +43549,15 @@ ${lanes.join("\n")} return; } if (inStrictMode && originalKeywordKind >= 119 /* FirstFutureReservedWord */ && originalKeywordKind <= 127 /* LastFutureReservedWord */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - getStrictModeIdentifierMessage(node), - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, getStrictModeIdentifierMessage(node), declarationNameToString(node))); } else if (originalKeywordKind === 135 /* AwaitKeyword */) { if (isExternalModule(file) && isInTopLevelContext(node)) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, declarationNameToString(node))); } else if (node.flags & 65536 /* AwaitContext */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node))); } } else if (originalKeywordKind === 127 /* YieldKeyword */ && node.flags & 16384 /* YieldContext */) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, declarationNameToString(node))); } } } @@ -43375,11 +43573,7 @@ ${lanes.join("\n")} function checkPrivateIdentifier(node) { if (node.escapedText === "#constructor") { if (!file.parseDiagnostics.length) { - file.bindDiagnostics.push(createDiagnosticForNode2( - node, - Diagnostics.constructor_is_a_reserved_word, - declarationNameToString(node) - )); + file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.constructor_is_a_reserved_word, declarationNameToString(node))); } } } @@ -43407,13 +43601,7 @@ ${lanes.join("\n")} const identifier = name; if (isEvalOrArgumentsIdentifier(identifier)) { const span = getErrorSpanForNode(file, name); - file.bindDiagnostics.push(createFileDiagnostic( - file, - span.start, - span.length, - getStrictModeEvalOrArgumentsMessage(contextNode), - idText(identifier) - )); + file.bindDiagnostics.push(createFileDiagnostic(file, span.start, span.length, getStrictModeEvalOrArgumentsMessage(contextNode), idText(identifier))); } } } @@ -43444,12 +43632,7 @@ ${lanes.join("\n")} if (languageVersion < 2 /* ES2015 */) { if (blockScopeContainer.kind !== 312 /* SourceFile */ && blockScopeContainer.kind !== 267 /* ModuleDeclaration */ && !isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) { const errorSpan = getErrorSpanForNode(file, node); - file.bindDiagnostics.push(createFileDiagnostic( - file, - errorSpan.start, - errorSpan.length, - getStrictModeBlockScopeFunctionDeclarationMessage(node) - )); + file.bindDiagnostics.push(createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node))); } } } @@ -43680,11 +43863,7 @@ ${lanes.join("\n")} return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); case 174 /* MethodDeclaration */: case 173 /* MethodSignature */: - return bindPropertyOrMethodOrAccessor( - node, - 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), - isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */ - ); + return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 16777216 /* Optional */ : 0 /* None */), isObjectLiteralMethod(node) ? 0 /* PropertyExcludes */ : 103359 /* MethodExcludes */); case 262 /* FunctionDeclaration */: return bindFunctionDeclaration(node); case 176 /* Constructor */: @@ -44270,7 +44449,7 @@ ${lanes.join("\n")} } if (!isBindingPattern(node.name)) { const possibleVariableDecl = node.kind === 260 /* VariableDeclaration */ ? node : node.parent.parent; - if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 1 /* Export */)) { + if (isInJSFile(node) && shouldResolveJsRequire(options) && isVariableDeclarationInitializedToBareOrAccessedRequire(possibleVariableDecl) && !getJSDocTypeTag(node) && !(getCombinedModifierFlags(node) & 32 /* Export */)) { declareSymbolAndAddToSymbolTable(node, 2097152 /* Alias */, 2097152 /* AliasExcludes */); } else if (isBlockOrCatchScoped(node)) { bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 111551 /* BlockScopedVariableExcludes */); @@ -44422,7 +44601,7 @@ ${lanes.join("\n")} case 267 /* ModuleDeclaration */: return getModuleInstanceState(s) !== 1 /* Instantiated */; case 266 /* EnumDeclaration */: - return hasSyntacticModifier(s, 2048 /* Const */); + return hasSyntacticModifier(s, 4096 /* Const */); default: return false; } @@ -44765,20 +44944,17 @@ ${lanes.join("\n")} function getNodeModulesPackageName(compilerOptions, importingSourceFile, nodeModulesFileName, host, preferences, options = {}) { const info = getInfo(importingSourceFile.path, host); const modulePaths = getAllModulePaths(importingSourceFile.path, nodeModulesFileName, host, preferences, options); - return firstDefined( - modulePaths, - (modulePath) => tryGetModuleNameAsNodeModule( - modulePath, - info, - importingSourceFile, - host, - compilerOptions, - preferences, - /*packageNameOnly*/ - true, - options.overrideImportMode - ) - ); + return firstDefined(modulePaths, (modulePath) => tryGetModuleNameAsNodeModule( + modulePath, + info, + importingSourceFile, + host, + compilerOptions, + preferences, + /*packageNameOnly*/ + true, + options.overrideImportMode + )); } function getModuleSpecifierWorker(compilerOptions, importingSourceFile, importingSourceFileName, toFileName2, host, preferences, userPreferences, options = {}) { const info = getInfo(importingSourceFileName, host); @@ -44822,10 +44998,12 @@ ${lanes.join("\n")} importingSourceFile, host, userPreferences, - options + options, + /*forAutoImport*/ + false ).moduleSpecifiers; } - function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}) { + function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) { let computedWithoutCache = false; const ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker); if (ambient) @@ -44843,11 +45021,19 @@ ${lanes.join("\n")} return { moduleSpecifiers: emptyArray, computedWithoutCache }; computedWithoutCache = true; modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host)); - const result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options); + const result = computeModuleSpecifiers( + modulePaths, + compilerOptions, + importingSourceFile, + host, + userPreferences, + options, + forAutoImport + ); cache == null ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, options, modulePaths, result); return { moduleSpecifiers: result, computedWithoutCache }; } - function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}) { + function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences, options = {}, forAutoImport) { const info = getInfo(importingSourceFile.path, host); const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile); const existingSpecifier = forEach(modulePaths, (modulePath) => forEach( @@ -44904,7 +45090,7 @@ ${lanes.join("\n")} redirectPathsSpecifiers = append(redirectPathsSpecifiers, local); } else if (pathIsBareSpecifier(local)) { pathsSpecifiers = append(pathsSpecifiers, local); - } else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) { + } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) { relativeSpecifiers = append(relativeSpecifiers, local); } } @@ -45087,32 +45273,29 @@ ${lanes.join("\n")} if (decl) { return decl.name.text; } - const ambientModuleDeclareCandidates = mapDefined( - moduleSymbol.declarations, - (d) => { - var _a2, _b, _c, _d; - if (!isModuleDeclaration(d)) - return; - const topNamespace = getTopNamespace(d); - if (!(((_a2 = topNamespace == null ? void 0 : topNamespace.parent) == null ? void 0 : _a2.parent) && isModuleBlock(topNamespace.parent) && isAmbientModule(topNamespace.parent.parent) && isSourceFile(topNamespace.parent.parent.parent))) - return; - const exportAssignment = (_d = (_c = (_b = topNamespace.parent.parent.symbol.exports) == null ? void 0 : _b.get("export=")) == null ? void 0 : _c.valueDeclaration) == null ? void 0 : _d.expression; - if (!exportAssignment) - return; - const exportSymbol = checker.getSymbolAtLocation(exportAssignment); - if (!exportSymbol) - return; - const originalExportSymbol = (exportSymbol == null ? void 0 : exportSymbol.flags) & 2097152 /* Alias */ ? checker.getAliasedSymbol(exportSymbol) : exportSymbol; - if (originalExportSymbol === d.symbol) - return topNamespace.parent.parent; - function getTopNamespace(namespaceDeclaration) { - while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { - namespaceDeclaration = namespaceDeclaration.parent; - } - return namespaceDeclaration; + const ambientModuleDeclareCandidates = mapDefined(moduleSymbol.declarations, (d) => { + var _a2, _b, _c, _d; + if (!isModuleDeclaration(d)) + return; + const topNamespace = getTopNamespace(d); + if (!(((_a2 = topNamespace == null ? void 0 : topNamespace.parent) == null ? void 0 : _a2.parent) && isModuleBlock(topNamespace.parent) && isAmbientModule(topNamespace.parent.parent) && isSourceFile(topNamespace.parent.parent.parent))) + return; + const exportAssignment = (_d = (_c = (_b = topNamespace.parent.parent.symbol.exports) == null ? void 0 : _b.get("export=")) == null ? void 0 : _c.valueDeclaration) == null ? void 0 : _d.expression; + if (!exportAssignment) + return; + const exportSymbol = checker.getSymbolAtLocation(exportAssignment); + if (!exportSymbol) + return; + const originalExportSymbol = (exportSymbol == null ? void 0 : exportSymbol.flags) & 2097152 /* Alias */ ? checker.getAliasedSymbol(exportSymbol) : exportSymbol; + if (originalExportSymbol === d.symbol) + return topNamespace.parent.parent; + function getTopNamespace(namespaceDeclaration) { + while (namespaceDeclaration.flags & 8 /* NestedNamespace */) { + namespaceDeclaration = namespaceDeclaration.parent; } + return namespaceDeclaration; } - ); + }); const ambientModuleDeclare = ambientModuleDeclareCandidates[0]; if (ambientModuleDeclare) { return ambientModuleDeclare.name.text; @@ -45203,12 +45386,12 @@ ${lanes.join("\n")} /*currentDirectory*/ void 0 ); - const mode2 = endsWith(k, "/") ? 1 /* Directory */ : stringContains(k, "*") ? 2 /* Pattern */ : 0 /* Exact */; + const mode2 = endsWith(k, "/") ? 1 /* Directory */ : k.includes("*") ? 2 /* Pattern */ : 0 /* Exact */; return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode2); }); } else { for (const key of getOwnKeys(exports)) { - if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { + if (key === "default" || conditions.includes(key) || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = exports[key]; const result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode); if (result) { @@ -45298,7 +45481,7 @@ ${lanes.join("\n")} if (getResolvePackageJsonExports(options)) { const nodeModulesDirectoryName2 = packageRootPath.substring(parts.topLevelPackageNameIndex + 1); const packageName2 = getPackageNameFromTypesPackageName(nodeModulesDirectoryName2); - const conditions = getConditions(options, importMode === 99 /* ESNext */); + const conditions = getConditions(options, importMode); const fromExports = packageJsonContent.exports ? tryGetModuleNameFromExports(options, path, packageRootPath, packageName2, packageJsonContent.exports, conditions) : void 0; if (fromExports) { const withJsExtension = !hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) }; @@ -45374,7 +45557,7 @@ ${lanes.join("\n")} return fileName; } else if (fileExtensionIsOneOf(fileName, [".d.mts" /* Dmts */, ".mts" /* Mts */, ".d.cts" /* Dcts */, ".cts" /* Cts */])) { return noExtension + getJSExtensionForFile(fileName, options); - } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && stringContains(fileName, ".d.")) { + } else if (!fileExtensionIsOneOf(fileName, [".d.ts" /* Dts */]) && fileExtensionIsOneOf(fileName, [".ts" /* Ts */]) && fileName.includes(".d.")) { return tryGetRealFileNameForNonJsDeclarationFileName(fileName); } switch (allowedEndings[0]) { @@ -45400,7 +45583,7 @@ ${lanes.join("\n")} } function tryGetRealFileNameForNonJsDeclarationFileName(fileName) { const baseName = getBaseFileName(fileName); - if (!endsWith(fileName, ".ts" /* Ts */) || !stringContains(baseName, ".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */])) + if (!endsWith(fileName, ".ts" /* Ts */) || !baseName.includes(".d.") || fileExtensionIsOneOf(baseName, [".d.ts" /* Dts */])) return void 0; const noExtension = removeExtension(fileName, ".ts" /* Ts */); const ext = noExtension.substring(noExtension.lastIndexOf(".")); @@ -45508,7 +45691,7 @@ ${lanes.join("\n")} var externalHelpersModule; var Symbol47 = objectAllocator.getSymbolConstructor(); var Type27 = objectAllocator.getTypeConstructor(); - var Signature15 = objectAllocator.getSignatureConstructor(); + var Signature14 = objectAllocator.getSignatureConstructor(); var typeCount = 0; var symbolCount = 0; var totalInstantiationCount = 0; @@ -45734,24 +45917,7 @@ ${lanes.join("\n")} getTypeOfPropertyOfContextualType, getFullyQualifiedName, getResolvedSignature: (node, candidatesOutArray, argumentCount) => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0 /* Normal */), - getResolvedSignatureForStringLiteralCompletions: (call, editingArgument, candidatesOutArray, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) => { - if (checkMode & 32 /* IsForStringLiteralArgumentCompletions */) { - return runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ - )); - } - return runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( - call, - candidatesOutArray, - /*argumentCount*/ - void 0, - checkMode & ~32 /* IsForStringLiteralArgumentCompletions */ - )); - }, + getCandidateSignaturesForStringLiteralCompletions, getResolvedSignatureForSignatureHelp: (node, candidatesOutArray, argumentCount) => runWithoutResolvedSignatureCaching(node, () => getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 16 /* IsForSignatureHelp */)), getExpandedParameters, hasEffectiveRestParameter, @@ -45950,22 +46116,59 @@ ${lanes.join("\n")} isTypeParameterPossiblyReferenced, typeHasCallOrConstructSignatures }; + function getCandidateSignaturesForStringLiteralCompletions(call, editingArgument) { + const candidatesSet = /* @__PURE__ */ new Set(); + const candidates = []; + runWithInferenceBlockedFromSourceNode(editingArgument, () => getResolvedSignatureWorker( + call, + candidates, + /*argumentCount*/ + void 0, + 0 /* Normal */ + )); + for (const candidate of candidates) { + candidatesSet.add(candidate); + } + candidates.length = 0; + runWithoutResolvedSignatureCaching(editingArgument, () => getResolvedSignatureWorker( + call, + candidates, + /*argumentCount*/ + void 0, + 0 /* Normal */ + )); + for (const candidate of candidates) { + candidatesSet.add(candidate); + } + return arrayFrom(candidatesSet); + } function runWithoutResolvedSignatureCaching(node, fn) { - const cachedSignatures = []; - while (node) { - if (isCallLikeExpression(node)) { + node = findAncestor(node, isCallLikeOrFunctionLikeExpression); + if (node) { + const cachedResolvedSignatures = []; + const cachedTypes2 = []; + while (node) { const nodeLinks2 = getNodeLinks(node); - const resolvedSignature = nodeLinks2.resolvedSignature; - cachedSignatures.push([nodeLinks2, resolvedSignature]); + cachedResolvedSignatures.push([nodeLinks2, nodeLinks2.resolvedSignature]); nodeLinks2.resolvedSignature = void 0; + if (isFunctionExpressionOrArrowFunction(node)) { + const symbolLinks2 = getSymbolLinks(getSymbolOfDeclaration(node)); + const type = symbolLinks2.type; + cachedTypes2.push([symbolLinks2, type]); + symbolLinks2.type = void 0; + } + node = findAncestor(node.parent, isCallLikeOrFunctionLikeExpression); } - node = node.parent; - } - const result = fn(); - for (const [nodeLinks2, resolvedSignature] of cachedSignatures) { - nodeLinks2.resolvedSignature = resolvedSignature; + const result = fn(); + for (const [nodeLinks2, resolvedSignature] of cachedResolvedSignatures) { + nodeLinks2.resolvedSignature = resolvedSignature; + } + for (const [symbolLinks2, type] of cachedTypes2) { + symbolLinks2.type = type; + } + return result; } - return result; + return fn(); } function runWithInferenceBlockedFromSourceNode(node, fn) { const containingCall = findAncestor(node, isCallLikeExpression); @@ -46017,28 +46220,72 @@ ${lanes.join("\n")} var resolvingSymbol = createSymbol(0, "__resolving__" /* Resolving */); var unresolvedSymbols = /* @__PURE__ */ new Map(); var errorTypes = /* @__PURE__ */ new Map(); + var seenIntrinsicNames = /* @__PURE__ */ new Set(); var anyType = createIntrinsicType(1 /* Any */, "any"); - var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */); - var wildcardType = createIntrinsicType(1 /* Any */, "any"); + var autoType = createIntrinsicType(1 /* Any */, "any", 262144 /* NonInferrableType */, "auto"); + var wildcardType = createIntrinsicType( + 1 /* Any */, + "any", + /*objectFlags*/ + void 0, + "wildcard" + ); + var blockedStringType = createIntrinsicType( + 1 /* Any */, + "any", + /*objectFlags*/ + void 0, + "blocked string" + ); var errorType = createIntrinsicType(1 /* Any */, "error"); var unresolvedType = createIntrinsicType(1 /* Any */, "unresolved"); - var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */); + var nonInferrableAnyType = createIntrinsicType(1 /* Any */, "any", 65536 /* ContainsWideningType */, "non-inferrable"); var intrinsicMarkerType = createIntrinsicType(1 /* Any */, "intrinsic"); var unknownType = createIntrinsicType(2 /* Unknown */, "unknown"); - var nonNullUnknownType = createIntrinsicType(2 /* Unknown */, "unknown"); + var nonNullUnknownType = createIntrinsicType( + 2 /* Unknown */, + "unknown", + /*objectFlags*/ + void 0, + "non-null" + ); var undefinedType = createIntrinsicType(32768 /* Undefined */, "undefined"); - var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */); - var missingType = createIntrinsicType(32768 /* Undefined */, "undefined"); + var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768 /* Undefined */, "undefined", 65536 /* ContainsWideningType */, "widening"); + var missingType = createIntrinsicType( + 32768 /* Undefined */, + "undefined", + /*objectFlags*/ + void 0, + "missing" + ); var undefinedOrMissingType = exactOptionalPropertyTypes ? missingType : undefinedType; - var optionalType = createIntrinsicType(32768 /* Undefined */, "undefined"); + var optionalType = createIntrinsicType( + 32768 /* Undefined */, + "undefined", + /*objectFlags*/ + void 0, + "optional" + ); var nullType = createIntrinsicType(65536 /* Null */, "null"); - var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */); + var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536 /* Null */, "null", 65536 /* ContainsWideningType */, "widening"); var stringType = createIntrinsicType(4 /* String */, "string"); var numberType = createIntrinsicType(8 /* Number */, "number"); var bigintType = createIntrinsicType(64 /* BigInt */, "bigint"); - var falseType = createIntrinsicType(512 /* BooleanLiteral */, "false"); + var falseType = createIntrinsicType( + 512 /* BooleanLiteral */, + "false", + /*objectFlags*/ + void 0, + "fresh" + ); var regularFalseType = createIntrinsicType(512 /* BooleanLiteral */, "false"); - var trueType = createIntrinsicType(512 /* BooleanLiteral */, "true"); + var trueType = createIntrinsicType( + 512 /* BooleanLiteral */, + "true", + /*objectFlags*/ + void 0, + "fresh" + ); var regularTrueType = createIntrinsicType(512 /* BooleanLiteral */, "true"); trueType.regularType = regularTrueType; trueType.freshType = trueType; @@ -46052,9 +46299,21 @@ ${lanes.join("\n")} var esSymbolType = createIntrinsicType(4096 /* ESSymbol */, "symbol"); var voidType = createIntrinsicType(16384 /* Void */, "void"); var neverType = createIntrinsicType(131072 /* Never */, "never"); - var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */); - var implicitNeverType = createIntrinsicType(131072 /* Never */, "never"); - var unreachableNeverType = createIntrinsicType(131072 /* Never */, "never"); + var silentNeverType = createIntrinsicType(131072 /* Never */, "never", 262144 /* NonInferrableType */, "silent"); + var implicitNeverType = createIntrinsicType( + 131072 /* Never */, + "never", + /*objectFlags*/ + void 0, + "implicit" + ); + var unreachableNeverType = createIntrinsicType( + 131072 /* Never */, + "never", + /*objectFlags*/ + void 0, + "unreachable" + ); var nonPrimitiveType = createIntrinsicType(67108864 /* NonPrimitive */, "object"); var stringOrNumberType = getUnionType([stringType, numberType]); var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]); @@ -46064,7 +46323,13 @@ ${lanes.join("\n")} var numericStringType = getTemplateLiteralType(["", ""], [numberType]); var restrictiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t, () => "(restrictive mapper)"); var permissiveMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? wildcardType : t, () => "(permissive mapper)"); - var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never"); + var uniqueLiteralType = createIntrinsicType( + 131072 /* Never */, + "never", + /*objectFlags*/ + void 0, + "unique literal" + ); var uniqueLiteralMapper = makeFunctionTypeMapper((t) => t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t, () => "(unique literal mapper)"); var outofbandVarianceMarkerHandler; var reportUnreliableMapper = makeFunctionTypeMapper((t) => { @@ -46861,6 +47126,9 @@ ${lanes.join("\n")} const sourceFiles = host.getSourceFiles(); return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile); } + if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { + return true; + } if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) { if (declaration.kind === 208 /* BindingElement */) { const errorBindingElement = getAncestor(usage, 208 /* BindingElement */); @@ -46890,9 +47158,6 @@ ${lanes.join("\n")} if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) { return true; } - if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) { - return true; - } if (isUsedInFunctionOrInstanceProperty(usage, declaration)) { if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) { return !isPropertyImmediatelyReferencedWithinDeclaration( @@ -47407,7 +47672,7 @@ ${lanes.join("\n")} if (lastLocation && lastLocation === location.name) { return false; } - if (location.asteriskToken || hasSyntacticModifier(location, 512 /* Async */)) { + if (location.asteriskToken || hasSyntacticModifier(location, 1024 /* Async */)) { return true; } return !getImmediatelyInvokedFunctionExpression(location); @@ -47571,8 +47836,17 @@ ${lanes.join("\n")} function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) { if (meaning & 111551 /* Value */) { if (isPrimitiveTypeName(name)) { - if (isExtendedByInterface(errorLocation)) { - error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name)); + const grandparent = errorLocation.parent.parent; + if (grandparent && grandparent.parent && isHeritageClause(grandparent)) { + const heritageKind = grandparent.token; + const containerKind = grandparent.parent.kind; + if (containerKind === 264 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) { + error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name)); + } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) { + error2(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name)); + } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 119 /* ImplementsKeyword */) { + error2(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name)); + } } else { error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name)); } @@ -47604,16 +47878,6 @@ ${lanes.join("\n")} } return false; } - function isExtendedByInterface(node) { - const grandparent = node.parent.parent; - const parentOfGrandparent = grandparent.parent; - if (grandparent && parentOfGrandparent) { - const isExtending = isHeritageClause(grandparent) && grandparent.token === 96 /* ExtendsKeyword */; - const isInterface = isInterfaceDeclaration(parentOfGrandparent); - return isExtending && isInterface; - } - return false; - } function maybeMappedType(node, symbol) { const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || "quit"); if (container && container.members.length === 1) { @@ -47701,15 +47965,12 @@ ${lanes.join("\n")} diagnosticMessage = error2(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { - addRelatedInfo( - diagnosticMessage, - createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName) - ); + addRelatedInfo(diagnosticMessage, createDiagnosticForNode(declaration, Diagnostics._0_is_declared_here, declarationName)); } } } function isSameScopeDescendentOf(initial, parent2, stopAt) { - return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || isAsyncFunction(n)) ? "quit" : false)); + return !!parent2 && !!findAncestor(initial, (n) => n === parent2 || (n === stopAt || isFunctionLike(n) && (!getImmediatelyInvokedFunctionExpression(n) || getFunctionFlags(n) & 3 /* AsyncGenerator */) ? "quit" : false)); } function getAnyImportSyntax(node) { switch (node.kind) { @@ -47795,7 +48056,7 @@ ${lanes.join("\n")} return resolved; } function isSyntacticDefault(node) { - return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 1024 /* Default */) || isExportSpecifier(node); + return isExportAssignment(node) && !node.isExportEquals || hasSyntacticModifier(node, 2048 /* Default */) || isExportSpecifier(node) || isNamespaceExport(node); } function getUsageModeForExpression(usage) { return isStringLiteralLike(usage) ? getModeForUsageLocation(getSourceFileOfNode(usage), usage) : void 0; @@ -47880,11 +48141,14 @@ ${lanes.join("\n")} const exportAssignment = exportEqualsSymbol.valueDeclaration; const err = error2(node.name, Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName); if (exportAssignment) { - addRelatedInfo(err, createDiagnosticForNode( - exportAssignment, - Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, - compilerOptionName - )); + addRelatedInfo( + err, + createDiagnosticForNode( + exportAssignment, + Diagnostics.This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, + compilerOptionName + ) + ); } } else if (isImportClause(node)) { reportNonDefaultExport(moduleSymbol, node); @@ -47941,10 +48205,12 @@ ${lanes.join("\n")} const diagnostic = error2(node.name, Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); const exportStar = (_b = moduleSymbol.exports) == null ? void 0 : _b.get("__export" /* ExportStar */); if (exportStar) { - const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find((decl) => { - var _a2, _b2; - return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a2 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a2.exports) == null ? void 0 : _b2.has("default" /* Default */))); - }); + const defaultExport = (_c = exportStar.declarations) == null ? void 0 : _c.find( + (decl) => { + var _a2, _b2; + return !!(isExportDeclaration(decl) && decl.moduleSpecifier && ((_b2 = (_a2 = resolveExternalModuleName(decl, decl.moduleSpecifier)) == null ? void 0 : _a2.exports) == null ? void 0 : _b2.has("default" /* Default */))); + } + ); if (defaultExport) { addRelatedInfo(diagnostic, createDiagnosticForNode(defaultExport, Diagnostics.export_Asterisk_does_not_re_export_a_default)); } @@ -48091,10 +48357,7 @@ ${lanes.join("\n")} const suggestionName = symbolToString(suggestion); const diagnostic = error2(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); if (suggestion.valueDeclaration) { - addRelatedInfo( - diagnostic, - createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName) - ); + addRelatedInfo(diagnostic, createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName)); } } else { if ((_a = moduleSymbol.exports) == null ? void 0 : _a.has("default" /* Default */)) { @@ -48121,10 +48384,7 @@ ${lanes.join("\n")} const exportedSymbol = exports ? find(symbolsToArray(exports), (symbol) => !!getSymbolIfSameReference(symbol, localSymbol)) : void 0; const diagnostic = exportedSymbol ? error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) : error2(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName); if (localSymbol.declarations) { - addRelatedInfo( - diagnostic, - ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)) - ); + addRelatedInfo(diagnostic, ...map(localSymbol.declarations, (decl, index) => createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName))); } } } else { @@ -48707,7 +48967,7 @@ ${lanes.join("\n")} const contextSpecifier = isStringLiteralLike(location) ? location : ((_a = findAncestor(location, isImportCall)) == null ? void 0 : _a.arguments[0]) || ((_b = findAncestor(location, isImportDeclaration)) == null ? void 0 : _b.moduleSpecifier) || ((_c = findAncestor(location, isExternalModuleImportEqualsDeclaration)) == null ? void 0 : _c.moduleReference.expression) || ((_d = findAncestor(location, isExportDeclaration)) == null ? void 0 : _d.moduleSpecifier) || ((_e = isModuleDeclaration(location) ? location : location.parent && isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : void 0) == null ? void 0 : _e.name) || ((_f = isLiteralImportTypeNode(location) ? location : void 0) == null ? void 0 : _f.argument.literal); const mode = contextSpecifier && isStringLiteralLike(contextSpecifier) ? getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat; const moduleResolutionKind = getEmitModuleResolutionKind(compilerOptions); - const resolvedModule = getResolvedModule(currentSourceFile, moduleReference, mode); + const resolvedModule = (_g = host.getResolvedModule(currentSourceFile, moduleReference, mode)) == null ? void 0 : _g.resolvedModule; const resolutionDiagnostic = resolvedModule && getResolutionDiagnostic(compilerOptions, resolvedModule, currentSourceFile); const sourceFile = resolvedModule && (!resolutionDiagnostic || resolutionDiagnostic === Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set) && host.getSourceFile(resolvedModule.resolvedFileName); if (sourceFile) { @@ -48715,7 +48975,7 @@ ${lanes.join("\n")} error2(errorNode, resolutionDiagnostic, moduleReference, resolvedModule.resolvedFileName); } if (resolvedModule.resolvedUsingTsExtension && isDeclarationFileName(moduleReference)) { - const importOrExport = ((_g = findAncestor(location, isImportDeclaration)) == null ? void 0 : _g.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); if (importOrExport && !importOrExport.isTypeOnly || findAncestor(location, isImportCall)) { error2( errorNode, @@ -48724,7 +48984,7 @@ ${lanes.join("\n")} ); } } else if (resolvedModule.resolvedUsingTsExtension && !shouldAllowImportingTsExtension(compilerOptions, currentSourceFile.fileName)) { - const importOrExport = ((_h = findAncestor(location, isImportDeclaration)) == null ? void 0 : _h.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); + const importOrExport = ((_i = findAncestor(location, isImportDeclaration)) == null ? void 0 : _i.importClause) || findAncestor(location, or(isImportEqualsDeclaration, isExportDeclaration)); if (!((importOrExport == null ? void 0 : importOrExport.isTypeOnly) || findAncestor(location, isImportTypeNode))) { const tsExtension = Debug.checkDefined(tryExtractTSExtension(moduleReference)); error2(errorNode, Diagnostics.An_import_path_can_only_end_with_a_0_extension_when_allowImportingTsExtensions_is_enabled, tsExtension); @@ -48744,9 +49004,8 @@ ${lanes.join("\n")} } if (moduleResolutionKind === 3 /* Node16 */ || moduleResolutionKind === 99 /* NodeNext */) { const isSyncImport = currentSourceFile.impliedNodeFormat === 1 /* CommonJS */ && !findAncestor(location, isImportCall) || !!findAncestor(location, isImportEqualsDeclaration); - const overrideClauseHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); - const overrideClause = overrideClauseHost && isImportTypeNode(overrideClauseHost) ? (_i = overrideClauseHost.assertions) == null ? void 0 : _i.assertClause : overrideClauseHost == null ? void 0 : overrideClauseHost.assertClause; - if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !getResolutionModeOverrideForClause(overrideClause)) { + const overrideHost = findAncestor(location, (l) => isImportTypeNode(l) || isExportDeclaration(l) || isImportDeclaration(l)); + if (isSyncImport && sourceFile.impliedNodeFormat === 99 /* ESNext */ && !hasResolutionModeOverride(overrideHost)) { if (findAncestor(location, isImportEqualsDeclaration)) { error2(errorNode, Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead, moduleReference); } else { @@ -48789,11 +49048,15 @@ ${lanes.join("\n")} } } } - diagnostics.add(createDiagnosticForNodeFromMessageChain(getSourceFileOfNode(errorNode), errorNode, chainDiagnosticMessages( - diagnosticDetails, - Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead, - moduleReference - ))); + diagnostics.add(createDiagnosticForNodeFromMessageChain( + getSourceFileOfNode(errorNode), + errorNode, + chainDiagnosticMessages( + diagnosticDetails, + Diagnostics.The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead, + moduleReference + ) + )); } } } @@ -48850,13 +49113,9 @@ ${lanes.join("\n")} const absoluteRef = getNormalizedAbsolutePath(moduleReference, getDirectoryPath(currentSourceFile.path)); const suggestedExt = (_j = suggestedExtensions.find(([actualExt, _importExt]) => host.fileExists(absoluteRef + actualExt))) == null ? void 0 : _j[1]; if (suggestedExt) { - error2( - errorNode, - Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, - moduleReference + suggestedExt - ); + error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt); } else { - error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); + error2(errorNode, Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path); } } else { error2(errorNode, moduleNotFoundError, moduleReference); @@ -48879,12 +49138,16 @@ ${lanes.join("\n")} if (!isExternalModuleNameRelative(moduleReference) && packageId) { errorInfo = createModuleNotFoundChain(sourceFile, host, moduleReference, mode, packageId.name); } - errorOrSuggestion(isError, errorNode, chainDiagnosticMessages( - errorInfo, - Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, - moduleReference, - resolvedFileName - )); + errorOrSuggestion( + isError, + errorNode, + chainDiagnosticMessages( + errorInfo, + Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, + moduleReference, + resolvedFileName + ) + ); } function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) { if (moduleSymbol == null ? void 0 : moduleSymbol.exports) { @@ -49121,10 +49384,12 @@ ${lanes.join("\n")} } if (exportStar == null ? void 0 : exportStar.isTypeOnly) { typeOnlyExportStarMap ?? (typeOnlyExportStarMap = /* @__PURE__ */ new Map()); - symbols.forEach((_, escapedName) => typeOnlyExportStarMap.set( - escapedName, - exportStar - )); + symbols.forEach( + (_, escapedName) => typeOnlyExportStarMap.set( + escapedName, + exportStar + ) + ); } return symbols; } @@ -49306,12 +49571,21 @@ ${lanes.join("\n")} function createOriginType(flags) { return new Type27(checker, flags); } - function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */) { + function createIntrinsicType(kind, intrinsicName, objectFlags = 0 /* None */, debugIntrinsicName) { + checkIntrinsicName(intrinsicName, debugIntrinsicName); const type = createType(kind); type.intrinsicName = intrinsicName; + type.debugIntrinsicName = debugIntrinsicName; type.objectFlags = objectFlags | 524288 /* CouldContainTypeVariablesComputed */ | 2097152 /* IsGenericTypeComputed */ | 33554432 /* IsUnknownLikeUnionComputed */ | 16777216 /* IsNeverIntersectionComputed */; return type; } + function checkIntrinsicName(name, debug) { + const key = `${name},${debug ?? ""}`; + if (seenIntrinsicNames.has(key)) { + Debug.fail(`Duplicate intrinsic type name ${name}${debug ? ` (${debug})` : ""}; you may need to pass a name to createIntrinsicType.`); + } + seenIntrinsicNames.add(key); + } function createObjectType(objectFlags, symbol) { const type = createTypeWithSymbol(524288 /* Object */, symbol); type.objectFlags = objectFlags; @@ -49360,13 +49634,7 @@ ${lanes.join("\n")} return resolved; } function createAnonymousType(symbol, members, callSignatures, constructSignatures, indexInfos) { - return setStructuredTypeMembers( - createObjectType(16 /* Anonymous */, symbol), - members, - callSignatures, - constructSignatures, - indexInfos - ); + return setStructuredTypeMembers(createObjectType(16 /* Anonymous */, symbol), members, callSignatures, constructSignatures, indexInfos); } function getResolvedTypeWithoutAbstractConstructSignatures(type) { if (type.constructSignatures.length === 0) @@ -49714,20 +49982,20 @@ ${lanes.join("\n")} var _a, _b; if (!isDeclarationVisible(declaration)) { const anyImportSyntax = getAnyImportSyntax(declaration); - if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 1 /* Export */) && // import clause without export + if (anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, 32 /* Export */) && // import clause without export isDeclarationVisible(anyImportSyntax.parent)) { return addVisibleAlias(declaration, anyImportSyntax); - } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 1 /* Export */) && // unexported variable statement + } else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, 32 /* Export */) && // unexported variable statement isDeclarationVisible(declaration.parent.parent.parent)) { return addVisibleAlias(declaration, declaration.parent.parent); - } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 1 /* Export */) && isDeclarationVisible(declaration.parent)) { + } else if (isLateVisibilityPaintedStatement(declaration) && !hasSyntacticModifier(declaration, 32 /* Export */) && isDeclarationVisible(declaration.parent)) { return addVisibleAlias(declaration, declaration); } else if (isBindingElement(declaration)) { - if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 1 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) { + if (symbol.flags & 2097152 /* Alias */ && isInJSFile(declaration) && ((_a = declaration.parent) == null ? void 0 : _a.parent) && isVariableDeclaration(declaration.parent.parent) && ((_b = declaration.parent.parent.parent) == null ? void 0 : _b.parent) && isVariableStatement(declaration.parent.parent.parent.parent) && !hasSyntacticModifier(declaration.parent.parent.parent.parent, 32 /* Export */) && declaration.parent.parent.parent.parent.parent && isDeclarationVisible(declaration.parent.parent.parent.parent.parent)) { return addVisibleAlias(declaration, declaration.parent.parent.parent.parent); } else if (symbol.flags & 2 /* BlockScopedVariable */) { const variableStatement = findAncestor(declaration, isVariableStatement); - if (hasSyntacticModifier(variableStatement, 1 /* Export */)) { + if (hasSyntacticModifier(variableStatement, 32 /* Export */)) { return true; } if (!isDeclarationVisible(variableStatement.parent)) { @@ -49950,7 +50218,8 @@ ${lanes.join("\n")} visitedTypes: void 0, symbolDepth: void 0, inferTypeParameters: void 0, - approximateLength: 0 + approximateLength: 0, + trackedSymbols: void 0 }; context.tracker = new SymbolTrackerImpl(context, tracker, moduleResolverHost); const resultingNode = cb(context); @@ -50404,7 +50673,7 @@ ${lanes.join("\n")} } } function visitAndTransformType(type2, transform2) { - var _a2, _b2; + var _a2, _b2, _c; const typeId = type2.id; const isConstructorObject = getObjectFlags(type2) & 16 /* Anonymous */ && type2.symbol && type2.symbol.flags & 32 /* Class */; const id = getObjectFlags(type2) & 4 /* Reference */ && type2.node ? "N" + getNodeId(type2.node) : type2.flags & 16777216 /* Conditional */ ? "N" + getNodeId(type2.root.node) : type2.symbol ? (isConstructorObject ? "+" : "") + getSymbolId(type2.symbol) : void 0; @@ -50421,6 +50690,13 @@ ${lanes.join("\n")} } const cachedResult = (_a2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _a2.get(key); if (cachedResult) { + (_b2 = cachedResult.trackedSymbols) == null ? void 0 : _b2.forEach( + ([symbol, enclosingDeclaration, meaning]) => context.tracker.trackSymbol( + symbol, + enclosingDeclaration, + meaning + ) + ); if (cachedResult.truncating) { context.truncating = true; } @@ -50436,16 +50712,24 @@ ${lanes.join("\n")} context.symbolDepth.set(id, depth + 1); } context.visitedTypes.add(typeId); + const prevTrackedSymbols = context.trackedSymbols; + context.trackedSymbols = void 0; const startLength = context.approximateLength; const result = transform2(type2); const addedLength = context.approximateLength - startLength; if (!context.reportedDiagnostic && !context.encounteredError) { - (_b2 = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _b2.set(key, { node: result, truncating: context.truncating, addedLength }); + (_c = links == null ? void 0 : links.serializedTypes) == null ? void 0 : _c.set(key, { + node: result, + truncating: context.truncating, + addedLength, + trackedSymbols: context.trackedSymbols + }); } context.visitedTypes.delete(typeId); if (id) { context.symbolDepth.set(id, depth); } + context.trackedSymbols = prevTrackedSymbols; return result; function deepCloneOrReuseNode(node) { if (!nodeIsSynthesized(node) && getParseTreeNode(node) === node) { @@ -50596,11 +50880,7 @@ ${lanes.join("\n")} } } else { if (typeArguments !== getIdentifierTypeArguments(qualifier.right)) { - qualifier = factory.updateQualifiedName( - qualifier, - qualifier.left, - setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments) - ); + qualifier = factory.updateQualifiedName(qualifier, qualifier.left, setIdentifierTypeArguments(factory.cloneNode(qualifier.right), typeArguments)); } } } @@ -50612,7 +50892,7 @@ ${lanes.join("\n")} return factory.updateImportTypeNode( root, root.argument, - root.assertions, + root.attributes, qualifier, typeArguments, root.isTypeOf @@ -50626,11 +50906,7 @@ ${lanes.join("\n")} } } else { if (typeArguments !== getIdentifierTypeArguments(typeName.right)) { - typeName = factory.updateQualifiedName( - typeName, - typeName.left, - setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments) - ); + typeName = factory.updateQualifiedName(typeName, typeName.left, setIdentifierTypeArguments(factory.cloneNode(typeName.right), typeArguments)); } } typeArguments = ref.typeArguments; @@ -50690,7 +50966,7 @@ ${lanes.join("\n")} if (propertySymbol.flags & 4194304 /* Prototype */) { continue; } - if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (8 /* Private */ | 16 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) { + if (getDeclarationModifierFlagsFromSymbol(propertySymbol) & (2 /* Private */ | 4 /* Protected */) && context.tracker.reportPrivateInBaseOfClassExpression) { context.tracker.reportPrivateInBaseOfClassExpression(unescapeLeadingUnderscores(propertySymbol.escapedName)); } } @@ -50754,6 +51030,28 @@ ${lanes.join("\n")} const propertyName = getPropertyNameNodeForSymbol(propertySymbol, context); context.enclosingDeclaration = saveEnclosingDeclaration; context.approximateLength += symbolName(propertySymbol).length + 1; + if (propertySymbol.flags & 98304 /* Accessor */) { + const writeType = getWriteTypeOfSymbol(propertySymbol); + if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) { + const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */); + const getterSignature = getSignatureFromDeclaration(getterDeclaration); + typeElements.push( + setCommentRange( + signatureToSignatureDeclarationHelper(getterSignature, 177 /* GetAccessor */, context, { name: propertyName }), + getterDeclaration + ) + ); + const setterDeclaration = getDeclarationOfKind(propertySymbol, 178 /* SetAccessor */); + const setterSignature = getSignatureFromDeclaration(setterDeclaration); + typeElements.push( + setCommentRange( + signatureToSignatureDeclarationHelper(setterSignature, 178 /* SetAccessor */, context, { name: propertyName }), + setterDeclaration + ) + ); + return; + } + } const optionalToken = propertySymbol.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0; if (propertySymbol.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { const signatures = getSignaturesOfType(filterType(propertyType, (t) => !(t.flags & 32768 /* Undefined */)), 0 /* Call */); @@ -50791,9 +51089,9 @@ ${lanes.join("\n")} typeElements.push(preserveCommentsOn(propertySignature)); function preserveCommentsOn(node) { var _a2; - if (some(propertySymbol.declarations, (d) => d.kind === 355 /* JSDocPropertyTag */)) { - const d = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d2) => d2.kind === 355 /* JSDocPropertyTag */); - const commentText = getTextOfJSDocComment(d.comment); + const jsdocPropertyTag = (_a2 = propertySymbol.declarations) == null ? void 0 : _a2.find((d) => d.kind === 355 /* JSDocPropertyTag */); + if (jsdocPropertyTag) { + const commentText = getTextOfJSDocComment(jsdocPropertyTag.comment); if (commentText) { setSyntheticLeadingComments(node, [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]); } @@ -50971,7 +51269,7 @@ ${lanes.join("\n")} let modifiers = options == null ? void 0 : options.modifiers; if (kind === 185 /* ConstructorType */ && signature.flags & 4 /* Abstract */) { const flags = modifiersToFlags(modifiers); - modifiers = factory.createModifiersFromModifierFlags(flags | 256 /* Abstract */); + modifiers = factory.createModifiersFromModifierFlags(flags | 64 /* Abstract */); } const node = kind === 179 /* CallSignature */ ? factory.createCallSignature(typeParameters, parameters, returnTypeNode) : kind === 180 /* ConstructSignature */ ? factory.createConstructSignature(typeParameters, parameters, returnTypeNode) : kind === 173 /* MethodSignature */ ? factory.createMethodSignature(modifiers, (options == null ? void 0 : options.name) ?? factory.createIdentifier(""), options == null ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) : kind === 174 /* MethodDeclaration */ ? factory.createMethodDeclaration( modifiers, @@ -51085,11 +51383,17 @@ ${lanes.join("\n")} const constraintNode = constraint && typeToTypeNodeHelper(constraint, context); return typeParameterToDeclarationWithConstraint(type, context, constraintNode); } - function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { - let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); - if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) { - parameterDeclaration = getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); + function getEffectiveParameterDeclaration(parameterSymbol) { + const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */); + if (parameterDeclaration) { + return parameterDeclaration; + } + if (!isTransientSymbol(parameterSymbol)) { + return getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */); } + } + function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) { + const parameterDeclaration = getEffectiveParameterDeclaration(parameterSymbol); let parameterType = getTypeOfSymbol(parameterSymbol); if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) { parameterType = getOptionalType(parameterType); @@ -51098,7 +51402,7 @@ ${lanes.join("\n")} const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0; const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */; const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0; - const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); + const name = parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context); const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */; const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0; const parameterNode = factory.createParameterDeclaration( @@ -51112,6 +51416,9 @@ ${lanes.join("\n")} ); context.approximateLength += symbolName(parameterSymbol).length + 3; return parameterNode; + } + function parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context) { + return parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol); function cloneBindingName(node) { return elideInitializerAndSetEmitFlags(node); function elideInitializerAndSetEmitFlags(node2) { @@ -51187,7 +51494,9 @@ ${lanes.join("\n")} if (!accessibleSymbolChain || needsQualification(accessibleSymbolChain[0], context.enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning2 : getQualifiedLeftMeaning(meaning2))) { const parents = getContainersOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol2, context.enclosingDeclaration, meaning2); if (length(parents)) { - parentSpecifiers = parents.map((symbol3) => some(symbol3.declarations, hasNonGlobalAugmentationExternalModuleSymbol) ? getSpecifierForModuleSymbol(symbol3, context) : void 0); + parentSpecifiers = parents.map( + (symbol3) => some(symbol3.declarations, hasNonGlobalAugmentationExternalModuleSymbol) ? getSpecifierForModuleSymbol(symbol3, context) : void 0 + ); const indices = parents.map((_, i) => i); indices.sort(sortByBestName); const sortedParents = indices.map((i) => parents[i]); @@ -51338,7 +51647,6 @@ ${lanes.join("\n")} return symbol.parent ? factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier; } function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) { - var _a, _b, _c, _d; const chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */)); const isTypeOf = meaning === 111551 /* Value */; if (some(chain[0].declarations, hasNonGlobalAugmentationExternalModuleSymbol)) { @@ -51347,40 +51655,42 @@ ${lanes.join("\n")} const contextFile = getSourceFileOfNode(getOriginalNode(context.enclosingDeclaration)); const targetFile = getSourceFileOfModule(chain[0]); let specifier; - let assertion; + let attributes; if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) { if ((targetFile == null ? void 0 : targetFile.impliedNodeFormat) === 99 /* ESNext */ && targetFile.impliedNodeFormat !== (contextFile == null ? void 0 : contextFile.impliedNodeFormat)) { specifier = getSpecifierForModuleSymbol(chain[0], context, 99 /* ESNext */); - assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([ - factory.createAssertEntry( - factory.createStringLiteral("resolution-mode"), - factory.createStringLiteral("import") - ) - ]))); - (_b = (_a = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _b.call(_a); + attributes = factory.createImportAttributes( + factory.createNodeArray([ + factory.createImportAttribute( + factory.createStringLiteral("resolution-mode"), + factory.createStringLiteral("import") + ) + ]) + ); } } if (!specifier) { specifier = getSpecifierForModuleSymbol(chain[0], context); } - if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.indexOf("/node_modules/") >= 0) { + if (!(context.flags & 67108864 /* AllowNodeModulesRelativePaths */) && getEmitModuleResolutionKind(compilerOptions) !== 1 /* Classic */ && specifier.includes("/node_modules/")) { const oldSpecifier = specifier; if (getEmitModuleResolutionKind(compilerOptions) === 3 /* Node16 */ || getEmitModuleResolutionKind(compilerOptions) === 99 /* NodeNext */) { const swappedMode = (contextFile == null ? void 0 : contextFile.impliedNodeFormat) === 99 /* ESNext */ ? 1 /* CommonJS */ : 99 /* ESNext */; specifier = getSpecifierForModuleSymbol(chain[0], context, swappedMode); - if (specifier.indexOf("/node_modules/") >= 0) { + if (specifier.includes("/node_modules/")) { specifier = oldSpecifier; } else { - assertion = factory.createImportTypeAssertionContainer(factory.createAssertClause(factory.createNodeArray([ - factory.createAssertEntry( - factory.createStringLiteral("resolution-mode"), - factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require") - ) - ]))); - (_d = (_c = context.tracker).reportImportTypeNodeResolutionModeOverride) == null ? void 0 : _d.call(_c); + attributes = factory.createImportAttributes( + factory.createNodeArray([ + factory.createImportAttribute( + factory.createStringLiteral("resolution-mode"), + factory.createStringLiteral(swappedMode === 99 /* ESNext */ ? "import" : "require") + ) + ]) + ); } } - if (!assertion) { + if (!attributes) { context.encounteredError = true; if (context.tracker.reportLikelyUnsafeImportRequiredError) { context.tracker.reportLikelyUnsafeImportRequiredError(oldSpecifier); @@ -51400,11 +51710,11 @@ ${lanes.join("\n")} void 0 ); } - return factory.createImportTypeNode(lit, assertion, nonRootParts, typeParameterNodes, isTypeOf); + return factory.createImportTypeNode(lit, attributes, nonRootParts, typeParameterNodes, isTypeOf); } else { const splitNode = getTopmostIndexedAccessType(nonRootParts); const qualifier = splitNode.objectType.typeName; - return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, assertion, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType); + return factory.createIndexedAccessTypeNode(factory.createImportTypeNode(lit, attributes, qualifier, typeParameterNodes, isTypeOf), splitNode.indexType); } } const entityName = createAccessFromSymbolChain(chain, chain.length - 1, 0); @@ -51604,7 +51914,18 @@ ${lanes.join("\n")} } function isStringNamed(d) { const name = getNameOfDeclaration(d); - return !!name && isStringLiteral(name); + if (!name) { + return false; + } + if (isComputedPropertyName(name)) { + const type = checkExpression(name.expression); + return !!(type.flags & 402653316 /* StringLike */); + } + if (isElementAccessExpression(name)) { + const type = checkExpression(name.argumentExpression); + return !!(type.flags & 402653316 /* StringLike */); + } + return isStringLiteral(name); } function isSingleQuotedStringNamed(d) { const name = getNameOfDeclaration(d); @@ -51617,14 +51938,15 @@ ${lanes.join("\n")} function getPropertyNameNodeForSymbol(symbol, context) { const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed); - const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed); + const isMethod = !!(symbol.flags & 8192 /* Method */); + const fromNameType = getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod); if (fromNameType) { return fromNameType; } const rawName = unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod); } - function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed) { + function getPropertyNameNodeForSymbolFromNameType(symbol, context, singleQuote, stringNamed, isMethod) { const nameType = getSymbolLinks(symbol).nameType; if (nameType) { if (nameType.flags & 384 /* StringOrNumberLiteral */) { @@ -51635,7 +51957,7 @@ ${lanes.join("\n")} if (isNumericLiteralName(name) && startsWith(name, "-")) { return factory.createComputedPropertyName(factory.createNumericLiteral(+name)); } - return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions)); + return createPropertyNameNodeForIdentifierOrLiteral(name, getEmitScriptTarget(compilerOptions), singleQuote, stringNamed, isMethod); } if (nameType.flags & 8192 /* UniqueESSymbol */) { return factory.createComputedPropertyName(symbolToExpression(nameType.symbol, context, 111551 /* Value */)); @@ -51868,7 +52190,7 @@ ${lanes.join("\n")} return factory.updateImportTypeNode( node, factory.updateLiteralTypeNode(node.argument, rewriteModuleSpecifier(node, node.argument.literal)), - node.assertions, + node.attributes, node.qualifier, visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode), node.isTypeOf @@ -51924,6 +52246,7 @@ ${lanes.join("\n")} } } function symbolTableToDeclarationStatements(symbolTable, context, bundled) { + var _a; const serializePropertySymbolForClass = makeSerializePropertySymbol( factory.createPropertyDeclaration, 174 /* MethodDeclaration */, @@ -51945,12 +52268,15 @@ ${lanes.join("\n")} ...oldcontext, usedSymbolNames: new Set(oldcontext.usedSymbolNames), remappedSymbolNames: /* @__PURE__ */ new Map(), + remappedSymbolReferences: new Map((_a = oldcontext.remappedSymbolReferences) == null ? void 0 : _a.entries()), tracker: void 0 }; const tracker = { ...oldcontext.tracker.inner, trackSymbol: (sym, decl, meaning) => { - var _a; + var _a2, _b; + if ((_a2 = context.remappedSymbolNames) == null ? void 0 : _a2.has(getSymbolId(sym))) + return false; const accessibleResult = isSymbolAccessible( sym, decl, @@ -51961,9 +52287,13 @@ ${lanes.join("\n")} if (accessibleResult.accessibility === 0 /* Accessible */) { const chain = lookupSymbolChainWorker(sym, context, meaning); if (!(sym.flags & 4 /* Property */)) { - includePrivateSymbol(chain[0]); + const root = chain[0]; + const contextFile = getSourceFileOfNode(oldcontext.enclosingDeclaration); + if (some(root.declarations, (d) => getSourceFileOfNode(d) === contextFile)) { + includePrivateSymbol(root); + } } - } else if ((_a = oldcontext.tracker.inner) == null ? void 0 : _a.trackSymbol) { + } else if ((_b = oldcontext.tracker.inner) == null ? void 0 : _b.trackSymbol) { return oldcontext.tracker.inner.trackSymbol(sym, decl, meaning); } return false; @@ -51996,7 +52326,7 @@ ${lanes.join("\n")} const nsIndex = findIndex(statements, isModuleDeclaration); let ns = nsIndex !== -1 ? statements[nsIndex] : void 0; if (ns && exportAssignment && exportAssignment.isExportEquals && isIdentifier(exportAssignment.expression) && isIdentifier(ns.name) && idText(ns.name) === idText(exportAssignment.expression) && ns.body && isModuleBlock(ns.body)) { - const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 1 /* Export */)); + const excessExports = filter(statements, (s) => !!(getEffectiveModifierFlags(s) & 32 /* Export */)); const name = ns.name; let body = ns.body; if (length(excessExports)) { @@ -52006,30 +52336,33 @@ ${lanes.join("\n")} ns.name, body = factory.updateModuleBlock( body, - factory.createNodeArray([...ns.body.statements, factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier( + factory.createNodeArray([ + ...ns.body.statements, + factory.createExportDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - /*propertyName*/ - void 0, - id - ))), - /*moduleSpecifier*/ - void 0 - )]) + factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier( + /*isTypeOnly*/ + false, + /*propertyName*/ + void 0, + id + ))), + /*moduleSpecifier*/ + void 0 + ) + ]) ) ); statements = [...statements.slice(0, nsIndex), ns, ...statements.slice(nsIndex + 1)]; } if (!find(statements, (s) => s !== ns && nodeHasName(s, name))) { results = []; - const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 1 /* Export */) || isExportAssignment(s) || isExportDeclaration(s)); + const mixinExportFlag = !some(body.statements, (s) => hasSyntacticModifier(s, 32 /* Export */) || isExportAssignment(s) || isExportDeclaration(s)); forEach(body.statements, (s) => { - addResult(s, mixinExportFlag ? 1 /* Export */ : 0 /* None */); + addResult(s, mixinExportFlag ? 32 /* Export */ : 0 /* None */); }); statements = [...filter(statements, (s) => s !== ns && s !== exportAssignment), ...results]; } @@ -52040,15 +52373,18 @@ ${lanes.join("\n")} const exports = filter(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); if (length(exports) > 1) { const nonExports = filter(statements, (d) => !isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause); - statements = [...nonExports, factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(flatMap(exports, (e) => cast(e.exportClause, isNamedExports).elements)), - /*moduleSpecifier*/ - void 0 - )]; + statements = [ + ...nonExports, + factory.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createNamedExports(flatMap(exports, (e) => cast(e.exportClause, isNamedExports).elements)), + /*moduleSpecifier*/ + void 0 + ) + ]; } const reexports = filter(statements, (d) => isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && isNamedExports(d.exportClause)); if (length(reexports) > 1) { @@ -52057,7 +52393,7 @@ ${lanes.join("\n")} for (const group2 of groups) { if (group2.length > 1) { statements = [ - ...filter(statements, (s) => group2.indexOf(s) === -1), + ...filter(statements, (s) => !group2.includes(s)), factory.createExportDeclaration( /*modifiers*/ void 0, @@ -52074,7 +52410,7 @@ ${lanes.join("\n")} return statements; } function inlineExportModifiers(statements) { - const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.assertClause && !!d.exportClause && isNamedExports(d.exportClause)); + const index = findIndex(statements, (d) => isExportDeclaration(d) && !d.moduleSpecifier && !d.attributes && !!d.exportClause && isNamedExports(d.exportClause)); if (index >= 0) { const exportDecl = statements[index]; const replacements = mapDefined(exportDecl.exportClause.elements, (e) => { @@ -52102,7 +52438,7 @@ ${lanes.join("\n")} replacements ), exportDecl.moduleSpecifier, - exportDecl.assertClause + exportDecl.attributes ); } } @@ -52118,12 +52454,12 @@ ${lanes.join("\n")} return statements; } function addExportModifier(node) { - const flags = (getEffectiveModifierFlags(node) | 1 /* Export */) & ~2 /* Ambient */; - return factory.updateModifiers(node, flags); + const flags = (getEffectiveModifierFlags(node) | 32 /* Export */) & ~128 /* Ambient */; + return factory.replaceModifiers(node, flags); } function removeExportModifier(node) { - const flags = getEffectiveModifierFlags(node) & ~1 /* Export */; - return factory.updateModifiers(node, flags); + const flags = getEffectiveModifierFlags(node) & ~32 /* Export */; + return factory.replaceModifiers(node, flags); } function visitSymbolTable(symbolTable2, suppressNewPrivateContext, propertyAsAlias) { if (!suppressNewPrivateContext) { @@ -52163,13 +52499,19 @@ ${lanes.join("\n")} if (context.reportedDiagnostic) { oldcontext.reportedDiagnostic = context.reportedDiagnostic; } + if (context.trackedSymbols) { + if (!oldContext.trackedSymbols) + oldContext.trackedSymbols = context.trackedSymbols; + else + Debug.assert(context.trackedSymbols === oldContext.trackedSymbols); + } context = oldContext; } } - function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias) { - var _a, _b, _c, _d; - const symbolName2 = unescapeLeadingUnderscores(symbol.escapedName); - const isDefault = symbol.escapedName === "default" /* Default */; + function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias, escapedSymbolName = symbol.escapedName) { + var _a2, _b, _c, _d, _e, _f; + const symbolName2 = unescapeLeadingUnderscores(escapedSymbolName); + const isDefault = escapedSymbolName === "default" /* Default */; if (isPrivate && !(context.flags & 131072 /* AllowAnonymousIdentifier */) && isStringANonContextualKeyword(symbolName2) && !isDefault) { context.encounteredError = true; return; @@ -52179,8 +52521,8 @@ ${lanes.join("\n")} if (needsPostExportDefault || needsExportDeclaration) { isPrivate = true; } - const modifierFlags = (!isPrivate ? 1 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 1024 /* Default */ : 0); - const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && symbol.escapedName !== "export=" /* ExportEquals */; + const modifierFlags = (!isPrivate ? 32 /* Export */ : 0) | (isDefault && !needsPostExportDefault ? 2048 /* Default */ : 0); + const isConstMergedWithNS = symbol.flags & 1536 /* Module */ && symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */) && escapedSymbolName !== "export=" /* ExportEquals */; const isConstMergedWithNSPrintableAsSignatureMerge = isConstMergedWithNS && isTypeRepresentableAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol); if (symbol.flags & (16 /* Function */ | 8192 /* Method */) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeAsFunctionNamespaceMerge(getTypeOfSymbol(symbol), symbol, getInternalSymbolName(symbol, symbolName2), modifierFlags); @@ -52188,7 +52530,7 @@ ${lanes.join("\n")} if (symbol.flags & 524288 /* TypeAlias */) { serializeTypeAlias(symbol, symbolName2, modifierFlags); } - if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && symbol.escapedName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) { + if (symbol.flags & (2 /* BlockScopedVariable */ | 1 /* FunctionScopedVariable */ | 4 /* Property */ | 98304 /* Accessor */) && escapedSymbolName !== "export=" /* ExportEquals */ && !(symbol.flags & 4194304 /* Prototype */) && !(symbol.flags & 32 /* Class */) && !(symbol.flags & 8192 /* Method */) && !isConstMergedWithNSPrintableAsSignatureMerge) { if (propertyAsAlias) { const createdExport = serializeMaybeAliasAssignment(symbol); if (createdExport) { @@ -52198,17 +52540,24 @@ ${lanes.join("\n")} } else { const type = getTypeOfSymbol(symbol); const localName = getInternalSymbolName(symbol, symbolName2); - if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { + if (type.symbol && type.symbol !== symbol && type.symbol.flags & 16 /* Function */ && some(type.symbol.declarations, isFunctionExpressionOrArrowFunction) && (((_a2 = type.symbol.members) == null ? void 0 : _a2.size) || ((_b = type.symbol.exports) == null ? void 0 : _b.size))) { + if (!context.remappedSymbolReferences) { + context.remappedSymbolReferences = /* @__PURE__ */ new Map(); + } + context.remappedSymbolReferences.set(getSymbolId(type.symbol), symbol); + serializeSymbolWorker(type.symbol, isPrivate, propertyAsAlias, escapedSymbolName); + context.remappedSymbolReferences.delete(getSymbolId(type.symbol)); + } else if (!(symbol.flags & 16 /* Function */) && isTypeRepresentableAsFunctionNamespaceMerge(type, symbol)) { serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags); } else { - const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_a = symbol.parent) == null ? void 0 : _a.valueDeclaration) && isSourceFile((_b = symbol.parent) == null ? void 0 : _b.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; + const flags = !(symbol.flags & 2 /* BlockScopedVariable */) ? ((_c = symbol.parent) == null ? void 0 : _c.valueDeclaration) && isSourceFile((_d = symbol.parent) == null ? void 0 : _d.valueDeclaration) ? 2 /* Const */ : void 0 : isConstantVariable(symbol) ? 2 /* Const */ : 1 /* Let */; const name = needsPostExportDefault || !(symbol.flags & 4 /* Property */) ? localName : getUnusedName(localName, symbol); let textRange = symbol.declarations && find(symbol.declarations, (d) => isVariableDeclaration(d)); if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { textRange = textRange.parent.parent; } - const propertyAccessRequire = (_c = symbol.declarations) == null ? void 0 : _c.find(isPropertyAccessExpression); - if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_d = type.symbol) == null ? void 0 : _d.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { + const propertyAccessRequire = (_e = symbol.declarations) == null ? void 0 : _e.find(isPropertyAccessExpression); + if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) && ((_f = type.symbol) == null ? void 0 : _f.valueDeclaration) && isSourceFile(type.symbol.valueDeclaration)) { const alias = localName === propertyAccessRequire.parent.right.escapedText ? void 0 : propertyAccessRequire.parent.right; addResult( factory.createExportDeclaration( @@ -52227,19 +52576,22 @@ ${lanes.join("\n")} ); context.tracker.trackSymbol(type.symbol, context.enclosingDeclaration, 111551 /* Value */); } else { - const statement = setTextRange(factory.createVariableStatement( - /*modifiers*/ - void 0, - factory.createVariableDeclarationList([ - factory.createVariableDeclaration( - name, - /*exclamationToken*/ - void 0, - serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) - ) - ], flags) - ), textRange); - addResult(statement, name !== localName ? modifierFlags & ~1 /* Export */ : modifierFlags); + const statement = setTextRange( + factory.createVariableStatement( + /*modifiers*/ + void 0, + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + name, + /*exclamationToken*/ + void 0, + serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) + ) + ], flags) + ), + textRange + ); + addResult(statement, name !== localName ? modifierFlags & ~32 /* Export */ : modifierFlags); if (name !== localName && !isPrivate) { addResult( factory.createExportDeclaration( @@ -52312,18 +52664,21 @@ ${lanes.join("\n")} factory.createIdentifier(getInternalSymbolName(symbol, symbolName2)) ), 0 /* None */); } else if (needsExportDeclaration) { - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( + addResult( + factory.createExportDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - getInternalSymbolName(symbol, symbolName2), - symbolName2 - )]) - ), 0 /* None */); + factory.createNamedExports([factory.createExportSpecifier( + /*isTypeOnly*/ + false, + getInternalSymbolName(symbol, symbolName2), + symbolName2 + )]) + ), + 0 /* None */ + ); } } function includePrivateSymbol(symbol) { @@ -52331,10 +52686,7 @@ ${lanes.join("\n")} return; Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]); getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol); - const isExternalImportAlias = !!(symbol.flags & 2097152 /* Alias */) && !some( - symbol.declarations, - (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference) - ); + const isExternalImportAlias = !!(symbol.flags & 2097152 /* Alias */) && !some(symbol.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference)); deferredPrivatesStack[isExternalImportAlias ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration2) { @@ -52344,43 +52696,46 @@ ${lanes.join("\n")} if (canHaveModifiers(node)) { let newModifierFlags = 0 /* None */; const enclosingDeclaration2 = context.enclosingDeclaration && (isJSDocTypeAlias(context.enclosingDeclaration) ? getSourceFileOfNode(context.enclosingDeclaration) : context.enclosingDeclaration); - if (additionalModifierFlags & 1 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { - newModifierFlags |= 1 /* Export */; + if (additionalModifierFlags & 32 /* Export */ && enclosingDeclaration2 && (isExportingScope(enclosingDeclaration2) || isModuleDeclaration(enclosingDeclaration2)) && canHaveExportModifier(node)) { + newModifierFlags |= 32 /* Export */; } - if (addingDeclare && !(newModifierFlags & 1 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { - newModifierFlags |= 2 /* Ambient */; + if (addingDeclare && !(newModifierFlags & 32 /* Export */) && (!enclosingDeclaration2 || !(enclosingDeclaration2.flags & 33554432 /* Ambient */)) && (isEnumDeclaration(node) || isVariableStatement(node) || isFunctionDeclaration(node) || isClassDeclaration(node) || isModuleDeclaration(node))) { + newModifierFlags |= 128 /* Ambient */; } - if (additionalModifierFlags & 1024 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { - newModifierFlags |= 1024 /* Default */; + if (additionalModifierFlags & 2048 /* Default */ && (isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionDeclaration(node))) { + newModifierFlags |= 2048 /* Default */; } if (newModifierFlags) { - node = factory.updateModifiers(node, newModifierFlags | getEffectiveModifierFlags(node)); + node = factory.replaceModifiers(node, newModifierFlags | getEffectiveModifierFlags(node)); } } results.push(node); } function serializeTypeAlias(symbol, symbolName2, modifierFlags) { - var _a; + var _a2; const aliasType = getDeclaredTypeOfTypeAlias(symbol); const typeParams = getSymbolLinks(symbol).typeParameters; const typeParamDecls = map(typeParams, (p) => typeParameterToDeclaration(p, context)); - const jsdocAliasDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isJSDocTypeAlias); + const jsdocAliasDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isJSDocTypeAlias); const commentText = getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : void 0); const oldFlags = context.flags; context.flags |= 8388608 /* InTypeAlias */; const oldEnclosingDecl = context.enclosingDeclaration; context.enclosingDeclaration = jsdocAliasDecl; const typeNode = jsdocAliasDecl && jsdocAliasDecl.typeExpression && isJSDocTypeExpression(jsdocAliasDecl.typeExpression) && serializeExistingTypeNode(context, jsdocAliasDecl.typeExpression.type, includePrivateSymbol, bundled) || typeToTypeNodeHelper(aliasType, context); - addResult(setSyntheticLeadingComments( - factory.createTypeAliasDeclaration( - /*modifiers*/ - void 0, - getInternalSymbolName(symbol, symbolName2), - typeParamDecls, - typeNode + addResult( + setSyntheticLeadingComments( + factory.createTypeAliasDeclaration( + /*modifiers*/ + void 0, + getInternalSymbolName(symbol, symbolName2), + typeParamDecls, + typeNode + ), + !commentText ? [] : [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }] ), - !commentText ? [] : [{ kind: 3 /* MultiLineCommentTrivia */, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }] - ), modifierFlags); + modifierFlags + ); context.flags = oldFlags; context.enclosingDeclaration = oldEnclosingDecl; } @@ -52395,14 +52750,17 @@ ${lanes.join("\n")} const constructSignatures = serializeSignatures(1 /* Construct */, interfaceType, baseType, 180 /* ConstructSignature */); const indexSignatures = serializeIndexSignatures(interfaceType, baseType); const heritageClauses = !length(baseTypes) ? void 0 : [factory.createHeritageClause(96 /* ExtendsKeyword */, mapDefined(baseTypes, (b) => trySerializeAsTypeReference(b, 111551 /* Value */)))]; - addResult(factory.createInterfaceDeclaration( - /*modifiers*/ - void 0, - getInternalSymbolName(symbol, symbolName2), - typeParamDecls, - heritageClauses, - [...indexSignatures, ...constructSignatures, ...callSignatures, ...members] - ), modifierFlags); + addResult( + factory.createInterfaceDeclaration( + /*modifiers*/ + void 0, + getInternalSymbolName(symbol, symbolName2), + typeParamDecls, + heritageClauses, + [...indexSignatures, ...constructSignatures, ...callSignatures, ...members] + ), + modifierFlags + ); } function getNamespaceMembersForSerialization(symbol) { const exports = getExportsOfSymbol(symbol); @@ -52429,12 +52787,12 @@ ${lanes.join("\n")} /*isTypeOnly*/ false, factory.createNamedExports(mapDefined(filter(mergedMembers, (n) => n.escapedName !== "export=" /* ExportEquals */), (s) => { - var _a, _b; + var _a2, _b; const name = unescapeLeadingUnderscores(s.escapedName); const localName2 = getInternalSymbolName(s, name); const aliasDecl = s.declarations && getDeclarationOfAliasSymbol(s); if (containingFile && (aliasDecl ? containingFile !== getSourceFileOfNode(aliasDecl) : !some(s.declarations, (d) => getSourceFileOfNode(d) === containingFile))) { - (_b = (_a = context.tracker) == null ? void 0 : _a.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a, containingFile, symbol, s); + (_b = (_a2 = context.tracker) == null ? void 0 : _a2.reportNonlocalAugmentation) == null ? void 0 : _b.call(_a2, containingFile, symbol, s); return void 0; } const target = aliasDecl && getTargetOfAliasDeclaration( @@ -52452,24 +52810,33 @@ ${lanes.join("\n")} ); })) )]); - addResult(factory.createModuleDeclaration( - /*modifiers*/ - void 0, - factory.createIdentifier(localName), - nsBody, - 32 /* Namespace */ - ), 0 /* None */); + addResult( + factory.createModuleDeclaration( + /*modifiers*/ + void 0, + factory.createIdentifier(localName), + nsBody, + 32 /* Namespace */ + ), + 0 /* None */ + ); } } function serializeEnum(symbol, symbolName2, modifierFlags) { - addResult(factory.createEnumDeclaration( - factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 2048 /* Const */ : 0), - getInternalSymbolName(symbol, symbolName2), - map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => { - const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0; - return factory.createEnumMember(unescapeLeadingUnderscores(p.escapedName), initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue)); - }) - ), modifierFlags); + addResult( + factory.createEnumDeclaration( + factory.createModifiersFromModifierFlags(isConstEnumSymbol(symbol) ? 4096 /* Const */ : 0), + getInternalSymbolName(symbol, symbolName2), + map(filter(getPropertiesOfType(getTypeOfSymbol(symbol)), (p) => !!(p.flags & 8 /* EnumMember */)), (p) => { + const initializedValue = p.declarations && p.declarations[0] && isEnumMember(p.declarations[0]) ? getConstantValue2(p.declarations[0]) : void 0; + return factory.createEnumMember( + unescapeLeadingUnderscores(p.escapedName), + initializedValue === void 0 ? void 0 : typeof initializedValue === "string" ? factory.createStringLiteral(initializedValue) : factory.createNumericLiteral(initializedValue) + ); + }) + ), + modifierFlags + ); } function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) { const signatures = getSignaturesOfType(type, 0 /* Call */); @@ -52501,13 +52868,7 @@ ${lanes.join("\n")} } function serializeAsNamespaceDeclaration(props, localName, modifierFlags, suppressNewPrivateContext) { if (length(props)) { - const localVsRemoteMap = arrayToMultiMap( - props, - (p) => !length(p.declarations) || some( - p.declarations, - (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration) - ) ? "local" : "remote" - ); + const localVsRemoteMap = arrayToMultiMap(props, (p) => !length(p.declarations) || some(p.declarations, (d) => getSourceFileOfNode(d) === getSourceFileOfNode(context.enclosingDeclaration)) ? "local" : "remote"); const localProps = localVsRemoteMap.get("local") || emptyArray; let fakespace = parseNodeFactory.createModuleDeclaration( /*modifiers*/ @@ -52548,7 +52909,7 @@ ${lanes.join("\n")} factory.createIdentifier("default" /* Default */) )]) ) : d); - const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 1 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced; + const exportModifierStripped = every(defaultReplaced, (d) => hasSyntacticModifier(d, 32 /* Export */)) ? map(defaultReplaced, removeExportModifier) : defaultReplaced; fakespace = factory.updateModuleDeclaration( fakespace, fakespace.modifiers, @@ -52584,10 +52945,7 @@ ${lanes.join("\n")} } return cleanup(factory.createExpressionWithTypeArguments( expr, - map( - e.typeArguments, - (a) => serializeExistingTypeNode(context, a, includePrivateSymbol, bundled) || typeToTypeNodeHelper(getTypeFromTypeNode(a), context) - ) + map(e.typeArguments, (a) => serializeExistingTypeNode(context, a, includePrivateSymbol, bundled) || typeToTypeNodeHelper(getTypeFromTypeNode(a), context)) )); function cleanup(result2) { context.enclosingDeclaration = oldEnclosing; @@ -52600,8 +52958,8 @@ ${lanes.join("\n")} return void 0; } function serializeAsClass(symbol, localName, modifierFlags) { - var _a, _b; - const originalDecl = (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike); + var _a2, _b; + const originalDecl = (_a2 = symbol.declarations) == null ? void 0 : _a2.find(isClassLike); const oldEnclosing = context.enclosingDeclaration; context.enclosingDeclaration = originalDecl || oldEnclosing; const localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); @@ -52654,21 +53012,27 @@ ${lanes.join("\n")} ); const isNonConstructableClassLikeInJsFile = !isClass && !!symbol.valueDeclaration && isInJSFile(symbol.valueDeclaration) && !some(getSignaturesOfType(staticType, 1 /* Construct */)); const constructors = isNonConstructableClassLikeInJsFile ? [factory.createConstructorDeclaration( - factory.createModifiersFromModifierFlags(8 /* Private */), + factory.createModifiersFromModifierFlags(2 /* Private */), [], /*body*/ void 0 )] : serializeSignatures(1 /* Construct */, staticType, staticBaseType, 176 /* Constructor */); const indexSignatures = serializeIndexSignatures(classType, baseTypes[0]); context.enclosingDeclaration = oldEnclosing; - addResult(setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - localName, - typeParamDecls, - heritageClauses, - [...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties] - ), symbol.declarations && filter(symbol.declarations, (d) => isClassDeclaration(d) || isClassExpression(d))[0]), modifierFlags); + addResult( + setTextRange( + factory.createClassDeclaration( + /*modifiers*/ + void 0, + localName, + typeParamDecls, + heritageClauses, + [...indexSignatures, ...staticMembers, ...constructors, ...publicProperties, ...privateProperties] + ), + symbol.declarations && filter(symbol.declarations, (d) => isClassDeclaration(d) || isClassExpression(d))[0] + ), + modifierFlags + ); } function getSomeTargetNameFromDeclarations(declarations) { return firstDefined(declarations, (d) => { @@ -52691,7 +53055,7 @@ ${lanes.join("\n")} }); } function serializeAsAlias(symbol, localName, modifierFlags) { - var _a, _b, _c, _d, _e; + var _a2, _b, _c, _d, _e; const node = getDeclarationOfAliasSymbol(symbol); if (!node) return Debug.fail(); @@ -52711,28 +53075,31 @@ ${lanes.join("\n")} includePrivateSymbol(target); switch (node.kind) { case 208 /* BindingElement */: - if (((_b = (_a = node.parent) == null ? void 0 : _a.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { + if (((_b = (_a2 = node.parent) == null ? void 0 : _a2.parent) == null ? void 0 : _b.kind) === 260 /* VariableDeclaration */) { const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); const { propertyName } = node; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ + addResult( + factory.createImportDeclaration( + /*modifiers*/ void 0, - factory.createNamedImports([factory.createImportSpecifier( + factory.createImportClause( /*isTypeOnly*/ false, - propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : void 0, - factory.createIdentifier(localName) - )]) + /*name*/ + void 0, + factory.createNamedImports([factory.createImportSpecifier( + /*isTypeOnly*/ + false, + propertyName && isIdentifier(propertyName) ? factory.createIdentifier(idText(propertyName)) : void 0, + factory.createIdentifier(localName) + )]) + ), + factory.createStringLiteral(specifier2), + /*attributes*/ + void 0 ), - factory.createStringLiteral(specifier2), - /*assertClause*/ - void 0 - ), 0 /* None */); + 0 /* None */ + ); break; } Debug.failBadSyntaxKind(((_c = node.parent) == null ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization"); @@ -52750,22 +53117,28 @@ ${lanes.join("\n")} const initializer = node.initializer; const uniqueName = factory.createUniqueName(localName); const specifier2 = getSpecifierForModuleSymbol(target.parent || target, context); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - uniqueName, - factory.createExternalModuleReference(factory.createStringLiteral(specifier2)) - ), 0 /* None */); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - factory.createQualifiedName(uniqueName, initializer.name) - ), modifierFlags); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + uniqueName, + factory.createExternalModuleReference(factory.createStringLiteral(specifier2)) + ), + 0 /* None */ + ); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createIdentifier(localName), + factory.createQualifiedName(uniqueName, initializer.name) + ), + modifierFlags + ); break; } case 271 /* ImportEqualsDeclaration */: @@ -52774,20 +53147,23 @@ ${lanes.join("\n")} break; } const isLocalImport = !(target.flags & 512 /* ValueModule */) && !isVariableDeclaration(node); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - isLocalImport ? symbolToName( - target, - context, - 67108863 /* All */, - /*expectsIdentifier*/ - false - ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) - ), isLocalImport ? modifierFlags : 0 /* None */); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createIdentifier(localName), + isLocalImport ? symbolToName( + target, + context, + 67108863 /* All */, + /*expectsIdentifier*/ + false + ) : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) + ), + isLocalImport ? modifierFlags : 0 /* None */ + ); break; case 270 /* NamespaceExportDeclaration */: addResult(factory.createNamespaceExportDeclaration(idText(node.name)), 0 /* None */); @@ -52795,72 +53171,84 @@ ${lanes.join("\n")} case 273 /* ImportClause */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - factory.createIdentifier(localName), - /*namedBindings*/ - void 0 + addResult( + factory.createImportDeclaration( + /*modifiers*/ + void 0, + factory.createImportClause( + /*isTypeOnly*/ + false, + factory.createIdentifier(localName), + /*namedBindings*/ + void 0 + ), + specifier2, + node.parent.attributes ), - specifier2, - node.parent.assertClause - ), 0 /* None */); + 0 /* None */ + ); break; } case 274 /* NamespaceImport */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ + addResult( + factory.createImportDeclaration( + /*modifiers*/ void 0, - factory.createNamespaceImport(factory.createIdentifier(localName)) + factory.createImportClause( + /*isTypeOnly*/ + false, + /*name*/ + void 0, + factory.createNamespaceImport(factory.createIdentifier(localName)) + ), + specifier2, + node.parent.attributes ), - specifier2, - node.parent.parent.assertClause - ), 0 /* None */); + 0 /* None */ + ); break; } case 280 /* NamespaceExport */: - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamespaceExport(factory.createIdentifier(localName)), - factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) - ), 0 /* None */); + addResult( + factory.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createNamespaceExport(factory.createIdentifier(localName)), + factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)) + ), + 0 /* None */ + ); break; case 276 /* ImportSpecifier */: { const generatedSpecifier = getSpecifierForModuleSymbol(target.parent || target, context); const specifier2 = bundled ? factory.createStringLiteral(generatedSpecifier) : node.parent.parent.parent.moduleSpecifier; - addResult(factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( - /*isTypeOnly*/ - false, - /*name*/ + addResult( + factory.createImportDeclaration( + /*modifiers*/ void 0, - factory.createNamedImports([ - factory.createImportSpecifier( - /*isTypeOnly*/ - false, - localName !== verbatimTargetName ? factory.createIdentifier(verbatimTargetName) : void 0, - factory.createIdentifier(localName) - ) - ]) + factory.createImportClause( + /*isTypeOnly*/ + false, + /*name*/ + void 0, + factory.createNamedImports([ + factory.createImportSpecifier( + /*isTypeOnly*/ + false, + localName !== verbatimTargetName ? factory.createIdentifier(verbatimTargetName) : void 0, + factory.createIdentifier(localName) + ) + ]) + ), + specifier2, + node.parent.parent.parent.attributes ), - specifier2, - node.parent.parent.parent.assertClause - ), 0 /* None */); + 0 /* None */ + ); break; } case 281 /* ExportSpecifier */: @@ -52888,22 +53276,25 @@ ${lanes.join("\n")} } } function serializeExportSpecifier(localName, targetName, specifier) { - addResult(factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports([factory.createExportSpecifier( + addResult( + factory.createExportDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, - localName !== targetName ? targetName : void 0, - localName - )]), - specifier - ), 0 /* None */); + factory.createNamedExports([factory.createExportSpecifier( + /*isTypeOnly*/ + false, + localName !== targetName ? targetName : void 0, + localName + )]), + specifier + ), + 0 /* None */ + ); } function serializeMaybeAliasAssignment(symbol) { - var _a; + var _a2; if (symbol.flags & 4194304 /* Prototype */) { return false; } @@ -52948,20 +53339,23 @@ ${lanes.join("\n")} serializeExportSpecifier(name, getInternalSymbolName(target, symbolName(target))); } else { const varName = getUnusedName(name, symbol); - addResult(factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createIdentifier(varName), - symbolToName( - target, - context, - 67108863 /* All */, - /*expectsIdentifier*/ - false - ) - ), 0 /* None */); + addResult( + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createIdentifier(varName), + symbolToName( + target, + context, + 67108863 /* All */, + /*expectsIdentifier*/ + false + ) + ), + 0 /* None */ + ); serializeExportSpecifier(name, varName); } } @@ -52971,8 +53365,9 @@ ${lanes.join("\n")} const varName = getUnusedName(name, symbol); const typeToSerialize = getWidenedType(getTypeOfSymbol(getMergedSymbol(symbol))); if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) { - serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 1 /* Export */); + serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? 0 /* None */ : 32 /* Export */); } else { + const flags = ((_a2 = context.enclosingDeclaration) == null ? void 0 : _a2.kind) === 267 /* ModuleDeclaration */ && (!(symbol.flags & 98304 /* Accessor */) || symbol.flags & 65536 /* SetAccessor */) ? 1 /* Let */ : 2 /* Const */; const statement = factory.createVariableStatement( /*modifiers*/ void 0, @@ -52983,11 +53378,11 @@ ${lanes.join("\n")} void 0, serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled) ) - ], ((_a = context.enclosingDeclaration) == null ? void 0 : _a.kind) === 267 /* ModuleDeclaration */ ? 1 /* Let */ : 2 /* Const */) + ], flags) ); addResult( statement, - target && target.flags & 4 /* Property */ && target.escapedName === "export=" /* ExportEquals */ ? 2 /* Ambient */ : name === varName ? 1 /* Export */ : 0 /* None */ + target && target.flags & 4 /* Property */ && target.escapedName === "export=" /* ExportEquals */ ? 128 /* Ambient */ : name === varName ? 32 /* Export */ : 0 /* None */ ); } if (isExportAssignmentCompatibleSymbolName) { @@ -53009,79 +53404,114 @@ ${lanes.join("\n")} const ctxSrc = getSourceFileOfNode(context.enclosingDeclaration); return getObjectFlags(typeToSerialize) & (16 /* Anonymous */ | 32 /* Mapped */) && !length(getIndexInfosOfType(typeToSerialize)) && !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, 0 /* Call */))) && !length(getSignaturesOfType(typeToSerialize, 1 /* Construct */)) && // TODO: could probably serialize as function + ns + class, now that that's OK - !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => isIdentifierText(symbolName(p), languageVersion)); + !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && !some(getPropertiesOfType(typeToSerialize), (p) => isLateBoundName(p.escapedName)) && !some(getPropertiesOfType(typeToSerialize), (p) => some(p.declarations, (d) => getSourceFileOfNode(d) !== ctxSrc)) && every(getPropertiesOfType(typeToSerialize), (p) => { + if (!isIdentifierText(symbolName(p), languageVersion)) { + return false; + } + if (!(p.flags & 98304 /* Accessor */)) { + return true; + } + return getNonMissingTypeOfSymbol(p) === getWriteTypeOfSymbol(p); + }); } function makeSerializePropertySymbol(createProperty2, methodKind, useAccessors) { return function serializePropertySymbol(p, isStatic2, baseType) { - var _a, _b, _c, _d, _e; + var _a2, _b, _c, _d, _e; const modifierFlags = getDeclarationModifierFlagsFromSymbol(p); - const isPrivate = !!(modifierFlags & 8 /* Private */); + const isPrivate = !!(modifierFlags & 2 /* Private */); if (isStatic2 && p.flags & (788968 /* Type */ | 1920 /* Namespace */ | 2097152 /* Alias */)) { return []; } if (p.flags & 4194304 /* Prototype */ || p.escapedName === "constructor" || baseType && getPropertyOfType(baseType, p.escapedName) && isReadonlySymbol(getPropertyOfType(baseType, p.escapedName)) === isReadonlySymbol(p) && (p.flags & 16777216 /* Optional */) === (getPropertyOfType(baseType, p.escapedName).flags & 16777216 /* Optional */) && isTypeIdenticalTo(getTypeOfSymbol(p), getTypeOfPropertyOfType(baseType, p.escapedName))) { return []; } - const flag = modifierFlags & ~512 /* Async */ | (isStatic2 ? 32 /* Static */ : 0); + const flag = modifierFlags & ~1024 /* Async */ | (isStatic2 ? 256 /* Static */ : 0); const name = getPropertyNameNodeForSymbol(p, context); - const firstPropertyLikeDecl = (_a = p.declarations) == null ? void 0 : _a.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression)); + const firstPropertyLikeDecl = (_a2 = p.declarations) == null ? void 0 : _a2.find(or(isPropertyDeclaration, isAccessor, isVariableDeclaration, isPropertySignature, isBinaryExpression, isPropertyAccessExpression)); if (p.flags & 98304 /* Accessor */ && useAccessors) { const result = []; if (p.flags & 65536 /* SetAccessor */) { - result.push(setTextRange(factory.createSetAccessorDeclaration( - factory.createModifiersFromModifierFlags(flag), - name, - [factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "arg", - /*questionToken*/ - void 0, - isPrivate ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled) - )], - /*body*/ - void 0 - ), ((_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor)) || firstPropertyLikeDecl)); + const setter = p.declarations && forEach(p.declarations, (d) => { + if (d.kind === 178 /* SetAccessor */) { + return d; + } + if (isCallExpression(d) && isBindableObjectDefinePropertyCall(d)) { + return forEach(d.arguments[2].properties, (propDecl) => { + const id = getNameOfDeclaration(propDecl); + if (!!id && isIdentifier(id) && idText(id) === "set") { + return propDecl; + } + }); + } + }); + Debug.assert(!!setter); + const paramSymbol = isFunctionLikeDeclaration(setter) ? getSignatureFromDeclaration(setter).parameters[0] : void 0; + result.push(setTextRange( + factory.createSetAccessorDeclaration( + factory.createModifiersFromModifierFlags(flag), + name, + [factory.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + paramSymbol ? parameterToParameterDeclarationName(paramSymbol, getEffectiveParameterDeclaration(paramSymbol), context) : "value", + /*questionToken*/ + void 0, + isPrivate ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled) + )], + /*body*/ + void 0 + ), + ((_b = p.declarations) == null ? void 0 : _b.find(isSetAccessor)) || firstPropertyLikeDecl + )); } if (p.flags & 32768 /* GetAccessor */) { - const isPrivate2 = modifierFlags & 8 /* Private */; - result.push(setTextRange(factory.createGetAccessorDeclaration( - factory.createModifiersFromModifierFlags(flag), - name, - [], - isPrivate2 ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), - /*body*/ - void 0 - ), ((_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor)) || firstPropertyLikeDecl)); + const isPrivate2 = modifierFlags & 2 /* Private */; + result.push(setTextRange( + factory.createGetAccessorDeclaration( + factory.createModifiersFromModifierFlags(flag), + name, + [], + isPrivate2 ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), + /*body*/ + void 0 + ), + ((_c = p.declarations) == null ? void 0 : _c.find(isGetAccessor)) || firstPropertyLikeDecl + )); } return result; } else if (p.flags & (4 /* Property */ | 3 /* Variable */ | 98304 /* Accessor */)) { - return setTextRange(createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), - name, - p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - isPrivate ? void 0 : serializeTypeForDeclaration(context, getWriteTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), - // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 - // interface members can't have initializers, however class members _can_ - /*initializer*/ - void 0 - ), ((_d = p.declarations) == null ? void 0 : _d.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl); - } - if (p.flags & (8192 /* Method */ | 16 /* Function */)) { - const type = getTypeOfSymbol(p); - const signatures = getSignaturesOfType(type, 0 /* Call */); - if (flag & 8 /* Private */) { - return setTextRange(createProperty2( - factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 /* Readonly */ : 0) | flag), + return setTextRange( + createProperty2( + factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag), name, p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, - /*type*/ - void 0, + isPrivate ? void 0 : serializeTypeForDeclaration(context, getWriteTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), + // TODO: https://github.com/microsoft/TypeScript/pull/32372#discussion_r328386357 + // interface members can't have initializers, however class members _can_ /*initializer*/ void 0 - ), ((_e = p.declarations) == null ? void 0 : _e.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0]); + ), + ((_d = p.declarations) == null ? void 0 : _d.find(or(isPropertyDeclaration, isVariableDeclaration))) || firstPropertyLikeDecl + ); + } + if (p.flags & (8192 /* Method */ | 16 /* Function */)) { + const type = getTypeOfSymbol(p); + const signatures = getSignaturesOfType(type, 0 /* Call */); + if (flag & 2 /* Private */) { + return setTextRange( + createProperty2( + factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 8 /* Readonly */ : 0) | flag), + name, + p.flags & 16777216 /* Optional */ ? factory.createToken(58 /* QuestionToken */) : void 0, + /*type*/ + void 0, + /*initializer*/ + void 0 + ), + ((_e = p.declarations) == null ? void 0 : _e.find(isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0] + ); } const results2 = []; for (const sig of signatures) { @@ -53148,17 +53578,20 @@ ${lanes.join("\n")} let privateProtected = 0; for (const s of signatures) { if (s.declaration) { - privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 8 /* Private */ | 16 /* Protected */); + privateProtected |= getSelectedEffectiveModifierFlags(s.declaration, 2 /* Private */ | 4 /* Protected */); } } if (privateProtected) { - return [setTextRange(factory.createConstructorDeclaration( - factory.createModifiersFromModifierFlags(privateProtected), - /*parameters*/ - [], - /*body*/ - void 0 - ), signatures[0].declaration)]; + return [setTextRange( + factory.createConstructorDeclaration( + factory.createModifiersFromModifierFlags(privateProtected), + /*parameters*/ + [], + /*body*/ + void 0 + ), + signatures[0].declaration + )]; } } const results2 = []; @@ -53240,7 +53673,7 @@ ${lanes.join("\n")} } } function getUnusedName(input, symbol) { - var _a, _b; + var _a2, _b; const id = symbol ? getSymbolId(symbol) : void 0; if (id) { if (context.remappedSymbolNames.has(id)) { @@ -53252,7 +53685,7 @@ ${lanes.join("\n")} } let i = 0; const original = input; - while ((_a = context.usedSymbolNames) == null ? void 0 : _a.has(input)) { + while ((_a2 = context.usedSymbolNames) == null ? void 0 : _a2.has(input)) { i++; input = `${original}_${i}`; } @@ -53338,10 +53771,10 @@ ${lanes.join("\n")} return result || types; } function visibilityToString(flags) { - if (flags === 8 /* Private */) { + if (flags === 2 /* Private */) { return "private"; } - if (flags === 16 /* Protected */) { + if (flags === 4 /* Protected */) { return "protected"; } return "public"; @@ -53380,6 +53813,10 @@ ${lanes.join("\n")} } } function getNameOfSymbolAsWritten(symbol, context) { + var _a; + if ((_a = context == null ? void 0 : context.remappedSymbolReferences) == null ? void 0 : _a.has(getSymbolId(symbol))) { + symbol = context.remappedSymbolReferences.get(getSymbolId(symbol)); + } if (context && symbol.escapedName === "default" /* Default */ && !(context.flags & 16384 /* UseAliasDefinedOutsideCurrentScope */) && // If it's not the first part of an entity name, it must print as `default` (!(context.flags & 16777216 /* InInitialEntityName */) || // if the symbol is synthesized, it will only be referenced externally it must print as `default` !symbol.declarations || // if not in the same binding context (source file, module declaration), it must print as `default` @@ -53455,7 +53892,7 @@ ${lanes.join("\n")} return true; } const parent2 = getDeclarationContainer(node); - if (!(getCombinedModifierFlagsCached(node) & 1 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 312 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { + if (!(getCombinedModifierFlagsCached(node) & 32 /* Export */) && !(node.kind !== 271 /* ImportEqualsDeclaration */ && parent2.kind !== 312 /* SourceFile */ && parent2.flags & 33554432 /* Ambient */)) { return isGlobalSourceFile(parent2); } return isDeclarationVisible(parent2); @@ -53465,7 +53902,7 @@ ${lanes.join("\n")} case 178 /* SetAccessor */: case 174 /* MethodDeclaration */: case 173 /* MethodSignature */: - if (hasEffectiveModifier(node, 8 /* Private */ | 16 /* Protected */)) { + if (hasEffectiveModifier(node, 2 /* Private */ | 4 /* Protected */)) { return false; } case 176 /* Constructor */: @@ -53637,10 +54074,6 @@ ${lanes.join("\n")} const prop = getPropertyOfType(type, name); return prop ? getTypeOfSymbol(prop) : void 0; } - function getTypeOfPropertyOrIndexSignature(type, name) { - var _a; - return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) == null ? void 0 : _a.type) || unknownType; - } function getTypeOfPropertyOrIndexSignatureOfType(type, name) { var _a; let propType; @@ -53688,7 +54121,7 @@ ${lanes.join("\n")} const unspreadableToRestKeys = []; for (const prop of getPropertiesOfType(source)) { const literalTypeFromProperty = getLiteralTypeFromProperty(prop, 8576 /* StringOrNumberLiteralOrUnique */); - if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) && isSpreadableProperty(prop)) { + if (!isTypeAssignableTo(literalTypeFromProperty, omitKeyType) && !(getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) && isSpreadableProperty(prop)) { spreadableProperties.push(prop); } else { unspreadableToRestKeys.push(literalTypeFromProperty); @@ -53777,18 +54210,23 @@ ${lanes.join("\n")} return type.flags & (128 /* StringLiteral */ | 256 /* NumberLiteral */) ? "" + type.value : void 0; } function getTypeForBindingElement(declaration) { - const checkMode = declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */; + const checkMode = declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */; const parentType = getTypeForBindingElementParent(declaration.parent.parent, checkMode); - return parentType && getBindingElementTypeFromParentType(declaration, parentType); + return parentType && getBindingElementTypeFromParentType( + declaration, + parentType, + /*noTupleBoundsCheck*/ + false + ); } - function getBindingElementTypeFromParentType(declaration, parentType) { + function getBindingElementTypeFromParentType(declaration, parentType, noTupleBoundsCheck) { if (isTypeAny(parentType)) { return parentType; } const pattern = declaration.parent; if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) { parentType = getNonNullableType(parentType); - } else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) { + } else if (strictNullChecks && pattern.parent.initializer && !hasTypeFacts(getTypeOfInitializer(pattern.parent.initializer), 65536 /* EQUndefined */)) { parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */); } let type; @@ -53820,7 +54258,7 @@ ${lanes.join("\n")} type = everyType(baseConstraint, isTupleType) ? mapType(baseConstraint, (t) => sliceTupleType(t, index)) : createArrayType(elementType); } else if (isArrayLikeType(parentType)) { const indexType = getNumberLiteralType(index); - const accessFlags = 32 /* ExpressionPosition */ | (hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0); + const accessFlags = 32 /* ExpressionPosition */ | (noTupleBoundsCheck || hasDefaultValue(declaration) ? 16 /* NoTupleBoundsCheck */ : 0); const declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType; type = getFlowTypeOfDestructuring(declaration, declaredType); } else { @@ -53831,7 +54269,7 @@ ${lanes.join("\n")} return type; } if (getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration))) { - return strictNullChecks && !(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type; + return strictNullChecks && !hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type; } return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0 /* Normal */)], 2 /* Subtype */)); } @@ -53889,7 +54327,7 @@ ${lanes.join("\n")} if (declaredType) { return addOptionality(declaredType, isProperty, isOptional); } - if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 1 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { + if ((noImplicitAny || isInJSFile(declaration)) && isVariableDeclaration(declaration) && !isBindingPattern(declaration.name) && !(getCombinedModifierFlagsCached(declaration) & 32 /* Export */) && !(declaration.flags & 33554432 /* Ambient */)) { if (!(getCombinedNodeFlagsCached(declaration) & 6 /* Constant */) && (!declaration.initializer || isNullOrUndefined3(declaration.initializer))) { return autoType; } @@ -53937,7 +54375,7 @@ ${lanes.join("\n")} if (isPropertyDeclaration(declaration) && (noImplicitAny || isInJSFile(declaration))) { if (!hasStaticModifier(declaration)) { const constructor = findConstructorDeclaration(declaration.parent); - const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; + const type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; return type && addOptionality( type, /*isProperty*/ @@ -53946,7 +54384,7 @@ ${lanes.join("\n")} ); } else { const staticBlocks = filter(declaration.parent.members, isClassStaticBlockDeclaration); - const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 2 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; + const type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) : getEffectiveModifierFlags(declaration) & 128 /* Ambient */ ? getTypeOfPropertyInBaseClass(declaration.symbol) : void 0; return type && addOptionality( type, /*isProperty*/ @@ -54050,7 +54488,7 @@ ${lanes.join("\n")} return everyType(flowType, isNullableType) ? void 0 : convertAutoToAny(flowType); } function getFlowTypeOfProperty(reference, prop) { - const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 2 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType; + const initialType = (prop == null ? void 0 : prop.valueDeclaration) && (!isAutoTypedProperty(prop) || getEffectiveModifierFlags(prop.valueDeclaration) & 128 /* Ambient */) && getTypeOfPropertyInBaseClass(prop) || undefinedType; return getFlowTypeOfReference(reference, autoType, initialType); } function getWidenedTypeForAssignmentDeclaration(symbol, resolvedSymbol) { @@ -54674,6 +55112,9 @@ ${lanes.join("\n")} function getTypeOfAlias(symbol) { const links = getSymbolLinks(symbol); if (!links.type) { + if (!pushTypeResolution(symbol, 0 /* Type */)) { + return errorType; + } const targetSymbol = resolveAlias(symbol); const exportSymbol = symbol.declarations && getTargetOfAliasDeclaration( getDeclarationOfAliasSymbol(symbol), @@ -54682,6 +55123,10 @@ ${lanes.join("\n")} ); const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0); links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType; + if (!popTypeResolution()) { + reportCircularityError(exportSymbol ?? symbol); + return links.type = errorType; + } } return links.type; } @@ -54695,20 +55140,19 @@ ${lanes.join("\n")} } function reportCircularityError(symbol) { const declaration = symbol.valueDeclaration; - if (getEffectiveTypeAnnotationNode(declaration)) { - error2( - symbol.valueDeclaration, - Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, - symbolToString(symbol) - ); - return errorType; - } - if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { - error2( - symbol.valueDeclaration, - Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, - symbolToString(symbol) - ); + if (declaration) { + if (getEffectiveTypeAnnotationNode(declaration)) { + error2(symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); + return errorType; + } + if (noImplicitAny && (declaration.kind !== 169 /* Parameter */ || declaration.initializer)) { + error2(symbol.valueDeclaration, Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol)); + } + } else if (symbol.flags & 2097152 /* Alias */) { + const node = getDeclarationOfAliasSymbol(symbol); + if (node) { + error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); + } } return anyType; } @@ -54736,7 +55180,7 @@ ${lanes.join("\n")} return checkFlags & 2 /* SyntheticProperty */ ? checkFlags & 65536 /* DeferredType */ ? getWriteTypeOfSymbolWithDeferredType(symbol) || getTypeOfSymbolWithDeferredType(symbol) : ( // NOTE: cast to TransientSymbol should be safe because only TransientSymbols can have CheckFlags.SyntheticProperty symbol.links.writeType || symbol.links.type - ) : getTypeOfSymbol(symbol); + ) : removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216 /* Optional */)); } if (symbol.flags & 98304 /* Accessor */) { return checkFlags & 1 /* Instantiated */ ? getWriteTypeOfInstantiatedSymbol(symbol) : getWriteTypeOfAccessors(symbol); @@ -54919,10 +55363,7 @@ ${lanes.join("\n")} function getConstructorsForTypeArguments(type, typeArgumentNodes, location) { const typeArgCount = length(typeArgumentNodes); const isJavascript = isInJSFile(location); - return filter( - getSignaturesOfType(type, 1 /* Construct */), - (sig) => (isJavascript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= length(sig.typeParameters) - ); + return filter(getSignaturesOfType(type, 1 /* Construct */), (sig) => (isJavascript || typeArgCount >= getMinTypeArgumentCount(sig.typeParameters)) && typeArgCount <= length(sig.typeParameters)); } function getInstantiatedConstructorsForTypeArguments(type, typeArgumentNodes, location) { const signatures = getConstructorsForTypeArguments(type, typeArgumentNodes, location); @@ -55069,16 +55510,12 @@ ${lanes.join("\n")} return type.resolvedBaseTypes = emptyArray; } if (type === reducedBaseType || hasBaseType(reducedBaseType, type)) { - error2( - type.symbol.valueDeclaration, - Diagnostics.Type_0_recursively_references_itself_as_a_base_type, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 2 /* WriteArrayAsGenericType */ - ) - ); + error2(type.symbol.valueDeclaration, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString( + type, + /*enclosingDeclaration*/ + void 0, + 2 /* WriteArrayAsGenericType */ + )); return type.resolvedBaseTypes = emptyArray; } if (type.resolvedBaseTypes === resolvingEmptyArray) { @@ -55232,7 +55669,9 @@ ${lanes.join("\n")} if (hasBindableName(member)) { const memberSymbol = getSymbolOfDeclaration(member); const value = getEnumMemberValue(member); - const memberType = getFreshTypeOfLiteralType(value !== void 0 ? getEnumLiteralType(value, getSymbolId(symbol), memberSymbol) : createComputedEnumType(memberSymbol)); + const memberType = getFreshTypeOfLiteralType( + value !== void 0 ? getEnumLiteralType(value, getSymbolId(symbol), memberSymbol) : createComputedEnumType(memberSymbol) + ); getSymbolLinks(memberSymbol).declaredType = memberType; memberTypeList.push(getRegularTypeOfLiteralType(memberType)); } @@ -55445,7 +55884,7 @@ ${lanes.join("\n")} if (!lateSymbol) lateSymbols.set(memberName, lateSymbol = createSymbol(0 /* None */, memberName, 4096 /* Late */)); const earlySymbol = earlySymbols && earlySymbols.get(memberName); - if (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol) { + if (!(parent2.flags & 32 /* Class */) && (lateSymbol.flags & getExcludedSymbolFlags(symbolFlags) || earlySymbol)) { const declarations = earlySymbol ? concatenate(earlySymbol.declarations, lateSymbol.declarations) : lateSymbol.declarations; const name = !(type.flags & 8192 /* UniqueESSymbol */) && unescapeLeadingUnderscores(memberName) || declarationNameToString(declName); forEach(declarations, (declaration) => error2(getNameOfDeclaration(declaration) || declaration, Diagnostics.Property_0_was_also_declared_here, name)); @@ -55497,7 +55936,28 @@ ${lanes.join("\n")} } } } - links[resolutionKind] = combineSymbolTables(earlySymbols, lateSymbols) || emptySymbols; + let resolved = combineSymbolTables(earlySymbols, lateSymbols); + if (symbol.flags & 33554432 /* Transient */ && links.cjsExportMerged && symbol.declarations) { + for (const decl of symbol.declarations) { + const original = getSymbolLinks(decl.symbol)[resolutionKind]; + if (!resolved) { + resolved = original; + continue; + } + if (!original) + continue; + original.forEach((s, name) => { + const existing = resolved.get(name); + if (!existing) + resolved.set(name, s); + else if (existing === s) + return; + else + resolved.set(name, mergeSymbol(existing, s)); + }); + } + } + links[resolutionKind] = resolved || emptySymbols; } return links[resolutionKind]; } @@ -55556,7 +56016,13 @@ ${lanes.join("\n")} const baseTypes = getBaseTypes(source); if (baseTypes.length) { if (source.symbol && members === getMembersOfSymbol(source.symbol)) { - members = createSymbolTable(source.declaredProperties); + const symbolTable = createSymbolTable(); + for (const symbol of members.values()) { + if (!(symbol.flags & 262144 /* TypeParameter */)) { + symbolTable.set(symbol.escapedName, symbol); + } + } + members = symbolTable; } setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos); const thisArgument = lastOrUndefined(typeArguments); @@ -55587,7 +56053,7 @@ ${lanes.join("\n")} resolveObjectTypeMembers(type, source, typeParameters, paddedTypeArguments); } function createSignature(declaration, typeParameters, thisParameter, parameters, resolvedReturnType, resolvedTypePredicate, minArgumentCount, flags) { - const sig = new Signature15(checker, flags); + const sig = new Signature14(checker, flags); sig.declaration = declaration; sig.typeParameters = typeParameters; sig.parameters = parameters; @@ -55640,10 +56106,7 @@ ${lanes.join("\n")} return signature.optionalCallSignatureCache[key] || (signature.optionalCallSignatureCache[key] = createOptionalCallSignature(signature, callChainFlags)); } function createOptionalCallSignature(signature, callChainFlags) { - Debug.assert( - callChainFlags === 8 /* IsInnerCallChain */ || callChainFlags === 16 /* IsOuterCallChain */, - "An optional call signature can either be for an inner call chain or an outer call chain, but not both." - ); + Debug.assert(callChainFlags === 8 /* IsInnerCallChain */ || callChainFlags === 16 /* IsOuterCallChain */, "An optional call signature can either be for an inner call chain or an outer call chain, but not both."); const result = cloneSignature(signature); result.flags |= callChainFlags; return result; @@ -55692,7 +56155,7 @@ ${lanes.join("\n")} const baseConstructorType = getBaseConstructorTypeOfClass(classType); const baseSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); const declaration = getClassLikeDeclarationOfSymbol(classType.symbol); - const isAbstract = !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */); + const isAbstract = !!declaration && hasSyntacticModifier(declaration, 64 /* Abstract */); if (baseSignatures.length === 0) { return [createSignature( /*declaration*/ @@ -55879,13 +56342,14 @@ ${lanes.join("\n")} const paramName = leftName === rightName ? leftName : !leftName ? rightName : !rightName ? leftName : void 0; const paramSymbol = createSymbol( 1 /* FunctionScopedVariable */ | (isOptional && !isRestParam ? 16777216 /* Optional */ : 0), - paramName || `arg${i}` + paramName || `arg${i}`, + isRestParam ? 32768 /* RestParameter */ : isOptional ? 16384 /* OptionalParameter */ : 0 ); paramSymbol.links.type = isRestParam ? createArrayType(unionParamType) : unionParamType; params[i] = paramSymbol; } if (needsExtraRestElement) { - const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args"); + const restParamSymbol = createSymbol(1 /* FunctionScopedVariable */, "args", 32768 /* RestParameter */); restParamSymbol.links.type = createArrayType(getTypeAtPosition(shorter, longestCount)); if (shorter === right) { restParamSymbol.links.type = instantiateType(restParamSymbol.links.type, mapper); @@ -55930,11 +56394,7 @@ ${lanes.join("\n")} for (const info of sourceInfos) { const indexType = info.keyType; if (every(types, (t) => !!getIndexInfoOfType(t, indexType))) { - result.push(createIndexInfo( - indexType, - getUnionType(map(types, (t) => getIndexTypeOfType(t, indexType))), - some(types, (t) => getIndexInfoOfType(t, indexType).isReadonly) - )); + result.push(createIndexInfo(indexType, getUnionType(map(types, (t) => getIndexTypeOfType(t, indexType))), some(types, (t) => getIndexInfoOfType(t, indexType).isReadonly))); } } return result; @@ -56026,11 +56486,7 @@ ${lanes.join("\n")} for (let i = 0; i < indexInfos.length; i++) { const info = indexInfos[i]; if (info.keyType === newInfo.keyType) { - indexInfos[i] = createIndexInfo( - info.keyType, - union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), - union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly - ); + indexInfos[i] = createIndexInfo(info.keyType, union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly); return indexInfos; } } @@ -56110,20 +56566,23 @@ ${lanes.join("\n")} const classType = getDeclaredTypeOfClassOrInterface(symbol); let constructSignatures = symbol.members ? getSignaturesOfSymbol(symbol.members.get("__constructor" /* Constructor */)) : emptyArray; if (symbol.flags & 16 /* Function */) { - constructSignatures = addRange(constructSignatures.slice(), mapDefined( - type.callSignatures, - (sig) => isJSConstructor(sig.declaration) ? createSignature( - sig.declaration, - sig.typeParameters, - sig.thisParameter, - sig.parameters, - classType, - /*resolvedTypePredicate*/ - void 0, - sig.minArgumentCount, - sig.flags & 167 /* PropagatingFlags */ - ) : void 0 - )); + constructSignatures = addRange( + constructSignatures.slice(), + mapDefined( + type.callSignatures, + (sig) => isJSConstructor(sig.declaration) ? createSignature( + sig.declaration, + sig.typeParameters, + sig.thisParameter, + sig.parameters, + classType, + /*resolvedTypePredicate*/ + void 0, + sig.minArgumentCount, + sig.flags & 167 /* PropagatingFlags */ + ) : void 0 + ) + ); } if (!constructSignatures.length) { constructSignatures = getDefaultConstructSignatures(classType); @@ -56245,11 +56704,7 @@ ${lanes.join("\n")} const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && modifiersProp && isReadonlySymbol(modifiersProp)); const stripOptional = strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & 16777216 /* Optional */; const lateFlag = modifiersProp ? getIsLateCheckFlag(modifiersProp) : 0; - const prop = createSymbol( - 4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), - propName, - lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0) - ); + const prop = createSymbol(4 /* Property */ | (isOptional ? 16777216 /* Optional */ : 0), propName, lateFlag | 262144 /* Mapped */ | (isReadonly ? 8 /* Readonly */ : 0) | (stripOptional ? 524288 /* StripOptional */ : 0)); prop.links.mappedType = type; prop.links.nameType = propNameType; prop.links.keyType = keyType; @@ -56262,7 +56717,9 @@ ${lanes.join("\n")} } else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 /* Any */ | 32 /* Enum */)) { const indexKeyType = propNameType.flags & (1 /* Any */ | 4 /* String */) ? stringType : propNameType.flags & (8 /* Number */ | 32 /* Enum */) ? numberType : propNameType; const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType)); - const indexInfo = createIndexInfo(indexKeyType, propType, !!(templateModifiers & 1 /* IncludeReadonly */)); + const modifiersIndexInfo = getApplicableIndexInfo(modifiersType, propNameType); + const isReadonly = !!(templateModifiers & 1 /* IncludeReadonly */ || !(templateModifiers & 2 /* ExcludeReadonly */) && (modifiersIndexInfo == null ? void 0 : modifiersIndexInfo.isReadonly)); + const indexInfo = createIndexInfo(indexKeyType, propType, isReadonly); indexInfos = appendIndexInfo( indexInfos, indexInfo, @@ -56474,7 +56931,7 @@ ${lanes.join("\n")} } function isConstTypeVariable(type, depth = 0) { var _a; - return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 2048 /* Const */)) || type.flags & 1048576 /* Union */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); + return depth < 5 && !!(type && (type.flags & 262144 /* TypeParameter */ && some((_a = type.symbol) == null ? void 0 : _a.declarations, (d) => hasSyntacticModifier(d, 4096 /* Const */)) || type.flags & 3145728 /* UnionOrIntersection */ && some(type.types, (t) => isConstTypeVariable(t, depth)) || type.flags & 8388608 /* IndexedAccess */ && isConstTypeVariable(type.objectType, depth + 1) || type.flags & 16777216 /* Conditional */ && isConstTypeVariable(getConstraintOfConditionalType(type), depth + 1) || type.flags & 33554432 /* Substitution */ && isConstTypeVariable(type.baseType, depth) || isGenericTupleType(type) && findIndex(getElementTypes(type), (t, i) => !!(type.target.elementFlags[i] & 8 /* Variadic */) && isConstTypeVariable(t, depth)) >= 0)); } function getConstraintOfIndexedAccess(type) { return hasNonCircularBaseConstraint(type) ? getConstraintFromIndexedAccess(type) : void 0; @@ -56800,7 +57257,7 @@ ${lanes.join("\n")} } else if (!isUnion && !isReadonlySymbol(prop)) { checkFlags &= ~8 /* Readonly */; } - checkFlags |= (!(modifiers & 24 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 16 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 8 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 32 /* Static */ ? 2048 /* ContainsStatic */ : 0); + checkFlags |= (!(modifiers & 6 /* NonPublicAccessibilityModifier */) ? 256 /* ContainsPublic */ : 0) | (modifiers & 4 /* Protected */ ? 512 /* ContainsProtected */ : 0) | (modifiers & 2 /* Private */ ? 1024 /* ContainsPrivate */ : 0) | (modifiers & 256 /* Static */ ? 2048 /* ContainsStatic */ : 0); if (!isPrototypeProperty(prop)) { syntheticFlag = 2 /* SyntheticProperty */; } @@ -56856,7 +57313,8 @@ ${lanes.join("\n")} const writeType = getWriteTypeOfSymbol(prop); if (writeTypes || writeType !== type) { writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType); - } else if (type !== firstType) { + } + if (type !== firstType) { checkFlags |= 64 /* HasNonUniformType */; } if (isLiteralType(type) || isPatternLiteralType(type)) { @@ -56970,31 +57428,21 @@ ${lanes.join("\n")} if (type.flags & 2097152 /* Intersection */ && getObjectFlags(type) & 33554432 /* IsNeverIntersection */) { const neverProp = find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType); if (neverProp) { - return chainDiagnosticMessages( - errorInfo, - Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 536870912 /* NoTypeReduction */ - ), - symbolToString(neverProp) - ); + return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, typeToString( + type, + /*enclosingDeclaration*/ + void 0, + 536870912 /* NoTypeReduction */ + ), symbolToString(neverProp)); } const privateProp = find(getPropertiesOfUnionOrIntersectionType(type), isConflictingPrivateProperty); if (privateProp) { - return chainDiagnosticMessages( - errorInfo, - Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, - typeToString( - type, - /*enclosingDeclaration*/ - void 0, - 536870912 /* NoTypeReduction */ - ), - symbolToString(privateProp) - ); + return chainDiagnosticMessages(errorInfo, Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some, typeToString( + type, + /*enclosingDeclaration*/ + void 0, + 536870912 /* NoTypeReduction */ + ), symbolToString(privateProp)); } } return errorInfo; @@ -57079,16 +57527,12 @@ ${lanes.join("\n")} } } } - return applicableInfos ? createIndexInfo( - unknownType, - getIntersectionType(map(applicableInfos, (info) => info.type)), - reduceLeft( - applicableInfos, - (isReadonly, info) => isReadonly && info.isReadonly, - /*initial*/ - true - ) - ) : applicableInfo ? applicableInfo : stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo : void 0; + return applicableInfos ? createIndexInfo(unknownType, getIntersectionType(map(applicableInfos, (info) => info.type)), reduceLeft( + applicableInfos, + (isReadonly, info) => isReadonly && info.isReadonly, + /*initial*/ + true + )) : applicableInfo ? applicableInfo : stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo : void 0; } function isApplicableIndexType(source, target) { return isTypeAssignableTo(source, target) || target === stringType && isTypeAssignableTo(source, numberType) || target === numberType && (source === numericStringType || !!(source.flags & 128 /* StringLiteral */) && isNumericLiteralName(source.value)); @@ -57155,7 +57599,7 @@ ${lanes.join("\n")} } const iife = getImmediatelyInvokedFunctionExpression(node.parent); if (iife) { - return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= iife.arguments.length; + return !node.type && !node.dotDotDotToken && node.parent.parameters.indexOf(node) >= getEffectiveCallArguments(iife).length; } return false; } @@ -57265,7 +57709,7 @@ ${lanes.join("\n")} if (hasRestParameter(declaration) || isInJSFile(declaration) && maybeAddJsSyntheticRestParameter(declaration, parameters)) { flags |= 1 /* HasRestParameter */; } - if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 256 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 256 /* Abstract */)) { + if (isConstructorTypeNode(declaration) && hasSyntacticModifier(declaration, 64 /* Abstract */) || isConstructorDeclaration(declaration) && hasSyntacticModifier(declaration.parent, 64 /* Abstract */)) { flags |= 4 /* Abstract */; } links.resolvedSignature = createSignature( @@ -57440,12 +57884,7 @@ ${lanes.join("\n")} /*parameterIndex*/ void 0, type - ) : createTypePredicate( - node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, - parameterName.escapedText, - findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), - type - ); + ) : createTypePredicate(node.assertsModifier ? 3 /* AssertsIdentifier */ : 1 /* Identifier */, parameterName.escapedText, findIndex(signature.parameters, (p) => p.escapedName === parameterName.escapedText), type); } function getUnionOrIntersectionType(types, kind, unionReduction) { return kind !== 2097152 /* Intersection */ ? getUnionType(types, unionReduction) : getIntersectionType(types); @@ -57640,12 +58079,7 @@ ${lanes.join("\n")} if (parameter.type) { forEachType(getTypeFromTypeNode(parameter.type), (keyType) => { if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos, keyType)) { - indexInfos.push(createIndexInfo( - keyType, - declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, - hasEffectiveModifier(declaration, 64 /* Readonly */), - declaration - )); + indexInfos.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, hasEffectiveModifier(declaration, 8 /* Readonly */), declaration)); } }); } @@ -57676,9 +58110,12 @@ ${lanes.join("\n")} if (index < typeParameters.length) { const declaredConstraint = getConstraintOfTypeParameter(typeParameters[index]); if (declaredConstraint) { - const mapper = makeDeferredTypeMapper(typeParameters, typeParameters.map((_, index2) => () => { - return getEffectiveTypeArgumentAtIndex(typeReference, typeParameters, index2); - })); + const mapper = makeDeferredTypeMapper( + typeParameters, + typeParameters.map((_, index2) => () => { + return getEffectiveTypeArgumentAtIndex(typeReference, typeParameters, index2); + }) + ); const constraint = instantiateType(declaredConstraint, mapper); if (constraint !== typeParameter) { inferences = append(inferences, constraint); @@ -57695,10 +58132,7 @@ ${lanes.join("\n")} } else if (grandParent.kind === 200 /* MappedType */ && grandParent.type && skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 194 /* ConditionalType */ && grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 200 /* MappedType */ && grandParent.parent.checkType.type) { const checkMappedType2 = grandParent.parent.checkType; const nodeType = getTypeFromTypeNode(checkMappedType2.type); - inferences = append(inferences, instantiateType( - nodeType, - makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(checkMappedType2.typeParameter)), checkMappedType2.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType2.typeParameter.constraint) : keyofConstraintType) - )); + inferences = append(inferences, instantiateType(nodeType, makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(checkMappedType2.typeParameter)), checkMappedType2.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType2.typeParameter.constraint) : keyofConstraintType))); } } } @@ -57873,12 +58307,7 @@ ${lanes.join("\n")} const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments); let instantiation = links.instantiations.get(id); if (!instantiation) { - links.instantiations.set(id, instantiation = instantiateTypeWithAlias( - type, - createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), - aliasSymbol, - aliasTypeArguments - )); + links.instantiations.set(id, instantiation = instantiateTypeWithAlias(type, createTypeMapper(typeParameters, fillMissingTypeArguments(typeArguments, typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(symbol.valueDeclaration))), aliasSymbol, aliasTypeArguments)); } return instantiation; } @@ -57888,7 +58317,13 @@ ${lanes.join("\n")} const id = getAliasId(symbol, typeArguments); let errorType2 = errorTypes.get(id); if (!errorType2) { - errorType2 = createIntrinsicType(1 /* Any */, "error"); + errorType2 = createIntrinsicType( + 1 /* Any */, + "error", + /*objectFlags*/ + void 0, + `alias ${id}` + ); errorType2.aliasSymbol = symbol; errorType2.aliasTypeArguments = typeArguments; errorTypes.set(id, errorType2); @@ -58693,8 +59128,7 @@ ${lanes.join("\n")} if (elementFlags.length === 1 && elementFlags[0] & 4 /* Rest */) { return readonly ? globalReadonlyArrayType : globalArrayType; } - const memberIds = mapDefined(namedMemberDeclarations, (node) => node ? getNodeId(node) : void 0); - const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : ""); + const key = map(elementFlags, (f) => f & 1 /* Required */ ? "#" : f & 2 /* Optional */ ? "?" : f & 4 /* Rest */ ? "." : "*").join() + (readonly ? "R" : "") + (some(namedMemberDeclarations, (node) => !!node) ? "," + map(namedMemberDeclarations, (node) => node ? getNodeId(node) : "_").join(",") : ""); let type = tupleTypes.get(key); if (!type) { tupleTypes.set(key, type = createTupleTargetType(elementFlags, readonly, namedMemberDeclarations)); @@ -58714,11 +59148,7 @@ ${lanes.join("\n")} const flags = elementFlags[i]; combinedFlags |= flags; if (!(combinedFlags & 12 /* Variable */)) { - const property = createSymbol( - 4 /* Property */ | (flags & 2 /* Optional */ ? 16777216 /* Optional */ : 0), - "" + i, - readonly ? 8 /* Readonly */ : 0 - ); + const property = createSymbol(4 /* Property */ | (flags & 2 /* Optional */ ? 16777216 /* Optional */ : 0), "" + i, readonly ? 8 /* Readonly */ : 0); property.links.tupleLabelDeclaration = namedMemberDeclarations == null ? void 0 : namedMemberDeclarations[i]; property.links.type = typeParameter; properties.push(property); @@ -58789,7 +59219,10 @@ ${lanes.join("\n")} } else if (isTupleType(type)) { const elements = getElementTypes(type); if (elements.length + expandedTypes.length >= 1e4) { - error2(currentNode, isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent); + error2( + currentNode, + isPartOfTypeNode(currentNode) ? Diagnostics.Type_produces_a_tuple_type_that_is_too_large_to_represent : Diagnostics.Expression_produces_a_tuple_type_that_is_too_large_to_represent + ); return errorType; } forEach(elements, (t, n) => { @@ -58808,10 +59241,7 @@ ${lanes.join("\n")} expandedFlags[i] = 1 /* Required */; } if (firstRestIndex >= 0 && firstRestIndex < lastOptionalOrRestIndex) { - expandedTypes[firstRestIndex] = getUnionType(sameMap( - expandedTypes.slice(firstRestIndex, lastOptionalOrRestIndex + 1), - (t, i) => expandedFlags[firstRestIndex + i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t - )); + expandedTypes[firstRestIndex] = getUnionType(sameMap(expandedTypes.slice(firstRestIndex, lastOptionalOrRestIndex + 1), (t, i) => expandedFlags[firstRestIndex + i] & 8 /* Variadic */ ? getIndexedAccessType(t, numberType) : t)); expandedTypes.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedFlags.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); expandedDeclarations.splice(firstRestIndex + 1, lastOptionalOrRestIndex - firstRestIndex); @@ -58849,10 +59279,7 @@ ${lanes.join("\n")} ); } function getKnownKeysOfTupleType(type) { - return getUnionType(append( - arrayOf(type.target.fixedLength, (i) => getStringLiteralType("" + i)), - getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType) - )); + return getUnionType(append(arrayOf(type.target.fixedLength, (i) => getStringLiteralType("" + i)), getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType))); } function getStartElementCount(type, flags) { const index = findIndex(type.elementFlags, (f) => !(f & flags)); @@ -59158,12 +59585,7 @@ ${lanes.join("\n")} const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); - links.resolvedType = getUnionType( - map(node.types, getTypeFromTypeNode), - 1 /* Literal */, - aliasSymbol, - getTypeArgumentsForAliasSymbol(aliasSymbol) - ); + links.resolvedType = getUnionType(map(node.types, getTypeFromTypeNode), 1 /* Literal */, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol)); } return links.resolvedType; } @@ -59393,15 +59815,14 @@ ${lanes.join("\n")} function getConstituentCountOfTypes(types) { return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0); } - function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) { - return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType; - } function getTypeFromIntersectionTypeNode(node) { const links = getNodeLinks(node); if (!links.resolvedType) { const aliasSymbol = getAliasSymbolForTypeNode(node); const types = map(node.types, getTypeFromTypeNode); - const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0])); + const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1; + const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType; + const noSupertypeReduction = !!(t.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || t.flags & 134217728 /* TemplateLiteral */ && isPatternLiteralType(t)); links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction); } return links.resolvedType; @@ -59478,7 +59899,7 @@ ${lanes.join("\n")} return neverType; } function getLiteralTypeFromProperty(prop, include, includeNonPublic) { - if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 24 /* NonPublicAccessibilityModifier */)) { + if (includeNonPublic || !(getDeclarationModifierFlagsFromSymbol(prop) & 6 /* NonPublicAccessibilityModifier */)) { let type = getSymbolLinks(getLateBoundSymbol(prop)).nameType; if (!type) { const name = getNameOfDeclaration(prop.valueDeclaration); @@ -59512,11 +59933,7 @@ ${lanes.join("\n")} } function getIndexType(type, indexFlags = defaultIndexFlags) { type = getReducedType(type); - return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties( - type, - (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), - indexFlags === defaultIndexFlags - ); + return shouldDeferIndexType(type, indexFlags) ? getIndexTypeForGenericType(type, indexFlags) : type.flags & 1048576 /* Union */ ? getIntersectionType(map(type.types, (t) => getIndexType(t, indexFlags))) : type.flags & 2097152 /* Intersection */ ? getUnionType(map(type.types, (t) => getIndexType(t, indexFlags))) : getObjectFlags(type) & 32 /* Mapped */ ? getIndexTypeForMappedType(type, indexFlags) : type === wildcardType ? wildcardType : type.flags & 2 /* Unknown */ ? neverType : type.flags & (1 /* Any */ | 131072 /* Never */) ? keyofConstraintType : getLiteralTypeFromProperties(type, (indexFlags & 2 /* NoIndexSignatures */ ? 128 /* StringLiteral */ : 402653316 /* StringLike */) | (indexFlags & 1 /* StringsOnly */ ? 0 : 296 /* NumberLike */ | 12288 /* ESSymbolLike */), indexFlags === defaultIndexFlags); } function getExtractStringType(type) { if (keyofStringsOnly) { @@ -59617,11 +60034,6 @@ ${lanes.join("\n")} } function createTemplateLiteralType(texts, types) { const type = createType(134217728 /* TemplateLiteral */); - type.objectFlags = getPropagatingFlagsOfTypes( - types, - /*excludeKinds*/ - 98304 /* Nullable */ - ); type.texts = texts; type.types = types; return type; @@ -59744,7 +60156,7 @@ ${lanes.join("\n")} return autoType; } } - const propType = getTypeOfSymbol(prop); + const propType = accessFlags & 4 /* Writing */ ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop); return accessExpression && getAssignmentTargetKind(accessExpression) !== 1 /* Definite */ ? getFlowTypeOfReference(accessExpression, propType) : accessNode && isIndexedAccessTypeNode(accessNode) && containsMissingType(propType) ? getUnionType([propType, undefinedType]) : propType; } if (everyType(objectType, isTupleType) && isNumericLiteralName(propName)) { @@ -59756,13 +60168,7 @@ ${lanes.join("\n")} error2(indexNode, Diagnostics.A_tuple_type_cannot_be_indexed_with_a_negative_value); return undefinedType; } - error2( - indexNode, - Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, - typeToString(objectType), - getTypeReferenceArity(objectType), - unescapeLeadingUnderscores(propName) - ); + error2(indexNode, Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), getTypeReferenceArity(objectType), unescapeLeadingUnderscores(propName)); } else { error2(indexNode, Diagnostics.Property_0_does_not_exist_on_type_1, unescapeLeadingUnderscores(propName), typeToString(objectType)); } @@ -59781,7 +60187,11 @@ ${lanes.join("\n")} if (indexInfo) { if (accessFlags & 2 /* NoIndexSignatures */ && indexInfo.keyType !== numberType) { if (accessExpression) { - error2(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); + if (accessFlags & 4 /* Writing */) { + error2(accessExpression, Diagnostics.Type_0_is_generic_and_can_only_be_indexed_for_reading, typeToString(originalObjectType)); + } else { + error2(accessExpression, Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType)); + } } return void 0; } @@ -59918,7 +60328,15 @@ ${lanes.join("\n")} } function isPatternLiteralPlaceholderType(type) { if (type.flags & 2097152 /* Intersection */) { - return some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) || isPatternLiteralPlaceholderType(t)); + let seenPlaceholder = false; + for (const t of type.types) { + if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) { + seenPlaceholder = true; + } else if (!(t.flags & 524288 /* Object */)) { + return false; + } + } + return seenPlaceholder; } return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type); } @@ -59935,7 +60353,7 @@ ${lanes.join("\n")} return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericIndexType */); } function getGenericObjectFlags(type) { - if (type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */)) { + if (type.flags & 3145728 /* UnionOrIntersection */) { if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) { type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0); } @@ -59947,7 +60365,7 @@ ${lanes.join("\n")} } return type.objectFlags & 12582912 /* IsGenericType */; } - return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0); + return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0); } function getSimplifiedType(type, writing) { return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type; @@ -60429,7 +60847,7 @@ ${lanes.join("\n")} function getAnonymousPartialType(type2) { const members = createSymbolTable(); for (const prop of getPropertiesOfType(type2)) { - if (getDeclarationModifierFlagsFromSymbol(prop) & (8 /* Private */ | 16 /* Protected */)) { + if (getDeclarationModifierFlagsFromSymbol(prop) & (2 /* Private */ | 4 /* Protected */)) { } else if (isSpreadableProperty(prop)) { const isSetonlyAccessor = prop.flags & 65536 /* SetAccessor */ && !(prop.flags & 32768 /* GetAccessor */); const flags = 4 /* Property */ | 16777216 /* Optional */; @@ -60491,7 +60909,7 @@ ${lanes.join("\n")} const skippedPrivateMembers = /* @__PURE__ */ new Set(); const indexInfos = left === emptyObjectType ? getIndexInfosOfType(right) : getUnionIndexInfos([left, right]); for (const rightProp of getPropertiesOfType(right)) { - if (getDeclarationModifierFlagsFromSymbol(rightProp) & (8 /* Private */ | 16 /* Protected */)) { + if (getDeclarationModifierFlagsFromSymbol(rightProp) & (2 /* Private */ | 4 /* Protected */)) { skippedPrivateMembers.add(rightProp.escapedName); } else if (isSpreadableProperty(rightProp)) { members.set(rightProp.escapedName, getSpreadSymbol(rightProp, readonly)); @@ -60913,7 +61331,12 @@ ${lanes.join("\n")} function instantiateSymbol(symbol, mapper) { const links = getSymbolLinks(symbol); if (links.type && !couldContainTypeVariables(links.type)) { - return symbol; + if (!(symbol.flags & 65536 /* SetAccessor */)) { + return symbol; + } + if (links.writeType && !couldContainTypeVariables(links.writeType)) { + return symbol; + } } if (getCheckFlags(symbol) & 1 /* Instantiated */) { symbol = links.target; @@ -60968,7 +61391,7 @@ ${lanes.join("\n")} result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); target.instantiations.set(id, result); const resultObjectFlags = getObjectFlags(result); - if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { + if (result.flags & 3899393 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) { const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables); if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) { if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) { @@ -61043,24 +61466,29 @@ ${lanes.join("\n")} if (typeVariable) { const mappedTypeVariable = instantiateType(typeVariable, mapper); if (typeVariable !== mappedTypeVariable) { - return mapTypeWithAlias(getReducedType(mappedTypeVariable), (t) => { - if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) { - if (!type.declaration.nameType) { - let constraint; - if (isArrayType(t) || t.flags & 1 /* Any */ && findResolutionCycleStartIndex(typeVariable, 4 /* ImmediateBaseConstraint */) < 0 && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) { - return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper)); - } - if (isGenericTupleType(t)) { - return instantiateMappedGenericTupleType(t, type, typeVariable, mapper); - } - if (isTupleType(t)) { - return instantiateMappedTupleType(t, type, prependTypeMapping(typeVariable, t, mapper)); + return mapTypeWithAlias( + getReducedType(mappedTypeVariable), + (t) => { + if (t.flags & (3 /* AnyOrUnknown */ | 58982400 /* InstantiableNonPrimitive */ | 524288 /* Object */ | 2097152 /* Intersection */) && t !== wildcardType && !isErrorType(t)) { + if (!type.declaration.nameType) { + let constraint; + if (isArrayType(t) || t.flags & 1 /* Any */ && findResolutionCycleStartIndex(typeVariable, 4 /* ImmediateBaseConstraint */) < 0 && (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, isArrayOrTupleType)) { + return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper)); + } + if (isGenericTupleType(t)) { + return instantiateMappedGenericTupleType(t, type, typeVariable, mapper); + } + if (isTupleType(t)) { + return instantiateMappedTupleType(t, type, prependTypeMapping(typeVariable, t, mapper)); + } } + return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t, mapper)); } - return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t, mapper)); - } - return t; - }, aliasSymbol, aliasTypeArguments); + return t; + }, + aliasSymbol, + aliasTypeArguments + ); } } return instantiateType(getConstraintTypeFromMappedType(type), mapper) === wildcardType ? wildcardType : instantiateAnonymousType(type, mapper, aliasSymbol, aliasTypeArguments); @@ -61454,10 +61882,13 @@ ${lanes.join("\n")} const resultObj = errorOutputContainer || {}; checkTypeAssignableTo(source, target, node, headMessage, containingMessageChain, resultObj); const diagnostic = resultObj.errors[resultObj.errors.length - 1]; - addRelatedInfo(diagnostic, createDiagnosticForNode( - node, - signatures === constructSignatures ? Diagnostics.Did_you_mean_to_use_new_with_this_expression : Diagnostics.Did_you_mean_to_call_this_expression - )); + addRelatedInfo( + diagnostic, + createDiagnosticForNode( + node, + signatures === constructSignatures ? Diagnostics.Did_you_mean_to_use_new_with_this_expression : Diagnostics.Did_you_mean_to_call_this_expression + ) + ); return true; } } @@ -61514,10 +61945,13 @@ ${lanes.join("\n")} ); if (resultObj.errors) { if (target.symbol && length(target.symbol.declarations)) { - addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], createDiagnosticForNode( - target.symbol.declarations[0], - Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature - )); + addRelatedInfo( + resultObj.errors[resultObj.errors.length - 1], + createDiagnosticForNode( + target.symbol.declarations[0], + Diagnostics.The_expected_type_comes_from_the_return_type_of_this_signature + ) + ); } if ((getFunctionFlags(node) & 2 /* Async */) === 0 && !getTypeOfPropertyOfType(sourceReturn, "then") && checkTypeRelatedTo( createPromiseType(sourceReturn), @@ -61526,10 +61960,13 @@ ${lanes.join("\n")} /*errorNode*/ void 0 )) { - addRelatedInfo(resultObj.errors[resultObj.errors.length - 1], createDiagnosticForNode( - node, - Diagnostics.Did_you_mean_to_mark_this_function_as_async - )); + addRelatedInfo( + resultObj.errors[resultObj.errors.length - 1], + createDiagnosticForNode( + node, + Diagnostics.Did_you_mean_to_mark_this_function_as_async + ) + ); } return true; } @@ -61624,12 +62061,15 @@ ${lanes.join("\n")} if (!issuedElaboration && (targetProp && length(targetProp.declarations) || target.symbol && length(target.symbol.declarations))) { const targetNode = targetProp && length(targetProp.declarations) ? targetProp.declarations[0] : target.symbol.declarations[0]; if (!getSourceFileOfNode(targetNode).hasNoDefaultLib) { - addRelatedInfo(reportedDiag, createDiagnosticForNode( - targetNode, - Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1, - propertyName && !(nameType.flags & 8192 /* UniqueESSymbol */) ? unescapeLeadingUnderscores(propertyName) : typeToString(nameType), - typeToString(target) - )); + addRelatedInfo( + reportedDiag, + createDiagnosticForNode( + targetNode, + Diagnostics.The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1, + propertyName && !(nameType.flags & 8192 /* UniqueESSymbol */) ? unescapeLeadingUnderscores(propertyName) : typeToString(nameType), + typeToString(target) + ) + ); } } } @@ -61830,14 +62270,7 @@ ${lanes.join("\n")} const childrenPropName = childPropName === void 0 ? "children" : unescapeLeadingUnderscores(childPropName); const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName)); const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2; - invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage( - /*dummy*/ - void 0, - diagnostic, - tagNameText, - childrenPropName, - typeToString(childrenTargetType) - ) }; + invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) }; } return invalidTextDiagnostic; } @@ -62001,7 +62434,7 @@ ${lanes.join("\n")} if (sourceType && targetType) { const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType)); const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType)); - const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && (getTypeFacts(sourceType) & 50331648 /* IsUndefinedOrNull */) === (getTypeFacts(targetType) & 50331648 /* IsUndefinedOrNull */); + const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && getTypeFacts(sourceType, 50331648 /* IsUndefinedOrNull */) === getTypeFacts(targetType, 50331648 /* IsUndefinedOrNull */); let related = callbacks ? compareSignaturesRelated(targetSig, sourceSig, checkMode & 8 /* StrictArity */ | (strictVariance ? 2 /* StrictCallback */ : 1 /* BivariantCallback */), reportErrors2, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !(checkMode & 3 /* Callback */) && !strictVariance && compareTypes( sourceType, targetType, @@ -62018,11 +62451,7 @@ ${lanes.join("\n")} } if (!related) { if (reportErrors2) { - errorReporter( - Diagnostics.Types_of_parameters_0_and_1_are_incompatible, - unescapeLeadingUnderscores(getParameterNameAtPosition(source, i)), - unescapeLeadingUnderscores(getParameterNameAtPosition(target, i)) - ); + errorReporter(Diagnostics.Types_of_parameters_0_and_1_are_incompatible, unescapeLeadingUnderscores(getParameterNameAtPosition(source, i)), unescapeLeadingUnderscores(getParameterNameAtPosition(target, i))); } return 0 /* False */; } @@ -62143,16 +62572,12 @@ ${lanes.join("\n")} const targetProperty = getPropertyOfType(targetEnumType, property.escapedName); if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) { if (errorReporter) { - errorReporter( - Diagnostics.Property_0_is_missing_in_type_1, - symbolName(property), - typeToString( - getDeclaredTypeOfSymbol(targetSymbol), - /*enclosingDeclaration*/ - void 0, - 64 /* UseFullyQualifiedType */ - ) - ); + errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property), typeToString( + getDeclaredTypeOfSymbol(targetSymbol), + /*enclosingDeclaration*/ + void 0, + 64 /* UseFullyQualifiedType */ + )); enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */); } else { enumRelation.set(id, 2 /* Failed */); @@ -62300,8 +62725,10 @@ ${lanes.join("\n")} let expandingFlags = 0 /* None */; let overflow = false; let overrideNextErrorInfo = 0; + let skipParentCounter = 0; let lastSkippedInfo; let incompatibleStack; + let relationCount = 16e6 - relation.size >> 3; Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); const result = isRelatedTo( source, @@ -62315,8 +62742,19 @@ ${lanes.join("\n")} reportIncompatibleStack(); } if (overflow) { + const id = getRelationKey( + source, + target, + /*intersectionState*/ + 0 /* None */, + relation, + /*ignoreConstraints*/ + false + ); + relation.set(id, 4 /* Reported */ | 2 /* Failed */); (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.CheckTypes, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth }); - const diag2 = error2(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); + const message = relationCount <= 0 ? Diagnostics.Excessive_complexity_comparing_types_0_and_1 : Diagnostics.Excessive_stack_depth_comparing_types_0_and_1; + const diag2 = error2(errorNode || currentNode, message, typeToString(source), typeToString(target)); if (errorOutputContainer) { (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag2); } @@ -62365,6 +62803,7 @@ ${lanes.join("\n")} lastSkippedInfo = saved.lastSkippedInfo; incompatibleStack = saved.incompatibleStack; overrideNextErrorInfo = saved.overrideNextErrorInfo; + skipParentCounter = saved.skipParentCounter; relatedInfo = saved.relatedInfo; } function captureErrorCalculationState() { @@ -62373,6 +62812,7 @@ ${lanes.join("\n")} lastSkippedInfo, incompatibleStack: incompatibleStack == null ? void 0 : incompatibleStack.slice(), overrideNextErrorInfo, + skipParentCounter, relatedInfo: relatedInfo == null ? void 0 : relatedInfo.slice() }; } @@ -62477,7 +62917,15 @@ ${lanes.join("\n")} reportIncompatibleStack(); if (message.elidedInCompatabilityPyramid) return; - errorInfo = chainDiagnosticMessages(errorInfo, message, ...args); + if (skipParentCounter === 0) { + errorInfo = chainDiagnosticMessages(errorInfo, message, ...args); + } else { + skipParentCounter--; + } + } + function reportParentSkippedError(message, ...args) { + reportError(message, ...args); + skipParentCounter++; } function associateRelatedInfo(info) { Debug.assert(!!errorInfo); @@ -62814,18 +63262,9 @@ ${lanes.join("\n")} } } if (suggestion !== void 0) { - reportError( - Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, - symbolToString(prop), - typeToString(errorTarget), - suggestion - ); + reportParentSkippedError(Diagnostics.Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2, symbolToString(prop), typeToString(errorTarget), suggestion); } else { - reportError( - Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, - symbolToString(prop), - typeToString(errorTarget) - ); + reportParentSkippedError(Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(errorTarget)); } } } @@ -62846,6 +63285,16 @@ ${lanes.join("\n")} } function unionOrIntersectionRelatedTo(source2, target2, reportErrors2, intersectionState) { if (source2.flags & 1048576 /* Union */) { + if (target2.flags & 1048576 /* Union */) { + const sourceOrigin = source2.origin; + if (sourceOrigin && sourceOrigin.flags & 2097152 /* Intersection */ && target2.aliasSymbol && contains(sourceOrigin.types, target2)) { + return -1 /* True */; + } + const targetOrigin = target2.origin; + if (targetOrigin && targetOrigin.flags & 1048576 /* Union */ && source2.aliasSymbol && contains(targetOrigin.types, source2)) { + return -1 /* True */; + } + } return relation === comparableRelation ? someTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState) : eachTypeRelatedToType(source2, target2, reportErrors2 && !(source2.flags & 402784252 /* Primitive */), intersectionState); } if (target2.flags & 1048576 /* Union */) { @@ -63159,6 +63608,10 @@ ${lanes.join("\n")} return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */; } } + if (relationCount <= 0) { + overflow = true; + return 0 /* False */; + } if (!maybeKeys) { maybeKeys = []; maybeKeysSet = /* @__PURE__ */ new Set(); @@ -63252,6 +63705,7 @@ ${lanes.join("\n")} } } else { relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags); + relationCount--; resetMaybeStack( /*markAllAsSucceeded*/ false @@ -63263,6 +63717,7 @@ ${lanes.join("\n")} maybeKeysSet.delete(maybeKeys[i]); if (markAllAsSucceeded) { relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags); + relationCount--; } } maybeCount = maybeStart; @@ -64021,42 +64476,27 @@ ${lanes.join("\n")} function propertyRelatedTo(source2, target2, sourceProp, targetProp, getTypeOfSourceProperty, reportErrors2, intersectionState, skipOptional) { const sourcePropFlags = getDeclarationModifierFlagsFromSymbol(sourceProp); const targetPropFlags = getDeclarationModifierFlagsFromSymbol(targetProp); - if (sourcePropFlags & 8 /* Private */ || targetPropFlags & 8 /* Private */) { + if (sourcePropFlags & 2 /* Private */ || targetPropFlags & 2 /* Private */) { if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { if (reportErrors2) { - if (sourcePropFlags & 8 /* Private */ && targetPropFlags & 8 /* Private */) { + if (sourcePropFlags & 2 /* Private */ && targetPropFlags & 2 /* Private */) { reportError(Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp)); } else { - reportError( - Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, - symbolToString(targetProp), - typeToString(sourcePropFlags & 8 /* Private */ ? source2 : target2), - typeToString(sourcePropFlags & 8 /* Private */ ? target2 : source2) - ); + reportError(Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourcePropFlags & 2 /* Private */ ? source2 : target2), typeToString(sourcePropFlags & 2 /* Private */ ? target2 : source2)); } } return 0 /* False */; } - } else if (targetPropFlags & 16 /* Protected */) { + } else if (targetPropFlags & 4 /* Protected */) { if (!isValidOverrideOf(sourceProp, targetProp)) { if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, - symbolToString(targetProp), - typeToString(getDeclaringClass(sourceProp) || source2), - typeToString(getDeclaringClass(targetProp) || target2) - ); + reportError(Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(getDeclaringClass(sourceProp) || source2), typeToString(getDeclaringClass(targetProp) || target2)); } return 0 /* False */; } - } else if (sourcePropFlags & 16 /* Protected */) { + } else if (sourcePropFlags & 4 /* Protected */) { if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, - symbolToString(targetProp), - typeToString(source2), - typeToString(target2) - ); + reportError(Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, symbolToString(targetProp), typeToString(source2), typeToString(target2)); } return 0 /* False */; } @@ -64072,12 +64512,7 @@ ${lanes.join("\n")} } if (!skipOptional && sourceProp.flags & 16777216 /* Optional */ && targetProp.flags & 106500 /* ClassMember */ && !(targetProp.flags & 16777216 /* Optional */)) { if (reportErrors2) { - reportError( - Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, - symbolToString(targetProp), - typeToString(source2), - typeToString(target2) - ); + reportError(Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source2), typeToString(target2)); } return 0 /* False */; } @@ -64323,8 +64758,14 @@ ${lanes.join("\n")} } const sourceIsJSConstructor = source2.symbol && isJSConstructor(source2.symbol.valueDeclaration); const targetIsJSConstructor = target2.symbol && isJSConstructor(target2.symbol.valueDeclaration); - const sourceSignatures = getSignaturesOfType(source2, sourceIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind); - const targetSignatures = getSignaturesOfType(target2, targetIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind); + const sourceSignatures = getSignaturesOfType( + source2, + sourceIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind + ); + const targetSignatures = getSignaturesOfType( + target2, + targetIsJSConstructor && kind === 1 /* Construct */ ? 0 /* Call */ : kind + ); if (kind === 1 /* Construct */ && sourceSignatures.length && targetSignatures.length) { const sourceIsAbstract = !!(sourceSignatures[0].flags & 4 /* Abstract */); const targetIsAbstract = !!(targetSignatures[0].flags & 4 /* Abstract */); @@ -64398,18 +64839,14 @@ ${lanes.join("\n")} shouldElaborateErrors = false; } if (shouldElaborateErrors) { - reportError( - Diagnostics.Type_0_provides_no_match_for_the_signature_1, - typeToString(source2), - signatureToString( - t, - /*enclosingDeclaration*/ - void 0, - /*flags*/ - void 0, - kind - ) - ); + reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1, typeToString(source2), signatureToString( + t, + /*enclosingDeclaration*/ + void 0, + /*flags*/ + void 0, + kind + )); } return 0 /* False */; } @@ -64442,16 +64879,7 @@ ${lanes.join("\n")} } function signatureRelatedTo(source2, target2, erase, reportErrors2, intersectionState, incompatibleReporter) { const checkMode = relation === subtypeRelation ? 16 /* StrictTopSignature */ : relation === strictSubtypeRelation ? 16 /* StrictTopSignature */ | 8 /* StrictArity */ : 0 /* None */; - return compareSignaturesRelated( - erase ? getErasedSignature(source2) : source2, - erase ? getErasedSignature(target2) : target2, - checkMode, - reportErrors2, - reportError, - incompatibleReporter, - isRelatedToWorker2, - reportUnreliableMapper - ); + return compareSignaturesRelated(erase ? getErasedSignature(source2) : source2, erase ? getErasedSignature(target2) : target2, checkMode, reportErrors2, reportError, incompatibleReporter, isRelatedToWorker2, reportUnreliableMapper); function isRelatedToWorker2(source3, target3, reportErrors3) { return isRelatedTo( source3, @@ -64596,15 +65024,15 @@ ${lanes.join("\n")} if (!sourceSignature.declaration || !targetSignature.declaration) { return true; } - const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 24 /* NonPublicAccessibilityModifier */); - const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 24 /* NonPublicAccessibilityModifier */); - if (targetAccessibility === 8 /* Private */) { + const sourceAccessibility = getSelectedEffectiveModifierFlags(sourceSignature.declaration, 6 /* NonPublicAccessibilityModifier */); + const targetAccessibility = getSelectedEffectiveModifierFlags(targetSignature.declaration, 6 /* NonPublicAccessibilityModifier */); + if (targetAccessibility === 2 /* Private */) { return true; } - if (targetAccessibility === 16 /* Protected */ && sourceAccessibility !== 8 /* Private */) { + if (targetAccessibility === 4 /* Protected */ && sourceAccessibility !== 2 /* Private */) { return true; } - if (targetAccessibility !== 16 /* Protected */ && !sourceAccessibility) { + if (targetAccessibility !== 4 /* Protected */ && !sourceAccessibility) { return true; } if (reportErrors2) { @@ -64704,7 +65132,7 @@ ${lanes.join("\n")} const variances = []; for (const tp of typeParameters) { const modifiers = getTypeParameterModifiers(tp); - let variance = modifiers & 65536 /* Out */ ? modifiers & 32768 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 32768 /* In */ ? 2 /* Contravariant */ : void 0; + let variance = modifiers & 16384 /* Out */ ? modifiers & 8192 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ : modifiers & 8192 /* In */ ? 2 /* Contravariant */ : void 0; if (variance === void 0) { let unmeasurable = false; let unreliable = false; @@ -64752,7 +65180,7 @@ ${lanes.join("\n")} } function getTypeParameterModifiers(tp) { var _a; - return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (32768 /* In */ | 65536 /* Out */ | 2048 /* Const */); + return reduceLeft((_a = tp.symbol) == null ? void 0 : _a.declarations, (modifiers, d) => modifiers | getEffectiveModifierFlags(d), 0 /* None */) & (8192 /* In */ | 16384 /* Out */ | 4096 /* Const */); } function hasCovariantVoidArgument(typeArguments, variances) { for (let i = 0; i < variances.length; i++) { @@ -64837,13 +65265,16 @@ ${lanes.join("\n")} }); } function isValidOverrideOf(sourceProp, targetProp) { - return !forEachProperty2(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 16 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false); + return !forEachProperty2(targetProp, (tp) => getDeclarationModifierFlagsFromSymbol(tp) & 4 /* Protected */ ? !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false); } function isClassDerivedFromDeclaringClasses(checkClass, prop, writing) { - return forEachProperty2(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 16 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass; + return forEachProperty2(prop, (p) => getDeclarationModifierFlagsFromSymbol(p, writing) & 4 /* Protected */ ? !hasBaseType(checkClass, getDeclaringClass(p)) : false) ? void 0 : checkClass; } function isDeeplyNestedType(type, stack, depth, maxDepth = 3) { if (depth >= maxDepth) { + if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) { + type = getMappedTargetWithSymbol(type); + } if (type.flags & 2097152 /* Intersection */) { return some(type.types, (t) => isDeeplyNestedType(t, stack, depth, maxDepth)); } @@ -64852,7 +65283,7 @@ ${lanes.join("\n")} let lastTypeId = 0; for (let i = 0; i < depth; i++) { const t = stack[i]; - if (t.flags & 2097152 /* Intersection */ ? some(t.types, (u) => getRecursionIdentity(u) === identity2) : getRecursionIdentity(t) === identity2) { + if (hasMatchingRecursionIdentity(t, identity2)) { if (t.id >= lastTypeId) { count++; if (count >= maxDepth) { @@ -64865,6 +65296,22 @@ ${lanes.join("\n")} } return false; } + function getMappedTargetWithSymbol(type) { + let target; + while ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */ && (target = getModifiersTypeFromMappedType(type)) && (target.symbol || target.flags & 2097152 /* Intersection */ && some(target.types, (t) => !!t.symbol))) { + type = target; + } + return type; + } + function hasMatchingRecursionIdentity(type, identity2) { + if ((getObjectFlags(type) & 96 /* InstantiatedMapped */) === 96 /* InstantiatedMapped */) { + type = getMappedTargetWithSymbol(type); + } + if (type.flags & 2097152 /* Intersection */) { + return some(type.types, (t) => hasMatchingRecursionIdentity(t, identity2)); + } + return getRecursionIdentity(type) === identity2; + } function getRecursionIdentity(type) { if (type.flags & 524288 /* Object */ && !isObjectOrArrayLiteralType(type)) { if (getObjectFlags(type) & 4 /* Reference */ && type.node) { @@ -64898,8 +65345,8 @@ ${lanes.join("\n")} if (sourceProp === targetProp) { return -1 /* True */; } - const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 24 /* NonPublicAccessibilityModifier */; - const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 24 /* NonPublicAccessibilityModifier */; + const sourcePropAccessibility = getDeclarationModifierFlagsFromSymbol(sourceProp) & 6 /* NonPublicAccessibilityModifier */; + const targetPropAccessibility = getDeclarationModifierFlagsFromSymbol(targetProp) & 6 /* NonPublicAccessibilityModifier */; if (sourcePropAccessibility !== targetPropAccessibility) { return 0 /* False */; } @@ -65037,6 +65484,9 @@ ${lanes.join("\n")} function isArrayLikeType(type) { return isArrayType(type) || !(type.flags & 98304 /* Nullable */) && isTypeAssignableTo(type, anyReadonlyArrayType); } + function isMutableArrayLikeType(type) { + return isMutableArrayOrTuple(type) || !(type.flags & (1 /* Any */ | 98304 /* Nullable */)) && isTypeAssignableTo(type, anyArrayType); + } function getSingleBaseForNonAugmentingSubtype(type) { if (!(getObjectFlags(type) & 4 /* Reference */) || !(getObjectFlags(type.target) & 3 /* ClassOrInterface */)) { return void 0; @@ -65191,7 +65641,7 @@ ${lanes.join("\n")} return value.base10Value === "0"; } function removeDefinitelyFalsyTypes(type) { - return filterType(type, (t) => !!(getTypeFacts(t) & 4194304 /* Truthy */)); + return filterType(type, (t) => hasTypeFacts(t, 4194304 /* Truthy */)); } function extractDefinitelyFalsyTypes(type) { return mapType(type, getDefinitelyFalsyPartOfType); @@ -65360,13 +65810,7 @@ ${lanes.join("\n")} } } } - const result = createAnonymousType( - type.symbol, - members, - emptyArray, - emptyArray, - sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly)) - ); + const result = createAnonymousType(type.symbol, members, emptyArray, emptyArray, sameMap(getIndexInfosOfType(type), (info) => createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly))); result.objectFlags |= getObjectFlags(type) & (4096 /* JSLiteral */ | 262144 /* NonInferrableType */); return result; } @@ -65460,7 +65904,7 @@ ${lanes.join("\n")} const param = declaration; if (isIdentifier(param.name)) { const originalKeywordKind = identifierToKeywordKind(param.name); - if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.indexOf(param) > -1 && (resolveName( + if ((isCallSignatureDeclaration(param.parent) || isMethodSignature(param.parent) || isFunctionTypeNode(param.parent)) && param.parent.parameters.includes(param) && (resolveName( param, param.name.escapedText, 788968 /* Type */, @@ -65546,7 +65990,12 @@ ${lanes.join("\n")} callback(getTypeAtPosition(source, i), getTypeAtPosition(target, i)); } if (targetRestType) { - callback(getRestTypeAtPosition(source, paramCount), targetRestType); + callback(getRestTypeAtPosition( + source, + paramCount, + /*readonly*/ + isConstTypeVariable(targetRestType) && !someType(targetRestType, isMutableArrayLikeType) + ), targetRestType); } } function applyToReturnTypes(source, target, callback) { @@ -65579,19 +66028,25 @@ ${lanes.join("\n")} return context; } function makeFixingMapperForContext(context) { - return makeDeferredTypeMapper(map(context.inferences, (i) => i.typeParameter), map(context.inferences, (inference, i) => () => { - if (!inference.isFixed) { - inferFromIntraExpressionSites(context); - clearCachedInferences(context.inferences); - inference.isFixed = true; - } - return getInferredType(context, i); - })); + return makeDeferredTypeMapper( + map(context.inferences, (i) => i.typeParameter), + map(context.inferences, (inference, i) => () => { + if (!inference.isFixed) { + inferFromIntraExpressionSites(context); + clearCachedInferences(context.inferences); + inference.isFixed = true; + } + return getInferredType(context, i); + }) + ); } function makeNonFixingMapperForContext(context) { - return makeDeferredTypeMapper(map(context.inferences, (i) => i.typeParameter), map(context.inferences, (_, i) => () => { - return getInferredType(context, i); - })); + return makeDeferredTypeMapper( + map(context.inferences, (i) => i.typeParameter), + map(context.inferences, (_, i) => () => { + return getInferredType(context, i); + }) + ); } function clearCachedInferences(inferences) { for (const inference of inferences) { @@ -65650,8 +66105,8 @@ ${lanes.join("\n")} if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) { return !!(objectFlags & 1048576 /* CouldContainTypeVariables */); } - const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables)); - if (type.flags & 138117121 /* ObjectFlagsType */) { + const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables)); + if (type.flags & 3899393 /* ObjectFlagsType */) { type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0); } return result; @@ -65848,6 +66303,9 @@ ${lanes.join("\n")} if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) { return true; } + if (target.flags & 2097152 /* Intersection */) { + return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t)); + } if (source.flags & 128 /* StringLiteral */) { const value = source.value; return !!(target.flags & 8 /* Number */ && isValidNumberString( @@ -65858,7 +66316,7 @@ ${lanes.join("\n")} value, /*roundTripOnly*/ false - ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target)); + ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target)); } if (source.flags & 134217728 /* TemplateLiteral */) { const texts = source.texts; @@ -65933,7 +66391,6 @@ ${lanes.join("\n")} let bivariant = false; let propagationType; let inferencePriority = 2048 /* MaxValue */; - let allowComplexConstraintInference = true; let visited; let sourceStack; let targetStack; @@ -65943,7 +66400,7 @@ ${lanes.join("\n")} if (!couldContainTypeVariables(target)) { return; } - if (source === wildcardType) { + if (source === wildcardType || source === blockedStringType) { const savePropagationType = propagationType; propagationType = source; inferFromTypes(target, target); @@ -66000,6 +66457,10 @@ ${lanes.join("\n")} return; } if (!inference.isFixed) { + const candidate = propagationType || source; + if (candidate === blockedStringType) { + return; + } if (inference.priority === void 0 || priority < inference.priority) { inference.candidates = void 0; inference.contraCandidates = void 0; @@ -66007,7 +66468,6 @@ ${lanes.join("\n")} inference.priority = priority; } if (priority === inference.priority) { - const candidate = propagationType || source; if (contravariant && !bivariant) { if (!contains(inference.contraCandidates, candidate)) { inference.contraCandidates = append(inference.contraCandidates, candidate); @@ -66088,8 +66548,7 @@ ${lanes.join("\n")} source = getReducedType(source); if (!(priority & 512 /* NoConstraints */ && source.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */))) { const apparentSource = getApparentType(source); - if (apparentSource !== source && allowComplexConstraintInference && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) { - allowComplexConstraintInference = false; + if (apparentSource !== source && !(apparentSource.flags & (524288 /* Object */ | 2097152 /* Intersection */))) { return inferFromTypes(apparentSource, target); } source = apparentSource; @@ -66338,11 +66797,7 @@ ${lanes.join("\n")} )) { allTypeFlags &= ~2112 /* BigIntLike */; } - const matchingType = reduceLeft( - constraintTypes, - (left, right) => !(right.flags & allTypeFlags) ? left : left.flags & 4 /* String */ ? left : right.flags & 4 /* String */ ? source2 : left.flags & 134217728 /* TemplateLiteral */ ? left : right.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source2, right) ? source2 : left.flags & 268435456 /* StringMapping */ ? left : right.flags & 268435456 /* StringMapping */ && str === applyStringMapping(right.symbol, str) ? source2 : left.flags & 128 /* StringLiteral */ ? left : right.flags & 128 /* StringLiteral */ && right.value === str ? right : left.flags & 8 /* Number */ ? left : right.flags & 8 /* Number */ ? getNumberLiteralType(+str) : left.flags & 32 /* Enum */ ? left : right.flags & 32 /* Enum */ ? getNumberLiteralType(+str) : left.flags & 256 /* NumberLiteral */ ? left : right.flags & 256 /* NumberLiteral */ && right.value === +str ? right : left.flags & 64 /* BigInt */ ? left : right.flags & 64 /* BigInt */ ? parseBigIntLiteralType(str) : left.flags & 2048 /* BigIntLiteral */ ? left : right.flags & 2048 /* BigIntLiteral */ && pseudoBigIntToString(right.value) === str ? right : left.flags & 16 /* Boolean */ ? left : right.flags & 16 /* Boolean */ ? str === "true" ? trueType : str === "false" ? falseType : booleanType : left.flags & 512 /* BooleanLiteral */ ? left : right.flags & 512 /* BooleanLiteral */ && right.intrinsicName === str ? right : left.flags & 32768 /* Undefined */ ? left : right.flags & 32768 /* Undefined */ && right.intrinsicName === str ? right : left.flags & 65536 /* Null */ ? left : right.flags & 65536 /* Null */ && right.intrinsicName === str ? right : left, - neverType - ); + const matchingType = reduceLeft(constraintTypes, (left, right) => !(right.flags & allTypeFlags) ? left : left.flags & 4 /* String */ ? left : right.flags & 4 /* String */ ? source2 : left.flags & 134217728 /* TemplateLiteral */ ? left : right.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source2, right) ? source2 : left.flags & 268435456 /* StringMapping */ ? left : right.flags & 268435456 /* StringMapping */ && str === applyStringMapping(right.symbol, str) ? source2 : left.flags & 128 /* StringLiteral */ ? left : right.flags & 128 /* StringLiteral */ && right.value === str ? right : left.flags & 8 /* Number */ ? left : right.flags & 8 /* Number */ ? getNumberLiteralType(+str) : left.flags & 32 /* Enum */ ? left : right.flags & 32 /* Enum */ ? getNumberLiteralType(+str) : left.flags & 256 /* NumberLiteral */ ? left : right.flags & 256 /* NumberLiteral */ && right.value === +str ? right : left.flags & 64 /* BigInt */ ? left : right.flags & 64 /* BigInt */ ? parseBigIntLiteralType(str) : left.flags & 2048 /* BigIntLiteral */ ? left : right.flags & 2048 /* BigIntLiteral */ && pseudoBigIntToString(right.value) === str ? right : left.flags & 16 /* Boolean */ ? left : right.flags & 16 /* Boolean */ ? str === "true" ? trueType : str === "false" ? falseType : booleanType : left.flags & 512 /* BooleanLiteral */ ? left : right.flags & 512 /* BooleanLiteral */ && right.intrinsicName === str ? right : left.flags & 32768 /* Undefined */ ? left : right.flags & 32768 /* Undefined */ && right.intrinsicName === str ? right : left.flags & 65536 /* Null */ ? left : right.flags & 65536 /* Null */ && right.intrinsicName === str ? right : left, neverType); if (!(matchingType.flags & 131072 /* Never */)) { inferFromTypes(matchingType, target2); continue; @@ -66388,10 +66843,7 @@ ${lanes.join("\n")} return; } const startLength = isTupleType(source) ? Math.min(source.target.fixedLength, target.target.fixedLength) : 0; - const endLength = Math.min( - isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, - target.target.hasRestElement ? getEndElementCount(target.target, 3 /* Fixed */) : 0 - ); + const endLength = Math.min(isTupleType(source) ? getEndElementCount(source.target, 3 /* Fixed */) : 0, target.target.hasRestElement ? getEndElementCount(target.target, 3 /* Fixed */) : 0); for (let i = 0; i < startLength; i++) { inferFromTypes(getTypeArguments(source)[i], elementTypes[i]); } @@ -66473,12 +66925,14 @@ ${lanes.join("\n")} } function inferFromSignatures(source, target, kind) { const sourceSignatures = getSignaturesOfType(source, kind); - const targetSignatures = getSignaturesOfType(target, kind); const sourceLen = sourceSignatures.length; - const targetLen = targetSignatures.length; - const len = sourceLen < targetLen ? sourceLen : targetLen; - for (let i = 0; i < len; i++) { - inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i])); + if (sourceLen > 0) { + const targetSignatures = getSignaturesOfType(target, kind); + const targetLen = targetSignatures.length; + for (let i = 0; i < targetLen; i++) { + const sourceIndex = Math.max(sourceLen - targetLen + i, 0); + inferFromSignature(getBaseSignature(sourceSignatures[sourceIndex]), getErasedSignature(targetSignatures[i])); + } } } function inferFromSignature(source, target) { @@ -66585,7 +67039,7 @@ ${lanes.join("\n")} const constraint = getConstraintOfTypeParameter(inference.typeParameter); if (constraint) { const instantiatedConstraint = instantiateType(constraint, context.nonFixingMapper); - if (!inferredType || inferredType === wildcardType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { + if (!inferredType || !context.compareTypes(inferredType, getTypeWithThisArgument(instantiatedConstraint, inferredType))) { inference.inferredType = fallbackType && context.compareTypes(fallbackType, getTypeWithThisArgument(instantiatedConstraint, fallbackType)) ? fallbackType : instantiatedConstraint; } } @@ -66893,7 +67347,7 @@ ${lanes.join("\n")} function hasMatchingArgument(expression, reference) { if (expression.arguments) { for (const argument of expression.arguments) { - if (isOrContainsMatchingReference(reference, argument)) { + if (isOrContainsMatchingReference(reference, argument) || optionalChainContainsReference(argument, reference)) { return true; } } @@ -66940,7 +67394,13 @@ ${lanes.join("\n")} const resolved = resolveStructuredTypeMembers(type); return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType)); } - function getTypeFacts(type) { + function getTypeFacts(type, mask2) { + return getTypeFactsWorker(type, mask2) & mask2; + } + function hasTypeFacts(type, mask2) { + return getTypeFacts(type, mask2) !== 0; + } + function getTypeFactsWorker(type, callerOnlyNeeds) { if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) { type = getBaseConstraintOfType(type) || unknownType; } @@ -66973,6 +67433,10 @@ ${lanes.join("\n")} return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */; } if (flags & 524288 /* Object */) { + const possibleFacts = strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ | 7880640 /* FunctionStrictFacts */ | 7888800 /* ObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ | 16728e3 /* FunctionFacts */ | 16736160 /* ObjectFacts */; + if ((callerOnlyNeeds & possibleFacts) === 0) { + return 0; + } return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */; } if (flags & 16384 /* Void */) { @@ -66994,20 +67458,20 @@ ${lanes.join("\n")} return 0 /* None */; } if (flags & 1048576 /* Union */) { - return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */); + return reduceLeft(type.types, (facts, t) => facts | getTypeFactsWorker(t, callerOnlyNeeds), 0 /* None */); } if (flags & 2097152 /* Intersection */) { - return getIntersectionTypeFacts(type); + return getIntersectionTypeFacts(type, callerOnlyNeeds); } return 83886079 /* UnknownFacts */; } - function getIntersectionTypeFacts(type) { + function getIntersectionTypeFacts(type, callerOnlyNeeds) { const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */); let oredFacts = 0 /* None */; let andedFacts = 134217727 /* All */; for (const t of type.types) { if (!(ignoreObjects && t.flags & 524288 /* Object */)) { - const f = getTypeFacts(t); + const f = getTypeFactsWorker(t, callerOnlyNeeds); oredFacts |= f; andedFacts &= f; } @@ -67015,19 +67479,19 @@ ${lanes.join("\n")} return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */; } function getTypeWithFacts(type, include) { - return filterType(type, (t) => (getTypeFacts(t) & include) !== 0); + return filterType(type, (t) => hasTypeFacts(t, include)); } function getAdjustedTypeWithFacts(type, facts) { const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts)); if (strictNullChecks) { switch (facts) { case 524288 /* NEUndefined */: - return mapType(reduced, (t) => getTypeFacts(t) & 65536 /* EQUndefined */ ? getIntersectionType([t, getTypeFacts(t) & 131072 /* EQNull */ && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t); + return mapType(reduced, (t) => hasTypeFacts(t, 65536 /* EQUndefined */) ? getIntersectionType([t, hasTypeFacts(t, 131072 /* EQNull */) && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t); case 1048576 /* NENull */: - return mapType(reduced, (t) => getTypeFacts(t) & 131072 /* EQNull */ ? getIntersectionType([t, getTypeFacts(t) & 65536 /* EQUndefined */ && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t); + return mapType(reduced, (t) => hasTypeFacts(t, 131072 /* EQNull */) ? getIntersectionType([t, hasTypeFacts(t, 65536 /* EQUndefined */) && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t); case 2097152 /* NEUndefinedOrNull */: case 4194304 /* Truthy */: - return mapType(reduced, (t) => getTypeFacts(t) & 262144 /* EQUndefinedOrNull */ ? getGlobalNonNullableTypeInstantiation(t) : t); + return mapType(reduced, (t) => hasTypeFacts(t, 262144 /* EQUndefinedOrNull */) ? getGlobalNonNullableTypeInstantiation(t) : t); } } return reduced; @@ -67313,7 +67777,9 @@ ${lanes.join("\n")} return isTypeSubsetOf(elementType, evolvingArrayType.elementType) ? evolvingArrayType : getEvolvingArrayType(getUnionType([evolvingArrayType.elementType, elementType])); } function createFinalArrayType(elementType) { - return elementType.flags & 131072 /* Never */ ? autoArrayType : createArrayType(elementType.flags & 1048576 /* Union */ ? getUnionType(elementType.types, 2 /* Subtype */) : elementType); + return elementType.flags & 131072 /* Never */ ? autoArrayType : createArrayType( + elementType.flags & 1048576 /* Union */ ? getUnionType(elementType.types, 2 /* Subtype */) : elementType + ); } function getFinalArrayType(evolvingArrayType) { return evolvingArrayType.finalArrayType || (evolvingArrayType.finalArrayType = createFinalArrayType(evolvingArrayType.elementType)); @@ -67424,7 +67890,10 @@ ${lanes.join("\n")} let signature = links.effectsSignature; if (signature === void 0) { let funcType; - if (node.parent.kind === 244 /* ExpressionStatement */) { + if (isBinaryExpression(node)) { + const rightType = checkNonNullExpression(node.right); + funcType = getSymbolHasInstanceMethodOfObjectType(rightType); + } else if (node.parent.kind === 244 /* ExpressionStatement */) { funcType = getTypeOfDottedName( node.expression, /*diagnostic*/ @@ -67714,7 +68183,10 @@ ${lanes.join("\n")} } function getInitialOrAssignedType(flow) { const node = flow.node; - return getNarrowableTypeForReference(node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), reference); + return getNarrowableTypeForReference( + node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */ ? getInitialType(node) : getAssignedType(node), + reference + ); } function getTypeAtFlowAssignment(flow) { const node = flow.node; @@ -67733,10 +68205,11 @@ ${lanes.join("\n")} const assignedType = getWidenedLiteralType(getInitialOrAssignedType(flow)); return isTypeAssignableTo(assignedType, declaredType) ? assignedType : anyArrayType; } - if (declaredType.flags & 1048576 /* Union */) { - return getAssignmentReducedType(declaredType, getInitialOrAssignedType(flow)); + const t = isInCompoundLikeAssignment(node) ? getBaseTypeOfLiteralType(declaredType) : declaredType; + if (t.flags & 1048576 /* Union */) { + return getAssignmentReducedType(t, getInitialOrAssignedType(flow)); } - return declaredType; + return t; } if (containsMatchingReference(reference, node)) { if (!isReachableFlowNode(flow)) { @@ -67842,31 +68315,21 @@ ${lanes.join("\n")} return createFlowType(narrowedType, isIncomplete(flowType)); } function getTypeAtSwitchClause(flow) { - const expr = flow.switchStatement.expression; + const expr = skipParentheses(flow.switchStatement.expression); const flowType = getTypeAtFlowNode(flow.antecedent); let type = getTypeFromFlowType(flowType); if (isMatchingReference(reference, expr)) { type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else if (expr.kind === 221 /* TypeOfExpression */ && isMatchingReference(reference, expr.expression)) { type = narrowTypeBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); + } else if (expr.kind === 112 /* TrueKeyword */) { + type = narrowTypeBySwitchOnTrue(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd); } else { if (strictNullChecks) { if (optionalChainContainsReference(expr, reference)) { - type = narrowTypeBySwitchOptionalChainContainment( - type, - flow.switchStatement, - flow.clauseStart, - flow.clauseEnd, - (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */)) - ); + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, (t) => !(t.flags & (32768 /* Undefined */ | 131072 /* Never */))); } else if (expr.kind === 221 /* TypeOfExpression */ && optionalChainContainsReference(expr.expression, reference)) { - type = narrowTypeBySwitchOptionalChainContainment( - type, - flow.switchStatement, - flow.clauseStart, - flow.clauseEnd, - (t) => !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined") - ); + type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, (t) => !(t.flags & 131072 /* Never */ || t.flags & 128 /* StringLiteral */ && t.value === "undefined")); } } const access = getDiscriminantPropertyAccess(expr, type); @@ -68020,13 +68483,15 @@ ${lanes.join("\n")} return void 0; } function getDiscriminantPropertyAccess(expr, computedType) { - const type = declaredType.flags & 1048576 /* Union */ ? declaredType : computedType; - if (type.flags & 1048576 /* Union */) { + if (declaredType.flags & 1048576 /* Union */ || computedType.flags & 1048576 /* Union */) { const access = getCandidateDiscriminantPropertyAccess(expr); if (access) { const name = getAccessedPropertyName(access); - if (name && isDiscriminantProperty(type, name)) { - return access; + if (name) { + const type = declaredType.flags & 1048576 /* Union */ && isTypeSubsetOf(computedType, declaredType) ? declaredType : computedType; + if (isDiscriminantProperty(type, name)) { + return access; + } } } } @@ -68046,7 +68511,7 @@ ${lanes.join("\n")} propType = removeNullable && optionalChain ? getOptionalType(propType) : propType; const narrowedPropType = narrowType2(propType); return filterType(type, (t) => { - const discriminantType = getTypeOfPropertyOrIndexSignature(t, propName); + const discriminantType = getTypeOfPropertyOrIndexSignatureOfType(t, propName) || unknownType; return !(discriminantType.flags & 131072 /* Never */) && !(narrowedPropType.flags & 131072 /* Never */) && areTypesComparable(narrowedPropType, discriminantType); }); } @@ -68108,6 +68573,10 @@ ${lanes.join("\n")} } return type; } + function narrowTypeByBooleanComparison(type, expr, bool, operator, assumeTrue) { + assumeTrue = assumeTrue !== (bool.kind === 112 /* TrueKeyword */) !== (operator !== 38 /* ExclamationEqualsEqualsToken */ && operator !== 36 /* ExclamationEqualsToken */); + return narrowType(type, expr, assumeTrue); + } function narrowTypeByBinaryExpression(type, expr, assumeTrue) { switch (expr.operatorToken.kind) { case 64 /* EqualsToken */: @@ -68155,6 +68624,12 @@ ${lanes.join("\n")} if (isMatchingConstructorReference(right)) { return narrowTypeByConstructor(type, operator, left, assumeTrue); } + if (isBooleanLiteral(right) && !isAccessExpression(left)) { + return narrowTypeByBooleanComparison(type, left, right, operator, assumeTrue); + } + if (isBooleanLiteral(left) && !isAccessExpression(right)) { + return narrowTypeByBooleanComparison(type, right, left, operator, assumeTrue); + } break; case 104 /* InstanceOfKeyword */: return narrowTypeByInstanceof(type, expr, assumeTrue); @@ -68370,14 +68845,14 @@ ${lanes.join("\n")} // the constituent based on its type facts. We use the strict subtype relation because it treats `object` // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`, // but are classified as "function" according to `typeof`. - isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? getTypeFacts(t) & facts ? t : neverType : ( + isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? hasTypeFacts(t, facts) ? t : neverType : ( // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`. isTypeSubtypeOf(impliedType, t) ? impliedType : ( // Neither the constituent nor the implied type is a subtype of the other, however their domains may still // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate // possible overlap, we form an intersection. Otherwise, we eliminate the constituent. - getTypeFacts(t) & facts ? getIntersectionType([t, impliedType]) : neverType + hasTypeFacts(t, facts) ? getIntersectionType([t, impliedType]) : neverType ) ) )); @@ -68391,11 +68866,47 @@ ${lanes.join("\n")} const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; if (hasDefaultClause) { const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses); - return filterType(type, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts); + return filterType(type, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts); } const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd); return getUnionType(map(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType)); } + function narrowTypeBySwitchOnTrue(type, switchStatement, clauseStart, clauseEnd) { + const defaultIndex = findIndex(switchStatement.caseBlock.clauses, (clause) => clause.kind === 297 /* DefaultClause */); + const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd; + for (let i = 0; i < clauseStart; i++) { + const clause = switchStatement.caseBlock.clauses[i]; + if (clause.kind === 296 /* CaseClause */) { + type = narrowType( + type, + clause.expression, + /*assumeTrue*/ + false + ); + } + } + if (hasDefaultClause) { + for (let i = clauseEnd; i < switchStatement.caseBlock.clauses.length; i++) { + const clause = switchStatement.caseBlock.clauses[i]; + if (clause.kind === 296 /* CaseClause */) { + type = narrowType( + type, + clause.expression, + /*assumeTrue*/ + false + ); + } + } + return type; + } + const clauses = switchStatement.caseBlock.clauses.slice(clauseStart, clauseEnd); + return getUnionType(map(clauses, (clause) => clause.kind === 296 /* CaseClause */ ? narrowType( + type, + clause.expression, + /*assumeTrue*/ + true + ) : neverType)); + } function isMatchingConstructorReference(expr) { return (isPropertyAccessExpression(expr) && idText(expr.name) === "constructor" || isElementAccessExpression(expr) && isStringLiteralLike(expr.argumentExpression) && expr.argumentExpression.text === "constructor") && isMatchingReference(reference, expr.expression); } @@ -68435,7 +68946,22 @@ ${lanes.join("\n")} } return type; } - const rightType = getTypeOfExpression(expr.right); + const right = expr.right; + const rightType = getTypeOfExpression(right); + if (!isTypeDerivedFrom(rightType, globalObjectType)) { + return type; + } + const signature = getEffectsSignature(expr); + const predicate = signature && getTypePredicateOfSignature(signature); + if (predicate && predicate.kind === 1 /* Identifier */ && predicate.parameterIndex === 0) { + return getNarrowedType( + type, + predicate.type, + assumeTrue, + /*checkDerived*/ + true + ); + } if (!isTypeDerivedFrom(rightType, globalFunctionType)) { return type; } @@ -68489,7 +69015,10 @@ ${lanes.join("\n")} const narrowedType = mapType(candidate, (c) => { const discriminant = keyPropertyName && getTypeOfPropertyOfType(c, keyPropertyName); const matching = discriminant && getConstituentTypeForKeyType(type, discriminant); - const directlyRelated = mapType(matching || type, checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType); + const directlyRelated = mapType( + matching || type, + checkDerived ? (t) => isTypeDerivedFrom(t, c) ? t : isTypeDerivedFrom(c, t) ? c : neverType : (t) => isTypeStrictSubtypeOf(t, c) ? t : isTypeStrictSubtypeOf(c, t) ? c : isTypeSubtypeOf(t, c) ? t : isTypeSubtypeOf(c, t) ? c : neverType + ); return directlyRelated.flags & 131072 /* Never */ ? mapType(type, (t) => maybeTypeOfKind(t, 465829888 /* Instantiable */) && isRelated(c, getBaseConstraintOfType(t) || unknownType) ? getIntersectionType([t, c]) : neverType) : directlyRelated; }); return !(narrowedType.flags & 131072 /* Never */) ? narrowedType : isTypeSubtypeOf(candidate, type) ? candidate : isTypeAssignableTo(type, candidate) ? type : isTypeAssignableTo(candidate, type) ? candidate : getIntersectionType([type, candidate]); @@ -68526,7 +69055,7 @@ ${lanes.join("\n")} false ); } - if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) { + if (strictNullChecks && optionalChainContainsReference(predicateArgument, reference) && (assumeTrue && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */) || !assumeTrue && everyType(predicate.type, isNullableType))) { type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */); } const access = getDiscriminantPropertyAccess(predicateArgument, type); @@ -68599,7 +69128,15 @@ ${lanes.join("\n")} location = location.parent; } if (isExpressionNode(location) && (!isAssignmentTarget(location) || isWriteAccess(location))) { - const type = removeOptionalTypeMarker(getTypeOfExpression(location)); + const type = removeOptionalTypeMarker( + isWriteAccess(location) && location.kind === 211 /* PropertyAccessExpression */ ? checkPropertyAccessExpression( + location, + /*checkMode*/ + void 0, + /*writeOnly*/ + true + ) : getTypeOfExpression(location) + ); if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) { return type; } @@ -68608,7 +69145,7 @@ ${lanes.join("\n")} if (isDeclarationName(location) && isSetAccessor(location.parent) && getAnnotatedAccessorTypeNode(location.parent)) { return getWriteTypeOfAccessors(location.parent.symbol); } - return getNonMissingTypeOfSymbol(symbol); + return isRightSideOfAccessExpression(location) && isWriteAccess(location.parent) ? getWriteTypeOfSymbol(symbol) : getNonMissingTypeOfSymbol(symbol); } function getControlFlowContainer(node) { return findAncestor(node.parent, (node2) => isFunctionLike(node2) && !getImmediatelyInvokedFunctionExpression(node2) || node2.kind === 268 /* ModuleBlock */ || node2.kind === 312 /* SourceFile */ || node2.kind === 172 /* PropertyDeclaration */); @@ -68652,7 +69189,7 @@ ${lanes.join("\n")} reportCircularityError(declaration.symbol); return true; } - const containsUndefined = !!(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */); + const containsUndefined = !!hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */); if (!popTypeResolution()) { reportCircularityError(declaration.symbol); return true; @@ -68662,7 +69199,7 @@ ${lanes.join("\n")} return links.parameterInitializerContainsUndefined; } function removeOptionalityFromDeclaredType(declaredType, declaration) { - const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration); + const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && hasTypeFacts(declaredType, 16777216 /* IsUndefined */) && !parameterInitializerContainsUndefined(declaration); return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType; } function isConstraintPosition(type, node) { @@ -68676,7 +69213,7 @@ ${lanes.join("\n")} return type.flags & 2097152 /* Intersection */ ? some(type.types, isGenericTypeWithoutNullableConstraint) : !!(type.flags & 465829888 /* Instantiable */ && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304 /* Nullable */)); } function hasContextualTypeWithNoGenericTypes(node, checkMode) { - const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 64 /* RestBindingElement */ ? getContextualType2(node, 8 /* SkipBindingPatterns */) : getContextualType2( + const contextualType = (isIdentifier(node) || isPropertyAccessExpression(node) || isElementAccessExpression(node)) && !((isJsxOpeningElement(node.parent) || isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) && (checkMode && checkMode & 32 /* RestBindingElement */ ? getContextualType2(node, 8 /* SkipBindingPatterns */) : getContextualType2( node, /*contextFlags*/ void 0 @@ -68752,7 +69289,12 @@ ${lanes.join("\n")} if (narrowedType.flags & 131072 /* Never */) { return neverType; } - return getBindingElementTypeFromParentType(declaration, narrowedType); + return getBindingElementTypeFromParentType( + declaration, + narrowedType, + /*noTupleBoundsCheck*/ + true + ); } } } @@ -68798,7 +69340,7 @@ ${lanes.join("\n")} if (languageVersion < 2 /* ES2015 */) { if (container.kind === 219 /* ArrowFunction */) { error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); - } else if (hasSyntacticModifier(container, 512 /* Async */)) { + } else if (hasSyntacticModifier(container, 1024 /* Async */)) { error2(node, Diagnostics.The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method); } } @@ -68860,7 +69402,7 @@ ${lanes.join("\n")} const isAlias = localOrExportSymbol.flags & 2097152 /* Alias */; if (localOrExportSymbol.flags & 3 /* Variable */) { if (assignmentKind === 1 /* Definite */) { - return type; + return isInCompoundLikeAssignment(node) ? getBaseTypeOfLiteralType(type) : type; } } else if (isAlias) { declaration = getDeclarationOfAliasSymbol(symbol); @@ -69211,7 +69753,7 @@ ${lanes.join("\n")} let inAsyncFunction = false; if (!isCallExpression2) { while (container && container.kind === 219 /* ArrowFunction */) { - if (hasSyntacticModifier(container, 512 /* Async */)) + if (hasSyntacticModifier(container, 1024 /* Async */)) inAsyncFunction = true; container = getSuperContainer( container, @@ -69220,7 +69762,7 @@ ${lanes.join("\n")} ); needToCaptureLexicalThis = languageVersion < 2 /* ES2015 */; } - if (container && hasSyntacticModifier(container, 512 /* Async */)) + if (container && hasSyntacticModifier(container, 1024 /* Async */)) inAsyncFunction = true; } let nodeCheckFlag = 0; @@ -69276,6 +69818,9 @@ ${lanes.join("\n")} error2(node, Diagnostics.super_can_only_be_referenced_in_a_derived_class); return errorType; } + if (classDeclarationExtendsNull(classLikeDeclaration)) { + return isCallExpression2 ? errorType : nullWideningType; + } const classType = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(classLikeDeclaration)); const baseClassType = classType && getBaseTypes(classType)[0]; if (!baseClassType) { @@ -69360,7 +69905,7 @@ ${lanes.join("\n")} return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral)); } const parent2 = walkUpParenthesizedExpressions(func.parent); - if (parent2.kind === 226 /* BinaryExpression */ && parent2.operatorToken.kind === 64 /* EqualsToken */) { + if (isAssignmentExpression(parent2)) { const target = parent2.left; if (isAccessExpression(target)) { const { expression } = target; @@ -69428,7 +69973,7 @@ ${lanes.join("\n")} function getContextualTypeForBindingElement(declaration, contextFlags) { const parent2 = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */); + const parentType = getContextualTypeForVariableLikeDeclaration(parent2, contextFlags) || parent2.kind !== 208 /* BindingElement */ && parent2.initializer && checkDeclarationInitializer(parent2, declaration.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */); if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return void 0; if (parent2.name.kind === 207 /* ArrayBindingPattern */) { @@ -69549,7 +70094,24 @@ ${lanes.join("\n")} } const signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); if (signature && !isResolvingReturnTypeOfSignature(signature)) { - return getReturnTypeOfSignature(signature); + const returnType2 = getReturnTypeOfSignature(signature); + const functionFlags = getFunctionFlags(functionDecl); + if (functionFlags & 1 /* Generator */) { + return filterType(returnType2, (t) => { + return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || checkGeneratorInstantiationAssignabilityToReturnType( + t, + functionFlags, + /*errorNode*/ + void 0 + ); + }); + } + if (functionFlags & 2 /* Async */) { + return filterType(returnType2, (t) => { + return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || !!getAwaitedTypeOfPromise(t); + }); + } + return returnType2; } const iife = getImmediatelyInvokedFunctionExpression(functionDecl); if (iife) { @@ -69772,7 +70334,7 @@ ${lanes.join("\n")} } else if (t.flags & 3670016 /* StructuredType */) { const prop = getPropertyOfType(t, name); if (prop) { - return isCircularMappedProperty(prop) ? void 0 : getTypeOfSymbol(prop); + return isCircularMappedProperty(prop) ? void 0 : removeMissingType(getTypeOfSymbol(prop), !!(prop && prop.flags & 16777216 /* Optional */)); } if (isTupleType(t) && isNumericLiteralName(name) && +name >= 0) { const restType = getElementTypeOfSliceOfTupleType( @@ -69857,7 +70419,7 @@ ${lanes.join("\n")} (t) => { if (isTupleType(t)) { if ((firstSpreadIndex === void 0 || index < firstSpreadIndex) && index < t.target.fixedLength) { - return getTypeArguments(t)[index]; + return removeMissingType(getTypeArguments(t)[index], !!(t.target.elementFlags[index] && 2 /* Optional */)); } const offset = length2 !== void 0 && (lastSpreadIndex === void 0 || index > lastSpreadIndex) ? length2 - index : 0; const fixedEndLength = offset > 0 && t.target.hasRestElement ? getEndElementCount(t.target, 3 /* Fixed */) : 0; @@ -69955,8 +70517,19 @@ ${lanes.join("\n")} contextualType, concatenate( map( - filter(node.properties, (p) => !!p.symbol && p.kind === 303 /* PropertyAssignment */ && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName)), - (prop) => [() => getContextFreeTypeOfExpression(prop.initializer), prop.symbol.escapedName] + filter(node.properties, (p) => { + if (!p.symbol) { + return false; + } + if (p.kind === 303 /* PropertyAssignment */) { + return isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); + } + if (p.kind === 304 /* ShorthandPropertyAssignment */) { + return isDiscriminantProperty(contextualType, p.symbol.escapedName); + } + return false; + }), + (prop) => [() => getContextFreeTypeOfExpression(prop.kind === 303 /* PropertyAssignment */ ? prop.initializer : prop.name), prop.symbol.escapedName] ), map( filter(getPropertiesOfType(contextualType), (s) => { @@ -70504,10 +71077,13 @@ ${lanes.join("\n")} elementTypes, elementFlags, /*readonly*/ - inConstContext + inConstContext && !(contextualType && someType(contextualType, isMutableArrayLikeType)) )); } - return createArrayLiteralType(createArrayType(elementTypes.length ? getUnionType(sameMap(elementTypes, (t, i) => elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessTypeOrUndefined(t, numberType) || anyType : t), 2 /* Subtype */) : strictNullChecks ? implicitNeverType : undefinedWideningType, inConstContext)); + return createArrayLiteralType(createArrayType( + elementTypes.length ? getUnionType(sameMap(elementTypes, (t, i) => elementFlags[i] & 8 /* Variadic */ ? getIndexedAccessTypeOrUndefined(t, numberType) || anyType : t), 2 /* Subtype */) : strictNullChecks ? implicitNeverType : undefinedWideningType, + inConstContext + )); } function createArrayLiteralType(type) { if (!(getObjectFlags(type) & 4 /* Reference */)) { @@ -70660,12 +71236,7 @@ ${lanes.join("\n")} if (impliedProp) { prop.flags |= impliedProp.flags & 16777216 /* Optional */; } else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, stringType)) { - error2( - memberDecl.name, - Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, - symbolToString(member), - typeToString(contextualType) - ); + error2(memberDecl.name, Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType)); } } prop.declarations = member.declarations; @@ -70735,22 +71306,13 @@ ${lanes.join("\n")} } popContextualType(); if (contextualTypeHasPattern) { - const rootPatternParent = findAncestor( - contextualType.pattern.parent, - (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */ - ); - const spreadOrOutsideRootObject = findAncestor( - node, - (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */ - ); + const rootPatternParent = findAncestor(contextualType.pattern.parent, (n) => n.kind === 260 /* VariableDeclaration */ || n.kind === 226 /* BinaryExpression */ || n.kind === 169 /* Parameter */); + const spreadOrOutsideRootObject = findAncestor(node, (n) => n === rootPatternParent || n.kind === 305 /* SpreadAssignment */); if (spreadOrOutsideRootObject.kind !== 305 /* SpreadAssignment */) { for (const prop of getPropertiesOfType(contextualType)) { if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) { if (!(prop.flags & 16777216 /* Optional */)) { - error2( - prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), - Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value - ); + error2(prop.valueDeclaration || ((_a = tryCast(prop, isTransientSymbol)) == null ? void 0 : _a.links.bindingElement), Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value); } propertiesTable.set(prop.escapedName, prop); propertiesArray.push(prop); @@ -70822,13 +71384,16 @@ ${lanes.join("\n")} checkJsxOpeningLikeElementOrOpeningFragment(node.openingFragment); const nodeSourceFile = getSourceFileOfNode(node); if (getJSXTransformEnabled(compilerOptions) && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has("jsx")) && !compilerOptions.jsxFragmentFactory && !nodeSourceFile.pragmas.has("jsxfrag")) { - error2(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments); + error2( + node, + compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option : Diagnostics.An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments + ); } checkJsxChildren(node); return getJsxElementTypeAt(node) || anyType; } function isHyphenatedJsxName(name) { - return stringContains(name, "-"); + return name.includes("-"); } function isJsxIntrinsicTagName(tagName) { return isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText) || isJsxNamespacedName(tagName); @@ -70925,7 +71490,7 @@ ${lanes.join("\n")} } } const parent2 = openingLikeElement.parent.kind === 284 /* JsxElement */ ? openingLikeElement.parent : void 0; - if (parent2 && parent2.openingElement === openingLikeElement && parent2.children.length > 0) { + if (parent2 && parent2.openingElement === openingLikeElement && getSemanticJsxChildren(parent2.children).length > 0) { const childrenTypes = checkJsxChildren(parent2, checkMode); if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") { if (explicitlySpecifyChildrenAttribute) { @@ -71018,13 +71583,18 @@ ${lanes.join("\n")} if (!isErrorType(intrinsicElementsType)) { if (!isIdentifier(node.tagName) && !isJsxNamespacedName(node.tagName)) return Debug.fail(); - const intrinsicProp = getPropertyOfType(intrinsicElementsType, isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText); + const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; + const intrinsicProp = getPropertyOfType(intrinsicElementsType, propName); if (intrinsicProp) { links.jsxFlags |= 1 /* IntrinsicNamedElement */; return links.resolvedSymbol = intrinsicProp; } - const indexSignatureType = getIndexTypeOfType(intrinsicElementsType, stringType); - if (indexSignatureType) { + const indexSymbol = getApplicableIndexSymbol(intrinsicElementsType, getStringLiteralType(unescapeLeadingUnderscores(propName))); + if (indexSymbol) { + links.jsxFlags |= 2 /* IntrinsicIndexedElement */; + return links.resolvedSymbol = indexSymbol; + } + if (getTypeOfPropertyOrIndexSignatureOfType(intrinsicElementsType, propName)) { links.jsxFlags |= 2 /* IntrinsicIndexedElement */; return links.resolvedSymbol = intrinsicElementsType.symbol; } @@ -71202,6 +71772,7 @@ ${lanes.join("\n")} } } function getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node) { + var _a; Debug.assert(isJsxIntrinsicTagName(node.tagName)); const links = getNodeLinks(node); if (!links.resolvedJsxElementAttributesType) { @@ -71209,7 +71780,8 @@ ${lanes.join("\n")} if (links.jsxFlags & 1 /* IntrinsicNamedElement */) { return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol) || errorType; } else if (links.jsxFlags & 2 /* IntrinsicIndexedElement */) { - return links.resolvedJsxElementAttributesType = getIndexTypeOfType(getJsxType(JsxNames.IntrinsicElements, node), stringType) || errorType; + const propName = isJsxNamespacedName(node.tagName) ? getEscapedTextOfJsxNamespacedName(node.tagName) : node.tagName.escapedText; + return links.resolvedJsxElementAttributesType = ((_a = getApplicableIndexInfoForName(getJsxType(JsxNames.IntrinsicElements, node), propName)) == null ? void 0 : _a.type) || errorType; } else { return links.resolvedJsxElementAttributesType = errorType; } @@ -71384,6 +71956,7 @@ ${lanes.join("\n")} return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode); } function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) { + var _a; const flags = getDeclarationModifierFlagsFromSymbol(prop, writing); if (isSuper) { if (languageVersion < 2 /* ES2015 */) { @@ -71394,45 +71967,36 @@ ${lanes.join("\n")} return false; } } - if (flags & 256 /* Abstract */) { + if (flags & 64 /* Abstract */) { if (errorNode) { - error2( - errorNode, - Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, - symbolToString(prop), - typeToString(getDeclaringClass(prop)) - ); + error2(errorNode, Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop))); + } + return false; + } + if (!(flags & 256 /* Static */) && ((_a = prop.declarations) == null ? void 0 : _a.some(isClassInstanceProperty))) { + if (errorNode) { + error2(errorNode, Diagnostics.Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super, symbolToString(prop)); } return false; } } - if (flags & 256 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) { + if (flags & 64 /* Abstract */ && symbolHasNonMethodDeclaration(prop) && (isThisProperty(location) || isThisInitializedObjectBindingExpression(location) || isObjectBindingPattern(location.parent) && isThisInitializedDeclaration(location.parent.parent))) { const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) { if (errorNode) { - error2( - errorNode, - Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, - symbolToString(prop), - getTextOfIdentifierOrLiteral(declaringClassDeclaration.name) - ); + error2(errorNode, Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), getTextOfIdentifierOrLiteral(declaringClassDeclaration.name)); } return false; } } - if (!(flags & 24 /* NonPublicAccessibilityModifier */)) { + if (!(flags & 6 /* NonPublicAccessibilityModifier */)) { return true; } - if (flags & 8 /* Private */) { + if (flags & 2 /* Private */) { const declaringClassDeclaration = getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop)); if (!isNodeWithinClass(location, declaringClassDeclaration)) { if (errorNode) { - error2( - errorNode, - Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, - symbolToString(prop), - typeToString(getDeclaringClass(prop)) - ); + error2(errorNode, Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop))); } return false; } @@ -71448,19 +72012,14 @@ ${lanes.join("\n")} if (!enclosingClass) { enclosingClass = getEnclosingClassFromThisParameter(location); enclosingClass = enclosingClass && isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing); - if (flags & 32 /* Static */ || !enclosingClass) { + if (flags & 256 /* Static */ || !enclosingClass) { if (errorNode) { - error2( - errorNode, - Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, - symbolToString(prop), - typeToString(getDeclaringClass(prop) || containingType) - ); + error2(errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || containingType)); } return false; } } - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return true; } if (containingType.flags & 262144 /* TypeParameter */) { @@ -71468,13 +72027,7 @@ ${lanes.join("\n")} } if (!containingType || !hasBaseType(containingType, enclosingClass)) { if (errorNode) { - error2( - errorNode, - Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, - symbolToString(prop), - typeToString(enclosingClass), - typeToString(containingType) - ); + error2(errorNode, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, symbolToString(prop), typeToString(enclosingClass), typeToString(containingType)); } return false; } @@ -71508,7 +72061,7 @@ ${lanes.join("\n")} return checkNonNullType(checkExpression(node), node); } function isNullableType(type) { - return !!(getTypeFacts(type) & 50331648 /* IsUndefinedOrNull */); + return hasTypeFacts(type, 50331648 /* IsUndefinedOrNull */); } function getNonNullableTypeIfNeeded(type) { return isNullableType(type) ? getNonNullableType(type) : type; @@ -71554,7 +72107,7 @@ ${lanes.join("\n")} error2(node, Diagnostics.Object_is_of_type_unknown); return errorType; } - const facts = getTypeFacts(type); + const facts = getTypeFacts(type, 50331648 /* IsUndefinedOrNull */); if (facts & 50331648 /* IsUndefinedOrNull */) { reportError(node, facts); const t = getNonNullableType(type); @@ -71769,7 +72322,7 @@ ${lanes.join("\n")} apparentType, right.escapedText, /*skipObjectFunctionPropertyAugment*/ - false, + isConstEnumObjectType(apparentType), /*includeTypeOnlyMembers*/ node.kind === 166 /* QualifiedName */ ); @@ -71831,11 +72384,17 @@ ${lanes.join("\n")} return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode); } function isUncheckedJSSuggestion(node, suggestion, excludeClasses) { + var _a; const file = getSourceFileOfNode(node); if (file) { if (compilerOptions.checkJs === void 0 && file.checkJsDirective === void 0 && (file.scriptKind === 1 /* JS */ || file.scriptKind === 2 /* JSX */)) { const declarationFile = forEach(suggestion == null ? void 0 : suggestion.declarations, getSourceFileOfNode); - return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */); + const suggestionHasNoExtendsOrDecorators = !(suggestion == null ? void 0 : suggestion.valueDeclaration) || !isClassLike(suggestion.valueDeclaration) || ((_a = suggestion.valueDeclaration.heritageClauses) == null ? void 0 : _a.length) || classOrConstructorParameterIsDecorated( + /*useLegacyDecorators*/ + false, + suggestion.valueDeclaration + ); + return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile)) && !(excludeClasses && suggestion && suggestion.flags & 32 /* Class */ && suggestionHasNoExtendsOrDecorators) && !(!!node && excludeClasses && isPropertyAccessExpression(node) && node.expression.kind === 110 /* ThisKeyword */ && suggestionHasNoExtendsOrDecorators); } } return false; @@ -71880,16 +72439,13 @@ ${lanes.join("\n")} } let diagnosticMessage; const declarationName = idText(right); - if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 32 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { + if (isInPropertyInitializerOrClassStaticBlock(node) && !isOptionalPropertyDeclaration(valueDeclaration) && !(isAccessExpression(node) && isAccessExpression(node.expression)) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right) && !(isMethodDeclaration(valueDeclaration) && getCombinedModifierFlagsCached(valueDeclaration) & 256 /* Static */) && (useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) { diagnosticMessage = error2(right, Diagnostics.Property_0_is_used_before_its_initialization, declarationName); } else if (valueDeclaration.kind === 263 /* ClassDeclaration */ && node.parent.kind !== 183 /* TypeReference */ && !(valueDeclaration.flags & 33554432 /* Ambient */) && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) { diagnosticMessage = error2(right, Diagnostics.Class_0_used_before_its_declaration, declarationName); } if (diagnosticMessage) { - addRelatedInfo( - diagnosticMessage, - createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName) - ); + addRelatedInfo(diagnosticMessage, createDiagnosticForNode(valueDeclaration, Diagnostics._0_is_declared_here, declarationName)); } } function isInPropertyInitializerOrClassStaticBlock(node) { @@ -72137,7 +72693,7 @@ ${lanes.join("\n")} if (!valueDeclaration) { return; } - const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 8 /* Private */); + const hasPrivateModifier = hasEffectiveModifier(valueDeclaration, 2 /* Private */); const hasPrivateIdentifier = prop.valueDeclaration && isNamedDeclaration(prop.valueDeclaration) && isPrivateIdentifier(prop.valueDeclaration.name); if (!hasPrivateModifier && !hasPrivateIdentifier) { return; @@ -72280,7 +72836,9 @@ ${lanes.join("\n")} checkExpression(node.template); } else if (isJsxOpeningLikeElement(node)) { checkExpression(node.attributes); - } else if (node.kind !== 170 /* Decorator */) { + } else if (isBinaryExpression(node)) { + checkExpression(node.left); + } else if (isCallOrNewExpression(node)) { forEach(node.arguments, (argument) => { checkExpression(argument); }); @@ -72353,6 +72911,8 @@ ${lanes.join("\n")} } } else if (node.kind === 170 /* Decorator */) { argCount = getDecoratorArgumentCount(node, signature); + } else if (node.kind === 226 /* BinaryExpression */) { + argCount = 1; } else if (isJsxOpeningLikeElement(node)) { callIsIncomplete = node.attributes.end === node.end; if (callIsIncomplete) { @@ -72452,13 +73012,13 @@ ${lanes.join("\n")} return voidType; } const thisArgumentType = checkExpression(thisArgumentNode); - return isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType; + return isRightSideOfInstanceofExpression(thisArgumentNode) ? thisArgumentType : isOptionalChainRoot(thisArgumentNode.parent) ? getNonNullableType(thisArgumentType) : isOptionalChain(thisArgumentNode.parent) ? removeOptionalTypeMarker(thisArgumentType) : thisArgumentType; } function inferTypeArguments(node, signature, args, checkMode, context) { if (isJsxOpeningLikeElement(node)) { return inferJsxTypeArguments(node, signature, checkMode, context); } - if (node.kind !== 170 /* Decorator */) { + if (node.kind !== 170 /* Decorator */ && node.kind !== 226 /* BinaryExpression */) { const skipBindingPatterns = every(signature.typeParameters, (p) => !!getDefaultFromTypeParameter(p)); const contextualType = getContextualType2(node, skipBindingPatterns ? 8 /* SkipBindingPatterns */ : 0 /* None */); if (contextualType) { @@ -72553,9 +73113,11 @@ ${lanes.join("\n")} } if (arg.kind === 237 /* SyntheticExpression */ && arg.tupleNameSource) { names.push(arg.tupleNameSource); + } else { + names.push(void 0); } } - return createTupleType(types, flags, inConstContext, length(names) === length(types) ? names : void 0); + return createTupleType(types, flags, inConstContext && !someType(restType, isMutableArrayLikeType), names); } function checkTypeArguments(signature, typeArgumentNodes, reportErrors2, headMessage) { const isJavascript = isInJSFile(signature.declaration); @@ -72787,6 +73349,9 @@ ${lanes.join("\n")} } } function getThisArgumentOfCall(node) { + if (node.kind === 226 /* BinaryExpression */) { + return node.right; + } const expression = node.kind === 213 /* CallExpression */ ? node.expression : node.kind === 215 /* TaggedTemplateExpression */ ? node.tag : node.kind === 170 /* Decorator */ && !legacyDecorators ? node.expression : void 0; if (expression) { const callee = skipOuterExpressions(expression); @@ -72815,6 +73380,9 @@ ${lanes.join("\n")} if (node.kind === 170 /* Decorator */) { return getEffectiveDecoratorArguments(node); } + if (node.kind === 226 /* BinaryExpression */) { + return [node.left]; + } if (isJsxOpeningLikeElement(node)) { return node.attributes.properties.length > 0 || isJsxOpeningElement(node) && node.parent.children.length > 0 ? [node.attributes] : emptyArray; } @@ -72829,12 +73397,7 @@ ${lanes.join("\n")} forEach(getElementTypes(spreadType), (t, i2) => { var _a; const flags = spreadType.target.elementFlags[i2]; - const syntheticArg = createSyntheticExpression( - arg, - flags & 4 /* Rest */ ? createArrayType(t) : t, - !!(flags & 12 /* Variable */), - (_a = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a[i2] - ); + const syntheticArg = createSyntheticExpression(arg, flags & 4 /* Rest */ ? createArrayType(t) : t, !!(flags & 12 /* Variable */), (_a = spreadType.target.labeledElementDeclarations) == null ? void 0 : _a[i2]); effectiveArgs.push(syntheticArg); }); } else { @@ -73089,9 +73652,10 @@ ${lanes.join("\n")} const isTaggedTemplate = node.kind === 215 /* TaggedTemplateExpression */; const isDecorator2 = node.kind === 170 /* Decorator */; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); + const isInstanceof = node.kind === 226 /* BinaryExpression */; const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray; let typeArguments; - if (!isDecorator2 && !isSuperCall(node)) { + if (!isDecorator2 && !isInstanceof && !isSuperCall(node)) { typeArguments = node.typeArguments; if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 108 /* SuperKeyword */) { forEach(typeArguments, checkSourceElement); @@ -73120,6 +73684,9 @@ ${lanes.join("\n")} result = getCandidateForOverloadFailure(node, candidates, args, !!candidatesOutArray, checkMode); getNodeLinks(node).resolvedSignature = result; if (reportErrors2) { + if (!headMessage && isInstanceof) { + headMessage = Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method; + } if (candidatesForArgumentError) { if (candidatesForArgumentError.length === 1 || candidatesForArgumentError.length > 3) { const last2 = candidatesForArgumentError[candidatesForArgumentError.length - 1]; @@ -73571,7 +74138,7 @@ ${lanes.join("\n")} return resolveErrorCall(node); } const valueDecl = expressionType.symbol && getClassLikeDeclarationOfSymbol(expressionType.symbol); - if (valueDecl && hasSyntacticModifier(valueDecl, 256 /* Abstract */)) { + if (valueDecl && hasSyntacticModifier(valueDecl, 64 /* Abstract */)) { error2(node, Diagnostics.Cannot_create_an_instance_of_an_abstract_class); return resolveErrorCall(node); } @@ -73634,7 +74201,7 @@ ${lanes.join("\n")} return true; } const declaration = signature.declaration; - const modifiers = getSelectedEffectiveModifierFlags(declaration, 24 /* NonPublicAccessibilityModifier */); + const modifiers = getSelectedEffectiveModifierFlags(declaration, 6 /* NonPublicAccessibilityModifier */); if (!modifiers || declaration.kind !== 176 /* Constructor */) { return true; } @@ -73642,16 +74209,16 @@ ${lanes.join("\n")} const declaringClass = getDeclaredTypeOfSymbol(declaration.parent.symbol); if (!isNodeWithinClass(node, declaringClassDeclaration)) { const containingClass = getContainingClass(node); - if (containingClass && modifiers & 16 /* Protected */) { + if (containingClass && modifiers & 4 /* Protected */) { const containingType = getTypeOfNode(containingClass); if (typeHasProtectedAccessibleBase(declaration.parent.symbol, containingType)) { return true; } } - if (modifiers & 8 /* Private */) { + if (modifiers & 2 /* Private */) { error2(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } - if (modifiers & 16 /* Protected */) { + if (modifiers & 4 /* Protected */) { error2(node, Diagnostics.Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration, typeToString(declaringClass)); } return false; @@ -73752,10 +74319,7 @@ ${lanes.join("\n")} const sigs = getSignaturesOfType(getTypeOfSymbol(getSymbolLinks(apparentType.symbol).target), kind); if (!sigs || !sigs.length) return; - addRelatedInfo( - diagnostic, - createDiagnosticForNode(importNode, Diagnostics.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) - ); + addRelatedInfo(diagnostic, createDiagnosticForNode(importNode, Diagnostics.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)); } } function resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode) { @@ -73909,6 +74473,30 @@ ${lanes.join("\n")} } return resolveCall(node, signatures, candidatesOutArray, checkMode, 0 /* None */); } + function resolveInstanceofExpression(node, candidatesOutArray, checkMode) { + const rightType = checkExpression(node.right); + if (!isTypeAny(rightType)) { + const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(rightType); + if (hasInstanceMethodType) { + const apparentType = getApparentType(hasInstanceMethodType); + if (isErrorType(apparentType)) { + return resolveErrorCall(node); + } + const callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); + const constructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */); + if (isUntypedFunctionCall(hasInstanceMethodType, apparentType, callSignatures.length, constructSignatures.length)) { + return resolveUntypedCall(node); + } + if (callSignatures.length) { + return resolveCall(node, callSignatures, candidatesOutArray, checkMode, 0 /* None */); + } + } else if (!(typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { + error2(node.right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method); + return resolveErrorCall(node); + } + } + return anySignature; + } function isPotentiallyUncalledDecorator(decorator, signatures) { return signatures.length && every(signatures, (signature) => signature.minArgumentCount === 0 && !signatureHasRestParameter(signature) && signature.parameters.length < getDecoratorArgumentCount(decorator, signature)); } @@ -73925,6 +74513,8 @@ ${lanes.join("\n")} case 286 /* JsxOpeningElement */: case 285 /* JsxSelfClosingElement */: return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode); + case 226 /* BinaryExpression */: + return resolveInstanceofExpression(node, candidatesOutArray, checkMode); } Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable."); } @@ -74382,12 +74972,7 @@ ${lanes.join("\n")} addLazyDiagnostic(() => { const widenedType = getWidenedType(exprType); if (!isTypeComparableTo(targetType, widenedType)) { - checkTypeComparableTo( - exprType, - targetType, - errNode, - 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 - ); + checkTypeComparableTo(exprType, targetType, errNode, 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); } }); } @@ -74544,14 +75129,14 @@ ${lanes.join("\n")} return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType; } function getTypeOfParameter(symbol) { - const type = getTypeOfSymbol(symbol); - if (strictNullChecks) { - const declaration = symbol.valueDeclaration; - if (declaration && hasInitializer(declaration)) { - return getOptionalType(type); - } - } - return type; + const declaration = symbol.valueDeclaration; + return addOptionality( + getTypeOfSymbol(symbol), + /*isProperty*/ + false, + /*isOptional*/ + !!declaration && (hasInitializer(declaration) || isOptionalDeclaration(declaration)) + ); } function getTupleElementLabel(d, index, restParameterName = "arg") { if (!d) { @@ -74649,7 +75234,7 @@ ${lanes.join("\n")} } return void 0; } - function getRestTypeAtPosition(source, pos) { + function getRestTypeAtPosition(source, pos, readonly) { const parameterCount = getParameterCount(source); const minArgumentCount = getMinArgumentCount(source); const restType = getEffectiveRestType(source); @@ -74667,18 +75252,9 @@ ${lanes.join("\n")} types.push(restType); flags.push(8 /* Variadic */); } - const name = getNameableDeclarationAtPosition(source, i); - if (name) { - names.push(name); - } + names.push(getNameableDeclarationAtPosition(source, i)); } - return createTupleType( - types, - flags, - /*readonly*/ - false, - length(names) === length(types) ? names : void 0 - ); + return createTupleType(types, flags, readonly, names); } function getParameterCount(signature) { const length2 = signature.parameters.length; @@ -74758,11 +75334,16 @@ ${lanes.join("\n")} const len = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0); for (let i = 0; i < len; i++) { const declaration = signature.parameters[i].valueDeclaration; - if (declaration.type) { - const typeNode = getEffectiveTypeAnnotationNode(declaration); - if (typeNode) { - inferTypes(inferenceContext.inferences, getTypeFromTypeNode(typeNode), getTypeAtPosition(context, i)); - } + const typeNode = getEffectiveTypeAnnotationNode(declaration); + if (typeNode) { + const source = addOptionality( + getTypeFromTypeNode(typeNode), + /*isProperty*/ + false, + isOptionalDeclaration(declaration) + ); + const target = getTypeAtPosition(context, i); + inferTypes(inferenceContext.inferences, source, target); } } } @@ -74811,29 +75392,40 @@ ${lanes.join("\n")} assignParameterType(parameter); } } - function assignParameterType(parameter, type) { + function assignParameterType(parameter, contextualType) { const links = getSymbolLinks(parameter); if (!links.type) { const declaration = parameter.valueDeclaration; - links.type = type || (declaration ? getWidenedTypeForVariableLikeDeclaration( - declaration, - /*reportErrors*/ - true - ) : getTypeOfSymbol(parameter)); + links.type = addOptionality( + contextualType || (declaration ? getWidenedTypeForVariableLikeDeclaration( + declaration, + /*reportErrors*/ + true + ) : getTypeOfSymbol(parameter)), + /*isProperty*/ + false, + /*isOptional*/ + !!declaration && !declaration.initializer && isOptionalDeclaration(declaration) + ); if (declaration && declaration.name.kind !== 80 /* Identifier */) { if (links.type === unknownType) { links.type = getTypeFromBindingPattern(declaration.name); } assignBindingElementTypes(declaration.name, links.type); } - } else if (type) { - Debug.assertEqual(links.type, type, "Parameter symbol already has a cached type which differs from newly assigned type"); + } else if (contextualType) { + Debug.assertEqual(links.type, contextualType, "Parameter symbol already has a cached type which differs from newly assigned type"); } } function assignBindingElementTypes(pattern, parentType) { for (const element of pattern.elements) { if (!isOmittedExpression(element)) { - const type = getBindingElementTypeFromParentType(element, parentType); + const type = getBindingElementTypeFromParentType( + element, + parentType, + /*noTupleBoundsCheck*/ + false + ); if (element.name.kind === 80 /* Identifier */) { getSymbolLinks(getSymbolOfDeclaration(element)).type = type; } else { @@ -75104,13 +75696,19 @@ ${lanes.join("\n")} function createPromiseReturnType(func, promisedType) { const promiseType = createPromiseType(promisedType); if (promiseType === unknownType) { - error2(func, isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option); + error2( + func, + isImportCall(func) ? Diagnostics.A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option : Diagnostics.An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option + ); return errorType; } else if (!getGlobalPromiseConstructorSymbol( /*reportErrors*/ true )) { - error2(func, isImportCall(func) ? Diagnostics.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 : 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); + error2( + func, + isImportCall(func) ? Diagnostics.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 : 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 + ); } return promiseType; } @@ -75293,7 +75891,11 @@ ${lanes.join("\n")} function getYieldedTypeOfYieldExpression(node, expressionType, sentType, isAsync) { const errorNode = node.expression || node; const yieldedType = node.asteriskToken ? checkIteratedTypeOrElementType(isAsync ? 19 /* AsyncYieldStar */ : 17 /* YieldStar */, expressionType, sentType, errorNode) : expressionType; - return !isAsync ? yieldedType : getAwaitedType(yieldedType, errorNode, node.asteriskToken ? Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member); + return !isAsync ? yieldedType : getAwaitedType( + yieldedType, + errorNode, + node.asteriskToken ? Diagnostics.Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member : Diagnostics.Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member + ); } function getNotEqualFactsFromTypeofSwitch(start, end, witnesses) { let facts = 0 /* None */; @@ -75327,7 +75929,7 @@ ${lanes.join("\n")} if (operandConstraint.flags & 3 /* AnyOrUnknown */) { return (556800 /* AllTypeofNE */ & notEqualFacts) === 556800 /* AllTypeofNE */; } - return !someType(operandConstraint, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts); + return !someType(operandConstraint, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts); } const type = checkExpressionCached(node.expression); if (!isLiteralType(type)) { @@ -75348,8 +75950,20 @@ ${lanes.join("\n")} let hasReturnWithNoExpression = functionHasImplicitReturn(func); let hasReturnOfTypeNever = false; forEachReturnStatement(func.body, (returnStatement) => { - const expr = returnStatement.expression; + let expr = returnStatement.expression; if (expr) { + expr = skipParentheses( + expr, + /*excludeJSDocTypeAssertions*/ + true + ); + if (functionFlags & 2 /* Async */ && expr.kind === 223 /* AwaitExpression */) { + expr = skipParentheses( + expr.expression, + /*excludeJSDocTypeAssertions*/ + true + ); + } if (expr.kind === 213 /* CallExpression */ && expr.expression.kind === 80 /* Identifier */ && checkExpressionCached(expr.expression).symbol === func.symbol) { hasReturnOfTypeNever = true; return; @@ -75581,7 +76195,7 @@ ${lanes.join("\n")} return !setProp; } function isReadonlySymbol(symbol) { - return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 64 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); + return !!(getCheckFlags(symbol) & 8 /* Readonly */ || symbol.flags & 4 /* Property */ && getDeclarationModifierFlagsFromSymbol(symbol) & 8 /* Readonly */ || symbol.flags & 3 /* Variable */ && getDeclarationNodeFlagsFromSymbol(symbol) & 6 /* Constant */ || symbol.flags & 98304 /* Accessor */ && !(symbol.flags & 65536 /* SetAccessor */) || symbol.flags & 8 /* EnumMember */ || some(symbol.declarations, isReadonlyAssignmentDeclaration)); } function isAssignmentToReadonlyEntity(expr, symbol, assignmentKind) { var _a, _b; @@ -75645,14 +76259,15 @@ ${lanes.join("\n")} if (symbol) { if (isReadonlySymbol(symbol)) { error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property); + } else { + checkDeleteExpressionMustBeOptional(expr, symbol); } - checkDeleteExpressionMustBeOptional(expr, symbol); } return booleanType; } function checkDeleteExpressionMustBeOptional(expr, symbol) { const type = getTypeOfSymbol(symbol); - if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : getTypeFacts(type) & 16777216 /* IsUndefined */)) { + if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : hasTypeFacts(type, 16777216 /* IsUndefined */))) { error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional); } } @@ -75661,7 +76276,7 @@ ${lanes.join("\n")} return typeofType; } function checkVoidExpression(node) { - checkExpression(node.expression); + checkNodeDeferred(node); return undefinedWideningType; } function checkAwaitGrammar(node) { @@ -75787,15 +76402,11 @@ ${lanes.join("\n")} return getUnaryResultType(operandType); case 54 /* ExclamationToken */: checkTruthinessOfType(operandType, node.operand); - const facts = getTypeFacts(operandType) & (4194304 /* Truthy */ | 8388608 /* Falsy */); + const facts = getTypeFacts(operandType, 4194304 /* Truthy */ | 8388608 /* Falsy */); return facts === 4194304 /* Truthy */ ? falseType : facts === 8388608 /* Falsy */ ? trueType : booleanType; case 46 /* PlusPlusToken */: case 47 /* MinusMinusToken */: - const ok = checkArithmeticOperandType( - node.operand, - checkNonNullType(operandType, node.operand), - Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type - ); + const ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type); if (ok) { checkReferenceExpression( node.operand, @@ -75871,16 +76482,35 @@ ${lanes.join("\n")} function isConstEnumSymbol(symbol) { return (symbol.flags & 128 /* ConstEnum */) !== 0; } - function checkInstanceOfExpression(left, right, leftType, rightType) { + function getSymbolHasInstanceMethodOfObjectType(type) { + const hasInstancePropertyName = getPropertyNameForKnownSymbolName("hasInstance"); + const hasInstanceProperty = getPropertyOfObjectType(type, hasInstancePropertyName); + if (hasInstanceProperty) { + const hasInstancePropertyType = getTypeOfSymbol(hasInstanceProperty); + if (hasInstancePropertyType && getSignaturesOfType(hasInstancePropertyType, 0 /* Call */).length !== 0) { + return hasInstancePropertyType; + } + } + } + function checkInstanceOfExpression(left, right, leftType, rightType, checkMode) { if (leftType === silentNeverType || rightType === silentNeverType) { return silentNeverType; } if (!isTypeAny(leftType) && allTypesAssignableToKind(leftType, 402784252 /* Primitive */)) { error2(left, Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); } - if (!(isTypeAny(rightType) || typeHasCallOrConstructSignatures(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error2(right, Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); + Debug.assert(isInstanceOfExpression(left.parent)); + const signature = getResolvedSignature( + left.parent, + /*candidatesOutArray*/ + void 0, + checkMode + ); + if (signature === resolvingSignature) { + return silentNeverType; } + const returnType = getReturnTypeOfSignature(signature); + checkTypeAssignableTo(returnType, booleanType, right, Diagnostics.An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression); return booleanType; } function hasEmptyObjectIntersection(type) { @@ -76022,7 +76652,7 @@ ${lanes.join("\n")} if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) { const prop = exprOrAssignment; if (prop.objectAssignmentInitializer) { - if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) { + if (strictNullChecks && !hasTypeFacts(checkExpression(prop.objectAssignmentInitializer), 16777216 /* IsUndefined */)) { sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */); } checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode); @@ -76388,7 +77018,9 @@ ${lanes.join("\n")} } if (!resultType) { const closeEnoughKind = 296 /* NumberLike */ | 2112 /* BigIntLike */ | 402653316 /* StringLike */ | 3 /* AnyOrUnknown */; - reportOperatorError((left2, right2) => isTypeAssignableToKind(left2, closeEnoughKind) && isTypeAssignableToKind(right2, closeEnoughKind)); + reportOperatorError( + (left2, right2) => isTypeAssignableToKind(left2, closeEnoughKind) && isTypeAssignableToKind(right2, closeEnoughKind) + ); return anyType; } if (operator === 65 /* PlusEqualsToken */) { @@ -76416,7 +77048,7 @@ ${lanes.join("\n")} case 36 /* ExclamationEqualsToken */: case 37 /* EqualsEqualsEqualsToken */: case 38 /* ExclamationEqualsEqualsToken */: - if (!(checkMode && checkMode & 128 /* TypeOnly */)) { + if (!(checkMode && checkMode & 64 /* TypeOnly */)) { if ((isLiteralExpressionOfObject(left) || isLiteralExpressionOfObject(right)) && // only report for === and !== in JS, not == or != (!isInJSFile(left) || (operator === 37 /* EqualsEqualsEqualsToken */ || operator === 38 /* ExclamationEqualsEqualsToken */))) { const eqType = operator === 35 /* EqualsEqualsToken */ || operator === 37 /* EqualsEqualsEqualsToken */; @@ -76427,12 +77059,12 @@ ${lanes.join("\n")} } return booleanType; case 104 /* InstanceOfKeyword */: - return checkInstanceOfExpression(left, right, leftType, rightType); + return checkInstanceOfExpression(left, right, leftType, rightType, checkMode); case 103 /* InKeyword */: return checkInExpression(left, right, leftType, rightType); case 56 /* AmpersandAmpersandToken */: case 77 /* AmpersandAmpersandEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 4194304 /* Truthy */ ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType; + const resultType2 = hasTypeFacts(leftType, 4194304 /* Truthy */) ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType; if (operator === 77 /* AmpersandAmpersandEqualsToken */) { checkAssignmentOperator(rightType); } @@ -76440,7 +77072,7 @@ ${lanes.join("\n")} } case 57 /* BarBarToken */: case 76 /* BarBarEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 8388608 /* Falsy */ ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType; + const resultType2 = hasTypeFacts(leftType, 8388608 /* Falsy */) ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType; if (operator === 76 /* BarBarEqualsToken */) { checkAssignmentOperator(rightType); } @@ -76448,7 +77080,7 @@ ${lanes.join("\n")} } case 61 /* QuestionQuestionToken */: case 78 /* QuestionQuestionEqualsToken */: { - const resultType2 = getTypeFacts(leftType) & 262144 /* EQUndefinedOrNull */ ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType; + const resultType2 = hasTypeFacts(leftType, 262144 /* EQUndefinedOrNull */) ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType; if (operator === 78 /* QuestionQuestionEqualsToken */) { checkAssignmentOperator(rightType); } @@ -76552,11 +77184,7 @@ ${lanes.join("\n")} true ); } - if (checkReferenceExpression( - left, - Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, - Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access - )) { + if (checkReferenceExpression(left, Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)) { let headMessage; if (exactOptionalPropertyTypes && isPropertyAccessExpression(left) && maybeTypeOfKind(valueType, 32768 /* Undefined */)) { const target = getTypeOfPropertyOfType(getTypeOfExpression(left.expression), left.name.escapedText); @@ -76638,21 +77266,13 @@ ${lanes.join("\n")} const isLeftNaN = isGlobalNaN(skipParentheses(left2)); const isRightNaN = isGlobalNaN(skipParentheses(right2)); if (isLeftNaN || isRightNaN) { - const err = error2( - errorNode2, - Diagnostics.This_condition_will_always_return_0, - tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */) - ); + const err = error2(errorNode2, Diagnostics.This_condition_will_always_return_0, tokenToString(operator2 === 37 /* EqualsEqualsEqualsToken */ || operator2 === 35 /* EqualsEqualsToken */ ? 97 /* FalseKeyword */ : 112 /* TrueKeyword */)); if (isLeftNaN && isRightNaN) return; const operatorString = operator2 === 38 /* ExclamationEqualsEqualsToken */ || operator2 === 36 /* ExclamationEqualsToken */ ? tokenToString(54 /* ExclamationToken */) : ""; const location = isLeftNaN ? right2 : left2; const expression = skipParentheses(location); - addRelatedInfo(err, createDiagnosticForNode( - location, - Diagnostics.Did_you_mean_0, - `${operatorString}Number.isNaN(${isEntityNameExpression(expression) ? entityNameToString(expression) : "..."})` - )); + addRelatedInfo(err, createDiagnosticForNode(location, Diagnostics.Did_you_mean_0, `${operatorString}Number.isNaN(${isEntityNameExpression(expression) ? entityNameToString(expression) : "..."})`)); } } function isGlobalNaN(expr) { @@ -76692,7 +77312,15 @@ ${lanes.join("\n")} checkExternalEmitHelpers(node, 256 /* Values */); } } - const returnType = getReturnTypeFromAnnotation(func); + let returnType = getReturnTypeFromAnnotation(func); + if (returnType && returnType.flags & 1048576 /* Union */) { + returnType = filterType(returnType, (t) => checkGeneratorInstantiationAssignabilityToReturnType( + t, + functionFlags, + /*errorNode*/ + void 0 + )); + } const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync); const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType; const signatureNextType = iterationTypes && iterationTypes.nextType || anyType; @@ -77076,7 +77704,7 @@ ${lanes.join("\n")} } } const startInvocationCount = flowInvocationCount; - const type = checkExpression(node, 128 /* TypeOnly */); + const type = checkExpression(node, 64 /* TypeOnly */); if (flowInvocationCount !== startInvocationCount) { const cache = flowTypeCache || (flowTypeCache = []); cache[getNodeId(node)] = type; @@ -77191,7 +77819,7 @@ ${lanes.join("\n")} return nullWideningType; case 15 /* NoSubstitutionTemplateLiteral */: case 11 /* StringLiteral */: - return hasSkipDirectInferenceFlag(node) ? wildcardType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); + return hasSkipDirectInferenceFlag(node) ? blockedStringType : getFreshTypeOfLiteralType(getStringLiteralType(node.text)); case 9 /* NumericLiteral */: checkGrammarNumericLiteral(node); return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text)); @@ -77308,15 +77936,15 @@ ${lanes.join("\n")} var _a, _b; if (isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent)) { const typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfDeclaration(node)); - const modifiers = getTypeParameterModifiers(typeParameter) & (32768 /* In */ | 65536 /* Out */); + const modifiers = getTypeParameterModifiers(typeParameter) & (8192 /* In */ | 16384 /* Out */); if (modifiers) { const symbol = getSymbolOfDeclaration(node.parent); if (isTypeAliasDeclaration(node.parent) && !(getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 /* Anonymous */ | 32 /* Mapped */))) { error2(node, Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types); - } else if (modifiers === 32768 /* In */ || modifiers === 65536 /* Out */) { + } else if (modifiers === 8192 /* In */ || modifiers === 16384 /* Out */) { (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.CheckTypes, "checkTypeParameterDeferred", { parent: getTypeId(getDeclaredTypeOfSymbol(symbol)), id: getTypeId(typeParameter) }); - const source = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); - const target = createMarkerType(symbol, typeParameter, modifiers === 65536 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck); + const source = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSubTypeForCheck : markerSuperTypeForCheck); + const target = createMarkerType(symbol, typeParameter, modifiers === 16384 /* Out */ ? markerSuperTypeForCheck : markerSubTypeForCheck); const saveVarianceTypeParameter = typeParameter; varianceTypeParameter = typeParameter; checkTypeAssignableTo(source, target, node, Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation); @@ -77330,7 +77958,7 @@ ${lanes.join("\n")} checkGrammarModifiers(node); checkVariableLikeDeclaration(node); const func = getContainingFunction(node); - if (hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { + if (hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) { if (!(func.kind === 176 /* Constructor */ && nodeIsPresent(func.body))) { error2(node, Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); } @@ -77431,11 +78059,7 @@ ${lanes.join("\n")} } const name = element.name; if (name.kind === 80 /* Identifier */ && name.escapedText === predicateVariableName) { - error2( - predicateVariableNode, - Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, - predicateVariableName - ); + error2(predicateVariableNode, Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName); return true; } else if (name.kind === 207 /* ArrayBindingPattern */ || name.kind === 206 /* ObjectBindingPattern */) { if (checkIfTypePredicateVariableIsDeclaredInBindingPattern( @@ -77504,11 +78128,7 @@ ${lanes.join("\n")} if (returnType === voidType) { error2(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation); } else { - const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType; - const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType; - const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType; - const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */)); - checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation); + checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags2, returnTypeErrorLocation); } } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) { checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation); @@ -77519,6 +78139,13 @@ ${lanes.join("\n")} } } } + function checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags, errorNode) { + const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags & 2 /* Async */) !== 0) || anyType; + const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags & 2 /* Async */) !== 0) || generatorYieldType; + const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags & 2 /* Async */) !== 0) || unknownType; + const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags & 2 /* Async */)); + return checkTypeAssignableTo(generatorInstantiation, returnType, errorNode); + } function checkClassForDuplicateDeclarations(node) { const instanceNames = /* @__PURE__ */ new Map(); const staticNames = /* @__PURE__ */ new Map(); @@ -77539,7 +78166,7 @@ ${lanes.join("\n")} const isPrivate = isPrivateIdentifier(name); const privateStaticFlags = isPrivate && isStaticMember ? 16 /* PrivateStatic */ : 0; const names = isPrivate ? privateIdentifiers : isStaticMember ? staticNames : instanceNames; - const memberName = name && getPropertyNameForPropertyNameNode(name); + const memberName = name && getEffectivePropertyNameForPropertyNameNode(name); if (memberName) { switch (member.kind) { case 177 /* GetAccessor */: @@ -77586,7 +78213,7 @@ ${lanes.join("\n")} const memberNameNode = member.name; const isStaticMember = isStatic(member); if (isStaticMember && memberNameNode) { - const memberName = getPropertyNameForPropertyNameNode(memberNameNode); + const memberName = getEffectivePropertyNameForPropertyNameNode(memberNameNode); switch (memberName) { case "name": case "length": @@ -77666,7 +78293,7 @@ ${lanes.join("\n")} checkGrammarComputedPropertyName(node.name); checkVariableLikeDeclaration(node); setNodeLinksForPrivateIdentifierScope(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { + if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 172 /* PropertyDeclaration */ && node.initializer) { error2(node, Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, declarationNameToString(node.name)); } } @@ -77683,7 +78310,7 @@ ${lanes.join("\n")} error2(node.name, Diagnostics.Class_constructor_may_not_be_a_generator); } checkFunctionOrMethodDeclaration(node); - if (hasSyntacticModifier(node, 256 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { + if (hasSyntacticModifier(node, 64 /* Abstract */) && node.kind === 174 /* MethodDeclaration */ && node.body) { error2(node, Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, declarationNameToString(node.name)); } if (isPrivateIdentifier(node.name) && !getContainingClass(node)) { @@ -77740,7 +78367,7 @@ ${lanes.join("\n")} if (classExtendsNull) { error2(superCall, Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null); } - const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 16476 /* ParameterPropertyModifier */))); + const superCallShouldBeRootLevel = !emitStandardClassFields && (some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) || some(node.parameters, (p) => hasSyntacticModifier(p, 31 /* ParameterPropertyModifier */))); if (superCallShouldBeRootLevel) { if (!superCallIsRootLevelInConstructor(superCall, node.body)) { error2(superCall, Diagnostics.A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers); @@ -77809,11 +78436,11 @@ ${lanes.join("\n")} getNodeLinks(getter).flags |= 1 /* TypeChecked */; const getterFlags = getEffectiveModifierFlags(getter); const setterFlags = getEffectiveModifierFlags(setter); - if ((getterFlags & 256 /* Abstract */) !== (setterFlags & 256 /* Abstract */)) { + if ((getterFlags & 64 /* Abstract */) !== (setterFlags & 64 /* Abstract */)) { error2(getter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); error2(setter.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); } - if (getterFlags & 16 /* Protected */ && !(setterFlags & (16 /* Protected */ | 8 /* Private */)) || getterFlags & 8 /* Private */ && !(setterFlags & 8 /* Private */)) { + if (getterFlags & 4 /* Protected */ && !(setterFlags & (4 /* Protected */ | 2 /* Private */)) || getterFlags & 2 /* Private */ && !(setterFlags & 2 /* Private */)) { error2(getter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); error2(setter.name, Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter); } @@ -77835,12 +78462,7 @@ ${lanes.join("\n")} return getEffectiveTypeArguments2(node, typeParameters)[index]; } function getEffectiveTypeArguments2(node, typeParameters) { - return fillMissingTypeArguments( - map(node.typeArguments, getTypeFromTypeNode), - typeParameters, - getMinTypeArgumentCount(typeParameters), - isInJSFile(node) - ); + return fillMissingTypeArguments(map(node.typeArguments, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isInJSFile(node)); } function checkTypeArgumentConstraints(node, typeParameters) { let typeArguments; @@ -77998,7 +78620,7 @@ ${lanes.join("\n")} const propertyName = getPropertyNameFromIndex(indexType, accessNode); if (propertyName) { const propertySymbol = forEachType(apparentObjectType, (t) => getPropertyOfType(t, propertyName)); - if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 24 /* NonPublicAccessibilityModifier */) { + if (propertySymbol && getDeclarationModifierFlagsFromSymbol(propertySymbol) & 6 /* NonPublicAccessibilityModifier */) { error2(accessNode, Diagnostics.Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter, unescapeLeadingUnderscores(propertyName)); return errorType; } @@ -78077,16 +78699,8 @@ ${lanes.join("\n")} } function checkImportType(node) { checkSourceElement(node.argument); - if (node.assertions) { - const override = getResolutionModeOverrideForClause(node.assertions.assertClause, grammarErrorOnNode); - if (override) { - if (!isNightly()) { - grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next); - } - if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) { - grammarErrorOnNode(node.assertions.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext); - } - } + if (node.attributes) { + getResolutionModeOverride(node.attributes, grammarErrorOnNode); } checkTypeReferenceOrImport(node); } @@ -78104,16 +78718,16 @@ ${lanes.join("\n")} getTypeFromTypeNode(node); } function isPrivateWithinAmbient(node) { - return (hasEffectiveModifier(node, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); + return (hasEffectiveModifier(node, 2 /* Private */) || isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 33554432 /* Ambient */); } function getEffectiveDeclarationFlags(n, flagsToCheck) { let flags = getCombinedModifierFlagsCached(n); if (n.parent.kind !== 264 /* InterfaceDeclaration */ && n.parent.kind !== 263 /* ClassDeclaration */ && n.parent.kind !== 231 /* ClassExpression */ && n.flags & 33554432 /* Ambient */) { const container = getEnclosingContainer(n); - if (container && container.flags & 128 /* ExportContext */ && !(flags & 2 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { - flags |= 1 /* Export */; + if (container && container.flags & 128 /* ExportContext */ && !(flags & 128 /* Ambient */) && !(isModuleBlock(n.parent) && isModuleDeclaration(n.parent.parent) && isGlobalScopeAugmentation(n.parent.parent))) { + flags |= 32 /* Export */; } - flags |= 2 /* Ambient */; + flags |= 128 /* Ambient */; } return flags & flagsToCheck; } @@ -78131,13 +78745,13 @@ ${lanes.join("\n")} const canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck2); forEach(overloads, (o) => { const deviation = getEffectiveDeclarationFlags(o, flagsToCheck2) ^ canonicalFlags; - if (deviation & 1 /* Export */) { + if (deviation & 32 /* Export */) { error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported); - } else if (deviation & 2 /* Ambient */) { + } else if (deviation & 128 /* Ambient */) { error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); - } else if (deviation & (8 /* Private */ | 16 /* Protected */)) { + } else if (deviation & (2 /* Private */ | 4 /* Protected */)) { error2(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); - } else if (deviation & 256 /* Abstract */) { + } else if (deviation & 64 /* Abstract */) { error2(getNameOfDeclaration(o), Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract); } }); @@ -78154,7 +78768,7 @@ ${lanes.join("\n")} }); } } - const flagsToCheck = 1 /* Export */ | 2 /* Ambient */ | 8 /* Private */ | 16 /* Protected */ | 256 /* Abstract */; + const flagsToCheck = 32 /* Export */ | 128 /* Ambient */ | 2 /* Private */ | 4 /* Protected */ | 64 /* Abstract */; let someNodeFlags = 0 /* None */; let allNodeFlags = flagsToCheck; let someHaveQuestionToken = false; @@ -78202,7 +78816,7 @@ ${lanes.join("\n")} if (isConstructor) { error2(errorNode, Diagnostics.Constructor_implementation_is_missing); } else { - if (hasSyntacticModifier(node, 256 /* Abstract */)) { + if (hasSyntacticModifier(node, 64 /* Abstract */)) { error2(errorNode, Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive); } else { error2(errorNode, Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); @@ -78288,7 +78902,7 @@ ${lanes.join("\n")} } }); } - if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 256 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) { + if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body && !hasSyntacticModifier(lastSeenNonAmbientDeclaration, 64 /* Abstract */) && !lastSeenNonAmbientDeclaration.questionToken) { reportImplementationExpectedError(lastSeenNonAmbientDeclaration); } if (hasOverloads) { @@ -78331,9 +78945,9 @@ ${lanes.join("\n")} let defaultExportedDeclarationSpaces = 0 /* None */; for (const d of symbol.declarations) { const declarationSpaces = getDeclarationSpaces(d); - const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 1 /* Export */ | 1024 /* Default */); - if (effectiveDeclarationFlags & 1 /* Export */) { - if (effectiveDeclarationFlags & 1024 /* Default */) { + const effectiveDeclarationFlags = getEffectiveDeclarationFlags(d, 32 /* Export */ | 2048 /* Default */); + if (effectiveDeclarationFlags & 32 /* Export */) { + if (effectiveDeclarationFlags & 2048 /* Default */) { defaultExportedDeclarationSpaces |= declarationSpaces; } else { exportedDeclarationSpaces |= declarationSpaces; @@ -78655,12 +79269,7 @@ ${lanes.join("\n")} const rootName = promiseConstructorName && getFirstIdentifier(promiseConstructorName); const collidingSymbol = getSymbol2(node.locals, rootName.escapedText, 111551 /* Value */); if (collidingSymbol) { - error2( - collidingSymbol.valueDeclaration, - Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, - idText(rootName), - entityNameToString(promiseConstructorName) - ); + error2(collidingSymbol.valueDeclaration, Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions, idText(rootName), entityNameToString(promiseConstructorName)); return; } } @@ -78979,6 +79588,12 @@ ${lanes.join("\n")} } } } + function checkJSDocThisTag(node) { + const host2 = getEffectiveJSDocHost(node); + if (host2 && isArrowFunction(host2)) { + error2(node.tagName, Diagnostics.An_arrow_function_cannot_have_a_this_parameter); + } + } function checkJSDocImplementsTag(node) { const classLike = getEffectiveJSDocHost(node); if (!classLike || !isClassDeclaration(classLike) && !isClassExpression(classLike)) { @@ -79141,13 +79756,13 @@ ${lanes.join("\n")} break; } const symbol = getSymbolOfDeclaration(member); - if (!symbol.isReferenced && (hasEffectiveModifier(member, 8 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { + if (!symbol.isReferenced && (hasEffectiveModifier(member, 2 /* Private */) || isNamedDeclaration(member) && isPrivateIdentifier(member.name)) && !(member.flags & 33554432 /* Ambient */)) { addDiagnostic(member, 0 /* Local */, createDiagnosticForNode(member.name, Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol))); } break; case 176 /* Constructor */: for (const parameter of member.parameters) { - if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 8 /* Private */)) { + if (!parameter.symbol.isReferenced && hasSyntacticModifier(parameter, 2 /* Private */)) { addDiagnostic(parameter, 0 /* Local */, createDiagnosticForNode(parameter.name, Diagnostics.Property_0_is_declared_but_its_value_is_never_read, symbolName(parameter.symbol))); } } @@ -79263,7 +79878,11 @@ ${lanes.join("\n")} const importDecl = importClause.parent; const nDeclarations = (importClause.name ? 1 : 0) + (importClause.namedBindings ? importClause.namedBindings.kind === 274 /* NamespaceImport */ ? 1 : importClause.namedBindings.elements.length : 0); if (nDeclarations === unuseds.length) { - addDiagnostic(importDecl, 0 /* Local */, unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused)); + addDiagnostic( + importDecl, + 0 /* Local */, + unuseds.length === 1 ? createDiagnosticForNode(importDecl, Diagnostics._0_is_declared_but_its_value_is_never_read, idText(first(unuseds).name)) : createDiagnosticForNode(importDecl, Diagnostics.All_imports_in_import_declaration_are_unused) + ); } else { for (const unused of unuseds) errorUnusedLocal(unused, idText(unused.name), addDiagnostic); @@ -79275,7 +79894,11 @@ ${lanes.join("\n")} if (bindingElements.length === 1 && bindingPattern.parent.kind === 260 /* VariableDeclaration */ && bindingPattern.parent.parent.kind === 261 /* VariableDeclarationList */) { addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId); } else { - addDiagnostic(bindingPattern, kind, bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused)); + addDiagnostic( + bindingPattern, + kind, + bindingElements.length === 1 ? createDiagnosticForNode(bindingPattern, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(bindingElements).name)) : createDiagnosticForNode(bindingPattern, Diagnostics.All_destructured_elements_are_unused) + ); } } else { for (const e of bindingElements) { @@ -79285,7 +79908,11 @@ ${lanes.join("\n")} }); unusedVariables.forEach(([declarationList, declarations]) => { if (declarationList.declarations.length === declarations.length) { - addDiagnostic(declarationList, 0 /* Local */, declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused)); + addDiagnostic( + declarationList, + 0 /* Local */, + declarations.length === 1 ? createDiagnosticForNode(first(declarations).name, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(first(declarations).name)) : createDiagnosticForNode(declarationList.parent.kind === 243 /* VariableStatement */ ? declarationList.parent : declarationList, Diagnostics.All_variables_are_unused) + ); } else { for (const decl of declarations) { addDiagnostic(decl, 0 /* Local */, createDiagnosticForNode(decl, Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(decl.name))); @@ -79413,13 +80040,7 @@ ${lanes.join("\n")} } const parent2 = getDeclarationContainer(node); if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2)) { - errorSkippedOn( - "noEmit", - name, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, - declarationNameToString(name), - declarationNameToString(name) - ); + errorSkippedOn("noEmit", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, declarationNameToString(name), declarationNameToString(name)); } } function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) { @@ -79431,13 +80052,7 @@ ${lanes.join("\n")} } const parent2 = getDeclarationContainer(node); if (parent2.kind === 312 /* SourceFile */ && isExternalOrCommonJsModule(parent2) && parent2.flags & 4096 /* HasAsyncFunctions */) { - errorSkippedOn( - "noEmit", - name, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, - declarationNameToString(name), - declarationNameToString(name) - ); + errorSkippedOn("noEmit", name, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, declarationNameToString(name), declarationNameToString(name)); } } function recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name) { @@ -79478,13 +80093,7 @@ ${lanes.join("\n")} } if (hasCollision) { Debug.assert(isNamedDeclaration(node) && isIdentifier(node.name), "The target of a Reflect collision check should be an identifier"); - errorSkippedOn( - "noEmit", - node, - Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, - declarationNameToString(node.name), - "Reflect" - ); + errorSkippedOn("noEmit", node, Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, declarationNameToString(node.name), "Reflect"); } } function checkCollisionsForDeclarationName(node, name) { @@ -79565,7 +80174,7 @@ ${lanes.join("\n")} checkComputedPropertyName(node.propertyName); } const parent2 = node.parent.parent; - const parentCheckMode = node.dotDotDotToken ? 64 /* RestBindingElement */ : 0 /* Normal */; + const parentCheckMode = node.dotDotDotToken ? 32 /* RestBindingElement */ : 0 /* Normal */; const parentType = getTypeForBindingElementParent(parent2, parentCheckMode); const name = node.propertyName || node.name; if (parentType && !isBindingPattern(name)) { @@ -79599,7 +80208,7 @@ ${lanes.join("\n")} } forEach(node.name.elements, checkSourceElement); } - if (isParameter(node) && node.initializer && nodeIsMissing(getContainingFunction(node).body)) { + if (node.initializer && isParameterDeclaration(node) && nodeIsMissing(getContainingFunction(node).body)) { error2(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } @@ -79719,10 +80328,7 @@ ${lanes.join("\n")} typeToString(nextType) ); if (firstDeclaration) { - addRelatedInfo( - err, - createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName) - ); + addRelatedInfo(err, createDiagnosticForNode(firstDeclaration, Diagnostics._0_was_also_declared_here, declName)); } } function areDeclarationFlagsIdentical(left, right) { @@ -79732,7 +80338,7 @@ ${lanes.join("\n")} if (hasQuestionToken(left) !== hasQuestionToken(right)) { return false; } - const interestingFlags = 8 /* Private */ | 16 /* Protected */ | 512 /* Async */ | 256 /* Abstract */ | 64 /* Readonly */ | 32 /* Static */; + const interestingFlags = 2 /* Private */ | 4 /* Protected */ | 1024 /* Async */ | 64 /* Abstract */ | 8 /* Readonly */ | 256 /* Static */; return getSelectedEffectiveModifierFlags(left, interestingFlags) === getSelectedEffectiveModifierFlags(right, interestingFlags); } function checkVariableDeclaration(node) { @@ -79795,7 +80401,7 @@ ${lanes.join("\n")} } const type = location === condExpr2 ? condType : checkTruthinessExpression(location); const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression); - if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast) + if (!hasTypeFacts(type, 4194304 /* Truthy */) || isPropertyExpressionCast) return; const callSignatures = getSignaturesOfType(type, 0 /* Call */); const isPromise = !!getAwaitedTypeOfPromise(type); @@ -80359,13 +80965,10 @@ ${lanes.join("\n")} !!getAwaitedTypeOfPromise(type) || !allowAsyncIterables && isForOfStatement(errorNode.parent) && errorNode.parent.expression === errorNode && getGlobalAsyncIterableType( /*reportErrors*/ false - ) !== emptyGenericType && isTypeAssignableTo( - type, - getGlobalAsyncIterableType( - /*reportErrors*/ - false - ) - ) + ) !== emptyGenericType && isTypeAssignableTo(type, getGlobalAsyncIterableType( + /*reportErrors*/ + false + )) ); return errorAndMaybeSuggestAwait(errorNode, suggestAwait, message, typeToString(type)); } @@ -80822,14 +81425,7 @@ ${lanes.join("\n")} const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; const errorNode = localPropDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); if (errorNode && !isTypeAssignableTo(propType, info.type)) { - const diagnostic = createError( - errorNode, - Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, - symbolToString(prop), - typeToString(propType), - typeToString(info.keyType), - typeToString(info.type) - ); + const diagnostic = createError(errorNode, Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type)); if (propDeclaration && errorNode !== propDeclaration) { addRelatedInfo(diagnostic, createDiagnosticForNode(propDeclaration, Diagnostics._0_is_declared_here, symbolToString(prop))); } @@ -80848,14 +81444,7 @@ ${lanes.join("\n")} const localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfDeclaration(info.declaration)) === type.symbol ? info.declaration : void 0; const errorNode = localCheckDeclaration || localIndexDeclaration || (interfaceDeclaration && !some(getBaseTypes(type), (base) => !!getIndexInfoOfType(base, checkInfo.keyType) && !!getIndexTypeOfType(base, info.keyType)) ? interfaceDeclaration : void 0); if (errorNode && !isTypeAssignableTo(checkInfo.type, info.type)) { - error2( - errorNode, - Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, - typeToString(checkInfo.keyType), - typeToString(checkInfo.type), - typeToString(info.keyType), - typeToString(info.type) - ); + error2(errorNode, Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), typeToString(checkInfo.type), typeToString(info.keyType), typeToString(info.type)); } } } @@ -81077,7 +81666,7 @@ ${lanes.join("\n")} if (legacyDecorators && firstDecorator && some(node.members, (p) => hasStaticModifier(p) && isPrivateIdentifierClassElementDeclaration(p))) { grammarErrorOnNode(firstDecorator, Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator); } - if (!node.name && !hasSyntacticModifier(node, 1024 /* Default */)) { + if (!node.name && !hasSyntacticModifier(node, 2048 /* Default */)) { grammarErrorOnFirstToken(node, Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name); } checkClassLikeDeclaration(node); @@ -81136,19 +81725,14 @@ ${lanes.join("\n")} )) { issueMemberSpecificError(node, typeWithThis, baseWithThis, Diagnostics.Class_0_incorrectly_extends_base_class_1); } else { - checkTypeAssignableTo( - staticType, - getTypeWithoutSignatures(staticBaseType), - node.name || node, - Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1 - ); + checkTypeAssignableTo(staticType, getTypeWithoutSignatures(staticBaseType), node.name || node, Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); } if (baseConstructorType.flags & 8650752 /* TypeVariable */) { if (!isMixinConstructorType(staticType)) { error2(node.name || node, Diagnostics.A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any); } else { const constructSignatures = getSignaturesOfType(baseConstructorType, 1 /* Construct */); - if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 256 /* Abstract */)) { + if (constructSignatures.some((signature) => signature.flags & 4 /* Abstract */) && !hasSyntacticModifier(node, 64 /* Abstract */)) { error2(node.name || node, Diagnostics.A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract); } } @@ -81362,7 +81946,7 @@ ${lanes.join("\n")} const signatures = getSignaturesOfType(type, 1 /* Construct */); if (signatures.length) { const declaration = signatures[0].declaration; - if (declaration && hasEffectiveModifier(declaration, 8 /* Private */)) { + if (declaration && hasEffectiveModifier(declaration, 2 /* Private */)) { const typeClassDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); if (!isNodeWithinClass(node, typeClassDeclaration)) { error2(node, Diagnostics.Cannot_extend_a_class_0_Class_constructor_is_marked_as_private, getFullyQualifiedName(type.symbol)); @@ -81382,7 +81966,7 @@ ${lanes.join("\n")} const baseTypes = baseTypeNode && getBaseTypes(type); const baseWithThis = (baseTypes == null ? void 0 : baseTypes.length) ? getTypeWithThisArgument(first(baseTypes), type.thisType) : void 0; const baseStaticType = getBaseConstructorTypeOfClass(type); - const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16384 /* Override */); + const memberHasOverrideModifier = member.parent ? hasOverrideModifier(member) : hasSyntacticModifier(member, 16 /* Override */); return checkMemberForOverrideModifier( node, staticType, @@ -81423,7 +82007,7 @@ ${lanes.join("\n")} Debug.assert(!!derived, "derived should point to something, even if it is the base class' declaration."); if (derived === base) { const derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol); - if (baseDeclarationFlags & 256 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 256 /* Abstract */))) { + if (baseDeclarationFlags & 64 /* Abstract */ && (!derivedClassDecl || !hasSyntacticModifier(derivedClassDecl, 64 /* Abstract */))) { for (const otherBaseType of getBaseTypes(type)) { if (otherBaseType === baseType) continue; @@ -81466,7 +82050,7 @@ ${lanes.join("\n")} } } else { const derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived); - if (baseDeclarationFlags & 8 /* Private */ || derivedDeclarationFlags & 8 /* Private */) { + if (baseDeclarationFlags & 2 /* Private */ || derivedDeclarationFlags & 2 /* Private */) { continue; } let errorMessage; @@ -81483,7 +82067,7 @@ ${lanes.join("\n")} error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type)); } else if (useDefineForClassFields) { const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer); - if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { + if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) { const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)); const propName = uninitialized.name; if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) { @@ -81510,7 +82094,7 @@ ${lanes.join("\n")} } } function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) { - return baseDeclarationFlags & 256 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent); + return baseDeclarationFlags & 64 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent); } function getNonInheritedProperties(type, baseTypes, properties) { if (!length(baseTypes)) { @@ -81575,7 +82159,7 @@ ${lanes.join("\n")} } const constructor = findConstructorDeclaration(node); for (const member of node.members) { - if (getEffectiveModifierFlags(member) & 2 /* Ambient */) { + if (getEffectiveModifierFlags(member) & 128 /* Ambient */) { continue; } if (!isStatic(member) && isPropertyWithoutInitializer(member)) { @@ -81704,7 +82288,10 @@ ${lanes.join("\n")} const value = evaluate(initializer, member); if (value !== void 0) { if (isConstEnum && typeof value === "number" && !isFinite(value)) { - error2(initializer, isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); + error2( + initializer, + isNaN(value) ? Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN : Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value + ); } } else if (isConstEnum) { error2(initializer, Diagnostics.const_enum_member_initializers_must_be_constant_expressions); @@ -81804,7 +82391,7 @@ ${lanes.join("\n")} } if (isConstantVariable(symbol)) { const declaration = symbol.valueDeclaration; - if (declaration && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { + if (declaration && isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && (!location || declaration !== location && isBlockScopedNameDeclaredBeforeUse(declaration, location))) { return evaluate(declaration.initializer, declaration); } } @@ -82071,7 +82658,10 @@ ${lanes.join("\n")} } const inAmbientExternalModule = node.parent.kind === 268 /* ModuleBlock */ && isAmbientModule(node.parent.parent); if (node.parent.kind !== 312 /* SourceFile */ && !inAmbientExternalModule) { - error2(moduleName, node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); + error2( + moduleName, + node.kind === 278 /* ExportDeclaration */ ? Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module + ); return false; } if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { @@ -82080,12 +82670,13 @@ ${lanes.join("\n")} return false; } } - if (!isImportEqualsDeclaration(node) && node.assertClause) { + if (!isImportEqualsDeclaration(node) && node.attributes) { + const diagnostic = node.attributes.token === 118 /* WithKeyword */ ? Diagnostics.Import_attribute_values_must_be_string_literal_expressions : Diagnostics.Import_assertion_values_must_be_string_literal_expressions; let hasError = false; - for (const clause of node.assertClause.elements) { - if (!isStringLiteral(clause.value)) { + for (const attr of node.attributes.elements) { + if (!isStringLiteral(attr.value)) { hasError = true; - error2(clause.value, Diagnostics.Import_assertion_values_must_be_string_literal_expressions); + error2(attr.value, diagnostic); } } return !hasError; @@ -82107,11 +82698,14 @@ ${lanes.join("\n")} if (alreadyExportedSymbol === target) { const exportingDeclaration = (_c = alreadyExportedSymbol.declarations) == null ? void 0 : _c.find(isJSDocNode); if (exportingDeclaration) { - addRelatedInfo(diag2, createDiagnosticForNode( - exportingDeclaration, - Diagnostics._0_is_automatically_exported_here, - unescapeLeadingUnderscores(alreadyExportedSymbol.escapedName) - )); + addRelatedInfo( + diag2, + createDiagnosticForNode( + exportingDeclaration, + Diagnostics._0_is_automatically_exported_here, + unescapeLeadingUnderscores(alreadyExportedSymbol.escapedName) + ) + ); } } } else { @@ -82152,7 +82746,7 @@ ${lanes.join("\n")} name ); } - if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 1 /* Export */)) { + if (isType && node.kind === 271 /* ImportEqualsDeclaration */ && hasEffectiveModifier(node, 32 /* Export */)) { error2(node, Diagnostics.Cannot_use_export_import_on_a_type_or_type_only_namespace_when_0_is_enabled, isolatedModulesLikeFlagName); } break; @@ -82214,32 +82808,26 @@ ${lanes.join("\n")} checkExternalEmitHelpers(node, 131072 /* ImportDefault */); } } - function checkAssertClause(declaration) { + function checkImportAttributes(declaration) { var _a; - if (declaration.assertClause) { - const validForTypeAssertions = isExclusivelyTypeOnlyImportOrExport(declaration); - const override = getResolutionModeOverrideForClause(declaration.assertClause, validForTypeAssertions ? grammarErrorOnNode : void 0); - if (validForTypeAssertions && override) { - if (!isNightly()) { - grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next); - } - if (getEmitModuleResolutionKind(compilerOptions) !== 3 /* Node16 */ && getEmitModuleResolutionKind(compilerOptions) !== 99 /* NodeNext */) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext); - } + const node = declaration.attributes; + if (node) { + const validForTypeAttributes = isExclusivelyTypeOnlyImportOrExport(declaration); + const override = getResolutionModeOverride(node, validForTypeAttributes ? grammarErrorOnNode : void 0); + const isImportAttributes2 = declaration.attributes.token === 118 /* WithKeyword */; + if (validForTypeAttributes && override) { return; } const mode = moduleKind === 199 /* NodeNext */ && declaration.moduleSpecifier && getUsageModeForExpression(declaration.moduleSpecifier); if (mode !== 99 /* ESNext */ && moduleKind !== 99 /* ESNext */) { - return grammarErrorOnNode( - declaration.assertClause, - moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext - ); + const message = isImportAttributes2 ? moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext : moduleKind === 199 /* NodeNext */ ? Diagnostics.Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls : Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext; + return grammarErrorOnNode(node, message); } if (isImportDeclaration(declaration) ? (_a = declaration.importClause) == null ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); + return grammarErrorOnNode(node, isImportAttributes2 ? Diagnostics.Import_attributes_cannot_be_used_with_type_only_imports_or_exports : Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports); } if (override) { - return grammarErrorOnNode(declaration.assertClause, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports); + return grammarErrorOnNode(node, Diagnostics.resolution_mode_can_only_be_set_for_type_only_imports); } } } @@ -82271,7 +82859,7 @@ ${lanes.join("\n")} } } } - checkAssertClause(node); + checkImportAttributes(node); } function checkImportEqualsDeclaration(node) { if (checkGrammarModuleElementContext(node, isInJSFile(node) ? Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_module : Diagnostics.An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module)) { @@ -82280,7 +82868,7 @@ ${lanes.join("\n")} checkGrammarModifiers(node); if (isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { checkImportBinding(node); - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { markExportAsReferenced(node); } if (node.moduleReference.kind !== 283 /* ExternalModuleReference */) { @@ -82344,7 +82932,7 @@ ${lanes.join("\n")} } } } - checkAssertClause(node); + checkImportAttributes(node); } function checkGrammarExportDeclaration(node) { var _a; @@ -82692,6 +83280,8 @@ ${lanes.join("\n")} return checkJSDocAccessibilityModifiers(node); case 357 /* JSDocSatisfiesTag */: return checkJSDocSatisfiesTag(node); + case 350 /* JSDocThisTag */: + return checkJSDocThisTag(node); case 199 /* IndexedAccessType */: return checkIndexedAccessType(node); case 200 /* MappedType */: @@ -82778,9 +83368,14 @@ ${lanes.join("\n")} const diagnostic = node.postfix ? Diagnostics._0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1 : Diagnostics._0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1; const typeNode = node.type; const type = getTypeFromTypeNode(typeNode); - grammarErrorOnNode(node, diagnostic, token, typeToString( - isJSDocNullableType(node) && !(type === neverType || type === voidType) ? getUnionType(append([type, undefinedType], node.postfix ? void 0 : nullType)) : type - )); + grammarErrorOnNode( + node, + diagnostic, + token, + typeToString( + isJSDocNullableType(node) && !(type === neverType || type === voidType) ? getUnionType(append([type, undefinedType], node.postfix ? void 0 : nullType)) : type + ) + ); } else { grammarErrorOnNode(node, Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments); } @@ -82890,6 +83485,15 @@ ${lanes.join("\n")} case 234 /* AsExpression */: case 217 /* ParenthesizedExpression */: checkAssertionDeferred(node); + break; + case 222 /* VoidExpression */: + checkExpression(node.expression); + break; + case 226 /* BinaryExpression */: + if (isInstanceOfExpression(node)) { + resolveUntypedCall(node); + } + break; } currentNode = saveCurrentNode; (_b = tracing) == null ? void 0 : _b.pop(); @@ -83326,31 +83930,7 @@ ${lanes.join("\n")} if (name.kind === 211 /* PropertyAccessExpression */) { checkPropertyAccessExpression(name, 0 /* Normal */); if (!links.resolvedSymbol) { - const expressionType = checkExpressionCached(name.expression); - const infos = getApplicableIndexInfos(expressionType, getLiteralTypeFromPropertyName(name.name)); - if (infos.length && expressionType.members) { - const resolved = resolveStructuredTypeMembers(expressionType); - const symbol = resolved.members.get("__index" /* Index */); - if (infos === getIndexInfosOfType(expressionType)) { - links.resolvedSymbol = symbol; - } else if (symbol) { - const symbolLinks2 = getSymbolLinks(symbol); - const declarationList = mapDefined(infos, (i) => i.declaration); - const nodeListId = map(declarationList, getNodeId).join(","); - if (!symbolLinks2.filteredIndexSymbolCache) { - symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map(); - } - if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) { - links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId); - } else { - const copy = createSymbol(131072 /* Signature */, "__index" /* Index */); - copy.declarations = mapDefined(infos, (i) => i.declaration); - copy.parent = expressionType.aliasSymbol ? expressionType.aliasSymbol : expressionType.symbol ? expressionType.symbol : getSymbolAtLocation(copy.declarations[0].parent); - symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy); - links.resolvedSymbol = symbolLinks2.filteredIndexSymbolCache.get(nodeListId); - } - } - } + links.resolvedSymbol = getApplicableIndexSymbol(checkExpressionCached(name.expression), getLiteralTypeFromPropertyName(name.name)); } } else { checkQualifiedName(name, 0 /* Normal */); @@ -83383,6 +83963,31 @@ ${lanes.join("\n")} } return void 0; } + function getApplicableIndexSymbol(type, keyType) { + const infos = getApplicableIndexInfos(type, keyType); + if (infos.length && type.members) { + const symbol = getIndexSymbolFromSymbolTable(resolveStructuredTypeMembers(type).members); + if (infos === getIndexInfosOfType(type)) { + return symbol; + } else if (symbol) { + const symbolLinks2 = getSymbolLinks(symbol); + const declarationList = mapDefined(infos, (i) => i.declaration); + const nodeListId = map(declarationList, getNodeId).join(","); + if (!symbolLinks2.filteredIndexSymbolCache) { + symbolLinks2.filteredIndexSymbolCache = /* @__PURE__ */ new Map(); + } + if (symbolLinks2.filteredIndexSymbolCache.has(nodeListId)) { + return symbolLinks2.filteredIndexSymbolCache.get(nodeListId); + } else { + const copy = createSymbol(131072 /* Signature */, "__index" /* Index */); + copy.declarations = mapDefined(infos, (i) => i.declaration); + copy.parent = type.aliasSymbol ? type.aliasSymbol : type.symbol ? type.symbol : getSymbolAtLocation(copy.declarations[0].parent); + symbolLinks2.filteredIndexSymbolCache.set(nodeListId, copy); + return copy; + } + } + } + } function resolveJSDocMemberName(name, ignoreErrors, container) { if (isEntityName(name)) { const meaning = 788968 /* Type */ | 1920 /* Namespace */ | 111551 /* Value */; @@ -83505,6 +84110,13 @@ ${lanes.join("\n")} case 102 /* ImportKeyword */: case 105 /* NewKeyword */: return isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : void 0; + case 104 /* InstanceOfKeyword */: + if (isBinaryExpression(node.parent)) { + const type = getTypeOfExpression(node.parent.right); + const hasInstanceMethodType = getSymbolHasInstanceMethodOfObjectType(type); + return (hasInstanceMethodType == null ? void 0 : hasInstanceMethodType.symbol) ?? type.symbol; + } + return void 0; case 236 /* MetaProperty */: return checkExpression(node).symbol; case 295 /* JsxNamespacedName */: @@ -83875,7 +84487,7 @@ ${lanes.join("\n")} } const target = getExportSymbolOfValueSymbolIfExported(resolveAlias(symbol)); if (target === unknownSymbol) { - return true; + return !excludeTypeOnlyValues || !getTypeOnlyAliasDeclaration(symbol); } return !!(getSymbolFlags( symbol, @@ -83896,7 +84508,7 @@ ${lanes.join("\n")} return true; } const target = getSymbolLinks(symbol).aliasTarget; - if (target && getEffectiveModifierFlags(node) & 1 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { + if (target && getEffectiveModifierFlags(node) & 32 /* Export */ && getSymbolFlags(target) & 111551 /* Value */ && (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { return true; } } @@ -83921,10 +84533,10 @@ ${lanes.join("\n")} return false; } function isRequiredInitializedParameter(parameter) { - return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */); + return !!strictNullChecks && !isOptionalParameter(parameter) && !isJSDocParameterTag(parameter) && !!parameter.initializer && !hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */); } function isOptionalUninitializedParameterProperty(parameter) { - return strictNullChecks && isOptionalParameter(parameter) && !parameter.initializer && hasSyntacticModifier(parameter, 16476 /* ParameterPropertyModifier */); + return strictNullChecks && isOptionalParameter(parameter) && !parameter.initializer && hasSyntacticModifier(parameter, 31 /* ParameterPropertyModifier */); } function isExpandoFunctionDeclaration(node) { const declaration = getParseTreeNode(node, isFunctionDeclaration); @@ -83935,7 +84547,7 @@ ${lanes.join("\n")} if (!symbol || !(symbol.flags & 16 /* Function */)) { return false; } - return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && p.valueDeclaration && isPropertyAccessExpression(p.valueDeclaration)); + return !!forEachEntry(getExportsOfSymbol(symbol), (p) => p.flags & 111551 /* Value */ && isExpandoPropertyDeclaration(p.valueDeclaration)); } function getPropertiesOfContainerFunction(node) { const declaration = getParseTreeNode(node, isFunctionDeclaration); @@ -84345,7 +84957,16 @@ ${lanes.join("\n")} } return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker, bundled); }, - isImportRequiredByAugmentation + isImportRequiredByAugmentation, + tryFindAmbientModule: (moduleReferenceExpression) => { + const node = getParseTreeNode(moduleReferenceExpression); + const moduleSpecifier = node && isStringLiteralLike(node) ? node.text : void 0; + return moduleSpecifier !== void 0 ? tryFindAmbientModule( + moduleSpecifier, + /*withAugmentations*/ + true + ) : void 0; + } }; function isImportRequiredByAugmentation(node) { const file = getSourceFileOfNode(node); @@ -84442,11 +85063,11 @@ ${lanes.join("\n")} if (fileToDirective.has(file.path)) return; fileToDirective.set(file.path, [key, mode]); - for (const { fileName, resolutionMode } of file.referencedFiles) { + for (const { fileName } of file.referencedFiles) { const resolvedFile = resolveTripleslashReference(fileName, file.fileName); const referencedFile = host.getSourceFile(resolvedFile); if (referencedFile) { - addReferencedFilesToTypeDirective(referencedFile, key, resolutionMode || file.impliedNodeFormat); + addReferencedFilesToTypeDirective(referencedFile, key, mode || file.impliedNodeFormat); } } } @@ -84769,10 +85390,10 @@ ${lanes.join("\n")} return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); } } - if (flags & ~(1025 /* ExportDefault */ | 131072 /* Decorator */)) { + if (flags & ~(2080 /* ExportDefault */ | 32768 /* Decorator */)) { return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here); } - if (hasLeadingDecorators && flags & 126975 /* Modifier */) { + if (hasLeadingDecorators && flags & 98303 /* Modifier */) { Debug.assertIsDefined(firstDecorator); const sourceFile = getSourceFileOfNode(modifier); if (!hasParseDiagnostics(sourceFile)) { @@ -84784,10 +85405,10 @@ ${lanes.join("\n")} } return false; } - flags |= 131072 /* Decorator */; - if (!(flags & 126975 /* Modifier */)) { + flags |= 32768 /* Decorator */; + if (!(flags & 98303 /* Modifier */)) { hasLeadingDecorators = true; - } else if (flags & 1 /* Export */) { + } else if (flags & 32 /* Export */) { sawExportBeforeDecorators = true; } firstDecorator ?? (firstDecorator = modifier); @@ -84816,39 +85437,39 @@ ${lanes.join("\n")} } break; case 164 /* OverrideKeyword */: - if (flags & 16384 /* Override */) { + if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "override"); - } else if (flags & 2 /* Ambient */) { + } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "override", "declare"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "readonly"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "accessor"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "override", "async"); } - flags |= 16384 /* Override */; + flags |= 16 /* Override */; lastOverride = modifier; break; case 125 /* PublicKeyword */: case 124 /* ProtectedKeyword */: case 123 /* PrivateKeyword */: const text = visibilityToString(modifierToFlag(modifier.kind)); - if (flags & 28 /* AccessibilityModifier */) { + if (flags & 7 /* AccessibilityModifier */) { return grammarErrorOnNode(modifier, Diagnostics.Accessibility_modifier_already_seen); - } else if (flags & 16384 /* Override */) { + } else if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "override"); - } else if (flags & 32 /* Static */) { + } else if (flags & 256 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "accessor"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "readonly"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, text, "async"); } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text); - } else if (flags & 256 /* Abstract */) { + } else if (flags & 64 /* Abstract */) { if (modifier.kind === 123 /* PrivateKeyword */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract"); } else { @@ -84860,60 +85481,60 @@ ${lanes.join("\n")} flags |= modifierToFlag(modifier.kind); break; case 126 /* StaticKeyword */: - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "static"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "readonly"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "async"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "accessor"); } else if (node.parent.kind === 268 /* ModuleBlock */ || node.parent.kind === 312 /* SourceFile */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static"); } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); - } else if (flags & 256 /* Abstract */) { + } else if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); - } else if (flags & 16384 /* Override */) { + } else if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "static", "override"); } - flags |= 32 /* Static */; + flags |= 256 /* Static */; lastStatic = modifier; break; case 129 /* AccessorKeyword */: - if (flags & 128 /* Accessor */) { + if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "accessor"); - } else if (flags & 64 /* Readonly */) { + } else if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "readonly"); - } else if (flags & 2 /* Ambient */) { + } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "accessor", "declare"); } else if (node.kind !== 172 /* PropertyDeclaration */) { return grammarErrorOnNode(modifier, Diagnostics.accessor_modifier_can_only_appear_on_a_property_declaration); } - flags |= 128 /* Accessor */; + flags |= 512 /* Accessor */; break; case 148 /* ReadonlyKeyword */: - if (flags & 64 /* Readonly */) { + if (flags & 8 /* Readonly */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "readonly"); } else if (node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 171 /* PropertySignature */ && node.kind !== 181 /* IndexSignature */ && node.kind !== 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "readonly", "accessor"); } - flags |= 64 /* Readonly */; + flags |= 8 /* Readonly */; break; case 95 /* ExportKeyword */: if (compilerOptions.verbatimModuleSyntax && !(node.flags & 33554432 /* Ambient */) && node.kind !== 265 /* TypeAliasDeclaration */ && node.kind !== 264 /* InterfaceDeclaration */ && // ModuleDeclaration needs to be checked that it is uninstantiated later node.kind !== 267 /* ModuleDeclaration */ && node.parent.kind === 312 /* SourceFile */ && (moduleKind === 1 /* CommonJS */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */)) { return grammarErrorOnNode(modifier, Diagnostics.A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled); } - if (flags & 1 /* Export */) { + if (flags & 32 /* Export */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "export"); - } else if (flags & 2 /* Ambient */) { + } else if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare"); - } else if (flags & 256 /* Abstract */) { + } else if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "abstract"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "async"); } else if (isClassLike(node.parent)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export"); @@ -84924,7 +85545,7 @@ ${lanes.join("\n")} } else if (blockScopeKind === 6 /* AwaitUsing */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "export"); } - flags |= 1 /* Export */; + flags |= 32 /* Export */; break; case 90 /* DefaultKeyword */: const container = node.parent.kind === 312 /* SourceFile */ ? node.parent : node.parent.parent; @@ -84934,19 +85555,19 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_using_declaration, "default"); } else if (blockScopeKind === 6 /* AwaitUsing */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_an_await_using_declaration, "default"); - } else if (!(flags & 1 /* Export */)) { + } else if (!(flags & 32 /* Export */)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "export", "default"); } else if (sawExportBeforeDecorators) { return grammarErrorOnNode(firstDecorator, Diagnostics.Decorators_are_not_valid_here); } - flags |= 1024 /* Default */; + flags |= 2048 /* Default */; break; case 138 /* DeclareKeyword */: - if (flags & 2 /* Ambient */) { + if (flags & 128 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "declare"); - } else if (flags & 512 /* Async */) { + } else if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); - } else if (flags & 16384 /* Override */) { + } else if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override"); } else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare"); @@ -84960,62 +85581,62 @@ ${lanes.join("\n")} return grammarErrorOnNode(modifier, Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); } else if (isPrivateIdentifierClassElementDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare"); - } else if (flags & 128 /* Accessor */) { + } else if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "declare", "accessor"); } - flags |= 2 /* Ambient */; + flags |= 128 /* Ambient */; lastDeclare = modifier; break; case 128 /* AbstractKeyword */: - if (flags & 256 /* Abstract */) { + if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "abstract"); } if (node.kind !== 263 /* ClassDeclaration */ && node.kind !== 185 /* ConstructorType */) { if (node.kind !== 174 /* MethodDeclaration */ && node.kind !== 172 /* PropertyDeclaration */ && node.kind !== 177 /* GetAccessor */ && node.kind !== 178 /* SetAccessor */) { return grammarErrorOnNode(modifier, Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration); } - if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 256 /* Abstract */))) { + if (!(node.parent.kind === 263 /* ClassDeclaration */ && hasSyntacticModifier(node.parent, 64 /* Abstract */))) { const message = node.kind === 172 /* PropertyDeclaration */ ? Diagnostics.Abstract_properties_can_only_appear_within_an_abstract_class : Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class; return grammarErrorOnNode(modifier, message); } - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract"); } - if (flags & 8 /* Private */) { + if (flags & 2 /* Private */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract"); } - if (flags & 512 /* Async */ && lastAsync) { + if (flags & 1024 /* Async */ && lastAsync) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); } - if (flags & 16384 /* Override */) { + if (flags & 16 /* Override */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "override"); } - if (flags & 128 /* Accessor */) { + if (flags & 512 /* Accessor */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "accessor"); } } if (isNamedDeclaration(node) && node.name.kind === 81 /* PrivateIdentifier */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); } - flags |= 256 /* Abstract */; + flags |= 64 /* Abstract */; break; case 134 /* AsyncKeyword */: - if (flags & 512 /* Async */) { + if (flags & 1024 /* Async */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, "async"); - } else if (flags & 2 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { + } else if (flags & 128 /* Ambient */ || node.parent.flags & 33554432 /* Ambient */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } else if (node.kind === 169 /* Parameter */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } - if (flags & 256 /* Abstract */) { + if (flags & 64 /* Abstract */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); } - flags |= 512 /* Async */; + flags |= 1024 /* Async */; lastAsync = modifier; break; case 103 /* InKeyword */: case 147 /* OutKeyword */: - const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 32768 /* In */ : 65536 /* Out */; + const inOutFlag = modifier.kind === 103 /* InKeyword */ ? 8192 /* In */ : 16384 /* Out */; const inOutText = modifier.kind === 103 /* InKeyword */ ? "in" : "out"; if (node.kind !== 168 /* TypeParameter */ || !(isInterfaceDeclaration(node.parent) || isClassLike(node.parent) || isTypeAliasDeclaration(node.parent))) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText); @@ -85023,7 +85644,7 @@ ${lanes.join("\n")} if (flags & inOutFlag) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_already_seen, inOutText); } - if (inOutFlag & 32768 /* In */ && flags & 65536 /* Out */) { + if (inOutFlag & 8192 /* In */ && flags & 16384 /* Out */) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_must_precede_1_modifier, "in", "out"); } flags |= inOutFlag; @@ -85032,24 +85653,24 @@ ${lanes.join("\n")} } } if (node.kind === 176 /* Constructor */) { - if (flags & 32 /* Static */) { + if (flags & 256 /* Static */) { return grammarErrorOnNode(lastStatic, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); } - if (flags & 16384 /* Override */) { + if (flags & 16 /* Override */) { return grammarErrorOnNode(lastOverride, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "override"); } - if (flags & 512 /* Async */) { + if (flags & 1024 /* Async */) { return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async"); } return false; - } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { + } else if ((node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */) && flags & 128 /* Ambient */) { return grammarErrorOnNode(lastDeclare, Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { + } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && isBindingPattern(node.name)) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern); - } else if (node.kind === 169 /* Parameter */ && flags & 16476 /* ParameterPropertyModifier */ && node.dotDotDotToken) { + } else if (node.kind === 169 /* Parameter */ && flags & 31 /* ParameterPropertyModifier */ && node.dotDotDotToken) { return grammarErrorOnNode(node, Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter); } - if (flags & 512 /* Async */) { + if (flags & 1024 /* Async */) { return checkGrammarAsyncModifier(node, lastAsync); } return false; @@ -85493,10 +86114,7 @@ ${lanes.join("\n")} if (isInTopLevelContext(forInOrOfStatement)) { if (!hasParseDiagnostics(sourceFile)) { if (!isEffectiveExternalModule(sourceFile, compilerOptions)) { - diagnostics.add(createDiagnosticForNode( - forInOrOfStatement.awaitModifier, - Diagnostics.for_await_loops_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 - )); + diagnostics.add(createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.for_await_loops_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)); } switch (moduleKind) { case 100 /* Node16 */: @@ -85515,10 +86133,7 @@ ${lanes.join("\n")} } default: diagnostics.add( - createDiagnosticForNode( - forInOrOfStatement.awaitModifier, - Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher - ) + createDiagnosticForNode(forInOrOfStatement.awaitModifier, Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher) ); break; } @@ -85575,12 +86190,12 @@ ${lanes.join("\n")} if (languageVersion < 2 /* ES2015 */ && isPrivateIdentifier(accessor.name)) { return grammarErrorOnNode(accessor.name, Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher); } - if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 256 /* Abstract */)) { + if (accessor.body === void 0 && !hasSyntacticModifier(accessor, 64 /* Abstract */)) { return grammarErrorAtPos(accessor, accessor.end - 1, ";".length, Diagnostics._0_expected, "{"); } } if (accessor.body) { - if (hasSyntacticModifier(accessor, 256 /* Abstract */)) { + if (hasSyntacticModifier(accessor, 64 /* Abstract */)) { return grammarErrorOnNode(accessor, Diagnostics.An_abstract_accessor_cannot_have_an_implementation); } if (accessor.parent.kind === 187 /* TypeLiteral */ || accessor.parent.kind === 264 /* InterfaceDeclaration */) { @@ -85652,7 +86267,7 @@ ${lanes.join("\n")} } break; case 171 /* PropertySignature */: - if (!hasSyntacticModifier(parent2, 64 /* Readonly */)) { + if (!hasSyntacticModifier(parent2, 8 /* Readonly */)) { return grammarErrorOnNode(parent2.name, Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly); } break; @@ -85822,7 +86437,7 @@ ${lanes.join("\n")} const message = node.initializer ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions : !node.type ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; return grammarErrorOnNode(node.exclamationToken, message); } - if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 1 /* Export */)) { + if ((moduleKind < 5 /* ES2015 */ || getSourceFileOfNode(node).impliedNodeFormat === 1 /* CommonJS */) && moduleKind !== 4 /* System */ && !(node.parent.parent.flags & 33554432 /* Ambient */) && hasSyntacticModifier(node.parent.parent, 32 /* Export */)) { checkESModuleMarker(node.name); } return !!blockScopeKind && checkGrammarNameInLetOrConstDeclarations(node.name); @@ -86012,7 +86627,7 @@ ${lanes.join("\n")} } } function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 2 /* Ambient */ | 1 /* Export */ | 1024 /* Default */)) { + if (node.kind === 264 /* InterfaceDeclaration */ || node.kind === 265 /* TypeAliasDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 271 /* ImportEqualsDeclaration */ || node.kind === 278 /* ExportDeclaration */ || node.kind === 277 /* ExportAssignment */ || node.kind === 270 /* NamespaceExportDeclaration */ || hasSyntacticModifier(node, 128 /* Ambient */ | 32 /* Export */ | 2048 /* Default */)) { return false; } return grammarErrorOnFirstToken(node, Diagnostics.Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier); @@ -86047,7 +86662,7 @@ ${lanes.join("\n")} return false; } function checkGrammarNumericLiteral(node) { - const isFractional = getTextOfNode(node).indexOf(".") !== -1; + const isFractional = getTextOfNode(node).includes("."); const isScientific = node.numericLiteralFlags & 16 /* Scientific */; if (isFractional || isScientific) { return; @@ -86134,12 +86749,12 @@ ${lanes.join("\n")} if (moduleKind !== 99 /* ESNext */ && moduleKind !== 199 /* NodeNext */ && moduleKind !== 100 /* Node16 */) { checkGrammarForDisallowedTrailingComma(nodeArguments); if (nodeArguments.length > 1) { - const assertionArgument = nodeArguments[1]; - return grammarErrorOnNode(assertionArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); + const importAttributesArgument = nodeArguments[1]; + return grammarErrorOnNode(importAttributesArgument, Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext); } } if (nodeArguments.length === 0 || nodeArguments.length > 2) { - return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments); + return grammarErrorOnNode(node, Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments); } const spreadElement = find(nodeArguments, isSpreadElement); if (spreadElement) { @@ -86227,7 +86842,7 @@ ${lanes.join("\n")} } function getEffectivePropertyNameForPropertyNameNode(node) { const name = getPropertyNameForPropertyNameNode(node); - return name ? name : isComputedPropertyName(node) && isEntityNameExpression(node.expression) ? tryGetNameFromEntityNameExpression(node.expression) : void 0; + return name ? name : isComputedPropertyName(node) ? tryGetNameFromType(getTypeOfExpression(node.expression)) : void 0; } function getCombinedModifierFlagsCached(node) { if (lastGetCombinedModifierFlagsNode === node) { @@ -86408,9 +87023,8 @@ ${lanes.join("\n")} CheckMode3[CheckMode3["SkipContextSensitive"] = 4] = "SkipContextSensitive"; CheckMode3[CheckMode3["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; - CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; - CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; - CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; + CheckMode3[CheckMode3["RestBindingElement"] = 32] = "RestBindingElement"; + CheckMode3[CheckMode3["TypeOnly"] = 64] = "TypeOnly"; return CheckMode3; })(CheckMode || {}); SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { @@ -86459,12 +87073,14 @@ ${lanes.join("\n")} this.canTrackSymbol = !!((_a = this.inner) == null ? void 0 : _a.trackSymbol); } trackSymbol(symbol, enclosingDeclaration, meaning) { - var _a; + var _a, _b; if (((_a = this.inner) == null ? void 0 : _a.trackSymbol) && !this.disableTrackSymbol) { if (this.inner.trackSymbol(symbol, enclosingDeclaration, meaning)) { this.onDiagnosticReported(); return true; } + if (!(symbol.flags & 262144 /* TypeParameter */)) + ((_b = this.context).trackedSymbols ?? (_b.trackedSymbols = [])).push([symbol, enclosingDeclaration, meaning]); } return false; } @@ -86538,13 +87154,6 @@ ${lanes.join("\n")} this.inner.reportNonSerializableProperty(propertyName); } } - reportImportTypeNodeResolutionModeOverride() { - var _a; - if ((_a = this.inner) == null ? void 0 : _a.reportImportTypeNodeResolutionModeOverride) { - this.onDiagnosticReported(); - this.inner.reportImportTypeNodeResolutionModeOverride(); - } - } onDiagnosticReported() { this.context.reportedDiagnostic = true; } @@ -87064,7 +87673,7 @@ ${lanes.join("\n")} return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), - nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer), + nodeVisitor(node.attributes, visitor, isImportAttributes), nodeVisitor(node.qualifier, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode), node.isTypeOf @@ -87615,20 +88224,20 @@ ${lanes.join("\n")} nodesVisitor(node.modifiers, visitor, isModifierLike), nodeVisitor(node.importClause, visitor, isImportClause), Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)), - nodeVisitor(node.assertClause, visitor, isAssertClause) + nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, - [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertClause( + [300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + return context.factory.updateImportAttributes( node, - nodesVisitor(node.elements, visitor, isAssertEntry), + nodesVisitor(node.elements, visitor, isImportAttribute), node.multiLine ); }, - [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertEntry( + [301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateImportAttribute( node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, @@ -87680,7 +88289,7 @@ ${lanes.join("\n")} node.isTypeOnly, nodeVisitor(node.exportClause, visitor, isNamedExportBindings), nodeVisitor(node.moduleSpecifier, visitor, isExpression), - nodeVisitor(node.assertClause, visitor, isAssertClause) + nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { @@ -88107,7 +88716,7 @@ ${lanes.join("\n")} const line = lineInfo.getLineText(index); const comment = sourceMapCommentRegExp.exec(line); if (comment) { - return trimStringEnd(comment[1]); + return comment[1].trimEnd(); } else if (!line.match(whitespaceOrMapCommentRegExp)) { break; } @@ -88534,15 +89143,15 @@ ${lanes.join("\n")} } break; case 243 /* VariableStatement */: - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { for (const decl of node.declarationList.declarations) { exportedNames = collectExportedVariableInfo(decl, uniqueExports, exportedNames, exportedBindings); } } break; case 262 /* FunctionDeclaration */: - if (hasSyntacticModifier(node, 1 /* Export */)) { - if (hasSyntacticModifier(node, 1024 /* Default */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { + if (hasSyntacticModifier(node, 2048 /* Default */)) { if (!hasExportDefault) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node)); hasExportDefault = true; @@ -88558,8 +89167,8 @@ ${lanes.join("\n")} } break; case 263 /* ClassDeclaration */: - if (hasSyntacticModifier(node, 1 /* Export */)) { - if (hasSyntacticModifier(node, 1024 /* Default */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { + if (hasSyntacticModifier(node, 2048 /* Default */)) { if (!hasExportDefault) { multiMapSparseArrayAdd(exportedBindings, getOriginalNodeId(node), context.factory.getDeclarationName(node)); hasExportDefault = true; @@ -89449,7 +90058,7 @@ ${lanes.join("\n")} // src/compiler/transformers/namedEvaluation.ts function getAssignedNameOfIdentifier(factory2, name, expression) { const original = getOriginalNode(skipOuterExpressions(expression)); - if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 1024 /* Default */)) { + if ((isClassDeclaration(original) || isFunctionDeclaration(original)) && !original.name && hasSyntacticModifier(original, 2048 /* Default */)) { return factory2.createStringLiteral("default"); } return factory2.createStringLiteralFromNode(name); @@ -89717,10 +90326,7 @@ ${lanes.join("\n")} function getRawLiteral(factory2, node, currentSourceFile) { let text = node.rawText; if (text === void 0) { - Debug.assertIsDefined( - currentSourceFile, - "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform." - ); + Debug.assertIsDefined(currentSourceFile, "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform."); text = getSourceTextOfNodeFromSourceFile(currentSourceFile, node); const isLast = node.kind === 15 /* NoSubstitutionTemplateLiteral */ || node.kind === 18 /* TemplateTail */; text = text.substring(1, text.length - (isLast ? 1 : 2)); @@ -89779,12 +90385,15 @@ ${lanes.join("\n")} return transformSourceFile(node); } function transformBundle(node) { - return factory2.createBundle(node.sourceFiles.map(transformSourceFile), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 315 /* InputFiles */) { - return createUnparsedSourceFile(prepend, "js"); - } - return prepend; - })); + return factory2.createBundle( + node.sourceFiles.map(transformSourceFile), + mapDefined(node.prepends, (prepend) => { + if (prepend.kind === 315 /* InputFiles */) { + return createUnparsedSourceFile(prepend, "js"); + } + return prepend; + }) + ); } function transformSourceFile(node) { if (node.isDeclarationFile) { @@ -89820,13 +90429,13 @@ ${lanes.join("\n")} break; case 263 /* ClassDeclaration */: case 262 /* FunctionDeclaration */: - if (hasSyntacticModifier(node, 2 /* Ambient */)) { + if (hasSyntacticModifier(node, 128 /* Ambient */)) { break; } if (node.name) { recordEmittedDeclarationInScope(node); } else { - Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 1024 /* Default */)); + Debug.assert(node.kind === 263 /* ClassDeclaration */ || hasSyntacticModifier(node, 2048 /* Default */)); } break; } @@ -89881,7 +90490,7 @@ ${lanes.join("\n")} function namespaceElementVisitorWorker(node) { if (node.kind === 278 /* ExportDeclaration */ || node.kind === 272 /* ImportDeclaration */ || node.kind === 273 /* ImportClause */ || node.kind === 271 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 283 /* ExternalModuleReference */) { return void 0; - } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 1 /* Export */)) { + } else if (node.transformFlags & 1 /* ContainsTypeScript */ || hasSyntacticModifier(node, 32 /* Export */)) { return visitTypeScript(node); } return node; @@ -89939,7 +90548,7 @@ ${lanes.join("\n")} function modifierVisitor(node) { if (isDecorator(node)) return void 0; - if (modifierToFlag(node.kind) & 117086 /* TypeScriptModifier */) { + if (modifierToFlag(node.kind) & 28895 /* TypeScriptModifier */) { return void 0; } else if (currentNamespace && node.kind === 95 /* ExportKeyword */) { return void 0; @@ -89947,7 +90556,7 @@ ${lanes.join("\n")} return node; } function visitTypeScript(node) { - if (isStatement(node) && hasSyntacticModifier(node, 2 /* Ambient */)) { + if (isStatement(node) && hasSyntacticModifier(node, 128 /* Ambient */)) { return factory2.createNotEmittedStatement(node); } switch (node.kind) { @@ -90437,7 +91046,7 @@ ${lanes.join("\n")} return !nodeIsMissing(node.body); } function visitPropertyDeclaration(node, parent2) { - const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 256 /* Abstract */); + const isAmbient = node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 64 /* Abstract */); if (isAmbient && !(legacyDecorators && hasDecorators(node))) { return void 0; } @@ -90446,7 +91055,7 @@ ${lanes.join("\n")} if (isAmbient) { return factory2.updatePropertyDeclaration( node, - concatenate(modifiers, factory2.createModifiersFromModifierFlags(2 /* Ambient */)), + concatenate(modifiers, factory2.createModifiersFromModifierFlags(128 /* Ambient */)), Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), /*questionOrExclamationToken*/ void 0, @@ -90609,7 +91218,7 @@ ${lanes.join("\n")} ); } function shouldEmitAccessorDeclaration(node) { - return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 256 /* Abstract */)); + return !(nodeIsMissing(node.body) && hasSyntacticModifier(node, 64 /* Abstract */)); } function visitGetAccessor(node, parent2) { if (!(node.transformFlags & 1 /* ContainsTypeScript */)) { @@ -91208,7 +91817,7 @@ ${lanes.join("\n")} void 0, importClause, node.moduleSpecifier, - node.assertClause + node.attributes ) : void 0; } function visitImportClause(node) { @@ -91258,7 +91867,7 @@ ${lanes.join("\n")} node.isTypeOnly, exportClause, node.moduleSpecifier, - node.assertClause + node.attributes ) : void 0; } function visitNamedExports(node, allowEmpty) { @@ -91292,7 +91901,7 @@ ${lanes.join("\n")} /*importClause*/ void 0, node.moduleReference.expression, - /*assertClause*/ + /*attributes*/ void 0 ), node @@ -91342,16 +91951,16 @@ ${lanes.join("\n")} } } function isExportOfNamespace(node) { - return currentNamespace !== void 0 && hasSyntacticModifier(node, 1 /* Export */); + return currentNamespace !== void 0 && hasSyntacticModifier(node, 32 /* Export */); } function isExternalModuleExport(node) { - return currentNamespace === void 0 && hasSyntacticModifier(node, 1 /* Export */); + return currentNamespace === void 0 && hasSyntacticModifier(node, 32 /* Export */); } function isNamedExternalModuleExport(node) { - return isExternalModuleExport(node) && !hasSyntacticModifier(node, 1024 /* Default */); + return isExternalModuleExport(node) && !hasSyntacticModifier(node, 2048 /* Default */); } function isDefaultExternalModuleExport(node) { - return isExternalModuleExport(node) && hasSyntacticModifier(node, 1024 /* Default */); + return isExternalModuleExport(node) && hasSyntacticModifier(node, 2048 /* Default */); } function createExportMemberAssignmentStatement(node) { const expression = factory2.createAssignment( @@ -92692,8 +93301,8 @@ ${lanes.join("\n")} getClassLexicalEnvironment().classThis = node.emitNode.classThis; } const isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 262144 /* ContainsConstructorReference */; - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExport = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); let modifiers = visitNodes2(node.modifiers, modifierVisitor, isModifier); const heritageClauses = visitNodes2(node.heritageClauses, heritageClauseVisitor, isHeritageClause); const { members, prologue } = transformClassMembers(node); @@ -93239,7 +93848,7 @@ ${lanes.join("\n")} return void 0; } const propertyOriginalNode = getOriginalNode(property); - if (hasSyntacticModifier(propertyOriginalNode, 256 /* Abstract */)) { + if (hasSyntacticModifier(propertyOriginalNode, 64 /* Abstract */)) { return void 0; } let initializer = visitNode(property.initializer, visitor, isExpression); @@ -94252,16 +94861,19 @@ ${lanes.join("\n")} true ); if (hasClassElementWithDecoratorContainingPrivateIdentifierInExpression(node)) { - members = setTextRange(factory2.createNodeArray([ - ...members, - factory2.createClassStaticBlockDeclaration( - factory2.createBlock( - decorationStatements, - /*multiLine*/ - true + members = setTextRange( + factory2.createNodeArray([ + ...members, + factory2.createClassStaticBlockDeclaration( + factory2.createBlock( + decorationStatements, + /*multiLine*/ + true + ) ) - ) - ]), members); + ]), + members + ); decorationStatements = void 0; } return { decorationStatements, members }; @@ -94284,8 +94896,8 @@ ${lanes.join("\n")} return addRange([updated], decorationStatements); } function transformClassDeclarationWithClassDecorators(node, name) { - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExport = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); const modifiers = visitNodes2(node.modifiers, (node2) => isExportOrDefaultModifier(node2) || isDecorator(node2) ? void 0 : node2, isModifierLike); const location = moveRangePastModifiers(node); const classAlias = getClassAliasIfNeeded(node); @@ -94306,18 +94918,21 @@ ${lanes.join("\n")} let members = visitNodes2(node.members, visitor, isClassElement); let decorationStatements = []; ({ members, decorationStatements } = transformDecoratorsOfClassElements(node, members)); - const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 32 /* Static */) || isClassStaticBlockDeclaration(member)); + const assignClassAliasInStaticBlock = languageVersion >= 9 /* ES2022 */ && !!classAlias && some(members, (member) => isPropertyDeclaration(member) && hasSyntacticModifier(member, 256 /* Static */) || isClassStaticBlockDeclaration(member)); if (assignClassAliasInStaticBlock) { - members = setTextRange(factory2.createNodeArray([ - factory2.createClassStaticBlockDeclaration( - factory2.createBlock([ - factory2.createExpressionStatement( - factory2.createAssignment(classAlias, factory2.createThis()) - ) - ]) - ), - ...members - ]), members); + members = setTextRange( + factory2.createNodeArray([ + factory2.createClassStaticBlockDeclaration( + factory2.createBlock([ + factory2.createExpressionStatement( + factory2.createAssignment(classAlias, factory2.createThis()) + ) + ]) + ), + ...members + ]), + members + ); } const classExpression = factory2.createClassExpression( modifiers, @@ -94389,55 +95004,67 @@ ${lanes.join("\n")} return updated; } function visitMethodDeclaration(node) { - return finishClassElement(factory2.updateMethodDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - node.asteriskToken, - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - /*questionToken*/ - void 0, - /*typeParameters*/ - void 0, - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitNode(node.body, visitor, isBlock) - ), node); + return finishClassElement( + factory2.updateMethodDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + node.asteriskToken, + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + /*questionToken*/ + void 0, + /*typeParameters*/ + void 0, + visitNodes2(node.parameters, visitor, isParameter), + /*type*/ + void 0, + visitNode(node.body, visitor, isBlock) + ), + node + ); } function visitGetAccessorDeclaration(node) { - return finishClassElement(factory2.updateGetAccessorDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - visitNodes2(node.parameters, visitor, isParameter), - /*type*/ - void 0, - visitNode(node.body, visitor, isBlock) - ), node); + return finishClassElement( + factory2.updateGetAccessorDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + visitNodes2(node.parameters, visitor, isParameter), + /*type*/ + void 0, + visitNode(node.body, visitor, isBlock) + ), + node + ); } function visitSetAccessorDeclaration(node) { - return finishClassElement(factory2.updateSetAccessorDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - visitNodes2(node.parameters, visitor, isParameter), - visitNode(node.body, visitor, isBlock) - ), node); + return finishClassElement( + factory2.updateSetAccessorDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + visitNodes2(node.parameters, visitor, isParameter), + visitNode(node.body, visitor, isBlock) + ), + node + ); } function visitPropertyDeclaration(node) { - if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 2 /* Ambient */)) { + if (node.flags & 33554432 /* Ambient */ || hasSyntacticModifier(node, 128 /* Ambient */)) { return void 0; } - return finishClassElement(factory2.updatePropertyDeclaration( - node, - visitNodes2(node.modifiers, modifierVisitor, isModifier), - Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), - /*questionOrExclamationToken*/ - void 0, - /*type*/ - void 0, - visitNode(node.initializer, visitor, isExpression) - ), node); + return finishClassElement( + factory2.updatePropertyDeclaration( + node, + visitNodes2(node.modifiers, modifierVisitor, isModifier), + Debug.checkDefined(visitNode(node.name, visitor, isPropertyName)), + /*questionOrExclamationToken*/ + void 0, + /*type*/ + void 0, + visitNode(node.initializer, visitor, isExpression) + ), + node + ); } function visitParameterDeclaration(node) { const updated = factory2.updateParameterDeclaration( @@ -94510,7 +95137,7 @@ ${lanes.join("\n")} const memberName = getExpressionForPropertyName( member, /*generateNameForComputedPropertyName*/ - !hasSyntacticModifier(member, 2 /* Ambient */) + !hasSyntacticModifier(member, 128 /* Ambient */) ); const descriptor = languageVersion > 0 /* ES3 */ ? isPropertyDeclaration(member) && !hasAccessorModifier(member) ? factory2.createVoidZero() : factory2.createNull() : void 0; const helper = emitHelpers().createDecorateHelper( @@ -95026,7 +95653,10 @@ ${lanes.join("\n")} classInfo2.classDescriptorName = factory2.createUniqueName("_classDescriptor", 16 /* Optimistic */ | 32 /* FileLevel */); classInfo2.classExtraInitializersName = factory2.createUniqueName("_classExtraInitializers", 16 /* Optimistic */ | 32 /* FileLevel */); const needsUniqueClassThis = some(node.members, (member) => (isPrivateIdentifierClassElementDeclaration(member) || isAutoAccessorPropertyDeclaration(member)) && hasStaticModifier(member)); - classInfo2.classThis = factory2.createUniqueName("_classThis", needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */); + classInfo2.classThis = factory2.createUniqueName( + "_classThis", + needsUniqueClassThis ? 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */ : 16 /* Optimistic */ | 32 /* FileLevel */ + ); classDefinitionStatements.push( createLet(classInfo2.classDecoratorsName, factory2.createArrayLiteralExpression(classDecorators)), createLet(classInfo2.classDescriptorName), @@ -95296,8 +95926,8 @@ ${lanes.join("\n")} const statements = []; const originalClass = getOriginalNode(node, isClassLike) ?? node; const className = originalClass.name ? factory2.createStringLiteralFromNode(originalClass.name) : factory2.createStringLiteral("default"); - const isExport = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExport = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); if (!node.name) { node = injectClassNamedEvaluationHelperBlockIfMissing(context, node, className); } @@ -97445,9 +98075,12 @@ ${lanes.join("\n")} } function visitReturnStatement(node) { if (enclosingFunctionFlags & 2 /* Async */ && enclosingFunctionFlags & 1 /* Generator */) { - return factory2.updateReturnStatement(node, createDownlevelAwait( - node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero() - )); + return factory2.updateReturnStatement( + node, + createDownlevelAwait( + node.expression ? visitNode(node.expression, visitor, isExpression) : factory2.createVoidZero() + ) + ); } return visitEachChild(node, visitor, context); } @@ -97473,7 +98106,10 @@ ${lanes.join("\n")} const target = e.expression; objects.push(visitNode(target, visitor, isExpression)); } else { - chunkObject = append(chunkObject, e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike)); + chunkObject = append( + chunkObject, + e.kind === 303 /* PropertyAssignment */ ? factory2.createPropertyAssignment(e.name, visitNode(e.initializer, visitor, isExpression)) : visitNode(e, visitor, isObjectLiteralElementLike) + ); } } if (chunkObject) { @@ -97512,13 +98148,16 @@ ${lanes.join("\n")} ); exportedVariableStatement = false; const visited = visitEachChild(node, visitor, context); - const statement = concatenate(visited.statements, taggedTemplateStringDeclarations && [ - factory2.createVariableStatement( - /*modifiers*/ - void 0, - factory2.createVariableDeclarationList(taggedTemplateStringDeclarations) - ) - ]); + const statement = concatenate( + visited.statements, + taggedTemplateStringDeclarations && [ + factory2.createVariableStatement( + /*modifiers*/ + void 0, + factory2.createVariableDeclarationList(taggedTemplateStringDeclarations) + ) + ] + ); const result = factory2.updateSourceFile(visited, setTextRange(factory2.createNodeArray(statement), node.statements)); exitSubtree(ancestorFacts); return result; @@ -97611,7 +98250,7 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitVariableStatement(node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { const savedExportedVariableStatement = exportedVariableStatement; exportedVariableStatement = true; const visited = visitEachChild(node, visitor, context); @@ -98656,15 +99295,18 @@ ${lanes.join("\n")} right = factory2.createTempVariable(hoistVariableDeclaration); left = factory2.createAssignment(right, left); } - return setTextRange(factory2.createConditionalExpression( - createNotNullCondition(left, right), - /*questionToken*/ - void 0, - right, - /*colonToken*/ - void 0, - visitNode(node.right, visitor, isExpression) - ), node); + return setTextRange( + factory2.createConditionalExpression( + createNotNullCondition(left, right), + /*questionToken*/ + void 0, + right, + /*colonToken*/ + void 0, + visitNode(node.right, visitor, isExpression) + ), + node + ); } function visitDeleteExpression(node) { return isOptionalChain(skipParentheses(node.expression)) ? setOriginalNode(visitNonOptionalExpression( @@ -98830,18 +99472,21 @@ ${lanes.join("\n")} const envBinding = createEnvBinding(); const bodyStatements = transformUsingDeclarations(node.statements, pos, node.statements.length, envBinding, topLevelStatements); if (exportBindings.size) { - append(topLevelStatements, factory2.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory2.createNamedExports(arrayFrom(exportBindings.values())) - )); + append( + topLevelStatements, + factory2.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory2.createNamedExports(arrayFrom(exportBindings.values())) + ) + ); } addRange(topLevelStatements, endLexicalEnvironment()); if (exportVars.length) { topLevelStatements.push(factory2.createVariableStatement( - factory2.createModifiersFromModifierFlags(1 /* Export */), + factory2.createModifiersFromModifierFlags(32 /* Export */), factory2.createVariableDeclarationList( exportVars, 1 /* Let */ @@ -99138,8 +99783,8 @@ ${lanes.join("\n")} if (!node.name && defaultExportBinding) { return node; } - const isExported2 = hasSyntacticModifier(node, 1 /* Export */); - const isDefault = hasSyntacticModifier(node, 1024 /* Default */); + const isExported2 = hasSyntacticModifier(node, 32 /* Export */); + const isDefault = hasSyntacticModifier(node, 2048 /* Default */); let expression = factory2.converters.convertToClassExpression(node); if (node.name) { hoistBindingIdentifier( @@ -99187,7 +99832,7 @@ ${lanes.join("\n")} } function hoistVariableStatement(node) { let expressions; - const isExported2 = hasSyntacticModifier(node, 1 /* Export */); + const isExported2 = hasSyntacticModifier(node, 32 /* Export */); for (const variable of node.declarationList.declarations) { hoistBindingElement(variable, isExported2, variable); if (variable.initializer) { @@ -99494,7 +100139,7 @@ ${lanes.join("\n")} factory2.createNamedImports(arrayFrom(importSpecifiersMap.values())) ), factory2.createStringLiteral(importSource), - /*assertClause*/ + /*attributes*/ void 0 ); setParentRecursive( @@ -99606,7 +100251,9 @@ ${lanes.join("\n")} } } function hasProto(obj) { - return obj.properties.some((p) => isPropertyAssignment(p) && (isIdentifier(p.name) && idText(p.name) === "__proto__" || isStringLiteral(p.name) && p.name.text === "__proto__")); + return obj.properties.some( + (p) => isPropertyAssignment(p) && (isIdentifier(p.name) && idText(p.name) === "__proto__" || isStringLiteral(p.name) && p.name.text === "__proto__") + ); } function hasKeyAfterPropsSpread(node) { let spread = false; @@ -99779,7 +100426,7 @@ ${lanes.join("\n")} } function transformJsxSpreadAttributeToProps(node) { if (isObjectLiteralExpression(node.expression) && !hasProto(node.expression)) { - return node.expression.properties; + return sameMap(node.expression.properties, (p) => Debug.checkDefined(visitNode(p, visitor, isObjectLiteralElementLike))); } return factory2.createSpreadAssignment(Debug.checkDefined(visitNode(node.expression, visitor, isExpression))); } @@ -100360,7 +101007,7 @@ ${lanes.join("\n")} hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 /* SubtreeFactsMask */ | ancestorFacts; } function isReturnVoidStatementInConstructorWithCapturedSuper(node) { - return (hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; + return (hierarchyFacts & 8192 /* ConstructorWithSuperCall */) !== 0 && node.kind === 253 /* ReturnStatement */ && !node.expression; } function isOrMayContainReturnCompletion(node) { return node.transformFlags & 4194304 /* ContainsHoistedDeclarationOrCompletion */ && (isReturnStatement(node) || isIfStatement(node) || isWithStatement(node) || isSwitchStatement(node) || isCaseBlock(node) || isCaseClause(node) || isDefaultClause(node) || isTryStatement(node) || isCatchClause(node) || isLabeledStatement(node) || isIterationStatement( @@ -100370,7 +101017,7 @@ ${lanes.join("\n")} ) || isBlock(node)); } function shouldVisitNode(node) { - return (node.transformFlags & 1024 /* ContainsES2015 */) !== 0 || convertedLoopState !== void 0 || hierarchyFacts & 8192 /* ConstructorWithCapturedSuper */ && isOrMayContainReturnCompletion(node) || isIterationStatement( + return (node.transformFlags & 1024 /* ContainsES2015 */) !== 0 || convertedLoopState !== void 0 || hierarchyFacts & 8192 /* ConstructorWithSuperCall */ && isOrMayContainReturnCompletion(node) || isIterationStatement( node, /*lookInLabeledStatements*/ false @@ -100403,7 +101050,7 @@ ${lanes.join("\n")} /*expressionResultIsUnused*/ false ); - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); return result; } return visitorWorker( @@ -100417,6 +101064,7 @@ ${lanes.join("\n")} function callExpressionVisitor(node) { if (node.kind === 108 /* SuperKeyword */) { return visitSuperKeyword( + node, /*isExpressionOfCall*/ true ); @@ -100526,6 +101174,7 @@ ${lanes.join("\n")} return visitSpreadElement(node); case 108 /* SuperKeyword */: return visitSuperKeyword( + node, /*isExpressionOfCall*/ false ); @@ -100595,7 +101244,10 @@ ${lanes.join("\n")} return updated; } function returnCapturedThis(node) { - return setOriginalNode(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */)), node); + return setOriginalNode(factory2.createReturnStatement(createCapturedThis()), node); + } + function createCapturedThis() { + return factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */); } function visitReturnStatement(node) { if (convertedLoopState) { @@ -100619,8 +101271,9 @@ ${lanes.join("\n")} return visitEachChild(node, visitor, context); } function visitThisKeyword(node) { + hierarchyFacts |= 65536 /* LexicalThis */; if (hierarchyFacts & 2 /* ArrowFunction */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) { - hierarchyFacts |= 65536 /* CapturedLexicalThis */; + hierarchyFacts |= 131072 /* CapturedLexicalThis */; } if (convertedLoopState) { if (hierarchyFacts & 2 /* ArrowFunction */) { @@ -100641,10 +101294,13 @@ ${lanes.join("\n")} } } if (node.flags & 256 /* IdentifierHasExtendedUnicodeEscape */) { - return setOriginalNode(setTextRange( - factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), + return setOriginalNode( + setTextRange( + factory2.createIdentifier(unescapeLeadingUnderscores(node.escapedText)), + node + ), node - ), node); + ); } return node; } @@ -100727,8 +101383,8 @@ ${lanes.join("\n")} setTextRange(statement, node); startOnNewLine(statement); statements.push(statement); - if (hasSyntacticModifier(node, 1 /* Export */)) { - const exportStatement = hasSyntacticModifier(node, 1024 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node)); + if (hasSyntacticModifier(node, 32 /* Export */)) { + const exportStatement = hasSyntacticModifier(node, 2048 /* Default */) ? factory2.createExportDefault(factory2.getLocalName(node)) : factory2.createExternalModuleExport(factory2.getLocalName(node)); setOriginalNode(exportStatement, statement); statements.push(exportStatement); } @@ -100756,7 +101412,7 @@ ${lanes.join("\n")} void 0, /*dotDotDotToken*/ void 0, - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */) + createSyntheticSuper() )] : [], /*type*/ void 0, @@ -100846,7 +101502,7 @@ ${lanes.join("\n")} setEmitFlags(constructorFunction, 16 /* CapturesThis */); } statements.push(constructorFunction); - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; } function transformConstructorParameters(constructor, hasSynthesizedSuper) { @@ -100870,103 +101526,35 @@ ${lanes.join("\n")} setEmitFlags(block, 3072 /* NoComments */); return block; } - function transformConstructorBodyWorker(prologueOut, statementsOut, statementsIn, statementOffset, superPath, superPathDepth, constructor, isDerivedClass, hasSynthesizedSuper, isFirstStatement) { - let mayReplaceThis = false; - const superStatementIndex = superPathDepth < superPath.length ? superPath[superPathDepth] : -1; - const leadingStatementsEnd = superStatementIndex >= 0 ? superStatementIndex : statementsIn.length; - if (isFirstStatement && superStatementIndex >= 0) { - let firstMaterialIndex = statementOffset; - while (isFirstStatement && firstMaterialIndex < superStatementIndex) { - const statement = constructor.body.statements[firstMaterialIndex]; - if (!isUninitializedVariableStatement(statement) && !isUsingDeclarationStateVariableStatement(statement)) - break; - firstMaterialIndex++; - } - isFirstStatement = superStatementIndex === firstMaterialIndex; - } - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, statementOffset, leadingStatementsEnd - statementOffset)); - const superStatement = superStatementIndex >= 0 ? statementsIn[superStatementIndex] : void 0; - if (superStatement && isTryStatement(superStatement)) { - const tryBlockStatements = []; - mayReplaceThis = transformConstructorBodyWorker( - prologueOut, - tryBlockStatements, - superStatement.tryBlock.statements, - /*statementOffset*/ - 0, - superPath, - superPathDepth + 1, - constructor, - isDerivedClass, - hasSynthesizedSuper, - isFirstStatement - ); - const tryBlockStatementsArray = factory2.createNodeArray(tryBlockStatements); - setTextRange(tryBlockStatementsArray, superStatement.tryBlock.statements); - statementsOut.push(factory2.updateTryStatement( - superStatement, - factory2.updateBlock(superStatement.tryBlock, tryBlockStatements), - visitNode(superStatement.catchClause, visitor, isCatchClause), - visitNode(superStatement.finallyBlock, visitor, isBlock) - )); - } else { - const superCall = superStatement && getSuperCallFromStatement(superStatement); - let superCallExpression; - if (hasSynthesizedSuper) { - superCallExpression = createDefaultSuperCallOrThis(); - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; - } else if (superCall) { - superCallExpression = visitSuperCallInBody(superCall); - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; - } - if (isDerivedClass || superCallExpression) { - if (superCallExpression && superStatementIndex === statementsIn.length - 1 && !(constructor.body.transformFlags & 16384 /* ContainsLexicalThis */)) { - const superCall2 = cast(cast(superCallExpression, isBinaryExpression).left, isCallExpression); - const returnStatement = factory2.createReturnStatement(superCallExpression); - setCommentRange(returnStatement, getCommentRange(superCall2)); - setEmitFlags(superCall2, 3072 /* NoComments */); - statementsOut.push(returnStatement); - return false; - } else { - if (isFirstStatement) { - insertCaptureThisForNode(statementsOut, constructor, superCallExpression || createActualThis()); - } else { - insertCaptureThisForNode(prologueOut, constructor, createActualThis()); - if (superCallExpression) { - addSuperThisCaptureThisForNode(statementsOut, superCallExpression); - } - } - mayReplaceThis = true; - } - } else { - insertCaptureThisForNodeIfNeeded(prologueOut, constructor); - } - } - if (superStatementIndex >= 0) { - addRange(statementsOut, visitNodes2(statementsIn, visitor, isStatement, superStatementIndex + 1)); - } - return mayReplaceThis; - } function isUninitializedVariableStatement(node) { return isVariableStatement(node) && every(node.declarationList.declarations, (decl) => isIdentifier(decl.name) && !decl.initializer); } - function isUsingDeclarationStateVariableStatement(node) { - if (!isVariableStatement(node) || node.declarationList.declarations.length !== 1) - return false; - const varDecl = node.declarationList.declarations[0]; - if (!isIdentifier(varDecl.name) || !varDecl.initializer) - return false; - const initializer = varDecl.initializer; - if (!isObjectLiteralExpression(initializer) || initializer.properties.length !== 3) - return false; - const [stackProp, errorProp, hasErrorProp] = initializer.properties; - if (!isPropertyAssignment(stackProp) || !isIdentifier(stackProp.name) || idText(stackProp.name) !== "stack" || !isArrayLiteralExpression(stackProp.initializer)) - return false; - if (!isPropertyAssignment(errorProp) || !isIdentifier(errorProp.name) || idText(errorProp.name) !== "error" || !isVoidExpression(errorProp.initializer) || !isNumericLiteral(errorProp.initializer.expression)) - return false; - if (!isPropertyAssignment(hasErrorProp) || !isIdentifier(hasErrorProp.name) || idText(hasErrorProp.name) !== "hasError" || hasErrorProp.initializer.kind !== 97 /* FalseKeyword */) + function containsSuperCall(node) { + if (isSuperCall(node)) { + return true; + } + if (!(node.transformFlags & 134217728 /* ContainsLexicalSuper */)) { return false; - return true; + } + switch (node.kind) { + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: + return false; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { + const named = node; + if (isComputedPropertyName(named.name)) { + return !!forEachChild(named.name, containsSuperCall); + } + return false; + } + } + return !!forEachChild(node, containsSuperCall); } function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) { const isDerivedClass = !!extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== 106 /* NullKeyword */; @@ -100981,31 +101569,22 @@ ${lanes.join("\n")} /*statementOffset*/ 0 ); - const superStatementIndices = findSuperStatementIndexPath(constructor.body.statements, standardPrologueEnd); - if (hasSynthesizedSuper || superStatementIndices.length > 0) { - hierarchyFacts |= 8192 /* ConstructorWithCapturedSuper */; + if (hasSynthesizedSuper || containsSuperCall(constructor.body)) { + hierarchyFacts |= 8192 /* ConstructorWithSuperCall */; } - const mayReplaceThis = transformConstructorBodyWorker( - prologue, - statements, - constructor.body.statements, - standardPrologueEnd, - superStatementIndices, - /*superPathDepth*/ - 0, - constructor, - isDerivedClass, - hasSynthesizedSuper, - /*isFirstStatement*/ - true - // NOTE: this will be recalculated inside of transformConstructorBodyWorker - ); + addRange(statements, visitNodes2(constructor.body.statements, visitor, isStatement, standardPrologueEnd)); + const mayReplaceThis = isDerivedClass || hierarchyFacts & 8192 /* ConstructorWithSuperCall */; addDefaultValueAssignmentsIfNeeded2(prologue, constructor); addRestParameterIfNeeded(prologue, constructor, hasSynthesizedSuper); insertCaptureNewTargetIfNeeded(prologue, constructor); + if (mayReplaceThis) { + insertCaptureThisForNode(prologue, constructor, createActualThis()); + } else { + insertCaptureThisForNodeIfNeeded(prologue, constructor); + } factory2.mergeLexicalEnvironment(prologue, endLexicalEnvironment()); if (mayReplaceThis && !isSufficientlyCoveredByReturnStatements(constructor.body)) { - statements.push(factory2.createReturnStatement(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */))); + statements.push(factory2.createReturnStatement(createCapturedThis())); } const body = factory2.createBlock( setTextRange( @@ -101022,6 +101601,230 @@ ${lanes.join("\n")} true ); setTextRange(body, constructor.body); + return simplifyConstructor(body, constructor.body, hasSynthesizedSuper); + } + function isCapturedThis(node) { + return isGeneratedIdentifier(node) && idText(node) === "_this"; + } + function isSyntheticSuper(node) { + return isGeneratedIdentifier(node) && idText(node) === "_super"; + } + function isThisCapturingVariableStatement(node) { + return isVariableStatement(node) && node.declarationList.declarations.length === 1 && isThisCapturingVariableDeclaration(node.declarationList.declarations[0]); + } + function isThisCapturingVariableDeclaration(node) { + return isVariableDeclaration(node) && isCapturedThis(node.name) && !!node.initializer; + } + function isThisCapturingAssignment(node) { + return isAssignmentExpression( + node, + /*excludeCompoundAssignment*/ + true + ) && isCapturedThis(node.left); + } + function isTransformedSuperCall(node) { + return isCallExpression(node) && isPropertyAccessExpression(node.expression) && isSyntheticSuper(node.expression.expression) && isIdentifier(node.expression.name) && (idText(node.expression.name) === "call" || idText(node.expression.name) === "apply") && node.arguments.length >= 1 && node.arguments[0].kind === 110 /* ThisKeyword */; + } + function isTransformedSuperCallWithFallback(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 57 /* BarBarToken */ && node.right.kind === 110 /* ThisKeyword */ && isTransformedSuperCall(node.left); + } + function isImplicitSuperCall(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 56 /* AmpersandAmpersandToken */ && isBinaryExpression(node.left) && node.left.operatorToken.kind === 38 /* ExclamationEqualsEqualsToken */ && isSyntheticSuper(node.left.left) && node.left.right.kind === 106 /* NullKeyword */ && isTransformedSuperCall(node.right) && idText(node.right.expression.name) === "apply"; + } + function isImplicitSuperCallWithFallback(node) { + return isBinaryExpression(node) && node.operatorToken.kind === 57 /* BarBarToken */ && node.right.kind === 110 /* ThisKeyword */ && isImplicitSuperCall(node.left); + } + function isThisCapturingTransformedSuperCallWithFallback(node) { + return isThisCapturingAssignment(node) && isTransformedSuperCallWithFallback(node.right); + } + function isThisCapturingImplicitSuperCallWithFallback(node) { + return isThisCapturingAssignment(node) && isImplicitSuperCallWithFallback(node.right); + } + function isTransformedSuperCallLike(node) { + return isTransformedSuperCall(node) || isTransformedSuperCallWithFallback(node) || isThisCapturingTransformedSuperCallWithFallback(node) || isImplicitSuperCall(node) || isImplicitSuperCallWithFallback(node) || isThisCapturingImplicitSuperCallWithFallback(node); + } + function simplifyConstructorInlineSuperInThisCaptureVariable(body) { + for (let i = 0; i < body.statements.length - 1; i++) { + const statement = body.statements[i]; + if (!isThisCapturingVariableStatement(statement)) { + continue; + } + const varDecl = statement.declarationList.declarations[0]; + if (varDecl.initializer.kind !== 110 /* ThisKeyword */) { + continue; + } + const thisCaptureStatementIndex = i; + let superCallIndex = i + 1; + while (superCallIndex < body.statements.length) { + const statement2 = body.statements[superCallIndex]; + if (isExpressionStatement(statement2)) { + if (isTransformedSuperCallLike(skipOuterExpressions(statement2.expression))) { + break; + } + } + if (isUninitializedVariableStatement(statement2)) { + superCallIndex++; + continue; + } + return body; + } + const following = body.statements[superCallIndex]; + let expression = following.expression; + if (isThisCapturingAssignment(expression)) { + expression = expression.right; + } + const newVarDecl = factory2.updateVariableDeclaration( + varDecl, + varDecl.name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + expression + ); + const newDeclList = factory2.updateVariableDeclarationList(statement.declarationList, [newVarDecl]); + const newVarStatement = factory2.createVariableStatement(statement.modifiers, newDeclList); + setOriginalNode(newVarStatement, following); + setTextRange(newVarStatement, following); + const newStatements = factory2.createNodeArray([ + ...body.statements.slice(0, thisCaptureStatementIndex), + // copy statements preceding to `var _this` + ...body.statements.slice(thisCaptureStatementIndex + 1, superCallIndex), + // copy intervening temp variables + newVarStatement, + ...body.statements.slice(superCallIndex + 1) + // copy statements following `super.call(this, ...)` + ]); + setTextRange(newStatements, body.statements); + return factory2.updateBlock(body, newStatements); + } + return body; + } + function simplifyConstructorInlineSuperReturn(body, original) { + for (const statement of original.statements) { + if (statement.transformFlags & 134217728 /* ContainsLexicalSuper */ && !getSuperCallFromStatement(statement)) { + return body; + } + } + const canElideThisCapturingVariable = !(original.transformFlags & 16384 /* ContainsLexicalThis */) && !(hierarchyFacts & 65536 /* LexicalThis */) && !(hierarchyFacts & 131072 /* CapturedLexicalThis */); + for (let i = body.statements.length - 1; i > 0; i--) { + const statement = body.statements[i]; + if (isReturnStatement(statement) && statement.expression && isCapturedThis(statement.expression)) { + const preceding = body.statements[i - 1]; + let expression; + if (isExpressionStatement(preceding) && isThisCapturingTransformedSuperCallWithFallback(skipOuterExpressions(preceding.expression))) { + expression = preceding.expression; + } else if (canElideThisCapturingVariable && isThisCapturingVariableStatement(preceding)) { + const varDecl = preceding.declarationList.declarations[0]; + if (isTransformedSuperCallLike(skipOuterExpressions(varDecl.initializer))) { + expression = factory2.createAssignment( + createCapturedThis(), + varDecl.initializer + ); + } + } + if (!expression) { + break; + } + const newReturnStatement = factory2.createReturnStatement(expression); + setOriginalNode(newReturnStatement, preceding); + setTextRange(newReturnStatement, preceding); + const newStatements = factory2.createNodeArray([ + ...body.statements.slice(0, i - 1), + // copy all statements preceding `_super.call(this, ...)` + newReturnStatement, + ...body.statements.slice(i + 1) + // copy all statements following `return _this;` + ]); + setTextRange(newStatements, body.statements); + return factory2.updateBlock(body, newStatements); + } + } + return body; + } + function elideUnusedThisCaptureWorker(node) { + if (isThisCapturingVariableStatement(node)) { + const varDecl = node.declarationList.declarations[0]; + if (varDecl.initializer.kind === 110 /* ThisKeyword */) { + return void 0; + } + } else if (isThisCapturingAssignment(node)) { + return factory2.createPartiallyEmittedExpression(node.right, node); + } + switch (node.kind) { + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: + return node; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { + const named = node; + if (isComputedPropertyName(named.name)) { + return factory2.replacePropertyName(named, visitEachChild(named.name, elideUnusedThisCaptureWorker, nullTransformationContext)); + } + return node; + } + } + return visitEachChild(node, elideUnusedThisCaptureWorker, nullTransformationContext); + } + function simplifyConstructorElideUnusedThisCapture(body, original) { + if (original.transformFlags & 16384 /* ContainsLexicalThis */ || hierarchyFacts & 65536 /* LexicalThis */ || hierarchyFacts & 131072 /* CapturedLexicalThis */) { + return body; + } + for (const statement of original.statements) { + if (statement.transformFlags & 134217728 /* ContainsLexicalSuper */ && !getSuperCallFromStatement(statement)) { + return body; + } + } + return factory2.updateBlock(body, visitNodes2(body.statements, elideUnusedThisCaptureWorker, isStatement)); + } + function injectSuperPresenceCheckWorker(node) { + if (isTransformedSuperCall(node) && node.arguments.length === 2 && isIdentifier(node.arguments[1]) && idText(node.arguments[1]) === "arguments") { + return factory2.createLogicalAnd( + factory2.createStrictInequality( + createSyntheticSuper(), + factory2.createNull() + ), + node + ); + } + switch (node.kind) { + case 219 /* ArrowFunction */: + case 218 /* FunctionExpression */: + case 262 /* FunctionDeclaration */: + case 176 /* Constructor */: + case 175 /* ClassStaticBlockDeclaration */: + return node; + case 177 /* GetAccessor */: + case 178 /* SetAccessor */: + case 174 /* MethodDeclaration */: + case 172 /* PropertyDeclaration */: { + const named = node; + if (isComputedPropertyName(named.name)) { + return factory2.replacePropertyName(named, visitEachChild(named.name, injectSuperPresenceCheckWorker, nullTransformationContext)); + } + return node; + } + } + return visitEachChild(node, injectSuperPresenceCheckWorker, nullTransformationContext); + } + function complicateConstructorInjectSuperPresenceCheck(body) { + return factory2.updateBlock(body, visitNodes2(body.statements, injectSuperPresenceCheckWorker, isStatement)); + } + function simplifyConstructor(body, original, hasSynthesizedSuper) { + const inputBody = body; + body = simplifyConstructorInlineSuperInThisCaptureVariable(body); + body = simplifyConstructorInlineSuperReturn(body, original); + if (body !== inputBody) { + body = simplifyConstructorElideUnusedThisCapture(body, original); + } + if (hasSynthesizedSuper) { + body = complicateConstructorInjectSuperPresenceCheck(body); + } return body; } function isSufficientlyCoveredByReturnStatements(statement) { @@ -101047,11 +101850,11 @@ ${lanes.join("\n")} return factory2.createLogicalOr( factory2.createLogicalAnd( factory2.createStrictInequality( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), + createSyntheticSuper(), factory2.createNull() ), factory2.createFunctionApplyCall( - factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), + createSyntheticSuper(), createActualThis(), factory2.createIdentifier("arguments") ) @@ -101306,24 +102109,12 @@ ${lanes.join("\n")} return true; } function insertCaptureThisForNodeIfNeeded(statements, node) { - if (hierarchyFacts & 65536 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { + if (hierarchyFacts & 131072 /* CapturedLexicalThis */ && node.kind !== 219 /* ArrowFunction */) { insertCaptureThisForNode(statements, node, factory2.createThis()); return true; } return false; } - function addSuperThisCaptureThisForNode(statements, superExpression) { - enableSubstitutionsForCapturedThis(); - const assignSuperExpression = factory2.createExpressionStatement( - factory2.createBinaryExpression( - factory2.createThis(), - 64 /* EqualsToken */, - superExpression - ) - ); - statements.push(assignSuperExpression); - setCommentRange(assignSuperExpression, getOriginalNode(superExpression).parent); - } function insertCaptureThisForNode(statements, node, initializer) { enableSubstitutionsForCapturedThis(); const captureThisStatement = factory2.createVariableStatement( @@ -101331,7 +102122,7 @@ ${lanes.join("\n")} void 0, factory2.createVariableDeclarationList([ factory2.createVariableDeclaration( - factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), + createCapturedThis(), /*exclamationToken*/ void 0, /*type*/ @@ -101552,7 +102343,7 @@ ${lanes.join("\n")} } function visitArrowFunction(node) { if (node.transformFlags & 16384 /* ContainsLexicalThis */ && !(hierarchyFacts & 16384 /* StaticInitializer */)) { - hierarchyFacts |= 65536 /* CapturedLexicalThis */; + hierarchyFacts |= 131072 /* CapturedLexicalThis */; } const savedConvertedLoopState = convertedLoopState; convertedLoopState = void 0; @@ -101585,7 +102376,7 @@ ${lanes.join("\n")} const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name; - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return factory2.updateFunctionExpression( node, @@ -101608,7 +102399,7 @@ ${lanes.join("\n")} const parameters = visitParameterList(node.parameters, visitor, context); const body = transformFunctionBody2(node); const name = hierarchyFacts & 32768 /* NewTarget */ ? factory2.getLocalName(node) : node.name; - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return factory2.updateFunctionDeclaration( node, @@ -101632,7 +102423,7 @@ ${lanes.join("\n")} if (hierarchyFacts & 32768 /* NewTarget */ && !name && (node.kind === 262 /* FunctionDeclaration */ || node.kind === 218 /* FunctionExpression */)) { name = factory2.getGeneratedNameForNode(node); } - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return setOriginalNode( setTextRange( @@ -101785,7 +102576,7 @@ ${lanes.join("\n")} return node.declarationList.declarations.length === 1 && !!node.declarationList.declarations[0].initializer && !!(getInternalEmitFlags(node.declarationList.declarations[0].initializer) & 1 /* TypeScriptClassWrapper */); } function visitVariableStatement(node) { - const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 1 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); + const ancestorFacts = enterSubtree(0 /* None */, hasSyntacticModifier(node, 32 /* Export */) ? 32 /* ExportedVariableStatement */ : 0 /* None */); let updated; if (convertedLoopState && (node.declarationList.flags & 7 /* BlockScoped */) === 0 && !isVariableStatementOfTypeScriptClassWrapper(node)) { let assignments; @@ -101823,7 +102614,11 @@ ${lanes.join("\n")} if (node.flags & 7 /* BlockScoped */) { enableSubstitutionsForBlockScopedBindings(); } - const declarations = visitNodes2(node.declarations, node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, isVariableDeclaration); + const declarations = visitNodes2( + node.declarations, + node.flags & 1 /* Let */ ? visitVariableDeclarationInLetDeclarationList : visitVariableDeclaration, + isVariableDeclaration + ); const declarationList = factory2.createVariableDeclarationList(declarations); setOriginalNode(declarationList, node); setTextRange(declarationList, node); @@ -103037,7 +103832,7 @@ ${lanes.join("\n")} } else { updated = factory2.updateSetAccessorDeclaration(node, node.modifiers, node.name, parameters, body); } - exitSubtree(ancestorFacts, 98304 /* FunctionSubtreeExcludes */, 0 /* None */); + exitSubtree(ancestorFacts, 229376 /* FunctionSubtreeExcludes */, 0 /* None */); convertedLoopState = savedConvertedLoopState; return updated; } @@ -103187,13 +103982,6 @@ ${lanes.join("\n")} ) ); } - function visitSuperCallInBody(node) { - return visitCallExpressionWithPotentialCapturedThisAssignment( - node, - /*assignToCapturedThis*/ - false - ); - } function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) { if (node.transformFlags & 32768 /* ContainsRestOrSpread */ || node.expression.kind === 108 /* SuperKeyword */ || isSuperProperty(skipOuterExpressions(node.expression))) { const { target, thisArg } = factory2.createCallBinding(node.expression, hoistVariableDeclaration); @@ -103230,10 +104018,13 @@ ${lanes.join("\n")} resultingCall, createActualThis() ); - resultingCall = assignToCapturedThis ? factory2.createAssignment(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), initializer) : initializer; + resultingCall = assignToCapturedThis ? factory2.createAssignment(createCapturedThis(), initializer) : initializer; } return setOriginalNode(resultingCall, node); } + if (isSuperCall(node)) { + hierarchyFacts |= 131072 /* CapturedLexicalThis */; + } return visitEachChild(node, visitor, context); } function visitNewExpression(node) { @@ -103266,11 +104057,7 @@ ${lanes.join("\n")} // As we visit each element, we return one of two functions to use as the "key": // - `visitSpanOfSpreads` for one or more contiguous `...` spread expressions, i.e. `...a, ...b` in `[1, 2, ...a, ...b]` // - `visitSpanOfNonSpreads` for one or more contiguous non-spread elements, i.e. `1, 2`, in `[1, 2, ...a, ...b]` - spanMap( - elements, - partitionSpread, - (partition, visitPartition, _start, end) => visitPartition(partition, multiLine, hasTrailingComma && end === numElements) - ) + spanMap(elements, partitionSpread, (partition, visitPartition, _start, end) => visitPartition(partition, multiLine, hasTrailingComma && end === numElements)) ); if (segments.length === 1) { const firstSegment = segments[0]; @@ -103364,8 +104151,15 @@ ${lanes.join("\n")} } return setTextRange(expression, node); } - function visitSuperKeyword(isExpressionOfCall) { - return hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */), "prototype") : factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); + function createSyntheticSuper() { + return factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */); + } + function visitSuperKeyword(node, isExpressionOfCall) { + const expression = hierarchyFacts & 8 /* NonStaticClassElement */ && !isExpressionOfCall ? factory2.createPropertyAccessExpression(setOriginalNode(createSyntheticSuper(), node), "prototype") : createSyntheticSuper(); + setOriginalNode(expression, node); + setCommentRange(expression, node); + setSourceMapRange(expression, node); + return expression; } function visitMetaProperty(node) { if (node.keywordToken === 105 /* NewKeyword */ && node.name.escapedText === "target") { @@ -103471,7 +104265,7 @@ ${lanes.join("\n")} } function substituteThisKeyword(node) { if (enabledSubstitutions & 1 /* CapturedThis */ && hierarchyFacts & 16 /* CapturesThis */) { - return setTextRange(factory2.createUniqueName("_this", 16 /* Optimistic */ | 32 /* FileLevel */), node); + return setTextRange(createCapturedThis(), node); } return node; } @@ -103934,11 +104728,7 @@ ${lanes.join("\n")} ); break; case 212 /* ElementAccessExpression */: - target = factory2.updateElementAccessExpression( - left, - cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), - cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression))) - ); + target = factory2.updateElementAccessExpression(left, cacheExpression(Debug.checkDefined(visitNode(left.expression, visitor, isLeftHandSideExpression))), cacheExpression(Debug.checkDefined(visitNode(left.argumentExpression, visitor, isExpression)))); break; default: target = Debug.checkDefined(visitNode(left, visitor, isExpression)); @@ -103973,12 +104763,7 @@ ${lanes.join("\n")} } else if (node.operatorToken.kind === 28 /* CommaToken */) { return visitCommaExpression(node); } - return factory2.updateBinaryExpression( - node, - cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))), - node.operatorToken, - Debug.checkDefined(visitNode(node.right, visitor, isExpression)) - ); + return factory2.updateBinaryExpression(node, cacheExpression(Debug.checkDefined(visitNode(node.left, visitor, isExpression))), node.operatorToken, Debug.checkDefined(visitNode(node.right, visitor, isExpression))); } return visitEachChild(node, visitor, context); } @@ -104186,11 +104971,7 @@ ${lanes.join("\n")} } function visitElementAccessExpression(node) { if (containsYield(node.argumentExpression)) { - return factory2.updateElementAccessExpression( - node, - cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))), - Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression)) - ); + return factory2.updateElementAccessExpression(node, cacheExpression(Debug.checkDefined(visitNode(node.expression, visitor, isLeftHandSideExpression))), Debug.checkDefined(visitNode(node.argumentExpression, visitor, isExpression))); } return visitEachChild(node, visitor, context); } @@ -104548,12 +105329,7 @@ ${lanes.join("\n")} for (const variable of initializer.declarations) { hoistVariableDeclaration(variable.name); } - node = factory2.updateForInStatement( - node, - initializer.declarations[0].name, - Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), - Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock)) - ); + node = factory2.updateForInStatement(node, initializer.declarations[0].name, Debug.checkDefined(visitNode(node.expression, visitor, isExpression)), Debug.checkDefined(visitNode(node.statement, visitor, isStatement, factory2.liftToBlock))); } else { node = visitEachChild(node, visitor, context); } @@ -105720,12 +106496,14 @@ ${lanes.join("\n")} // Add the dependency array argument: // // ["require", "exports", module1", "module2", ...] - factory2.createArrayLiteralExpression(jsonSourceFile ? emptyArray : [ - factory2.createStringLiteral("require"), - factory2.createStringLiteral("exports"), - ...aliasedModuleNames, - ...unaliasedModuleNames - ]), + factory2.createArrayLiteralExpression( + jsonSourceFile ? emptyArray : [ + factory2.createStringLiteral("require"), + factory2.createStringLiteral("exports"), + ...aliasedModuleNames, + ...unaliasedModuleNames + ] + ), // Add the module body function argument: // // function (require, exports, module1, module2) ... @@ -106451,22 +107229,25 @@ ${lanes.join("\n")} ); } else { const temp = factory2.createTempVariable(hoistVariableDeclaration); - return factory2.createComma(factory2.createAssignment(temp, arg), factory2.createConditionalExpression( - /*condition*/ - factory2.createIdentifier("__syncRequire"), - /*questionToken*/ - void 0, - /*whenTrue*/ - createImportCallExpressionCommonJS( - temp, - /*isInlineable*/ - true - ), - /*colonToken*/ - void 0, - /*whenFalse*/ - createImportCallExpressionAMD(temp, containsLexicalThis) - )); + return factory2.createComma( + factory2.createAssignment(temp, arg), + factory2.createConditionalExpression( + /*condition*/ + factory2.createIdentifier("__syncRequire"), + /*questionToken*/ + void 0, + /*whenTrue*/ + createImportCallExpressionCommonJS( + temp, + /*isInlineable*/ + true + ), + /*colonToken*/ + void 0, + /*whenFalse*/ + createImportCallExpressionAMD(temp, containsLexicalThis) + ) + ); } } function createImportCallExpressionAMD(arg, containsLexicalThis) { @@ -106762,7 +107543,7 @@ ${lanes.join("\n")} Debug.assert(isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer."); let statements; if (moduleKind !== 2 /* AMD */) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -106808,7 +107589,7 @@ ${lanes.join("\n")} ); } } else { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -106907,7 +107688,10 @@ ${lanes.join("\n")} factory2.createExpressionStatement( createExportExpression( factory2.cloneNode(node.exportClause.name), - getHelperExpressionForExport(node, moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : factory2.createIdentifier(idText(node.exportClause.name))) + getHelperExpressionForExport( + node, + moduleKind !== 2 /* AMD */ ? createRequireCall2(node) : isExportNamespaceAsDefaultDeclaration(node) ? generatedName : factory2.createIdentifier(idText(node.exportClause.name)) + ) ) ), node @@ -106943,7 +107727,7 @@ ${lanes.join("\n")} } function visitFunctionDeclaration(node) { let statements; - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -106980,7 +107764,7 @@ ${lanes.join("\n")} } function visitClassDeclaration(node) { let statements; - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { statements = append( statements, setOriginalNode( @@ -107014,7 +107798,7 @@ ${lanes.join("\n")} let statements; let variables; let expressions; - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { let modifiers; let removeCommentsOnExpressions = false; for (const variable of node.declarationList.declarations) { @@ -107200,8 +107984,8 @@ ${lanes.join("\n")} return statements; } const seen = new IdentifierNameMap(); - if (hasSyntacticModifier(decl, 1 /* Export */)) { - const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); + if (hasSyntacticModifier(decl, 32 /* Export */)) { + const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createIdentifier("default") : factory2.getDeclarationName(decl); statements = appendExportStatement( statements, seen, @@ -107299,21 +108083,24 @@ ${lanes.join("\n")} factory2.createStringLiteralFromNode(name), factory2.createObjectLiteralExpression([ factory2.createPropertyAssignment("enumerable", factory2.createTrue()), - factory2.createPropertyAssignment("get", factory2.createFunctionExpression( - /*modifiers*/ - void 0, - /*asteriskToken*/ - void 0, - /*name*/ - void 0, - /*typeParameters*/ - void 0, - /*parameters*/ - [], - /*type*/ - void 0, - factory2.createBlock([factory2.createReturnStatement(value)]) - )) + factory2.createPropertyAssignment( + "get", + factory2.createFunctionExpression( + /*modifiers*/ + void 0, + /*asteriskToken*/ + void 0, + /*name*/ + void 0, + /*typeParameters*/ + void 0, + /*parameters*/ + [], + /*type*/ + void 0, + factory2.createBlock([factory2.createReturnStatement(value)]) + ) + ) ]) ] ) : factory2.createAssignment( @@ -107692,13 +108479,10 @@ ${lanes.join("\n")} addRange(statements, hoistedStatements); insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment()); const exportStarFunction = addExportStarIfNeeded(statements); - const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(512 /* Async */) : void 0; + const modifiers = node.transformFlags & 2097152 /* ContainsAwait */ ? factory2.createModifiersFromModifierFlags(1024 /* Async */) : void 0; const moduleObject = factory2.createObjectLiteralExpression( [ - factory2.createPropertyAssignment( - "setters", - createSettersArray(exportStarFunction, dependencyGroups) - ), + factory2.createPropertyAssignment("setters", createSettersArray(exportStarFunction, dependencyGroups)), factory2.createPropertyAssignment( "execute", factory2.createFunctionExpression( @@ -107897,7 +108681,7 @@ ${lanes.join("\n")} factory2.createAssignment(importVariableName, parameterName) ) ); - if (hasSyntacticModifier(entry, 1 /* Export */)) { + if (hasSyntacticModifier(entry, 32 /* Export */)) { statements.push( factory2.createExpressionStatement( factory2.createCallExpression( @@ -108050,7 +108834,7 @@ ${lanes.join("\n")} ); } function visitFunctionDeclaration(node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { + if (hasSyntacticModifier(node, 32 /* Export */)) { hoistedStatements = append( hoistedStatements, factory2.updateFunctionDeclaration( @@ -108137,7 +108921,7 @@ ${lanes.join("\n")} statements = append(statements, factory2.updateVariableStatement(node, modifiers, declarationList)); } else { let expressions; - const isExportedDeclaration = hasSyntacticModifier(node, 1 /* Export */); + const isExportedDeclaration = hasSyntacticModifier(node, 32 /* Export */); for (const variable of node.declarationList.declarations) { if (variable.initializer) { expressions = append(expressions, transformInitializedVariable(variable, isExportedDeclaration)); @@ -108273,8 +109057,8 @@ ${lanes.join("\n")} return statements; } let excludeName; - if (hasSyntacticModifier(decl, 1 /* Export */)) { - const exportName = hasSyntacticModifier(decl, 1024 /* Default */) ? factory2.createStringLiteral("default") : decl.name; + if (hasSyntacticModifier(decl, 32 /* Export */)) { + const exportName = hasSyntacticModifier(decl, 2048 /* Default */) ? factory2.createStringLiteral("default") : decl.name; statements = appendExportStatement(statements, exportName, factory2.getLocalName(decl)); excludeName = getTextOfIdentifierOrLiteral(exportName); } @@ -108950,7 +109734,9 @@ ${lanes.join("\n")} ) ]) ), - factory2.createStringLiteral("module") + factory2.createStringLiteral("module"), + /*attributes*/ + void 0 ); const requireHelperName = factory2.createUniqueName("__require", 16 /* Optimistic */ | 32 /* FileLevel */); const requireStatement = factory2.createVariableStatement( @@ -109023,19 +109809,22 @@ ${lanes.join("\n")} return singleOrMany(statements); } function appendExportsOfImportEqualsDeclaration(statements, node) { - if (hasSyntacticModifier(node, 1 /* Export */)) { - statements = append(statements, factory2.createExportDeclaration( - /*modifiers*/ - void 0, - node.isTypeOnly, - factory2.createNamedExports([factory2.createExportSpecifier( - /*isTypeOnly*/ - false, - /*propertyName*/ + if (hasSyntacticModifier(node, 32 /* Export */)) { + statements = append( + statements, + factory2.createExportDeclaration( + /*modifiers*/ void 0, - idText(node.name) - )]) - )); + node.isTypeOnly, + factory2.createNamedExports([factory2.createExportSpecifier( + /*isTypeOnly*/ + false, + /*propertyName*/ + void 0, + idText(node.name) + )]) + ) + ); } return statements; } @@ -109064,7 +109853,7 @@ ${lanes.join("\n")} ) ), node.moduleSpecifier, - node.assertClause + node.attributes ); setOriginalNode(importDecl, node.exportClause); const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory2.createExportDefault(synthName) : factory2.createExportDeclaration( @@ -109242,7 +110031,7 @@ ${lanes.join("\n")} } else if (isConstructSignatureDeclaration(node) || isCallSignatureDeclaration(node) || isMethodDeclaration(node) || isMethodSignature(node) || isFunctionDeclaration(node) || isIndexSignatureDeclaration(node)) { return getReturnTypeVisibilityError; } else if (isParameter(node)) { - if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 8 /* Private */)) { + if (isParameterPropertyDeclaration(node, node.parent) && hasSyntacticModifier(node.parent, 2 /* Private */)) { return getVariableDeclarationTypeVisibilityError; } return getParameterDeclarationTypeVisibilityError; @@ -109260,7 +110049,7 @@ ${lanes.join("\n")} function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) { if (node.kind === 260 /* VariableDeclaration */ || node.kind === 208 /* BindingElement */) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 8 /* Private */)) { + } else if (node.kind === 172 /* PropertyDeclaration */ || node.kind === 211 /* PropertyAccessExpression */ || node.kind === 212 /* ElementAccessExpression */ || node.kind === 226 /* BinaryExpression */ || node.kind === 171 /* PropertySignature */ || node.kind === 169 /* Parameter */ && hasSyntacticModifier(node.parent, 2 /* Private */)) { if (isStatic(node)) { return symbolAccessibilityResult.errorModuleName ? symbolAccessibilityResult.accessibility === 2 /* CannotBeNamed */ ? Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; } else if (node.parent.kind === 263 /* ClassDeclaration */ || node.kind === 169 /* Parameter */) { @@ -109470,7 +110259,7 @@ ${lanes.join("\n")} } function hasInternalAnnotation(range, currentSourceFile) { const comment = currentSourceFile.text.substring(range.pos, range.end); - return stringContains(comment, "@internal"); + return comment.includes("@internal"); } function isInternalDeclaration(node, currentSourceFile) { const parseTreeNode = getParseTreeNode(node); @@ -109534,8 +110323,7 @@ ${lanes.join("\n")} trackReferencedAmbientModule, trackExternalModuleSymbolOfImportTypeNode, reportNonlocalAugmentation, - reportNonSerializableProperty, - reportImportTypeNodeResolutionModeOverride + reportNonSerializableProperty }; let errorNameNode; let errorFallbackNode; @@ -109564,6 +110352,17 @@ ${lanes.join("\n")} const container = getSourceFileOfNode(node); refs.set(getOriginalNodeId(container), container); } + function trackReferencedAmbientModuleFromImport(node) { + const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(node); + const symbol = moduleSpecifier && resolver.tryFindAmbientModule(moduleSpecifier); + if (symbol == null ? void 0 : symbol.declarations) { + for (const decl of symbol.declarations) { + if (isAmbientModule(decl) && getSourceFileOfNode(decl) !== currentSourceFile) { + trackReferencedAmbientModule(decl, symbol); + } + } + } + } function handleSymbolAccessibilityError(symbolAccessibilityResult) { if (symbolAccessibilityResult.accessibility === 0 /* Accessible */) { if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) { @@ -109579,20 +110378,9 @@ ${lanes.join("\n")} const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); if (errorInfo) { if (errorInfo.typeName) { - context.addDiagnostic(createDiagnosticForNode( - symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - getTextOfNode(errorInfo.typeName), - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName - )); + context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, getTextOfNode(errorInfo.typeName), symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName)); } else { - context.addDiagnostic(createDiagnosticForNode( - symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName - )); + context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName)); } return true; } @@ -109629,41 +110417,22 @@ ${lanes.join("\n")} } function reportInaccessibleUniqueSymbolError() { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - "unique symbol" - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "unique symbol")); } } function reportCyclicStructureError() { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback() - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, errorDeclarationNameWithFallback())); } } function reportInaccessibleThisError() { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - "this" - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "this")); } } function reportLikelyUnsafeImportRequiredError(specifier) { if (errorNameNode || errorFallbackNode) { - context.addDiagnostic(createDiagnosticForNode( - errorNameNode || errorFallbackNode, - Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, - errorDeclarationNameWithFallback(), - specifier - )); + context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier)); } } function reportTruncationError() { @@ -109689,11 +110458,6 @@ ${lanes.join("\n")} context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName)); } } - function reportImportTypeNodeResolutionModeOverride() { - if (!isNightly() && (errorNameNode || errorFallbackNode)) { - context.addDiagnostic(createDiagnosticForNode(errorNameNode || errorFallbackNode, Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - } function transformDeclarationsForJS(sourceFile, bundled) { const oldDiag = getSymbolAccessibilityDiagnostic; getSymbolAccessibilityDiagnostic = (s) => s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : { @@ -109713,9 +110477,8 @@ ${lanes.join("\n")} refs = /* @__PURE__ */ new Map(); libs2 = /* @__PURE__ */ new Map(); let hasNoDefaultLib = false; - const bundle = factory2.createBundle(map( - node.sourceFiles, - (sourceFile) => { + const bundle = factory2.createBundle( + map(node.sourceFiles, (sourceFile) => { if (sourceFile.isDeclarationFile) return void 0; hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib; @@ -109773,18 +110536,19 @@ ${lanes.join("\n")} /*libReferences*/ [] ); - } - ), mapDefined(node.prepends, (prepend) => { - if (prepend.kind === 315 /* InputFiles */) { - const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); - hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; - collectReferences(sourceFile, refs); - recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, (ref) => [ref.fileName, ref.resolutionMode])); - collectLibs(sourceFile, libs2); - return sourceFile; - } - return prepend; - })); + }), + mapDefined(node.prepends, (prepend) => { + if (prepend.kind === 315 /* InputFiles */) { + const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); + hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; + collectReferences(sourceFile, refs); + recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, (ref) => [ref.fileName, ref.resolutionMode])); + collectLibs(sourceFile, libs2); + return sourceFile; + } + return prepend; + }) + ); bundle.syntheticFileReferences = []; bundle.syntheticTypeReferences = getFileReferencesForUsedTypeReferences(); bundle.syntheticLibReferences = getLibReferences(); @@ -109953,6 +110717,9 @@ ${lanes.join("\n")} if (elem.kind === 232 /* OmittedExpression */) { return elem; } + if (elem.propertyName && isComputedPropertyName(elem.propertyName) && isEntityNameExpression(elem.propertyName.expression)) { + checkEntityNameVisibility(elem.propertyName.expression, enclosingDeclaration); + } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { return factory2.updateBindingElement( elem, @@ -110008,7 +110775,7 @@ ${lanes.join("\n")} return void 0; } function ensureType(node, type, ignorePrivate) { - if (!ignorePrivate && hasEffectiveModifier(node, 8 /* Private */)) { + if (!ignorePrivate && hasEffectiveModifier(node, 2 /* Private */)) { return; } if (shouldPrintWithInitializer(node)) { @@ -110088,7 +110855,7 @@ ${lanes.join("\n")} } } function updateParamsList(node, params, modifierMask) { - if (hasEffectiveModifier(node, 8 /* Private */)) { + if (hasEffectiveModifier(node, 2 /* Private */)) { return factory2.createNodeArray(); } const newParams = map(params, (p) => ensureParameter(p, modifierMask)); @@ -110133,7 +110900,7 @@ ${lanes.join("\n")} return factory2.createNodeArray(newParams || emptyArray); } function ensureTypeParams(node, params) { - return hasEffectiveModifier(node, 8 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration); + return hasEffectiveModifier(node, 2 /* Private */) ? void 0 : visitNodes2(params, visitDeclarationSubtree, isTypeParameterDeclaration); } function isEnclosingDeclaration(node) { return isSourceFile(node) || isTypeAliasDeclaration(node) || isModuleDeclaration(node) || isClassDeclaration(node) || isInterfaceDeclaration(node) || isFunctionLike(node) || isIndexSignatureDeclaration(node) || isMappedTypeNode(node); @@ -110195,30 +110962,42 @@ ${lanes.join("\n")} decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) + tryGetResolutionModeOverride(decl.attributes) ); } const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : void 0; if (!decl.importClause.namedBindings) { - return visibleDefaultBinding && factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - /*namedBindings*/ - void 0 - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); + return visibleDefaultBinding && factory2.updateImportDeclaration( + decl, + decl.modifiers, + factory2.updateImportClause( + decl.importClause, + decl.importClause.isTypeOnly, + visibleDefaultBinding, + /*namedBindings*/ + void 0 + ), + rewriteModuleSpecifier(decl, decl.moduleSpecifier), + tryGetResolutionModeOverride(decl.attributes) + ); } if (decl.importClause.namedBindings.kind === 274 /* NamespaceImport */) { const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : ( /*namedBindings*/ void 0 ); - return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration(decl, decl.modifiers, factory2.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - namedBindings - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : void 0; + return visibleDefaultBinding || namedBindings ? factory2.updateImportDeclaration( + decl, + decl.modifiers, + factory2.updateImportClause( + decl.importClause, + decl.importClause.isTypeOnly, + visibleDefaultBinding, + namedBindings + ), + rewriteModuleSpecifier(decl, decl.moduleSpecifier), + tryGetResolutionModeOverride(decl.attributes) + ) : void 0; } const bindingList = mapDefined(decl.importClause.namedBindings.elements, (b) => resolver.isDeclarationVisible(b) ? b : void 0); if (bindingList && bindingList.length || visibleDefaultBinding) { @@ -110232,7 +111011,7 @@ ${lanes.join("\n")} bindingList && bindingList.length ? factory2.updateNamedImports(decl.importClause.namedBindings, bindingList) : void 0 ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) + tryGetResolutionModeOverride(decl.attributes) ); } if (resolver.isImportRequiredByAugmentation(decl)) { @@ -110242,19 +111021,13 @@ ${lanes.join("\n")} /*importClause*/ void 0, rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) + tryGetResolutionModeOverride(decl.attributes) ); } } - function getResolutionModeOverrideForClauseInNightly(assertClause) { - const mode = getResolutionModeOverrideForClause(assertClause); - if (mode !== void 0) { - if (!isNightly()) { - context.addDiagnostic(createDiagnosticForNode(assertClause, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - return assertClause; - } - return void 0; + function tryGetResolutionModeOverride(node) { + const mode = getResolutionModeOverride(node); + return node && mode !== void 0 ? node : void 0; } function transformAndReplaceLatePaintedStatements(statements) { while (length(lateMarkedStatements)) { @@ -110313,7 +111086,7 @@ ${lanes.join("\n")} const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; let shouldEnterSuppressNewDiagnosticsContextContext = (input.kind === 187 /* TypeLiteral */ || input.kind === 200 /* MappedType */) && input.parent.kind !== 265 /* TypeAliasDeclaration */; if (isMethodDeclaration(input) || isMethodSignature(input)) { - if (hasEffectiveModifier(input, 8 /* Private */)) { + if (hasEffectiveModifier(input, 2 /* Private */)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) return; return cleanup(factory2.createPropertyDeclaration( @@ -110401,7 +111174,7 @@ ${lanes.join("\n")} input, ensureModifiers(input), input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)), + updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)), ensureType(input, accessorType), /*body*/ void 0 @@ -110418,7 +111191,7 @@ ${lanes.join("\n")} input, ensureModifiers(input), input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, 8 /* Private */)), + updateAccessorParamsList(input, hasEffectiveModifier(input, 2 /* Private */)), /*body*/ void 0 )); @@ -110537,10 +111310,11 @@ ${lanes.join("\n")} case 205 /* ImportType */: { if (!isLiteralImportTypeNode(input)) return cleanup(input); + trackReferencedAmbientModuleFromImport(input); return cleanup(factory2.updateImportTypeNode( input, factory2.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), - input.assertions, + input.attributes, input.qualifier, visitNodes2(input.typeArguments, visitDeclarationSubtree, isTypeNode), input.isTypeOf @@ -110574,7 +111348,7 @@ ${lanes.join("\n")} } } function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 8 /* Private */); + return node.parent.kind === 174 /* MethodDeclaration */ && hasEffectiveModifier(node.parent, 2 /* Private */); } function visitDeclarationStatements(input) { if (!isPreservedDeclarationStatement(input)) { @@ -110588,13 +111362,14 @@ ${lanes.join("\n")} resultHasExternalModuleIndicator = true; } resultHasScopeMarker = true; + trackReferencedAmbientModuleFromImport(input); return factory2.updateExportDeclaration( input, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), - getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : void 0 + tryGetResolutionModeOverride(input.attributes) ); } case 277 /* ExportAssignment */: { @@ -110632,11 +111407,11 @@ ${lanes.join("\n")} return input; } function stripExportModifiers(statement) { - if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 1024 /* Default */) || !canHaveModifiers(statement)) { + if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, 2048 /* Default */) || !canHaveModifiers(statement)) { return statement; } - const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (258047 /* All */ ^ 1 /* Export */)); - return factory2.updateModifiers(statement, modifiers); + const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (131071 /* All */ ^ 32 /* Export */)); + return factory2.replaceModifiers(statement, modifiers); } function updateModuleDeclarationAndKeyword(node, modifiers, name, body) { const updated = factory2.updateModuleDeclaration(node, modifiers, name, body); @@ -110662,10 +111437,18 @@ ${lanes.join("\n")} return; switch (input.kind) { case 271 /* ImportEqualsDeclaration */: { - return transformImportEqualsDeclaration(input); + const transformed = transformImportEqualsDeclaration(input); + if (transformed) { + trackReferencedAmbientModuleFromImport(input); + } + return transformed; } case 272 /* ImportDeclaration */: { - return transformImportDeclaration(input); + const transformed = transformImportDeclaration(input); + if (transformed) { + trackReferencedAmbientModuleFromImport(input); + } + return transformed; } } if (isDeclaration(input) && isDeclarationAndNotVisible(input)) @@ -110733,7 +111516,7 @@ ${lanes.join("\n")} fakespace.symbol = props[0].parent; const exportMappings = []; let declarations = mapDefined(props, (p) => { - if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) { + if (!isExpandoPropertyDeclaration(p.valueDeclaration)) { return void 0; } const nameStr = unescapeLeadingUnderscores(p.escapedName); @@ -110759,7 +111542,7 @@ ${lanes.join("\n")} return factory2.createVariableStatement(isNonContextualKeywordName ? void 0 : [factory2.createToken(95 /* ExportKeyword */)], factory2.createVariableDeclarationList([varDecl])); }); if (!exportMappings.length) { - declarations = mapDefined(declarations, (declaration) => factory2.updateModifiers(declaration, 0 /* None */)); + declarations = mapDefined(declarations, (declaration) => factory2.replaceModifiers(declaration, 0 /* None */)); } else { declarations.push(factory2.createExportDeclaration( /*modifiers*/ @@ -110777,10 +111560,10 @@ ${lanes.join("\n")} )); } const namespaceDecl = factory2.createModuleDeclaration(ensureModifiers(input), input.name, factory2.createModuleBlock(declarations), 32 /* Namespace */); - if (!hasEffectiveModifier(clean2, 1024 /* Default */)) { + if (!hasEffectiveModifier(clean2, 2048 /* Default */)) { return [clean2, namespaceDecl]; } - const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~1025 /* ExportDefault */ | 2 /* Ambient */); + const modifiers = factory2.createModifiersFromModifierFlags(getEffectiveModifierFlags(clean2) & ~2080 /* ExportDefault */ | 128 /* Ambient */); const cleanDeclaration = factory2.updateFunctionDeclaration( clean2, modifiers, @@ -110872,17 +111655,20 @@ ${lanes.join("\n")} if (ctor) { const oldDiag2 = getSymbolAccessibilityDiagnostic; parameterProperties = compact(flatMap(ctor.parameters, (param) => { - if (!hasSyntacticModifier(param, 16476 /* ParameterPropertyModifier */) || shouldStripInternal(param)) + if (!hasSyntacticModifier(param, 31 /* ParameterPropertyModifier */) || shouldStripInternal(param)) return; getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(param); if (param.name.kind === 80 /* Identifier */) { - return preserveJsDoc(factory2.createPropertyDeclaration( - ensureModifiers(param), - param.name, - param.questionToken, - ensureType(param, param.type), - ensureNoInitializer(param) - ), param); + return preserveJsDoc( + factory2.createPropertyDeclaration( + ensureModifiers(param), + param.name, + param.questionToken, + ensureType(param, param.type), + ensureNoInitializer(param) + ), + param + ); } else { return walkBindingPattern(param.name); } @@ -110958,14 +111744,17 @@ ${lanes.join("\n")} } return factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => isEntityNameExpression(t.expression) || t.expression.kind === 106 /* NullKeyword */)), visitDeclarationSubtree, isExpressionWithTypeArguments)); })); - return [statement, cleanup(factory2.updateClassDeclaration( - input, - modifiers, - input.name, - typeParameters, - heritageClauses, - members - ))]; + return [ + statement, + cleanup(factory2.updateClassDeclaration( + input, + modifiers, + input.name, + typeParameters, + heritageClauses, + members + )) + ]; } else { const heritageClauses = transformHeritageClauses(input.heritageClauses); return cleanup(factory2.updateClassDeclaration( @@ -110982,12 +111771,17 @@ ${lanes.join("\n")} return cleanup(transformVariableStatement(input)); } case 266 /* EnumDeclaration */: { - return cleanup(factory2.updateEnumDeclaration(input, factory2.createNodeArray(ensureModifiers(input)), input.name, factory2.createNodeArray(mapDefined(input.members, (m) => { - if (shouldStripInternal(m)) - return; - const constValue = resolver.getConstantValue(m); - return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m); - })))); + return cleanup(factory2.updateEnumDeclaration( + input, + factory2.createNodeArray(ensureModifiers(input)), + input.name, + factory2.createNodeArray(mapDefined(input.members, (m) => { + if (shouldStripInternal(m)) + return; + const constValue = resolver.getConstantValue(m); + return preserveJsDoc(factory2.updateEnumMember(m, m.name, constValue !== void 0 ? typeof constValue === "string" ? factory2.createStringLiteral(constValue) : factory2.createNumericLiteral(constValue) : void 0), m); + })) + )); } } return Debug.assertNever(input, `Unhandled top-level node in declaration emit: ${Debug.formatSyntaxKind(input.kind)}`); @@ -111089,11 +111883,11 @@ ${lanes.join("\n")} return factory2.createModifiersFromModifierFlags(newFlags); } function ensureModifierFlags(node) { - let mask2 = 258047 /* All */ ^ (4 /* Public */ | 512 /* Async */ | 16384 /* Override */); - let additions = needsDeclare && !isAlwaysType(node) ? 2 /* Ambient */ : 0 /* None */; + let mask2 = 131071 /* All */ ^ (1 /* Public */ | 1024 /* Async */ | 16 /* Override */); + let additions = needsDeclare && !isAlwaysType(node) ? 128 /* Ambient */ : 0 /* None */; const parentIsFile = node.parent.kind === 312 /* SourceFile */; if (!parentIsFile || isBundledEmit && parentIsFile && isExternalModule(node.parent)) { - mask2 ^= 2 /* Ambient */; + mask2 ^= 128 /* Ambient */; additions = 0 /* None */; } return maskModifierFlags(node, mask2, additions); @@ -111111,9 +111905,19 @@ ${lanes.join("\n")} return accessorType; } function transformHeritageClauses(nodes) { - return factory2.createNodeArray(filter(map(nodes, (clause) => factory2.updateHeritageClause(clause, visitNodes2(factory2.createNodeArray(filter(clause.types, (t) => { - return isEntityNameExpression(t.expression) || clause.token === 96 /* ExtendsKeyword */ && t.expression.kind === 106 /* NullKeyword */; - })), visitDeclarationSubtree, isExpressionWithTypeArguments))), (clause) => clause.types && !!clause.types.length)); + return factory2.createNodeArray(filter( + map(nodes, (clause) => factory2.updateHeritageClause( + clause, + visitNodes2( + factory2.createNodeArray(filter(clause.types, (t) => { + return isEntityNameExpression(t.expression) || clause.token === 96 /* ExtendsKeyword */ && t.expression.kind === 106 /* NullKeyword */; + })), + visitDeclarationSubtree, + isExpressionWithTypeArguments + ) + )), + (clause) => clause.types && !!clause.types.length + )); } } function isAlwaysType(node) { @@ -111125,13 +111929,13 @@ ${lanes.join("\n")} function maskModifiers(factory2, node, modifierMask, modifierAdditions) { return factory2.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions)); } - function maskModifierFlags(node, modifierMask = 258047 /* All */ ^ 4 /* Public */, modifierAdditions = 0 /* None */) { + function maskModifierFlags(node, modifierMask = 131071 /* All */ ^ 1 /* Public */, modifierAdditions = 0 /* None */) { let flags = getEffectiveModifierFlags(node) & modifierMask | modifierAdditions; - if (flags & 1024 /* Default */ && !(flags & 1 /* Export */)) { - flags ^= 1 /* Export */; + if (flags & 2048 /* Default */ && !(flags & 32 /* Export */)) { + flags ^= 32 /* Export */; } - if (flags & 1024 /* Default */ && flags & 2 /* Ambient */) { - flags ^= 2 /* Ambient */; + if (flags & 2048 /* Default */ && flags & 128 /* Ambient */) { + flags ^= 128 /* Ambient */; } return flags; } @@ -111144,7 +111948,7 @@ ${lanes.join("\n")} switch (node.kind) { case 172 /* PropertyDeclaration */: case 171 /* PropertySignature */: - return !hasEffectiveModifier(node, 8 /* Private */); + return !hasEffectiveModifier(node, 2 /* Private */); case 169 /* Parameter */: case 260 /* VariableDeclaration */: return true; @@ -112048,6 +112852,7 @@ ${lanes.join("\n")} inlineSourceMap: compilerOptions.inlineSourceMap, extendedDiagnostics: compilerOptions.extendedDiagnostics, onlyPrintJsDocStyle: true, + omitBraceSourceMapPositions: true, writeBundleFileInfo: !!bundleBuildInfo, recordInternalSection: !!bundleBuildInfo, relativeToBuildInfo @@ -112410,6 +113215,7 @@ ${lanes.join("\n")} onAfterEmitToken } = handlers; var extendedDiagnostics = !!printerOptions.extendedDiagnostics; + var omitBraceSourcePositions = !!printerOptions.omitBraceSourceMapPositions; var newLine = getNewLineCharacter(printerOptions); var moduleKind = getEmitModuleKind(printerOptions); var bundledHelpers = /* @__PURE__ */ new Map(); @@ -113044,10 +113850,10 @@ ${lanes.join("\n")} return emitNamedExports(node); case 281 /* ExportSpecifier */: return emitExportSpecifier(node); - case 300 /* AssertClause */: - return emitAssertClause(node); - case 301 /* AssertEntry */: - return emitAssertEntry(node); + case 300 /* ImportAttributes */: + return emitImportAttributes(node); + case 301 /* ImportAttribute */: + return emitImportAttribute(node); case 282 /* MissingDeclaration */: return; case 283 /* ExternalModuleReference */: @@ -113429,14 +114235,8 @@ ${lanes.join("\n")} nonEscapingWrite(`}`); } function emitTabStop(hint, node, snippet) { - Debug.assert( - node.kind === 242 /* EmptyStatement */, - `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.` - ); - Debug.assert( - hint !== 5 /* EmbeddedStatement */, - `A tab stop cannot be attached to an embedded statement.` - ); + Debug.assert(node.kind === 242 /* EmptyStatement */, `A tab stop cannot be attached to a node of kind ${Debug.formatSyntaxKind(node.kind)}.`); + Debug.assert(hint !== 5 /* EmbeddedStatement */, `A tab stop cannot be attached to an embedded statement.`); nonEscapingWrite(`$${snippet.order}`); } function emitIdentifier(node) { @@ -113828,16 +114628,16 @@ ${lanes.join("\n")} writeKeyword("import"); writePunctuation("("); emit(node.argument); - if (node.assertions) { + if (node.attributes) { writePunctuation(","); writeSpace(); writePunctuation("{"); writeSpace(); - writeKeyword("assert"); + writeKeyword(node.attributes.token === 132 /* AssertKeyword */ ? "assert" : "with"); writePunctuation(":"); writeSpace(); - const elements = node.assertions.assertClause.elements; - emitList(node.assertions.assertClause, elements, 526226 /* ImportClauseEntries */); + const elements = node.attributes.elements; + emitList(node.attributes, elements, 526226 /* ImportAttributes */); writeSpace(); writePunctuation("}"); } @@ -113929,7 +114729,7 @@ ${lanes.join("\n")} /*jsxAttributeEscape*/ false ); - return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */)); + return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !text.includes(tokenToString(25 /* DotToken */)) && !text.includes(String.fromCharCode(69 /* E */)) && !text.includes(String.fromCharCode(101 /* e */)); } else if (isAccessExpression(expression)) { const constantValue = getConstantValue(expression); return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue; @@ -114411,7 +115211,11 @@ ${lanes.join("\n")} decreaseIndent(); } } - pos = writeTokenText(token, writer2, pos); + if (!omitBraceSourcePositions && (token === 19 /* OpenBraceToken */ || token === 20 /* CloseBraceToken */)) { + pos = writeToken(token, pos, writer2, contextNode); + } else { + pos = writeTokenText(token, writer2, pos); + } if (isSimilarNode && contextNode.end !== pos) { const isJsxExprContext = contextNode.kind === 294 /* JsxExpression */; emitTrailingCommentsOfPosition( @@ -114822,8 +115626,8 @@ ${lanes.join("\n")} writeSpace(); } emitExpression(node.moduleSpecifier); - if (node.assertClause) { - emitWithLeadingSpace(node.assertClause); + if (node.attributes) { + emitWithLeadingSpace(node.attributes); } writeTrailingSemicolon(); } @@ -114861,7 +115665,10 @@ ${lanes.join("\n")} emitTokenWithComment(90 /* DefaultKeyword */, nextPos, writeKeyword, node); } writeSpace(); - emitExpression(node.expression, node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(64 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault); + emitExpression( + node.expression, + node.isExportEquals ? parenthesizer.getParenthesizeRightSideOfBinaryForOperator(64 /* EqualsToken */) : parenthesizer.parenthesizeExpressionOfExportDefault + ); writeTrailingSemicolon(); } function emitExportDeclaration(node) { @@ -114889,18 +115696,18 @@ ${lanes.join("\n")} writeSpace(); emitExpression(node.moduleSpecifier); } - if (node.assertClause) { - emitWithLeadingSpace(node.assertClause); + if (node.attributes) { + emitWithLeadingSpace(node.attributes); } writeTrailingSemicolon(); } - function emitAssertClause(node) { - emitTokenWithComment(132 /* AssertKeyword */, node.pos, writeKeyword, node); + function emitImportAttributes(node) { + emitTokenWithComment(node.token, node.pos, writeKeyword, node); writeSpace(); const elements = node.elements; - emitList(node, elements, 526226 /* ImportClauseEntries */); + emitList(node, elements, 526226 /* ImportAttributes */); } - function emitAssertEntry(node) { + function emitImportAttribute(node) { emit(node.name); writePunctuation(":"); writeSpace(); @@ -115759,6 +116566,16 @@ ${lanes.join("\n")} increaseIndent(); shouldDecreaseIndentAfterEmit = true; } + if (shouldEmitInterveningComments && format & 60 /* DelimitersMask */ && !positionIsSynthesized(child.pos)) { + const commentRange = getCommentRange(child); + emitTrailingCommentsOfPosition( + commentRange.pos, + /*prefixSpace*/ + !!(format & 512 /* SpaceBetweenSiblings */), + /*forceNoNewline*/ + true + ); + } writeLine(separatingLineTerminatorCount); shouldEmitInterveningComments = false; } else if (previousSibling && format & 512 /* SpaceBetweenSiblings */) { @@ -117117,7 +117934,8 @@ ${lanes.join("\n")} getSymbolOfExternalModuleSpecifier: notImplemented, isBindingCapturedByNode: notImplemented, getDeclarationStatementsForSourceFile: notImplemented, - isImportRequiredByAugmentation: notImplemented + isImportRequiredByAugmentation: notImplemented, + tryFindAmbientModule: notImplemented }; createPrinterWithDefaults = /* @__PURE__ */ memoize(() => createPrinter({})); createPrinterWithRemoveComments = /* @__PURE__ */ memoize(() => createPrinter({ removeComments: true })); @@ -117453,7 +118271,8 @@ ${lanes.join("\n")} currentDirectory, useCaseSensitiveFileNames: useCaseSensitiveFileNames2, writeLog, - toPath: toPath3 + toPath: toPath3, + getScriptKind: getScriptKind2 }) { const newPath = removeIgnoredPath(fileOrDirectoryPath); if (!newPath) { @@ -117463,7 +118282,7 @@ ${lanes.join("\n")} fileOrDirectoryPath = newPath; if (fileOrDirectoryPath === watchedDirPath) return false; - if (hasExtension(fileOrDirectoryPath) && !isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) { + if (hasExtension(fileOrDirectoryPath) && !(isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions) || isSupportedScriptKind())) { writeLog(`Project: ${configFileName} Detected file add/remove of non supported extension: ${fileOrDirectory}`); return true; } @@ -117492,6 +118311,25 @@ ${lanes.join("\n")} function hasSourceFile(file) { return realProgram ? !!realProgram.getSourceFileByPath(file) : builderProgram ? builderProgram.getState().fileInfos.has(file) : !!find(program, (rootFile) => toPath3(rootFile) === file); } + function isSupportedScriptKind() { + if (!getScriptKind2) + return false; + const scriptKind = getScriptKind2(fileOrDirectory); + switch (scriptKind) { + case 3 /* TS */: + case 4 /* TSX */: + case 7 /* Deferred */: + case 5 /* External */: + return true; + case 1 /* JS */: + case 2 /* JSX */: + return getAllowJSCompilerOption(options); + case 6 /* JSON */: + return getResolveJsonModule(options); + case 0 /* Unknown */: + return false; + } + } } function isBuilderProgram(program) { return !!program.getState; @@ -117502,7 +118340,7 @@ ${lanes.join("\n")} } return program.isEmittedFile(file); } - function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo) { + function getWatchFactory(host, watchLogLevel, log, getDetailWatchInfo2) { setSysLog(watchLogLevel === 2 /* Verbose */ ? log : noop); const plainInvokeFactory = { watchFile: (file, callback, pollingInterval, options) => host.watchFile(file, callback, pollingInterval, options), @@ -117540,23 +118378,23 @@ ${lanes.join("\n")} return typeof host.useCaseSensitiveFileNames === "boolean" ? host.useCaseSensitiveFileNames : host.useCaseSensitiveFileNames(); } function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) { - log(`ExcludeWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)}`); + log(`ExcludeWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`); return { - close: () => log(`ExcludeWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)}`) + close: () => log(`ExcludeWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`) }; } function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) { - log(`FileWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)}`); + log(`FileWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`); const watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2); return { close: () => { - log(`FileWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)}`); + log(`FileWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`); watcher.close(); } }; } function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) { - const watchInfo = `DirectoryWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)}`; + const watchInfo = `DirectoryWatcher:: Added:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`; log(watchInfo); const start = timestamp(); const watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2); @@ -117564,7 +118402,7 @@ ${lanes.join("\n")} log(`Elapsed:: ${elapsed}ms ${watchInfo}`); return { close: () => { - const watchInfo2 = `DirectoryWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)}`; + const watchInfo2 = `DirectoryWatcher:: Close:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`; log(watchInfo2); const start2 = timestamp(); watcher.close(); @@ -117579,7 +118417,7 @@ ${lanes.join("\n")} void 0, file, (...args) => { - const triggerredInfo = `${key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"}:: Triggered with ${args[0]} ${args[1] !== void 0 ? args[1] : ""}:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)}`; + const triggerredInfo = `${key === "watchFile" ? "FileWatcher" : "DirectoryWatcher"}:: Triggered with ${args[0]} ${args[1] !== void 0 ? args[1] : ""}:: ${getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2)}`; log(triggerredInfo); const start = timestamp(); cb.call( @@ -117596,8 +118434,8 @@ ${lanes.join("\n")} detailInfo2 ); } - function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo2) { - return `WatchInfo: ${file} ${flags} ${JSON.stringify(options)} ${getDetailWatchInfo2 ? getDetailWatchInfo2(detailInfo1, detailInfo2) : detailInfo2 === void 0 ? detailInfo1 : `${detailInfo1} ${detailInfo2}`}`; + function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo3) { + return `WatchInfo: ${file} ${flags} ${JSON.stringify(options)} ${getDetailWatchInfo3 ? getDetailWatchInfo3(detailInfo1, detailInfo2) : detailInfo2 === void 0 ? detailInfo1 : `${detailInfo1} ${detailInfo2}`}`; } } function getFallbackOptions(options) { @@ -117609,17 +118447,17 @@ ${lanes.join("\n")} function closeFileWatcherOf(objWithWatcher) { objWithWatcher.watcher.close(); } - var ConfigFileProgramReloadLevel, WatchLogLevel; + var ProgramUpdateLevel, WatchLogLevel; var init_watchUtilities = __esm({ "src/compiler/watchUtilities.ts"() { "use strict"; init_ts2(); - ConfigFileProgramReloadLevel = /* @__PURE__ */ ((ConfigFileProgramReloadLevel2) => { - ConfigFileProgramReloadLevel2[ConfigFileProgramReloadLevel2["None"] = 0] = "None"; - ConfigFileProgramReloadLevel2[ConfigFileProgramReloadLevel2["Partial"] = 1] = "Partial"; - ConfigFileProgramReloadLevel2[ConfigFileProgramReloadLevel2["Full"] = 2] = "Full"; - return ConfigFileProgramReloadLevel2; - })(ConfigFileProgramReloadLevel || {}); + ProgramUpdateLevel = /* @__PURE__ */ ((ProgramUpdateLevel2) => { + ProgramUpdateLevel2[ProgramUpdateLevel2["Update"] = 0] = "Update"; + ProgramUpdateLevel2[ProgramUpdateLevel2["RootNamesAndUpdate"] = 1] = "RootNamesAndUpdate"; + ProgramUpdateLevel2[ProgramUpdateLevel2["Full"] = 2] = "Full"; + return ProgramUpdateLevel2; + })(ProgramUpdateLevel || {}); WatchLogLevel = /* @__PURE__ */ ((WatchLogLevel2) => { WatchLogLevel2[WatchLogLevel2["None"] = 0] = "None"; WatchLogLevel2[WatchLogLevel2["TriggerOnly"] = 1] = "TriggerOnly"; @@ -117902,7 +118740,7 @@ ${lanes.join("\n")} function formatColorAndReset(text, formatStyle) { return formatStyle + text + resetEscapeSequence; } - function formatCodeSpan(file, start, length2, indent2, squiggleColor, host) { + function formatCodeSpan(file, start, length2, indent3, squiggleColor, host) { const { line: firstLine, character: firstLineChar } = getLineAndCharacterOfPosition(file, start); const { line: lastLine, character: lastLineChar } = getLineAndCharacterOfPosition(file, start + length2); const lastLineInFile = getLineAndCharacterOfPosition(file, file.text.length).line; @@ -117915,17 +118753,17 @@ ${lanes.join("\n")} for (let i = firstLine; i <= lastLine; i++) { context += host.getNewLine(); if (hasMoreThanFiveLines && firstLine + 1 < i && i < lastLine - 1) { - context += indent2 + formatColorAndReset(padLeft(ellipsis, gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); + context += indent3 + formatColorAndReset(ellipsis.padStart(gutterWidth), gutterStyleSequence) + gutterSeparator + host.getNewLine(); i = lastLine - 1; } const lineStart = getPositionOfLineAndCharacter(file, i, 0); const lineEnd = i < lastLineInFile ? getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length; let lineContent = file.text.slice(lineStart, lineEnd); - lineContent = trimStringEnd(lineContent); + lineContent = lineContent.trimEnd(); lineContent = lineContent.replace(/\t/g, " "); - context += indent2 + formatColorAndReset(padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent3 + formatColorAndReset((i + 1 + "").padStart(gutterWidth), gutterStyleSequence) + gutterSeparator; context += lineContent + host.getNewLine(); - context += indent2 + formatColorAndReset(padLeft("", gutterWidth), gutterStyleSequence) + gutterSeparator; + context += indent3 + formatColorAndReset("".padStart(gutterWidth), gutterStyleSequence) + gutterSeparator; context += squiggleColor; if (i === firstLine) { const lastCharForLine = i === lastLine ? lastLineChar : void 0; @@ -117982,24 +118820,24 @@ ${lanes.join("\n")} } return output; } - function flattenDiagnosticMessageText(diag2, newLine, indent2 = 0) { + function flattenDiagnosticMessageText(diag2, newLine, indent3 = 0) { if (isString(diag2)) { return diag2; } else if (diag2 === void 0) { return ""; } let result = ""; - if (indent2) { + if (indent3) { result += newLine; - for (let i = 0; i < indent2; i++) { + for (let i = 0; i < indent3; i++) { result += " "; } } result += diag2.messageText; - indent2++; + indent3++; if (diag2.next) { for (const kid of diag2.next) { - result += flattenDiagnosticMessageText(kid, newLine, indent2); + result += flattenDiagnosticMessageText(kid, newLine, indent3); } } return result; @@ -118008,8 +118846,6 @@ ${lanes.join("\n")} return (isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode; } function getModeForResolutionAtIndex(file, index) { - if (file.impliedNodeFormat === void 0) - return void 0; return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index)); } function isExclusivelyTypeOnlyImportOrExport(decl) { @@ -118023,42 +118859,48 @@ ${lanes.join("\n")} return false; } function getModeForUsageLocation(file, usage) { - var _a, _b; - if (file.impliedNodeFormat === void 0) - return void 0; + var _a; if (isImportDeclaration(usage.parent) || isExportDeclaration(usage.parent)) { const isTypeOnly = isExclusivelyTypeOnlyImportOrExport(usage.parent); if (isTypeOnly) { - const override = getResolutionModeOverrideForClause(usage.parent.assertClause); + const override = getResolutionModeOverride(usage.parent.attributes); if (override) { return override; } } } if (usage.parent.parent && isImportTypeNode(usage.parent.parent)) { - const override = getResolutionModeOverrideForClause((_a = usage.parent.parent.assertions) == null ? void 0 : _a.assertClause); + const override = getResolutionModeOverride(usage.parent.parent.attributes); if (override) { return override; } } + if (file.impliedNodeFormat === void 0) + return void 0; if (file.impliedNodeFormat !== 99 /* ESNext */) { return isImportCall(walkUpParenthesizedExpressions(usage.parent)) ? 99 /* ESNext */ : 1 /* CommonJS */; } - const exprParentParent = (_b = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _b.parent; + const exprParentParent = (_a = walkUpParenthesizedExpressions(usage.parent)) == null ? void 0 : _a.parent; return exprParentParent && isImportEqualsDeclaration(exprParentParent) ? 1 /* CommonJS */ : 99 /* ESNext */; } - function getResolutionModeOverrideForClause(clause, grammarErrorOnNode) { - if (!clause) + function getResolutionModeOverride(node, grammarErrorOnNode) { + if (!node) return void 0; - if (length(clause.elements) !== 1) { - grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(clause, Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require); + if (length(node.elements) !== 1) { + grammarErrorOnNode == null ? void 0 : grammarErrorOnNode( + node, + node.token === 118 /* WithKeyword */ ? Diagnostics.Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require : Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require + ); return void 0; } - const elem = clause.elements[0]; + const elem = node.elements[0]; if (!isStringLiteralLike(elem.name)) return void 0; if (elem.name.text !== "resolution-mode") { - grammarErrorOnNode == null ? void 0 : grammarErrorOnNode(elem.name, Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions); + grammarErrorOnNode == null ? void 0 : grammarErrorOnNode( + elem.name, + node.token === 118 /* WithKeyword */ ? Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_attributes : Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions + ); return void 0; } if (!isStringLiteralLike(elem.value)) @@ -118188,15 +119030,15 @@ ${lanes.join("\n")} function isReferenceFileLocation(location) { return location.pos !== void 0; } - function getReferencedFileLocation(getSourceFileByPath, ref) { - var _a, _b, _c, _d, _e, _f; - const file = Debug.checkDefined(getSourceFileByPath(ref.file)); + function getReferencedFileLocation(program, ref) { + var _a, _b, _c, _d; + const file = Debug.checkDefined(program.getSourceFileByPath(ref.file)); const { kind, index } = ref; let pos, end, packageId, resolutionMode; switch (kind) { case 3 /* Import */: const importLiteral = getModuleNameStringLiteralAt(file, index); - packageId = (_c = (_b = (_a = file.resolvedModules) == null ? void 0 : _a.get(importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.packageId; + packageId = (_b = (_a = program.getResolvedModule(file, importLiteral.text, getModeForResolutionAtIndex(file, index))) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.packageId; if (importLiteral.pos === -1) return { file, packageId, text: importLiteral.text }; pos = skipTrivia(file.text, importLiteral.pos); @@ -118207,7 +119049,7 @@ ${lanes.join("\n")} break; case 5 /* TypeReferenceDirective */: ({ pos, end, resolutionMode } = file.typeReferenceDirectives[index]); - packageId = (_f = (_e = (_d = file.resolvedTypeReferenceDirectiveNames) == null ? void 0 : _d.get(toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _e.resolvedTypeReferenceDirective) == null ? void 0 : _f.packageId; + packageId = (_d = (_c = program.getResolvedTypeReferenceDirective(file, toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), resolutionMode || file.impliedNodeFormat)) == null ? void 0 : _c.resolvedTypeReferenceDirective) == null ? void 0 : _d.packageId; break; case 7 /* LibReferenceDirective */: ({ pos, end } = file.libReferenceDirectives[index]); @@ -118328,6 +119170,10 @@ ${lanes.join("\n")} let automaticTypeDirectiveResolutions; let resolvedLibReferences; let resolvedLibProcessing; + let resolvedModules; + let resolvedModulesProcessing; + let resolvedTypeReferenceDirectiveNames; + let resolvedTypeReferenceDirectiveNamesProcessing; let packageMap; const maxNodeModuleJsDepth = typeof options.maxNodeModuleJsDepth === "number" ? options.maxNodeModuleJsDepth : 0; let currentNodeModulesDepth = 0; @@ -118403,7 +119249,8 @@ ${lanes.join("\n")} getCanonicalFileName, /*options*/ void 0, - moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache() + moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(), + moduleResolutionCache == null ? void 0 : moduleResolutionCache.optionsToRedirectsKey ); actualResolveTypeReferenceDirectiveNamesWorker = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( typeDirectiveNames, @@ -118591,6 +119438,8 @@ ${lanes.join("\n")} } oldProgram = void 0; resolvedLibProcessing = void 0; + resolvedModulesProcessing = void 0; + resolvedTypeReferenceDirectiveNamesProcessing = void 0; const program = { getRootFileNames: () => rootNames, getSourceFile, @@ -118632,7 +119481,13 @@ ${lanes.join("\n")} sourceFileToPackageName, redirectTargetsMap, usesUriStyleNodeCoreModules, + resolvedModules, + resolvedTypeReferenceDirectiveNames, resolvedLibReferences, + getResolvedModule, + getResolvedTypeReferenceDirective, + forEachResolvedModule, + forEachResolvedTypeReferenceDirective, getCurrentPackagesMap: () => packageMap, typesPackageExists, packageBundlesTypes, @@ -118663,7 +119518,7 @@ ${lanes.join("\n")} case 1 /* FilePreprocessingFileExplainingDiagnostic */: return programDiagnostics.add(createDiagnosticExplainingFile(diagnostic.file && getSourceFileByPath(diagnostic.file), diagnostic.fileProcessingReason, diagnostic.diagnostic, diagnostic.args || emptyArray)); case 0 /* FilePreprocessingReferencedDiagnostic */: - const { file, pos, end } = getReferencedFileLocation(getSourceFileByPath, diagnostic.reason); + const { file, pos, end } = getReferencedFileLocation(program, diagnostic.reason); return programDiagnostics.add(createFileDiagnostic(file, Debug.checkDefined(pos), Debug.checkDefined(end) - pos, diagnostic.diagnostic, ...diagnostic.args || emptyArray)); case 2 /* ResolutionDiagnostics */: return diagnostic.diagnostics.forEach((d) => programDiagnostics.add(d)); @@ -118676,17 +119531,34 @@ ${lanes.join("\n")} measure("Program", "beforeProgram", "afterProgram"); (_p = tracing) == null ? void 0 : _p.pop(); return program; + function getResolvedModule(file, moduleName, mode) { + var _a2; + return (_a2 = resolvedModules == null ? void 0 : resolvedModules.get(file.path)) == null ? void 0 : _a2.get(moduleName, mode); + } + function getResolvedTypeReferenceDirective(file, typeDirectiveName, mode) { + var _a2; + return (_a2 = resolvedTypeReferenceDirectiveNames == null ? void 0 : resolvedTypeReferenceDirectiveNames.get(file.path)) == null ? void 0 : _a2.get(typeDirectiveName, mode); + } + function forEachResolvedModule(callback, file) { + forEachResolution(resolvedModules, callback, file); + } + function forEachResolvedTypeReferenceDirective(callback, file) { + forEachResolution(resolvedTypeReferenceDirectiveNames, callback, file); + } + function forEachResolution(resolutionCache, callback, file) { + var _a2; + if (file) + (_a2 = resolutionCache == null ? void 0 : resolutionCache.get(file.path)) == null ? void 0 : _a2.forEach((resolution, name, mode) => callback(resolution, name, mode, file.path)); + else + resolutionCache == null ? void 0 : resolutionCache.forEach((resolutions, filePath) => resolutions.forEach((resolution, name, mode) => callback(resolution, name, mode, filePath))); + } function getPackagesMap() { if (packageMap) return packageMap; packageMap = /* @__PURE__ */ new Map(); - files.forEach((sf) => { - if (!sf.resolvedModules) - return; - sf.resolvedModules.forEach(({ resolvedModule }) => { - if (resolvedModule == null ? void 0 : resolvedModule.packageId) - packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name)); - }); + forEachResolvedModule(({ resolvedModule }) => { + if (resolvedModule == null ? void 0 : resolvedModule.packageId) + packageMap.set(resolvedModule.packageId.name, resolvedModule.extension === ".d.ts" /* Dts */ || !!packageMap.get(resolvedModule.packageId.name)); }); return packageMap; } @@ -118753,7 +119625,7 @@ ${lanes.join("\n")} const resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path); if (resultFromDts) return resultFromDts; - if (!host.realpath || !options.preserveSymlinks || !stringContains(file.originalFileName, nodeModulesPathPart)) + if (!host.realpath || !options.preserveSymlinks || !file.originalFileName.includes(nodeModulesPathPart)) return void 0; const realDeclarationPath = toPath3(host.realpath(file.originalFileName)); return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath); @@ -118819,7 +119691,6 @@ ${lanes.join("\n")} return classifiableNames; } function resolveModuleNamesReusingOldState(moduleNames, file) { - var _a2; if (structureIsReused === 0 /* Not */ && !file.ambientModuleNames.length) { return resolveModuleNamesWorker( moduleNames, @@ -118828,24 +119699,16 @@ ${lanes.join("\n")} void 0 ); } - const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName); - if (oldSourceFile !== file && file.resolvedModules) { - const result2 = []; - for (const moduleName of moduleNames) { - const resolvedModule = file.resolvedModules.get(moduleName.text, getModeForUsageLocation(file, moduleName)); - result2.push(resolvedModule); - } - return result2; - } let unknownModuleNames; let result; let reusedNames; const predictedToResolveToAmbientModuleMarker = emptyResolution; + const oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName); for (let i = 0; i < moduleNames.length; i++) { const moduleName = moduleNames[i]; - if (file === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path)) { + if (file === oldSourceFile && !hasInvalidatedResolutions(file.path)) { const mode = getModeForUsageLocation(file, moduleName); - const oldResolution = (_a2 = oldSourceFile.resolvedModules) == null ? void 0 : _a2.get(moduleName.text, mode); + const oldResolution = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, mode); if (oldResolution == null ? void 0 : oldResolution.resolvedModule) { if (isTraceEnabled(options, host)) { trace( @@ -118892,7 +119755,8 @@ ${lanes.join("\n")} Debug.assert(j === resolutions.length); return result; function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) { - const resolutionToFile = getResolvedModule(oldSourceFile, moduleName.text, getModeForUsageLocation(file, moduleName)); + var _a2; + const resolutionToFile = (_a2 = oldProgram == null ? void 0 : oldProgram.getResolvedModule(file, moduleName.text, getModeForUsageLocation(file, moduleName))) == null ? void 0 : _a2.resolvedModule; const resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName); if (resolutionToFile && resolvedFile) { return false; @@ -118917,28 +119781,18 @@ ${lanes.join("\n")} void 0 ); } - const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0; - if (!isString(containingFile)) { - if (oldSourceFile !== containingFile && containingFile.resolvedTypeReferenceDirectiveNames) { - const result2 = []; - for (const typeDirectiveName of typeDirectiveNames) { - const resolvedTypeReferenceDirective = containingFile.resolvedTypeReferenceDirectiveNames.get(getTypeReferenceResolutionName(typeDirectiveName), getModeForFileReference(typeDirectiveName, containingFile.impliedNodeFormat)); - result2.push(resolvedTypeReferenceDirective); - } - return result2; - } - } let unknownTypeReferenceDirectiveNames; let result; let reusedNames; const containingSourceFile = !isString(containingFile) ? containingFile : void 0; - const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(oldSourceFile.path) : !hasInvalidatedResolutions(toPath3(containingFile)); + const oldSourceFile = !isString(containingFile) ? oldProgram && oldProgram.getSourceFile(containingFile.fileName) : void 0; + const canReuseResolutions = !isString(containingFile) ? containingFile === oldSourceFile && !hasInvalidatedResolutions(containingFile.path) : !hasInvalidatedResolutions(toPath3(containingFile)); for (let i = 0; i < typeDirectiveNames.length; i++) { const entry = typeDirectiveNames[i]; if (canReuseResolutions) { const typeDirectiveName = getTypeReferenceResolutionName(entry); const mode = getModeForFileReference(entry, containingSourceFile == null ? void 0 : containingSourceFile.impliedNodeFormat); - const oldResolution = (_a2 = !isString(containingFile) ? oldSourceFile == null ? void 0 : oldSourceFile.resolvedTypeReferenceDirectiveNames : oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(typeDirectiveName, mode); + const oldResolution = !isString(containingFile) ? oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(containingFile, typeDirectiveName, mode) : (_a2 = oldProgram == null ? void 0 : oldProgram.getAutomaticTypeDirectiveResolutions()) == null ? void 0 : _a2.get(typeDirectiveName, mode); if (oldResolution == null ? void 0 : oldResolution.resolvedTypeReferenceDirective) { if (isTraceEnabled(options, host)) { trace( @@ -119100,43 +119954,47 @@ ${lanes.join("\n")} structureIsReused = 1 /* SafeModules */; } } - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); + modifiedSourceFiles.push(newSourceFile); } else if (hasInvalidatedResolutions(oldSourceFile.path)) { structureIsReused = 1 /* SafeModules */; - modifiedSourceFiles.push({ oldFile: oldSourceFile, newFile: newSourceFile }); + modifiedSourceFiles.push(newSourceFile); + } else { + for (const moduleName of oldSourceFile.ambientModuleNames) { + ambientModuleNameToUnmodifiedFileName.set(moduleName, oldSourceFile.fileName); + } } newSourceFiles.push(newSourceFile); } if (structureIsReused !== 2 /* Completely */) { return structureIsReused; } - const modifiedFiles = modifiedSourceFiles.map((f) => f.oldFile); - for (const oldFile of oldSourceFiles) { - if (!contains(modifiedFiles, oldFile)) { - for (const moduleName of oldFile.ambientModuleNames) { - ambientModuleNameToUnmodifiedFileName.set(moduleName, oldFile.fileName); - } - } - } - for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) { + for (const newSourceFile of modifiedSourceFiles) { const moduleNames = getModuleNames(newSourceFile); const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile); - const resolutionsChanged = hasChangesInResolutions(moduleNames, newSourceFile, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo, moduleResolutionNameAndModeGetter); - if (resolutionsChanged) { + (resolvedModulesProcessing ?? (resolvedModulesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, resolutions); + const resolutionsChanged = hasChangesInResolutions( + moduleNames, + newSourceFile, + resolutions, + (name, mode) => oldProgram.getResolvedModule(newSourceFile, name, mode), + moduleResolutionIsEqualTo, + moduleResolutionNameAndModeGetter + ); + if (resolutionsChanged) structureIsReused = 1 /* SafeModules */; - newSourceFile.resolvedModules = zipToModeAwareCache(newSourceFile, moduleNames, resolutions, moduleResolutionNameAndModeGetter); - } else { - newSourceFile.resolvedModules = oldSourceFile.resolvedModules; - } const typesReferenceDirectives = newSourceFile.typeReferenceDirectives; const typeReferenceResolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typesReferenceDirectives, newSourceFile); - const typeReferenceResolutionsChanged = hasChangesInResolutions(typesReferenceDirectives, newSourceFile, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, typeDirectiveIsEqualTo, typeReferenceResolutionNameAndModeGetter); - if (typeReferenceResolutionsChanged) { + (resolvedTypeReferenceDirectiveNamesProcessing ?? (resolvedTypeReferenceDirectiveNamesProcessing = /* @__PURE__ */ new Map())).set(newSourceFile.path, typeReferenceResolutions); + const typeReferenceResolutionsChanged = hasChangesInResolutions( + typesReferenceDirectives, + newSourceFile, + typeReferenceResolutions, + (name, mode) => oldProgram == null ? void 0 : oldProgram.getResolvedTypeReferenceDirective(newSourceFile, name, mode), + typeDirectiveIsEqualTo, + typeReferenceResolutionNameAndModeGetter + ); + if (typeReferenceResolutionsChanged) structureIsReused = 1 /* SafeModules */; - newSourceFile.resolvedTypeReferenceDirectiveNames = zipToModeAwareCache(newSourceFile, typesReferenceDirectives, typeReferenceResolutions, typeReferenceResolutionNameAndModeGetter); - } else { - newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames; - } } if (structureIsReused !== 2 /* Completely */) { return structureIsReused; @@ -119183,6 +120041,8 @@ ${lanes.join("\n")} sourceFileToPackageName = oldProgram.sourceFileToPackageName; redirectTargetsMap = oldProgram.redirectTargetsMap; usesUriStyleNodeCoreModules = oldProgram.usesUriStyleNodeCoreModules; + resolvedModules = oldProgram.resolvedModules; + resolvedTypeReferenceDirectiveNames = oldProgram.resolvedTypeReferenceDirectiveNames; resolvedLibReferences = oldProgram.resolvedLibReferences; packageMap = oldProgram.getCurrentPackagesMap(); return 2 /* Completely */; @@ -119763,7 +120623,7 @@ ${lanes.join("\n")} /*importClause*/ void 0, externalHelpersModuleReference, - /*assertClause*/ + /*attributes*/ void 0 ); addInternalEmitFlags(importDecl, 2 /* NeverApplyImportHelper */); @@ -119821,7 +120681,7 @@ ${lanes.join("\n")} } } } else if (isModuleDeclaration(node)) { - if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 2 /* Ambient */) || file.isDeclarationFile)) { + if (isAmbientModule(node) && (inAmbientModule || hasSyntacticModifier(node, 128 /* Ambient */) || file.isDeclarationFile)) { node.name.parent = node; const nameText = getTextOfIdentifierOrLiteral(node.name); if (isExternalModuleFile || inAmbientModule && !isExternalModuleNameRelative(nameText)) { @@ -120004,14 +120864,14 @@ ${lanes.join("\n")} const result = getImpliedNodeFormatForFileWorker(getNormalizedAbsolutePath(fileName, currentDirectory), moduleResolutionCache2 == null ? void 0 : moduleResolutionCache2.getPackageJsonInfoCache(), host2, options2); const languageVersion = getEmitScriptTarget(options2); const setExternalModuleIndicator2 = getSetExternalModuleIndicator(options2); - return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2 } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2 }; + return typeof result === "object" ? { ...result, languageVersion, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode } : { languageVersion, impliedNodeFormat: result, setExternalModuleIndicator: setExternalModuleIndicator2, jsDocParsingMode: host2.jsDocParsingMode }; } function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) { var _a2; const path = toPath3(fileName); if (useSourceOfProjectReferenceRedirect) { let source = getSourceOfProjectReferenceRedirect(path); - if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && stringContains(fileName, nodeModulesPathPart)) { + if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) { const realPath2 = toPath3(host.realpath(fileName)); if (realPath2 !== path) source = getSourceOfProjectReferenceRedirect(realPath2); @@ -120228,25 +121088,17 @@ ${lanes.join("\n")} } function processTypeReferenceDirectives(file) { const typeDirectives = file.typeReferenceDirectives; - if (!typeDirectives.length) { - file.resolvedTypeReferenceDirectiveNames = void 0; + if (!typeDirectives.length) return; - } - const resolutions = resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file); + const resolutions = (resolvedTypeReferenceDirectiveNamesProcessing == null ? void 0 : resolvedTypeReferenceDirectiveNamesProcessing.get(file.path)) || resolveTypeReferenceDirectiveNamesReusingOldState(typeDirectives, file); + const resolutionsInFile = createModeAwareCache(); + (resolvedTypeReferenceDirectiveNames ?? (resolvedTypeReferenceDirectiveNames = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile); for (let index = 0; index < typeDirectives.length; index++) { const ref = file.typeReferenceDirectives[index]; const resolvedTypeReferenceDirective = resolutions[index]; const fileName = toFileNameLowerCase(ref.fileName); - setResolvedTypeReferenceDirective(file, fileName, resolvedTypeReferenceDirective, getModeForFileReference(ref, file.impliedNodeFormat)); + resolutionsInFile.set(fileName, getModeForFileReference(ref, file.impliedNodeFormat), resolvedTypeReferenceDirective); const mode = ref.resolutionMode || file.impliedNodeFormat; - if (mode && getEmitModuleResolutionKind(options) !== 3 /* Node16 */ && getEmitModuleResolutionKind(options) !== 99 /* NodeNext */) { - (fileProcessingDiagnostics ?? (fileProcessingDiagnostics = [])).push({ - kind: 2 /* ResolutionDiagnostics */, - diagnostics: [ - createDiagnosticForRange(file, ref, Diagnostics.resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext) - ] - }); - } processTypeReferenceDirective(fileName, mode, resolvedTypeReferenceDirective, { kind: 5 /* TypeReferenceDirective */, file: file.path, index }); } } @@ -120401,14 +121253,16 @@ ${lanes.join("\n")} collectExternalModuleReferences(file); if (file.imports.length || file.moduleAugmentations.length) { const moduleNames = getModuleNames(file); - const resolutions = resolveModuleNamesReusingOldState(moduleNames, file); + const resolutions = (resolvedModulesProcessing == null ? void 0 : resolvedModulesProcessing.get(file.path)) || resolveModuleNamesReusingOldState(moduleNames, file); Debug.assert(resolutions.length === moduleNames.length); const optionsForFile = (useSourceOfProjectReferenceRedirect ? (_a2 = getRedirectReferenceForResolution(file)) == null ? void 0 : _a2.commandLine.options : void 0) || options; + const resolutionsInFile = createModeAwareCache(); + (resolvedModules ?? (resolvedModules = /* @__PURE__ */ new Map())).set(file.path, resolutionsInFile); for (let index = 0; index < moduleNames.length; index++) { const resolution = resolutions[index].resolvedModule; const moduleName = moduleNames[index].text; const mode = getModeForUsageLocation(file, moduleNames[index]); - setResolvedModule(file, moduleName, resolutions[index], mode); + resolutionsInFile.set(moduleName, mode, resolutions[index]); addResolutionDiagnosticsFromResolutionOrCache(file, moduleName, resolutions[index], mode); if (!resolution) { continue; @@ -120439,8 +121293,6 @@ ${lanes.join("\n")} currentNodeModulesDepth--; } } - } else { - file.resolvedModules = void 0; } } function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { @@ -120955,7 +121807,7 @@ ${lanes.join("\n")} processReason(fileProcessingReason); if (locationReason && (fileIncludeReasons == null ? void 0 : fileIncludeReasons.length) === 1) fileIncludeReasons = void 0; - const location = locationReason && getReferencedFileLocation(getSourceFileByPath, locationReason); + const location = locationReason && getReferencedFileLocation(program, locationReason); const fileIncludeReasonDetails = fileIncludeReasons && chainDiagnosticMessages(fileIncludeReasons, Diagnostics.The_file_is_in_the_program_because_Colon); const redirectInfo = file && explainIfFileIsRedirectAndImpliedFormat(file); const chain = chainDiagnosticMessages(redirectInfo ? fileIncludeReasonDetails ? [fileIncludeReasonDetails, ...redirectInfo] : redirectInfo : fileIncludeReasonDetails, diagnostic, ...args || emptyArray); @@ -120991,7 +121843,7 @@ ${lanes.join("\n")} } function fileIncludeReasonToRelatedInformation(reason) { if (isReferencedFile(reason)) { - const referenceLocation = getReferencedFileLocation(getSourceFileByPath, reason); + const referenceLocation = getReferencedFileLocation(program, reason); let message2; switch (reason.kind) { case 3 /* Import */: @@ -121040,19 +121892,11 @@ ${lanes.join("\n")} case 1 /* SourceFromProjectReference */: case 2 /* OutputFromProjectReference */: const referencedResolvedRef = Debug.checkDefined(resolvedProjectReferences == null ? void 0 : resolvedProjectReferences[reason.index]); - const referenceInfo = forEachProjectReference( - projectReferences, - resolvedProjectReferences, - (resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent2 == null ? void 0 : parent2.sourceFile) || options.configFile, index: index2 } : void 0 - ); + const referenceInfo = forEachProjectReference(projectReferences, resolvedProjectReferences, (resolvedRef, parent2, index2) => resolvedRef === referencedResolvedRef ? { sourceFile: (parent2 == null ? void 0 : parent2.sourceFile) || options.configFile, index: index2 } : void 0); if (!referenceInfo) return void 0; const { sourceFile, index } = referenceInfo; - const referencesSyntax = forEachTsConfigPropArray( - sourceFile, - "references", - (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 - ); + const referencesSyntax = forEachTsConfigPropArray(sourceFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0); return referencesSyntax && referencesSyntax.elements.length > index ? createDiagnosticForNodeInSourceFile( sourceFile, referencesSyntax.elements[index], @@ -121192,11 +122036,7 @@ ${lanes.join("\n")} ); } function createDiagnosticForReference(sourceFile, index, message, ...args) { - const referencesSyntax = forEachTsConfigPropArray( - sourceFile || options.configFile, - "references", - (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0 - ); + const referencesSyntax = forEachTsConfigPropArray(sourceFile || options.configFile, "references", (property) => isArrayLiteralExpression(property.initializer) ? property.initializer : void 0); if (referencesSyntax && referencesSyntax.elements.length > index) { programDiagnostics.add(createDiagnosticForNodeInSourceFile(sourceFile || options.configFile, referencesSyntax.elements[index], message, ...args)); } else { @@ -121292,8 +122132,8 @@ ${lanes.join("\n")} if (!symlinks) { symlinks = createSymlinkCache(currentDirectory, getCanonicalFileName); } - if (files && automaticTypeDirectiveResolutions && !symlinks.hasProcessedResolutions()) { - symlinks.setSymlinksFromResolutions(files, automaticTypeDirectiveResolutions); + if (files && !symlinks.hasProcessedResolutions()) { + symlinks.setSymlinksFromResolutions(forEachResolvedModule, forEachResolvedTypeReferenceDirective, automaticTypeDirectiveResolutions); } return symlinks; } @@ -121383,7 +122223,7 @@ ${lanes.join("\n")} var _a; if (!host.getResolvedProjectReferences() || containsIgnoredPath(directory)) return; - if (!originalRealpath || !stringContains(directory, nodeModulesPathPart)) + if (!originalRealpath || !directory.includes(nodeModulesPathPart)) return; const symlinkCache = host.getSymlinkCache(); const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory)); @@ -121411,7 +122251,7 @@ ${lanes.join("\n")} if (!symlinkedDirectories) return false; const fileOrDirectoryPath = host.toPath(fileOrDirectory); - if (!stringContains(fileOrDirectoryPath, nodeModulesPathPart)) + if (!fileOrDirectoryPath.includes(nodeModulesPathPart)) return false; if (isFile && ((_a = symlinkCache.getSymlinkedFiles()) == null ? void 0 : _a.has(fileOrDirectoryPath))) return true; @@ -121654,7 +122494,7 @@ ${lanes.join("\n")} Diagnostics.Classes_may_not_have_a_field_named_constructor.code, 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, Diagnostics.Duplicate_label_0.code, - Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, + Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, @@ -121813,16 +122653,14 @@ ${lanes.join("\n")} addReferencedFile(referencedPath); } } - if (sourceFile.resolvedTypeReferenceDirectiveNames) { - sourceFile.resolvedTypeReferenceDirectiveNames.forEach(({ resolvedTypeReferenceDirective }) => { - if (!resolvedTypeReferenceDirective) { - return; - } - const fileName = resolvedTypeReferenceDirective.resolvedFileName; - const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName); - addReferencedFile(typeFilePath); - }); - } + program.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective }) => { + if (!resolvedTypeReferenceDirective) { + return; + } + const fileName = resolvedTypeReferenceDirective.resolvedFileName; + const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName); + addReferencedFile(typeFilePath); + }, sourceFile); if (sourceFile.moduleAugmentations.length) { const checker = program.getTypeChecker(); for (const moduleName of sourceFile.moduleAugmentations) { @@ -121941,13 +122779,16 @@ ${lanes.join("\n")} sourceFile, (fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => { Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`); - onNewSignature(computeSignatureWithDiagnostics( - programOfThisState, - sourceFile, - text, - host, - data - ), sourceFiles); + onNewSignature( + computeSignatureWithDiagnostics( + programOfThisState, + sourceFile, + text, + host, + data + ), + sourceFiles + ); }, cancellationToken, /*emitOnly*/ @@ -122461,10 +123302,7 @@ ${lanes.join("\n")} state.cleanedDiagnosticsOfLibFiles = true; const program = Debug.checkDefined(state.program); const options = program.getCompilerOptions(); - forEach( - program.getSourceFiles(), - (f) => program.isSourceFileDefaultLibrary(f) && !skipTypeChecking(f, options, program) && removeSemanticDiagnosticsOf(state, f.resolvedPath) - ); + forEach(program.getSourceFiles(), (f) => program.isSourceFileDefaultLibrary(f) && !skipTypeChecking(f, options, program) && removeSemanticDiagnosticsOf(state, f.resolvedPath)); } } function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, host) { @@ -122532,12 +123370,14 @@ ${lanes.join("\n")} state.program, /*firstSourceFile*/ void 0 - ).forEach((file) => handleDtsMayChangeOf( - state, - file.resolvedPath, - cancellationToken, - host - )); + ).forEach( + (file) => handleDtsMayChangeOf( + state, + file.resolvedPath, + cancellationToken, + host + ) + ); removeDiagnosticsOfLibraryFiles(state); return true; } @@ -122570,16 +123410,13 @@ ${lanes.join("\n")} if (handleDtsMayChangeOfGlobalScope(state, exportedFromPath, cancellationToken, host)) return true; const references = state.referencedMap.getKeys(exportedFromPath); - return references && forEachKey( - references, - (filePath) => handleDtsMayChangeOfFileAndExportsOfFile( - state, - filePath, - seenFileAndExportsOfFile, - cancellationToken, - host - ) - ); + return references && forEachKey(references, (filePath) => handleDtsMayChangeOfFileAndExportsOfFile( + state, + filePath, + seenFileAndExportsOfFile, + cancellationToken, + host + )); }); } function handleDtsMayChangeOfFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, cancellationToken, host) { @@ -122687,11 +123524,13 @@ ${lanes.join("\n")} if (!isJsonSourceFile(file) && sourceFileMayBeEmitted(file, state.program)) { const emitSignature = (_b2 = state.emitSignatures) == null ? void 0 : _b2.get(key); if (emitSignature !== actualSignature) { - (emitSignatures || (emitSignatures = [])).push(emitSignature === void 0 ? fileId : ( - // There is no emit, encode as false - // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature - [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature] - )); + (emitSignatures || (emitSignatures = [])).push( + emitSignature === void 0 ? fileId : ( + // There is no emit, encode as false + // fileId, signature: emptyArray if signature only differs in dtsMap option than our own compilerOptions otherwise EmitSignature + [fileId, !isString(emitSignature) && emitSignature[0] === actualSignature ? emptyArray : emitSignature] + ) + ); } } } @@ -122945,9 +123784,7 @@ ${lanes.join("\n")} text = getTextHandlingSourceMapForSignature(text, data); let sourceFileDirectory; if ((_a = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a.length) { - text += data.diagnostics.map( - (diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}` - ).join("\n"); + text += data.diagnostics.map((diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}`).join("\n"); } return (host.createHash ?? generateDjb2Hash)(text); function flattenDiagnosticMessageText2(diagnostic) { @@ -123354,9 +124191,7 @@ ${lanes.join("\n")} return void 0; } const map2 = BuilderState.createManyToManyPathMap(); - referenceMap.forEach( - ([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId)) - ); + referenceMap.forEach(([fileId, fileIdListId]) => map2.set(toFilePath(fileId), toFilePathsSet(fileIdListId))); return map2; } } @@ -123462,24 +124297,27 @@ ${lanes.join("\n")} if (endsWith(path, "/node_modules/.staging")) { return removeSuffix(path, "/.staging"); } - return some(ignoredPaths, (searchPath) => stringContains(path, searchPath)) ? void 0 : path; + return some(ignoredPaths, (searchPath) => path.includes(searchPath)) ? void 0 : path; } function perceivedOsRootLengthForWatching(pathComponents2, length2) { if (length2 <= 1) return 1; - let userCheckIndex = 1; + let indexAfterOsRoot = 1; let isDosStyle = pathComponents2[0].search(/[a-zA-Z]:/) === 0; if (pathComponents2[0] !== directorySeparator && !isDosStyle && // Non dos style paths pathComponents2[1].search(/[a-zA-Z]\$$/) === 0) { if (length2 === 2) return 2; - userCheckIndex = 2; + indexAfterOsRoot = 2; isDosStyle = true; } - if (isDosStyle && !pathComponents2[userCheckIndex].match(/^users$/i)) { - return userCheckIndex; + if (isDosStyle && !pathComponents2[indexAfterOsRoot].match(/^users$/i)) { + return indexAfterOsRoot; } - return userCheckIndex + 2; + if (pathComponents2[indexAfterOsRoot].match(/^workspaces$/i)) { + return indexAfterOsRoot + 1; + } + return indexAfterOsRoot + 2; } function canWatchDirectoryOrFile(pathComponents2, length2) { if (length2 === void 0) @@ -123582,6 +124420,50 @@ ${lanes.join("\n")} function getRootPathSplitLength(rootPath) { return rootPath.split(directorySeparator).length - (hasTrailingDirectorySeparator(rootPath) ? 1 : 0); } + function getModuleResolutionHost(resolutionHost) { + var _a; + return ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; + } + function createModuleResolutionLoaderUsingGlobalCache(containingFile, redirectedReference, options, resolutionHost, moduleResolutionCache) { + return { + nameAndMode: moduleResolutionNameAndModeGetter, + resolve: (moduleName, resoluionMode) => resolveModuleNameUsingGlobalCache( + resolutionHost, + moduleResolutionCache, + moduleName, + containingFile, + options, + redirectedReference, + resoluionMode + ) + }; + } + function resolveModuleNameUsingGlobalCache(resolutionHost, moduleResolutionCache, moduleName, containingFile, compilerOptions, redirectedReference, mode) { + const host = getModuleResolutionHost(resolutionHost); + const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); + if (!resolutionHost.getGlobalCache) { + return primaryResult; + } + const globalCache = resolutionHost.getGlobalCache(); + if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { + const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( + Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), + resolutionHost.projectName, + compilerOptions, + host, + globalCache, + moduleResolutionCache + ); + if (resolvedModule) { + primaryResult.resolvedModule = resolvedModule; + primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations); + primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations); + primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics); + return primaryResult; + } + } + return primaryResult; + } function createResolutionCache(resolutionHost, rootDirForResolution, logChangesWhenResolvingModule) { let filesWithChangedSetOfUnresolvedImports; let filesWithInvalidatedResolutions; @@ -123611,7 +124493,8 @@ ${lanes.join("\n")} getCurrentDirectory(), resolutionHost.getCanonicalFileName, resolutionHost.getCompilationSettings(), - moduleResolutionCache.getPackageJsonInfoCache() + moduleResolutionCache.getPackageJsonInfoCache(), + moduleResolutionCache.optionsToRedirectsKey ); const resolvedLibraries = /* @__PURE__ */ new Map(); const libraryResolutionCache = createModuleResolutionCache( @@ -123627,6 +124510,16 @@ ${lanes.join("\n")} const rootPathComponents = getPathComponents(rootPath); const typeRootsWatches = /* @__PURE__ */ new Map(); return { + rootDirForResolution, + resolvedModuleNames, + resolvedTypeReferenceDirectives, + resolvedLibraries, + resolvedFileToResolution, + resolutionsWithFailedLookups, + resolutionsWithOnlyAffectingLocations, + directoryWatchesOfFailedLookups, + fileWatchesOfAffectingLocations, + watchFailedLookupLocationsOfExternalModuleResolutions, getModuleResolutionCache: () => moduleResolutionCache, startRecordingFilesWithChangedResolutions, finishRecordingFilesWithChangedResolutions, @@ -123651,10 +124544,10 @@ ${lanes.join("\n")} clear: clear2, onChangesAffectModuleResolution }; - function getResolvedModule2(resolution) { + function getResolvedModule(resolution) { return resolution.resolvedModule; } - function getResolvedTypeReferenceDirective2(resolution) { + function getResolvedTypeReferenceDirective(resolution) { return resolution.resolvedTypeReferenceDirective; } function clear2() { @@ -123717,6 +124610,10 @@ ${lanes.join("\n")} }; } function startCachingPerDirectoryResolution() { + moduleResolutionCache.isReadonly = void 0; + typeReferenceDirectiveResolutionCache.isReadonly = void 0; + libraryResolutionCache.isReadonly = void 0; + moduleResolutionCache.getPackageJsonInfoCache().isReadonly = void 0; moduleResolutionCache.clearAllExceptPackageJsonInfoCache(); typeReferenceDirectiveResolutionCache.clearAllExceptPackageJsonInfoCache(); libraryResolutionCache.clearAllExceptPackageJsonInfoCache(); @@ -123729,8 +124626,8 @@ ${lanes.join("\n")} if (!((_a = newProgram == null ? void 0 : newProgram.resolvedLibReferences) == null ? void 0 : _a.has(libFileName))) { stopWatchFailedLookupLocationOfResolution( resolution, - resolutionHost.toPath(getInferredLibraryNameResolveFrom(newProgram.getCompilerOptions(), getCurrentDirectory(), libFileName)), - getResolvedModule2 + resolutionHost.toPath(getInferredLibraryNameResolveFrom(resolutionHost.getCompilationSettings(), getCurrentDirectory(), libFileName)), + getResolvedModule ); resolvedLibraries.delete(libFileName); } @@ -123771,58 +124668,26 @@ ${lanes.join("\n")} } }); } - directoryWatchesOfFailedLookups.forEach((watcher, path) => { - if (watcher.refCount === 0) { - directoryWatchesOfFailedLookups.delete(path); - watcher.watcher.close(); - } - }); - fileWatchesOfAffectingLocations.forEach((watcher, path) => { - if (watcher.files === 0 && watcher.resolutions === 0) { - fileWatchesOfAffectingLocations.delete(path); - watcher.watcher.close(); - } - }); + directoryWatchesOfFailedLookups.forEach(closeDirectoryWatchesOfFailedLookup); + fileWatchesOfAffectingLocations.forEach(closeFileWatcherOfAffectingLocation); hasChangedAutomaticTypeDirectiveNames = false; + moduleResolutionCache.isReadonly = true; + typeReferenceDirectiveResolutionCache.isReadonly = true; + libraryResolutionCache.isReadonly = true; + moduleResolutionCache.getPackageJsonInfoCache().isReadonly = true; } - function resolveModuleName2(moduleName, containingFile, compilerOptions, redirectedReference, mode) { - var _a; - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; - const primaryResult = resolveModuleName(moduleName, containingFile, compilerOptions, host, moduleResolutionCache, redirectedReference, mode); - if (!resolutionHost.getGlobalCache) { - return primaryResult; - } - const globalCache = resolutionHost.getGlobalCache(); - if (globalCache !== void 0 && !isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && extensionIsTS(primaryResult.resolvedModule.extension))) { - const { resolvedModule, failedLookupLocations, affectingLocations, resolutionDiagnostics } = loadModuleFromGlobalCache( - Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), - resolutionHost.projectName, - compilerOptions, - host, - globalCache, - moduleResolutionCache - ); - if (resolvedModule) { - primaryResult.resolvedModule = resolvedModule; - primaryResult.failedLookupLocations = updateResolutionField(primaryResult.failedLookupLocations, failedLookupLocations); - primaryResult.affectingLocations = updateResolutionField(primaryResult.affectingLocations, affectingLocations); - primaryResult.resolutionDiagnostics = updateResolutionField(primaryResult.resolutionDiagnostics, resolutionDiagnostics); - return primaryResult; - } + function closeDirectoryWatchesOfFailedLookup(watcher, path) { + if (watcher.refCount === 0) { + directoryWatchesOfFailedLookups.delete(path); + watcher.watcher.close(); } - return primaryResult; } - function createModuleResolutionLoader2(containingFile, redirectedReference, options) { - return { - nameAndMode: moduleResolutionNameAndModeGetter, - resolve: (moduleName, resoluionMode) => resolveModuleName2( - moduleName, - containingFile, - options, - redirectedReference, - resoluionMode - ) - }; + function closeFileWatcherOfAffectingLocation(watcher, path) { + var _a; + if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) { + fileWatchesOfAffectingLocations.delete(path); + watcher.watcher.close(); + } } function resolveNamesWithLocalCache({ entries, @@ -123838,7 +124703,6 @@ ${lanes.join("\n")} shouldRetryResolution, logChanges }) { - var _a; const path = resolutionHost.toPath(containingFile); const resolutionsInFile = perFileCache.get(path) || perFileCache.set(path, createModeAwareCache()).get(path); const resolvedModules = []; @@ -123859,16 +124723,18 @@ ${lanes.join("\n")} resolutionHost.onDiscoveredSymlink(); } resolutionsInFile.set(name, mode, resolution); - watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); - if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); + if (resolution !== existingResolution) { + watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution); + if (existingResolution) { + stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName); + } } if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) { filesWithChangedSetOfUnresolvedImports.push(path); logChanges = false; } } else { - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; + const host = getModuleResolutionHost(resolutionHost); if (isTraceEnabled(options, host) && !seenNamesInFile.has(name, mode)) { const resolved = getResolutionWithResolvedFileName(resolution); trace( @@ -123885,11 +124751,13 @@ ${lanes.join("\n")} seenNamesInFile.set(name, mode, true); resolvedModules.push(resolution); } - reusedNames == null ? void 0 : reusedNames.forEach((entry) => seenNamesInFile.set( - loader.nameAndMode.getName(entry), - loader.nameAndMode.getMode(entry, containingSourceFile), - true - )); + reusedNames == null ? void 0 : reusedNames.forEach( + (entry) => seenNamesInFile.set( + loader.nameAndMode.getName(entry), + loader.nameAndMode.getMode(entry, containingSourceFile), + true + ) + ); if (resolutionsInFile.size() !== seenNamesInFile.size()) { resolutionsInFile.forEach((resolution, name, mode) => { if (!seenNamesInFile.has(name, mode)) { @@ -123918,7 +124786,6 @@ ${lanes.join("\n")} } } function resolveTypeReferenceDirectiveReferences(typeDirectiveReferences, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { - var _a; return resolveNamesWithLocalCache({ entries: typeDirectiveReferences, containingFile, @@ -123931,10 +124798,10 @@ ${lanes.join("\n")} containingFile, redirectedReference, options, - ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost, + getModuleResolutionHost(resolutionHost), typeReferenceDirectiveResolutionCache ), - getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective2, + getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective, shouldRetryResolution: (resolution) => resolution.resolvedTypeReferenceDirective === void 0, deferWatchingNonRelativeResolution: false }); @@ -123948,12 +124815,14 @@ ${lanes.join("\n")} options, reusedNames, perFileCache: resolvedModuleNames, - loader: createModuleResolutionLoader2( + loader: createModuleResolutionLoaderUsingGlobalCache( containingFile, redirectedReference, - options + options, + resolutionHost, + moduleResolutionCache ), - getResolutionWithResolvedFileName: getResolvedModule2, + getResolutionWithResolvedFileName: getResolvedModule, shouldRetryResolution: (resolution) => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension), logChanges: logChangesWhenResolvingModule, deferWatchingNonRelativeResolution: true @@ -123961,8 +124830,7 @@ ${lanes.join("\n")} }); } function resolveLibrary2(libraryName, resolveFrom, options, libFileName) { - var _a; - const host = ((_a = resolutionHost.getCompilerHost) == null ? void 0 : _a.call(resolutionHost)) || resolutionHost; + const host = getModuleResolutionHost(resolutionHost); let resolution = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName); if (!resolution || resolution.isInvalidated) { const existingResolution = resolution; @@ -123972,17 +124840,17 @@ ${lanes.join("\n")} libraryName, resolution, path, - getResolvedModule2, + getResolvedModule, /*deferWatchingNonRelativeResolution*/ false ); resolvedLibraries.set(libFileName, resolution); if (existingResolution) { - stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModule2); + stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolvedModule); } } else { if (isTraceEnabled(options, host)) { - const resolved = getResolvedModule2(resolution); + const resolved = getResolvedModule(resolution); trace( host, (resolved == null ? void 0 : resolved.resolvedFileName) ? resolved.packageId ? Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 : Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved, @@ -123996,6 +124864,7 @@ ${lanes.join("\n")} return resolution; } function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) { + var _a, _b; const path = resolutionHost.toPath(containingFile); const resolutionsInFile = resolvedModuleNames.get(path); const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get( @@ -124005,7 +124874,17 @@ ${lanes.join("\n")} ); if (resolution && !resolution.isInvalidated) return resolution; - return resolveModuleName2(moduleName, containingFile, resolutionHost.getCompilationSettings()); + const data = (_a = resolutionHost.beforeResolveSingleModuleNameWithoutWatching) == null ? void 0 : _a.call(resolutionHost, moduleResolutionCache); + const host = getModuleResolutionHost(resolutionHost); + const result = resolveModuleName( + moduleName, + containingFile, + resolutionHost.getCompilationSettings(), + host, + moduleResolutionCache + ); + (_b = resolutionHost.afterResolveSingleModuleNameWithoutWatching) == null ? void 0 : _b.call(resolutionHost, moduleResolutionCache, moduleName, containingFile, result, data); + return result; } function isNodeModulesAtTypesDirectory(dirPath) { return endsWith(dirPath, "/node_modules/@types"); @@ -124105,52 +124984,63 @@ ${lanes.join("\n")} return; } let locationToWatch = affectingLocation; + let isSymlink = false; + let symlinkWatcher; if (resolutionHost.realpath) { locationToWatch = resolutionHost.realpath(affectingLocation); if (affectingLocation !== locationToWatch) { - const fileWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch); - if (fileWatcher2) { - if (forResolution) - fileWatcher2.resolutions++; - else - fileWatcher2.files++; - fileWatcher2.paths.add(affectingLocation); - fileWatchesOfAffectingLocations.set(affectingLocation, fileWatcher2); - return; - } - } - } - const paths = /* @__PURE__ */ new Set(); - paths.add(locationToWatch); - let actualWatcher = canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => { - cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind); - const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap(); - paths.forEach((path) => { - if (watcher.resolutions) - (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path); - if (watcher.files) - (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path); - packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path)); - }); - resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); - }) : noopFileWatcher; - const watcher = { - watcher: actualWatcher !== noopFileWatcher ? { - close: () => { - actualWatcher.close(); - actualWatcher = noopFileWatcher; - } - } : actualWatcher, - resolutions: forResolution ? 1 : 0, - files: forResolution ? 0 : 1, - paths - }; - fileWatchesOfAffectingLocations.set(locationToWatch, watcher); - if (affectingLocation !== locationToWatch) { + isSymlink = true; + symlinkWatcher = fileWatchesOfAffectingLocations.get(locationToWatch); + } + } + const resolutions = forResolution ? 1 : 0; + const files = forResolution ? 0 : 1; + if (!isSymlink || !symlinkWatcher) { + const watcher = { + watcher: canWatchAffectingLocation(resolutionHost.toPath(locationToWatch)) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => { + cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind); + invalidateAffectingFileWatcher(locationToWatch, moduleResolutionCache.getPackageJsonInfoCache().getInternalMap()); + resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations(); + }) : noopFileWatcher, + resolutions: isSymlink ? 0 : resolutions, + files: isSymlink ? 0 : files, + symlinks: void 0 + }; + fileWatchesOfAffectingLocations.set(locationToWatch, watcher); + if (isSymlink) + symlinkWatcher = watcher; + } + if (isSymlink) { + Debug.assert(!!symlinkWatcher); + const watcher = { + watcher: { + close: () => { + var _a; + const symlinkWatcher2 = fileWatchesOfAffectingLocations.get(locationToWatch); + if (((_a = symlinkWatcher2 == null ? void 0 : symlinkWatcher2.symlinks) == null ? void 0 : _a.delete(affectingLocation)) && !symlinkWatcher2.symlinks.size && !symlinkWatcher2.resolutions && !symlinkWatcher2.files) { + fileWatchesOfAffectingLocations.delete(locationToWatch); + symlinkWatcher2.watcher.close(); + } + } + }, + resolutions, + files, + symlinks: void 0 + }; fileWatchesOfAffectingLocations.set(affectingLocation, watcher); - paths.add(affectingLocation); + (symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation); } } + function invalidateAffectingFileWatcher(path, packageJsonMap) { + var _a; + const watcher = fileWatchesOfAffectingLocations.get(path); + if (watcher == null ? void 0 : watcher.resolutions) + (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path); + if (watcher == null ? void 0 : watcher.files) + (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path); + (_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path2) => invalidateAffectingFileWatcher(path2, packageJsonMap)); + packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path)); + } function watchFailedLookupLocationOfNonRelativeModuleResolutions(resolutions, name) { const program = resolutionHost.getCurrentProgram(); if (!program || !program.getTypeChecker().tryFindAmbientModuleWithoutAugmentations(name)) { @@ -124172,7 +125062,7 @@ ${lanes.join("\n")} directoryWatchesOfFailedLookups.set(dirPath, { watcher: createDirectoryWatcher(dir, dirPath, nonRecursive), refCount: 1, nonRecursive }); } } - function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot) { + function stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove) { const failedLookupLocationPath = resolutionHost.toPath(failedLookupLocation); const toWatch = getDirectoryToWatchFailedLookupLocation( failedLookupLocation, @@ -124187,12 +125077,12 @@ ${lanes.join("\n")} if (dirPath === rootPath) { removeAtRoot = true; } else { - removeDirectoryWatcher(dirPath); + removeDirectoryWatcher(dirPath, syncDirWatcherRemove); } } return removeAtRoot; } - function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) { + function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) { Debug.checkDefined(resolution.files).delete(filePath); resolution.refCount--; if (resolution.refCount) { @@ -124210,13 +125100,13 @@ ${lanes.join("\n")} let removeAtRoot = false; if (failedLookupLocations) { for (const failedLookupLocation of failedLookupLocations) { - removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot); + removeAtRoot = stopWatchFailedLookupLocation(failedLookupLocation, removeAtRoot, syncDirWatcherRemove); } } if (node10Result) - removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot); + removeAtRoot = stopWatchFailedLookupLocation(node10Result, removeAtRoot, syncDirWatcherRemove); if (removeAtRoot) - removeDirectoryWatcher(rootPath); + removeDirectoryWatcher(rootPath, syncDirWatcherRemove); } else if (affectingLocations == null ? void 0 : affectingLocations.length) { resolutionsWithOnlyAffectingLocations.delete(resolution); } @@ -124224,12 +125114,16 @@ ${lanes.join("\n")} for (const affectingLocation of affectingLocations) { const watcher = fileWatchesOfAffectingLocations.get(affectingLocation); watcher.resolutions--; + if (syncDirWatcherRemove) + closeFileWatcherOfAffectingLocation(watcher, affectingLocation); } } } - function removeDirectoryWatcher(dirPath) { + function removeDirectoryWatcher(dirPath, syncDirWatcherRemove) { const dirWatcher = directoryWatchesOfFailedLookups.get(dirPath); dirWatcher.refCount--; + if (syncDirWatcherRemove) + closeDirectoryWatchesOfFailedLookup(dirWatcher, dirPath); } function createDirectoryWatcher(directory, dirPath, nonRecursive) { return resolutionHost.watchDirectoryOfFailedLookupLocation(directory, (fileOrDirectory) => { @@ -124240,10 +125134,17 @@ ${lanes.join("\n")} scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, dirPath === fileOrDirectoryPath); }, nonRecursive ? 0 /* None */ : 1 /* Recursive */); } - function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName) { + function removeResolutionsOfFileFromCache(cache, filePath, getResolutionWithResolvedFileName, syncDirWatcherRemove) { const resolutions = cache.get(filePath); if (resolutions) { - resolutions.forEach((resolution) => stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName)); + resolutions.forEach( + (resolution) => stopWatchFailedLookupLocationOfResolution( + resolution, + filePath, + getResolutionWithResolvedFileName, + syncDirWatcherRemove + ) + ); cache.delete(filePath); } } @@ -124258,9 +125159,9 @@ ${lanes.join("\n")} return; resolvedProjectReference.commandLine.fileNames.forEach((f) => removeResolutionsOfFile(resolutionHost.toPath(f))); } - function removeResolutionsOfFile(filePath) { - removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule2); - removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective2); + function removeResolutionsOfFile(filePath, syncDirWatcherRemove) { + removeResolutionsOfFileFromCache(resolvedModuleNames, filePath, getResolvedModule, syncDirWatcherRemove); + removeResolutionsOfFileFromCache(resolvedTypeReferenceDirectives, filePath, getResolvedTypeReferenceDirective, syncDirWatcherRemove); } function invalidateResolutions(resolutions, canInvalidate) { if (!resolutions) @@ -124515,10 +125416,7 @@ ${lanes.join("\n")} if (fileName === void 0) { return void 0; } - const diagnosticForFileName = find( - diagnostics, - (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName - ); + const diagnosticForFileName = find(diagnostics, (diagnostic) => diagnostic.file !== void 0 && diagnostic.file.fileName === fileName); if (diagnosticForFileName !== void 0) { const { line } = getLineAndCharacterOfPosition(diagnosticForFileName.file, diagnosticForFileName.start); return { @@ -124686,7 +125584,7 @@ ${lanes.join("\n")} var _a, _b; const options = program.getCompilerOptions(); if (isReferencedFile(reason)) { - const referenceLocation = getReferencedFileLocation((path) => program.getSourceFileByPath(path), reason); + const referenceLocation = getReferencedFileLocation(program, reason); const referenceText = isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : `"${referenceLocation.text}"`; let message; Debug.assert(isReferenceFileLocation(referenceLocation) || reason.kind === 3 /* Import */, "Only synthetic references are imports"); @@ -124911,7 +125809,8 @@ ${lanes.join("\n")} getEnvironmentVariable: maybeBind(host, host.getEnvironmentVariable) || (() => ""), createHash: maybeBind(host, host.createHash), readDirectory: maybeBind(host, host.readDirectory), - storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit + storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit, + jsDocParsingMode: host.jsDocParsingMode }; return compilerHost; } @@ -125169,7 +126068,7 @@ ${lanes.join("\n")} } function createWatchProgram(host) { let builderProgram; - let reloadLevel; + let updateLevel; let missingFilesMap; let watchedWildcardDirectories; let timerToUpdateProgram; @@ -125262,7 +126161,7 @@ ${lanes.join("\n")} watchConfigFileWildCardDirectories(); if (configFileName) updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile); - return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close }; + return configFileName ? { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close, getResolutionCache } : { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames, close, getResolutionCache }; function close() { clearInvalidateResolutionsOfFailedLookupLocations(); resolutionCache.clear(); @@ -125302,6 +126201,9 @@ ${lanes.join("\n")} parsedConfigs = void 0; } } + function getResolutionCache() { + return resolutionCache; + } function getCurrentBuilderProgram() { return builderProgram; } @@ -125525,7 +126427,7 @@ ${lanes.join("\n")} } function scheduleProgramReload() { Debug.assert(!!configFileName); - reloadLevel = 2 /* Full */; + updateLevel = 2 /* Full */; scheduleProgramUpdate(); } function updateProgramWithWatchStatus() { @@ -125535,8 +126437,8 @@ ${lanes.join("\n")} } function updateProgram() { var _a, _b, _c, _d; - switch (reloadLevel) { - case 1 /* Partial */: + switch (updateLevel) { + case 1 /* RootNamesAndUpdate */: (_a = perfLogger) == null ? void 0 : _a.logStartUpdateProgram("PartialConfigReload"); reloadFileNamesFromConfigFile(); break; @@ -125556,7 +126458,7 @@ ${lanes.join("\n")} writeLog("Reloading new file names and options"); Debug.assert(compilerOptions); Debug.assert(configFileName); - reloadLevel = 0 /* None */; + updateLevel = 0 /* Update */; rootFileNames = getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions); if (updateErrorForNoInputFiles(rootFileNames, getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) { hasChangedConfigFileParsingErrors = true; @@ -125566,7 +126468,7 @@ ${lanes.join("\n")} function reloadConfigFile() { Debug.assert(configFileName); writeLog(`Reloading config file: ${configFileName}`); - reloadLevel = 0 /* None */; + updateLevel = 0 /* Update */; if (cachedDirectoryStructureHost) { cachedDirectoryStructureHost.clearCache(); } @@ -125578,14 +126480,16 @@ ${lanes.join("\n")} } function parseConfigFile2() { Debug.assert(configFileName); - setConfigFileParsingResult(getParsedCommandLineOfConfigFile( - configFileName, - optionsToExtendForConfigFile, - parseConfigFileHost, - extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()), - watchOptionsToExtend, - extraFileExtensions - )); + setConfigFileParsingResult( + getParsedCommandLineOfConfigFile( + configFileName, + optionsToExtendForConfigFile, + parseConfigFileHost, + extendedConfigCache || (extendedConfigCache = /* @__PURE__ */ new Map()), + watchOptionsToExtend, + extraFileExtensions + ) + ); } function setConfigFileParsingResult(configFileParseResult) { rootFileNames = configFileParseResult.fileNames; @@ -125601,9 +126505,9 @@ ${lanes.join("\n")} const configPath = toPath3(configFileName2); let config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); if (config) { - if (!config.reloadLevel) + if (!config.updateLevel) return config.parsedCommandLine; - if (config.parsedCommandLine && config.reloadLevel === 1 /* Partial */ && !host.getParsedCommandLine) { + if (config.parsedCommandLine && config.updateLevel === 1 /* RootNamesAndUpdate */ && !host.getParsedCommandLine) { writeLog("Reloading new file names and options"); Debug.assert(compilerOptions); const fileNames = getFileNamesFromConfigSpecs( @@ -125613,7 +126517,7 @@ ${lanes.join("\n")} parseConfigFileHost ); config.parsedCommandLine = { ...config.parsedCommandLine, fileNames }; - config.reloadLevel = void 0; + config.updateLevel = void 0; return config.parsedCommandLine; } } @@ -125621,7 +126525,7 @@ ${lanes.join("\n")} const parsedCommandLine = host.getParsedCommandLine ? host.getParsedCommandLine(configFileName2) : getParsedCommandLineFromConfigFileHost(configFileName2); if (config) { config.parsedCommandLine = parsedCommandLine; - config.reloadLevel = void 0; + config.updateLevel = void 0; } else { (parsedConfigs || (parsedConfigs = /* @__PURE__ */ new Map())).set(configPath, config = { parsedCommandLine }); } @@ -125718,8 +126622,8 @@ ${lanes.join("\n")} toPath: toPath3 })) return; - if (reloadLevel !== 2 /* Full */) { - reloadLevel = 1 /* Partial */; + if (updateLevel !== 2 /* Full */) { + updateLevel = 1 /* RootNamesAndUpdate */; scheduleProgramUpdate(); } }, @@ -125745,11 +126649,11 @@ ${lanes.join("\n")} return; projects.forEach((projectPath) => { if (configFileName && toPath3(configFileName) === projectPath) { - reloadLevel = 2 /* Full */; + updateLevel = 2 /* Full */; } else { const config = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath); if (config) - config.reloadLevel = 2 /* Full */; + config.updateLevel = 2 /* Full */; resolutionCache.removeResolutionsFromProjectReferenceRedirects(projectPath); } scheduleProgramUpdate(); @@ -125770,7 +126674,7 @@ ${lanes.join("\n")} updateCachedSystemWithFile(configFileName2, configPath, eventKind); const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath); if (config) - config.reloadLevel = 2 /* Full */; + config.updateLevel = 2 /* Full */; resolutionCache.removeResolutionsFromProjectReferenceRedirects(configPath); scheduleProgramUpdate(); }, @@ -125808,8 +126712,8 @@ ${lanes.join("\n")} toPath: toPath3 })) return; - if (config.reloadLevel !== 2 /* Full */) { - config.reloadLevel = 1 /* Partial */; + if (config.updateLevel !== 2 /* Full */) { + config.updateLevel = 1 /* RootNamesAndUpdate */; scheduleProgramUpdate(); } }, @@ -125985,7 +126889,8 @@ ${lanes.join("\n")} compilerHost.getCanonicalFileName, /*options*/ void 0, - moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache() + moduleResolutionCache == null ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(), + moduleResolutionCache == null ? void 0 : moduleResolutionCache.optionsToRedirectsKey ); compilerHost.resolveTypeReferenceDirectiveReferences = (typeDirectiveNames, containingFile, redirectedReference, options2, containingSourceFile) => loadWithModeAwareCache( typeDirectiveNames, @@ -126282,12 +127187,12 @@ ${lanes.join("\n")} state.projectStatus.delete(resolved); state.diagnostics.delete(resolved); } - function addProjToQueue({ projectPendingBuild }, proj, reloadLevel) { + function addProjToQueue({ projectPendingBuild }, proj, updateLevel) { const value = projectPendingBuild.get(proj); if (value === void 0) { - projectPendingBuild.set(proj, reloadLevel); - } else if (value < reloadLevel) { - projectPendingBuild.set(proj, reloadLevel); + projectPendingBuild.set(proj, updateLevel); + } else if (value < updateLevel) { + projectPendingBuild.set(proj, updateLevel); } } function setupInitialBuild(state, cancellationToken) { @@ -126301,7 +127206,7 @@ ${lanes.join("\n")} buildOrder.forEach( (configFileName) => state.projectPendingBuild.set( toResolvedConfigFilePath(state, configFileName), - 0 /* None */ + 0 /* Update */ ) ); if (cancellationToken) { @@ -126454,10 +127359,13 @@ ${lanes.join("\n")} config.projectReferences ); if (state.watch) { - state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && map( - state.moduleResolutionCache.getPackageJsonInfoCache().entries(), - ([path, data]) => [state.host.realpath && data ? toPath2(state, state.host.realpath(path)) : path, data] - )); + state.lastCachedPackageJsonLookups.set( + projectPath, + state.moduleResolutionCache && map( + state.moduleResolutionCache.getPackageJsonInfoCache().entries(), + ([path, data]) => [state.host.realpath && data ? toPath2(state, state.host.realpath(path)) : path, data] + ) + ); state.builderPrograms.set(projectPath, program); } step++; @@ -126734,8 +127642,8 @@ ${lanes.join("\n")} for (let projectIndex = 0; projectIndex < buildOrder.length; projectIndex++) { const project = buildOrder[projectIndex]; const projectPath = toResolvedConfigFilePath(state, project); - const reloadLevel = state.projectPendingBuild.get(projectPath); - if (reloadLevel === void 0) + const updateLevel = state.projectPendingBuild.get(projectPath); + if (updateLevel === void 0) continue; if (reportQueue) { reportQueue = false; @@ -126747,13 +127655,13 @@ ${lanes.join("\n")} projectPendingBuild.delete(projectPath); continue; } - if (reloadLevel === 2 /* Full */) { + if (updateLevel === 2 /* Full */) { watchConfigFile(state, project, projectPath, config); watchExtendedConfigFiles(state, projectPath, config); watchWildCardDirectories(state, project, projectPath, config); watchInputFiles(state, project, projectPath, config); watchPackageJsonFiles(state, project, projectPath, config); - } else if (reloadLevel === 1 /* Partial */) { + } else if (updateLevel === 1 /* RootNamesAndUpdate */) { config.fileNames = getFileNamesFromConfigSpecs(config.options.configFile.configFileSpecs, getDirectoryPath(project), config.options, state.parseConfigFileHost); updateErrorForNoInputFiles(config.fileNames, project, config.options.configFile.configFileSpecs, config.errors, canJsonReportNoInputFiles(config.raw)); watchInputFiles(state, project, projectPath, config); @@ -127340,7 +128248,7 @@ ${lanes.join("\n")} break; } } - addProjToQueue(state, nextProjectPath, 0 /* None */); + addProjToQueue(state, nextProjectPath, 0 /* Update */); break; } } @@ -127409,7 +128317,7 @@ ${lanes.join("\n")} filesToDelete.push(output); } else { host.deleteFile(output); - invalidateProject(state, resolvedPath, 0 /* None */); + invalidateProject(state, resolvedPath, 0 /* Update */); } } } @@ -127420,22 +128328,22 @@ ${lanes.join("\n")} } return 0 /* Success */; } - function invalidateProject(state, resolved, reloadLevel) { - if (state.host.getParsedCommandLine && reloadLevel === 1 /* Partial */) { - reloadLevel = 2 /* Full */; + function invalidateProject(state, resolved, updateLevel) { + if (state.host.getParsedCommandLine && updateLevel === 1 /* RootNamesAndUpdate */) { + updateLevel = 2 /* Full */; } - if (reloadLevel === 2 /* Full */) { + if (updateLevel === 2 /* Full */) { state.configFileCache.delete(resolved); state.buildOrder = void 0; } state.needsSummary = true; clearProjectStatus(state, resolved); - addProjToQueue(state, resolved, reloadLevel); + addProjToQueue(state, resolved, updateLevel); enableCache(state); } - function invalidateProjectAndScheduleBuilds(state, resolvedPath, reloadLevel) { + function invalidateProjectAndScheduleBuilds(state, resolvedPath, updateLevel) { state.reportFileChangeDetected = true; - invalidateProject(state, resolvedPath, reloadLevel); + invalidateProject(state, resolvedPath, updateLevel); scheduleBuildInvalidatedProject( state, 250, @@ -127511,15 +128419,18 @@ ${lanes.join("\n")} function watchConfigFile(state, resolved, resolvedPath, parsed) { if (!state.watch || state.allWatchedConfigFiles.has(resolvedPath)) return; - state.allWatchedConfigFiles.set(resolvedPath, watchFile( - state, - resolved, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 2 /* Full */), - 2e3 /* High */, - parsed == null ? void 0 : parsed.watchOptions, - WatchType.ConfigFile, - resolved - )); + state.allWatchedConfigFiles.set( + resolvedPath, + watchFile( + state, + resolved, + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 2 /* Full */), + 2e3 /* High */, + parsed == null ? void 0 : parsed.watchOptions, + WatchType.ConfigFile, + resolved + ) + ); } function watchExtendedConfigFiles(state, resolvedPath, parsed) { updateSharedExtendedConfigFileWatcher( @@ -127563,7 +128474,7 @@ ${lanes.join("\n")} toPath: (fileName) => toPath2(state, fileName) })) return; - invalidateProjectAndScheduleBuilds(state, resolvedPath, 1 /* Partial */); + invalidateProjectAndScheduleBuilds(state, resolvedPath, 1 /* RootNamesAndUpdate */); }, flags, parsed == null ? void 0 : parsed.watchOptions, @@ -127582,7 +128493,7 @@ ${lanes.join("\n")} createNewValue: (_path, input) => watchFile( state, input, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* None */), + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* Update */), 250 /* Low */, parsed == null ? void 0 : parsed.watchOptions, WatchType.SourceFile, @@ -127602,7 +128513,7 @@ ${lanes.join("\n")} createNewValue: (path, _input) => watchFile( state, path, - () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* None */), + () => invalidateProjectAndScheduleBuilds(state, resolvedPath, 0 /* Update */), 2e3 /* High */, parsed == null ? void 0 : parsed.watchOptions, WatchType.PackageJson, @@ -127673,7 +128584,7 @@ ${lanes.join("\n")} const configFilePath = toResolvedConfigFilePath(state, configFileName); return getUpToDateStatus(state, parseConfigFile(state, configFileName, configFilePath), configFilePath); }, - invalidateProject: (configFilePath, reloadLevel) => invalidateProject(state, configFilePath, reloadLevel || 0 /* None */), + invalidateProject: (configFilePath, updateLevel) => invalidateProject(state, configFilePath, updateLevel || 0 /* Update */), close: () => stopWatching(state) }; } @@ -127966,6 +128877,66 @@ ${lanes.join("\n")} } }); + // src/jsTyping/shared.ts + function hasArgument(argumentName) { + return sys.args.includes(argumentName); + } + function findArgument(argumentName) { + const index = sys.args.indexOf(argumentName); + return index >= 0 && index < sys.args.length - 1 ? sys.args[index + 1] : void 0; + } + function nowString() { + const d = /* @__PURE__ */ new Date(); + return `${d.getHours().toString().padStart(2, "0")}:${d.getMinutes().toString().padStart(2, "0")}:${d.getSeconds().toString().padStart(2, "0")}.${d.getMilliseconds().toString().padStart(3, "0")}`; + } + function indent2(str) { + return indentStr + str.replace(/\n/g, indentStr); + } + function stringifyIndented(json) { + return indent2(JSON.stringify(json, void 0, 2)); + } + var ActionSet, ActionInvalidate, ActionPackageInstalled, EventTypesRegistry, EventBeginInstallTypes, EventEndInstallTypes, EventInitializationFailed, ActionWatchTypingLocations, Arguments, indentStr; + var init_shared = __esm({ + "src/jsTyping/shared.ts"() { + "use strict"; + init_ts3(); + ActionSet = "action::set"; + ActionInvalidate = "action::invalidate"; + ActionPackageInstalled = "action::packageInstalled"; + EventTypesRegistry = "event::typesRegistry"; + EventBeginInstallTypes = "event::beginInstallTypes"; + EventEndInstallTypes = "event::endInstallTypes"; + EventInitializationFailed = "event::initializationFailed"; + ActionWatchTypingLocations = "action::watchTypingLocations"; + ((Arguments2) => { + Arguments2.GlobalCacheLocation = "--globalTypingsCacheLocation"; + Arguments2.LogFile = "--logFile"; + Arguments2.EnableTelemetry = "--enableTelemetry"; + Arguments2.TypingSafeListLocation = "--typingSafeListLocation"; + Arguments2.TypesMapLocation = "--typesMapLocation"; + Arguments2.NpmLocation = "--npmLocation"; + Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation"; + })(Arguments || (Arguments = {})); + indentStr = "\n "; + } + }); + + // src/jsTyping/types.ts + var init_types2 = __esm({ + "src/jsTyping/types.ts"() { + "use strict"; + } + }); + + // src/jsTyping/_namespaces/ts.server.ts + var init_ts_server = __esm({ + "src/jsTyping/_namespaces/ts.server.ts"() { + "use strict"; + init_shared(); + init_types2(); + } + }); + // src/jsTyping/jsTyping.ts function isTypingUpToDate(cachedTyping, availableTypingVersions) { const availableVersion = new Version(getProperty(availableTypingVersions, `ts${versionMajorMinor}`) || getProperty(availableTypingVersions, "latest")); @@ -128020,21 +128991,21 @@ ${lanes.join("\n")} ); addInferredTypings(module2, "Inferred typings from unresolved imports"); } - packageNameToTypingLocation.forEach((typing, name) => { - const registryEntry = typesRegistry.get(name); - if (inferredTypings.has(name) && inferredTypings.get(name) === void 0 && registryEntry !== void 0 && isTypingUpToDate(typing, registryEntry)) { - inferredTypings.set(name, typing.typingLocation); - } - }); for (const excludeTypingName of exclude) { const didDelete = inferredTypings.delete(excludeTypingName); if (didDelete && log) log(`Typing for ${excludeTypingName} is in exclude list, will be ignored.`); } + packageNameToTypingLocation.forEach((typing, name) => { + const registryEntry = typesRegistry.get(name); + if (inferredTypings.get(name) === false && registryEntry !== void 0 && isTypingUpToDate(typing, registryEntry)) { + inferredTypings.set(name, typing.typingLocation); + } + }); const newTypingNames = []; const cachedTypingPaths = []; inferredTypings.forEach((inferred, typing) => { - if (inferred !== void 0) { + if (inferred) { cachedTypingPaths.push(inferred); } else { newTypingNames.push(typing); @@ -128042,11 +129013,11 @@ ${lanes.join("\n")} }); const result = { cachedTypingPaths, newTypingNames, filesToWatch }; if (log) - log(`Result: ${JSON.stringify(result)}`); + log(`Finished typings discovery:${stringifyIndented(result)}`); return result; function addInferredTyping(typingName) { if (!inferredTypings.has(typingName)) { - inferredTypings.set(typingName, void 0); + inferredTypings.set(typingName, false); } } function addInferredTypings(typingNames, message) { @@ -128213,6 +129184,7 @@ ${lanes.join("\n")} "src/jsTyping/jsTyping.ts"() { "use strict"; init_ts3(); + init_ts_server(); unprefixedNodeCoreModuleList = [ "assert", "assert/strict", @@ -128300,74 +129272,6 @@ ${lanes.join("\n")} } }); - // src/jsTyping/shared.ts - function hasArgument(argumentName) { - return sys.args.indexOf(argumentName) >= 0; - } - function findArgument(argumentName) { - const index = sys.args.indexOf(argumentName); - return index >= 0 && index < sys.args.length - 1 ? sys.args[index + 1] : void 0; - } - function nowString() { - const d = /* @__PURE__ */ new Date(); - return `${padLeft(d.getHours().toString(), 2, "0")}:${padLeft(d.getMinutes().toString(), 2, "0")}:${padLeft(d.getSeconds().toString(), 2, "0")}.${padLeft(d.getMilliseconds().toString(), 3, "0")}`; - } - var ActionSet, ActionInvalidate, ActionPackageInstalled, EventTypesRegistry, EventBeginInstallTypes, EventEndInstallTypes, EventInitializationFailed, ActionWatchTypingLocations, Arguments; - var init_shared = __esm({ - "src/jsTyping/shared.ts"() { - "use strict"; - init_ts3(); - ActionSet = "action::set"; - ActionInvalidate = "action::invalidate"; - ActionPackageInstalled = "action::packageInstalled"; - EventTypesRegistry = "event::typesRegistry"; - EventBeginInstallTypes = "event::beginInstallTypes"; - EventEndInstallTypes = "event::endInstallTypes"; - EventInitializationFailed = "event::initializationFailed"; - ActionWatchTypingLocations = "action::watchTypingLocations"; - ((Arguments2) => { - Arguments2.GlobalCacheLocation = "--globalTypingsCacheLocation"; - Arguments2.LogFile = "--logFile"; - Arguments2.EnableTelemetry = "--enableTelemetry"; - Arguments2.TypingSafeListLocation = "--typingSafeListLocation"; - Arguments2.TypesMapLocation = "--typesMapLocation"; - Arguments2.NpmLocation = "--npmLocation"; - Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation"; - })(Arguments || (Arguments = {})); - } - }); - - // src/jsTyping/types.ts - var init_types2 = __esm({ - "src/jsTyping/types.ts"() { - "use strict"; - } - }); - - // src/jsTyping/_namespaces/ts.server.ts - var ts_server_exports = {}; - __export(ts_server_exports, { - ActionInvalidate: () => ActionInvalidate, - ActionPackageInstalled: () => ActionPackageInstalled, - ActionSet: () => ActionSet, - ActionWatchTypingLocations: () => ActionWatchTypingLocations, - Arguments: () => Arguments, - EventBeginInstallTypes: () => EventBeginInstallTypes, - EventEndInstallTypes: () => EventEndInstallTypes, - EventInitializationFailed: () => EventInitializationFailed, - EventTypesRegistry: () => EventTypesRegistry, - findArgument: () => findArgument, - hasArgument: () => hasArgument, - nowString: () => nowString - }); - var init_ts_server = __esm({ - "src/jsTyping/_namespaces/ts.server.ts"() { - "use strict"; - init_shared(); - init_types2(); - } - }); - // src/jsTyping/_namespaces/ts.ts var init_ts3 = __esm({ "src/jsTyping/_namespaces/ts.ts"() { @@ -128450,22 +129354,22 @@ ${lanes.join("\n")} return LanguageServiceMode2; })(LanguageServiceMode || {}); emptyOptions = {}; - SemanticClassificationFormat = /* @__PURE__ */ ((SemanticClassificationFormat3) => { - SemanticClassificationFormat3["Original"] = "original"; - SemanticClassificationFormat3["TwentyTwenty"] = "2020"; - return SemanticClassificationFormat3; + SemanticClassificationFormat = /* @__PURE__ */ ((SemanticClassificationFormat2) => { + SemanticClassificationFormat2["Original"] = "original"; + SemanticClassificationFormat2["TwentyTwenty"] = "2020"; + return SemanticClassificationFormat2; })(SemanticClassificationFormat || {}); - OrganizeImportsMode = /* @__PURE__ */ ((OrganizeImportsMode2) => { - OrganizeImportsMode2["All"] = "All"; - OrganizeImportsMode2["SortAndCombine"] = "SortAndCombine"; - OrganizeImportsMode2["RemoveUnused"] = "RemoveUnused"; - return OrganizeImportsMode2; + OrganizeImportsMode = /* @__PURE__ */ ((OrganizeImportsMode3) => { + OrganizeImportsMode3["All"] = "All"; + OrganizeImportsMode3["SortAndCombine"] = "SortAndCombine"; + OrganizeImportsMode3["RemoveUnused"] = "RemoveUnused"; + return OrganizeImportsMode3; })(OrganizeImportsMode || {}); - CompletionTriggerKind = /* @__PURE__ */ ((CompletionTriggerKind2) => { - CompletionTriggerKind2[CompletionTriggerKind2["Invoked"] = 1] = "Invoked"; - CompletionTriggerKind2[CompletionTriggerKind2["TriggerCharacter"] = 2] = "TriggerCharacter"; - CompletionTriggerKind2[CompletionTriggerKind2["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions"; - return CompletionTriggerKind2; + CompletionTriggerKind = /* @__PURE__ */ ((CompletionTriggerKind4) => { + CompletionTriggerKind4[CompletionTriggerKind4["Invoked"] = 1] = "Invoked"; + CompletionTriggerKind4[CompletionTriggerKind4["TriggerCharacter"] = 2] = "TriggerCharacter"; + CompletionTriggerKind4[CompletionTriggerKind4["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions"; + return CompletionTriggerKind4; })(CompletionTriggerKind || {}); InlayHintKind = /* @__PURE__ */ ((InlayHintKind2) => { InlayHintKind2["Type"] = "Type"; @@ -128480,17 +129384,17 @@ ${lanes.join("\n")} HighlightSpanKind2["writtenReference"] = "writtenReference"; return HighlightSpanKind2; })(HighlightSpanKind || {}); - IndentStyle = /* @__PURE__ */ ((IndentStyle2) => { - IndentStyle2[IndentStyle2["None"] = 0] = "None"; - IndentStyle2[IndentStyle2["Block"] = 1] = "Block"; - IndentStyle2[IndentStyle2["Smart"] = 2] = "Smart"; - return IndentStyle2; + IndentStyle = /* @__PURE__ */ ((IndentStyle3) => { + IndentStyle3[IndentStyle3["None"] = 0] = "None"; + IndentStyle3[IndentStyle3["Block"] = 1] = "Block"; + IndentStyle3[IndentStyle3["Smart"] = 2] = "Smart"; + return IndentStyle3; })(IndentStyle || {}); - SemicolonPreference = /* @__PURE__ */ ((SemicolonPreference2) => { - SemicolonPreference2["Ignore"] = "ignore"; - SemicolonPreference2["Insert"] = "insert"; - SemicolonPreference2["Remove"] = "remove"; - return SemicolonPreference2; + SemicolonPreference = /* @__PURE__ */ ((SemicolonPreference3) => { + SemicolonPreference3["Ignore"] = "ignore"; + SemicolonPreference3["Insert"] = "insert"; + SemicolonPreference3["Remove"] = "remove"; + return SemicolonPreference3; })(SemicolonPreference || {}); testFormatSettings = getDefaultFormatCodeSettings("\n"); SymbolDisplayPartKind = /* @__PURE__ */ ((SymbolDisplayPartKind2) => { @@ -128544,15 +129448,15 @@ ${lanes.join("\n")} OutputFileType2[OutputFileType2["Declaration"] = 2] = "Declaration"; return OutputFileType2; })(OutputFileType || {}); - EndOfLineState = /* @__PURE__ */ ((EndOfLineState3) => { - EndOfLineState3[EndOfLineState3["None"] = 0] = "None"; - EndOfLineState3[EndOfLineState3["InMultiLineCommentTrivia"] = 1] = "InMultiLineCommentTrivia"; - EndOfLineState3[EndOfLineState3["InSingleQuoteStringLiteral"] = 2] = "InSingleQuoteStringLiteral"; - EndOfLineState3[EndOfLineState3["InDoubleQuoteStringLiteral"] = 3] = "InDoubleQuoteStringLiteral"; - EndOfLineState3[EndOfLineState3["InTemplateHeadOrNoSubstitutionTemplate"] = 4] = "InTemplateHeadOrNoSubstitutionTemplate"; - EndOfLineState3[EndOfLineState3["InTemplateMiddleOrTail"] = 5] = "InTemplateMiddleOrTail"; - EndOfLineState3[EndOfLineState3["InTemplateSubstitutionPosition"] = 6] = "InTemplateSubstitutionPosition"; - return EndOfLineState3; + EndOfLineState = /* @__PURE__ */ ((EndOfLineState2) => { + EndOfLineState2[EndOfLineState2["None"] = 0] = "None"; + EndOfLineState2[EndOfLineState2["InMultiLineCommentTrivia"] = 1] = "InMultiLineCommentTrivia"; + EndOfLineState2[EndOfLineState2["InSingleQuoteStringLiteral"] = 2] = "InSingleQuoteStringLiteral"; + EndOfLineState2[EndOfLineState2["InDoubleQuoteStringLiteral"] = 3] = "InDoubleQuoteStringLiteral"; + EndOfLineState2[EndOfLineState2["InTemplateHeadOrNoSubstitutionTemplate"] = 4] = "InTemplateHeadOrNoSubstitutionTemplate"; + EndOfLineState2[EndOfLineState2["InTemplateMiddleOrTail"] = 5] = "InTemplateMiddleOrTail"; + EndOfLineState2[EndOfLineState2["InTemplateSubstitutionPosition"] = 6] = "InTemplateSubstitutionPosition"; + return EndOfLineState2; })(EndOfLineState || {}); TokenClass = /* @__PURE__ */ ((TokenClass2) => { TokenClass2[TokenClass2["Punctuation"] = 0] = "Punctuation"; @@ -128662,33 +129566,33 @@ ${lanes.join("\n")} ClassificationTypeNames2["jsxAttributeStringLiteralValue"] = "jsx attribute string literal value"; return ClassificationTypeNames2; })(ClassificationTypeNames || {}); - ClassificationType = /* @__PURE__ */ ((ClassificationType2) => { - ClassificationType2[ClassificationType2["comment"] = 1] = "comment"; - ClassificationType2[ClassificationType2["identifier"] = 2] = "identifier"; - ClassificationType2[ClassificationType2["keyword"] = 3] = "keyword"; - ClassificationType2[ClassificationType2["numericLiteral"] = 4] = "numericLiteral"; - ClassificationType2[ClassificationType2["operator"] = 5] = "operator"; - ClassificationType2[ClassificationType2["stringLiteral"] = 6] = "stringLiteral"; - ClassificationType2[ClassificationType2["regularExpressionLiteral"] = 7] = "regularExpressionLiteral"; - ClassificationType2[ClassificationType2["whiteSpace"] = 8] = "whiteSpace"; - ClassificationType2[ClassificationType2["text"] = 9] = "text"; - ClassificationType2[ClassificationType2["punctuation"] = 10] = "punctuation"; - ClassificationType2[ClassificationType2["className"] = 11] = "className"; - ClassificationType2[ClassificationType2["enumName"] = 12] = "enumName"; - ClassificationType2[ClassificationType2["interfaceName"] = 13] = "interfaceName"; - ClassificationType2[ClassificationType2["moduleName"] = 14] = "moduleName"; - ClassificationType2[ClassificationType2["typeParameterName"] = 15] = "typeParameterName"; - ClassificationType2[ClassificationType2["typeAliasName"] = 16] = "typeAliasName"; - ClassificationType2[ClassificationType2["parameterName"] = 17] = "parameterName"; - ClassificationType2[ClassificationType2["docCommentTagName"] = 18] = "docCommentTagName"; - ClassificationType2[ClassificationType2["jsxOpenTagName"] = 19] = "jsxOpenTagName"; - ClassificationType2[ClassificationType2["jsxCloseTagName"] = 20] = "jsxCloseTagName"; - ClassificationType2[ClassificationType2["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName"; - ClassificationType2[ClassificationType2["jsxAttribute"] = 22] = "jsxAttribute"; - ClassificationType2[ClassificationType2["jsxText"] = 23] = "jsxText"; - ClassificationType2[ClassificationType2["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue"; - ClassificationType2[ClassificationType2["bigintLiteral"] = 25] = "bigintLiteral"; - return ClassificationType2; + ClassificationType = /* @__PURE__ */ ((ClassificationType3) => { + ClassificationType3[ClassificationType3["comment"] = 1] = "comment"; + ClassificationType3[ClassificationType3["identifier"] = 2] = "identifier"; + ClassificationType3[ClassificationType3["keyword"] = 3] = "keyword"; + ClassificationType3[ClassificationType3["numericLiteral"] = 4] = "numericLiteral"; + ClassificationType3[ClassificationType3["operator"] = 5] = "operator"; + ClassificationType3[ClassificationType3["stringLiteral"] = 6] = "stringLiteral"; + ClassificationType3[ClassificationType3["regularExpressionLiteral"] = 7] = "regularExpressionLiteral"; + ClassificationType3[ClassificationType3["whiteSpace"] = 8] = "whiteSpace"; + ClassificationType3[ClassificationType3["text"] = 9] = "text"; + ClassificationType3[ClassificationType3["punctuation"] = 10] = "punctuation"; + ClassificationType3[ClassificationType3["className"] = 11] = "className"; + ClassificationType3[ClassificationType3["enumName"] = 12] = "enumName"; + ClassificationType3[ClassificationType3["interfaceName"] = 13] = "interfaceName"; + ClassificationType3[ClassificationType3["moduleName"] = 14] = "moduleName"; + ClassificationType3[ClassificationType3["typeParameterName"] = 15] = "typeParameterName"; + ClassificationType3[ClassificationType3["typeAliasName"] = 16] = "typeAliasName"; + ClassificationType3[ClassificationType3["parameterName"] = 17] = "parameterName"; + ClassificationType3[ClassificationType3["docCommentTagName"] = 18] = "docCommentTagName"; + ClassificationType3[ClassificationType3["jsxOpenTagName"] = 19] = "jsxOpenTagName"; + ClassificationType3[ClassificationType3["jsxCloseTagName"] = 20] = "jsxCloseTagName"; + ClassificationType3[ClassificationType3["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName"; + ClassificationType3[ClassificationType3["jsxAttribute"] = 22] = "jsxAttribute"; + ClassificationType3[ClassificationType3["jsxText"] = 23] = "jsxText"; + ClassificationType3[ClassificationType3["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue"; + ClassificationType3[ClassificationType3["bigintLiteral"] = 25] = "bigintLiteral"; + return ClassificationType3; })(ClassificationType || {}); } }); @@ -129025,7 +129929,7 @@ ${lanes.join("\n")} case 306 /* EnumMember */: return "enum member" /* enumMemberElement */; case 169 /* Parameter */: - return hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; + return hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */) ? "property" /* memberVariableElement */ : "parameter" /* parameterElement */; case 271 /* ImportEqualsDeclaration */: case 276 /* ImportSpecifier */: case 281 /* ExportSpecifier */: @@ -129928,19 +130832,19 @@ ${lanes.join("\n")} function getNodeModifiers(node, excludeFlags = 0 /* None */) { const result = []; const flags = isDeclaration(node) ? getCombinedNodeFlagsAlwaysIncludeJSDoc(node) & ~excludeFlags : 0 /* None */; - if (flags & 8 /* Private */) + if (flags & 2 /* Private */) result.push("private" /* privateMemberModifier */); - if (flags & 16 /* Protected */) + if (flags & 4 /* Protected */) result.push("protected" /* protectedMemberModifier */); - if (flags & 4 /* Public */) + if (flags & 1 /* Public */) result.push("public" /* publicMemberModifier */); - if (flags & 32 /* Static */ || isClassStaticBlockDeclaration(node)) + if (flags & 256 /* Static */ || isClassStaticBlockDeclaration(node)) result.push("static" /* staticModifier */); - if (flags & 256 /* Abstract */) + if (flags & 64 /* Abstract */) result.push("abstract" /* abstractModifier */); - if (flags & 1 /* Export */) + if (flags & 32 /* Export */) result.push("export" /* exportedModifier */); - if (flags & 8192 /* Deprecated */) + if (flags & 65536 /* Deprecated */) result.push("deprecated" /* deprecatedModifier */); if (node.flags & 33554432 /* Ambient */) result.push("declare" /* ambientModifier */); @@ -130148,7 +131052,7 @@ ${lanes.join("\n")} void 0, defaultImport || namedImports ? factory.createImportClause(!!isTypeOnly, defaultImport, namedImports && namedImports.length ? factory.createNamedImports(namedImports) : void 0) : void 0, typeof moduleSpecifier === "string" ? makeStringLiteral(moduleSpecifier, quotePreference) : moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); } @@ -130331,7 +131235,7 @@ ${lanes.join("\n")} const absoluteMaximumLength = defaultMaximumTruncationLength * 10; let displayParts; let lineStart; - let indent2; + let indent3; let length2; resetWriter(); const unknownWrite = (text) => writeKind(text, 17 /* text */); @@ -130367,12 +131271,12 @@ ${lanes.join("\n")} hasTrailingWhitespace: () => false, hasTrailingComment: () => false, rawWrite: notImplemented, - getIndent: () => indent2, + getIndent: () => indent3, increaseIndent: () => { - indent2++; + indent3++; }, decreaseIndent: () => { - indent2--; + indent3--; }, clear: resetWriter }; @@ -130380,7 +131284,7 @@ ${lanes.join("\n")} if (length2 > absoluteMaximumLength) return; if (lineStart) { - const indentString = getIndentString(indent2); + const indentString = getIndentString(indent3); if (indentString) { length2 += indentString.length; displayParts.push(displayPart(indentString, 16 /* space */)); @@ -130412,7 +131316,7 @@ ${lanes.join("\n")} function resetWriter() { displayParts = []; lineStart = true; - indent2 = 0; + indent3 = 0; length2 = 0; } } @@ -130786,7 +131690,7 @@ ${lanes.join("\n")} return idx === -1 ? -1 : idx + 1; } function needsParentheses(expression) { - return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || isAsExpression(expression) && isObjectLiteralExpression(expression.expression); + return isBinaryExpression(expression) && expression.operatorToken.kind === 28 /* CommaToken */ || isObjectLiteralExpression(expression) || (isAsExpression(expression) || isSatisfiesExpression(expression)) && isObjectLiteralExpression(expression.expression); } function getContextualTypeFromParent(node, checker, contextFlags) { const parent2 = walkUpParenthesizedExpressions(node.parent); @@ -131145,7 +132049,7 @@ ${lanes.join("\n")} return false; } function getNodeModulesPackageNameFromFileName(importedFileName, moduleSpecifierResolutionHost) { - if (!stringContains(importedFileName, "node_modules")) { + if (!importedFileName.includes("node_modules")) { return void 0; } const specifier = ts_moduleSpecifiers_exports.getNodeModulesPackageName( @@ -131318,7 +132222,7 @@ ${lanes.join("\n")} return isInJSFile(declaration) || !findAncestor(declaration, (d) => isModuleDeclaration(d) && isGlobalScopeAugmentation(d)); } function isDeprecatedDeclaration(decl) { - return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 8192 /* Deprecated */); + return !!(getCombinedNodeFlagsAlwaysIncludeJSDoc(decl) & 65536 /* Deprecated */); } function shouldUseUriStyleNodeCoreModules(file, program) { const decisionFromFile = firstDefined(file.imports, (node) => { @@ -131611,7 +132515,7 @@ ${lanes.join("\n")} } }; if (Debug.isDebugging) { - Object.defineProperty(cache, "__cache", { get: () => exportInfo }); + Object.defineProperty(cache, "__cache", { value: exportInfo }); } return cache; function rehydrateCachedInfo(info) { @@ -131630,7 +132534,9 @@ ${lanes.join("\n")} }; } const checker = (isFromPackageJson ? host.getPackageJsonAutoImportProvider() : host.getCurrentProgram()).getTypeChecker(); - const moduleSymbol = info.moduleSymbol || cachedModuleSymbol || Debug.checkDefined(info.moduleFile ? checker.getMergedSymbol(info.moduleFile.symbol) : checker.tryFindAmbientModule(info.moduleName)); + const moduleSymbol = info.moduleSymbol || cachedModuleSymbol || Debug.checkDefined( + info.moduleFile ? checker.getMergedSymbol(info.moduleFile.symbol) : checker.tryFindAmbientModule(info.moduleName) + ); const symbol = info.symbol || cachedSymbol || Debug.checkDefined( exportKind === 2 /* ExportEquals */ ? checker.resolveExternalModuleSymbol(moduleSymbol) : checker.tryGetMemberInModuleExportsAndProperties(unescapeLeadingUnderscores(info.symbolTableKey), moduleSymbol), `Could not find symbol '${info.symbolName}' by key '${info.symbolTableKey}' in module ${moduleSymbol.name}` @@ -131647,11 +132553,15 @@ ${lanes.join("\n")} } function key(importedName, symbol, ambientModuleName, checker) { const moduleKey = ambientModuleName || ""; - return `${importedName}|${getSymbolId(skipAlias(symbol, checker))}|${moduleKey}`; + return `${importedName.length} ${getSymbolId(skipAlias(symbol, checker))} ${importedName} ${moduleKey}`; } function parseKey(key2) { - const symbolName2 = key2.substring(0, key2.indexOf("|")); - const moduleKey = key2.substring(key2.lastIndexOf("|") + 1); + const firstSpace = key2.indexOf(" "); + const secondSpace = key2.indexOf(" ", firstSpace + 1); + const symbolNameLength = parseInt(key2.substring(0, firstSpace), 10); + const data = key2.substring(secondSpace + 1); + const symbolName2 = data.substring(0, symbolNameLength); + const moduleKey = data.substring(symbolNameLength + 1); const ambientModuleName = moduleKey === "" ? void 0 : moduleKey; return { symbolName: symbolName2, ambientModuleName }; } @@ -131760,7 +132670,7 @@ ${lanes.join("\n")} var _a; const isExcluded = excludePatterns && ((fileName) => excludePatterns.some((p) => p.test(fileName))); for (const ambient of checker.getAmbientModules()) { - if (!stringContains(ambient.name, "*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) { + if (!ambient.name.includes("*") && !(excludePatterns && ((_a = ambient.declarations) == null ? void 0 : _a.every((d) => isExcluded(d.getSourceFile().fileName))))) { cb( ambient, /*sourceFile*/ @@ -132783,21 +133693,25 @@ ${lanes.join("\n")} "src/services/classifier.ts"() { "use strict"; init_ts4(); - noRegexTable = arrayToNumericMap([ - 80 /* Identifier */, - 11 /* StringLiteral */, - 9 /* NumericLiteral */, - 10 /* BigIntLiteral */, - 14 /* RegularExpressionLiteral */, - 110 /* ThisKeyword */, - 46 /* PlusPlusToken */, - 47 /* MinusMinusToken */, - 22 /* CloseParenToken */, - 24 /* CloseBracketToken */, - 20 /* CloseBraceToken */, - 112 /* TrueKeyword */, - 97 /* FalseKeyword */ - ], (token) => token, () => true); + noRegexTable = arrayToNumericMap( + [ + 80 /* Identifier */, + 11 /* StringLiteral */, + 9 /* NumericLiteral */, + 10 /* BigIntLiteral */, + 14 /* RegularExpressionLiteral */, + 110 /* ThisKeyword */, + 46 /* PlusPlusToken */, + 47 /* MinusMinusToken */, + 22 /* CloseParenToken */, + 24 /* CloseBracketToken */, + 20 /* CloseBraceToken */, + 112 /* TrueKeyword */, + 97 /* FalseKeyword */ + ], + (token) => token, + () => true + ); } }); @@ -132807,7 +133721,7 @@ ${lanes.join("\n")} "src/services/documentHighlights.ts"() { "use strict"; init_ts4(); - ((DocumentHighlights2) => { + ((DocumentHighlights3) => { function getDocumentHighlights(program, cancellationToken, sourceFile, position, sourceFilesToSearch) { const node = getTouchingPropertyName(sourceFile, position); if (node.parent && (isJsxOpeningElement(node.parent) && node.parent.tagName === node || isJsxClosingElement(node.parent))) { @@ -132817,7 +133731,7 @@ ${lanes.join("\n")} } return getSemanticDocumentHighlights(position, node, program, cancellationToken, sourceFilesToSearch) || getSyntacticDocumentHighlights(node, sourceFile); } - DocumentHighlights2.getDocumentHighlights = getDocumentHighlights; + DocumentHighlights3.getDocumentHighlights = getDocumentHighlights; function getHighlightSpanForNode(node, sourceFile) { return { fileName: sourceFile.fileName, @@ -132992,7 +133906,7 @@ ${lanes.join("\n")} case 241 /* Block */: case 296 /* CaseClause */: case 297 /* DefaultClause */: - if (modifierFlag & 256 /* Abstract */ && isClassDeclaration(declaration)) { + if (modifierFlag & 64 /* Abstract */ && isClassDeclaration(declaration)) { return [...declaration.members, declaration]; } else { return container.statements; @@ -133006,12 +133920,12 @@ ${lanes.join("\n")} case 264 /* InterfaceDeclaration */: case 187 /* TypeLiteral */: const nodes = container.members; - if (modifierFlag & (28 /* AccessibilityModifier */ | 64 /* Readonly */)) { + if (modifierFlag & (7 /* AccessibilityModifier */ | 8 /* Readonly */)) { const constructor = find(container.members, isConstructorDeclaration); if (constructor) { return [...nodes, ...constructor.parameters]; } - } else if (modifierFlag & 256 /* Abstract */) { + } else if (modifierFlag & 64 /* Abstract */) { return [...nodes, container]; } return nodes; @@ -133218,10 +134132,10 @@ ${lanes.join("\n")} function isDocumentRegistryEntry(entry) { return !!entry.sourceFile; } - function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory) { - return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory); + function createDocumentRegistry(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode) { + return createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory, jsDocParsingMode); } - function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", externalCache) { + function createDocumentRegistryInternal(useCaseSensitiveFileNames2, currentDirectory = "", jsDocParsingMode, externalCache) { const buckets = /* @__PURE__ */ new Map(); const getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames2); function reportStats() { @@ -133305,9 +134219,11 @@ ${lanes.join("\n")} const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : { languageVersion: scriptTarget, impliedNodeFormat: host && getImpliedNodeFormatForFile(path, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings), - setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings) + setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings), + jsDocParsingMode }; sourceFileOptions.languageVersion = scriptTarget; + Debug.assertEqual(jsDocParsingMode, sourceFileOptions.jsDocParsingMode); const oldBucketCount = buckets.size; const keyWithMode = getDocumentRegistryBucketKeyWithMode(key, sourceFileOptions.impliedNodeFormat); const bucket = getOrUpdate(buckets, keyWithMode, () => /* @__PURE__ */ new Map()); @@ -133353,12 +134269,7 @@ ${lanes.join("\n")} setBucketEntry(); } else { if (entry.sourceFile.version !== version2) { - entry.sourceFile = updateLanguageServiceSourceFile( - entry.sourceFile, - scriptSnapshot, - version2, - scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot) - ); + entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version2, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot)); if (externalCache) { externalCache.setDocument(keyWithMode, path, entry.sourceFile); } @@ -133548,29 +134459,19 @@ ${lanes.join("\n")} const oldImportFromPath = oldFromNew || sourceFile.fileName; const oldImportFromDirectory = getDirectoryPath(oldImportFromPath); const importingSourceFileMoved = newFromOld !== void 0 || oldFromNew !== void 0; - updateImportsWorker( - sourceFile, - changeTracker, - (referenceText) => { - if (!pathIsRelative(referenceText)) - return void 0; - const oldAbsolute = combinePathsSafe(oldImportFromDirectory, referenceText); - const newAbsolute = oldToNew(oldAbsolute); - return newAbsolute === void 0 ? void 0 : ensurePathIsNonModuleName(getRelativePathFromDirectory(newImportFromDirectory, newAbsolute, getCanonicalFileName)); - }, - (importLiteral) => { - const importedModuleSymbol = program.getTypeChecker().getSymbolAtLocation(importLiteral); - if ((importedModuleSymbol == null ? void 0 : importedModuleSymbol.declarations) && importedModuleSymbol.declarations.some((d) => isAmbientModule(d))) - return void 0; - const toImport = oldFromNew !== void 0 ? getSourceFileToImportFromResolved( - importLiteral, - resolveModuleName(importLiteral.text, oldImportFromPath, program.getCompilerOptions(), host), - oldToNew, - allFiles - ) : getSourceFileToImport(importedModuleSymbol, importLiteral, sourceFile, program, host, oldToNew); - return toImport !== void 0 && (toImport.updated || importingSourceFileMoved && pathIsRelative(importLiteral.text)) ? ts_moduleSpecifiers_exports.updateModuleSpecifier(program.getCompilerOptions(), sourceFile, getCanonicalFileName(newImportFromPath), toImport.newFileName, createModuleSpecifierResolutionHost(program, host), importLiteral.text) : void 0; - } - ); + updateImportsWorker(sourceFile, changeTracker, (referenceText) => { + if (!pathIsRelative(referenceText)) + return void 0; + const oldAbsolute = combinePathsSafe(oldImportFromDirectory, referenceText); + const newAbsolute = oldToNew(oldAbsolute); + return newAbsolute === void 0 ? void 0 : ensurePathIsNonModuleName(getRelativePathFromDirectory(newImportFromDirectory, newAbsolute, getCanonicalFileName)); + }, (importLiteral) => { + const importedModuleSymbol = program.getTypeChecker().getSymbolAtLocation(importLiteral); + if ((importedModuleSymbol == null ? void 0 : importedModuleSymbol.declarations) && importedModuleSymbol.declarations.some((d) => isAmbientModule(d))) + return void 0; + const toImport = oldFromNew !== void 0 ? getSourceFileToImportFromResolved(importLiteral, resolveModuleName(importLiteral.text, oldImportFromPath, program.getCompilerOptions(), host), oldToNew, allFiles) : getSourceFileToImport(importedModuleSymbol, importLiteral, sourceFile, program, host, oldToNew); + return toImport !== void 0 && (toImport.updated || importingSourceFileMoved && pathIsRelative(importLiteral.text)) ? ts_moduleSpecifiers_exports.updateModuleSpecifier(program.getCompilerOptions(), sourceFile, getCanonicalFileName(newImportFromPath), toImport.newFileName, createModuleSpecifierResolutionHost(program, host), importLiteral.text) : void 0; + }); } } function combineNormal(pathA, pathB) { @@ -133580,14 +134481,13 @@ ${lanes.join("\n")} return ensurePathIsNonModuleName(combineNormal(pathA, pathB)); } function getSourceFileToImport(importedModuleSymbol, importLiteral, importingSourceFile, program, host, oldToNew) { - var _a; if (importedModuleSymbol) { const oldFileName = find(importedModuleSymbol.declarations, isSourceFile).fileName; const newFileName = oldToNew(oldFileName); return newFileName === void 0 ? { newFileName: oldFileName, updated: false } : { newFileName, updated: true }; } else { const mode = getModeForUsageLocation(importingSourceFile, importLiteral); - const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ? (_a = importingSourceFile.resolvedModules) == null ? void 0 : _a.get(importLiteral.text, mode) : host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName, mode); + const resolved = host.resolveModuleNameLiterals || !host.resolveModuleNames ? program.getResolvedModule(importingSourceFile, importLiteral.text, mode) : host.getResolvedModuleWithFailedLookupLocationsFromCache && host.getResolvedModuleWithFailedLookupLocationsFromCache(importLiteral.text, importingSourceFile.fileName, mode); return getSourceFileToImportFromResolved(importLiteral, resolved, oldToNew, program.getSourceFiles()); } } @@ -133656,6 +134556,21 @@ ${lanes.join("\n")} function createPatternMatcher(pattern) { const stringToWordSpans = /* @__PURE__ */ new Map(); const dotSeparatedSegments = pattern.trim().split(".").map((p) => createSegment(p.trim())); + if (dotSeparatedSegments.length === 1 && dotSeparatedSegments[0].totalTextChunk.text === "") { + return { + getMatchForLastSegmentOfPattern: () => createPatternMatch( + 2 /* substring */, + /*isCaseSensitive*/ + true + ), + getFullMatch: () => createPatternMatch( + 2 /* substring */, + /*isCaseSensitive*/ + true + ), + patternContainsDots: false + }; + } if (dotSeparatedSegments.some((segment) => !segment.subWordTextChunks.length)) return void 0; return { @@ -134492,6 +135407,7 @@ ${lanes.join("\n")} // src/services/suggestionDiagnostics.ts function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) { + var _a; program.getSemanticDiagnostics(sourceFile, cancellationToken); const diags = []; const checker = program.getTypeChecker(); @@ -134508,7 +135424,7 @@ ${lanes.join("\n")} const name = importNameForConvertToDefaultImport(importNode); if (!name) continue; - const module2 = getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); + const module2 = (_a = program.getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule; const resolvedFile = module2 && program.getSourceFile(module2.resolvedFileName); if (resolvedFile && resolvedFile.externalModuleIndicator && resolvedFile.externalModuleIndicator !== true && isExportAssignment(resolvedFile.externalModuleIndicator) && resolvedFile.externalModuleIndicator.isExportEquals) { diags.push(createDiagnosticForNode(name, Diagnostics.Import_may_be_converted_to_a_default_import)); @@ -134761,7 +135677,8 @@ ${lanes.join("\n")} compilerHost, options ), - setExternalModuleIndicator: getSetExternalModuleIndicator(options) + setExternalModuleIndicator: getSetExternalModuleIndicator(options), + jsDocParsingMode: transpileOptions.jsDocParsingMode ?? 0 /* ParseAll */ } ); if (transpileOptions.moduleName) { @@ -134839,30 +135756,37 @@ ${lanes.join("\n")} }); // src/services/navigateTo.ts - function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles) { + function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles) { const patternMatcher = createPatternMatcher(searchValue); if (!patternMatcher) return emptyArray; const rawItems = []; + const singleCurrentFile = sourceFiles.length === 1 ? sourceFiles[0] : void 0; for (const sourceFile of sourceFiles) { cancellationToken.throwIfCancellationRequested(); if (excludeDtsFiles && sourceFile.isDeclarationFile) { continue; } + if (shouldExcludeFile(sourceFile, !!excludeLibFiles, singleCurrentFile)) { + continue; + } sourceFile.getNamedDeclarations().forEach((declarations, name) => { - getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, rawItems); + getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, sourceFile.fileName, !!excludeLibFiles, singleCurrentFile, rawItems); }); } rawItems.sort(compareNavigateToItems); return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem); } - function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, rawItems) { + function shouldExcludeFile(file, excludeLibFiles, singleCurrentFile) { + return file !== singleCurrentFile && excludeLibFiles && (isInsideNodeModules(file.path) || file.hasNoDefaultLib); + } + function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName, excludeLibFiles, singleCurrentFile, rawItems) { const match = patternMatcher.getMatchForLastSegmentOfPattern(name); if (!match) { return; } for (const declaration of declarations) { - if (!shouldKeepItem(declaration, checker)) + if (!shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile)) continue; if (patternMatcher.patternContainsDots) { const fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name); @@ -134874,14 +135798,15 @@ ${lanes.join("\n")} } } } - function shouldKeepItem(declaration, checker) { + function shouldKeepItem(declaration, checker, excludeLibFiles, singleCurrentFile) { + var _a; switch (declaration.kind) { case 273 /* ImportClause */: case 276 /* ImportSpecifier */: case 271 /* ImportEqualsDeclaration */: const importer = checker.getSymbolAtLocation(declaration.name); const imported = checker.getAliasedSymbol(importer); - return importer.escapedName !== imported.escapedName; + return importer.escapedName !== imported.escapedName && !((_a = imported.declarations) == null ? void 0 : _a.every((d) => shouldExcludeFile(d.getSourceFile(), excludeLibFiles, singleCurrentFile))); default: return true; } @@ -135072,7 +135997,14 @@ ${lanes.join("\n")} } } function hasNavigationBarName(node) { - return !hasDynamicName(node) || node.kind !== 226 /* BinaryExpression */ && isPropertyAccessExpression(node.name.expression) && isIdentifier(node.name.expression.expression) && idText(node.name.expression.expression) === "Symbol"; + const name = getNameOfDeclaration(node); + if (name === void 0) + return false; + if (isComputedPropertyName(name)) { + const expression = name.expression; + return isEntityNameExpression(expression) || isNumericLiteral(expression) || isStringOrNumericLiteralLike(expression); + } + return !!name; } function addChildrenRecursively(node) { curCancellationToken.throwIfCancellationRequested(); @@ -135223,11 +136155,7 @@ ${lanes.join("\n")} } } } else if (isFunctionExpression(binaryExpression.right) || isArrowFunction(binaryExpression.right)) { - addNodeWithRecursiveChild( - node, - binaryExpression.right, - className - ); + addNodeWithRecursiveChild(node, binaryExpression.right, className); } else { startNode(binaryExpression, className); addNodeWithRecursiveChild(node, binaryExpression.right, assignmentTarget.name); @@ -135352,16 +136280,19 @@ ${lanes.join("\n")} } } } - lastANode = a.node = setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - a.name || factory.createIdentifier("__class__"), - /*typeParameters*/ - void 0, - /*heritageClauses*/ - void 0, - [] - ), a.node); + lastANode = a.node = setTextRange( + factory.createClassDeclaration( + /*modifiers*/ + void 0, + a.name || factory.createIdentifier("__class__"), + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + [] + ), + a.node + ); } else { a.children = concatenate(a.children, b.children); if (a.children) { @@ -135374,16 +136305,19 @@ ${lanes.join("\n")} } else { if (!a.additionalNodes) a.additionalNodes = []; - a.additionalNodes.push(setTextRange(factory.createClassDeclaration( - /*modifiers*/ - void 0, - a.name || factory.createIdentifier("__class__"), - /*typeParameters*/ - void 0, - /*heritageClauses*/ - void 0, - [] - ), b.node)); + a.additionalNodes.push(setTextRange( + factory.createClassDeclaration( + /*modifiers*/ + void 0, + a.name || factory.createIdentifier("__class__"), + /*typeParameters*/ + void 0, + /*heritageClauses*/ + void 0, + [] + ), + b.node + )); } return true; } @@ -135485,7 +136419,7 @@ ${lanes.join("\n")} case 218 /* FunctionExpression */: case 263 /* ClassDeclaration */: case 231 /* ClassExpression */: - if (getSyntacticModifierFlags(node) & 1024 /* Default */) { + if (getSyntacticModifierFlags(node) & 2048 /* Default */) { return "default"; } return getFunctionOrClassName(node); @@ -135635,7 +136569,7 @@ ${lanes.join("\n")} return nodeText(parent2.left).replace(whiteSpaceRegex, ""); } else if (isPropertyAssignment(parent2)) { return nodeText(parent2.name); - } else if (getSyntacticModifierFlags(node) & 1024 /* Default */) { + } else if (getSyntacticModifierFlags(node) & 2048 /* Default */) { return "default"; } else if (isClassLike(node)) { return ""; @@ -135744,15 +136678,15 @@ ${lanes.join("\n")} const { file, program } = context; const span = getRefactorContextSpan(context); const token = getTokenAtPosition(file, span.start); - const exportNode = !!(token.parent && getSyntacticModifierFlags(token.parent) & 1 /* Export */) && considerPartialSpans ? token.parent : getParentNodeInSpan(token, file, span); + const exportNode = !!(token.parent && getSyntacticModifierFlags(token.parent) & 32 /* Export */) && considerPartialSpans ? token.parent : getParentNodeInSpan(token, file, span); if (!exportNode || !isSourceFile(exportNode.parent) && !(isModuleBlock(exportNode.parent) && isAmbientModule(exportNode.parent.parent))) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_export_statement) }; } const checker = program.getTypeChecker(); const exportingModuleSymbol = getExportingModuleSymbol(exportNode.parent, checker); - const flags = getSyntacticModifierFlags(exportNode) || (isExportAssignment(exportNode) && !exportNode.isExportEquals ? 1025 /* ExportDefault */ : 0 /* None */); - const wasDefault = !!(flags & 1024 /* Default */); - if (!(flags & 1 /* Export */) || !wasDefault && exportingModuleSymbol.exports.has("default" /* Default */)) { + const flags = getSyntacticModifierFlags(exportNode) || (isExportAssignment(exportNode) && !exportNode.isExportEquals ? 2080 /* ExportDefault */ : 0 /* None */); + const wasDefault = !!(flags & 2048 /* Default */); + if (!(flags & 32 /* Export */) || !wasDefault && exportingModuleSymbol.exports.has("default" /* Default */)) { return { error: getLocaleSpecificMessage(Diagnostics.This_file_already_has_a_default_export) }; } const noSymbolError = (id) => isIdentifier(id) && checker.getSymbolAtLocation(id) ? void 0 : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; @@ -135885,7 +136819,7 @@ ${lanes.join("\n")} } case 205 /* ImportType */: const importTypeNode = parent2; - changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.assertions, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); + changes.replaceNode(importingSourceFile, parent2, factory.createImportTypeNode(importTypeNode.argument, importTypeNode.attributes, factory.createIdentifier(exportName), importTypeNode.typeArguments, importTypeNode.isTypeOf)); break; default: Debug.failBadSyntaxKind(parent2); @@ -135973,10 +136907,14 @@ ${lanes.join("\n")} } if (context.preferences.provideRefactorNotApplicableReason) { return [ - { name: refactorName, description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), actions: [ - { ...defaultToNamedAction, notApplicableReason: info.error }, - { ...namedToDefaultAction, notApplicableReason: info.error } - ] } + { + name: refactorName, + description: getLocaleSpecificMessage(Diagnostics.Convert_default_export_to_named_export), + actions: [ + { ...defaultToNamedAction, notApplicableReason: info.error }, + { ...namedToDefaultAction, notApplicableReason: info.error } + ] + } ]; } return emptyArray; @@ -136132,7 +137070,11 @@ ${lanes.join("\n")} } }); } - changes.replaceNode(sourceFile, toConvert, shouldUseDefault ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName))); + changes.replaceNode( + sourceFile, + toConvert, + shouldUseDefault ? factory.createIdentifier(namespaceImportName) : factory.createNamespaceImport(factory.createIdentifier(namespaceImportName)) + ); if (neededNamedImports.size) { const newNamedImports = arrayFrom(neededNamedImports.values(), (element) => factory.createImportSpecifier(element.isTypeOnly, element.propertyName && factory.createIdentifier(element.propertyName.text), factory.createIdentifier(element.name.text))); changes.insertNodeAfter(sourceFile, toConvert.parent.parent, updateImport( @@ -136161,7 +137103,7 @@ ${lanes.join("\n")} elements && elements.length ? factory.createNamedImports(elements) : void 0 ), old.moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); } @@ -136226,26 +137168,50 @@ ${lanes.join("\n")} const current = getTokenAtPosition(file, startPosition); const range = createTextRangeFromSpan(getRefactorContextSpan(context)); const cursorRequest = range.pos === range.end && considerEmptySpans; - const selection = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (cursorRequest || nodeOverlapsWithStartEnd(current, file, range.pos, range.end))); - if (!selection || !isTypeNode(selection)) + const overlappingRange = nodeOverlapsWithStartEnd(current, file, range.pos, range.end); + const firstType = findAncestor(current, (node) => node.parent && isTypeNode(node) && !rangeContainsSkipTrivia(range, node.parent, file) && (cursorRequest || overlappingRange)); + if (!firstType || !isTypeNode(firstType)) return { error: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_type_node) }; const checker = context.program.getTypeChecker(); - const enclosingNode = getEnclosingNode(selection, isJS); + const enclosingNode = getEnclosingNode(firstType, isJS); if (enclosingNode === void 0) return { error: getLocaleSpecificMessage(Diagnostics.No_type_could_be_extracted_from_this_type_node) }; + const expandedFirstType = getExpandedSelectionNode(firstType, enclosingNode); + if (!isTypeNode(expandedFirstType)) + return { error: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_type_node) }; + const typeList = []; + if ((isUnionTypeNode(expandedFirstType.parent) || isIntersectionTypeNode(expandedFirstType.parent)) && range.end > firstType.end) { + addRange( + typeList, + expandedFirstType.parent.types.filter((type) => { + return nodeOverlapsWithStartEnd(type, file, range.pos, range.end); + }) + ); + } + const selection = typeList.length > 1 ? typeList : expandedFirstType; const typeParameters = collectTypeParameters(checker, selection, enclosingNode, file); if (!typeParameters) return { error: getLocaleSpecificMessage(Diagnostics.No_type_could_be_extracted_from_this_type_node) }; const typeElements = flattenTypeLiteralNodeReference(checker, selection); return { isJS, selection, enclosingNode, typeParameters, typeElements }; } - function flattenTypeLiteralNodeReference(checker, node) { - if (!node) + function flattenTypeLiteralNodeReference(checker, selection) { + if (!selection) return void 0; - if (isIntersectionTypeNode(node)) { + if (isArray(selection)) { + const result = []; + for (const type of selection) { + const flattenedTypeMembers = flattenTypeLiteralNodeReference(checker, type); + if (!flattenedTypeMembers) + return void 0; + addRange(result, flattenedTypeMembers); + } + return result; + } + if (isIntersectionTypeNode(selection)) { const result = []; const seen = /* @__PURE__ */ new Map(); - for (const type of node.types) { + for (const type of selection.types) { const flattenedTypeMembers = flattenTypeLiteralNodeReference(checker, type); if (!flattenedTypeMembers || !flattenedTypeMembers.every((type2) => type2.name && addToSeen(seen, getNameFromPropertyName(type2.name)))) { return void 0; @@ -136253,10 +137219,10 @@ ${lanes.join("\n")} addRange(result, flattenedTypeMembers); } return result; - } else if (isParenthesizedTypeNode(node)) { - return flattenTypeLiteralNodeReference(checker, node.type); - } else if (isTypeLiteralNode(node)) { - return node.members; + } else if (isParenthesizedTypeNode(selection)) { + return flattenTypeLiteralNodeReference(checker, selection.type); + } else if (isTypeLiteralNode(selection)) { + return selection.members; } return void 0; } @@ -136265,7 +137231,13 @@ ${lanes.join("\n")} } function collectTypeParameters(checker, selection, enclosingNode, file) { const result = []; - return visitor(selection) ? void 0 : result; + const selectionArray = toArray(selection); + const selectionRange = { pos: selectionArray[0].pos, end: selectionArray[selectionArray.length - 1].end }; + for (const t of selectionArray) { + if (visitor(t)) + return void 0; + } + return result; function visitor(node) { if (isTypeReferenceNode(node)) { if (isIdentifier(node.typeName)) { @@ -136279,10 +137251,10 @@ ${lanes.join("\n")} ); for (const decl of (symbol == null ? void 0 : symbol.declarations) || emptyArray) { if (isTypeParameterDeclaration(decl) && decl.getSourceFile() === file) { - if (decl.name.escapedText === typeName.escapedText && rangeContainsSkipTrivia(decl, selection, file)) { + if (decl.name.escapedText === typeName.escapedText && rangeContainsSkipTrivia(decl, selectionRange, file)) { return true; } - if (rangeContainsSkipTrivia(enclosingNode, decl, file) && !rangeContainsSkipTrivia(selection, decl, file)) { + if (rangeContainsSkipTrivia(enclosingNode, decl, file) && !rangeContainsSkipTrivia(selectionRange, decl, file)) { pushIfUnique(result, decl); break; } @@ -136291,12 +137263,12 @@ ${lanes.join("\n")} } } else if (isInferTypeNode(node)) { const conditionalTypeNode = findAncestor(node, (n) => isConditionalTypeNode(n) && rangeContainsSkipTrivia(n.extendsType, node, file)); - if (!conditionalTypeNode || !rangeContainsSkipTrivia(selection, conditionalTypeNode, file)) { + if (!conditionalTypeNode || !rangeContainsSkipTrivia(selectionRange, conditionalTypeNode, file)) { return true; } } else if (isTypePredicateNode(node) || isThisTypeNode(node)) { const functionLikeNode = findAncestor(node.parent, isFunctionLike); - if (functionLikeNode && functionLikeNode.type && rangeContainsSkipTrivia(functionLikeNode.type, node, file) && !rangeContainsSkipTrivia(selection, functionLikeNode, file)) { + if (functionLikeNode && functionLikeNode.type && rangeContainsSkipTrivia(functionLikeNode.type, node, file) && !rangeContainsSkipTrivia(selectionRange, functionLikeNode, file)) { return true; } } else if (isTypeQueryNode(node)) { @@ -136308,11 +137280,11 @@ ${lanes.join("\n")} /*excludeGlobals*/ false ); - if ((symbol == null ? void 0 : symbol.valueDeclaration) && rangeContainsSkipTrivia(enclosingNode, symbol.valueDeclaration, file) && !rangeContainsSkipTrivia(selection, symbol.valueDeclaration, file)) { + if ((symbol == null ? void 0 : symbol.valueDeclaration) && rangeContainsSkipTrivia(enclosingNode, symbol.valueDeclaration, file) && !rangeContainsSkipTrivia(selectionRange, symbol.valueDeclaration, file)) { return true; } } else { - if (isThisIdentifier(node.exprName.left) && !rangeContainsSkipTrivia(selection, node.parent, file)) { + if (isThisIdentifier(node.exprName.left) && !rangeContainsSkipTrivia(selectionRange, node.parent, file)) { return true; } } @@ -136324,8 +137296,9 @@ ${lanes.join("\n")} } } function doTypeAliasChange(changes, file, name, info) { - const { enclosingNode, selection, typeParameters } = info; - const newTypeNode = factory.createTypeAliasDeclaration( + const { enclosingNode, typeParameters } = info; + const { firstTypeNode, lastTypeNode, newTypeNode } = getNodesToEdit(info); + const newTypeDeclaration = factory.createTypeAliasDeclaration( /*modifiers*/ void 0, name, @@ -136337,16 +137310,16 @@ ${lanes.join("\n")} /*defaultType*/ void 0 )), - selection + newTypeNode ); changes.insertNodeBefore( file, enclosingNode, - ignoreSourceNewlines(newTypeNode), + ignoreSourceNewlines(newTypeDeclaration), /*blankLineBetween*/ true ); - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( + changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( id.name, /*typeArguments*/ void 0 @@ -136354,7 +137327,7 @@ ${lanes.join("\n")} } function doInterfaceChange(changes, file, name, info) { var _a; - const { enclosingNode, selection, typeParameters, typeElements } = info; + const { enclosingNode, typeParameters, typeElements } = info; const newTypeNode = factory.createInterfaceDeclaration( /*modifiers*/ void 0, @@ -136372,7 +137345,8 @@ ${lanes.join("\n")} /*blankLineBetween*/ true ); - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( + const { firstTypeNode, lastTypeNode } = getNodesToEdit(info); + changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( id.name, /*typeArguments*/ void 0 @@ -136380,11 +137354,14 @@ ${lanes.join("\n")} } function doTypedefChange(changes, context, file, name, info) { var _a; - const { enclosingNode, selection, typeParameters } = info; - setEmitFlags(selection, 3072 /* NoComments */ | 4096 /* NoNestedComments */); + toArray(info.selection).forEach((typeNode) => { + setEmitFlags(typeNode, 3072 /* NoComments */ | 4096 /* NoNestedComments */); + }); + const { enclosingNode, typeParameters } = info; + const { firstTypeNode, lastTypeNode, newTypeNode } = getNodesToEdit(info); const node = factory.createJSDocTypedefTag( factory.createIdentifier("typedef"), - factory.createJSDocTypeExpression(selection), + factory.createJSDocTypeExpression(newTypeNode), factory.createIdentifier(name) ); const templates = []; @@ -136422,15 +137399,39 @@ ${lanes.join("\n")} true ); } - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( + changes.replaceNodeRange(file, firstTypeNode, lastTypeNode, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode( id.name, /*typeArguments*/ void 0 )))); } + function getNodesToEdit(info) { + if (isArray(info.selection)) { + return { + firstTypeNode: info.selection[0], + lastTypeNode: info.selection[info.selection.length - 1], + newTypeNode: isUnionTypeNode(info.selection[0].parent) ? factory.createUnionTypeNode(info.selection) : factory.createIntersectionTypeNode(info.selection) + }; + } + return { + firstTypeNode: info.selection, + lastTypeNode: info.selection, + newTypeNode: info.selection + }; + } function getEnclosingNode(node, isJS) { return findAncestor(node, isStatement) || (isJS ? findAncestor(node, isJSDoc) : void 0); } + function getExpandedSelectionNode(firstType, enclosingNode) { + return findAncestor(firstType, (node) => { + if (node === enclosingNode) + return "quit"; + if (isUnionTypeNode(node.parent) || isIntersectionTypeNode(node.parent)) { + return true; + } + return false; + }) ?? firstType; + } var refactorName3, extractToTypeAliasAction, extractToInterfaceAction, extractToTypeDefAction; var init_extractType = __esm({ "src/services/refactors/extractType.ts"() { @@ -136755,7 +137756,7 @@ ${lanes.join("\n")} if (markSeenTop(top)) { addExportToChanges(oldFile, top, name, changes, useEsModuleSyntax); } - if (hasSyntacticModifier(decl, 1024 /* Default */)) { + if (hasSyntacticModifier(decl, 2048 /* Default */)) { oldFileDefault = name; } else { oldFileNamedImports.push(name.text); @@ -136786,11 +137787,7 @@ ${lanes.join("\n")} return [{ name: refactorName5, description, actions: [moveToNewFileAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorName5, - description, - actions: [{ ...moveToNewFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] - }]; + return [{ name: refactorName5, description, actions: [{ ...moveToNewFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] }]; } return emptyArray; }, @@ -136810,14 +137807,13 @@ ${lanes.join("\n")} } function doChange4(context, oldFile, targetFile, program, toMove, changes, host, preferences) { const checker = program.getTypeChecker(); - const usage = getUsageInfo(oldFile, toMove.all, checker); if (!host.fileExists(targetFile)) { - changes.createNewFile(oldFile, targetFile, getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, usage, changes, toMove, program, host, preferences)); + changes.createNewFile(oldFile, targetFile, getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, getUsageInfo(oldFile, toMove.all, checker), changes, toMove, program, host, preferences)); addNewFileToTsconfig(program, changes, oldFile.fileName, targetFile, hostGetCanonicalFileName(host)); } else { const targetSourceFile = Debug.checkDefined(program.getSourceFile(targetFile)); const importAdder = ts_codefix_exports.createImportAdder(targetSourceFile, context.program, context.preferences, context.host); - getNewStatementsAndRemoveFromOldFile2(oldFile, targetSourceFile, usage, changes, toMove, program, host, preferences, importAdder); + getNewStatementsAndRemoveFromOldFile2(oldFile, targetSourceFile, getUsageInfo(oldFile, toMove.all, checker, getExistingImports(targetSourceFile, checker)), changes, toMove, program, host, preferences, importAdder); } } function getNewStatementsAndRemoveFromOldFile2(oldFile, targetFile, usage, changes, toMove, program, host, preferences, importAdder) { @@ -136903,10 +137899,10 @@ ${lanes.join("\n")} const targetSourceFile = program.getSourceFile(targetFile); for (const oldStatement of oldFile.statements) { forEachImportInStatement(oldStatement, (i) => { - var _a, _b; + var _a; const moduleSpecifier = moduleSpecifierFromImport(i); - const resolved = (_a = oldFile.resolvedModules) == null ? void 0 : _a.get(moduleSpecifier.text, getModeForUsageLocation(oldFile, moduleSpecifier)); - const fileName = (_b = resolved == null ? void 0 : resolved.resolvedModule) == null ? void 0 : _b.resolvedFileName; + const resolved = program.getResolvedModule(oldFile, moduleSpecifier.text, getModeForUsageLocation(oldFile, moduleSpecifier)); + const fileName = (_a = resolved == null ? void 0 : resolved.resolvedModule) == null ? void 0 : _a.resolvedFileName; if (fileName && targetSourceFile) { const newModuleSpecifier = getModuleSpecifier(program.getCompilerOptions(), targetSourceFile, targetSourceFile.path, fileName, createModuleSpecifierResolutionHost(program, host)); append(copiedOldImports, filterImport(i, makeStringLiteral(newModuleSpecifier, quotePreference), (name) => importsToCopy.has(checker.getSymbolAtLocation(name)))); @@ -136937,7 +137933,7 @@ ${lanes.join("\n")} if (importAdder && checker.isUnknownSymbol(symbol)) { importAdder.addImportFromExportedSymbol(skipAlias(symbol, checker)); } else { - if (hasSyntacticModifier(decl, 1024 /* Default */)) { + if (hasSyntacticModifier(decl, 2048 /* Default */)) { oldFileDefault = name; } else { oldFileNamedImports.push(name.text); @@ -137051,7 +138047,7 @@ ${lanes.join("\n")} factory.createNamespaceImport(newNamespaceId) ), newModuleString, - /*assertClause*/ + /*attributes*/ void 0 ); case 271 /* ImportEqualsDeclaration */: @@ -137177,7 +138173,7 @@ ${lanes.join("\n")} function isExported(sourceFile, decl, useEs6Exports, name) { var _a; if (useEs6Exports) { - return !isExpressionStatement(decl) && hasSyntacticModifier(decl, 1 /* Export */) || !!(name && sourceFile.symbol && ((_a = sourceFile.symbol.exports) == null ? void 0 : _a.has(name.escapedText))); + return !isExpressionStatement(decl) && hasSyntacticModifier(decl, 32 /* Export */) || !!(name && sourceFile.symbol && ((_a = sourceFile.symbol.exports) == null ? void 0 : _a.has(name.escapedText))); } return !!sourceFile.symbol && !!sourceFile.symbol.exports && getNamesToExportInCommonJS(decl).some((name2) => sourceFile.symbol.exports.has(escapeLeadingUnderscores(name2))); } @@ -137242,10 +138238,7 @@ ${lanes.join("\n")} /*requireStringLiteralLikeArgument*/ true )) { - changes.delete( - sourceFile, - isVariableDeclarationList(varDecl.parent) && length(varDecl.parent.declarations) === 1 ? varDecl.parent.parent : varDecl - ); + changes.delete(sourceFile, isVariableDeclarationList(varDecl.parent) && length(varDecl.parent.declarations) === 1 ? varDecl.parent.parent : varDecl); } else { changes.delete(sourceFile, name); } @@ -137255,10 +138248,7 @@ ${lanes.join("\n")} break; case 206 /* ObjectBindingPattern */: if (name.elements.every((e) => isIdentifier(e.name) && isUnused(e.name))) { - changes.delete( - sourceFile, - isVariableDeclarationList(varDecl.parent) && varDecl.parent.declarations.length === 1 ? varDecl.parent.parent : varDecl - ); + changes.delete(sourceFile, isVariableDeclarationList(varDecl.parent) && varDecl.parent.declarations.length === 1 ? varDecl.parent.parent : varDecl); } else { for (const element of name.elements) { if (isIdentifier(element.name) && isUnused(element.name)) { @@ -137346,7 +138336,7 @@ ${lanes.join("\n")} void 0, factory.createImportClause(clause.isTypeOnly, defaultImport, namedBindings), getSynthesizedDeepClone(moduleSpecifier), - /*assertClause*/ + /*attributes*/ void 0 ) : void 0; } @@ -137478,7 +138468,7 @@ ${lanes.join("\n")} case 272 /* ImportDeclaration */: return true; case 271 /* ImportEqualsDeclaration */: - return !hasSyntacticModifier(node, 1 /* Export */); + return !hasSyntacticModifier(node, 32 /* Export */); case 243 /* VariableStatement */: return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall( d.initializer, @@ -137489,7 +138479,7 @@ ${lanes.join("\n")} return false; } } - function getUsageInfo(oldFile, toMove, checker) { + function getUsageInfo(oldFile, toMove, checker, existingTargetImports = /* @__PURE__ */ new Set()) { const movedSymbols = /* @__PURE__ */ new Set(); const oldImportsNeededByTargetFile = /* @__PURE__ */ new Map(); const targetFileImportsFromOldFile = /* @__PURE__ */ new Set(); @@ -137503,10 +138493,16 @@ ${lanes.join("\n")} movedSymbols.add(Debug.checkDefined(isExpressionStatement(decl) ? checker.getSymbolAtLocation(decl.expression.left) : decl.symbol, "Need a symbol here")); }); } + const unusedImportsFromOldFile = /* @__PURE__ */ new Set(); for (const statement of toMove) { forEachReference(statement, checker, (symbol, isValidTypeOnlyUseSite) => { - if (!symbol.declarations) + if (!symbol.declarations) { + return; + } + if (existingTargetImports.has(skipAlias(symbol, checker))) { + unusedImportsFromOldFile.add(symbol); return; + } for (const decl of symbol.declarations) { if (isInImport(decl)) { const prevIsTypeOnly = oldImportsNeededByTargetFile.get(symbol); @@ -137517,7 +138513,9 @@ ${lanes.join("\n")} } }); } - const unusedImportsFromOldFile = new Set(oldImportsNeededByTargetFile.keys()); + for (const unusedImport of oldImportsNeededByTargetFile.keys()) { + unusedImportsFromOldFile.add(unusedImport); + } const oldFileImportsFromTargetFile = /* @__PURE__ */ new Set(); for (const statement of oldFile.statements) { if (contains(toMove, statement)) @@ -137649,16 +138647,13 @@ ${lanes.join("\n")} const checker = program.getTypeChecker(); const targetToSourceExports = /* @__PURE__ */ new Map(); for (const node of toMove.all) { - if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 1 /* Export */)) { + if (isTopLevelDeclarationStatement(node) && hasSyntacticModifier(node, 32 /* Export */)) { forEachTopLevelDeclaration(node, (declaration) => { var _a2; const targetDeclarations = canHaveSymbol(declaration) ? (_a2 = targetExports.get(declaration.symbol.escapedName)) == null ? void 0 : _a2.declarations : void 0; const exportDeclaration = firstDefined(targetDeclarations, (d) => isExportDeclaration(d) ? d : isExportSpecifier(d) ? tryCast(d.parent.parent, isExportDeclaration) : void 0); if (exportDeclaration && exportDeclaration.moduleSpecifier) { - targetToSourceExports.set( - exportDeclaration, - (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration) - ); + targetToSourceExports.set(exportDeclaration, (targetToSourceExports.get(exportDeclaration) || /* @__PURE__ */ new Set()).add(declaration)); } }); } @@ -137673,18 +138668,7 @@ ${lanes.join("\n")} continue; } if (length(updatedElements) < length(elements)) { - changes.replaceNode( - targetFile, - exportDeclaration, - factory.updateExportDeclaration( - exportDeclaration, - exportDeclaration.modifiers, - exportDeclaration.isTypeOnly, - factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), - exportDeclaration.moduleSpecifier, - exportDeclaration.assertClause - ) - ); + changes.replaceNode(targetFile, exportDeclaration, factory.updateExportDeclaration(exportDeclaration, exportDeclaration.modifiers, exportDeclaration.isTypeOnly, factory.updateNamedExports(exportDeclaration.exportClause, factory.createNodeArray(updatedElements, elements.hasTrailingComma)), exportDeclaration.moduleSpecifier, exportDeclaration.attributes)); } } } @@ -137717,6 +138701,29 @@ ${lanes.join("\n")} } return void 0; } + function getExistingImports(sourceFile, checker) { + const imports = /* @__PURE__ */ new Set(); + for (const moduleSpecifier of sourceFile.imports) { + const declaration = importFromModuleSpecifier(moduleSpecifier); + if (isImportDeclaration(declaration) && declaration.importClause && declaration.importClause.namedBindings && isNamedImports(declaration.importClause.namedBindings)) { + for (const e of declaration.importClause.namedBindings.elements) { + const symbol = checker.getSymbolAtLocation(e.propertyName || e.name); + if (symbol) { + imports.add(skipAlias(symbol, checker)); + } + } + } + if (isVariableDeclarationInitializedToRequire(declaration.parent) && isObjectBindingPattern(declaration.parent.name)) { + for (const e of declaration.parent.name.elements) { + const symbol = checker.getSymbolAtLocation(e.propertyName || e.name); + if (symbol) { + imports.add(skipAlias(symbol, checker)); + } + } + } + } + return imports; + } var refactorNameForMoveToFile, description2, moveToFileAction; var init_moveToFile = __esm({ "src/services/refactors/moveToFile.ts"() { @@ -137742,11 +138749,7 @@ ${lanes.join("\n")} return [{ name: refactorNameForMoveToFile, description: description2, actions: [moveToFileAction] }]; } if (context.preferences.provideRefactorNotApplicableReason) { - return [{ - name: refactorNameForMoveToFile, - description: description2, - actions: [{ ...moveToFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] - }]; + return [{ name: refactorNameForMoveToFile, description: description2, actions: [{ ...moveToFileAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Selection_is_not_a_valid_statement_or_statements) }] }]; } return emptyArray; }, @@ -137889,12 +138892,15 @@ ${lanes.join("\n")} } function convertParameterToNamedTupleMember(p) { Debug.assert(isIdentifier(p.name)); - const result = setTextRange(factory.createNamedTupleMember( - p.dotDotDotToken, - p.name, - p.questionToken, - p.type || factory.createKeywordTypeNode(133 /* AnyKeyword */) - ), p); + const result = setTextRange( + factory.createNamedTupleMember( + p.dotDotDotToken, + p.name, + p.questionToken, + p.type || factory.createKeywordTypeNode(133 /* AnyKeyword */) + ), + p + ); const parameterDocComment = p.symbol && p.symbol.getDocumentationComment(checker); if (parameterDocComment) { const newComment = displayPartsToString(parameterDocComment); @@ -138093,7 +139099,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else if (refactorKindBeginsWith(removeBracesAction.kind, kind) && isBlock(func.body) && func.body.statements.length === 1) { const firstStatement = first(func.body.statements); if (isReturnStatement(firstStatement)) { - return { func, addBraces: false, expression: firstStatement.expression, returnStatement: firstStatement }; + const expression = firstStatement.expression && isObjectLiteralExpression(getLeftmostExpression( + firstStatement.expression, + /*stopAtCallExpressions*/ + false + )) ? factory.createParenthesizedExpression(firstStatement.expression) : firstStatement.expression; + return { func, addBraces: false, expression, returnStatement: firstStatement }; } } return void 0; @@ -138296,7 +139307,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const body = convertToBlock(func.body); const { variableDeclaration, variableDeclarationList, statement, name } = variableInfo; suppressLeadingTrivia(statement); - const modifiersFlags = getCombinedModifierFlags(variableDeclaration) & 1 /* Export */ | getEffectiveModifierFlags(func); + const modifiersFlags = getCombinedModifierFlags(variableDeclaration) & 32 /* Export */ | getEffectiveModifierFlags(func); const modifiers = factory.createModifiersFromModifierFlags(modifiersFlags); const newNode = factory.createFunctionDeclaration(length(modifiers) ? modifiers : void 0, func.asteriskToken, name, func.typeParameters, func.parameters, func.type, body); if (variableDeclarationList.declarations.length === 1) { @@ -138935,15 +139946,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { file, startPosition } = context; const node = getNodeOrParentOfParentheses(file, startPosition); const maybeBinary = getParentBinaryExpression(node); + const nodeIsStringLiteral = isStringLiteral(maybeBinary); const refactorInfo = { name: refactorName10, description: refactorDescription6, actions: [] }; - if (isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation) { + if (nodeIsStringLiteral && context.triggerReason !== "invoked") { + return emptyArray; + } + if (isExpressionNode(maybeBinary) && (nodeIsStringLiteral || isBinaryExpression(maybeBinary) && treeToArray(maybeBinary).isValidConcatenation)) { refactorInfo.actions.push(convertStringAction); return [refactorInfo]; } else if (context.preferences.provideRefactorNotApplicableReason) { - refactorInfo.actions.push({ - ...convertStringAction, - notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenation) - }); + refactorInfo.actions.push({ ...convertStringAction, notApplicableReason: getLocaleSpecificMessage(Diagnostics.Can_only_convert_string_concatenations_and_string_literals) }); return [refactorInfo]; } return emptyArray; @@ -139004,12 +140016,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function treeToArray(current) { const loop = (current2) => { if (!isBinaryExpression(current2)) { - return { - nodes: [current2], - operators: [], - validOperators: true, - hasString: isStringLiteral(current2) || isNoSubstitutionTemplateLiteral(current2) - }; + return { nodes: [current2], operators: [], validOperators: true, hasString: isStringLiteral(current2) || isNoSubstitutionTemplateLiteral(current2) }; } const { nodes: nodes2, operators: operators2, hasString: leftHasString, validOperators: leftOperatorValid } = loop(current2.left); if (!(leftHasString || isStringLiteral(current2.right) || isTemplateExpression(current2.right))) { @@ -139075,7 +140082,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const isLastSpan = index === currentNode.templateSpans.length - 1; const text = span.literal.text + (isLastSpan ? subsequentText : ""); const rawText = getRawTextOfTemplate(span.literal) + (isLastSpan ? rawSubsequentText : ""); - return factory.createTemplateSpan(span.expression, isLast && isLastSpan ? factory.createTemplateTail(text, rawText) : factory.createTemplateMiddle(text, rawText)); + return factory.createTemplateSpan( + span.expression, + isLast && isLastSpan ? factory.createTemplateTail(text, rawText) : factory.createTemplateMiddle(text, rawText) + ); }); templateSpans.push(...spans); } else { @@ -139192,10 +140202,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getRefactorEditsToConvertToOptionalChain(context, actionName2) { const info = getInfo3(context); Debug.assert(info && !isRefactorErrorInfo(info), "Expected applicable refactor info"); - const edits = ts_textChanges_exports.ChangeTracker.with( - context, - (t) => doChange6(context.file, context.program.getTypeChecker(), t, info, actionName2) - ); + const edits = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange6(context.file, context.program.getTypeChecker(), t, info, actionName2)); return { edits, renameFilename: void 0, renameLocation: void 0 }; } function isValidExpression(node) { @@ -139358,11 +140365,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isBinaryExpression(expression)) { changes.replaceNodeRange(sourceFile, firstOccurrence, finalExpression, convertedChain); } else if (isConditionalExpression(expression)) { - changes.replaceNode( - sourceFile, - expression, - factory.createBinaryExpression(convertedChain, factory.createToken(61 /* QuestionQuestionToken */), expression.whenFalse) - ); + changes.replaceNode(sourceFile, expression, factory.createBinaryExpression(convertedChain, factory.createToken(61 /* QuestionQuestionToken */), expression.whenFalse)); } } } @@ -139678,7 +140681,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (isDeclaration(node2)) { const declaringNode = node2.kind === 260 /* VariableDeclaration */ ? node2.parent.parent : node2; - if (hasSyntacticModifier(declaringNode, 1 /* Export */)) { + if (hasSyntacticModifier(declaringNode, 32 /* Export */)) { (errors2 || (errors2 = [])).push(createDiagnosticForNode(node2, Messages.cannotExtractExportedEntity)); return true; } @@ -140390,57 +141393,36 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const paramType = checker.getTypeAtLocation(p); if (paramType === checker.getAnyType()) hasAny = true; - parameters.push(factory.updateParameterDeclaration( - p, - p.modifiers, - p.dotDotDotToken, - p.name, - p.questionToken, - p.type || checker.typeToTypeNode(paramType, scope, 1 /* NoTruncation */), - p.initializer - )); + parameters.push(factory.updateParameterDeclaration(p, p.modifiers, p.dotDotDotToken, p.name, p.questionToken, p.type || checker.typeToTypeNode(paramType, scope, 1 /* NoTruncation */), p.initializer)); } } if (hasAny) return { variableType: variableType2, initializer: initializer2 }; variableType2 = void 0; if (isArrowFunction(initializer2)) { - initializer2 = factory.updateArrowFunction( - initializer2, - canHaveModifiers(node) ? getModifiers(node) : void 0, - initializer2.typeParameters, - parameters, - initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), - initializer2.equalsGreaterThanToken, - initializer2.body - ); + initializer2 = factory.updateArrowFunction(initializer2, canHaveModifiers(node) ? getModifiers(node) : void 0, initializer2.typeParameters, parameters, initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), initializer2.equalsGreaterThanToken, initializer2.body); } else { if (functionSignature && !!functionSignature.thisParameter) { const firstParameter = firstOrUndefined(parameters); if (!firstParameter || isIdentifier(firstParameter.name) && firstParameter.name.escapedText !== "this") { const thisType = checker.getTypeOfSymbolAtLocation(functionSignature.thisParameter, node); - parameters.splice(0, 0, factory.createParameterDeclaration( - /*modifiers*/ - void 0, - /*dotDotDotToken*/ - void 0, - "this", - /*questionToken*/ - void 0, - checker.typeToTypeNode(thisType, scope, 1 /* NoTruncation */) - )); + parameters.splice( + 0, + 0, + factory.createParameterDeclaration( + /*modifiers*/ + void 0, + /*dotDotDotToken*/ + void 0, + "this", + /*questionToken*/ + void 0, + checker.typeToTypeNode(thisType, scope, 1 /* NoTruncation */) + ) + ); } } - initializer2 = factory.updateFunctionExpression( - initializer2, - canHaveModifiers(node) ? getModifiers(node) : void 0, - initializer2.asteriskToken, - initializer2.name, - initializer2.typeParameters, - parameters, - initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), - initializer2.body - ); + initializer2 = factory.updateFunctionExpression(initializer2, canHaveModifiers(node) ? getModifiers(node) : void 0, initializer2.asteriskToken, initializer2.name, initializer2.typeParameters, parameters, initializer2.type || checker.typeToTypeNode(functionSignature.getReturnType(), scope, 1 /* NoTruncation */), initializer2.body); } return { variableType: variableType2, initializer: initializer2 }; } @@ -140707,7 +141689,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} usagesPerScope[i].usages.forEach((value) => { if (value.usage === 2 /* Write */) { hasWrite = true; - if (value.symbol.flags & 106500 /* ClassMember */ && value.symbol.valueDeclaration && hasEffectiveModifier(value.symbol.valueDeclaration, 64 /* Readonly */)) { + if (value.symbol.flags & 106500 /* ClassMember */ && value.symbol.valueDeclaration && hasEffectiveModifier(value.symbol.valueDeclaration, 8 /* Readonly */)) { readonlyClassPropertyWrite = value.symbol.valueDeclaration; } } @@ -140853,7 +141835,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return symbolId; } function checkForUsedDeclarations(node) { - if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.indexOf(node) >= 0) { + if (node === targetRange.range || isReadonlyArray(targetRange.range) && targetRange.range.includes(node)) { return; } const sym = isIdentifier(node) ? getSymbolReferencedByIdentifier(node) : checker.getSymbolAtLocation(node); @@ -141126,7 +142108,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getInfo4(context) { if (isInJSFile(context.file) || !refactorKindBeginsWith(inferReturnTypeAction.kind, context.kind)) return; - const token = getTokenAtPosition(context.file, context.startPosition); + const token = getTouchingPropertyName(context.file, context.startPosition); const declaration = findAncestor(token, (n) => isBlock(n) || n.parent && isArrowFunction(n.parent) && (n.kind === 39 /* EqualsGreaterThanToken */ || n.parent.body === n) ? "quit" : isConvertibleDeclaration(n)); if (!declaration || !declaration.body || declaration.type) { return { error: getLocaleSpecificMessage(Diagnostics.Return_type_must_be_inferred_from_a_function) }; @@ -141329,14 +142311,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (decl) { const modifiers = getCombinedModifierFlags(decl); const nodeFlags = getCombinedNodeFlags(decl); - if (modifiers & 32 /* Static */) { + if (modifiers & 256 /* Static */) { modifierSet |= 1 << 1 /* static */; } - if (modifiers & 512 /* Async */) { + if (modifiers & 1024 /* Async */) { modifierSet |= 1 << 2 /* async */; } if (typeIdx !== 0 /* class */ && typeIdx !== 2 /* interface */) { - if (modifiers & 64 /* Readonly */ || nodeFlags & 2 /* Const */ || symbol.getFlags() & 8 /* EnumMember */) { + if (modifiers & 8 /* Readonly */ || nodeFlags & 2 /* Const */ || symbol.getFlags() & 8 /* EnumMember */) { modifierSet |= 1 << 3 /* readonly */; } } @@ -141705,7 +142687,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const options = { languageVersion: sourceFile.languageVersion, impliedNodeFormat: sourceFile.impliedNodeFormat, - setExternalModuleIndicator: sourceFile.setExternalModuleIndicator + setExternalModuleIndicator: sourceFile.setExternalModuleIndicator, + jsDocParsingMode: sourceFile.jsDocParsingMode }; return createLanguageServiceSourceFile( sourceFile.fileName, @@ -141823,7 +142806,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} resolveTypeReferenceDirectiveReferences: maybeBind(host, host.resolveTypeReferenceDirectiveReferences), resolveLibrary: maybeBind(host, host.resolveLibrary), useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect), - getParsedCommandLine + getParsedCommandLine, + jsDocParsingMode: host.jsDocParsingMode }; const originalGetSourceFile = compilerHost.getSourceFile; const { getSourceFileWithCache } = changeCompilerHostLikeToUseCache( @@ -142086,10 +143070,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} tags: type.symbol ? type.symbol.getJsDocTags(typeChecker) : void 0 }; } - const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken( - cancellationToken, - (typeChecker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker2, symbol, sourceFile, getContainerNode(nodeForQuickInfo), nodeForQuickInfo) - ); + const { symbolKind, displayParts, documentation, tags } = typeChecker.runWithCancellationToken(cancellationToken, (typeChecker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker2, symbol, sourceFile, getContainerNode(nodeForQuickInfo), nodeForQuickInfo)); return { kind: symbolKind, kindModifiers: ts_SymbolDisplay_exports.getSymbolModifiers(typeChecker, symbol), @@ -142175,19 +143156,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else { const quotePreference = getQuotePreference(sourceFile, preferences ?? emptyOptions); const providePrefixAndSuffixTextForRename = typeof preferences === "boolean" ? preferences : preferences == null ? void 0 : preferences.providePrefixAndSuffixTextForRename; - return getReferencesWorker( - node, - position, - { findInStrings, findInComments, providePrefixAndSuffixTextForRename, use: ts_FindAllReferences_exports.FindReferencesUse.Rename }, - (entry, originalNode, checker) => ts_FindAllReferences_exports.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false, quotePreference) - ); + return getReferencesWorker2(node, position, { findInStrings, findInComments, providePrefixAndSuffixTextForRename, use: ts_FindAllReferences_exports.FindReferencesUse.Rename }, (entry, originalNode, checker) => ts_FindAllReferences_exports.toRenameLocation(entry, originalNode, checker, providePrefixAndSuffixTextForRename || false, quotePreference)); } } function getReferencesAtPosition(fileName, position) { synchronizeHostData(); - return getReferencesWorker(getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: ts_FindAllReferences_exports.FindReferencesUse.References }, ts_FindAllReferences_exports.toReferenceEntry); + return getReferencesWorker2(getTouchingPropertyName(getValidSourceFile(fileName), position), position, { use: ts_FindAllReferences_exports.FindReferencesUse.References }, ts_FindAllReferences_exports.toReferenceEntry); } - function getReferencesWorker(node, position, options, cb) { + function getReferencesWorker2(node, position, options, cb) { synchronizeHostData(); const sourceFiles = options && options.use === ts_FindAllReferences_exports.FindReferencesUse.Rename ? program.getSourceFiles().filter((sourceFile) => !program.isSourceFileDefaultLibrary(sourceFile)) : program.getSourceFiles(); return ts_FindAllReferences_exports.findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, cb); @@ -142200,10 +143176,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} synchronizeHostData(); return ts_FindAllReferences_exports.Core.getReferencesForFileName(fileName, program, program.getSourceFiles()).map(ts_FindAllReferences_exports.toReferenceEntry); } - function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false) { + function getNavigateToItems2(searchValue, maxResultCount, fileName, excludeDtsFiles = false, excludeLibFiles = false) { synchronizeHostData(); const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles(); - return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles); + return getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles); } function getEmitOutput(fileName, emitOnlyDtsFiles, forceDtsEmit) { synchronizeHostData(); @@ -142439,15 +143415,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} wordPattern: jsxTagWordPattern }; } else { - const tag = findAncestor( - token.parent, - (n) => { - if (isJsxOpeningElement(n) || isJsxClosingElement(n)) { - return true; - } - return false; + const tag = findAncestor(token.parent, (n) => { + if (isJsxOpeningElement(n) || isJsxClosingElement(n)) { + return true; } - ); + return false; + }); if (!tag) return void 0; Debug.assert(isJsxOpeningElement(tag) || isJsxClosingElement(tag), "tag should be opening or closing element"); @@ -142503,7 +143476,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const lineTextStart = lineTextStarts.get(i.toString()); if (lineTextStart !== void 0) { if (isJsx) { - textChanges2.push.apply(textChanges2, toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx)); + textChanges2.push(...toggleMultilineComment(fileName, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx)); } else if (isCommenting) { textChanges2.push({ newText: openComment, @@ -142646,7 +143619,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (commentRange) { switch (commentRange.kind) { case 2 /* SingleLineCommentTrivia */: - textChanges2.push.apply(textChanges2, toggleLineComment( + textChanges2.push(...toggleLineComment( fileName, { end: commentRange.end, pos: commentRange.pos + 1 }, /*insertComment*/ @@ -142654,7 +143627,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} )); break; case 3 /* MultiLineCommentTrivia */: - textChanges2.push.apply(textChanges2, toggleMultilineComment( + textChanges2.push(...toggleMultilineComment( fileName, { end: commentRange.end, pos: commentRange.pos + 1 }, /*insertComment*/ @@ -142730,7 +143703,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return char >= 97 /* a */ && char <= 122 /* z */ || char >= 65 /* A */ && char <= 90 /* Z */ || char >= 48 /* _0 */ && char <= 57 /* _9 */; } function isNodeModulesFile(path) { - return stringContains(path, "/node_modules/"); + return path.includes("/node_modules/"); } } function getRenameInfo2(fileName, position, preferences) { @@ -143477,7 +144450,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} forEachChild(node, visit); break; case 169 /* Parameter */: - if (!hasSyntacticModifier(node, 16476 /* ParameterPropertyModifier */)) { + if (!hasSyntacticModifier(node, 31 /* ParameterPropertyModifier */)) { break; } case 260 /* VariableDeclaration */: @@ -143563,7 +144536,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} this.host, this.host.getCompilationSettings() ), - setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings()) + setExternalModuleIndicator: getSetExternalModuleIndicator(this.host.getCompilationSettings()), + // These files are used to produce syntax-based highlighting, which reads JSDoc, so we must use ParseAll. + jsDocParsingMode: 0 /* ParseAll */ }; sourceFile = createLanguageServiceSourceFile( fileName, @@ -143702,947 +144677,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } }); - // src/services/shims.ts - function logInternalError(logger, err) { - if (logger) { - logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message); - } - } - function simpleForwardCall(logger, actionDescription2, action, logPerformance) { - let start; - if (logPerformance) { - logger.log(actionDescription2); - start = timestamp(); - } - const result = action(); - if (logPerformance) { - const end = timestamp(); - logger.log(`${actionDescription2} completed in ${end - start} msec`); - if (isString(result)) { - let str = result; - if (str.length > 128) { - str = str.substring(0, 128) + "..."; - } - logger.log(` result.length=${str.length}, result='${JSON.stringify(str)}'`); - } - } - return result; - } - function forwardJSONCall(logger, actionDescription2, action, logPerformance) { - return forwardCall( - logger, - actionDescription2, - /*returnJson*/ - true, - action, - logPerformance - ); - } - function forwardCall(logger, actionDescription2, returnJson, action, logPerformance) { - try { - const result = simpleForwardCall(logger, actionDescription2, action, logPerformance); - return returnJson ? JSON.stringify({ result }) : result; - } catch (err) { - if (err instanceof OperationCanceledException) { - return JSON.stringify({ canceled: true }); - } - logInternalError(logger, err); - err.description = actionDescription2; - return JSON.stringify({ error: err }); - } - } - function realizeDiagnostics(diagnostics, newLine) { - return diagnostics.map((d) => realizeDiagnostic(d, newLine)); - } - function realizeDiagnostic(diagnostic, newLine) { - return { - message: flattenDiagnosticMessageText(diagnostic.messageText, newLine), - start: diagnostic.start, - // TODO: GH#18217 - length: diagnostic.length, - // TODO: GH#18217 - category: diagnosticCategoryName(diagnostic), - code: diagnostic.code, - reportsUnnecessary: diagnostic.reportsUnnecessary, - reportsDeprecated: diagnostic.reportsDeprecated - }; - } - function convertClassifications(classifications) { - return { spans: classifications.spans.join(","), endOfLineState: classifications.endOfLineState }; - } - var debugObjectHost, ScriptSnapshotShimAdapter, LanguageServiceShimHostAdapter, CoreServicesShimHostAdapter, ShimBase, LanguageServiceShimObject, ClassifierShimObject, CoreServicesShimObject, TypeScriptServicesFactory; - var init_shims = __esm({ - "src/services/shims.ts"() { - "use strict"; - init_ts4(); - debugObjectHost = function() { - return this; - }(); - ScriptSnapshotShimAdapter = class { - constructor(scriptSnapshotShim) { - this.scriptSnapshotShim = scriptSnapshotShim; - } - getText(start, end) { - return this.scriptSnapshotShim.getText(start, end); - } - getLength() { - return this.scriptSnapshotShim.getLength(); - } - getChangeRange(oldSnapshot) { - const oldSnapshotShim = oldSnapshot; - const encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim); - if (encoded === null) { - return null; - } - const decoded = JSON.parse(encoded); - return createTextChangeRange( - createTextSpan(decoded.span.start, decoded.span.length), - decoded.newLength - ); - } - dispose() { - if ("dispose" in this.scriptSnapshotShim) { - this.scriptSnapshotShim.dispose(); - } - } - }; - LanguageServiceShimHostAdapter = class { - constructor(shimHost) { - this.shimHost = shimHost; - this.loggingEnabled = false; - this.tracingEnabled = false; - if ("getModuleResolutionsForFile" in this.shimHost) { - this.resolveModuleNames = (moduleNames, containingFile) => { - const resolutionsInFile = JSON.parse(this.shimHost.getModuleResolutionsForFile(containingFile)); - return map(moduleNames, (name) => { - const result = getProperty(resolutionsInFile, name); - return result ? { resolvedFileName: result, extension: extensionFromPath(result), isExternalLibraryImport: false } : void 0; - }); - }; - } - if ("directoryExists" in this.shimHost) { - this.directoryExists = (directoryName) => this.shimHost.directoryExists(directoryName); - } - if ("getTypeReferenceDirectiveResolutionsForFile" in this.shimHost) { - this.resolveTypeReferenceDirectives = (typeDirectiveNames, containingFile) => { - const typeDirectivesForFile = JSON.parse(this.shimHost.getTypeReferenceDirectiveResolutionsForFile(containingFile)); - return map(typeDirectiveNames, (name) => getProperty(typeDirectivesForFile, isString(name) ? name : toFileNameLowerCase(name.fileName))); - }; - } - } - log(s) { - if (this.loggingEnabled) { - this.shimHost.log(s); - } - } - trace(s) { - if (this.tracingEnabled) { - this.shimHost.trace(s); - } - } - error(s) { - this.shimHost.error(s); - } - getProjectVersion() { - if (!this.shimHost.getProjectVersion) { - return void 0; - } - return this.shimHost.getProjectVersion(); - } - getTypeRootsVersion() { - if (!this.shimHost.getTypeRootsVersion) { - return 0; - } - return this.shimHost.getTypeRootsVersion(); - } - useCaseSensitiveFileNames() { - return this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false; - } - getCompilationSettings() { - const settingsJson = this.shimHost.getCompilationSettings(); - if (settingsJson === null || settingsJson === "") { - throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); - } - const compilerOptions = JSON.parse(settingsJson); - compilerOptions.allowNonTsExtensions = true; - return compilerOptions; - } - getScriptFileNames() { - const encoded = this.shimHost.getScriptFileNames(); - return JSON.parse(encoded); - } - getScriptSnapshot(fileName) { - const scriptSnapshot = this.shimHost.getScriptSnapshot(fileName); - return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot); - } - getScriptKind(fileName) { - if ("getScriptKind" in this.shimHost) { - return this.shimHost.getScriptKind(fileName); - } else { - return 0 /* Unknown */; - } - } - getScriptVersion(fileName) { - return this.shimHost.getScriptVersion(fileName); - } - getLocalizedDiagnosticMessages() { - const diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages(); - if (diagnosticMessagesJson === null || diagnosticMessagesJson === "") { - return null; - } - try { - return JSON.parse(diagnosticMessagesJson); - } catch (e) { - this.log(e.description || "diagnosticMessages.generated.json has invalid JSON format"); - return null; - } - } - getCancellationToken() { - const hostCancellationToken = this.shimHost.getCancellationToken(); - return new ThrottledCancellationToken(hostCancellationToken); - } - getCurrentDirectory() { - return this.shimHost.getCurrentDirectory(); - } - getDirectories(path) { - return JSON.parse(this.shimHost.getDirectories(path)); - } - getDefaultLibFileName(options) { - return this.shimHost.getDefaultLibFileName(JSON.stringify(options)); - } - readDirectory(path, extensions, exclude, include, depth) { - const pattern = getFileMatcherPatterns( - path, - exclude, - include, - this.shimHost.useCaseSensitiveFileNames(), - this.shimHost.getCurrentDirectory() - ); - return JSON.parse(this.shimHost.readDirectory( - path, - JSON.stringify(extensions), - JSON.stringify(pattern.basePaths), - pattern.excludePattern, - pattern.includeFilePattern, - pattern.includeDirectoryPattern, - depth - )); - } - readFile(path, encoding) { - return this.shimHost.readFile(path, encoding); - } - fileExists(path) { - return this.shimHost.fileExists(path); - } - }; - CoreServicesShimHostAdapter = class { - constructor(shimHost) { - this.shimHost = shimHost; - this.useCaseSensitiveFileNames = this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false; - if ("directoryExists" in this.shimHost) { - this.directoryExists = (directoryName) => this.shimHost.directoryExists(directoryName); - } else { - this.directoryExists = void 0; - } - if ("realpath" in this.shimHost) { - this.realpath = (path) => this.shimHost.realpath(path); - } else { - this.realpath = void 0; - } - } - readDirectory(rootDir, extensions, exclude, include, depth) { - const pattern = getFileMatcherPatterns( - rootDir, - exclude, - include, - this.shimHost.useCaseSensitiveFileNames(), - this.shimHost.getCurrentDirectory() - ); - return JSON.parse(this.shimHost.readDirectory( - rootDir, - JSON.stringify(extensions), - JSON.stringify(pattern.basePaths), - pattern.excludePattern, - pattern.includeFilePattern, - pattern.includeDirectoryPattern, - depth - )); - } - fileExists(fileName) { - return this.shimHost.fileExists(fileName); - } - readFile(fileName) { - return this.shimHost.readFile(fileName); - } - getDirectories(path) { - return JSON.parse(this.shimHost.getDirectories(path)); - } - }; - ShimBase = class { - constructor(factory2) { - this.factory = factory2; - factory2.registerShim(this); - } - dispose(_dummy) { - this.factory.unregisterShim(this); - } - }; - LanguageServiceShimObject = class extends ShimBase { - constructor(factory2, host, languageService) { - super(factory2); - this.host = host; - this.languageService = languageService; - this.logPerformance = false; - this.logger = this.host; - } - forwardJSONCall(actionDescription2, action) { - return forwardJSONCall(this.logger, actionDescription2, action, this.logPerformance); - } - /// DISPOSE - /** - * Ensure (almost) deterministic release of internal Javascript resources when - * some external native objects holds onto us (e.g. Com/Interop). - */ - dispose(dummy) { - this.logger.log("dispose()"); - this.languageService.dispose(); - this.languageService = null; - if (debugObjectHost && debugObjectHost.CollectGarbage) { - debugObjectHost.CollectGarbage(); - this.logger.log("CollectGarbage()"); - } - this.logger = null; - super.dispose(dummy); - } - /// REFRESH - /** - * Update the list of scripts known to the compiler - */ - refresh(throwOnError) { - this.forwardJSONCall( - `refresh(${throwOnError})`, - () => null - // eslint-disable-line no-null/no-null - ); - } - cleanupSemanticCache() { - this.forwardJSONCall( - "cleanupSemanticCache()", - () => { - this.languageService.cleanupSemanticCache(); - return null; - } - ); - } - realizeDiagnostics(diagnostics) { - const newLine = getNewLineOrDefaultFromHost( - this.host, - /*formatSettings*/ - void 0 - ); - return realizeDiagnostics(diagnostics, newLine); - } - getSyntacticClassifications(fileName, start, length2) { - return this.forwardJSONCall( - `getSyntacticClassifications('${fileName}', ${start}, ${length2})`, - () => this.languageService.getSyntacticClassifications(fileName, createTextSpan(start, length2)) - ); - } - getSemanticClassifications(fileName, start, length2) { - return this.forwardJSONCall( - `getSemanticClassifications('${fileName}', ${start}, ${length2})`, - () => this.languageService.getSemanticClassifications(fileName, createTextSpan(start, length2)) - ); - } - getEncodedSyntacticClassifications(fileName, start, length2) { - return this.forwardJSONCall( - `getEncodedSyntacticClassifications('${fileName}', ${start}, ${length2})`, - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - () => convertClassifications(this.languageService.getEncodedSyntacticClassifications(fileName, createTextSpan(start, length2))) - ); - } - getEncodedSemanticClassifications(fileName, start, length2) { - return this.forwardJSONCall( - `getEncodedSemanticClassifications('${fileName}', ${start}, ${length2})`, - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - () => convertClassifications(this.languageService.getEncodedSemanticClassifications(fileName, createTextSpan(start, length2))) - ); - } - getSyntacticDiagnostics(fileName) { - return this.forwardJSONCall( - `getSyntacticDiagnostics('${fileName}')`, - () => { - const diagnostics = this.languageService.getSyntacticDiagnostics(fileName); - return this.realizeDiagnostics(diagnostics); - } - ); - } - getSemanticDiagnostics(fileName) { - return this.forwardJSONCall( - `getSemanticDiagnostics('${fileName}')`, - () => { - const diagnostics = this.languageService.getSemanticDiagnostics(fileName); - return this.realizeDiagnostics(diagnostics); - } - ); - } - getSuggestionDiagnostics(fileName) { - return this.forwardJSONCall(`getSuggestionDiagnostics('${fileName}')`, () => this.realizeDiagnostics(this.languageService.getSuggestionDiagnostics(fileName))); - } - getCompilerOptionsDiagnostics() { - return this.forwardJSONCall( - "getCompilerOptionsDiagnostics()", - () => { - const diagnostics = this.languageService.getCompilerOptionsDiagnostics(); - return this.realizeDiagnostics(diagnostics); - } - ); - } - /// QUICKINFO - /** - * Computes a string representation of the type at the requested position - * in the active file. - */ - getQuickInfoAtPosition(fileName, position) { - return this.forwardJSONCall( - `getQuickInfoAtPosition('${fileName}', ${position})`, - () => this.languageService.getQuickInfoAtPosition(fileName, position) - ); - } - /// NAMEORDOTTEDNAMESPAN - /** - * Computes span information of the name or dotted name at the requested position - * in the active file. - */ - getNameOrDottedNameSpan(fileName, startPos, endPos) { - return this.forwardJSONCall( - `getNameOrDottedNameSpan('${fileName}', ${startPos}, ${endPos})`, - () => this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos) - ); - } - /** - * STATEMENTSPAN - * Computes span information of statement at the requested position in the active file. - */ - getBreakpointStatementAtPosition(fileName, position) { - return this.forwardJSONCall( - `getBreakpointStatementAtPosition('${fileName}', ${position})`, - () => this.languageService.getBreakpointStatementAtPosition(fileName, position) - ); - } - /// SIGNATUREHELP - getSignatureHelpItems(fileName, position, options) { - return this.forwardJSONCall( - `getSignatureHelpItems('${fileName}', ${position})`, - () => this.languageService.getSignatureHelpItems(fileName, position, options) - ); - } - /// GOTO DEFINITION - /** - * Computes the definition location and file for the symbol - * at the requested position. - */ - getDefinitionAtPosition(fileName, position) { - return this.forwardJSONCall( - `getDefinitionAtPosition('${fileName}', ${position})`, - () => this.languageService.getDefinitionAtPosition(fileName, position) - ); - } - /** - * Computes the definition location and file for the symbol - * at the requested position. - */ - getDefinitionAndBoundSpan(fileName, position) { - return this.forwardJSONCall( - `getDefinitionAndBoundSpan('${fileName}', ${position})`, - () => this.languageService.getDefinitionAndBoundSpan(fileName, position) - ); - } - /// GOTO Type - /** - * Computes the definition location of the type of the symbol - * at the requested position. - */ - getTypeDefinitionAtPosition(fileName, position) { - return this.forwardJSONCall( - `getTypeDefinitionAtPosition('${fileName}', ${position})`, - () => this.languageService.getTypeDefinitionAtPosition(fileName, position) - ); - } - /// GOTO Implementation - /** - * Computes the implementation location of the symbol - * at the requested position. - */ - getImplementationAtPosition(fileName, position) { - return this.forwardJSONCall( - `getImplementationAtPosition('${fileName}', ${position})`, - () => this.languageService.getImplementationAtPosition(fileName, position) - ); - } - getRenameInfo(fileName, position, preferences) { - return this.forwardJSONCall( - `getRenameInfo('${fileName}', ${position})`, - () => this.languageService.getRenameInfo(fileName, position, preferences) - ); - } - getSmartSelectionRange(fileName, position) { - return this.forwardJSONCall( - `getSmartSelectionRange('${fileName}', ${position})`, - () => this.languageService.getSmartSelectionRange(fileName, position) - ); - } - findRenameLocations(fileName, position, findInStrings, findInComments, preferences) { - return this.forwardJSONCall( - `findRenameLocations('${fileName}', ${position}, ${findInStrings}, ${findInComments})`, - () => this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments, preferences) - ); - } - /// GET BRACE MATCHING - getBraceMatchingAtPosition(fileName, position) { - return this.forwardJSONCall( - `getBraceMatchingAtPosition('${fileName}', ${position})`, - () => this.languageService.getBraceMatchingAtPosition(fileName, position) - ); - } - isValidBraceCompletionAtPosition(fileName, position, openingBrace) { - return this.forwardJSONCall( - `isValidBraceCompletionAtPosition('${fileName}', ${position}, ${openingBrace})`, - () => this.languageService.isValidBraceCompletionAtPosition(fileName, position, openingBrace) - ); - } - getSpanOfEnclosingComment(fileName, position, onlyMultiLine) { - return this.forwardJSONCall( - `getSpanOfEnclosingComment('${fileName}', ${position})`, - () => this.languageService.getSpanOfEnclosingComment(fileName, position, onlyMultiLine) - ); - } - /// GET SMART INDENT - getIndentationAtPosition(fileName, position, options) { - return this.forwardJSONCall( - `getIndentationAtPosition('${fileName}', ${position})`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getIndentationAtPosition(fileName, position, localOptions); - } - ); - } - /// GET REFERENCES - getReferencesAtPosition(fileName, position) { - return this.forwardJSONCall( - `getReferencesAtPosition('${fileName}', ${position})`, - () => this.languageService.getReferencesAtPosition(fileName, position) - ); - } - findReferences(fileName, position) { - return this.forwardJSONCall( - `findReferences('${fileName}', ${position})`, - () => this.languageService.findReferences(fileName, position) - ); - } - getFileReferences(fileName) { - return this.forwardJSONCall( - `getFileReferences('${fileName})`, - () => this.languageService.getFileReferences(fileName) - ); - } - getDocumentHighlights(fileName, position, filesToSearch) { - return this.forwardJSONCall( - `getDocumentHighlights('${fileName}', ${position})`, - () => { - const results = this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); - const normalizedName = toFileNameLowerCase(normalizeSlashes(fileName)); - return filter(results, (r) => toFileNameLowerCase(normalizeSlashes(r.fileName)) === normalizedName); - } - ); - } - /// COMPLETION LISTS - /** - * Get a string based representation of the completions - * to provide at the given source position and providing a member completion - * list if requested. - */ - getCompletionsAtPosition(fileName, position, preferences, formattingSettings) { - return this.forwardJSONCall( - `getCompletionsAtPosition('${fileName}', ${position}, ${preferences}, ${formattingSettings})`, - () => this.languageService.getCompletionsAtPosition(fileName, position, preferences, formattingSettings) - ); - } - /** Get a string based representation of a completion list entry details */ - getCompletionEntryDetails(fileName, position, entryName, formatOptions, source, preferences, data) { - return this.forwardJSONCall( - `getCompletionEntryDetails('${fileName}', ${position}, '${entryName}')`, - () => { - const localOptions = formatOptions === void 0 ? void 0 : JSON.parse(formatOptions); - return this.languageService.getCompletionEntryDetails(fileName, position, entryName, localOptions, source, preferences, data); - } - ); - } - getFormattingEditsForRange(fileName, start, end, options) { - return this.forwardJSONCall( - `getFormattingEditsForRange('${fileName}', ${start}, ${end})`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions); - } - ); - } - getFormattingEditsForDocument(fileName, options) { - return this.forwardJSONCall( - `getFormattingEditsForDocument('${fileName}')`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getFormattingEditsForDocument(fileName, localOptions); - } - ); - } - getFormattingEditsAfterKeystroke(fileName, position, key, options) { - return this.forwardJSONCall( - `getFormattingEditsAfterKeystroke('${fileName}', ${position}, '${key}')`, - () => { - const localOptions = JSON.parse(options); - return this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions); - } - ); - } - getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) { - return this.forwardJSONCall( - `getDocCommentTemplateAtPosition('${fileName}', ${position})`, - () => this.languageService.getDocCommentTemplateAtPosition(fileName, position, options, formatOptions) - ); - } - /// NAVIGATE TO - /** Return a list of symbols that are interesting to navigate to */ - getNavigateToItems(searchValue, maxResultCount, fileName) { - return this.forwardJSONCall( - `getNavigateToItems('${searchValue}', ${maxResultCount}, ${fileName})`, - () => this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName) - ); - } - getNavigationBarItems(fileName) { - return this.forwardJSONCall( - `getNavigationBarItems('${fileName}')`, - () => this.languageService.getNavigationBarItems(fileName) - ); - } - getNavigationTree(fileName) { - return this.forwardJSONCall( - `getNavigationTree('${fileName}')`, - () => this.languageService.getNavigationTree(fileName) - ); - } - getOutliningSpans(fileName) { - return this.forwardJSONCall( - `getOutliningSpans('${fileName}')`, - () => this.languageService.getOutliningSpans(fileName) - ); - } - getTodoComments(fileName, descriptors) { - return this.forwardJSONCall( - `getTodoComments('${fileName}')`, - () => this.languageService.getTodoComments(fileName, JSON.parse(descriptors)) - ); - } - /// CALL HIERARCHY - prepareCallHierarchy(fileName, position) { - return this.forwardJSONCall( - `prepareCallHierarchy('${fileName}', ${position})`, - () => this.languageService.prepareCallHierarchy(fileName, position) - ); - } - provideCallHierarchyIncomingCalls(fileName, position) { - return this.forwardJSONCall( - `provideCallHierarchyIncomingCalls('${fileName}', ${position})`, - () => this.languageService.provideCallHierarchyIncomingCalls(fileName, position) - ); - } - provideCallHierarchyOutgoingCalls(fileName, position) { - return this.forwardJSONCall( - `provideCallHierarchyOutgoingCalls('${fileName}', ${position})`, - () => this.languageService.provideCallHierarchyOutgoingCalls(fileName, position) - ); - } - provideInlayHints(fileName, span, preference) { - return this.forwardJSONCall( - `provideInlayHints('${fileName}', '${JSON.stringify(span)}', ${JSON.stringify(preference)})`, - () => this.languageService.provideInlayHints(fileName, span, preference) - ); - } - /// Emit - getEmitOutput(fileName) { - return this.forwardJSONCall( - `getEmitOutput('${fileName}')`, - () => { - const { diagnostics, ...rest } = this.languageService.getEmitOutput(fileName); - return { ...rest, diagnostics: this.realizeDiagnostics(diagnostics) }; - } - ); - } - getEmitOutputObject(fileName) { - return forwardCall( - this.logger, - `getEmitOutput('${fileName}')`, - /*returnJson*/ - false, - () => this.languageService.getEmitOutput(fileName), - this.logPerformance - ); - } - toggleLineComment(fileName, textRange) { - return this.forwardJSONCall( - `toggleLineComment('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.toggleLineComment(fileName, textRange) - ); - } - toggleMultilineComment(fileName, textRange) { - return this.forwardJSONCall( - `toggleMultilineComment('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.toggleMultilineComment(fileName, textRange) - ); - } - commentSelection(fileName, textRange) { - return this.forwardJSONCall( - `commentSelection('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.commentSelection(fileName, textRange) - ); - } - uncommentSelection(fileName, textRange) { - return this.forwardJSONCall( - `uncommentSelection('${fileName}', '${JSON.stringify(textRange)}')`, - () => this.languageService.uncommentSelection(fileName, textRange) - ); - } - }; - ClassifierShimObject = class extends ShimBase { - constructor(factory2, logger) { - super(factory2); - this.logger = logger; - this.logPerformance = false; - this.classifier = createClassifier(); - } - getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent = false) { - return forwardJSONCall( - this.logger, - "getEncodedLexicalClassifications", - () => convertClassifications(this.classifier.getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent)), - this.logPerformance - ); - } - /// COLORIZATION - getClassificationsForLine(text, lexState, classifyKeywordsInGenerics = false) { - const classification = this.classifier.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics); - let result = ""; - for (const item of classification.entries) { - result += item.length + "\n"; - result += item.classification + "\n"; - } - result += classification.finalLexState; - return result; - } - }; - CoreServicesShimObject = class extends ShimBase { - constructor(factory2, logger, host) { - super(factory2); - this.logger = logger; - this.host = host; - this.logPerformance = false; - } - forwardJSONCall(actionDescription2, action) { - return forwardJSONCall(this.logger, actionDescription2, action, this.logPerformance); - } - resolveModuleName(fileName, moduleName, compilerOptionsJson) { - return this.forwardJSONCall(`resolveModuleName('${fileName}')`, () => { - const compilerOptions = JSON.parse(compilerOptionsJson); - const result = resolveModuleName(moduleName, normalizeSlashes(fileName), compilerOptions, this.host); - let resolvedFileName = result.resolvedModule ? result.resolvedModule.resolvedFileName : void 0; - if (result.resolvedModule && result.resolvedModule.extension !== ".ts" /* Ts */ && result.resolvedModule.extension !== ".tsx" /* Tsx */ && result.resolvedModule.extension !== ".d.ts" /* Dts */) { - resolvedFileName = void 0; - } - return { - resolvedFileName, - failedLookupLocations: result.failedLookupLocations, - affectingLocations: result.affectingLocations - }; - }); - } - resolveTypeReferenceDirective(fileName, typeReferenceDirective, compilerOptionsJson) { - return this.forwardJSONCall(`resolveTypeReferenceDirective(${fileName})`, () => { - const compilerOptions = JSON.parse(compilerOptionsJson); - const result = resolveTypeReferenceDirective(typeReferenceDirective, normalizeSlashes(fileName), compilerOptions, this.host); - return { - resolvedFileName: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.resolvedFileName : void 0, - primary: result.resolvedTypeReferenceDirective ? result.resolvedTypeReferenceDirective.primary : true, - failedLookupLocations: result.failedLookupLocations - }; - }); - } - getPreProcessedFileInfo(fileName, sourceTextSnapshot) { - return this.forwardJSONCall( - `getPreProcessedFileInfo('${fileName}')`, - () => { - const result = preProcessFile( - getSnapshotText(sourceTextSnapshot), - /*readImportFiles*/ - true, - /*detectJavaScriptImports*/ - true - ); - return { - referencedFiles: this.convertFileReferences(result.referencedFiles), - importedFiles: this.convertFileReferences(result.importedFiles), - ambientExternalModules: result.ambientExternalModules, - isLibFile: result.isLibFile, - typeReferenceDirectives: this.convertFileReferences(result.typeReferenceDirectives), - libReferenceDirectives: this.convertFileReferences(result.libReferenceDirectives) - }; - } - ); - } - getAutomaticTypeDirectiveNames(compilerOptionsJson) { - return this.forwardJSONCall( - `getAutomaticTypeDirectiveNames('${compilerOptionsJson}')`, - () => { - const compilerOptions = JSON.parse(compilerOptionsJson); - return getAutomaticTypeDirectiveNames(compilerOptions, this.host); - } - ); - } - convertFileReferences(refs) { - if (!refs) { - return void 0; - } - const result = []; - for (const ref of refs) { - result.push({ - path: normalizeSlashes(ref.fileName), - position: ref.pos, - length: ref.end - ref.pos - }); - } - return result; - } - getTSConfigFileInfo(fileName, sourceTextSnapshot) { - return this.forwardJSONCall( - `getTSConfigFileInfo('${fileName}')`, - () => { - const result = parseJsonText(fileName, getSnapshotText(sourceTextSnapshot)); - const normalizedFileName = normalizeSlashes(fileName); - const configFile = parseJsonSourceFileConfigFileContent( - result, - this.host, - getDirectoryPath(normalizedFileName), - /*existingOptions*/ - {}, - normalizedFileName - ); - return { - options: configFile.options, - typeAcquisition: configFile.typeAcquisition, - files: configFile.fileNames, - raw: configFile.raw, - errors: realizeDiagnostics([...result.parseDiagnostics, ...configFile.errors], "\r\n") - }; - } - ); - } - getDefaultCompilationSettings() { - return this.forwardJSONCall( - "getDefaultCompilationSettings()", - () => getDefaultCompilerOptions2() - ); - } - discoverTypings(discoverTypingsJson) { - const getCanonicalFileName = createGetCanonicalFileName( - /*useCaseSensitiveFileNames*/ - false - ); - return this.forwardJSONCall("discoverTypings()", () => { - const info = JSON.parse(discoverTypingsJson); - if (this.safeList === void 0) { - this.safeList = ts_JsTyping_exports.loadSafeList(this.host, toPath(info.safeListPath, info.safeListPath, getCanonicalFileName)); - } - return ts_JsTyping_exports.discoverTypings( - this.host, - (msg) => this.logger.log(msg), - info.fileNames, - toPath(info.projectRootPath, info.projectRootPath, getCanonicalFileName), - this.safeList, - info.packageNameToTypingLocation, - info.typeAcquisition, - info.unresolvedImports, - info.typesRegistry, - emptyOptions - ); - }); - } - }; - TypeScriptServicesFactory = class { - constructor() { - this._shims = []; - } - /* - * Returns script API version. - */ - getServicesVersion() { - return servicesVersion; - } - createLanguageServiceShim(host) { - try { - if (this.documentRegistry === void 0) { - this.documentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()); - } - const hostAdapter = new LanguageServiceShimHostAdapter(host); - const languageService = createLanguageService( - hostAdapter, - this.documentRegistry, - /*syntaxOnlyOrLanguageServiceMode*/ - false - ); - return new LanguageServiceShimObject(this, host, languageService); - } catch (err) { - logInternalError(host, err); - throw err; - } - } - createClassifierShim(logger) { - try { - return new ClassifierShimObject(this, logger); - } catch (err) { - logInternalError(logger, err); - throw err; - } - } - createCoreServicesShim(host) { - try { - const adapter = new CoreServicesShimHostAdapter(host); - return new CoreServicesShimObject(this, host, adapter); - } catch (err) { - logInternalError(host, err); - throw err; - } - } - close() { - clear(this._shims); - this.documentRegistry = void 0; - } - registerShim(shim) { - this._shims.push(shim); - } - unregisterShim(shim) { - for (let i = 0; i < this._shims.length; i++) { - if (this._shims[i] === shim) { - delete this._shims[i]; - return; - } - } - throw new Error("Invalid operation"); - } - }; - } - }); - // src/services/breakpoints.ts function spanInSourceFileAtLocation(sourceFile, position) { if (sourceFile.isDeclarationFile) { @@ -144903,7 +144937,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isBindingPattern(variableDeclaration.name)) { return spanInBindingPattern(variableDeclaration.name); } - if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 1 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) { + if (hasOnlyExpressionInitializer(variableDeclaration) && variableDeclaration.initializer || hasSyntacticModifier(variableDeclaration, 32 /* Export */) || parent2.parent.kind === 250 /* ForOfStatement */) { return textSpanFromVariableDeclaration(variableDeclaration); } if (isVariableDeclarationList(variableDeclaration.parent) && variableDeclaration.parent.declarations[0] !== variableDeclaration) { @@ -144911,7 +144945,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function canHaveSpanInParameterDeclaration(parameter) { - return !!parameter.initializer || parameter.dotDotDotToken !== void 0 || hasSyntacticModifier(parameter, 4 /* Public */ | 8 /* Private */); + return !!parameter.initializer || parameter.dotDotDotToken !== void 0 || hasSyntacticModifier(parameter, 1 /* Public */ | 2 /* Private */); } function spanInParameterDeclaration(parameter) { if (isBindingPattern(parameter.name)) { @@ -144930,7 +144964,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return hasSyntacticModifier(functionDeclaration, 1 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; + return hasSyntacticModifier(functionDeclaration, 32 /* Export */) || functionDeclaration.parent.kind === 263 /* ClassDeclaration */ && functionDeclaration.kind !== 176 /* Constructor */; } function spanInFunctionDeclaration(functionDeclaration) { if (!functionDeclaration.body) { @@ -144986,10 +145020,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function spanInBindingPattern(bindingPattern) { - const firstBindingElement = forEach( - bindingPattern.elements, - (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 - ); + const firstBindingElement = forEach(bindingPattern.elements, (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0); if (firstBindingElement) { return spanInNode(firstBindingElement); } @@ -145001,10 +145032,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function spanInArrayLiteralOrObjectLiteralDestructuringPattern(node2) { Debug.assert(node2.kind !== 207 /* ArrayBindingPattern */ && node2.kind !== 206 /* ObjectBindingPattern */); const elements = node2.kind === 209 /* ArrayLiteralExpression */ ? node2.elements : node2.properties; - const firstBindingElement = forEach( - elements, - (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0 - ); + const firstBindingElement = forEach(elements, (element) => element.kind !== 232 /* OmittedExpression */ ? element : void 0); if (firstBindingElement) { return spanInNode(firstBindingElement); } @@ -145507,7 +145535,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} forEach(node.statements, collect); } function collectCallSitesOfModuleDeclaration(node, collect) { - if (!hasSyntacticModifier(node, 2 /* Ambient */) && node.body && isModuleBlock(node.body)) { + if (!hasSyntacticModifier(node, 128 /* Ambient */) && node.body && isModuleBlock(node.body)) { forEach(node.body.statements, collect); } } @@ -145808,13 +145836,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } fixedDeclarations == null ? void 0 : fixedDeclarations.add(getNodeId(insertionSite)); - const cloneWithModifier = factory.updateModifiers( + const cloneWithModifier = factory.replaceModifiers( getSynthesizedDeepClone( insertionSite, /*includeTrivia*/ true ), - factory.createNodeArray(factory.createModifiersFromModifierFlags(getSyntacticModifierFlags(insertionSite) | 512 /* Async */)) + factory.createNodeArray(factory.createModifiersFromModifierFlags(getSyntacticModifierFlags(insertionSite) | 1024 /* Async */)) ); changeTracker.replaceNode( sourceFile, @@ -145926,7 +145954,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const declaration = tryCast(symbol.valueDeclaration, isVariableDeclaration); const variableName = declaration && tryCast(declaration.name, isIdentifier); const variableStatement = getAncestor(declaration, 243 /* VariableStatement */); - if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 1 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { + if (!declaration || !variableStatement || declaration.type || !declaration.initializer || variableStatement.getSourceFile() !== sourceFile || hasSyntacticModifier(variableStatement, 32 /* Export */) || !variableName || !isInsideAwaitableBody(declaration.initializer)) { isCompleteFix = false; continue; } @@ -145984,7 +146012,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} checker.getTypeAtLocation(errorNode).flags & 1 /* Any */; } function isInsideAwaitableBody(node) { - return node.kind & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); + return node.flags & 65536 /* AwaitContext */ || !!findAncestor(node, (ancestor) => ancestor.parent && isArrowFunction(ancestor.parent) && ancestor.parent.body === ancestor || isBlock(ancestor) && (ancestor.parent.kind === 262 /* FunctionDeclaration */ || ancestor.parent.kind === 218 /* FunctionExpression */ || ancestor.parent.kind === 219 /* ArrowFunction */ || ancestor.parent.kind === 174 /* MethodDeclaration */)); } function makeChange3(changeTracker, errorCode, sourceFile, checker, insertionSite, fixedDeclarations) { if (isForOfStatement(insertionSite.parent) && !insertionSite.parent.awaitModifier) { @@ -146113,10 +146141,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // src/services/codefixes/addMissingConst.ts function makeChange4(changeTracker, sourceFile, pos, program, fixedNodes) { const token = getTokenAtPosition(sourceFile, pos); - const forInitializer = findAncestor( - token, - (node) => isForInOrOfStatement(node.parent) ? node.parent.initializer === node : isPossiblyPartOfDestructuring(node) ? false : "quit" - ); + const forInitializer = findAncestor(token, (node) => isForInOrOfStatement(node.parent) ? node.parent.initializer === node : isPossiblyPartOfDestructuring(node) ? false : "quit"); if (forInitializer) return applyChange(changeTracker, forInitializer, sourceFile, fixedNodes); const parent2 = token.parent; @@ -146130,10 +146155,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return applyChange(changeTracker, parent2, sourceFile, fixedNodes); } - const commaExpression = findAncestor( - token, - (node) => isExpressionStatement(node.parent) ? true : isPossiblyPartOfCommaSeperatedInitializer(node) ? false : "quit" - ); + const commaExpression = findAncestor(token, (node) => isExpressionStatement(node.parent) ? true : isPossiblyPartOfCommaSeperatedInitializer(node) ? false : "quit"); if (commaExpression) { const checker = program.getTypeChecker(); if (!expressionCouldBeVariableDeclaration(commaExpression, checker)) { @@ -146287,8 +146309,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); // src/services/codefixes/addNameToNamelessParameter.ts - function makeChange7(changeTracker, sourceFile, pos) { - const token = getTokenAtPosition(sourceFile, pos); + function makeChange7(changeTracker, sourceFile, start) { + const token = getTokenAtPosition(sourceFile, start); const param = token.parent; if (!isParameter(param)) { return Debug.fail("Tried to add a parameter name to a non-parameter: " + Debug.formatSyntaxKind(token.kind)); @@ -146296,20 +146318,34 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const i = param.parent.parameters.indexOf(param); Debug.assert(!param.type, "Tried to add a parameter name to a parameter that already had one."); Debug.assert(i > -1, "Parameter not found in parent parameter list."); - const typeNode = factory.createTypeReferenceNode( + let end = param.name.getEnd(); + let typeNode = factory.createTypeReferenceNode( param.name, /*typeArguments*/ void 0 ); + let nextParam = tryGetNextParam(sourceFile, param); + while (nextParam) { + typeNode = factory.createArrayTypeNode(typeNode); + end = nextParam.getEnd(); + nextParam = tryGetNextParam(sourceFile, nextParam); + } const replacement = factory.createParameterDeclaration( param.modifiers, param.dotDotDotToken, "arg" + i, param.questionToken, - param.dotDotDotToken ? factory.createArrayTypeNode(typeNode) : typeNode, + param.dotDotDotToken && !isArrayTypeNode(typeNode) ? factory.createArrayTypeNode(typeNode) : typeNode, param.initializer ); - changeTracker.replaceNode(sourceFile, param, replacement); + changeTracker.replaceRange(sourceFile, createRange(param.getStart(sourceFile), end), replacement); + } + function tryGetNextParam(sourceFile, param) { + const nextToken = findNextToken(param.name, param.parent, sourceFile); + if (nextToken && nextToken.kind === 23 /* OpenBracketToken */ && isArrayBindingPattern(nextToken.parent) && isParameter(nextToken.parent.parent)) { + return nextToken.parent.parent; + } + return void 0; } var fixId7, errorCodes7; var init_addNameToNamelessParameter = __esm({ @@ -147169,19 +147205,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} statements.push(factory.createVariableStatement( /*modifiers*/ void 0, - factory.createVariableDeclarationList( - [ - factory.createVariableDeclaration( - getSynthesizedDeepClone(declareSynthBindingPattern(continuationArgName)), - /*exclamationToken*/ - void 0, - /*type*/ - void 0, - varDeclIdentifier - ) - ], - 2 /* Const */ - ) + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + getSynthesizedDeepClone(declareSynthBindingPattern(continuationArgName)), + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + varDeclIdentifier + ) + ], 2 /* Const */) )); } return statements; @@ -147317,18 +147350,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} factory.createVariableStatement( /*modifiers*/ void 0, - factory.createVariableDeclarationList( - [ - factory.createVariableDeclaration( - getSynthesizedDeepClone(declareSynthBindingName(variableName)), - /*exclamationToken*/ - void 0, - typeAnnotation, - rightHandSide - ) - ], - 2 /* Const */ - ) + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + getSynthesizedDeepClone(declareSynthBindingName(variableName)), + /*exclamationToken*/ + void 0, + typeAnnotation, + rightHandSide + ) + ], 2 /* Const */) ) ]; } @@ -147607,9 +147637,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }); // src/services/codefixes/convertToEsModule.ts - function fixImportOfModuleExports(importingFile, exportingFile, changes, quotePreference) { + function fixImportOfModuleExports(importingFile, exportingFile, program, changes, quotePreference) { + var _a; for (const moduleSpecifier of importingFile.imports) { - const imported = getResolvedModule(importingFile, moduleSpecifier.text, getModeForUsageLocation(importingFile, moduleSpecifier)); + const imported = (_a = program.getResolvedModule(importingFile, moduleSpecifier.text, getModeForUsageLocation(importingFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule; if (!imported || imported.resolvedFileName !== exportingFile.fileName) { continue; } @@ -147892,13 +147923,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (semi) changes.delete(sourceFile, semi); } else { - changes.replaceNodeRangeWithNodes( - sourceFile, - left.expression, - findChildOfKind(left, 25 /* DotToken */, sourceFile), - [factory.createToken(95 /* ExportKeyword */), factory.createToken(87 /* ConstKeyword */)], - { joiner: " ", suffix: " " } - ); + changes.replaceNodeRangeWithNodes(sourceFile, left.expression, findChildOfKind(left, 25 /* DotToken */, sourceFile), [factory.createToken(95 /* ExportKeyword */), factory.createToken(87 /* ConstKeyword */)], { joiner: " ", suffix: " " }); } } function convertExportsDotXEquals_replaceNode(name, exported, useSitesToUnqualify) { @@ -148143,7 +148168,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const moduleExportsChangedToDefault = convertFileToEsModule(sourceFile, program.getTypeChecker(), changes2, getEmitScriptTarget(program.getCompilerOptions()), getQuotePreference(sourceFile, preferences)); if (moduleExportsChangedToDefault) { for (const importingFile of program.getSourceFiles()) { - fixImportOfModuleExports(importingFile, sourceFile, changes2, getQuotePreference(importingFile, preferences)); + fixImportOfModuleExports(importingFile, sourceFile, program, changes2, getQuotePreference(importingFile, preferences)); } } }); @@ -148221,7 +148246,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} false, factory.updateNamedExports(exportClause, filter(exportClause.elements, (e) => !contains(typeExportSpecifiers, e))), exportDeclaration.moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); const typeExportDeclaration = factory.createExportDeclaration( @@ -148231,7 +148256,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} true, factory.createNamedExports(typeExportSpecifiers), exportDeclaration.moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); changes.replaceNode(context.sourceFile, exportDeclaration, valueExportDeclaration, { @@ -148346,7 +148371,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} true ), getSynthesizedDeepClone( - declaration.assertClause, + declaration.attributes, /*includeTrivia*/ true ) @@ -148374,7 +148399,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} true ), getSynthesizedDeepClone( - declaration.assertClause, + declaration.attributes, /*includeTrivia*/ true ) @@ -148391,19 +148416,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} e.name )) ) : importClause.namedBindings; - const importDeclaration = factory.updateImportDeclaration( - declaration, - declaration.modifiers, - factory.updateImportClause( - importClause, - /*isTypeOnly*/ - true, - importClause.name, - newNamedBindings - ), - declaration.moduleSpecifier, - declaration.assertClause - ); + const importDeclaration = factory.updateImportDeclaration(declaration, declaration.modifiers, factory.updateImportClause( + importClause, + /*isTypeOnly*/ + true, + importClause.name, + newNamedBindings + ), declaration.moduleSpecifier, declaration.attributes); changes.replaceNode(sourceFile, declaration, importDeclaration); } } @@ -148667,23 +148686,27 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } function doChange13(changes, sourceFile, { container, typeNode, constraint, name }) { - changes.replaceNode(sourceFile, container, factory.createMappedTypeNode( - /*readonlyToken*/ - void 0, - factory.createTypeParameterDeclaration( - /*modifiers*/ + changes.replaceNode( + sourceFile, + container, + factory.createMappedTypeNode( + /*readonlyToken*/ void 0, - name, - factory.createTypeReferenceNode(constraint) - ), - /*nameType*/ - void 0, - /*questionToken*/ - void 0, - typeNode, - /*members*/ - void 0 - )); + factory.createTypeParameterDeclaration( + /*modifiers*/ + void 0, + name, + factory.createTypeReferenceNode(constraint) + ), + /*nameType*/ + void 0, + /*questionToken*/ + void 0, + typeNode, + /*members*/ + void 0 + ) + ); } var fixId15, errorCodes16; var init_convertLiteralTypeToMappedType = __esm({ @@ -148721,7 +148744,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return Debug.checkDefined(getContainingClass(getTokenAtPosition(sourceFile, pos)), "There should be a containing class"); } function symbolPointsToNonPrivateMember(symbol) { - return !symbol.valueDeclaration || !(getEffectiveModifierFlags(symbol.valueDeclaration) & 8 /* Private */); + return !symbol.valueDeclaration || !(getEffectiveModifierFlags(symbol.valueDeclaration) & 2 /* Private */); } function addMissingDeclarations(context, implementedTypeNode, sourceFile, classDeclaration, changeTracker, preferences) { const checker = context.program.getTypeChecker(); @@ -148992,7 +149015,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} defaultImport, namedImports && arrayFrom(namedImports.entries(), ([name, addAsTypeOnly]) => ({ addAsTypeOnly, name })), namespaceLikeImport, - compilerOptions + compilerOptions, + preferences ); newDeclarations = combine(newDeclarations, declarations); }); @@ -149034,7 +149058,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function getImportCompletionAction(targetSymbol, moduleSymbol, exportMapKey, sourceFile, symbolName2, isJsxTagName, host, program, formatContext, position, preferences, cancellationToken) { - const compilerOptions = program.getCompilerOptions(); let exportInfos; if (exportMapKey) { exportInfos = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken).get(sourceFile.path, exportMapKey); @@ -149055,7 +149078,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} fix, /*includeSymbolNameInDescription*/ false, - compilerOptions, + program, preferences )) }; @@ -149065,7 +149088,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const symbolName2 = single(getSymbolNamesToImport(sourceFile, program.getTypeChecker(), symbolToken, compilerOptions)); const fix = getTypeOnlyPromotionFix(sourceFile, symbolToken, symbolName2, program); const includeSymbolNameInDescription = symbolName2 !== symbolToken.text; - return fix && codeFixActionToCodeAction(codeActionForFix({ host, formatContext, preferences }, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences)); + return fix && codeFixActionToCodeAction(codeActionForFix( + { host, formatContext, preferences }, + sourceFile, + symbolName2, + fix, + includeSymbolNameInDescription, + program, + preferences + )); } function getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences) { const packageJsonImportFilter = createPackageJsonImportFilter(sourceFile, preferences, host); @@ -149292,7 +149323,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const getChecker = createGetChecker(program, host); const moduleResolution = getEmitModuleResolutionKind(compilerOptions); const rejectNodeModulesRelativePaths = moduleResolutionUsesNodeModules(moduleResolution); - const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, sourceFile, moduleSpecifierResolutionHost, preferences); + const getModuleSpecifiers2 = fromCacheOnly ? (moduleSymbol) => ({ moduleSpecifiers: ts_moduleSpecifiers_exports.tryGetModuleSpecifiersFromCache(moduleSymbol, sourceFile, moduleSpecifierResolutionHost, preferences), computedWithoutCache: false }) : (moduleSymbol, checker) => ts_moduleSpecifiers_exports.getModuleSpecifiersWithCacheInfo( + moduleSymbol, + checker, + compilerOptions, + sourceFile, + moduleSpecifierResolutionHost, + preferences, + /*options*/ + void 0, + /*forAutoImport*/ + true + ); let computedWithoutCacheCount = 0; const fixes = flatMap(exportInfo, (exportInfo2, i) => { const checker = getChecker(exportInfo2.isFromPackageJson); @@ -149635,14 +149677,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return allowSyntheticDefaults ? 1 /* Default */ : 3 /* CommonJS */; } - function codeActionForFix(context, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences) { + function codeActionForFix(context, sourceFile, symbolName2, fix, includeSymbolNameInDescription, program, preferences) { let diag2; const changes = ts_textChanges_exports.ChangeTracker.with(context, (tracker) => { - diag2 = codeActionForFixWorker(tracker, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences); + diag2 = codeActionForFixWorker(tracker, sourceFile, symbolName2, fix, includeSymbolNameInDescription, program, preferences); }); return createCodeFixAction(importFixName, changes, diag2, importFixId, Diagnostics.Add_all_missing_imports); } - function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences) { + function codeActionForFixWorker(changes, sourceFile, symbolName2, fix, includeSymbolNameInDescription, program, preferences) { const quotePreference = getQuotePreference(sourceFile, preferences); switch (fix.kind) { case 0 /* UseNamespace */: @@ -149679,7 +149721,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} defaultImport, namedImports, namespaceLikeImport, - compilerOptions + program.getCompilerOptions(), + preferences ), /*blankLineBetween*/ true, @@ -149692,7 +149735,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } case 4 /* PromoteTypeOnly */: { const { typeOnlyAliasDeclaration } = fix; - const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, compilerOptions, sourceFile, preferences); + const promotedDeclaration = promoteFromTypeOnly(changes, typeOnlyAliasDeclaration, program, sourceFile, preferences); return promotedDeclaration.kind === 276 /* ImportSpecifier */ ? [Diagnostics.Remove_type_from_import_of_0_from_1, symbolName2, getModuleSpecifierText(promotedDeclaration.parent.parent)] : [Diagnostics.Remove_type_from_import_declaration_from_0, getModuleSpecifierText(promotedDeclaration)]; } default: @@ -149703,14 +149746,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} var _a, _b; return promotedDeclaration.kind === 271 /* ImportEqualsDeclaration */ ? ((_b = tryCast((_a = tryCast(promotedDeclaration.moduleReference, isExternalModuleReference)) == null ? void 0 : _a.expression, isStringLiteralLike)) == null ? void 0 : _b.text) || promotedDeclaration.moduleReference.getText() : cast(promotedDeclaration.parent.moduleSpecifier, isStringLiteral).text; } - function promoteFromTypeOnly(changes, aliasDeclaration, compilerOptions, sourceFile, preferences) { + function promoteFromTypeOnly(changes, aliasDeclaration, program, sourceFile, preferences) { + const compilerOptions = program.getCompilerOptions(); const convertExistingToTypeOnly = importNameElisionDisabled(compilerOptions); switch (aliasDeclaration.kind) { case 276 /* ImportSpecifier */: if (aliasDeclaration.isTypeOnly) { const sortKind = ts_OrganizeImports_exports.detectImportSpecifierSorting(aliasDeclaration.parent.elements, preferences); if (aliasDeclaration.parent.elements.length > 1 && sortKind) { - changes.delete(sourceFile, aliasDeclaration); const newSpecifier = factory.updateImportSpecifier( aliasDeclaration, /*isTypeOnly*/ @@ -149720,10 +149763,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, sortKind === 2 /* CaseInsensitive */); const insertionIndex = ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(aliasDeclaration.parent.elements, newSpecifier, comparer); - changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex); - } else { - changes.deleteRange(sourceFile, aliasDeclaration.getFirstToken()); + if (aliasDeclaration.parent.elements.indexOf(aliasDeclaration) !== insertionIndex) { + changes.delete(sourceFile, aliasDeclaration); + changes.insertImportSpecifierAtIndex(sourceFile, newSpecifier, aliasDeclaration.parent, insertionIndex); + return aliasDeclaration; + } } + changes.deleteRange(sourceFile, aliasDeclaration.getFirstToken()); return aliasDeclaration; } else { Debug.assert(aliasDeclaration.parent.parent.isTypeOnly); @@ -149743,10 +149789,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} Debug.failBadSyntaxKind(aliasDeclaration); } function promoteImportClause(importClause) { + var _a; changes.delete(sourceFile, getTypeKeywordOfTypeOnlyImport(importClause, sourceFile)); if (!compilerOptions.allowImportingTsExtensions) { const moduleSpecifier = tryGetModuleSpecifierFromDeclaration(importClause.parent); - const resolvedModule = moduleSpecifier && getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier)); + const resolvedModule = moduleSpecifier && ((_a = program.getResolvedModule(sourceFile, moduleSpecifier.text, getModeForUsageLocation(sourceFile, moduleSpecifier))) == null ? void 0 : _a.resolvedModule); if (resolvedModule == null ? void 0 : resolvedModule.resolvedUsingTsExtension) { const changedExtension = changeAnyExtension(moduleSpecifier.text, getOutputExtension(moduleSpecifier.text, compilerOptions)); changes.replaceNode(sourceFile, moduleSpecifier, factory.createStringLiteral(changedExtension)); @@ -149805,12 +149852,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const comparer = ts_OrganizeImports_exports.getOrganizeImportsComparer(preferences, ignoreCaseForSorting); const newSpecifiers = stableSort( - namedImports.map((namedImport) => factory.createImportSpecifier( - (!clause.isTypeOnly || promoteFromTypeOnly2) && needsTypeOnly(namedImport), - /*propertyName*/ - void 0, - factory.createIdentifier(namedImport.name) - )), + namedImports.map( + (namedImport) => factory.createImportSpecifier( + (!clause.isTypeOnly || promoteFromTypeOnly2) && shouldUseTypeOnly(namedImport, preferences), + /*propertyName*/ + void 0, + factory.createIdentifier(namedImport.name) + ) + ), (s1, s2) => ts_OrganizeImports_exports.compareImportOrExportSpecifiers(s1, s2, comparer) ); const specifierSort = (existingSpecifiers == null ? void 0 : existingSpecifiers.length) && ts_OrganizeImports_exports.detectImportSpecifierSorting(existingSpecifiers, preferences); @@ -149869,42 +149918,50 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function needsTypeOnly({ addAsTypeOnly }) { return addAsTypeOnly === 2 /* Required */; } - function getNewImports(moduleSpecifier, quotePreference, defaultImport, namedImports, namespaceLikeImport, compilerOptions) { + function shouldUseTypeOnly(info, preferences) { + return needsTypeOnly(info) || !!preferences.preferTypeOnlyAutoImports && info.addAsTypeOnly !== 4 /* NotAllowed */; + } + function getNewImports(moduleSpecifier, quotePreference, defaultImport, namedImports, namespaceLikeImport, compilerOptions, preferences) { const quotedModuleSpecifier = makeStringLiteral(moduleSpecifier, quotePreference); let statements; if (defaultImport !== void 0 || (namedImports == null ? void 0 : namedImports.length)) { - const topLevelTypeOnly = (!defaultImport || needsTypeOnly(defaultImport)) && every(namedImports, needsTypeOnly) || compilerOptions.verbatimModuleSyntax && (defaultImport == null ? void 0 : defaultImport.addAsTypeOnly) !== 4 /* NotAllowed */ && !some(namedImports, (i) => i.addAsTypeOnly === 4 /* NotAllowed */); - statements = combine(statements, makeImport( - defaultImport && factory.createIdentifier(defaultImport.name), - namedImports == null ? void 0 : namedImports.map(({ addAsTypeOnly, name }) => factory.createImportSpecifier( - !topLevelTypeOnly && addAsTypeOnly === 2 /* Required */, - /*propertyName*/ - void 0, - factory.createIdentifier(name) - )), - moduleSpecifier, - quotePreference, - topLevelTypeOnly - )); + const topLevelTypeOnly = (!defaultImport || needsTypeOnly(defaultImport)) && every(namedImports, needsTypeOnly) || (compilerOptions.verbatimModuleSyntax || preferences.preferTypeOnlyAutoImports) && (defaultImport == null ? void 0 : defaultImport.addAsTypeOnly) !== 4 /* NotAllowed */ && !some(namedImports, (i) => i.addAsTypeOnly === 4 /* NotAllowed */); + statements = combine( + statements, + makeImport( + defaultImport && factory.createIdentifier(defaultImport.name), + namedImports == null ? void 0 : namedImports.map( + (namedImport) => factory.createImportSpecifier( + !topLevelTypeOnly && shouldUseTypeOnly(namedImport, preferences), + /*propertyName*/ + void 0, + factory.createIdentifier(namedImport.name) + ) + ), + moduleSpecifier, + quotePreference, + topLevelTypeOnly + ) + ); } if (namespaceLikeImport) { const declaration = namespaceLikeImport.importKind === 3 /* CommonJS */ ? factory.createImportEqualsDeclaration( /*modifiers*/ void 0, - needsTypeOnly(namespaceLikeImport), + shouldUseTypeOnly(namespaceLikeImport, preferences), factory.createIdentifier(namespaceLikeImport.name), factory.createExternalModuleReference(quotedModuleSpecifier) ) : factory.createImportDeclaration( /*modifiers*/ void 0, factory.createImportClause( - needsTypeOnly(namespaceLikeImport), + shouldUseTypeOnly(namespaceLikeImport, preferences), /*name*/ void 0, factory.createNamespaceImport(factory.createIdentifier(namespaceLikeImport.name)) ), quotedModuleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 ); statements = combine(statements, declaration); @@ -149943,24 +150000,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return factory.createVariableStatement( /*modifiers*/ void 0, - factory.createVariableDeclarationList( - [ - factory.createVariableDeclaration( - typeof name === "string" ? factory.createIdentifier(name) : name, - /*exclamationToken*/ - void 0, - /*type*/ + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + typeof name === "string" ? factory.createIdentifier(name) : name, + /*exclamationToken*/ + void 0, + /*type*/ + void 0, + factory.createCallExpression( + factory.createIdentifier("require"), + /*typeArguments*/ void 0, - factory.createCallExpression( - factory.createIdentifier("require"), - /*typeArguments*/ - void 0, - [quotedModuleSpecifier] - ) + [quotedModuleSpecifier] ) - ], - 2 /* Const */ - ) + ) + ], 2 /* Const */) ); } function symbolHasMeaning({ declarations }, meaning) { @@ -150028,16 +150082,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); if (!info) return void 0; - return info.map(({ fix, symbolName: symbolName2, errorIdentifierText }) => codeActionForFix( - context, - sourceFile, - symbolName2, - fix, - /*includeSymbolNameInDescription*/ - symbolName2 !== errorIdentifierText, - program.getCompilerOptions(), - preferences - )); + return info.map( + ({ fix, symbolName: symbolName2, errorIdentifierText }) => codeActionForFix( + context, + sourceFile, + symbolName2, + fix, + /*includeSymbolNameInDescription*/ + symbolName2 !== errorIdentifierText, + program, + preferences + ) + ); }, fixIds: [importFixId], getAllCodeActions: (context) => { @@ -150447,7 +150503,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // src/services/codefixes/fixImportNonExportedMember.ts function getInfo7(sourceFile, pos, program) { - var _a; + var _a, _b; const token = getTokenAtPosition(sourceFile, pos); if (isIdentifier(token)) { const importDeclaration = findAncestor(token, isImportDeclaration); @@ -150456,19 +150512,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const moduleSpecifier = isStringLiteral(importDeclaration.moduleSpecifier) ? importDeclaration.moduleSpecifier.text : void 0; if (moduleSpecifier === void 0) return void 0; - const resolvedModule = getResolvedModule( + const resolvedModule = (_a = program.getResolvedModule( sourceFile, moduleSpecifier, /*mode*/ void 0 - ); + )) == null ? void 0 : _a.resolvedModule; if (resolvedModule === void 0) return void 0; const moduleSourceFile = program.getSourceFile(resolvedModule.resolvedFileName); if (moduleSourceFile === void 0 || isSourceFileFromLibrary(program, moduleSourceFile)) return void 0; const moduleSymbol = moduleSourceFile.symbol; - const locals = (_a = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _a.locals; + const locals = (_b = tryCast(moduleSymbol.valueDeclaration, canHaveLocals)) == null ? void 0 : _b.locals; if (locals === void 0) return void 0; const localSymbol = locals.get(token.escapedText); @@ -150523,30 +150579,26 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ) ), node.moduleSpecifier, - node.assertClause + node.attributes ) ); } function createExport(changes, program, sourceFile, names) { - changes.insertNodeAtEndOfScope( - sourceFile, - sourceFile, - factory.createExportDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - factory.createNamedExports(createExportSpecifiers( - names, - /*allowTypeModifier*/ - getIsolatedModules(program.getCompilerOptions()) - )), - /*moduleSpecifier*/ - void 0, - /*assertClause*/ - void 0 - ) - ); + changes.insertNodeAtEndOfScope(sourceFile, sourceFile, factory.createExportDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + factory.createNamedExports(createExportSpecifiers( + names, + /*allowTypeModifier*/ + getIsolatedModules(program.getCompilerOptions()) + )), + /*moduleSpecifier*/ + void 0, + /*attributes*/ + void 0 + )); } function createExportSpecifiers(names, allowTypeModifier) { return factory.createNodeArray(map(names, (n) => factory.createExportSpecifier( @@ -150720,7 +150772,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const tag = findAncestor(node, isJsxOpeningLikeElement); const props = checker.getContextualTypeForArgumentAtIndex(tag, 0); suggestedSymbol = checker.getSuggestedSymbolForNonexistentJSXAttribute(node, props); - } else if (hasSyntacticModifier(parent2, 16384 /* Override */) && isClassElement(parent2) && parent2.name === node) { + } else if (hasOverrideModifier(parent2) && isClassElement(parent2) && parent2.name === node) { const baseDeclaration = findAncestor(node, isClassLike); const baseTypeNode = baseDeclaration ? getEffectiveBaseTypeNode(baseDeclaration) : void 0; const baseType = baseTypeNode ? checker.getTypeAtLocation(baseTypeNode) : void 0; @@ -150762,9 +150814,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return flags; } function getResolvedSourceFileFromImportDeclaration(sourceFile, context, importDeclaration) { + var _a; if (!importDeclaration || !isStringLiteralLike(importDeclaration.moduleSpecifier)) return void 0; - const resolvedModule = getResolvedModule(sourceFile, importDeclaration.moduleSpecifier.text, getModeForUsageLocation(sourceFile, importDeclaration.moduleSpecifier)); + const resolvedModule = (_a = context.program.getResolvedModule(sourceFile, importDeclaration.moduleSpecifier.text, getModeForUsageLocation(sourceFile, importDeclaration.moduleSpecifier))) == null ? void 0 : _a.resolvedModule; if (!resolvedModule) return void 0; return context.program.getSourceFile(resolvedModule.resolvedFileName); @@ -150881,7 +150934,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isFunctionType) { const sig = checker.getSignatureFromDeclaration(declaration); if (sig) { - if (hasSyntacticModifier(declaration, 512 /* Async */)) { + if (hasSyntacticModifier(declaration, 1024 /* Async */)) { exprType = checker.createPromiseType(exprType); } const newSig = checker.createSignature( @@ -151153,13 +151206,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const moduleDeclaration = find(symbol.declarations, isModuleDeclaration); const moduleDeclarationSourceFile = moduleDeclaration == null ? void 0 : moduleDeclaration.getSourceFile(); if (moduleDeclaration && moduleDeclarationSourceFile && !isSourceFileFromLibrary(program, moduleDeclarationSourceFile)) { - return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile, modifierFlags: 1 /* Export */, parentDeclaration: moduleDeclaration }; + return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile, modifierFlags: 32 /* Export */, parentDeclaration: moduleDeclaration }; } const moduleSourceFile = find(symbol.declarations, isSourceFile); if (sourceFile.commonJsModuleIndicator) return void 0; if (moduleSourceFile && !isSourceFileFromLibrary(program, moduleSourceFile)) { - return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile: moduleSourceFile, modifierFlags: 1 /* Export */, parentDeclaration: moduleSourceFile }; + return { kind: 2 /* Function */, token, call: parent2.parent, sourceFile: moduleSourceFile, modifierFlags: 32 /* Export */, parentDeclaration: moduleSourceFile }; } } const classDeclaration = find(symbol.declarations, isClassLike); @@ -151171,7 +151224,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (makeStatic && (isPrivateIdentifier(token) || isInterfaceDeclaration(declaration))) return void 0; const declSourceFile = declaration.getSourceFile(); - const modifierFlags = isTypeLiteralNode(declaration) ? 0 /* None */ : (makeStatic ? 32 /* Static */ : 0 /* None */) | (startsWithUnderscore(token.text) ? 8 /* Private */ : 0 /* None */); + const modifierFlags = isTypeLiteralNode(declaration) ? 0 /* None */ : (makeStatic ? 256 /* Static */ : 0 /* None */) | (startsWithUnderscore(token.text) ? 2 /* Private */ : 0 /* None */); const isJSFile = isSourceFileJS(declSourceFile); const call = tryCast(parent2.parent, isCallExpression); return { kind: 0 /* TypeLikeDeclaration */, token, call, modifierFlags, parentDeclaration: declaration, declSourceFile, isJSFile }; @@ -151189,11 +151242,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isInterfaceDeclaration(parentDeclaration) || isTypeLiteralNode(parentDeclaration)) { return void 0; } - const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMemberInJs(t, declSourceFile, parentDeclaration, token, !!(modifierFlags & 32 /* Static */))); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (t) => addMissingMemberInJs(t, declSourceFile, parentDeclaration, token, !!(modifierFlags & 256 /* Static */))); if (changes.length === 0) { return void 0; } - const diagnostic = modifierFlags & 32 /* Static */ ? Diagnostics.Initialize_static_property_0 : isPrivateIdentifier(token) ? Diagnostics.Declare_a_private_field_named_0 : Diagnostics.Initialize_property_0_in_the_constructor; + const diagnostic = modifierFlags & 256 /* Static */ ? Diagnostics.Initialize_static_property_0 : isPrivateIdentifier(token) ? Diagnostics.Declare_a_private_field_named_0 : Diagnostics.Initialize_property_0_in_the_constructor; return createCodeFixAction(fixMissingMember, changes, [diagnostic, token.text], fixMissingMember, Diagnostics.Add_all_missing_members); } function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token, makeStatic) { @@ -151237,15 +151290,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function createActionsForAddMissingMemberInTypeScriptFile(context, { parentDeclaration, declSourceFile, modifierFlags, token }) { const memberName = token.text; - const isStatic2 = modifierFlags & 32 /* Static */; + const isStatic2 = modifierFlags & 256 /* Static */; const typeNode = getTypeNode2(context.program.getTypeChecker(), parentDeclaration, token); const addPropertyDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addPropertyDeclaration(t, declSourceFile, parentDeclaration, memberName, typeNode, modifierFlags2)); - const actions2 = [createCodeFixAction(fixMissingMember, addPropertyDeclarationChanges(modifierFlags & 32 /* Static */), [isStatic2 ? Diagnostics.Declare_static_property_0 : Diagnostics.Declare_property_0, memberName], fixMissingMember, Diagnostics.Add_all_missing_members)]; + const actions2 = [createCodeFixAction(fixMissingMember, addPropertyDeclarationChanges(modifierFlags & 256 /* Static */), [isStatic2 ? Diagnostics.Declare_static_property_0 : Diagnostics.Declare_property_0, memberName], fixMissingMember, Diagnostics.Add_all_missing_members)]; if (isStatic2 || isPrivateIdentifier(token)) { return actions2; } - if (modifierFlags & 8 /* Private */) { - actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addPropertyDeclarationChanges(8 /* Private */), [Diagnostics.Declare_private_property_0, memberName])); + if (modifierFlags & 2 /* Private */) { + actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addPropertyDeclarationChanges(2 /* Private */), [Diagnostics.Declare_private_property_0, memberName])); } actions2.push(createAddIndexSignatureAction(context, declSourceFile, parentDeclaration, token.text, typeNode)); return actions2; @@ -151332,9 +151385,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const methodName = token.text; const addMethodDeclarationChanges = (modifierFlags2) => ts_textChanges_exports.ChangeTracker.with(context, (t) => addMethodDeclaration(context, t, call, token, modifierFlags2, parentDeclaration, declSourceFile)); - const actions2 = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & 32 /* Static */), [modifierFlags & 32 /* Static */ ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)]; - if (modifierFlags & 8 /* Private */) { - actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addMethodDeclarationChanges(8 /* Private */), [Diagnostics.Declare_private_method_0, methodName])); + const actions2 = [createCodeFixAction(fixMissingMember, addMethodDeclarationChanges(modifierFlags & 256 /* Static */), [modifierFlags & 256 /* Static */ ? Diagnostics.Declare_static_method_0 : Diagnostics.Declare_method_0, methodName], fixMissingMember, Diagnostics.Add_all_missing_members)]; + if (modifierFlags & 2 /* Private */) { + actions2.unshift(createCodeFixActionWithoutFixAll(fixMissingMember, addMethodDeclarationChanges(2 /* Private */), [Diagnostics.Declare_private_method_0, methodName])); } return actions2; } @@ -151356,15 +151409,20 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return !!(type && type.flags & 402653316 /* StringLike */); }); const enumMember = factory.createEnumMember(token, hasStringInitializer ? factory.createStringLiteral(token.text) : void 0); - changes.replaceNode(parentDeclaration.getSourceFile(), parentDeclaration, factory.updateEnumDeclaration( + changes.replaceNode( + parentDeclaration.getSourceFile(), parentDeclaration, - parentDeclaration.modifiers, - parentDeclaration.name, - concatenate(parentDeclaration.members, singleElementArray(enumMember)) - ), { - leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll, - trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude - }); + factory.updateEnumDeclaration( + parentDeclaration, + parentDeclaration.modifiers, + parentDeclaration.name, + concatenate(parentDeclaration.members, singleElementArray(enumMember)) + ), + { + leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.IncludeAll, + trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.Exclude + } + ); } function addFunctionDeclaration(changes, context, info) { const quotePreference = getQuotePreference(context.sourceFile, context.preferences); @@ -151599,7 +151657,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (prop && isComputedPropertyName(prop)) return prop; } - return createPropertyNameNodeForIdentifierOrLiteral(symbol.name, target, quotePreference === 0 /* Single */); + return createPropertyNameNodeForIdentifierOrLiteral( + symbol.name, + target, + quotePreference === 0 /* Single */, + /*stringNamed*/ + false, + /*isMethod*/ + false + ); } function findScope(node) { if (findAncestor(node, isJsxExpression)) { @@ -151695,13 +151761,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} continue; const { parentDeclaration, declSourceFile, modifierFlags, token, call, isJSFile } = info; if (call && !isPrivateIdentifier(token)) { - addMethodDeclaration(context, changes, call, token, modifierFlags & 32 /* Static */, parentDeclaration, declSourceFile); + addMethodDeclaration(context, changes, call, token, modifierFlags & 256 /* Static */, parentDeclaration, declSourceFile); } else { if (isJSFile && !isInterfaceDeclaration(parentDeclaration) && !isTypeLiteralNode(parentDeclaration)) { - addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, !!(modifierFlags & 32 /* Static */)); + addMissingMemberInJs(changes, declSourceFile, parentDeclaration, token, !!(modifierFlags & 256 /* Static */)); } else { const typeNode = getTypeNode2(checker, parentDeclaration, token); - addPropertyDeclaration(changes, declSourceFile, parentDeclaration, token.text, typeNode, modifierFlags & 32 /* Static */); + addPropertyDeclaration(changes, declSourceFile, parentDeclaration, token.text, typeNode, modifierFlags & 256 /* Static */); } } } @@ -151833,7 +151899,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function symbolPointsToNonPrivateAndAbstractMember(symbol) { const flags = getSyntacticModifierFlags(first(symbol.getDeclarations())); - return !(flags & 8 /* Private */) && !!(flags & 256 /* Abstract */); + return !(flags & 2 /* Private */) && !!(flags & 64 /* Abstract */); } var errorCodes30, fixId25; var init_fixClassDoesntImplementInheritedAbstractMember = __esm({ @@ -151976,10 +152042,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (configFile === void 0) { return void 0; } - const changes = ts_textChanges_exports.ChangeTracker.with( - context, - (changeTracker) => doChange21(changeTracker, configFile) - ); + const changes = ts_textChanges_exports.ChangeTracker.with(context, (changeTracker) => doChange21(changeTracker, configFile)); return [ createCodeFixActionWithoutFixAll(fixID, changes, Diagnostics.Enable_the_jsx_flag_in_your_configuration_file) ]; @@ -152610,7 +152673,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function isCallbackLike(checker, sourceFile, name) { - return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.indexOf(reference) >= 0); + return !!ts_FindAllReferences_exports.Core.eachSymbolReferenceInFile(name, checker, sourceFile, (reference) => isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.includes(reference)); } function isLastParameter(func, parameter, isFixAll) { const parameters = func.parameters; @@ -154255,11 +154318,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return [createCodeFixAction( fixId39, changes, - [ - Diagnostics.Replace_0_with_Promise_1, - checker.typeToString(returnType), - checker.typeToString(promisedType) - ], + [Diagnostics.Replace_0_with_Promise_1, checker.typeToString(returnType), checker.typeToString(promisedType)], fixId39, Diagnostics.Fix_all_incorrect_return_type_of_an_async_functions )]; @@ -154306,7 +154365,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} createCodeFixActionWithoutFixAll( fixName4, [createFileTextChanges(sourceFile.fileName, [ - createTextChange(sourceFile.checkJsDirective ? createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end) : createTextSpan(0, 0), `// @ts-nocheck${newLineCharacter}`) + createTextChange( + sourceFile.checkJsDirective ? createTextSpanFromBounds(sourceFile.checkJsDirective.pos, sourceFile.checkJsDirective.end) : createTextSpan(0, 0), + `// @ts-nocheck${newLineCharacter}` + ) ])], Diagnostics.Disable_checking_for_this_file ) @@ -154362,10 +154424,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const kind = (declaration == null ? void 0 : declaration.kind) ?? 171 /* PropertySignature */; const declarationName = createDeclarationName(symbol, declaration); const effectiveModifierFlags = declaration ? getEffectiveModifierFlags(declaration) : 0 /* None */; - let modifierFlags = effectiveModifierFlags & 32 /* Static */; - modifierFlags |= effectiveModifierFlags & 4 /* Public */ ? 4 /* Public */ : effectiveModifierFlags & 16 /* Protected */ ? 16 /* Protected */ : 0 /* None */; + let modifierFlags = effectiveModifierFlags & 256 /* Static */; + modifierFlags |= effectiveModifierFlags & 1 /* Public */ ? 1 /* Public */ : effectiveModifierFlags & 4 /* Protected */ ? 4 /* Protected */ : 0 /* None */; if (declaration && isAutoAccessorPropertyDeclaration(declaration)) { - modifierFlags |= 128 /* Accessor */; + modifierFlags |= 512 /* Accessor */; } const modifiers = createModifiers(); const type = checker.getWidenedType(checker.getTypeOfSymbolAtLocation(symbol, enclosingDeclaration)); @@ -154898,14 +154960,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; const compilerOptionsProperty = findJsonProperty(tsconfigObjectLiteral, "compilerOptions"); if (compilerOptionsProperty === void 0) { - changeTracker.insertNodeAtObjectStart(configFile, tsconfigObjectLiteral, createJsonPropertyAssignment( - "compilerOptions", - factory.createObjectLiteralExpression( - options.map(([optionName, optionValue]) => createJsonPropertyAssignment(optionName, optionValue)), - /*multiLine*/ - true + changeTracker.insertNodeAtObjectStart( + configFile, + tsconfigObjectLiteral, + createJsonPropertyAssignment( + "compilerOptions", + factory.createObjectLiteralExpression( + options.map(([optionName, optionValue]) => createJsonPropertyAssignment(optionName, optionValue)), + /*multiLine*/ + true + ) ) - )); + ); return; } const compilerOptions = compilerOptionsProperty.initializer; @@ -155040,24 +155106,24 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return isIdentifier(fieldName) ? factory.createPropertyAccessExpression(leftHead, fieldName) : factory.createElementAccessExpression(leftHead, factory.createStringLiteralFromNode(fieldName)); } function prepareModifierFlagsForAccessor(modifierFlags) { - modifierFlags &= ~64 /* Readonly */; - modifierFlags &= ~8 /* Private */; - if (!(modifierFlags & 16 /* Protected */)) { - modifierFlags |= 4 /* Public */; + modifierFlags &= ~8 /* Readonly */; + modifierFlags &= ~2 /* Private */; + if (!(modifierFlags & 4 /* Protected */)) { + modifierFlags |= 1 /* Public */; } return modifierFlags; } function prepareModifierFlagsForField(modifierFlags) { - modifierFlags &= ~4 /* Public */; - modifierFlags &= ~16 /* Protected */; - modifierFlags |= 8 /* Private */; + modifierFlags &= ~1 /* Public */; + modifierFlags &= ~4 /* Protected */; + modifierFlags |= 2 /* Private */; return modifierFlags; } function getAccessorConvertiblePropertyAtPosition(file, program, start, end, considerEmptySpans = true) { const node = getTokenAtPosition(file, start); const cursorRequest = start === end && considerEmptySpans; const declaration = findAncestor(node.parent, isAcceptedDeclaration); - const meaning = 28 /* AccessibilityModifier */ | 32 /* Static */ | 64 /* Readonly */; + const meaning = 7 /* AccessibilityModifier */ | 256 /* Static */ | 8 /* Readonly */; if (!declaration || !(nodeOverlapsWithStartEnd(declaration.name, file, start, end) || cursorRequest)) { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_property_for_which_to_generate_accessor) @@ -155068,7 +155134,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} error: getLocaleSpecificMessage(Diagnostics.Name_is_not_valid) }; } - if ((getEffectiveModifierFlags(declaration) & 126975 /* Modifier */ | meaning) !== meaning) { + if ((getEffectiveModifierFlags(declaration) & 98303 /* Modifier */ | meaning) !== meaning) { return { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_property_with_modifier) }; @@ -155162,11 +155228,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else if (isPropertyAssignment(declaration)) { updatePropertyAssignmentDeclaration(changeTracker, file, declaration, fieldName); } else { - changeTracker.replaceNode( - file, - declaration, - factory.updateParameterDeclaration(declaration, modifiers, declaration.dotDotDotToken, cast(fieldName, isIdentifier), declaration.questionToken, declaration.type, declaration.initializer) - ); + changeTracker.replaceNode(file, declaration, factory.updateParameterDeclaration(declaration, modifiers, declaration.dotDotDotToken, cast(fieldName, isIdentifier), declaration.questionToken, declaration.type, declaration.initializer)); } } function insertAccessor(changeTracker, file, accessor, declaration, container) { @@ -155236,14 +155298,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} getQuotePreference(sourceFile, context.preferences) ))); if (getEmitModuleKind(opts) === 1 /* CommonJS */) { - variations.push(createAction(context, sourceFile, node, factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - namespace.name, - factory.createExternalModuleReference(node.moduleSpecifier) - ))); + variations.push(createAction( + context, + sourceFile, + node, + factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, + /*isTypeOnly*/ + false, + namespace.name, + factory.createExternalModuleReference(node.moduleSpecifier) + ) + )); } return variations; } @@ -155408,7 +155475,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return firstDefined(type.types, (t) => getDefaultValueFromType(checker, t)); } else if (type.isClass()) { const classDeclaration = getClassLikeDeclarationOfSymbol(type.symbol); - if (!classDeclaration || hasSyntacticModifier(classDeclaration, 256 /* Abstract */)) + if (!classDeclaration || hasSyntacticModifier(classDeclaration, 64 /* Abstract */)) return void 0; const constructorDeclaration = getFirstConstructorWithBody(classDeclaration); if (constructorDeclaration && constructorDeclaration.parameters.length) @@ -155480,26 +155547,30 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // src/services/codefixes/requireInTs.ts function doChange34(changes, sourceFile, info) { const { allowSyntheticDefaults, defaultImportName, namedImports, statement, required } = info; - changes.replaceNode(sourceFile, statement, defaultImportName && !allowSyntheticDefaults ? factory.createImportEqualsDeclaration( - /*modifiers*/ - void 0, - /*isTypeOnly*/ - false, - defaultImportName, - factory.createExternalModuleReference(required) - ) : factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.createImportClause( + changes.replaceNode( + sourceFile, + statement, + defaultImportName && !allowSyntheticDefaults ? factory.createImportEqualsDeclaration( + /*modifiers*/ + void 0, /*isTypeOnly*/ false, defaultImportName, - namedImports - ), - required, - /*assertClause*/ - void 0 - )); + factory.createExternalModuleReference(required) + ) : factory.createImportDeclaration( + /*modifiers*/ + void 0, + factory.createImportClause( + /*isTypeOnly*/ + false, + defaultImportName, + namedImports + ), + required, + /*attributes*/ + void 0 + ) + ); } function getInfo17(sourceFile, program, pos) { const { parent: parent2 } = getTokenAtPosition(sourceFile, pos); @@ -155665,7 +155736,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const newTypeNode = factory.updateImportTypeNode( importType, importType.argument, - importType.assertions, + importType.attributes, importType.qualifier, importType.typeArguments, /*isTypeOf*/ @@ -155919,32 +155990,40 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return; } const importClause = Debug.checkDefined(importDeclaration.importClause); - changes.replaceNode(context.sourceFile, importDeclaration, factory.updateImportDeclaration( + changes.replaceNode( + context.sourceFile, importDeclaration, - importDeclaration.modifiers, - factory.updateImportClause( - importClause, - importClause.isTypeOnly, - importClause.name, - /*namedBindings*/ - void 0 - ), - importDeclaration.moduleSpecifier, - importDeclaration.assertClause - )); - changes.insertNodeAfter(context.sourceFile, importDeclaration, factory.createImportDeclaration( - /*modifiers*/ - void 0, - factory.updateImportClause( - importClause, - importClause.isTypeOnly, - /*name*/ + factory.updateImportDeclaration( + importDeclaration, + importDeclaration.modifiers, + factory.updateImportClause( + importClause, + importClause.isTypeOnly, + importClause.name, + /*namedBindings*/ + void 0 + ), + importDeclaration.moduleSpecifier, + importDeclaration.attributes + ) + ); + changes.insertNodeAfter( + context.sourceFile, + importDeclaration, + factory.createImportDeclaration( + /*modifiers*/ void 0, - importClause.namedBindings - ), - importDeclaration.moduleSpecifier, - importDeclaration.assertClause - )); + factory.updateImportClause( + importClause, + importClause.isTypeOnly, + /*name*/ + void 0, + importClause.namedBindings + ), + importDeclaration.moduleSpecifier, + importDeclaration.attributes + ) + ); } var errorCodes60, fixId48; var init_splitTypeOnlyImport = __esm({ @@ -156886,7 +156965,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); if (keywordFilters !== 0 /* None */) { for (const keywordEntry of getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile))) { - if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !uniqueNames.has(keywordEntry.name)) { + if (isTypeOnlyLocation && isTypeKeyword(stringToToken(keywordEntry.name)) || !isTypeOnlyLocation && isContextualKeywordInAutoImportableExpressionSpace(keywordEntry.name) || !uniqueNames.has(keywordEntry.name)) { uniqueNames.add(keywordEntry.name); insertSorted( entries, @@ -157313,7 +157392,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } let modifiers = 0 /* None */; const { modifiers: presentModifiers, range: eraseRange, decorators: presentDecorators } = getPresentModifiers(contextToken, sourceFile, position); - const isAbstract = presentModifiers & 256 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 256 /* Abstract */; + const isAbstract = presentModifiers & 64 /* Abstract */ && classLikeDeclaration.modifierFlagsCache & 64 /* Abstract */; let completionNodes = []; ts_codefix_exports.addNewNodeForMemberSymbol( symbol, @@ -157332,15 +157411,15 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} (node) => { let requiredModifiers = 0 /* None */; if (isAbstract) { - requiredModifiers |= 256 /* Abstract */; + requiredModifiers |= 64 /* Abstract */; } if (isClassElement(node) && checker.getMemberOverrideModifierStatus(classLikeDeclaration, node, symbol) === 1 /* NeedsOverride */) { - requiredModifiers |= 16384 /* Override */; + requiredModifiers |= 16 /* Override */; } if (!completionNodes.length) { modifiers = node.modifierFlagsCache | requiredModifiers; } - node = factory.updateModifiers(node, modifiers); + node = factory.replaceModifiers(node, modifiers); completionNodes.push(node); }, body, @@ -157349,28 +157428,28 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); if (completionNodes.length) { const isMethod = symbol.flags & 8192 /* Method */; - let allowedModifiers = modifiers | 16384 /* Override */ | 4 /* Public */; + let allowedModifiers = modifiers | 16 /* Override */ | 1 /* Public */; if (!isMethod) { - allowedModifiers |= 2 /* Ambient */ | 64 /* Readonly */; + allowedModifiers |= 128 /* Ambient */ | 8 /* Readonly */; } else { - allowedModifiers |= 512 /* Async */; + allowedModifiers |= 1024 /* Async */; } const allowedAndPresent = presentModifiers & allowedModifiers; if (presentModifiers & ~allowedModifiers) { return void 0; } - if (modifiers & 16 /* Protected */ && allowedAndPresent & 4 /* Public */) { - modifiers &= ~16 /* Protected */; + if (modifiers & 4 /* Protected */ && allowedAndPresent & 1 /* Public */) { + modifiers &= ~4 /* Protected */; } - if (allowedAndPresent !== 0 /* None */ && !(allowedAndPresent & 4 /* Public */)) { - modifiers &= ~4 /* Public */; + if (allowedAndPresent !== 0 /* None */ && !(allowedAndPresent & 1 /* Public */)) { + modifiers &= ~1 /* Public */; } modifiers |= allowedAndPresent; - completionNodes = completionNodes.map((node) => factory.updateModifiers(node, modifiers)); + completionNodes = completionNodes.map((node) => factory.replaceModifiers(node, modifiers)); if (presentDecorators == null ? void 0 : presentDecorators.length) { const lastNode = completionNodes[completionNodes.length - 1]; if (canHaveDecorators(lastNode)) { - completionNodes[completionNodes.length - 1] = factory.updateModifierLike(lastNode, presentDecorators.concat(getModifiers(lastNode) || [])); + completionNodes[completionNodes.length - 1] = factory.replaceDecoratorsAndModifiers(lastNode, presentDecorators.concat(getModifiers(lastNode) || [])); } } const format = 1 /* MultiLine */ | 131072 /* NoTrailingNewLine */; @@ -157400,7 +157479,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} let contextMod; const range = { pos: position, end: position }; if (isPropertyDeclaration(contextToken.parent) && contextToken.parent.modifiers) { - modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 126975 /* Modifier */; + modifiers |= modifiersToFlags(contextToken.parent.modifiers) & 98303 /* Modifier */; decorators = contextToken.parent.modifiers.filter(isDecorator) || []; range.pos = Math.min(range.pos, contextToken.parent.modifiers.pos); } @@ -157525,17 +157604,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} true ); } - const parameters = typeNode.parameters.map((typedParam) => factory.createParameterDeclaration( - /*modifiers*/ - void 0, - typedParam.dotDotDotToken, - typedParam.name, - /*questionToken*/ - void 0, - /*type*/ - void 0, - typedParam.initializer - )); + const parameters = typeNode.parameters.map( + (typedParam) => factory.createParameterDeclaration( + /*modifiers*/ + void 0, + typedParam.dotDotDotToken, + typedParam.name, + /*questionToken*/ + void 0, + /*type*/ + void 0, + typedParam.initializer + ) + ); return factory.createMethodDeclaration( /*modifiers*/ void 0, @@ -157973,7 +158054,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return createSimpleDetails(completionNameForLiteral(sourceFile, preferences, literal), "string" /* string */, typeof literal === "string" ? 8 /* stringLiteral */ : 7 /* numericLiteral */); } case "cases": { - const { entry, importAdder } = getExhaustiveCaseSnippets( + const snippets = getExhaustiveCaseSnippets( contextToken.parent, sourceFile, preferences, @@ -157983,7 +158064,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /*formatContext*/ void 0 ); - if (importAdder.hasFixes()) { + if (snippets == null ? void 0 : snippets.importAdder.hasFixes()) { + const { entry, importAdder } = snippets; const changes = ts_textChanges_exports.ChangeTracker.with( { host, formatContext, preferences }, importAdder.writeFixes @@ -158001,7 +158083,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }; } return { - name: entry.name, + name, kind: "" /* unknown */, kindModifiers: "", displayParts: [], @@ -158018,10 +158100,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return createCompletionDetails(name, "" /* none */, kind, [displayPart(name, kind2)]); } function createCompletionDetailsForSymbol(symbol, name, checker, sourceFile, location, cancellationToken, codeActions, sourceDisplay) { - const { displayParts, documentation, symbolKind, tags } = checker.runWithCancellationToken( - cancellationToken, - (checker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(checker2, symbol, sourceFile, location, location, 7 /* All */) - ); + const { displayParts, documentation, symbolKind, tags } = checker.runWithCancellationToken(cancellationToken, (checker2) => ts_SymbolDisplay_exports.getSymbolDisplayPartsDocumentationAndSymbolKind(checker2, symbol, sourceFile, location, location, 7 /* All */)); return createCompletionDetails(name, ts_SymbolDisplay_exports.getSymbolModifiers(checker, symbol), symbolKind, displayParts, documentation, tags, codeActions, sourceDisplay); } function createCompletionDetails(name, kindModifiers, kind, displayParts, documentation, tags, codeActions, source) { @@ -158577,14 +158656,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) }; } else { const fileName = isExternalModuleNameRelative(stripQuotes(moduleSymbol.name)) ? (_a = getSourceFileOfModule(moduleSymbol)) == null ? void 0 : _a.fileName : void 0; - const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo([{ - exportKind: 0 /* Named */, - moduleFileName: fileName, - isFromPackageJson: false, - moduleSymbol, - symbol: firstAccessibleSymbol, - targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags - }], position, isValidTypeOnlyAliasUseSite(location)) || {}; + const { moduleSpecifier } = (importSpecifierResolver || (importSpecifierResolver = ts_codefix_exports.createImportSpecifierResolver(sourceFile, program, host, preferences))).getModuleSpecifierForBestExportInfo( + [{ + exportKind: 0 /* Named */, + moduleFileName: fileName, + isFromPackageJson: false, + moduleSymbol, + symbol: firstAccessibleSymbol, + targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags + }], + position, + isValidTypeOnlyAliasUseSite(location) + ) || {}; if (moduleSpecifier) { const origin = { kind: getNullableSymbolOriginInfoKind(6 /* SymbolMemberExport */), @@ -159137,24 +159220,24 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (contextToken.kind === 80 /* Identifier */ && !isCurrentlyEditingNode(contextToken)) { switch (contextToken.getText()) { case "private": - classElementModifierFlags = classElementModifierFlags | 8 /* Private */; + classElementModifierFlags = classElementModifierFlags | 2 /* Private */; break; case "static": - classElementModifierFlags = classElementModifierFlags | 32 /* Static */; + classElementModifierFlags = classElementModifierFlags | 256 /* Static */; break; case "override": - classElementModifierFlags = classElementModifierFlags | 16384 /* Override */; + classElementModifierFlags = classElementModifierFlags | 16 /* Override */; break; } } if (isClassStaticBlockDeclaration(classElement)) { - classElementModifierFlags |= 32 /* Static */; + classElementModifierFlags |= 256 /* Static */; } - if (!(classElementModifierFlags & 8 /* Private */)) { - const baseTypeNodes = isClassLike(decl) && classElementModifierFlags & 16384 /* Override */ ? singleElementArray(getEffectiveBaseTypeNode(decl)) : getAllSuperTypeNodes(decl); + if (!(classElementModifierFlags & 2 /* Private */)) { + const baseTypeNodes = isClassLike(decl) && classElementModifierFlags & 16 /* Override */ ? singleElementArray(getEffectiveBaseTypeNode(decl)) : getAllSuperTypeNodes(decl); const baseSymbols = flatMap(baseTypeNodes, (baseTypeNode) => { const type = typeChecker.getTypeAtLocation(baseTypeNode); - return classElementModifierFlags & 32 /* Static */ ? (type == null ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : type && typeChecker.getPropertiesOfType(type); + return classElementModifierFlags & 256 /* Static */ ? (type == null ? void 0 : type.symbol) && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : type && typeChecker.getPropertiesOfType(type); }); symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags)); forEach(symbols, (symbol, index) => { @@ -159457,10 +159540,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isCurrentlyEditingNode(m)) { continue; } - if (hasEffectiveModifier(m, 8 /* Private */)) { + if (hasEffectiveModifier(m, 2 /* Private */)) { continue; } - if (isStatic(m) !== !!(currentClassElementModifierFlags & 32 /* Static */)) { + if (isStatic(m) !== !!(currentClassElementModifierFlags & 256 /* Static */)) { continue; } const existingName = getPropertyNameForPropertyNameNode(m.name); @@ -159468,7 +159551,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} existingMemberNames.add(existingName); } } - return baseSymbols.filter((propertySymbol) => !existingMemberNames.has(propertySymbol.escapedName) && !!propertySymbol.declarations && !(getDeclarationModifierFlagsFromSymbol(propertySymbol) & 8 /* Private */) && !(propertySymbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(propertySymbol.valueDeclaration))); + return baseSymbols.filter( + (propertySymbol) => !existingMemberNames.has(propertySymbol.escapedName) && !!propertySymbol.declarations && !(getDeclarationModifierFlagsFromSymbol(propertySymbol) & 2 /* Private */) && !(propertySymbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(propertySymbol.valueDeclaration)) + ); } function filterJsxAttributes(symbols2, attributes) { const seenNames = /* @__PURE__ */ new Set(); @@ -159716,7 +159801,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return checker.getAllPossiblePropertiesOfTypes(filter(type.types, (memberType) => !(memberType.flags & 402784252 /* Primitive */ || checker.isArrayLikeType(memberType) || checker.isTypeInvalidDueToUnionDiscriminant(memberType, node) || checker.typeHasCallOrConstructSignatures(memberType) || memberType.isClass() && containsNonPublicProperties(memberType.getApparentProperties())))); } function containsNonPublicProperties(props) { - return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 24 /* NonPublicAccessibilityModifier */)); + return some(props, (p) => !!(getDeclarationModifierFlagsFromSymbol(p) & 6 /* NonPublicAccessibilityModifier */)); } function getPropertiesForCompletion(type, checker) { return type.isUnion() ? Debug.checkEachDefined(checker.getAllPossiblePropertiesOfTypes(type.types), "getAllPossiblePropertiesOfTypes() should all be defined") : Debug.checkEachDefined(type.getApparentProperties(), "getApparentProperties() should all be defined"); @@ -159876,7 +159961,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return false; } function isStaticProperty(symbol) { - return !!(symbol.valueDeclaration && getEffectiveModifierFlags(symbol.valueDeclaration) & 32 /* Static */ && isClassLike(symbol.valueDeclaration.parent)); + return !!(symbol.valueDeclaration && getEffectiveModifierFlags(symbol.valueDeclaration) & 256 /* Static */ && isClassLike(symbol.valueDeclaration.parent)); } function tryGetObjectLiteralContextualType(node, typeChecker) { const type = typeChecker.getContextualType(node); @@ -160047,6 +160132,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } return charCode; } + function isContextualKeywordInAutoImportableExpressionSpace(keyword) { + return keyword === "abstract" || keyword === "async" || keyword === "await" || keyword === "declare" || keyword === "module" || keyword === "namespace" || keyword === "type"; + } var moduleSpecifierResolutionLimit, moduleSpecifierResolutionCacheAttemptLimit, SortText, CompletionSource, SymbolOriginInfoKind, CompletionKind, _keywordCompletions, allKeywordsCompletions; var init_completions = __esm({ "src/services/completions.ts"() { @@ -160205,8 +160293,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan, entries }; } case 2 /* Types */: { + const quoteChar = contextToken.kind === 15 /* NoSubstitutionTemplateLiteral */ ? 96 /* backtick */ : startsWith(getTextOfNode(contextToken), "'") ? 39 /* singleQuote */ : 34 /* doubleQuote */; const entries = completion.types.map((type) => ({ - name: type.value, + name: escapeString(type.value, quoteChar), kindModifiers: "" /* none */, kind: "string" /* string */, sortText: SortText.LocationPriority, @@ -160307,7 +160396,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 291 /* JsxAttribute */: if (!isRequireCallArgument(node) && !isImportCall(parent2)) { const argumentInfo = ts_SignatureHelp_exports.getArgumentInfoForCompletions(parent2.kind === 291 /* JsxAttribute */ ? parent2.parent : node, position, sourceFile); - return argumentInfo && (getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker, 0 /* Normal */)) || fromContextualType(0 /* None */); + return argumentInfo && getStringLiteralCompletionsFromSignature(argumentInfo.invocation, node, argumentInfo, typeChecker) || fromContextualType(0 /* None */); } case 272 /* ImportDeclaration */: case 278 /* ExportDeclaration */: @@ -160376,12 +160465,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getAlreadyUsedTypesInStringLiteralUnion(union, current) { return mapDefined(union.types, (type) => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : void 0); } - function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker, checkMode = 32 /* IsForStringLiteralArgumentCompletions */) { + function getStringLiteralCompletionsFromSignature(call, arg, argumentInfo, checker) { let isNewIdentifier = false; const uniques = /* @__PURE__ */ new Map(); - const candidates = []; const editingArgument = isJsxOpeningLikeElement(call) ? Debug.checkDefined(findAncestor(arg.parent, isJsxAttribute)) : arg; - checker.getResolvedSignatureForStringLiteralCompletions(call, editingArgument, candidates, checkMode); + const candidates = checker.getCandidateSignaturesForStringLiteralCompletions(call, editingArgument); const types = flatMap(candidates, (candidate) => { if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return; @@ -160441,7 +160529,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function addReplacementSpans(text, textStart, names) { const span = getDirectoryFragmentTextSpan(text, textStart); const wholeSpan = text.length === 0 ? void 0 : createTextSpan(textStart, text.length); - return names.map(({ name, kind, extension }) => Math.max(name.indexOf(directorySeparator), name.indexOf(altDirectorySeparator)) !== -1 ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span }); + return names.map(({ name, kind, extension }) => name.includes(directorySeparator) || name.includes(altDirectorySeparator) ? { name, kind, extension, span: wholeSpan } : { name, kind, extension, span }); } function getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) { return addReplacementSpans(node.text, node.getStart(sourceFile) + 1, getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, compilerOptions, host, typeChecker, preferences)); @@ -160487,24 +160575,21 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function getSupportedExtensionsForModuleResolution(compilerOptions, typeChecker) { - const ambientModulesExtensions = !typeChecker ? [] : mapDefined( - typeChecker.getAmbientModules(), - (module2) => { - const name = module2.name.slice(1, -1); - if (!name.startsWith("*.") || name.includes("/")) - return; - return name.slice(1); - } - ); + const ambientModulesExtensions = !typeChecker ? [] : mapDefined(typeChecker.getAmbientModules(), (module2) => { + const name = module2.name.slice(1, -1); + if (!name.startsWith("*.") || name.includes("/")) + return; + return name.slice(1); + }); const extensions = [...getSupportedExtensions(compilerOptions), ambientModulesExtensions]; const moduleResolution = getEmitModuleResolutionKind(compilerOptions); return moduleResolutionUsesNodeModules(moduleResolution) ? getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, extensions) : extensions; } function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase) { - rootDirs = rootDirs.map((rootDirectory) => normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory))); + rootDirs = rootDirs.map((rootDirectory) => ensureTrailingDirectorySeparator(normalizePath(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory)))); const relativeDirectory = firstDefined(rootDirs, (rootDirectory) => containsPath(rootDirectory, scriptDirectory, basePath, ignoreCase) ? scriptDirectory.substr(rootDirectory.length) : void 0); return deduplicate( - [...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory], + [...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory].map((baseDir) => removeTrailingDirectorySeparator(baseDir)), equateStringsCaseSensitive, compareStringsCaseSensitive ); @@ -160742,7 +160827,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } const keys = getOwnKeys(exports); const fragmentSubpath = components.join("/") + (components.length && hasTrailingDirectorySeparator(fragment) ? "/" : ""); - const conditions = getConditions(compilerOptions, mode === 99 /* ESNext */); + const conditions = getConditions(compilerOptions, mode); addCompletionEntriesFromPathsOrExports( result, fragmentSubpath, @@ -160770,7 +160855,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } if (target && typeof target === "object" && !isArray(target)) { for (const condition in target) { - if (condition === "default" || conditions.indexOf(condition) > -1 || isApplicableVersionedTypesKey(conditions, condition)) { + if (condition === "default" || conditions.includes(condition) || isApplicableVersionedTypesKey(conditions, condition)) { const pattern = target[condition]; return getPatternFromFirstMatchingCondition(pattern, conditions); } @@ -160782,7 +160867,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getCompletionsForPathMapping(path, patterns, fragment, packageDirectory, extensionOptions, host) { if (!endsWith(path, "*")) { - return !stringContains(path, "*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray; + return !path.includes("*") ? justPathMappingName(path, "script" /* scriptElement */) : emptyArray; } const pathPrefix = path.slice(0, path.length - 1); const remainingFragment = tryRemovePrefix(fragment, pathPrefix); @@ -160852,7 +160937,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) { const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name)); - const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && moduleName.indexOf("*") < 0); + const nonRelativeModuleNames = ambientModules.filter((moduleName) => startsWith(moduleName, fragment) && !moduleName.includes("*")); if (fragmentDirectory !== void 0) { const moduleNameWithSeparator = ensureTrailingDirectorySeparator(fragmentDirectory); return nonRelativeModuleNames.map((nonRelativeModuleName) => removePrefix(nonRelativeModuleName, moduleNameWithSeparator)); @@ -160966,7 +161051,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return false; } function containsSlash(fragment) { - return stringContains(fragment, directorySeparator); + return fragment.includes(directorySeparator); } function isRequireCallArgument(node) { return isCallExpression(node.parent) && firstOrUndefined(node.parent.arguments) === node && isIdentifier(node.parent.expression) && node.parent.expression.escapedText === "require"; @@ -161087,7 +161172,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} handleNamespaceImport( direct, direct.name, - hasSyntacticModifier(direct, 1 /* Export */), + hasSyntacticModifier(direct, 32 /* Export */), /*alreadyAddedDirect*/ false ); @@ -161402,7 +161487,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } else { const exportNode = getExportNode(parent2, node); - if (exportNode && hasSyntacticModifier(exportNode, 1 /* Export */)) { + if (exportNode && hasSyntacticModifier(exportNode, 32 /* Export */)) { if (isImportEqualsDeclaration(exportNode) && exportNode.moduleReference === node) { if (comingFromExport) { return void 0; @@ -161479,7 +161564,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return exportInfo2 && { kind: 1 /* Export */, symbol: symbol2, exportInfo: exportInfo2 }; } function getExportKindForDeclaration(node2) { - return hasSyntacticModifier(node2, 1024 /* Default */) ? 1 /* Default */ : 0 /* Named */; + return hasSyntacticModifier(node2, 2048 /* Default */) ? 1 /* Default */ : 0 /* Named */; } } function getExportEqualsLocalSymbol(importedSymbol, checker) { @@ -161613,10 +161698,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } else if (isStringLiteralLike(node)) { const validImport = tryGetImportFromModuleSpecifier(node); if (validImport) { - const declOrStatement = findAncestor( - validImport, - (node2) => isDeclaration(node2) || isStatement(node2) || isJSDocTag(node2) - ); + const declOrStatement = findAncestor(validImport, (node2) => isDeclaration(node2) || isStatement(node2) || isJSDocTag(node2)); return isDeclaration(declOrStatement) ? getContextNode(declOrStatement) : declOrStatement; } } @@ -161626,7 +161708,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (node.parent.name === node || // node is name of declaration, use parent isConstructorDeclaration(node.parent) || isExportAssignment(node.parent) || // Property name of the import export specifier or binding pattern, use parent (isImportOrExportSpecifier(node.parent) || isBindingElement(node.parent)) && node.parent.propertyName === node || // Is default export - node.kind === 90 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 1025 /* ExportDefault */)) { + node.kind === 90 /* DefaultKeyword */ && hasSyntacticModifier(node.parent, 2080 /* ExportDefault */)) { return getContextNode(node.parent); } return void 0; @@ -161658,10 +161740,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 303 /* PropertyAssignment */: case 304 /* ShorthandPropertyAssignment */: return isArrayLiteralOrObjectLiteralDestructuringPattern(node.parent) ? getContextNode( - findAncestor( - node.parent, - (node2) => isBinaryExpression(node2) || isForInOrOfStatement(node2) - ) + findAncestor(node.parent, (node2) => isBinaryExpression(node2) || isForInOrOfStatement(node2)) ) : node; default: return node; @@ -162054,7 +162133,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} })(FindReferencesUse || {}); ((Core2) => { function getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options = {}, sourceFilesSet = new Set(sourceFiles.map((f) => f.fileName))) { - var _a, _b, _c; + var _a, _b; node = getAdjustedNode2(node, options); if (isSourceFile(node)) { const resolvedRef = ts_GoToDefinition_exports.getReferenceAtPosition(node, position, program); @@ -162093,7 +162172,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!options.implementations && isStringLiteralLike(node)) { if (isModuleSpecifierLike(node)) { const fileIncludeReasons = program.getFileIncludeReasons(); - const referencedFileName = (_c = (_b = (_a = node.getSourceFile().resolvedModules) == null ? void 0 : _a.get(node.text, getModeForUsageLocation(node.getSourceFile(), node))) == null ? void 0 : _b.resolvedModule) == null ? void 0 : _c.resolvedFileName; + const referencedFileName = (_b = (_a = program.getResolvedModule(node.getSourceFile(), node.text, getModeForUsageLocation(node.getSourceFile(), node))) == null ? void 0 : _a.resolvedModule) == null ? void 0 : _b.resolvedFileName; const referencedFile = referencedFileName ? program.getSourceFile(referencedFileName) : void 0; if (referencedFile) { return [{ definition: { type: 4 /* String */, node }, references: getReferencesForNonModule(referencedFile, fileIncludeReasons, program) || emptyArray }]; @@ -162156,7 +162235,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} for (const ref of references) { if (isReferencedFile(ref)) { const referencingFile = program.getSourceFileByPath(ref.file); - const location = getReferencedFileLocation(program.getSourceFileByPath, ref); + const location = getReferencedFileLocation(program, ref); if (isReferenceFileLocation(location)) { entries = append(entries, { kind: 0 /* Span */, @@ -162612,7 +162691,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return void 0; } if (flags & (4 /* Property */ | 8192 /* Method */)) { - const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 8 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); + const privateDeclaration = find(declarations, (d) => hasEffectiveModifier(d, 2 /* Private */) || isPrivateIdentifierClassElementDeclaration(d)); if (privateDeclaration) { return getAncestor(privateDeclaration, 263 /* ClassDeclaration */); } @@ -163104,10 +163183,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return cached; } cachedResults.set(key, false); - const inherits = !!symbol.declarations && symbol.declarations.some((declaration) => getAllSuperTypeNodes(declaration).some((typeReference) => { - const type = checker.getTypeAtLocation(typeReference); - return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent2, cachedResults, checker); - })); + const inherits = !!symbol.declarations && symbol.declarations.some( + (declaration) => getAllSuperTypeNodes(declaration).some((typeReference) => { + const type = checker.getTypeAtLocation(typeReference); + return !!type && !!type.symbol && explicitlyInheritsFrom(type.symbol, parent2, cachedResults, checker); + }) + ); cachedResults.set(key, inherits); return inherits; } @@ -163120,7 +163201,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!searchSpaceNode) { return void 0; } - let staticFlag = 32 /* Static */; + let staticFlag = 256 /* Static */; switch (searchSpaceNode.kind) { case 172 /* PropertyDeclaration */: case 171 /* PropertySignature */: @@ -163160,7 +163241,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /*includeClassComputedPropertyName*/ false ); - let staticFlag = 32 /* Static */; + let staticFlag = 256 /* Static */; switch (searchSpaceNode.kind) { case 174 /* MethodDeclaration */: case 173 /* MethodSignature */: @@ -163402,7 +163483,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (!symbol.valueDeclaration) return false; const modifierFlags = getEffectiveModifierFlags(symbol.valueDeclaration); - return !!(modifierFlags & 32 /* Static */); + return !!(modifierFlags & 256 /* Static */); } function getRelatedSymbol(search, referenceSymbol, referenceLocation, state) { const { checker } = state; @@ -163521,7 +163602,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} // src/services/goToDefinition.ts function getDefinitionAtPosition(program, sourceFile, position, searchOtherFilesOnly, stopAtAlias) { - var _a, _b; + var _a; const resolvedRef = getReferenceAtPosition(sourceFile, position, program); const fileReferenceDefinition = resolvedRef && [getDefinitionInfoForFileReference(resolvedRef.reference.fileName, resolvedRef.fileName, resolvedRef.unverified)] || emptyArray; if (resolvedRef == null ? void 0 : resolvedRef.file) { @@ -163594,7 +163675,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } if (!symbol && isModuleSpecifierLike(fallbackNode)) { - const ref = (_b = (_a = sourceFile.resolvedModules) == null ? void 0 : _a.get(fallbackNode.text, getModeForUsageLocation(sourceFile, fallbackNode))) == null ? void 0 : _b.resolvedModule; + const ref = (_a = program.getResolvedModule(sourceFile, fallbackNode.text, getModeForUsageLocation(sourceFile, fallbackNode))) == null ? void 0 : _a.resolvedModule; if (ref) { return [{ name: fallbackNode.text, @@ -163689,7 +163770,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return getDefinitionFromSymbol(typeChecker, symbol, node); } function getReferenceAtPosition(sourceFile, position, program) { - var _a, _b, _c, _d; + var _a, _b; const referencePath = findReferenceInPosition(sourceFile.referencedFiles, position); if (referencePath) { const file = program.getSourceFileFromReference(sourceFile, referencePath); @@ -163706,10 +163787,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const file = program.getLibFileFromReference(libReferenceDirective); return file && { reference: libReferenceDirective, fileName: file.fileName, file, unverified: false }; } - if ((_b = sourceFile.resolvedModules) == null ? void 0 : _b.size()) { + if (sourceFile.imports.length || sourceFile.moduleAugmentations.length) { const node = getTouchingToken(sourceFile, position); - if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && sourceFile.resolvedModules.has(node.text, getModeForUsageLocation(sourceFile, node))) { - const verifiedFileName = (_d = (_c = sourceFile.resolvedModules.get(node.text, getModeForUsageLocation(sourceFile, node))) == null ? void 0 : _c.resolvedModule) == null ? void 0 : _d.resolvedFileName; + let resolution; + if (isModuleSpecifierLike(node) && isExternalModuleNameRelative(node.text) && (resolution = program.getResolvedModule(sourceFile, node.text, getModeForUsageLocation(sourceFile, node)))) { + const verifiedFileName = (_b = resolution.resolvedModule) == null ? void 0 : _b.resolvedFileName; const fileName = verifiedFileName || resolvePath(getDirectoryPath(sourceFile.fileName), node.text); return { file: program.getSourceFile(fileName), @@ -163957,7 +164039,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 177 /* GetAccessor */: case 178 /* SetAccessor */: case 174 /* MethodDeclaration */: - if (hasEffectiveModifier(declaration, 8 /* Private */)) + if (hasEffectiveModifier(declaration, 2 /* Private */)) return false; case 176 /* Constructor */: case 303 /* PropertyAssignment */: @@ -164077,6 +164159,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const { file, program, span, cancellationToken, preferences } = context; const sourceFileText = file.text; const compilerOptions = program.getCompilerOptions(); + const quotePreference = getQuotePreference(file, preferences); const checker = program.getTypeChecker(); const result = []; visitor(file); @@ -164140,9 +164223,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} displayParts }); } - function addTypeHints(text, position) { + function addTypeHints(hintText, position) { result.push({ - text: `: ${text.length > maxTypeHintLength ? text.substr(0, maxTypeHintLength - "...".length) + "..." : text}`, + text: typeof hintText === "string" ? `: ${hintText}` : "", + displayParts: typeof hintText === "string" ? void 0 : [{ text: ": " }, ...hintText], position, kind: "Type" /* Type */, whitespaceBefore: true @@ -164180,13 +164264,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isModuleReferenceType(declarationType)) { return; } - const typeDisplayString = printTypeInSingleLine(declarationType); - if (typeDisplayString) { - const isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && equateStringsCaseInsensitive(decl.name.getText(), typeDisplayString); + const hintParts = typeToInlayHintParts(declarationType); + if (hintParts) { + const hintText = typeof hintParts === "string" ? hintParts : hintParts.map((part) => part.text).join(""); + const isVariableNameMatchesType = preferences.includeInlayVariableTypeHintsWhenTypeMatchesName === false && equateStringsCaseInsensitive(decl.name.getText(), hintText); if (isVariableNameMatchesType) { return; } - addTypeHints(typeDisplayString, decl.name.end); + addTypeHints(hintParts, decl.name.end); } } function visitCallOrNewExpression(expr) { @@ -164203,6 +164288,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} for (const originalArg of args) { const arg = skipParentheses(originalArg); if (shouldShowLiteralParameterNameHintsOnly(preferences) && !isHintableLiteral(arg)) { + signatureParamPos++; continue; } let spreadArgs = 0; @@ -164293,11 +164379,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isModuleReferenceType(returnType)) { return; } - const typeDisplayString = printTypeInSingleLine(returnType); - if (!typeDisplayString) { - return; + const hintParts = typeToInlayHintParts(returnType); + if (hintParts) { + addTypeHints(hintParts, getTypeAnnotationPosition(decl)); } - addTypeHints(typeDisplayString, getTypeAnnotationPosition(decl)); } function getTypeAnnotationPosition(decl) { const closeParenToken = findChildOfKind(decl, 22 /* CloseParenToken */, file); @@ -164320,14 +164405,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (effectiveTypeAnnotation) { continue; } - const typeDisplayString = getParameterDeclarationTypeDisplayString(signature.parameters[i]); - if (!typeDisplayString) { + const typeHints = getParameterDeclarationTypeHints(signature.parameters[i]); + if (!typeHints) { continue; } - addTypeHints(typeDisplayString, param.questionToken ? param.questionToken.end : param.name.end); + addTypeHints(typeHints, param.questionToken ? param.questionToken.end : param.name.end); } } - function getParameterDeclarationTypeDisplayString(symbol) { + function getParameterDeclarationTypeHints(symbol) { const valueDeclaration = symbol.valueDeclaration; if (!valueDeclaration || !isParameter(valueDeclaration)) { return void 0; @@ -164336,7 +164421,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (isModuleReferenceType(signatureParamType)) { return void 0; } - return printTypeInSingleLine(signatureParamType); + return typeToInlayHintParts(signatureParamType); } function printTypeInSingleLine(type) { const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; @@ -164358,6 +164443,307 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} ); }); } + function typeToInlayHintParts(type) { + if (!shouldUseInteractiveInlayHints(preferences)) { + return printTypeInSingleLine(type); + } + const flags = 70221824 /* IgnoreErrors */ | 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */; + const typeNode = checker.typeToTypeNode( + type, + /*enclosingDeclaration*/ + void 0, + flags + ); + Debug.assertIsDefined(typeNode, "should always get typenode"); + const parts = []; + visitForDisplayParts(typeNode); + return parts; + function visitForDisplayParts(node) { + if (!node) { + return; + } + const tokenString = tokenToString(node.kind); + if (tokenString) { + parts.push({ text: tokenString }); + return; + } + if (isLiteralExpression(node)) { + parts.push({ text: getLiteralText2(node) }); + return; + } + switch (node.kind) { + case 80 /* Identifier */: + const identifier = node; + const identifierText = idText(identifier); + const name = identifier.symbol && identifier.symbol.declarations && identifier.symbol.declarations.length && getNameOfDeclaration(identifier.symbol.declarations[0]); + if (name) { + parts.push(getNodeDisplayPart(identifierText, name)); + } else { + parts.push({ text: identifierText }); + } + break; + case 166 /* QualifiedName */: + const qualifiedName = node; + visitForDisplayParts(qualifiedName.left); + parts.push({ text: "." }); + visitForDisplayParts(qualifiedName.right); + break; + case 182 /* TypePredicate */: + const predicate = node; + if (predicate.assertsModifier) { + parts.push({ text: "asserts " }); + } + visitForDisplayParts(predicate.parameterName); + if (predicate.type) { + parts.push({ text: " is " }); + visitForDisplayParts(predicate.type); + } + break; + case 183 /* TypeReference */: + const typeReference = node; + visitForDisplayParts(typeReference.typeName); + if (typeReference.typeArguments) { + parts.push({ text: "<" }); + visitDisplayPartList(typeReference.typeArguments, ", "); + parts.push({ text: ">" }); + } + break; + case 168 /* TypeParameter */: + const typeParameter = node; + if (typeParameter.modifiers) { + visitDisplayPartList(typeParameter.modifiers, " "); + } + visitForDisplayParts(typeParameter.name); + if (typeParameter.constraint) { + parts.push({ text: " extends " }); + visitForDisplayParts(typeParameter.constraint); + } + if (typeParameter.default) { + parts.push({ text: " = " }); + visitForDisplayParts(typeParameter.default); + } + break; + case 169 /* Parameter */: + const parameter = node; + if (parameter.modifiers) { + visitDisplayPartList(parameter.modifiers, " "); + } + if (parameter.dotDotDotToken) { + parts.push({ text: "..." }); + } + visitForDisplayParts(parameter.name); + if (parameter.questionToken) { + parts.push({ text: "?" }); + } + if (parameter.type) { + parts.push({ text: ": " }); + visitForDisplayParts(parameter.type); + } + break; + case 185 /* ConstructorType */: + const constructorType = node; + parts.push({ text: "new " }); + if (constructorType.typeParameters) { + parts.push({ text: "<" }); + visitDisplayPartList(constructorType.typeParameters, ", "); + parts.push({ text: ">" }); + } + parts.push({ text: "(" }); + visitDisplayPartList(constructorType.parameters, ", "); + parts.push({ text: ")" }); + parts.push({ text: " => " }); + visitForDisplayParts(constructorType.type); + break; + case 186 /* TypeQuery */: + const typeQuery = node; + parts.push({ text: "typeof " }); + visitForDisplayParts(typeQuery.exprName); + if (typeQuery.typeArguments) { + parts.push({ text: "<" }); + visitDisplayPartList(typeQuery.typeArguments, ", "); + parts.push({ text: ">" }); + } + break; + case 187 /* TypeLiteral */: + const typeLiteral = node; + parts.push({ text: "{" }); + if (typeLiteral.members.length) { + parts.push({ text: " " }); + visitDisplayPartList(typeLiteral.members, "; "); + parts.push({ text: " " }); + } + parts.push({ text: "}" }); + break; + case 188 /* ArrayType */: + visitForDisplayParts(node.elementType); + parts.push({ text: "[]" }); + break; + case 189 /* TupleType */: + parts.push({ text: "[" }); + visitDisplayPartList(node.elements, ", "); + parts.push({ text: "]" }); + break; + case 202 /* NamedTupleMember */: + const member = node; + if (member.dotDotDotToken) { + parts.push({ text: "..." }); + } + visitForDisplayParts(member.name); + if (member.questionToken) { + parts.push({ text: "?" }); + } + parts.push({ text: ": " }); + visitForDisplayParts(member.type); + break; + case 190 /* OptionalType */: + visitForDisplayParts(node.type); + parts.push({ text: "?" }); + break; + case 191 /* RestType */: + parts.push({ text: "..." }); + visitForDisplayParts(node.type); + break; + case 192 /* UnionType */: + visitDisplayPartList(node.types, " | "); + break; + case 193 /* IntersectionType */: + visitDisplayPartList(node.types, " & "); + break; + case 194 /* ConditionalType */: + const conditionalType = node; + visitForDisplayParts(conditionalType.checkType); + parts.push({ text: " extends " }); + visitForDisplayParts(conditionalType.extendsType); + parts.push({ text: " ? " }); + visitForDisplayParts(conditionalType.trueType); + parts.push({ text: " : " }); + visitForDisplayParts(conditionalType.falseType); + break; + case 195 /* InferType */: + parts.push({ text: "infer " }); + visitForDisplayParts(node.typeParameter); + break; + case 196 /* ParenthesizedType */: + parts.push({ text: "(" }); + visitForDisplayParts(node.type); + parts.push({ text: ")" }); + break; + case 198 /* TypeOperator */: + const typeOperator = node; + parts.push({ text: `${tokenToString(typeOperator.operator)} ` }); + visitForDisplayParts(typeOperator.type); + break; + case 199 /* IndexedAccessType */: + const indexedAccess = node; + visitForDisplayParts(indexedAccess.objectType); + parts.push({ text: "[" }); + visitForDisplayParts(indexedAccess.indexType); + parts.push({ text: "]" }); + break; + case 200 /* MappedType */: + const mappedType = node; + parts.push({ text: "{ " }); + if (mappedType.readonlyToken) { + if (mappedType.readonlyToken.kind === 40 /* PlusToken */) { + parts.push({ text: "+" }); + } else if (mappedType.readonlyToken.kind === 41 /* MinusToken */) { + parts.push({ text: "-" }); + } + parts.push({ text: "readonly " }); + } + parts.push({ text: "[" }); + visitForDisplayParts(mappedType.typeParameter); + if (mappedType.nameType) { + parts.push({ text: " as " }); + visitForDisplayParts(mappedType.nameType); + } + parts.push({ text: "]" }); + if (mappedType.questionToken) { + if (mappedType.questionToken.kind === 40 /* PlusToken */) { + parts.push({ text: "+" }); + } else if (mappedType.questionToken.kind === 41 /* MinusToken */) { + parts.push({ text: "-" }); + } + parts.push({ text: "?" }); + } + parts.push({ text: ": " }); + if (mappedType.type) { + visitForDisplayParts(mappedType.type); + } + parts.push({ text: "; }" }); + break; + case 201 /* LiteralType */: + visitForDisplayParts(node.literal); + break; + case 184 /* FunctionType */: + const functionType = node; + if (functionType.typeParameters) { + parts.push({ text: "<" }); + visitDisplayPartList(functionType.typeParameters, ", "); + parts.push({ text: ">" }); + } + parts.push({ text: "(" }); + visitDisplayPartList(functionType.parameters, ", "); + parts.push({ text: ")" }); + parts.push({ text: " => " }); + visitForDisplayParts(functionType.type); + break; + case 205 /* ImportType */: + const importType = node; + if (importType.isTypeOf) { + parts.push({ text: "typeof " }); + } + parts.push({ text: "import(" }); + visitForDisplayParts(importType.argument); + if (importType.assertions) { + parts.push({ text: ", { assert: " }); + visitDisplayPartList(importType.assertions.assertClause.elements, ", "); + parts.push({ text: " }" }); + } + parts.push({ text: ")" }); + if (importType.qualifier) { + parts.push({ text: "." }); + visitForDisplayParts(importType.qualifier); + } + if (importType.typeArguments) { + parts.push({ text: "<" }); + visitDisplayPartList(importType.typeArguments, ", "); + parts.push({ text: ">" }); + } + break; + case 171 /* PropertySignature */: + const propertySignature = node; + if (propertySignature.modifiers) { + visitDisplayPartList(propertySignature.modifiers, " "); + } + visitForDisplayParts(propertySignature.name); + if (propertySignature.questionToken) { + parts.push({ text: "?" }); + } + if (propertySignature.type) { + parts.push({ text: ": " }); + visitForDisplayParts(propertySignature.type); + } + break; + default: + Debug.failBadSyntaxKind(node); + } + } + function visitDisplayPartList(nodes, separator) { + nodes.forEach((node, index) => { + if (index > 0) { + parts.push({ text: separator }); + } + visitForDisplayParts(node); + }); + } + function getLiteralText2(node) { + if (isStringLiteral(node)) { + return quotePreference === 0 /* Single */ ? `'${escapeString(node.text, 39 /* singleQuote */)}'` : `"${escapeString(node.text, 34 /* doubleQuote */)}"`; + } + return node.text; + } + } function isUndefined(name) { return name === "undefined"; } @@ -164377,12 +164763,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} }; } } - var maxTypeHintLength, leadingParameterNameCommentRegexFactory; + var leadingParameterNameCommentRegexFactory; var init_inlayHints = __esm({ "src/services/inlayHints.ts"() { "use strict"; init_ts4(); - maxTypeHintLength = 30; leadingParameterNameCommentRegexFactory = (name) => { return new RegExp(`^\\s?/\\*\\*?\\s?${name}\\s?\\*\\/\\s?$`); }; @@ -164432,6 +164817,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} case 345 /* JSDocCallbackTag */: case 353 /* JSDocTypedefTag */: return [declaration, declaration.parent]; + case 330 /* JSDocSignature */: + if (isJSDocOverloadTag(declaration.parent)) { + return [declaration.parent.parent]; + } default: return getJSDocCommentsAndTags(declaration); } @@ -164445,6 +164834,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } for (const tag of tags) { infos.push({ name: tag.tagName.text, text: getCommentDisplayParts(tag, checker) }); + if (isJSDocPropertyLikeTag(tag) && tag.isNameFirst && tag.typeExpression && isJSDocTypeLiteral(tag.typeExpression.type)) { + forEach(tag.typeExpression.type.jsDocPropertyTags, (propTag) => { + infos.push({ name: propTag.tagName.text, text: getCommentDisplayParts(propTag, checker) }); + }); + } } }); return infos; @@ -164968,7 +165362,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} /*importClause*/ void 0, moduleSpecifier, - /*assertClause*/ + /*attributes*/ void 0 )); } else { @@ -165134,7 +165528,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} exportDecl.isTypeOnly, exportDecl.exportClause && (isNamedExports(exportDecl.exportClause) ? factory.updateNamedExports(exportDecl.exportClause, sortedExportSpecifiers) : factory.updateNamespaceExport(exportDecl.exportClause, exportDecl.exportClause.name)), exportDecl.moduleSpecifier, - exportDecl.assertClause + exportDecl.attributes ) ); } @@ -165166,7 +165560,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} factory.updateImportClause(importDeclaration.importClause, importDeclaration.importClause.isTypeOnly, name, namedBindings), // TODO: GH#18217 importDeclaration.moduleSpecifier, - importDeclaration.assertClause + importDeclaration.attributes ); } function sortSpecifiers(specifiers, comparer) { @@ -165308,19 +165702,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function getNewImportSpecifiers(namedImports) { - return flatMap( - namedImports, - (namedImport) => map( - tryGetNamedBindingElements(namedImport), - (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && importSpecifier.name.escapedText === importSpecifier.propertyName.escapedText ? factory.updateImportSpecifier( - importSpecifier, - importSpecifier.isTypeOnly, - /*propertyName*/ - void 0, - importSpecifier.name - ) : importSpecifier - ) - ); + return flatMap(namedImports, (namedImport) => map(tryGetNamedBindingElements(namedImport), (importSpecifier) => importSpecifier.name && importSpecifier.propertyName && importSpecifier.name.escapedText === importSpecifier.propertyName.escapedText ? factory.updateImportSpecifier( + importSpecifier, + importSpecifier.isTypeOnly, + /*propertyName*/ + void 0, + importSpecifier.name + ) : importSpecifier)); } function tryGetNamedBindingElements(namedImport) { var _a; @@ -165554,11 +165942,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } function isRegionDelimiter(lineText) { - lineText = trimStringStart(lineText); + lineText = lineText.trimStart(); if (!startsWith(lineText, "//")) { return null; } - lineText = trimString(lineText.slice(2)); + lineText = lineText.slice(2).trim(); return regionDelimiterRegExp.exec(lineText); } function addOutliningForLeadingCommentsForPos(pos, sourceFile, cancellationToken, out) { @@ -165690,10 +166078,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} return spanForParenthesizedExpression(n); case 275 /* NamedImports */: case 279 /* NamedExports */: - case 300 /* AssertClause */: - return spanForNamedImportsOrExportsOrAssertClause(n); + case 300 /* ImportAttributes */: + return spanForImportExportElements(n); } - function spanForNamedImportsOrExportsOrAssertClause(node) { + function spanForImportExportElements(node) { if (!node.elements.length) { return void 0; } @@ -166654,10 +167042,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} Debug.assertEqual(openBraceToken.kind, 19 /* OpenBraceToken */); Debug.assertEqual(closeBraceToken.kind, 20 /* CloseBraceToken */); const groupedWithPlusMinusTokens = groupChildren(children, (child) => child === node.readonlyToken || child.kind === 148 /* ReadonlyKeyword */ || child === node.questionToken || child.kind === 58 /* QuestionToken */); - const groupedWithBrackets = groupChildren( - groupedWithPlusMinusTokens, - ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */ - ); + const groupedWithBrackets = groupChildren(groupedWithPlusMinusTokens, ({ kind }) => kind === 23 /* OpenBracketToken */ || kind === 168 /* TypeParameter */ || kind === 24 /* CloseBracketToken */); return [ openBraceToken, // Pivot on `:` @@ -166858,7 +167243,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} function getNormalizedSymbolModifiers(symbol) { if (symbol.declarations && symbol.declarations.length) { const [declaration, ...declarations] = symbol.declarations; - const excludeFlags = length(declarations) && isDeprecatedDeclaration(declaration) && some(declarations, (d) => !isDeprecatedDeclaration(d)) ? 8192 /* Deprecated */ : 0 /* None */; + const excludeFlags = length(declarations) && isDeprecatedDeclaration(declaration) && some(declarations, (d) => !isDeprecatedDeclaration(d)) ? 65536 /* Deprecated */ : 0 /* None */; const modifiers = getNodeModifiers(declaration, excludeFlags); if (modifiers) { return modifiers.split(","); @@ -167015,7 +167400,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} symbolKind = "constructor" /* constructorImplementationElement */; addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); } else { - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); + addPrefixForAnyFunctionOrVar( + functionDeclaration.kind === 179 /* CallSignature */ && !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, + symbolKind + ); } if (signature) { addSignatureDisplayParts(signature, allSignatures); @@ -167119,10 +167507,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} displayParts.push(spacePart()); displayParts.push(operatorPart(64 /* EqualsToken */)); displayParts.push(spacePart()); - displayParts.push(displayPart( - getTextOfConstantValue(constantValue), - typeof constantValue === "number" ? 7 /* numericLiteral */ : 8 /* stringLiteral */ - )); + displayParts.push(displayPart(getTextOfConstantValue(constantValue), typeof constantValue === "number" ? 7 /* numericLiteral */ : 8 /* stringLiteral */)); } } } @@ -167134,7 +167519,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const resolvedNode = resolvedSymbol.declarations[0]; const declarationName = getNameOfDeclaration(resolvedNode); if (declarationName && !hasAddedSymbolInfo) { - const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, 2 /* Ambient */); + const isExternalModuleDeclaration = isModuleWithStringLiteralName(resolvedNode) && hasSyntacticModifier(resolvedNode, 128 /* Ambient */); const shouldUseAliasName = symbol.name !== "default" && !isExternalModuleDeclaration; const resolvedInfo = getSymbolDisplayPartsDocumentationAndSymbolKindWorker( typeChecker, @@ -167266,11 +167651,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} if (documentation.length === 0 && isIdentifier(location) && symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration)) { const declaration = symbol.valueDeclaration; const parent2 = declaration.parent; - if (isIdentifier(declaration.name) && isObjectBindingPattern(parent2)) { - const name = getTextOfIdentifierOrLiteral(declaration.name); + const name = declaration.propertyName || declaration.name; + if (isIdentifier(name) && isObjectBindingPattern(parent2)) { + const propertyName = getTextOfIdentifierOrLiteral(name); const objectType = typeChecker.getTypeAtLocation(parent2); documentation = firstDefined(objectType.isUnion() ? objectType.types : [objectType], (t) => { - const prop = t.getProperty(name); + const prop = t.getProperty(propertyName); return prop ? prop.getDocumentationComment(typeChecker) : void 0; }) || emptyArray; } @@ -168203,8 +168589,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} const startPosition = getFirstNonSpaceCharacterPosition(sourceFile.text, lineStartPosition); const insertAtLineStart = isValidLocationToAddComment(sourceFile, startPosition); const token = getTouchingToken(sourceFile, insertAtLineStart ? startPosition : position); - const indent2 = sourceFile.text.slice(lineStartPosition, startPosition); - const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${indent2}`; + const indent3 = sourceFile.text.slice(lineStartPosition, startPosition); + const text = `${insertAtLineStart ? "" : this.newLineCharacter}//${commentText}${this.newLineCharacter}${indent3}`; this.insertText(sourceFile, token.getStart(sourceFile), text); } insertJsdocCommentBefore(sourceFile, node, tag) { @@ -168223,8 +168609,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } } const startPosition = getPrecedingNonSpaceCharacterPosition(sourceFile.text, fnStart - 1); - const indent2 = sourceFile.text.slice(startPosition, fnStart); - this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter + indent2 }); + const indent3 = sourceFile.text.slice(startPosition, fnStart); + this.insertNodeAt(sourceFile, fnStart, tag, { suffix: this.newLineCharacter + indent3 }); } createJSDocText(sourceFile, node) { const comments = flatMap(node.jsDoc, (jsDoc2) => isString(jsDoc2.comment) ? factory.createJSDocText(jsDoc2.comment) : jsDoc2.comment); @@ -168236,12 +168622,14 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")} } addJSDocTags(sourceFile, parent2, newTags) { const oldTags = flatMapToMutable(parent2.jsDoc, (j) => j.tags); - const unmergedNewTags = newTags.filter((newTag) => !oldTags.some((tag, i) => { - const merged = tryMergeJsdocTags(tag, newTag); - if (merged) - oldTags[i] = merged; - return !!merged; - })); + const unmergedNewTags = newTags.filter( + (newTag) => !oldTags.some((tag, i) => { + const merged = tryMergeJsdocTags(tag, newTag); + if (merged) + oldTags[i] = merged; + return !!merged; + }) + ); this.replaceJSDocComment(sourceFile, parent2, [...oldTags, ...unmergedNewTags]); } filterJSDocTags(sourceFile, parent2, predicate) { @@ -168618,7 +169006,7 @@ ${options.prefix}` : "\n" : options.prefix const sourceFile = createSourceFile( "any file name", nonFormattedText, - 99 /* ESNext */, + { languageVersion: 99 /* ESNext */, jsDocParsingMode: 1 /* ParseNone */ }, /*setParentNodes*/ true, scriptKind @@ -169229,12 +169617,12 @@ ${options.prefix}` : "\n" : options.prefix rule("IgnoreBeforeComment", anyToken, comments, anyContext, 1 /* StopProcessingSpaceActions */), rule("IgnoreAfterLineComment", 2 /* SingleLineCommentTrivia */, anyToken, anyContext, 1 /* StopProcessingSpaceActions */), rule("NotSpaceBeforeColon", anyToken, 59 /* ColonToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */), - rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext], 4 /* InsertSpace */), + rule("SpaceAfterColon", 59 /* ColonToken */, anyToken, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNextTokenParentNotJsxNamespacedName], 4 /* InsertSpace */), rule("NoSpaceBeforeQuestionMark", anyToken, 58 /* QuestionToken */, [isNonJsxSameLineTokenContext, isNotBinaryOpContext, isNotTypeAnnotationContext], 16 /* DeleteSpace */), // insert space after '?' only when it is used in conditional operator rule("SpaceAfterQuestionMarkInConditionalOperator", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isConditionalOperatorContext], 4 /* InsertSpace */), // in other cases there should be no space between '?' and next token - rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceAfterQuestionMark", 58 /* QuestionToken */, anyToken, [isNonJsxSameLineTokenContext, isNonOptionalPropertyContext], 16 /* DeleteSpace */), rule("NoSpaceBeforeDot", anyToken, [25 /* DotToken */, 29 /* QuestionDotToken */], [isNonJsxSameLineTokenContext, isNotPropertyAccessOnIntegerLiteral], 16 /* DeleteSpace */), rule("NoSpaceAfterDot", [25 /* DotToken */, 29 /* QuestionDotToken */], anyToken, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBetweenImportParenInImportType", 102 /* ImportKeyword */, 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext, isImportTypeContext], 16 /* DeleteSpace */), @@ -169300,6 +169688,8 @@ ${options.prefix}` : "\n" : options.prefix rule("NoSpaceBeforeGreaterThanTokenInJsxOpeningElement", 44 /* SlashToken */, 32 /* GreaterThanToken */, [isJsxSelfClosingElementContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceBeforeEqualInJsxAttribute", anyToken, 64 /* EqualsToken */, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), rule("NoSpaceAfterEqualInJsxAttribute", 64 /* EqualsToken */, anyToken, [isJsxAttributeContext, isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), + rule("NoSpaceBeforeJsxNamespaceColon", 80 /* Identifier */, 59 /* ColonToken */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */), + rule("NoSpaceAfterJsxNamespaceColon", 59 /* ColonToken */, 80 /* Identifier */, [isNextTokenParentJsxNamespacedName], 16 /* DeleteSpace */), // TypeScript-specific rules // Use of module as a function call. e.g.: import m2 = module("m2"); rule("NoSpaceAfterModuleImport", [144 /* ModuleKeyword */, 149 /* RequireKeyword */], 21 /* OpenParenToken */, [isNonJsxSameLineTokenContext], 16 /* DeleteSpace */), @@ -169362,6 +169752,7 @@ ${options.prefix}` : "\n" : options.prefix isNonJsxSameLineTokenContext, isTypeArgumentOrParameterOrAssertionContext, isNotFunctionDeclContext, + /*To prevent an interference with the SpaceBeforeOpenParenInFuncDecl rule*/ isNonTypeAssertionContext ], 16 /* DeleteSpace */), // decorators @@ -169576,6 +169967,12 @@ ${options.prefix}` : "\n" : options.prefix const contextKind = context.contextNode.kind; return contextKind === 172 /* PropertyDeclaration */ || contextKind === 171 /* PropertySignature */ || contextKind === 169 /* Parameter */ || contextKind === 260 /* VariableDeclaration */ || isFunctionLikeKind(contextKind); } + function isOptionalPropertyContext(context) { + return isPropertyDeclaration(context.contextNode) && context.contextNode.questionToken; + } + function isNonOptionalPropertyContext(context) { + return !isOptionalPropertyContext(context); + } function isConditionalOperatorContext(context) { return context.contextNode.kind === 227 /* ConditionalExpression */ || context.contextNode.kind === 194 /* ConditionalType */; } @@ -169729,11 +170126,17 @@ ${options.prefix}` : "\n" : options.prefix return context.contextNode.kind === 294 /* JsxExpression */ || context.contextNode.kind === 293 /* JsxSpreadAttribute */; } function isNextTokenParentJsxAttribute(context) { - return context.nextTokenParent.kind === 291 /* JsxAttribute */; + return context.nextTokenParent.kind === 291 /* JsxAttribute */ || context.nextTokenParent.kind === 295 /* JsxNamespacedName */ && context.nextTokenParent.parent.kind === 291 /* JsxAttribute */; } function isJsxAttributeContext(context) { return context.contextNode.kind === 291 /* JsxAttribute */; } + function isNextTokenParentNotJsxNamespacedName(context) { + return context.nextTokenParent.kind !== 295 /* JsxNamespacedName */; + } + function isNextTokenParentJsxNamespacedName(context) { + return context.nextTokenParent.kind === 295 /* JsxNamespacedName */; + } function isJsxSelfClosingElementContext(context) { return context.contextNode.kind === 285 /* JsxSelfClosingElement */; } @@ -169859,7 +170262,7 @@ ${options.prefix}` : "\n" : options.prefix return positionIsASICandidate(context.currentTokenSpan.end, context.currentTokenParent, context.sourceFile); } function isNotPropertyAccessOnIntegerLiteral(context) { - return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().indexOf(".") !== -1; + return !isPropertyAccessExpression(context.contextNode) || !isNumericLiteral(context.contextNode.expression) || context.contextNode.expression.getText().includes("."); } var init_rules = __esm({ "src/services/formatting/rules.ts"() { @@ -170589,17 +170992,12 @@ ${options.prefix}` : "\n" : options.prefix let indentNextTokenOrTrivia = true; if (currentTokenInfo.leadingTrivia) { const commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind, tokenIndentation, container); - indentNextTokenOrTrivia = indentTriviaItems( - currentTokenInfo.leadingTrivia, + indentNextTokenOrTrivia = indentTriviaItems(currentTokenInfo.leadingTrivia, commentIndentation, indentNextTokenOrTrivia, (item) => insertIndentation( + item.pos, commentIndentation, - indentNextTokenOrTrivia, - (item) => insertIndentation( - item.pos, - commentIndentation, - /*lineAdded*/ - false - ) - ); + /*lineAdded*/ + false + )); } if (tokenIndentation !== -1 /* Unknown */ && indentNextTokenOrTrivia) { insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAction === 1 /* LineAdded */); @@ -171060,7 +171458,7 @@ ${options.prefix}` : "\n" : options.prefix } const containerList = getListByPosition(position, precedingToken.parent, sourceFile); if (containerList && !rangeContainsRange(containerList, precedingToken)) { - const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].indexOf(currentToken.parent.kind) !== -1; + const useTheSameBaseIndentation = [218 /* FunctionExpression */, 219 /* ArrowFunction */].includes(currentToken.parent.kind); const indentSize = useTheSameBaseIndentation ? 0 : options.indentSize; return getActualIndentationForListStartLine(containerList, sourceFile, options) + indentSize; } @@ -171595,7 +171993,6 @@ ${options.prefix}` : "\n" : options.prefix init_transpile(); init_services(); init_transform(); - init_shims(); init_ts_BreakpointResolver(); init_ts_CallHierarchy(); init_ts_classifier(); @@ -171628,7 +172025,7 @@ ${options.prefix}` : "\n" : options.prefix deprecationMessage += `'${name}' `; deprecationMessage += since ? `has been deprecated since v${since}` : "is deprecated"; deprecationMessage += error2 ? " and can no longer be used." : errorAfter ? ` and will no longer be usable after v${errorAfter}.` : "."; - deprecationMessage += message ? ` ${formatStringFromArgs(message, [name], 0)}` : ""; + deprecationMessage += message ? ` ${formatStringFromArgs(message, [name])}` : ""; return deprecationMessage; } function createErrorDeprecation(name, errorAfter, since, message) { @@ -171788,865 +172185,14808 @@ ${options.prefix}` : "\n" : options.prefix } }); - // src/typescript/_namespaces/ts.ts - var ts_exports2 = {}; - __export(ts_exports2, { - ANONYMOUS: () => ANONYMOUS, - AccessFlags: () => AccessFlags, - AssertionLevel: () => AssertionLevel, - AssignmentDeclarationKind: () => AssignmentDeclarationKind, - AssignmentKind: () => AssignmentKind, - Associativity: () => Associativity, - BreakpointResolver: () => ts_BreakpointResolver_exports, - BuilderFileEmit: () => BuilderFileEmit, - BuilderProgramKind: () => BuilderProgramKind, - BuilderState: () => BuilderState, - BundleFileSectionKind: () => BundleFileSectionKind, - CallHierarchy: () => ts_CallHierarchy_exports, - CharacterCodes: () => CharacterCodes, - CheckFlags: () => CheckFlags, - CheckMode: () => CheckMode, - ClassificationType: () => ClassificationType, - ClassificationTypeNames: () => ClassificationTypeNames, - CommentDirectiveType: () => CommentDirectiveType, - Comparison: () => Comparison, - CompletionInfoFlags: () => CompletionInfoFlags, - CompletionTriggerKind: () => CompletionTriggerKind, - Completions: () => ts_Completions_exports, - ConfigFileProgramReloadLevel: () => ConfigFileProgramReloadLevel, - ContainerFlags: () => ContainerFlags, - ContextFlags: () => ContextFlags, - CoreServicesShimHostAdapter: () => CoreServicesShimHostAdapter, - Debug: () => Debug, - DiagnosticCategory: () => DiagnosticCategory, - Diagnostics: () => Diagnostics, - DocumentHighlights: () => DocumentHighlights, - ElementFlags: () => ElementFlags, - EmitFlags: () => EmitFlags, - EmitHint: () => EmitHint, - EmitOnly: () => EmitOnly, - EndOfLineState: () => EndOfLineState, - EnumKind: () => EnumKind, - ExitStatus: () => ExitStatus, - ExportKind: () => ExportKind, - Extension: () => Extension, - ExternalEmitHelpers: () => ExternalEmitHelpers, - FileIncludeKind: () => FileIncludeKind, - FilePreprocessingDiagnosticsKind: () => FilePreprocessingDiagnosticsKind, - FileSystemEntryKind: () => FileSystemEntryKind, - FileWatcherEventKind: () => FileWatcherEventKind, - FindAllReferences: () => ts_FindAllReferences_exports, - FlattenLevel: () => FlattenLevel, - FlowFlags: () => FlowFlags, - ForegroundColorEscapeSequences: () => ForegroundColorEscapeSequences, - FunctionFlags: () => FunctionFlags, - GeneratedIdentifierFlags: () => GeneratedIdentifierFlags, - GetLiteralTextFlags: () => GetLiteralTextFlags, - GoToDefinition: () => ts_GoToDefinition_exports, - HighlightSpanKind: () => HighlightSpanKind, - IdentifierNameMap: () => IdentifierNameMap, - IdentifierNameMultiMap: () => IdentifierNameMultiMap, - ImportKind: () => ImportKind, - ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, - IndentStyle: () => IndentStyle, - IndexFlags: () => IndexFlags, - IndexKind: () => IndexKind, - InferenceFlags: () => InferenceFlags, - InferencePriority: () => InferencePriority, - InlayHintKind: () => InlayHintKind, - InlayHints: () => ts_InlayHints_exports, - InternalEmitFlags: () => InternalEmitFlags, - InternalSymbolName: () => InternalSymbolName, - InvalidatedProjectKind: () => InvalidatedProjectKind, - JsDoc: () => ts_JsDoc_exports, - JsTyping: () => ts_JsTyping_exports, - JsxEmit: () => JsxEmit, - JsxFlags: () => JsxFlags, - JsxReferenceKind: () => JsxReferenceKind, - LanguageServiceMode: () => LanguageServiceMode, - LanguageServiceShimHostAdapter: () => LanguageServiceShimHostAdapter, - LanguageVariant: () => LanguageVariant, - LexicalEnvironmentFlags: () => LexicalEnvironmentFlags, - ListFormat: () => ListFormat, - LogLevel: () => LogLevel, - MemberOverrideStatus: () => MemberOverrideStatus, - ModifierFlags: () => ModifierFlags, - ModuleDetectionKind: () => ModuleDetectionKind, - ModuleInstanceState: () => ModuleInstanceState, - ModuleKind: () => ModuleKind, - ModuleResolutionKind: () => ModuleResolutionKind, - ModuleSpecifierEnding: () => ModuleSpecifierEnding, - NavigateTo: () => ts_NavigateTo_exports, - NavigationBar: () => ts_NavigationBar_exports, - NewLineKind: () => NewLineKind, - NodeBuilderFlags: () => NodeBuilderFlags, - NodeCheckFlags: () => NodeCheckFlags, - NodeFactoryFlags: () => NodeFactoryFlags, - NodeFlags: () => NodeFlags, - NodeResolutionFeatures: () => NodeResolutionFeatures, - ObjectFlags: () => ObjectFlags, - OperationCanceledException: () => OperationCanceledException, - OperatorPrecedence: () => OperatorPrecedence, - OrganizeImports: () => ts_OrganizeImports_exports, - OrganizeImportsMode: () => OrganizeImportsMode, - OuterExpressionKinds: () => OuterExpressionKinds, - OutliningElementsCollector: () => ts_OutliningElementsCollector_exports, - OutliningSpanKind: () => OutliningSpanKind, - OutputFileType: () => OutputFileType, - PackageJsonAutoImportPreference: () => PackageJsonAutoImportPreference, - PackageJsonDependencyGroup: () => PackageJsonDependencyGroup, - PatternMatchKind: () => PatternMatchKind, - PollingInterval: () => PollingInterval, - PollingWatchKind: () => PollingWatchKind, - PragmaKindFlags: () => PragmaKindFlags, - PrivateIdentifierKind: () => PrivateIdentifierKind, - ProcessLevel: () => ProcessLevel, - QuotePreference: () => QuotePreference, - RelationComparisonResult: () => RelationComparisonResult, - Rename: () => ts_Rename_exports, - ScriptElementKind: () => ScriptElementKind, - ScriptElementKindModifier: () => ScriptElementKindModifier, - ScriptKind: () => ScriptKind, - ScriptSnapshot: () => ScriptSnapshot, - ScriptTarget: () => ScriptTarget, - SemanticClassificationFormat: () => SemanticClassificationFormat, - SemanticMeaning: () => SemanticMeaning, - SemicolonPreference: () => SemicolonPreference, - SignatureCheckMode: () => SignatureCheckMode, - SignatureFlags: () => SignatureFlags, - SignatureHelp: () => ts_SignatureHelp_exports, - SignatureKind: () => SignatureKind, - SmartSelectionRange: () => ts_SmartSelectionRange_exports, - SnippetKind: () => SnippetKind, - SortKind: () => SortKind, - StructureIsReused: () => StructureIsReused, - SymbolAccessibility: () => SymbolAccessibility, - SymbolDisplay: () => ts_SymbolDisplay_exports, - SymbolDisplayPartKind: () => SymbolDisplayPartKind, - SymbolFlags: () => SymbolFlags, - SymbolFormatFlags: () => SymbolFormatFlags, - SyntaxKind: () => SyntaxKind, - SyntheticSymbolKind: () => SyntheticSymbolKind, - Ternary: () => Ternary, - ThrottledCancellationToken: () => ThrottledCancellationToken, - TokenClass: () => TokenClass, - TokenFlags: () => TokenFlags, - TransformFlags: () => TransformFlags, - TypeFacts: () => TypeFacts, - TypeFlags: () => TypeFlags, - TypeFormatFlags: () => TypeFormatFlags, - TypeMapKind: () => TypeMapKind, - TypePredicateKind: () => TypePredicateKind, - TypeReferenceSerializationKind: () => TypeReferenceSerializationKind, - TypeScriptServicesFactory: () => TypeScriptServicesFactory, - UnionReduction: () => UnionReduction, - UpToDateStatusType: () => UpToDateStatusType, - VarianceFlags: () => VarianceFlags, - Version: () => Version, - VersionRange: () => VersionRange, - WatchDirectoryFlags: () => WatchDirectoryFlags, - WatchDirectoryKind: () => WatchDirectoryKind, - WatchFileKind: () => WatchFileKind, - WatchLogLevel: () => WatchLogLevel, - WatchType: () => WatchType, - accessPrivateIdentifier: () => accessPrivateIdentifier, - addDisposableResourceHelper: () => addDisposableResourceHelper, - addEmitFlags: () => addEmitFlags, - addEmitHelper: () => addEmitHelper, - addEmitHelpers: () => addEmitHelpers, - addInternalEmitFlags: () => addInternalEmitFlags, - addNodeFactoryPatcher: () => addNodeFactoryPatcher, - addObjectAllocatorPatcher: () => addObjectAllocatorPatcher, - addRange: () => addRange, - addRelatedInfo: () => addRelatedInfo, - addSyntheticLeadingComment: () => addSyntheticLeadingComment, - addSyntheticTrailingComment: () => addSyntheticTrailingComment, - addToSeen: () => addToSeen, - advancedAsyncSuperHelper: () => advancedAsyncSuperHelper, - affectsDeclarationPathOptionDeclarations: () => affectsDeclarationPathOptionDeclarations, - affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations, - allKeysStartWithDot: () => allKeysStartWithDot, - altDirectorySeparator: () => altDirectorySeparator, - and: () => and, - append: () => append, - appendIfUnique: () => appendIfUnique, - arrayFrom: () => arrayFrom, - arrayIsEqualTo: () => arrayIsEqualTo, - arrayIsHomogeneous: () => arrayIsHomogeneous, - arrayIsSorted: () => arrayIsSorted, - arrayOf: () => arrayOf, - arrayReverseIterator: () => arrayReverseIterator, - arrayToMap: () => arrayToMap, - arrayToMultiMap: () => arrayToMultiMap, - arrayToNumericMap: () => arrayToNumericMap, - arraysEqual: () => arraysEqual, - assertType: () => assertType, - assign: () => assign, - assignHelper: () => assignHelper, - asyncDelegator: () => asyncDelegator, - asyncGeneratorHelper: () => asyncGeneratorHelper, - asyncSuperHelper: () => asyncSuperHelper, - asyncValues: () => asyncValues, - attachFileToDiagnostics: () => attachFileToDiagnostics, - awaitHelper: () => awaitHelper, - awaiterHelper: () => awaiterHelper, - base64decode: () => base64decode, - base64encode: () => base64encode, - binarySearch: () => binarySearch, - binarySearchKey: () => binarySearchKey, - bindSourceFile: () => bindSourceFile, - breakIntoCharacterSpans: () => breakIntoCharacterSpans, - breakIntoWordSpans: () => breakIntoWordSpans, - buildLinkParts: () => buildLinkParts, - buildOpts: () => buildOpts, - buildOverload: () => buildOverload, - bundlerModuleNameResolver: () => bundlerModuleNameResolver, - canBeConvertedToAsync: () => canBeConvertedToAsync, - canHaveDecorators: () => canHaveDecorators, - canHaveExportModifier: () => canHaveExportModifier, - canHaveFlowNode: () => canHaveFlowNode, - canHaveIllegalDecorators: () => canHaveIllegalDecorators, - canHaveIllegalModifiers: () => canHaveIllegalModifiers, - canHaveIllegalType: () => canHaveIllegalType, - canHaveIllegalTypeParameters: () => canHaveIllegalTypeParameters, - canHaveJSDoc: () => canHaveJSDoc, - canHaveLocals: () => canHaveLocals, - canHaveModifiers: () => canHaveModifiers, - canHaveSymbol: () => canHaveSymbol, - canJsonReportNoInputFiles: () => canJsonReportNoInputFiles, - canProduceDiagnostics: () => canProduceDiagnostics, - canUsePropertyAccess: () => canUsePropertyAccess, - canWatchAffectingLocation: () => canWatchAffectingLocation, - canWatchAtTypes: () => canWatchAtTypes, - canWatchDirectoryOrFile: () => canWatchDirectoryOrFile, - cartesianProduct: () => cartesianProduct, - cast: () => cast, - chainBundle: () => chainBundle, - chainDiagnosticMessages: () => chainDiagnosticMessages, - changeAnyExtension: () => changeAnyExtension, - changeCompilerHostLikeToUseCache: () => changeCompilerHostLikeToUseCache, - changeExtension: () => changeExtension, - changesAffectModuleResolution: () => changesAffectModuleResolution, - changesAffectingProgramStructure: () => changesAffectingProgramStructure, - childIsDecorated: () => childIsDecorated, - classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, - classHasClassThisAssignment: () => classHasClassThisAssignment, - classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, - classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, - classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, - classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, - classPrivateFieldInHelper: () => classPrivateFieldInHelper, - classPrivateFieldSetHelper: () => classPrivateFieldSetHelper, - classicNameResolver: () => classicNameResolver, - classifier: () => ts_classifier_exports, - cleanExtendedConfigCache: () => cleanExtendedConfigCache, - clear: () => clear, - clearMap: () => clearMap, - clearSharedExtendedConfigFileWatcher: () => clearSharedExtendedConfigFileWatcher, - climbPastPropertyAccess: () => climbPastPropertyAccess, - climbPastPropertyOrElementAccess: () => climbPastPropertyOrElementAccess, - clone: () => clone, - cloneCompilerOptions: () => cloneCompilerOptions, - closeFileWatcher: () => closeFileWatcher, - closeFileWatcherOf: () => closeFileWatcherOf, - codefix: () => ts_codefix_exports, - collapseTextChangeRangesAcrossMultipleVersions: () => collapseTextChangeRangesAcrossMultipleVersions, - collectExternalModuleInfo: () => collectExternalModuleInfo, - combine: () => combine, - combinePaths: () => combinePaths, - commentPragmas: () => commentPragmas, - commonOptionsWithBuild: () => commonOptionsWithBuild, - commonPackageFolders: () => commonPackageFolders, - compact: () => compact, - compareBooleans: () => compareBooleans, - compareDataObjects: () => compareDataObjects, - compareDiagnostics: () => compareDiagnostics, - compareDiagnosticsSkipRelatedInformation: () => compareDiagnosticsSkipRelatedInformation, - compareEmitHelpers: () => compareEmitHelpers, - compareNumberOfDirectorySeparators: () => compareNumberOfDirectorySeparators, - comparePaths: () => comparePaths, - comparePathsCaseInsensitive: () => comparePathsCaseInsensitive, - comparePathsCaseSensitive: () => comparePathsCaseSensitive, - comparePatternKeys: () => comparePatternKeys, - compareProperties: () => compareProperties, - compareStringsCaseInsensitive: () => compareStringsCaseInsensitive, - compareStringsCaseInsensitiveEslintCompatible: () => compareStringsCaseInsensitiveEslintCompatible, - compareStringsCaseSensitive: () => compareStringsCaseSensitive, - compareStringsCaseSensitiveUI: () => compareStringsCaseSensitiveUI, - compareTextSpans: () => compareTextSpans, - compareValues: () => compareValues, - compileOnSaveCommandLineOption: () => compileOnSaveCommandLineOption, - compilerOptionsAffectDeclarationPath: () => compilerOptionsAffectDeclarationPath, - compilerOptionsAffectEmit: () => compilerOptionsAffectEmit, - compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics, - compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics, - compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules, - compose: () => compose, - computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames, - computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition, - computeLineOfPosition: () => computeLineOfPosition, - computeLineStarts: () => computeLineStarts, - computePositionOfLineAndCharacter: () => computePositionOfLineAndCharacter, - computeSignature: () => computeSignature, - computeSignatureWithDiagnostics: () => computeSignatureWithDiagnostics, - computeSuggestionDiagnostics: () => computeSuggestionDiagnostics, - concatenate: () => concatenate, - concatenateDiagnosticMessageChains: () => concatenateDiagnosticMessageChains, - consumesNodeCoreModules: () => consumesNodeCoreModules, - contains: () => contains, - containsIgnoredPath: () => containsIgnoredPath, - containsObjectRestOrSpread: () => containsObjectRestOrSpread, - containsParseError: () => containsParseError, - containsPath: () => containsPath, - convertCompilerOptionsForTelemetry: () => convertCompilerOptionsForTelemetry, - convertCompilerOptionsFromJson: () => convertCompilerOptionsFromJson, - convertJsonOption: () => convertJsonOption, - convertToBase64: () => convertToBase64, - convertToJson: () => convertToJson, - convertToObject: () => convertToObject, - convertToOptionsWithAbsolutePaths: () => convertToOptionsWithAbsolutePaths, - convertToRelativePath: () => convertToRelativePath, - convertToTSConfig: () => convertToTSConfig, - convertTypeAcquisitionFromJson: () => convertTypeAcquisitionFromJson, - copyComments: () => copyComments, - copyEntries: () => copyEntries, - copyLeadingComments: () => copyLeadingComments, - copyProperties: () => copyProperties, - copyTrailingAsLeadingComments: () => copyTrailingAsLeadingComments, - copyTrailingComments: () => copyTrailingComments, - couldStartTrivia: () => couldStartTrivia, - countWhere: () => countWhere, - createAbstractBuilder: () => createAbstractBuilder, - createAccessorPropertyBackingField: () => createAccessorPropertyBackingField, - createAccessorPropertyGetRedirector: () => createAccessorPropertyGetRedirector, - createAccessorPropertySetRedirector: () => createAccessorPropertySetRedirector, - createBaseNodeFactory: () => createBaseNodeFactory, - createBinaryExpressionTrampoline: () => createBinaryExpressionTrampoline, - createBindingHelper: () => createBindingHelper, - createBuildInfo: () => createBuildInfo, - createBuilderProgram: () => createBuilderProgram, - createBuilderProgramUsingProgramBuildInfo: () => createBuilderProgramUsingProgramBuildInfo, - createBuilderStatusReporter: () => createBuilderStatusReporter, - createCacheWithRedirects: () => createCacheWithRedirects, - createCacheableExportInfoMap: () => createCacheableExportInfoMap, - createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, - createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, - createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, - createClassifier: () => createClassifier, - createCommentDirectivesMap: () => createCommentDirectivesMap, - createCompilerDiagnostic: () => createCompilerDiagnostic, - createCompilerDiagnosticForInvalidCustomType: () => createCompilerDiagnosticForInvalidCustomType, - createCompilerDiagnosticFromMessageChain: () => createCompilerDiagnosticFromMessageChain, - createCompilerHost: () => createCompilerHost, - createCompilerHostFromProgramHost: () => createCompilerHostFromProgramHost, - createCompilerHostWorker: () => createCompilerHostWorker, - createDetachedDiagnostic: () => createDetachedDiagnostic, - createDiagnosticCollection: () => createDiagnosticCollection, - createDiagnosticForFileFromMessageChain: () => createDiagnosticForFileFromMessageChain, - createDiagnosticForNode: () => createDiagnosticForNode, - createDiagnosticForNodeArray: () => createDiagnosticForNodeArray, - createDiagnosticForNodeArrayFromMessageChain: () => createDiagnosticForNodeArrayFromMessageChain, - createDiagnosticForNodeFromMessageChain: () => createDiagnosticForNodeFromMessageChain, - createDiagnosticForNodeInSourceFile: () => createDiagnosticForNodeInSourceFile, - createDiagnosticForRange: () => createDiagnosticForRange, - createDiagnosticMessageChainFromDiagnostic: () => createDiagnosticMessageChainFromDiagnostic, - createDiagnosticReporter: () => createDiagnosticReporter, - createDocumentPositionMapper: () => createDocumentPositionMapper, - createDocumentRegistry: () => createDocumentRegistry, - createDocumentRegistryInternal: () => createDocumentRegistryInternal, - createEmitAndSemanticDiagnosticsBuilderProgram: () => createEmitAndSemanticDiagnosticsBuilderProgram, - createEmitHelperFactory: () => createEmitHelperFactory, - createEmptyExports: () => createEmptyExports, - createExpressionForJsxElement: () => createExpressionForJsxElement, - createExpressionForJsxFragment: () => createExpressionForJsxFragment, - createExpressionForObjectLiteralElementLike: () => createExpressionForObjectLiteralElementLike, - createExpressionForPropertyName: () => createExpressionForPropertyName, - createExpressionFromEntityName: () => createExpressionFromEntityName, - createExternalHelpersImportDeclarationIfNeeded: () => createExternalHelpersImportDeclarationIfNeeded, - createFileDiagnostic: () => createFileDiagnostic, - createFileDiagnosticFromMessageChain: () => createFileDiagnosticFromMessageChain, - createForOfBindingStatement: () => createForOfBindingStatement, - createGetCanonicalFileName: () => createGetCanonicalFileName, - createGetSourceFile: () => createGetSourceFile, - createGetSymbolAccessibilityDiagnosticForNode: () => createGetSymbolAccessibilityDiagnosticForNode, - createGetSymbolAccessibilityDiagnosticForNodeName: () => createGetSymbolAccessibilityDiagnosticForNodeName, - createGetSymbolWalker: () => createGetSymbolWalker, - createIncrementalCompilerHost: () => createIncrementalCompilerHost, - createIncrementalProgram: () => createIncrementalProgram, - createInputFiles: () => createInputFiles, - createInputFilesWithFilePaths: () => createInputFilesWithFilePaths, - createInputFilesWithFileTexts: () => createInputFilesWithFileTexts, - createJsxFactoryExpression: () => createJsxFactoryExpression, - createLanguageService: () => createLanguageService, - createLanguageServiceSourceFile: () => createLanguageServiceSourceFile, - createMemberAccessForPropertyName: () => createMemberAccessForPropertyName, - createModeAwareCache: () => createModeAwareCache, - createModeAwareCacheKey: () => createModeAwareCacheKey, - createModuleNotFoundChain: () => createModuleNotFoundChain, - createModuleResolutionCache: () => createModuleResolutionCache, - createModuleResolutionLoader: () => createModuleResolutionLoader, - createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost, - createMultiMap: () => createMultiMap, - createNodeConverters: () => createNodeConverters, - createNodeFactory: () => createNodeFactory, - createOptionNameMap: () => createOptionNameMap, - createOverload: () => createOverload, - createPackageJsonImportFilter: () => createPackageJsonImportFilter, - createPackageJsonInfo: () => createPackageJsonInfo, - createParenthesizerRules: () => createParenthesizerRules, - createPatternMatcher: () => createPatternMatcher, - createPrependNodes: () => createPrependNodes, - createPrinter: () => createPrinter, - createPrinterWithDefaults: () => createPrinterWithDefaults, - createPrinterWithRemoveComments: () => createPrinterWithRemoveComments, - createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape, - createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon, - createProgram: () => createProgram, - createProgramHost: () => createProgramHost, - createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral, - createQueue: () => createQueue, - createRange: () => createRange, - createRedirectedBuilderProgram: () => createRedirectedBuilderProgram, - createResolutionCache: () => createResolutionCache, - createRuntimeTypeSerializer: () => createRuntimeTypeSerializer, - createScanner: () => createScanner, - createSemanticDiagnosticsBuilderProgram: () => createSemanticDiagnosticsBuilderProgram, - createSet: () => createSet, - createSolutionBuilder: () => createSolutionBuilder, - createSolutionBuilderHost: () => createSolutionBuilderHost, - createSolutionBuilderWithWatch: () => createSolutionBuilderWithWatch, - createSolutionBuilderWithWatchHost: () => createSolutionBuilderWithWatchHost, - createSortedArray: () => createSortedArray, - createSourceFile: () => createSourceFile, - createSourceMapGenerator: () => createSourceMapGenerator, - createSourceMapSource: () => createSourceMapSource, - createSuperAccessVariableStatement: () => createSuperAccessVariableStatement, - createSymbolTable: () => createSymbolTable, - createSymlinkCache: () => createSymlinkCache, - createSystemWatchFunctions: () => createSystemWatchFunctions, - createTextChange: () => createTextChange, - createTextChangeFromStartLength: () => createTextChangeFromStartLength, - createTextChangeRange: () => createTextChangeRange, - createTextRangeFromNode: () => createTextRangeFromNode, - createTextRangeFromSpan: () => createTextRangeFromSpan, - createTextSpan: () => createTextSpan, - createTextSpanFromBounds: () => createTextSpanFromBounds, - createTextSpanFromNode: () => createTextSpanFromNode, - createTextSpanFromRange: () => createTextSpanFromRange, - createTextSpanFromStringLiteralLikeContent: () => createTextSpanFromStringLiteralLikeContent, - createTextWriter: () => createTextWriter, - createTokenRange: () => createTokenRange, - createTypeChecker: () => createTypeChecker, - createTypeReferenceDirectiveResolutionCache: () => createTypeReferenceDirectiveResolutionCache, - createTypeReferenceResolutionLoader: () => createTypeReferenceResolutionLoader, - createUnparsedSourceFile: () => createUnparsedSourceFile, - createWatchCompilerHost: () => createWatchCompilerHost2, - createWatchCompilerHostOfConfigFile: () => createWatchCompilerHostOfConfigFile, - createWatchCompilerHostOfFilesAndCompilerOptions: () => createWatchCompilerHostOfFilesAndCompilerOptions, - createWatchFactory: () => createWatchFactory, - createWatchHost: () => createWatchHost, - createWatchProgram: () => createWatchProgram, - createWatchStatusReporter: () => createWatchStatusReporter, - createWriteFileMeasuringIO: () => createWriteFileMeasuringIO, - declarationNameToString: () => declarationNameToString, - decodeMappings: () => decodeMappings, - decodedTextSpanIntersectsWith: () => decodedTextSpanIntersectsWith, - decorateHelper: () => decorateHelper, - deduplicate: () => deduplicate, - defaultIncludeSpec: () => defaultIncludeSpec, - defaultInitCompilerOptions: () => defaultInitCompilerOptions, - defaultMaximumTruncationLength: () => defaultMaximumTruncationLength, - detectSortCaseSensitivity: () => detectSortCaseSensitivity, - diagnosticCategoryName: () => diagnosticCategoryName, - diagnosticToString: () => diagnosticToString, - directoryProbablyExists: () => directoryProbablyExists, - directorySeparator: () => directorySeparator, - displayPart: () => displayPart, - displayPartsToString: () => displayPartsToString, - disposeEmitNodes: () => disposeEmitNodes, - disposeResourcesHelper: () => disposeResourcesHelper, - documentSpansEqual: () => documentSpansEqual, - dumpTracingLegend: () => dumpTracingLegend, - elementAt: () => elementAt, - elideNodes: () => elideNodes, - emitComments: () => emitComments, - emitDetachedComments: () => emitDetachedComments, - emitFiles: () => emitFiles, - emitFilesAndReportErrors: () => emitFilesAndReportErrors, - emitFilesAndReportErrorsAndGetExitStatus: () => emitFilesAndReportErrorsAndGetExitStatus, - emitModuleKindIsNonNodeESM: () => emitModuleKindIsNonNodeESM, - emitNewLineBeforeLeadingCommentOfPosition: () => emitNewLineBeforeLeadingCommentOfPosition, - emitNewLineBeforeLeadingComments: () => emitNewLineBeforeLeadingComments, - emitNewLineBeforeLeadingCommentsOfPosition: () => emitNewLineBeforeLeadingCommentsOfPosition, - emitSkippedWithNoDiagnostics: () => emitSkippedWithNoDiagnostics, - emitUsingBuildInfo: () => emitUsingBuildInfo, - emptyArray: () => emptyArray, - emptyFileSystemEntries: () => emptyFileSystemEntries, - emptyMap: () => emptyMap, - emptyOptions: () => emptyOptions, - emptySet: () => emptySet, - endsWith: () => endsWith, - ensurePathIsNonModuleName: () => ensurePathIsNonModuleName, - ensureScriptKind: () => ensureScriptKind, - ensureTrailingDirectorySeparator: () => ensureTrailingDirectorySeparator, - entityNameToString: () => entityNameToString, - enumerateInsertsAndDeletes: () => enumerateInsertsAndDeletes, - equalOwnProperties: () => equalOwnProperties, - equateStringsCaseInsensitive: () => equateStringsCaseInsensitive, - equateStringsCaseSensitive: () => equateStringsCaseSensitive, - equateValues: () => equateValues, - esDecorateHelper: () => esDecorateHelper, - escapeJsxAttributeString: () => escapeJsxAttributeString, - escapeLeadingUnderscores: () => escapeLeadingUnderscores, - escapeNonAsciiString: () => escapeNonAsciiString, - escapeSnippetText: () => escapeSnippetText, - escapeString: () => escapeString, - every: () => every, - expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression, - explainFiles: () => explainFiles, - explainIfFileIsRedirectAndImpliedFormat: () => explainIfFileIsRedirectAndImpliedFormat, - exportAssignmentIsAlias: () => exportAssignmentIsAlias, - exportStarHelper: () => exportStarHelper, - expressionResultIsUnused: () => expressionResultIsUnused, - extend: () => extend, - extendsHelper: () => extendsHelper, - extensionFromPath: () => extensionFromPath, - extensionIsTS: () => extensionIsTS, - extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution, - externalHelpersModuleNameText: () => externalHelpersModuleNameText, - factory: () => factory, - fileExtensionIs: () => fileExtensionIs, - fileExtensionIsOneOf: () => fileExtensionIsOneOf, - fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics, - fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire, - filter: () => filter, - filterMutate: () => filterMutate, - filterSemanticDiagnostics: () => filterSemanticDiagnostics, - find: () => find, - findAncestor: () => findAncestor, - findBestPatternMatch: () => findBestPatternMatch, - findChildOfKind: () => findChildOfKind, - findComputedPropertyNameCacheAssignment: () => findComputedPropertyNameCacheAssignment, - findConfigFile: () => findConfigFile, - findContainingList: () => findContainingList, - findDiagnosticForNode: () => findDiagnosticForNode, - findFirstNonJsxWhitespaceToken: () => findFirstNonJsxWhitespaceToken, - findIndex: () => findIndex, - findLast: () => findLast, - findLastIndex: () => findLastIndex, - findListItemInfo: () => findListItemInfo, - findMap: () => findMap, - findModifier: () => findModifier, - findNextToken: () => findNextToken, - findPackageJson: () => findPackageJson, - findPackageJsons: () => findPackageJsons, - findPrecedingMatchingToken: () => findPrecedingMatchingToken, - findPrecedingToken: () => findPrecedingToken, - findSuperStatementIndexPath: () => findSuperStatementIndexPath, - findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, - findUseStrictPrologue: () => findUseStrictPrologue, - first: () => first, - firstDefined: () => firstDefined, - firstDefinedIterator: () => firstDefinedIterator, - firstIterator: () => firstIterator, - firstOrOnly: () => firstOrOnly, - firstOrUndefined: () => firstOrUndefined, - firstOrUndefinedIterator: () => firstOrUndefinedIterator, - fixupCompilerOptions: () => fixupCompilerOptions, - flatMap: () => flatMap, - flatMapIterator: () => flatMapIterator, - flatMapToMutable: () => flatMapToMutable, - flatten: () => flatten, - flattenCommaList: () => flattenCommaList, - flattenDestructuringAssignment: () => flattenDestructuringAssignment, - flattenDestructuringBinding: () => flattenDestructuringBinding, - flattenDiagnosticMessageText: () => flattenDiagnosticMessageText, - forEach: () => forEach, - forEachAncestor: () => forEachAncestor, - forEachAncestorDirectory: () => forEachAncestorDirectory, - forEachChild: () => forEachChild, - forEachChildRecursively: () => forEachChildRecursively, - forEachEmittedFile: () => forEachEmittedFile, - forEachEnclosingBlockScopeContainer: () => forEachEnclosingBlockScopeContainer, - forEachEntry: () => forEachEntry, - forEachExternalModuleToImportFrom: () => forEachExternalModuleToImportFrom, - forEachImportClauseDeclaration: () => forEachImportClauseDeclaration, - forEachKey: () => forEachKey, - forEachLeadingCommentRange: () => forEachLeadingCommentRange, - forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft, - forEachPropertyAssignment: () => forEachPropertyAssignment, - forEachResolvedProjectReference: () => forEachResolvedProjectReference, - forEachReturnStatement: () => forEachReturnStatement, - forEachRight: () => forEachRight, - forEachTrailingCommentRange: () => forEachTrailingCommentRange, - forEachTsConfigPropArray: () => forEachTsConfigPropArray, - forEachUnique: () => forEachUnique, - forEachYieldExpression: () => forEachYieldExpression, - forSomeAncestorDirectory: () => forSomeAncestorDirectory, - formatColorAndReset: () => formatColorAndReset, - formatDiagnostic: () => formatDiagnostic, - formatDiagnostics: () => formatDiagnostics, - formatDiagnosticsWithColorAndContext: () => formatDiagnosticsWithColorAndContext, - formatGeneratedName: () => formatGeneratedName, - formatGeneratedNamePart: () => formatGeneratedNamePart, - formatLocation: () => formatLocation, - formatMessage: () => formatMessage, - formatStringFromArgs: () => formatStringFromArgs, - formatting: () => ts_formatting_exports, - fullTripleSlashAMDReferencePathRegEx: () => fullTripleSlashAMDReferencePathRegEx, - fullTripleSlashReferencePathRegEx: () => fullTripleSlashReferencePathRegEx, - generateDjb2Hash: () => generateDjb2Hash, - generateTSConfig: () => generateTSConfig, - generatorHelper: () => generatorHelper, - getAdjustedReferenceLocation: () => getAdjustedReferenceLocation, - getAdjustedRenameLocation: () => getAdjustedRenameLocation, - getAliasDeclarationFromName: () => getAliasDeclarationFromName, - getAllAccessorDeclarations: () => getAllAccessorDeclarations, - getAllDecoratorsOfClass: () => getAllDecoratorsOfClass, - getAllDecoratorsOfClassElement: () => getAllDecoratorsOfClassElement, - getAllJSDocTags: () => getAllJSDocTags, - getAllJSDocTagsOfKind: () => getAllJSDocTagsOfKind, - getAllKeys: () => getAllKeys, - getAllProjectOutputs: () => getAllProjectOutputs, - getAllSuperTypeNodes: () => getAllSuperTypeNodes, - getAllUnscopedEmitHelpers: () => getAllUnscopedEmitHelpers, - getAllowJSCompilerOption: () => getAllowJSCompilerOption, - getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports, - getAncestor: () => getAncestor, - getAnyExtensionFromPath: () => getAnyExtensionFromPath, - getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, - getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, - getAssignedName: () => getAssignedName, - getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, - getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, - getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, - getAssignmentTargetKind: () => getAssignmentTargetKind, - getAutomaticTypeDirectiveNames: () => getAutomaticTypeDirectiveNames, - getBaseFileName: () => getBaseFileName, - getBinaryOperatorPrecedence: () => getBinaryOperatorPrecedence, - getBuildInfo: () => getBuildInfo, - getBuildInfoFileVersionMap: () => getBuildInfoFileVersionMap, - getBuildInfoText: () => getBuildInfoText, - getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder, - getBuilderCreationParameters: () => getBuilderCreationParameters, - getBuilderFileEmit: () => getBuilderFileEmit, - getCheckFlags: () => getCheckFlags, - getClassExtendsHeritageElement: () => getClassExtendsHeritageElement, - getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol, - getCombinedLocalAndExportSymbolFlags: () => getCombinedLocalAndExportSymbolFlags, - getCombinedModifierFlags: () => getCombinedModifierFlags, - getCombinedNodeFlags: () => getCombinedNodeFlags, - getCombinedNodeFlagsAlwaysIncludeJSDoc: () => getCombinedNodeFlagsAlwaysIncludeJSDoc, - getCommentRange: () => getCommentRange, - getCommonSourceDirectory: () => getCommonSourceDirectory, - getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig, - getCompilerOptionValue: () => getCompilerOptionValue, - getCompilerOptionsDiffValue: () => getCompilerOptionsDiffValue, - getConditions: () => getConditions, - getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, - getConstantValue: () => getConstantValue, - getContainerFlags: () => getContainerFlags, - getContainerNode: () => getContainerNode, - getContainingClass: () => getContainingClass, - getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, - getContainingClassStaticBlock: () => getContainingClassStaticBlock, - getContainingFunction: () => getContainingFunction, - getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, - getContainingFunctionOrClassStaticBlock: () => getContainingFunctionOrClassStaticBlock, - getContainingNodeArray: () => getContainingNodeArray, - getContainingObjectLiteralElement: () => getContainingObjectLiteralElement, - getContextualTypeFromParent: () => getContextualTypeFromParent, - getContextualTypeFromParentOrAncestorTypeNode: () => getContextualTypeFromParentOrAncestorTypeNode, - getCurrentTime: () => getCurrentTime, - getDeclarationDiagnostics: () => getDeclarationDiagnostics, - getDeclarationEmitExtensionForPath: () => getDeclarationEmitExtensionForPath, - getDeclarationEmitOutputFilePath: () => getDeclarationEmitOutputFilePath, - getDeclarationEmitOutputFilePathWorker: () => getDeclarationEmitOutputFilePathWorker, - getDeclarationFromName: () => getDeclarationFromName, - getDeclarationModifierFlagsFromSymbol: () => getDeclarationModifierFlagsFromSymbol, - getDeclarationOfKind: () => getDeclarationOfKind, - getDeclarationsOfKind: () => getDeclarationsOfKind, - getDeclaredExpandoInitializer: () => getDeclaredExpandoInitializer, - getDecorators: () => getDecorators, - getDefaultCompilerOptions: () => getDefaultCompilerOptions2, - getDefaultExportInfoWorker: () => getDefaultExportInfoWorker, - getDefaultFormatCodeSettings: () => getDefaultFormatCodeSettings, - getDefaultLibFileName: () => getDefaultLibFileName, - getDefaultLibFilePath: () => getDefaultLibFilePath, - getDefaultLikeExportInfo: () => getDefaultLikeExportInfo, - getDiagnosticText: () => getDiagnosticText, - getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan, - getDirectoryPath: () => getDirectoryPath, - getDirectoryToWatchFailedLookupLocation: () => getDirectoryToWatchFailedLookupLocation, - getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => getDirectoryToWatchFailedLookupLocationFromTypeRoot, - getDocumentPositionMapper: () => getDocumentPositionMapper, - getESModuleInterop: () => getESModuleInterop, - getEditsForFileRename: () => getEditsForFileRename, - getEffectiveBaseTypeNode: () => getEffectiveBaseTypeNode, - getEffectiveConstraintOfTypeParameter: () => getEffectiveConstraintOfTypeParameter, - getEffectiveContainerForJSDocTemplateTag: () => getEffectiveContainerForJSDocTemplateTag, - getEffectiveImplementsTypeNodes: () => getEffectiveImplementsTypeNodes, - getEffectiveInitializer: () => getEffectiveInitializer, - getEffectiveJSDocHost: () => getEffectiveJSDocHost, - getEffectiveModifierFlags: () => getEffectiveModifierFlags, - getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => getEffectiveModifierFlagsAlwaysIncludeJSDoc, - getEffectiveModifierFlagsNoCache: () => getEffectiveModifierFlagsNoCache, - getEffectiveReturnTypeNode: () => getEffectiveReturnTypeNode, - getEffectiveSetAccessorTypeAnnotationNode: () => getEffectiveSetAccessorTypeAnnotationNode, - getEffectiveTypeAnnotationNode: () => getEffectiveTypeAnnotationNode, - getEffectiveTypeParameterDeclarations: () => getEffectiveTypeParameterDeclarations, - getEffectiveTypeRoots: () => getEffectiveTypeRoots, - getElementOrPropertyAccessArgumentExpressionOrName: () => getElementOrPropertyAccessArgumentExpressionOrName, - getElementOrPropertyAccessName: () => getElementOrPropertyAccessName, - getElementsOfBindingOrAssignmentPattern: () => getElementsOfBindingOrAssignmentPattern, - getEmitDeclarations: () => getEmitDeclarations, - getEmitFlags: () => getEmitFlags, - getEmitHelpers: () => getEmitHelpers, - getEmitModuleDetectionKind: () => getEmitModuleDetectionKind, - getEmitModuleKind: () => getEmitModuleKind, - getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, - getEmitScriptTarget: () => getEmitScriptTarget, - getEmitStandardClassFields: () => getEmitStandardClassFields, - getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, - getEnclosingContainer: () => getEnclosingContainer, - getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, - getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, - getEndLinePosition: () => getEndLinePosition, - getEntityNameFromTypeNode: () => getEntityNameFromTypeNode, - getEntrypointsFromPackageJsonInfo: () => getEntrypointsFromPackageJsonInfo, - getErrorCountForSummary: () => getErrorCountForSummary, - getErrorSpanForNode: () => getErrorSpanForNode, - getErrorSummaryText: () => getErrorSummaryText, - getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral, - getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName, - getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName, - getExpandoInitializer: () => getExpandoInitializer, - getExportAssignmentExpression: () => getExportAssignmentExpression, - getExportInfoMap: () => getExportInfoMap, - getExportNeedsImportStarHelper: () => getExportNeedsImportStarHelper, - getExpressionAssociativity: () => getExpressionAssociativity, - getExpressionPrecedence: () => getExpressionPrecedence, - getExternalHelpersModuleName: () => getExternalHelpersModuleName, - getExternalModuleImportEqualsDeclarationExpression: () => getExternalModuleImportEqualsDeclarationExpression, - getExternalModuleName: () => getExternalModuleName, - getExternalModuleNameFromDeclaration: () => getExternalModuleNameFromDeclaration, - getExternalModuleNameFromPath: () => getExternalModuleNameFromPath, - getExternalModuleNameLiteral: () => getExternalModuleNameLiteral, - getExternalModuleRequireArgument: () => getExternalModuleRequireArgument, - getFallbackOptions: () => getFallbackOptions, - getFileEmitOutput: () => getFileEmitOutput, - getFileMatcherPatterns: () => getFileMatcherPatterns, - getFileNamesFromConfigSpecs: () => getFileNamesFromConfigSpecs, - getFileWatcherEventKind: () => getFileWatcherEventKind, - getFilesInErrorForSummary: () => getFilesInErrorForSummary, - getFirstConstructorWithBody: () => getFirstConstructorWithBody, - getFirstIdentifier: () => getFirstIdentifier, - getFirstNonSpaceCharacterPosition: () => getFirstNonSpaceCharacterPosition, - getFirstProjectOutput: () => getFirstProjectOutput, - getFixableErrorSpanExpression: () => getFixableErrorSpanExpression, - getFormatCodeSettingsForWriting: () => getFormatCodeSettingsForWriting, - getFullWidth: () => getFullWidth, - getFunctionFlags: () => getFunctionFlags, - getHeritageClause: () => getHeritageClause, - getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc, - getIdentifierAutoGenerate: () => getIdentifierAutoGenerate, - getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference, - getIdentifierTypeArguments: () => getIdentifierTypeArguments, - getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression, - getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile, - getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker, - getImportNeedsImportDefaultHelper: () => getImportNeedsImportDefaultHelper, - getImportNeedsImportStarHelper: () => getImportNeedsImportStarHelper, - getIndentSize: () => getIndentSize, - getIndentString: () => getIndentString, - getInferredLibraryNameResolveFrom: () => getInferredLibraryNameResolveFrom, - getInitializedVariables: () => getInitializedVariables, - getInitializerOfBinaryExpression: () => getInitializerOfBinaryExpression, - getInitializerOfBindingOrAssignmentElement: () => getInitializerOfBindingOrAssignmentElement, - getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes, - getInternalEmitFlags: () => getInternalEmitFlags, - getInvokedExpression: () => getInvokedExpression, - getIsolatedModules: () => getIsolatedModules, - getJSDocAugmentsTag: () => getJSDocAugmentsTag, - getJSDocClassTag: () => getJSDocClassTag, - getJSDocCommentRanges: () => getJSDocCommentRanges, - getJSDocCommentsAndTags: () => getJSDocCommentsAndTags, - getJSDocDeprecatedTag: () => getJSDocDeprecatedTag, - getJSDocDeprecatedTagNoCache: () => getJSDocDeprecatedTagNoCache, - getJSDocEnumTag: () => getJSDocEnumTag, - getJSDocHost: () => getJSDocHost, - getJSDocImplementsTags: () => getJSDocImplementsTags, - getJSDocOverrideTagNoCache: () => getJSDocOverrideTagNoCache, - getJSDocParameterTags: () => getJSDocParameterTags, - getJSDocParameterTagsNoCache: () => getJSDocParameterTagsNoCache, - getJSDocPrivateTag: () => getJSDocPrivateTag, - getJSDocPrivateTagNoCache: () => getJSDocPrivateTagNoCache, - getJSDocProtectedTag: () => getJSDocProtectedTag, - getJSDocProtectedTagNoCache: () => getJSDocProtectedTagNoCache, - getJSDocPublicTag: () => getJSDocPublicTag, - getJSDocPublicTagNoCache: () => getJSDocPublicTagNoCache, - getJSDocReadonlyTag: () => getJSDocReadonlyTag, - getJSDocReadonlyTagNoCache: () => getJSDocReadonlyTagNoCache, - getJSDocReturnTag: () => getJSDocReturnTag, - getJSDocReturnType: () => getJSDocReturnType, - getJSDocRoot: () => getJSDocRoot, - getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType, - getJSDocSatisfiesTag: () => getJSDocSatisfiesTag, - getJSDocTags: () => getJSDocTags, - getJSDocTagsNoCache: () => getJSDocTagsNoCache, - getJSDocTemplateTag: () => getJSDocTemplateTag, - getJSDocThisTag: () => getJSDocThisTag, - getJSDocType: () => getJSDocType, - getJSDocTypeAliasName: () => getJSDocTypeAliasName, - getJSDocTypeAssertionType: () => getJSDocTypeAssertionType, - getJSDocTypeParameterDeclarations: () => getJSDocTypeParameterDeclarations, - getJSDocTypeParameterTags: () => getJSDocTypeParameterTags, - getJSDocTypeParameterTagsNoCache: () => getJSDocTypeParameterTagsNoCache, - getJSDocTypeTag: () => getJSDocTypeTag, - getJSXImplicitImportBase: () => getJSXImplicitImportBase, - getJSXRuntimeImport: () => getJSXRuntimeImport, - getJSXTransformEnabled: () => getJSXTransformEnabled, - getKeyForCompilerOptions: () => getKeyForCompilerOptions, - getLanguageVariant: () => getLanguageVariant, - getLastChild: () => getLastChild, - getLeadingCommentRanges: () => getLeadingCommentRanges, - getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode, - getLeftmostAccessExpression: () => getLeftmostAccessExpression, - getLeftmostExpression: () => getLeftmostExpression, - getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition, - getLineInfo: () => getLineInfo, - getLineOfLocalPosition: () => getLineOfLocalPosition, - getLineOfLocalPositionFromLineMap: () => getLineOfLocalPositionFromLineMap, - getLineStartPositionForPosition: () => getLineStartPositionForPosition, - getLineStarts: () => getLineStarts, - getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => getLinesBetweenPositionAndNextNonWhitespaceCharacter, - getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter, - getLinesBetweenPositions: () => getLinesBetweenPositions, - getLinesBetweenRangeEndAndRangeStart: () => getLinesBetweenRangeEndAndRangeStart, - getLinesBetweenRangeEndPositions: () => getLinesBetweenRangeEndPositions, - getLiteralText: () => getLiteralText, - getLocalNameForExternalImport: () => getLocalNameForExternalImport, - getLocalSymbolForExportDefault: () => getLocalSymbolForExportDefault, - getLocaleSpecificMessage: () => getLocaleSpecificMessage, - getLocaleTimeString: () => getLocaleTimeString, - getMappedContextSpan: () => getMappedContextSpan, - getMappedDocumentSpan: () => getMappedDocumentSpan, - getMappedLocation: () => getMappedLocation, - getMatchedFileSpec: () => getMatchedFileSpec, - getMatchedIncludeSpec: () => getMatchedIncludeSpec, - getMeaningFromDeclaration: () => getMeaningFromDeclaration, - getMeaningFromLocation: () => getMeaningFromLocation, - getMembersOfDeclaration: () => getMembersOfDeclaration, - getModeForFileReference: () => getModeForFileReference, - getModeForResolutionAtIndex: () => getModeForResolutionAtIndex, - getModeForUsageLocation: () => getModeForUsageLocation, - getModifiedTime: () => getModifiedTime, - getModifiers: () => getModifiers, - getModuleInstanceState: () => getModuleInstanceState, - getModuleNameStringLiteralAt: () => getModuleNameStringLiteralAt, - getModuleSpecifierEndingPreference: () => getModuleSpecifierEndingPreference, - getModuleSpecifierResolverHost: () => getModuleSpecifierResolverHost, - getNameForExportedSymbol: () => getNameForExportedSymbol, + // src/typingsInstallerCore/_namespaces/ts.ts + var init_ts6 = __esm({ + "src/typingsInstallerCore/_namespaces/ts.ts"() { + "use strict"; + init_ts2(); + init_ts3(); + init_ts_server2(); + } + }); + + // src/typingsInstallerCore/typingsInstaller.ts + function typingToFileName(cachePath, packageName, installTypingHost, log) { + try { + const result = resolveModuleName(packageName, combinePaths(cachePath, "index.d.ts"), { moduleResolution: 2 /* Node10 */ }, installTypingHost); + return result.resolvedModule && result.resolvedModule.resolvedFileName; + } catch (e) { + if (log.isEnabled()) { + log.writeLine(`Failed to resolve ${packageName} in folder '${cachePath}': ${e.message}`); + } + return void 0; + } + } + function installNpmPackages(npmPath, tsVersion, packageNames, install) { + let hasError = false; + for (let remaining = packageNames.length; remaining > 0; ) { + const result = getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining); + remaining = result.remaining; + hasError = install(result.command) || hasError; + } + return hasError; + } + function getNpmCommandForInstallation(npmPath, tsVersion, packageNames, remaining) { + const sliceStart = packageNames.length - remaining; + let command, toSlice = remaining; + while (true) { + command = `${npmPath} install --ignore-scripts ${(toSlice === packageNames.length ? packageNames : packageNames.slice(sliceStart, sliceStart + toSlice)).join(" ")} --save-dev --user-agent="typesInstaller/${tsVersion}"`; + if (command.length < 8e3) { + break; + } + toSlice = toSlice - Math.floor(toSlice / 2); + } + return { command, remaining: remaining - toSlice }; + } + function typingsName(packageName) { + return `@types/${packageName}@ts${versionMajorMinor}`; + } + var nullLog, TypingsInstaller; + var init_typingsInstaller = __esm({ + "src/typingsInstallerCore/typingsInstaller.ts"() { + "use strict"; + init_ts6(); + init_ts_server2(); + nullLog = { + isEnabled: () => false, + writeLine: noop + }; + TypingsInstaller = class { + constructor(installTypingHost, globalCachePath, safeListPath, typesMapLocation, throttleLimit, log = nullLog) { + this.installTypingHost = installTypingHost; + this.globalCachePath = globalCachePath; + this.safeListPath = safeListPath; + this.typesMapLocation = typesMapLocation; + this.throttleLimit = throttleLimit; + this.log = log; + this.packageNameToTypingLocation = /* @__PURE__ */ new Map(); + this.missingTypingsSet = /* @__PURE__ */ new Set(); + this.knownCachesSet = /* @__PURE__ */ new Set(); + this.projectWatchers = /* @__PURE__ */ new Map(); + /** @internal */ + this.pendingRunRequests = []; + this.installRunCount = 1; + this.inFlightRequestCount = 0; + this.latestDistTag = "latest"; + const isLoggingEnabled = this.log.isEnabled(); + if (isLoggingEnabled) { + this.log.writeLine(`Global cache location '${globalCachePath}', safe file path '${safeListPath}', types map path ${typesMapLocation}`); + } + this.processCacheLocation(this.globalCachePath); + } + closeProject(req) { + this.closeWatchers(req.projectName); + } + closeWatchers(projectName) { + if (this.log.isEnabled()) { + this.log.writeLine(`Closing file watchers for project '${projectName}'`); + } + const watchers = this.projectWatchers.get(projectName); + if (!watchers) { + if (this.log.isEnabled()) { + this.log.writeLine(`No watchers are registered for project '${projectName}'`); + } + return; + } + this.projectWatchers.delete(projectName); + this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files: [] }); + if (this.log.isEnabled()) { + this.log.writeLine(`Closing file watchers for project '${projectName}' - done.`); + } + } + install(req) { + if (this.log.isEnabled()) { + this.log.writeLine(`Got install request${stringifyIndented(req)}`); + } + if (req.cachePath) { + if (this.log.isEnabled()) { + this.log.writeLine(`Request specifies cache path '${req.cachePath}', loading cached information...`); + } + this.processCacheLocation(req.cachePath); + } + if (this.safeList === void 0) { + this.initializeSafeList(); + } + const discoverTypingsResult = ts_JsTyping_exports.discoverTypings( + this.installTypingHost, + this.log.isEnabled() ? (s) => this.log.writeLine(s) : void 0, + req.fileNames, + req.projectRootPath, + this.safeList, + this.packageNameToTypingLocation, + req.typeAcquisition, + req.unresolvedImports, + this.typesRegistry, + req.compilerOptions + ); + this.watchFiles(req.projectName, discoverTypingsResult.filesToWatch); + if (discoverTypingsResult.newTypingNames.length) { + this.installTypings(req, req.cachePath || this.globalCachePath, discoverTypingsResult.cachedTypingPaths, discoverTypingsResult.newTypingNames); + } else { + this.sendResponse(this.createSetTypings(req, discoverTypingsResult.cachedTypingPaths)); + if (this.log.isEnabled()) { + this.log.writeLine(`No new typings were requested as a result of typings discovery`); + } + } + } + initializeSafeList() { + if (this.typesMapLocation) { + const safeListFromMap = ts_JsTyping_exports.loadTypesMap(this.installTypingHost, this.typesMapLocation); + if (safeListFromMap) { + this.log.writeLine(`Loaded safelist from types map file '${this.typesMapLocation}'`); + this.safeList = safeListFromMap; + return; + } + this.log.writeLine(`Failed to load safelist from types map file '${this.typesMapLocation}'`); + } + this.safeList = ts_JsTyping_exports.loadSafeList(this.installTypingHost, this.safeListPath); + } + processCacheLocation(cacheLocation) { + if (this.log.isEnabled()) { + this.log.writeLine(`Processing cache location '${cacheLocation}'`); + } + if (this.knownCachesSet.has(cacheLocation)) { + if (this.log.isEnabled()) { + this.log.writeLine(`Cache location was already processed...`); + } + return; + } + const packageJson = combinePaths(cacheLocation, "package.json"); + const packageLockJson = combinePaths(cacheLocation, "package-lock.json"); + if (this.log.isEnabled()) { + this.log.writeLine(`Trying to find '${packageJson}'...`); + } + if (this.installTypingHost.fileExists(packageJson) && this.installTypingHost.fileExists(packageLockJson)) { + const npmConfig = JSON.parse(this.installTypingHost.readFile(packageJson)); + const npmLock = JSON.parse(this.installTypingHost.readFile(packageLockJson)); + if (this.log.isEnabled()) { + this.log.writeLine(`Loaded content of '${packageJson}':${stringifyIndented(npmConfig)}`); + this.log.writeLine(`Loaded content of '${packageLockJson}':${stringifyIndented(npmLock)}`); + } + if (npmConfig.devDependencies && npmLock.dependencies) { + for (const key in npmConfig.devDependencies) { + if (!hasProperty(npmLock.dependencies, key)) { + continue; + } + const packageName = getBaseFileName(key); + if (!packageName) { + continue; + } + const typingFile = typingToFileName(cacheLocation, packageName, this.installTypingHost, this.log); + if (!typingFile) { + this.missingTypingsSet.add(packageName); + continue; + } + const existingTypingFile = this.packageNameToTypingLocation.get(packageName); + if (existingTypingFile) { + if (existingTypingFile.typingLocation === typingFile) { + continue; + } + if (this.log.isEnabled()) { + this.log.writeLine(`New typing for package ${packageName} from '${typingFile}' conflicts with existing typing file '${existingTypingFile}'`); + } + } + if (this.log.isEnabled()) { + this.log.writeLine(`Adding entry into typings cache: '${packageName}' => '${typingFile}'`); + } + const info = getProperty(npmLock.dependencies, key); + const version2 = info && info.version; + if (!version2) { + continue; + } + const newTyping = { typingLocation: typingFile, version: new Version(version2) }; + this.packageNameToTypingLocation.set(packageName, newTyping); + } + } + } + if (this.log.isEnabled()) { + this.log.writeLine(`Finished processing cache location '${cacheLocation}'`); + } + this.knownCachesSet.add(cacheLocation); + } + filterTypings(typingsToInstall) { + return mapDefined(typingsToInstall, (typing) => { + const typingKey = mangleScopedPackageName(typing); + if (this.missingTypingsSet.has(typingKey)) { + if (this.log.isEnabled()) + this.log.writeLine(`'${typing}':: '${typingKey}' is in missingTypingsSet - skipping...`); + return void 0; + } + const validationResult = ts_JsTyping_exports.validatePackageName(typing); + if (validationResult !== ts_JsTyping_exports.NameValidationResult.Ok) { + this.missingTypingsSet.add(typingKey); + if (this.log.isEnabled()) + this.log.writeLine(ts_JsTyping_exports.renderPackageNameValidationFailure(validationResult, typing)); + return void 0; + } + if (!this.typesRegistry.has(typingKey)) { + if (this.log.isEnabled()) + this.log.writeLine(`'${typing}':: Entry for package '${typingKey}' does not exist in local types registry - skipping...`); + return void 0; + } + if (this.packageNameToTypingLocation.get(typingKey) && ts_JsTyping_exports.isTypingUpToDate(this.packageNameToTypingLocation.get(typingKey), this.typesRegistry.get(typingKey))) { + if (this.log.isEnabled()) + this.log.writeLine(`'${typing}':: '${typingKey}' already has an up-to-date typing - skipping...`); + return void 0; + } + return typingKey; + }); + } + ensurePackageDirectoryExists(directory) { + const npmConfigPath = combinePaths(directory, "package.json"); + if (this.log.isEnabled()) { + this.log.writeLine(`Npm config file: ${npmConfigPath}`); + } + if (!this.installTypingHost.fileExists(npmConfigPath)) { + if (this.log.isEnabled()) { + this.log.writeLine(`Npm config file: '${npmConfigPath}' is missing, creating new one...`); + } + this.ensureDirectoryExists(directory, this.installTypingHost); + this.installTypingHost.writeFile(npmConfigPath, '{ "private": true }'); + } + } + installTypings(req, cachePath, currentlyCachedTypings, typingsToInstall) { + if (this.log.isEnabled()) { + this.log.writeLine(`Installing typings ${JSON.stringify(typingsToInstall)}`); + } + const filteredTypings = this.filterTypings(typingsToInstall); + if (filteredTypings.length === 0) { + if (this.log.isEnabled()) { + this.log.writeLine(`All typings are known to be missing or invalid - no need to install more typings`); + } + this.sendResponse(this.createSetTypings(req, currentlyCachedTypings)); + return; + } + this.ensurePackageDirectoryExists(cachePath); + const requestId = this.installRunCount; + this.installRunCount++; + this.sendResponse({ + kind: EventBeginInstallTypes, + eventId: requestId, + typingsInstallerVersion: version, + projectName: req.projectName + }); + const scopedTypings = filteredTypings.map(typingsName); + this.installTypingsAsync(requestId, scopedTypings, cachePath, (ok) => { + try { + if (!ok) { + if (this.log.isEnabled()) { + this.log.writeLine(`install request failed, marking packages as missing to prevent repeated requests: ${JSON.stringify(filteredTypings)}`); + } + for (const typing of filteredTypings) { + this.missingTypingsSet.add(typing); + } + return; + } + if (this.log.isEnabled()) { + this.log.writeLine(`Installed typings ${JSON.stringify(scopedTypings)}`); + } + const installedTypingFiles = []; + for (const packageName of filteredTypings) { + const typingFile = typingToFileName(cachePath, packageName, this.installTypingHost, this.log); + if (!typingFile) { + this.missingTypingsSet.add(packageName); + continue; + } + const distTags = this.typesRegistry.get(packageName); + const newVersion = new Version(distTags[`ts${versionMajorMinor}`] || distTags[this.latestDistTag]); + const newTyping = { typingLocation: typingFile, version: newVersion }; + this.packageNameToTypingLocation.set(packageName, newTyping); + installedTypingFiles.push(typingFile); + } + if (this.log.isEnabled()) { + this.log.writeLine(`Installed typing files ${JSON.stringify(installedTypingFiles)}`); + } + this.sendResponse(this.createSetTypings(req, currentlyCachedTypings.concat(installedTypingFiles))); + } finally { + const response = { + kind: EventEndInstallTypes, + eventId: requestId, + projectName: req.projectName, + packagesToInstall: scopedTypings, + installSuccess: ok, + typingsInstallerVersion: version + }; + this.sendResponse(response); + } + }); + } + ensureDirectoryExists(directory, host) { + const directoryName = getDirectoryPath(directory); + if (!host.directoryExists(directoryName)) { + this.ensureDirectoryExists(directoryName, host); + } + if (!host.directoryExists(directory)) { + host.createDirectory(directory); + } + } + watchFiles(projectName, files) { + if (!files.length) { + this.closeWatchers(projectName); + return; + } + const existing = this.projectWatchers.get(projectName); + const newSet = new Set(files); + if (!existing || forEachKey(newSet, (s) => !existing.has(s)) || forEachKey(existing, (s) => !newSet.has(s))) { + this.projectWatchers.set(projectName, newSet); + this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files }); + } else { + this.sendResponse({ kind: ActionWatchTypingLocations, projectName, files: void 0 }); + } + } + createSetTypings(request, typings) { + return { + projectName: request.projectName, + typeAcquisition: request.typeAcquisition, + compilerOptions: request.compilerOptions, + typings, + unresolvedImports: request.unresolvedImports, + kind: ActionSet + }; + } + installTypingsAsync(requestId, packageNames, cwd, onRequestCompleted) { + this.pendingRunRequests.unshift({ requestId, packageNames, cwd, onRequestCompleted }); + this.executeWithThrottling(); + } + executeWithThrottling() { + while (this.inFlightRequestCount < this.throttleLimit && this.pendingRunRequests.length) { + this.inFlightRequestCount++; + const request = this.pendingRunRequests.pop(); + this.installWorker(request.requestId, request.packageNames, request.cwd, (ok) => { + this.inFlightRequestCount--; + request.onRequestCompleted(ok); + this.executeWithThrottling(); + }); + } + } + }; + } + }); + + // src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts + var ts_server_typingsInstaller_exports = {}; + __export(ts_server_typingsInstaller_exports, { + TypingsInstaller: () => TypingsInstaller, + getNpmCommandForInstallation: () => getNpmCommandForInstallation, + installNpmPackages: () => installNpmPackages, + typingsName: () => typingsName + }); + var init_ts_server_typingsInstaller = __esm({ + "src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts"() { + "use strict"; + init_typingsInstaller(); + } + }); + + // src/typingsInstallerCore/_namespaces/ts.server.ts + var init_ts_server2 = __esm({ + "src/typingsInstallerCore/_namespaces/ts.server.ts"() { + "use strict"; + init_ts_server(); + init_ts_server_typingsInstaller(); + } + }); + + // src/server/types.ts + var init_types4 = __esm({ + "src/server/types.ts"() { + "use strict"; + } + }); + + // src/server/utilitiesPublic.ts + function createInstallTypingsRequest(project, typeAcquisition, unresolvedImports, cachePath) { + return { + projectName: project.getProjectName(), + fileNames: project.getFileNames( + /*excludeFilesFromExternalLibraries*/ + true, + /*excludeConfigFiles*/ + true + ).concat(project.getExcludedFiles()), + compilerOptions: project.getCompilationSettings(), + typeAcquisition, + unresolvedImports, + projectRootPath: project.getCurrentDirectory(), + cachePath, + kind: "discover" + }; + } + function toNormalizedPath(fileName) { + return normalizePath(fileName); + } + function normalizedPathToPath(normalizedPath, currentDirectory, getCanonicalFileName) { + const f = isRootedDiskPath(normalizedPath) ? normalizedPath : getNormalizedAbsolutePath(normalizedPath, currentDirectory); + return getCanonicalFileName(f); + } + function asNormalizedPath(fileName) { + return fileName; + } + function createNormalizedPathMap() { + const map2 = /* @__PURE__ */ new Map(); + return { + get(path) { + return map2.get(path); + }, + set(path, value) { + map2.set(path, value); + }, + contains(path) { + return map2.has(path); + }, + remove(path) { + map2.delete(path); + } + }; + } + function isInferredProjectName(name) { + return /dev\/null\/inferredProject\d+\*/.test(name); + } + function makeInferredProjectName(counter) { + return `/dev/null/inferredProject${counter}*`; + } + function makeAutoImportProviderProjectName(counter) { + return `/dev/null/autoImportProviderProject${counter}*`; + } + function makeAuxiliaryProjectName(counter) { + return `/dev/null/auxiliaryProject${counter}*`; + } + function createSortedArray2() { + return []; + } + var LogLevel2, emptyArray2, Msg, Errors; + var init_utilitiesPublic3 = __esm({ + "src/server/utilitiesPublic.ts"() { + "use strict"; + init_ts7(); + LogLevel2 = /* @__PURE__ */ ((LogLevel3) => { + LogLevel3[LogLevel3["terse"] = 0] = "terse"; + LogLevel3[LogLevel3["normal"] = 1] = "normal"; + LogLevel3[LogLevel3["requestTime"] = 2] = "requestTime"; + LogLevel3[LogLevel3["verbose"] = 3] = "verbose"; + return LogLevel3; + })(LogLevel2 || {}); + emptyArray2 = createSortedArray2(); + Msg = /* @__PURE__ */ ((Msg2) => { + Msg2["Err"] = "Err"; + Msg2["Info"] = "Info"; + Msg2["Perf"] = "Perf"; + return Msg2; + })(Msg || {}); + ((Errors2) => { + function ThrowNoProject() { + throw new Error("No Project."); + } + Errors2.ThrowNoProject = ThrowNoProject; + function ThrowProjectLanguageServiceDisabled() { + throw new Error("The project's language service is disabled."); + } + Errors2.ThrowProjectLanguageServiceDisabled = ThrowProjectLanguageServiceDisabled; + function ThrowProjectDoesNotContainDocument(fileName, project) { + throw new Error(`Project '${project.getProjectName()}' does not contain document '${fileName}'`); + } + Errors2.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument; + })(Errors || (Errors = {})); + } + }); + + // src/server/utilities.ts + function getBaseConfigFileName(configFilePath) { + const base = getBaseFileName(configFilePath); + return base === "tsconfig.json" || base === "jsconfig.json" ? base : void 0; + } + function removeSorted(array, remove, compare) { + if (!array || array.length === 0) { + return; + } + if (array[0] === remove) { + array.splice(0, 1); + return; + } + const removeIndex = binarySearch(array, remove, identity, compare); + if (removeIndex >= 0) { + array.splice(removeIndex, 1); + } + } + var ThrottledOperations, GcTimer; + var init_utilities5 = __esm({ + "src/server/utilities.ts"() { + "use strict"; + init_ts7(); + init_ts_server3(); + ThrottledOperations = class _ThrottledOperations { + constructor(host, logger) { + this.host = host; + this.pendingTimeouts = /* @__PURE__ */ new Map(); + this.logger = logger.hasLevel(3 /* verbose */) ? logger : void 0; + } + /** + * Wait `number` milliseconds and then invoke `cb`. If, while waiting, schedule + * is called again with the same `operationId`, cancel this operation in favor + * of the new one. (Note that the amount of time the canceled operation had been + * waiting does not affect the amount of time that the new operation waits.) + */ + schedule(operationId, delay, cb) { + const pendingTimeout = this.pendingTimeouts.get(operationId); + if (pendingTimeout) { + this.host.clearTimeout(pendingTimeout); + } + this.pendingTimeouts.set(operationId, this.host.setTimeout(_ThrottledOperations.run, delay, operationId, this, cb)); + if (this.logger) { + this.logger.info(`Scheduled: ${operationId}${pendingTimeout ? ", Cancelled earlier one" : ""}`); + } + } + cancel(operationId) { + const pendingTimeout = this.pendingTimeouts.get(operationId); + if (!pendingTimeout) + return false; + this.host.clearTimeout(pendingTimeout); + return this.pendingTimeouts.delete(operationId); + } + static run(operationId, self, cb) { + var _a, _b; + (_a = perfLogger) == null ? void 0 : _a.logStartScheduledOperation(operationId); + self.pendingTimeouts.delete(operationId); + if (self.logger) { + self.logger.info(`Running: ${operationId}`); + } + cb(); + (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation(); + } + }; + GcTimer = class _GcTimer { + constructor(host, delay, logger) { + this.host = host; + this.delay = delay; + this.logger = logger; + } + scheduleCollect() { + if (!this.host.gc || this.timerId !== void 0) { + return; + } + this.timerId = this.host.setTimeout(_GcTimer.run, this.delay, this); + } + static run(self) { + var _a, _b; + self.timerId = void 0; + (_a = perfLogger) == null ? void 0 : _a.logStartScheduledOperation("GC collect"); + const log = self.logger.hasLevel(2 /* requestTime */); + const before = log && self.host.getMemoryUsage(); + self.host.gc(); + if (log) { + const after = self.host.getMemoryUsage(); + self.logger.perftrc(`GC::before ${before}, after ${after}`); + } + (_b = perfLogger) == null ? void 0 : _b.logStopScheduledOperation(); + } + }; + } + }); + + // src/server/protocol.ts + var CommandTypes, OrganizeImportsMode2, WatchFileKind2, WatchDirectoryKind2, PollingWatchKind2, CompletionTriggerKind2, IndentStyle2, SemicolonPreference2, JsxEmit2, ModuleKind2, ModuleResolutionKind2, NewLineKind2, ScriptTarget10, ClassificationType2; + var init_protocol = __esm({ + "src/server/protocol.ts"() { + "use strict"; + CommandTypes = /* @__PURE__ */ ((CommandTypes2) => { + CommandTypes2["JsxClosingTag"] = "jsxClosingTag"; + CommandTypes2["LinkedEditingRange"] = "linkedEditingRange"; + CommandTypes2["Brace"] = "brace"; + CommandTypes2["BraceFull"] = "brace-full"; + CommandTypes2["BraceCompletion"] = "braceCompletion"; + CommandTypes2["GetSpanOfEnclosingComment"] = "getSpanOfEnclosingComment"; + CommandTypes2["Change"] = "change"; + CommandTypes2["Close"] = "close"; + CommandTypes2["Completions"] = "completions"; + CommandTypes2["CompletionInfo"] = "completionInfo"; + CommandTypes2["CompletionsFull"] = "completions-full"; + CommandTypes2["CompletionDetails"] = "completionEntryDetails"; + CommandTypes2["CompletionDetailsFull"] = "completionEntryDetails-full"; + CommandTypes2["CompileOnSaveAffectedFileList"] = "compileOnSaveAffectedFileList"; + CommandTypes2["CompileOnSaveEmitFile"] = "compileOnSaveEmitFile"; + CommandTypes2["Configure"] = "configure"; + CommandTypes2["Definition"] = "definition"; + CommandTypes2["DefinitionFull"] = "definition-full"; + CommandTypes2["DefinitionAndBoundSpan"] = "definitionAndBoundSpan"; + CommandTypes2["DefinitionAndBoundSpanFull"] = "definitionAndBoundSpan-full"; + CommandTypes2["Implementation"] = "implementation"; + CommandTypes2["ImplementationFull"] = "implementation-full"; + CommandTypes2["EmitOutput"] = "emit-output"; + CommandTypes2["Exit"] = "exit"; + CommandTypes2["FileReferences"] = "fileReferences"; + CommandTypes2["FileReferencesFull"] = "fileReferences-full"; + CommandTypes2["Format"] = "format"; + CommandTypes2["Formatonkey"] = "formatonkey"; + CommandTypes2["FormatFull"] = "format-full"; + CommandTypes2["FormatonkeyFull"] = "formatonkey-full"; + CommandTypes2["FormatRangeFull"] = "formatRange-full"; + CommandTypes2["Geterr"] = "geterr"; + CommandTypes2["GeterrForProject"] = "geterrForProject"; + CommandTypes2["SemanticDiagnosticsSync"] = "semanticDiagnosticsSync"; + CommandTypes2["SyntacticDiagnosticsSync"] = "syntacticDiagnosticsSync"; + CommandTypes2["SuggestionDiagnosticsSync"] = "suggestionDiagnosticsSync"; + CommandTypes2["NavBar"] = "navbar"; + CommandTypes2["NavBarFull"] = "navbar-full"; + CommandTypes2["Navto"] = "navto"; + CommandTypes2["NavtoFull"] = "navto-full"; + CommandTypes2["NavTree"] = "navtree"; + CommandTypes2["NavTreeFull"] = "navtree-full"; + CommandTypes2["DocumentHighlights"] = "documentHighlights"; + CommandTypes2["DocumentHighlightsFull"] = "documentHighlights-full"; + CommandTypes2["Open"] = "open"; + CommandTypes2["Quickinfo"] = "quickinfo"; + CommandTypes2["QuickinfoFull"] = "quickinfo-full"; + CommandTypes2["References"] = "references"; + CommandTypes2["ReferencesFull"] = "references-full"; + CommandTypes2["Reload"] = "reload"; + CommandTypes2["Rename"] = "rename"; + CommandTypes2["RenameInfoFull"] = "rename-full"; + CommandTypes2["RenameLocationsFull"] = "renameLocations-full"; + CommandTypes2["Saveto"] = "saveto"; + CommandTypes2["SignatureHelp"] = "signatureHelp"; + CommandTypes2["SignatureHelpFull"] = "signatureHelp-full"; + CommandTypes2["FindSourceDefinition"] = "findSourceDefinition"; + CommandTypes2["Status"] = "status"; + CommandTypes2["TypeDefinition"] = "typeDefinition"; + CommandTypes2["ProjectInfo"] = "projectInfo"; + CommandTypes2["ReloadProjects"] = "reloadProjects"; + CommandTypes2["Unknown"] = "unknown"; + CommandTypes2["OpenExternalProject"] = "openExternalProject"; + CommandTypes2["OpenExternalProjects"] = "openExternalProjects"; + CommandTypes2["CloseExternalProject"] = "closeExternalProject"; + CommandTypes2["SynchronizeProjectList"] = "synchronizeProjectList"; + CommandTypes2["ApplyChangedToOpenFiles"] = "applyChangedToOpenFiles"; + CommandTypes2["UpdateOpen"] = "updateOpen"; + CommandTypes2["EncodedSyntacticClassificationsFull"] = "encodedSyntacticClassifications-full"; + CommandTypes2["EncodedSemanticClassificationsFull"] = "encodedSemanticClassifications-full"; + CommandTypes2["Cleanup"] = "cleanup"; + CommandTypes2["GetOutliningSpans"] = "getOutliningSpans"; + CommandTypes2["GetOutliningSpansFull"] = "outliningSpans"; + CommandTypes2["TodoComments"] = "todoComments"; + CommandTypes2["Indentation"] = "indentation"; + CommandTypes2["DocCommentTemplate"] = "docCommentTemplate"; + CommandTypes2["CompilerOptionsDiagnosticsFull"] = "compilerOptionsDiagnostics-full"; + CommandTypes2["NameOrDottedNameSpan"] = "nameOrDottedNameSpan"; + CommandTypes2["BreakpointStatement"] = "breakpointStatement"; + CommandTypes2["CompilerOptionsForInferredProjects"] = "compilerOptionsForInferredProjects"; + CommandTypes2["GetCodeFixes"] = "getCodeFixes"; + CommandTypes2["GetCodeFixesFull"] = "getCodeFixes-full"; + CommandTypes2["GetCombinedCodeFix"] = "getCombinedCodeFix"; + CommandTypes2["GetCombinedCodeFixFull"] = "getCombinedCodeFix-full"; + CommandTypes2["ApplyCodeActionCommand"] = "applyCodeActionCommand"; + CommandTypes2["GetSupportedCodeFixes"] = "getSupportedCodeFixes"; + CommandTypes2["GetApplicableRefactors"] = "getApplicableRefactors"; + CommandTypes2["GetEditsForRefactor"] = "getEditsForRefactor"; + CommandTypes2["GetMoveToRefactoringFileSuggestions"] = "getMoveToRefactoringFileSuggestions"; + CommandTypes2["GetEditsForRefactorFull"] = "getEditsForRefactor-full"; + CommandTypes2["OrganizeImports"] = "organizeImports"; + CommandTypes2["OrganizeImportsFull"] = "organizeImports-full"; + CommandTypes2["GetEditsForFileRename"] = "getEditsForFileRename"; + CommandTypes2["GetEditsForFileRenameFull"] = "getEditsForFileRename-full"; + CommandTypes2["ConfigurePlugin"] = "configurePlugin"; + CommandTypes2["SelectionRange"] = "selectionRange"; + CommandTypes2["SelectionRangeFull"] = "selectionRange-full"; + CommandTypes2["ToggleLineComment"] = "toggleLineComment"; + CommandTypes2["ToggleLineCommentFull"] = "toggleLineComment-full"; + CommandTypes2["ToggleMultilineComment"] = "toggleMultilineComment"; + CommandTypes2["ToggleMultilineCommentFull"] = "toggleMultilineComment-full"; + CommandTypes2["CommentSelection"] = "commentSelection"; + CommandTypes2["CommentSelectionFull"] = "commentSelection-full"; + CommandTypes2["UncommentSelection"] = "uncommentSelection"; + CommandTypes2["UncommentSelectionFull"] = "uncommentSelection-full"; + CommandTypes2["PrepareCallHierarchy"] = "prepareCallHierarchy"; + CommandTypes2["ProvideCallHierarchyIncomingCalls"] = "provideCallHierarchyIncomingCalls"; + CommandTypes2["ProvideCallHierarchyOutgoingCalls"] = "provideCallHierarchyOutgoingCalls"; + CommandTypes2["ProvideInlayHints"] = "provideInlayHints"; + CommandTypes2["WatchChange"] = "watchChange"; + return CommandTypes2; + })(CommandTypes || {}); + OrganizeImportsMode2 = /* @__PURE__ */ ((OrganizeImportsMode3) => { + OrganizeImportsMode3["All"] = "All"; + OrganizeImportsMode3["SortAndCombine"] = "SortAndCombine"; + OrganizeImportsMode3["RemoveUnused"] = "RemoveUnused"; + return OrganizeImportsMode3; + })(OrganizeImportsMode2 || {}); + WatchFileKind2 = /* @__PURE__ */ ((WatchFileKind3) => { + WatchFileKind3["FixedPollingInterval"] = "FixedPollingInterval"; + WatchFileKind3["PriorityPollingInterval"] = "PriorityPollingInterval"; + WatchFileKind3["DynamicPriorityPolling"] = "DynamicPriorityPolling"; + WatchFileKind3["FixedChunkSizePolling"] = "FixedChunkSizePolling"; + WatchFileKind3["UseFsEvents"] = "UseFsEvents"; + WatchFileKind3["UseFsEventsOnParentDirectory"] = "UseFsEventsOnParentDirectory"; + return WatchFileKind3; + })(WatchFileKind2 || {}); + WatchDirectoryKind2 = /* @__PURE__ */ ((WatchDirectoryKind3) => { + WatchDirectoryKind3["UseFsEvents"] = "UseFsEvents"; + WatchDirectoryKind3["FixedPollingInterval"] = "FixedPollingInterval"; + WatchDirectoryKind3["DynamicPriorityPolling"] = "DynamicPriorityPolling"; + WatchDirectoryKind3["FixedChunkSizePolling"] = "FixedChunkSizePolling"; + return WatchDirectoryKind3; + })(WatchDirectoryKind2 || {}); + PollingWatchKind2 = /* @__PURE__ */ ((PollingWatchKind3) => { + PollingWatchKind3["FixedInterval"] = "FixedInterval"; + PollingWatchKind3["PriorityInterval"] = "PriorityInterval"; + PollingWatchKind3["DynamicPriority"] = "DynamicPriority"; + PollingWatchKind3["FixedChunkSize"] = "FixedChunkSize"; + return PollingWatchKind3; + })(PollingWatchKind2 || {}); + CompletionTriggerKind2 = /* @__PURE__ */ ((CompletionTriggerKind4) => { + CompletionTriggerKind4[CompletionTriggerKind4["Invoked"] = 1] = "Invoked"; + CompletionTriggerKind4[CompletionTriggerKind4["TriggerCharacter"] = 2] = "TriggerCharacter"; + CompletionTriggerKind4[CompletionTriggerKind4["TriggerForIncompleteCompletions"] = 3] = "TriggerForIncompleteCompletions"; + return CompletionTriggerKind4; + })(CompletionTriggerKind2 || {}); + IndentStyle2 = /* @__PURE__ */ ((IndentStyle3) => { + IndentStyle3["None"] = "None"; + IndentStyle3["Block"] = "Block"; + IndentStyle3["Smart"] = "Smart"; + return IndentStyle3; + })(IndentStyle2 || {}); + SemicolonPreference2 = /* @__PURE__ */ ((SemicolonPreference3) => { + SemicolonPreference3["Ignore"] = "ignore"; + SemicolonPreference3["Insert"] = "insert"; + SemicolonPreference3["Remove"] = "remove"; + return SemicolonPreference3; + })(SemicolonPreference2 || {}); + JsxEmit2 = /* @__PURE__ */ ((JsxEmit3) => { + JsxEmit3["None"] = "None"; + JsxEmit3["Preserve"] = "Preserve"; + JsxEmit3["ReactNative"] = "ReactNative"; + JsxEmit3["React"] = "React"; + return JsxEmit3; + })(JsxEmit2 || {}); + ModuleKind2 = /* @__PURE__ */ ((ModuleKind3) => { + ModuleKind3["None"] = "None"; + ModuleKind3["CommonJS"] = "CommonJS"; + ModuleKind3["AMD"] = "AMD"; + ModuleKind3["UMD"] = "UMD"; + ModuleKind3["System"] = "System"; + ModuleKind3["ES6"] = "ES6"; + ModuleKind3["ES2015"] = "ES2015"; + ModuleKind3["ESNext"] = "ESNext"; + return ModuleKind3; + })(ModuleKind2 || {}); + ModuleResolutionKind2 = /* @__PURE__ */ ((ModuleResolutionKind3) => { + ModuleResolutionKind3["Classic"] = "Classic"; + ModuleResolutionKind3["Node"] = "Node"; + return ModuleResolutionKind3; + })(ModuleResolutionKind2 || {}); + NewLineKind2 = /* @__PURE__ */ ((NewLineKind3) => { + NewLineKind3["Crlf"] = "Crlf"; + NewLineKind3["Lf"] = "Lf"; + return NewLineKind3; + })(NewLineKind2 || {}); + ScriptTarget10 = /* @__PURE__ */ ((ScriptTarget11) => { + ScriptTarget11["ES3"] = "ES3"; + ScriptTarget11["ES5"] = "ES5"; + ScriptTarget11["ES6"] = "ES6"; + ScriptTarget11["ES2015"] = "ES2015"; + ScriptTarget11["ES2016"] = "ES2016"; + ScriptTarget11["ES2017"] = "ES2017"; + ScriptTarget11["ES2018"] = "ES2018"; + ScriptTarget11["ES2019"] = "ES2019"; + ScriptTarget11["ES2020"] = "ES2020"; + ScriptTarget11["ES2021"] = "ES2021"; + ScriptTarget11["ES2022"] = "ES2022"; + ScriptTarget11["ESNext"] = "ESNext"; + return ScriptTarget11; + })(ScriptTarget10 || {}); + ClassificationType2 = /* @__PURE__ */ ((ClassificationType3) => { + ClassificationType3[ClassificationType3["comment"] = 1] = "comment"; + ClassificationType3[ClassificationType3["identifier"] = 2] = "identifier"; + ClassificationType3[ClassificationType3["keyword"] = 3] = "keyword"; + ClassificationType3[ClassificationType3["numericLiteral"] = 4] = "numericLiteral"; + ClassificationType3[ClassificationType3["operator"] = 5] = "operator"; + ClassificationType3[ClassificationType3["stringLiteral"] = 6] = "stringLiteral"; + ClassificationType3[ClassificationType3["regularExpressionLiteral"] = 7] = "regularExpressionLiteral"; + ClassificationType3[ClassificationType3["whiteSpace"] = 8] = "whiteSpace"; + ClassificationType3[ClassificationType3["text"] = 9] = "text"; + ClassificationType3[ClassificationType3["punctuation"] = 10] = "punctuation"; + ClassificationType3[ClassificationType3["className"] = 11] = "className"; + ClassificationType3[ClassificationType3["enumName"] = 12] = "enumName"; + ClassificationType3[ClassificationType3["interfaceName"] = 13] = "interfaceName"; + ClassificationType3[ClassificationType3["moduleName"] = 14] = "moduleName"; + ClassificationType3[ClassificationType3["typeParameterName"] = 15] = "typeParameterName"; + ClassificationType3[ClassificationType3["typeAliasName"] = 16] = "typeAliasName"; + ClassificationType3[ClassificationType3["parameterName"] = 17] = "parameterName"; + ClassificationType3[ClassificationType3["docCommentTagName"] = 18] = "docCommentTagName"; + ClassificationType3[ClassificationType3["jsxOpenTagName"] = 19] = "jsxOpenTagName"; + ClassificationType3[ClassificationType3["jsxCloseTagName"] = 20] = "jsxCloseTagName"; + ClassificationType3[ClassificationType3["jsxSelfClosingTagName"] = 21] = "jsxSelfClosingTagName"; + ClassificationType3[ClassificationType3["jsxAttribute"] = 22] = "jsxAttribute"; + ClassificationType3[ClassificationType3["jsxText"] = 23] = "jsxText"; + ClassificationType3[ClassificationType3["jsxAttributeStringLiteralValue"] = 24] = "jsxAttributeStringLiteralValue"; + ClassificationType3[ClassificationType3["bigintLiteral"] = 25] = "bigintLiteral"; + return ClassificationType3; + })(ClassificationType2 || {}); + } + }); + + // src/server/_namespaces/ts.server.protocol.ts + var ts_server_protocol_exports = {}; + __export(ts_server_protocol_exports, { + ClassificationType: () => ClassificationType2, + CommandTypes: () => CommandTypes, + CompletionTriggerKind: () => CompletionTriggerKind2, + IndentStyle: () => IndentStyle2, + JsxEmit: () => JsxEmit2, + ModuleKind: () => ModuleKind2, + ModuleResolutionKind: () => ModuleResolutionKind2, + NewLineKind: () => NewLineKind2, + OrganizeImportsMode: () => OrganizeImportsMode2, + PollingWatchKind: () => PollingWatchKind2, + ScriptTarget: () => ScriptTarget10, + SemicolonPreference: () => SemicolonPreference2, + WatchDirectoryKind: () => WatchDirectoryKind2, + WatchFileKind: () => WatchFileKind2 + }); + var init_ts_server_protocol = __esm({ + "src/server/_namespaces/ts.server.protocol.ts"() { + "use strict"; + init_protocol(); + } + }); + + // src/server/scriptInfo.ts + function isDynamicFileName(fileName) { + return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator); + } + function ensurePrimaryProjectKind(project) { + if (!project || isBackgroundProject(project)) { + return Errors.ThrowNoProject(); + } + return project; + } + function failIfInvalidPosition(position) { + Debug.assert(typeof position === "number", `Expected position ${position} to be a number.`); + Debug.assert(position >= 0, `Expected position to be non-negative.`); + } + function failIfInvalidLocation(location) { + Debug.assert(typeof location.line === "number", `Expected line ${location.line} to be a number.`); + Debug.assert(typeof location.offset === "number", `Expected offset ${location.offset} to be a number.`); + Debug.assert(location.line > 0, `Expected line to be non-${location.line === 0 ? "zero" : "negative"}`); + Debug.assert(location.offset > 0, `Expected offset to be non-${location.offset === 0 ? "zero" : "negative"}`); + } + var TextStorage, ScriptInfo; + var init_scriptInfo = __esm({ + "src/server/scriptInfo.ts"() { + "use strict"; + init_ts7(); + init_ts_server3(); + TextStorage = class { + constructor(host, info, initialVersion) { + this.host = host; + this.info = info; + /** + * True if the text is for the file thats open in the editor + */ + this.isOpen = false; + /** + * True if the text present is the text from the file on the disk + */ + this.ownFileText = false; + /** + * True when reloading contents of file from the disk is pending + */ + this.pendingReloadFromDisk = false; + this.version = initialVersion || 0; + } + getVersion() { + return this.svc ? `SVC-${this.version}-${this.svc.getSnapshotVersion()}` : `Text-${this.version}`; + } + hasScriptVersionCache_TestOnly() { + return this.svc !== void 0; + } + resetSourceMapInfo() { + this.info.sourceFileLike = void 0; + this.info.closeSourceMapFileWatcher(); + this.info.sourceMapFilePath = void 0; + this.info.declarationInfoPath = void 0; + this.info.sourceInfos = void 0; + this.info.documentPositionMapper = void 0; + } + /** Public for testing */ + useText(newText) { + this.svc = void 0; + this.text = newText; + this.textSnapshot = void 0; + this.lineMap = void 0; + this.fileSize = void 0; + this.resetSourceMapInfo(); + this.version++; + } + edit(start, end, newText) { + this.switchToScriptVersionCache().edit(start, end - start, newText); + this.ownFileText = false; + this.text = void 0; + this.textSnapshot = void 0; + this.lineMap = void 0; + this.fileSize = void 0; + this.resetSourceMapInfo(); + } + /** + * Set the contents as newText + * returns true if text changed + */ + reload(newText) { + Debug.assert(newText !== void 0); + this.pendingReloadFromDisk = false; + if (!this.text && this.svc) { + this.text = getSnapshotText(this.svc.getSnapshot()); + } + if (this.text !== newText) { + this.useText(newText); + this.ownFileText = false; + return true; + } + return false; + } + /** + * Reads the contents from tempFile(if supplied) or own file and sets it as contents + * returns true if text changed + */ + reloadWithFileText(tempFileName) { + const { text: newText, fileSize } = tempFileName || !this.info.isDynamicOrHasMixedContent() ? this.getFileTextAndSize(tempFileName) : { text: "", fileSize: void 0 }; + const reloaded = this.reload(newText); + this.fileSize = fileSize; + this.ownFileText = !tempFileName || tempFileName === this.info.fileName; + return reloaded; + } + /** + * Schedule reload from the disk if its not already scheduled and its not own text + * returns true when scheduling reload + */ + scheduleReloadIfNeeded() { + return !this.pendingReloadFromDisk && !this.ownFileText ? this.pendingReloadFromDisk = true : false; + } + delayReloadFromFileIntoText() { + this.pendingReloadFromDisk = true; + } + /** + * For telemetry purposes, we would like to be able to report the size of the file. + * However, we do not want telemetry to require extra file I/O so we report a size + * that may be stale (e.g. may not reflect change made on disk since the last reload). + * NB: Will read from disk if the file contents have never been loaded because + * telemetry falsely indicating size 0 would be counter-productive. + */ + getTelemetryFileSize() { + return !!this.fileSize ? this.fileSize : !!this.text ? this.text.length : !!this.svc ? this.svc.getSnapshot().getLength() : this.getSnapshot().getLength(); + } + getSnapshot() { + var _a; + return ((_a = this.tryUseScriptVersionCache()) == null ? void 0 : _a.getSnapshot()) || (this.textSnapshot ?? (this.textSnapshot = ScriptSnapshot.fromString(Debug.checkDefined(this.text)))); + } + getAbsolutePositionAndLineText(oneBasedLine) { + const svc = this.tryUseScriptVersionCache(); + if (svc) + return svc.getAbsolutePositionAndLineText(oneBasedLine); + const lineMap = this.getLineMap(); + return oneBasedLine <= lineMap.length ? { + absolutePosition: lineMap[oneBasedLine - 1], + lineText: this.text.substring(lineMap[oneBasedLine - 1], lineMap[oneBasedLine]) + } : { + absolutePosition: this.text.length, + lineText: void 0 + }; + } + /** + * @param line 0 based index + */ + lineToTextSpan(line) { + const svc = this.tryUseScriptVersionCache(); + if (svc) + return svc.lineToTextSpan(line); + const lineMap = this.getLineMap(); + const start = lineMap[line]; + const end = line + 1 < lineMap.length ? lineMap[line + 1] : this.text.length; + return createTextSpanFromBounds(start, end); + } + /** + * @param line 1 based index + * @param offset 1 based index + */ + lineOffsetToPosition(line, offset, allowEdits) { + const svc = this.tryUseScriptVersionCache(); + return svc ? svc.lineOffsetToPosition(line, offset) : computePositionOfLineAndCharacter(this.getLineMap(), line - 1, offset - 1, this.text, allowEdits); + } + positionToLineOffset(position) { + const svc = this.tryUseScriptVersionCache(); + if (svc) + return svc.positionToLineOffset(position); + const { line, character } = computeLineAndCharacterOfPosition(this.getLineMap(), position); + return { line: line + 1, offset: character + 1 }; + } + getFileTextAndSize(tempFileName) { + let text; + const fileName = tempFileName || this.info.fileName; + const getText = () => text === void 0 ? text = this.host.readFile(fileName) || "" : text; + if (!hasTSFileExtension(this.info.fileName)) { + const fileSize = this.host.getFileSize ? this.host.getFileSize(fileName) : getText().length; + if (fileSize > maxFileSize) { + Debug.assert(!!this.info.containingProjects.length); + const service = this.info.containingProjects[0].projectService; + service.logger.info(`Skipped loading contents of large file ${fileName} for info ${this.info.fileName}: fileSize: ${fileSize}`); + this.info.containingProjects[0].projectService.sendLargeFileReferencedEvent(fileName, fileSize); + return { text: "", fileSize }; + } + } + return { text: getText() }; + } + /** @internal */ + switchToScriptVersionCache() { + if (!this.svc || this.pendingReloadFromDisk) { + this.svc = ScriptVersionCache.fromString(this.getOrLoadText()); + this.textSnapshot = void 0; + this.version++; + } + return this.svc; + } + tryUseScriptVersionCache() { + if (!this.svc || this.pendingReloadFromDisk) { + this.getOrLoadText(); + } + if (this.isOpen) { + if (!this.svc && !this.textSnapshot) { + this.svc = ScriptVersionCache.fromString(Debug.checkDefined(this.text)); + this.textSnapshot = void 0; + } + return this.svc; + } + return this.svc; + } + getOrLoadText() { + if (this.text === void 0 || this.pendingReloadFromDisk) { + Debug.assert(!this.svc || this.pendingReloadFromDisk, "ScriptVersionCache should not be set when reloading from disk"); + this.reloadWithFileText(); + } + return this.text; + } + getLineMap() { + Debug.assert(!this.svc, "ScriptVersionCache should not be set"); + return this.lineMap || (this.lineMap = computeLineStarts(Debug.checkDefined(this.text))); + } + getLineInfo() { + const svc = this.tryUseScriptVersionCache(); + if (svc) { + return { + getLineCount: () => svc.getLineCount(), + getLineText: (line) => svc.getAbsolutePositionAndLineText(line + 1).lineText + }; + } + const lineMap = this.getLineMap(); + return getLineInfo(this.text, lineMap); + } + }; + ScriptInfo = class { + constructor(host, fileName, scriptKind, hasMixedContent, path, initialVersion) { + this.host = host; + this.fileName = fileName; + this.scriptKind = scriptKind; + this.hasMixedContent = hasMixedContent; + this.path = path; + /** + * All projects that include this file + */ + this.containingProjects = []; + this.isDynamic = isDynamicFileName(fileName); + this.textStorage = new TextStorage(host, this, initialVersion); + if (hasMixedContent || this.isDynamic) { + this.realpath = this.path; + } + this.scriptKind = scriptKind ? scriptKind : getScriptKindFromFileName(fileName); + } + /** @internal */ + isDynamicOrHasMixedContent() { + return this.hasMixedContent || this.isDynamic; + } + isScriptOpen() { + return this.textStorage.isOpen; + } + open(newText) { + this.textStorage.isOpen = true; + if (newText !== void 0 && this.textStorage.reload(newText)) { + this.markContainingProjectsAsDirty(); + } + } + close(fileExists = true) { + this.textStorage.isOpen = false; + if (fileExists && this.textStorage.scheduleReloadIfNeeded()) { + this.markContainingProjectsAsDirty(); + } + } + getSnapshot() { + return this.textStorage.getSnapshot(); + } + ensureRealPath() { + if (this.realpath === void 0) { + this.realpath = this.path; + if (this.host.realpath) { + Debug.assert(!!this.containingProjects.length); + const project = this.containingProjects[0]; + const realpath = this.host.realpath(this.path); + if (realpath) { + this.realpath = project.toPath(realpath); + if (this.realpath !== this.path) { + project.projectService.realpathToScriptInfos.add(this.realpath, this); + } + } + } + } + } + /** @internal */ + getRealpathIfDifferent() { + return this.realpath && this.realpath !== this.path ? this.realpath : void 0; + } + /** + * @internal + * Does not compute realpath; uses precomputed result. Use `ensureRealPath` + * first if a definite result is needed. + */ + isSymlink() { + return this.realpath && this.realpath !== this.path; + } + getFormatCodeSettings() { + return this.formatSettings; + } + getPreferences() { + return this.preferences; + } + attachToProject(project) { + const isNew = !this.isAttached(project); + if (isNew) { + this.containingProjects.push(project); + if (!project.getCompilerOptions().preserveSymlinks) { + this.ensureRealPath(); + } + project.onFileAddedOrRemoved(this.isSymlink()); + } + return isNew; + } + isAttached(project) { + switch (this.containingProjects.length) { + case 0: + return false; + case 1: + return this.containingProjects[0] === project; + case 2: + return this.containingProjects[0] === project || this.containingProjects[1] === project; + default: + return contains(this.containingProjects, project); + } + } + detachFromProject(project) { + switch (this.containingProjects.length) { + case 0: + return; + case 1: + if (this.containingProjects[0] === project) { + project.onFileAddedOrRemoved(this.isSymlink()); + this.containingProjects.pop(); + } + break; + case 2: + if (this.containingProjects[0] === project) { + project.onFileAddedOrRemoved(this.isSymlink()); + this.containingProjects[0] = this.containingProjects.pop(); + } else if (this.containingProjects[1] === project) { + project.onFileAddedOrRemoved(this.isSymlink()); + this.containingProjects.pop(); + } + break; + default: + if (unorderedRemoveItem(this.containingProjects, project)) { + project.onFileAddedOrRemoved(this.isSymlink()); + } + break; + } + } + detachAllProjects() { + for (const p of this.containingProjects) { + if (isConfiguredProject(p)) { + p.getCachedDirectoryStructureHost().addOrDeleteFile(this.fileName, this.path, 2 /* Deleted */); + } + const existingRoot = p.getRootFilesMap().get(this.path); + p.removeFile( + this, + /*fileExists*/ + false, + /*detachFromProject*/ + false + ); + p.onFileAddedOrRemoved(this.isSymlink()); + if (existingRoot && !isInferredProject(p)) { + p.addMissingFileRoot(existingRoot.fileName); + } + } + clear(this.containingProjects); + } + getDefaultProject() { + switch (this.containingProjects.length) { + case 0: + return Errors.ThrowNoProject(); + case 1: + return ensurePrimaryProjectKind(this.containingProjects[0]); + default: + let firstExternalProject; + let firstConfiguredProject; + let firstInferredProject; + let firstNonSourceOfProjectReferenceRedirect; + let defaultConfiguredProject; + for (let index = 0; index < this.containingProjects.length; index++) { + const project = this.containingProjects[index]; + if (isConfiguredProject(project)) { + if (!project.isSourceOfProjectReferenceRedirect(this.fileName)) { + if (defaultConfiguredProject === void 0 && index !== this.containingProjects.length - 1) { + defaultConfiguredProject = project.projectService.findDefaultConfiguredProject(this) || false; + } + if (defaultConfiguredProject === project) + return project; + if (!firstNonSourceOfProjectReferenceRedirect) + firstNonSourceOfProjectReferenceRedirect = project; + } + if (!firstConfiguredProject) + firstConfiguredProject = project; + } else if (!firstExternalProject && isExternalProject(project)) { + firstExternalProject = project; + } else if (!firstInferredProject && isInferredProject(project)) { + firstInferredProject = project; + } + } + return ensurePrimaryProjectKind( + defaultConfiguredProject || firstNonSourceOfProjectReferenceRedirect || firstConfiguredProject || firstExternalProject || firstInferredProject + ); + } + } + registerFileUpdate() { + for (const p of this.containingProjects) { + p.registerFileUpdate(this.path); + } + } + setOptions(formatSettings, preferences) { + if (formatSettings) { + if (!this.formatSettings) { + this.formatSettings = getDefaultFormatCodeSettings(this.host.newLine); + assign(this.formatSettings, formatSettings); + } else { + this.formatSettings = { ...this.formatSettings, ...formatSettings }; + } + } + if (preferences) { + if (!this.preferences) { + this.preferences = emptyOptions; + } + this.preferences = { ...this.preferences, ...preferences }; + } + } + getLatestVersion() { + this.textStorage.getSnapshot(); + return this.textStorage.getVersion(); + } + saveTo(fileName) { + this.host.writeFile(fileName, getSnapshotText(this.textStorage.getSnapshot())); + } + /** @internal */ + delayReloadNonMixedContentFile() { + Debug.assert(!this.isDynamicOrHasMixedContent()); + this.textStorage.delayReloadFromFileIntoText(); + this.markContainingProjectsAsDirty(); + } + reloadFromFile(tempFileName) { + if (this.textStorage.reloadWithFileText(tempFileName)) { + this.markContainingProjectsAsDirty(); + return true; + } + return false; + } + editContent(start, end, newText) { + this.textStorage.edit(start, end, newText); + this.markContainingProjectsAsDirty(); + } + markContainingProjectsAsDirty() { + for (const p of this.containingProjects) { + p.markFileAsDirty(this.path); + } + } + isOrphan() { + return !forEach(this.containingProjects, (p) => !p.isOrphan()); + } + /** @internal */ + isContainedByBackgroundProject() { + return some( + this.containingProjects, + isBackgroundProject + ); + } + /** + * @param line 1 based index + */ + lineToTextSpan(line) { + return this.textStorage.lineToTextSpan(line); + } + // eslint-disable-line @typescript-eslint/unified-signatures + lineOffsetToPosition(line, offset, allowEdits) { + return this.textStorage.lineOffsetToPosition(line, offset, allowEdits); + } + positionToLineOffset(position) { + failIfInvalidPosition(position); + const location = this.textStorage.positionToLineOffset(position); + failIfInvalidLocation(location); + return location; + } + isJavaScript() { + return this.scriptKind === 1 /* JS */ || this.scriptKind === 2 /* JSX */; + } + /** @internal */ + closeSourceMapFileWatcher() { + if (this.sourceMapFilePath && !isString(this.sourceMapFilePath)) { + closeFileWatcherOf(this.sourceMapFilePath); + this.sourceMapFilePath = void 0; + } + } + }; + } + }); + + // src/server/typingsCache.ts + function setIsEqualTo(arr1, arr2) { + if (arr1 === arr2) { + return true; + } + if ((arr1 || emptyArray2).length === 0 && (arr2 || emptyArray2).length === 0) { + return true; + } + const set = /* @__PURE__ */ new Map(); + let unique = 0; + for (const v of arr1) { + if (set.get(v) !== true) { + set.set(v, true); + unique++; + } + } + for (const v of arr2) { + const isSet = set.get(v); + if (isSet === void 0) { + return false; + } + if (isSet === true) { + set.set(v, false); + unique--; + } + } + return unique === 0; + } + function typeAcquisitionChanged(opt1, opt2) { + return opt1.enable !== opt2.enable || !setIsEqualTo(opt1.include, opt2.include) || !setIsEqualTo(opt1.exclude, opt2.exclude); + } + function compilerOptionsChanged(opt1, opt2) { + return getAllowJSCompilerOption(opt1) !== getAllowJSCompilerOption(opt2); + } + function unresolvedImportsChanged(imports1, imports2) { + if (imports1 === imports2) { + return false; + } + return !arrayIsEqualTo(imports1, imports2); + } + var nullTypingsInstaller, TypingsCache; + var init_typingsCache = __esm({ + "src/server/typingsCache.ts"() { + "use strict"; + init_ts7(); + init_ts_server3(); + nullTypingsInstaller = { + isKnownTypesPackageName: returnFalse, + // Should never be called because we never provide a types registry. + installPackage: notImplemented, + enqueueInstallTypingsRequest: noop, + attach: noop, + onProjectClosed: noop, + globalTypingsCacheLocation: void 0 + // TODO: GH#18217 + }; + TypingsCache = class { + constructor(installer) { + this.installer = installer; + this.perProjectCache = /* @__PURE__ */ new Map(); + } + isKnownTypesPackageName(name) { + return this.installer.isKnownTypesPackageName(name); + } + installPackage(options) { + return this.installer.installPackage(options); + } + enqueueInstallTypingsForProject(project, unresolvedImports, forceRefresh) { + const typeAcquisition = project.getTypeAcquisition(); + if (!typeAcquisition || !typeAcquisition.enable) { + return; + } + const entry = this.perProjectCache.get(project.getProjectName()); + if (forceRefresh || !entry || typeAcquisitionChanged(typeAcquisition, entry.typeAcquisition) || compilerOptionsChanged(project.getCompilationSettings(), entry.compilerOptions) || unresolvedImportsChanged(unresolvedImports, entry.unresolvedImports)) { + this.perProjectCache.set(project.getProjectName(), { + compilerOptions: project.getCompilationSettings(), + typeAcquisition, + typings: entry ? entry.typings : emptyArray2, + unresolvedImports, + poisoned: true + }); + this.installer.enqueueInstallTypingsRequest(project, typeAcquisition, unresolvedImports); + } + } + updateTypingsForProject(projectName, compilerOptions, typeAcquisition, unresolvedImports, newTypings) { + const typings = sort(newTypings); + this.perProjectCache.set(projectName, { + compilerOptions, + typeAcquisition, + typings, + unresolvedImports, + poisoned: false + }); + return !typeAcquisition || !typeAcquisition.enable ? emptyArray2 : typings; + } + onProjectClosed(project) { + this.perProjectCache.delete(project.getProjectName()); + this.installer.onProjectClosed(project); + } + }; + } + }); + + // src/server/project.ts + function countEachFileTypes(infos, includeSizes = false) { + const result = { + js: 0, + jsSize: 0, + jsx: 0, + jsxSize: 0, + ts: 0, + tsSize: 0, + tsx: 0, + tsxSize: 0, + dts: 0, + dtsSize: 0, + deferred: 0, + deferredSize: 0 + }; + for (const info of infos) { + const fileSize = includeSizes ? info.textStorage.getTelemetryFileSize() : 0; + switch (info.scriptKind) { + case 1 /* JS */: + result.js += 1; + result.jsSize += fileSize; + break; + case 2 /* JSX */: + result.jsx += 1; + result.jsxSize += fileSize; + break; + case 3 /* TS */: + if (isDeclarationFileName(info.fileName)) { + result.dts += 1; + result.dtsSize += fileSize; + } else { + result.ts += 1; + result.tsSize += fileSize; + } + break; + case 4 /* TSX */: + result.tsx += 1; + result.tsxSize += fileSize; + break; + case 7 /* Deferred */: + result.deferred += 1; + result.deferredSize += fileSize; + break; + } + } + return result; + } + function hasOneOrMoreJsAndNoTsFiles(project) { + const counts2 = countEachFileTypes(project.getScriptInfos()); + return counts2.js > 0 && counts2.ts === 0 && counts2.tsx === 0; + } + function allRootFilesAreJsOrDts(project) { + const counts2 = countEachFileTypes(project.getRootScriptInfos()); + return counts2.ts === 0 && counts2.tsx === 0; + } + function allFilesAreJsOrDts(project) { + const counts2 = countEachFileTypes(project.getScriptInfos()); + return counts2.ts === 0 && counts2.tsx === 0; + } + function hasNoTypeScriptSource(fileNames) { + return !fileNames.some((fileName) => fileExtensionIs(fileName, ".ts" /* Ts */) && !isDeclarationFileName(fileName) || fileExtensionIs(fileName, ".tsx" /* Tsx */)); + } + function isGeneratedFileWatcher(watch) { + return watch.generatedFilePath !== void 0; + } + function getUnresolvedImports(program, cachedUnresolvedImportsPerFile) { + var _a, _b; + const sourceFiles = program.getSourceFiles(); + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getUnresolvedImports", { count: sourceFiles.length }); + const ambientModules = program.getTypeChecker().getAmbientModules().map((mod) => stripQuotes(mod.getName())); + const result = sortAndDeduplicate(flatMap(sourceFiles, (sourceFile) => extractUnresolvedImportsFromSourceFile( + program, + sourceFile, + ambientModules, + cachedUnresolvedImportsPerFile + ))); + (_b = tracing) == null ? void 0 : _b.pop(); + return result; + } + function extractUnresolvedImportsFromSourceFile(program, file, ambientModules, cachedUnresolvedImportsPerFile) { + return getOrUpdate(cachedUnresolvedImportsPerFile, file.path, () => { + let unresolvedImports; + program.forEachResolvedModule(({ resolvedModule }, name) => { + if ((!resolvedModule || !resolutionExtensionIsTSOrJson(resolvedModule.extension)) && !isExternalModuleNameRelative(name) && !ambientModules.some((m) => m === name)) { + unresolvedImports = append(unresolvedImports, parsePackageName(name).packageName); + } + }, file); + return unresolvedImports || emptyArray2; + }); + } + function isInferredProject(project) { + return project.projectKind === 0 /* Inferred */; + } + function isConfiguredProject(project) { + return project.projectKind === 1 /* Configured */; + } + function isExternalProject(project) { + return project.projectKind === 2 /* External */; + } + function isBackgroundProject(project) { + return project.projectKind === 3 /* AutoImportProvider */ || project.projectKind === 4 /* Auxiliary */; + } + var ProjectKind, Project3, InferredProject2, AuxiliaryProject, _AutoImportProviderProject, AutoImportProviderProject, ConfiguredProject2, ExternalProject2; + var init_project = __esm({ + "src/server/project.ts"() { + "use strict"; + init_ts7(); + init_ts7(); + init_ts_server3(); + ProjectKind = /* @__PURE__ */ ((ProjectKind2) => { + ProjectKind2[ProjectKind2["Inferred"] = 0] = "Inferred"; + ProjectKind2[ProjectKind2["Configured"] = 1] = "Configured"; + ProjectKind2[ProjectKind2["External"] = 2] = "External"; + ProjectKind2[ProjectKind2["AutoImportProvider"] = 3] = "AutoImportProvider"; + ProjectKind2[ProjectKind2["Auxiliary"] = 4] = "Auxiliary"; + return ProjectKind2; + })(ProjectKind || {}); + Project3 = class _Project { + /** @internal */ + constructor(projectName, projectKind, projectService, documentRegistry, hasExplicitListOfFiles, lastFileExceededProgramSize, compilerOptions, compileOnSaveEnabled, watchOptions, directoryStructureHost, currentDirectory) { + this.projectKind = projectKind; + this.projectService = projectService; + this.documentRegistry = documentRegistry; + this.compilerOptions = compilerOptions; + this.compileOnSaveEnabled = compileOnSaveEnabled; + this.watchOptions = watchOptions; + this.rootFiles = []; + this.rootFilesMap = /* @__PURE__ */ new Map(); + /** @internal */ + this.plugins = []; + /** + * This is map from files to unresolved imports in it + * Maop does not contain entries for files that do not have unresolved imports + * This helps in containing the set of files to invalidate + * + * @internal + */ + this.cachedUnresolvedImportsPerFile = /* @__PURE__ */ new Map(); + /** @internal */ + this.hasAddedorRemovedFiles = false; + /** @internal */ + this.hasAddedOrRemovedSymlinks = false; + /** + * Last version that was reported. + */ + this.lastReportedVersion = 0; + /** + * Current project's program version. (incremented everytime new program is created that is not complete reuse from the old one) + * This property is changed in 'updateGraph' based on the set of files in program + */ + this.projectProgramVersion = 0; + /** + * Current version of the project state. It is changed when: + * - new root file was added/removed + * - edit happen in some file that is currently included in the project. + * This property is different from projectStructureVersion since in most cases edits don't affect set of files in the project + */ + this.projectStateVersion = 0; + this.isInitialLoadPending = returnFalse; + /** @internal */ + this.dirty = false; + /** @internal */ + this.typingFiles = emptyArray2; + /** @internal */ + this.moduleSpecifierCache = createModuleSpecifierCache(this); + /** @internal */ + this.createHash = maybeBind(this.projectService.host, this.projectService.host.createHash); + /** @internal */ + this.globalCacheResolutionModuleName = ts_JsTyping_exports.nonRelativeModuleNameForTypingCache; + this.projectName = projectName; + this.directoryStructureHost = directoryStructureHost; + this.currentDirectory = this.projectService.getNormalizedAbsolutePath(currentDirectory); + this.getCanonicalFileName = this.projectService.toCanonicalFileName; + this.jsDocParsingMode = this.projectService.jsDocParsingMode; + this.cancellationToken = new ThrottledCancellationToken(this.projectService.cancellationToken, this.projectService.throttleWaitMilliseconds); + if (!this.compilerOptions) { + this.compilerOptions = getDefaultCompilerOptions2(); + this.compilerOptions.allowNonTsExtensions = true; + this.compilerOptions.allowJs = true; + } else if (hasExplicitListOfFiles || getAllowJSCompilerOption(this.compilerOptions) || this.projectService.hasDeferredExtension()) { + this.compilerOptions.allowNonTsExtensions = true; + } + switch (projectService.serverMode) { + case 0 /* Semantic */: + this.languageServiceEnabled = true; + break; + case 1 /* PartialSemantic */: + this.languageServiceEnabled = true; + this.compilerOptions.noResolve = true; + this.compilerOptions.types = []; + break; + case 2 /* Syntactic */: + this.languageServiceEnabled = false; + this.compilerOptions.noResolve = true; + this.compilerOptions.types = []; + break; + default: + Debug.assertNever(projectService.serverMode); + } + this.setInternalCompilerOptionsForEmittingJsFiles(); + const host = this.projectService.host; + if (this.projectService.logger.loggingEnabled()) { + this.trace = (s) => this.writeLog(s); + } else if (host.trace) { + this.trace = (s) => host.trace(s); + } + this.realpath = maybeBind(host, host.realpath); + this.resolutionCache = createResolutionCache( + this, + this.currentDirectory, + /*logChangesWhenResolvingModule*/ + true + ); + this.languageService = createLanguageService(this, this.documentRegistry, this.projectService.serverMode); + if (lastFileExceededProgramSize) { + this.disableLanguageService(lastFileExceededProgramSize); + } + this.markAsDirty(); + if (!isBackgroundProject(this)) { + this.projectService.pendingEnsureProjectForOpenFiles = true; + } + this.projectService.onProjectCreation(this); + } + /** @internal */ + getResolvedProjectReferenceToRedirect(_fileName) { + return void 0; + } + isNonTsProject() { + updateProjectIfDirty(this); + return allFilesAreJsOrDts(this); + } + isJsOnlyProject() { + updateProjectIfDirty(this); + return hasOneOrMoreJsAndNoTsFiles(this); + } + static resolveModule(moduleName, initialDir, host, log) { + return _Project.importServicePluginSync({ name: moduleName }, [initialDir], host, log).resolvedModule; + } + /** @internal */ + static importServicePluginSync(pluginConfigEntry, searchPaths, host, log) { + Debug.assertIsDefined(host.require); + let errorLogs; + let resolvedModule; + for (const initialDir of searchPaths) { + const resolvedPath = normalizeSlashes(host.resolvePath(combinePaths(initialDir, "node_modules"))); + log(`Loading ${pluginConfigEntry.name} from ${initialDir} (resolved to ${resolvedPath})`); + const result = host.require(resolvedPath, pluginConfigEntry.name); + if (!result.error) { + resolvedModule = result.module; + break; + } + const err = result.error.stack || result.error.message || JSON.stringify(result.error); + (errorLogs ?? (errorLogs = [])).push(`Failed to load module '${pluginConfigEntry.name}' from ${resolvedPath}: ${err}`); + } + return { pluginConfigEntry, resolvedModule, errorLogs }; + } + /** @internal */ + static async importServicePluginAsync(pluginConfigEntry, searchPaths, host, log) { + Debug.assertIsDefined(host.importPlugin); + let errorLogs; + let resolvedModule; + for (const initialDir of searchPaths) { + const resolvedPath = combinePaths(initialDir, "node_modules"); + log(`Dynamically importing ${pluginConfigEntry.name} from ${initialDir} (resolved to ${resolvedPath})`); + let result; + try { + result = await host.importPlugin(resolvedPath, pluginConfigEntry.name); + } catch (e) { + result = { module: void 0, error: e }; + } + if (!result.error) { + resolvedModule = result.module; + break; + } + const err = result.error.stack || result.error.message || JSON.stringify(result.error); + (errorLogs ?? (errorLogs = [])).push(`Failed to dynamically import module '${pluginConfigEntry.name}' from ${resolvedPath}: ${err}`); + } + return { pluginConfigEntry, resolvedModule, errorLogs }; + } + isKnownTypesPackageName(name) { + return this.typingsCache.isKnownTypesPackageName(name); + } + installPackage(options) { + return this.typingsCache.installPackage({ ...options, projectName: this.projectName, projectRootPath: this.toPath(this.currentDirectory) }); + } + /** @internal */ + getGlobalTypingsCacheLocation() { + return this.getGlobalCache(); + } + get typingsCache() { + return this.projectService.typingsCache; + } + /** @internal */ + getSymlinkCache() { + if (!this.symlinks) { + this.symlinks = createSymlinkCache(this.getCurrentDirectory(), this.getCanonicalFileName); + } + if (this.program && !this.symlinks.hasProcessedResolutions()) { + this.symlinks.setSymlinksFromResolutions( + this.program.forEachResolvedModule, + this.program.forEachResolvedTypeReferenceDirective, + this.program.getAutomaticTypeDirectiveResolutions() + ); + } + return this.symlinks; + } + // Method of LanguageServiceHost + getCompilationSettings() { + return this.compilerOptions; + } + // Method to support public API + getCompilerOptions() { + return this.getCompilationSettings(); + } + getNewLine() { + return this.projectService.host.newLine; + } + getProjectVersion() { + return this.projectStateVersion.toString(); + } + getProjectReferences() { + return void 0; + } + getScriptFileNames() { + if (!this.rootFiles) { + return emptyArray; + } + let result; + this.rootFilesMap.forEach((value) => { + if (this.languageServiceEnabled || value.info && value.info.isScriptOpen()) { + (result || (result = [])).push(value.fileName); + } + }); + return addRange(result, this.typingFiles) || emptyArray; + } + getOrCreateScriptInfoAndAttachToProject(fileName) { + const scriptInfo = this.projectService.getOrCreateScriptInfoNotOpenedByClient(fileName, this.currentDirectory, this.directoryStructureHost); + if (scriptInfo) { + const existingValue = this.rootFilesMap.get(scriptInfo.path); + if (existingValue && existingValue.info !== scriptInfo) { + this.rootFiles.push(scriptInfo); + existingValue.info = scriptInfo; + } + scriptInfo.attachToProject(this); + } + return scriptInfo; + } + getScriptKind(fileName) { + const info = this.projectService.getScriptInfoForPath(this.toPath(fileName)); + return info && info.scriptKind; + } + getScriptVersion(filename) { + const info = this.projectService.getOrCreateScriptInfoNotOpenedByClient(filename, this.currentDirectory, this.directoryStructureHost); + return info && info.getLatestVersion(); + } + getScriptSnapshot(filename) { + const scriptInfo = this.getOrCreateScriptInfoAndAttachToProject(filename); + if (scriptInfo) { + return scriptInfo.getSnapshot(); + } + } + getCancellationToken() { + return this.cancellationToken; + } + getCurrentDirectory() { + return this.currentDirectory; + } + getDefaultLibFileName() { + const nodeModuleBinDir = getDirectoryPath(normalizePath(this.projectService.getExecutingFilePath())); + return combinePaths(nodeModuleBinDir, getDefaultLibFileName(this.compilerOptions)); + } + useCaseSensitiveFileNames() { + return this.projectService.host.useCaseSensitiveFileNames; + } + readDirectory(path, extensions, exclude, include, depth) { + return this.directoryStructureHost.readDirectory(path, extensions, exclude, include, depth); + } + readFile(fileName) { + return this.projectService.host.readFile(fileName); + } + writeFile(fileName, content) { + return this.projectService.host.writeFile(fileName, content); + } + fileExists(file) { + const path = this.toPath(file); + return !this.isWatchedMissingFile(path) && this.directoryStructureHost.fileExists(file); + } + /** @internal */ + resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { + return this.resolutionCache.resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames); + } + /** @internal */ + getModuleResolutionCache() { + return this.resolutionCache.getModuleResolutionCache(); + } + /** @internal */ + resolveTypeReferenceDirectiveReferences(typeDirectiveReferences, containingFile, redirectedReference, options, containingSourceFile, reusedNames) { + return this.resolutionCache.resolveTypeReferenceDirectiveReferences( + typeDirectiveReferences, + containingFile, + redirectedReference, + options, + containingSourceFile, + reusedNames + ); + } + /** @internal */ + resolveLibrary(libraryName, resolveFrom, options, libFileName) { + return this.resolutionCache.resolveLibrary(libraryName, resolveFrom, options, libFileName); + } + directoryExists(path) { + return this.directoryStructureHost.directoryExists(path); + } + getDirectories(path) { + return this.directoryStructureHost.getDirectories(path); + } + /** @internal */ + getCachedDirectoryStructureHost() { + return void 0; + } + /** @internal */ + toPath(fileName) { + return toPath(fileName, this.currentDirectory, this.projectService.toCanonicalFileName); + } + /** @internal */ + watchDirectoryOfFailedLookupLocation(directory, cb, flags) { + return this.projectService.watchFactory.watchDirectory( + directory, + cb, + flags, + this.projectService.getWatchOptions(this), + WatchType.FailedLookupLocations, + this + ); + } + /** @internal */ + watchAffectingFileLocation(file, cb) { + return this.projectService.watchFactory.watchFile( + file, + cb, + 2e3 /* High */, + this.projectService.getWatchOptions(this), + WatchType.AffectingFileLocation, + this + ); + } + /** @internal */ + clearInvalidateResolutionOfFailedLookupTimer() { + return this.projectService.throttledOperations.cancel(`${this.getProjectName()}FailedLookupInvalidation`); + } + /** @internal */ + scheduleInvalidateResolutionsOfFailedLookupLocations() { + this.projectService.throttledOperations.schedule( + `${this.getProjectName()}FailedLookupInvalidation`, + /*delay*/ + 1e3, + () => { + if (this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) { + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + } + ); + } + /** @internal */ + invalidateResolutionsOfFailedLookupLocations() { + if (this.clearInvalidateResolutionOfFailedLookupTimer() && this.resolutionCache.invalidateResolutionsOfFailedLookupLocations()) { + this.markAsDirty(); + this.projectService.delayEnsureProjectForOpenFiles(); + } + } + /** @internal */ + onInvalidatedResolution() { + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + /** @internal */ + watchTypeRootsDirectory(directory, cb, flags) { + return this.projectService.watchFactory.watchDirectory( + directory, + cb, + flags, + this.projectService.getWatchOptions(this), + WatchType.TypeRoots, + this + ); + } + /** @internal */ + hasChangedAutomaticTypeDirectiveNames() { + return this.resolutionCache.hasChangedAutomaticTypeDirectiveNames(); + } + /** @internal */ + onChangedAutomaticTypeDirectiveNames() { + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + /** @internal */ + getGlobalCache() { + return this.getTypeAcquisition().enable ? this.projectService.typingsInstaller.globalTypingsCacheLocation : void 0; + } + /** @internal */ + fileIsOpen(filePath) { + return this.projectService.openFiles.has(filePath); + } + /** @internal */ + writeLog(s) { + this.projectService.logger.info(s); + } + log(s) { + this.writeLog(s); + } + error(s) { + this.projectService.logger.msg(s, "Err" /* Err */); + } + setInternalCompilerOptionsForEmittingJsFiles() { + if (this.projectKind === 0 /* Inferred */ || this.projectKind === 2 /* External */) { + this.compilerOptions.noEmitForJsFiles = true; + } + } + /** + * Get the errors that dont have any file name associated + */ + getGlobalProjectErrors() { + return filter(this.projectErrors, (diagnostic) => !diagnostic.file) || emptyArray2; + } + /** + * Get all the project errors + */ + getAllProjectErrors() { + return this.projectErrors || emptyArray2; + } + setProjectErrors(projectErrors) { + this.projectErrors = projectErrors; + } + getLanguageService(ensureSynchronized = true) { + if (ensureSynchronized) { + updateProjectIfDirty(this); + } + return this.languageService; + } + /** @internal */ + getSourceMapper() { + return this.getLanguageService().getSourceMapper(); + } + /** @internal */ + clearSourceMapperCache() { + this.languageService.clearSourceMapperCache(); + } + /** @internal */ + getDocumentPositionMapper(generatedFileName, sourceFileName) { + return this.projectService.getDocumentPositionMapper(this, generatedFileName, sourceFileName); + } + /** @internal */ + getSourceFileLike(fileName) { + return this.projectService.getSourceFileLike(fileName, this); + } + /** @internal */ + shouldEmitFile(scriptInfo) { + return scriptInfo && !scriptInfo.isDynamicOrHasMixedContent() && !this.program.isSourceOfProjectReferenceRedirect(scriptInfo.path); + } + getCompileOnSaveAffectedFileList(scriptInfo) { + if (!this.languageServiceEnabled) { + return []; + } + updateProjectIfDirty(this); + this.builderState = BuilderState.create( + this.program, + this.builderState, + /*disableUseFileVersionAsSignature*/ + true + ); + return mapDefined( + BuilderState.getFilesAffectedBy( + this.builderState, + this.program, + scriptInfo.path, + this.cancellationToken, + this.projectService.host + ), + (sourceFile) => this.shouldEmitFile(this.projectService.getScriptInfoForPath(sourceFile.path)) ? sourceFile.fileName : void 0 + ); + } + /** + * Returns true if emit was conducted + */ + emitFile(scriptInfo, writeFile2) { + if (!this.languageServiceEnabled || !this.shouldEmitFile(scriptInfo)) { + return { emitSkipped: true, diagnostics: emptyArray2 }; + } + const { emitSkipped, diagnostics, outputFiles } = this.getLanguageService().getEmitOutput(scriptInfo.fileName); + if (!emitSkipped) { + for (const outputFile of outputFiles) { + const outputFileAbsoluteFileName = getNormalizedAbsolutePath(outputFile.name, this.currentDirectory); + writeFile2(outputFileAbsoluteFileName, outputFile.text, outputFile.writeByteOrderMark); + } + if (this.builderState && getEmitDeclarations(this.compilerOptions)) { + const dtsFiles = outputFiles.filter((f) => isDeclarationFileName(f.name)); + if (dtsFiles.length === 1) { + const sourceFile = this.program.getSourceFile(scriptInfo.fileName); + const signature = this.projectService.host.createHash ? this.projectService.host.createHash(dtsFiles[0].text) : generateDjb2Hash(dtsFiles[0].text); + BuilderState.updateSignatureOfFile(this.builderState, signature, sourceFile.resolvedPath); + } + } + } + return { emitSkipped, diagnostics }; + } + enableLanguageService() { + if (this.languageServiceEnabled || this.projectService.serverMode === 2 /* Syntactic */) { + return; + } + this.languageServiceEnabled = true; + this.lastFileExceededProgramSize = void 0; + this.projectService.onUpdateLanguageServiceStateForProject( + this, + /*languageServiceEnabled*/ + true + ); + } + /** @internal */ + cleanupProgram() { + if (this.program) { + for (const f of this.program.getSourceFiles()) { + this.detachScriptInfoIfNotRoot(f.fileName); + } + this.program.forEachResolvedProjectReference((ref) => this.detachScriptInfoFromProject(ref.sourceFile.fileName)); + this.program = void 0; + } + } + disableLanguageService(lastFileExceededProgramSize) { + if (!this.languageServiceEnabled) { + return; + } + Debug.assert(this.projectService.serverMode !== 2 /* Syntactic */); + this.languageService.cleanupSemanticCache(); + this.languageServiceEnabled = false; + this.cleanupProgram(); + this.lastFileExceededProgramSize = lastFileExceededProgramSize; + this.builderState = void 0; + if (this.autoImportProviderHost) { + this.autoImportProviderHost.close(); + } + this.autoImportProviderHost = void 0; + this.resolutionCache.closeTypeRootsWatch(); + this.clearGeneratedFileWatch(); + this.projectService.verifyDocumentRegistry(); + this.projectService.onUpdateLanguageServiceStateForProject( + this, + /*languageServiceEnabled*/ + false + ); + } + getProjectName() { + return this.projectName; + } + removeLocalTypingsFromTypeAcquisition(newTypeAcquisition) { + if (!newTypeAcquisition || !newTypeAcquisition.include) { + return newTypeAcquisition; + } + return { ...newTypeAcquisition, include: this.removeExistingTypings(newTypeAcquisition.include) }; + } + getExternalFiles(updateLevel) { + return sort(flatMap(this.plugins, (plugin) => { + if (typeof plugin.module.getExternalFiles !== "function") + return; + try { + return plugin.module.getExternalFiles(this, updateLevel || 0 /* Update */); + } catch (e) { + this.projectService.logger.info(`A plugin threw an exception in getExternalFiles: ${e}`); + if (e.stack) { + this.projectService.logger.info(e.stack); + } + } + })); + } + getSourceFile(path) { + if (!this.program) { + return void 0; + } + return this.program.getSourceFileByPath(path); + } + /** @internal */ + getSourceFileOrConfigFile(path) { + const options = this.program.getCompilerOptions(); + return path === options.configFilePath ? options.configFile : this.getSourceFile(path); + } + close() { + this.projectService.typingsCache.onProjectClosed(this); + this.closeWatchingTypingLocations(); + this.cleanupProgram(); + forEach(this.externalFiles, (externalFile) => this.detachScriptInfoIfNotRoot(externalFile)); + for (const root of this.rootFiles) { + root.detachFromProject(this); + } + this.projectService.pendingEnsureProjectForOpenFiles = true; + this.rootFiles = void 0; + this.rootFilesMap = void 0; + this.externalFiles = void 0; + this.program = void 0; + this.builderState = void 0; + this.resolutionCache.clear(); + this.resolutionCache = void 0; + this.cachedUnresolvedImportsPerFile = void 0; + this.moduleSpecifierCache = void 0; + this.directoryStructureHost = void 0; + this.exportMapCache = void 0; + this.projectErrors = void 0; + this.plugins.length = 0; + if (this.missingFilesMap) { + clearMap(this.missingFilesMap, closeFileWatcher); + this.missingFilesMap = void 0; + } + this.clearGeneratedFileWatch(); + this.clearInvalidateResolutionOfFailedLookupTimer(); + if (this.autoImportProviderHost) { + this.autoImportProviderHost.close(); + } + this.autoImportProviderHost = void 0; + if (this.noDtsResolutionProject) { + this.noDtsResolutionProject.close(); + } + this.noDtsResolutionProject = void 0; + this.languageService.dispose(); + this.languageService = void 0; + } + detachScriptInfoIfNotRoot(uncheckedFilename) { + const info = this.projectService.getScriptInfo(uncheckedFilename); + if (info && !this.isRoot(info)) { + info.detachFromProject(this); + } + } + isClosed() { + return this.rootFiles === void 0; + } + hasRoots() { + return this.rootFiles && this.rootFiles.length > 0; + } + /** @internal */ + isOrphan() { + return false; + } + getRootFiles() { + return this.rootFiles && this.rootFiles.map((info) => info.fileName); + } + /** @internal */ + getRootFilesMap() { + return this.rootFilesMap; + } + getRootScriptInfos() { + return this.rootFiles; + } + getScriptInfos() { + if (!this.languageServiceEnabled) { + return this.rootFiles; + } + return map(this.program.getSourceFiles(), (sourceFile) => { + const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.resolvedPath); + Debug.assert(!!scriptInfo, "getScriptInfo", () => `scriptInfo for a file '${sourceFile.fileName}' Path: '${sourceFile.path}' / '${sourceFile.resolvedPath}' is missing.`); + return scriptInfo; + }); + } + getExcludedFiles() { + return emptyArray2; + } + getFileNames(excludeFilesFromExternalLibraries, excludeConfigFiles) { + if (!this.program) { + return []; + } + if (!this.languageServiceEnabled) { + let rootFiles = this.getRootFiles(); + if (this.compilerOptions) { + const defaultLibrary = getDefaultLibFilePath(this.compilerOptions); + if (defaultLibrary) { + (rootFiles || (rootFiles = [])).push(asNormalizedPath(defaultLibrary)); + } + } + return rootFiles; + } + const result = []; + for (const f of this.program.getSourceFiles()) { + if (excludeFilesFromExternalLibraries && this.program.isSourceFileFromExternalLibrary(f)) { + continue; + } + result.push(asNormalizedPath(f.fileName)); + } + if (!excludeConfigFiles) { + const configFile = this.program.getCompilerOptions().configFile; + if (configFile) { + result.push(asNormalizedPath(configFile.fileName)); + if (configFile.extendedSourceFiles) { + for (const f of configFile.extendedSourceFiles) { + result.push(asNormalizedPath(f)); + } + } + } + } + return result; + } + /** @internal */ + getFileNamesWithRedirectInfo(includeProjectReferenceRedirectInfo) { + return this.getFileNames().map((fileName) => ({ + fileName, + isSourceOfProjectReferenceRedirect: includeProjectReferenceRedirectInfo && this.isSourceOfProjectReferenceRedirect(fileName) + })); + } + hasConfigFile(configFilePath) { + if (this.program && this.languageServiceEnabled) { + const configFile = this.program.getCompilerOptions().configFile; + if (configFile) { + if (configFilePath === asNormalizedPath(configFile.fileName)) { + return true; + } + if (configFile.extendedSourceFiles) { + for (const f of configFile.extendedSourceFiles) { + if (configFilePath === asNormalizedPath(f)) { + return true; + } + } + } + } + } + return false; + } + containsScriptInfo(info) { + if (this.isRoot(info)) + return true; + if (!this.program) + return false; + const file = this.program.getSourceFileByPath(info.path); + return !!file && file.resolvedPath === info.path; + } + containsFile(filename, requireOpen) { + const info = this.projectService.getScriptInfoForNormalizedPath(filename); + if (info && (info.isScriptOpen() || !requireOpen)) { + return this.containsScriptInfo(info); + } + return false; + } + isRoot(info) { + var _a; + return this.rootFilesMap && ((_a = this.rootFilesMap.get(info.path)) == null ? void 0 : _a.info) === info; + } + // add a root file to project + addRoot(info, fileName) { + Debug.assert(!this.isRoot(info)); + this.rootFiles.push(info); + this.rootFilesMap.set(info.path, { fileName: fileName || info.fileName, info }); + info.attachToProject(this); + this.markAsDirty(); + } + // add a root file that doesnt exist on host + addMissingFileRoot(fileName) { + const path = this.projectService.toPath(fileName); + this.rootFilesMap.set(path, { fileName }); + this.markAsDirty(); + } + removeFile(info, fileExists, detachFromProject) { + if (this.isRoot(info)) { + this.removeRoot(info); + } + if (fileExists) { + this.resolutionCache.removeResolutionsOfFile(info.path); + } else { + this.resolutionCache.invalidateResolutionOfFile(info.path); + } + this.cachedUnresolvedImportsPerFile.delete(info.path); + if (detachFromProject) { + info.detachFromProject(this); + } + this.markAsDirty(); + } + registerFileUpdate(fileName) { + (this.updatedFileNames || (this.updatedFileNames = /* @__PURE__ */ new Set())).add(fileName); + } + /** @internal */ + markFileAsDirty(changedFile) { + this.markAsDirty(); + if (this.exportMapCache && !this.exportMapCache.isEmpty()) { + (this.changedFilesForExportMapCache || (this.changedFilesForExportMapCache = /* @__PURE__ */ new Set())).add(changedFile); + } + } + markAsDirty() { + if (!this.dirty) { + this.projectStateVersion++; + this.dirty = true; + } + } + /** @internal */ + onAutoImportProviderSettingsChanged() { + var _a; + if (this.autoImportProviderHost === false) { + this.autoImportProviderHost = void 0; + } else { + (_a = this.autoImportProviderHost) == null ? void 0 : _a.markAsDirty(); + } + } + /** @internal */ + onPackageJsonChange(packageJsonPath) { + var _a; + if ((_a = this.packageJsonsForAutoImport) == null ? void 0 : _a.has(packageJsonPath)) { + this.moduleSpecifierCache.clear(); + if (this.autoImportProviderHost) { + this.autoImportProviderHost.markAsDirty(); + } + } + } + /** @internal */ + onFileAddedOrRemoved(isSymlink) { + this.hasAddedorRemovedFiles = true; + if (isSymlink) { + this.hasAddedOrRemovedSymlinks = true; + } + } + /** @internal */ + onDiscoveredSymlink() { + this.hasAddedOrRemovedSymlinks = true; + } + /** + * Updates set of files that contribute to this project + * @returns: true if set of files in the project stays the same and false - otherwise. + */ + updateGraph() { + var _a, _b, _c, _d, _e; + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "updateGraph", { name: this.projectName, kind: ProjectKind[this.projectKind] }); + (_b = perfLogger) == null ? void 0 : _b.logStartUpdateGraph(); + this.resolutionCache.startRecordingFilesWithChangedResolutions(); + const hasNewProgram = this.updateGraphWorker(); + const hasAddedorRemovedFiles = this.hasAddedorRemovedFiles; + this.hasAddedorRemovedFiles = false; + this.hasAddedOrRemovedSymlinks = false; + const changedFiles = this.resolutionCache.finishRecordingFilesWithChangedResolutions() || emptyArray2; + for (const file of changedFiles) { + this.cachedUnresolvedImportsPerFile.delete(file); + } + if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) { + if (hasNewProgram || changedFiles.length) { + this.lastCachedUnresolvedImportsList = getUnresolvedImports(this.program, this.cachedUnresolvedImportsPerFile); + } + this.projectService.typingsCache.enqueueInstallTypingsForProject(this, this.lastCachedUnresolvedImportsList, hasAddedorRemovedFiles); + } else { + this.lastCachedUnresolvedImportsList = void 0; + } + const isFirstProgramLoad = this.projectProgramVersion === 0 && hasNewProgram; + if (hasNewProgram) { + this.projectProgramVersion++; + } + if (hasAddedorRemovedFiles) { + if (!this.autoImportProviderHost) + this.autoImportProviderHost = void 0; + (_c = this.autoImportProviderHost) == null ? void 0 : _c.markAsDirty(); + } + if (isFirstProgramLoad) { + this.getPackageJsonAutoImportProvider(); + } + (_d = perfLogger) == null ? void 0 : _d.logStopUpdateGraph(); + (_e = tracing) == null ? void 0 : _e.pop(); + return !hasNewProgram; + } + /** @internal */ + updateTypingFiles(typingFiles) { + if (enumerateInsertsAndDeletes( + typingFiles, + this.typingFiles, + getStringComparer(!this.useCaseSensitiveFileNames()), + /*inserted*/ + noop, + (removed) => this.detachScriptInfoFromProject(removed) + )) { + this.typingFiles = typingFiles; + this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile); + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + } + /** @internal */ + closeWatchingTypingLocations() { + if (this.typingWatchers) + clearMap(this.typingWatchers, closeFileWatcher); + this.typingWatchers = void 0; + } + /** @internal */ + onTypingInstallerWatchInvoke() { + this.typingWatchers.isInvoked = true; + this.projectService.updateTypingsForProject({ projectName: this.getProjectName(), kind: ActionInvalidate }); + } + /** @internal */ + watchTypingLocations(files) { + if (!files) { + this.typingWatchers.isInvoked = false; + return; + } + if (!files.length) { + this.closeWatchingTypingLocations(); + return; + } + const toRemove = new Map(this.typingWatchers); + if (!this.typingWatchers) + this.typingWatchers = /* @__PURE__ */ new Map(); + this.typingWatchers.isInvoked = false; + const createProjectWatcher = (path, typingsWatcherType) => { + const canonicalPath = this.toPath(path); + toRemove.delete(canonicalPath); + if (!this.typingWatchers.has(canonicalPath)) { + this.typingWatchers.set( + canonicalPath, + typingsWatcherType === "FileWatcher" /* FileWatcher */ ? this.projectService.watchFactory.watchFile( + path, + () => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`), + 2e3 /* High */, + this.projectService.getWatchOptions(this), + WatchType.TypingInstallerLocationFile, + this + ) : this.projectService.watchFactory.watchDirectory( + path, + (f) => { + if (this.typingWatchers.isInvoked) + return this.writeLog(`TypingWatchers already invoked`); + if (!fileExtensionIs(f, ".json" /* Json */)) + return this.writeLog(`Ignoring files that are not *.json`); + if (comparePaths(f, combinePaths(this.projectService.typingsInstaller.globalTypingsCacheLocation, "package.json"), !this.useCaseSensitiveFileNames())) + return this.writeLog(`Ignoring package.json change at global typings location`); + this.onTypingInstallerWatchInvoke(); + }, + 1 /* Recursive */, + this.projectService.getWatchOptions(this), + WatchType.TypingInstallerLocationDirectory, + this + ) + ); + } + }; + for (const file of files) { + const basename = getBaseFileName(file); + if (basename === "package.json" || basename === "bower.json") { + createProjectWatcher(file, "FileWatcher" /* FileWatcher */); + continue; + } + if (containsPath(this.currentDirectory, file, this.currentDirectory, !this.useCaseSensitiveFileNames())) { + const subDirectory = file.indexOf(directorySeparator, this.currentDirectory.length + 1); + if (subDirectory !== -1) { + createProjectWatcher(file.substr(0, subDirectory), "DirectoryWatcher" /* DirectoryWatcher */); + } else { + createProjectWatcher(file, "DirectoryWatcher" /* DirectoryWatcher */); + } + continue; + } + if (containsPath(this.projectService.typingsInstaller.globalTypingsCacheLocation, file, this.currentDirectory, !this.useCaseSensitiveFileNames())) { + createProjectWatcher(this.projectService.typingsInstaller.globalTypingsCacheLocation, "DirectoryWatcher" /* DirectoryWatcher */); + continue; + } + createProjectWatcher(file, "DirectoryWatcher" /* DirectoryWatcher */); + } + toRemove.forEach((watch, path) => { + watch.close(); + this.typingWatchers.delete(path); + }); + } + /** @internal */ + getCurrentProgram() { + return this.program; + } + removeExistingTypings(include) { + const existing = getAutomaticTypeDirectiveNames(this.getCompilerOptions(), this.directoryStructureHost); + return include.filter((i) => !existing.includes(i)); + } + updateGraphWorker() { + var _a, _b; + const oldProgram = this.languageService.getCurrentProgram(); + Debug.assert(oldProgram === this.program); + Debug.assert(!this.isClosed(), "Called update graph worker of closed project"); + this.writeLog(`Starting updateGraphWorker: Project: ${this.getProjectName()}`); + const start = timestamp(); + const { hasInvalidatedResolutions, hasInvalidatedLibResolutions } = this.resolutionCache.createHasInvalidatedResolutions(returnFalse, returnFalse); + this.hasInvalidatedResolutions = hasInvalidatedResolutions; + this.hasInvalidatedLibResolutions = hasInvalidatedLibResolutions; + this.resolutionCache.startCachingPerDirectoryResolution(); + this.program = this.languageService.getProgram(); + this.dirty = false; + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "finishCachingPerDirectoryResolution"); + this.resolutionCache.finishCachingPerDirectoryResolution(this.program, oldProgram); + (_b = tracing) == null ? void 0 : _b.pop(); + Debug.assert(oldProgram === void 0 || this.program !== void 0); + let hasNewProgram = false; + if (this.program && (!oldProgram || this.program !== oldProgram && this.program.structureIsReused !== 2 /* Completely */)) { + hasNewProgram = true; + if (oldProgram) { + for (const f of oldProgram.getSourceFiles()) { + const newFile = this.program.getSourceFileByPath(f.resolvedPath); + if (!newFile || f.resolvedPath === f.path && newFile.resolvedPath !== f.path) { + this.detachScriptInfoFromProject( + f.fileName, + !!this.program.getSourceFileByPath(f.path), + /*syncDirWatcherRemove*/ + true + ); + } + } + oldProgram.forEachResolvedProjectReference((resolvedProjectReference) => { + if (!this.program.getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) { + this.detachScriptInfoFromProject( + resolvedProjectReference.sourceFile.fileName, + /*noRemoveResolution*/ + void 0, + /*syncDirWatcherRemove*/ + true + ); + } + }); + } + updateMissingFilePathsWatch( + this.program, + this.missingFilesMap || (this.missingFilesMap = /* @__PURE__ */ new Map()), + // Watch the missing files + (missingFilePath) => this.addMissingFileWatcher(missingFilePath) + ); + if (this.generatedFilesMap) { + const outPath = outFile(this.compilerOptions); + if (isGeneratedFileWatcher(this.generatedFilesMap)) { + if (!outPath || !this.isValidGeneratedFileWatcher( + removeFileExtension(outPath) + ".d.ts" /* Dts */, + this.generatedFilesMap + )) { + this.clearGeneratedFileWatch(); + } + } else { + if (outPath) { + this.clearGeneratedFileWatch(); + } else { + this.generatedFilesMap.forEach((watcher, source) => { + const sourceFile = this.program.getSourceFileByPath(source); + if (!sourceFile || sourceFile.resolvedPath !== source || !this.isValidGeneratedFileWatcher( + getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.currentDirectory, this.program.getCommonSourceDirectory(), this.getCanonicalFileName), + watcher + )) { + closeFileWatcherOf(watcher); + this.generatedFilesMap.delete(source); + } + }); + } + } + } + if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) { + this.resolutionCache.updateTypeRootsWatch(); + } + } + this.projectService.verifyProgram(this); + if (this.exportMapCache && !this.exportMapCache.isEmpty()) { + this.exportMapCache.releaseSymbols(); + if (this.hasAddedorRemovedFiles || oldProgram && !this.program.structureIsReused) { + this.exportMapCache.clear(); + } else if (this.changedFilesForExportMapCache && oldProgram && this.program) { + forEachKey(this.changedFilesForExportMapCache, (fileName) => { + const oldSourceFile = oldProgram.getSourceFileByPath(fileName); + const sourceFile = this.program.getSourceFileByPath(fileName); + if (!oldSourceFile || !sourceFile) { + this.exportMapCache.clear(); + return true; + } + return this.exportMapCache.onFileChanged(oldSourceFile, sourceFile, !!this.getTypeAcquisition().enable); + }); + } + } + if (this.changedFilesForExportMapCache) { + this.changedFilesForExportMapCache.clear(); + } + if (this.hasAddedOrRemovedSymlinks || this.program && !this.program.structureIsReused && this.getCompilerOptions().preserveSymlinks) { + this.symlinks = void 0; + this.moduleSpecifierCache.clear(); + } + const oldExternalFiles = this.externalFiles || emptyArray2; + this.externalFiles = this.getExternalFiles(); + enumerateInsertsAndDeletes( + this.externalFiles, + oldExternalFiles, + getStringComparer(!this.useCaseSensitiveFileNames()), + // Ensure a ScriptInfo is created for new external files. This is performed indirectly + // by the host for files in the program when the program is retrieved above but + // the program doesn't contain external files so this must be done explicitly. + (inserted) => { + const scriptInfo = this.projectService.getOrCreateScriptInfoNotOpenedByClient(inserted, this.currentDirectory, this.directoryStructureHost); + scriptInfo == null ? void 0 : scriptInfo.attachToProject(this); + }, + (removed) => this.detachScriptInfoFromProject(removed) + ); + const elapsed = timestamp() - start; + this.sendPerformanceEvent("UpdateGraph", elapsed); + this.writeLog(`Finishing updateGraphWorker: Project: ${this.getProjectName()} Version: ${this.getProjectVersion()} structureChanged: ${hasNewProgram}${this.program ? ` structureIsReused:: ${StructureIsReused[this.program.structureIsReused]}` : ""} Elapsed: ${elapsed}ms`); + if (this.projectService.logger.isTestLogger) { + if (this.program !== oldProgram) { + this.print( + /*writeProjectFileNames*/ + true, + this.hasAddedorRemovedFiles, + /*writeFileVersionAndText*/ + true + ); + } else { + this.writeLog(`Same program as before`); + } + } else if (this.hasAddedorRemovedFiles) { + this.print( + /*writeProjectFileNames*/ + true, + /*writeFileExplaination*/ + true, + /*writeFileVersionAndText*/ + false + ); + } else if (this.program !== oldProgram) { + this.writeLog(`Different program with same set of files`); + } + this.projectService.verifyDocumentRegistry(); + return hasNewProgram; + } + /** @internal */ + sendPerformanceEvent(kind, durationMs) { + this.projectService.sendPerformanceEvent(kind, durationMs); + } + detachScriptInfoFromProject(uncheckedFileName, noRemoveResolution, syncDirWatcherRemove) { + const scriptInfoToDetach = this.projectService.getScriptInfo(uncheckedFileName); + if (scriptInfoToDetach) { + scriptInfoToDetach.detachFromProject(this); + if (!noRemoveResolution) { + this.resolutionCache.removeResolutionsOfFile(scriptInfoToDetach.path, syncDirWatcherRemove); + } + } + } + addMissingFileWatcher(missingFilePath) { + var _a; + if (isConfiguredProject(this)) { + const configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(missingFilePath); + if ((_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config) == null ? void 0 : _a.projects.has(this.canonicalConfigFilePath)) + return noopFileWatcher; + } + const fileWatcher = this.projectService.watchFactory.watchFile( + missingFilePath, + (fileName, eventKind) => { + if (isConfiguredProject(this)) { + this.getCachedDirectoryStructureHost().addOrDeleteFile(fileName, missingFilePath, eventKind); + } + if (eventKind === 0 /* Created */ && this.missingFilesMap.has(missingFilePath)) { + this.missingFilesMap.delete(missingFilePath); + fileWatcher.close(); + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } + }, + 500 /* Medium */, + this.projectService.getWatchOptions(this), + WatchType.MissingFile, + this + ); + return fileWatcher; + } + isWatchedMissingFile(path) { + return !!this.missingFilesMap && this.missingFilesMap.has(path); + } + /** @internal */ + addGeneratedFileWatch(generatedFile, sourceFile) { + if (outFile(this.compilerOptions)) { + if (!this.generatedFilesMap) { + this.generatedFilesMap = this.createGeneratedFileWatcher(generatedFile); + } + } else { + const path = this.toPath(sourceFile); + if (this.generatedFilesMap) { + if (isGeneratedFileWatcher(this.generatedFilesMap)) { + Debug.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`); + return; + } + if (this.generatedFilesMap.has(path)) + return; + } else { + this.generatedFilesMap = /* @__PURE__ */ new Map(); + } + this.generatedFilesMap.set(path, this.createGeneratedFileWatcher(generatedFile)); + } + } + createGeneratedFileWatcher(generatedFile) { + return { + generatedFilePath: this.toPath(generatedFile), + watcher: this.projectService.watchFactory.watchFile( + generatedFile, + () => { + this.clearSourceMapperCache(); + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + }, + 2e3 /* High */, + this.projectService.getWatchOptions(this), + WatchType.MissingGeneratedFile, + this + ) + }; + } + isValidGeneratedFileWatcher(generateFile, watcher) { + return this.toPath(generateFile) === watcher.generatedFilePath; + } + clearGeneratedFileWatch() { + if (this.generatedFilesMap) { + if (isGeneratedFileWatcher(this.generatedFilesMap)) { + closeFileWatcherOf(this.generatedFilesMap); + } else { + clearMap(this.generatedFilesMap, closeFileWatcherOf); + } + this.generatedFilesMap = void 0; + } + } + getScriptInfoForNormalizedPath(fileName) { + const scriptInfo = this.projectService.getScriptInfoForPath(this.toPath(fileName)); + if (scriptInfo && !scriptInfo.isAttached(this)) { + return Errors.ThrowProjectDoesNotContainDocument(fileName, this); + } + return scriptInfo; + } + getScriptInfo(uncheckedFileName) { + return this.projectService.getScriptInfo(uncheckedFileName); + } + filesToString(writeProjectFileNames) { + return this.filesToStringWorker( + writeProjectFileNames, + /*writeFileExplaination*/ + true, + /*writeFileVersionAndText*/ + false + ); + } + /** @internal */ + filesToStringWorker(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) { + if (this.isInitialLoadPending()) + return " Files (0) InitialLoadPending\n"; + if (!this.program) + return " Files (0) NoProgram\n"; + const sourceFiles = this.program.getSourceFiles(); + let strBuilder = ` Files (${sourceFiles.length}) +`; + if (writeProjectFileNames) { + for (const file of sourceFiles) { + strBuilder += ` ${file.fileName}${writeFileVersionAndText ? ` ${file.version} ${JSON.stringify(file.text)}` : ""} +`; + } + if (writeFileExplaination) { + strBuilder += "\n\n"; + explainFiles(this.program, (s) => strBuilder += ` ${s} +`); + } + } + return strBuilder; + } + /** @internal */ + print(writeProjectFileNames, writeFileExplaination, writeFileVersionAndText) { + this.writeLog(`Project '${this.projectName}' (${ProjectKind[this.projectKind]})`); + this.writeLog(this.filesToStringWorker( + writeProjectFileNames && this.projectService.logger.hasLevel(3 /* verbose */), + writeFileExplaination && this.projectService.logger.hasLevel(3 /* verbose */), + writeFileVersionAndText && this.projectService.logger.hasLevel(3 /* verbose */) + )); + this.writeLog("-----------------------------------------------"); + if (this.autoImportProviderHost) { + this.autoImportProviderHost.print( + /*writeProjectFileNames*/ + false, + /*writeFileExplaination*/ + false, + /*writeFileVersionAndText*/ + false + ); + } + } + setCompilerOptions(compilerOptions) { + var _a; + if (compilerOptions) { + compilerOptions.allowNonTsExtensions = true; + const oldOptions = this.compilerOptions; + this.compilerOptions = compilerOptions; + this.setInternalCompilerOptionsForEmittingJsFiles(); + (_a = this.noDtsResolutionProject) == null ? void 0 : _a.setCompilerOptions(this.getCompilerOptionsForNoDtsResolutionProject()); + if (changesAffectModuleResolution(oldOptions, compilerOptions)) { + this.cachedUnresolvedImportsPerFile.clear(); + this.lastCachedUnresolvedImportsList = void 0; + this.resolutionCache.onChangesAffectModuleResolution(); + this.moduleSpecifierCache.clear(); + } + this.markAsDirty(); + } + } + /** @internal */ + setWatchOptions(watchOptions) { + this.watchOptions = watchOptions; + } + /** @internal */ + getWatchOptions() { + return this.watchOptions; + } + setTypeAcquisition(newTypeAcquisition) { + if (newTypeAcquisition) { + this.typeAcquisition = this.removeLocalTypingsFromTypeAcquisition(newTypeAcquisition); + } + } + getTypeAcquisition() { + return this.typeAcquisition || {}; + } + /** @internal */ + getChangesSinceVersion(lastKnownVersion, includeProjectReferenceRedirectInfo) { + var _a, _b; + const includeProjectReferenceRedirectInfoIfRequested = includeProjectReferenceRedirectInfo ? (files) => arrayFrom(files.entries(), ([fileName, isSourceOfProjectReferenceRedirect]) => ({ + fileName, + isSourceOfProjectReferenceRedirect + })) : (files) => arrayFrom(files.keys()); + if (!this.isInitialLoadPending()) { + updateProjectIfDirty(this); + } + const info = { + projectName: this.getProjectName(), + version: this.projectProgramVersion, + isInferred: isInferredProject(this), + options: this.getCompilationSettings(), + languageServiceDisabled: !this.languageServiceEnabled, + lastFileExceededProgramSize: this.lastFileExceededProgramSize + }; + const updatedFileNames = this.updatedFileNames; + this.updatedFileNames = void 0; + if (this.lastReportedFileNames && lastKnownVersion === this.lastReportedVersion) { + if (this.projectProgramVersion === this.lastReportedVersion && !updatedFileNames) { + return { info, projectErrors: this.getGlobalProjectErrors() }; + } + const lastReportedFileNames = this.lastReportedFileNames; + const externalFiles = ((_a = this.externalFiles) == null ? void 0 : _a.map((f) => ({ + fileName: toNormalizedPath(f), + isSourceOfProjectReferenceRedirect: false + }))) || emptyArray2; + const currentFiles = arrayToMap( + this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo).concat(externalFiles), + (info2) => info2.fileName, + (info2) => info2.isSourceOfProjectReferenceRedirect + ); + const added = /* @__PURE__ */ new Map(); + const removed = /* @__PURE__ */ new Map(); + const updated = updatedFileNames ? arrayFrom(updatedFileNames.keys()) : []; + const updatedRedirects = []; + forEachEntry(currentFiles, (isSourceOfProjectReferenceRedirect, fileName) => { + if (!lastReportedFileNames.has(fileName)) { + added.set(fileName, isSourceOfProjectReferenceRedirect); + } else if (includeProjectReferenceRedirectInfo && isSourceOfProjectReferenceRedirect !== lastReportedFileNames.get(fileName)) { + updatedRedirects.push({ + fileName, + isSourceOfProjectReferenceRedirect + }); + } + }); + forEachEntry(lastReportedFileNames, (isSourceOfProjectReferenceRedirect, fileName) => { + if (!currentFiles.has(fileName)) { + removed.set(fileName, isSourceOfProjectReferenceRedirect); + } + }); + this.lastReportedFileNames = currentFiles; + this.lastReportedVersion = this.projectProgramVersion; + return { + info, + changes: { + added: includeProjectReferenceRedirectInfoIfRequested(added), + removed: includeProjectReferenceRedirectInfoIfRequested(removed), + updated: includeProjectReferenceRedirectInfo ? updated.map((fileName) => ({ + fileName, + isSourceOfProjectReferenceRedirect: this.isSourceOfProjectReferenceRedirect(fileName) + })) : updated, + updatedRedirects: includeProjectReferenceRedirectInfo ? updatedRedirects : void 0 + }, + projectErrors: this.getGlobalProjectErrors() + }; + } else { + const projectFileNames = this.getFileNamesWithRedirectInfo(!!includeProjectReferenceRedirectInfo); + const externalFiles = ((_b = this.externalFiles) == null ? void 0 : _b.map((f) => ({ + fileName: toNormalizedPath(f), + isSourceOfProjectReferenceRedirect: false + }))) || emptyArray2; + const allFiles = projectFileNames.concat(externalFiles); + this.lastReportedFileNames = arrayToMap( + allFiles, + (info2) => info2.fileName, + (info2) => info2.isSourceOfProjectReferenceRedirect + ); + this.lastReportedVersion = this.projectProgramVersion; + return { + info, + files: includeProjectReferenceRedirectInfo ? allFiles : allFiles.map((f) => f.fileName), + projectErrors: this.getGlobalProjectErrors() + }; + } + } + // remove a root file from project + removeRoot(info) { + orderedRemoveItem(this.rootFiles, info); + this.rootFilesMap.delete(info.path); + } + /** @internal */ + isSourceOfProjectReferenceRedirect(fileName) { + return !!this.program && this.program.isSourceOfProjectReferenceRedirect(fileName); + } + /** @internal */ + getGlobalPluginSearchPaths() { + return [ + ...this.projectService.pluginProbeLocations, + // ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/ + combinePaths(this.projectService.getExecutingFilePath(), "../../..") + ]; + } + enableGlobalPlugins(options) { + if (!this.projectService.globalPlugins.length) + return; + const host = this.projectService.host; + if (!host.require && !host.importPlugin) { + this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); + return; + } + const searchPaths = this.getGlobalPluginSearchPaths(); + for (const globalPluginName of this.projectService.globalPlugins) { + if (!globalPluginName) + continue; + if (options.plugins && options.plugins.some((p) => p.name === globalPluginName)) + continue; + this.projectService.logger.info(`Loading global plugin ${globalPluginName}`); + this.enablePlugin({ name: globalPluginName, global: true }, searchPaths); + } + } + enablePlugin(pluginConfigEntry, searchPaths) { + this.projectService.requestEnablePlugin(this, pluginConfigEntry, searchPaths); + } + /** @internal */ + enableProxy(pluginModuleFactory, configEntry) { + try { + if (typeof pluginModuleFactory !== "function") { + this.projectService.logger.info(`Skipped loading plugin ${configEntry.name} because it did not expose a proper factory function`); + return; + } + const info = { + config: configEntry, + project: this, + languageService: this.languageService, + languageServiceHost: this, + serverHost: this.projectService.host, + session: this.projectService.session + }; + const pluginModule = pluginModuleFactory({ typescript: ts_exports2 }); + const newLS = pluginModule.create(info); + for (const k of Object.keys(this.languageService)) { + if (!(k in newLS)) { + this.projectService.logger.info(`Plugin activation warning: Missing proxied method ${k} in created LS. Patching.`); + newLS[k] = this.languageService[k]; + } + } + this.projectService.logger.info(`Plugin validation succeeded`); + this.languageService = newLS; + this.plugins.push({ name: configEntry.name, module: pluginModule }); + } catch (e) { + this.projectService.logger.info(`Plugin activation failed: ${e}`); + } + } + /** @internal */ + onPluginConfigurationChanged(pluginName, configuration) { + this.plugins.filter((plugin) => plugin.name === pluginName).forEach((plugin) => { + if (plugin.module.onConfigurationChanged) { + plugin.module.onConfigurationChanged(configuration); + } + }); + } + /** Starts a new check for diagnostics. Call this if some file has updated that would cause diagnostics to be changed. */ + refreshDiagnostics() { + this.projectService.sendProjectsUpdatedInBackgroundEvent(); + } + /** @internal */ + getPackageJsonsVisibleToFile(fileName, rootDir) { + if (this.projectService.serverMode !== 0 /* Semantic */) + return emptyArray2; + return this.projectService.getPackageJsonsVisibleToFile(fileName, rootDir); + } + /** @internal */ + getNearestAncestorDirectoryWithPackageJson(fileName) { + return this.projectService.getNearestAncestorDirectoryWithPackageJson(fileName); + } + /** @internal */ + getPackageJsonsForAutoImport(rootDir) { + const packageJsons = this.getPackageJsonsVisibleToFile(combinePaths(this.currentDirectory, inferredTypesContainingFile), rootDir); + this.packageJsonsForAutoImport = new Set(packageJsons.map((p) => p.fileName)); + return packageJsons; + } + /** @internal */ + getPackageJsonCache() { + return this.projectService.packageJsonCache; + } + /** @internal */ + getCachedExportInfoMap() { + return this.exportMapCache || (this.exportMapCache = createCacheableExportInfoMap(this)); + } + /** @internal */ + clearCachedExportInfoMap() { + var _a; + (_a = this.exportMapCache) == null ? void 0 : _a.clear(); + } + /** @internal */ + getModuleSpecifierCache() { + return this.moduleSpecifierCache; + } + /** @internal */ + includePackageJsonAutoImports() { + if (this.projectService.includePackageJsonAutoImports() === 0 /* Off */ || !this.languageServiceEnabled || isInsideNodeModules(this.currentDirectory) || !this.isDefaultProjectForOpenFiles()) { + return 0 /* Off */; + } + return this.projectService.includePackageJsonAutoImports(); + } + /** @internal */ + getHostForAutoImportProvider() { + var _a, _b; + if (this.program) { + return { + fileExists: this.program.fileExists, + directoryExists: this.program.directoryExists, + realpath: this.program.realpath || ((_a = this.projectService.host.realpath) == null ? void 0 : _a.bind(this.projectService.host)), + getCurrentDirectory: this.getCurrentDirectory.bind(this), + readFile: this.projectService.host.readFile.bind(this.projectService.host), + getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host), + trace: (_b = this.projectService.host.trace) == null ? void 0 : _b.bind(this.projectService.host), + useCaseSensitiveFileNames: this.program.useCaseSensitiveFileNames(), + readDirectory: this.projectService.host.readDirectory.bind(this.projectService.host) + }; + } + return this.projectService.host; + } + /** @internal */ + getPackageJsonAutoImportProvider() { + var _a, _b, _c; + if (this.autoImportProviderHost === false) { + return void 0; + } + if (this.projectService.serverMode !== 0 /* Semantic */) { + this.autoImportProviderHost = false; + return void 0; + } + if (this.autoImportProviderHost) { + updateProjectIfDirty(this.autoImportProviderHost); + if (this.autoImportProviderHost.isEmpty()) { + this.autoImportProviderHost.close(); + this.autoImportProviderHost = void 0; + return void 0; + } + return this.autoImportProviderHost.getCurrentProgram(); + } + const dependencySelection = this.includePackageJsonAutoImports(); + if (dependencySelection) { + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "getPackageJsonAutoImportProvider"); + const start = timestamp(); + this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getHostForAutoImportProvider(), this.documentRegistry); + if (this.autoImportProviderHost) { + updateProjectIfDirty(this.autoImportProviderHost); + this.sendPerformanceEvent("CreatePackageJsonAutoImportProvider", timestamp() - start); + (_b = tracing) == null ? void 0 : _b.pop(); + return this.autoImportProviderHost.getCurrentProgram(); + } + (_c = tracing) == null ? void 0 : _c.pop(); + } + } + /** @internal */ + isDefaultProjectForOpenFiles() { + return !!forEachEntry( + this.projectService.openFiles, + (_, fileName) => this.projectService.tryGetDefaultProjectForFile(toNormalizedPath(fileName)) === this + ); + } + /** @internal */ + watchNodeModulesForPackageJsonChanges(directoryPath) { + return this.projectService.watchPackageJsonsInNodeModules(this.toPath(directoryPath), this); + } + /** @internal */ + getIncompleteCompletionsCache() { + return this.projectService.getIncompleteCompletionsCache(); + } + /** @internal */ + getNoDtsResolutionProject(rootFile) { + Debug.assert(this.projectService.serverMode === 0 /* Semantic */); + if (!this.noDtsResolutionProject) { + this.noDtsResolutionProject = new AuxiliaryProject(this.projectService, this.documentRegistry, this.getCompilerOptionsForNoDtsResolutionProject(), this.currentDirectory); + } + if (this.noDtsResolutionProject.rootFile !== rootFile) { + this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this.noDtsResolutionProject, [rootFile]); + this.noDtsResolutionProject.rootFile = rootFile; + } + return this.noDtsResolutionProject; + } + /** @internal */ + getCompilerOptionsForNoDtsResolutionProject() { + return { + ...this.getCompilerOptions(), + noDtsResolution: true, + allowJs: true, + maxNodeModuleJsDepth: 3, + diagnostics: false, + skipLibCheck: true, + sourceMap: false, + types: emptyArray, + lib: emptyArray, + noLib: true + }; + } + }; + InferredProject2 = class extends Project3 { + /** @internal */ + constructor(projectService, documentRegistry, compilerOptions, watchOptions, projectRootPath, currentDirectory, typeAcquisition) { + super( + projectService.newInferredProjectName(), + 0 /* Inferred */, + projectService, + documentRegistry, + // TODO: GH#18217 + /*files*/ + void 0, + /*lastFileExceededProgramSize*/ + void 0, + compilerOptions, + /*compileOnSaveEnabled*/ + false, + watchOptions, + projectService.host, + currentDirectory + ); + this._isJsInferredProject = false; + this.typeAcquisition = typeAcquisition; + this.projectRootPath = projectRootPath && projectService.toCanonicalFileName(projectRootPath); + if (!projectRootPath && !projectService.useSingleInferredProject) { + this.canonicalCurrentDirectory = projectService.toCanonicalFileName(this.currentDirectory); + } + this.enableGlobalPlugins(this.getCompilerOptions()); + } + toggleJsInferredProject(isJsInferredProject) { + if (isJsInferredProject !== this._isJsInferredProject) { + this._isJsInferredProject = isJsInferredProject; + this.setCompilerOptions(); + } + } + setCompilerOptions(options) { + if (!options && !this.getCompilationSettings()) { + return; + } + const newOptions = cloneCompilerOptions(options || this.getCompilationSettings()); + if (this._isJsInferredProject && typeof newOptions.maxNodeModuleJsDepth !== "number") { + newOptions.maxNodeModuleJsDepth = 2; + } else if (!this._isJsInferredProject) { + newOptions.maxNodeModuleJsDepth = void 0; + } + newOptions.allowJs = true; + super.setCompilerOptions(newOptions); + } + addRoot(info) { + Debug.assert(info.isScriptOpen()); + this.projectService.startWatchingConfigFilesForInferredProjectRoot(info); + if (!this._isJsInferredProject && info.isJavaScript()) { + this.toggleJsInferredProject( + /*isJsInferredProject*/ + true + ); + } else if (this.isOrphan() && this._isJsInferredProject && !info.isJavaScript()) { + this.toggleJsInferredProject( + /*isJsInferredProject*/ + false + ); + } + super.addRoot(info); + } + removeRoot(info) { + this.projectService.stopWatchingConfigFilesForInferredProjectRoot(info); + super.removeRoot(info); + if (!this.isOrphan() && this._isJsInferredProject && info.isJavaScript()) { + if (every(this.getRootScriptInfos(), (rootInfo) => !rootInfo.isJavaScript())) { + this.toggleJsInferredProject( + /*isJsInferredProject*/ + false + ); + } + } + } + /** @internal */ + isOrphan() { + return !this.hasRoots(); + } + isProjectWithSingleRoot() { + return !this.projectRootPath && !this.projectService.useSingleInferredProject || this.getRootScriptInfos().length === 1; + } + close() { + forEach(this.getRootScriptInfos(), (info) => this.projectService.stopWatchingConfigFilesForInferredProjectRoot(info)); + super.close(); + } + getTypeAcquisition() { + return this.typeAcquisition || { + enable: allRootFilesAreJsOrDts(this), + include: emptyArray, + exclude: emptyArray + }; + } + }; + AuxiliaryProject = class extends Project3 { + constructor(projectService, documentRegistry, compilerOptions, currentDirectory) { + super( + projectService.newAuxiliaryProjectName(), + 4 /* Auxiliary */, + projectService, + documentRegistry, + /*hasExplicitListOfFiles*/ + false, + /*lastFileExceededProgramSize*/ + void 0, + compilerOptions, + /*compileOnSaveEnabled*/ + false, + /*watchOptions*/ + void 0, + projectService.host, + currentDirectory + ); + } + isOrphan() { + return true; + } + scheduleInvalidateResolutionsOfFailedLookupLocations() { + return; + } + }; + _AutoImportProviderProject = class _AutoImportProviderProject extends Project3 { + /** @internal */ + constructor(hostProject, initialRootNames, documentRegistry, compilerOptions) { + super( + hostProject.projectService.newAutoImportProviderProjectName(), + 3 /* AutoImportProvider */, + hostProject.projectService, + documentRegistry, + /*hasExplicitListOfFiles*/ + false, + /*lastFileExceededProgramSize*/ + void 0, + compilerOptions, + /*compileOnSaveEnabled*/ + false, + hostProject.getWatchOptions(), + hostProject.projectService.host, + hostProject.currentDirectory + ); + this.hostProject = hostProject; + this.rootFileNames = initialRootNames; + this.useSourceOfProjectReferenceRedirect = maybeBind(this.hostProject, this.hostProject.useSourceOfProjectReferenceRedirect); + this.getParsedCommandLine = maybeBind(this.hostProject, this.hostProject.getParsedCommandLine); + } + /** @internal */ + static getRootFileNames(dependencySelection, hostProject, host, compilerOptions) { + var _a, _b; + if (!dependencySelection) { + return emptyArray; + } + const program = hostProject.getCurrentProgram(); + if (!program) { + return emptyArray; + } + const start = timestamp(); + let dependencyNames; + let rootNames; + const rootFileName = combinePaths(hostProject.currentDirectory, inferredTypesContainingFile); + const packageJsons = hostProject.getPackageJsonsForAutoImport(combinePaths(hostProject.currentDirectory, rootFileName)); + for (const packageJson of packageJsons) { + (_a = packageJson.dependencies) == null ? void 0 : _a.forEach((_, dependenyName) => addDependency(dependenyName)); + (_b = packageJson.peerDependencies) == null ? void 0 : _b.forEach((_, dependencyName) => addDependency(dependencyName)); + } + let dependenciesAdded = 0; + if (dependencyNames) { + const symlinkCache = hostProject.getSymlinkCache(); + for (const name of arrayFrom(dependencyNames.keys())) { + if (dependencySelection === 2 /* Auto */ && dependenciesAdded > this.maxDependencies) { + hostProject.log(`AutoImportProviderProject: attempted to add more than ${this.maxDependencies} dependencies. Aborting.`); + return emptyArray; + } + const packageJson = resolvePackageNameToPackageJson( + name, + hostProject.currentDirectory, + compilerOptions, + host, + program.getModuleResolutionCache() + ); + if (packageJson) { + const entrypoints = getRootNamesFromPackageJson(packageJson, program, symlinkCache); + if (entrypoints) { + rootNames = concatenate(rootNames, entrypoints); + dependenciesAdded += entrypoints.length ? 1 : 0; + continue; + } + } + const done = forEach([hostProject.currentDirectory, hostProject.getGlobalTypingsCacheLocation()], (directory) => { + if (directory) { + const typesPackageJson = resolvePackageNameToPackageJson( + `@types/${name}`, + directory, + compilerOptions, + host, + program.getModuleResolutionCache() + ); + if (typesPackageJson) { + const entrypoints = getRootNamesFromPackageJson(typesPackageJson, program, symlinkCache); + rootNames = concatenate(rootNames, entrypoints); + dependenciesAdded += (entrypoints == null ? void 0 : entrypoints.length) ? 1 : 0; + return true; + } + } + }); + if (done) + continue; + if (packageJson && compilerOptions.allowJs && compilerOptions.maxNodeModuleJsDepth) { + const entrypoints = getRootNamesFromPackageJson( + packageJson, + program, + symlinkCache, + /*resolveJs*/ + true + ); + rootNames = concatenate(rootNames, entrypoints); + dependenciesAdded += (entrypoints == null ? void 0 : entrypoints.length) ? 1 : 0; + } + } + } + if (rootNames == null ? void 0 : rootNames.length) { + hostProject.log(`AutoImportProviderProject: found ${rootNames.length} root files in ${dependenciesAdded} dependencies in ${timestamp() - start} ms`); + } + return rootNames || emptyArray; + function addDependency(dependency) { + if (!startsWith(dependency, "@types/")) { + (dependencyNames || (dependencyNames = /* @__PURE__ */ new Set())).add(dependency); + } + } + function getRootNamesFromPackageJson(packageJson, program2, symlinkCache, resolveJs) { + var _a2; + const entrypoints = getEntrypointsFromPackageJsonInfo( + packageJson, + compilerOptions, + host, + program2.getModuleResolutionCache(), + resolveJs + ); + if (entrypoints) { + const real = (_a2 = host.realpath) == null ? void 0 : _a2.call(host, packageJson.packageDirectory); + const realPath2 = real ? hostProject.toPath(real) : void 0; + const isSymlink = realPath2 && realPath2 !== hostProject.toPath(packageJson.packageDirectory); + if (isSymlink) { + symlinkCache.setSymlinkedDirectory(packageJson.packageDirectory, { + real: ensureTrailingDirectorySeparator(real), + realPath: ensureTrailingDirectorySeparator(realPath2) + }); + } + return mapDefined(entrypoints, (entrypoint) => { + const resolvedFileName = isSymlink ? entrypoint.replace(packageJson.packageDirectory, real) : entrypoint; + if (!program2.getSourceFile(resolvedFileName) && !(isSymlink && program2.getSourceFile(entrypoint))) { + return resolvedFileName; + } + }); + } + } + } + /** @internal */ + static create(dependencySelection, hostProject, host, documentRegistry) { + if (dependencySelection === 0 /* Off */) { + return void 0; + } + const compilerOptions = { + ...hostProject.getCompilerOptions(), + ...this.compilerOptionsOverrides + }; + const rootNames = this.getRootFileNames(dependencySelection, hostProject, host, compilerOptions); + if (!rootNames.length) { + return void 0; + } + return new _AutoImportProviderProject(hostProject, rootNames, documentRegistry, compilerOptions); + } + /** @internal */ + isEmpty() { + return !some(this.rootFileNames); + } + isOrphan() { + return true; + } + updateGraph() { + let rootFileNames = this.rootFileNames; + if (!rootFileNames) { + rootFileNames = _AutoImportProviderProject.getRootFileNames( + this.hostProject.includePackageJsonAutoImports(), + this.hostProject, + this.hostProject.getHostForAutoImportProvider(), + this.getCompilationSettings() + ); + } + this.projectService.setFileNamesOfAutpImportProviderOrAuxillaryProject(this, rootFileNames); + this.rootFileNames = rootFileNames; + const oldProgram = this.getCurrentProgram(); + const hasSameSetOfFiles = super.updateGraph(); + if (oldProgram && oldProgram !== this.getCurrentProgram()) { + this.hostProject.clearCachedExportInfoMap(); + } + return hasSameSetOfFiles; + } + /** @internal */ + scheduleInvalidateResolutionsOfFailedLookupLocations() { + return; + } + hasRoots() { + var _a; + return !!((_a = this.rootFileNames) == null ? void 0 : _a.length); + } + markAsDirty() { + this.rootFileNames = void 0; + super.markAsDirty(); + } + getScriptFileNames() { + return this.rootFileNames || emptyArray; + } + getLanguageService() { + throw new Error("AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`."); + } + /** @internal */ + onAutoImportProviderSettingsChanged() { + throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead."); + } + /** @internal */ + onPackageJsonChange() { + throw new Error("package.json changes should be notified on an AutoImportProvider's host project"); + } + getHostForAutoImportProvider() { + throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead."); + } + getProjectReferences() { + return this.hostProject.getProjectReferences(); + } + /** @internal */ + includePackageJsonAutoImports() { + return 0 /* Off */; + } + /** @internal */ + getSymlinkCache() { + return this.hostProject.getSymlinkCache(); + } + /** @internal */ + getModuleResolutionCache() { + var _a; + return (_a = this.hostProject.getCurrentProgram()) == null ? void 0 : _a.getModuleResolutionCache(); + } + }; + /** @internal */ + _AutoImportProviderProject.maxDependencies = 10; + /** @internal */ + _AutoImportProviderProject.compilerOptionsOverrides = { + diagnostics: false, + skipLibCheck: true, + sourceMap: false, + types: emptyArray, + lib: emptyArray, + noLib: true + }; + AutoImportProviderProject = _AutoImportProviderProject; + ConfiguredProject2 = class extends Project3 { + /** @internal */ + constructor(configFileName, canonicalConfigFilePath, projectService, documentRegistry, cachedDirectoryStructureHost) { + super( + configFileName, + 1 /* Configured */, + projectService, + documentRegistry, + /*hasExplicitListOfFiles*/ + false, + /*lastFileExceededProgramSize*/ + void 0, + /*compilerOptions*/ + {}, + /*compileOnSaveEnabled*/ + false, + /*watchOptions*/ + void 0, + cachedDirectoryStructureHost, + getDirectoryPath(configFileName) + ); + this.canonicalConfigFilePath = canonicalConfigFilePath; + /** @internal */ + this.openFileWatchTriggered = /* @__PURE__ */ new Map(); + /** @internal */ + this.canConfigFileJsonReportNoInputFiles = false; + /** Ref count to the project when opened from external project */ + this.externalProjectRefCount = 0; + /** @internal */ + this.isInitialLoadPending = returnTrue; + /** @internal */ + this.sendLoadingProjectFinish = false; + } + /** @internal */ + setCompilerHost(host) { + this.compilerHost = host; + } + /** @internal */ + getCompilerHost() { + return this.compilerHost; + } + /** @internal */ + useSourceOfProjectReferenceRedirect() { + return this.languageServiceEnabled; + } + /** @internal */ + getParsedCommandLine(fileName) { + const configFileName = asNormalizedPath(normalizePath(fileName)); + const canonicalConfigFilePath = asNormalizedPath(this.projectService.toCanonicalFileName(configFileName)); + let configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (!configFileExistenceInfo) { + this.projectService.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo = { exists: this.projectService.host.fileExists(configFileName) }); + } + this.projectService.ensureParsedConfigUptoDate(configFileName, canonicalConfigFilePath, configFileExistenceInfo, this); + if (this.languageServiceEnabled && this.projectService.serverMode === 0 /* Semantic */) { + this.projectService.watchWildcards(configFileName, configFileExistenceInfo, this); + } + return configFileExistenceInfo.exists ? configFileExistenceInfo.config.parsedCommandLine : void 0; + } + /** @internal */ + onReleaseParsedCommandLine(fileName) { + this.releaseParsedConfig(asNormalizedPath(this.projectService.toCanonicalFileName(asNormalizedPath(normalizePath(fileName))))); + } + /** @internal */ + releaseParsedConfig(canonicalConfigFilePath) { + this.projectService.stopWatchingWildCards(canonicalConfigFilePath, this); + this.projectService.releaseParsedConfig(canonicalConfigFilePath, this); + } + /** + * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph + * @returns: true if set of files in the project stays the same and false - otherwise. + */ + updateGraph() { + const isInitialLoad = this.isInitialLoadPending(); + this.isInitialLoadPending = returnFalse; + const updateLevel = this.pendingUpdateLevel; + this.pendingUpdateLevel = 0 /* Update */; + let result; + switch (updateLevel) { + case 1 /* RootNamesAndUpdate */: + this.openFileWatchTriggered.clear(); + result = this.projectService.reloadFileNamesOfConfiguredProject(this); + break; + case 2 /* Full */: + this.openFileWatchTriggered.clear(); + const reason = Debug.checkDefined(this.pendingUpdateReason); + this.pendingUpdateReason = void 0; + this.projectService.reloadConfiguredProject( + this, + reason, + isInitialLoad, + /*clearSemanticCache*/ + false + ); + result = true; + break; + default: + result = super.updateGraph(); + } + this.compilerHost = void 0; + this.projectService.sendProjectLoadingFinishEvent(this); + this.projectService.sendProjectTelemetry(this); + return result; + } + /** @internal */ + getCachedDirectoryStructureHost() { + return this.directoryStructureHost; + } + getConfigFilePath() { + return asNormalizedPath(this.getProjectName()); + } + getProjectReferences() { + return this.projectReferences; + } + updateReferences(refs) { + this.projectReferences = refs; + this.potentialProjectReferences = void 0; + } + /** @internal */ + setPotentialProjectReference(canonicalConfigPath) { + Debug.assert(this.isInitialLoadPending()); + (this.potentialProjectReferences || (this.potentialProjectReferences = /* @__PURE__ */ new Set())).add(canonicalConfigPath); + } + /** @internal */ + getResolvedProjectReferenceToRedirect(fileName) { + const program = this.getCurrentProgram(); + return program && program.getResolvedProjectReferenceToRedirect(fileName); + } + /** @internal */ + forEachResolvedProjectReference(cb) { + var _a; + return (_a = this.getCurrentProgram()) == null ? void 0 : _a.forEachResolvedProjectReference(cb); + } + /** @internal */ + enablePluginsWithOptions(options) { + var _a; + this.plugins.length = 0; + if (!((_a = options.plugins) == null ? void 0 : _a.length) && !this.projectService.globalPlugins.length) + return; + const host = this.projectService.host; + if (!host.require && !host.importPlugin) { + this.projectService.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); + return; + } + const searchPaths = this.getGlobalPluginSearchPaths(); + if (this.projectService.allowLocalPluginLoads) { + const local = getDirectoryPath(this.canonicalConfigFilePath); + this.projectService.logger.info(`Local plugin loading enabled; adding ${local} to search paths`); + searchPaths.unshift(local); + } + if (options.plugins) { + for (const pluginConfigEntry of options.plugins) { + this.enablePlugin(pluginConfigEntry, searchPaths); + } + } + return this.enableGlobalPlugins(options); + } + /** + * Get the errors that dont have any file name associated + */ + getGlobalProjectErrors() { + return filter(this.projectErrors, (diagnostic) => !diagnostic.file) || emptyArray2; + } + /** + * Get all the project errors + */ + getAllProjectErrors() { + return this.projectErrors || emptyArray2; + } + setProjectErrors(projectErrors) { + this.projectErrors = projectErrors; + } + close() { + this.projectService.configFileExistenceInfoCache.forEach((_configFileExistenceInfo, canonicalConfigFilePath) => this.releaseParsedConfig(canonicalConfigFilePath)); + this.projectErrors = void 0; + this.openFileWatchTriggered.clear(); + this.compilerHost = void 0; + super.close(); + } + /** @internal */ + addExternalProjectReference() { + this.externalProjectRefCount++; + } + /** @internal */ + deleteExternalProjectReference() { + this.externalProjectRefCount--; + } + /** @internal */ + isSolution() { + return this.getRootFilesMap().size === 0 && !this.canConfigFileJsonReportNoInputFiles; + } + /** + * Find the configured project from the project references in project which contains the info directly + * + * @internal + */ + getDefaultChildProjectFromProjectWithReferences(info) { + return forEachResolvedProjectReferenceProject( + this, + info.path, + (child) => projectContainsInfoDirectly(child, info) ? child : void 0, + 0 /* Find */ + ); + } + /** + * Returns true if the project is needed by any of the open script info/external project + * + * @internal + */ + hasOpenRef() { + var _a; + if (!!this.externalProjectRefCount) { + return true; + } + if (this.isClosed()) { + return false; + } + const configFileExistenceInfo = this.projectService.configFileExistenceInfoCache.get(this.canonicalConfigFilePath); + if (this.projectService.hasPendingProjectUpdate(this)) { + return !!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.size); + } + return !!configFileExistenceInfo.openFilesImpactedByConfigFile && forEachEntry( + configFileExistenceInfo.openFilesImpactedByConfigFile, + (_value, infoPath) => { + const info = this.projectService.getScriptInfoForPath(infoPath); + return this.containsScriptInfo(info) || !!forEachResolvedProjectReferenceProject( + this, + info.path, + (child) => child.containsScriptInfo(info), + 0 /* Find */ + ); + } + ) || false; + } + /** @internal */ + hasExternalProjectRef() { + return !!this.externalProjectRefCount; + } + getEffectiveTypeRoots() { + return getEffectiveTypeRoots(this.getCompilationSettings(), this) || []; + } + /** @internal */ + updateErrorOnNoInputFiles(fileNames) { + updateErrorForNoInputFiles(fileNames, this.getConfigFilePath(), this.getCompilerOptions().configFile.configFileSpecs, this.projectErrors, this.canConfigFileJsonReportNoInputFiles); + } + }; + ExternalProject2 = class extends Project3 { + /** @internal */ + constructor(externalProjectName, projectService, documentRegistry, compilerOptions, lastFileExceededProgramSize, compileOnSaveEnabled, projectFilePath, watchOptions) { + super( + externalProjectName, + 2 /* External */, + projectService, + documentRegistry, + /*hasExplicitListOfFiles*/ + true, + lastFileExceededProgramSize, + compilerOptions, + compileOnSaveEnabled, + watchOptions, + projectService.host, + getDirectoryPath(projectFilePath || normalizeSlashes(externalProjectName)) + ); + this.externalProjectName = externalProjectName; + this.compileOnSaveEnabled = compileOnSaveEnabled; + this.excludedFiles = []; + this.enableGlobalPlugins(this.getCompilerOptions()); + } + updateGraph() { + const result = super.updateGraph(); + this.projectService.sendProjectTelemetry(this); + return result; + } + getExcludedFiles() { + return this.excludedFiles; + } + }; + } + }); + + // src/server/editorServices.ts + function prepareConvertersForEnumLikeCompilerOptions(commandLineOptions) { + const map2 = /* @__PURE__ */ new Map(); + for (const option of commandLineOptions) { + if (typeof option.type === "object") { + const optionMap = option.type; + optionMap.forEach((value) => { + Debug.assert(typeof value === "number"); + }); + map2.set(option.name, optionMap); + } + } + return map2; + } + function convertFormatOptions(protocolOptions) { + if (isString(protocolOptions.indentStyle)) { + protocolOptions.indentStyle = indentStyle.get(protocolOptions.indentStyle.toLowerCase()); + Debug.assert(protocolOptions.indentStyle !== void 0); + } + return protocolOptions; + } + function convertCompilerOptions(protocolOptions) { + compilerOptionConverters.forEach((mappedValues, id) => { + const propertyValue = protocolOptions[id]; + if (isString(propertyValue)) { + protocolOptions[id] = mappedValues.get(propertyValue.toLowerCase()); + } + }); + return protocolOptions; + } + function convertWatchOptions(protocolOptions, currentDirectory) { + let watchOptions; + let errors; + optionsForWatch.forEach((option) => { + const propertyValue = protocolOptions[option.name]; + if (propertyValue === void 0) + return; + const mappedValues = watchOptionsConverters.get(option.name); + (watchOptions || (watchOptions = {}))[option.name] = mappedValues ? isString(propertyValue) ? mappedValues.get(propertyValue.toLowerCase()) : propertyValue : convertJsonOption(option, propertyValue, currentDirectory || "", errors || (errors = [])); + }); + return watchOptions && { watchOptions, errors }; + } + function convertTypeAcquisition(protocolOptions) { + let result; + typeAcquisitionDeclarations.forEach((option) => { + const propertyValue = protocolOptions[option.name]; + if (propertyValue === void 0) + return; + (result || (result = {}))[option.name] = propertyValue; + }); + return result; + } + function tryConvertScriptKindName(scriptKindName) { + return isString(scriptKindName) ? convertScriptKindName(scriptKindName) : scriptKindName; + } + function convertScriptKindName(scriptKindName) { + switch (scriptKindName) { + case "JS": + return 1 /* JS */; + case "JSX": + return 2 /* JSX */; + case "TS": + return 3 /* TS */; + case "TSX": + return 4 /* TSX */; + default: + return 0 /* Unknown */; + } + } + function convertUserPreferences(preferences) { + const { lazyConfiguredProjectsFromExternalProject, ...userPreferences } = preferences; + return userPreferences; + } + function findProjectByName(projectName, projects) { + for (const proj of projects) { + if (proj.getProjectName() === projectName) { + return proj; + } + } + } + function isOpenScriptInfo(infoOrFileNameOrConfig) { + return !!infoOrFileNameOrConfig.containingProjects; + } + function isAncestorConfigFileInfo(infoOrFileNameOrConfig) { + return !!infoOrFileNameOrConfig.configFileInfo; + } + function forEachResolvedProjectReferenceProject(project, fileName, cb, projectReferenceProjectLoadKind, reason) { + var _a; + const resolvedRefs = (_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(); + if (!resolvedRefs) + return void 0; + let seenResolvedRefs; + const possibleDefaultRef = fileName ? project.getResolvedProjectReferenceToRedirect(fileName) : void 0; + if (possibleDefaultRef) { + const configFileName = toNormalizedPath(possibleDefaultRef.sourceFile.fileName); + const child = project.projectService.findConfiguredProjectByProjectName(configFileName); + if (child) { + const result = cb(child); + if (result) + return result; + } else if (projectReferenceProjectLoadKind !== 0 /* Find */) { + seenResolvedRefs = /* @__PURE__ */ new Map(); + const result = forEachResolvedProjectReferenceProjectWorker( + resolvedRefs, + project.getCompilerOptions(), + (ref, loadKind) => possibleDefaultRef === ref ? callback(ref, loadKind) : void 0, + projectReferenceProjectLoadKind, + project.projectService, + seenResolvedRefs + ); + if (result) + return result; + seenResolvedRefs.clear(); + } + } + return forEachResolvedProjectReferenceProjectWorker( + resolvedRefs, + project.getCompilerOptions(), + (ref, loadKind) => possibleDefaultRef !== ref ? callback(ref, loadKind) : void 0, + projectReferenceProjectLoadKind, + project.projectService, + seenResolvedRefs + ); + function callback(ref, loadKind) { + const configFileName = toNormalizedPath(ref.sourceFile.fileName); + const child = project.projectService.findConfiguredProjectByProjectName(configFileName) || (loadKind === 0 /* Find */ ? void 0 : loadKind === 1 /* FindCreate */ ? project.projectService.createConfiguredProject(configFileName) : loadKind === 2 /* FindCreateLoad */ ? project.projectService.createAndLoadConfiguredProject(configFileName, reason) : Debug.assertNever(loadKind)); + return child && cb(child); + } + } + function forEachResolvedProjectReferenceProjectWorker(resolvedProjectReferences, parentOptions, cb, projectReferenceProjectLoadKind, projectService, seenResolvedRefs) { + const loadKind = parentOptions.disableReferencedProjectLoad ? 0 /* Find */ : projectReferenceProjectLoadKind; + return forEach(resolvedProjectReferences, (ref) => { + if (!ref) + return void 0; + const configFileName = toNormalizedPath(ref.sourceFile.fileName); + const canonicalPath = projectService.toCanonicalFileName(configFileName); + const seenValue = seenResolvedRefs == null ? void 0 : seenResolvedRefs.get(canonicalPath); + if (seenValue !== void 0 && seenValue >= loadKind) { + return void 0; + } + const result = cb(ref, loadKind); + if (result) { + return result; + } + (seenResolvedRefs || (seenResolvedRefs = /* @__PURE__ */ new Map())).set(canonicalPath, loadKind); + return ref.references && forEachResolvedProjectReferenceProjectWorker(ref.references, ref.commandLine.options, cb, loadKind, projectService, seenResolvedRefs); + }); + } + function forEachPotentialProjectReference(project, cb) { + return project.potentialProjectReferences && forEachKey(project.potentialProjectReferences, cb); + } + function forEachAnyProjectReferenceKind(project, cb, cbProjectRef, cbPotentialProjectRef) { + return project.getCurrentProgram() ? project.forEachResolvedProjectReference(cb) : project.isInitialLoadPending() ? forEachPotentialProjectReference(project, cbPotentialProjectRef) : forEach(project.getProjectReferences(), cbProjectRef); + } + function callbackRefProject(project, cb, refPath) { + const refProject = refPath && project.projectService.configuredProjects.get(refPath); + return refProject && cb(refProject); + } + function forEachReferencedProject(project, cb) { + return forEachAnyProjectReferenceKind( + project, + (resolvedRef) => callbackRefProject(project, cb, resolvedRef.sourceFile.path), + (projectRef) => callbackRefProject(project, cb, project.toPath(resolveProjectReferencePath(projectRef))), + (potentialProjectRef) => callbackRefProject(project, cb, potentialProjectRef) + ); + } + function getDetailWatchInfo(watchType, project) { + return `${isString(project) ? `Config: ${project} ` : project ? `Project: ${project.getProjectName()} ` : ""}WatchType: ${watchType}`; + } + function isScriptInfoWatchedFromNodeModules(info) { + return !info.isScriptOpen() && info.mTime !== void 0; + } + function projectContainsInfoDirectly(project, info) { + return project.containsScriptInfo(info) && !project.isSourceOfProjectReferenceRedirect(info.path); + } + function updateProjectIfDirty(project) { + project.invalidateResolutionsOfFailedLookupLocations(); + return project.dirty && project.updateGraph(); + } + function setProjectOptionsUsed(project) { + if (isConfiguredProject(project)) { + project.projectOptions = true; + } + } + function createProjectNameFactoryWithCounter(nameFactory) { + let nextId = 1; + return () => nameFactory(nextId++); + } + function getHostWatcherMap() { + return { idToCallbacks: /* @__PURE__ */ new Map(), pathToId: /* @__PURE__ */ new Map() }; + } + function createWatchFactoryHostUsingWatchEvents(service, canUseWatchEvents) { + if (!canUseWatchEvents || !service.eventHandler || !service.session) + return void 0; + const watchedFiles = getHostWatcherMap(); + const watchedDirectories = getHostWatcherMap(); + const watchedDirectoriesRecursive = getHostWatcherMap(); + let ids = 1; + service.session.addProtocolHandler("watchChange" /* WatchChange */, (req) => { + onWatchChange(req.arguments); + return { responseRequired: false }; + }); + return { + watchFile: watchFile2, + watchDirectory, + getCurrentDirectory: () => service.host.getCurrentDirectory(), + useCaseSensitiveFileNames: service.host.useCaseSensitiveFileNames + }; + function watchFile2(path, callback) { + return getOrCreateFileWatcher( + watchedFiles, + path, + callback, + (id) => ({ eventName: CreateFileWatcherEvent, data: { id, path } }) + ); + } + function watchDirectory(path, callback, recursive) { + return getOrCreateFileWatcher( + recursive ? watchedDirectoriesRecursive : watchedDirectories, + path, + callback, + (id) => ({ eventName: CreateDirectoryWatcherEvent, data: { id, path, recursive: !!recursive } }) + ); + } + function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path, callback, event) { + const key = service.toPath(path); + let id = pathToId.get(key); + if (!id) + pathToId.set(key, id = ids++); + let callbacks = idToCallbacks.get(id); + if (!callbacks) { + idToCallbacks.set(id, callbacks = /* @__PURE__ */ new Set()); + service.eventHandler(event(id)); + } + callbacks.add(callback); + return { + close() { + const callbacks2 = idToCallbacks.get(id); + if (!(callbacks2 == null ? void 0 : callbacks2.delete(callback))) + return; + if (callbacks2.size) + return; + idToCallbacks.delete(id); + pathToId.delete(key); + service.eventHandler({ eventName: CloseFileWatcherEvent, data: { id } }); + } + }; + } + function onWatchChange({ id, path, eventType }) { + onFileWatcherCallback(id, path, eventType); + onDirectoryWatcherCallback(watchedDirectories, id, path, eventType); + onDirectoryWatcherCallback(watchedDirectoriesRecursive, id, path, eventType); + } + function onFileWatcherCallback(id, eventPath, eventType) { + var _a; + (_a = watchedFiles.idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => { + const eventKind = eventType === "create" ? 0 /* Created */ : eventType === "delete" ? 2 /* Deleted */ : 1 /* Changed */; + callback(eventPath, eventKind); + }); + } + function onDirectoryWatcherCallback({ idToCallbacks }, id, eventPath, eventType) { + var _a; + if (eventType === "update") + return; + (_a = idToCallbacks.get(id)) == null ? void 0 : _a.forEach((callback) => { + callback(eventPath); + }); + } + } + function createIncompleteCompletionsCache() { + let info; + return { + get() { + return info; + }, + set(newInfo) { + info = newInfo; + }, + clear() { + info = void 0; + } + }; + } + function isConfigFile(config) { + return config.kind !== void 0; + } + function printProjectWithoutFileNames(project) { + project.print( + /*writeProjectFileNames*/ + false, + /*writeFileExplaination*/ + false, + /*writeFileVersionAndText*/ + false + ); + } + var maxProgramSizeForNonTsFiles, maxFileSize, ProjectsUpdatedInBackgroundEvent, ProjectLoadingStartEvent, ProjectLoadingFinishEvent, LargeFileReferencedEvent, ConfigFileDiagEvent, ProjectLanguageServiceStateEvent, ProjectInfoTelemetryEvent, OpenFileInfoTelemetryEvent, CreateFileWatcherEvent, CreateDirectoryWatcherEvent, CloseFileWatcherEvent, ensureProjectForOpenFileSchedule, compilerOptionConverters, watchOptionsConverters, indentStyle, defaultTypeSafeList, fileNamePropertyReader, externalFilePropertyReader, noopConfigFileWatcher, ProjectReferenceProjectLoadKind, _ProjectService, ProjectService3; + var init_editorServices = __esm({ + "src/server/editorServices.ts"() { + "use strict"; + init_ts7(); + init_ts_server3(); + init_protocol(); + maxProgramSizeForNonTsFiles = 20 * 1024 * 1024; + maxFileSize = 4 * 1024 * 1024; + ProjectsUpdatedInBackgroundEvent = "projectsUpdatedInBackground"; + ProjectLoadingStartEvent = "projectLoadingStart"; + ProjectLoadingFinishEvent = "projectLoadingFinish"; + LargeFileReferencedEvent = "largeFileReferenced"; + ConfigFileDiagEvent = "configFileDiag"; + ProjectLanguageServiceStateEvent = "projectLanguageServiceState"; + ProjectInfoTelemetryEvent = "projectInfo"; + OpenFileInfoTelemetryEvent = "openFileInfo"; + CreateFileWatcherEvent = "createFileWatcher"; + CreateDirectoryWatcherEvent = "createDirectoryWatcher"; + CloseFileWatcherEvent = "closeFileWatcher"; + ensureProjectForOpenFileSchedule = "*ensureProjectForOpenFiles*"; + compilerOptionConverters = prepareConvertersForEnumLikeCompilerOptions(optionDeclarations); + watchOptionsConverters = prepareConvertersForEnumLikeCompilerOptions(optionsForWatch); + indentStyle = new Map(Object.entries({ + none: 0 /* None */, + block: 1 /* Block */, + smart: 2 /* Smart */ + })); + defaultTypeSafeList = { + "jquery": { + // jquery files can have names like "jquery-1.10.2.min.js" (or "jquery.intellisense.js") + match: /jquery(-[\d.]+)?(\.intellisense)?(\.min)?\.js$/i, + types: ["jquery"] + }, + "WinJS": { + // e.g. c:/temp/UWApp1/lib/winjs-4.0.1/js/base.js + match: /^(.*\/winjs-[.\d]+)\/js\/base\.js$/i, + // If the winjs/base.js file is found.. + exclude: [["^", 1, "/.*"]], + // ..then exclude all files under the winjs folder + types: ["winjs"] + // And fetch the @types package for WinJS + }, + "Kendo": { + // e.g. /Kendo3/wwwroot/lib/kendo/kendo.all.min.js + match: /^(.*\/kendo(-ui)?)\/kendo\.all(\.min)?\.js$/i, + exclude: [["^", 1, "/.*"]], + types: ["kendo-ui"] + }, + "Office Nuget": { + // e.g. /scripts/Office/1/excel-15.debug.js + match: /^(.*\/office\/1)\/excel-\d+\.debug\.js$/i, + // Office NuGet package is installed under a "1/office" folder + exclude: [["^", 1, "/.*"]], + // Exclude that whole folder if the file indicated above is found in it + types: ["office"] + // @types package to fetch instead + }, + "References": { + match: /^(.*\/_references\.js)$/i, + exclude: [["^", 1, "$"]] + } + }; + fileNamePropertyReader = { + getFileName: (x) => x, + getScriptKind: (fileName, extraFileExtensions) => { + let result; + if (extraFileExtensions) { + const fileExtension = getAnyExtensionFromPath(fileName); + if (fileExtension) { + some(extraFileExtensions, (info) => { + if (info.extension === fileExtension) { + result = info.scriptKind; + return true; + } + return false; + }); + } + } + return result; + }, + hasMixedContent: (fileName, extraFileExtensions) => some(extraFileExtensions, (ext) => ext.isMixedContent && fileExtensionIs(fileName, ext.extension)) + }; + externalFilePropertyReader = { + getFileName: (x) => x.fileName, + getScriptKind: (x) => tryConvertScriptKindName(x.scriptKind), + // TODO: GH#18217 + hasMixedContent: (x) => !!x.hasMixedContent + }; + noopConfigFileWatcher = { close: noop }; + ProjectReferenceProjectLoadKind = /* @__PURE__ */ ((ProjectReferenceProjectLoadKind2) => { + ProjectReferenceProjectLoadKind2[ProjectReferenceProjectLoadKind2["Find"] = 0] = "Find"; + ProjectReferenceProjectLoadKind2[ProjectReferenceProjectLoadKind2["FindCreate"] = 1] = "FindCreate"; + ProjectReferenceProjectLoadKind2[ProjectReferenceProjectLoadKind2["FindCreateLoad"] = 2] = "FindCreateLoad"; + return ProjectReferenceProjectLoadKind2; + })(ProjectReferenceProjectLoadKind || {}); + _ProjectService = class _ProjectService { + constructor(opts) { + /** + * Container of all known scripts + * + * @internal + */ + this.filenameToScriptInfo = /* @__PURE__ */ new Map(); + this.nodeModulesWatchers = /* @__PURE__ */ new Map(); + /** + * Contains all the deleted script info's version information so that + * it does not reset when creating script info again + * (and could have potentially collided with version where contents mismatch) + */ + this.filenameToScriptInfoVersion = /* @__PURE__ */ new Map(); + // Set of all '.js' files ever opened. + this.allJsFilesForOpenFileTelemetry = /* @__PURE__ */ new Map(); + /** + * maps external project file name to list of config files that were the part of this project + */ + this.externalProjectToConfiguredProjectMap = /* @__PURE__ */ new Map(); + /** + * external projects (configuration and list of root files is not controlled by tsserver) + */ + this.externalProjects = []; + /** + * projects built from openFileRoots + */ + this.inferredProjects = []; + /** + * projects specified by a tsconfig.json file + */ + this.configuredProjects = /* @__PURE__ */ new Map(); + /** @internal */ + this.newInferredProjectName = createProjectNameFactoryWithCounter(makeInferredProjectName); + /** @internal */ + this.newAutoImportProviderProjectName = createProjectNameFactoryWithCounter(makeAutoImportProviderProjectName); + /** @internal */ + this.newAuxiliaryProjectName = createProjectNameFactoryWithCounter(makeAuxiliaryProjectName); + /** + * Open files: with value being project root path, and key being Path of the file that is open + */ + this.openFiles = /* @__PURE__ */ new Map(); + /** @internal */ + this.configFileForOpenFiles = /* @__PURE__ */ new Map(); + /** + * Map of open files that are opened without complete path but have projectRoot as current directory + */ + this.openFilesWithNonRootedDiskPath = /* @__PURE__ */ new Map(); + this.compilerOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(); + this.watchOptionsForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(); + this.typeAcquisitionForInferredProjectsPerProjectRoot = /* @__PURE__ */ new Map(); + /** + * Project size for configured or external projects + */ + this.projectToSizeMap = /* @__PURE__ */ new Map(); + /** + * This is a map of config file paths existence that doesnt need query to disk + * - The entry can be present because there is inferred project that needs to watch addition of config file to directory + * In this case the exists could be true/false based on config file is present or not + * - Or it is present if we have configured project open with config file at that location + * In this case the exists property is always true + * + * @internal + */ + this.configFileExistenceInfoCache = /* @__PURE__ */ new Map(); + this.safelist = defaultTypeSafeList; + this.legacySafelist = /* @__PURE__ */ new Map(); + this.pendingProjectUpdates = /* @__PURE__ */ new Map(); + /** @internal */ + this.pendingEnsureProjectForOpenFiles = false; + /** Tracks projects that we have already sent telemetry for. */ + this.seenProjects = /* @__PURE__ */ new Map(); + /** @internal */ + this.sharedExtendedConfigFileWatchers = /* @__PURE__ */ new Map(); + /** @internal */ + this.extendedConfigCache = /* @__PURE__ */ new Map(); + /** @internal */ + this.verifyDocumentRegistry = noop; + /** @internal */ + this.verifyProgram = noop; + /** @internal */ + this.onProjectCreation = noop; + var _a; + this.host = opts.host; + this.logger = opts.logger; + this.cancellationToken = opts.cancellationToken; + this.useSingleInferredProject = opts.useSingleInferredProject; + this.useInferredProjectPerProjectRoot = opts.useInferredProjectPerProjectRoot; + this.typingsInstaller = opts.typingsInstaller || nullTypingsInstaller; + this.throttleWaitMilliseconds = opts.throttleWaitMilliseconds; + this.eventHandler = opts.eventHandler; + this.suppressDiagnosticEvents = opts.suppressDiagnosticEvents; + this.globalPlugins = opts.globalPlugins || emptyArray2; + this.pluginProbeLocations = opts.pluginProbeLocations || emptyArray2; + this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads; + this.typesMapLocation = opts.typesMapLocation === void 0 ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation; + this.session = opts.session; + this.jsDocParsingMode = opts.jsDocParsingMode; + if (opts.serverMode !== void 0) { + this.serverMode = opts.serverMode; + } else { + this.serverMode = 0 /* Semantic */; + } + if (this.host.realpath) { + this.realpathToScriptInfos = createMultiMap(); + } + this.currentDirectory = toNormalizedPath(this.host.getCurrentDirectory()); + this.toCanonicalFileName = createGetCanonicalFileName(this.host.useCaseSensitiveFileNames); + this.globalCacheLocationDirectoryPath = this.typingsInstaller.globalTypingsCacheLocation ? ensureTrailingDirectorySeparator(this.toPath(this.typingsInstaller.globalTypingsCacheLocation)) : void 0; + this.throttledOperations = new ThrottledOperations(this.host, this.logger); + if (this.typesMapLocation) { + this.loadTypesMap(); + } else { + this.logger.info("No types map provided; using the default"); + } + this.typingsInstaller.attach(this); + this.typingsCache = new TypingsCache(this.typingsInstaller); + this.hostConfiguration = { + formatCodeOptions: getDefaultFormatCodeSettings(this.host.newLine), + preferences: emptyOptions, + hostInfo: "Unknown host", + extraFileExtensions: [] + }; + this.documentRegistry = createDocumentRegistryInternal(this.host.useCaseSensitiveFileNames, this.currentDirectory, this.jsDocParsingMode, this); + const watchLogLevel = this.logger.hasLevel(3 /* verbose */) ? 2 /* Verbose */ : this.logger.loggingEnabled() ? 1 /* TriggerOnly */ : 0 /* None */; + const log = watchLogLevel !== 0 /* None */ ? (s) => this.logger.info(s) : noop; + this.packageJsonCache = createPackageJsonCache(this); + this.watchFactory = this.serverMode !== 0 /* Semantic */ ? { + watchFile: returnNoopFileWatcher, + watchDirectory: returnNoopFileWatcher + } : getWatchFactory( + createWatchFactoryHostUsingWatchEvents(this, opts.canUseWatchEvents) || this.host, + watchLogLevel, + log, + getDetailWatchInfo + ); + (_a = opts.incrementalVerifier) == null ? void 0 : _a.call(opts, this); + } + toPath(fileName) { + return toPath(fileName, this.currentDirectory, this.toCanonicalFileName); + } + /** @internal */ + getExecutingFilePath() { + return this.getNormalizedAbsolutePath(this.host.getExecutingFilePath()); + } + /** @internal */ + getNormalizedAbsolutePath(fileName) { + return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory()); + } + /** @internal */ + setDocument(key, path, sourceFile) { + const info = Debug.checkDefined(this.getScriptInfoForPath(path)); + info.cacheSourceFile = { key, sourceFile }; + } + /** @internal */ + getDocument(key, path) { + const info = this.getScriptInfoForPath(path); + return info && info.cacheSourceFile && info.cacheSourceFile.key === key ? info.cacheSourceFile.sourceFile : void 0; + } + /** @internal */ + ensureInferredProjectsUpToDate_TestOnly() { + this.ensureProjectStructuresUptoDate(); + } + /** @internal */ + getCompilerOptionsForInferredProjects() { + return this.compilerOptionsForInferredProjects; + } + /** @internal */ + onUpdateLanguageServiceStateForProject(project, languageServiceEnabled) { + if (!this.eventHandler) { + return; + } + const event = { + eventName: ProjectLanguageServiceStateEvent, + data: { project, languageServiceEnabled } + }; + this.eventHandler(event); + } + loadTypesMap() { + try { + const fileContent = this.host.readFile(this.typesMapLocation); + if (fileContent === void 0) { + this.logger.info(`Provided types map file "${this.typesMapLocation}" doesn't exist`); + return; + } + const raw = JSON.parse(fileContent); + for (const k of Object.keys(raw.typesMap)) { + raw.typesMap[k].match = new RegExp(raw.typesMap[k].match, "i"); + } + this.safelist = raw.typesMap; + for (const key in raw.simpleMap) { + if (hasProperty(raw.simpleMap, key)) { + this.legacySafelist.set(key, raw.simpleMap[key].toLowerCase()); + } + } + } catch (e) { + this.logger.info(`Error loading types map: ${e}`); + this.safelist = defaultTypeSafeList; + this.legacySafelist.clear(); + } + } + // eslint-disable-line @typescript-eslint/unified-signatures + updateTypingsForProject(response) { + const project = this.findProject(response.projectName); + if (!project) { + return; + } + switch (response.kind) { + case ActionSet: + project.updateTypingFiles(this.typingsCache.updateTypingsForProject(response.projectName, response.compilerOptions, response.typeAcquisition, response.unresolvedImports, response.typings)); + return; + case ActionInvalidate: + this.typingsCache.enqueueInstallTypingsForProject( + project, + project.lastCachedUnresolvedImportsList, + /*forceRefresh*/ + true + ); + return; + } + } + /** @internal */ + watchTypingLocations(response) { + var _a; + (_a = this.findProject(response.projectName)) == null ? void 0 : _a.watchTypingLocations(response.files); + } + /** @internal */ + delayEnsureProjectForOpenFiles() { + if (!this.openFiles.size) + return; + this.pendingEnsureProjectForOpenFiles = true; + this.throttledOperations.schedule( + ensureProjectForOpenFileSchedule, + /*delay*/ + 2500, + () => { + if (this.pendingProjectUpdates.size !== 0) { + this.delayEnsureProjectForOpenFiles(); + } else { + if (this.pendingEnsureProjectForOpenFiles) { + this.ensureProjectForOpenFiles(); + this.sendProjectsUpdatedInBackgroundEvent(); + } + } + } + ); + } + delayUpdateProjectGraph(project) { + project.markAsDirty(); + if (isBackgroundProject(project)) + return; + const projectName = project.getProjectName(); + this.pendingProjectUpdates.set(projectName, project); + this.throttledOperations.schedule( + projectName, + /*delay*/ + 250, + () => { + if (this.pendingProjectUpdates.delete(projectName)) { + updateProjectIfDirty(project); + } + } + ); + } + /** @internal */ + hasPendingProjectUpdate(project) { + return this.pendingProjectUpdates.has(project.getProjectName()); + } + /** @internal */ + sendProjectsUpdatedInBackgroundEvent() { + if (!this.eventHandler) { + return; + } + const event = { + eventName: ProjectsUpdatedInBackgroundEvent, + data: { + openFiles: arrayFrom(this.openFiles.keys(), (path) => this.getScriptInfoForPath(path).fileName) + } + }; + this.eventHandler(event); + } + /** @internal */ + sendLargeFileReferencedEvent(file, fileSize) { + if (!this.eventHandler) { + return; + } + const event = { + eventName: LargeFileReferencedEvent, + data: { file, fileSize, maxFileSize } + }; + this.eventHandler(event); + } + /** @internal */ + sendProjectLoadingStartEvent(project, reason) { + if (!this.eventHandler) { + return; + } + project.sendLoadingProjectFinish = true; + const event = { + eventName: ProjectLoadingStartEvent, + data: { project, reason } + }; + this.eventHandler(event); + } + /** @internal */ + sendProjectLoadingFinishEvent(project) { + if (!this.eventHandler || !project.sendLoadingProjectFinish) { + return; + } + project.sendLoadingProjectFinish = false; + const event = { + eventName: ProjectLoadingFinishEvent, + data: { project } + }; + this.eventHandler(event); + } + /** @internal */ + sendPerformanceEvent(kind, durationMs) { + if (this.performanceEventHandler) { + this.performanceEventHandler({ kind, durationMs }); + } + } + /** @internal */ + delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project) { + this.delayUpdateProjectGraph(project); + this.delayEnsureProjectForOpenFiles(); + } + delayUpdateProjectGraphs(projects, clearSourceMapperCache) { + if (projects.length) { + for (const project of projects) { + if (clearSourceMapperCache) + project.clearSourceMapperCache(); + this.delayUpdateProjectGraph(project); + } + this.delayEnsureProjectForOpenFiles(); + } + } + setCompilerOptionsForInferredProjects(projectCompilerOptions, projectRootPath) { + Debug.assert(projectRootPath === void 0 || this.useInferredProjectPerProjectRoot, "Setting compiler options per project root path is only supported when useInferredProjectPerProjectRoot is enabled"); + const compilerOptions = convertCompilerOptions(projectCompilerOptions); + const watchOptions = convertWatchOptions(projectCompilerOptions, projectRootPath); + const typeAcquisition = convertTypeAcquisition(projectCompilerOptions); + compilerOptions.allowNonTsExtensions = true; + const canonicalProjectRootPath = projectRootPath && this.toCanonicalFileName(projectRootPath); + if (canonicalProjectRootPath) { + this.compilerOptionsForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, compilerOptions); + this.watchOptionsForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, watchOptions || false); + this.typeAcquisitionForInferredProjectsPerProjectRoot.set(canonicalProjectRootPath, typeAcquisition); + } else { + this.compilerOptionsForInferredProjects = compilerOptions; + this.watchOptionsForInferredProjects = watchOptions; + this.typeAcquisitionForInferredProjects = typeAcquisition; + } + for (const project of this.inferredProjects) { + if (canonicalProjectRootPath ? project.projectRootPath === canonicalProjectRootPath : !project.projectRootPath || !this.compilerOptionsForInferredProjectsPerProjectRoot.has(project.projectRootPath)) { + project.setCompilerOptions(compilerOptions); + project.setTypeAcquisition(typeAcquisition); + project.setWatchOptions(watchOptions == null ? void 0 : watchOptions.watchOptions); + project.setProjectErrors(watchOptions == null ? void 0 : watchOptions.errors); + project.compileOnSaveEnabled = compilerOptions.compileOnSave; + project.markAsDirty(); + this.delayUpdateProjectGraph(project); + } + } + this.delayEnsureProjectForOpenFiles(); + } + findProject(projectName) { + if (projectName === void 0) { + return void 0; + } + if (isInferredProjectName(projectName)) { + return findProjectByName(projectName, this.inferredProjects); + } + return this.findExternalProjectByProjectName(projectName) || this.findConfiguredProjectByProjectName(toNormalizedPath(projectName)); + } + /** @internal */ + forEachProject(cb) { + this.externalProjects.forEach(cb); + this.configuredProjects.forEach(cb); + this.inferredProjects.forEach(cb); + } + /** @internal */ + forEachEnabledProject(cb) { + this.forEachProject((project) => { + if (!project.isOrphan() && project.languageServiceEnabled) { + cb(project); + } + }); + } + getDefaultProjectForFile(fileName, ensureProject) { + return ensureProject ? this.ensureDefaultProjectForFile(fileName) : this.tryGetDefaultProjectForFile(fileName); + } + /** @internal */ + tryGetDefaultProjectForFile(fileNameOrScriptInfo) { + const scriptInfo = isString(fileNameOrScriptInfo) ? this.getScriptInfoForNormalizedPath(fileNameOrScriptInfo) : fileNameOrScriptInfo; + return scriptInfo && !scriptInfo.isOrphan() ? scriptInfo.getDefaultProject() : void 0; + } + /** @internal */ + ensureDefaultProjectForFile(fileNameOrScriptInfo) { + return this.tryGetDefaultProjectForFile(fileNameOrScriptInfo) || this.doEnsureDefaultProjectForFile(fileNameOrScriptInfo); + } + doEnsureDefaultProjectForFile(fileNameOrScriptInfo) { + this.ensureProjectStructuresUptoDate(); + const scriptInfo = isString(fileNameOrScriptInfo) ? this.getScriptInfoForNormalizedPath(fileNameOrScriptInfo) : fileNameOrScriptInfo; + return scriptInfo ? scriptInfo.getDefaultProject() : (this.logErrorForScriptInfoNotFound(isString(fileNameOrScriptInfo) ? fileNameOrScriptInfo : fileNameOrScriptInfo.fileName), Errors.ThrowNoProject()); + } + getScriptInfoEnsuringProjectsUptoDate(uncheckedFileName) { + this.ensureProjectStructuresUptoDate(); + return this.getScriptInfo(uncheckedFileName); + } + /** + * Ensures the project structures are upto date + * This means, + * - we go through all the projects and update them if they are dirty + * - if updates reflect some change in structure or there was pending request to ensure projects for open files + * ensure that each open script info has project + */ + ensureProjectStructuresUptoDate() { + let hasChanges = this.pendingEnsureProjectForOpenFiles; + this.pendingProjectUpdates.clear(); + const updateGraph = (project) => { + hasChanges = updateProjectIfDirty(project) || hasChanges; + }; + this.externalProjects.forEach(updateGraph); + this.configuredProjects.forEach(updateGraph); + this.inferredProjects.forEach(updateGraph); + if (hasChanges) { + this.ensureProjectForOpenFiles(); + } + } + getFormatCodeOptions(file) { + const info = this.getScriptInfoForNormalizedPath(file); + return info && info.getFormatCodeSettings() || this.hostConfiguration.formatCodeOptions; + } + getPreferences(file) { + const info = this.getScriptInfoForNormalizedPath(file); + return { ...this.hostConfiguration.preferences, ...info && info.getPreferences() }; + } + getHostFormatCodeOptions() { + return this.hostConfiguration.formatCodeOptions; + } + getHostPreferences() { + return this.hostConfiguration.preferences; + } + onSourceFileChanged(info, eventKind) { + if (eventKind === 2 /* Deleted */) { + this.handleDeletedFile(info); + } else if (!info.isScriptOpen()) { + info.delayReloadNonMixedContentFile(); + this.delayUpdateProjectGraphs( + info.containingProjects, + /*clearSourceMapperCache*/ + false + ); + this.handleSourceMapProjects(info); + } + } + handleSourceMapProjects(info) { + if (info.sourceMapFilePath) { + if (isString(info.sourceMapFilePath)) { + const sourceMapFileInfo = this.getScriptInfoForPath(info.sourceMapFilePath); + this.delayUpdateSourceInfoProjects(sourceMapFileInfo && sourceMapFileInfo.sourceInfos); + } else { + this.delayUpdateSourceInfoProjects(info.sourceMapFilePath.sourceInfos); + } + } + this.delayUpdateSourceInfoProjects(info.sourceInfos); + if (info.declarationInfoPath) { + this.delayUpdateProjectsOfScriptInfoPath(info.declarationInfoPath); + } + } + delayUpdateSourceInfoProjects(sourceInfos) { + if (sourceInfos) { + sourceInfos.forEach((_value, path) => this.delayUpdateProjectsOfScriptInfoPath(path)); + } + } + delayUpdateProjectsOfScriptInfoPath(path) { + const info = this.getScriptInfoForPath(path); + if (info) { + this.delayUpdateProjectGraphs( + info.containingProjects, + /*clearSourceMapperCache*/ + true + ); + } + } + handleDeletedFile(info) { + this.stopWatchingScriptInfo(info); + if (!info.isScriptOpen()) { + this.deleteScriptInfo(info); + const containingProjects = info.containingProjects.slice(); + info.detachAllProjects(); + this.delayUpdateProjectGraphs( + containingProjects, + /*clearSourceMapperCache*/ + false + ); + this.handleSourceMapProjects(info); + info.closeSourceMapFileWatcher(); + if (info.declarationInfoPath) { + const declarationInfo = this.getScriptInfoForPath(info.declarationInfoPath); + if (declarationInfo) { + declarationInfo.sourceMapFilePath = void 0; + } + } + } + } + /** + * This is to watch whenever files are added or removed to the wildcard directories + * + * @internal + */ + watchWildcardDirectory(directory, flags, configFileName, config) { + return this.watchFactory.watchDirectory( + directory, + (fileOrDirectory) => { + const fileOrDirectoryPath = this.toPath(fileOrDirectory); + const fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath); + if (getBaseFileName(fileOrDirectoryPath) === "package.json" && !isInsideNodeModules(fileOrDirectoryPath) && (fsResult && fsResult.fileExists || !fsResult && this.host.fileExists(fileOrDirectoryPath))) { + this.logger.info(`Config: ${configFileName} Detected new package.json: ${fileOrDirectory}`); + this.onAddPackageJson(fileOrDirectoryPath); + } + const configuredProjectForConfig = this.findConfiguredProjectByProjectName(configFileName); + if (isIgnoredFileFromWildCardWatching({ + watchedDirPath: directory, + fileOrDirectory, + fileOrDirectoryPath, + configFileName, + extraFileExtensions: this.hostConfiguration.extraFileExtensions, + currentDirectory: this.currentDirectory, + options: config.parsedCommandLine.options, + program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames, + useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames, + writeLog: (s) => this.logger.info(s), + toPath: (s) => this.toPath(s), + getScriptKind: configuredProjectForConfig ? (fileName) => configuredProjectForConfig.getScriptKind(fileName) : void 0 + })) + return; + if (config.updateLevel !== 2 /* Full */) + config.updateLevel = 1 /* RootNamesAndUpdate */; + config.projects.forEach((watchWildcardDirectories, projectCanonicalPath) => { + if (!watchWildcardDirectories) + return; + const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath); + if (!project) + return; + const updateLevel = configuredProjectForConfig === project ? 1 /* RootNamesAndUpdate */ : 0 /* Update */; + if (project.pendingUpdateLevel !== void 0 && project.pendingUpdateLevel > updateLevel) + return; + if (this.openFiles.has(fileOrDirectoryPath)) { + const info = Debug.checkDefined(this.getScriptInfoForPath(fileOrDirectoryPath)); + if (info.isAttached(project)) { + const loadLevelToSet = Math.max(updateLevel, project.openFileWatchTriggered.get(fileOrDirectoryPath) || 0 /* Update */); + project.openFileWatchTriggered.set(fileOrDirectoryPath, loadLevelToSet); + } else { + project.pendingUpdateLevel = updateLevel; + this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); + } + } else { + project.pendingUpdateLevel = updateLevel; + this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); + } + }); + }, + flags, + this.getWatchOptionsFromProjectWatchOptions(config.parsedCommandLine.watchOptions), + WatchType.WildcardDirectory, + configFileName + ); + } + /** @internal */ + delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, loadReason) { + const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (!(configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config)) + return false; + let scheduledAnyProjectUpdate = false; + configFileExistenceInfo.config.updateLevel = 2 /* Full */; + configFileExistenceInfo.config.projects.forEach((_watchWildcardDirectories, projectCanonicalPath) => { + const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath); + if (!project) + return; + scheduledAnyProjectUpdate = true; + if (projectCanonicalPath === canonicalConfigFilePath) { + if (project.isInitialLoadPending()) + return; + project.pendingUpdateLevel = 2 /* Full */; + project.pendingUpdateReason = loadReason; + this.delayUpdateProjectGraph(project); + } else { + project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(this.toPath(canonicalConfigFilePath)); + this.delayUpdateProjectGraph(project); + } + }); + return scheduledAnyProjectUpdate; + } + /** @internal */ + onConfigFileChanged(canonicalConfigFilePath, eventKind) { + var _a; + const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (eventKind === 2 /* Deleted */) { + configFileExistenceInfo.exists = false; + const project = ((_a = configFileExistenceInfo.config) == null ? void 0 : _a.projects.has(canonicalConfigFilePath)) ? this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath) : void 0; + if (project) + this.removeProject(project); + } else { + configFileExistenceInfo.exists = true; + } + this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, "Change in config file detected"); + this.reloadConfiguredProjectForFiles( + configFileExistenceInfo.openFilesImpactedByConfigFile, + /*clearSemanticCache*/ + false, + /*delayReload*/ + true, + eventKind !== 2 /* Deleted */ ? identity : ( + // Reload open files if they are root of inferred project + returnTrue + ), + // Reload all the open files impacted by config file + "Change in config file detected" + ); + this.delayEnsureProjectForOpenFiles(); + } + removeProject(project) { + this.logger.info("`remove Project::"); + project.print( + /*writeProjectFileNames*/ + true, + /*writeFileExplaination*/ + true, + /*writeFileVersionAndText*/ + false + ); + project.close(); + if (Debug.shouldAssert(1 /* Normal */)) { + this.filenameToScriptInfo.forEach( + (info) => Debug.assert( + !info.isAttached(project), + "Found script Info still attached to project", + () => `${project.projectName}: ScriptInfos still attached: ${JSON.stringify( + arrayFrom( + mapDefinedIterator( + this.filenameToScriptInfo.values(), + (info2) => info2.isAttached(project) ? { + fileName: info2.fileName, + projects: info2.containingProjects.map((p) => p.projectName), + hasMixedContent: info2.hasMixedContent + } : void 0 + ) + ), + /*replacer*/ + void 0, + " " + )}` + ) + ); + } + this.pendingProjectUpdates.delete(project.getProjectName()); + switch (project.projectKind) { + case 2 /* External */: + unorderedRemoveItem(this.externalProjects, project); + this.projectToSizeMap.delete(project.getProjectName()); + break; + case 1 /* Configured */: + this.configuredProjects.delete(project.canonicalConfigFilePath); + this.projectToSizeMap.delete(project.canonicalConfigFilePath); + break; + case 0 /* Inferred */: + unorderedRemoveItem(this.inferredProjects, project); + break; + } + } + /** @internal */ + assignOrphanScriptInfoToInferredProject(info, projectRootPath) { + Debug.assert(info.isOrphan()); + const project = this.getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) || this.getOrCreateSingleInferredProjectIfEnabled() || this.getOrCreateSingleInferredWithoutProjectRoot( + info.isDynamic ? projectRootPath || this.currentDirectory : getDirectoryPath( + isRootedDiskPath(info.fileName) ? info.fileName : getNormalizedAbsolutePath( + info.fileName, + projectRootPath ? this.getNormalizedAbsolutePath(projectRootPath) : this.currentDirectory + ) + ) + ); + project.addRoot(info); + if (info.containingProjects[0] !== project) { + info.detachFromProject(project); + info.containingProjects.unshift(project); + } + project.updateGraph(); + if (!this.useSingleInferredProject && !project.projectRootPath) { + for (const inferredProject of this.inferredProjects) { + if (inferredProject === project || inferredProject.isOrphan()) { + continue; + } + const roots = inferredProject.getRootScriptInfos(); + Debug.assert(roots.length === 1 || !!inferredProject.projectRootPath); + if (roots.length === 1 && forEach(roots[0].containingProjects, (p) => p !== roots[0].containingProjects[0] && !p.isOrphan())) { + inferredProject.removeFile( + roots[0], + /*fileExists*/ + true, + /*detachFromProject*/ + true + ); + } + } + } + return project; + } + assignOrphanScriptInfosToInferredProject() { + this.openFiles.forEach((projectRootPath, path) => { + const info = this.getScriptInfoForPath(path); + if (info.isOrphan()) { + this.assignOrphanScriptInfoToInferredProject(info, projectRootPath); + } + }); + } + /** + * Remove this file from the set of open, non-configured files. + * @param info The file that has been closed or newly configured + */ + closeOpenFile(info, skipAssignOrphanScriptInfosToInferredProject) { + const fileExists = info.isDynamic ? false : this.host.fileExists(info.fileName); + info.close(fileExists); + this.stopWatchingConfigFilesForClosedScriptInfo(info); + const canonicalFileName = this.toCanonicalFileName(info.fileName); + if (this.openFilesWithNonRootedDiskPath.get(canonicalFileName) === info) { + this.openFilesWithNonRootedDiskPath.delete(canonicalFileName); + } + let ensureProjectsForOpenFiles = false; + for (const p of info.containingProjects) { + if (isConfiguredProject(p)) { + if (info.hasMixedContent) { + info.registerFileUpdate(); + } + const updateLevel = p.openFileWatchTriggered.get(info.path); + if (updateLevel !== void 0) { + p.openFileWatchTriggered.delete(info.path); + if (p.pendingUpdateLevel !== void 0 && p.pendingUpdateLevel < updateLevel) { + p.pendingUpdateLevel = updateLevel; + p.markFileAsDirty(info.path); + } + } + } else if (isInferredProject(p) && p.isRoot(info)) { + if (p.isProjectWithSingleRoot()) { + ensureProjectsForOpenFiles = true; + } + p.removeFile( + info, + fileExists, + /*detachFromProject*/ + true + ); + } + if (!p.languageServiceEnabled) { + p.markAsDirty(); + } + } + this.openFiles.delete(info.path); + this.configFileForOpenFiles.delete(info.path); + if (!skipAssignOrphanScriptInfosToInferredProject && ensureProjectsForOpenFiles) { + this.assignOrphanScriptInfosToInferredProject(); + } + if (fileExists) { + this.watchClosedScriptInfo(info); + } else { + this.handleDeletedFile(info); + } + return ensureProjectsForOpenFiles; + } + deleteScriptInfo(info) { + this.filenameToScriptInfo.delete(info.path); + this.filenameToScriptInfoVersion.set(info.path, info.textStorage.version); + const realpath = info.getRealpathIfDifferent(); + if (realpath) { + this.realpathToScriptInfos.remove(realpath, info); + } + } + configFileExists(configFileName, canonicalConfigFilePath, info) { + var _a; + let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (configFileExistenceInfo) { + if (isOpenScriptInfo(info) && !((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(info.path))) { + (configFileExistenceInfo.openFilesImpactedByConfigFile || (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Map())).set(info.path, false); + } + return configFileExistenceInfo.exists; + } + const exists = this.host.fileExists(configFileName); + let openFilesImpactedByConfigFile; + if (isOpenScriptInfo(info)) { + (openFilesImpactedByConfigFile || (openFilesImpactedByConfigFile = /* @__PURE__ */ new Map())).set(info.path, false); + } + configFileExistenceInfo = { exists, openFilesImpactedByConfigFile }; + this.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo); + return exists; + } + /** @internal */ + createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, forProject) { + var _a, _b; + const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (!configFileExistenceInfo.watcher || configFileExistenceInfo.watcher === noopConfigFileWatcher) { + configFileExistenceInfo.watcher = this.watchFactory.watchFile( + configFileName, + (_fileName, eventKind) => this.onConfigFileChanged(canonicalConfigFilePath, eventKind), + 2e3 /* High */, + this.getWatchOptionsFromProjectWatchOptions((_b = (_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.config) == null ? void 0 : _a.parsedCommandLine) == null ? void 0 : _b.watchOptions), + WatchType.ConfigFile, + forProject + ); + } + const projects = configFileExistenceInfo.config.projects; + projects.set(forProject.canonicalConfigFilePath, projects.get(forProject.canonicalConfigFilePath) || false); + } + /** + * Returns true if the configFileExistenceInfo is needed/impacted by open files that are root of inferred project + */ + configFileExistenceImpactsRootOfInferredProject(configFileExistenceInfo) { + return configFileExistenceInfo.openFilesImpactedByConfigFile && forEachEntry(configFileExistenceInfo.openFilesImpactedByConfigFile, identity); + } + /** @internal */ + releaseParsedConfig(canonicalConfigFilePath, forProject) { + var _a, _b, _c; + const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (!((_a = configFileExistenceInfo.config) == null ? void 0 : _a.projects.delete(forProject.canonicalConfigFilePath))) + return; + if ((_b = configFileExistenceInfo.config) == null ? void 0 : _b.projects.size) + return; + configFileExistenceInfo.config = void 0; + clearSharedExtendedConfigFileWatcher(canonicalConfigFilePath, this.sharedExtendedConfigFileWatchers); + Debug.checkDefined(configFileExistenceInfo.watcher); + if ((_c = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _c.size) { + if (this.configFileExistenceImpactsRootOfInferredProject(configFileExistenceInfo)) { + if (!canWatchDirectoryOrFile(getPathComponents(getDirectoryPath(canonicalConfigFilePath)))) { + configFileExistenceInfo.watcher.close(); + configFileExistenceInfo.watcher = noopConfigFileWatcher; + } + } else { + configFileExistenceInfo.watcher.close(); + configFileExistenceInfo.watcher = void 0; + } + } else { + configFileExistenceInfo.watcher.close(); + this.configFileExistenceInfoCache.delete(canonicalConfigFilePath); + } + } + /** + * Close the config file watcher in the cached ConfigFileExistenceInfo + * if there arent any open files that are root of inferred project and there is no parsed config held by any project + * + * @internal + */ + closeConfigFileWatcherOnReleaseOfOpenFile(configFileExistenceInfo) { + if (configFileExistenceInfo.watcher && !configFileExistenceInfo.config && !this.configFileExistenceImpactsRootOfInferredProject(configFileExistenceInfo)) { + configFileExistenceInfo.watcher.close(); + configFileExistenceInfo.watcher = void 0; + } + } + /** + * This is called on file close, so that we stop watching the config file for this script info + */ + stopWatchingConfigFilesForClosedScriptInfo(info) { + Debug.assert(!info.isScriptOpen()); + this.forEachConfigFileLocation(info, (canonicalConfigFilePath) => { + var _a, _b, _c; + const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (configFileExistenceInfo) { + const infoIsRootOfInferredProject = (_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.get(info.path); + (_b = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _b.delete(info.path); + if (infoIsRootOfInferredProject) { + this.closeConfigFileWatcherOnReleaseOfOpenFile(configFileExistenceInfo); + } + if (!((_c = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _c.size) && !configFileExistenceInfo.config) { + Debug.assert(!configFileExistenceInfo.watcher); + this.configFileExistenceInfoCache.delete(canonicalConfigFilePath); + } + } + }); + } + /** + * This is called by inferred project whenever script info is added as a root + * + * @internal + */ + startWatchingConfigFilesForInferredProjectRoot(info) { + Debug.assert(info.isScriptOpen()); + this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName) => { + let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (!configFileExistenceInfo) { + configFileExistenceInfo = { exists: this.host.fileExists(configFileName) }; + this.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo); + } + (configFileExistenceInfo.openFilesImpactedByConfigFile || (configFileExistenceInfo.openFilesImpactedByConfigFile = /* @__PURE__ */ new Map())).set(info.path, true); + configFileExistenceInfo.watcher || (configFileExistenceInfo.watcher = canWatchDirectoryOrFile(getPathComponents(getDirectoryPath(canonicalConfigFilePath))) ? this.watchFactory.watchFile( + configFileName, + (_filename, eventKind) => this.onConfigFileChanged(canonicalConfigFilePath, eventKind), + 2e3 /* High */, + this.hostConfiguration.watchOptions, + WatchType.ConfigFileForInferredRoot + ) : noopConfigFileWatcher); + }); + } + /** + * This is called by inferred project whenever root script info is removed from it + * + * @internal + */ + stopWatchingConfigFilesForInferredProjectRoot(info) { + this.forEachConfigFileLocation(info, (canonicalConfigFilePath) => { + var _a; + const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if ((_a = configFileExistenceInfo == null ? void 0 : configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(info.path)) { + Debug.assert(info.isScriptOpen()); + configFileExistenceInfo.openFilesImpactedByConfigFile.set(info.path, false); + this.closeConfigFileWatcherOnReleaseOfOpenFile(configFileExistenceInfo); + } + }); + } + /** + * This function tries to search for a tsconfig.json for the given file. + * This is different from the method the compiler uses because + * the compiler can assume it will always start searching in the + * current directory (the directory in which tsc was invoked). + * The server must start searching from the directory containing + * the newly opened file. + */ + forEachConfigFileLocation(info, action) { + if (this.serverMode !== 0 /* Semantic */) { + return void 0; + } + Debug.assert(!isOpenScriptInfo(info) || this.openFiles.has(info.path)); + const projectRootPath = this.openFiles.get(info.path); + const scriptInfo = Debug.checkDefined(this.getScriptInfo(info.path)); + if (scriptInfo.isDynamic) + return void 0; + let searchPath = asNormalizedPath(getDirectoryPath(info.fileName)); + const isSearchPathInProjectRoot = () => containsPath(projectRootPath, searchPath, this.currentDirectory, !this.host.useCaseSensitiveFileNames); + const anySearchPathOk = !projectRootPath || !isSearchPathInProjectRoot(); + let searchInDirectory = !isAncestorConfigFileInfo(info); + do { + if (searchInDirectory) { + const canonicalSearchPath = normalizedPathToPath(searchPath, this.currentDirectory, this.toCanonicalFileName); + const tsconfigFileName = asNormalizedPath(combinePaths(searchPath, "tsconfig.json")); + let result = action(combinePaths(canonicalSearchPath, "tsconfig.json"), tsconfigFileName); + if (result) + return tsconfigFileName; + const jsconfigFileName = asNormalizedPath(combinePaths(searchPath, "jsconfig.json")); + result = action(combinePaths(canonicalSearchPath, "jsconfig.json"), jsconfigFileName); + if (result) + return jsconfigFileName; + if (isNodeModulesDirectory(canonicalSearchPath)) { + break; + } + } + const parentPath = asNormalizedPath(getDirectoryPath(searchPath)); + if (parentPath === searchPath) + break; + searchPath = parentPath; + searchInDirectory = true; + } while (anySearchPathOk || isSearchPathInProjectRoot()); + return void 0; + } + /** @internal */ + findDefaultConfiguredProject(info) { + if (!info.isScriptOpen()) + return void 0; + const configFileName = this.getConfigFileNameForFile(info); + const project = configFileName && this.findConfiguredProjectByProjectName(configFileName); + return project && projectContainsInfoDirectly(project, info) ? project : project == null ? void 0 : project.getDefaultChildProjectFromProjectWithReferences(info); + } + /** + * This function tries to search for a tsconfig.json for the given file. + * This is different from the method the compiler uses because + * the compiler can assume it will always start searching in the + * current directory (the directory in which tsc was invoked). + * The server must start searching from the directory containing + * the newly opened file. + * If script info is passed in, it is asserted to be open script info + * otherwise just file name + */ + getConfigFileNameForFile(info) { + if (isOpenScriptInfo(info)) { + Debug.assert(info.isScriptOpen()); + const result = this.configFileForOpenFiles.get(info.path); + if (result !== void 0) + return result || void 0; + } + this.logger.info(`Search path: ${getDirectoryPath(info.fileName)}`); + const configFileName = this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName2) => this.configFileExists(configFileName2, canonicalConfigFilePath, info)); + if (configFileName) { + this.logger.info(`For info: ${info.fileName} :: Config file name: ${configFileName}`); + } else { + this.logger.info(`For info: ${info.fileName} :: No config files found.`); + } + if (isOpenScriptInfo(info)) { + this.configFileForOpenFiles.set(info.path, configFileName || false); + } + return configFileName; + } + printProjects() { + if (!this.logger.hasLevel(1 /* normal */)) { + return; + } + this.logger.startGroup(); + this.externalProjects.forEach(printProjectWithoutFileNames); + this.configuredProjects.forEach(printProjectWithoutFileNames); + this.inferredProjects.forEach(printProjectWithoutFileNames); + this.logger.info("Open files: "); + this.openFiles.forEach((projectRootPath, path) => { + const info = this.getScriptInfoForPath(path); + this.logger.info(` FileName: ${info.fileName} ProjectRootPath: ${projectRootPath}`); + this.logger.info(` Projects: ${info.containingProjects.map((p) => p.getProjectName())}`); + }); + this.logger.endGroup(); + } + /** @internal */ + findConfiguredProjectByProjectName(configFileName) { + const canonicalConfigFilePath = asNormalizedPath(this.toCanonicalFileName(configFileName)); + return this.getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath); + } + getConfiguredProjectByCanonicalConfigFilePath(canonicalConfigFilePath) { + return this.configuredProjects.get(canonicalConfigFilePath); + } + findExternalProjectByProjectName(projectFileName) { + return findProjectByName(projectFileName, this.externalProjects); + } + /** Get a filename if the language service exceeds the maximum allowed program size; otherwise returns undefined. */ + getFilenameForExceededTotalSizeLimitForNonTsFiles(name, options, fileNames, propertyReader) { + if (options && options.disableSizeLimit || !this.host.getFileSize) { + return; + } + let availableSpace = maxProgramSizeForNonTsFiles; + this.projectToSizeMap.set(name, 0); + this.projectToSizeMap.forEach((val) => availableSpace -= val || 0); + let totalNonTsFileSize = 0; + for (const f of fileNames) { + const fileName = propertyReader.getFileName(f); + if (hasTSFileExtension(fileName)) { + continue; + } + totalNonTsFileSize += this.host.getFileSize(fileName); + if (totalNonTsFileSize > maxProgramSizeForNonTsFiles || totalNonTsFileSize > availableSpace) { + const top5LargestFiles = fileNames.map((f2) => propertyReader.getFileName(f2)).filter((name2) => !hasTSFileExtension(name2)).map((name2) => ({ name: name2, size: this.host.getFileSize(name2) })).sort((a, b) => b.size - a.size).slice(0, 5); + this.logger.info(`Non TS file size exceeded limit (${totalNonTsFileSize}). Largest files: ${top5LargestFiles.map((file) => `${file.name}:${file.size}`).join(", ")}`); + return fileName; + } + } + this.projectToSizeMap.set(name, totalNonTsFileSize); + } + createExternalProject(projectFileName, files, options, typeAcquisition, excludedFiles) { + const compilerOptions = convertCompilerOptions(options); + const watchOptionsAndErrors = convertWatchOptions(options, getDirectoryPath(normalizeSlashes(projectFileName))); + const project = new ExternalProject2( + projectFileName, + this, + this.documentRegistry, + compilerOptions, + /*lastFileExceededProgramSize*/ + this.getFilenameForExceededTotalSizeLimitForNonTsFiles(projectFileName, compilerOptions, files, externalFilePropertyReader), + options.compileOnSave === void 0 ? true : options.compileOnSave, + /*projectFilePath*/ + void 0, + watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions + ); + project.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors); + project.excludedFiles = excludedFiles; + this.addFilesToNonInferredProject(project, files, externalFilePropertyReader, typeAcquisition); + this.externalProjects.push(project); + return project; + } + /** @internal */ + sendProjectTelemetry(project) { + if (this.seenProjects.has(project.projectName)) { + setProjectOptionsUsed(project); + return; + } + this.seenProjects.set(project.projectName, true); + if (!this.eventHandler || !this.host.createSHA256Hash) { + setProjectOptionsUsed(project); + return; + } + const projectOptions = isConfiguredProject(project) ? project.projectOptions : void 0; + setProjectOptionsUsed(project); + const data = { + projectId: this.host.createSHA256Hash(project.projectName), + fileStats: countEachFileTypes( + project.getScriptInfos(), + /*includeSizes*/ + true + ), + compilerOptions: convertCompilerOptionsForTelemetry(project.getCompilationSettings()), + typeAcquisition: convertTypeAcquisition2(project.getTypeAcquisition()), + extends: projectOptions && projectOptions.configHasExtendsProperty, + files: projectOptions && projectOptions.configHasFilesProperty, + include: projectOptions && projectOptions.configHasIncludeProperty, + exclude: projectOptions && projectOptions.configHasExcludeProperty, + compileOnSave: project.compileOnSaveEnabled, + configFileName: configFileName(), + projectType: project instanceof ExternalProject2 ? "external" : "configured", + languageServiceEnabled: project.languageServiceEnabled, + version + }; + this.eventHandler({ eventName: ProjectInfoTelemetryEvent, data }); + function configFileName() { + if (!isConfiguredProject(project)) { + return "other"; + } + return getBaseConfigFileName(project.getConfigFilePath()) || "other"; + } + function convertTypeAcquisition2({ enable: enable2, include, exclude }) { + return { + enable: enable2, + include: include !== void 0 && include.length !== 0, + exclude: exclude !== void 0 && exclude.length !== 0 + }; + } + } + addFilesToNonInferredProject(project, files, propertyReader, typeAcquisition) { + this.updateNonInferredProjectFiles(project, files, propertyReader); + project.setTypeAcquisition(typeAcquisition); + project.markAsDirty(); + } + /** @internal */ + createConfiguredProject(configFileName) { + var _a; + (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "createConfiguredProject", { configFilePath: configFileName }); + this.logger.info(`Creating configuration project ${configFileName}`); + const canonicalConfigFilePath = asNormalizedPath(this.toCanonicalFileName(configFileName)); + let configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (!configFileExistenceInfo) { + this.configFileExistenceInfoCache.set(canonicalConfigFilePath, configFileExistenceInfo = { exists: true }); + } else { + configFileExistenceInfo.exists = true; + } + if (!configFileExistenceInfo.config) { + configFileExistenceInfo.config = { + cachedDirectoryStructureHost: createCachedDirectoryStructureHost(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames), + projects: /* @__PURE__ */ new Map(), + updateLevel: 2 /* Full */ + }; + } + const project = new ConfiguredProject2( + configFileName, + canonicalConfigFilePath, + this, + this.documentRegistry, + configFileExistenceInfo.config.cachedDirectoryStructureHost + ); + this.configuredProjects.set(canonicalConfigFilePath, project); + this.createConfigFileWatcherForParsedConfig(configFileName, canonicalConfigFilePath, project); + return project; + } + /** @internal */ + createConfiguredProjectWithDelayLoad(configFileName, reason) { + const project = this.createConfiguredProject(configFileName); + project.pendingUpdateLevel = 2 /* Full */; + project.pendingUpdateReason = reason; + return project; + } + /** @internal */ + createAndLoadConfiguredProject(configFileName, reason) { + const project = this.createConfiguredProject(configFileName); + this.loadConfiguredProject(project, reason); + return project; + } + /** @internal */ + createLoadAndUpdateConfiguredProject(configFileName, reason) { + const project = this.createAndLoadConfiguredProject(configFileName, reason); + project.updateGraph(); + return project; + } + /** + * Read the config file of the project, and update the project root file names. + * + * @internal + */ + loadConfiguredProject(project, reason) { + var _a, _b; + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "loadConfiguredProject", { configFilePath: project.canonicalConfigFilePath }); + this.sendProjectLoadingStartEvent(project, reason); + const configFilename = asNormalizedPath(normalizePath(project.getConfigFilePath())); + const configFileExistenceInfo = this.ensureParsedConfigUptoDate( + configFilename, + project.canonicalConfigFilePath, + this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath), + project + ); + const parsedCommandLine = configFileExistenceInfo.config.parsedCommandLine; + Debug.assert(!!parsedCommandLine.fileNames); + const compilerOptions = parsedCommandLine.options; + if (!project.projectOptions) { + project.projectOptions = { + configHasExtendsProperty: parsedCommandLine.raw.extends !== void 0, + configHasFilesProperty: parsedCommandLine.raw.files !== void 0, + configHasIncludeProperty: parsedCommandLine.raw.include !== void 0, + configHasExcludeProperty: parsedCommandLine.raw.exclude !== void 0 + }; + } + project.canConfigFileJsonReportNoInputFiles = canJsonReportNoInputFiles(parsedCommandLine.raw); + project.setProjectErrors(parsedCommandLine.options.configFile.parseDiagnostics); + project.updateReferences(parsedCommandLine.projectReferences); + const lastFileExceededProgramSize = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(project.canonicalConfigFilePath, compilerOptions, parsedCommandLine.fileNames, fileNamePropertyReader); + if (lastFileExceededProgramSize) { + project.disableLanguageService(lastFileExceededProgramSize); + this.configFileExistenceInfoCache.forEach((_configFileExistenceInfo, canonicalConfigFilePath) => this.stopWatchingWildCards(canonicalConfigFilePath, project)); + } else { + project.setCompilerOptions(compilerOptions); + project.setWatchOptions(parsedCommandLine.watchOptions); + project.enableLanguageService(); + this.watchWildcards(configFilename, configFileExistenceInfo, project); + } + project.enablePluginsWithOptions(compilerOptions); + const filesToAdd = parsedCommandLine.fileNames.concat(project.getExternalFiles(2 /* Full */)); + this.updateRootAndOptionsOfNonInferredProject(project, filesToAdd, fileNamePropertyReader, compilerOptions, parsedCommandLine.typeAcquisition, parsedCommandLine.compileOnSave, parsedCommandLine.watchOptions); + (_b = tracing) == null ? void 0 : _b.pop(); + } + /** @internal */ + ensureParsedConfigUptoDate(configFilename, canonicalConfigFilePath, configFileExistenceInfo, forProject) { + var _a, _b, _c; + if (configFileExistenceInfo.config) { + if (!configFileExistenceInfo.config.updateLevel) + return configFileExistenceInfo; + if (configFileExistenceInfo.config.updateLevel === 1 /* RootNamesAndUpdate */) { + this.reloadFileNamesOfParsedConfig(configFilename, configFileExistenceInfo.config); + return configFileExistenceInfo; + } + } + const cachedDirectoryStructureHost = ((_a = configFileExistenceInfo.config) == null ? void 0 : _a.cachedDirectoryStructureHost) || createCachedDirectoryStructureHost(this.host, this.host.getCurrentDirectory(), this.host.useCaseSensitiveFileNames); + const configFileContent = tryReadFile(configFilename, (fileName) => this.host.readFile(fileName)); + const configFile = parseJsonText(configFilename, isString(configFileContent) ? configFileContent : ""); + const configFileErrors = configFile.parseDiagnostics; + if (!isString(configFileContent)) + configFileErrors.push(configFileContent); + const parsedCommandLine = parseJsonSourceFileConfigFileContent( + configFile, + cachedDirectoryStructureHost, + getDirectoryPath(configFilename), + /*existingOptions*/ + {}, + configFilename, + /*resolutionStack*/ + [], + this.hostConfiguration.extraFileExtensions, + this.extendedConfigCache + ); + if (parsedCommandLine.errors.length) { + configFileErrors.push(...parsedCommandLine.errors); + } + this.logger.info(`Config: ${configFilename} : ${JSON.stringify( + { + rootNames: parsedCommandLine.fileNames, + options: parsedCommandLine.options, + watchOptions: parsedCommandLine.watchOptions, + projectReferences: parsedCommandLine.projectReferences + }, + /*replacer*/ + void 0, + " " + )}`); + const oldCommandLine = (_b = configFileExistenceInfo.config) == null ? void 0 : _b.parsedCommandLine; + if (!configFileExistenceInfo.config) { + configFileExistenceInfo.config = { parsedCommandLine, cachedDirectoryStructureHost, projects: /* @__PURE__ */ new Map() }; + } else { + configFileExistenceInfo.config.parsedCommandLine = parsedCommandLine; + configFileExistenceInfo.config.watchedDirectoriesStale = true; + configFileExistenceInfo.config.updateLevel = void 0; + } + if (!oldCommandLine && !isJsonEqual( + // Old options + this.getWatchOptionsFromProjectWatchOptions( + /*projectOptions*/ + void 0 + ), + // New options + this.getWatchOptionsFromProjectWatchOptions(parsedCommandLine.watchOptions) + )) { + (_c = configFileExistenceInfo.watcher) == null ? void 0 : _c.close(); + configFileExistenceInfo.watcher = void 0; + } + this.createConfigFileWatcherForParsedConfig(configFilename, canonicalConfigFilePath, forProject); + updateSharedExtendedConfigFileWatcher( + canonicalConfigFilePath, + parsedCommandLine.options, + this.sharedExtendedConfigFileWatchers, + (extendedConfigFileName, extendedConfigFilePath) => this.watchFactory.watchFile( + extendedConfigFileName, + () => { + var _a2; + cleanExtendedConfigCache(this.extendedConfigCache, extendedConfigFilePath, (fileName) => this.toPath(fileName)); + let ensureProjectsForOpenFiles = false; + (_a2 = this.sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) == null ? void 0 : _a2.projects.forEach((canonicalPath) => { + ensureProjectsForOpenFiles = this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalPath, `Change in extended config file ${extendedConfigFileName} detected`) || ensureProjectsForOpenFiles; + }); + if (ensureProjectsForOpenFiles) + this.delayEnsureProjectForOpenFiles(); + }, + 2e3 /* High */, + this.hostConfiguration.watchOptions, + WatchType.ExtendedConfigFile, + configFilename + ), + (fileName) => this.toPath(fileName) + ); + return configFileExistenceInfo; + } + /** @internal */ + watchWildcards(configFileName, { exists, config }, forProject) { + config.projects.set(forProject.canonicalConfigFilePath, true); + if (exists) { + if (config.watchedDirectories && !config.watchedDirectoriesStale) + return; + config.watchedDirectoriesStale = false; + updateWatchingWildcardDirectories( + config.watchedDirectories || (config.watchedDirectories = /* @__PURE__ */ new Map()), + new Map(Object.entries(config.parsedCommandLine.wildcardDirectories)), + // Create new directory watcher + (directory, flags) => this.watchWildcardDirectory(directory, flags, configFileName, config) + ); + } else { + config.watchedDirectoriesStale = false; + if (!config.watchedDirectories) + return; + clearMap(config.watchedDirectories, closeFileWatcherOf); + config.watchedDirectories = void 0; + } + } + /** @internal */ + stopWatchingWildCards(canonicalConfigFilePath, forProject) { + const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath); + if (!configFileExistenceInfo.config || !configFileExistenceInfo.config.projects.get(forProject.canonicalConfigFilePath)) { + return; + } + configFileExistenceInfo.config.projects.set(forProject.canonicalConfigFilePath, false); + if (forEachEntry(configFileExistenceInfo.config.projects, identity)) + return; + if (configFileExistenceInfo.config.watchedDirectories) { + clearMap(configFileExistenceInfo.config.watchedDirectories, closeFileWatcherOf); + configFileExistenceInfo.config.watchedDirectories = void 0; + } + configFileExistenceInfo.config.watchedDirectoriesStale = void 0; + } + updateNonInferredProjectFiles(project, files, propertyReader) { + const projectRootFilesMap = project.getRootFilesMap(); + const newRootScriptInfoMap = /* @__PURE__ */ new Map(); + for (const f of files) { + const newRootFile = propertyReader.getFileName(f); + const fileName = toNormalizedPath(newRootFile); + const isDynamic = isDynamicFileName(fileName); + let path; + if (!isDynamic && !project.fileExists(newRootFile)) { + path = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName); + const existingValue = projectRootFilesMap.get(path); + if (existingValue) { + if (existingValue.info) { + project.removeFile( + existingValue.info, + /*fileExists*/ + false, + /*detachFromProject*/ + true + ); + existingValue.info = void 0; + } + existingValue.fileName = fileName; + } else { + projectRootFilesMap.set(path, { fileName }); + } + } else { + const scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions); + const hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions); + const scriptInfo = Debug.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( + fileName, + project.currentDirectory, + scriptKind, + hasMixedContent, + project.directoryStructureHost + )); + path = scriptInfo.path; + const existingValue = projectRootFilesMap.get(path); + if (!existingValue || existingValue.info !== scriptInfo) { + project.addRoot(scriptInfo, fileName); + if (scriptInfo.isScriptOpen()) { + this.removeRootOfInferredProjectIfNowPartOfOtherProject(scriptInfo); + } + } else { + existingValue.fileName = fileName; + } + } + newRootScriptInfoMap.set(path, true); + } + if (projectRootFilesMap.size > newRootScriptInfoMap.size) { + projectRootFilesMap.forEach((value, path) => { + if (!newRootScriptInfoMap.has(path)) { + if (value.info) { + project.removeFile( + value.info, + project.fileExists(path), + /*detachFromProject*/ + true + ); + } else { + projectRootFilesMap.delete(path); + } + } + }); + } + } + updateRootAndOptionsOfNonInferredProject(project, newUncheckedFiles, propertyReader, newOptions, newTypeAcquisition, compileOnSave, watchOptions) { + project.setCompilerOptions(newOptions); + project.setWatchOptions(watchOptions); + if (compileOnSave !== void 0) { + project.compileOnSaveEnabled = compileOnSave; + } + this.addFilesToNonInferredProject(project, newUncheckedFiles, propertyReader, newTypeAcquisition); + } + /** + * Reload the file names from config file specs and update the project graph + * + * @internal + */ + reloadFileNamesOfConfiguredProject(project) { + const fileNames = this.reloadFileNamesOfParsedConfig(project.getConfigFilePath(), this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath).config); + project.updateErrorOnNoInputFiles(fileNames); + this.updateNonInferredProjectFiles(project, fileNames.concat(project.getExternalFiles(1 /* RootNamesAndUpdate */)), fileNamePropertyReader); + project.markAsDirty(); + return project.updateGraph(); + } + /** @internal */ + reloadFileNamesOfParsedConfig(configFileName, config) { + if (config.updateLevel === void 0) + return config.parsedCommandLine.fileNames; + Debug.assert(config.updateLevel === 1 /* RootNamesAndUpdate */); + const configFileSpecs = config.parsedCommandLine.options.configFile.configFileSpecs; + const fileNames = getFileNamesFromConfigSpecs( + configFileSpecs, + getDirectoryPath(configFileName), + config.parsedCommandLine.options, + config.cachedDirectoryStructureHost, + this.hostConfiguration.extraFileExtensions + ); + config.parsedCommandLine = { ...config.parsedCommandLine, fileNames }; + return fileNames; + } + /** @internal */ + setFileNamesOfAutpImportProviderOrAuxillaryProject(project, fileNames) { + this.updateNonInferredProjectFiles(project, fileNames, fileNamePropertyReader); + } + /** + * Read the config file of the project again by clearing the cache and update the project graph + * + * @internal + */ + reloadConfiguredProject(project, reason, isInitialLoad, clearSemanticCache) { + const host = project.getCachedDirectoryStructureHost(); + if (clearSemanticCache) + this.clearSemanticCache(project); + host.clearCache(); + const configFileName = project.getConfigFilePath(); + this.logger.info(`${isInitialLoad ? "Loading" : "Reloading"} configured project ${configFileName}`); + this.loadConfiguredProject(project, reason); + project.updateGraph(); + this.sendConfigFileDiagEvent(project, configFileName); + } + /** @internal */ + clearSemanticCache(project) { + project.resolutionCache.clear(); + project.getLanguageService( + /*ensureSynchronized*/ + false + ).cleanupSemanticCache(); + project.cleanupProgram(); + project.markAsDirty(); + } + sendConfigFileDiagEvent(project, triggerFile) { + if (!this.eventHandler || this.suppressDiagnosticEvents) { + return; + } + const diagnostics = project.getLanguageService().getCompilerOptionsDiagnostics(); + diagnostics.push(...project.getAllProjectErrors()); + this.eventHandler( + { + eventName: ConfigFileDiagEvent, + data: { configFileName: project.getConfigFilePath(), diagnostics, triggerFile } + } + ); + } + getOrCreateInferredProjectForProjectRootPathIfEnabled(info, projectRootPath) { + if (!this.useInferredProjectPerProjectRoot || // Its a dynamic info opened without project root + info.isDynamic && projectRootPath === void 0) { + return void 0; + } + if (projectRootPath) { + const canonicalProjectRootPath = this.toCanonicalFileName(projectRootPath); + for (const project of this.inferredProjects) { + if (project.projectRootPath === canonicalProjectRootPath) { + return project; + } + } + return this.createInferredProject( + projectRootPath, + /*isSingleInferredProject*/ + false, + projectRootPath + ); + } + let bestMatch; + for (const project of this.inferredProjects) { + if (!project.projectRootPath) + continue; + if (!containsPath(project.projectRootPath, info.path, this.host.getCurrentDirectory(), !this.host.useCaseSensitiveFileNames)) + continue; + if (bestMatch && bestMatch.projectRootPath.length > project.projectRootPath.length) + continue; + bestMatch = project; + } + return bestMatch; + } + getOrCreateSingleInferredProjectIfEnabled() { + if (!this.useSingleInferredProject) { + return void 0; + } + if (this.inferredProjects.length > 0 && this.inferredProjects[0].projectRootPath === void 0) { + return this.inferredProjects[0]; + } + return this.createInferredProject( + "", + /*isSingleInferredProject*/ + true + ); + } + getOrCreateSingleInferredWithoutProjectRoot(currentDirectory) { + Debug.assert(!this.useSingleInferredProject); + const expectedCurrentDirectory = this.toCanonicalFileName(this.getNormalizedAbsolutePath(currentDirectory)); + for (const inferredProject of this.inferredProjects) { + if (!inferredProject.projectRootPath && inferredProject.isOrphan() && inferredProject.canonicalCurrentDirectory === expectedCurrentDirectory) { + return inferredProject; + } + } + return this.createInferredProject(currentDirectory); + } + createInferredProject(currentDirectory, isSingleInferredProject, projectRootPath) { + const compilerOptions = projectRootPath && this.compilerOptionsForInferredProjectsPerProjectRoot.get(projectRootPath) || this.compilerOptionsForInferredProjects; + let watchOptionsAndErrors; + let typeAcquisition; + if (projectRootPath) { + watchOptionsAndErrors = this.watchOptionsForInferredProjectsPerProjectRoot.get(projectRootPath); + typeAcquisition = this.typeAcquisitionForInferredProjectsPerProjectRoot.get(projectRootPath); + } + if (watchOptionsAndErrors === void 0) { + watchOptionsAndErrors = this.watchOptionsForInferredProjects; + } + if (typeAcquisition === void 0) { + typeAcquisition = this.typeAcquisitionForInferredProjects; + } + watchOptionsAndErrors = watchOptionsAndErrors || void 0; + const project = new InferredProject2(this, this.documentRegistry, compilerOptions, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions, projectRootPath, currentDirectory, typeAcquisition); + project.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors); + if (isSingleInferredProject) { + this.inferredProjects.unshift(project); + } else { + this.inferredProjects.push(project); + } + return project; + } + /** @internal */ + getOrCreateScriptInfoNotOpenedByClient(uncheckedFileName, currentDirectory, hostToQueryFileExistsOn) { + return this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath( + toNormalizedPath(uncheckedFileName), + currentDirectory, + /*scriptKind*/ + void 0, + /*hasMixedContent*/ + void 0, + hostToQueryFileExistsOn + ); + } + getScriptInfo(uncheckedFileName) { + return this.getScriptInfoForNormalizedPath(toNormalizedPath(uncheckedFileName)); + } + /** @internal */ + getScriptInfoOrConfig(uncheckedFileName) { + const path = toNormalizedPath(uncheckedFileName); + const info = this.getScriptInfoForNormalizedPath(path); + if (info) + return info; + const configProject = this.configuredProjects.get(this.toPath(uncheckedFileName)); + return configProject && configProject.getCompilerOptions().configFile; + } + /** @internal */ + logErrorForScriptInfoNotFound(fileName) { + const names = arrayFrom(this.filenameToScriptInfo.entries(), ([path, scriptInfo]) => ({ path, fileName: scriptInfo.fileName })); + this.logger.msg(`Could not find file ${JSON.stringify(fileName)}. +All files are: ${JSON.stringify(names)}`, "Err" /* Err */); + } + /** + * Returns the projects that contain script info through SymLink + * Note that this does not return projects in info.containingProjects + * + * @internal + */ + getSymlinkedProjects(info) { + let projects; + if (this.realpathToScriptInfos) { + const realpath = info.getRealpathIfDifferent(); + if (realpath) { + forEach(this.realpathToScriptInfos.get(realpath), combineProjects); + } + forEach(this.realpathToScriptInfos.get(info.path), combineProjects); + } + return projects; + function combineProjects(toAddInfo) { + if (toAddInfo !== info) { + for (const project of toAddInfo.containingProjects) { + if (project.languageServiceEnabled && !project.isOrphan() && !project.getCompilerOptions().preserveSymlinks && !info.isAttached(project)) { + if (!projects) { + projects = createMultiMap(); + projects.add(toAddInfo.path, project); + } else if (!forEachEntry(projects, (projs, path) => path === toAddInfo.path ? false : contains(projs, project))) { + projects.add(toAddInfo.path, project); + } + } + } + } + } + } + watchClosedScriptInfo(info) { + Debug.assert(!info.fileWatcher); + if (!info.isDynamicOrHasMixedContent() && (!this.globalCacheLocationDirectoryPath || !startsWith(info.path, this.globalCacheLocationDirectoryPath))) { + const indexOfNodeModules = info.path.indexOf("/node_modules/"); + if (!this.host.getModifiedTime || indexOfNodeModules === -1) { + info.fileWatcher = this.watchFactory.watchFile( + info.fileName, + (_fileName, eventKind) => this.onSourceFileChanged(info, eventKind), + 500 /* Medium */, + this.hostConfiguration.watchOptions, + WatchType.ClosedScriptInfo + ); + } else { + info.mTime = this.getModifiedTime(info); + info.fileWatcher = this.watchClosedScriptInfoInNodeModules(info.path.substr(0, indexOfNodeModules)); + } + } + } + createNodeModulesWatcher(dir) { + const watcher = this.watchFactory.watchDirectory( + dir, + (fileOrDirectory) => { + var _a; + const fileOrDirectoryPath = removeIgnoredPath(this.toPath(fileOrDirectory)); + if (!fileOrDirectoryPath) + return; + const basename = getBaseFileName(fileOrDirectoryPath); + if (((_a = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.size) && (basename === "package.json" || basename === "node_modules")) { + result.affectedModuleSpecifierCacheProjects.forEach((projectName) => { + var _a2, _b; + (_b = (_a2 = this.findProject(projectName)) == null ? void 0 : _a2.getModuleSpecifierCache()) == null ? void 0 : _b.clear(); + }); + } + if (result.refreshScriptInfoRefCount) { + if (dir === fileOrDirectoryPath) { + this.refreshScriptInfosInDirectory(dir); + } else { + const info = this.getScriptInfoForPath(fileOrDirectoryPath); + if (info) { + if (isScriptInfoWatchedFromNodeModules(info)) { + this.refreshScriptInfo(info); + } + } else if (!hasExtension(fileOrDirectoryPath)) { + this.refreshScriptInfosInDirectory(fileOrDirectoryPath); + } + } + } + }, + 1 /* Recursive */, + this.hostConfiguration.watchOptions, + WatchType.NodeModules + ); + const result = { + refreshScriptInfoRefCount: 0, + affectedModuleSpecifierCacheProjects: void 0, + close: () => { + var _a; + if (!result.refreshScriptInfoRefCount && !((_a = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.size)) { + watcher.close(); + this.nodeModulesWatchers.delete(dir); + } + } + }; + this.nodeModulesWatchers.set(dir, result); + return result; + } + /** @internal */ + watchPackageJsonsInNodeModules(dir, project) { + const watcher = this.nodeModulesWatchers.get(dir) || this.createNodeModulesWatcher(dir); + (watcher.affectedModuleSpecifierCacheProjects || (watcher.affectedModuleSpecifierCacheProjects = /* @__PURE__ */ new Set())).add(project.getProjectName()); + return { + close: () => { + var _a; + (_a = watcher.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a.delete(project.getProjectName()); + watcher.close(); + } + }; + } + watchClosedScriptInfoInNodeModules(dir) { + const watchDir = dir + "/node_modules"; + const watcher = this.nodeModulesWatchers.get(watchDir) || this.createNodeModulesWatcher(watchDir); + watcher.refreshScriptInfoRefCount++; + return { + close: () => { + watcher.refreshScriptInfoRefCount--; + watcher.close(); + } + }; + } + getModifiedTime(info) { + return (this.host.getModifiedTime(info.path) || missingFileModifiedTime).getTime(); + } + refreshScriptInfo(info) { + const mTime = this.getModifiedTime(info); + if (mTime !== info.mTime) { + const eventKind = getFileWatcherEventKind(info.mTime, mTime); + info.mTime = mTime; + this.onSourceFileChanged(info, eventKind); + } + } + refreshScriptInfosInDirectory(dir) { + dir = dir + directorySeparator; + this.filenameToScriptInfo.forEach((info) => { + if (isScriptInfoWatchedFromNodeModules(info) && startsWith(info.path, dir)) { + this.refreshScriptInfo(info); + } + }); + } + stopWatchingScriptInfo(info) { + if (info.fileWatcher) { + info.fileWatcher.close(); + info.fileWatcher = void 0; + } + } + getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(fileName, currentDirectory, scriptKind, hasMixedContent, hostToQueryFileExistsOn) { + if (isRootedDiskPath(fileName) || isDynamicFileName(fileName)) { + return this.getOrCreateScriptInfoWorker( + fileName, + currentDirectory, + /*openedByClient*/ + false, + /*fileContent*/ + void 0, + scriptKind, + hasMixedContent, + hostToQueryFileExistsOn + ); + } + const info = this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(fileName)); + if (info) { + return info; + } + return void 0; + } + getOrCreateScriptInfoOpenedByClientForNormalizedPath(fileName, currentDirectory, fileContent, scriptKind, hasMixedContent) { + return this.getOrCreateScriptInfoWorker( + fileName, + currentDirectory, + /*openedByClient*/ + true, + fileContent, + scriptKind, + hasMixedContent + ); + } + getOrCreateScriptInfoForNormalizedPath(fileName, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn) { + return this.getOrCreateScriptInfoWorker(fileName, this.currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn); + } + getOrCreateScriptInfoWorker(fileName, currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn) { + Debug.assert(fileContent === void 0 || openedByClient, "ScriptInfo needs to be opened by client to be able to set its user defined content"); + const path = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName); + let info = this.getScriptInfoForPath(path); + if (!info) { + const isDynamic = isDynamicFileName(fileName); + Debug.assert(isRootedDiskPath(fileName) || isDynamic || openedByClient, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })} +Script info with non-dynamic relative file name can only be open script info or in context of host currentDirectory`); + Debug.assert(!isRootedDiskPath(fileName) || this.currentDirectory === currentDirectory || !this.openFilesWithNonRootedDiskPath.has(this.toCanonicalFileName(fileName)), "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })} +Open script files with non rooted disk path opened with current directory context cannot have same canonical names`); + Debug.assert(!isDynamic || this.currentDirectory === currentDirectory || this.useInferredProjectPerProjectRoot, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })} +Dynamic files must always be opened with service's current directory or service should support inferred project per projectRootPath.`); + if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) { + return; + } + info = new ScriptInfo(this.host, fileName, scriptKind, !!hasMixedContent, path, this.filenameToScriptInfoVersion.get(path)); + this.filenameToScriptInfo.set(info.path, info); + this.filenameToScriptInfoVersion.delete(info.path); + if (!openedByClient) { + this.watchClosedScriptInfo(info); + } else if (!isRootedDiskPath(fileName) && (!isDynamic || this.currentDirectory !== currentDirectory)) { + this.openFilesWithNonRootedDiskPath.set(this.toCanonicalFileName(fileName), info); + } + } + if (openedByClient) { + this.stopWatchingScriptInfo(info); + info.open(fileContent); + if (hasMixedContent) { + info.registerFileUpdate(); + } + } + return info; + } + /** + * This gets the script info for the normalized path. If the path is not rooted disk path then the open script info with project root context is preferred + */ + getScriptInfoForNormalizedPath(fileName) { + return !isRootedDiskPath(fileName) && this.openFilesWithNonRootedDiskPath.get(this.toCanonicalFileName(fileName)) || this.getScriptInfoForPath(normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName)); + } + getScriptInfoForPath(fileName) { + return this.filenameToScriptInfo.get(fileName); + } + /** @internal */ + getDocumentPositionMapper(project, generatedFileName, sourceFileName) { + const declarationInfo = this.getOrCreateScriptInfoNotOpenedByClient(generatedFileName, project.currentDirectory, this.host); + if (!declarationInfo) { + if (sourceFileName) { + project.addGeneratedFileWatch(generatedFileName, sourceFileName); + } + return void 0; + } + declarationInfo.getSnapshot(); + if (isString(declarationInfo.sourceMapFilePath)) { + const sourceMapFileInfo2 = this.getScriptInfoForPath(declarationInfo.sourceMapFilePath); + if (sourceMapFileInfo2) { + sourceMapFileInfo2.getSnapshot(); + if (sourceMapFileInfo2.documentPositionMapper !== void 0) { + sourceMapFileInfo2.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, sourceMapFileInfo2.sourceInfos); + return sourceMapFileInfo2.documentPositionMapper ? sourceMapFileInfo2.documentPositionMapper : void 0; + } + } + declarationInfo.sourceMapFilePath = void 0; + } else if (declarationInfo.sourceMapFilePath) { + declarationInfo.sourceMapFilePath.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, declarationInfo.sourceMapFilePath.sourceInfos); + return void 0; + } else if (declarationInfo.sourceMapFilePath !== void 0) { + return void 0; + } + let sourceMapFileInfo; + let mapFileNameFromDeclarationInfo; + let readMapFile = (mapFileName, mapFileNameFromDts) => { + const mapInfo = this.getOrCreateScriptInfoNotOpenedByClient(mapFileName, project.currentDirectory, this.host); + if (!mapInfo) { + mapFileNameFromDeclarationInfo = mapFileNameFromDts; + return void 0; + } + sourceMapFileInfo = mapInfo; + const snap = mapInfo.getSnapshot(); + if (mapInfo.documentPositionMapper !== void 0) + return mapInfo.documentPositionMapper; + return getSnapshotText(snap); + }; + const projectName = project.projectName; + const documentPositionMapper = getDocumentPositionMapper( + { getCanonicalFileName: this.toCanonicalFileName, log: (s) => this.logger.info(s), getSourceFileLike: (f) => this.getSourceFileLike(f, projectName, declarationInfo) }, + declarationInfo.fileName, + declarationInfo.textStorage.getLineInfo(), + readMapFile + ); + readMapFile = void 0; + if (sourceMapFileInfo) { + declarationInfo.sourceMapFilePath = sourceMapFileInfo.path; + sourceMapFileInfo.declarationInfoPath = declarationInfo.path; + sourceMapFileInfo.documentPositionMapper = documentPositionMapper || false; + sourceMapFileInfo.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, sourceMapFileInfo.sourceInfos); + } else if (mapFileNameFromDeclarationInfo) { + declarationInfo.sourceMapFilePath = { + watcher: this.addMissingSourceMapFile( + project.currentDirectory === this.currentDirectory ? mapFileNameFromDeclarationInfo : getNormalizedAbsolutePath(mapFileNameFromDeclarationInfo, project.currentDirectory), + declarationInfo.path + ), + sourceInfos: this.addSourceInfoToSourceMap(sourceFileName, project) + }; + } else { + declarationInfo.sourceMapFilePath = false; + } + return documentPositionMapper; + } + addSourceInfoToSourceMap(sourceFileName, project, sourceInfos) { + if (sourceFileName) { + const sourceInfo = this.getOrCreateScriptInfoNotOpenedByClient(sourceFileName, project.currentDirectory, project.directoryStructureHost); + (sourceInfos || (sourceInfos = /* @__PURE__ */ new Set())).add(sourceInfo.path); + } + return sourceInfos; + } + addMissingSourceMapFile(mapFileName, declarationInfoPath) { + const fileWatcher = this.watchFactory.watchFile( + mapFileName, + () => { + const declarationInfo = this.getScriptInfoForPath(declarationInfoPath); + if (declarationInfo && declarationInfo.sourceMapFilePath && !isString(declarationInfo.sourceMapFilePath)) { + this.delayUpdateProjectGraphs( + declarationInfo.containingProjects, + /*clearSourceMapperCache*/ + true + ); + this.delayUpdateSourceInfoProjects(declarationInfo.sourceMapFilePath.sourceInfos); + declarationInfo.closeSourceMapFileWatcher(); + } + }, + 2e3 /* High */, + this.hostConfiguration.watchOptions, + WatchType.MissingSourceMapFile + ); + return fileWatcher; + } + /** @internal */ + getSourceFileLike(fileName, projectNameOrProject, declarationInfo) { + const project = projectNameOrProject.projectName ? projectNameOrProject : this.findProject(projectNameOrProject); + if (project) { + const path = project.toPath(fileName); + const sourceFile = project.getSourceFile(path); + if (sourceFile && sourceFile.resolvedPath === path) + return sourceFile; + } + const info = this.getOrCreateScriptInfoNotOpenedByClient(fileName, (project || this).currentDirectory, project ? project.directoryStructureHost : this.host); + if (!info) + return void 0; + if (declarationInfo && isString(declarationInfo.sourceMapFilePath) && info !== declarationInfo) { + const sourceMapInfo = this.getScriptInfoForPath(declarationInfo.sourceMapFilePath); + if (sourceMapInfo) { + (sourceMapInfo.sourceInfos || (sourceMapInfo.sourceInfos = /* @__PURE__ */ new Set())).add(info.path); + } + } + if (info.cacheSourceFile) + return info.cacheSourceFile.sourceFile; + if (!info.sourceFileLike) { + info.sourceFileLike = { + get text() { + Debug.fail("shouldnt need text"); + return ""; + }, + getLineAndCharacterOfPosition: (pos) => { + const lineOffset = info.positionToLineOffset(pos); + return { line: lineOffset.line - 1, character: lineOffset.offset - 1 }; + }, + getPositionOfLineAndCharacter: (line, character, allowEdits) => info.lineOffsetToPosition(line + 1, character + 1, allowEdits) + }; + } + return info.sourceFileLike; + } + /** @internal */ + setPerformanceEventHandler(performanceEventHandler) { + this.performanceEventHandler = performanceEventHandler; + } + setHostConfiguration(args) { + var _a; + if (args.file) { + const info = this.getScriptInfoForNormalizedPath(toNormalizedPath(args.file)); + if (info) { + info.setOptions(convertFormatOptions(args.formatOptions), args.preferences); + this.logger.info(`Host configuration update for file ${args.file}`); + } + } else { + if (args.hostInfo !== void 0) { + this.hostConfiguration.hostInfo = args.hostInfo; + this.logger.info(`Host information ${args.hostInfo}`); + } + if (args.formatOptions) { + this.hostConfiguration.formatCodeOptions = { ...this.hostConfiguration.formatCodeOptions, ...convertFormatOptions(args.formatOptions) }; + this.logger.info("Format host information updated"); + } + if (args.preferences) { + const { + lazyConfiguredProjectsFromExternalProject, + includePackageJsonAutoImports + } = this.hostConfiguration.preferences; + this.hostConfiguration.preferences = { ...this.hostConfiguration.preferences, ...args.preferences }; + if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) { + this.configuredProjects.forEach((project) => { + if (project.hasExternalProjectRef() && project.pendingUpdateLevel === 2 /* Full */ && !this.pendingProjectUpdates.has(project.getProjectName())) { + project.updateGraph(); + } + }); + } + if (includePackageJsonAutoImports !== args.preferences.includePackageJsonAutoImports) { + this.invalidateProjectPackageJson( + /*packageJsonPath*/ + void 0 + ); + } + } + if (args.extraFileExtensions) { + this.hostConfiguration.extraFileExtensions = args.extraFileExtensions; + this.reloadProjects(); + this.logger.info("Host file extension mappings updated"); + } + if (args.watchOptions) { + this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) == null ? void 0 : _a.watchOptions; + this.logger.info(`Host watch options changed to ${JSON.stringify(this.hostConfiguration.watchOptions)}, it will be take effect for next watches.`); + } + } + } + /** @internal */ + getWatchOptions(project) { + return this.getWatchOptionsFromProjectWatchOptions(project.getWatchOptions()); + } + /** @internal */ + getWatchOptionsFromProjectWatchOptions(projectOptions) { + return projectOptions && this.hostConfiguration.watchOptions ? { ...this.hostConfiguration.watchOptions, ...projectOptions } : projectOptions || this.hostConfiguration.watchOptions; + } + closeLog() { + this.logger.close(); + } + /** + * This function rebuilds the project for every file opened by the client + * This does not reload contents of open files from disk. But we could do that if needed + */ + reloadProjects() { + this.logger.info("reload projects."); + this.filenameToScriptInfo.forEach((info) => { + if (this.openFiles.has(info.path)) + return; + if (!info.fileWatcher) + return; + this.onSourceFileChanged(info, this.host.fileExists(info.fileName) ? 1 /* Changed */ : 2 /* Deleted */); + }); + this.pendingProjectUpdates.forEach((_project, projectName) => { + this.throttledOperations.cancel(projectName); + this.pendingProjectUpdates.delete(projectName); + }); + this.throttledOperations.cancel(ensureProjectForOpenFileSchedule); + this.pendingEnsureProjectForOpenFiles = false; + this.configFileExistenceInfoCache.forEach((info) => { + if (info.config) + info.config.updateLevel = 2 /* Full */; + }); + this.reloadConfiguredProjectForFiles( + this.openFiles, + /*clearSemanticCache*/ + true, + /*delayReload*/ + false, + returnTrue, + "User requested reload projects" + ); + this.externalProjects.forEach((project) => { + this.clearSemanticCache(project); + project.updateGraph(); + }); + this.inferredProjects.forEach((project) => this.clearSemanticCache(project)); + this.ensureProjectForOpenFiles(); + } + /** + * This function goes through all the openFiles and tries to file the config file for them. + * If the config file is found and it refers to existing project, it reloads it either immediately + * or schedules it for reload depending on delayReload option + * If there is no existing project it just opens the configured project for the config file + * reloadForInfo provides a way to filter out files to reload configured project for + */ + reloadConfiguredProjectForFiles(openFiles, clearSemanticCache, delayReload, shouldReloadProjectFor, reason) { + const updatedProjects = /* @__PURE__ */ new Map(); + const reloadChildProject = (child) => { + if (!updatedProjects.has(child.canonicalConfigFilePath)) { + updatedProjects.set(child.canonicalConfigFilePath, true); + this.reloadConfiguredProject( + child, + reason, + /*isInitialLoad*/ + false, + clearSemanticCache + ); + } + }; + openFiles == null ? void 0 : openFiles.forEach((openFileValue, path) => { + this.configFileForOpenFiles.delete(path); + if (!shouldReloadProjectFor(openFileValue)) { + return; + } + const info = this.getScriptInfoForPath(path); + Debug.assert(info.isScriptOpen()); + const configFileName = this.getConfigFileNameForFile(info); + if (configFileName) { + const project = this.findConfiguredProjectByProjectName(configFileName) || this.createConfiguredProject(configFileName); + if (!updatedProjects.has(project.canonicalConfigFilePath)) { + updatedProjects.set(project.canonicalConfigFilePath, true); + if (delayReload) { + project.pendingUpdateLevel = 2 /* Full */; + project.pendingUpdateReason = reason; + if (clearSemanticCache) + this.clearSemanticCache(project); + this.delayUpdateProjectGraph(project); + } else { + this.reloadConfiguredProject( + project, + reason, + /*isInitialLoad*/ + false, + clearSemanticCache + ); + if (!projectContainsInfoDirectly(project, info)) { + const referencedProject = forEachResolvedProjectReferenceProject( + project, + info.path, + (child) => { + reloadChildProject(child); + return projectContainsInfoDirectly(child, info); + }, + 1 /* FindCreate */ + ); + if (referencedProject) { + forEachResolvedProjectReferenceProject( + project, + /*fileName*/ + void 0, + reloadChildProject, + 0 /* Find */ + ); + } + } + } + } + } + }); + } + /** + * Remove the root of inferred project if script info is part of another project + */ + removeRootOfInferredProjectIfNowPartOfOtherProject(info) { + Debug.assert(info.containingProjects.length > 0); + const firstProject = info.containingProjects[0]; + if (!firstProject.isOrphan() && isInferredProject(firstProject) && firstProject.isRoot(info) && forEach(info.containingProjects, (p) => p !== firstProject && !p.isOrphan())) { + firstProject.removeFile( + info, + /*fileExists*/ + true, + /*detachFromProject*/ + true + ); + } + } + /** + * This function is to update the project structure for every inferred project. + * It is called on the premise that all the configured projects are + * up to date. + * This will go through open files and assign them to inferred project if open file is not part of any other project + * After that all the inferred project graphs are updated + */ + ensureProjectForOpenFiles() { + this.logger.info("Before ensureProjectForOpenFiles:"); + this.printProjects(); + this.openFiles.forEach((projectRootPath, path) => { + const info = this.getScriptInfoForPath(path); + if (info.isOrphan()) { + this.assignOrphanScriptInfoToInferredProject(info, projectRootPath); + } else { + this.removeRootOfInferredProjectIfNowPartOfOtherProject(info); + } + }); + this.pendingEnsureProjectForOpenFiles = false; + this.inferredProjects.forEach(updateProjectIfDirty); + this.logger.info("After ensureProjectForOpenFiles:"); + this.printProjects(); + } + /** + * Open file whose contents is managed by the client + * @param filename is absolute pathname + * @param fileContent is a known version of the file content that is more up to date than the one on disk + */ + openClientFile(fileName, fileContent, scriptKind, projectRootPath) { + return this.openClientFileWithNormalizedPath( + toNormalizedPath(fileName), + fileContent, + scriptKind, + /*hasMixedContent*/ + false, + projectRootPath ? toNormalizedPath(projectRootPath) : void 0 + ); + } + /** @internal */ + getOriginalLocationEnsuringConfiguredProject(project, location) { + const isSourceOfProjectReferenceRedirect = project.isSourceOfProjectReferenceRedirect(location.fileName); + const originalLocation = isSourceOfProjectReferenceRedirect ? location : project.getSourceMapper().tryGetSourcePosition(location); + if (!originalLocation) + return void 0; + const { fileName } = originalLocation; + const scriptInfo = this.getScriptInfo(fileName); + if (!scriptInfo && !this.host.fileExists(fileName)) + return void 0; + const originalFileInfo = { fileName: toNormalizedPath(fileName), path: this.toPath(fileName) }; + const configFileName = this.getConfigFileNameForFile(originalFileInfo); + if (!configFileName) + return void 0; + let configuredProject = this.findConfiguredProjectByProjectName(configFileName); + if (!configuredProject) { + if (project.getCompilerOptions().disableReferencedProjectLoad) { + if (isSourceOfProjectReferenceRedirect) { + return location; + } + return (scriptInfo == null ? void 0 : scriptInfo.containingProjects.length) ? originalLocation : location; + } + configuredProject = this.createAndLoadConfiguredProject(configFileName, `Creating project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}`); + } + updateProjectIfDirty(configuredProject); + const projectContainsOriginalInfo = (project2) => { + const info = this.getScriptInfo(fileName); + return info && projectContainsInfoDirectly(project2, info); + }; + if (configuredProject.isSolution() || !projectContainsOriginalInfo(configuredProject)) { + configuredProject = forEachResolvedProjectReferenceProject( + configuredProject, + fileName, + (child) => { + updateProjectIfDirty(child); + return projectContainsOriginalInfo(child) ? child : void 0; + }, + 2 /* FindCreateLoad */, + `Creating project referenced in solution ${configuredProject.projectName} to find possible configured project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}` + ); + if (!configuredProject) + return void 0; + if (configuredProject === project) + return originalLocation; + } + addOriginalConfiguredProject(configuredProject); + const originalScriptInfo = this.getScriptInfo(fileName); + if (!originalScriptInfo || !originalScriptInfo.containingProjects.length) + return void 0; + originalScriptInfo.containingProjects.forEach((project2) => { + if (isConfiguredProject(project2)) { + addOriginalConfiguredProject(project2); + } + }); + return originalLocation; + function addOriginalConfiguredProject(originalProject) { + if (!project.originalConfiguredProjects) { + project.originalConfiguredProjects = /* @__PURE__ */ new Set(); + } + project.originalConfiguredProjects.add(originalProject.canonicalConfigFilePath); + } + } + /** @internal */ + fileExists(fileName) { + return !!this.getScriptInfoForNormalizedPath(fileName) || this.host.fileExists(fileName); + } + findExternalProjectContainingOpenScriptInfo(info) { + return find(this.externalProjects, (proj) => { + updateProjectIfDirty(proj); + return proj.containsScriptInfo(info); + }); + } + getOrCreateOpenScriptInfo(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath) { + const info = this.getOrCreateScriptInfoOpenedByClientForNormalizedPath(fileName, projectRootPath ? this.getNormalizedAbsolutePath(projectRootPath) : this.currentDirectory, fileContent, scriptKind, hasMixedContent); + this.openFiles.set(info.path, projectRootPath); + return info; + } + assignProjectToOpenedScriptInfo(info) { + let configFileName; + let configFileErrors; + let project = this.findExternalProjectContainingOpenScriptInfo(info); + let retainProjects; + let projectForConfigFileDiag; + let defaultConfigProjectIsCreated = false; + if (!project && this.serverMode === 0 /* Semantic */) { + configFileName = this.getConfigFileNameForFile(info); + if (configFileName) { + project = this.findConfiguredProjectByProjectName(configFileName); + if (!project) { + project = this.createLoadAndUpdateConfiguredProject(configFileName, `Creating possible configured project for ${info.fileName} to open`); + defaultConfigProjectIsCreated = true; + } else { + updateProjectIfDirty(project); + } + projectForConfigFileDiag = project.containsScriptInfo(info) ? project : void 0; + retainProjects = project; + if (!projectContainsInfoDirectly(project, info)) { + forEachResolvedProjectReferenceProject( + project, + info.path, + (child) => { + updateProjectIfDirty(child); + if (!isArray(retainProjects)) { + retainProjects = [project, child]; + } else { + retainProjects.push(child); + } + if (projectContainsInfoDirectly(child, info)) { + projectForConfigFileDiag = child; + return child; + } + if (!projectForConfigFileDiag && child.containsScriptInfo(info)) { + projectForConfigFileDiag = child; + } + }, + 2 /* FindCreateLoad */, + `Creating project referenced in solution ${project.projectName} to find possible configured project for ${info.fileName} to open` + ); + } + if (projectForConfigFileDiag) { + configFileName = projectForConfigFileDiag.getConfigFilePath(); + if (projectForConfigFileDiag !== project || defaultConfigProjectIsCreated) { + configFileErrors = projectForConfigFileDiag.getAllProjectErrors(); + this.sendConfigFileDiagEvent(projectForConfigFileDiag, info.fileName); + } + } else { + configFileName = void 0; + } + this.createAncestorProjects(info, project); + } + } + info.containingProjects.forEach(updateProjectIfDirty); + if (info.isOrphan()) { + if (isArray(retainProjects)) { + retainProjects.forEach((project2) => this.sendConfigFileDiagEvent(project2, info.fileName)); + } else if (retainProjects) { + this.sendConfigFileDiagEvent(retainProjects, info.fileName); + } + Debug.assert(this.openFiles.has(info.path)); + this.assignOrphanScriptInfoToInferredProject(info, this.openFiles.get(info.path)); + } + Debug.assert(!info.isOrphan()); + return { configFileName, configFileErrors, retainProjects }; + } + createAncestorProjects(info, project) { + if (!info.isAttached(project)) + return; + while (true) { + if (!project.isInitialLoadPending() && (!project.getCompilerOptions().composite || project.getCompilerOptions().disableSolutionSearching)) + return; + const configFileName = this.getConfigFileNameForFile({ + fileName: project.getConfigFilePath(), + path: info.path, + configFileInfo: true + }); + if (!configFileName) + return; + const ancestor = this.findConfiguredProjectByProjectName(configFileName) || this.createConfiguredProjectWithDelayLoad(configFileName, `Creating project possibly referencing default composite project ${project.getProjectName()} of open file ${info.fileName}`); + if (ancestor.isInitialLoadPending()) { + ancestor.setPotentialProjectReference(project.canonicalConfigFilePath); + } + project = ancestor; + } + } + /** @internal */ + loadAncestorProjectTree(forProjects) { + forProjects = forProjects || mapDefinedEntries( + this.configuredProjects, + (key, project) => !project.isInitialLoadPending() ? [key, true] : void 0 + ); + const seenProjects = /* @__PURE__ */ new Set(); + for (const project of arrayFrom(this.configuredProjects.values())) { + if (forEachPotentialProjectReference(project, (potentialRefPath) => forProjects.has(potentialRefPath))) { + updateProjectIfDirty(project); + } + this.ensureProjectChildren(project, forProjects, seenProjects); + } + } + ensureProjectChildren(project, forProjects, seenProjects) { + var _a; + if (!tryAddToSet(seenProjects, project.canonicalConfigFilePath)) + return; + if (project.getCompilerOptions().disableReferencedProjectLoad) + return; + const children = (_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(); + if (!children) + return; + for (const child of children) { + if (!child) + continue; + const referencedProject = forEachResolvedProjectReference(child.references, (ref) => forProjects.has(ref.sourceFile.path) ? ref : void 0); + if (!referencedProject) + continue; + const configFileName = toNormalizedPath(child.sourceFile.fileName); + const childProject = project.projectService.findConfiguredProjectByProjectName(configFileName) || project.projectService.createAndLoadConfiguredProject(configFileName, `Creating project referenced by : ${project.projectName} as it references project ${referencedProject.sourceFile.fileName}`); + updateProjectIfDirty(childProject); + this.ensureProjectChildren(childProject, forProjects, seenProjects); + } + } + cleanupAfterOpeningFile(toRetainConfigProjects) { + this.removeOrphanConfiguredProjects(toRetainConfigProjects); + for (const inferredProject of this.inferredProjects.slice()) { + if (inferredProject.isOrphan()) { + this.removeProject(inferredProject); + } + } + this.removeOrphanScriptInfos(); + } + openClientFileWithNormalizedPath(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath) { + const info = this.getOrCreateOpenScriptInfo(fileName, fileContent, scriptKind, hasMixedContent, projectRootPath); + const { retainProjects, ...result } = this.assignProjectToOpenedScriptInfo(info); + this.cleanupAfterOpeningFile(retainProjects); + this.telemetryOnOpenFile(info); + this.printProjects(); + return result; + } + removeOrphanConfiguredProjects(toRetainConfiguredProjects) { + const toRemoveConfiguredProjects = new Map(this.configuredProjects); + const markOriginalProjectsAsUsed = (project) => { + if (!project.isOrphan() && project.originalConfiguredProjects) { + project.originalConfiguredProjects.forEach( + (_value, configuredProjectPath) => { + const project2 = this.getConfiguredProjectByCanonicalConfigFilePath(configuredProjectPath); + return project2 && retainConfiguredProject(project2); + } + ); + } + }; + if (toRetainConfiguredProjects) { + if (isArray(toRetainConfiguredProjects)) { + toRetainConfiguredProjects.forEach(retainConfiguredProject); + } else { + retainConfiguredProject(toRetainConfiguredProjects); + } + } + this.inferredProjects.forEach(markOriginalProjectsAsUsed); + this.externalProjects.forEach(markOriginalProjectsAsUsed); + this.configuredProjects.forEach((project) => { + if (project.hasOpenRef()) { + retainConfiguredProject(project); + } else if (toRemoveConfiguredProjects.has(project.canonicalConfigFilePath)) { + forEachReferencedProject( + project, + (ref) => isRetained(ref) && retainConfiguredProject(project) + ); + } + }); + toRemoveConfiguredProjects.forEach((project) => this.removeProject(project)); + function isRetained(project) { + return project.hasOpenRef() || !toRemoveConfiguredProjects.has(project.canonicalConfigFilePath); + } + function retainConfiguredProject(project) { + if (toRemoveConfiguredProjects.delete(project.canonicalConfigFilePath)) { + markOriginalProjectsAsUsed(project); + forEachReferencedProject(project, retainConfiguredProject); + } + } + } + removeOrphanScriptInfos() { + const toRemoveScriptInfos = new Map(this.filenameToScriptInfo); + this.filenameToScriptInfo.forEach((info) => { + if (!info.isScriptOpen() && info.isOrphan() && !info.isContainedByBackgroundProject()) { + if (!info.sourceMapFilePath) + return; + let sourceInfos; + if (isString(info.sourceMapFilePath)) { + const sourceMapInfo = this.getScriptInfoForPath(info.sourceMapFilePath); + sourceInfos = sourceMapInfo && sourceMapInfo.sourceInfos; + } else { + sourceInfos = info.sourceMapFilePath.sourceInfos; + } + if (!sourceInfos) + return; + if (!forEachKey(sourceInfos, (path) => { + const info2 = this.getScriptInfoForPath(path); + return !!info2 && (info2.isScriptOpen() || !info2.isOrphan()); + })) { + return; + } + } + toRemoveScriptInfos.delete(info.path); + if (info.sourceMapFilePath) { + let sourceInfos; + if (isString(info.sourceMapFilePath)) { + toRemoveScriptInfos.delete(info.sourceMapFilePath); + const sourceMapInfo = this.getScriptInfoForPath(info.sourceMapFilePath); + sourceInfos = sourceMapInfo && sourceMapInfo.sourceInfos; + } else { + sourceInfos = info.sourceMapFilePath.sourceInfos; + } + if (sourceInfos) { + sourceInfos.forEach((_value, path) => toRemoveScriptInfos.delete(path)); + } + } + }); + toRemoveScriptInfos.forEach((info) => { + this.stopWatchingScriptInfo(info); + this.deleteScriptInfo(info); + info.closeSourceMapFileWatcher(); + }); + } + telemetryOnOpenFile(scriptInfo) { + if (this.serverMode !== 0 /* Semantic */ || !this.eventHandler || !scriptInfo.isJavaScript() || !addToSeen(this.allJsFilesForOpenFileTelemetry, scriptInfo.path)) { + return; + } + const project = this.ensureDefaultProjectForFile(scriptInfo); + if (!project.languageServiceEnabled) { + return; + } + const sourceFile = project.getSourceFile(scriptInfo.path); + const checkJs = !!sourceFile && !!sourceFile.checkJsDirective; + this.eventHandler({ eventName: OpenFileInfoTelemetryEvent, data: { info: { checkJs } } }); + } + closeClientFile(uncheckedFileName, skipAssignOrphanScriptInfosToInferredProject) { + const info = this.getScriptInfoForNormalizedPath(toNormalizedPath(uncheckedFileName)); + const result = info ? this.closeOpenFile(info, skipAssignOrphanScriptInfosToInferredProject) : false; + if (!skipAssignOrphanScriptInfosToInferredProject) { + this.printProjects(); + } + return result; + } + collectChanges(lastKnownProjectVersions, currentProjects, includeProjectReferenceRedirectInfo, result) { + for (const proj of currentProjects) { + const knownProject = find(lastKnownProjectVersions, (p) => p.projectName === proj.getProjectName()); + result.push(proj.getChangesSinceVersion(knownProject && knownProject.version, includeProjectReferenceRedirectInfo)); + } + } + /** @internal */ + synchronizeProjectList(knownProjects, includeProjectReferenceRedirectInfo) { + const files = []; + this.collectChanges(knownProjects, this.externalProjects, includeProjectReferenceRedirectInfo, files); + this.collectChanges(knownProjects, this.configuredProjects.values(), includeProjectReferenceRedirectInfo, files); + this.collectChanges(knownProjects, this.inferredProjects, includeProjectReferenceRedirectInfo, files); + return files; + } + /** @internal */ + applyChangesInOpenFiles(openFiles, changedFiles, closedFiles) { + let openScriptInfos; + let assignOrphanScriptInfosToInferredProject = false; + if (openFiles) { + for (const file of openFiles) { + const info = this.getOrCreateOpenScriptInfo( + toNormalizedPath(file.fileName), + file.content, + tryConvertScriptKindName(file.scriptKind), + file.hasMixedContent, + file.projectRootPath ? toNormalizedPath(file.projectRootPath) : void 0 + ); + (openScriptInfos || (openScriptInfos = [])).push(info); + } + } + if (changedFiles) { + for (const file of changedFiles) { + const scriptInfo = this.getScriptInfo(file.fileName); + Debug.assert(!!scriptInfo); + this.applyChangesToFile(scriptInfo, file.changes); + } + } + if (closedFiles) { + for (const file of closedFiles) { + assignOrphanScriptInfosToInferredProject = this.closeClientFile( + file, + /*skipAssignOrphanScriptInfosToInferredProject*/ + true + ) || assignOrphanScriptInfosToInferredProject; + } + } + let retainProjects; + if (openScriptInfos) { + retainProjects = flatMap(openScriptInfos, (info) => this.assignProjectToOpenedScriptInfo(info).retainProjects); + } + if (assignOrphanScriptInfosToInferredProject) { + this.assignOrphanScriptInfosToInferredProject(); + } + if (openScriptInfos) { + this.cleanupAfterOpeningFile(retainProjects); + openScriptInfos.forEach((info) => this.telemetryOnOpenFile(info)); + this.printProjects(); + } else if (length(closedFiles)) { + this.printProjects(); + } + } + /** @internal */ + applyChangesToFile(scriptInfo, changes) { + for (const change of changes) { + scriptInfo.editContent(change.span.start, change.span.start + change.span.length, change.newText); + } + } + closeConfiguredProjectReferencedFromExternalProject(configFile) { + const configuredProject = this.findConfiguredProjectByProjectName(configFile); + if (configuredProject) { + configuredProject.deleteExternalProjectReference(); + if (!configuredProject.hasOpenRef()) { + this.removeProject(configuredProject); + return; + } + } + } + closeExternalProject(uncheckedFileName) { + const fileName = toNormalizedPath(uncheckedFileName); + const configFiles = this.externalProjectToConfiguredProjectMap.get(fileName); + if (configFiles) { + for (const configFile of configFiles) { + this.closeConfiguredProjectReferencedFromExternalProject(configFile); + } + this.externalProjectToConfiguredProjectMap.delete(fileName); + } else { + const externalProject = this.findExternalProjectByProjectName(uncheckedFileName); + if (externalProject) { + this.removeProject(externalProject); + } + } + } + openExternalProjects(projects) { + const projectsToClose = arrayToMap(this.externalProjects, (p) => p.getProjectName(), (_) => true); + forEachKey(this.externalProjectToConfiguredProjectMap, (externalProjectName) => { + projectsToClose.set(externalProjectName, true); + }); + for (const externalProject of projects) { + this.openExternalProject(externalProject); + projectsToClose.delete(externalProject.projectFileName); + } + forEachKey(projectsToClose, (externalProjectName) => { + this.closeExternalProject(externalProjectName); + }); + } + static escapeFilenameForRegex(filename) { + return filename.replace(this.filenameEscapeRegexp, "\\$&"); + } + resetSafeList() { + this.safelist = defaultTypeSafeList; + } + applySafeList(proj) { + const { rootFiles } = proj; + const typeAcquisition = proj.typeAcquisition; + Debug.assert(!!typeAcquisition, "proj.typeAcquisition should be set by now"); + if (typeAcquisition.enable === false || typeAcquisition.disableFilenameBasedTypeAcquisition) { + return []; + } + const typeAcqInclude = typeAcquisition.include || (typeAcquisition.include = []); + const excludeRules = []; + const normalizedNames = rootFiles.map((f) => normalizeSlashes(f.fileName)); + const excludedFiles = []; + for (const name of Object.keys(this.safelist)) { + const rule2 = this.safelist[name]; + for (const root of normalizedNames) { + if (rule2.match.test(root)) { + this.logger.info(`Excluding files based on rule ${name} matching file '${root}'`); + if (rule2.types) { + for (const type of rule2.types) { + if (!typeAcqInclude.includes(type)) { + typeAcqInclude.push(type); + } + } + } + if (rule2.exclude) { + for (const exclude of rule2.exclude) { + const processedRule = root.replace(rule2.match, (...groups) => { + return exclude.map((groupNumberOrString) => { + if (typeof groupNumberOrString === "number") { + if (!isString(groups[groupNumberOrString])) { + this.logger.info(`Incorrect RegExp specification in safelist rule ${name} - not enough groups`); + return "\\*"; + } + return _ProjectService.escapeFilenameForRegex(groups[groupNumberOrString]); + } + return groupNumberOrString; + }).join(""); + }); + if (!excludeRules.includes(processedRule)) { + excludeRules.push(processedRule); + } + } + } else { + const escaped = _ProjectService.escapeFilenameForRegex(root); + if (!excludeRules.includes(escaped)) { + excludeRules.push(escaped); + } + } + } + } + } + const excludeRegexes = excludeRules.map((e) => new RegExp(e, "i")); + const filesToKeep = []; + for (let i = 0; i < proj.rootFiles.length; i++) { + if (excludeRegexes.some((re) => re.test(normalizedNames[i]))) { + excludedFiles.push(normalizedNames[i]); + } else { + let exclude = false; + if (typeAcquisition.enable) { + const baseName = getBaseFileName(toFileNameLowerCase(normalizedNames[i])); + if (fileExtensionIs(baseName, "js")) { + const inferredTypingName = removeFileExtension(baseName); + const cleanedTypingName = removeMinAndVersionNumbers(inferredTypingName); + const typeName = this.legacySafelist.get(cleanedTypingName); + if (typeName !== void 0) { + this.logger.info(`Excluded '${normalizedNames[i]}' because it matched ${cleanedTypingName} from the legacy safelist`); + excludedFiles.push(normalizedNames[i]); + exclude = true; + if (!typeAcqInclude.includes(typeName)) { + typeAcqInclude.push(typeName); + } + } + } + } + if (!exclude) { + if (/^.+[.-]min\.js$/.test(normalizedNames[i])) { + excludedFiles.push(normalizedNames[i]); + } else { + filesToKeep.push(proj.rootFiles[i]); + } + } + } + } + proj.rootFiles = filesToKeep; + return excludedFiles; + } + openExternalProject(proj) { + proj.typeAcquisition = proj.typeAcquisition || {}; + proj.typeAcquisition.include = proj.typeAcquisition.include || []; + proj.typeAcquisition.exclude = proj.typeAcquisition.exclude || []; + if (proj.typeAcquisition.enable === void 0) { + proj.typeAcquisition.enable = hasNoTypeScriptSource(proj.rootFiles.map((f) => f.fileName)); + } + const excludedFiles = this.applySafeList(proj); + let tsConfigFiles; + const rootFiles = []; + for (const file of proj.rootFiles) { + const normalized = toNormalizedPath(file.fileName); + if (getBaseConfigFileName(normalized)) { + if (this.serverMode === 0 /* Semantic */ && this.host.fileExists(normalized)) { + (tsConfigFiles || (tsConfigFiles = [])).push(normalized); + } + } else { + rootFiles.push(file); + } + } + if (tsConfigFiles) { + tsConfigFiles.sort(); + } + const externalProject = this.findExternalProjectByProjectName(proj.projectFileName); + let exisingConfigFiles; + if (externalProject) { + externalProject.excludedFiles = excludedFiles; + if (!tsConfigFiles) { + const compilerOptions = convertCompilerOptions(proj.options); + const watchOptionsAndErrors = convertWatchOptions(proj.options, externalProject.getCurrentDirectory()); + const lastFileExceededProgramSize = this.getFilenameForExceededTotalSizeLimitForNonTsFiles(proj.projectFileName, compilerOptions, proj.rootFiles, externalFilePropertyReader); + if (lastFileExceededProgramSize) { + externalProject.disableLanguageService(lastFileExceededProgramSize); + } else { + externalProject.enableLanguageService(); + } + externalProject.setProjectErrors(watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.errors); + this.updateRootAndOptionsOfNonInferredProject(externalProject, proj.rootFiles, externalFilePropertyReader, compilerOptions, proj.typeAcquisition, proj.options.compileOnSave, watchOptionsAndErrors == null ? void 0 : watchOptionsAndErrors.watchOptions); + externalProject.updateGraph(); + return; + } + this.closeExternalProject(proj.projectFileName); + } else if (this.externalProjectToConfiguredProjectMap.get(proj.projectFileName)) { + if (!tsConfigFiles) { + this.closeExternalProject(proj.projectFileName); + } else { + const oldConfigFiles = this.externalProjectToConfiguredProjectMap.get(proj.projectFileName); + let iNew = 0; + let iOld = 0; + while (iNew < tsConfigFiles.length && iOld < oldConfigFiles.length) { + const newConfig = tsConfigFiles[iNew]; + const oldConfig = oldConfigFiles[iOld]; + if (oldConfig < newConfig) { + this.closeConfiguredProjectReferencedFromExternalProject(oldConfig); + iOld++; + } else if (oldConfig > newConfig) { + iNew++; + } else { + (exisingConfigFiles || (exisingConfigFiles = [])).push(oldConfig); + iOld++; + iNew++; + } + } + for (let i = iOld; i < oldConfigFiles.length; i++) { + this.closeConfiguredProjectReferencedFromExternalProject(oldConfigFiles[i]); + } + } + } + if (tsConfigFiles) { + this.externalProjectToConfiguredProjectMap.set(proj.projectFileName, tsConfigFiles); + for (const tsconfigFile of tsConfigFiles) { + let project = this.findConfiguredProjectByProjectName(tsconfigFile); + if (!project) { + project = this.getHostPreferences().lazyConfiguredProjectsFromExternalProject ? this.createConfiguredProjectWithDelayLoad(tsconfigFile, `Creating configured project in external project: ${proj.projectFileName}`) : this.createLoadAndUpdateConfiguredProject(tsconfigFile, `Creating configured project in external project: ${proj.projectFileName}`); + } + if (project && !contains(exisingConfigFiles, tsconfigFile)) { + project.addExternalProjectReference(); + } + } + } else { + this.externalProjectToConfiguredProjectMap.delete(proj.projectFileName); + const project = this.createExternalProject(proj.projectFileName, rootFiles, proj.options, proj.typeAcquisition, excludedFiles); + project.updateGraph(); + } + } + hasDeferredExtension() { + for (const extension of this.hostConfiguration.extraFileExtensions) { + if (extension.scriptKind === 7 /* Deferred */) { + return true; + } + } + return false; + } + /** + * Performs the initial steps of enabling a plugin by finding and instantiating the module for a plugin either asynchronously or synchronously + * @internal + */ + requestEnablePlugin(project, pluginConfigEntry, searchPaths) { + if (!this.host.importPlugin && !this.host.require) { + this.logger.info("Plugins were requested but not running in environment that supports 'require'. Nothing will be loaded"); + return; + } + this.logger.info(`Enabling plugin ${pluginConfigEntry.name} from candidate paths: ${searchPaths.join(",")}`); + if (!pluginConfigEntry.name || parsePackageName(pluginConfigEntry.name).rest) { + this.logger.info(`Skipped loading plugin ${pluginConfigEntry.name || JSON.stringify(pluginConfigEntry)} because only package name is allowed plugin name`); + return; + } + if (this.host.importPlugin) { + const importPromise = Project3.importServicePluginAsync( + pluginConfigEntry, + searchPaths, + this.host, + (s) => this.logger.info(s) + ); + this.pendingPluginEnablements ?? (this.pendingPluginEnablements = /* @__PURE__ */ new Map()); + let promises = this.pendingPluginEnablements.get(project); + if (!promises) + this.pendingPluginEnablements.set(project, promises = []); + promises.push(importPromise); + return; + } + this.endEnablePlugin( + project, + Project3.importServicePluginSync( + pluginConfigEntry, + searchPaths, + this.host, + (s) => this.logger.info(s) + ) + ); + } + /** + * Performs the remaining steps of enabling a plugin after its module has been instantiated. + * @internal + */ + endEnablePlugin(project, { pluginConfigEntry, resolvedModule, errorLogs }) { + var _a; + if (resolvedModule) { + const configurationOverride = (_a = this.currentPluginConfigOverrides) == null ? void 0 : _a.get(pluginConfigEntry.name); + if (configurationOverride) { + const pluginName = pluginConfigEntry.name; + pluginConfigEntry = configurationOverride; + pluginConfigEntry.name = pluginName; + } + project.enableProxy(resolvedModule, pluginConfigEntry); + } else { + forEach(errorLogs, (message) => this.logger.info(message)); + this.logger.info(`Couldn't find ${pluginConfigEntry.name}`); + } + } + /** @internal */ + hasNewPluginEnablementRequests() { + return !!this.pendingPluginEnablements; + } + /** @internal */ + hasPendingPluginEnablements() { + return !!this.currentPluginEnablementPromise; + } + /** + * Waits for any ongoing plugin enablement requests to complete. + * + * @internal + */ + async waitForPendingPlugins() { + while (this.currentPluginEnablementPromise) { + await this.currentPluginEnablementPromise; + } + } + /** + * Starts enabling any requested plugins without waiting for the result. + * + * @internal + */ + enableRequestedPlugins() { + if (this.pendingPluginEnablements) { + void this.enableRequestedPluginsAsync(); + } + } + async enableRequestedPluginsAsync() { + if (this.currentPluginEnablementPromise) { + await this.waitForPendingPlugins(); + } + if (!this.pendingPluginEnablements) { + return; + } + const entries = arrayFrom(this.pendingPluginEnablements.entries()); + this.pendingPluginEnablements = void 0; + this.currentPluginEnablementPromise = this.enableRequestedPluginsWorker(entries); + await this.currentPluginEnablementPromise; + } + async enableRequestedPluginsWorker(pendingPlugins) { + Debug.assert(this.currentPluginEnablementPromise === void 0); + await Promise.all(map(pendingPlugins, ([project, promises]) => this.enableRequestedPluginsForProjectAsync(project, promises))); + this.currentPluginEnablementPromise = void 0; + this.sendProjectsUpdatedInBackgroundEvent(); + } + async enableRequestedPluginsForProjectAsync(project, promises) { + const results = await Promise.all(promises); + if (project.isClosed()) { + return; + } + for (const result of results) { + this.endEnablePlugin(project, result); + } + this.delayUpdateProjectGraph(project); + } + configurePlugin(args) { + this.forEachEnabledProject((project) => project.onPluginConfigurationChanged(args.pluginName, args.configuration)); + this.currentPluginConfigOverrides = this.currentPluginConfigOverrides || /* @__PURE__ */ new Map(); + this.currentPluginConfigOverrides.set(args.pluginName, args.configuration); + } + /** @internal */ + getPackageJsonsVisibleToFile(fileName, rootDir) { + const packageJsonCache = this.packageJsonCache; + const rootPath = rootDir && this.toPath(rootDir); + const filePath = this.toPath(fileName); + const result = []; + const processDirectory = (directory) => { + switch (packageJsonCache.directoryHasPackageJson(directory)) { + case 3 /* Maybe */: + packageJsonCache.searchDirectoryAndAncestors(directory); + return processDirectory(directory); + case -1 /* True */: + const packageJsonFileName = combinePaths(directory, "package.json"); + this.watchPackageJsonFile(packageJsonFileName); + const info = packageJsonCache.getInDirectory(directory); + if (info) + result.push(info); + } + if (rootPath && rootPath === directory) { + return true; + } + }; + forEachAncestorDirectory(getDirectoryPath(filePath), processDirectory); + return result; + } + /** @internal */ + getNearestAncestorDirectoryWithPackageJson(fileName) { + return forEachAncestorDirectory(fileName, (directory) => { + switch (this.packageJsonCache.directoryHasPackageJson(this.toPath(directory))) { + case -1 /* True */: + return directory; + case 0 /* False */: + return void 0; + case 3 /* Maybe */: + return this.host.fileExists(combinePaths(directory, "package.json")) ? directory : void 0; + } + }); + } + /** @internal */ + watchPackageJsonFile(path) { + const watchers = this.packageJsonFilesMap || (this.packageJsonFilesMap = /* @__PURE__ */ new Map()); + if (!watchers.has(path)) { + this.invalidateProjectPackageJson(path); + watchers.set( + path, + this.watchFactory.watchFile( + path, + (fileName, eventKind) => { + const path2 = this.toPath(fileName); + switch (eventKind) { + case 0 /* Created */: + return Debug.fail(); + case 1 /* Changed */: + this.packageJsonCache.addOrUpdate(path2); + this.invalidateProjectPackageJson(path2); + break; + case 2 /* Deleted */: + this.packageJsonCache.delete(path2); + this.invalidateProjectPackageJson(path2); + watchers.get(path2).close(); + watchers.delete(path2); + } + }, + 250 /* Low */, + this.hostConfiguration.watchOptions, + WatchType.PackageJson + ) + ); + } + } + /** @internal */ + onAddPackageJson(path) { + this.packageJsonCache.addOrUpdate(path); + this.watchPackageJsonFile(path); + } + /** @internal */ + includePackageJsonAutoImports() { + switch (this.hostConfiguration.preferences.includePackageJsonAutoImports) { + case "on": + return 1 /* On */; + case "off": + return 0 /* Off */; + default: + return 2 /* Auto */; + } + } + /** @internal */ + invalidateProjectPackageJson(packageJsonPath) { + this.configuredProjects.forEach(invalidate); + this.inferredProjects.forEach(invalidate); + this.externalProjects.forEach(invalidate); + function invalidate(project) { + if (packageJsonPath) { + project.onPackageJsonChange(packageJsonPath); + } else { + project.onAutoImportProviderSettingsChanged(); + } + } + } + /** @internal */ + getIncompleteCompletionsCache() { + return this.incompleteCompletionsCache || (this.incompleteCompletionsCache = createIncompleteCompletionsCache()); + } + }; + /** Makes a filename safe to insert in a RegExp */ + _ProjectService.filenameEscapeRegexp = /[-/\\^$*+?.()|[\]{}]/g; + ProjectService3 = _ProjectService; + } + }); + + // src/server/moduleSpecifierCache.ts + function createModuleSpecifierCache(host) { + let containedNodeModulesWatchers; + let cache; + let currentKey; + const result = { + get(fromFileName, toFileName2, preferences, options) { + if (!cache || currentKey !== key(fromFileName, preferences, options)) + return void 0; + return cache.get(toFileName2); + }, + set(fromFileName, toFileName2, preferences, options, modulePaths, moduleSpecifiers) { + ensureCache(fromFileName, preferences, options).set(toFileName2, createInfo( + modulePaths, + moduleSpecifiers, + /*isBlockedByPackageJsonDependencies*/ + false + )); + if (moduleSpecifiers) { + for (const p of modulePaths) { + if (p.isInNodeModules) { + const nodeModulesPath = p.path.substring(0, p.path.indexOf(nodeModulesPathPart) + nodeModulesPathPart.length - 1); + if (!(containedNodeModulesWatchers == null ? void 0 : containedNodeModulesWatchers.has(nodeModulesPath))) { + (containedNodeModulesWatchers || (containedNodeModulesWatchers = /* @__PURE__ */ new Map())).set( + nodeModulesPath, + host.watchNodeModulesForPackageJsonChanges(nodeModulesPath) + ); + } + } + } + } + }, + setModulePaths(fromFileName, toFileName2, preferences, options, modulePaths) { + const cache2 = ensureCache(fromFileName, preferences, options); + const info = cache2.get(toFileName2); + if (info) { + info.modulePaths = modulePaths; + } else { + cache2.set(toFileName2, createInfo( + modulePaths, + /*moduleSpecifiers*/ + void 0, + /*isBlockedByPackageJsonDependencies*/ + void 0 + )); + } + }, + setBlockedByPackageJsonDependencies(fromFileName, toFileName2, preferences, options, isBlockedByPackageJsonDependencies) { + const cache2 = ensureCache(fromFileName, preferences, options); + const info = cache2.get(toFileName2); + if (info) { + info.isBlockedByPackageJsonDependencies = isBlockedByPackageJsonDependencies; + } else { + cache2.set(toFileName2, createInfo( + /*modulePaths*/ + void 0, + /*moduleSpecifiers*/ + void 0, + isBlockedByPackageJsonDependencies + )); + } + }, + clear() { + containedNodeModulesWatchers == null ? void 0 : containedNodeModulesWatchers.forEach((watcher) => watcher.close()); + cache == null ? void 0 : cache.clear(); + containedNodeModulesWatchers == null ? void 0 : containedNodeModulesWatchers.clear(); + currentKey = void 0; + }, + count() { + return cache ? cache.size : 0; + } + }; + if (Debug.isDebugging) { + Object.defineProperty(result, "__cache", { get: () => cache }); + } + return result; + function ensureCache(fromFileName, preferences, options) { + const newKey = key(fromFileName, preferences, options); + if (cache && currentKey !== newKey) { + result.clear(); + } + currentKey = newKey; + return cache || (cache = /* @__PURE__ */ new Map()); + } + function key(fromFileName, preferences, options) { + return `${fromFileName},${preferences.importModuleSpecifierEnding},${preferences.importModuleSpecifierPreference},${options.overrideImportMode}`; + } + function createInfo(modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies) { + return { modulePaths, moduleSpecifiers, isBlockedByPackageJsonDependencies }; + } + } + var init_moduleSpecifierCache = __esm({ + "src/server/moduleSpecifierCache.ts"() { + "use strict"; + init_ts7(); + } + }); + + // src/server/packageJsonCache.ts + function createPackageJsonCache(host) { + const packageJsons = /* @__PURE__ */ new Map(); + const directoriesWithoutPackageJson = /* @__PURE__ */ new Map(); + return { + addOrUpdate, + forEach: packageJsons.forEach.bind(packageJsons), + get: packageJsons.get.bind(packageJsons), + delete: (fileName) => { + packageJsons.delete(fileName); + directoriesWithoutPackageJson.set(getDirectoryPath(fileName), true); + }, + getInDirectory: (directory) => { + return packageJsons.get(combinePaths(directory, "package.json")) || void 0; + }, + directoryHasPackageJson, + searchDirectoryAndAncestors: (directory) => { + forEachAncestorDirectory(directory, (ancestor) => { + if (directoryHasPackageJson(ancestor) !== 3 /* Maybe */) { + return true; + } + const packageJsonFileName = host.toPath(combinePaths(ancestor, "package.json")); + if (tryFileExists(host, packageJsonFileName)) { + addOrUpdate(packageJsonFileName); + } else { + directoriesWithoutPackageJson.set(ancestor, true); + } + }); + } + }; + function addOrUpdate(fileName) { + const packageJsonInfo = Debug.checkDefined(createPackageJsonInfo(fileName, host.host)); + packageJsons.set(fileName, packageJsonInfo); + directoriesWithoutPackageJson.delete(getDirectoryPath(fileName)); + } + function directoryHasPackageJson(directory) { + return packageJsons.has(combinePaths(directory, "package.json")) ? -1 /* True */ : directoriesWithoutPackageJson.has(directory) ? 0 /* False */ : 3 /* Maybe */; + } + } + var init_packageJsonCache = __esm({ + "src/server/packageJsonCache.ts"() { + "use strict"; + init_ts7(); + } + }); + + // src/server/session.ts + function hrTimeToMilliseconds(time) { + const seconds = time[0]; + const nanoseconds = time[1]; + return (1e9 * seconds + nanoseconds) / 1e6; + } + function isDeclarationFileInJSOnlyNonConfiguredProject(project, file) { + if ((isInferredProject(project) || isExternalProject(project)) && project.isJsOnlyProject()) { + const scriptInfo = project.getScriptInfoForNormalizedPath(file); + return scriptInfo && !scriptInfo.isJavaScript(); + } + return false; + } + function dtsChangeCanAffectEmit(compilationSettings) { + return getEmitDeclarations(compilationSettings) || !!compilationSettings.emitDecoratorMetadata; + } + function formatDiag(fileName, project, diag2) { + const scriptInfo = project.getScriptInfoForNormalizedPath(fileName); + return { + start: scriptInfo.positionToLineOffset(diag2.start), + end: scriptInfo.positionToLineOffset(diag2.start + diag2.length), + // TODO: GH#18217 + text: flattenDiagnosticMessageText(diag2.messageText, "\n"), + code: diag2.code, + category: diagnosticCategoryName(diag2), + reportsUnnecessary: diag2.reportsUnnecessary, + reportsDeprecated: diag2.reportsDeprecated, + source: diag2.source, + relatedInformation: map(diag2.relatedInformation, formatRelatedInformation) + }; + } + function formatRelatedInformation(info) { + if (!info.file) { + return { + message: flattenDiagnosticMessageText(info.messageText, "\n"), + category: diagnosticCategoryName(info), + code: info.code + }; + } + return { + span: { + start: convertToLocation(getLineAndCharacterOfPosition(info.file, info.start)), + end: convertToLocation(getLineAndCharacterOfPosition(info.file, info.start + info.length)), + // TODO: GH#18217 + file: info.file.fileName + }, + message: flattenDiagnosticMessageText(info.messageText, "\n"), + category: diagnosticCategoryName(info), + code: info.code + }; + } + function convertToLocation(lineAndCharacter) { + return { line: lineAndCharacter.line + 1, offset: lineAndCharacter.character + 1 }; + } + function formatDiagnosticToProtocol(diag2, includeFileName) { + const start = diag2.file && convertToLocation(getLineAndCharacterOfPosition(diag2.file, diag2.start)); + const end = diag2.file && convertToLocation(getLineAndCharacterOfPosition(diag2.file, diag2.start + diag2.length)); + const text = flattenDiagnosticMessageText(diag2.messageText, "\n"); + const { code, source } = diag2; + const category = diagnosticCategoryName(diag2); + const common = { + start, + end, + text, + code, + category, + reportsUnnecessary: diag2.reportsUnnecessary, + reportsDeprecated: diag2.reportsDeprecated, + source, + relatedInformation: map(diag2.relatedInformation, formatRelatedInformation) + }; + return includeFileName ? { ...common, fileName: diag2.file && diag2.file.fileName } : common; + } + function allEditsBeforePos(edits, pos) { + return edits.every((edit) => textSpanEnd(edit.span) < pos); + } + function formatMessage2(msg, logger, byteLength, newLine) { + const verboseLogging = logger.hasLevel(3 /* verbose */); + const json = JSON.stringify(msg); + if (verboseLogging) { + logger.info(`${msg.type}:${stringifyIndented(msg)}`); + } + const len = byteLength(json, "utf8"); + return `Content-Length: ${1 + len}\r +\r +${json}${newLine}`; + } + function toEvent(eventName, body) { + return { + seq: 0, + type: "event", + event: eventName, + body + }; + } + function combineProjectOutput(defaultValue, getValue, projects, action) { + const outputs = flatMapToMutable(isArray(projects) ? projects : projects.projects, (project) => action(project, defaultValue)); + if (!isArray(projects) && projects.symLinkedProjects) { + projects.symLinkedProjects.forEach((projects2, path) => { + const value = getValue(path); + outputs.push(...flatMap(projects2, (project) => action(project, value))); + }); + } + return deduplicate(outputs, equateValues); + } + function createDocumentSpanSet() { + return createSet(({ textSpan }) => textSpan.start + 100003 * textSpan.length, documentSpansEqual); + } + function getRenameLocationsWorker(projects, defaultProject, initialLocation, findInStrings, findInComments, preferences) { + const perProjectResults = getPerProjectReferences( + projects, + defaultProject, + initialLocation, + /*isForRename*/ + true, + (project, position) => project.getLanguageService().findRenameLocations(position.fileName, position.pos, findInStrings, findInComments, preferences), + (renameLocation, cb) => cb(documentSpanLocation(renameLocation)) + ); + if (isArray(perProjectResults)) { + return perProjectResults; + } + const results = []; + const seen = createDocumentSpanSet(); + perProjectResults.forEach((projectResults, project) => { + for (const result of projectResults) { + if (!seen.has(result) && !getMappedLocationForProject(documentSpanLocation(result), project)) { + results.push(result); + seen.add(result); + } + } + }); + return results; + } + function getDefinitionLocation(defaultProject, initialLocation, isForRename) { + const infos = defaultProject.getLanguageService().getDefinitionAtPosition( + initialLocation.fileName, + initialLocation.pos, + /*searchOtherFilesOnly*/ + false, + /*stopAtAlias*/ + isForRename + ); + const info = infos && firstOrUndefined(infos); + return info && !info.isLocal ? { fileName: info.fileName, pos: info.textSpan.start } : void 0; + } + function getReferencesWorker(projects, defaultProject, initialLocation, logger) { + var _a, _b; + const perProjectResults = getPerProjectReferences( + projects, + defaultProject, + initialLocation, + /*isForRename*/ + false, + (project, position) => { + logger.info(`Finding references to ${position.fileName} position ${position.pos} in project ${project.getProjectName()}`); + return project.getLanguageService().findReferences(position.fileName, position.pos); + }, + (referencedSymbol, cb) => { + cb(documentSpanLocation(referencedSymbol.definition)); + for (const ref of referencedSymbol.references) { + cb(documentSpanLocation(ref)); + } + } + ); + if (isArray(perProjectResults)) { + return perProjectResults; + } + const defaultProjectResults = perProjectResults.get(defaultProject); + if (((_b = (_a = defaultProjectResults == null ? void 0 : defaultProjectResults[0]) == null ? void 0 : _a.references[0]) == null ? void 0 : _b.isDefinition) === void 0) { + perProjectResults.forEach((projectResults) => { + for (const referencedSymbol of projectResults) { + for (const ref of referencedSymbol.references) { + delete ref.isDefinition; + } + } + }); + } else { + const knownSymbolSpans = createDocumentSpanSet(); + for (const referencedSymbol of defaultProjectResults) { + for (const ref of referencedSymbol.references) { + if (ref.isDefinition) { + knownSymbolSpans.add(ref); + break; + } + } + } + const updatedProjects = /* @__PURE__ */ new Set(); + while (true) { + let progress = false; + perProjectResults.forEach((referencedSymbols, project) => { + if (updatedProjects.has(project)) + return; + const updated = project.getLanguageService().updateIsDefinitionOfReferencedSymbols(referencedSymbols, knownSymbolSpans); + if (updated) { + updatedProjects.add(project); + progress = true; + } + }); + if (!progress) + break; + } + perProjectResults.forEach((referencedSymbols, project) => { + if (updatedProjects.has(project)) + return; + for (const referencedSymbol of referencedSymbols) { + for (const ref of referencedSymbol.references) { + ref.isDefinition = false; + } + } + }); + } + const results = []; + const seenRefs = createDocumentSpanSet(); + perProjectResults.forEach((projectResults, project) => { + for (const referencedSymbol of projectResults) { + const mappedDefinitionFile = getMappedLocationForProject(documentSpanLocation(referencedSymbol.definition), project); + const definition = mappedDefinitionFile === void 0 ? referencedSymbol.definition : { + ...referencedSymbol.definition, + textSpan: createTextSpan(mappedDefinitionFile.pos, referencedSymbol.definition.textSpan.length), + // Why would the length be the same in the original? + fileName: mappedDefinitionFile.fileName, + contextSpan: getMappedContextSpanForProject(referencedSymbol.definition, project) + }; + let symbolToAddTo = find(results, (o) => documentSpansEqual(o.definition, definition)); + if (!symbolToAddTo) { + symbolToAddTo = { definition, references: [] }; + results.push(symbolToAddTo); + } + for (const ref of referencedSymbol.references) { + if (!seenRefs.has(ref) && !getMappedLocationForProject(documentSpanLocation(ref), project)) { + seenRefs.add(ref); + symbolToAddTo.references.push(ref); + } + } + } + }); + return results.filter((o) => o.references.length !== 0); + } + function forEachProjectInProjects(projects, path, cb) { + for (const project of isArray(projects) ? projects : projects.projects) { + cb(project, path); + } + if (!isArray(projects) && projects.symLinkedProjects) { + projects.symLinkedProjects.forEach((symlinkedProjects, symlinkedPath) => { + for (const project of symlinkedProjects) { + cb(project, symlinkedPath); + } + }); + } + } + function getPerProjectReferences(projects, defaultProject, initialLocation, isForRename, getResultsForPosition, forPositionInResult) { + const resultsMap = /* @__PURE__ */ new Map(); + const queue = createQueue(); + queue.enqueue({ project: defaultProject, location: initialLocation }); + forEachProjectInProjects(projects, initialLocation.fileName, (project, path) => { + const location = { fileName: path, pos: initialLocation.pos }; + queue.enqueue({ project, location }); + }); + const projectService = defaultProject.projectService; + const cancellationToken = defaultProject.getCancellationToken(); + const defaultDefinition = getDefinitionLocation(defaultProject, initialLocation, isForRename); + const getGeneratedDefinition = memoize( + () => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetGeneratedPosition(defaultDefinition) + ); + const getSourceDefinition = memoize( + () => defaultProject.isSourceOfProjectReferenceRedirect(defaultDefinition.fileName) ? defaultDefinition : defaultProject.getLanguageService().getSourceMapper().tryGetSourcePosition(defaultDefinition) + ); + const searchedProjectKeys = /* @__PURE__ */ new Set(); + onCancellation: + while (!queue.isEmpty()) { + while (!queue.isEmpty()) { + if (cancellationToken.isCancellationRequested()) + break onCancellation; + const { project, location } = queue.dequeue(); + if (resultsMap.has(project)) + continue; + if (isLocationProjectReferenceRedirect(project, location)) + continue; + updateProjectIfDirty(project); + if (!project.containsFile(toNormalizedPath(location.fileName))) { + continue; + } + const projectResults = searchPosition(project, location); + resultsMap.set(project, projectResults ?? emptyArray2); + searchedProjectKeys.add(getProjectKey(project)); + } + if (defaultDefinition) { + projectService.loadAncestorProjectTree(searchedProjectKeys); + projectService.forEachEnabledProject((project) => { + if (cancellationToken.isCancellationRequested()) + return; + if (resultsMap.has(project)) + return; + const location = mapDefinitionInProject(defaultDefinition, project, getGeneratedDefinition, getSourceDefinition); + if (location) { + queue.enqueue({ project, location }); + } + }); + } + } + if (resultsMap.size === 1) { + return firstIterator(resultsMap.values()); + } + return resultsMap; + function searchPosition(project, location) { + const projectResults = getResultsForPosition(project, location); + if (!projectResults) + return void 0; + for (const result of projectResults) { + forPositionInResult(result, (position) => { + const originalLocation = projectService.getOriginalLocationEnsuringConfiguredProject(project, position); + if (!originalLocation) + return; + const originalScriptInfo = projectService.getScriptInfo(originalLocation.fileName); + for (const project2 of originalScriptInfo.containingProjects) { + if (!project2.isOrphan() && !resultsMap.has(project2)) { + queue.enqueue({ project: project2, location: originalLocation }); + } + } + const symlinkedProjectsMap = projectService.getSymlinkedProjects(originalScriptInfo); + if (symlinkedProjectsMap) { + symlinkedProjectsMap.forEach((symlinkedProjects, symlinkedPath) => { + for (const symlinkedProject of symlinkedProjects) { + if (!symlinkedProject.isOrphan() && !resultsMap.has(symlinkedProject)) { + queue.enqueue({ project: symlinkedProject, location: { fileName: symlinkedPath, pos: originalLocation.pos } }); + } + } + }); + } + }); + } + return projectResults; + } + } + function mapDefinitionInProject(definition, project, getGeneratedDefinition, getSourceDefinition) { + if (project.containsFile(toNormalizedPath(definition.fileName)) && !isLocationProjectReferenceRedirect(project, definition)) { + return definition; + } + const generatedDefinition = getGeneratedDefinition(); + if (generatedDefinition && project.containsFile(toNormalizedPath(generatedDefinition.fileName))) + return generatedDefinition; + const sourceDefinition = getSourceDefinition(); + return sourceDefinition && project.containsFile(toNormalizedPath(sourceDefinition.fileName)) ? sourceDefinition : void 0; + } + function isLocationProjectReferenceRedirect(project, location) { + if (!location) + return false; + const program = project.getLanguageService().getProgram(); + if (!program) + return false; + const sourceFile = program.getSourceFile(location.fileName); + return !!sourceFile && sourceFile.resolvedPath !== sourceFile.path && sourceFile.resolvedPath !== project.toPath(location.fileName); + } + function getProjectKey(project) { + return isConfiguredProject(project) ? project.canonicalConfigFilePath : project.getProjectName(); + } + function documentSpanLocation({ fileName, textSpan }) { + return { fileName, pos: textSpan.start }; + } + function getMappedLocationForProject(location, project) { + return getMappedLocation(location, project.getSourceMapper(), (p) => project.projectService.fileExists(p)); + } + function getMappedDocumentSpanForProject(documentSpan, project) { + return getMappedDocumentSpan(documentSpan, project.getSourceMapper(), (p) => project.projectService.fileExists(p)); + } + function getMappedContextSpanForProject(documentSpan, project) { + return getMappedContextSpan(documentSpan, project.getSourceMapper(), (p) => project.projectService.fileExists(p)); + } + function toProtocolTextSpan(textSpan, scriptInfo) { + return { + start: scriptInfo.positionToLineOffset(textSpan.start), + end: scriptInfo.positionToLineOffset(textSpanEnd(textSpan)) + }; + } + function toProtocolTextSpanWithContext(span, contextSpan, scriptInfo) { + const textSpan = toProtocolTextSpan(span, scriptInfo); + const contextTextSpan = contextSpan && toProtocolTextSpan(contextSpan, scriptInfo); + return contextTextSpan ? { ...textSpan, contextStart: contextTextSpan.start, contextEnd: contextTextSpan.end } : textSpan; + } + function convertTextChangeToCodeEdit(change, scriptInfo) { + return { start: positionToLineOffset(scriptInfo, change.span.start), end: positionToLineOffset(scriptInfo, textSpanEnd(change.span)), newText: change.newText }; + } + function positionToLineOffset(info, position) { + return isConfigFile(info) ? locationFromLineAndCharacter(info.getLineAndCharacterOfPosition(position)) : info.positionToLineOffset(position); + } + function convertLinkedEditInfoToRanges(linkedEdit, scriptInfo) { + const ranges = linkedEdit.ranges.map( + (r) => { + return { + start: scriptInfo.positionToLineOffset(r.start), + end: scriptInfo.positionToLineOffset(r.start + r.length) + }; + } + ); + if (!linkedEdit.wordPattern) + return { ranges }; + return { ranges, wordPattern: linkedEdit.wordPattern }; + } + function locationFromLineAndCharacter(lc) { + return { line: lc.line + 1, offset: lc.character + 1 }; + } + function convertNewFileTextChangeToCodeEdit(textChanges2) { + Debug.assert(textChanges2.textChanges.length === 1); + const change = first(textChanges2.textChanges); + Debug.assert(change.span.start === 0 && change.span.length === 0); + return { fileName: textChanges2.fileName, textChanges: [{ start: { line: 0, offset: 0 }, end: { line: 0, offset: 0 }, newText: change.newText }] }; + } + function getLocationInNewDocument(oldText, renameFilename, renameLocation, edits) { + const newText = applyEdits(oldText, renameFilename, edits); + const { line, character } = computeLineAndCharacterOfPosition(computeLineStarts(newText), renameLocation); + return { line: line + 1, offset: character + 1 }; + } + function applyEdits(text, textFilename, edits) { + for (const { fileName, textChanges: textChanges2 } of edits) { + if (fileName !== textFilename) { + continue; + } + for (let i = textChanges2.length - 1; i >= 0; i--) { + const { newText, span: { start, length: length2 } } = textChanges2[i]; + text = text.slice(0, start) + newText + text.slice(start + length2); + } + } + return text; + } + function referenceEntryToReferencesResponseItem(projectService, { fileName, textSpan, contextSpan, isWriteAccess: isWriteAccess2, isDefinition }, { disableLineTextInReferences }) { + const scriptInfo = Debug.checkDefined(projectService.getScriptInfo(fileName)); + const span = toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo); + const lineText = disableLineTextInReferences ? void 0 : getLineText(scriptInfo, span); + return { + file: fileName, + ...span, + lineText, + isWriteAccess: isWriteAccess2, + isDefinition + }; + } + function getLineText(scriptInfo, span) { + const lineSpan = scriptInfo.lineToTextSpan(span.start.line - 1); + return scriptInfo.getSnapshot().getText(lineSpan.start, textSpanEnd(lineSpan)).replace(/\r|\n/g, ""); + } + function isCompletionEntryData(data) { + return data === void 0 || data && typeof data === "object" && typeof data.exportName === "string" && (data.fileName === void 0 || typeof data.fileName === "string") && (data.ambientModuleName === void 0 || typeof data.ambientModuleName === "string" && (data.isPackageJsonImport === void 0 || typeof data.isPackageJsonImport === "boolean")); + } + var nullCancellationToken, CommandNames, MultistepOperation, invalidPartialSemanticModeCommands, invalidSyntacticModeCommands, Session3; + var init_session = __esm({ + "src/server/session.ts"() { + "use strict"; + init_ts7(); + init_ts_server3(); + init_protocol(); + nullCancellationToken = { + isCancellationRequested: () => false, + setRequest: () => void 0, + resetRequest: () => void 0 + }; + CommandNames = CommandTypes; + MultistepOperation = class { + constructor(operationHost) { + this.operationHost = operationHost; + } + startNew(action) { + this.complete(); + this.requestId = this.operationHost.getCurrentRequestId(); + this.executeAction(action); + } + complete() { + if (this.requestId !== void 0) { + this.operationHost.sendRequestCompletedEvent(this.requestId); + this.requestId = void 0; + } + this.setTimerHandle(void 0); + this.setImmediateId(void 0); + } + immediate(actionType, action) { + const requestId = this.requestId; + Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "immediate: incorrect request id"); + this.setImmediateId( + this.operationHost.getServerHost().setImmediate(() => { + this.immediateId = void 0; + this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); + }, actionType) + ); + } + delay(actionType, ms, action) { + const requestId = this.requestId; + Debug.assert(requestId === this.operationHost.getCurrentRequestId(), "delay: incorrect request id"); + this.setTimerHandle( + this.operationHost.getServerHost().setTimeout( + () => { + this.timerHandle = void 0; + this.operationHost.executeWithRequestId(requestId, () => this.executeAction(action)); + }, + ms, + actionType + ) + ); + } + executeAction(action) { + var _a, _b, _c, _d, _e, _f; + let stop = false; + try { + if (this.operationHost.isCancellationRequested()) { + stop = true; + (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "stepCanceled", { seq: this.requestId, early: true }); + } else { + (_b = tracing) == null ? void 0 : _b.push(tracing.Phase.Session, "stepAction", { seq: this.requestId }); + action(this); + (_c = tracing) == null ? void 0 : _c.pop(); + } + } catch (e) { + (_d = tracing) == null ? void 0 : _d.popAll(); + stop = true; + if (e instanceof OperationCanceledException) { + (_e = tracing) == null ? void 0 : _e.instant(tracing.Phase.Session, "stepCanceled", { seq: this.requestId }); + } else { + (_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "stepError", { seq: this.requestId, message: e.message }); + this.operationHost.logError(e, `delayed processing of request ${this.requestId}`); + } + } + if (stop || !this.hasPendingWork()) { + this.complete(); + } + } + setTimerHandle(timerHandle) { + if (this.timerHandle !== void 0) { + this.operationHost.getServerHost().clearTimeout(this.timerHandle); + } + this.timerHandle = timerHandle; + } + setImmediateId(immediateId) { + if (this.immediateId !== void 0) { + this.operationHost.getServerHost().clearImmediate(this.immediateId); + } + this.immediateId = immediateId; + } + hasPendingWork() { + return !!this.timerHandle || !!this.immediateId; + } + }; + invalidPartialSemanticModeCommands = [ + "openExternalProject" /* OpenExternalProject */, + "openExternalProjects" /* OpenExternalProjects */, + "closeExternalProject" /* CloseExternalProject */, + "synchronizeProjectList" /* SynchronizeProjectList */, + "emit-output" /* EmitOutput */, + "compileOnSaveAffectedFileList" /* CompileOnSaveAffectedFileList */, + "compileOnSaveEmitFile" /* CompileOnSaveEmitFile */, + "compilerOptionsDiagnostics-full" /* CompilerOptionsDiagnosticsFull */, + "encodedSemanticClassifications-full" /* EncodedSemanticClassificationsFull */, + "semanticDiagnosticsSync" /* SemanticDiagnosticsSync */, + "suggestionDiagnosticsSync" /* SuggestionDiagnosticsSync */, + "geterrForProject" /* GeterrForProject */, + "reload" /* Reload */, + "reloadProjects" /* ReloadProjects */, + "getCodeFixes" /* GetCodeFixes */, + "getCodeFixes-full" /* GetCodeFixesFull */, + "getCombinedCodeFix" /* GetCombinedCodeFix */, + "getCombinedCodeFix-full" /* GetCombinedCodeFixFull */, + "applyCodeActionCommand" /* ApplyCodeActionCommand */, + "getSupportedCodeFixes" /* GetSupportedCodeFixes */, + "getApplicableRefactors" /* GetApplicableRefactors */, + "getMoveToRefactoringFileSuggestions" /* GetMoveToRefactoringFileSuggestions */, + "getEditsForRefactor" /* GetEditsForRefactor */, + "getEditsForRefactor-full" /* GetEditsForRefactorFull */, + "organizeImports" /* OrganizeImports */, + "organizeImports-full" /* OrganizeImportsFull */, + "getEditsForFileRename" /* GetEditsForFileRename */, + "getEditsForFileRename-full" /* GetEditsForFileRenameFull */, + "prepareCallHierarchy" /* PrepareCallHierarchy */, + "provideCallHierarchyIncomingCalls" /* ProvideCallHierarchyIncomingCalls */, + "provideCallHierarchyOutgoingCalls" /* ProvideCallHierarchyOutgoingCalls */ + ]; + invalidSyntacticModeCommands = [ + ...invalidPartialSemanticModeCommands, + "definition" /* Definition */, + "definition-full" /* DefinitionFull */, + "definitionAndBoundSpan" /* DefinitionAndBoundSpan */, + "definitionAndBoundSpan-full" /* DefinitionAndBoundSpanFull */, + "typeDefinition" /* TypeDefinition */, + "implementation" /* Implementation */, + "implementation-full" /* ImplementationFull */, + "references" /* References */, + "references-full" /* ReferencesFull */, + "rename" /* Rename */, + "renameLocations-full" /* RenameLocationsFull */, + "rename-full" /* RenameInfoFull */, + "quickinfo" /* Quickinfo */, + "quickinfo-full" /* QuickinfoFull */, + "completionInfo" /* CompletionInfo */, + "completions" /* Completions */, + "completions-full" /* CompletionsFull */, + "completionEntryDetails" /* CompletionDetails */, + "completionEntryDetails-full" /* CompletionDetailsFull */, + "signatureHelp" /* SignatureHelp */, + "signatureHelp-full" /* SignatureHelpFull */, + "navto" /* Navto */, + "navto-full" /* NavtoFull */, + "documentHighlights" /* DocumentHighlights */, + "documentHighlights-full" /* DocumentHighlightsFull */ + ]; + Session3 = class _Session { + constructor(opts) { + this.changeSeq = 0; + this.handlers = new Map(Object.entries({ + // TODO(jakebailey): correctly type the handlers + ["status" /* Status */]: () => { + const response = { version }; + return this.requiredResponse(response); + }, + ["openExternalProject" /* OpenExternalProject */]: (request) => { + this.projectService.openExternalProject(request.arguments); + return this.requiredResponse( + /*response*/ + true + ); + }, + ["openExternalProjects" /* OpenExternalProjects */]: (request) => { + this.projectService.openExternalProjects(request.arguments.projects); + return this.requiredResponse( + /*response*/ + true + ); + }, + ["closeExternalProject" /* CloseExternalProject */]: (request) => { + this.projectService.closeExternalProject(request.arguments.projectFileName); + return this.requiredResponse( + /*response*/ + true + ); + }, + ["synchronizeProjectList" /* SynchronizeProjectList */]: (request) => { + const result = this.projectService.synchronizeProjectList(request.arguments.knownProjects, request.arguments.includeProjectReferenceRedirectInfo); + if (!result.some((p) => p.projectErrors && p.projectErrors.length !== 0)) { + return this.requiredResponse(result); + } + const converted = map(result, (p) => { + if (!p.projectErrors || p.projectErrors.length === 0) { + return p; + } + return { + info: p.info, + changes: p.changes, + files: p.files, + projectErrors: this.convertToDiagnosticsWithLinePosition( + p.projectErrors, + /*scriptInfo*/ + void 0 + ) + }; + }); + return this.requiredResponse(converted); + }, + ["updateOpen" /* UpdateOpen */]: (request) => { + this.changeSeq++; + this.projectService.applyChangesInOpenFiles( + request.arguments.openFiles && mapIterator(request.arguments.openFiles, (file) => ({ + fileName: file.file, + content: file.fileContent, + scriptKind: file.scriptKindName, + projectRootPath: file.projectRootPath + })), + request.arguments.changedFiles && mapIterator(request.arguments.changedFiles, (file) => ({ + fileName: file.fileName, + changes: mapDefinedIterator(arrayReverseIterator(file.textChanges), (change) => { + const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file.fileName)); + const start = scriptInfo.lineOffsetToPosition(change.start.line, change.start.offset); + const end = scriptInfo.lineOffsetToPosition(change.end.line, change.end.offset); + return start >= 0 ? { span: { start, length: end - start }, newText: change.newText } : void 0; + }) + })), + request.arguments.closedFiles + ); + return this.requiredResponse( + /*response*/ + true + ); + }, + ["applyChangedToOpenFiles" /* ApplyChangedToOpenFiles */]: (request) => { + this.changeSeq++; + this.projectService.applyChangesInOpenFiles( + request.arguments.openFiles, + request.arguments.changedFiles && mapIterator(request.arguments.changedFiles, (file) => ({ + fileName: file.fileName, + // apply changes in reverse order + changes: arrayReverseIterator(file.changes) + })), + request.arguments.closedFiles + ); + return this.requiredResponse( + /*response*/ + true + ); + }, + ["exit" /* Exit */]: () => { + this.exit(); + return this.notRequired(); + }, + ["definition" /* Definition */]: (request) => { + return this.requiredResponse(this.getDefinition( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["definition-full" /* DefinitionFull */]: (request) => { + return this.requiredResponse(this.getDefinition( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["definitionAndBoundSpan" /* DefinitionAndBoundSpan */]: (request) => { + return this.requiredResponse(this.getDefinitionAndBoundSpan( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["definitionAndBoundSpan-full" /* DefinitionAndBoundSpanFull */]: (request) => { + return this.requiredResponse(this.getDefinitionAndBoundSpan( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["findSourceDefinition" /* FindSourceDefinition */]: (request) => { + return this.requiredResponse(this.findSourceDefinition(request.arguments)); + }, + ["emit-output" /* EmitOutput */]: (request) => { + return this.requiredResponse(this.getEmitOutput(request.arguments)); + }, + ["typeDefinition" /* TypeDefinition */]: (request) => { + return this.requiredResponse(this.getTypeDefinition(request.arguments)); + }, + ["implementation" /* Implementation */]: (request) => { + return this.requiredResponse(this.getImplementation( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["implementation-full" /* ImplementationFull */]: (request) => { + return this.requiredResponse(this.getImplementation( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["references" /* References */]: (request) => { + return this.requiredResponse(this.getReferences( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["references-full" /* ReferencesFull */]: (request) => { + return this.requiredResponse(this.getReferences( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["rename" /* Rename */]: (request) => { + return this.requiredResponse(this.getRenameLocations( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["renameLocations-full" /* RenameLocationsFull */]: (request) => { + return this.requiredResponse(this.getRenameLocations( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["rename-full" /* RenameInfoFull */]: (request) => { + return this.requiredResponse(this.getRenameInfo(request.arguments)); + }, + ["open" /* Open */]: (request) => { + this.openClientFile( + toNormalizedPath(request.arguments.file), + request.arguments.fileContent, + convertScriptKindName(request.arguments.scriptKindName), + // TODO: GH#18217 + request.arguments.projectRootPath ? toNormalizedPath(request.arguments.projectRootPath) : void 0 + ); + return this.notRequired(); + }, + ["quickinfo" /* Quickinfo */]: (request) => { + return this.requiredResponse(this.getQuickInfoWorker( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["quickinfo-full" /* QuickinfoFull */]: (request) => { + return this.requiredResponse(this.getQuickInfoWorker( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["getOutliningSpans" /* GetOutliningSpans */]: (request) => { + return this.requiredResponse(this.getOutliningSpans( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["outliningSpans" /* GetOutliningSpansFull */]: (request) => { + return this.requiredResponse(this.getOutliningSpans( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["todoComments" /* TodoComments */]: (request) => { + return this.requiredResponse(this.getTodoComments(request.arguments)); + }, + ["indentation" /* Indentation */]: (request) => { + return this.requiredResponse(this.getIndentation(request.arguments)); + }, + ["nameOrDottedNameSpan" /* NameOrDottedNameSpan */]: (request) => { + return this.requiredResponse(this.getNameOrDottedNameSpan(request.arguments)); + }, + ["breakpointStatement" /* BreakpointStatement */]: (request) => { + return this.requiredResponse(this.getBreakpointStatement(request.arguments)); + }, + ["braceCompletion" /* BraceCompletion */]: (request) => { + return this.requiredResponse(this.isValidBraceCompletion(request.arguments)); + }, + ["docCommentTemplate" /* DocCommentTemplate */]: (request) => { + return this.requiredResponse(this.getDocCommentTemplate(request.arguments)); + }, + ["getSpanOfEnclosingComment" /* GetSpanOfEnclosingComment */]: (request) => { + return this.requiredResponse(this.getSpanOfEnclosingComment(request.arguments)); + }, + ["fileReferences" /* FileReferences */]: (request) => { + return this.requiredResponse(this.getFileReferences( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["fileReferences-full" /* FileReferencesFull */]: (request) => { + return this.requiredResponse(this.getFileReferences( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["format" /* Format */]: (request) => { + return this.requiredResponse(this.getFormattingEditsForRange(request.arguments)); + }, + ["formatonkey" /* Formatonkey */]: (request) => { + return this.requiredResponse(this.getFormattingEditsAfterKeystroke(request.arguments)); + }, + ["format-full" /* FormatFull */]: (request) => { + return this.requiredResponse(this.getFormattingEditsForDocumentFull(request.arguments)); + }, + ["formatonkey-full" /* FormatonkeyFull */]: (request) => { + return this.requiredResponse(this.getFormattingEditsAfterKeystrokeFull(request.arguments)); + }, + ["formatRange-full" /* FormatRangeFull */]: (request) => { + return this.requiredResponse(this.getFormattingEditsForRangeFull(request.arguments)); + }, + ["completionInfo" /* CompletionInfo */]: (request) => { + return this.requiredResponse(this.getCompletions(request.arguments, "completionInfo" /* CompletionInfo */)); + }, + ["completions" /* Completions */]: (request) => { + return this.requiredResponse(this.getCompletions(request.arguments, "completions" /* Completions */)); + }, + ["completions-full" /* CompletionsFull */]: (request) => { + return this.requiredResponse(this.getCompletions(request.arguments, "completions-full" /* CompletionsFull */)); + }, + ["completionEntryDetails" /* CompletionDetails */]: (request) => { + return this.requiredResponse(this.getCompletionEntryDetails( + request.arguments, + /*fullResult*/ + false + )); + }, + ["completionEntryDetails-full" /* CompletionDetailsFull */]: (request) => { + return this.requiredResponse(this.getCompletionEntryDetails( + request.arguments, + /*fullResult*/ + true + )); + }, + ["compileOnSaveAffectedFileList" /* CompileOnSaveAffectedFileList */]: (request) => { + return this.requiredResponse(this.getCompileOnSaveAffectedFileList(request.arguments)); + }, + ["compileOnSaveEmitFile" /* CompileOnSaveEmitFile */]: (request) => { + return this.requiredResponse(this.emitFile(request.arguments)); + }, + ["signatureHelp" /* SignatureHelp */]: (request) => { + return this.requiredResponse(this.getSignatureHelpItems( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["signatureHelp-full" /* SignatureHelpFull */]: (request) => { + return this.requiredResponse(this.getSignatureHelpItems( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["compilerOptionsDiagnostics-full" /* CompilerOptionsDiagnosticsFull */]: (request) => { + return this.requiredResponse(this.getCompilerOptionsDiagnostics(request.arguments)); + }, + ["encodedSyntacticClassifications-full" /* EncodedSyntacticClassificationsFull */]: (request) => { + return this.requiredResponse(this.getEncodedSyntacticClassifications(request.arguments)); + }, + ["encodedSemanticClassifications-full" /* EncodedSemanticClassificationsFull */]: (request) => { + return this.requiredResponse(this.getEncodedSemanticClassifications(request.arguments)); + }, + ["cleanup" /* Cleanup */]: () => { + this.cleanup(); + return this.requiredResponse( + /*response*/ + true + ); + }, + ["semanticDiagnosticsSync" /* SemanticDiagnosticsSync */]: (request) => { + return this.requiredResponse(this.getSemanticDiagnosticsSync(request.arguments)); + }, + ["syntacticDiagnosticsSync" /* SyntacticDiagnosticsSync */]: (request) => { + return this.requiredResponse(this.getSyntacticDiagnosticsSync(request.arguments)); + }, + ["suggestionDiagnosticsSync" /* SuggestionDiagnosticsSync */]: (request) => { + return this.requiredResponse(this.getSuggestionDiagnosticsSync(request.arguments)); + }, + ["geterr" /* Geterr */]: (request) => { + this.errorCheck.startNew((next) => this.getDiagnostics(next, request.arguments.delay, request.arguments.files)); + return this.notRequired(); + }, + ["geterrForProject" /* GeterrForProject */]: (request) => { + this.errorCheck.startNew((next) => this.getDiagnosticsForProject(next, request.arguments.delay, request.arguments.file)); + return this.notRequired(); + }, + ["change" /* Change */]: (request) => { + this.change(request.arguments); + return this.notRequired(); + }, + ["configure" /* Configure */]: (request) => { + this.projectService.setHostConfiguration(request.arguments); + this.doOutput( + /*info*/ + void 0, + "configure" /* Configure */, + request.seq, + /*success*/ + true + ); + return this.notRequired(); + }, + ["reload" /* Reload */]: (request) => { + this.reload(request.arguments, request.seq); + return this.requiredResponse({ reloadFinished: true }); + }, + ["saveto" /* Saveto */]: (request) => { + const savetoArgs = request.arguments; + this.saveToTmp(savetoArgs.file, savetoArgs.tmpfile); + return this.notRequired(); + }, + ["close" /* Close */]: (request) => { + const closeArgs = request.arguments; + this.closeClientFile(closeArgs.file); + return this.notRequired(); + }, + ["navto" /* Navto */]: (request) => { + return this.requiredResponse(this.getNavigateToItems( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["navto-full" /* NavtoFull */]: (request) => { + return this.requiredResponse(this.getNavigateToItems( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["brace" /* Brace */]: (request) => { + return this.requiredResponse(this.getBraceMatching( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["brace-full" /* BraceFull */]: (request) => { + return this.requiredResponse(this.getBraceMatching( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["navbar" /* NavBar */]: (request) => { + return this.requiredResponse(this.getNavigationBarItems( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["navbar-full" /* NavBarFull */]: (request) => { + return this.requiredResponse(this.getNavigationBarItems( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["navtree" /* NavTree */]: (request) => { + return this.requiredResponse(this.getNavigationTree( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["navtree-full" /* NavTreeFull */]: (request) => { + return this.requiredResponse(this.getNavigationTree( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["documentHighlights" /* DocumentHighlights */]: (request) => { + return this.requiredResponse(this.getDocumentHighlights( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["documentHighlights-full" /* DocumentHighlightsFull */]: (request) => { + return this.requiredResponse(this.getDocumentHighlights( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["compilerOptionsForInferredProjects" /* CompilerOptionsForInferredProjects */]: (request) => { + this.setCompilerOptionsForInferredProjects(request.arguments); + return this.requiredResponse( + /*response*/ + true + ); + }, + ["projectInfo" /* ProjectInfo */]: (request) => { + return this.requiredResponse(this.getProjectInfo(request.arguments)); + }, + ["reloadProjects" /* ReloadProjects */]: () => { + this.projectService.reloadProjects(); + return this.notRequired(); + }, + ["jsxClosingTag" /* JsxClosingTag */]: (request) => { + return this.requiredResponse(this.getJsxClosingTag(request.arguments)); + }, + ["linkedEditingRange" /* LinkedEditingRange */]: (request) => { + return this.requiredResponse(this.getLinkedEditingRange(request.arguments)); + }, + ["getCodeFixes" /* GetCodeFixes */]: (request) => { + return this.requiredResponse(this.getCodeFixes( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["getCodeFixes-full" /* GetCodeFixesFull */]: (request) => { + return this.requiredResponse(this.getCodeFixes( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["getCombinedCodeFix" /* GetCombinedCodeFix */]: (request) => { + return this.requiredResponse(this.getCombinedCodeFix( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["getCombinedCodeFix-full" /* GetCombinedCodeFixFull */]: (request) => { + return this.requiredResponse(this.getCombinedCodeFix( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["applyCodeActionCommand" /* ApplyCodeActionCommand */]: (request) => { + return this.requiredResponse(this.applyCodeActionCommand(request.arguments)); + }, + ["getSupportedCodeFixes" /* GetSupportedCodeFixes */]: (request) => { + return this.requiredResponse(this.getSupportedCodeFixes(request.arguments)); + }, + ["getApplicableRefactors" /* GetApplicableRefactors */]: (request) => { + return this.requiredResponse(this.getApplicableRefactors(request.arguments)); + }, + ["getEditsForRefactor" /* GetEditsForRefactor */]: (request) => { + return this.requiredResponse(this.getEditsForRefactor( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["getMoveToRefactoringFileSuggestions" /* GetMoveToRefactoringFileSuggestions */]: (request) => { + return this.requiredResponse(this.getMoveToRefactoringFileSuggestions(request.arguments)); + }, + ["getEditsForRefactor-full" /* GetEditsForRefactorFull */]: (request) => { + return this.requiredResponse(this.getEditsForRefactor( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["organizeImports" /* OrganizeImports */]: (request) => { + return this.requiredResponse(this.organizeImports( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["organizeImports-full" /* OrganizeImportsFull */]: (request) => { + return this.requiredResponse(this.organizeImports( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["getEditsForFileRename" /* GetEditsForFileRename */]: (request) => { + return this.requiredResponse(this.getEditsForFileRename( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["getEditsForFileRename-full" /* GetEditsForFileRenameFull */]: (request) => { + return this.requiredResponse(this.getEditsForFileRename( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["configurePlugin" /* ConfigurePlugin */]: (request) => { + this.configurePlugin(request.arguments); + this.doOutput( + /*info*/ + void 0, + "configurePlugin" /* ConfigurePlugin */, + request.seq, + /*success*/ + true + ); + return this.notRequired(); + }, + ["selectionRange" /* SelectionRange */]: (request) => { + return this.requiredResponse(this.getSmartSelectionRange( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["selectionRange-full" /* SelectionRangeFull */]: (request) => { + return this.requiredResponse(this.getSmartSelectionRange( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["prepareCallHierarchy" /* PrepareCallHierarchy */]: (request) => { + return this.requiredResponse(this.prepareCallHierarchy(request.arguments)); + }, + ["provideCallHierarchyIncomingCalls" /* ProvideCallHierarchyIncomingCalls */]: (request) => { + return this.requiredResponse(this.provideCallHierarchyIncomingCalls(request.arguments)); + }, + ["provideCallHierarchyOutgoingCalls" /* ProvideCallHierarchyOutgoingCalls */]: (request) => { + return this.requiredResponse(this.provideCallHierarchyOutgoingCalls(request.arguments)); + }, + ["toggleLineComment" /* ToggleLineComment */]: (request) => { + return this.requiredResponse(this.toggleLineComment( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["toggleLineComment-full" /* ToggleLineCommentFull */]: (request) => { + return this.requiredResponse(this.toggleLineComment( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["toggleMultilineComment" /* ToggleMultilineComment */]: (request) => { + return this.requiredResponse(this.toggleMultilineComment( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["toggleMultilineComment-full" /* ToggleMultilineCommentFull */]: (request) => { + return this.requiredResponse(this.toggleMultilineComment( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["commentSelection" /* CommentSelection */]: (request) => { + return this.requiredResponse(this.commentSelection( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["commentSelection-full" /* CommentSelectionFull */]: (request) => { + return this.requiredResponse(this.commentSelection( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["uncommentSelection" /* UncommentSelection */]: (request) => { + return this.requiredResponse(this.uncommentSelection( + request.arguments, + /*simplifiedResult*/ + true + )); + }, + ["uncommentSelection-full" /* UncommentSelectionFull */]: (request) => { + return this.requiredResponse(this.uncommentSelection( + request.arguments, + /*simplifiedResult*/ + false + )); + }, + ["provideInlayHints" /* ProvideInlayHints */]: (request) => { + return this.requiredResponse(this.provideInlayHints(request.arguments)); + } + })); + this.host = opts.host; + this.cancellationToken = opts.cancellationToken; + this.typingsInstaller = opts.typingsInstaller || nullTypingsInstaller; + this.byteLength = opts.byteLength; + this.hrtime = opts.hrtime; + this.logger = opts.logger; + this.canUseEvents = opts.canUseEvents; + this.suppressDiagnosticEvents = opts.suppressDiagnosticEvents; + this.noGetErrOnBackgroundUpdate = opts.noGetErrOnBackgroundUpdate; + const { throttleWaitMilliseconds } = opts; + this.eventHandler = this.canUseEvents ? opts.eventHandler || ((event) => this.defaultEventHandler(event)) : void 0; + const multistepOperationHost = { + executeWithRequestId: (requestId, action) => this.executeWithRequestId(requestId, action), + getCurrentRequestId: () => this.currentRequestId, + getServerHost: () => this.host, + logError: (err, cmd) => this.logError(err, cmd), + sendRequestCompletedEvent: (requestId) => this.sendRequestCompletedEvent(requestId), + isCancellationRequested: () => this.cancellationToken.isCancellationRequested() + }; + this.errorCheck = new MultistepOperation(multistepOperationHost); + const settings = { + host: this.host, + logger: this.logger, + cancellationToken: this.cancellationToken, + useSingleInferredProject: opts.useSingleInferredProject, + useInferredProjectPerProjectRoot: opts.useInferredProjectPerProjectRoot, + typingsInstaller: this.typingsInstaller, + throttleWaitMilliseconds, + eventHandler: this.eventHandler, + suppressDiagnosticEvents: this.suppressDiagnosticEvents, + globalPlugins: opts.globalPlugins, + pluginProbeLocations: opts.pluginProbeLocations, + allowLocalPluginLoads: opts.allowLocalPluginLoads, + typesMapLocation: opts.typesMapLocation, + serverMode: opts.serverMode, + session: this, + canUseWatchEvents: opts.canUseWatchEvents, + incrementalVerifier: opts.incrementalVerifier + }; + this.projectService = new ProjectService3(settings); + this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)); + this.gcTimer = new GcTimer( + this.host, + /*delay*/ + 7e3, + this.logger + ); + switch (this.projectService.serverMode) { + case 0 /* Semantic */: + break; + case 1 /* PartialSemantic */: + invalidPartialSemanticModeCommands.forEach( + (commandName) => this.handlers.set(commandName, (request) => { + throw new Error(`Request: ${request.command} not allowed in LanguageServiceMode.PartialSemantic`); + }) + ); + break; + case 2 /* Syntactic */: + invalidSyntacticModeCommands.forEach( + (commandName) => this.handlers.set(commandName, (request) => { + throw new Error(`Request: ${request.command} not allowed in LanguageServiceMode.Syntactic`); + }) + ); + break; + default: + Debug.assertNever(this.projectService.serverMode); + } + } + sendRequestCompletedEvent(requestId) { + this.event({ request_seq: requestId }, "requestCompleted"); + } + addPerformanceData(key, value) { + if (!this.performanceData) { + this.performanceData = {}; + } + this.performanceData[key] = (this.performanceData[key] ?? 0) + value; + } + performanceEventHandler(event) { + switch (event.kind) { + case "UpdateGraph": + this.addPerformanceData("updateGraphDurationMs", event.durationMs); + break; + case "CreatePackageJsonAutoImportProvider": + this.addPerformanceData("createAutoImportProviderProgramDurationMs", event.durationMs); + break; + } + } + defaultEventHandler(event) { + switch (event.eventName) { + case ProjectsUpdatedInBackgroundEvent: + this.projectsUpdatedInBackgroundEvent(event.data.openFiles); + break; + case ProjectLoadingStartEvent: + this.event({ + projectName: event.data.project.getProjectName(), + reason: event.data.reason + }, event.eventName); + break; + case ProjectLoadingFinishEvent: + this.event({ + projectName: event.data.project.getProjectName() + }, event.eventName); + break; + case LargeFileReferencedEvent: + case CreateFileWatcherEvent: + case CreateDirectoryWatcherEvent: + case CloseFileWatcherEvent: + this.event(event.data, event.eventName); + break; + case ConfigFileDiagEvent: + this.event({ + triggerFile: event.data.triggerFile, + configFile: event.data.configFileName, + diagnostics: map(event.data.diagnostics, (diagnostic) => formatDiagnosticToProtocol( + diagnostic, + /*includeFileName*/ + true + )) + }, event.eventName); + break; + case ProjectLanguageServiceStateEvent: { + this.event({ + projectName: event.data.project.getProjectName(), + languageServiceEnabled: event.data.languageServiceEnabled + }, event.eventName); + break; + } + case ProjectInfoTelemetryEvent: { + const eventName = "telemetry"; + this.event({ + telemetryEventName: event.eventName, + payload: event.data + }, eventName); + break; + } + } + } + projectsUpdatedInBackgroundEvent(openFiles) { + this.projectService.logger.info(`got projects updated in background, updating diagnostics for ${openFiles}`); + if (openFiles.length) { + if (!this.suppressDiagnosticEvents && !this.noGetErrOnBackgroundUpdate) { + this.errorCheck.startNew((next) => this.updateErrorCheck( + next, + openFiles, + 100, + /*requireOpen*/ + true + )); + } + this.event({ + openFiles + }, ProjectsUpdatedInBackgroundEvent); + } + } + logError(err, cmd) { + this.logErrorWorker(err, cmd); + } + logErrorWorker(err, cmd, fileRequest) { + let msg = "Exception on executing command " + cmd; + if (err.message) { + msg += ":\n" + indent2(err.message); + if (err.stack) { + msg += "\n" + indent2(err.stack); + } + } + if (this.logger.hasLevel(3 /* verbose */)) { + if (fileRequest) { + try { + const { file, project } = this.getFileAndProject(fileRequest); + const scriptInfo = project.getScriptInfoForNormalizedPath(file); + if (scriptInfo) { + const text = getSnapshotText(scriptInfo.getSnapshot()); + msg += ` + +File text of ${fileRequest.file}:${indent2(text)} +`; + } + } catch { + } + } + if (err.ProgramFiles) { + msg += ` + +Program files: ${JSON.stringify(err.ProgramFiles)} +`; + msg += ` + +Projects:: +`; + let counter = 0; + const addProjectInfo = (project) => { + msg += ` +Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter} +`; + msg += project.filesToString( + /*writeProjectFileNames*/ + true + ); + msg += "\n-----------------------------------------------\n"; + counter++; + }; + this.projectService.externalProjects.forEach(addProjectInfo); + this.projectService.configuredProjects.forEach(addProjectInfo); + this.projectService.inferredProjects.forEach(addProjectInfo); + } + } + this.logger.msg(msg, "Err" /* Err */); + } + send(msg) { + if (msg.type === "event" && !this.canUseEvents) { + if (this.logger.hasLevel(3 /* verbose */)) { + this.logger.info(`Session does not support events: ignored event: ${JSON.stringify(msg)}`); + } + return; + } + this.writeMessage(msg); + } + writeMessage(msg) { + var _a; + const msgText = formatMessage2(msg, this.logger, this.byteLength, this.host.newLine); + (_a = perfLogger) == null ? void 0 : _a.logEvent(`Response message size: ${msgText.length}`); + this.host.write(msgText); + } + event(body, eventName) { + this.send(toEvent(eventName, body)); + } + /** @internal */ + doOutput(info, cmdName, reqSeq, success, message) { + const res = { + seq: 0, + type: "response", + command: cmdName, + request_seq: reqSeq, + success, + performanceData: this.performanceData + }; + if (success) { + let metadata; + if (isArray(info)) { + res.body = info; + metadata = info.metadata; + delete info.metadata; + } else if (typeof info === "object") { + if (info.metadata) { + const { metadata: infoMetadata, ...body } = info; + res.body = body; + metadata = infoMetadata; + } else { + res.body = info; + } + } else { + res.body = info; + } + if (metadata) + res.metadata = metadata; + } else { + Debug.assert(info === void 0); + } + if (message) { + res.message = message; + } + this.send(res); + } + semanticCheck(file, project) { + var _a, _b; + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "semanticCheck", { file, configFilePath: project.canonicalConfigFilePath }); + const diags = isDeclarationFileInJSOnlyNonConfiguredProject(project, file) ? emptyArray2 : project.getLanguageService().getSemanticDiagnostics(file).filter((d) => !!d.file); + this.sendDiagnosticsEvent(file, project, diags, "semanticDiag"); + (_b = tracing) == null ? void 0 : _b.pop(); + } + syntacticCheck(file, project) { + var _a, _b; + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "syntacticCheck", { file, configFilePath: project.canonicalConfigFilePath }); + this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSyntacticDiagnostics(file), "syntaxDiag"); + (_b = tracing) == null ? void 0 : _b.pop(); + } + suggestionCheck(file, project) { + var _a, _b; + (_a = tracing) == null ? void 0 : _a.push(tracing.Phase.Session, "suggestionCheck", { file, configFilePath: project.canonicalConfigFilePath }); + this.sendDiagnosticsEvent(file, project, project.getLanguageService().getSuggestionDiagnostics(file), "suggestionDiag"); + (_b = tracing) == null ? void 0 : _b.pop(); + } + sendDiagnosticsEvent(file, project, diagnostics, kind) { + try { + this.event({ file, diagnostics: diagnostics.map((diag2) => formatDiag(file, project, diag2)) }, kind); + } catch (err) { + this.logError(err, kind); + } + } + /** It is the caller's responsibility to verify that `!this.suppressDiagnosticEvents`. */ + updateErrorCheck(next, checkList, ms, requireOpen = true) { + Debug.assert(!this.suppressDiagnosticEvents); + const seq = this.changeSeq; + const followMs = Math.min(ms, 200); + let index = 0; + const goNext = () => { + index++; + if (checkList.length > index) { + next.delay("checkOne", followMs, checkOne); + } + }; + const checkOne = () => { + if (this.changeSeq !== seq) { + return; + } + let item = checkList[index]; + if (isString(item)) { + item = this.toPendingErrorCheck(item); + if (!item) { + goNext(); + return; + } + } + const { fileName, project } = item; + updateProjectIfDirty(project); + if (!project.containsFile(fileName, requireOpen)) { + return; + } + this.syntacticCheck(fileName, project); + if (this.changeSeq !== seq) { + return; + } + if (project.projectService.serverMode !== 0 /* Semantic */) { + goNext(); + return; + } + next.immediate("semanticCheck", () => { + this.semanticCheck(fileName, project); + if (this.changeSeq !== seq) { + return; + } + if (this.getPreferences(fileName).disableSuggestions) { + goNext(); + return; + } + next.immediate("suggestionCheck", () => { + this.suggestionCheck(fileName, project); + goNext(); + }); + }); + }; + if (checkList.length > index && this.changeSeq === seq) { + next.delay("checkOne", ms, checkOne); + } + } + cleanProjects(caption, projects) { + if (!projects) { + return; + } + this.logger.info(`cleaning ${caption}`); + for (const p of projects) { + p.getLanguageService( + /*ensureSynchronized*/ + false + ).cleanupSemanticCache(); + p.cleanupProgram(); + } + } + cleanup() { + this.cleanProjects("inferred projects", this.projectService.inferredProjects); + this.cleanProjects("configured projects", arrayFrom(this.projectService.configuredProjects.values())); + this.cleanProjects("external projects", this.projectService.externalProjects); + if (this.host.gc) { + this.logger.info(`host.gc()`); + this.host.gc(); + } + } + getEncodedSyntacticClassifications(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + return languageService.getEncodedSyntacticClassifications(file, args); + } + getEncodedSemanticClassifications(args) { + const { file, project } = this.getFileAndProject(args); + const format = args.format === "2020" ? "2020" /* TwentyTwenty */ : "original" /* Original */; + return project.getLanguageService().getEncodedSemanticClassifications(file, args, format); + } + getProject(projectFileName) { + return projectFileName === void 0 ? void 0 : this.projectService.findProject(projectFileName); + } + getConfigFileAndProject(args) { + const project = this.getProject(args.projectFileName); + const file = toNormalizedPath(args.file); + return { + configFile: project && project.hasConfigFile(file) ? file : void 0, + project + }; + } + getConfigFileDiagnostics(configFile, project, includeLinePosition) { + const projectErrors = project.getAllProjectErrors(); + const optionsErrors = project.getLanguageService().getCompilerOptionsDiagnostics(); + const diagnosticsForConfigFile = filter( + concatenate(projectErrors, optionsErrors), + (diagnostic) => !!diagnostic.file && diagnostic.file.fileName === configFile + ); + return includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnosticsForConfigFile) : map( + diagnosticsForConfigFile, + (diagnostic) => formatDiagnosticToProtocol( + diagnostic, + /*includeFileName*/ + false + ) + ); + } + convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) { + return diagnostics.map((d) => ({ + message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), + start: d.start, + // TODO: GH#18217 + length: d.length, + // TODO: GH#18217 + category: diagnosticCategoryName(d), + code: d.code, + source: d.source, + startLocation: d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start)), + // TODO: GH#18217 + endLocation: d.file && convertToLocation(getLineAndCharacterOfPosition(d.file, d.start + d.length)), + // TODO: GH#18217 + reportsUnnecessary: d.reportsUnnecessary, + reportsDeprecated: d.reportsDeprecated, + relatedInformation: map(d.relatedInformation, formatRelatedInformation) + })); + } + getCompilerOptionsDiagnostics(args) { + const project = this.getProject(args.projectFileName); + return this.convertToDiagnosticsWithLinePosition( + filter( + project.getLanguageService().getCompilerOptionsDiagnostics(), + (diagnostic) => !diagnostic.file + ), + /*scriptInfo*/ + void 0 + ); + } + convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo) { + return diagnostics.map( + (d) => ({ + message: flattenDiagnosticMessageText(d.messageText, this.host.newLine), + start: d.start, + length: d.length, + category: diagnosticCategoryName(d), + code: d.code, + source: d.source, + startLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start), + // TODO: GH#18217 + endLocation: scriptInfo && scriptInfo.positionToLineOffset(d.start + d.length), + reportsUnnecessary: d.reportsUnnecessary, + reportsDeprecated: d.reportsDeprecated, + relatedInformation: map(d.relatedInformation, formatRelatedInformation) + }) + ); + } + getDiagnosticsWorker(args, isSemantic, selector, includeLinePosition) { + const { project, file } = this.getFileAndProject(args); + if (isSemantic && isDeclarationFileInJSOnlyNonConfiguredProject(project, file)) { + return emptyArray2; + } + const scriptInfo = project.getScriptInfoForNormalizedPath(file); + const diagnostics = selector(project, file); + return includeLinePosition ? this.convertToDiagnosticsWithLinePosition(diagnostics, scriptInfo) : diagnostics.map((d) => formatDiag(file, project, d)); + } + getDefinition(args, simplifiedResult) { + const { file, project } = this.getFileAndProject(args); + const position = this.getPositionInFile(args, file); + const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getDefinitionAtPosition(file, position) || emptyArray2, project); + return simplifiedResult ? this.mapDefinitionInfo(definitions, project) : definitions.map(_Session.mapToOriginalLocation); + } + mapDefinitionInfoLocations(definitions, project) { + return definitions.map((info) => { + const newDocumentSpan = getMappedDocumentSpanForProject(info, project); + return !newDocumentSpan ? info : { + ...newDocumentSpan, + containerKind: info.containerKind, + containerName: info.containerName, + kind: info.kind, + name: info.name, + failedAliasResolution: info.failedAliasResolution, + ...info.unverified && { unverified: info.unverified } + }; + }); + } + getDefinitionAndBoundSpan(args, simplifiedResult) { + const { file, project } = this.getFileAndProject(args); + const position = this.getPositionInFile(args, file); + const scriptInfo = Debug.checkDefined(project.getScriptInfo(file)); + const unmappedDefinitionAndBoundSpan = project.getLanguageService().getDefinitionAndBoundSpan(file, position); + if (!unmappedDefinitionAndBoundSpan || !unmappedDefinitionAndBoundSpan.definitions) { + return { + definitions: emptyArray2, + textSpan: void 0 + // TODO: GH#18217 + }; + } + const definitions = this.mapDefinitionInfoLocations(unmappedDefinitionAndBoundSpan.definitions, project); + const { textSpan } = unmappedDefinitionAndBoundSpan; + if (simplifiedResult) { + return { + definitions: this.mapDefinitionInfo(definitions, project), + textSpan: toProtocolTextSpan(textSpan, scriptInfo) + }; + } + return { + definitions: definitions.map(_Session.mapToOriginalLocation), + textSpan + }; + } + findSourceDefinition(args) { + var _a; + const { file, project } = this.getFileAndProject(args); + const position = this.getPositionInFile(args, file); + const unmappedDefinitions = project.getLanguageService().getDefinitionAtPosition(file, position); + let definitions = this.mapDefinitionInfoLocations(unmappedDefinitions || emptyArray2, project).slice(); + const needsJsResolution = this.projectService.serverMode === 0 /* Semantic */ && (!some(definitions, (d) => toNormalizedPath(d.fileName) !== file && !d.isAmbient) || some(definitions, (d) => !!d.failedAliasResolution)); + if (needsJsResolution) { + const definitionSet = createSet((d) => d.textSpan.start, documentSpansEqual); + definitions == null ? void 0 : definitions.forEach((d) => definitionSet.add(d)); + const noDtsProject = project.getNoDtsResolutionProject(file); + const ls = noDtsProject.getLanguageService(); + const jsDefinitions = (_a = ls.getDefinitionAtPosition( + file, + position, + /*searchOtherFilesOnly*/ + true, + /*stopAtAlias*/ + false + )) == null ? void 0 : _a.filter((d) => toNormalizedPath(d.fileName) !== file); + if (some(jsDefinitions)) { + for (const jsDefinition of jsDefinitions) { + if (jsDefinition.unverified) { + const refined = tryRefineDefinition(jsDefinition, project.getLanguageService().getProgram(), ls.getProgram()); + if (some(refined)) { + for (const def of refined) { + definitionSet.add(def); + } + continue; + } + } + definitionSet.add(jsDefinition); + } + } else { + const ambientCandidates = definitions.filter((d) => toNormalizedPath(d.fileName) !== file && d.isAmbient); + for (const candidate of some(ambientCandidates) ? ambientCandidates : getAmbientCandidatesByClimbingAccessChain()) { + const fileNameToSearch = findImplementationFileFromDtsFileName(candidate.fileName, file, noDtsProject); + if (!fileNameToSearch) + continue; + const info = this.projectService.getOrCreateScriptInfoNotOpenedByClient( + fileNameToSearch, + noDtsProject.currentDirectory, + noDtsProject.directoryStructureHost + ); + if (!info) + continue; + if (!noDtsProject.containsScriptInfo(info)) { + noDtsProject.addRoot(info); + noDtsProject.updateGraph(); + } + const noDtsProgram = ls.getProgram(); + const fileToSearch = Debug.checkDefined(noDtsProgram.getSourceFile(fileNameToSearch)); + for (const match of searchForDeclaration(candidate.name, fileToSearch, noDtsProgram)) { + definitionSet.add(match); + } + } + } + definitions = arrayFrom(definitionSet.values()); + } + definitions = definitions.filter((d) => !d.isAmbient && !d.failedAliasResolution); + return this.mapDefinitionInfo(definitions, project); + function findImplementationFileFromDtsFileName(fileName, resolveFromFile, auxiliaryProject) { + var _a2, _b, _c; + const nodeModulesPathParts = getNodeModulePathParts(fileName); + if (nodeModulesPathParts && fileName.lastIndexOf(nodeModulesPathPart) === nodeModulesPathParts.topLevelNodeModulesIndex) { + const packageDirectory = fileName.substring(0, nodeModulesPathParts.packageRootIndex); + const packageJsonCache = (_a2 = project.getModuleResolutionCache()) == null ? void 0 : _a2.getPackageJsonInfoCache(); + const compilerOptions = project.getCompilationSettings(); + const packageJson = getPackageScopeForPath(getNormalizedAbsolutePath(packageDirectory + "/package.json", project.getCurrentDirectory()), getTemporaryModuleResolutionState(packageJsonCache, project, compilerOptions)); + if (!packageJson) + return void 0; + const entrypoints = getEntrypointsFromPackageJsonInfo( + packageJson, + { moduleResolution: 2 /* Node10 */ }, + project, + project.getModuleResolutionCache() + ); + const packageNamePathPart = fileName.substring( + nodeModulesPathParts.topLevelPackageNameIndex + 1, + nodeModulesPathParts.packageRootIndex + ); + const packageName = getPackageNameFromTypesPackageName(unmangleScopedPackageName(packageNamePathPart)); + const path = project.toPath(fileName); + if (entrypoints && some(entrypoints, (e) => project.toPath(e) === path)) { + return (_b = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(packageName, resolveFromFile).resolvedModule) == null ? void 0 : _b.resolvedFileName; + } else { + const pathToFileInPackage = fileName.substring(nodeModulesPathParts.packageRootIndex + 1); + const specifier = `${packageName}/${removeFileExtension(pathToFileInPackage)}`; + return (_c = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(specifier, resolveFromFile).resolvedModule) == null ? void 0 : _c.resolvedFileName; + } + } + return void 0; + } + function getAmbientCandidatesByClimbingAccessChain() { + const ls = project.getLanguageService(); + const program = ls.getProgram(); + const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); + if ((isStringLiteralLike(initialNode) || isIdentifier(initialNode)) && isAccessExpression(initialNode.parent)) { + return forEachNameInAccessChainWalkingLeft(initialNode, (nameInChain) => { + var _a2; + if (nameInChain === initialNode) + return void 0; + const candidates = (_a2 = ls.getDefinitionAtPosition( + file, + nameInChain.getStart(), + /*searchOtherFilesOnly*/ + true, + /*stopAtAlias*/ + false + )) == null ? void 0 : _a2.filter((d) => toNormalizedPath(d.fileName) !== file && d.isAmbient).map((d) => ({ + fileName: d.fileName, + name: getTextOfIdentifierOrLiteral(initialNode) + })); + if (some(candidates)) { + return candidates; + } + }) || emptyArray2; + } + return emptyArray2; + } + function tryRefineDefinition(definition, program, noDtsProgram) { + var _a2; + const fileToSearch = noDtsProgram.getSourceFile(definition.fileName); + if (!fileToSearch) { + return void 0; + } + const initialNode = getTouchingPropertyName(program.getSourceFile(file), position); + const symbol = program.getTypeChecker().getSymbolAtLocation(initialNode); + const importSpecifier = symbol && getDeclarationOfKind(symbol, 276 /* ImportSpecifier */); + if (!importSpecifier) + return void 0; + const nameToSearch = ((_a2 = importSpecifier.propertyName) == null ? void 0 : _a2.text) || importSpecifier.name.text; + return searchForDeclaration(nameToSearch, fileToSearch, noDtsProgram); + } + function searchForDeclaration(declarationName, fileToSearch, noDtsProgram) { + const matches = ts_FindAllReferences_exports.Core.getTopMostDeclarationNamesInFile(declarationName, fileToSearch); + return mapDefined(matches, (match) => { + const symbol = noDtsProgram.getTypeChecker().getSymbolAtLocation(match); + const decl = getDeclarationFromName(match); + if (symbol && decl) { + return ts_GoToDefinition_exports.createDefinitionInfo( + decl, + noDtsProgram.getTypeChecker(), + symbol, + decl, + /*unverified*/ + true + ); + } + }); + } + } + getEmitOutput(args) { + const { file, project } = this.getFileAndProject(args); + if (!project.shouldEmitFile(project.getScriptInfo(file))) { + return { emitSkipped: true, outputFiles: [], diagnostics: [] }; + } + const result = project.getLanguageService().getEmitOutput(file); + return args.richResponse ? { + ...result, + diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(result.diagnostics) : result.diagnostics.map((d) => formatDiagnosticToProtocol( + d, + /*includeFileName*/ + true + )) + } : result; + } + mapJSDocTagInfo(tags, project, richResponse) { + return tags ? tags.map((tag) => { + var _a; + return { + ...tag, + text: richResponse ? this.mapDisplayParts(tag.text, project) : (_a = tag.text) == null ? void 0 : _a.map((part) => part.text).join("") + }; + }) : []; + } + mapDisplayParts(parts, project) { + if (!parts) { + return []; + } + return parts.map( + (part) => part.kind !== "linkName" ? part : { + ...part, + target: this.toFileSpan(part.target.fileName, part.target.textSpan, project) + } + ); + } + mapSignatureHelpItems(items, project, richResponse) { + return items.map((item) => ({ + ...item, + documentation: this.mapDisplayParts(item.documentation, project), + parameters: item.parameters.map((p) => ({ ...p, documentation: this.mapDisplayParts(p.documentation, project) })), + tags: this.mapJSDocTagInfo(item.tags, project, richResponse) + })); + } + mapDefinitionInfo(definitions, project) { + return definitions.map((def) => ({ ...this.toFileSpanWithContext(def.fileName, def.textSpan, def.contextSpan, project), ...def.unverified && { unverified: def.unverified } })); + } + /* + * When we map a .d.ts location to .ts, Visual Studio gets confused because there's no associated Roslyn Document in + * the same project which corresponds to the file. VS Code has no problem with this, and luckily we have two protocols. + * This retains the existing behavior for the "simplified" (VS Code) protocol but stores the .d.ts location in a + * set of additional fields, and does the reverse for VS (store the .d.ts location where + * it used to be and stores the .ts location in the additional fields). + */ + static mapToOriginalLocation(def) { + if (def.originalFileName) { + Debug.assert(def.originalTextSpan !== void 0, "originalTextSpan should be present if originalFileName is"); + return { + ...def, + fileName: def.originalFileName, + textSpan: def.originalTextSpan, + targetFileName: def.fileName, + targetTextSpan: def.textSpan, + contextSpan: def.originalContextSpan, + targetContextSpan: def.contextSpan + }; + } + return def; + } + toFileSpan(fileName, textSpan, project) { + const ls = project.getLanguageService(); + const start = ls.toLineColumnOffset(fileName, textSpan.start); + const end = ls.toLineColumnOffset(fileName, textSpanEnd(textSpan)); + return { + file: fileName, + start: { line: start.line + 1, offset: start.character + 1 }, + end: { line: end.line + 1, offset: end.character + 1 } + }; + } + toFileSpanWithContext(fileName, textSpan, contextSpan, project) { + const fileSpan = this.toFileSpan(fileName, textSpan, project); + const context = contextSpan && this.toFileSpan(fileName, contextSpan, project); + return context ? { ...fileSpan, contextStart: context.start, contextEnd: context.end } : fileSpan; + } + getTypeDefinition(args) { + const { file, project } = this.getFileAndProject(args); + const position = this.getPositionInFile(args, file); + const definitions = this.mapDefinitionInfoLocations(project.getLanguageService().getTypeDefinitionAtPosition(file, position) || emptyArray2, project); + return this.mapDefinitionInfo(definitions, project); + } + mapImplementationLocations(implementations, project) { + return implementations.map((info) => { + const newDocumentSpan = getMappedDocumentSpanForProject(info, project); + return !newDocumentSpan ? info : { + ...newDocumentSpan, + kind: info.kind, + displayParts: info.displayParts + }; + }); + } + getImplementation(args, simplifiedResult) { + const { file, project } = this.getFileAndProject(args); + const position = this.getPositionInFile(args, file); + const implementations = this.mapImplementationLocations(project.getLanguageService().getImplementationAtPosition(file, position) || emptyArray2, project); + return simplifiedResult ? implementations.map(({ fileName, textSpan, contextSpan }) => this.toFileSpanWithContext(fileName, textSpan, contextSpan, project)) : implementations.map(_Session.mapToOriginalLocation); + } + getSyntacticDiagnosticsSync(args) { + const { configFile } = this.getConfigFileAndProject(args); + if (configFile) { + return emptyArray2; + } + return this.getDiagnosticsWorker( + args, + /*isSemantic*/ + false, + (project, file) => project.getLanguageService().getSyntacticDiagnostics(file), + !!args.includeLinePosition + ); + } + getSemanticDiagnosticsSync(args) { + const { configFile, project } = this.getConfigFileAndProject(args); + if (configFile) { + return this.getConfigFileDiagnostics(configFile, project, !!args.includeLinePosition); + } + return this.getDiagnosticsWorker( + args, + /*isSemantic*/ + true, + (project2, file) => project2.getLanguageService().getSemanticDiagnostics(file).filter((d) => !!d.file), + !!args.includeLinePosition + ); + } + getSuggestionDiagnosticsSync(args) { + const { configFile } = this.getConfigFileAndProject(args); + if (configFile) { + return emptyArray2; + } + return this.getDiagnosticsWorker( + args, + /*isSemantic*/ + true, + (project, file) => project.getLanguageService().getSuggestionDiagnostics(file), + !!args.includeLinePosition + ); + } + getJsxClosingTag(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const position = this.getPositionInFile(args, file); + const tag = languageService.getJsxClosingTagAtPosition(file, position); + return tag === void 0 ? void 0 : { newText: tag.newText, caretOffset: 0 }; + } + getLinkedEditingRange(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const position = this.getPositionInFile(args, file); + const linkedEditInfo = languageService.getLinkedEditingRangeAtPosition(file, position); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + if (scriptInfo === void 0 || linkedEditInfo === void 0) + return void 0; + return convertLinkedEditInfoToRanges(linkedEditInfo, scriptInfo); + } + getDocumentHighlights(args, simplifiedResult) { + const { file, project } = this.getFileAndProject(args); + const position = this.getPositionInFile(args, file); + const documentHighlights = project.getLanguageService().getDocumentHighlights(file, position, args.filesToSearch); + if (!documentHighlights) + return emptyArray2; + if (!simplifiedResult) + return documentHighlights; + return documentHighlights.map(({ fileName, highlightSpans }) => { + const scriptInfo = project.getScriptInfo(fileName); + return { + file: fileName, + highlightSpans: highlightSpans.map(({ textSpan, kind, contextSpan }) => ({ + ...toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo), + kind + })) + }; + }); + } + provideInlayHints(args) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const hints = project.getLanguageService().provideInlayHints(file, args, this.getPreferences(file)); + return hints.map((hint) => { + const { position, displayParts } = hint; + return { + ...hint, + position: scriptInfo.positionToLineOffset(position), + displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => { + if (span) { + Debug.assertIsDefined(file2, "Target file should be defined together with its span."); + const scriptInfo2 = this.projectService.getScriptInfo(file2); + return { + text, + span: { + start: scriptInfo2.positionToLineOffset(span.start), + end: scriptInfo2.positionToLineOffset(span.start + span.length), + file: file2 + } + }; + } else { + return { text }; + } + }) + }; + }); + } + setCompilerOptionsForInferredProjects(args) { + this.projectService.setCompilerOptionsForInferredProjects(args.options, args.projectRootPath); + } + getProjectInfo(args) { + return this.getProjectInfoWorker( + args.file, + args.projectFileName, + args.needFileNameList, + /*excludeConfigFiles*/ + false + ); + } + getProjectInfoWorker(uncheckedFileName, projectFileName, needFileNameList, excludeConfigFiles) { + const { project } = this.getFileAndProjectWorker(uncheckedFileName, projectFileName); + updateProjectIfDirty(project); + const projectInfo = { + configFileName: project.getProjectName(), + languageServiceDisabled: !project.languageServiceEnabled, + fileNames: needFileNameList ? project.getFileNames( + /*excludeFilesFromExternalLibraries*/ + false, + excludeConfigFiles + ) : void 0 + }; + return projectInfo; + } + getRenameInfo(args) { + const { file, project } = this.getFileAndProject(args); + const position = this.getPositionInFile(args, file); + const preferences = this.getPreferences(file); + return project.getLanguageService().getRenameInfo(file, position, preferences); + } + getProjects(args, getScriptInfoEnsuringProjectsUptoDate, ignoreNoProjectError) { + let projects; + let symLinkedProjects; + if (args.projectFileName) { + const project = this.getProject(args.projectFileName); + if (project) { + projects = [project]; + } + } else { + const scriptInfo = getScriptInfoEnsuringProjectsUptoDate ? this.projectService.getScriptInfoEnsuringProjectsUptoDate(args.file) : this.projectService.getScriptInfo(args.file); + if (!scriptInfo) { + if (ignoreNoProjectError) + return emptyArray2; + this.projectService.logErrorForScriptInfoNotFound(args.file); + return Errors.ThrowNoProject(); + } else if (!getScriptInfoEnsuringProjectsUptoDate) { + this.projectService.ensureDefaultProjectForFile(scriptInfo); + } + projects = scriptInfo.containingProjects; + symLinkedProjects = this.projectService.getSymlinkedProjects(scriptInfo); + } + projects = filter(projects, (p) => p.languageServiceEnabled && !p.isOrphan()); + if (!ignoreNoProjectError && (!projects || !projects.length) && !symLinkedProjects) { + this.projectService.logErrorForScriptInfoNotFound(args.file ?? args.projectFileName); + return Errors.ThrowNoProject(); + } + return symLinkedProjects ? { projects, symLinkedProjects } : projects; + } + getDefaultProject(args) { + if (args.projectFileName) { + const project = this.getProject(args.projectFileName); + if (project) { + return project; + } + if (!args.file) { + return Errors.ThrowNoProject(); + } + } + const info = this.projectService.getScriptInfo(args.file); + return info.getDefaultProject(); + } + getRenameLocations(args, simplifiedResult) { + const file = toNormalizedPath(args.file); + const position = this.getPositionInFile(args, file); + const projects = this.getProjects(args); + const defaultProject = this.getDefaultProject(args); + const preferences = this.getPreferences(file); + const renameInfo = this.mapRenameInfo( + defaultProject.getLanguageService().getRenameInfo(file, position, preferences), + Debug.checkDefined(this.projectService.getScriptInfo(file)) + ); + if (!renameInfo.canRename) + return simplifiedResult ? { info: renameInfo, locs: [] } : []; + const locations = getRenameLocationsWorker( + projects, + defaultProject, + { fileName: args.file, pos: position }, + !!args.findInStrings, + !!args.findInComments, + preferences + ); + if (!simplifiedResult) + return locations; + return { info: renameInfo, locs: this.toSpanGroups(locations) }; + } + mapRenameInfo(info, scriptInfo) { + if (info.canRename) { + const { canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan } = info; + return identity( + { canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan: toProtocolTextSpan(triggerSpan, scriptInfo) } + ); + } else { + return info; + } + } + toSpanGroups(locations) { + const map2 = /* @__PURE__ */ new Map(); + for (const { fileName, textSpan, contextSpan, originalContextSpan: _2, originalTextSpan: _, originalFileName: _1, ...prefixSuffixText } of locations) { + let group2 = map2.get(fileName); + if (!group2) + map2.set(fileName, group2 = { file: fileName, locs: [] }); + const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(fileName)); + group2.locs.push({ ...toProtocolTextSpanWithContext(textSpan, contextSpan, scriptInfo), ...prefixSuffixText }); + } + return arrayFrom(map2.values()); + } + getReferences(args, simplifiedResult) { + const file = toNormalizedPath(args.file); + const projects = this.getProjects(args); + const position = this.getPositionInFile(args, file); + const references = getReferencesWorker( + projects, + this.getDefaultProject(args), + { fileName: args.file, pos: position }, + this.logger + ); + if (!simplifiedResult) + return references; + const preferences = this.getPreferences(file); + const defaultProject = this.getDefaultProject(args); + const scriptInfo = defaultProject.getScriptInfoForNormalizedPath(file); + const nameInfo = defaultProject.getLanguageService().getQuickInfoAtPosition(file, position); + const symbolDisplayString = nameInfo ? displayPartsToString(nameInfo.displayParts) : ""; + const nameSpan = nameInfo && nameInfo.textSpan; + const symbolStartOffset = nameSpan ? scriptInfo.positionToLineOffset(nameSpan.start).offset : 0; + const symbolName2 = nameSpan ? scriptInfo.getSnapshot().getText(nameSpan.start, textSpanEnd(nameSpan)) : ""; + const refs = flatMap(references, (referencedSymbol) => { + return referencedSymbol.references.map((entry) => referenceEntryToReferencesResponseItem(this.projectService, entry, preferences)); + }); + return { refs, symbolName: symbolName2, symbolStartOffset, symbolDisplayString }; + } + getFileReferences(args, simplifiedResult) { + const projects = this.getProjects(args); + const fileName = args.file; + const preferences = this.getPreferences(toNormalizedPath(fileName)); + const references = []; + const seen = createDocumentSpanSet(); + forEachProjectInProjects( + projects, + /*path*/ + void 0, + (project) => { + if (project.getCancellationToken().isCancellationRequested()) + return; + const projectOutputs = project.getLanguageService().getFileReferences(fileName); + if (projectOutputs) { + for (const referenceEntry of projectOutputs) { + if (!seen.has(referenceEntry)) { + references.push(referenceEntry); + seen.add(referenceEntry); + } + } + } + } + ); + if (!simplifiedResult) + return references; + const refs = references.map((entry) => referenceEntryToReferencesResponseItem(this.projectService, entry, preferences)); + return { + refs, + symbolName: `"${args.file}"` + }; + } + /** + * @param fileName is the name of the file to be opened + * @param fileContent is a version of the file content that is known to be more up to date than the one on disk + */ + openClientFile(fileName, fileContent, scriptKind, projectRootPath) { + this.projectService.openClientFileWithNormalizedPath( + fileName, + fileContent, + scriptKind, + /*hasMixedContent*/ + false, + projectRootPath + ); + } + getPosition(args, scriptInfo) { + return args.position !== void 0 ? args.position : scriptInfo.lineOffsetToPosition(args.line, args.offset); + } + getPositionInFile(args, file) { + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + return this.getPosition(args, scriptInfo); + } + getFileAndProject(args) { + return this.getFileAndProjectWorker(args.file, args.projectFileName); + } + getFileAndLanguageServiceForSyntacticOperation(args) { + const { file, project } = this.getFileAndProject(args); + return { + file, + languageService: project.getLanguageService( + /*ensureSynchronized*/ + false + ) + }; + } + getFileAndProjectWorker(uncheckedFileName, projectFileName) { + const file = toNormalizedPath(uncheckedFileName); + const project = this.getProject(projectFileName) || this.projectService.ensureDefaultProjectForFile(file); + return { file, project }; + } + getOutliningSpans(args, simplifiedResult) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const spans = languageService.getOutliningSpans(file); + if (simplifiedResult) { + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + return spans.map((s) => ({ + textSpan: toProtocolTextSpan(s.textSpan, scriptInfo), + hintSpan: toProtocolTextSpan(s.hintSpan, scriptInfo), + bannerText: s.bannerText, + autoCollapse: s.autoCollapse, + kind: s.kind + })); + } else { + return spans; + } + } + getTodoComments(args) { + const { file, project } = this.getFileAndProject(args); + return project.getLanguageService().getTodoComments(file, args.descriptors); + } + getDocCommentTemplate(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const position = this.getPositionInFile(args, file); + return languageService.getDocCommentTemplateAtPosition(file, position, this.getPreferences(file), this.getFormatOptions(file)); + } + getSpanOfEnclosingComment(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const onlyMultiLine = args.onlyMultiLine; + const position = this.getPositionInFile(args, file); + return languageService.getSpanOfEnclosingComment(file, position, onlyMultiLine); + } + getIndentation(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const position = this.getPositionInFile(args, file); + const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file); + const indentation = languageService.getIndentationAtPosition(file, position, options); + return { position, indentation }; + } + getBreakpointStatement(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const position = this.getPositionInFile(args, file); + return languageService.getBreakpointStatementAtPosition(file, position); + } + getNameOrDottedNameSpan(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const position = this.getPositionInFile(args, file); + return languageService.getNameOrDottedNameSpan(file, position, position); + } + isValidBraceCompletion(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const position = this.getPositionInFile(args, file); + return languageService.isValidBraceCompletionAtPosition(file, position, args.openingBrace.charCodeAt(0)); + } + getQuickInfoWorker(args, simplifiedResult) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const quickInfo = project.getLanguageService().getQuickInfoAtPosition(file, this.getPosition(args, scriptInfo)); + if (!quickInfo) { + return void 0; + } + const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc; + if (simplifiedResult) { + const displayString = displayPartsToString(quickInfo.displayParts); + return { + kind: quickInfo.kind, + kindModifiers: quickInfo.kindModifiers, + start: scriptInfo.positionToLineOffset(quickInfo.textSpan.start), + end: scriptInfo.positionToLineOffset(textSpanEnd(quickInfo.textSpan)), + displayString, + documentation: useDisplayParts ? this.mapDisplayParts(quickInfo.documentation, project) : displayPartsToString(quickInfo.documentation), + tags: this.mapJSDocTagInfo(quickInfo.tags, project, useDisplayParts) + }; + } else { + return useDisplayParts ? quickInfo : { + ...quickInfo, + tags: this.mapJSDocTagInfo( + quickInfo.tags, + project, + /*richResponse*/ + false + ) + }; + } + } + getFormattingEditsForRange(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const startPosition = scriptInfo.lineOffsetToPosition(args.line, args.offset); + const endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset); + const edits = languageService.getFormattingEditsForRange(file, startPosition, endPosition, this.getFormatOptions(file)); + if (!edits) { + return void 0; + } + return edits.map((edit) => this.convertTextChangeToCodeEdit(edit, scriptInfo)); + } + getFormattingEditsForRangeFull(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file); + return languageService.getFormattingEditsForRange(file, args.position, args.endPosition, options); + } + getFormattingEditsForDocumentFull(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file); + return languageService.getFormattingEditsForDocument(file, options); + } + getFormattingEditsAfterKeystrokeFull(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const options = args.options ? convertFormatOptions(args.options) : this.getFormatOptions(file); + return languageService.getFormattingEditsAfterKeystroke(file, args.position, args.key, options); + } + getFormattingEditsAfterKeystroke(args) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const position = scriptInfo.lineOffsetToPosition(args.line, args.offset); + const formatOptions = this.getFormatOptions(file); + const edits = languageService.getFormattingEditsAfterKeystroke(file, position, args.key, formatOptions); + if (args.key === "\n" && (!edits || edits.length === 0 || allEditsBeforePos(edits, position))) { + const { lineText, absolutePosition } = scriptInfo.textStorage.getAbsolutePositionAndLineText(args.line); + if (lineText && lineText.search("\\S") < 0) { + const preferredIndent = languageService.getIndentationAtPosition(file, position, formatOptions); + let hasIndent = 0; + let i, len; + for (i = 0, len = lineText.length; i < len; i++) { + if (lineText.charAt(i) === " ") { + hasIndent++; + } else if (lineText.charAt(i) === " ") { + hasIndent += formatOptions.tabSize; + } else { + break; + } + } + if (preferredIndent !== hasIndent) { + const firstNoWhiteSpacePosition = absolutePosition + i; + edits.push({ + span: createTextSpanFromBounds(absolutePosition, firstNoWhiteSpacePosition), + newText: ts_formatting_exports.getIndentationString(preferredIndent, formatOptions) + }); + } + } + } + if (!edits) { + return void 0; + } + return edits.map((edit) => { + return { + start: scriptInfo.positionToLineOffset(edit.span.start), + end: scriptInfo.positionToLineOffset(textSpanEnd(edit.span)), + newText: edit.newText ? edit.newText : "" + }; + }); + } + getCompletions(args, kind) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const position = this.getPosition(args, scriptInfo); + const completions = project.getLanguageService().getCompletionsAtPosition( + file, + position, + { + ...convertUserPreferences(this.getPreferences(file)), + triggerCharacter: args.triggerCharacter, + triggerKind: args.triggerKind, + includeExternalModuleExports: args.includeExternalModuleExports, + includeInsertTextCompletions: args.includeInsertTextCompletions + }, + project.projectService.getFormatCodeOptions(file) + ); + if (completions === void 0) + return void 0; + if (kind === "completions-full" /* CompletionsFull */) + return completions; + const prefix = args.prefix || ""; + const entries = mapDefined(completions.entries, (entry) => { + if (completions.isMemberCompletion || startsWith(entry.name.toLowerCase(), prefix.toLowerCase())) { + const { + name, + kind: kind2, + kindModifiers, + sortText, + insertText, + filterText, + replacementSpan, + hasAction, + source, + sourceDisplay, + labelDetails, + isSnippet, + isRecommended, + isPackageJsonImport, + isImportStatementCompletion, + data + } = entry; + const convertedSpan = replacementSpan ? toProtocolTextSpan(replacementSpan, scriptInfo) : void 0; + return { + name, + kind: kind2, + kindModifiers, + sortText, + insertText, + filterText, + replacementSpan: convertedSpan, + isSnippet, + hasAction: hasAction || void 0, + source, + sourceDisplay, + labelDetails, + isRecommended, + isPackageJsonImport, + isImportStatementCompletion, + data + }; + } + }); + if (kind === "completions" /* Completions */) { + if (completions.metadata) + entries.metadata = completions.metadata; + return entries; + } + const res = { + ...completions, + optionalReplacementSpan: completions.optionalReplacementSpan && toProtocolTextSpan(completions.optionalReplacementSpan, scriptInfo), + entries + }; + return res; + } + getCompletionEntryDetails(args, fullResult) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const position = this.getPosition(args, scriptInfo); + const formattingOptions = project.projectService.getFormatCodeOptions(file); + const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc; + const result = mapDefined(args.entryNames, (entryName) => { + const { name, source, data } = typeof entryName === "string" ? { name: entryName, source: void 0, data: void 0 } : entryName; + return project.getLanguageService().getCompletionEntryDetails(file, position, name, formattingOptions, source, this.getPreferences(file), data ? cast(data, isCompletionEntryData) : void 0); + }); + return fullResult ? useDisplayParts ? result : result.map((details) => ({ ...details, tags: this.mapJSDocTagInfo( + details.tags, + project, + /*richResponse*/ + false + ) })) : result.map((details) => ({ + ...details, + codeActions: map(details.codeActions, (action) => this.mapCodeAction(action)), + documentation: this.mapDisplayParts(details.documentation, project), + tags: this.mapJSDocTagInfo(details.tags, project, useDisplayParts) + })); + } + getCompileOnSaveAffectedFileList(args) { + const projects = this.getProjects( + args, + /*getScriptInfoEnsuringProjectsUptoDate*/ + true, + /*ignoreNoProjectError*/ + true + ); + const info = this.projectService.getScriptInfo(args.file); + if (!info) { + return emptyArray2; + } + return combineProjectOutput( + info, + (path) => this.projectService.getScriptInfoForPath(path), + projects, + (project, info2) => { + if (!project.compileOnSaveEnabled || !project.languageServiceEnabled || project.isOrphan()) { + return void 0; + } + const compilationSettings = project.getCompilationSettings(); + if (!!compilationSettings.noEmit || isDeclarationFileName(info2.fileName) && !dtsChangeCanAffectEmit(compilationSettings)) { + return void 0; + } + return { + projectFileName: project.getProjectName(), + fileNames: project.getCompileOnSaveAffectedFileList(info2), + projectUsesOutFile: !!outFile(compilationSettings) + }; + } + ); + } + emitFile(args) { + const { file, project } = this.getFileAndProject(args); + if (!project) { + Errors.ThrowNoProject(); + } + if (!project.languageServiceEnabled) { + return args.richResponse ? { emitSkipped: true, diagnostics: [] } : false; + } + const scriptInfo = project.getScriptInfo(file); + const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path, data, writeByteOrderMark) => this.host.writeFile(path, data, writeByteOrderMark)); + return args.richResponse ? { + emitSkipped, + diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) : diagnostics.map((d) => formatDiagnosticToProtocol( + d, + /*includeFileName*/ + true + )) + } : !emitSkipped; + } + getSignatureHelpItems(args, simplifiedResult) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const position = this.getPosition(args, scriptInfo); + const helpItems = project.getLanguageService().getSignatureHelpItems(file, position, args); + const useDisplayParts = !!this.getPreferences(file).displayPartsForJSDoc; + if (helpItems && simplifiedResult) { + const span = helpItems.applicableSpan; + return { + ...helpItems, + applicableSpan: { + start: scriptInfo.positionToLineOffset(span.start), + end: scriptInfo.positionToLineOffset(span.start + span.length) + }, + items: this.mapSignatureHelpItems(helpItems.items, project, useDisplayParts) + }; + } else if (useDisplayParts || !helpItems) { + return helpItems; + } else { + return { + ...helpItems, + items: helpItems.items.map((item) => ({ ...item, tags: this.mapJSDocTagInfo( + item.tags, + project, + /*richResponse*/ + false + ) })) + }; + } + } + toPendingErrorCheck(uncheckedFileName) { + const fileName = toNormalizedPath(uncheckedFileName); + const project = this.projectService.tryGetDefaultProjectForFile(fileName); + return project && { fileName, project }; + } + getDiagnostics(next, delay, fileNames) { + if (this.suppressDiagnosticEvents) { + return; + } + if (fileNames.length > 0) { + this.updateErrorCheck(next, fileNames, delay); + } + } + change(args) { + const scriptInfo = this.projectService.getScriptInfo(args.file); + Debug.assert(!!scriptInfo); + scriptInfo.textStorage.switchToScriptVersionCache(); + const start = scriptInfo.lineOffsetToPosition(args.line, args.offset); + const end = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset); + if (start >= 0) { + this.changeSeq++; + this.projectService.applyChangesToFile( + scriptInfo, + singleIterator({ + span: { start, length: end - start }, + newText: args.insertString + // TODO: GH#18217 + }) + ); + } + } + reload(args, reqSeq) { + const file = toNormalizedPath(args.file); + const tempFileName = args.tmpfile === void 0 ? void 0 : toNormalizedPath(args.tmpfile); + const info = this.projectService.getScriptInfoForNormalizedPath(file); + if (info) { + this.changeSeq++; + if (info.reloadFromFile(tempFileName)) { + this.doOutput( + /*info*/ + void 0, + "reload" /* Reload */, + reqSeq, + /*success*/ + true + ); + } + } + } + saveToTmp(fileName, tempFileName) { + const scriptInfo = this.projectService.getScriptInfo(fileName); + if (scriptInfo) { + scriptInfo.saveTo(tempFileName); + } + } + closeClientFile(fileName) { + if (!fileName) { + return; + } + const file = normalizePath(fileName); + this.projectService.closeClientFile(file); + } + mapLocationNavigationBarItems(items, scriptInfo) { + return map(items, (item) => ({ + text: item.text, + kind: item.kind, + kindModifiers: item.kindModifiers, + spans: item.spans.map((span) => toProtocolTextSpan(span, scriptInfo)), + childItems: this.mapLocationNavigationBarItems(item.childItems, scriptInfo), + indent: item.indent + })); + } + getNavigationBarItems(args, simplifiedResult) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const items = languageService.getNavigationBarItems(file); + return !items ? void 0 : simplifiedResult ? this.mapLocationNavigationBarItems(items, this.projectService.getScriptInfoForNormalizedPath(file)) : items; + } + toLocationNavigationTree(tree, scriptInfo) { + return { + text: tree.text, + kind: tree.kind, + kindModifiers: tree.kindModifiers, + spans: tree.spans.map((span) => toProtocolTextSpan(span, scriptInfo)), + nameSpan: tree.nameSpan && toProtocolTextSpan(tree.nameSpan, scriptInfo), + childItems: map(tree.childItems, (item) => this.toLocationNavigationTree(item, scriptInfo)) + }; + } + getNavigationTree(args, simplifiedResult) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const tree = languageService.getNavigationTree(file); + return !tree ? void 0 : simplifiedResult ? this.toLocationNavigationTree(tree, this.projectService.getScriptInfoForNormalizedPath(file)) : tree; + } + getNavigateToItems(args, simplifiedResult) { + const full = this.getFullNavigateToItems(args); + return !simplifiedResult ? flatMap(full, ({ navigateToItems }) => navigateToItems) : flatMap( + full, + ({ project, navigateToItems }) => navigateToItems.map((navItem) => { + const scriptInfo = project.getScriptInfo(navItem.fileName); + const bakedItem = { + name: navItem.name, + kind: navItem.kind, + kindModifiers: navItem.kindModifiers, + isCaseSensitive: navItem.isCaseSensitive, + matchKind: navItem.matchKind, + file: navItem.fileName, + start: scriptInfo.positionToLineOffset(navItem.textSpan.start), + end: scriptInfo.positionToLineOffset(textSpanEnd(navItem.textSpan)) + }; + if (navItem.kindModifiers && navItem.kindModifiers !== "") { + bakedItem.kindModifiers = navItem.kindModifiers; + } + if (navItem.containerName && navItem.containerName.length > 0) { + bakedItem.containerName = navItem.containerName; + } + if (navItem.containerKind && navItem.containerKind.length > 0) { + bakedItem.containerKind = navItem.containerKind; + } + return bakedItem; + }) + ); + } + getFullNavigateToItems(args) { + const { currentFileOnly, searchValue, maxResultCount, projectFileName } = args; + if (currentFileOnly) { + Debug.assertIsDefined(args.file); + const { file, project } = this.getFileAndProject(args); + return [{ project, navigateToItems: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }]; + } + const preferences = this.getHostPreferences(); + const outputs = []; + const seenItems = /* @__PURE__ */ new Map(); + if (!args.file && !projectFileName) { + this.projectService.loadAncestorProjectTree(); + this.projectService.forEachEnabledProject((project) => addItemsForProject(project)); + } else { + const projects = this.getProjects(args); + forEachProjectInProjects( + projects, + /*path*/ + void 0, + (project) => addItemsForProject(project) + ); + } + return outputs; + function addItemsForProject(project) { + const projectItems = project.getLanguageService().getNavigateToItems( + searchValue, + maxResultCount, + /*fileName*/ + void 0, + /*excludeDts*/ + project.isNonTsProject(), + /*excludeLibFiles*/ + preferences.excludeLibrarySymbolsInNavTo + ); + const unseenItems = filter(projectItems, (item) => tryAddSeenItem(item) && !getMappedLocationForProject(documentSpanLocation(item), project)); + if (unseenItems.length) { + outputs.push({ project, navigateToItems: unseenItems }); + } + } + function tryAddSeenItem(item) { + const name = item.name; + if (!seenItems.has(name)) { + seenItems.set(name, [item]); + return true; + } + const seen = seenItems.get(name); + for (const seenItem of seen) { + if (navigateToItemIsEqualTo(seenItem, item)) { + return false; + } + } + seen.push(item); + return true; + } + function navigateToItemIsEqualTo(a, b) { + if (a === b) { + return true; + } + if (!a || !b) { + return false; + } + return a.containerKind === b.containerKind && a.containerName === b.containerName && a.fileName === b.fileName && a.isCaseSensitive === b.isCaseSensitive && a.kind === b.kind && a.kindModifiers === b.kindModifiers && a.matchKind === b.matchKind && a.name === b.name && a.textSpan.start === b.textSpan.start && a.textSpan.length === b.textSpan.length; + } + } + getSupportedCodeFixes(args) { + if (!args) + return getSupportedCodeFixes(); + if (args.file) { + const { file, project: project2 } = this.getFileAndProject(args); + return project2.getLanguageService().getSupportedCodeFixes(file); + } + const project = this.getProject(args.projectFileName); + if (!project) + Errors.ThrowNoProject(); + return project.getLanguageService().getSupportedCodeFixes(); + } + isLocation(locationOrSpan) { + return locationOrSpan.line !== void 0; + } + extractPositionOrRange(args, scriptInfo) { + let position; + let textRange; + if (this.isLocation(args)) { + position = getPosition(args); + } else { + textRange = this.getRange(args, scriptInfo); + } + return Debug.checkDefined(position === void 0 ? textRange : position); + function getPosition(loc) { + return loc.position !== void 0 ? loc.position : scriptInfo.lineOffsetToPosition(loc.line, loc.offset); + } + } + getRange(args, scriptInfo) { + const { startPosition, endPosition } = this.getStartAndEndPosition(args, scriptInfo); + return { pos: startPosition, end: endPosition }; + } + getApplicableRefactors(args) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = project.getScriptInfoForNormalizedPath(file); + return project.getLanguageService().getApplicableRefactors(file, this.extractPositionOrRange(args, scriptInfo), this.getPreferences(file), args.triggerReason, args.kind, args.includeInteractiveActions); + } + getEditsForRefactor(args, simplifiedResult) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = project.getScriptInfoForNormalizedPath(file); + const result = project.getLanguageService().getEditsForRefactor( + file, + this.getFormatOptions(file), + this.extractPositionOrRange(args, scriptInfo), + args.refactor, + args.action, + this.getPreferences(file), + args.interactiveRefactorArguments + ); + if (result === void 0) { + return { + edits: [] + }; + } + if (simplifiedResult) { + const { renameFilename, renameLocation, edits } = result; + let mappedRenameLocation; + if (renameFilename !== void 0 && renameLocation !== void 0) { + const renameScriptInfo = project.getScriptInfoForNormalizedPath(toNormalizedPath(renameFilename)); + mappedRenameLocation = getLocationInNewDocument(getSnapshotText(renameScriptInfo.getSnapshot()), renameFilename, renameLocation, edits); + } + return { + renameLocation: mappedRenameLocation, + renameFilename, + edits: this.mapTextChangesToCodeEdits(edits), + notApplicableReason: result.notApplicableReason + }; + } + return result; + } + getMoveToRefactoringFileSuggestions(args) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = project.getScriptInfoForNormalizedPath(file); + return project.getLanguageService().getMoveToRefactoringFileSuggestions(file, this.extractPositionOrRange(args, scriptInfo), this.getPreferences(file)); + } + organizeImports(args, simplifiedResult) { + Debug.assert(args.scope.type === "file"); + const { file, project } = this.getFileAndProject(args.scope.args); + const changes = project.getLanguageService().organizeImports( + { + fileName: file, + mode: args.mode ?? (args.skipDestructiveCodeActions ? "SortAndCombine" /* SortAndCombine */ : void 0), + type: "file" + }, + this.getFormatOptions(file), + this.getPreferences(file) + ); + if (simplifiedResult) { + return this.mapTextChangesToCodeEdits(changes); + } else { + return changes; + } + } + getEditsForFileRename(args, simplifiedResult) { + const oldPath = toNormalizedPath(args.oldFilePath); + const newPath = toNormalizedPath(args.newFilePath); + const formatOptions = this.getHostFormatOptions(); + const preferences = this.getHostPreferences(); + const seenFiles = /* @__PURE__ */ new Set(); + const textChanges2 = []; + this.projectService.loadAncestorProjectTree(); + this.projectService.forEachEnabledProject((project) => { + const projectTextChanges = project.getLanguageService().getEditsForFileRename(oldPath, newPath, formatOptions, preferences); + const projectFiles = []; + for (const textChange of projectTextChanges) { + if (!seenFiles.has(textChange.fileName)) { + textChanges2.push(textChange); + projectFiles.push(textChange.fileName); + } + } + for (const file of projectFiles) { + seenFiles.add(file); + } + }); + return simplifiedResult ? textChanges2.map((c) => this.mapTextChangeToCodeEdit(c)) : textChanges2; + } + getCodeFixes(args, simplifiedResult) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = project.getScriptInfoForNormalizedPath(file); + const { startPosition, endPosition } = this.getStartAndEndPosition(args, scriptInfo); + let codeActions; + try { + codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, this.getFormatOptions(file), this.getPreferences(file)); + } catch (e) { + const ls = project.getLanguageService(); + const existingDiagCodes = [ + ...ls.getSyntacticDiagnostics(file), + ...ls.getSemanticDiagnostics(file), + ...ls.getSuggestionDiagnostics(file) + ].map( + (d) => decodedTextSpanIntersectsWith(startPosition, endPosition - startPosition, d.start, d.length) && d.code + ); + const badCode = args.errorCodes.find((c) => !existingDiagCodes.includes(c)); + if (badCode !== void 0) { + e.message = `BADCLIENT: Bad error code, ${badCode} not found in range ${startPosition}..${endPosition} (found: ${existingDiagCodes.join(", ")}); could have caused this error: +${e.message}`; + } + throw e; + } + return simplifiedResult ? codeActions.map((codeAction) => this.mapCodeFixAction(codeAction)) : codeActions; + } + getCombinedCodeFix({ scope, fixId: fixId52 }, simplifiedResult) { + Debug.assert(scope.type === "file"); + const { file, project } = this.getFileAndProject(scope.args); + const res = project.getLanguageService().getCombinedCodeFix({ type: "file", fileName: file }, fixId52, this.getFormatOptions(file), this.getPreferences(file)); + if (simplifiedResult) { + return { changes: this.mapTextChangesToCodeEdits(res.changes), commands: res.commands }; + } else { + return res; + } + } + applyCodeActionCommand(args) { + const commands = args.command; + for (const command of toArray(commands)) { + const { file, project } = this.getFileAndProject(command); + project.getLanguageService().applyCodeActionCommand(command, this.getFormatOptions(file)).then( + (_result) => { + }, + (_error) => { + } + ); + } + return {}; + } + getStartAndEndPosition(args, scriptInfo) { + let startPosition, endPosition; + if (args.startPosition !== void 0) { + startPosition = args.startPosition; + } else { + startPosition = scriptInfo.lineOffsetToPosition(args.startLine, args.startOffset); + args.startPosition = startPosition; + } + if (args.endPosition !== void 0) { + endPosition = args.endPosition; + } else { + endPosition = scriptInfo.lineOffsetToPosition(args.endLine, args.endOffset); + args.endPosition = endPosition; + } + return { startPosition, endPosition }; + } + mapCodeAction({ description: description3, changes, commands }) { + return { description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands }; + } + mapCodeFixAction({ fixName: fixName8, description: description3, changes, commands, fixId: fixId52, fixAllDescription }) { + return { fixName: fixName8, description: description3, changes: this.mapTextChangesToCodeEdits(changes), commands, fixId: fixId52, fixAllDescription }; + } + mapTextChangesToCodeEdits(textChanges2) { + return textChanges2.map((change) => this.mapTextChangeToCodeEdit(change)); + } + mapTextChangeToCodeEdit(textChanges2) { + const scriptInfo = this.projectService.getScriptInfoOrConfig(textChanges2.fileName); + if (!!textChanges2.isNewFile === !!scriptInfo) { + if (!scriptInfo) { + this.projectService.logErrorForScriptInfoNotFound(textChanges2.fileName); + } + Debug.fail("Expected isNewFile for (only) new files. " + JSON.stringify({ isNewFile: !!textChanges2.isNewFile, hasScriptInfo: !!scriptInfo })); + } + return scriptInfo ? { fileName: textChanges2.fileName, textChanges: textChanges2.textChanges.map((textChange) => convertTextChangeToCodeEdit(textChange, scriptInfo)) } : convertNewFileTextChangeToCodeEdit(textChanges2); + } + convertTextChangeToCodeEdit(change, scriptInfo) { + return { + start: scriptInfo.positionToLineOffset(change.span.start), + end: scriptInfo.positionToLineOffset(change.span.start + change.span.length), + newText: change.newText ? change.newText : "" + }; + } + getBraceMatching(args, simplifiedResult) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const position = this.getPosition(args, scriptInfo); + const spans = languageService.getBraceMatchingAtPosition(file, position); + return !spans ? void 0 : simplifiedResult ? spans.map((span) => toProtocolTextSpan(span, scriptInfo)) : spans; + } + getDiagnosticsForProject(next, delay, fileName) { + if (this.suppressDiagnosticEvents) { + return; + } + const { fileNames, languageServiceDisabled } = this.getProjectInfoWorker( + fileName, + /*projectFileName*/ + void 0, + /*needFileNameList*/ + true, + /*excludeConfigFiles*/ + true + ); + if (languageServiceDisabled) { + return; + } + const fileNamesInProject = fileNames.filter((value) => !value.includes("lib.d.ts")); + if (fileNamesInProject.length === 0) { + return; + } + const highPriorityFiles = []; + const mediumPriorityFiles = []; + const lowPriorityFiles = []; + const veryLowPriorityFiles = []; + const normalizedFileName = toNormalizedPath(fileName); + const project = this.projectService.ensureDefaultProjectForFile(normalizedFileName); + for (const fileNameInProject of fileNamesInProject) { + if (this.getCanonicalFileName(fileNameInProject) === this.getCanonicalFileName(fileName)) { + highPriorityFiles.push(fileNameInProject); + } else { + const info = this.projectService.getScriptInfo(fileNameInProject); + if (!info.isScriptOpen()) { + if (isDeclarationFileName(fileNameInProject)) { + veryLowPriorityFiles.push(fileNameInProject); + } else { + lowPriorityFiles.push(fileNameInProject); + } + } else { + mediumPriorityFiles.push(fileNameInProject); + } + } + } + const sortedFiles = [...highPriorityFiles, ...mediumPriorityFiles, ...lowPriorityFiles, ...veryLowPriorityFiles]; + const checkList = sortedFiles.map((fileName2) => ({ fileName: fileName2, project })); + this.updateErrorCheck( + next, + checkList, + delay, + /*requireOpen*/ + false + ); + } + configurePlugin(args) { + this.projectService.configurePlugin(args); + } + getSmartSelectionRange(args, simplifiedResult) { + const { locations } = args; + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const scriptInfo = Debug.checkDefined(this.projectService.getScriptInfo(file)); + return map(locations, (location) => { + const pos = this.getPosition(location, scriptInfo); + const selectionRange = languageService.getSmartSelectionRange(file, pos); + return simplifiedResult ? this.mapSelectionRange(selectionRange, scriptInfo) : selectionRange; + }); + } + toggleLineComment(args, simplifiedResult) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const scriptInfo = this.projectService.getScriptInfo(file); + const textRange = this.getRange(args, scriptInfo); + const textChanges2 = languageService.toggleLineComment(file, textRange); + if (simplifiedResult) { + const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file); + return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2)); + } + return textChanges2; + } + toggleMultilineComment(args, simplifiedResult) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const textRange = this.getRange(args, scriptInfo); + const textChanges2 = languageService.toggleMultilineComment(file, textRange); + if (simplifiedResult) { + const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file); + return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2)); + } + return textChanges2; + } + commentSelection(args, simplifiedResult) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const textRange = this.getRange(args, scriptInfo); + const textChanges2 = languageService.commentSelection(file, textRange); + if (simplifiedResult) { + const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file); + return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2)); + } + return textChanges2; + } + uncommentSelection(args, simplifiedResult) { + const { file, languageService } = this.getFileAndLanguageServiceForSyntacticOperation(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + const textRange = this.getRange(args, scriptInfo); + const textChanges2 = languageService.uncommentSelection(file, textRange); + if (simplifiedResult) { + const scriptInfo2 = this.projectService.getScriptInfoForNormalizedPath(file); + return textChanges2.map((textChange) => this.convertTextChangeToCodeEdit(textChange, scriptInfo2)); + } + return textChanges2; + } + mapSelectionRange(selectionRange, scriptInfo) { + const result = { + textSpan: toProtocolTextSpan(selectionRange.textSpan, scriptInfo) + }; + if (selectionRange.parent) { + result.parent = this.mapSelectionRange(selectionRange.parent, scriptInfo); + } + return result; + } + getScriptInfoFromProjectService(file) { + const normalizedFile = toNormalizedPath(file); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(normalizedFile); + if (!scriptInfo) { + this.projectService.logErrorForScriptInfoNotFound(normalizedFile); + return Errors.ThrowNoProject(); + } + return scriptInfo; + } + toProtocolCallHierarchyItem(item) { + const scriptInfo = this.getScriptInfoFromProjectService(item.file); + return { + name: item.name, + kind: item.kind, + kindModifiers: item.kindModifiers, + file: item.file, + containerName: item.containerName, + span: toProtocolTextSpan(item.span, scriptInfo), + selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo) + }; + } + toProtocolCallHierarchyIncomingCall(incomingCall) { + const scriptInfo = this.getScriptInfoFromProjectService(incomingCall.from.file); + return { + from: this.toProtocolCallHierarchyItem(incomingCall.from), + fromSpans: incomingCall.fromSpans.map((fromSpan) => toProtocolTextSpan(fromSpan, scriptInfo)) + }; + } + toProtocolCallHierarchyOutgoingCall(outgoingCall, scriptInfo) { + return { + to: this.toProtocolCallHierarchyItem(outgoingCall.to), + fromSpans: outgoingCall.fromSpans.map((fromSpan) => toProtocolTextSpan(fromSpan, scriptInfo)) + }; + } + prepareCallHierarchy(args) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file); + if (scriptInfo) { + const position = this.getPosition(args, scriptInfo); + const result = project.getLanguageService().prepareCallHierarchy(file, position); + return result && mapOneOrMany(result, (item) => this.toProtocolCallHierarchyItem(item)); + } + return void 0; + } + provideCallHierarchyIncomingCalls(args) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = this.getScriptInfoFromProjectService(file); + const incomingCalls = project.getLanguageService().provideCallHierarchyIncomingCalls(file, this.getPosition(args, scriptInfo)); + return incomingCalls.map((call) => this.toProtocolCallHierarchyIncomingCall(call)); + } + provideCallHierarchyOutgoingCalls(args) { + const { file, project } = this.getFileAndProject(args); + const scriptInfo = this.getScriptInfoFromProjectService(file); + const outgoingCalls = project.getLanguageService().provideCallHierarchyOutgoingCalls(file, this.getPosition(args, scriptInfo)); + return outgoingCalls.map((call) => this.toProtocolCallHierarchyOutgoingCall(call, scriptInfo)); + } + getCanonicalFileName(fileName) { + const name = this.host.useCaseSensitiveFileNames ? fileName : toFileNameLowerCase(fileName); + return normalizePath(name); + } + exit() { + } + notRequired() { + return { responseRequired: false }; + } + requiredResponse(response) { + return { response, responseRequired: true }; + } + addProtocolHandler(command, handler) { + if (this.handlers.has(command)) { + throw new Error(`Protocol handler already exists for command "${command}"`); + } + this.handlers.set(command, handler); + } + setCurrentRequest(requestId) { + Debug.assert(this.currentRequestId === void 0); + this.currentRequestId = requestId; + this.cancellationToken.setRequest(requestId); + } + resetCurrentRequest(requestId) { + Debug.assert(this.currentRequestId === requestId); + this.currentRequestId = void 0; + this.cancellationToken.resetRequest(requestId); + } + executeWithRequestId(requestId, f) { + try { + this.setCurrentRequest(requestId); + return f(); + } finally { + this.resetCurrentRequest(requestId); + } + } + executeCommand(request) { + const handler = this.handlers.get(request.command); + if (handler) { + const response = this.executeWithRequestId(request.seq, () => handler(request)); + this.projectService.enableRequestedPlugins(); + return response; + } else { + this.logger.msg(`Unrecognized JSON command:${stringifyIndented(request)}`, "Err" /* Err */); + this.doOutput( + /*info*/ + void 0, + "unknown" /* Unknown */, + request.seq, + /*success*/ + false, + `Unrecognized JSON command: ${request.command}` + ); + return { responseRequired: false }; + } + } + onMessage(message) { + var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k; + this.gcTimer.scheduleCollect(); + this.performanceData = void 0; + let start; + if (this.logger.hasLevel(2 /* requestTime */)) { + start = this.hrtime(); + if (this.logger.hasLevel(3 /* verbose */)) { + this.logger.info(`request:${indent2(this.toStringMessage(message))}`); + } + } + let request; + let relevantFile; + try { + request = this.parseMessage(message); + relevantFile = request.arguments && request.arguments.file ? request.arguments : void 0; + (_a = tracing) == null ? void 0 : _a.instant(tracing.Phase.Session, "request", { seq: request.seq, command: request.command }); + (_b = perfLogger) == null ? void 0 : _b.logStartCommand("" + request.command, this.toStringMessage(message).substring(0, 100)); + (_c = tracing) == null ? void 0 : _c.push( + tracing.Phase.Session, + "executeCommand", + { seq: request.seq, command: request.command }, + /*separateBeginAndEnd*/ + true + ); + const { response, responseRequired } = this.executeCommand(request); + (_d = tracing) == null ? void 0 : _d.pop(); + if (this.logger.hasLevel(2 /* requestTime */)) { + const elapsedTime = hrTimeToMilliseconds(this.hrtime(start)).toFixed(4); + if (responseRequired) { + this.logger.perftrc(`${request.seq}::${request.command}: elapsed time (in milliseconds) ${elapsedTime}`); + } else { + this.logger.perftrc(`${request.seq}::${request.command}: async elapsed time (in milliseconds) ${elapsedTime}`); + } + } + (_e = perfLogger) == null ? void 0 : _e.logStopCommand("" + request.command, "Success"); + (_f = tracing) == null ? void 0 : _f.instant(tracing.Phase.Session, "response", { seq: request.seq, command: request.command, success: !!response }); + if (response) { + this.doOutput( + response, + request.command, + request.seq, + /*success*/ + true + ); + } else if (responseRequired) { + this.doOutput( + /*info*/ + void 0, + request.command, + request.seq, + /*success*/ + false, + "No content available." + ); + } + } catch (err) { + (_g = tracing) == null ? void 0 : _g.popAll(); + if (err instanceof OperationCanceledException) { + (_h = perfLogger) == null ? void 0 : _h.logStopCommand("" + (request && request.command), "Canceled: " + err); + (_i = tracing) == null ? void 0 : _i.instant(tracing.Phase.Session, "commandCanceled", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command }); + this.doOutput( + { canceled: true }, + request.command, + request.seq, + /*success*/ + true + ); + return; + } + this.logErrorWorker(err, this.toStringMessage(message), relevantFile); + (_j = perfLogger) == null ? void 0 : _j.logStopCommand("" + (request && request.command), "Error: " + err); + (_k = tracing) == null ? void 0 : _k.instant(tracing.Phase.Session, "commandError", { seq: request == null ? void 0 : request.seq, command: request == null ? void 0 : request.command, message: err.message }); + this.doOutput( + /*info*/ + void 0, + request ? request.command : "unknown" /* Unknown */, + request ? request.seq : 0, + /*success*/ + false, + "Error processing request. " + err.message + "\n" + err.stack + ); + } + } + parseMessage(message) { + return JSON.parse(message); + } + toStringMessage(message) { + return message; + } + getFormatOptions(file) { + return this.projectService.getFormatCodeOptions(file); + } + getPreferences(file) { + return this.projectService.getPreferences(file); + } + getHostFormatOptions() { + return this.projectService.getHostFormatCodeOptions(); + } + getHostPreferences() { + return this.projectService.getHostPreferences(); + } + }; + } + }); + + // src/server/scriptVersionCache.ts + var lineCollectionCapacity, CharRangeSection, EditWalker, TextChange9, _ScriptVersionCache, ScriptVersionCache, LineIndexSnapshot, LineIndex, LineNode, LineLeaf; + var init_scriptVersionCache = __esm({ + "src/server/scriptVersionCache.ts"() { + "use strict"; + init_ts7(); + init_ts_server3(); + lineCollectionCapacity = 4; + CharRangeSection = /* @__PURE__ */ ((CharRangeSection2) => { + CharRangeSection2[CharRangeSection2["PreStart"] = 0] = "PreStart"; + CharRangeSection2[CharRangeSection2["Start"] = 1] = "Start"; + CharRangeSection2[CharRangeSection2["Entire"] = 2] = "Entire"; + CharRangeSection2[CharRangeSection2["Mid"] = 3] = "Mid"; + CharRangeSection2[CharRangeSection2["End"] = 4] = "End"; + CharRangeSection2[CharRangeSection2["PostEnd"] = 5] = "PostEnd"; + return CharRangeSection2; + })(CharRangeSection || {}); + EditWalker = class { + constructor() { + this.goSubtree = true; + this.lineIndex = new LineIndex(); + this.endBranch = []; + this.state = 2 /* Entire */; + this.initialText = ""; + this.trailingText = ""; + this.lineIndex.root = new LineNode(); + this.startPath = [this.lineIndex.root]; + this.stack = [this.lineIndex.root]; + } + get done() { + return false; + } + insertLines(insertedText, suppressTrailingText) { + if (suppressTrailingText) { + this.trailingText = ""; + } + if (insertedText) { + insertedText = this.initialText + insertedText + this.trailingText; + } else { + insertedText = this.initialText + this.trailingText; + } + const lm = LineIndex.linesFromText(insertedText); + const lines = lm.lines; + if (lines.length > 1 && lines[lines.length - 1] === "") { + lines.pop(); + } + let branchParent; + let lastZeroCount; + for (let k = this.endBranch.length - 1; k >= 0; k--) { + this.endBranch[k].updateCounts(); + if (this.endBranch[k].charCount() === 0) { + lastZeroCount = this.endBranch[k]; + if (k > 0) { + branchParent = this.endBranch[k - 1]; + } else { + branchParent = this.branchNode; + } + } + } + if (lastZeroCount) { + branchParent.remove(lastZeroCount); + } + const leafNode = this.startPath[this.startPath.length - 1]; + if (lines.length > 0) { + leafNode.text = lines[0]; + if (lines.length > 1) { + let insertedNodes = new Array(lines.length - 1); + let startNode2 = leafNode; + for (let i = 1; i < lines.length; i++) { + insertedNodes[i - 1] = new LineLeaf(lines[i]); + } + let pathIndex = this.startPath.length - 2; + while (pathIndex >= 0) { + const insertionNode = this.startPath[pathIndex]; + insertedNodes = insertionNode.insertAt(startNode2, insertedNodes); + pathIndex--; + startNode2 = insertionNode; + } + let insertedNodesLen = insertedNodes.length; + while (insertedNodesLen > 0) { + const newRoot = new LineNode(); + newRoot.add(this.lineIndex.root); + insertedNodes = newRoot.insertAt(this.lineIndex.root, insertedNodes); + insertedNodesLen = insertedNodes.length; + this.lineIndex.root = newRoot; + } + this.lineIndex.root.updateCounts(); + } else { + for (let j = this.startPath.length - 2; j >= 0; j--) { + this.startPath[j].updateCounts(); + } + } + } else { + const insertionNode = this.startPath[this.startPath.length - 2]; + insertionNode.remove(leafNode); + for (let j = this.startPath.length - 2; j >= 0; j--) { + this.startPath[j].updateCounts(); + } + } + return this.lineIndex; + } + post(_relativeStart, _relativeLength, lineCollection) { + if (lineCollection === this.lineCollectionAtBranch) { + this.state = 4 /* End */; + } + this.stack.pop(); + } + pre(_relativeStart, _relativeLength, lineCollection, _parent, nodeType) { + const currentNode = this.stack[this.stack.length - 1]; + if (this.state === 2 /* Entire */ && nodeType === 1 /* Start */) { + this.state = 1 /* Start */; + this.branchNode = currentNode; + this.lineCollectionAtBranch = lineCollection; + } + let child; + function fresh(node) { + if (node.isLeaf()) { + return new LineLeaf(""); + } else + return new LineNode(); + } + switch (nodeType) { + case 0 /* PreStart */: + this.goSubtree = false; + if (this.state !== 4 /* End */) { + currentNode.add(lineCollection); + } + break; + case 1 /* Start */: + if (this.state === 4 /* End */) { + this.goSubtree = false; + } else { + child = fresh(lineCollection); + currentNode.add(child); + this.startPath.push(child); + } + break; + case 2 /* Entire */: + if (this.state !== 4 /* End */) { + child = fresh(lineCollection); + currentNode.add(child); + this.startPath.push(child); + } else { + if (!lineCollection.isLeaf()) { + child = fresh(lineCollection); + currentNode.add(child); + this.endBranch.push(child); + } + } + break; + case 3 /* Mid */: + this.goSubtree = false; + break; + case 4 /* End */: + if (this.state !== 4 /* End */) { + this.goSubtree = false; + } else { + if (!lineCollection.isLeaf()) { + child = fresh(lineCollection); + currentNode.add(child); + this.endBranch.push(child); + } + } + break; + case 5 /* PostEnd */: + this.goSubtree = false; + if (this.state !== 1 /* Start */) { + currentNode.add(lineCollection); + } + break; + } + if (this.goSubtree) { + this.stack.push(child); + } + } + // just gather text from the leaves + leaf(relativeStart, relativeLength, ll) { + if (this.state === 1 /* Start */) { + this.initialText = ll.text.substring(0, relativeStart); + } else if (this.state === 2 /* Entire */) { + this.initialText = ll.text.substring(0, relativeStart); + this.trailingText = ll.text.substring(relativeStart + relativeLength); + } else { + this.trailingText = ll.text.substring(relativeStart + relativeLength); + } + } + }; + TextChange9 = class { + constructor(pos, deleteLen, insertedText) { + this.pos = pos; + this.deleteLen = deleteLen; + this.insertedText = insertedText; + } + getTextChangeRange() { + return createTextChangeRange(createTextSpan(this.pos, this.deleteLen), this.insertedText ? this.insertedText.length : 0); + } + }; + _ScriptVersionCache = class _ScriptVersionCache { + constructor() { + this.changes = []; + this.versions = new Array(_ScriptVersionCache.maxVersions); + this.minVersion = 0; + // no versions earlier than min version will maintain change history + this.currentVersion = 0; + } + versionToIndex(version2) { + if (version2 < this.minVersion || version2 > this.currentVersion) { + return void 0; + } + return version2 % _ScriptVersionCache.maxVersions; + } + currentVersionToIndex() { + return this.currentVersion % _ScriptVersionCache.maxVersions; + } + // REVIEW: can optimize by coalescing simple edits + edit(pos, deleteLen, insertedText) { + this.changes.push(new TextChange9(pos, deleteLen, insertedText)); + if (this.changes.length > _ScriptVersionCache.changeNumberThreshold || deleteLen > _ScriptVersionCache.changeLengthThreshold || insertedText && insertedText.length > _ScriptVersionCache.changeLengthThreshold) { + this.getSnapshot(); + } + } + getSnapshot() { + return this._getSnapshot(); + } + _getSnapshot() { + let snap = this.versions[this.currentVersionToIndex()]; + if (this.changes.length > 0) { + let snapIndex = snap.index; + for (const change of this.changes) { + snapIndex = snapIndex.edit(change.pos, change.deleteLen, change.insertedText); + } + snap = new LineIndexSnapshot(this.currentVersion + 1, this, snapIndex, this.changes); + this.currentVersion = snap.version; + this.versions[this.currentVersionToIndex()] = snap; + this.changes = []; + if (this.currentVersion - this.minVersion >= _ScriptVersionCache.maxVersions) { + this.minVersion = this.currentVersion - _ScriptVersionCache.maxVersions + 1; + } + } + return snap; + } + getSnapshotVersion() { + return this._getSnapshot().version; + } + getAbsolutePositionAndLineText(oneBasedLine) { + return this._getSnapshot().index.lineNumberToInfo(oneBasedLine); + } + lineOffsetToPosition(line, column) { + return this._getSnapshot().index.absolutePositionOfStartOfLine(line) + (column - 1); + } + positionToLineOffset(position) { + return this._getSnapshot().index.positionToLineOffset(position); + } + lineToTextSpan(line) { + const index = this._getSnapshot().index; + const { lineText, absolutePosition } = index.lineNumberToInfo(line + 1); + const len = lineText !== void 0 ? lineText.length : index.absolutePositionOfStartOfLine(line + 2) - absolutePosition; + return createTextSpan(absolutePosition, len); + } + getTextChangesBetweenVersions(oldVersion, newVersion) { + if (oldVersion < newVersion) { + if (oldVersion >= this.minVersion) { + const textChangeRanges = []; + for (let i = oldVersion + 1; i <= newVersion; i++) { + const snap = this.versions[this.versionToIndex(i)]; + for (const textChange of snap.changesSincePreviousVersion) { + textChangeRanges.push(textChange.getTextChangeRange()); + } + } + return collapseTextChangeRangesAcrossMultipleVersions(textChangeRanges); + } else { + return void 0; + } + } else { + return unchangedTextChangeRange; + } + } + getLineCount() { + return this._getSnapshot().index.getLineCount(); + } + static fromString(script) { + const svc = new _ScriptVersionCache(); + const snap = new LineIndexSnapshot(0, svc, new LineIndex()); + svc.versions[svc.currentVersion] = snap; + const lm = LineIndex.linesFromText(script); + snap.index.load(lm.lines); + return svc; + } + }; + _ScriptVersionCache.changeNumberThreshold = 8; + _ScriptVersionCache.changeLengthThreshold = 256; + _ScriptVersionCache.maxVersions = 8; + ScriptVersionCache = _ScriptVersionCache; + LineIndexSnapshot = class _LineIndexSnapshot { + constructor(version2, cache, index, changesSincePreviousVersion = emptyArray2) { + this.version = version2; + this.cache = cache; + this.index = index; + this.changesSincePreviousVersion = changesSincePreviousVersion; + } + getText(rangeStart, rangeEnd) { + return this.index.getText(rangeStart, rangeEnd - rangeStart); + } + getLength() { + return this.index.getLength(); + } + getChangeRange(oldSnapshot) { + if (oldSnapshot instanceof _LineIndexSnapshot && this.cache === oldSnapshot.cache) { + if (this.version <= oldSnapshot.version) { + return unchangedTextChangeRange; + } else { + return this.cache.getTextChangesBetweenVersions(oldSnapshot.version, this.version); + } + } + } + }; + LineIndex = class _LineIndex { + constructor() { + // set this to true to check each edit for accuracy + this.checkEdits = false; + } + absolutePositionOfStartOfLine(oneBasedLine) { + return this.lineNumberToInfo(oneBasedLine).absolutePosition; + } + positionToLineOffset(position) { + const { oneBasedLine, zeroBasedColumn } = this.root.charOffsetToLineInfo(1, position); + return { line: oneBasedLine, offset: zeroBasedColumn + 1 }; + } + positionToColumnAndLineText(position) { + return this.root.charOffsetToLineInfo(1, position); + } + getLineCount() { + return this.root.lineCount(); + } + lineNumberToInfo(oneBasedLine) { + const lineCount = this.getLineCount(); + if (oneBasedLine <= lineCount) { + const { position, leaf } = this.root.lineNumberToInfo(oneBasedLine, 0); + return { absolutePosition: position, lineText: leaf && leaf.text }; + } else { + return { absolutePosition: this.root.charCount(), lineText: void 0 }; + } + } + load(lines) { + if (lines.length > 0) { + const leaves = []; + for (let i = 0; i < lines.length; i++) { + leaves[i] = new LineLeaf(lines[i]); + } + this.root = _LineIndex.buildTreeFromBottom(leaves); + } else { + this.root = new LineNode(); + } + } + walk(rangeStart, rangeLength, walkFns) { + this.root.walk(rangeStart, rangeLength, walkFns); + } + getText(rangeStart, rangeLength) { + let accum = ""; + if (rangeLength > 0 && rangeStart < this.root.charCount()) { + this.walk(rangeStart, rangeLength, { + goSubtree: true, + done: false, + leaf: (relativeStart, relativeLength, ll) => { + accum = accum.concat(ll.text.substring(relativeStart, relativeStart + relativeLength)); + } + }); + } + return accum; + } + getLength() { + return this.root.charCount(); + } + every(f, rangeStart, rangeEnd) { + if (!rangeEnd) { + rangeEnd = this.root.charCount(); + } + const walkFns = { + goSubtree: true, + done: false, + leaf(relativeStart, relativeLength, ll) { + if (!f(ll, relativeStart, relativeLength)) { + this.done = true; + } + } + }; + this.walk(rangeStart, rangeEnd - rangeStart, walkFns); + return !walkFns.done; + } + edit(pos, deleteLength, newText) { + if (this.root.charCount() === 0) { + Debug.assert(deleteLength === 0); + if (newText !== void 0) { + this.load(_LineIndex.linesFromText(newText).lines); + return this; + } + return void 0; + } else { + let checkText; + if (this.checkEdits) { + const source = this.getText(0, this.root.charCount()); + checkText = source.slice(0, pos) + newText + source.slice(pos + deleteLength); + } + const walker = new EditWalker(); + let suppressTrailingText = false; + if (pos >= this.root.charCount()) { + pos = this.root.charCount() - 1; + const endString = this.getText(pos, 1); + if (newText) { + newText = endString + newText; + } else { + newText = endString; + } + deleteLength = 0; + suppressTrailingText = true; + } else if (deleteLength > 0) { + const e = pos + deleteLength; + const { zeroBasedColumn, lineText } = this.positionToColumnAndLineText(e); + if (zeroBasedColumn === 0) { + deleteLength += lineText.length; + newText = newText ? newText + lineText : lineText; + } + } + this.root.walk(pos, deleteLength, walker); + walker.insertLines(newText, suppressTrailingText); + if (this.checkEdits) { + const updatedText = walker.lineIndex.getText(0, walker.lineIndex.getLength()); + Debug.assert(checkText === updatedText, "buffer edit mismatch"); + } + return walker.lineIndex; + } + } + static buildTreeFromBottom(nodes) { + if (nodes.length < lineCollectionCapacity) { + return new LineNode(nodes); + } + const interiorNodes = new Array(Math.ceil(nodes.length / lineCollectionCapacity)); + let nodeIndex = 0; + for (let i = 0; i < interiorNodes.length; i++) { + const end = Math.min(nodeIndex + lineCollectionCapacity, nodes.length); + interiorNodes[i] = new LineNode(nodes.slice(nodeIndex, end)); + nodeIndex = end; + } + return this.buildTreeFromBottom(interiorNodes); + } + static linesFromText(text) { + const lineMap = computeLineStarts(text); + if (lineMap.length === 0) { + return { lines: [], lineMap }; + } + const lines = new Array(lineMap.length); + const lc = lineMap.length - 1; + for (let lmi = 0; lmi < lc; lmi++) { + lines[lmi] = text.substring(lineMap[lmi], lineMap[lmi + 1]); + } + const endText = text.substring(lineMap[lc]); + if (endText.length > 0) { + lines[lc] = endText; + } else { + lines.pop(); + } + return { lines, lineMap }; + } + }; + LineNode = class _LineNode { + constructor(children = []) { + this.children = children; + this.totalChars = 0; + this.totalLines = 0; + if (children.length) + this.updateCounts(); + } + isLeaf() { + return false; + } + updateCounts() { + this.totalChars = 0; + this.totalLines = 0; + for (const child of this.children) { + this.totalChars += child.charCount(); + this.totalLines += child.lineCount(); + } + } + execWalk(rangeStart, rangeLength, walkFns, childIndex, nodeType) { + if (walkFns.pre) { + walkFns.pre(rangeStart, rangeLength, this.children[childIndex], this, nodeType); + } + if (walkFns.goSubtree) { + this.children[childIndex].walk(rangeStart, rangeLength, walkFns); + if (walkFns.post) { + walkFns.post(rangeStart, rangeLength, this.children[childIndex], this, nodeType); + } + } else { + walkFns.goSubtree = true; + } + return walkFns.done; + } + skipChild(relativeStart, relativeLength, childIndex, walkFns, nodeType) { + if (walkFns.pre && !walkFns.done) { + walkFns.pre(relativeStart, relativeLength, this.children[childIndex], this, nodeType); + walkFns.goSubtree = true; + } + } + walk(rangeStart, rangeLength, walkFns) { + let childIndex = 0; + let childCharCount = this.children[childIndex].charCount(); + let adjustedStart = rangeStart; + while (adjustedStart >= childCharCount) { + this.skipChild(adjustedStart, rangeLength, childIndex, walkFns, 0 /* PreStart */); + adjustedStart -= childCharCount; + childIndex++; + childCharCount = this.children[childIndex].charCount(); + } + if (adjustedStart + rangeLength <= childCharCount) { + if (this.execWalk(adjustedStart, rangeLength, walkFns, childIndex, 2 /* Entire */)) { + return; + } + } else { + if (this.execWalk(adjustedStart, childCharCount - adjustedStart, walkFns, childIndex, 1 /* Start */)) { + return; + } + let adjustedLength = rangeLength - (childCharCount - adjustedStart); + childIndex++; + const child = this.children[childIndex]; + childCharCount = child.charCount(); + while (adjustedLength > childCharCount) { + if (this.execWalk(0, childCharCount, walkFns, childIndex, 3 /* Mid */)) { + return; + } + adjustedLength -= childCharCount; + childIndex++; + childCharCount = this.children[childIndex].charCount(); + } + if (adjustedLength > 0) { + if (this.execWalk(0, adjustedLength, walkFns, childIndex, 4 /* End */)) { + return; + } + } + } + if (walkFns.pre) { + const clen = this.children.length; + if (childIndex < clen - 1) { + for (let ej = childIndex + 1; ej < clen; ej++) { + this.skipChild(0, 0, ej, walkFns, 5 /* PostEnd */); + } + } + } + } + // Input position is relative to the start of this node. + // Output line number is absolute. + charOffsetToLineInfo(lineNumberAccumulator, relativePosition) { + if (this.children.length === 0) { + return { oneBasedLine: lineNumberAccumulator, zeroBasedColumn: relativePosition, lineText: void 0 }; + } + for (const child of this.children) { + if (child.charCount() > relativePosition) { + if (child.isLeaf()) { + return { oneBasedLine: lineNumberAccumulator, zeroBasedColumn: relativePosition, lineText: child.text }; + } else { + return child.charOffsetToLineInfo(lineNumberAccumulator, relativePosition); + } + } else { + relativePosition -= child.charCount(); + lineNumberAccumulator += child.lineCount(); + } + } + const lineCount = this.lineCount(); + if (lineCount === 0) { + return { oneBasedLine: 1, zeroBasedColumn: 0, lineText: void 0 }; + } + const leaf = Debug.checkDefined(this.lineNumberToInfo(lineCount, 0).leaf); + return { oneBasedLine: lineCount, zeroBasedColumn: leaf.charCount(), lineText: void 0 }; + } + /** + * Input line number is relative to the start of this node. + * Output line number is relative to the child. + * positionAccumulator will be an absolute position once relativeLineNumber reaches 0. + */ + lineNumberToInfo(relativeOneBasedLine, positionAccumulator) { + for (const child of this.children) { + const childLineCount = child.lineCount(); + if (childLineCount >= relativeOneBasedLine) { + return child.isLeaf() ? { position: positionAccumulator, leaf: child } : child.lineNumberToInfo(relativeOneBasedLine, positionAccumulator); + } else { + relativeOneBasedLine -= childLineCount; + positionAccumulator += child.charCount(); + } + } + return { position: positionAccumulator, leaf: void 0 }; + } + splitAfter(childIndex) { + let splitNode; + const clen = this.children.length; + childIndex++; + const endLength = childIndex; + if (childIndex < clen) { + splitNode = new _LineNode(); + while (childIndex < clen) { + splitNode.add(this.children[childIndex]); + childIndex++; + } + splitNode.updateCounts(); + } + this.children.length = endLength; + return splitNode; + } + remove(child) { + const childIndex = this.findChildIndex(child); + const clen = this.children.length; + if (childIndex < clen - 1) { + for (let i = childIndex; i < clen - 1; i++) { + this.children[i] = this.children[i + 1]; + } + } + this.children.pop(); + } + findChildIndex(child) { + const childIndex = this.children.indexOf(child); + Debug.assert(childIndex !== -1); + return childIndex; + } + insertAt(child, nodes) { + let childIndex = this.findChildIndex(child); + const clen = this.children.length; + const nodeCount = nodes.length; + if (clen < lineCollectionCapacity && childIndex === clen - 1 && nodeCount === 1) { + this.add(nodes[0]); + this.updateCounts(); + return []; + } else { + const shiftNode = this.splitAfter(childIndex); + let nodeIndex = 0; + childIndex++; + while (childIndex < lineCollectionCapacity && nodeIndex < nodeCount) { + this.children[childIndex] = nodes[nodeIndex]; + childIndex++; + nodeIndex++; + } + let splitNodes = []; + let splitNodeCount = 0; + if (nodeIndex < nodeCount) { + splitNodeCount = Math.ceil((nodeCount - nodeIndex) / lineCollectionCapacity); + splitNodes = new Array(splitNodeCount); + let splitNodeIndex = 0; + for (let i = 0; i < splitNodeCount; i++) { + splitNodes[i] = new _LineNode(); + } + let splitNode = splitNodes[0]; + while (nodeIndex < nodeCount) { + splitNode.add(nodes[nodeIndex]); + nodeIndex++; + if (splitNode.children.length === lineCollectionCapacity) { + splitNodeIndex++; + splitNode = splitNodes[splitNodeIndex]; + } + } + for (let i = splitNodes.length - 1; i >= 0; i--) { + if (splitNodes[i].children.length === 0) { + splitNodes.pop(); + } + } + } + if (shiftNode) { + splitNodes.push(shiftNode); + } + this.updateCounts(); + for (let i = 0; i < splitNodeCount; i++) { + splitNodes[i].updateCounts(); + } + return splitNodes; + } + } + // assume there is room for the item; return true if more room + add(collection) { + this.children.push(collection); + Debug.assert(this.children.length <= lineCollectionCapacity); + } + charCount() { + return this.totalChars; + } + lineCount() { + return this.totalLines; + } + }; + LineLeaf = class { + constructor(text) { + this.text = text; + } + isLeaf() { + return true; + } + walk(rangeStart, rangeLength, walkFns) { + walkFns.leaf(rangeStart, rangeLength, this); + } + charCount() { + return this.text.length; + } + lineCount() { + return 1; + } + }; + } + }); + + // src/server/_namespaces/ts.server.ts + var ts_server_exports3 = {}; + __export(ts_server_exports3, { + ActionInvalidate: () => ActionInvalidate, + ActionPackageInstalled: () => ActionPackageInstalled, + ActionSet: () => ActionSet, + ActionWatchTypingLocations: () => ActionWatchTypingLocations, + Arguments: () => Arguments, + AutoImportProviderProject: () => AutoImportProviderProject, + AuxiliaryProject: () => AuxiliaryProject, + CharRangeSection: () => CharRangeSection, + CloseFileWatcherEvent: () => CloseFileWatcherEvent, + CommandNames: () => CommandNames, + ConfigFileDiagEvent: () => ConfigFileDiagEvent, + ConfiguredProject: () => ConfiguredProject2, + CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent, + CreateFileWatcherEvent: () => CreateFileWatcherEvent, + Errors: () => Errors, + EventBeginInstallTypes: () => EventBeginInstallTypes, + EventEndInstallTypes: () => EventEndInstallTypes, + EventInitializationFailed: () => EventInitializationFailed, + EventTypesRegistry: () => EventTypesRegistry, + ExternalProject: () => ExternalProject2, + GcTimer: () => GcTimer, + InferredProject: () => InferredProject2, + LargeFileReferencedEvent: () => LargeFileReferencedEvent, + LineIndex: () => LineIndex, + LineLeaf: () => LineLeaf, + LineNode: () => LineNode, + LogLevel: () => LogLevel2, + Msg: () => Msg, + OpenFileInfoTelemetryEvent: () => OpenFileInfoTelemetryEvent, + Project: () => Project3, + ProjectInfoTelemetryEvent: () => ProjectInfoTelemetryEvent, + ProjectKind: () => ProjectKind, + ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent, + ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent, + ProjectLoadingStartEvent: () => ProjectLoadingStartEvent, + ProjectReferenceProjectLoadKind: () => ProjectReferenceProjectLoadKind, + ProjectService: () => ProjectService3, + ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent, + ScriptInfo: () => ScriptInfo, + ScriptVersionCache: () => ScriptVersionCache, + Session: () => Session3, + TextStorage: () => TextStorage, + ThrottledOperations: () => ThrottledOperations, + TypingsCache: () => TypingsCache, + allFilesAreJsOrDts: () => allFilesAreJsOrDts, + allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts, + asNormalizedPath: () => asNormalizedPath, + convertCompilerOptions: () => convertCompilerOptions, + convertFormatOptions: () => convertFormatOptions, + convertScriptKindName: () => convertScriptKindName, + convertTypeAcquisition: () => convertTypeAcquisition, + convertUserPreferences: () => convertUserPreferences, + convertWatchOptions: () => convertWatchOptions, + countEachFileTypes: () => countEachFileTypes, + createInstallTypingsRequest: () => createInstallTypingsRequest, + createModuleSpecifierCache: () => createModuleSpecifierCache, + createNormalizedPathMap: () => createNormalizedPathMap, + createPackageJsonCache: () => createPackageJsonCache, + createSortedArray: () => createSortedArray2, + emptyArray: () => emptyArray2, + findArgument: () => findArgument, + forEachResolvedProjectReferenceProject: () => forEachResolvedProjectReferenceProject, + formatDiagnosticToProtocol: () => formatDiagnosticToProtocol, + formatMessage: () => formatMessage2, + getBaseConfigFileName: () => getBaseConfigFileName, + getLocationInNewDocument: () => getLocationInNewDocument, + hasArgument: () => hasArgument, + hasNoTypeScriptSource: () => hasNoTypeScriptSource, + indent: () => indent2, + isBackgroundProject: () => isBackgroundProject, + isConfigFile: () => isConfigFile, + isConfiguredProject: () => isConfiguredProject, + isDynamicFileName: () => isDynamicFileName, + isExternalProject: () => isExternalProject, + isInferredProject: () => isInferredProject, + isInferredProjectName: () => isInferredProjectName, + makeAutoImportProviderProjectName: () => makeAutoImportProviderProjectName, + makeAuxiliaryProjectName: () => makeAuxiliaryProjectName, + makeInferredProjectName: () => makeInferredProjectName, + maxFileSize: () => maxFileSize, + maxProgramSizeForNonTsFiles: () => maxProgramSizeForNonTsFiles, + normalizedPathToPath: () => normalizedPathToPath, + nowString: () => nowString, + nullCancellationToken: () => nullCancellationToken, + nullTypingsInstaller: () => nullTypingsInstaller, + projectContainsInfoDirectly: () => projectContainsInfoDirectly, + protocol: () => ts_server_protocol_exports, + removeSorted: () => removeSorted, + stringifyIndented: () => stringifyIndented, + toEvent: () => toEvent, + toNormalizedPath: () => toNormalizedPath, + tryConvertScriptKindName: () => tryConvertScriptKindName, + typingsInstaller: () => ts_server_typingsInstaller_exports, + updateProjectIfDirty: () => updateProjectIfDirty + }); + var init_ts_server3 = __esm({ + "src/server/_namespaces/ts.server.ts"() { + "use strict"; + init_ts_server(); + init_ts_server2(); + init_types4(); + init_utilitiesPublic3(); + init_utilities5(); + init_ts_server_protocol(); + init_scriptInfo(); + init_typingsCache(); + init_project(); + init_editorServices(); + init_moduleSpecifierCache(); + init_packageJsonCache(); + init_session(); + init_scriptVersionCache(); + } + }); + + // src/server/_namespaces/ts.ts + var ts_exports2 = {}; + __export(ts_exports2, { + ANONYMOUS: () => ANONYMOUS, + AccessFlags: () => AccessFlags, + AssertionLevel: () => AssertionLevel, + AssignmentDeclarationKind: () => AssignmentDeclarationKind, + AssignmentKind: () => AssignmentKind, + Associativity: () => Associativity, + BreakpointResolver: () => ts_BreakpointResolver_exports, + BuilderFileEmit: () => BuilderFileEmit, + BuilderProgramKind: () => BuilderProgramKind, + BuilderState: () => BuilderState, + BundleFileSectionKind: () => BundleFileSectionKind, + CallHierarchy: () => ts_CallHierarchy_exports, + CharacterCodes: () => CharacterCodes, + CheckFlags: () => CheckFlags, + CheckMode: () => CheckMode, + ClassificationType: () => ClassificationType, + ClassificationTypeNames: () => ClassificationTypeNames, + CommentDirectiveType: () => CommentDirectiveType, + Comparison: () => Comparison, + CompletionInfoFlags: () => CompletionInfoFlags, + CompletionTriggerKind: () => CompletionTriggerKind, + Completions: () => ts_Completions_exports, + ContainerFlags: () => ContainerFlags, + ContextFlags: () => ContextFlags, + Debug: () => Debug, + DiagnosticCategory: () => DiagnosticCategory, + Diagnostics: () => Diagnostics, + DocumentHighlights: () => DocumentHighlights, + ElementFlags: () => ElementFlags, + EmitFlags: () => EmitFlags, + EmitHint: () => EmitHint, + EmitOnly: () => EmitOnly, + EndOfLineState: () => EndOfLineState, + EnumKind: () => EnumKind, + ExitStatus: () => ExitStatus, + ExportKind: () => ExportKind, + Extension: () => Extension, + ExternalEmitHelpers: () => ExternalEmitHelpers, + FileIncludeKind: () => FileIncludeKind, + FilePreprocessingDiagnosticsKind: () => FilePreprocessingDiagnosticsKind, + FileSystemEntryKind: () => FileSystemEntryKind, + FileWatcherEventKind: () => FileWatcherEventKind, + FindAllReferences: () => ts_FindAllReferences_exports, + FlattenLevel: () => FlattenLevel, + FlowFlags: () => FlowFlags, + ForegroundColorEscapeSequences: () => ForegroundColorEscapeSequences, + FunctionFlags: () => FunctionFlags, + GeneratedIdentifierFlags: () => GeneratedIdentifierFlags, + GetLiteralTextFlags: () => GetLiteralTextFlags, + GoToDefinition: () => ts_GoToDefinition_exports, + HighlightSpanKind: () => HighlightSpanKind, + IdentifierNameMap: () => IdentifierNameMap, + IdentifierNameMultiMap: () => IdentifierNameMultiMap, + ImportKind: () => ImportKind, + ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, + IndentStyle: () => IndentStyle, + IndexFlags: () => IndexFlags, + IndexKind: () => IndexKind, + InferenceFlags: () => InferenceFlags, + InferencePriority: () => InferencePriority, + InlayHintKind: () => InlayHintKind, + InlayHints: () => ts_InlayHints_exports, + InternalEmitFlags: () => InternalEmitFlags, + InternalSymbolName: () => InternalSymbolName, + InvalidatedProjectKind: () => InvalidatedProjectKind, + JSDocParsingMode: () => JSDocParsingMode, + JsDoc: () => ts_JsDoc_exports, + JsTyping: () => ts_JsTyping_exports, + JsxEmit: () => JsxEmit, + JsxFlags: () => JsxFlags, + JsxReferenceKind: () => JsxReferenceKind, + LanguageServiceMode: () => LanguageServiceMode, + LanguageVariant: () => LanguageVariant, + LexicalEnvironmentFlags: () => LexicalEnvironmentFlags, + ListFormat: () => ListFormat, + LogLevel: () => LogLevel, + MemberOverrideStatus: () => MemberOverrideStatus, + ModifierFlags: () => ModifierFlags, + ModuleDetectionKind: () => ModuleDetectionKind, + ModuleInstanceState: () => ModuleInstanceState, + ModuleKind: () => ModuleKind, + ModuleResolutionKind: () => ModuleResolutionKind, + ModuleSpecifierEnding: () => ModuleSpecifierEnding, + NavigateTo: () => ts_NavigateTo_exports, + NavigationBar: () => ts_NavigationBar_exports, + NewLineKind: () => NewLineKind, + NodeBuilderFlags: () => NodeBuilderFlags, + NodeCheckFlags: () => NodeCheckFlags, + NodeFactoryFlags: () => NodeFactoryFlags, + NodeFlags: () => NodeFlags, + NodeResolutionFeatures: () => NodeResolutionFeatures, + ObjectFlags: () => ObjectFlags, + OperationCanceledException: () => OperationCanceledException, + OperatorPrecedence: () => OperatorPrecedence, + OrganizeImports: () => ts_OrganizeImports_exports, + OrganizeImportsMode: () => OrganizeImportsMode, + OuterExpressionKinds: () => OuterExpressionKinds, + OutliningElementsCollector: () => ts_OutliningElementsCollector_exports, + OutliningSpanKind: () => OutliningSpanKind, + OutputFileType: () => OutputFileType, + PackageJsonAutoImportPreference: () => PackageJsonAutoImportPreference, + PackageJsonDependencyGroup: () => PackageJsonDependencyGroup, + PatternMatchKind: () => PatternMatchKind, + PollingInterval: () => PollingInterval, + PollingWatchKind: () => PollingWatchKind, + PragmaKindFlags: () => PragmaKindFlags, + PrivateIdentifierKind: () => PrivateIdentifierKind, + ProcessLevel: () => ProcessLevel, + ProgramUpdateLevel: () => ProgramUpdateLevel, + QuotePreference: () => QuotePreference, + RelationComparisonResult: () => RelationComparisonResult, + Rename: () => ts_Rename_exports, + ScriptElementKind: () => ScriptElementKind, + ScriptElementKindModifier: () => ScriptElementKindModifier, + ScriptKind: () => ScriptKind, + ScriptSnapshot: () => ScriptSnapshot, + ScriptTarget: () => ScriptTarget, + SemanticClassificationFormat: () => SemanticClassificationFormat, + SemanticMeaning: () => SemanticMeaning, + SemicolonPreference: () => SemicolonPreference, + SignatureCheckMode: () => SignatureCheckMode, + SignatureFlags: () => SignatureFlags, + SignatureHelp: () => ts_SignatureHelp_exports, + SignatureKind: () => SignatureKind, + SmartSelectionRange: () => ts_SmartSelectionRange_exports, + SnippetKind: () => SnippetKind, + SortKind: () => SortKind, + StructureIsReused: () => StructureIsReused, + SymbolAccessibility: () => SymbolAccessibility, + SymbolDisplay: () => ts_SymbolDisplay_exports, + SymbolDisplayPartKind: () => SymbolDisplayPartKind, + SymbolFlags: () => SymbolFlags, + SymbolFormatFlags: () => SymbolFormatFlags, + SyntaxKind: () => SyntaxKind, + SyntheticSymbolKind: () => SyntheticSymbolKind, + Ternary: () => Ternary, + ThrottledCancellationToken: () => ThrottledCancellationToken, + TokenClass: () => TokenClass, + TokenFlags: () => TokenFlags, + TransformFlags: () => TransformFlags, + TypeFacts: () => TypeFacts, + TypeFlags: () => TypeFlags, + TypeFormatFlags: () => TypeFormatFlags, + TypeMapKind: () => TypeMapKind, + TypePredicateKind: () => TypePredicateKind, + TypeReferenceSerializationKind: () => TypeReferenceSerializationKind, + UnionReduction: () => UnionReduction, + UpToDateStatusType: () => UpToDateStatusType, + VarianceFlags: () => VarianceFlags, + Version: () => Version, + VersionRange: () => VersionRange, + WatchDirectoryFlags: () => WatchDirectoryFlags, + WatchDirectoryKind: () => WatchDirectoryKind, + WatchFileKind: () => WatchFileKind, + WatchLogLevel: () => WatchLogLevel, + WatchType: () => WatchType, + accessPrivateIdentifier: () => accessPrivateIdentifier, + addDisposableResourceHelper: () => addDisposableResourceHelper, + addEmitFlags: () => addEmitFlags, + addEmitHelper: () => addEmitHelper, + addEmitHelpers: () => addEmitHelpers, + addInternalEmitFlags: () => addInternalEmitFlags, + addNodeFactoryPatcher: () => addNodeFactoryPatcher, + addObjectAllocatorPatcher: () => addObjectAllocatorPatcher, + addRange: () => addRange, + addRelatedInfo: () => addRelatedInfo, + addSyntheticLeadingComment: () => addSyntheticLeadingComment, + addSyntheticTrailingComment: () => addSyntheticTrailingComment, + addToSeen: () => addToSeen, + advancedAsyncSuperHelper: () => advancedAsyncSuperHelper, + affectsDeclarationPathOptionDeclarations: () => affectsDeclarationPathOptionDeclarations, + affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations, + allKeysStartWithDot: () => allKeysStartWithDot, + altDirectorySeparator: () => altDirectorySeparator, + and: () => and, + append: () => append, + appendIfUnique: () => appendIfUnique, + arrayFrom: () => arrayFrom, + arrayIsEqualTo: () => arrayIsEqualTo, + arrayIsHomogeneous: () => arrayIsHomogeneous, + arrayIsSorted: () => arrayIsSorted, + arrayOf: () => arrayOf, + arrayReverseIterator: () => arrayReverseIterator, + arrayToMap: () => arrayToMap, + arrayToMultiMap: () => arrayToMultiMap, + arrayToNumericMap: () => arrayToNumericMap, + arraysEqual: () => arraysEqual, + assertType: () => assertType, + assign: () => assign, + assignHelper: () => assignHelper, + asyncDelegator: () => asyncDelegator, + asyncGeneratorHelper: () => asyncGeneratorHelper, + asyncSuperHelper: () => asyncSuperHelper, + asyncValues: () => asyncValues, + attachFileToDiagnostics: () => attachFileToDiagnostics, + awaitHelper: () => awaitHelper, + awaiterHelper: () => awaiterHelper, + base64decode: () => base64decode, + base64encode: () => base64encode, + binarySearch: () => binarySearch, + binarySearchKey: () => binarySearchKey, + bindSourceFile: () => bindSourceFile, + breakIntoCharacterSpans: () => breakIntoCharacterSpans, + breakIntoWordSpans: () => breakIntoWordSpans, + buildLinkParts: () => buildLinkParts, + buildOpts: () => buildOpts, + buildOverload: () => buildOverload, + bundlerModuleNameResolver: () => bundlerModuleNameResolver, + canBeConvertedToAsync: () => canBeConvertedToAsync, + canHaveDecorators: () => canHaveDecorators, + canHaveExportModifier: () => canHaveExportModifier, + canHaveFlowNode: () => canHaveFlowNode, + canHaveIllegalDecorators: () => canHaveIllegalDecorators, + canHaveIllegalModifiers: () => canHaveIllegalModifiers, + canHaveIllegalType: () => canHaveIllegalType, + canHaveIllegalTypeParameters: () => canHaveIllegalTypeParameters, + canHaveJSDoc: () => canHaveJSDoc, + canHaveLocals: () => canHaveLocals, + canHaveModifiers: () => canHaveModifiers, + canHaveSymbol: () => canHaveSymbol, + canJsonReportNoInputFiles: () => canJsonReportNoInputFiles, + canProduceDiagnostics: () => canProduceDiagnostics, + canUsePropertyAccess: () => canUsePropertyAccess, + canWatchAffectingLocation: () => canWatchAffectingLocation, + canWatchAtTypes: () => canWatchAtTypes, + canWatchDirectoryOrFile: () => canWatchDirectoryOrFile, + cartesianProduct: () => cartesianProduct, + cast: () => cast, + chainBundle: () => chainBundle, + chainDiagnosticMessages: () => chainDiagnosticMessages, + changeAnyExtension: () => changeAnyExtension, + changeCompilerHostLikeToUseCache: () => changeCompilerHostLikeToUseCache, + changeExtension: () => changeExtension, + changesAffectModuleResolution: () => changesAffectModuleResolution, + changesAffectingProgramStructure: () => changesAffectingProgramStructure, + childIsDecorated: () => childIsDecorated, + classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, + classHasClassThisAssignment: () => classHasClassThisAssignment, + classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, + classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, + classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, + classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, + classPrivateFieldInHelper: () => classPrivateFieldInHelper, + classPrivateFieldSetHelper: () => classPrivateFieldSetHelper, + classicNameResolver: () => classicNameResolver, + classifier: () => ts_classifier_exports, + cleanExtendedConfigCache: () => cleanExtendedConfigCache, + clear: () => clear, + clearMap: () => clearMap, + clearSharedExtendedConfigFileWatcher: () => clearSharedExtendedConfigFileWatcher, + climbPastPropertyAccess: () => climbPastPropertyAccess, + climbPastPropertyOrElementAccess: () => climbPastPropertyOrElementAccess, + clone: () => clone, + cloneCompilerOptions: () => cloneCompilerOptions, + closeFileWatcher: () => closeFileWatcher, + closeFileWatcherOf: () => closeFileWatcherOf, + codefix: () => ts_codefix_exports, + collapseTextChangeRangesAcrossMultipleVersions: () => collapseTextChangeRangesAcrossMultipleVersions, + collectExternalModuleInfo: () => collectExternalModuleInfo, + combine: () => combine, + combinePaths: () => combinePaths, + commentPragmas: () => commentPragmas, + commonOptionsWithBuild: () => commonOptionsWithBuild, + commonPackageFolders: () => commonPackageFolders, + compact: () => compact, + compareBooleans: () => compareBooleans, + compareDataObjects: () => compareDataObjects, + compareDiagnostics: () => compareDiagnostics, + compareDiagnosticsSkipRelatedInformation: () => compareDiagnosticsSkipRelatedInformation, + compareEmitHelpers: () => compareEmitHelpers, + compareNumberOfDirectorySeparators: () => compareNumberOfDirectorySeparators, + comparePaths: () => comparePaths, + comparePathsCaseInsensitive: () => comparePathsCaseInsensitive, + comparePathsCaseSensitive: () => comparePathsCaseSensitive, + comparePatternKeys: () => comparePatternKeys, + compareProperties: () => compareProperties, + compareStringsCaseInsensitive: () => compareStringsCaseInsensitive, + compareStringsCaseInsensitiveEslintCompatible: () => compareStringsCaseInsensitiveEslintCompatible, + compareStringsCaseSensitive: () => compareStringsCaseSensitive, + compareStringsCaseSensitiveUI: () => compareStringsCaseSensitiveUI, + compareTextSpans: () => compareTextSpans, + compareValues: () => compareValues, + compileOnSaveCommandLineOption: () => compileOnSaveCommandLineOption, + compilerOptionsAffectDeclarationPath: () => compilerOptionsAffectDeclarationPath, + compilerOptionsAffectEmit: () => compilerOptionsAffectEmit, + compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics, + compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics, + compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules, + compose: () => compose, + computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames, + computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition, + computeLineOfPosition: () => computeLineOfPosition, + computeLineStarts: () => computeLineStarts, + computePositionOfLineAndCharacter: () => computePositionOfLineAndCharacter, + computeSignature: () => computeSignature, + computeSignatureWithDiagnostics: () => computeSignatureWithDiagnostics, + computeSuggestionDiagnostics: () => computeSuggestionDiagnostics, + concatenate: () => concatenate, + concatenateDiagnosticMessageChains: () => concatenateDiagnosticMessageChains, + consumesNodeCoreModules: () => consumesNodeCoreModules, + contains: () => contains, + containsIgnoredPath: () => containsIgnoredPath, + containsObjectRestOrSpread: () => containsObjectRestOrSpread, + containsParseError: () => containsParseError, + containsPath: () => containsPath, + convertCompilerOptionsForTelemetry: () => convertCompilerOptionsForTelemetry, + convertCompilerOptionsFromJson: () => convertCompilerOptionsFromJson, + convertJsonOption: () => convertJsonOption, + convertToBase64: () => convertToBase64, + convertToJson: () => convertToJson, + convertToObject: () => convertToObject, + convertToOptionsWithAbsolutePaths: () => convertToOptionsWithAbsolutePaths, + convertToRelativePath: () => convertToRelativePath, + convertToTSConfig: () => convertToTSConfig, + convertTypeAcquisitionFromJson: () => convertTypeAcquisitionFromJson, + copyComments: () => copyComments, + copyEntries: () => copyEntries, + copyLeadingComments: () => copyLeadingComments, + copyProperties: () => copyProperties, + copyTrailingAsLeadingComments: () => copyTrailingAsLeadingComments, + copyTrailingComments: () => copyTrailingComments, + couldStartTrivia: () => couldStartTrivia, + countWhere: () => countWhere, + createAbstractBuilder: () => createAbstractBuilder, + createAccessorPropertyBackingField: () => createAccessorPropertyBackingField, + createAccessorPropertyGetRedirector: () => createAccessorPropertyGetRedirector, + createAccessorPropertySetRedirector: () => createAccessorPropertySetRedirector, + createBaseNodeFactory: () => createBaseNodeFactory, + createBinaryExpressionTrampoline: () => createBinaryExpressionTrampoline, + createBindingHelper: () => createBindingHelper, + createBuildInfo: () => createBuildInfo, + createBuilderProgram: () => createBuilderProgram, + createBuilderProgramUsingProgramBuildInfo: () => createBuilderProgramUsingProgramBuildInfo, + createBuilderStatusReporter: () => createBuilderStatusReporter, + createCacheWithRedirects: () => createCacheWithRedirects, + createCacheableExportInfoMap: () => createCacheableExportInfoMap, + createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, + createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, + createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, + createClassifier: () => createClassifier, + createCommentDirectivesMap: () => createCommentDirectivesMap, + createCompilerDiagnostic: () => createCompilerDiagnostic, + createCompilerDiagnosticForInvalidCustomType: () => createCompilerDiagnosticForInvalidCustomType, + createCompilerDiagnosticFromMessageChain: () => createCompilerDiagnosticFromMessageChain, + createCompilerHost: () => createCompilerHost, + createCompilerHostFromProgramHost: () => createCompilerHostFromProgramHost, + createCompilerHostWorker: () => createCompilerHostWorker, + createDetachedDiagnostic: () => createDetachedDiagnostic, + createDiagnosticCollection: () => createDiagnosticCollection, + createDiagnosticForFileFromMessageChain: () => createDiagnosticForFileFromMessageChain, + createDiagnosticForNode: () => createDiagnosticForNode, + createDiagnosticForNodeArray: () => createDiagnosticForNodeArray, + createDiagnosticForNodeArrayFromMessageChain: () => createDiagnosticForNodeArrayFromMessageChain, + createDiagnosticForNodeFromMessageChain: () => createDiagnosticForNodeFromMessageChain, + createDiagnosticForNodeInSourceFile: () => createDiagnosticForNodeInSourceFile, + createDiagnosticForRange: () => createDiagnosticForRange, + createDiagnosticMessageChainFromDiagnostic: () => createDiagnosticMessageChainFromDiagnostic, + createDiagnosticReporter: () => createDiagnosticReporter, + createDocumentPositionMapper: () => createDocumentPositionMapper, + createDocumentRegistry: () => createDocumentRegistry, + createDocumentRegistryInternal: () => createDocumentRegistryInternal, + createEmitAndSemanticDiagnosticsBuilderProgram: () => createEmitAndSemanticDiagnosticsBuilderProgram, + createEmitHelperFactory: () => createEmitHelperFactory, + createEmptyExports: () => createEmptyExports, + createExpressionForJsxElement: () => createExpressionForJsxElement, + createExpressionForJsxFragment: () => createExpressionForJsxFragment, + createExpressionForObjectLiteralElementLike: () => createExpressionForObjectLiteralElementLike, + createExpressionForPropertyName: () => createExpressionForPropertyName, + createExpressionFromEntityName: () => createExpressionFromEntityName, + createExternalHelpersImportDeclarationIfNeeded: () => createExternalHelpersImportDeclarationIfNeeded, + createFileDiagnostic: () => createFileDiagnostic, + createFileDiagnosticFromMessageChain: () => createFileDiagnosticFromMessageChain, + createForOfBindingStatement: () => createForOfBindingStatement, + createGetCanonicalFileName: () => createGetCanonicalFileName, + createGetSourceFile: () => createGetSourceFile, + createGetSymbolAccessibilityDiagnosticForNode: () => createGetSymbolAccessibilityDiagnosticForNode, + createGetSymbolAccessibilityDiagnosticForNodeName: () => createGetSymbolAccessibilityDiagnosticForNodeName, + createGetSymbolWalker: () => createGetSymbolWalker, + createIncrementalCompilerHost: () => createIncrementalCompilerHost, + createIncrementalProgram: () => createIncrementalProgram, + createInputFiles: () => createInputFiles, + createInputFilesWithFilePaths: () => createInputFilesWithFilePaths, + createInputFilesWithFileTexts: () => createInputFilesWithFileTexts, + createJsxFactoryExpression: () => createJsxFactoryExpression, + createLanguageService: () => createLanguageService, + createLanguageServiceSourceFile: () => createLanguageServiceSourceFile, + createMemberAccessForPropertyName: () => createMemberAccessForPropertyName, + createModeAwareCache: () => createModeAwareCache, + createModeAwareCacheKey: () => createModeAwareCacheKey, + createModuleNotFoundChain: () => createModuleNotFoundChain, + createModuleResolutionCache: () => createModuleResolutionCache, + createModuleResolutionLoader: () => createModuleResolutionLoader, + createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache, + createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost, + createMultiMap: () => createMultiMap, + createNodeConverters: () => createNodeConverters, + createNodeFactory: () => createNodeFactory, + createOptionNameMap: () => createOptionNameMap, + createOverload: () => createOverload, + createPackageJsonImportFilter: () => createPackageJsonImportFilter, + createPackageJsonInfo: () => createPackageJsonInfo, + createParenthesizerRules: () => createParenthesizerRules, + createPatternMatcher: () => createPatternMatcher, + createPrependNodes: () => createPrependNodes, + createPrinter: () => createPrinter, + createPrinterWithDefaults: () => createPrinterWithDefaults, + createPrinterWithRemoveComments: () => createPrinterWithRemoveComments, + createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape, + createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon, + createProgram: () => createProgram, + createProgramHost: () => createProgramHost, + createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral, + createQueue: () => createQueue, + createRange: () => createRange, + createRedirectedBuilderProgram: () => createRedirectedBuilderProgram, + createResolutionCache: () => createResolutionCache, + createRuntimeTypeSerializer: () => createRuntimeTypeSerializer, + createScanner: () => createScanner, + createSemanticDiagnosticsBuilderProgram: () => createSemanticDiagnosticsBuilderProgram, + createSet: () => createSet, + createSolutionBuilder: () => createSolutionBuilder, + createSolutionBuilderHost: () => createSolutionBuilderHost, + createSolutionBuilderWithWatch: () => createSolutionBuilderWithWatch, + createSolutionBuilderWithWatchHost: () => createSolutionBuilderWithWatchHost, + createSortedArray: () => createSortedArray, + createSourceFile: () => createSourceFile, + createSourceMapGenerator: () => createSourceMapGenerator, + createSourceMapSource: () => createSourceMapSource, + createSuperAccessVariableStatement: () => createSuperAccessVariableStatement, + createSymbolTable: () => createSymbolTable, + createSymlinkCache: () => createSymlinkCache, + createSystemWatchFunctions: () => createSystemWatchFunctions, + createTextChange: () => createTextChange, + createTextChangeFromStartLength: () => createTextChangeFromStartLength, + createTextChangeRange: () => createTextChangeRange, + createTextRangeFromNode: () => createTextRangeFromNode, + createTextRangeFromSpan: () => createTextRangeFromSpan, + createTextSpan: () => createTextSpan, + createTextSpanFromBounds: () => createTextSpanFromBounds, + createTextSpanFromNode: () => createTextSpanFromNode, + createTextSpanFromRange: () => createTextSpanFromRange, + createTextSpanFromStringLiteralLikeContent: () => createTextSpanFromStringLiteralLikeContent, + createTextWriter: () => createTextWriter, + createTokenRange: () => createTokenRange, + createTypeChecker: () => createTypeChecker, + createTypeReferenceDirectiveResolutionCache: () => createTypeReferenceDirectiveResolutionCache, + createTypeReferenceResolutionLoader: () => createTypeReferenceResolutionLoader, + createUnparsedSourceFile: () => createUnparsedSourceFile, + createWatchCompilerHost: () => createWatchCompilerHost2, + createWatchCompilerHostOfConfigFile: () => createWatchCompilerHostOfConfigFile, + createWatchCompilerHostOfFilesAndCompilerOptions: () => createWatchCompilerHostOfFilesAndCompilerOptions, + createWatchFactory: () => createWatchFactory, + createWatchHost: () => createWatchHost, + createWatchProgram: () => createWatchProgram, + createWatchStatusReporter: () => createWatchStatusReporter, + createWriteFileMeasuringIO: () => createWriteFileMeasuringIO, + declarationNameToString: () => declarationNameToString, + decodeMappings: () => decodeMappings, + decodedTextSpanIntersectsWith: () => decodedTextSpanIntersectsWith, + decorateHelper: () => decorateHelper, + deduplicate: () => deduplicate, + defaultIncludeSpec: () => defaultIncludeSpec, + defaultInitCompilerOptions: () => defaultInitCompilerOptions, + defaultMaximumTruncationLength: () => defaultMaximumTruncationLength, + detectSortCaseSensitivity: () => detectSortCaseSensitivity, + diagnosticCategoryName: () => diagnosticCategoryName, + diagnosticToString: () => diagnosticToString, + directoryProbablyExists: () => directoryProbablyExists, + directorySeparator: () => directorySeparator, + displayPart: () => displayPart, + displayPartsToString: () => displayPartsToString, + disposeEmitNodes: () => disposeEmitNodes, + disposeResourcesHelper: () => disposeResourcesHelper, + documentSpansEqual: () => documentSpansEqual, + dumpTracingLegend: () => dumpTracingLegend, + elementAt: () => elementAt, + elideNodes: () => elideNodes, + emitComments: () => emitComments, + emitDetachedComments: () => emitDetachedComments, + emitFiles: () => emitFiles, + emitFilesAndReportErrors: () => emitFilesAndReportErrors, + emitFilesAndReportErrorsAndGetExitStatus: () => emitFilesAndReportErrorsAndGetExitStatus, + emitModuleKindIsNonNodeESM: () => emitModuleKindIsNonNodeESM, + emitNewLineBeforeLeadingCommentOfPosition: () => emitNewLineBeforeLeadingCommentOfPosition, + emitNewLineBeforeLeadingComments: () => emitNewLineBeforeLeadingComments, + emitNewLineBeforeLeadingCommentsOfPosition: () => emitNewLineBeforeLeadingCommentsOfPosition, + emitSkippedWithNoDiagnostics: () => emitSkippedWithNoDiagnostics, + emitUsingBuildInfo: () => emitUsingBuildInfo, + emptyArray: () => emptyArray, + emptyFileSystemEntries: () => emptyFileSystemEntries, + emptyMap: () => emptyMap, + emptyOptions: () => emptyOptions, + emptySet: () => emptySet, + endsWith: () => endsWith, + ensurePathIsNonModuleName: () => ensurePathIsNonModuleName, + ensureScriptKind: () => ensureScriptKind, + ensureTrailingDirectorySeparator: () => ensureTrailingDirectorySeparator, + entityNameToString: () => entityNameToString, + enumerateInsertsAndDeletes: () => enumerateInsertsAndDeletes, + equalOwnProperties: () => equalOwnProperties, + equateStringsCaseInsensitive: () => equateStringsCaseInsensitive, + equateStringsCaseSensitive: () => equateStringsCaseSensitive, + equateValues: () => equateValues, + esDecorateHelper: () => esDecorateHelper, + escapeJsxAttributeString: () => escapeJsxAttributeString, + escapeLeadingUnderscores: () => escapeLeadingUnderscores, + escapeNonAsciiString: () => escapeNonAsciiString, + escapeSnippetText: () => escapeSnippetText, + escapeString: () => escapeString, + every: () => every, + expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression, + explainFiles: () => explainFiles, + explainIfFileIsRedirectAndImpliedFormat: () => explainIfFileIsRedirectAndImpliedFormat, + exportAssignmentIsAlias: () => exportAssignmentIsAlias, + exportStarHelper: () => exportStarHelper, + expressionResultIsUnused: () => expressionResultIsUnused, + extend: () => extend, + extendsHelper: () => extendsHelper, + extensionFromPath: () => extensionFromPath, + extensionIsTS: () => extensionIsTS, + extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution, + externalHelpersModuleNameText: () => externalHelpersModuleNameText, + factory: () => factory, + fileExtensionIs: () => fileExtensionIs, + fileExtensionIsOneOf: () => fileExtensionIsOneOf, + fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics, + fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire, + filter: () => filter, + filterMutate: () => filterMutate, + filterSemanticDiagnostics: () => filterSemanticDiagnostics, + find: () => find, + findAncestor: () => findAncestor, + findBestPatternMatch: () => findBestPatternMatch, + findChildOfKind: () => findChildOfKind, + findComputedPropertyNameCacheAssignment: () => findComputedPropertyNameCacheAssignment, + findConfigFile: () => findConfigFile, + findContainingList: () => findContainingList, + findDiagnosticForNode: () => findDiagnosticForNode, + findFirstNonJsxWhitespaceToken: () => findFirstNonJsxWhitespaceToken, + findIndex: () => findIndex, + findLast: () => findLast, + findLastIndex: () => findLastIndex, + findListItemInfo: () => findListItemInfo, + findMap: () => findMap, + findModifier: () => findModifier, + findNextToken: () => findNextToken, + findPackageJson: () => findPackageJson, + findPackageJsons: () => findPackageJsons, + findPrecedingMatchingToken: () => findPrecedingMatchingToken, + findPrecedingToken: () => findPrecedingToken, + findSuperStatementIndexPath: () => findSuperStatementIndexPath, + findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, + findUseStrictPrologue: () => findUseStrictPrologue, + first: () => first, + firstDefined: () => firstDefined, + firstDefinedIterator: () => firstDefinedIterator, + firstIterator: () => firstIterator, + firstOrOnly: () => firstOrOnly, + firstOrUndefined: () => firstOrUndefined, + firstOrUndefinedIterator: () => firstOrUndefinedIterator, + fixupCompilerOptions: () => fixupCompilerOptions, + flatMap: () => flatMap, + flatMapIterator: () => flatMapIterator, + flatMapToMutable: () => flatMapToMutable, + flatten: () => flatten, + flattenCommaList: () => flattenCommaList, + flattenDestructuringAssignment: () => flattenDestructuringAssignment, + flattenDestructuringBinding: () => flattenDestructuringBinding, + flattenDiagnosticMessageText: () => flattenDiagnosticMessageText, + forEach: () => forEach, + forEachAncestor: () => forEachAncestor, + forEachAncestorDirectory: () => forEachAncestorDirectory, + forEachChild: () => forEachChild, + forEachChildRecursively: () => forEachChildRecursively, + forEachEmittedFile: () => forEachEmittedFile, + forEachEnclosingBlockScopeContainer: () => forEachEnclosingBlockScopeContainer, + forEachEntry: () => forEachEntry, + forEachExternalModuleToImportFrom: () => forEachExternalModuleToImportFrom, + forEachImportClauseDeclaration: () => forEachImportClauseDeclaration, + forEachKey: () => forEachKey, + forEachLeadingCommentRange: () => forEachLeadingCommentRange, + forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft, + forEachPropertyAssignment: () => forEachPropertyAssignment, + forEachResolvedProjectReference: () => forEachResolvedProjectReference, + forEachReturnStatement: () => forEachReturnStatement, + forEachRight: () => forEachRight, + forEachTrailingCommentRange: () => forEachTrailingCommentRange, + forEachTsConfigPropArray: () => forEachTsConfigPropArray, + forEachUnique: () => forEachUnique, + forEachYieldExpression: () => forEachYieldExpression, + forSomeAncestorDirectory: () => forSomeAncestorDirectory, + formatColorAndReset: () => formatColorAndReset, + formatDiagnostic: () => formatDiagnostic, + formatDiagnostics: () => formatDiagnostics, + formatDiagnosticsWithColorAndContext: () => formatDiagnosticsWithColorAndContext, + formatGeneratedName: () => formatGeneratedName, + formatGeneratedNamePart: () => formatGeneratedNamePart, + formatLocation: () => formatLocation, + formatMessage: () => formatMessage, + formatStringFromArgs: () => formatStringFromArgs, + formatting: () => ts_formatting_exports, + fullTripleSlashAMDReferencePathRegEx: () => fullTripleSlashAMDReferencePathRegEx, + fullTripleSlashReferencePathRegEx: () => fullTripleSlashReferencePathRegEx, + generateDjb2Hash: () => generateDjb2Hash, + generateTSConfig: () => generateTSConfig, + generatorHelper: () => generatorHelper, + getAdjustedReferenceLocation: () => getAdjustedReferenceLocation, + getAdjustedRenameLocation: () => getAdjustedRenameLocation, + getAliasDeclarationFromName: () => getAliasDeclarationFromName, + getAllAccessorDeclarations: () => getAllAccessorDeclarations, + getAllDecoratorsOfClass: () => getAllDecoratorsOfClass, + getAllDecoratorsOfClassElement: () => getAllDecoratorsOfClassElement, + getAllJSDocTags: () => getAllJSDocTags, + getAllJSDocTagsOfKind: () => getAllJSDocTagsOfKind, + getAllKeys: () => getAllKeys, + getAllProjectOutputs: () => getAllProjectOutputs, + getAllSuperTypeNodes: () => getAllSuperTypeNodes, + getAllUnscopedEmitHelpers: () => getAllUnscopedEmitHelpers, + getAllowJSCompilerOption: () => getAllowJSCompilerOption, + getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports, + getAncestor: () => getAncestor, + getAnyExtensionFromPath: () => getAnyExtensionFromPath, + getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, + getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, + getAssignedName: () => getAssignedName, + getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, + getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, + getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, + getAssignmentTargetKind: () => getAssignmentTargetKind, + getAutomaticTypeDirectiveNames: () => getAutomaticTypeDirectiveNames, + getBaseFileName: () => getBaseFileName, + getBinaryOperatorPrecedence: () => getBinaryOperatorPrecedence, + getBuildInfo: () => getBuildInfo, + getBuildInfoFileVersionMap: () => getBuildInfoFileVersionMap, + getBuildInfoText: () => getBuildInfoText, + getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder, + getBuilderCreationParameters: () => getBuilderCreationParameters, + getBuilderFileEmit: () => getBuilderFileEmit, + getCheckFlags: () => getCheckFlags, + getClassExtendsHeritageElement: () => getClassExtendsHeritageElement, + getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol, + getCombinedLocalAndExportSymbolFlags: () => getCombinedLocalAndExportSymbolFlags, + getCombinedModifierFlags: () => getCombinedModifierFlags, + getCombinedNodeFlags: () => getCombinedNodeFlags, + getCombinedNodeFlagsAlwaysIncludeJSDoc: () => getCombinedNodeFlagsAlwaysIncludeJSDoc, + getCommentRange: () => getCommentRange, + getCommonSourceDirectory: () => getCommonSourceDirectory, + getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig, + getCompilerOptionValue: () => getCompilerOptionValue, + getCompilerOptionsDiffValue: () => getCompilerOptionsDiffValue, + getConditions: () => getConditions, + getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, + getConstantValue: () => getConstantValue, + getContainerFlags: () => getContainerFlags, + getContainerNode: () => getContainerNode, + getContainingClass: () => getContainingClass, + getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, + getContainingClassStaticBlock: () => getContainingClassStaticBlock, + getContainingFunction: () => getContainingFunction, + getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, + getContainingFunctionOrClassStaticBlock: () => getContainingFunctionOrClassStaticBlock, + getContainingNodeArray: () => getContainingNodeArray, + getContainingObjectLiteralElement: () => getContainingObjectLiteralElement, + getContextualTypeFromParent: () => getContextualTypeFromParent, + getContextualTypeFromParentOrAncestorTypeNode: () => getContextualTypeFromParentOrAncestorTypeNode, + getCurrentTime: () => getCurrentTime, + getDeclarationDiagnostics: () => getDeclarationDiagnostics, + getDeclarationEmitExtensionForPath: () => getDeclarationEmitExtensionForPath, + getDeclarationEmitOutputFilePath: () => getDeclarationEmitOutputFilePath, + getDeclarationEmitOutputFilePathWorker: () => getDeclarationEmitOutputFilePathWorker, + getDeclarationFromName: () => getDeclarationFromName, + getDeclarationModifierFlagsFromSymbol: () => getDeclarationModifierFlagsFromSymbol, + getDeclarationOfKind: () => getDeclarationOfKind, + getDeclarationsOfKind: () => getDeclarationsOfKind, + getDeclaredExpandoInitializer: () => getDeclaredExpandoInitializer, + getDecorators: () => getDecorators, + getDefaultCompilerOptions: () => getDefaultCompilerOptions2, + getDefaultExportInfoWorker: () => getDefaultExportInfoWorker, + getDefaultFormatCodeSettings: () => getDefaultFormatCodeSettings, + getDefaultLibFileName: () => getDefaultLibFileName, + getDefaultLibFilePath: () => getDefaultLibFilePath, + getDefaultLikeExportInfo: () => getDefaultLikeExportInfo, + getDiagnosticText: () => getDiagnosticText, + getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan, + getDirectoryPath: () => getDirectoryPath, + getDirectoryToWatchFailedLookupLocation: () => getDirectoryToWatchFailedLookupLocation, + getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => getDirectoryToWatchFailedLookupLocationFromTypeRoot, + getDocumentPositionMapper: () => getDocumentPositionMapper, + getESModuleInterop: () => getESModuleInterop, + getEditsForFileRename: () => getEditsForFileRename, + getEffectiveBaseTypeNode: () => getEffectiveBaseTypeNode, + getEffectiveConstraintOfTypeParameter: () => getEffectiveConstraintOfTypeParameter, + getEffectiveContainerForJSDocTemplateTag: () => getEffectiveContainerForJSDocTemplateTag, + getEffectiveImplementsTypeNodes: () => getEffectiveImplementsTypeNodes, + getEffectiveInitializer: () => getEffectiveInitializer, + getEffectiveJSDocHost: () => getEffectiveJSDocHost, + getEffectiveModifierFlags: () => getEffectiveModifierFlags, + getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => getEffectiveModifierFlagsAlwaysIncludeJSDoc, + getEffectiveModifierFlagsNoCache: () => getEffectiveModifierFlagsNoCache, + getEffectiveReturnTypeNode: () => getEffectiveReturnTypeNode, + getEffectiveSetAccessorTypeAnnotationNode: () => getEffectiveSetAccessorTypeAnnotationNode, + getEffectiveTypeAnnotationNode: () => getEffectiveTypeAnnotationNode, + getEffectiveTypeParameterDeclarations: () => getEffectiveTypeParameterDeclarations, + getEffectiveTypeRoots: () => getEffectiveTypeRoots, + getElementOrPropertyAccessArgumentExpressionOrName: () => getElementOrPropertyAccessArgumentExpressionOrName, + getElementOrPropertyAccessName: () => getElementOrPropertyAccessName, + getElementsOfBindingOrAssignmentPattern: () => getElementsOfBindingOrAssignmentPattern, + getEmitDeclarations: () => getEmitDeclarations, + getEmitFlags: () => getEmitFlags, + getEmitHelpers: () => getEmitHelpers, + getEmitModuleDetectionKind: () => getEmitModuleDetectionKind, + getEmitModuleKind: () => getEmitModuleKind, + getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, + getEmitScriptTarget: () => getEmitScriptTarget, + getEmitStandardClassFields: () => getEmitStandardClassFields, + getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, + getEnclosingContainer: () => getEnclosingContainer, + getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, + getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, + getEndLinePosition: () => getEndLinePosition, + getEntityNameFromTypeNode: () => getEntityNameFromTypeNode, + getEntrypointsFromPackageJsonInfo: () => getEntrypointsFromPackageJsonInfo, + getErrorCountForSummary: () => getErrorCountForSummary, + getErrorSpanForNode: () => getErrorSpanForNode, + getErrorSummaryText: () => getErrorSummaryText, + getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral, + getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName, + getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName, + getExpandoInitializer: () => getExpandoInitializer, + getExportAssignmentExpression: () => getExportAssignmentExpression, + getExportInfoMap: () => getExportInfoMap, + getExportNeedsImportStarHelper: () => getExportNeedsImportStarHelper, + getExpressionAssociativity: () => getExpressionAssociativity, + getExpressionPrecedence: () => getExpressionPrecedence, + getExternalHelpersModuleName: () => getExternalHelpersModuleName, + getExternalModuleImportEqualsDeclarationExpression: () => getExternalModuleImportEqualsDeclarationExpression, + getExternalModuleName: () => getExternalModuleName, + getExternalModuleNameFromDeclaration: () => getExternalModuleNameFromDeclaration, + getExternalModuleNameFromPath: () => getExternalModuleNameFromPath, + getExternalModuleNameLiteral: () => getExternalModuleNameLiteral, + getExternalModuleRequireArgument: () => getExternalModuleRequireArgument, + getFallbackOptions: () => getFallbackOptions, + getFileEmitOutput: () => getFileEmitOutput, + getFileMatcherPatterns: () => getFileMatcherPatterns, + getFileNamesFromConfigSpecs: () => getFileNamesFromConfigSpecs, + getFileWatcherEventKind: () => getFileWatcherEventKind, + getFilesInErrorForSummary: () => getFilesInErrorForSummary, + getFirstConstructorWithBody: () => getFirstConstructorWithBody, + getFirstIdentifier: () => getFirstIdentifier, + getFirstNonSpaceCharacterPosition: () => getFirstNonSpaceCharacterPosition, + getFirstProjectOutput: () => getFirstProjectOutput, + getFixableErrorSpanExpression: () => getFixableErrorSpanExpression, + getFormatCodeSettingsForWriting: () => getFormatCodeSettingsForWriting, + getFullWidth: () => getFullWidth, + getFunctionFlags: () => getFunctionFlags, + getHeritageClause: () => getHeritageClause, + getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc, + getIdentifierAutoGenerate: () => getIdentifierAutoGenerate, + getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference, + getIdentifierTypeArguments: () => getIdentifierTypeArguments, + getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression, + getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile, + getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker, + getImportNeedsImportDefaultHelper: () => getImportNeedsImportDefaultHelper, + getImportNeedsImportStarHelper: () => getImportNeedsImportStarHelper, + getIndentSize: () => getIndentSize, + getIndentString: () => getIndentString, + getInferredLibraryNameResolveFrom: () => getInferredLibraryNameResolveFrom, + getInitializedVariables: () => getInitializedVariables, + getInitializerOfBinaryExpression: () => getInitializerOfBinaryExpression, + getInitializerOfBindingOrAssignmentElement: () => getInitializerOfBindingOrAssignmentElement, + getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes, + getInternalEmitFlags: () => getInternalEmitFlags, + getInvokedExpression: () => getInvokedExpression, + getIsolatedModules: () => getIsolatedModules, + getJSDocAugmentsTag: () => getJSDocAugmentsTag, + getJSDocClassTag: () => getJSDocClassTag, + getJSDocCommentRanges: () => getJSDocCommentRanges, + getJSDocCommentsAndTags: () => getJSDocCommentsAndTags, + getJSDocDeprecatedTag: () => getJSDocDeprecatedTag, + getJSDocDeprecatedTagNoCache: () => getJSDocDeprecatedTagNoCache, + getJSDocEnumTag: () => getJSDocEnumTag, + getJSDocHost: () => getJSDocHost, + getJSDocImplementsTags: () => getJSDocImplementsTags, + getJSDocOverrideTagNoCache: () => getJSDocOverrideTagNoCache, + getJSDocParameterTags: () => getJSDocParameterTags, + getJSDocParameterTagsNoCache: () => getJSDocParameterTagsNoCache, + getJSDocPrivateTag: () => getJSDocPrivateTag, + getJSDocPrivateTagNoCache: () => getJSDocPrivateTagNoCache, + getJSDocProtectedTag: () => getJSDocProtectedTag, + getJSDocProtectedTagNoCache: () => getJSDocProtectedTagNoCache, + getJSDocPublicTag: () => getJSDocPublicTag, + getJSDocPublicTagNoCache: () => getJSDocPublicTagNoCache, + getJSDocReadonlyTag: () => getJSDocReadonlyTag, + getJSDocReadonlyTagNoCache: () => getJSDocReadonlyTagNoCache, + getJSDocReturnTag: () => getJSDocReturnTag, + getJSDocReturnType: () => getJSDocReturnType, + getJSDocRoot: () => getJSDocRoot, + getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType, + getJSDocSatisfiesTag: () => getJSDocSatisfiesTag, + getJSDocTags: () => getJSDocTags, + getJSDocTagsNoCache: () => getJSDocTagsNoCache, + getJSDocTemplateTag: () => getJSDocTemplateTag, + getJSDocThisTag: () => getJSDocThisTag, + getJSDocType: () => getJSDocType, + getJSDocTypeAliasName: () => getJSDocTypeAliasName, + getJSDocTypeAssertionType: () => getJSDocTypeAssertionType, + getJSDocTypeParameterDeclarations: () => getJSDocTypeParameterDeclarations, + getJSDocTypeParameterTags: () => getJSDocTypeParameterTags, + getJSDocTypeParameterTagsNoCache: () => getJSDocTypeParameterTagsNoCache, + getJSDocTypeTag: () => getJSDocTypeTag, + getJSXImplicitImportBase: () => getJSXImplicitImportBase, + getJSXRuntimeImport: () => getJSXRuntimeImport, + getJSXTransformEnabled: () => getJSXTransformEnabled, + getKeyForCompilerOptions: () => getKeyForCompilerOptions, + getLanguageVariant: () => getLanguageVariant, + getLastChild: () => getLastChild, + getLeadingCommentRanges: () => getLeadingCommentRanges, + getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode, + getLeftmostAccessExpression: () => getLeftmostAccessExpression, + getLeftmostExpression: () => getLeftmostExpression, + getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName, + getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition, + getLineInfo: () => getLineInfo, + getLineOfLocalPosition: () => getLineOfLocalPosition, + getLineOfLocalPositionFromLineMap: () => getLineOfLocalPositionFromLineMap, + getLineStartPositionForPosition: () => getLineStartPositionForPosition, + getLineStarts: () => getLineStarts, + getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => getLinesBetweenPositionAndNextNonWhitespaceCharacter, + getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter, + getLinesBetweenPositions: () => getLinesBetweenPositions, + getLinesBetweenRangeEndAndRangeStart: () => getLinesBetweenRangeEndAndRangeStart, + getLinesBetweenRangeEndPositions: () => getLinesBetweenRangeEndPositions, + getLiteralText: () => getLiteralText, + getLocalNameForExternalImport: () => getLocalNameForExternalImport, + getLocalSymbolForExportDefault: () => getLocalSymbolForExportDefault, + getLocaleSpecificMessage: () => getLocaleSpecificMessage, + getLocaleTimeString: () => getLocaleTimeString, + getMappedContextSpan: () => getMappedContextSpan, + getMappedDocumentSpan: () => getMappedDocumentSpan, + getMappedLocation: () => getMappedLocation, + getMatchedFileSpec: () => getMatchedFileSpec, + getMatchedIncludeSpec: () => getMatchedIncludeSpec, + getMeaningFromDeclaration: () => getMeaningFromDeclaration, + getMeaningFromLocation: () => getMeaningFromLocation, + getMembersOfDeclaration: () => getMembersOfDeclaration, + getModeForFileReference: () => getModeForFileReference, + getModeForResolutionAtIndex: () => getModeForResolutionAtIndex, + getModeForUsageLocation: () => getModeForUsageLocation, + getModifiedTime: () => getModifiedTime, + getModifiers: () => getModifiers, + getModuleInstanceState: () => getModuleInstanceState, + getModuleNameStringLiteralAt: () => getModuleNameStringLiteralAt, + getModuleSpecifierEndingPreference: () => getModuleSpecifierEndingPreference, + getModuleSpecifierResolverHost: () => getModuleSpecifierResolverHost, + getNameForExportedSymbol: () => getNameForExportedSymbol, + getNameFromIndexInfo: () => getNameFromIndexInfo, + getNameFromPropertyName: () => getNameFromPropertyName, + getNameOfAccessExpression: () => getNameOfAccessExpression, + getNameOfCompilerOptionValue: () => getNameOfCompilerOptionValue, + getNameOfDeclaration: () => getNameOfDeclaration, + getNameOfExpando: () => getNameOfExpando, + getNameOfJSDocTypedef: () => getNameOfJSDocTypedef, + getNameOrArgument: () => getNameOrArgument, + getNameTable: () => getNameTable, + getNamesForExportedSymbol: () => getNamesForExportedSymbol, + getNamespaceDeclarationNode: () => getNamespaceDeclarationNode, + getNewLineCharacter: () => getNewLineCharacter, + getNewLineKind: () => getNewLineKind, + getNewLineOrDefaultFromHost: () => getNewLineOrDefaultFromHost, + getNewTargetContainer: () => getNewTargetContainer, + getNextJSDocCommentLocation: () => getNextJSDocCommentLocation, + getNodeForGeneratedName: () => getNodeForGeneratedName, + getNodeId: () => getNodeId, + getNodeKind: () => getNodeKind, + getNodeModifiers: () => getNodeModifiers, + getNodeModulePathParts: () => getNodeModulePathParts, + getNonAssignedNameOfDeclaration: () => getNonAssignedNameOfDeclaration, + getNonAssignmentOperatorForCompoundAssignment: () => getNonAssignmentOperatorForCompoundAssignment, + getNonAugmentationDeclaration: () => getNonAugmentationDeclaration, + getNonDecoratorTokenPosOfNode: () => getNonDecoratorTokenPosOfNode, + getNormalizedAbsolutePath: () => getNormalizedAbsolutePath, + getNormalizedAbsolutePathWithoutRoot: () => getNormalizedAbsolutePathWithoutRoot, + getNormalizedPathComponents: () => getNormalizedPathComponents, + getObjectFlags: () => getObjectFlags, + getOperator: () => getOperator, + getOperatorAssociativity: () => getOperatorAssociativity, + getOperatorPrecedence: () => getOperatorPrecedence, + getOptionFromName: () => getOptionFromName, + getOptionsForLibraryResolution: () => getOptionsForLibraryResolution, + getOptionsNameMap: () => getOptionsNameMap, + getOrCreateEmitNode: () => getOrCreateEmitNode, + getOrCreateExternalHelpersModuleNameIfNeeded: () => getOrCreateExternalHelpersModuleNameIfNeeded, + getOrUpdate: () => getOrUpdate, + getOriginalNode: () => getOriginalNode, + getOriginalNodeId: () => getOriginalNodeId, + getOriginalSourceFile: () => getOriginalSourceFile, + getOutputDeclarationFileName: () => getOutputDeclarationFileName, + getOutputExtension: () => getOutputExtension, + getOutputFileNames: () => getOutputFileNames, + getOutputPathsFor: () => getOutputPathsFor, + getOutputPathsForBundle: () => getOutputPathsForBundle, + getOwnEmitOutputFilePath: () => getOwnEmitOutputFilePath, + getOwnKeys: () => getOwnKeys, + getOwnValues: () => getOwnValues, + getPackageJsonInfo: () => getPackageJsonInfo, + getPackageJsonTypesVersionsPaths: () => getPackageJsonTypesVersionsPaths, + getPackageJsonsVisibleToFile: () => getPackageJsonsVisibleToFile, + getPackageNameFromTypesPackageName: () => getPackageNameFromTypesPackageName, + getPackageScopeForPath: () => getPackageScopeForPath, + getParameterSymbolFromJSDoc: () => getParameterSymbolFromJSDoc, + getParameterTypeNode: () => getParameterTypeNode, + getParentNodeInSpan: () => getParentNodeInSpan, + getParseTreeNode: () => getParseTreeNode, + getParsedCommandLineOfConfigFile: () => getParsedCommandLineOfConfigFile, + getPathComponents: () => getPathComponents, + getPathComponentsRelativeTo: () => getPathComponentsRelativeTo, + getPathFromPathComponents: () => getPathFromPathComponents, + getPathUpdater: () => getPathUpdater, + getPathsBasePath: () => getPathsBasePath, + getPatternFromSpec: () => getPatternFromSpec, + getPendingEmitKind: () => getPendingEmitKind, + getPositionOfLineAndCharacter: () => getPositionOfLineAndCharacter, + getPossibleGenericSignatures: () => getPossibleGenericSignatures, + getPossibleOriginalInputExtensionForExtension: () => getPossibleOriginalInputExtensionForExtension, + getPossibleTypeArgumentsInfo: () => getPossibleTypeArgumentsInfo, + getPreEmitDiagnostics: () => getPreEmitDiagnostics, + getPrecedingNonSpaceCharacterPosition: () => getPrecedingNonSpaceCharacterPosition, + getPrivateIdentifier: () => getPrivateIdentifier, + getProperties: () => getProperties, + getProperty: () => getProperty, + getPropertyArrayElementValue: () => getPropertyArrayElementValue, + getPropertyAssignmentAliasLikeExpression: () => getPropertyAssignmentAliasLikeExpression, + getPropertyNameForPropertyNameNode: () => getPropertyNameForPropertyNameNode, + getPropertyNameForUniqueESSymbol: () => getPropertyNameForUniqueESSymbol, + getPropertyNameFromType: () => getPropertyNameFromType, + getPropertyNameOfBindingOrAssignmentElement: () => getPropertyNameOfBindingOrAssignmentElement, + getPropertySymbolFromBindingElement: () => getPropertySymbolFromBindingElement, + getPropertySymbolsFromContextualType: () => getPropertySymbolsFromContextualType, + getQuoteFromPreference: () => getQuoteFromPreference, + getQuotePreference: () => getQuotePreference, + getRangesWhere: () => getRangesWhere, + getRefactorContextSpan: () => getRefactorContextSpan, + getReferencedFileLocation: () => getReferencedFileLocation, + getRegexFromPattern: () => getRegexFromPattern, + getRegularExpressionForWildcard: () => getRegularExpressionForWildcard, + getRegularExpressionsForWildcards: () => getRegularExpressionsForWildcards, + getRelativePathFromDirectory: () => getRelativePathFromDirectory, + getRelativePathFromFile: () => getRelativePathFromFile, + getRelativePathToDirectoryOrUrl: () => getRelativePathToDirectoryOrUrl, + getRenameLocation: () => getRenameLocation, + getReplacementSpanForContextToken: () => getReplacementSpanForContextToken, + getResolutionDiagnostic: () => getResolutionDiagnostic, + getResolutionModeOverride: () => getResolutionModeOverride, + getResolveJsonModule: () => getResolveJsonModule, + getResolvePackageJsonExports: () => getResolvePackageJsonExports, + getResolvePackageJsonImports: () => getResolvePackageJsonImports, + getResolvedExternalModuleName: () => getResolvedExternalModuleName, + getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement, + getRestParameterElementType: () => getRestParameterElementType, + getRightMostAssignedExpression: () => getRightMostAssignedExpression, + getRootDeclaration: () => getRootDeclaration, + getRootDirectoryOfResolutionCache: () => getRootDirectoryOfResolutionCache, + getRootLength: () => getRootLength, + getRootPathSplitLength: () => getRootPathSplitLength, + getScriptKind: () => getScriptKind, + getScriptKindFromFileName: () => getScriptKindFromFileName, + getScriptTargetFeatures: () => getScriptTargetFeatures, + getSelectedEffectiveModifierFlags: () => getSelectedEffectiveModifierFlags, + getSelectedSyntacticModifierFlags: () => getSelectedSyntacticModifierFlags, + getSemanticClassifications: () => getSemanticClassifications, + getSemanticJsxChildren: () => getSemanticJsxChildren, + getSetAccessorTypeAnnotationNode: () => getSetAccessorTypeAnnotationNode, + getSetAccessorValueParameter: () => getSetAccessorValueParameter, + getSetExternalModuleIndicator: () => getSetExternalModuleIndicator, + getShebang: () => getShebang, + getSingleInitializerOfVariableStatementOrPropertyDeclaration: () => getSingleInitializerOfVariableStatementOrPropertyDeclaration, + getSingleVariableOfVariableStatement: () => getSingleVariableOfVariableStatement, + getSnapshotText: () => getSnapshotText, + getSnippetElement: () => getSnippetElement, + getSourceFileOfModule: () => getSourceFileOfModule, + getSourceFileOfNode: () => getSourceFileOfNode, + getSourceFilePathInNewDir: () => getSourceFilePathInNewDir, + getSourceFilePathInNewDirWorker: () => getSourceFilePathInNewDirWorker, + getSourceFileVersionAsHashFromText: () => getSourceFileVersionAsHashFromText, + getSourceFilesToEmit: () => getSourceFilesToEmit, + getSourceMapRange: () => getSourceMapRange, + getSourceMapper: () => getSourceMapper, + getSourceTextOfNodeFromSourceFile: () => getSourceTextOfNodeFromSourceFile, + getSpanOfTokenAtPosition: () => getSpanOfTokenAtPosition, + getSpellingSuggestion: () => getSpellingSuggestion, + getStartPositionOfLine: () => getStartPositionOfLine, + getStartPositionOfRange: () => getStartPositionOfRange, + getStartsOnNewLine: () => getStartsOnNewLine, + getStaticPropertiesAndClassStaticBlock: () => getStaticPropertiesAndClassStaticBlock, + getStrictOptionValue: () => getStrictOptionValue, + getStringComparer: () => getStringComparer, + getSuperCallFromStatement: () => getSuperCallFromStatement, + getSuperContainer: () => getSuperContainer, + getSupportedCodeFixes: () => getSupportedCodeFixes, + getSupportedExtensions: () => getSupportedExtensions, + getSupportedExtensionsWithJsonIfResolveJsonModule: () => getSupportedExtensionsWithJsonIfResolveJsonModule, + getSwitchedType: () => getSwitchedType, + getSymbolId: () => getSymbolId, + getSymbolNameForPrivateIdentifier: () => getSymbolNameForPrivateIdentifier, + getSymbolTarget: () => getSymbolTarget, + getSyntacticClassifications: () => getSyntacticClassifications, + getSyntacticModifierFlags: () => getSyntacticModifierFlags, + getSyntacticModifierFlagsNoCache: () => getSyntacticModifierFlagsNoCache, + getSynthesizedDeepClone: () => getSynthesizedDeepClone, + getSynthesizedDeepCloneWithReplacements: () => getSynthesizedDeepCloneWithReplacements, + getSynthesizedDeepClones: () => getSynthesizedDeepClones, + getSynthesizedDeepClonesWithReplacements: () => getSynthesizedDeepClonesWithReplacements, + getSyntheticLeadingComments: () => getSyntheticLeadingComments, + getSyntheticTrailingComments: () => getSyntheticTrailingComments, + getTargetLabel: () => getTargetLabel, + getTargetOfBindingOrAssignmentElement: () => getTargetOfBindingOrAssignmentElement, + getTemporaryModuleResolutionState: () => getTemporaryModuleResolutionState, + getTextOfConstantValue: () => getTextOfConstantValue, + getTextOfIdentifierOrLiteral: () => getTextOfIdentifierOrLiteral, + getTextOfJSDocComment: () => getTextOfJSDocComment, + getTextOfJsxAttributeName: () => getTextOfJsxAttributeName, + getTextOfJsxNamespacedName: () => getTextOfJsxNamespacedName, + getTextOfNode: () => getTextOfNode, + getTextOfNodeFromSourceText: () => getTextOfNodeFromSourceText, + getTextOfPropertyName: () => getTextOfPropertyName, + getThisContainer: () => getThisContainer, + getThisParameter: () => getThisParameter, + getTokenAtPosition: () => getTokenAtPosition, + getTokenPosOfNode: () => getTokenPosOfNode, + getTokenSourceMapRange: () => getTokenSourceMapRange, + getTouchingPropertyName: () => getTouchingPropertyName, + getTouchingToken: () => getTouchingToken, + getTrailingCommentRanges: () => getTrailingCommentRanges, + getTrailingSemicolonDeferringWriter: () => getTrailingSemicolonDeferringWriter, + getTransformFlagsSubtreeExclusions: () => getTransformFlagsSubtreeExclusions, + getTransformers: () => getTransformers, + getTsBuildInfoEmitOutputFilePath: () => getTsBuildInfoEmitOutputFilePath, + getTsConfigObjectLiteralExpression: () => getTsConfigObjectLiteralExpression, + getTsConfigPropArrayElementValue: () => getTsConfigPropArrayElementValue, + getTypeAnnotationNode: () => getTypeAnnotationNode, + getTypeArgumentOrTypeParameterList: () => getTypeArgumentOrTypeParameterList, + getTypeKeywordOfTypeOnlyImport: () => getTypeKeywordOfTypeOnlyImport, + getTypeNode: () => getTypeNode, + getTypeNodeIfAccessible: () => getTypeNodeIfAccessible, + getTypeParameterFromJsDoc: () => getTypeParameterFromJsDoc, + getTypeParameterOwner: () => getTypeParameterOwner, + getTypesPackageName: () => getTypesPackageName, + getUILocale: () => getUILocale, + getUniqueName: () => getUniqueName, + getUniqueSymbolId: () => getUniqueSymbolId, + getUseDefineForClassFields: () => getUseDefineForClassFields, + getWatchErrorSummaryDiagnosticMessage: () => getWatchErrorSummaryDiagnosticMessage, + getWatchFactory: () => getWatchFactory, + group: () => group, + groupBy: () => groupBy, + guessIndentation: () => guessIndentation, + handleNoEmitOptions: () => handleNoEmitOptions, + hasAbstractModifier: () => hasAbstractModifier, + hasAccessorModifier: () => hasAccessorModifier, + hasAmbientModifier: () => hasAmbientModifier, + hasChangesInResolutions: () => hasChangesInResolutions, + hasChildOfKind: () => hasChildOfKind, + hasContextSensitiveParameters: () => hasContextSensitiveParameters, + hasDecorators: () => hasDecorators, + hasDocComment: () => hasDocComment, + hasDynamicName: () => hasDynamicName, + hasEffectiveModifier: () => hasEffectiveModifier, + hasEffectiveModifiers: () => hasEffectiveModifiers, + hasEffectiveReadonlyModifier: () => hasEffectiveReadonlyModifier, + hasExtension: () => hasExtension, + hasIndexSignature: () => hasIndexSignature, + hasInitializer: () => hasInitializer, + hasInvalidEscape: () => hasInvalidEscape, + hasJSDocNodes: () => hasJSDocNodes, + hasJSDocParameterTags: () => hasJSDocParameterTags, + hasJSFileExtension: () => hasJSFileExtension, + hasJsonModuleEmitEnabled: () => hasJsonModuleEmitEnabled, + hasOnlyExpressionInitializer: () => hasOnlyExpressionInitializer, + hasOverrideModifier: () => hasOverrideModifier, + hasPossibleExternalModuleReference: () => hasPossibleExternalModuleReference, + hasProperty: () => hasProperty, + hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName, + hasQuestionToken: () => hasQuestionToken, + hasRecordedExternalHelpers: () => hasRecordedExternalHelpers, + hasResolutionModeOverride: () => hasResolutionModeOverride, + hasRestParameter: () => hasRestParameter, + hasScopeMarker: () => hasScopeMarker, + hasStaticModifier: () => hasStaticModifier, + hasSyntacticModifier: () => hasSyntacticModifier, + hasSyntacticModifiers: () => hasSyntacticModifiers, + hasTSFileExtension: () => hasTSFileExtension, + hasTabstop: () => hasTabstop, + hasTrailingDirectorySeparator: () => hasTrailingDirectorySeparator, + hasType: () => hasType, + hasTypeArguments: () => hasTypeArguments, + hasZeroOrOneAsteriskCharacter: () => hasZeroOrOneAsteriskCharacter, + helperString: () => helperString, + hostGetCanonicalFileName: () => hostGetCanonicalFileName, + hostUsesCaseSensitiveFileNames: () => hostUsesCaseSensitiveFileNames, + idText: () => idText, + identifierIsThisKeyword: () => identifierIsThisKeyword, + identifierToKeywordKind: () => identifierToKeywordKind, + identity: () => identity, + identitySourceMapConsumer: () => identitySourceMapConsumer, + ignoreSourceNewlines: () => ignoreSourceNewlines, + ignoredPaths: () => ignoredPaths, + importDefaultHelper: () => importDefaultHelper, + importFromModuleSpecifier: () => importFromModuleSpecifier, + importNameElisionDisabled: () => importNameElisionDisabled, + importStarHelper: () => importStarHelper, + indexOfAnyCharCode: () => indexOfAnyCharCode, + indexOfNode: () => indexOfNode, + indicesOf: () => indicesOf, + inferredTypesContainingFile: () => inferredTypesContainingFile, + injectClassNamedEvaluationHelperBlockIfMissing: () => injectClassNamedEvaluationHelperBlockIfMissing, + injectClassThisAssignmentIfMissing: () => injectClassThisAssignmentIfMissing, + insertImports: () => insertImports, + insertLeadingStatement: () => insertLeadingStatement, + insertSorted: () => insertSorted, + insertStatementAfterCustomPrologue: () => insertStatementAfterCustomPrologue, + insertStatementAfterStandardPrologue: () => insertStatementAfterStandardPrologue, + insertStatementsAfterCustomPrologue: () => insertStatementsAfterCustomPrologue, + insertStatementsAfterStandardPrologue: () => insertStatementsAfterStandardPrologue, + intersperse: () => intersperse, + intrinsicTagNameToString: () => intrinsicTagNameToString, + introducesArgumentsExoticObject: () => introducesArgumentsExoticObject, + inverseJsxOptionMap: () => inverseJsxOptionMap, + isAbstractConstructorSymbol: () => isAbstractConstructorSymbol, + isAbstractModifier: () => isAbstractModifier, + isAccessExpression: () => isAccessExpression, + isAccessibilityModifier: () => isAccessibilityModifier, + isAccessor: () => isAccessor, + isAccessorModifier: () => isAccessorModifier, + isAliasSymbolDeclaration: () => isAliasSymbolDeclaration, + isAliasableExpression: () => isAliasableExpression, + isAmbientModule: () => isAmbientModule, + isAmbientPropertyDeclaration: () => isAmbientPropertyDeclaration, + isAnonymousFunctionDefinition: () => isAnonymousFunctionDefinition, + isAnyDirectorySeparator: () => isAnyDirectorySeparator, + isAnyImportOrBareOrAccessedRequire: () => isAnyImportOrBareOrAccessedRequire, + isAnyImportOrReExport: () => isAnyImportOrReExport, + isAnyImportSyntax: () => isAnyImportSyntax, + isAnySupportedFileExtension: () => isAnySupportedFileExtension, + isApplicableVersionedTypesKey: () => isApplicableVersionedTypesKey, + isArgumentExpressionOfElementAccess: () => isArgumentExpressionOfElementAccess, + isArray: () => isArray, + isArrayBindingElement: () => isArrayBindingElement, + isArrayBindingOrAssignmentElement: () => isArrayBindingOrAssignmentElement, + isArrayBindingOrAssignmentPattern: () => isArrayBindingOrAssignmentPattern, + isArrayBindingPattern: () => isArrayBindingPattern, + isArrayLiteralExpression: () => isArrayLiteralExpression, + isArrayLiteralOrObjectLiteralDestructuringPattern: () => isArrayLiteralOrObjectLiteralDestructuringPattern, + isArrayTypeNode: () => isArrayTypeNode, + isArrowFunction: () => isArrowFunction, + isAsExpression: () => isAsExpression, + isAssertClause: () => isAssertClause, + isAssertEntry: () => isAssertEntry, + isAssertionExpression: () => isAssertionExpression, + isAssertsKeyword: () => isAssertsKeyword, + isAssignmentDeclaration: () => isAssignmentDeclaration, + isAssignmentExpression: () => isAssignmentExpression, + isAssignmentOperator: () => isAssignmentOperator, + isAssignmentPattern: () => isAssignmentPattern, + isAssignmentTarget: () => isAssignmentTarget, + isAsteriskToken: () => isAsteriskToken, + isAsyncFunction: () => isAsyncFunction, + isAsyncModifier: () => isAsyncModifier, + isAutoAccessorPropertyDeclaration: () => isAutoAccessorPropertyDeclaration, + isAwaitExpression: () => isAwaitExpression, + isAwaitKeyword: () => isAwaitKeyword, + isBigIntLiteral: () => isBigIntLiteral, + isBinaryExpression: () => isBinaryExpression, + isBinaryOperatorToken: () => isBinaryOperatorToken, + isBindableObjectDefinePropertyCall: () => isBindableObjectDefinePropertyCall, + isBindableStaticAccessExpression: () => isBindableStaticAccessExpression, + isBindableStaticElementAccessExpression: () => isBindableStaticElementAccessExpression, + isBindableStaticNameExpression: () => isBindableStaticNameExpression, + isBindingElement: () => isBindingElement, + isBindingElementOfBareOrAccessedRequire: () => isBindingElementOfBareOrAccessedRequire, + isBindingName: () => isBindingName, + isBindingOrAssignmentElement: () => isBindingOrAssignmentElement, + isBindingOrAssignmentPattern: () => isBindingOrAssignmentPattern, + isBindingPattern: () => isBindingPattern, + isBlock: () => isBlock, + isBlockOrCatchScoped: () => isBlockOrCatchScoped, + isBlockScope: () => isBlockScope, + isBlockScopedContainerTopLevel: () => isBlockScopedContainerTopLevel, + isBooleanLiteral: () => isBooleanLiteral, + isBreakOrContinueStatement: () => isBreakOrContinueStatement, + isBreakStatement: () => isBreakStatement, + isBuildInfoFile: () => isBuildInfoFile, + isBuilderProgram: () => isBuilderProgram2, + isBundle: () => isBundle, + isBundleFileTextLike: () => isBundleFileTextLike, + isCallChain: () => isCallChain, + isCallExpression: () => isCallExpression, + isCallExpressionTarget: () => isCallExpressionTarget, + isCallLikeExpression: () => isCallLikeExpression, + isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression, + isCallOrNewExpression: () => isCallOrNewExpression, + isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget, + isCallSignatureDeclaration: () => isCallSignatureDeclaration, + isCallToHelper: () => isCallToHelper, + isCaseBlock: () => isCaseBlock, + isCaseClause: () => isCaseClause, + isCaseKeyword: () => isCaseKeyword, + isCaseOrDefaultClause: () => isCaseOrDefaultClause, + isCatchClause: () => isCatchClause, + isCatchClauseVariableDeclaration: () => isCatchClauseVariableDeclaration, + isCatchClauseVariableDeclarationOrBindingElement: () => isCatchClauseVariableDeclarationOrBindingElement, + isCheckJsEnabledForFile: () => isCheckJsEnabledForFile, + isChildOfNodeWithKind: () => isChildOfNodeWithKind, + isCircularBuildOrder: () => isCircularBuildOrder, + isClassDeclaration: () => isClassDeclaration, + isClassElement: () => isClassElement, + isClassExpression: () => isClassExpression, + isClassInstanceProperty: () => isClassInstanceProperty, + isClassLike: () => isClassLike, + isClassMemberModifier: () => isClassMemberModifier, + isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, + isClassOrTypeElement: () => isClassOrTypeElement, + isClassStaticBlockDeclaration: () => isClassStaticBlockDeclaration, + isClassThisAssignmentBlock: () => isClassThisAssignmentBlock, + isCollapsedRange: () => isCollapsedRange, + isColonToken: () => isColonToken, + isCommaExpression: () => isCommaExpression, + isCommaListExpression: () => isCommaListExpression, + isCommaSequence: () => isCommaSequence, + isCommaToken: () => isCommaToken, + isComment: () => isComment, + isCommonJsExportPropertyAssignment: () => isCommonJsExportPropertyAssignment, + isCommonJsExportedExpression: () => isCommonJsExportedExpression, + isCompoundAssignment: () => isCompoundAssignment, + isComputedNonLiteralName: () => isComputedNonLiteralName, + isComputedPropertyName: () => isComputedPropertyName, + isConciseBody: () => isConciseBody, + isConditionalExpression: () => isConditionalExpression, + isConditionalTypeNode: () => isConditionalTypeNode, + isConstTypeReference: () => isConstTypeReference, + isConstructSignatureDeclaration: () => isConstructSignatureDeclaration, + isConstructorDeclaration: () => isConstructorDeclaration, + isConstructorTypeNode: () => isConstructorTypeNode, + isContextualKeyword: () => isContextualKeyword, + isContinueStatement: () => isContinueStatement, + isCustomPrologue: () => isCustomPrologue, + isDebuggerStatement: () => isDebuggerStatement, + isDeclaration: () => isDeclaration, + isDeclarationBindingElement: () => isDeclarationBindingElement, + isDeclarationFileName: () => isDeclarationFileName, + isDeclarationName: () => isDeclarationName, + isDeclarationNameOfEnumOrNamespace: () => isDeclarationNameOfEnumOrNamespace, + isDeclarationReadonly: () => isDeclarationReadonly, + isDeclarationStatement: () => isDeclarationStatement, + isDeclarationWithTypeParameterChildren: () => isDeclarationWithTypeParameterChildren, + isDeclarationWithTypeParameters: () => isDeclarationWithTypeParameters, + isDecorator: () => isDecorator, + isDecoratorTarget: () => isDecoratorTarget, + isDefaultClause: () => isDefaultClause, + isDefaultImport: () => isDefaultImport, + isDefaultModifier: () => isDefaultModifier, + isDefaultedExpandoInitializer: () => isDefaultedExpandoInitializer, + isDeleteExpression: () => isDeleteExpression, + isDeleteTarget: () => isDeleteTarget, + isDeprecatedDeclaration: () => isDeprecatedDeclaration, + isDestructuringAssignment: () => isDestructuringAssignment, + isDiagnosticWithLocation: () => isDiagnosticWithLocation, + isDiskPathRoot: () => isDiskPathRoot, + isDoStatement: () => isDoStatement, + isDocumentRegistryEntry: () => isDocumentRegistryEntry, + isDotDotDotToken: () => isDotDotDotToken, + isDottedName: () => isDottedName, + isDynamicName: () => isDynamicName, + isESSymbolIdentifier: () => isESSymbolIdentifier, + isEffectiveExternalModule: () => isEffectiveExternalModule, + isEffectiveModuleDeclaration: () => isEffectiveModuleDeclaration, + isEffectiveStrictModeSourceFile: () => isEffectiveStrictModeSourceFile, + isElementAccessChain: () => isElementAccessChain, + isElementAccessExpression: () => isElementAccessExpression, + isEmittedFileOfProgram: () => isEmittedFileOfProgram, + isEmptyArrayLiteral: () => isEmptyArrayLiteral, + isEmptyBindingElement: () => isEmptyBindingElement, + isEmptyBindingPattern: () => isEmptyBindingPattern, + isEmptyObjectLiteral: () => isEmptyObjectLiteral, + isEmptyStatement: () => isEmptyStatement, + isEmptyStringLiteral: () => isEmptyStringLiteral, + isEntityName: () => isEntityName, + isEntityNameExpression: () => isEntityNameExpression, + isEnumConst: () => isEnumConst, + isEnumDeclaration: () => isEnumDeclaration, + isEnumMember: () => isEnumMember, + isEqualityOperatorKind: () => isEqualityOperatorKind, + isEqualsGreaterThanToken: () => isEqualsGreaterThanToken, + isExclamationToken: () => isExclamationToken, + isExcludedFile: () => isExcludedFile, + isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport, + isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration, + isExportAssignment: () => isExportAssignment, + isExportDeclaration: () => isExportDeclaration, + isExportModifier: () => isExportModifier, + isExportName: () => isExportName, + isExportNamespaceAsDefaultDeclaration: () => isExportNamespaceAsDefaultDeclaration, + isExportOrDefaultModifier: () => isExportOrDefaultModifier, + isExportSpecifier: () => isExportSpecifier, + isExportsIdentifier: () => isExportsIdentifier, + isExportsOrModuleExportsOrAlias: () => isExportsOrModuleExportsOrAlias, + isExpression: () => isExpression, + isExpressionNode: () => isExpressionNode, + isExpressionOfExternalModuleImportEqualsDeclaration: () => isExpressionOfExternalModuleImportEqualsDeclaration, + isExpressionOfOptionalChainRoot: () => isExpressionOfOptionalChainRoot, + isExpressionStatement: () => isExpressionStatement, + isExpressionWithTypeArguments: () => isExpressionWithTypeArguments, + isExpressionWithTypeArgumentsInClassExtendsClause: () => isExpressionWithTypeArgumentsInClassExtendsClause, + isExternalModule: () => isExternalModule, + isExternalModuleAugmentation: () => isExternalModuleAugmentation, + isExternalModuleImportEqualsDeclaration: () => isExternalModuleImportEqualsDeclaration, + isExternalModuleIndicator: () => isExternalModuleIndicator, + isExternalModuleNameRelative: () => isExternalModuleNameRelative, + isExternalModuleReference: () => isExternalModuleReference, + isExternalModuleSymbol: () => isExternalModuleSymbol, + isExternalOrCommonJsModule: () => isExternalOrCommonJsModule, + isFileLevelReservedGeneratedIdentifier: () => isFileLevelReservedGeneratedIdentifier, + isFileLevelUniqueName: () => isFileLevelUniqueName, + isFileProbablyExternalModule: () => isFileProbablyExternalModule, + isFirstDeclarationOfSymbolParameter: () => isFirstDeclarationOfSymbolParameter, + isFixablePromiseHandler: () => isFixablePromiseHandler, + isForInOrOfStatement: () => isForInOrOfStatement, + isForInStatement: () => isForInStatement, + isForInitializer: () => isForInitializer, + isForOfStatement: () => isForOfStatement, + isForStatement: () => isForStatement, + isFunctionBlock: () => isFunctionBlock, + isFunctionBody: () => isFunctionBody, + isFunctionDeclaration: () => isFunctionDeclaration, + isFunctionExpression: () => isFunctionExpression, + isFunctionExpressionOrArrowFunction: () => isFunctionExpressionOrArrowFunction, + isFunctionLike: () => isFunctionLike, + isFunctionLikeDeclaration: () => isFunctionLikeDeclaration, + isFunctionLikeKind: () => isFunctionLikeKind, + isFunctionLikeOrClassStaticBlockDeclaration: () => isFunctionLikeOrClassStaticBlockDeclaration, + isFunctionOrConstructorTypeNode: () => isFunctionOrConstructorTypeNode, + isFunctionOrModuleBlock: () => isFunctionOrModuleBlock, + isFunctionSymbol: () => isFunctionSymbol, + isFunctionTypeNode: () => isFunctionTypeNode, + isFutureReservedKeyword: () => isFutureReservedKeyword, + isGeneratedIdentifier: () => isGeneratedIdentifier, + isGeneratedPrivateIdentifier: () => isGeneratedPrivateIdentifier, + isGetAccessor: () => isGetAccessor, + isGetAccessorDeclaration: () => isGetAccessorDeclaration, + isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration, + isGlobalDeclaration: () => isGlobalDeclaration, + isGlobalScopeAugmentation: () => isGlobalScopeAugmentation, + isGrammarError: () => isGrammarError, + isHeritageClause: () => isHeritageClause, + isHoistedFunction: () => isHoistedFunction, + isHoistedVariableStatement: () => isHoistedVariableStatement, + isIdentifier: () => isIdentifier, + isIdentifierANonContextualKeyword: () => isIdentifierANonContextualKeyword, + isIdentifierName: () => isIdentifierName, + isIdentifierOrThisTypeNode: () => isIdentifierOrThisTypeNode, + isIdentifierPart: () => isIdentifierPart, + isIdentifierStart: () => isIdentifierStart, + isIdentifierText: () => isIdentifierText, + isIdentifierTypePredicate: () => isIdentifierTypePredicate, + isIdentifierTypeReference: () => isIdentifierTypeReference, + isIfStatement: () => isIfStatement, + isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching, + isImplicitGlob: () => isImplicitGlob, + isImportAttribute: () => isImportAttribute, + isImportAttributeName: () => isImportAttributeName, + isImportAttributes: () => isImportAttributes, + isImportCall: () => isImportCall, + isImportClause: () => isImportClause, + isImportDeclaration: () => isImportDeclaration, + isImportEqualsDeclaration: () => isImportEqualsDeclaration, + isImportKeyword: () => isImportKeyword, + isImportMeta: () => isImportMeta, + isImportOrExportSpecifier: () => isImportOrExportSpecifier, + isImportOrExportSpecifierName: () => isImportOrExportSpecifierName, + isImportSpecifier: () => isImportSpecifier, + isImportTypeAssertionContainer: () => isImportTypeAssertionContainer, + isImportTypeNode: () => isImportTypeNode, + isImportableFile: () => isImportableFile, + isInComment: () => isInComment, + isInCompoundLikeAssignment: () => isInCompoundLikeAssignment, + isInExpressionContext: () => isInExpressionContext, + isInJSDoc: () => isInJSDoc, + isInJSFile: () => isInJSFile, + isInJSXText: () => isInJSXText, + isInJsonFile: () => isInJsonFile, + isInNonReferenceComment: () => isInNonReferenceComment, + isInReferenceComment: () => isInReferenceComment, + isInRightSideOfInternalImportEqualsDeclaration: () => isInRightSideOfInternalImportEqualsDeclaration, + isInString: () => isInString, + isInTemplateString: () => isInTemplateString, + isInTopLevelContext: () => isInTopLevelContext, + isInTypeQuery: () => isInTypeQuery, + isIncrementalCompilation: () => isIncrementalCompilation, + isIndexSignatureDeclaration: () => isIndexSignatureDeclaration, + isIndexedAccessTypeNode: () => isIndexedAccessTypeNode, + isInferTypeNode: () => isInferTypeNode, + isInfinityOrNaNString: () => isInfinityOrNaNString, + isInitializedProperty: () => isInitializedProperty, + isInitializedVariable: () => isInitializedVariable, + isInsideJsxElement: () => isInsideJsxElement, + isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute, + isInsideNodeModules: () => isInsideNodeModules, + isInsideTemplateLiteral: () => isInsideTemplateLiteral, + isInstanceOfExpression: () => isInstanceOfExpression, + isInstantiatedModule: () => isInstantiatedModule, + isInterfaceDeclaration: () => isInterfaceDeclaration, + isInternalDeclaration: () => isInternalDeclaration, + isInternalModuleImportEqualsDeclaration: () => isInternalModuleImportEqualsDeclaration, + isInternalName: () => isInternalName, + isIntersectionTypeNode: () => isIntersectionTypeNode, + isIntrinsicJsxName: () => isIntrinsicJsxName, + isIterationStatement: () => isIterationStatement, + isJSDoc: () => isJSDoc, + isJSDocAllType: () => isJSDocAllType, + isJSDocAugmentsTag: () => isJSDocAugmentsTag, + isJSDocAuthorTag: () => isJSDocAuthorTag, + isJSDocCallbackTag: () => isJSDocCallbackTag, + isJSDocClassTag: () => isJSDocClassTag, + isJSDocCommentContainingNode: () => isJSDocCommentContainingNode, + isJSDocConstructSignature: () => isJSDocConstructSignature, + isJSDocDeprecatedTag: () => isJSDocDeprecatedTag, + isJSDocEnumTag: () => isJSDocEnumTag, + isJSDocFunctionType: () => isJSDocFunctionType, + isJSDocImplementsTag: () => isJSDocImplementsTag, + isJSDocIndexSignature: () => isJSDocIndexSignature, + isJSDocLikeText: () => isJSDocLikeText, + isJSDocLink: () => isJSDocLink, + isJSDocLinkCode: () => isJSDocLinkCode, + isJSDocLinkLike: () => isJSDocLinkLike, + isJSDocLinkPlain: () => isJSDocLinkPlain, + isJSDocMemberName: () => isJSDocMemberName, + isJSDocNameReference: () => isJSDocNameReference, + isJSDocNamepathType: () => isJSDocNamepathType, + isJSDocNamespaceBody: () => isJSDocNamespaceBody, + isJSDocNode: () => isJSDocNode, + isJSDocNonNullableType: () => isJSDocNonNullableType, + isJSDocNullableType: () => isJSDocNullableType, + isJSDocOptionalParameter: () => isJSDocOptionalParameter, + isJSDocOptionalType: () => isJSDocOptionalType, + isJSDocOverloadTag: () => isJSDocOverloadTag, + isJSDocOverrideTag: () => isJSDocOverrideTag, + isJSDocParameterTag: () => isJSDocParameterTag, + isJSDocPrivateTag: () => isJSDocPrivateTag, + isJSDocPropertyLikeTag: () => isJSDocPropertyLikeTag, + isJSDocPropertyTag: () => isJSDocPropertyTag, + isJSDocProtectedTag: () => isJSDocProtectedTag, + isJSDocPublicTag: () => isJSDocPublicTag, + isJSDocReadonlyTag: () => isJSDocReadonlyTag, + isJSDocReturnTag: () => isJSDocReturnTag, + isJSDocSatisfiesExpression: () => isJSDocSatisfiesExpression, + isJSDocSatisfiesTag: () => isJSDocSatisfiesTag, + isJSDocSeeTag: () => isJSDocSeeTag, + isJSDocSignature: () => isJSDocSignature, + isJSDocTag: () => isJSDocTag, + isJSDocTemplateTag: () => isJSDocTemplateTag, + isJSDocThisTag: () => isJSDocThisTag, + isJSDocThrowsTag: () => isJSDocThrowsTag, + isJSDocTypeAlias: () => isJSDocTypeAlias, + isJSDocTypeAssertion: () => isJSDocTypeAssertion, + isJSDocTypeExpression: () => isJSDocTypeExpression, + isJSDocTypeLiteral: () => isJSDocTypeLiteral, + isJSDocTypeTag: () => isJSDocTypeTag, + isJSDocTypedefTag: () => isJSDocTypedefTag, + isJSDocUnknownTag: () => isJSDocUnknownTag, + isJSDocUnknownType: () => isJSDocUnknownType, + isJSDocVariadicType: () => isJSDocVariadicType, + isJSXTagName: () => isJSXTagName, + isJsonEqual: () => isJsonEqual, + isJsonSourceFile: () => isJsonSourceFile, + isJsxAttribute: () => isJsxAttribute, + isJsxAttributeLike: () => isJsxAttributeLike, + isJsxAttributeName: () => isJsxAttributeName, + isJsxAttributes: () => isJsxAttributes, + isJsxChild: () => isJsxChild, + isJsxClosingElement: () => isJsxClosingElement, + isJsxClosingFragment: () => isJsxClosingFragment, + isJsxElement: () => isJsxElement, + isJsxExpression: () => isJsxExpression, + isJsxFragment: () => isJsxFragment, + isJsxNamespacedName: () => isJsxNamespacedName, + isJsxOpeningElement: () => isJsxOpeningElement, + isJsxOpeningFragment: () => isJsxOpeningFragment, + isJsxOpeningLikeElement: () => isJsxOpeningLikeElement, + isJsxOpeningLikeElementTagName: () => isJsxOpeningLikeElementTagName, + isJsxSelfClosingElement: () => isJsxSelfClosingElement, + isJsxSpreadAttribute: () => isJsxSpreadAttribute, + isJsxTagNameExpression: () => isJsxTagNameExpression, + isJsxText: () => isJsxText, + isJumpStatementTarget: () => isJumpStatementTarget, + isKeyword: () => isKeyword, + isKeywordOrPunctuation: () => isKeywordOrPunctuation, + isKnownSymbol: () => isKnownSymbol, + isLabelName: () => isLabelName, + isLabelOfLabeledStatement: () => isLabelOfLabeledStatement, + isLabeledStatement: () => isLabeledStatement, + isLateVisibilityPaintedStatement: () => isLateVisibilityPaintedStatement, + isLeftHandSideExpression: () => isLeftHandSideExpression, + isLeftHandSideOfAssignment: () => isLeftHandSideOfAssignment, + isLet: () => isLet, + isLineBreak: () => isLineBreak, + isLiteralComputedPropertyDeclarationName: () => isLiteralComputedPropertyDeclarationName, + isLiteralExpression: () => isLiteralExpression, + isLiteralExpressionOfObject: () => isLiteralExpressionOfObject, + isLiteralImportTypeNode: () => isLiteralImportTypeNode, + isLiteralKind: () => isLiteralKind, + isLiteralLikeAccess: () => isLiteralLikeAccess, + isLiteralLikeElementAccess: () => isLiteralLikeElementAccess, + isLiteralNameOfPropertyDeclarationOrIndexAccess: () => isLiteralNameOfPropertyDeclarationOrIndexAccess, + isLiteralTypeLikeExpression: () => isLiteralTypeLikeExpression, + isLiteralTypeLiteral: () => isLiteralTypeLiteral, + isLiteralTypeNode: () => isLiteralTypeNode, + isLocalName: () => isLocalName, + isLogicalOperator: () => isLogicalOperator, + isLogicalOrCoalescingAssignmentExpression: () => isLogicalOrCoalescingAssignmentExpression, + isLogicalOrCoalescingAssignmentOperator: () => isLogicalOrCoalescingAssignmentOperator, + isLogicalOrCoalescingBinaryExpression: () => isLogicalOrCoalescingBinaryExpression, + isLogicalOrCoalescingBinaryOperator: () => isLogicalOrCoalescingBinaryOperator, + isMappedTypeNode: () => isMappedTypeNode, + isMemberName: () => isMemberName, + isMetaProperty: () => isMetaProperty, + isMethodDeclaration: () => isMethodDeclaration, + isMethodOrAccessor: () => isMethodOrAccessor, + isMethodSignature: () => isMethodSignature, + isMinusToken: () => isMinusToken, + isMissingDeclaration: () => isMissingDeclaration, + isModifier: () => isModifier, + isModifierKind: () => isModifierKind, + isModifierLike: () => isModifierLike, + isModuleAugmentationExternal: () => isModuleAugmentationExternal, + isModuleBlock: () => isModuleBlock, + isModuleBody: () => isModuleBody, + isModuleDeclaration: () => isModuleDeclaration, + isModuleExportsAccessExpression: () => isModuleExportsAccessExpression, + isModuleIdentifier: () => isModuleIdentifier, + isModuleName: () => isModuleName, + isModuleOrEnumDeclaration: () => isModuleOrEnumDeclaration, + isModuleReference: () => isModuleReference, + isModuleSpecifierLike: () => isModuleSpecifierLike, + isModuleWithStringLiteralName: () => isModuleWithStringLiteralName, + isNameOfFunctionDeclaration: () => isNameOfFunctionDeclaration, + isNameOfModuleDeclaration: () => isNameOfModuleDeclaration, + isNamedClassElement: () => isNamedClassElement, + isNamedDeclaration: () => isNamedDeclaration, + isNamedEvaluation: () => isNamedEvaluation, + isNamedEvaluationSource: () => isNamedEvaluationSource, + isNamedExportBindings: () => isNamedExportBindings, + isNamedExports: () => isNamedExports, + isNamedImportBindings: () => isNamedImportBindings, + isNamedImports: () => isNamedImports, + isNamedImportsOrExports: () => isNamedImportsOrExports, + isNamedTupleMember: () => isNamedTupleMember, + isNamespaceBody: () => isNamespaceBody, + isNamespaceExport: () => isNamespaceExport, + isNamespaceExportDeclaration: () => isNamespaceExportDeclaration, + isNamespaceImport: () => isNamespaceImport, + isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, + isNewExpression: () => isNewExpression, + isNewExpressionTarget: () => isNewExpressionTarget, + isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral, + isNode: () => isNode, + isNodeArray: () => isNodeArray, + isNodeArrayMultiLine: () => isNodeArrayMultiLine, + isNodeDescendantOf: () => isNodeDescendantOf, + isNodeKind: () => isNodeKind, + isNodeLikeSystem: () => isNodeLikeSystem, + isNodeModulesDirectory: () => isNodeModulesDirectory, + isNodeWithPossibleHoistedDeclaration: () => isNodeWithPossibleHoistedDeclaration, + isNonContextualKeyword: () => isNonContextualKeyword, + isNonExportDefaultModifier: () => isNonExportDefaultModifier, + isNonGlobalAmbientModule: () => isNonGlobalAmbientModule, + isNonGlobalDeclaration: () => isNonGlobalDeclaration, + isNonNullAccess: () => isNonNullAccess, + isNonNullChain: () => isNonNullChain, + isNonNullExpression: () => isNonNullExpression, + isNonStaticMethodOrAccessorWithPrivateName: () => isNonStaticMethodOrAccessorWithPrivateName, + isNotEmittedOrPartiallyEmittedNode: () => isNotEmittedOrPartiallyEmittedNode, + isNotEmittedStatement: () => isNotEmittedStatement, + isNullishCoalesce: () => isNullishCoalesce, + isNumber: () => isNumber, + isNumericLiteral: () => isNumericLiteral, + isNumericLiteralName: () => isNumericLiteralName, + isObjectBindingElementWithoutPropertyName: () => isObjectBindingElementWithoutPropertyName, + isObjectBindingOrAssignmentElement: () => isObjectBindingOrAssignmentElement, + isObjectBindingOrAssignmentPattern: () => isObjectBindingOrAssignmentPattern, + isObjectBindingPattern: () => isObjectBindingPattern, + isObjectLiteralElement: () => isObjectLiteralElement, + isObjectLiteralElementLike: () => isObjectLiteralElementLike, + isObjectLiteralExpression: () => isObjectLiteralExpression, + isObjectLiteralMethod: () => isObjectLiteralMethod, + isObjectLiteralOrClassExpressionMethodOrAccessor: () => isObjectLiteralOrClassExpressionMethodOrAccessor, + isObjectTypeDeclaration: () => isObjectTypeDeclaration, + isOctalDigit: () => isOctalDigit, + isOmittedExpression: () => isOmittedExpression, + isOptionalChain: () => isOptionalChain, + isOptionalChainRoot: () => isOptionalChainRoot, + isOptionalDeclaration: () => isOptionalDeclaration, + isOptionalJSDocPropertyLikeTag: () => isOptionalJSDocPropertyLikeTag, + isOptionalTypeNode: () => isOptionalTypeNode, + isOuterExpression: () => isOuterExpression, + isOutermostOptionalChain: () => isOutermostOptionalChain, + isOverrideModifier: () => isOverrideModifier, + isPackedArrayLiteral: () => isPackedArrayLiteral, + isParameter: () => isParameter, + isParameterDeclaration: () => isParameterDeclaration, + isParameterOrCatchClauseVariable: () => isParameterOrCatchClauseVariable, + isParameterPropertyDeclaration: () => isParameterPropertyDeclaration, + isParameterPropertyModifier: () => isParameterPropertyModifier, + isParenthesizedExpression: () => isParenthesizedExpression, + isParenthesizedTypeNode: () => isParenthesizedTypeNode, + isParseTreeNode: () => isParseTreeNode, + isPartOfTypeNode: () => isPartOfTypeNode, + isPartOfTypeQuery: () => isPartOfTypeQuery, + isPartiallyEmittedExpression: () => isPartiallyEmittedExpression, + isPatternMatch: () => isPatternMatch, + isPinnedComment: () => isPinnedComment, + isPlainJsFile: () => isPlainJsFile, + isPlusToken: () => isPlusToken, + isPossiblyTypeArgumentPosition: () => isPossiblyTypeArgumentPosition, + isPostfixUnaryExpression: () => isPostfixUnaryExpression, + isPrefixUnaryExpression: () => isPrefixUnaryExpression, + isPrivateIdentifier: () => isPrivateIdentifier, + isPrivateIdentifierClassElementDeclaration: () => isPrivateIdentifierClassElementDeclaration, + isPrivateIdentifierPropertyAccessExpression: () => isPrivateIdentifierPropertyAccessExpression, + isPrivateIdentifierSymbol: () => isPrivateIdentifierSymbol, + isProgramBundleEmitBuildInfo: () => isProgramBundleEmitBuildInfo, + isProgramUptoDate: () => isProgramUptoDate, + isPrologueDirective: () => isPrologueDirective, + isPropertyAccessChain: () => isPropertyAccessChain, + isPropertyAccessEntityNameExpression: () => isPropertyAccessEntityNameExpression, + isPropertyAccessExpression: () => isPropertyAccessExpression, + isPropertyAccessOrQualifiedName: () => isPropertyAccessOrQualifiedName, + isPropertyAccessOrQualifiedNameOrImportTypeNode: () => isPropertyAccessOrQualifiedNameOrImportTypeNode, + isPropertyAssignment: () => isPropertyAssignment, + isPropertyDeclaration: () => isPropertyDeclaration, + isPropertyName: () => isPropertyName, + isPropertyNameLiteral: () => isPropertyNameLiteral, + isPropertySignature: () => isPropertySignature, + isProtoSetter: () => isProtoSetter, + isPrototypeAccess: () => isPrototypeAccess, + isPrototypePropertyAssignment: () => isPrototypePropertyAssignment, + isPunctuation: () => isPunctuation, + isPushOrUnshiftIdentifier: () => isPushOrUnshiftIdentifier, + isQualifiedName: () => isQualifiedName, + isQuestionDotToken: () => isQuestionDotToken, + isQuestionOrExclamationToken: () => isQuestionOrExclamationToken, + isQuestionOrPlusOrMinusToken: () => isQuestionOrPlusOrMinusToken, + isQuestionToken: () => isQuestionToken, + isRawSourceMap: () => isRawSourceMap, + isReadonlyKeyword: () => isReadonlyKeyword, + isReadonlyKeywordOrPlusOrMinusToken: () => isReadonlyKeywordOrPlusOrMinusToken, + isRecognizedTripleSlashComment: () => isRecognizedTripleSlashComment, + isReferenceFileLocation: () => isReferenceFileLocation, + isReferencedFile: () => isReferencedFile, + isRegularExpressionLiteral: () => isRegularExpressionLiteral, + isRequireCall: () => isRequireCall, + isRequireVariableStatement: () => isRequireVariableStatement, + isRestParameter: () => isRestParameter, + isRestTypeNode: () => isRestTypeNode, + isReturnStatement: () => isReturnStatement, + isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler, + isRightSideOfAccessExpression: () => isRightSideOfAccessExpression, + isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression, + isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess, + isRightSideOfQualifiedName: () => isRightSideOfQualifiedName, + isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess, + isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName: () => isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName, + isRootedDiskPath: () => isRootedDiskPath, + isSameEntityName: () => isSameEntityName, + isSatisfiesExpression: () => isSatisfiesExpression, + isScopeMarker: () => isScopeMarker, + isSemicolonClassElement: () => isSemicolonClassElement, + isSetAccessor: () => isSetAccessor, + isSetAccessorDeclaration: () => isSetAccessorDeclaration, + isShebangTrivia: () => isShebangTrivia, + isShiftOperatorOrHigher: () => isShiftOperatorOrHigher, + isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, + isShorthandPropertyAssignment: () => isShorthandPropertyAssignment, + isSignedNumericLiteral: () => isSignedNumericLiteral, + isSimpleCopiableExpression: () => isSimpleCopiableExpression, + isSimpleInlineableExpression: () => isSimpleInlineableExpression, + isSingleOrDoubleQuote: () => isSingleOrDoubleQuote, + isSourceFile: () => isSourceFile, + isSourceFileFromLibrary: () => isSourceFileFromLibrary, + isSourceFileJS: () => isSourceFileJS, + isSourceFileNotJS: () => isSourceFileNotJS, + isSourceFileNotJson: () => isSourceFileNotJson, + isSourceMapping: () => isSourceMapping, + isSpecialPropertyDeclaration: () => isSpecialPropertyDeclaration, + isSpreadAssignment: () => isSpreadAssignment, + isSpreadElement: () => isSpreadElement, + isStatement: () => isStatement, + isStatementButNotDeclaration: () => isStatementButNotDeclaration, + isStatementOrBlock: () => isStatementOrBlock, + isStatementWithLocals: () => isStatementWithLocals, + isStatic: () => isStatic, + isStaticModifier: () => isStaticModifier, + isString: () => isString, + isStringAKeyword: () => isStringAKeyword, + isStringANonContextualKeyword: () => isStringANonContextualKeyword, + isStringAndEmptyAnonymousObjectIntersection: () => isStringAndEmptyAnonymousObjectIntersection, + isStringDoubleQuoted: () => isStringDoubleQuoted, + isStringLiteral: () => isStringLiteral, + isStringLiteralLike: () => isStringLiteralLike, + isStringLiteralOrJsxExpression: () => isStringLiteralOrJsxExpression, + isStringLiteralOrTemplate: () => isStringLiteralOrTemplate, + isStringOrNumericLiteralLike: () => isStringOrNumericLiteralLike, + isStringOrRegularExpressionOrTemplateLiteral: () => isStringOrRegularExpressionOrTemplateLiteral, + isStringTextContainingNode: () => isStringTextContainingNode, + isSuperCall: () => isSuperCall, + isSuperKeyword: () => isSuperKeyword, + isSuperOrSuperProperty: () => isSuperOrSuperProperty, + isSuperProperty: () => isSuperProperty, + isSupportedSourceFileName: () => isSupportedSourceFileName, + isSwitchStatement: () => isSwitchStatement, + isSyntaxList: () => isSyntaxList, + isSyntheticExpression: () => isSyntheticExpression, + isSyntheticReference: () => isSyntheticReference, + isTagName: () => isTagName, + isTaggedTemplateExpression: () => isTaggedTemplateExpression, + isTaggedTemplateTag: () => isTaggedTemplateTag, + isTemplateExpression: () => isTemplateExpression, + isTemplateHead: () => isTemplateHead, + isTemplateLiteral: () => isTemplateLiteral, + isTemplateLiteralKind: () => isTemplateLiteralKind, + isTemplateLiteralToken: () => isTemplateLiteralToken, + isTemplateLiteralTypeNode: () => isTemplateLiteralTypeNode, + isTemplateLiteralTypeSpan: () => isTemplateLiteralTypeSpan, + isTemplateMiddle: () => isTemplateMiddle, + isTemplateMiddleOrTemplateTail: () => isTemplateMiddleOrTemplateTail, + isTemplateSpan: () => isTemplateSpan, + isTemplateTail: () => isTemplateTail, + isTextWhiteSpaceLike: () => isTextWhiteSpaceLike, + isThis: () => isThis, + isThisContainerOrFunctionBlock: () => isThisContainerOrFunctionBlock, + isThisIdentifier: () => isThisIdentifier, + isThisInTypeQuery: () => isThisInTypeQuery, + isThisInitializedDeclaration: () => isThisInitializedDeclaration, + isThisInitializedObjectBindingExpression: () => isThisInitializedObjectBindingExpression, + isThisProperty: () => isThisProperty, + isThisTypeNode: () => isThisTypeNode, + isThisTypeParameter: () => isThisTypeParameter, + isThisTypePredicate: () => isThisTypePredicate, + isThrowStatement: () => isThrowStatement, + isToken: () => isToken, + isTokenKind: () => isTokenKind, + isTraceEnabled: () => isTraceEnabled, + isTransientSymbol: () => isTransientSymbol, + isTrivia: () => isTrivia, + isTryStatement: () => isTryStatement, + isTupleTypeNode: () => isTupleTypeNode, + isTypeAlias: () => isTypeAlias, + isTypeAliasDeclaration: () => isTypeAliasDeclaration, + isTypeAssertionExpression: () => isTypeAssertionExpression, + isTypeDeclaration: () => isTypeDeclaration, + isTypeElement: () => isTypeElement, + isTypeKeyword: () => isTypeKeyword, + isTypeKeywordToken: () => isTypeKeywordToken, + isTypeKeywordTokenOrIdentifier: () => isTypeKeywordTokenOrIdentifier, + isTypeLiteralNode: () => isTypeLiteralNode, + isTypeNode: () => isTypeNode, + isTypeNodeKind: () => isTypeNodeKind, + isTypeOfExpression: () => isTypeOfExpression, + isTypeOnlyExportDeclaration: () => isTypeOnlyExportDeclaration, + isTypeOnlyImportDeclaration: () => isTypeOnlyImportDeclaration, + isTypeOnlyImportOrExportDeclaration: () => isTypeOnlyImportOrExportDeclaration, + isTypeOperatorNode: () => isTypeOperatorNode, + isTypeParameterDeclaration: () => isTypeParameterDeclaration, + isTypePredicateNode: () => isTypePredicateNode, + isTypeQueryNode: () => isTypeQueryNode, + isTypeReferenceNode: () => isTypeReferenceNode, + isTypeReferenceType: () => isTypeReferenceType, + isTypeUsableAsPropertyName: () => isTypeUsableAsPropertyName, + isUMDExportSymbol: () => isUMDExportSymbol, + isUnaryExpression: () => isUnaryExpression, + isUnaryExpressionWithWrite: () => isUnaryExpressionWithWrite, + isUnicodeIdentifierStart: () => isUnicodeIdentifierStart, + isUnionTypeNode: () => isUnionTypeNode, + isUnparsedNode: () => isUnparsedNode, + isUnparsedPrepend: () => isUnparsedPrepend, + isUnparsedSource: () => isUnparsedSource, + isUnparsedTextLike: () => isUnparsedTextLike, + isUrl: () => isUrl, + isValidBigIntString: () => isValidBigIntString, + isValidESSymbolDeclaration: () => isValidESSymbolDeclaration, + isValidTypeOnlyAliasUseSite: () => isValidTypeOnlyAliasUseSite, + isValueSignatureDeclaration: () => isValueSignatureDeclaration, + isVarAwaitUsing: () => isVarAwaitUsing, + isVarConst: () => isVarConst, + isVarUsing: () => isVarUsing, + isVariableDeclaration: () => isVariableDeclaration, + isVariableDeclarationInVariableStatement: () => isVariableDeclarationInVariableStatement, + isVariableDeclarationInitializedToBareOrAccessedRequire: () => isVariableDeclarationInitializedToBareOrAccessedRequire, + isVariableDeclarationInitializedToRequire: () => isVariableDeclarationInitializedToRequire, + isVariableDeclarationList: () => isVariableDeclarationList, + isVariableLike: () => isVariableLike, + isVariableLikeOrAccessor: () => isVariableLikeOrAccessor, + isVariableStatement: () => isVariableStatement, + isVoidExpression: () => isVoidExpression, + isWatchSet: () => isWatchSet, + isWhileStatement: () => isWhileStatement, + isWhiteSpaceLike: () => isWhiteSpaceLike, + isWhiteSpaceSingleLine: () => isWhiteSpaceSingleLine, + isWithStatement: () => isWithStatement, + isWriteAccess: () => isWriteAccess, + isWriteOnlyAccess: () => isWriteOnlyAccess, + isYieldExpression: () => isYieldExpression, + jsxModeNeedsExplicitImport: () => jsxModeNeedsExplicitImport, + keywordPart: () => keywordPart, + last: () => last, + lastOrUndefined: () => lastOrUndefined, + length: () => length, + libMap: () => libMap, + libs: () => libs, + lineBreakPart: () => lineBreakPart, + linkNamePart: () => linkNamePart, + linkPart: () => linkPart, + linkTextPart: () => linkTextPart, + listFiles: () => listFiles, + loadModuleFromGlobalCache: () => loadModuleFromGlobalCache, + loadWithModeAwareCache: () => loadWithModeAwareCache, + makeIdentifierFromModuleName: () => makeIdentifierFromModuleName, + makeImport: () => makeImport, + makeImportIfNecessary: () => makeImportIfNecessary, + makeStringLiteral: () => makeStringLiteral, + mangleScopedPackageName: () => mangleScopedPackageName, + map: () => map, + mapAllOrFail: () => mapAllOrFail, + mapDefined: () => mapDefined, + mapDefinedEntries: () => mapDefinedEntries, + mapDefinedIterator: () => mapDefinedIterator, + mapEntries: () => mapEntries, + mapIterator: () => mapIterator, + mapOneOrMany: () => mapOneOrMany, + mapToDisplayParts: () => mapToDisplayParts, + matchFiles: () => matchFiles, + matchPatternOrExact: () => matchPatternOrExact, + matchedText: () => matchedText, + matchesExclude: () => matchesExclude, + maybeBind: () => maybeBind, + maybeSetLocalizedDiagnosticMessages: () => maybeSetLocalizedDiagnosticMessages, + memoize: () => memoize, + memoizeCached: () => memoizeCached, + memoizeOne: () => memoizeOne, + memoizeWeak: () => memoizeWeak, + metadataHelper: () => metadataHelper, + min: () => min, + minAndMax: () => minAndMax, + missingFileModifiedTime: () => missingFileModifiedTime, + modifierToFlag: () => modifierToFlag, + modifiersToFlags: () => modifiersToFlags, + moduleOptionDeclaration: () => moduleOptionDeclaration, + moduleResolutionIsEqualTo: () => moduleResolutionIsEqualTo, + moduleResolutionNameAndModeGetter: () => moduleResolutionNameAndModeGetter, + moduleResolutionOptionDeclarations: () => moduleResolutionOptionDeclarations, + moduleResolutionSupportsPackageJsonExportsAndImports: () => moduleResolutionSupportsPackageJsonExportsAndImports, + moduleResolutionUsesNodeModules: () => moduleResolutionUsesNodeModules, + moduleSpecifiers: () => ts_moduleSpecifiers_exports, + moveEmitHelpers: () => moveEmitHelpers, + moveRangeEnd: () => moveRangeEnd, + moveRangePastDecorators: () => moveRangePastDecorators, + moveRangePastModifiers: () => moveRangePastModifiers, + moveRangePos: () => moveRangePos, + moveSyntheticComments: () => moveSyntheticComments, + mutateMap: () => mutateMap, + mutateMapSkippingNewValues: () => mutateMapSkippingNewValues, + needsParentheses: () => needsParentheses, + needsScopeMarker: () => needsScopeMarker, + newCaseClauseTracker: () => newCaseClauseTracker, + newPrivateEnvironment: () => newPrivateEnvironment, + noEmitNotification: () => noEmitNotification, + noEmitSubstitution: () => noEmitSubstitution, + noTransformers: () => noTransformers, + noTruncationMaximumTruncationLength: () => noTruncationMaximumTruncationLength, + nodeCanBeDecorated: () => nodeCanBeDecorated, + nodeHasName: () => nodeHasName, + nodeIsDecorated: () => nodeIsDecorated, + nodeIsMissing: () => nodeIsMissing, + nodeIsPresent: () => nodeIsPresent, + nodeIsSynthesized: () => nodeIsSynthesized, + nodeModuleNameResolver: () => nodeModuleNameResolver, + nodeModulesPathPart: () => nodeModulesPathPart, + nodeNextJsonConfigResolver: () => nodeNextJsonConfigResolver, + nodeOrChildIsDecorated: () => nodeOrChildIsDecorated, + nodeOverlapsWithStartEnd: () => nodeOverlapsWithStartEnd, + nodePosToString: () => nodePosToString, + nodeSeenTracker: () => nodeSeenTracker, + nodeStartsNewLexicalEnvironment: () => nodeStartsNewLexicalEnvironment, + nodeToDisplayParts: () => nodeToDisplayParts, + noop: () => noop, + noopFileWatcher: () => noopFileWatcher, + normalizePath: () => normalizePath, + normalizeSlashes: () => normalizeSlashes, + not: () => not, + notImplemented: () => notImplemented, + notImplementedResolver: () => notImplementedResolver, + nullNodeConverters: () => nullNodeConverters, + nullParenthesizerRules: () => nullParenthesizerRules, + nullTransformationContext: () => nullTransformationContext, + objectAllocator: () => objectAllocator, + operatorPart: () => operatorPart, + optionDeclarations: () => optionDeclarations, + optionMapToObject: () => optionMapToObject, + optionsAffectingProgramStructure: () => optionsAffectingProgramStructure, + optionsForBuild: () => optionsForBuild, + optionsForWatch: () => optionsForWatch, + optionsHaveChanges: () => optionsHaveChanges, + optionsHaveModuleResolutionChanges: () => optionsHaveModuleResolutionChanges, + or: () => or, + orderedRemoveItem: () => orderedRemoveItem, + orderedRemoveItemAt: () => orderedRemoveItemAt, + outFile: () => outFile, + packageIdToPackageName: () => packageIdToPackageName, + packageIdToString: () => packageIdToString, + paramHelper: () => paramHelper, + parameterIsThisKeyword: () => parameterIsThisKeyword, + parameterNamePart: () => parameterNamePart, + parseBaseNodeFactory: () => parseBaseNodeFactory, + parseBigInt: () => parseBigInt, + parseBuildCommand: () => parseBuildCommand, + parseCommandLine: () => parseCommandLine, + parseCommandLineWorker: () => parseCommandLineWorker, + parseConfigFileTextToJson: () => parseConfigFileTextToJson, + parseConfigFileWithSystem: () => parseConfigFileWithSystem, + parseConfigHostFromCompilerHostLike: () => parseConfigHostFromCompilerHostLike, + parseCustomTypeOption: () => parseCustomTypeOption, + parseIsolatedEntityName: () => parseIsolatedEntityName, + parseIsolatedJSDocComment: () => parseIsolatedJSDocComment, + parseJSDocTypeExpressionForTests: () => parseJSDocTypeExpressionForTests, + parseJsonConfigFileContent: () => parseJsonConfigFileContent, + parseJsonSourceFileConfigFileContent: () => parseJsonSourceFileConfigFileContent, + parseJsonText: () => parseJsonText, + parseListTypeOption: () => parseListTypeOption, + parseNodeFactory: () => parseNodeFactory, + parseNodeModuleFromPath: () => parseNodeModuleFromPath, + parsePackageName: () => parsePackageName, + parsePseudoBigInt: () => parsePseudoBigInt, + parseValidBigInt: () => parseValidBigInt, + patchWriteFileEnsuringDirectory: () => patchWriteFileEnsuringDirectory, + pathContainsNodeModules: () => pathContainsNodeModules, + pathIsAbsolute: () => pathIsAbsolute, + pathIsBareSpecifier: () => pathIsBareSpecifier, + pathIsRelative: () => pathIsRelative, + patternText: () => patternText, + perfLogger: () => perfLogger, + performIncrementalCompilation: () => performIncrementalCompilation, + performance: () => ts_performance_exports, + plainJSErrors: () => plainJSErrors, + positionBelongsToNode: () => positionBelongsToNode, + positionIsASICandidate: () => positionIsASICandidate, + positionIsSynthesized: () => positionIsSynthesized, + positionsAreOnSameLine: () => positionsAreOnSameLine, + preProcessFile: () => preProcessFile, + probablyUsesSemicolons: () => probablyUsesSemicolons, + processCommentPragmas: () => processCommentPragmas, + processPragmasIntoFields: () => processPragmasIntoFields, + processTaggedTemplateExpression: () => processTaggedTemplateExpression, + programContainsEsModules: () => programContainsEsModules, + programContainsModules: () => programContainsModules, + projectReferenceIsEqualTo: () => projectReferenceIsEqualTo, + propKeyHelper: () => propKeyHelper, + propertyNamePart: () => propertyNamePart, + pseudoBigIntToString: () => pseudoBigIntToString, + punctuationPart: () => punctuationPart, + pushIfUnique: () => pushIfUnique, + quote: () => quote, + quotePreferenceFromString: () => quotePreferenceFromString, + rangeContainsPosition: () => rangeContainsPosition, + rangeContainsPositionExclusive: () => rangeContainsPositionExclusive, + rangeContainsRange: () => rangeContainsRange, + rangeContainsRangeExclusive: () => rangeContainsRangeExclusive, + rangeContainsStartEnd: () => rangeContainsStartEnd, + rangeEndIsOnSameLineAsRangeStart: () => rangeEndIsOnSameLineAsRangeStart, + rangeEndPositionsAreOnSameLine: () => rangeEndPositionsAreOnSameLine, + rangeEquals: () => rangeEquals, + rangeIsOnSingleLine: () => rangeIsOnSingleLine, + rangeOfNode: () => rangeOfNode, + rangeOfTypeParameters: () => rangeOfTypeParameters, + rangeOverlapsWithStartEnd: () => rangeOverlapsWithStartEnd, + rangeStartIsOnSameLineAsRangeEnd: () => rangeStartIsOnSameLineAsRangeEnd, + rangeStartPositionsAreOnSameLine: () => rangeStartPositionsAreOnSameLine, + readBuilderProgram: () => readBuilderProgram, + readConfigFile: () => readConfigFile, + readHelper: () => readHelper, + readJson: () => readJson, + readJsonConfigFile: () => readJsonConfigFile, + readJsonOrUndefined: () => readJsonOrUndefined, + reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange, + reduceEachTrailingCommentRange: () => reduceEachTrailingCommentRange, + reduceLeft: () => reduceLeft, + reduceLeftIterator: () => reduceLeftIterator, + reducePathComponents: () => reducePathComponents, + refactor: () => ts_refactor_exports, + regExpEscape: () => regExpEscape, + relativeComplement: () => relativeComplement, + removeAllComments: () => removeAllComments, + removeEmitHelper: () => removeEmitHelper, + removeExtension: () => removeExtension, + removeFileExtension: () => removeFileExtension, + removeIgnoredPath: () => removeIgnoredPath, + removeMinAndVersionNumbers: () => removeMinAndVersionNumbers, + removeOptionality: () => removeOptionality, + removePrefix: () => removePrefix, + removeSuffix: () => removeSuffix, + removeTrailingDirectorySeparator: () => removeTrailingDirectorySeparator, + repeatString: () => repeatString, + replaceElement: () => replaceElement, + resolutionExtensionIsTSOrJson: () => resolutionExtensionIsTSOrJson, + resolveConfigFileProjectName: () => resolveConfigFileProjectName, + resolveJSModule: () => resolveJSModule, + resolveLibrary: () => resolveLibrary, + resolveModuleName: () => resolveModuleName, + resolveModuleNameFromCache: () => resolveModuleNameFromCache, + resolvePackageNameToPackageJson: () => resolvePackageNameToPackageJson, + resolvePath: () => resolvePath, + resolveProjectReferencePath: () => resolveProjectReferencePath, + resolveTripleslashReference: () => resolveTripleslashReference, + resolveTypeReferenceDirective: () => resolveTypeReferenceDirective, + resolvingEmptyArray: () => resolvingEmptyArray, + restHelper: () => restHelper, + returnFalse: () => returnFalse, + returnNoopFileWatcher: () => returnNoopFileWatcher, + returnTrue: () => returnTrue, + returnUndefined: () => returnUndefined, + returnsPromise: () => returnsPromise, + runInitializersHelper: () => runInitializersHelper, + sameFlatMap: () => sameFlatMap, + sameMap: () => sameMap, + sameMapping: () => sameMapping, + scanShebangTrivia: () => scanShebangTrivia, + scanTokenAtPosition: () => scanTokenAtPosition, + scanner: () => scanner, + screenStartingMessageCodes: () => screenStartingMessageCodes, + semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations, + serializeCompilerOptions: () => serializeCompilerOptions, + server: () => ts_server_exports3, + servicesVersion: () => servicesVersion, + setCommentRange: () => setCommentRange, + setConfigFileInOptions: () => setConfigFileInOptions, + setConstantValue: () => setConstantValue, + setEachParent: () => setEachParent, + setEmitFlags: () => setEmitFlags, + setFunctionNameHelper: () => setFunctionNameHelper, + setGetSourceFileAsHashVersioned: () => setGetSourceFileAsHashVersioned, + setIdentifierAutoGenerate: () => setIdentifierAutoGenerate, + setIdentifierGeneratedImportReference: () => setIdentifierGeneratedImportReference, + setIdentifierTypeArguments: () => setIdentifierTypeArguments, + setInternalEmitFlags: () => setInternalEmitFlags, + setLocalizedDiagnosticMessages: () => setLocalizedDiagnosticMessages, + setModuleDefaultHelper: () => setModuleDefaultHelper, + setNodeFlags: () => setNodeFlags, + setObjectAllocator: () => setObjectAllocator, + setOriginalNode: () => setOriginalNode, + setParent: () => setParent, + setParentRecursive: () => setParentRecursive, + setPrivateIdentifier: () => setPrivateIdentifier, + setSnippetElement: () => setSnippetElement, + setSourceMapRange: () => setSourceMapRange, + setStackTraceLimit: () => setStackTraceLimit, + setStartsOnNewLine: () => setStartsOnNewLine, + setSyntheticLeadingComments: () => setSyntheticLeadingComments, + setSyntheticTrailingComments: () => setSyntheticTrailingComments, + setSys: () => setSys, + setSysLog: () => setSysLog, + setTextRange: () => setTextRange, + setTextRangeEnd: () => setTextRangeEnd, + setTextRangePos: () => setTextRangePos, + setTextRangePosEnd: () => setTextRangePosEnd, + setTextRangePosWidth: () => setTextRangePosWidth, + setTokenSourceMapRange: () => setTokenSourceMapRange, + setTypeNode: () => setTypeNode, + setUILocale: () => setUILocale, + setValueDeclaration: () => setValueDeclaration, + shouldAllowImportingTsExtension: () => shouldAllowImportingTsExtension, + shouldPreserveConstEnums: () => shouldPreserveConstEnums, + shouldResolveJsRequire: () => shouldResolveJsRequire, + shouldUseUriStyleNodeCoreModules: () => shouldUseUriStyleNodeCoreModules, + showModuleSpecifier: () => showModuleSpecifier, + signatureHasLiteralTypes: () => signatureHasLiteralTypes, + signatureHasRestParameter: () => signatureHasRestParameter, + signatureToDisplayParts: () => signatureToDisplayParts, + single: () => single, + singleElementArray: () => singleElementArray, + singleIterator: () => singleIterator, + singleOrMany: () => singleOrMany, + singleOrUndefined: () => singleOrUndefined, + skipAlias: () => skipAlias, + skipAssertions: () => skipAssertions, + skipConstraint: () => skipConstraint, + skipOuterExpressions: () => skipOuterExpressions, + skipParentheses: () => skipParentheses, + skipPartiallyEmittedExpressions: () => skipPartiallyEmittedExpressions, + skipTrivia: () => skipTrivia, + skipTypeChecking: () => skipTypeChecking, + skipTypeParentheses: () => skipTypeParentheses, + skipWhile: () => skipWhile, + sliceAfter: () => sliceAfter, + some: () => some, + sort: () => sort, + sortAndDeduplicate: () => sortAndDeduplicate, + sortAndDeduplicateDiagnostics: () => sortAndDeduplicateDiagnostics, + sourceFileAffectingCompilerOptions: () => sourceFileAffectingCompilerOptions, + sourceFileMayBeEmitted: () => sourceFileMayBeEmitted, + sourceMapCommentRegExp: () => sourceMapCommentRegExp, + sourceMapCommentRegExpDontCareLineStart: () => sourceMapCommentRegExpDontCareLineStart, + spacePart: () => spacePart, + spanMap: () => spanMap, + spreadArrayHelper: () => spreadArrayHelper, + stableSort: () => stableSort, + startEndContainsRange: () => startEndContainsRange, + startEndOverlapsWithStartEnd: () => startEndOverlapsWithStartEnd, + startOnNewLine: () => startOnNewLine, + startTracing: () => startTracing, + startsWith: () => startsWith, + startsWithDirectory: () => startsWithDirectory, + startsWithUnderscore: () => startsWithUnderscore, + startsWithUseStrict: () => startsWithUseStrict, + stringContainsAt: () => stringContainsAt, + stringToToken: () => stringToToken, + stripQuotes: () => stripQuotes, + supportedDeclarationExtensions: () => supportedDeclarationExtensions, + supportedJSExtensions: () => supportedJSExtensions, + supportedJSExtensionsFlat: () => supportedJSExtensionsFlat, + supportedLocaleDirectories: () => supportedLocaleDirectories, + supportedTSExtensions: () => supportedTSExtensions, + supportedTSExtensionsFlat: () => supportedTSExtensionsFlat, + supportedTSImplementationExtensions: () => supportedTSImplementationExtensions, + suppressLeadingAndTrailingTrivia: () => suppressLeadingAndTrailingTrivia, + suppressLeadingTrivia: () => suppressLeadingTrivia, + suppressTrailingTrivia: () => suppressTrailingTrivia, + symbolEscapedNameNoDefault: () => symbolEscapedNameNoDefault, + symbolName: () => symbolName, + symbolNameNoDefault: () => symbolNameNoDefault, + symbolPart: () => symbolPart, + symbolToDisplayParts: () => symbolToDisplayParts, + syntaxMayBeASICandidate: () => syntaxMayBeASICandidate, + syntaxRequiresTrailingSemicolonOrASI: () => syntaxRequiresTrailingSemicolonOrASI, + sys: () => sys, + sysLog: () => sysLog, + tagNamesAreEquivalent: () => tagNamesAreEquivalent, + takeWhile: () => takeWhile, + targetOptionDeclaration: () => targetOptionDeclaration, + templateObjectHelper: () => templateObjectHelper, + testFormatSettings: () => testFormatSettings, + textChangeRangeIsUnchanged: () => textChangeRangeIsUnchanged, + textChangeRangeNewSpan: () => textChangeRangeNewSpan, + textChanges: () => ts_textChanges_exports, + textOrKeywordPart: () => textOrKeywordPart, + textPart: () => textPart, + textRangeContainsPositionInclusive: () => textRangeContainsPositionInclusive, + textSpanContainsPosition: () => textSpanContainsPosition, + textSpanContainsTextSpan: () => textSpanContainsTextSpan, + textSpanEnd: () => textSpanEnd, + textSpanIntersection: () => textSpanIntersection, + textSpanIntersectsWith: () => textSpanIntersectsWith, + textSpanIntersectsWithPosition: () => textSpanIntersectsWithPosition, + textSpanIntersectsWithTextSpan: () => textSpanIntersectsWithTextSpan, + textSpanIsEmpty: () => textSpanIsEmpty, + textSpanOverlap: () => textSpanOverlap, + textSpanOverlapsWith: () => textSpanOverlapsWith, + textSpansEqual: () => textSpansEqual, + textToKeywordObj: () => textToKeywordObj, + timestamp: () => timestamp, + toArray: () => toArray, + toBuilderFileEmit: () => toBuilderFileEmit, + toBuilderStateFileInfoForMultiEmit: () => toBuilderStateFileInfoForMultiEmit, + toEditorSettings: () => toEditorSettings, + toFileNameLowerCase: () => toFileNameLowerCase, + toLowerCase: () => toLowerCase, + toPath: () => toPath, + toProgramEmitPending: () => toProgramEmitPending, + tokenIsIdentifierOrKeyword: () => tokenIsIdentifierOrKeyword, + tokenIsIdentifierOrKeywordOrGreaterThan: () => tokenIsIdentifierOrKeywordOrGreaterThan, + tokenToString: () => tokenToString, + trace: () => trace, + tracing: () => tracing, + tracingEnabled: () => tracingEnabled, + transform: () => transform, + transformClassFields: () => transformClassFields, + transformDeclarations: () => transformDeclarations, + transformECMAScriptModule: () => transformECMAScriptModule, + transformES2015: () => transformES2015, + transformES2016: () => transformES2016, + transformES2017: () => transformES2017, + transformES2018: () => transformES2018, + transformES2019: () => transformES2019, + transformES2020: () => transformES2020, + transformES2021: () => transformES2021, + transformES5: () => transformES5, + transformESDecorators: () => transformESDecorators, + transformESNext: () => transformESNext, + transformGenerators: () => transformGenerators, + transformJsx: () => transformJsx, + transformLegacyDecorators: () => transformLegacyDecorators, + transformModule: () => transformModule, + transformNamedEvaluation: () => transformNamedEvaluation, + transformNodeModule: () => transformNodeModule, + transformNodes: () => transformNodes, + transformSystemModule: () => transformSystemModule, + transformTypeScript: () => transformTypeScript, + transpile: () => transpile, + transpileModule: () => transpileModule, + transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions, + tryAddToSet: () => tryAddToSet, + tryAndIgnoreErrors: () => tryAndIgnoreErrors, + tryCast: () => tryCast, + tryDirectoryExists: () => tryDirectoryExists, + tryExtractTSExtension: () => tryExtractTSExtension, + tryFileExists: () => tryFileExists, + tryGetClassExtendingExpressionWithTypeArguments: () => tryGetClassExtendingExpressionWithTypeArguments, + tryGetClassImplementingOrExtendingExpressionWithTypeArguments: () => tryGetClassImplementingOrExtendingExpressionWithTypeArguments, + tryGetDirectories: () => tryGetDirectories, + tryGetExtensionFromPath: () => tryGetExtensionFromPath2, + tryGetImportFromModuleSpecifier: () => tryGetImportFromModuleSpecifier, + tryGetJSDocSatisfiesTypeNode: () => tryGetJSDocSatisfiesTypeNode, + tryGetModuleNameFromFile: () => tryGetModuleNameFromFile, + tryGetModuleSpecifierFromDeclaration: () => tryGetModuleSpecifierFromDeclaration, + tryGetNativePerformanceHooks: () => tryGetNativePerformanceHooks, + tryGetPropertyAccessOrIdentifierToString: () => tryGetPropertyAccessOrIdentifierToString, + tryGetPropertyNameOfBindingOrAssignmentElement: () => tryGetPropertyNameOfBindingOrAssignmentElement, + tryGetSourceMappingURL: () => tryGetSourceMappingURL, + tryGetTextOfPropertyName: () => tryGetTextOfPropertyName, + tryIOAndConsumeErrors: () => tryIOAndConsumeErrors, + tryParsePattern: () => tryParsePattern, + tryParsePatterns: () => tryParsePatterns, + tryParseRawSourceMap: () => tryParseRawSourceMap, + tryReadDirectory: () => tryReadDirectory, + tryReadFile: () => tryReadFile, + tryRemoveDirectoryPrefix: () => tryRemoveDirectoryPrefix, + tryRemoveExtension: () => tryRemoveExtension, + tryRemovePrefix: () => tryRemovePrefix, + tryRemoveSuffix: () => tryRemoveSuffix, + typeAcquisitionDeclarations: () => typeAcquisitionDeclarations, + typeAliasNamePart: () => typeAliasNamePart, + typeDirectiveIsEqualTo: () => typeDirectiveIsEqualTo, + typeKeywords: () => typeKeywords, + typeParameterNamePart: () => typeParameterNamePart, + typeReferenceResolutionNameAndModeGetter: () => typeReferenceResolutionNameAndModeGetter, + typeToDisplayParts: () => typeToDisplayParts, + unchangedPollThresholds: () => unchangedPollThresholds, + unchangedTextChangeRange: () => unchangedTextChangeRange, + unescapeLeadingUnderscores: () => unescapeLeadingUnderscores, + unmangleScopedPackageName: () => unmangleScopedPackageName, + unorderedRemoveItem: () => unorderedRemoveItem, + unorderedRemoveItemAt: () => unorderedRemoveItemAt, + unreachableCodeIsError: () => unreachableCodeIsError, + unusedLabelIsError: () => unusedLabelIsError, + unwrapInnermostStatementOfLabel: () => unwrapInnermostStatementOfLabel, + updateErrorForNoInputFiles: () => updateErrorForNoInputFiles, + updateLanguageServiceSourceFile: () => updateLanguageServiceSourceFile, + updateMissingFilePathsWatch: () => updateMissingFilePathsWatch, + updatePackageJsonWatch: () => updatePackageJsonWatch, + updateResolutionField: () => updateResolutionField, + updateSharedExtendedConfigFileWatcher: () => updateSharedExtendedConfigFileWatcher, + updateSourceFile: () => updateSourceFile, + updateWatchingWildcardDirectories: () => updateWatchingWildcardDirectories, + usesExtensionsOnImports: () => usesExtensionsOnImports, + usingSingleLineStringWriter: () => usingSingleLineStringWriter, + utf16EncodeAsString: () => utf16EncodeAsString, + validateLocaleAndSetLanguage: () => validateLocaleAndSetLanguage, + valuesHelper: () => valuesHelper, + version: () => version, + versionMajorMinor: () => versionMajorMinor, + visitArray: () => visitArray, + visitCommaListElements: () => visitCommaListElements, + visitEachChild: () => visitEachChild, + visitFunctionBody: () => visitFunctionBody, + visitIterationBody: () => visitIterationBody, + visitLexicalEnvironment: () => visitLexicalEnvironment, + visitNode: () => visitNode, + visitNodes: () => visitNodes2, + visitParameterList: () => visitParameterList, + walkUpBindingElementsAndPatterns: () => walkUpBindingElementsAndPatterns, + walkUpLexicalEnvironments: () => walkUpLexicalEnvironments, + walkUpOuterExpressions: () => walkUpOuterExpressions, + walkUpParenthesizedExpressions: () => walkUpParenthesizedExpressions, + walkUpParenthesizedTypes: () => walkUpParenthesizedTypes, + walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild, + whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp, + writeCommentRange: () => writeCommentRange, + writeFile: () => writeFile, + writeFileEnsuringDirectories: () => writeFileEnsuringDirectories, + zipWith: () => zipWith + }); + var init_ts7 = __esm({ + "src/server/_namespaces/ts.ts"() { + "use strict"; + init_ts2(); + init_ts3(); + init_ts4(); + init_ts5(); + init_ts_server3(); + } + }); + + // src/typescript/_namespaces/ts.server.ts + var ts_server_exports4 = {}; + __export(ts_server_exports4, { + ActionInvalidate: () => ActionInvalidate, + ActionPackageInstalled: () => ActionPackageInstalled, + ActionSet: () => ActionSet, + ActionWatchTypingLocations: () => ActionWatchTypingLocations, + Arguments: () => Arguments, + AutoImportProviderProject: () => AutoImportProviderProject, + AuxiliaryProject: () => AuxiliaryProject, + CharRangeSection: () => CharRangeSection, + CloseFileWatcherEvent: () => CloseFileWatcherEvent, + CommandNames: () => CommandNames, + ConfigFileDiagEvent: () => ConfigFileDiagEvent, + ConfiguredProject: () => ConfiguredProject2, + CreateDirectoryWatcherEvent: () => CreateDirectoryWatcherEvent, + CreateFileWatcherEvent: () => CreateFileWatcherEvent, + Errors: () => Errors, + EventBeginInstallTypes: () => EventBeginInstallTypes, + EventEndInstallTypes: () => EventEndInstallTypes, + EventInitializationFailed: () => EventInitializationFailed, + EventTypesRegistry: () => EventTypesRegistry, + ExternalProject: () => ExternalProject2, + GcTimer: () => GcTimer, + InferredProject: () => InferredProject2, + LargeFileReferencedEvent: () => LargeFileReferencedEvent, + LineIndex: () => LineIndex, + LineLeaf: () => LineLeaf, + LineNode: () => LineNode, + LogLevel: () => LogLevel2, + Msg: () => Msg, + OpenFileInfoTelemetryEvent: () => OpenFileInfoTelemetryEvent, + Project: () => Project3, + ProjectInfoTelemetryEvent: () => ProjectInfoTelemetryEvent, + ProjectKind: () => ProjectKind, + ProjectLanguageServiceStateEvent: () => ProjectLanguageServiceStateEvent, + ProjectLoadingFinishEvent: () => ProjectLoadingFinishEvent, + ProjectLoadingStartEvent: () => ProjectLoadingStartEvent, + ProjectReferenceProjectLoadKind: () => ProjectReferenceProjectLoadKind, + ProjectService: () => ProjectService3, + ProjectsUpdatedInBackgroundEvent: () => ProjectsUpdatedInBackgroundEvent, + ScriptInfo: () => ScriptInfo, + ScriptVersionCache: () => ScriptVersionCache, + Session: () => Session3, + TextStorage: () => TextStorage, + ThrottledOperations: () => ThrottledOperations, + TypingsCache: () => TypingsCache, + allFilesAreJsOrDts: () => allFilesAreJsOrDts, + allRootFilesAreJsOrDts: () => allRootFilesAreJsOrDts, + asNormalizedPath: () => asNormalizedPath, + convertCompilerOptions: () => convertCompilerOptions, + convertFormatOptions: () => convertFormatOptions, + convertScriptKindName: () => convertScriptKindName, + convertTypeAcquisition: () => convertTypeAcquisition, + convertUserPreferences: () => convertUserPreferences, + convertWatchOptions: () => convertWatchOptions, + countEachFileTypes: () => countEachFileTypes, + createInstallTypingsRequest: () => createInstallTypingsRequest, + createModuleSpecifierCache: () => createModuleSpecifierCache, + createNormalizedPathMap: () => createNormalizedPathMap, + createPackageJsonCache: () => createPackageJsonCache, + createSortedArray: () => createSortedArray2, + emptyArray: () => emptyArray2, + findArgument: () => findArgument, + forEachResolvedProjectReferenceProject: () => forEachResolvedProjectReferenceProject, + formatDiagnosticToProtocol: () => formatDiagnosticToProtocol, + formatMessage: () => formatMessage2, + getBaseConfigFileName: () => getBaseConfigFileName, + getLocationInNewDocument: () => getLocationInNewDocument, + hasArgument: () => hasArgument, + hasNoTypeScriptSource: () => hasNoTypeScriptSource, + indent: () => indent2, + isBackgroundProject: () => isBackgroundProject, + isConfigFile: () => isConfigFile, + isConfiguredProject: () => isConfiguredProject, + isDynamicFileName: () => isDynamicFileName, + isExternalProject: () => isExternalProject, + isInferredProject: () => isInferredProject, + isInferredProjectName: () => isInferredProjectName, + makeAutoImportProviderProjectName: () => makeAutoImportProviderProjectName, + makeAuxiliaryProjectName: () => makeAuxiliaryProjectName, + makeInferredProjectName: () => makeInferredProjectName, + maxFileSize: () => maxFileSize, + maxProgramSizeForNonTsFiles: () => maxProgramSizeForNonTsFiles, + normalizedPathToPath: () => normalizedPathToPath, + nowString: () => nowString, + nullCancellationToken: () => nullCancellationToken, + nullTypingsInstaller: () => nullTypingsInstaller, + projectContainsInfoDirectly: () => projectContainsInfoDirectly, + protocol: () => ts_server_protocol_exports, + removeSorted: () => removeSorted, + stringifyIndented: () => stringifyIndented, + toEvent: () => toEvent, + toNormalizedPath: () => toNormalizedPath, + tryConvertScriptKindName: () => tryConvertScriptKindName, + typingsInstaller: () => ts_server_typingsInstaller_exports, + updateProjectIfDirty: () => updateProjectIfDirty + }); + var init_ts_server4 = __esm({ + "src/typescript/_namespaces/ts.server.ts"() { + "use strict"; + init_ts_server(); + init_ts_server3(); + } + }); + + // src/typescript/_namespaces/ts.ts + var ts_exports3 = {}; + __export(ts_exports3, { + ANONYMOUS: () => ANONYMOUS, + AccessFlags: () => AccessFlags, + AssertionLevel: () => AssertionLevel, + AssignmentDeclarationKind: () => AssignmentDeclarationKind, + AssignmentKind: () => AssignmentKind, + Associativity: () => Associativity, + BreakpointResolver: () => ts_BreakpointResolver_exports, + BuilderFileEmit: () => BuilderFileEmit, + BuilderProgramKind: () => BuilderProgramKind, + BuilderState: () => BuilderState, + BundleFileSectionKind: () => BundleFileSectionKind, + CallHierarchy: () => ts_CallHierarchy_exports, + CharacterCodes: () => CharacterCodes, + CheckFlags: () => CheckFlags, + CheckMode: () => CheckMode, + ClassificationType: () => ClassificationType, + ClassificationTypeNames: () => ClassificationTypeNames, + CommentDirectiveType: () => CommentDirectiveType, + Comparison: () => Comparison, + CompletionInfoFlags: () => CompletionInfoFlags, + CompletionTriggerKind: () => CompletionTriggerKind, + Completions: () => ts_Completions_exports, + ContainerFlags: () => ContainerFlags, + ContextFlags: () => ContextFlags, + Debug: () => Debug, + DiagnosticCategory: () => DiagnosticCategory, + Diagnostics: () => Diagnostics, + DocumentHighlights: () => DocumentHighlights, + ElementFlags: () => ElementFlags, + EmitFlags: () => EmitFlags, + EmitHint: () => EmitHint, + EmitOnly: () => EmitOnly, + EndOfLineState: () => EndOfLineState, + EnumKind: () => EnumKind, + ExitStatus: () => ExitStatus, + ExportKind: () => ExportKind, + Extension: () => Extension, + ExternalEmitHelpers: () => ExternalEmitHelpers, + FileIncludeKind: () => FileIncludeKind, + FilePreprocessingDiagnosticsKind: () => FilePreprocessingDiagnosticsKind, + FileSystemEntryKind: () => FileSystemEntryKind, + FileWatcherEventKind: () => FileWatcherEventKind, + FindAllReferences: () => ts_FindAllReferences_exports, + FlattenLevel: () => FlattenLevel, + FlowFlags: () => FlowFlags, + ForegroundColorEscapeSequences: () => ForegroundColorEscapeSequences, + FunctionFlags: () => FunctionFlags, + GeneratedIdentifierFlags: () => GeneratedIdentifierFlags, + GetLiteralTextFlags: () => GetLiteralTextFlags, + GoToDefinition: () => ts_GoToDefinition_exports, + HighlightSpanKind: () => HighlightSpanKind, + IdentifierNameMap: () => IdentifierNameMap, + IdentifierNameMultiMap: () => IdentifierNameMultiMap, + ImportKind: () => ImportKind, + ImportsNotUsedAsValues: () => ImportsNotUsedAsValues, + IndentStyle: () => IndentStyle, + IndexFlags: () => IndexFlags, + IndexKind: () => IndexKind, + InferenceFlags: () => InferenceFlags, + InferencePriority: () => InferencePriority, + InlayHintKind: () => InlayHintKind, + InlayHints: () => ts_InlayHints_exports, + InternalEmitFlags: () => InternalEmitFlags, + InternalSymbolName: () => InternalSymbolName, + InvalidatedProjectKind: () => InvalidatedProjectKind, + JSDocParsingMode: () => JSDocParsingMode, + JsDoc: () => ts_JsDoc_exports, + JsTyping: () => ts_JsTyping_exports, + JsxEmit: () => JsxEmit, + JsxFlags: () => JsxFlags, + JsxReferenceKind: () => JsxReferenceKind, + LanguageServiceMode: () => LanguageServiceMode, + LanguageVariant: () => LanguageVariant, + LexicalEnvironmentFlags: () => LexicalEnvironmentFlags, + ListFormat: () => ListFormat, + LogLevel: () => LogLevel, + MemberOverrideStatus: () => MemberOverrideStatus, + ModifierFlags: () => ModifierFlags, + ModuleDetectionKind: () => ModuleDetectionKind, + ModuleInstanceState: () => ModuleInstanceState, + ModuleKind: () => ModuleKind, + ModuleResolutionKind: () => ModuleResolutionKind, + ModuleSpecifierEnding: () => ModuleSpecifierEnding, + NavigateTo: () => ts_NavigateTo_exports, + NavigationBar: () => ts_NavigationBar_exports, + NewLineKind: () => NewLineKind, + NodeBuilderFlags: () => NodeBuilderFlags, + NodeCheckFlags: () => NodeCheckFlags, + NodeFactoryFlags: () => NodeFactoryFlags, + NodeFlags: () => NodeFlags, + NodeResolutionFeatures: () => NodeResolutionFeatures, + ObjectFlags: () => ObjectFlags, + OperationCanceledException: () => OperationCanceledException, + OperatorPrecedence: () => OperatorPrecedence, + OrganizeImports: () => ts_OrganizeImports_exports, + OrganizeImportsMode: () => OrganizeImportsMode, + OuterExpressionKinds: () => OuterExpressionKinds, + OutliningElementsCollector: () => ts_OutliningElementsCollector_exports, + OutliningSpanKind: () => OutliningSpanKind, + OutputFileType: () => OutputFileType, + PackageJsonAutoImportPreference: () => PackageJsonAutoImportPreference, + PackageJsonDependencyGroup: () => PackageJsonDependencyGroup, + PatternMatchKind: () => PatternMatchKind, + PollingInterval: () => PollingInterval, + PollingWatchKind: () => PollingWatchKind, + PragmaKindFlags: () => PragmaKindFlags, + PrivateIdentifierKind: () => PrivateIdentifierKind, + ProcessLevel: () => ProcessLevel, + ProgramUpdateLevel: () => ProgramUpdateLevel, + QuotePreference: () => QuotePreference, + RelationComparisonResult: () => RelationComparisonResult, + Rename: () => ts_Rename_exports, + ScriptElementKind: () => ScriptElementKind, + ScriptElementKindModifier: () => ScriptElementKindModifier, + ScriptKind: () => ScriptKind, + ScriptSnapshot: () => ScriptSnapshot, + ScriptTarget: () => ScriptTarget, + SemanticClassificationFormat: () => SemanticClassificationFormat, + SemanticMeaning: () => SemanticMeaning, + SemicolonPreference: () => SemicolonPreference, + SignatureCheckMode: () => SignatureCheckMode, + SignatureFlags: () => SignatureFlags, + SignatureHelp: () => ts_SignatureHelp_exports, + SignatureKind: () => SignatureKind, + SmartSelectionRange: () => ts_SmartSelectionRange_exports, + SnippetKind: () => SnippetKind, + SortKind: () => SortKind, + StructureIsReused: () => StructureIsReused, + SymbolAccessibility: () => SymbolAccessibility, + SymbolDisplay: () => ts_SymbolDisplay_exports, + SymbolDisplayPartKind: () => SymbolDisplayPartKind, + SymbolFlags: () => SymbolFlags, + SymbolFormatFlags: () => SymbolFormatFlags, + SyntaxKind: () => SyntaxKind, + SyntheticSymbolKind: () => SyntheticSymbolKind, + Ternary: () => Ternary, + ThrottledCancellationToken: () => ThrottledCancellationToken, + TokenClass: () => TokenClass, + TokenFlags: () => TokenFlags, + TransformFlags: () => TransformFlags, + TypeFacts: () => TypeFacts, + TypeFlags: () => TypeFlags, + TypeFormatFlags: () => TypeFormatFlags, + TypeMapKind: () => TypeMapKind, + TypePredicateKind: () => TypePredicateKind, + TypeReferenceSerializationKind: () => TypeReferenceSerializationKind, + UnionReduction: () => UnionReduction, + UpToDateStatusType: () => UpToDateStatusType, + VarianceFlags: () => VarianceFlags, + Version: () => Version, + VersionRange: () => VersionRange, + WatchDirectoryFlags: () => WatchDirectoryFlags, + WatchDirectoryKind: () => WatchDirectoryKind, + WatchFileKind: () => WatchFileKind, + WatchLogLevel: () => WatchLogLevel, + WatchType: () => WatchType, + accessPrivateIdentifier: () => accessPrivateIdentifier, + addDisposableResourceHelper: () => addDisposableResourceHelper, + addEmitFlags: () => addEmitFlags, + addEmitHelper: () => addEmitHelper, + addEmitHelpers: () => addEmitHelpers, + addInternalEmitFlags: () => addInternalEmitFlags, + addNodeFactoryPatcher: () => addNodeFactoryPatcher, + addObjectAllocatorPatcher: () => addObjectAllocatorPatcher, + addRange: () => addRange, + addRelatedInfo: () => addRelatedInfo, + addSyntheticLeadingComment: () => addSyntheticLeadingComment, + addSyntheticTrailingComment: () => addSyntheticTrailingComment, + addToSeen: () => addToSeen, + advancedAsyncSuperHelper: () => advancedAsyncSuperHelper, + affectsDeclarationPathOptionDeclarations: () => affectsDeclarationPathOptionDeclarations, + affectsEmitOptionDeclarations: () => affectsEmitOptionDeclarations, + allKeysStartWithDot: () => allKeysStartWithDot, + altDirectorySeparator: () => altDirectorySeparator, + and: () => and, + append: () => append, + appendIfUnique: () => appendIfUnique, + arrayFrom: () => arrayFrom, + arrayIsEqualTo: () => arrayIsEqualTo, + arrayIsHomogeneous: () => arrayIsHomogeneous, + arrayIsSorted: () => arrayIsSorted, + arrayOf: () => arrayOf, + arrayReverseIterator: () => arrayReverseIterator, + arrayToMap: () => arrayToMap, + arrayToMultiMap: () => arrayToMultiMap, + arrayToNumericMap: () => arrayToNumericMap, + arraysEqual: () => arraysEqual, + assertType: () => assertType, + assign: () => assign, + assignHelper: () => assignHelper, + asyncDelegator: () => asyncDelegator, + asyncGeneratorHelper: () => asyncGeneratorHelper, + asyncSuperHelper: () => asyncSuperHelper, + asyncValues: () => asyncValues, + attachFileToDiagnostics: () => attachFileToDiagnostics, + awaitHelper: () => awaitHelper, + awaiterHelper: () => awaiterHelper, + base64decode: () => base64decode, + base64encode: () => base64encode, + binarySearch: () => binarySearch, + binarySearchKey: () => binarySearchKey, + bindSourceFile: () => bindSourceFile, + breakIntoCharacterSpans: () => breakIntoCharacterSpans, + breakIntoWordSpans: () => breakIntoWordSpans, + buildLinkParts: () => buildLinkParts, + buildOpts: () => buildOpts, + buildOverload: () => buildOverload, + bundlerModuleNameResolver: () => bundlerModuleNameResolver, + canBeConvertedToAsync: () => canBeConvertedToAsync, + canHaveDecorators: () => canHaveDecorators, + canHaveExportModifier: () => canHaveExportModifier, + canHaveFlowNode: () => canHaveFlowNode, + canHaveIllegalDecorators: () => canHaveIllegalDecorators, + canHaveIllegalModifiers: () => canHaveIllegalModifiers, + canHaveIllegalType: () => canHaveIllegalType, + canHaveIllegalTypeParameters: () => canHaveIllegalTypeParameters, + canHaveJSDoc: () => canHaveJSDoc, + canHaveLocals: () => canHaveLocals, + canHaveModifiers: () => canHaveModifiers, + canHaveSymbol: () => canHaveSymbol, + canJsonReportNoInputFiles: () => canJsonReportNoInputFiles, + canProduceDiagnostics: () => canProduceDiagnostics, + canUsePropertyAccess: () => canUsePropertyAccess, + canWatchAffectingLocation: () => canWatchAffectingLocation, + canWatchAtTypes: () => canWatchAtTypes, + canWatchDirectoryOrFile: () => canWatchDirectoryOrFile, + cartesianProduct: () => cartesianProduct, + cast: () => cast, + chainBundle: () => chainBundle, + chainDiagnosticMessages: () => chainDiagnosticMessages, + changeAnyExtension: () => changeAnyExtension, + changeCompilerHostLikeToUseCache: () => changeCompilerHostLikeToUseCache, + changeExtension: () => changeExtension, + changesAffectModuleResolution: () => changesAffectModuleResolution, + changesAffectingProgramStructure: () => changesAffectingProgramStructure, + childIsDecorated: () => childIsDecorated, + classElementOrClassElementParameterIsDecorated: () => classElementOrClassElementParameterIsDecorated, + classHasClassThisAssignment: () => classHasClassThisAssignment, + classHasDeclaredOrExplicitlyAssignedName: () => classHasDeclaredOrExplicitlyAssignedName, + classHasExplicitlyAssignedName: () => classHasExplicitlyAssignedName, + classOrConstructorParameterIsDecorated: () => classOrConstructorParameterIsDecorated, + classPrivateFieldGetHelper: () => classPrivateFieldGetHelper, + classPrivateFieldInHelper: () => classPrivateFieldInHelper, + classPrivateFieldSetHelper: () => classPrivateFieldSetHelper, + classicNameResolver: () => classicNameResolver, + classifier: () => ts_classifier_exports, + cleanExtendedConfigCache: () => cleanExtendedConfigCache, + clear: () => clear, + clearMap: () => clearMap, + clearSharedExtendedConfigFileWatcher: () => clearSharedExtendedConfigFileWatcher, + climbPastPropertyAccess: () => climbPastPropertyAccess, + climbPastPropertyOrElementAccess: () => climbPastPropertyOrElementAccess, + clone: () => clone, + cloneCompilerOptions: () => cloneCompilerOptions, + closeFileWatcher: () => closeFileWatcher, + closeFileWatcherOf: () => closeFileWatcherOf, + codefix: () => ts_codefix_exports, + collapseTextChangeRangesAcrossMultipleVersions: () => collapseTextChangeRangesAcrossMultipleVersions, + collectExternalModuleInfo: () => collectExternalModuleInfo, + combine: () => combine, + combinePaths: () => combinePaths, + commentPragmas: () => commentPragmas, + commonOptionsWithBuild: () => commonOptionsWithBuild, + commonPackageFolders: () => commonPackageFolders, + compact: () => compact, + compareBooleans: () => compareBooleans, + compareDataObjects: () => compareDataObjects, + compareDiagnostics: () => compareDiagnostics, + compareDiagnosticsSkipRelatedInformation: () => compareDiagnosticsSkipRelatedInformation, + compareEmitHelpers: () => compareEmitHelpers, + compareNumberOfDirectorySeparators: () => compareNumberOfDirectorySeparators, + comparePaths: () => comparePaths, + comparePathsCaseInsensitive: () => comparePathsCaseInsensitive, + comparePathsCaseSensitive: () => comparePathsCaseSensitive, + comparePatternKeys: () => comparePatternKeys, + compareProperties: () => compareProperties, + compareStringsCaseInsensitive: () => compareStringsCaseInsensitive, + compareStringsCaseInsensitiveEslintCompatible: () => compareStringsCaseInsensitiveEslintCompatible, + compareStringsCaseSensitive: () => compareStringsCaseSensitive, + compareStringsCaseSensitiveUI: () => compareStringsCaseSensitiveUI, + compareTextSpans: () => compareTextSpans, + compareValues: () => compareValues, + compileOnSaveCommandLineOption: () => compileOnSaveCommandLineOption, + compilerOptionsAffectDeclarationPath: () => compilerOptionsAffectDeclarationPath, + compilerOptionsAffectEmit: () => compilerOptionsAffectEmit, + compilerOptionsAffectSemanticDiagnostics: () => compilerOptionsAffectSemanticDiagnostics, + compilerOptionsDidYouMeanDiagnostics: () => compilerOptionsDidYouMeanDiagnostics, + compilerOptionsIndicateEsModules: () => compilerOptionsIndicateEsModules, + compose: () => compose, + computeCommonSourceDirectoryOfFilenames: () => computeCommonSourceDirectoryOfFilenames, + computeLineAndCharacterOfPosition: () => computeLineAndCharacterOfPosition, + computeLineOfPosition: () => computeLineOfPosition, + computeLineStarts: () => computeLineStarts, + computePositionOfLineAndCharacter: () => computePositionOfLineAndCharacter, + computeSignature: () => computeSignature, + computeSignatureWithDiagnostics: () => computeSignatureWithDiagnostics, + computeSuggestionDiagnostics: () => computeSuggestionDiagnostics, + concatenate: () => concatenate, + concatenateDiagnosticMessageChains: () => concatenateDiagnosticMessageChains, + consumesNodeCoreModules: () => consumesNodeCoreModules, + contains: () => contains, + containsIgnoredPath: () => containsIgnoredPath, + containsObjectRestOrSpread: () => containsObjectRestOrSpread, + containsParseError: () => containsParseError, + containsPath: () => containsPath, + convertCompilerOptionsForTelemetry: () => convertCompilerOptionsForTelemetry, + convertCompilerOptionsFromJson: () => convertCompilerOptionsFromJson, + convertJsonOption: () => convertJsonOption, + convertToBase64: () => convertToBase64, + convertToJson: () => convertToJson, + convertToObject: () => convertToObject, + convertToOptionsWithAbsolutePaths: () => convertToOptionsWithAbsolutePaths, + convertToRelativePath: () => convertToRelativePath, + convertToTSConfig: () => convertToTSConfig, + convertTypeAcquisitionFromJson: () => convertTypeAcquisitionFromJson, + copyComments: () => copyComments, + copyEntries: () => copyEntries, + copyLeadingComments: () => copyLeadingComments, + copyProperties: () => copyProperties, + copyTrailingAsLeadingComments: () => copyTrailingAsLeadingComments, + copyTrailingComments: () => copyTrailingComments, + couldStartTrivia: () => couldStartTrivia, + countWhere: () => countWhere, + createAbstractBuilder: () => createAbstractBuilder, + createAccessorPropertyBackingField: () => createAccessorPropertyBackingField, + createAccessorPropertyGetRedirector: () => createAccessorPropertyGetRedirector, + createAccessorPropertySetRedirector: () => createAccessorPropertySetRedirector, + createBaseNodeFactory: () => createBaseNodeFactory, + createBinaryExpressionTrampoline: () => createBinaryExpressionTrampoline, + createBindingHelper: () => createBindingHelper, + createBuildInfo: () => createBuildInfo, + createBuilderProgram: () => createBuilderProgram, + createBuilderProgramUsingProgramBuildInfo: () => createBuilderProgramUsingProgramBuildInfo, + createBuilderStatusReporter: () => createBuilderStatusReporter, + createCacheWithRedirects: () => createCacheWithRedirects, + createCacheableExportInfoMap: () => createCacheableExportInfoMap, + createCachedDirectoryStructureHost: () => createCachedDirectoryStructureHost, + createClassNamedEvaluationHelperBlock: () => createClassNamedEvaluationHelperBlock, + createClassThisAssignmentBlock: () => createClassThisAssignmentBlock, + createClassifier: () => createClassifier, + createCommentDirectivesMap: () => createCommentDirectivesMap, + createCompilerDiagnostic: () => createCompilerDiagnostic, + createCompilerDiagnosticForInvalidCustomType: () => createCompilerDiagnosticForInvalidCustomType, + createCompilerDiagnosticFromMessageChain: () => createCompilerDiagnosticFromMessageChain, + createCompilerHost: () => createCompilerHost, + createCompilerHostFromProgramHost: () => createCompilerHostFromProgramHost, + createCompilerHostWorker: () => createCompilerHostWorker, + createDetachedDiagnostic: () => createDetachedDiagnostic, + createDiagnosticCollection: () => createDiagnosticCollection, + createDiagnosticForFileFromMessageChain: () => createDiagnosticForFileFromMessageChain, + createDiagnosticForNode: () => createDiagnosticForNode, + createDiagnosticForNodeArray: () => createDiagnosticForNodeArray, + createDiagnosticForNodeArrayFromMessageChain: () => createDiagnosticForNodeArrayFromMessageChain, + createDiagnosticForNodeFromMessageChain: () => createDiagnosticForNodeFromMessageChain, + createDiagnosticForNodeInSourceFile: () => createDiagnosticForNodeInSourceFile, + createDiagnosticForRange: () => createDiagnosticForRange, + createDiagnosticMessageChainFromDiagnostic: () => createDiagnosticMessageChainFromDiagnostic, + createDiagnosticReporter: () => createDiagnosticReporter, + createDocumentPositionMapper: () => createDocumentPositionMapper, + createDocumentRegistry: () => createDocumentRegistry, + createDocumentRegistryInternal: () => createDocumentRegistryInternal, + createEmitAndSemanticDiagnosticsBuilderProgram: () => createEmitAndSemanticDiagnosticsBuilderProgram, + createEmitHelperFactory: () => createEmitHelperFactory, + createEmptyExports: () => createEmptyExports, + createExpressionForJsxElement: () => createExpressionForJsxElement, + createExpressionForJsxFragment: () => createExpressionForJsxFragment, + createExpressionForObjectLiteralElementLike: () => createExpressionForObjectLiteralElementLike, + createExpressionForPropertyName: () => createExpressionForPropertyName, + createExpressionFromEntityName: () => createExpressionFromEntityName, + createExternalHelpersImportDeclarationIfNeeded: () => createExternalHelpersImportDeclarationIfNeeded, + createFileDiagnostic: () => createFileDiagnostic, + createFileDiagnosticFromMessageChain: () => createFileDiagnosticFromMessageChain, + createForOfBindingStatement: () => createForOfBindingStatement, + createGetCanonicalFileName: () => createGetCanonicalFileName, + createGetSourceFile: () => createGetSourceFile, + createGetSymbolAccessibilityDiagnosticForNode: () => createGetSymbolAccessibilityDiagnosticForNode, + createGetSymbolAccessibilityDiagnosticForNodeName: () => createGetSymbolAccessibilityDiagnosticForNodeName, + createGetSymbolWalker: () => createGetSymbolWalker, + createIncrementalCompilerHost: () => createIncrementalCompilerHost, + createIncrementalProgram: () => createIncrementalProgram, + createInputFiles: () => createInputFiles, + createInputFilesWithFilePaths: () => createInputFilesWithFilePaths, + createInputFilesWithFileTexts: () => createInputFilesWithFileTexts, + createJsxFactoryExpression: () => createJsxFactoryExpression, + createLanguageService: () => createLanguageService, + createLanguageServiceSourceFile: () => createLanguageServiceSourceFile, + createMemberAccessForPropertyName: () => createMemberAccessForPropertyName, + createModeAwareCache: () => createModeAwareCache, + createModeAwareCacheKey: () => createModeAwareCacheKey, + createModuleNotFoundChain: () => createModuleNotFoundChain, + createModuleResolutionCache: () => createModuleResolutionCache, + createModuleResolutionLoader: () => createModuleResolutionLoader, + createModuleResolutionLoaderUsingGlobalCache: () => createModuleResolutionLoaderUsingGlobalCache, + createModuleSpecifierResolutionHost: () => createModuleSpecifierResolutionHost, + createMultiMap: () => createMultiMap, + createNodeConverters: () => createNodeConverters, + createNodeFactory: () => createNodeFactory, + createOptionNameMap: () => createOptionNameMap, + createOverload: () => createOverload, + createPackageJsonImportFilter: () => createPackageJsonImportFilter, + createPackageJsonInfo: () => createPackageJsonInfo, + createParenthesizerRules: () => createParenthesizerRules, + createPatternMatcher: () => createPatternMatcher, + createPrependNodes: () => createPrependNodes, + createPrinter: () => createPrinter, + createPrinterWithDefaults: () => createPrinterWithDefaults, + createPrinterWithRemoveComments: () => createPrinterWithRemoveComments, + createPrinterWithRemoveCommentsNeverAsciiEscape: () => createPrinterWithRemoveCommentsNeverAsciiEscape, + createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => createPrinterWithRemoveCommentsOmitTrailingSemicolon, + createProgram: () => createProgram, + createProgramHost: () => createProgramHost, + createPropertyNameNodeForIdentifierOrLiteral: () => createPropertyNameNodeForIdentifierOrLiteral, + createQueue: () => createQueue, + createRange: () => createRange, + createRedirectedBuilderProgram: () => createRedirectedBuilderProgram, + createResolutionCache: () => createResolutionCache, + createRuntimeTypeSerializer: () => createRuntimeTypeSerializer, + createScanner: () => createScanner, + createSemanticDiagnosticsBuilderProgram: () => createSemanticDiagnosticsBuilderProgram, + createSet: () => createSet, + createSolutionBuilder: () => createSolutionBuilder, + createSolutionBuilderHost: () => createSolutionBuilderHost, + createSolutionBuilderWithWatch: () => createSolutionBuilderWithWatch, + createSolutionBuilderWithWatchHost: () => createSolutionBuilderWithWatchHost, + createSortedArray: () => createSortedArray, + createSourceFile: () => createSourceFile, + createSourceMapGenerator: () => createSourceMapGenerator, + createSourceMapSource: () => createSourceMapSource, + createSuperAccessVariableStatement: () => createSuperAccessVariableStatement, + createSymbolTable: () => createSymbolTable, + createSymlinkCache: () => createSymlinkCache, + createSystemWatchFunctions: () => createSystemWatchFunctions, + createTextChange: () => createTextChange, + createTextChangeFromStartLength: () => createTextChangeFromStartLength, + createTextChangeRange: () => createTextChangeRange, + createTextRangeFromNode: () => createTextRangeFromNode, + createTextRangeFromSpan: () => createTextRangeFromSpan, + createTextSpan: () => createTextSpan, + createTextSpanFromBounds: () => createTextSpanFromBounds, + createTextSpanFromNode: () => createTextSpanFromNode, + createTextSpanFromRange: () => createTextSpanFromRange, + createTextSpanFromStringLiteralLikeContent: () => createTextSpanFromStringLiteralLikeContent, + createTextWriter: () => createTextWriter, + createTokenRange: () => createTokenRange, + createTypeChecker: () => createTypeChecker, + createTypeReferenceDirectiveResolutionCache: () => createTypeReferenceDirectiveResolutionCache, + createTypeReferenceResolutionLoader: () => createTypeReferenceResolutionLoader, + createUnparsedSourceFile: () => createUnparsedSourceFile, + createWatchCompilerHost: () => createWatchCompilerHost2, + createWatchCompilerHostOfConfigFile: () => createWatchCompilerHostOfConfigFile, + createWatchCompilerHostOfFilesAndCompilerOptions: () => createWatchCompilerHostOfFilesAndCompilerOptions, + createWatchFactory: () => createWatchFactory, + createWatchHost: () => createWatchHost, + createWatchProgram: () => createWatchProgram, + createWatchStatusReporter: () => createWatchStatusReporter, + createWriteFileMeasuringIO: () => createWriteFileMeasuringIO, + declarationNameToString: () => declarationNameToString, + decodeMappings: () => decodeMappings, + decodedTextSpanIntersectsWith: () => decodedTextSpanIntersectsWith, + decorateHelper: () => decorateHelper, + deduplicate: () => deduplicate, + defaultIncludeSpec: () => defaultIncludeSpec, + defaultInitCompilerOptions: () => defaultInitCompilerOptions, + defaultMaximumTruncationLength: () => defaultMaximumTruncationLength, + detectSortCaseSensitivity: () => detectSortCaseSensitivity, + diagnosticCategoryName: () => diagnosticCategoryName, + diagnosticToString: () => diagnosticToString, + directoryProbablyExists: () => directoryProbablyExists, + directorySeparator: () => directorySeparator, + displayPart: () => displayPart, + displayPartsToString: () => displayPartsToString, + disposeEmitNodes: () => disposeEmitNodes, + disposeResourcesHelper: () => disposeResourcesHelper, + documentSpansEqual: () => documentSpansEqual, + dumpTracingLegend: () => dumpTracingLegend, + elementAt: () => elementAt, + elideNodes: () => elideNodes, + emitComments: () => emitComments, + emitDetachedComments: () => emitDetachedComments, + emitFiles: () => emitFiles, + emitFilesAndReportErrors: () => emitFilesAndReportErrors, + emitFilesAndReportErrorsAndGetExitStatus: () => emitFilesAndReportErrorsAndGetExitStatus, + emitModuleKindIsNonNodeESM: () => emitModuleKindIsNonNodeESM, + emitNewLineBeforeLeadingCommentOfPosition: () => emitNewLineBeforeLeadingCommentOfPosition, + emitNewLineBeforeLeadingComments: () => emitNewLineBeforeLeadingComments, + emitNewLineBeforeLeadingCommentsOfPosition: () => emitNewLineBeforeLeadingCommentsOfPosition, + emitSkippedWithNoDiagnostics: () => emitSkippedWithNoDiagnostics, + emitUsingBuildInfo: () => emitUsingBuildInfo, + emptyArray: () => emptyArray, + emptyFileSystemEntries: () => emptyFileSystemEntries, + emptyMap: () => emptyMap, + emptyOptions: () => emptyOptions, + emptySet: () => emptySet, + endsWith: () => endsWith, + ensurePathIsNonModuleName: () => ensurePathIsNonModuleName, + ensureScriptKind: () => ensureScriptKind, + ensureTrailingDirectorySeparator: () => ensureTrailingDirectorySeparator, + entityNameToString: () => entityNameToString, + enumerateInsertsAndDeletes: () => enumerateInsertsAndDeletes, + equalOwnProperties: () => equalOwnProperties, + equateStringsCaseInsensitive: () => equateStringsCaseInsensitive, + equateStringsCaseSensitive: () => equateStringsCaseSensitive, + equateValues: () => equateValues, + esDecorateHelper: () => esDecorateHelper, + escapeJsxAttributeString: () => escapeJsxAttributeString, + escapeLeadingUnderscores: () => escapeLeadingUnderscores, + escapeNonAsciiString: () => escapeNonAsciiString, + escapeSnippetText: () => escapeSnippetText, + escapeString: () => escapeString, + every: () => every, + expandPreOrPostfixIncrementOrDecrementExpression: () => expandPreOrPostfixIncrementOrDecrementExpression, + explainFiles: () => explainFiles, + explainIfFileIsRedirectAndImpliedFormat: () => explainIfFileIsRedirectAndImpliedFormat, + exportAssignmentIsAlias: () => exportAssignmentIsAlias, + exportStarHelper: () => exportStarHelper, + expressionResultIsUnused: () => expressionResultIsUnused, + extend: () => extend, + extendsHelper: () => extendsHelper, + extensionFromPath: () => extensionFromPath, + extensionIsTS: () => extensionIsTS, + extensionsNotSupportingExtensionlessResolution: () => extensionsNotSupportingExtensionlessResolution, + externalHelpersModuleNameText: () => externalHelpersModuleNameText, + factory: () => factory, + fileExtensionIs: () => fileExtensionIs, + fileExtensionIsOneOf: () => fileExtensionIsOneOf, + fileIncludeReasonToDiagnostics: () => fileIncludeReasonToDiagnostics, + fileShouldUseJavaScriptRequire: () => fileShouldUseJavaScriptRequire, + filter: () => filter, + filterMutate: () => filterMutate, + filterSemanticDiagnostics: () => filterSemanticDiagnostics, + find: () => find, + findAncestor: () => findAncestor, + findBestPatternMatch: () => findBestPatternMatch, + findChildOfKind: () => findChildOfKind, + findComputedPropertyNameCacheAssignment: () => findComputedPropertyNameCacheAssignment, + findConfigFile: () => findConfigFile, + findContainingList: () => findContainingList, + findDiagnosticForNode: () => findDiagnosticForNode, + findFirstNonJsxWhitespaceToken: () => findFirstNonJsxWhitespaceToken, + findIndex: () => findIndex, + findLast: () => findLast, + findLastIndex: () => findLastIndex, + findListItemInfo: () => findListItemInfo, + findMap: () => findMap, + findModifier: () => findModifier, + findNextToken: () => findNextToken, + findPackageJson: () => findPackageJson, + findPackageJsons: () => findPackageJsons, + findPrecedingMatchingToken: () => findPrecedingMatchingToken, + findPrecedingToken: () => findPrecedingToken, + findSuperStatementIndexPath: () => findSuperStatementIndexPath, + findTokenOnLeftOfPosition: () => findTokenOnLeftOfPosition, + findUseStrictPrologue: () => findUseStrictPrologue, + first: () => first, + firstDefined: () => firstDefined, + firstDefinedIterator: () => firstDefinedIterator, + firstIterator: () => firstIterator, + firstOrOnly: () => firstOrOnly, + firstOrUndefined: () => firstOrUndefined, + firstOrUndefinedIterator: () => firstOrUndefinedIterator, + fixupCompilerOptions: () => fixupCompilerOptions, + flatMap: () => flatMap, + flatMapIterator: () => flatMapIterator, + flatMapToMutable: () => flatMapToMutable, + flatten: () => flatten, + flattenCommaList: () => flattenCommaList, + flattenDestructuringAssignment: () => flattenDestructuringAssignment, + flattenDestructuringBinding: () => flattenDestructuringBinding, + flattenDiagnosticMessageText: () => flattenDiagnosticMessageText, + forEach: () => forEach, + forEachAncestor: () => forEachAncestor, + forEachAncestorDirectory: () => forEachAncestorDirectory, + forEachChild: () => forEachChild, + forEachChildRecursively: () => forEachChildRecursively, + forEachEmittedFile: () => forEachEmittedFile, + forEachEnclosingBlockScopeContainer: () => forEachEnclosingBlockScopeContainer, + forEachEntry: () => forEachEntry, + forEachExternalModuleToImportFrom: () => forEachExternalModuleToImportFrom, + forEachImportClauseDeclaration: () => forEachImportClauseDeclaration, + forEachKey: () => forEachKey, + forEachLeadingCommentRange: () => forEachLeadingCommentRange, + forEachNameInAccessChainWalkingLeft: () => forEachNameInAccessChainWalkingLeft, + forEachPropertyAssignment: () => forEachPropertyAssignment, + forEachResolvedProjectReference: () => forEachResolvedProjectReference, + forEachReturnStatement: () => forEachReturnStatement, + forEachRight: () => forEachRight, + forEachTrailingCommentRange: () => forEachTrailingCommentRange, + forEachTsConfigPropArray: () => forEachTsConfigPropArray, + forEachUnique: () => forEachUnique, + forEachYieldExpression: () => forEachYieldExpression, + forSomeAncestorDirectory: () => forSomeAncestorDirectory, + formatColorAndReset: () => formatColorAndReset, + formatDiagnostic: () => formatDiagnostic, + formatDiagnostics: () => formatDiagnostics, + formatDiagnosticsWithColorAndContext: () => formatDiagnosticsWithColorAndContext, + formatGeneratedName: () => formatGeneratedName, + formatGeneratedNamePart: () => formatGeneratedNamePart, + formatLocation: () => formatLocation, + formatMessage: () => formatMessage, + formatStringFromArgs: () => formatStringFromArgs, + formatting: () => ts_formatting_exports, + fullTripleSlashAMDReferencePathRegEx: () => fullTripleSlashAMDReferencePathRegEx, + fullTripleSlashReferencePathRegEx: () => fullTripleSlashReferencePathRegEx, + generateDjb2Hash: () => generateDjb2Hash, + generateTSConfig: () => generateTSConfig, + generatorHelper: () => generatorHelper, + getAdjustedReferenceLocation: () => getAdjustedReferenceLocation, + getAdjustedRenameLocation: () => getAdjustedRenameLocation, + getAliasDeclarationFromName: () => getAliasDeclarationFromName, + getAllAccessorDeclarations: () => getAllAccessorDeclarations, + getAllDecoratorsOfClass: () => getAllDecoratorsOfClass, + getAllDecoratorsOfClassElement: () => getAllDecoratorsOfClassElement, + getAllJSDocTags: () => getAllJSDocTags, + getAllJSDocTagsOfKind: () => getAllJSDocTagsOfKind, + getAllKeys: () => getAllKeys, + getAllProjectOutputs: () => getAllProjectOutputs, + getAllSuperTypeNodes: () => getAllSuperTypeNodes, + getAllUnscopedEmitHelpers: () => getAllUnscopedEmitHelpers, + getAllowJSCompilerOption: () => getAllowJSCompilerOption, + getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports, + getAncestor: () => getAncestor, + getAnyExtensionFromPath: () => getAnyExtensionFromPath, + getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled, + getAssignedExpandoInitializer: () => getAssignedExpandoInitializer, + getAssignedName: () => getAssignedName, + getAssignedNameOfIdentifier: () => getAssignedNameOfIdentifier, + getAssignmentDeclarationKind: () => getAssignmentDeclarationKind, + getAssignmentDeclarationPropertyAccessKind: () => getAssignmentDeclarationPropertyAccessKind, + getAssignmentTargetKind: () => getAssignmentTargetKind, + getAutomaticTypeDirectiveNames: () => getAutomaticTypeDirectiveNames, + getBaseFileName: () => getBaseFileName, + getBinaryOperatorPrecedence: () => getBinaryOperatorPrecedence, + getBuildInfo: () => getBuildInfo, + getBuildInfoFileVersionMap: () => getBuildInfoFileVersionMap, + getBuildInfoText: () => getBuildInfoText, + getBuildOrderFromAnyBuildOrder: () => getBuildOrderFromAnyBuildOrder, + getBuilderCreationParameters: () => getBuilderCreationParameters, + getBuilderFileEmit: () => getBuilderFileEmit, + getCheckFlags: () => getCheckFlags, + getClassExtendsHeritageElement: () => getClassExtendsHeritageElement, + getClassLikeDeclarationOfSymbol: () => getClassLikeDeclarationOfSymbol, + getCombinedLocalAndExportSymbolFlags: () => getCombinedLocalAndExportSymbolFlags, + getCombinedModifierFlags: () => getCombinedModifierFlags, + getCombinedNodeFlags: () => getCombinedNodeFlags, + getCombinedNodeFlagsAlwaysIncludeJSDoc: () => getCombinedNodeFlagsAlwaysIncludeJSDoc, + getCommentRange: () => getCommentRange, + getCommonSourceDirectory: () => getCommonSourceDirectory, + getCommonSourceDirectoryOfConfig: () => getCommonSourceDirectoryOfConfig, + getCompilerOptionValue: () => getCompilerOptionValue, + getCompilerOptionsDiffValue: () => getCompilerOptionsDiffValue, + getConditions: () => getConditions, + getConfigFileParsingDiagnostics: () => getConfigFileParsingDiagnostics, + getConstantValue: () => getConstantValue, + getContainerFlags: () => getContainerFlags, + getContainerNode: () => getContainerNode, + getContainingClass: () => getContainingClass, + getContainingClassExcludingClassDecorators: () => getContainingClassExcludingClassDecorators, + getContainingClassStaticBlock: () => getContainingClassStaticBlock, + getContainingFunction: () => getContainingFunction, + getContainingFunctionDeclaration: () => getContainingFunctionDeclaration, + getContainingFunctionOrClassStaticBlock: () => getContainingFunctionOrClassStaticBlock, + getContainingNodeArray: () => getContainingNodeArray, + getContainingObjectLiteralElement: () => getContainingObjectLiteralElement, + getContextualTypeFromParent: () => getContextualTypeFromParent, + getContextualTypeFromParentOrAncestorTypeNode: () => getContextualTypeFromParentOrAncestorTypeNode, + getCurrentTime: () => getCurrentTime, + getDeclarationDiagnostics: () => getDeclarationDiagnostics, + getDeclarationEmitExtensionForPath: () => getDeclarationEmitExtensionForPath, + getDeclarationEmitOutputFilePath: () => getDeclarationEmitOutputFilePath, + getDeclarationEmitOutputFilePathWorker: () => getDeclarationEmitOutputFilePathWorker, + getDeclarationFromName: () => getDeclarationFromName, + getDeclarationModifierFlagsFromSymbol: () => getDeclarationModifierFlagsFromSymbol, + getDeclarationOfKind: () => getDeclarationOfKind, + getDeclarationsOfKind: () => getDeclarationsOfKind, + getDeclaredExpandoInitializer: () => getDeclaredExpandoInitializer, + getDecorators: () => getDecorators, + getDefaultCompilerOptions: () => getDefaultCompilerOptions2, + getDefaultExportInfoWorker: () => getDefaultExportInfoWorker, + getDefaultFormatCodeSettings: () => getDefaultFormatCodeSettings, + getDefaultLibFileName: () => getDefaultLibFileName, + getDefaultLibFilePath: () => getDefaultLibFilePath, + getDefaultLikeExportInfo: () => getDefaultLikeExportInfo, + getDiagnosticText: () => getDiagnosticText, + getDiagnosticsWithinSpan: () => getDiagnosticsWithinSpan, + getDirectoryPath: () => getDirectoryPath, + getDirectoryToWatchFailedLookupLocation: () => getDirectoryToWatchFailedLookupLocation, + getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => getDirectoryToWatchFailedLookupLocationFromTypeRoot, + getDocumentPositionMapper: () => getDocumentPositionMapper, + getESModuleInterop: () => getESModuleInterop, + getEditsForFileRename: () => getEditsForFileRename, + getEffectiveBaseTypeNode: () => getEffectiveBaseTypeNode, + getEffectiveConstraintOfTypeParameter: () => getEffectiveConstraintOfTypeParameter, + getEffectiveContainerForJSDocTemplateTag: () => getEffectiveContainerForJSDocTemplateTag, + getEffectiveImplementsTypeNodes: () => getEffectiveImplementsTypeNodes, + getEffectiveInitializer: () => getEffectiveInitializer, + getEffectiveJSDocHost: () => getEffectiveJSDocHost, + getEffectiveModifierFlags: () => getEffectiveModifierFlags, + getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => getEffectiveModifierFlagsAlwaysIncludeJSDoc, + getEffectiveModifierFlagsNoCache: () => getEffectiveModifierFlagsNoCache, + getEffectiveReturnTypeNode: () => getEffectiveReturnTypeNode, + getEffectiveSetAccessorTypeAnnotationNode: () => getEffectiveSetAccessorTypeAnnotationNode, + getEffectiveTypeAnnotationNode: () => getEffectiveTypeAnnotationNode, + getEffectiveTypeParameterDeclarations: () => getEffectiveTypeParameterDeclarations, + getEffectiveTypeRoots: () => getEffectiveTypeRoots, + getElementOrPropertyAccessArgumentExpressionOrName: () => getElementOrPropertyAccessArgumentExpressionOrName, + getElementOrPropertyAccessName: () => getElementOrPropertyAccessName, + getElementsOfBindingOrAssignmentPattern: () => getElementsOfBindingOrAssignmentPattern, + getEmitDeclarations: () => getEmitDeclarations, + getEmitFlags: () => getEmitFlags, + getEmitHelpers: () => getEmitHelpers, + getEmitModuleDetectionKind: () => getEmitModuleDetectionKind, + getEmitModuleKind: () => getEmitModuleKind, + getEmitModuleResolutionKind: () => getEmitModuleResolutionKind, + getEmitScriptTarget: () => getEmitScriptTarget, + getEmitStandardClassFields: () => getEmitStandardClassFields, + getEnclosingBlockScopeContainer: () => getEnclosingBlockScopeContainer, + getEnclosingContainer: () => getEnclosingContainer, + getEncodedSemanticClassifications: () => getEncodedSemanticClassifications, + getEncodedSyntacticClassifications: () => getEncodedSyntacticClassifications, + getEndLinePosition: () => getEndLinePosition, + getEntityNameFromTypeNode: () => getEntityNameFromTypeNode, + getEntrypointsFromPackageJsonInfo: () => getEntrypointsFromPackageJsonInfo, + getErrorCountForSummary: () => getErrorCountForSummary, + getErrorSpanForNode: () => getErrorSpanForNode, + getErrorSummaryText: () => getErrorSummaryText, + getEscapedTextOfIdentifierOrLiteral: () => getEscapedTextOfIdentifierOrLiteral, + getEscapedTextOfJsxAttributeName: () => getEscapedTextOfJsxAttributeName, + getEscapedTextOfJsxNamespacedName: () => getEscapedTextOfJsxNamespacedName, + getExpandoInitializer: () => getExpandoInitializer, + getExportAssignmentExpression: () => getExportAssignmentExpression, + getExportInfoMap: () => getExportInfoMap, + getExportNeedsImportStarHelper: () => getExportNeedsImportStarHelper, + getExpressionAssociativity: () => getExpressionAssociativity, + getExpressionPrecedence: () => getExpressionPrecedence, + getExternalHelpersModuleName: () => getExternalHelpersModuleName, + getExternalModuleImportEqualsDeclarationExpression: () => getExternalModuleImportEqualsDeclarationExpression, + getExternalModuleName: () => getExternalModuleName, + getExternalModuleNameFromDeclaration: () => getExternalModuleNameFromDeclaration, + getExternalModuleNameFromPath: () => getExternalModuleNameFromPath, + getExternalModuleNameLiteral: () => getExternalModuleNameLiteral, + getExternalModuleRequireArgument: () => getExternalModuleRequireArgument, + getFallbackOptions: () => getFallbackOptions, + getFileEmitOutput: () => getFileEmitOutput, + getFileMatcherPatterns: () => getFileMatcherPatterns, + getFileNamesFromConfigSpecs: () => getFileNamesFromConfigSpecs, + getFileWatcherEventKind: () => getFileWatcherEventKind, + getFilesInErrorForSummary: () => getFilesInErrorForSummary, + getFirstConstructorWithBody: () => getFirstConstructorWithBody, + getFirstIdentifier: () => getFirstIdentifier, + getFirstNonSpaceCharacterPosition: () => getFirstNonSpaceCharacterPosition, + getFirstProjectOutput: () => getFirstProjectOutput, + getFixableErrorSpanExpression: () => getFixableErrorSpanExpression, + getFormatCodeSettingsForWriting: () => getFormatCodeSettingsForWriting, + getFullWidth: () => getFullWidth, + getFunctionFlags: () => getFunctionFlags, + getHeritageClause: () => getHeritageClause, + getHostSignatureFromJSDoc: () => getHostSignatureFromJSDoc, + getIdentifierAutoGenerate: () => getIdentifierAutoGenerate, + getIdentifierGeneratedImportReference: () => getIdentifierGeneratedImportReference, + getIdentifierTypeArguments: () => getIdentifierTypeArguments, + getImmediatelyInvokedFunctionExpression: () => getImmediatelyInvokedFunctionExpression, + getImpliedNodeFormatForFile: () => getImpliedNodeFormatForFile, + getImpliedNodeFormatForFileWorker: () => getImpliedNodeFormatForFileWorker, + getImportNeedsImportDefaultHelper: () => getImportNeedsImportDefaultHelper, + getImportNeedsImportStarHelper: () => getImportNeedsImportStarHelper, + getIndentSize: () => getIndentSize, + getIndentString: () => getIndentString, + getInferredLibraryNameResolveFrom: () => getInferredLibraryNameResolveFrom, + getInitializedVariables: () => getInitializedVariables, + getInitializerOfBinaryExpression: () => getInitializerOfBinaryExpression, + getInitializerOfBindingOrAssignmentElement: () => getInitializerOfBindingOrAssignmentElement, + getInterfaceBaseTypeNodes: () => getInterfaceBaseTypeNodes, + getInternalEmitFlags: () => getInternalEmitFlags, + getInvokedExpression: () => getInvokedExpression, + getIsolatedModules: () => getIsolatedModules, + getJSDocAugmentsTag: () => getJSDocAugmentsTag, + getJSDocClassTag: () => getJSDocClassTag, + getJSDocCommentRanges: () => getJSDocCommentRanges, + getJSDocCommentsAndTags: () => getJSDocCommentsAndTags, + getJSDocDeprecatedTag: () => getJSDocDeprecatedTag, + getJSDocDeprecatedTagNoCache: () => getJSDocDeprecatedTagNoCache, + getJSDocEnumTag: () => getJSDocEnumTag, + getJSDocHost: () => getJSDocHost, + getJSDocImplementsTags: () => getJSDocImplementsTags, + getJSDocOverrideTagNoCache: () => getJSDocOverrideTagNoCache, + getJSDocParameterTags: () => getJSDocParameterTags, + getJSDocParameterTagsNoCache: () => getJSDocParameterTagsNoCache, + getJSDocPrivateTag: () => getJSDocPrivateTag, + getJSDocPrivateTagNoCache: () => getJSDocPrivateTagNoCache, + getJSDocProtectedTag: () => getJSDocProtectedTag, + getJSDocProtectedTagNoCache: () => getJSDocProtectedTagNoCache, + getJSDocPublicTag: () => getJSDocPublicTag, + getJSDocPublicTagNoCache: () => getJSDocPublicTagNoCache, + getJSDocReadonlyTag: () => getJSDocReadonlyTag, + getJSDocReadonlyTagNoCache: () => getJSDocReadonlyTagNoCache, + getJSDocReturnTag: () => getJSDocReturnTag, + getJSDocReturnType: () => getJSDocReturnType, + getJSDocRoot: () => getJSDocRoot, + getJSDocSatisfiesExpressionType: () => getJSDocSatisfiesExpressionType, + getJSDocSatisfiesTag: () => getJSDocSatisfiesTag, + getJSDocTags: () => getJSDocTags, + getJSDocTagsNoCache: () => getJSDocTagsNoCache, + getJSDocTemplateTag: () => getJSDocTemplateTag, + getJSDocThisTag: () => getJSDocThisTag, + getJSDocType: () => getJSDocType, + getJSDocTypeAliasName: () => getJSDocTypeAliasName, + getJSDocTypeAssertionType: () => getJSDocTypeAssertionType, + getJSDocTypeParameterDeclarations: () => getJSDocTypeParameterDeclarations, + getJSDocTypeParameterTags: () => getJSDocTypeParameterTags, + getJSDocTypeParameterTagsNoCache: () => getJSDocTypeParameterTagsNoCache, + getJSDocTypeTag: () => getJSDocTypeTag, + getJSXImplicitImportBase: () => getJSXImplicitImportBase, + getJSXRuntimeImport: () => getJSXRuntimeImport, + getJSXTransformEnabled: () => getJSXTransformEnabled, + getKeyForCompilerOptions: () => getKeyForCompilerOptions, + getLanguageVariant: () => getLanguageVariant, + getLastChild: () => getLastChild, + getLeadingCommentRanges: () => getLeadingCommentRanges, + getLeadingCommentRangesOfNode: () => getLeadingCommentRangesOfNode, + getLeftmostAccessExpression: () => getLeftmostAccessExpression, + getLeftmostExpression: () => getLeftmostExpression, + getLibraryNameFromLibFileName: () => getLibraryNameFromLibFileName, + getLineAndCharacterOfPosition: () => getLineAndCharacterOfPosition, + getLineInfo: () => getLineInfo, + getLineOfLocalPosition: () => getLineOfLocalPosition, + getLineOfLocalPositionFromLineMap: () => getLineOfLocalPositionFromLineMap, + getLineStartPositionForPosition: () => getLineStartPositionForPosition, + getLineStarts: () => getLineStarts, + getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => getLinesBetweenPositionAndNextNonWhitespaceCharacter, + getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter, + getLinesBetweenPositions: () => getLinesBetweenPositions, + getLinesBetweenRangeEndAndRangeStart: () => getLinesBetweenRangeEndAndRangeStart, + getLinesBetweenRangeEndPositions: () => getLinesBetweenRangeEndPositions, + getLiteralText: () => getLiteralText, + getLocalNameForExternalImport: () => getLocalNameForExternalImport, + getLocalSymbolForExportDefault: () => getLocalSymbolForExportDefault, + getLocaleSpecificMessage: () => getLocaleSpecificMessage, + getLocaleTimeString: () => getLocaleTimeString, + getMappedContextSpan: () => getMappedContextSpan, + getMappedDocumentSpan: () => getMappedDocumentSpan, + getMappedLocation: () => getMappedLocation, + getMatchedFileSpec: () => getMatchedFileSpec, + getMatchedIncludeSpec: () => getMatchedIncludeSpec, + getMeaningFromDeclaration: () => getMeaningFromDeclaration, + getMeaningFromLocation: () => getMeaningFromLocation, + getMembersOfDeclaration: () => getMembersOfDeclaration, + getModeForFileReference: () => getModeForFileReference, + getModeForResolutionAtIndex: () => getModeForResolutionAtIndex, + getModeForUsageLocation: () => getModeForUsageLocation, + getModifiedTime: () => getModifiedTime, + getModifiers: () => getModifiers, + getModuleInstanceState: () => getModuleInstanceState, + getModuleNameStringLiteralAt: () => getModuleNameStringLiteralAt, + getModuleSpecifierEndingPreference: () => getModuleSpecifierEndingPreference, + getModuleSpecifierResolverHost: () => getModuleSpecifierResolverHost, + getNameForExportedSymbol: () => getNameForExportedSymbol, getNameFromIndexInfo: () => getNameFromIndexInfo, getNameFromPropertyName: () => getNameFromPropertyName, getNameOfAccessExpression: () => getNameOfAccessExpression, @@ -172744,13 +187084,11 @@ ${options.prefix}` : "\n" : options.prefix getRenameLocation: () => getRenameLocation, getReplacementSpanForContextToken: () => getReplacementSpanForContextToken, getResolutionDiagnostic: () => getResolutionDiagnostic, - getResolutionModeOverrideForClause: () => getResolutionModeOverrideForClause, + getResolutionModeOverride: () => getResolutionModeOverride, getResolveJsonModule: () => getResolveJsonModule, getResolvePackageJsonExports: () => getResolvePackageJsonExports, getResolvePackageJsonImports: () => getResolvePackageJsonImports, getResolvedExternalModuleName: () => getResolvedExternalModuleName, - getResolvedModule: () => getResolvedModule, - getResolvedTypeReferenceDirective: () => getResolvedTypeReferenceDirective, getRestIndicatorOfBindingOrAssignmentElement: () => getRestIndicatorOfBindingOrAssignmentElement, getRestParameterElementType: () => getRestParameterElementType, getRightMostAssignedExpression: () => getRightMostAssignedExpression, @@ -172878,6 +187216,7 @@ ${options.prefix}` : "\n" : options.prefix hasPropertyAccessExpressionWithName: () => hasPropertyAccessExpressionWithName, hasQuestionToken: () => hasQuestionToken, hasRecordedExternalHelpers: () => hasRecordedExternalHelpers, + hasResolutionModeOverride: () => hasResolutionModeOverride, hasRestParameter: () => hasRestParameter, hasScopeMarker: () => hasScopeMarker, hasStaticModifier: () => hasStaticModifier, @@ -172951,7 +187290,6 @@ ${options.prefix}` : "\n" : options.prefix isAssertClause: () => isAssertClause, isAssertEntry: () => isAssertEntry, isAssertionExpression: () => isAssertionExpression, - isAssertionKey: () => isAssertionKey, isAssertsKeyword: () => isAssertsKeyword, isAssignmentDeclaration: () => isAssignmentDeclaration, isAssignmentExpression: () => isAssignmentExpression, @@ -172992,6 +187330,7 @@ ${options.prefix}` : "\n" : options.prefix isCallExpression: () => isCallExpression, isCallExpressionTarget: () => isCallExpressionTarget, isCallLikeExpression: () => isCallLikeExpression, + isCallLikeOrFunctionLikeExpression: () => isCallLikeOrFunctionLikeExpression, isCallOrNewExpression: () => isCallOrNewExpression, isCallOrNewExpressionTarget: () => isCallOrNewExpressionTarget, isCallSignatureDeclaration: () => isCallSignatureDeclaration, @@ -173009,6 +187348,7 @@ ${options.prefix}` : "\n" : options.prefix isClassDeclaration: () => isClassDeclaration, isClassElement: () => isClassElement, isClassExpression: () => isClassExpression, + isClassInstanceProperty: () => isClassInstanceProperty, isClassLike: () => isClassLike, isClassMemberModifier: () => isClassMemberModifier, isClassNamedEvaluationHelperBlock: () => isClassNamedEvaluationHelperBlock, @@ -173087,6 +187427,7 @@ ${options.prefix}` : "\n" : options.prefix isExclamationToken: () => isExclamationToken, isExcludedFile: () => isExcludedFile, isExclusivelyTypeOnlyImportOrExport: () => isExclusivelyTypeOnlyImportOrExport, + isExpandoPropertyDeclaration: () => isExpandoPropertyDeclaration, isExportAssignment: () => isExportAssignment, isExportDeclaration: () => isExportDeclaration, isExportModifier: () => isExportModifier, @@ -173158,6 +187499,9 @@ ${options.prefix}` : "\n" : options.prefix isIfStatement: () => isIfStatement, isIgnoredFileFromWildCardWatching: () => isIgnoredFileFromWildCardWatching, isImplicitGlob: () => isImplicitGlob, + isImportAttribute: () => isImportAttribute, + isImportAttributeName: () => isImportAttributeName, + isImportAttributes: () => isImportAttributes, isImportCall: () => isImportCall, isImportClause: () => isImportClause, isImportDeclaration: () => isImportDeclaration, @@ -173171,6 +187515,7 @@ ${options.prefix}` : "\n" : options.prefix isImportTypeNode: () => isImportTypeNode, isImportableFile: () => isImportableFile, isInComment: () => isInComment, + isInCompoundLikeAssignment: () => isInCompoundLikeAssignment, isInExpressionContext: () => isInExpressionContext, isInJSDoc: () => isInJSDoc, isInJSFile: () => isInJSFile, @@ -173194,6 +187539,7 @@ ${options.prefix}` : "\n" : options.prefix isInsideJsxElementOrAttribute: () => isInsideJsxElementOrAttribute, isInsideNodeModules: () => isInsideNodeModules, isInsideTemplateLiteral: () => isInsideTemplateLiteral, + isInstanceOfExpression: () => isInstanceOfExpression, isInstantiatedModule: () => isInstantiatedModule, isInterfaceDeclaration: () => isInterfaceDeclaration, isInternalDeclaration: () => isInternalDeclaration, @@ -173348,7 +187694,6 @@ ${options.prefix}` : "\n" : options.prefix isNamespaceReexportDeclaration: () => isNamespaceReexportDeclaration, isNewExpression: () => isNewExpression, isNewExpressionTarget: () => isNewExpressionTarget, - isNightly: () => isNightly, isNoSubstitutionTemplateLiteral: () => isNoSubstitutionTemplateLiteral, isNode: () => isNode, isNodeArray: () => isNodeArray, @@ -173452,6 +187797,7 @@ ${options.prefix}` : "\n" : options.prefix isReturnStatement: () => isReturnStatement, isReturnStatementWithFixablePromiseHandler: () => isReturnStatementWithFixablePromiseHandler, isRightSideOfAccessExpression: () => isRightSideOfAccessExpression, + isRightSideOfInstanceofExpression: () => isRightSideOfInstanceofExpression, isRightSideOfPropertyAccess: () => isRightSideOfPropertyAccess, isRightSideOfQualifiedName: () => isRightSideOfQualifiedName, isRightSideOfQualifiedNameOrPropertyAccess: () => isRightSideOfQualifiedNameOrPropertyAccess, @@ -173464,6 +187810,7 @@ ${options.prefix}` : "\n" : options.prefix isSetAccessor: () => isSetAccessor, isSetAccessorDeclaration: () => isSetAccessorDeclaration, isShebangTrivia: () => isShebangTrivia, + isShiftOperatorOrHigher: () => isShiftOperatorOrHigher, isShorthandAmbientModuleSymbol: () => isShorthandAmbientModuleSymbol, isShorthandPropertyAssignment: () => isShorthandPropertyAssignment, isSignedNumericLiteral: () => isSignedNumericLiteral, @@ -173702,8 +188049,6 @@ ${options.prefix}` : "\n" : options.prefix outFile: () => outFile, packageIdToPackageName: () => packageIdToPackageName, packageIdToString: () => packageIdToString, - padLeft: () => padLeft, - padRight: () => padRight, paramHelper: () => paramHelper, parameterIsThisKeyword: () => parameterIsThisKeyword, parameterNamePart: () => parameterNamePart, @@ -173777,7 +188122,6 @@ ${options.prefix}` : "\n" : options.prefix readJson: () => readJson, readJsonConfigFile: () => readJsonConfigFile, readJsonOrUndefined: () => readJsonOrUndefined, - realizeDiagnostics: () => realizeDiagnostics, reduceEachLeadingCommentRange: () => reduceEachLeadingCommentRange, reduceEachTrailingCommentRange: () => reduceEachTrailingCommentRange, reduceLeft: () => reduceLeft, @@ -173826,7 +188170,7 @@ ${options.prefix}` : "\n" : options.prefix screenStartingMessageCodes: () => screenStartingMessageCodes, semanticDiagnosticsOptionDeclarations: () => semanticDiagnosticsOptionDeclarations, serializeCompilerOptions: () => serializeCompilerOptions, - server: () => ts_server_exports, + server: () => ts_server_exports4, servicesVersion: () => servicesVersion, setCommentRange: () => setCommentRange, setConfigFileInOptions: () => setConfigFileInOptions, @@ -173847,8 +188191,6 @@ ${options.prefix}` : "\n" : options.prefix setParent: () => setParent, setParentRecursive: () => setParentRecursive, setPrivateIdentifier: () => setPrivateIdentifier, - setResolvedModule: () => setResolvedModule, - setResolvedTypeReferenceDirective: () => setResolvedTypeReferenceDirective, setSnippetElement: () => setSnippetElement, setSourceMapRange: () => setSourceMapRange, setStackTraceLimit: () => setStackTraceLimit, @@ -173910,7 +188252,6 @@ ${options.prefix}` : "\n" : options.prefix startsWithDirectory: () => startsWithDirectory, startsWithUnderscore: () => startsWithUnderscore, startsWithUseStrict: () => startsWithUseStrict, - stringContains: () => stringContains, stringContainsAt: () => stringContainsAt, stringToToken: () => stringToToken, stripQuotes: () => stripQuotes, @@ -173997,9 +188338,6 @@ ${options.prefix}` : "\n" : options.prefix transpile: () => transpile, transpileModule: () => transpileModule, transpileOptionValueCompilerOptions: () => transpileOptionValueCompilerOptions, - trimString: () => trimString, - trimStringEnd: () => trimStringEnd, - trimStringStart: () => trimStringStart, tryAddToSet: () => tryAddToSet, tryAndIgnoreErrors: () => tryAndIgnoreErrors, tryCast: () => tryCast, @@ -174079,24 +188417,24 @@ ${options.prefix}` : "\n" : options.prefix writeCommentRange: () => writeCommentRange, writeFile: () => writeFile, writeFileEnsuringDirectories: () => writeFileEnsuringDirectories, - zipToModeAwareCache: () => zipToModeAwareCache, zipWith: () => zipWith }); - var init_ts6 = __esm({ + var init_ts8 = __esm({ "src/typescript/_namespaces/ts.ts"() { "use strict"; init_ts2(); init_ts3(); init_ts4(); - init_ts5(); + init_ts7(); + init_ts_server4(); } }); // src/typescript/typescript.ts var require_typescript = __commonJS({ "src/typescript/typescript.ts"(exports, module2) { - init_ts6(); - init_ts6(); + init_ts8(); + init_ts8(); if (typeof console !== "undefined") { Debug.loggingHost = { log(level, s) { @@ -174113,7 +188451,7 @@ ${options.prefix}` : "\n" : options.prefix } }; } - module2.exports = ts_exports2; + module2.exports = ts_exports3; } }); return require_typescript(); diff --git a/node_modules/typescript/lib/typingsInstaller.js b/node_modules/typescript/lib/typingsInstaller.js index e765ab8..1cfedae 100644 --- a/node_modules/typescript/lib/typingsInstaller.js +++ b/node_modules/typescript/lib/typingsInstaller.js @@ -53,8 +53,8 @@ var fs = __toESM(require("fs")); var path = __toESM(require("path")); // src/compiler/corePublic.ts -var versionMajorMinor = "5.2"; -var version = "5.2.2"; +var versionMajorMinor = "5.3"; +var version = "5.3.3"; // src/compiler/core.ts var emptyArray = []; @@ -569,10 +569,7 @@ function getStringComparer(ignoreCase) { return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive; } var createUIStringComparer = (() => { - let defaultComparer; - let enUSComparer; - const stringComparerFactory = getStringComparerFactory(); - return createStringComparer; + return createIntlCollatorStringComparer; function compareWithCallback(a, b, comparer) { if (a === b) return 0 /* EqualTo */; @@ -587,41 +584,6 @@ var createUIStringComparer = (() => { const comparer = new Intl.Collator(locale, { usage: "sort", sensitivity: "variant" }).compare; return (a, b) => compareWithCallback(a, b, comparer); } - function createLocaleCompareStringComparer(locale) { - if (locale !== void 0) - return createFallbackStringComparer(); - return (a, b) => compareWithCallback(a, b, compareStrings); - function compareStrings(a, b) { - return a.localeCompare(b); - } - } - function createFallbackStringComparer() { - return (a, b) => compareWithCallback(a, b, compareDictionaryOrder); - function compareDictionaryOrder(a, b) { - return compareStrings(a.toUpperCase(), b.toUpperCase()) || compareStrings(a, b); - } - function compareStrings(a, b) { - return a < b ? -1 /* LessThan */ : a > b ? 1 /* GreaterThan */ : 0 /* EqualTo */; - } - } - function getStringComparerFactory() { - if (typeof Intl === "object" && typeof Intl.Collator === "function") { - return createIntlCollatorStringComparer; - } - if (typeof String.prototype.localeCompare === "function" && typeof String.prototype.toLocaleUpperCase === "function" && "a".localeCompare("B") < 0) { - return createLocaleCompareStringComparer; - } - return createFallbackStringComparer; - } - function createStringComparer(locale) { - if (locale === void 0) { - return defaultComparer || (defaultComparer = stringComparerFactory(locale)); - } else if (locale === "en-US") { - return enUSComparer || (enUSComparer = stringComparerFactory(locale)); - } else { - return stringComparerFactory(locale); - } - } })(); function getSpellingSuggestion(name, candidates, getName) { const maximumLengthDifference = Math.max(2, Math.floor(name.length * 0.34)); @@ -693,9 +655,6 @@ function endsWith(str, suffix) { const expectedPos = str.length - suffix.length; return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; } -function stringContains(str, substring) { - return str.indexOf(substring) !== -1; -} function removeMinAndVersionNumbers(fileName) { let end = fileName.length; for (let pos = end - 1; pos > 0; pos--) { @@ -825,21 +784,6 @@ function enumerateInsertsAndDeletes(newItems, oldItems, comparer, inserted, dele } return hasChanges; } -function padLeft(s, length2, padString = " ") { - return length2 <= s.length ? s : padString.repeat(length2 - s.length) + s; -} -var trimString = !!String.prototype.trim ? (s) => s.trim() : (s) => trimStringEnd(trimStringStart(s)); -var trimStringEnd = !!String.prototype.trimEnd ? (s) => s.trimEnd() : trimEndImpl; -var trimStringStart = !!String.prototype.trimStart ? (s) => s.trimStart() : (s) => s.replace(/^\s+/g, ""); -function trimEndImpl(s) { - let end = s.length - 1; - while (end >= 0) { - if (!isWhiteSpaceLike(s.charCodeAt(end))) - break; - end--; - } - return s.slice(0, end + 1); -} function isNodeLikeSystem() { return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object"; } @@ -1280,17 +1224,21 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${flowHeader}${remainingFlags ? ` (${formatFlowFlags(remainingFlags)})` : ""}`; } }, - __debugFlowFlags: { get() { - return formatEnum( - this.flags, - FlowFlags, - /*isFlags*/ - true - ); - } }, - __debugToString: { value() { - return formatControlFlowGraph(this); - } } + __debugFlowFlags: { + get() { + return formatEnum( + this.flags, + FlowFlags, + /*isFlags*/ + true + ); + } + }, + __debugToString: { + value() { + return formatControlFlowGraph(this); + } + } }); } } @@ -1349,25 +1297,31 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${symbolHeader} '${symbolName(this)}'${remainingSymbolFlags ? ` (${formatSymbolFlags(remainingSymbolFlags)})` : ""}`; } }, - __debugFlags: { get() { - return formatSymbolFlags(this.flags); - } } + __debugFlags: { + get() { + return formatSymbolFlags(this.flags); + } + } }); Object.defineProperties(objectAllocator.getTypeConstructor().prototype, { // for use with vscode-js-debug's new customDescriptionGenerator in launch.json __tsDebuggerDisplay: { value() { - const typeHeader = this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}` : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type"; + const typeHeader = this.flags & 67359327 /* Intrinsic */ ? `IntrinsicType ${this.intrinsicName}${this.debugIntrinsicName ? ` (${this.debugIntrinsicName})` : ""}` : this.flags & 98304 /* Nullable */ ? "NullableType" : this.flags & 384 /* StringOrNumberLiteral */ ? `LiteralType ${JSON.stringify(this.value)}` : this.flags & 2048 /* BigIntLiteral */ ? `LiteralType ${this.value.negative ? "-" : ""}${this.value.base10Value}n` : this.flags & 8192 /* UniqueESSymbol */ ? "UniqueESSymbolType" : this.flags & 32 /* Enum */ ? "EnumType" : this.flags & 1048576 /* Union */ ? "UnionType" : this.flags & 2097152 /* Intersection */ ? "IntersectionType" : this.flags & 4194304 /* Index */ ? "IndexType" : this.flags & 8388608 /* IndexedAccess */ ? "IndexedAccessType" : this.flags & 16777216 /* Conditional */ ? "ConditionalType" : this.flags & 33554432 /* Substitution */ ? "SubstitutionType" : this.flags & 262144 /* TypeParameter */ ? "TypeParameter" : this.flags & 524288 /* Object */ ? this.objectFlags & 3 /* ClassOrInterface */ ? "InterfaceType" : this.objectFlags & 4 /* Reference */ ? "TypeReference" : this.objectFlags & 8 /* Tuple */ ? "TupleType" : this.objectFlags & 16 /* Anonymous */ ? "AnonymousType" : this.objectFlags & 32 /* Mapped */ ? "MappedType" : this.objectFlags & 1024 /* ReverseMapped */ ? "ReverseMappedType" : this.objectFlags & 256 /* EvolvingArray */ ? "EvolvingArrayType" : "ObjectType" : "Type"; const remainingObjectFlags = this.flags & 524288 /* Object */ ? this.objectFlags & ~1343 /* ObjectTypeKindMask */ : 0; return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`; } }, - __debugFlags: { get() { - return formatTypeFlags(this.flags); - } }, - __debugObjectFlags: { get() { - return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : ""; - } }, + __debugFlags: { + get() { + return formatTypeFlags(this.flags); + } + }, + __debugObjectFlags: { + get() { + return this.flags & 524288 /* Object */ ? formatObjectFlags(this.objectFlags) : ""; + } + }, __debugTypeToString: { value() { let text = weakTypeTextMap.get(this); @@ -1380,13 +1334,17 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, } }); Object.defineProperties(objectAllocator.getSignatureConstructor().prototype, { - __debugFlags: { get() { - return formatSignatureFlags(this.flags); - } }, - __debugSignatureToString: { value() { - var _a; - return (_a = this.checker) == null ? void 0 : _a.signatureToString(this); - } } + __debugFlags: { + get() { + return formatSignatureFlags(this.flags); + } + }, + __debugSignatureToString: { + value() { + var _a; + return (_a = this.checker) == null ? void 0 : _a.signatureToString(this); + } + } }); const nodeConstructors = [ objectAllocator.getNodeConstructor(), @@ -1404,24 +1362,36 @@ Node ${formatSyntaxKind(node.kind)} was unexpected.`, return `${nodeHeader}${this.flags ? ` (${formatNodeFlags(this.flags)})` : ""}`; } }, - __debugKind: { get() { - return formatSyntaxKind(this.kind); - } }, - __debugNodeFlags: { get() { - return formatNodeFlags(this.flags); - } }, - __debugModifierFlags: { get() { - return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); - } }, - __debugTransformFlags: { get() { - return formatTransformFlags(this.transformFlags); - } }, - __debugIsParseTreeNode: { get() { - return isParseTreeNode(this); - } }, - __debugEmitFlags: { get() { - return formatEmitFlags(getEmitFlags(this)); - } }, + __debugKind: { + get() { + return formatSyntaxKind(this.kind); + } + }, + __debugNodeFlags: { + get() { + return formatNodeFlags(this.flags); + } + }, + __debugModifierFlags: { + get() { + return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); + } + }, + __debugTransformFlags: { + get() { + return formatTransformFlags(this.transformFlags); + } + }, + __debugIsParseTreeNode: { + get() { + return isParseTreeNode(this); + } + }, + __debugEmitFlags: { + get() { + return formatEmitFlags(getEmitFlags(this)); + } + }, __debugGetText: { value(includeTrivia) { if (nodeIsSynthesized(this)) @@ -2001,18 +1971,18 @@ var hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i; var rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i; function parseRange(text) { const alternatives = []; - for (let range of trimString(text).split(logicalOrRegExp)) { + for (let range of text.trim().split(logicalOrRegExp)) { if (!range) continue; const comparators = []; - range = trimString(range); + range = range.trim(); const match = hyphenRegExp.exec(range); if (match) { if (!parseHyphen(match[1], match[2], comparators)) return void 0; } else { for (const simple of range.split(whitespaceRegExp)) { - const match2 = rangeRegExp.exec(trimString(simple)); + const match2 = rangeRegExp.exec(simple.trim()); if (!match2 || !parseComparator(match2[1], match2[2], comparators)) return void 0; } @@ -2061,15 +2031,21 @@ function parseComparator(operator, text, comparators) { switch (operator) { case "~": comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - isWildcard(minor) ? "major" : "minor" - ))); + comparators.push(createComparator( + "<", + version2.increment( + isWildcard(minor) ? "major" : "minor" + ) + )); break; case "^": comparators.push(createComparator(">=", version2)); - comparators.push(createComparator("<", version2.increment( - version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch" - ))); + comparators.push(createComparator( + "<", + version2.increment( + version2.major > 0 || isWildcard(minor) ? "major" : version2.minor > 0 || isWildcard(patch) ? "minor" : "patch" + ) + )); break; case "<": case ">=": @@ -2265,11 +2241,7 @@ var tracingEnabled; const meta = { cat: "__metadata", ph: "M", ts: 1e3 * timestamp(), pid: 1, tid: 1 }; fs2.writeSync( traceFd, - "[\n" + [ - { name: "process_name", args: { name: "tsc" }, ...meta }, - { name: "thread_name", args: { name: "Main" }, ...meta }, - { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" } - ].map((v) => JSON.stringify(v)).join(",\n") + "[\n" + [{ name: "process_name", args: { name: "tsc" }, ...meta }, { name: "thread_name", args: { name: "Main" }, ...meta }, { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" }].map((v) => JSON.stringify(v)).join(",\n") ); } tracingEnabled2.startTracing = startTracing2; @@ -2801,8 +2773,10 @@ var SyntaxKind = /* @__PURE__ */ ((SyntaxKind4) => { SyntaxKind4[SyntaxKind4["DefaultClause"] = 297] = "DefaultClause"; SyntaxKind4[SyntaxKind4["HeritageClause"] = 298] = "HeritageClause"; SyntaxKind4[SyntaxKind4["CatchClause"] = 299] = "CatchClause"; - SyntaxKind4[SyntaxKind4["AssertClause"] = 300] = "AssertClause"; - SyntaxKind4[SyntaxKind4["AssertEntry"] = 301] = "AssertEntry"; + SyntaxKind4[SyntaxKind4["ImportAttributes"] = 300] = "ImportAttributes"; + SyntaxKind4[SyntaxKind4["ImportAttribute"] = 301] = "ImportAttribute"; + SyntaxKind4[SyntaxKind4["AssertClause"] = 300 /* ImportAttributes */] = "AssertClause"; + SyntaxKind4[SyntaxKind4["AssertEntry"] = 301 /* ImportAttribute */] = "AssertEntry"; SyntaxKind4[SyntaxKind4["ImportTypeAssertionContainer"] = 302] = "ImportTypeAssertionContainer"; SyntaxKind4[SyntaxKind4["PropertyAssignment"] = 303] = "PropertyAssignment"; SyntaxKind4[SyntaxKind4["ShorthandPropertyAssignment"] = 304] = "ShorthandPropertyAssignment"; @@ -2947,32 +2921,43 @@ var NodeFlags = /* @__PURE__ */ ((NodeFlags3) => { })(NodeFlags || {}); var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => { ModifierFlags3[ModifierFlags3["None"] = 0] = "None"; - ModifierFlags3[ModifierFlags3["Export"] = 1] = "Export"; - ModifierFlags3[ModifierFlags3["Ambient"] = 2] = "Ambient"; - ModifierFlags3[ModifierFlags3["Public"] = 4] = "Public"; - ModifierFlags3[ModifierFlags3["Private"] = 8] = "Private"; - ModifierFlags3[ModifierFlags3["Protected"] = 16] = "Protected"; - ModifierFlags3[ModifierFlags3["Static"] = 32] = "Static"; - ModifierFlags3[ModifierFlags3["Readonly"] = 64] = "Readonly"; - ModifierFlags3[ModifierFlags3["Accessor"] = 128] = "Accessor"; - ModifierFlags3[ModifierFlags3["Abstract"] = 256] = "Abstract"; - ModifierFlags3[ModifierFlags3["Async"] = 512] = "Async"; - ModifierFlags3[ModifierFlags3["Default"] = 1024] = "Default"; - ModifierFlags3[ModifierFlags3["Const"] = 2048] = "Const"; - ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 4096] = "HasComputedJSDocModifiers"; - ModifierFlags3[ModifierFlags3["Deprecated"] = 8192] = "Deprecated"; - ModifierFlags3[ModifierFlags3["Override"] = 16384] = "Override"; - ModifierFlags3[ModifierFlags3["In"] = 32768] = "In"; - ModifierFlags3[ModifierFlags3["Out"] = 65536] = "Out"; - ModifierFlags3[ModifierFlags3["Decorator"] = 131072] = "Decorator"; + ModifierFlags3[ModifierFlags3["Public"] = 1] = "Public"; + ModifierFlags3[ModifierFlags3["Private"] = 2] = "Private"; + ModifierFlags3[ModifierFlags3["Protected"] = 4] = "Protected"; + ModifierFlags3[ModifierFlags3["Readonly"] = 8] = "Readonly"; + ModifierFlags3[ModifierFlags3["Override"] = 16] = "Override"; + ModifierFlags3[ModifierFlags3["Export"] = 32] = "Export"; + ModifierFlags3[ModifierFlags3["Abstract"] = 64] = "Abstract"; + ModifierFlags3[ModifierFlags3["Ambient"] = 128] = "Ambient"; + ModifierFlags3[ModifierFlags3["Static"] = 256] = "Static"; + ModifierFlags3[ModifierFlags3["Accessor"] = 512] = "Accessor"; + ModifierFlags3[ModifierFlags3["Async"] = 1024] = "Async"; + ModifierFlags3[ModifierFlags3["Default"] = 2048] = "Default"; + ModifierFlags3[ModifierFlags3["Const"] = 4096] = "Const"; + ModifierFlags3[ModifierFlags3["In"] = 8192] = "In"; + ModifierFlags3[ModifierFlags3["Out"] = 16384] = "Out"; + ModifierFlags3[ModifierFlags3["Decorator"] = 32768] = "Decorator"; + ModifierFlags3[ModifierFlags3["Deprecated"] = 65536] = "Deprecated"; + ModifierFlags3[ModifierFlags3["JSDocPublic"] = 8388608] = "JSDocPublic"; + ModifierFlags3[ModifierFlags3["JSDocPrivate"] = 16777216] = "JSDocPrivate"; + ModifierFlags3[ModifierFlags3["JSDocProtected"] = 33554432] = "JSDocProtected"; + ModifierFlags3[ModifierFlags3["JSDocReadonly"] = 67108864] = "JSDocReadonly"; + ModifierFlags3[ModifierFlags3["JSDocOverride"] = 134217728] = "JSDocOverride"; + ModifierFlags3[ModifierFlags3["SyntacticOrJSDocModifiers"] = 31] = "SyntacticOrJSDocModifiers"; + ModifierFlags3[ModifierFlags3["SyntacticOnlyModifiers"] = 65504] = "SyntacticOnlyModifiers"; + ModifierFlags3[ModifierFlags3["SyntacticModifiers"] = 65535] = "SyntacticModifiers"; + ModifierFlags3[ModifierFlags3["JSDocCacheOnlyModifiers"] = 260046848] = "JSDocCacheOnlyModifiers"; + ModifierFlags3[ModifierFlags3["JSDocOnlyModifiers"] = 65536 /* Deprecated */] = "JSDocOnlyModifiers"; + ModifierFlags3[ModifierFlags3["NonCacheOnlyModifiers"] = 131071] = "NonCacheOnlyModifiers"; + ModifierFlags3[ModifierFlags3["HasComputedJSDocModifiers"] = 268435456] = "HasComputedJSDocModifiers"; ModifierFlags3[ModifierFlags3["HasComputedFlags"] = 536870912] = "HasComputedFlags"; - ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 28] = "AccessibilityModifier"; - ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 16476] = "ParameterPropertyModifier"; - ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 24] = "NonPublicAccessibilityModifier"; - ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 117086] = "TypeScriptModifier"; - ModifierFlags3[ModifierFlags3["ExportDefault"] = 1025] = "ExportDefault"; - ModifierFlags3[ModifierFlags3["All"] = 258047] = "All"; - ModifierFlags3[ModifierFlags3["Modifier"] = 126975] = "Modifier"; + ModifierFlags3[ModifierFlags3["AccessibilityModifier"] = 7] = "AccessibilityModifier"; + ModifierFlags3[ModifierFlags3["ParameterPropertyModifier"] = 31] = "ParameterPropertyModifier"; + ModifierFlags3[ModifierFlags3["NonPublicAccessibilityModifier"] = 6] = "NonPublicAccessibilityModifier"; + ModifierFlags3[ModifierFlags3["TypeScriptModifier"] = 28895] = "TypeScriptModifier"; + ModifierFlags3[ModifierFlags3["ExportDefault"] = 2080] = "ExportDefault"; + ModifierFlags3[ModifierFlags3["All"] = 131071] = "All"; + ModifierFlags3[ModifierFlags3["Modifier"] = 98303] = "Modifier"; return ModifierFlags3; })(ModifierFlags || {}); var RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => { @@ -3127,7 +3112,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => { TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive"; TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable"; TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable"; - TypeFlags2[TypeFlags2["ObjectFlagsType"] = 138117121] = "ObjectFlagsType"; + TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType"; TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable"; TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton"; TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable"; @@ -3166,6 +3151,7 @@ var ObjectFlags = /* @__PURE__ */ ((ObjectFlags3) => { ObjectFlags3[ObjectFlags3["ClassOrInterface"] = 3] = "ClassOrInterface"; ObjectFlags3[ObjectFlags3["RequiresWidening"] = 196608] = "RequiresWidening"; ObjectFlags3[ObjectFlags3["PropagatingFlags"] = 458752] = "PropagatingFlags"; + ObjectFlags3[ObjectFlags3["InstantiatedMapped"] = 96] = "InstantiatedMapped"; ObjectFlags3[ObjectFlags3["ObjectTypeKindMask"] = 1343] = "ObjectTypeKindMask"; ObjectFlags3[ObjectFlags3["ContainsSpread"] = 2097152] = "ContainsSpread"; ObjectFlags3[ObjectFlags3["ObjectRestType"] = 4194304] = "ObjectRestType"; @@ -3899,11 +3885,11 @@ function createDirectoryWatcherSupportingRecursive({ return some(ignoredPaths, (searchPath) => isInPath(path2, searchPath)) || isIgnoredByWatchOptions(path2, options, useCaseSensitiveFileNames2, getCurrentDirectory); } function isInPath(path2, searchPath) { - if (stringContains(path2, searchPath)) + if (path2.includes(searchPath)) return true; if (useCaseSensitiveFileNames2) return false; - return stringContains(toCanonicalFilePath(path2), searchPath); + return toCanonicalFilePath(path2).includes(searchPath); } } function createFileWatcherCallback(callback) { @@ -4707,7 +4693,9 @@ var sys = (() => { })(); if (sys && sys.getEnvironmentVariable) { setCustomPollingValues(sys); - Debug.setAssertionLevel(/^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */); + Debug.setAssertionLevel( + /^development$/i.test(sys.getEnvironmentVariable("NODE_ENV")) ? 1 /* Normal */ : 0 /* None */ + ); } if (sys && sys.debugMode) { Debug.isDebugging = true; @@ -4731,7 +4719,7 @@ function pathIsRelative(path2) { return /^\.\.?($|[\\/])/.test(path2); } function hasExtension(fileName) { - return stringContains(getBaseFileName(fileName), "."); + return getBaseFileName(fileName).includes("."); } function fileExtensionIs(path2, extension) { return path2.length > extension.length && endsWith(path2, extension); @@ -4876,7 +4864,7 @@ function getPathFromPathComponents(pathComponents2, length2) { return root + pathComponents2.slice(1, length2).join(directorySeparator); } function normalizeSlashes(path2) { - return path2.indexOf("\\") !== -1 ? path2.replace(backslashRegExp, directorySeparator) : path2; + return path2.includes("\\") ? path2.replace(backslashRegExp, directorySeparator) : path2; } function reducePathComponents(components) { if (!some(components)) @@ -5456,9 +5444,8 @@ var Diagnostics = { _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_enabled: diag(1448, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_1_is_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when '{1}' is enabled."), Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, 3 /* Message */, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), - Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"), + Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments: diag(1450, 3 /* Message */, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional set of attributes as arguments"), Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, 1 /* Error */, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), - resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, 1 /* Error */, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."), resolution_mode_should_be_either_require_or_import: diag(1453, 1 /* Error */, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, 1 /* Error */, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), @@ -5468,6 +5455,8 @@ var Diagnostics = { File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, 3 /* Message */, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", `File is CommonJS module because '{0}' has field "type" whose value is not "module"`), File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, 3 /* Message */, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", `File is CommonJS module because '{0}' does not have field "type"`), File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, 3 /* Message */, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), + resolution_mode_is_the_only_valid_key_for_type_import_attributes: diag(1463, 1 /* Error */, "resolution_mode_is_the_only_valid_key_for_type_import_attributes_1463", "'resolution-mode' is the only valid key for type import attributes."), + Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1464, 1 /* Error */, "Type_import_attributes_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1464", "Type import attributes should have exactly one key - 'resolution-mode' - with value 'import' or 'require'."), The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, 1 /* Error */, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, 1 /* Error */, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), catch_or_finally_expected: diag(1472, 1 /* Error */, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), @@ -5494,6 +5483,7 @@ var Diagnostics = { The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration: diag(1493, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_using_declaration_1493", "The left-hand side of a 'for...in' statement cannot be a 'using' declaration."), The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration: diag(1494, 1 /* Error */, "The_left_hand_side_of_a_for_in_statement_cannot_be_an_await_using_declaration_1494", "The left-hand side of a 'for...in' statement cannot be an 'await using' declaration."), _0_modifier_cannot_appear_on_an_await_using_declaration: diag(1495, 1 /* Error */, "_0_modifier_cannot_appear_on_an_await_using_declaration_1495", "'{0}' modifier cannot appear on an 'await using' declaration."), + Identifier_string_literal_or_number_literal_expected: diag(1496, 1 /* Error */, "Identifier_string_literal_or_number_literal_expected_1496", "Identifier, string literal, or number literal expected."), The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* 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: diag(2201, 1 /* 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: diag( @@ -5600,7 +5590,7 @@ var Diagnostics = { An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, 1 /* 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: diag(2357, 1 /* 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: diag(2358, 1 /* 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: diag(2359, 1 /* 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_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_type_assignable_to_the_Function_interface_type_or_an_object_type_with_a_Symbol_hasInstance_method: diag(2359, 1 /* Error */, "The_right_hand_side_of_an_instanceof_expression_must_be_either_of_type_any_a_class_function_or_other_2359", "The right-hand side of an 'instanceof' expression must be either of type 'any', a class, function, or other type assignable to the 'Function' interface type, or an object type with a 'Symbol.hasInstance' method."), The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, 1 /* 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: diag(2363, 1 /* 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: diag(2364, 1 /* 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."), @@ -6023,15 +6013,15 @@ var Diagnostics = { Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, 1 /* Error */, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, 1 /* Error */, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, 1 /* Error */, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), + Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2823, 1 /* Error */, "Import_attributes_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2823", "Import attributes are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), Cannot_find_namespace_0_Did_you_mean_1: diag(2833, 1 /* Error */, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), - Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), + Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, 1 /* Error */, "Relative_import_paths_need_explicit_file_extensions_in_ECMAScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), + Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2836, 1 /* Error */, "Import_assertions_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2836", "Import assertions are not allowed on statements that compile to CommonJS 'require' calls."), Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), - An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"), - The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, 1 /* Error */, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."), _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), @@ -6044,6 +6034,16 @@ var Diagnostics = { await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(2852, 1 /* Error */, "await_using_statements_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_2852", "'await using' statements are only allowed within async functions and at the top levels of modules."), await_using_statements_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: diag(2853, 1 /* Error */, "await_using_statements_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_th_2853", "'await using' statements 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."), Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_node16_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(2854, 1 /* Error */, "Top_level_await_using_statements_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_sys_2854", "Top-level 'await using' statements are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher."), + Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super: diag(2855, 1 /* Error */, "Class_field_0_defined_by_the_parent_class_is_not_accessible_in_the_child_class_via_super_2855", "Class field '{0}' defined by the parent class is not accessible in the child class via super."), + Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls: diag(2856, 1 /* Error */, "Import_attributes_are_not_allowed_on_statements_that_compile_to_CommonJS_require_calls_2856", "Import attributes are not allowed on statements that compile to CommonJS 'require' calls."), + Import_attributes_cannot_be_used_with_type_only_imports_or_exports: diag(2857, 1 /* Error */, "Import_attributes_cannot_be_used_with_type_only_imports_or_exports_2857", "Import attributes cannot be used with type-only imports or exports."), + Import_attribute_values_must_be_string_literal_expressions: diag(2858, 1 /* Error */, "Import_attribute_values_must_be_string_literal_expressions_2858", "Import attribute values must be string literal expressions."), + Excessive_complexity_comparing_types_0_and_1: diag(2859, 1 /* Error */, "Excessive_complexity_comparing_types_0_and_1_2859", "Excessive complexity comparing types '{0}' and '{1}'."), + The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."), + An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."), + Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."), + A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."), + A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."), Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* 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: diag(4002, 1 /* 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: diag(4004, 1 /* 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}'."), @@ -6152,7 +6152,6 @@ var Diagnostics = { This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, 1 /* Error */, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), The_current_host_does_not_support_the_0_option: diag(5001, 1 /* 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: diag(5009, 1 /* 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: diag(5010, 1 /* 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}'."), @@ -6885,6 +6884,7 @@ var Diagnostics = { Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, 1 /* Error */, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), _0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17019, 1 /* Error */, "_0_at_the_end_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17019", "'{0}' at the end of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), _0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1: diag(17020, 1 /* Error */, "_0_at_the_start_of_a_type_is_not_valid_TypeScript_syntax_Did_you_mean_to_write_1_17020", "'{0}' at the start of a type is not valid TypeScript syntax. Did you mean to write '{1}'?"), + Unicode_escape_sequence_cannot_appear_here: diag(17021, 1 /* Error */, "Unicode_escape_sequence_cannot_appear_here_17021", "Unicode escape sequence cannot appear here."), Circularity_detected_while_resolving_configuration_Colon_0: diag(18e3, 1 /* Error */, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), The_files_list_in_config_file_0_is_empty: diag(18002, 1 /* 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: diag(18003, 1 /* 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}'."), @@ -7090,7 +7090,7 @@ var Diagnostics = { Could_not_convert_to_arrow_function: diag(95151, 3 /* Message */, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), Could_not_convert_to_named_function: diag(95152, 3 /* Message */, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), Could_not_convert_to_anonymous_function: diag(95153, 3 /* Message */, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), - Can_only_convert_string_concatenation: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"), + Can_only_convert_string_concatenations_and_string_literals: diag(95154, 3 /* Message */, "Can_only_convert_string_concatenations_and_string_literals_95154", "Can only convert string concatenations and string literals"), Selection_is_not_a_valid_statement_or_statements: diag(95155, 3 /* Message */, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), Add_missing_function_declaration_0: diag(95156, 3 /* Message */, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), Add_all_missing_function_declarations: diag(95157, 3 /* Message */, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), @@ -7334,6 +7334,7 @@ var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 18 var unicodeESNextIdentifierPart = [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]; var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/; var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/; +var jsDocSeeOrLink = /@(?:see|link)/i; function lookupInUnicodeMap(code, map2) { if (code < map2[0]) { return false; @@ -7762,6 +7763,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan var tokenFlags; var commentDirectives; var inJSDocType = 0; + var scriptKind = 0 /* Unknown */; + var jsDocParsingMode = 0 /* ParseAll */; setText(text, start, length2); var scanner = { getTokenFullStart: () => fullStartPos, @@ -7805,6 +7808,8 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan setText, setScriptTarget, setLanguageVariant, + setScriptKind, + setJSDocParsingMode, setOnError, resetTokenState, setTextPos: resetTokenState, @@ -8058,7 +8063,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan start2 = pos; continue; } - if (isLineBreak(ch) && !jsxAttributeString) { + if ((ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */) && !jsxAttributeString) { result += text.substring(start2, pos); tokenFlags |= 4 /* Unterminated */; error(Diagnostics.Unterminated_string_literal); @@ -8147,7 +8152,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan tokenFlags |= 2048 /* ContainsInvalidEscape */; if (shouldEmitInvalidEscapeError) { const code = parseInt(text.substring(start2 + 1, pos), 8); - error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0")); + error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + code.toString(16).padStart(2, "0")); return String.fromCharCode(code); } return text.substring(start2, pos); @@ -8583,9 +8588,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { pos += 2; - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */) { - tokenFlags |= 2 /* PrecedingJSDocComment */; - } + const isJSDoc2 = text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) !== 47 /* slash */; let commentClosed = false; let lastLineStart = tokenStart; while (pos < end) { @@ -8601,6 +8604,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan tokenFlags |= 1 /* PrecedingLineBreak */; } } + if (isJSDoc2 && shouldParseJSDoc()) { + tokenFlags |= 2 /* PrecedingJSDocComment */; + } commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart); if (!commentClosed) { error(Diagnostics.Asterisk_Slash_expected); @@ -8857,6 +8863,21 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan } } } + function shouldParseJSDoc() { + switch (jsDocParsingMode) { + case 0 /* ParseAll */: + return true; + case 1 /* ParseNone */: + return false; + } + if (scriptKind !== 3 /* TS */ && scriptKind !== 4 /* TSX */) { + return true; + } + if (jsDocParsingMode === 3 /* ParseForTypeInfo */) { + return false; + } + return jsDocSeeOrLink.test(text.slice(fullStartPos, pos)); + } function reScanInvalidIdentifier() { Debug.assert(token === 0 /* Unknown */, "'reScanInvalidIdentifier' should only be called when the current token is 'SyntaxKind.Unknown'."); pos = tokenStart = fullStartPos; @@ -8950,7 +8971,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan return token; } function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) { - const type = getDirectiveFromComment(trimStringStart(text2), commentDirectiveRegEx); + const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx); if (type === void 0) { return commentDirectives2; } @@ -9271,6 +9292,12 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan function setLanguageVariant(variant) { languageVariant = variant; } + function setScriptKind(kind) { + scriptKind = kind; + } + function setJSDocParsingMode(kind) { + jsDocParsingMode = kind; + } function resetTokenState(position) { Debug.assert(position >= 0); pos = position; @@ -9284,20 +9311,9 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan inJSDocType += inType ? 1 : -1; } } -var codePointAt = String.prototype.codePointAt ? (s, i) => s.codePointAt(i) : function codePointAt2(str, i) { - const size = str.length; - if (i < 0 || i >= size) { - return void 0; - } - const first2 = str.charCodeAt(i); - if (first2 >= 55296 && first2 <= 56319 && size > i + 1) { - const second = str.charCodeAt(i + 1); - if (second >= 56320 && second <= 57343) { - return (first2 - 55296) * 1024 + second - 56320 + 65536; - } - } - return first2; -}; +function codePointAt(s, i) { + return s.codePointAt(i); +} function charSize(ch) { if (ch >= 65536) { return 2; @@ -9512,7 +9528,7 @@ function getAssignedName(node) { } } function getModifiers(node) { - if (hasSyntacticModifier(node, 126975 /* Modifier */)) { + if (hasSyntacticModifier(node, 98303 /* Modifier */)) { return filter(node.modifiers, isModifier); } } @@ -9682,7 +9698,7 @@ function isTemplateMiddleOrTemplateTail(node) { const kind = node.kind; return kind === 17 /* TemplateMiddle */ || kind === 18 /* TemplateTail */; } -function isAssertionKey(node) { +function isImportAttributeName(node) { return isStringLiteral(node) || isIdentifier(node); } function isGeneratedIdentifier(node) { @@ -9718,7 +9734,7 @@ function isModifierKind(token) { return false; } function isParameterPropertyModifier(kind) { - return !!(modifierToFlag(kind) & 16476 /* ParameterPropertyModifier */); + return !!(modifierToFlag(kind) & 31 /* ParameterPropertyModifier */); } function isClassMemberModifier(idToken) { return isParameterPropertyModifier(idToken) || idToken === 126 /* StaticKeyword */ || idToken === 164 /* OverrideKeyword */ || idToken === 129 /* AccessorKeyword */; @@ -10124,7 +10140,7 @@ function getTextOfNodeFromSourceText(sourceText, node, includeTrivia = false) { } let text = sourceText.substring(includeTrivia ? node.pos : skipTrivia(sourceText, node.pos), node.end); if (isJSDocTypeExpressionOrChild(node)) { - text = text.split(/\r\n|\n|\r/).map((line) => trimStringStart(line.replace(/^\s*\*/, ""))).join("\n"); + text = text.split(/\r\n|\n|\r/).map((line) => line.replace(/^\s*\*/, "").trimStart()).join("\n"); } return text; } @@ -10168,13 +10184,11 @@ function createDiagnosticForNodeInSourceFile(sourceFile, node, message, ...args) const span = getErrorSpanForNode(sourceFile, node); return createFileDiagnostic(sourceFile, span.start, span.length, message, ...args); } -function assertDiagnosticLocation(file, start, length2) { +function assertDiagnosticLocation(sourceText, start, length2) { Debug.assertGreaterThanOrEqual(start, 0); Debug.assertGreaterThanOrEqual(length2, 0); - if (file) { - Debug.assertLessThanOrEqual(start, file.text.length); - Debug.assertLessThanOrEqual(start + length2, file.text.length); - } + Debug.assertLessThanOrEqual(start, sourceText.length); + Debug.assertLessThanOrEqual(start + length2, sourceText.length); } function getSpanOfTokenAtPosition(sourceFile, pos) { const scanner = createScanner( @@ -10593,9 +10607,9 @@ function ownsJSDocTag(hostNode, tag) { } function getNextJSDocCommentLocation(node) { const parent = node.parent; - if (parent.kind === 303 /* PropertyAssignment */ || parent.kind === 277 /* ExportAssignment */ || parent.kind === 172 /* PropertyDeclaration */ || parent.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isBinaryExpression(node) && node.operatorToken.kind === 64 /* EqualsToken */) { + if (parent.kind === 303 /* PropertyAssignment */ || parent.kind === 277 /* ExportAssignment */ || parent.kind === 172 /* PropertyDeclaration */ || parent.kind === 244 /* ExpressionStatement */ && node.kind === 211 /* PropertyAccessExpression */ || parent.kind === 253 /* ReturnStatement */ || getNestedModuleDeclaration(parent) || isAssignmentExpression(node)) { return parent; - } else if (parent.parent && (getSingleVariableOfVariableStatement(parent.parent) === node || isBinaryExpression(parent) && parent.operatorToken.kind === 64 /* EqualsToken */)) { + } else if (parent.parent && (getSingleVariableOfVariableStatement(parent.parent) === node || isAssignmentExpression(parent))) { return parent.parent; } else if (parent.parent && parent.parent.parent && (getSingleVariableOfVariableStatement(parent.parent.parent) || getSingleInitializerOfVariableStatementOrPropertyDeclaration(parent.parent.parent) === node || getSourceOfDefaultedAssignment(parent.parent.parent))) { return parent.parent.parent; @@ -10816,8 +10830,11 @@ function getBinaryOperatorPrecedence(kind) { } return -1; } +function containsInvalidEscapeFlag(node) { + return !!((node.templateFlags || 0) & 2048 /* ContainsInvalidEscape */); +} function hasInvalidEscape(template) { - return template && !!(isNoSubstitutionTemplateLiteral(template) ? template.templateFlags : template.head.templateFlags || some(template.templateSpans, (span) => !!span.literal.templateFlags)); + return template && !!(isNoSubstitutionTemplateLiteral(template) ? containsInvalidEscapeFlag(template) : containsInvalidEscapeFlag(template.head) || some(template.templateSpans, (span) => containsInvalidEscapeFlag(span.literal))); } var escapedCharsMap = new Map(Object.entries({ " ": "\\t", @@ -10895,10 +10912,13 @@ function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) { if (!(node.modifierFlagsCache & 536870912 /* HasComputedFlags */)) { node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | 536870912 /* HasComputedFlags */; } - if (includeJSDoc && !(node.modifierFlagsCache & 4096 /* HasComputedJSDocModifiers */) && (alwaysIncludeJSDoc || isInJSFile(node)) && node.parent) { - node.modifierFlagsCache |= getJSDocModifierFlagsNoCache(node) | 4096 /* HasComputedJSDocModifiers */; + if (alwaysIncludeJSDoc || includeJSDoc && isInJSFile(node)) { + if (!(node.modifierFlagsCache & 268435456 /* HasComputedJSDocModifiers */) && node.parent) { + node.modifierFlagsCache |= getRawJSDocModifierFlagsNoCache(node) | 268435456 /* HasComputedJSDocModifiers */; + } + return selectEffectiveModifierFlags(node.modifierFlagsCache); } - return node.modifierFlagsCache & ~(536870912 /* HasComputedFlags */ | 4096 /* HasComputedJSDocModifiers */); + return selectSyntacticModifierFlags(node.modifierFlagsCache); } function getSyntacticModifierFlags(node) { return getModifierFlagsWorker( @@ -10907,33 +10927,42 @@ function getSyntacticModifierFlags(node) { false ); } -function getJSDocModifierFlagsNoCache(node) { +function getRawJSDocModifierFlagsNoCache(node) { let flags = 0 /* None */; if (!!node.parent && !isParameter(node)) { if (isInJSFile(node)) { if (getJSDocPublicTagNoCache(node)) - flags |= 4 /* Public */; + flags |= 8388608 /* JSDocPublic */; if (getJSDocPrivateTagNoCache(node)) - flags |= 8 /* Private */; + flags |= 16777216 /* JSDocPrivate */; if (getJSDocProtectedTagNoCache(node)) - flags |= 16 /* Protected */; + flags |= 33554432 /* JSDocProtected */; if (getJSDocReadonlyTagNoCache(node)) - flags |= 64 /* Readonly */; + flags |= 67108864 /* JSDocReadonly */; if (getJSDocOverrideTagNoCache(node)) - flags |= 16384 /* Override */; + flags |= 134217728 /* JSDocOverride */; } if (getJSDocDeprecatedTagNoCache(node)) - flags |= 8192 /* Deprecated */; + flags |= 65536 /* Deprecated */; } return flags; } +function selectSyntacticModifierFlags(flags) { + return flags & 65535 /* SyntacticModifiers */; +} +function selectEffectiveModifierFlags(flags) { + return flags & 131071 /* NonCacheOnlyModifiers */ | (flags & 260046848 /* JSDocCacheOnlyModifiers */) >>> 23; +} +function getJSDocModifierFlagsNoCache(node) { + return selectEffectiveModifierFlags(getRawJSDocModifierFlagsNoCache(node)); +} function getEffectiveModifierFlagsNoCache(node) { return getSyntacticModifierFlagsNoCache(node) | getJSDocModifierFlagsNoCache(node); } function getSyntacticModifierFlagsNoCache(node) { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : 0 /* None */; if (node.flags & 8 /* NestedNamespace */ || node.kind === 80 /* Identifier */ && node.flags & 4096 /* IdentifierIsInJSDocNamespace */) { - flags |= 1 /* Export */; + flags |= 32 /* Export */; } return flags; } @@ -10949,37 +10978,37 @@ function modifiersToFlags(modifiers) { function modifierToFlag(token) { switch (token) { case 126 /* StaticKeyword */: - return 32 /* Static */; + return 256 /* Static */; case 125 /* PublicKeyword */: - return 4 /* Public */; + return 1 /* Public */; case 124 /* ProtectedKeyword */: - return 16 /* Protected */; + return 4 /* Protected */; case 123 /* PrivateKeyword */: - return 8 /* Private */; + return 2 /* Private */; case 128 /* AbstractKeyword */: - return 256 /* Abstract */; + return 64 /* Abstract */; case 129 /* AccessorKeyword */: - return 128 /* Accessor */; + return 512 /* Accessor */; case 95 /* ExportKeyword */: - return 1 /* Export */; + return 32 /* Export */; case 138 /* DeclareKeyword */: - return 2 /* Ambient */; + return 128 /* Ambient */; case 87 /* ConstKeyword */: - return 2048 /* Const */; + return 4096 /* Const */; case 90 /* DefaultKeyword */: - return 1024 /* Default */; + return 2048 /* Default */; case 134 /* AsyncKeyword */: - return 512 /* Async */; + return 1024 /* Async */; case 148 /* ReadonlyKeyword */: - return 64 /* Readonly */; + return 8 /* Readonly */; case 164 /* OverrideKeyword */: - return 16384 /* Override */; + return 16 /* Override */; case 103 /* InKeyword */: - return 32768 /* In */; + return 8192 /* In */; case 147 /* OutKeyword */: - return 65536 /* Out */; + return 16384 /* Out */; case 170 /* Decorator */: - return 131072 /* Decorator */; + return 32768 /* Decorator */; } return 0 /* None */; } @@ -11022,21 +11051,17 @@ function closeFileWatcher(watcher) { } function getLastChild(node) { let lastChild; - forEachChild( - node, - (child) => { - if (nodeIsPresent(child)) - lastChild = child; - }, - (children) => { - for (let i = children.length - 1; i >= 0; i--) { - if (nodeIsPresent(children[i])) { - lastChild = children[i]; - break; - } + forEachChild(node, (child) => { + if (nodeIsPresent(child)) + lastChild = child; + }, (children) => { + for (let i = children.length - 1; i >= 0; i--) { + if (nodeIsPresent(children[i])) { + lastChild = children[i]; + break; } } - ); + }); return lastChild; } function isTypeNodeKind(kind) { @@ -11153,23 +11178,21 @@ var objectAllocator = { getSignatureConstructor: () => Signature2, getSourceMapSourceConstructor: () => SourceMapSource }; -function formatStringFromArgs(text, args, baseIndex = 0) { - return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index + baseIndex])); +function formatStringFromArgs(text, args) { + return text.replace(/{(\d+)}/g, (_match, index) => "" + Debug.checkDefined(args[+index])); } var localizedDiagnosticMessages; function getLocaleSpecificMessage(message) { return localizedDiagnosticMessages && localizedDiagnosticMessages[message.key] || message.message; } -function createDetachedDiagnostic(fileName, start, length2, message) { - assertDiagnosticLocation( - /*file*/ - void 0, - start, - length2 - ); +function createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args) { + if (start + length2 > sourceText.length) { + length2 = sourceText.length - start; + } + assertDiagnosticLocation(sourceText, start, length2); let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file: void 0, @@ -11221,11 +11244,11 @@ function attachFileToDiagnostics(diagnostics, file) { } return diagnosticsWithLocation; } -function createFileDiagnostic(file, start, length2, message) { - assertDiagnosticLocation(file, start, length2); +function createFileDiagnostic(file, start, length2, message, ...args) { + assertDiagnosticLocation(file.text, start, length2); let text = getLocaleSpecificMessage(message); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file, @@ -11238,17 +11261,17 @@ function createFileDiagnostic(file, start, length2, message) { reportsDeprecated: message.reportsDeprecated }; } -function formatMessage(_dummy, message) { +function formatMessage(message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); + if (some(args)) { + text = formatStringFromArgs(text, args); } return text; } -function createCompilerDiagnostic(message) { +function createCompilerDiagnostic(message, ...args) { let text = getLocaleSpecificMessage(message); - if (arguments.length > 1) { - text = formatStringFromArgs(text, arguments, 1); + if (some(args)) { + text = formatStringFromArgs(text, args); } return { file: void 0, @@ -12587,6 +12610,10 @@ function createNodeFactory(flags, baseFactory2) { updateAssertEntry, createImportTypeAssertionContainer, updateImportTypeAssertionContainer, + createImportAttributes, + updateImportAttributes, + createImportAttribute, + updateImportAttribute, createNamespaceImport, updateNamespaceImport, createNamespaceExport, @@ -12963,8 +12990,9 @@ function createNodeFactory(flags, baseFactory2) { ensureUseStrict, liftToBlock, mergeLexicalEnvironment, - updateModifiers, - updateModifierLike + replaceModifiers, + replaceDecoratorsAndModifiers, + replacePropertyName }; forEach(nodeFactoryPatchers, (fn) => fn(factory2)); return factory2; @@ -13297,35 +13325,35 @@ function createNodeFactory(flags, baseFactory2) { } function createModifiersFromModifierFlags(flags2) { const result = []; - if (flags2 & 1 /* Export */) + if (flags2 & 32 /* Export */) result.push(createModifier(95 /* ExportKeyword */)); - if (flags2 & 2 /* Ambient */) + if (flags2 & 128 /* Ambient */) result.push(createModifier(138 /* DeclareKeyword */)); - if (flags2 & 1024 /* Default */) + if (flags2 & 2048 /* Default */) result.push(createModifier(90 /* DefaultKeyword */)); - if (flags2 & 2048 /* Const */) + if (flags2 & 4096 /* Const */) result.push(createModifier(87 /* ConstKeyword */)); - if (flags2 & 4 /* Public */) + if (flags2 & 1 /* Public */) result.push(createModifier(125 /* PublicKeyword */)); - if (flags2 & 8 /* Private */) + if (flags2 & 2 /* Private */) result.push(createModifier(123 /* PrivateKeyword */)); - if (flags2 & 16 /* Protected */) + if (flags2 & 4 /* Protected */) result.push(createModifier(124 /* ProtectedKeyword */)); - if (flags2 & 256 /* Abstract */) + if (flags2 & 64 /* Abstract */) result.push(createModifier(128 /* AbstractKeyword */)); - if (flags2 & 32 /* Static */) + if (flags2 & 256 /* Static */) result.push(createModifier(126 /* StaticKeyword */)); - if (flags2 & 16384 /* Override */) + if (flags2 & 16 /* Override */) result.push(createModifier(164 /* OverrideKeyword */)); - if (flags2 & 64 /* Readonly */) + if (flags2 & 8 /* Readonly */) result.push(createModifier(148 /* ReadonlyKeyword */)); - if (flags2 & 128 /* Accessor */) + if (flags2 & 512 /* Accessor */) result.push(createModifier(129 /* AccessorKeyword */)); - if (flags2 & 512 /* Async */) + if (flags2 & 1024 /* Async */) result.push(createModifier(134 /* AsyncKeyword */)); - if (flags2 & 32768 /* In */) + if (flags2 & 8192 /* In */) result.push(createModifier(103 /* InKeyword */)); - if (flags2 & 65536 /* Out */) + if (flags2 & 16384 /* Out */) result.push(createModifier(147 /* OutKeyword */)); return result.length ? result : void 0; } @@ -13374,7 +13402,7 @@ function createNodeFactory(flags, baseFactory2) { if (isThisIdentifier(node.name)) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 16476 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */); + node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.dotDotDotToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildFlags(node.initializer) | (node.questionToken ?? node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (node.dotDotDotToken ?? node.initializer ? 1024 /* ContainsES2015 */ : 0 /* None */) | (modifiersToFlags(node.modifiers) & 31 /* ParameterPropertyModifier */ ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */); } node.jsDoc = void 0; return node; @@ -13423,8 +13451,8 @@ function createNodeFactory(flags, baseFactory2) { node.exclamationToken = questionOrExclamationToken && isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : void 0; node.type = type; node.initializer = asInitializer(initializer); - const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 2 /* Ambient */; - node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 32 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; + const isAmbient = node.flags & 33554432 /* Ambient */ || modifiersToFlags(node.modifiers) & 128 /* Ambient */; + node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildFlags(node.initializer) | (isAmbient || node.questionToken || node.exclamationToken || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isComputedPropertyName(node.name) || modifiersToFlags(node.modifiers) & 256 /* Static */ && node.initializer ? 8192 /* ContainsTypeScriptClassSyntax */ : 0 /* None */) | 16777216 /* ContainsClassFields */; node.jsDoc = void 0; return node; } @@ -13463,7 +13491,7 @@ function createNodeFactory(flags, baseFactory2) { if (!node.body) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildFlags(node.questionToken) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.questionToken || node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; @@ -13853,18 +13881,21 @@ function createNodeFactory(flags, baseFactory2) { function updateTemplateLiteralType(node, head, templateSpans) { return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateLiteralType(head, templateSpans), node) : node; } - function createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf = false) { + function createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf = false) { const node = createBaseNode(205 /* ImportType */); node.argument = argument; - node.assertions = assertions; + node.attributes = attributes; + if (node.assertions && node.assertions.assertClause && node.attributes) { + node.assertions.assertClause = node.attributes; + } node.qualifier = qualifier; node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments); node.isTypeOf = isTypeOf; node.transformFlags = 1 /* ContainsTypeScript */; return node; } - function updateImportTypeNode(node, argument, assertions, qualifier, typeArguments, isTypeOf = node.isTypeOf) { - return node.argument !== argument || node.assertions !== assertions || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf), node) : node; + function updateImportTypeNode(node, argument, attributes, qualifier, typeArguments, isTypeOf = node.isTypeOf) { + return node.argument !== argument || node.attributes !== attributes || node.qualifier !== qualifier || node.typeArguments !== typeArguments || node.isTypeOf !== isTypeOf ? update(createImportTypeNode(argument, attributes, qualifier, typeArguments, isTypeOf), node) : node; } function createParenthesizedType(type) { const node = createBaseNode(196 /* ParenthesizedType */); @@ -14203,7 +14234,7 @@ function createNodeFactory(flags, baseFactory2) { node.parameters = createNodeArray(parameters); node.type = type; node.body = body; - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -14227,7 +14258,7 @@ function createNodeFactory(flags, baseFactory2) { node.type = type; node.equalsGreaterThanToken = equalsGreaterThanToken ?? createToken(39 /* EqualsGreaterThanToken */); node.body = parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body); - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.equalsGreaterThanToken) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | (isAsync ? 256 /* ContainsES2017 */ | 16384 /* ContainsLexicalThis */ : 0 /* None */) | 1024 /* ContainsES2015 */; node.typeArguments = void 0; node.jsDoc = void 0; @@ -14579,7 +14610,7 @@ function createNodeFactory(flags, baseFactory2) { node.modifiers = asNodeArray(modifiers); node.declarationList = isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.declarationList); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } node.jsDoc = void 0; @@ -14829,10 +14860,10 @@ function createNodeFactory(flags, baseFactory2) { node.parameters = createNodeArray(parameters); node.type = type; node.body = body; - if (!node.body || modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (!node.body || modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { - const isAsync = modifiersToFlags(node.modifiers) & 512 /* Async */; + const isAsync = modifiersToFlags(node.modifiers) & 1024 /* Async */; const isGenerator = !!node.asteriskToken; const isAsyncGenerator = isAsync && isGenerator; node.transformFlags = propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.asteriskToken) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.parameters) | propagateChildFlags(node.type) | propagateChildFlags(node.body) & ~67108864 /* ContainsPossibleTopLevelAwait */ | (isAsyncGenerator ? 128 /* ContainsES2018 */ : isAsync ? 256 /* ContainsES2017 */ : isGenerator ? 2048 /* ContainsGenerator */ : 0 /* None */) | (node.typeParameters || node.type ? 1 /* ContainsTypeScript */ : 0 /* None */) | 4194304 /* ContainsHoistedDeclarationOrCompletion */; @@ -14863,7 +14894,7 @@ function createNodeFactory(flags, baseFactory2) { node.typeParameters = asNodeArray(typeParameters); node.heritageClauses = asNodeArray(heritageClauses); node.members = createNodeArray(members); - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateNameFlags(node.name) | propagateChildrenFlags(node.typeParameters) | propagateChildrenFlags(node.heritageClauses) | propagateChildrenFlags(node.members) | (node.typeParameters ? 1 /* ContainsTypeScript */ : 0 /* None */) | 1024 /* ContainsES2015 */; @@ -14925,7 +14956,7 @@ function createNodeFactory(flags, baseFactory2) { node.flags |= flags2 & (32 /* Namespace */ | 8 /* NestedNamespace */ | 2048 /* GlobalAugmentation */); node.name = name; node.body = body; - if (modifiersToFlags(node.modifiers) & 2 /* Ambient */) { + if (modifiersToFlags(node.modifiers) & 128 /* Ambient */) { node.transformFlags = 1 /* ContainsTypeScript */; } else { node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.name) | propagateChildFlags(node.body) | 1 /* ContainsTypeScript */; @@ -14994,19 +15025,19 @@ function createNodeFactory(flags, baseFactory2) { function updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference) { return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.name !== name || node.moduleReference !== moduleReference ? update(createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference), node) : node; } - function createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause) { + function createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes) { const node = createBaseNode(272 /* ImportDeclaration */); node.modifiers = asNodeArray(modifiers); node.importClause = importClause; node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; + node.attributes = node.assertClause = attributes; node.transformFlags |= propagateChildFlags(node.importClause) | propagateChildFlags(node.moduleSpecifier); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; node.jsDoc = void 0; return node; } - function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause), node) : node; + function updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.importClause !== importClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? update(createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes), node) : node; } function createImportClause(isTypeOnly, name, namedBindings) { const node = createBaseDeclaration(273 /* ImportClause */); @@ -15027,6 +15058,7 @@ function createNodeFactory(flags, baseFactory2) { const node = createBaseNode(300 /* AssertClause */); node.elements = createNodeArray(elements); node.multiLine = multiLine; + node.token = 132 /* AssertKeyword */; node.transformFlags |= 4 /* ContainsESNext */; return node; } @@ -15052,6 +15084,27 @@ function createNodeFactory(flags, baseFactory2) { function updateImportTypeAssertionContainer(node, clause, multiLine) { return node.assertClause !== clause || node.multiLine !== multiLine ? update(createImportTypeAssertionContainer(clause, multiLine), node) : node; } + function createImportAttributes(elements, multiLine, token) { + const node = createBaseNode(300 /* ImportAttributes */); + node.token = token ?? 118 /* WithKeyword */; + node.elements = createNodeArray(elements); + node.multiLine = multiLine; + node.transformFlags |= 4 /* ContainsESNext */; + return node; + } + function updateImportAttributes(node, elements, multiLine) { + return node.elements !== elements || node.multiLine !== multiLine ? update(createImportAttributes(elements, multiLine, node.token), node) : node; + } + function createImportAttribute(name, value) { + const node = createBaseNode(301 /* ImportAttribute */); + node.name = name; + node.value = value; + node.transformFlags |= 4 /* ContainsESNext */; + return node; + } + function updateImportAttribute(node, name, value) { + return node.name !== name || node.value !== value ? update(createImportAttribute(name, value), node) : node; + } function createNamespaceImport(name) { const node = createBaseDeclaration(274 /* NamespaceImport */); node.name = name; @@ -15112,20 +15165,20 @@ function createNodeFactory(flags, baseFactory2) { function updateExportAssignment(node, modifiers, expression) { return node.modifiers !== modifiers || node.expression !== expression ? update(createExportAssignment(modifiers, node.isExportEquals, expression), node) : node; } - function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { + function createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { const node = createBaseDeclaration(278 /* ExportDeclaration */); node.modifiers = asNodeArray(modifiers); node.isTypeOnly = isTypeOnly; node.exportClause = exportClause; node.moduleSpecifier = moduleSpecifier; - node.assertClause = assertClause; + node.attributes = node.assertClause = attributes; node.transformFlags |= propagateChildrenFlags(node.modifiers) | propagateChildFlags(node.exportClause) | propagateChildFlags(node.moduleSpecifier); node.transformFlags &= ~67108864 /* ContainsPossibleTopLevelAwait */; node.jsDoc = void 0; return node; } - function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) { - return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.assertClause !== assertClause ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause), node) : node; + function updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes) { + return node.modifiers !== modifiers || node.isTypeOnly !== isTypeOnly || node.exportClause !== exportClause || node.moduleSpecifier !== moduleSpecifier || node.attributes !== attributes ? finishUpdateExportDeclaration(createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes), node) : node; } function finishUpdateExportDeclaration(updated, original) { if (updated !== original) { @@ -15723,7 +15776,6 @@ function createNodeFactory(flags, baseFactory2) { node.imports = void 0; node.moduleAugmentations = void 0; node.ambientModuleNames = void 0; - node.resolvedModules = void 0; node.classifiableNames = void 0; node.impliedNodeFormat = void 0; return node; @@ -16335,7 +16387,7 @@ function createNodeFactory(flags, baseFactory2) { return qualifiedName; } function getExternalModuleOrNamespaceExportName(ns, node, allowComments, allowSourceMaps) { - if (ns && hasSyntacticModifier(node, 1 /* Export */)) { + if (ns && hasSyntacticModifier(node, 32 /* Export */)) { return getNamespaceMemberName(ns, getName(node), allowComments, allowSourceMaps); } return getExportName(node, allowComments, allowSourceMaps); @@ -16446,18 +16498,36 @@ function createNodeFactory(flags, baseFactory2) { } return statements; } - function updateModifiers(node, modifiers) { + function replaceModifiers(node, modifiers) { let modifierArray; if (typeof modifiers === "number") { modifierArray = createModifiersFromModifierFlags(modifiers); } else { modifierArray = modifiers; } - return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.assertClause) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) : Debug.assertNever(node); + return isTypeParameterDeclaration(node) ? updateTypeParameterDeclaration(node, modifierArray, node.name, node.constraint, node.default) : isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isConstructorTypeNode(node) ? updateConstructorTypeNode1(node, modifierArray, node.typeParameters, node.parameters, node.type) : isPropertySignature(node) ? updatePropertySignature(node, modifierArray, node.name, node.questionToken, node.type) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodSignature(node) ? updateMethodSignature(node, modifierArray, node.name, node.questionToken, node.typeParameters, node.parameters, node.type) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isConstructorDeclaration(node) ? updateConstructorDeclaration(node, modifierArray, node.parameters, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isIndexSignatureDeclaration(node) ? updateIndexSignature(node, modifierArray, node.parameters, node.type) : isFunctionExpression(node) ? updateFunctionExpression(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isArrowFunction(node) ? updateArrowFunction(node, modifierArray, node.typeParameters, node.parameters, node.type, node.equalsGreaterThanToken, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isVariableStatement(node) ? updateVariableStatement(node, modifierArray, node.declarationList) : isFunctionDeclaration(node) ? updateFunctionDeclaration(node, modifierArray, node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isInterfaceDeclaration(node) ? updateInterfaceDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isTypeAliasDeclaration(node) ? updateTypeAliasDeclaration(node, modifierArray, node.name, node.typeParameters, node.type) : isEnumDeclaration(node) ? updateEnumDeclaration(node, modifierArray, node.name, node.members) : isModuleDeclaration(node) ? updateModuleDeclaration(node, modifierArray, node.name, node.body) : isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, modifierArray, node.isTypeOnly, node.name, node.moduleReference) : isImportDeclaration(node) ? updateImportDeclaration(node, modifierArray, node.importClause, node.moduleSpecifier, node.attributes) : isExportAssignment(node) ? updateExportAssignment(node, modifierArray, node.expression) : isExportDeclaration(node) ? updateExportDeclaration(node, modifierArray, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.attributes) : Debug.assertNever(node); } - function updateModifierLike(node, modifierArray) { + function replaceDecoratorsAndModifiers(node, modifierArray) { return isParameter(node) ? updateParameterDeclaration(node, modifierArray, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer) : isPropertyDeclaration(node) ? updatePropertyDeclaration(node, modifierArray, node.name, node.questionToken ?? node.exclamationToken, node.type, node.initializer) : isMethodDeclaration(node) ? updateMethodDeclaration(node, modifierArray, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body) : isGetAccessorDeclaration(node) ? updateGetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.type, node.body) : isSetAccessorDeclaration(node) ? updateSetAccessorDeclaration(node, modifierArray, node.name, node.parameters, node.body) : isClassExpression(node) ? updateClassExpression(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : isClassDeclaration(node) ? updateClassDeclaration(node, modifierArray, node.name, node.typeParameters, node.heritageClauses, node.members) : Debug.assertNever(node); } + function replacePropertyName(node, name) { + switch (node.kind) { + case 177 /* GetAccessor */: + return updateGetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.type, node.body); + case 178 /* SetAccessor */: + return updateSetAccessorDeclaration(node, node.modifiers, name, node.parameters, node.body); + case 174 /* MethodDeclaration */: + return updateMethodDeclaration(node, node.modifiers, node.asteriskToken, name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body); + case 173 /* MethodSignature */: + return updateMethodSignature(node, node.modifiers, name, node.questionToken, node.typeParameters, node.parameters, node.type); + case 172 /* PropertyDeclaration */: + return updatePropertyDeclaration(node, node.modifiers, name, node.questionToken ?? node.exclamationToken, node.type, node.initializer); + case 171 /* PropertySignature */: + return updatePropertySignature(node, node.modifiers, name, node.questionToken, node.type); + case 303 /* PropertyAssignment */: + return updatePropertyAssignment(node, name, node.initializer); + } + } function asNodeArray(array) { return array ? createNodeArray(array) : void 0; } @@ -17181,14 +17251,14 @@ function isImportDeclaration(node) { function isImportClause(node) { return node.kind === 273 /* ImportClause */; } -function isImportTypeAssertionContainer(node) { - return node.kind === 302 /* ImportTypeAssertionContainer */; -} function isAssertClause(node) { return node.kind === 300 /* AssertClause */; } -function isAssertEntry(node) { - return node.kind === 301 /* AssertEntry */; +function isImportAttributes(node) { + return node.kind === 300 /* ImportAttributes */; +} +function isImportAttribute(node) { + return node.kind === 301 /* ImportAttribute */; } function isImportSpecifier(node) { return node.kind === 276 /* ImportSpecifier */; @@ -17766,7 +17836,7 @@ var forEachChildTable = { return visitNode2(cbNode, node.typeParameter); }, [205 /* ImportType */]: function forEachChildInImportType(node, cbNode, cbNodes) { - return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.assertions) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); + return visitNode2(cbNode, node.argument) || visitNode2(cbNode, node.attributes) || visitNode2(cbNode, node.qualifier) || visitNodes(cbNode, cbNodes, node.typeArguments); }, [302 /* ImportTypeAssertionContainer */]: function forEachChildInImportTypeAssertionContainer(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.assertClause); @@ -17940,15 +18010,15 @@ var forEachChildTable = { return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.name) || visitNode2(cbNode, node.moduleReference); }, [272 /* ImportDeclaration */]: function forEachChildInImportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.importClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, [273 /* ImportClause */]: function forEachChildInImportClause(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.namedBindings); }, - [300 /* AssertClause */]: function forEachChildInAssertClause(node, cbNode, cbNodes) { + [300 /* ImportAttributes */]: function forEachChildInImportAttributes(node, cbNode, cbNodes) { return visitNodes(cbNode, cbNodes, node.elements); }, - [301 /* AssertEntry */]: function forEachChildInAssertEntry(node, cbNode, _cbNodes) { + [301 /* ImportAttribute */]: function forEachChildInImportAttribute(node, cbNode, _cbNodes) { return visitNode2(cbNode, node.name) || visitNode2(cbNode, node.value); }, [270 /* NamespaceExportDeclaration */]: function forEachChildInNamespaceExportDeclaration(node, cbNode, cbNodes) { @@ -17963,7 +18033,7 @@ var forEachChildTable = { [275 /* NamedImports */]: forEachChildInNamedImportsOrExports, [279 /* NamedExports */]: forEachChildInNamedImportsOrExports, [278 /* ExportDeclaration */]: function forEachChildInExportDeclaration(node, cbNode, cbNodes) { - return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.assertClause); + return visitNodes(cbNode, cbNodes, node.modifiers) || visitNode2(cbNode, node.exportClause) || visitNode2(cbNode, node.moduleSpecifier) || visitNode2(cbNode, node.attributes); }, [276 /* ImportSpecifier */]: forEachChildInImportOrExportSpecifier, [281 /* ExportSpecifier */]: forEachChildInImportOrExportSpecifier, @@ -18309,7 +18379,7 @@ var Parser; var contextFlags; var topLevel = true; var parseErrorBeforeNextFinishedNode = false; - function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride) { + function parseSourceFile(fileName2, sourceText2, languageVersion2, syntaxCursor2, setParentNodes = false, scriptKind2, setExternalModuleIndicatorOverride, jsDocParsingMode = 0 /* ParseAll */) { var _a; scriptKind2 = ensureScriptKind(fileName2, scriptKind2); if (scriptKind2 === 6 /* JSON */) { @@ -18331,8 +18401,8 @@ var Parser; result2.pragmas = emptyMap; return result2; } - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2); - const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator); + initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, scriptKind2, jsDocParsingMode); + const result = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicatorOverride || setExternalModuleIndicator, jsDocParsingMode); clearState(); return result; } @@ -18344,20 +18414,21 @@ var Parser; languageVersion2, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); nextToken(); const entityName = parseEntityName( /*allowReservedWords*/ true ); - const isInvalid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length; + const isValid = token() === 1 /* EndOfFileToken */ && !parseDiagnostics.length; clearState(); - return isInvalid ? entityName : void 0; + return isValid ? entityName : void 0; } Parser2.parseIsolatedEntityName = parseIsolatedEntityName2; function parseJsonText2(fileName2, sourceText2, languageVersion2 = 2 /* ES2015 */, syntaxCursor2, setParentNodes = false) { - initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */); + initializeState(fileName2, sourceText2, languageVersion2, syntaxCursor2, 6 /* JSON */, 0 /* ParseAll */); sourceFlags = contextFlags; nextToken(); const pos = getNodePos(); @@ -18438,7 +18509,7 @@ var Parser; return result; } Parser2.parseJsonText = parseJsonText2; - function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind) { + function initializeState(_fileName, _sourceText, _languageVersion, _syntaxCursor, _scriptKind, _jsDocParsingMode) { NodeConstructor2 = objectAllocator.getNodeConstructor(); TokenConstructor2 = objectAllocator.getTokenConstructor(); IdentifierConstructor2 = objectAllocator.getIdentifierConstructor(); @@ -18474,11 +18545,15 @@ var Parser; scanner.setOnError(scanError); scanner.setScriptTarget(languageVersion); scanner.setLanguageVariant(languageVariant); + scanner.setScriptKind(scriptKind); + scanner.setJSDocParsingMode(_jsDocParsingMode); } function clearState() { scanner.clearCommentDirectives(); scanner.setText(""); scanner.setOnError(void 0); + scanner.setScriptKind(0 /* Unknown */); + scanner.setJSDocParsingMode(0 /* ParseAll */); sourceText = void 0; languageVersion = void 0; syntaxCursor = void 0; @@ -18492,7 +18567,7 @@ var Parser; notParenthesizedArrow = void 0; topLevel = true; } - function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2) { + function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2, setExternalModuleIndicator2, jsDocParsingMode) { const isDeclarationFile = isDeclarationFileName(fileName); if (isDeclarationFile) { contextFlags |= 33554432 /* Ambient */; @@ -18511,6 +18586,7 @@ var Parser; sourceFile.identifierCount = identifierCount; sourceFile.identifiers = identifiers; sourceFile.parseDiagnostics = attachFileToDiagnostics(parseDiagnostics, sourceFile); + sourceFile.jsDocParsingMode = jsDocParsingMode; if (jsDocDiagnostics) { sourceFile.jsDocDiagnostics = attachFileToDiagnostics(jsDocDiagnostics, sourceFile); } @@ -18519,7 +18595,7 @@ var Parser; } return sourceFile; function reportPragmaDiagnostic(pos, end, diagnostic) { - parseDiagnostics.push(createDetachedDiagnostic(fileName, pos, end, diagnostic)); + parseDiagnostics.push(createDetachedDiagnostic(fileName, sourceText, pos, end, diagnostic)); } } let hasDeprecatedTag = false; @@ -18759,7 +18835,7 @@ var Parser; const lastError = lastOrUndefined(parseDiagnostics); let result; if (!lastError || start !== lastError.start) { - result = createDetachedDiagnostic(fileName, start, length2, message, ...args); + result = createDetachedDiagnostic(fileName, sourceText, start, length2, message, ...args); parseDiagnostics.push(result); } parseErrorBeforeNextFinishedNode = true; @@ -18987,7 +19063,7 @@ var Parser; if (lastError) { addRelatedInfo( lastError, - createDetachedDiagnostic(fileName, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) + createDetachedDiagnostic(fileName, sourceText, openPosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, tokenToString(openKind), tokenToString(closeKind)) ); } } @@ -19157,10 +19233,16 @@ var Parser; function parseIdentifierName(diagnosticMessage) { return createIdentifier(tokenIsIdentifierOrKeyword(token()), diagnosticMessage); } + function parseIdentifierNameErrorOnUnicodeEscapeSequence() { + if (scanner.hasUnicodeEscape() || scanner.hasExtendedUnicodeEscape()) { + parseErrorAtCurrentToken(Diagnostics.Unicode_escape_sequence_cannot_appear_here); + } + return createIdentifier(tokenIsIdentifierOrKeyword(token())); + } function isLiteralPropertyName() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */ || token() === 9 /* NumericLiteral */; } - function isAssertionKey2() { + function isImportAttributeName2() { return tokenIsIdentifierOrKeyword(token()) || token() === 11 /* StringLiteral */; } function parsePropertyNameWorker(allowComputedPropertyNames) { @@ -19279,8 +19361,8 @@ var Parser; return isLiteralPropertyName(); case 9 /* ObjectBindingElements */: return token() === 23 /* OpenBracketToken */ || token() === 26 /* DotDotDotToken */ || isLiteralPropertyName(); - case 24 /* AssertEntries */: - return isAssertionKey2(); + case 24 /* ImportAttributes */: + return isImportAttributeName2(); case 7 /* HeritageClauseElement */: if (token() === 19 /* OpenBraceToken */) { return lookAhead(isValidHeritageClauseObjectLiteral); @@ -19383,7 +19465,7 @@ var Parser; case 12 /* ObjectLiteralMembers */: case 9 /* ObjectBindingElements */: case 23 /* ImportOrExportSpecifiers */: - case 24 /* AssertEntries */: + case 24 /* ImportAttributes */: return token() === 20 /* CloseBraceToken */; case 3 /* SwitchClauseStatements */: return token() === 20 /* CloseBraceToken */ || token() === 84 /* CaseKeyword */ || token() === 90 /* DefaultKeyword */; @@ -19689,7 +19771,7 @@ var Parser; return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); case 14 /* JsxChildren */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); - case 24 /* AssertEntries */: + case 24 /* ImportAttributes */: return parseErrorAtCurrentToken(Diagnostics.Identifier_or_string_literal_expected); case 25 /* JSDocComment */: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); @@ -19783,7 +19865,9 @@ var Parser; parseRightSideOfDot( allowReservedWords, /*allowPrivateIdentifiers*/ - false + false, + /*allowUnicodeEscapeSequenceInIdentifierName*/ + true ) ), pos @@ -19794,7 +19878,7 @@ var Parser; function createQualifiedName(entity, name) { return finishNode(factory2.createQualifiedName(entity, name), entity.pos); } - function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers) { + function parseRightSideOfDot(allowIdentifierNames, allowPrivateIdentifiers, allowUnicodeEscapeSequenceInIdentifierName) { if (scanner.hasPrecedingLineBreak() && tokenIsIdentifierOrKeyword(token())) { const matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); if (matchesPattern) { @@ -19815,7 +19899,10 @@ var Parser; Diagnostics.Identifier_expected ); } - return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); + if (allowIdentifierNames) { + return allowUnicodeEscapeSequenceInIdentifierName ? parseIdentifierName() : parseIdentifierNameErrorOnUnicodeEscapeSequence(); + } + return parseIdentifier(); } function parseTemplateSpans(isTaggedTemplate) { const pos = getNodePos(); @@ -20559,28 +20646,6 @@ var Parser; nextToken(); return token() === 102 /* ImportKeyword */; } - function parseImportTypeAssertions() { - const pos = getNodePos(); - const openBracePosition = scanner.getTokenStart(); - parseExpected(19 /* OpenBraceToken */); - const multiLine = scanner.hasPrecedingLineBreak(); - parseExpected(132 /* AssertKeyword */); - parseExpected(59 /* ColonToken */); - const clause = parseAssertClause( - /*skipAssertKeyword*/ - true - ); - if (!parseExpected(20 /* CloseBraceToken */)) { - const lastError = lastOrUndefined(parseDiagnostics); - if (lastError && lastError.code === Diagnostics._0_expected.code) { - addRelatedInfo( - lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") - ); - } - } - return finishNode(factory2.createImportTypeAssertionContainer(clause, multiLine), pos); - } function parseImportType() { sourceFlags |= 4194304 /* PossiblyContainsDynamicImport */; const pos = getNodePos(); @@ -20588,14 +20653,36 @@ var Parser; parseExpected(102 /* ImportKeyword */); parseExpected(21 /* OpenParenToken */); const type = parseType(); - let assertions; + let attributes; if (parseOptional(28 /* CommaToken */)) { - assertions = parseImportTypeAssertions(); + const openBracePosition = scanner.getTokenStart(); + parseExpected(19 /* OpenBraceToken */); + const currentToken2 = token(); + if (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) { + nextToken(); + } else { + parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(118 /* WithKeyword */)); + } + parseExpected(59 /* ColonToken */); + attributes = parseImportAttributes( + currentToken2, + /*skipKeyword*/ + true + ); + if (!parseExpected(20 /* CloseBraceToken */)) { + const lastError = lastOrUndefined(parseDiagnostics); + if (lastError && lastError.code === Diagnostics._0_expected.code) { + addRelatedInfo( + lastError, + createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + ); + } + } } parseExpected(22 /* CloseParenToken */); const qualifier = parseOptional(25 /* DotToken */) ? parseEntityNameOfTypeReference() : void 0; const typeArguments = parseTypeArgumentsOfTypeReference(); - return finishNode(factory2.createImportTypeNode(type, assertions, qualifier, typeArguments, isTypeOf), pos); + return finishNode(factory2.createImportTypeNode(type, attributes, qualifier, typeArguments, isTypeOf), pos); } function nextTokenIsNumericOrBigIntLiteral() { nextToken(); @@ -21590,6 +21677,8 @@ var Parser; /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + true, + /*allowUnicodeEscapeSequenceInIdentifierName*/ true )), pos); } @@ -21757,6 +21846,8 @@ var Parser; /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + false, + /*allowUnicodeEscapeSequenceInIdentifierName*/ false )), pos); } @@ -21766,10 +21857,10 @@ var Parser; const pos = getNodePos(); scanJsxIdentifier(); const isThis = token() === 110 /* ThisKeyword */; - const tagName = parseIdentifierName(); + const tagName = parseIdentifierNameErrorOnUnicodeEscapeSequence(); if (parseOptional(59 /* ColonToken */)) { scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierName()), pos); + return finishNode(factory2.createJsxNamespacedName(tagName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos); } return isThis ? finishNode(factory2.createToken(110 /* ThisKeyword */), pos) : tagName; } @@ -21781,7 +21872,9 @@ var Parser; let dotDotDotToken; let expression; if (token() !== 20 /* CloseBraceToken */) { - dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); + if (!inExpressionContext) { + dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */); + } expression = parseExpression(); } if (inExpressionContext) { @@ -21830,10 +21923,10 @@ var Parser; function parseJsxAttributeName() { const pos = getNodePos(); scanJsxIdentifier(); - const attrName = parseIdentifierName(); + const attrName = parseIdentifierNameErrorOnUnicodeEscapeSequence(); if (parseOptional(59 /* ColonToken */)) { scanJsxIdentifier(); - return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierName()), pos); + return finishNode(factory2.createJsxNamespacedName(attrName, parseIdentifierNameErrorOnUnicodeEscapeSequence()), pos); } return attrName; } @@ -21921,6 +22014,8 @@ var Parser; /*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ + true, + /*allowUnicodeEscapeSequenceInIdentifierName*/ true ); const isOptionalChain2 = questionDotToken || tryReparseOptionalChain(expression); @@ -22405,7 +22500,8 @@ var Parser; parseExpected(21 /* OpenParenToken */); let initializer; if (token() !== 27 /* SemicolonToken */) { - if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf)) { + if (token() === 115 /* VarKeyword */ || token() === 121 /* LetKeyword */ || token() === 87 /* ConstKeyword */ || token() === 160 /* UsingKeyword */ && lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLineDisallowOf) || // this one is meant to allow of + token() === 135 /* AwaitKeyword */ && lookAhead(nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine)) { initializer = parseVariableDeclarationList( /*inForStatementInitializer*/ true @@ -22726,12 +22822,6 @@ var Parser; function isUsingDeclaration() { return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine); } - function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLineDisallowOf() { - return nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine( - /*disallowOf*/ - true - ); - } function nextTokenIsUsingKeywordThenBindingIdentifierOrStartOfObjectDestructuringOnSameLine(disallowOf) { if (nextToken() === 160 /* UsingKeyword */) { return nextTokenIsBindingIdentifierOrStartOfDestructuringOnSameLine(disallowOf); @@ -23088,11 +23178,11 @@ var Parser; const modifierFlags = modifiersToFlags(modifiers); parseExpected(100 /* FunctionKeyword */); const asteriskToken = parseOptionalToken(42 /* AsteriskToken */); - const name = modifierFlags & 1024 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); + const name = modifierFlags & 2048 /* Default */ ? parseOptionalBindingIdentifier() : parseBindingIdentifier(); const isGenerator = asteriskToken ? 1 /* Yield */ : 0 /* None */; - const isAsync = modifierFlags & 512 /* Async */ ? 2 /* Await */ : 0 /* None */; + const isAsync = modifierFlags & 1024 /* Async */ ? 2 /* Await */ : 0 /* None */; const typeParameters = parseTypeParameters(); - if (modifierFlags & 1 /* Export */) + if (modifierFlags & 32 /* Export */) setAwaitContext( /*value*/ true @@ -23560,7 +23650,7 @@ var Parser; } function parseModuleOrNamespaceDeclaration(pos, hasJSDoc, modifiers, flags) { const namespaceFlag = flags & 32 /* Namespace */; - const name = parseIdentifier(); + const name = flags & 8 /* NestedNamespace */ ? parseIdentifierName() : parseIdentifier(); const body = parseOptional(25 /* DotToken */) ? parseModuleOrNamespaceDeclaration( getNodePos(), /*hasJSDoc*/ @@ -23649,15 +23739,16 @@ var Parser; parseExpected(161 /* FromKeyword */); } const moduleSpecifier = parseModuleSpecifier(); - let assertClause; - if (token() === 132 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); + const currentToken2 = token(); + let attributes; + if ((currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) { + attributes = parseImportAttributes(currentToken2); } parseSemicolon(); - const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause); + const node = factory2.createImportDeclaration(modifiers, importClause, moduleSpecifier, attributes); return withJSDoc(finishNode(node, pos), hasJSDoc); } - function parseAssertEntry() { + function parseImportAttribute() { const pos = getNodePos(); const name = tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(11 /* StringLiteral */); parseExpected(59 /* ColonToken */); @@ -23665,19 +23756,19 @@ var Parser; /*allowReturnTypeInArrowFunction*/ true ); - return finishNode(factory2.createAssertEntry(name, value), pos); + return finishNode(factory2.createImportAttribute(name, value), pos); } - function parseAssertClause(skipAssertKeyword) { + function parseImportAttributes(token2, skipKeyword) { const pos = getNodePos(); - if (!skipAssertKeyword) { - parseExpected(132 /* AssertKeyword */); + if (!skipKeyword) { + parseExpected(token2); } const openBracePosition = scanner.getTokenStart(); if (parseExpected(19 /* OpenBraceToken */)) { const multiLine = scanner.hasPrecedingLineBreak(); const elements = parseDelimitedList( - 24 /* AssertEntries */, - parseAssertEntry, + 24 /* ImportAttributes */, + parseImportAttribute, /*considerSemicolonAsDelimiter*/ true ); @@ -23686,11 +23777,11 @@ var Parser; if (lastError && lastError.code === Diagnostics._0_expected.code) { addRelatedInfo( lastError, - createDetachedDiagnostic(fileName, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") + createDetachedDiagnostic(fileName, sourceText, openBracePosition, 1, Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, "{", "}") ); } } - return finishNode(factory2.createAssertClause(elements, multiLine), pos); + return finishNode(factory2.createImportAttributes(elements, multiLine, token2), pos); } else { const elements = createNodeArray( [], @@ -23700,10 +23791,11 @@ var Parser; /*hasTrailingComma*/ false ); - return finishNode(factory2.createAssertClause( + return finishNode(factory2.createImportAttributes( elements, /*multiLine*/ - false + false, + token2 ), pos); } } @@ -23835,7 +23927,7 @@ var Parser; ); let exportClause; let moduleSpecifier; - let assertClause; + let attributes; const isTypeOnly = parseOptional(156 /* TypeKeyword */); const namespaceExportPos = getNodePos(); if (parseOptional(42 /* AsteriskToken */)) { @@ -23851,12 +23943,13 @@ var Parser; moduleSpecifier = parseModuleSpecifier(); } } - if (moduleSpecifier && token() === 132 /* AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { - assertClause = parseAssertClause(); + const currentToken2 = token(); + if (moduleSpecifier && (currentToken2 === 118 /* WithKeyword */ || currentToken2 === 132 /* AssertKeyword */) && !scanner.hasPrecedingLineBreak()) { + attributes = parseImportAttributes(currentToken2); } parseSemicolon(); setAwaitContext(savedAwaitContext); - const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); + const node = factory2.createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, attributes); return withJSDoc(finishNode(node, pos), hasJSDoc); } function parseExportAssignment(pos, hasJSDoc, modifiers) { @@ -23906,7 +23999,7 @@ var Parser; ParsingContext2[ParsingContext2["TupleElementTypes"] = 21] = "TupleElementTypes"; ParsingContext2[ParsingContext2["HeritageClauses"] = 22] = "HeritageClauses"; ParsingContext2[ParsingContext2["ImportOrExportSpecifiers"] = 23] = "ImportOrExportSpecifiers"; - ParsingContext2[ParsingContext2["AssertEntries"] = 24] = "AssertEntries"; + ParsingContext2[ParsingContext2["ImportAttributes"] = 24] = "ImportAttributes"; ParsingContext2[ParsingContext2["JSDocComment"] = 25] = "JSDocComment"; ParsingContext2[ParsingContext2["Count"] = 26] = "Count"; })(ParsingContext || (ParsingContext = {})); @@ -23925,7 +24018,8 @@ var Parser; 99 /* Latest */, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); scanner.setText(content, start, length2); currentToken = scanner.scan(); @@ -23989,7 +24083,8 @@ var Parser; 99 /* Latest */, /*syntaxCursor*/ void 0, - 1 /* JS */ + 1 /* JS */, + 0 /* ParseAll */ ); const jsDoc = doInsideOfContext(16777216 /* JSDoc */, () => parseJSDocCommentWorker(start, length2)); const sourceFile = { languageVariant: 0 /* Standard */, text: content }; @@ -24030,8 +24125,6 @@ var Parser; PropertyLikeParse2[PropertyLikeParse2["CallbackParameter"] = 4] = "CallbackParameter"; })(PropertyLikeParse || (PropertyLikeParse = {})); function parseJSDocCommentWorker(start = 0, length2) { - const saveParsingContext = parsingContext; - parsingContext |= 1 << 25 /* JSDocComment */; const content = sourceText; const end = length2 === void 0 ? content.length : start + length2; length2 = end - start; @@ -24048,26 +24141,28 @@ var Parser; let commentsPos; let comments = []; const parts = []; + const saveParsingContext = parsingContext; + parsingContext |= 1 << 25 /* JSDocComment */; const result = scanner.scanRange(start + 3, length2 - 5, doJSDocScan); parsingContext = saveParsingContext; return result; function doJSDocScan() { let state = 1 /* SawAsterisk */; let margin; - let indent2 = start - (content.lastIndexOf("\n", start) + 1) + 4; + let indent3 = start - (content.lastIndexOf("\n", start) + 1) + 4; function pushComment(text) { if (!margin) { - margin = indent2; + margin = indent3; } comments.push(text); - indent2 += text.length; + indent3 += text.length; } nextTokenJSDoc(); while (parseOptionalJsdoc(5 /* WhitespaceTrivia */)) ; if (parseOptionalJsdoc(4 /* NewLineTrivia */)) { state = 0 /* BeginningOfLine */; - indent2 = 0; + indent3 = 0; } loop: while (true) { @@ -24076,14 +24171,14 @@ var Parser; removeTrailingWhitespace(comments); if (!commentsPos) commentsPos = getNodePos(); - addTag(parseTag(indent2)); + addTag(parseTag(indent3)); state = 0 /* BeginningOfLine */; margin = void 0; break; case 4 /* NewLineTrivia */: comments.push(scanner.getTokenText()); state = 0 /* BeginningOfLine */; - indent2 = 0; + indent3 = 0; break; case 42 /* AsteriskToken */: const asterisk = scanner.getTokenText(); @@ -24093,16 +24188,16 @@ var Parser; } else { Debug.assert(state === 0 /* BeginningOfLine */); state = 1 /* SawAsterisk */; - indent2 += asterisk.length; + indent3 += asterisk.length; } break; case 5 /* WhitespaceTrivia */: Debug.assert(state !== 2 /* SavingComments */, "whitespace shouldn't come from the scanner while saving top-level comment text"); const whitespace = scanner.getTokenText(); - if (margin !== void 0 && indent2 + whitespace.length > margin) { - comments.push(whitespace.slice(margin - indent2)); + if (margin !== void 0 && indent3 + whitespace.length > margin) { + comments.push(whitespace.slice(margin - indent3)); } - indent2 += whitespace.length; + indent3 += whitespace.length; break; case 1 /* EndOfFileToken */: break loop; @@ -24139,7 +24234,7 @@ var Parser; nextTokenJSDoc(); } } - const trimmedComments = trimStringEnd(comments.join("")); + const trimmedComments = comments.join("").trimEnd(); if (parts.length && trimmedComments.length) { parts.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd ?? start, commentsPos)); } @@ -24155,7 +24250,7 @@ var Parser; } function removeTrailingWhitespace(comments2) { while (comments2.length) { - const trimmed = trimStringEnd(comments2[comments2.length - 1]); + const trimmed = comments2[comments2.length - 1].trimEnd(); if (trimmed === "") { comments2.pop(); } else if (trimmed.length < comments2[comments2.length - 1].length) { @@ -24304,7 +24399,7 @@ var Parser; } return parseTagComments(margin, indentText.slice(margin)); } - function parseTagComments(indent2, initialMargin) { + function parseTagComments(indent3, initialMargin) { const commentsPos2 = getNodePos(); let comments2 = []; const parts2 = []; @@ -24313,10 +24408,10 @@ var Parser; let margin; function pushComment(text) { if (!margin) { - margin = indent2; + margin = indent3; } comments2.push(text); - indent2 += text.length; + indent3 += text.length; } if (initialMargin !== void 0) { if (initialMargin !== "") { @@ -24331,7 +24426,7 @@ var Parser; case 4 /* NewLineTrivia */: state = 0 /* BeginningOfLine */; comments2.push(scanner.getTokenText()); - indent2 = 0; + indent3 = 0; break; case 60 /* AtToken */: scanner.resetTokenState(scanner.getTokenEnd() - 1); @@ -24341,11 +24436,11 @@ var Parser; case 5 /* WhitespaceTrivia */: Debug.assert(state !== 2 /* SavingComments */ && state !== 3 /* SavingBackticks */, "whitespace shouldn't come from the scanner while saving comment text"); const whitespace = scanner.getTokenText(); - if (margin !== void 0 && indent2 + whitespace.length > margin) { - comments2.push(whitespace.slice(margin - indent2)); + if (margin !== void 0 && indent3 + whitespace.length > margin) { + comments2.push(whitespace.slice(margin - indent3)); state = 2 /* SavingComments */; } - indent2 += whitespace.length; + indent3 += whitespace.length; break; case 19 /* OpenBraceToken */: state = 2 /* SavingComments */; @@ -24378,7 +24473,7 @@ var Parser; case 42 /* AsteriskToken */: if (state === 0 /* BeginningOfLine */) { state = 1 /* SawAsterisk */; - indent2 += 1; + indent3 += 1; break; } default: @@ -24395,7 +24490,7 @@ var Parser; } } removeLeadingNewlines(comments2); - const trimmedComments = trimStringEnd(comments2.join("")); + const trimmedComments = comments2.join("").trimEnd(); if (parts2.length) { if (trimmedComments.length) { parts2.push(finishNode(factory2.createJSDocText(trimmedComments), linkEnd2 ?? commentsPos2)); @@ -24443,8 +24538,8 @@ var Parser; function isJSDocLinkTag(kind) { return kind === "link" || kind === "linkcode" || kind === "linkplain"; } - function parseUnknownTag(start2, tagName, indent2, indentText) { - return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2); + function parseUnknownTag(start2, tagName, indent3, indentText) { + return finishNode(factory2.createJSDocUnknownTag(tagName, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); } function addTag(tag) { if (!tag) { @@ -24491,7 +24586,7 @@ var Parser; return isTypeReferenceNode(node) && isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments; } } - function parseParameterOrPropertyTag(start2, tagName, target, indent2) { + function parseParameterOrPropertyTag(start2, tagName, target, indent3) { let typeExpression = tryParseTypeExpression(); let isNameFirst = !typeExpression; skipWhitespaceOrAsterisk(); @@ -24500,8 +24595,8 @@ var Parser; if (isNameFirst && !lookAhead(parseJSDocLinkPrefix)) { typeExpression = tryParseTypeExpression(); } - const comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); - const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent2); + const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); + const nestedTypeLiteral = parseNestedTypeLiteral(typeExpression, name, target, indent3); if (nestedTypeLiteral) { typeExpression = nestedTypeLiteral; isNameFirst = true; @@ -24509,12 +24604,12 @@ var Parser; const result2 = target === 1 /* Property */ ? factory2.createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) : factory2.createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment); return finishNode(result2, start2); } - function parseNestedTypeLiteral(typeExpression, name, target, indent2) { + function parseNestedTypeLiteral(typeExpression, name, target, indent3) { if (typeExpression && isObjectOrObjectArrayTypeReference(typeExpression.type)) { const pos = getNodePos(); let child; let children; - while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent2, name))) { + while (child = tryParse(() => parseChildParameterOrPropertyTag(target, indent3, name))) { if (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) { children = append(children, child); } else if (child.kind === 352 /* JSDocTemplateTag */) { @@ -24527,14 +24622,14 @@ var Parser; } } } - function parseReturnTag(start2, tagName, indent2, indentText) { + function parseReturnTag(start2, tagName, indent3, indentText) { if (some(tags, isJSDocReturnTag)) { parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText)); } const typeExpression = tryParseTypeExpression(); - return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2); + return finishNode(factory2.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); } - function parseTypeTag(start2, tagName, indent2, indentText) { + function parseTypeTag(start2, tagName, indent3, indentText) { if (some(tags, isJSDocTypeTag)) { parseErrorAt(tagName.pos, scanner.getTokenStart(), Diagnostics._0_tag_already_specified, unescapeLeadingUnderscores(tagName.escapedText)); } @@ -24542,25 +24637,25 @@ var Parser; /*mayOmitBraces*/ true ); - const comments2 = indent2 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent2, indentText) : void 0; + const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0; return finishNode(factory2.createJSDocTypeTag(tagName, typeExpression, comments2), start2); } - function parseSeeTag(start2, tagName, indent2, indentText) { + function parseSeeTag(start2, tagName, indent3, indentText) { const isMarkdownOrJSDocLink = token() === 23 /* OpenBracketToken */ || lookAhead(() => nextTokenJSDoc() === 60 /* AtToken */ && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && isJSDocLinkTag(scanner.getTokenValue())); const nameExpression = isMarkdownOrJSDocLink ? void 0 : parseJSDocNameReference(); - const comments2 = indent2 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent2, indentText) : void 0; + const comments2 = indent3 !== void 0 && indentText !== void 0 ? parseTrailingTagComments(start2, getNodePos(), indent3, indentText) : void 0; return finishNode(factory2.createJSDocSeeTag(tagName, nameExpression, comments2), start2); } - function parseThrowsTag(start2, tagName, indent2, indentText) { + function parseThrowsTag(start2, tagName, indent3, indentText) { const typeExpression = tryParseTypeExpression(); - const comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); + const comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); return finishNode(factory2.createJSDocThrowsTag(tagName, typeExpression, comment), start2); } - function parseAuthorTag(start2, tagName, indent2, indentText) { + function parseAuthorTag(start2, tagName, indent3, indentText) { const commentStart = getNodePos(); const textOnly = parseAuthorNameAndEmail(); let commentEnd = scanner.getTokenFullStart(); - const comments2 = parseTrailingTagComments(start2, commentEnd, indent2, indentText); + const comments2 = parseTrailingTagComments(start2, commentEnd, indent3, indentText); if (!comments2) { commentEnd = scanner.getTokenFullStart(); } @@ -24644,19 +24739,19 @@ var Parser; skipWhitespace(); return finishNode(factory2.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start2, getNodePos(), margin, indentText)), start2); } - function parseTypedefTag(start2, tagName, indent2, indentText) { + function parseTypedefTag(start2, tagName, indent3, indentText) { let typeExpression = tryParseTypeExpression(); skipWhitespaceOrAsterisk(); const fullName = parseJSDocTypeNameWithNamespace(); skipWhitespace(); - let comment = parseTagComments(indent2); + let comment = parseTagComments(indent3); let end2; if (!typeExpression || isObjectOrObjectArrayTypeReference(typeExpression.type)) { let child; let childTypeTag; let jsDocPropertyTags; let hasChildren = false; - while (child = tryParse(() => parseChildPropertyTag(indent2))) { + while (child = tryParse(() => parseChildPropertyTag(indent3))) { if (child.kind === 352 /* JSDocTemplateTag */) { break; } @@ -24665,7 +24760,7 @@ var Parser; if (childTypeTag) { const lastError = parseErrorAtCurrentToken(Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags); if (lastError) { - addRelatedInfo(lastError, createDetachedDiagnostic(fileName, 0, 0, Diagnostics.The_tag_was_first_specified_here)); + addRelatedInfo(lastError, createDetachedDiagnostic(fileName, sourceText, 0, 0, Diagnostics.The_tag_was_first_specified_here)); } break; } else { @@ -24684,7 +24779,7 @@ var Parser; } end2 = end2 || comment !== void 0 ? getNodePos() : (fullName ?? typeExpression ?? tagName).end; if (!comment) { - comment = parseTrailingTagComments(start2, end2, indent2, indentText); + comment = parseTrailingTagComments(start2, end2, indent3, indentText); } const typedefTag = factory2.createJSDocTypedefTag(tagName, typeExpression, fullName, comment); return finishNode(typedefTag, start2, end2); @@ -24714,11 +24809,11 @@ var Parser; } return typeNameOrNamespaceName; } - function parseCallbackTagParameters(indent2) { + function parseCallbackTagParameters(indent3) { const pos = getNodePos(); let child; let parameters; - while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent2))) { + while (child = tryParse(() => parseChildParameterOrPropertyTag(4 /* CallbackParameter */, indent3))) { if (child.kind === 352 /* JSDocTemplateTag */) { parseErrorAtRange(child.tagName, Diagnostics.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag); break; @@ -24727,11 +24822,11 @@ var Parser; } return createNodeArray(parameters || [], pos); } - function parseJSDocSignature(start2, indent2) { - const parameters = parseCallbackTagParameters(indent2); + function parseJSDocSignature(start2, indent3) { + const parameters = parseCallbackTagParameters(indent3); const returnTag = tryParse(() => { if (parseOptionalJsdoc(60 /* AtToken */)) { - const tag = parseTag(indent2); + const tag = parseTag(indent3); if (tag && tag.kind === 349 /* JSDocReturnTag */) { return tag; } @@ -24744,23 +24839,23 @@ var Parser; returnTag ), start2); } - function parseCallbackTag(start2, tagName, indent2, indentText) { + function parseCallbackTag(start2, tagName, indent3, indentText) { const fullName = parseJSDocTypeNameWithNamespace(); skipWhitespace(); - let comment = parseTagComments(indent2); - const typeExpression = parseJSDocSignature(start2, indent2); + let comment = parseTagComments(indent3); + const typeExpression = parseJSDocSignature(start2, indent3); if (!comment) { - comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); + comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); } const end2 = comment !== void 0 ? getNodePos() : typeExpression.end; return finishNode(factory2.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start2, end2); } - function parseOverloadTag(start2, tagName, indent2, indentText) { + function parseOverloadTag(start2, tagName, indent3, indentText) { skipWhitespace(); - let comment = parseTagComments(indent2); - const typeExpression = parseJSDocSignature(start2, indent2); + let comment = parseTagComments(indent3); + const typeExpression = parseJSDocSignature(start2, indent3); if (!comment) { - comment = parseTrailingTagComments(start2, getNodePos(), indent2, indentText); + comment = parseTrailingTagComments(start2, getNodePos(), indent3, indentText); } const end2 = comment !== void 0 ? getNodePos() : typeExpression.end; return finishNode(factory2.createJSDocOverloadTag(tagName, typeExpression, comment), start2, end2); @@ -24776,17 +24871,17 @@ var Parser; } return a.escapedText === b.escapedText; } - function parseChildPropertyTag(indent2) { - return parseChildParameterOrPropertyTag(1 /* Property */, indent2); + function parseChildPropertyTag(indent3) { + return parseChildParameterOrPropertyTag(1 /* Property */, indent3); } - function parseChildParameterOrPropertyTag(target, indent2, name) { + function parseChildParameterOrPropertyTag(target, indent3, name) { let canParseTag = true; let seenAsterisk = false; while (true) { switch (nextTokenJSDoc()) { case 60 /* AtToken */: if (canParseTag) { - const child = tryParseChildTag(target, indent2); + const child = tryParseChildTag(target, indent3); if (child && (child.kind === 348 /* JSDocParameterTag */ || child.kind === 355 /* JSDocPropertyTag */) && name && (isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) { return false; } @@ -24812,7 +24907,7 @@ var Parser; } } } - function tryParseChildTag(target, indent2) { + function tryParseChildTag(target, indent3) { Debug.assert(token() === 60 /* AtToken */); const start2 = scanner.getTokenFullStart(); nextTokenJSDoc(); @@ -24832,14 +24927,14 @@ var Parser; t = 2 /* Parameter */ | 4 /* CallbackParameter */; break; case "template": - return parseTemplateTag(start2, tagName, indent2, indentText); + return parseTemplateTag(start2, tagName, indent3, indentText); default: return false; } if (!(target & t)) { return false; } - return parseParameterOrPropertyTag(start2, tagName, target, indent2); + return parseParameterOrPropertyTag(start2, tagName, target, indent3); } function parseTemplateTagTypeParameter() { const typeParameterPos = getNodePos(); @@ -24880,10 +24975,10 @@ var Parser; } while (parseOptionalJsdoc(28 /* CommaToken */)); return createNodeArray(typeParameters, pos); } - function parseTemplateTag(start2, tagName, indent2, indentText) { + function parseTemplateTag(start2, tagName, indent3, indentText) { const constraint = token() === 19 /* OpenBraceToken */ ? parseJSDocTypeExpression() : void 0; const typeParameters = parseTemplateTagTypeParameters(); - return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(), indent2, indentText)), start2); + return finishNode(factory2.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start2, getNodePos(), indent3, indentText)), start2); } function parseOptionalJsdoc(t) { if (token() === t) { @@ -24945,7 +25040,8 @@ var IncrementalParser; /*setParentNodes*/ true, sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator + sourceFile.setExternalModuleIndicator, + sourceFile.jsDocParsingMode ); } const incrementalSourceFile = sourceFile; @@ -24960,16 +25056,7 @@ var IncrementalParser; Debug.assert(textSpanEnd(changeRange.span) === textSpanEnd(textChangeRange.span)); Debug.assert(textSpanEnd(textChangeRangeNewSpan(changeRange)) === textSpanEnd(textChangeRangeNewSpan(textChangeRange))); const delta = textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - updateTokenPositionsAndMarkElements( - incrementalSourceFile, - changeRange.span.start, - textSpanEnd(changeRange.span), - textSpanEnd(textChangeRangeNewSpan(changeRange)), - delta, - oldText, - newText, - aggressiveChecks - ); + updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, textSpanEnd(changeRange.span), textSpanEnd(textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); const result = Parser.parseSourceFile( sourceFile.fileName, newText, @@ -24978,7 +25065,8 @@ var IncrementalParser; /*setParentNodes*/ true, sourceFile.scriptKind, - sourceFile.setExternalModuleIndicator + sourceFile.setExternalModuleIndicator, + sourceFile.jsDocParsingMode ); result.commentDirectives = getNewCommentDirectives( sourceFile.commentDirectives, @@ -25302,7 +25390,7 @@ var IncrementalParser; })(InvalidPosition || (InvalidPosition = {})); })(IncrementalParser || (IncrementalParser = {})); function isDeclarationFileName(fileName) { - return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && stringContains(getBaseFileName(fileName), ".d."); + return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions) || fileExtensionIs(fileName, ".ts" /* Ts */) && getBaseFileName(fileName).includes(".d."); } function parseResolutionMode(mode, pos, end, reportDiagnostic) { if (!mode) { @@ -25488,7 +25576,7 @@ function getNamedPragmaArguments(pragma, text) { return {}; if (!pragma.args) return {}; - const args = trimString(text).split(/\s+/); + const args = text.trim().split(/\s+/); const argMap = {}; for (let i = 0; i < pragma.args.length; i++) { const argument = pragma.args[i]; @@ -25914,6 +26002,7 @@ var moduleOptionDeclaration = { node16: 100 /* Node16 */, nodenext: 199 /* NodeNext */ })), + affectsSourceFile: true, affectsModuleResolution: true, affectsEmit: true, affectsBuildInfo: true, @@ -26006,7 +26095,8 @@ var commandOptionsWithoutBuild = [ { name: "allowJs", type: "boolean", - affectsModuleResolution: true, + allowJsFlag: true, + affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, @@ -26016,6 +26106,8 @@ var commandOptionsWithoutBuild = [ name: "checkJs", type: "boolean", affectsModuleResolution: true, + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, showInSimplifiedHelpView: true, category: Diagnostics.JavaScript_Support, description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, @@ -26028,6 +26120,10 @@ var commandOptionsWithoutBuild = [ affectsEmit: true, affectsBuildInfo: true, affectsModuleResolution: true, + // The checker emits an error when it sees JSX but this option is not set in compilerOptions. + // This is effectively a semantic error, so mark this option as affecting semantic diagnostics + // so we know to refresh errors when this option is changed. + affectsSemanticDiagnostics: true, paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, category: Diagnostics.Language_and_Environment, @@ -26343,6 +26439,7 @@ var commandOptionsWithoutBuild = [ bundler: 100 /* Bundler */ })), deprecatedKeys: /* @__PURE__ */ new Set(["node"]), + affectsSourceFile: true, affectsModuleResolution: true, paramType: Diagnostics.STRATEGY, category: Diagnostics.Modules, @@ -26593,7 +26690,7 @@ var commandOptionsWithoutBuild = [ affectsBuildInfo: true, affectsDeclarationPath: true, isFilePath: false, - // This is intentionally broken to support compatability with existing tsconfig files + // This is intentionally broken to support compatibility with existing tsconfig files // for correct behaviour, please use outFile category: Diagnostics.Backwards_Compatibility, paramType: Diagnostics.FILE, @@ -26885,6 +26982,7 @@ var commandOptionsWithoutBuild = [ legacy: 1 /* Legacy */, force: 3 /* Force */ })), + affectsSourceFile: true, affectsModuleResolution: true, description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files, category: Diagnostics.Language_and_Environment, @@ -26904,7 +27002,7 @@ var semanticDiagnosticsOptionDeclarations = optionDeclarations.filter((option) = var affectsEmitOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsEmit); var affectsDeclarationPathOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsDeclarationPath); var moduleResolutionOptionDeclarations = optionDeclarations.filter((option) => !!option.affectsModuleResolution); -var sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics); +var sourceFileAffectingCompilerOptions = optionDeclarations.filter((option) => !!option.affectsSourceFile || !!option.affectsBindDiagnostics); var optionsAffectingProgramStructure = optionDeclarations.filter((option) => !!option.affectsProgramStructure); var transpileOptionValueCompilerOptions = optionDeclarations.filter((option) => hasProperty(option, "transpileOptionValue")); var optionsForBuild = [ @@ -27262,8 +27360,8 @@ function specToDiagnostic(spec, disallowTrailingRecursion) { } // src/compiler/moduleNameResolver.ts -function trace(host) { - host.trace(formatMessage.apply(void 0, arguments)); +function trace(host, message, ...args) { + host.trace(formatMessage(message, ...args)); } function isTraceEnabled(compilerOptions, host) { return !!compilerOptions.traceResolution && host.trace !== void 0; @@ -27307,7 +27405,7 @@ function formatExtensions(extensions) { result.push("JSON"); return result.join(", "); } -function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, legacyResult) { +function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName, resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, state, cache, legacyResult) { if (!state.resultFromCache && !state.compilerOptions.preserveSymlinks && resolved && isExternalLibraryImport && !resolved.originalPath && !isExternalModuleNameRelative(moduleName)) { const { resolvedFileName, originalPath } = getOriginalAndResolvedFileName(resolved.path, state.host, state.traceEnabled); if (originalPath) @@ -27320,15 +27418,25 @@ function createResolvedModuleWithFailedLookupLocationsHandlingSymlink(moduleName affectingLocations, diagnostics, state.resultFromCache, + cache, legacyResult ); } -function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, legacyResult) { +function createResolvedModuleWithFailedLookupLocations(resolved, isExternalLibraryImport, failedLookupLocations, affectingLocations, diagnostics, resultFromCache, cache, legacyResult) { if (resultFromCache) { - resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations); - resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations); - resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics); - return resultFromCache; + if (!(cache == null ? void 0 : cache.isReadonly)) { + resultFromCache.failedLookupLocations = updateResolutionField(resultFromCache.failedLookupLocations, failedLookupLocations); + resultFromCache.affectingLocations = updateResolutionField(resultFromCache.affectingLocations, affectingLocations); + resultFromCache.resolutionDiagnostics = updateResolutionField(resultFromCache.resolutionDiagnostics, diagnostics); + return resultFromCache; + } else { + return { + ...resultFromCache, + failedLookupLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.failedLookupLocations, failedLookupLocations), + affectingLocations: initializeResolutionFieldForReadonlyCache(resultFromCache.affectingLocations, affectingLocations), + resolutionDiagnostics: initializeResolutionFieldForReadonlyCache(resultFromCache.resolutionDiagnostics, diagnostics) + }; + } } return { resolvedModule: resolved && { @@ -27356,6 +27464,13 @@ function updateResolutionField(to, value) { to.push(...value); return to; } +function initializeResolutionFieldForReadonlyCache(fromCache, value) { + if (!(fromCache == null ? void 0 : fromCache.length)) + return initializeResolutionField(value); + if (!value.length) + return fromCache.slice(); + return [...fromCache, ...value]; +} function readPackageJsonField(jsonContent, fieldName, typeOfTag, state) { if (!hasProperty(jsonContent, fieldName)) { if (state.traceEnabled) { @@ -27493,12 +27608,20 @@ function getNodeResolutionFeatures(options) { } return features; } -function getConditions(options, esmMode) { - const conditions = esmMode || getEmitModuleResolutionKind(options) === 100 /* Bundler */ ? ["import"] : ["require"]; +function getConditions(options, resolutionMode) { + const moduleResolution = getEmitModuleResolutionKind(options); + if (resolutionMode === void 0) { + if (moduleResolution === 100 /* Bundler */) { + resolutionMode = 99 /* ESNext */; + } else if (moduleResolution === 2 /* Node10 */) { + return []; + } + } + const conditions = resolutionMode === 99 /* ESNext */ ? ["import"] : ["require"]; if (!options.noDtsResolution) { conditions.push("types"); } - if (getEmitModuleResolutionKind(options) !== 100 /* Bundler */) { + if (moduleResolution !== 100 /* Bundler */) { conditions.push("node"); } return concatenate(conditions, options.customConditions); @@ -27555,13 +27678,13 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode); break; case 2 /* Node10 */: - result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); + result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0); break; case 1 /* Classic */: result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); break; case 100 /* Bundler */: - result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference); + result = bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode ? getConditions(compilerOptions, resolutionMode) : void 0); break; default: return Debug.fail(`Unexpected moduleResolution: ${moduleResolution}`); @@ -27569,9 +27692,11 @@ function resolveModuleName(moduleName, containingFile, compilerOptions, host, ca if (result && result.resolvedModule) (_b = perfLogger) == null ? void 0 : _b.logInfoEvent(`Module "${moduleName}" resolved to "${result.resolvedModule.resolvedFileName}"`); (_c = perfLogger) == null ? void 0 : _c.logStopResolveModule(result && result.resolvedModule ? "" + result.resolvedModule.resolvedFileName : "null"); - cache == null ? void 0 : cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); - if (!isExternalModuleNameRelative(moduleName)) { - cache == null ? void 0 : cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); + if (cache && !cache.isReadonly) { + cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference).set(moduleName, resolutionMode, result); + if (!isExternalModuleNameRelative(moduleName)) { + cache.getOrCreateCacheForNonRelativeName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result); + } } } if (traceEnabled) { @@ -27726,7 +27851,7 @@ function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, resolutionMode ); } -function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) { +function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode, conditions) { const containingDirectory = getDirectoryPath(containingFile); const esmMode = resolutionMode === 99 /* ESNext */ ? 32 /* EsmMode */ : 0; let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; @@ -27743,7 +27868,8 @@ function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + conditions ); } function tryResolveJSModuleWorker(moduleName, initialDir, host) { @@ -27759,10 +27885,12 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) { /*isConfigLookup*/ false, /*redirectedReference*/ + void 0, + /*conditions*/ void 0 ); } -function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) { +function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions) { const containingDirectory = getDirectoryPath(containingFile); let extensions = compilerOptions.noDtsResolution ? 3 /* ImplementationFiles */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; if (getResolveJsonModule(compilerOptions)) { @@ -27778,10 +27906,11 @@ function bundlerModuleNameResolver(moduleName, containingFile, compilerOptions, extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + conditions ); } -function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, isConfigLookup) { +function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, conditions, isConfigLookup) { let extensions; if (isConfigLookup) { extensions = 8 /* Json */; @@ -27792,14 +27921,18 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos } else { extensions = getResolveJsonModule(compilerOptions) ? 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */ | 8 /* Json */ : 1 /* TypeScript */ | 2 /* JavaScript */ | 4 /* Declaration */; } - return nodeModuleNameResolverWorker(0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference); + return nodeModuleNameResolverWorker(conditions ? 30 /* AllFeatures */ : 0 /* None */, moduleName, getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, !!isConfigLookup, redirectedReference, conditions); } -function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference) { +function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, isConfigLookup, redirectedReference, conditions) { var _a, _b, _c, _d; const traceEnabled = isTraceEnabled(compilerOptions, host); const failedLookupLocations = []; const affectingLocations = []; - const conditions = getConditions(compilerOptions, !!(features & 32 /* EsmMode */)); + const moduleResolution = getEmitModuleResolutionKind(compilerOptions); + conditions ?? (conditions = getConditions( + compilerOptions, + moduleResolution === 100 /* Bundler */ || moduleResolution === 2 /* Node10 */ ? void 0 : features & 32 /* EsmMode */ ? 99 /* ESNext */ : 1 /* CommonJS */ + )); const diagnostics = []; const state = { compilerOptions, @@ -27809,17 +27942,17 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, affectingLocations, packageJsonInfoCache: cache, features, - conditions, + conditions: conditions ?? emptyArray, requestContainingDirectory: containingDirectory, reportDiagnostic: (diag2) => void diagnostics.push(diag2), isConfigLookup, candidateIsFromPackageJsonField: false }; - if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(getEmitModuleResolutionKind(compilerOptions))) { - trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", conditions.map((c) => `'${c}'`).join(", ")); + if (traceEnabled && moduleResolutionSupportsPackageJsonExportsAndImports(moduleResolution)) { + trace(host, Diagnostics.Resolving_in_0_mode_with_conditions_1, features & 32 /* EsmMode */ ? "ESM" : "CJS", state.conditions.map((c) => `'${c}'`).join(", ")); } let result; - if (getEmitModuleResolutionKind(compilerOptions) === 2 /* Node10 */) { + if (moduleResolution === 2 /* Node10 */) { const priorityExtensions = extensions & (1 /* TypeScript */ | 4 /* Declaration */); const secondaryExtensions = extensions & ~(1 /* TypeScript */ | 4 /* Declaration */); result = priorityExtensions && tryResolve(priorityExtensions, state) || secondaryExtensions && tryResolve(secondaryExtensions, state) || void 0; @@ -27827,7 +27960,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, result = tryResolve(extensions, state); } let legacyResult; - if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && conditions.indexOf("import") > -1) { + if (((_a = result == null ? void 0 : result.value) == null ? void 0 : _a.isExternalLibraryImport) && !isConfigLookup && extensions & (1 /* TypeScript */ | 4 /* Declaration */) && features & 8 /* Exports */ && !isExternalModuleNameRelative(moduleName) && !extensionIsOk(1 /* TypeScript */ | 4 /* Declaration */, result.value.resolved.extension) && (conditions == null ? void 0 : conditions.includes("import"))) { traceIfEnabled(state, Diagnostics.Resolution_of_non_relative_name_failed_trying_with_modern_Node_resolution_features_disabled_to_see_if_npm_library_needs_configuration_update); const diagnosticState = { ...state, @@ -27847,6 +27980,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, affectingLocations, diagnostics, state, + cache, legacyResult ); function tryResolve(extensions2, state2) { @@ -27871,7 +28005,7 @@ function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, resolved2 = loadModuleFromSelfNameReference(extensions2, moduleName, containingDirectory, state2, cache, redirectedReference); } if (!resolved2) { - if (moduleName.indexOf(":") > -1) { + if (moduleName.includes(":")) { if (traceEnabled) { trace(host, Diagnostics.Skipping_module_0_that_looks_like_an_absolute_URI_target_file_types_Colon_1, moduleName, formatExtensions(extensions2)); } @@ -27916,7 +28050,6 @@ function realPath(path2, host, traceEnabled) { if (traceEnabled) { trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path2, real); } - Debug.assert(host.fileExists(real), `${path2} linked to nonexistent file ${real}`); return real; } function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) { @@ -27961,7 +28094,7 @@ function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, } var nodeModulesPathPart = "/node_modules/"; function pathContainsNodeModules(path2) { - return stringContains(path2, nodeModulesPathPart); + return path2.includes(nodeModulesPathPart); } function parseNodeModuleFromPath(resolved, isFolder) { const path2 = normalizePath(resolved); @@ -27997,7 +28130,7 @@ function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) { } function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) { const filename = getBaseFileName(candidate); - if (filename.indexOf(".") === -1) { + if (!filename.includes(".")) { return void 0; } let extensionless = removeFileExtension(candidate); @@ -28111,7 +28244,7 @@ function getVersionPathsOfPackageJsonInfo(packageJsonInfo, state) { return packageJsonInfo.contents.versionPaths || void 0; } function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { - var _a, _b, _c, _d, _e, _f, _g, _h; + var _a, _b, _c, _d, _e, _f; const { host, traceEnabled } = state; const packageJsonPath = combinePaths(packageDirectory, "package.json"); if (onlyRecordFailures) { @@ -28139,15 +28272,17 @@ function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) { trace(host, Diagnostics.Found_package_json_at_0, packageJsonPath); } const result = { packageDirectory, contents: { packageJsonContent, versionPaths: void 0, resolvedEntrypoints: void 0 } }; - (_e = state.packageJsonInfoCache) == null ? void 0 : _e.setPackageJsonInfo(packageJsonPath, result); - (_f = state.affectingLocations) == null ? void 0 : _f.push(packageJsonPath); + if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) + state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, result); + (_e = state.affectingLocations) == null ? void 0 : _e.push(packageJsonPath); return result; } else { if (directoryExists && traceEnabled) { trace(host, Diagnostics.File_0_does_not_exist, packageJsonPath); } - (_g = state.packageJsonInfoCache) == null ? void 0 : _g.setPackageJsonInfo(packageJsonPath, directoryExists); - (_h = state.failedLookupLocations) == null ? void 0 : _h.push(packageJsonPath); + if (state.packageJsonInfoCache && !state.packageJsonInfoCache.isReadonly) + state.packageJsonInfoCache.setPackageJsonInfo(packageJsonPath, directoryExists); + (_f = state.failedLookupLocations) == null ? void 0 : _f.push(packageJsonPath); } } function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) { @@ -28405,7 +28540,7 @@ function comparePatternKeys(a, b) { } function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) { const loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports); - if (!endsWith(moduleName, directorySeparator) && moduleName.indexOf("*") === -1 && hasProperty(lookupTable, moduleName)) { + if (!endsWith(moduleName, directorySeparator) && !moduleName.includes("*") && hasProperty(lookupTable, moduleName)) { const target = lookupTable[moduleName]; return loadModuleFromTargetImportOrExport( target, @@ -28416,7 +28551,7 @@ function loadModuleFromImportsOrExports(extensions, state, cache, redirectedRefe moduleName ); } - const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.indexOf("*") !== -1 || endsWith(k, "/")), comparePatternKeys); + const expandingKeys = sort(filter(getOwnKeys(lookupTable), (k) => k.includes("*") || endsWith(k, "/")), comparePatternKeys); for (const potentialTarget of expandingKeys) { if (state.features & 16 /* ExportsPatternTrailers */ && matchesPatternWithTrailer(potentialTarget, moduleName)) { const target = lookupTable[potentialTarget]; @@ -28488,15 +28623,18 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec extensions, /*isConfigLookup*/ false, - redirectedReference + redirectedReference, + state.conditions + ); + return toSearchResult( + result.resolvedModule ? { + path: result.resolvedModule.resolvedFileName, + extension: result.resolvedModule.extension, + packageId: result.resolvedModule.packageId, + originalPath: result.resolvedModule.originalPath, + resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension + } : void 0 ); - return toSearchResult(result.resolvedModule ? { - path: result.resolvedModule.resolvedFileName, - extension: result.resolvedModule.extension, - packageId: result.resolvedModule.packageId, - originalPath: result.resolvedModule.originalPath, - resolvedUsingTsExtension: result.resolvedModule.resolvedUsingTsExtension - } : void 0); } if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); @@ -28508,7 +28646,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target); const partsAfterFirst = parts.slice(1); - if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) { + if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) { if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); } @@ -28519,7 +28657,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } const resolvedTarget = combinePaths(scope.packageDirectory, target); const subpathParts = getPathComponents(subpath); - if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) { + if (subpathParts.includes("..") || subpathParts.includes(".") || subpathParts.includes("node_modules")) { if (state.traceEnabled) { trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName); } @@ -28529,13 +28667,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec ); } if (state.traceEnabled) { - trace( - state.host, - Diagnostics.Using_0_subpath_1_with_target_2, - isImports ? "imports" : "exports", - key, - pattern ? target.replace(/\*/g, subpath) : target + subpath - ); + trace(state.host, Diagnostics.Using_0_subpath_1_with_target_2, isImports ? "imports" : "exports", key, pattern ? target.replace(/\*/g, subpath) : target + subpath); } const finalPath = toAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath); const inputLink = tryLoadInputFileForPath(finalPath, subpath, combinePaths(scope.packageDirectory, "package.json"), isImports); @@ -28552,7 +28684,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec if (!Array.isArray(target)) { traceIfEnabled(state, Diagnostics.Entering_conditional_exports); for (const condition of getOwnKeys(target)) { - if (condition === "default" || state.conditions.indexOf(condition) >= 0 || isApplicableVersionedTypesKey(state.conditions, condition)) { + if (condition === "default" || state.conditions.includes(condition) || isApplicableVersionedTypesKey(state.conditions, condition)) { traceIfEnabled(state, Diagnostics.Matched_0_condition_1, isImports ? "imports" : "exports", condition); const subTarget = target[condition]; const result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern, key); @@ -28613,7 +28745,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } function tryLoadInputFileForPath(finalPath, entry, packagePath, isImports2) { var _a, _b, _c, _d; - if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && finalPath.indexOf("/node_modules/") === -1 && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { + if (!state.isConfigLookup && (state.compilerOptions.declarationDir || state.compilerOptions.outDir) && !finalPath.includes("/node_modules/") && (state.compilerOptions.configFile ? containsPath(scope.packageDirectory, toAbsolutePath(state.compilerOptions.configFile.fileName), !useCaseSensitiveFileNames(state)) : true)) { const getCanonicalFileName = hostGetCanonicalFileName({ useCaseSensitiveFileNames: () => useCaseSensitiveFileNames(state) }); const commonSourceDirGuesses = []; if (state.compilerOptions.rootDir || state.compilerOptions.composite && state.compilerOptions.configFilePath) { @@ -28687,7 +28819,7 @@ function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirec } } function isApplicableVersionedTypesKey(conditions, key) { - if (conditions.indexOf("types") === -1) + if (!conditions.includes("types")) return false; if (!startsWith(key, "types@")) return false; @@ -28927,7 +29059,8 @@ function classicNameResolver(moduleName, containingFile, compilerOptions, host, failedLookupLocations, affectingLocations, diagnostics, - state + state, + cache ); function tryResolve(extensions) { const resolvedUsingSettings = tryLoadModuleUsingOptionalResolutionSettings(extensions, moduleName, containingDirectory, loadModuleFromFileNoPackageId, state); @@ -29112,9 +29245,8 @@ var CheckMode = /* @__PURE__ */ ((CheckMode3) => { CheckMode3[CheckMode3["SkipContextSensitive"] = 4] = "SkipContextSensitive"; CheckMode3[CheckMode3["SkipGenericFunctions"] = 8] = "SkipGenericFunctions"; CheckMode3[CheckMode3["IsForSignatureHelp"] = 16] = "IsForSignatureHelp"; - CheckMode3[CheckMode3["IsForStringLiteralArgumentCompletions"] = 32] = "IsForStringLiteralArgumentCompletions"; - CheckMode3[CheckMode3["RestBindingElement"] = 64] = "RestBindingElement"; - CheckMode3[CheckMode3["TypeOnly"] = 128] = "TypeOnly"; + CheckMode3[CheckMode3["RestBindingElement"] = 32] = "RestBindingElement"; + CheckMode3[CheckMode3["TypeOnly"] = 64] = "TypeOnly"; return CheckMode3; })(CheckMode || {}); var SignatureCheckMode = /* @__PURE__ */ ((SignatureCheckMode3) => { @@ -29632,7 +29764,7 @@ var visitEachChildTable = { return context.factory.updateImportTypeNode( node, Debug.checkDefined(nodeVisitor(node.argument, visitor, isTypeNode)), - nodeVisitor(node.assertions, visitor, isImportTypeAssertionContainer), + nodeVisitor(node.attributes, visitor, isImportAttributes), nodeVisitor(node.qualifier, visitor, isEntityName), nodesVisitor(node.typeArguments, visitor, isTypeNode), node.isTypeOf @@ -30183,20 +30315,20 @@ var visitEachChildTable = { nodesVisitor(node.modifiers, visitor, isModifierLike), nodeVisitor(node.importClause, visitor, isImportClause), Debug.checkDefined(nodeVisitor(node.moduleSpecifier, visitor, isExpression)), - nodeVisitor(node.assertClause, visitor, isAssertClause) + nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, - [300 /* AssertClause */]: function visitEachChildOfAssertClause(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertClause( + [300 /* ImportAttributes */]: function visitEachChildOfImportAttributes(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { + return context.factory.updateImportAttributes( node, - nodesVisitor(node.elements, visitor, isAssertEntry), + nodesVisitor(node.elements, visitor, isImportAttribute), node.multiLine ); }, - [301 /* AssertEntry */]: function visitEachChildOfAssertEntry(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { - return context.factory.updateAssertEntry( + [301 /* ImportAttribute */]: function visitEachChildOfImportAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) { + return context.factory.updateImportAttribute( node, - Debug.checkDefined(nodeVisitor(node.name, visitor, isAssertionKey)), + Debug.checkDefined(nodeVisitor(node.name, visitor, isImportAttributeName)), Debug.checkDefined(nodeVisitor(node.value, visitor, isExpression)) ); }, @@ -30248,7 +30380,7 @@ var visitEachChildTable = { node.isTypeOnly, nodeVisitor(node.exportClause, visitor, isNamedExportBindings), nodeVisitor(node.moduleSpecifier, visitor, isExpression), - nodeVisitor(node.assertClause, visitor, isAssertClause) + nodeVisitor(node.attributes, visitor, isImportAttributes) ); }, [279 /* NamedExports */]: function visitEachChildOfNamedExports(node, visitor, context, nodesVisitor, _nodeVisitor, _tokenVisitor) { @@ -30809,7 +30941,7 @@ var plainJSErrors = /* @__PURE__ */ new Set([ Diagnostics.Classes_may_not_have_a_field_named_constructor.code, 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, Diagnostics.Duplicate_label_0.code, - Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments.code, + Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_set_of_attributes_as_arguments.code, Diagnostics.for_await_loops_cannot_be_used_inside_a_class_static_block.code, Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression.code, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name.code, @@ -30946,16 +31078,14 @@ var BuilderState; addReferencedFile(referencedPath); } } - if (sourceFile.resolvedTypeReferenceDirectiveNames) { - sourceFile.resolvedTypeReferenceDirectiveNames.forEach(({ resolvedTypeReferenceDirective }) => { - if (!resolvedTypeReferenceDirective) { - return; - } - const fileName = resolvedTypeReferenceDirective.resolvedFileName; - const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName); - addReferencedFile(typeFilePath); - }); - } + program.forEachResolvedTypeReferenceDirective(({ resolvedTypeReferenceDirective }) => { + if (!resolvedTypeReferenceDirective) { + return; + } + const fileName = resolvedTypeReferenceDirective.resolvedFileName; + const typeFilePath = getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName); + addReferencedFile(typeFilePath); + }, sourceFile); if (sourceFile.moduleAugmentations.length) { const checker = program.getTypeChecker(); for (const moduleName of sourceFile.moduleAugmentations) { @@ -31074,13 +31204,16 @@ var BuilderState; sourceFile, (fileName, text, _writeByteOrderMark, _onError, sourceFiles, data) => { Debug.assert(isDeclarationFileName(fileName), `File extension for signature expected to be dts: Got:: ${fileName}`); - onNewSignature(computeSignatureWithDiagnostics( - programOfThisState, - sourceFile, - text, - host, - data - ), sourceFiles); + onNewSignature( + computeSignatureWithDiagnostics( + programOfThisState, + sourceFile, + text, + host, + data + ), + sourceFiles + ); }, cancellationToken, /*emitOnly*/ @@ -31263,9 +31396,7 @@ function computeSignatureWithDiagnostics(program, sourceFile, text, host, data) text = getTextHandlingSourceMapForSignature(text, data); let sourceFileDirectory; if ((_a = data == null ? void 0 : data.diagnostics) == null ? void 0 : _a.length) { - text += data.diagnostics.map( - (diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}` - ).join("\n"); + text += data.diagnostics.map((diagnostic) => `${locationInfo(diagnostic)}${DiagnosticCategory[diagnostic.category]}${diagnostic.code}: ${flattenDiagnosticMessageText2(diagnostic.messageText)}`).join("\n"); } return (host.createHash ?? generateDjb2Hash)(text); function flattenDiagnosticMessageText2(diagnostic) { @@ -31311,6 +31442,42 @@ __export(ts_JsTyping_exports, { validatePackageName: () => validatePackageName }); +// src/jsTyping/shared.ts +var ActionSet = "action::set"; +var ActionPackageInstalled = "action::packageInstalled"; +var EventTypesRegistry = "event::typesRegistry"; +var EventBeginInstallTypes = "event::beginInstallTypes"; +var EventEndInstallTypes = "event::endInstallTypes"; +var ActionWatchTypingLocations = "action::watchTypingLocations"; +var Arguments; +((Arguments2) => { + Arguments2.GlobalCacheLocation = "--globalTypingsCacheLocation"; + Arguments2.LogFile = "--logFile"; + Arguments2.EnableTelemetry = "--enableTelemetry"; + Arguments2.TypingSafeListLocation = "--typingSafeListLocation"; + Arguments2.TypesMapLocation = "--typesMapLocation"; + Arguments2.NpmLocation = "--npmLocation"; + Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation"; +})(Arguments || (Arguments = {})); +function hasArgument(argumentName) { + return sys.args.includes(argumentName); +} +function findArgument(argumentName) { + const index = sys.args.indexOf(argumentName); + return index >= 0 && index < sys.args.length - 1 ? sys.args[index + 1] : void 0; +} +function nowString() { + const d = /* @__PURE__ */ new Date(); + return `${d.getHours().toString().padStart(2, "0")}:${d.getMinutes().toString().padStart(2, "0")}:${d.getSeconds().toString().padStart(2, "0")}.${d.getMilliseconds().toString().padStart(3, "0")}`; +} +var indentStr = "\n "; +function indent(str) { + return indentStr + str.replace(/\n/g, indentStr); +} +function stringifyIndented(json) { + return indent(JSON.stringify(json, void 0, 2)); +} + // src/jsTyping/jsTyping.ts function isTypingUpToDate(cachedTyping, availableTypingVersions) { const availableVersion = new Version(getProperty(availableTypingVersions, `ts${versionMajorMinor}`) || getProperty(availableTypingVersions, "latest")); @@ -31417,21 +31584,21 @@ function discoverTypings(host, log2, fileNames, projectRootPath, safeList, packa ); addInferredTypings(module2, "Inferred typings from unresolved imports"); } - packageNameToTypingLocation.forEach((typing, name) => { - const registryEntry = typesRegistry.get(name); - if (inferredTypings.has(name) && inferredTypings.get(name) === void 0 && registryEntry !== void 0 && isTypingUpToDate(typing, registryEntry)) { - inferredTypings.set(name, typing.typingLocation); - } - }); for (const excludeTypingName of exclude) { const didDelete = inferredTypings.delete(excludeTypingName); if (didDelete && log2) log2(`Typing for ${excludeTypingName} is in exclude list, will be ignored.`); } + packageNameToTypingLocation.forEach((typing, name) => { + const registryEntry = typesRegistry.get(name); + if (inferredTypings.get(name) === false && registryEntry !== void 0 && isTypingUpToDate(typing, registryEntry)) { + inferredTypings.set(name, typing.typingLocation); + } + }); const newTypingNames = []; const cachedTypingPaths = []; inferredTypings.forEach((inferred, typing) => { - if (inferred !== void 0) { + if (inferred) { cachedTypingPaths.push(inferred); } else { newTypingNames.push(typing); @@ -31439,11 +31606,11 @@ function discoverTypings(host, log2, fileNames, projectRootPath, safeList, packa }); const result = { cachedTypingPaths, newTypingNames, filesToWatch }; if (log2) - log2(`Result: ${JSON.stringify(result)}`); + log2(`Finished typings discovery:${stringifyIndented(result)}`); return result; function addInferredTyping(typingName) { if (!inferredTypings.has(typingName)) { - inferredTypings.set(typingName, void 0); + inferredTypings.set(typingName, false); } } function addInferredTypings(typingNames, message) { @@ -31616,35 +31783,6 @@ function renderPackageNameValidationFailureWorker(typing, result, name, isScopeN } } -// src/jsTyping/shared.ts -var ActionSet = "action::set"; -var ActionPackageInstalled = "action::packageInstalled"; -var EventTypesRegistry = "event::typesRegistry"; -var EventBeginInstallTypes = "event::beginInstallTypes"; -var EventEndInstallTypes = "event::endInstallTypes"; -var ActionWatchTypingLocations = "action::watchTypingLocations"; -var Arguments; -((Arguments2) => { - Arguments2.GlobalCacheLocation = "--globalTypingsCacheLocation"; - Arguments2.LogFile = "--logFile"; - Arguments2.EnableTelemetry = "--enableTelemetry"; - Arguments2.TypingSafeListLocation = "--typingSafeListLocation"; - Arguments2.TypesMapLocation = "--typesMapLocation"; - Arguments2.NpmLocation = "--npmLocation"; - Arguments2.ValidateDefaultNpmLocation = "--validateDefaultNpmLocation"; -})(Arguments || (Arguments = {})); -function hasArgument(argumentName) { - return sys.args.indexOf(argumentName) >= 0; -} -function findArgument(argumentName) { - const index = sys.args.indexOf(argumentName); - return index >= 0 && index < sys.args.length - 1 ? sys.args[index + 1] : void 0; -} -function nowString() { - const d = /* @__PURE__ */ new Date(); - return `${padLeft(d.getHours().toString(), 2, "0")}:${padLeft(d.getMinutes().toString(), 2, "0")}:${padLeft(d.getSeconds().toString(), 2, "0")}.${padLeft(d.getMilliseconds().toString(), 3, "0")}`; -} - // src/typingsInstallerCore/typingsInstaller.ts var nullLog = { isEnabled: () => false, @@ -31727,7 +31865,7 @@ var TypingsInstaller = class { } install(req) { if (this.log.isEnabled()) { - this.log.writeLine(`Got install request ${JSON.stringify(req)}`); + this.log.writeLine(`Got install request${stringifyIndented(req)}`); } if (req.cachePath) { if (this.log.isEnabled()) { @@ -31750,9 +31888,6 @@ var TypingsInstaller = class { this.typesRegistry, req.compilerOptions ); - if (this.log.isEnabled()) { - this.log.writeLine(`Finished typings discovery: ${JSON.stringify(discoverTypingsResult)}`); - } this.watchFiles(req.projectName, discoverTypingsResult.filesToWatch); if (discoverTypingsResult.newTypingNames.length) { this.installTypings(req, req.cachePath || this.globalCachePath, discoverTypingsResult.cachedTypingPaths, discoverTypingsResult.newTypingNames); @@ -31794,8 +31929,8 @@ var TypingsInstaller = class { const npmConfig = JSON.parse(this.installTypingHost.readFile(packageJson)); const npmLock = JSON.parse(this.installTypingHost.readFile(packageLockJson)); if (this.log.isEnabled()) { - this.log.writeLine(`Loaded content of '${packageJson}': ${JSON.stringify(npmConfig)}`); - this.log.writeLine(`Loaded content of '${packageLockJson}'`); + this.log.writeLine(`Loaded content of '${packageJson}':${stringifyIndented(npmConfig)}`); + this.log.writeLine(`Loaded content of '${packageLockJson}':${stringifyIndented(npmLock)}`); } if (npmConfig.devDependencies && npmLock.dependencies) { for (const key in npmConfig.devDependencies) { @@ -32061,7 +32196,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller { log2 ); this.npmPath = npmLocation2 !== void 0 ? npmLocation2 : getDefaultNPMLocation(process.argv[0], validateDefaultNpmLocation2, this.installTypingHost); - if (stringContains(this.npmPath, " ") && this.npmPath[0] !== `"`) { + if (this.npmPath.includes(" ") && this.npmPath[0] !== `"`) { this.npmPath = `"${this.npmPath}"`; } if (this.log.isEnabled()) { @@ -32133,8 +32268,7 @@ var NodeTypingsInstaller = class extends TypingsInstaller { } sendResponse(response) { if (this.log.isEnabled()) { - this.log.writeLine(`Sending response: - ${JSON.stringify(response)}`); + this.log.writeLine(`Sending response:${stringifyIndented(response)}`); } process.send(response); if (this.log.isEnabled()) { @@ -32160,12 +32294,12 @@ var NodeTypingsInstaller = class extends TypingsInstaller { try { const stdout = this.nodeExecSync(command, { ...options, encoding: "utf-8" }); if (this.log.isEnabled()) { - this.log.writeLine(` Succeeded. stdout:${indent(sys.newLine, stdout)}`); + this.log.writeLine(` Succeeded. stdout:${indent2(sys.newLine, stdout)}`); } return false; } catch (error) { const { stdout, stderr } = error; - this.log.writeLine(` Failed. stdout:${indent(sys.newLine, stdout)}${sys.newLine} stderr:${indent(sys.newLine, stderr)}`); + this.log.writeLine(` Failed. stdout:${indent2(sys.newLine, stdout)}${sys.newLine} stderr:${indent2(sys.newLine, stderr)}`); return true; } } @@ -32209,7 +32343,7 @@ process.on("message", (req) => { )); installer.handleRequest(req); }); -function indent(newline, str) { +function indent2(newline, str) { return str && str.length ? `${newline} ` + str.replace(/\r?\n/, `${newline} `) : ""; } // Annotate the CommonJS export names for ESM import in node: diff --git a/node_modules/typescript/package.json b/node_modules/typescript/package.json index 3fbb3b8..20f449b 100644 --- a/node_modules/typescript/package.json +++ b/node_modules/typescript/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "5.2.2", + "version": "5.3.3", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ @@ -42,7 +42,6 @@ "@esfx/canceltoken": "^1.0.0", "@octokit/rest": "^19.0.13", "@types/chai": "^4.3.4", - "@types/fs-extra": "^9.0.13", "@types/glob": "^8.1.0", "@types/microsoft__typescript-etw": "^0.1.1", "@types/minimist": "^1.2.2", @@ -59,16 +58,15 @@ "chai": "^4.3.7", "chalk": "^4.1.2", "chokidar": "^3.5.3", - "del": "^6.1.1", "diff": "^5.1.0", - "esbuild": "^0.18.1", + "dprint": "^0.42.3", + "esbuild": "^0.19.0", "eslint": "^8.22.0", "eslint-formatter-autolinkable-stylish": "^1.2.0", "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", "fast-xml-parser": "^4.0.11", - "fs-extra": "^9.1.0", "glob": "^8.1.0", "hereby": "^1.6.4", "jsonc-parser": "^3.2.0", @@ -77,6 +75,7 @@ "mocha-fivemat-progress-reporter": "^0.1.0", "ms": "^2.1.3", "node-fetch": "^3.2.10", + "playwright": "^1.38.0", "source-map-support": "^0.5.21", "tslib": "^2.5.0", "typescript": "^5.0.2", @@ -96,6 +95,7 @@ "clean": "hereby clean", "gulp": "hereby", "lint": "hereby lint", + "format": "dprint fmt", "setup-hooks": "node scripts/link-hooks.mjs" }, "browser": { @@ -106,7 +106,8 @@ "buffer": false, "@microsoft/typescript-etw": false, "source-map-support": false, - "inspector": false + "inspector": false, + "perf_hooks": false }, "packageManager": "npm@8.19.4", "volta": { diff --git a/package-lock.json b/package-lock.json index a91c3ef..5c048a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,40 +1,36 @@ { "name": "paradox-anticheat", - "version": "3.4.5", + "version": "3.4.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "paradox-anticheat", - "version": "3.4.5", + "version": "3.4.6", "hasInstallScript": true, "dependencies": { - "@minecraft/server": "1.8.0-beta.1.20.50-stable", - "@minecraft/server-ui": "1.2.0-beta.1.20.50-stable", - "https": "^1.0.0", - "os": "^0.1.2", - "path": "^0.12.7", - "readline": "^1.3.0" + "@minecraft/server": "1.9.0-beta.1.20.60-stable", + "@minecraft/server-ui": "1.2.0-beta.1.20.60-stable" }, "devDependencies": { - "@types/fs-extra": "11.0.3", + "@types/fs-extra": "11.0.4", "@types/glob": "8.1.0", - "@types/node": "20.8.8", - "@typescript-eslint/eslint-plugin": "6.11.0", - "@typescript-eslint/parser": "6.11.0", + "@types/node": "20.11.16", + "@typescript-eslint/eslint-plugin": "6.21.0", + "@typescript-eslint/parser": "6.21.0", "7zip-bin": "5.2.0", "adm-zip": "0.5.10", "chmodr": "1.2.0", "docsify-cli": "4.4.4", - "eslint": "8.54.0", - "eslint-config-prettier": "9.0.0", - "eslint-plugin-prettier": "5.0.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "9.1.0", + "eslint-plugin-prettier": "5.1.3", "finalhandler": "1.2.0", - "fs-extra": "11.1.1", + "fs-extra": "11.2.0", "glob": "10.3.10", - "prettier": "3.1.0", + "prettier": "3.2.5", "serve-static": "1.15.0", - "typescript": "5.2.2" + "typescript": "5.3.3" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -71,9 +67,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -151,9 +147,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", - "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -260,20 +256,28 @@ "integrity": "sha512-stbUtINCXbcLNRlGNVX68xRC6ZYq3k3CYmfptwrCcPBEUjVOpVkSj3H4Y0qiSYB+1rVWv7DgiP7Uf9++50Ne5g==" }, "node_modules/@minecraft/server": { - "version": "1.8.0-beta.1.20.50-stable", - "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.8.0-beta.1.20.50-stable.tgz", - "integrity": "sha512-2QT+JWbwHWepaX2Md8g7s9HsNXqoSS2ztdTpI6ICNl1Uyodeg4P1D3oZnNVy7sVS5FTnh86P8YVTsL2oYla/SA==", + "version": "1.9.0-beta.1.20.60-stable", + "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.9.0-beta.1.20.60-stable.tgz", + "integrity": "sha512-HmqmaQzX/SE2Q4yVezlLn/wc/cthts+4CEenFq5+YUFpXJ0fYV+LJ3GBvskWcRymNimoroP9D3R8WQXdpTnaKw==", "dependencies": { "@minecraft/common": "^1.1.0" } }, "node_modules/@minecraft/server-ui": { - "version": "1.2.0-beta.1.20.50-stable", - "resolved": "https://registry.npmjs.org/@minecraft/server-ui/-/server-ui-1.2.0-beta.1.20.50-stable.tgz", - "integrity": "sha512-NAE2h2nD6ZUN0CI0Qqe66qpFrQzHOrDUIoWLMWOzxknjbz61TFRyhY82ih4Yo2kTgYjdLFlTMkfKwCYtTAtUkQ==", + "version": "1.2.0-beta.1.20.60-stable", + "resolved": "https://registry.npmjs.org/@minecraft/server-ui/-/server-ui-1.2.0-beta.1.20.60-stable.tgz", + "integrity": "sha512-gSn4ZtyY/DsZ2LBXMX/nRQAFcj38Pb+lEUwqWKt+YCuD6SnmUT9VnZoJmaeHZD0SlvroICXi5HFfgDd7LaH6eQ==", "dependencies": { "@minecraft/common": "^1.0.0", - "@minecraft/server": "^1.8.0-beta.1.20.50-stable" + "@minecraft/server": "^1.8.0" + } + }, + "node_modules/@minecraft/server-ui/node_modules/@minecraft/server": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.8.0.tgz", + "integrity": "sha512-YqH8eowsC2eAaJ/EXgUC+zfyo+iWa0jTCuLC/2zEpObg6nCJRjy0NIhIZqzxspbUOgf+qakNjNZIhLMwL+a6Fg==", + "dependencies": { + "@minecraft/common": "^1.1.0" } }, "node_modules/@nodelib/fs.scandir": { @@ -321,19 +325,11 @@ "node": ">=14" } }, - "node_modules/@pkgr/utils": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", - "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "fast-glob": "^3.3.0", - "is-glob": "^4.0.3", - "open": "^9.1.0", - "picocolors": "^1.0.0", - "tslib": "^2.6.0" - }, "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" }, @@ -341,51 +337,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@pkgr/utils/node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@pkgr/utils/node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@pkgr/utils/node_modules/open": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", - "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", - "dev": true, - "dependencies": { - "default-browser": "^4.0.0", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", @@ -408,9 +359,9 @@ } }, "node_modules/@types/fs-extra": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.3.tgz", - "integrity": "sha512-sF59BlXtUdzEAL1u0MSvuzWd7PdZvZEtnaVkzX5mjpdWTJ8brG0jUqve3jPCzSzvAKKMHTG8F8o/WMQLtleZdQ==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "dev": true, "dependencies": { "@types/jsonfile": "*", @@ -449,31 +400,31 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.8.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.8.tgz", - "integrity": "sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ==", + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", "dev": true, "dependencies": { - "undici-types": "~5.25.1" + "undici-types": "~5.26.4" } }, "node_modules/@types/semver": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.5.tgz", - "integrity": "sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", + "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.11.0.tgz", - "integrity": "sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/type-utils": "6.11.0", - "@typescript-eslint/utils": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -555,15 +506,15 @@ "dev": true }, "node_modules/@typescript-eslint/parser": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.11.0.tgz", - "integrity": "sha512-+whEdjk+d5do5nxfxx73oanLL9ghKO3EwM9kBCkUtWMRwWuPaFv9ScuqlYfQ6pAD6ZiJhky7TZ2ZYhrMsfMxVQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/typescript-estree": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4" }, "engines": { @@ -606,13 +557,13 @@ "dev": true }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz", - "integrity": "sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -623,13 +574,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.11.0.tgz", - "integrity": "sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.11.0", - "@typescript-eslint/utils": "6.11.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -673,9 +624,9 @@ "dev": true }, "node_modules/@typescript-eslint/types": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.11.0.tgz", - "integrity": "sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -686,16 +637,17 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz", - "integrity": "sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/visitor-keys": "6.11.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -748,9 +700,9 @@ "dev": true }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -769,17 +721,17 @@ "dev": true }, "node_modules/@typescript-eslint/utils": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.11.0.tgz", - "integrity": "sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.11.0", - "@typescript-eslint/types": "6.11.0", - "@typescript-eslint/typescript-estree": "6.11.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", "semver": "^7.5.4" }, "engines": { @@ -806,9 +758,9 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -827,12 +779,12 @@ "dev": true }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz", - "integrity": "sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.11.0", + "@typescript-eslint/types": "6.21.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -856,9 +808,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1018,15 +970,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/big-integer": { - "version": "1.6.51", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", - "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -1148,18 +1091,6 @@ "node": ">=8" } }, - "node_modules/bplist-parser": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", - "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", - "dev": true, - "dependencies": { - "big-integer": "^1.6.44" - }, - "engines": { - "node": ">= 5.10.0" - } - }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -1181,21 +1112,6 @@ "node": ">=8" } }, - "node_modules/bundle-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", - "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", - "dev": true, - "dependencies": { - "run-applescript": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -1637,58 +1553,12 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/default-browser": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", - "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", - "dev": true, - "dependencies": { - "bundle-name": "^3.0.0", - "default-browser-id": "^3.0.0", - "execa": "^7.1.1", - "titleize": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser-id": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", - "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", - "dev": true, - "dependencies": { - "bplist-parser": "^0.2.0", - "untildify": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/defer-to-connect": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", "dev": true }, - "node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", @@ -1969,15 +1839,15 @@ } }, "node_modules/eslint": { - "version": "8.54.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", - "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.54.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -2024,9 +1894,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -2036,23 +1906,24 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", - "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", + "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.8.5" + "synckit": "^0.8.6" }, "engines": { "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/prettier" + "url": "https://opencollective.com/eslint-plugin-prettier" }, "peerDependencies": { "@types/eslint": ">=8.0.0", "eslint": ">=8.0.0", + "eslint-config-prettier": "*", "prettier": ">=3.0.0" }, "peerDependenciesMeta": { @@ -2363,47 +2234,6 @@ "node": ">= 0.6" } }, - "node_modules/execa": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", - "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^3.0.7", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/execa/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2581,9 +2411,9 @@ } }, "node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dev": true, "dependencies": { "graceful-fs": "^4.2.0", @@ -2697,9 +2527,9 @@ } }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2838,20 +2668,6 @@ "node": ">= 0.8" } }, - "node_modules/https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https/-/https-1.0.0.tgz", - "integrity": "sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==" - }, - "node_modules/human-signals": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", - "dev": true, - "engines": { - "node": ">=14.18.0" - } - }, "node_modules/ignore": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", @@ -2941,21 +2757,6 @@ "is-ci": "bin.js" } }, - "node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2986,24 +2787,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", - "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", - "dev": true, - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-installed-globally": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", @@ -3056,18 +2839,6 @@ "node": ">=8" } }, - "node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -3282,12 +3053,6 @@ "integrity": "sha512-CjFVuFq/IfrdqesAXfg+hzlDKu6A2n80ZIq0Kl9kWjoHh9j1N9Uvk5X0/MmN0hOfm5F9YBswlClhcwnmtwz7gA==", "dev": true }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3322,18 +3087,6 @@ "node": ">=4" } }, - "node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", @@ -3441,33 +3194,6 @@ "node": ">=8" } }, - "node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -3489,21 +3215,6 @@ "wrappy": "1" } }, - "node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/open": { "version": "6.4.0", "resolved": "https://registry.npmjs.org/open/-/open-6.4.0.tgz", @@ -3548,11 +3259,6 @@ "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", "dev": true }, - "node_modules/os": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os/-/os-0.1.2.tgz", - "integrity": "sha512-ZoXJkvAnljwvc56MbvhtKVWmSkzV712k42Is2mA0+0KTSRakq5XXuXpjZjgAt9ctzl51ojhQWakQQpmOvXWfjQ==" - }, "node_modules/p-cancelable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", @@ -3679,15 +3385,6 @@ "node": ">= 0.8" } }, - "node_modules/path": { - "version": "0.12.7", - "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", - "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", - "dependencies": { - "process": "^0.11.1", - "util": "^0.10.3" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3740,12 +3437,6 @@ "node": ">=8" } }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -3777,9 +3468,9 @@ } }, "node_modules/prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", - "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -3812,14 +3503,6 @@ "node": ">=6" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3907,11 +3590,6 @@ "node": ">=8.10.0" } }, - "node_modules/readline": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", - "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==" - }, "node_modules/registry-auth-token": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz", @@ -4042,128 +3720,6 @@ "node": "*" } }, - "node_modules/run-applescript": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", - "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", - "dev": true, - "dependencies": { - "execa": "^5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "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" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/run-applescript/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/run-applescript/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/run-applescript/node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/run-applescript/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/run-applescript/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/run-applescript/node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4412,18 +3968,6 @@ "node": ">=8" } }, - "node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", @@ -4458,13 +4002,13 @@ } }, "node_modules/synckit": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz", - "integrity": "sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==", + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", + "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", "dev": true, "dependencies": { - "@pkgr/utils": "^2.3.1", - "tslib": "^2.5.0" + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" }, "engines": { "node": "^14.18.0 || >=16.0.0" @@ -4500,18 +4044,6 @@ "node": ">=4" } }, - "node_modules/titleize": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", - "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/to-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -4603,9 +4135,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -4616,9 +4148,9 @@ } }, "node_modules/undici-types": { - "version": "5.25.3", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", - "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, "node_modules/unique-string": { @@ -4651,15 +4183,6 @@ "node": ">= 0.8" } }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/update-notifier": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", @@ -4757,19 +4280,6 @@ "node": ">=4" } }, - "node_modules/util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "dependencies": { - "inherits": "2.0.3" - } - }, - "node_modules/util/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" - }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", diff --git a/package.json b/package.json index 68a90eb..a2d0720 100644 --- a/package.json +++ b/package.json @@ -1,37 +1,33 @@ { "name": "paradox-anticheat", - "version": "3.4.5", + "version": "3.4.6", "productName": "Paradox-AntiCheat", "description": "A utility to fight against malicious hackers on Bedrock Edition", "private": true, "type": "module", "devDependencies": { - "@types/fs-extra": "11.0.3", + "@types/fs-extra": "11.0.4", "@types/glob": "8.1.0", - "@types/node": "20.8.8", - "@typescript-eslint/eslint-plugin": "6.11.0", - "@typescript-eslint/parser": "6.11.0", + "@types/node": "20.11.16", + "@typescript-eslint/eslint-plugin": "6.21.0", + "@typescript-eslint/parser": "6.21.0", "7zip-bin": "5.2.0", "adm-zip": "0.5.10", "chmodr": "1.2.0", "docsify-cli": "4.4.4", - "eslint": "8.54.0", - "eslint-config-prettier": "9.0.0", - "eslint-plugin-prettier": "5.0.1", + "eslint": "^8.56.0", + "eslint-config-prettier": "9.1.0", + "eslint-plugin-prettier": "5.1.3", "finalhandler": "1.2.0", - "fs-extra": "11.1.1", + "fs-extra": "11.2.0", "glob": "10.3.10", - "prettier": "3.1.0", + "prettier": "3.2.5", "serve-static": "1.15.0", - "typescript": "5.2.2" + "typescript": "5.3.3" }, "dependencies": { - "@minecraft/server": "1.8.0-beta.1.20.50-stable", - "@minecraft/server-ui": "1.2.0-beta.1.20.50-stable", - "https": "^1.0.0", - "os": "^0.1.2", - "path": "^0.12.7", - "readline": "^1.3.0" + "@minecraft/server": "1.9.0-beta.1.20.60-stable", + "@minecraft/server-ui": "1.2.0-beta.1.20.60-stable" }, "eslintConfig": { "parserOptions": { @@ -96,7 +92,7 @@ } }, "scripts": { - "postinstall": "npm install --prefix src @minecraft/vanilla-data@1.20.50 && npm install --prefix src crypto-es@2.1.0", + "postinstall": "npm install --prefix src @minecraft/vanilla-data@1.20.60 && npm install --prefix src crypto-es@2.1.0", "enableMcLoopback": "CheckNetIsolation.exe LoopbackExempt -a -p=S-1-15-2-1958404141-86561845-1752920682-3514627264-368642714-62675701-733520436", "enableMcPreviewLoopback": "CheckNetIsolation.exe LoopbackExempt -a -p=S-1-15-2-424268864-5579737-879501358-346833251-474568803-887069379-4040235476", "format": "eslint --fix .", diff --git a/save.json b/save.json new file mode 100644 index 0000000..6bea2c9 --- /dev/null +++ b/save.json @@ -0,0 +1,30 @@ +[ + "${member.name}", + "${player.name}", + "${reason}", + "\\n", + "§", + "textures", + "§f§4[§6Paradox§4]§f", + "paradoxConfig", + "ShowRulesOnJoin", + "isMuted", + "@a[tag=paradoxOpped]", + "customcommands", + "help", + "notify", + "ability @s mute true", + "${channelName}", + "Rank:", + "creative", + "survival", + "adventure", + "spectator", + "paradoxOpped", + "salt", + "hash", + "all", + "item", + "paradox:kick", + "Prefix" +] diff --git a/src/commands/debug_commands/listitems.ts b/src/commands/debug_commands/listitems.ts index 9ea55c1..64bb44b 100644 --- a/src/commands/debug_commands/listitems.ts +++ b/src/commands/debug_commands/listitems.ts @@ -13,12 +13,12 @@ function listItems(player: Player, prefix: string, debug: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n項目リスト§4[§6 コマンド§4]§f: listitems`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: listitems [オプション].`, - `§4[§6オプション§4]§f: ヘルプ`, - `§4[§6説明§4]§f:ゲーム内のすべてのアイテムとその最大スタックを表示する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: listitems`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: listitems [optional]`, + `§4[§6Optional§4]§f: help`, + `§4[§6説明§4]§f: Prints every item in the game and their max stack.`, + `§4[§6Examples§4]§f:`, ` ${prefix}listitems`, ` ${prefix}listitems help`, ]); @@ -30,33 +30,37 @@ function listItems(player: Player, prefix: string, debug: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function listitems(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/debug_commands/listitems.js:30)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/debug_commands/listitems.js:30)"); } const player = message.sender; const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // ハッシュ/ソルトのチェックとパスワードの検証 + // Check for hash/salt and validate password const hash = player.getDynamicProperty("hash"); const salt = player.getDynamicProperty("salt"); - // オペレーターのIDまたは暗号化パスワードのいずれかをキーとして使用する。 + // Use either the operator's ID or the encryption password as the key const key = configuration.encryption.password ? configuration.encryption.password : player.id; - // ハッシュを生成する + // Generate the hash const encode = (world as WorldExtended).hashWithSalt(salt as string, key); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (!encode || hash === undefined || encode !== hash) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.debug) { return listItems(player, prefix, configuration.debug); @@ -66,5 +70,5 @@ export function listitems(message: ChatSendAfterEvent, args: string[]) { const itemInfo = new ItemStack(MinecraftItemTypes[item as keyof typeof MinecraftItemTypes]); console.log("'" + itemInfo.typeId + "': " + itemInfo.maxAmount + ","); } - sendMsgToPlayer(player, "§f§4[§6Paradox§4]§f List completed. Check console logs."); + sendMsgToPlayer(player, "§f§4[§6Paradox§4]§f リストが完成しました。コンソールログを確認してください。"); } diff --git a/src/commands/handler.ts b/src/commands/handler.ts index 6f3fb50..d7e8dde 100644 --- a/src/commands/handler.ts +++ b/src/commands/handler.ts @@ -1,7 +1,7 @@ import { ChatSendAfterEvent, ChatSendBeforeEvent, Player } from "@minecraft/server"; import { sendMsgToPlayer } from "../util.js"; -// すべてのコマンドをインポートする +// import all our commands import { kick } from "./moderation/kick.js"; import { help } from "./moderation/help.js"; import { notify } from "./moderation/notify.js"; @@ -175,18 +175,6 @@ const commandDefinitions: Record 0) { + if (args[0] !== "すべて" && args.length > 0) { let counter = 0; let requestedEntity: string = ""; for (const entity of filteredEntities) { @@ -87,7 +91,7 @@ export function despawn(message: ChatSendAfterEvent, args: string[]) { } } if (counter > 0) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f デスポーン:\n\n §o§6|§f §4[§f${requestedEntity}§4]§f §6数量: §4x${counter}§f`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f デスポーン:\n\n §o§6|§f §4[§f${requestedEntity}§4]§f §6数: §4x${counter}§f`); } else { return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f デスポーンする実体が見つからない!`); } @@ -118,7 +122,7 @@ export function despawn(message: ChatSendAfterEvent, args: string[]) { if (entityCount.hasOwnProperty(entity)) { const count = entityCount[entity]; if (count > 0) { - entityMessage += ` §o§6|§f §4[§f${entity}§4]§f §6Amount: §4x${count}§f\n`; + entityMessage += ` §o§6|§f §4[§f${entity}§4]§f §6数: §4x${count}§f\n`; totalCounter += count; } } @@ -127,7 +131,7 @@ export function despawn(message: ChatSendAfterEvent, args: string[]) { sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f デスポーンした:`); return sendMsgToPlayer(player, entityMessage); } else { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f デスポーンする実体が見つからない!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f デスポーンするモブが見つからない!`); } } } diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index 69db00a..ca1d900 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -8,23 +8,23 @@ function kickHelp(player: Player, prefix: string, setting: boolean) { if (!setting) { commandStatus = "§6[§4無効§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§a有効§6]§f。"; } return sendMsgToPlayer(player, [ - `\nプレイヤーをキックする。`, - `§4[§6Status§4]§f: ${commandStatus}`, + `\n§o§4[§6コマンド§4]§f: kick`, + `§4[§6ステータス§4]§f: ${commandStatus}.`, `§4[§6使用§4]§f: キック [オプション].`, - `§4[§6オプション§4]§f: ユーザー名、理由、ヘルプ`, - `§4[§6Description§4]§f:指定されたユーザをキックし、オプションで理由を与える。`, + `§4[§6Optional§4]§f: username, reason, help`, + `§4[§6説明§4]§f:指定されたユーザをキックし、オプションで理由を与える。`, `§4[§6例§4]§f:`, ` ${prefix}kick ${player.name}`, - ` §4- §6理由を指定せずに${player.name}をキック§f`, + ` §4- §6Kick ${player.name} without specifying a reason§f`, ` ${prefix}kick ${player.name} Hacker!`, - ` §4- §6理由"Hacker!"で${player.name}をキック§f`, + ` §4- §6Kick ${player.name} with the reason "Hacker!"§f`, ` ${prefix}kick ${player.name} Stop trolling!`, - ` §4- §6理由"Stop trolling!"で${player.name}をキック§f`, + ` §4- §6Kick ${player.name} with the reason "Stop trolling!"§f`, ` ${prefix}kick help`, - ` §4- §6コマンドのヘルプを表示§f`, + ` §4- §6Show command help§f`, ]); } @@ -35,13 +35,13 @@ function kickHelp(player: Player, prefix: string, setting: boolean) { */ export function kick(message: ChatSendAfterEvent, args: string[]) { handleKick(message, args).catch((error) => { - console.error("Paradox Unhandled Rejection: ", error); + console.error("Paradoxの未処理拒否:", error); // スタックトレース情報の抽出 if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("Error originated from:", sourceInfo[0]); + console.error("エラーの原因", sourceInfo[0]); } } }); @@ -50,7 +50,7 @@ export function kick(message: ChatSendAfterEvent, args: string[]) { async function handleKick(message: ChatSendAfterEvent, args: string[]) { // 必要なパラメータが定義されていることを確認する if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/kick.js:33)"); + return console.warn(`新しい日付()}。|` + "エラー: ${message} が定義されていません。渡し忘れですか?(./commands/moderation/kick.js:33)"); } const player = message.sender; @@ -60,7 +60,11 @@ async function handleKick(message: ChatSendAfterEvent, args: string[]) { // ユーザーにコマンドを実行する権限があることを確認する。 if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -81,7 +85,7 @@ async function handleKick(message: ChatSendAfterEvent, args: string[]) { // 引数処理の変更 let playerName = args.shift(); - let reason = "No reason specified"; + let reason = "理由なし"; // コマンドに理由があるかチェックする if (args.length > 1) { @@ -114,8 +118,8 @@ async function handleKick(message: ChatSendAfterEvent, args: string[]) { return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 自分を蹴ることはできない。`); } player.runCommandAsync(`kick "${member.name}" §f\n\n${reason}`).catch((error) => { - console.warn(`${new Date()} | ` + error); + console.warn(`新しい日付()}。|` + error); return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手を蹴ることができなかった.`); }); - return sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f が§7${member.name}§f を蹴りました。理由 §7${reason}§f`); + return sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f が §7${member.name}§f を蹴った。理由: §7${reason}§f`); } diff --git a/src/commands/moderation/lockdown.ts b/src/commands/moderation/lockdown.ts index ef21fb0..d2a2041 100644 --- a/src/commands/moderation/lockdown.ts +++ b/src/commands/moderation/lockdown.ts @@ -9,26 +9,26 @@ function lockdownHelp(player: Player, prefix: string, lockdownBoolean: boolean, if (!setting) { commandStatus = "§6[§4無効§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§a有効§6]§f。"; } let moduleStatus: string; if (lockdownBoolean === false) { moduleStatus = "§6[§4無効§6]§f"; } else { - moduleStatus = "§6[§a有効§6]§f"; + moduleStatus = "§6[§a有効§6]§f。"; } return sendMsgToPlayer(player, [ - `\n[コマンド§4]§f:ロックダウン`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6Module§4]§f: ${moduleStatus}`, + `\n§o§4[§6コマンド§4]§f: lockdown`, + `§4[§6ステータス§4]§f: ${commandStatus}.`, + `§4[§6モジュール§4]§f: ${moduleStatus}.`, `§4[§6使用§4]§f:ロックダウン [オプション]`, - `§4[§6オプション§4]§f: ヘルプ`, + `§4[§6Optional§4]§f: help`, `§4[§6解説§4]§f:メンテナンスのためにスタッフを除くプレイヤーをサーバーから追い出す。`, `§4[§6例§4]§f:`, - ` ${prefix}lockdown`, + ` プレフィックス}ロックダウン`, ` §メンテナンスのためのサーバロックダウンの開始§f`, ` ${prefix}lockdown help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -39,13 +39,13 @@ function lockdownHelp(player: Player, prefix: string, lockdownBoolean: boolean, */ export function lockdown(message: ChatSendAfterEvent, args: string[]) { handleLockdown(message, args).catch((error) => { - console.error("Paradox Unhandled Rejection: ", error); + console.error("Paradoxの未処理拒否:", error); // スタックトレース情報の抽出 if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("Error originated from:", sourceInfo[0]); + console.error("エラーの原因", sourceInfo[0]); } } }); @@ -54,7 +54,7 @@ export function lockdown(message: ChatSendAfterEvent, args: string[]) { async function handleLockdown(message: ChatSendAfterEvent, args: string[]) { // 必要なパラメータが定義されていることを確認する if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/lockdown.js:37)"); + return console.warn(`新しい日付()}。|` + "エラー: ${message} が定義されていません。渡し忘れですか?(./commands/moderation/lockdown.js:37)"); } const player = message.sender; @@ -64,7 +64,11 @@ async function handleLockdown(message: ChatSendAfterEvent, args: string[]) { // ユーザーにコマンドを実行する権限があることを確認する。 if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } // ダイナミック・プロパティ・ブール値の取得 @@ -81,14 +85,15 @@ async function handleLockdown(message: ChatSendAfterEvent, args: string[]) { // すでにロックされている場合は、サーバーのロックを解除する。 if (configuration.modules.lockdown.enabled) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§fサーバはもはやロックダウンされていません!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4] サーバーのロックダウンを停止しました`); configuration.modules.lockdown.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); return; } // ロックするデフォルトの理由 - const reason = "メンテナンス中です!ご迷惑をおかけします"; + const reason = "Under Maintenance! Sorry for the inconvenience."; + // ロックする const players = world.getPlayers(); for (const pl of players) { diff --git a/src/commands/moderation/modules.ts b/src/commands/moderation/modules.ts index f45ddd9..e06d58f 100644 --- a/src/commands/moderation/modules.ts +++ b/src/commands/moderation/modules.ts @@ -12,16 +12,16 @@ function modulesHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: モジュール`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: モジュール [オプション]`, - `§4[§6オプション§4]§f: ヘルプ`, - `§4[§6説明§4]§fParadox でBooleanになっているモジュールと無効になっているモジュールの一覧を表示します。`, - `§4[§6例§4]§f`, - `${prefix}modules`, - ` §4- §6 Boolean・無効なモジュールのリストを表示する§f`, + `\n§o§4[§6コマンド§4]§f: modules`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: modules [optional]`, + `§4[§6Optional§4]§f: help`, + `§4[§6説明§4]§f: Shows a list of modules that are enabled and disabled in Paradox.`, + `§4[§6Examples§4]§f:`, + ` ${prefix}modules`, + ` §4- §6Show a list of enabled and disabled modules§f`, ` ${prefix}modules help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -31,41 +31,45 @@ function modulesHelp(player: Player, prefix: string, setting: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function modules(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/modules.js:28)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/moderation/modules.js:28)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.modules) { return modulesHelp(player, prefix, configuration.customcommands.modules); } - // 得点 + // scores const commandblocks = ScoreManager.getScore("commandblocks", player); const cmds = ScoreManager.getScore("cmds", player); const encharmor = ScoreManager.getScore("encharmor", player); const antikb = ScoreManager.getScore("antikb", player); - // ブーリアン + // Booleans const worldBorderBoolean = configuration.modules.worldBorder.enabled; - const xrayABoolean = configuration.modules.xrayA.enabled; + const xrayaBoolean = configuration.modules.xrayA.enabled; const opsBoolean = configuration.modules.ops.enabled; const speedABoolean = configuration.modules.speedA.enabled; const nameSpoofABoolean = configuration.modules.namespoofA.enabled; @@ -94,7 +98,7 @@ export function modules(message: ChatSendAfterEvent, args: string[]) { const illegalEnchantmentBoolean = configuration.modules.illegalEnchantment.enabled; const lockdownBoolean = configuration.modules.lockdown.enabled; const antiShulkerBoolean = configuration.modules.antishulker.enabled; - const chatranksBoolean = configuration.modules.chatranks.enabled; + const chatRanksBoolean = configuration.modules.chatranks.enabled; const stackBanBoolean = configuration.modules.stackBan.enabled; const badPackets2Boolean = configuration.modules.badpackets2.enabled; const antiSpamBoolean = configuration.modules.antispam.enabled; @@ -106,21 +110,21 @@ export function modules(message: ChatSendAfterEvent, args: string[]) { const antiKillAuraBoolean = configuration.modules.antiKillAura.enabled; const afkBoolean = configuration.modules.afk.enabled; const antiPhaseABoolean = configuration.modules.antiphaseA.enabled; - const spawnprotectionBoolean = configuration.modules.spawnprotection.enabled; + const spawnProtectionBoolean = configuration.modules.spawnprotection.enabled; - // 数字 + // Numbers const worldBorderOverworldNumber = configuration.modules.worldBorder.overworld; const worldBorderNetherNumber = configuration.modules.worldBorder.nether; const worldBorderEndNumber = configuration.modules.worldBorder.end; const spawnProtectionRadius = configuration.modules.spawnprotection.radius; - //ベクター + //Vectors const spawnProtectionVector3 = configuration.modules.spawnprotection.vector3; const status = (b: string | number | boolean | Vector3) => (b ? "§a有効" : "§4無効"); sendMsgToPlayer(player, [ - `§f§4[§6Paradox§4]§f モジュールのリスト.`, + `§f§4[§6Paradox§4]§f List Of Modules:`, `§o§6|§f Anti-GMA: ${status(adventureGMBoolean)}`, `§o§6|§f Anti-GMS: ${status(survivalGMBoolean)}`, `§o§6|§f Anti-GMC: ${status(creativeGMBoolean)}`, @@ -139,33 +143,33 @@ export function modules(message: ChatSendAfterEvent, args: string[]) { `§o§6|§f InvalidSprintA: ${status(InvalidSprintABoolean)}`, `§o§6|§f FlyA: ${status(flyABoolean)}`, `§o§6|§f AntiFallA: ${status(antiFallABoolean)}`, - `§o§6|§f IllegalItemsA: ${illegalItemsABoolean ? `§a有効§f [Ban Illegal Stacks: ${status(stackBanBoolean)}§f]` : "§4無効"}.`, - `§o§6|§f IllegalItemsB: ${illegalItemsBBoolean ? `§a有効§f [Ban Illegal Stacks: ${status(stackBanBoolean)}§f]` : "§4無効"}.`, + `§o§6|§f IllegalItemsA: ${illegalItemsABoolean ? `§aENABLED§f [Ban Illegal Stacks: ${status(stackBanBoolean)}§f]` : "§4無効"}`, + `§o§6|§f IllegalItemsB: ${illegalItemsBBoolean ? `§aENABLED§f [Ban Illegal Stacks: ${status(stackBanBoolean)}§f]` : "§4無効"}`, `§o§6|§f IllegalItemsC: ${status(illegalItemsCBoolean)}`, `§o§6|§f IllegalEnchantments: ${status(illegalEnchantmentBoolean)}`, `§o§6|§f IllegalLores: ${status(illegalLoresBoolean)}`, `§o§6|§f Anti-ScaffoldA: ${status(antiScaffoldABoolean)}`, `§o§6|§f Anti-NukerA: ${status(antiNukerABoolean)}`, - `§o§6|§f XrayA: ${status(xrayABoolean)}`, - `§o§6|§f Chat: ${status(chatranksBoolean)}`, + `§o§6|§f XrayA: ${status(xrayaBoolean)}`, + `§o§6|§f Chat: ${status(chatRanksBoolean)}`, `§o§6|§f Anti-Shulkers: ${status(antiShulkerBoolean)}`, `§o§6|§f Hotbar: ${status(hotbarBoolean)}`, `§o§6|§f OPS: ${status(opsBoolean)}`, `§o§6|§f Salvage: ${status(savageBoolean)}`, `§o§6|§f Lockdown: ${status(lockdownBoolean)}`, `§o§6|§f Badpackets2: ${status(badPackets2Boolean)}`, - `§o§6|§f OverideCommandBlocksBoolean: ${status(cmds)}`, + `§o§6|§f OverideCommandBlocksEnabled: ${status(cmds)}`, `§o§6|§f RemoveCommandBlocks: ${status(commandblocks)}`, `§o§6|§f Anti-Knockback: ${status(antikb)}`, `§o§6|§f Anti-KillAura: ${status(antiKillAuraBoolean)}`, `§o§6|§f Anti-Enchanted: ${status(encharmor)}`, `§o§6|§f Autoclicker: ${status(autoclickerBoolean)}`, - `§o§6|§f World Border: ${worldBorderBoolean ? `§a有効§f (Overworld: §6${worldBorderOverworldNumber}§f Nether: §6${worldBorderNetherNumber}§f End: §6${worldBorderEndNumber}§f)` : "§4無効"}.`, + `§o§6|§f World Border: ${worldBorderBoolean ? `§aENABLED§f (Overworld: §6${worldBorderOverworldNumber}§f Nether: §6${worldBorderNetherNumber}§f End: §6${worldBorderEndNumber}§f)` : "§4無効"}`, `§o§6|§f ClearLag: ${status(clearLagBoolean)}`, `§o§6|§f ShowRules: ${status(showrulesBoolean)}`, `§o§6|§f AutoBan: ${status(autobanBoolean)}`, `§o§6|§f AFK: ${status(afkBoolean)}`, `§o§6|§f AntiPhaseA: ${status(antiPhaseABoolean)}`, - `§o§6|§f Spawn Protection: ${spawnprotectionBoolean ? `§a有効§f (X: §6${spawnProtectionVector3.x}§f Y: §6${spawnProtectionVector3.y}§f Z: §6${spawnProtectionVector3.z}§f Radius: §6${spawnProtectionRadius}§f)` : "§4無効"}.`, + `§o§6|§f Spawn Protection: ${spawnProtectionBoolean ? `§aENABLED§f (X: §6${spawnProtectionVector3.x}§f Y: §6${spawnProtectionVector3.y}§f Z: §6${spawnProtectionVector3.z}§f Radius: §6${spawnProtectionRadius}§f)` : "§4無効"}`, ]); } diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 013827f..39054ff 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -8,21 +8,21 @@ function muteHelp(player: Player, prefix: string, setting: boolean) { if (!setting) { commandStatus = "§6[§4無効§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§a有効§6]§f。"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f:ミュート`, - `§4[§6Status§4]§f: ${commandStatus}`, + `\n§o§4[§6コマンド§4]§f: mute`, + `§4[§6ステータス§4]§f: ${commandStatus}.`, `§4[§6使用§4]§f: ミュート [オプション]`, - `§4[§6オプション§4]§f: ミュート、理性、ヘルプ`, - `§4[§6Description§4]§f:指定されたユーザをミュートし、オプションで理由を与える。`, + `§4[§6Optional§4]§f: mute, reason, help`, + `§4[§6説明§4]§f:指定されたユーザをミュートし、オプションで理由を与える。`, `§4[§6例§4]§f:`, ` ${prefix}mute ${player.name}`, - ` §4- §6理由を指定せずに${player.name}をミュート§f`, + ` §4- §6Mute ${player.name} without specifying a reason§f`, ` ${prefix}mute ${player.name} Stop spamming!`, - ` §4- §6理由"Stop spamming!"で${player.name}をミュート§f`, + ` §4- §6Mute ${player.name} with the reason "Stop spamming!"§f`, ` ${prefix}mute help`, - ` §4- §6コマンドのヘルプを表示§f`, + ` §4- §6Show command help§f`, ]); } @@ -33,13 +33,13 @@ function muteHelp(player: Player, prefix: string, setting: boolean) { */ export function mute(message: ChatSendAfterEvent, args: string[]) { handleMute(message, args).catch((error) => { - console.error("Paradox Unhandled Rejection: ", error); + console.error("Paradoxの未処理拒否:", error); // スタックトレース情報の抽出 if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("Error originated from:", sourceInfo[0]); + console.error("エラーの原因", sourceInfo[0]); } } }); @@ -48,7 +48,7 @@ export function mute(message: ChatSendAfterEvent, args: string[]) { async function handleMute(message: ChatSendAfterEvent, args: string[]) { // 必要なパラメータが定義されていることを確認する if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/moderation/mute.js:30)"); + return console.warn(`新しい日付()}。|` + "エラー: ${message} が定義されていません。渡し忘れですか?./commands/moderation/mute.js:30)"); } const player = message.sender; @@ -58,7 +58,11 @@ async function handleMute(message: ChatSendAfterEvent, args: string[]) { // ユーザーにコマンドを実行する権限があることを確認する。 if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -79,7 +83,7 @@ async function handleMute(message: ChatSendAfterEvent, args: string[]) { // 引数処理の変更 let playerName = args.shift(); - let reason = "No reason specified"; + let reason = "理由なし"; // コマンドに理由があるかチェックする if (args.length > 1) { @@ -126,8 +130,8 @@ async function handleMute(message: ChatSendAfterEvent, args: string[]) { } else { return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのプレイヤーは既にミュートされている。`); } - // エデュケーション・エディションがBooleanであれば、合法的にミュートする。 + // エデュケーション・エディションが有効であれば、合法的にミュートする。 member.runCommandAsync(`ability @s mute true`); - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You have been muted. Reason: §7${reason}§f`); - return sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has muted §7${member.name}§f. Reason: §7${reason}§f`); + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f ミュートされています。理由: §7${reason}§f`); + return sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f が §7${member.name}§f をミュートしました。理由: §7${reason}§f`); } diff --git a/src/commands/moderation/notify.ts b/src/commands/moderation/notify.ts index 8eb3334..ce3c724 100644 --- a/src/commands/moderation/notify.ts +++ b/src/commands/moderation/notify.ts @@ -8,19 +8,19 @@ function notifyHelp(player: Player, prefix: string, setting: boolean) { if (!setting) { commandStatus = "§6[§4無効§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§a有効§6]§f。"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: 通知`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: 通知 [任意].`, - `§4[§6オプション§4]§f: ヘルプ`, + `\n§o§4[§6コマンド§4]§f: notify`, + `§4[§6ステータス§4]§f: ${commandStatus}.`, + `§4[§6使用法§4]§f: notify [optional]`, + `§4[§6Optional§4]§f: help`, `§4[§6説明§4]§f:不正行為の通知をトグルのように切り替える。`, `§4[§6例§4]§f:`, ` ${prefix}notify`, ` §4- §6チート通知の切り替え§f`, ` ${prefix}notify help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -32,7 +32,7 @@ function notifyHelp(player: Player, prefix: string, setting: boolean) { export function notify(message: ChatSendAfterEvent, args: string[]) { // 必要なパラメータが定義されていることを確認する if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/notify.js:26)"); + return console.warn(`新しい日付()}。|` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/moderation/notify.js:26)"); } const player = message.sender; @@ -42,7 +42,11 @@ export function notify(message: ChatSendAfterEvent, args: string[]) { // ユーザーにコマンドを実行する権限があることを確認する。 if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -64,9 +68,9 @@ export function notify(message: ChatSendAfterEvent, args: string[]) { sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはチート通知を無効にしています。`); } - // Booleanにする + // 有効にする if (!tagBoolean) { player.addTag("notify"); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fチート通知をBooleanにしました。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fチート通知を有効にしました。`); } } diff --git a/src/commands/moderation/op.ts b/src/commands/moderation/op.ts index 9c6c8ba..d52afee 100644 --- a/src/commands/moderation/op.ts +++ b/src/commands/moderation/op.ts @@ -7,27 +7,27 @@ import ConfigInterface from "../../interfaces/Config.js"; function opHelp(player: Player, prefix: string, configuration: ConfigInterface) { let commandStatus: string; if (!configuration.customcommands.op) { - commandStatus = "§6[§4無効§6]§f"; + commandStatus = "§6[§4DISABLED§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§aENABLED§6]§f"; } - const passwordDescription = configuration.encryption.password ? `§4- §6パスワードを使ってParadox-Op§fを獲得する` : `§4-§6自分にParadoxを捧げよ-Op§f`; + const passwordDescription = configuration.encryption.password ? `§4- §6Use your password to gain Paradox-Op§f` : `§4- §6Give yourself Paradox-Op§f`; const commandUsage = configuration.encryption.password ? `${prefix}op ` : `${prefix}op`; return sendMsgToPlayer(player, [ `\n§o§4[§6コマンド§4]§f: op`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6Usage§4]§f: ${prefix}op [optional]`, - `§4[§6オプション§4]§f: ユーザー名、ヘルプ`, - `§4[§6説明§4]§f:Paradox AntiCheat 機能の使用を許可する。`, - `§4[§6例§4]§f:`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: ${prefix}op [オプション]`, + `§4[§6オプション§4]§f: ユーザー名, ヘルプ`, + `§4[§6説明§4]§f: Paradox AntiCheatの機能を使用するための権限を付与します。`, + `§4[§6例§4]§f:`, ` ${commandUsage}`, ` ${passwordDescription}`, ` ${prefix}op help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6コマンドのヘルプを表示§f`, ` ${prefix}op `, - ` §4- §6他のプレイヤーにParadox・オプを与える§f`, + ` §4- §6別のプレイヤーにParadox-Opを付与§f`, ]); } @@ -37,7 +37,7 @@ function opHelp(player: Player, prefix: string, configuration: ConfigInterface) * @param {string[]} args - Additional arguments provided (optional). */ export function op(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/op.js:30)"); } @@ -54,20 +54,20 @@ export function op(message: ChatSendAfterEvent, args: string[]) { if (!operatorHash || !operatorSalt || (operatorHash !== (world as WorldExtended).hashWithSalt(operatorSalt as string, configuration.encryption.password || operator.id) && (world as WorldExtended).isValidUUID(operatorSalt as string))) { if (!configuration.encryption.password) { if (!operator.isOp()) { - return sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§fこのコマンドを使うにはオペレータである必要がある。`); + return sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f このコマンドを使用するには、オペレーターである必要があります.`); } } } - // argsがNULL、空、またはヘルプかどうかをチェックする。 + // Check if args is null, empty, or for help if (args[0]?.toLowerCase() === "help") { return opHelp(operator, prefix, configuration); } if (args.length >= 1 && operatorHash === (world as WorldExtended).hashWithSalt(operatorSalt as string, configuration.encryption.password || operator.id)) { - // オペレーターが「Paradox・オプ」を他のプレーヤーに与えたい + // Operator wants to grant "Paradox-Op" to another player const targetPlayerName = args.join(" "); // Combine all arguments into a single string - // 要求された選手を見つけよう + // Try to find the player requested let targetPlayer: Player; if (args.length) { const players = world.getPlayers(); @@ -86,62 +86,62 @@ export function op(message: ChatSendAfterEvent, args: string[]) { const targetSalt = (world as WorldExtended).generateRandomUUID(); targetPlayer.setDynamicProperty("salt", targetSalt); - // オペレーターのIDまたは暗号化パスワードのいずれかをキーとして使用する。 + // Use either the operator's ID or the encryption password as the key const targetKey = configuration.encryption.password ? configuration.encryption.password : targetPlayer.id; - // ハッシュを生成する + // Generate the hash const newHash = (world as WorldExtended).hashWithSalt(targetSalt, targetKey); targetPlayer.setDynamicProperty("hash", newHash); dynamicPropertyRegistry.setProperty(targetPlayer, targetPlayer.id, targetPlayer.name); - sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f You have granted Paradox-Op to §7${targetPlayer.name}§f.`); - sendMsgToPlayer(targetPlayer, `§f§4[§6Paradox§4]§f あなたは今、操作している!`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${targetPlayer.name}§f is now Paradox-Opped.`); + sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f §7${targetPlayer.name}§f に Paradox-Op を付与しました。.`); + sendMsgToPlayer(targetPlayer, `§f§4[§6Paradox§4]§f あなたは今opです!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${targetPlayer.name}§f は Paradox-Opped になりました.`); targetPlayer.addTag("paradoxOpped"); } else { - sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f §7${targetPlayer.name}§f is already Paradox-Opped.`); + sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f §7${targetPlayer.name}§f は既に逆説的である.`); } } else { - sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f Could not find player §7${targetPlayerName}§f.`); + sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f プレイヤー §7${targetPlayerName}§f が見つかりませんでした.`); } } else if (args.length === 0 && !configuration.encryption.password) { - // オペレータが自分のパスワードを変更したい + // Operator wants to change their own password const targetSalt = (world as WorldExtended).generateRandomUUID(); - // オペレーターのIDまたは暗号化パスワードのいずれかをキーとして使用する。 + // Use either the operator's ID or the encryption password as the key const key = configuration.encryption.password ? configuration.encryption.password : operator.id; - // ハッシュを生成する + // Generate the hash const newHash = (world as WorldExtended).hashWithSalt(targetSalt, key); operator.setDynamicProperty("hash", newHash); operator.setDynamicProperty("salt", targetSalt); operator.addTag("paradoxOpped"); - sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§fあなたは今、Paradoxに縛られている!`); + sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f あなたは今管理者です!`); dynamicPropertyRegistry.setProperty(operator, operator.id, operator.name); return; } else if (args.length === 1 && configuration.encryption.password) { - // パスワードを使用して Paradox-Op を取得できるようにする。 + // Allow the user to gain Paradox-Op using the password if (configuration.encryption.password === args[0]) { const targetSalt = (world as WorldExtended).generateRandomUUID(); - // 提供されたパスワードを使ってハッシュを生成する + // Generate the hash using the provided password const newHash = (world as WorldExtended).hashWithSalt(targetSalt, args[0]); operator.setDynamicProperty("hash", newHash); operator.setDynamicProperty("salt", targetSalt); operator.addTag("paradoxOpped"); - sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§fあなたは今、パスワードを使ってParadox-Oppedされています。`); + sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f これで、パスワードを使用して管理者になりました.`); dynamicPropertyRegistry.setProperty(operator, operator.id, operator.name); } else { - // パスワードの誤り - sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§fパスワードが間違っています。このコマンドを使用するには Operator である必要があります。`); + // Incorrect password + sendMsgToPlayer(operator, `§f§4[§6Paradox§4]§f パスワードが正しくありません。このコマンドを使用するには、オペレーターである必要があります.`); } } else { return opHelp(operator, prefix, configuration); diff --git a/src/commands/moderation/paradoxui.ts b/src/commands/moderation/paradoxui.ts index 2e035cd..67a518a 100644 --- a/src/commands/moderation/paradoxui.ts +++ b/src/commands/moderation/paradoxui.ts @@ -8,21 +8,21 @@ import ConfigInterface from "../../interfaces/Config.js"; function paradoxuiHelp(player: Player, prefix: string, setting: boolean) { let commandStatus: string; if (!setting) { - commandStatus = "§6[§4無効§6]§f"; + commandStatus = "§6[§4DISABLED§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§aENABLED§6]§f"; } return sendMsgToPlayer(player, [ - `§6コマンド§4]§f: パラドクスイ`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: paradoxui [オプション]。`, - `§4[§6オプション§4]§f: ヘルプ`, - `§4[§6説明§4]§f:メインメニューの GUI を表示する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: paradoxui`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: paradoxui [オプション]`, + `§4[§6オプション§4]§f: help`, + `§4[§6説明§4]§f: メインメニューのGUIを表示します。`, + `§4[§6例§4]§f:`, ` ${prefix}paradoxui`, ` §4- §6ParadoxのメインメニューGUIを開く§f`, ` ${prefix}paradoxui help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6コマンドのヘルプを表示§f`, ]); } @@ -32,32 +32,32 @@ function paradoxuiHelp(player: Player, prefix: string, setting: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function paradoxUI(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/paradoxui.js:36)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/moderation/paradoxui.js:36)"); } const player = message.sender; const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - //の前にUIコマンドを呼び出すことができた場合に備えて、プレーヤーがルールタグを持っているかどうかをチェックする。 - // のルールが表示された。 + //check to see if the player has the rules tag incase they have been able to call the UI command before the + // rules have been displayed. if (player.hasTag("ShowRulesOnJoin") && configuration.modules.showrules.enabled === true) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはルールに同意していません。表示されましたら、お試しください。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ルールに同意していない。これらが表示されたら試してみてください.`); return ShowRules(); } - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.paradoxiu) { return paradoxuiHelp(player, prefix, configuration.customcommands.paradoxiu); } - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fParadoxUIのチャットウィンドウを閉じる。`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f がメニューを開きました§f!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ParadoxUIのチャットウィンドウを閉じる.`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f §6ParadoxUI§f を要求しました!`); paradoxui(player); } diff --git a/src/commands/moderation/prefix.ts b/src/commands/moderation/prefix.ts index c4e583c..c9691de 100644 --- a/src/commands/moderation/prefix.ts +++ b/src/commands/moderation/prefix.ts @@ -6,7 +6,7 @@ import ConfigInterface from "../../interfaces/Config.js"; function resetPrefix(player: Player, configuration: ConfigInterface) { const sanitize = player.getTags(); for (const tag of sanitize) { - if (tag.startsWith("Prefix:")) { + if (tag.startsWith("接頭辞:")) { player.removeTag(tag); configuration.customcommands.prefix = "!"; } @@ -16,19 +16,19 @@ function resetPrefix(player: Player, configuration: ConfigInterface) { function prefixHelp(player: Player, prefix: string) { return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: 接頭辞`, + `\n§o§4[§6コマンド§4]§f: prefix`, `§4[§6使用§4]§f:接頭辞 [オプション]`, - `§4[§6オプション§4]§f:接頭辞、ヘルプ`, + `§4[§6Optional§4]§f: prefix, help`, `§4[§6説明§4]§f:コマンドの接頭辞を変更する。最大 2 文字。`, `§4[§6例§4]§f:`, - ` ${prefix}prefix !!`, + ` 接頭辞}接頭辞 !`, ` §4- §6 コマンドの接頭辞を "!!" に変更 §f`, - ` ${prefix}prefix @!`, + ` プレフィックス}プレフィックス @!`, ` §4- §6 コマンドの接頭辞を "@!" に変更 §f`, - ` ${prefix}prefix $`, + ` 接頭辞}接頭辞 $`, ` §4- §6コマンドの接頭辞を"$"に変更 §f`, ` ${prefix}prefix help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -40,7 +40,7 @@ function prefixHelp(player: Player, prefix: string) { export function prefix(message: ChatSendAfterEvent, args: string[]) { // 必要なパラメータが定義されていることを確認する if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/prefix.js:34)"); + return console.warn(`新しい日付()}。|` + "エラー: ${message} が定義されていません。渡し忘れですか?(./commands/moderation/prefix.js:34)"); } const player = message.sender; @@ -50,7 +50,11 @@ export function prefix(message: ChatSendAfterEvent, args: string[]) { // ユーザーにコマンドを実行する権限があることを確認する。 if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -86,7 +90,7 @@ export function prefix(message: ChatSendAfterEvent, args: string[]) { if (args[0].length <= 2 && args[0].length >= 1) { resetPrefix(player, configuration); configuration.customcommands.prefix = args[0]; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 接頭辞が'§7${args[0]}§f'に変更されました`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f接頭辞が'§7${args[0]}§f'に変更されました!`); return player.addTag("Prefix:" + args[0]); } else { sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f接頭辞の長さを2文字以上にすることはできない!`); diff --git a/src/commands/moderation/punish.ts b/src/commands/moderation/punish.ts index 05058b5..f0a8f5b 100644 --- a/src/commands/moderation/punish.ts +++ b/src/commands/moderation/punish.ts @@ -8,19 +8,19 @@ function punishHelp(player: Player, prefix: string, setting: boolean) { if (!setting) { commandStatus = "§6[§4無効§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§a有効§6]§f。"; } return sendMsgToPlayer(player, [ - `\n罰則§4[§6命令§4]§f: 罰則`, - `§4[§6Status§4]§f: ${commandStatus}`, + `\n§o§4[§6コマンド§4]§f: punish`, + `§4[§6ステータス§4]§f: ${commandStatus}.`, `§4[§6使用§4]§f: [オプション]を罰する。`, - `§4[§6オプション§4]§f: ユーザー名、ヘルプ`, + `§4[§6Optional§4]§f: username, help`, `§4[§6解説§4]§f.プレイヤーのインベントリとエンダーチェストから全てのアイテムを取り除く。`, `§4[§6例§4]§f:`, ` ${prefix}punish ${player.name}`, ` §4- §6Remove all items from ${player.name}§f`, ` ${prefix}punish help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -31,13 +31,13 @@ function punishHelp(player: Player, prefix: string, setting: boolean) { */ export function punish(message: ChatSendAfterEvent, args: string[]) { handlePunish(message, args).catch((error) => { - console.error("Paradox Unhandled Rejection: ", error); + console.error("Paradoxの未処理拒否:", error); // スタックトレース情報の抽出 if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("Error originated from:", sourceInfo[0]); + console.error("エラーの原因", sourceInfo[0]); } } }); @@ -46,7 +46,7 @@ export function punish(message: ChatSendAfterEvent, args: string[]) { async function handlePunish(message: ChatSendAfterEvent, args: string[]) { // 必要なパラメータが定義されていることを確認する if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/punish.js:10)"); + return console.warn(`新しい日付()}。|` + "エラー: ${message} が定義されていません。渡し忘れですか?(./commands/moderation/punish.js:10)"); } const player = message.sender; @@ -56,7 +56,11 @@ async function handlePunish(message: ChatSendAfterEvent, args: string[]) { // ユーザーにコマンドを実行する権限があることを確認する。 if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -118,6 +122,6 @@ async function handlePunish(message: ChatSendAfterEvent, args: string[]) { } // 罰が行われたことをスタッフと選手に通知する。 sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f あなたがたは自分の行いのために罰を受けた!`); - // タグ「通知」を誰も持っていない場合は、try/catchを使用する。 - return sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 処罰しました §7${member.name}§f`); + // タグ「notify」を誰も持っていない場合は、try/catchを使用する。 + return sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は§7${member.name}§f を罰しました`); } diff --git a/src/commands/moderation/tpa.ts b/src/commands/moderation/tpa.ts index 060525e..9ce8749 100644 --- a/src/commands/moderation/tpa.ts +++ b/src/commands/moderation/tpa.ts @@ -8,21 +8,21 @@ function tpaHelp(player: Player, prefix: string, setting: boolean) { if (!setting) { commandStatus = "§6[§4無効§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§a有効§6]§f。"; } return sendMsgToPlayer(player, [ - `§6コマンド§4]§f: tpa`, - `§4[§6Status§4]§f: ${commandStatus}`, + `\n§o§4[§6コマンド§4]§f: tpa`, + `§4[§6ステータス§4]§f: ${commandStatus}.`, `§4[§6使用§4]§f: tpa [オプション]`, - `§4[§6オプション§4]§f: ユーザー名、ヘルプ`, + `§4[§6Optional§4]§f: username, help`, `§4[§6解説§4]§f:プレイヤーにテレポートする。`, - `§f§4[§6例§4]§f:`, + `§4[§6例§4]§f:`, ` ${prefix}tpa ${player.name} Steve`, - ` §4- §6Steveから${player.name}へのテレポートリクエスト§f`, + ` §4- §6Steve から ${player.name} へのテレポートをリクエスト§f`, ` ${prefix}tpa Steve ${player.name}`, - ` §4- §6${player.name}からSteveへのテレポートリクエスト§f`, + ` §4- §6スティーブを ${player.name} にテレポートするようリクエスト§f`, ` ${prefix}tpa help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -34,7 +34,7 @@ function tpaHelp(player: Player, prefix: string, setting: boolean) { export function tpa(message: ChatSendAfterEvent, args: string[]) { // 必要なパラメータが定義されていることを確認する if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/tpa.js:31)"); + return console.warn(`新しい日付()}。|` + "エラー: ${message} が定義されていません。渡し忘れですか?(./commands/moderation/tpa.js:31)"); } const player = message.sender; @@ -44,7 +44,11 @@ export function tpa(message: ChatSendAfterEvent, args: string[]) { // ユーザーにコマンドを実行する権限があることを確認する。 if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -81,7 +85,7 @@ export function tpa(message: ChatSendAfterEvent, args: string[]) { } // オンラインですか? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player! Try '§7${prefix}tpa help§f' for more info.`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f そのプレイヤーが見つかりませんでした!詳細については、「§7${prefix}tpa help§f」を試してください。`); } // テレポートが相手側にあるか、またはその逆かをチェックし、設定する。 @@ -96,7 +100,7 @@ export function tpa(message: ChatSendAfterEvent, args: string[]) { keepVelocity: false, }); // テレポートしたことを知らせる - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Teleported §7${artificalPlayer.name}§f to §7${member.name}§f`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §7${artificalPlayer.name}§f を §7${member.name}§f にテレポートしました`); } else { // 誰を指定する必要がある sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fテレポートの「from」と「who」を忘れている。`); diff --git a/src/commands/moderation/unban.ts b/src/commands/moderation/unban.ts index 4fe698a..d4af85f 100644 --- a/src/commands/moderation/unban.ts +++ b/src/commands/moderation/unban.ts @@ -6,97 +6,97 @@ import ConfigInterface from "../../interfaces/Config.js"; export const queueUnban = new Set(); function listQueue(queued: Set, player: Player) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 禁止解除のためにキューに入れられた:`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Queued to be unbanned:`); const setSize = queued.size; if (setSize > 0) { queued.forEach((queue: string) => - // 出禁解除待ちの選手をリストアップする。 + // List the players that are queued to be unbanned sendMsgToPlayer(player, ` §o§6|§f §4[§f${queue}§4]§f`) ); } else { - sendMsgToPlayer(player, `§o§6|§f §4[§fList Is Empty§4]§f`); + sendMsgToPlayer(player, ` §o§6|§f §4[§fList Is Empty§4]§f`); } } function unbanHelp(player: Player, prefix: string, setting: boolean) { let commandStatus: string; if (!setting) { - commandStatus = "§6[§4無効§6]§f"; + commandStatus = "§6[§4DISABLED§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§aENABLED§6]§f"; } return sendMsgToPlayer(player, [ - `\nコマンド§4[§6 コマンド§4]§f: 禁止解除`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6Usage§4]§f: unban [オプション].`, - `§4[§6オプション§4]§f:ユーザー名、ヘルプ、リスト、削除`, - `§4[§6Description§4]§f:BANされても指定したプレイヤーの参加を許可する(グローバルBANは含まれない)。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: unban`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: unban [オプション]`, + `§4[§6オプション§4]§f: ユーザー名, ヘルプ, リスト, 削除`, + `§4[§6説明§4]§f: 指定したプレイヤーがBANされている場合に参加できるようにします(グローバルBANは含まれません)。`, + `§4[§6例§4]§f:`, ` ${prefix}unban ${player.name}`, - ` §4- §6Allow ${player.name} to join if banned§f`, + ` §4- §6${player.name}がBANされている場合でも参加できるようにする§f`, ` ${prefix}unban list`, - ` §4- §6BAN 解除待ちプレイヤーリスト§f`, + ` §4- §6BAN解除待ちのプレイヤーリストを表示§f`, ` ${prefix}unban delete `, - ` §4- §6 アンバンのキューからプレイヤーを取り除く§f`, + ` §4- §6プレイヤーをBAN解除待ちリストから削除§f`, ` ${prefix}unban help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6コマンドのヘルプを表示§f`, ]); } export function unban(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/moderation/unban.js:35)`); + return console.warn(`${new Date()} | エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/moderation/unban.js:35)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f このコマンドを使用するには、逆説である必要があります.`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 反論はあるか? + // Are there arguments if (!args.length) { return unbanHelp(player, prefix, configuration.customcommands.unban); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if (argCheck && args[0].toLowerCase() === "help") { return unbanHelp(player, prefix, configuration.customcommands.unban); } - // 要求があれば、キューをリストアップする + // List the queue if requested if (argCheck && args[0].toLowerCase() === "list") { return listQueue(queueUnban, player); } - // 要求があれば、プレーヤーをキューから削除する。 + // Delete player from the queue if requested if (argCheck && args[0].toLowerCase() === "delete") { const nameToDelete = args.slice(1).join(" "); if (queueUnban.delete(nameToDelete)) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${nameToDelete}§f Unbanから削除されました!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${nameToDelete}§f が禁止解除キューから削除されました!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §7${nameToDelete}§f はUnbanに存在しません!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §7${nameToDelete}§f が禁止解除キューにありません!`); } return; } - // コマンドからユーザー名を取り出し、アンバンアクションを実行する。 + // Extract the username from the command and perform the unban action let username = args.join(" "); if (username.startsWith('"') && username.endsWith('"')) { username = username.slice(1, -1); } queueUnban.add(username); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Unban待ちのプレイヤー:§7${username}§f`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 禁止解除待ちのプレイヤー: §7${username}§f`); } diff --git a/src/commands/moderation/unmute.ts b/src/commands/moderation/unmute.ts index 6fd67c8..dbccc8c 100644 --- a/src/commands/moderation/unmute.ts +++ b/src/commands/moderation/unmute.ts @@ -8,21 +8,21 @@ function unmuteHelp(player: Player, prefix: string, setting: boolean) { if (!setting) { commandStatus = "§6[§4無効§6]§f"; } else { - commandStatus = "§6[§a有効§6]§f"; + commandStatus = "§6[§a有効§6]§f。"; } return sendMsgToPlayer(player, [ - `\n[コマンド§4]§f: ミュート解除`, - `§4[§6Status§4]§f: ${commandStatus}`, + `\n§o§4[§6コマンド§4]§f: unmute`, + `§4[§6ステータス§4]§f: ${commandStatus}.`, `§4[§6使用§4]§f: ミュート解除 [オプション]`, - `§4[§6オプション§4]§f: ユーザー名、理由、ヘルプ`, - `§4[§6Description§4]§f:指定されたユーザのミュートを解除し、オプションで理由を示す。`, + `§4[§6Optional§4]§f: username, reason, help`, + `§4[§6説明§4]§f:指定されたユーザのミュートを解除し、オプションで理由を示す。`, `§4[§6例§4]§f:`, ` ${prefix}unmute ${player.name}`, - ` §4- §6理由を指定せずに${player.name}のミュートを解除§f`, - ` ${prefix}unmute ${player.name} You may chat`, - ` §4- §6理由"You may chat"で${player.name}のミュートを解除§f`, + ` §4- §6Unmute ${player.name}理由を明示せずに§f`, + ` ${prefix}unmute ${player.name} チャットしてもいいですよ`, + ` §4- §6Unmute ${player.name} 「チャットしてもいいよ」という理由で§f`, ` ${prefix}unmute help`, - ` §4- §6コマンドのヘルプを表示§f`, + ` §4- §6Show command help§f`, ]); } @@ -33,13 +33,13 @@ function unmuteHelp(player: Player, prefix: string, setting: boolean) { */ export function unmute(message: ChatSendAfterEvent, args: string[]) { handleUnmute(message, args).catch((error) => { - console.error("Paradox Unhandled Rejection: ", error); + console.error("Paradoxの未処理拒否:", error); // スタックトレース情報の抽出 if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("Error originated from:", sourceInfo[0]); + console.error("エラーの原因", sourceInfo[0]); } } }); @@ -48,7 +48,7 @@ export function unmute(message: ChatSendAfterEvent, args: string[]) { async function handleUnmute(message: ChatSendAfterEvent, args: string[]) { // 必要なパラメータが定義されていることを確認する if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/moderation/unmute.js:30)"); + return console.warn(`新しい日付()}。|` + "エラー: ${message} が定義されていません。渡し忘れですか?./commands/moderation/unmute.js:30)"); } const player = message.sender; @@ -58,7 +58,11 @@ async function handleUnmute(message: ChatSendAfterEvent, args: string[]) { // ユーザーにコマンドを実行する権限があることを確認する。 if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -79,7 +83,7 @@ async function handleUnmute(message: ChatSendAfterEvent, args: string[]) { // 引数処理の変更 let playerName = args.shift(); - let reason = "No reason specified"; + let reason = "理由なし"; // コマンドに理由があるかチェックする if (args.length > 1) { @@ -113,8 +117,8 @@ async function handleUnmute(message: ChatSendAfterEvent, args: string[]) { } else { return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのプレイヤーはミュートされていない。`); } - // エデュケーション・エディションがBooleanになっている場合は、合法的にミュートを解除する。 - member.runCommandAsync(`ability @s mute false`); + // エデュケーション・エディションが有効になっている場合は、合法的にミュートを解除する。 + member.runCommandAsync(`能力 @s ミュート false`); sendMsgToPlayer(member, `§f§4[§6Paradox§4]§fあなたはミュートを解かれた。`); - return sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§fミュート §7${member.name}§f. 理由: §7${reason}§f`); + return sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は §7${member.name}§f のミュートを解除しました。理由: §7${reason}§f`); } diff --git a/src/commands/settings/afk.ts b/src/commands/settings/afk.ts index f30c02d..76573a1 100644 --- a/src/commands/settings/afk.ts +++ b/src/commands/settings/afk.ts @@ -11,26 +11,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {ConfigInterface} configuration - The current configuration. */ function afkHelp(player: Player, prefix: string, configuration: ConfigInterface): void { - const commandStatus: string = configuration.customcommands.afk ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = configuration.modules.afk.enabled ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = configuration.customcommands.afk ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = configuration.modules.afk.enabled ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§6コマンド§o§4[§6コマンド§4]§f: afk`, + `\n§o§4[§6Command§4]§f: afk`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}afk [options]`, `§4[§6Description§4]§f: Kicks players that are AFK for ${configuration.modules.afk.minutes} minutes.`, - `§4[§6オプション§4]§f:`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7AFKの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AFK§4]§f`, ` -e, --enable`, - ` §4[§7AFKをBooleanにする§4]§f`, + ` §4[§7Enable AFK§4]§f`, ` -d, --disable`, - ` §4[§7AFKを無効にする§4]§f`, - ` -m <値>, -分 <値`, - ` §4[§7タイマーを分単位で設定する§4]§f`, + ` §4[§7Disable AFK§4]§f`, + ` -m , --minutes `, + ` §4[§7Set the timer in minutes§4]§f`, ]); } @@ -42,7 +42,7 @@ function afkHelp(player: Player, prefix: string, configuration: ConfigInterface) export function afk(message: ChatSendAfterEvent, args: string[]): void { handleAFK(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -54,7 +54,7 @@ export function afk(message: ChatSendAfterEvent, args: string[]): void { } async function handleAFK(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/afk.js:36)`); return; @@ -62,28 +62,28 @@ async function handleAFK(message: ChatSendAfterEvent, args: string[]): Promise §6AFK§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AFK§f!`); AFK(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.afk.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AFKはすでに無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AFK is already disabled.`); } else { configuration.modules.afk.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4AFK§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AFK§f!`); } break; case "-m": diff --git a/src/commands/settings/allowgma.ts b/src/commands/settings/allowgma.ts index 19ffa0a..efdf428 100644 --- a/src/commands/settings/allowgma.ts +++ b/src/commands/settings/allowgma.ts @@ -12,24 +12,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AllowGMA custom command setting. */ function allowgmaHelp(player: Player, prefix: string, adventureGMBoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = adventureGMBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = adventureGMBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§6コマンド§4]§f: 許可するガンマ`, + `\n§o§4[§6Command§4]§f: allowgma`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}allowgma [options]`, - `§4[§6解説§4]§f:ゲームモード2(アドベンチャー)の使用を切り替えられるようにする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Allows toggling of Gamemode 2 (Adventure) usage.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7アドベンチャーゲームモードの現在のステータスを表示する§4]§f`, + ` §4[§7Display the current status of Adventure Gamemode§4]§f`, ` -e, --enable`, - ` §4[§7アドベンチャーゲームモードをBooleanにする§4]§f`, + ` §4[§7Enable Adventure Gamemode§4]§f`, ` -d, --disable`, - ` §4[§7アドベンチャーゲームモードを無効にする§4]§f`, + ` §4[§7Disable Adventure Gamemode§4]§f`, ]); } @@ -41,7 +41,7 @@ function allowgmaHelp(player: Player, prefix: string, adventureGMBoolean: boolea export function allowgma(message: ChatSendAfterEvent, args: string[]): void { handleAllowGMA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -53,35 +53,35 @@ export function allowgma(message: ChatSendAfterEvent, args: string[]): void { } async function handleAllowGMA(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/allowGMA.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -89,16 +89,16 @@ async function handleAllowGMA(message: ChatSendAfterEvent, args: string[]): Prom return allowgmaHelp(player, prefix, configuration.modules.adventureGM.enabled, configuration.customcommands.allowgma); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Adventure Gamemode is currently ${configuration.modules.adventureGM.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Adventure Gamemode is currently ${configuration.modules.adventureGM.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.adventureGM.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアドベンチャーゲームモードは既にBooleanになっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Adventure Gamemode is already enabled.`); } else { configuration.modules.adventureGM.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); @@ -108,10 +108,10 @@ async function handleAllowGMA(message: ChatSendAfterEvent, args: string[]): Prom break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.adventureGM.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアドベンチャーゲームモードは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Adventure Gamemode is already disabled.`); } else { configuration.modules.adventureGM.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); diff --git a/src/commands/settings/allowgmc.ts b/src/commands/settings/allowgmc.ts index efd9d44..f150f58 100644 --- a/src/commands/settings/allowgmc.ts +++ b/src/commands/settings/allowgmc.ts @@ -12,24 +12,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AllowGMC custom command setting. */ function allowgmcHelp(player: Player, prefix: string, creativeGMBoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = creativeGMBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = creativeGMBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§6コマンド§4]§f: 許可gmc`, + `\n§o§4[§6Command§4]§f: allowgmc`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}allowgmc [options]`, - `§4[§6説明§4]§f:ゲームモード1(クリエイティブ)の使用を切り替えられるようにする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Allows toggling of Gamemode 1 (Creative) usage.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7クリエイティブゲームモードの現在のステータスを表示する§4]§f`, + ` §4[§7Display the current status of Creative Gamemode§4]§f`, ` -e, --enable`, - ` §4[§7クリエイティブゲームモードをBooleanにする§4]§f`, + ` §4[§7Enable Creative Gamemode§4]§f`, ` -d, --disable`, - ` §4[§7クリエイティブゲームモードを無効にする§4]§f`, + ` §4[§7Disable Creative Gamemode§4]§f`, ]); } @@ -41,7 +41,7 @@ function allowgmcHelp(player: Player, prefix: string, creativeGMBoolean: boolean export function allowgmc(message: ChatSendAfterEvent, args: string[]): void { handleAllowGMC(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -53,35 +53,35 @@ export function allowgmc(message: ChatSendAfterEvent, args: string[]): void { } async function handleAllowGMC(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/allowGMC.js:37)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -89,16 +89,16 @@ async function handleAllowGMC(message: ChatSendAfterEvent, args: string[]): Prom return allowgmcHelp(player, prefix, configuration.modules.creativeGM.enabled, configuration.customcommands.allowgmc); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Creative Gamemode is currently ${configuration.modules.creativeGM.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Creative Gamemode is currently ${configuration.modules.creativeGM.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.creativeGM.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fクリエイティブゲームモードは既にBooleanになっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Creative Gamemode is already enabled.`); } else { configuration.modules.creativeGM.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); @@ -108,10 +108,10 @@ async function handleAllowGMC(message: ChatSendAfterEvent, args: string[]): Prom break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.creativeGM.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fクリエイティブゲームモードは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Creative Gamemode is already disabled.`); } else { configuration.modules.creativeGM.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); diff --git a/src/commands/settings/allowgms.ts b/src/commands/settings/allowgms.ts index b140a09..a7d4f52 100644 --- a/src/commands/settings/allowgms.ts +++ b/src/commands/settings/allowgms.ts @@ -12,24 +12,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AllowGMS custom command setting. */ function allowgmsHelp(player: Player, prefix: string, survivalGMBoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = survivalGMBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = survivalGMBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `\n[コマンド§4[§6 コマンド§4]§f: allowgms`, + `\n§o§4[§6Command§4]§f: allowgms`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}allowgms [options]`, - `§4[§6説明§4]§f:ゲームモード0(サバイバル)の使用を切り替えられるようにする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Allows toggling of Gamemode 0 (Survival) usage.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7サバイバルゲームモードの現在のステータスを表示する§4]§f`, + ` §4[§7Display the current status of Survival Gamemode§4]§f`, ` -e, --enable`, - ` §4[§7サバイバルゲームモードをBooleanにする§4]§f`, + ` §4[§7Enable Survival Gamemode§4]§f`, ` -d, --disable`, - ` §4[§7サバイバルゲームモードを無効にする§4]§f`, + ` §4[§7Disable Survival Gamemode§4]§f`, ]); } @@ -41,7 +41,7 @@ function allowgmsHelp(player: Player, prefix: string, survivalGMBoolean: boolean export function allowgms(message: ChatSendAfterEvent, args: string[]): void { handleAllowGMS(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -53,35 +53,35 @@ export function allowgms(message: ChatSendAfterEvent, args: string[]): void { } async function handleAllowGMS(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/allowGMS.js:37)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -89,16 +89,16 @@ async function handleAllowGMS(message: ChatSendAfterEvent, args: string[]): Prom return allowgmsHelp(player, prefix, configuration.modules.survivalGM.enabled, configuration.customcommands.allowgms); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Survival Gamemode is currently ${configuration.modules.survivalGM.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Survival Gamemode is currently ${configuration.modules.survivalGM.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.survivalGM.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fサバイバルゲームモードは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Survival Gamemode is already enabled.`); } else { configuration.modules.survivalGM.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); @@ -108,10 +108,10 @@ async function handleAllowGMS(message: ChatSendAfterEvent, args: string[]): Prom break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.survivalGM.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fサバイバルゲームモードは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Survival Gamemode is already disabled.`); } else { configuration.modules.survivalGM.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); diff --git a/src/commands/settings/antifalla.ts b/src/commands/settings/antifalla.ts index 740c1bf..75eb5ad 100644 --- a/src/commands/settings/antifalla.ts +++ b/src/commands/settings/antifalla.ts @@ -12,24 +12,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AntiFallA custom command setting. */ function antifallaHelp(player: Player, prefix: string, antifallABoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = antifallABoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = antifallABoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f:アンチフォール`, + `\n§o§4[§6Command§4]§f: antifalla`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}antifalla [options]`, - `§4[§6Description§4]§f:サバイバルモードで落下ダメージを受けないようにするためのチェックを切り替えられるようにする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Allows toggling of checks to prevent taking fall damage in survival mode.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7アンチフォールモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AntiFallA module§4]§f`, ` -e, --enable`, - ` §4[§7アンチフォールモジュールをBooleanにする§4]§f`, + ` §4[§7Enable AntiFallA module§4]§f`, ` -d, --disable`, - ` §4[§7アンチフォールモジュールを無効にする§4]§f`, + ` §4[§7Disable AntiFallA module§4]§f`, ]); } @@ -41,7 +41,7 @@ function antifallaHelp(player: Player, prefix: string, antifallABoolean: boolean export function antifallA(message: ChatSendAfterEvent, args: string[]): void { handleAntiFallA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -53,35 +53,35 @@ export function antifallA(message: ChatSendAfterEvent, args: string[]): void { } async function handleAntiFallA(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/antifalla.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -89,33 +89,33 @@ async function handleAntiFallA(message: ChatSendAfterEvent, args: string[]): Pro return antifallaHelp(player, prefix, configuration.modules.antifallA.enabled, configuration.customcommands.antifalla); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiFallA module is currently ${configuration.modules.antifallA.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiFallA module is currently ${configuration.modules.antifallA.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.antifallA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f転倒防止モジュールは既にBooleanになっている.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiFallA module is already enabled.`); } else { configuration.modules.antifallA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6AntiFallA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiFallA§f!`); AntiFallA(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.antifallA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f落下防止モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiFallA module is already disabled.`); } else { configuration.modules.antifallA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4AntiFallA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiFallA§f!`); } break; } diff --git a/src/commands/settings/antikb.ts b/src/commands/settings/antikb.ts index 91a4497..6d6364c 100644 --- a/src/commands/settings/antikb.ts +++ b/src/commands/settings/antikb.ts @@ -11,26 +11,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {ConfigInterface} configuration - The configuration object. */ function antikbHelp(player: Player, prefix: string, configuration: ConfigInterface): void { - const commandStatus: string = configuration.customcommands.antikb ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = configuration.modules.antikbA.enabled ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = configuration.customcommands.antikb ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = configuration.modules.antikbA.enabled ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§6コマンド§4]§f: アンチCB`, + `\n§o§4[§6Command§4]§f: antikb`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}antikb [options]`, - `§4[§6Description§4]§f:すべてのプレイヤーのアンチノックバックの切り替えを可能にする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Allows toggling of Anti Knockback for all players.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7アンチノックバックモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AntiKnockback module§4]§f`, ` -e, --enable`, - ` §4[§7アンチノックバック・モジュールをBooleanにする§4]§f`, + ` §4[§7Enable AntiKnockback module§4]§f`, ` -d, --disable`, - ` §4[§7アンチノックバック・モジュールを無効にする§4]§f`, - ` -v <値>, --速度 <値`, - ` §4[§7変化速度強度§4]§f`, + ` §4[§7Disable AntiKnockback module§4]§f`, + ` -v , --velocity `, + ` §4[§7Change velocity intensity§4]§f`, ]); } @@ -42,7 +42,7 @@ function antikbHelp(player: Player, prefix: string, configuration: ConfigInterfa export function antikb(message: ChatSendAfterEvent, args: string[]): void { handleAntiKnockback(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -54,35 +54,35 @@ export function antikb(message: ChatSendAfterEvent, args: string[]): void { } async function handleAntiKnockback(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/antikb.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -90,38 +90,38 @@ async function handleAntiKnockback(message: ChatSendAfterEvent, args: string[]): return antikbHelp(player, prefix, configuration); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiKnockback module is currently ${configuration.modules.antikbA.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiKnockback module is currently ${configuration.modules.antikbA.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.antikbA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチノックバックモジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiKnockback module is already enabled.`); } else { configuration.modules.antikbA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6Anti Knockback§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Anti Knockback§f!`); AntiKnockbackA(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.antikbA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチノックバックモジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiKnockback module is already disabled.`); } else { configuration.modules.antikbA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4Anti Knockback§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Anti Knockback§f!`); } break; case "-v": case "--velocity": { - // ハンドル速度フラグ + // Handle velocity flag validFlagFound = true; const numberConvert = Number(args[i + 1]); if (isNaN(numberConvert)) { diff --git a/src/commands/settings/antinukera.ts b/src/commands/settings/antinukera.ts index 663d49f..c9d8a72 100644 --- a/src/commands/settings/antinukera.ts +++ b/src/commands/settings/antinukera.ts @@ -12,24 +12,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AntiNukerA custom command setting. */ function antinukeraHelp(player: Player, prefix: string, antiNukerABoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = antiNukerABoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = antiNukerABoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f:反イヌケラ`, + `\n§o§4[§6Command§4]§f: antinukera`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}antinukera [options]`, - `§4[§6解説§4]§f:ブロックぬきの行動を監視する。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Monitors players for block nuking behavior.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7AntiNukerAモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AntiNukerA module§4]§f`, ` -e, --enable`, - ` §4[§7AntiNukerAモジュールをBooleanにする§4]§f`, + ` §4[§7Enable AntiNukerA module§4]§f`, ` -d, --disable`, - ` §4[§7AntiNukerAモジュールを無効にする§4]§f`, + ` §4[§7Disable AntiNukerA module§4]§f`, ]); } @@ -41,7 +41,7 @@ function antinukeraHelp(player: Player, prefix: string, antiNukerABoolean: boole export function antinukerA(message: ChatSendAfterEvent, args: string[]): void { handleAntiNukerA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -53,35 +53,35 @@ export function antinukerA(message: ChatSendAfterEvent, args: string[]): void { } async function handleAntiNukerA(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/antinukera.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -89,33 +89,33 @@ async function handleAntiNukerA(message: ChatSendAfterEvent, args: string[]): Pr return antinukeraHelp(player, prefix, configuration.modules.antinukerA.enabled, configuration.customcommands.antinukera); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiNukerA module is currently ${configuration.modules.antinukerA.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiNukerA module is currently ${configuration.modules.antinukerA.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.antinukerA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiNukerA モジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiNukerA module is already enabled.`); } else { configuration.modules.antinukerA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6AntiNukerA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiNukerA§f!`); BeforeNukerA(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.antinukerA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiNukerA モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiNukerA module is already disabled.`); } else { configuration.modules.antinukerA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4AntiNukerA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiNukerA§f!`); } break; } diff --git a/src/commands/settings/antiphasea.ts b/src/commands/settings/antiphasea.ts index 4c12234..0c2b6d8 100644 --- a/src/commands/settings/antiphasea.ts +++ b/src/commands/settings/antiphasea.ts @@ -12,24 +12,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AntiPhaseA custom command setting. */ function antiphaseaHelp(player: Player, prefix: string, antiPhaseABoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = antiPhaseABoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = antiPhaseABoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§6コマンド§4]§f:アンチファセア`, + `\n§o§4[§6Command§4]§f: antiphasea`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}antiphasea [options]`, - `§4[§6解説§4]§f:ブロックをフェイズスルーする能力についてプレイヤーを監視する。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Monitors players for the ability to phase through blocks.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7AntiPhaseAモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AntiPhaseA module§4]§f`, ` -e, --enable`, - ` §4[§7AntiPhaseAモジュールをBooleanにする§4]§f`, + ` §4[§7Enable AntiPhaseA module§4]§f`, ` -d, --disable`, - ` §4[§7AntiPhaseAモジュールを無効にする§4]§f`, + ` §4[§7Disable AntiPhaseA module§4]§f`, ]); } @@ -41,7 +41,7 @@ function antiphaseaHelp(player: Player, prefix: string, antiPhaseABoolean: boole export function antiphaseA(message: ChatSendAfterEvent, args: string[]): void { handleAntiPhaseA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -53,35 +53,35 @@ export function antiphaseA(message: ChatSendAfterEvent, args: string[]): void { } async function handleAntiPhaseA(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/antiphasea.js:34)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -89,33 +89,33 @@ async function handleAntiPhaseA(message: ChatSendAfterEvent, args: string[]): Pr return antiphaseaHelp(player, prefix, configuration.modules.antiphaseA.enabled, configuration.customcommands.phase); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiPhaseA module is currently ${configuration.modules.antiphaseA.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiPhaseA module is currently ${configuration.modules.antiphaseA.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.antiphaseA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチフェーズモジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiPhaseA module is already enabled.`); } else { configuration.modules.antiphaseA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6AntiPhaseA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiPhaseA§f!`); AntiPhaseA(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.antiphaseA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチフェーズモジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiPhaseA module is already disabled.`); } else { configuration.modules.antiphaseA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4AntiPhaseA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiPhaseA§f!`); } break; } diff --git a/src/commands/settings/antiscaffolda.ts b/src/commands/settings/antiscaffolda.ts index b646b54..beb10c0 100644 --- a/src/commands/settings/antiscaffolda.ts +++ b/src/commands/settings/antiscaffolda.ts @@ -12,24 +12,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AntiScaffoldA custom command setting. */ function antiscaffoldaHelp(player: Player, prefix: string, antiScaffoldABoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = antiScaffoldABoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = antiScaffoldABoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f:アンチスカフォルダ`, + `\n§o§4[§6Command§4]§f: antiscaffolda`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}antiscaffolda [options]`, - `§4[§6解説§4]§f:不正な足場の使用を監視する。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Monitors players for the usage of illegal scaffolding.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7アンチスキャフォールドモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AntiScaffoldA module§4]§f`, ` -e, --enable`, - ` §4[§7AntiScaffoldAモジュールをBooleanにする§4]§f`, + ` §4[§7Enable AntiScaffoldA module§4]§f`, ` -d, --disable`, - ` §4[§7AntiScaffoldAモジュールを無効にする§4]§f`, + ` §4[§7Disable AntiScaffoldA module§4]§f`, ]); } @@ -41,7 +41,7 @@ function antiscaffoldaHelp(player: Player, prefix: string, antiScaffoldABoolean: export function antiscaffoldA(message: ChatSendAfterEvent, args: string[]): void { handleAntiScaffoldA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -53,35 +53,35 @@ export function antiscaffoldA(message: ChatSendAfterEvent, args: string[]): void } async function handleAntiScaffoldA(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/antiscaffolda.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -89,33 +89,33 @@ async function handleAntiScaffoldA(message: ChatSendAfterEvent, args: string[]): return antiscaffoldaHelp(player, prefix, configuration.modules.antiscaffoldA.enabled, configuration.customcommands.antiscaffolda); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiScaffoldA module is currently ${configuration.modules.antiscaffoldA.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiScaffoldA module is currently ${configuration.modules.antiscaffoldA.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.antiscaffoldA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチスキャフォールドモジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiScaffoldA module is already enabled.`); } else { configuration.modules.antiscaffoldA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6AntiScaffoldA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiScaffoldA§f!`); ScaffoldA(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.antiscaffoldA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチスキャフォールドモジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiScaffoldA module is already disabled.`); } else { configuration.modules.antiscaffoldA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4AntiScaffoldA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiScaffoldA§f!`); } break; } diff --git a/src/commands/settings/antishulker.ts b/src/commands/settings/antishulker.ts index 18768e1..445ad22 100644 --- a/src/commands/settings/antishulker.ts +++ b/src/commands/settings/antishulker.ts @@ -11,24 +11,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AntiShulker custom command setting. */ function antishulkerHelp(player: Player, prefix: string, antiShulkerBoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = antiShulkerBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = antiShulkerBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f: アンチシュルカー`, + `\n§o§4[§6Command§4]§f: antishulker`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}antishulker [options]`, - `§4[§6解説§4]§f:ワールドにシュルカーの箱を置くことを許可するかしないか。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Allows or denies the placement of shulker boxes in the world.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7アンチシュルカーモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AntiShulker module§4]§f`, ` -e, --enable`, - ` §4[§7アンチシュルカーモジュールをBooleanにする§4]§f`, + ` §4[§7Enable AntiShulker module§4]§f`, ` -d, --disable`, - ` §4[§7アンチシュルカーモジュールを無効にする§4]§f`, + ` §4[§7Disable AntiShulker module§4]§f`, ]); } @@ -40,7 +40,7 @@ function antishulkerHelp(player: Player, prefix: string, antiShulkerBoolean: boo export function antishulker(message: ChatSendAfterEvent, args: string[]): void { handleAntiShulker(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -52,35 +52,35 @@ export function antishulker(message: ChatSendAfterEvent, args: string[]): void { } async function handleAntiShulker(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/antishulker.js:35)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -88,32 +88,32 @@ async function handleAntiShulker(message: ChatSendAfterEvent, args: string[]): P return antishulkerHelp(player, prefix, configuration.modules.antishulker.enabled, configuration.customcommands.antishulker); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiShulker module is currently ${configuration.modules.antishulker.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiShulker module is currently ${configuration.modules.antishulker.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.antishulker.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチシュルカーモジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiShulker module is already enabled.`); } else { configuration.modules.antishulker.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6AntiShulker§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiShulker§f!`); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.antishulker.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチシュルカーモジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiShulker module is already disabled.`); } else { configuration.modules.antishulker.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4AntiShulker§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiShulker§f!`); } break; } diff --git a/src/commands/settings/antispam.ts b/src/commands/settings/antispam.ts index 8f7d061..73e1c66 100644 --- a/src/commands/settings/antispam.ts +++ b/src/commands/settings/antispam.ts @@ -13,24 +13,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AntiSpam custom command setting. */ function antispamHelp(player: Player, prefix: string, antiSpamBoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = antiSpamBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = antiSpamBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; sendMsgToPlayer(player, [ - `\n[コマンド§4[§6 コマンド§4]§f: アンチスパム`, + `\n§o§4[§6Command§4]§f: antispam`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}antispam [options]`, - `§4[§6説明§4]§f:チャットでのスパムを検知して防ぐために、2秒間のチャットクールダウンを実装する。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Implements a 2-second chat cooldown to detect and prevent spam in chat.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7スパム対策モジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AntiSpam module§4]§f`, ` -e, --enable`, - ` §4[§7アンチスパムモジュールをBooleanにする§4]§f`, + ` §4[§7Enable AntiSpam module§4]§f`, ` -d, --disable`, - ` §4[§7アンチスパムモジュールを無効にする§4]§f`, + ` §4[§7Disable AntiSpam module§4]§f`, ]); } @@ -42,7 +42,7 @@ function antispamHelp(player: Player, prefix: string, antiSpamBoolean: boolean, export function antispam(message: ChatSendAfterEvent, args: string[]): void { handleAntiSpam(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -54,35 +54,35 @@ export function antispam(message: ChatSendAfterEvent, args: string[]): void { } async function handleAntiSpam(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/antispam.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -90,41 +90,41 @@ async function handleAntiSpam(message: ChatSendAfterEvent, args: string[]): Prom return antispamHelp(player, prefix, configuration.modules.antispam.enabled, configuration.customcommands.antispam); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiSpam module is currently ${configuration.modules.antispam.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiSpam module is currently ${configuration.modules.antispam.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.antispam.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fスパム対策モジュールは既にBooleanになっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiSpam module is already enabled.`); } else { configuration.modules.antispam.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6Anti Spam§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Anti Spam§f!`); beforeAntiSpam(); afterAntiSpam(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.antispam.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fスパム対策モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiSpam module is already disabled.`); } else { configuration.modules.antispam.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4Anti Spam§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Anti Spam§f!`); } break; } } if (!validFlagFound) { - // 追加の引数はありません。 + // No additional arguments provided, display help sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}antispam --help for more information.`); } } diff --git a/src/commands/settings/auracheck.ts b/src/commands/settings/auracheck.ts index ff5b2cd..e309ffe 100644 --- a/src/commands/settings/auracheck.ts +++ b/src/commands/settings/auracheck.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AntiKillAura custom command setting. */ function auraCheckHelp(player: Player, prefix: string, antiKillAuraBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = antiKillAuraBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = antiKillAuraBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f: オーラチェック`, + `\n§o§4[§6Command§4]§f: auracheck`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}auracheck [options]`, - `§4[§6Description§4]§f:AntiKillAuraモジュールの90度の角度の外側の攻撃に対するチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for attacks outside a 90-degree angle in AntiKillAura module.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7アンチキラオーラモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AntiKillAura module§4]§f`, ` -e, --enable`, - ` §4[§7アンチキルオーラモジュールをBooleanにする§4]§f`, + ` §4[§7Enable AntiKillAura module§4]§f`, ` -d, --disable`, - ` §4[§7アンチキルオーラモジュールを無効にする§4]§f`, + ` §4[§7Disable AntiKillAura module§4]§f`, ]); } @@ -44,7 +44,7 @@ function auraCheckHelp(player: Player, prefix: string, antiKillAuraBoolean: bool export function auracheck(message: ChatSendAfterEvent, args: string[]) { handleAuraCheck(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function auracheck(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleAuraCheck(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/utility/auracheck.js:29)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,40 +96,40 @@ async function handleAuraCheck(message: ChatSendAfterEvent, args: string[]) { return auraCheckHelp(player, prefix, configuration.modules.antiKillAura.enabled, configuration.customcommands.antikillaura); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiKillAura module is currently ${configuration.modules.antiKillAura.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiKillAura module is currently ${configuration.modules.antiKillAura.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.antiKillAura.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチキルオーラモジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiKillAura module is already enabled.`); } else { configuration.modules.antiKillAura.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6AntiKillAura§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiKillAura§f!`); KillAura(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.antiKillAura.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチキルオーラモジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AntiKillAura module is already disabled.`); } else { configuration.modules.antiKillAura.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4AntiKillAura§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiKillAura§f!`); } break; } } if (!validFlagFound) { - // 追加の引数はありません。 + // No additional arguments provided, display help sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}antikillaura --help for more information.`); } } diff --git a/src/commands/settings/autoban.ts b/src/commands/settings/autoban.ts index e532709..9ef1dc1 100644 --- a/src/commands/settings/autoban.ts +++ b/src/commands/settings/autoban.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AutoBan custom command setting. */ function autobanHelp(player: Player, prefix: string, autoBanBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = autoBanBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = autoBanBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n[コマンド§4[§6 コマンド§4]§f: オートバン`, + `\n§o§4[§6Command§4]§f: autoban`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}autoban [options]`, - `§4[§6Description§4]§f:AutoBanモジュールを切り替えます。AutoBanモジュールは、50を超えた場合、違反行為に基づいて自動的にプレイヤーを禁止します。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles the AutoBan module, which automatically bans players based on their violations if above 50.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7オートバンモジュールの現在のステータスを表示する§4]§f`, + ` §4[§7Display the current status of AutoBan module§4]§f`, ` -e, --enable`, - ` §4[§7オートバンモジュールをBooleanにする§4]§f`, + ` §4[§7Enable AutoBan module§4]§f`, ` -d, --disable`, - ` §4[§7オートバンモジュールを無効にする§4]§f`, + ` §4[§7Disable AutoBan module§4]§f`, ]); } @@ -44,7 +44,7 @@ function autobanHelp(player: Player, prefix: string, autoBanBoolean: boolean, se export function autoban(message: ChatSendAfterEvent, args: string[]) { handleAutoban(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function autoban(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleAutoban(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/autoban.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,40 +96,40 @@ async function handleAutoban(message: ChatSendAfterEvent, args: string[]) { return autobanHelp(player, prefix, configuration.modules.autoBan.enabled, configuration.customcommands.autoban); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AutoBan module is currently ${configuration.modules.autoBan.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AutoBan module is currently ${configuration.modules.autoBan.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.autoBan.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f自動禁止モジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AutoBan module is already enabled.`); } else { configuration.modules.autoBan.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6AutoBan§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AutoBan§f!`); AutoBan(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.autoBan.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f自動禁止モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AutoBan module is already disabled.`); } else { configuration.modules.autoBan.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4AutoBan§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AutoBan§f!`); } break; } } if (!validFlagFound) { - // 追加の引数はありません。 + // No additional arguments provided, display help sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}autoban --help for more information.`); } } diff --git a/src/commands/settings/autoclicker.ts b/src/commands/settings/autoclicker.ts index 1515558..0737ea8 100644 --- a/src/commands/settings/autoclicker.ts +++ b/src/commands/settings/autoclicker.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the AutoClicker custom command setting. */ function autoclickerHelp(player: Player, prefix: string, autoClickerBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = autoClickerBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = autoClickerBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n[コマンド§4[§6 コマンド§4]§f: オートクリッカー`, + `\n§o§4[§6Command§4]§f: autoclicker`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}autoclicker [options]`, - `§4[§6Description§4]§f:攻撃中にオートクリッカーを使用しているプレイヤーのチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for players using autoclickers while attacking.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7オートクリッカーモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of AutoClicker module§4]§f`, ` -e, --enable`, - ` §4[§7オートクリッカーモジュールをBooleanにする§4]§f`, + ` §4[§7Enable AutoClicker module§4]§f`, ` -d, --disable`, - ` §4[§7オートクリッカーモジュールを無効にする§4]§f`, + ` §4[§7Disable AutoClicker module§4]§f`, ]); } @@ -44,7 +44,7 @@ function autoclickerHelp(player: Player, prefix: string, autoClickerBoolean: boo export function autoclicker(message: ChatSendAfterEvent, args: string[]) { handleAutoclicker(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function autoclicker(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleAutoclicker(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/autoclicker.js:33)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,40 +96,40 @@ async function handleAutoclicker(message: ChatSendAfterEvent, args: string[]) { return autoclickerHelp(player, prefix, configuration.modules.autoclicker.enabled, configuration.customcommands.autoclicker); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AutoClicker module is currently ${configuration.modules.autoclicker.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AutoClicker module is currently ${configuration.modules.autoclicker.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.autoclicker.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fオートクリッカーモジュールが既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AutoClicker module is already enabled.`); } else { configuration.modules.autoclicker.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6AutoClicker§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AutoClicker§f!`); AutoClicker(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.autoclicker.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fオートクリッカーモジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AutoClicker module is already disabled.`); } else { configuration.modules.autoclicker.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4AutoClicker§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AutoClicker§f!`); } break; } } if (!validFlagFound) { - // 追加の引数はありません。 + // No additional arguments provided, display help sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}autoclicker --help for more information.`); } } diff --git a/src/commands/settings/badpackets1.ts b/src/commands/settings/badpackets1.ts index 9fb9abc..614637c 100644 --- a/src/commands/settings/badpackets1.ts +++ b/src/commands/settings/badpackets1.ts @@ -12,24 +12,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the BadPackets1 custom command setting. */ function badpackets1Help(player: Player, prefix: string, badPackets1Boolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = badPackets1Boolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = badPackets1Boolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§o§4[§6コマンド§4]§f: badpackets1`, + `§o§4[§6Command§4]§f: badpackets1`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}badpackets1 [options]`, - `§4[§6Description§4]§f:ブロードキャストごとにメッセージの長さをチェックするかどうかを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for message lengths with each broadcast.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7Badpackets1の現在のステータスを表示する§4]§f`, + ` §4[§7Display the current status of Badpackets1§4]§f`, ` -e, --enable`, - ` §4[§7バッドパケットをBooleanにする1§4]§f`, + ` §4[§7Enable Badpackets1§4]§f`, ` -d, --disable`, - ` §4[§7バッドパケットを無効にする1§4]§f`, + ` §4[§7Disable Badpackets1§4]§f`, ]); } @@ -39,34 +39,34 @@ function badpackets1Help(player: Player, prefix: string, badPackets1Boolean: boo * @param {string[]} args - Additional arguments provided (optional). */ export function badpackets1(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/badpackets1.js:36)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -74,33 +74,33 @@ export function badpackets1(message: ChatSendAfterEvent, args: string[]) { return badpackets1Help(player, prefix, configuration.modules.badpackets1.enabled, configuration.customcommands.badpackets1); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Badpackets1 is currently ${configuration.modules.badpackets1.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Badpackets1 is currently ${configuration.modules.badpackets1.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.badpackets1.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Badpackets1 は既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Badpackets1 is already enabled.`); } else { configuration.modules.badpackets1.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6Badpackets1§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Badpackets1§f!`); BadPackets1(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.badpackets1.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fバッドパケット1は既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Badpackets1 is already disabled.`); } else { configuration.modules.badpackets1.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4Badpackets1§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Badpackets1§f!`); } break; } diff --git a/src/commands/settings/badpackets2.ts b/src/commands/settings/badpackets2.ts index d14313e..376aa24 100644 --- a/src/commands/settings/badpackets2.ts +++ b/src/commands/settings/badpackets2.ts @@ -12,24 +12,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the BadPackets2 custom command setting. */ function badpackets2Help(player: Player, prefix: string, badPackets2Boolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = badPackets2Boolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = badPackets2Boolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§o§4[§6コマンド§4]§f: badpackets2`, + `§o§4[§6Command§4]§f: badpackets2`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}badpackets2 [options]`, - `§4[§6Description§4]§f:プレイヤーによって選択されたスロットが無効かどうかのチェックを切り替えます。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for invalid selected slots by players.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7BadPackets2の現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of BadPackets2§4]§f`, ` -e, --enable`, - ` §4[§7BadPackets2をBooleanにする§4]§f`, + ` §4[§7Enable BadPackets2§4]§f`, ` -d, --disable`, - ` §4[§7BadPackets2を無効にする§4]§f`, + ` §4[§7Disable BadPackets2§4]§f`, ]); } @@ -39,34 +39,34 @@ function badpackets2Help(player: Player, prefix: string, badPackets2Boolean: boo * @param {string[]} args - Additional arguments provided (optional). */ export function badpackets2(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/badpackets2.js:36)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -74,33 +74,33 @@ export function badpackets2(message: ChatSendAfterEvent, args: string[]) { return badpackets2Help(player, prefix, configuration.modules.badpackets2.enabled, configuration.customcommands.badpackets2); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Badpackets2 is currently ${configuration.modules.badpackets2.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Badpackets2 is currently ${configuration.modules.badpackets2.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.badpackets2.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fバッドパケット2は既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Badpackets2 is already enabled.`); } else { configuration.modules.badpackets2.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6Badpackets2§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Badpackets2§f!`); BadPackets2(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.badpackets2.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fバッドパケット2は既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Badpackets2 is already disabled.`); } else { configuration.modules.badpackets2.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4Badpackets2§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Badpackets2§f!`); } break; } diff --git a/src/commands/settings/bedrockvalidate.ts b/src/commands/settings/bedrockvalidate.ts index 8b5dae6..9ed64f5 100644 --- a/src/commands/settings/bedrockvalidate.ts +++ b/src/commands/settings/bedrockvalidate.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the BedrockValidate custom command setting. */ function bedrockValidateHelp(player: Player, prefix: string, bedrockValidateBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = bedrockValidateBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = bedrockValidateBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f: 岩盤バリデーション`, + `\n§o§4[§6Command§4]§f: bedrockvalidate`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}bedrockvalidate [options]`, - `§4[§6Description§4]§f:岩盤検証のチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for bedrock validations.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7BedrockValidateモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of BedrockValidate module§4]§f`, ` -e, --enable`, - ` §4[§7BedrockValidateモジュールをBooleanにする§4]§f`, + ` §4[§7Enable BedrockValidate module§4]§f`, ` -d, --disable`, - ` §4[§7BedrockValidateモジュールを無効にする§4]§f`, + ` §4[§7Disable BedrockValidate module§4]§f`, ]); } @@ -44,7 +44,7 @@ function bedrockValidateHelp(player: Player, prefix: string, bedrockValidateBool export function bedrockvalidate(message: ChatSendAfterEvent, args: string[]) { handleBedrockValidate(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function bedrockvalidate(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleBedrockValidate(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/bedrockValidate.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,40 +96,40 @@ async function handleBedrockValidate(message: ChatSendAfterEvent, args: string[] return bedrockValidateHelp(player, prefix, configuration.modules.bedrockValidate.enabled, configuration.customcommands.bedrockvalidate); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f BedrockValidate module is currently ${configuration.modules.bedrockValidate.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f BedrockValidate module is currently ${configuration.modules.bedrockValidate.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.bedrockValidate.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fBedrockValidateモジュールは既にBooleanになっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f BedrockValidate module is already enabled.`); } else { configuration.modules.bedrockValidate.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6BedrockValidate§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6BedrockValidate§f!`); BedrockValidate(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.bedrockValidate.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f BedrockValidate モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f BedrockValidate module is already disabled.`); } else { configuration.modules.bedrockValidate.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4BedrockValidate§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4BedrockValidate§f!`); } break; } } if (!validFlagFound) { - // 追加の引数はありません。 + // No additional arguments provided, display help sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}bedrockvalidate --help for more information.`); } } diff --git a/src/commands/settings/chatranks.ts b/src/commands/settings/chatranks.ts index e4da35a..4dceec8 100644 --- a/src/commands/settings/chatranks.ts +++ b/src/commands/settings/chatranks.ts @@ -7,30 +7,30 @@ import ConfigInterface from "../../interfaces/Config.js"; * Provides help information for the ChatRanks command. * @param {Player} player - The player requesting help. * @param {string} prefix - The custom prefix for the player. - * @param {boolean} chatranksBoolean - The status of ChatRanks module. + * @param {boolean} chatRanksBoolean - The status of ChatRanks module. * @param {boolean} setting - The status of the ChatRanks custom command setting. */ -function chatRanksHelp(player: Player, prefix: string, chatranksBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = chatranksBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; +function chatRanksHelp(player: Player, prefix: string, chatRanksBoolean: boolean, setting: boolean): void { + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = chatRanksBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: チャットランク`, + `\n§o§4[§6Command§4]§f: chatranks`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}chatranks [options]`, - `§4[§6説明§4]§f:チャットのランクを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles chat ranks.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7ChatRanksモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of ChatRanks module§4]§f`, ` -e, --enable`, - ` §4[§7ChatRanksモジュールをBooleanにする§4]§f`, + ` §4[§7Enable ChatRanks module§4]§f`, ` -d, --disable`, - ` §4[§7ChatRanksモジュールを無効にする§4]§f`, + ` §4[§7Disable ChatRanks module§4]§f`, ]); } @@ -43,7 +43,7 @@ function chatRanksHelp(player: Player, prefix: string, chatranksBoolean: boolean export function chatranks(message: ChatSendAfterEvent, args: string[]) { handleChatRanks(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,34 +60,34 @@ export function chatranks(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleChatRanks(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/chatranks.js:35)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -95,39 +95,39 @@ async function handleChatRanks(message: ChatSendAfterEvent, args: string[]) { return chatRanksHelp(player, prefix, configuration.modules.chatranks.enabled, configuration.customcommands.chatranks); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ChatRanks module is currently ${configuration.modules.chatranks.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ChatRanks module is currently ${configuration.modules.chatranks.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.chatranks.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fChatRanksモジュールは既にBooleanになっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ChatRanks module is already enabled.`); } else { configuration.modules.chatranks.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6ChatRanks§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6ChatRanks§f!`); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.chatranks.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fChatRanksモジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ChatRanks module is already disabled.`); } else { configuration.modules.chatranks.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4ChatRanks§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4ChatRanks§f!`); } break; } } if (!validFlagFound) { - // 追加の引数はありません。 + // No additional arguments provided, display help sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}chatranks --help for more information.`); } } diff --git a/src/commands/settings/enchantedarmor.ts b/src/commands/settings/enchantedarmor.ts index 3b4911a..cb9d380 100644 --- a/src/commands/settings/enchantedarmor.ts +++ b/src/commands/settings/enchantedarmor.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the Enchanted Armor custom command setting. */ function enchantedArmorHelp(player: Player, prefix: string, encharmorscore: number, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = encharmorscore > 0 ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = encharmorscore > 0 ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n[魔法§4][§6コマンド§4]§f:エンチャントアーマー`, + `\n§o§4[§6Command§4]§f: enchantedarmor`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}enchantedarmor [options]`, - `§4[§6Description§4]§f:すべてのプレイヤーのアンチエンチャントアーマーを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles Anti Enchanted Armor for all players.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7エンチャントアーマーモジュールの現在のステータスを表示する§4]§f`, + ` §4[§7Display the current status of Enchanted Armor module§4]§f`, ` -e, --enable`, - ` §4[§7Enable Enchanted Armor モジュール§4]§f`, + ` §4[§7Enable Enchanted Armor module§4]§f`, ` -d, --disable`, - ` §4[§7エンチャント・アーマー・モジュール§4を無効にする]§f`, + ` §4[§7Disable Enchanted Armor module§4]§f`, ]); } @@ -44,7 +44,7 @@ function enchantedArmorHelp(player: Player, prefix: string, encharmorscore: numb export function enchantedarmor(message: ChatSendAfterEvent, args: string[]) { handleEnchantedArmor(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,35 +61,35 @@ export function enchantedarmor(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleEnchantedArmor(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/enchantedarmor.js:33)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const encharmorscore = ScoreManager.getScore("encharmor", player); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -97,37 +97,37 @@ async function handleEnchantedArmor(message: ChatSendAfterEvent, args: string[]) return enchantedArmorHelp(player, prefix, encharmorscore, configuration.customcommands.enchantedarmor); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Enchanted Armor module is currently ${encharmorscore > 0 ? "Boolean" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Enchanted Armor module is currently ${encharmorscore > 0 ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (encharmorscore > 0) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fエンチャントアーマーモジュールは既にBooleanである。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Enchanted Armor module is already enabled.`); } else { player.runCommand(`scoreboard players set paradox:config encharmor 1`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6Anti Enchanted Armor§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Anti Enchanted Armor§f!`); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (encharmorscore <= 0) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fエンチャント・アーマー・モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Enchanted Armor module is already disabled.`); } else { player.runCommand(`scoreboard players set paradox:config encharmor 0`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4Anti Enchanted Armor§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Anti Enchanted Armor§f!`); } break; } } if (!validFlagFound) { - // 追加の引数はありません。 + // No additional arguments provided, display help sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}enchantedarmor --help for more information.`); return; } diff --git a/src/commands/settings/flya.ts b/src/commands/settings/flya.ts index f4b5638..e7f4ae5 100644 --- a/src/commands/settings/flya.ts +++ b/src/commands/settings/flya.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the FlyA custom command setting. */ function flyaHelp(player: Player, prefix: string, flyABoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = flyABoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = flyABoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: flya`, + `\n§o§4[§6Command§4]§f: flya`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}flya [options]`, - `§4[§6Description§4]§f:生存中の不正な飛行のチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for illegal flying in survival.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7FlyAモジュールの現在のステータスを表示する§4]§f`, + ` §4[§7Display the current status of FlyA module§4]§f`, ` -e, --enable`, - ` §4[§7FlyAモジュールをBooleanにする§4]§f`, + ` §4[§7Enable FlyA module§4]§f`, ` -d, --disable`, - ` §4[§7FlyAモジュールを無効にする§4]§f`, + ` §4[§7Disable FlyA module§4]§f`, ]); } @@ -44,7 +44,7 @@ function flyaHelp(player: Player, prefix: string, flyABoolean: boolean, setting: export function flyA(message: ChatSendAfterEvent, args: string[]) { handleFlyA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function flyA(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleFlyA(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/flya.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,40 +96,40 @@ async function handleFlyA(message: ChatSendAfterEvent, args: string[]) { return flyaHelp(player, prefix, configuration.modules.flyA.enabled, configuration.customcommands.flya); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f FlyA module is currently ${configuration.modules.flyA.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f FlyA module is currently ${configuration.modules.flyA.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.flyA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f FlyA モジュールは既にBooleanになっている.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f FlyA module is already enabled.`); } else { configuration.modules.flyA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6FlyA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6FlyA§f!`); FlyA(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.flyA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f FlyA モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f FlyA module is already disabled.`); } else { configuration.modules.flyA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4FlyA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4FlyA§f!`); } break; } } if (!validFlagFound) { - // 追加の引数はありません。 + // No additional arguments provided, display help sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}flya --help for more information.`); } } diff --git a/src/commands/settings/illegalenchant.ts b/src/commands/settings/illegalenchant.ts index 1e1987a..e575368 100644 --- a/src/commands/settings/illegalenchant.ts +++ b/src/commands/settings/illegalenchant.ts @@ -11,26 +11,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the illegalEnchantment custom command setting. */ function illegalEnchantHelp(player: Player, prefix: string, illegalEnchantmentBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = illegalEnchantmentBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = illegalEnchantmentBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f: イリーガルエンチャント`, + `\n§o§4[§6Command§4]§f: illegalenchant`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}illegalenchant [options]`, - `§4[§6Description§4]§f:不正なエンチャントを持つアイテムのチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for items with illegal enchantments.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7IllegalEnchantmentsモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of IllegalEnchantments module§4]§f`, ` -e, --enable`, - ` §4[§7イリーガルエンチャントモジュールをBooleanにする§4]§f`, + ` §4[§7Enable IllegalEnchantments module§4]§f`, ` -d, --disable`, - ` §4[§7イリーガルエンチャントモジュールを無効にする§4]§f`, + ` §4[§7Disable IllegalEnchantments module§4]§f`, ]); } @@ -43,7 +43,7 @@ function illegalEnchantHelp(player: Player, prefix: string, illegalEnchantmentBo export function illegalEnchant(message: ChatSendAfterEvent, args: string[]) { handleIllegalEnchant(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,34 +60,34 @@ export function illegalEnchant(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleIllegalEnchant(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/illegalenchant.js:35)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -95,39 +95,39 @@ async function handleIllegalEnchant(message: ChatSendAfterEvent, args: string[]) return illegalEnchantHelp(player, prefix, configuration.modules.illegalEnchantment.enabled, configuration.customcommands.illegalenchant); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalEnchantments module is currently ${configuration.modules.illegalEnchantment.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalEnchantments module is currently ${configuration.modules.illegalEnchantment.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.illegalEnchantment.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalEnchantments モジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalEnchantments module is already enabled.`); } else { configuration.modules.illegalEnchantment.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6IllegalEnchantments§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalEnchantments§f!`); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.illegalEnchantment.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalEnchantments モジュールは既に無効化されている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalEnchantments module is already disabled.`); } else { configuration.modules.illegalEnchantment.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4IllegalEnchantments§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalEnchantments§f!`); } break; } } if (!validFlagFound) { - // 追加の引数はありません。 + // No additional arguments provided, display help sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}illegalenchant --help for more information.`); } } diff --git a/src/commands/settings/illegalitemsa.ts b/src/commands/settings/illegalitemsa.ts index 33f1983..a8006a4 100644 --- a/src/commands/settings/illegalitemsa.ts +++ b/src/commands/settings/illegalitemsa.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the illegalItemsA custom command setting. */ function illegalItemsAHelp(player: Player, prefix: string, illegalItemsABoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = illegalItemsABoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = illegalItemsABoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f: 不正項目`, + `\n§o§4[§6Command§4]§f: illegalitemsa`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}illegalitemsa [options]`, - `§4[§6Description§4]§f:インベントリに不正なアイテムを持っているプレイヤーのチェックをトグルする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for players who have illegal items in their inventory.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7IllegalItemsAモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of IllegalItemsA module§4]§f`, ` -e, --enable`, - ` §4[§7IllegalItemsAモジュールをBooleanにする§4]§f`, + ` §4[§7Enable IllegalItemsA module§4]§f`, ` -d, --disable`, - ` §4[§7IllegalItemsAモジュールを無効にする§4]§f`, + ` §4[§7Disable IllegalItemsA module§4]§f`, ]); } @@ -44,7 +44,7 @@ function illegalItemsAHelp(player: Player, prefix: string, illegalItemsABoolean: export function illegalitemsA(message: ChatSendAfterEvent, args: string[]) { handleIllegalItemsA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function illegalitemsA(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleIllegalItemsA(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/illegalitemsa.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,16 +96,16 @@ async function handleIllegalItemsA(message: ChatSendAfterEvent, args: string[]) return illegalItemsAHelp(player, prefix, configuration.modules.illegalitemsA.enabled, configuration.customcommands.illegalitemsa); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsA module is currently ${configuration.modules.illegalitemsA.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsA module is currently ${configuration.modules.illegalitemsA.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.illegalitemsA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsA モジュールが既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsA module is already enabled.`); } else { configuration.modules.illegalitemsA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); @@ -113,16 +113,16 @@ async function handleIllegalItemsA(message: ChatSendAfterEvent, args: string[]) for (const temp of nohasTag) { temp.addTag("illegalitemsA"); } - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6IllegalItemsA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalItemsA§f!`); IllegalItemsA(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.illegalitemsA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsA モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsA module is already disabled.`); } else { configuration.modules.illegalitemsA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); @@ -130,7 +130,7 @@ async function handleIllegalItemsA(message: ChatSendAfterEvent, args: string[]) for (const temp of hasTag) { temp.removeTag("illegalitemsA"); } - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4IllegalItemsA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalItemsA§f!`); } break; } diff --git a/src/commands/settings/illegalitemsb.ts b/src/commands/settings/illegalitemsb.ts index af4a025..0dcd87f 100644 --- a/src/commands/settings/illegalitemsb.ts +++ b/src/commands/settings/illegalitemsb.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the illegalItemsB custom command setting. */ function illegalItemsBHelp(player: Player, prefix: string, illegalItemsBBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = illegalItemsBBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = illegalItemsBBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f: 不正項目`, + `\n§o§4[§6Command§4]§f: illegalitemsb`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}illegalitemsb [options]`, - `§4[§6解説§4]§f:不正なアイテムを置いたプレイヤーのチェックを切り替えます。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for players who place illegal items.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7IllegalItemsBモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of IllegalItemsB module§4]§f`, ` -e, --enable`, - ` §4[§7IllegalItemsBモジュールをBooleanにする§4]§f`, + ` §4[§7Enable IllegalItemsB module§4]§f`, ` -d, --disable`, - ` §4[§7IllegalItemsBモジュールを無効にする§4]§f`, + ` §4[§7Disable IllegalItemsB module§4]§f`, ]); } @@ -44,7 +44,7 @@ function illegalItemsBHelp(player: Player, prefix: string, illegalItemsBBoolean: export function illegalitemsB(message: ChatSendAfterEvent, args: string[]) { handleIllegalItemsB(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function illegalitemsB(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleIllegalItemsB(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/illegalitemsb.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,33 +96,33 @@ async function handleIllegalItemsB(message: ChatSendAfterEvent, args: string[]) return illegalItemsBHelp(player, prefix, configuration.modules.illegalitemsB.enabled, configuration.customcommands.illegalitemsb); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsB module is currently ${configuration.modules.illegalitemsB.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsB module is currently ${configuration.modules.illegalitemsB.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.illegalitemsB.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsB モジュールは既にBooleanになっている.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsB module is already enabled.`); } else { configuration.modules.illegalitemsB.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6IllegalItemsB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalItemsB§f!`); IllegalItemsB(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.illegalitemsB.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsB モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsB module is already disabled.`); } else { configuration.modules.illegalitemsB.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4IllegalItemsB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalItemsB§f!`); } break; } diff --git a/src/commands/settings/illegalitemsc.ts b/src/commands/settings/illegalitemsc.ts index b1e9b41..a3db791 100644 --- a/src/commands/settings/illegalitemsc.ts +++ b/src/commands/settings/illegalitemsc.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the illegalItemsC custom command setting. */ function illegalItemsCHelp(player: Player, prefix: string, illegalItemsCBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = illegalItemsCBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = illegalItemsCBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§n§o4[§6コマンド§4]§f: 不正項目c`, + `\n§o§4[§6Command§4]§f: illegalitemsc`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}illegalitemsc [options]`, - `§4[§6Description§4]§f:不正なドロップアイテムのチェックを切り替えます。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for illegal dropped items.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7IllegalItemsCモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of IllegalItemsC module§4]§f`, ` -e, --enable`, - ` §4[§7IllegalItemsCモジュールをBooleanにする§4]§f`, + ` §4[§7Enable IllegalItemsC module§4]§f`, ` -d, --disable`, - ` §4[§7IllegalItemsCモジュールの無効化§4]§f`, + ` §4[§7Disable IllegalItemsC module§4]§f`, ]); } @@ -44,7 +44,7 @@ function illegalItemsCHelp(player: Player, prefix: string, illegalItemsCBoolean: export function illegalitemsC(message: ChatSendAfterEvent, args: string[]) { handleIllegalItemsC(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function illegalitemsC(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleIllegalItemsC(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/illegalitemsc.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,33 +96,33 @@ async function handleIllegalItemsC(message: ChatSendAfterEvent, args: string[]) return illegalItemsCHelp(player, prefix, configuration.modules.illegalitemsC.enabled, configuration.customcommands.illegalitemsc); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsC module is currently ${configuration.modules.illegalitemsC.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsC module is currently ${configuration.modules.illegalitemsC.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.illegalitemsC.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsC モジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsC module is already enabled.`); } else { configuration.modules.illegalitemsC.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6IllegalItemsC§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalItemsC§f!`); IllegalItemsC(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.illegalitemsC.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsC モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalItemsC module is already disabled.`); } else { configuration.modules.illegalitemsC.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4IllegalItemsC§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalItemsC§f!`); } break; } diff --git a/src/commands/settings/illegallores.ts b/src/commands/settings/illegallores.ts index 15e3f65..e45f308 100644 --- a/src/commands/settings/illegallores.ts +++ b/src/commands/settings/illegallores.ts @@ -11,26 +11,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the illegalLores custom command setting. */ function illegalLoresHelp(player: Player, prefix: string, illegalLoresBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = illegalLoresBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = illegalLoresBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f: イリーガルコース`, + `\n§o§4[§6Command§4]§f: illegallores`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}illegallores [options]`, - `§4[§6Description§4]§f:アイテムの不正な伝承のチェックをトグルする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for illegal lores on items.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` モジュール§4[§7IllegalLores モジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of IllegalLores module§4]§f`, ` -e, --enable`, - ` §4[§7不正アクセス禁止モジュールをBooleanにする§4]§f`, + ` §4[§7Enable IllegalLores module§4]§f`, ` -d, --disable`, - ` §4[§7IllegalLoresモジュールを無効にする§4]§f`, + ` §4[§7Disable IllegalLores module§4]§f`, ]); } @@ -43,7 +43,7 @@ function illegalLoresHelp(player: Player, prefix: string, illegalLoresBoolean: b export function illegalLores(message: ChatSendAfterEvent, args: string[]) { handleIllegalLores(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,34 +60,34 @@ export function illegalLores(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleIllegalLores(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/illegalLores.js:35)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -95,32 +95,32 @@ async function handleIllegalLores(message: ChatSendAfterEvent, args: string[]) { return illegalLoresHelp(player, prefix, configuration.modules.illegalLores.enabled, configuration.customcommands.illegallores); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalLores module is currently ${configuration.modules.illegalLores.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalLores module is currently ${configuration.modules.illegalLores.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.illegalLores.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalLores モジュールは既にBooleanになっている.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalLores module is already enabled.`); } else { configuration.modules.illegalLores.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6IllegalLores§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalLores§f!`); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.illegalLores.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalLores モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f IllegalLores module is already disabled.`); } else { configuration.modules.illegalLores.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4IllegalLores§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalLores§f!`); } break; } diff --git a/src/commands/settings/invalidsprinta.ts b/src/commands/settings/invalidsprinta.ts index 1ea25af..009961b 100644 --- a/src/commands/settings/invalidsprinta.ts +++ b/src/commands/settings/invalidsprinta.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the invalidSprintA custom command setting. */ function invalidSprintAHelp(player: Player, prefix: string, invalidSprintABoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = invalidSprintABoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = invalidSprintABoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: 無効なスプリント`, + `\n§o§4[§6Command§4]§f: invalidsprinta`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}invalidsprinta [options]`, - `§4[§6Description§4]§f:盲目の効果による不正なスプリントのチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for illegal sprinting with blindness effect.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7InvalidSprintAモジュールの現在の状態の表示§4]§f`, + ` §4[§7Display the current status of InvalidSprintA module§4]§f`, ` -e, --enable`, - ` §4[§7無効スプリントBooleanモジュール§4]§f`, + ` §4[§7Enable InvalidSprintA module§4]§f`, ` -d, --disable`, - ` モジュール§4[§7 InvalidSprintA モジュールを無効にする§4]§f`, + ` §4[§7Disable InvalidSprintA module§4]§f`, ]); } @@ -44,7 +44,7 @@ function invalidSprintAHelp(player: Player, prefix: string, invalidSprintABoolea export function invalidsprintA(message: ChatSendAfterEvent, args: string[]) { handleInvalidSprintA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function invalidsprintA(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleInvalidSprintA(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/invalidsprinta.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,33 +96,33 @@ async function handleInvalidSprintA(message: ChatSendAfterEvent, args: string[]) return invalidSprintAHelp(player, prefix, configuration.modules.invalidsprintA.enabled, configuration.customcommands.invalidsprinta); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f InvalidSprintA module is currently ${configuration.modules.invalidsprintA.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f InvalidSprintA module is currently ${configuration.modules.invalidsprintA.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.invalidsprintA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f無効スプリントモジュールが既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f InvalidSprintA module is already enabled.`); } else { configuration.modules.invalidsprintA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6InvalidSprintA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6InvalidSprintA§f!`); InvalidSprintA(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.invalidsprintA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f無効スプリントモジュールが既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f InvalidSprintA module is already disabled.`); } else { configuration.modules.invalidsprintA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4InvalidSprintA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4InvalidSprintA§f!`); } break; } diff --git a/src/commands/settings/jesusa.ts b/src/commands/settings/jesusa.ts index e48cfe0..d82dec1 100644 --- a/src/commands/settings/jesusa.ts +++ b/src/commands/settings/jesusa.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the jesusA custom command setting. */ function jesusAHelp(player: Player, prefix: string, jesusABoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = jesusABoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = jesusABoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6命令§4]§f: イエスA`, + `\n§o§4[§6Command§4]§f: jesusA`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}jesusA [options]`, - `§4[§6Description§4]§f:水や溶岩の上での歩行/スプリントのチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for walking/sprinting on water or lava.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7JesusAモジュールの現在のステータスを表示する§4]§f`, + ` §4[§7Display the current status of JesusA module§4]§f`, ` -e, --enable`, - ` §4[§7ジーザス・モジュールをBooleanにする§4]§f`, + ` §4[§7Enable JesusA module§4]§f`, ` -d, --disable`, - ` §4[§7ジーザス・モジュールを無効にする§4]§f`, + ` §4[§7Disable JesusA module§4]§f`, ]); } @@ -44,7 +44,7 @@ function jesusAHelp(player: Player, prefix: string, jesusABoolean: boolean, sett export function jesusA(message: ChatSendAfterEvent, args: string[]) { handleJesusA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -61,34 +61,34 @@ export function jesusA(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleJesusA(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/jesusa.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -96,33 +96,33 @@ async function handleJesusA(message: ChatSendAfterEvent, args: string[]) { return jesusAHelp(player, prefix, configuration.modules.jesusA.enabled, configuration.customcommands.jesusa); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f JesusA module is currently ${configuration.modules.jesusA.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f JesusA module is currently ${configuration.modules.jesusA.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.jesusA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fジーザス・モジュールは既にBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f JesusA module is already enabled.`); } else { configuration.modules.jesusA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6JesusA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6JesusA§f!`); JesusA(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.jesusA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fジーザス・モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f JesusA module is already disabled.`); } else { configuration.modules.jesusA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4JesusA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4JesusA§f!`); } break; } diff --git a/src/commands/settings/lagclear.ts b/src/commands/settings/lagclear.ts index af8dad8..c657a0f 100644 --- a/src/commands/settings/lagclear.ts +++ b/src/commands/settings/lagclear.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the clearlag custom command setting. */ function clearlagHelp(player: Player, prefix: string, clearLagBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = clearLagBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = clearLagBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f: クリアラグ`, + `\n§o§4[§6Command§4]§f: clearlag`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}clearlag [options]`, - `§4[§6解説§4]§f:タイマーでアイテムやエンティティをクリアする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Clears items and entities with a timer.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7クリアラグモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of ClearLag module§4]§f`, ` -e, --enable`, - ` §4[§7クリアラグモジュールをBooleanにする§4]§f`, + ` §4[§7Enable ClearLag module§4]§f`, ` -d, --disable`, - ` §4[§7クリアラグを無効にするモジュール§4]§f`, + ` §4[§7Disable ClearLag module§4]§f`, ]); } @@ -43,7 +43,7 @@ function clearlagHelp(player: Player, prefix: string, clearLagBoolean: boolean, export function clearlag(message: ChatSendAfterEvent, args: string[]) { handleClearlag(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,34 +60,34 @@ export function clearlag(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleClearlag(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/clearlag.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": @@ -95,33 +95,33 @@ async function handleClearlag(message: ChatSendAfterEvent, args: string[]) { return clearlagHelp(player, prefix, configuration.modules.clearLag.enabled, configuration.customcommands.clearlag); case "-s": case "--status": - // ハンドル状態フラグ + // Handle status flag validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ClearLagモジュールは現在、 ${configuration.modules.clearLag.enabled ? "有効" : "無効"}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ClearLag module is currently ${configuration.modules.clearLag.enabled ? "enabled" : "disabled"}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag validFlagFound = true; if (configuration.modules.clearLag.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fクリアラグモジュールが既に有効`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ClearLag module is already enabled`); } else { configuration.modules.clearLag.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6ClearLag§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6ClearLag§f!`); ClearLag(); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag validFlagFound = true; if (!configuration.modules.clearLag.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fクリアラグ・モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ClearLag module is already disabled`); } else { configuration.modules.clearLag.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は 無効 §4ClearLag§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4ClearLag§f!`); } break; } diff --git a/src/commands/settings/namespoofa.ts b/src/commands/settings/namespoofa.ts index f076ebb..3836fd7 100644 --- a/src/commands/settings/namespoofa.ts +++ b/src/commands/settings/namespoofa.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the namespoofa custom command setting. */ function namespoofAHelp(player: Player, prefix: string, nameSpoofBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = nameSpoofBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = nameSpoofBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f: ネームプーファ`, + `\n§o§4[§6Command§4]§f: namespoofa`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}namespoofa [options]`, - `§4[§6解説§4]§f:プレイヤーの名前が文字数の制限を超えたかどうかのチェックを切り替えます。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for a player's name exceeding character limitations.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7NamespoofAモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of NamespoofA module§4]§f`, ` -e, --enable`, - ` §4[§7NamespoofAモジュールをBooleanにする§4]§f`, + ` §4[§7Enable NamespoofA module§4]§f`, ` -d, --disable`, - ` §4[§7NamespoofAモジュールを無効にする§4]§f`, + ` §4[§7Disable NamespoofA module§4]§f`, ]); } @@ -43,7 +43,7 @@ function namespoofAHelp(player: Player, prefix: string, nameSpoofBoolean: boolea export function namespoofA(message: ChatSendAfterEvent, args: string[]) { handleNamespoofA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,70 +60,70 @@ export function namespoofA(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleNamespoofA(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/namespoofa.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; namespoofAHelp(player, prefix, configuration.modules.namespoofA.enabled, configuration.customcommands.namespoofa); break; case "-s": case "--status": - // NamespoofAモジュールの現在の状態を表示する + // Display current status of NamespoofA module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f NamespoofA module is currently ${configuration.modules.namespoofA.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f NamespoofA module is currently ${configuration.modules.namespoofA.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // NamespoofAモジュールをBooleanにする + // Enable NamespoofA module validFlagFound = true; if (configuration.modules.namespoofA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f名前偽装モジュールは既にBooleanです。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f NamespoofA module is already enabled`); } else { configuration.modules.namespoofA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6NamespoofA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6NamespoofA§f!`); NamespoofA(); } break; case "-d": case "--disable": - // NamespoofAモジュールを無効にする + // Disable NamespoofA module validFlagFound = true; if (!configuration.modules.namespoofA.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f名前偽装モジュールは既に無効である。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f NamespoofA module is already disabled`); } else { configuration.modules.namespoofA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4NamespoofA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4NamespoofA§f!`); } break; } diff --git a/src/commands/settings/namespoofb.ts b/src/commands/settings/namespoofb.ts index de2bb77..43c796b 100644 --- a/src/commands/settings/namespoofb.ts +++ b/src/commands/settings/namespoofb.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the namespoofb custom command setting. */ function namespoofBHelp(player: Player, prefix: string, nameSpoofBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = nameSpoofBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = nameSpoofBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: namespoofb`, + `\n§o§4[§6Command§4]§f: namespoofb`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}namespoofb [options]`, - `§4[§6Description§4]§f:非 ASCII 文字を含むプレイヤー名のチェックを切り替えます。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for a player's name that has Non-ASCII characters.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7NamespoofBモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of NamespoofB module§4]§f`, ` -e, --enable`, - ` §4[§7NamespoofBモジュールをBooleanにする§4]§f`, + ` §4[§7Enable NamespoofB module§4]§f`, ` -d, --disable`, - ` §4[§7NamespoofBモジュールを無効にする§4]§f`, + ` §4[§7Disable NamespoofB module§4]§f`, ]); } @@ -43,7 +43,7 @@ function namespoofBHelp(player: Player, prefix: string, nameSpoofBoolean: boolea export function namespoofB(message: ChatSendAfterEvent, args: string[]) { handleNamespoofB(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,70 +60,70 @@ export function namespoofB(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleNamespoofB(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/namespoofb.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; namespoofBHelp(player, prefix, configuration.modules.namespoofB.enabled, configuration.customcommands.namespoofb); break; case "-s": case "--status": - // NamespoofBモジュールの現在の状態を表示する + // Display current status of NamespoofB module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f NamespoofB module is currently ${configuration.modules.namespoofB.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f NamespoofB module is currently ${configuration.modules.namespoofB.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // NamespoofBモジュールをBooleanにする + // Enable NamespoofB module validFlagFound = true; if (configuration.modules.namespoofB.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f名前偽装モジュールは既にBooleanです。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f NamespoofB module is already enabled`); } else { configuration.modules.namespoofB.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6NamespoofB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6NamespoofB§f!`); NamespoofB(); } break; case "-d": case "--disable": - // NamespoofBモジュールを無効にする + // Disable NamespoofB module validFlagFound = true; if (!configuration.modules.namespoofB.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f名前偽装モジュールは既に無効である。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f NamespoofB module is already disabled`); } else { configuration.modules.namespoofB.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4NamespoofB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4NamespoofB§f!`); } break; } diff --git a/src/commands/settings/oneplayersleep.ts b/src/commands/settings/oneplayersleep.ts index aa432df..ceb3a77 100644 --- a/src/commands/settings/oneplayersleep.ts +++ b/src/commands/settings/oneplayersleep.ts @@ -11,26 +11,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the ops custom command setting. */ function opsHelp(player: Player, prefix: string, opsBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = opsBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = opsBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\nops§o§4[§6コマンド§4]§f: ops`, + `\n§o§4[§6Command§4]§f: ops`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}ops [options]`, - `§4[§6Description§4]§f:すべてのオンラインプレイヤーに対してワンプレイヤースリープ(OPS)を切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles One Player Sleep (OPS) for all online players.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7OPSモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of OPS module§4]§f`, ` -e, --enable`, - ` §4[§7OPSモジュールをBooleanにする§4]§f`, + ` §4[§7Enable OPS module§4]§f`, ` -d, --disable`, - ` §4[§7OPSモジュールの無効化§4]§f`, + ` §4[§7Disable OPS module§4]§f`, ]); } @@ -42,7 +42,7 @@ function opsHelp(player: Player, prefix: string, opsBoolean: boolean, setting: b export function ops(message: ChatSendAfterEvent, args: string[]) { handleOps(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -59,71 +59,71 @@ export function ops(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleOps(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/oneplayersleep.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; opsHelp(player, prefix, configuration.modules.ops.enabled, configuration.customcommands.ops); break; case "-s": case "--status": - // OPSモジュールの現在のステータスを表示する + // Display current status of OPS module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f OPS module is currently ${configuration.modules.ops.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f OPS module is currently ${configuration.modules.ops.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // OPSモジュールをBooleanにする + // Enable OPS module validFlagFound = true; if (configuration.modules.ops.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fOPSモジュールは既にBooleanになっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f OPS module is already enabled`); } else { configuration.modules.ops.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6OPS§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6OPS§f!`); //Use the native inbuilt gamerule player.runCommandAsync(`/gamerule playersSleepingPercentage 1`); } break; case "-d": case "--disable": - // OPSモジュールを無効にする + // Disable OPS module validFlagFound = true; if (!configuration.modules.ops.enabled) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fOPSモジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f OPS module is already disabled`); } else { configuration.modules.ops.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4OPS§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4OPS§f!`); //Use the native inbuilt gamerule player.runCommandAsync(`/gamerule playersSleepingPercentage 100`); } diff --git a/src/commands/settings/overidecommandblocksenabled.ts b/src/commands/settings/overidecommandblocksenabled.ts index 34edfc8..2b18b60 100644 --- a/src/commands/settings/overidecommandblocksenabled.ts +++ b/src/commands/settings/overidecommandblocksenabled.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the overridecbe custom command setting. */ function overrideCBEHelp(player: Player, prefix: string, cmdsscore: number, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = cmdsscore <= 0 ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = cmdsscore <= 0 ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f: オーバーライド`, + `\n§o§4[§6Command§4]§f: overridecbe`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}overridecbe [options]`, - `§4[§6Description§4]§f:commandblocksBoolean gamerule を常にBooleanまたは無効にする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Forces the commandblocksenabled gamerule to be enabled or disabled at all times.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7CommandBlocksBooleanモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of CommandBlocksEnabled module§4]§f`, ` -e, --enable`, - ` §4[§7Enable CommandBlocksBoolean モジュール§4]§f`, + ` §4[§7Enable CommandBlocksEnabled module§4]§f`, ` -d, --disable`, - ` §4[§7CommandBlocksBoolean モジュールを無効にする§4]§f`, + ` §4[§7Disable CommandBlocksEnabled module§4]§f`, ]); } @@ -43,7 +43,7 @@ function overrideCBEHelp(player: Player, prefix: string, cmdsscore: number, sett export function overridecbe(message: ChatSendAfterEvent, args: string[]) { handleOverrideCBE(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,68 +60,68 @@ export function overridecbe(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleOverrideCBE(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/overridecbe.js:7)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const cmdsscore = ScoreManager.getScore("cmds", player); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; overrideCBEHelp(player, prefix, cmdsscore, configuration.customcommands.overidecommandblocksenabled); break; case "-s": case "--status": - // CommandBlocksBooleanモジュールの現在のステータスを表示する。 + // Display current status of CommandBlocksEnabled module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f CommandBlocksBoolean module is currently ${cmdsscore <= 0 ? "§4無効" : "§aBoolean"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f CommandBlocksEnabled module is currently ${cmdsscore <= 0 ? "§4DISABLED" : "§aENABLED"}§f.`); break; case "-e": case "--enable": - // CommandBlocksBooleanモジュールをBooleanにする + // Enable CommandBlocksEnabled module validFlagFound = true; if (cmdsscore <= 0) { player.runCommand(`scoreboard players set paradox:config cmds 1`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has set CommandBlocksBoolean as §aBoolean§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has set CommandBlocksEnabled as §aenabled§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fCommandBlocksBooleanモジュールは既にBooleanです。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f CommandBlocksEnabled module is already enabled`); } break; case "-d": case "--disable": - // CommandBlocksBooleanモジュールを無効にする + // Disable CommandBlocksEnabled module validFlagFound = true; if (cmdsscore <= 0) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fコマンドブロックBooleanモジュールが既に無効`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f CommandBlocksEnabled module is already disabled`); } else { player.runCommand(`scoreboard players set paradox:config cmds 0`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has set CommandBlocksBoolean as §4無効§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has set CommandBlocksEnabled as §4disabled§f!`); } break; } diff --git a/src/commands/settings/reacha.ts b/src/commands/settings/reacha.ts index 9212f94..5015014 100644 --- a/src/commands/settings/reacha.ts +++ b/src/commands/settings/reacha.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the reacha custom command setting. */ function reachAHelp(player: Player, prefix: string, reachABoolean: boolean, setting: boolean) { - // コマンドとモジュールのステータスを決定する - const commandStatus = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus = reachABoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus = reachABoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f:リーチャ`, + `\n§o§4[§6Command§4]§f: reacha`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}reacha [options]`, - `§4[§6解説§4]§f:手の届かないところにブロックを置いているプレイヤーのチェッ クを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for a player placing blocks beyond reach.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7リーチモジュールの現在の状態の表示§4]§f`, + ` §4[§7Display the current status of ReachA module§4]§f`, ` -e, --enable`, - ` §4[§7ReachAモジュールをBooleanにする§4]§f`, + ` §4[§7Enable ReachA module§4]§f`, ` -d, --disable`, - ` §4[§7ReachAモジュールを無効にする§4]§f`, + ` §4[§7Disable ReachA module§4]§f`, ]); } @@ -43,7 +43,7 @@ function reachAHelp(player: Player, prefix: string, reachABoolean: boolean, sett export function reachA(message: ChatSendAfterEvent, args: string[]) { handleReachA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,69 +60,69 @@ export function reachA(message: ChatSendAfterEvent, args: string[]) { * @param {string[]} args - Additional arguments provided (optional). */ async function handleReachA(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/reacha.js:36)`); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; reachAHelp(player, prefix, configuration.modules.reachA.enabled, configuration.customcommands.reacha); break; case "-s": case "--status": - // ReachAモジュールの現在のステータスを表示 + // Display current status of ReachA module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachA module is currently ${configuration.modules.reachA.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachA module is currently ${configuration.modules.reachA.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // ReachAモジュールをBooleanにする + // Enable ReachA module validFlagFound = true; if (!configuration.modules.reachA.enabled) { configuration.modules.reachA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6ReachA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6ReachA§f!`); BeforeReachA(); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fリーチモジュールは既にBooleanです。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachA module is already enabled`); } break; case "-d": case "--disable": - // ReachAモジュールを無効にする + // Disable ReachA module validFlagFound = true; if (configuration.modules.reachA.enabled) { configuration.modules.reachA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4ReachA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4ReachA§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachA モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachA module is already disabled`); } break; } diff --git a/src/commands/settings/reachb.ts b/src/commands/settings/reachb.ts index 64c8ec2..70d5210 100644 --- a/src/commands/settings/reachb.ts +++ b/src/commands/settings/reachb.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the reachb custom command setting. */ function reachBHelp(player: Player, prefix: string, reachBBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = reachBBoolean ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = reachBBoolean ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f:到達点`, + `\n§o§4[§6Command§4]§f: reachb`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}reachb [options]`, - `§4[§6解説§4]§f.プレイヤーの攻撃が届かないかどうかのチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for a player's attacking beyond reach.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7ReachBモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of ReachB module§4]§f`, ` -e, --enable`, - ` §4[§7ReachBモジュールをBooleanにする§4]§f`, + ` §4[§7Enable ReachB module§4]§f`, ` -d, --disable`, - ` §4[§7ReachBモジュールを無効にする§4]§f`, + ` §4[§7Disable ReachB module§4]§f`, ]); } @@ -43,7 +43,7 @@ function reachBHelp(player: Player, prefix: string, reachBBoolean: boolean, sett export function reachB(message: ChatSendAfterEvent, args: string[]): void { handleReachB(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,69 +60,69 @@ export function reachB(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleReachB(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/reachb.js:36)`); } const player: Player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; reachBHelp(player, prefix, configuration.modules.reachB.enabled, configuration.customcommands.reachb); break; case "-s": case "--status": - // ReachBモジュールの現在のステータスを表示 + // Display current status of ReachB module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachB module is currently ${configuration.modules.reachB.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachB module is currently ${configuration.modules.reachB.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // ReachBモジュールをBooleanにする + // Enable ReachB module validFlagFound = true; if (!configuration.modules.reachB.enabled) { configuration.modules.reachB.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6ReachB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6ReachB§f!`); ReachB(); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachB モジュールは既にBooleanです。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachB module is already enabled`); } break; case "-d": case "--disable": - // ReachBモジュールを無効にする + // Disable ReachB module validFlagFound = true; if (configuration.modules.reachB.enabled) { configuration.modules.reachB.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4ReachB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4ReachB§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachB モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ReachB module is already disabled`); } break; } diff --git a/src/commands/settings/removecommandblocks.ts b/src/commands/settings/removecommandblocks.ts index bb83175..dba1fc9 100644 --- a/src/commands/settings/removecommandblocks.ts +++ b/src/commands/settings/removecommandblocks.ts @@ -8,30 +8,30 @@ import ConfigInterface from "../../interfaces/Config.js"; * Provides help information for the removecb command. * @param {Player} player - The player requesting help. * @param {string} prefix - The custom prefix for the player. - * @param {number} commandblocksscore - The current score for the 'コマンドブロック' objective. + * @param {number} commandblocksscore - The current score for the 'commandblocks' objective. * @param {boolean} setting - The status of the removecommandblocks custom command setting. */ function removeCBEHelp(player: Player, prefix: string, commandblocksscore: number, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = commandblocksscore <= 0 ? "§6[§4無効§6]§f" : "§6[§a有効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = commandblocksscore <= 0 ? "§6[§4DISABLED§6]§f" : "§6[§aENABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\nコマンド§4[§6 コマンド§4]§f: removecb`, + `\n§o§4[§6Command§4]§f: removecb`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}removecb [options]`, - `§4[§6Description§4]§f:アンチコマンドブロックを切り替える(Booleanにするとすべてクリアされる)。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles Anti Command Blocks (Clears all when enabled).`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7アンチコマンドブロックモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of Anti Command Blocks module§4]§f`, ` -e, --enable`, - ` §4[§7アンチ・コマンド・ブロック・モジュールをBooleanにする§4]§f`, + ` §4[§7Enable Anti Command Blocks module§4]§f`, ` -d, --disable`, - ` §4[§7コマンドブロック対策モジュール§4を無効にする]§f`, + ` §4[§7Disable Anti Command Blocks module§4]§f`, ]); } @@ -43,7 +43,7 @@ function removeCBEHelp(player: Player, prefix: string, commandblocksscore: numbe export function removecb(message: ChatSendAfterEvent, args: string[]): void { handleRemoveCB(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,68 +60,68 @@ export function removecb(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleRemoveCB(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/removeCommandBlocks.js:33)`); } const player: Player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const commandblocksscore: number = ScoreManager.getScore("commandblocks", player); const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; removeCBEHelp(player, prefix, commandblocksscore, configuration.customcommands.removecommandblocks); break; case "-s": case "--status": - // アンチコマンドブロックモジュールの現在のステータスを表示 + // Display current status of Anti Command Blocks module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Anti Command Blocks module is currently ${commandblocksscore <= 0 ? "§4無効" : "§aBoolean"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Anti Command Blocks module is currently ${commandblocksscore <= 0 ? "§4DISABLED" : "§aENABLED"}§f.`); break; case "-e": case "--enable": - // アンチ・コマンド・ブロック・モジュールをBooleanにする + // Enable Anti Command Blocks module validFlagFound = true; if (commandblocksscore <= 0) { player.runCommand(`scoreboard players set paradox:config commandblocks 1`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6Anti Command Blocks§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Anti Command Blocks§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fコマンドブロック対策モジュールが既にBoolean`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Anti Command Blocks module is already enabled`); } break; case "-d": case "--disable": - // アンチ・コマンド・ブロック・モジュールを無効にする + // Disable Anti Command Blocks module validFlagFound = true; if (commandblocksscore <= 0) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fコマンドブロック対策モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Anti Command Blocks module is already disabled`); } else { player.runCommand(`scoreboard players set paradox:config commandblocks 0`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4Anti Command Blocks§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Anti Command Blocks§f!`); } break; } diff --git a/src/commands/settings/salvagesystem.ts b/src/commands/settings/salvagesystem.ts index 2b9b5f3..c363734 100644 --- a/src/commands/settings/salvagesystem.ts +++ b/src/commands/settings/salvagesystem.ts @@ -11,26 +11,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the salvage custom command setting. */ function salvageHelp(player: Player, prefix: string, salvageBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = salvageBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = salvageBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f:サルベージ`, + `\n§o§4[§6Command§4]§f: salvage`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}salvage [options]`, - `§4[§6説明§4]§f:すべてのアイテムのサルベージシステムを切り替えます。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles the salvage system for all items.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7サルベージモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of Salvage module§4]§f`, ` -e, --enable`, - ` §4[§7サルベージモジュールをBooleanにする§4]§f`, + ` §4[§7Enable Salvage module§4]§f`, ` -d, --disable`, - ` §4[§7サルベージモジュールの無効化§4]§f`, + ` §4[§7Disable Salvage module§4]§f`, ]); } @@ -42,7 +42,7 @@ function salvageHelp(player: Player, prefix: string, salvageBoolean: boolean, se export function salvage(message: ChatSendAfterEvent, args: string[]): void { handleSalvage(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -59,68 +59,68 @@ export function salvage(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleSalvage(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/salvage.js:35)`); } const player: Player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; salvageHelp(player, prefix, configuration.modules.salvage.enabled, configuration.customcommands.salvage); break; case "-s": case "--status": - // サルベージ・モジュールの現在のステータスを表示する + // Display current status of Salvage module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Salvage module is currently ${configuration.modules.salvage.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Salvage module is currently ${configuration.modules.salvage.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // サルベージ・モジュールをBooleanにする + // Enable Salvage module validFlagFound = true; if (!configuration.modules.salvage.enabled) { configuration.modules.salvage.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f 以下の機能が有効です=> §6Salvage§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has enabled §6Salvage§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fサルベージモジュールは既にBooleanです。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Salvage module is already enabled`); } break; case "-d": case "--disable": - // サルベージ・モジュールを無効にする + // Disable Salvage module validFlagFound = true; if (configuration.modules.salvage.enabled) { configuration.modules.salvage.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has 無効 §4Salvage§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has disabled §4Salvage§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fサルベージ・モジュールは既に無効です。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Salvage module is already disabled`); } break; } diff --git a/src/commands/settings/showrules.ts b/src/commands/settings/showrules.ts index 4fccfa6..bf67082 100644 --- a/src/commands/settings/showrules.ts +++ b/src/commands/settings/showrules.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the showrules custom command setting. */ function showrulesHelp(player: Player, prefix: string, showrulesBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = showrulesBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = showrulesBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: ショールール`, + `\n§o§4[§6Command§4]§f: showrules`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}showrules [options]`, - `§4[§6Description§4]§f:プレイヤーが初めてロードしたときにルールを表示するかどうかを切り替えます。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles showing the rules when the player loads in for the first time.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7ShowRulesモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of ShowRules module§4]§f`, ` -e, --enable`, - ` §4[§7ShowRulesモジュールをBooleanにする§4]§f`, + ` §4[§7Enable ShowRules module§4]§f`, ` -d, --disable`, - ` §4[§7ShowRulesモジュールを無効にする§4]§f`, + ` §4[§7Disable ShowRules module§4]§f`, ]); } @@ -43,7 +43,7 @@ function showrulesHelp(player: Player, prefix: string, showrulesBoolean: boolean export function showrules(message: ChatSendAfterEvent, args: string[]): void { handleShowRules(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,69 +60,69 @@ export function showrules(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleShowRules(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/showrules.js:36)`); } const player: Player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; showrulesHelp(player, prefix, configuration.modules.showrules.enabled, configuration.customcommands.showrules); break; case "-s": case "--status": - // ShowRulesモジュールの現在のステータスを表示する + // Display current status of ShowRules module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ShowRules module is currently ${configuration.modules.showrules.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ShowRules module is currently ${configuration.modules.showrules.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // ShowRulesモジュールをBooleanにする + // Enable ShowRules module validFlagFound = true; if (!configuration.modules.showrules.enabled) { configuration.modules.showrules.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f 以下の機能が有効です=> §6ShowRules§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has enabled §6ShowRules§f!`); ShowRules(); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f「ShowRules」モジュールは既にBooleanです。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ShowRules module is already enabled`); } break; case "-d": case "--disable": - // ShowRulesモジュールを無効にする + // Disable ShowRules module validFlagFound = true; if (configuration.modules.showrules.enabled) { configuration.modules.showrules.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has 無効 §4ShowRules§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has disabled §4ShowRules§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f「ShowRules」モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ShowRules module is already disabled`); } break; } diff --git a/src/commands/settings/spammera.ts b/src/commands/settings/spammera.ts index 3e17a1c..c39271a 100644 --- a/src/commands/settings/spammera.ts +++ b/src/commands/settings/spammera.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the spammerA custom command setting. */ function spammerAHelp(player: Player, prefix: string, spammerABoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = spammerABoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = spammerABoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f: spammera`, + `\n§o§4[§6Command§4]§f: spammera`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}spammera [options]`, - `§4[§6Description§4]§f:移動中に送信されたメッセージのチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for messages sent while moving.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7スパマーモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of SpammerA module§4]§f`, ` -e, --enable`, - ` §4[§7スパマーモジュールをBooleanにする§4]§f`, + ` §4[§7Enable SpammerA module§4]§f`, ` -d, --disable`, - ` §4[§7スパムメールを無効にするモジュール§4]§f`, + ` §4[§7Disable SpammerA module§4]§f`, ]); } @@ -43,7 +43,7 @@ function spammerAHelp(player: Player, prefix: string, spammerABoolean: boolean, export function spammerA(message: ChatSendAfterEvent, args: string[]): void { handleSpammerA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,69 +60,69 @@ export function spammerA(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleSpammerA(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/spammera.js:36)`); } const player: Player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; spammerAHelp(player, prefix, configuration.modules.spammerA.enabled, configuration.customcommands.spammera); break; case "-s": case "--status": - // SpammerAモジュールの現在のステータスを表示する + // Display current status of SpammerA module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerA module is currently ${configuration.modules.spammerA.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerA module is currently ${configuration.modules.spammerA.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // SpammerAモジュールをBooleanにする + // Enable SpammerA module validFlagFound = true; if (!configuration.modules.spammerA.enabled) { configuration.modules.spammerA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f 以下の機能が有効です=> §6SpammerA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has enabled §6SpammerA§f!`); SpammerA(); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fスパマーモジュールは既にBooleanです。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerA module is already enabled`); } break; case "-d": case "--disable": - // SpammerAモジュールを無効にする + // Disable SpammerA module validFlagFound = true; if (configuration.modules.spammerA.enabled) { configuration.modules.spammerA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has 無効 §4SpammerA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has disabled §4SpammerA§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerA モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerA module is already disabled`); } break; } diff --git a/src/commands/settings/spammerb.ts b/src/commands/settings/spammerb.ts index 743da0b..5ec35f6 100644 --- a/src/commands/settings/spammerb.ts +++ b/src/commands/settings/spammerb.ts @@ -8,30 +8,30 @@ import ConfigInterface from "../../interfaces/Config.js"; * Provides help information for the spammerB command. * @param {Player} player - The player requesting help. * @param {string} prefix - The custom prefix for the player. - * @param {boolean} spammerB.enabled - The status of the spammerB module. + * @param {boolean} spammerBBoolean - The status of the spammerB module. * @param {boolean} setting - The status of the spammerB custom command setting. */ function spammerBHelp(player: Player, prefix: string, spammerBBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = spammerBBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = spammerBBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§n§o§4[§6 コマンド§4]§f: spammerb`, + `\n§o§4[§6Command§4]§f: spammerb`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}spammerb [options]`, - `§4[§6Description§4]§f:スイング中に送信されたメッセージのチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for messages sent while swinging.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7スパマーBモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of SpammerB module§4]§f`, ` -e, --enable`, - ` §4[§7スパマーBモジュールをBooleanにする§4]§f`, + ` §4[§7Enable SpammerB module§4]§f`, ` -d, --disable`, - ` §4[§7SpammerBモジュールを無効にする§4]§f`, + ` §4[§7Disable SpammerB module§4]§f`, ]); } @@ -43,7 +43,7 @@ function spammerBHelp(player: Player, prefix: string, spammerBBoolean: boolean, export function spammerB(message: ChatSendAfterEvent, args: string[]): void { handleSpammerB(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,69 +60,69 @@ export function spammerB(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleSpammerB(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/spammerb.js:36)`); } const player: Player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; spammerBHelp(player, prefix, configuration.modules.spammerB.enabled, configuration.customcommands.spammerb); break; case "-s": case "--status": - // SpammerBモジュールの現在のステータスを表示する + // Display current status of SpammerB module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerB module is currently ${configuration.modules.spammerB.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerB module is currently ${configuration.modules.spammerB.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // SpammerBモジュールをBooleanにする + // Enable SpammerB module validFlagFound = true; if (!configuration.modules.spammerB.enabled) { configuration.modules.spammerB.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f 以下の機能が有効です=> §6SpammerB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has enabled §6SpammerB§f!`); SpammerB(); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerB モジュールは既にBooleanになっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerB module is already enabled`); } break; case "-d": case "--disable": - // SpammerBモジュールを無効にする + // Disable SpammerB module validFlagFound = true; if (configuration.modules.spammerB.enabled) { configuration.modules.spammerB.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has 無効 §4SpammerB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has disabled §4SpammerB§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerB モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerB module is already disabled`); } break; } diff --git a/src/commands/settings/spammerc.ts b/src/commands/settings/spammerc.ts index 11b04a4..6599b1a 100644 --- a/src/commands/settings/spammerc.ts +++ b/src/commands/settings/spammerc.ts @@ -8,30 +8,30 @@ import ConfigInterface from "../../interfaces/Config.js"; * Provides help information for the spammerC command. * @param {Player} player - The player requesting help. * @param {string} prefix - The custom prefix for the player. - * @param {boolean} spammerC.enabled - The status of the spammerC module. + * @param {boolean} spammerCBoolean - The status of the spammerC module. * @param {boolean} setting - The status of the spammerC custom command setting. */ function spammerCHelp(player: Player, prefix: string, spammerCBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = spammerCBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = spammerCBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f: spammerc`, + `\n§o§4[§6Command§4]§f: spammerc`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}spammerc [options]`, - `§4[§6説明§4]§f:アイテムの使用中に送信されたメッセージのチェックを切り替えます。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for messages sent while using items.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7スパマーCモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of SpammerC module§4]§f`, ` -e, --enable`, - ` §4[§7スパマーCモジュールをBooleanにする§4]§f`, + ` §4[§7Enable SpammerC module§4]§f`, ` -d, --disable`, - ` §4[§7SpammerCモジュールを無効にする§4]§f`, + ` §4[§7Disable SpammerC module§4]§f`, ]); } @@ -43,7 +43,7 @@ function spammerCHelp(player: Player, prefix: string, spammerCBoolean: boolean, export function spammerC(message: ChatSendAfterEvent, args: string[]): void { handleSpammerC(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,69 +60,69 @@ export function spammerC(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleSpammerC(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/spammerC.js:36)`); } const player: Player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; spammerCHelp(player, prefix, configuration.modules.spammerC.enabled, configuration.customcommands.spammerc); break; case "-s": case "--status": - // SpammerCモジュールの現在のステータスを表示する + // Display current status of SpammerC module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerC module is currently ${configuration.modules.spammerC.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerC module is currently ${configuration.modules.spammerC.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // SpammerCモジュールをBooleanにする + // Enable SpammerC module validFlagFound = true; if (!configuration.modules.spammerC.enabled) { configuration.modules.spammerC.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f 以下の機能が有効です=> §6SpammerC§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has enabled §6SpammerC§f!`); SpammerC(); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerC モジュールは既にBooleanになっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerC module is already enabled`); } break; case "-d": case "--disable": - // SpammerCモジュールを無効にする + // Disable SpammerC module validFlagFound = true; if (configuration.modules.spammerC.enabled) { configuration.modules.spammerC.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has 無効 §4SpammerC§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has disabled §4SpammerC§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerC モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpammerC module is already disabled`); } break; } diff --git a/src/commands/settings/spawnprotection.ts b/src/commands/settings/spawnprotection.ts index b425f18..50c6cf7 100644 --- a/src/commands/settings/spawnprotection.ts +++ b/src/commands/settings/spawnprotection.ts @@ -4,31 +4,31 @@ import { dynamicPropertyRegistry } from "../../penrose/WorldInitializeAfterEvent import { SpawnProtection } from "../../penrose/TickEvent/spawnprotection/spawnProtection.js"; import ConfigInterface from "../../interfaces/Config.js"; -function spawnprotectionHelp(player: Player, prefix: string, spawnprotectionBoolean: boolean, setting: boolean) { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = spawnprotectionBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; +function spawnprotectionHelp(player: Player, prefix: string, spawnProtectionBoolean: boolean, setting: boolean) { + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = spawnProtectionBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f:スポーンプロテクション`, + `\n§o§4[§6Command§4]§f: spawnprotection`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}spawnprotection [options]`, - `§4[§6解説§4]§f:建築/採掘を制限するためにエリアの保護をトグルする。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles area protection to limit building/mining.`, + `§4[§6Options§4]§f:`, ` -e, --enable`, - ` §4[§7スポーンプロテクションをBooleanにする§4]§f`, + ` §4[§7Enable spawn protection§4]§f`, ` -d, --disable`, - ` §4[§7スポーンプロテクションを無効にする§4]§f`, + ` §4[§7Disable spawn protection§4]§f`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7スタック禁止モジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of stackBan module§4]§f`, ` -c , --center `, - ` §4[§7中心座標でスポーンプロテクションを設定する§4]§f`, + ` §4[§7Set spawn protection with center coordinates§4]§f`, ` -r , --radius `, - ` §4[§7中心を基準にしたスポーン保護半径の設定§4]§f`, + ` §4[§7Set spawn protection radius based on center§4]§f`, ]); } @@ -38,50 +38,50 @@ function spawnprotectionHelp(player: Player, prefix: string, spawnprotectionBool * @param {string[]} args - Additional arguments provided (optional). */ export function spawnprotection(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/moderation/spawnprotection.js:36)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered let updates = false; // Flag to track if vec3 or rad is modified for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; return spawnprotectionHelp(player, prefix, configuration.modules.spawnprotection.enabled, configuration.customcommands.spawnprotection); case "-s": case "--status": - // SpawnProtectionモジュールの現在のステータスを表示する。 + // Display current status of SpawnProtection module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Spawn Protection module is currently ${configuration.modules.spawnprotection.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Spawn Protection module is currently ${configuration.modules.spawnprotection.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // SpawnProtectionモジュールをBooleanにする + // Enable SpawnProtection module validFlagFound = true; updates = true; if (!configuration.modules.spawnprotection.enabled) { @@ -89,41 +89,41 @@ export function spawnprotection(message: ChatSendAfterEvent, args: string[]) { const allZero = vec3.x === 0 && vec3.y === 0 && vec3.z === 0; const rad = configuration.modules.spawnprotection.radius; if (allZero && rad === 0) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f最初にスポーンガードの中心と半径を設定してください!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Please set Center and Radius for Spawn Protection first!`); } configuration.modules.spawnprotection.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); SpawnProtection(); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fスポーン保護モジュールがすでにBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Spawn Protection module is already enabled`); } break; case "-d": case "--disable": - // SpawnProtectionモジュールを無効にする + // Disable SpawnProtection module validFlagFound = true; if (configuration.modules.spawnprotection.enabled) { configuration.modules.spawnprotection.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4Spawn Protection§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Spawn Protection§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fスポーン・プロテクション・モジュールは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Spawn Protection module is already disabled`); } break; case "-c": case "--center": { - // スポーン保護センター + // Set Center for Spawn Protection validFlagFound = true; updates = true; const shiftArray = args.slice(i + 1); if (shiftArray && shiftArray.length < 3) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f無効な引数が与えられました.x y z を含めてください、例えば: 10 64 -10.`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid arguments provided. Please include x y z, for example: 10 64 -10.`); } let [x, y, z] = shiftArray.slice(0, 3).map((arg) => (arg === "~" ? arg : parseFloat(arg))); if ((x !== "~" && isNaN(x as number)) || (y !== "~" && isNaN(y as number)) || (z !== "~" && isNaN(z as number))) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f無効な引数が与えられました。x, y, z がBooleanな数であることを確認してください。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid arguments provided. Please make sure x, y, and z are valid numbers.`); } if (x === "~") { @@ -143,12 +143,12 @@ export function spawnprotection(message: ChatSendAfterEvent, args: string[]) { } case "-r": case "--radius": { - // スポーン保護センター + // Set Center for Spawn Protection validFlagFound = true; updates = true; const shiftArray = args.slice(i + 1); if (shiftArray && shiftArray.length < 1) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 無効な引数が与えられました.半径を指定してください(例:90.`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid arguments provided. Please include radius, for example: 90.`); } const radius = parseFloat(shiftArray[0]); @@ -164,7 +164,7 @@ export function spawnprotection(message: ChatSendAfterEvent, args: string[]) { } if (updates) { - const messageAction = configuration.modules.spawnprotection.enabled ? "has updated" : "以下の機能が有効です=>"; + const messageAction = configuration.modules.spawnprotection.enabled ? "has updated" : "has enabled"; sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f ${messageAction} §6Spawn Protection§f!`); } } diff --git a/src/commands/settings/speeda.ts b/src/commands/settings/speeda.ts index 80602e4..46f1570 100644 --- a/src/commands/settings/speeda.ts +++ b/src/commands/settings/speeda.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the speedA custom command setting. */ function speedAHelp(player: Player, prefix: string, speedBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = speedBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = speedBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f: speeda`, + `\n§o§4[§6Command§4]§f: speeda`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}speeda [options]`, - `§4[§6Description§4]§f:プレイヤーのスピードハッキングのチェックを切り替える。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for player's speed hacking.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7SpeedAモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of SpeedA module§4]§f`, ` -e, --enable`, - ` §4[§7SpeedAモジュールをBooleanにする§4]§f`, + ` §4[§7Enable SpeedA module§4]§f`, ` -d, --disable`, - ` §4[§7SpeedAモジュール無効§4]§f`, + ` §4[§7Disable SpeedA module§4]§f`, ]); } @@ -43,7 +43,7 @@ function speedAHelp(player: Player, prefix: string, speedBoolean: boolean, setti export function speedA(message: ChatSendAfterEvent, args: string[]): void { handleSpeedA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,69 +60,69 @@ export function speedA(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleSpeedA(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/speedA.js:36)`); } const player: Player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; speedAHelp(player, prefix, configuration.modules.speedA.enabled, configuration.customcommands.speeda); break; case "-s": case "--status": - // SpeedAモジュールの現在のステータスを表示する + // Display current status of SpeedA module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpeedA module is currently ${configuration.modules.speedA.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpeedA module is currently ${configuration.modules.speedA.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // SpeedAモジュールをBooleanにする + // Enable SpeedA module validFlagFound = true; if (!configuration.modules.speedA.enabled) { configuration.modules.speedA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f 以下の機能が有効です=> §6SpeedA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has enabled §6SpeedA§f!`); SpeedA(); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fSpeedAモジュールは既にBooleanです。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpeedA module is already enabled`); } break; case "-d": case "--disable": - // SpeedAモジュールを無効にする + // Disable SpeedA module validFlagFound = true; if (configuration.modules.speedA.enabled) { configuration.modules.speedA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has 無効 §4SpeedA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has disabled §4SpeedA§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fSpeedAモジュールはすでに無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpeedA module is already disabled`); } break; } diff --git a/src/commands/settings/stackban.ts b/src/commands/settings/stackban.ts index 509ecef..8193097 100644 --- a/src/commands/settings/stackban.ts +++ b/src/commands/settings/stackban.ts @@ -11,24 +11,24 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the stackBan custom command setting. */ function stackBanHelp(player: Player, prefix: string, stackBanBoolean: boolean, setting: boolean): void { - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = stackBanBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = stackBanBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f:スタックバン`, + `\n§o§4[§6Command§4]§f: stackban`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}stackban [options]`, - `§4[§6解説§4]§f:64以上の不正なスタックを持つプレイヤーのチェックを行います。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Toggles checks for players with illegal stacks over 64.`, + `§4[§6Options§4]§f:`, ` -d, --disable`, - ` §4[§7スタック禁止モジュール§4を無効にする]§f`, + ` §4[§7Disable stackBan module§4]§f`, ` -s, --status`, - ` §4[§7スタック禁止モジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of stackBan module§4]§f`, ` -e, --enable`, - ` §4[§7スタック禁止モジュールをBooleanにする§4]§f`, + ` §4[§7Enable stackBan module§4]§f`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ]); } @@ -40,7 +40,7 @@ function stackBanHelp(player: Player, prefix: string, stackBanBoolean: boolean, export function stackBan(message: ChatSendAfterEvent, args: string[]): void { handleStackBan(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -57,7 +57,7 @@ export function stackBan(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleStackBan(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/stackban.js:35)`); } @@ -65,68 +65,68 @@ async function handleStackBan(message: ChatSendAfterEvent, args: string[]): Prom const player: Player = message.sender; const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 助けを求められたか + // Was help requested if ((args[0] && args[0].toLowerCase() === "help") || !configuration.customcommands.stackban) { return stackBanHelp(player, prefix, configuration.modules.stackBan.enabled, configuration.customcommands.stackban); } - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプ情報を表示する + // Display help information validFlagFound = true; return stackBanHelp(player, prefix, configuration.modules.stackBan.enabled, configuration.customcommands.stackban); case "-d": case "--disable": - // stackBanモジュールがまだ無効でなければ無効にする。 + // Disable stackBan module if it's not already disabled validFlagFound = true; if (configuration.modules.stackBan.enabled === false) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §4StackBans§f は既に無効になっている.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §4StackBans§f is already disabled.`); } else { configuration.modules.stackBan.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4StackBans§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4StackBans§f!`); } break; case "-e": case "--enable": - // stackBanモジュールがまだBooleanでなければBooleanにする。 + // Enable stackBan module if it's not already enabled validFlagFound = true; if (configuration.modules.stackBan.enabled === true) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f§6StackBans§fは既にBooleanになっている.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §6StackBans§f is already enabled.`); } else { configuration.modules.stackBan.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6StackBans§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6StackBans§f!`); } break; case "-s": case "--status": - // StackBanモジュールの現在のステータスを表示する + // Display current status of StackBan module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f StackBan module is currently ${configuration.modules.stackBan.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f StackBan module is currently ${configuration.modules.stackBan.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; } } diff --git a/src/commands/settings/worldborder.ts b/src/commands/settings/worldborder.ts index a175316..7f0e41f 100644 --- a/src/commands/settings/worldborder.ts +++ b/src/commands/settings/worldborder.ts @@ -8,34 +8,34 @@ import ConfigInterface from "../../interfaces/Config.js"; * Provides help information for the worldborders command. * @param {Player} player - The player requesting help. * @param {string} prefix - The custom prefix for the player. - * @param {boolean} worldBorder.enabled - The status of the worldBorder module. + * @param {boolean} worldBorderBoolean - The status of the worldBorder module. * @param {boolean} setting - The status of the worldBorder custom command setting. */ function worldBorderHelp(player: Player, prefix: string, worldBorderBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = worldBorderBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = worldBorderBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `\n[§6コマンド§4]§f: ワールドボーダー`, + `\n§o§4[§6Command§4]§f: worldborder`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}worldborder [options]`, - `§4[§6解説§4]§f:ワールドの境界線を設定し、プレイヤーをその境界線に制限します。`, - `§4[§6オプション§4]§f:`, - ` -オーバーワールド`, - ` §4[§7オーバーワールドの境界線の大きさを設定する§4]§f`, + `§4[§6Description§4]§f: Sets the world border and restricts players to that border.`, + `§4[§6Options§4]§f:`, + ` -o, --overworld`, + ` §4[§7Set the size of the overworld border§4]§f`, ` -n, --nether`, - ` §4[§7境界線の大きさを設定する§4]§f`, + ` §4[§7Set the size of the nether border§4]§f`, ` -e, --end`, - ` §4[§7エンドボーダーのサイズを設定する§4]§f`, + ` §4[§7Set the size of the end border§4]§f`, ` -d, --disable`, - ` §4[§7ワールド・ボーダーを無効にする§4]§f`, + ` §4[§7Disable the World Border§4]§f`, ` -e, --enable`, - ` §4[§7ワールド・ボーダーをBooleanにする§4]§f`, + ` §4[§7Enable the World Border§4]§f`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ]); } @@ -63,15 +63,15 @@ function setWorldBorder(player: Player, overworldSize: number, netherSize: numbe * @returns {number | undefined} - The parsed positive number. */ function parseSize(value: string | undefined): number | undefined { - // 文字列値を数値に変換しようとする。 + // Attempt to convert the string value to a number const parsedValue = Number(value); - // 変換結果がBooleanな数値かどうかをチェックする + // Check if the conversion resulted in a valid number if (isNaN(parsedValue)) { return undefined; } - // 解析された正の数を返す + // Return the parsed positive number return Math.abs(parsedValue); } @@ -83,7 +83,7 @@ function parseSize(value: string | undefined): number | undefined { export function worldborders(message: ChatSendAfterEvent, args: string[]): void { handleWorldBorders(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -100,7 +100,7 @@ export function worldborders(message: ChatSendAfterEvent, args: string[]): void * @param {string[]} args - Additional arguments provided (optional). */ async function handleWorldBorders(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | Error: ${message} isn't defined. Did you forget to pass it? (./commands/settings/worldborder.js:38)`); } @@ -108,25 +108,25 @@ async function handleWorldBorders(message: ChatSendAfterEvent, args: string[]): const player: Player = message.sender; const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const prefix: string = getPrefix(player); const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // キャッシュ + // Cache const length = args.length; if (length <= 0 || ["--help", "-h"].includes(args[0].toLowerCase()) || !configuration.customcommands.worldborder) { return worldBorderHelp(player, prefix, configuration.modules.worldBorder.enabled, configuration.customcommands.worldborder); } - // ワールドボーダーを閉鎖 + // Shutdown worldborder if (length <= 0 || ["--disable", "-d"].includes(args[0].toLowerCase())) { - // ワールドボーダーを無効にする - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 the §6World Border§f!`); + // Disable Worldborder + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled the §6World Border§f!`); configuration.modules.worldBorder.overworld = 0; configuration.modules.worldBorder.nether = 0; configuration.modules.worldBorder.end = 0; @@ -134,16 +134,16 @@ async function handleWorldBorders(message: ChatSendAfterEvent, args: string[]): return; } - // ワールドボーダーをBooleanにする + // Enable worldborder if (length <= 0 || ["--enable", "-e"].includes(args[0].toLowerCase())) { const o = configuration.modules.worldBorder.overworld; const n = configuration.modules.worldBorder.nether; const e = configuration.modules.worldBorder.end; if (!configuration.modules.worldBorder.enabled && (o !== 0 || n !== 0 || e !== 0)) { - // ワールドボーダーをBooleanにする + // Enable Worldborder configuration.modules.worldBorder.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> the §6World Border§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled the §6World Border§f!`); WorldBorder(); return; } else { @@ -151,7 +151,7 @@ async function handleWorldBorders(message: ChatSendAfterEvent, args: string[]): if (noBorders) { return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Set the border size please. Use ${prefix}worldborder --help for command usage.`); } - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fワールド・ボーダーは既にBooleanになっている。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f World Border is already enabled.`); } } diff --git a/src/commands/settings/xraya.ts b/src/commands/settings/xraya.ts index 65dc9b7..dae6ff5 100644 --- a/src/commands/settings/xraya.ts +++ b/src/commands/settings/xraya.ts @@ -12,26 +12,26 @@ import ConfigInterface from "../../interfaces/Config.js"; * @param {boolean} setting - The status of the xrayA custom command setting. */ function xrayAHelp(player: Player, prefix: string, xrayBoolean: boolean, setting: boolean): void { - // コマンドとモジュールのステータスを決定する - const commandStatus: string = setting ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; - const moduleStatus: string = xrayBoolean ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; + // Determine the status of the command and module + const commandStatus: string = setting ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; + const moduleStatus: string = xrayBoolean ? "§6[§aENABLED§6]§f" : "§6[§4DISABLED§6]§f"; - // 選手にヘルプ情報を表示する + // Display help information to the player sendMsgToPlayer(player, [ - `§6コマンド§4]§f: xraya`, + `\n§o§4[§6Command§4]§f: xraya`, `§4[§6Status§4]§f: ${commandStatus}`, `§4[§6Module§4]§f: ${moduleStatus}`, `§4[§6Usage§4]§f: ${prefix}xraya [options]`, - `§4[§6説明§4]§f:プレイヤーがいつどこで特定の鉱石を採掘したかをスタッフに通知する。`, - `§4[§6オプション§4]§f:`, + `§4[§6Description§4]§f: Notifies staff when and where players mine specific ores.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, + ` §4[§7Display this help message§4]§f`, ` -s, --status`, - ` §4[§7XrayAモジュールの現在の状態を表示する§4]§f`, + ` §4[§7Display the current status of XrayA module§4]§f`, ` -e, --enable`, - ` §4[§7XrayAモジュールをBooleanにする§4]§f`, + ` §4[§7Enable XrayA module§4]§f`, ` -d, --disable`, - ` §4[§7XrayAモジュールを無効にする§4]§f`, + ` §4[§7Disable XrayA module§4]§f`, ]); } @@ -43,7 +43,7 @@ function xrayAHelp(player: Player, prefix: string, xrayBoolean: boolean, setting export function xrayA(message: ChatSendAfterEvent, args: string[]): void { handleXrayA(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -60,76 +60,76 @@ export function xrayA(message: ChatSendAfterEvent, args: string[]): void { * @param {string[]} args - Additional arguments provided (optional). */ async function handleXrayA(message: ChatSendAfterEvent, args: string[]): Promise { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { return console.warn(`${new Date()} | ` + `Error: ${message} isnt defined. Did you forget to pass it? (./commands/settings/xrayA.js:36)`); } const player: Player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration: ConfigInterface = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix: string = getPrefix(player); - // 位置以外の引数をチェックする + // Check for additional non-positional arguments const length = args.length; let validFlagFound = false; // Flag to track if any valid flag is encountered for (let i = 0; i < length; i++) { const additionalArg: string = args[i].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": - // ヘルプメッセージを表示する + // Display help message validFlagFound = true; xrayAHelp(player, prefix, configuration.modules.xrayA.enabled, configuration.customcommands.xraya); break; case "-s": case "--status": - // XrayAモジュールの現在のステータスを表示する + // Display current status of XrayA module validFlagFound = true; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f XrayA module is currently ${configuration.modules.xrayA.enabled ? "§aBoolean" : "§4無効"}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f XrayA module is currently ${configuration.modules.xrayA.enabled ? "§aENABLED" : "§4DISABLED"}§f.`); break; case "-e": case "--enable": - // XrayAモジュールをBooleanにする + // Enable XrayA module validFlagFound = true; if (!configuration.modules.xrayA.enabled) { configuration.modules.xrayA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f 以下の機能が有効です=> §6XrayA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has enabled §6XrayA§f!`); XrayA(); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fXrayAモジュールは既にBooleanになっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f XrayA module is already enabled`); } break; case "-d": case "--disable": - // XrayAモジュールを無効にする + // Disable XrayA module validFlagFound = true; if (configuration.modules.xrayA.enabled) { configuration.modules.xrayA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has 無効 §4XrayA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f ${player.name}§f has disabled §4XrayA§f!`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fXrayA モジュールは既に無効になっています。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f XrayA module is already disabled`); } break; } } if (!validFlagFound) { - // 無効なコマンド + // Invalid command sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}xraya --help for command usage.`); } } diff --git a/src/commands/utility/biome.ts b/src/commands/utility/biome.ts index b15df11..69d8375 100644 --- a/src/commands/utility/biome.ts +++ b/src/commands/utility/biome.ts @@ -10,16 +10,16 @@ function biomeHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `§6コマンド§4]§f:バイオーム`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f:バイオーム[オプション]`, - `§4[§6オプション§4]§f: ヘルプ`, - `§4[§6解説§4]§f:現在のバイオームとプレイヤーが向いている方向を送信する。§6MolangをBooleanにする必要があることに注意。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: biome`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: biome [optional]`, + `§4[§6Optional§4]§f: help`, + `§4[§6説明§4]§f: Sends the current biome and direction the player is facing. §6Note you need to enable Molang. `, + `§4[§6Examples§4]§f:`, ` ${prefix}biome`, - ` §4- §6現在のバイオームと方向をプレイヤーに送る§f`, + ` §4- §6Send the current biome and direction to the player§f`, ` ${prefix}biome help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } /** @@ -28,149 +28,154 @@ function biomeHelp(player: Player, prefix: string, setting: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function biome(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./utility/biome.js:26)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./utility/biome.js:26)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.biome) { return biomeHelp(player, prefix, configuration.customcommands.biome); } const directionMap: Map = new Map([ - ["North", "向いている方角: 北"], - ["South", "向いている方角: 南"], - ["East", "向いている方角: 東"], - ["West", "向いている方角: 西"], + ["North", "Facing: North"], + ["South", "Facing: South"], + ["East", "Facing: East"], + ["West", "Facing: West"], ]); - const defaultDirection: string = "検知できません!!"; + const defaultDirection: string = "Facing: Unknown!"; let direction: string; - // 一致するタグを見つけるために、マップのエントリーを繰り返し処理する。 + // Iterate over the map entries to find a matching tag for (const [tag, mappedDirection] of directionMap.entries()) { if (player.hasTag(tag)) { direction = mappedDirection; break; } } - // 一致するタグが見つからない場合は、デフォルトの方向を割り当てる。 + // If no matching tag is found, assign the default direction if (!direction) { direction = defaultDirection; } - //バイオームマップ + //Biome Map const biomeMap: Map = new Map([ - ["basalt_deltas", "バイオーム: ネザーの玄武岩の三角州"], - ["bamboo_jungle", "バイオーム: まばらなジャングル "], - ["bamboo_jungle_hills", "バイオーム: 竹林"], - ["beach", "バイオーム: ビーチ"], - ["birch_forest", "バイオーム: 白樺の森"], - ["birch_forest_hills", "バイオーム: ちょい崖の白樺の森"], - ["birch_forest_hills_mutated", "バイオーム: 白樺の森の丘の突然変異!?"], - ["birch_forest_mutated", "バイオーム: 白樺の森の変異!?"], - ["cold_beach", "バイオーム: 雪のビーチ"], - ["cold_ocean", "バイオーム: 冷たい海洋"], - ["cold_taiga", "バイオーム: 雪のタイガ"], - ["cold_taiga_hills", "バイオーム: ちょい崖のタイガ"], - ["cold_taiga_mutated", "バイオーム: 崖タイガw"], - ["crimson_forest", "バイオーム: ネザー真紅の森"], - ["deep_cold_ocean", "バイオーム: 冷たい深海"], - ["deep_frozen_ocean", "バイオーム: 凍った深海"], - ["deep_lukewarm_ocean", "バイオーム: ぬるい深海"], - ["deep_ocean", "バイオーム: ただの深海"], - ["deep_warm_ocean", "バイオーム: 深海【海底神殿あるかも?】"], - ["desert", "バイオーム: 砂漠~"], - ["desert_hills", "バイオーム: 砂漠の崖~"], - ["desert_mutated", "バイオーム: 崖砂漠~"], - ["extreme_hills_edge", "バイオーム: 吹きさらしの谷~"], - ["extreme_hills_mutated", "バイオーム: エメラルドが取れそうな山"], - ["extreme_hills_plus_trees", "バイオーム: 山岳"], - ["extreme_hills_plus_trees_mutated", "バイオーム: 森のある山"], - ["flower_forest", "バイオーム: 花の森"], - ["forest", "バイオーム: ただの森"], - ["forest_hills", "バイオーム: ちょい崖の森"], - ["frozen_ocean", "バイオーム: 凍った海"], - ["frozen_river", "バイオーム: 凍った川"], - ["ice_mountains", "バイオーム: 氷の山【スキーできるね!】"], - ["ice_plains", "バイオーム: 氷原"], - ["ice_plains_spikes", "バイオーム: 氷原のトラップ"], - ["jungle", "バイオーム: ただのジャングル"], - ["jungle_edge", "バイオーム: ジャングルエッジ~"], - ["jungle_edge_mutated", "バイオーム: 変異したジャングル・エッジ~"], - ["jungle_hills", "バイオーム: ジャングル・ヒルズ"], - ["jungle_mutated", "バイオーム: ジャングルの突然変異!?"], - ["legacy_frozen_ocean", "バイオーム:シロクマさんがスポーンする凍った海"], - ["lofty_peaks", "バイオーム: 雪山岳"], - ["lukewarm_ocean", "バイオーム: ぬるい海"], - ["mega_spruce_taiga", "バイオーム: トウヒの原生林"], - ["mega_spruce_taiga_hills", "バイオーム: 寒いタイガの原生林"], - ["mega_taiga", "バイオーム: 巨大なタイガの原生林"], - ["mega_taiga_hills", "バイオーム: 巨大なトウヒの森!"], - ["mesa", "バイオーム: メサ"], - ["mesa_bryce", "バイオーム: メサブライス"], - ["mesa_plateau", "バイオーム: メサ高原"], - ["mesa_plateau_mutated", "バイオーム:メサ高原の突然変異"], - ["mesa_plateau_stone", "バイオーム: 石テーブルトップ"], - ["mesa_plateau_stone_mutated", "バイオーム: メサ・プラトー・ストーン"], - ["mountain_grove", "バイオーム: マウンテン・グローブ"], - ["mountain_meadow", "バイオーム: マウンテン・メドウ"], - ["mountain_peaks", "バイオーム: 山頂"], - ["mushroom_island", "バイオーム: マッシュルーム・アイランド"], - ["mushroom_island_shore", "バイオーム:マッシュルーム・アイランド・ショア"], - ["nether_wastes", "バイオーム: ネザーの荒地"], - ["ocean", "バイオーム: 海"], - ["plains", "バイオーム: 平野"], - ["river", "バイオーム: 川"], - ["roofed_forest_mutated", "バイオーム: 変異した屋根のある森"], - ["savanna", "バイオーム: サバンナ"], - ["savanna_mutated", "バイオーム:サバンナ"], - ["savanna_plateau", "バイオーム:サバンナ"], - ["savanna_plateau_mutated", "バイオーム:サバンナ"], - ["snow_capped_peaks", "バイオーム: 雪に覆われた山々"], - ["snowy_slopes", "バイオーム: 雪の坂道"], - ["soulsand_valley", "バイオーム:ネザーのソウルサンド地帯"], - ["stone_beach", "バイオーム: 石浜"], - ["sunflower_plains", "バイオーム:ひまわり平野"], - ["swamp", "バイオーム: 沼地"], - ["swamp_mutated", "バイオーム: 沼地"], - ["taiga", "バイオーム: タイガ"], - ["taiga_hills", "バイオーム: タイガ"], - ["taiga_mutated", "バイオーム: タイガ"], - ["the_end", "バイオーム: エンド!!"], - ["warm_ocean", "バイオーム: 暖かい海"], - ["warped_forest", "バイオーム: 歪んだ森"], - ["deep_dark", "バイオーム: 深い闇"], - ["lush_caves", "バイオーム: 豊かな洞窟"], - ["jagged_peaks", "バイオーム: 緑豊かな鍾乳洞"], - ["dripstone_caves", "バイオーム: ドリップストーン洞窟"], - ["meadow", "バイオーム: 草地"], - ["mangrove_swamp", "バイオーム: マングローブ湿地"], - ["cherry_grove", "バイオーム: チェリー・グローブ"], - ["roofed_forest", "バイオーム: 屋根の森"], - ["grove", "バイオーム: グローブ"], - ["stony_peaks", "バイオーム: ストーニー・ピークス"], + ["basalt_deltas", "Biome: Basalt Deltas"], + ["bamboo_jungle", "Biome: Bamboo Jungle"], + ["bamboo_jungle_hills", "Biome: Bamboo Jungle Hills"], + ["beach", "Biome: Beach"], + ["birch_forest", "Biome: Birch Forest"], + ["birch_forest_hills", "Biome: Birch Forest Hills"], + ["birch_forest_hills_mutated", "Biome: Birch Forest Hills Mutated"], + ["birch_forest_mutated", "Biome: Birch Forest Mutated"], + ["cold_beach", "Biome: Cold Beach"], + ["cold_ocean", "Biome: Cold Ocean"], + ["cold_taiga", "Biome: Cold Taiga"], + ["cold_taiga_hills", "Biome: Cold Taiga Hills"], + ["cold_taiga_mutated", "Biome: Cold Taiga Mutated"], + ["crimson_forest", "Biome: Crimson Forest"], + ["deep_cold_ocean", "Biome: Deep Cold Ocean"], + ["deep_frozen_ocean", "Biome: Deep Frozen Ocean"], + ["deep_lukewarm_ocean", "Biome: Deep Lukewarm Ocean"], + ["deep_ocean", "Biome: Deep Ocean"], + ["deep_warm_ocean", "Biome: Deep Warm Ocean"], + ["desert", "Biome: Desert"], + ["desert_hills", "Biome: Desert Hills"], + ["desert_mutated", "Biome: Desert Mutated"], + ["extreme_hills", "Biome: Extreme Hills"], + ["extreme_hills_edge", "Biome: Extreme Hills Edge"], + ["extreme_hills_mutated", "Biome: Extreme Hills Mutated"], + ["extreme_hills_plus_trees", "Biome: Extreme Hills Plus Trees"], + ["extreme_hills_plus_trees_mutated", "Biome: Extreme Hills Plus Trees Mutated"], + ["flower_forest", "Biome: Flower Forest"], + ["forest", "Biome: Forest"], + ["forest_hills", "Biome: Forest Hills"], + ["frozen_ocean", "Biome: Frozen Ocean"], + ["frozen_river", "Biome: Frozen River"], + ["ice_mountains", "Biome: Ice Mountains"], + ["ice_plains", "Biome: Ice plains"], + ["ice_plains_spikes", "Biome: Ice plains Spikes"], + ["jungle", "Biome: Jungle"], + ["jungle_edge", "Biome: Jungle Edge"], + ["jungle_edge_mutated", "Biome: Jungle Edge Mutated"], + ["jungle_hills", "Biome: Jungle Hills"], + ["jungle_mutated", "Biome: Jungle Mutated"], + ["legacy_frozen_ocean", "Biome: Legacy Frozen Ocean"], + ["lofty_peaks", "Biome: Lofty Peaks"], + ["lukewarm_ocean", "Biome: Lukewarm Ocean"], + ["mega_spruce_taiga", "Biome: Mega Spruce Taiga"], + ["mega_spruce_taiga_hills", "Biome: Mega Spruce Taiga Hills"], + ["mega_taiga", "Biome: Mega Taiga"], + ["mega_taiga_hills", "Biome: Mega Taiga Hills"], + ["mesa", "Biome: Mesa"], + ["mesa_bryce", "Biome: Mesa Bryce"], + ["mesa_plateau", "Biome: Mesa Plateau"], + ["mesa_plateau_mutated", "Biome: Mesa Plateau Mutated"], + ["mesa_plateau_stone", "Biome: Mesa Plateau Stone"], + ["mesa_plateau_stone_mutated", "Biome: Mesa Plateau Stone Mutated"], + ["mountain_grove", "Biome: Mountain Grove"], + ["mountain_meadow", "Biome: Mountain Meadow"], + ["mountain_peaks", "Biome: Mountain peaks"], + ["mushroom_island", "Biome: Mushroom Island"], + ["mushroom_island_shore", "Biome: Mushroom Island Shore"], + ["nether_wastes", "Biome: Nether Wastes"], + ["ocean", "Biome: Ocean"], + ["plains", "Biome: Plains"], + ["river", "Biome: River"], + ["roofed_forest_mutated", "Biome: Roofed Forest Mutated"], + ["savanna", "Biome: Savanna"], + ["savanna_mutated", "Biome: Savanna Mutated"], + ["savanna_plateau", "Biome: Savanna Plateau"], + ["savanna_plateau_mutated", "Biome: Savanna Plateau Mutated"], + ["snow_capped_peaks", "Biome: Snow Capped Peaks"], + ["snowy_slopes", "Biome: Snowy Slopes"], + ["soulsand_valley", "Biome: Soulsand Valley"], + ["stone_beach", "Biome: Stone Beach"], + ["sunflower_plains", "Biome: Sunflower Plains"], + ["swamp", "Biome: Swamp"], + ["swamp_mutated", "Biome: Swamp Mutated"], + ["taiga", "Biome: Taiga"], + ["taiga_hills", "Biome: Taiga Hills"], + ["taiga_mutated", "Biome: Taiga Mutated"], + ["the_end", "Biome: The End"], + ["warm_ocean", "Biome: Warm Ocean"], + ["warped_forest", "Biome: Warped Forest"], + ["deep_dark", "Biome: Deep Dark"], + ["lush_caves", "Biome: Lush Caves"], + ["jagged_peaks", "Biome: Lush Caves"], + ["dripstone_caves", "Biome: Dripstone Cave"], + ["meadow", "Biome: Meadow"], + ["mangrove_swamp", "Biome: Mangrove Swamp"], + ["cherry_grove", "Biome: Cherry Grove"], + ["roofed_forest", "Biome: Roofed Forest"], + ["grove", "Biome: Grove"], + ["stony_peaks", "Biome: Stony Peaks"], ]); - const defaultBiome: string = "Unknown Or §4Molang is not Boolean!§f"; + const defaultBiome: string = "Unknown Or §4Molang is not enabled!§f"; let currentBiome: string; - // 一致するタグを見つけるために、マップのエントリーを繰り返し処理する。 + // Iterate over the map entries to find a matching tag for (const [tag, mappedBiome] of biomeMap.entries()) { if (player.hasTag(tag)) { currentBiome = mappedBiome; break; } } - // 一致するタグが見つからない場合は、デフォルトのバイオームを割り当てる。 + // If no matching tag is found, assign the default biome if (!currentBiome) { currentBiome = defaultBiome; } diff --git a/src/commands/utility/channel.ts b/src/commands/utility/channel.ts index 5d7b27f..4590069 100644 --- a/src/commands/utility/channel.ts +++ b/src/commands/utility/channel.ts @@ -13,56 +13,56 @@ function chatChannelHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6チャットチャネルコマンド§4]§f:`, - `§4[§6Status§4]§f: ${commandStatus}`, + `\n§o§4[§6Chat Channel Commands§4]§f:`, + `§4[§6ステータス§4]§f: ${commandStatus}`, ``, - `§4[§6Command§4]§f: ${prefix}channel create `, - `§4[§6説明§4]§f:新しいチャットチャンネルを作成する(オプションのパスワード付き)。`, - `§4[§6例§4]§f:`, + `§4[§6コマンド§4]§f: ${prefix}channel create `, + `§4[§6説明§4]§f: Create a new chat channel (with optional password).`, + `§4[§6Examples§4]§f:`, ` ${prefix}channel create test`, - ` §パスワードなしで 'test' という名前のチャットチャンネルを作る§f`, + ` §4- §6Create a chat channel named 'test' without a password§f`, ` ${prefix}channel create test password123`, - ` §パスワード 'password123' で 'test' という名前のチャットチャンネルを作成する。`, + ` §4- §6Create a chat channel named 'test' with password 'password123'§f`, ``, - `§4[§6Command§4]§f: ${prefix}channel delete `, - `§4[§6説明§4]§f:既存のチャットチャンネルを削除する(オプションのパスワード付き)。`, - `§4[§6例§4]§f:`, + `§4[§6コマンド§4]§f: ${prefix}channel delete `, + `§4[§6説明§4]§f: Delete an existing chat channel (with optional password).`, + `§4[§6Examples§4]§f:`, ` ${prefix}channel delete test`, - ` §4- §6「test」という名前のチャットチャンネルを削除する§f`, + ` §4- §6Delete the chat channel named 'test'§f`, ` ${prefix}channel delete test password123`, - ` §4- §6パスワード'password123'で'test'という名前のチャットチャンネルを削除する§f`, + ` §4- §6Delete the chat channel named 'test' with password 'password123'§f`, ``, - `§4[§6Command§4]§f: ${prefix}channel invite `, - `§4[§6説明§4]§f:チャットチャンネルにプレイヤーを招待する。`, - `§4[§6例§4]§f:`, + `§4[§6コマンド§4]§f: ${prefix}channel invite `, + `§4[§6説明§4]§f: Invite a player to join your chat channel.`, + `§4[§6Examples§4]§f:`, ` ${prefix}channel invite test player123`, - ` §4- §6チャットチャンネル「test」に「player123」を招待する§f`, + ` §4- §6Invite 'player123' to join the chat channel 'test'§f`, ``, - `§4[§6Command§4]§f: ${prefix}channel join `, - `§4[§6説明§4]§f:チャットチャンネルに参加する(パスワードは任意)。`, - `§4[§6例§4]§f:`, + `§4[§6コマンド§4]§f: ${prefix}channel join `, + `§4[§6説明§4]§f: Join a chat channel (with optional password).`, + `§4[§6Examples§4]§f:`, ` ${prefix}channel join test`, - ` §4- §6チャットチャンネル「test」に参加する§f`, + ` §4- §6Join the chat channel 'test'§f`, ` ${prefix}channel join test password123`, - ` §4- §6パスワード'password123'でチャットチャンネル'test'に参加する§f`, + ` §4- §6Join the chat channel 'test' with password 'password123'§f`, ``, - `§4[§6Command§4]§f: ${prefix}channel handover `, - `§4[§6解説§4]§f:チャットチャンネルの所有権を譲渡する。`, - `§4[§6例§4]§f:`, + `§4[§6コマンド§4]§f: ${prefix}channel handover `, + `§4[§6説明§4]§f: Transfer ownership of a chat channel.`, + `§4[§6Examples§4]§f:`, ` ${prefix}channel handover test newOwner123`, - ` §4- §6 チャットチャンネル 'test' の所有権を 'newOwner123' に移す§f`, + ` §4- §6Transfer ownership of the chat channel 'test' to 'newOwner123'§f`, ``, - `§4[§6Command§4]§f: ${prefix}channel members`, - `§4[§6説明§4]§f:同じチャットチャンネルにいるメンバー全員をリストアップする。`, - `§4[§6例§4]§f:`, + `§4[§6コマンド§4]§f: ${prefix}channel members`, + `§4[§6説明§4]§f: List all members in the same chat channel.`, + `§4[§6Examples§4]§f:`, ` ${prefix}channel members`, - ` §4- §6同じチャットチャンネルにいるメンバーを一覧表示する§f`, + ` §4- §6List all members in the same chat channel§f`, ``, - `§4[§6Command§4]§f: ${prefix}channel leave`, - `§4[§6説明§4]§f:現在のチャットチャンネルから抜ける。`, - `§4[§6例§4]§f:`, + `§4[§6コマンド§4]§f: ${prefix}channel leave`, + `§4[§6説明§4]§f: Leave the current chat channel.`, + `§4[§6Examples§4]§f:`, ` ${prefix}channel leave`, - ` §4- §6現在のチャットチャンネルから抜ける§f`, + ` §4- §6Leave the current chat channel§f`, ]); } @@ -92,7 +92,7 @@ export function chatChannel(message: ChatSendAfterEvent, args: string[]) { const channelNameForMembers = ChatChannelManager.getPlayerChannel(player.id); if (!channelNameForMembers) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはどのチャットチャンネルにも入っていません。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You are not in any chat channel.`); return; } @@ -191,7 +191,7 @@ export function chatChannel(message: ChatSendAfterEvent, args: string[]) { if (newChannel === "wrong_password") { sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Wrong password for chat channel '§7${channelNameToJoin}§f'.`); } else if (newChannel === "already_in_channel") { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたは既にチャットチャンネルに入っています。まず現在のチャンネルから退出してください。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You are already in a chat channel. Please leave your current channel first.`); } else if (newChannel !== false) { const joinedPlayer = (world as WorldExtended).getPlayerById(player.id); const joinedPlayerName = joinedPlayer ? joinedPlayer.name : "Unknown Player"; @@ -208,7 +208,7 @@ export function chatChannel(message: ChatSendAfterEvent, args: string[]) { sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You joined chat channel '§7${channelNameToJoin}§f'.`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fチャットチャンネルに参加できません。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Unable to join chat channel.`); } break; } @@ -226,7 +226,7 @@ export function chatChannel(message: ChatSendAfterEvent, args: string[]) { } else if (handOverResult) { sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Ownership of chat channel '§7${channelNameToHandOver}§f' transferred to '§7${newOwnerName}§f'.`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fチャットの所有権を移転できない。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Unable to transfer ownership of chat channel.`); } break; } @@ -235,18 +235,18 @@ export function chatChannel(message: ChatSendAfterEvent, args: string[]) { const channelNameToLeave = ChatChannelManager.getPlayerChannel(player.id); if (!channelNameToLeave) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはどのチャットチャンネルにも入っていません。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You are not in any chat channel.`); return; } const channelToLeave = ChatChannelManager.getChatChannelByName(channelNameToLeave); const isOwner = channelToLeave.owner === player.id; - // チャンネルからプレーヤーを外す + // Remove the player from the channel channelToLeave.members.delete(player.id); ChatChannelManager.clearPlayerFromChannelMap(player.id); - // チャンネルに残っているすべてのメンバーに、プレーヤーが退席したことを知らせる。 + // Inform all remaining members in the channel that the player left const leavingPlayer = (world as WorldExtended).getPlayerById(player.id); const leavingPlayerName = leavingPlayer ? leavingPlayer.name : "Unknown Player"; const leaveMessage = `§f§4[§6Paradox§4]§f §6${leavingPlayerName}§f left the chat channel.`; @@ -259,7 +259,7 @@ export function chatChannel(message: ChatSendAfterEvent, args: string[]) { }); if (isOwner) { - // 退団する選手がオーナーである場合、所有権を他の会員に譲渡する。 + // If the leaving player is the owner, transfer ownership to another member const newOwnerId = Array.from(channelToLeave.members)[0]; // Get the first member as new owner if (newOwnerId) { @@ -267,7 +267,7 @@ export function chatChannel(message: ChatSendAfterEvent, args: string[]) { const newOwnerObject = (world as WorldExtended).getPlayerById(newOwnerId); sendMsgToPlayer(newOwnerObject, `§f§4[§6Paradox§4]§f Ownership of chat channel '§7${channelNameToLeave}§f' transferred to '§7${newOwnerObject.name}§f'.`); } else { - // 他にメンバーがいない場合、チャンネルを削除する。 + // If no other members, delete the channel ChatChannelManager.deleteChatChannel(channelNameToLeave, channelToLeave.password); } } @@ -282,7 +282,7 @@ export function chatChannel(message: ChatSendAfterEvent, args: string[]) { } } -// playerLeaveイベントを処理するコールバック関数を定義する。 +// Define a callback function to handle the playerLeave event function onPlayerLeave(event: PlayerLeaveAfterEvent) { const playerId = event.playerId; const channelName = ChatChannelManager.getPlayerChannel(playerId); @@ -294,7 +294,7 @@ function onPlayerLeave(event: PlayerLeaveAfterEvent) { const channel = ChatChannelManager.getChatChannelByName(channelName); if (channel.owner === playerId) { - // 退団する選手がオーナーである場合、所有権を他の会員に譲渡する。 + // If the leaving player is the owner, transfer ownership to another member const newOwnerId = Array.from(channel.members).find((memberId) => memberId !== playerId); if (newOwnerId) { @@ -302,17 +302,17 @@ function onPlayerLeave(event: PlayerLeaveAfterEvent) { const newOwnerObject = (world as WorldExtended).getPlayerById(newOwnerId); sendMsgToPlayer(newOwnerObject, `§f§4[§6Paradox§4]§f Ownership of chat channel '§7${channelName}§f' transferred to '§7${newOwnerObject.name}§f'.`); } else { - // 他にメンバーがいない場合、チャンネルを削除する。 + // If no other members, delete the channel ChatChannelManager.deleteChatChannel(channelName, channel.password); return; } } - // チャンネルからプレーヤーを外す + // Remove the player from the channel channel.members.delete(playerId); ChatChannelManager.clearPlayerFromChannelMap(playerId); - // チャンネルに残っているすべてのメンバーに、プレーヤーが退席したことを知らせる。 + // Inform all remaining members in the channel that the player left const leavingPlayer = (world as WorldExtended).getPlayerById(playerId); const leavingPlayerName = leavingPlayer ? leavingPlayer.name : "Unknown Player"; @@ -326,7 +326,7 @@ function onPlayerLeave(event: PlayerLeaveAfterEvent) { } const onChannelLeave = () => { - // コールバック関数をplayerLeaveイベントにサブスクライブする。 + // Subscribe the callback function to the playerLeave event world.afterEvents.playerLeave.subscribe(onPlayerLeave); }; diff --git a/src/commands/utility/clearchat.ts b/src/commands/utility/clearchat.ts index 3c96c36..f7b3c61 100644 --- a/src/commands/utility/clearchat.ts +++ b/src/commands/utility/clearchat.ts @@ -11,16 +11,16 @@ function clearChatHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\nコマンド§4[§6コマンド§4]§f:クリアチャット`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: clearchat [オプション]`, - `§4[§6オプション§4]§f: ヘルプ`, - `§4[§6説明§4]§f:チャットをクリアする。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: clearchat`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: clearchat [optional]`, + `§4[§6Optional§4]§f: help`, + `§4[§6説明§4]§f: Will clear the chat.`, + `§4[§6Examples§4]§f:`, ` ${prefix}clearchat`, - ` §4- §6チャットをクリアする§f`, + ` §4- §6Clear the chat§f`, ` ${prefix}clearchat help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -30,27 +30,31 @@ function clearChatHelp(player: Player, prefix: string, setting: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function clearchat(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./utility/notify.js:26)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./utility/notify.js:26)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.clearchat) { return clearChatHelp(player, prefix, configuration.customcommands.clearchat); @@ -58,5 +62,5 @@ export function clearchat(message: ChatSendAfterEvent, args: string[]) { for (let clear = 0; clear < 10; clear++) sendMsg("@a", "\n".repeat(60)); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f チャットは§7${player.name}§f によってクリアされました`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f Chat has been cleared by §7${player.name}§f`); } diff --git a/src/commands/utility/delhome.ts b/src/commands/utility/delhome.ts index 22e0b29..82108d9 100644 --- a/src/commands/utility/delhome.ts +++ b/src/commands/utility/delhome.ts @@ -13,15 +13,15 @@ function delhomeHelp(player: Player, prefix: string, setting: boolean) { } return sendMsgToPlayer(player, [ `\n§o§4[§6コマンド§4]§f: delhome`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: delhome [オプション]`, - `§4[§6オプション§4]§f: 名前、ヘルプ`, - `§4[§6説明§4]§f:指定された保存されたホームの場所を削除する。`, - `§4[§6例§4]§f:`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: delhome [optional]`, + `§4[§6Optional§4]§f: name, help`, + `§4[§6説明§4]§f: Will delete specified saved home location.`, + `§4[§6Examples§4]§f:`, ` ${prefix}delhome cave`, - ` §4- §6保存されている "cave "という名前のホームロケーションを削除する§f`, + ` §4- §6Delete the saved home location named "cave"§f`, ` ${prefix}delhome help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -31,41 +31,41 @@ function delhomeHelp(player: Player, prefix: string, setting: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function delhome(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/utility/delhome.js:26)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? ./commands/utility/delhome.js:26)"); } const player = message.sender; const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // キャッシュ + // Cache const length = args.length; - // 反論はあるか + // Are there arguements if (!length) { return delhomeHelp(player, prefix, configuration.customcommands.delhome); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.delhome) { return delhomeHelp(player, prefix, configuration.customcommands.delhome); } - // スペースを許可しない + // Don't allow spaces if (length > 1) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f名前にスペースを入れないでください!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f No spaces in names please!`); } - // 安全のために座標をハッシュ化する + // Hash the coordinates for security const salt = world.getDynamicProperty("crypt"); - // この保存されたホームロケーションを検索して削除する + // Find and delete this saved home location let verify = false; let encryptedString: string = ""; const tags = player.getTags(); @@ -73,19 +73,19 @@ export function delhome(message: ChatSendAfterEvent, args: string[]) { for (let i = 0; i < tagsLength; i++) { if (tags[i].startsWith("1337")) { encryptedString = tags[i]; - // それを検証するためにデコードする + // Decode it so we can verify it tags[i] = (world as WorldExtended).decryptString(tags[i], salt as string); } if (tags[i].startsWith(args[0].toString() + " X", 13)) { verify = true; player.removeTag(encryptedString); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f '§7${args[0]}§f'というホームを正常に削除しました!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Successfully deleted home '§7${args[0]}§f'!`); break; } } if (verify === true) { return; } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f '§7${args[0]}§f'というホームは存在しません!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Home '§7${args[0]}§f' does not exist!`); } } diff --git a/src/commands/utility/ecwipe.ts b/src/commands/utility/ecwipe.ts index 55c865c..c4ec107 100644 --- a/src/commands/utility/ecwipe.ts +++ b/src/commands/utility/ecwipe.ts @@ -11,16 +11,16 @@ function ecWipeHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n[コマンド§4[§6コマンド§4]§f:ワイプ`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: ecwipe [オプション]`, - `§4[§6オプション§4]§f: ユーザー名、ヘルプ`, - `§4[§6Description§4]§f:プレイヤーのエンダーチェストをすべて消し去る。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: ecwipe`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: ecwipe [optional]`, + `§4[§6Optional§4]§f: username, help`, + `§4[§6説明§4]§f: Will wipe out player's entire ender chest.`, + `§4[§6Examples§4]§f:`, ` ${prefix}ecwipe ${player.name}`, ` §4- §6Wipe out the entire ender chest of ${player.name}§f`, ` ${prefix}ecwipe help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -32,7 +32,7 @@ function ecWipeHelp(player: Player, prefix: string, setting: boolean) { export function ecwipe(message: ChatSendAfterEvent, args: string[]) { handleECWipe(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -44,38 +44,42 @@ export function ecwipe(message: ChatSendAfterEvent, args: string[]) { } async function handleECWipe(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/utility/ecwipe.js:29)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/utility/ecwipe.js:29)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 反論はあるか + // Are there arguements if (!args.length) { return ecWipeHelp(player, prefix, configuration.customcommands.ecwipe); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.ecwipe) { return ecWipeHelp(player, prefix, configuration.customcommands.ecwipe); } - // リクエストされた選手を探す + // try to find the player requested let member: Player; const players = world.getPlayers(); for (const pl of players) { @@ -86,10 +90,14 @@ async function handleECWipe(message: ChatSendAfterEvent, args: string[]) { } if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f そのプレーヤーが見つかりませんでした! +` + ); } - // 0から29までの30個のスロットがある。 + // There are 30 slots ranging from 0 to 29 for (let slot = 0; slot < 30; slot++) { member.runCommand(`replaceitem entity @s slot.enderchest ${slot} air`); } diff --git a/src/commands/utility/fly.ts b/src/commands/utility/fly.ts index 90bf0c7..4275ab2 100644 --- a/src/commands/utility/fly.ts +++ b/src/commands/utility/fly.ts @@ -11,25 +11,25 @@ function flyHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f:フライ`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f:フライ[オプション]`, - `§4[§6オプション§4]§f: ユーザー名、ヘルプ`, - `§4[§6説明§4]§f.プレイヤーに飛行能力を与える。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: fly`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: fly [optional]`, + `§4[§6Optional§4]§f: username, help`, + `§4[§6説明§4]§f: Will grant player the ability to fly.`, + `§4[§6Examples§4]§f:`, ` ${prefix}fly ${player.name}`, ` §4- §6Grant the ability to fly to ${player.name}§f`, ` ${prefix}fly help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } function mayflydisable(player: Player, member: Player) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 fly mode for ${player === member ? "themselves" : "§7" + member.name}.`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効にしました: fly mode for ${player === member ? "themselves" : "§7" + member.name}.`); } function mayflyenable(player: Player, member: Player) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> fly mode for ${player === member ? "themselves" : "§7" + member.name}.`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 有効になりました: fly mode for ${player === member ? "themselves" : "§7" + member.name}.`); } /** @@ -40,7 +40,7 @@ function mayflyenable(player: Player, member: Player) { export function fly(message: ChatSendAfterEvent, args: string[]) { handleFly(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -52,38 +52,42 @@ export function fly(message: ChatSendAfterEvent, args: string[]) { } async function handleFly(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/utility/fly.js:38)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/utility/fly.js:38)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 反論はあるか + // Are there arguements if (!args.length) { return flyHelp(player, prefix, configuration.customcommands.fly); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.fly) { return flyHelp(player, prefix, configuration.customcommands.fly); } - // リクエストされた選手を探す + // try to find the player requested let member: Player; if (args.length) { const players = world.getPlayers(); @@ -96,7 +100,11 @@ async function handleFly(message: ChatSendAfterEvent, args: string[]) { } if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f そのプレーヤーが見つかりませんでした! +` + ); } const membertag = member.getTags(); @@ -109,7 +117,7 @@ async function handleFly(message: ChatSendAfterEvent, args: string[]) { mayflyenable(player, member); }) .catch(() => { - return sendMsgToPlayer(player, `この世界では、§f§4[§6Paradox§4]§f§4[Fly]§f 教育版は無効である。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f§4[Fly]§f Education Edition is disabled in this world.`); }); return; } @@ -127,7 +135,7 @@ async function handleFly(message: ChatSendAfterEvent, args: string[]) { member.removeTag("noflying"); }) .catch(() => { - return sendMsgToPlayer(player, `この世界では、§f§4[§6Paradox§4]§f§4[Fly]§f 教育版は無効である。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f§4[Fly]§f Education Edition is disabled in this world.`); }); return; } diff --git a/src/commands/utility/freeze.ts b/src/commands/utility/freeze.ts index b38a103..5b64ae8 100644 --- a/src/commands/utility/freeze.ts +++ b/src/commands/utility/freeze.ts @@ -12,16 +12,16 @@ function freezeHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `§6コマンド§4]§f: フリーズ`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f:フリーズ [オプション]`, - `§4[§6オプション§4]§f: ユーザー名、ヘルプ`, - `§4[§6解説§4]§f.指定したプレイヤーをフリーズまたはフリーズ解除する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: freeze`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: freeze [optional]`, + `§4[§6Optional§4]§f: username, help`, + `§4[§6説明§4]§f: Will freeze or unfreeze the specified player.`, + `§4[§6Examples§4]§f:`, ` ${prefix}freeze ${player.name}`, ` §4- §6Freeze or unfreeze ${player.name}§f`, ` ${prefix}freeze help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -33,7 +33,7 @@ function freezeHelp(player: Player, prefix: string, setting: boolean) { export function freeze(message: ChatSendAfterEvent, args: string[]) { handleFreeze(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -45,38 +45,42 @@ export function freeze(message: ChatSendAfterEvent, args: string[]) { } async function handleFreeze(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/utility/freeze.js:30)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/utility/freeze.js:30)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 反論はあるか + // Are there arguements if (!args.length) { return freezeHelp(player, prefix, configuration.customcommands.freeze); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.freeze) { return freezeHelp(player, prefix, configuration.customcommands.freeze); } - // リクエストされた選手を探す + // try to find the player requested let member: Player; const players = world.getPlayers(); for (const pl of players) { @@ -87,15 +91,19 @@ async function handleFreeze(message: ChatSendAfterEvent, args: string[]) { } if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f そのプレーヤーが見つかりませんでした! +` + ); } - // ユニークIDの取得 + // Get unique ID const uniqueId2 = dynamicPropertyRegistry.getProperty(member, member?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId2 === member.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f スタッフを凍結することはできない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot freeze staff members.`); } const boolean = member.hasTag("paradoxFreeze"); @@ -108,8 +116,8 @@ async function handleFreeze(message: ChatSendAfterEvent, args: string[]) { member.removeEffect(effectType); } - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§fあなたはもはや凍っていない。`); - sendMsg(`a[tag=paradoxOpped]`, `§7${member.name}§f is no longer frozen.`); + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You are no longer frozen.`); + sendMsg(`@a[tag=paradoxOpped]`, `§7${member.name}§f is no longer frozen.`); return; } @@ -121,8 +129,8 @@ async function handleFreeze(message: ChatSendAfterEvent, args: string[]) { } member.addTag("paradoxFreeze"); - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f あなたは今凍っている。`); - sendMsg(`a[tag=paradoxOpped]`, `§7${member.name}§f is now frozen.`); + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You are now frozen.`); + sendMsg(`@a[tag=paradoxOpped]`, `§7${member.name}§f is now frozen.`); return; } } diff --git a/src/commands/utility/fullreport.ts b/src/commands/utility/fullreport.ts index 4325e08..09ed1b8 100644 --- a/src/commands/utility/fullreport.ts +++ b/src/commands/utility/fullreport.ts @@ -14,16 +14,16 @@ function fullReportHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `§6コマンド§4]§f:フルレポート`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6Usage§4]§f: fullreport [オプション].`, - `§4[§6オプション§4]§f: ユーザー名、ヘルプ`, - `§4[§6解説§4]§f:現在オンラインになっているすべてのプレイヤーのログを見る。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: fullreport`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: fullreport [optional]`, + `§4[§6Optional§4]§f: username, help`, + `§4[§6説明§4]§f: View logs from all player's currently online.`, + `§4[§6Examples§4]§f:`, ` ${prefix}fullreport`, - ` §4- §6 現在オンライン中の全プレーヤーのログを見る§f`, + ` §4- §6View logs from all currently online players§f`, ` ${prefix}fullreport help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -35,7 +35,7 @@ function fullReportHelp(player: Player, prefix: string, setting: boolean) { export function fullreport(message: ChatSendAfterEvent, args: string[]) { handleFullReport(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -47,56 +47,57 @@ export function fullreport(message: ChatSendAfterEvent, args: string[]) { } async function handleFullReport(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/utility/fullreport.js:28)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/utility/fullreport.js:28)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.fullreport) { return fullReportHelp(player, prefix, configuration.customcommands.fullreport); } if (!player.hasTag("notify")) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fチート通知をBooleanにする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to enable cheat notifications.`); } const players = world.getPlayers(); for (const member of players) { const reportBody = [ - `\n§f§4[§6Paradox§4]§f 以下のプレイヤーからParadox Logsを取得中: §6${member.name}§f`, - `§r§4[§6Paradox§4]§r §6${member.name}§rのプレイヤーIDは【 ${member.id} 】です`, - `§f§4[§6Paradox§4]§f §6${member.name}§fのゲームモード: §7${(member as PlayerExtended).getGameMode()}§f`, - `§f§4[§6Paradox§4]§f §6${member.name}§fの現在位置 X= §7${member.location.x.toFixed(0)}§f Y= §7${member.location.y.toFixed(0)}§f Z= §7${member.location.z.toFixed(0)}§f`, + `\n§f§4[§6Paradox§4]§f Getting all Paradox Logs from: §6${member.name}§f`, + `§f§4[§6Paradox§4]§f §6${member.name}§f is in Gamemode: §7${(member as PlayerExtended).getGameMode()}§f`, + `§f§4[§6Paradox§4]§f §6${member.name}§f is currently at X= §7${member.location.x.toFixed(0)}§f Y= §7${member.location.y.toFixed(0)}§f Z= §7${member.location.z.toFixed(0)}§f`, ]; switch (true) { case member.hasTag("paradoxFreeze"): - reportBody.push( - `§f§4[§6Paradox§4]§f §6${member.name}§fは${member.hasTag("freezeAura") ? "AntiKillAura" : member.hasTag("freezeNukerA") ? "AntiNukerA" : member.hasTag("freezeScaffoldA") ? "AntiScaffoldA" : "Staff"}によってフリーズされています` - ); + reportBody.push(`§f§4[§6Paradox§4]§f §6${member.name}§f is frozen by ${member.hasTag("freezeAura") ? "AntiKillAura" : member.hasTag("freezeNukerA") ? "AntiNukerA" : member.hasTag("freezeScaffoldA") ? "AntiScaffoldA" : "Staff"}`); break; case member.hasTag("flying"): - reportBody.push(`§f§4[§6Paradox§4]§f §6${member.name}§fは飛んでいます`); + reportBody.push(`§f§4[§6Paradox§4]§f §6${member.name}§f is flying`); break; case member.hasTag("vanish"): - reportBody.push(`§f§4[§6Paradox§4]§f §6${member.name}§fは消えています`); + reportBody.push(`§f§4[§6Paradox§4]§f §6${member.name}§f is vanished`); break; } @@ -112,7 +113,7 @@ async function handleFullReport(message: ChatSendAfterEvent, args: string[]) { divider = true; reportBody.push(`§f§4[§6Paradox§4]§4 ----------------------------------§f`); } - reportBody.push(`§f§4[§6Paradox§4]§f §f§4[§6${objective.replace("vl", "").toUpperCase()}§4]§f 違反数: §7${score}§f`); + reportBody.push(`§f§4[§6Paradox§4]§f §f§4[§6${objective.replace("vl", "").toUpperCase()}§4]§f Violations: §7${score}§f`); } if (vlCount === ScoreManager.allscores.length && divider === true) { reportBody.push(`§f§4[§6Paradox§4]§4 ----------------------------------§f`); @@ -140,12 +141,12 @@ async function handleFullReport(message: ChatSendAfterEvent, args: string[]) { }; for (const [verification, armorType] of [ - [helmet, "ヘルメット"], - [chest, "チェストプレート"], - [legs, "レギンス"], - [feet, "ブーツ"], - [mainhand, "メインハンド"], - [offhand, "オフハンド"], + [helmet, "Helmet"], + [chest, "Chestplate"], + [legs, "Leggings"], + [feet, "Boots"], + [mainhand, "Mainhand"], + [offhand, "Offhand"], ]) { if (!(verification instanceof ItemStack)) { continue; @@ -163,11 +164,11 @@ async function handleFullReport(message: ChatSendAfterEvent, args: string[]) { } } let materialType = verification.typeId.split(":")[1].replace(/_\w+/, ""); - if (armorType === "メインハンド" || armorType === "オフハンド") { + if (armorType === "Mainhand" || armorType === "Offhand") { materialType = verification.typeId.split(":")[1]; } const materialColor = materialColors[materialType] || materialColors["none"]; - reportBody.push(`§f§4[§6Paradox§4]§f §7${armorType}§f: ${isEnchanted ? "§aエンチャント済み§f" : "§4エンチャント未済み§f"} || ${materialColor}${materialType}`); + reportBody.push(`§f§4[§6Paradox§4]§f §7${armorType}§f: ${isEnchanted ? "§aEnchanted§f" : "§4Unenchanted§f"} || ${materialColor}${materialType}`); } sendMsgToPlayer(player, reportBody); diff --git a/src/commands/utility/give.ts b/src/commands/utility/give.ts index 527be5c..4c2829f 100644 --- a/src/commands/utility/give.ts +++ b/src/commands/utility/give.ts @@ -13,22 +13,22 @@ function giveHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: 与える`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f:与える [任意]`, - `§4[§6オプション§4]§f: ユーザー名項目量データ、ヘルプ`, - `§4[§6解説§4]§f:プレイヤーにアイテムを与えます。`, - `§4[§6例§4]§f:`, - `${prefix}give ${player.name} diamond 64`, - ` §4- §6${player.name}にダイヤモンドを64個与える§f`, - `${prefix}give ${player.name} iron_ore 64`, - ` §4- §6${player.name}に鉄鉱石を64個与える§f`, - `${prefix}give ${player.name} tropical_fish 64`, - ` §4- §6${player.name}に熱帯魚を64個与える§f`, - `${prefix}give ${player.name} log2 64 1`, - ` §4- §6${player.name}にスプルースの原木を64個与える§f`, - `${prefix}give help`, - ` §4- §6コマンドのヘルプを表示する§f`, + `\n§o§4[§6コマンド§4]§f: give`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: give [optional]`, + `§4[§6Optional§4]§f: username item amount data, help`, + `§4[§6説明§4]§f: Gives player items.`, + `§4[§6Examples§4]§f:`, + ` ${prefix}give ${player.name} diamond 64`, + ` §4- §6Give ${player.name} 64 diamonds§f`, + ` ${prefix}give ${player.name} iron_ore 64`, + ` §4- §6Give ${player.name} 64 iron ore§f`, + ` ${prefix}give ${player.name} tropical_fish 64`, + ` §4- §6Give ${player.name} 64 tropical fish§f`, + ` ${prefix}give ${player.name} log2 64 1`, + ` §4- §6Give ${player.name} 64 spruce logs§f`, + ` ${prefix}give help`, + ` §4- §6Show command help§f`, ]); } @@ -38,38 +38,42 @@ function giveHelp(player: Player, prefix: string, setting: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function give(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/utility/give.js:36)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/utility/give.js:36)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.give) { return giveHelp(player, prefix, configuration.customcommands.give); } - // 反論はあるか + // Are there arguements if (!args.length) { return giveHelp(player, prefix, configuration.customcommands.give); } - // 要求された選手を見つけよう + // Try to find the player requested let member: Player; if (args.length) { const players = world.getPlayers(); @@ -81,9 +85,13 @@ export function give(message: ChatSendAfterEvent, args: string[]) { } } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f そのプレーヤーが見つかりませんでした! +` + ); } /** @@ -115,7 +123,7 @@ export function give(message: ChatSendAfterEvent, args: string[]) { args.splice(3, 1, "0"); } - // 新しいItemStackを作成し、そのアイテムの最大許容額を検証できるようにする。 + // Make a new ItemStack so we can validate the max allowed amount for that item const newItemStack = new ItemStack(args[1]); const maxStack = newItemStack.maxAmount; if (maxStack >= Number(args[2])) { @@ -132,6 +140,6 @@ export function give(message: ChatSendAfterEvent, args: string[]) { return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f This stack is too high! §7${maxStack}§f is the max. Try again.`); } } else { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこの項目は見つかりませんでした!もう一度試してください。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f This item could not be found! Try again.`); } } diff --git a/src/commands/utility/gohome.ts b/src/commands/utility/gohome.ts index 7f265a7..09639b0 100644 --- a/src/commands/utility/gohome.ts +++ b/src/commands/utility/gohome.ts @@ -15,15 +15,15 @@ function dhms(ms: number) { const minutesms = ms % (60 * 1000); const sec = Math.floor(minutesms / 1000); if (days !== 0) { - return days + " 日 : " + hours + " 時間 : " + minutes + " 分 : " + sec + " 秒"; + return days + " Days : " + hours + " Hours : " + minutes + " Minutes : " + sec + " Seconds"; } if (hours !== 0) { - return hours + " 時間 : " + minutes + " 分 : " + sec + " 秒"; + return hours + " Hours : " + minutes + " Minutes : " + sec + " Seconds"; } if (minutes !== 0) { - return minutes + " 分 : " + sec + " 秒"; + return minutes + " Minutes : " + sec + " Seconds"; } - return sec + " 秒"; + return sec + " Seconds"; } function goHomeHelp(player: Player, prefix: string, setting: boolean) { @@ -35,15 +35,15 @@ function goHomeHelp(player: Player, prefix: string, setting: boolean) { } return sendMsgToPlayer(player, [ `\n§o§4[§6コマンド§4]§f: gohome`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: gohome [オプション]`, - `§4[§6オプション§4]§f: 名前、ヘルプ`, - `§4[§6説明§4]§f:指定した保存場所に帰る。`, - `§4[§6例§4]§f:`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: gohome [optional]`, + `§4[§6Optional§4]§f: name, help`, + `§4[§6説明§4]§f: Return home to a specified saved location.`, + `§4[§6Examples§4]§f:`, ` ${prefix}gohome barn`, - ` §4-§6「納屋」ホームへの帰還§f`, + ` §4- §6Return to the "barn" home§f`, ` ${prefix}gohome help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -55,7 +55,7 @@ function goHomeHelp(player: Player, prefix: string, setting: boolean) { export function gohome(message: ChatSendAfterEvent, args: string[]) { handleGoHome(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -67,41 +67,41 @@ export function gohome(message: ChatSendAfterEvent, args: string[]) { } async function handleGoHome(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/utility/gohome.js:52)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? ./commands/utility/gohome.js:52)"); } const player = message.sender; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // キャッシュ + // Cache const length = args.length; - // 反論はあるか + // Are there arguements if (!length) { return goHomeHelp(player, prefix, configuration.customcommands.gohome); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.gohome) { return goHomeHelp(player, prefix, configuration.customcommands.gohome); } - // スペースを許可しない + // Don't allow spaces if (length > 1) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f名前にスペースを入れないでください!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f No spaces in names please!`); } - // 安全のために座標をハッシュ化する + // Hash the coordinates for security const salt = world.getDynamicProperty("crypt"); - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); let homex: number; @@ -113,23 +113,23 @@ async function handleGoHome(message: ChatSendAfterEvent, args: string[]) { const tagsLength = tags.length; for (let i = 0; i < tagsLength; i++) { if (tags[i].startsWith("1337")) { - // それを検証するためにデコードする + // Decode it so we can verify it tags[i] = (world as WorldExtended).decryptString(tags[i], salt as string); } if (tags[i].startsWith(args[0].toString() + " X", 13)) { - // 文字列を配列に分割する + // Split string into array coordinatesArray = tags[i].split(" "); break; } } if (!coordinatesArray) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f '§7${args[0]}§f' は見つかりません`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Home '§7${args[0]}§f' does not exist!`); } const coordArrayLength = coordinatesArray.length; for (let i = 0; i < coordArrayLength; i++) { - // 配列から位置を取得する + // Get their location from the array if (coordinatesArray[i].includes("X:")) { homex = parseInt(coordinatesArray[i].replace("X:", "")); } @@ -145,30 +145,30 @@ async function handleGoHome(message: ChatSendAfterEvent, args: string[]) { } if (!homex || !homey || !homez || !dimension) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f '§7${args[0]}§f' 存在しないよ!もう一回確認してみて`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Home '§7${args[0]}§f' does not exist!`); } else { let cooldownCalc: number; let activeTimer: string; - // 元の時間をミリ秒単位で取得 + // Get original time in milliseconds const cooldownVerify = cooldownTimer.get(player); - // コンフィグ設定をミリ秒に変換し、カウントダウンが正確であることを確認できるようにする。 + // Convert config settings to milliseconds so we can be sure the countdown is accurate const msSettings = configuration.modules.goHome.days * 24 * 60 * 60 * 1000 + configuration.modules.goHome.hours * 60 * 60 * 1000 + configuration.modules.goHome.minutes * 60 * 1000 + configuration.modules.goHome.seconds * 1000; if (cooldownVerify !== undefined) { - // 新しいタイムと元のタイムの差をミリ秒単位で判断する + // Determine difference between new and original times in milliseconds const bigBrain = new Date().getTime() - cooldownVerify; - // 設定のカウントダウンからリアルタイムクロックを引いて差を求める + // Subtract realtime clock from countdown in configuration to get difference cooldownCalc = msSettings - bigBrain; - // 差分をクロック形式に変換 D:H:M:S + // Convert difference to clock format D : H : M : S activeTimer = dhms(cooldownCalc); } else { - // 初めて実行されるため、デフォルトではミリ秒単位で設定されます。 + // First time executed so we default to configuration in milliseconds cooldownCalc = msSettings; } - // タイマーが存在しないか、期限が切れている場合は、テレポートの許可を与え、カウントダウンを設定する。 + // If timer doesn't exist or has expired then grant permission to teleport and set the countdown if (cooldownCalc === msSettings || cooldownCalc <= 0 || uniqueId === player.name) { - // このタイマーは猶予期間である + // This timer is a grace period setTimer(player.id); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f tpしました!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Welcome back!`); player.teleport( { x: homex, y: homey, z: homez }, { @@ -179,13 +179,13 @@ async function handleGoHome(message: ChatSendAfterEvent, args: string[]) { keepVelocity: false, } ); - // 古いキーと値を削除する + // Delete old key and value cooldownTimer.delete(player); - // ミリ秒単位の現在時刻を持つ新しいキーと値を作成する。 + // Create new key and value with current time in milliseconds cooldownTimer.set(player, new Date().getTime()); } else { - // 高速テレポート - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 速すぎる!7${activeTimer}§fまで待ってからtpしてください。`); + // Teleporting to fast + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Too fast! Please wait for §7${activeTimer}§f before going home.`); } } } diff --git a/src/commands/utility/hotbar.ts b/src/commands/utility/hotbar.ts index 4a72824..c5886d4 100644 --- a/src/commands/utility/hotbar.ts +++ b/src/commands/utility/hotbar.ts @@ -5,7 +5,7 @@ import { getPrefix, sendMsg, sendMsgToPlayer } from "../../util.js"; import ConfigInterface from "../../interfaces/Config.js"; const configMessageBackup = new WeakMap(); -// ダミーオブジェクト +// Dummy object const dummy: object = []; function hotbarHelp(player: Player, prefix: string, hotbarBoolean: boolean, setting: boolean) { @@ -22,21 +22,21 @@ function hotbarHelp(player: Player, prefix: string, hotbarBoolean: boolean, sett moduleStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f: ホットバー`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6Module§4]§f: ${moduleStatus}`, - `§4[§6使用§4]§f: ホットバー [オプション]`, - `§4[§6オプション§4]§f:メッセージ、無効、ヘルプ`, - `§4[§6解説§4]§f:現在オンラインになっているすべてのプレイヤーのホットバーメッセージを表示する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: hotbar`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6モジュール§4]§f: ${moduleStatus}`, + `§4[§6使用法§4]§f: hotbar [optional]`, + `§4[§6Optional§4]§f: message, disable, help`, + `§4[§6説明§4]§f: Displays a hotbar message for all player's currently online.`, + `§4[§6Examples§4]§f:`, ` ${prefix}hotbar`, - ` §4- §6現在のホットバーメッセージを表示する§f`, + ` §4- §6Display the current hotbar message§f`, ` ${prefix}hotbar disable`, - ` §4- §6ホットバーメッセージを無効にする§f`, + ` §4- §6Disable the hotbar message§f`, ` ${prefix}hotbar Anarchy Server | Realm Code: 34fhf843`, - ` §4- §6ホットバーのメッセージを「Anarchy Server | Realm Code:34fhf843"§f`, + ` §4- §6Set the hotbar message to "Anarchy Server | Realm Code: 34fhf843"§f`, ` ${prefix}hotbar help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -46,28 +46,32 @@ function hotbarHelp(player: Player, prefix: string, hotbarBoolean: boolean, sett * @param {string[]} args - Additional arguments provided (optional). */ export function hotbar(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/utility/hotbar.js:37)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/utility/hotbar.js:37)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.hotbar) { return hotbarHelp(player, prefix, configuration.modules.hotbar.enabled, configuration.customcommands.hotbar); @@ -83,7 +87,7 @@ export function hotbar(message: ChatSendAfterEvent, args: string[]) { } if ((configuration.modules.hotbar.enabled === false && !args.length) || (configuration.modules.hotbar.enabled === false && args[0].toLowerCase() !== "disable")) { - // 許可する + // Allow configuration.modules.hotbar.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); if (args.length >= 1) { @@ -91,13 +95,13 @@ export function hotbar(message: ChatSendAfterEvent, args: string[]) { } else { configuration.modules.hotbar.message = configMessageBackup.get(dummy); } - sendMsg("@a[tag=paradoxOpped]", `§7${player.name}§f 以下の機能が有効です=> §6Hotbar`); + sendMsg("@a[tag=paradoxOpped]", `§7${player.name}§f 有効になりました: §6Hotbar`); Hotbar(); } else if (configuration.modules.hotbar.enabled === true && args.length === 1 && args[0].toLowerCase() === "disable") { - // 拒否する + // Deny configuration.modules.hotbar.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§7${player.name}§f は無効 §6Hotbar`); + sendMsg("@a[tag=paradoxOpped]", `§7${player.name}§f 無効にしました: §6Hotbar`); } else if ((configuration.modules.hotbar.enabled === true && args.length >= 1) || (configuration.modules.hotbar.enabled === true && !args.length)) { if (args.length >= 1) { configuration.modules.hotbar.message = args.join(" "); diff --git a/src/commands/utility/invsee.ts b/src/commands/utility/invsee.ts index 599494d..3fad0da 100644 --- a/src/commands/utility/invsee.ts +++ b/src/commands/utility/invsee.ts @@ -11,58 +11,62 @@ function invseeHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f: invsee`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6Usage§4]§f: invsee [オプション].`, - `§4[§6オプション§4]§f: ユーザー名、ヘルプ`, - `§4[§6解説§4]§f:指定したプレイヤーのインベントリ全体を表示する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: invsee`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: invsee [optional]`, + `§4[§6Optional§4]§f: username, help`, + `§4[§6説明§4]§f: Shows the entire inventory of the specified player.`, + `§4[§6Examples§4]§f:`, ` ${prefix}invsee ${player.name}`, ` §4- §6Show the inventory of ${player.name}§f`, ` ${prefix}invsee help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } -// Bedrock addonsのdiscordでインベントリ閲覧のsciptを見つけた。 +// found the inventory viewing scipt in the bedrock addons discord, unsure of the original owner (not my code) /** * @name invsee * @param {ChatSendAfterEvent} message - Message object * @param {string[]} args - Additional arguments provided (optional). */ export function invsee(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/utility/invsee.js:30)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? ./commands/utility/invsee.js:30)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 反論はあるか + // Are there arguements if (!args.length) { return invseeHelp(player, prefix, configuration.customcommands.invsee); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.invsee) { return invseeHelp(player, prefix, configuration.customcommands.invsee); } - // リクエストされた選手を探す + // try to find the player requested let member: Player; const players = world.getPlayers(); for (const pl of players) { @@ -73,7 +77,11 @@ export function invsee(message: ChatSendAfterEvent, args: string[]) { } if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f そのプレーヤーが見つかりませんでした! +` + ); } const inv = member.getComponent("inventory") as EntityInventoryComponent; @@ -81,7 +89,7 @@ export function invsee(message: ChatSendAfterEvent, args: string[]) { sendMsgToPlayer(player, [ ` `, - `§f§4[§6Paradox§4]§f ${member.name}'の持ち物:`, + `§f§4[§6Paradox§4]§f ${member.name}'s inventory:`, ...Array.from(Array(container.size), (_a, i) => { let enchantmentInfo = ""; const item = container.getItem(i); @@ -91,8 +99,8 @@ export function invsee(message: ChatSendAfterEvent, args: string[]) { const enchantmentList = enchantmentComponent ? Array.from(enchantmentComponent.enchantments) : []; if (enchantmentList.length > 0) { - const enchantmentNames = enchantmentList.map((enchantment) => ` §6- §4[§f${enchantment.type.id}§4]§f §6レベル: §4${enchantment.level}`); - enchantmentInfo = `\n §4[§6エンチャ§4]§6:\n${enchantmentNames.join("\n")}`; + const enchantmentNames = enchantmentList.map((enchantment) => ` §6- §4[§f${enchantment.type.id}§4]§f §6Level: §4${enchantment.level}`); + enchantmentInfo = `\n §4[§6Enchantments§4]§6:\n${enchantmentNames.join("\n")}`; } if (enchantmentInfo) { enchantmentInfo = enchantmentInfo + "\n"; @@ -100,7 +108,7 @@ export function invsee(message: ChatSendAfterEvent, args: string[]) { } } - return ` §o§6|§f §fSlot ${i}§f §6=>§f ${item ? `§4[§f${item.typeId.replace("minecraft:", "")}§4]§f §6数: §4x${item.amount}` : "§7(無)"}${enchantmentInfo}`; + return ` §o§6|§f §fSlot ${i}§f §6=>§f ${item ? `§4[§f${item.typeId.replace("minecraft:", "")}§4]§f §6Amount: §4x${item.amount}` : "§7(empty)"}${enchantmentInfo}`; }), ` `, ]); diff --git a/src/commands/utility/listhome.ts b/src/commands/utility/listhome.ts index 403b3fd..cb94ef1 100644 --- a/src/commands/utility/listhome.ts +++ b/src/commands/utility/listhome.ts @@ -12,16 +12,16 @@ function listHomeHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f: リストホーム`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f:リストホーム[オプション]`, - `§4[§6オプション§4]§f: ヘルプ`, - `§4[§6説明§4]§f:保存されたホームロケーションのリストを表示する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: listhome`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: listhome [optional]`, + `§4[§6Optional§4]§f: help`, + `§4[§6説明§4]§f: Shows a list of saved home locations.`, + `§4[§6Examples§4]§f:`, ` ${prefix}listhome`, - ` §4- §6保存されたホームロケーションのリストを表示する§f`, + ` §4- §6Show a list of saved home locations§f`, ` ${prefix}listhome help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -31,28 +31,28 @@ function listHomeHelp(player: Player, prefix: string, setting: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function listhome(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/utility/listhome.js:26)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? ./commands/utility/listhome.js:26)"); } const player = message.sender; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.listhome) { return listHomeHelp(player, prefix, configuration.customcommands.listhome); } - // 安全のために座標をハッシュ化する + // Hash the coordinates for security const salt = world.getDynamicProperty("crypt"); - // ホームロケーションメッセージを格納する配列を作成する + // Create an array to store the home location messages const homeMessages: string[] = []; const tags = player.getTags(); @@ -60,13 +60,13 @@ export function listhome(message: ChatSendAfterEvent, args: string[]) { let counter = 0; for (let i = 0; i < tagsLength; i++) { if (tags[i].startsWith("1337")) { - // それを検証するためにデコードする + // Decode it so we can verify it tags[i] = (world as WorldExtended).decryptString(tags[i], salt as string); - // 無効な場合はスキップする + // If invalid then skip it if (tags[i].startsWith("LocationHome:") === false) { continue; } - // 文字列を配列に分割する + // Split string into array const coordinatesArray = tags[i].split(" "); const coordArrayLength = coordinatesArray.length; let home: string; @@ -76,7 +76,7 @@ export function listhome(message: ChatSendAfterEvent, args: string[]) { let dimension: string; counter = ++counter; for (let j = 0; j < coordArrayLength; j++) { - // 配列から位置を取得する + // Get their location from the array if (coordinatesArray[j].includes("LocationHome:")) { home = coordinatesArray[j].replace("LocationHome:", ""); } @@ -92,12 +92,12 @@ export function listhome(message: ChatSendAfterEvent, args: string[]) { if (coordinatesArray[j].includes("Dimension:")) { dimension = coordinatesArray[j].replace("Dimension:", ""); } - // 各ホームロケーションを処理するループの内側 + // Inside the loop where you are processing each home location if (!homex || !homey || !homez || !dimension) { continue; } else { if (counter === 1) { - homeMessages.push(`§f§4[§6Paradox§4]§f ホームのリスト:`); + homeMessages.push(`§f§4[§6Paradox§4]§f List Of Homes:`); } homeMessages.push(` §o§6|§f §4[§f${home}§4]§f §6=>§f ${homex} ${homey} ${homez} §6<=§f §4[§f${dimension}§4]§f`); } @@ -106,10 +106,10 @@ export function listhome(message: ChatSendAfterEvent, args: string[]) { continue; } if (homeMessages.length > 0) { - // sendMsgToPlayerを使用して、すべてのホームロケーションメッセージを一度に送信する。 + // Send all the home location messages at once using sendMsgToPlayer sendMsgToPlayer(player, homeMessages); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 保存されている場所がありません。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You have none saved locations.`); } return; } diff --git a/src/commands/utility/paradoxVersion.ts b/src/commands/utility/paradoxVersion.ts index 6be13ee..e65baef 100644 --- a/src/commands/utility/paradoxVersion.ts +++ b/src/commands/utility/paradoxVersion.ts @@ -5,15 +5,15 @@ import { getPrefix, sendMsg, sendMsgToPlayer } from "../../util.js"; function versionHelp(player: Player, prefix: string) { return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f:バージョン`, - `§4[§6使用§4]§f: バージョン [オプション]`, - `§4[§6オプション§4]§f: ヘルプ`, - `§4[§6説明§4]§f:インストールされている paradox のバージョンを表示する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: version`, + `§4[§6使用法§4]§f: version [optional]`, + `§4[§6Optional§4]§f: help`, + `§4[§6説明§4]§f: Will print out the installed version of paradox`, + `§4[§6Examples§4]§f:`, ` ${prefix}version`, - ` §4- §6インストールされたParadoxのプリントアウト§f`, + ` §4- §6Print out the installed version of paradox§f`, ` ${prefix}version help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -23,25 +23,29 @@ function versionHelp(player: Player, prefix: string) { * @param {string[]} args - Additional arguments provided (optional). */ export function paradoxVersion(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./utility/paradoxVersion.js:26)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./utility/paradoxVersion.js:26)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if (argCheck && args[0].toLowerCase() === "help") { return versionHelp(player, prefix); diff --git a/src/commands/utility/pvp.ts b/src/commands/utility/pvp.ts index 5108501..1a6249e 100644 --- a/src/commands/utility/pvp.ts +++ b/src/commands/utility/pvp.ts @@ -11,18 +11,18 @@ function pvpHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n[コマンド§4]§f: pvp`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f:PvP【オプション`, - `§4[§6オプション§4]§f:Boolean、無効、ヘルプ`, - `§4[§6Description§4]§f:PVPのBoolean/無効。無効の間は他のプレイヤーに攻撃されてもダメージを受けません。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: pvp`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: pvp [optional]`, + `§4[§6Optional§4]§f: enable, disable, help`, + `§4[§6説明§4]§f: Enables or Disables PVP. While disabled you wont take damage when another player attacks you.`, + `§4[§6Examples§4]§f:`, ` ${prefix}pvp enable`, - ` §4- §6 PVPドライバー§f`, + ` §4- §6Enables PVP§f`, ` ${prefix}pvp disable`, - ` §4-§6PVPを無効にする§f`, + ` §4- §6Disables PVP§f`, ` ${prefix}pvp help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -32,34 +32,34 @@ function pvpHelp(player: Player, prefix: string, setting: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function pvp(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/utility/pvp.js:26)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? ./commands/utility/pvp.js:26)"); } const player = message.sender; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // 反論はあるか + // Are there arguements if (!args.length) { return pvpHelp(player, prefix, configuration.customcommands.pvp); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if (argCheck && (args[0].toLowerCase() === "help" || !configuration.customcommands.pvp)) { return pvpHelp(player, prefix, configuration.customcommands.pvp); } if (argCheck && args[0].toLowerCase() === "enable") { - player.removeTag("pvp無効"); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたは§2PVPをBooleanにしている。`); + player.removeTag("pvpDisabled"); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You have §2enabled §fPVP.`); } if (argCheck && args[0].toLowerCase() === "disable") { - player.addTag("pvp無効"); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたは§4PVPを無効にしている。`); + player.addTag("pvpDisabled"); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You have §4disabled §fPVP.`); } } diff --git a/src/commands/utility/rank.ts b/src/commands/utility/rank.ts index 0d2c270..c77e2c3 100644 --- a/src/commands/utility/rank.ts +++ b/src/commands/utility/rank.ts @@ -18,23 +18,23 @@ function rankHelp(player: Player, prefix: string, configuration: ConfigInterface moduleStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f:ランク`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6Module§4]§f: ${moduleStatus}`, - `§4[§6Usage§4]§f: ランク <ユーザー名> [オプション].`, - `§4[§6オプション§4]§f: タグ、タグ--タグ、リセット、ヘルプ`, - `§4[§6 解説§4]§f:指定されたプレイヤーに1つ以上のランクを与えるか、リセッ トする。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: rank`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6モジュール§4]§f: ${moduleStatus}`, + `§4[§6使用法§4]§f: rank [optional]`, + `§4[§6Optional§4]§f: tag, tag--tag, reset, help`, + `§4[§6説明§4]§f: Gives one or more ranks to a specified player or resets it.`, + `§4[§6Examples§4]§f:`, ` ${prefix}rank ${player.name} {Admin}`, - ` §4- §6指定されたプレイヤーに「管理者」ランクを与える§f`, + ` §4- §6Give the "Admin" rank to the specified player§f`, ` ${prefix}rank ${player.name} [Contributor]--{Mod}`, - ` §4- §6指定されたプレイヤーに「貢献者」と「改造者」ランクを与える§f`, + ` §4- §6Give the "Contributor" and "Mod" ranks to the specified player§f`, ` ${prefix}rank ${player.name} (Staff)--Mod--[Helper]`, - ` §4- §6指定されたプレイヤーに「スタッフ」「モッド」「ヘルパー」ランクを 与える§f`, + ` §4- §6Give the "Staff", "Mod", and "Helper" rank to the specified player§f`, ` ${prefix}rank reset ${player.name}`, - ` §4-§6指定したプレイヤーの全てのランクをリセットする§f`, + ` §4- §6Reset all ranks of the specified player§f`, ` ${prefix}rank help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -44,36 +44,40 @@ function rankHelp(player: Player, prefix: string, configuration: ConfigInterface * @param {string[]} args - Additional arguments provided (optional). */ export function rank(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./utility/rank.js:37)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./utility/rank.js:37)"); } const player = message.sender; - // カスタム・ネーム使用時に!tagが消滅するバグを修正。 + // fixes a bug that kills !tag when using custom names player.nameTag = player.name; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 反論はあるか + // Are there arguements if (!args.length) { return rankHelp(player, prefix, configuration); } - // 助けを求められたか + // Was help requested const argCheck = args[0].toLowerCase(); if (argCheck === "help" || !configuration.customcommands.rank || !configuration.modules.chatranks.enabled || !configuration.customcommands.chatranks) { return rankHelp(player, prefix, configuration); @@ -82,12 +86,12 @@ export function rank(message: ChatSendAfterEvent, args: string[]) { const playerName = args.slice(0, -1).join(" "); // Combine all arguments except the last one as the player name const rank = args[args.length - 1]; // Last argument is the rank - // 引数rankがハイフンで始まるか終わるかをチェックする。 + // Check if the rank argument starts or ends with a hyphen if (rank.startsWith("-") || rank.endsWith("-")) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 階級はハイフンで始まることも終わることもできない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f The rank cannot start or end with a hyphen.`); } - // リクエストされた選手を探す + // try to find the player requested let member: Player; const players = world.getPlayers(); for (const pl of players) { @@ -98,20 +102,24 @@ export function rank(message: ChatSendAfterEvent, args: string[]) { } if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f そのプレーヤーが見つかりませんでした! +` + ); } - // 配列に文字列'リセット'が含まれているかチェックする。 + // check if array contains the string 'reset' const argcheck = args[1]?.toLowerCase() || undefined; - // リセットランク + // reset rank if (argcheck === "reset") { (member as PlayerExtended).resetTag(); sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${member.name}§f has reset their rank`); return; } - // コマンドが正しく利用されていれば、新しいランクを追加する + // Add new rank if command is utilize correctly if (args.length >= 2) { const newRank = "Rank:" + rank; (member as PlayerExtended).resetTag(); diff --git a/src/commands/utility/report.ts b/src/commands/utility/report.ts index bf0e96e..852531c 100644 --- a/src/commands/utility/report.ts +++ b/src/commands/utility/report.ts @@ -11,18 +11,18 @@ function reportHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6コマンド§4]§f:レポート`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f:報告 [任意]`, - `§4[§6オプション§4]§f: ユーザー名、理由、ヘルプ`, - `§4[§6解説§4]§f:f:悪質な行為を行ったプレイヤーをオンラインスタッフに報告する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: report`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: report [optional]`, + `§4[§6Optional§4]§f: username, reason, help`, + `§4[§6説明§4]§f: Reports player's to online Staff for malicious activities.`, + `§4[§6Examples§4]§f:`, ` ${prefix}report ${player.name}`, ` §4- §6Report ${player.name} to online Staff§f`, ` ${prefix}report ${player.name} Caught hacking!`, ` §4- §6Report ${player.name} for hacking with a reason§f`, ` ${prefix}report help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -32,31 +32,31 @@ function reportHelp(player: Player, prefix: string, setting: boolean) { * @param {string[]} args - Additional arguments provided (optional). */ export function report(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/moderation/ban.js:29)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? ./commands/moderation/ban.js:29)"); } const player = message.sender; const reason = args.slice(1).join(" ") || "No reason specified"; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // 反論はあるか + // Are there arguements if (!args.length) { return reportHelp(player, prefix, configuration.customcommands.report); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.report) { return reportHelp(player, prefix, configuration.customcommands.report); } - // 要求された選手を見つけよう + // Try to find the player requested let member: Player; const players = world.getPlayers(); for (const pl of players) { @@ -67,13 +67,17 @@ export function report(message: ChatSendAfterEvent, args: string[]) { } if (!member) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f !報告 <プレイヤー> <理由>§f`); - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f !report §f`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f そのプレーヤーが見つかりませんでした! +` + ); } - // 彼らが自分自身を報告しないようにする + // Make sure they dont report themselves if (member === player) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 自己申告はできない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot report yourself.`); } sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Reported §7${member.name}§f with reason: §7${reason}§f`); diff --git a/src/commands/utility/sethome.ts b/src/commands/utility/sethome.ts index 4912d58..0928d67 100644 --- a/src/commands/utility/sethome.ts +++ b/src/commands/utility/sethome.ts @@ -13,7 +13,7 @@ import ConfigInterface from "../../interfaces/Config.js"; * @returns void */ function saveHome(player: Player, args: string[], configuration: ConfigInterface): void { - // 現在位置の取得 + // Get current location const { x, y, z } = player.location; const homex = x.toFixed(0); @@ -23,23 +23,23 @@ function saveHome(player: Player, args: string[], configuration: ConfigInterface args = args.slice(1); - // スペースを許可しない + // Don't allow spaces if (args.length > 1 || args[0].trim().length === 0) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f名前にスペースを入れないでください!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f No spaces in names please!`); return; } - // 安全のために座標をハッシュ化する + // Hash the coordinates for security const salt = world.getDynamicProperty("crypt"); - // Make sure this name doesn'それはすでに存在しない。't exceed limitations + // Make sure this name doesn't exist already and it doesn't exceed limitations let verify = false; let counter = 0; const tags = player.getTags(); const tagsLength = tags.length; for (let i = 0; i < tagsLength; i++) { if (tags[i].startsWith("1337")) { - // すでに存在するかどうかを確認するために、デコードする。 + // Decode it so we can verify if it already exists tags[i] = (world as WorldExtended).decryptString(tags[i], String(salt)); } if (tags[i].startsWith(args[0].toString() + " X", 13)) { @@ -60,7 +60,7 @@ function saveHome(player: Player, args: string[], configuration: ConfigInterface return; } - // どの次元にいるかを保存する + // Save which dimension they were in if (player.dimension.id === "minecraft:overworld") { currentDimension = "overworld"; } @@ -68,12 +68,13 @@ function saveHome(player: Player, args: string[], configuration: ConfigInterface currentDimension = "nether"; } if (player.dimension.id === "minecraft:the_end") { - currentDimension = "the_end"; + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Not allowed to set home in this dimension!`); + return; } const decryptedLocationString = `LocationHome:${args[0]} X:${homex} Y:${homey} Z:${homez} Dimension:${currentDimension}`; const security = (world as WorldExtended).encryptString(decryptedLocationString, salt as string); - // 新居のコーディネートを収納する + // Store their new home coordinates player.addTag(security); sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Home '§7${args[0]}§f' has been set at §7${homex} ${homey} ${homez}§f!`); @@ -90,26 +91,26 @@ function setHomeHelp(player: Player, prefix: string, configuration: ConfigInterf const commandStatus: string = configuration.customcommands.sethome ? "§6[§a有効§6]§f" : "§6[§4無効§6]§f"; return sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f:セットホーム`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: sethome [オプション]`, - `§4[§6Description§4]§f: Saves home location based on current coordinates. Up to ${configuration.modules.setHome.max} total.`, - `§4[§6オプション§4]§f:`, + `\n§o§4[§6コマンド§4]§f: sethome`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: sethome [optional]`, + `§4[§6説明§4]§f: Saves home location based on current coordinates. Up to ${configuration.modules.setHome.max} total.`, + `§4[§6Options§4]§f:`, ` -h, --help`, - ` §4[§7このヘルプメッセージを表示する§4]§f`, - ` -n <値>, --name <値>.`, - ` §4[§7現在位置を名前付きで保存§4]§f`, - ` -m <値>, --max <値>。`, - ` §4[§7許可される住宅数の上限を設定する§4]§f`, + ` §4[§7Display this help message§4]§f`, + ` -n , --name `, + ` §4[§7Save current location with name§4]§f`, + ` -m , --max `, + ` §4[§7Set the maximum number of allowed homes§4]§f`, ` -e, --enable`, - ` §4[§7SetHomeコマンドをBooleanにする§4]§f`, + ` §4[§7Enable SetHome command§4]§f`, ` -d, --disable`, - ` §4[§7SetHomeコマンドを無効にする§4]§f`, + ` §4[§7Disable SetHome command§4]§f`, ` -s, --status`, - ` §4[§7セットホーム§4の現在のステータスを表示する]§f`, - `§4[§6例§4]§f:`, + ` §4[§7Display the current status of SetHome§4]§f`, + `§4[§6Examples§4]§f:`, ` ${prefix}sethome --name barn`, - ` ${prefix}sethome --n barn`, + ` ${prefix}sethome -n barn`, ` ${prefix}sethome --help`, ` ${prefix}sethome --max ${configuration.modules.setHome.max}`, ` ${prefix}sethome --disable`, @@ -124,77 +125,81 @@ function setHomeHelp(player: Player, prefix: string, configuration: ConfigInterf * @param {string[]} args - Additional arguments provided (optional). */ export function sethome(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/utility/sethome.js:26)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? ./commands/utility/sethome.js:26)"); } const player = message.sender; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const hasPermission = dynamicPropertyRegistry.getProperty(player, player?.id); if (!configuration.customcommands.sethome && !hasPermission) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fセットホームは現在無効です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SetHome is currently disabled.`); } - // 位置以外の引数をチェックする + // Check for additional non-positional arguments if (args.length > 0) { const additionalArg: string = args[0].toLowerCase(); - // 追加引数の処理 + // Handle additional arguments switch (additionalArg) { case "-h": case "--help": return setHomeHelp(player, prefix, configuration); case "-s": case "--status": - // ハンドル状態フラグ - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SetHome is currently ${configuration.customcommands.sethome ? "Boolean" : "無効"}`); + // Handle status flag + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SetHome is currently ${configuration.customcommands.sethome ? "enabled" : "disabled"} Allow Value: ${configuration.modules.setHome.max}`); break; case "-e": case "--enable": - // ハンドルイネーブルフラグ + // Handle enable flag if (configuration.customcommands.sethome) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f既に SetHome がBooleanになっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SetHome is already enabled.`); } else { if (!hasPermission) { sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f failed to enable §6SetHome§f! No permissions.`); - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f§6SetHome§fをBooleanにするには、Paradox-Oppedにする必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to enable §6SetHome§f.`); } configuration.customcommands.sethome = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 以下の機能が有効です=> §6SetHome§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 有効になりました: §6SetHome§f!`); } break; case "-d": case "--disable": - // ハンドル無効フラグ + // Handle disable flag if (!configuration.customcommands.sethome) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fセットホームは既に無効になっている。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SetHome is already disabled.`); } else { if (!hasPermission) { sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f failed to disable §6SetHome§f! No permissions.`); - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f§6SetHome§fを無効にするには、Paradox-Oppedにする必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to disable §6SetHome§f.`); } configuration.customcommands.sethome = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は無効 §4SetHome§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効にしました: §4SetHome§f!`); } break; case "-m": case "--max": { - // ハンドル最大フラグ + // Handle max flag if (!hasPermission) { sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f failed to set max allowed for §6SetHome§f! No permissions.`); - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f§6SetHome§fの最大許容値を設定するには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to set max allowed for §6SetHome§f.`); } const numberConvert = Number(args[1]); if (isNaN(numberConvert)) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid option. Use ${prefix}sethome --help for more information.`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f Invalid option. Use ${prefix}sethome --help を参照してください。 +` + ); } configuration.modules.setHome.max = numberConvert; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); @@ -203,15 +208,23 @@ export function sethome(message: ChatSendAfterEvent, args: string[]) { } case "-n": case "--name": - // ハンドル名フラグ + // Handle name flag saveHome(player, args, configuration); break; default: - // 認識できないフラグの処理 - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid option. Use ${prefix}sethome --help for more information.`); + // Handle unrecognized flag + sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f Invalid option. Use ${prefix}sethome --help を参照してください。 +` + ); break; } } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Invalid command. Use ${prefix}sethome --help for more information.`); + sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f 無効なコマンドです。使用するには=> ${prefix}sethome --help を参照してください。 +` + ); } } diff --git a/src/commands/utility/stats.ts b/src/commands/utility/stats.ts index 4f006bd..dac714c 100644 --- a/src/commands/utility/stats.ts +++ b/src/commands/utility/stats.ts @@ -14,16 +14,16 @@ function statsHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `§6コマンド§4]§f: スタッツ`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f:統計 [オプション]`, - `§4[§6オプション§4]§f: ユーザー名、ヘルプ`, - `§4[§6説明§4]§f:指定されたユーザーのログを表示する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: stats`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: stats [optional]`, + `§4[§6Optional§4]§f: username, help`, + `§4[§6説明§4]§f: Shows logs from the specified user.`, + `§4[§6Examples§4]§f:`, ` ${prefix}stats ${player.name}`, - ` §指定されたユーザのログを表示する§f`, + ` §4- §6Show logs for the specified user§f`, ` ${prefix}stats help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -35,7 +35,7 @@ function statsHelp(player: Player, prefix: string, setting: boolean) { export function stats(message: ChatSendAfterEvent, args: string[]) { handleStats(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -47,42 +47,46 @@ export function stats(message: ChatSendAfterEvent, args: string[]) { } async function handleStats(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./commands/utility/stats.js:29)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./commands/utility/stats.js:29)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 反論はあるか + // Are there arguements if (!args.length) { return statsHelp(player, prefix, configuration.customcommands.stats); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.stats) { return statsHelp(player, prefix, configuration.customcommands.stats); } if (!player.hasTag("notify")) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fチート通知をBooleanにする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to enable cheat notifications.`); } - // リクエストされた選手を探す + // try to find the player requested let member: Player; const players = world.getPlayers(); for (const pl of players) { @@ -93,7 +97,11 @@ async function handleStats(message: ChatSendAfterEvent, args: string[]) { } if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f そのプレーヤーが見つかりませんでした! +` + ); } const reportBody = [ diff --git a/src/commands/utility/tpr.ts b/src/commands/utility/tpr.ts index d175741..26c03ab 100644 --- a/src/commands/utility/tpr.ts +++ b/src/commands/utility/tpr.ts @@ -12,8 +12,8 @@ interface TeleportRequest { const teleportRequests: TeleportRequest[] = []; -// これにより、teleportRequests 配列から -// その内容を誤って変更することで、メモリリークを引き起こす。 +// This allows us to read from the teleportRequests array without +// creating a memory leak by accidentally modifying its contents. export function getTeleportRequests(): TeleportRequest[] { return teleportRequests; } @@ -26,29 +26,29 @@ function tprHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `§n§o§4[§6コマンド§4]§f: tpr`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: tpr [オプション]`, - `§4[§6オプション§4]§f: 名前、ヘルプ`, - `§4[§6解説§4]§f:プレイヤーにTPのリクエストを送る。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: tpr`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: tpr [optional]`, + `§4[§6Optional§4]§f: name, help`, + `§4[§6説明§4]§f: Will send requests to tp to players.`, + `§4[§6Examples§4]§f:`, ` ${prefix}tpr ${player.name}`, - ` §4- §6指定したプレイヤーにテレポート要請を出す§f`, + ` §4- §6Send a teleport request to the specified player§f`, ` ${prefix}tpr help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } -// これはリクエストの提出を処理する。 +// This handles the submission of requests function teleportRequestHandler({ sender, message }: ChatSendAfterEvent, configuration: ConfigInterface) { const player = sender; const args = message.split(" "); if (args.length < 2) return; - // メッセージからターゲット名を取り出す。 + // Extract the target name from the message, including the "@" symbol const targetName = args[1].trim(); - // 要求されたプレーヤーを"@"記号を含めて探してみる。 + // Try to find the player requested, including the "@" symbol let target: Player | undefined; const players = world.getPlayers(); for (const pl of players) { @@ -86,14 +86,14 @@ function teleportRequestHandler({ sender, message }: ChatSendAfterEvent, configu teleportRequests.push({ requester: player, target, - expiresAt: Date.now() + durationInMs, // Expires in the time specified in '継続時間' + expiresAt: Date.now() + durationInMs, // Expires in the time specified in 'durationInMs' }); sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Teleport request sent to §7${target.name}§f. Waiting for approval...`); sendMsgToPlayer(target, `§f§4[§6Paradox§4]§f You have received a teleport request from §7${player.name}§f. Type '§7approved§f' or '§7denied§f' in chat to respond.`); } -// 承認待ちのリクエストを処理します。 +// This handles requests pending approval function teleportRequestApprovalHandler(object: ChatSendAfterEvent) { const { sender, message } = object; const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -102,7 +102,7 @@ function teleportRequestApprovalHandler(object: ChatSendAfterEvent) { let extractedPhrase: string; if (configuration.modules.chatranks.enabled) { lowercaseMessage = (world as WorldExtended).decryptString(message, sender.id).toLowerCase(); - // 復号化された文字列からレスポンスを取り出す + // Extract the response from the decrypted string refChar = lowercaseMessage.split("§r"); extractedPhrase = refChar[1]; } else { @@ -119,9 +119,9 @@ function teleportRequestApprovalHandler(object: ChatSendAfterEvent) { object.sendToTargets = true; - // ターゲットはリクエストしたプレーヤー、プレーヤーはリクエストに応答した同じターゲットである。 + // Target is the player with the request and player is the same target responding to the request const requestIndex = teleportRequests.findIndex((r) => r.target === player); - // ターゲットは存在しない。 + // Target doesn't exist so return if (requestIndex === -1) return; const request = teleportRequests[requestIndex]; @@ -150,30 +150,30 @@ function teleportRequestApprovalHandler(object: ChatSendAfterEvent) { } export function TeleportRequestHandler({ sender, message }: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを検証する + // Validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? ./commands/utility/tpr.js:71)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? ./commands/utility/tpr.js:71)"); } const player = sender; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // 反論はあるか + // Are there arguements if (!args.length) { return tprHelp(player, prefix, configuration.customcommands.tpr); } - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.tpr) { return tprHelp(player, prefix, configuration.customcommands.tpr); } - // 提出されたリクエストはここで扱う + // Handle submitted requests here if (message.startsWith(`${prefix}tpr`)) { const event = { sender, @@ -182,7 +182,7 @@ export function TeleportRequestHandler({ sender, message }: ChatSendAfterEvent, teleportRequestHandler(event, configuration); } - // これは承認または拒否を送信する際のGUI用である。 + // This is for the GUI when sending approvals or denials const validMessages = ["approved", "approve", "denied", "deny"]; if (validMessages.some((msg) => msg === message)) { @@ -194,9 +194,9 @@ export function TeleportRequestHandler({ sender, message }: ChatSendAfterEvent, } } -// teleportRequestApprovalHandler にサブスクライブする。 +// Subscribe to teleportRequestApprovalHandler const TpRequestListener = () => { - // TPRが無効でない場合 + // If TPR is not disabled const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const validate = configuration.customcommands.tpr; if (validate) { diff --git a/src/commands/utility/vanish.ts b/src/commands/utility/vanish.ts index 068465d..20ca59c 100644 --- a/src/commands/utility/vanish.ts +++ b/src/commands/utility/vanish.ts @@ -12,16 +12,16 @@ function vanishHelp(player: Player, prefix: string, setting: boolean) { commandStatus = "§6[§a有効§6]§f"; } return sendMsgToPlayer(player, [ - `\n§o§4[§6 コマンド§4]§f: vanish`, - `§4[§6Status§4]§f: ${commandStatus}`, - `§4[§6使用§4]§f: vanish [オプション].`, - `§4[§6オプション§4]§f: ヘルプ`, - `§4[§6解説§4]§f:オンラインプレイヤーを監視するためにプレイヤーを透明化する。`, - `§4[§6例§4]§f:`, + `\n§o§4[§6コマンド§4]§f: vanish`, + `§4[§6ステータス§4]§f: ${commandStatus}`, + `§4[§6使用法§4]§f: vanish [optional]`, + `§4[§6Optional§4]§f: help`, + `§4[§6説明§4]§f: Turns the player invisible to monitor online player's.`, + `§4[§6Examples§4]§f:`, ` ${prefix}vanish`, - ` §4- §6他のプレイヤーから見えなくなる§f`, + ` §4- §6Turns the player invisible to other players§f`, ` ${prefix}vanish help`, - ` §4- §6コマンドを表示するヘルプ§f`, + ` §4- §6Show command help§f`, ]); } @@ -33,7 +33,7 @@ function vanishHelp(player: Player, prefix: string, setting: boolean) { export function vanish(message: ChatSendAfterEvent, args: string[]) { handleVanish(message, args).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -45,27 +45,31 @@ export function vanish(message: ChatSendAfterEvent, args: string[]) { } async function handleVanish(message: ChatSendAfterEvent, args: string[]) { - // 必要なパラメータが定義されていることを確認する + // validate that required params are defined if (!message) { - return console.warn(`${new Date()} | ` + "Error: ${message} isnt defined. Did you forget to pass it? (./utility/vanish.js:26)"); + return console.warn(`${new Date()} | ` + "エラー: ${message} が定義されていません。渡すのを忘れましたか? (./utility/vanish.js:26)"); } const player = message.sender; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer( + player, + `§f§4[§6Paradox§4]§f このコマンドを使用するには、管理者にしか使えません +` + ); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // カスタム接頭辞のチェック + // Check for custom prefix const prefix = getPrefix(player); - // 助けを求められたか + // Was help requested const argCheck = args[0]; if ((argCheck && args[0].toLowerCase() === "help") || !configuration.customcommands.vanish) { return vanishHelp(player, prefix, configuration.customcommands.vanish); @@ -76,18 +80,18 @@ async function handleVanish(message: ChatSendAfterEvent, args: string[]) { if (vanishBoolean) { player.removeTag("vanish"); player.triggerEvent("unvanish"); - // 効果を取り除く + // Remove effects const effectsToRemove = [MinecraftEffectTypes.Invisibility, MinecraftEffectTypes.NightVision]; for (const effectType of effectsToRemove) { player.removeEffect(effectType); } - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fもはやあなたは消えていない。`); - sendMsg(`a[tag=paradoxOpped]`, `§f§4[§6Paradox§4]§f §7${player.name}§f is no longer in vanish.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You are no longer vanished.`); + sendMsg(`@a[tag=paradoxOpped]`, `§f§4[§6Paradox§4]§f §7${player.name}§f is no longer in vanish.`); } else { player.addTag("vanish"); player.triggerEvent("vanish"); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたは今、消滅した!`); - sendMsg(`a[tag=paradoxOpped]`, `§f§4[§6Paradox§4]§f §7${player.name}§f is now vanished!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You are now vanished!`); + sendMsg(`@a[tag=paradoxOpped]`, `§f§4[§6Paradox§4]§f §7${player.name}§f is now vanished!`); } } diff --git a/src/data/config.ts b/src/data/config.ts index f401adf..e67ed3e 100644 --- a/src/data/config.ts +++ b/src/data/config.ts @@ -1,5 +1,5 @@ export default { - debug: true, + debug: false, customcommands: { prefix: "!", ban: true, @@ -104,12 +104,12 @@ export default { enabled: true, }, namespoofA: { - enabled: false, + enabled: true, minNameLength: 3, maxNameLength: 16, }, namespoofB: { - enabled: false, + enabled: true, // eslint-disable-next-line no-control-regex banregex: /[^\x00-\x7F]|[/:\\*?"<>]|^\.$|\.$/gu, // Deny any invalid character not within the scope of this regex @@ -159,7 +159,7 @@ export default { enabled: false, }, antikbA: { - enabled: true, + enabled: false, velocityIntensity: -0.078, }, antiscaffoldA: { @@ -193,19 +193,19 @@ export default { enabled: false, }, setHome: { - max: 10, + max: 5, }, goHome: { seconds: 0, - minutes: 1, + minutes: 5, hours: 0, days: 0, }, clearLag: { - enabled: true, + enabled: false, seconds: 0, - minutes: 0, - hours: 1, + minutes: 10, + hours: 0, days: 0, }, illegalEnchantment: { @@ -217,10 +217,10 @@ export default { }, hotbar: { enabled: false, - message: "ホットバー通知", // Put Message inside the quotes + message: "Hotbar is enabled (Set your message to change this)", // Put Message inside the quotes }, ops: { - enabled: true, + enabled: false, }, salvage: { enabled: false, @@ -231,25 +231,24 @@ export default { showrules: { enabled: true, kick: false, - rule1: "ルール1: チートはダメ!!", - rule2: "ルール2: 人の許可なく建築を破壊しない", - rule3: "ルール3: スパム行為などは禁止!!", - rule4: "ルール4: みんなで仲良くしてね", - rule5: "ルール5: !helpでコマンドが使えます確認してみてね", + rule1: "Rule1: No hacking allowed.", + rule2: "Rule2: Don't grief other players' builds.", + rule3: "Rule3: Be kind to everyone on the server.", + rule4: "Rule4: Follow the staff's instructions.", + rule5: "Rule5: No spamming or advertising.", }, paradoxui: { enabled: true, }, tprExpiration: { - seconds: 10, - minutes: 0, + seconds: 0, + minutes: 2, hours: 0, days: 0, }, banAppeal: { - enabled: true, - //ここは個人に応じて変えてください - discordLink: "何か異論があればdiscordまで(@koukun_)", + enabled: false, + discordLink: "https://discord.gg", }, autoBan: { enabled: false, @@ -260,7 +259,7 @@ export default { enabled: true, }, afk: { - enabled: false, + enabled: true, minutes: 10, }, antiphaseA: { @@ -275,7 +274,7 @@ export default { vector3: { x: 0, y: 0, z: 0 }, }, autoclicker: { - enabled: true, + enabled: false, }, }, /** @@ -284,7 +283,7 @@ export default { * This is required for Realm users to gain Paradox-Op. * * Anyone else is welcome to use this if they like but - * レルムズの人はここにパスワードを入れてください!! + * are not obligated. */ encryption: { password: "", diff --git a/src/data/globalban.ts b/src/data/globalban.ts index 0fd091d..c3b7c63 100644 --- a/src/data/globalban.ts +++ b/src/data/globalban.ts @@ -297,6 +297,7 @@ export const banplayer = [ { name: "PeakAttic816794" }, { name: "Pepegamessk" }, { name: "PerkySinger3944" }, + { name: "PEXkoukunn" }, { name: "PianoPandora948" }, { name: "PicanteRat27798" }, { name: "PicaresqueRat" }, @@ -509,4 +510,6 @@ export const banplayer = [ { name: "Zrixi8628" }, { name: "Zxero110" }, { name: "HOGSWORTH7769" }, + { name: "zekerpunch" }, + { name: "Mr Pheonix2141" }, ]; diff --git a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/chatui.ts b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/chatui.ts index 7bcd174..03145a6 100644 --- a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/chatui.ts +++ b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/chatui.ts @@ -7,19 +7,19 @@ import { unmuteHandler } from "./results/unmute"; import { clearChatHandler } from "./results/clearchat"; export function chatui(player: Player) { - //ショーチャットUI + //show chat ui const chatui = new ActionFormData(); - chatui.title("§4Configure Chatメニュー§4"); - chatui.body("§eチャットに関する設定.§e"); - chatui.button("通知", "textures/ui/chat_send"); - chatui.button("階級", "textures/ui/saleribbon"); - chatui.button("ミュート", "textures/ui/mute_on"); - chatui.button("ミュート解除", "textures/ui/mute_off"); - chatui.button("クリア・チャット", "textures/ui/cancel"); + chatui.title("§4Paradox - Configure Chat§4"); + chatui.body("§eSettings related to chat.§e"); + chatui.button("Notify", "textures/ui/chat_send"); + chatui.button("Ranks", "textures/ui/saleribbon"); + chatui.button("Mute", "textures/ui/mute_on"); + chatui.button("Unmute", "textures/ui/mute_off"); + chatui.button("Clear Chat", "textures/ui/cancel"); chatui .show(player) .then((chatResult) => { - // switch文を使用して、異なる選択を処理する + // Use a switch statement to handle different selections switch (chatResult.selection) { case 0: notifyHandler(player); @@ -41,13 +41,13 @@ export function chatui(player: Player) { } }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/chatranks.ts b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/chatranks.ts index 2c8e2e4..8a17950 100644 --- a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/chatranks.ts +++ b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/chatranks.ts @@ -5,31 +5,31 @@ import { uiCHATRANKS } from "../../../../moderation/uiChatranks"; import ConfigInterface from "../../../../../interfaces/Config"; export function chatRanksHandler(player: Player) { - //チャットランク + //Chat Ranks ui const chatranksui = new ModalFormData(); let onlineList: string[] = []; const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - const chatranksBoolean = configuration.modules.chatranks.enabled; - chatranksui.title("§4Change A Player's Chat Rankメニュー§4"); + const chatRanksBoolean = configuration.modules.chatranks.enabled; + chatranksui.title("§4Change A Player's Chat Rank§4"); onlineList = Array.from(world.getPlayers(), (player) => player.name); const predefinedrank: string[] = ["Owner", "Admin", "Mod", "Member"]; - chatranksui.dropdown(`\n§f指定したユーザーをchange their rank:§f\n\n以下のユーザーがオンラインです!\n`, onlineList); - chatranksui.dropdown(`\n§f事前に定義されたランクを選択するか、以下のカスタムランクを設定することができます。:§f`, predefinedrank); - chatranksui.textField("カスタムランクを入力してください:", "ビップ"); - chatranksui.toggle("チャットランク - チャットランクをBooleanまたは無効にします:", chatranksBoolean); + chatranksui.dropdown(`\n§fSelect a player to change their rank:§f\n\nPlayer's Online\n`, onlineList); + chatranksui.dropdown(`\n§fSelect a pre defined rank or you can set a custom on below:§f`, predefinedrank); + chatranksui.textField("Enter a custom Rank:", "VIP"); + chatranksui.toggle("Chat Ranks - Enables or Disables chat ranks:", chatRanksBoolean); chatranksui .show(player) .then((chatranksResult) => { uiCHATRANKS(chatranksResult, onlineList, predefinedrank, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/clearchat.ts b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/clearchat.ts index 757f2ea..59abc02 100644 --- a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/clearchat.ts +++ b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/clearchat.ts @@ -4,12 +4,12 @@ import { uiCLEARCHAT } from "../../../../moderation/uiClearchat"; import { paradoxui } from "../../../../paradoxui"; export function clearChatHandler(player: Player) { - //クリアチャットui + //Clear Chat ui const clearchatui = new MessageFormData(); - clearchatui.title("§4Clear Chatメニュー§4"); - clearchatui.body("本当にチャットをクリアにしますか?"); - clearchatui.button1("はい"); - clearchatui.button2("いいえ"); + clearchatui.title("§4Clear Chat§4"); + clearchatui.body("Are you sure you want to clear chat?"); + clearchatui.button1("Yes"); + clearchatui.button2("No"); clearchatui .show(player) .then((clearchatResult) => { @@ -21,13 +21,13 @@ export function clearChatHandler(player: Player) { } }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/mute.ts b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/mute.ts index 05133ee..e1b824b 100644 --- a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/mute.ts +++ b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/mute.ts @@ -3,26 +3,26 @@ import { ModalFormData } from "@minecraft/server-ui"; import { uiMUTE } from "../../../../moderation/uiMute"; export function muteHandler(player: Player) { - //ミュート・オニオン + //Mute ui const muteui = new ModalFormData(); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - muteui.title("§4Mute A Player In Chatメニュー§4"); - muteui.dropdown(`\n§f指定したユーザーをmute:§f\n\n以下のユーザーがオンラインです!\n`, onlineList); - muteui.textField("理由", "ディスコードのリンクを貼っている。"); + muteui.title("§4Mute A Player In Chat.§4"); + muteui.dropdown(`\n§fSelect a player to mute:§f\n\nPlayer's Online\n`, onlineList); + muteui.textField("Reason:", "Has been posting discord links."); muteui .show(player) .then((muteResult) => { uiMUTE(muteResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/notify.ts b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/notify.ts index e8f33d3..1750369 100644 --- a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/notify.ts +++ b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/notify.ts @@ -3,27 +3,27 @@ import { ModalFormData } from "@minecraft/server-ui"; import { uiNOTIFY } from "../../../../moderation/uiNotify"; export function notifyHandler(player: Player) { - //ui を通知する + //notify ui const notifyui = new ModalFormData(); let onlineList: string[] = []; - notifyui.title("§4Enable or Disable Notificationsメニュー§4"); + notifyui.title("§4Enable or Disable Notifications§4"); onlineList = Array.from(world.getPlayers(), (player) => player.name); - notifyui.dropdown(`\n§f通知を許可する§f\n\n以下のユーザーがオンラインです!\n`, onlineList); - //デフォルトでは、現在の値をdisabledに設定する。 - notifyui.toggle("通知", false); + notifyui.dropdown(`\n§fSelect a player to Enable or Disable Notifications:§f\n\nPlayer's Online\n`, onlineList); + //by default set the current value to disabled. + notifyui.toggle("Notifications:", false); notifyui .show(player) .then((notifyResult) => { uiNOTIFY(notifyResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/unmute.ts b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/unmute.ts index 8bf6df6..f633354 100644 --- a/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/unmute.ts +++ b/src/gui/guiHandler/guiHandlerModeration/guiHandlerChat/results/unmute.ts @@ -3,26 +3,26 @@ import { ModalFormData } from "@minecraft/server-ui"; import { uiUNMUTE } from "../../../../moderation/uiUnmute"; export function unmuteHandler(player: Player) { - //オニオンのミュート解除 + //UnMute ui const unmuteui = new ModalFormData(); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - unmuteui.title("§4Mute A Player In Chatメニュー§4"); - unmuteui.dropdown(`\n§f指定したユーザーをミュート解除する:§f\n\n以下のユーザーがオンラインです!\n`, onlineList); - unmuteui.textField("理由", "チャットでの会話を許可する。"); + unmuteui.title("§4Mute A Player In Chat§4"); + unmuteui.dropdown(`\n§fSelect a player to unmute:§f\n\nPlayer's Online\n`, onlineList); + unmuteui.textField("Reason:", "Permissions to talk in chat."); unmuteui .show(player) .then((muteResult) => { uiUNMUTE(muteResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/moderationui.ts b/src/gui/guiHandler/guiHandlerModeration/moderationui.ts index 757ed94..14fd0be 100644 --- a/src/gui/guiHandler/guiHandlerModeration/moderationui.ts +++ b/src/gui/guiHandler/guiHandlerModeration/moderationui.ts @@ -20,23 +20,23 @@ import { paradoxui } from "../../paradoxui"; export function moderationui(player: Player) { //new window for Moderation const moderationui = new ActionFormData(); - moderationui.title("§4管理者メニュー§4"); + moderationui.title("§4Paradox Moderation§4"); moderationui.button("Ban", "textures/ui/hammer_l"); - moderationui.button("Ban解除", "textures/ui/check"); - moderationui.button("ルール", "textures/items/book_writable"); - moderationui.button("チャット", "textures/ui/newOffersIcon"); - moderationui.button("メンテナンス", "textures/ui/lock_color"); - moderationui.button("アイテム削除", "textures/ui/trash"); - moderationui.button("テレポート", "textures/blocks/portal_placeholder"); - moderationui.button("キック", "textures/items/gold_boots"); - moderationui.button("エンダーチェスト消去", "textures/blocks/ender_chest_front"); - moderationui.button("フリーズ", "textures/ui/frozen_effect"); - moderationui.button("飛行モード", "textures/ui/flyingascend"); - moderationui.button("透明", "textures/items/potion_bottle_invisibility"); - moderationui.button("モブをキル", "textures/ui/trash"); - moderationui.button("自動Ban", "textures/ui/hammer_l"); - moderationui.button("インベントリ", "textures/blocks/chest_front"); - moderationui.button("戻る"); + moderationui.button("Un-ban", "textures/ui/check"); + moderationui.button("Rules", "textures/items/book_writable"); + moderationui.button("Chat", "textures/ui/newOffersIcon"); + moderationui.button("Lockdown", "textures/ui/lock_color"); + moderationui.button("Punish", "textures/ui/trash"); + moderationui.button("Teleport Assistance", "textures/blocks/portal_placeholder"); + moderationui.button("Kick a player", "textures/items/gold_boots"); + moderationui.button("Wipe an Enderchest", "textures/blocks/ender_chest_front"); + moderationui.button("Freeze a player", "textures/ui/frozen_effect"); + moderationui.button("Allow a player to fly", "textures/ui/flyingascend"); + moderationui.button("Vanish", "textures/items/potion_bottle_invisibility"); + moderationui.button("Despawn entities", "textures/ui/trash"); + moderationui.button("Auto Ban", "textures/ui/hammer_l"); + moderationui.button("Inventory", "textures/blocks/chest_front"); + moderationui.button("Back"); moderationui .show(player) diff --git a/src/gui/guiHandler/guiHandlerModeration/results/autoban.ts b/src/gui/guiHandler/guiHandlerModeration/results/autoban.ts index d1fdb70..3f97c65 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/autoban.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/autoban.ts @@ -8,21 +8,21 @@ export function autobanHandler(player: Player) { const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const autoBanBoolean = configuration.modules.autoBan.enabled; const autobanui = new ModalFormData(); - autobanui.title("§4Auto Banメニュー§4"); - autobanui.toggle("自動禁止をBooleanまたは無効にする:", autoBanBoolean); + autobanui.title("§4Paradox - Auto Ban§4"); + autobanui.toggle("Enable or disable auto ban:", autoBanBoolean); autobanui .show(player) .then((autobanResult) => { uiAUTOBAN(autobanResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/ban.ts b/src/gui/guiHandler/guiHandlerModeration/results/ban.ts index a4313f6..f31c267 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/ban.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/ban.ts @@ -3,28 +3,28 @@ import { ModalFormData } from "@minecraft/server-ui"; import { uiBAN } from "../../../moderation/uiBan"; export function banHandler(player: Player) { - //ここにバンを表示する + //show ban ui here const banui = new ModalFormData(); let onlineList: string[] = []; - banui.title("§4Ban A Playerメニュー§4"); + banui.title("§4Paradox - Ban A Player§4"); onlineList = Array.from(world.getPlayers(), (player) => player.name); - banui.dropdown(`\n§f指定したユーザーをBan:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); - banui.textField(`理由`, `理由を入力してください。`); + banui.dropdown(`\n§fSelect a player to Ban:§f\n\nPlayer's Online\n`, onlineList); + banui.textField(`Reason:`, `Enter a reason.`); banui .show(player) .then((banResult) => { - //禁止機能はここにある + //ban function goes here uiBAN(banResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/despawn.ts b/src/gui/guiHandler/guiHandlerModeration/results/despawn.ts index 3c995f9..bad6d05 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/despawn.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/despawn.ts @@ -4,22 +4,22 @@ import { uiDESPAWNER } from "../../../moderation/uiDespawner"; export function despawnHandler(player: Player) { const despawnerui = new ModalFormData(); - despawnerui.title("§4Despawn Entitiesメニュー§4"); - despawnerui.textField("デスポーンするエンティティ名を入力する:", "匍匐茎"); - despawnerui.toggle("ロードされたチャンク内のすべてのエンティティをデスポーンする:", false); + despawnerui.title("§4Paradox - Despawn Entities§4"); + despawnerui.textField("Enter the name of a entity to despawn:", "creeper"); + despawnerui.toggle("Despawn all entities in the loaded chunks:", false); despawnerui .show(player) .then((despawnerResult) => { uiDESPAWNER(despawnerResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/ecwipe.ts b/src/gui/guiHandler/guiHandlerModeration/results/ecwipe.ts index 0797f5e..435e3f7 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/ecwipe.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/ecwipe.ts @@ -4,23 +4,23 @@ import { uiEWIPE } from "../../../moderation/uiEwipe"; export function ecwipeHandler(player: Player) { const ewipeui = new ModalFormData(); - ewipeui.title("§4Wipe A Player's Enderchestメニュー§4"); + ewipeui.title("§4Paradox - Wipe A Player's Enderchest§4"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - ewipeui.dropdown(`\n§f指定したユーザーをエンダーチェストを消す:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + ewipeui.dropdown(`\n§fSelect a player to wipe their Enderchest:§f\n\nPlayer's Online\n`, onlineList); ewipeui .show(player) .then((ewipeResult) => { uiEWIPE(ewipeResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/fly.ts b/src/gui/guiHandler/guiHandlerModeration/results/fly.ts index 6420c46..f8e3313 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/fly.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/fly.ts @@ -4,23 +4,23 @@ import { uiFLY } from "../../../moderation/uiFly"; export function flyHandler(player: Player) { const flyui = new ModalFormData(); - flyui.title("§4Grant A Player Fly Abilitiesメニュー§4"); + flyui.title("§4Paradox - Grant A Player Fly Abilities§4"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - flyui.dropdown(`\n§f指定したユーザーを飛ばせる:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + flyui.dropdown(`\n§fSelect a player to allow the ability to fly:§f\n\nPlayer's Online\n`, onlineList); flyui .show(player) .then((flyResult) => { uiFLY(flyResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/freeze.ts b/src/gui/guiHandler/guiHandlerModeration/results/freeze.ts index c60d0a7..d1b8a3e 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/freeze.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/freeze.ts @@ -4,23 +4,23 @@ import { uiFREEZE } from "../../../moderation/uiFreeze"; export function freezeHandler(player: Player) { const freezeui = new ModalFormData(); - freezeui.title("§4Freeze A Playerメニュー.§4"); + freezeui.title("§4Paradox - Freeze A Player.§4"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - freezeui.dropdown(`\n§f指定したユーザーをフリーズさせる:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + freezeui.dropdown(`\n§fSelect a player to freeze:§f\n\nPlayer's Online\n`, onlineList); freezeui .show(player) .then((freezeResult) => { uiFREEZE(freezeResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/inventoryui.ts b/src/gui/guiHandler/guiHandlerModeration/results/inventoryui.ts index 8adf68e..eccaaad 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/inventoryui.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/inventoryui.ts @@ -3,23 +3,23 @@ import { ModalFormData } from "@minecraft/server-ui"; import { uiINVENTORY } from "../../../moderation/uiInventory"; export function inventoryHandler(player: Player) { const inventoryUI = new ModalFormData(); - inventoryUI.title("§4Inventory Managementメニュー§4"); + inventoryUI.title("§4Paradox - Inventory Management§4"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - inventoryUI.dropdown(`\n§f指定した ユーザーを見る:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + inventoryUI.dropdown(`\n§fSelect a player:§f\n\nPlayer's Online\n`, onlineList); inventoryUI .show(player) .then((inventoryUIResult) => { uiINVENTORY(inventoryUIResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/kick.ts b/src/gui/guiHandler/guiHandlerModeration/results/kick.ts index 7882d71..4335db5 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/kick.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/kick.ts @@ -4,11 +4,11 @@ import { uiKICK } from "../../../moderation/uiKick"; export function kickHandler(player: Player) { const kickui = new ModalFormData(); - kickui.title("§4Kick A Playerメニュー§4"); + kickui.title("§4Paradox - Kick A Player§4"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - kickui.dropdown(`\n§f指定したユーザーをキック:§f\n\n以下のユーザーがオンラインです!\n`, onlineList); - kickui.textField("理由", "ハッキングだ!"); + kickui.dropdown(`\n§fSelect a player to Kick:§f\n\nPlayer's Online\n`, onlineList); + kickui.textField("Reason:", "Hacking!"); kickui .show(player) @@ -16,13 +16,13 @@ export function kickHandler(player: Player) { uiKICK(kickResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/lockdown.ts b/src/gui/guiHandler/guiHandlerModeration/results/lockdown.ts index 91dfb84..181ddf0 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/lockdown.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/lockdown.ts @@ -5,27 +5,27 @@ import { uiLOCKDOWN } from "../../../moderation/uiLockdown"; import ConfigInterface from "../../../../interfaces/Config"; export function lockdownHandler(player: Player) { - //ロックダウン ui + //Lockdown ui const lockdownui = new ModalFormData(); - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const lockdownBoolean = configuration.modules.lockdown.enabled; - lockdownui.title("§4Lockdownメニュー§4"); - lockdownui.textField("理由", "世界で最も可能性のあるハッカー"); - lockdownui.toggle("ロックダウンをBooleanまたは無効にする:", lockdownBoolean); + lockdownui.title("§4Paradox - Lockdown§4"); + lockdownui.textField("Reason:", "Possible hacker in the world."); + lockdownui.toggle("Enable or Disable Lockdown:", lockdownBoolean); lockdownui .show(player) .then((lockdownResult) => { uiLOCKDOWN(lockdownResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/managePlayersSavedLocations.ts b/src/gui/guiHandler/guiHandlerModeration/results/managePlayersSavedLocations.ts index 1eeea50..7e118f7 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/managePlayersSavedLocations.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/managePlayersSavedLocations.ts @@ -4,23 +4,23 @@ import { uiManagePlayerSavedLocations } from "../../../moderation/uiManagePlayer export function managePlayerSavedLocationsHandler(player: Player) { const managePlayerSavedLocationsUI = new ModalFormData(); - managePlayerSavedLocationsUI.title("§4座標を管理§4"); + managePlayerSavedLocationsUI.title("§4Paradox - Players Saved Locations§4"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - managePlayerSavedLocationsUI.dropdown(`\n§fユーザーを選択管理:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + managePlayerSavedLocationsUI.dropdown(`\n§fSelect a player:§f\n\nPlayer's Online\n`, onlineList); managePlayerSavedLocationsUI .show(player) .then((managePlayerSavedLocationsUIResult) => { uiManagePlayerSavedLocations(managePlayerSavedLocationsUIResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/punish.ts b/src/gui/guiHandler/guiHandlerModeration/results/punish.ts index 38aa111..0531b8d 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/punish.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/punish.ts @@ -4,35 +4,35 @@ import { uiPUNISH } from "../../../moderation/uiPunish"; import { paradoxui } from "../../../paradoxui"; export function punishHandler(player: Player) { - //PunishのUIは、2つのフォームを使うつもりです。1つはYES/NOのメッセージで、これで何ができるかをアドバイスします。 + //Punish UI im going to use two forms one as a yes/no message so i can advise what this will do. const punishprewarnui = new MessageFormData(); - punishprewarnui.title("§4Punishメニュー§4"); - punishprewarnui.body("これにより、プレイヤーのエンダーチェストとインベントリを消去することができる。"); - punishprewarnui.button1("続ける"); - punishprewarnui.button2("戻る"); + punishprewarnui.title("§4Paradox - Punish§4"); + punishprewarnui.body("This will allow you to wipe a player's Ender chest as well as their inventory."); + punishprewarnui.button1("Continue"); + punishprewarnui.button2("Back"); punishprewarnui .show(player) .then((prewarnResult) => { if (prewarnResult.selection === 0) { - //罰を与えるUIを表示する + //show the Punish UI const punishui = new ModalFormData(); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - punishui.title("§4Punish§4"); - punishui.dropdown(`\n§f指定したユーザーをwipe:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + punishui.title("§4Paradox - Punish§4"); + punishui.dropdown(`\n§fSelect a player to wipe:§f\n\nPlayer's Online\n`, onlineList); punishui .show(player) .then((punishResult) => { uiPUNISH(punishResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); @@ -41,13 +41,13 @@ export function punishHandler(player: Player) { } }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/rules.ts b/src/gui/guiHandler/guiHandlerModeration/results/rules.ts index 37576ad..cc5383a 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/rules.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/rules.ts @@ -5,28 +5,28 @@ import { Player } from "@minecraft/server"; import ConfigInterface from "../../../../interfaces/Config"; export function rulesHandler(player: Player) { - //ルール表示 + //show rules ui const rulesui = new ModalFormData(); - rulesui.title("§4Configure Rulesメニュー§4"); + rulesui.title("§4Paradox - Configure Rules§4"); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const showrulesBoolean = configuration.modules.showrules.enabled; const KickOnDeclineBoolean = configuration.modules.showrules.kick; - rulesui.toggle("ルールをBooleanにする:", showrulesBoolean); - rulesui.toggle("キック・オン・デクライン", KickOnDeclineBoolean); + rulesui.toggle("Enable Rules:", showrulesBoolean); + rulesui.toggle("Kick On Decline:", KickOnDeclineBoolean); rulesui .show(player) .then((rulesResult) => { - // 制限のため、ゲーム内でルールを編集することはできません。 + // due to limitations we can't edit the rules in game. uiRULES(rulesResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/tpa.ts b/src/gui/guiHandler/guiHandlerModeration/results/tpa.ts index 7aa06f7..1bb11f3 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/tpa.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/tpa.ts @@ -4,25 +4,25 @@ import { uiTPA } from "../../../moderation/uiTpa"; export function tpaHandler(player: Player) { const tpaui = new ModalFormData(); - tpaui.title("§4Teleport Assistanceメニュー§4"); + tpaui.title("§4Paradox - Teleport Assistance§4"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - tpaui.dropdown(`\n§f指定したユーザーをteleport:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); - tpaui.toggle("対象のプレイヤーにテレポートする:", true); - tpaui.toggle("対象のプレイヤーをテレポートさせる:", false); + tpaui.dropdown(`\n§fSelect a player to teleport:§f\n\nPlayer's Online\n`, onlineList); + tpaui.toggle("Teleport to the target player:", true); + tpaui.toggle("Teleport the target player to you:", false); tpaui .show(player) .then((tpaResult) => { uiTPA(tpaResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/unban.ts b/src/gui/guiHandler/guiHandlerModeration/results/unban.ts index caf4062..f27fb4f 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/unban.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/unban.ts @@ -3,24 +3,24 @@ import { ModalFormData } from "@minecraft/server-ui"; import { uiUNBAN } from "../../../moderation/uiUnban"; export function unbanHandler(player: Player) { - //ここに禁止解除のUIを表示する + //show unban ui here const unbanui = new ModalFormData(); - unbanui.title("§4Unban A Playerメニュー§4"); - unbanui.textField(`選手`, `ユーザー名を入力してください。`); - unbanui.toggle("禁止解除キューからプレーヤーを削除する:", false); + unbanui.title("§4Paradox - Unban A Player§4"); + unbanui.textField(`Player:`, `Enter a username.`); + unbanui.toggle("Remove player from the un-ban queue:", false); unbanui .show(player) .then((unbanResult) => { uiUNBAN(unbanResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModeration/results/vanish.ts b/src/gui/guiHandler/guiHandlerModeration/results/vanish.ts index 4d8641c..53ad168 100644 --- a/src/gui/guiHandler/guiHandlerModeration/results/vanish.ts +++ b/src/gui/guiHandler/guiHandlerModeration/results/vanish.ts @@ -4,23 +4,23 @@ import { uiVANISH } from "../../../moderation/uiVanish"; export function vanishHandler(player: Player) { const vanishui = new ModalFormData(); - vanishui.title("§4Vanish From The Serverメニュー§4"); + vanishui.title("§4Paradox - Vanish From The Server§4"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - vanishui.dropdown(`\n§f指定したユーザーをvanish:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + vanishui.dropdown(`\n§fSelect a player to vanish:§f\n\nPlayer's Online\n`, onlineList); vanishui .show(player) .then((vanishResult) => { uiVANISH(vanishResult, onlineList, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/movementui.ts b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/movementui.ts index 42cefe6..7c8aa2b 100644 --- a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/movementui.ts +++ b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/movementui.ts @@ -10,14 +10,14 @@ import { antiJesusAHandler } from "./results/antijesusa"; export function movementui(player: Player) { const modulesmovementui = new ActionFormData(); - modulesmovementui.title("§4メニュー:移動系§4"); - modulesmovementui.button("ノックバック検知", "textures/items/diamond_chestplate"); - modulesmovementui.button("落下ダメ検知", "textures/items/diamond_boots"); - modulesmovementui.button("飛行検知", "textures/items/elytra"); - modulesmovementui.button("Sprint検知", "textures/items/diamond_boots"); - modulesmovementui.button("速さ検知", "textures/items/diamond_boots"); - modulesmovementui.button("Scaffold検知", "textures/blocks/scaffolding_top"); - modulesmovementui.button("水の上走ってるやつ検知", "textures/blocks/lava_placeholder"); + modulesmovementui.title("§4Paradox Modules - Movement§4"); + modulesmovementui.button("Anti Knockback", "textures/items/diamond_chestplate"); + modulesmovementui.button("Anti Fall", "textures/items/diamond_boots"); + modulesmovementui.button("Anti Fly", "textures/items/elytra"); + modulesmovementui.button("Invalid Sprint", "textures/items/diamond_boots"); + modulesmovementui.button("Anti Speed", "textures/items/diamond_boots"); + modulesmovementui.button("Anti Scaffold", "textures/blocks/scaffolding_top"); + modulesmovementui.button("Anti Jesusa", "textures/blocks/lava_placeholder"); modulesmovementui .show(player) .then((movementResult) => { diff --git a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antifall.ts b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antifall.ts index e0286be..e3f8a18 100644 --- a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antifall.ts +++ b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antifall.ts @@ -5,25 +5,25 @@ import { uiANTIFALL } from "../../../../modules/uiAntiFall"; import ConfigInterface from "../../../../../interfaces/Config"; export function antiFallHandler(player: Player) { - //アンチフォール + //Anti Fall const modulesantifallui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const antifallABoolean = configuration.modules.antifallA.enabled; - modulesantifallui.title("§4Anti Fallメニュー§4"); - modulesantifallui.toggle("アンチフォール - サバイバル中に落下ダメージを受けないかチェックする:", antifallABoolean); + modulesantifallui.title("§4Paradox Modules - Anti Fall§4"); + modulesantifallui.toggle("Anti Fall - Checks for taking no fall damage in survival:", antifallABoolean); modulesantifallui .show(player) .then((antifallResult) => { uiANTIFALL(antifallResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antifly.ts b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antifly.ts index 0095f9d..c375d0a 100644 --- a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antifly.ts +++ b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antifly.ts @@ -5,25 +5,25 @@ import { uiANTIFLY } from "../../../../modules/uiAntiFly"; import ConfigInterface from "../../../../../interfaces/Config"; export function antiFlyHandler(player: Player) { - //アンチ・フライ + //Anti Fly const modulesantiflyui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const flyABoolean = configuration.modules.flyA.enabled; - modulesantiflyui.title("§4Anti Flyメニュー§4"); - modulesantiflyui.toggle("アンチフライ - サバイバル中の違法飛行をチェックする:", flyABoolean); + modulesantiflyui.title("§4Paradox Modules - Anti Fly§4"); + modulesantiflyui.toggle("Anti Fly - Checks for illegal flying in survival:", flyABoolean); modulesantiflyui .show(player) .then((antiflyResult) => { uiANTIFLY(antiflyResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antijesusa.ts b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antijesusa.ts index 653a0f4..bfa8447 100644 --- a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antijesusa.ts +++ b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antijesusa.ts @@ -5,25 +5,25 @@ import { uiANTIJESUS } from "../../../../modules/uiAntiJesus"; import ConfigInterface from "../../../../../interfaces/Config"; export function antiJesusAHandler(player: Player) { - //ジーザスUI + //Jesus UI const modulesantijesusui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const jesusaBoolean = configuration.modules.jesusA.enabled; - modulesantijesusui.title("§4Anti Jesusメニュー§4"); - modulesantijesusui.toggle("アンチ・ジーザス(Anti Jesus) - 水や溶岩の上を歩いたり、スプリントしたりする際のチェックを切り替える:", jesusaBoolean); + modulesantijesusui.title("§4Paradox Modules - Anti Jesus§4"); + modulesantijesusui.toggle("Anti Jesus - Toggles checks for walking/sprinting on water or lava:", jesusaBoolean); modulesantijesusui .show(player) .then((antijesusResult) => { uiANTIJESUS(antijesusResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antiknockback.ts b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antiknockback.ts index 1170277..f16cbea 100644 --- a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antiknockback.ts +++ b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antiknockback.ts @@ -5,25 +5,25 @@ import { uiANTIKNOCKBACK } from "../../../../modules/uiAntiKnockback"; import ConfigInterface from "../../../../../interfaces/Config"; export function antiKnockBackHandler(player: Player) { - //アンチノックバックUI + //Anti Knockback UI const modulesantiknockbackui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const antikbBoolean = configuration.modules.antikbA.enabled; - modulesantiknockbackui.title("§4Anti KnockBackメニュー§4"); - modulesantiknockbackui.toggle("アンチノックバック - すべてのプレイヤーにアンチノックバックを:", antikbBoolean); + modulesantiknockbackui.title("§4Paradox Modules - Anti KnockBack§4"); + modulesantiknockbackui.toggle("Anti Knockback - Anti Knockback for all players:", antikbBoolean); modulesantiknockbackui .show(player) .then((antikbResult) => { uiANTIKNOCKBACK(antikbResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antiscaffolda.ts b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antiscaffolda.ts index ef855da..96d5486 100644 --- a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antiscaffolda.ts +++ b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/antiscaffolda.ts @@ -5,25 +5,25 @@ import { uiANTISCAFFOLD } from "../../../../modules/uiAntiScaffold"; import ConfigInterface from "../../../../../interfaces/Config"; export function antiScaffoldAHandler(player: Player) { - //抗足場 + //AntiScaffold const modulesantiscaffoldui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const antiScaffoldABoolean = configuration.modules.antiscaffoldA.enabled; - modulesantiscaffoldui.title("§4Anti Scaffoldメニュー§4"); - modulesantiscaffoldui.toggle("アンチ足場 - 選手が違法な足場を組んでいないかチェックします:", antiScaffoldABoolean); + modulesantiscaffoldui.title("§4Paradox Modules - Anti Scaffold§4"); + modulesantiscaffoldui.toggle("Anti Scaffold - Checks player's for illegal scaffolding:", antiScaffoldABoolean); modulesantiscaffoldui .show(player) .then((antiscaffoldResult) => { uiANTISCAFFOLD(antiscaffoldResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/invalidsprint.ts b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/invalidsprint.ts index 6feee5f..b3972f2 100644 --- a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/invalidsprint.ts +++ b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/invalidsprint.ts @@ -5,25 +5,25 @@ import { dynamicPropertyRegistry } from "../../../../../penrose/WorldInitializeA import ConfigInterface from "../../../../../interfaces/Config"; export function invalidSprintHandler(player: Player) { - //無効なスプリント + //Invalid Sprint const modulesinvalidsprintui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const invalidSprintABoolean = configuration.modules.invalidsprintA.enabled; - modulesinvalidsprintui.title("§4Invalid Sprintメニュー§4"); - modulesinvalidsprintui.toggle("無効スプリント - 失明効果による不正なスプリントをチェックする:", invalidSprintABoolean); + modulesinvalidsprintui.title("§4Paradox Modules - Invalid Sprint§4"); + modulesinvalidsprintui.toggle("Invalid Sprint - Checks for illegal sprinting with blindness effect:", invalidSprintABoolean); modulesinvalidsprintui .show(player) .then((invalidsprintResult) => { uiINVALIDSPRINT(invalidsprintResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/speeda.ts b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/speeda.ts index 3e1787c..bbec05a 100644 --- a/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/speeda.ts +++ b/src/gui/guiHandler/guiHandlerModules/guiHandlerMovement/results/speeda.ts @@ -5,25 +5,25 @@ import { uiSPEED } from "../../../../modules/uiSpeed"; import ConfigInterface from "../../../../../interfaces/Config"; export function speedAHandler(player: Player) { - //スピードA + //SpeedA const modulesspeedui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const speedABoolean = configuration.modules.speedA.enabled; - modulesspeedui.title("§4Speedメニュー§4"); - modulesspeedui.toggle("スピード - 選手のスピードハッキングをチェックする:", speedABoolean); + modulesspeedui.title("§4Paradox Modules - Speed§4"); + modulesspeedui.toggle("Speed - Checks for player's speed hacking:", speedABoolean); modulesspeedui .show(player) .then((invalidsprintResult) => { uiSPEED(invalidsprintResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/modulesui.ts b/src/gui/guiHandler/guiHandlerModules/modulesui.ts index c581507..925182d 100644 --- a/src/gui/guiHandler/guiHandlerModules/modulesui.ts +++ b/src/gui/guiHandler/guiHandlerModules/modulesui.ts @@ -29,32 +29,32 @@ import { paradoxui } from "../../paradoxui"; export function modulesui(player: Player) { //Modules ui const modulesui = new ActionFormData(); - modulesui.title("§4アンチチート設定§4"); - modulesui.button("禁止するゲームモード", "textures/items/totem"); - modulesui.button("移動系", "textures/ui/move"); - modulesui.button("KillAura検知", "textures/items/diamond_sword"); - modulesui.button("Nukerを対策", "textures/blocks/tnt_side"); - modulesui.button("シュルカーを禁止", "textures/blocks/shulker_top_purple"); - modulesui.button("スパム", "textures/ui/mute_off"); - modulesui.button("AutoCliker検知", "textures/ui/cursor_gamecore"); - modulesui.button("Badpackets検知", "textures/ui/upload_glyph"); - modulesui.button("Bedrock Validationを設定", "textures/blocks/bedrock"); - modulesui.button("エンチャントアーマーを無効化", "textures/items/diamond_leggings"); - modulesui.button("禁止アイテムを検知", "textures/items/netherite_pickaxe"); - modulesui.button("サーバー最適化", "textures/ui/interact"); - modulesui.button("Name spoofingを検知", "textures/items/fishing_rod_uncast"); - modulesui.button("一人寝たら朝になるよ!", "textures/items/bed_red"); - modulesui.button("ワールドでのコマブロを禁止", "textures/blocks/command_block"); - modulesui.button("リーチを確認", "textures/ui/crossout"); - modulesui.button("Salvage System【よくわからん】", "textures/blocks/smithing_table_front"); - modulesui.button("スパム設定", "textures/ui/mute_on"); - modulesui.button("ワールドボーダーを設定", "textures/blocks/barrier"); - modulesui.button("Xray誰がなんの鉱石手に入れたか分かる", "textures/blocks/diamond_ore"); - modulesui.button("ホットバーメッセージ", "textures/items/paper"); - modulesui.button("放置民キック", "textures/ui/keyboard_and_mouse_glyph_color"); - modulesui.button("壁抜け検知", "textures/blocks/end_portal"); - modulesui.button("座標を保護します", "textures/blocks/barrier"); - modulesui.button("戻る"); + modulesui.title("§4Paradox - Modules§4"); + modulesui.button("Configure Anti Gamemodes", "textures/items/totem"); + modulesui.button("Configure Movement Modules", "textures/ui/move"); + modulesui.button("Configure Anti KillAura", "textures/items/diamond_sword"); + modulesui.button("Configure Anti Nuker", "textures/blocks/tnt_side"); + modulesui.button("Configure Anti Shulker", "textures/blocks/shulker_top_purple"); + modulesui.button("Configure Anti Spam", "textures/ui/mute_off"); + modulesui.button("Configure Anti AutoClicker", "textures/ui/cursor_gamecore"); + modulesui.button("Configure Badpackets", "textures/ui/upload_glyph"); + modulesui.button("Configure Bedrock Validation", "textures/blocks/bedrock"); + modulesui.button("Configure Enchanted Armor", "textures/items/diamond_leggings"); + modulesui.button("Configure Illegal Items", "textures/items/netherite_pickaxe"); + modulesui.button("Configure Lag Clearing", "textures/ui/interact"); + modulesui.button("Configure Name spoofing", "textures/items/fishing_rod_uncast"); + modulesui.button("Configure One Player Sleep(OPS)", "textures/items/bed_red"); + modulesui.button("Configure Command Blocks", "textures/blocks/command_block"); + modulesui.button("Configure Anti Reach", "textures/ui/crossout"); + modulesui.button("Configure Salvage System", "textures/blocks/smithing_table_front"); + modulesui.button("Configure Spam Modules", "textures/ui/mute_on"); + modulesui.button("Configure World Borders", "textures/blocks/barrier"); + modulesui.button("Configure Xray", "textures/blocks/diamond_ore"); + modulesui.button("Configure Hotbar", "textures/items/paper"); + modulesui.button("Configure AFK", "textures/ui/keyboard_and_mouse_glyph_color"); + modulesui.button("Configure Anti Phase", "textures/blocks/end_portal"); + modulesui.button("Configure Spawn Protection", "textures/blocks/barrier"); + modulesui.button("Back"); modulesui .show(player) .then((ModulesUIResult) => { diff --git a/src/gui/guiHandler/guiHandlerModules/results/afk.ts b/src/gui/guiHandler/guiHandlerModules/results/afk.ts index 226b487..240ef95 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/afk.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/afk.ts @@ -9,21 +9,21 @@ export function afkHandler(player: Player) { const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const currentAFKConifg = configuration.modules.afk.minutes; const afkBoolean = configuration.modules.afk.enabled; - modulesafkui.title("§4AFKメニュー§4"); - modulesafkui.toggle("AFKをBooleanにする - AFKしているプレーヤーをキックする。" + currentAFKConifg + "分:", afkBoolean); + modulesafkui.title("§4Paradox Modules - AFK§4"); + modulesafkui.toggle("Enable AFK - Kicks players that are AFK for " + currentAFKConifg + " minutes:", afkBoolean); modulesafkui .show(player) .then((afkResult) => { uiAFK(afkResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/antiautoclicker.ts b/src/gui/guiHandler/guiHandlerModules/results/antiautoclicker.ts index 928033d..bf6f13b 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/antiautoclicker.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/antiautoclicker.ts @@ -8,21 +8,21 @@ export function antiAutoClickerHandler(player: Player) { const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const autoClickerBoolean = configuration.modules.autoclicker.enabled; const modulesantiautoclickerui = new ModalFormData(); - modulesantiautoclickerui.title("§4Anti AutoClickerメニュー§4"); - modulesantiautoclickerui.toggle("アンチオートクリッカー - 攻撃中にオートクリッカーを使っているプレイヤーをチェックする:", autoClickerBoolean); + modulesantiautoclickerui.title("§4Paradox Modules - Anti AutoClicker§4"); + modulesantiautoclickerui.toggle("Anti AutoClicker - Checks for players using autoclickers while attacking:", autoClickerBoolean); modulesantiautoclickerui .show(player) .then((antiautoclickerResult) => { uiANTIAUTOCLICKER(antiautoclickerResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/antikillaura.ts b/src/gui/guiHandler/guiHandlerModules/results/antikillaura.ts index e9dd65b..b854048 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/antikillaura.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/antikillaura.ts @@ -8,21 +8,21 @@ export function antiKillAuraHandler(player: Player) { const modulesantikillaura = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const antiKillAuraBoolean = configuration.modules.antiKillAura.enabled; - modulesantikillaura.title("§4Anti KillAuraメニュー§4"); - modulesantikillaura.toggle("Anti KillAura - 90度の角度以外からの攻撃をチェックするかどうかを切り替えます:", antiKillAuraBoolean); + modulesantikillaura.title("§4Paradox Modules - Anti KillAura§4"); + modulesantikillaura.toggle("Anti KillAura - Toggles checks for attacks outside a 90 degree angle:", antiKillAuraBoolean); modulesantikillaura .show(player) .then((antikillauraResult) => { uiANTIKILLAURA(antikillauraResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/antinuker.ts b/src/gui/guiHandler/guiHandlerModules/results/antinuker.ts index 7bba405..877e6a2 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/antinuker.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/antinuker.ts @@ -8,21 +8,21 @@ export function antiNukerAHandler(player: Player) { const modulesantinukerui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const antiNukerABoolean = configuration.modules.antinukerA.enabled; - modulesantinukerui.title("§4Anti Nukerメニュー§4"); - modulesantinukerui.toggle("Anti Nuker - プレイヤーにブロックの核攻撃がないかチェックする:", antiNukerABoolean); + modulesantinukerui.title("§4Paradox Modules - Anti Nuker§4"); + modulesantinukerui.toggle("Anti Nuker - Checks player's for nuking blocks:", antiNukerABoolean); modulesantinukerui .show(player) .then((antinukerResult) => { uiANTINUKER(antinukerResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/antiphase.ts b/src/gui/guiHandler/guiHandlerModules/results/antiphase.ts index 763e637..59914da 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/antiphase.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/antiphase.ts @@ -8,21 +8,21 @@ export function antiPhaseAHandler(player: Player) { const modulesantiphaseui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const antiPhaseBoolean = configuration.modules.antiphaseA.enabled; - modulesantiphaseui.title("§4 Anti Phaseメニュー§4"); - modulesantiphaseui.toggle("アンチフェイズ - プレイヤーのフェイズブロックをチェックする:", antiPhaseBoolean); + modulesantiphaseui.title("§4Paradox Modules - Anti Phase§4"); + modulesantiphaseui.toggle("Anti Phase - Checks player's for phasing blocks:", antiPhaseBoolean); modulesantiphaseui .show(player) .then((antiphaseResult) => { uiANTIPHASE(antiphaseResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/antishulker.ts b/src/gui/guiHandler/guiHandlerModules/results/antishulker.ts index d73eca9..08eca35 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/antishulker.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/antishulker.ts @@ -8,21 +8,21 @@ export function antiShulkerHandler(player: Player) { const modulesantishulkerui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const antiShulkerBoolean = configuration.modules.antishulker.enabled; - modulesantishulkerui.title("§4 Anti Shulkerメニュー§4"); - modulesantishulkerui.toggle("Anti Shulker - 世界中のシュルカーボックスを許可または拒否します:", antiShulkerBoolean); + modulesantishulkerui.title("§4Paradox Modules - Anti Shulker§4"); + modulesantishulkerui.toggle("Anti Shulker - Allows or denies shulker boxes in the world:", antiShulkerBoolean); modulesantishulkerui .show(player) .then((antishulkerResult) => { uiANTISHULKER(antishulkerResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/antispam.ts b/src/gui/guiHandler/guiHandlerModules/results/antispam.ts index c9ea6b4..f38b847 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/antispam.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/antispam.ts @@ -8,21 +8,21 @@ export function antiSpamHandler(player: Player) { const modulesantispamui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const antiSpamBoolean = configuration.modules.antispam.enabled; - modulesantispamui.title("§4 Anti Spamメニュー§4"); - modulesantispamui.toggle("アンチスパム - 2秒のクールダウンでチャットのスパムをチェックする:", antiSpamBoolean); + modulesantispamui.title("§4Paradox Modules - Anti Spam§4"); + modulesantispamui.toggle("Anti Spam - Checks for spamming in chat with 2 second cooldown:", antiSpamBoolean); modulesantispamui .show(player) .then((antispamResult) => { uiANTISPAM(antispamResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/badpackets.ts b/src/gui/guiHandler/guiHandlerModules/results/badpackets.ts index ec6be6e..e9874d0 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/badpackets.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/badpackets.ts @@ -9,22 +9,22 @@ export function badPacketsHandler(player: Player) { const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const badPackets1Boolean = configuration.modules.badpackets1.enabled; const badPackets2Boolean = configuration.modules.badpackets2.enabled; - modulesbadpacketsui.title("§4Badpacketsメニュー§4"); - modulesbadpacketsui.toggle("Badpackets1 - ブロードキャストごとにメッセージの長さをチェックする:", badPackets1Boolean); - modulesbadpacketsui.toggle("Badpackets2 - 選手が選択したスロットが無効かどうかをチェックする:", badPackets2Boolean); + modulesbadpacketsui.title("§4Paradox Modules - Badpackets§4"); + modulesbadpacketsui.toggle("Badpackets1 - Checks for message lengths with each broadcast:", badPackets1Boolean); + modulesbadpacketsui.toggle("Badpackets2 - Checks for invalid selected slots by player:", badPackets2Boolean); modulesbadpacketsui .show(player) .then((badpacketsResult) => { uiBADPACKETS(badpacketsResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/bedrockvalidation.ts b/src/gui/guiHandler/guiHandlerModules/results/bedrockvalidation.ts index 725fbef..b77f980 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/bedrockvalidation.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/bedrockvalidation.ts @@ -8,21 +8,21 @@ export function bedrockValidationHandler(player: Player) { const modulesbedrockvalidateui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const bedrockValidateBoolean = configuration.modules.bedrockValidate.enabled; - modulesbedrockvalidateui.title("§4Bedrock Validationメニュー§4"); - modulesbedrockvalidateui.toggle("Bedrock Validate - ベッドロックのバリデーションをチェックする:", bedrockValidateBoolean); + modulesbedrockvalidateui.title("§4Paradox Modules - Bedrock Validation§4"); + modulesbedrockvalidateui.toggle("Bedrock Validate - Checks for bedrock validations:", bedrockValidateBoolean); modulesbedrockvalidateui .show(player) .then((bedrockvalidationResult) => { uiBEDROCKVALIDATION(bedrockvalidationResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/commandblocks.ts b/src/gui/guiHandler/guiHandlerModules/results/commandblocks.ts index 6ee7633..bc4691e 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/commandblocks.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/commandblocks.ts @@ -22,22 +22,22 @@ export function commandBlocksHandler(player: Player) { if (commandblocksscore >= 1) { removecmdblocksBoolean = true; } - modulescommandblocksui.title("§4メニュー:Command Blocks§4"); - modulescommandblocksui.toggle("Override Command Blocks - commandblocksenabled gameruleを常にBooleanまたは無効にします:", cmdoBoolean); - modulescommandblocksui.toggle("アンチコマンドブロック(Anti Command Blocks) - Booleanにすると、すべてのコマンドブロックをクリアする:", removecmdblocksBoolean); + modulescommandblocksui.title("§4Paradox Modules - Command Blocks§4"); + modulescommandblocksui.toggle("Override Command Blocks - Forces the commandblocksenabled gamerule to be enabled or disabled at all times:", cmdoBoolean); + modulescommandblocksui.toggle("Anti Command Blocks - Clears all Command Blocks when enabled:", removecmdblocksBoolean); modulescommandblocksui .show(player) .then((commandblockResult) => { uiCOMMANDBLOCKS(commandblockResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/enchantedarmor.ts b/src/gui/guiHandler/guiHandlerModules/results/enchantedarmor.ts index 0d03621..9a83d33 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/enchantedarmor.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/enchantedarmor.ts @@ -17,21 +17,21 @@ export function antiEnchantedArmorHandler(player: Player) { if (encharmorscore >= 1) { enchantedarmorBoolean = true; } - modulesenchantedarmorui.title("§4Enchanted Armorメニュー§4"); - modulesenchantedarmorui.toggle("Enchanted Armor - 全プレイヤーのためのアンチエンチャントアーマー:", enchantedarmorBoolean); + modulesenchantedarmorui.title("§4Paradox Modules - Enchanted Armor§4"); + modulesenchantedarmorui.toggle("Enchanted Armor - Anti Enchanted Armor for all players:", enchantedarmorBoolean); modulesenchantedarmorui .show(player) .then((enchantedarmorResult) => { uiENCHANTEDARMOR(enchantedarmorResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/gamemodes.ts b/src/gui/guiHandler/guiHandlerModules/results/gamemodes.ts index 5fc3c79..549e2e3 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/gamemodes.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/gamemodes.ts @@ -5,29 +5,29 @@ import { uiGAMEMODES } from "../../../modules/uiGamemodes"; import ConfigInterface from "../../../../interfaces/Config"; export function gamemodesHandler(player: Player) { - //ゲームモードUI + //GameModes UI const gamemodesui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const adventureGMBoolean = configuration.modules.adventureGM.enabled; const creativeGMBoolean = configuration.modules.creativeGM.enabled; const survivalGMBoolean = configuration.modules.survivalGM.enabled; - gamemodesui.title("§4Gamemodeメニュー§4"); - gamemodesui.toggle("アドベンチャーを無効にする:", adventureGMBoolean); - gamemodesui.toggle("クリエイティブを無効にする:", creativeGMBoolean); - gamemodesui.toggle("サバイバルを無効にする:", survivalGMBoolean); + gamemodesui.title("§4Paradox - Configure Gamemodes§4"); + gamemodesui.toggle("Disable Adventure:", adventureGMBoolean); + gamemodesui.toggle("Disable Creative:", creativeGMBoolean); + gamemodesui.toggle("Disable Survival:", survivalGMBoolean); gamemodesui .show(player) .then((gamemodeResult) => { uiGAMEMODES(gamemodeResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/hotbar.ts b/src/gui/guiHandler/guiHandlerModules/results/hotbar.ts index 5868b35..724c5f3 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/hotbar.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/hotbar.ts @@ -9,23 +9,23 @@ export function hotbarHandler(player: Player) { const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const hotbarBoolean = configuration.modules.hotbar.enabled; const CurrentHotbarConfig = configuration.modules.hotbar.message; - moduleshotbarui.title("§4 Hotbarメニュー§4"); - moduleshotbarui.textField("ホットバーのメッセージ", "", CurrentHotbarConfig); - moduleshotbarui.toggle("Enable Hotbar - ホットバーメッセージを表示します:", hotbarBoolean); - moduleshotbarui.toggle("config.jsに保存されているメッセージに戻す:", false); + moduleshotbarui.title("§4Paradox Modules - Hotbar§4"); + moduleshotbarui.textField("Hotbar Message: ", "", CurrentHotbarConfig); + moduleshotbarui.toggle("Enable Hotbar - Displays a hotbar message for all player's currently online:", hotbarBoolean); + moduleshotbarui.toggle("Restore to message stored in config.js:", false); moduleshotbarui .show(player) .then((hotbarResult) => { uiHOTBAR(hotbarResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/illegalitems.ts b/src/gui/guiHandler/guiHandlerModules/results/illegalitems.ts index 2324324..7577bdc 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/illegalitems.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/illegalitems.ts @@ -5,7 +5,7 @@ import { uiILLEGALITEMS } from "../../../modules/uiIllegaItems"; import ConfigInterface from "../../../../interfaces/Config"; export function illegalItemsHandler(player: Player) { - //違法な項目 これはいくつかのモジュールをカバーするので、1つのUIにまとめます。 + //Illegal items this will cover a few modules so will group these into one UI. const modulesillegalitemsui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const illegalItemsABoolean = configuration.modules.illegalitemsA.enabled; @@ -14,26 +14,26 @@ export function illegalItemsHandler(player: Player) { const illegalEnchantmentBoolean = configuration.modules.illegalEnchantment.enabled; const illegalLoresBoolean = configuration.modules.illegalLores.enabled; const stackBanBoolean = configuration.modules.stackBan.enabled; - modulesillegalitemsui.title("§4Illegal Itemsメニュー§4"); - modulesillegalitemsui.toggle("不正アイテムA - 不正なアイテムをインベントリに入れているプレイヤーをチェックする:", illegalItemsABoolean); - modulesillegalitemsui.toggle("不正アイテムB - 不正なアイテムを置いたプレーヤーをチェックする:", illegalItemsBBoolean); - modulesillegalitemsui.toggle("Illegal Items C - 不正な落下物がないかチェックする:", illegalItemsCBoolean); - modulesillegalitemsui.toggle("違法エンチャント - 違法なエンチャントが施されたアイテムをチェックする:", illegalEnchantmentBoolean); - modulesillegalitemsui.toggle("不正な伝承 - アイテムに不正な伝承がないかチェックします:", illegalLoresBoolean); - modulesillegalitemsui.toggle("スタック禁止 - 不正なスタックを持つプレイヤーをチェックする:", stackBanBoolean); + modulesillegalitemsui.title("§4Paradox Modules - Illegal Items§4"); + modulesillegalitemsui.toggle("Illegal Items A - Checks for player's that have illegal items in inventory:", illegalItemsABoolean); + modulesillegalitemsui.toggle("Illegal Items B - Checks for player's that place illegal items:", illegalItemsBBoolean); + modulesillegalitemsui.toggle("Illegal Items C - Checks for illegal dropped items:", illegalItemsCBoolean); + modulesillegalitemsui.toggle("Illegal Enchants - Checks for items with illegal enchantments:", illegalEnchantmentBoolean); + modulesillegalitemsui.toggle("Illegal Lores - Checks for illegal Lores on items:", illegalLoresBoolean); + modulesillegalitemsui.toggle("Stack Ban - Checks for player's with illegal stacks:", stackBanBoolean); modulesillegalitemsui .show(player) .then((illegalitemsResult) => { uiILLEGALITEMS(illegalitemsResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/lagclear.ts b/src/gui/guiHandler/guiHandlerModules/results/lagclear.ts index 18aaff9..35b600a 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/lagclear.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/lagclear.ts @@ -5,25 +5,25 @@ import { uiLAGCLEAR } from "../../../modules/uiLagClear"; import ConfigInterface from "../../../../interfaces/Config"; export function lagClearHandler(player: Player) { - //ラグクリア + //Lagclear const moduleslaglearui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const clearLagBoolean = configuration.modules.clearLag.enabled; - moduleslaglearui.title("§4 Clear Lagメニュー§4"); - moduleslaglearui.toggle("Clear Lag - タイマーでアイテムやエンティティをクリアする:", clearLagBoolean); + moduleslaglearui.title("§4Paradox Modules - Clear Lag§4"); + moduleslaglearui.toggle("Clear Lag - Clears items and entities with timer:", clearLagBoolean); moduleslaglearui .show(player) .then((lagclearResult) => { uiLAGCLEAR(lagclearResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/namespoofing.ts b/src/gui/guiHandler/guiHandlerModules/results/namespoofing.ts index cfbd7fd..08711de 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/namespoofing.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/namespoofing.ts @@ -5,27 +5,27 @@ import { uiNAMESPOOFING } from "../../../modules/uiNameSpoofing"; import ConfigInterface from "../../../../interfaces/Config"; export function nameSpoofHandler(player: Player) { - //名前偽装 + //Namespoofing const modulesnamespoofingui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const nameSpoofABoolean = configuration.modules.namespoofA.enabled; const nameSpoofBBoolean = configuration.modules.namespoofB.enabled; - modulesnamespoofingui.title("§4Name spoofingメニュー§4"); - modulesnamespoofingui.toggle("名前なりすましA - 選手の名前が文字数制限を超えていないかチェックする:", nameSpoofABoolean); - modulesnamespoofingui.toggle("名前なりすましB - ASCII以外の文字を含む選手名をチェックする:", nameSpoofBBoolean); + modulesnamespoofingui.title("§4Paradox Modules - Name spoofing§4"); + modulesnamespoofingui.toggle("Name Spoofing A - Checks for player's name exceeding character limitations:", nameSpoofABoolean); + modulesnamespoofingui.toggle("Name Spoofing B - Checks for player's name that has Non ASCII characters:", nameSpoofBBoolean); modulesnamespoofingui .show(player) .then((namespoofingResult) => { uiNAMESPOOFING(namespoofingResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/oneplayersleep.ts b/src/gui/guiHandler/guiHandlerModules/results/oneplayersleep.ts index 35e0eda..171b8b7 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/oneplayersleep.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/oneplayersleep.ts @@ -8,21 +8,21 @@ export function opsHandler(player: Player) { const modulesopsui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const opsBoolean = configuration.modules.ops.enabled; - modulesopsui.title("§4 OPSメニュー§4"); - modulesopsui.toggle("One Player Sleep - プレイヤー1人が一晩中眠れる:", opsBoolean); + modulesopsui.title("§4Paradox Modules - OPS§4"); + modulesopsui.toggle("One Player Sleep - Allows 1 player to sleep through the night:", opsBoolean); modulesopsui .show(player) .then((opsResult) => { uiOPS(opsResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/reach.ts b/src/gui/guiHandler/guiHandlerModules/results/reach.ts index ec1d993..7fb7bdc 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/reach.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/reach.ts @@ -9,22 +9,22 @@ export function reachHandler(player: Player) { const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const reachABoolean = configuration.modules.reachA.enabled; const reachBBoolean = configuration.modules.reachB.enabled; - modulesreachui.title("§4Reachメニュー§4"); - modulesreachui.toggle("リーチA - プレーヤーが手の届かないところにブロックを置いていないかチェックする:", reachABoolean); - modulesreachui.toggle("リーチC - リーチを超えて攻撃している選手がいないかチェックする:", reachBBoolean); + modulesreachui.title("§4Paradox Modules - Reach§4"); + modulesreachui.toggle("Reach A - Checks for player's placing blocks beyond reach:", reachABoolean); + modulesreachui.toggle("Reach C - Checks for player's attacking beyond reach:", reachBBoolean); modulesreachui .show(player) .then((reachResult) => { uiREACH(reachResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/salvage.ts b/src/gui/guiHandler/guiHandlerModules/results/salvage.ts index b78462e..84a4496 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/salvage.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/salvage.ts @@ -5,25 +5,25 @@ import { uiEXPSALVAGESYSTEM } from "../../../modules/uiExpSalvageSystem"; import ConfigInterface from "../../../../interfaces/Config"; export function salvageHandler(player: Player) { - //新スラベージ・システム + //New Slavage System const modulesexpsavlagesystem = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; const salvageBoolean = configuration.modules.salvage.enabled; - modulesexpsavlagesystem.title("§4Salvage Systemメニュー§4"); - modulesexpsavlagesystem.toggle("サルベージシステム - すべてのアイテムをサルベージする:", salvageBoolean); + modulesexpsavlagesystem.title("§4Paradox Modules - Salvage System§4"); + modulesexpsavlagesystem.toggle("Salvage System - Salvage all item's:", salvageBoolean); modulesexpsavlagesystem .show(player) .then((salvagesystemResult) => { uiEXPSALVAGESYSTEM(salvagesystemResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/spammers.ts b/src/gui/guiHandler/guiHandlerModules/results/spammers.ts index 2a6eabe..50b94da 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/spammers.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/spammers.ts @@ -10,23 +10,23 @@ export function spammersHandler(player: Player) { const spammerABoolean = configuration.modules.spammerA.enabled; const spammerBBoolean = configuration.modules.spammerB.enabled; const spammerCBoolean = configuration.modules.spammerC.enabled; - modulesspamui.title("§4Spam Modulesメニュー§4"); - modulesspamui.toggle("Spammer A - 移動中に送信されたメッセージをチェックする:", spammerABoolean); - modulesspamui.toggle("Spammer B - スイング中に送信されたメッセージをチェックする:", spammerBBoolean); - modulesspamui.toggle("Spammer C - アイテム使用中に送信されたメッセージをチェックする:", spammerCBoolean); + modulesspamui.title("§4Paradox Modules - Spam Modules§4"); + modulesspamui.toggle("Spammer A - Checks for messages sent while moving:", spammerABoolean); + modulesspamui.toggle("Spammer B - Checks for messages sent while swinging:", spammerBBoolean); + modulesspamui.toggle("Spammer C - Checks for messages sent while using items:", spammerCBoolean); modulesspamui .show(player) .then((spamResult) => { uiSPAMMER(spamResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/spawnProtection.ts b/src/gui/guiHandler/guiHandlerModules/results/spawnProtection.ts index 4db6d38..f5163cc 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/spawnProtection.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/spawnProtection.ts @@ -7,28 +7,28 @@ import ConfigInterface from "../../../../interfaces/Config"; export function spawnProtectionHandler(player: Player) { const modulesspui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - const spawnprotectionBoolean = configuration.modules.spawnprotection.enabled; + const spawnProtectionBoolean = configuration.modules.spawnprotection.enabled; const spawnProtectionVector3 = configuration.modules.spawnprotection.vector3; const spawnProtectionRadius = configuration.modules.spawnprotection.radius; - modulesspui.title("§4Spawn Protectionメニュー§4"); - modulesspui.toggle("スポーンプロテクションをBooleanにする", spawnprotectionBoolean); - modulesspui.textField("X座標", "0", spawnProtectionVector3.x.toString()); - modulesspui.textField("Y座標", "0", spawnProtectionVector3.y.toString()); - modulesspui.textField("Z座標", "0", spawnProtectionVector3.z.toString()); - modulesspui.textField("半径", "90", spawnProtectionRadius.toString()); + modulesspui.title("§4Paradox Modules - Spawn Protection§4"); + modulesspui.toggle("Enable Spawn Protection - ", spawnProtectionBoolean); + modulesspui.textField("X Coordinate", "0", spawnProtectionVector3.x.toString()); + modulesspui.textField("Y Coordinate", "0", spawnProtectionVector3.y.toString()); + modulesspui.textField("Z Coordinate", "0", spawnProtectionVector3.z.toString()); + modulesspui.textField("Radius", "90", spawnProtectionRadius.toString()); modulesspui .show(player) .then((spawnProtectionResult) => { uiSpawnProtection(spawnProtectionResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/worldborder.ts b/src/gui/guiHandler/guiHandlerModules/results/worldborder.ts index 523d9a4..0fb91f0 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/worldborder.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/worldborder.ts @@ -11,24 +11,24 @@ export function worldBorderHandler(player: Player) { const overworldBorderNumber = configuration.modules.worldBorder.overworld; const netherworldBorderNumber = configuration.modules.worldBorder.nether; const endworldBorderNumber = configuration.modules.worldBorder.end; - modulesworldborderui.title("§4World Borderメニュー§4"); - modulesworldborderui.textField("オーバー・ワールド・ボーダー - ブロック単位の価値:", "1000", String(overworldBorderNumber)); - modulesworldborderui.textField("ネザー・ワールド・ボーダー - ブロック内の値。無効にする必要がある場合は0に設定する:", "0", String(netherworldBorderNumber)); - modulesworldborderui.textField("End World Border - ブロック単位の値。無効にする必要がある場合は0を設定する:", "0", String(endworldBorderNumber)); - modulesworldborderui.toggle("ワールドボーダーをBooleanにする", overWorldBorderBoolean); + modulesworldborderui.title("§4Paradox Modules - World Border§4"); + modulesworldborderui.textField("Over World Border - Value in blocks:", "1000", String(overworldBorderNumber)); + modulesworldborderui.textField("Nether World Border - Values in blocks. Set to 0 if it needs to be disabled:", "0", String(netherworldBorderNumber)); + modulesworldborderui.textField("End World Border - Values in blocks. Set to 0 if it needs to be disabled:", "0", String(endworldBorderNumber)); + modulesworldborderui.toggle("Enable World Border:", overWorldBorderBoolean); modulesworldborderui .show(player) .then((spamResult) => { uiWORLDBORDER(spamResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/guiHandlerModules/results/xray.ts b/src/gui/guiHandler/guiHandlerModules/results/xray.ts index b3a33b6..2270c80 100644 --- a/src/gui/guiHandler/guiHandlerModules/results/xray.ts +++ b/src/gui/guiHandler/guiHandlerModules/results/xray.ts @@ -7,22 +7,22 @@ import ConfigInterface from "../../../../interfaces/Config"; export function xrayHandler(player: Player) { const modulesxtrayui = new ModalFormData(); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - modulesxtrayui.title("§4Xrayメニュー§4"); + modulesxtrayui.title("§4Paradox Modules - Xray§4"); const xrayBoolean = configuration.modules.xrayA.enabled; - modulesxtrayui.toggle("Xray - プレーヤーが特定の鉱石を採掘した時と場所をスタッフに通知する:", xrayBoolean); + modulesxtrayui.toggle("Xray - Notify's staff when and where player's mine specific ores:", xrayBoolean); modulesxtrayui .show(player) .then((xrayResult) => { uiXRAY(xrayResult, player); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/guiHandler/results/chatChannelsMenu.ts b/src/gui/guiHandler/results/chatChannelsMenu.ts index 251683e..4ad85aa 100644 --- a/src/gui/guiHandler/results/chatChannelsMenu.ts +++ b/src/gui/guiHandler/results/chatChannelsMenu.ts @@ -7,12 +7,12 @@ import { chatChannelsLeaveMenuUI } from "../../playerui/chatChannels/uiChatChann import { ChatChannelsDeleteMenuUI } from "../../playerui/chatChannels/uiChatChannelsDeleteMenu"; export function chatChannelMainMenu(player: Player) { const menu = new ActionFormData(); - menu.title("§4チャンネルメニュー!§4"); - menu.button("チャンネルを作る"); - menu.button("チャンネルに参加!"); - menu.button("プレイヤーを招待"); - menu.button("チャンネルから抜ける"); - menu.button("チャンネルを削除"); + menu.title("§4Paradox - Chat Channels Menu§4"); + menu.button("Create A Channel"); + menu.button("Join A Channel"); + menu.button("Invite A Player"); + menu.button("Leave A Channel"); + menu.button("Delete A Channel"); menu.show(player) .then((chatChannelsMenuUIResult) => { switch (chatChannelsMenuUIResult.selection) { diff --git a/src/gui/guiHandler/results/deop.ts b/src/gui/guiHandler/results/deop.ts index 4ded6e8..da89e63 100644 --- a/src/gui/guiHandler/results/deop.ts +++ b/src/gui/guiHandler/results/deop.ts @@ -6,9 +6,9 @@ export function deopHandler(player: Player) { // New window for deop const deopgui = new ModalFormData(); let onlineList: string[] = []; - deopgui.title("§4管理者権限剝奪§4"); + deopgui.title("§4DEOP§4"); onlineList = Array.from(world.getPlayers(), (player) => player.name); - deopgui.dropdown(`\n§fユーザーを選択:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + deopgui.dropdown(`\n§fSelect a player to remove access to Paradox:§f\n\nPlayer's Online\n`, onlineList); deopgui .show(player) .then((opResult) => { diff --git a/src/gui/guiHandler/results/location.ts b/src/gui/guiHandler/results/location.ts index 581e488..d5eb072 100644 --- a/src/gui/guiHandler/results/location.ts +++ b/src/gui/guiHandler/results/location.ts @@ -44,13 +44,13 @@ export function locationHandler(player: Player) { So if there is no data we push a line to keep the array with at least 1 value. If there are saved locations then it will continue as normal. */ - Locations.push("保存されている座標はありません"); + Locations.push("You have no saved Locations"); } - savedlocationsui.title("§4座標保存§4"); - savedlocationsui.dropdown(`\n§r座標を選択してください新しく座標を作る際日本語では無く英語またはローマ字で保存してください例:home,ie,kouenn,niwa,等§r\n\n以下の座標が保存されています\n`, Locations); - savedlocationsui.toggle("選択した座標にTP【使う時オン】", false); - savedlocationsui.toggle("選択した座標を削除します【消すときだけオンにしてね】", false); - savedlocationsui.textField("ここの下に名前を入れると今いる座標が保存されます【例:home】", ""); + savedlocationsui.title("§4Paradox - Saved Locations§4"); + savedlocationsui.dropdown(`\n§fSelect a Location:§f\n\nSaved Location's\n`, Locations); + savedlocationsui.toggle("Teleport to the selected location:", false); + savedlocationsui.toggle("Deletes the selected Location:", false); + savedlocationsui.textField("Enter a name to save your current Location:", ""); if (configuration.customcommands.sethome === true && configuration.customcommands.delhome === true && configuration.customcommands.listhome === true && configuration.customcommands.gohome === true) { savedlocationsui .show(player) @@ -69,7 +69,7 @@ export function locationHandler(player: Player) { } }); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f セーブした座標が削除されました!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Saved Locations have been disabled by the Admins.`); return; } } diff --git a/src/gui/guiHandler/results/op.ts b/src/gui/guiHandler/results/op.ts index 0e961bc..95c44d6 100644 --- a/src/gui/guiHandler/results/op.ts +++ b/src/gui/guiHandler/results/op.ts @@ -11,20 +11,20 @@ export function opHandler(player: Player, uniqueId: string, salt: string, hash: const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (uniqueId === player.name) { opgui = new ModalFormData(); - opgui.title("§4管理者§4"); + opgui.title("§4OP§4"); onlineList = Array.from(world.getPlayers(), (player) => player.name); - opgui.dropdown(`\n§fユーザーを指定:§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + opgui.dropdown(`\n§fSelect a player to give access to Paradox:§f\n\nPlayer's Online\n`, onlineList); } else if (!configuration.encryption.password) { opgui = new ActionFormData(); - opgui.title("§4管理者§4"); + opgui.title("§4OP§4"); - opgui.button("OP権限取得", "textures/ui/op"); + opgui.button("Grant OP Access", "textures/ui/op"); } else if (configuration.encryption.password) { opgui = new ModalFormData(); - opgui.title("§4レルムズ用管理者§4"); + opgui.title("§4OP§4"); - opgui.textField("パスワード:", ""); + opgui.textField("Enter Password:", ""); } opgui .show(player) diff --git a/src/gui/guiHandler/results/prefix.ts b/src/gui/guiHandler/results/prefix.ts index 57fef22..41334a0 100644 --- a/src/gui/guiHandler/results/prefix.ts +++ b/src/gui/guiHandler/results/prefix.ts @@ -7,10 +7,10 @@ export function prefixHandler(player: Player) { const prefixui = new ModalFormData(); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - prefixui.title("§4起動文字変更§4"); - prefixui.dropdown(`\n変えたい文字指定:\n\n以下のプレイヤーがオンラインです\n`, onlineList); - prefixui.textField(`\n文字:\n`, `新しい起動文字`, null); - prefixui.toggle(`\nリセット:`, false); + prefixui.title("§4Paradox - Change command prefix§4"); + prefixui.dropdown(`\nChanges prefix used for commands:\n\nPlayer's Online\n`, onlineList); + prefixui.textField(`\nPrefix:\n`, `Put new prefix here`, null); + prefixui.toggle(`\nReset Prefix:`, false); prefixui .show(player) .then((prefixResult) => { diff --git a/src/gui/guiHandler/results/report.ts b/src/gui/guiHandler/results/report.ts index 137cb01..bbd4f7b 100644 --- a/src/gui/guiHandler/results/report.ts +++ b/src/gui/guiHandler/results/report.ts @@ -5,14 +5,11 @@ import { UIREPORTPLAYER } from "../../playerui/uiReport"; export function reportHandler(player: Player) { //Non Opped player Report UI const reportplayerui = new ModalFormData(); - reportplayerui.title("§4報告§4"); + reportplayerui.title("§4Paradox - Report A Player§4"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - reportplayerui.dropdown( - `\n§r報告したいプレイヤーがを選択してください!バグなどは【FairImpala41312】がオンラインだと思うのでその人に送ってね!荒らしやチーターはその荒らしのユーザーをオンラインの中から指定してこの人荒らしなどの理由で報告してね具体的だと運営としてはうれしい§r\n\n以下のプレイヤーがオンラインです\n`, - onlineList - ); - reportplayerui.textField("報告したい内容を入れてください", ""); + reportplayerui.dropdown(`\n§fSelect a player from the list, your report will then be sent to staff members:§f\n\nPlayer's Online\n`, onlineList); + reportplayerui.textField("Please provide a reason as to why you are reporting this player:", ""); reportplayerui .show(player) .then((reportResult) => { diff --git a/src/gui/guiHandler/results/stats.ts b/src/gui/guiHandler/results/stats.ts index 68f4d57..633c3b2 100644 --- a/src/gui/guiHandler/results/stats.ts +++ b/src/gui/guiHandler/results/stats.ts @@ -7,8 +7,8 @@ export function statsHandler(player: Player) { const statsui = new ModalFormData(); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - statsui.title("§4ユーザーログ§4"); - statsui.dropdown(`\n§fユーザーを指定§f\n\n以下のプレイヤーがオンラインです\n`, onlineList); + statsui.title("§4Paradox - Player Stats§4"); + statsui.dropdown(`\n§fSelect a Location:§f\n\nSaved Location's\n`, onlineList); statsui .show(player) .then((statsResult) => { diff --git a/src/gui/guiHandler/results/tpr.ts b/src/gui/guiHandler/results/tpr.ts index 08fb9b7..7688e9f 100644 --- a/src/gui/guiHandler/results/tpr.ts +++ b/src/gui/guiHandler/results/tpr.ts @@ -9,9 +9,9 @@ export function tprHandler(player: Player) { const tprui = new ActionFormData(); //let onlineList: string[] = []; // onlineList = Array.from(world.getPlayers(), (player) => player.name); - tprui.title("§4TPリクエスト§4"); - tprui.button("私宛のリクエスト", "textures/ui/mail_icon"); - tprui.button("TPリクエストを送る", "textures/ui/send_icon"); + tprui.title("§4Paradox - TPR Menu§4"); + tprui.button("My Requests", "textures/ui/mail_icon"); + tprui.button("Send A Request", "textures/ui/send_icon"); tprui .show(player) .then((tprmenuResult) => { @@ -29,10 +29,10 @@ export function tprHandler(player: Player) { let respons: string; const toMinutes: Date = new Date(request.expiresAt); const tprinboxui = new MessageFormData(); - tprinboxui.title("私宛のリクエストを"); - tprinboxui.body(request.requester.name + " 下のボタンを使って、このリクエストを承認または拒否してください。 \n リクエスト一覧: " + toMinutes.getMinutes()); - tprinboxui.button1("TPを許可します"); - tprinboxui.button2("Tpを拒否します"); + tprinboxui.title("Paradox - Your TP Request."); + tprinboxui.body(request.requester.name + " Has sent you a request to be teleported to your location, use the buttons below to approve or decline this request. \n This request expires in: " + toMinutes.getMinutes()); + tprinboxui.button1("Yes"); + tprinboxui.button2("No"); tprinboxui .show(player) .then((tprInboxResult) => { @@ -64,8 +64,8 @@ export function tprHandler(player: Player) { const tprsendrequestxui = new ModalFormData(); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - tprsendrequestxui.title("§4TPリクエストを送る§4"); - tprsendrequestxui.dropdown(`\nTPリクエストを送りたいユーザーを指定\n\n以下のプレイヤーがオンラインです\n`, onlineList); + tprsendrequestxui.title("§4Paradox - Send TP Request§4"); + tprsendrequestxui.dropdown(`\nSelect a player to send a request:\n\nPlayer's Online\n`, onlineList); tprsendrequestxui .show(player) .then((tprSendRequestResult) => { diff --git a/src/gui/moderation/uiAutoBan.ts b/src/gui/moderation/uiAutoBan.ts index 59bcbb7..4d0701c 100644 --- a/src/gui/moderation/uiAutoBan.ts +++ b/src/gui/moderation/uiAutoBan.ts @@ -8,17 +8,17 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiAUTOBAN(autobanResult: ModalFormResponse, player: Player) { if (!autobanResult || autobanResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [autobanToggle] = autobanResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -26,17 +26,17 @@ export function uiAUTOBAN(autobanResult: ModalFormResponse, player: Player) { const autoBanBoolean = configuration.modules.autoBan.enabled; if (autobanToggle === true && autoBanBoolean === false) { - // 許可する + // Allow configuration.modules.autoBan.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6autoban§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6autoban§f!`); AutoBan(); } if (autobanToggle === false && autoBanBoolean === true) { - // 拒否する + // Deny configuration.modules.autoBan.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4autoban§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4autoban§f!`); } return paradoxui(player); diff --git a/src/gui/moderation/uiBan.ts b/src/gui/moderation/uiBan.ts index a1ec824..960a0eb 100644 --- a/src/gui/moderation/uiBan.ts +++ b/src/gui/moderation/uiBan.ts @@ -6,7 +6,7 @@ import { paradoxui } from "../paradoxui.js"; export function uiBAN(banResult: ModalFormResponse, onlineList: string[], player: Player) { if (!banResult || banResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value, textField] = banResult.formValues; @@ -18,21 +18,21 @@ export function uiBAN(banResult: ModalFormResponse, onlineList: string[], player break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fプレイヤーをBANするにはParadox・オッ プする必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to Ban a player.`); } - //プレーヤーが自分自身を追放しないようにする。 + //make sure the player doesnt ban themselfs if (member === player) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 自分自身を禁止することはできない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot ban yourself.`); } - // 理由が空白でないことを確認してください。 + // Make sure the reason is not blank. if (!textField) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 禁止の理由を含めなければならない!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You must include a reaason for the ban!.`); return paradoxui(player); } @@ -41,9 +41,9 @@ export function uiBAN(banResult: ModalFormResponse, onlineList: string[], player member.addTag("By:" + player.name); member.addTag("isBanned"); } catch (error) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f BANできませんでした Error: ${error}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f I was unable to ban that player! Error: ${error}`); return paradoxui(player); } - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f が §7${member.name}をBANしました§f. 理由: §7${textField}§f`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has banned §7${member.name}§f. Reason: §7${textField}§f`); return paradoxui(player); } diff --git a/src/gui/moderation/uiChatranks.ts b/src/gui/moderation/uiChatranks.ts index 45e86ee..8dc26e9 100644 --- a/src/gui/moderation/uiChatranks.ts +++ b/src/gui/moderation/uiChatranks.ts @@ -7,7 +7,7 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiCHATRANKS(notifyResult: ModalFormResponse, onlineList: string[], predefinedrank: string[], player: Player) { if (!notifyResult || notifyResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value, predefinedrankvalue, customrank, ChatRanksToggle] = notifyResult.formValues; @@ -20,12 +20,12 @@ export function uiCHATRANKS(notifyResult: ModalFormResponse, onlineList: string[ } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f通知をBooleanにするには、Paradox-Oppedにする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to enable Notifications.`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -45,11 +45,11 @@ export function uiCHATRANKS(notifyResult: ModalFormResponse, onlineList: string[ member.removeTag(custom); } } catch (error) { - //プレーヤーがタグを持っていない場合にスローされます。 - //sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 何かおかしい! エラー: ${error}`); + //This will throw if the player has no tags + //sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Something went wrong! Error: ${error}`); } member.addTag("Rank:" + predefinedrank[predefinedrankvalue as number]); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f が §7${member.name}のランクを更新しました§f `); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has updated §7${member.name}'s§f Rank.`); return paradoxui(player); } if (customrank) { @@ -65,22 +65,22 @@ export function uiCHATRANKS(notifyResult: ModalFormResponse, onlineList: string[ member.removeTag(custom); } } catch (error) { - // これは、プレーヤーにマッチするタグがない場合にスローされる。 - //sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 何かおかしい! エラー: ${error}`); + // This will throw if the player has no tags that match. + //sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Something went wrong! Error: ${error}`); } member.addTag("Rank:" + customrank); sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has updated §7${member.name}'s§f Rank.`); if (ChatRanksToggle === true && chatRanksBoolean === false) { - // 許可する + // Allow configuration.modules.chatranks.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6ChatRanks§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6ChatRanks§f!`); } if (ChatRanksToggle === false && chatRanksBoolean === true) { - // 拒否する + // Deny configuration.modules.chatranks.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4ChatRanks§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4ChatRanks§f!`); } return paradoxui(player); } diff --git a/src/gui/moderation/uiClearchat.ts b/src/gui/moderation/uiClearchat.ts index 9d38f69..17cb2ef 100644 --- a/src/gui/moderation/uiClearchat.ts +++ b/src/gui/moderation/uiClearchat.ts @@ -4,6 +4,6 @@ import { paradoxui } from "../paradoxui"; export function uiCLEARCHAT(player: Player) { for (let clear = 0; clear < 10; clear++) sendMsg("@a", "\n".repeat(60)); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}のチャットランクをリセットしました§f`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f Chat has been cleared by §7${player.name}§f`); return paradoxui(player); } diff --git a/src/gui/moderation/uiDeop.ts b/src/gui/moderation/uiDeop.ts index a8f6127..da5fda5 100644 --- a/src/gui/moderation/uiDeop.ts +++ b/src/gui/moderation/uiDeop.ts @@ -6,14 +6,14 @@ import { paradoxui } from "../paradoxui.js"; import { WorldExtended } from "../../classes/WorldExtended/World.js"; import ConfigInterface from "../../interfaces/Config.js"; -//Visual1インパクトが提供する機能 +//Function provided by Visual1mpact export function uiDEOP(opResult: ModalFormResponse, onlineList: string[], player: Player) { if (!opResult || opResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value] = opResult.formValues; - // 選手オブジェクトが必要 + // Need player object let member: Player = undefined; const players = world.getPlayers(); for (const pl of players) { @@ -22,16 +22,16 @@ export function uiDEOP(opResult: ModalFormResponse, onlineList: string[], player break; } } - // メンバーからのハッシュ/ソルトのチェックとパスワードの検証 + // Check for hash/salt and validate password from member const memberHash = member.getDynamicProperty("hash"); const memberSalt = member.getDynamicProperty("salt"); const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // オペレーターのIDまたは暗号化パスワードのいずれかをキーとして使用する。 + // Use either the operator's ID or the encryption password as the key const key = configuration.encryption.password ? configuration.encryption.password : member.id; - // ハッシュを生成する + // Generate the hash const memberEncode: string = (world as WorldExtended).hashWithSalt(memberSalt as string, key); if (memberEncode && memberHash !== undefined && memberHash === memberEncode) { @@ -40,11 +40,11 @@ export function uiDEOP(opResult: ModalFormResponse, onlineList: string[], player dynamicPropertyRegistry.deleteProperty(member, member.id); member.removeTag("paradoxOpped"); if (player.name !== member.name) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${member.name}§f Op権限が剝奪されました`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${member.name}§f is no longer Paradox-Opped.`); } - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§fあなたのOPステータスは取り消されました!`); + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f Your OP status has been revoked!`); return paradoxui(player); } - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §7${member.name}§f Op権限がなかった.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §7${member.name}§f did not have Op permissions.`); return paradoxui(player); } diff --git a/src/gui/moderation/uiDespawner.ts b/src/gui/moderation/uiDespawner.ts index 2858f08..67adbbd 100644 --- a/src/gui/moderation/uiDespawner.ts +++ b/src/gui/moderation/uiDespawner.ts @@ -14,7 +14,7 @@ import { paradoxui } from "../paradoxui.js"; export function uiDESPAWNER(despawnerResult: ModalFormResponse, player: Player) { handleUIDespawner(despawnerResult, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -27,43 +27,43 @@ export function uiDESPAWNER(despawnerResult: ModalFormResponse, player: Player) async function handleUIDespawner(despawnerResult: ModalFormResponse, player: Player) { if (!despawnerResult || despawnerResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [entityValue, DespawnAllToggle] = despawnerResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } - // エンティティを見つけるか、要求があればすべてをデスポーンしてみる。 + // try to find the entity or despawn them all if requested const filter: EntityQueryOptions = { excludeTypes: ["player"], }; const filteredEntities = world.getDimension("overworld").getEntities(filter); if (DespawnAllToggle === false) { - // 特定団体 + // Specified entity let counter = 0; let requestedEntity: string = ""; for (const entity of filteredEntities) { const filteredEntity = entity.typeId.replace("minecraft:", ""); requestedEntity = (entityValue as string).replace("minecraft:", ""); - // エンティティが指定された場合は、ここでそれを処理する。 + // If an entity was specified then handle it here if (filteredEntity === requestedEntity || filteredEntity === entityValue) { counter = ++counter; - // このエンティティをデスポーンする + // Despawn this entity entity.remove(); continue; - // すべてのエンティティが指定された場合、ここでこれを処理する。 + // If all entities were specified then handle this here } } if (counter > 0) { sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Despawned:\n\n §o§6|§f §4[§f${requestedEntity}§4]§f §6Amount: §4x${counter}§f`); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f デスポーンする実体が見つからない!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f No entity found to despawn!`); } } if (DespawnAllToggle === true) { @@ -82,7 +82,7 @@ async function handleUIDespawner(despawnerResult: ModalFormResponse, player: Pla } else { entityCount[filteredEntity]++; } - // このエンティティをデスポーンする + // Despawn this entity entity.remove(); } let totalCounter = 0; @@ -97,10 +97,10 @@ async function handleUIDespawner(despawnerResult: ModalFormResponse, player: Pla } } if (totalCounter > 0) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f デスポーンした:`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Despawned:`); sendMsgToPlayer(player, entityMessage); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f デスポーンする実体が見つからない!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f No entities found to despawn!`); } } return paradoxui; diff --git a/src/gui/moderation/uiEwipe.ts b/src/gui/moderation/uiEwipe.ts index d6e915d..77e44da 100644 --- a/src/gui/moderation/uiEwipe.ts +++ b/src/gui/moderation/uiEwipe.ts @@ -15,7 +15,7 @@ import { ModalFormResponse } from "@minecraft/server-ui"; export function uiEWIPE(ewipeResult: ModalFormResponse, onlineList: string[], player: Player) { handleUIEWipe(ewipeResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -28,7 +28,7 @@ export function uiEWIPE(ewipeResult: ModalFormResponse, onlineList: string[], pl async function handleUIEWipe(ewipeResult: ModalFormResponse, onlineList: string[], player: Player) { if (!ewipeResult || ewipeResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value] = ewipeResult.formValues; @@ -40,34 +40,34 @@ async function handleUIEWipe(ewipeResult: ModalFormResponse, onlineList: string[ break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); } - // 自分自身を罰することがないようにする + // Make sure they don't punish themselves if (member === player) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 自分自身を拭くことはできない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot wipe yourself.`); } - //スタッフに罰を与えないようにする! + //Make sure they don't punish staff! if (member.hasTag("paradoxOpped")) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f スタッフを消すことはできない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot wipe Staff.`); } - // 0から29までの30個のスロットがある。 - // エンダーの胸を一掃しよう + // There are 30 slots ranging from 0 to 29 + // Let's clear out that ender chest for (let slot = 0; slot < 30; slot++) { member.runCommand(`replaceitem entity @s slot.enderchest ${slot} air`); } - // 罰が行われたことをスタッフと選手に通知する。 - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f あなたのエンダーチェストは拭かれた!`); - // タグ「通知」を誰も持っていない場合は、try/catchを使用する。 - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f が §7${member.name}'s§f のエンダーチェストを消した!`); + // Notify staff and player that punishment has taken place + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f Your Enderchest has been wiped!`); + // Use try/catch in case nobody has tag 'notify' as this will report 'no target selector' + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f wiped §7${member.name}'s§f enderchest!`); return paradoxui(player); } diff --git a/src/gui/moderation/uiFly.ts b/src/gui/moderation/uiFly.ts index 81c5ffc..5ee61f4 100644 --- a/src/gui/moderation/uiFly.ts +++ b/src/gui/moderation/uiFly.ts @@ -4,11 +4,11 @@ import { sendMsg, sendMsgToPlayer } from "../../util"; import { paradoxui } from "../paradoxui.js"; import { ModalFormResponse } from "@minecraft/server-ui"; function mayflydisable(player: Player, member: Player) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> fly mode for ${player === member ? "themselves" : "§7" + member.name}.`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled fly mode for ${player === member ? "themselves" : "§7" + member.name}.`); } function mayflyenable(player: Player, member: Player) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> fly mode for ${player === member ? "themselves" : "§7" + member.name}.`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled fly mode for ${player === member ? "themselves" : "§7" + member.name}.`); } /** @@ -22,7 +22,7 @@ function mayflyenable(player: Player, member: Player) { export function uiFLY(flyResult: ModalFormResponse, onlineList: string[], player: Player) { handleUIFly(flyResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -35,7 +35,7 @@ export function uiFLY(flyResult: ModalFormResponse, onlineList: string[], player async function handleUIFly(flyResult: ModalFormResponse, onlineList: string[], player: Player) { if (!flyResult || flyResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value] = flyResult.formValues; @@ -47,16 +47,16 @@ async function handleUIFly(flyResult: ModalFormResponse, onlineList: string[], p break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); } const membertag = member.getTags(); @@ -68,7 +68,7 @@ async function handleUIFly(flyResult: ModalFormResponse, onlineList: string[], p mayflyenable(player, member); }) .catch(() => { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f教育版はこの世界では無効である。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Education Edition is disabled in this world.`); }); return; @@ -87,7 +87,7 @@ async function handleUIFly(flyResult: ModalFormResponse, onlineList: string[], p member.removeTag("noflying"); }) .catch(() => { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f教育版はこの世界では無効である。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Education Edition is disabled in this world.`); }); return; } diff --git a/src/gui/moderation/uiFreeze.ts b/src/gui/moderation/uiFreeze.ts index b89d57b..3fe1d33 100644 --- a/src/gui/moderation/uiFreeze.ts +++ b/src/gui/moderation/uiFreeze.ts @@ -16,7 +16,7 @@ import { ModalFormResponse } from "@minecraft/server-ui"; export function uiFREEZE(freezeResult: ModalFormResponse, onlineList: string[], player: Player) { handleUIFreeze(freezeResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -29,7 +29,7 @@ export function uiFREEZE(freezeResult: ModalFormResponse, onlineList: string[], async function handleUIFreeze(freezeResult: ModalFormResponse, onlineList: string[], player: Player) { if (!freezeResult || freezeResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value] = freezeResult.formValues; @@ -41,11 +41,11 @@ async function handleUIFreeze(freezeResult: ModalFormResponse, onlineList: strin break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } const boolean = member.hasTag("paradoxFreeze"); @@ -57,8 +57,8 @@ async function handleUIFreeze(freezeResult: ModalFormResponse, onlineList: strin for (const effectType of effectsToRemove) { member.removeEffect(effectType); } - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§fあなたはもはや凍っていない。`); - sendMsg(`a[tag=paradoxOpped]`, `§7${member.name}§f フリーズが解かれました`); + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You are no longer frozen.`); + sendMsg(`@a[tag=paradoxOpped]`, `§7${member.name}§f is no longer frozen.`); return; } @@ -69,8 +69,8 @@ async function handleUIFreeze(freezeResult: ModalFormResponse, onlineList: strin member.addEffect(effectType, 1000000, { amplifier: 255, showParticles: true }); } member.addTag("paradoxFreeze"); - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f あなたは今凍っている。`); - sendMsg(`a[tag=paradoxOpped]`, `§7${member.name}§f 今あなたはフリーズしています.`); + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You are now frozen.`); + sendMsg(`@a[tag=paradoxOpped]`, `§7${member.name}§f is now frozen.`); return; } diff --git a/src/gui/moderation/uiInventory.ts b/src/gui/moderation/uiInventory.ts index 317d778..e45d387 100644 --- a/src/gui/moderation/uiInventory.ts +++ b/src/gui/moderation/uiInventory.ts @@ -15,7 +15,7 @@ import { uiInvEditorMenu } from "./uiInventory/uiInvEditorMainMenu.js"; export function uiINVENTORY(inventoryUIResult: ModalFormResponse, onlineList: string[], player: Player) { handleUIInventory(inventoryUIResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -28,7 +28,7 @@ export function uiINVENTORY(inventoryUIResult: ModalFormResponse, onlineList: st async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineList: string[], player: Player) { if (!inventoryUIResult || inventoryUIResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value] = inventoryUIResult.formValues; @@ -40,16 +40,16 @@ async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineLis break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); } const inv = member.getComponent("inventory") as EntityInventoryComponent; const container = inv.container; @@ -57,7 +57,7 @@ async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineLis const maxSlots = 36; // Maximum number of slots in the player's inventory - // インベントリーをループし、アイテムをitemArrayに追加する。 + // Loop through the inventory and add items to the itemArray for (let i = 0; i < maxSlots; i++) { const item = container.getItem(i); if (item?.typeId) { @@ -67,11 +67,11 @@ async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineLis } } - // すべてのアイテム/ブロックとそのテクスチャパスのマップ + // Map of all items/blocks and their texture paths const textures = new Map([ - //スロットが空であるか、マップにテクスチャがない場合、デフォルトのテクスチャが表示されます。 + //default texture if the slot is empty or no texture is found in the map, this can happen as some blocks/items dont seem to have a ["empty", "ui/slots_bg"], - //ブロック + //blocks ["acacia_button", "blocks/planks_acacia"], ["acacia_door", "blocks/door_acacia_upper"], ["acacia_fence", "blocks/planks_acacia"], @@ -654,7 +654,7 @@ async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineLis ["seagrass", "blocks/seagrass"], ["shroomlight", "blocks/shroomlight"], ["silver_glazed_terracotta", "blocks/glazed_terracotta_silver"], - //頭蓋骨のテクスチャはエンティティの下にあり、シェーダーが必要だ。 + //Skull texture is under and entity and would need a shader. ["skull", ""], ["slime", "blocks/slime"], ["small_amethyst_bud", "blocks/small_amethyst_bud"], @@ -823,7 +823,7 @@ async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineLis ["yellow_shulker_box", "blocks/shulker_top_yellow"], ["yellow_wool", "blocks/wool_coloured_yellow"], - //これらの項目はブロックが除外されている + //items these have had the blocks excluded ["acacia_boat", "items/boat_acacia"], ["acacia_chest_boat", "items/acacia_chest_boat"], ["acacia_sign", "items/sign_acacia"], @@ -973,7 +973,7 @@ async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineLis ["flower_banner_pattern", "items/banner_pattern"], ["fox_spawn_egg", "items/egg_fox"], ["friend_pottery_sherd", "items/friend_pottery_sherd"], - //テクスチャが見つかりません。 + //Unable to locate a texture. ["frog_spawn_egg", ""], ["ghast_spawn_egg", "items/egg_ghast"], ["ghast_tear", "items/ghast_tear"], @@ -1248,7 +1248,7 @@ async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineLis ["zombie_villager_spawn_egg", "egg_zombievillager"], ]); - // itemArrayの4番目の値(texture)を更新する。 + // Update the fourth value (texture) in the itemArray const itemArrayLength = itemArray.length; for (let i = 0; i < itemArrayLength; i += 4) { const type: string | number = itemArray[i + 3]; @@ -1256,50 +1256,49 @@ async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineLis itemArray[i + 3] = texture; } - // 更新されたitemArrayを出力する(Debugging) - // console.log(itemArray); + // Output the updated itemArray(Debugging) + // console.log(itemArray); - //ループが終わったら、次のパートに移る。 + //once the loop is done then move to the next part const playerInventory = new ActionFormData(); - playerInventory.title("§4" + member.nameTag + "のインベントリ!!" + "§4"); - playerInventory.body("UserID 【<" + member.id + ">】"); - playerInventory.button(itemArray[1] + "を" + itemArray[2] + "個持っています", "textures/" + itemArray[3]); ////0 - playerInventory.button(itemArray[5] + " を " + itemArray[6] + "個持っています", "textures/" + itemArray[7]); //1 - playerInventory.button(itemArray[9] + " を " + itemArray[10] + "個持っています", "textures/" + itemArray[11]); //2 - playerInventory.button(itemArray[13] + " を " + itemArray[14] + "個持っています", "textures/" + itemArray[15]); //3 - playerInventory.button(itemArray[17] + " を " + itemArray[18] + "個持っています", "textures/" + itemArray[19]); //4 - playerInventory.button(itemArray[21] + " を " + itemArray[22] + "個持っています", "textures/" + itemArray[23]); //5 - playerInventory.button(itemArray[25] + " を " + itemArray[26] + "個持っています", "textures/" + itemArray[27]); //6 - playerInventory.button(itemArray[29] + " を " + itemArray[30] + "個持っています", "textures/" + itemArray[31]); //7 - playerInventory.button(itemArray[33] + " を " + itemArray[34] + "個持っています", "textures/" + itemArray[35]); //8 - playerInventory.button(itemArray[37] + " を " + itemArray[38] + "個持っています", "textures/" + itemArray[39]); //9 - playerInventory.button(itemArray[41] + " を " + itemArray[42] + "個持っています", "textures/" + itemArray[43]); //10 - playerInventory.button(itemArray[45] + " を " + itemArray[46] + "個持っています", "textures/" + itemArray[47]); //11 - playerInventory.button(itemArray[49] + " を " + itemArray[50] + "個持っています", "textures/" + itemArray[51]); //12 - playerInventory.button(itemArray[53] + " を " + itemArray[54] + "個持っています", "textures/" + itemArray[55]); //13 - playerInventory.button(itemArray[57] + " を " + itemArray[58] + "個持っています", "textures/" + itemArray[59]); //14 - playerInventory.button(itemArray[61] + " を " + itemArray[62] + "個持っています", "textures/" + itemArray[63]); //15 - playerInventory.button(itemArray[65] + " を " + itemArray[66] + "個持っています", "textures/" + itemArray[67]); //16 - playerInventory.button(itemArray[69] + " を " + itemArray[70] + "個持っています", "textures/" + itemArray[71]); //17 - playerInventory.button(itemArray[73] + " を " + itemArray[74] + "個持っています", "textures/" + itemArray[75]); //18 - playerInventory.button(itemArray[77] + " を " + itemArray[78] + "個持っています", "textures/" + itemArray[79]); //19 - playerInventory.button(itemArray[81] + " を " + itemArray[82] + "個持っています", "textures/" + itemArray[83]); //20 - playerInventory.button(itemArray[85] + " を " + itemArray[86] + "個持っています", "textures/" + itemArray[87]); //21 - playerInventory.button(itemArray[89] + " を " + itemArray[90] + "個持っています", "textures/" + itemArray[91]); //22 - playerInventory.button(itemArray[93] + " を " + itemArray[94] + "個持っています", "textures/" + itemArray[95]); //23 - playerInventory.button(itemArray[97] + " を " + itemArray[98] + "個持っています", "textures/" + itemArray[99]); //24 - playerInventory.button(itemArray[101] + " を " + itemArray[102] + "個持っています", "textures/" + itemArray[103]); //25 - playerInventory.button(itemArray[105] + " を " + itemArray[106] + "個持っています", "textures/" + itemArray[107]); //26 - playerInventory.button(itemArray[109] + " を " + itemArray[110] + "個持っています", "textures/" + itemArray[111]); //27 - playerInventory.button(itemArray[113] + " を " + itemArray[114] + "個持っています", "textures/" + itemArray[115]); //28 - playerInventory.button(itemArray[117] + " を " + itemArray[118] + "個持っています", "textures/" + itemArray[119]); //29 - playerInventory.button(itemArray[121] + " を " + itemArray[122] + "個持っています", "textures/" + itemArray[123]); //30 - playerInventory.button(itemArray[125] + " を " + itemArray[126] + "個持っています", "textures/" + itemArray[127]); //31 - playerInventory.button(itemArray[129] + " を " + itemArray[130] + "個持っています", "textures/" + itemArray[131]); //32 - playerInventory.button(itemArray[133] + " を " + itemArray[134] + "個持っています", "textures/" + itemArray[135]); //33 - playerInventory.button(itemArray[137] + " を " + itemArray[138] + "個持っています", "textures/" + itemArray[139]); //34 - playerInventory.button(itemArray[141] + " を " + itemArray[142] + "個持っています", "textures/" + itemArray[143]); //35 + playerInventory.title("§4" + member.nameTag + " Inventory" + "§4"); + playerInventory.button(itemArray[1] + " Amount: " + itemArray[2], "textures/" + itemArray[3]); + playerInventory.button(itemArray[5] + " Amount: " + itemArray[6], "textures/" + itemArray[7]); + playerInventory.button(itemArray[9] + " Amount: " + itemArray[10], "textures/" + itemArray[11]); + playerInventory.button(itemArray[13] + " Amount: " + itemArray[14], "textures/" + itemArray[15]); + playerInventory.button(itemArray[17] + " Amount: " + itemArray[18], "textures/" + itemArray[19]); + playerInventory.button(itemArray[21] + " Amount: " + itemArray[22], "textures/" + itemArray[23]); + playerInventory.button(itemArray[25] + " Amount: " + itemArray[26], "textures/" + itemArray[27]); + playerInventory.button(itemArray[29] + " Amount: " + itemArray[30], "textures/" + itemArray[31]); + playerInventory.button(itemArray[33] + " Amount: " + itemArray[34], "textures/" + itemArray[35]); + playerInventory.button(itemArray[37] + " Amount: " + itemArray[38], "textures/" + itemArray[39]); + playerInventory.button(itemArray[41] + " Amount: " + itemArray[42], "textures/" + itemArray[43]); + playerInventory.button(itemArray[45] + " Amount: " + itemArray[46], "textures/" + itemArray[47]); + playerInventory.button(itemArray[49] + " Amount: " + itemArray[50], "textures/" + itemArray[51]); + playerInventory.button(itemArray[53] + " Amount: " + itemArray[54], "textures/" + itemArray[55]); + playerInventory.button(itemArray[57] + " Amount: " + itemArray[58], "textures/" + itemArray[59]); + playerInventory.button(itemArray[61] + " Amount: " + itemArray[62], "textures/" + itemArray[63]); + playerInventory.button(itemArray[65] + " Amount: " + itemArray[66], "textures/" + itemArray[67]); + playerInventory.button(itemArray[69] + " Amount: " + itemArray[70], "textures/" + itemArray[71]); + playerInventory.button(itemArray[73] + " Amount: " + itemArray[74], "textures/" + itemArray[75]); + playerInventory.button(itemArray[77] + " Amount: " + itemArray[78], "textures/" + itemArray[79]); + playerInventory.button(itemArray[81] + " Amount: " + itemArray[82], "textures/" + itemArray[83]); + playerInventory.button(itemArray[85] + " Amount: " + itemArray[86], "textures/" + itemArray[87]); + playerInventory.button(itemArray[89] + " Amount: " + itemArray[90], "textures/" + itemArray[91]); + playerInventory.button(itemArray[93] + " Amount: " + itemArray[94], "textures/" + itemArray[95]); + playerInventory.button(itemArray[97] + " Amount: " + itemArray[98], "textures/" + itemArray[99]); + playerInventory.button(itemArray[101] + " Amount: " + itemArray[102], "textures/" + itemArray[103]); + playerInventory.button(itemArray[105] + " Amount: " + itemArray[106], "textures/" + itemArray[107]); + playerInventory.button(itemArray[109] + " Amount: " + itemArray[110], "textures/" + itemArray[111]); + playerInventory.button(itemArray[113] + " Amount: " + itemArray[114], "textures/" + itemArray[115]); + playerInventory.button(itemArray[117] + " Amount: " + itemArray[118], "textures/" + itemArray[119]); + playerInventory.button(itemArray[121] + " Amount: " + itemArray[122], "textures/" + itemArray[123]); + playerInventory.button(itemArray[125] + " Amount: " + itemArray[126], "textures/" + itemArray[127]); + playerInventory.button(itemArray[129] + " Amount: " + itemArray[130], "textures/" + itemArray[131]); + playerInventory.button(itemArray[133] + " Amount: " + itemArray[134], "textures/" + itemArray[135]); + playerInventory.button(itemArray[137] + " Amount: " + itemArray[138], "textures/" + itemArray[139]); + playerInventory.button(itemArray[141] + " Amount: " + itemArray[142], "textures/" + itemArray[143]); playerInventory .show(player) .then((playerInventoryResult) => { @@ -1411,7 +1410,7 @@ async function handleUIInventory(inventoryUIResult: ModalFormResponse, onlineLis }) .catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { diff --git a/src/gui/moderation/uiInventory/uiInvEditorHelpMenu.ts b/src/gui/moderation/uiInventory/uiInvEditorHelpMenu.ts index 6d186c0..c19b61b 100644 --- a/src/gui/moderation/uiInventory/uiInvEditorHelpMenu.ts +++ b/src/gui/moderation/uiInventory/uiInvEditorHelpMenu.ts @@ -3,22 +3,22 @@ import { Player } from "@minecraft/server"; import { uiInvEditorMenu } from "./uiInvEditorMainMenu"; export function uiInvEditorHelpMenu(player: Player, targetPlayer: Player, itemSlot: number) { const helpMenu = new ActionFormData(); - helpMenu.title("§4ヘルプメニュー§4"); + helpMenu.title("§4Paradox - Inventory Item Editor Help§4"); helpMenu.body( - "§6エンチャントメニュー§このメニューではエンチャントの追加と削除ができます。このメニューでは、アイテム名を入力することで、アイテムを入れ替えることができます。また、アイテム名を入力することで、空のインベントリスロットを選択しているプレイヤーにアイテムを渡すこともできます。 アイテムを他のプレイヤーに転送したい場合は、ドロップダウンから自分の名前を選択してください。あなたのインベントリで次に空いているアイテムスロットを調べます。" + "§6Enchantments Menu§r\nIn this menu you can add and remove enchantments.\n§6Naming And Lore\n§rThis menu allows you to change the name of the item that is currently selected. The lore can be edited as well you can use colour codes each line is separated via a comma. to clear a lore leave the textbox blank and enable the edit lore toggle.\n§6Replace Or Delete\n§rIn this menu you can replace an item by entering the item name alternatively you can delete it, another option is that providing you have selected an empty inventory slot you can give the player an item by entering the item name.\n§6Transfer Item§r\nThis menu allows you to transfer the selected item to another player, if you want to transfer an item from the target player to your inventory select you name in the drop down. It will check for the next free item slot in your inventory." ); - helpMenu.button("戻る"); + helpMenu.button("Back"); helpMenu .show(player) .then((InvEditorMenuUIResult) => { if (InvEditorMenuUIResult.selection == 0) { - //メインメニューに戻る + //Return to the main menu uiInvEditorMenu(player, targetPlayer, itemSlot); } }) .catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { diff --git a/src/gui/moderation/uiInventory/uiInvEditorMainMenu.ts b/src/gui/moderation/uiInventory/uiInvEditorMainMenu.ts index 64f02a5..b0f8b62 100644 --- a/src/gui/moderation/uiInventory/uiInvEditorMainMenu.ts +++ b/src/gui/moderation/uiInventory/uiInvEditorMainMenu.ts @@ -10,19 +10,19 @@ import { uiItemEditorStats } from "./uiItemEditorStats"; import { uiItemEditorRepairMenu } from "./uiInvEditorRepairItemMenu"; export function uiInvEditorMenu(player: Player, targetPlayer: Player, itemSlot: number) { const menu = new ActionFormData(); - menu.title("§4インベントリアイテムエディターメニュー§4"); + menu.title("§4Paradox - Inventory Item Editor Menu§4"); const inv = targetPlayer.getComponent("inventory") as EntityInventoryComponent; const container = inv.container; const item = container.getItem(itemSlot); - menu.body("§r現在のプレイヤーのインベントリ:§6" + targetPlayer.name + "\n" + "§r選択したアイテム:§6" + item.typeId.replace("minecraft:", "")); - menu.button("アイテムステータス"); - menu.button("エンチャント"); - menu.button("ネーミングとロア"); - menu.button("アイテムの置換または削除"); - menu.button("アイテムの転送"); - menu.button("アイテムの耐久性"); - menu.button("プレイヤーリストに戻る"); - menu.button("ヘルプメニュー"); + menu.body("§rCurrent Players Inventory: §6" + targetPlayer.name + "\n" + "§rSelected Item: §6" + item.typeId.replace("minecraft:", "")); + menu.button("Item Stats"); + menu.button("Enchantments"); + menu.button("Naming And Lore"); + menu.button("Replace Or Delete Item"); + menu.button("Transfer Item"); + menu.button("Item Durability"); + menu.button("Return To Player List"); + menu.button("Help Menu"); menu.show(player) .then((InvEditorMenuUIResult) => { if (InvEditorMenuUIResult.selection == 0) { diff --git a/src/gui/moderation/uiInventory/uiInvEditorNameMenu.ts b/src/gui/moderation/uiInventory/uiInvEditorNameMenu.ts index 1116f9c..a307ed4 100644 --- a/src/gui/moderation/uiInventory/uiInvEditorNameMenu.ts +++ b/src/gui/moderation/uiInventory/uiInvEditorNameMenu.ts @@ -1,27 +1,26 @@ import { Player } from "@minecraft/server"; import { ModalFormData } from "@minecraft/server-ui"; import { uiItemEditorName } from "./uiItemEditor"; - export function uiItemEditorNameMenu(player: Player, targetPlayer: Player, itemSlot: number) { const itemEditor = new ModalFormData(); - itemEditor.title("§4アイテムエディター名前&伝説§4"); - itemEditor.toggle("アイテムの名前を変更", false); - itemEditor.textField("名前", "MyCoolItem"); - itemEditor.toggle("伝説を編集", false); - itemEditor.textField("伝説", "Lore1,Lore2,Lore3"); + itemEditor.title("§4Paradox - Item Editor Name&Lore§4"); + itemEditor.toggle("Rename Item", false); + itemEditor.textField("Name", "MyCoolItem"); + itemEditor.toggle("Edit Lore", false); + itemEditor.textField("Lore", "Lore1,Lore2,Lore3"); itemEditor .show(player) .then((InvEditorUIResult) => { uiItemEditorName(InvEditorUIResult, player, targetPlayer, itemSlot); }) .catch((error) => { - console.error("Paradox 未処理の拒否: ", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの発生源:", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/moderation/uiInventory/uiInvEditorRepairItemMenu.ts b/src/gui/moderation/uiInventory/uiInvEditorRepairItemMenu.ts index efd3a68..8b478d4 100644 --- a/src/gui/moderation/uiInventory/uiInvEditorRepairItemMenu.ts +++ b/src/gui/moderation/uiInventory/uiInvEditorRepairItemMenu.ts @@ -1,25 +1,24 @@ import { Player } from "@minecraft/server"; import { ModalFormData } from "@minecraft/server-ui"; import { uiItemEditorRepair } from "./uiItemEditor"; - export function uiItemEditorRepairMenu(player: Player, targetPlayer: Player, itemSlot: number) { handleUIitemEditorRepairMenu(player, targetPlayer, itemSlot).catch((error) => { - console.error("Paradox 未処理の拒否: ", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの発生源:", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); async function handleUIitemEditorRepairMenu(player: Player, targetPlayer: Player, itemSlot: number) { const repairMenu = new ModalFormData(); - //アイテムのステータスを表示します。 - repairMenu.title("§4アイテムエディター修復§4"); - repairMenu.toggle("アイテムを修復", false); + //Show the stats for the item. + repairMenu.title("§4Paradox - Item Editor Repair§4"); + repairMenu.toggle("Repair Item", false); repairMenu.show(player).then((InvEditorMenuUIResult) => { uiItemEditorRepair(InvEditorMenuUIResult, player, targetPlayer, itemSlot); }); diff --git a/src/gui/moderation/uiInventory/uiInvEditorReplaceMenu.ts b/src/gui/moderation/uiInventory/uiInvEditorReplaceMenu.ts index 562f599..a6279d6 100644 --- a/src/gui/moderation/uiInventory/uiInvEditorReplaceMenu.ts +++ b/src/gui/moderation/uiInventory/uiInvEditorReplaceMenu.ts @@ -1,26 +1,25 @@ import { Player } from "@minecraft/server"; import { ModalFormData } from "@minecraft/server-ui"; import { uiItemEditorReplace } from "./uiItemEditor"; - export function uiItemEditorReplaceMenu(player: Player, targetPlayer: Player, itemSlot: number) { const itemEditor = new ModalFormData(); - itemEditor.title("§4アイテムエディター アイテムの置換§4"); - itemEditor.toggle("アイテムの置換", false); - itemEditor.textField("アイテム名", "wooden_sword"); - itemEditor.toggle("アイテムの削除", false); + itemEditor.title("§4Paradox - Item Editor Replace Item§4"); + itemEditor.toggle("Replace Item", false); + itemEditor.textField("Item Name", "wooden_sword"); + itemEditor.toggle("Delete Item", false); itemEditor .show(player) .then((InvEditorUIResult) => { uiItemEditorReplace(InvEditorUIResult, player, targetPlayer, itemSlot); }) .catch((error) => { - console.error("Paradox 未処理の拒否: ", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの発生源:", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/moderation/uiInventory/uiInvEditorTransferMenu.ts b/src/gui/moderation/uiInventory/uiInvEditorTransferMenu.ts index 137a1f0..a46cd8b 100644 --- a/src/gui/moderation/uiInventory/uiInvEditorTransferMenu.ts +++ b/src/gui/moderation/uiInventory/uiInvEditorTransferMenu.ts @@ -3,12 +3,12 @@ import { ModalFormData } from "@minecraft/server-ui"; import { uiItemEditorTransfer } from "./uiItemEditor"; export function uiItemEditorTransferMenu(player: Player, targetPlayer: Player, itemSlot: number) { const itemEditor = new ModalFormData(); - itemEditor.title("§4アイテムエディター アイテムの置換§4"); - itemEditor.toggle("アイテムの置換"); + itemEditor.title("§4Paradox - Item Editor Transfer§4"); + itemEditor.toggle("Transfer Item"); let onlineList: string[] = []; onlineList = Array.from(world.getPlayers(), (player) => player.name); - itemEditor.dropdown(`\n§fプレーヤーを選択してください:§f\n\nプレイヤーがオンライン\n`, onlineList); - itemEditor.toggle("重複したアイテム", false); + itemEditor.dropdown(`\n§fSelect a player:§f\n\nPlayer's Online\n`, onlineList); + itemEditor.toggle("Duplicate Item", false); itemEditor .show(player) .then((InvEditorUIResult) => { diff --git a/src/gui/moderation/uiInventory/uiItemEditor.ts b/src/gui/moderation/uiInventory/uiItemEditor.ts index 8a43cdc..c41c932 100644 --- a/src/gui/moderation/uiInventory/uiItemEditor.ts +++ b/src/gui/moderation/uiInventory/uiItemEditor.ts @@ -3,7 +3,7 @@ import { ModalFormResponse } from "@minecraft/server-ui"; import { sendMsgToPlayer } from "../../../util"; import { uiInvEditorMenu } from "./uiInvEditorMainMenu"; /** - * Handles the result of a modal form used for transferring an item from the targeted player'インベントリを選択したプレイヤーに送る's inventory. + * Handles the result of a modal form used for transferring an item from the targeted player's inventory to the selected player's inventory. * * @name uiItemEditorTransfer * @param {ModalFormResponse} InvEditorUIResult - The result of the inventory editor modal form. @@ -15,7 +15,7 @@ import { uiInvEditorMenu } from "./uiInvEditorMainMenu"; export function uiItemEditorTransfer(InvEditorUIResult: ModalFormResponse, onlineList: string[], player: Player, targetPlayer: Player, itemSlot: number) { handleUIitemEditorTransfer(InvEditorUIResult, onlineList, player, targetPlayer, itemSlot).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -27,11 +27,11 @@ export function uiItemEditorTransfer(InvEditorUIResult: ModalFormResponse, onlin async function handleUIitemEditorTransfer(InvEditorUIResult: ModalFormResponse, onlineList: string[], player: Player, targetPlayer: Player, itemSlot: number) { if (!InvEditorUIResult || InvEditorUIResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [transferToggle, value, duplicateToggle] = InvEditorUIResult.formValues; - //メンバーは、アイテムを譲渡するときに使用します。 + //Member is used when transferring an Item. let member: Player = undefined; const players = world.getPlayers(); for (const pl of players) { @@ -41,13 +41,13 @@ export function uiItemEditorTransfer(InvEditorUIResult: ModalFormResponse, onlin } } if (transferToggle == true) { - //メンバーは、アイテムが転送されるプレイヤーです。 + //Member is the player the item is being transferred to const targetPlayerinv = targetPlayer.getComponent("inventory") as EntityInventoryComponent; const memberPlayerinv = member.getComponent("inventory") as EntityInventoryComponent; let freeSlot: number; const maxSlots = 36; // Maximum number of slots in the player's inventory - // インベントリーをループし、アイテムをitemArrayに追加する。 + // Loop through the inventory and add items to the itemArray for (let i = 0; i < maxSlots; i++) { const item = memberPlayerinv.container.getItem(i); if (!item?.typeId) { @@ -58,13 +58,13 @@ export function uiItemEditorTransfer(InvEditorUIResult: ModalFormResponse, onlin targetPlayerinv.container.moveItem(itemSlot, freeSlot, memberPlayerinv.container); } if (duplicateToggle == true) { - //メンバーは、アイテムが転送されるプレイヤーです。 + //Member is the player the item is being transferred to const targetPlayerinv = targetPlayer.getComponent("inventory") as EntityInventoryComponent; const memberPlayerinv = member.getComponent("inventory") as EntityInventoryComponent; let freeSlot: number; const maxSlots = 36; // Maximum number of slots in the player's inventory - // インベントリーをループし、アイテムをitemArrayに追加する。 + // Loop through the inventory and add items to the itemArray for (let i = 0; i < maxSlots; i++) { const item = memberPlayerinv.container.getItem(i); if (!item?.typeId) { @@ -75,7 +75,7 @@ export function uiItemEditorTransfer(InvEditorUIResult: ModalFormResponse, onlin const item = targetPlayerinv.container.getItem(itemSlot); memberPlayerinv.container.setItem(freeSlot, item); } - // メインメニュー画面を再度表示する。 + // Present the Main Menu screen again. uiInvEditorMenu(player, targetPlayer, itemSlot); } } @@ -90,7 +90,7 @@ export function uiItemEditorTransfer(InvEditorUIResult: ModalFormResponse, onlin export function uiItemEditorEnchantments(InvEditorUIResult: ModalFormResponse, player: Player, targetPlayer: Player, itemSlot: number) { handleUIitemEditorEnchantments(InvEditorUIResult, player, targetPlayer, itemSlot).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -107,7 +107,7 @@ export function uiItemEditorEnchantments(InvEditorUIResult: ModalFormResponse, p const container = inv.container; const item = container.getItem(itemSlot); - //エンチャントを加えるのか? + //Are we adding enchantments? if (enchantToggle == true) { if (item) { const enchantmentsComponent = item.getComponent("minecraft:enchantments") as ItemEnchantsComponent; @@ -117,19 +117,19 @@ export function uiItemEditorEnchantments(InvEditorUIResult: ModalFormResponse, p enchantmentsComponent.enchantments = enchantmentList; container.setItem(itemSlot, item); if (!addedCustomEnchantment) { - sendMsgToPlayer(player, "§fエンチャントできません: §7" + item.typeId + "§f 適用されるエンチャント: §7" + txtEnchant + "§f, §7" + txtEnchantValue); + sendMsgToPlayer(player, "§fUnable to enchant: §7" + item.typeId + "§f Enchantment to be applied: §7" + txtEnchant + "§f, §7" + txtEnchantValue); } } } if (removeEnchantToggle == true) { - //エンチャントを取り除くのか? + //Are we removing enchantments? const enchantmentsComponent = item.getComponent("minecraft:enchantments") as ItemEnchantsComponent; const enchantmentList = enchantmentsComponent.enchantments; enchantmentList.removeEnchantment(txtRemovEnchant.toString()); enchantmentsComponent.enchantments = enchantmentList; container.setItem(itemSlot, item); } - // メインメニュー画面を再度表示する。 + // Present the Main Menu screen again. uiInvEditorMenu(player, targetPlayer, itemSlot); } } @@ -144,7 +144,7 @@ export function uiItemEditorEnchantments(InvEditorUIResult: ModalFormResponse, p export function uiItemEditorName(InvEditorUIResult: ModalFormResponse, player: Player, targetPlayer: Player, itemSlot: number) { handleUIitemEditorName(InvEditorUIResult, player, targetPlayer, itemSlot).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -160,7 +160,7 @@ export function uiItemEditorName(InvEditorUIResult: ModalFormResponse, player: P const inv = targetPlayer.getComponent("inventory") as EntityInventoryComponent; const container = inv.container; const item = container.getItem(itemSlot); - //アイテム名を変更するのか? + //Are we renaming the item? if (renameToggle == true) { item.nameTag = txtRename.toString(); container.setItem(itemSlot, item); @@ -171,7 +171,7 @@ export function uiItemEditorName(InvEditorUIResult: ModalFormResponse, player: P container.setItem(itemSlot, item); } - // メインメニュー画面を再度表示する。 + // Present the Main Menu screen again. uiInvEditorMenu(player, targetPlayer, itemSlot); } } @@ -186,7 +186,7 @@ export function uiItemEditorName(InvEditorUIResult: ModalFormResponse, player: P export function uiItemEditorReplace(InvEditorUIResult: ModalFormResponse, player: Player, targetPlayer: Player, itemSlot: number) { handleUIitemEditorReplace(InvEditorUIResult, player, targetPlayer, itemSlot).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -201,7 +201,7 @@ export function uiItemEditorReplace(InvEditorUIResult: ModalFormResponse, player const inv = targetPlayer.getComponent("inventory") as EntityInventoryComponent; const container = inv.container; - //品物を交換するのか? + //Are we replacing the item? if (replaceToggle === true) { const itemStack = new ItemStack("minecraft:" + txtReplace); container.setItem(itemSlot, itemStack); @@ -210,7 +210,7 @@ export function uiItemEditorReplace(InvEditorUIResult: ModalFormResponse, player container.setItem(itemSlot); } - // メインメニュー画面を再度表示する。 + // Present the Main Menu screen again. uiInvEditorMenu(player, targetPlayer, itemSlot); } } @@ -225,7 +225,7 @@ export function uiItemEditorReplace(InvEditorUIResult: ModalFormResponse, player export function uiItemEditorRepair(InvEditorUIResult: ModalFormResponse, player: Player, targetPlayer: Player, itemSlot: number) { handleUIitemEditorRepair(InvEditorUIResult, player, targetPlayer, itemSlot).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -241,14 +241,14 @@ export function uiItemEditorRepair(InvEditorUIResult: ModalFormResponse, player: const inv = targetPlayer.getComponent("inventory") as EntityInventoryComponent; const container = inv.container; const item = container.getItem(itemSlot); - //現在のダメージ値 + //Current Damage values const durability = item.getComponent("minecraft:durability") as ItemDurabilityComponent; if (repairToggle == true) { durability.damage = 0; container.setItem(itemSlot, item); } - // メインメニュー画面を再度表示する。 + // Present the Main Menu screen again. uiInvEditorMenu(player, targetPlayer, itemSlot); } } diff --git a/src/gui/moderation/uiInventory/uiItemEditorEnchantmentsMenu.ts b/src/gui/moderation/uiInventory/uiItemEditorEnchantmentsMenu.ts index 7bf25ee..4678691 100644 --- a/src/gui/moderation/uiInventory/uiItemEditorEnchantmentsMenu.ts +++ b/src/gui/moderation/uiInventory/uiItemEditorEnchantmentsMenu.ts @@ -3,25 +3,25 @@ import { ModalFormData } from "@minecraft/server-ui"; import { uiItemEditorEnchantments } from "./uiItemEditor"; export function uiItemEditorEnchantmentsMenu(player: Player, targetPlayer: Player, itemSlot: number) { const itemEditor = new ModalFormData(); - itemEditor.title("§4Paradox - アイテムエディター・エンチャント§4"); - itemEditor.toggle("エンチャントを追加", false); - itemEditor.textField("魅惑", "ノックバック"); - itemEditor.textField("エンチャント値", "3"); - itemEditor.toggle("エンチャントを取り除く", false); - itemEditor.textField("魅惑", "ノックバック"); + itemEditor.title("§4Paradox - Item Editor Enchantments§4"); + itemEditor.toggle("Add Enchant", false); + itemEditor.textField("Enchantment", "knockback"); + itemEditor.textField("Enchantment Value", "3"); + itemEditor.toggle("Remove Enchantment", false); + itemEditor.textField("Enchantment", "knockback"); itemEditor .show(player) .then((InvEditorUIResult) => { uiItemEditorEnchantments(InvEditorUIResult, player, targetPlayer, itemSlot); }) .catch((error) => { - console.error("Paradoxの未処理拒否:", error); - // スタックトレース情報の抽出 + console.error("Paradox Unhandled Rejection: ", error); + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { const sourceInfo = stackLines; - console.error("エラーの原因", sourceInfo[0]); + console.error("Error originated from:", sourceInfo[0]); } } }); diff --git a/src/gui/moderation/uiInventory/uiItemEditorStats.ts b/src/gui/moderation/uiInventory/uiItemEditorStats.ts index 590833b..692ca05 100644 --- a/src/gui/moderation/uiInventory/uiItemEditorStats.ts +++ b/src/gui/moderation/uiInventory/uiItemEditorStats.ts @@ -40,23 +40,23 @@ export function uiItemEditorStats(player: Player, targetPlayer: Player, itemSlot const maxDurability = durability.maxDurability; let currentDamage = durability.damage; //Show the stats for the item. - statsMenu.title("§4アイテムステータス§4"); + statsMenu.title("§4Paradox - Item Editor Stats§4"); statsMenu.body( - "現在のプレイヤーのインベントリ: §6" + + "Current Players Inventory: §6" + targetPlayer.name + "\n" + - "§r指定したアイテム: §6" + + "§rSelected Item: §6" + item.typeId.replace("minecraft:", "") + - "§r\n\nエンチャ: \n" + + "§r\n\nCurrent Enchantments: \n" + formattedEnchantments + - "\n\n§r追加: \n" + + "\n\n§rLore: \n" + formattedLore + - "\n\n耐久性: §6" + + "\n\nDurability: §6" + (currentDamage = maxDurability - currentDamage) + "/" + maxDurability ); - statsMenu.button("戻る"); + statsMenu.button("Back"); statsMenu.show(player).then((InvEditorMenuUIResult) => { if (InvEditorMenuUIResult.selection == 0) { //Return to the main menu diff --git a/src/gui/moderation/uiKick.ts b/src/gui/moderation/uiKick.ts index 3ef7226..3781ce8 100644 --- a/src/gui/moderation/uiKick.ts +++ b/src/gui/moderation/uiKick.ts @@ -14,7 +14,7 @@ import { paradoxui } from "../paradoxui.js"; export function uiKICK(banResult: ModalFormResponse, onlineList: string[], player: Player) { handleUIKick(banResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -27,7 +27,7 @@ export function uiKICK(banResult: ModalFormResponse, onlineList: string[], playe async function handleUIKick(banResult: ModalFormResponse, onlineList: string[], player: Player) { if (!banResult || banResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value, reason] = banResult.formValues; @@ -41,20 +41,20 @@ async function handleUIKick(banResult: ModalFormResponse, onlineList: string[], } if (!member) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); return paradoxui(player); } - // 自分たちで蹴らないようにする + // make sure they dont kick themselves if (member === player) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 自分を蹴ることはできない。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot kick yourself.`); return paradoxui(player); } player.runCommandAsync(`kick "${member.name}" §f\n\n${reason}`).catch((error) => { console.warn(`${new Date()} | ` + error); - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手を蹴ることができなかった.`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f I was unable to kick that player!`); }); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f が §7${member.name}をキックしました§f. 理由: §7${reason}§f`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has kicked §7${member.name}§f. Reason: §7${reason}§f`); return paradoxui(player); } diff --git a/src/gui/moderation/uiLockdown.ts b/src/gui/moderation/uiLockdown.ts index deeec92..570061c 100644 --- a/src/gui/moderation/uiLockdown.ts +++ b/src/gui/moderation/uiLockdown.ts @@ -16,7 +16,7 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiLOCKDOWN(lockdownResult: ModalFormResponse, player: Player) { handleUILockdown(lockdownResult, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -29,54 +29,54 @@ export function uiLOCKDOWN(lockdownResult: ModalFormResponse, player: Player) { async function handleUILockdown(lockdownResult: ModalFormResponse, player: Player) { if (!lockdownResult || lockdownResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [reason, LockdownToggle] = lockdownResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (LockdownToggle === true) { - // ロックする + // Lock it down const players = world.getPlayers(); for (const pl of players) { - // ハッシュ/ソルトのチェックとパスワードの検証 + // Check for hash/salt and validate password const hash = pl.getDynamicProperty("hash"); const salt = pl.getDynamicProperty("salt"); - // オペレーターのIDまたは暗号化パスワードのいずれかをキーとして使用する。 + // Use either the operator's ID or the encryption password as the key const key = configuration.encryption.password ? configuration.encryption.password : pl.id; - // ハッシュを生成する + // Generate the hash const encode = (world as WorldExtended).hashWithSalt(salt as string, key); if (encode && hash !== undefined && encode === hash) { continue; } - // サーバーからプレーヤーをキックする + // Kick players from server pl.runCommandAsync(`kick ${pl.name} §f\n\n${reason}`).catch(() => { - // サーバーからプレイヤーをデスポーンさせる + // Despawn players from server pl.triggerEvent("paradox:kick"); }); } - // 閉鎖 - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§fサーバーはロックダウン中です!`); + // Shutting it down + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f Server is in lockdown!`); configuration.modules.lockdown.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Lockdown§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Lockdown§f!`); } - //無効 + //Disable if (LockdownToggle === false) { configuration.modules.lockdown.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Lockdown§f!`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§fサーバはもはやロックダウンされていません!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Lockdown§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f Server is no longer in lockdown!`); } return paradoxui; } diff --git a/src/gui/moderation/uiManagePlayerSavedLocations.ts b/src/gui/moderation/uiManagePlayerSavedLocations.ts index c9573f0..f127c12 100644 --- a/src/gui/moderation/uiManagePlayerSavedLocations.ts +++ b/src/gui/moderation/uiManagePlayerSavedLocations.ts @@ -8,7 +8,7 @@ import { WorldExtended } from "../../classes/WorldExtended/World"; export function uiManagePlayerSavedLocations(managePlayerSavedLocationsUIResult: ModalFormResponse, onlineList: string[], player: Player) { handleUImanagePlayerSavedLocations(managePlayerSavedLocationsUIResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -28,19 +28,19 @@ async function handleUImanagePlayerSavedLocations(managePlayerSavedLocationsUIRe break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); } - //選択した選手の保存場所を取得する。 + //Grab the selected player saved locations. const salt = world.getDynamicProperty("crypt"); const tags = member.getTags(); const tagsLength = tags.length; @@ -49,18 +49,18 @@ async function handleUImanagePlayerSavedLocations(managePlayerSavedLocationsUIRe const coordsArray: string[] = []; for (let i = 0; i < tagsLength; i++) { if (tags[i].startsWith("1337")) { - // それを検証するためにデコードする + // Decode it so we can verify it tags[i] = (world as WorldExtended).decryptString(tags[i], salt as string); - // 無効な場合はスキップする + // If invalid then skip it if (tags[i].startsWith("LocationHome:") === false) { continue; } - // 文字列を配列に分割する + // Split string into array const coordinatesArray = tags[i].split(" "); const coordArrayLength = coordinatesArray.length; counter = ++counter; for (let i = 0; i < coordArrayLength; i++) { - // 配列から位置を取得する + // Get their location from the array coordsArray.push(coordinatesArray[i]); if (coordinatesArray[i].includes("LocationHome:")) { Locations.push(coordinatesArray[i].replace("LocationHome:", "")); @@ -80,28 +80,28 @@ async function handleUImanagePlayerSavedLocations(managePlayerSavedLocationsUIRe to show the player, where they can then remove the location if needed. */ const managePlayerSavedLocationsUI = new ModalFormData(); - managePlayerSavedLocationsUI.title(`§4§6${member.name}'の §4座標!`); - managePlayerSavedLocationsUI.dropdown(`\n場所選択:§f 保存場所:§f`, Locations); - managePlayerSavedLocationsUI.toggle("消去", false); + managePlayerSavedLocationsUI.title(`§4Paradox - §6${member.name}'s §4Locations`); + managePlayerSavedLocationsUI.dropdown(`\n§fSelect a Location:§f\n\nSaved Location's\n`, Locations); + managePlayerSavedLocationsUI.toggle("Delete", false); managePlayerSavedLocationsUI .show(player) .then((managePlayerSavedLocationsUIResult) => { const [selectedLocationvalue, deleteToggle] = managePlayerSavedLocationsUIResult.formValues; if (deleteToggle == true) { const salt = world.getDynamicProperty("crypt"); - // この保存されたホームロケーションを検索して削除する + // Find and delete this saved home location let encryptedString: string = ""; const tags = member.getTags(); const tagsLength = tags.length; for (let i = 0; i < tagsLength; i++) { if (tags[i].startsWith("1337")) { encryptedString = tags[i]; - // それを検証するためにデコードする + // Decode it so we can verify it tags[i] = (world as WorldExtended).decryptString(tags[i], salt as string); } if (tags[i].startsWith("LocationHome:" && Locations[selectedLocationvalue as number] + " X", 13)) { member.removeTag(encryptedString); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 座標を消去しました!! '§7${Locations[selectedLocationvalue as number]}§f'!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Successfully deleted home '§7${Locations[selectedLocationvalue as number]}§f'!`); break; } } @@ -111,7 +111,7 @@ async function handleUImanagePlayerSavedLocations(managePlayerSavedLocationsUIRe }) .catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { diff --git a/src/gui/moderation/uiMute.ts b/src/gui/moderation/uiMute.ts index c36421e..8617261 100644 --- a/src/gui/moderation/uiMute.ts +++ b/src/gui/moderation/uiMute.ts @@ -15,7 +15,7 @@ import { paradoxui } from "../paradoxui.js"; export function uiMUTE(muteResult: ModalFormResponse, onlineList: string[], player: Player) { handleUIMute(muteResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -28,7 +28,7 @@ export function uiMUTE(muteResult: ModalFormResponse, onlineList: string[], play async function handleUIMute(muteResult: ModalFormResponse, onlineList: string[], player: Player) { if (!muteResult || muteResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value, reason] = muteResult.formValues; @@ -40,31 +40,31 @@ async function handleUIMute(muteResult: ModalFormResponse, onlineList: string[], break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fプレイヤーをミュートするには、Paradox-Opped が必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to mute players!.`); } - // 自分たちがミュートにならないようにする + // Make sure they dont mute themselves if (member === player) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 自分自身を無言にすることはできない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot mute yourself.`); } - // スタッフがミュートしないようにする + // Make sure staff dont mute staff if (member.hasTag("paradoxOpped")) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fスタッフプレイヤーをミュートすることはできません。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot mute staff players.`); } - // まだミュートされていなければ、タグを付ける + // If not already muted then tag if (!member.hasTag("isMuted")) { member.addTag("isMuted"); } else { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのプレイヤーは既にミュートされている。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f This player is already muted.`); } - // エデュケーション・エディションがBooleanであれば、合法的にミュートする。 + // If Education Edition is enabled then legitimately mute them member.runCommandAsync(`ability @s mute true`); sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You have been muted. Reason: §7${reason}§f`); sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has muted §7${member.name}§f. Reason: §7${reason}§f`); diff --git a/src/gui/moderation/uiNotify.ts b/src/gui/moderation/uiNotify.ts index 100eb5c..f57fcb2 100644 --- a/src/gui/moderation/uiNotify.ts +++ b/src/gui/moderation/uiNotify.ts @@ -6,7 +6,7 @@ import { paradoxui } from "../paradoxui.js"; export function uiNOTIFY(notifyResult: ModalFormResponse, onlineList: string[], player: Player) { if (!notifyResult || notifyResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value, Enabled] = notifyResult.formValues; @@ -18,12 +18,12 @@ export function uiNOTIFY(notifyResult: ModalFormResponse, onlineList: string[], break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f通知をBooleanにするには、Paradox-Oppedにする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to enable Notifications.`); } if (Enabled === true) { try { @@ -35,7 +35,7 @@ export function uiNOTIFY(notifyResult: ModalFormResponse, onlineList: string[], sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Something went wrong! Error: ${error}`); paradoxui(player); } - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> notifications.`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled notifications.`); paradoxui(player); } if (Enabled === false) { @@ -48,7 +48,7 @@ export function uiNOTIFY(notifyResult: ModalFormResponse, onlineList: string[], sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Something went wrong! Error: ${error}`); paradoxui(player); } - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> notifications.`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled notifications.`); paradoxui(player); } return paradoxui(player); diff --git a/src/gui/moderation/uiOp.ts b/src/gui/moderation/uiOp.ts index f7bf872..1891dbf 100644 --- a/src/gui/moderation/uiOp.ts +++ b/src/gui/moderation/uiOp.ts @@ -6,10 +6,10 @@ import { paradoxui } from "../paradoxui.js"; import { WorldExtended } from "../../classes/WorldExtended/World.js"; import ConfigInterface from "../../interfaces/Config.js"; -//Visual1インパクトが提供する機能 +//Function provided by Visual1mpact export function uiOP(opResult: ModalFormResponse | ActionFormResponse, salt: string | number | boolean, hash: string | number | boolean, player: Player, onlineList?: string[]) { if (!opResult || opResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } @@ -18,18 +18,18 @@ export function uiOP(opResult: ModalFormResponse | ActionFormResponse, salt: str if (!hash || !salt || (hash !== (world as WorldExtended).hashWithSalt(salt as string, configuration.encryption.password || player.id) && (world as WorldExtended).isValidUUID(salt as string))) { if (!configuration.encryption.password) { if (!player.isOp()) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うにはオペレータである必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Operator to use this command.`); return paradoxui(player); } } } if ("formValues" in opResult) { - // これはModalFormResponseです。 + // It's a ModalFormResponse const [value] = opResult.formValues; - // 要求された選手を見つけよう + // Try to find the player requested let targetPlayer: Player; if (onlineList.length > 0) { @@ -43,8 +43,8 @@ export function uiOP(opResult: ModalFormResponse | ActionFormResponse, salt: str } else { targetPlayer = player; if (configuration.encryption.password !== value) { - // パスワードの誤り - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fパスワードが間違っています。このコマンドを使用するには Operator である必要があります。`); + // Incorrect password + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Incorrect password. You need to be Operator to use this command.`); } } @@ -55,33 +55,33 @@ export function uiOP(opResult: ModalFormResponse | ActionFormResponse, salt: str const targetSalt = (world as WorldExtended).generateRandomUUID(); targetPlayer.setDynamicProperty("salt", targetSalt); - // オペレーターのIDまたは暗号化パスワードのいずれかをキーとして使用する。 + // Use either the operator's ID or the encryption password as the key const targetKey = configuration.encryption.password ? configuration.encryption.password : targetPlayer.id; - // ハッシュを生成する + // Generate the hash const newHash = (world as WorldExtended).hashWithSalt(targetSalt, targetKey); targetPlayer.setDynamicProperty("hash", newHash); dynamicPropertyRegistry.setProperty(targetPlayer, targetPlayer.id, targetPlayer.name); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Paradox操作を§7${targetPlayer.name}§fに付与しました。`); - sendMsgToPlayer(targetPlayer, `§f§4[§6Paradox§4]§f あなたは今、操作している!`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${targetPlayer.name}§f は Paradox-Opped になりました。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You have granted Paradox-Op to §7${targetPlayer.name}§f.`); + sendMsgToPlayer(targetPlayer, `§f§4[§6Paradox§4]§f You are now op!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${targetPlayer.name}§f is now Paradox-Opped.`); targetPlayer.addTag("paradoxOpped"); return paradoxui(player); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f§7${targetPlayer.name}§f は既にParadoxOPである。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §7${targetPlayer.name}§f is already Paradox-Opped.`); return paradoxui(player); } } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fプレーヤーが見つかりませんでした§7${targetPlayer.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Could not find player §7${targetPlayer.name}§f.`); return paradoxui(player); } } else if ("selection" in opResult) { - // これはActionFormResponseである。 + // It's an ActionFormResponse if (opResult.selection === 0) { - // 選手が自分のパスワードを変更したい + // player wants to change their own password const targetSalt = (world as WorldExtended).generateRandomUUID(); const newHash = (world as WorldExtended).hashWithSalt(targetSalt, player.id); @@ -89,7 +89,7 @@ export function uiOP(opResult: ModalFormResponse | ActionFormResponse, salt: str player.setDynamicProperty("salt", targetSalt); player.addTag("paradoxOpped"); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたは今、Paradoxに縛られている!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You are now Paradox-Opped!`); dynamicPropertyRegistry.setProperty(player, player.id, player.name); diff --git a/src/gui/moderation/uiPrefix.ts b/src/gui/moderation/uiPrefix.ts index 5351e39..eb9c549 100644 --- a/src/gui/moderation/uiPrefix.ts +++ b/src/gui/moderation/uiPrefix.ts @@ -12,12 +12,12 @@ function resetPrefix(player: Player, configuration: ConfigInterface) { configuration.customcommands.prefix = "!"; } } - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f接頭辞がリセットされた!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Prefix has been reset!`); } export function uiPREFIX(prefixResult: ModalFormResponse, onlineList: string[], player: Player) { if (!prefixResult || prefixResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value, textField, toggle] = prefixResult.formValues; @@ -29,12 +29,12 @@ export function uiPREFIX(prefixResult: ModalFormResponse, onlineList: string[], break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのコマンドを使うには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use this command.`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -44,25 +44,25 @@ export function uiPREFIX(prefixResult: ModalFormResponse, onlineList: string[], * Make sure we are not attempting to set a prefix that can break commands */ if (textField === "/") { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 接頭辞 '§7/§f' の使用は許されない!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Using prefix '§7/§f' is not allowed!`); return paradoxui; } - // 条件下での接頭辞変更コマンド + // Change Prefix command under conditions if ((textField as string).length <= 1 && (textField as string).length >= 1) { resetPrefix(member, configuration); configuration.customcommands.prefix = textField as string; sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Prefix has been changed to '§7${textField}§f'! for §7${member.name}§f`); member.addTag("Prefix:" + textField); } else { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f接頭辞の長さを2文字以上にすることはできない!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Prefix length cannot be more than 2 characters!`); } } - // リセットが切り替えられた + // Reset has been toggled if (toggle) { resetPrefix(player, configuration); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f プレフィックスがリセットされました §7${member.name}§f!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Prefix has been reset for §7${member.name}§f!`); } return paradoxui(player); } diff --git a/src/gui/moderation/uiPunish.ts b/src/gui/moderation/uiPunish.ts index c8349bd..20de842 100644 --- a/src/gui/moderation/uiPunish.ts +++ b/src/gui/moderation/uiPunish.ts @@ -15,7 +15,7 @@ import { ModalFormResponse } from "@minecraft/server-ui"; export function uiPUNISH(punishResult: ModalFormResponse, onlineList: string[], player: Player) { handleUIPunish(punishResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -28,7 +28,7 @@ export function uiPUNISH(punishResult: ModalFormResponse, onlineList: string[], async function handleUIPunish(punishResult: ModalFormResponse, onlineList: string[], player: Player) { if (!punishResult || punishResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value] = punishResult.formValues; @@ -40,33 +40,33 @@ async function handleUIPunish(punishResult: ModalFormResponse, onlineList: strin break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f罰則を使うにはParadox・オップである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to use punish.`); } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); } - // 自分自身を罰することがないようにする + // Make sure they don't punish themselves if (member === player) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f あなた自身を罰することはできない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot punish yourself.`); } - //スタッフに罰を与えないようにする! + //Make sure they don't punish staff! if (member.hasTag("paradoxOpped")) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f スタッフを罰することはできない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot punish Staff.`); } - // 0から29までの30個のスロットがある。 - // エンダーの胸を一掃しよう + // There are 30 slots ranging from 0 to 29 + // Let's clear out that ender chest for (let slot = 0; slot < 30; slot++) { member.runCommand(`replaceitem entity @s slot.enderchest ${slot} air`); } - // リクエストされた選手のインベントリーを取得し、それを消去できるようにする。 + // Get requested player's inventory so we can wipe it out const inventoryContainer = member.getComponent("minecraft:inventory") as EntityInventoryComponent; const inventory = inventoryContainer.container; @@ -79,9 +79,9 @@ async function handleUIPunish(punishResult: ModalFormResponse, onlineList: strin inventory.setItem(i, undefined); } catch {} } - // 罰が行われたことをスタッフと選手に通知する。 - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f あなたがたは自分の行いのために罰を受けた!`); - // タグ「通知」を誰も持っていない場合は、try/catchを使用する。 - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f は §7${member.name}§f を罰した`); + // Notify staff and player that punishment has taken place + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You have been punished for your behavior!`); + // Use try/catch in case nobody has tag 'notify' as this will report 'no target selector' + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has punished §7${member.name}§f`); return paradoxui(player); } diff --git a/src/gui/moderation/uiRules.ts b/src/gui/moderation/uiRules.ts index 365f073..294e530 100644 --- a/src/gui/moderation/uiRules.ts +++ b/src/gui/moderation/uiRules.ts @@ -8,16 +8,16 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiRULES(banResult: ModalFormResponse, player: Player) { if (!banResult || banResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [EnabledRules, EnableKick] = banResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fルールを設定するためには、Paradox-Oppedである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure the rules.`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -26,25 +26,25 @@ export function uiRULES(banResult: ModalFormResponse, player: Player) { const KickOnDeclineBoolean = configuration.modules.showrules.kick; if (EnabledRules === true && showrulesBoolean === false) { configuration.modules.showrules.enabled = true; - //関数を呼び出すのを忘れないように! + //remember to call the function! onJoinrules(); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6showrules§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6showrules§f!`); } if (EnabledRules === false && showrulesBoolean === true) { configuration.modules.showrules.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4showrules§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4showrules§f!`); } if (EnableKick === true && KickOnDeclineBoolean === false) { configuration.modules.showrules.kick = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §4KickOnDecline§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §4KickOnDecline§f!`); } if (EnableKick === false && KickOnDeclineBoolean === true) { configuration.modules.showrules.kick = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4KickOnDecline§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4KickOnDecline§f!`); } dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - //メインUIをプレイヤーに表示する。 + //show the main ui to the player one complete. return paradoxui(player); } diff --git a/src/gui/moderation/uiStats.ts b/src/gui/moderation/uiStats.ts index 017ebf1..ef9ef94 100644 --- a/src/gui/moderation/uiStats.ts +++ b/src/gui/moderation/uiStats.ts @@ -9,7 +9,7 @@ import { PlayerExtended } from "../../classes/PlayerExtended/Player"; export function uiSTATS(statsResult: ModalFormResponse, onlineList: string[], player: Player) { if (!statsResult || statsResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value] = statsResult.formValues; @@ -24,13 +24,13 @@ export function uiSTATS(statsResult: ModalFormResponse, onlineList: string[], pl } if (!member) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fプレイヤーがオンラインでない。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f The player is not online.`); return; } const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); if (uniqueId !== player.name) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); return; } @@ -116,19 +116,19 @@ export function uiSTATS(statsResult: ModalFormResponse, onlineList: string[], pl } const ResultsUI = new ActionFormData(); - ResultsUI.title("§4Report for §4" + member.name); + ResultsUI.title("§4Paradox - Report for §4" + member.name); const tempstring = reportBody.toString().replaceAll(",", ""); ResultsUI.body(tempstring); ResultsUI.button("Close"); ResultsUI.show(player) .then(() => { - //単にメインUIを表示し直す + //Simply re show the main UI paradoxui(player); return; }) .catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -137,5 +137,5 @@ export function uiSTATS(statsResult: ModalFormResponse, onlineList: string[], pl } } }); - //リターンプレーヤー; + //return player; } diff --git a/src/gui/moderation/uiTpa.ts b/src/gui/moderation/uiTpa.ts index 03ef49f..7428e53 100644 --- a/src/gui/moderation/uiTpa.ts +++ b/src/gui/moderation/uiTpa.ts @@ -6,7 +6,7 @@ import { paradoxui } from "../paradoxui.js"; export function uiTPA(tpaResult: ModalFormResponse, onlineList: string[], player: Player) { if (!tpaResult || tpaResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value, toggleToTarget, toggleTargetTo] = tpaResult.formValues; @@ -18,30 +18,30 @@ export function uiTPA(tpaResult: ModalFormResponse, onlineList: string[], player break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); } - // 選手が両方のオプションをBooleanにしていないか確認する。 + // Check to make sure they player hasnt enabled both options if (toggleTargetTo === true && toggleToTarget === true) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f両方のオプションをBooleanにすることはできません。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cant enable both options`); return paradoxui(player); } - //は、プレーヤーがBoolean=>少なくとも1つの選択肢を持っていることを確認します。 + //check to make sure the player has enabled at least one option. if (toggleTargetTo === false && toggleToTarget === false) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 一つのオプションをBooleanにしなければならない。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You must enable one option.`); return paradoxui(player); } if (toggleToTarget === true) { - // オペをターゲットに送る - // その選手のところにテレポートしよう + // tp the op to the target + // Let's teleport you to that player setTimer(player.id); player.teleport(member.location, { dimension: member.dimension, @@ -50,12 +50,12 @@ export function uiTPA(tpaResult: ModalFormResponse, onlineList: string[], player checkForBlocks: true, keepVelocity: false, }); - // テレポートしたことを知らせる + // Let you know that you have been teleported return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Teleported §7${player.name}§f to §7${member.name}§f`); } if (toggleTargetTo === true) { - //ターゲットからオペへ + //tp the target to the op setTimer(member.id); member.teleport(player.location, { dimension: player.dimension, diff --git a/src/gui/moderation/uiTpr.ts b/src/gui/moderation/uiTpr.ts index cf31bd7..1a9fc4b 100644 --- a/src/gui/moderation/uiTpr.ts +++ b/src/gui/moderation/uiTpr.ts @@ -12,12 +12,12 @@ export function uiTPR(requester: string, player: Player, respons: string) { } } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); } - // このTPRリクエストを完成させよう + // Let's complete this tpr request if (respons === "yes") { const event = { sender: player, diff --git a/src/gui/moderation/uiTprSend.ts b/src/gui/moderation/uiTprSend.ts index 1ee6b23..315e8a0 100644 --- a/src/gui/moderation/uiTprSend.ts +++ b/src/gui/moderation/uiTprSend.ts @@ -6,7 +6,7 @@ import { TeleportRequestHandler } from "../../commands/utility/tpr.js"; export function uiTPRSEND(tprSendRequestResult: ModalFormResponse, onlineList: string[], player: Player) { if (!tprSendRequestResult || tprSendRequestResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value] = tprSendRequestResult.formValues; @@ -19,11 +19,11 @@ export function uiTPRSEND(tprSendRequestResult: ModalFormResponse, onlineList: s } } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); } - //プレーヤーとリクエストされたメンバーに基づいて、テレポートのリクエストを送信します。 + //send the request to be teleported based off the player and the member requested. const prefix = getPrefix(player); const event = { sender: player, diff --git a/src/gui/moderation/uiUnban.ts b/src/gui/moderation/uiUnban.ts index c3991b0..3b7e578 100644 --- a/src/gui/moderation/uiUnban.ts +++ b/src/gui/moderation/uiUnban.ts @@ -7,23 +7,23 @@ import { paradoxui } from "../paradoxui.js"; export function uiUNBAN(unbanResult: ModalFormResponse, player: Player) { if (!unbanResult || unbanResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [textField, deleteUnban] = unbanResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fプレイヤーをBANするにはParadoxOPする必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to Ban a player.`); } if (deleteUnban === true) { queueUnban.delete(textField as string); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${textField}§f が禁止解除キューから削除されました。`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${textField}§f has been removed from the unban queue!`); } - // 選手をキューに追加 + // Add player to queue queueUnban.add(textField as string); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${textField}§f は禁止解除のキューに入れられています。`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${textField}§f is queued to be unbanned!`); return paradoxui(player); } diff --git a/src/gui/moderation/uiUnmute.ts b/src/gui/moderation/uiUnmute.ts index 7fe853b..8033091 100644 --- a/src/gui/moderation/uiUnmute.ts +++ b/src/gui/moderation/uiUnmute.ts @@ -15,7 +15,7 @@ import { paradoxui } from "../paradoxui.js"; export function uiUNMUTE(muteResult: ModalFormResponse, onlineList: string[], player: Player) { handleUIUnmute(muteResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -28,7 +28,7 @@ export function uiUNMUTE(muteResult: ModalFormResponse, onlineList: string[], pl async function handleUIUnmute(muteResult: ModalFormResponse, onlineList: string[], player: Player) { if (!muteResult || muteResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value, reason] = muteResult.formValues; @@ -40,21 +40,21 @@ async function handleUIUnmute(muteResult: ModalFormResponse, onlineList: string[ break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fプレイヤーをミュートするには、Paradox-Opped が必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to mute players!.`); } - // ミュートの場合はタグを外す + // If muted then un tag if (member.hasTag("isMuted")) { member.removeTag("isMuted"); } else { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこのプレイヤーは既にミュートされていない。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f This player is already unmuted.`); } - // エデュケーション・エディションがBooleanになっている場合は、合法的にミュートを解除する。 + // If Education Edition is enabled then legitimately unmute them member.runCommandAsync(`ability @s mute false`); sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You have been unmuted. Reason: §7${reason}§f`); sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has unmuted §7${member.name}§f. Reason: §7${reason}§f`); diff --git a/src/gui/moderation/uiVanish.ts b/src/gui/moderation/uiVanish.ts index 1eadf52..e29328b 100644 --- a/src/gui/moderation/uiVanish.ts +++ b/src/gui/moderation/uiVanish.ts @@ -16,7 +16,7 @@ import { MinecraftEffectTypes } from "../../node_modules/@minecraft/vanilla-data export function uiVANISH(vanishResult: ModalFormResponse, onlineList: string[], player: Player) { handleUIVanish(vanishResult, onlineList, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -29,7 +29,7 @@ export function uiVANISH(vanishResult: ModalFormResponse, onlineList: string[], async function handleUIVanish(vanishResult: ModalFormResponse, onlineList: string[], player: Player) { if (!vanishResult || vanishResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [value] = vanishResult.formValues; @@ -41,16 +41,16 @@ async function handleUIVanish(vanishResult: ModalFormResponse, onlineList: strin break; } } - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fあなたはParadox・オップされる必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped.`); } - // オンラインですか? + // Are they online? if (!member) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f その選手は見つからなかった!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); } if (member.hasTag("vanish")) { member.addTag("novanish"); @@ -62,14 +62,14 @@ async function handleUIVanish(vanishResult: ModalFormResponse, onlineList: strin if (member.hasTag("novanish")) { member.triggerEvent("unvanish"); - // 効果を取り除く + // Remove effects const effectsToRemove = [MinecraftEffectTypes.Invisibility, MinecraftEffectTypes.NightVision]; for (const effectType of effectsToRemove) { player.removeEffect(effectType); } - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§fもはやあなたは消えていない。`); - sendMsg(`a[tag=paradoxOpped]`, `§7${member.name}§f is no longer in vanish.`); + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You are no longer vanished.`); + sendMsg(`@a[tag=paradoxOpped]`, `§7${member.name}§f is no longer in vanish.`); } if (!member.hasTag("novanish")) { @@ -78,8 +78,8 @@ async function handleUIVanish(vanishResult: ModalFormResponse, onlineList: strin if (member.hasTag("vanish") && !member.hasTag("novanish")) { member.triggerEvent("vanish"); - sendMsgToPlayer(member, `§f§4[§6Paradox§4]§fあなたは今、消滅した!`); - sendMsg(`a[tag=paradoxOpped]`, `§7${member.name}§f is now vanished!`); + sendMsgToPlayer(member, `§f§4[§6Paradox§4]§f You are now vanished!`); + sendMsg(`@a[tag=paradoxOpped]`, `§7${member.name}§f is now vanished!`); } if (member.hasTag("novanish")) { diff --git a/src/gui/modules/uiAFK.ts b/src/gui/modules/uiAFK.ts index f0fe9da..82c4a40 100644 --- a/src/gui/modules/uiAFK.ts +++ b/src/gui/modules/uiAFK.ts @@ -7,34 +7,34 @@ import { paradoxui } from "../paradoxui.js"; import ConfigInterface from "../../interfaces/Config.js"; export function uiAFK(afkResult: ModalFormResponse, player: Player) { if (!afkResult || afkResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [afkToggle] = afkResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f AFKを設定するには、Paradox・オプ状態にする必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure AFK`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (afkToggle === true) { - // 許可する + // Allow configuration.modules.afk.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", true); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6AFK§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AFK§f!`); AFK(); } if (afkToggle === false) { - // 拒否する + // Deny configuration.modules.afk.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4AFK§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AFK§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiAutoClicker.ts b/src/gui/modules/uiAntiAutoClicker.ts index d786ce4..d1dd1ba 100644 --- a/src/gui/modules/uiAntiAutoClicker.ts +++ b/src/gui/modules/uiAntiAutoClicker.ts @@ -16,7 +16,7 @@ import ConfigInterface from "../../interfaces/Config"; export function uiANTIAUTOCLICKER(antiautoclickerResult: ModalFormResponse, player: Player) { handleUIAntiAutoClicker(antiautoclickerResult, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -29,34 +29,34 @@ export function uiANTIAUTOCLICKER(antiautoclickerResult: ModalFormResponse, play async function handleUIAntiAutoClicker(antiautoclickerResult: ModalFormResponse, player: Player) { if (!antiautoclickerResult || antiautoclickerResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiAutoClickerToggle] = antiautoclickerResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fオートクリッカーを設定するには、Paradox-Oppedにする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Auto Clicker`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiAutoClickerToggle === true) { - // 許可する + // Allow configuration.modules.autoclicker.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6AutoClicker§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AutoClicker§f!`); AutoClicker(); } if (AntiAutoClickerToggle === false) { - // 拒否する + // Deny configuration.modules.autoclicker.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4AutoClicker§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AutoClicker§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiFall.ts b/src/gui/modules/uiAntiFall.ts index 4e25836..824f9f1 100644 --- a/src/gui/modules/uiAntiFall.ts +++ b/src/gui/modules/uiAntiFall.ts @@ -16,7 +16,7 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiANTIFALL(antifallResult: ModalFormResponse, player: Player) { handleUIAntiFall(antifallResult, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -29,34 +29,34 @@ export function uiANTIFALL(antifallResult: ModalFormResponse, player: Player) { async function handleUIAntiFall(antifallResult: ModalFormResponse, player: Player) { if (!antifallResult || antifallResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiFallToggle] = antifallResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f アンチフォールを設定するには、Paradox・オプ状態にする必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Fall`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiFallToggle === true) { - // 許可する + // Allow configuration.modules.antifallA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6AntiFallA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiFallA§f!`); AntiFallA(); } if (AntiFallToggle === false) { - // 拒否する + // Deny configuration.modules.antifallA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4AntiFallA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiFallA§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiFly.ts b/src/gui/modules/uiAntiFly.ts index a317bf5..6a2e8b9 100644 --- a/src/gui/modules/uiAntiFly.ts +++ b/src/gui/modules/uiAntiFly.ts @@ -8,33 +8,33 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiANTIFLY(antiflyResult: ModalFormResponse, player: Player) { if (!antiflyResult || antiflyResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiFlyToggle] = antiflyResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチフライを設定するには、Paradox・オッピングが必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Fly`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiFlyToggle === true) { - // 許可する + // Allow configuration.modules.flyA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6FlyA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6FlyA§f!`); FlyA(); } if (AntiFlyToggle === false) { - // 拒否する + // Deny configuration.modules.flyA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4FlyA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4FlyA§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiJesus.ts b/src/gui/modules/uiAntiJesus.ts index 7e92ff2..372ad04 100644 --- a/src/gui/modules/uiAntiJesus.ts +++ b/src/gui/modules/uiAntiJesus.ts @@ -8,34 +8,34 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiANTIJESUS(antijesusResult: ModalFormResponse, player: Player) { if (!antijesusResult || antijesusResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiJesusToggle] = antijesusResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f アンチ・イエスを構成するためには、Paradoxに陥る必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Jesus`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiJesusToggle === true) { - // 許可する + // Allow configuration.modules.jesusA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6JesusA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6JesusA§f!`); JesusA(); } if (AntiJesusToggle === false) { - // 拒否する + // Deny configuration.modules.jesusA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4JesusA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4JesusA§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiKillaura.ts b/src/gui/modules/uiAntiKillaura.ts index 44dd2d1..29ab22b 100644 --- a/src/gui/modules/uiAntiKillaura.ts +++ b/src/gui/modules/uiAntiKillaura.ts @@ -16,7 +16,7 @@ import ConfigInterface from "../../interfaces/Config"; export function uiANTIKILLAURA(antikillauraResult: ModalFormResponse, player: Player) { handleUIAntiKillAura(antikillauraResult, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -29,32 +29,32 @@ export function uiANTIKILLAURA(antikillauraResult: ModalFormResponse, player: Pl async function handleUIAntiKillAura(antikillauraResult: ModalFormResponse, player: Player) { if (!antikillauraResult || antikillauraResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiKillAuraToggle] = antikillauraResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f アンチ・キラウラを設定するには、Paradox・オップである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Killaura`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiKillAuraToggle === false) { - // 拒否する + // Deny configuration.modules.antiKillAura.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4AntiKillAura§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiKillAura§f!`); } else if (AntiKillAuraToggle === true) { - // 許可する + // Allow configuration.modules.antiKillAura.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6AntiKillAura§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiKillAura§f!`); KillAura(); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiKnockback.ts b/src/gui/modules/uiAntiKnockback.ts index 66c5903..b99c34c 100644 --- a/src/gui/modules/uiAntiKnockback.ts +++ b/src/gui/modules/uiAntiKnockback.ts @@ -16,7 +16,7 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiANTIKNOCKBACK(antiknockbackResult: ModalFormResponse, player: Player) { handleUIAntiKnockback(antiknockbackResult, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -29,34 +29,34 @@ export function uiANTIKNOCKBACK(antiknockbackResult: ModalFormResponse, player: async function handleUIAntiKnockback(antiknockbackResult: ModalFormResponse, player: Player) { if (!antiknockbackResult || antiknockbackResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiKnockBackToggle] = antiknockbackResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチノックバックの設定にはParadox・オッ プが必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Knockback`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiKnockBackToggle === true) { - // 許可する + // Allow configuration.modules.antikbA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Anti Knockback§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Anti Knockback§f!`); AntiKnockbackA(); } if (AntiKnockBackToggle === false) { - // 拒否する + // Deny configuration.modules.antikbA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Anti Knockback§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Anti Knockback§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiNuker.ts b/src/gui/modules/uiAntiNuker.ts index 4179a04..7d347a0 100644 --- a/src/gui/modules/uiAntiNuker.ts +++ b/src/gui/modules/uiAntiNuker.ts @@ -8,33 +8,33 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiANTINUKER(antinukerResult: ModalFormResponse, player: Player) { if (!antinukerResult || antinukerResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiNukerToggle] = antinukerResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチ・ヌーカーの設定にはParadox・オップが必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Nuker`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiNukerToggle === true) { - // 許可する + // Allow configuration.modules.antinukerA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6AntiNukerA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiNukerA§f!`); BeforeNukerA(); } if (AntiNukerToggle === false) { configuration.modules.antinukerA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4AntiNukerA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiNukerA§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiPhase.ts b/src/gui/modules/uiAntiPhase.ts index 4b080cd..1ddda4b 100644 --- a/src/gui/modules/uiAntiPhase.ts +++ b/src/gui/modules/uiAntiPhase.ts @@ -8,34 +8,34 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiANTIPHASE(antiphaseResult: ModalFormResponse, player: Player) { if (!antiphaseResult || antiphaseResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const [AntiPhaseToggle] = antiphaseResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f アンチフェイズを設定するには、Paradox・オプ状態にする必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Phase`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiPhaseToggle === true) { - // 許可する + // Allow configuration.modules.antiphaseA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6AntiPhaseA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiPhaseA§f!`); AntiPhaseA(); } if (AntiPhaseToggle === false) { configuration.modules.antiphaseA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4AntiPhaseA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiPhaseA§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiScaffold.ts b/src/gui/modules/uiAntiScaffold.ts index 0973e59..cd5c706 100644 --- a/src/gui/modules/uiAntiScaffold.ts +++ b/src/gui/modules/uiAntiScaffold.ts @@ -16,7 +16,7 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiANTISCAFFOLD(antiscaffoldResult: ModalFormResponse, player: Player) { handleUIAntiScaffold(antiscaffoldResult, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -29,34 +29,34 @@ export function uiANTISCAFFOLD(antiscaffoldResult: ModalFormResponse, player: Pl async function handleUIAntiScaffold(antiscaffoldResult: ModalFormResponse, player: Player) { if (!antiscaffoldResult || antiscaffoldResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiScaffoldToggle] = antiscaffoldResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fアンチ・スカフォールドを設定するには、Paradox・オッピングが必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Scaffold`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiScaffoldToggle === true) { - // 許可する + // Allow configuration.modules.antiscaffoldA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6AntiScaffoldA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6AntiScaffoldA§f!`); ScaffoldA(); } if (AntiScaffoldToggle === false) { - // 拒否する + // Deny configuration.modules.antiscaffoldA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4AntiScaffoldA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4AntiScaffoldA§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiShulker.ts b/src/gui/modules/uiAntiShulker.ts index 53475de..09ca4cc 100644 --- a/src/gui/modules/uiAntiShulker.ts +++ b/src/gui/modules/uiAntiShulker.ts @@ -8,33 +8,33 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiANTISHULKER(antishulkerResult: ModalFormResponse, player: Player) { if (!antishulkerResult || antishulkerResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiShulkerToggle] = antishulkerResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f アンチ・シュルカーを設定するためには、Paradox・オプテッドである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Shulker`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiShulkerToggle === true) { - // 許可する + // Allow configuration.modules.antishulker.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Anti-Shulkers§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Anti-Shulkers§f!`); } if (AntiShulkerToggle === false) { - // 拒否する + // Deny configuration.modules.antishulker.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Anti-Shulkers§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Anti-Shulkers§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiAntiSpam.ts b/src/gui/modules/uiAntiSpam.ts index e39e51d..dcf5a76 100644 --- a/src/gui/modules/uiAntiSpam.ts +++ b/src/gui/modules/uiAntiSpam.ts @@ -8,34 +8,34 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiANTISPAM(antispamResult: ModalFormResponse, player: Player) { if (!antispamResult || antispamResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AntiSpamToggle] = antispamResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f迷惑メール対策を設定するには、Paradox-Oppedが必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Anti Spam`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AntiSpamToggle === true) { - /// 許可する + /// Allow configuration.modules.antispam.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Anti Spam§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Anti Spam§f!`); beforeAntiSpam(); } if (AntiSpamToggle === false) { - // 拒否する + // Deny configuration.modules.antispam.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Anti Spam§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Anti Spam§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiBadpackets.ts b/src/gui/modules/uiBadpackets.ts index e026fa6..10b66d4 100644 --- a/src/gui/modules/uiBadpackets.ts +++ b/src/gui/modules/uiBadpackets.ts @@ -9,45 +9,45 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiBADPACKETS(badpacketsResult: ModalFormResponse, player: Player) { if (!badpacketsResult || badpacketsResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [BadPackets1Toggle, BadPackets2Toggle] = badpacketsResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fバッドパケットを設定するには、Paradox・オップである必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Badpackets`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (BadPackets1Toggle === true && configuration.modules.badpackets1.enabled === false) { - // 許可する + // Allow configuration.modules.badpackets1.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Badpackets1§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Badpackets1§f!`); BadPackets1(); } if (BadPackets1Toggle === false && configuration.modules.badpackets1.enabled === true) { - // 拒否する + // Deny configuration.modules.badpackets1.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Badpackets1§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Badpackets1§f!`); } if (BadPackets2Toggle === true && configuration.modules.badpackets2.enabled === false) { - // 許可する + // Allow configuration.modules.badpackets2.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Badpackets2§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Badpackets2§f!`); BadPackets2(); } if (BadPackets2Toggle === false && configuration.modules.badpackets2.enabled === true) { - // 拒否する + // Deny configuration.modules.badpackets2.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Badpackets2§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Badpackets2§f!`); } dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiBedrockValidation.ts b/src/gui/modules/uiBedrockValidation.ts index d7c8905..43bf32b 100644 --- a/src/gui/modules/uiBedrockValidation.ts +++ b/src/gui/modules/uiBedrockValidation.ts @@ -8,34 +8,34 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiBEDROCKVALIDATION(bedrockvalidationResult: ModalFormResponse, player: Player) { if (!bedrockvalidationResult || bedrockvalidationResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [BedrockValidationToggle] = bedrockvalidationResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f岩盤検証の設定には Paradox-Opped が必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Bedrock Validation`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (BedrockValidationToggle === true) { - // 許可する + // Allow configuration.modules.bedrockValidate.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6BedrockValidate§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6BedrockValidate§f!`); BedrockValidate(); } if (BedrockValidationToggle === false) { - // 拒否する + // Deny configuration.modules.bedrockValidate.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4BedrockValidate§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4BedrockValidate§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiCommandBlocks.ts b/src/gui/modules/uiCommandBlocks.ts index c2cdd47..6cba455 100644 --- a/src/gui/modules/uiCommandBlocks.ts +++ b/src/gui/modules/uiCommandBlocks.ts @@ -15,7 +15,7 @@ import { ScoreManager } from "../../classes/ScoreManager.js"; export function uiCOMMANDBLOCKS(commandblocksResult: ModalFormResponse, player: Player) { handleUICommandBlocks(commandblocksResult, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -28,15 +28,15 @@ export function uiCOMMANDBLOCKS(commandblocksResult: ModalFormResponse, player: async function handleUICommandBlocks(commandblocksResult: ModalFormResponse, player: Player) { if (!commandblocksResult || commandblocksResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [CommandBlockOverrideToggle, RemoveCommandBlocksToggle] = commandblocksResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ダイナミック・プロパティ・ブール値の取得 - //現在のスコアを得る + // Get Dynamic Property Boolean + //get the current scores const cmdsscore = ScoreManager.getScore("cmds", player); const commandblocksscore = ScoreManager.getScore("commandblocks", player); let removecmdblocksBoolean; @@ -55,32 +55,32 @@ async function handleUICommandBlocks(commandblocksResult: ModalFormResponse, pla removecmdblocksBoolean = true; } - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fコマンドブロックを設定するには、Paradox・オップである必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Command Blocks`); } if (CommandBlockOverrideToggle === true && cmdoBoolean === false) { - // 許可する + // Allow player.runCommand(`scoreboard players set paradox:config cmds 1`); sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has set CommandBlocksEnabled as §6enabled§f!`); } if (CommandBlockOverrideToggle === false && cmdoBoolean === true) { - // 拒否する + // Deny player.runCommand(`scoreboard players set paradox:config cmds 2`); sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has set CommandBlocksEnabled as §4disabled§f!`); } player.runCommand(`scoreboard players operation @a cmds = paradox:config cmds`); if (RemoveCommandBlocksToggle === true && removecmdblocksBoolean === false) { - // 許可する + // Allow player.runCommand(`scoreboard players set paradox:config commandblocks 1`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Anti Command Blocks§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Anti Command Blocks§f!`); } if (RemoveCommandBlocksToggle === false && removecmdblocksBoolean === true) { - // 拒否する + // Deny player.runCommand(`scoreboard players set paradox:config commandblocks 0`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Anti Command Blocks§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Anti Command Blocks§f!`); } player.runCommand(`scoreboard players operation @a commandblocks = paradox:config commandblocks`); - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiEnchantedArmor.ts b/src/gui/modules/uiEnchantedArmor.ts index 1317ebb..acb1073 100644 --- a/src/gui/modules/uiEnchantedArmor.ts +++ b/src/gui/modules/uiEnchantedArmor.ts @@ -14,7 +14,7 @@ import { paradoxui } from "../paradoxui.js"; export function uiENCHANTEDARMOR(enchantedarmorResult: ModalFormResponse, player: Player) { handleUIEnchantedArmor(enchantedarmorResult, player).catch((error) => { console.error("Paradox Unhandled Rejection: ", error); - // スタックトレース情報の抽出 + // Extract stack trace information if (error instanceof Error) { const stackLines = error.stack.split("\n"); if (stackLines.length > 1) { @@ -27,28 +27,28 @@ export function uiENCHANTEDARMOR(enchantedarmorResult: ModalFormResponse, player async function handleUIEnchantedArmor(enchantedarmorResult: ModalFormResponse, player: Player) { if (!enchantedarmorResult || enchantedarmorResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [EnchantedArmorToggle] = enchantedarmorResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f エンチャント・アーマーを設定するには、Paradox・オッ プする必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Enchanted Armor`); } if (EnchantedArmorToggle === true) { - // 許可する + // Allow player.runCommand(`scoreboard players set paradox:config encharmor 1`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Anti Enchanted Armor§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Anti Enchanted Armor§f!`); } if (EnchantedArmorToggle === false) { - // 拒否する + // Deny player.runCommand(`scoreboard players set paradox:config encharmor 0`); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Anti Enchanted Armor§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Anti Enchanted Armor§f!`); } player.runCommand(`scoreboard players operation @a encharmor = paradox:config encharmor`); - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiExpSalvageSystem.ts b/src/gui/modules/uiExpSalvageSystem.ts index 03a7287..caece99 100644 --- a/src/gui/modules/uiExpSalvageSystem.ts +++ b/src/gui/modules/uiExpSalvageSystem.ts @@ -7,34 +7,34 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiEXPSALVAGESYSTEM(expsalvagesystemResult: ModalFormResponse, player: Player) { if (!expsalvagesystemResult || expsalvagesystemResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [ExpSalvageSystemToggle] = expsalvagesystemResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Expサルベージシステムを設定するには、Paradox・オプする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Exp Salvage System`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (ExpSalvageSystemToggle === true) { - // 許可する + // Allow configuration.modules.salvage.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Salvage§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Salvage§f!`); } if (ExpSalvageSystemToggle === false) { - // 拒否する + // Deny configuration.modules.salvage.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); world.setDynamicProperty("salvage_b", false); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Salvage§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Salvage§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiGamemodes.ts b/src/gui/modules/uiGamemodes.ts index 3390325..90ea2d9 100644 --- a/src/gui/modules/uiGamemodes.ts +++ b/src/gui/modules/uiGamemodes.ts @@ -10,82 +10,82 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiGAMEMODES(gamemodeResult: ModalFormResponse, player: Player) { if (!gamemodeResult || gamemodeResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [AdventureGM, CreativeGM, SurvivalGM] = gamemodeResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fゲームモードを設定するには、Paradox-Oppedになる必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure gamemodes`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (AdventureGM === true && CreativeGM === true && SurvivalGM === true) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f全てのゲームモードを無効にすることはできません!`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You can't disable all gamemodes!`); } - //アドベンチャー・ゲームモード + //Adventure gamemode if (AdventureGM === true && configuration.modules.adventureGM.enabled === false) { - // 許可する + // Allow configuration.modules.adventureGM.enabled = true; - // すべてがロックされた場合、深刻な問題を引き起こす可能性があるため、少なくとも1つは許可されていることを確認する。 - // この場合、アドベンチャー・モードを許可する + // Make sure at least one is allowed since this could cause serious issues if all were locked down + // We will allow Adventure Mode in this case if (configuration.modules.survivalGM.enabled === true && configuration.modules.creativeGM.enabled === true) { configuration.modules.adventureGM.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f全てのゲームモードが禁止されたため、アドベンチャーモードがBooleanになりました。`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f Since all gamemodes were disallowed, Adventure mode has been enabled.`); Adventure(); } sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disallowed §4Gamemode 2 (Adventure)§f to be used!`); Adventure(); } if (AdventureGM === false && configuration.modules.adventureGM.enabled === true) { - // 拒否する + // Deny configuration.modules.adventureGM.enabled = false; sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has allowed §6Gamemode 2 (Adventure)§f to be used!`); } - //クリエイティブなゲームモード + //Creative gamemode if (CreativeGM === true && configuration.modules.creativeGM.enabled === false) { - // 許可する + // Allow configuration.modules.creativeGM.enabled = true; - // すべてがロックされた場合、深刻な問題を引き起こす可能性があるため、少なくとも1つは許可されていることを確認する。 - // この場合、アドベンチャー・モードを許可する + // Make sure at least one is allowed since this could cause serious issues if all were locked down + // We will allow Adventure Mode in this case if (configuration.modules.adventureGM.enabled === true && configuration.modules.survivalGM.enabled === false) { configuration.modules.adventureGM.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f全てのゲームモードが使用不可となったため、アドベンチャーモ ードを使用可能にしました。`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f Since all gamemodes were disallowed, Adventure mode has been enabled.`); Adventure(); } sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disallowed §4Gamemode 1 (Creative)§f to be used!`); Creative(); } if (CreativeGM === false && configuration.modules.creativeGM.enabled === true) { - // 拒否する + // Deny configuration.modules.creativeGM.enabled = false; sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has allowed §6Gamemode 1 (Creative)§f to be used!`); } if (SurvivalGM === true && configuration.modules.survivalGM.enabled === false) { - // 許可する + // Allow configuration.modules.survivalGM.enabled = true; - // すべてがロックされた場合、深刻な問題を引き起こす可能性があるため、少なくとも1つは許可されていることを確認する。 - // この場合、アドベンチャー・モードを許可する + // Make sure at least one is allowed since this could cause serious issues if all were locked down + // We will allow Adventure Mode in this case if (configuration.modules.adventureGM.enabled === true && configuration.modules.creativeGM.enabled === true) { configuration.modules.adventureGM.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f全てのゲームモードが禁止されたため、アドベンチャーモードがBooleanになりました。`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f Since all gamemodes were disallowed, Adventure mode has been enabled.`); Adventure(); } sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disallowed §4Gamemode 0 (Survival)§f to be used!`); Survival(); } if (SurvivalGM === false && configuration.modules.survivalGM.enabled === true) { - // 拒否する + // Deny configuration.modules.survivalGM.enabled = false; sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has allowed §6Gamemode 0 (Survival)§f to be used!`); } dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - //メインUIをプレイヤーに表示する。 + //show the main ui to the player one complete. return paradoxui(player); } diff --git a/src/gui/modules/uiHotbar.ts b/src/gui/modules/uiHotbar.ts index 5baf64d..c0ccc22 100644 --- a/src/gui/modules/uiHotbar.ts +++ b/src/gui/modules/uiHotbar.ts @@ -7,21 +7,21 @@ import { paradoxui } from "../paradoxui.js"; import ConfigInterface from "../../interfaces/Config.js"; const configMessageBackup = new WeakMap(); -// ダミーオブジェクト +// Dummy object const dummy: object = []; export function uiHOTBAR(hotbarResult: ModalFormResponse, player: Player) { if (!hotbarResult || hotbarResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [HotbarMessage, HotbarToggle, HotbarRestDefaultMessageToggle] = hotbarResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fホットバーを設定するには、Paradox-Opped にする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure the hotbar`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -30,21 +30,21 @@ export function uiHOTBAR(hotbarResult: ModalFormResponse, player: Player) { configMessageBackup.set(dummy, configuration.modules.hotbar.message); } if (HotbarToggle === true && HotbarRestDefaultMessageToggle === false) { - // 許可する + // Allow configuration.modules.hotbar.enabled = true; configuration.modules.hotbar.message = HotbarMessage as string; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§7${player.name}§f Boolean=> §6Hotbar`); + sendMsg("@a[tag=paradoxOpped]", `§7${player.name}§f has enabled §6Hotbar`); Hotbar(); } if (HotbarToggle === false) { - // 拒否する + // Deny configuration.modules.hotbar.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§7${player.name}§f 無効=> §6Hotbar`); + sendMsg("@a[tag=paradoxOpped]", `§7${player.name}§f has disabled §6Hotbar`); } if (HotbarToggle === false && HotbarRestDefaultMessageToggle === true) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fメッセージをリセットするには、ホットバーのトグルをBooleanにする必要があります!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to enable the hotbar toggle to reset the message!`); return paradoxui(player); } if (HotbarToggle === true && HotbarRestDefaultMessageToggle === true) { @@ -53,6 +53,6 @@ export function uiHOTBAR(hotbarResult: ModalFormResponse, player: Player) { Hotbar(); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiIllegaItems.ts b/src/gui/modules/uiIllegaItems.ts index 7a0d7b7..804ad68 100644 --- a/src/gui/modules/uiIllegaItems.ts +++ b/src/gui/modules/uiIllegaItems.ts @@ -10,16 +10,16 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiILLEGALITEMS(illegalitemsResult: ModalFormResponse, player: Player) { if (!illegalitemsResult || illegalitemsResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [IllegalItemsAToggle, IllegalItemsBToggle, IllegalItemsCToggle, IllegalEnchanmentsToggle, IllegalLoreToggle, IllegalStackBanToggle] = illegalitemsResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 違法アイテムの設定には、Paradox・オプが必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Illegal Items`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -32,77 +32,77 @@ export function uiILLEGALITEMS(illegalitemsResult: ModalFormResponse, player: Pl const stackBanBoolean = configuration.modules.stackBan.enabled; if (IllegalItemsAToggle === true && illegalItemsABoolean === false) { - // 許可する + // Allow configuration.modules.illegalitemsA.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6IllegalItemsA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalItemsA§f!`); IllegalItemsA(); } if (IllegalItemsAToggle === false && illegalItemsABoolean === true) { configuration.modules.illegalitemsA.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4IllegalItemsA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalItemsA§f!`); } if (IllegalItemsBToggle === true && illegalItemsBBoolean === false) { - // 許可する + // Allow configuration.modules.illegalitemsB.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6IllegalItemsB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalItemsB§f!`); IllegalItemsB(); } if (IllegalItemsBToggle === false && illegalItemsBBoolean === true) { - // 拒否する + // Deny configuration.modules.illegalitemsB.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4IllegalItemsB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalItemsB§f!`); } if (IllegalItemsCToggle === true && illegalItemsCBoolean === false) { - // 許可する + // Allow configuration.modules.illegalitemsC.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6IllegalItemsC§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalItemsC§f!`); IllegalItemsC(); } if (IllegalItemsCToggle === false && illegalItemsABoolean === true) { - // 拒否する + // Deny configuration.modules.illegalitemsC.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4IllegalItemsC§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalItemsC§f!`); } if (IllegalEnchanmentsToggle === true && illegalEnchantmentBoolean === false) { configuration.modules.illegalEnchantment.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6IllegalEnchantments§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalEnchantments§f!`); } if (IllegalEnchanmentsToggle === false && illegalEnchantmentBoolean === true) { configuration.modules.illegalEnchantment.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4IllegalEnchantments§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalEnchantments§f!`); } if (IllegalLoreToggle === true && illegalLoresBoolean === false) { - // 許可する + // Allow configuration.modules.illegalLores.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6IllegalLores§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6IllegalLores§f!`); } if (IllegalLoreToggle === false && illegalLoresBoolean === true) { - // 拒否する + // Deny configuration.modules.illegalLores.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4IllegalLores§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4IllegalLores§f!`); } - //違法アイテムがオンになっていることを確認する + //Check to make sure that Illegal Items are on if (!IllegalItemsAToggle === true && !IllegalItemsBToggle === true && !IllegalItemsCToggle === true && IllegalStackBanToggle === true) { - // 念のため電源を切っておく! + // Turn it off just incase! configuration.modules.stackBan.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fこの機能を使うには、Illegal ItemsをBooleanにする必要があります。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to enable Illegal Items to use this feature.`); return paradoxui(player); } if (IllegalStackBanToggle === true && stackBanBoolean === false) { - // 許可する + // Allow configuration.modules.stackBan.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6StackBans§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6StackBans§f!`); } if (IllegalStackBanToggle === false && stackBanBoolean === true) { - // 拒否する + // Deny configuration.modules.stackBan.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4StackBans§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4StackBans§f!`); } dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiInvalidSprint.ts b/src/gui/modules/uiInvalidSprint.ts index e99b303..2dc4973 100644 --- a/src/gui/modules/uiInvalidSprint.ts +++ b/src/gui/modules/uiInvalidSprint.ts @@ -8,34 +8,34 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiINVALIDSPRINT(invalidsprintResult: ModalFormResponse, player: Player) { if (!invalidsprintResult || invalidsprintResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [InvalidSprintToggle] = invalidsprintResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 無効なスプリントを設定するには、Paradox・オップである必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Invalid Sprint`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (InvalidSprintToggle === true) { - // 許可する + // Allow configuration.modules.invalidsprintA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6InvalidSprintA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6InvalidSprintA§f!`); InvalidSprintA(); } if (InvalidSprintToggle === false) { configuration.modules.invalidsprintA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4InvalidSprintA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4InvalidSprintA§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiLagClear.ts b/src/gui/modules/uiLagClear.ts index 15b0148..cf8dd38 100644 --- a/src/gui/modules/uiLagClear.ts +++ b/src/gui/modules/uiLagClear.ts @@ -8,34 +8,34 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiLAGCLEAR(lagclearResult: ModalFormResponse, player: Player) { if (!lagclearResult || lagclearResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [LagClearToggle] = lagclearResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f「クリアラグ」を設定するには、Paradox・オップである必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Clear Lag`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (LagClearToggle === true) { - // 許可する + // Allow configuration.modules.clearLag.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6ClearLag§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6ClearLag§f!`); ClearLag(); } if (LagClearToggle === false) { - // 拒否する + // Deny configuration.modules.clearLag.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4ClearLag§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4ClearLag§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiNameSpoofing.ts b/src/gui/modules/uiNameSpoofing.ts index 5eb68b8..6082495 100644 --- a/src/gui/modules/uiNameSpoofing.ts +++ b/src/gui/modules/uiNameSpoofing.ts @@ -9,49 +9,49 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiNAMESPOOFING(namespoofingResult: ModalFormResponse, player: Player) { if (!namespoofingResult || namespoofingResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [NameSpoofAToggle, NameSpoofBToggle] = namespoofingResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f名前スプーフィングを設定するには、Paradox・オッピングが必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Name Spoofing`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const nameSpoofABoolean = configuration.modules.namespoofA.enabled; const nameSpoofBBoolean = configuration.modules.namespoofB.enabled; if (NameSpoofAToggle === true && nameSpoofABoolean === false) { - // 許可する + // Allow configuration.modules.namespoofA.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6NamespoofA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6NamespoofA§f!`); NamespoofA(); } if (NameSpoofAToggle === false && nameSpoofABoolean === true) { - // 拒否する + // Deny configuration.modules.namespoofA.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4NamespoofA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4NamespoofA§f!`); } if (NameSpoofBToggle === true && nameSpoofBBoolean === false) { - // 許可する + // Allow configuration.modules.namespoofB.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6NamespoofB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6NamespoofB§f!`); NamespoofB; } if (NameSpoofBToggle === false && nameSpoofBBoolean === true) { - // 拒否する + // Deny configuration.modules.namespoofB.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4NamespoofB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4NamespoofB§f!`); } dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiOnePlayerSleep.ts b/src/gui/modules/uiOnePlayerSleep.ts index 55f5fba..d3541f4 100644 --- a/src/gui/modules/uiOnePlayerSleep.ts +++ b/src/gui/modules/uiOnePlayerSleep.ts @@ -8,16 +8,16 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiOPS(opsResult: ModalFormResponse, player: Player) { if (!opsResult || opsResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [OnePlayerSleepToggle] = opsResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f OPSを設定するには、Paradox・オップである必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure OPS`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -25,16 +25,16 @@ export function uiOPS(opsResult: ModalFormResponse, player: Player) { if (OnePlayerSleepToggle === true) { configuration.modules.ops.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6OPS§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6OPS§f!`); OPS(); } if (OnePlayerSleepToggle === false) { - // 拒否する + // Deny configuration.modules.ops.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4OPS§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4OPS§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiReach.ts b/src/gui/modules/uiReach.ts index f4a8271..aade045 100644 --- a/src/gui/modules/uiReach.ts +++ b/src/gui/modules/uiReach.ts @@ -9,49 +9,49 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiREACH(reachResult: ModalFormResponse, player: Player) { if (!reachResult || reachResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [ReachAToggle, ReachBToggle] = reachResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fリーチを設定するには、Paradox・オップである必要がある。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Reach`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const reachABoolean = configuration.modules.reachA.enabled; const reachBBoolean = configuration.modules.reachB.enabled; if (ReachAToggle === true && reachABoolean === false) { - // 許可する + // Allow configuration.modules.reachA.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6ReachA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6ReachA§f!`); BeforeReachA(); } if (ReachAToggle === false && reachABoolean === true) { - // 拒否する + // Deny configuration.modules.reachA.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4ReachA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4ReachA§f!`); } if (ReachBToggle === true && reachBBoolean === false) { - // 許可する + // Allow configuration.modules.reachB.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6ReachB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6ReachB§f!`); ReachB(); } if (ReachBToggle === false && reachBBoolean === true) { - // 拒否する + // Deny configuration.modules.reachB.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4ReachB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4ReachB§f!`); } dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiSpammer.ts b/src/gui/modules/uiSpammer.ts index 7a139f5..5b74e6a 100644 --- a/src/gui/modules/uiSpammer.ts +++ b/src/gui/modules/uiSpammer.ts @@ -10,61 +10,61 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiSPAMMER(spamResult: ModalFormResponse, player: Player) { if (!spamResult || spamResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [SpammerAToggle, SpammerBToggle, SpammerCToggle] = spamResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f スパマーを設定するには、Paradox・オッピングが必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Spammer`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; - // ダイナミック・プロパティ・ブール値の取得 + // Get Dynamic Property Boolean const spammerABoolean = configuration.modules.spammerA.enabled; const spammerBBoolean = configuration.modules.spammerB.enabled; const spammerCBoolean = configuration.modules.spammerC.enabled; if (SpammerAToggle === true && spammerABoolean === false) { - // 許可する + // Allow configuration.modules.spammerA.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6SpammerA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6SpammerA§f!`); SpammerA(); } if (SpammerAToggle === false && spammerABoolean === true) { - //拒否する + //Deny configuration.modules.spammerA.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4SpammerA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4SpammerA§f!`); } if (SpammerBToggle === true && spammerBBoolean === false) { - // 許可する + // Allow configuration.modules.spammerB.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6SpammerB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6SpammerB§f!`); SpammerB(); } if (SpammerBToggle === false && spammerBBoolean === true) { - // 拒否する + // Deny configuration.modules.spammerB.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4SpammerB§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4SpammerB§f!`); } if (SpammerCToggle === true && spammerCBoolean === false) { - // 許可する + // Allow configuration.modules.spammerC.enabled = true; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6SpammerC§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6SpammerC§f!`); SpammerC(); } if (SpammerCToggle === false && spammerCBoolean === true) { - // 拒否する + // Deny configuration.modules.spammerC.enabled = false; - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4SpammerC§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4SpammerC§f!`); } dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiSpeed.ts b/src/gui/modules/uiSpeed.ts index 870a92b..d0de3d2 100644 --- a/src/gui/modules/uiSpeed.ts +++ b/src/gui/modules/uiSpeed.ts @@ -9,34 +9,34 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiSPEED(speedResult: ModalFormResponse, player: Player) { if (!speedResult || speedResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [SpeedToggle] = speedResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f SpeedA を設定するには、Paradox-Opped にする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure SpeedA`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (SpeedToggle === true) { - // 許可する + // Allow configuration.modules.speedA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6SpeedA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6SpeedA§f!`); SpeedA(); } if (SpeedToggle === false) { - // 拒否する + // Deny configuration.modules.speedA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4SpeedA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4SpeedA§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiWorldborder.ts b/src/gui/modules/uiWorldborder.ts index d8479da..35d3563 100644 --- a/src/gui/modules/uiWorldborder.ts +++ b/src/gui/modules/uiWorldborder.ts @@ -8,16 +8,16 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiWORLDBORDER(worldborderResult: ModalFormResponse, player: Player) { if (!worldborderResult || worldborderResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [OverworldValueTextfield, NetherValueTextfield, EndValueTextfield, WorldBorderToggle] = worldborderResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fワールド・ボーダーを設定するには、Paradox・オッピングが必要です。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure World Borders`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; @@ -37,9 +37,9 @@ export function uiWORLDBORDER(worldborderResult: ModalFormResponse, player: Play configuration.modules.worldBorder.nether = 0; configuration.modules.worldBorder.end = 0; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> the §6World Border§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled the §6World Border§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uiXray.ts b/src/gui/modules/uiXray.ts index 884d56c..4c346c5 100644 --- a/src/gui/modules/uiXray.ts +++ b/src/gui/modules/uiXray.ts @@ -8,34 +8,34 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiXRAY(xrayResult: ModalFormResponse, player: Player) { if (!xrayResult || xrayResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [XrayToggle] = xrayResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§Xray を設定するには Paradox-Opped にする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Xray`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (XrayToggle === true) { - // 許可する + // Allow configuration.modules.xrayA.enabled = true; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6XrayA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6XrayA§f!`); XrayA(); } if (XrayToggle === false) { - // 拒否する + // Deny configuration.modules.xrayA.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4XrayA§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4XrayA§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/modules/uispawnProtections.ts b/src/gui/modules/uispawnProtections.ts index 0905542..0cd8476 100644 --- a/src/gui/modules/uispawnProtections.ts +++ b/src/gui/modules/uispawnProtections.ts @@ -8,38 +8,38 @@ import ConfigInterface from "../../interfaces/Config.js"; export function uiSpawnProtection(spawnProtectionResult: ModalFormResponse, player: Player) { if (!spawnProtectionResult || spawnProtectionResult.canceled) { - // キャンセルされたフォームまたは未定義の結果を処理する + // Handle canceled form or undefined result return; } const [spawnProtectionToggle, spawnProtection_X, spawnProtection_Y, spawnProtection_Z, spawnProtection_Radius] = spawnProtectionResult.formValues; - // ユニークIDの取得 + // Get unique ID const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - // ユーザーにコマンドを実行する権限があることを確認する。 + // Make sure the user has permissions to run the command if (uniqueId !== player.name) { - return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§fスポーンプロテクションを設定するには、Paradoxオプする必要があります。`); + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You need to be Paradox-Opped to configure Spawn Protection`); } const configuration = dynamicPropertyRegistry.getProperty(undefined, "paradoxConfig") as ConfigInterface; if (spawnProtectionToggle === true) { - // 許可する + // Allow configuration.modules.spawnprotection.enabled = true; const vector3 = new Vector(Number(spawnProtection_X), Number(spawnProtection_Y), Number(spawnProtection_Z)); configuration.modules.spawnprotection.enabled = true; configuration.modules.spawnprotection.vector3 = vector3; configuration.modules.spawnprotection.radius = Math.abs(Number(spawnProtection_Radius)); dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f Boolean=> §6Spawn Protection§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has enabled §6Spawn Protection§f!`); SpawnProtection(); } if (spawnProtectionToggle === false) { - // 拒否する + // Deny configuration.modules.spawnprotection.enabled = false; dynamicPropertyRegistry.setProperty(undefined, "paradoxConfig", configuration); - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f 無効=> §4Spawn Protection§f!`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${player.name}§f has disabled §4Spawn Protection§f!`); } - //完了したら、プレイヤーにメインUIを表示する。 + //show the main ui to the player once complete. return paradoxui(player); } diff --git a/src/gui/paradoxui.ts b/src/gui/paradoxui.ts index 6064b8c..5c25035 100644 --- a/src/gui/paradoxui.ts +++ b/src/gui/paradoxui.ts @@ -12,7 +12,6 @@ import { modulesui } from "./guiHandler/guiHandlerModules/modulesui"; import { prefixHandler } from "./guiHandler/results/prefix"; import { statsHandler } from "./guiHandler/results/stats"; import { chatChannelMainMenu } from "./guiHandler/results/chatChannelsMenu"; -import { inventoryHandler } from "./guiHandler/guiHandlerModeration/results/inventoryui"; import { managePlayerSavedLocationsHandler } from "./guiHandler/guiHandlerModeration/results/managePlayersSavedLocations"; /** @@ -39,26 +38,25 @@ async function handleParadoxUI(player: Player) { const hash = player.getDynamicProperty("hash"); const salt = player.getDynamicProperty("salt"); const uniqueId = dynamicPropertyRegistry.getProperty(player, player?.id); - maingui.title("§4メニュー§4"); - maingui.body("§eこのメニューではTPリクエストや座標を保存そして報告機能が使えます!§e\n" + "§fVersion: §2" + versionFile.version); + maingui.title("§4Paradox§4"); + maingui.body("§eA utility to fight against malicious hackers on Bedrock Edition§e\n" + "§fVersion: §2" + versionFile.version); if (uniqueId !== player.name) { - maingui.button("管理者", "textures/ui/op"); - maingui.button("TPリクエスト!", "textures/blocks/portal_placeholder"); - maingui.button("座標保存", "textures/items/compass_item"); - maingui.button("報告!", "textures/items/paper"); + maingui.button("Op", "textures/ui/op"); + maingui.button("Teleport Requests", "textures/blocks/portal_placeholder"); + maingui.button("Saved Locations", "textures/items/compass_item"); + maingui.button("Report", "textures/items/paper"); + maingui.button("Chat Channels", "textures/ui/mute_off"); } else { - maingui.button("オペレーター", "textures/ui/op"); - maingui.button("権限剝奪", "textures/items/ender_pearl"); - maingui.button("管理者メニュー", "textures/items/book_normal"); - maingui.button("アンチチート設定", "textures/blocks/command_block"); - maingui.button("起動文字変更", "textures/ui/UpdateGlyph"); - maingui.button("TPリクエスト", "textures/blocks/portal_placeholder"); - maingui.button("座標保存", "textures/items/compass_item"); - maingui.button("ユーザーログ", "textures/items/book_normal"); - maingui.button("報告!", "textures/items/paper"); - maingui.button("インベントリ確認", "textures/blocks/chest_front"); - maingui.button("パーティー", "textures/ui/mute_off"); - maingui.button("ユーザーの座標管理", "textures/items/compass_item"); + maingui.button("Op", "textures/ui/op"); + maingui.button("Deop", "textures/items/ender_pearl"); + maingui.button("Moderation", "textures/items/book_normal"); + maingui.button("Modules", "textures/blocks/command_block"); + maingui.button("Prefix", "textures/ui/UpdateGlyph"); + maingui.button("Teleport Requests", "textures/blocks/portal_placeholder"); + maingui.button("Saved Locations", "textures/items/compass_item"); + maingui.button("Stats", "textures/items/book_normal"); + maingui.button("Chat Channels", "textures/ui/mute_off"); + maingui.button("Manage Players Saved Locations", "textures/items/compass_item"); } maingui .show(player) @@ -79,6 +77,9 @@ async function handleParadoxUI(player: Player) { case 3: reportHandler(player); break; + case 4: + chatChannelMainMenu(player); + break; default: // Handle other selections for isUnique case break; @@ -110,15 +111,9 @@ async function handleParadoxUI(player: Player) { statsHandler(player); break; case 8: - reportHandler(player); - break; - case 9: - inventoryHandler(player); - break; - case 10: chatChannelMainMenu(player); break; - case 11: + case 9: managePlayerSavedLocationsHandler(player); break; default: diff --git a/src/gui/playerui/uiReport.ts b/src/gui/playerui/uiReport.ts index 7b76f6e..e631b5b 100644 --- a/src/gui/playerui/uiReport.ts +++ b/src/gui/playerui/uiReport.ts @@ -19,20 +19,20 @@ export function UIREPORTPLAYER(reportplayerResult: ModalFormResponse, onlineList if (!member) { sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f !report §f`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f プレイヤーが存在しない又はオフラインです`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Couldn't find that player!`); return; } // Make sure they dont report themselves if (member === player) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f自分自身には実行できません.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cannot report yourself.`); return; } - sendMsgToPlayer(player, `§r§4[§6Paradox§4]§r ${member.name}§rが報告されました報告内容=> ${reason}`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Reported §7${member.name}§f with reason: §7${reason}§f`); - sendMsg("@a[tag=notify]", `§r§4[§6Paradox§4]§r ${player.name}§r が ${member.name}§r宛てに報告しました!報告内容=> ${reason}`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f §7${player.name}§f has reported §7${member.name}§f with reason: §7${reason}§f`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 報告内容を相手に送信できました`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Your Report has been sent.`); return; } diff --git a/src/gui/playerui/uiSavedLocations.ts b/src/gui/playerui/uiSavedLocations.ts index 38f2a03..9188762 100644 --- a/src/gui/playerui/uiSavedLocations.ts +++ b/src/gui/playerui/uiSavedLocations.ts @@ -31,7 +31,7 @@ export function uiSAVEDLOCATIONS(savedlocationsResult: ModalFormResponse, Locati } if (teleportToSelectedLocation && deleteSelectedLocation === true) { //If both toggles are enabled the message bellow will be sent to the player and the UI will be dispalyed. - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 場所をテレポートしたり削除したりすることはできません。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You cant teleport and delete the location!`); return paradoxui(player); } if (teleportToSelectedLocation === true) { @@ -47,7 +47,7 @@ export function uiSAVEDLOCATIONS(savedlocationsResult: ModalFormResponse, Locati keepVelocity: false, } ); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f TPしました`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Welcome back!`); return player; } if (deleteSelectedLocation === true) { @@ -64,7 +64,7 @@ export function uiSAVEDLOCATIONS(savedlocationsResult: ModalFormResponse, Locati } if (tags[i].startsWith("LocationHome:" && Locations[selectedLocationvalue as number] + " X", 13)) { player.removeTag(encryptedString); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f '§7${Locations[selectedLocationvalue as number]}§f'座標が正常に削除されました!`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Successfully deleted home '§7${Locations[selectedLocationvalue as number]}§f'!`); break; } } @@ -80,12 +80,12 @@ export function uiSAVEDLOCATIONS(savedlocationsResult: ModalFormResponse, Locati counter = ++counter; } if (coordArray[i].includes("LocationHome:" + newLocationName)) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f この名前はすでに存在します。もう一度お試しください。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f This name already exists please try again.`); return paradoxui(player); } //Check to make sure they havent exceeded the max locations in config.js if (counter >= configuration.modules.setHome.max) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f §7${configuration.modules.setHome.max}§f 場所を保存できる上限です`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You can only have §7${configuration.modules.setHome.max}§f saved locations at a time!`); return paradoxui(player); } continue; @@ -103,7 +103,7 @@ export function uiSAVEDLOCATIONS(savedlocationsResult: ModalFormResponse, Locati //Check to make sure there are no spaces in the name that has been entered. if (typeof newLocationName === "string" && newLocationName.includes(" ")) { doSave = false; - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 名前にはスペースを入れないでください`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f No spaces in names please!`); return paradoxui(player); } // Save which dimension they were in @@ -116,13 +116,14 @@ export function uiSAVEDLOCATIONS(savedlocationsResult: ModalFormResponse, Locati doSave = true; } if (player.dimension.id === "minecraft:the_end") { - doSave = true; + doSave = false; + return sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Not allowed to save a location in this dimension!`); } if (doSave === true) { const decryptedLocationString = `LocationHome:${newLocationName} X:${currentX} Y:${currentY} Z:${currentZ} Dimension:${currentDimension}`; const security = (world as WorldExtended).encryptString(decryptedLocationString, salt as string); player.addTag(security); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 座標を保存しました`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f New Location has been saved.`); } } diff --git a/src/gui/showrules/showrules.ts b/src/gui/showrules/showrules.ts index e69573e..cff1d62 100644 --- a/src/gui/showrules/showrules.ts +++ b/src/gui/showrules/showrules.ts @@ -47,22 +47,22 @@ async function showrules(id: number) { } const form = new MessageFormData(); - form.title("ルール"); + form.title("Server Rules"); form.body(CompleteRules); - form.button1("はい"); - form.button2("いいえ"); + form.button1("I Agree"); + form.button2("Decline"); const r = await form.show(player); if (r.selection === 0) { playersAwaitingResponse.delete(player.id); // Player has responded, remove from set. player.removeTag("ShowRulesOnJoin"); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f ルールを呼んでくれてありがとう!! ${player.name}.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Thank you for accepting the rules §7${player.name}§f.`); return; } if (r.selection === 1) { playersAwaitingResponse.delete(player.id); // Player has responded, remove from set. if (configuration.modules.showrules.kick === true) { - const reason = "ルールに同意してくれなかった為キックされました"; + const reason = "You must agree to the rules to join."; player.runCommandAsync(`kick "${player.name}" §f\n\n${reason}`).catch(() => { kickablePlayers.add(player); player.triggerEvent("paradox:kick"); diff --git a/src/node_modules/.package-lock.json b/src/node_modules/.package-lock.json index 79aa953..de460cc 100644 --- a/src/node_modules/.package-lock.json +++ b/src/node_modules/.package-lock.json @@ -4,9 +4,9 @@ "requires": true, "packages": { "node_modules/@minecraft/vanilla-data": { - "version": "1.20.50", - "resolved": "https://registry.npmjs.org/@minecraft/vanilla-data/-/vanilla-data-1.20.50.tgz", - "integrity": "sha512-LMnx1iuP7iKLh3ypQEOOh00wAS2r3dGXpMnxzAHpAnHbNq5339sO/gz++bjGw4acG3EXSP7IujCgF3q2/BR+nA==" + "version": "1.20.60", + "resolved": "https://registry.npmjs.org/@minecraft/vanilla-data/-/vanilla-data-1.20.60.tgz", + "integrity": "sha512-hG7H7FhbKGrnq6Ak1fgN2HiZTNTgNmLluJdw7Y9Ctq5DXVw4Ywv/VQ1UswNe+n/j+RsvVRCLd5Hk7MXbnGAdog==" }, "node_modules/crypto-es": { "version": "2.1.0", diff --git a/src/node_modules/@minecraft/vanilla-data/lib/index.d.ts b/src/node_modules/@minecraft/vanilla-data/lib/index.d.ts index 69edb9c..4db9fdd 100644 --- a/src/node_modules/@minecraft/vanilla-data/lib/index.d.ts +++ b/src/node_modules/@minecraft/vanilla-data/lib/index.d.ts @@ -1,7 +1,9 @@ +export * from './mojang-biome'; export * from './mojang-block'; export * from './mojang-cameraPresets'; export * from './mojang-dimension'; export * from './mojang-effect'; export * from './mojang-enchantment'; export * from './mojang-entity'; +export * from './mojang-feature'; export * from './mojang-item'; diff --git a/src/node_modules/@minecraft/vanilla-data/lib/index.js b/src/node_modules/@minecraft/vanilla-data/lib/index.js index a1a94b1..a22ae34 100644 --- a/src/node_modules/@minecraft/vanilla-data/lib/index.js +++ b/src/node_modules/@minecraft/vanilla-data/lib/index.js @@ -7,4 +7,4 @@ /* ***************************************************************************** Copyright (c) Microsoft Corporation. ***************************************************************************** */ -var MinecraftBlockTypes=(MinecraftBlockTypes2=>{MinecraftBlockTypes2["AcaciaButton"]="minecraft:acacia_button";MinecraftBlockTypes2["AcaciaDoor"]="minecraft:acacia_door";MinecraftBlockTypes2["AcaciaFence"]="minecraft:acacia_fence";MinecraftBlockTypes2["AcaciaFenceGate"]="minecraft:acacia_fence_gate";MinecraftBlockTypes2["AcaciaHangingSign"]="minecraft:acacia_hanging_sign";MinecraftBlockTypes2["AcaciaLog"]="minecraft:acacia_log";MinecraftBlockTypes2["AcaciaPlanks"]="minecraft:acacia_planks";MinecraftBlockTypes2["AcaciaPressurePlate"]="minecraft:acacia_pressure_plate";MinecraftBlockTypes2["AcaciaStairs"]="minecraft:acacia_stairs";MinecraftBlockTypes2["AcaciaStandingSign"]="minecraft:acacia_standing_sign";MinecraftBlockTypes2["AcaciaTrapdoor"]="minecraft:acacia_trapdoor";MinecraftBlockTypes2["AcaciaWallSign"]="minecraft:acacia_wall_sign";MinecraftBlockTypes2["ActivatorRail"]="minecraft:activator_rail";MinecraftBlockTypes2["Air"]="minecraft:air";MinecraftBlockTypes2["Allow"]="minecraft:allow";MinecraftBlockTypes2["AmethystBlock"]="minecraft:amethyst_block";MinecraftBlockTypes2["AmethystCluster"]="minecraft:amethyst_cluster";MinecraftBlockTypes2["AncientDebris"]="minecraft:ancient_debris";MinecraftBlockTypes2["Andesite"]="minecraft:andesite";MinecraftBlockTypes2["AndesiteStairs"]="minecraft:andesite_stairs";MinecraftBlockTypes2["Anvil"]="minecraft:anvil";MinecraftBlockTypes2["Azalea"]="minecraft:azalea";MinecraftBlockTypes2["AzaleaLeaves"]="minecraft:azalea_leaves";MinecraftBlockTypes2["AzaleaLeavesFlowered"]="minecraft:azalea_leaves_flowered";MinecraftBlockTypes2["Bamboo"]="minecraft:bamboo";MinecraftBlockTypes2["BambooBlock"]="minecraft:bamboo_block";MinecraftBlockTypes2["BambooButton"]="minecraft:bamboo_button";MinecraftBlockTypes2["BambooDoor"]="minecraft:bamboo_door";MinecraftBlockTypes2["BambooDoubleSlab"]="minecraft:bamboo_double_slab";MinecraftBlockTypes2["BambooFence"]="minecraft:bamboo_fence";MinecraftBlockTypes2["BambooFenceGate"]="minecraft:bamboo_fence_gate";MinecraftBlockTypes2["BambooHangingSign"]="minecraft:bamboo_hanging_sign";MinecraftBlockTypes2["BambooMosaic"]="minecraft:bamboo_mosaic";MinecraftBlockTypes2["BambooMosaicDoubleSlab"]="minecraft:bamboo_mosaic_double_slab";MinecraftBlockTypes2["BambooMosaicSlab"]="minecraft:bamboo_mosaic_slab";MinecraftBlockTypes2["BambooMosaicStairs"]="minecraft:bamboo_mosaic_stairs";MinecraftBlockTypes2["BambooPlanks"]="minecraft:bamboo_planks";MinecraftBlockTypes2["BambooPressurePlate"]="minecraft:bamboo_pressure_plate";MinecraftBlockTypes2["BambooSapling"]="minecraft:bamboo_sapling";MinecraftBlockTypes2["BambooSlab"]="minecraft:bamboo_slab";MinecraftBlockTypes2["BambooStairs"]="minecraft:bamboo_stairs";MinecraftBlockTypes2["BambooStandingSign"]="minecraft:bamboo_standing_sign";MinecraftBlockTypes2["BambooTrapdoor"]="minecraft:bamboo_trapdoor";MinecraftBlockTypes2["BambooWallSign"]="minecraft:bamboo_wall_sign";MinecraftBlockTypes2["Barrel"]="minecraft:barrel";MinecraftBlockTypes2["Barrier"]="minecraft:barrier";MinecraftBlockTypes2["Basalt"]="minecraft:basalt";MinecraftBlockTypes2["Beacon"]="minecraft:beacon";MinecraftBlockTypes2["Bed"]="minecraft:bed";MinecraftBlockTypes2["Bedrock"]="minecraft:bedrock";MinecraftBlockTypes2["BeeNest"]="minecraft:bee_nest";MinecraftBlockTypes2["Beehive"]="minecraft:beehive";MinecraftBlockTypes2["Beetroot"]="minecraft:beetroot";MinecraftBlockTypes2["Bell"]="minecraft:bell";MinecraftBlockTypes2["BigDripleaf"]="minecraft:big_dripleaf";MinecraftBlockTypes2["BirchButton"]="minecraft:birch_button";MinecraftBlockTypes2["BirchDoor"]="minecraft:birch_door";MinecraftBlockTypes2["BirchFence"]="minecraft:birch_fence";MinecraftBlockTypes2["BirchFenceGate"]="minecraft:birch_fence_gate";MinecraftBlockTypes2["BirchHangingSign"]="minecraft:birch_hanging_sign";MinecraftBlockTypes2["BirchLog"]="minecraft:birch_log";MinecraftBlockTypes2["BirchPlanks"]="minecraft:birch_planks";MinecraftBlockTypes2["BirchPressurePlate"]="minecraft:birch_pressure_plate";MinecraftBlockTypes2["BirchStairs"]="minecraft:birch_stairs";MinecraftBlockTypes2["BirchStandingSign"]="minecraft:birch_standing_sign";MinecraftBlockTypes2["BirchTrapdoor"]="minecraft:birch_trapdoor";MinecraftBlockTypes2["BirchWallSign"]="minecraft:birch_wall_sign";MinecraftBlockTypes2["BlackCandle"]="minecraft:black_candle";MinecraftBlockTypes2["BlackCandleCake"]="minecraft:black_candle_cake";MinecraftBlockTypes2["BlackCarpet"]="minecraft:black_carpet";MinecraftBlockTypes2["BlackConcrete"]="minecraft:black_concrete";MinecraftBlockTypes2["BlackConcretePowder"]="minecraft:black_concrete_powder";MinecraftBlockTypes2["BlackGlazedTerracotta"]="minecraft:black_glazed_terracotta";MinecraftBlockTypes2["BlackShulkerBox"]="minecraft:black_shulker_box";MinecraftBlockTypes2["BlackStainedGlass"]="minecraft:black_stained_glass";MinecraftBlockTypes2["BlackStainedGlassPane"]="minecraft:black_stained_glass_pane";MinecraftBlockTypes2["BlackTerracotta"]="minecraft:black_terracotta";MinecraftBlockTypes2["BlackWool"]="minecraft:black_wool";MinecraftBlockTypes2["Blackstone"]="minecraft:blackstone";MinecraftBlockTypes2["BlackstoneDoubleSlab"]="minecraft:blackstone_double_slab";MinecraftBlockTypes2["BlackstoneSlab"]="minecraft:blackstone_slab";MinecraftBlockTypes2["BlackstoneStairs"]="minecraft:blackstone_stairs";MinecraftBlockTypes2["BlackstoneWall"]="minecraft:blackstone_wall";MinecraftBlockTypes2["BlastFurnace"]="minecraft:blast_furnace";MinecraftBlockTypes2["BlueCandle"]="minecraft:blue_candle";MinecraftBlockTypes2["BlueCandleCake"]="minecraft:blue_candle_cake";MinecraftBlockTypes2["BlueCarpet"]="minecraft:blue_carpet";MinecraftBlockTypes2["BlueConcrete"]="minecraft:blue_concrete";MinecraftBlockTypes2["BlueConcretePowder"]="minecraft:blue_concrete_powder";MinecraftBlockTypes2["BlueGlazedTerracotta"]="minecraft:blue_glazed_terracotta";MinecraftBlockTypes2["BlueIce"]="minecraft:blue_ice";MinecraftBlockTypes2["BlueShulkerBox"]="minecraft:blue_shulker_box";MinecraftBlockTypes2["BlueStainedGlass"]="minecraft:blue_stained_glass";MinecraftBlockTypes2["BlueStainedGlassPane"]="minecraft:blue_stained_glass_pane";MinecraftBlockTypes2["BlueTerracotta"]="minecraft:blue_terracotta";MinecraftBlockTypes2["BlueWool"]="minecraft:blue_wool";MinecraftBlockTypes2["BoneBlock"]="minecraft:bone_block";MinecraftBlockTypes2["Bookshelf"]="minecraft:bookshelf";MinecraftBlockTypes2["BorderBlock"]="minecraft:border_block";MinecraftBlockTypes2["BrainCoral"]="minecraft:brain_coral";MinecraftBlockTypes2["BrewingStand"]="minecraft:brewing_stand";MinecraftBlockTypes2["BrickBlock"]="minecraft:brick_block";MinecraftBlockTypes2["BrickStairs"]="minecraft:brick_stairs";MinecraftBlockTypes2["BrownCandle"]="minecraft:brown_candle";MinecraftBlockTypes2["BrownCandleCake"]="minecraft:brown_candle_cake";MinecraftBlockTypes2["BrownCarpet"]="minecraft:brown_carpet";MinecraftBlockTypes2["BrownConcrete"]="minecraft:brown_concrete";MinecraftBlockTypes2["BrownConcretePowder"]="minecraft:brown_concrete_powder";MinecraftBlockTypes2["BrownGlazedTerracotta"]="minecraft:brown_glazed_terracotta";MinecraftBlockTypes2["BrownMushroom"]="minecraft:brown_mushroom";MinecraftBlockTypes2["BrownMushroomBlock"]="minecraft:brown_mushroom_block";MinecraftBlockTypes2["BrownShulkerBox"]="minecraft:brown_shulker_box";MinecraftBlockTypes2["BrownStainedGlass"]="minecraft:brown_stained_glass";MinecraftBlockTypes2["BrownStainedGlassPane"]="minecraft:brown_stained_glass_pane";MinecraftBlockTypes2["BrownTerracotta"]="minecraft:brown_terracotta";MinecraftBlockTypes2["BrownWool"]="minecraft:brown_wool";MinecraftBlockTypes2["BubbleColumn"]="minecraft:bubble_column";MinecraftBlockTypes2["BubbleCoral"]="minecraft:bubble_coral";MinecraftBlockTypes2["BuddingAmethyst"]="minecraft:budding_amethyst";MinecraftBlockTypes2["Cactus"]="minecraft:cactus";MinecraftBlockTypes2["Cake"]="minecraft:cake";MinecraftBlockTypes2["Calcite"]="minecraft:calcite";MinecraftBlockTypes2["CalibratedSculkSensor"]="minecraft:calibrated_sculk_sensor";MinecraftBlockTypes2["Camera"]="minecraft:camera";MinecraftBlockTypes2["Campfire"]="minecraft:campfire";MinecraftBlockTypes2["Candle"]="minecraft:candle";MinecraftBlockTypes2["CandleCake"]="minecraft:candle_cake";MinecraftBlockTypes2["Carrots"]="minecraft:carrots";MinecraftBlockTypes2["CartographyTable"]="minecraft:cartography_table";MinecraftBlockTypes2["CarvedPumpkin"]="minecraft:carved_pumpkin";MinecraftBlockTypes2["Cauldron"]="minecraft:cauldron";MinecraftBlockTypes2["CaveVines"]="minecraft:cave_vines";MinecraftBlockTypes2["CaveVinesBodyWithBerries"]="minecraft:cave_vines_body_with_berries";MinecraftBlockTypes2["CaveVinesHeadWithBerries"]="minecraft:cave_vines_head_with_berries";MinecraftBlockTypes2["Chain"]="minecraft:chain";MinecraftBlockTypes2["ChainCommandBlock"]="minecraft:chain_command_block";MinecraftBlockTypes2["ChemicalHeat"]="minecraft:chemical_heat";MinecraftBlockTypes2["ChemistryTable"]="minecraft:chemistry_table";MinecraftBlockTypes2["CherryButton"]="minecraft:cherry_button";MinecraftBlockTypes2["CherryDoor"]="minecraft:cherry_door";MinecraftBlockTypes2["CherryDoubleSlab"]="minecraft:cherry_double_slab";MinecraftBlockTypes2["CherryFence"]="minecraft:cherry_fence";MinecraftBlockTypes2["CherryFenceGate"]="minecraft:cherry_fence_gate";MinecraftBlockTypes2["CherryHangingSign"]="minecraft:cherry_hanging_sign";MinecraftBlockTypes2["CherryLeaves"]="minecraft:cherry_leaves";MinecraftBlockTypes2["CherryLog"]="minecraft:cherry_log";MinecraftBlockTypes2["CherryPlanks"]="minecraft:cherry_planks";MinecraftBlockTypes2["CherryPressurePlate"]="minecraft:cherry_pressure_plate";MinecraftBlockTypes2["CherrySapling"]="minecraft:cherry_sapling";MinecraftBlockTypes2["CherrySlab"]="minecraft:cherry_slab";MinecraftBlockTypes2["CherryStairs"]="minecraft:cherry_stairs";MinecraftBlockTypes2["CherryStandingSign"]="minecraft:cherry_standing_sign";MinecraftBlockTypes2["CherryTrapdoor"]="minecraft:cherry_trapdoor";MinecraftBlockTypes2["CherryWallSign"]="minecraft:cherry_wall_sign";MinecraftBlockTypes2["CherryWood"]="minecraft:cherry_wood";MinecraftBlockTypes2["Chest"]="minecraft:chest";MinecraftBlockTypes2["ChiseledBookshelf"]="minecraft:chiseled_bookshelf";MinecraftBlockTypes2["ChiseledCopper"]="minecraft:chiseled_copper";MinecraftBlockTypes2["ChiseledDeepslate"]="minecraft:chiseled_deepslate";MinecraftBlockTypes2["ChiseledNetherBricks"]="minecraft:chiseled_nether_bricks";MinecraftBlockTypes2["ChiseledPolishedBlackstone"]="minecraft:chiseled_polished_blackstone";MinecraftBlockTypes2["ChiseledTuff"]="minecraft:chiseled_tuff";MinecraftBlockTypes2["ChiseledTuffBricks"]="minecraft:chiseled_tuff_bricks";MinecraftBlockTypes2["ChorusFlower"]="minecraft:chorus_flower";MinecraftBlockTypes2["ChorusPlant"]="minecraft:chorus_plant";MinecraftBlockTypes2["Clay"]="minecraft:clay";MinecraftBlockTypes2["ClientRequestPlaceholderBlock"]="minecraft:client_request_placeholder_block";MinecraftBlockTypes2["CoalBlock"]="minecraft:coal_block";MinecraftBlockTypes2["CoalOre"]="minecraft:coal_ore";MinecraftBlockTypes2["CobbledDeepslate"]="minecraft:cobbled_deepslate";MinecraftBlockTypes2["CobbledDeepslateDoubleSlab"]="minecraft:cobbled_deepslate_double_slab";MinecraftBlockTypes2["CobbledDeepslateSlab"]="minecraft:cobbled_deepslate_slab";MinecraftBlockTypes2["CobbledDeepslateStairs"]="minecraft:cobbled_deepslate_stairs";MinecraftBlockTypes2["CobbledDeepslateWall"]="minecraft:cobbled_deepslate_wall";MinecraftBlockTypes2["Cobblestone"]="minecraft:cobblestone";MinecraftBlockTypes2["CobblestoneWall"]="minecraft:cobblestone_wall";MinecraftBlockTypes2["Cocoa"]="minecraft:cocoa";MinecraftBlockTypes2["ColoredTorchBp"]="minecraft:colored_torch_bp";MinecraftBlockTypes2["ColoredTorchRg"]="minecraft:colored_torch_rg";MinecraftBlockTypes2["CommandBlock"]="minecraft:command_block";MinecraftBlockTypes2["Composter"]="minecraft:composter";MinecraftBlockTypes2["Conduit"]="minecraft:conduit";MinecraftBlockTypes2["CopperBlock"]="minecraft:copper_block";MinecraftBlockTypes2["CopperBulb"]="minecraft:copper_bulb";MinecraftBlockTypes2["CopperDoor"]="minecraft:copper_door";MinecraftBlockTypes2["CopperGrate"]="minecraft:copper_grate";MinecraftBlockTypes2["CopperOre"]="minecraft:copper_ore";MinecraftBlockTypes2["CopperTrapdoor"]="minecraft:copper_trapdoor";MinecraftBlockTypes2["CoralBlock"]="minecraft:coral_block";MinecraftBlockTypes2["CoralFan"]="minecraft:coral_fan";MinecraftBlockTypes2["CoralFanDead"]="minecraft:coral_fan_dead";MinecraftBlockTypes2["CoralFanHang"]="minecraft:coral_fan_hang";MinecraftBlockTypes2["CoralFanHang2"]="minecraft:coral_fan_hang2";MinecraftBlockTypes2["CoralFanHang3"]="minecraft:coral_fan_hang3";MinecraftBlockTypes2["CrackedDeepslateBricks"]="minecraft:cracked_deepslate_bricks";MinecraftBlockTypes2["CrackedDeepslateTiles"]="minecraft:cracked_deepslate_tiles";MinecraftBlockTypes2["CrackedNetherBricks"]="minecraft:cracked_nether_bricks";MinecraftBlockTypes2["CrackedPolishedBlackstoneBricks"]="minecraft:cracked_polished_blackstone_bricks";MinecraftBlockTypes2["Crafter"]="minecraft:crafter";MinecraftBlockTypes2["CraftingTable"]="minecraft:crafting_table";MinecraftBlockTypes2["CrimsonButton"]="minecraft:crimson_button";MinecraftBlockTypes2["CrimsonDoor"]="minecraft:crimson_door";MinecraftBlockTypes2["CrimsonDoubleSlab"]="minecraft:crimson_double_slab";MinecraftBlockTypes2["CrimsonFence"]="minecraft:crimson_fence";MinecraftBlockTypes2["CrimsonFenceGate"]="minecraft:crimson_fence_gate";MinecraftBlockTypes2["CrimsonFungus"]="minecraft:crimson_fungus";MinecraftBlockTypes2["CrimsonHangingSign"]="minecraft:crimson_hanging_sign";MinecraftBlockTypes2["CrimsonHyphae"]="minecraft:crimson_hyphae";MinecraftBlockTypes2["CrimsonNylium"]="minecraft:crimson_nylium";MinecraftBlockTypes2["CrimsonPlanks"]="minecraft:crimson_planks";MinecraftBlockTypes2["CrimsonPressurePlate"]="minecraft:crimson_pressure_plate";MinecraftBlockTypes2["CrimsonRoots"]="minecraft:crimson_roots";MinecraftBlockTypes2["CrimsonSlab"]="minecraft:crimson_slab";MinecraftBlockTypes2["CrimsonStairs"]="minecraft:crimson_stairs";MinecraftBlockTypes2["CrimsonStandingSign"]="minecraft:crimson_standing_sign";MinecraftBlockTypes2["CrimsonStem"]="minecraft:crimson_stem";MinecraftBlockTypes2["CrimsonTrapdoor"]="minecraft:crimson_trapdoor";MinecraftBlockTypes2["CrimsonWallSign"]="minecraft:crimson_wall_sign";MinecraftBlockTypes2["CryingObsidian"]="minecraft:crying_obsidian";MinecraftBlockTypes2["CutCopper"]="minecraft:cut_copper";MinecraftBlockTypes2["CutCopperSlab"]="minecraft:cut_copper_slab";MinecraftBlockTypes2["CutCopperStairs"]="minecraft:cut_copper_stairs";MinecraftBlockTypes2["CyanCandle"]="minecraft:cyan_candle";MinecraftBlockTypes2["CyanCandleCake"]="minecraft:cyan_candle_cake";MinecraftBlockTypes2["CyanCarpet"]="minecraft:cyan_carpet";MinecraftBlockTypes2["CyanConcrete"]="minecraft:cyan_concrete";MinecraftBlockTypes2["CyanConcretePowder"]="minecraft:cyan_concrete_powder";MinecraftBlockTypes2["CyanGlazedTerracotta"]="minecraft:cyan_glazed_terracotta";MinecraftBlockTypes2["CyanShulkerBox"]="minecraft:cyan_shulker_box";MinecraftBlockTypes2["CyanStainedGlass"]="minecraft:cyan_stained_glass";MinecraftBlockTypes2["CyanStainedGlassPane"]="minecraft:cyan_stained_glass_pane";MinecraftBlockTypes2["CyanTerracotta"]="minecraft:cyan_terracotta";MinecraftBlockTypes2["CyanWool"]="minecraft:cyan_wool";MinecraftBlockTypes2["DarkOakButton"]="minecraft:dark_oak_button";MinecraftBlockTypes2["DarkOakDoor"]="minecraft:dark_oak_door";MinecraftBlockTypes2["DarkOakFence"]="minecraft:dark_oak_fence";MinecraftBlockTypes2["DarkOakFenceGate"]="minecraft:dark_oak_fence_gate";MinecraftBlockTypes2["DarkOakHangingSign"]="minecraft:dark_oak_hanging_sign";MinecraftBlockTypes2["DarkOakLog"]="minecraft:dark_oak_log";MinecraftBlockTypes2["DarkOakPlanks"]="minecraft:dark_oak_planks";MinecraftBlockTypes2["DarkOakPressurePlate"]="minecraft:dark_oak_pressure_plate";MinecraftBlockTypes2["DarkOakStairs"]="minecraft:dark_oak_stairs";MinecraftBlockTypes2["DarkOakTrapdoor"]="minecraft:dark_oak_trapdoor";MinecraftBlockTypes2["DarkPrismarineStairs"]="minecraft:dark_prismarine_stairs";MinecraftBlockTypes2["DarkoakStandingSign"]="minecraft:darkoak_standing_sign";MinecraftBlockTypes2["DarkoakWallSign"]="minecraft:darkoak_wall_sign";MinecraftBlockTypes2["DaylightDetector"]="minecraft:daylight_detector";MinecraftBlockTypes2["DaylightDetectorInverted"]="minecraft:daylight_detector_inverted";MinecraftBlockTypes2["DeadBrainCoral"]="minecraft:dead_brain_coral";MinecraftBlockTypes2["DeadBubbleCoral"]="minecraft:dead_bubble_coral";MinecraftBlockTypes2["DeadFireCoral"]="minecraft:dead_fire_coral";MinecraftBlockTypes2["DeadHornCoral"]="minecraft:dead_horn_coral";MinecraftBlockTypes2["DeadTubeCoral"]="minecraft:dead_tube_coral";MinecraftBlockTypes2["Deadbush"]="minecraft:deadbush";MinecraftBlockTypes2["DecoratedPot"]="minecraft:decorated_pot";MinecraftBlockTypes2["Deepslate"]="minecraft:deepslate";MinecraftBlockTypes2["DeepslateBrickDoubleSlab"]="minecraft:deepslate_brick_double_slab";MinecraftBlockTypes2["DeepslateBrickSlab"]="minecraft:deepslate_brick_slab";MinecraftBlockTypes2["DeepslateBrickStairs"]="minecraft:deepslate_brick_stairs";MinecraftBlockTypes2["DeepslateBrickWall"]="minecraft:deepslate_brick_wall";MinecraftBlockTypes2["DeepslateBricks"]="minecraft:deepslate_bricks";MinecraftBlockTypes2["DeepslateCoalOre"]="minecraft:deepslate_coal_ore";MinecraftBlockTypes2["DeepslateCopperOre"]="minecraft:deepslate_copper_ore";MinecraftBlockTypes2["DeepslateDiamondOre"]="minecraft:deepslate_diamond_ore";MinecraftBlockTypes2["DeepslateEmeraldOre"]="minecraft:deepslate_emerald_ore";MinecraftBlockTypes2["DeepslateGoldOre"]="minecraft:deepslate_gold_ore";MinecraftBlockTypes2["DeepslateIronOre"]="minecraft:deepslate_iron_ore";MinecraftBlockTypes2["DeepslateLapisOre"]="minecraft:deepslate_lapis_ore";MinecraftBlockTypes2["DeepslateRedstoneOre"]="minecraft:deepslate_redstone_ore";MinecraftBlockTypes2["DeepslateTileDoubleSlab"]="minecraft:deepslate_tile_double_slab";MinecraftBlockTypes2["DeepslateTileSlab"]="minecraft:deepslate_tile_slab";MinecraftBlockTypes2["DeepslateTileStairs"]="minecraft:deepslate_tile_stairs";MinecraftBlockTypes2["DeepslateTileWall"]="minecraft:deepslate_tile_wall";MinecraftBlockTypes2["DeepslateTiles"]="minecraft:deepslate_tiles";MinecraftBlockTypes2["Deny"]="minecraft:deny";MinecraftBlockTypes2["DetectorRail"]="minecraft:detector_rail";MinecraftBlockTypes2["DiamondBlock"]="minecraft:diamond_block";MinecraftBlockTypes2["DiamondOre"]="minecraft:diamond_ore";MinecraftBlockTypes2["Diorite"]="minecraft:diorite";MinecraftBlockTypes2["DioriteStairs"]="minecraft:diorite_stairs";MinecraftBlockTypes2["Dirt"]="minecraft:dirt";MinecraftBlockTypes2["DirtWithRoots"]="minecraft:dirt_with_roots";MinecraftBlockTypes2["Dispenser"]="minecraft:dispenser";MinecraftBlockTypes2["DoubleCutCopperSlab"]="minecraft:double_cut_copper_slab";MinecraftBlockTypes2["DoublePlant"]="minecraft:double_plant";MinecraftBlockTypes2["DoubleStoneBlockSlab"]="minecraft:double_stone_block_slab";MinecraftBlockTypes2["DoubleStoneBlockSlab2"]="minecraft:double_stone_block_slab2";MinecraftBlockTypes2["DoubleStoneBlockSlab3"]="minecraft:double_stone_block_slab3";MinecraftBlockTypes2["DoubleStoneBlockSlab4"]="minecraft:double_stone_block_slab4";MinecraftBlockTypes2["DoubleWoodenSlab"]="minecraft:double_wooden_slab";MinecraftBlockTypes2["DragonEgg"]="minecraft:dragon_egg";MinecraftBlockTypes2["DriedKelpBlock"]="minecraft:dried_kelp_block";MinecraftBlockTypes2["DripstoneBlock"]="minecraft:dripstone_block";MinecraftBlockTypes2["Dropper"]="minecraft:dropper";MinecraftBlockTypes2["Element0"]="minecraft:element_0";MinecraftBlockTypes2["Element1"]="minecraft:element_1";MinecraftBlockTypes2["Element10"]="minecraft:element_10";MinecraftBlockTypes2["Element100"]="minecraft:element_100";MinecraftBlockTypes2["Element101"]="minecraft:element_101";MinecraftBlockTypes2["Element102"]="minecraft:element_102";MinecraftBlockTypes2["Element103"]="minecraft:element_103";MinecraftBlockTypes2["Element104"]="minecraft:element_104";MinecraftBlockTypes2["Element105"]="minecraft:element_105";MinecraftBlockTypes2["Element106"]="minecraft:element_106";MinecraftBlockTypes2["Element107"]="minecraft:element_107";MinecraftBlockTypes2["Element108"]="minecraft:element_108";MinecraftBlockTypes2["Element109"]="minecraft:element_109";MinecraftBlockTypes2["Element11"]="minecraft:element_11";MinecraftBlockTypes2["Element110"]="minecraft:element_110";MinecraftBlockTypes2["Element111"]="minecraft:element_111";MinecraftBlockTypes2["Element112"]="minecraft:element_112";MinecraftBlockTypes2["Element113"]="minecraft:element_113";MinecraftBlockTypes2["Element114"]="minecraft:element_114";MinecraftBlockTypes2["Element115"]="minecraft:element_115";MinecraftBlockTypes2["Element116"]="minecraft:element_116";MinecraftBlockTypes2["Element117"]="minecraft:element_117";MinecraftBlockTypes2["Element118"]="minecraft:element_118";MinecraftBlockTypes2["Element12"]="minecraft:element_12";MinecraftBlockTypes2["Element13"]="minecraft:element_13";MinecraftBlockTypes2["Element14"]="minecraft:element_14";MinecraftBlockTypes2["Element15"]="minecraft:element_15";MinecraftBlockTypes2["Element16"]="minecraft:element_16";MinecraftBlockTypes2["Element17"]="minecraft:element_17";MinecraftBlockTypes2["Element18"]="minecraft:element_18";MinecraftBlockTypes2["Element19"]="minecraft:element_19";MinecraftBlockTypes2["Element2"]="minecraft:element_2";MinecraftBlockTypes2["Element20"]="minecraft:element_20";MinecraftBlockTypes2["Element21"]="minecraft:element_21";MinecraftBlockTypes2["Element22"]="minecraft:element_22";MinecraftBlockTypes2["Element23"]="minecraft:element_23";MinecraftBlockTypes2["Element24"]="minecraft:element_24";MinecraftBlockTypes2["Element25"]="minecraft:element_25";MinecraftBlockTypes2["Element26"]="minecraft:element_26";MinecraftBlockTypes2["Element27"]="minecraft:element_27";MinecraftBlockTypes2["Element28"]="minecraft:element_28";MinecraftBlockTypes2["Element29"]="minecraft:element_29";MinecraftBlockTypes2["Element3"]="minecraft:element_3";MinecraftBlockTypes2["Element30"]="minecraft:element_30";MinecraftBlockTypes2["Element31"]="minecraft:element_31";MinecraftBlockTypes2["Element32"]="minecraft:element_32";MinecraftBlockTypes2["Element33"]="minecraft:element_33";MinecraftBlockTypes2["Element34"]="minecraft:element_34";MinecraftBlockTypes2["Element35"]="minecraft:element_35";MinecraftBlockTypes2["Element36"]="minecraft:element_36";MinecraftBlockTypes2["Element37"]="minecraft:element_37";MinecraftBlockTypes2["Element38"]="minecraft:element_38";MinecraftBlockTypes2["Element39"]="minecraft:element_39";MinecraftBlockTypes2["Element4"]="minecraft:element_4";MinecraftBlockTypes2["Element40"]="minecraft:element_40";MinecraftBlockTypes2["Element41"]="minecraft:element_41";MinecraftBlockTypes2["Element42"]="minecraft:element_42";MinecraftBlockTypes2["Element43"]="minecraft:element_43";MinecraftBlockTypes2["Element44"]="minecraft:element_44";MinecraftBlockTypes2["Element45"]="minecraft:element_45";MinecraftBlockTypes2["Element46"]="minecraft:element_46";MinecraftBlockTypes2["Element47"]="minecraft:element_47";MinecraftBlockTypes2["Element48"]="minecraft:element_48";MinecraftBlockTypes2["Element49"]="minecraft:element_49";MinecraftBlockTypes2["Element5"]="minecraft:element_5";MinecraftBlockTypes2["Element50"]="minecraft:element_50";MinecraftBlockTypes2["Element51"]="minecraft:element_51";MinecraftBlockTypes2["Element52"]="minecraft:element_52";MinecraftBlockTypes2["Element53"]="minecraft:element_53";MinecraftBlockTypes2["Element54"]="minecraft:element_54";MinecraftBlockTypes2["Element55"]="minecraft:element_55";MinecraftBlockTypes2["Element56"]="minecraft:element_56";MinecraftBlockTypes2["Element57"]="minecraft:element_57";MinecraftBlockTypes2["Element58"]="minecraft:element_58";MinecraftBlockTypes2["Element59"]="minecraft:element_59";MinecraftBlockTypes2["Element6"]="minecraft:element_6";MinecraftBlockTypes2["Element60"]="minecraft:element_60";MinecraftBlockTypes2["Element61"]="minecraft:element_61";MinecraftBlockTypes2["Element62"]="minecraft:element_62";MinecraftBlockTypes2["Element63"]="minecraft:element_63";MinecraftBlockTypes2["Element64"]="minecraft:element_64";MinecraftBlockTypes2["Element65"]="minecraft:element_65";MinecraftBlockTypes2["Element66"]="minecraft:element_66";MinecraftBlockTypes2["Element67"]="minecraft:element_67";MinecraftBlockTypes2["Element68"]="minecraft:element_68";MinecraftBlockTypes2["Element69"]="minecraft:element_69";MinecraftBlockTypes2["Element7"]="minecraft:element_7";MinecraftBlockTypes2["Element70"]="minecraft:element_70";MinecraftBlockTypes2["Element71"]="minecraft:element_71";MinecraftBlockTypes2["Element72"]="minecraft:element_72";MinecraftBlockTypes2["Element73"]="minecraft:element_73";MinecraftBlockTypes2["Element74"]="minecraft:element_74";MinecraftBlockTypes2["Element75"]="minecraft:element_75";MinecraftBlockTypes2["Element76"]="minecraft:element_76";MinecraftBlockTypes2["Element77"]="minecraft:element_77";MinecraftBlockTypes2["Element78"]="minecraft:element_78";MinecraftBlockTypes2["Element79"]="minecraft:element_79";MinecraftBlockTypes2["Element8"]="minecraft:element_8";MinecraftBlockTypes2["Element80"]="minecraft:element_80";MinecraftBlockTypes2["Element81"]="minecraft:element_81";MinecraftBlockTypes2["Element82"]="minecraft:element_82";MinecraftBlockTypes2["Element83"]="minecraft:element_83";MinecraftBlockTypes2["Element84"]="minecraft:element_84";MinecraftBlockTypes2["Element85"]="minecraft:element_85";MinecraftBlockTypes2["Element86"]="minecraft:element_86";MinecraftBlockTypes2["Element87"]="minecraft:element_87";MinecraftBlockTypes2["Element88"]="minecraft:element_88";MinecraftBlockTypes2["Element89"]="minecraft:element_89";MinecraftBlockTypes2["Element9"]="minecraft:element_9";MinecraftBlockTypes2["Element90"]="minecraft:element_90";MinecraftBlockTypes2["Element91"]="minecraft:element_91";MinecraftBlockTypes2["Element92"]="minecraft:element_92";MinecraftBlockTypes2["Element93"]="minecraft:element_93";MinecraftBlockTypes2["Element94"]="minecraft:element_94";MinecraftBlockTypes2["Element95"]="minecraft:element_95";MinecraftBlockTypes2["Element96"]="minecraft:element_96";MinecraftBlockTypes2["Element97"]="minecraft:element_97";MinecraftBlockTypes2["Element98"]="minecraft:element_98";MinecraftBlockTypes2["Element99"]="minecraft:element_99";MinecraftBlockTypes2["EmeraldBlock"]="minecraft:emerald_block";MinecraftBlockTypes2["EmeraldOre"]="minecraft:emerald_ore";MinecraftBlockTypes2["EnchantingTable"]="minecraft:enchanting_table";MinecraftBlockTypes2["EndBrickStairs"]="minecraft:end_brick_stairs";MinecraftBlockTypes2["EndBricks"]="minecraft:end_bricks";MinecraftBlockTypes2["EndGateway"]="minecraft:end_gateway";MinecraftBlockTypes2["EndPortal"]="minecraft:end_portal";MinecraftBlockTypes2["EndPortalFrame"]="minecraft:end_portal_frame";MinecraftBlockTypes2["EndRod"]="minecraft:end_rod";MinecraftBlockTypes2["EndStone"]="minecraft:end_stone";MinecraftBlockTypes2["EnderChest"]="minecraft:ender_chest";MinecraftBlockTypes2["ExposedChiseledCopper"]="minecraft:exposed_chiseled_copper";MinecraftBlockTypes2["ExposedCopper"]="minecraft:exposed_copper";MinecraftBlockTypes2["ExposedCopperBulb"]="minecraft:exposed_copper_bulb";MinecraftBlockTypes2["ExposedCopperDoor"]="minecraft:exposed_copper_door";MinecraftBlockTypes2["ExposedCopperGrate"]="minecraft:exposed_copper_grate";MinecraftBlockTypes2["ExposedCopperTrapdoor"]="minecraft:exposed_copper_trapdoor";MinecraftBlockTypes2["ExposedCutCopper"]="minecraft:exposed_cut_copper";MinecraftBlockTypes2["ExposedCutCopperSlab"]="minecraft:exposed_cut_copper_slab";MinecraftBlockTypes2["ExposedCutCopperStairs"]="minecraft:exposed_cut_copper_stairs";MinecraftBlockTypes2["ExposedDoubleCutCopperSlab"]="minecraft:exposed_double_cut_copper_slab";MinecraftBlockTypes2["Farmland"]="minecraft:farmland";MinecraftBlockTypes2["FenceGate"]="minecraft:fence_gate";MinecraftBlockTypes2["Fire"]="minecraft:fire";MinecraftBlockTypes2["FireCoral"]="minecraft:fire_coral";MinecraftBlockTypes2["FletchingTable"]="minecraft:fletching_table";MinecraftBlockTypes2["FlowerPot"]="minecraft:flower_pot";MinecraftBlockTypes2["FloweringAzalea"]="minecraft:flowering_azalea";MinecraftBlockTypes2["FlowingLava"]="minecraft:flowing_lava";MinecraftBlockTypes2["FlowingWater"]="minecraft:flowing_water";MinecraftBlockTypes2["Frame"]="minecraft:frame";MinecraftBlockTypes2["FrogSpawn"]="minecraft:frog_spawn";MinecraftBlockTypes2["FrostedIce"]="minecraft:frosted_ice";MinecraftBlockTypes2["Furnace"]="minecraft:furnace";MinecraftBlockTypes2["GildedBlackstone"]="minecraft:gilded_blackstone";MinecraftBlockTypes2["Glass"]="minecraft:glass";MinecraftBlockTypes2["GlassPane"]="minecraft:glass_pane";MinecraftBlockTypes2["GlowFrame"]="minecraft:glow_frame";MinecraftBlockTypes2["GlowLichen"]="minecraft:glow_lichen";MinecraftBlockTypes2["Glowingobsidian"]="minecraft:glowingobsidian";MinecraftBlockTypes2["Glowstone"]="minecraft:glowstone";MinecraftBlockTypes2["GoldBlock"]="minecraft:gold_block";MinecraftBlockTypes2["GoldOre"]="minecraft:gold_ore";MinecraftBlockTypes2["GoldenRail"]="minecraft:golden_rail";MinecraftBlockTypes2["Granite"]="minecraft:granite";MinecraftBlockTypes2["GraniteStairs"]="minecraft:granite_stairs";MinecraftBlockTypes2["Grass"]="minecraft:grass";MinecraftBlockTypes2["GrassPath"]="minecraft:grass_path";MinecraftBlockTypes2["Gravel"]="minecraft:gravel";MinecraftBlockTypes2["GrayCandle"]="minecraft:gray_candle";MinecraftBlockTypes2["GrayCandleCake"]="minecraft:gray_candle_cake";MinecraftBlockTypes2["GrayCarpet"]="minecraft:gray_carpet";MinecraftBlockTypes2["GrayConcrete"]="minecraft:gray_concrete";MinecraftBlockTypes2["GrayConcretePowder"]="minecraft:gray_concrete_powder";MinecraftBlockTypes2["GrayGlazedTerracotta"]="minecraft:gray_glazed_terracotta";MinecraftBlockTypes2["GrayShulkerBox"]="minecraft:gray_shulker_box";MinecraftBlockTypes2["GrayStainedGlass"]="minecraft:gray_stained_glass";MinecraftBlockTypes2["GrayStainedGlassPane"]="minecraft:gray_stained_glass_pane";MinecraftBlockTypes2["GrayTerracotta"]="minecraft:gray_terracotta";MinecraftBlockTypes2["GrayWool"]="minecraft:gray_wool";MinecraftBlockTypes2["GreenCandle"]="minecraft:green_candle";MinecraftBlockTypes2["GreenCandleCake"]="minecraft:green_candle_cake";MinecraftBlockTypes2["GreenCarpet"]="minecraft:green_carpet";MinecraftBlockTypes2["GreenConcrete"]="minecraft:green_concrete";MinecraftBlockTypes2["GreenConcretePowder"]="minecraft:green_concrete_powder";MinecraftBlockTypes2["GreenGlazedTerracotta"]="minecraft:green_glazed_terracotta";MinecraftBlockTypes2["GreenShulkerBox"]="minecraft:green_shulker_box";MinecraftBlockTypes2["GreenStainedGlass"]="minecraft:green_stained_glass";MinecraftBlockTypes2["GreenStainedGlassPane"]="minecraft:green_stained_glass_pane";MinecraftBlockTypes2["GreenTerracotta"]="minecraft:green_terracotta";MinecraftBlockTypes2["GreenWool"]="minecraft:green_wool";MinecraftBlockTypes2["Grindstone"]="minecraft:grindstone";MinecraftBlockTypes2["HangingRoots"]="minecraft:hanging_roots";MinecraftBlockTypes2["HardGlass"]="minecraft:hard_glass";MinecraftBlockTypes2["HardGlassPane"]="minecraft:hard_glass_pane";MinecraftBlockTypes2["HardStainedGlass"]="minecraft:hard_stained_glass";MinecraftBlockTypes2["HardStainedGlassPane"]="minecraft:hard_stained_glass_pane";MinecraftBlockTypes2["HardenedClay"]="minecraft:hardened_clay";MinecraftBlockTypes2["HayBlock"]="minecraft:hay_block";MinecraftBlockTypes2["HeavyWeightedPressurePlate"]="minecraft:heavy_weighted_pressure_plate";MinecraftBlockTypes2["HoneyBlock"]="minecraft:honey_block";MinecraftBlockTypes2["HoneycombBlock"]="minecraft:honeycomb_block";MinecraftBlockTypes2["Hopper"]="minecraft:hopper";MinecraftBlockTypes2["HornCoral"]="minecraft:horn_coral";MinecraftBlockTypes2["Ice"]="minecraft:ice";MinecraftBlockTypes2["InfestedDeepslate"]="minecraft:infested_deepslate";MinecraftBlockTypes2["InfoUpdate"]="minecraft:info_update";MinecraftBlockTypes2["InfoUpdate2"]="minecraft:info_update2";MinecraftBlockTypes2["InvisibleBedrock"]="minecraft:invisible_bedrock";MinecraftBlockTypes2["IronBars"]="minecraft:iron_bars";MinecraftBlockTypes2["IronBlock"]="minecraft:iron_block";MinecraftBlockTypes2["IronDoor"]="minecraft:iron_door";MinecraftBlockTypes2["IronOre"]="minecraft:iron_ore";MinecraftBlockTypes2["IronTrapdoor"]="minecraft:iron_trapdoor";MinecraftBlockTypes2["Jigsaw"]="minecraft:jigsaw";MinecraftBlockTypes2["Jukebox"]="minecraft:jukebox";MinecraftBlockTypes2["JungleButton"]="minecraft:jungle_button";MinecraftBlockTypes2["JungleDoor"]="minecraft:jungle_door";MinecraftBlockTypes2["JungleFence"]="minecraft:jungle_fence";MinecraftBlockTypes2["JungleFenceGate"]="minecraft:jungle_fence_gate";MinecraftBlockTypes2["JungleHangingSign"]="minecraft:jungle_hanging_sign";MinecraftBlockTypes2["JungleLog"]="minecraft:jungle_log";MinecraftBlockTypes2["JunglePlanks"]="minecraft:jungle_planks";MinecraftBlockTypes2["JunglePressurePlate"]="minecraft:jungle_pressure_plate";MinecraftBlockTypes2["JungleStairs"]="minecraft:jungle_stairs";MinecraftBlockTypes2["JungleStandingSign"]="minecraft:jungle_standing_sign";MinecraftBlockTypes2["JungleTrapdoor"]="minecraft:jungle_trapdoor";MinecraftBlockTypes2["JungleWallSign"]="minecraft:jungle_wall_sign";MinecraftBlockTypes2["Kelp"]="minecraft:kelp";MinecraftBlockTypes2["Ladder"]="minecraft:ladder";MinecraftBlockTypes2["Lantern"]="minecraft:lantern";MinecraftBlockTypes2["LapisBlock"]="minecraft:lapis_block";MinecraftBlockTypes2["LapisOre"]="minecraft:lapis_ore";MinecraftBlockTypes2["LargeAmethystBud"]="minecraft:large_amethyst_bud";MinecraftBlockTypes2["Lava"]="minecraft:lava";MinecraftBlockTypes2["Leaves"]="minecraft:leaves";MinecraftBlockTypes2["Leaves2"]="minecraft:leaves2";MinecraftBlockTypes2["Lectern"]="minecraft:lectern";MinecraftBlockTypes2["Lever"]="minecraft:lever";MinecraftBlockTypes2["LightBlock"]="minecraft:light_block";MinecraftBlockTypes2["LightBlueCandle"]="minecraft:light_blue_candle";MinecraftBlockTypes2["LightBlueCandleCake"]="minecraft:light_blue_candle_cake";MinecraftBlockTypes2["LightBlueCarpet"]="minecraft:light_blue_carpet";MinecraftBlockTypes2["LightBlueConcrete"]="minecraft:light_blue_concrete";MinecraftBlockTypes2["LightBlueConcretePowder"]="minecraft:light_blue_concrete_powder";MinecraftBlockTypes2["LightBlueGlazedTerracotta"]="minecraft:light_blue_glazed_terracotta";MinecraftBlockTypes2["LightBlueShulkerBox"]="minecraft:light_blue_shulker_box";MinecraftBlockTypes2["LightBlueStainedGlass"]="minecraft:light_blue_stained_glass";MinecraftBlockTypes2["LightBlueStainedGlassPane"]="minecraft:light_blue_stained_glass_pane";MinecraftBlockTypes2["LightBlueTerracotta"]="minecraft:light_blue_terracotta";MinecraftBlockTypes2["LightBlueWool"]="minecraft:light_blue_wool";MinecraftBlockTypes2["LightGrayCandle"]="minecraft:light_gray_candle";MinecraftBlockTypes2["LightGrayCandleCake"]="minecraft:light_gray_candle_cake";MinecraftBlockTypes2["LightGrayCarpet"]="minecraft:light_gray_carpet";MinecraftBlockTypes2["LightGrayConcrete"]="minecraft:light_gray_concrete";MinecraftBlockTypes2["LightGrayConcretePowder"]="minecraft:light_gray_concrete_powder";MinecraftBlockTypes2["LightGrayShulkerBox"]="minecraft:light_gray_shulker_box";MinecraftBlockTypes2["LightGrayStainedGlass"]="minecraft:light_gray_stained_glass";MinecraftBlockTypes2["LightGrayStainedGlassPane"]="minecraft:light_gray_stained_glass_pane";MinecraftBlockTypes2["LightGrayTerracotta"]="minecraft:light_gray_terracotta";MinecraftBlockTypes2["LightGrayWool"]="minecraft:light_gray_wool";MinecraftBlockTypes2["LightWeightedPressurePlate"]="minecraft:light_weighted_pressure_plate";MinecraftBlockTypes2["LightningRod"]="minecraft:lightning_rod";MinecraftBlockTypes2["LimeCandle"]="minecraft:lime_candle";MinecraftBlockTypes2["LimeCandleCake"]="minecraft:lime_candle_cake";MinecraftBlockTypes2["LimeCarpet"]="minecraft:lime_carpet";MinecraftBlockTypes2["LimeConcrete"]="minecraft:lime_concrete";MinecraftBlockTypes2["LimeConcretePowder"]="minecraft:lime_concrete_powder";MinecraftBlockTypes2["LimeGlazedTerracotta"]="minecraft:lime_glazed_terracotta";MinecraftBlockTypes2["LimeShulkerBox"]="minecraft:lime_shulker_box";MinecraftBlockTypes2["LimeStainedGlass"]="minecraft:lime_stained_glass";MinecraftBlockTypes2["LimeStainedGlassPane"]="minecraft:lime_stained_glass_pane";MinecraftBlockTypes2["LimeTerracotta"]="minecraft:lime_terracotta";MinecraftBlockTypes2["LimeWool"]="minecraft:lime_wool";MinecraftBlockTypes2["LitBlastFurnace"]="minecraft:lit_blast_furnace";MinecraftBlockTypes2["LitDeepslateRedstoneOre"]="minecraft:lit_deepslate_redstone_ore";MinecraftBlockTypes2["LitFurnace"]="minecraft:lit_furnace";MinecraftBlockTypes2["LitPumpkin"]="minecraft:lit_pumpkin";MinecraftBlockTypes2["LitRedstoneLamp"]="minecraft:lit_redstone_lamp";MinecraftBlockTypes2["LitRedstoneOre"]="minecraft:lit_redstone_ore";MinecraftBlockTypes2["LitSmoker"]="minecraft:lit_smoker";MinecraftBlockTypes2["Lodestone"]="minecraft:lodestone";MinecraftBlockTypes2["Loom"]="minecraft:loom";MinecraftBlockTypes2["MagentaCandle"]="minecraft:magenta_candle";MinecraftBlockTypes2["MagentaCandleCake"]="minecraft:magenta_candle_cake";MinecraftBlockTypes2["MagentaCarpet"]="minecraft:magenta_carpet";MinecraftBlockTypes2["MagentaConcrete"]="minecraft:magenta_concrete";MinecraftBlockTypes2["MagentaConcretePowder"]="minecraft:magenta_concrete_powder";MinecraftBlockTypes2["MagentaGlazedTerracotta"]="minecraft:magenta_glazed_terracotta";MinecraftBlockTypes2["MagentaShulkerBox"]="minecraft:magenta_shulker_box";MinecraftBlockTypes2["MagentaStainedGlass"]="minecraft:magenta_stained_glass";MinecraftBlockTypes2["MagentaStainedGlassPane"]="minecraft:magenta_stained_glass_pane";MinecraftBlockTypes2["MagentaTerracotta"]="minecraft:magenta_terracotta";MinecraftBlockTypes2["MagentaWool"]="minecraft:magenta_wool";MinecraftBlockTypes2["Magma"]="minecraft:magma";MinecraftBlockTypes2["MangroveButton"]="minecraft:mangrove_button";MinecraftBlockTypes2["MangroveDoor"]="minecraft:mangrove_door";MinecraftBlockTypes2["MangroveDoubleSlab"]="minecraft:mangrove_double_slab";MinecraftBlockTypes2["MangroveFence"]="minecraft:mangrove_fence";MinecraftBlockTypes2["MangroveFenceGate"]="minecraft:mangrove_fence_gate";MinecraftBlockTypes2["MangroveHangingSign"]="minecraft:mangrove_hanging_sign";MinecraftBlockTypes2["MangroveLeaves"]="minecraft:mangrove_leaves";MinecraftBlockTypes2["MangroveLog"]="minecraft:mangrove_log";MinecraftBlockTypes2["MangrovePlanks"]="minecraft:mangrove_planks";MinecraftBlockTypes2["MangrovePressurePlate"]="minecraft:mangrove_pressure_plate";MinecraftBlockTypes2["MangrovePropagule"]="minecraft:mangrove_propagule";MinecraftBlockTypes2["MangroveRoots"]="minecraft:mangrove_roots";MinecraftBlockTypes2["MangroveSlab"]="minecraft:mangrove_slab";MinecraftBlockTypes2["MangroveStairs"]="minecraft:mangrove_stairs";MinecraftBlockTypes2["MangroveStandingSign"]="minecraft:mangrove_standing_sign";MinecraftBlockTypes2["MangroveTrapdoor"]="minecraft:mangrove_trapdoor";MinecraftBlockTypes2["MangroveWallSign"]="minecraft:mangrove_wall_sign";MinecraftBlockTypes2["MangroveWood"]="minecraft:mangrove_wood";MinecraftBlockTypes2["MediumAmethystBud"]="minecraft:medium_amethyst_bud";MinecraftBlockTypes2["MelonBlock"]="minecraft:melon_block";MinecraftBlockTypes2["MelonStem"]="minecraft:melon_stem";MinecraftBlockTypes2["MobSpawner"]="minecraft:mob_spawner";MinecraftBlockTypes2["MonsterEgg"]="minecraft:monster_egg";MinecraftBlockTypes2["MossBlock"]="minecraft:moss_block";MinecraftBlockTypes2["MossCarpet"]="minecraft:moss_carpet";MinecraftBlockTypes2["MossyCobblestone"]="minecraft:mossy_cobblestone";MinecraftBlockTypes2["MossyCobblestoneStairs"]="minecraft:mossy_cobblestone_stairs";MinecraftBlockTypes2["MossyStoneBrickStairs"]="minecraft:mossy_stone_brick_stairs";MinecraftBlockTypes2["MovingBlock"]="minecraft:moving_block";MinecraftBlockTypes2["Mud"]="minecraft:mud";MinecraftBlockTypes2["MudBrickDoubleSlab"]="minecraft:mud_brick_double_slab";MinecraftBlockTypes2["MudBrickSlab"]="minecraft:mud_brick_slab";MinecraftBlockTypes2["MudBrickStairs"]="minecraft:mud_brick_stairs";MinecraftBlockTypes2["MudBrickWall"]="minecraft:mud_brick_wall";MinecraftBlockTypes2["MudBricks"]="minecraft:mud_bricks";MinecraftBlockTypes2["MuddyMangroveRoots"]="minecraft:muddy_mangrove_roots";MinecraftBlockTypes2["Mycelium"]="minecraft:mycelium";MinecraftBlockTypes2["NetherBrick"]="minecraft:nether_brick";MinecraftBlockTypes2["NetherBrickFence"]="minecraft:nether_brick_fence";MinecraftBlockTypes2["NetherBrickStairs"]="minecraft:nether_brick_stairs";MinecraftBlockTypes2["NetherGoldOre"]="minecraft:nether_gold_ore";MinecraftBlockTypes2["NetherSprouts"]="minecraft:nether_sprouts";MinecraftBlockTypes2["NetherWart"]="minecraft:nether_wart";MinecraftBlockTypes2["NetherWartBlock"]="minecraft:nether_wart_block";MinecraftBlockTypes2["NetheriteBlock"]="minecraft:netherite_block";MinecraftBlockTypes2["Netherrack"]="minecraft:netherrack";MinecraftBlockTypes2["Netherreactor"]="minecraft:netherreactor";MinecraftBlockTypes2["NormalStoneStairs"]="minecraft:normal_stone_stairs";MinecraftBlockTypes2["Noteblock"]="minecraft:noteblock";MinecraftBlockTypes2["OakFence"]="minecraft:oak_fence";MinecraftBlockTypes2["OakHangingSign"]="minecraft:oak_hanging_sign";MinecraftBlockTypes2["OakLog"]="minecraft:oak_log";MinecraftBlockTypes2["OakPlanks"]="minecraft:oak_planks";MinecraftBlockTypes2["OakStairs"]="minecraft:oak_stairs";MinecraftBlockTypes2["Observer"]="minecraft:observer";MinecraftBlockTypes2["Obsidian"]="minecraft:obsidian";MinecraftBlockTypes2["OchreFroglight"]="minecraft:ochre_froglight";MinecraftBlockTypes2["OrangeCandle"]="minecraft:orange_candle";MinecraftBlockTypes2["OrangeCandleCake"]="minecraft:orange_candle_cake";MinecraftBlockTypes2["OrangeCarpet"]="minecraft:orange_carpet";MinecraftBlockTypes2["OrangeConcrete"]="minecraft:orange_concrete";MinecraftBlockTypes2["OrangeConcretePowder"]="minecraft:orange_concrete_powder";MinecraftBlockTypes2["OrangeGlazedTerracotta"]="minecraft:orange_glazed_terracotta";MinecraftBlockTypes2["OrangeShulkerBox"]="minecraft:orange_shulker_box";MinecraftBlockTypes2["OrangeStainedGlass"]="minecraft:orange_stained_glass";MinecraftBlockTypes2["OrangeStainedGlassPane"]="minecraft:orange_stained_glass_pane";MinecraftBlockTypes2["OrangeTerracotta"]="minecraft:orange_terracotta";MinecraftBlockTypes2["OrangeWool"]="minecraft:orange_wool";MinecraftBlockTypes2["OxidizedChiseledCopper"]="minecraft:oxidized_chiseled_copper";MinecraftBlockTypes2["OxidizedCopper"]="minecraft:oxidized_copper";MinecraftBlockTypes2["OxidizedCopperBulb"]="minecraft:oxidized_copper_bulb";MinecraftBlockTypes2["OxidizedCopperDoor"]="minecraft:oxidized_copper_door";MinecraftBlockTypes2["OxidizedCopperGrate"]="minecraft:oxidized_copper_grate";MinecraftBlockTypes2["OxidizedCopperTrapdoor"]="minecraft:oxidized_copper_trapdoor";MinecraftBlockTypes2["OxidizedCutCopper"]="minecraft:oxidized_cut_copper";MinecraftBlockTypes2["OxidizedCutCopperSlab"]="minecraft:oxidized_cut_copper_slab";MinecraftBlockTypes2["OxidizedCutCopperStairs"]="minecraft:oxidized_cut_copper_stairs";MinecraftBlockTypes2["OxidizedDoubleCutCopperSlab"]="minecraft:oxidized_double_cut_copper_slab";MinecraftBlockTypes2["PackedIce"]="minecraft:packed_ice";MinecraftBlockTypes2["PackedMud"]="minecraft:packed_mud";MinecraftBlockTypes2["PearlescentFroglight"]="minecraft:pearlescent_froglight";MinecraftBlockTypes2["PinkCandle"]="minecraft:pink_candle";MinecraftBlockTypes2["PinkCandleCake"]="minecraft:pink_candle_cake";MinecraftBlockTypes2["PinkCarpet"]="minecraft:pink_carpet";MinecraftBlockTypes2["PinkConcrete"]="minecraft:pink_concrete";MinecraftBlockTypes2["PinkConcretePowder"]="minecraft:pink_concrete_powder";MinecraftBlockTypes2["PinkGlazedTerracotta"]="minecraft:pink_glazed_terracotta";MinecraftBlockTypes2["PinkPetals"]="minecraft:pink_petals";MinecraftBlockTypes2["PinkShulkerBox"]="minecraft:pink_shulker_box";MinecraftBlockTypes2["PinkStainedGlass"]="minecraft:pink_stained_glass";MinecraftBlockTypes2["PinkStainedGlassPane"]="minecraft:pink_stained_glass_pane";MinecraftBlockTypes2["PinkTerracotta"]="minecraft:pink_terracotta";MinecraftBlockTypes2["PinkWool"]="minecraft:pink_wool";MinecraftBlockTypes2["Piston"]="minecraft:piston";MinecraftBlockTypes2["PistonArmCollision"]="minecraft:piston_arm_collision";MinecraftBlockTypes2["PitcherCrop"]="minecraft:pitcher_crop";MinecraftBlockTypes2["PitcherPlant"]="minecraft:pitcher_plant";MinecraftBlockTypes2["Podzol"]="minecraft:podzol";MinecraftBlockTypes2["PointedDripstone"]="minecraft:pointed_dripstone";MinecraftBlockTypes2["PolishedAndesite"]="minecraft:polished_andesite";MinecraftBlockTypes2["PolishedAndesiteStairs"]="minecraft:polished_andesite_stairs";MinecraftBlockTypes2["PolishedBasalt"]="minecraft:polished_basalt";MinecraftBlockTypes2["PolishedBlackstone"]="minecraft:polished_blackstone";MinecraftBlockTypes2["PolishedBlackstoneBrickDoubleSlab"]="minecraft:polished_blackstone_brick_double_slab";MinecraftBlockTypes2["PolishedBlackstoneBrickSlab"]="minecraft:polished_blackstone_brick_slab";MinecraftBlockTypes2["PolishedBlackstoneBrickStairs"]="minecraft:polished_blackstone_brick_stairs";MinecraftBlockTypes2["PolishedBlackstoneBrickWall"]="minecraft:polished_blackstone_brick_wall";MinecraftBlockTypes2["PolishedBlackstoneBricks"]="minecraft:polished_blackstone_bricks";MinecraftBlockTypes2["PolishedBlackstoneButton"]="minecraft:polished_blackstone_button";MinecraftBlockTypes2["PolishedBlackstoneDoubleSlab"]="minecraft:polished_blackstone_double_slab";MinecraftBlockTypes2["PolishedBlackstonePressurePlate"]="minecraft:polished_blackstone_pressure_plate";MinecraftBlockTypes2["PolishedBlackstoneSlab"]="minecraft:polished_blackstone_slab";MinecraftBlockTypes2["PolishedBlackstoneStairs"]="minecraft:polished_blackstone_stairs";MinecraftBlockTypes2["PolishedBlackstoneWall"]="minecraft:polished_blackstone_wall";MinecraftBlockTypes2["PolishedDeepslate"]="minecraft:polished_deepslate";MinecraftBlockTypes2["PolishedDeepslateDoubleSlab"]="minecraft:polished_deepslate_double_slab";MinecraftBlockTypes2["PolishedDeepslateSlab"]="minecraft:polished_deepslate_slab";MinecraftBlockTypes2["PolishedDeepslateStairs"]="minecraft:polished_deepslate_stairs";MinecraftBlockTypes2["PolishedDeepslateWall"]="minecraft:polished_deepslate_wall";MinecraftBlockTypes2["PolishedDiorite"]="minecraft:polished_diorite";MinecraftBlockTypes2["PolishedDioriteStairs"]="minecraft:polished_diorite_stairs";MinecraftBlockTypes2["PolishedGranite"]="minecraft:polished_granite";MinecraftBlockTypes2["PolishedGraniteStairs"]="minecraft:polished_granite_stairs";MinecraftBlockTypes2["PolishedTuff"]="minecraft:polished_tuff";MinecraftBlockTypes2["PolishedTuffDoubleSlab"]="minecraft:polished_tuff_double_slab";MinecraftBlockTypes2["PolishedTuffSlab"]="minecraft:polished_tuff_slab";MinecraftBlockTypes2["PolishedTuffStairs"]="minecraft:polished_tuff_stairs";MinecraftBlockTypes2["PolishedTuffWall"]="minecraft:polished_tuff_wall";MinecraftBlockTypes2["Portal"]="minecraft:portal";MinecraftBlockTypes2["Potatoes"]="minecraft:potatoes";MinecraftBlockTypes2["PowderSnow"]="minecraft:powder_snow";MinecraftBlockTypes2["PoweredComparator"]="minecraft:powered_comparator";MinecraftBlockTypes2["PoweredRepeater"]="minecraft:powered_repeater";MinecraftBlockTypes2["Prismarine"]="minecraft:prismarine";MinecraftBlockTypes2["PrismarineBricksStairs"]="minecraft:prismarine_bricks_stairs";MinecraftBlockTypes2["PrismarineStairs"]="minecraft:prismarine_stairs";MinecraftBlockTypes2["Pumpkin"]="minecraft:pumpkin";MinecraftBlockTypes2["PumpkinStem"]="minecraft:pumpkin_stem";MinecraftBlockTypes2["PurpleCandle"]="minecraft:purple_candle";MinecraftBlockTypes2["PurpleCandleCake"]="minecraft:purple_candle_cake";MinecraftBlockTypes2["PurpleCarpet"]="minecraft:purple_carpet";MinecraftBlockTypes2["PurpleConcrete"]="minecraft:purple_concrete";MinecraftBlockTypes2["PurpleConcretePowder"]="minecraft:purple_concrete_powder";MinecraftBlockTypes2["PurpleGlazedTerracotta"]="minecraft:purple_glazed_terracotta";MinecraftBlockTypes2["PurpleShulkerBox"]="minecraft:purple_shulker_box";MinecraftBlockTypes2["PurpleStainedGlass"]="minecraft:purple_stained_glass";MinecraftBlockTypes2["PurpleStainedGlassPane"]="minecraft:purple_stained_glass_pane";MinecraftBlockTypes2["PurpleTerracotta"]="minecraft:purple_terracotta";MinecraftBlockTypes2["PurpleWool"]="minecraft:purple_wool";MinecraftBlockTypes2["PurpurBlock"]="minecraft:purpur_block";MinecraftBlockTypes2["PurpurStairs"]="minecraft:purpur_stairs";MinecraftBlockTypes2["QuartzBlock"]="minecraft:quartz_block";MinecraftBlockTypes2["QuartzBricks"]="minecraft:quartz_bricks";MinecraftBlockTypes2["QuartzOre"]="minecraft:quartz_ore";MinecraftBlockTypes2["QuartzStairs"]="minecraft:quartz_stairs";MinecraftBlockTypes2["Rail"]="minecraft:rail";MinecraftBlockTypes2["RawCopperBlock"]="minecraft:raw_copper_block";MinecraftBlockTypes2["RawGoldBlock"]="minecraft:raw_gold_block";MinecraftBlockTypes2["RawIronBlock"]="minecraft:raw_iron_block";MinecraftBlockTypes2["RedCandle"]="minecraft:red_candle";MinecraftBlockTypes2["RedCandleCake"]="minecraft:red_candle_cake";MinecraftBlockTypes2["RedCarpet"]="minecraft:red_carpet";MinecraftBlockTypes2["RedConcrete"]="minecraft:red_concrete";MinecraftBlockTypes2["RedConcretePowder"]="minecraft:red_concrete_powder";MinecraftBlockTypes2["RedFlower"]="minecraft:red_flower";MinecraftBlockTypes2["RedGlazedTerracotta"]="minecraft:red_glazed_terracotta";MinecraftBlockTypes2["RedMushroom"]="minecraft:red_mushroom";MinecraftBlockTypes2["RedMushroomBlock"]="minecraft:red_mushroom_block";MinecraftBlockTypes2["RedNetherBrick"]="minecraft:red_nether_brick";MinecraftBlockTypes2["RedNetherBrickStairs"]="minecraft:red_nether_brick_stairs";MinecraftBlockTypes2["RedSandstone"]="minecraft:red_sandstone";MinecraftBlockTypes2["RedSandstoneStairs"]="minecraft:red_sandstone_stairs";MinecraftBlockTypes2["RedShulkerBox"]="minecraft:red_shulker_box";MinecraftBlockTypes2["RedStainedGlass"]="minecraft:red_stained_glass";MinecraftBlockTypes2["RedStainedGlassPane"]="minecraft:red_stained_glass_pane";MinecraftBlockTypes2["RedTerracotta"]="minecraft:red_terracotta";MinecraftBlockTypes2["RedWool"]="minecraft:red_wool";MinecraftBlockTypes2["RedstoneBlock"]="minecraft:redstone_block";MinecraftBlockTypes2["RedstoneLamp"]="minecraft:redstone_lamp";MinecraftBlockTypes2["RedstoneOre"]="minecraft:redstone_ore";MinecraftBlockTypes2["RedstoneTorch"]="minecraft:redstone_torch";MinecraftBlockTypes2["RedstoneWire"]="minecraft:redstone_wire";MinecraftBlockTypes2["Reeds"]="minecraft:reeds";MinecraftBlockTypes2["ReinforcedDeepslate"]="minecraft:reinforced_deepslate";MinecraftBlockTypes2["RepeatingCommandBlock"]="minecraft:repeating_command_block";MinecraftBlockTypes2["Reserved6"]="minecraft:reserved6";MinecraftBlockTypes2["RespawnAnchor"]="minecraft:respawn_anchor";MinecraftBlockTypes2["Sand"]="minecraft:sand";MinecraftBlockTypes2["Sandstone"]="minecraft:sandstone";MinecraftBlockTypes2["SandstoneStairs"]="minecraft:sandstone_stairs";MinecraftBlockTypes2["Sapling"]="minecraft:sapling";MinecraftBlockTypes2["Scaffolding"]="minecraft:scaffolding";MinecraftBlockTypes2["Sculk"]="minecraft:sculk";MinecraftBlockTypes2["SculkCatalyst"]="minecraft:sculk_catalyst";MinecraftBlockTypes2["SculkSensor"]="minecraft:sculk_sensor";MinecraftBlockTypes2["SculkShrieker"]="minecraft:sculk_shrieker";MinecraftBlockTypes2["SculkVein"]="minecraft:sculk_vein";MinecraftBlockTypes2["SeaLantern"]="minecraft:sea_lantern";MinecraftBlockTypes2["SeaPickle"]="minecraft:sea_pickle";MinecraftBlockTypes2["Seagrass"]="minecraft:seagrass";MinecraftBlockTypes2["Shroomlight"]="minecraft:shroomlight";MinecraftBlockTypes2["SilverGlazedTerracotta"]="minecraft:silver_glazed_terracotta";MinecraftBlockTypes2["Skull"]="minecraft:skull";MinecraftBlockTypes2["Slime"]="minecraft:slime";MinecraftBlockTypes2["SmallAmethystBud"]="minecraft:small_amethyst_bud";MinecraftBlockTypes2["SmallDripleafBlock"]="minecraft:small_dripleaf_block";MinecraftBlockTypes2["SmithingTable"]="minecraft:smithing_table";MinecraftBlockTypes2["Smoker"]="minecraft:smoker";MinecraftBlockTypes2["SmoothBasalt"]="minecraft:smooth_basalt";MinecraftBlockTypes2["SmoothQuartzStairs"]="minecraft:smooth_quartz_stairs";MinecraftBlockTypes2["SmoothRedSandstoneStairs"]="minecraft:smooth_red_sandstone_stairs";MinecraftBlockTypes2["SmoothSandstoneStairs"]="minecraft:smooth_sandstone_stairs";MinecraftBlockTypes2["SmoothStone"]="minecraft:smooth_stone";MinecraftBlockTypes2["SnifferEgg"]="minecraft:sniffer_egg";MinecraftBlockTypes2["Snow"]="minecraft:snow";MinecraftBlockTypes2["SnowLayer"]="minecraft:snow_layer";MinecraftBlockTypes2["SoulCampfire"]="minecraft:soul_campfire";MinecraftBlockTypes2["SoulFire"]="minecraft:soul_fire";MinecraftBlockTypes2["SoulLantern"]="minecraft:soul_lantern";MinecraftBlockTypes2["SoulSand"]="minecraft:soul_sand";MinecraftBlockTypes2["SoulSoil"]="minecraft:soul_soil";MinecraftBlockTypes2["SoulTorch"]="minecraft:soul_torch";MinecraftBlockTypes2["Sponge"]="minecraft:sponge";MinecraftBlockTypes2["SporeBlossom"]="minecraft:spore_blossom";MinecraftBlockTypes2["SpruceButton"]="minecraft:spruce_button";MinecraftBlockTypes2["SpruceDoor"]="minecraft:spruce_door";MinecraftBlockTypes2["SpruceFence"]="minecraft:spruce_fence";MinecraftBlockTypes2["SpruceFenceGate"]="minecraft:spruce_fence_gate";MinecraftBlockTypes2["SpruceHangingSign"]="minecraft:spruce_hanging_sign";MinecraftBlockTypes2["SpruceLog"]="minecraft:spruce_log";MinecraftBlockTypes2["SprucePlanks"]="minecraft:spruce_planks";MinecraftBlockTypes2["SprucePressurePlate"]="minecraft:spruce_pressure_plate";MinecraftBlockTypes2["SpruceStairs"]="minecraft:spruce_stairs";MinecraftBlockTypes2["SpruceStandingSign"]="minecraft:spruce_standing_sign";MinecraftBlockTypes2["SpruceTrapdoor"]="minecraft:spruce_trapdoor";MinecraftBlockTypes2["SpruceWallSign"]="minecraft:spruce_wall_sign";MinecraftBlockTypes2["StandingBanner"]="minecraft:standing_banner";MinecraftBlockTypes2["StandingSign"]="minecraft:standing_sign";MinecraftBlockTypes2["StickyPiston"]="minecraft:sticky_piston";MinecraftBlockTypes2["StickyPistonArmCollision"]="minecraft:sticky_piston_arm_collision";MinecraftBlockTypes2["Stone"]="minecraft:stone";MinecraftBlockTypes2["StoneBlockSlab"]="minecraft:stone_block_slab";MinecraftBlockTypes2["StoneBlockSlab2"]="minecraft:stone_block_slab2";MinecraftBlockTypes2["StoneBlockSlab3"]="minecraft:stone_block_slab3";MinecraftBlockTypes2["StoneBlockSlab4"]="minecraft:stone_block_slab4";MinecraftBlockTypes2["StoneBrickStairs"]="minecraft:stone_brick_stairs";MinecraftBlockTypes2["StoneButton"]="minecraft:stone_button";MinecraftBlockTypes2["StonePressurePlate"]="minecraft:stone_pressure_plate";MinecraftBlockTypes2["StoneStairs"]="minecraft:stone_stairs";MinecraftBlockTypes2["Stonebrick"]="minecraft:stonebrick";MinecraftBlockTypes2["Stonecutter"]="minecraft:stonecutter";MinecraftBlockTypes2["StonecutterBlock"]="minecraft:stonecutter_block";MinecraftBlockTypes2["StrippedAcaciaLog"]="minecraft:stripped_acacia_log";MinecraftBlockTypes2["StrippedBambooBlock"]="minecraft:stripped_bamboo_block";MinecraftBlockTypes2["StrippedBirchLog"]="minecraft:stripped_birch_log";MinecraftBlockTypes2["StrippedCherryLog"]="minecraft:stripped_cherry_log";MinecraftBlockTypes2["StrippedCherryWood"]="minecraft:stripped_cherry_wood";MinecraftBlockTypes2["StrippedCrimsonHyphae"]="minecraft:stripped_crimson_hyphae";MinecraftBlockTypes2["StrippedCrimsonStem"]="minecraft:stripped_crimson_stem";MinecraftBlockTypes2["StrippedDarkOakLog"]="minecraft:stripped_dark_oak_log";MinecraftBlockTypes2["StrippedJungleLog"]="minecraft:stripped_jungle_log";MinecraftBlockTypes2["StrippedMangroveLog"]="minecraft:stripped_mangrove_log";MinecraftBlockTypes2["StrippedMangroveWood"]="minecraft:stripped_mangrove_wood";MinecraftBlockTypes2["StrippedOakLog"]="minecraft:stripped_oak_log";MinecraftBlockTypes2["StrippedSpruceLog"]="minecraft:stripped_spruce_log";MinecraftBlockTypes2["StrippedWarpedHyphae"]="minecraft:stripped_warped_hyphae";MinecraftBlockTypes2["StrippedWarpedStem"]="minecraft:stripped_warped_stem";MinecraftBlockTypes2["StructureBlock"]="minecraft:structure_block";MinecraftBlockTypes2["StructureVoid"]="minecraft:structure_void";MinecraftBlockTypes2["SuspiciousGravel"]="minecraft:suspicious_gravel";MinecraftBlockTypes2["SuspiciousSand"]="minecraft:suspicious_sand";MinecraftBlockTypes2["SweetBerryBush"]="minecraft:sweet_berry_bush";MinecraftBlockTypes2["Tallgrass"]="minecraft:tallgrass";MinecraftBlockTypes2["Target"]="minecraft:target";MinecraftBlockTypes2["TintedGlass"]="minecraft:tinted_glass";MinecraftBlockTypes2["Tnt"]="minecraft:tnt";MinecraftBlockTypes2["Torch"]="minecraft:torch";MinecraftBlockTypes2["Torchflower"]="minecraft:torchflower";MinecraftBlockTypes2["TorchflowerCrop"]="minecraft:torchflower_crop";MinecraftBlockTypes2["Trapdoor"]="minecraft:trapdoor";MinecraftBlockTypes2["TrappedChest"]="minecraft:trapped_chest";MinecraftBlockTypes2["TripWire"]="minecraft:trip_wire";MinecraftBlockTypes2["TripwireHook"]="minecraft:tripwire_hook";MinecraftBlockTypes2["TubeCoral"]="minecraft:tube_coral";MinecraftBlockTypes2["Tuff"]="minecraft:tuff";MinecraftBlockTypes2["TuffBrickDoubleSlab"]="minecraft:tuff_brick_double_slab";MinecraftBlockTypes2["TuffBrickSlab"]="minecraft:tuff_brick_slab";MinecraftBlockTypes2["TuffBrickStairs"]="minecraft:tuff_brick_stairs";MinecraftBlockTypes2["TuffBrickWall"]="minecraft:tuff_brick_wall";MinecraftBlockTypes2["TuffBricks"]="minecraft:tuff_bricks";MinecraftBlockTypes2["TuffDoubleSlab"]="minecraft:tuff_double_slab";MinecraftBlockTypes2["TuffSlab"]="minecraft:tuff_slab";MinecraftBlockTypes2["TuffStairs"]="minecraft:tuff_stairs";MinecraftBlockTypes2["TuffWall"]="minecraft:tuff_wall";MinecraftBlockTypes2["TurtleEgg"]="minecraft:turtle_egg";MinecraftBlockTypes2["TwistingVines"]="minecraft:twisting_vines";MinecraftBlockTypes2["UnderwaterTorch"]="minecraft:underwater_torch";MinecraftBlockTypes2["UndyedShulkerBox"]="minecraft:undyed_shulker_box";MinecraftBlockTypes2["Unknown"]="minecraft:unknown";MinecraftBlockTypes2["UnlitRedstoneTorch"]="minecraft:unlit_redstone_torch";MinecraftBlockTypes2["UnpoweredComparator"]="minecraft:unpowered_comparator";MinecraftBlockTypes2["UnpoweredRepeater"]="minecraft:unpowered_repeater";MinecraftBlockTypes2["VerdantFroglight"]="minecraft:verdant_froglight";MinecraftBlockTypes2["Vine"]="minecraft:vine";MinecraftBlockTypes2["WallBanner"]="minecraft:wall_banner";MinecraftBlockTypes2["WallSign"]="minecraft:wall_sign";MinecraftBlockTypes2["WarpedButton"]="minecraft:warped_button";MinecraftBlockTypes2["WarpedDoor"]="minecraft:warped_door";MinecraftBlockTypes2["WarpedDoubleSlab"]="minecraft:warped_double_slab";MinecraftBlockTypes2["WarpedFence"]="minecraft:warped_fence";MinecraftBlockTypes2["WarpedFenceGate"]="minecraft:warped_fence_gate";MinecraftBlockTypes2["WarpedFungus"]="minecraft:warped_fungus";MinecraftBlockTypes2["WarpedHangingSign"]="minecraft:warped_hanging_sign";MinecraftBlockTypes2["WarpedHyphae"]="minecraft:warped_hyphae";MinecraftBlockTypes2["WarpedNylium"]="minecraft:warped_nylium";MinecraftBlockTypes2["WarpedPlanks"]="minecraft:warped_planks";MinecraftBlockTypes2["WarpedPressurePlate"]="minecraft:warped_pressure_plate";MinecraftBlockTypes2["WarpedRoots"]="minecraft:warped_roots";MinecraftBlockTypes2["WarpedSlab"]="minecraft:warped_slab";MinecraftBlockTypes2["WarpedStairs"]="minecraft:warped_stairs";MinecraftBlockTypes2["WarpedStandingSign"]="minecraft:warped_standing_sign";MinecraftBlockTypes2["WarpedStem"]="minecraft:warped_stem";MinecraftBlockTypes2["WarpedTrapdoor"]="minecraft:warped_trapdoor";MinecraftBlockTypes2["WarpedWallSign"]="minecraft:warped_wall_sign";MinecraftBlockTypes2["WarpedWartBlock"]="minecraft:warped_wart_block";MinecraftBlockTypes2["Water"]="minecraft:water";MinecraftBlockTypes2["Waterlily"]="minecraft:waterlily";MinecraftBlockTypes2["WaxedChiseledCopper"]="minecraft:waxed_chiseled_copper";MinecraftBlockTypes2["WaxedCopper"]="minecraft:waxed_copper";MinecraftBlockTypes2["WaxedCopperBulb"]="minecraft:waxed_copper_bulb";MinecraftBlockTypes2["WaxedCopperDoor"]="minecraft:waxed_copper_door";MinecraftBlockTypes2["WaxedCopperGrate"]="minecraft:waxed_copper_grate";MinecraftBlockTypes2["WaxedCopperTrapdoor"]="minecraft:waxed_copper_trapdoor";MinecraftBlockTypes2["WaxedCutCopper"]="minecraft:waxed_cut_copper";MinecraftBlockTypes2["WaxedCutCopperSlab"]="minecraft:waxed_cut_copper_slab";MinecraftBlockTypes2["WaxedCutCopperStairs"]="minecraft:waxed_cut_copper_stairs";MinecraftBlockTypes2["WaxedDoubleCutCopperSlab"]="minecraft:waxed_double_cut_copper_slab";MinecraftBlockTypes2["WaxedExposedChiseledCopper"]="minecraft:waxed_exposed_chiseled_copper";MinecraftBlockTypes2["WaxedExposedCopper"]="minecraft:waxed_exposed_copper";MinecraftBlockTypes2["WaxedExposedCopperBulb"]="minecraft:waxed_exposed_copper_bulb";MinecraftBlockTypes2["WaxedExposedCopperDoor"]="minecraft:waxed_exposed_copper_door";MinecraftBlockTypes2["WaxedExposedCopperGrate"]="minecraft:waxed_exposed_copper_grate";MinecraftBlockTypes2["WaxedExposedCopperTrapdoor"]="minecraft:waxed_exposed_copper_trapdoor";MinecraftBlockTypes2["WaxedExposedCutCopper"]="minecraft:waxed_exposed_cut_copper";MinecraftBlockTypes2["WaxedExposedCutCopperSlab"]="minecraft:waxed_exposed_cut_copper_slab";MinecraftBlockTypes2["WaxedExposedCutCopperStairs"]="minecraft:waxed_exposed_cut_copper_stairs";MinecraftBlockTypes2["WaxedExposedDoubleCutCopperSlab"]="minecraft:waxed_exposed_double_cut_copper_slab";MinecraftBlockTypes2["WaxedOxidizedChiseledCopper"]="minecraft:waxed_oxidized_chiseled_copper";MinecraftBlockTypes2["WaxedOxidizedCopper"]="minecraft:waxed_oxidized_copper";MinecraftBlockTypes2["WaxedOxidizedCopperBulb"]="minecraft:waxed_oxidized_copper_bulb";MinecraftBlockTypes2["WaxedOxidizedCopperDoor"]="minecraft:waxed_oxidized_copper_door";MinecraftBlockTypes2["WaxedOxidizedCopperGrate"]="minecraft:waxed_oxidized_copper_grate";MinecraftBlockTypes2["WaxedOxidizedCopperTrapdoor"]="minecraft:waxed_oxidized_copper_trapdoor";MinecraftBlockTypes2["WaxedOxidizedCutCopper"]="minecraft:waxed_oxidized_cut_copper";MinecraftBlockTypes2["WaxedOxidizedCutCopperSlab"]="minecraft:waxed_oxidized_cut_copper_slab";MinecraftBlockTypes2["WaxedOxidizedCutCopperStairs"]="minecraft:waxed_oxidized_cut_copper_stairs";MinecraftBlockTypes2["WaxedOxidizedDoubleCutCopperSlab"]="minecraft:waxed_oxidized_double_cut_copper_slab";MinecraftBlockTypes2["WaxedWeatheredChiseledCopper"]="minecraft:waxed_weathered_chiseled_copper";MinecraftBlockTypes2["WaxedWeatheredCopper"]="minecraft:waxed_weathered_copper";MinecraftBlockTypes2["WaxedWeatheredCopperBulb"]="minecraft:waxed_weathered_copper_bulb";MinecraftBlockTypes2["WaxedWeatheredCopperDoor"]="minecraft:waxed_weathered_copper_door";MinecraftBlockTypes2["WaxedWeatheredCopperGrate"]="minecraft:waxed_weathered_copper_grate";MinecraftBlockTypes2["WaxedWeatheredCopperTrapdoor"]="minecraft:waxed_weathered_copper_trapdoor";MinecraftBlockTypes2["WaxedWeatheredCutCopper"]="minecraft:waxed_weathered_cut_copper";MinecraftBlockTypes2["WaxedWeatheredCutCopperSlab"]="minecraft:waxed_weathered_cut_copper_slab";MinecraftBlockTypes2["WaxedWeatheredCutCopperStairs"]="minecraft:waxed_weathered_cut_copper_stairs";MinecraftBlockTypes2["WaxedWeatheredDoubleCutCopperSlab"]="minecraft:waxed_weathered_double_cut_copper_slab";MinecraftBlockTypes2["WeatheredChiseledCopper"]="minecraft:weathered_chiseled_copper";MinecraftBlockTypes2["WeatheredCopper"]="minecraft:weathered_copper";MinecraftBlockTypes2["WeatheredCopperBulb"]="minecraft:weathered_copper_bulb";MinecraftBlockTypes2["WeatheredCopperDoor"]="minecraft:weathered_copper_door";MinecraftBlockTypes2["WeatheredCopperGrate"]="minecraft:weathered_copper_grate";MinecraftBlockTypes2["WeatheredCopperTrapdoor"]="minecraft:weathered_copper_trapdoor";MinecraftBlockTypes2["WeatheredCutCopper"]="minecraft:weathered_cut_copper";MinecraftBlockTypes2["WeatheredCutCopperSlab"]="minecraft:weathered_cut_copper_slab";MinecraftBlockTypes2["WeatheredCutCopperStairs"]="minecraft:weathered_cut_copper_stairs";MinecraftBlockTypes2["WeatheredDoubleCutCopperSlab"]="minecraft:weathered_double_cut_copper_slab";MinecraftBlockTypes2["Web"]="minecraft:web";MinecraftBlockTypes2["WeepingVines"]="minecraft:weeping_vines";MinecraftBlockTypes2["Wheat"]="minecraft:wheat";MinecraftBlockTypes2["WhiteCandle"]="minecraft:white_candle";MinecraftBlockTypes2["WhiteCandleCake"]="minecraft:white_candle_cake";MinecraftBlockTypes2["WhiteCarpet"]="minecraft:white_carpet";MinecraftBlockTypes2["WhiteConcrete"]="minecraft:white_concrete";MinecraftBlockTypes2["WhiteConcretePowder"]="minecraft:white_concrete_powder";MinecraftBlockTypes2["WhiteGlazedTerracotta"]="minecraft:white_glazed_terracotta";MinecraftBlockTypes2["WhiteShulkerBox"]="minecraft:white_shulker_box";MinecraftBlockTypes2["WhiteStainedGlass"]="minecraft:white_stained_glass";MinecraftBlockTypes2["WhiteStainedGlassPane"]="minecraft:white_stained_glass_pane";MinecraftBlockTypes2["WhiteTerracotta"]="minecraft:white_terracotta";MinecraftBlockTypes2["WhiteWool"]="minecraft:white_wool";MinecraftBlockTypes2["WitherRose"]="minecraft:wither_rose";MinecraftBlockTypes2["Wood"]="minecraft:wood";MinecraftBlockTypes2["WoodenButton"]="minecraft:wooden_button";MinecraftBlockTypes2["WoodenDoor"]="minecraft:wooden_door";MinecraftBlockTypes2["WoodenPressurePlate"]="minecraft:wooden_pressure_plate";MinecraftBlockTypes2["WoodenSlab"]="minecraft:wooden_slab";MinecraftBlockTypes2["YellowCandle"]="minecraft:yellow_candle";MinecraftBlockTypes2["YellowCandleCake"]="minecraft:yellow_candle_cake";MinecraftBlockTypes2["YellowCarpet"]="minecraft:yellow_carpet";MinecraftBlockTypes2["YellowConcrete"]="minecraft:yellow_concrete";MinecraftBlockTypes2["YellowConcretePowder"]="minecraft:yellow_concrete_powder";MinecraftBlockTypes2["YellowFlower"]="minecraft:yellow_flower";MinecraftBlockTypes2["YellowGlazedTerracotta"]="minecraft:yellow_glazed_terracotta";MinecraftBlockTypes2["YellowShulkerBox"]="minecraft:yellow_shulker_box";MinecraftBlockTypes2["YellowStainedGlass"]="minecraft:yellow_stained_glass";MinecraftBlockTypes2["YellowStainedGlassPane"]="minecraft:yellow_stained_glass_pane";MinecraftBlockTypes2["YellowTerracotta"]="minecraft:yellow_terracotta";MinecraftBlockTypes2["YellowWool"]="minecraft:yellow_wool";return MinecraftBlockTypes2})(MinecraftBlockTypes||{});var MinecraftCameraPresetsTypes=(MinecraftCameraPresetsTypes2=>{MinecraftCameraPresetsTypes2["FirstPerson"]="minecraft:first_person";MinecraftCameraPresetsTypes2["Free"]="minecraft:free";MinecraftCameraPresetsTypes2["ThirdPerson"]="minecraft:third_person";MinecraftCameraPresetsTypes2["ThirdPersonFront"]="minecraft:third_person_front";return MinecraftCameraPresetsTypes2})(MinecraftCameraPresetsTypes||{});var MinecraftDimensionTypes=(MinecraftDimensionTypes2=>{MinecraftDimensionTypes2["Nether"]="minecraft:nether";MinecraftDimensionTypes2["Overworld"]="minecraft:overworld";MinecraftDimensionTypes2["TheEnd"]="minecraft:the_end";return MinecraftDimensionTypes2})(MinecraftDimensionTypes||{});var MinecraftEffectTypes=(MinecraftEffectTypes2=>{MinecraftEffectTypes2["Absorption"]="absorption";MinecraftEffectTypes2["BadOmen"]="bad_omen";MinecraftEffectTypes2["Blindness"]="blindness";MinecraftEffectTypes2["ConduitPower"]="conduit_power";MinecraftEffectTypes2["Darkness"]="darkness";MinecraftEffectTypes2["Empty"]="empty";MinecraftEffectTypes2["FatalPoison"]="fatal_poison";MinecraftEffectTypes2["FireResistance"]="fire_resistance";MinecraftEffectTypes2["Haste"]="haste";MinecraftEffectTypes2["HealthBoost"]="health_boost";MinecraftEffectTypes2["Hunger"]="hunger";MinecraftEffectTypes2["InstantDamage"]="instant_damage";MinecraftEffectTypes2["InstantHealth"]="instant_health";MinecraftEffectTypes2["Invisibility"]="invisibility";MinecraftEffectTypes2["JumpBoost"]="jump_boost";MinecraftEffectTypes2["Levitation"]="levitation";MinecraftEffectTypes2["MiningFatigue"]="mining_fatigue";MinecraftEffectTypes2["Nausea"]="nausea";MinecraftEffectTypes2["NightVision"]="night_vision";MinecraftEffectTypes2["Poison"]="poison";MinecraftEffectTypes2["Regeneration"]="regeneration";MinecraftEffectTypes2["Resistance"]="resistance";MinecraftEffectTypes2["Saturation"]="saturation";MinecraftEffectTypes2["SlowFalling"]="slow_falling";MinecraftEffectTypes2["Slowness"]="slowness";MinecraftEffectTypes2["Speed"]="speed";MinecraftEffectTypes2["Strength"]="strength";MinecraftEffectTypes2["VillageHero"]="village_hero";MinecraftEffectTypes2["WaterBreathing"]="water_breathing";MinecraftEffectTypes2["Weakness"]="weakness";MinecraftEffectTypes2["Wither"]="wither";return MinecraftEffectTypes2})(MinecraftEffectTypes||{});var MinecraftEnchantmentTypes=(MinecraftEnchantmentTypes2=>{MinecraftEnchantmentTypes2["AquaAffinity"]="aqua_affinity";MinecraftEnchantmentTypes2["BaneOfArthropods"]="bane_of_arthropods";MinecraftEnchantmentTypes2["Binding"]="binding";MinecraftEnchantmentTypes2["BlastProtection"]="blast_protection";MinecraftEnchantmentTypes2["Channeling"]="channeling";MinecraftEnchantmentTypes2["DepthStrider"]="depth_strider";MinecraftEnchantmentTypes2["Efficiency"]="efficiency";MinecraftEnchantmentTypes2["FeatherFalling"]="feather_falling";MinecraftEnchantmentTypes2["FireAspect"]="fire_aspect";MinecraftEnchantmentTypes2["FireProtection"]="fire_protection";MinecraftEnchantmentTypes2["Flame"]="flame";MinecraftEnchantmentTypes2["Fortune"]="fortune";MinecraftEnchantmentTypes2["FrostWalker"]="frost_walker";MinecraftEnchantmentTypes2["Impaling"]="impaling";MinecraftEnchantmentTypes2["Infinity"]="infinity";MinecraftEnchantmentTypes2["Knockback"]="knockback";MinecraftEnchantmentTypes2["Looting"]="looting";MinecraftEnchantmentTypes2["Loyalty"]="loyalty";MinecraftEnchantmentTypes2["LuckOfTheSea"]="luck_of_the_sea";MinecraftEnchantmentTypes2["Lure"]="lure";MinecraftEnchantmentTypes2["Mending"]="mending";MinecraftEnchantmentTypes2["Multishot"]="multishot";MinecraftEnchantmentTypes2["Piercing"]="piercing";MinecraftEnchantmentTypes2["Power"]="power";MinecraftEnchantmentTypes2["ProjectileProtection"]="projectile_protection";MinecraftEnchantmentTypes2["Protection"]="protection";MinecraftEnchantmentTypes2["Punch"]="punch";MinecraftEnchantmentTypes2["QuickCharge"]="quick_charge";MinecraftEnchantmentTypes2["Respiration"]="respiration";MinecraftEnchantmentTypes2["Riptide"]="riptide";MinecraftEnchantmentTypes2["Sharpness"]="sharpness";MinecraftEnchantmentTypes2["SilkTouch"]="silk_touch";MinecraftEnchantmentTypes2["Smite"]="smite";MinecraftEnchantmentTypes2["SoulSpeed"]="soul_speed";MinecraftEnchantmentTypes2["SwiftSneak"]="swift_sneak";MinecraftEnchantmentTypes2["Thorns"]="thorns";MinecraftEnchantmentTypes2["Unbreaking"]="unbreaking";MinecraftEnchantmentTypes2["Vanishing"]="vanishing";return MinecraftEnchantmentTypes2})(MinecraftEnchantmentTypes||{});var MinecraftEntityTypes=(MinecraftEntityTypes2=>{MinecraftEntityTypes2["Agent"]="agent";MinecraftEntityTypes2["Allay"]="allay";MinecraftEntityTypes2["AreaEffectCloud"]="area_effect_cloud";MinecraftEntityTypes2["ArmorStand"]="armor_stand";MinecraftEntityTypes2["Arrow"]="arrow";MinecraftEntityTypes2["Axolotl"]="axolotl";MinecraftEntityTypes2["Bat"]="bat";MinecraftEntityTypes2["Bee"]="bee";MinecraftEntityTypes2["Blaze"]="blaze";MinecraftEntityTypes2["Boat"]="boat";MinecraftEntityTypes2["Camel"]="camel";MinecraftEntityTypes2["Cat"]="cat";MinecraftEntityTypes2["CaveSpider"]="cave_spider";MinecraftEntityTypes2["ChestBoat"]="chest_boat";MinecraftEntityTypes2["ChestMinecart"]="chest_minecart";MinecraftEntityTypes2["Chicken"]="chicken";MinecraftEntityTypes2["Cod"]="cod";MinecraftEntityTypes2["CommandBlockMinecart"]="command_block_minecart";MinecraftEntityTypes2["Cow"]="cow";MinecraftEntityTypes2["Creeper"]="creeper";MinecraftEntityTypes2["Dolphin"]="dolphin";MinecraftEntityTypes2["Donkey"]="donkey";MinecraftEntityTypes2["DragonFireball"]="dragon_fireball";MinecraftEntityTypes2["Drowned"]="drowned";MinecraftEntityTypes2["Egg"]="egg";MinecraftEntityTypes2["ElderGuardian"]="elder_guardian";MinecraftEntityTypes2["EnderCrystal"]="ender_crystal";MinecraftEntityTypes2["EnderDragon"]="ender_dragon";MinecraftEntityTypes2["EnderPearl"]="ender_pearl";MinecraftEntityTypes2["Enderman"]="enderman";MinecraftEntityTypes2["Endermite"]="endermite";MinecraftEntityTypes2["EvocationIllager"]="evocation_illager";MinecraftEntityTypes2["EyeOfEnderSignal"]="eye_of_ender_signal";MinecraftEntityTypes2["Fireball"]="fireball";MinecraftEntityTypes2["FireworksRocket"]="fireworks_rocket";MinecraftEntityTypes2["FishingHook"]="fishing_hook";MinecraftEntityTypes2["Fox"]="fox";MinecraftEntityTypes2["Frog"]="frog";MinecraftEntityTypes2["Ghast"]="ghast";MinecraftEntityTypes2["GlowSquid"]="glow_squid";MinecraftEntityTypes2["Goat"]="goat";MinecraftEntityTypes2["Guardian"]="guardian";MinecraftEntityTypes2["Hoglin"]="hoglin";MinecraftEntityTypes2["HopperMinecart"]="hopper_minecart";MinecraftEntityTypes2["Horse"]="horse";MinecraftEntityTypes2["Husk"]="husk";MinecraftEntityTypes2["IronGolem"]="iron_golem";MinecraftEntityTypes2["LightningBolt"]="lightning_bolt";MinecraftEntityTypes2["LingeringPotion"]="lingering_potion";MinecraftEntityTypes2["Llama"]="llama";MinecraftEntityTypes2["LlamaSpit"]="llama_spit";MinecraftEntityTypes2["MagmaCube"]="magma_cube";MinecraftEntityTypes2["Minecart"]="minecart";MinecraftEntityTypes2["Mooshroom"]="mooshroom";MinecraftEntityTypes2["Mule"]="mule";MinecraftEntityTypes2["Npc"]="npc";MinecraftEntityTypes2["Ocelot"]="ocelot";MinecraftEntityTypes2["Panda"]="panda";MinecraftEntityTypes2["Parrot"]="parrot";MinecraftEntityTypes2["Phantom"]="phantom";MinecraftEntityTypes2["Pig"]="pig";MinecraftEntityTypes2["Piglin"]="piglin";MinecraftEntityTypes2["PiglinBrute"]="piglin_brute";MinecraftEntityTypes2["Pillager"]="pillager";MinecraftEntityTypes2["Player"]="player";MinecraftEntityTypes2["PolarBear"]="polar_bear";MinecraftEntityTypes2["Pufferfish"]="pufferfish";MinecraftEntityTypes2["Rabbit"]="rabbit";MinecraftEntityTypes2["Ravager"]="ravager";MinecraftEntityTypes2["Salmon"]="salmon";MinecraftEntityTypes2["Sheep"]="sheep";MinecraftEntityTypes2["Shulker"]="shulker";MinecraftEntityTypes2["ShulkerBullet"]="shulker_bullet";MinecraftEntityTypes2["Silverfish"]="silverfish";MinecraftEntityTypes2["Skeleton"]="skeleton";MinecraftEntityTypes2["SkeletonHorse"]="skeleton_horse";MinecraftEntityTypes2["Slime"]="slime";MinecraftEntityTypes2["SmallFireball"]="small_fireball";MinecraftEntityTypes2["Sniffer"]="sniffer";MinecraftEntityTypes2["SnowGolem"]="snow_golem";MinecraftEntityTypes2["Snowball"]="snowball";MinecraftEntityTypes2["Spider"]="spider";MinecraftEntityTypes2["SplashPotion"]="splash_potion";MinecraftEntityTypes2["Squid"]="squid";MinecraftEntityTypes2["Stray"]="stray";MinecraftEntityTypes2["Strider"]="strider";MinecraftEntityTypes2["Tadpole"]="tadpole";MinecraftEntityTypes2["ThrownTrident"]="thrown_trident";MinecraftEntityTypes2["Tnt"]="tnt";MinecraftEntityTypes2["TntMinecart"]="tnt_minecart";MinecraftEntityTypes2["TraderLlama"]="trader_llama";MinecraftEntityTypes2["TripodCamera"]="tripod_camera";MinecraftEntityTypes2["Tropicalfish"]="tropicalfish";MinecraftEntityTypes2["Turtle"]="turtle";MinecraftEntityTypes2["Vex"]="vex";MinecraftEntityTypes2["Villager"]="villager";MinecraftEntityTypes2["VillagerV2"]="villager_v2";MinecraftEntityTypes2["Vindicator"]="vindicator";MinecraftEntityTypes2["WanderingTrader"]="wandering_trader";MinecraftEntityTypes2["Warden"]="warden";MinecraftEntityTypes2["Witch"]="witch";MinecraftEntityTypes2["Wither"]="wither";MinecraftEntityTypes2["WitherSkeleton"]="wither_skeleton";MinecraftEntityTypes2["WitherSkull"]="wither_skull";MinecraftEntityTypes2["WitherSkullDangerous"]="wither_skull_dangerous";MinecraftEntityTypes2["Wolf"]="wolf";MinecraftEntityTypes2["XpBottle"]="xp_bottle";MinecraftEntityTypes2["XpOrb"]="xp_orb";MinecraftEntityTypes2["Zoglin"]="zoglin";MinecraftEntityTypes2["Zombie"]="zombie";MinecraftEntityTypes2["ZombieHorse"]="zombie_horse";MinecraftEntityTypes2["ZombiePigman"]="zombie_pigman";MinecraftEntityTypes2["ZombieVillager"]="zombie_villager";MinecraftEntityTypes2["ZombieVillagerV2"]="zombie_villager_v2";return MinecraftEntityTypes2})(MinecraftEntityTypes||{});var MinecraftItemTypes=(MinecraftItemTypes2=>{MinecraftItemTypes2["AcaciaBoat"]="minecraft:acacia_boat";MinecraftItemTypes2["AcaciaButton"]="minecraft:acacia_button";MinecraftItemTypes2["AcaciaChestBoat"]="minecraft:acacia_chest_boat";MinecraftItemTypes2["AcaciaDoor"]="minecraft:acacia_door";MinecraftItemTypes2["AcaciaFence"]="minecraft:acacia_fence";MinecraftItemTypes2["AcaciaFenceGate"]="minecraft:acacia_fence_gate";MinecraftItemTypes2["AcaciaHangingSign"]="minecraft:acacia_hanging_sign";MinecraftItemTypes2["AcaciaLog"]="minecraft:acacia_log";MinecraftItemTypes2["AcaciaPlanks"]="minecraft:acacia_planks";MinecraftItemTypes2["AcaciaPressurePlate"]="minecraft:acacia_pressure_plate";MinecraftItemTypes2["AcaciaSign"]="minecraft:acacia_sign";MinecraftItemTypes2["AcaciaStairs"]="minecraft:acacia_stairs";MinecraftItemTypes2["AcaciaTrapdoor"]="minecraft:acacia_trapdoor";MinecraftItemTypes2["ActivatorRail"]="minecraft:activator_rail";MinecraftItemTypes2["AllaySpawnEgg"]="minecraft:allay_spawn_egg";MinecraftItemTypes2["Allow"]="minecraft:allow";MinecraftItemTypes2["AmethystBlock"]="minecraft:amethyst_block";MinecraftItemTypes2["AmethystCluster"]="minecraft:amethyst_cluster";MinecraftItemTypes2["AmethystShard"]="minecraft:amethyst_shard";MinecraftItemTypes2["AncientDebris"]="minecraft:ancient_debris";MinecraftItemTypes2["Andesite"]="minecraft:andesite";MinecraftItemTypes2["AndesiteStairs"]="minecraft:andesite_stairs";MinecraftItemTypes2["AnglerPotterySherd"]="minecraft:angler_pottery_sherd";MinecraftItemTypes2["Anvil"]="minecraft:anvil";MinecraftItemTypes2["Apple"]="minecraft:apple";MinecraftItemTypes2["ArcherPotterySherd"]="minecraft:archer_pottery_sherd";MinecraftItemTypes2["ArmorStand"]="minecraft:armor_stand";MinecraftItemTypes2["ArmsUpPotterySherd"]="minecraft:arms_up_pottery_sherd";MinecraftItemTypes2["Arrow"]="minecraft:arrow";MinecraftItemTypes2["AxolotlBucket"]="minecraft:axolotl_bucket";MinecraftItemTypes2["AxolotlSpawnEgg"]="minecraft:axolotl_spawn_egg";MinecraftItemTypes2["Azalea"]="minecraft:azalea";MinecraftItemTypes2["AzaleaLeaves"]="minecraft:azalea_leaves";MinecraftItemTypes2["AzaleaLeavesFlowered"]="minecraft:azalea_leaves_flowered";MinecraftItemTypes2["BakedPotato"]="minecraft:baked_potato";MinecraftItemTypes2["Bamboo"]="minecraft:bamboo";MinecraftItemTypes2["BambooBlock"]="minecraft:bamboo_block";MinecraftItemTypes2["BambooButton"]="minecraft:bamboo_button";MinecraftItemTypes2["BambooChestRaft"]="minecraft:bamboo_chest_raft";MinecraftItemTypes2["BambooDoor"]="minecraft:bamboo_door";MinecraftItemTypes2["BambooFence"]="minecraft:bamboo_fence";MinecraftItemTypes2["BambooFenceGate"]="minecraft:bamboo_fence_gate";MinecraftItemTypes2["BambooHangingSign"]="minecraft:bamboo_hanging_sign";MinecraftItemTypes2["BambooMosaic"]="minecraft:bamboo_mosaic";MinecraftItemTypes2["BambooMosaicSlab"]="minecraft:bamboo_mosaic_slab";MinecraftItemTypes2["BambooMosaicStairs"]="minecraft:bamboo_mosaic_stairs";MinecraftItemTypes2["BambooPlanks"]="minecraft:bamboo_planks";MinecraftItemTypes2["BambooPressurePlate"]="minecraft:bamboo_pressure_plate";MinecraftItemTypes2["BambooRaft"]="minecraft:bamboo_raft";MinecraftItemTypes2["BambooSign"]="minecraft:bamboo_sign";MinecraftItemTypes2["BambooSlab"]="minecraft:bamboo_slab";MinecraftItemTypes2["BambooStairs"]="minecraft:bamboo_stairs";MinecraftItemTypes2["BambooTrapdoor"]="minecraft:bamboo_trapdoor";MinecraftItemTypes2["Banner"]="minecraft:banner";MinecraftItemTypes2["BannerPattern"]="minecraft:banner_pattern";MinecraftItemTypes2["Barrel"]="minecraft:barrel";MinecraftItemTypes2["Barrier"]="minecraft:barrier";MinecraftItemTypes2["Basalt"]="minecraft:basalt";MinecraftItemTypes2["BatSpawnEgg"]="minecraft:bat_spawn_egg";MinecraftItemTypes2["Beacon"]="minecraft:beacon";MinecraftItemTypes2["Bed"]="minecraft:bed";MinecraftItemTypes2["Bedrock"]="minecraft:bedrock";MinecraftItemTypes2["BeeNest"]="minecraft:bee_nest";MinecraftItemTypes2["BeeSpawnEgg"]="minecraft:bee_spawn_egg";MinecraftItemTypes2["Beef"]="minecraft:beef";MinecraftItemTypes2["Beehive"]="minecraft:beehive";MinecraftItemTypes2["Beetroot"]="minecraft:beetroot";MinecraftItemTypes2["BeetrootSeeds"]="minecraft:beetroot_seeds";MinecraftItemTypes2["BeetrootSoup"]="minecraft:beetroot_soup";MinecraftItemTypes2["Bell"]="minecraft:bell";MinecraftItemTypes2["BigDripleaf"]="minecraft:big_dripleaf";MinecraftItemTypes2["BirchBoat"]="minecraft:birch_boat";MinecraftItemTypes2["BirchButton"]="minecraft:birch_button";MinecraftItemTypes2["BirchChestBoat"]="minecraft:birch_chest_boat";MinecraftItemTypes2["BirchDoor"]="minecraft:birch_door";MinecraftItemTypes2["BirchFence"]="minecraft:birch_fence";MinecraftItemTypes2["BirchFenceGate"]="minecraft:birch_fence_gate";MinecraftItemTypes2["BirchHangingSign"]="minecraft:birch_hanging_sign";MinecraftItemTypes2["BirchLog"]="minecraft:birch_log";MinecraftItemTypes2["BirchPlanks"]="minecraft:birch_planks";MinecraftItemTypes2["BirchPressurePlate"]="minecraft:birch_pressure_plate";MinecraftItemTypes2["BirchSign"]="minecraft:birch_sign";MinecraftItemTypes2["BirchStairs"]="minecraft:birch_stairs";MinecraftItemTypes2["BirchTrapdoor"]="minecraft:birch_trapdoor";MinecraftItemTypes2["BlackCandle"]="minecraft:black_candle";MinecraftItemTypes2["BlackCarpet"]="minecraft:black_carpet";MinecraftItemTypes2["BlackConcrete"]="minecraft:black_concrete";MinecraftItemTypes2["BlackConcretePowder"]="minecraft:black_concrete_powder";MinecraftItemTypes2["BlackDye"]="minecraft:black_dye";MinecraftItemTypes2["BlackGlazedTerracotta"]="minecraft:black_glazed_terracotta";MinecraftItemTypes2["BlackShulkerBox"]="minecraft:black_shulker_box";MinecraftItemTypes2["BlackStainedGlass"]="minecraft:black_stained_glass";MinecraftItemTypes2["BlackStainedGlassPane"]="minecraft:black_stained_glass_pane";MinecraftItemTypes2["BlackTerracotta"]="minecraft:black_terracotta";MinecraftItemTypes2["BlackWool"]="minecraft:black_wool";MinecraftItemTypes2["Blackstone"]="minecraft:blackstone";MinecraftItemTypes2["BlackstoneSlab"]="minecraft:blackstone_slab";MinecraftItemTypes2["BlackstoneStairs"]="minecraft:blackstone_stairs";MinecraftItemTypes2["BlackstoneWall"]="minecraft:blackstone_wall";MinecraftItemTypes2["BladePotterySherd"]="minecraft:blade_pottery_sherd";MinecraftItemTypes2["BlastFurnace"]="minecraft:blast_furnace";MinecraftItemTypes2["BlazePowder"]="minecraft:blaze_powder";MinecraftItemTypes2["BlazeRod"]="minecraft:blaze_rod";MinecraftItemTypes2["BlazeSpawnEgg"]="minecraft:blaze_spawn_egg";MinecraftItemTypes2["BlueCandle"]="minecraft:blue_candle";MinecraftItemTypes2["BlueCarpet"]="minecraft:blue_carpet";MinecraftItemTypes2["BlueConcrete"]="minecraft:blue_concrete";MinecraftItemTypes2["BlueConcretePowder"]="minecraft:blue_concrete_powder";MinecraftItemTypes2["BlueDye"]="minecraft:blue_dye";MinecraftItemTypes2["BlueGlazedTerracotta"]="minecraft:blue_glazed_terracotta";MinecraftItemTypes2["BlueIce"]="minecraft:blue_ice";MinecraftItemTypes2["BlueShulkerBox"]="minecraft:blue_shulker_box";MinecraftItemTypes2["BlueStainedGlass"]="minecraft:blue_stained_glass";MinecraftItemTypes2["BlueStainedGlassPane"]="minecraft:blue_stained_glass_pane";MinecraftItemTypes2["BlueTerracotta"]="minecraft:blue_terracotta";MinecraftItemTypes2["BlueWool"]="minecraft:blue_wool";MinecraftItemTypes2["Boat"]="minecraft:boat";MinecraftItemTypes2["Bone"]="minecraft:bone";MinecraftItemTypes2["BoneBlock"]="minecraft:bone_block";MinecraftItemTypes2["BoneMeal"]="minecraft:bone_meal";MinecraftItemTypes2["Book"]="minecraft:book";MinecraftItemTypes2["Bookshelf"]="minecraft:bookshelf";MinecraftItemTypes2["BorderBlock"]="minecraft:border_block";MinecraftItemTypes2["BordureIndentedBannerPattern"]="minecraft:bordure_indented_banner_pattern";MinecraftItemTypes2["Bow"]="minecraft:bow";MinecraftItemTypes2["Bowl"]="minecraft:bowl";MinecraftItemTypes2["BrainCoral"]="minecraft:brain_coral";MinecraftItemTypes2["Bread"]="minecraft:bread";MinecraftItemTypes2["BrewerPotterySherd"]="minecraft:brewer_pottery_sherd";MinecraftItemTypes2["BrewingStand"]="minecraft:brewing_stand";MinecraftItemTypes2["Brick"]="minecraft:brick";MinecraftItemTypes2["BrickBlock"]="minecraft:brick_block";MinecraftItemTypes2["BrickStairs"]="minecraft:brick_stairs";MinecraftItemTypes2["BrownCandle"]="minecraft:brown_candle";MinecraftItemTypes2["BrownCarpet"]="minecraft:brown_carpet";MinecraftItemTypes2["BrownConcrete"]="minecraft:brown_concrete";MinecraftItemTypes2["BrownConcretePowder"]="minecraft:brown_concrete_powder";MinecraftItemTypes2["BrownDye"]="minecraft:brown_dye";MinecraftItemTypes2["BrownGlazedTerracotta"]="minecraft:brown_glazed_terracotta";MinecraftItemTypes2["BrownMushroom"]="minecraft:brown_mushroom";MinecraftItemTypes2["BrownMushroomBlock"]="minecraft:brown_mushroom_block";MinecraftItemTypes2["BrownShulkerBox"]="minecraft:brown_shulker_box";MinecraftItemTypes2["BrownStainedGlass"]="minecraft:brown_stained_glass";MinecraftItemTypes2["BrownStainedGlassPane"]="minecraft:brown_stained_glass_pane";MinecraftItemTypes2["BrownTerracotta"]="minecraft:brown_terracotta";MinecraftItemTypes2["BrownWool"]="minecraft:brown_wool";MinecraftItemTypes2["Brush"]="minecraft:brush";MinecraftItemTypes2["BubbleCoral"]="minecraft:bubble_coral";MinecraftItemTypes2["Bucket"]="minecraft:bucket";MinecraftItemTypes2["BuddingAmethyst"]="minecraft:budding_amethyst";MinecraftItemTypes2["BurnPotterySherd"]="minecraft:burn_pottery_sherd";MinecraftItemTypes2["Cactus"]="minecraft:cactus";MinecraftItemTypes2["Cake"]="minecraft:cake";MinecraftItemTypes2["Calcite"]="minecraft:calcite";MinecraftItemTypes2["CalibratedSculkSensor"]="minecraft:calibrated_sculk_sensor";MinecraftItemTypes2["CamelSpawnEgg"]="minecraft:camel_spawn_egg";MinecraftItemTypes2["Campfire"]="minecraft:campfire";MinecraftItemTypes2["Candle"]="minecraft:candle";MinecraftItemTypes2["Carpet"]="minecraft:carpet";MinecraftItemTypes2["Carrot"]="minecraft:carrot";MinecraftItemTypes2["CarrotOnAStick"]="minecraft:carrot_on_a_stick";MinecraftItemTypes2["CartographyTable"]="minecraft:cartography_table";MinecraftItemTypes2["CarvedPumpkin"]="minecraft:carved_pumpkin";MinecraftItemTypes2["CatSpawnEgg"]="minecraft:cat_spawn_egg";MinecraftItemTypes2["Cauldron"]="minecraft:cauldron";MinecraftItemTypes2["CaveSpiderSpawnEgg"]="minecraft:cave_spider_spawn_egg";MinecraftItemTypes2["Chain"]="minecraft:chain";MinecraftItemTypes2["ChainCommandBlock"]="minecraft:chain_command_block";MinecraftItemTypes2["ChainmailBoots"]="minecraft:chainmail_boots";MinecraftItemTypes2["ChainmailChestplate"]="minecraft:chainmail_chestplate";MinecraftItemTypes2["ChainmailHelmet"]="minecraft:chainmail_helmet";MinecraftItemTypes2["ChainmailLeggings"]="minecraft:chainmail_leggings";MinecraftItemTypes2["Charcoal"]="minecraft:charcoal";MinecraftItemTypes2["CherryBoat"]="minecraft:cherry_boat";MinecraftItemTypes2["CherryButton"]="minecraft:cherry_button";MinecraftItemTypes2["CherryChestBoat"]="minecraft:cherry_chest_boat";MinecraftItemTypes2["CherryDoor"]="minecraft:cherry_door";MinecraftItemTypes2["CherryFence"]="minecraft:cherry_fence";MinecraftItemTypes2["CherryFenceGate"]="minecraft:cherry_fence_gate";MinecraftItemTypes2["CherryHangingSign"]="minecraft:cherry_hanging_sign";MinecraftItemTypes2["CherryLeaves"]="minecraft:cherry_leaves";MinecraftItemTypes2["CherryLog"]="minecraft:cherry_log";MinecraftItemTypes2["CherryPlanks"]="minecraft:cherry_planks";MinecraftItemTypes2["CherryPressurePlate"]="minecraft:cherry_pressure_plate";MinecraftItemTypes2["CherrySapling"]="minecraft:cherry_sapling";MinecraftItemTypes2["CherrySign"]="minecraft:cherry_sign";MinecraftItemTypes2["CherrySlab"]="minecraft:cherry_slab";MinecraftItemTypes2["CherryStairs"]="minecraft:cherry_stairs";MinecraftItemTypes2["CherryTrapdoor"]="minecraft:cherry_trapdoor";MinecraftItemTypes2["CherryWood"]="minecraft:cherry_wood";MinecraftItemTypes2["Chest"]="minecraft:chest";MinecraftItemTypes2["ChestBoat"]="minecraft:chest_boat";MinecraftItemTypes2["ChestMinecart"]="minecraft:chest_minecart";MinecraftItemTypes2["Chicken"]="minecraft:chicken";MinecraftItemTypes2["ChickenSpawnEgg"]="minecraft:chicken_spawn_egg";MinecraftItemTypes2["ChiseledBookshelf"]="minecraft:chiseled_bookshelf";MinecraftItemTypes2["ChiseledCopper"]="minecraft:chiseled_copper";MinecraftItemTypes2["ChiseledDeepslate"]="minecraft:chiseled_deepslate";MinecraftItemTypes2["ChiseledNetherBricks"]="minecraft:chiseled_nether_bricks";MinecraftItemTypes2["ChiseledPolishedBlackstone"]="minecraft:chiseled_polished_blackstone";MinecraftItemTypes2["ChiseledTuff"]="minecraft:chiseled_tuff";MinecraftItemTypes2["ChiseledTuffBricks"]="minecraft:chiseled_tuff_bricks";MinecraftItemTypes2["ChorusFlower"]="minecraft:chorus_flower";MinecraftItemTypes2["ChorusFruit"]="minecraft:chorus_fruit";MinecraftItemTypes2["ChorusPlant"]="minecraft:chorus_plant";MinecraftItemTypes2["Clay"]="minecraft:clay";MinecraftItemTypes2["ClayBall"]="minecraft:clay_ball";MinecraftItemTypes2["Clock"]="minecraft:clock";MinecraftItemTypes2["Coal"]="minecraft:coal";MinecraftItemTypes2["CoalBlock"]="minecraft:coal_block";MinecraftItemTypes2["CoalOre"]="minecraft:coal_ore";MinecraftItemTypes2["CoastArmorTrimSmithingTemplate"]="minecraft:coast_armor_trim_smithing_template";MinecraftItemTypes2["CobbledDeepslate"]="minecraft:cobbled_deepslate";MinecraftItemTypes2["CobbledDeepslateSlab"]="minecraft:cobbled_deepslate_slab";MinecraftItemTypes2["CobbledDeepslateStairs"]="minecraft:cobbled_deepslate_stairs";MinecraftItemTypes2["CobbledDeepslateWall"]="minecraft:cobbled_deepslate_wall";MinecraftItemTypes2["Cobblestone"]="minecraft:cobblestone";MinecraftItemTypes2["CobblestoneWall"]="minecraft:cobblestone_wall";MinecraftItemTypes2["CocoaBeans"]="minecraft:cocoa_beans";MinecraftItemTypes2["Cod"]="minecraft:cod";MinecraftItemTypes2["CodBucket"]="minecraft:cod_bucket";MinecraftItemTypes2["CodSpawnEgg"]="minecraft:cod_spawn_egg";MinecraftItemTypes2["CommandBlock"]="minecraft:command_block";MinecraftItemTypes2["CommandBlockMinecart"]="minecraft:command_block_minecart";MinecraftItemTypes2["Comparator"]="minecraft:comparator";MinecraftItemTypes2["Compass"]="minecraft:compass";MinecraftItemTypes2["Composter"]="minecraft:composter";MinecraftItemTypes2["Concrete"]="minecraft:concrete";MinecraftItemTypes2["ConcretePowder"]="minecraft:concrete_powder";MinecraftItemTypes2["Conduit"]="minecraft:conduit";MinecraftItemTypes2["CookedBeef"]="minecraft:cooked_beef";MinecraftItemTypes2["CookedChicken"]="minecraft:cooked_chicken";MinecraftItemTypes2["CookedCod"]="minecraft:cooked_cod";MinecraftItemTypes2["CookedMutton"]="minecraft:cooked_mutton";MinecraftItemTypes2["CookedPorkchop"]="minecraft:cooked_porkchop";MinecraftItemTypes2["CookedRabbit"]="minecraft:cooked_rabbit";MinecraftItemTypes2["CookedSalmon"]="minecraft:cooked_salmon";MinecraftItemTypes2["Cookie"]="minecraft:cookie";MinecraftItemTypes2["CopperBlock"]="minecraft:copper_block";MinecraftItemTypes2["CopperBulb"]="minecraft:copper_bulb";MinecraftItemTypes2["CopperDoor"]="minecraft:copper_door";MinecraftItemTypes2["CopperGrate"]="minecraft:copper_grate";MinecraftItemTypes2["CopperIngot"]="minecraft:copper_ingot";MinecraftItemTypes2["CopperOre"]="minecraft:copper_ore";MinecraftItemTypes2["CopperTrapdoor"]="minecraft:copper_trapdoor";MinecraftItemTypes2["Coral"]="minecraft:coral";MinecraftItemTypes2["CoralBlock"]="minecraft:coral_block";MinecraftItemTypes2["CoralFan"]="minecraft:coral_fan";MinecraftItemTypes2["CoralFanDead"]="minecraft:coral_fan_dead";MinecraftItemTypes2["CowSpawnEgg"]="minecraft:cow_spawn_egg";MinecraftItemTypes2["CrackedDeepslateBricks"]="minecraft:cracked_deepslate_bricks";MinecraftItemTypes2["CrackedDeepslateTiles"]="minecraft:cracked_deepslate_tiles";MinecraftItemTypes2["CrackedNetherBricks"]="minecraft:cracked_nether_bricks";MinecraftItemTypes2["CrackedPolishedBlackstoneBricks"]="minecraft:cracked_polished_blackstone_bricks";MinecraftItemTypes2["Crafter"]="minecraft:crafter";MinecraftItemTypes2["CraftingTable"]="minecraft:crafting_table";MinecraftItemTypes2["CreeperBannerPattern"]="minecraft:creeper_banner_pattern";MinecraftItemTypes2["CreeperSpawnEgg"]="minecraft:creeper_spawn_egg";MinecraftItemTypes2["CrimsonButton"]="minecraft:crimson_button";MinecraftItemTypes2["CrimsonDoor"]="minecraft:crimson_door";MinecraftItemTypes2["CrimsonFence"]="minecraft:crimson_fence";MinecraftItemTypes2["CrimsonFenceGate"]="minecraft:crimson_fence_gate";MinecraftItemTypes2["CrimsonFungus"]="minecraft:crimson_fungus";MinecraftItemTypes2["CrimsonHangingSign"]="minecraft:crimson_hanging_sign";MinecraftItemTypes2["CrimsonHyphae"]="minecraft:crimson_hyphae";MinecraftItemTypes2["CrimsonNylium"]="minecraft:crimson_nylium";MinecraftItemTypes2["CrimsonPlanks"]="minecraft:crimson_planks";MinecraftItemTypes2["CrimsonPressurePlate"]="minecraft:crimson_pressure_plate";MinecraftItemTypes2["CrimsonRoots"]="minecraft:crimson_roots";MinecraftItemTypes2["CrimsonSign"]="minecraft:crimson_sign";MinecraftItemTypes2["CrimsonSlab"]="minecraft:crimson_slab";MinecraftItemTypes2["CrimsonStairs"]="minecraft:crimson_stairs";MinecraftItemTypes2["CrimsonStem"]="minecraft:crimson_stem";MinecraftItemTypes2["CrimsonTrapdoor"]="minecraft:crimson_trapdoor";MinecraftItemTypes2["Crossbow"]="minecraft:crossbow";MinecraftItemTypes2["CryingObsidian"]="minecraft:crying_obsidian";MinecraftItemTypes2["CutCopper"]="minecraft:cut_copper";MinecraftItemTypes2["CutCopperSlab"]="minecraft:cut_copper_slab";MinecraftItemTypes2["CutCopperStairs"]="minecraft:cut_copper_stairs";MinecraftItemTypes2["CyanCandle"]="minecraft:cyan_candle";MinecraftItemTypes2["CyanCarpet"]="minecraft:cyan_carpet";MinecraftItemTypes2["CyanConcrete"]="minecraft:cyan_concrete";MinecraftItemTypes2["CyanConcretePowder"]="minecraft:cyan_concrete_powder";MinecraftItemTypes2["CyanDye"]="minecraft:cyan_dye";MinecraftItemTypes2["CyanGlazedTerracotta"]="minecraft:cyan_glazed_terracotta";MinecraftItemTypes2["CyanShulkerBox"]="minecraft:cyan_shulker_box";MinecraftItemTypes2["CyanStainedGlass"]="minecraft:cyan_stained_glass";MinecraftItemTypes2["CyanStainedGlassPane"]="minecraft:cyan_stained_glass_pane";MinecraftItemTypes2["CyanTerracotta"]="minecraft:cyan_terracotta";MinecraftItemTypes2["CyanWool"]="minecraft:cyan_wool";MinecraftItemTypes2["DangerPotterySherd"]="minecraft:danger_pottery_sherd";MinecraftItemTypes2["DarkOakBoat"]="minecraft:dark_oak_boat";MinecraftItemTypes2["DarkOakButton"]="minecraft:dark_oak_button";MinecraftItemTypes2["DarkOakChestBoat"]="minecraft:dark_oak_chest_boat";MinecraftItemTypes2["DarkOakDoor"]="minecraft:dark_oak_door";MinecraftItemTypes2["DarkOakFence"]="minecraft:dark_oak_fence";MinecraftItemTypes2["DarkOakFenceGate"]="minecraft:dark_oak_fence_gate";MinecraftItemTypes2["DarkOakHangingSign"]="minecraft:dark_oak_hanging_sign";MinecraftItemTypes2["DarkOakLog"]="minecraft:dark_oak_log";MinecraftItemTypes2["DarkOakPlanks"]="minecraft:dark_oak_planks";MinecraftItemTypes2["DarkOakPressurePlate"]="minecraft:dark_oak_pressure_plate";MinecraftItemTypes2["DarkOakSign"]="minecraft:dark_oak_sign";MinecraftItemTypes2["DarkOakStairs"]="minecraft:dark_oak_stairs";MinecraftItemTypes2["DarkOakTrapdoor"]="minecraft:dark_oak_trapdoor";MinecraftItemTypes2["DarkPrismarineStairs"]="minecraft:dark_prismarine_stairs";MinecraftItemTypes2["DaylightDetector"]="minecraft:daylight_detector";MinecraftItemTypes2["DeadBrainCoral"]="minecraft:dead_brain_coral";MinecraftItemTypes2["DeadBubbleCoral"]="minecraft:dead_bubble_coral";MinecraftItemTypes2["DeadFireCoral"]="minecraft:dead_fire_coral";MinecraftItemTypes2["DeadHornCoral"]="minecraft:dead_horn_coral";MinecraftItemTypes2["DeadTubeCoral"]="minecraft:dead_tube_coral";MinecraftItemTypes2["Deadbush"]="minecraft:deadbush";MinecraftItemTypes2["DecoratedPot"]="minecraft:decorated_pot";MinecraftItemTypes2["Deepslate"]="minecraft:deepslate";MinecraftItemTypes2["DeepslateBrickSlab"]="minecraft:deepslate_brick_slab";MinecraftItemTypes2["DeepslateBrickStairs"]="minecraft:deepslate_brick_stairs";MinecraftItemTypes2["DeepslateBrickWall"]="minecraft:deepslate_brick_wall";MinecraftItemTypes2["DeepslateBricks"]="minecraft:deepslate_bricks";MinecraftItemTypes2["DeepslateCoalOre"]="minecraft:deepslate_coal_ore";MinecraftItemTypes2["DeepslateCopperOre"]="minecraft:deepslate_copper_ore";MinecraftItemTypes2["DeepslateDiamondOre"]="minecraft:deepslate_diamond_ore";MinecraftItemTypes2["DeepslateEmeraldOre"]="minecraft:deepslate_emerald_ore";MinecraftItemTypes2["DeepslateGoldOre"]="minecraft:deepslate_gold_ore";MinecraftItemTypes2["DeepslateIronOre"]="minecraft:deepslate_iron_ore";MinecraftItemTypes2["DeepslateLapisOre"]="minecraft:deepslate_lapis_ore";MinecraftItemTypes2["DeepslateRedstoneOre"]="minecraft:deepslate_redstone_ore";MinecraftItemTypes2["DeepslateTileSlab"]="minecraft:deepslate_tile_slab";MinecraftItemTypes2["DeepslateTileStairs"]="minecraft:deepslate_tile_stairs";MinecraftItemTypes2["DeepslateTileWall"]="minecraft:deepslate_tile_wall";MinecraftItemTypes2["DeepslateTiles"]="minecraft:deepslate_tiles";MinecraftItemTypes2["Deny"]="minecraft:deny";MinecraftItemTypes2["DetectorRail"]="minecraft:detector_rail";MinecraftItemTypes2["Diamond"]="minecraft:diamond";MinecraftItemTypes2["DiamondAxe"]="minecraft:diamond_axe";MinecraftItemTypes2["DiamondBlock"]="minecraft:diamond_block";MinecraftItemTypes2["DiamondBoots"]="minecraft:diamond_boots";MinecraftItemTypes2["DiamondChestplate"]="minecraft:diamond_chestplate";MinecraftItemTypes2["DiamondHelmet"]="minecraft:diamond_helmet";MinecraftItemTypes2["DiamondHoe"]="minecraft:diamond_hoe";MinecraftItemTypes2["DiamondHorseArmor"]="minecraft:diamond_horse_armor";MinecraftItemTypes2["DiamondLeggings"]="minecraft:diamond_leggings";MinecraftItemTypes2["DiamondOre"]="minecraft:diamond_ore";MinecraftItemTypes2["DiamondPickaxe"]="minecraft:diamond_pickaxe";MinecraftItemTypes2["DiamondShovel"]="minecraft:diamond_shovel";MinecraftItemTypes2["DiamondSword"]="minecraft:diamond_sword";MinecraftItemTypes2["Diorite"]="minecraft:diorite";MinecraftItemTypes2["DioriteStairs"]="minecraft:diorite_stairs";MinecraftItemTypes2["Dirt"]="minecraft:dirt";MinecraftItemTypes2["DirtWithRoots"]="minecraft:dirt_with_roots";MinecraftItemTypes2["DiscFragment5"]="minecraft:disc_fragment_5";MinecraftItemTypes2["Dispenser"]="minecraft:dispenser";MinecraftItemTypes2["DolphinSpawnEgg"]="minecraft:dolphin_spawn_egg";MinecraftItemTypes2["DonkeySpawnEgg"]="minecraft:donkey_spawn_egg";MinecraftItemTypes2["DoublePlant"]="minecraft:double_plant";MinecraftItemTypes2["DragonBreath"]="minecraft:dragon_breath";MinecraftItemTypes2["DragonEgg"]="minecraft:dragon_egg";MinecraftItemTypes2["DriedKelp"]="minecraft:dried_kelp";MinecraftItemTypes2["DriedKelpBlock"]="minecraft:dried_kelp_block";MinecraftItemTypes2["DripstoneBlock"]="minecraft:dripstone_block";MinecraftItemTypes2["Dropper"]="minecraft:dropper";MinecraftItemTypes2["DrownedSpawnEgg"]="minecraft:drowned_spawn_egg";MinecraftItemTypes2["DuneArmorTrimSmithingTemplate"]="minecraft:dune_armor_trim_smithing_template";MinecraftItemTypes2["Dye"]="minecraft:dye";MinecraftItemTypes2["EchoShard"]="minecraft:echo_shard";MinecraftItemTypes2["Egg"]="minecraft:egg";MinecraftItemTypes2["ElderGuardianSpawnEgg"]="minecraft:elder_guardian_spawn_egg";MinecraftItemTypes2["Elytra"]="minecraft:elytra";MinecraftItemTypes2["Emerald"]="minecraft:emerald";MinecraftItemTypes2["EmeraldBlock"]="minecraft:emerald_block";MinecraftItemTypes2["EmeraldOre"]="minecraft:emerald_ore";MinecraftItemTypes2["EmptyMap"]="minecraft:empty_map";MinecraftItemTypes2["EnchantedBook"]="minecraft:enchanted_book";MinecraftItemTypes2["EnchantedGoldenApple"]="minecraft:enchanted_golden_apple";MinecraftItemTypes2["EnchantingTable"]="minecraft:enchanting_table";MinecraftItemTypes2["EndBrickStairs"]="minecraft:end_brick_stairs";MinecraftItemTypes2["EndBricks"]="minecraft:end_bricks";MinecraftItemTypes2["EndCrystal"]="minecraft:end_crystal";MinecraftItemTypes2["EndPortalFrame"]="minecraft:end_portal_frame";MinecraftItemTypes2["EndRod"]="minecraft:end_rod";MinecraftItemTypes2["EndStone"]="minecraft:end_stone";MinecraftItemTypes2["EnderChest"]="minecraft:ender_chest";MinecraftItemTypes2["EnderDragonSpawnEgg"]="minecraft:ender_dragon_spawn_egg";MinecraftItemTypes2["EnderEye"]="minecraft:ender_eye";MinecraftItemTypes2["EnderPearl"]="minecraft:ender_pearl";MinecraftItemTypes2["EndermanSpawnEgg"]="minecraft:enderman_spawn_egg";MinecraftItemTypes2["EndermiteSpawnEgg"]="minecraft:endermite_spawn_egg";MinecraftItemTypes2["EvokerSpawnEgg"]="minecraft:evoker_spawn_egg";MinecraftItemTypes2["ExperienceBottle"]="minecraft:experience_bottle";MinecraftItemTypes2["ExplorerPotterySherd"]="minecraft:explorer_pottery_sherd";MinecraftItemTypes2["ExposedChiseledCopper"]="minecraft:exposed_chiseled_copper";MinecraftItemTypes2["ExposedCopper"]="minecraft:exposed_copper";MinecraftItemTypes2["ExposedCopperBulb"]="minecraft:exposed_copper_bulb";MinecraftItemTypes2["ExposedCopperDoor"]="minecraft:exposed_copper_door";MinecraftItemTypes2["ExposedCopperGrate"]="minecraft:exposed_copper_grate";MinecraftItemTypes2["ExposedCopperTrapdoor"]="minecraft:exposed_copper_trapdoor";MinecraftItemTypes2["ExposedCutCopper"]="minecraft:exposed_cut_copper";MinecraftItemTypes2["ExposedCutCopperSlab"]="minecraft:exposed_cut_copper_slab";MinecraftItemTypes2["ExposedCutCopperStairs"]="minecraft:exposed_cut_copper_stairs";MinecraftItemTypes2["EyeArmorTrimSmithingTemplate"]="minecraft:eye_armor_trim_smithing_template";MinecraftItemTypes2["Farmland"]="minecraft:farmland";MinecraftItemTypes2["Feather"]="minecraft:feather";MinecraftItemTypes2["Fence"]="minecraft:fence";MinecraftItemTypes2["FenceGate"]="minecraft:fence_gate";MinecraftItemTypes2["FermentedSpiderEye"]="minecraft:fermented_spider_eye";MinecraftItemTypes2["FieldMasonedBannerPattern"]="minecraft:field_masoned_banner_pattern";MinecraftItemTypes2["FilledMap"]="minecraft:filled_map";MinecraftItemTypes2["FireCharge"]="minecraft:fire_charge";MinecraftItemTypes2["FireCoral"]="minecraft:fire_coral";MinecraftItemTypes2["FireworkRocket"]="minecraft:firework_rocket";MinecraftItemTypes2["FireworkStar"]="minecraft:firework_star";MinecraftItemTypes2["FishingRod"]="minecraft:fishing_rod";MinecraftItemTypes2["FletchingTable"]="minecraft:fletching_table";MinecraftItemTypes2["Flint"]="minecraft:flint";MinecraftItemTypes2["FlintAndSteel"]="minecraft:flint_and_steel";MinecraftItemTypes2["FlowerBannerPattern"]="minecraft:flower_banner_pattern";MinecraftItemTypes2["FlowerPot"]="minecraft:flower_pot";MinecraftItemTypes2["FloweringAzalea"]="minecraft:flowering_azalea";MinecraftItemTypes2["FoxSpawnEgg"]="minecraft:fox_spawn_egg";MinecraftItemTypes2["Frame"]="minecraft:frame";MinecraftItemTypes2["FriendPotterySherd"]="minecraft:friend_pottery_sherd";MinecraftItemTypes2["FrogSpawn"]="minecraft:frog_spawn";MinecraftItemTypes2["FrogSpawnEgg"]="minecraft:frog_spawn_egg";MinecraftItemTypes2["FrostedIce"]="minecraft:frosted_ice";MinecraftItemTypes2["Furnace"]="minecraft:furnace";MinecraftItemTypes2["GhastSpawnEgg"]="minecraft:ghast_spawn_egg";MinecraftItemTypes2["GhastTear"]="minecraft:ghast_tear";MinecraftItemTypes2["GildedBlackstone"]="minecraft:gilded_blackstone";MinecraftItemTypes2["Glass"]="minecraft:glass";MinecraftItemTypes2["GlassBottle"]="minecraft:glass_bottle";MinecraftItemTypes2["GlassPane"]="minecraft:glass_pane";MinecraftItemTypes2["GlisteringMelonSlice"]="minecraft:glistering_melon_slice";MinecraftItemTypes2["GlobeBannerPattern"]="minecraft:globe_banner_pattern";MinecraftItemTypes2["GlowBerries"]="minecraft:glow_berries";MinecraftItemTypes2["GlowFrame"]="minecraft:glow_frame";MinecraftItemTypes2["GlowInkSac"]="minecraft:glow_ink_sac";MinecraftItemTypes2["GlowLichen"]="minecraft:glow_lichen";MinecraftItemTypes2["GlowSquidSpawnEgg"]="minecraft:glow_squid_spawn_egg";MinecraftItemTypes2["Glowstone"]="minecraft:glowstone";MinecraftItemTypes2["GlowstoneDust"]="minecraft:glowstone_dust";MinecraftItemTypes2["GoatHorn"]="minecraft:goat_horn";MinecraftItemTypes2["GoatSpawnEgg"]="minecraft:goat_spawn_egg";MinecraftItemTypes2["GoldBlock"]="minecraft:gold_block";MinecraftItemTypes2["GoldIngot"]="minecraft:gold_ingot";MinecraftItemTypes2["GoldNugget"]="minecraft:gold_nugget";MinecraftItemTypes2["GoldOre"]="minecraft:gold_ore";MinecraftItemTypes2["GoldenApple"]="minecraft:golden_apple";MinecraftItemTypes2["GoldenAxe"]="minecraft:golden_axe";MinecraftItemTypes2["GoldenBoots"]="minecraft:golden_boots";MinecraftItemTypes2["GoldenCarrot"]="minecraft:golden_carrot";MinecraftItemTypes2["GoldenChestplate"]="minecraft:golden_chestplate";MinecraftItemTypes2["GoldenHelmet"]="minecraft:golden_helmet";MinecraftItemTypes2["GoldenHoe"]="minecraft:golden_hoe";MinecraftItemTypes2["GoldenHorseArmor"]="minecraft:golden_horse_armor";MinecraftItemTypes2["GoldenLeggings"]="minecraft:golden_leggings";MinecraftItemTypes2["GoldenPickaxe"]="minecraft:golden_pickaxe";MinecraftItemTypes2["GoldenRail"]="minecraft:golden_rail";MinecraftItemTypes2["GoldenShovel"]="minecraft:golden_shovel";MinecraftItemTypes2["GoldenSword"]="minecraft:golden_sword";MinecraftItemTypes2["Granite"]="minecraft:granite";MinecraftItemTypes2["GraniteStairs"]="minecraft:granite_stairs";MinecraftItemTypes2["Grass"]="minecraft:grass";MinecraftItemTypes2["GrassPath"]="minecraft:grass_path";MinecraftItemTypes2["Gravel"]="minecraft:gravel";MinecraftItemTypes2["GrayCandle"]="minecraft:gray_candle";MinecraftItemTypes2["GrayCarpet"]="minecraft:gray_carpet";MinecraftItemTypes2["GrayConcrete"]="minecraft:gray_concrete";MinecraftItemTypes2["GrayConcretePowder"]="minecraft:gray_concrete_powder";MinecraftItemTypes2["GrayDye"]="minecraft:gray_dye";MinecraftItemTypes2["GrayGlazedTerracotta"]="minecraft:gray_glazed_terracotta";MinecraftItemTypes2["GrayShulkerBox"]="minecraft:gray_shulker_box";MinecraftItemTypes2["GrayStainedGlass"]="minecraft:gray_stained_glass";MinecraftItemTypes2["GrayStainedGlassPane"]="minecraft:gray_stained_glass_pane";MinecraftItemTypes2["GrayTerracotta"]="minecraft:gray_terracotta";MinecraftItemTypes2["GrayWool"]="minecraft:gray_wool";MinecraftItemTypes2["GreenCandle"]="minecraft:green_candle";MinecraftItemTypes2["GreenCarpet"]="minecraft:green_carpet";MinecraftItemTypes2["GreenConcrete"]="minecraft:green_concrete";MinecraftItemTypes2["GreenConcretePowder"]="minecraft:green_concrete_powder";MinecraftItemTypes2["GreenDye"]="minecraft:green_dye";MinecraftItemTypes2["GreenGlazedTerracotta"]="minecraft:green_glazed_terracotta";MinecraftItemTypes2["GreenShulkerBox"]="minecraft:green_shulker_box";MinecraftItemTypes2["GreenStainedGlass"]="minecraft:green_stained_glass";MinecraftItemTypes2["GreenStainedGlassPane"]="minecraft:green_stained_glass_pane";MinecraftItemTypes2["GreenTerracotta"]="minecraft:green_terracotta";MinecraftItemTypes2["GreenWool"]="minecraft:green_wool";MinecraftItemTypes2["Grindstone"]="minecraft:grindstone";MinecraftItemTypes2["GuardianSpawnEgg"]="minecraft:guardian_spawn_egg";MinecraftItemTypes2["Gunpowder"]="minecraft:gunpowder";MinecraftItemTypes2["HangingRoots"]="minecraft:hanging_roots";MinecraftItemTypes2["HardenedClay"]="minecraft:hardened_clay";MinecraftItemTypes2["HayBlock"]="minecraft:hay_block";MinecraftItemTypes2["HeartOfTheSea"]="minecraft:heart_of_the_sea";MinecraftItemTypes2["HeartPotterySherd"]="minecraft:heart_pottery_sherd";MinecraftItemTypes2["HeartbreakPotterySherd"]="minecraft:heartbreak_pottery_sherd";MinecraftItemTypes2["HeavyWeightedPressurePlate"]="minecraft:heavy_weighted_pressure_plate";MinecraftItemTypes2["HoglinSpawnEgg"]="minecraft:hoglin_spawn_egg";MinecraftItemTypes2["HoneyBlock"]="minecraft:honey_block";MinecraftItemTypes2["HoneyBottle"]="minecraft:honey_bottle";MinecraftItemTypes2["Honeycomb"]="minecraft:honeycomb";MinecraftItemTypes2["HoneycombBlock"]="minecraft:honeycomb_block";MinecraftItemTypes2["Hopper"]="minecraft:hopper";MinecraftItemTypes2["HopperMinecart"]="minecraft:hopper_minecart";MinecraftItemTypes2["HornCoral"]="minecraft:horn_coral";MinecraftItemTypes2["HorseSpawnEgg"]="minecraft:horse_spawn_egg";MinecraftItemTypes2["HostArmorTrimSmithingTemplate"]="minecraft:host_armor_trim_smithing_template";MinecraftItemTypes2["HowlPotterySherd"]="minecraft:howl_pottery_sherd";MinecraftItemTypes2["HuskSpawnEgg"]="minecraft:husk_spawn_egg";MinecraftItemTypes2["Ice"]="minecraft:ice";MinecraftItemTypes2["InfestedDeepslate"]="minecraft:infested_deepslate";MinecraftItemTypes2["InkSac"]="minecraft:ink_sac";MinecraftItemTypes2["IronAxe"]="minecraft:iron_axe";MinecraftItemTypes2["IronBars"]="minecraft:iron_bars";MinecraftItemTypes2["IronBlock"]="minecraft:iron_block";MinecraftItemTypes2["IronBoots"]="minecraft:iron_boots";MinecraftItemTypes2["IronChestplate"]="minecraft:iron_chestplate";MinecraftItemTypes2["IronDoor"]="minecraft:iron_door";MinecraftItemTypes2["IronGolemSpawnEgg"]="minecraft:iron_golem_spawn_egg";MinecraftItemTypes2["IronHelmet"]="minecraft:iron_helmet";MinecraftItemTypes2["IronHoe"]="minecraft:iron_hoe";MinecraftItemTypes2["IronHorseArmor"]="minecraft:iron_horse_armor";MinecraftItemTypes2["IronIngot"]="minecraft:iron_ingot";MinecraftItemTypes2["IronLeggings"]="minecraft:iron_leggings";MinecraftItemTypes2["IronNugget"]="minecraft:iron_nugget";MinecraftItemTypes2["IronOre"]="minecraft:iron_ore";MinecraftItemTypes2["IronPickaxe"]="minecraft:iron_pickaxe";MinecraftItemTypes2["IronShovel"]="minecraft:iron_shovel";MinecraftItemTypes2["IronSword"]="minecraft:iron_sword";MinecraftItemTypes2["IronTrapdoor"]="minecraft:iron_trapdoor";MinecraftItemTypes2["Jigsaw"]="minecraft:jigsaw";MinecraftItemTypes2["Jukebox"]="minecraft:jukebox";MinecraftItemTypes2["JungleBoat"]="minecraft:jungle_boat";MinecraftItemTypes2["JungleButton"]="minecraft:jungle_button";MinecraftItemTypes2["JungleChestBoat"]="minecraft:jungle_chest_boat";MinecraftItemTypes2["JungleDoor"]="minecraft:jungle_door";MinecraftItemTypes2["JungleFence"]="minecraft:jungle_fence";MinecraftItemTypes2["JungleFenceGate"]="minecraft:jungle_fence_gate";MinecraftItemTypes2["JungleHangingSign"]="minecraft:jungle_hanging_sign";MinecraftItemTypes2["JungleLog"]="minecraft:jungle_log";MinecraftItemTypes2["JunglePlanks"]="minecraft:jungle_planks";MinecraftItemTypes2["JunglePressurePlate"]="minecraft:jungle_pressure_plate";MinecraftItemTypes2["JungleSign"]="minecraft:jungle_sign";MinecraftItemTypes2["JungleStairs"]="minecraft:jungle_stairs";MinecraftItemTypes2["JungleTrapdoor"]="minecraft:jungle_trapdoor";MinecraftItemTypes2["Kelp"]="minecraft:kelp";MinecraftItemTypes2["Ladder"]="minecraft:ladder";MinecraftItemTypes2["Lantern"]="minecraft:lantern";MinecraftItemTypes2["LapisBlock"]="minecraft:lapis_block";MinecraftItemTypes2["LapisLazuli"]="minecraft:lapis_lazuli";MinecraftItemTypes2["LapisOre"]="minecraft:lapis_ore";MinecraftItemTypes2["LargeAmethystBud"]="minecraft:large_amethyst_bud";MinecraftItemTypes2["LavaBucket"]="minecraft:lava_bucket";MinecraftItemTypes2["Lead"]="minecraft:lead";MinecraftItemTypes2["Leather"]="minecraft:leather";MinecraftItemTypes2["LeatherBoots"]="minecraft:leather_boots";MinecraftItemTypes2["LeatherChestplate"]="minecraft:leather_chestplate";MinecraftItemTypes2["LeatherHelmet"]="minecraft:leather_helmet";MinecraftItemTypes2["LeatherHorseArmor"]="minecraft:leather_horse_armor";MinecraftItemTypes2["LeatherLeggings"]="minecraft:leather_leggings";MinecraftItemTypes2["Leaves"]="minecraft:leaves";MinecraftItemTypes2["Leaves2"]="minecraft:leaves2";MinecraftItemTypes2["Lectern"]="minecraft:lectern";MinecraftItemTypes2["Lever"]="minecraft:lever";MinecraftItemTypes2["LightBlock"]="minecraft:light_block";MinecraftItemTypes2["LightBlueCandle"]="minecraft:light_blue_candle";MinecraftItemTypes2["LightBlueCarpet"]="minecraft:light_blue_carpet";MinecraftItemTypes2["LightBlueConcrete"]="minecraft:light_blue_concrete";MinecraftItemTypes2["LightBlueConcretePowder"]="minecraft:light_blue_concrete_powder";MinecraftItemTypes2["LightBlueDye"]="minecraft:light_blue_dye";MinecraftItemTypes2["LightBlueGlazedTerracotta"]="minecraft:light_blue_glazed_terracotta";MinecraftItemTypes2["LightBlueShulkerBox"]="minecraft:light_blue_shulker_box";MinecraftItemTypes2["LightBlueStainedGlass"]="minecraft:light_blue_stained_glass";MinecraftItemTypes2["LightBlueStainedGlassPane"]="minecraft:light_blue_stained_glass_pane";MinecraftItemTypes2["LightBlueTerracotta"]="minecraft:light_blue_terracotta";MinecraftItemTypes2["LightBlueWool"]="minecraft:light_blue_wool";MinecraftItemTypes2["LightGrayCandle"]="minecraft:light_gray_candle";MinecraftItemTypes2["LightGrayCarpet"]="minecraft:light_gray_carpet";MinecraftItemTypes2["LightGrayConcrete"]="minecraft:light_gray_concrete";MinecraftItemTypes2["LightGrayConcretePowder"]="minecraft:light_gray_concrete_powder";MinecraftItemTypes2["LightGrayDye"]="minecraft:light_gray_dye";MinecraftItemTypes2["LightGrayShulkerBox"]="minecraft:light_gray_shulker_box";MinecraftItemTypes2["LightGrayStainedGlass"]="minecraft:light_gray_stained_glass";MinecraftItemTypes2["LightGrayStainedGlassPane"]="minecraft:light_gray_stained_glass_pane";MinecraftItemTypes2["LightGrayTerracotta"]="minecraft:light_gray_terracotta";MinecraftItemTypes2["LightGrayWool"]="minecraft:light_gray_wool";MinecraftItemTypes2["LightWeightedPressurePlate"]="minecraft:light_weighted_pressure_plate";MinecraftItemTypes2["LightningRod"]="minecraft:lightning_rod";MinecraftItemTypes2["LimeCandle"]="minecraft:lime_candle";MinecraftItemTypes2["LimeCarpet"]="minecraft:lime_carpet";MinecraftItemTypes2["LimeConcrete"]="minecraft:lime_concrete";MinecraftItemTypes2["LimeConcretePowder"]="minecraft:lime_concrete_powder";MinecraftItemTypes2["LimeDye"]="minecraft:lime_dye";MinecraftItemTypes2["LimeGlazedTerracotta"]="minecraft:lime_glazed_terracotta";MinecraftItemTypes2["LimeShulkerBox"]="minecraft:lime_shulker_box";MinecraftItemTypes2["LimeStainedGlass"]="minecraft:lime_stained_glass";MinecraftItemTypes2["LimeStainedGlassPane"]="minecraft:lime_stained_glass_pane";MinecraftItemTypes2["LimeTerracotta"]="minecraft:lime_terracotta";MinecraftItemTypes2["LimeWool"]="minecraft:lime_wool";MinecraftItemTypes2["LingeringPotion"]="minecraft:lingering_potion";MinecraftItemTypes2["LitPumpkin"]="minecraft:lit_pumpkin";MinecraftItemTypes2["LlamaSpawnEgg"]="minecraft:llama_spawn_egg";MinecraftItemTypes2["Lodestone"]="minecraft:lodestone";MinecraftItemTypes2["LodestoneCompass"]="minecraft:lodestone_compass";MinecraftItemTypes2["Log"]="minecraft:log";MinecraftItemTypes2["Log2"]="minecraft:log2";MinecraftItemTypes2["Loom"]="minecraft:loom";MinecraftItemTypes2["MagentaCandle"]="minecraft:magenta_candle";MinecraftItemTypes2["MagentaCarpet"]="minecraft:magenta_carpet";MinecraftItemTypes2["MagentaConcrete"]="minecraft:magenta_concrete";MinecraftItemTypes2["MagentaConcretePowder"]="minecraft:magenta_concrete_powder";MinecraftItemTypes2["MagentaDye"]="minecraft:magenta_dye";MinecraftItemTypes2["MagentaGlazedTerracotta"]="minecraft:magenta_glazed_terracotta";MinecraftItemTypes2["MagentaShulkerBox"]="minecraft:magenta_shulker_box";MinecraftItemTypes2["MagentaStainedGlass"]="minecraft:magenta_stained_glass";MinecraftItemTypes2["MagentaStainedGlassPane"]="minecraft:magenta_stained_glass_pane";MinecraftItemTypes2["MagentaTerracotta"]="minecraft:magenta_terracotta";MinecraftItemTypes2["MagentaWool"]="minecraft:magenta_wool";MinecraftItemTypes2["Magma"]="minecraft:magma";MinecraftItemTypes2["MagmaCream"]="minecraft:magma_cream";MinecraftItemTypes2["MagmaCubeSpawnEgg"]="minecraft:magma_cube_spawn_egg";MinecraftItemTypes2["MangroveBoat"]="minecraft:mangrove_boat";MinecraftItemTypes2["MangroveButton"]="minecraft:mangrove_button";MinecraftItemTypes2["MangroveChestBoat"]="minecraft:mangrove_chest_boat";MinecraftItemTypes2["MangroveDoor"]="minecraft:mangrove_door";MinecraftItemTypes2["MangroveFence"]="minecraft:mangrove_fence";MinecraftItemTypes2["MangroveFenceGate"]="minecraft:mangrove_fence_gate";MinecraftItemTypes2["MangroveHangingSign"]="minecraft:mangrove_hanging_sign";MinecraftItemTypes2["MangroveLeaves"]="minecraft:mangrove_leaves";MinecraftItemTypes2["MangroveLog"]="minecraft:mangrove_log";MinecraftItemTypes2["MangrovePlanks"]="minecraft:mangrove_planks";MinecraftItemTypes2["MangrovePressurePlate"]="minecraft:mangrove_pressure_plate";MinecraftItemTypes2["MangrovePropagule"]="minecraft:mangrove_propagule";MinecraftItemTypes2["MangroveRoots"]="minecraft:mangrove_roots";MinecraftItemTypes2["MangroveSign"]="minecraft:mangrove_sign";MinecraftItemTypes2["MangroveSlab"]="minecraft:mangrove_slab";MinecraftItemTypes2["MangroveStairs"]="minecraft:mangrove_stairs";MinecraftItemTypes2["MangroveTrapdoor"]="minecraft:mangrove_trapdoor";MinecraftItemTypes2["MangroveWood"]="minecraft:mangrove_wood";MinecraftItemTypes2["MediumAmethystBud"]="minecraft:medium_amethyst_bud";MinecraftItemTypes2["MelonBlock"]="minecraft:melon_block";MinecraftItemTypes2["MelonSeeds"]="minecraft:melon_seeds";MinecraftItemTypes2["MelonSlice"]="minecraft:melon_slice";MinecraftItemTypes2["MilkBucket"]="minecraft:milk_bucket";MinecraftItemTypes2["Minecart"]="minecraft:minecart";MinecraftItemTypes2["MinerPotterySherd"]="minecraft:miner_pottery_sherd";MinecraftItemTypes2["MobSpawner"]="minecraft:mob_spawner";MinecraftItemTypes2["MojangBannerPattern"]="minecraft:mojang_banner_pattern";MinecraftItemTypes2["MonsterEgg"]="minecraft:monster_egg";MinecraftItemTypes2["MooshroomSpawnEgg"]="minecraft:mooshroom_spawn_egg";MinecraftItemTypes2["MossBlock"]="minecraft:moss_block";MinecraftItemTypes2["MossCarpet"]="minecraft:moss_carpet";MinecraftItemTypes2["MossyCobblestone"]="minecraft:mossy_cobblestone";MinecraftItemTypes2["MossyCobblestoneStairs"]="minecraft:mossy_cobblestone_stairs";MinecraftItemTypes2["MossyStoneBrickStairs"]="minecraft:mossy_stone_brick_stairs";MinecraftItemTypes2["MournerPotterySherd"]="minecraft:mourner_pottery_sherd";MinecraftItemTypes2["Mud"]="minecraft:mud";MinecraftItemTypes2["MudBrickSlab"]="minecraft:mud_brick_slab";MinecraftItemTypes2["MudBrickStairs"]="minecraft:mud_brick_stairs";MinecraftItemTypes2["MudBrickWall"]="minecraft:mud_brick_wall";MinecraftItemTypes2["MudBricks"]="minecraft:mud_bricks";MinecraftItemTypes2["MuddyMangroveRoots"]="minecraft:muddy_mangrove_roots";MinecraftItemTypes2["MuleSpawnEgg"]="minecraft:mule_spawn_egg";MinecraftItemTypes2["MushroomStew"]="minecraft:mushroom_stew";MinecraftItemTypes2["MusicDisc11"]="minecraft:music_disc_11";MinecraftItemTypes2["MusicDisc13"]="minecraft:music_disc_13";MinecraftItemTypes2["MusicDisc5"]="minecraft:music_disc_5";MinecraftItemTypes2["MusicDiscBlocks"]="minecraft:music_disc_blocks";MinecraftItemTypes2["MusicDiscCat"]="minecraft:music_disc_cat";MinecraftItemTypes2["MusicDiscChirp"]="minecraft:music_disc_chirp";MinecraftItemTypes2["MusicDiscFar"]="minecraft:music_disc_far";MinecraftItemTypes2["MusicDiscMall"]="minecraft:music_disc_mall";MinecraftItemTypes2["MusicDiscMellohi"]="minecraft:music_disc_mellohi";MinecraftItemTypes2["MusicDiscOtherside"]="minecraft:music_disc_otherside";MinecraftItemTypes2["MusicDiscPigstep"]="minecraft:music_disc_pigstep";MinecraftItemTypes2["MusicDiscRelic"]="minecraft:music_disc_relic";MinecraftItemTypes2["MusicDiscStal"]="minecraft:music_disc_stal";MinecraftItemTypes2["MusicDiscStrad"]="minecraft:music_disc_strad";MinecraftItemTypes2["MusicDiscWait"]="minecraft:music_disc_wait";MinecraftItemTypes2["MusicDiscWard"]="minecraft:music_disc_ward";MinecraftItemTypes2["Mutton"]="minecraft:mutton";MinecraftItemTypes2["Mycelium"]="minecraft:mycelium";MinecraftItemTypes2["NameTag"]="minecraft:name_tag";MinecraftItemTypes2["NautilusShell"]="minecraft:nautilus_shell";MinecraftItemTypes2["NetherBrick"]="minecraft:nether_brick";MinecraftItemTypes2["NetherBrickFence"]="minecraft:nether_brick_fence";MinecraftItemTypes2["NetherBrickStairs"]="minecraft:nether_brick_stairs";MinecraftItemTypes2["NetherGoldOre"]="minecraft:nether_gold_ore";MinecraftItemTypes2["NetherSprouts"]="minecraft:nether_sprouts";MinecraftItemTypes2["NetherStar"]="minecraft:nether_star";MinecraftItemTypes2["NetherWart"]="minecraft:nether_wart";MinecraftItemTypes2["NetherWartBlock"]="minecraft:nether_wart_block";MinecraftItemTypes2["Netherbrick"]="minecraft:netherbrick";MinecraftItemTypes2["NetheriteAxe"]="minecraft:netherite_axe";MinecraftItemTypes2["NetheriteBlock"]="minecraft:netherite_block";MinecraftItemTypes2["NetheriteBoots"]="minecraft:netherite_boots";MinecraftItemTypes2["NetheriteChestplate"]="minecraft:netherite_chestplate";MinecraftItemTypes2["NetheriteHelmet"]="minecraft:netherite_helmet";MinecraftItemTypes2["NetheriteHoe"]="minecraft:netherite_hoe";MinecraftItemTypes2["NetheriteIngot"]="minecraft:netherite_ingot";MinecraftItemTypes2["NetheriteLeggings"]="minecraft:netherite_leggings";MinecraftItemTypes2["NetheritePickaxe"]="minecraft:netherite_pickaxe";MinecraftItemTypes2["NetheriteScrap"]="minecraft:netherite_scrap";MinecraftItemTypes2["NetheriteShovel"]="minecraft:netherite_shovel";MinecraftItemTypes2["NetheriteSword"]="minecraft:netherite_sword";MinecraftItemTypes2["NetheriteUpgradeSmithingTemplate"]="minecraft:netherite_upgrade_smithing_template";MinecraftItemTypes2["Netherrack"]="minecraft:netherrack";MinecraftItemTypes2["NormalStoneStairs"]="minecraft:normal_stone_stairs";MinecraftItemTypes2["Noteblock"]="minecraft:noteblock";MinecraftItemTypes2["OakBoat"]="minecraft:oak_boat";MinecraftItemTypes2["OakChestBoat"]="minecraft:oak_chest_boat";MinecraftItemTypes2["OakFence"]="minecraft:oak_fence";MinecraftItemTypes2["OakHangingSign"]="minecraft:oak_hanging_sign";MinecraftItemTypes2["OakLog"]="minecraft:oak_log";MinecraftItemTypes2["OakPlanks"]="minecraft:oak_planks";MinecraftItemTypes2["OakSign"]="minecraft:oak_sign";MinecraftItemTypes2["OakStairs"]="minecraft:oak_stairs";MinecraftItemTypes2["Observer"]="minecraft:observer";MinecraftItemTypes2["Obsidian"]="minecraft:obsidian";MinecraftItemTypes2["OcelotSpawnEgg"]="minecraft:ocelot_spawn_egg";MinecraftItemTypes2["OchreFroglight"]="minecraft:ochre_froglight";MinecraftItemTypes2["OrangeCandle"]="minecraft:orange_candle";MinecraftItemTypes2["OrangeCarpet"]="minecraft:orange_carpet";MinecraftItemTypes2["OrangeConcrete"]="minecraft:orange_concrete";MinecraftItemTypes2["OrangeConcretePowder"]="minecraft:orange_concrete_powder";MinecraftItemTypes2["OrangeDye"]="minecraft:orange_dye";MinecraftItemTypes2["OrangeGlazedTerracotta"]="minecraft:orange_glazed_terracotta";MinecraftItemTypes2["OrangeShulkerBox"]="minecraft:orange_shulker_box";MinecraftItemTypes2["OrangeStainedGlass"]="minecraft:orange_stained_glass";MinecraftItemTypes2["OrangeStainedGlassPane"]="minecraft:orange_stained_glass_pane";MinecraftItemTypes2["OrangeTerracotta"]="minecraft:orange_terracotta";MinecraftItemTypes2["OrangeWool"]="minecraft:orange_wool";MinecraftItemTypes2["OxidizedChiseledCopper"]="minecraft:oxidized_chiseled_copper";MinecraftItemTypes2["OxidizedCopper"]="minecraft:oxidized_copper";MinecraftItemTypes2["OxidizedCopperBulb"]="minecraft:oxidized_copper_bulb";MinecraftItemTypes2["OxidizedCopperDoor"]="minecraft:oxidized_copper_door";MinecraftItemTypes2["OxidizedCopperGrate"]="minecraft:oxidized_copper_grate";MinecraftItemTypes2["OxidizedCopperTrapdoor"]="minecraft:oxidized_copper_trapdoor";MinecraftItemTypes2["OxidizedCutCopper"]="minecraft:oxidized_cut_copper";MinecraftItemTypes2["OxidizedCutCopperSlab"]="minecraft:oxidized_cut_copper_slab";MinecraftItemTypes2["OxidizedCutCopperStairs"]="minecraft:oxidized_cut_copper_stairs";MinecraftItemTypes2["PackedIce"]="minecraft:packed_ice";MinecraftItemTypes2["PackedMud"]="minecraft:packed_mud";MinecraftItemTypes2["Painting"]="minecraft:painting";MinecraftItemTypes2["PandaSpawnEgg"]="minecraft:panda_spawn_egg";MinecraftItemTypes2["Paper"]="minecraft:paper";MinecraftItemTypes2["ParrotSpawnEgg"]="minecraft:parrot_spawn_egg";MinecraftItemTypes2["PearlescentFroglight"]="minecraft:pearlescent_froglight";MinecraftItemTypes2["PhantomMembrane"]="minecraft:phantom_membrane";MinecraftItemTypes2["PhantomSpawnEgg"]="minecraft:phantom_spawn_egg";MinecraftItemTypes2["PigSpawnEgg"]="minecraft:pig_spawn_egg";MinecraftItemTypes2["PiglinBannerPattern"]="minecraft:piglin_banner_pattern";MinecraftItemTypes2["PiglinBruteSpawnEgg"]="minecraft:piglin_brute_spawn_egg";MinecraftItemTypes2["PiglinSpawnEgg"]="minecraft:piglin_spawn_egg";MinecraftItemTypes2["PillagerSpawnEgg"]="minecraft:pillager_spawn_egg";MinecraftItemTypes2["PinkCandle"]="minecraft:pink_candle";MinecraftItemTypes2["PinkCarpet"]="minecraft:pink_carpet";MinecraftItemTypes2["PinkConcrete"]="minecraft:pink_concrete";MinecraftItemTypes2["PinkConcretePowder"]="minecraft:pink_concrete_powder";MinecraftItemTypes2["PinkDye"]="minecraft:pink_dye";MinecraftItemTypes2["PinkGlazedTerracotta"]="minecraft:pink_glazed_terracotta";MinecraftItemTypes2["PinkPetals"]="minecraft:pink_petals";MinecraftItemTypes2["PinkShulkerBox"]="minecraft:pink_shulker_box";MinecraftItemTypes2["PinkStainedGlass"]="minecraft:pink_stained_glass";MinecraftItemTypes2["PinkStainedGlassPane"]="minecraft:pink_stained_glass_pane";MinecraftItemTypes2["PinkTerracotta"]="minecraft:pink_terracotta";MinecraftItemTypes2["PinkWool"]="minecraft:pink_wool";MinecraftItemTypes2["Piston"]="minecraft:piston";MinecraftItemTypes2["PitcherPlant"]="minecraft:pitcher_plant";MinecraftItemTypes2["PitcherPod"]="minecraft:pitcher_pod";MinecraftItemTypes2["Planks"]="minecraft:planks";MinecraftItemTypes2["PlentyPotterySherd"]="minecraft:plenty_pottery_sherd";MinecraftItemTypes2["Podzol"]="minecraft:podzol";MinecraftItemTypes2["PointedDripstone"]="minecraft:pointed_dripstone";MinecraftItemTypes2["PoisonousPotato"]="minecraft:poisonous_potato";MinecraftItemTypes2["PolarBearSpawnEgg"]="minecraft:polar_bear_spawn_egg";MinecraftItemTypes2["PolishedAndesite"]="minecraft:polished_andesite";MinecraftItemTypes2["PolishedAndesiteStairs"]="minecraft:polished_andesite_stairs";MinecraftItemTypes2["PolishedBasalt"]="minecraft:polished_basalt";MinecraftItemTypes2["PolishedBlackstone"]="minecraft:polished_blackstone";MinecraftItemTypes2["PolishedBlackstoneBrickSlab"]="minecraft:polished_blackstone_brick_slab";MinecraftItemTypes2["PolishedBlackstoneBrickStairs"]="minecraft:polished_blackstone_brick_stairs";MinecraftItemTypes2["PolishedBlackstoneBrickWall"]="minecraft:polished_blackstone_brick_wall";MinecraftItemTypes2["PolishedBlackstoneBricks"]="minecraft:polished_blackstone_bricks";MinecraftItemTypes2["PolishedBlackstoneButton"]="minecraft:polished_blackstone_button";MinecraftItemTypes2["PolishedBlackstonePressurePlate"]="minecraft:polished_blackstone_pressure_plate";MinecraftItemTypes2["PolishedBlackstoneSlab"]="minecraft:polished_blackstone_slab";MinecraftItemTypes2["PolishedBlackstoneStairs"]="minecraft:polished_blackstone_stairs";MinecraftItemTypes2["PolishedBlackstoneWall"]="minecraft:polished_blackstone_wall";MinecraftItemTypes2["PolishedDeepslate"]="minecraft:polished_deepslate";MinecraftItemTypes2["PolishedDeepslateSlab"]="minecraft:polished_deepslate_slab";MinecraftItemTypes2["PolishedDeepslateStairs"]="minecraft:polished_deepslate_stairs";MinecraftItemTypes2["PolishedDeepslateWall"]="minecraft:polished_deepslate_wall";MinecraftItemTypes2["PolishedDiorite"]="minecraft:polished_diorite";MinecraftItemTypes2["PolishedDioriteStairs"]="minecraft:polished_diorite_stairs";MinecraftItemTypes2["PolishedGranite"]="minecraft:polished_granite";MinecraftItemTypes2["PolishedGraniteStairs"]="minecraft:polished_granite_stairs";MinecraftItemTypes2["PolishedTuff"]="minecraft:polished_tuff";MinecraftItemTypes2["PolishedTuffSlab"]="minecraft:polished_tuff_slab";MinecraftItemTypes2["PolishedTuffStairs"]="minecraft:polished_tuff_stairs";MinecraftItemTypes2["PolishedTuffWall"]="minecraft:polished_tuff_wall";MinecraftItemTypes2["PoppedChorusFruit"]="minecraft:popped_chorus_fruit";MinecraftItemTypes2["Porkchop"]="minecraft:porkchop";MinecraftItemTypes2["Potato"]="minecraft:potato";MinecraftItemTypes2["Potion"]="minecraft:potion";MinecraftItemTypes2["PowderSnowBucket"]="minecraft:powder_snow_bucket";MinecraftItemTypes2["Prismarine"]="minecraft:prismarine";MinecraftItemTypes2["PrismarineBricksStairs"]="minecraft:prismarine_bricks_stairs";MinecraftItemTypes2["PrismarineCrystals"]="minecraft:prismarine_crystals";MinecraftItemTypes2["PrismarineShard"]="minecraft:prismarine_shard";MinecraftItemTypes2["PrismarineStairs"]="minecraft:prismarine_stairs";MinecraftItemTypes2["PrizePotterySherd"]="minecraft:prize_pottery_sherd";MinecraftItemTypes2["Pufferfish"]="minecraft:pufferfish";MinecraftItemTypes2["PufferfishBucket"]="minecraft:pufferfish_bucket";MinecraftItemTypes2["PufferfishSpawnEgg"]="minecraft:pufferfish_spawn_egg";MinecraftItemTypes2["Pumpkin"]="minecraft:pumpkin";MinecraftItemTypes2["PumpkinPie"]="minecraft:pumpkin_pie";MinecraftItemTypes2["PumpkinSeeds"]="minecraft:pumpkin_seeds";MinecraftItemTypes2["PurpleCandle"]="minecraft:purple_candle";MinecraftItemTypes2["PurpleCarpet"]="minecraft:purple_carpet";MinecraftItemTypes2["PurpleConcrete"]="minecraft:purple_concrete";MinecraftItemTypes2["PurpleConcretePowder"]="minecraft:purple_concrete_powder";MinecraftItemTypes2["PurpleDye"]="minecraft:purple_dye";MinecraftItemTypes2["PurpleGlazedTerracotta"]="minecraft:purple_glazed_terracotta";MinecraftItemTypes2["PurpleShulkerBox"]="minecraft:purple_shulker_box";MinecraftItemTypes2["PurpleStainedGlass"]="minecraft:purple_stained_glass";MinecraftItemTypes2["PurpleStainedGlassPane"]="minecraft:purple_stained_glass_pane";MinecraftItemTypes2["PurpleTerracotta"]="minecraft:purple_terracotta";MinecraftItemTypes2["PurpleWool"]="minecraft:purple_wool";MinecraftItemTypes2["PurpurBlock"]="minecraft:purpur_block";MinecraftItemTypes2["PurpurStairs"]="minecraft:purpur_stairs";MinecraftItemTypes2["Quartz"]="minecraft:quartz";MinecraftItemTypes2["QuartzBlock"]="minecraft:quartz_block";MinecraftItemTypes2["QuartzBricks"]="minecraft:quartz_bricks";MinecraftItemTypes2["QuartzOre"]="minecraft:quartz_ore";MinecraftItemTypes2["QuartzStairs"]="minecraft:quartz_stairs";MinecraftItemTypes2["Rabbit"]="minecraft:rabbit";MinecraftItemTypes2["RabbitFoot"]="minecraft:rabbit_foot";MinecraftItemTypes2["RabbitHide"]="minecraft:rabbit_hide";MinecraftItemTypes2["RabbitSpawnEgg"]="minecraft:rabbit_spawn_egg";MinecraftItemTypes2["RabbitStew"]="minecraft:rabbit_stew";MinecraftItemTypes2["Rail"]="minecraft:rail";MinecraftItemTypes2["RaiserArmorTrimSmithingTemplate"]="minecraft:raiser_armor_trim_smithing_template";MinecraftItemTypes2["RavagerSpawnEgg"]="minecraft:ravager_spawn_egg";MinecraftItemTypes2["RawCopper"]="minecraft:raw_copper";MinecraftItemTypes2["RawCopperBlock"]="minecraft:raw_copper_block";MinecraftItemTypes2["RawGold"]="minecraft:raw_gold";MinecraftItemTypes2["RawGoldBlock"]="minecraft:raw_gold_block";MinecraftItemTypes2["RawIron"]="minecraft:raw_iron";MinecraftItemTypes2["RawIronBlock"]="minecraft:raw_iron_block";MinecraftItemTypes2["RecoveryCompass"]="minecraft:recovery_compass";MinecraftItemTypes2["RedCandle"]="minecraft:red_candle";MinecraftItemTypes2["RedCarpet"]="minecraft:red_carpet";MinecraftItemTypes2["RedConcrete"]="minecraft:red_concrete";MinecraftItemTypes2["RedConcretePowder"]="minecraft:red_concrete_powder";MinecraftItemTypes2["RedDye"]="minecraft:red_dye";MinecraftItemTypes2["RedFlower"]="minecraft:red_flower";MinecraftItemTypes2["RedGlazedTerracotta"]="minecraft:red_glazed_terracotta";MinecraftItemTypes2["RedMushroom"]="minecraft:red_mushroom";MinecraftItemTypes2["RedMushroomBlock"]="minecraft:red_mushroom_block";MinecraftItemTypes2["RedNetherBrick"]="minecraft:red_nether_brick";MinecraftItemTypes2["RedNetherBrickStairs"]="minecraft:red_nether_brick_stairs";MinecraftItemTypes2["RedSandstone"]="minecraft:red_sandstone";MinecraftItemTypes2["RedSandstoneStairs"]="minecraft:red_sandstone_stairs";MinecraftItemTypes2["RedShulkerBox"]="minecraft:red_shulker_box";MinecraftItemTypes2["RedStainedGlass"]="minecraft:red_stained_glass";MinecraftItemTypes2["RedStainedGlassPane"]="minecraft:red_stained_glass_pane";MinecraftItemTypes2["RedTerracotta"]="minecraft:red_terracotta";MinecraftItemTypes2["RedWool"]="minecraft:red_wool";MinecraftItemTypes2["Redstone"]="minecraft:redstone";MinecraftItemTypes2["RedstoneBlock"]="minecraft:redstone_block";MinecraftItemTypes2["RedstoneLamp"]="minecraft:redstone_lamp";MinecraftItemTypes2["RedstoneOre"]="minecraft:redstone_ore";MinecraftItemTypes2["RedstoneTorch"]="minecraft:redstone_torch";MinecraftItemTypes2["ReinforcedDeepslate"]="minecraft:reinforced_deepslate";MinecraftItemTypes2["Repeater"]="minecraft:repeater";MinecraftItemTypes2["RepeatingCommandBlock"]="minecraft:repeating_command_block";MinecraftItemTypes2["RespawnAnchor"]="minecraft:respawn_anchor";MinecraftItemTypes2["RibArmorTrimSmithingTemplate"]="minecraft:rib_armor_trim_smithing_template";MinecraftItemTypes2["RottenFlesh"]="minecraft:rotten_flesh";MinecraftItemTypes2["Saddle"]="minecraft:saddle";MinecraftItemTypes2["Salmon"]="minecraft:salmon";MinecraftItemTypes2["SalmonBucket"]="minecraft:salmon_bucket";MinecraftItemTypes2["SalmonSpawnEgg"]="minecraft:salmon_spawn_egg";MinecraftItemTypes2["Sand"]="minecraft:sand";MinecraftItemTypes2["Sandstone"]="minecraft:sandstone";MinecraftItemTypes2["SandstoneStairs"]="minecraft:sandstone_stairs";MinecraftItemTypes2["Sapling"]="minecraft:sapling";MinecraftItemTypes2["Scaffolding"]="minecraft:scaffolding";MinecraftItemTypes2["Sculk"]="minecraft:sculk";MinecraftItemTypes2["SculkCatalyst"]="minecraft:sculk_catalyst";MinecraftItemTypes2["SculkSensor"]="minecraft:sculk_sensor";MinecraftItemTypes2["SculkShrieker"]="minecraft:sculk_shrieker";MinecraftItemTypes2["SculkVein"]="minecraft:sculk_vein";MinecraftItemTypes2["Scute"]="minecraft:scute";MinecraftItemTypes2["SeaLantern"]="minecraft:sea_lantern";MinecraftItemTypes2["SeaPickle"]="minecraft:sea_pickle";MinecraftItemTypes2["Seagrass"]="minecraft:seagrass";MinecraftItemTypes2["SentryArmorTrimSmithingTemplate"]="minecraft:sentry_armor_trim_smithing_template";MinecraftItemTypes2["ShaperArmorTrimSmithingTemplate"]="minecraft:shaper_armor_trim_smithing_template";MinecraftItemTypes2["SheafPotterySherd"]="minecraft:sheaf_pottery_sherd";MinecraftItemTypes2["Shears"]="minecraft:shears";MinecraftItemTypes2["SheepSpawnEgg"]="minecraft:sheep_spawn_egg";MinecraftItemTypes2["ShelterPotterySherd"]="minecraft:shelter_pottery_sherd";MinecraftItemTypes2["Shield"]="minecraft:shield";MinecraftItemTypes2["Shroomlight"]="minecraft:shroomlight";MinecraftItemTypes2["ShulkerBox"]="minecraft:shulker_box";MinecraftItemTypes2["ShulkerShell"]="minecraft:shulker_shell";MinecraftItemTypes2["ShulkerSpawnEgg"]="minecraft:shulker_spawn_egg";MinecraftItemTypes2["SilenceArmorTrimSmithingTemplate"]="minecraft:silence_armor_trim_smithing_template";MinecraftItemTypes2["SilverGlazedTerracotta"]="minecraft:silver_glazed_terracotta";MinecraftItemTypes2["SilverfishSpawnEgg"]="minecraft:silverfish_spawn_egg";MinecraftItemTypes2["SkeletonHorseSpawnEgg"]="minecraft:skeleton_horse_spawn_egg";MinecraftItemTypes2["SkeletonSpawnEgg"]="minecraft:skeleton_spawn_egg";MinecraftItemTypes2["Skull"]="minecraft:skull";MinecraftItemTypes2["SkullBannerPattern"]="minecraft:skull_banner_pattern";MinecraftItemTypes2["SkullPotterySherd"]="minecraft:skull_pottery_sherd";MinecraftItemTypes2["Slime"]="minecraft:slime";MinecraftItemTypes2["SlimeBall"]="minecraft:slime_ball";MinecraftItemTypes2["SlimeSpawnEgg"]="minecraft:slime_spawn_egg";MinecraftItemTypes2["SmallAmethystBud"]="minecraft:small_amethyst_bud";MinecraftItemTypes2["SmallDripleafBlock"]="minecraft:small_dripleaf_block";MinecraftItemTypes2["SmithingTable"]="minecraft:smithing_table";MinecraftItemTypes2["Smoker"]="minecraft:smoker";MinecraftItemTypes2["SmoothBasalt"]="minecraft:smooth_basalt";MinecraftItemTypes2["SmoothQuartzStairs"]="minecraft:smooth_quartz_stairs";MinecraftItemTypes2["SmoothRedSandstoneStairs"]="minecraft:smooth_red_sandstone_stairs";MinecraftItemTypes2["SmoothSandstoneStairs"]="minecraft:smooth_sandstone_stairs";MinecraftItemTypes2["SmoothStone"]="minecraft:smooth_stone";MinecraftItemTypes2["SnifferEgg"]="minecraft:sniffer_egg";MinecraftItemTypes2["SnifferSpawnEgg"]="minecraft:sniffer_spawn_egg";MinecraftItemTypes2["SnortPotterySherd"]="minecraft:snort_pottery_sherd";MinecraftItemTypes2["SnoutArmorTrimSmithingTemplate"]="minecraft:snout_armor_trim_smithing_template";MinecraftItemTypes2["Snow"]="minecraft:snow";MinecraftItemTypes2["SnowGolemSpawnEgg"]="minecraft:snow_golem_spawn_egg";MinecraftItemTypes2["SnowLayer"]="minecraft:snow_layer";MinecraftItemTypes2["Snowball"]="minecraft:snowball";MinecraftItemTypes2["SoulCampfire"]="minecraft:soul_campfire";MinecraftItemTypes2["SoulLantern"]="minecraft:soul_lantern";MinecraftItemTypes2["SoulSand"]="minecraft:soul_sand";MinecraftItemTypes2["SoulSoil"]="minecraft:soul_soil";MinecraftItemTypes2["SoulTorch"]="minecraft:soul_torch";MinecraftItemTypes2["SpawnEgg"]="minecraft:spawn_egg";MinecraftItemTypes2["SpiderEye"]="minecraft:spider_eye";MinecraftItemTypes2["SpiderSpawnEgg"]="minecraft:spider_spawn_egg";MinecraftItemTypes2["SpireArmorTrimSmithingTemplate"]="minecraft:spire_armor_trim_smithing_template";MinecraftItemTypes2["SplashPotion"]="minecraft:splash_potion";MinecraftItemTypes2["Sponge"]="minecraft:sponge";MinecraftItemTypes2["SporeBlossom"]="minecraft:spore_blossom";MinecraftItemTypes2["SpruceBoat"]="minecraft:spruce_boat";MinecraftItemTypes2["SpruceButton"]="minecraft:spruce_button";MinecraftItemTypes2["SpruceChestBoat"]="minecraft:spruce_chest_boat";MinecraftItemTypes2["SpruceDoor"]="minecraft:spruce_door";MinecraftItemTypes2["SpruceFence"]="minecraft:spruce_fence";MinecraftItemTypes2["SpruceFenceGate"]="minecraft:spruce_fence_gate";MinecraftItemTypes2["SpruceHangingSign"]="minecraft:spruce_hanging_sign";MinecraftItemTypes2["SpruceLog"]="minecraft:spruce_log";MinecraftItemTypes2["SprucePlanks"]="minecraft:spruce_planks";MinecraftItemTypes2["SprucePressurePlate"]="minecraft:spruce_pressure_plate";MinecraftItemTypes2["SpruceSign"]="minecraft:spruce_sign";MinecraftItemTypes2["SpruceStairs"]="minecraft:spruce_stairs";MinecraftItemTypes2["SpruceTrapdoor"]="minecraft:spruce_trapdoor";MinecraftItemTypes2["Spyglass"]="minecraft:spyglass";MinecraftItemTypes2["SquidSpawnEgg"]="minecraft:squid_spawn_egg";MinecraftItemTypes2["StainedGlass"]="minecraft:stained_glass";MinecraftItemTypes2["StainedGlassPane"]="minecraft:stained_glass_pane";MinecraftItemTypes2["StainedHardenedClay"]="minecraft:stained_hardened_clay";MinecraftItemTypes2["Stick"]="minecraft:stick";MinecraftItemTypes2["StickyPiston"]="minecraft:sticky_piston";MinecraftItemTypes2["Stone"]="minecraft:stone";MinecraftItemTypes2["StoneAxe"]="minecraft:stone_axe";MinecraftItemTypes2["StoneBlockSlab"]="minecraft:stone_block_slab";MinecraftItemTypes2["StoneBlockSlab2"]="minecraft:stone_block_slab2";MinecraftItemTypes2["StoneBlockSlab3"]="minecraft:stone_block_slab3";MinecraftItemTypes2["StoneBlockSlab4"]="minecraft:stone_block_slab4";MinecraftItemTypes2["StoneBrickStairs"]="minecraft:stone_brick_stairs";MinecraftItemTypes2["StoneButton"]="minecraft:stone_button";MinecraftItemTypes2["StoneHoe"]="minecraft:stone_hoe";MinecraftItemTypes2["StonePickaxe"]="minecraft:stone_pickaxe";MinecraftItemTypes2["StonePressurePlate"]="minecraft:stone_pressure_plate";MinecraftItemTypes2["StoneShovel"]="minecraft:stone_shovel";MinecraftItemTypes2["StoneStairs"]="minecraft:stone_stairs";MinecraftItemTypes2["StoneSword"]="minecraft:stone_sword";MinecraftItemTypes2["Stonebrick"]="minecraft:stonebrick";MinecraftItemTypes2["StonecutterBlock"]="minecraft:stonecutter_block";MinecraftItemTypes2["StraySpawnEgg"]="minecraft:stray_spawn_egg";MinecraftItemTypes2["StriderSpawnEgg"]="minecraft:strider_spawn_egg";MinecraftItemTypes2["String"]="minecraft:string";MinecraftItemTypes2["StrippedAcaciaLog"]="minecraft:stripped_acacia_log";MinecraftItemTypes2["StrippedBambooBlock"]="minecraft:stripped_bamboo_block";MinecraftItemTypes2["StrippedBirchLog"]="minecraft:stripped_birch_log";MinecraftItemTypes2["StrippedCherryLog"]="minecraft:stripped_cherry_log";MinecraftItemTypes2["StrippedCherryWood"]="minecraft:stripped_cherry_wood";MinecraftItemTypes2["StrippedCrimsonHyphae"]="minecraft:stripped_crimson_hyphae";MinecraftItemTypes2["StrippedCrimsonStem"]="minecraft:stripped_crimson_stem";MinecraftItemTypes2["StrippedDarkOakLog"]="minecraft:stripped_dark_oak_log";MinecraftItemTypes2["StrippedJungleLog"]="minecraft:stripped_jungle_log";MinecraftItemTypes2["StrippedMangroveLog"]="minecraft:stripped_mangrove_log";MinecraftItemTypes2["StrippedMangroveWood"]="minecraft:stripped_mangrove_wood";MinecraftItemTypes2["StrippedOakLog"]="minecraft:stripped_oak_log";MinecraftItemTypes2["StrippedSpruceLog"]="minecraft:stripped_spruce_log";MinecraftItemTypes2["StrippedWarpedHyphae"]="minecraft:stripped_warped_hyphae";MinecraftItemTypes2["StrippedWarpedStem"]="minecraft:stripped_warped_stem";MinecraftItemTypes2["StructureBlock"]="minecraft:structure_block";MinecraftItemTypes2["StructureVoid"]="minecraft:structure_void";MinecraftItemTypes2["Sugar"]="minecraft:sugar";MinecraftItemTypes2["SugarCane"]="minecraft:sugar_cane";MinecraftItemTypes2["SuspiciousGravel"]="minecraft:suspicious_gravel";MinecraftItemTypes2["SuspiciousSand"]="minecraft:suspicious_sand";MinecraftItemTypes2["SuspiciousStew"]="minecraft:suspicious_stew";MinecraftItemTypes2["SweetBerries"]="minecraft:sweet_berries";MinecraftItemTypes2["TadpoleBucket"]="minecraft:tadpole_bucket";MinecraftItemTypes2["TadpoleSpawnEgg"]="minecraft:tadpole_spawn_egg";MinecraftItemTypes2["Tallgrass"]="minecraft:tallgrass";MinecraftItemTypes2["Target"]="minecraft:target";MinecraftItemTypes2["TideArmorTrimSmithingTemplate"]="minecraft:tide_armor_trim_smithing_template";MinecraftItemTypes2["TintedGlass"]="minecraft:tinted_glass";MinecraftItemTypes2["Tnt"]="minecraft:tnt";MinecraftItemTypes2["TntMinecart"]="minecraft:tnt_minecart";MinecraftItemTypes2["Torch"]="minecraft:torch";MinecraftItemTypes2["Torchflower"]="minecraft:torchflower";MinecraftItemTypes2["TorchflowerSeeds"]="minecraft:torchflower_seeds";MinecraftItemTypes2["TotemOfUndying"]="minecraft:totem_of_undying";MinecraftItemTypes2["TraderLlamaSpawnEgg"]="minecraft:trader_llama_spawn_egg";MinecraftItemTypes2["Trapdoor"]="minecraft:trapdoor";MinecraftItemTypes2["TrappedChest"]="minecraft:trapped_chest";MinecraftItemTypes2["Trident"]="minecraft:trident";MinecraftItemTypes2["TripwireHook"]="minecraft:tripwire_hook";MinecraftItemTypes2["TropicalFish"]="minecraft:tropical_fish";MinecraftItemTypes2["TropicalFishBucket"]="minecraft:tropical_fish_bucket";MinecraftItemTypes2["TropicalFishSpawnEgg"]="minecraft:tropical_fish_spawn_egg";MinecraftItemTypes2["TubeCoral"]="minecraft:tube_coral";MinecraftItemTypes2["Tuff"]="minecraft:tuff";MinecraftItemTypes2["TuffBrickSlab"]="minecraft:tuff_brick_slab";MinecraftItemTypes2["TuffBrickStairs"]="minecraft:tuff_brick_stairs";MinecraftItemTypes2["TuffBrickWall"]="minecraft:tuff_brick_wall";MinecraftItemTypes2["TuffBricks"]="minecraft:tuff_bricks";MinecraftItemTypes2["TuffSlab"]="minecraft:tuff_slab";MinecraftItemTypes2["TuffStairs"]="minecraft:tuff_stairs";MinecraftItemTypes2["TuffWall"]="minecraft:tuff_wall";MinecraftItemTypes2["TurtleEgg"]="minecraft:turtle_egg";MinecraftItemTypes2["TurtleHelmet"]="minecraft:turtle_helmet";MinecraftItemTypes2["TurtleSpawnEgg"]="minecraft:turtle_spawn_egg";MinecraftItemTypes2["TwistingVines"]="minecraft:twisting_vines";MinecraftItemTypes2["UndyedShulkerBox"]="minecraft:undyed_shulker_box";MinecraftItemTypes2["VerdantFroglight"]="minecraft:verdant_froglight";MinecraftItemTypes2["VexArmorTrimSmithingTemplate"]="minecraft:vex_armor_trim_smithing_template";MinecraftItemTypes2["VexSpawnEgg"]="minecraft:vex_spawn_egg";MinecraftItemTypes2["VillagerSpawnEgg"]="minecraft:villager_spawn_egg";MinecraftItemTypes2["VindicatorSpawnEgg"]="minecraft:vindicator_spawn_egg";MinecraftItemTypes2["Vine"]="minecraft:vine";MinecraftItemTypes2["WanderingTraderSpawnEgg"]="minecraft:wandering_trader_spawn_egg";MinecraftItemTypes2["WardArmorTrimSmithingTemplate"]="minecraft:ward_armor_trim_smithing_template";MinecraftItemTypes2["WardenSpawnEgg"]="minecraft:warden_spawn_egg";MinecraftItemTypes2["WarpedButton"]="minecraft:warped_button";MinecraftItemTypes2["WarpedDoor"]="minecraft:warped_door";MinecraftItemTypes2["WarpedFence"]="minecraft:warped_fence";MinecraftItemTypes2["WarpedFenceGate"]="minecraft:warped_fence_gate";MinecraftItemTypes2["WarpedFungus"]="minecraft:warped_fungus";MinecraftItemTypes2["WarpedFungusOnAStick"]="minecraft:warped_fungus_on_a_stick";MinecraftItemTypes2["WarpedHangingSign"]="minecraft:warped_hanging_sign";MinecraftItemTypes2["WarpedHyphae"]="minecraft:warped_hyphae";MinecraftItemTypes2["WarpedNylium"]="minecraft:warped_nylium";MinecraftItemTypes2["WarpedPlanks"]="minecraft:warped_planks";MinecraftItemTypes2["WarpedPressurePlate"]="minecraft:warped_pressure_plate";MinecraftItemTypes2["WarpedRoots"]="minecraft:warped_roots";MinecraftItemTypes2["WarpedSign"]="minecraft:warped_sign";MinecraftItemTypes2["WarpedSlab"]="minecraft:warped_slab";MinecraftItemTypes2["WarpedStairs"]="minecraft:warped_stairs";MinecraftItemTypes2["WarpedStem"]="minecraft:warped_stem";MinecraftItemTypes2["WarpedTrapdoor"]="minecraft:warped_trapdoor";MinecraftItemTypes2["WarpedWartBlock"]="minecraft:warped_wart_block";MinecraftItemTypes2["WaterBucket"]="minecraft:water_bucket";MinecraftItemTypes2["Waterlily"]="minecraft:waterlily";MinecraftItemTypes2["WaxedChiseledCopper"]="minecraft:waxed_chiseled_copper";MinecraftItemTypes2["WaxedCopper"]="minecraft:waxed_copper";MinecraftItemTypes2["WaxedCopperBulb"]="minecraft:waxed_copper_bulb";MinecraftItemTypes2["WaxedCopperDoor"]="minecraft:waxed_copper_door";MinecraftItemTypes2["WaxedCopperGrate"]="minecraft:waxed_copper_grate";MinecraftItemTypes2["WaxedCopperTrapdoor"]="minecraft:waxed_copper_trapdoor";MinecraftItemTypes2["WaxedCutCopper"]="minecraft:waxed_cut_copper";MinecraftItemTypes2["WaxedCutCopperSlab"]="minecraft:waxed_cut_copper_slab";MinecraftItemTypes2["WaxedCutCopperStairs"]="minecraft:waxed_cut_copper_stairs";MinecraftItemTypes2["WaxedExposedChiseledCopper"]="minecraft:waxed_exposed_chiseled_copper";MinecraftItemTypes2["WaxedExposedCopper"]="minecraft:waxed_exposed_copper";MinecraftItemTypes2["WaxedExposedCopperBulb"]="minecraft:waxed_exposed_copper_bulb";MinecraftItemTypes2["WaxedExposedCopperDoor"]="minecraft:waxed_exposed_copper_door";MinecraftItemTypes2["WaxedExposedCopperGrate"]="minecraft:waxed_exposed_copper_grate";MinecraftItemTypes2["WaxedExposedCopperTrapdoor"]="minecraft:waxed_exposed_copper_trapdoor";MinecraftItemTypes2["WaxedExposedCutCopper"]="minecraft:waxed_exposed_cut_copper";MinecraftItemTypes2["WaxedExposedCutCopperSlab"]="minecraft:waxed_exposed_cut_copper_slab";MinecraftItemTypes2["WaxedExposedCutCopperStairs"]="minecraft:waxed_exposed_cut_copper_stairs";MinecraftItemTypes2["WaxedOxidizedChiseledCopper"]="minecraft:waxed_oxidized_chiseled_copper";MinecraftItemTypes2["WaxedOxidizedCopper"]="minecraft:waxed_oxidized_copper";MinecraftItemTypes2["WaxedOxidizedCopperBulb"]="minecraft:waxed_oxidized_copper_bulb";MinecraftItemTypes2["WaxedOxidizedCopperDoor"]="minecraft:waxed_oxidized_copper_door";MinecraftItemTypes2["WaxedOxidizedCopperGrate"]="minecraft:waxed_oxidized_copper_grate";MinecraftItemTypes2["WaxedOxidizedCopperTrapdoor"]="minecraft:waxed_oxidized_copper_trapdoor";MinecraftItemTypes2["WaxedOxidizedCutCopper"]="minecraft:waxed_oxidized_cut_copper";MinecraftItemTypes2["WaxedOxidizedCutCopperSlab"]="minecraft:waxed_oxidized_cut_copper_slab";MinecraftItemTypes2["WaxedOxidizedCutCopperStairs"]="minecraft:waxed_oxidized_cut_copper_stairs";MinecraftItemTypes2["WaxedWeatheredChiseledCopper"]="minecraft:waxed_weathered_chiseled_copper";MinecraftItemTypes2["WaxedWeatheredCopper"]="minecraft:waxed_weathered_copper";MinecraftItemTypes2["WaxedWeatheredCopperBulb"]="minecraft:waxed_weathered_copper_bulb";MinecraftItemTypes2["WaxedWeatheredCopperDoor"]="minecraft:waxed_weathered_copper_door";MinecraftItemTypes2["WaxedWeatheredCopperGrate"]="minecraft:waxed_weathered_copper_grate";MinecraftItemTypes2["WaxedWeatheredCopperTrapdoor"]="minecraft:waxed_weathered_copper_trapdoor";MinecraftItemTypes2["WaxedWeatheredCutCopper"]="minecraft:waxed_weathered_cut_copper";MinecraftItemTypes2["WaxedWeatheredCutCopperSlab"]="minecraft:waxed_weathered_cut_copper_slab";MinecraftItemTypes2["WaxedWeatheredCutCopperStairs"]="minecraft:waxed_weathered_cut_copper_stairs";MinecraftItemTypes2["WayfinderArmorTrimSmithingTemplate"]="minecraft:wayfinder_armor_trim_smithing_template";MinecraftItemTypes2["WeatheredChiseledCopper"]="minecraft:weathered_chiseled_copper";MinecraftItemTypes2["WeatheredCopper"]="minecraft:weathered_copper";MinecraftItemTypes2["WeatheredCopperBulb"]="minecraft:weathered_copper_bulb";MinecraftItemTypes2["WeatheredCopperDoor"]="minecraft:weathered_copper_door";MinecraftItemTypes2["WeatheredCopperGrate"]="minecraft:weathered_copper_grate";MinecraftItemTypes2["WeatheredCopperTrapdoor"]="minecraft:weathered_copper_trapdoor";MinecraftItemTypes2["WeatheredCutCopper"]="minecraft:weathered_cut_copper";MinecraftItemTypes2["WeatheredCutCopperSlab"]="minecraft:weathered_cut_copper_slab";MinecraftItemTypes2["WeatheredCutCopperStairs"]="minecraft:weathered_cut_copper_stairs";MinecraftItemTypes2["Web"]="minecraft:web";MinecraftItemTypes2["WeepingVines"]="minecraft:weeping_vines";MinecraftItemTypes2["Wheat"]="minecraft:wheat";MinecraftItemTypes2["WheatSeeds"]="minecraft:wheat_seeds";MinecraftItemTypes2["WhiteCandle"]="minecraft:white_candle";MinecraftItemTypes2["WhiteCarpet"]="minecraft:white_carpet";MinecraftItemTypes2["WhiteConcrete"]="minecraft:white_concrete";MinecraftItemTypes2["WhiteConcretePowder"]="minecraft:white_concrete_powder";MinecraftItemTypes2["WhiteDye"]="minecraft:white_dye";MinecraftItemTypes2["WhiteGlazedTerracotta"]="minecraft:white_glazed_terracotta";MinecraftItemTypes2["WhiteShulkerBox"]="minecraft:white_shulker_box";MinecraftItemTypes2["WhiteStainedGlass"]="minecraft:white_stained_glass";MinecraftItemTypes2["WhiteStainedGlassPane"]="minecraft:white_stained_glass_pane";MinecraftItemTypes2["WhiteTerracotta"]="minecraft:white_terracotta";MinecraftItemTypes2["WhiteWool"]="minecraft:white_wool";MinecraftItemTypes2["WildArmorTrimSmithingTemplate"]="minecraft:wild_armor_trim_smithing_template";MinecraftItemTypes2["WitchSpawnEgg"]="minecraft:witch_spawn_egg";MinecraftItemTypes2["WitherRose"]="minecraft:wither_rose";MinecraftItemTypes2["WitherSkeletonSpawnEgg"]="minecraft:wither_skeleton_spawn_egg";MinecraftItemTypes2["WitherSpawnEgg"]="minecraft:wither_spawn_egg";MinecraftItemTypes2["WolfSpawnEgg"]="minecraft:wolf_spawn_egg";MinecraftItemTypes2["Wood"]="minecraft:wood";MinecraftItemTypes2["WoodenAxe"]="minecraft:wooden_axe";MinecraftItemTypes2["WoodenButton"]="minecraft:wooden_button";MinecraftItemTypes2["WoodenDoor"]="minecraft:wooden_door";MinecraftItemTypes2["WoodenHoe"]="minecraft:wooden_hoe";MinecraftItemTypes2["WoodenPickaxe"]="minecraft:wooden_pickaxe";MinecraftItemTypes2["WoodenPressurePlate"]="minecraft:wooden_pressure_plate";MinecraftItemTypes2["WoodenShovel"]="minecraft:wooden_shovel";MinecraftItemTypes2["WoodenSlab"]="minecraft:wooden_slab";MinecraftItemTypes2["WoodenSword"]="minecraft:wooden_sword";MinecraftItemTypes2["Wool"]="minecraft:wool";MinecraftItemTypes2["WritableBook"]="minecraft:writable_book";MinecraftItemTypes2["YellowCandle"]="minecraft:yellow_candle";MinecraftItemTypes2["YellowCarpet"]="minecraft:yellow_carpet";MinecraftItemTypes2["YellowConcrete"]="minecraft:yellow_concrete";MinecraftItemTypes2["YellowConcretePowder"]="minecraft:yellow_concrete_powder";MinecraftItemTypes2["YellowDye"]="minecraft:yellow_dye";MinecraftItemTypes2["YellowFlower"]="minecraft:yellow_flower";MinecraftItemTypes2["YellowGlazedTerracotta"]="minecraft:yellow_glazed_terracotta";MinecraftItemTypes2["YellowShulkerBox"]="minecraft:yellow_shulker_box";MinecraftItemTypes2["YellowStainedGlass"]="minecraft:yellow_stained_glass";MinecraftItemTypes2["YellowStainedGlassPane"]="minecraft:yellow_stained_glass_pane";MinecraftItemTypes2["YellowTerracotta"]="minecraft:yellow_terracotta";MinecraftItemTypes2["YellowWool"]="minecraft:yellow_wool";MinecraftItemTypes2["ZoglinSpawnEgg"]="minecraft:zoglin_spawn_egg";MinecraftItemTypes2["ZombieHorseSpawnEgg"]="minecraft:zombie_horse_spawn_egg";MinecraftItemTypes2["ZombiePigmanSpawnEgg"]="minecraft:zombie_pigman_spawn_egg";MinecraftItemTypes2["ZombieSpawnEgg"]="minecraft:zombie_spawn_egg";MinecraftItemTypes2["ZombieVillagerSpawnEgg"]="minecraft:zombie_villager_spawn_egg";return MinecraftItemTypes2})(MinecraftItemTypes||{});export{MinecraftBlockTypes,MinecraftCameraPresetsTypes,MinecraftDimensionTypes,MinecraftEffectTypes,MinecraftEnchantmentTypes,MinecraftEntityTypes,MinecraftItemTypes}; +var MinecraftBiomeTypes=(MinecraftBiomeTypes2=>{MinecraftBiomeTypes2["BambooJungle"]="minecraft:bamboo_jungle";MinecraftBiomeTypes2["BambooJungleHills"]="minecraft:bamboo_jungle_hills";MinecraftBiomeTypes2["BasaltDeltas"]="minecraft:basalt_deltas";MinecraftBiomeTypes2["Beach"]="minecraft:beach";MinecraftBiomeTypes2["BirchForest"]="minecraft:birch_forest";MinecraftBiomeTypes2["BirchForestHills"]="minecraft:birch_forest_hills";MinecraftBiomeTypes2["BirchForestHillsMutated"]="minecraft:birch_forest_hills_mutated";MinecraftBiomeTypes2["BirchForestMutated"]="minecraft:birch_forest_mutated";MinecraftBiomeTypes2["CherryGrove"]="minecraft:cherry_grove";MinecraftBiomeTypes2["ColdBeach"]="minecraft:cold_beach";MinecraftBiomeTypes2["ColdOcean"]="minecraft:cold_ocean";MinecraftBiomeTypes2["ColdTaiga"]="minecraft:cold_taiga";MinecraftBiomeTypes2["ColdTaigaHills"]="minecraft:cold_taiga_hills";MinecraftBiomeTypes2["ColdTaigaMutated"]="minecraft:cold_taiga_mutated";MinecraftBiomeTypes2["CrimsonForest"]="minecraft:crimson_forest";MinecraftBiomeTypes2["DeepColdOcean"]="minecraft:deep_cold_ocean";MinecraftBiomeTypes2["DeepDark"]="minecraft:deep_dark";MinecraftBiomeTypes2["DeepFrozenOcean"]="minecraft:deep_frozen_ocean";MinecraftBiomeTypes2["DeepLukewarmOcean"]="minecraft:deep_lukewarm_ocean";MinecraftBiomeTypes2["DeepOcean"]="minecraft:deep_ocean";MinecraftBiomeTypes2["DeepWarmOcean"]="minecraft:deep_warm_ocean";MinecraftBiomeTypes2["Desert"]="minecraft:desert";MinecraftBiomeTypes2["DesertHills"]="minecraft:desert_hills";MinecraftBiomeTypes2["DesertMutated"]="minecraft:desert_mutated";MinecraftBiomeTypes2["DripstoneCaves"]="minecraft:dripstone_caves";MinecraftBiomeTypes2["ExtremeHills"]="minecraft:extreme_hills";MinecraftBiomeTypes2["ExtremeHillsEdge"]="minecraft:extreme_hills_edge";MinecraftBiomeTypes2["ExtremeHillsMutated"]="minecraft:extreme_hills_mutated";MinecraftBiomeTypes2["ExtremeHillsPlusTrees"]="minecraft:extreme_hills_plus_trees";MinecraftBiomeTypes2["ExtremeHillsPlusTreesMutated"]="minecraft:extreme_hills_plus_trees_mutated";MinecraftBiomeTypes2["FlowerForest"]="minecraft:flower_forest";MinecraftBiomeTypes2["Forest"]="minecraft:forest";MinecraftBiomeTypes2["ForestHills"]="minecraft:forest_hills";MinecraftBiomeTypes2["FrozenOcean"]="minecraft:frozen_ocean";MinecraftBiomeTypes2["FrozenPeaks"]="minecraft:frozen_peaks";MinecraftBiomeTypes2["FrozenRiver"]="minecraft:frozen_river";MinecraftBiomeTypes2["Grove"]="minecraft:grove";MinecraftBiomeTypes2["Hell"]="minecraft:hell";MinecraftBiomeTypes2["IceMountains"]="minecraft:ice_mountains";MinecraftBiomeTypes2["IcePlains"]="minecraft:ice_plains";MinecraftBiomeTypes2["IcePlainsSpikes"]="minecraft:ice_plains_spikes";MinecraftBiomeTypes2["JaggedPeaks"]="minecraft:jagged_peaks";MinecraftBiomeTypes2["Jungle"]="minecraft:jungle";MinecraftBiomeTypes2["JungleEdge"]="minecraft:jungle_edge";MinecraftBiomeTypes2["JungleEdgeMutated"]="minecraft:jungle_edge_mutated";MinecraftBiomeTypes2["JungleHills"]="minecraft:jungle_hills";MinecraftBiomeTypes2["JungleMutated"]="minecraft:jungle_mutated";MinecraftBiomeTypes2["LegacyFrozenOcean"]="minecraft:legacy_frozen_ocean";MinecraftBiomeTypes2["LukewarmOcean"]="minecraft:lukewarm_ocean";MinecraftBiomeTypes2["LushCaves"]="minecraft:lush_caves";MinecraftBiomeTypes2["MangroveSwamp"]="minecraft:mangrove_swamp";MinecraftBiomeTypes2["Meadow"]="minecraft:meadow";MinecraftBiomeTypes2["MegaTaiga"]="minecraft:mega_taiga";MinecraftBiomeTypes2["MegaTaigaHills"]="minecraft:mega_taiga_hills";MinecraftBiomeTypes2["Mesa"]="minecraft:mesa";MinecraftBiomeTypes2["MesaBryce"]="minecraft:mesa_bryce";MinecraftBiomeTypes2["MesaPlateau"]="minecraft:mesa_plateau";MinecraftBiomeTypes2["MesaPlateauMutated"]="minecraft:mesa_plateau_mutated";MinecraftBiomeTypes2["MesaPlateauStone"]="minecraft:mesa_plateau_stone";MinecraftBiomeTypes2["MesaPlateauStoneMutated"]="minecraft:mesa_plateau_stone_mutated";MinecraftBiomeTypes2["MushroomIsland"]="minecraft:mushroom_island";MinecraftBiomeTypes2["MushroomIslandShore"]="minecraft:mushroom_island_shore";MinecraftBiomeTypes2["Ocean"]="minecraft:ocean";MinecraftBiomeTypes2["Plains"]="minecraft:plains";MinecraftBiomeTypes2["RedwoodTaigaHillsMutated"]="minecraft:redwood_taiga_hills_mutated";MinecraftBiomeTypes2["RedwoodTaigaMutated"]="minecraft:redwood_taiga_mutated";MinecraftBiomeTypes2["River"]="minecraft:river";MinecraftBiomeTypes2["RoofedForest"]="minecraft:roofed_forest";MinecraftBiomeTypes2["RoofedForestMutated"]="minecraft:roofed_forest_mutated";MinecraftBiomeTypes2["Savanna"]="minecraft:savanna";MinecraftBiomeTypes2["SavannaMutated"]="minecraft:savanna_mutated";MinecraftBiomeTypes2["SavannaPlateau"]="minecraft:savanna_plateau";MinecraftBiomeTypes2["SavannaPlateauMutated"]="minecraft:savanna_plateau_mutated";MinecraftBiomeTypes2["SnowySlopes"]="minecraft:snowy_slopes";MinecraftBiomeTypes2["SoulsandValley"]="minecraft:soulsand_valley";MinecraftBiomeTypes2["StoneBeach"]="minecraft:stone_beach";MinecraftBiomeTypes2["StonyPeaks"]="minecraft:stony_peaks";MinecraftBiomeTypes2["SunflowerPlains"]="minecraft:sunflower_plains";MinecraftBiomeTypes2["Swampland"]="minecraft:swampland";MinecraftBiomeTypes2["SwamplandMutated"]="minecraft:swampland_mutated";MinecraftBiomeTypes2["Taiga"]="minecraft:taiga";MinecraftBiomeTypes2["TaigaHills"]="minecraft:taiga_hills";MinecraftBiomeTypes2["TaigaMutated"]="minecraft:taiga_mutated";MinecraftBiomeTypes2["TheEnd"]="minecraft:the_end";MinecraftBiomeTypes2["WarmOcean"]="minecraft:warm_ocean";MinecraftBiomeTypes2["WarpedForest"]="minecraft:warped_forest";return MinecraftBiomeTypes2})(MinecraftBiomeTypes||{});var MinecraftBlockTypes=(MinecraftBlockTypes2=>{MinecraftBlockTypes2["AcaciaButton"]="minecraft:acacia_button";MinecraftBlockTypes2["AcaciaDoor"]="minecraft:acacia_door";MinecraftBlockTypes2["AcaciaFence"]="minecraft:acacia_fence";MinecraftBlockTypes2["AcaciaFenceGate"]="minecraft:acacia_fence_gate";MinecraftBlockTypes2["AcaciaHangingSign"]="minecraft:acacia_hanging_sign";MinecraftBlockTypes2["AcaciaLog"]="minecraft:acacia_log";MinecraftBlockTypes2["AcaciaPlanks"]="minecraft:acacia_planks";MinecraftBlockTypes2["AcaciaPressurePlate"]="minecraft:acacia_pressure_plate";MinecraftBlockTypes2["AcaciaStairs"]="minecraft:acacia_stairs";MinecraftBlockTypes2["AcaciaStandingSign"]="minecraft:acacia_standing_sign";MinecraftBlockTypes2["AcaciaTrapdoor"]="minecraft:acacia_trapdoor";MinecraftBlockTypes2["AcaciaWallSign"]="minecraft:acacia_wall_sign";MinecraftBlockTypes2["ActivatorRail"]="minecraft:activator_rail";MinecraftBlockTypes2["Air"]="minecraft:air";MinecraftBlockTypes2["Allow"]="minecraft:allow";MinecraftBlockTypes2["AmethystBlock"]="minecraft:amethyst_block";MinecraftBlockTypes2["AmethystCluster"]="minecraft:amethyst_cluster";MinecraftBlockTypes2["AncientDebris"]="minecraft:ancient_debris";MinecraftBlockTypes2["Andesite"]="minecraft:andesite";MinecraftBlockTypes2["AndesiteStairs"]="minecraft:andesite_stairs";MinecraftBlockTypes2["Anvil"]="minecraft:anvil";MinecraftBlockTypes2["Azalea"]="minecraft:azalea";MinecraftBlockTypes2["AzaleaLeaves"]="minecraft:azalea_leaves";MinecraftBlockTypes2["AzaleaLeavesFlowered"]="minecraft:azalea_leaves_flowered";MinecraftBlockTypes2["Bamboo"]="minecraft:bamboo";MinecraftBlockTypes2["BambooBlock"]="minecraft:bamboo_block";MinecraftBlockTypes2["BambooButton"]="minecraft:bamboo_button";MinecraftBlockTypes2["BambooDoor"]="minecraft:bamboo_door";MinecraftBlockTypes2["BambooDoubleSlab"]="minecraft:bamboo_double_slab";MinecraftBlockTypes2["BambooFence"]="minecraft:bamboo_fence";MinecraftBlockTypes2["BambooFenceGate"]="minecraft:bamboo_fence_gate";MinecraftBlockTypes2["BambooHangingSign"]="minecraft:bamboo_hanging_sign";MinecraftBlockTypes2["BambooMosaic"]="minecraft:bamboo_mosaic";MinecraftBlockTypes2["BambooMosaicDoubleSlab"]="minecraft:bamboo_mosaic_double_slab";MinecraftBlockTypes2["BambooMosaicSlab"]="minecraft:bamboo_mosaic_slab";MinecraftBlockTypes2["BambooMosaicStairs"]="minecraft:bamboo_mosaic_stairs";MinecraftBlockTypes2["BambooPlanks"]="minecraft:bamboo_planks";MinecraftBlockTypes2["BambooPressurePlate"]="minecraft:bamboo_pressure_plate";MinecraftBlockTypes2["BambooSapling"]="minecraft:bamboo_sapling";MinecraftBlockTypes2["BambooSlab"]="minecraft:bamboo_slab";MinecraftBlockTypes2["BambooStairs"]="minecraft:bamboo_stairs";MinecraftBlockTypes2["BambooStandingSign"]="minecraft:bamboo_standing_sign";MinecraftBlockTypes2["BambooTrapdoor"]="minecraft:bamboo_trapdoor";MinecraftBlockTypes2["BambooWallSign"]="minecraft:bamboo_wall_sign";MinecraftBlockTypes2["Barrel"]="minecraft:barrel";MinecraftBlockTypes2["Barrier"]="minecraft:barrier";MinecraftBlockTypes2["Basalt"]="minecraft:basalt";MinecraftBlockTypes2["Beacon"]="minecraft:beacon";MinecraftBlockTypes2["Bed"]="minecraft:bed";MinecraftBlockTypes2["Bedrock"]="minecraft:bedrock";MinecraftBlockTypes2["BeeNest"]="minecraft:bee_nest";MinecraftBlockTypes2["Beehive"]="minecraft:beehive";MinecraftBlockTypes2["Beetroot"]="minecraft:beetroot";MinecraftBlockTypes2["Bell"]="minecraft:bell";MinecraftBlockTypes2["BigDripleaf"]="minecraft:big_dripleaf";MinecraftBlockTypes2["BirchButton"]="minecraft:birch_button";MinecraftBlockTypes2["BirchDoor"]="minecraft:birch_door";MinecraftBlockTypes2["BirchFence"]="minecraft:birch_fence";MinecraftBlockTypes2["BirchFenceGate"]="minecraft:birch_fence_gate";MinecraftBlockTypes2["BirchHangingSign"]="minecraft:birch_hanging_sign";MinecraftBlockTypes2["BirchLog"]="minecraft:birch_log";MinecraftBlockTypes2["BirchPlanks"]="minecraft:birch_planks";MinecraftBlockTypes2["BirchPressurePlate"]="minecraft:birch_pressure_plate";MinecraftBlockTypes2["BirchStairs"]="minecraft:birch_stairs";MinecraftBlockTypes2["BirchStandingSign"]="minecraft:birch_standing_sign";MinecraftBlockTypes2["BirchTrapdoor"]="minecraft:birch_trapdoor";MinecraftBlockTypes2["BirchWallSign"]="minecraft:birch_wall_sign";MinecraftBlockTypes2["BlackCandle"]="minecraft:black_candle";MinecraftBlockTypes2["BlackCandleCake"]="minecraft:black_candle_cake";MinecraftBlockTypes2["BlackCarpet"]="minecraft:black_carpet";MinecraftBlockTypes2["BlackConcrete"]="minecraft:black_concrete";MinecraftBlockTypes2["BlackConcretePowder"]="minecraft:black_concrete_powder";MinecraftBlockTypes2["BlackGlazedTerracotta"]="minecraft:black_glazed_terracotta";MinecraftBlockTypes2["BlackShulkerBox"]="minecraft:black_shulker_box";MinecraftBlockTypes2["BlackStainedGlass"]="minecraft:black_stained_glass";MinecraftBlockTypes2["BlackStainedGlassPane"]="minecraft:black_stained_glass_pane";MinecraftBlockTypes2["BlackTerracotta"]="minecraft:black_terracotta";MinecraftBlockTypes2["BlackWool"]="minecraft:black_wool";MinecraftBlockTypes2["Blackstone"]="minecraft:blackstone";MinecraftBlockTypes2["BlackstoneDoubleSlab"]="minecraft:blackstone_double_slab";MinecraftBlockTypes2["BlackstoneSlab"]="minecraft:blackstone_slab";MinecraftBlockTypes2["BlackstoneStairs"]="minecraft:blackstone_stairs";MinecraftBlockTypes2["BlackstoneWall"]="minecraft:blackstone_wall";MinecraftBlockTypes2["BlastFurnace"]="minecraft:blast_furnace";MinecraftBlockTypes2["BlueCandle"]="minecraft:blue_candle";MinecraftBlockTypes2["BlueCandleCake"]="minecraft:blue_candle_cake";MinecraftBlockTypes2["BlueCarpet"]="minecraft:blue_carpet";MinecraftBlockTypes2["BlueConcrete"]="minecraft:blue_concrete";MinecraftBlockTypes2["BlueConcretePowder"]="minecraft:blue_concrete_powder";MinecraftBlockTypes2["BlueGlazedTerracotta"]="minecraft:blue_glazed_terracotta";MinecraftBlockTypes2["BlueIce"]="minecraft:blue_ice";MinecraftBlockTypes2["BlueShulkerBox"]="minecraft:blue_shulker_box";MinecraftBlockTypes2["BlueStainedGlass"]="minecraft:blue_stained_glass";MinecraftBlockTypes2["BlueStainedGlassPane"]="minecraft:blue_stained_glass_pane";MinecraftBlockTypes2["BlueTerracotta"]="minecraft:blue_terracotta";MinecraftBlockTypes2["BlueWool"]="minecraft:blue_wool";MinecraftBlockTypes2["BoneBlock"]="minecraft:bone_block";MinecraftBlockTypes2["Bookshelf"]="minecraft:bookshelf";MinecraftBlockTypes2["BorderBlock"]="minecraft:border_block";MinecraftBlockTypes2["BrainCoral"]="minecraft:brain_coral";MinecraftBlockTypes2["BrewingStand"]="minecraft:brewing_stand";MinecraftBlockTypes2["BrickBlock"]="minecraft:brick_block";MinecraftBlockTypes2["BrickStairs"]="minecraft:brick_stairs";MinecraftBlockTypes2["BrownCandle"]="minecraft:brown_candle";MinecraftBlockTypes2["BrownCandleCake"]="minecraft:brown_candle_cake";MinecraftBlockTypes2["BrownCarpet"]="minecraft:brown_carpet";MinecraftBlockTypes2["BrownConcrete"]="minecraft:brown_concrete";MinecraftBlockTypes2["BrownConcretePowder"]="minecraft:brown_concrete_powder";MinecraftBlockTypes2["BrownGlazedTerracotta"]="minecraft:brown_glazed_terracotta";MinecraftBlockTypes2["BrownMushroom"]="minecraft:brown_mushroom";MinecraftBlockTypes2["BrownMushroomBlock"]="minecraft:brown_mushroom_block";MinecraftBlockTypes2["BrownShulkerBox"]="minecraft:brown_shulker_box";MinecraftBlockTypes2["BrownStainedGlass"]="minecraft:brown_stained_glass";MinecraftBlockTypes2["BrownStainedGlassPane"]="minecraft:brown_stained_glass_pane";MinecraftBlockTypes2["BrownTerracotta"]="minecraft:brown_terracotta";MinecraftBlockTypes2["BrownWool"]="minecraft:brown_wool";MinecraftBlockTypes2["BubbleColumn"]="minecraft:bubble_column";MinecraftBlockTypes2["BubbleCoral"]="minecraft:bubble_coral";MinecraftBlockTypes2["BuddingAmethyst"]="minecraft:budding_amethyst";MinecraftBlockTypes2["Cactus"]="minecraft:cactus";MinecraftBlockTypes2["Cake"]="minecraft:cake";MinecraftBlockTypes2["Calcite"]="minecraft:calcite";MinecraftBlockTypes2["CalibratedSculkSensor"]="minecraft:calibrated_sculk_sensor";MinecraftBlockTypes2["Camera"]="minecraft:camera";MinecraftBlockTypes2["Campfire"]="minecraft:campfire";MinecraftBlockTypes2["Candle"]="minecraft:candle";MinecraftBlockTypes2["CandleCake"]="minecraft:candle_cake";MinecraftBlockTypes2["Carrots"]="minecraft:carrots";MinecraftBlockTypes2["CartographyTable"]="minecraft:cartography_table";MinecraftBlockTypes2["CarvedPumpkin"]="minecraft:carved_pumpkin";MinecraftBlockTypes2["Cauldron"]="minecraft:cauldron";MinecraftBlockTypes2["CaveVines"]="minecraft:cave_vines";MinecraftBlockTypes2["CaveVinesBodyWithBerries"]="minecraft:cave_vines_body_with_berries";MinecraftBlockTypes2["CaveVinesHeadWithBerries"]="minecraft:cave_vines_head_with_berries";MinecraftBlockTypes2["Chain"]="minecraft:chain";MinecraftBlockTypes2["ChainCommandBlock"]="minecraft:chain_command_block";MinecraftBlockTypes2["ChemicalHeat"]="minecraft:chemical_heat";MinecraftBlockTypes2["ChemistryTable"]="minecraft:chemistry_table";MinecraftBlockTypes2["CherryButton"]="minecraft:cherry_button";MinecraftBlockTypes2["CherryDoor"]="minecraft:cherry_door";MinecraftBlockTypes2["CherryDoubleSlab"]="minecraft:cherry_double_slab";MinecraftBlockTypes2["CherryFence"]="minecraft:cherry_fence";MinecraftBlockTypes2["CherryFenceGate"]="minecraft:cherry_fence_gate";MinecraftBlockTypes2["CherryHangingSign"]="minecraft:cherry_hanging_sign";MinecraftBlockTypes2["CherryLeaves"]="minecraft:cherry_leaves";MinecraftBlockTypes2["CherryLog"]="minecraft:cherry_log";MinecraftBlockTypes2["CherryPlanks"]="minecraft:cherry_planks";MinecraftBlockTypes2["CherryPressurePlate"]="minecraft:cherry_pressure_plate";MinecraftBlockTypes2["CherrySapling"]="minecraft:cherry_sapling";MinecraftBlockTypes2["CherrySlab"]="minecraft:cherry_slab";MinecraftBlockTypes2["CherryStairs"]="minecraft:cherry_stairs";MinecraftBlockTypes2["CherryStandingSign"]="minecraft:cherry_standing_sign";MinecraftBlockTypes2["CherryTrapdoor"]="minecraft:cherry_trapdoor";MinecraftBlockTypes2["CherryWallSign"]="minecraft:cherry_wall_sign";MinecraftBlockTypes2["CherryWood"]="minecraft:cherry_wood";MinecraftBlockTypes2["Chest"]="minecraft:chest";MinecraftBlockTypes2["ChiseledBookshelf"]="minecraft:chiseled_bookshelf";MinecraftBlockTypes2["ChiseledCopper"]="minecraft:chiseled_copper";MinecraftBlockTypes2["ChiseledDeepslate"]="minecraft:chiseled_deepslate";MinecraftBlockTypes2["ChiseledNetherBricks"]="minecraft:chiseled_nether_bricks";MinecraftBlockTypes2["ChiseledPolishedBlackstone"]="minecraft:chiseled_polished_blackstone";MinecraftBlockTypes2["ChiseledTuff"]="minecraft:chiseled_tuff";MinecraftBlockTypes2["ChiseledTuffBricks"]="minecraft:chiseled_tuff_bricks";MinecraftBlockTypes2["ChorusFlower"]="minecraft:chorus_flower";MinecraftBlockTypes2["ChorusPlant"]="minecraft:chorus_plant";MinecraftBlockTypes2["Clay"]="minecraft:clay";MinecraftBlockTypes2["ClientRequestPlaceholderBlock"]="minecraft:client_request_placeholder_block";MinecraftBlockTypes2["CoalBlock"]="minecraft:coal_block";MinecraftBlockTypes2["CoalOre"]="minecraft:coal_ore";MinecraftBlockTypes2["CobbledDeepslate"]="minecraft:cobbled_deepslate";MinecraftBlockTypes2["CobbledDeepslateDoubleSlab"]="minecraft:cobbled_deepslate_double_slab";MinecraftBlockTypes2["CobbledDeepslateSlab"]="minecraft:cobbled_deepslate_slab";MinecraftBlockTypes2["CobbledDeepslateStairs"]="minecraft:cobbled_deepslate_stairs";MinecraftBlockTypes2["CobbledDeepslateWall"]="minecraft:cobbled_deepslate_wall";MinecraftBlockTypes2["Cobblestone"]="minecraft:cobblestone";MinecraftBlockTypes2["CobblestoneWall"]="minecraft:cobblestone_wall";MinecraftBlockTypes2["Cocoa"]="minecraft:cocoa";MinecraftBlockTypes2["ColoredTorchBp"]="minecraft:colored_torch_bp";MinecraftBlockTypes2["ColoredTorchRg"]="minecraft:colored_torch_rg";MinecraftBlockTypes2["CommandBlock"]="minecraft:command_block";MinecraftBlockTypes2["Composter"]="minecraft:composter";MinecraftBlockTypes2["Conduit"]="minecraft:conduit";MinecraftBlockTypes2["CopperBlock"]="minecraft:copper_block";MinecraftBlockTypes2["CopperBulb"]="minecraft:copper_bulb";MinecraftBlockTypes2["CopperDoor"]="minecraft:copper_door";MinecraftBlockTypes2["CopperGrate"]="minecraft:copper_grate";MinecraftBlockTypes2["CopperOre"]="minecraft:copper_ore";MinecraftBlockTypes2["CopperTrapdoor"]="minecraft:copper_trapdoor";MinecraftBlockTypes2["CoralBlock"]="minecraft:coral_block";MinecraftBlockTypes2["CoralFan"]="minecraft:coral_fan";MinecraftBlockTypes2["CoralFanDead"]="minecraft:coral_fan_dead";MinecraftBlockTypes2["CoralFanHang"]="minecraft:coral_fan_hang";MinecraftBlockTypes2["CoralFanHang2"]="minecraft:coral_fan_hang2";MinecraftBlockTypes2["CoralFanHang3"]="minecraft:coral_fan_hang3";MinecraftBlockTypes2["CrackedDeepslateBricks"]="minecraft:cracked_deepslate_bricks";MinecraftBlockTypes2["CrackedDeepslateTiles"]="minecraft:cracked_deepslate_tiles";MinecraftBlockTypes2["CrackedNetherBricks"]="minecraft:cracked_nether_bricks";MinecraftBlockTypes2["CrackedPolishedBlackstoneBricks"]="minecraft:cracked_polished_blackstone_bricks";MinecraftBlockTypes2["Crafter"]="minecraft:crafter";MinecraftBlockTypes2["CraftingTable"]="minecraft:crafting_table";MinecraftBlockTypes2["CrimsonButton"]="minecraft:crimson_button";MinecraftBlockTypes2["CrimsonDoor"]="minecraft:crimson_door";MinecraftBlockTypes2["CrimsonDoubleSlab"]="minecraft:crimson_double_slab";MinecraftBlockTypes2["CrimsonFence"]="minecraft:crimson_fence";MinecraftBlockTypes2["CrimsonFenceGate"]="minecraft:crimson_fence_gate";MinecraftBlockTypes2["CrimsonFungus"]="minecraft:crimson_fungus";MinecraftBlockTypes2["CrimsonHangingSign"]="minecraft:crimson_hanging_sign";MinecraftBlockTypes2["CrimsonHyphae"]="minecraft:crimson_hyphae";MinecraftBlockTypes2["CrimsonNylium"]="minecraft:crimson_nylium";MinecraftBlockTypes2["CrimsonPlanks"]="minecraft:crimson_planks";MinecraftBlockTypes2["CrimsonPressurePlate"]="minecraft:crimson_pressure_plate";MinecraftBlockTypes2["CrimsonRoots"]="minecraft:crimson_roots";MinecraftBlockTypes2["CrimsonSlab"]="minecraft:crimson_slab";MinecraftBlockTypes2["CrimsonStairs"]="minecraft:crimson_stairs";MinecraftBlockTypes2["CrimsonStandingSign"]="minecraft:crimson_standing_sign";MinecraftBlockTypes2["CrimsonStem"]="minecraft:crimson_stem";MinecraftBlockTypes2["CrimsonTrapdoor"]="minecraft:crimson_trapdoor";MinecraftBlockTypes2["CrimsonWallSign"]="minecraft:crimson_wall_sign";MinecraftBlockTypes2["CryingObsidian"]="minecraft:crying_obsidian";MinecraftBlockTypes2["CutCopper"]="minecraft:cut_copper";MinecraftBlockTypes2["CutCopperSlab"]="minecraft:cut_copper_slab";MinecraftBlockTypes2["CutCopperStairs"]="minecraft:cut_copper_stairs";MinecraftBlockTypes2["CyanCandle"]="minecraft:cyan_candle";MinecraftBlockTypes2["CyanCandleCake"]="minecraft:cyan_candle_cake";MinecraftBlockTypes2["CyanCarpet"]="minecraft:cyan_carpet";MinecraftBlockTypes2["CyanConcrete"]="minecraft:cyan_concrete";MinecraftBlockTypes2["CyanConcretePowder"]="minecraft:cyan_concrete_powder";MinecraftBlockTypes2["CyanGlazedTerracotta"]="minecraft:cyan_glazed_terracotta";MinecraftBlockTypes2["CyanShulkerBox"]="minecraft:cyan_shulker_box";MinecraftBlockTypes2["CyanStainedGlass"]="minecraft:cyan_stained_glass";MinecraftBlockTypes2["CyanStainedGlassPane"]="minecraft:cyan_stained_glass_pane";MinecraftBlockTypes2["CyanTerracotta"]="minecraft:cyan_terracotta";MinecraftBlockTypes2["CyanWool"]="minecraft:cyan_wool";MinecraftBlockTypes2["DarkOakButton"]="minecraft:dark_oak_button";MinecraftBlockTypes2["DarkOakDoor"]="minecraft:dark_oak_door";MinecraftBlockTypes2["DarkOakFence"]="minecraft:dark_oak_fence";MinecraftBlockTypes2["DarkOakFenceGate"]="minecraft:dark_oak_fence_gate";MinecraftBlockTypes2["DarkOakHangingSign"]="minecraft:dark_oak_hanging_sign";MinecraftBlockTypes2["DarkOakLog"]="minecraft:dark_oak_log";MinecraftBlockTypes2["DarkOakPlanks"]="minecraft:dark_oak_planks";MinecraftBlockTypes2["DarkOakPressurePlate"]="minecraft:dark_oak_pressure_plate";MinecraftBlockTypes2["DarkOakStairs"]="minecraft:dark_oak_stairs";MinecraftBlockTypes2["DarkOakTrapdoor"]="minecraft:dark_oak_trapdoor";MinecraftBlockTypes2["DarkPrismarineStairs"]="minecraft:dark_prismarine_stairs";MinecraftBlockTypes2["DarkoakStandingSign"]="minecraft:darkoak_standing_sign";MinecraftBlockTypes2["DarkoakWallSign"]="minecraft:darkoak_wall_sign";MinecraftBlockTypes2["DaylightDetector"]="minecraft:daylight_detector";MinecraftBlockTypes2["DaylightDetectorInverted"]="minecraft:daylight_detector_inverted";MinecraftBlockTypes2["DeadBrainCoral"]="minecraft:dead_brain_coral";MinecraftBlockTypes2["DeadBubbleCoral"]="minecraft:dead_bubble_coral";MinecraftBlockTypes2["DeadFireCoral"]="minecraft:dead_fire_coral";MinecraftBlockTypes2["DeadHornCoral"]="minecraft:dead_horn_coral";MinecraftBlockTypes2["DeadTubeCoral"]="minecraft:dead_tube_coral";MinecraftBlockTypes2["Deadbush"]="minecraft:deadbush";MinecraftBlockTypes2["DecoratedPot"]="minecraft:decorated_pot";MinecraftBlockTypes2["Deepslate"]="minecraft:deepslate";MinecraftBlockTypes2["DeepslateBrickDoubleSlab"]="minecraft:deepslate_brick_double_slab";MinecraftBlockTypes2["DeepslateBrickSlab"]="minecraft:deepslate_brick_slab";MinecraftBlockTypes2["DeepslateBrickStairs"]="minecraft:deepslate_brick_stairs";MinecraftBlockTypes2["DeepslateBrickWall"]="minecraft:deepslate_brick_wall";MinecraftBlockTypes2["DeepslateBricks"]="minecraft:deepslate_bricks";MinecraftBlockTypes2["DeepslateCoalOre"]="minecraft:deepslate_coal_ore";MinecraftBlockTypes2["DeepslateCopperOre"]="minecraft:deepslate_copper_ore";MinecraftBlockTypes2["DeepslateDiamondOre"]="minecraft:deepslate_diamond_ore";MinecraftBlockTypes2["DeepslateEmeraldOre"]="minecraft:deepslate_emerald_ore";MinecraftBlockTypes2["DeepslateGoldOre"]="minecraft:deepslate_gold_ore";MinecraftBlockTypes2["DeepslateIronOre"]="minecraft:deepslate_iron_ore";MinecraftBlockTypes2["DeepslateLapisOre"]="minecraft:deepslate_lapis_ore";MinecraftBlockTypes2["DeepslateRedstoneOre"]="minecraft:deepslate_redstone_ore";MinecraftBlockTypes2["DeepslateTileDoubleSlab"]="minecraft:deepslate_tile_double_slab";MinecraftBlockTypes2["DeepslateTileSlab"]="minecraft:deepslate_tile_slab";MinecraftBlockTypes2["DeepslateTileStairs"]="minecraft:deepslate_tile_stairs";MinecraftBlockTypes2["DeepslateTileWall"]="minecraft:deepslate_tile_wall";MinecraftBlockTypes2["DeepslateTiles"]="minecraft:deepslate_tiles";MinecraftBlockTypes2["Deny"]="minecraft:deny";MinecraftBlockTypes2["DetectorRail"]="minecraft:detector_rail";MinecraftBlockTypes2["DiamondBlock"]="minecraft:diamond_block";MinecraftBlockTypes2["DiamondOre"]="minecraft:diamond_ore";MinecraftBlockTypes2["Diorite"]="minecraft:diorite";MinecraftBlockTypes2["DioriteStairs"]="minecraft:diorite_stairs";MinecraftBlockTypes2["Dirt"]="minecraft:dirt";MinecraftBlockTypes2["DirtWithRoots"]="minecraft:dirt_with_roots";MinecraftBlockTypes2["Dispenser"]="minecraft:dispenser";MinecraftBlockTypes2["DoubleCutCopperSlab"]="minecraft:double_cut_copper_slab";MinecraftBlockTypes2["DoublePlant"]="minecraft:double_plant";MinecraftBlockTypes2["DoubleStoneBlockSlab"]="minecraft:double_stone_block_slab";MinecraftBlockTypes2["DoubleStoneBlockSlab2"]="minecraft:double_stone_block_slab2";MinecraftBlockTypes2["DoubleStoneBlockSlab3"]="minecraft:double_stone_block_slab3";MinecraftBlockTypes2["DoubleStoneBlockSlab4"]="minecraft:double_stone_block_slab4";MinecraftBlockTypes2["DoubleWoodenSlab"]="minecraft:double_wooden_slab";MinecraftBlockTypes2["DragonEgg"]="minecraft:dragon_egg";MinecraftBlockTypes2["DriedKelpBlock"]="minecraft:dried_kelp_block";MinecraftBlockTypes2["DripstoneBlock"]="minecraft:dripstone_block";MinecraftBlockTypes2["Dropper"]="minecraft:dropper";MinecraftBlockTypes2["Element0"]="minecraft:element_0";MinecraftBlockTypes2["Element1"]="minecraft:element_1";MinecraftBlockTypes2["Element10"]="minecraft:element_10";MinecraftBlockTypes2["Element100"]="minecraft:element_100";MinecraftBlockTypes2["Element101"]="minecraft:element_101";MinecraftBlockTypes2["Element102"]="minecraft:element_102";MinecraftBlockTypes2["Element103"]="minecraft:element_103";MinecraftBlockTypes2["Element104"]="minecraft:element_104";MinecraftBlockTypes2["Element105"]="minecraft:element_105";MinecraftBlockTypes2["Element106"]="minecraft:element_106";MinecraftBlockTypes2["Element107"]="minecraft:element_107";MinecraftBlockTypes2["Element108"]="minecraft:element_108";MinecraftBlockTypes2["Element109"]="minecraft:element_109";MinecraftBlockTypes2["Element11"]="minecraft:element_11";MinecraftBlockTypes2["Element110"]="minecraft:element_110";MinecraftBlockTypes2["Element111"]="minecraft:element_111";MinecraftBlockTypes2["Element112"]="minecraft:element_112";MinecraftBlockTypes2["Element113"]="minecraft:element_113";MinecraftBlockTypes2["Element114"]="minecraft:element_114";MinecraftBlockTypes2["Element115"]="minecraft:element_115";MinecraftBlockTypes2["Element116"]="minecraft:element_116";MinecraftBlockTypes2["Element117"]="minecraft:element_117";MinecraftBlockTypes2["Element118"]="minecraft:element_118";MinecraftBlockTypes2["Element12"]="minecraft:element_12";MinecraftBlockTypes2["Element13"]="minecraft:element_13";MinecraftBlockTypes2["Element14"]="minecraft:element_14";MinecraftBlockTypes2["Element15"]="minecraft:element_15";MinecraftBlockTypes2["Element16"]="minecraft:element_16";MinecraftBlockTypes2["Element17"]="minecraft:element_17";MinecraftBlockTypes2["Element18"]="minecraft:element_18";MinecraftBlockTypes2["Element19"]="minecraft:element_19";MinecraftBlockTypes2["Element2"]="minecraft:element_2";MinecraftBlockTypes2["Element20"]="minecraft:element_20";MinecraftBlockTypes2["Element21"]="minecraft:element_21";MinecraftBlockTypes2["Element22"]="minecraft:element_22";MinecraftBlockTypes2["Element23"]="minecraft:element_23";MinecraftBlockTypes2["Element24"]="minecraft:element_24";MinecraftBlockTypes2["Element25"]="minecraft:element_25";MinecraftBlockTypes2["Element26"]="minecraft:element_26";MinecraftBlockTypes2["Element27"]="minecraft:element_27";MinecraftBlockTypes2["Element28"]="minecraft:element_28";MinecraftBlockTypes2["Element29"]="minecraft:element_29";MinecraftBlockTypes2["Element3"]="minecraft:element_3";MinecraftBlockTypes2["Element30"]="minecraft:element_30";MinecraftBlockTypes2["Element31"]="minecraft:element_31";MinecraftBlockTypes2["Element32"]="minecraft:element_32";MinecraftBlockTypes2["Element33"]="minecraft:element_33";MinecraftBlockTypes2["Element34"]="minecraft:element_34";MinecraftBlockTypes2["Element35"]="minecraft:element_35";MinecraftBlockTypes2["Element36"]="minecraft:element_36";MinecraftBlockTypes2["Element37"]="minecraft:element_37";MinecraftBlockTypes2["Element38"]="minecraft:element_38";MinecraftBlockTypes2["Element39"]="minecraft:element_39";MinecraftBlockTypes2["Element4"]="minecraft:element_4";MinecraftBlockTypes2["Element40"]="minecraft:element_40";MinecraftBlockTypes2["Element41"]="minecraft:element_41";MinecraftBlockTypes2["Element42"]="minecraft:element_42";MinecraftBlockTypes2["Element43"]="minecraft:element_43";MinecraftBlockTypes2["Element44"]="minecraft:element_44";MinecraftBlockTypes2["Element45"]="minecraft:element_45";MinecraftBlockTypes2["Element46"]="minecraft:element_46";MinecraftBlockTypes2["Element47"]="minecraft:element_47";MinecraftBlockTypes2["Element48"]="minecraft:element_48";MinecraftBlockTypes2["Element49"]="minecraft:element_49";MinecraftBlockTypes2["Element5"]="minecraft:element_5";MinecraftBlockTypes2["Element50"]="minecraft:element_50";MinecraftBlockTypes2["Element51"]="minecraft:element_51";MinecraftBlockTypes2["Element52"]="minecraft:element_52";MinecraftBlockTypes2["Element53"]="minecraft:element_53";MinecraftBlockTypes2["Element54"]="minecraft:element_54";MinecraftBlockTypes2["Element55"]="minecraft:element_55";MinecraftBlockTypes2["Element56"]="minecraft:element_56";MinecraftBlockTypes2["Element57"]="minecraft:element_57";MinecraftBlockTypes2["Element58"]="minecraft:element_58";MinecraftBlockTypes2["Element59"]="minecraft:element_59";MinecraftBlockTypes2["Element6"]="minecraft:element_6";MinecraftBlockTypes2["Element60"]="minecraft:element_60";MinecraftBlockTypes2["Element61"]="minecraft:element_61";MinecraftBlockTypes2["Element62"]="minecraft:element_62";MinecraftBlockTypes2["Element63"]="minecraft:element_63";MinecraftBlockTypes2["Element64"]="minecraft:element_64";MinecraftBlockTypes2["Element65"]="minecraft:element_65";MinecraftBlockTypes2["Element66"]="minecraft:element_66";MinecraftBlockTypes2["Element67"]="minecraft:element_67";MinecraftBlockTypes2["Element68"]="minecraft:element_68";MinecraftBlockTypes2["Element69"]="minecraft:element_69";MinecraftBlockTypes2["Element7"]="minecraft:element_7";MinecraftBlockTypes2["Element70"]="minecraft:element_70";MinecraftBlockTypes2["Element71"]="minecraft:element_71";MinecraftBlockTypes2["Element72"]="minecraft:element_72";MinecraftBlockTypes2["Element73"]="minecraft:element_73";MinecraftBlockTypes2["Element74"]="minecraft:element_74";MinecraftBlockTypes2["Element75"]="minecraft:element_75";MinecraftBlockTypes2["Element76"]="minecraft:element_76";MinecraftBlockTypes2["Element77"]="minecraft:element_77";MinecraftBlockTypes2["Element78"]="minecraft:element_78";MinecraftBlockTypes2["Element79"]="minecraft:element_79";MinecraftBlockTypes2["Element8"]="minecraft:element_8";MinecraftBlockTypes2["Element80"]="minecraft:element_80";MinecraftBlockTypes2["Element81"]="minecraft:element_81";MinecraftBlockTypes2["Element82"]="minecraft:element_82";MinecraftBlockTypes2["Element83"]="minecraft:element_83";MinecraftBlockTypes2["Element84"]="minecraft:element_84";MinecraftBlockTypes2["Element85"]="minecraft:element_85";MinecraftBlockTypes2["Element86"]="minecraft:element_86";MinecraftBlockTypes2["Element87"]="minecraft:element_87";MinecraftBlockTypes2["Element88"]="minecraft:element_88";MinecraftBlockTypes2["Element89"]="minecraft:element_89";MinecraftBlockTypes2["Element9"]="minecraft:element_9";MinecraftBlockTypes2["Element90"]="minecraft:element_90";MinecraftBlockTypes2["Element91"]="minecraft:element_91";MinecraftBlockTypes2["Element92"]="minecraft:element_92";MinecraftBlockTypes2["Element93"]="minecraft:element_93";MinecraftBlockTypes2["Element94"]="minecraft:element_94";MinecraftBlockTypes2["Element95"]="minecraft:element_95";MinecraftBlockTypes2["Element96"]="minecraft:element_96";MinecraftBlockTypes2["Element97"]="minecraft:element_97";MinecraftBlockTypes2["Element98"]="minecraft:element_98";MinecraftBlockTypes2["Element99"]="minecraft:element_99";MinecraftBlockTypes2["EmeraldBlock"]="minecraft:emerald_block";MinecraftBlockTypes2["EmeraldOre"]="minecraft:emerald_ore";MinecraftBlockTypes2["EnchantingTable"]="minecraft:enchanting_table";MinecraftBlockTypes2["EndBrickStairs"]="minecraft:end_brick_stairs";MinecraftBlockTypes2["EndBricks"]="minecraft:end_bricks";MinecraftBlockTypes2["EndGateway"]="minecraft:end_gateway";MinecraftBlockTypes2["EndPortal"]="minecraft:end_portal";MinecraftBlockTypes2["EndPortalFrame"]="minecraft:end_portal_frame";MinecraftBlockTypes2["EndRod"]="minecraft:end_rod";MinecraftBlockTypes2["EndStone"]="minecraft:end_stone";MinecraftBlockTypes2["EnderChest"]="minecraft:ender_chest";MinecraftBlockTypes2["ExposedChiseledCopper"]="minecraft:exposed_chiseled_copper";MinecraftBlockTypes2["ExposedCopper"]="minecraft:exposed_copper";MinecraftBlockTypes2["ExposedCopperBulb"]="minecraft:exposed_copper_bulb";MinecraftBlockTypes2["ExposedCopperDoor"]="minecraft:exposed_copper_door";MinecraftBlockTypes2["ExposedCopperGrate"]="minecraft:exposed_copper_grate";MinecraftBlockTypes2["ExposedCopperTrapdoor"]="minecraft:exposed_copper_trapdoor";MinecraftBlockTypes2["ExposedCutCopper"]="minecraft:exposed_cut_copper";MinecraftBlockTypes2["ExposedCutCopperSlab"]="minecraft:exposed_cut_copper_slab";MinecraftBlockTypes2["ExposedCutCopperStairs"]="minecraft:exposed_cut_copper_stairs";MinecraftBlockTypes2["ExposedDoubleCutCopperSlab"]="minecraft:exposed_double_cut_copper_slab";MinecraftBlockTypes2["Farmland"]="minecraft:farmland";MinecraftBlockTypes2["FenceGate"]="minecraft:fence_gate";MinecraftBlockTypes2["Fire"]="minecraft:fire";MinecraftBlockTypes2["FireCoral"]="minecraft:fire_coral";MinecraftBlockTypes2["FletchingTable"]="minecraft:fletching_table";MinecraftBlockTypes2["FlowerPot"]="minecraft:flower_pot";MinecraftBlockTypes2["FloweringAzalea"]="minecraft:flowering_azalea";MinecraftBlockTypes2["FlowingLava"]="minecraft:flowing_lava";MinecraftBlockTypes2["FlowingWater"]="minecraft:flowing_water";MinecraftBlockTypes2["Frame"]="minecraft:frame";MinecraftBlockTypes2["FrogSpawn"]="minecraft:frog_spawn";MinecraftBlockTypes2["FrostedIce"]="minecraft:frosted_ice";MinecraftBlockTypes2["Furnace"]="minecraft:furnace";MinecraftBlockTypes2["GildedBlackstone"]="minecraft:gilded_blackstone";MinecraftBlockTypes2["Glass"]="minecraft:glass";MinecraftBlockTypes2["GlassPane"]="minecraft:glass_pane";MinecraftBlockTypes2["GlowFrame"]="minecraft:glow_frame";MinecraftBlockTypes2["GlowLichen"]="minecraft:glow_lichen";MinecraftBlockTypes2["Glowingobsidian"]="minecraft:glowingobsidian";MinecraftBlockTypes2["Glowstone"]="minecraft:glowstone";MinecraftBlockTypes2["GoldBlock"]="minecraft:gold_block";MinecraftBlockTypes2["GoldOre"]="minecraft:gold_ore";MinecraftBlockTypes2["GoldenRail"]="minecraft:golden_rail";MinecraftBlockTypes2["Granite"]="minecraft:granite";MinecraftBlockTypes2["GraniteStairs"]="minecraft:granite_stairs";MinecraftBlockTypes2["Grass"]="minecraft:grass";MinecraftBlockTypes2["GrassPath"]="minecraft:grass_path";MinecraftBlockTypes2["Gravel"]="minecraft:gravel";MinecraftBlockTypes2["GrayCandle"]="minecraft:gray_candle";MinecraftBlockTypes2["GrayCandleCake"]="minecraft:gray_candle_cake";MinecraftBlockTypes2["GrayCarpet"]="minecraft:gray_carpet";MinecraftBlockTypes2["GrayConcrete"]="minecraft:gray_concrete";MinecraftBlockTypes2["GrayConcretePowder"]="minecraft:gray_concrete_powder";MinecraftBlockTypes2["GrayGlazedTerracotta"]="minecraft:gray_glazed_terracotta";MinecraftBlockTypes2["GrayShulkerBox"]="minecraft:gray_shulker_box";MinecraftBlockTypes2["GrayStainedGlass"]="minecraft:gray_stained_glass";MinecraftBlockTypes2["GrayStainedGlassPane"]="minecraft:gray_stained_glass_pane";MinecraftBlockTypes2["GrayTerracotta"]="minecraft:gray_terracotta";MinecraftBlockTypes2["GrayWool"]="minecraft:gray_wool";MinecraftBlockTypes2["GreenCandle"]="minecraft:green_candle";MinecraftBlockTypes2["GreenCandleCake"]="minecraft:green_candle_cake";MinecraftBlockTypes2["GreenCarpet"]="minecraft:green_carpet";MinecraftBlockTypes2["GreenConcrete"]="minecraft:green_concrete";MinecraftBlockTypes2["GreenConcretePowder"]="minecraft:green_concrete_powder";MinecraftBlockTypes2["GreenGlazedTerracotta"]="minecraft:green_glazed_terracotta";MinecraftBlockTypes2["GreenShulkerBox"]="minecraft:green_shulker_box";MinecraftBlockTypes2["GreenStainedGlass"]="minecraft:green_stained_glass";MinecraftBlockTypes2["GreenStainedGlassPane"]="minecraft:green_stained_glass_pane";MinecraftBlockTypes2["GreenTerracotta"]="minecraft:green_terracotta";MinecraftBlockTypes2["GreenWool"]="minecraft:green_wool";MinecraftBlockTypes2["Grindstone"]="minecraft:grindstone";MinecraftBlockTypes2["HangingRoots"]="minecraft:hanging_roots";MinecraftBlockTypes2["HardBlackStainedGlass"]="minecraft:hard_black_stained_glass";MinecraftBlockTypes2["HardBlackStainedGlassPane"]="minecraft:hard_black_stained_glass_pane";MinecraftBlockTypes2["HardBlueStainedGlass"]="minecraft:hard_blue_stained_glass";MinecraftBlockTypes2["HardBlueStainedGlassPane"]="minecraft:hard_blue_stained_glass_pane";MinecraftBlockTypes2["HardBrownStainedGlass"]="minecraft:hard_brown_stained_glass";MinecraftBlockTypes2["HardBrownStainedGlassPane"]="minecraft:hard_brown_stained_glass_pane";MinecraftBlockTypes2["HardCyanStainedGlass"]="minecraft:hard_cyan_stained_glass";MinecraftBlockTypes2["HardCyanStainedGlassPane"]="minecraft:hard_cyan_stained_glass_pane";MinecraftBlockTypes2["HardGlass"]="minecraft:hard_glass";MinecraftBlockTypes2["HardGlassPane"]="minecraft:hard_glass_pane";MinecraftBlockTypes2["HardGrayStainedGlass"]="minecraft:hard_gray_stained_glass";MinecraftBlockTypes2["HardGrayStainedGlassPane"]="minecraft:hard_gray_stained_glass_pane";MinecraftBlockTypes2["HardGreenStainedGlass"]="minecraft:hard_green_stained_glass";MinecraftBlockTypes2["HardGreenStainedGlassPane"]="minecraft:hard_green_stained_glass_pane";MinecraftBlockTypes2["HardLightBlueStainedGlass"]="minecraft:hard_light_blue_stained_glass";MinecraftBlockTypes2["HardLightBlueStainedGlassPane"]="minecraft:hard_light_blue_stained_glass_pane";MinecraftBlockTypes2["HardLightGrayStainedGlass"]="minecraft:hard_light_gray_stained_glass";MinecraftBlockTypes2["HardLightGrayStainedGlassPane"]="minecraft:hard_light_gray_stained_glass_pane";MinecraftBlockTypes2["HardLimeStainedGlass"]="minecraft:hard_lime_stained_glass";MinecraftBlockTypes2["HardLimeStainedGlassPane"]="minecraft:hard_lime_stained_glass_pane";MinecraftBlockTypes2["HardMagentaStainedGlass"]="minecraft:hard_magenta_stained_glass";MinecraftBlockTypes2["HardMagentaStainedGlassPane"]="minecraft:hard_magenta_stained_glass_pane";MinecraftBlockTypes2["HardOrangeStainedGlass"]="minecraft:hard_orange_stained_glass";MinecraftBlockTypes2["HardOrangeStainedGlassPane"]="minecraft:hard_orange_stained_glass_pane";MinecraftBlockTypes2["HardPinkStainedGlass"]="minecraft:hard_pink_stained_glass";MinecraftBlockTypes2["HardPinkStainedGlassPane"]="minecraft:hard_pink_stained_glass_pane";MinecraftBlockTypes2["HardPurpleStainedGlass"]="minecraft:hard_purple_stained_glass";MinecraftBlockTypes2["HardPurpleStainedGlassPane"]="minecraft:hard_purple_stained_glass_pane";MinecraftBlockTypes2["HardRedStainedGlass"]="minecraft:hard_red_stained_glass";MinecraftBlockTypes2["HardRedStainedGlassPane"]="minecraft:hard_red_stained_glass_pane";MinecraftBlockTypes2["HardWhiteStainedGlass"]="minecraft:hard_white_stained_glass";MinecraftBlockTypes2["HardWhiteStainedGlassPane"]="minecraft:hard_white_stained_glass_pane";MinecraftBlockTypes2["HardYellowStainedGlass"]="minecraft:hard_yellow_stained_glass";MinecraftBlockTypes2["HardYellowStainedGlassPane"]="minecraft:hard_yellow_stained_glass_pane";MinecraftBlockTypes2["HardenedClay"]="minecraft:hardened_clay";MinecraftBlockTypes2["HayBlock"]="minecraft:hay_block";MinecraftBlockTypes2["HeavyWeightedPressurePlate"]="minecraft:heavy_weighted_pressure_plate";MinecraftBlockTypes2["HoneyBlock"]="minecraft:honey_block";MinecraftBlockTypes2["HoneycombBlock"]="minecraft:honeycomb_block";MinecraftBlockTypes2["Hopper"]="minecraft:hopper";MinecraftBlockTypes2["HornCoral"]="minecraft:horn_coral";MinecraftBlockTypes2["Ice"]="minecraft:ice";MinecraftBlockTypes2["InfestedDeepslate"]="minecraft:infested_deepslate";MinecraftBlockTypes2["InfoUpdate"]="minecraft:info_update";MinecraftBlockTypes2["InfoUpdate2"]="minecraft:info_update2";MinecraftBlockTypes2["InvisibleBedrock"]="minecraft:invisible_bedrock";MinecraftBlockTypes2["IronBars"]="minecraft:iron_bars";MinecraftBlockTypes2["IronBlock"]="minecraft:iron_block";MinecraftBlockTypes2["IronDoor"]="minecraft:iron_door";MinecraftBlockTypes2["IronOre"]="minecraft:iron_ore";MinecraftBlockTypes2["IronTrapdoor"]="minecraft:iron_trapdoor";MinecraftBlockTypes2["Jigsaw"]="minecraft:jigsaw";MinecraftBlockTypes2["Jukebox"]="minecraft:jukebox";MinecraftBlockTypes2["JungleButton"]="minecraft:jungle_button";MinecraftBlockTypes2["JungleDoor"]="minecraft:jungle_door";MinecraftBlockTypes2["JungleFence"]="minecraft:jungle_fence";MinecraftBlockTypes2["JungleFenceGate"]="minecraft:jungle_fence_gate";MinecraftBlockTypes2["JungleHangingSign"]="minecraft:jungle_hanging_sign";MinecraftBlockTypes2["JungleLog"]="minecraft:jungle_log";MinecraftBlockTypes2["JunglePlanks"]="minecraft:jungle_planks";MinecraftBlockTypes2["JunglePressurePlate"]="minecraft:jungle_pressure_plate";MinecraftBlockTypes2["JungleStairs"]="minecraft:jungle_stairs";MinecraftBlockTypes2["JungleStandingSign"]="minecraft:jungle_standing_sign";MinecraftBlockTypes2["JungleTrapdoor"]="minecraft:jungle_trapdoor";MinecraftBlockTypes2["JungleWallSign"]="minecraft:jungle_wall_sign";MinecraftBlockTypes2["Kelp"]="minecraft:kelp";MinecraftBlockTypes2["Ladder"]="minecraft:ladder";MinecraftBlockTypes2["Lantern"]="minecraft:lantern";MinecraftBlockTypes2["LapisBlock"]="minecraft:lapis_block";MinecraftBlockTypes2["LapisOre"]="minecraft:lapis_ore";MinecraftBlockTypes2["LargeAmethystBud"]="minecraft:large_amethyst_bud";MinecraftBlockTypes2["Lava"]="minecraft:lava";MinecraftBlockTypes2["Leaves"]="minecraft:leaves";MinecraftBlockTypes2["Leaves2"]="minecraft:leaves2";MinecraftBlockTypes2["Lectern"]="minecraft:lectern";MinecraftBlockTypes2["Lever"]="minecraft:lever";MinecraftBlockTypes2["LightBlock"]="minecraft:light_block";MinecraftBlockTypes2["LightBlueCandle"]="minecraft:light_blue_candle";MinecraftBlockTypes2["LightBlueCandleCake"]="minecraft:light_blue_candle_cake";MinecraftBlockTypes2["LightBlueCarpet"]="minecraft:light_blue_carpet";MinecraftBlockTypes2["LightBlueConcrete"]="minecraft:light_blue_concrete";MinecraftBlockTypes2["LightBlueConcretePowder"]="minecraft:light_blue_concrete_powder";MinecraftBlockTypes2["LightBlueGlazedTerracotta"]="minecraft:light_blue_glazed_terracotta";MinecraftBlockTypes2["LightBlueShulkerBox"]="minecraft:light_blue_shulker_box";MinecraftBlockTypes2["LightBlueStainedGlass"]="minecraft:light_blue_stained_glass";MinecraftBlockTypes2["LightBlueStainedGlassPane"]="minecraft:light_blue_stained_glass_pane";MinecraftBlockTypes2["LightBlueTerracotta"]="minecraft:light_blue_terracotta";MinecraftBlockTypes2["LightBlueWool"]="minecraft:light_blue_wool";MinecraftBlockTypes2["LightGrayCandle"]="minecraft:light_gray_candle";MinecraftBlockTypes2["LightGrayCandleCake"]="minecraft:light_gray_candle_cake";MinecraftBlockTypes2["LightGrayCarpet"]="minecraft:light_gray_carpet";MinecraftBlockTypes2["LightGrayConcrete"]="minecraft:light_gray_concrete";MinecraftBlockTypes2["LightGrayConcretePowder"]="minecraft:light_gray_concrete_powder";MinecraftBlockTypes2["LightGrayShulkerBox"]="minecraft:light_gray_shulker_box";MinecraftBlockTypes2["LightGrayStainedGlass"]="minecraft:light_gray_stained_glass";MinecraftBlockTypes2["LightGrayStainedGlassPane"]="minecraft:light_gray_stained_glass_pane";MinecraftBlockTypes2["LightGrayTerracotta"]="minecraft:light_gray_terracotta";MinecraftBlockTypes2["LightGrayWool"]="minecraft:light_gray_wool";MinecraftBlockTypes2["LightWeightedPressurePlate"]="minecraft:light_weighted_pressure_plate";MinecraftBlockTypes2["LightningRod"]="minecraft:lightning_rod";MinecraftBlockTypes2["LimeCandle"]="minecraft:lime_candle";MinecraftBlockTypes2["LimeCandleCake"]="minecraft:lime_candle_cake";MinecraftBlockTypes2["LimeCarpet"]="minecraft:lime_carpet";MinecraftBlockTypes2["LimeConcrete"]="minecraft:lime_concrete";MinecraftBlockTypes2["LimeConcretePowder"]="minecraft:lime_concrete_powder";MinecraftBlockTypes2["LimeGlazedTerracotta"]="minecraft:lime_glazed_terracotta";MinecraftBlockTypes2["LimeShulkerBox"]="minecraft:lime_shulker_box";MinecraftBlockTypes2["LimeStainedGlass"]="minecraft:lime_stained_glass";MinecraftBlockTypes2["LimeStainedGlassPane"]="minecraft:lime_stained_glass_pane";MinecraftBlockTypes2["LimeTerracotta"]="minecraft:lime_terracotta";MinecraftBlockTypes2["LimeWool"]="minecraft:lime_wool";MinecraftBlockTypes2["LitBlastFurnace"]="minecraft:lit_blast_furnace";MinecraftBlockTypes2["LitDeepslateRedstoneOre"]="minecraft:lit_deepslate_redstone_ore";MinecraftBlockTypes2["LitFurnace"]="minecraft:lit_furnace";MinecraftBlockTypes2["LitPumpkin"]="minecraft:lit_pumpkin";MinecraftBlockTypes2["LitRedstoneLamp"]="minecraft:lit_redstone_lamp";MinecraftBlockTypes2["LitRedstoneOre"]="minecraft:lit_redstone_ore";MinecraftBlockTypes2["LitSmoker"]="minecraft:lit_smoker";MinecraftBlockTypes2["Lodestone"]="minecraft:lodestone";MinecraftBlockTypes2["Loom"]="minecraft:loom";MinecraftBlockTypes2["MagentaCandle"]="minecraft:magenta_candle";MinecraftBlockTypes2["MagentaCandleCake"]="minecraft:magenta_candle_cake";MinecraftBlockTypes2["MagentaCarpet"]="minecraft:magenta_carpet";MinecraftBlockTypes2["MagentaConcrete"]="minecraft:magenta_concrete";MinecraftBlockTypes2["MagentaConcretePowder"]="minecraft:magenta_concrete_powder";MinecraftBlockTypes2["MagentaGlazedTerracotta"]="minecraft:magenta_glazed_terracotta";MinecraftBlockTypes2["MagentaShulkerBox"]="minecraft:magenta_shulker_box";MinecraftBlockTypes2["MagentaStainedGlass"]="minecraft:magenta_stained_glass";MinecraftBlockTypes2["MagentaStainedGlassPane"]="minecraft:magenta_stained_glass_pane";MinecraftBlockTypes2["MagentaTerracotta"]="minecraft:magenta_terracotta";MinecraftBlockTypes2["MagentaWool"]="minecraft:magenta_wool";MinecraftBlockTypes2["Magma"]="minecraft:magma";MinecraftBlockTypes2["MangroveButton"]="minecraft:mangrove_button";MinecraftBlockTypes2["MangroveDoor"]="minecraft:mangrove_door";MinecraftBlockTypes2["MangroveDoubleSlab"]="minecraft:mangrove_double_slab";MinecraftBlockTypes2["MangroveFence"]="minecraft:mangrove_fence";MinecraftBlockTypes2["MangroveFenceGate"]="minecraft:mangrove_fence_gate";MinecraftBlockTypes2["MangroveHangingSign"]="minecraft:mangrove_hanging_sign";MinecraftBlockTypes2["MangroveLeaves"]="minecraft:mangrove_leaves";MinecraftBlockTypes2["MangroveLog"]="minecraft:mangrove_log";MinecraftBlockTypes2["MangrovePlanks"]="minecraft:mangrove_planks";MinecraftBlockTypes2["MangrovePressurePlate"]="minecraft:mangrove_pressure_plate";MinecraftBlockTypes2["MangrovePropagule"]="minecraft:mangrove_propagule";MinecraftBlockTypes2["MangroveRoots"]="minecraft:mangrove_roots";MinecraftBlockTypes2["MangroveSlab"]="minecraft:mangrove_slab";MinecraftBlockTypes2["MangroveStairs"]="minecraft:mangrove_stairs";MinecraftBlockTypes2["MangroveStandingSign"]="minecraft:mangrove_standing_sign";MinecraftBlockTypes2["MangroveTrapdoor"]="minecraft:mangrove_trapdoor";MinecraftBlockTypes2["MangroveWallSign"]="minecraft:mangrove_wall_sign";MinecraftBlockTypes2["MangroveWood"]="minecraft:mangrove_wood";MinecraftBlockTypes2["MediumAmethystBud"]="minecraft:medium_amethyst_bud";MinecraftBlockTypes2["MelonBlock"]="minecraft:melon_block";MinecraftBlockTypes2["MelonStem"]="minecraft:melon_stem";MinecraftBlockTypes2["MobSpawner"]="minecraft:mob_spawner";MinecraftBlockTypes2["MonsterEgg"]="minecraft:monster_egg";MinecraftBlockTypes2["MossBlock"]="minecraft:moss_block";MinecraftBlockTypes2["MossCarpet"]="minecraft:moss_carpet";MinecraftBlockTypes2["MossyCobblestone"]="minecraft:mossy_cobblestone";MinecraftBlockTypes2["MossyCobblestoneStairs"]="minecraft:mossy_cobblestone_stairs";MinecraftBlockTypes2["MossyStoneBrickStairs"]="minecraft:mossy_stone_brick_stairs";MinecraftBlockTypes2["MovingBlock"]="minecraft:moving_block";MinecraftBlockTypes2["Mud"]="minecraft:mud";MinecraftBlockTypes2["MudBrickDoubleSlab"]="minecraft:mud_brick_double_slab";MinecraftBlockTypes2["MudBrickSlab"]="minecraft:mud_brick_slab";MinecraftBlockTypes2["MudBrickStairs"]="minecraft:mud_brick_stairs";MinecraftBlockTypes2["MudBrickWall"]="minecraft:mud_brick_wall";MinecraftBlockTypes2["MudBricks"]="minecraft:mud_bricks";MinecraftBlockTypes2["MuddyMangroveRoots"]="minecraft:muddy_mangrove_roots";MinecraftBlockTypes2["Mycelium"]="minecraft:mycelium";MinecraftBlockTypes2["NetherBrick"]="minecraft:nether_brick";MinecraftBlockTypes2["NetherBrickFence"]="minecraft:nether_brick_fence";MinecraftBlockTypes2["NetherBrickStairs"]="minecraft:nether_brick_stairs";MinecraftBlockTypes2["NetherGoldOre"]="minecraft:nether_gold_ore";MinecraftBlockTypes2["NetherSprouts"]="minecraft:nether_sprouts";MinecraftBlockTypes2["NetherWart"]="minecraft:nether_wart";MinecraftBlockTypes2["NetherWartBlock"]="minecraft:nether_wart_block";MinecraftBlockTypes2["NetheriteBlock"]="minecraft:netherite_block";MinecraftBlockTypes2["Netherrack"]="minecraft:netherrack";MinecraftBlockTypes2["Netherreactor"]="minecraft:netherreactor";MinecraftBlockTypes2["NormalStoneStairs"]="minecraft:normal_stone_stairs";MinecraftBlockTypes2["Noteblock"]="minecraft:noteblock";MinecraftBlockTypes2["OakFence"]="minecraft:oak_fence";MinecraftBlockTypes2["OakHangingSign"]="minecraft:oak_hanging_sign";MinecraftBlockTypes2["OakLog"]="minecraft:oak_log";MinecraftBlockTypes2["OakPlanks"]="minecraft:oak_planks";MinecraftBlockTypes2["OakStairs"]="minecraft:oak_stairs";MinecraftBlockTypes2["Observer"]="minecraft:observer";MinecraftBlockTypes2["Obsidian"]="minecraft:obsidian";MinecraftBlockTypes2["OchreFroglight"]="minecraft:ochre_froglight";MinecraftBlockTypes2["OrangeCandle"]="minecraft:orange_candle";MinecraftBlockTypes2["OrangeCandleCake"]="minecraft:orange_candle_cake";MinecraftBlockTypes2["OrangeCarpet"]="minecraft:orange_carpet";MinecraftBlockTypes2["OrangeConcrete"]="minecraft:orange_concrete";MinecraftBlockTypes2["OrangeConcretePowder"]="minecraft:orange_concrete_powder";MinecraftBlockTypes2["OrangeGlazedTerracotta"]="minecraft:orange_glazed_terracotta";MinecraftBlockTypes2["OrangeShulkerBox"]="minecraft:orange_shulker_box";MinecraftBlockTypes2["OrangeStainedGlass"]="minecraft:orange_stained_glass";MinecraftBlockTypes2["OrangeStainedGlassPane"]="minecraft:orange_stained_glass_pane";MinecraftBlockTypes2["OrangeTerracotta"]="minecraft:orange_terracotta";MinecraftBlockTypes2["OrangeWool"]="minecraft:orange_wool";MinecraftBlockTypes2["OxidizedChiseledCopper"]="minecraft:oxidized_chiseled_copper";MinecraftBlockTypes2["OxidizedCopper"]="minecraft:oxidized_copper";MinecraftBlockTypes2["OxidizedCopperBulb"]="minecraft:oxidized_copper_bulb";MinecraftBlockTypes2["OxidizedCopperDoor"]="minecraft:oxidized_copper_door";MinecraftBlockTypes2["OxidizedCopperGrate"]="minecraft:oxidized_copper_grate";MinecraftBlockTypes2["OxidizedCopperTrapdoor"]="minecraft:oxidized_copper_trapdoor";MinecraftBlockTypes2["OxidizedCutCopper"]="minecraft:oxidized_cut_copper";MinecraftBlockTypes2["OxidizedCutCopperSlab"]="minecraft:oxidized_cut_copper_slab";MinecraftBlockTypes2["OxidizedCutCopperStairs"]="minecraft:oxidized_cut_copper_stairs";MinecraftBlockTypes2["OxidizedDoubleCutCopperSlab"]="minecraft:oxidized_double_cut_copper_slab";MinecraftBlockTypes2["PackedIce"]="minecraft:packed_ice";MinecraftBlockTypes2["PackedMud"]="minecraft:packed_mud";MinecraftBlockTypes2["PearlescentFroglight"]="minecraft:pearlescent_froglight";MinecraftBlockTypes2["PinkCandle"]="minecraft:pink_candle";MinecraftBlockTypes2["PinkCandleCake"]="minecraft:pink_candle_cake";MinecraftBlockTypes2["PinkCarpet"]="minecraft:pink_carpet";MinecraftBlockTypes2["PinkConcrete"]="minecraft:pink_concrete";MinecraftBlockTypes2["PinkConcretePowder"]="minecraft:pink_concrete_powder";MinecraftBlockTypes2["PinkGlazedTerracotta"]="minecraft:pink_glazed_terracotta";MinecraftBlockTypes2["PinkPetals"]="minecraft:pink_petals";MinecraftBlockTypes2["PinkShulkerBox"]="minecraft:pink_shulker_box";MinecraftBlockTypes2["PinkStainedGlass"]="minecraft:pink_stained_glass";MinecraftBlockTypes2["PinkStainedGlassPane"]="minecraft:pink_stained_glass_pane";MinecraftBlockTypes2["PinkTerracotta"]="minecraft:pink_terracotta";MinecraftBlockTypes2["PinkWool"]="minecraft:pink_wool";MinecraftBlockTypes2["Piston"]="minecraft:piston";MinecraftBlockTypes2["PistonArmCollision"]="minecraft:piston_arm_collision";MinecraftBlockTypes2["PitcherCrop"]="minecraft:pitcher_crop";MinecraftBlockTypes2["PitcherPlant"]="minecraft:pitcher_plant";MinecraftBlockTypes2["Podzol"]="minecraft:podzol";MinecraftBlockTypes2["PointedDripstone"]="minecraft:pointed_dripstone";MinecraftBlockTypes2["PolishedAndesite"]="minecraft:polished_andesite";MinecraftBlockTypes2["PolishedAndesiteStairs"]="minecraft:polished_andesite_stairs";MinecraftBlockTypes2["PolishedBasalt"]="minecraft:polished_basalt";MinecraftBlockTypes2["PolishedBlackstone"]="minecraft:polished_blackstone";MinecraftBlockTypes2["PolishedBlackstoneBrickDoubleSlab"]="minecraft:polished_blackstone_brick_double_slab";MinecraftBlockTypes2["PolishedBlackstoneBrickSlab"]="minecraft:polished_blackstone_brick_slab";MinecraftBlockTypes2["PolishedBlackstoneBrickStairs"]="minecraft:polished_blackstone_brick_stairs";MinecraftBlockTypes2["PolishedBlackstoneBrickWall"]="minecraft:polished_blackstone_brick_wall";MinecraftBlockTypes2["PolishedBlackstoneBricks"]="minecraft:polished_blackstone_bricks";MinecraftBlockTypes2["PolishedBlackstoneButton"]="minecraft:polished_blackstone_button";MinecraftBlockTypes2["PolishedBlackstoneDoubleSlab"]="minecraft:polished_blackstone_double_slab";MinecraftBlockTypes2["PolishedBlackstonePressurePlate"]="minecraft:polished_blackstone_pressure_plate";MinecraftBlockTypes2["PolishedBlackstoneSlab"]="minecraft:polished_blackstone_slab";MinecraftBlockTypes2["PolishedBlackstoneStairs"]="minecraft:polished_blackstone_stairs";MinecraftBlockTypes2["PolishedBlackstoneWall"]="minecraft:polished_blackstone_wall";MinecraftBlockTypes2["PolishedDeepslate"]="minecraft:polished_deepslate";MinecraftBlockTypes2["PolishedDeepslateDoubleSlab"]="minecraft:polished_deepslate_double_slab";MinecraftBlockTypes2["PolishedDeepslateSlab"]="minecraft:polished_deepslate_slab";MinecraftBlockTypes2["PolishedDeepslateStairs"]="minecraft:polished_deepslate_stairs";MinecraftBlockTypes2["PolishedDeepslateWall"]="minecraft:polished_deepslate_wall";MinecraftBlockTypes2["PolishedDiorite"]="minecraft:polished_diorite";MinecraftBlockTypes2["PolishedDioriteStairs"]="minecraft:polished_diorite_stairs";MinecraftBlockTypes2["PolishedGranite"]="minecraft:polished_granite";MinecraftBlockTypes2["PolishedGraniteStairs"]="minecraft:polished_granite_stairs";MinecraftBlockTypes2["PolishedTuff"]="minecraft:polished_tuff";MinecraftBlockTypes2["PolishedTuffDoubleSlab"]="minecraft:polished_tuff_double_slab";MinecraftBlockTypes2["PolishedTuffSlab"]="minecraft:polished_tuff_slab";MinecraftBlockTypes2["PolishedTuffStairs"]="minecraft:polished_tuff_stairs";MinecraftBlockTypes2["PolishedTuffWall"]="minecraft:polished_tuff_wall";MinecraftBlockTypes2["Portal"]="minecraft:portal";MinecraftBlockTypes2["Potatoes"]="minecraft:potatoes";MinecraftBlockTypes2["PowderSnow"]="minecraft:powder_snow";MinecraftBlockTypes2["PoweredComparator"]="minecraft:powered_comparator";MinecraftBlockTypes2["PoweredRepeater"]="minecraft:powered_repeater";MinecraftBlockTypes2["Prismarine"]="minecraft:prismarine";MinecraftBlockTypes2["PrismarineBricksStairs"]="minecraft:prismarine_bricks_stairs";MinecraftBlockTypes2["PrismarineStairs"]="minecraft:prismarine_stairs";MinecraftBlockTypes2["Pumpkin"]="minecraft:pumpkin";MinecraftBlockTypes2["PumpkinStem"]="minecraft:pumpkin_stem";MinecraftBlockTypes2["PurpleCandle"]="minecraft:purple_candle";MinecraftBlockTypes2["PurpleCandleCake"]="minecraft:purple_candle_cake";MinecraftBlockTypes2["PurpleCarpet"]="minecraft:purple_carpet";MinecraftBlockTypes2["PurpleConcrete"]="minecraft:purple_concrete";MinecraftBlockTypes2["PurpleConcretePowder"]="minecraft:purple_concrete_powder";MinecraftBlockTypes2["PurpleGlazedTerracotta"]="minecraft:purple_glazed_terracotta";MinecraftBlockTypes2["PurpleShulkerBox"]="minecraft:purple_shulker_box";MinecraftBlockTypes2["PurpleStainedGlass"]="minecraft:purple_stained_glass";MinecraftBlockTypes2["PurpleStainedGlassPane"]="minecraft:purple_stained_glass_pane";MinecraftBlockTypes2["PurpleTerracotta"]="minecraft:purple_terracotta";MinecraftBlockTypes2["PurpleWool"]="minecraft:purple_wool";MinecraftBlockTypes2["PurpurBlock"]="minecraft:purpur_block";MinecraftBlockTypes2["PurpurStairs"]="minecraft:purpur_stairs";MinecraftBlockTypes2["QuartzBlock"]="minecraft:quartz_block";MinecraftBlockTypes2["QuartzBricks"]="minecraft:quartz_bricks";MinecraftBlockTypes2["QuartzOre"]="minecraft:quartz_ore";MinecraftBlockTypes2["QuartzStairs"]="minecraft:quartz_stairs";MinecraftBlockTypes2["Rail"]="minecraft:rail";MinecraftBlockTypes2["RawCopperBlock"]="minecraft:raw_copper_block";MinecraftBlockTypes2["RawGoldBlock"]="minecraft:raw_gold_block";MinecraftBlockTypes2["RawIronBlock"]="minecraft:raw_iron_block";MinecraftBlockTypes2["RedCandle"]="minecraft:red_candle";MinecraftBlockTypes2["RedCandleCake"]="minecraft:red_candle_cake";MinecraftBlockTypes2["RedCarpet"]="minecraft:red_carpet";MinecraftBlockTypes2["RedConcrete"]="minecraft:red_concrete";MinecraftBlockTypes2["RedConcretePowder"]="minecraft:red_concrete_powder";MinecraftBlockTypes2["RedFlower"]="minecraft:red_flower";MinecraftBlockTypes2["RedGlazedTerracotta"]="minecraft:red_glazed_terracotta";MinecraftBlockTypes2["RedMushroom"]="minecraft:red_mushroom";MinecraftBlockTypes2["RedMushroomBlock"]="minecraft:red_mushroom_block";MinecraftBlockTypes2["RedNetherBrick"]="minecraft:red_nether_brick";MinecraftBlockTypes2["RedNetherBrickStairs"]="minecraft:red_nether_brick_stairs";MinecraftBlockTypes2["RedSandstone"]="minecraft:red_sandstone";MinecraftBlockTypes2["RedSandstoneStairs"]="minecraft:red_sandstone_stairs";MinecraftBlockTypes2["RedShulkerBox"]="minecraft:red_shulker_box";MinecraftBlockTypes2["RedStainedGlass"]="minecraft:red_stained_glass";MinecraftBlockTypes2["RedStainedGlassPane"]="minecraft:red_stained_glass_pane";MinecraftBlockTypes2["RedTerracotta"]="minecraft:red_terracotta";MinecraftBlockTypes2["RedWool"]="minecraft:red_wool";MinecraftBlockTypes2["RedstoneBlock"]="minecraft:redstone_block";MinecraftBlockTypes2["RedstoneLamp"]="minecraft:redstone_lamp";MinecraftBlockTypes2["RedstoneOre"]="minecraft:redstone_ore";MinecraftBlockTypes2["RedstoneTorch"]="minecraft:redstone_torch";MinecraftBlockTypes2["RedstoneWire"]="minecraft:redstone_wire";MinecraftBlockTypes2["Reeds"]="minecraft:reeds";MinecraftBlockTypes2["ReinforcedDeepslate"]="minecraft:reinforced_deepslate";MinecraftBlockTypes2["RepeatingCommandBlock"]="minecraft:repeating_command_block";MinecraftBlockTypes2["Reserved6"]="minecraft:reserved6";MinecraftBlockTypes2["RespawnAnchor"]="minecraft:respawn_anchor";MinecraftBlockTypes2["Sand"]="minecraft:sand";MinecraftBlockTypes2["Sandstone"]="minecraft:sandstone";MinecraftBlockTypes2["SandstoneStairs"]="minecraft:sandstone_stairs";MinecraftBlockTypes2["Sapling"]="minecraft:sapling";MinecraftBlockTypes2["Scaffolding"]="minecraft:scaffolding";MinecraftBlockTypes2["Sculk"]="minecraft:sculk";MinecraftBlockTypes2["SculkCatalyst"]="minecraft:sculk_catalyst";MinecraftBlockTypes2["SculkSensor"]="minecraft:sculk_sensor";MinecraftBlockTypes2["SculkShrieker"]="minecraft:sculk_shrieker";MinecraftBlockTypes2["SculkVein"]="minecraft:sculk_vein";MinecraftBlockTypes2["SeaLantern"]="minecraft:sea_lantern";MinecraftBlockTypes2["SeaPickle"]="minecraft:sea_pickle";MinecraftBlockTypes2["Seagrass"]="minecraft:seagrass";MinecraftBlockTypes2["Shroomlight"]="minecraft:shroomlight";MinecraftBlockTypes2["SilverGlazedTerracotta"]="minecraft:silver_glazed_terracotta";MinecraftBlockTypes2["Skull"]="minecraft:skull";MinecraftBlockTypes2["Slime"]="minecraft:slime";MinecraftBlockTypes2["SmallAmethystBud"]="minecraft:small_amethyst_bud";MinecraftBlockTypes2["SmallDripleafBlock"]="minecraft:small_dripleaf_block";MinecraftBlockTypes2["SmithingTable"]="minecraft:smithing_table";MinecraftBlockTypes2["Smoker"]="minecraft:smoker";MinecraftBlockTypes2["SmoothBasalt"]="minecraft:smooth_basalt";MinecraftBlockTypes2["SmoothQuartzStairs"]="minecraft:smooth_quartz_stairs";MinecraftBlockTypes2["SmoothRedSandstoneStairs"]="minecraft:smooth_red_sandstone_stairs";MinecraftBlockTypes2["SmoothSandstoneStairs"]="minecraft:smooth_sandstone_stairs";MinecraftBlockTypes2["SmoothStone"]="minecraft:smooth_stone";MinecraftBlockTypes2["SnifferEgg"]="minecraft:sniffer_egg";MinecraftBlockTypes2["Snow"]="minecraft:snow";MinecraftBlockTypes2["SnowLayer"]="minecraft:snow_layer";MinecraftBlockTypes2["SoulCampfire"]="minecraft:soul_campfire";MinecraftBlockTypes2["SoulFire"]="minecraft:soul_fire";MinecraftBlockTypes2["SoulLantern"]="minecraft:soul_lantern";MinecraftBlockTypes2["SoulSand"]="minecraft:soul_sand";MinecraftBlockTypes2["SoulSoil"]="minecraft:soul_soil";MinecraftBlockTypes2["SoulTorch"]="minecraft:soul_torch";MinecraftBlockTypes2["Sponge"]="minecraft:sponge";MinecraftBlockTypes2["SporeBlossom"]="minecraft:spore_blossom";MinecraftBlockTypes2["SpruceButton"]="minecraft:spruce_button";MinecraftBlockTypes2["SpruceDoor"]="minecraft:spruce_door";MinecraftBlockTypes2["SpruceFence"]="minecraft:spruce_fence";MinecraftBlockTypes2["SpruceFenceGate"]="minecraft:spruce_fence_gate";MinecraftBlockTypes2["SpruceHangingSign"]="minecraft:spruce_hanging_sign";MinecraftBlockTypes2["SpruceLog"]="minecraft:spruce_log";MinecraftBlockTypes2["SprucePlanks"]="minecraft:spruce_planks";MinecraftBlockTypes2["SprucePressurePlate"]="minecraft:spruce_pressure_plate";MinecraftBlockTypes2["SpruceStairs"]="minecraft:spruce_stairs";MinecraftBlockTypes2["SpruceStandingSign"]="minecraft:spruce_standing_sign";MinecraftBlockTypes2["SpruceTrapdoor"]="minecraft:spruce_trapdoor";MinecraftBlockTypes2["SpruceWallSign"]="minecraft:spruce_wall_sign";MinecraftBlockTypes2["StandingBanner"]="minecraft:standing_banner";MinecraftBlockTypes2["StandingSign"]="minecraft:standing_sign";MinecraftBlockTypes2["StickyPiston"]="minecraft:sticky_piston";MinecraftBlockTypes2["StickyPistonArmCollision"]="minecraft:sticky_piston_arm_collision";MinecraftBlockTypes2["Stone"]="minecraft:stone";MinecraftBlockTypes2["StoneBlockSlab"]="minecraft:stone_block_slab";MinecraftBlockTypes2["StoneBlockSlab2"]="minecraft:stone_block_slab2";MinecraftBlockTypes2["StoneBlockSlab3"]="minecraft:stone_block_slab3";MinecraftBlockTypes2["StoneBlockSlab4"]="minecraft:stone_block_slab4";MinecraftBlockTypes2["StoneBrickStairs"]="minecraft:stone_brick_stairs";MinecraftBlockTypes2["StoneButton"]="minecraft:stone_button";MinecraftBlockTypes2["StonePressurePlate"]="minecraft:stone_pressure_plate";MinecraftBlockTypes2["StoneStairs"]="minecraft:stone_stairs";MinecraftBlockTypes2["Stonebrick"]="minecraft:stonebrick";MinecraftBlockTypes2["Stonecutter"]="minecraft:stonecutter";MinecraftBlockTypes2["StonecutterBlock"]="minecraft:stonecutter_block";MinecraftBlockTypes2["StrippedAcaciaLog"]="minecraft:stripped_acacia_log";MinecraftBlockTypes2["StrippedBambooBlock"]="minecraft:stripped_bamboo_block";MinecraftBlockTypes2["StrippedBirchLog"]="minecraft:stripped_birch_log";MinecraftBlockTypes2["StrippedCherryLog"]="minecraft:stripped_cherry_log";MinecraftBlockTypes2["StrippedCherryWood"]="minecraft:stripped_cherry_wood";MinecraftBlockTypes2["StrippedCrimsonHyphae"]="minecraft:stripped_crimson_hyphae";MinecraftBlockTypes2["StrippedCrimsonStem"]="minecraft:stripped_crimson_stem";MinecraftBlockTypes2["StrippedDarkOakLog"]="minecraft:stripped_dark_oak_log";MinecraftBlockTypes2["StrippedJungleLog"]="minecraft:stripped_jungle_log";MinecraftBlockTypes2["StrippedMangroveLog"]="minecraft:stripped_mangrove_log";MinecraftBlockTypes2["StrippedMangroveWood"]="minecraft:stripped_mangrove_wood";MinecraftBlockTypes2["StrippedOakLog"]="minecraft:stripped_oak_log";MinecraftBlockTypes2["StrippedSpruceLog"]="minecraft:stripped_spruce_log";MinecraftBlockTypes2["StrippedWarpedHyphae"]="minecraft:stripped_warped_hyphae";MinecraftBlockTypes2["StrippedWarpedStem"]="minecraft:stripped_warped_stem";MinecraftBlockTypes2["StructureBlock"]="minecraft:structure_block";MinecraftBlockTypes2["StructureVoid"]="minecraft:structure_void";MinecraftBlockTypes2["SuspiciousGravel"]="minecraft:suspicious_gravel";MinecraftBlockTypes2["SuspiciousSand"]="minecraft:suspicious_sand";MinecraftBlockTypes2["SweetBerryBush"]="minecraft:sweet_berry_bush";MinecraftBlockTypes2["Tallgrass"]="minecraft:tallgrass";MinecraftBlockTypes2["Target"]="minecraft:target";MinecraftBlockTypes2["TintedGlass"]="minecraft:tinted_glass";MinecraftBlockTypes2["Tnt"]="minecraft:tnt";MinecraftBlockTypes2["Torch"]="minecraft:torch";MinecraftBlockTypes2["Torchflower"]="minecraft:torchflower";MinecraftBlockTypes2["TorchflowerCrop"]="minecraft:torchflower_crop";MinecraftBlockTypes2["Trapdoor"]="minecraft:trapdoor";MinecraftBlockTypes2["TrappedChest"]="minecraft:trapped_chest";MinecraftBlockTypes2["TrialSpawner"]="minecraft:trial_spawner";MinecraftBlockTypes2["TripWire"]="minecraft:trip_wire";MinecraftBlockTypes2["TripwireHook"]="minecraft:tripwire_hook";MinecraftBlockTypes2["TubeCoral"]="minecraft:tube_coral";MinecraftBlockTypes2["Tuff"]="minecraft:tuff";MinecraftBlockTypes2["TuffBrickDoubleSlab"]="minecraft:tuff_brick_double_slab";MinecraftBlockTypes2["TuffBrickSlab"]="minecraft:tuff_brick_slab";MinecraftBlockTypes2["TuffBrickStairs"]="minecraft:tuff_brick_stairs";MinecraftBlockTypes2["TuffBrickWall"]="minecraft:tuff_brick_wall";MinecraftBlockTypes2["TuffBricks"]="minecraft:tuff_bricks";MinecraftBlockTypes2["TuffDoubleSlab"]="minecraft:tuff_double_slab";MinecraftBlockTypes2["TuffSlab"]="minecraft:tuff_slab";MinecraftBlockTypes2["TuffStairs"]="minecraft:tuff_stairs";MinecraftBlockTypes2["TuffWall"]="minecraft:tuff_wall";MinecraftBlockTypes2["TurtleEgg"]="minecraft:turtle_egg";MinecraftBlockTypes2["TwistingVines"]="minecraft:twisting_vines";MinecraftBlockTypes2["UnderwaterTorch"]="minecraft:underwater_torch";MinecraftBlockTypes2["UndyedShulkerBox"]="minecraft:undyed_shulker_box";MinecraftBlockTypes2["Unknown"]="minecraft:unknown";MinecraftBlockTypes2["UnlitRedstoneTorch"]="minecraft:unlit_redstone_torch";MinecraftBlockTypes2["UnpoweredComparator"]="minecraft:unpowered_comparator";MinecraftBlockTypes2["UnpoweredRepeater"]="minecraft:unpowered_repeater";MinecraftBlockTypes2["VerdantFroglight"]="minecraft:verdant_froglight";MinecraftBlockTypes2["Vine"]="minecraft:vine";MinecraftBlockTypes2["WallBanner"]="minecraft:wall_banner";MinecraftBlockTypes2["WallSign"]="minecraft:wall_sign";MinecraftBlockTypes2["WarpedButton"]="minecraft:warped_button";MinecraftBlockTypes2["WarpedDoor"]="minecraft:warped_door";MinecraftBlockTypes2["WarpedDoubleSlab"]="minecraft:warped_double_slab";MinecraftBlockTypes2["WarpedFence"]="minecraft:warped_fence";MinecraftBlockTypes2["WarpedFenceGate"]="minecraft:warped_fence_gate";MinecraftBlockTypes2["WarpedFungus"]="minecraft:warped_fungus";MinecraftBlockTypes2["WarpedHangingSign"]="minecraft:warped_hanging_sign";MinecraftBlockTypes2["WarpedHyphae"]="minecraft:warped_hyphae";MinecraftBlockTypes2["WarpedNylium"]="minecraft:warped_nylium";MinecraftBlockTypes2["WarpedPlanks"]="minecraft:warped_planks";MinecraftBlockTypes2["WarpedPressurePlate"]="minecraft:warped_pressure_plate";MinecraftBlockTypes2["WarpedRoots"]="minecraft:warped_roots";MinecraftBlockTypes2["WarpedSlab"]="minecraft:warped_slab";MinecraftBlockTypes2["WarpedStairs"]="minecraft:warped_stairs";MinecraftBlockTypes2["WarpedStandingSign"]="minecraft:warped_standing_sign";MinecraftBlockTypes2["WarpedStem"]="minecraft:warped_stem";MinecraftBlockTypes2["WarpedTrapdoor"]="minecraft:warped_trapdoor";MinecraftBlockTypes2["WarpedWallSign"]="minecraft:warped_wall_sign";MinecraftBlockTypes2["WarpedWartBlock"]="minecraft:warped_wart_block";MinecraftBlockTypes2["Water"]="minecraft:water";MinecraftBlockTypes2["Waterlily"]="minecraft:waterlily";MinecraftBlockTypes2["WaxedChiseledCopper"]="minecraft:waxed_chiseled_copper";MinecraftBlockTypes2["WaxedCopper"]="minecraft:waxed_copper";MinecraftBlockTypes2["WaxedCopperBulb"]="minecraft:waxed_copper_bulb";MinecraftBlockTypes2["WaxedCopperDoor"]="minecraft:waxed_copper_door";MinecraftBlockTypes2["WaxedCopperGrate"]="minecraft:waxed_copper_grate";MinecraftBlockTypes2["WaxedCopperTrapdoor"]="minecraft:waxed_copper_trapdoor";MinecraftBlockTypes2["WaxedCutCopper"]="minecraft:waxed_cut_copper";MinecraftBlockTypes2["WaxedCutCopperSlab"]="minecraft:waxed_cut_copper_slab";MinecraftBlockTypes2["WaxedCutCopperStairs"]="minecraft:waxed_cut_copper_stairs";MinecraftBlockTypes2["WaxedDoubleCutCopperSlab"]="minecraft:waxed_double_cut_copper_slab";MinecraftBlockTypes2["WaxedExposedChiseledCopper"]="minecraft:waxed_exposed_chiseled_copper";MinecraftBlockTypes2["WaxedExposedCopper"]="minecraft:waxed_exposed_copper";MinecraftBlockTypes2["WaxedExposedCopperBulb"]="minecraft:waxed_exposed_copper_bulb";MinecraftBlockTypes2["WaxedExposedCopperDoor"]="minecraft:waxed_exposed_copper_door";MinecraftBlockTypes2["WaxedExposedCopperGrate"]="minecraft:waxed_exposed_copper_grate";MinecraftBlockTypes2["WaxedExposedCopperTrapdoor"]="minecraft:waxed_exposed_copper_trapdoor";MinecraftBlockTypes2["WaxedExposedCutCopper"]="minecraft:waxed_exposed_cut_copper";MinecraftBlockTypes2["WaxedExposedCutCopperSlab"]="minecraft:waxed_exposed_cut_copper_slab";MinecraftBlockTypes2["WaxedExposedCutCopperStairs"]="minecraft:waxed_exposed_cut_copper_stairs";MinecraftBlockTypes2["WaxedExposedDoubleCutCopperSlab"]="minecraft:waxed_exposed_double_cut_copper_slab";MinecraftBlockTypes2["WaxedOxidizedChiseledCopper"]="minecraft:waxed_oxidized_chiseled_copper";MinecraftBlockTypes2["WaxedOxidizedCopper"]="minecraft:waxed_oxidized_copper";MinecraftBlockTypes2["WaxedOxidizedCopperBulb"]="minecraft:waxed_oxidized_copper_bulb";MinecraftBlockTypes2["WaxedOxidizedCopperDoor"]="minecraft:waxed_oxidized_copper_door";MinecraftBlockTypes2["WaxedOxidizedCopperGrate"]="minecraft:waxed_oxidized_copper_grate";MinecraftBlockTypes2["WaxedOxidizedCopperTrapdoor"]="minecraft:waxed_oxidized_copper_trapdoor";MinecraftBlockTypes2["WaxedOxidizedCutCopper"]="minecraft:waxed_oxidized_cut_copper";MinecraftBlockTypes2["WaxedOxidizedCutCopperSlab"]="minecraft:waxed_oxidized_cut_copper_slab";MinecraftBlockTypes2["WaxedOxidizedCutCopperStairs"]="minecraft:waxed_oxidized_cut_copper_stairs";MinecraftBlockTypes2["WaxedOxidizedDoubleCutCopperSlab"]="minecraft:waxed_oxidized_double_cut_copper_slab";MinecraftBlockTypes2["WaxedWeatheredChiseledCopper"]="minecraft:waxed_weathered_chiseled_copper";MinecraftBlockTypes2["WaxedWeatheredCopper"]="minecraft:waxed_weathered_copper";MinecraftBlockTypes2["WaxedWeatheredCopperBulb"]="minecraft:waxed_weathered_copper_bulb";MinecraftBlockTypes2["WaxedWeatheredCopperDoor"]="minecraft:waxed_weathered_copper_door";MinecraftBlockTypes2["WaxedWeatheredCopperGrate"]="minecraft:waxed_weathered_copper_grate";MinecraftBlockTypes2["WaxedWeatheredCopperTrapdoor"]="minecraft:waxed_weathered_copper_trapdoor";MinecraftBlockTypes2["WaxedWeatheredCutCopper"]="minecraft:waxed_weathered_cut_copper";MinecraftBlockTypes2["WaxedWeatheredCutCopperSlab"]="minecraft:waxed_weathered_cut_copper_slab";MinecraftBlockTypes2["WaxedWeatheredCutCopperStairs"]="minecraft:waxed_weathered_cut_copper_stairs";MinecraftBlockTypes2["WaxedWeatheredDoubleCutCopperSlab"]="minecraft:waxed_weathered_double_cut_copper_slab";MinecraftBlockTypes2["WeatheredChiseledCopper"]="minecraft:weathered_chiseled_copper";MinecraftBlockTypes2["WeatheredCopper"]="minecraft:weathered_copper";MinecraftBlockTypes2["WeatheredCopperBulb"]="minecraft:weathered_copper_bulb";MinecraftBlockTypes2["WeatheredCopperDoor"]="minecraft:weathered_copper_door";MinecraftBlockTypes2["WeatheredCopperGrate"]="minecraft:weathered_copper_grate";MinecraftBlockTypes2["WeatheredCopperTrapdoor"]="minecraft:weathered_copper_trapdoor";MinecraftBlockTypes2["WeatheredCutCopper"]="minecraft:weathered_cut_copper";MinecraftBlockTypes2["WeatheredCutCopperSlab"]="minecraft:weathered_cut_copper_slab";MinecraftBlockTypes2["WeatheredCutCopperStairs"]="minecraft:weathered_cut_copper_stairs";MinecraftBlockTypes2["WeatheredDoubleCutCopperSlab"]="minecraft:weathered_double_cut_copper_slab";MinecraftBlockTypes2["Web"]="minecraft:web";MinecraftBlockTypes2["WeepingVines"]="minecraft:weeping_vines";MinecraftBlockTypes2["Wheat"]="minecraft:wheat";MinecraftBlockTypes2["WhiteCandle"]="minecraft:white_candle";MinecraftBlockTypes2["WhiteCandleCake"]="minecraft:white_candle_cake";MinecraftBlockTypes2["WhiteCarpet"]="minecraft:white_carpet";MinecraftBlockTypes2["WhiteConcrete"]="minecraft:white_concrete";MinecraftBlockTypes2["WhiteConcretePowder"]="minecraft:white_concrete_powder";MinecraftBlockTypes2["WhiteGlazedTerracotta"]="minecraft:white_glazed_terracotta";MinecraftBlockTypes2["WhiteShulkerBox"]="minecraft:white_shulker_box";MinecraftBlockTypes2["WhiteStainedGlass"]="minecraft:white_stained_glass";MinecraftBlockTypes2["WhiteStainedGlassPane"]="minecraft:white_stained_glass_pane";MinecraftBlockTypes2["WhiteTerracotta"]="minecraft:white_terracotta";MinecraftBlockTypes2["WhiteWool"]="minecraft:white_wool";MinecraftBlockTypes2["WitherRose"]="minecraft:wither_rose";MinecraftBlockTypes2["Wood"]="minecraft:wood";MinecraftBlockTypes2["WoodenButton"]="minecraft:wooden_button";MinecraftBlockTypes2["WoodenDoor"]="minecraft:wooden_door";MinecraftBlockTypes2["WoodenPressurePlate"]="minecraft:wooden_pressure_plate";MinecraftBlockTypes2["WoodenSlab"]="minecraft:wooden_slab";MinecraftBlockTypes2["YellowCandle"]="minecraft:yellow_candle";MinecraftBlockTypes2["YellowCandleCake"]="minecraft:yellow_candle_cake";MinecraftBlockTypes2["YellowCarpet"]="minecraft:yellow_carpet";MinecraftBlockTypes2["YellowConcrete"]="minecraft:yellow_concrete";MinecraftBlockTypes2["YellowConcretePowder"]="minecraft:yellow_concrete_powder";MinecraftBlockTypes2["YellowFlower"]="minecraft:yellow_flower";MinecraftBlockTypes2["YellowGlazedTerracotta"]="minecraft:yellow_glazed_terracotta";MinecraftBlockTypes2["YellowShulkerBox"]="minecraft:yellow_shulker_box";MinecraftBlockTypes2["YellowStainedGlass"]="minecraft:yellow_stained_glass";MinecraftBlockTypes2["YellowStainedGlassPane"]="minecraft:yellow_stained_glass_pane";MinecraftBlockTypes2["YellowTerracotta"]="minecraft:yellow_terracotta";MinecraftBlockTypes2["YellowWool"]="minecraft:yellow_wool";return MinecraftBlockTypes2})(MinecraftBlockTypes||{});var MinecraftCameraPresetsTypes=(MinecraftCameraPresetsTypes2=>{MinecraftCameraPresetsTypes2["FirstPerson"]="minecraft:first_person";MinecraftCameraPresetsTypes2["Free"]="minecraft:free";MinecraftCameraPresetsTypes2["ThirdPerson"]="minecraft:third_person";MinecraftCameraPresetsTypes2["ThirdPersonFront"]="minecraft:third_person_front";return MinecraftCameraPresetsTypes2})(MinecraftCameraPresetsTypes||{});var MinecraftDimensionTypes=(MinecraftDimensionTypes2=>{MinecraftDimensionTypes2["Nether"]="minecraft:nether";MinecraftDimensionTypes2["Overworld"]="minecraft:overworld";MinecraftDimensionTypes2["TheEnd"]="minecraft:the_end";return MinecraftDimensionTypes2})(MinecraftDimensionTypes||{});var MinecraftEffectTypes=(MinecraftEffectTypes2=>{MinecraftEffectTypes2["Absorption"]="absorption";MinecraftEffectTypes2["BadOmen"]="bad_omen";MinecraftEffectTypes2["Blindness"]="blindness";MinecraftEffectTypes2["ConduitPower"]="conduit_power";MinecraftEffectTypes2["Darkness"]="darkness";MinecraftEffectTypes2["Empty"]="empty";MinecraftEffectTypes2["FatalPoison"]="fatal_poison";MinecraftEffectTypes2["FireResistance"]="fire_resistance";MinecraftEffectTypes2["Haste"]="haste";MinecraftEffectTypes2["HealthBoost"]="health_boost";MinecraftEffectTypes2["Hunger"]="hunger";MinecraftEffectTypes2["InstantDamage"]="instant_damage";MinecraftEffectTypes2["InstantHealth"]="instant_health";MinecraftEffectTypes2["Invisibility"]="invisibility";MinecraftEffectTypes2["JumpBoost"]="jump_boost";MinecraftEffectTypes2["Levitation"]="levitation";MinecraftEffectTypes2["MiningFatigue"]="mining_fatigue";MinecraftEffectTypes2["Nausea"]="nausea";MinecraftEffectTypes2["NightVision"]="night_vision";MinecraftEffectTypes2["Poison"]="poison";MinecraftEffectTypes2["Regeneration"]="regeneration";MinecraftEffectTypes2["Resistance"]="resistance";MinecraftEffectTypes2["Saturation"]="saturation";MinecraftEffectTypes2["SlowFalling"]="slow_falling";MinecraftEffectTypes2["Slowness"]="slowness";MinecraftEffectTypes2["Speed"]="speed";MinecraftEffectTypes2["Strength"]="strength";MinecraftEffectTypes2["VillageHero"]="village_hero";MinecraftEffectTypes2["WaterBreathing"]="water_breathing";MinecraftEffectTypes2["Weakness"]="weakness";MinecraftEffectTypes2["Wither"]="wither";return MinecraftEffectTypes2})(MinecraftEffectTypes||{});var MinecraftEnchantmentTypes=(MinecraftEnchantmentTypes2=>{MinecraftEnchantmentTypes2["AquaAffinity"]="aqua_affinity";MinecraftEnchantmentTypes2["BaneOfArthropods"]="bane_of_arthropods";MinecraftEnchantmentTypes2["Binding"]="binding";MinecraftEnchantmentTypes2["BlastProtection"]="blast_protection";MinecraftEnchantmentTypes2["Channeling"]="channeling";MinecraftEnchantmentTypes2["DepthStrider"]="depth_strider";MinecraftEnchantmentTypes2["Efficiency"]="efficiency";MinecraftEnchantmentTypes2["FeatherFalling"]="feather_falling";MinecraftEnchantmentTypes2["FireAspect"]="fire_aspect";MinecraftEnchantmentTypes2["FireProtection"]="fire_protection";MinecraftEnchantmentTypes2["Flame"]="flame";MinecraftEnchantmentTypes2["Fortune"]="fortune";MinecraftEnchantmentTypes2["FrostWalker"]="frost_walker";MinecraftEnchantmentTypes2["Impaling"]="impaling";MinecraftEnchantmentTypes2["Infinity"]="infinity";MinecraftEnchantmentTypes2["Knockback"]="knockback";MinecraftEnchantmentTypes2["Looting"]="looting";MinecraftEnchantmentTypes2["Loyalty"]="loyalty";MinecraftEnchantmentTypes2["LuckOfTheSea"]="luck_of_the_sea";MinecraftEnchantmentTypes2["Lure"]="lure";MinecraftEnchantmentTypes2["Mending"]="mending";MinecraftEnchantmentTypes2["Multishot"]="multishot";MinecraftEnchantmentTypes2["Piercing"]="piercing";MinecraftEnchantmentTypes2["Power"]="power";MinecraftEnchantmentTypes2["ProjectileProtection"]="projectile_protection";MinecraftEnchantmentTypes2["Protection"]="protection";MinecraftEnchantmentTypes2["Punch"]="punch";MinecraftEnchantmentTypes2["QuickCharge"]="quick_charge";MinecraftEnchantmentTypes2["Respiration"]="respiration";MinecraftEnchantmentTypes2["Riptide"]="riptide";MinecraftEnchantmentTypes2["Sharpness"]="sharpness";MinecraftEnchantmentTypes2["SilkTouch"]="silk_touch";MinecraftEnchantmentTypes2["Smite"]="smite";MinecraftEnchantmentTypes2["SoulSpeed"]="soul_speed";MinecraftEnchantmentTypes2["SwiftSneak"]="swift_sneak";MinecraftEnchantmentTypes2["Thorns"]="thorns";MinecraftEnchantmentTypes2["Unbreaking"]="unbreaking";MinecraftEnchantmentTypes2["Vanishing"]="vanishing";return MinecraftEnchantmentTypes2})(MinecraftEnchantmentTypes||{});var MinecraftEntityTypes=(MinecraftEntityTypes2=>{MinecraftEntityTypes2["Agent"]="agent";MinecraftEntityTypes2["Allay"]="allay";MinecraftEntityTypes2["AreaEffectCloud"]="area_effect_cloud";MinecraftEntityTypes2["Armadillo"]="armadillo";MinecraftEntityTypes2["ArmorStand"]="armor_stand";MinecraftEntityTypes2["Arrow"]="arrow";MinecraftEntityTypes2["Axolotl"]="axolotl";MinecraftEntityTypes2["Bat"]="bat";MinecraftEntityTypes2["Bee"]="bee";MinecraftEntityTypes2["Blaze"]="blaze";MinecraftEntityTypes2["Boat"]="boat";MinecraftEntityTypes2["Breeze"]="breeze";MinecraftEntityTypes2["Camel"]="camel";MinecraftEntityTypes2["Cat"]="cat";MinecraftEntityTypes2["CaveSpider"]="cave_spider";MinecraftEntityTypes2["ChestBoat"]="chest_boat";MinecraftEntityTypes2["ChestMinecart"]="chest_minecart";MinecraftEntityTypes2["Chicken"]="chicken";MinecraftEntityTypes2["Cod"]="cod";MinecraftEntityTypes2["CommandBlockMinecart"]="command_block_minecart";MinecraftEntityTypes2["Cow"]="cow";MinecraftEntityTypes2["Creeper"]="creeper";MinecraftEntityTypes2["Dolphin"]="dolphin";MinecraftEntityTypes2["Donkey"]="donkey";MinecraftEntityTypes2["DragonFireball"]="dragon_fireball";MinecraftEntityTypes2["Drowned"]="drowned";MinecraftEntityTypes2["Egg"]="egg";MinecraftEntityTypes2["ElderGuardian"]="elder_guardian";MinecraftEntityTypes2["EnderCrystal"]="ender_crystal";MinecraftEntityTypes2["EnderDragon"]="ender_dragon";MinecraftEntityTypes2["EnderPearl"]="ender_pearl";MinecraftEntityTypes2["Enderman"]="enderman";MinecraftEntityTypes2["Endermite"]="endermite";MinecraftEntityTypes2["EvocationIllager"]="evocation_illager";MinecraftEntityTypes2["EyeOfEnderSignal"]="eye_of_ender_signal";MinecraftEntityTypes2["Fireball"]="fireball";MinecraftEntityTypes2["FireworksRocket"]="fireworks_rocket";MinecraftEntityTypes2["FishingHook"]="fishing_hook";MinecraftEntityTypes2["Fox"]="fox";MinecraftEntityTypes2["Frog"]="frog";MinecraftEntityTypes2["Ghast"]="ghast";MinecraftEntityTypes2["GlowSquid"]="glow_squid";MinecraftEntityTypes2["Goat"]="goat";MinecraftEntityTypes2["Guardian"]="guardian";MinecraftEntityTypes2["Hoglin"]="hoglin";MinecraftEntityTypes2["HopperMinecart"]="hopper_minecart";MinecraftEntityTypes2["Horse"]="horse";MinecraftEntityTypes2["Husk"]="husk";MinecraftEntityTypes2["IronGolem"]="iron_golem";MinecraftEntityTypes2["LightningBolt"]="lightning_bolt";MinecraftEntityTypes2["LingeringPotion"]="lingering_potion";MinecraftEntityTypes2["Llama"]="llama";MinecraftEntityTypes2["LlamaSpit"]="llama_spit";MinecraftEntityTypes2["MagmaCube"]="magma_cube";MinecraftEntityTypes2["Minecart"]="minecart";MinecraftEntityTypes2["Mooshroom"]="mooshroom";MinecraftEntityTypes2["Mule"]="mule";MinecraftEntityTypes2["Npc"]="npc";MinecraftEntityTypes2["Ocelot"]="ocelot";MinecraftEntityTypes2["Panda"]="panda";MinecraftEntityTypes2["Parrot"]="parrot";MinecraftEntityTypes2["Phantom"]="phantom";MinecraftEntityTypes2["Pig"]="pig";MinecraftEntityTypes2["Piglin"]="piglin";MinecraftEntityTypes2["PiglinBrute"]="piglin_brute";MinecraftEntityTypes2["Pillager"]="pillager";MinecraftEntityTypes2["Player"]="player";MinecraftEntityTypes2["PolarBear"]="polar_bear";MinecraftEntityTypes2["Pufferfish"]="pufferfish";MinecraftEntityTypes2["Rabbit"]="rabbit";MinecraftEntityTypes2["Ravager"]="ravager";MinecraftEntityTypes2["Salmon"]="salmon";MinecraftEntityTypes2["Sheep"]="sheep";MinecraftEntityTypes2["Shulker"]="shulker";MinecraftEntityTypes2["ShulkerBullet"]="shulker_bullet";MinecraftEntityTypes2["Silverfish"]="silverfish";MinecraftEntityTypes2["Skeleton"]="skeleton";MinecraftEntityTypes2["SkeletonHorse"]="skeleton_horse";MinecraftEntityTypes2["Slime"]="slime";MinecraftEntityTypes2["SmallFireball"]="small_fireball";MinecraftEntityTypes2["Sniffer"]="sniffer";MinecraftEntityTypes2["SnowGolem"]="snow_golem";MinecraftEntityTypes2["Snowball"]="snowball";MinecraftEntityTypes2["Spider"]="spider";MinecraftEntityTypes2["SplashPotion"]="splash_potion";MinecraftEntityTypes2["Squid"]="squid";MinecraftEntityTypes2["Stray"]="stray";MinecraftEntityTypes2["Strider"]="strider";MinecraftEntityTypes2["Tadpole"]="tadpole";MinecraftEntityTypes2["ThrownTrident"]="thrown_trident";MinecraftEntityTypes2["Tnt"]="tnt";MinecraftEntityTypes2["TntMinecart"]="tnt_minecart";MinecraftEntityTypes2["TraderLlama"]="trader_llama";MinecraftEntityTypes2["TripodCamera"]="tripod_camera";MinecraftEntityTypes2["Tropicalfish"]="tropicalfish";MinecraftEntityTypes2["Turtle"]="turtle";MinecraftEntityTypes2["Vex"]="vex";MinecraftEntityTypes2["Villager"]="villager";MinecraftEntityTypes2["VillagerV2"]="villager_v2";MinecraftEntityTypes2["Vindicator"]="vindicator";MinecraftEntityTypes2["WanderingTrader"]="wandering_trader";MinecraftEntityTypes2["Warden"]="warden";MinecraftEntityTypes2["WindChargeProjectile"]="wind_charge_projectile";MinecraftEntityTypes2["Witch"]="witch";MinecraftEntityTypes2["Wither"]="wither";MinecraftEntityTypes2["WitherSkeleton"]="wither_skeleton";MinecraftEntityTypes2["WitherSkull"]="wither_skull";MinecraftEntityTypes2["WitherSkullDangerous"]="wither_skull_dangerous";MinecraftEntityTypes2["Wolf"]="wolf";MinecraftEntityTypes2["XpBottle"]="xp_bottle";MinecraftEntityTypes2["XpOrb"]="xp_orb";MinecraftEntityTypes2["Zoglin"]="zoglin";MinecraftEntityTypes2["Zombie"]="zombie";MinecraftEntityTypes2["ZombieHorse"]="zombie_horse";MinecraftEntityTypes2["ZombiePigman"]="zombie_pigman";MinecraftEntityTypes2["ZombieVillager"]="zombie_villager";MinecraftEntityTypes2["ZombieVillagerV2"]="zombie_villager_v2";return MinecraftEntityTypes2})(MinecraftEntityTypes||{});var MinecraftFeatureTypes=(MinecraftFeatureTypes2=>{MinecraftFeatureTypes2["AncientCity"]="minecraft:ancient_city";MinecraftFeatureTypes2["BastionRemnant"]="minecraft:bastion_remnant";MinecraftFeatureTypes2["BuriedTreasure"]="minecraft:buried_treasure";MinecraftFeatureTypes2["EndCity"]="minecraft:end_city";MinecraftFeatureTypes2["Fortress"]="minecraft:fortress";MinecraftFeatureTypes2["Mansion"]="minecraft:mansion";MinecraftFeatureTypes2["Mineshaft"]="minecraft:mineshaft";MinecraftFeatureTypes2["Monument"]="minecraft:monument";MinecraftFeatureTypes2["PillagerOutpost"]="minecraft:pillager_outpost";MinecraftFeatureTypes2["RuinedPortal"]="minecraft:ruined_portal";MinecraftFeatureTypes2["Ruins"]="minecraft:ruins";MinecraftFeatureTypes2["Shipwreck"]="minecraft:shipwreck";MinecraftFeatureTypes2["Stronghold"]="minecraft:stronghold";MinecraftFeatureTypes2["Temple"]="minecraft:temple";MinecraftFeatureTypes2["TrailRuins"]="minecraft:trail_ruins";MinecraftFeatureTypes2["TrialChambers"]="minecraft:trial_chambers";MinecraftFeatureTypes2["Village"]="minecraft:village";return MinecraftFeatureTypes2})(MinecraftFeatureTypes||{});var MinecraftItemTypes=(MinecraftItemTypes2=>{MinecraftItemTypes2["AcaciaBoat"]="minecraft:acacia_boat";MinecraftItemTypes2["AcaciaButton"]="minecraft:acacia_button";MinecraftItemTypes2["AcaciaChestBoat"]="minecraft:acacia_chest_boat";MinecraftItemTypes2["AcaciaDoor"]="minecraft:acacia_door";MinecraftItemTypes2["AcaciaFence"]="minecraft:acacia_fence";MinecraftItemTypes2["AcaciaFenceGate"]="minecraft:acacia_fence_gate";MinecraftItemTypes2["AcaciaHangingSign"]="minecraft:acacia_hanging_sign";MinecraftItemTypes2["AcaciaLog"]="minecraft:acacia_log";MinecraftItemTypes2["AcaciaPlanks"]="minecraft:acacia_planks";MinecraftItemTypes2["AcaciaPressurePlate"]="minecraft:acacia_pressure_plate";MinecraftItemTypes2["AcaciaSign"]="minecraft:acacia_sign";MinecraftItemTypes2["AcaciaStairs"]="minecraft:acacia_stairs";MinecraftItemTypes2["AcaciaTrapdoor"]="minecraft:acacia_trapdoor";MinecraftItemTypes2["ActivatorRail"]="minecraft:activator_rail";MinecraftItemTypes2["AllaySpawnEgg"]="minecraft:allay_spawn_egg";MinecraftItemTypes2["Allow"]="minecraft:allow";MinecraftItemTypes2["AmethystBlock"]="minecraft:amethyst_block";MinecraftItemTypes2["AmethystCluster"]="minecraft:amethyst_cluster";MinecraftItemTypes2["AmethystShard"]="minecraft:amethyst_shard";MinecraftItemTypes2["AncientDebris"]="minecraft:ancient_debris";MinecraftItemTypes2["Andesite"]="minecraft:andesite";MinecraftItemTypes2["AndesiteStairs"]="minecraft:andesite_stairs";MinecraftItemTypes2["AnglerPotterySherd"]="minecraft:angler_pottery_sherd";MinecraftItemTypes2["Anvil"]="minecraft:anvil";MinecraftItemTypes2["Apple"]="minecraft:apple";MinecraftItemTypes2["ArcherPotterySherd"]="minecraft:archer_pottery_sherd";MinecraftItemTypes2["ArmadilloScute"]="minecraft:armadillo_scute";MinecraftItemTypes2["ArmadilloSpawnEgg"]="minecraft:armadillo_spawn_egg";MinecraftItemTypes2["ArmorStand"]="minecraft:armor_stand";MinecraftItemTypes2["ArmsUpPotterySherd"]="minecraft:arms_up_pottery_sherd";MinecraftItemTypes2["Arrow"]="minecraft:arrow";MinecraftItemTypes2["AxolotlBucket"]="minecraft:axolotl_bucket";MinecraftItemTypes2["AxolotlSpawnEgg"]="minecraft:axolotl_spawn_egg";MinecraftItemTypes2["Azalea"]="minecraft:azalea";MinecraftItemTypes2["AzaleaLeaves"]="minecraft:azalea_leaves";MinecraftItemTypes2["AzaleaLeavesFlowered"]="minecraft:azalea_leaves_flowered";MinecraftItemTypes2["BakedPotato"]="minecraft:baked_potato";MinecraftItemTypes2["Bamboo"]="minecraft:bamboo";MinecraftItemTypes2["BambooBlock"]="minecraft:bamboo_block";MinecraftItemTypes2["BambooButton"]="minecraft:bamboo_button";MinecraftItemTypes2["BambooChestRaft"]="minecraft:bamboo_chest_raft";MinecraftItemTypes2["BambooDoor"]="minecraft:bamboo_door";MinecraftItemTypes2["BambooFence"]="minecraft:bamboo_fence";MinecraftItemTypes2["BambooFenceGate"]="minecraft:bamboo_fence_gate";MinecraftItemTypes2["BambooHangingSign"]="minecraft:bamboo_hanging_sign";MinecraftItemTypes2["BambooMosaic"]="minecraft:bamboo_mosaic";MinecraftItemTypes2["BambooMosaicSlab"]="minecraft:bamboo_mosaic_slab";MinecraftItemTypes2["BambooMosaicStairs"]="minecraft:bamboo_mosaic_stairs";MinecraftItemTypes2["BambooPlanks"]="minecraft:bamboo_planks";MinecraftItemTypes2["BambooPressurePlate"]="minecraft:bamboo_pressure_plate";MinecraftItemTypes2["BambooRaft"]="minecraft:bamboo_raft";MinecraftItemTypes2["BambooSign"]="minecraft:bamboo_sign";MinecraftItemTypes2["BambooSlab"]="minecraft:bamboo_slab";MinecraftItemTypes2["BambooStairs"]="minecraft:bamboo_stairs";MinecraftItemTypes2["BambooTrapdoor"]="minecraft:bamboo_trapdoor";MinecraftItemTypes2["Banner"]="minecraft:banner";MinecraftItemTypes2["BannerPattern"]="minecraft:banner_pattern";MinecraftItemTypes2["Barrel"]="minecraft:barrel";MinecraftItemTypes2["Barrier"]="minecraft:barrier";MinecraftItemTypes2["Basalt"]="minecraft:basalt";MinecraftItemTypes2["BatSpawnEgg"]="minecraft:bat_spawn_egg";MinecraftItemTypes2["Beacon"]="minecraft:beacon";MinecraftItemTypes2["Bed"]="minecraft:bed";MinecraftItemTypes2["Bedrock"]="minecraft:bedrock";MinecraftItemTypes2["BeeNest"]="minecraft:bee_nest";MinecraftItemTypes2["BeeSpawnEgg"]="minecraft:bee_spawn_egg";MinecraftItemTypes2["Beef"]="minecraft:beef";MinecraftItemTypes2["Beehive"]="minecraft:beehive";MinecraftItemTypes2["Beetroot"]="minecraft:beetroot";MinecraftItemTypes2["BeetrootSeeds"]="minecraft:beetroot_seeds";MinecraftItemTypes2["BeetrootSoup"]="minecraft:beetroot_soup";MinecraftItemTypes2["Bell"]="minecraft:bell";MinecraftItemTypes2["BigDripleaf"]="minecraft:big_dripleaf";MinecraftItemTypes2["BirchBoat"]="minecraft:birch_boat";MinecraftItemTypes2["BirchButton"]="minecraft:birch_button";MinecraftItemTypes2["BirchChestBoat"]="minecraft:birch_chest_boat";MinecraftItemTypes2["BirchDoor"]="minecraft:birch_door";MinecraftItemTypes2["BirchFence"]="minecraft:birch_fence";MinecraftItemTypes2["BirchFenceGate"]="minecraft:birch_fence_gate";MinecraftItemTypes2["BirchHangingSign"]="minecraft:birch_hanging_sign";MinecraftItemTypes2["BirchLog"]="minecraft:birch_log";MinecraftItemTypes2["BirchPlanks"]="minecraft:birch_planks";MinecraftItemTypes2["BirchPressurePlate"]="minecraft:birch_pressure_plate";MinecraftItemTypes2["BirchSign"]="minecraft:birch_sign";MinecraftItemTypes2["BirchStairs"]="minecraft:birch_stairs";MinecraftItemTypes2["BirchTrapdoor"]="minecraft:birch_trapdoor";MinecraftItemTypes2["BlackCandle"]="minecraft:black_candle";MinecraftItemTypes2["BlackCarpet"]="minecraft:black_carpet";MinecraftItemTypes2["BlackConcrete"]="minecraft:black_concrete";MinecraftItemTypes2["BlackConcretePowder"]="minecraft:black_concrete_powder";MinecraftItemTypes2["BlackDye"]="minecraft:black_dye";MinecraftItemTypes2["BlackGlazedTerracotta"]="minecraft:black_glazed_terracotta";MinecraftItemTypes2["BlackShulkerBox"]="minecraft:black_shulker_box";MinecraftItemTypes2["BlackStainedGlass"]="minecraft:black_stained_glass";MinecraftItemTypes2["BlackStainedGlassPane"]="minecraft:black_stained_glass_pane";MinecraftItemTypes2["BlackTerracotta"]="minecraft:black_terracotta";MinecraftItemTypes2["BlackWool"]="minecraft:black_wool";MinecraftItemTypes2["Blackstone"]="minecraft:blackstone";MinecraftItemTypes2["BlackstoneSlab"]="minecraft:blackstone_slab";MinecraftItemTypes2["BlackstoneStairs"]="minecraft:blackstone_stairs";MinecraftItemTypes2["BlackstoneWall"]="minecraft:blackstone_wall";MinecraftItemTypes2["BladePotterySherd"]="minecraft:blade_pottery_sherd";MinecraftItemTypes2["BlastFurnace"]="minecraft:blast_furnace";MinecraftItemTypes2["BlazePowder"]="minecraft:blaze_powder";MinecraftItemTypes2["BlazeRod"]="minecraft:blaze_rod";MinecraftItemTypes2["BlazeSpawnEgg"]="minecraft:blaze_spawn_egg";MinecraftItemTypes2["BlueCandle"]="minecraft:blue_candle";MinecraftItemTypes2["BlueCarpet"]="minecraft:blue_carpet";MinecraftItemTypes2["BlueConcrete"]="minecraft:blue_concrete";MinecraftItemTypes2["BlueConcretePowder"]="minecraft:blue_concrete_powder";MinecraftItemTypes2["BlueDye"]="minecraft:blue_dye";MinecraftItemTypes2["BlueGlazedTerracotta"]="minecraft:blue_glazed_terracotta";MinecraftItemTypes2["BlueIce"]="minecraft:blue_ice";MinecraftItemTypes2["BlueShulkerBox"]="minecraft:blue_shulker_box";MinecraftItemTypes2["BlueStainedGlass"]="minecraft:blue_stained_glass";MinecraftItemTypes2["BlueStainedGlassPane"]="minecraft:blue_stained_glass_pane";MinecraftItemTypes2["BlueTerracotta"]="minecraft:blue_terracotta";MinecraftItemTypes2["BlueWool"]="minecraft:blue_wool";MinecraftItemTypes2["Boat"]="minecraft:boat";MinecraftItemTypes2["Bone"]="minecraft:bone";MinecraftItemTypes2["BoneBlock"]="minecraft:bone_block";MinecraftItemTypes2["BoneMeal"]="minecraft:bone_meal";MinecraftItemTypes2["Book"]="minecraft:book";MinecraftItemTypes2["Bookshelf"]="minecraft:bookshelf";MinecraftItemTypes2["BorderBlock"]="minecraft:border_block";MinecraftItemTypes2["BordureIndentedBannerPattern"]="minecraft:bordure_indented_banner_pattern";MinecraftItemTypes2["Bow"]="minecraft:bow";MinecraftItemTypes2["Bowl"]="minecraft:bowl";MinecraftItemTypes2["BrainCoral"]="minecraft:brain_coral";MinecraftItemTypes2["Bread"]="minecraft:bread";MinecraftItemTypes2["BreezeSpawnEgg"]="minecraft:breeze_spawn_egg";MinecraftItemTypes2["BrewerPotterySherd"]="minecraft:brewer_pottery_sherd";MinecraftItemTypes2["BrewingStand"]="minecraft:brewing_stand";MinecraftItemTypes2["Brick"]="minecraft:brick";MinecraftItemTypes2["BrickBlock"]="minecraft:brick_block";MinecraftItemTypes2["BrickStairs"]="minecraft:brick_stairs";MinecraftItemTypes2["BrownCandle"]="minecraft:brown_candle";MinecraftItemTypes2["BrownCarpet"]="minecraft:brown_carpet";MinecraftItemTypes2["BrownConcrete"]="minecraft:brown_concrete";MinecraftItemTypes2["BrownConcretePowder"]="minecraft:brown_concrete_powder";MinecraftItemTypes2["BrownDye"]="minecraft:brown_dye";MinecraftItemTypes2["BrownGlazedTerracotta"]="minecraft:brown_glazed_terracotta";MinecraftItemTypes2["BrownMushroom"]="minecraft:brown_mushroom";MinecraftItemTypes2["BrownMushroomBlock"]="minecraft:brown_mushroom_block";MinecraftItemTypes2["BrownShulkerBox"]="minecraft:brown_shulker_box";MinecraftItemTypes2["BrownStainedGlass"]="minecraft:brown_stained_glass";MinecraftItemTypes2["BrownStainedGlassPane"]="minecraft:brown_stained_glass_pane";MinecraftItemTypes2["BrownTerracotta"]="minecraft:brown_terracotta";MinecraftItemTypes2["BrownWool"]="minecraft:brown_wool";MinecraftItemTypes2["Brush"]="minecraft:brush";MinecraftItemTypes2["BubbleCoral"]="minecraft:bubble_coral";MinecraftItemTypes2["Bucket"]="minecraft:bucket";MinecraftItemTypes2["BuddingAmethyst"]="minecraft:budding_amethyst";MinecraftItemTypes2["BurnPotterySherd"]="minecraft:burn_pottery_sherd";MinecraftItemTypes2["Cactus"]="minecraft:cactus";MinecraftItemTypes2["Cake"]="minecraft:cake";MinecraftItemTypes2["Calcite"]="minecraft:calcite";MinecraftItemTypes2["CalibratedSculkSensor"]="minecraft:calibrated_sculk_sensor";MinecraftItemTypes2["CamelSpawnEgg"]="minecraft:camel_spawn_egg";MinecraftItemTypes2["Campfire"]="minecraft:campfire";MinecraftItemTypes2["Candle"]="minecraft:candle";MinecraftItemTypes2["Carpet"]="minecraft:carpet";MinecraftItemTypes2["Carrot"]="minecraft:carrot";MinecraftItemTypes2["CarrotOnAStick"]="minecraft:carrot_on_a_stick";MinecraftItemTypes2["CartographyTable"]="minecraft:cartography_table";MinecraftItemTypes2["CarvedPumpkin"]="minecraft:carved_pumpkin";MinecraftItemTypes2["CatSpawnEgg"]="minecraft:cat_spawn_egg";MinecraftItemTypes2["Cauldron"]="minecraft:cauldron";MinecraftItemTypes2["CaveSpiderSpawnEgg"]="minecraft:cave_spider_spawn_egg";MinecraftItemTypes2["Chain"]="minecraft:chain";MinecraftItemTypes2["ChainCommandBlock"]="minecraft:chain_command_block";MinecraftItemTypes2["ChainmailBoots"]="minecraft:chainmail_boots";MinecraftItemTypes2["ChainmailChestplate"]="minecraft:chainmail_chestplate";MinecraftItemTypes2["ChainmailHelmet"]="minecraft:chainmail_helmet";MinecraftItemTypes2["ChainmailLeggings"]="minecraft:chainmail_leggings";MinecraftItemTypes2["Charcoal"]="minecraft:charcoal";MinecraftItemTypes2["CherryBoat"]="minecraft:cherry_boat";MinecraftItemTypes2["CherryButton"]="minecraft:cherry_button";MinecraftItemTypes2["CherryChestBoat"]="minecraft:cherry_chest_boat";MinecraftItemTypes2["CherryDoor"]="minecraft:cherry_door";MinecraftItemTypes2["CherryFence"]="minecraft:cherry_fence";MinecraftItemTypes2["CherryFenceGate"]="minecraft:cherry_fence_gate";MinecraftItemTypes2["CherryHangingSign"]="minecraft:cherry_hanging_sign";MinecraftItemTypes2["CherryLeaves"]="minecraft:cherry_leaves";MinecraftItemTypes2["CherryLog"]="minecraft:cherry_log";MinecraftItemTypes2["CherryPlanks"]="minecraft:cherry_planks";MinecraftItemTypes2["CherryPressurePlate"]="minecraft:cherry_pressure_plate";MinecraftItemTypes2["CherrySapling"]="minecraft:cherry_sapling";MinecraftItemTypes2["CherrySign"]="minecraft:cherry_sign";MinecraftItemTypes2["CherrySlab"]="minecraft:cherry_slab";MinecraftItemTypes2["CherryStairs"]="minecraft:cherry_stairs";MinecraftItemTypes2["CherryTrapdoor"]="minecraft:cherry_trapdoor";MinecraftItemTypes2["CherryWood"]="minecraft:cherry_wood";MinecraftItemTypes2["Chest"]="minecraft:chest";MinecraftItemTypes2["ChestBoat"]="minecraft:chest_boat";MinecraftItemTypes2["ChestMinecart"]="minecraft:chest_minecart";MinecraftItemTypes2["Chicken"]="minecraft:chicken";MinecraftItemTypes2["ChickenSpawnEgg"]="minecraft:chicken_spawn_egg";MinecraftItemTypes2["ChiseledBookshelf"]="minecraft:chiseled_bookshelf";MinecraftItemTypes2["ChiseledCopper"]="minecraft:chiseled_copper";MinecraftItemTypes2["ChiseledDeepslate"]="minecraft:chiseled_deepslate";MinecraftItemTypes2["ChiseledNetherBricks"]="minecraft:chiseled_nether_bricks";MinecraftItemTypes2["ChiseledPolishedBlackstone"]="minecraft:chiseled_polished_blackstone";MinecraftItemTypes2["ChiseledTuff"]="minecraft:chiseled_tuff";MinecraftItemTypes2["ChiseledTuffBricks"]="minecraft:chiseled_tuff_bricks";MinecraftItemTypes2["ChorusFlower"]="minecraft:chorus_flower";MinecraftItemTypes2["ChorusFruit"]="minecraft:chorus_fruit";MinecraftItemTypes2["ChorusPlant"]="minecraft:chorus_plant";MinecraftItemTypes2["Clay"]="minecraft:clay";MinecraftItemTypes2["ClayBall"]="minecraft:clay_ball";MinecraftItemTypes2["Clock"]="minecraft:clock";MinecraftItemTypes2["Coal"]="minecraft:coal";MinecraftItemTypes2["CoalBlock"]="minecraft:coal_block";MinecraftItemTypes2["CoalOre"]="minecraft:coal_ore";MinecraftItemTypes2["CoastArmorTrimSmithingTemplate"]="minecraft:coast_armor_trim_smithing_template";MinecraftItemTypes2["CobbledDeepslate"]="minecraft:cobbled_deepslate";MinecraftItemTypes2["CobbledDeepslateSlab"]="minecraft:cobbled_deepslate_slab";MinecraftItemTypes2["CobbledDeepslateStairs"]="minecraft:cobbled_deepslate_stairs";MinecraftItemTypes2["CobbledDeepslateWall"]="minecraft:cobbled_deepslate_wall";MinecraftItemTypes2["Cobblestone"]="minecraft:cobblestone";MinecraftItemTypes2["CobblestoneWall"]="minecraft:cobblestone_wall";MinecraftItemTypes2["CocoaBeans"]="minecraft:cocoa_beans";MinecraftItemTypes2["Cod"]="minecraft:cod";MinecraftItemTypes2["CodBucket"]="minecraft:cod_bucket";MinecraftItemTypes2["CodSpawnEgg"]="minecraft:cod_spawn_egg";MinecraftItemTypes2["CommandBlock"]="minecraft:command_block";MinecraftItemTypes2["CommandBlockMinecart"]="minecraft:command_block_minecart";MinecraftItemTypes2["Comparator"]="minecraft:comparator";MinecraftItemTypes2["Compass"]="minecraft:compass";MinecraftItemTypes2["Composter"]="minecraft:composter";MinecraftItemTypes2["Concrete"]="minecraft:concrete";MinecraftItemTypes2["ConcretePowder"]="minecraft:concrete_powder";MinecraftItemTypes2["Conduit"]="minecraft:conduit";MinecraftItemTypes2["CookedBeef"]="minecraft:cooked_beef";MinecraftItemTypes2["CookedChicken"]="minecraft:cooked_chicken";MinecraftItemTypes2["CookedCod"]="minecraft:cooked_cod";MinecraftItemTypes2["CookedMutton"]="minecraft:cooked_mutton";MinecraftItemTypes2["CookedPorkchop"]="minecraft:cooked_porkchop";MinecraftItemTypes2["CookedRabbit"]="minecraft:cooked_rabbit";MinecraftItemTypes2["CookedSalmon"]="minecraft:cooked_salmon";MinecraftItemTypes2["Cookie"]="minecraft:cookie";MinecraftItemTypes2["CopperBlock"]="minecraft:copper_block";MinecraftItemTypes2["CopperBulb"]="minecraft:copper_bulb";MinecraftItemTypes2["CopperDoor"]="minecraft:copper_door";MinecraftItemTypes2["CopperGrate"]="minecraft:copper_grate";MinecraftItemTypes2["CopperIngot"]="minecraft:copper_ingot";MinecraftItemTypes2["CopperOre"]="minecraft:copper_ore";MinecraftItemTypes2["CopperTrapdoor"]="minecraft:copper_trapdoor";MinecraftItemTypes2["Coral"]="minecraft:coral";MinecraftItemTypes2["CoralBlock"]="minecraft:coral_block";MinecraftItemTypes2["CoralFan"]="minecraft:coral_fan";MinecraftItemTypes2["CoralFanDead"]="minecraft:coral_fan_dead";MinecraftItemTypes2["CowSpawnEgg"]="minecraft:cow_spawn_egg";MinecraftItemTypes2["CrackedDeepslateBricks"]="minecraft:cracked_deepslate_bricks";MinecraftItemTypes2["CrackedDeepslateTiles"]="minecraft:cracked_deepslate_tiles";MinecraftItemTypes2["CrackedNetherBricks"]="minecraft:cracked_nether_bricks";MinecraftItemTypes2["CrackedPolishedBlackstoneBricks"]="minecraft:cracked_polished_blackstone_bricks";MinecraftItemTypes2["Crafter"]="minecraft:crafter";MinecraftItemTypes2["CraftingTable"]="minecraft:crafting_table";MinecraftItemTypes2["CreeperBannerPattern"]="minecraft:creeper_banner_pattern";MinecraftItemTypes2["CreeperSpawnEgg"]="minecraft:creeper_spawn_egg";MinecraftItemTypes2["CrimsonButton"]="minecraft:crimson_button";MinecraftItemTypes2["CrimsonDoor"]="minecraft:crimson_door";MinecraftItemTypes2["CrimsonFence"]="minecraft:crimson_fence";MinecraftItemTypes2["CrimsonFenceGate"]="minecraft:crimson_fence_gate";MinecraftItemTypes2["CrimsonFungus"]="minecraft:crimson_fungus";MinecraftItemTypes2["CrimsonHangingSign"]="minecraft:crimson_hanging_sign";MinecraftItemTypes2["CrimsonHyphae"]="minecraft:crimson_hyphae";MinecraftItemTypes2["CrimsonNylium"]="minecraft:crimson_nylium";MinecraftItemTypes2["CrimsonPlanks"]="minecraft:crimson_planks";MinecraftItemTypes2["CrimsonPressurePlate"]="minecraft:crimson_pressure_plate";MinecraftItemTypes2["CrimsonRoots"]="minecraft:crimson_roots";MinecraftItemTypes2["CrimsonSign"]="minecraft:crimson_sign";MinecraftItemTypes2["CrimsonSlab"]="minecraft:crimson_slab";MinecraftItemTypes2["CrimsonStairs"]="minecraft:crimson_stairs";MinecraftItemTypes2["CrimsonStem"]="minecraft:crimson_stem";MinecraftItemTypes2["CrimsonTrapdoor"]="minecraft:crimson_trapdoor";MinecraftItemTypes2["Crossbow"]="minecraft:crossbow";MinecraftItemTypes2["CryingObsidian"]="minecraft:crying_obsidian";MinecraftItemTypes2["CutCopper"]="minecraft:cut_copper";MinecraftItemTypes2["CutCopperSlab"]="minecraft:cut_copper_slab";MinecraftItemTypes2["CutCopperStairs"]="minecraft:cut_copper_stairs";MinecraftItemTypes2["CyanCandle"]="minecraft:cyan_candle";MinecraftItemTypes2["CyanCarpet"]="minecraft:cyan_carpet";MinecraftItemTypes2["CyanConcrete"]="minecraft:cyan_concrete";MinecraftItemTypes2["CyanConcretePowder"]="minecraft:cyan_concrete_powder";MinecraftItemTypes2["CyanDye"]="minecraft:cyan_dye";MinecraftItemTypes2["CyanGlazedTerracotta"]="minecraft:cyan_glazed_terracotta";MinecraftItemTypes2["CyanShulkerBox"]="minecraft:cyan_shulker_box";MinecraftItemTypes2["CyanStainedGlass"]="minecraft:cyan_stained_glass";MinecraftItemTypes2["CyanStainedGlassPane"]="minecraft:cyan_stained_glass_pane";MinecraftItemTypes2["CyanTerracotta"]="minecraft:cyan_terracotta";MinecraftItemTypes2["CyanWool"]="minecraft:cyan_wool";MinecraftItemTypes2["DangerPotterySherd"]="minecraft:danger_pottery_sherd";MinecraftItemTypes2["DarkOakBoat"]="minecraft:dark_oak_boat";MinecraftItemTypes2["DarkOakButton"]="minecraft:dark_oak_button";MinecraftItemTypes2["DarkOakChestBoat"]="minecraft:dark_oak_chest_boat";MinecraftItemTypes2["DarkOakDoor"]="minecraft:dark_oak_door";MinecraftItemTypes2["DarkOakFence"]="minecraft:dark_oak_fence";MinecraftItemTypes2["DarkOakFenceGate"]="minecraft:dark_oak_fence_gate";MinecraftItemTypes2["DarkOakHangingSign"]="minecraft:dark_oak_hanging_sign";MinecraftItemTypes2["DarkOakLog"]="minecraft:dark_oak_log";MinecraftItemTypes2["DarkOakPlanks"]="minecraft:dark_oak_planks";MinecraftItemTypes2["DarkOakPressurePlate"]="minecraft:dark_oak_pressure_plate";MinecraftItemTypes2["DarkOakSign"]="minecraft:dark_oak_sign";MinecraftItemTypes2["DarkOakStairs"]="minecraft:dark_oak_stairs";MinecraftItemTypes2["DarkOakTrapdoor"]="minecraft:dark_oak_trapdoor";MinecraftItemTypes2["DarkPrismarineStairs"]="minecraft:dark_prismarine_stairs";MinecraftItemTypes2["DaylightDetector"]="minecraft:daylight_detector";MinecraftItemTypes2["DeadBrainCoral"]="minecraft:dead_brain_coral";MinecraftItemTypes2["DeadBubbleCoral"]="minecraft:dead_bubble_coral";MinecraftItemTypes2["DeadFireCoral"]="minecraft:dead_fire_coral";MinecraftItemTypes2["DeadHornCoral"]="minecraft:dead_horn_coral";MinecraftItemTypes2["DeadTubeCoral"]="minecraft:dead_tube_coral";MinecraftItemTypes2["Deadbush"]="minecraft:deadbush";MinecraftItemTypes2["DecoratedPot"]="minecraft:decorated_pot";MinecraftItemTypes2["Deepslate"]="minecraft:deepslate";MinecraftItemTypes2["DeepslateBrickSlab"]="minecraft:deepslate_brick_slab";MinecraftItemTypes2["DeepslateBrickStairs"]="minecraft:deepslate_brick_stairs";MinecraftItemTypes2["DeepslateBrickWall"]="minecraft:deepslate_brick_wall";MinecraftItemTypes2["DeepslateBricks"]="minecraft:deepslate_bricks";MinecraftItemTypes2["DeepslateCoalOre"]="minecraft:deepslate_coal_ore";MinecraftItemTypes2["DeepslateCopperOre"]="minecraft:deepslate_copper_ore";MinecraftItemTypes2["DeepslateDiamondOre"]="minecraft:deepslate_diamond_ore";MinecraftItemTypes2["DeepslateEmeraldOre"]="minecraft:deepslate_emerald_ore";MinecraftItemTypes2["DeepslateGoldOre"]="minecraft:deepslate_gold_ore";MinecraftItemTypes2["DeepslateIronOre"]="minecraft:deepslate_iron_ore";MinecraftItemTypes2["DeepslateLapisOre"]="minecraft:deepslate_lapis_ore";MinecraftItemTypes2["DeepslateRedstoneOre"]="minecraft:deepslate_redstone_ore";MinecraftItemTypes2["DeepslateTileSlab"]="minecraft:deepslate_tile_slab";MinecraftItemTypes2["DeepslateTileStairs"]="minecraft:deepslate_tile_stairs";MinecraftItemTypes2["DeepslateTileWall"]="minecraft:deepslate_tile_wall";MinecraftItemTypes2["DeepslateTiles"]="minecraft:deepslate_tiles";MinecraftItemTypes2["Deny"]="minecraft:deny";MinecraftItemTypes2["DetectorRail"]="minecraft:detector_rail";MinecraftItemTypes2["Diamond"]="minecraft:diamond";MinecraftItemTypes2["DiamondAxe"]="minecraft:diamond_axe";MinecraftItemTypes2["DiamondBlock"]="minecraft:diamond_block";MinecraftItemTypes2["DiamondBoots"]="minecraft:diamond_boots";MinecraftItemTypes2["DiamondChestplate"]="minecraft:diamond_chestplate";MinecraftItemTypes2["DiamondHelmet"]="minecraft:diamond_helmet";MinecraftItemTypes2["DiamondHoe"]="minecraft:diamond_hoe";MinecraftItemTypes2["DiamondHorseArmor"]="minecraft:diamond_horse_armor";MinecraftItemTypes2["DiamondLeggings"]="minecraft:diamond_leggings";MinecraftItemTypes2["DiamondOre"]="minecraft:diamond_ore";MinecraftItemTypes2["DiamondPickaxe"]="minecraft:diamond_pickaxe";MinecraftItemTypes2["DiamondShovel"]="minecraft:diamond_shovel";MinecraftItemTypes2["DiamondSword"]="minecraft:diamond_sword";MinecraftItemTypes2["Diorite"]="minecraft:diorite";MinecraftItemTypes2["DioriteStairs"]="minecraft:diorite_stairs";MinecraftItemTypes2["Dirt"]="minecraft:dirt";MinecraftItemTypes2["DirtWithRoots"]="minecraft:dirt_with_roots";MinecraftItemTypes2["DiscFragment5"]="minecraft:disc_fragment_5";MinecraftItemTypes2["Dispenser"]="minecraft:dispenser";MinecraftItemTypes2["DolphinSpawnEgg"]="minecraft:dolphin_spawn_egg";MinecraftItemTypes2["DonkeySpawnEgg"]="minecraft:donkey_spawn_egg";MinecraftItemTypes2["DoublePlant"]="minecraft:double_plant";MinecraftItemTypes2["DragonBreath"]="minecraft:dragon_breath";MinecraftItemTypes2["DragonEgg"]="minecraft:dragon_egg";MinecraftItemTypes2["DriedKelp"]="minecraft:dried_kelp";MinecraftItemTypes2["DriedKelpBlock"]="minecraft:dried_kelp_block";MinecraftItemTypes2["DripstoneBlock"]="minecraft:dripstone_block";MinecraftItemTypes2["Dropper"]="minecraft:dropper";MinecraftItemTypes2["DrownedSpawnEgg"]="minecraft:drowned_spawn_egg";MinecraftItemTypes2["DuneArmorTrimSmithingTemplate"]="minecraft:dune_armor_trim_smithing_template";MinecraftItemTypes2["Dye"]="minecraft:dye";MinecraftItemTypes2["EchoShard"]="minecraft:echo_shard";MinecraftItemTypes2["Egg"]="minecraft:egg";MinecraftItemTypes2["ElderGuardianSpawnEgg"]="minecraft:elder_guardian_spawn_egg";MinecraftItemTypes2["Elytra"]="minecraft:elytra";MinecraftItemTypes2["Emerald"]="minecraft:emerald";MinecraftItemTypes2["EmeraldBlock"]="minecraft:emerald_block";MinecraftItemTypes2["EmeraldOre"]="minecraft:emerald_ore";MinecraftItemTypes2["EmptyMap"]="minecraft:empty_map";MinecraftItemTypes2["EnchantedBook"]="minecraft:enchanted_book";MinecraftItemTypes2["EnchantedGoldenApple"]="minecraft:enchanted_golden_apple";MinecraftItemTypes2["EnchantingTable"]="minecraft:enchanting_table";MinecraftItemTypes2["EndBrickStairs"]="minecraft:end_brick_stairs";MinecraftItemTypes2["EndBricks"]="minecraft:end_bricks";MinecraftItemTypes2["EndCrystal"]="minecraft:end_crystal";MinecraftItemTypes2["EndPortalFrame"]="minecraft:end_portal_frame";MinecraftItemTypes2["EndRod"]="minecraft:end_rod";MinecraftItemTypes2["EndStone"]="minecraft:end_stone";MinecraftItemTypes2["EnderChest"]="minecraft:ender_chest";MinecraftItemTypes2["EnderDragonSpawnEgg"]="minecraft:ender_dragon_spawn_egg";MinecraftItemTypes2["EnderEye"]="minecraft:ender_eye";MinecraftItemTypes2["EnderPearl"]="minecraft:ender_pearl";MinecraftItemTypes2["EndermanSpawnEgg"]="minecraft:enderman_spawn_egg";MinecraftItemTypes2["EndermiteSpawnEgg"]="minecraft:endermite_spawn_egg";MinecraftItemTypes2["EvokerSpawnEgg"]="minecraft:evoker_spawn_egg";MinecraftItemTypes2["ExperienceBottle"]="minecraft:experience_bottle";MinecraftItemTypes2["ExplorerPotterySherd"]="minecraft:explorer_pottery_sherd";MinecraftItemTypes2["ExposedChiseledCopper"]="minecraft:exposed_chiseled_copper";MinecraftItemTypes2["ExposedCopper"]="minecraft:exposed_copper";MinecraftItemTypes2["ExposedCopperBulb"]="minecraft:exposed_copper_bulb";MinecraftItemTypes2["ExposedCopperDoor"]="minecraft:exposed_copper_door";MinecraftItemTypes2["ExposedCopperGrate"]="minecraft:exposed_copper_grate";MinecraftItemTypes2["ExposedCopperTrapdoor"]="minecraft:exposed_copper_trapdoor";MinecraftItemTypes2["ExposedCutCopper"]="minecraft:exposed_cut_copper";MinecraftItemTypes2["ExposedCutCopperSlab"]="minecraft:exposed_cut_copper_slab";MinecraftItemTypes2["ExposedCutCopperStairs"]="minecraft:exposed_cut_copper_stairs";MinecraftItemTypes2["EyeArmorTrimSmithingTemplate"]="minecraft:eye_armor_trim_smithing_template";MinecraftItemTypes2["Farmland"]="minecraft:farmland";MinecraftItemTypes2["Feather"]="minecraft:feather";MinecraftItemTypes2["Fence"]="minecraft:fence";MinecraftItemTypes2["FenceGate"]="minecraft:fence_gate";MinecraftItemTypes2["FermentedSpiderEye"]="minecraft:fermented_spider_eye";MinecraftItemTypes2["FieldMasonedBannerPattern"]="minecraft:field_masoned_banner_pattern";MinecraftItemTypes2["FilledMap"]="minecraft:filled_map";MinecraftItemTypes2["FireCharge"]="minecraft:fire_charge";MinecraftItemTypes2["FireCoral"]="minecraft:fire_coral";MinecraftItemTypes2["FireworkRocket"]="minecraft:firework_rocket";MinecraftItemTypes2["FireworkStar"]="minecraft:firework_star";MinecraftItemTypes2["FishingRod"]="minecraft:fishing_rod";MinecraftItemTypes2["FletchingTable"]="minecraft:fletching_table";MinecraftItemTypes2["Flint"]="minecraft:flint";MinecraftItemTypes2["FlintAndSteel"]="minecraft:flint_and_steel";MinecraftItemTypes2["FlowerBannerPattern"]="minecraft:flower_banner_pattern";MinecraftItemTypes2["FlowerPot"]="minecraft:flower_pot";MinecraftItemTypes2["FloweringAzalea"]="minecraft:flowering_azalea";MinecraftItemTypes2["FoxSpawnEgg"]="minecraft:fox_spawn_egg";MinecraftItemTypes2["Frame"]="minecraft:frame";MinecraftItemTypes2["FriendPotterySherd"]="minecraft:friend_pottery_sherd";MinecraftItemTypes2["FrogSpawn"]="minecraft:frog_spawn";MinecraftItemTypes2["FrogSpawnEgg"]="minecraft:frog_spawn_egg";MinecraftItemTypes2["FrostedIce"]="minecraft:frosted_ice";MinecraftItemTypes2["Furnace"]="minecraft:furnace";MinecraftItemTypes2["GhastSpawnEgg"]="minecraft:ghast_spawn_egg";MinecraftItemTypes2["GhastTear"]="minecraft:ghast_tear";MinecraftItemTypes2["GildedBlackstone"]="minecraft:gilded_blackstone";MinecraftItemTypes2["Glass"]="minecraft:glass";MinecraftItemTypes2["GlassBottle"]="minecraft:glass_bottle";MinecraftItemTypes2["GlassPane"]="minecraft:glass_pane";MinecraftItemTypes2["GlisteringMelonSlice"]="minecraft:glistering_melon_slice";MinecraftItemTypes2["GlobeBannerPattern"]="minecraft:globe_banner_pattern";MinecraftItemTypes2["GlowBerries"]="minecraft:glow_berries";MinecraftItemTypes2["GlowFrame"]="minecraft:glow_frame";MinecraftItemTypes2["GlowInkSac"]="minecraft:glow_ink_sac";MinecraftItemTypes2["GlowLichen"]="minecraft:glow_lichen";MinecraftItemTypes2["GlowSquidSpawnEgg"]="minecraft:glow_squid_spawn_egg";MinecraftItemTypes2["Glowstone"]="minecraft:glowstone";MinecraftItemTypes2["GlowstoneDust"]="minecraft:glowstone_dust";MinecraftItemTypes2["GoatHorn"]="minecraft:goat_horn";MinecraftItemTypes2["GoatSpawnEgg"]="minecraft:goat_spawn_egg";MinecraftItemTypes2["GoldBlock"]="minecraft:gold_block";MinecraftItemTypes2["GoldIngot"]="minecraft:gold_ingot";MinecraftItemTypes2["GoldNugget"]="minecraft:gold_nugget";MinecraftItemTypes2["GoldOre"]="minecraft:gold_ore";MinecraftItemTypes2["GoldenApple"]="minecraft:golden_apple";MinecraftItemTypes2["GoldenAxe"]="minecraft:golden_axe";MinecraftItemTypes2["GoldenBoots"]="minecraft:golden_boots";MinecraftItemTypes2["GoldenCarrot"]="minecraft:golden_carrot";MinecraftItemTypes2["GoldenChestplate"]="minecraft:golden_chestplate";MinecraftItemTypes2["GoldenHelmet"]="minecraft:golden_helmet";MinecraftItemTypes2["GoldenHoe"]="minecraft:golden_hoe";MinecraftItemTypes2["GoldenHorseArmor"]="minecraft:golden_horse_armor";MinecraftItemTypes2["GoldenLeggings"]="minecraft:golden_leggings";MinecraftItemTypes2["GoldenPickaxe"]="minecraft:golden_pickaxe";MinecraftItemTypes2["GoldenRail"]="minecraft:golden_rail";MinecraftItemTypes2["GoldenShovel"]="minecraft:golden_shovel";MinecraftItemTypes2["GoldenSword"]="minecraft:golden_sword";MinecraftItemTypes2["Granite"]="minecraft:granite";MinecraftItemTypes2["GraniteStairs"]="minecraft:granite_stairs";MinecraftItemTypes2["Grass"]="minecraft:grass";MinecraftItemTypes2["GrassPath"]="minecraft:grass_path";MinecraftItemTypes2["Gravel"]="minecraft:gravel";MinecraftItemTypes2["GrayCandle"]="minecraft:gray_candle";MinecraftItemTypes2["GrayCarpet"]="minecraft:gray_carpet";MinecraftItemTypes2["GrayConcrete"]="minecraft:gray_concrete";MinecraftItemTypes2["GrayConcretePowder"]="minecraft:gray_concrete_powder";MinecraftItemTypes2["GrayDye"]="minecraft:gray_dye";MinecraftItemTypes2["GrayGlazedTerracotta"]="minecraft:gray_glazed_terracotta";MinecraftItemTypes2["GrayShulkerBox"]="minecraft:gray_shulker_box";MinecraftItemTypes2["GrayStainedGlass"]="minecraft:gray_stained_glass";MinecraftItemTypes2["GrayStainedGlassPane"]="minecraft:gray_stained_glass_pane";MinecraftItemTypes2["GrayTerracotta"]="minecraft:gray_terracotta";MinecraftItemTypes2["GrayWool"]="minecraft:gray_wool";MinecraftItemTypes2["GreenCandle"]="minecraft:green_candle";MinecraftItemTypes2["GreenCarpet"]="minecraft:green_carpet";MinecraftItemTypes2["GreenConcrete"]="minecraft:green_concrete";MinecraftItemTypes2["GreenConcretePowder"]="minecraft:green_concrete_powder";MinecraftItemTypes2["GreenDye"]="minecraft:green_dye";MinecraftItemTypes2["GreenGlazedTerracotta"]="minecraft:green_glazed_terracotta";MinecraftItemTypes2["GreenShulkerBox"]="minecraft:green_shulker_box";MinecraftItemTypes2["GreenStainedGlass"]="minecraft:green_stained_glass";MinecraftItemTypes2["GreenStainedGlassPane"]="minecraft:green_stained_glass_pane";MinecraftItemTypes2["GreenTerracotta"]="minecraft:green_terracotta";MinecraftItemTypes2["GreenWool"]="minecraft:green_wool";MinecraftItemTypes2["Grindstone"]="minecraft:grindstone";MinecraftItemTypes2["GuardianSpawnEgg"]="minecraft:guardian_spawn_egg";MinecraftItemTypes2["Gunpowder"]="minecraft:gunpowder";MinecraftItemTypes2["HangingRoots"]="minecraft:hanging_roots";MinecraftItemTypes2["HardStainedGlass"]="minecraft:hard_stained_glass";MinecraftItemTypes2["HardStainedGlassPane"]="minecraft:hard_stained_glass_pane";MinecraftItemTypes2["HardenedClay"]="minecraft:hardened_clay";MinecraftItemTypes2["HayBlock"]="minecraft:hay_block";MinecraftItemTypes2["HeartOfTheSea"]="minecraft:heart_of_the_sea";MinecraftItemTypes2["HeartPotterySherd"]="minecraft:heart_pottery_sherd";MinecraftItemTypes2["HeartbreakPotterySherd"]="minecraft:heartbreak_pottery_sherd";MinecraftItemTypes2["HeavyWeightedPressurePlate"]="minecraft:heavy_weighted_pressure_plate";MinecraftItemTypes2["HoglinSpawnEgg"]="minecraft:hoglin_spawn_egg";MinecraftItemTypes2["HoneyBlock"]="minecraft:honey_block";MinecraftItemTypes2["HoneyBottle"]="minecraft:honey_bottle";MinecraftItemTypes2["Honeycomb"]="minecraft:honeycomb";MinecraftItemTypes2["HoneycombBlock"]="minecraft:honeycomb_block";MinecraftItemTypes2["Hopper"]="minecraft:hopper";MinecraftItemTypes2["HopperMinecart"]="minecraft:hopper_minecart";MinecraftItemTypes2["HornCoral"]="minecraft:horn_coral";MinecraftItemTypes2["HorseSpawnEgg"]="minecraft:horse_spawn_egg";MinecraftItemTypes2["HostArmorTrimSmithingTemplate"]="minecraft:host_armor_trim_smithing_template";MinecraftItemTypes2["HowlPotterySherd"]="minecraft:howl_pottery_sherd";MinecraftItemTypes2["HuskSpawnEgg"]="minecraft:husk_spawn_egg";MinecraftItemTypes2["Ice"]="minecraft:ice";MinecraftItemTypes2["InfestedDeepslate"]="minecraft:infested_deepslate";MinecraftItemTypes2["InkSac"]="minecraft:ink_sac";MinecraftItemTypes2["IronAxe"]="minecraft:iron_axe";MinecraftItemTypes2["IronBars"]="minecraft:iron_bars";MinecraftItemTypes2["IronBlock"]="minecraft:iron_block";MinecraftItemTypes2["IronBoots"]="minecraft:iron_boots";MinecraftItemTypes2["IronChestplate"]="minecraft:iron_chestplate";MinecraftItemTypes2["IronDoor"]="minecraft:iron_door";MinecraftItemTypes2["IronGolemSpawnEgg"]="minecraft:iron_golem_spawn_egg";MinecraftItemTypes2["IronHelmet"]="minecraft:iron_helmet";MinecraftItemTypes2["IronHoe"]="minecraft:iron_hoe";MinecraftItemTypes2["IronHorseArmor"]="minecraft:iron_horse_armor";MinecraftItemTypes2["IronIngot"]="minecraft:iron_ingot";MinecraftItemTypes2["IronLeggings"]="minecraft:iron_leggings";MinecraftItemTypes2["IronNugget"]="minecraft:iron_nugget";MinecraftItemTypes2["IronOre"]="minecraft:iron_ore";MinecraftItemTypes2["IronPickaxe"]="minecraft:iron_pickaxe";MinecraftItemTypes2["IronShovel"]="minecraft:iron_shovel";MinecraftItemTypes2["IronSword"]="minecraft:iron_sword";MinecraftItemTypes2["IronTrapdoor"]="minecraft:iron_trapdoor";MinecraftItemTypes2["Jigsaw"]="minecraft:jigsaw";MinecraftItemTypes2["Jukebox"]="minecraft:jukebox";MinecraftItemTypes2["JungleBoat"]="minecraft:jungle_boat";MinecraftItemTypes2["JungleButton"]="minecraft:jungle_button";MinecraftItemTypes2["JungleChestBoat"]="minecraft:jungle_chest_boat";MinecraftItemTypes2["JungleDoor"]="minecraft:jungle_door";MinecraftItemTypes2["JungleFence"]="minecraft:jungle_fence";MinecraftItemTypes2["JungleFenceGate"]="minecraft:jungle_fence_gate";MinecraftItemTypes2["JungleHangingSign"]="minecraft:jungle_hanging_sign";MinecraftItemTypes2["JungleLog"]="minecraft:jungle_log";MinecraftItemTypes2["JunglePlanks"]="minecraft:jungle_planks";MinecraftItemTypes2["JunglePressurePlate"]="minecraft:jungle_pressure_plate";MinecraftItemTypes2["JungleSign"]="minecraft:jungle_sign";MinecraftItemTypes2["JungleStairs"]="minecraft:jungle_stairs";MinecraftItemTypes2["JungleTrapdoor"]="minecraft:jungle_trapdoor";MinecraftItemTypes2["Kelp"]="minecraft:kelp";MinecraftItemTypes2["Ladder"]="minecraft:ladder";MinecraftItemTypes2["Lantern"]="minecraft:lantern";MinecraftItemTypes2["LapisBlock"]="minecraft:lapis_block";MinecraftItemTypes2["LapisLazuli"]="minecraft:lapis_lazuli";MinecraftItemTypes2["LapisOre"]="minecraft:lapis_ore";MinecraftItemTypes2["LargeAmethystBud"]="minecraft:large_amethyst_bud";MinecraftItemTypes2["LavaBucket"]="minecraft:lava_bucket";MinecraftItemTypes2["Lead"]="minecraft:lead";MinecraftItemTypes2["Leather"]="minecraft:leather";MinecraftItemTypes2["LeatherBoots"]="minecraft:leather_boots";MinecraftItemTypes2["LeatherChestplate"]="minecraft:leather_chestplate";MinecraftItemTypes2["LeatherHelmet"]="minecraft:leather_helmet";MinecraftItemTypes2["LeatherHorseArmor"]="minecraft:leather_horse_armor";MinecraftItemTypes2["LeatherLeggings"]="minecraft:leather_leggings";MinecraftItemTypes2["Leaves"]="minecraft:leaves";MinecraftItemTypes2["Leaves2"]="minecraft:leaves2";MinecraftItemTypes2["Lectern"]="minecraft:lectern";MinecraftItemTypes2["Lever"]="minecraft:lever";MinecraftItemTypes2["LightBlock"]="minecraft:light_block";MinecraftItemTypes2["LightBlueCandle"]="minecraft:light_blue_candle";MinecraftItemTypes2["LightBlueCarpet"]="minecraft:light_blue_carpet";MinecraftItemTypes2["LightBlueConcrete"]="minecraft:light_blue_concrete";MinecraftItemTypes2["LightBlueConcretePowder"]="minecraft:light_blue_concrete_powder";MinecraftItemTypes2["LightBlueDye"]="minecraft:light_blue_dye";MinecraftItemTypes2["LightBlueGlazedTerracotta"]="minecraft:light_blue_glazed_terracotta";MinecraftItemTypes2["LightBlueShulkerBox"]="minecraft:light_blue_shulker_box";MinecraftItemTypes2["LightBlueStainedGlass"]="minecraft:light_blue_stained_glass";MinecraftItemTypes2["LightBlueStainedGlassPane"]="minecraft:light_blue_stained_glass_pane";MinecraftItemTypes2["LightBlueTerracotta"]="minecraft:light_blue_terracotta";MinecraftItemTypes2["LightBlueWool"]="minecraft:light_blue_wool";MinecraftItemTypes2["LightGrayCandle"]="minecraft:light_gray_candle";MinecraftItemTypes2["LightGrayCarpet"]="minecraft:light_gray_carpet";MinecraftItemTypes2["LightGrayConcrete"]="minecraft:light_gray_concrete";MinecraftItemTypes2["LightGrayConcretePowder"]="minecraft:light_gray_concrete_powder";MinecraftItemTypes2["LightGrayDye"]="minecraft:light_gray_dye";MinecraftItemTypes2["LightGrayShulkerBox"]="minecraft:light_gray_shulker_box";MinecraftItemTypes2["LightGrayStainedGlass"]="minecraft:light_gray_stained_glass";MinecraftItemTypes2["LightGrayStainedGlassPane"]="minecraft:light_gray_stained_glass_pane";MinecraftItemTypes2["LightGrayTerracotta"]="minecraft:light_gray_terracotta";MinecraftItemTypes2["LightGrayWool"]="minecraft:light_gray_wool";MinecraftItemTypes2["LightWeightedPressurePlate"]="minecraft:light_weighted_pressure_plate";MinecraftItemTypes2["LightningRod"]="minecraft:lightning_rod";MinecraftItemTypes2["LimeCandle"]="minecraft:lime_candle";MinecraftItemTypes2["LimeCarpet"]="minecraft:lime_carpet";MinecraftItemTypes2["LimeConcrete"]="minecraft:lime_concrete";MinecraftItemTypes2["LimeConcretePowder"]="minecraft:lime_concrete_powder";MinecraftItemTypes2["LimeDye"]="minecraft:lime_dye";MinecraftItemTypes2["LimeGlazedTerracotta"]="minecraft:lime_glazed_terracotta";MinecraftItemTypes2["LimeShulkerBox"]="minecraft:lime_shulker_box";MinecraftItemTypes2["LimeStainedGlass"]="minecraft:lime_stained_glass";MinecraftItemTypes2["LimeStainedGlassPane"]="minecraft:lime_stained_glass_pane";MinecraftItemTypes2["LimeTerracotta"]="minecraft:lime_terracotta";MinecraftItemTypes2["LimeWool"]="minecraft:lime_wool";MinecraftItemTypes2["LingeringPotion"]="minecraft:lingering_potion";MinecraftItemTypes2["LitPumpkin"]="minecraft:lit_pumpkin";MinecraftItemTypes2["LlamaSpawnEgg"]="minecraft:llama_spawn_egg";MinecraftItemTypes2["Lodestone"]="minecraft:lodestone";MinecraftItemTypes2["LodestoneCompass"]="minecraft:lodestone_compass";MinecraftItemTypes2["Log"]="minecraft:log";MinecraftItemTypes2["Log2"]="minecraft:log2";MinecraftItemTypes2["Loom"]="minecraft:loom";MinecraftItemTypes2["MagentaCandle"]="minecraft:magenta_candle";MinecraftItemTypes2["MagentaCarpet"]="minecraft:magenta_carpet";MinecraftItemTypes2["MagentaConcrete"]="minecraft:magenta_concrete";MinecraftItemTypes2["MagentaConcretePowder"]="minecraft:magenta_concrete_powder";MinecraftItemTypes2["MagentaDye"]="minecraft:magenta_dye";MinecraftItemTypes2["MagentaGlazedTerracotta"]="minecraft:magenta_glazed_terracotta";MinecraftItemTypes2["MagentaShulkerBox"]="minecraft:magenta_shulker_box";MinecraftItemTypes2["MagentaStainedGlass"]="minecraft:magenta_stained_glass";MinecraftItemTypes2["MagentaStainedGlassPane"]="minecraft:magenta_stained_glass_pane";MinecraftItemTypes2["MagentaTerracotta"]="minecraft:magenta_terracotta";MinecraftItemTypes2["MagentaWool"]="minecraft:magenta_wool";MinecraftItemTypes2["Magma"]="minecraft:magma";MinecraftItemTypes2["MagmaCream"]="minecraft:magma_cream";MinecraftItemTypes2["MagmaCubeSpawnEgg"]="minecraft:magma_cube_spawn_egg";MinecraftItemTypes2["MangroveBoat"]="minecraft:mangrove_boat";MinecraftItemTypes2["MangroveButton"]="minecraft:mangrove_button";MinecraftItemTypes2["MangroveChestBoat"]="minecraft:mangrove_chest_boat";MinecraftItemTypes2["MangroveDoor"]="minecraft:mangrove_door";MinecraftItemTypes2["MangroveFence"]="minecraft:mangrove_fence";MinecraftItemTypes2["MangroveFenceGate"]="minecraft:mangrove_fence_gate";MinecraftItemTypes2["MangroveHangingSign"]="minecraft:mangrove_hanging_sign";MinecraftItemTypes2["MangroveLeaves"]="minecraft:mangrove_leaves";MinecraftItemTypes2["MangroveLog"]="minecraft:mangrove_log";MinecraftItemTypes2["MangrovePlanks"]="minecraft:mangrove_planks";MinecraftItemTypes2["MangrovePressurePlate"]="minecraft:mangrove_pressure_plate";MinecraftItemTypes2["MangrovePropagule"]="minecraft:mangrove_propagule";MinecraftItemTypes2["MangroveRoots"]="minecraft:mangrove_roots";MinecraftItemTypes2["MangroveSign"]="minecraft:mangrove_sign";MinecraftItemTypes2["MangroveSlab"]="minecraft:mangrove_slab";MinecraftItemTypes2["MangroveStairs"]="minecraft:mangrove_stairs";MinecraftItemTypes2["MangroveTrapdoor"]="minecraft:mangrove_trapdoor";MinecraftItemTypes2["MangroveWood"]="minecraft:mangrove_wood";MinecraftItemTypes2["MediumAmethystBud"]="minecraft:medium_amethyst_bud";MinecraftItemTypes2["MelonBlock"]="minecraft:melon_block";MinecraftItemTypes2["MelonSeeds"]="minecraft:melon_seeds";MinecraftItemTypes2["MelonSlice"]="minecraft:melon_slice";MinecraftItemTypes2["MilkBucket"]="minecraft:milk_bucket";MinecraftItemTypes2["Minecart"]="minecraft:minecart";MinecraftItemTypes2["MinerPotterySherd"]="minecraft:miner_pottery_sherd";MinecraftItemTypes2["MobSpawner"]="minecraft:mob_spawner";MinecraftItemTypes2["MojangBannerPattern"]="minecraft:mojang_banner_pattern";MinecraftItemTypes2["MonsterEgg"]="minecraft:monster_egg";MinecraftItemTypes2["MooshroomSpawnEgg"]="minecraft:mooshroom_spawn_egg";MinecraftItemTypes2["MossBlock"]="minecraft:moss_block";MinecraftItemTypes2["MossCarpet"]="minecraft:moss_carpet";MinecraftItemTypes2["MossyCobblestone"]="minecraft:mossy_cobblestone";MinecraftItemTypes2["MossyCobblestoneStairs"]="minecraft:mossy_cobblestone_stairs";MinecraftItemTypes2["MossyStoneBrickStairs"]="minecraft:mossy_stone_brick_stairs";MinecraftItemTypes2["MournerPotterySherd"]="minecraft:mourner_pottery_sherd";MinecraftItemTypes2["Mud"]="minecraft:mud";MinecraftItemTypes2["MudBrickSlab"]="minecraft:mud_brick_slab";MinecraftItemTypes2["MudBrickStairs"]="minecraft:mud_brick_stairs";MinecraftItemTypes2["MudBrickWall"]="minecraft:mud_brick_wall";MinecraftItemTypes2["MudBricks"]="minecraft:mud_bricks";MinecraftItemTypes2["MuddyMangroveRoots"]="minecraft:muddy_mangrove_roots";MinecraftItemTypes2["MuleSpawnEgg"]="minecraft:mule_spawn_egg";MinecraftItemTypes2["MushroomStew"]="minecraft:mushroom_stew";MinecraftItemTypes2["MusicDisc11"]="minecraft:music_disc_11";MinecraftItemTypes2["MusicDisc13"]="minecraft:music_disc_13";MinecraftItemTypes2["MusicDisc5"]="minecraft:music_disc_5";MinecraftItemTypes2["MusicDiscBlocks"]="minecraft:music_disc_blocks";MinecraftItemTypes2["MusicDiscCat"]="minecraft:music_disc_cat";MinecraftItemTypes2["MusicDiscChirp"]="minecraft:music_disc_chirp";MinecraftItemTypes2["MusicDiscFar"]="minecraft:music_disc_far";MinecraftItemTypes2["MusicDiscMall"]="minecraft:music_disc_mall";MinecraftItemTypes2["MusicDiscMellohi"]="minecraft:music_disc_mellohi";MinecraftItemTypes2["MusicDiscOtherside"]="minecraft:music_disc_otherside";MinecraftItemTypes2["MusicDiscPigstep"]="minecraft:music_disc_pigstep";MinecraftItemTypes2["MusicDiscRelic"]="minecraft:music_disc_relic";MinecraftItemTypes2["MusicDiscStal"]="minecraft:music_disc_stal";MinecraftItemTypes2["MusicDiscStrad"]="minecraft:music_disc_strad";MinecraftItemTypes2["MusicDiscWait"]="minecraft:music_disc_wait";MinecraftItemTypes2["MusicDiscWard"]="minecraft:music_disc_ward";MinecraftItemTypes2["Mutton"]="minecraft:mutton";MinecraftItemTypes2["Mycelium"]="minecraft:mycelium";MinecraftItemTypes2["NameTag"]="minecraft:name_tag";MinecraftItemTypes2["NautilusShell"]="minecraft:nautilus_shell";MinecraftItemTypes2["NetherBrick"]="minecraft:nether_brick";MinecraftItemTypes2["NetherBrickFence"]="minecraft:nether_brick_fence";MinecraftItemTypes2["NetherBrickStairs"]="minecraft:nether_brick_stairs";MinecraftItemTypes2["NetherGoldOre"]="minecraft:nether_gold_ore";MinecraftItemTypes2["NetherSprouts"]="minecraft:nether_sprouts";MinecraftItemTypes2["NetherStar"]="minecraft:nether_star";MinecraftItemTypes2["NetherWart"]="minecraft:nether_wart";MinecraftItemTypes2["NetherWartBlock"]="minecraft:nether_wart_block";MinecraftItemTypes2["Netherbrick"]="minecraft:netherbrick";MinecraftItemTypes2["NetheriteAxe"]="minecraft:netherite_axe";MinecraftItemTypes2["NetheriteBlock"]="minecraft:netherite_block";MinecraftItemTypes2["NetheriteBoots"]="minecraft:netherite_boots";MinecraftItemTypes2["NetheriteChestplate"]="minecraft:netherite_chestplate";MinecraftItemTypes2["NetheriteHelmet"]="minecraft:netherite_helmet";MinecraftItemTypes2["NetheriteHoe"]="minecraft:netherite_hoe";MinecraftItemTypes2["NetheriteIngot"]="minecraft:netherite_ingot";MinecraftItemTypes2["NetheriteLeggings"]="minecraft:netherite_leggings";MinecraftItemTypes2["NetheritePickaxe"]="minecraft:netherite_pickaxe";MinecraftItemTypes2["NetheriteScrap"]="minecraft:netherite_scrap";MinecraftItemTypes2["NetheriteShovel"]="minecraft:netherite_shovel";MinecraftItemTypes2["NetheriteSword"]="minecraft:netherite_sword";MinecraftItemTypes2["NetheriteUpgradeSmithingTemplate"]="minecraft:netherite_upgrade_smithing_template";MinecraftItemTypes2["Netherrack"]="minecraft:netherrack";MinecraftItemTypes2["NormalStoneStairs"]="minecraft:normal_stone_stairs";MinecraftItemTypes2["Noteblock"]="minecraft:noteblock";MinecraftItemTypes2["OakBoat"]="minecraft:oak_boat";MinecraftItemTypes2["OakChestBoat"]="minecraft:oak_chest_boat";MinecraftItemTypes2["OakFence"]="minecraft:oak_fence";MinecraftItemTypes2["OakHangingSign"]="minecraft:oak_hanging_sign";MinecraftItemTypes2["OakLog"]="minecraft:oak_log";MinecraftItemTypes2["OakPlanks"]="minecraft:oak_planks";MinecraftItemTypes2["OakSign"]="minecraft:oak_sign";MinecraftItemTypes2["OakStairs"]="minecraft:oak_stairs";MinecraftItemTypes2["Observer"]="minecraft:observer";MinecraftItemTypes2["Obsidian"]="minecraft:obsidian";MinecraftItemTypes2["OcelotSpawnEgg"]="minecraft:ocelot_spawn_egg";MinecraftItemTypes2["OchreFroglight"]="minecraft:ochre_froglight";MinecraftItemTypes2["OrangeCandle"]="minecraft:orange_candle";MinecraftItemTypes2["OrangeCarpet"]="minecraft:orange_carpet";MinecraftItemTypes2["OrangeConcrete"]="minecraft:orange_concrete";MinecraftItemTypes2["OrangeConcretePowder"]="minecraft:orange_concrete_powder";MinecraftItemTypes2["OrangeDye"]="minecraft:orange_dye";MinecraftItemTypes2["OrangeGlazedTerracotta"]="minecraft:orange_glazed_terracotta";MinecraftItemTypes2["OrangeShulkerBox"]="minecraft:orange_shulker_box";MinecraftItemTypes2["OrangeStainedGlass"]="minecraft:orange_stained_glass";MinecraftItemTypes2["OrangeStainedGlassPane"]="minecraft:orange_stained_glass_pane";MinecraftItemTypes2["OrangeTerracotta"]="minecraft:orange_terracotta";MinecraftItemTypes2["OrangeWool"]="minecraft:orange_wool";MinecraftItemTypes2["OxidizedChiseledCopper"]="minecraft:oxidized_chiseled_copper";MinecraftItemTypes2["OxidizedCopper"]="minecraft:oxidized_copper";MinecraftItemTypes2["OxidizedCopperBulb"]="minecraft:oxidized_copper_bulb";MinecraftItemTypes2["OxidizedCopperDoor"]="minecraft:oxidized_copper_door";MinecraftItemTypes2["OxidizedCopperGrate"]="minecraft:oxidized_copper_grate";MinecraftItemTypes2["OxidizedCopperTrapdoor"]="minecraft:oxidized_copper_trapdoor";MinecraftItemTypes2["OxidizedCutCopper"]="minecraft:oxidized_cut_copper";MinecraftItemTypes2["OxidizedCutCopperSlab"]="minecraft:oxidized_cut_copper_slab";MinecraftItemTypes2["OxidizedCutCopperStairs"]="minecraft:oxidized_cut_copper_stairs";MinecraftItemTypes2["PackedIce"]="minecraft:packed_ice";MinecraftItemTypes2["PackedMud"]="minecraft:packed_mud";MinecraftItemTypes2["Painting"]="minecraft:painting";MinecraftItemTypes2["PandaSpawnEgg"]="minecraft:panda_spawn_egg";MinecraftItemTypes2["Paper"]="minecraft:paper";MinecraftItemTypes2["ParrotSpawnEgg"]="minecraft:parrot_spawn_egg";MinecraftItemTypes2["PearlescentFroglight"]="minecraft:pearlescent_froglight";MinecraftItemTypes2["PhantomMembrane"]="minecraft:phantom_membrane";MinecraftItemTypes2["PhantomSpawnEgg"]="minecraft:phantom_spawn_egg";MinecraftItemTypes2["PigSpawnEgg"]="minecraft:pig_spawn_egg";MinecraftItemTypes2["PiglinBannerPattern"]="minecraft:piglin_banner_pattern";MinecraftItemTypes2["PiglinBruteSpawnEgg"]="minecraft:piglin_brute_spawn_egg";MinecraftItemTypes2["PiglinSpawnEgg"]="minecraft:piglin_spawn_egg";MinecraftItemTypes2["PillagerSpawnEgg"]="minecraft:pillager_spawn_egg";MinecraftItemTypes2["PinkCandle"]="minecraft:pink_candle";MinecraftItemTypes2["PinkCarpet"]="minecraft:pink_carpet";MinecraftItemTypes2["PinkConcrete"]="minecraft:pink_concrete";MinecraftItemTypes2["PinkConcretePowder"]="minecraft:pink_concrete_powder";MinecraftItemTypes2["PinkDye"]="minecraft:pink_dye";MinecraftItemTypes2["PinkGlazedTerracotta"]="minecraft:pink_glazed_terracotta";MinecraftItemTypes2["PinkPetals"]="minecraft:pink_petals";MinecraftItemTypes2["PinkShulkerBox"]="minecraft:pink_shulker_box";MinecraftItemTypes2["PinkStainedGlass"]="minecraft:pink_stained_glass";MinecraftItemTypes2["PinkStainedGlassPane"]="minecraft:pink_stained_glass_pane";MinecraftItemTypes2["PinkTerracotta"]="minecraft:pink_terracotta";MinecraftItemTypes2["PinkWool"]="minecraft:pink_wool";MinecraftItemTypes2["Piston"]="minecraft:piston";MinecraftItemTypes2["PitcherPlant"]="minecraft:pitcher_plant";MinecraftItemTypes2["PitcherPod"]="minecraft:pitcher_pod";MinecraftItemTypes2["Planks"]="minecraft:planks";MinecraftItemTypes2["PlentyPotterySherd"]="minecraft:plenty_pottery_sherd";MinecraftItemTypes2["Podzol"]="minecraft:podzol";MinecraftItemTypes2["PointedDripstone"]="minecraft:pointed_dripstone";MinecraftItemTypes2["PoisonousPotato"]="minecraft:poisonous_potato";MinecraftItemTypes2["PolarBearSpawnEgg"]="minecraft:polar_bear_spawn_egg";MinecraftItemTypes2["PolishedAndesite"]="minecraft:polished_andesite";MinecraftItemTypes2["PolishedAndesiteStairs"]="minecraft:polished_andesite_stairs";MinecraftItemTypes2["PolishedBasalt"]="minecraft:polished_basalt";MinecraftItemTypes2["PolishedBlackstone"]="minecraft:polished_blackstone";MinecraftItemTypes2["PolishedBlackstoneBrickSlab"]="minecraft:polished_blackstone_brick_slab";MinecraftItemTypes2["PolishedBlackstoneBrickStairs"]="minecraft:polished_blackstone_brick_stairs";MinecraftItemTypes2["PolishedBlackstoneBrickWall"]="minecraft:polished_blackstone_brick_wall";MinecraftItemTypes2["PolishedBlackstoneBricks"]="minecraft:polished_blackstone_bricks";MinecraftItemTypes2["PolishedBlackstoneButton"]="minecraft:polished_blackstone_button";MinecraftItemTypes2["PolishedBlackstonePressurePlate"]="minecraft:polished_blackstone_pressure_plate";MinecraftItemTypes2["PolishedBlackstoneSlab"]="minecraft:polished_blackstone_slab";MinecraftItemTypes2["PolishedBlackstoneStairs"]="minecraft:polished_blackstone_stairs";MinecraftItemTypes2["PolishedBlackstoneWall"]="minecraft:polished_blackstone_wall";MinecraftItemTypes2["PolishedDeepslate"]="minecraft:polished_deepslate";MinecraftItemTypes2["PolishedDeepslateSlab"]="minecraft:polished_deepslate_slab";MinecraftItemTypes2["PolishedDeepslateStairs"]="minecraft:polished_deepslate_stairs";MinecraftItemTypes2["PolishedDeepslateWall"]="minecraft:polished_deepslate_wall";MinecraftItemTypes2["PolishedDiorite"]="minecraft:polished_diorite";MinecraftItemTypes2["PolishedDioriteStairs"]="minecraft:polished_diorite_stairs";MinecraftItemTypes2["PolishedGranite"]="minecraft:polished_granite";MinecraftItemTypes2["PolishedGraniteStairs"]="minecraft:polished_granite_stairs";MinecraftItemTypes2["PolishedTuff"]="minecraft:polished_tuff";MinecraftItemTypes2["PolishedTuffSlab"]="minecraft:polished_tuff_slab";MinecraftItemTypes2["PolishedTuffStairs"]="minecraft:polished_tuff_stairs";MinecraftItemTypes2["PolishedTuffWall"]="minecraft:polished_tuff_wall";MinecraftItemTypes2["PoppedChorusFruit"]="minecraft:popped_chorus_fruit";MinecraftItemTypes2["Porkchop"]="minecraft:porkchop";MinecraftItemTypes2["Potato"]="minecraft:potato";MinecraftItemTypes2["Potion"]="minecraft:potion";MinecraftItemTypes2["PowderSnowBucket"]="minecraft:powder_snow_bucket";MinecraftItemTypes2["Prismarine"]="minecraft:prismarine";MinecraftItemTypes2["PrismarineBricksStairs"]="minecraft:prismarine_bricks_stairs";MinecraftItemTypes2["PrismarineCrystals"]="minecraft:prismarine_crystals";MinecraftItemTypes2["PrismarineShard"]="minecraft:prismarine_shard";MinecraftItemTypes2["PrismarineStairs"]="minecraft:prismarine_stairs";MinecraftItemTypes2["PrizePotterySherd"]="minecraft:prize_pottery_sherd";MinecraftItemTypes2["Pufferfish"]="minecraft:pufferfish";MinecraftItemTypes2["PufferfishBucket"]="minecraft:pufferfish_bucket";MinecraftItemTypes2["PufferfishSpawnEgg"]="minecraft:pufferfish_spawn_egg";MinecraftItemTypes2["Pumpkin"]="minecraft:pumpkin";MinecraftItemTypes2["PumpkinPie"]="minecraft:pumpkin_pie";MinecraftItemTypes2["PumpkinSeeds"]="minecraft:pumpkin_seeds";MinecraftItemTypes2["PurpleCandle"]="minecraft:purple_candle";MinecraftItemTypes2["PurpleCarpet"]="minecraft:purple_carpet";MinecraftItemTypes2["PurpleConcrete"]="minecraft:purple_concrete";MinecraftItemTypes2["PurpleConcretePowder"]="minecraft:purple_concrete_powder";MinecraftItemTypes2["PurpleDye"]="minecraft:purple_dye";MinecraftItemTypes2["PurpleGlazedTerracotta"]="minecraft:purple_glazed_terracotta";MinecraftItemTypes2["PurpleShulkerBox"]="minecraft:purple_shulker_box";MinecraftItemTypes2["PurpleStainedGlass"]="minecraft:purple_stained_glass";MinecraftItemTypes2["PurpleStainedGlassPane"]="minecraft:purple_stained_glass_pane";MinecraftItemTypes2["PurpleTerracotta"]="minecraft:purple_terracotta";MinecraftItemTypes2["PurpleWool"]="minecraft:purple_wool";MinecraftItemTypes2["PurpurBlock"]="minecraft:purpur_block";MinecraftItemTypes2["PurpurStairs"]="minecraft:purpur_stairs";MinecraftItemTypes2["Quartz"]="minecraft:quartz";MinecraftItemTypes2["QuartzBlock"]="minecraft:quartz_block";MinecraftItemTypes2["QuartzBricks"]="minecraft:quartz_bricks";MinecraftItemTypes2["QuartzOre"]="minecraft:quartz_ore";MinecraftItemTypes2["QuartzStairs"]="minecraft:quartz_stairs";MinecraftItemTypes2["Rabbit"]="minecraft:rabbit";MinecraftItemTypes2["RabbitFoot"]="minecraft:rabbit_foot";MinecraftItemTypes2["RabbitHide"]="minecraft:rabbit_hide";MinecraftItemTypes2["RabbitSpawnEgg"]="minecraft:rabbit_spawn_egg";MinecraftItemTypes2["RabbitStew"]="minecraft:rabbit_stew";MinecraftItemTypes2["Rail"]="minecraft:rail";MinecraftItemTypes2["RaiserArmorTrimSmithingTemplate"]="minecraft:raiser_armor_trim_smithing_template";MinecraftItemTypes2["RavagerSpawnEgg"]="minecraft:ravager_spawn_egg";MinecraftItemTypes2["RawCopper"]="minecraft:raw_copper";MinecraftItemTypes2["RawCopperBlock"]="minecraft:raw_copper_block";MinecraftItemTypes2["RawGold"]="minecraft:raw_gold";MinecraftItemTypes2["RawGoldBlock"]="minecraft:raw_gold_block";MinecraftItemTypes2["RawIron"]="minecraft:raw_iron";MinecraftItemTypes2["RawIronBlock"]="minecraft:raw_iron_block";MinecraftItemTypes2["RecoveryCompass"]="minecraft:recovery_compass";MinecraftItemTypes2["RedCandle"]="minecraft:red_candle";MinecraftItemTypes2["RedCarpet"]="minecraft:red_carpet";MinecraftItemTypes2["RedConcrete"]="minecraft:red_concrete";MinecraftItemTypes2["RedConcretePowder"]="minecraft:red_concrete_powder";MinecraftItemTypes2["RedDye"]="minecraft:red_dye";MinecraftItemTypes2["RedFlower"]="minecraft:red_flower";MinecraftItemTypes2["RedGlazedTerracotta"]="minecraft:red_glazed_terracotta";MinecraftItemTypes2["RedMushroom"]="minecraft:red_mushroom";MinecraftItemTypes2["RedMushroomBlock"]="minecraft:red_mushroom_block";MinecraftItemTypes2["RedNetherBrick"]="minecraft:red_nether_brick";MinecraftItemTypes2["RedNetherBrickStairs"]="minecraft:red_nether_brick_stairs";MinecraftItemTypes2["RedSandstone"]="minecraft:red_sandstone";MinecraftItemTypes2["RedSandstoneStairs"]="minecraft:red_sandstone_stairs";MinecraftItemTypes2["RedShulkerBox"]="minecraft:red_shulker_box";MinecraftItemTypes2["RedStainedGlass"]="minecraft:red_stained_glass";MinecraftItemTypes2["RedStainedGlassPane"]="minecraft:red_stained_glass_pane";MinecraftItemTypes2["RedTerracotta"]="minecraft:red_terracotta";MinecraftItemTypes2["RedWool"]="minecraft:red_wool";MinecraftItemTypes2["Redstone"]="minecraft:redstone";MinecraftItemTypes2["RedstoneBlock"]="minecraft:redstone_block";MinecraftItemTypes2["RedstoneLamp"]="minecraft:redstone_lamp";MinecraftItemTypes2["RedstoneOre"]="minecraft:redstone_ore";MinecraftItemTypes2["RedstoneTorch"]="minecraft:redstone_torch";MinecraftItemTypes2["ReinforcedDeepslate"]="minecraft:reinforced_deepslate";MinecraftItemTypes2["Repeater"]="minecraft:repeater";MinecraftItemTypes2["RepeatingCommandBlock"]="minecraft:repeating_command_block";MinecraftItemTypes2["RespawnAnchor"]="minecraft:respawn_anchor";MinecraftItemTypes2["RibArmorTrimSmithingTemplate"]="minecraft:rib_armor_trim_smithing_template";MinecraftItemTypes2["RottenFlesh"]="minecraft:rotten_flesh";MinecraftItemTypes2["Saddle"]="minecraft:saddle";MinecraftItemTypes2["Salmon"]="minecraft:salmon";MinecraftItemTypes2["SalmonBucket"]="minecraft:salmon_bucket";MinecraftItemTypes2["SalmonSpawnEgg"]="minecraft:salmon_spawn_egg";MinecraftItemTypes2["Sand"]="minecraft:sand";MinecraftItemTypes2["Sandstone"]="minecraft:sandstone";MinecraftItemTypes2["SandstoneStairs"]="minecraft:sandstone_stairs";MinecraftItemTypes2["Sapling"]="minecraft:sapling";MinecraftItemTypes2["Scaffolding"]="minecraft:scaffolding";MinecraftItemTypes2["Sculk"]="minecraft:sculk";MinecraftItemTypes2["SculkCatalyst"]="minecraft:sculk_catalyst";MinecraftItemTypes2["SculkSensor"]="minecraft:sculk_sensor";MinecraftItemTypes2["SculkShrieker"]="minecraft:sculk_shrieker";MinecraftItemTypes2["SculkVein"]="minecraft:sculk_vein";MinecraftItemTypes2["SeaLantern"]="minecraft:sea_lantern";MinecraftItemTypes2["SeaPickle"]="minecraft:sea_pickle";MinecraftItemTypes2["Seagrass"]="minecraft:seagrass";MinecraftItemTypes2["SentryArmorTrimSmithingTemplate"]="minecraft:sentry_armor_trim_smithing_template";MinecraftItemTypes2["ShaperArmorTrimSmithingTemplate"]="minecraft:shaper_armor_trim_smithing_template";MinecraftItemTypes2["SheafPotterySherd"]="minecraft:sheaf_pottery_sherd";MinecraftItemTypes2["Shears"]="minecraft:shears";MinecraftItemTypes2["SheepSpawnEgg"]="minecraft:sheep_spawn_egg";MinecraftItemTypes2["ShelterPotterySherd"]="minecraft:shelter_pottery_sherd";MinecraftItemTypes2["Shield"]="minecraft:shield";MinecraftItemTypes2["Shroomlight"]="minecraft:shroomlight";MinecraftItemTypes2["ShulkerBox"]="minecraft:shulker_box";MinecraftItemTypes2["ShulkerShell"]="minecraft:shulker_shell";MinecraftItemTypes2["ShulkerSpawnEgg"]="minecraft:shulker_spawn_egg";MinecraftItemTypes2["SilenceArmorTrimSmithingTemplate"]="minecraft:silence_armor_trim_smithing_template";MinecraftItemTypes2["SilverGlazedTerracotta"]="minecraft:silver_glazed_terracotta";MinecraftItemTypes2["SilverfishSpawnEgg"]="minecraft:silverfish_spawn_egg";MinecraftItemTypes2["SkeletonHorseSpawnEgg"]="minecraft:skeleton_horse_spawn_egg";MinecraftItemTypes2["SkeletonSpawnEgg"]="minecraft:skeleton_spawn_egg";MinecraftItemTypes2["Skull"]="minecraft:skull";MinecraftItemTypes2["SkullBannerPattern"]="minecraft:skull_banner_pattern";MinecraftItemTypes2["SkullPotterySherd"]="minecraft:skull_pottery_sherd";MinecraftItemTypes2["Slime"]="minecraft:slime";MinecraftItemTypes2["SlimeBall"]="minecraft:slime_ball";MinecraftItemTypes2["SlimeSpawnEgg"]="minecraft:slime_spawn_egg";MinecraftItemTypes2["SmallAmethystBud"]="minecraft:small_amethyst_bud";MinecraftItemTypes2["SmallDripleafBlock"]="minecraft:small_dripleaf_block";MinecraftItemTypes2["SmithingTable"]="minecraft:smithing_table";MinecraftItemTypes2["Smoker"]="minecraft:smoker";MinecraftItemTypes2["SmoothBasalt"]="minecraft:smooth_basalt";MinecraftItemTypes2["SmoothQuartzStairs"]="minecraft:smooth_quartz_stairs";MinecraftItemTypes2["SmoothRedSandstoneStairs"]="minecraft:smooth_red_sandstone_stairs";MinecraftItemTypes2["SmoothSandstoneStairs"]="minecraft:smooth_sandstone_stairs";MinecraftItemTypes2["SmoothStone"]="minecraft:smooth_stone";MinecraftItemTypes2["SnifferEgg"]="minecraft:sniffer_egg";MinecraftItemTypes2["SnifferSpawnEgg"]="minecraft:sniffer_spawn_egg";MinecraftItemTypes2["SnortPotterySherd"]="minecraft:snort_pottery_sherd";MinecraftItemTypes2["SnoutArmorTrimSmithingTemplate"]="minecraft:snout_armor_trim_smithing_template";MinecraftItemTypes2["Snow"]="minecraft:snow";MinecraftItemTypes2["SnowGolemSpawnEgg"]="minecraft:snow_golem_spawn_egg";MinecraftItemTypes2["SnowLayer"]="minecraft:snow_layer";MinecraftItemTypes2["Snowball"]="minecraft:snowball";MinecraftItemTypes2["SoulCampfire"]="minecraft:soul_campfire";MinecraftItemTypes2["SoulLantern"]="minecraft:soul_lantern";MinecraftItemTypes2["SoulSand"]="minecraft:soul_sand";MinecraftItemTypes2["SoulSoil"]="minecraft:soul_soil";MinecraftItemTypes2["SoulTorch"]="minecraft:soul_torch";MinecraftItemTypes2["SpawnEgg"]="minecraft:spawn_egg";MinecraftItemTypes2["SpiderEye"]="minecraft:spider_eye";MinecraftItemTypes2["SpiderSpawnEgg"]="minecraft:spider_spawn_egg";MinecraftItemTypes2["SpireArmorTrimSmithingTemplate"]="minecraft:spire_armor_trim_smithing_template";MinecraftItemTypes2["SplashPotion"]="minecraft:splash_potion";MinecraftItemTypes2["Sponge"]="minecraft:sponge";MinecraftItemTypes2["SporeBlossom"]="minecraft:spore_blossom";MinecraftItemTypes2["SpruceBoat"]="minecraft:spruce_boat";MinecraftItemTypes2["SpruceButton"]="minecraft:spruce_button";MinecraftItemTypes2["SpruceChestBoat"]="minecraft:spruce_chest_boat";MinecraftItemTypes2["SpruceDoor"]="minecraft:spruce_door";MinecraftItemTypes2["SpruceFence"]="minecraft:spruce_fence";MinecraftItemTypes2["SpruceFenceGate"]="minecraft:spruce_fence_gate";MinecraftItemTypes2["SpruceHangingSign"]="minecraft:spruce_hanging_sign";MinecraftItemTypes2["SpruceLog"]="minecraft:spruce_log";MinecraftItemTypes2["SprucePlanks"]="minecraft:spruce_planks";MinecraftItemTypes2["SprucePressurePlate"]="minecraft:spruce_pressure_plate";MinecraftItemTypes2["SpruceSign"]="minecraft:spruce_sign";MinecraftItemTypes2["SpruceStairs"]="minecraft:spruce_stairs";MinecraftItemTypes2["SpruceTrapdoor"]="minecraft:spruce_trapdoor";MinecraftItemTypes2["Spyglass"]="minecraft:spyglass";MinecraftItemTypes2["SquidSpawnEgg"]="minecraft:squid_spawn_egg";MinecraftItemTypes2["StainedGlass"]="minecraft:stained_glass";MinecraftItemTypes2["StainedGlassPane"]="minecraft:stained_glass_pane";MinecraftItemTypes2["StainedHardenedClay"]="minecraft:stained_hardened_clay";MinecraftItemTypes2["Stick"]="minecraft:stick";MinecraftItemTypes2["StickyPiston"]="minecraft:sticky_piston";MinecraftItemTypes2["Stone"]="minecraft:stone";MinecraftItemTypes2["StoneAxe"]="minecraft:stone_axe";MinecraftItemTypes2["StoneBlockSlab"]="minecraft:stone_block_slab";MinecraftItemTypes2["StoneBlockSlab2"]="minecraft:stone_block_slab2";MinecraftItemTypes2["StoneBlockSlab3"]="minecraft:stone_block_slab3";MinecraftItemTypes2["StoneBlockSlab4"]="minecraft:stone_block_slab4";MinecraftItemTypes2["StoneBrickStairs"]="minecraft:stone_brick_stairs";MinecraftItemTypes2["StoneButton"]="minecraft:stone_button";MinecraftItemTypes2["StoneHoe"]="minecraft:stone_hoe";MinecraftItemTypes2["StonePickaxe"]="minecraft:stone_pickaxe";MinecraftItemTypes2["StonePressurePlate"]="minecraft:stone_pressure_plate";MinecraftItemTypes2["StoneShovel"]="minecraft:stone_shovel";MinecraftItemTypes2["StoneStairs"]="minecraft:stone_stairs";MinecraftItemTypes2["StoneSword"]="minecraft:stone_sword";MinecraftItemTypes2["Stonebrick"]="minecraft:stonebrick";MinecraftItemTypes2["StonecutterBlock"]="minecraft:stonecutter_block";MinecraftItemTypes2["StraySpawnEgg"]="minecraft:stray_spawn_egg";MinecraftItemTypes2["StriderSpawnEgg"]="minecraft:strider_spawn_egg";MinecraftItemTypes2["String"]="minecraft:string";MinecraftItemTypes2["StrippedAcaciaLog"]="minecraft:stripped_acacia_log";MinecraftItemTypes2["StrippedBambooBlock"]="minecraft:stripped_bamboo_block";MinecraftItemTypes2["StrippedBirchLog"]="minecraft:stripped_birch_log";MinecraftItemTypes2["StrippedCherryLog"]="minecraft:stripped_cherry_log";MinecraftItemTypes2["StrippedCherryWood"]="minecraft:stripped_cherry_wood";MinecraftItemTypes2["StrippedCrimsonHyphae"]="minecraft:stripped_crimson_hyphae";MinecraftItemTypes2["StrippedCrimsonStem"]="minecraft:stripped_crimson_stem";MinecraftItemTypes2["StrippedDarkOakLog"]="minecraft:stripped_dark_oak_log";MinecraftItemTypes2["StrippedJungleLog"]="minecraft:stripped_jungle_log";MinecraftItemTypes2["StrippedMangroveLog"]="minecraft:stripped_mangrove_log";MinecraftItemTypes2["StrippedMangroveWood"]="minecraft:stripped_mangrove_wood";MinecraftItemTypes2["StrippedOakLog"]="minecraft:stripped_oak_log";MinecraftItemTypes2["StrippedSpruceLog"]="minecraft:stripped_spruce_log";MinecraftItemTypes2["StrippedWarpedHyphae"]="minecraft:stripped_warped_hyphae";MinecraftItemTypes2["StrippedWarpedStem"]="minecraft:stripped_warped_stem";MinecraftItemTypes2["StructureBlock"]="minecraft:structure_block";MinecraftItemTypes2["StructureVoid"]="minecraft:structure_void";MinecraftItemTypes2["Sugar"]="minecraft:sugar";MinecraftItemTypes2["SugarCane"]="minecraft:sugar_cane";MinecraftItemTypes2["SuspiciousGravel"]="minecraft:suspicious_gravel";MinecraftItemTypes2["SuspiciousSand"]="minecraft:suspicious_sand";MinecraftItemTypes2["SuspiciousStew"]="minecraft:suspicious_stew";MinecraftItemTypes2["SweetBerries"]="minecraft:sweet_berries";MinecraftItemTypes2["TadpoleBucket"]="minecraft:tadpole_bucket";MinecraftItemTypes2["TadpoleSpawnEgg"]="minecraft:tadpole_spawn_egg";MinecraftItemTypes2["Tallgrass"]="minecraft:tallgrass";MinecraftItemTypes2["Target"]="minecraft:target";MinecraftItemTypes2["TideArmorTrimSmithingTemplate"]="minecraft:tide_armor_trim_smithing_template";MinecraftItemTypes2["TintedGlass"]="minecraft:tinted_glass";MinecraftItemTypes2["Tnt"]="minecraft:tnt";MinecraftItemTypes2["TntMinecart"]="minecraft:tnt_minecart";MinecraftItemTypes2["Torch"]="minecraft:torch";MinecraftItemTypes2["Torchflower"]="minecraft:torchflower";MinecraftItemTypes2["TorchflowerSeeds"]="minecraft:torchflower_seeds";MinecraftItemTypes2["TotemOfUndying"]="minecraft:totem_of_undying";MinecraftItemTypes2["TraderLlamaSpawnEgg"]="minecraft:trader_llama_spawn_egg";MinecraftItemTypes2["Trapdoor"]="minecraft:trapdoor";MinecraftItemTypes2["TrappedChest"]="minecraft:trapped_chest";MinecraftItemTypes2["TrialKey"]="minecraft:trial_key";MinecraftItemTypes2["TrialSpawner"]="minecraft:trial_spawner";MinecraftItemTypes2["Trident"]="minecraft:trident";MinecraftItemTypes2["TripwireHook"]="minecraft:tripwire_hook";MinecraftItemTypes2["TropicalFish"]="minecraft:tropical_fish";MinecraftItemTypes2["TropicalFishBucket"]="minecraft:tropical_fish_bucket";MinecraftItemTypes2["TropicalFishSpawnEgg"]="minecraft:tropical_fish_spawn_egg";MinecraftItemTypes2["TubeCoral"]="minecraft:tube_coral";MinecraftItemTypes2["Tuff"]="minecraft:tuff";MinecraftItemTypes2["TuffBrickSlab"]="minecraft:tuff_brick_slab";MinecraftItemTypes2["TuffBrickStairs"]="minecraft:tuff_brick_stairs";MinecraftItemTypes2["TuffBrickWall"]="minecraft:tuff_brick_wall";MinecraftItemTypes2["TuffBricks"]="minecraft:tuff_bricks";MinecraftItemTypes2["TuffSlab"]="minecraft:tuff_slab";MinecraftItemTypes2["TuffStairs"]="minecraft:tuff_stairs";MinecraftItemTypes2["TuffWall"]="minecraft:tuff_wall";MinecraftItemTypes2["TurtleEgg"]="minecraft:turtle_egg";MinecraftItemTypes2["TurtleHelmet"]="minecraft:turtle_helmet";MinecraftItemTypes2["TurtleScute"]="minecraft:turtle_scute";MinecraftItemTypes2["TurtleSpawnEgg"]="minecraft:turtle_spawn_egg";MinecraftItemTypes2["TwistingVines"]="minecraft:twisting_vines";MinecraftItemTypes2["UndyedShulkerBox"]="minecraft:undyed_shulker_box";MinecraftItemTypes2["VerdantFroglight"]="minecraft:verdant_froglight";MinecraftItemTypes2["VexArmorTrimSmithingTemplate"]="minecraft:vex_armor_trim_smithing_template";MinecraftItemTypes2["VexSpawnEgg"]="minecraft:vex_spawn_egg";MinecraftItemTypes2["VillagerSpawnEgg"]="minecraft:villager_spawn_egg";MinecraftItemTypes2["VindicatorSpawnEgg"]="minecraft:vindicator_spawn_egg";MinecraftItemTypes2["Vine"]="minecraft:vine";MinecraftItemTypes2["WanderingTraderSpawnEgg"]="minecraft:wandering_trader_spawn_egg";MinecraftItemTypes2["WardArmorTrimSmithingTemplate"]="minecraft:ward_armor_trim_smithing_template";MinecraftItemTypes2["WardenSpawnEgg"]="minecraft:warden_spawn_egg";MinecraftItemTypes2["WarpedButton"]="minecraft:warped_button";MinecraftItemTypes2["WarpedDoor"]="minecraft:warped_door";MinecraftItemTypes2["WarpedFence"]="minecraft:warped_fence";MinecraftItemTypes2["WarpedFenceGate"]="minecraft:warped_fence_gate";MinecraftItemTypes2["WarpedFungus"]="minecraft:warped_fungus";MinecraftItemTypes2["WarpedFungusOnAStick"]="minecraft:warped_fungus_on_a_stick";MinecraftItemTypes2["WarpedHangingSign"]="minecraft:warped_hanging_sign";MinecraftItemTypes2["WarpedHyphae"]="minecraft:warped_hyphae";MinecraftItemTypes2["WarpedNylium"]="minecraft:warped_nylium";MinecraftItemTypes2["WarpedPlanks"]="minecraft:warped_planks";MinecraftItemTypes2["WarpedPressurePlate"]="minecraft:warped_pressure_plate";MinecraftItemTypes2["WarpedRoots"]="minecraft:warped_roots";MinecraftItemTypes2["WarpedSign"]="minecraft:warped_sign";MinecraftItemTypes2["WarpedSlab"]="minecraft:warped_slab";MinecraftItemTypes2["WarpedStairs"]="minecraft:warped_stairs";MinecraftItemTypes2["WarpedStem"]="minecraft:warped_stem";MinecraftItemTypes2["WarpedTrapdoor"]="minecraft:warped_trapdoor";MinecraftItemTypes2["WarpedWartBlock"]="minecraft:warped_wart_block";MinecraftItemTypes2["WaterBucket"]="minecraft:water_bucket";MinecraftItemTypes2["Waterlily"]="minecraft:waterlily";MinecraftItemTypes2["WaxedChiseledCopper"]="minecraft:waxed_chiseled_copper";MinecraftItemTypes2["WaxedCopper"]="minecraft:waxed_copper";MinecraftItemTypes2["WaxedCopperBulb"]="minecraft:waxed_copper_bulb";MinecraftItemTypes2["WaxedCopperDoor"]="minecraft:waxed_copper_door";MinecraftItemTypes2["WaxedCopperGrate"]="minecraft:waxed_copper_grate";MinecraftItemTypes2["WaxedCopperTrapdoor"]="minecraft:waxed_copper_trapdoor";MinecraftItemTypes2["WaxedCutCopper"]="minecraft:waxed_cut_copper";MinecraftItemTypes2["WaxedCutCopperSlab"]="minecraft:waxed_cut_copper_slab";MinecraftItemTypes2["WaxedCutCopperStairs"]="minecraft:waxed_cut_copper_stairs";MinecraftItemTypes2["WaxedExposedChiseledCopper"]="minecraft:waxed_exposed_chiseled_copper";MinecraftItemTypes2["WaxedExposedCopper"]="minecraft:waxed_exposed_copper";MinecraftItemTypes2["WaxedExposedCopperBulb"]="minecraft:waxed_exposed_copper_bulb";MinecraftItemTypes2["WaxedExposedCopperDoor"]="minecraft:waxed_exposed_copper_door";MinecraftItemTypes2["WaxedExposedCopperGrate"]="minecraft:waxed_exposed_copper_grate";MinecraftItemTypes2["WaxedExposedCopperTrapdoor"]="minecraft:waxed_exposed_copper_trapdoor";MinecraftItemTypes2["WaxedExposedCutCopper"]="minecraft:waxed_exposed_cut_copper";MinecraftItemTypes2["WaxedExposedCutCopperSlab"]="minecraft:waxed_exposed_cut_copper_slab";MinecraftItemTypes2["WaxedExposedCutCopperStairs"]="minecraft:waxed_exposed_cut_copper_stairs";MinecraftItemTypes2["WaxedOxidizedChiseledCopper"]="minecraft:waxed_oxidized_chiseled_copper";MinecraftItemTypes2["WaxedOxidizedCopper"]="minecraft:waxed_oxidized_copper";MinecraftItemTypes2["WaxedOxidizedCopperBulb"]="minecraft:waxed_oxidized_copper_bulb";MinecraftItemTypes2["WaxedOxidizedCopperDoor"]="minecraft:waxed_oxidized_copper_door";MinecraftItemTypes2["WaxedOxidizedCopperGrate"]="minecraft:waxed_oxidized_copper_grate";MinecraftItemTypes2["WaxedOxidizedCopperTrapdoor"]="minecraft:waxed_oxidized_copper_trapdoor";MinecraftItemTypes2["WaxedOxidizedCutCopper"]="minecraft:waxed_oxidized_cut_copper";MinecraftItemTypes2["WaxedOxidizedCutCopperSlab"]="minecraft:waxed_oxidized_cut_copper_slab";MinecraftItemTypes2["WaxedOxidizedCutCopperStairs"]="minecraft:waxed_oxidized_cut_copper_stairs";MinecraftItemTypes2["WaxedWeatheredChiseledCopper"]="minecraft:waxed_weathered_chiseled_copper";MinecraftItemTypes2["WaxedWeatheredCopper"]="minecraft:waxed_weathered_copper";MinecraftItemTypes2["WaxedWeatheredCopperBulb"]="minecraft:waxed_weathered_copper_bulb";MinecraftItemTypes2["WaxedWeatheredCopperDoor"]="minecraft:waxed_weathered_copper_door";MinecraftItemTypes2["WaxedWeatheredCopperGrate"]="minecraft:waxed_weathered_copper_grate";MinecraftItemTypes2["WaxedWeatheredCopperTrapdoor"]="minecraft:waxed_weathered_copper_trapdoor";MinecraftItemTypes2["WaxedWeatheredCutCopper"]="minecraft:waxed_weathered_cut_copper";MinecraftItemTypes2["WaxedWeatheredCutCopperSlab"]="minecraft:waxed_weathered_cut_copper_slab";MinecraftItemTypes2["WaxedWeatheredCutCopperStairs"]="minecraft:waxed_weathered_cut_copper_stairs";MinecraftItemTypes2["WayfinderArmorTrimSmithingTemplate"]="minecraft:wayfinder_armor_trim_smithing_template";MinecraftItemTypes2["WeatheredChiseledCopper"]="minecraft:weathered_chiseled_copper";MinecraftItemTypes2["WeatheredCopper"]="minecraft:weathered_copper";MinecraftItemTypes2["WeatheredCopperBulb"]="minecraft:weathered_copper_bulb";MinecraftItemTypes2["WeatheredCopperDoor"]="minecraft:weathered_copper_door";MinecraftItemTypes2["WeatheredCopperGrate"]="minecraft:weathered_copper_grate";MinecraftItemTypes2["WeatheredCopperTrapdoor"]="minecraft:weathered_copper_trapdoor";MinecraftItemTypes2["WeatheredCutCopper"]="minecraft:weathered_cut_copper";MinecraftItemTypes2["WeatheredCutCopperSlab"]="minecraft:weathered_cut_copper_slab";MinecraftItemTypes2["WeatheredCutCopperStairs"]="minecraft:weathered_cut_copper_stairs";MinecraftItemTypes2["Web"]="minecraft:web";MinecraftItemTypes2["WeepingVines"]="minecraft:weeping_vines";MinecraftItemTypes2["Wheat"]="minecraft:wheat";MinecraftItemTypes2["WheatSeeds"]="minecraft:wheat_seeds";MinecraftItemTypes2["WhiteCandle"]="minecraft:white_candle";MinecraftItemTypes2["WhiteCarpet"]="minecraft:white_carpet";MinecraftItemTypes2["WhiteConcrete"]="minecraft:white_concrete";MinecraftItemTypes2["WhiteConcretePowder"]="minecraft:white_concrete_powder";MinecraftItemTypes2["WhiteDye"]="minecraft:white_dye";MinecraftItemTypes2["WhiteGlazedTerracotta"]="minecraft:white_glazed_terracotta";MinecraftItemTypes2["WhiteShulkerBox"]="minecraft:white_shulker_box";MinecraftItemTypes2["WhiteStainedGlass"]="minecraft:white_stained_glass";MinecraftItemTypes2["WhiteStainedGlassPane"]="minecraft:white_stained_glass_pane";MinecraftItemTypes2["WhiteTerracotta"]="minecraft:white_terracotta";MinecraftItemTypes2["WhiteWool"]="minecraft:white_wool";MinecraftItemTypes2["WildArmorTrimSmithingTemplate"]="minecraft:wild_armor_trim_smithing_template";MinecraftItemTypes2["WitchSpawnEgg"]="minecraft:witch_spawn_egg";MinecraftItemTypes2["WitherRose"]="minecraft:wither_rose";MinecraftItemTypes2["WitherSkeletonSpawnEgg"]="minecraft:wither_skeleton_spawn_egg";MinecraftItemTypes2["WitherSpawnEgg"]="minecraft:wither_spawn_egg";MinecraftItemTypes2["WolfArmor"]="minecraft:wolf_armor";MinecraftItemTypes2["WolfSpawnEgg"]="minecraft:wolf_spawn_egg";MinecraftItemTypes2["Wood"]="minecraft:wood";MinecraftItemTypes2["WoodenAxe"]="minecraft:wooden_axe";MinecraftItemTypes2["WoodenButton"]="minecraft:wooden_button";MinecraftItemTypes2["WoodenDoor"]="minecraft:wooden_door";MinecraftItemTypes2["WoodenHoe"]="minecraft:wooden_hoe";MinecraftItemTypes2["WoodenPickaxe"]="minecraft:wooden_pickaxe";MinecraftItemTypes2["WoodenPressurePlate"]="minecraft:wooden_pressure_plate";MinecraftItemTypes2["WoodenShovel"]="minecraft:wooden_shovel";MinecraftItemTypes2["WoodenSlab"]="minecraft:wooden_slab";MinecraftItemTypes2["WoodenSword"]="minecraft:wooden_sword";MinecraftItemTypes2["Wool"]="minecraft:wool";MinecraftItemTypes2["WritableBook"]="minecraft:writable_book";MinecraftItemTypes2["YellowCandle"]="minecraft:yellow_candle";MinecraftItemTypes2["YellowCarpet"]="minecraft:yellow_carpet";MinecraftItemTypes2["YellowConcrete"]="minecraft:yellow_concrete";MinecraftItemTypes2["YellowConcretePowder"]="minecraft:yellow_concrete_powder";MinecraftItemTypes2["YellowDye"]="minecraft:yellow_dye";MinecraftItemTypes2["YellowFlower"]="minecraft:yellow_flower";MinecraftItemTypes2["YellowGlazedTerracotta"]="minecraft:yellow_glazed_terracotta";MinecraftItemTypes2["YellowShulkerBox"]="minecraft:yellow_shulker_box";MinecraftItemTypes2["YellowStainedGlass"]="minecraft:yellow_stained_glass";MinecraftItemTypes2["YellowStainedGlassPane"]="minecraft:yellow_stained_glass_pane";MinecraftItemTypes2["YellowTerracotta"]="minecraft:yellow_terracotta";MinecraftItemTypes2["YellowWool"]="minecraft:yellow_wool";MinecraftItemTypes2["ZoglinSpawnEgg"]="minecraft:zoglin_spawn_egg";MinecraftItemTypes2["ZombieHorseSpawnEgg"]="minecraft:zombie_horse_spawn_egg";MinecraftItemTypes2["ZombiePigmanSpawnEgg"]="minecraft:zombie_pigman_spawn_egg";MinecraftItemTypes2["ZombieSpawnEgg"]="minecraft:zombie_spawn_egg";MinecraftItemTypes2["ZombieVillagerSpawnEgg"]="minecraft:zombie_villager_spawn_egg";return MinecraftItemTypes2})(MinecraftItemTypes||{});export{MinecraftBiomeTypes,MinecraftBlockTypes,MinecraftCameraPresetsTypes,MinecraftDimensionTypes,MinecraftEffectTypes,MinecraftEnchantmentTypes,MinecraftEntityTypes,MinecraftFeatureTypes,MinecraftItemTypes}; diff --git a/src/node_modules/@minecraft/vanilla-data/lib/mojang-biome.d.ts b/src/node_modules/@minecraft/vanilla-data/lib/mojang-biome.d.ts new file mode 100644 index 0000000..ae468f7 --- /dev/null +++ b/src/node_modules/@minecraft/vanilla-data/lib/mojang-biome.d.ts @@ -0,0 +1,95 @@ +/** + * All possible MinecraftBiomeTypes + */ +export declare enum MinecraftBiomeTypes { + BambooJungle = "minecraft:bamboo_jungle", + BambooJungleHills = "minecraft:bamboo_jungle_hills", + BasaltDeltas = "minecraft:basalt_deltas", + Beach = "minecraft:beach", + BirchForest = "minecraft:birch_forest", + BirchForestHills = "minecraft:birch_forest_hills", + BirchForestHillsMutated = "minecraft:birch_forest_hills_mutated", + BirchForestMutated = "minecraft:birch_forest_mutated", + CherryGrove = "minecraft:cherry_grove", + ColdBeach = "minecraft:cold_beach", + ColdOcean = "minecraft:cold_ocean", + ColdTaiga = "minecraft:cold_taiga", + ColdTaigaHills = "minecraft:cold_taiga_hills", + ColdTaigaMutated = "minecraft:cold_taiga_mutated", + CrimsonForest = "minecraft:crimson_forest", + DeepColdOcean = "minecraft:deep_cold_ocean", + DeepDark = "minecraft:deep_dark", + DeepFrozenOcean = "minecraft:deep_frozen_ocean", + DeepLukewarmOcean = "minecraft:deep_lukewarm_ocean", + DeepOcean = "minecraft:deep_ocean", + DeepWarmOcean = "minecraft:deep_warm_ocean", + Desert = "minecraft:desert", + DesertHills = "minecraft:desert_hills", + DesertMutated = "minecraft:desert_mutated", + DripstoneCaves = "minecraft:dripstone_caves", + ExtremeHills = "minecraft:extreme_hills", + ExtremeHillsEdge = "minecraft:extreme_hills_edge", + ExtremeHillsMutated = "minecraft:extreme_hills_mutated", + ExtremeHillsPlusTrees = "minecraft:extreme_hills_plus_trees", + ExtremeHillsPlusTreesMutated = "minecraft:extreme_hills_plus_trees_mutated", + FlowerForest = "minecraft:flower_forest", + Forest = "minecraft:forest", + ForestHills = "minecraft:forest_hills", + FrozenOcean = "minecraft:frozen_ocean", + FrozenPeaks = "minecraft:frozen_peaks", + FrozenRiver = "minecraft:frozen_river", + Grove = "minecraft:grove", + Hell = "minecraft:hell", + IceMountains = "minecraft:ice_mountains", + IcePlains = "minecraft:ice_plains", + IcePlainsSpikes = "minecraft:ice_plains_spikes", + JaggedPeaks = "minecraft:jagged_peaks", + Jungle = "minecraft:jungle", + JungleEdge = "minecraft:jungle_edge", + JungleEdgeMutated = "minecraft:jungle_edge_mutated", + JungleHills = "minecraft:jungle_hills", + JungleMutated = "minecraft:jungle_mutated", + LegacyFrozenOcean = "minecraft:legacy_frozen_ocean", + LukewarmOcean = "minecraft:lukewarm_ocean", + LushCaves = "minecraft:lush_caves", + MangroveSwamp = "minecraft:mangrove_swamp", + Meadow = "minecraft:meadow", + MegaTaiga = "minecraft:mega_taiga", + MegaTaigaHills = "minecraft:mega_taiga_hills", + Mesa = "minecraft:mesa", + MesaBryce = "minecraft:mesa_bryce", + MesaPlateau = "minecraft:mesa_plateau", + MesaPlateauMutated = "minecraft:mesa_plateau_mutated", + MesaPlateauStone = "minecraft:mesa_plateau_stone", + MesaPlateauStoneMutated = "minecraft:mesa_plateau_stone_mutated", + MushroomIsland = "minecraft:mushroom_island", + MushroomIslandShore = "minecraft:mushroom_island_shore", + Ocean = "minecraft:ocean", + Plains = "minecraft:plains", + RedwoodTaigaHillsMutated = "minecraft:redwood_taiga_hills_mutated", + RedwoodTaigaMutated = "minecraft:redwood_taiga_mutated", + River = "minecraft:river", + RoofedForest = "minecraft:roofed_forest", + RoofedForestMutated = "minecraft:roofed_forest_mutated", + Savanna = "minecraft:savanna", + SavannaMutated = "minecraft:savanna_mutated", + SavannaPlateau = "minecraft:savanna_plateau", + SavannaPlateauMutated = "minecraft:savanna_plateau_mutated", + SnowySlopes = "minecraft:snowy_slopes", + SoulsandValley = "minecraft:soulsand_valley", + StoneBeach = "minecraft:stone_beach", + StonyPeaks = "minecraft:stony_peaks", + SunflowerPlains = "minecraft:sunflower_plains", + Swampland = "minecraft:swampland", + SwamplandMutated = "minecraft:swampland_mutated", + Taiga = "minecraft:taiga", + TaigaHills = "minecraft:taiga_hills", + TaigaMutated = "minecraft:taiga_mutated", + TheEnd = "minecraft:the_end", + WarmOcean = "minecraft:warm_ocean", + WarpedForest = "minecraft:warped_forest" +} +/** + * Union type equivalent of the MinecraftBiomeTypes enum. + */ +export type MinecraftBiomeTypesUnion = keyof typeof MinecraftBiomeTypes; diff --git a/src/node_modules/@minecraft/vanilla-data/lib/mojang-block.d.ts b/src/node_modules/@minecraft/vanilla-data/lib/mojang-block.d.ts index bd566d0..2c51db5 100644 --- a/src/node_modules/@minecraft/vanilla-data/lib/mojang-block.d.ts +++ b/src/node_modules/@minecraft/vanilla-data/lib/mojang-block.d.ts @@ -488,10 +488,40 @@ export declare enum MinecraftBlockTypes { GreenWool = "minecraft:green_wool", Grindstone = "minecraft:grindstone", HangingRoots = "minecraft:hanging_roots", + HardBlackStainedGlass = "minecraft:hard_black_stained_glass", + HardBlackStainedGlassPane = "minecraft:hard_black_stained_glass_pane", + HardBlueStainedGlass = "minecraft:hard_blue_stained_glass", + HardBlueStainedGlassPane = "minecraft:hard_blue_stained_glass_pane", + HardBrownStainedGlass = "minecraft:hard_brown_stained_glass", + HardBrownStainedGlassPane = "minecraft:hard_brown_stained_glass_pane", + HardCyanStainedGlass = "minecraft:hard_cyan_stained_glass", + HardCyanStainedGlassPane = "minecraft:hard_cyan_stained_glass_pane", HardGlass = "minecraft:hard_glass", HardGlassPane = "minecraft:hard_glass_pane", - HardStainedGlass = "minecraft:hard_stained_glass", - HardStainedGlassPane = "minecraft:hard_stained_glass_pane", + HardGrayStainedGlass = "minecraft:hard_gray_stained_glass", + HardGrayStainedGlassPane = "minecraft:hard_gray_stained_glass_pane", + HardGreenStainedGlass = "minecraft:hard_green_stained_glass", + HardGreenStainedGlassPane = "minecraft:hard_green_stained_glass_pane", + HardLightBlueStainedGlass = "minecraft:hard_light_blue_stained_glass", + HardLightBlueStainedGlassPane = "minecraft:hard_light_blue_stained_glass_pane", + HardLightGrayStainedGlass = "minecraft:hard_light_gray_stained_glass", + HardLightGrayStainedGlassPane = "minecraft:hard_light_gray_stained_glass_pane", + HardLimeStainedGlass = "minecraft:hard_lime_stained_glass", + HardLimeStainedGlassPane = "minecraft:hard_lime_stained_glass_pane", + HardMagentaStainedGlass = "minecraft:hard_magenta_stained_glass", + HardMagentaStainedGlassPane = "minecraft:hard_magenta_stained_glass_pane", + HardOrangeStainedGlass = "minecraft:hard_orange_stained_glass", + HardOrangeStainedGlassPane = "minecraft:hard_orange_stained_glass_pane", + HardPinkStainedGlass = "minecraft:hard_pink_stained_glass", + HardPinkStainedGlassPane = "minecraft:hard_pink_stained_glass_pane", + HardPurpleStainedGlass = "minecraft:hard_purple_stained_glass", + HardPurpleStainedGlassPane = "minecraft:hard_purple_stained_glass_pane", + HardRedStainedGlass = "minecraft:hard_red_stained_glass", + HardRedStainedGlassPane = "minecraft:hard_red_stained_glass_pane", + HardWhiteStainedGlass = "minecraft:hard_white_stained_glass", + HardWhiteStainedGlassPane = "minecraft:hard_white_stained_glass_pane", + HardYellowStainedGlass = "minecraft:hard_yellow_stained_glass", + HardYellowStainedGlassPane = "minecraft:hard_yellow_stained_glass_pane", HardenedClay = "minecraft:hardened_clay", HayBlock = "minecraft:hay_block", HeavyWeightedPressurePlate = "minecraft:heavy_weighted_pressure_plate", @@ -871,6 +901,7 @@ export declare enum MinecraftBlockTypes { TorchflowerCrop = "minecraft:torchflower_crop", Trapdoor = "minecraft:trapdoor", TrappedChest = "minecraft:trapped_chest", + TrialSpawner = "minecraft:trial_spawner", TripWire = "minecraft:trip_wire", TripwireHook = "minecraft:tripwire_hook", TubeCoral = "minecraft:tube_coral", @@ -1127,6 +1158,7 @@ export type BlockStateSuperset = { ['toggle_bit']?: boolean; ['top_slot_bit']?: boolean; ['torch_facing_direction']?: string; + ['trial_spawner_state']?: number; ['triggered_bit']?: boolean; ['turtle_egg_count']?: string; ['twisting_vines_age']?: number; @@ -1976,14 +2008,6 @@ export type GreenGlazedTerracottaStates = Pick; -/** - * States specific to HardStainedGlass - */ -export type HardStainedGlassStates = Pick; -/** - * States specific to HardStainedGlassPane - */ -export type HardStainedGlassPaneStates = Pick; /** * States specific to HayBlock */ @@ -2884,6 +2908,10 @@ export type TrapdoorStates = Pick; +/** + * States specific to TrialSpawner + */ +export type TrialSpawnerStates = Pick; /** * States specific to TripWire */ @@ -3195,7 +3223,7 @@ export type YellowGlazedTerracottaStates = Pick { // Check if the player is muted if (player.hasTag("isMuted")) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 現在ミュートされています.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You are currently muted.`); msg.cancel = true; // Cancel the chat message return; } diff --git a/src/penrose/EntityDieAfterEvent/death_coordinates.ts b/src/penrose/EntityDieAfterEvent/death_coordinates.ts index d70da80..b18de40 100644 --- a/src/penrose/EntityDieAfterEvent/death_coordinates.ts +++ b/src/penrose/EntityDieAfterEvent/death_coordinates.ts @@ -10,7 +10,7 @@ function deathcoordinates(event: EntityDieAfterEvent): void { const { x, y, z } = deadEntity.location; - sendMsgToPlayer(deadEntity, `§f§4[§6Paradox§4]§f X: ${x.toFixed(0)}, Y: ${y.toFixed(0)}, Z: ${z.toFixed(0)}で死にました.`); + sendMsgToPlayer(deadEntity, `§f§4[§6Paradox§4]§f You died at X: ${x.toFixed(0)}, Y: ${y.toFixed(0)}, Z: ${z.toFixed(0)}.`); } const DeathCoordinates = (): void => { diff --git a/src/penrose/EntityHitEntityAfterEvent/killaura.ts b/src/penrose/EntityHitEntityAfterEvent/killaura.ts index a079447..d493e9f 100644 --- a/src/penrose/EntityHitEntityAfterEvent/killaura.ts +++ b/src/penrose/EntityHitEntityAfterEvent/killaura.ts @@ -120,8 +120,8 @@ function freeze(id: number) { player.removeTag("freezeAura"); return; } - player.onScreenDisplay.setTitle("§f§4[§6Paradox§4]§f 凍結!", { - subtitle: "§fスタッフに連絡 §4[§6AntiKillAura§4]§f", + player.onScreenDisplay.setTitle("§f§4[§6Paradox§4]§f Frozen!", { + subtitle: "§fContact Staff §4[§6AntiKillAura§4]§f", fadeInDuration: 0, fadeOutDuration: 0, stayDuration: 60, diff --git a/src/penrose/EntityHitEntityAfterEvent/pvpManager.ts b/src/penrose/EntityHitEntityAfterEvent/pvpManager.ts index c730b42..6775f43 100644 --- a/src/penrose/EntityHitEntityAfterEvent/pvpManager.ts +++ b/src/penrose/EntityHitEntityAfterEvent/pvpManager.ts @@ -10,7 +10,7 @@ function punishment(event: EntityDieAfterEvent) { const criminal = damageSource.damagingEntity; if (deadEntity instanceof Player && criminal instanceof Player && (criminal.hasTag("pvpDisabled") || deadEntity.hasTag("pvpDisabled"))) { - sendMsgToPlayer(criminal, `§f§4[§6Paradox§4]§f §7${deadEntity.name}を倒した§f PvPが無効になっている間。攻撃できません!`); + sendMsgToPlayer(criminal, `§f§4[§6Paradox§4]§f You killed §7${deadEntity.name}§f while pvp was disabled. You were punished!`); criminal.kill(); return; } @@ -30,7 +30,7 @@ function pvp(obj: EntityHitEntityAfterEvent) { } if (hitEntity.hasTag("pvpDisabled")) { - sendMsgToPlayer(damagingEntity, `§f§4[§6Paradox§4]§f このプレイヤーにはPvP無効があります!`); + sendMsgToPlayer(damagingEntity, `§f§4[§6Paradox§4]§f This player has PVP Disabled!`); const effectsToAdd = [MinecraftEffectTypes.InstantHealth]; for (const effectType of effectsToAdd) { @@ -48,7 +48,7 @@ function pvp(obj: EntityHitEntityAfterEvent) { } if (pvpDataForHitEntity.counter === 10) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${damagingEntity.name}§fが攻撃しました §7${hitEntity.name}§f は §7${hitEntity.name}§f PVPが無効になっています.`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${damagingEntity.name}§f has attacked §7${hitEntity.name}§f while §7${hitEntity.name}§f has PVP disabled.`); pvpDataForHitEntity.counter = 0; } @@ -58,7 +58,7 @@ function pvp(obj: EntityHitEntityAfterEvent) { if (damagingEntity.hasTag("pvpDisabled")) { // Prevent attacking player with PvP disabled - sendMsgToPlayer(damagingEntity, `§f§4[§6Paradox§4]§f PvP無効化中は攻撃できません!`); + sendMsgToPlayer(damagingEntity, `§f§4[§6Paradox§4]§f You cannot attack while you have PvP Disabled!`); // Heal the player being attacked const effectsToAdd = [MinecraftEffectTypes.InstantHealth]; diff --git a/src/penrose/PlayerBreakBlockAfterEvent/nuker/nuker_a.ts b/src/penrose/PlayerBreakBlockAfterEvent/nuker/nuker_a.ts index 1afb1ce..347d516 100644 --- a/src/penrose/PlayerBreakBlockAfterEvent/nuker/nuker_a.ts +++ b/src/penrose/PlayerBreakBlockAfterEvent/nuker/nuker_a.ts @@ -186,6 +186,7 @@ async function afternukera( MinecraftBlockTypes.SnowLayer, MinecraftBlockTypes.PowderSnow, MinecraftBlockTypes.RedstoneWire, + MinecraftBlockTypes.Scaffolding, ]; const efficiencyLevels: Record = { @@ -274,8 +275,8 @@ function freeze(id: number) { player.removeTag("freezeNukerA"); return; } - player.onScreenDisplay.setTitle("§f§4[§6Paradox§4]§f 凍結!", { - subtitle: "§fスタッフに連絡 §4[§6AntiNukerA§4]§f", + player.onScreenDisplay.setTitle("§f§4[§6Paradox§4]§f Frozen!", { + subtitle: "§fContact Staff §4[§6AntiNukerA§4]§f", fadeInDuration: 0, fadeOutDuration: 0, stayDuration: 60, diff --git a/src/penrose/PlayerBreakBlockAfterEvent/xray/xray_a.ts b/src/penrose/PlayerBreakBlockAfterEvent/xray/xray_a.ts index f627dc7..b734b1e 100644 --- a/src/penrose/PlayerBreakBlockAfterEvent/xray/xray_a.ts +++ b/src/penrose/PlayerBreakBlockAfterEvent/xray/xray_a.ts @@ -104,9 +104,7 @@ function xraya(object: PlayerBreakBlockAfterEvent) { if (isXraySuspicious(playerId, brokenBlockPermutation.type.id)) { sendMsg( `@a[tag=notify]`, - `§f§4[§6Paradox§4]§f §4[Xray]§f ${player.name}§f§6 が鉱石を見つけました §f${blocksBrokenCount.get(playerId)}x ${brokenBlockPermutation.type.id.replace("minecraft:", "")}§6 at X=§f${x.toFixed(0)}§6 Y=§f${y.toFixed( - 0 - )}§6 Z=§f${z.toFixed(0)}.` + `§f§4[§6Paradox§4]§f §4[Xray]§f ${player.name}§f§6 has found §f${blocksBrokenCount.get(playerId)}x ${brokenBlockPermutation.type.id.replace("minecraft:", "")}§6 at X=§f${x.toFixed(0)}§6 Y=§f${y.toFixed(0)}§6 Z=§f${z.toFixed(0)}.` ); // Reset the count after notifying blocksBrokenCount.set(playerId, 0); diff --git a/src/penrose/PlayerPlaceBlockAfterEvent/illegalitems/illegalitems_b.ts b/src/penrose/PlayerPlaceBlockAfterEvent/illegalitems/illegalitems_b.ts index 6c0a067..483e2cd 100644 --- a/src/penrose/PlayerPlaceBlockAfterEvent/illegalitems/illegalitems_b.ts +++ b/src/penrose/PlayerPlaceBlockAfterEvent/illegalitems/illegalitems_b.ts @@ -159,8 +159,8 @@ async function illegalitemsb(object: PlayerPlaceBlockAfterEvent) { // Anti Shulker Boxes if (antiShulkerBoolean && itemStackId.includes("shulker")) { blockContainer.setItem(i); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f 取り去る ${block.typeId.replace("minecraft:", "")} 差出人 §7${player.name}§f.`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f シュルカーボックスは許可されていません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${block.typeId.replace("minecraft:", "")} from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Shulker Boxes are not allowed!`); continue; } @@ -169,8 +169,8 @@ async function illegalitemsb(object: PlayerPlaceBlockAfterEvent) { const maxStack = blockItemStack.maxAmount; if (stackBanBoolean && currentStack > maxStack) { blockContainer.setItem(i); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${itemStackId.replace("minecraft:", "")} x ${currentStack} を§7${player.name}§f.`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 違法なスタックは許可されていません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${itemStackId.replace("minecraft:", "")} x ${currentStack} from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Illegal Stacks are not allowed!`); rip(player, blockItemStack, null, block); isFlagged = true; break; @@ -179,8 +179,8 @@ async function illegalitemsb(object: PlayerPlaceBlockAfterEvent) { // If the item is in the "illegalitems" object, remove it from the block's inventory and run the "rip" function on it if (itemStackId in illegalitems) { blockContainer.setItem(i); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f§7${player.name}§f から ${itemStackId.replace("minecraft:", "")} を削除しました。.`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 違法な商品は許可されていません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${itemStackId.replace("minecraft:", "")} from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Illegal Items are not allowed!`); rip(player, blockItemStack, null, block); isFlagged = true; break; @@ -189,8 +189,8 @@ async function illegalitemsb(object: PlayerPlaceBlockAfterEvent) { // Illegal Lores if (illegalLoresBoolean && !configuration.modules.illegalLores.exclude.includes(String(blockItemStack.getLore()))) { blockContainer.setItem(i); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f§7${player.name}§f から ${itemStackId.replace("minecraft:", "")} を伝承で削除しました.`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 違法な伝承を含むアイテムは許可されていません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${itemStackId.replace("minecraft:", "")} with lore from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Item with illegal lores are not allowed!`); rip(player, blockItemStack, null, block); isFlagged = true; break; @@ -264,8 +264,8 @@ async function illegalitemsb(object: PlayerPlaceBlockAfterEvent) { }; const itemStackId = blockContainer.getItem(itemSlot); blockContainer.setItem(itemSlot); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f§7${player.name}§f から ${itemStackId.typeId.replace("minecraft:", "")} with Illegal Enchantments を削除しました。.`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 違法なエンチャントを持つアイテムは許可されていません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${itemStackId.typeId.replace("minecraft:", "")} with Illegal Enchantments from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Item with illegal Enchantments are not allowed!`); enchantmentPresenceMap.clear(); enchantmentDataMap.clear(); inventorySlotMap.clear(); diff --git a/src/penrose/PlayerPlaceBlockAfterEvent/scaffold/scaffold_a.ts b/src/penrose/PlayerPlaceBlockAfterEvent/scaffold/scaffold_a.ts index e96439c..a6ce3eb 100644 --- a/src/penrose/PlayerPlaceBlockAfterEvent/scaffold/scaffold_a.ts +++ b/src/penrose/PlayerPlaceBlockAfterEvent/scaffold/scaffold_a.ts @@ -30,8 +30,8 @@ function freeze(id: number) { player.removeTag("freezeScaffoldA"); return; } - player.onScreenDisplay.setTitle("§f§4[§6Paradox§4]§f 凍結!", { - subtitle: "§fスタッフに連絡 §4[§6AntiScaffoldA§4]§f", + player.onScreenDisplay.setTitle("§f§4[§6Paradox§4]§f Frozen!", { + subtitle: "§fContact Staff §4[§6AntiScaffoldA§4]§f", fadeInDuration: 0, fadeOutDuration: 0, stayDuration: 60, diff --git a/src/penrose/PlayerSpawnAfterEvent/ban/globalbanlist.ts b/src/penrose/PlayerSpawnAfterEvent/ban/globalbanlist.ts index 80e87e6..d217988 100644 --- a/src/penrose/PlayerSpawnAfterEvent/ban/globalbanlist.ts +++ b/src/penrose/PlayerSpawnAfterEvent/ban/globalbanlist.ts @@ -21,8 +21,8 @@ function banHammerTime(object: PlayerSpawnAfterEvent) { if (!playerTags.includes("By:Paradox Anticheat")) { player.addTag("By:Paradox Anticheat"); } - if (!playerTags.includes("Reason:あなたはParadoxからグローバルに追放されています!")) { - player.addTag("Reason:あなたはParadoxからグローバルに禁止されています!"); + if (!playerTags.includes("Reason:You are globally banned from Paradox!")) { + player.addTag("Reason:You are globally banned from Paradox!"); } banMessage(player); } diff --git a/src/penrose/PlayerSpawnAfterEvent/onjoin/onjoin.ts b/src/penrose/PlayerSpawnAfterEvent/onjoin/onjoin.ts index 694e938..471a124 100644 --- a/src/penrose/PlayerSpawnAfterEvent/onjoin/onjoin.ts +++ b/src/penrose/PlayerSpawnAfterEvent/onjoin/onjoin.ts @@ -36,7 +36,7 @@ async function onJoinTime(object: PlayerSpawnAfterEvent) { return; } - const reason = "メンテナンス中!ご不便をおかけして申し訳ございません。"; + const reason = "Under Maintenance! Sorry for the inconvenience."; // Kick players from server player.runCommandAsync(`kick "${player.name}" §f\n\n${reason}`).catch(() => { diff --git a/src/penrose/TickEvent/afk/afk.ts b/src/penrose/TickEvent/afk/afk.ts index 22371f9..a460da2 100644 --- a/src/penrose/TickEvent/afk/afk.ts +++ b/src/penrose/TickEvent/afk/afk.ts @@ -51,7 +51,7 @@ function checkAndRemoveAFKPlayers(id: number) { const lowerBound = Math.max(inactiveThreshold - inactiveThreshold * tolerancePercentage, 0); if (isPlayerAFK(velocity) && lastActivityTime && accumulatedTime > lowerBound) { - const kickMessage = "AFKで蹴られた!"; + const kickMessage = "You were kicked for being AFK!"; player.runCommandAsync(`kick "${player.name}" §f\n\n${kickMessage}`).catch(() => { player.triggerEvent("paradox:kick"); }); diff --git a/src/penrose/TickEvent/antivoid/antivoid.ts b/src/penrose/TickEvent/antivoid/antivoid.ts index 86b8d52..a1a3de9 100644 --- a/src/penrose/TickEvent/antivoid/antivoid.ts +++ b/src/penrose/TickEvent/antivoid/antivoid.ts @@ -37,7 +37,7 @@ function antiVoid(_id: number) { lastSavedCord = saveOrGetValue("get"); if (player.location.y - lastSavedCord >= 3 && isFlying == false) { if (flagPlayer == false) { - console.log("プレイヤーにAntiVoid Expliotのフラグが付けられました"); + console.log("Player has been flagged for AntiVoid Expliot"); flagPlayer = true; } } diff --git a/src/penrose/TickEvent/ban/serverban.ts b/src/penrose/TickEvent/ban/serverban.ts index 35b94ed..2109597 100644 --- a/src/penrose/TickEvent/ban/serverban.ts +++ b/src/penrose/TickEvent/ban/serverban.ts @@ -40,8 +40,8 @@ function serverban() { }); // Let staff and player know they are unbanned - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 禁止が解除されました.`); - sendMsg(`@a[tag=paradoxOpped]`, `§f§4[§6Paradox§4]§f §7${player.name}§f 禁止が解除されました。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You have been unbanned.`); + sendMsg(`@a[tag=paradoxOpped]`, `§f§4[§6Paradox§4]§f §7${player.name}§f has been unbanned.`); continue; } // Ban message diff --git a/src/penrose/TickEvent/clearlag/clearlag.ts b/src/penrose/TickEvent/clearlag/clearlag.ts index 04e92e9..6138f3b 100644 --- a/src/penrose/TickEvent/clearlag/clearlag.ts +++ b/src/penrose/TickEvent/clearlag/clearlag.ts @@ -72,16 +72,16 @@ function clearLag(id: number) { clearEntityItems(); clearEntities(); cooldownTimer.delete(object); - sendMsg("@a", `§f§4[§6Paradox§4]§f サーバーラグが解消されました!`); + sendMsg("@a", `§f§4[§6Paradox§4]§f Server lag has been cleared!`); } else if (timeLeftSeconds <= 60) { if (timeLeftSeconds === 60) { - sendMsg("@a", `§f§4[§6Paradox§4]§f サーバーのラグは1分で解消されます!`); + sendMsg("@a", `§f§4[§6Paradox§4]§f Server lag will be cleared in 1 minute!`); } else if (timeLeftSeconds === 5) { - sendMsg("@a", `§f§4[§6Paradox§4]§f サーバーのラグは${timeLeftSeconds}秒でクリアされます!`); + sendMsg("@a", `§f§4[§6Paradox§4]§f Server lag will be cleared in ${timeLeftSeconds} seconds!`); } else if (timeLeftSeconds <= 5 && timeLeftSeconds > 1) { - sendMsg("@a", `§f§4[§6Paradox§4]§f ${timeLeftSeconds} 秒...`); + sendMsg("@a", `§f§4[§6Paradox§4]§f ${timeLeftSeconds} seconds...`); } else if (timeLeftSeconds === 1) { - sendMsg("@a", `§f§4[§6Paradox§4]§f ${timeLeftSeconds} 秒...`); + sendMsg("@a", `§f§4[§6Paradox§4]§f ${timeLeftSeconds} second...`); } } } diff --git a/src/penrose/TickEvent/fly/fly_a.ts b/src/penrose/TickEvent/fly/fly_a.ts index b490d6c..fcf48df 100644 --- a/src/penrose/TickEvent/fly/fly_a.ts +++ b/src/penrose/TickEvent/fly/fly_a.ts @@ -156,6 +156,7 @@ function flya(id: number) { if (glideCheck) { continue; } + const fallCheck = player.isFalling; if (fallCheck) { // Record falling data diff --git a/src/penrose/TickEvent/freeze/freeze.ts b/src/penrose/TickEvent/freeze/freeze.ts index 6eadf08..de4beb2 100644 --- a/src/penrose/TickEvent/freeze/freeze.ts +++ b/src/penrose/TickEvent/freeze/freeze.ts @@ -119,17 +119,17 @@ const freezePlayers = () => { } const combinations: Record = { - "111": "§fスタッフに連絡 §4[§6NA§4]§f§4[§6KA§4]§f§4[§6AS§4]§f", // Aura + Nuker + Scaffold - "110": "§fスタッフに連絡 §4[§6NA§4]§f§4[§6KA§4]§f", // Aura + Nuker - "101": "§fスタッフに連絡 §4[§6NA§4]§f§4[§6AS§4]§f", // Aura + Scaffold - "011": "§fスタッフに連絡 §4[§6KA§4]§f§4[§6AS§4]§f", // Nuker + Scaffold - "000": "§fスタッフに連絡§4[§6Command§4]§f", // Other cases + "111": "§fContact Staff §4[§6NA§4]§f§4[§6KA§4]§f§4[§6AS§4]§f", // Aura + Nuker + Scaffold + "110": "§fContact Staff §4[§6NA§4]§f§4[§6KA§4]§f", // Aura + Nuker + "101": "§fContact Staff §4[§6NA§4]§f§4[§6AS§4]§f", // Aura + Scaffold + "011": "§fContact Staff §4[§6KA§4]§f§4[§6AS§4]§f", // Nuker + Scaffold + "000": "§fContact Staff §4[§6Command§4]§f", // Other cases }; const combinationKey = (hasAuraTag ? "1" : "0") + (hasNukerTag ? "1" : "0") + (hasScaffoldTag ? "1" : "0"); const title = { subtitle: combinations[combinationKey] || combinations["000"] }; - player.onScreenDisplay.setTitle("§f§4[§6Paradox§4]§f 凍結!", { + player.onScreenDisplay.setTitle("§f§4[§6Paradox§4]§f Frozen!", { ...title, fadeInDuration: 0, fadeOutDuration: 0, @@ -160,7 +160,7 @@ export const freezeLeave = (): void => { ?.hasTag("paradoxFreeze"); if (hasFreezeTag) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f§7${event.playerName}§f がフリーズし、サーバーを離れました。`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${event.playerName}§f was frozen and left the server.`); } }); }; @@ -175,7 +175,7 @@ export const freezeJoin = (): void => { ?.hasTag("paradoxFreeze"); if (hasFreezeTag) { - sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${event.playerName}§f がフリーズし、サーバーに返されました.`); + sendMsg("@a[tag=paradoxOpped]", `§f§4[§6Paradox§4]§f §7${event.playerName}§f was frozen and returned to the server.`); } }); }; diff --git a/src/penrose/TickEvent/gamemode/adventure.ts b/src/penrose/TickEvent/gamemode/adventure.ts index 9dbc739..73c494f 100644 --- a/src/penrose/TickEvent/gamemode/adventure.ts +++ b/src/penrose/TickEvent/gamemode/adventure.ts @@ -49,7 +49,7 @@ async function adventure(id: number) { player.runCommandAsync(`gamemode survival`); } ScoreManager.setScore(player, "gamemodevl", 1, true); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${player.name} §6がゲームモードを変更しようとしました §7(Gamemode_A)§6.§4 VL= ${ScoreManager.getScore("gamemodevl", player)}`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${player.name} §6has tried to change their gamemode §7(Gamemode_A)§6.§4 VL= ${ScoreManager.getScore("gamemodevl", player)}`); } } diff --git a/src/penrose/TickEvent/gamemode/creative.ts b/src/penrose/TickEvent/gamemode/creative.ts index 8a53de6..13548a9 100644 --- a/src/penrose/TickEvent/gamemode/creative.ts +++ b/src/penrose/TickEvent/gamemode/creative.ts @@ -50,7 +50,7 @@ async function creative(id: number) { player.runCommandAsync(`gamemode survival`); } ScoreManager.setScore(player, "gamemodevl", 1, true); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${player.name}§6がゲームモードを変更しようとした §7(Gamemode_C)§6.§4 VL= ${ScoreManager.getScore("gamemodevl", player)}`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${player.name} §6has tried to change their gamemode §7(Gamemode_C)§6.§4 VL= ${ScoreManager.getScore("gamemodevl", player)}`); } } diff --git a/src/penrose/TickEvent/gamemode/survival.ts b/src/penrose/TickEvent/gamemode/survival.ts index b907a25..b8fe116 100644 --- a/src/penrose/TickEvent/gamemode/survival.ts +++ b/src/penrose/TickEvent/gamemode/survival.ts @@ -50,7 +50,7 @@ async function survival(id: number) { player.runCommandAsync(`gamemode a`); } ScoreManager.setScore(player, "gamemodevl", 1, true); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${player.name}§6がゲームモードを変更しようとした §7(Gamemode_S)§6.§4 VL= ${ScoreManager.getScore("gamemodevl", player)}`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${player.name} §6has tried to change their gamemode §7(Gamemode_S)§6.§4 VL= ${ScoreManager.getScore("gamemodevl", player)}`); } } diff --git a/src/penrose/TickEvent/illegalitems/illegalitems_a.ts b/src/penrose/TickEvent/illegalitems/illegalitems_a.ts index 45c435f..379593e 100644 --- a/src/penrose/TickEvent/illegalitems/illegalitems_a.ts +++ b/src/penrose/TickEvent/illegalitems/illegalitems_a.ts @@ -23,11 +23,11 @@ function rip(player: Player, inventory_item: ItemStack, enchData?: { id: string; let reason: string; if (enchData) { const { id, level } = enchData; - reason = `不正なアイテム A (${inventory_item.typeId.replace("minecraft:", "")}: ${id}=${level})`; + reason = `Illegal Item A (${inventory_item.typeId.replace("minecraft:", "")}: ${id}=${level})`; } else { - reason = `不正なアイテム A(${inventory_item.typeId.replace("minecraft:", "")}=${inventory_item.amount})`; + reason = `Illegal Item A (${inventory_item.typeId.replace("minecraft:", "")}=${inventory_item.amount})`; if (lore) { - reason += " (伝承)"; + reason += " (Lore)"; } } @@ -112,8 +112,8 @@ function illegalitemsa(id: number) { // Anti Shulker Boxes if (antiShulkerBoolean && itemStackId.includes("shulker")) { playerContainer.setItem(i); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f§7${player.name}§f から ${itemStackId.replace("minecraft:", "")} を削除しました。`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f シュルカーボックスは許可されていません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${itemStackId.replace("minecraft:", "")} from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Shulker Boxes are not allowed!`); continue; } @@ -122,8 +122,8 @@ function illegalitemsa(id: number) { const maxStack = playerItemStack.maxAmount; if (stackBanBoolean && currentStack > maxStack) { playerContainer.setItem(i); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f§7${player.name}§f から ${itemStackId.replace("minecraft:", "")} x ${currentStack} を削除しました.`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 違法なスタックは許可されていません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${itemStackId.replace("minecraft:", "")} x ${currentStack} from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Illegal Stacks are not allowed!`); rip(player, playerItemStack); break; } @@ -131,8 +131,8 @@ function illegalitemsa(id: number) { // If the item is in the "illegalitems" object, remove it from the player's inventory and run the "rip" function on it if (illegalitems.has(itemStackId)) { playerContainer.setItem(i); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f §7${player.name}§f から ${itemStackId.replace("minecraft:", "")} を削除しました。.`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 違法なアイテムは許可されていません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${itemStackId.replace("minecraft:", "")} from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Illegal Items are not allowed!`); rip(player, playerItemStack); break; } @@ -140,8 +140,8 @@ function illegalitemsa(id: number) { // Illegal Lores if (illegalLoresBoolean && !configuration.modules.illegalLores.exclude.includes(String(playerItemStack.getLore()))) { playerContainer.setItem(i); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f§7${player.name}§f から ${itemStackId.replace("minecraft:", "")} を伝承で削除しました.`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 違法な伝承を含むアイテムは許可されていません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${itemStackId.replace("minecraft:", "")} with lore from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Item with illegal lores are not allowed!`); rip(player, playerItemStack, null, true); break; } @@ -210,8 +210,8 @@ function illegalitemsa(id: number) { }; const itemStackId = playerContainer.getItem(itemSlot); playerContainer.setItem(itemSlot); - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f §7${player.name}§f から ${itemStackId.typeId.replace("minecraft:", "")} 違法なエンチャントを削除しました。`); - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f 不正なエンチャントを持つアイテムは許可されません!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f Removed ${itemStackId.typeId.replace("minecraft:", "")} with Illegal Enchantments from §7${player.name}§f.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f Item with illegal Enchantments are not allowed!`); enchantmentPresenceMap.clear(); enchantmentDataMap.clear(); inventorySlotMap.clear(); diff --git a/src/penrose/TickEvent/noperms/nopermission.ts b/src/penrose/TickEvent/noperms/nopermission.ts index 0429674..4f472e0 100644 --- a/src/penrose/TickEvent/noperms/nopermission.ts +++ b/src/penrose/TickEvent/noperms/nopermission.ts @@ -43,7 +43,7 @@ function noperms() { dynamicPropertyRegistry.deleteProperty(entity, entity.id); } - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f§7${entity.nameTag}§f に権限のないアクセス許可があったため権限が削除されました。`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f §7${entity.nameTag}§f had unauthorized permissions. Permissions removed!`); } } diff --git a/src/penrose/TickEvent/noperms/verifypermission.ts b/src/penrose/TickEvent/noperms/verifypermission.ts index 37191f2..098e278 100644 --- a/src/penrose/TickEvent/noperms/verifypermission.ts +++ b/src/penrose/TickEvent/noperms/verifypermission.ts @@ -35,7 +35,7 @@ function verifypermission() { player.removeTag("paradoxOpped"); } - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f §7${player.name}§f に権限のないアクセス許可があった為権限が削除されました。`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f §7${player.name}§f had unauthorized permissions. Permissions removed!`); } } diff --git a/src/penrose/TickEvent/oneplayersleep/oneplayersleep.ts b/src/penrose/TickEvent/oneplayersleep/oneplayersleep.ts index a98fa54..5d67a0a 100644 --- a/src/penrose/TickEvent/oneplayersleep/oneplayersleep.ts +++ b/src/penrose/TickEvent/oneplayersleep/oneplayersleep.ts @@ -15,7 +15,7 @@ async function queueSleep(player: Player) { const configuration = getRegistry(); const hotbarBoolean = configuration.modules.hotbar.enabled; if (hotbarBoolean === undefined || hotbarBoolean === false) { - player.runCommand(`title @a[tag=!vanish] actionbar おはよ!`); + player.runCommand(`title @a[tag=!vanish] actionbar Good Morning`); } } diff --git a/src/penrose/TickEvent/vanish/vanish.ts b/src/penrose/TickEvent/vanish/vanish.ts index 384470f..8ac1035 100644 --- a/src/penrose/TickEvent/vanish/vanish.ts +++ b/src/penrose/TickEvent/vanish/vanish.ts @@ -38,7 +38,7 @@ async function vanish() { player.triggerEvent("unvanish"); // Use try/catch in case nobody has tag 'notify' as this will report 'no target selector' try { - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f §7${player.name}§f には Vanish に対する権限がありません。削除された権限!`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f §7${player.name}§f had unauthorized permissions for Vanish. Permissions removed!`); } catch (error) {} } } diff --git a/src/penrose/TickEvent/worldborder/worldborder.ts b/src/penrose/TickEvent/worldborder/worldborder.ts index 94cb9f5..78d824f 100644 --- a/src/penrose/TickEvent/worldborder/worldborder.ts +++ b/src/penrose/TickEvent/worldborder/worldborder.ts @@ -113,7 +113,7 @@ function worldborder(id: number) { // Make sure nobody climbs over the wall if (x > overworldSize || x < -overworldSize || z > overworldSize || z < -overworldSize) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f あなたは世界の国境に到達しました。`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You have reached the world border.`); const teleportToBorder = (x: number, z: number) => { const safe = safetyProtocol(player, x, y, z); @@ -144,7 +144,7 @@ function worldborder(id: number) { // Make sure nobody climbs over the wall if (x > netherSize || x < -netherSize || z > netherSize || z < -netherSize) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f あなたは世界の境界に到達しました.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You have reached the world border.`); const teleportToBorder = (x: number, z: number) => { const safe = safetyProtocol(player, x, y, z); @@ -175,7 +175,7 @@ function worldborder(id: number) { // Make sure nobody climbs over the wall if (x > endSize || x < -endSize || z > endSize || z < -endSize) { - sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f あなたは世界の境界に到達しました.`); + sendMsgToPlayer(player, `§f§4[§6Paradox§4]§f You have reached the world border.`); const teleportToBorder = (x: number, z: number) => { const safe = safetyProtocol(player, x, y, z); diff --git a/src/util.ts b/src/util.ts index 525e3f6..746801f 100644 --- a/src/util.ts +++ b/src/util.ts @@ -46,15 +46,15 @@ export function flag(player: Player, check: string, checkType: string, hackType: ScoreManager.setScore(player, `${check.toLowerCase()}vl`, 1, true); if (debug) { - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f${player.name} §6を検知しました §7(${hackType}) §4${check}/${checkType} §7(${debugName}=${debug})§4.VL= ${ScoreManager.getScore(check.toLowerCase() + "vl", player)}`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${player.name} §6has failed §7(${hackType}) §4${check}/${checkType} §7(${debugName}=${debug})§4. VL= ${ScoreManager.getScore(check.toLowerCase() + "vl", player)}`); } else if (item && stack) { - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f${player.name} §6を検知しました §7(${hackType}) §4${check}/${checkType} §7(${item.replace("minecraft:", "")}=${stack})§4.VL= ${ScoreManager.getScore(check.toLowerCase() + "vl", player)}`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${player.name} §6has failed §7(${hackType}) §4${check}/${checkType} §7(${item.replace("minecraft:", "")}=${stack})§4. VL= ${ScoreManager.getScore(check.toLowerCase() + "vl", player)}`); } else { - sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f${player.name} §6を検知しました §7(${hackType}) §4${check}/${checkType}です。VL= ${ScoreManager.getScore(check.toLowerCase() + "vl", player)}`); + sendMsg("@a[tag=notify]", `§f§4[§6Paradox§4]§f ${player.name} §6has failed §7(${hackType}) §4${check}/${checkType}. VL= ${ScoreManager.getScore(check.toLowerCase() + "vl", player)}`); } if (check === "Namespoof") { - player.runCommandAsync(`kick "${player.name}" §f\n\n§4[§6Paradox§4]§f 名前に不正な文字が含まれています!`).catch(() => { + player.runCommandAsync(`kick "${player.name}" §f\n\n§4[§6Paradox§4]§f You have illegal characters in your name!`).catch(() => { // If we can't kick them with /kick, then we instantly despawn them kickablePlayers.add(player); player.triggerEvent("paradox:kick"); @@ -84,14 +84,14 @@ export function banMessage(player: Player) { } if (configuration.modules.banAppeal.enabled === true) { - const appealLink = `\n§4[§6discord§4]§f: §b${configuration.modules.banAppeal.discordLink}`; - player.runCommandAsync(`kick "${player.name}" §f\n§l§4あなたは禁止されています!§r\n§4[§6禁止By§4]§f: §7${by || "§7N/A"}§f\n§4[§6理由§4]§f: §7${reason || "§7N/A"}§f${appealLink}`).catch(() => { + const appealLink = `\n§4[§6Appeal§4]§f: §b${configuration.modules.banAppeal.discordLink}`; + player.runCommandAsync(`kick "${player.name}" §f\n§l§4YOU ARE BANNED!§r\n§4[§6Banned By§4]§f: §7${by || "§7N/A"}§f\n§4[§6Reason§4]§f: §7${reason || "§7N/A"}§f${appealLink}`).catch(() => { // If we can't kick them with /kick, then we instantly despawn them kickablePlayers.add(player); player.triggerEvent("paradox:kick"); }); } else { - player.runCommandAsync(`kick "${player.name}" §f\n§l§4あなたは禁止されています!\n§r\n§4[§6禁止By§4]§f: §7${by || "§7N/A"}§f\n§4[§6理由§4]§f: §7${reason || "§7N/A"}§f`).catch(() => { + player.runCommandAsync(`kick "${player.name}" §f\n§l§4YOU ARE BANNED!\n§r\n§4[§6Banned By§4]§f: §7${by || "§7N/A"}§f\n§4[§6Reason§4]§f: §7${reason || "§7N/A"}§f`).catch(() => { // If we can't kick them with /kick, then we instantly despawn them kickablePlayers.add(player); player.triggerEvent("paradox:kick"); @@ -99,7 +99,7 @@ export function banMessage(player: Player) { } // Notify staff that a player was banned - sendMsg("@a[tag=paradoxOpped]", [`§f§4[§6Paradox§4]§f §7${player.name}§f '§4[§6禁止§4]§f: §7${by || "§7N/A"}§f', '§4[§6理由§4]§f: §7${reason || "§7該当なし"}§f`]); + sendMsg("@a[tag=paradoxOpped]", [`§f§4[§6Paradox§4]§f §7${player.name}§f has been banned!`, `§4[§6Banned By§4]§f: §7${by || "§7N/A"}§f`, `§4[§6Reason§4]§f: §7${reason || "§7N/A"}§f`]); } /** diff --git a/src/version.ts b/src/version.ts index 78e67c4..f70d8a7 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,3 +1,3 @@ export default { - version: "3.4.5", + version: "3.4.6", }; diff --git a/test.py b/test.py index cb92159..01a1e13 100644 --- a/test.py +++ b/test.py @@ -1,86 +1,61 @@ import os import glob +import json from deepl import Translator -import shutil import re -# DeepL APIキーを設定します -DEEPL_API_KEY = 'e5c8a027-fb55-8364-623c-f65a9e588af9:fx' -translator = Translator(DEEPL_API_KEY) +translator = Translator('e5c8a027-fb55-8364-623c-f65a9e588af9:fx') -def translate_file(file_path, output_directory, input_directory): - print(f"Translating file: {file_path}") - # ファイルを開き、内容を読み込む +# 翻訳から除外する文字列を保存するJSONファイル +EXCLUSION_FILE = 'save.json' + +def load_exclusions(): + with open(EXCLUSION_FILE, 'r') as file: + return json.load(file) + +def translate_file(file_path, output_directory, input_directory, exclusions): with open(file_path, 'r', encoding='utf-8') as file: lines = file.readlines() - # 各行を翻訳する translated_lines = [] for line in lines: - # import文、constが含まれる行、minecraft:から始まる行は翻訳しない if line.startswith('import') or 'const' in line or 'minecraft:' in line: translated_lines.append(line) else: - # 文字列リテラル('...'、"..."、`...`)を見つけるための正規表現パターン pattern = r"'[^']*'|\"[^\"]*\"|`[^`]*`" matches = re.findall(pattern, line) for match in matches: - # マッチした文字列リテラルを翻訳する - if len(match[1:-1].strip()) > 0: # 空でないことを確認する - # \n, §, ${member.name}, ${player.name}, texturesを含む文字列は翻訳しない - if '\\n' in match or '§' in match or '${member.name}' in match or '${player.name}' in match or 'textures' in match: + if len(match[1:-1].strip()) > 0: + if any(exclusion in match for exclusion in exclusions): continue translation = translator.translate_text(match[1:-1], target_lang='JA') - translated_line = translation.text # TextResultオブジェクトから文字列を取り出す - # 翻訳した文字列リテラルで元のものを置き換える - line = line.replace(match, match[0] + translated_line + match[0]) - # コメント行も翻訳する + line = line.replace(match, match[0] + translation.text + match[0]) pattern = r"//.*$" match = re.search(pattern, line) if match: comment = match.group()[2:].strip() translation = translator.translate_text(comment, target_lang='JA') - translated_comment = translation.text # TextResultオブジェクトから文字列を取り出す - line = line.replace(comment, translated_comment) + line = line.replace(comment, translation.text) translated_lines.append(line) - # 翻訳した内容を新しいファイルに書き込む - relative_path = os.path.relpath(file_path, start=input_directory) - output_file_path = os.path.join(output_directory, relative_path) + output_file_path = os.path.join(output_directory, os.path.relpath(file_path, start=input_directory)) os.makedirs(os.path.dirname(output_file_path), exist_ok=True) with open(output_file_path, 'w', encoding='utf-8') as file: file.writelines(translated_lines) def translate_all_files_in_directory(input_directories, output_directory, recursive=False): + exclusions = load_exclusions() for input_directory in input_directories: - # 指定したディレクトリ内のすべての.tsファイルを見つける file_paths = glob.glob(os.path.join(input_directory, '**' if recursive else '', '*.ts'), recursive=recursive) - - # 各ファイルを翻訳する for file_path in file_paths: - if "node_modules" not in file_path: # node_modulesフォルダは翻訳しない - translate_file(file_path, output_directory, input_directory) + if "node_modules" not in file_path: + translate_file(file_path, output_directory, input_directory, exclusions) -# メニュー画面を表示し、ユーザーから入力を受け取る multi_select = input('複数選択しますか? (yes/no/all): ') -if multi_select.lower() == 'yes': - input_directories = input('翻訳したいフォルダのパスをカンマで区切って入力してください: ').split(',') -elif multi_select.lower() == 'all': - translate_all_folders = input('フォルダ内のすべてのファイルを翻訳しますか? (yes/no): ') - if translate_all_folders.lower() == 'yes': - input_directories = [input('翻訳するフォルダを指定してください: ')] - else: - print('翻訳を終了します') -else: - input_directories = [input('翻訳したいフォルダのパスを入力してください: ')] - +input_directories = [input('翻訳したいフォルダのパスを入力してください: ')] if multi_select.lower() == 'no' else input('翻訳したいフォルダのパスをカンマで区切って入力してください: ').split(',') output_directory = os.path.expanduser('~/Downloads/翻訳済み') -# 出力ディレクトリが存在しない場合は作成する if not os.path.exists(output_directory): os.makedirs(output_directory) -print('翻訳を実行します') -# ファイルの翻訳を開始する translate_all_files_in_directory(input_directories, output_directory, recursive=multi_select.lower() == 'all') -print('完了しました')